commit f74c2bb98776e2de508f4d607cd519873065118e Author: Linus Torvalds Date: Sun Sep 8 13:33:15 2019 -0700 Linux 5.3-rc8 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 983f700eab89c73562f308fc49b1561377d3920e Merge: def8b72f0e40 bfafddd8de42 Author: Linus Torvalds Date: Sun Sep 8 09:34:55 2019 -0700 Merge tag 'compiler-attributes-for-linus-v5.3-rc8' of git://github.com/ojeda/linux Pull section attribute fix from Miguel Ojeda: "Fix Oops in Clang-compiled kernels (Nick Desaulniers)" * tag 'compiler-attributes-for-linus-v5.3-rc8' of git://github.com/ojeda/linux: include/linux/compiler.h: fix Oops for Clang-compiled kernels commit def8b72f0e40f2c9d9f1843af020a955e36a7cf4 Merge: 950b07c14e8c 89f2c0425cb5 Author: Linus Torvalds Date: Sun Sep 8 09:30:31 2019 -0700 Merge tag 'gpio-v5.3-5' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO fixes from Linus Walleij: "All related to the PCA953x driver when handling chips with more than 8 ports, now that works again" * tag 'gpio-v5.3-5' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpio: pca953x: use pca953x_read_regs instead of regmap_bulk_read gpio: pca953x: correct type of reg_direction commit bfafddd8de426d894fcf3e062370b1efaa195ebc Author: Nick Desaulniers Date: Wed Aug 28 15:55:23 2019 -0700 include/linux/compiler.h: fix Oops for Clang-compiled kernels GCC unescapes escaped string section names while Clang does not. Because __section uses the `#` stringification operator for the section name, it doesn't need to be escaped. This fixes an Oops observed in distro's that use systemd and not net.core.bpf_jit_enable=1, when their kernels are compiled with Clang. Link: https://github.com/ClangBuiltLinux/linux/issues/619 Link: https://bugs.llvm.org/show_bug.cgi?id=42950 Link: https://marc.info/?l=linux-netdev&m=156412960619946&w=2 Link: https://lore.kernel.org/lkml/20190904181740.GA19688@gmail.com/ Acked-by: Will Deacon Reported-by: Sedat Dilek Suggested-by: Josh Poimboeuf Tested-by: Sedat Dilek Signed-off-by: Nick Desaulniers [Cherry-picked from the __section cleanup series for 5.3] [Adjusted commit message] Signed-off-by: Miguel Ojeda include/linux/compiler.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 950b07c14e8c59444e2359f15fd70ed5112e11a0 Author: Linus Torvalds Date: Sat Sep 7 14:25:54 2019 -0700 Revert "x86/apic: Include the LDR when clearing out APIC registers" This reverts commit 558682b5291937a70748d36fd9ba757fb25b99ae. Chris Wilson reports that it breaks his CPU hotplug test scripts. In particular, it breaks offlining and then re-onlining the boot CPU, which we treat specially (and the BIOS does too). The symptoms are that we can offline the CPU, but it then does not come back online again: smpboot: CPU 0 is now offline smpboot: Booting Node 0 Processor 0 APIC 0x0 smpboot: do_boot_cpu failed(-1) to wakeup CPU#0 Thomas says he knows why it's broken (my personal suspicion: our magic handling of the "cpu0_logical_apicid" thing), but for 5.3 the right fix is to just revert it, since we've never touched the LDR bits before, and it's not worth the risk to do anything else at this stage. [ Hotpluging of the boot CPU is special anyway, and should be off by default. See the "BOOTPARAM_HOTPLUG_CPU0" config option and the cpu0_hotplug kernel parameter. In general you should not do it, and it has various known limitations (hibernate and suspend require the boot CPU, for example). But it should work, even if the boot CPU is special and needs careful treatment - Linus ] Link: https://lore.kernel.org/lkml/156785100521.13300.14461504732265570003@skylake-alporthouse-com/ Reported-by: Chris Wilson Acked-by: Thomas Gleixner Cc: Bandan Das Signed-off-by: Linus Torvalds arch/x86/kernel/apic/apic.c | 4 ---- 1 file changed, 4 deletions(-) commit b3a9964cfa690150e49ae75ba16416ccaac3a8ba Merge: d3464ccd105b a8e0abae2fe0 Author: Linus Torvalds Date: Sat Sep 7 11:48:28 2019 -0700 Merge tag 'char-misc-5.3-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull Documentation updates from Greg KH: "A few small patches for the documenation file that came in through the char-misc tree in -rc7 for your tree. They fix the mistake in the .rst format that kept the table of companies from showing up in the html output, and most importantly, add people's names to the list showing support for our process" * tag 'char-misc-5.3-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: Documentation/process: Add Qualcomm process ambassador for hardware security issues Documentation/process/embargoed-hardware-issues: Microsoft ambassador Documentation/process: Add Google contact for embargoed hardware issues Documentation/process: Volunteer as the ambassador for Xen commit a8e0abae2fe0e788fa3d92c043605d1211c13735 Author: Trilok Soni Date: Fri Sep 6 12:01:57 2019 -0700 Documentation/process: Add Qualcomm process ambassador for hardware security issues Add Trilok Soni as process ambassador for hardware security issues from Qualcomm. Signed-off-by: Trilok Soni Link: https://lore.kernel.org/r/1567796517-8964-1-git-send-email-tsoni@codeaurora.org Signed-off-by: Greg Kroah-Hartman Documentation/process/embargoed-hardware-issues.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d3464ccd105b42f87302572ee1f097e6e0b432c6 Merge: 1e3778cb223e cf24aac38698 Author: Linus Torvalds Date: Sat Sep 7 10:00:34 2019 -0700 Merge tag 'dmaengine-fix-5.3' of git://git.infradead.org/users/vkoul/slave-dma Pull dmaengine fixes from Vinod Koul: "Some late fixes for drivers: - memory leak in ti crossbar dma driver - cleanup of omap dma probe - Fix for link list configuration in sprd dma driver - Handling fixed for DMACHCLR if iommu is mapped in rcar dma" * tag 'dmaengine-fix-5.3' of git://git.infradead.org/users/vkoul/slave-dma: dmaengine: rcar-dmac: Fix DMACHCLR handling if iommu is mapped dmaengine: sprd: Fix the DMA link-list configuration dmaengine: ti: omap-dma: Add cleanup in omap_dma_probe() dmaengine: ti: dma-crossbar: Fix a memory leak bug commit 1e3778cb223e861808ae0daccf353536e7573eed Merge: 7641033e17ef 0622800d2ebc Author: Linus Torvalds Date: Fri Sep 6 16:18:43 2019 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fix from James Bottomley: "Just a single lpfc fix adjusting the number of available queues for high CPU count systems" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: lpfc: Raise config max for lpfc_fcp_mq_threshold variable commit 7641033e17efe472c0e2fd6da00f1b75dc6788f3 Merge: 9772152b4b3c 274b924088e9 Author: Linus Torvalds Date: Fri Sep 6 16:14:32 2019 -0700 Merge tag 'libnvdimm-fix-5.3-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm fix from Dan Williams: "Restore support for 1GB alignment namespaces, truncate the end of misaligned namespaces" * tag 'libnvdimm-fix-5.3-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: libnvdimm/pfn: Fix namespace creation on misaligned addresses commit 9772152b4b3cd32a1aadf75e3d1a16a072d3e4a5 Merge: 36daa831b555 0c043d70d047 Author: Linus Torvalds Date: Fri Sep 6 16:12:30 2019 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fix from Dmitry Torokhov: "A tiny update from Benjamin removing a mistakenly added Elan PNP ID so that the device is again handled by hid-multitouch" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: elan_i2c - remove Lenovo Legion Y7000 PnpID commit 0c043d70d04711fe6c380df9065fdc44192c49bf Author: Benjamin Tissoires Date: Fri Sep 6 12:02:32 2019 -0700 Input: elan_i2c - remove Lenovo Legion Y7000 PnpID Looks like the Bios of the Lenovo Legion Y7000 is using ELAN061B when the actual device is supposed to be used with hid-multitouch. Remove it from the list of the supported device, hoping that no one will complain about the loss in functionality. Link: https://bugzilla.kernel.org/show_bug.cgi?id=203467 Fixes: 738c06d0e456 ("Input: elan_i2c - add hardware ID for multiple Lenovo laptops") Signed-off-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov include/linux/input/elan-i2c-ids.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 36daa831b55538dc2e4a906de20c5d91033ebb21 Merge: 30d7030b2fb3 8928e917aeaf Author: Linus Torvalds Date: Fri Sep 6 12:53:31 2019 -0700 Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC fixes from Arnd Bergmann: "There are three more fixes for this week: - The Windows-on-ARM laptops require a workaround to prevent crashing at boot from ACPI - The Renesas 'draak' board needs one bugfix for the backlight regulator - Also for Renesas, the 'hihope' board accidentally had its eMMC turned off in the 5.3 merge window" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: soc: qcom: geni: Provide parameter error checking arm64: dts: renesas: hihope-common: Fix eMMC status arm64: dts: renesas: r8a77995: draak: Fix backlight regulator name commit 30d7030b2fb39d9b53270b2fe0caac8e8792890c Merge: 76f5e9f870b0 b0841eefd969 Author: Linus Torvalds Date: Fri Sep 6 12:44:08 2019 -0700 Merge tag 'configfs-for-5.3' of git://git.infradead.org/users/hch/configfs Pull configfs fixes from Christoph Hellwig: "Late configfs fixes from Al that fix pretty nasty removal vs attribute access races" * tag 'configfs-for-5.3' of git://git.infradead.org/users/hch/configfs: configfs: provide exclusion between IO and removals configfs: new object reprsenting tree fragments configfs_register_group() shouldn't be (and isn't) called in rmdirable parts configfs: stash the data we need into configfs_buffer at open time commit 76f5e9f870b045546b9a429f21b65205baf69c0c Merge: 044597100037 754265bcab78 Author: Linus Torvalds Date: Fri Sep 6 12:22:36 2019 -0700 Merge tag 'iommu-fixes-v5.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull IOMMU fixes from Joerg Roedel: - Revert an Intel VT-d patch that caused problems for some users. - Removal of a feature in the Intel VT-d driver that was never supported in hardware. This qualifies as a fix because the code for this feature sets reserved bits in the invalidation queue descriptor, causing failed invalidations on real hardware. - Two fixes for AMD IOMMU driver to fix a race condition and to add a missing IOTLB flush when kernel is booted in kdump mode. * tag 'iommu-fixes-v5.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/amd: Fix race in increase_address_space() iommu/amd: Flush old domains in kdump kernel iommu/vt-d: Remove global page flush support Revert "iommu/vt-d: Avoid duplicated pci dma alias consideration" commit 0445971000375859008414f87e7c72fa0d809cf8 Merge: 08d433d81215 8ad8e02c2fa7 Author: Linus Torvalds Date: Fri Sep 6 09:01:49 2019 -0700 Merge tag 'mmc-v5.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fix from Ulf Hansson: "Revert in order to fix card init for some eMMCs that need retries for CMD6" * tag 'mmc-v5.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: Revert "mmc: core: do not retry CMD6 in __mmc_switch()" commit 08d433d8121598f7c2a45f3461c534746b1ed05b Merge: 9d098a6234c1 1e19ec6c3c41 Author: Linus Torvalds Date: Fri Sep 6 08:58:19 2019 -0700 Merge tag 'drm-fixes-2019-09-06' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Live from my friend's couch in Barcelona, latest round of drm fixes. The command line parser regression fixes look a bit larger because they come with selftests included for the bugs they fix. Otherwise a single nouveau, single ingenic and single vmwgfx fix: nouveau: - add missing MODULE_FIRMWARE definitions igenic: - hardcode panel type DPI vmwgfx: - double free fix core: - command line mode parser fixes" * tag 'drm-fixes-2019-09-06' of git://anongit.freedesktop.org/drm/drm: drm/vmwgfx: Fix double free in vmw_recv_msg() drm/nouveau/sec2/gp102: add missing MODULE_FIRMWAREs drm/selftests: modes: Add more unit tests for the cmdline parser drm/modes: Introduce a whitelist for the named modes drm/modes: Fix the command line parser to take force options into account drm/modes: Add a switch to differentiate free standing options drm/ingenic: Hardcode panel type to DPI commit 9d098a6234c135c3fd1692fc451908b5c2a43244 Merge: 13da6ac106be 02fa5d7b17a7 Author: Linus Torvalds Date: Fri Sep 6 08:56:06 2019 -0700 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio fixes from Michael Tsirkin: "virtio, vhost, and balloon bugfixes. A couple of last minute bugfixes. And a revert of a failed attempt at metadata access optimization - we'll try again in the next cycle" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: mm/balloon_compaction: suppress allocation warnings Revert "vhost: access vq metadata through kernel virtual address" vhost: Remove unnecessary variable virtio-net: lower min ring num_free for efficiency vhost/test: fix build for vhost test vhost/test: fix build for vhost test commit 13da6ac106be36d7c2d7f201fd8850a9ac235e6b Merge: d41a3effbb53 a8318c13e79b Author: Linus Torvalds Date: Fri Sep 6 08:54:45 2019 -0700 Merge tag 'powerpc-5.3-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "One fix for a boot hang on some Freescale machines when PREEMPT is enabled. Two CVE fixes for bugs in our handling of FP registers and transactional memory, both of which can result in corrupted FP state, or FP state leaking between processes. Thanks to: Chris Packham, Christophe Leroy, Gustavo Romero, Michael Neuling" * tag 'powerpc-5.3-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/tm: Fix restoring FP/VMX facility incorrectly on interrupts powerpc/tm: Fix FP/VMX unavailable exceptions inside a transaction powerpc/64e: Drop stale call to smp_processor_id() which hangs SMP startup commit 1f493162b59b09224de4d9c94e4392807e0edcce Author: Sasha Levin Date: Fri Sep 6 05:58:52 2019 -0400 Documentation/process/embargoed-hardware-issues: Microsoft ambassador Add Sasha Levin as Microsoft's process ambassador. Signed-off-by: Sasha Levin Signed-off-by: Sasha Levin Link: https://lore.kernel.org/r/20190906095852.23568-1-sashal@kernel.org Signed-off-by: Greg Kroah-Hartman Documentation/process/embargoed-hardware-issues.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8928e917aeafaf38d65cc5cbc1f11e952dbed062 Author: Lee Jones Date: Thu Sep 5 09:25:55 2019 +0100 soc: qcom: geni: Provide parameter error checking When booting with ACPI, the Geni Serial Engine is not set as the I2C/SPI parent and thus, the wrapper (parent device) is unassigned. This causes the kernel to crash with a null dereference error. Link: https://lore.kernel.org/r/20190905082555.15020-1-lee.jones@linaro.org Fixes: 8bc529b25354 ("soc: qcom: geni: Add support for ACPI") Acked-by: Bjorn Andersson Reviewed-by: Stephen Boyd Signed-off-by: Lee Jones Signed-off-by: Arnd Bergmann drivers/soc/qcom/qcom-geni-se.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 754265bcab78a9014f0f99cd35e0d610fcd7dfa7 Author: Joerg Roedel Date: Fri Sep 6 10:39:54 2019 +0200 iommu/amd: Fix race in increase_address_space() After the conversion to lock-less dma-api call the increase_address_space() function can be called without any locking. Multiple CPUs could potentially race for increasing the address space, leading to invalid domain->mode settings and invalid page-tables. This has been happening in the wild under high IO load and memory pressure. Fix the race by locking this operation. The function is called infrequently so that this does not introduce a performance regression in the dma-api path again. Reported-by: Qian Cai Fixes: 256e4621c21a ('iommu/amd: Make use of the generic IOVA allocator') Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 36b7200f67dfe75b416b5281ed4ace9927b513bc Author: Stuart Hayes Date: Thu Sep 5 12:09:48 2019 -0500 iommu/amd: Flush old domains in kdump kernel When devices are attached to the amd_iommu in a kdump kernel, the old device table entries (DTEs), which were copied from the crashed kernel, will be overwritten with a new domain number. When the new DTE is written, the IOMMU is told to flush the DTE from its internal cache--but it is not told to flush the translation cache entries for the old domain number. Without this patch, AMD systems using the tg3 network driver fail when kdump tries to save the vmcore to a network system, showing network timeouts and (sometimes) IOMMU errors in the kernel log. This patch will flush IOMMU translation cache entries for the old domain when a DTE gets overwritten with a new domain number. Signed-off-by: Stuart Hayes Fixes: 3ac3e5ee5ed5 ('iommu/amd: Copy old trans table from old kernel') Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 1e19ec6c3c417a0893fcfae7abfba623e781d876 Merge: 7610bb0bde4c 424c38a4e325 Author: Dave Airlie Date: Fri Sep 6 16:25:45 2019 +1000 Merge tag 'drm-misc-fixes-2019-09-05' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes drm-misc-fixes for v5.3 final: - Make ingenic panel type DPI insteado f unknown. - Fixes for command line parser modes. Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/606d87b2-1840-c893-eb30-d6c471c9e50a@linux.intel.com commit 7610bb0bde4c210212cdbb3be9b502eaad10731a Merge: b0dfce90e342 08b0c891605a Author: Dave Airlie Date: Fri Sep 6 16:23:25 2019 +1000 Merge branch 'vmwgfx-fixes-5.3' of git://people.freedesktop.org/~thomash/linux into drm-fixes Single vmwgfx double free fix. Signed-off-by: Dave Airlie commit d41a3effbb53b1bcea41e328d16a4d046a508381 Author: Hillf Danton Date: Mon Sep 2 13:37:29 2019 +0100 keys: Fix missing null pointer check in request_key_auth_describe() If a request_key authentication token key gets revoked, there's a window in which request_key_auth_describe() can see it with a NULL payload - but it makes no check for this and something like the following oops may occur: BUG: Kernel NULL pointer dereference at 0x00000038 Faulting instruction address: 0xc0000000004ddf30 Oops: Kernel access of bad area, sig: 11 [#1] ... NIP [...] request_key_auth_describe+0x90/0xd0 LR [...] request_key_auth_describe+0x54/0xd0 Call Trace: [...] request_key_auth_describe+0x54/0xd0 (unreliable) [...] proc_keys_show+0x308/0x4c0 [...] seq_read+0x3d0/0x540 [...] proc_reg_read+0x90/0x110 [...] __vfs_read+0x3c/0x70 [...] vfs_read+0xb4/0x1b0 [...] ksys_read+0x7c/0x130 [...] system_call+0x5c/0x70 Fix this by checking for a NULL pointer when describing such a key. Also make the read routine check for a NULL pointer to be on the safe side. [DH: Modified to not take already-held rcu lock and modified to also check in the read routine] Fixes: 04c567d9313e ("[PATCH] Keys: Fix race between two instantiators of a key") Reported-by: Sachin Sant Signed-off-by: Hillf Danton Signed-off-by: David Howells Tested-by: Sachin Sant Signed-off-by: Linus Torvalds security/keys/request_key_auth.c | 6 ++++++ 1 file changed, 6 insertions(+) commit a3f5e1f5783974813b5d43beb38c4eeaa67afbef Merge: 19e4147a04a4 2a36c16efab2 Author: Linus Torvalds Date: Thu Sep 5 10:26:20 2019 -0700 Merge tag 'sound-5.3-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A collection of small HD-audio fixes: - A regression fix for Realtek codecs due to the recent initialization procedure change - A fix for potential endless loop at the quirk table lookup - Quirks for Lenovo, ASUS and HP machines" * tag 'sound-5.3-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda/realtek - Fix the problem of two front mics on a ThinkCentre ALSA: hda/realtek - Enable internal speaker & headset mic of ASUS UX431FL ALSA: hda/realtek - Add quirk for HP Pavilion 15 ALSA: hda/realtek - Fix overridden device-specific initialization ALSA: hda - Fix potential endless loop at applying quirks commit 19e4147a04a43d210dbacda76e0988f90bb0ba45 Merge: 262f7eeddc85 4030b4c585c4 Author: Linus Torvalds Date: Thu Sep 5 09:47:32 2019 -0700 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Ingo Molnar: "Misc fixes: - EFI boot fix for signed kernels - an AC flags fix related to UBSAN - Hyper-V infinite loop fix" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/hyper-v: Fix overflow bug in fill_gva_list() x86/uaccess: Don't leak the AC flags into __get_user() argument evaluation x86/boot: Preserve boot_params.secure_boot from sanitizing commit 262f7eeddc85c657e3087561dc8c3cfe227363ff Merge: 13133f933ac4 1251201c0d34 Author: Linus Torvalds Date: Thu Sep 5 09:38:31 2019 -0700 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixes from Ingo Molnar: "This fixes an ABI bug introduced this cycle, plus fixes a throttling bug" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/core: Fix uclamp ABI bug, clean up and robustify sched_read_attr() ABI logic and code sched/fair: Don't assign runtime for throttled cfs_rq commit 13133f933ac463f233fbf118061c4c47cd72eecf Merge: 3b47fd5ca9ea 52d083472e0b Author: Linus Torvalds Date: Thu Sep 5 09:23:02 2019 -0700 Merge tag 'clang-format-for-linus-v5.3-rc8' of git://github.com/ojeda/linux Pull clang-format update from Miguel Ojeda: "Update with the latest for_each macro list" * tag 'clang-format-for-linus-v5.3-rc8' of git://github.com/ojeda/linux: clang-format: Update with the latest for_each macro list commit 13212a648f3142a5fa893b1f66baa7eb95f3e3a8 Merge: d9a2b63ca917 ae688e1720fd Author: Arnd Bergmann Date: Thu Sep 5 17:56:29 2019 +0200 Merge tag 'renesas-fixes2-for-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into arm/fixes Second Round of Renesas ARM Based SoC Fixes for v5.3 * RZ/G2M based HiHope main board - Re-enabled accidently disabled SDHI3 (eMMC) support * tag 'renesas-fixes2-for-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: arm64: dts: renesas: hihope-common: Fix eMMC status Link: https://lore.kernel.org/r/cover.1567675986.git.horms+renesas@verge.net.au Signed-off-by: Arnd Bergmann commit 08b0c891605acf727e43e3e03a25857d3e789b61 Author: Dan Carpenter Date: Thu Aug 15 11:30:50 2019 +0300 drm/vmwgfx: Fix double free in vmw_recv_msg() We recently added a kfree() after the end of the loop: if (retries == RETRIES) { kfree(reply); return -EINVAL; } There are two problems. First the test is wrong and because retries equals RETRIES if we succeed on the last iteration through the loop. Second if we fail on the last iteration through the loop then the kfree is a double free. When you're reading this code, please note the break statement at the end of the while loop. This patch changes the loop so that if it's not successful then "reply" is NULL and we can test for that afterward. Cc: Fixes: 6b7c3b86f0b6 ("drm/vmwgfx: fix memory leak when too many retries have occurred") Signed-off-by: Dan Carpenter Reviewed-by: Thomas Hellstrom Signed-off-by: Thomas Hellstrom drivers/gpu/drm/vmwgfx/vmwgfx_msg.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit f56f791f6d8e8296c9dd194506ee2b703b1227d4 Author: Kees Cook Date: Wed Sep 4 09:24:49 2019 -0700 Documentation/process: Add Google contact for embargoed hardware issues This adds myself as the Google contact for embargoed hardware security issues and fixes some small typos. Cc: Thomas Gleixner Cc: Matt Linton Cc: Matthew Garrett Signed-off-by: Kees Cook Acked-by: Guenter Roeck Link: https://lore.kernel.org/r/201909040922.56496BF70@keescook Signed-off-by: Greg Kroah-Hartman Documentation/process/embargoed-hardware-issues.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 02e740aeca79e9a3c464bc2ebb510457c85d2015 Author: Andrew Cooper Date: Wed Sep 4 19:17:02 2019 +0100 Documentation/process: Volunteer as the ambassador for Xen Cc: Jonathan Corbet Cc: Thomas Gleixner Cc: Tyler Hicks Cc: Ben Hutchings Cc: Konrad Rzeszutek Wilk Cc: Josh Poimboeuf Cc: Jiri Kosina Signed-off-by: Andrew Cooper Link: https://lore.kernel.org/r/20190904181702.19788-1-andrew.cooper3@citrix.com Signed-off-by: Greg Kroah-Hartman Documentation/process/embargoed-hardware-issues.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b0841eefd9693827afb9888235e26ddd098f9cef Author: Al Viro Date: Sat Aug 31 09:43:43 2019 +0200 configfs: provide exclusion between IO and removals Make sure that attribute methods are not called after the item has been removed from the tree. To do so, we * at the point of no return in removals, grab ->frag_sem exclusive and mark the fragment dead. * call the methods of attributes with ->frag_sem taken shared and only after having verified that the fragment is still alive. The main benefit is for method instances - they are guaranteed that the objects they are accessing *and* all ancestors are still there. Another win is that we don't need to bother with extra refcount on config_item when opening a file - the item will be alive for as long as it stays in the tree, and we won't touch it/attributes/any associated data after it's been removed from the tree. Signed-off-by: Al Viro Signed-off-by: Christoph Hellwig fs/configfs/dir.c | 23 +++++++++++++++++ fs/configfs/file.c | 75 +++++++++++++++++++++++++++++++++++++++++------------- 2 files changed, 80 insertions(+), 18 deletions(-) commit 3b47fd5ca9ead91156bcdf6435279ad0b14a650c Merge: 089cf7f6ecb2 eb3d8f42231a Author: Linus Torvalds Date: Wed Sep 4 11:09:53 2019 -0700 Merge tag 'nfs-for-5.3-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs Pull NFS client bugfix from Trond Myklebust: "Regression fix inode fileid checks in attribute revalidation code" * tag 'nfs-for-5.3-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: NFS: Fix inode fileid checks in attribute revalidation code commit 1251201c0d34fadf69d56efa675c2b7dd0a90eca Author: Ingo Molnar Date: Wed Sep 4 09:55:32 2019 +0200 sched/core: Fix uclamp ABI bug, clean up and robustify sched_read_attr() ABI logic and code Thadeu Lima de Souza Cascardo reported that 'chrt' broke on recent kernels: $ chrt -p $$ chrt: failed to get pid 26306's policy: Argument list too long and he has root-caused the bug to the following commit increasing sched_attr size and breaking sched_read_attr() into returning -EFBIG: a509a7cd7974 ("sched/uclamp: Extend sched_setattr() to support utilization clamping") The other, bigger bug is that the whole sched_getattr() and sched_read_attr() logic of checking non-zero bits in new ABI components is arguably broken, and pretty much any extension of the ABI will spuriously break the ABI. That's way too fragile. Instead implement the perf syscall's extensible ABI instead, which we already implement on the sched_setattr() side: - if user-attributes have the same size as kernel attributes then the logic is unchanged. - if user-attributes are larger than the kernel knows about then simply skip the extra bits, but set attr->size to the (smaller) kernel size so that tooling can (in principle) handle older kernel as well. - if user-attributes are smaller than the kernel knows about then just copy whatever user-space can accept. Also clean up the whole logic: - Simplify the code flow - there's no need for 'ret' for example. - Standardize on 'kattr/uattr' and 'ksize/usize' naming to make sure we always know which side we are dealing with. - Why is it called 'read' when what it does is to copy to user? This code is so far away from VFS read() semantics that the naming is actively confusing. Name it sched_attr_copy_to_user() instead, which mirrors other copy_to_user() functionality. - Move the attr->size assignment from the head of sched_getattr() to the sched_attr_copy_to_user() function. Nothing else within the kernel should care about the size of the structure. With these fixes the sched_getattr() syscall now nicely supports an extensible ABI in both a forward and backward compatible fashion, and will also fix the chrt bug. As an added bonus the bogus -EFBIG return is removed as well, which as Thadeu noted should have been -E2BIG to begin with. Reported-by: Thadeu Lima de Souza Cascardo Tested-by: Dietmar Eggemann Tested-by: Thadeu Lima de Souza Cascardo Acked-by: Thadeu Lima de Souza Cascardo Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Patrick Bellasi Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: a509a7cd7974 ("sched/uclamp: Extend sched_setattr() to support utilization clamping") Link: https://lkml.kernel.org/r/20190904075532.GA26751@gmail.com Signed-off-by: Ingo Molnar kernel/sched/core.c | 78 ++++++++++++++++++++++++++--------------------------- 1 file changed, 39 insertions(+), 39 deletions(-) commit d9a2b63ca9175015672e2a294b143fdc6e4d7a4c Merge: 089cf7f6ecb2 45f5d5a9e34d Author: Arnd Bergmann Date: Wed Sep 4 14:38:34 2019 +0200 Merge tag 'renesas-fixes-for-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into arm/fixes Renesas ARM Based SoC Fixes for v5.3 * R-Car D3 (r8a77995) based Draak Board - Correct backlight regulator name in device tree * tag 'renesas-fixes-for-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: arm64: dts: renesas: r8a77995: draak: Fix backlight regulator name Signed-off-by: Arnd Bergmann commit a8318c13e79badb92bc6640704a64cc022a6eb97 Author: Gustavo Romero Date: Wed Sep 4 00:55:28 2019 -0400 powerpc/tm: Fix restoring FP/VMX facility incorrectly on interrupts When in userspace and MSR FP=0 the hardware FP state is unrelated to the current process. This is extended for transactions where if tbegin is run with FP=0, the hardware checkpoint FP state will also be unrelated to the current process. Due to this, we need to ensure this hardware checkpoint is updated with the correct state before we enable FP for this process. Unfortunately we get this wrong when returning to a process from a hardware interrupt. A process that starts a transaction with FP=0 can take an interrupt. When the kernel returns back to that process, we change to FP=1 but with hardware checkpoint FP state not updated. If this transaction is then rolled back, the FP registers now contain the wrong state. The process looks like this: Userspace: Kernel Start userspace with MSR FP=0 TM=1 < ----- ... tbegin bne Hardware interrupt ---- > .... ret_from_except restore_math() /* sees FP=0 */ restore_fp() tm_active_with_fp() /* sees FP=1 (Incorrect) */ load_fp_state() FP = 0 -> 1 < ----- Return to userspace with MSR TM=1 FP=1 with junk in the FP TM checkpoint TM rollback reads FP junk When returning from the hardware exception, tm_active_with_fp() is incorrectly making restore_fp() call load_fp_state() which is setting FP=1. The fix is to remove tm_active_with_fp(). tm_active_with_fp() is attempting to handle the case where FP state has been changed inside a transaction. In this case the checkpointed and transactional FP state is different and hence we must restore the FP state (ie. we can't do lazy FP restore inside a transaction that's used FP). It's safe to remove tm_active_with_fp() as this case is handled by restore_tm_state(). restore_tm_state() detects if FP has been using inside a transaction and will set load_fp and call restore_math() to ensure the FP state (checkpoint and transaction) is restored. This is a data integrity problem for the current process as the FP registers are corrupted. It's also a security problem as the FP registers from one process may be leaked to another. Similarly for VMX. A simple testcase to replicate this will be posted to tools/testing/selftests/powerpc/tm/tm-poison.c This fixes CVE-2019-15031. Fixes: a7771176b439 ("powerpc: Don't enable FP/Altivec if not checkpointed") Cc: stable@vger.kernel.org # 4.15+ Signed-off-by: Gustavo Romero Signed-off-by: Michael Neuling Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190904045529.23002-2-gromero@linux.vnet.ibm.com arch/powerpc/kernel/process.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) commit 8205d5d98ef7f155de211f5e2eb6ca03d95a5a60 Author: Gustavo Romero Date: Wed Sep 4 00:55:27 2019 -0400 powerpc/tm: Fix FP/VMX unavailable exceptions inside a transaction When we take an FP unavailable exception in a transaction we have to account for the hardware FP TM checkpointed registers being incorrect. In this case for this process we know the current and checkpointed FP registers must be the same (since FP wasn't used inside the transaction) hence in the thread_struct we copy the current FP registers to the checkpointed ones. This copy is done in tm_reclaim_thread(). We use thread->ckpt_regs.msr to determine if FP was on when in userspace. thread->ckpt_regs.msr represents the state of the MSR when exiting userspace. This is setup by check_if_tm_restore_required(). Unfortunatley there is an optimisation in giveup_all() which returns early if tsk->thread.regs->msr (via local variable `usermsr`) has FP=VEC=VSX=SPE=0. This optimisation means that check_if_tm_restore_required() is not called and hence thread->ckpt_regs.msr is not updated and will contain an old value. This can happen if due to load_fp=255 we start a userspace process with MSR FP=1 and then we are context switched out. In this case thread->ckpt_regs.msr will contain FP=1. If that same process is then context switched in and load_fp overflows, MSR will have FP=0. If that process now enters a transaction and does an FP instruction, the FP unavailable will not update thread->ckpt_regs.msr (the bug) and MSR FP=1 will be retained in thread->ckpt_regs.msr. tm_reclaim_thread() will then not perform the required memcpy and the checkpointed FP regs in the thread struct will contain the wrong values. The code path for this happening is: Userspace: Kernel Start userspace with MSR FP/VEC/VSX/SPE=0 TM=1 < ----- ... tbegin bne fp instruction FP unavailable ---- > fp_unavailable_tm() tm_reclaim_current() tm_reclaim_thread() giveup_all() return early since FP/VMX/VSX=0 /* ckpt MSR not updated (Incorrect) */ tm_reclaim() /* thread_struct ckpt FP regs contain junk (OK) */ /* Sees ckpt MSR FP=1 (Incorrect) */ no memcpy() performed /* thread_struct ckpt FP regs not fixed (Incorrect) */ tm_recheckpoint() /* Put junk in hardware checkpoint FP regs */ .... < ----- Return to userspace with MSR TM=1 FP=1 with junk in the FP TM checkpoint TM rollback reads FP junk This is a data integrity problem for the current process as the FP registers are corrupted. It's also a security problem as the FP registers from one process may be leaked to another. This patch moves up check_if_tm_restore_required() in giveup_all() to ensure thread->ckpt_regs.msr is updated correctly. A simple testcase to replicate this will be posted to tools/testing/selftests/powerpc/tm/tm-poison.c Similarly for VMX. This fixes CVE-2019-15030. Fixes: f48e91e87e67 ("powerpc/tm: Fix FP and VMX register corruption") Cc: stable@vger.kernel.org # 4.12+ Signed-off-by: Gustavo Romero Signed-off-by: Michael Neuling Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190904045529.23002-1-gromero@linux.vnet.ibm.com arch/powerpc/kernel/process.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 02fa5d7b17a761f53ef1eedfc254e1f33bd226b0 Author: Nadav Amit Date: Tue Aug 20 02:16:46 2019 -0700 mm/balloon_compaction: suppress allocation warnings There is no reason to print warnings when balloon page allocation fails, as they are expected and can be handled gracefully. Since VMware balloon now uses balloon-compaction infrastructure, and suppressed these warnings before, it is also beneficial to suppress these warnings to keep the same behavior that the balloon had before. Cc: Jason Wang Signed-off-by: Nadav Amit Signed-off-by: Michael S. Tsirkin Reviewed-by: David Hildenbrand mm/balloon_compaction.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3d2c7d37047557175fb41de044091050b5f0d73b Author: Michael S. Tsirkin Date: Sat Aug 10 13:53:21 2019 -0400 Revert "vhost: access vq metadata through kernel virtual address" This reverts commit 7f466032dc ("vhost: access vq metadata through kernel virtual address"). The commit caused a bunch of issues, and while commit 73f628ec9e ("vhost: disable metadata prefetch optimization") disabled the optimization it's not nice to keep lots of dead code around. Signed-off-by: Michael S. Tsirkin drivers/vhost/vhost.c | 515 +------------------------------------------------- drivers/vhost/vhost.h | 41 ---- 2 files changed, 3 insertions(+), 553 deletions(-) commit 896fc242bc1d261c1178838487a0a54b260625cc Author: Yunsheng Lin Date: Tue Aug 20 20:36:32 2019 +0800 vhost: Remove unnecessary variable It is unnecessary to use ret variable to return the error code, just return the error code directly. Signed-off-by: Yunsheng Lin Signed-off-by: Michael S. Tsirkin drivers/vhost/vhost.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 718be6bab26fb01fa0147a2b614a3eefd96a2957 Author: ? jiang Date: Tue Aug 20 02:51:23 2019 +0000 virtio-net: lower min ring num_free for efficiency This change lowers ring buffer reclaim threshold from 1/2*queue to budget for better performance. According to our test with qemu + dpdk, packet dropping happens when the guest is not able to provide free buffer in avail ring timely with default 1/2*queue. The value in the patch has been tested and does show better performance. Test setup: iperf3 to generate packets to guest (total 30mins, pps 400k, UDP) avg packets drop before: 2842 avg packets drop after: 360(-87.3%) Further, current code suffers from a starvation problem: the amount of work done by try_fill_recv is not bounded by the budget parameter, thus (with large queues) once in a while userspace gets blocked for a long time while queue is being refilled. Trigger refills earlier to make sure the amount of work to do is limited. Signed-off-by: jiangkidd Acked-by: Jason Wang Acked-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin drivers/net/virtio_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 264b563b8675771834419057cbe076c1a41fb666 Author: Tiwei Bie Date: Wed Aug 28 13:37:00 2019 +0800 vhost/test: fix build for vhost test Since vhost_exceeds_weight() was introduced, callers need to specify the packet weight and byte weight in vhost_dev_init(). Note that, the packet weight isn't counted in this patch to keep the original behavior unchanged. Fixes: e82b9b0727ff ("vhost: introduce vhost_exceeds_weight()") Cc: stable@vger.kernel.org Signed-off-by: Tiwei Bie Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang drivers/vhost/test.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 93d2c4de8d8129b97ee1e1a222aedb0719d2fcd9 Author: Tiwei Bie Date: Wed Aug 28 13:36:59 2019 +0800 vhost/test: fix build for vhost test Since below commit, callers need to specify the iov_limit in vhost_dev_init() explicitly. Fixes: b46a0bf78ad7 ("vhost: fix OOB in get_rx_bufs()") Cc: stable@vger.kernel.org Signed-off-by: Tiwei Bie Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang drivers/vhost/test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2a36c16efab254dd6017efeb35ad88ecc96f2328 Author: Hui Wang Date: Wed Sep 4 13:53:27 2019 +0800 ALSA: hda/realtek - Fix the problem of two front mics on a ThinkCentre This ThinkCentre machine has a new realtek codec alc222, it is not in the support list, we add it in the realtek.c then this machine can apply FIXUPs for the realtek codec. And this machine has two front mics which can't be handled by PA so far, it uses the pin 0x18 and 0x19 as the front mics, as a result the existing FIXUP ALC294_FIXUP_LENOVO_MIC_LOCATION doesn't work on this machine. Fortunately another FIXUP ALC283_FIXUP_HEADSET_MIC also can change the location for one of the two mics on this machine. Link: https://lore.kernel.org/r/20190904055327.9883-1-hui.wang@canonical.com Signed-off-by: Hui Wang Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 2 ++ 1 file changed, 2 insertions(+) commit cf24aac38698bfa1d021afd3883df3c4c65143a4 Author: Yoshihiro Shimoda Date: Mon Sep 2 20:44:03 2019 +0900 dmaengine: rcar-dmac: Fix DMACHCLR handling if iommu is mapped The commit 20c169aceb45 ("dmaengine: rcar-dmac: clear pertinence number of channels") forgets to clear the last channel by DMACHCLR in rcar_dmac_init() (and doesn't need to clear the first channel) if iommu is mapped to the device. So, this patch fixes it by using "channels_mask" bitfield. Note that the hardware and driver don't support more than 32 bits in DMACHCLR register anyway, so this patch should reject more than 32 channels in rcar_dmac_parse_of(). Fixes: 20c169aceb459575 ("dmaengine: rcar-dmac: clear pertinence number of channels") Signed-off-by: Yoshihiro Shimoda Reviewed-by: Simon Horman Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/1567424643-26629-1-git-send-email-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Vinod Koul drivers/dma/sh/rcar-dmac.c | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) commit 689379c2f383b1fdfdff03e84cf659daf62f2088 Author: Baolin Wang Date: Fri Aug 30 15:37:45 2019 +0800 dmaengine: sprd: Fix the DMA link-list configuration For the Spreadtrum DMA link-list mode, when the DMA engine got a slave hardware request, which will trigger the DMA engine to load the DMA configuration from the link-list memory automatically. But before the slave hardware request, the slave will get an incorrect residue due to the first node used to trigger the link-list was configured as the last source address and destination address. Thus we should make sure the first node was configured the start source address and destination address, which can fix this issue. Fixes: 4ac695464763 ("dmaengine: sprd: Support DMA link-list mode") Signed-off-by: Baolin Wang Link: https://lore.kernel.org/r/77868edb7aff9d5cb12ac3af8827ef2e244441a6.1567150471.git.baolin.wang@linaro.org Signed-off-by: Vinod Koul drivers/dma/sprd-dma.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 8ad8e02c2fa70cfddc1ded53ba9001c9d444075d Author: Jan Kaisrlik Date: Tue Aug 20 13:42:29 2019 +0200 Revert "mmc: core: do not retry CMD6 in __mmc_switch()" Turns out the commit 3a0681c7448b ("mmc: core: do not retry CMD6 in __mmc_switch()") breaks initialization of a Toshiba THGBMNG5 eMMC card, when using the meson-gx-mmc.c driver on a custom board based on Amlogic A113D. The CMD6 that switches the card into HS200 mode is then one that fails and according to the below printed messages from the log: [ 1.648951] mmc0: mmc_select_hs200 failed, error -84 [ 1.648988] mmc0: error -84 whilst initialising MMC card After some analyze, it turns out that adding a delay of ~5ms inside mmc_select_bus_width() but after mmc_compare_ext_csds() has been executed, also fixes the problem. Adding yet some more debug code, trying to figure out if potentially the card could be in a busy state, both by using CMD13 and ->card_busy() ops concluded that this was not the case. Therefore, let's simply revert the commit that dropped support for retrying of CMD6, as this also fixes the problem. Fixes: 3a0681c7448b ("mmc: core: do not retry CMD6 in __mmc_switch()") Cc: stable@vger.kernel.org Signed-off-by: Jan Kaisrlik Signed-off-by: Ulf Hansson drivers/mmc/core/mmc_ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8744daf4b0699b724ee0a56b313a6c0c4ea289e3 Author: Jacob Pan Date: Mon Aug 26 08:53:29 2019 -0700 iommu/vt-d: Remove global page flush support Global pages support is removed from VT-d spec 3.0. Since global pages G flag only affects first-level paging structures and because DMA request with PASID are only supported by VT-d spec. 3.0 and onward, we can safely remove global pages support. For kernel shared virtual address IOTLB invalidation, PASID granularity and page selective within PASID will be used. There is no global granularity supported. Without this fix, IOTLB invalidation will cause invalid descriptor error in the queued invalidation (QI) interface. Fixes: 1c4f88b7f1f9 ("iommu/vt-d: Shared virtual address in scalable mode") Reported-by: Sanjay K Kumar Signed-off-by: Jacob Pan Signed-off-by: Joerg Roedel drivers/iommu/intel-svm.c | 36 +++++++++++++++--------------------- include/linux/intel-iommu.h | 3 --- 2 files changed, 15 insertions(+), 24 deletions(-) commit b0dfce90e342714b8351ecd1265013a13da23086 Merge: 089cf7f6ecb2 55f7e5c364dc Author: Dave Airlie Date: Tue Sep 3 17:03:35 2019 +1000 Merge branch 'linux-5.3' of git://github.com/skeggsb/linux into drm-fixes Single nouveau firmware fix. Signed-off-by: Dave Airlie From: Ben Skeggs Link: https://patchwork.freedesktop.org/patch/msgid/CACAvsv5uGLgDY8V8pWgEH0-YhkCEgvHE=NZ1W_m0gJaoFPuQ0g@mail.gmail.com commit 5e2d2cc2588bd3307ce3937acbc2ed03c830a861 Author: Liangyan Date: Mon Aug 26 20:16:33 2019 +0800 sched/fair: Don't assign runtime for throttled cfs_rq do_sched_cfs_period_timer() will refill cfs_b runtime and call distribute_cfs_runtime to unthrottle cfs_rq, sometimes cfs_b->runtime will allocate all quota to one cfs_rq incorrectly, then other cfs_rqs attached to this cfs_b can't get runtime and will be throttled. We find that one throttled cfs_rq has non-negative cfs_rq->runtime_remaining and cause an unexpetced cast from s64 to u64 in snippet: distribute_cfs_runtime() { runtime = -cfs_rq->runtime_remaining + 1; } The runtime here will change to a large number and consume all cfs_b->runtime in this cfs_b period. According to Ben Segall, the throttled cfs_rq can have account_cfs_rq_runtime called on it because it is throttled before idle_balance, and the idle_balance calls update_rq_clock to add time that is accounted to the task. This commit prevents cfs_rq to be assgined new runtime if it has been throttled until that distribute_cfs_runtime is called. Signed-off-by: Liangyan Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider Reviewed-by: Ben Segall Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: shanpeic@linux.alibaba.com Cc: stable@vger.kernel.org Cc: xlpang@linux.alibaba.com Fixes: d3d9dc330236 ("sched: Throttle entities exceeding their allowed bandwidth") Link: https://lkml.kernel.org/r/20190826121633.6538-1-liangyan.peng@linux.alibaba.com Signed-off-by: Ingo Molnar kernel/sched/fair.c | 5 +++++ 1 file changed, 5 insertions(+) commit 60083f9e94b2f28047d71ed778adf89357c1a8fb Author: Jian-Hong Pan Date: Mon Sep 2 18:00:56 2019 +0800 ALSA: hda/realtek - Enable internal speaker & headset mic of ASUS UX431FL Original pin node values of ASUS UX431FL with ALC294: 0x12 0xb7a60140 0x13 0x40000000 0x14 0x90170110 0x15 0x411111f0 0x16 0x411111f0 0x17 0x90170111 0x18 0x411111f0 0x19 0x411111f0 0x1a 0x411111f0 0x1b 0x411111f0 0x1d 0x4066852d 0x1e 0x411111f0 0x1f 0x411111f0 0x21 0x04211020 1. Has duplicated internal speakers (0x14 & 0x17) which makes the output route become confused. So, the output volume cannot be changed by setting. 2. Misses the headset mic pin node. This patch disables the confusing speaker (NID 0x14) and enables the headset mic (NID 0x19). Link: https://lore.kernel.org/r/20190902100054.6941-1-jian-hong@endlessm.com Signed-off-by: Jian-Hong Pan Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 47320fbe11a6059ae502c9c16b668022fdb4cf76 Author: Al Viro Date: Sun Aug 25 19:56:13 2019 -0400 configfs: new object reprsenting tree fragments Refcounted, hangs of configfs_dirent, created by operations that add fragments to configfs tree (mkdir and configfs_register_{subsystem,group}). Will be used in the next commit to provide exclusion between fragment removal and ->show/->store calls. Signed-off-by: Al Viro Signed-off-by: Christoph Hellwig fs/configfs/configfs_internal.h | 15 +++++- fs/configfs/dir.c | 105 +++++++++++++++++++++++++++++++--------- fs/configfs/file.c | 4 +- 3 files changed, 97 insertions(+), 27 deletions(-) commit f19e4ed1e1edbfa3c9ccb9fed17759b7d6db24c6 Author: Al Viro Date: Thu Aug 29 23:13:30 2019 -0400 configfs_register_group() shouldn't be (and isn't) called in rmdirable parts revert cc57c07343bd "configfs: fix registered group removal" It was an attempt to handle something that fundamentally doesn't work - configfs_register_group() should never be done in a part of tree that can be rmdir'ed. And in mainline it never had been, so let's not borrow trouble; the fix was racy anyway, it would take a lot more to make that work and desired semantics is not clear. Signed-off-by: Al Viro Signed-off-by: Christoph Hellwig fs/configfs/dir.c | 11 ----------- 1 file changed, 11 deletions(-) commit ff4dd081977da56566a848f071aed8fa92d604a1 Author: Al Viro Date: Fri Aug 30 11:30:03 2019 -0400 configfs: stash the data we need into configfs_buffer at open time simplifies the ->read()/->write()/->release() instances nicely Signed-off-by: Al Viro Signed-off-by: Christoph Hellwig fs/configfs/file.c | 229 ++++++++++++++++++++++------------------------------- 1 file changed, 95 insertions(+), 134 deletions(-) commit 4030b4c585c41eeefec7bd20ce3d0e100a0f2e4d Author: Tianyu Lan Date: Mon Sep 2 20:41:43 2019 +0800 x86/hyper-v: Fix overflow bug in fill_gva_list() When the 'start' parameter is >= 0xFF000000 on 32-bit systems, or >= 0xFFFFFFFF'FF000000 on 64-bit systems, fill_gva_list() gets into an infinite loop. With such inputs, 'cur' overflows after adding HV_TLB_FLUSH_UNIT and always compares as less than end. Memory is filled with guest virtual addresses until the system crashes. Fix this by never incrementing 'cur' to be larger than 'end'. Reported-by: Jong Hyun Park Signed-off-by: Tianyu Lan Reviewed-by: Michael Kelley Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 2ffd9e33ce4a ("x86/hyper-v: Use hypercall for remote TLB flush") Signed-off-by: Ingo Molnar arch/x86/hyperv/mmu.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit eb3d8f42231aec65b64b079dd17bd6c008a3fe29 Author: Trond Myklebust Date: Wed Aug 28 11:26:13 2019 -0400 NFS: Fix inode fileid checks in attribute revalidation code We want to throw out the attrbute if it refers to the mounted on fileid, and not the real fileid. However we do not want to block cache consistency updates from NFSv4 writes. Reported-by: Murphy Zhou Fixes: 7e10cc25bfa0 ("NFS: Don't refresh attributes with mounted-on-file...") Signed-off-by: Trond Myklebust fs/nfs/inode.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 089cf7f6ecb266b6a4164919a2e69bd2f938374a Author: Linus Torvalds Date: Mon Sep 2 09:57:40 2019 -0700 Linux 5.3-rc7 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 49ffdb4c7c65082cee24a53a7ebd62e00eb2e9e9 Merge: 2c248f92fa4f 8919dfcb3116 Author: Linus Torvalds Date: Mon Sep 2 09:30:34 2019 -0700 Merge tag 'char-misc-5.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver fixes from Greg KH: "Here are some small char and misc driver fixes for reported issues for 5.3-rc7 Also included in here is the documentation for how we are handling hardware issues under embargo that everyone has finally agreed on, as well as a MAINTAINERS update for the suckers who agreed to handle the LICENSES/ files. All of these have been in linux-next last week with no reported issues" * tag 'char-misc-5.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: fsi: scom: Don't abort operations for minor errors vmw_balloon: Fix offline page marking with compaction VMCI: Release resource if the work is already queued Documentation/process: Embargoed hardware security issues lkdtm/bugs: fix build error in lkdtm_EXHAUST_STACK mei: me: add Tiger Lake point LP device ID intel_th: pci: Add Tiger Lake support intel_th: pci: Add support for another Lewisburg PCH stm class: Fix a double free of stm_source_device MAINTAINERS: add entry for LICENSES and SPDX stuff fpga: altera-ps-spi: Fix getting of optional confd gpio commit 2c248f92fa4fae3036e656da2f9a077020a99f6e Merge: 345464fb760d 1426bd2c9f7e Author: Linus Torvalds Date: Mon Sep 2 09:15:30 2019 -0700 Merge tag 'usb-5.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are some small USB fixes that have been in linux-next this past week for 5.3-rc7 They fix the usual xhci, syzbot reports, and other small issues that have come up last week. All have been in linux-next with no reported issues" * tag 'usb-5.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: USB: cdc-wdm: fix race between write and disconnect due to flag abuse usb: host: xhci: rcar: Fix typo in compatible string matching usb: host: xhci-tegra: Set DMA mask correctly USB: storage: ums-realtek: Whitelist auto-delink support USB: storage: ums-realtek: Update module parameter description for auto_delink_en usb: host: ohci: fix a race condition between shutdown and irq usb: hcd: use managed device resources typec: tcpm: fix a typo in the comparison of pdo_max_voltage usb-storage: Add new JMS567 revision to unusual_devs usb: chipidea: udc: don't do hardware access if gadget has stopped usbtmc: more sanity checking for packet size usb: udc: lpc32xx: silence fall-through warning commit d33cd42d86671bed870827aa399aeb9f1da74119 Author: Sam Bazley Date: Sun Sep 1 03:31:30 2019 +0100 ALSA: hda/realtek - Add quirk for HP Pavilion 15 HP Pavilion 15 (AMD Ryzen-based model) with 103c:84e7 needs the same quirk like HP Envy/Spectre x360 for enabling the mute LED over Mic3 pin. [ rearranged in the SSID number order by tiwai ] Signed-off-by: Sam Bazley Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit 9b8bd476e78e89c9ea26c3b435ad0201c3d7dbf5 Author: Peter Zijlstra Date: Thu Aug 29 10:24:45 2019 +0200 x86/uaccess: Don't leak the AC flags into __get_user() argument evaluation Identical to __put_user(); the __get_user() argument evalution will too leak UBSAN crud into the __uaccess_begin() / __uaccess_end() region. While uncommon this was observed to happen for: drivers/xen/gntdev.c: if (__get_user(old_status, batch->status[i])) where UBSAN added array bound checking. This complements commit: 6ae865615fc4 ("x86/uaccess: Dont leak the AC flag into __put_user() argument evaluation") Tested-by Sedat Dilek Reported-by: Randy Dunlap Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Josh Poimboeuf Reviewed-by: Thomas Gleixner Cc: broonie@kernel.org Cc: sfr@canb.auug.org.au Cc: akpm@linux-foundation.org Cc: Randy Dunlap Cc: mhocko@suse.cz Cc: Josh Poimboeuf Link: https://lkml.kernel.org/r/20190829082445.GM2369@hirez.programming.kicks-ass.net arch/x86/include/asm/uaccess.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 29d9a0b50736768f042752070e5cdf4e4d4c00df Author: John S. Gruber Date: Mon Sep 2 00:00:54 2019 +0200 x86/boot: Preserve boot_params.secure_boot from sanitizing Commit a90118c445cc ("x86/boot: Save fields explicitly, zero out everything else") now zeroes the secure boot setting information (enabled/disabled/...) passed by the boot loader or by the kernel's EFI handover mechanism. The problem manifests itself with signed kernels using the EFI handoff protocol with grub and the kernel loses the information whether secure boot is enabled in the firmware, i.e., the log message "Secure boot enabled" becomes "Secure boot could not be determined". efi_main() arch/x86/boot/compressed/eboot.c sets this field early but it is subsequently zeroed by the above referenced commit. Include boot_params.secure_boot in the preserve field list. [ bp: restructure commit message and massage. ] Fixes: a90118c445cc ("x86/boot: Save fields explicitly, zero out everything else") Signed-off-by: John S. Gruber Signed-off-by: Borislav Petkov Reviewed-by: John Hubbard Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Juergen Gross Cc: Mark Brown Cc: stable Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/CAPotdmSPExAuQcy9iAHqX3js_fc4mMLQOTr5RBGvizyCOPcTQQ@mail.gmail.com arch/x86/include/asm/bootparam_utils.h | 1 + 1 file changed, 1 insertion(+) commit 55f7e5c364dce20e691fda329fb2a6cc3cbb63b6 Author: Ben Skeggs Date: Mon Sep 2 16:33:22 2019 +1000 drm/nouveau/sec2/gp102: add missing MODULE_FIRMWAREs Signed-off-by: Ben Skeggs Cc: stable@vger.kernel.org [v5.2+] drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gp102.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 345464fb760d1b772e891538b498e111c588b692 Merge: 9f159ae07f07 e1e54ec7fb55 Author: Linus Torvalds Date: Sun Sep 1 18:45:28 2019 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from David Miller: 1) Fix some length checks during OGM processing in batman-adv, from Sven Eckelmann. 2) Fix regression that caused netfilter conntrack sysctls to not be per-netns any more. From Florian Westphal. 3) Use after free in netpoll, from Feng Sun. 4) Guard destruction of pfifo_fast per-cpu qdisc stats with qdisc_is_percpu_stats(), from Davide Caratti. Similar bug is fixed in pfifo_fast_enqueue(). 5) Fix memory leak in mld_del_delrec(), from Eric Dumazet. 6) Handle neigh events on internal ports correctly in nfp, from John Hurley. 7) Clear SKB timestamp in NF flow table code so that it does not confuse fq scheduler. From Florian Westphal. 8) taprio destroy can crash if it is invoked in a failure path of taprio_init(), because the list head isn't setup properly yet and the list del is unconditional. Perform the list add earlier to address this. From Vladimir Oltean. 9) Make sure to reapply vlan filters on device up, in aquantia driver. From Dmitry Bogdanov. 10) sgiseeq driver releases DMA memory using free_page() instead of dma_free_attrs(). From Christophe JAILLET. * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (58 commits) net: seeq: Fix the function used to release some memory in an error handling path enetc: Add missing call to 'pci_free_irq_vectors()' in probe and remove functions net: bcmgenet: use ethtool_op_get_ts_info() tc-testing: don't hardcode 'ip' in nsPlugin.py net: dsa: microchip: add KSZ8563 compatibility string dt-bindings: net: dsa: document additional Microchip KSZ8563 switch net: aquantia: fix out of memory condition on rx side net: aquantia: linkstate irq should be oneshot net: aquantia: reapply vlan filters on up net: aquantia: fix limit of vlan filters net: aquantia: fix removal of vlan 0 net/sched: cbs: Set default link speed to 10 Mbps in cbs_set_port_rate taprio: Set default link speed to 10 Mbps in taprio_set_picos_per_byte taprio: Fix kernel panic in taprio_destroy net: dsa: microchip: fill regmap_config name rxrpc: Fix lack of conn cleanup when local endpoint is cleaned up [ver #2] net: stmmac: dwmac-rk: Don't fail if phy regulator is absent amd-xgbe: Fix error path in xgbe_mod_init() netfilter: nft_meta_bridge: Fix get NFT_META_BRI_IIFVPROTO in network byteorder mac80211: Correctly set noencrypt for PAE frames ... commit e1e54ec7fb55501c33b117c111cb0a045b8eded2 Author: Christophe JAILLET Date: Sat Aug 31 09:17:51 2019 +0200 net: seeq: Fix the function used to release some memory in an error handling path In commit 99cd149efe82 ("sgiseeq: replace use of dma_cache_wback_inv"), a call to 'get_zeroed_page()' has been turned into a call to 'dma_alloc_coherent()'. Only the remove function has been updated to turn the corresponding 'free_page()' into 'dma_free_attrs()'. The error hndling path of the probe function has not been updated. Fix it now. Rename the corresponding label to something more in line. Fixes: 99cd149efe82 ("sgiseeq: replace use of dma_cache_wback_inv") Signed-off-by: Christophe JAILLET Reviewed-by: Thomas Bogendoerfer Signed-off-by: David S. Miller drivers/net/ethernet/seeq/sgiseeq.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 9f159ae07f07fc540290f21937231034f554bdd7 Merge: 5fb181cba010 7af0145067bc Author: Linus Torvalds Date: Sun Sep 1 11:21:57 2019 -0700 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Thomas Gleixner: "A set of fixes for x86: - Fix the bogus detection of 32bit user mode for uretprobes which caused corruption of the user return address resulting in application crashes. In the uprobes handler in_ia32_syscall() is obviously always returning false on a 64bit kernel. Use user_64bit_mode() instead which works correctly. - Prevent large page splitting when ftrace flips RW/RO on the kernel text which caused iTLB performance issues. Ftrace wants to be converted to text_poke() which avoids the problem, but for now allow large page preservation in the static protections check when the change request spawns a full large page. - Prevent arch_dynirq_lower_bound() from returning 0 when the IOAPIC is configured via device tree. In the device tree case the GSI 1:1 mapping is meaningless therefore the lower bound which protects the GSI range on ACPI machines is irrelevant. Return the lower bound which the core hands to the function instead of blindly returning 0 which causes the core to allocate the invalid virtual interupt number 0 which in turn prevents all drivers from allocating and requesting an interrupt. - Remove the bogus initialization of LDR and DFR in the 32bit bigsmp APIC driver. That uses physical destination mode where LDR/DFR are ignored, but the initialization and the missing clear of LDR caused the APIC to be left in a inconsistent state on kexec/reboot. - Clear LDR when clearing the APIC registers so the APIC is in a well defined state. - Initialize variables proper in the find_trampoline_placement() code. - Silence GCC( build warning for the real mode part of the build" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mm/cpa: Prevent large page split when ftrace flips RW on kernel text x86/build: Add -Wnoaddress-of-packed-member to REALMODE_CFLAGS, to silence GCC9 build warning x86/boot/compressed/64: Fix missing initialization in find_trampoline_placement() x86/apic: Include the LDR when clearing out APIC registers x86/apic: Do not initialize LDR and DFR for bigsmp uprobes/x86: Fix detection of 32-bit user mode x86/apic: Fix arch_dynirq_lower_bound() bug for DT enabled machines commit 5fb181cba01088924a68441753843e5acfd012ff Merge: 5358e6e77490 0f4cd769c410 Author: Linus Torvalds Date: Sun Sep 1 11:09:42 2019 -0700 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Thomas Gleixner: "Two fixes for perf x86 hardware implementations: - Restrict the period on Nehalem machines to prevent perf from hogging the CPU - Prevent the AMD IBS driver from overwriting the hardwre controlled and pre-seeded reserved bits (0-6) in the count register which caused a sample bias for dispatched micro-ops" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86/amd/ibs: Fix sample bias for dispatched micro-ops perf/x86/intel: Restrict period on Nehalem commit 5358e6e77490024aa13fc4e3ca94d7d1aad330d0 Merge: eea173097dfb 9eb4b5180d33 Author: Linus Torvalds Date: Sun Sep 1 10:39:25 2019 -0700 Merge branch 'turbostat' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux Pull turbostat updates from Len Brown: "User-space turbostat (and x86_energy_perf_policy) patches. They are primarily bug fixes from users" * 'turbostat' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: tools/power turbostat: update version number tools/power turbostat: Add support for Hygon Fam 18h (Dhyana) RAPL tools/power turbostat: Fix caller parameter of get_tdp_amd() tools/power turbostat: Fix CPU%C1 display value tools/power turbostat: do not enforce 1ms tools/power turbostat: read from pipes too tools/power turbostat: Add Ice Lake NNPI support tools/power turbostat: rename has_hsw_msrs() tools/power turbostat: Fix Haswell Core systems tools/power turbostat: add Jacobsville support tools/power turbostat: fix buffer overrun tools/power turbostat: fix file descriptor leaks tools/power turbostat: fix leak of file descriptor on error return path tools/power turbostat: Make interval calculation per thread to reduce jitter tools/power turbostat: remove duplicate pc10 column tools/power x86_energy_perf_policy: Fix argument parsing tools/power: Fix typo in man page tools/power/x86: Enable compiler optimisations and Fortify by default tools/power x86_energy_perf_policy: Fix "uninitialized variable" warnings at -O2 commit dd7078f05e1b774a9e8c9f117101d97e4ccd0691 Author: Christophe JAILLET Date: Fri Aug 30 22:23:12 2019 +0200 enetc: Add missing call to 'pci_free_irq_vectors()' in probe and remove functions Call to 'pci_free_irq_vectors()' are missing both in the error handling path of the probe function, and in the remove function. Add them. Fixes: 19971f5ea0ab ("enetc: add PTP clock driver") Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller drivers/net/ethernet/freescale/enetc/enetc_ptp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit dd1bf47a84fe64edf50f6a83fdc164d0da6fa021 Author: Ryan M. Collins Date: Fri Aug 30 14:49:55 2019 -0400 net: bcmgenet: use ethtool_op_get_ts_info() This change enables the use of SW timestamping on the Raspberry Pi 4. bcmgenet's transmit function bcmgenet_xmit() implements software timestamping. However the SOF_TIMESTAMPING_TX_SOFTWARE capability was missing and only SOF_TIMESTAMPING_RX_SOFTWARE was announced. By using ethtool_ops bcmgenet_ethtool_ops() as get_ts_info(), the SOF_TIMESTAMPING_TX_SOFTWARE capability is announced. Similar to commit a8f5cb9e7991 ("smsc95xx: use ethtool_op_get_ts_info()") Signed-off-by: Ryan M. Collins Acked-by: Florian Fainelli Acked-by: Doug Berger Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmgenet.c | 1 + 1 file changed, 1 insertion(+) commit 02a3f0d5a70a865d55c4b7cb2e327cb30491f7fd Author: Davide Caratti Date: Fri Aug 30 18:51:47 2019 +0200 tc-testing: don't hardcode 'ip' in nsPlugin.py the following tdc test fails on Fedora: # ./tdc.py -e 2638 -- ns/SubPlugin.__init__ Test 2638: Add matchall and try to get it -----> prepare stage *** Could not execute: "$TC qdisc add dev $DEV1 clsact" -----> prepare stage *** Error message: "/bin/sh: ip: command not found" returncode 127; expected [0] -----> prepare stage *** Aborting test run. Let nsPlugin.py use the 'IP' variable introduced with commit 92c1a19e2fb9 ("tc-tests: added path to ip command in tdc"), so that the path to 'ip' is correctly resolved to the value we have in tdc_config.py. # ./tdc.py -e 2638 -- ns/SubPlugin.__init__ Test 2638: Add matchall and try to get it All test results: 1..1 ok 1 2638 - Add matchall and try to get it Fixes: 489ce2f42514 ("tc-testing: Restore original behaviour for namespaces in tdc") Reported-by: Hangbin Liu Signed-off-by: Davide Caratti Acked-by: Nicolas Dichtel Signed-off-by: David S. Miller .../selftests/tc-testing/plugin-lib/nsPlugin.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 3daa418392db6f4c6b09b6d62a40936113ff402b Merge: 879c3808a4a1 d9033ae95cf4 Author: David S. Miller Date: Sat Aug 31 23:36:37 2019 -0700 Merge branch 'net-dsa-microchip-add-KSZ8563-support' Razvan Stefanescu says: ==================== net: dsa: microchip: add KSZ8563 support This patchset adds compatibility string for the KSZ8563 switch. ==================== Signed-off-by: David S. Miller commit d9033ae95cf445150fcc5856ccf024f41f0bd0b9 Author: Razvan Stefanescu Date: Fri Aug 30 10:52:02 2019 +0300 net: dsa: microchip: add KSZ8563 compatibility string It is a 3-Port 10/100 Ethernet Switch with 1588v2 PTP. Signed-off-by: Razvan Stefanescu Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz9477_spi.c | 1 + 1 file changed, 1 insertion(+) commit de5eb9e00eba00783f49da37377bd2a93d38fe42 Author: Razvan Stefanescu Date: Fri Aug 30 10:52:01 2019 +0300 dt-bindings: net: dsa: document additional Microchip KSZ8563 switch It is a 3-Port 10/100 Ethernet Switch with 1588v2 PTP. Signed-off-by: Razvan Stefanescu Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/dsa/ksz.txt | 1 + 1 file changed, 1 insertion(+) commit 879c3808a4a126d271c4f39cd93f6252c72340bf Merge: 154f4fb7a0b8 be6cef69ba57 Author: David S. Miller Date: Sat Aug 31 19:07:17 2019 -0700 Merge branch 'net-aquantia-fixes-on-vlan-filters-and-other-conditions' Igor Russkikh says: ==================== net: aquantia: fixes on vlan filters and other conditions Here is a set of various bug fixes related to vlan filter offload and two other rare cases. ==================== Signed-off-by: David S. Miller commit be6cef69ba570ebb327eba1ef6438f7af49aaf86 Author: Dmitry Bogdanov Date: Fri Aug 30 12:08:38 2019 +0000 net: aquantia: fix out of memory condition on rx side On embedded environments with hard memory limits it is a normal although rare case when skb can't be allocated on rx part under high traffic. In such OOM cases napi_complete_done() was not called. So the napi object became in an invalid state like it is "scheduled". Kernel do not re-schedules the poll of that napi object. Consequently, kernel can not remove that object the system hangs on `ifconfig down` waiting for a poll. We are fixing this by gracefully closing napi poll routine with correct invocation of napi_complete_done. This was reproduced with artificially failing the allocation of skb to simulate an "out of memory" error case and check that traffic does not get stuck. Fixes: 970a2e9864b0 ("net: ethernet: aquantia: Vector operations") Signed-off-by: Igor Russkikh Signed-off-by: Dmitry Bogdanov Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_vec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5c47e3ba6fe52465603cf9d816b3371e6881d649 Author: Igor Russkikh Date: Fri Aug 30 12:08:36 2019 +0000 net: aquantia: linkstate irq should be oneshot Declaring threaded irq handler should also indicate the irq is oneshot. It is oneshot indeed, because HW implements irq automasking on trigger. Not declaring this causes some kernel configurations to fail on interface up, because request_threaded_irq returned an err code. The issue was originally hidden on normal x86_64 configuration with latest kernel, because depending on interrupt controller, irq driver added ONESHOT flag on its own. Issue was observed on older kernels (4.14) where no such logic exists. Fixes: 4c83f170b3ac ("net: aquantia: link status irq handling") Signed-off-by: Igor Russkikh Reported-by: Michael Symolkin Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c2ef057ee775e229d3138add59f937d93a3a59d8 Author: Dmitry Bogdanov Date: Fri Aug 30 12:08:35 2019 +0000 net: aquantia: reapply vlan filters on up In case of device reconfiguration the driver may reset the device invisible for other modules, vlan module in particular. So vlans will not be removed&created and vlan filters will not be configured in the device. The patch reapplies the vlan filters at device start. Fixes: 7975d2aff5afb ("net: aquantia: add support of rx-vlan-filter offload") Signed-off-by: Dmitry Bogdanov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_main.c | 4 ++++ 1 file changed, 4 insertions(+) commit 392349f60110dc2c3daf86464fd926afc53d6143 Author: Dmitry Bogdanov Date: Fri Aug 30 12:08:33 2019 +0000 net: aquantia: fix limit of vlan filters Fix a limit condition of vlans on the interface before setting vlan promiscuous mode Fixes: 48dd73d08d4dd ("net: aquantia: fix vlans not working over bridged network") Signed-off-by: Dmitry Bogdanov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_filters.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6fdc060d7476ef73c8029b652d252c1a7b4de948 Author: Dmitry Bogdanov Date: Fri Aug 30 12:08:30 2019 +0000 net: aquantia: fix removal of vlan 0 Due to absence of checking against the rx flow rule when vlan 0 is being removed, the other rule could be removed instead of the rule with vlan 0 Fixes: 7975d2aff5afb ("net: aquantia: add support of rx-vlan-filter offload") Signed-off-by: Dmitry Bogdanov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_filters.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 154f4fb7a0b8b0d8ad655e4dc3063069bcf30f14 Merge: 5f81d5455589 1c6c09a0ae62 Author: David S. Miller Date: Sat Aug 31 18:45:35 2019 -0700 Merge branch 'Fix-issues-in-tc-taprio-and-tc-cbs' Vladimir Oltean says: ==================== Fix issues in tc-taprio and tc-cbs This series fixes one panic and one WARN_ON found in the tc-taprio qdisc, while trying to apply it: - On an interface which is not multi-queue - On an interface which has no carrier The tc-cbs was also visually found to suffer of the same issue as tc-taprio, and the fix was only compile-tested in that case. ==================== Signed-off-by: David S. Miller commit 1c6c09a0ae62fa3ea8f8ead2ac3920e6fff2de64 Author: Vladimir Oltean Date: Fri Aug 30 04:07:23 2019 +0300 net/sched: cbs: Set default link speed to 10 Mbps in cbs_set_port_rate The discussion to be made is absolutely the same as in the case of previous patch ("taprio: Set default link speed to 10 Mbps in taprio_set_picos_per_byte"). Nothing is lost when setting a default. Cc: Leandro Dorileo Fixes: e0a7683d30e9 ("net/sched: cbs: fix port_rate miscalculation") Acked-by: Vinicius Costa Gomes Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller net/sched/sch_cbs.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit f04b514c0ce2f20aad757ebfb04e07b1a12d2b58 Author: Vladimir Oltean Date: Fri Aug 30 04:07:22 2019 +0300 taprio: Set default link speed to 10 Mbps in taprio_set_picos_per_byte The taprio budget needs to be adapted at runtime according to interface link speed. But that handling is problematic. For one thing, installing a qdisc on an interface that doesn't have carrier is not illegal. But taprio prints the following stack trace: [ 31.851373] ------------[ cut here ]------------ [ 31.856024] WARNING: CPU: 1 PID: 207 at net/sched/sch_taprio.c:481 taprio_dequeue+0x1a8/0x2d4 [ 31.864566] taprio: dequeue() called with unknown picos per byte. [ 31.864570] Modules linked in: [ 31.873701] CPU: 1 PID: 207 Comm: tc Not tainted 5.3.0-rc5-01199-g8838fe023cd6 #1689 [ 31.881398] Hardware name: Freescale LS1021A [ 31.885661] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 31.893368] [] (show_stack) from [] (dump_stack+0xb4/0xc8) [ 31.900555] [] (dump_stack) from [] (__warn+0xe0/0xf8) [ 31.907395] [] (__warn) from [] (warn_slowpath_fmt+0x48/0x6c) [ 31.914841] [] (warn_slowpath_fmt) from [] (taprio_dequeue+0x1a8/0x2d4) [ 31.923150] [] (taprio_dequeue) from [] (__qdisc_run+0x90/0x61c) [ 31.930856] [] (__qdisc_run) from [] (net_tx_action+0x12c/0x2bc) [ 31.938560] [] (net_tx_action) from [] (__do_softirq+0x130/0x3c8) [ 31.946350] [] (__do_softirq) from [] (irq_exit+0xbc/0xd8) [ 31.953536] [] (irq_exit) from [] (__handle_domain_irq+0x60/0xb4) [ 31.961328] [] (__handle_domain_irq) from [] (gic_handle_irq+0x58/0x9c) [ 31.969638] [] (gic_handle_irq) from [] (__irq_svc+0x6c/0x90) [ 31.977076] Exception stack(0xe8167b20 to 0xe8167b68) [ 31.982100] 7b20: e9d4bd80 00000cc0 000000cf 00000000 e9d4bd80 c1f38958 00000cc0 c1f38960 [ 31.990234] 7b40: 00000001 000000cf 00000004 e9dc0800 00000000 e8167b70 c0f478ec c0f46d94 [ 31.998363] 7b60: 60070013 ffffffff [ 32.001833] [] (__irq_svc) from [] (netlink_trim+0x18/0xd8) [ 32.009104] [] (netlink_trim) from [] (netlink_broadcast_filtered+0x34/0x414) [ 32.017930] [] (netlink_broadcast_filtered) from [] (netlink_broadcast+0x20/0x28) [ 32.027102] [] (netlink_broadcast) from [] (rtnetlink_send+0x34/0x88) [ 32.035238] [] (rtnetlink_send) from [] (notify_and_destroy+0x2c/0x44) [ 32.043461] [] (notify_and_destroy) from [] (qdisc_graft+0x398/0x470) [ 32.051595] [] (qdisc_graft) from [] (tc_modify_qdisc+0x3a4/0x724) [ 32.059470] [] (tc_modify_qdisc) from [] (rtnetlink_rcv_msg+0x260/0x2ec) [ 32.067864] [] (rtnetlink_rcv_msg) from [] (netlink_rcv_skb+0xb8/0x110) [ 32.076172] [] (netlink_rcv_skb) from [] (netlink_unicast+0x1b4/0x22c) [ 32.084392] [] (netlink_unicast) from [] (netlink_sendmsg+0x33c/0x380) [ 32.092614] [] (netlink_sendmsg) from [] (sock_sendmsg+0x14/0x24) [ 32.100403] [] (sock_sendmsg) from [] (___sys_sendmsg+0x214/0x228) [ 32.108279] [] (___sys_sendmsg) from [] (__sys_sendmsg+0x50/0x8c) [ 32.116068] [] (__sys_sendmsg) from [] (ret_fast_syscall+0x0/0x54) [ 32.123938] Exception stack(0xe8167fa8 to 0xe8167ff0) [ 32.128960] 7fa0: b6fa68c8 000000f8 00000003 bea142d0 00000000 00000000 [ 32.137093] 7fc0: b6fa68c8 000000f8 0052154c 00000128 5d6468a2 00000000 00000028 00558c9c [ 32.145224] 7fe0: 00000070 bea14278 00530d64 b6e17e64 [ 32.150659] ---[ end trace 2139c9827c3e5177 ]--- This happens because the qdisc ->dequeue callback gets called. Which again is not illegal, the qdisc will dequeue even when the interface is up but doesn't have carrier (and hence SPEED_UNKNOWN), and the frames will be dropped further down the stack in dev_direct_xmit(). And, at the end of the day, for what? For calculating the initial budget of an interface which is non-operational at the moment and where frames will get dropped anyway. So if we can't figure out the link speed, default to SPEED_10 and move along. We can also remove the runtime check now. Cc: Leandro Dorileo Fixes: 7b9eba7ba0c1 ("net/sched: taprio: fix picos_per_byte miscalculation") Acked-by: Vinicius Costa Gomes Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller net/sched/sch_taprio.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit efb55222d31c8c2af8b4ba42bb56b0b0beedf98e Author: Vladimir Oltean Date: Fri Aug 30 04:07:21 2019 +0300 taprio: Fix kernel panic in taprio_destroy taprio_init may fail earlier than this line: list_add(&q->taprio_list, &taprio_list); i.e. due to the net device not being multi queue. Attempting to remove q from the global taprio_list when it is not part of it will result in a kernel panic. Fix it by matching list_add and list_del better to one another in the order of operations. This way we can keep the deletion unconditional and with lower complexity - O(1). Cc: Leandro Dorileo Fixes: 7b9eba7ba0c1 ("net/sched: taprio: fix picos_per_byte miscalculation") Signed-off-by: Vladimir Oltean Acked-by: Vinicius Costa Gomes Signed-off-by: David S. Miller net/sched/sch_taprio.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 5f81d5455589df2f580e634c2e9da55b80e63c30 Author: George McCollister Date: Thu Aug 29 09:14:41 2019 -0500 net: dsa: microchip: fill regmap_config name Use the register value width as the regmap_config name to prevent the following error when the second and third regmap_configs are initialized. "debugfs: Directory '${bus-id}' with parent 'regmap' already present!" Signed-off-by: George McCollister Reviewed-by: Marek Vasut Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz_common.h | 1 + 1 file changed, 1 insertion(+) commit 5b161002bd6d8b3ee4553a697524e61c3b92769c Merge: c3d7a089f945 0ff0f15a32c0 Author: David S. Miller Date: Sat Aug 31 13:16:07 2019 -0700 Merge tag 'batadv-net-for-davem-20190830' of git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== Here are two batman-adv bugfixes: - Fix OGM and OGMv2 header read boundary check, by Sven Eckelmann (2 patches) ==================== Signed-off-by: David S. Miller commit 9eb4b5180d33c827f16829644ae0cd7382ecdb82 Author: Len Brown Date: Sat Aug 31 14:40:39 2019 -0400 tools/power turbostat: update version number Today is 19.08.31, at least in some parts of the world. Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c1c10cc77883932abdb7b103687ecbb01e80bef9 Author: Pu Wen Date: Sat Aug 31 10:20:31 2019 +0800 tools/power turbostat: Add support for Hygon Fam 18h (Dhyana) RAPL Commit 9392bd98bba760be96ee ("tools/power turbostat: Add support for AMD Fam 17h (Zen) RAPL") and the commit 3316f99a9f1b68c578c5 ("tools/power turbostat: Also read package power on AMD F17h (Zen)") add AMD Fam 17h RAPL support. Hygon Family 18h(Dhyana) support RAPL in bit 14 of CPUID 0x80000007 EDX, and has MSRs RAPL_PWR_UNIT/CORE_ENERGY_STAT/PKG_ENERGY_STAT. So add Hygon Dhyana Family 18h support for RAPL. Already tested on Hygon multi-node systems and it shows correct per-core energy usage and the total package power. Signed-off-by: Pu Wen Reviewed-by: Calvin Walton Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 9cfa8e042f7cbb1994cc5923e46c78b36f6054f4 Author: Pu Wen Date: Sat Aug 31 10:19:58 2019 +0800 tools/power turbostat: Fix caller parameter of get_tdp_amd() Commit 9392bd98bba760be96ee ("tools/power turbostat: Add support for AMD Fam 17h (Zen) RAPL") add a function get_tdp_amd(), the parameter is CPU family. But the rapl_probe_amd() function use wrong model parameter. Fix the wrong caller parameter of get_tdp_amd() to use family. Cc: # v5.1+ Signed-off-by: Pu Wen Reviewed-by: Calvin Walton Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1e9042b9c8d46ada9ee7b3339a31f50d12e5d291 Author: Srinivas Pandruvada Date: Tue Aug 27 10:57:14 2019 -0700 tools/power turbostat: Fix CPU%C1 display value In some case C1% will be wrong value, when platform doesn't have MSR for C1 residency. For example: Core CPU CPU%c1 - - 100.00 0 0 100.00 0 2 100.00 1 1 100.00 1 3 100.00 But adding Busy% will fix this Core CPU Busy% CPU%c1 - - 99.77 0.23 0 0 99.77 0.23 0 2 99.77 0.23 1 1 99.77 0.23 1 3 99.77 0.23 This issue can be reproduced on most of the recent systems including Broadwell, Skylake and later. This is because if we don't select Busy% or Avg_MHz or Bzy_MHz then mperf value will not be read from MSR, so it will be 0. But this is required for C1% calculation when MSR for C1 residency is not present. Same is true for C3, C6 and C7 column selection. So add another define DO_BIC_READ(), which doesn't depend on user column selection and use for mperf, C3, C6 and C7 related counters. So when there is no platform support for C1 residency counters, we still read these counters, if the CPU has support and user selected display of CPU%c1. Signed-off-by: Srinivas Pandruvada Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) commit 6ee9fc63d2e7999f93a466e202ae3b557e9c739c Author: Artem Bityutskiy Date: Wed Aug 14 20:12:56 2019 +0300 tools/power turbostat: do not enforce 1ms Turbostat works by taking a snapshot of counters, sleeping, taking another snapshot, calculating deltas, and printing out the table. The sleep time is controlled via -i option or by user sending a signal or a character to stdin. In the latter case, turbostat always adds 1 ms sleep before it reads the counters, in order to avoid larger imprecisions in the results in prints. While the 1 ms delay may be a good idea for a "dumb" user, it is a problem for an "aware" user. I do thousands and thousands of measurements over a short period of time (like 2ms), and turbostat unconditionally adds a 1ms to my interval, so I cannot get what I really need. This patch removes the unconditional 1ms sleep. This is an expert user tool, after all, and non-experts will unlikely ever use it in the non-fixed interval mode anyway, so I think it is OK to remove the 1ms delay. Signed-off-by: Artem Bityutskiy Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 5 ----- 1 file changed, 5 deletions(-) commit c026c23629b825100fd4b8223227d9a395f9a56b Author: Artem Bityutskiy Date: Wed Aug 14 20:12:55 2019 +0300 tools/power turbostat: read from pipes too Commit '47936f944e78 tools/power turbostat: fix printing on input' make a valid fix, but it completely disabled piped stdin support, which is a valuable use-case. Indeed, if stdin is a pipe, turbostat won't read anything from it, so it becomes impossible to get turbostat output at user-defined moments, instead of the regular intervals. There is no reason why this should works for terminals, but not for pipes. This patch improves the situation. Instead of ignoring pipes, we read data from them but gracefully handle the EOF case. Signed-off-by: Artem Bityutskiy Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit d93ea567fc4eec2d3581015e23d2c555f8b393ba Author: Rajneesh Bhardwaj Date: Fri Jun 14 13:09:46 2019 +0530 tools/power turbostat: Add Ice Lake NNPI support This enables turbostat utility on Ice Lake NNPI SoC. Link: https://lkml.org/lkml/2019/6/5/1034 Signed-off-by: Rajneesh Bhardwaj Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 1 + 1 file changed, 1 insertion(+) commit 570992fc5733b5e1b00a4bdb9272df1e25d63972 Author: Len Brown Date: Sat Aug 31 14:16:07 2019 -0400 tools/power turbostat: rename has_hsw_msrs() Perhaps if this more descriptive name had been used, then we wouldn't have had the HSW ULT vs HSW CORE bug, fixed by the previous commit. Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit cd188af5282d9f9e65f63915b13239bafc746f8d Author: Len Brown Date: Sat Aug 31 14:09:29 2019 -0400 tools/power turbostat: Fix Haswell Core systems turbostat: cpu0: msr offset 0x630 read failed: Input/output error because Haswell Core does not have C8-C10. Output C8-C10 only on Haswell ULT. Fixes: f5a4c76ad7de ("tools/power turbostat: consolidate duplicate model numbers") Reported-by: Prarit Bhargava Suggested-by: Kosuke Tatsukawa Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit b62b3184576b8f87ca655dd9bfd1ae02fd4e50a5 Author: Zhang Rui Date: Sun Apr 21 16:30:22 2019 +0800 tools/power turbostat: add Jacobsville support Jacobsville behaves like Denverton. Signed-off-by: Zhang Rui Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 3 +++ 1 file changed, 3 insertions(+) commit eeb71c950bc6eee460f2070643ce137e067b234c Author: Naoya Horiguchi Date: Wed Apr 3 16:02:14 2019 +0900 tools/power turbostat: fix buffer overrun turbostat could be terminated by general protection fault on some latest hardwares which (for example) support 9 levels of C-states and show 18 "tADDED" lines. That bloats the total output and finally causes buffer overrun. So let's extend the buffer to avoid this. Signed-off-by: Naoya Horiguchi Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 605736c6929d541c78a85dffae4d33a23b6b2149 Author: Gustavo A. R. Silva Date: Mon Apr 8 11:12:40 2019 -0500 tools/power turbostat: fix file descriptor leaks Fix file descriptor leaks by closing fp before return. Addresses-Coverity-ID: 1444591 ("Resource leak") Addresses-Coverity-ID: 1444592 ("Resource leak") Fixes: 5ea7647b333f ("tools/power turbostat: Warn on bad ACPI LPIT data") Signed-off-by: Gustavo A. R. Silva Reviewed-by: Prarit Bhargava Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 1 + 1 file changed, 1 insertion(+) commit 15423b958f33132152e209e98df0dedc7a78f22c Author: Colin Ian King Date: Mon Apr 8 10:00:44 2019 +0100 tools/power turbostat: fix leak of file descriptor on error return path Currently the error return path does not close the file fp and leaks a file descriptor. Fix this by closing the file. Fixes: 5ea7647b333f ("tools/power turbostat: Warn on bad ACPI LPIT data") Signed-off-by: Colin Ian King Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 1 + 1 file changed, 1 insertion(+) commit d4794f25f122aa1a8a073be51112edaa723ffff4 Author: Yazen Ghannam Date: Mon Mar 25 17:32:42 2019 +0000 tools/power turbostat: Make interval calculation per thread to reduce jitter Turbostat currently normalizes TSC and other values by dividing by an interval. This interval is the delta between the start of one global (all counters on all CPUs) sampling and the start of another. However, this introduces a lot of jitter into the data. In order to reduce jitter, the interval calculation should be based on timestamps taken per thread and close to the start of the thread's sampling. Define a per thread time value to hold the delta between samples taken on the thread. Use the timestamp taken at the beginning of sampling to calculate the delta. Move the thread's beginning timestamp to after the CPU migration to avoid jitter due to the migration. Use the global time delta for the average time delta. Signed-off-by: Yazen Ghannam Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit d743dae6d1936160366a32f3400f03db1da9421b Author: Len Brown Date: Sat Aug 31 12:30:24 2019 -0400 tools/power turbostat: remove duplicate pc10 column Remove the duplicate pc10 column. Fixes: be0e54c4ebbf ("turbostat: Build-in "Low Power Idle" counters support") Reported-by: Naoya Horiguchi Signed-off-by: Len Brown tools/power/x86/turbostat/turbostat.c | 1 - 1 file changed, 1 deletion(-) commit 03531482402a2bc4ab93cf6dde46833775e035e9 Author: Zephaniah E. Loss-Cutler-Hull Date: Sat Feb 9 05:25:48 2019 -0800 tools/power x86_energy_perf_policy: Fix argument parsing The -w argument in x86_energy_perf_policy currently triggers an unconditional segfault. This is because the argument string reads: "+a:c:dD:E:e:f:m:M:rt:u:vw" and yet the argument handler expects an argument. When parse_optarg_string is called with a null argument, we then proceed to crash in strncmp, not horribly friendly. The man page describes -w as taking an argument, the long form (--hwp-window) is correctly marked as taking a required argument, and the code expects it. As such, this patch simply marks the short form (-w) as requiring an argument. Signed-off-by: Zephaniah E. Loss-Cutler-Hull Signed-off-by: Len Brown tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f3fe116a44fd02bc65dd312969697d06ca86b730 Author: Matt Lupfer Date: Thu Sep 20 10:31:44 2018 -0400 tools/power: Fix typo in man page From context, we mean EPB (Enegry Performance Bias). Signed-off-by: Matt Lupfer Signed-off-by: Len Brown tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ac1730f7db86f0a92d4de0f2b4ca9cd124080fe Author: Ben Hutchings Date: Sun Sep 16 16:06:10 2018 +0100 tools/power/x86: Enable compiler optimisations and Fortify by default Compiling without optimisations is silly, especially since some warnings depend on the optimiser. Use -O2. Fortify adds warnings for unchecked I/O (among other things), which seems to be a good idea for user-space code. Enable that too. Signed-off-by: Ben Hutchings Signed-off-by: Len Brown tools/power/x86/turbostat/Makefile | 3 ++- tools/power/x86/x86_energy_perf_policy/Makefile | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit adb8049097a9ec4acd09fbd3aa8636199a78df8a Author: Ben Hutchings Date: Sun Sep 16 16:05:53 2018 +0100 tools/power x86_energy_perf_policy: Fix "uninitialized variable" warnings at -O2 x86_energy_perf_policy first uses __get_cpuid() to check the maximum CPUID level and exits if it is too low. It then assumes that later calls will succeed (which I think is architecturally guaranteed). It also assumes that CPUID works at all (which is not guaranteed on x86_32). If optimisations are enabled, gcc warns about potentially uninitialized variables. Fix this by adding an exit-on-error after every call to __get_cpuid() instead of just checking the maximum level. Signed-off-by: Ben Hutchings Signed-off-by: Len Brown .../x86_energy_perf_policy.c | 26 +++++++++++++--------- 1 file changed, 15 insertions(+), 11 deletions(-) commit eea173097dfbb44855e3cf03c09eb5a665c20438 Merge: 95381debd9ee abf4923e97c3 Author: Linus Torvalds Date: Sat Aug 31 10:27:42 2019 -0700 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "I2C has a bunch of driver fixes and a core improvement to make the on-going API transition more robust" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: mediatek: disable zero-length transfers for mt8183 i2c: iproc: Stop advertising support of SMBUS quick cmd MAINTAINERS: i2c mv64xxx: Update documentation path i2c: piix4: Fix port selection for AMD Family 16h Model 30h i2c: designware: Synchronize IRQs when unregistering slave client i2c: i801: Avoid memory leak in check_acpi_smo88xx_device() i2c: make i2c_unregister_device() ERR_PTR safe commit 95381debd9ee8787256c3cdb92d2b167efa4b863 Merge: 7fb86707cc3a c68c9ec1c52e Author: Linus Torvalds Date: Sat Aug 31 09:15:25 2019 -0700 Merge tag 'trace-v5.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fixes from Steven Rostedt: "Small fixes and minor cleanups for tracing: - Make exported ftrace function not static - Fix NULL pointer dereference in reading probes as they are created - Fix NULL pointer dereference in k/uprobe clean up path - Various documentation fixes" * tag 'trace-v5.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Correct kdoc formats ftrace/x86: Remove mcount() declaration tracing/probe: Fix null pointer dereference tracing: Make exported ftrace_set_clr_event non-static ftrace: Check for successful allocation of hash ftrace: Check for empty hash and comment the race with registering probes ftrace: Fix NULL pointer dereference in t_probe_next() commit 7fb86707cc3a256e5556ced9c3a3eb96122d4b16 Merge: 834354f642ad a256f2e329df Author: Linus Torvalds Date: Sat Aug 31 09:02:36 2019 -0700 Merge tag 'riscv/for-v5.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fix from Paul Walmsley: "One significant fix for 32-bit RISC-V systems: Fix the RV32 memory map to prevent userspace from corrupting the FIXMAP area. Without this patch, the system can crash very early during the boot" * tag 'riscv/for-v5.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: RISC-V: Fix FIXMAP area corruption on RV32 systems commit 834354f642adfe7bb6d5dba5f7de6ecd3150fb2f Merge: 31bb5feb0d28 75ee23b30dc7 Author: Linus Torvalds Date: Sat Aug 31 08:51:48 2019 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Radim Krčmář: "PPC: - Fix bug which could leave locks held in the host on return to a guest. x86: - Prevent infinitely looping emulation of a failing syscall while single stepping. - Do not crash the host when nesting is disabled" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: x86: Don't update RIP or do single-step on faulting emulation KVM: x86: hyper-v: don't crash on KVM_GET_SUPPORTED_HV_CPUID when kvm_intel.nested is disabled KVM: PPC: Book3S: Fix incorrect guest-to-user-translation error handling commit 31bb5feb0d2809e60f0f27dc7703417129b814bf Merge: e0f14b8ca388 6c1c280805de Author: Linus Torvalds Date: Sat Aug 31 08:31:48 2019 -0700 Merge branch 'akpm' (patches from Andrew) Merge misc mm fixes from Andrew Morton: "7 fixes" * emailed patches from Andrew Morton : mm: memcontrol: fix percpu vmstats and vmevents flush mm, memcg: do not set reclaim_state on soft limit reclaim mailmap: add aliases for Dmitry Safonov mm/z3fold.c: fix lock/unlock imbalance in z3fold_page_isolate mm, memcg: partially revert "mm/memcontrol.c: keep local VM counters in sync with the hierarchical ones" mm/zsmalloc.c: fix build when CONFIG_COMPACTION=n mm: memcontrol: flush percpu slab vmstats on kmem offlining commit c68c9ec1c52e5bcd221eb09bc5344ad4f407b204 Author: Jakub Kicinski Date: Tue Aug 27 22:25:47 2019 -0700 tracing: Correct kdoc formats Fix the following kdoc warnings: kernel/trace/trace.c:1579: warning: Function parameter or member 'tr' not described in 'update_max_tr_single' kernel/trace/trace.c:1579: warning: Function parameter or member 'tsk' not described in 'update_max_tr_single' kernel/trace/trace.c:1579: warning: Function parameter or member 'cpu' not described in 'update_max_tr_single' kernel/trace/trace.c:1776: warning: Function parameter or member 'type' not described in 'register_tracer' kernel/trace/trace.c:2239: warning: Function parameter or member 'task' not described in 'tracing_record_taskinfo' kernel/trace/trace.c:2239: warning: Function parameter or member 'flags' not described in 'tracing_record_taskinfo' kernel/trace/trace.c:2269: warning: Function parameter or member 'prev' not described in 'tracing_record_taskinfo_sched_switch' kernel/trace/trace.c:2269: warning: Function parameter or member 'next' not described in 'tracing_record_taskinfo_sched_switch' kernel/trace/trace.c:2269: warning: Function parameter or member 'flags' not described in 'tracing_record_taskinfo_sched_switch' kernel/trace/trace.c:3078: warning: Function parameter or member 'ip' not described in 'trace_vbprintk' kernel/trace/trace.c:3078: warning: Function parameter or member 'fmt' not described in 'trace_vbprintk' kernel/trace/trace.c:3078: warning: Function parameter or member 'args' not described in 'trace_vbprintk' Link: http://lkml.kernel.org/r/20190828052549.2472-2-jakub.kicinski@netronome.com Signed-off-by: Jakub Kicinski Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) commit 2e815627318910fb2ab004670a83ba27ac2228b6 Author: Jisheng Zhang Date: Mon Aug 26 09:13:12 2019 +0000 ftrace/x86: Remove mcount() declaration Commit 562e14f72292 ("ftrace/x86: Remove mcount support") removed the support for using mcount, so we could remove the mcount() declaration to clean up. Link: http://lkml.kernel.org/r/20190826170150.10f101ba@xhacker.debian Signed-off-by: Jisheng Zhang Signed-off-by: Steven Rostedt (VMware) arch/x86/include/asm/ftrace.h | 1 - 1 file changed, 1 deletion(-) commit 19a58ce1dc72264b9d50ff6d86cc36b3c439fb64 Author: Xinpeng Liu Date: Thu Aug 8 07:29:23 2019 +0800 tracing/probe: Fix null pointer dereference BUG: KASAN: null-ptr-deref in trace_probe_cleanup+0x8d/0xd0 Read of size 8 at addr 0000000000000000 by task syz-executor.0/9746 trace_probe_cleanup+0x8d/0xd0 free_trace_kprobe.part.14+0x15/0x50 alloc_trace_kprobe+0x23e/0x250 Link: http://lkml.kernel.org/r/1565220563-980-1-git-send-email-danielliu861@gmail.com Fixes: e3dc9f898ef9c ("tracing/probe: Add trace_event_call accesses APIs") Signed-off-by: Xinpeng Liu Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_probe.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 595a438c78dbdc43d6c9db4f437267f0bd1548bf Author: Denis Efremov Date: Thu Jul 4 20:21:10 2019 +0300 tracing: Make exported ftrace_set_clr_event non-static The function ftrace_set_clr_event is declared static and marked EXPORT_SYMBOL_GPL(), which is at best an odd combination. Because the function was decided to be a part of API, this commit removes the static attribute and adds the declaration to the header. Link: http://lkml.kernel.org/r/20190704172110.27041-1-efremov@linux.com Fixes: f45d1225adb04 ("tracing: Kernel access to Ftrace instances") Reviewed-by: Joe Jin Signed-off-by: Denis Efremov Signed-off-by: Steven Rostedt (VMware) include/linux/trace_events.h | 1 + kernel/trace/trace_events.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit ae688e1720fd387de34f2140a735917411672bf1 Author: Fabrizio Castro Date: Fri Aug 30 14:15:35 2019 +0100 arm64: dts: renesas: hihope-common: Fix eMMC status SDHI3 got accidentally disabled while adding USB 2.0 support, this patch fixes it. Fixes: 734d277f412a ("arm64: dts: renesas: hihope-common: Add USB 2.0 support") Signed-off-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/hihope-common.dtsi | 1 + 1 file changed, 1 insertion(+) commit 52d083472e0b64d1da5b6469ed3defb1ddc45929 Author: Miguel Ojeda Date: Sat Aug 31 10:00:11 2019 +0200 clang-format: Update with the latest for_each macro list Re-run the shell fragment that generated the original list. Signed-off-by: Miguel Ojeda .clang-format | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit e0f14b8ca3882988d15f0b1b853ae3c29d8c9a83 Merge: ab9bb6318b09 5871cd93692c Author: Linus Torvalds Date: Fri Aug 30 18:56:08 2019 -0700 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fix from Herbert Xu: "Fix a potential crash in the ccp driver" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: ccp - Ignore unconfigured CCP device on suspend/resume commit ab9bb6318b0967671e0c9b6537c1537d51ca4f45 Author: Linus Torvalds Date: Fri Aug 30 18:47:15 2019 -0700 Partially revert "kfifo: fix kfifo_alloc() and kfifo_init()" Commit dfe2a77fd243 ("kfifo: fix kfifo_alloc() and kfifo_init()") made the kfifo code round the number of elements up. That was good for __kfifo_alloc(), but it's actually wrong for __kfifo_init(). The difference? __kfifo_alloc() will allocate the rounded-up number of elements, but __kfifo_init() uses an allocation done by the caller. We can't just say "use more elements than the caller allocated", and have to round down. The good news? All the normal cases will be using power-of-two arrays anyway, and most users of kfifo's don't use kfifo_init() at all, but one of the helper macros to declare a KFIFO that enforce the proper power-of-two behavior. But it looks like at least ibmvscsis might be affected. The bad news? Will Deacon refers to an old thread and points points out that the memory ordering in kfifo's is questionable. See https://lore.kernel.org/lkml/20181211034032.32338-1-yuleixzhang@tencent.com/ for more. Fixes: dfe2a77fd243 ("kfifo: fix kfifo_alloc() and kfifo_init()") Reported-by: laokz Cc: Stefani Seibold Cc: Andrew Morton Cc: Dan Carpenter Cc: Greg KH Cc: Kees Cook Cc: Will Deacon Signed-off-by: Linus Torvalds lib/kfifo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6c1c280805ded72eceb2afc1a0d431b256608554 Author: Shakeel Butt Date: Fri Aug 30 16:04:53 2019 -0700 mm: memcontrol: fix percpu vmstats and vmevents flush Instead of using raw_cpu_read() use per_cpu() to read the actual data of the corresponding cpu otherwise we will be reading the data of the current cpu for the number of online CPUs. Link: http://lkml.kernel.org/r/20190829203110.129263-1-shakeelb@google.com Fixes: bb65f89b7d3d ("mm: memcontrol: flush percpu vmevents before releasing memcg") Fixes: c350a99ea2b1 ("mm: memcontrol: flush percpu vmstats before releasing memcg") Signed-off-by: Shakeel Butt Acked-by: Roman Gushchin Acked-by: Michal Hocko Cc: Johannes Weiner Cc: Vladimir Davydov Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memcontrol.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit d2e5fb927ee7f52c1fe2a98b554881e9dffd8514 Author: Michal Hocko Date: Fri Aug 30 16:04:50 2019 -0700 mm, memcg: do not set reclaim_state on soft limit reclaim Adric Blake has noticed[1] the following warning: WARNING: CPU: 7 PID: 175 at mm/vmscan.c:245 set_task_reclaim_state+0x1e/0x40 [...] Call Trace: mem_cgroup_shrink_node+0x9b/0x1d0 mem_cgroup_soft_limit_reclaim+0x10c/0x3a0 balance_pgdat+0x276/0x540 kswapd+0x200/0x3f0 ? wait_woken+0x80/0x80 kthread+0xfd/0x130 ? balance_pgdat+0x540/0x540 ? kthread_park+0x80/0x80 ret_from_fork+0x35/0x40 ---[ end trace 727343df67b2398a ]--- which tells us that soft limit reclaim is about to overwrite the reclaim_state configured up in the call chain (kswapd in this case but the direct reclaim is equally possible). This means that reclaim stats would get misleading once the soft reclaim returns and another reclaim is done. Fix the warning by dropping set_task_reclaim_state from the soft reclaim which is always called with reclaim_state set up. [1] http://lkml.kernel.org/r/CAE1jjeePxYPvw1mw2B3v803xHVR_BNnz0hQUY_JDMN8ny29M6w@mail.gmail.com Link: http://lkml.kernel.org/r/20190828071808.20410-1-mhocko@kernel.org Signed-off-by: Michal Hocko Reported-by: Adric Blake Acked-by: Yafang Shao Acked-by: Yang Shi Cc: Johannes Weiner Cc: Hillf Danton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmscan.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit a6c135bb1a59b5d67c8c45b214d3427d65dd7c00 Author: Dmitry Safonov Date: Fri Aug 30 16:04:46 2019 -0700 mailmap: add aliases for Dmitry Safonov I don't work for Virtuozzo or Samsung anymore and I've noticed that they have started sending annoying html email-replies. And I prioritize my personal emails over work email box, so while at it add an entry for Arista too - so I can reply faster when needed. Link: http://lkml.kernel.org/r/20190827220346.11123-1-dima@arista.com Signed-off-by: Dmitry Safonov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds .mailmap | 3 +++ 1 file changed, 3 insertions(+) commit 14108b9131a47ff18a3c640f583eb2d625c75c0d Author: Gustavo A. R. Silva Date: Fri Aug 30 16:04:43 2019 -0700 mm/z3fold.c: fix lock/unlock imbalance in z3fold_page_isolate Fix lock/unlock imbalance by unlocking *zhdr* before return. Addresses Coverity ID 1452811 ("Missing unlock") Link: http://lkml.kernel.org/r/20190826030634.GA4379@embeddedor Fixes: d776aaa9895e ("mm/z3fold.c: fix race between migration and destruction") Signed-off-by: Gustavo A. R. Silva Reviewed-by: Andrew Morton Cc: Henry Burns Cc: Vitaly Wool Cc: Shakeel Butt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/z3fold.c | 1 + 1 file changed, 1 insertion(+) commit b4c46484dc3fa3721d68fdfae85c1d7b1f6b5472 Author: Roman Gushchin Date: Fri Aug 30 16:04:39 2019 -0700 mm, memcg: partially revert "mm/memcontrol.c: keep local VM counters in sync with the hierarchical ones" Commit 766a4c19d880 ("mm/memcontrol.c: keep local VM counters in sync with the hierarchical ones") effectively decreased the precision of per-memcg vmstats_local and per-memcg-per-node lruvec percpu counters. That's good for displaying in memory.stat, but brings a serious regression into the reclaim process. One issue I've discovered and debugged is the following: lruvec_lru_size() can return 0 instead of the actual number of pages in the lru list, preventing the kernel to reclaim last remaining pages. Result is yet another dying memory cgroups flooding. The opposite is also happening: scanning an empty lru list is the waste of cpu time. Also, inactive_list_is_low() can return incorrect values, preventing the active lru from being scanned and freed. It can fail both because the size of active and inactive lists are inaccurate, and because the number of workingset refaults isn't precise. In other words, the result is pretty random. I'm not sure, if using the approximate number of slab pages in count_shadow_number() is acceptable, but issues described above are enough to partially revert the patch. Let's keep per-memcg vmstat_local batched (they are only used for displaying stats to the userspace), but keep lruvec stats precise. This change fixes the dead memcg flooding on my setup. Link: http://lkml.kernel.org/r/20190817004726.2530670-1-guro@fb.com Fixes: 766a4c19d880 ("mm/memcontrol.c: keep local VM counters in sync with the hierarchical ones") Signed-off-by: Roman Gushchin Acked-by: Yafang Shao Cc: Johannes Weiner Cc: Michal Hocko Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memcontrol.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 441e254cd40dc03beec3c650ce6ce6074bc6517f Author: Andrew Morton Date: Fri Aug 30 16:04:35 2019 -0700 mm/zsmalloc.c: fix build when CONFIG_COMPACTION=n Fixes: 701d678599d0c1 ("mm/zsmalloc.c: fix race condition in zs_destroy_pool") Link: http://lkml.kernel.org/r/201908251039.5oSbEEUT%25lkp@intel.com Reported-by: kbuild test robot Cc: Sergey Senozhatsky Cc: Henry Burns Cc: Minchan Kim Cc: Shakeel Butt Cc: Jonathan Adams Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/zsmalloc.c | 2 ++ 1 file changed, 2 insertions(+) commit bee07b33db78d4ee7ed6a2fe810b9473d5471fe4 Author: Roman Gushchin Date: Fri Aug 30 16:04:32 2019 -0700 mm: memcontrol: flush percpu slab vmstats on kmem offlining I've noticed that the "slab" value in memory.stat is sometimes 0, even if some children memory cgroups have a non-zero "slab" value. The following investigation showed that this is the result of the kmem_cache reparenting in combination with the per-cpu batching of slab vmstats. At the offlining some vmstat value may leave in the percpu cache, not being propagated upwards by the cgroup hierarchy. It means that stats on ancestor levels are lower than actual. Later when slab pages are released, the precise number of pages is substracted on the parent level, making the value negative. We don't show negative values, 0 is printed instead. To fix this issue, let's flush percpu slab memcg and lruvec stats on memcg offlining. This guarantees that numbers on all ancestor levels are accurate and match the actual number of outstanding slab pages. Link: http://lkml.kernel.org/r/20190819202338.363363-3-guro@fb.com Fixes: fb2f2b0adb98 ("mm: memcg/slab: reparent memcg kmem_caches on cgroup removal") Signed-off-by: Roman Gushchin Cc: Johannes Weiner Cc: Michal Hocko Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mmzone.h | 5 +++-- mm/memcontrol.c | 35 +++++++++++++++++++++++++++-------- 2 files changed, 30 insertions(+), 10 deletions(-) commit c3d7a089f945124770748b4eb7d5e2d1b40dadf9 Merge: 94880a5b2e81 daf1de907879 Author: David S. Miller Date: Fri Aug 30 17:50:10 2019 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net The following patchset contains Netfilter fixes for net: 1) Spurious warning when loading rules using the physdev match, from Todd Seidelmann. 2) Fix FTP conntrack helper debugging output, from Thomas Jarosch. 3) Restore per-netns nf_conntrack_{acct,helper,timeout} sysctl knobs, from Florian Westphal. 4) Clear skbuff timestamp from the flowtable datapath, also from Florian. 5) Fix incorrect byteorder of NFT_META_BRI_IIFVPROTO, from wenxu. ==================== Signed-off-by: David S. Miller commit 94880a5b2e8144e77d2a0a384a68248104837f58 Merge: d12040b6933f ede7c460b1da Author: David S. Miller Date: Fri Aug 30 17:39:37 2019 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2019-08-31 The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) Fix 32-bit zero-extension during constant blinding which has been causing a regression on ppc64, from Naveen. 2) Fix a latency bug in nfp driver when updating stack index register, from Jiong. ==================== Signed-off-by: David S. Miller commit d12040b6933f684a26773afad46dbba9778608d7 Author: David Howells Date: Thu Aug 29 14:12:11 2019 +0100 rxrpc: Fix lack of conn cleanup when local endpoint is cleaned up [ver #2] When a local endpoint is ceases to be in use, such as when the kafs module is unloaded, the kernel will emit an assertion failure if there are any outstanding client connections: rxrpc: Assertion failed ------------[ cut here ]------------ kernel BUG at net/rxrpc/local_object.c:433! and even beyond that, will evince other oopses if there are service connections still present. Fix this by: (1) Removing the triggering of connection reaping when an rxrpc socket is released. These don't actually clean up the connections anyway - and further, the local endpoint may still be in use through another socket. (2) Mark the local endpoint as dead when we start the process of tearing it down. (3) When destroying a local endpoint, strip all of its client connections from the idle list and discard the ref on each that the list was holding. (4) When destroying a local endpoint, call the service connection reaper directly (rather than through a workqueue) to immediately kill off all outstanding service connections. (5) Make the service connection reaper reap connections for which the local endpoint is marked dead. Only after destroying the connections can we close the socket lest we get an oops in a workqueue that's looking at a connection or a peer. Fixes: 3d18cbb7fd0c ("rxrpc: Fix conn expiry timers") Signed-off-by: David Howells Tested-by: Marc Dionne Signed-off-by: David S. Miller net/rxrpc/af_rxrpc.c | 3 --- net/rxrpc/ar-internal.h | 1 + net/rxrpc/conn_client.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ net/rxrpc/conn_object.c | 2 +- net/rxrpc/local_object.c | 5 ++++- 5 files changed, 50 insertions(+), 5 deletions(-) commit a285c1fa39ccc6f04b1af025ec00b1aae52e6814 Merge: 3b25528e1e35 d0d5c0cd1e71 Author: David S. Miller Date: Fri Aug 30 14:54:41 2019 -0700 Merge tag 'rxrpc-fixes-20190827' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== rxrpc: Fix use of skb_cow_data() Here's a series of patches that replaces the use of skb_cow_data() in rxrpc with skb_unshare() early on in the input process. The problem that is being seen is that skb_cow_data() indirectly requires that the maximum usage count on an sk_buff be 1, and it may generate an assertion failure in pskb_expand_head() if not. This can occur because rxrpc_input_data() may be still holding a ref when it has just attached the sk_buff to the rx ring and given that attachment its own ref. If recvmsg happens fast enough, skb_cow_data() can see the ref still held by the softirq handler. Further, a packet may contain multiple subpackets, each of which gets its own attachment to the ring and its own ref - also making skb_cow_data() go bang. Fix this by: (1) The DATA packet is currently parsed for subpackets twice by the input routines. Parse it just once instead and make notes in the sk_buff private data. (2) Use the notes from (1) when attaching the packet to the ring multiple times. Once the packet is attached to the ring, recvmsg can see it and start modifying it, so the softirq handler is not permitted to look inside it from that point. (3) Pass the ref from the input code to the ring rather than getting an extra ref. rxrpc_input_data() uses a ref on the second refcount to prevent the packet from evaporating under it. (4) Call skb_unshare() on secured DATA packets in rxrpc_input_packet() before we take call->input_lock. Other sorts of packets don't get modified and so can be left. A trace is emitted if skb_unshare() eats the skb. Note that skb_share() for our accounting in this regard as we can't see the parameters in the packet to log in a trace line if it releases it. (5) Remove the calls to skb_cow_data(). These are then no longer necessary. There are also patches to improve the rxrpc_skb tracepoint to make sure that Tx-derived buffers are identified separately from Rx-derived buffers in the trace. ==================== Signed-off-by: David S. Miller commit 3b25528e1e355c803e73aa326ce657b5606cda73 Author: Chen-Yu Tsai Date: Thu Aug 29 11:17:24 2019 +0800 net: stmmac: dwmac-rk: Don't fail if phy regulator is absent The devicetree binding lists the phy phy as optional. As such, the driver should not bail out if it can't find a regulator. Instead it should just skip the remaining regulator related code and continue on normally. Skip the remainder of phy_power_on() if a regulator supply isn't available. This also gets rid of the bogus return code. Fixes: 2e12f536635f ("net: stmmac: dwmac-rk: Use standard devicetree property for phy regulator") Signed-off-by: Chen-Yu Tsai Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit b6b4dc4c1fa7f1c99398e7dc85758049645e9588 Author: YueHaibing Date: Thu Aug 29 10:46:00 2019 +0800 amd-xgbe: Fix error path in xgbe_mod_init() In xgbe_mod_init(), we should do cleanup if some error occurs Reported-by: Hulk Robot Fixes: efbaa828330a ("amd-xgbe: Add support to handle device renaming") Fixes: 47f164deab22 ("amd-xgbe: Add PCI device support") Signed-off-by: YueHaibing Signed-off-by: David S. Miller drivers/net/ethernet/amd/xgbe/xgbe-main.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 5b0022dd32b7c2e15edf1827ba80aa1407edf9ff Author: Naveen N. Rao Date: Thu Jul 4 20:04:42 2019 +0530 ftrace: Check for successful allocation of hash In register_ftrace_function_probe(), we are not checking the return value of alloc_and_copy_ftrace_hash(). The subsequent call to ftrace_match_records() may end up dereferencing the same. Add a check to ensure this doesn't happen. Link: http://lkml.kernel.org/r/26e92574f25ad23e7cafa3cf5f7a819de1832cbe.1562249521.git.naveen.n.rao@linux.vnet.ibm.com Cc: stable@vger.kernel.org Fixes: 1ec3a81a0cf42 ("ftrace: Have each function probe use its own ftrace_ops") Signed-off-by: Naveen N. Rao Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 5 +++++ 1 file changed, 5 insertions(+) commit 372e0d01da71c84dcecf7028598a33813b0d5256 Author: Steven Rostedt (VMware) Date: Fri Aug 30 16:30:01 2019 -0400 ftrace: Check for empty hash and comment the race with registering probes The race between adding a function probe and reading the probes that exist is very subtle. It needs a comment. Also, the issue can also happen if the probe has has the EMPTY_HASH as its func_hash. Cc: stable@vger.kernel.org Fixes: 7b60f3d876156 ("ftrace: Dynamically create the probe ftrace_ops for the trace_array") Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 7bd46644ea0f6021dc396a39a8bfd3a58f6f1f9f Author: Naveen N. Rao Date: Thu Jul 4 20:04:41 2019 +0530 ftrace: Fix NULL pointer dereference in t_probe_next() LTP testsuite on powerpc results in the below crash: Unable to handle kernel paging request for data at address 0x00000000 Faulting instruction address: 0xc00000000029d800 Oops: Kernel access of bad area, sig: 11 [#1] LE SMP NR_CPUS=2048 NUMA PowerNV ... CPU: 68 PID: 96584 Comm: cat Kdump: loaded Tainted: G W NIP: c00000000029d800 LR: c00000000029dac4 CTR: c0000000001e6ad0 REGS: c0002017fae8ba10 TRAP: 0300 Tainted: G W MSR: 9000000000009033 CR: 28022422 XER: 20040000 CFAR: c00000000029d90c DAR: 0000000000000000 DSISR: 40000000 IRQMASK: 0 ... NIP [c00000000029d800] t_probe_next+0x60/0x180 LR [c00000000029dac4] t_mod_start+0x1a4/0x1f0 Call Trace: [c0002017fae8bc90] [c000000000cdbc40] _cond_resched+0x10/0xb0 (unreliable) [c0002017fae8bce0] [c0000000002a15b0] t_start+0xf0/0x1c0 [c0002017fae8bd30] [c0000000004ec2b4] seq_read+0x184/0x640 [c0002017fae8bdd0] [c0000000004a57bc] sys_read+0x10c/0x300 [c0002017fae8be30] [c00000000000b388] system_call+0x5c/0x70 The test (ftrace_set_ftrace_filter.sh) is part of ftrace stress tests and the crash happens when the test does 'cat $TRACING_PATH/set_ftrace_filter'. The address points to the second line below, in t_probe_next(), where filter_hash is dereferenced: hash = iter->probe->ops.func_hash->filter_hash; size = 1 << hash->size_bits; This happens due to a race with register_ftrace_function_probe(). A new ftrace_func_probe is created and added into the func_probes list in trace_array under ftrace_lock. However, before initializing the filter, we drop ftrace_lock, and re-acquire it after acquiring regex_lock. If another process is trying to read set_ftrace_filter, it will be able to acquire ftrace_lock during this window and it will end up seeing a NULL filter_hash. Fix this by just checking for a NULL filter_hash in t_probe_next(). If the filter_hash is NULL, then this probe is just being added and we can simply return from here. Link: http://lkml.kernel.org/r/05e021f757625cbbb006fad41380323dbe4e3b43.1562249521.git.naveen.n.rao@linux.vnet.ibm.com Cc: stable@vger.kernel.org Fixes: 7b60f3d876156 ("ftrace: Dynamically create the probe ftrace_ops for the trace_array") Signed-off-by: Naveen N. Rao Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 4 ++++ 1 file changed, 4 insertions(+) commit 0a51b08fb3b4528e0915c4a4dd2ab0effa232359 Merge: 846d2db3e000 5b3efa4f1479 Author: Linus Torvalds Date: Fri Aug 30 11:58:02 2019 -0700 Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM fixes from Russell King: "Three fixes for ARM this time around: - A fix for update_sections_early() to cope with NULL ->mm pointers. - A correction to the backtrace code to allow proper backtraces. - Reinforcement of pfn_valid() with PFNs >= 4GiB" * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: 8901/1: add a criteria for pfn_valid of arm ARM: 8897/1: check stmfd instruction using right shift ARM: 8874/1: mm: only adjust sections of valid mm structures commit 846d2db3e00048da3f650e0cfb0b8d67669cec3e Author: Eric Biggers Date: Fri Aug 30 16:52:26 2019 +0100 keys: ensure that ->match_free() is called in request_key_and_link() If check_cached_key() returns a non-NULL value, we still need to call key_type::match_free() to undo key_type::match_preparse(). Fixes: 7743c48e54ee ("keys: Cache result of request_key*() temporarily in task_struct") Signed-off-by: Eric Biggers Signed-off-by: David Howells Signed-off-by: Linus Torvalds security/keys/request_key.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e8d6766f3cc8318e8fcaa5ef2d1af4d2d9903af3 Merge: 8fb8e9e46261 7a6c9dbb36a4 Author: Linus Torvalds Date: Fri Aug 30 10:53:12 2019 -0700 Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC fixes from Arnd Bergmann: "The majority of the fixes this time are for OMAP hardware, here is a breakdown of the significant changes: Various device tree bug fixes: - TI am57xx boards need a voltage level fix to avoid damaging SD cards - vf610-bk4 fails to detect its flash due to an incorrect description - meson-g12a USB phy configuration fails - meson-g12b reboot should not power off the SD card - Some corrections for apparently harmless differences from the documentation. Regression fixes: - ams-delta FIQ interrupts broke in 5.3 - TI am3/am4 mmc controllers broke in 5.2 The logic_pio driver (used on some Huawei ARM servers) got a few bug fixes for reliability. And a couple of compile-time warning fixes" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (26 commits) soc: ixp4xx: Protect IXP4xx SoC drivers by ARCH_IXP4XX || COMPILE_TEST soc: ti: pm33xx: Make two symbols static soc: ti: pm33xx: Fix static checker warnings ARM: OMAP: dma: Mark expected switch fall-throughs ARM: dts: Fix incomplete dts data for am3 and am4 mmc bus: ti-sysc: Simplify cleanup upon failures in sysc_probe() ARM: OMAP1: ams-delta-fiq: Fix missing irq_ack ARM: dts: dra74x: Fix iodelay configuration for mmc3 ARM: dts: am335x: Fix UARTs length ARM: OMAP2+: Fix omap4 errata warning on other SoCs bus: hisi_lpc: Add .remove method to avoid driver unbind crash bus: hisi_lpc: Unregister logical PIO range to avoid potential use-after-free lib: logic_pio: Add logic_pio_unregister_range() lib: logic_pio: Avoid possible overlap for unregistering regions lib: logic_pio: Fix RCU usage arm64: dts: amlogic: odroid-n2: keep SD card regulator always on arm64: dts: meson-g12a-sei510: enable IR controller arm64: dts: meson-g12a: add missing dwc2 phy-names ARM: dts: vf610-bk4: Fix qspi node description ARM: dts: Fix incorrect dcan register mapping for am3, am4 and dra7 ... commit 8fb8e9e46261e0117cb3cffb6dd8bb7e08f8649b Merge: fbcb0b4feb5c 531a64e4c35b Author: Linus Torvalds Date: Fri Aug 30 09:23:45 2019 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fix from Doug Ledford: "Much calmer week this week. Just one patch queued up: The way the siw driver was locking around the traversal of the list of ipv6 addresses on a device was causing a scheduling while atomic issue. Bernard straightened it out by using the rtnl_lock" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: RDMA/siw: Fix IPv6 addr_list locking commit fbcb0b4feb5c3f5431a2ed9f0211653864cf2104 Merge: 0d70787b6594 d435c9a7b85b Author: Linus Torvalds Date: Fri Aug 30 09:09:54 2019 -0700 Merge tag 'ceph-for-5.3-rc7' of git://github.com/ceph/ceph-client Pull two ceph fixes from Ilya Dryomov: "A fix for a -rc1 regression in rbd and a trivial static checker fix" * tag 'ceph-for-5.3-rc7' of git://github.com/ceph/ceph-client: rbd: restore zeroing past the overlap when reading from parent libceph: don't call crypto_free_sync_skcipher() on a NULL tfm commit 0d70787b65941a8db36fd2c35d25c93178f8b545 Merge: f69f199271ec e73a3896eaca Author: Linus Torvalds Date: Fri Aug 30 08:32:10 2019 -0700 Merge tag 'mmc-v5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: "MMC core: - Fix init of SD cards reporting an invalid VDD range MMC host: - sprd: Fixes for clocks, card-detect, write-protect etc - cadence: Fix ADMA 64-bit addressing - tegra: Re-allow writing to SD card when GPIO pin is absent - at91: Fix eMMC init by clearing HS200 cap as it's not supported" * tag 'mmc-v5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: sdhci-cadence: enable v4_mode to fix ADMA 64-bit addressing mmc: sdhci-sprd: clear the UHS-I modes read from registers mms: sdhci-sprd: add SDHCI_QUIRK_BROKEN_CARD_DETECTION mmc: sdhci-sprd: add SDHCI_QUIRK2_PRESET_VALUE_BROKEN mmc: sdhci-sprd: add get_ro hook function mmc: sdhci-sprd: fixed incorrect clock divider mmc: core: Fix init of SD cards reporting an invalid VDD range mmc: sdhci-of-at91: add quirk for broken HS200 Revert "mmc: sdhci-tegra: drop ->get_ro() implementation" commit f69f199271ec5f765b056dfca703587d6d2b7aae Merge: 265381004994 1c0d63eb0e82 Author: Linus Torvalds Date: Fri Aug 30 08:21:24 2019 -0700 Merge tag 'drm-fixes-2019-08-30' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Nothing too crazy, there's probably more patches than I'd like at this stage, but they are all pretty self contained: amdgpu: - Fix GFXOFF regression for PCO and RV2 - Fix missing fence reference - Fix VG20 power readings on certain SMU firmware versions - Fix dpm level setup for VG20 - Add an ATPX laptop quirk i915: - Fix DP MST max BPC property creation after DRM register - Fix unused ggtt deballooning and NULL dereference in guest - Fix DSC eDP transcoder identification - Fix WARN from DMA API debug by setting DMA max segment size qxl: - Make qxl reservel the vga ports using vgaargb to prevent switching to vga compatibility mode. omap: - Fix omap port lookup for SDI output virtio: - Use virtio_max_dma_size to fix an issue with swiotlb. komeda: - Compiler fixes to komeda. - Add missing of_node_get() call in komeda. - Reorder the komeda de-init functions" * tag 'drm-fixes-2019-08-30' of git://anongit.freedesktop.org/drm/drm: drm/komeda: Reordered the komeda's de-init functions drm/amdgpu: fix GFXOFF on Picasso and Raven2 drm/amdgpu: Add APTX quirk for Dell Latitude 5495 drm/amd/powerplay: correct Vega20 dpm level related settings drm/i915: Call dma_set_max_seg_size() in i915_driver_hw_probe() drm/i915/dp: Fix DSC enable code to use cpu_transcoder instead of encoder->type drm/i915: Don't deballoon unused ggtt drm_mm_node in linux guest drm/i915: Do not create a new max_bpc prop for MST connectors drm/powerplay: Fix Vega20 power reading again drm/powerplay: Fix Vega20 Average Power value v4 drm/amdgpu: fix dma_fence_wait without reference drm/komeda: Add missing of_node_get() call drm/komeda: Clean warning 'komeda_component_add' might be a candidate for 'gnu_printf' drm/komeda: Fix warning -Wunused-but-set-variable drm/komeda: Fix error: not allocating enough data 1592 vs 1584 drm/virtio: use virtio_max_dma_size drm/omap: Fix port lookup for SDI output drm/qxl: get vga ioports commit 0ce4a85f4f015d13a6a6b4954f4e8e63cd83f7b1 Author: Lu Baolu Date: Mon Aug 26 16:50:56 2019 +0800 Revert "iommu/vt-d: Avoid duplicated pci dma alias consideration" This reverts commit 557529494d79f3f1fadd486dd18d2de0b19be4da. Commit 557529494d79f ("iommu/vt-d: Avoid duplicated pci dma alias consideration") aimed to address a NULL pointer deference issue happened when a thunderbolt device driver returned unexpectedly. Unfortunately, this change breaks a previous pci quirk added by commit cc346a4714a59 ("PCI: Add function 1 DMA alias quirk for Marvell devices"), as the result, devices like Marvell 88SE9128 SATA controller doesn't work anymore. We will continue to try to find the real culprit mentioned in 557529494d79f, but for now we should revert it to fix current breakage. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=204627 Cc: Stijn Tintel Cc: Petr Vandrovec Reported-by: Stijn Tintel Reported-by: Petr Vandrovec Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 55 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 53 insertions(+), 2 deletions(-) commit 89f2c0425cb51e38d6b39795c08d55421bec680c Merge: a55aa89aab90 438b6c20e616 Author: Linus Walleij Date: Fri Aug 30 15:28:04 2019 +0200 Merge tag 'gpio-v5.3-rc7-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into fixes gpio fixes for v5.3-rc7 - two patches fixing a regression in the pca953x driver commit abf4923e97c3abbbd1e59f0e13c7c214c93c6aaa Author: Hsin-Yi Wang Date: Thu Aug 22 17:45:17 2019 +0800 i2c: mediatek: disable zero-length transfers for mt8183 Quoting from mt8183 datasheet, the number of transfers to be transferred in one transaction should be set to bigger than 1, so we should forbid zero-length transfer and update functionality. Reported-by: Alexandru M Stan Signed-off-by: Hsin-Yi Wang Reviewed-by: Qii Wang [wsa: shortened commit message a little] Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-mt65xx.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit b3d604d405166edfd4e1e6053409b85008f4f56d Author: Lori Hikichi Date: Thu Aug 8 09:07:52 2019 +0530 i2c: iproc: Stop advertising support of SMBUS quick cmd The driver does not support the SMBUS Quick command so remove the flag that indicates that level of support. By default the i2c_detect tool uses the quick command to try and detect devices at some bus addresses. If the quick command is used then we will not detect the device, even though it is present. Fixes: e6e5dd3566e0 (i2c: iproc: Add Broadcom iProc I2C Driver) Signed-off-by: Lori Hikichi Signed-off-by: Rayagonda Kokatanur Reviewed-by: Ray Jui Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-bcm-iproc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit f08b2080e36057c9833596df8348c33daeb04d56 Author: Denis Efremov Date: Tue Aug 13 09:09:13 2019 +0300 MAINTAINERS: i2c mv64xxx: Update documentation path Update MAINTAINERS record to reflect the file move from i2c-mv64xxx.txt to marvell,mv64xxx-i2c.yaml. Fixes: f8bbde72ef44 ("dt-bindings: i2c: mv64xxx: Add YAML schemas") Signed-off-by: Denis Efremov Acked-by: Maxime Ripard Acked-by: Gregory CLEMENT Signed-off-by: Wolfram Sang MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0f4cd769c410e2285a4e9873a684d90423f03090 Author: Kim Phillips Date: Mon Aug 26 14:57:30 2019 -0500 perf/x86/amd/ibs: Fix sample bias for dispatched micro-ops When counting dispatched micro-ops with cnt_ctl=1, in order to prevent sample bias, IBS hardware preloads the least significant 7 bits of current count (IbsOpCurCnt) with random values, such that, after the interrupt is handled and counting resumes, the next sample taken will be slightly perturbed. The current count bitfield is in the IBS execution control h/w register, alongside the maximum count field. Currently, the IBS driver writes that register with the maximum count, leaving zeroes to fill the current count field, thereby overwriting the random bits the hardware preloaded for itself. Fix the driver to actually retain and carry those random bits from the read of the IBS control register, through to its write, instead of overwriting the lower current count bits with zeroes. Tested with: perf record -c 100001 -e ibs_op/cnt_ctl=1/pp -a -C 0 taskset -c 0 'perf annotate' output before: 15.70 65: addsd %xmm0,%xmm1 17.30 add $0x1,%rax 15.88 cmp %rdx,%rax je 82 17.32 72: test $0x1,%al jne 7c 7.52 movapd %xmm1,%xmm0 5.90 jmp 65 8.23 7c: sqrtsd %xmm1,%xmm0 12.15 jmp 65 'perf annotate' output after: 16.63 65: addsd %xmm0,%xmm1 16.82 add $0x1,%rax 16.81 cmp %rdx,%rax je 82 16.69 72: test $0x1,%al jne 7c 8.30 movapd %xmm1,%xmm0 8.13 jmp 65 8.24 7c: sqrtsd %xmm1,%xmm0 8.39 jmp 65 Tested on Family 15h and 17h machines. Machines prior to family 10h Rev. C don't have the RDWROPCNT capability, and have the IbsOpCurCnt bitfield reserved, so this patch shouldn't affect their operation. It is unknown why commit db98c5faf8cb ("perf/x86: Implement 64-bit counter support for IBS") ignored the lower 4 bits of the IbsOpCurCnt field; the number of preloaded random bits has always been 7, AFAICT. Signed-off-by: Kim Phillips Signed-off-by: Peter Zijlstra (Intel) Cc: "Arnaldo Carvalho de Melo" Cc: Cc: Ingo Molnar Cc: Ingo Molnar Cc: Jiri Olsa Cc: Thomas Gleixner Cc: "Borislav Petkov" Cc: Stephane Eranian Cc: Alexander Shishkin Cc: "Namhyung Kim" Cc: "H. Peter Anvin" Link: https://lkml.kernel.org/r/20190826195730.30614-1-kim.phillips@amd.com arch/x86/events/amd/ibs.c | 13 ++++++++++--- arch/x86/include/asm/perf_event.h | 12 ++++++++---- 2 files changed, 18 insertions(+), 7 deletions(-) commit 44d3bbb6f5e501b873218142fe08cdf62a4ac1f3 Author: Josh Hunt Date: Mon Aug 19 19:13:31 2019 -0400 perf/x86/intel: Restrict period on Nehalem We see our Nehalem machines reporting 'perfevents: irq loop stuck!' in some cases when using perf: perfevents: irq loop stuck! WARNING: CPU: 0 PID: 3485 at arch/x86/events/intel/core.c:2282 intel_pmu_handle_irq+0x37b/0x530 ... RIP: 0010:intel_pmu_handle_irq+0x37b/0x530 ... Call Trace: ? perf_event_nmi_handler+0x2e/0x50 ? intel_pmu_save_and_restart+0x50/0x50 perf_event_nmi_handler+0x2e/0x50 nmi_handle+0x6e/0x120 default_do_nmi+0x3e/0x100 do_nmi+0x102/0x160 end_repeat_nmi+0x16/0x50 ... ? native_write_msr+0x6/0x20 ? native_write_msr+0x6/0x20 intel_pmu_enable_event+0x1ce/0x1f0 x86_pmu_start+0x78/0xa0 x86_pmu_enable+0x252/0x310 __perf_event_task_sched_in+0x181/0x190 ? __switch_to_asm+0x41/0x70 ? __switch_to_asm+0x35/0x70 ? __switch_to_asm+0x41/0x70 ? __switch_to_asm+0x35/0x70 finish_task_switch+0x158/0x260 __schedule+0x2f6/0x840 ? hrtimer_start_range_ns+0x153/0x210 schedule+0x32/0x80 schedule_hrtimeout_range_clock+0x8a/0x100 ? hrtimer_init+0x120/0x120 ep_poll+0x2f7/0x3a0 ? wake_up_q+0x60/0x60 do_epoll_wait+0xa9/0xc0 __x64_sys_epoll_wait+0x1a/0x20 do_syscall_64+0x4e/0x110 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7fdeb1e96c03 ... Signed-off-by: Peter Zijlstra (Intel) Cc: acme@kernel.org Cc: Josh Hunt Cc: bpuranda@akamai.com Cc: mingo@redhat.com Cc: jolsa@redhat.com Cc: tglx@linutronix.de Cc: namhyung@kernel.org Cc: alexander.shishkin@linux.intel.com Link: https://lkml.kernel.org/r/1566256411-18820-1-git-send-email-johunt@akamai.com arch/x86/events/intel/core.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 89781d0806c2c4f29072d3f00cb2dd4274aabc3d Author: Takashi Iwai Date: Fri Aug 30 12:03:38 2019 +0200 ALSA: hda/realtek - Fix overridden device-specific initialization The recent change to shuffle the codec initialization procedure for Realtek via commit 607ca3bd220f ("ALSA: hda/realtek - EAPD turn on later") caused the silent output on some machines. This change was supposed to be safe, but it isn't actually; some devices have quirk setups to override the EAPD via COEF or BTL in the additional verb table, which is applied at the beginning of snd_hda_gen_init(). And this EAPD setup is again overridden in alc_auto_init_amp(). For recovering from the regression, tell snd_hda_gen_init() not to apply the verbs there by a new flag, then apply the verbs in alc_init(). BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=204727 Fixes: 607ca3bd220f ("ALSA: hda/realtek - EAPD turn on later") Cc: Signed-off-by: Takashi Iwai sound/pci/hda/hda_generic.c | 3 ++- sound/pci/hda/hda_generic.h | 1 + sound/pci/hda/patch_realtek.c | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) commit 424c38a4e32509ae82dc9d7300432295806cb911 Author: Maxime Ripard Date: Tue Aug 27 13:58:50 2019 +0200 drm/selftests: modes: Add more unit tests for the cmdline parser Let's add some unit tests for the recent bugs we just fixed. Signed-off-by: Maxime Ripard Tested-by: Thomas Graichen Reviewed-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20190827115850.25731-4-mripard@kernel.org drivers/gpu/drm/selftests/drm_cmdline_selftests.h | 7 ++ .../gpu/drm/selftests/test-drm_cmdline_parser.c | 130 +++++++++++++++++++++ 2 files changed, 137 insertions(+) commit 3764137906a5acece8b5546873a70b1e6263a1a6 Author: Maxime Ripard Date: Tue Aug 27 13:58:49 2019 +0200 drm/modes: Introduce a whitelist for the named modes The named modes support has introduced a number of glitches that were in part due to the fact that the parser will take any string as a named mode. Since we shouldn't have a lot of options there (and they should be pretty standard), let's introduce a whitelist of the available named modes so that the kernel can differentiate between a poorly formed command line and a named mode. Signed-off-by: Maxime Ripard Tested-by: Thomas Graichen Reviewed-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20190827115850.25731-3-mripard@kernel.org drivers/gpu/drm/drm_modes.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 728a257f652aee5dd03ecde90b11f414a255e08b Author: Maxime Ripard Date: Tue Aug 27 13:58:48 2019 +0200 drm/modes: Fix the command line parser to take force options into account The command line parser when it has been rewritten introduced a regression when the only thing on the command line is an option to force the detection of a connector (such as video=HDMI-A-1:d), which are completely valid. It's been further broken by the support for the named modes which take anything that is not a resolution as a named mode. Let's fix this by running the extra command line option parser on the named modes if they only take a single character. Fixes: e08ab74bd4c7 ("drm/modes: Rewrite the command line parser") Reported-by: Jernej Škrabec Reported-by: Thomas Graichen Signed-off-by: Maxime Ripard Tested-by: Thomas Graichen Reviewed-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20190827115850.25731-2-mripard@kernel.org drivers/gpu/drm/drm_modes.c | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) commit 325d0ab3a1d1ad8b8c4f9f03fd866e55b0e24254 Author: Maxime Ripard Date: Tue Aug 27 13:58:47 2019 +0200 drm/modes: Add a switch to differentiate free standing options Some extra command line options can be either specified without anything else on the command line (basically all the force connection options), but some other are only relevant when matched with a resolution (margin and interlace). Let's add a switch to restrict if needed the available option set. Fixes: e08ab74bd4c7 ("drm/modes: Rewrite the command line parser") Signed-off-by: Maxime Ripard Tested-by: Thomas Graichen Reviewed-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20190827115850.25731-1-mripard@kernel.org drivers/gpu/drm/drm_modes.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit e73a3896eaca95ea5fc895720502a3f040eb4b39 Author: Masahiro Yamada Date: Thu Aug 29 19:49:26 2019 +0900 mmc: sdhci-cadence: enable v4_mode to fix ADMA 64-bit addressing The IP datasheet says this controller is compatible with SD Host Specification Version v4.00. As it turned out, the ADMA of this IP does not work with 64-bit mode when it is in the Version 3.00 compatible mode; it understands the old 64-bit descriptor table (as defined in SDHCI v2), but the ADMA System Address Register (SDHCI_ADMA_ADDRESS) cannot point to the 64-bit address. I noticed this issue only after commit bd2e75633c80 ("dma-contiguous: use fallback alloc_pages for single pages"). Prior to that commit, dma_set_mask_and_coherent() returned the dma address that fits in 32-bit range, at least for the default arm64 configuration (arch/arm64/configs/defconfig). Now the host->adma_addr exceeds the 32-bit limit, causing the real problem for the Socionext SoCs. (As a side-note, I was also able to reproduce the issue for older kernels by turning off CONFIG_DMA_CMA.) Call sdhci_enable_v4_mode() to fix this. Cc: # v4.20+ Signed-off-by: Masahiro Yamada Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-cadence.c | 1 + 1 file changed, 1 insertion(+) commit 2f765c175e1d1acae911f889e71e5933c6488929 Author: Chunyan Zhang Date: Wed Aug 28 10:17:36 2019 +0800 mmc: sdhci-sprd: clear the UHS-I modes read from registers sprd's sd host controller supports SDR50/SDR104/DDR50 though, the UHS-I mode used by the specific card can be selected via devicetree only. Fixes: fb8bd90f83c4 ("mmc: sdhci-sprd: Add Spreadtrum's initial host controller") Signed-off-by: Chunyan Zhang Signed-off-by: Chunyan Zhang Reviewed-by: Baolin Wang Tested-by: Baolin Wang Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-sprd.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 4324e54bbea0107b054336f20075a26939b2bd51 Author: Chunyan Zhang Date: Wed Aug 28 10:17:35 2019 +0800 mms: sdhci-sprd: add SDHCI_QUIRK_BROKEN_CARD_DETECTION sprd's sd host controller doesn't support detection to card insert or remove. Fixes: fb8bd90f83c4 ("mmc: sdhci-sprd: Add Spreadtrum's initial host controller") Signed-off-by: Chunyan Zhang Signed-off-by: Chunyan Zhang Reviewed-by: Baolin Wang Tested-by: Baolin Wang Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-sprd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6a526f66ab1494b63c71cd6639d9d96fd7216add Author: Chunyan Zhang Date: Wed Aug 28 10:17:34 2019 +0800 mmc: sdhci-sprd: add SDHCI_QUIRK2_PRESET_VALUE_BROKEN The bit of PRESET_VAL_ENABLE in HOST_CONTROL2 register is reserved on sprd's sd host controller, set quirk2 to disable configuring this. Fixes: fb8bd90f83c4 ("mmc: sdhci-sprd: Add Spreadtrum's initial host controller") Signed-off-by: Chunyan Zhang Signed-off-by: Chunyan Zhang Reviewed-by: Baolin Wang Tested-by: Baolin Wang Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-sprd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4eae8cbdff942a423926486be4e781a77d619966 Author: Chunyan Zhang Date: Wed Aug 28 10:17:33 2019 +0800 mmc: sdhci-sprd: add get_ro hook function sprd's sd host controller doesn't support write protect to sd card. Fixes: fb8bd90f83c4 ("mmc: sdhci-sprd: Add Spreadtrum's initial host controller") Signed-off-by: Chunyan Zhang Signed-off-by: Chunyan Zhang Reviewed-by: Baolin Wang Tested-by: Baolin Wang Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-sprd.c | 6 ++++++ 1 file changed, 6 insertions(+) commit efdaf27517a892238e0dfa046cd91184b039d681 Author: Chunyan Zhang Date: Wed Aug 28 10:17:32 2019 +0800 mmc: sdhci-sprd: fixed incorrect clock divider The register SDHCI_CLOCK_CONTROL should be cleared before config clock divider, otherwise the frequency configured maybe lower than we expected. Fixes: fb8bd90f83c4 ("mmc: sdhci-sprd: Add Spreadtrum's initial host controller") Signed-off-by: Chunyan Zhang Signed-off-by: Chunyan Zhang Reviewed-by: Baolin Wang Tested-by: Baolin Wang Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-sprd.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 72741084d903e65e121c27bd29494d941729d4a1 Author: Ulf Hansson Date: Tue Aug 27 10:10:43 2019 +0200 mmc: core: Fix init of SD cards reporting an invalid VDD range The OCR register defines the supported range of VDD voltages for SD cards. However, it has turned out that some SD cards reports an invalid voltage range, for example having bit7 set. When a host supports MMC_CAP2_FULL_PWR_CYCLE and some of the voltages from the invalid VDD range, this triggers the core to run a power cycle of the card to try to initialize it at the lowest common supported voltage. Obviously this fails, since the card can't support it. Let's fix this problem, by clearing invalid bits from the read OCR register for SD cards, before proceeding with the VDD voltage negotiation. Cc: stable@vger.kernel.org Reported-by: Philip Langdale Signed-off-by: Ulf Hansson Reviewed-by: Philip Langdale Tested-by: Philip Langdale Tested-by: Manuel Presnitz drivers/mmc/core/sd.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 1c0d63eb0e824cb2916a77523ec7a4fa0e9753c8 Merge: c3dd029cc001 32f0a982650b Author: Dave Airlie Date: Fri Aug 30 10:53:53 2019 +1000 Merge tag 'drm-intel-fixes-2019-08-29' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes drm/i915 fixes for v5.3-rc7: - Fix DP MST max BPC property creation after DRM register - Fix unused ggtt deballooning and NULL dereference in guest - Fix DSC eDP transcoder identification - Fix WARN from DMA API debug by setting DMA max segment size Signed-off-by: Dave Airlie From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87a7bseati.fsf@intel.com commit c3dd029cc001b0a81242a07a8ab1a47bda5402b5 Merge: db26d53c7d6a 41940ff50f6c Author: Dave Airlie Date: Fri Aug 30 10:52:06 2019 +1000 Merge tag 'drm-fixes-5.3-2019-08-28' of git://people.freedesktop.org/~agd5f/linux into drm-fixes drm-fixes-5.3-2019-08-28: amdgpu: - Fix GFXOFF regression for PCO and RV2 - Fix missing fence reference - Fix VG20 power readings on certain SMU firmware versions - Fix dpm level setup for VG20 - Add an ATPX laptop quirk Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20190829022925.32678-1-alexander.deucher@amd.com commit 26538100499460ee81546a0dc8d6f14f5151d427 Merge: 4a64489cf8e2 36e337744c0d Author: Linus Torvalds Date: Thu Aug 29 17:51:23 2019 -0700 Merge tag '5.3-rc6-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "A few small SMB3 fixes, and a larger one to fix various older string handling functions" * tag '5.3-rc6-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6: cifs: update internal module number cifs: replace various strncpy with strscpy and similar cifs: Use kzfree() to zero out the password cifs: set domainName when a domain-key is used in multiuser commit daf1de9078792a4d60e36aa7ecf3aadca65277c2 Author: wenxu Date: Wed Aug 28 23:02:33 2019 +0800 netfilter: nft_meta_bridge: Fix get NFT_META_BRI_IIFVPROTO in network byteorder Get the vlan_proto of ingress bridge in network byteorder as userspace expects. Otherwise this is inconsistent with NFT_META_PROTOCOL. Fixes: 2a3a93ef0ba5 ("netfilter: nft_meta_bridge: Add NFT_META_BRI_IIFVPROTO support") Signed-off-by: wenxu Signed-off-by: Pablo Neira Ayuso net/bridge/netfilter/nft_meta_bridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit db26d53c7d6a7cf468e4605a1e5b948dfa52d441 Merge: a55aa89aab90 6978bce05424 Author: Dave Airlie Date: Fri Aug 30 10:40:54 2019 +1000 Merge tag 'drm-misc-fixes-2019-08-28' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes drm-misc-fixes for v5.3 (rc7?): - Make qxl reservel the vga ports using vgaargb to prevent switching to vga compatibility mode. - Fix omap port lookup for SDI output - Use virtio_max_dma_size to fix an issue with swiotlb. - Compiler fixes to komeda. - Add missing of_node_get() call in komeda. - Reorder the komeda de-init functions. Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/f187c28b-6279-2c4f-3e53-296ee899133b@linux.intel.com commit 8693265329560af4d1190aaa195ad767a05ceeab Merge: 189308d5823a f8b43c5cf4b6 Author: David S. Miller Date: Thu Aug 29 16:44:15 2019 -0700 Merge tag 'mac80211-for-davem-2019-08-29' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== We have * one fix for a driver as I'm covering for Kalle while he's on vacation * two fixes for eapol-over-nl80211 work ==================== Signed-off-by: David S. Miller commit 0622800d2ebccead42b3a85e255f7d473a36ec99 Author: James Smart Date: Tue Aug 27 14:28:23 2019 -0700 scsi: lpfc: Raise config max for lpfc_fcp_mq_threshold variable Raise the config max for lpfc_fcp_mq_threshold variable to 256. Signed-off-by: Dick Kennedy Signed-off-by: James Smart CC: Hannes Reinecke Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_attr.c | 2 +- drivers/scsi/lpfc/lpfc_sli4.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit c7c06a1532f3fe106687ac82a13492c6a619ff1c Author: Andrew Cooks Date: Fri Aug 2 14:52:46 2019 +0200 i2c: piix4: Fix port selection for AMD Family 16h Model 30h Family 16h Model 30h SMBus controller needs the same port selection fix as described and fixed in commit 0fe16195f891 ("i2c: piix4: Fix SMBus port selection for AMD Family 17h chips") commit 6befa3fde65f ("i2c: piix4: Support alternative port selection register") also fixed the port selection for Hudson2, but unfortunately this is not the exact same device and the AMD naming and PCI Device IDs aren't particularly helpful here. The SMBus port selection register is common to the following Families and models, as documented in AMD's publicly available BIOS and Kernel Developer Guides: 50742 - Family 15h Model 60h-6Fh (PCI_DEVICE_ID_AMD_KERNCZ_SMBUS) 55072 - Family 15h Model 70h-7Fh (PCI_DEVICE_ID_AMD_KERNCZ_SMBUS) 52740 - Family 16h Model 30h-3Fh (PCI_DEVICE_ID_AMD_HUDSON2_SMBUS) The Hudson2 PCI Device ID (PCI_DEVICE_ID_AMD_HUDSON2_SMBUS) is shared between Bolton FCH and Family 16h Model 30h, but the location of the SmBus0Sel port selection bits are different: 51192 - Bolton Register Reference Guide We distinguish between Bolton and Family 16h Model 30h using the PCI Revision ID: Bolton is device 0x780b, revision 0x15 Family 16h Model 30h is device 0x780b, revision 0x1F Family 15h Model 60h and 70h are both device 0x790b, revision 0x4A. The following additional public AMD BKDG documents were checked and do not share the same port selection register: 42301 - Family 15h Model 00h-0Fh doesn't mention any 42300 - Family 15h Model 10h-1Fh doesn't mention any 49125 - Family 15h Model 30h-3Fh doesn't mention any 48751 - Family 16h Model 00h-0Fh uses the previously supported index register SB800_PIIX4_PORT_IDX_ALT at 0x2e Signed-off-by: Andrew Cooks Signed-off-by: Jean Delvare Cc: stable@vger.kernel.org [v4.6+] Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-piix4.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 7af0145067bc429a09ac4047b167c0971c9f0dc7 Author: Thomas Gleixner Date: Thu Aug 29 00:31:34 2019 +0200 x86/mm/cpa: Prevent large page split when ftrace flips RW on kernel text ftrace does not use text_poke() for enabling trace functionality. It uses its own mechanism and flips the whole kernel text to RW and back to RO. The CPA rework removed a loop based check of 4k pages which tried to preserve a large page by checking each 4k page whether the change would actually cover all pages in the large page. This resulted in endless loops for nothing as in testing it turned out that it actually never preserved anything. Of course testing missed to include ftrace, which is the one and only case which benefitted from the 4k loop. As a consequence enabling function tracing or ftrace based kprobes results in a full 4k split of the kernel text, which affects iTLB performance. The kernel RO protection is the only valid case where this can actually preserve large pages. All other static protections (RO data, data NX, PCI, BIOS) are truly static. So a conflict with those protections which results in a split should only ever happen when a change of memory next to a protected region is attempted. But these conflicts are rightfully splitting the large page to preserve the protected regions. In fact a change to the protected regions itself is a bug and is warned about. Add an exception for the static protection check for kernel text RO when the to be changed region spawns a full large page which allows to preserve the large mappings. This also prevents the syslog to be spammed about CPA violations when ftrace is used. The exception needs to be removed once ftrace switched over to text_poke() which avoids the whole issue. Fixes: 585948f4f695 ("x86/mm/cpa: Avoid the 4k pages check completely") Reported-by: Song Liu Signed-off-by: Thomas Gleixner Tested-by: Song Liu Reviewed-by: Song Liu Acked-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/alpine.DEB.2.21.1908282355340.1938@nanos.tec.linutronix.de arch/x86/mm/pageattr.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) commit c486dcd2f1bbdd524a1e0149734b79e4ae329650 Author: Jarkko Nikula Date: Thu Aug 15 16:52:11 2019 +0300 i2c: designware: Synchronize IRQs when unregistering slave client Make sure interrupt handler i2c_dw_irq_handler_slave() has finished before clearing the the dev->slave pointer in i2c_dw_unreg_slave(). There is possibility for a race if i2c_dw_irq_handler_slave() is running on another CPU while clearing the dev->slave pointer. Reported-by: Krzysztof Adamski Reported-by: Wolfram Sang Signed-off-by: Jarkko Nikula Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-slave.c | 1 + 1 file changed, 1 insertion(+) commit 01641b266da33e2cc57b4ea1767ba3e24ce0846b Author: Andy Shevchenko Date: Fri Aug 16 16:17:05 2019 +0300 i2c: i801: Avoid memory leak in check_acpi_smo88xx_device() check_acpi_smo88xx_device() utilizes acpi_get_object_info() which in its turn allocates a buffer. User is responsible to clean allocated resources. The last has been missed in the original code. Fix it here. While here, replace !ACPI_SUCCESS() with ACPI_FAILURE(). Fixes: 19b07cb4a187 ("i2c: i801: Register optional lis3lv02d I2C device on Dell machines") Signed-off-by: Andy Shevchenko Reviewed-by: Pali Rohár Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-i801.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 689f535843ac2633b395cfc494446326d03efab6 Author: Wolfram Sang Date: Mon Aug 19 22:48:25 2019 +0200 i2c: make i2c_unregister_device() ERR_PTR safe We are moving towards returning ERR_PTRs when i2c_new_*_device() calls fail. Make sure its counterpart for unregistering handles ERR_PTRs as well. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang drivers/i2c/i2c-core-base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4a64489cf8e21a17fd6dd88935818ba7307ba996 Merge: 4e73079d39f6 7c9eb2dbd770 Author: Linus Torvalds Date: Thu Aug 29 09:28:25 2019 -0700 Merge tag 'Wimplicit-fallthrough-5.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux Pull fallthrough fixes from Gustavo A. R. Silva: "Fix fall-through warnings on arc and nds32 for multiple configurations" * tag 'Wimplicit-fallthrough-5.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux: nds32: Mark expected switch fall-throughs ARC: unwind: Mark expected switch fall-through commit 4e73079d39f62a5a46fbc30260acb0bd890c28df Merge: 9cf6b756cdf2 dc9cfd269222 Author: Linus Torvalds Date: Thu Aug 29 09:09:44 2019 -0700 Merge tag 'mtd/fixes-for-5.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux Pull mtd fix from Miquel Raynal: "Add a 'depends on' in the core Hyperbus Kconfig entry to avoid build errors" * tag 'mtd/fixes-for-5.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: mtd: hyperbus: fix dependency and build error commit 7c9eb2dbd770b7c9980d5839dd305a70fbc5df67 Author: Gustavo A. R. Silva Date: Tue Aug 27 11:57:07 2019 -0500 nds32: Mark expected switch fall-throughs Mark switch cases where we are expecting to fall through. This patch fixes the following warnings (Building: allmodconfig nds32): include/math-emu/soft-fp.h:124:8: warning: this statement may fall through [-Wimplicit-fallthrough=] arch/nds32/kernel/signal.c:362:20: warning: this statement may fall through [-Wimplicit-fallthrough=] arch/nds32/kernel/signal.c:315:7: warning: this statement may fall through [-Wimplicit-fallthrough=] include/math-emu/op-common.h:417:11: warning: this statement may fall through [-Wimplicit-fallthrough=] include/math-emu/op-common.h:430:11: warning: this statement may fall through [-Wimplicit-fallthrough=] include/math-emu/op-common.h:310:11: warning: this statement may fall through [-Wimplicit-fallthrough=] include/math-emu/op-common.h:320:11: warning: this statement may fall through [-Wimplicit-fallthrough=] include/math-emu/op-common.h:310:11: warning: this statement may fall through [-Wimplicit-fallthrough=] include/math-emu/op-common.h:320:11: warning: this statement may fall through [-Wimplicit-fallthrough=] include/math-emu/soft-fp.h:124:8: warning: this statement may fall through [-Wimplicit-fallthrough=] include/math-emu/op-common.h:417:11: warning: this statement may fall through [-Wimplicit-fallthrough=] include/math-emu/op-common.h:430:11: warning: this statement may fall through [-Wimplicit-fallthrough=] include/math-emu/op-common.h:310:11: warning: this statement may fall through [-Wimplicit-fallthrough=] include/math-emu/op-common.h:320:11: warning: this statement may fall through [-Wimplicit-fallthrough=] include/math-emu/op-common.h:310:11: warning: this statement may fall through [-Wimplicit-fallthrough=] include/math-emu/op-common.h:320:11: warning: this statement may fall through [-Wimplicit-fallthrough=] Reported-by: Michael Ellerman Signed-off-by: Gustavo A. R. Silva arch/nds32/kernel/signal.c | 2 ++ include/math-emu/op-common.h | 5 +++++ 2 files changed, 7 insertions(+) commit 00a0c8451abcea98a7ea4abf583a308a6513d8ba Author: Gustavo A. R. Silva Date: Tue Aug 20 20:26:44 2019 -0500 ARC: unwind: Mark expected switch fall-through Mark switch cases where we are expecting to fall through. This patch fixes the following warnings (Building: haps_hs_defconfig arc): arch/arc/kernel/unwind.c: In function ‘read_pointer’: ./include/linux/compiler.h:328:5: warning: this statement may fall through [-Wimplicit-fallthrough=] do { \ ^ ./include/linux/compiler.h:338:2: note: in expansion of macro ‘__compiletime_assert’ __compiletime_assert(condition, msg, prefix, suffix) ^~~~~~~~~~~~~~~~~~~~ ./include/linux/compiler.h:350:2: note: in expansion of macro ‘_compiletime_assert’ _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__) ^~~~~~~~~~~~~~~~~~~ ./include/linux/build_bug.h:39:37: note: in expansion of macro ‘compiletime_assert’ #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) ^~~~~~~~~~~~~~~~~~ ./include/linux/build_bug.h:50:2: note: in expansion of macro ‘BUILD_BUG_ON_MSG’ BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition) ^~~~~~~~~~~~~~~~ arch/arc/kernel/unwind.c:573:3: note: in expansion of macro ‘BUILD_BUG_ON’ BUILD_BUG_ON(sizeof(u32) != sizeof(value)); ^~~~~~~~~~~~ arch/arc/kernel/unwind.c:575:2: note: here case DW_EH_PE_native: ^~~~ Signed-off-by: Gustavo A. R. Silva arch/arc/kernel/unwind.c | 1 + 1 file changed, 1 insertion(+) commit 7a6c9dbb36a415c5901313fc89871fd19f533656 Author: Geert Uytterhoeven Date: Fri Aug 23 11:03:52 2019 +0200 soc: ixp4xx: Protect IXP4xx SoC drivers by ARCH_IXP4XX || COMPILE_TEST The move of the IXP4xx SoC drivers exposed their config options on all platforms. Fix this by wrapping them inside an ARCH_IXP4XX or COMPILE_TEST block. Link: https://lore.kernel.org/r/20190823090352.12243-1-linus.walleij@linaro.org Fixes: fcf2d8978cd538a5 ("ARM: ixp4xx: Move NPE and QMGR to drivers/soc") Signed-off-by: Geert Uytterhoeven Signed-off-by: Linus Walleij Signed-off-by: Arnd Bergmann drivers/soc/ixp4xx/Kconfig | 4 ++++ 1 file changed, 4 insertions(+) commit 48402892f2ea31376d50d972213b41f2e12f5e6f Merge: 34614c30bf16 e32db73c5aca Author: Arnd Bergmann Date: Thu Aug 29 17:29:08 2019 +0200 Merge tag 'sunxi-fixes-for-5.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/fixes A single patch to change my MAINTAINERS address * tag 'sunxi-fixes-for-5.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: MAINTAINERS: Update my email address Link: https://lore.kernel.org/r/8c04a96b-4a75-4e1f-b3ac-05fe091f251e.lettre@localhost Signed-off-by: Arnd Bergmann commit 34614c30bf16d84392f8cc0173461b99e95a7b75 Merge: 305cd70ec311 10e62b47973b Author: Arnd Bergmann Date: Thu Aug 29 17:23:51 2019 +0200 Merge tag 'hisi-fixes-for-5.3' of git://github.com/hisilicon/linux-hisi into arm/fixes Hisilicon fixes for v5.3-rc - Fixed RCU usage in logical PIO - Added a function to unregister a logical PIO range in logical PIO to support the fixes in the hisi-lpc driver - Fixed and optimized hisi-lpc driver to avoid potential use-after-free and driver unbind crash * tag 'hisi-fixes-for-5.3' of git://github.com/hisilicon/linux-hisi: bus: hisi_lpc: Add .remove method to avoid driver unbind crash bus: hisi_lpc: Unregister logical PIO range to avoid potential use-after-free lib: logic_pio: Add logic_pio_unregister_range() lib: logic_pio: Avoid possible overlap for unregistering regions lib: logic_pio: Fix RCU usage Link: https://lore.kernel.org/r/5D562335.7000902@hisilicon.com Signed-off-by: Arnd Bergmann commit f8b43c5cf4b62a19f2210a0f5367b84e1eff1ab9 Author: Denis Kenzior Date: Tue Aug 27 17:41:20 2019 -0500 mac80211: Correctly set noencrypt for PAE frames The noencrypt flag was intended to be set if the "frame was received unencrypted" according to include/uapi/linux/nl80211.h. However, the current behavior is opposite of this. Cc: stable@vger.kernel.org Fixes: 018f6fbf540d ("mac80211: Send control port frames over nl80211") Signed-off-by: Denis Kenzior Link: https://lore.kernel.org/r/20190827224120.14545-3-denkenz@gmail.com Signed-off-by: Johannes Berg net/mac80211/rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c8a41c6afa27b8c3f61622dfd882b912da9d6721 Author: Denis Kenzior Date: Tue Aug 27 17:41:19 2019 -0500 mac80211: Don't memset RXCB prior to PAE intercept In ieee80211_deliver_skb_to_local_stack intercepts EAPoL frames if mac80211 is configured to do so and forwards the contents over nl80211. During this process some additional data is also forwarded, including whether the frame was received encrypted or not. Unfortunately just prior to the call to ieee80211_deliver_skb_to_local_stack, skb->cb is cleared, resulting in incorrect data being exposed over nl80211. Fixes: 018f6fbf540d ("mac80211: Send control port frames over nl80211") Cc: stable@vger.kernel.org Signed-off-by: Denis Kenzior Link: https://lore.kernel.org/r/20190827224120.14545-2-denkenz@gmail.com Signed-off-by: Johannes Berg net/mac80211/rx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b9500577d361522a3d9f14da8cf41dc1d824904e Author: Luca Coelho Date: Wed Aug 21 20:17:32 2019 +0300 iwlwifi: pcie: handle switching killer Qu B0 NICs to C0 We need to use a different firmware for C0 versions of killer Qu NICs. Add structures for them and handle them in the if block that detects C0 revisions. Additionally, instead of having an inclusive check for QnJ devices, make the selection exclusive, so that switching to QnJ is the exception, not the default. This prevents us from having to add all the non-QnJ cards to an exclusion list. To do so, only go into the QnJ block if the device has an RF ID type HR and HW revision QnJ. Cc: stable@vger.kernel.org # 5.2 Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/20190821171732.2266-1-luca@coelho.fi Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/cfg/22000.c | 24 ++++++++++++++++++++++++ drivers/net/wireless/intel/iwlwifi/iwl-config.h | 2 ++ drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 4 ++++ drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 7 +------ 4 files changed, 31 insertions(+), 6 deletions(-) commit de20900fbe1c4fd36de25a7a5a43223254ecf0d0 Author: Florian Westphal Date: Tue Aug 27 21:23:45 2019 +0200 netfilter: nf_flow_table: clear skb tstamp before xmit If 'fq' qdisc is used and a program has requested timestamps, skb->tstamp needs to be cleared, else fq will treat these as 'transmit time'. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_flow_table_ip.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 333f31436d3db19f4286f8862a00ea1d8d8420a1 Author: Takashi Iwai Date: Thu Aug 29 09:52:02 2019 +0200 ALSA: hda - Fix potential endless loop at applying quirks Since the chained quirks via chained_before flag is applied before the depth check, it may lead to the endless recursive calls, when the chain were set up incorrectly. Fix it by moving the depth check at the beginning of the loop. Fixes: 1f57825077dc ("ALSA: hda - Add chained_before flag to the fixup entry") Cc: Signed-off-by: Takashi Iwai sound/pci/hda/hda_auto_parser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dc9cfd2692225a2164f4f20b7deaf38ca8645de3 Author: Randy Dunlap Date: Tue Aug 13 16:03:13 2019 -0700 mtd: hyperbus: fix dependency and build error lib/devres.c, which implements devm_ioremap_resource(), is only built when CONFIG_HAS_IOMEM is set/enabled, so MTD_HYPERBUS should depend on HAS_IOMEM. Fixes a build error and a Kconfig warning (as seen on UML builds): WARNING: unmet direct dependencies detected for MTD_COMPLEX_MAPPINGS Depends on [n]: MTD [=m] && HAS_IOMEM [=n] Selected by [m]: - MTD_HYPERBUS [=m] && MTD [=m] ERROR: "devm_ioremap_resource" [drivers/mtd/hyperbus/hyperbus-core.ko] undefined! Fixes: dcc7d3446a0f ("mtd: Add support for HyperBus memory devices") Signed-off-by: Randy Dunlap Cc: Vignesh Raghavendra Cc: Miquel Raynal Cc: Geert Uytterhoeven Cc: linux-mtd@lists.infradead.org Acked-by: Vignesh Raghavendra Signed-off-by: Miquel Raynal drivers/mtd/hyperbus/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 807f6c8472da716e29744e1fa35480b08af3e4bc Author: Laurent Pinchart Date: Sat Aug 24 00:23:53 2019 +0300 drm/ingenic: Hardcode panel type to DPI The ingenic driver supports DPI panels only at the moment, so hardcode their type to DPI instead of Unknown. Signed-off-by: Laurent Pinchart Signed-off-by: Paul Cercueil Link: https://patchwork.freedesktop.org/patch/msgid/20190823212353.29369-1-laurent.pinchart@ideasonboard.com # *** extracted tags *** Reviewed-by: Sam Ravnborg drivers/gpu/drm/ingenic/ingenic-drm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 189308d5823a089b56e2299cd96589507dac7319 Author: Takashi Iwai Date: Wed Aug 28 08:31:19 2019 +0200 sky2: Disable MSI on yet another ASUS boards (P6Xxxx) A similar workaround for the suspend/resume problem is needed for yet another ASUS machines, P6X models. Like the previous fix, the BIOS doesn't provide the standard DMI_SYS_* entry, so again DMI_BOARD_* entries are used instead. Reported-and-tested-by: SteveM Signed-off-by: Takashi Iwai Signed-off-by: David S. Miller drivers/net/ethernet/marvell/sky2.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 807e32999567ed0e96e7fbc21a60c863d9718e0d Merge: 80a6a5d62da9 e8024cb483ab Author: David S. Miller Date: Wed Aug 28 16:06:49 2019 -0700 Merge branch 'nfp-flower-fix-bugs-in-merge-tunnel-encap-code' Jakub Kicinski says: ==================== nfp: flower: fix bugs in merge tunnel encap code John says: There are few bugs in the merge encap code that have come to light with recent driver changes. Effectively, flow bind callbacks were being registered twice when using internal ports (new 'busy' code triggers this). There was also an issue with neighbour notifier messages being ignored for internal ports. ==================== Signed-off-by: David S. Miller commit e8024cb483abb2b0290b3ef5e34c736e9de2492f Author: John Hurley Date: Tue Aug 27 22:56:30 2019 -0700 nfp: flower: handle neighbour events on internal ports Recent code changes to NFP allowed the offload of neighbour entries to FW when the next hop device was an internal port. This allows for offload of tunnel encap when the end-point IP address is applied to such a port. Unfortunately, the neighbour event handler still rejects events that are not associated with a repr dev and so the firmware neighbour table may get out of sync for internal ports. Fix this by allowing internal port neighbour events to be correctly processed. Fixes: 45756dfedab5 ("nfp: flower: allow tunnels to output to internal port") Signed-off-by: John Hurley Reviewed-by: Simon Horman Reviewed-by: Jakub Kicinski Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/tunnel_conf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 739d7c5752b255e89ddbb1b0474f3b88ef5cd343 Author: John Hurley Date: Tue Aug 27 22:56:29 2019 -0700 nfp: flower: prevent ingress block binds on internal ports Internal port TC offload is implemented through user-space applications (such as OvS) by adding filters at egress via TC clsact qdiscs. Indirect block offload support in the NFP driver accepts both ingress qdisc binds and egress binds if the device is an internal port. However, clsact sends bind notification for both ingress and egress block binds which can lead to the driver registering multiple callbacks and receiving multiple notifications of new filters. Fix this by rejecting ingress block bind callbacks when the port is internal and only adding filter callbacks for egress binds. Fixes: 4d12ba42787b ("nfp: flower: allow offloading of matches on 'internal' ports") Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/offload.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 80a6a5d62da9ec1a4a949c0f95baa80d7efbfef5 Merge: 092e22e58623 973dc6cfc0e2 Author: David S. Miller Date: Wed Aug 28 16:02:32 2019 -0700 Merge branch 'r8152-fix-side-effect' Hayes Wang says: ==================== r8152: fix side effect v3: Update the commit message for patch #1. v2: Replace patch #2 with "r8152: remove calling netif_napi_del". v1: The commit 0ee1f4734967 ("r8152: napi hangup fix after disconnect") add a check to avoid using napi_disable after netif_napi_del. However, the commit ffa9fec30ca0 ("r8152: set RTL8152_UNPLUG only for real disconnection") let the check useless. Therefore, I revert commit 0ee1f4734967 ("r8152: napi hangup fix after disconnect") first, and add another patch to fix it. ==================== Signed-off-by: David S. Miller commit 973dc6cfc0e2c43ff29ca5645ceaf1ae694ea110 Author: Hayes Wang Date: Wed Aug 28 09:51:42 2019 +0800 r8152: remove calling netif_napi_del Remove unnecessary use of netif_napi_del. This also avoids to call napi_disable() after netif_napi_del(). Signed-off-by: Hayes Wang Signed-off-by: David S. Miller drivers/net/usb/r8152.c | 2 -- 1 file changed, 2 deletions(-) commit 49d4b14113cae1410eb4654ada5b9583bad971c4 Author: Hayes Wang Date: Wed Aug 28 09:51:41 2019 +0800 Revert "r8152: napi hangup fix after disconnect" This reverts commit 0ee1f4734967af8321ecebaf9c74221ace34f2d5. The commit 0ee1f4734967 ("r8152: napi hangup fix after disconnect") adds a check about RTL8152_UNPLUG to determine if calling napi_disable() is invalid in rtl8152_close(), when rtl8152_disconnect() is called. This avoids to use napi_disable() after calling netif_napi_del(). Howver, commit ffa9fec30ca0 ("r8152: set RTL8152_UNPLUG only for real disconnection") causes that RTL8152_UNPLUG is not always set when calling rtl8152_disconnect(). Therefore, I have to revert commit 0ee1f4734967 ("r8152: napi hangup fix after disconnect"), first. And submit another patch to fix it. Signed-off-by: Hayes Wang Signed-off-by: David S. Miller drivers/net/usb/r8152.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 092e22e586236bba106a82113826a68080a03506 Author: Davide Caratti Date: Tue Aug 27 23:18:53 2019 +0200 net/sched: pfifo_fast: fix wrong dereference in pfifo_fast_enqueue Now that 'TCQ_F_CPUSTATS' bit can be cleared, depending on the value of 'TCQ_F_NOLOCK' bit in the parent qdisc, we can't assume anymore that per-cpu counters are there in the error path of skb_array_produce(). Otherwise, the following splat can be seen: Unable to handle kernel paging request at virtual address 0000600dea430008 Mem abort info: ESR = 0x96000005 Exception class = DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 Data abort info: ISV = 0, ISS = 0x00000005 CM = 0, WnR = 0 user pgtable: 64k pages, 48-bit VAs, pgdp = 000000007b97530e [0000600dea430008] pgd=0000000000000000, pud=0000000000000000 Internal error: Oops: 96000005 [#1] SMP [...] pstate: 10000005 (nzcV daif -PAN -UAO) pc : pfifo_fast_enqueue+0x524/0x6e8 lr : pfifo_fast_enqueue+0x46c/0x6e8 sp : ffff800d39376fe0 x29: ffff800d39376fe0 x28: 1ffff001a07d1e40 x27: ffff800d03e8f188 x26: ffff800d03e8f200 x25: 0000000000000062 x24: ffff800d393772f0 x23: 0000000000000000 x22: 0000000000000403 x21: ffff800cca569a00 x20: ffff800d03e8ee00 x19: ffff800cca569a10 x18: 00000000000000bf x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000 x14: ffff1001a726edd0 x13: 1fffe4000276a9a4 x12: 0000000000000000 x11: dfff200000000000 x10: ffff800d03e8f1a0 x9 : 0000000000000003 x8 : 0000000000000000 x7 : 00000000f1f1f1f1 x6 : ffff1001a726edea x5 : ffff800cca56a53c x4 : 1ffff001bf9a8003 x3 : 1ffff001bf9a8003 x2 : 1ffff001a07d1dcb x1 : 0000600dea430000 x0 : 0000600dea430008 Process ping (pid: 6067, stack limit = 0x00000000dc0aa557) Call trace: pfifo_fast_enqueue+0x524/0x6e8 htb_enqueue+0x660/0x10e0 [sch_htb] __dev_queue_xmit+0x123c/0x2de0 dev_queue_xmit+0x24/0x30 ip_finish_output2+0xc48/0x1720 ip_finish_output+0x548/0x9d8 ip_output+0x334/0x788 ip_local_out+0x90/0x138 ip_send_skb+0x44/0x1d0 ip_push_pending_frames+0x5c/0x78 raw_sendmsg+0xed8/0x28d0 inet_sendmsg+0xc4/0x5c0 sock_sendmsg+0xac/0x108 __sys_sendto+0x1ac/0x2a0 __arm64_sys_sendto+0xc4/0x138 el0_svc_handler+0x13c/0x298 el0_svc+0x8/0xc Code: f9402e80 d538d081 91002000 8b010000 (885f7c03) Fix this by testing the value of 'TCQ_F_CPUSTATS' bit in 'qdisc->flags', before dereferencing 'qdisc->cpu_qstats'. Fixes: 8a53e616de29 ("net: sched: when clearing NOLOCK, clear TCQ_F_CPUSTATS, too") CC: Paolo Abeni CC: Stefano Brivio Reported-by: Li Shuang Signed-off-by: Davide Caratti Acked-by: Paolo Abeni Signed-off-by: David S. Miller net/sched/sch_generic.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 888a5c53c0d8be6e98bc85b677f179f77a647873 Author: Willem de Bruijn Date: Tue Aug 27 15:09:33 2019 -0400 tcp: inherit timestamp on mtu probe TCP associates tx timestamp requests with a byte in the bytestream. If merging skbs in tcp_mtu_probe, migrate the tstamp request. Similar to MSG_EOR, do not allow moving a timestamp from any segment in the probe but the last. This to avoid merging multiple timestamps. Tested with the packetdrill script at https://github.com/wdebruij/packetdrill/commits/mtu_probe-1 Link: http://patchwork.ozlabs.org/patch/1143278/#2232897 Fixes: 4ed2d765dfac ("net-timestamp: TCP timestamping") Signed-off-by: Willem de Bruijn Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_output.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit dbf47a2a094edf58983265e323ca4bdcdb58b5ee Author: Vlad Buslov Date: Tue Aug 27 21:49:38 2019 +0300 net: sched: act_sample: fix psample group handling on overwrite Action sample doesn't properly handle psample_group pointer in overwrite case. Following issues need to be fixed: - In tcf_sample_init() function RCU_INIT_POINTER() is used to set s->psample_group, even though we neither setting the pointer to NULL, nor preventing concurrent readers from accessing the pointer in some way. Use rcu_swap_protected() instead to safely reset the pointer. - Old value of s->psample_group is not released or deallocated in any way, which results resource leak. Use psample_group_put() on non-NULL value obtained with rcu_swap_protected(). - The function psample_group_put() that released reference to struct psample_group pointed by rcu-pointer s->psample_group doesn't respect rcu grace period when deallocating it. Extend struct psample_group with rcu head and use kfree_rcu when freeing it. Fixes: 5c5670fae430 ("net/sched: Introduce sample tc action") Signed-off-by: Vlad Buslov Signed-off-by: David S. Miller include/net/psample.h | 1 + net/psample/psample.c | 2 +- net/sched/act_sample.c | 6 +++++- 3 files changed, 7 insertions(+), 2 deletions(-) commit 36f1031c51a2538e5558fb44c6d6b88f98d3c0f2 Author: Thomas Falcon Date: Tue Aug 27 11:10:04 2019 -0500 ibmvnic: Do not process reset during or after device removal Currently, the ibmvnic driver will not schedule device resets if the device is being removed, but does not check the device state before the reset is actually processed. This leads to a race where a reset is scheduled with a valid device state but is processed after the driver has been removed, resulting in an oops. Fix this by checking the device state before processing a queued reset event. Reported-by: Abdul Haleem Tested-by: Abdul Haleem Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 5b3efa4f1479c91cb8361acef55f9c6662feba57 Author: zhaoyang Date: Mon Aug 26 04:07:37 2019 +0100 ARM: 8901/1: add a criteria for pfn_valid of arm pfn_valid can be wrong when parsing a invalid pfn whose phys address exceeds BITS_PER_LONG as the MSB will be trimed when shifted. The issue originally arise from bellowing call stack, which corresponding to an access of the /proc/kpageflags from userspace with a invalid pfn parameter and leads to kernel panic. [46886.723249] c7 [] (stable_page_flags) from [] [46886.723264] c7 [] (kpageflags_read) from [] [46886.723280] c7 [] (proc_reg_read) from [] [46886.723290] c7 [] (__vfs_read) from [] [46886.723301] c7 [] (vfs_read) from [] [46886.723315] c7 [] (SyS_pread64) from [] (ret_fast_syscall+0x0/0x28) Signed-off-by: Zhaoyang Huang Signed-off-by: Russell King arch/arm/mm/init.c | 5 +++++ 1 file changed, 5 insertions(+) commit a256f2e329df0773022d28df2c3d206b9aaf1e61 Author: Anup Patel Date: Mon Aug 19 05:14:23 2019 +0000 RISC-V: Fix FIXMAP area corruption on RV32 systems Currently, various virtual memory areas of Linux RISC-V are organized in increasing order of their virtual addresses is as follows: 1. User space area (This is lowest area and starts at 0x0) 2. FIXMAP area 3. VMALLOC area 4. Kernel area (This is highest area and starts at PAGE_OFFSET) The maximum size of user space aread is represented by TASK_SIZE. On RV32 systems, TASK_SIZE is defined as VMALLOC_START which causes the user space area to overlap the FIXMAP area. This allows user space apps to potentially corrupt the FIXMAP area and kernel OF APIs will crash whenever they access corrupted FDT in the FIXMAP area. On RV64 systems, TASK_SIZE is set to fixed 256GB and no other areas happen to overlap so we don't see any FIXMAP area corruptions. This patch fixes FIXMAP area corruption on RV32 systems by setting TASK_SIZE to FIXADDR_START. We also move FIXADDR_TOP, FIXADDR_SIZE, and FIXADDR_START defines to asm/pgtable.h so that we can avoid cyclic header includes. Signed-off-by: Anup Patel Tested-by: Alistair Francis Reviewed-by: Christoph Hellwig Signed-off-by: Paul Walmsley arch/riscv/include/asm/fixmap.h | 4 ---- arch/riscv/include/asm/pgtable.h | 12 ++++++++++-- 2 files changed, 10 insertions(+), 6 deletions(-) commit 0754b4e8cdf3eec6e4122e79af26ed9bab20f8f8 Author: Justin Pettit Date: Tue Aug 27 07:58:10 2019 -0700 openvswitch: Clear the L4 portion of the key for "later" fragments. Only the first fragment in a datagram contains the L4 headers. When the Open vSwitch module parses a packet, it always sets the IP protocol field in the key, but can only set the L4 fields on the first fragment. The original behavior would not clear the L4 portion of the key, so garbage values would be sent in the key for "later" fragments. This patch clears the L4 fields in that circumstance to prevent sending those garbage values as part of the upcall. Signed-off-by: Justin Pettit Acked-by: Pravin B Shelar Signed-off-by: David S. Miller net/openvswitch/flow.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit ad06a566e118e57b852cab5933dbbbaebb141de3 Author: Greg Rose Date: Tue Aug 27 07:58:09 2019 -0700 openvswitch: Properly set L4 keys on "later" IP fragments When IP fragments are reassembled before being sent to conntrack, the key from the last fragment is used. Unless there are reordering issues, the last fragment received will not contain the L4 ports, so the key for the reassembled datagram won't contain them. This patch updates the key once we have a reassembled datagram. The handle_fragments() function works on L3 headers so we pull the L3/L4 flow key update code from key_extract into a new function 'key_extract_l3l4'. Then we add a another new function ovs_flow_key_update_l3l4() and export it so that it is accessible by handle_fragments() for conntrack packet reassembly. Co-authored-by: Justin Pettit Signed-off-by: Greg Rose Acked-by: Pravin B Shelar Signed-off-by: David S. Miller net/openvswitch/conntrack.c | 5 ++ net/openvswitch/flow.c | 155 +++++++++++++++++++++++++------------------- net/openvswitch/flow.h | 1 + 3 files changed, 95 insertions(+), 66 deletions(-) commit a84d016479896b5526a2cc54784e6ffc41c9d6f6 Author: Eric Dumazet Date: Tue Aug 27 03:33:12 2019 -0700 mld: fix memory leak in mld_del_delrec() Similar to the fix done for IPv4 in commit e5b1c6c6277d ("igmp: fix memory leak in igmpv3_del_delrec()"), we need to make sure mca_tomb and mca_sources are not blindly overwritten. Using swap() then a call to ip6_mc_clear_src() will take care of the missing free. BUG: memory leak unreferenced object 0xffff888117d9db00 (size 64): comm "syz-executor247", pid 6918, jiffies 4294943989 (age 25.350s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 fe 88 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<000000005b463030>] kmemleak_alloc_recursive include/linux/kmemleak.h:43 [inline] [<000000005b463030>] slab_post_alloc_hook mm/slab.h:522 [inline] [<000000005b463030>] slab_alloc mm/slab.c:3319 [inline] [<000000005b463030>] kmem_cache_alloc_trace+0x145/0x2c0 mm/slab.c:3548 [<00000000939cbf94>] kmalloc include/linux/slab.h:552 [inline] [<00000000939cbf94>] kzalloc include/linux/slab.h:748 [inline] [<00000000939cbf94>] ip6_mc_add1_src net/ipv6/mcast.c:2236 [inline] [<00000000939cbf94>] ip6_mc_add_src+0x31f/0x420 net/ipv6/mcast.c:2356 [<00000000d8972221>] ip6_mc_source+0x4a8/0x600 net/ipv6/mcast.c:449 [<000000002b203d0d>] do_ipv6_setsockopt.isra.0+0x1b92/0x1dd0 net/ipv6/ipv6_sockglue.c:748 [<000000001f1e2d54>] ipv6_setsockopt+0x89/0xd0 net/ipv6/ipv6_sockglue.c:944 [<00000000c8f7bdf9>] udpv6_setsockopt+0x4e/0x90 net/ipv6/udp.c:1558 [<000000005a9a0c5e>] sock_common_setsockopt+0x38/0x50 net/core/sock.c:3139 [<00000000910b37b2>] __sys_setsockopt+0x10f/0x220 net/socket.c:2084 [<00000000e9108023>] __do_sys_setsockopt net/socket.c:2100 [inline] [<00000000e9108023>] __se_sys_setsockopt net/socket.c:2097 [inline] [<00000000e9108023>] __x64_sys_setsockopt+0x26/0x30 net/socket.c:2097 [<00000000f4818160>] do_syscall_64+0x76/0x1a0 arch/x86/entry/common.c:296 [<000000008d367e8f>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: 1666d49e1d41 ("mld: do not remove mld souce list info when set link down") Fixes: 9c8bb163ae78 ("igmp, mld: Fix memory leak in igmpv3/mld_del_delrec()") Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David S. Miller net/ipv6/mcast.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 04d37cf46a773910f75fefaa9f9488f42bfe1fe2 Author: Davide Caratti Date: Tue Aug 27 12:29:09 2019 +0200 net/sched: pfifo_fast: fix wrong dereference when qdisc is reset Now that 'TCQ_F_CPUSTATS' bit can be cleared, depending on the value of 'TCQ_F_NOLOCK' bit in the parent qdisc, we need to be sure that per-cpu counters are present when 'reset()' is called for pfifo_fast qdiscs. Otherwise, the following script: # tc q a dev lo handle 1: root htb default 100 # tc c a dev lo parent 1: classid 1:100 htb \ > rate 95Mbit ceil 100Mbit burst 64k [...] # tc f a dev lo parent 1: protocol arp basic classid 1:100 [...] # tc q a dev lo parent 1:100 handle 100: pfifo_fast [...] # tc q d dev lo root can generate the following splat: Unable to handle kernel paging request at virtual address dfff2c01bd148000 Mem abort info: ESR = 0x96000004 Exception class = DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 Data abort info: ISV = 0, ISS = 0x00000004 CM = 0, WnR = 0 [dfff2c01bd148000] address between user and kernel address ranges Internal error: Oops: 96000004 [#1] SMP [...] pstate: 80000005 (Nzcv daif -PAN -UAO) pc : pfifo_fast_reset+0x280/0x4d8 lr : pfifo_fast_reset+0x21c/0x4d8 sp : ffff800d09676fa0 x29: ffff800d09676fa0 x28: ffff200012ee22e4 x27: dfff200000000000 x26: 0000000000000000 x25: ffff800ca0799958 x24: ffff1001940f332b x23: 0000000000000007 x22: ffff200012ee1ab8 x21: 0000600de8a40000 x20: 0000000000000000 x19: ffff800ca0799900 x18: 0000000000000000 x17: 0000000000000002 x16: 0000000000000000 x15: 0000000000000000 x14: 0000000000000000 x13: 0000000000000000 x12: ffff1001b922e6e2 x11: 1ffff001b922e6e1 x10: 0000000000000000 x9 : 1ffff001b922e6e1 x8 : dfff200000000000 x7 : 0000000000000000 x6 : 0000000000000000 x5 : 1fffe400025dc45c x4 : 1fffe400025dc357 x3 : 00000c01bd148000 x2 : 0000600de8a40000 x1 : 0000000000000007 x0 : 0000600de8a40004 Call trace: pfifo_fast_reset+0x280/0x4d8 qdisc_reset+0x6c/0x370 htb_reset+0x150/0x3b8 [sch_htb] qdisc_reset+0x6c/0x370 dev_deactivate_queue.constprop.5+0xe0/0x1a8 dev_deactivate_many+0xd8/0x908 dev_deactivate+0xe4/0x190 qdisc_graft+0x88c/0xbd0 tc_get_qdisc+0x418/0x8a8 rtnetlink_rcv_msg+0x3a8/0xa78 netlink_rcv_skb+0x18c/0x328 rtnetlink_rcv+0x28/0x38 netlink_unicast+0x3c4/0x538 netlink_sendmsg+0x538/0x9a0 sock_sendmsg+0xac/0xf8 ___sys_sendmsg+0x53c/0x658 __sys_sendmsg+0xc8/0x140 __arm64_sys_sendmsg+0x74/0xa8 el0_svc_handler+0x164/0x468 el0_svc+0x10/0x14 Code: 910012a0 92400801 d343fc03 11000c21 (38fb6863) Fix this by testing the value of 'TCQ_F_CPUSTATS' bit in 'qdisc->flags', before dereferencing 'qdisc->cpu_qstats'. Changes since v1: - coding style improvements, thanks to Stefano Brivio Fixes: 8a53e616de29 ("net: sched: when clearing NOLOCK, clear TCQ_F_CPUSTATS, too") CC: Paolo Abeni Reported-by: Li Shuang Signed-off-by: Davide Caratti Acked-by: Paolo Abeni Reviewed-by: Stefano Brivio Signed-off-by: David S. Miller net/sched/sch_generic.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 2965daa3342cf1e170969c6423efff370f11dfa1 Merge: fdfc5c8594c2 6342ea886771 Author: David S. Miller Date: Wed Aug 28 14:05:48 2019 -0700 Merge branch 'macb-Update-ethernet-compatible-string-for-SiFive-FU540' Yash Shah says: ==================== macb: Update ethernet compatible string for SiFive FU540 This patch series renames the compatible property to a more appropriate string. The patchset is based on Linux-5.3-rc6 and tested on SiFive Unleashed board Change history: Since v1: - Dropped PATCH3 because it's already merged - Change the reference url in the patch descriptions to point to a 'lore.kernel.org' link instead of 'lkml.org' ==================== Signed-off-by: David S. Miller commit 6342ea886771d65d718d07049c75b25b27e60cfd Author: Yash Shah Date: Tue Aug 27 10:36:04 2019 +0530 macb: Update compatibility string for SiFive FU540-C000 Update the compatibility string for SiFive FU540-C000 as per the new string updated in the binding doc. Reference: https://lore.kernel.org/netdev/CAJ2_jOFEVZQat0Yprg4hem4jRrqkB72FKSeQj4p8P5KA-+rgww@mail.gmail.com/ Signed-off-by: Yash Shah Acked-by: Nicolas Ferre Reviewed-by: Paul Walmsley Tested-by: Paul Walmsley Signed-off-by: David S. Miller drivers/net/ethernet/cadence/macb_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit abecec415dc2b5a5d11fe1b17963564b13f2ff20 Author: Yash Shah Date: Tue Aug 27 10:36:03 2019 +0530 macb: bindings doc: update sifive fu540-c000 binding As per the discussion with Nicolas Ferre[0], rename the compatible property to a more appropriate and specific string. [0] https://lore.kernel.org/netdev/CAJ2_jOFEVZQat0Yprg4hem4jRrqkB72FKSeQj4p8P5KA-+rgww@mail.gmail.com/ Signed-off-by: Yash Shah Acked-by: Nicolas Ferre Reviewed-by: Paul Walmsley Reviewed-by: Rob Herring Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/macb.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8919dfcb31161fae7d607bbef5247e5e82fd6457 Author: Eddie James Date: Tue Aug 27 12:12:49 2019 +0800 fsi: scom: Don't abort operations for minor errors The scom driver currently fails out of operations if certain system errors are flagged in the status register; system checkstop, special attention, or recoverable error. These errors won't impact the ability of the scom engine to perform operations, so the driver should continue under these conditions. Also, don't do a PIB reset for these conditions, since it won't help. Fixes: 6b293258cded ("fsi: scom: Major overhaul") Signed-off-by: Eddie James Cc: stable Acked-by: Jeremy Kerr Acked-by: Benjamin Herrenschmidt Signed-off-by: Joel Stanley Link: https://lore.kernel.org/r/20190827041249.13381-1-jk@ozlabs.org Signed-off-by: Greg Kroah-Hartman drivers/fsi/fsi-scom.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 468e0ffac803f5557a62a33b72ef8844d1bfdc08 Author: Nadav Amit Date: Tue Aug 20 09:01:21 2019 -0700 vmw_balloon: Fix offline page marking with compaction The compaction code already marks pages as offline when it enqueues pages in the ballooned page list, and removes the mapping when the pages are removed from the list. VMware balloon also updates the flags, instead of letting the balloon-compaction logic handle it, which causes the assertion VM_BUG_ON_PAGE(!PageOffline(page)) to fire, when __ClearPageOffline is called the second time. This causes the following crash. [ 487.104520] kernel BUG at include/linux/page-flags.h:749! [ 487.106364] invalid opcode: 0000 [#1] SMP DEBUG_PAGEALLOC PTI [ 487.107681] CPU: 7 PID: 1106 Comm: kworker/7:3 Not tainted 5.3.0-rc5balloon #227 [ 487.109196] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 12/12/2018 [ 487.111452] Workqueue: events_freezable vmballoon_work [vmw_balloon] [ 487.112779] RIP: 0010:vmballoon_release_page_list+0xaa/0x100 [vmw_balloon] [ 487.114200] Code: fe 48 c1 e7 06 4c 01 c7 8b 47 30 41 89 c1 41 81 e1 00 01 00 f0 41 81 f9 00 00 00 f0 74 d3 48 c7 c6 08 a1 a1 c0 e8 06 0d e7 ea <0f> 0b 44 89 f6 4c 89 c7 e8 49 9c e9 ea 49 8d 75 08 49 8b 45 08 4d [ 487.118033] RSP: 0018:ffffb82f012bbc98 EFLAGS: 00010246 [ 487.119135] RAX: 0000000000000037 RBX: 0000000000000001 RCX: 0000000000000006 [ 487.120601] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff9a85b6bd7620 [ 487.122071] RBP: ffffb82f012bbcc0 R08: 0000000000000001 R09: 0000000000000000 [ 487.123536] R10: 0000000000000000 R11: 0000000000000000 R12: ffffb82f012bbd00 [ 487.125002] R13: ffffe97f4598d9c0 R14: 0000000000000000 R15: ffffb82f012bbd34 [ 487.126463] FS: 0000000000000000(0000) GS:ffff9a85b6bc0000(0000) knlGS:0000000000000000 [ 487.128110] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 487.129316] CR2: 00007ffe6e413ea0 CR3: 0000000230b18001 CR4: 00000000003606e0 [ 487.130812] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 487.132283] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 487.133749] Call Trace: [ 487.134333] vmballoon_deflate+0x22c/0x390 [vmw_balloon] [ 487.135468] vmballoon_work+0x6e7/0x913 [vmw_balloon] [ 487.136711] ? process_one_work+0x21a/0x5e0 [ 487.138581] process_one_work+0x298/0x5e0 [ 487.139926] ? vmballoon_migratepage+0x310/0x310 [vmw_balloon] [ 487.141610] ? process_one_work+0x298/0x5e0 [ 487.143053] worker_thread+0x41/0x400 [ 487.144389] kthread+0x12b/0x150 [ 487.145582] ? process_one_work+0x5e0/0x5e0 [ 487.146937] ? kthread_create_on_node+0x60/0x60 [ 487.148637] ret_from_fork+0x3a/0x50 Fix it by updating the PageOffline indication only when a 2MB page is enqueued and dequeued. The 4KB pages will be handled correctly by the balloon compaction logic. Fixes: 83a8afa72e9c ("vmw_balloon: Compaction support") Cc: David Hildenbrand Reported-by: Thomas Hellstrom Signed-off-by: Nadav Amit Link: https://lore.kernel.org/r/20190820160121.452-1-namit@vmware.com Signed-off-by: Greg Kroah-Hartman drivers/misc/vmw_balloon.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit ba03a9bbd17b149c373c0ea44017f35fc2cd0f28 Author: Nadav Amit Date: Tue Aug 20 13:26:38 2019 -0700 VMCI: Release resource if the work is already queued Francois reported that VMware balloon gets stuck after a balloon reset, when the VMCI doorbell is removed. A similar error can occur when the balloon driver is removed with the following splat: [ 1088.622000] INFO: task modprobe:3565 blocked for more than 120 seconds. [ 1088.622035] Tainted: G W 5.2.0 #4 [ 1088.622087] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 1088.622205] modprobe D 0 3565 1450 0x00000000 [ 1088.622210] Call Trace: [ 1088.622246] __schedule+0x2a8/0x690 [ 1088.622248] schedule+0x2d/0x90 [ 1088.622250] schedule_timeout+0x1d3/0x2f0 [ 1088.622252] wait_for_completion+0xba/0x140 [ 1088.622320] ? wake_up_q+0x80/0x80 [ 1088.622370] vmci_resource_remove+0xb9/0xc0 [vmw_vmci] [ 1088.622373] vmci_doorbell_destroy+0x9e/0xd0 [vmw_vmci] [ 1088.622379] vmballoon_vmci_cleanup+0x6e/0xf0 [vmw_balloon] [ 1088.622381] vmballoon_exit+0x18/0xcc8 [vmw_balloon] [ 1088.622394] __x64_sys_delete_module+0x146/0x280 [ 1088.622408] do_syscall_64+0x5a/0x130 [ 1088.622410] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 1088.622415] RIP: 0033:0x7f54f62791b7 [ 1088.622421] Code: Bad RIP value. [ 1088.622421] RSP: 002b:00007fff2a949008 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0 [ 1088.622426] RAX: ffffffffffffffda RBX: 000055dff8b55d00 RCX: 00007f54f62791b7 [ 1088.622426] RDX: 0000000000000000 RSI: 0000000000000800 RDI: 000055dff8b55d68 [ 1088.622427] RBP: 000055dff8b55d00 R08: 00007fff2a947fb1 R09: 0000000000000000 [ 1088.622427] R10: 00007f54f62f5cc0 R11: 0000000000000206 R12: 000055dff8b55d68 [ 1088.622428] R13: 0000000000000001 R14: 000055dff8b55d68 R15: 00007fff2a94a3f0 The cause for the bug is that when the "delayed" doorbell is invoked, it takes a reference on the doorbell entry and schedules work that is supposed to run the appropriate code and drop the doorbell entry reference. The code ignores the fact that if the work is already queued, it will not be scheduled to run one more time. As a result one of the references would not be dropped. When the code waits for the reference to get to zero, during balloon reset or module removal, it gets stuck. Fix it. Drop the reference if schedule_work() indicates that the work is already queued. Note that this bug got more apparent (or apparent at all) due to commit ce664331b248 ("vmw_balloon: VMCI_DOORBELL_SET does not check status"). Fixes: 83e2ec765be03 ("VMCI: doorbell implementation.") Reported-by: Francois Rigault Cc: Jorgen Hansen Cc: Adit Ranadive Cc: Alexios Zavras Cc: Vishnu DASA Cc: stable@vger.kernel.org Signed-off-by: Nadav Amit Reviewed-by: Vishnu Dasa Link: https://lore.kernel.org/r/20190820202638.49003-1-namit@vmware.com Signed-off-by: Greg Kroah-Hartman drivers/misc/vmw_vmci/vmci_doorbell.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 1426bd2c9f7e3126e2678e7469dca9fd9fc6dd3e Author: Oliver Neukum Date: Tue Aug 27 12:34:36 2019 +0200 USB: cdc-wdm: fix race between write and disconnect due to flag abuse In case of a disconnect an ongoing flush() has to be made fail. Nevertheless we cannot be sure that any pending URB has already finished, so although they will never succeed, they still must not be touched. The clean solution for this is to check for WDM_IN_USE and WDM_DISCONNECTED in flush(). There is no point in ever clearing WDM_IN_USE, as no further writes make sense. The issue is as old as the driver. Fixes: afba937e540c9 ("USB: CDC WDM driver") Reported-by: syzbot+d232cca6ec42c2edb3fc@syzkaller.appspotmail.com Signed-off-by: Oliver Neukum Cc: stable Link: https://lore.kernel.org/r/20190827103436.21143-1-oneukum@suse.com Signed-off-by: Greg Kroah-Hartman drivers/usb/class/cdc-wdm.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 636bd02a7ba9025ff851d0cfb92768c8fa865859 Author: Geert Uytterhoeven Date: Tue Aug 27 14:51:12 2019 +0200 usb: host: xhci: rcar: Fix typo in compatible string matching It's spelled "renesas", not "renensas". Due to this typo, RZ/G1M and RZ/G1N were not covered by the check. Fixes: 2dc240a3308b ("usb: host: xhci: rcar: retire use of xhci_plat_type_is()") Signed-off-by: Geert Uytterhoeven Cc: stable Reviewed-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20190827125112.12192-1-geert+renesas@glider.be Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-rcar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 993cc8753453fccfe060a535bbe21fcf1001b626 Author: Nagarjuna Kristam Date: Wed Aug 28 16:24:57 2019 +0530 usb: host: xhci-tegra: Set DMA mask correctly The Falcon microcontroller that runs the XUSB firmware and which is responsible for exposing the XHCI interface can address only 40 bits of memory. Typically that's not a problem because Tegra devices don't have enough system memory to exceed those 40 bits. However, if the ARM SMMU is enable on Tegra186 and later, the addresses passed to the XUSB controller can be anywhere in the 48-bit IOV address space of the ARM SMMU. Since the DMA/IOMMU API starts allocating from the top of the IOVA space, the Falcon microcontroller is not able to load the firmware successfully. Fix this by setting the DMA mask to 40 bits, which will force the DMA API to map the buffer for the firmware to an IOVA that is addressable by the Falcon. Signed-off-by: Nagarjuna Kristam Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/1566989697-13049-1-git-send-email-nkristam@nvidia.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-tegra.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 1902a01e2bcc3abd7c9a18dc05e78c7ab4a53c54 Author: Kai-Heng Feng Date: Wed Aug 28 01:34:50 2019 +0800 USB: storage: ums-realtek: Whitelist auto-delink support Auto-delink requires writing special registers to ums-realtek devices. Unconditionally enable auto-delink may break newer devices. So only enable auto-delink by default for the original three IDs, 0x0138, 0x0158 and 0x0159. Realtek is working on a patch to properly support auto-delink for other IDs. BugLink: https://bugs.launchpad.net/bugs/1838886 Signed-off-by: Kai-Heng Feng Acked-by: Alan Stern Cc: stable Link: https://lore.kernel.org/r/20190827173450.13572-2-kai.heng.feng@canonical.com Signed-off-by: Greg Kroah-Hartman drivers/usb/storage/realtek_cr.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit f6445b6b2f2bb1745080af4a0926049e8bca2617 Author: Kai-Heng Feng Date: Wed Aug 28 01:34:49 2019 +0800 USB: storage: ums-realtek: Update module parameter description for auto_delink_en The option named "auto_delink_en" is a bit misleading, as setting it to false doesn't really disable auto-delink but let auto-delink be firmware controlled. Update the description to reflect the real usage of this parameter. Signed-off-by: Kai-Heng Feng Cc: stable Link: https://lore.kernel.org/r/20190827173450.13572-1-kai.heng.feng@canonical.com Signed-off-by: Greg Kroah-Hartman drivers/usb/storage/realtek_cr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a349b95d7ca0cea71be4a7dac29830703de7eb62 Author: Yoshihiro Shimoda Date: Tue Aug 27 12:51:50 2019 +0900 usb: host: ohci: fix a race condition between shutdown and irq This patch fixes an issue that the following error is possible to happen when ohci hardware causes an interruption and the system is shutting down at the same time. [ 34.851754] usb 2-1: USB disconnect, device number 2 [ 35.166658] irq 156: nobody cared (try booting with the "irqpoll" option) [ 35.173445] CPU: 0 PID: 22 Comm: kworker/0:1 Not tainted 5.3.0-rc5 #85 [ 35.179964] Hardware name: Renesas Salvator-X 2nd version board based on r8a77965 (DT) [ 35.187886] Workqueue: usb_hub_wq hub_event [ 35.192063] Call trace: [ 35.194509] dump_backtrace+0x0/0x150 [ 35.198165] show_stack+0x14/0x20 [ 35.201475] dump_stack+0xa0/0xc4 [ 35.204785] __report_bad_irq+0x34/0xe8 [ 35.208614] note_interrupt+0x2cc/0x318 [ 35.212446] handle_irq_event_percpu+0x5c/0x88 [ 35.216883] handle_irq_event+0x48/0x78 [ 35.220712] handle_fasteoi_irq+0xb4/0x188 [ 35.224802] generic_handle_irq+0x24/0x38 [ 35.228804] __handle_domain_irq+0x5c/0xb0 [ 35.232893] gic_handle_irq+0x58/0xa8 [ 35.236548] el1_irq+0xb8/0x180 [ 35.239681] __do_softirq+0x94/0x23c [ 35.243253] irq_exit+0xd0/0xd8 [ 35.246387] __handle_domain_irq+0x60/0xb0 [ 35.250475] gic_handle_irq+0x58/0xa8 [ 35.254130] el1_irq+0xb8/0x180 [ 35.257268] kernfs_find_ns+0x5c/0x120 [ 35.261010] kernfs_find_and_get_ns+0x3c/0x60 [ 35.265361] sysfs_unmerge_group+0x20/0x68 [ 35.269454] dpm_sysfs_remove+0x2c/0x68 [ 35.273284] device_del+0x80/0x370 [ 35.276683] hid_destroy_device+0x28/0x60 [ 35.280686] usbhid_disconnect+0x4c/0x80 [ 35.284602] usb_unbind_interface+0x6c/0x268 [ 35.288867] device_release_driver_internal+0xe4/0x1b0 [ 35.293998] device_release_driver+0x14/0x20 [ 35.298261] bus_remove_device+0x110/0x128 [ 35.302350] device_del+0x148/0x370 [ 35.305832] usb_disable_device+0x8c/0x1d0 [ 35.309921] usb_disconnect+0xc8/0x2d0 [ 35.313663] hub_event+0x6e0/0x1128 [ 35.317146] process_one_work+0x1e0/0x320 [ 35.321148] worker_thread+0x40/0x450 [ 35.324805] kthread+0x124/0x128 [ 35.328027] ret_from_fork+0x10/0x18 [ 35.331594] handlers: [ 35.333862] [<0000000079300c1d>] usb_hcd_irq [ 35.338126] [<0000000079300c1d>] usb_hcd_irq [ 35.342389] Disabling IRQ #156 ohci_shutdown() disables all the interrupt and rh_state is set to OHCI_RH_HALTED. In other hand, ohci_irq() is possible to enable OHCI_INTR_SF and OHCI_INTR_MIE on ohci_irq(). Note that OHCI_INTR_SF is possible to be set by start_ed_unlink() which is called: ohci_irq() -> process_done_list() -> takeback_td() -> start_ed_unlink() So, ohci_irq() has the following condition, the issue happens by &ohci->regs->intrenable = OHCI_INTR_MIE | OHCI_INTR_SF and ohci->rh_state = OHCI_RH_HALTED: /* interrupt for some other device? */ if (ints == 0 || unlikely(ohci->rh_state == OHCI_RH_HALTED)) return IRQ_NOTMINE; To fix the issue, ohci_shutdown() holds the spin lock while disabling the interruption and changing the rh_state flag to prevent reenable the OHCI_INTR_MIE unexpectedly. Note that io_watchdog_func() also calls the ohci_shutdown() and it already held the spin lock, so that the patch makes a new function as _ohci_shutdown(). This patch is inspired by a Renesas R-Car Gen3 BSP patch from Tho Vu. Signed-off-by: Yoshihiro Shimoda Cc: stable Acked-by: Alan Stern Link: https://lore.kernel.org/r/1566877910-6020-1-git-send-email-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ohci-hcd.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 76da906ad727048a74bb8067031ee99fc070c7da Author: Schmid, Carsten Date: Fri Aug 23 14:11:28 2019 +0000 usb: hcd: use managed device resources Using managed device resources in usb_hcd_pci_probe() allows devm usage for resource subranges, such as the mmio resource for the platform device created to control host/device mode mux, which is a xhci extended capability, and sits inside the xhci mmio region. If managed device resources are not used then "parent" resource is released before subrange at driver removal as .remove callback is called before the devres list of resources for this device is walked and released. This has been observed with the xhci extended capability driver causing a use-after-free which is now fixed. An additional nice benefit is that error handling on driver initialisation is simplified much. Signed-off-by: Carsten Schmid Tested-by: Carsten Schmid Reviewed-by: Mathias Nyman Fixes: fa31b3cb2ae1 ("xhci: Add Intel extended cap / otg phy mux handling") Cc: # v4.19+ Link: https://lore.kernel.org/r/1566569488679.31808@mentor.com Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hcd-pci.c | 30 ++++++++---------------------- 1 file changed, 8 insertions(+), 22 deletions(-) commit a684d8fd87182090ee96e34519ecdf009cef093a Author: Colin Ian King Date: Thu Aug 22 14:52:12 2019 +0100 typec: tcpm: fix a typo in the comparison of pdo_max_voltage There appears to be a typo in the comparison of pdo_max_voltage[i] with the previous value, currently it is checking against the array pdo_min_voltage rather than pdo_max_voltage. I believe this is a typo. Fix this. Addresses-Coverity: ("Copy-paste error") Fixes: 5007e1b5db73 ("typec: tcpm: Validate source and sink caps") Cc: stable Signed-off-by: Colin Ian King Reviewed-by: Guenter Roeck Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20190822135212.10195-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/tcpm/tcpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ddaedbbece90add970faeac87f7d7d40341936ce Author: Thomas Gleixner Date: Thu Aug 15 23:25:05 2019 +0200 Documentation/process: Embargoed hardware security issues To address the requirements of embargoed hardware issues, like Meltdown, Spectre, L1TF etc. it is necessary to define and document a process for handling embargoed hardware security issues. Following the discussion at the maintainer summit 2018 in Edinburgh (https://lwn.net/Articles/769417/) the volunteered people have worked out a process and a Memorandum of Understanding. The latter addresses the fact that the Linux kernel community cannot sign NDAs for various reasons. The initial contact point for hardware security issues is different from the regular kernel security contact to provide a known and neutral interface for hardware vendors and researchers. The initial primary contact team is proposed to be staffed by Linux Foundation Fellows, who are not associated to a vendor or a distribution and are well connected in the industry as a whole. The process is designed with the experience of the past incidents in mind and tries to address the remaining gaps, so future (hopefully rare) incidents can be handled more efficiently. It won't remove the fact, that most of this has to be done behind closed doors, but it is set up to avoid big bureaucratic hurdles for individual developers. The process is solely for handling hardware security issues and cannot be used for regular kernel (software only) security bugs. This memo can help with hardware companies who, and I quote, "[my manager] doesn't want to bet his job on the list keeping things secret." This despite numerous leaks directly from that company over the years, and none ever so far from the kernel security team. Cognitive dissidence seems to be a requirement to be a good manager. To accelerate the adoption of this process, we introduce the concept of ambassadors in participating companies. The ambassadors are there to guide people to comply with the process, but are not automatically involved in the disclosure of a particular incident. Signed-off-by: Thomas Gleixner Reviewed-by: Greg Kroah-Hartman Reviewed-by: Josh Poimboeuf Acked-by: Laura Abbott Acked-by: Ben Hutchings Reviewed-by: Tyler Hicks Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Jiri Kosina Link: https://lore.kernel.org/r/20190815212505.GC12041@kroah.com Signed-off-by: Greg Kroah-Hartman .../process/embargoed-hardware-issues.rst | 279 +++++++++++++++++++++ Documentation/process/index.rst | 1 + 2 files changed, 280 insertions(+) commit b9bc7b8b1e9e815b231c1ca0b566ee723f480987 Author: Raul E Rangel Date: Tue Aug 27 11:36:19 2019 -0600 lkdtm/bugs: fix build error in lkdtm_EXHAUST_STACK lkdtm/bugs.c:94:2: error: format '%d' expects argument of type 'int', but argument 2 has type 'long unsigned int' [-Werror=format=] pr_info("Calling function with %d frame size to depth %d ...\n", ^ THREAD_SIZE is defined as a unsigned long, cast CONFIG_FRAME_WARN to unsigned long as well. Fixes: 24cccab42c419 ("lkdtm/bugs: Adjust recursion test to avoid elision") Cc: stable Signed-off-by: Raul E Rangel Acked-by: Kees Cook Link: https://lore.kernel.org/r/20190827173619.170065-1-rrangel@chromium.org Signed-off-by: Greg Kroah-Hartman drivers/misc/lkdtm/bugs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 587f17407741a5be07f8a2d1809ec946c8120962 Author: Tomas Winkler Date: Mon Aug 19 13:32:10 2019 +0300 mei: me: add Tiger Lake point LP device ID Add Tiger Lake Point device ID for TGP LP. Signed-off-by: Tomas Winkler Cc: stable Link: https://lore.kernel.org/r/20190819103210.32748-1-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/hw-me-regs.h | 2 ++ drivers/misc/mei/pci-me.c | 2 ++ 2 files changed, 4 insertions(+) commit 9c78255fdde45c6b9a1ee30f652f7b34c727f5c7 Author: Alexander Shishkin Date: Wed Aug 21 10:49:55 2019 +0300 intel_th: pci: Add Tiger Lake support This adds support for the Trace Hub in Tiger Lake PCH. Signed-off-by: Alexander Shishkin Cc: stable@vger.kernel.org # v4.14+ Link: https://lore.kernel.org/r/20190821074955.3925-5-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/intel_th/pci.c | 5 +++++ 1 file changed, 5 insertions(+) commit 164eb56e3b64f3a816238d410c9efec7567a82ef Author: Alexander Shishkin Date: Wed Aug 21 10:49:54 2019 +0300 intel_th: pci: Add support for another Lewisburg PCH Add support for the Trace Hub in another Lewisburg PCH. Signed-off-by: Alexander Shishkin Cc: stable@vger.kernel.org # v4.14+ Link: https://lore.kernel.org/r/20190821074955.3925-4-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/intel_th/pci.c | 5 +++++ 1 file changed, 5 insertions(+) commit 961b6ffe0e2c403b09a8efe4a2e986b3c415391a Author: Ding Xiang Date: Wed Aug 21 10:49:52 2019 +0300 stm class: Fix a double free of stm_source_device In the error path of stm_source_register_device(), the kfree is unnecessary, as the put_device() before it ends up calling stm_source_device_release() to free stm_source_device, leading to a double free at the outer kfree() call. Remove it. Signed-off-by: Ding Xiang Signed-off-by: Alexander Shishkin Fixes: 7bd1d4093c2fa ("stm class: Introduce an abstraction for System Trace Module devices") Link: https://lore.kernel.org/linux-arm-kernel/1563354988-23826-1-git-send-email-dingxiang@cmss.chinamobile.com/ Cc: stable@vger.kernel.org # v4.4+ Link: https://lore.kernel.org/r/20190821074955.3925-2-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/stm/core.c | 1 - 1 file changed, 1 deletion(-) commit c78439f8b97e9719ca3baea4e1a0eef310e4065c Merge: a642a0b33343 dec43da46f63 Author: Greg Kroah-Hartman Date: Wed Aug 28 22:26:47 2019 +0200 Merge tag 'fpga-fixes-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/mdf/linux-fpga into char-misc-linus Moritz writes: FPGA Manager fixes for 5.3 A single fix for the altera-ps-spi driver that fixes the behavior when the driver receives -EPROBE_DEFER when trying to obtain a GPIO desc. Signed-off-by: Moritz Fischer * tag 'fpga-fixes-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/mdf/linux-fpga: fpga: altera-ps-spi: Fix getting of optional confd gpio commit a642a0b33343add9b771ce88a6c5ff6cf92f22d2 Author: Greg Kroah-Hartman Date: Tue Aug 27 21:53:10 2019 +0200 MAINTAINERS: add entry for LICENSES and SPDX stuff Thomas and I seem to have become the "unofficial" maintainers for these files and questions about SPDX things. So let's make it official. Reported-by: "Darrick J. Wong" Grumpily-acked-by: Thomas Gleixner Acked-by: Darrick J. Wong Link: https://lore.kernel.org/r/20190827195310.GA30618@kroah.com Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 9cf6b756cdf2cd38b8b0dac2567f7c6daf5e79d5 Merge: 9e8312f5e160 82e40f558de5 Author: Linus Torvalds Date: Wed Aug 28 10:37:21 2019 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "Hot on the heels of our last set of fixes are a few more for -rc7. Two of them are fixing issues with our virtual interrupt controller implementation in KVM/arm, while the other is a longstanding but straightforward kallsyms fix which was been acked by Masami and resolves an initialisation failure in kprobes observed on arm64. - Fix GICv2 emulation bug (KVM) - Fix deadlock in virtual GIC interrupt injection code (KVM) - Fix kprobes blacklist init failure due to broken kallsyms lookup" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: KVM: arm/arm64: vgic-v2: Handle SGI bits in GICD_I{S,C}PENDR0 as WI KVM: arm/arm64: vgic: Fix potential deadlock when ap_list is long kallsyms: Don't let kallsyms_lookup_size_offset() fail on retrieving the first symbol commit 274b924088e93593c76fb122d24bc0ef18d0ddf4 Author: Jeff Moyer Date: Wed Aug 28 11:49:46 2019 -0400 libnvdimm/pfn: Fix namespace creation on misaligned addresses Yi reported[1] that after commit a3619190d62e ("libnvdimm/pfn: stop padding pmem namespaces to section alignment"), it was no longer possible to create a device dax namespace with a 1G alignment. The reason was that the pmem region was not itself 1G-aligned. The code happily skips past the first 512M, but fails to account for a now misaligned end offset (since space was allocated starting at that misaligned address, and extending for size GBs). Reintroduce end_trunc, so that the code correctly handles the misaligned end address. This results in the same behavior as before the introduction of the offending commit. [1] https://lists.01.org/pipermail/linux-nvdimm/2019-July/022813.html Fixes: a3619190d62e ("libnvdimm/pfn: stop padding pmem namespaces ...") Reported-and-tested-by: Yi Zhang Signed-off-by: Jeff Moyer Link: https://lore.kernel.org/r/x49ftll8f39.fsf@segfault.boston.devel.redhat.com Signed-off-by: Dan Williams drivers/nvdimm/pfn_devs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 6978bce054247e4cfccdf689ce263e076499f905 Author: Ayan Kumar Halder Date: Wed Aug 28 15:00:19 2019 +0000 drm/komeda: Reordered the komeda's de-init functions The de-init routine should be doing the following in order:- 1. Unregister the drm device 2. Shut down the crtcs - failing to do this might cause a connector leakage See the 'commit 109c4d18e574 ("drm/arm/malidp: Ensure that the crtcs are shutdown before removing any encoder/connector")' 3. Disable the interrupts 4. Unbind the components 5. Free up DRM mode_config info Changes from v1:- 1. Re-ordered the header files inclusion 2. Rebased on top of the latest drm-misc-fixes Signed-off-by:. Ayan Kumar Halder Reviewed-by: Mihail Atanassov Reviewed-by: James Qian Wang (Arm Technology China) Link: https://patchwork.freedesktop.org/patch/327606/ drivers/gpu/drm/arm/display/komeda/komeda_kms.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) commit 42e0e95474fc6076b5cd68cab8fa0340a1797a72 Author: Linus Torvalds Date: Wed Aug 28 10:56:48 2019 +0200 x86/build: Add -Wnoaddress-of-packed-member to REALMODE_CFLAGS, to silence GCC9 build warning One of the very few warnings I have in the current build comes from arch/x86/boot/edd.c, where I get the following with a gcc9 build: arch/x86/boot/edd.c: In function ‘query_edd’: arch/x86/boot/edd.c:148:11: warning: taking address of packed member of ‘struct boot_params’ may result in an unaligned pointer value [-Waddress-of-packed-member] 148 | mbrptr = boot_params.edd_mbr_sig_buffer; | ^~~~~~~~~~~ This warning triggers because we throw away all the CFLAGS and then make a new set for REALMODE_CFLAGS, so the -Wno-address-of-packed-member we added in the following commit is not present: 6f303d60534c ("gcc-9: silence 'address-of-packed-member' warning") The simplest solution for now is to adjust the warning for this version of CFLAGS as well, but it would definitely make sense to examine whether REALMODE_CFLAGS could be derived from CFLAGS, so that it picks up changes in the compiler flags environment automatically. Signed-off-by: Linus Torvalds Acked-by: Borislav Petkov Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar arch/x86/Makefile | 1 + 1 file changed, 1 insertion(+) commit 531a64e4c35bb9844b0cf813a6c9a87e00be05ff Author: Bernard Metzler Date: Wed Aug 28 15:03:55 2019 +0200 RDMA/siw: Fix IPv6 addr_list locking Walking the address list of an inet6_dev requires appropriate locking. Since the called function siw_listen_address() may sleep, we have to use rtnl_lock() instead of read_lock_bh(). Also introduces sanity checks if we got a device from in_dev_get() or in6_dev_get(). Reported-by: Bart Van Assche Fixes: 6c52fdc244b5 ("rdma/siw: connection management") Signed-off-by: Bernard Metzler Link: https://lore.kernel.org/r/20190828130355.22830-1-bmt@zurich.ibm.com Signed-off-by: Doug Ledford drivers/infiniband/sw/siw/siw_cm.c | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) commit 438b6c20e6161a1a7542490baa093c86732f77d6 Author: David Jander Date: Tue Aug 27 06:46:29 2019 +0000 gpio: pca953x: use pca953x_read_regs instead of regmap_bulk_read The register number needs to be translated for chips with more than 8 ports. This patch fixes a bug causing all chips with more than 8 GPIO pins to not work correctly. Fixes: 0f25fda840a9 ("gpio: pca953x: Zap ad-hoc reg_direction cache") Cc: Cc: Signed-off-by: David Jander Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-pca953x.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit bc624a06f0c5190bc37fec7d22cd82b43a579698 Author: David Jander Date: Tue Aug 27 06:46:28 2019 +0000 gpio: pca953x: correct type of reg_direction The type of reg_direction needs to match the type of the regmap, which is u8. Fixes: 0f25fda840a9 ("gpio: pca953x: Zap ad-hoc reg_direction cache") Cc: Cc: Signed-off-by: David Jander Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-pca953x.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d435c9a7b85be1e820668d2f3718c2d9f24d5548 Author: Ilya Dryomov Date: Tue Aug 27 16:45:10 2019 +0200 rbd: restore zeroing past the overlap when reading from parent The parent image is read only up to the overlap point, the rest of the buffer should be zeroed. This snuck in because as it turns out the overlap test case has not been triggering this code path for a while now. Fixes: a9b67e69949d ("rbd: replace obj_req->tried_parent with obj_req->read_state") Signed-off-by: Ilya Dryomov Reviewed-by: Jason Dillaman drivers/block/rbd.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit e8c99200b4d117c340c392ebd5e62d85dfeed027 Author: Jia-Ju Bai Date: Wed Jul 24 17:43:06 2019 +0800 libceph: don't call crypto_free_sync_skcipher() on a NULL tfm In set_secret(), key->tfm is assigned to NULL on line 55, and then ceph_crypto_key_destroy(key) is executed. ceph_crypto_key_destroy(key) crypto_free_sync_skcipher(key->tfm) crypto_free_skcipher(&tfm->base); This happens to work because crypto_sync_skcipher is a trivial wrapper around crypto_skcipher: &tfm->base is still 0 and crypto_free_skcipher() handles that. Let's not rely on the layout of crypto_sync_skcipher. This bug is found by a static analysis tool STCheck written by us. Fixes: 69d6302b65a8 ("libceph: Remove VLA usage of skcipher"). Signed-off-by: Jia-Ju Bai Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov net/ceph/crypto.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 82e40f558de566fdee214bec68096bbd5e64a6a4 Author: Marc Zyngier Date: Wed Aug 28 11:10:16 2019 +0100 KVM: arm/arm64: vgic-v2: Handle SGI bits in GICD_I{S,C}PENDR0 as WI A guest is not allowed to inject a SGI (or clear its pending state) by writing to GICD_ISPENDR0 (resp. GICD_ICPENDR0), as these bits are defined as WI (as per ARM IHI 0048B 4.3.7 and 4.3.8). Make sure we correctly emulate the architecture. Fixes: 96b298000db4 ("KVM: arm/arm64: vgic-new: Add PENDING registers handlers") Cc: stable@vger.kernel.org # 4.7+ Reported-by: Andre Przywara Signed-off-by: Marc Zyngier Signed-off-by: Will Deacon virt/kvm/arm/vgic/vgic-mmio.c | 18 ++++++++++++++++++ virt/kvm/arm/vgic/vgic-v2.c | 5 ++++- virt/kvm/arm/vgic/vgic-v3.c | 5 ++++- 3 files changed, 26 insertions(+), 2 deletions(-) commit fdfc5c8594c24c5df883583ebd286321a80e0a67 Author: Eric Dumazet Date: Mon Aug 26 09:19:15 2019 -0700 tcp: remove empty skb from write queue in error cases Vladimir Rutsky reported stuck TCP sessions after memory pressure events. Edge Trigger epoll() user would never receive an EPOLLOUT notification allowing them to retry a sendmsg(). Jason tested the case of sk_stream_alloc_skb() returning NULL, but there are other paths that could lead both sendmsg() and sendpage() to return -1 (EAGAIN), with an empty skb queued on the write queue. This patch makes sure we remove this empty skb so that Jason code can detect that the queue is empty, and call sk->sk_write_space(sk) accordingly. Fixes: ce5ec440994b ("tcp: ensure epoll edge trigger wakeup when write queue is empty") Signed-off-by: Eric Dumazet Cc: Jason Baron Reported-by: Vladimir Rutsky Cc: Soheil Hassas Yeganeh Cc: Neal Cardwell Acked-by: Soheil Hassas Yeganeh Acked-by: Neal Cardwell Signed-off-by: David S. Miller net/ipv4/tcp.c | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) commit 7d0a06586b2686ba80c4a2da5f91cb10ffbea736 Author: Ka-Cheong Poon Date: Mon Aug 26 02:39:12 2019 -0700 net/rds: Fix info leak in rds6_inc_info_copy() The rds6_inc_info_copy() function has a couple struct members which are leaking stack information. The ->tos field should hold actual information and the ->flags field needs to be zeroed out. Fixes: 3eb450367d08 ("rds: add type of service(tos) infrastructure") Fixes: b7ff8b1036f0 ("rds: Extend RDS API for IPv6 support") Reported-by: 黄ID蝴蝶 Signed-off-by: Dan Carpenter Signed-off-by: Ka-Cheong Poon Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller net/rds/recv.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 2c1644cf6d46a8267d79ed95cb9b563839346562 Author: Feng Sun Date: Mon Aug 26 14:46:04 2019 +0800 net: fix skb use after free in netpoll After commit baeababb5b85d5c4e6c917efe2a1504179438d3b ("tun: return NET_XMIT_DROP for dropped packets"), when tun_net_xmit drop packets, it will free skb and return NET_XMIT_DROP, netpoll_send_skb_on_dev will run into following use after free cases: 1. retry netpoll_start_xmit with freed skb; 2. queue freed skb in npinfo->txq. queue_process will also run into use after free case. hit netpoll_send_skb_on_dev first case with following kernel log: [ 117.864773] kernel BUG at mm/slub.c:306! [ 117.864773] invalid opcode: 0000 [#1] SMP PTI [ 117.864774] CPU: 3 PID: 2627 Comm: loop_printmsg Kdump: loaded Tainted: P OE 5.3.0-050300rc5-generic #201908182231 [ 117.864775] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Ubuntu-1.8.2-1ubuntu1 04/01/2014 [ 117.864775] RIP: 0010:kmem_cache_free+0x28d/0x2b0 [ 117.864781] Call Trace: [ 117.864781] ? tun_net_xmit+0x21c/0x460 [ 117.864781] kfree_skbmem+0x4e/0x60 [ 117.864782] kfree_skb+0x3a/0xa0 [ 117.864782] tun_net_xmit+0x21c/0x460 [ 117.864782] netpoll_start_xmit+0x11d/0x1b0 [ 117.864788] netpoll_send_skb_on_dev+0x1b8/0x200 [ 117.864789] __br_forward+0x1b9/0x1e0 [bridge] [ 117.864789] ? skb_clone+0x53/0xd0 [ 117.864790] ? __skb_clone+0x2e/0x120 [ 117.864790] deliver_clone+0x37/0x50 [bridge] [ 117.864790] maybe_deliver+0x89/0xc0 [bridge] [ 117.864791] br_flood+0x6c/0x130 [bridge] [ 117.864791] br_dev_xmit+0x315/0x3c0 [bridge] [ 117.864792] netpoll_start_xmit+0x11d/0x1b0 [ 117.864792] netpoll_send_skb_on_dev+0x1b8/0x200 [ 117.864792] netpoll_send_udp+0x2c6/0x3e8 [ 117.864793] write_msg+0xd9/0xf0 [netconsole] [ 117.864793] console_unlock+0x386/0x4e0 [ 117.864793] vprintk_emit+0x17e/0x280 [ 117.864794] vprintk_default+0x29/0x50 [ 117.864794] vprintk_func+0x4c/0xbc [ 117.864794] printk+0x58/0x6f [ 117.864795] loop_fun+0x24/0x41 [printmsg_loop] [ 117.864795] kthread+0x104/0x140 [ 117.864795] ? 0xffffffffc05b1000 [ 117.864796] ? kthread_park+0x80/0x80 [ 117.864796] ret_from_fork+0x35/0x40 Signed-off-by: Feng Sun Signed-off-by: Xiaojun Zhao Signed-off-by: David S. Miller net/core/netpoll.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit bcccb0a535bb99616e4b992568371efab1ab14e8 Author: Vladimir Oltean Date: Sun Aug 25 21:32:12 2019 +0300 net: dsa: tag_8021q: Future-proof the reserved fields in the custom VID After witnessing the discussion in https://lkml.org/lkml/2019/8/14/151 w.r.t. ioctl extensibility, it became clear that such an issue might prevent that the 3 RSV bits inside the DSA 802.1Q tag might also suffer the same fate and be useless for further extension. So clearly specify that the reserved bits should currently be transmitted as zero and ignored on receive. The DSA tagger already does this (and has always did), and is the only known user so far (no Wireshark dissection plugin, etc). So there should be no incompatibility to speak of. Fixes: 0471dd429cea ("net: dsa: tag_8021q: Create a stable binary format") Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/tag_8021q.c | 2 ++ 1 file changed, 2 insertions(+) commit 94acaeb50ced653bfe2c4d8037c70b107af14124 Author: Marco Hartmann Date: Wed Aug 21 11:00:46 2019 +0000 Add genphy_c45_config_aneg() function to phy-c45.c Commit 34786005eca3 ("net: phy: prevent PHYs w/o Clause 22 regs from calling genphy_config_aneg") introduced a check that aborts phy_config_aneg() if the phy is a C45 phy. This causes phy_state_machine() to call phy_error() so that the phy ends up in PHY_HALTED state. Instead of returning -EOPNOTSUPP, call genphy_c45_config_aneg() (analogous to the C22 case) so that the state machine can run correctly. genphy_c45_config_aneg() closely resembles mv3310_config_aneg() in drivers/net/phy/marvell10g.c, excluding vendor specific configurations for 1000BaseT. Fixes: 22b56e827093 ("net: phy: replace genphy_10g_driver with genphy_c45_driver") Signed-off-by: Marco Hartmann Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/phy-c45.c | 26 ++++++++++++++++++++++++++ drivers/net/phy/phy.c | 2 +- include/linux/phy.h | 1 + 3 files changed, 28 insertions(+), 1 deletion(-) commit 36e337744c0d9ea23a64a8b62bddec6173e93975 Author: Steve French Date: Tue Aug 27 17:29:56 2019 -0500 cifs: update internal module number To 2.22 Signed-off-by: Steve French fs/cifs/cifsfs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 340625e618e1b37a72a02f07aa7144ae0ab0b19e Author: Ronnie Sahlberg Date: Tue Aug 27 09:30:14 2019 +1000 cifs: replace various strncpy with strscpy and similar Using strscpy is cleaner, and avoids some problems with handling maximum length strings. Linus noticed the original problem and Aurelien pointed out some additional problems. Fortunately most of this is SMB1 code (and in particular the ASCII string handling older, which is less common). Reported-by: Linus Torvalds Reviewed-by: Aurelien Aptel Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French fs/cifs/cifsproto.h | 1 + fs/cifs/cifssmb.c | 197 +++++++++++++++++----------------------------------- fs/cifs/connect.c | 7 +- fs/cifs/dir.c | 5 +- fs/cifs/misc.c | 22 ++++++ fs/cifs/sess.c | 26 ++++--- 6 files changed, 112 insertions(+), 146 deletions(-) commit 981471bd3abf4d572097645d765391533aac327d Author: Cong Wang Date: Sun Aug 25 10:01:32 2019 -0700 net_sched: fix a NULL pointer deref in ipt action The net pointer in struct xt_tgdtor_param is not explicitly initialized therefore is still NULL when dereferencing it. So we have to find a way to pass the correct net pointer to ipt_destroy_target(). The best way I find is just saving the net pointer inside the per netns struct tcf_idrinfo, which could make this patch smaller. Fixes: 0c66dc1ea3f0 ("netfilter: conntrack: register hooks in netns when needed by ruleset") Reported-and-tested-by: itugrok@yahoo.com Cc: Jamal Hadi Salim Cc: Jiri Pirko Signed-off-by: Cong Wang Signed-off-by: David S. Miller include/net/act_api.h | 4 +++- net/sched/act_bpf.c | 2 +- net/sched/act_connmark.c | 2 +- net/sched/act_csum.c | 2 +- net/sched/act_ct.c | 2 +- net/sched/act_ctinfo.c | 2 +- net/sched/act_gact.c | 2 +- net/sched/act_ife.c | 2 +- net/sched/act_ipt.c | 11 ++++++----- net/sched/act_mirred.c | 2 +- net/sched/act_mpls.c | 2 +- net/sched/act_nat.c | 2 +- net/sched/act_pedit.c | 2 +- net/sched/act_police.c | 2 +- net/sched/act_sample.c | 2 +- net/sched/act_simple.c | 2 +- net/sched/act_skbedit.c | 2 +- net/sched/act_skbmod.c | 2 +- net/sched/act_tunnel_key.c | 2 +- net/sched/act_vlan.c | 2 +- 20 files changed, 27 insertions(+), 24 deletions(-) commit 478228e57f81f6cb60798d54fc02a74ea7dd267e Author: Dan Carpenter Date: Tue Aug 27 13:59:17 2019 +0300 cifs: Use kzfree() to zero out the password It's safer to zero out the password so that it can never be disclosed. Fixes: 0c219f5799c7 ("cifs: set domainName when a domain-key is used in multiuser") Signed-off-by: Dan Carpenter Signed-off-by: Steve French fs/cifs/connect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f2aee329a68f5a907bcff11a109dfe17c0b41aeb Author: Ronnie Sahlberg Date: Thu Aug 22 08:09:50 2019 +1000 cifs: set domainName when a domain-key is used in multiuser RHBZ: 1710429 When we use a domain-key to authenticate using multiuser we must also set the domainnmame for the new volume as it will be used and passed to the server in the NTLMSSP Domain-name. Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French fs/cifs/connect.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 9e8312f5e160ade069e131d54ab8652cf0e86e1a Merge: 6525771f58cb 99300a85260c Author: Linus Torvalds Date: Tue Aug 27 13:22:57 2019 -0700 Merge tag 'nfs-for-5.3-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs Pull NFS client bugfixes from Trond Myklebust: "Highlights include: Stable fixes: - Fix a page lock leak in nfs_pageio_resend() - Ensure O_DIRECT reports an error if the bytes read/written is 0 - Don't handle errors if the bind/connect succeeded - Revert "NFSv4/flexfiles: Abort I/O early if the layout segment was invalidat ed" Bugfixes: - Don't refresh attributes with mounted-on-file information - Fix return values for nfs4_file_open() and nfs_finish_open() - Fix pnfs layoutstats reporting of I/O errors - Don't use soft RPC calls for pNFS/flexfiles I/O, and don't abort for soft I/O errors when the user specifies a hard mount. - Various fixes to the error handling in sunrpc - Don't report writepage()/writepages() errors twice" * tag 'nfs-for-5.3-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: NFS: remove set but not used variable 'mapping' NFSv2: Fix write regression NFSv2: Fix eof handling NFS: Fix writepage(s) error handling to not report errors twice NFS: Fix spurious EIO read errors pNFS/flexfiles: Don't time out requests on hard mounts SUNRPC: Handle connection breakages correctly in call_status() Revert "NFSv4/flexfiles: Abort I/O early if the layout segment was invalidated" SUNRPC: Handle EADDRINUSE and ENOBUFS correctly pNFS/flexfiles: Turn off soft RPC calls SUNRPC: Don't handle errors if the bind/connect succeeded NFS: On fatal writeback errors, we need to call nfs_inode_remove_request() NFS: Fix initialisation of I/O result struct in nfs_pgio_rpcsetup NFS: Ensure O_DIRECT reports an error if the bytes read/written is 0 NFSv4/pnfs: Fix a page lock leak in nfs_pageio_resend() NFSv4: Fix return value in nfs_finish_open() NFSv4: Fix return values for nfs4_file_open() NFS: Don't refresh attributes with mounted-on-file information commit 75ee23b30dc712d80d2421a9a547e7ab6e379b44 Author: Sean Christopherson Date: Fri Aug 23 13:55:44 2019 -0700 KVM: x86: Don't update RIP or do single-step on faulting emulation Don't advance RIP or inject a single-step #DB if emulation signals a fault. This logic applies to all state updates that are conditional on clean retirement of the emulation instruction, e.g. updating RFLAGS was previously handled by commit 38827dbd3fb85 ("KVM: x86: Do not update EFLAGS on faulting emulation"). Not advancing RIP is likely a nop, i.e. ctxt->eip isn't updated with ctxt->_eip until emulation "retires" anyways. Skipping #DB injection fixes a bug reported by Andy Lutomirski where a #UD on SYSCALL due to invalid state with EFLAGS.TF=1 would loop indefinitely due to emulation overwriting the #UD with #DB and thus restarting the bad SYSCALL over and over. Cc: Nadav Amit Cc: stable@vger.kernel.org Reported-by: Andy Lutomirski Fixes: 663f4c61b803 ("KVM: x86: handle singlestep during emulation") Signed-off-by: Sean Christopherson Signed-off-by: Radim Krčmář arch/x86/kvm/x86.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit ea1529873ab18c204688cf31746df851c098cbea Author: Vitaly Kuznetsov Date: Tue Aug 27 18:04:02 2019 +0200 KVM: x86: hyper-v: don't crash on KVM_GET_SUPPORTED_HV_CPUID when kvm_intel.nested is disabled If kvm_intel is loaded with nested=0 parameter an attempt to perform KVM_GET_SUPPORTED_HV_CPUID results in OOPS as nested_get_evmcs_version hook in kvm_x86_ops is NULL (we assign it in nested_vmx_hardware_setup() and this only happens in case nested is enabled). Check that kvm_x86_ops->nested_get_evmcs_version is not NULL before calling it. With this, we can remove the stub from svm as it is no longer needed. Cc: Fixes: e2e871ab2f02 ("x86/kvm/hyper-v: Introduce nested_get_evmcs_version() helper") Signed-off-by: Vitaly Kuznetsov Reviewed-by: Jim Mattson Signed-off-by: Radim Krčmář arch/x86/kvm/hyperv.c | 5 ++++- arch/x86/kvm/svm.c | 8 +------- arch/x86/kvm/vmx/vmx.c | 1 + 3 files changed, 6 insertions(+), 8 deletions(-) commit 6525771f58cbc6ab97b5cff9069865cde8283346 Merge: 8d6454083d46 2f029413cbfb Author: Linus Torvalds Date: Tue Aug 27 10:50:27 2019 -0700 Merge tag 'arc-5.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc Pull ARC updates from Vineet Gupta: - support for Edge Triggered IRQs in ARC IDU intc - other fixes here and there * tag 'arc-5.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: arc: prefer __section from compiler_attributes.h dt-bindings: IDU-intc: Add support for edge-triggered interrupts dt-bindings: IDU-intc: Clean up documentation ARCv2: IDU-intc: Add support for edge-triggered interrupts ARC: unwind: Mark expected switch fall-throughs ARC: [plat-hsdk]: allow to switch between AXI DMAC port configurations ARC: fix typo in setup_dma_ops log message ARCv2: entry: early return from exception need not clear U & DE bits commit 8d6454083d463a44097566616b473c7e6d4bdf02 Merge: 0004654fb148 4d82fa67dd6b Author: Linus Torvalds Date: Tue Aug 27 10:47:01 2019 -0700 Merge tag 'mfd-fixes-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD fix from Lee Jones: "Identify potentially unused functions in rk808 driver when !PM" * tag 'mfd-fixes-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: mfd: rk808: Make PM function declaration static mfd: rk808: Mark pm functions __maybe_unused commit 0004654fb14859e49bab66aba881d64f605682a4 Merge: 452a04441b4d 2fd232939365 Author: Linus Torvalds Date: Tue Aug 27 10:42:03 2019 -0700 Merge tag 'sound-5.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A collection of small fixes as usual: - More coverage of USB-audio descriptor sanity checks - A fix for mute LED regression on Conexant HD-audio codecs - A few device-specific fixes and quirks for USB-audio and HD-audio - A fix for (die-hard remaining) possible race in sequencer core - FireWire oxfw regression fix that was introduced in 5.3-rc1" * tag 'sound-5.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: oxfw: fix to handle correct stream for PCM playback ALSA: seq: Fix potential concurrent access to the deleted pool ALSA: usb-audio: Check mixer unit bitmap yet more strictly ALSA: line6: Fix memory leak at line6_init_pcm() error path ALSA: usb-audio: Fix invalid NULL check in snd_emuusb_set_samplerate() ALSA: hda/ca0132 - Add new SBZ quirk ALSA: usb-audio: Add implicit fb quirk for Behringer UFX1604 ALSA: hda - Fixes inverted Conexant GPIO mic mute led commit 41940ff50f6c347f3541163702566cd526200d98 Author: Aaron Liu Date: Tue Aug 27 22:59:45 2019 +0800 drm/amdgpu: fix GFXOFF on Picasso and Raven2 For picasso(adev->pdev->device == 0x15d8)&raven2(adev->rev_id >= 0x8), firmware is sufficient to support gfxoff. In commit 98f58ada2d37e, for picasso&raven2, return directly and cause gfxoff disabled. Fixes: 98f58ada2d37 ("drm/amdgpu/gfx9: update pg_flags after determining if gfx off is possible") Reviewed-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Aaron Liu Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 317a3aaef94d73ba6be88aea11b41bb631b2d581 Author: Kai-Heng Feng Date: Tue Aug 27 17:33:32 2019 +0800 drm/amdgpu: Add APTX quirk for Dell Latitude 5495 Needs ATPX rather than _PR3 to really turn off the dGPU. This can save ~5W when dGPU is runtime-suspended. Signed-off-by: Kai-Heng Feng Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c | 1 + 1 file changed, 1 insertion(+) commit 83e09d5bddbee749fc83063890244397896a1971 Author: Evan Quan Date: Mon Aug 19 13:17:53 2019 +0800 drm/amd/powerplay: correct Vega20 dpm level related settings Correct the settings for auto mode and skip the unnecessary settings for dcefclk and fclk. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 60 +++++++++++++++++++--- 1 file changed, 54 insertions(+), 6 deletions(-) commit 452a04441b4d0d2d567e4128af58867739002640 Merge: a55aa89aab90 f53a7ad18959 Author: Linus Torvalds Date: Tue Aug 27 10:12:48 2019 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from David Miller: 1) Use 32-bit index for tails calls in s390 bpf JIT, from Ilya Leoshkevich. 2) Fix missed EPOLLOUT events in TCP, from Eric Dumazet. Same fix for SMC from Jason Baron. 3) ipv6_mc_may_pull() should return 0 for malformed packets, not -EINVAL. From Stefano Brivio. 4) Don't forget to unpin umem xdp pages in error path of xdp_umem_reg(). From Ivan Khoronzhuk. 5) Fix sta object leak in mac80211, from Johannes Berg. 6) Fix regression by not configuring PHYLINK on CPU port of bcm_sf2 switches. From Florian Fainelli. 7) Revert DMA sync removal from r8169 which was causing regressions on some MIPS Loongson platforms. From Heiner Kallweit. 8) Use after free in flow dissector, from Jakub Sitnicki. 9) Fix NULL derefs of net devices during ICMP processing across collect_md tunnels, from Hangbin Liu. 10) proto_register() memory leaks, from Zhang Lin. 11) Set NLM_F_MULTI flag in multipart netlink messages consistently, from John Fastabend. * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (66 commits) r8152: Set memory to all 0xFFs on failed reg reads openvswitch: Fix conntrack cache with timeout ipv4: mpls: fix mpls_xmit for iptunnel nexthop: Fix nexthop_num_path for blackhole nexthops net: rds: add service level support in rds-info net: route dump netlink NLM_F_MULTI flag missing s390/qeth: reject oversized SNMP requests sock: fix potential memory leak in proto_register() MAINTAINERS: Add phylink keyword to SFF/SFP/SFP+ MODULE SUPPORT xfrm/xfrm_policy: fix dst dev null pointer dereference in collect_md mode ipv4/icmp: fix rt dst dev null pointer dereference openvswitch: Fix log message in ovs conntrack bpf: allow narrow loads of some sk_reuseport_md fields with offset > 0 bpf: fix use after free in prog symbol exposure bpf: fix precision tracking in presence of bpf2bpf calls flow_dissector: Fix potential use-after-free on BPF_PROG_DETACH Revert "r8169: remove not needed call to dma_sync_single_for_device" ipv6: propagate ipv6_add_dev's error returns out of ipv6_find_idev net/ncsi: Fix the payload copying for the request coming from Netlink qed: Add cleanup in qed_slowpath_start() ... commit 478553fd1b6f819390b64a2e13ac756c4d1a2836 Author: Florian Westphal Date: Tue Aug 27 13:24:52 2019 +0200 netfilter: conntrack: make sysctls per-namespace again When I merged the extension sysctl tables with the main one I forgot to reset them on netns creation. They currently read/write init_net settings. Fixes: d912dec12428 ("netfilter: conntrack: merge acct and helper sysctl table with main one") Fixes: cb2833ed0044 ("netfilter: conntrack: merge ecache and timestamp sysctl tables with main one") Reported-by: Shmulik Ladkani Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_standalone.c | 5 +++++ 1 file changed, 5 insertions(+) commit d4a8061a7c5f7c27a2dc002ee4cb89b3e6637e44 Author: Heyi Guo Date: Tue Aug 27 12:26:50 2019 +0100 KVM: arm/arm64: vgic: Fix potential deadlock when ap_list is long If the ap_list is longer than 256 entries, merge_final() in list_sort() will call the comparison callback with the same element twice, causing a deadlock in vgic_irq_cmp(). Fix it by returning early when irqa == irqb. Cc: stable@vger.kernel.org # 4.7+ Fixes: 8e4447457965 ("KVM: arm/arm64: vgic-new: Add IRQ sorting") Signed-off-by: Zenghui Yu Signed-off-by: Heyi Guo [maz: massaged commit log and patch, added Fixes and Cc-stable] Signed-off-by: Marc Zyngier Signed-off-by: Will Deacon virt/kvm/arm/vgic/vgic.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 2a1a3fa0f29270583f0e6e3100d609e09697add1 Author: Marc Zyngier Date: Sat Aug 24 14:12:31 2019 +0100 kallsyms: Don't let kallsyms_lookup_size_offset() fail on retrieving the first symbol An arm64 kernel configured with CONFIG_KPROBES=y CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set CONFIG_KALLSYMS_BASE_RELATIVE=y reports the following kprobe failure: [ 0.032677] kprobes: failed to populate blacklist: -22 [ 0.033376] Please take care of using kprobes. It appears that kprobe fails to retrieve the symbol at address 0xffff000010081000, despite this symbol being in System.map: ffff000010081000 T __exception_text_start This symbol is part of the first group of aliases in the kallsyms_offsets array (symbol names generated using ugly hacks in scripts/kallsyms.c): kallsyms_offsets: .long 0x1000 // do_undefinstr .long 0x1000 // efi_header_end .long 0x1000 // _stext .long 0x1000 // __exception_text_start .long 0x12b0 // do_cp15instr Looking at the implementation of get_symbol_pos(), it returns the lowest index for aliasing symbols. In this case, it return 0. But kallsyms_lookup_size_offset() considers 0 as a failure, which is obviously wrong (there is definitely a valid symbol living there). In turn, the kprobe blacklisting stops abruptly, hence the original error. A CONFIG_KALLSYMS_ALL kernel wouldn't fail as there is always some random symbols at the beginning of this array, which are never looked up via kallsyms_lookup_size_offset. Fix it by considering that get_symbol_pos() is always successful (which is consistent with the other uses of this function). Fixes: ffc5089196446 ("[PATCH] Create kallsyms_lookup_size_offset()") Reviewed-by: Masami Hiramatsu Cc: Arnaldo Carvalho de Melo Cc: Peter Zijlstra Cc: Will Deacon Cc: Catalin Marinas Signed-off-by: Marc Zyngier Signed-off-by: Will Deacon kernel/kallsyms.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 99300a85260c2b7febd57082a617d1062532067e Author: YueHaibing Date: Tue Aug 27 15:16:36 2019 +0800 NFS: remove set but not used variable 'mapping' Fixes gcc '-Wunused-but-set-variable' warning: fs/nfs/write.c: In function nfs_page_async_flush: fs/nfs/write.c:609:24: warning: variable mapping set but not used [-Wunused-but-set-variable] It is not use since commit aefb623c422e ("NFS: Fix writepage(s) error handling to not report errors twice") Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Trond Myklebust fs/nfs/write.c | 2 -- 1 file changed, 2 deletions(-) commit d33d4beb522987d1c305c12500796f9be3687dee Author: Trond Myklebust Date: Tue Aug 27 07:03:28 2019 -0400 NFSv2: Fix write regression Ensure we update the write result count on success, since the RPC call itself does not do so. Reported-by: Jan Stancek Reported-by: Naresh Kamboju Signed-off-by: Trond Myklebust Tested-by: Jan Stancek fs/nfs/proc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 71affe9be45a5c60b9772e1b2701710712637274 Author: Trond Myklebust Date: Mon Aug 26 20:41:16 2019 -0400 NFSv2: Fix eof handling If we received a reply from the server with a zero length read and no error, then that implies we are at eof. Signed-off-by: Trond Myklebust fs/nfs/proc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c91ff72142b0500a3835b18a3ed9c8dd7490e5c6 Merge: a55aa89aab90 ddfd151f3def Author: Radim Krčmář Date: Tue Aug 27 14:46:17 2019 +0200 Merge tag 'kvm-ppc-fixes-5.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc KVM/PPC fix for 5.3 - Fix bug which could leave locks locked in the host on return to a guest. commit 4d82fa67dd6b0e2635ae9dad44fbf3d747eca9ed Author: Lee Jones Date: Tue Aug 27 07:39:50 2019 +0100 mfd: rk808: Make PM function declaration static Avoids: ../drivers/mfd/rk808.c:771:1: warning: symbol 'rk8xx_pm_ops' \ was not declared. Should it be static? Fixes: 5752bc4373b2 ("mfd: rk808: Mark pm functions __maybe_unused") Reviewed-by: Arnd Bergmann Signed-off-by: Lee Jones drivers/mfd/rk808.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3a069024d371125227de3ac8fa74223fcf473520 Author: Thomas Jarosch Date: Wed Aug 21 16:14:28 2019 +0200 netfilter: nf_conntrack_ftp: Fix debug output The find_pattern() debug output was printing the 'skip' character. This can be a NULL-byte and messes up further pr_debug() output. Output without the fix: kernel: nf_conntrack_ftp: Pattern matches! kernel: nf_conntrack_ftp: Skipped up to `<7>nf_conntrack_ftp: find_pattern `PORT': dlen = 8 kernel: nf_conntrack_ftp: find_pattern `EPRT': dlen = 8 Output with the fix: kernel: nf_conntrack_ftp: Pattern matches! kernel: nf_conntrack_ftp: Skipped up to 0x0 delimiter! kernel: nf_conntrack_ftp: Match succeeded! kernel: nf_conntrack_ftp: conntrack_ftp: match `172,17,0,100,200,207' (20 bytes at 4150681645) kernel: nf_conntrack_ftp: find_pattern `PORT': dlen = 8 Signed-off-by: Thomas Jarosch Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_ftp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3cf2f450fff304be9cf4868bf0df17f253bc5b1c Author: Todd Seidelmann Date: Wed Aug 21 11:47:53 2019 -0400 netfilter: xt_physdev: Fix spurious error message in physdev_mt_check Simplify the check in physdev_mt_check() to emit an error message only when passed an invalid chain (ie, NF_INET_LOCAL_OUT). This avoids cluttering up the log with errors against valid rules. For large/heavily modified rulesets, current behavior can quickly overwhelm the ring buffer, because this function gets called on every change, regardless of the rule that was changed. Signed-off-by: Todd Seidelmann Acked-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/xt_physdev.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit d0d5c0cd1e711c98703f3544c1e6fc1372898de5 Author: David Howells Date: Tue Aug 27 10:13:46 2019 +0100 rxrpc: Use skb_unshare() rather than skb_cow_data() The in-place decryption routines in AF_RXRPC's rxkad security module currently call skb_cow_data() to make sure the data isn't shared and that the skb can be written over. This has a problem, however, as the softirq handler may be still holding a ref or the Rx ring may be holding multiple refs when skb_cow_data() is called in rxkad_verify_packet() - and so skb_shared() returns true and __pskb_pull_tail() dislikes that. If this occurs, something like the following report will be generated. kernel BUG at net/core/skbuff.c:1463! ... RIP: 0010:pskb_expand_head+0x253/0x2b0 ... Call Trace: __pskb_pull_tail+0x49/0x460 skb_cow_data+0x6f/0x300 rxkad_verify_packet+0x18b/0xb10 [rxrpc] rxrpc_recvmsg_data.isra.11+0x4a8/0xa10 [rxrpc] rxrpc_kernel_recv_data+0x126/0x240 [rxrpc] afs_extract_data+0x51/0x2d0 [kafs] afs_deliver_fs_fetch_data+0x188/0x400 [kafs] afs_deliver_to_call+0xac/0x430 [kafs] afs_wait_for_call_to_complete+0x22f/0x3d0 [kafs] afs_make_call+0x282/0x3f0 [kafs] afs_fs_fetch_data+0x164/0x300 [kafs] afs_fetch_data+0x54/0x130 [kafs] afs_readpages+0x20d/0x340 [kafs] read_pages+0x66/0x180 __do_page_cache_readahead+0x188/0x1a0 ondemand_readahead+0x17d/0x2e0 generic_file_read_iter+0x740/0xc10 __vfs_read+0x145/0x1a0 vfs_read+0x8c/0x140 ksys_read+0x4a/0xb0 do_syscall_64+0x43/0xf0 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fix this by using skb_unshare() instead in the input path for DATA packets that have a security index != 0. Non-DATA packets don't need in-place encryption and neither do unencrypted DATA packets. Fixes: 248f219cb8bc ("rxrpc: Rewrite the data and ack handling code") Reported-by: Julian Wollrath Signed-off-by: David Howells include/trace/events/rxrpc.h | 12 ++++++++---- net/rxrpc/ar-internal.h | 1 + net/rxrpc/input.c | 18 ++++++++++++++++++ net/rxrpc/rxkad.c | 32 +++++++++----------------------- net/rxrpc/skbuff.c | 25 ++++++++++++++++++++----- 5 files changed, 56 insertions(+), 32 deletions(-) commit 987db9f7cd1e77e611b770a569068c43949aa6fd Author: David Howells Date: Mon Aug 19 09:25:38 2019 +0100 rxrpc: Use the tx-phase skb flag to simplify tracing Use the previously-added transmit-phase skbuff private flag to simplify the socket buffer tracing a bit. Which phase the skbuff comes from can now be divined from the skb rather than having to be guessed from the call state. We can also reduce the number of rxrpc_skb_trace values by eliminating the difference between Tx and Rx in the symbols. Signed-off-by: David Howells include/trace/events/rxrpc.h | 51 +++++++++++++++++++------------------------- net/rxrpc/ar-internal.h | 1 + net/rxrpc/call_event.c | 8 +++---- net/rxrpc/call_object.c | 6 ++---- net/rxrpc/conn_event.c | 6 +++--- net/rxrpc/input.c | 22 +++++++++---------- net/rxrpc/local_event.c | 4 ++-- net/rxrpc/output.c | 6 +++--- net/rxrpc/peer_event.c | 10 ++++----- net/rxrpc/recvmsg.c | 6 +++--- net/rxrpc/sendmsg.c | 10 ++++----- net/rxrpc/skbuff.c | 15 +++++++------ 12 files changed, 69 insertions(+), 76 deletions(-) commit b311e68420aa52098591988d0d6868b0b7463c0f Author: David Howells Date: Mon Aug 19 09:25:37 2019 +0100 rxrpc: Add a private skb flag to indicate transmission-phase skbs Add a flag in the private data on an skbuff to indicate that this is a transmission-phase buffer rather than a receive-phase buffer. Signed-off-by: David Howells net/rxrpc/ar-internal.h | 1 + net/rxrpc/sendmsg.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) commit a641fd00d05a5ae38c5a3d50d4da10283b15287b Author: David Howells Date: Mon Aug 19 09:25:37 2019 +0100 rxrpc: Abstract out rxtx ring cleanup Abstract out rxtx ring cleanup into its own function from its two callers. This makes it easier to apply the same changes to both. Signed-off-by: David Howells net/rxrpc/call_object.c | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) commit 4858e40303fba12e7506bf4354f20fdf550b3cd5 Author: David Howells Date: Mon Aug 19 09:25:36 2019 +0100 rxrpc: Pass the input handler's data skb reference to the Rx ring Pass the reference held on a DATA skb in the rxrpc input handler into the Rx ring rather than getting an additional ref for this and then dropping the original ref at the end. Signed-off-by: David Howells net/rxrpc/input.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit e2de6c4048989007b353164b19d6b7d5be4fa9e3 Author: David Howells Date: Tue Aug 27 09:51:30 2019 +0100 rxrpc: Use info in skbuff instead of reparsing a jumbo packet Use the information now cached in the skbuff private data to avoid the need to reparse a jumbo packet. We can find all the subpackets by dead reckoning, so it's only necessary to note how many there are, whether the last one is flagged as LAST_PACKET and whether any have the REQUEST_ACK flag set. This is necessary as once recvmsg() can see the packet, it can start modifying it, such as doing in-place decryption. Fixes: 248f219cb8bc ("rxrpc: Rewrite the data and ack handling code") Signed-off-by: David Howells net/rxrpc/ar-internal.h | 3 +- net/rxrpc/input.c | 231 ++++++++++++++++++++++++------------------------ net/rxrpc/recvmsg.c | 41 +++++---- 3 files changed, 139 insertions(+), 136 deletions(-) commit c3c9e3df49f8d83db09d1f61c8bed54e7fed8662 Author: David Howells Date: Mon Aug 19 09:25:37 2019 +0100 rxrpc: Improve jumbo packet counting Improve the information stored about jumbo packets so that we don't need to reparse them so much later. Signed-off-by: David Howells Reviewed-by: Jeffrey Altman net/rxrpc/ar-internal.h | 10 +++++++--- net/rxrpc/input.c | 23 ++++++++++++++--------- net/rxrpc/protocol.h | 9 +++++++++ 3 files changed, 30 insertions(+), 12 deletions(-) commit c96e8483cb2da6695c8b8d0896fe7ae272a07b54 Author: Kirill A. Shutemov Date: Mon Aug 26 16:26:01 2019 +0300 x86/boot/compressed/64: Fix missing initialization in find_trampoline_placement() Gustavo noticed that 'new' can be left uninitialized if 'bios_start' happens to be less or equal to 'entry->addr + entry->size'. Initialize the variable at the begin of the iteration to the current value of 'bios_start'. Fixes: 0a46fff2f910 ("x86/boot/compressed/64: Fix boot on machines with broken E820 table") Reported-by: "Gustavo A. R. Silva" Signed-off-by: Kirill A. Shutemov Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20190826133326.7cxb4vbmiawffv2r@box arch/x86/boot/compressed/pgtable_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 32f0a982650b123bdab36865617d3e03ebcacf3b Author: Lyude Paul Date: Fri Aug 23 16:52:51 2019 -0400 drm/i915: Call dma_set_max_seg_size() in i915_driver_hw_probe() Currently, we don't call dma_set_max_seg_size() for i915 because we intentionally do not limit the segment length that the device supports. However, this results in a warning being emitted if we try to map anything larger than SZ_64K on a kernel with CONFIG_DMA_API_DEBUG_SG enabled: [ 7.751926] DMA-API: i915 0000:00:02.0: mapping sg segment longer than device claims to support [len=98304] [max=65536] [ 7.751934] WARNING: CPU: 5 PID: 474 at kernel/dma/debug.c:1220 debug_dma_map_sg+0x20f/0x340 This was originally brought up on https://bugs.freedesktop.org/show_bug.cgi?id=108517 , and the consensus there was it wasn't really useful to set a limit (and that dma-debug isn't really all that useful for i915 in the first place). Unfortunately though, CONFIG_DMA_API_DEBUG_SG is enabled in the debug configs for various distro kernels. Since a WARN_ON() will disable automatic problem reporting (and cause any CI with said option enabled to start complaining), we really should just fix the problem. Note that as me and Chris Wilson discussed, the other solution for this would be to make DMA-API not make such assumptions when a driver hasn't explicitly set a maximum segment size. But, taking a look at the commit which originally introduced this behavior, commit 78c47830a5cb ("dma-debug: check scatterlist segments"), there is an explicit mention of this assumption and how it applies to devices with no segment size: Conversely, devices which are less limited than the rather conservative defaults, or indeed have no limitations at all (e.g. GPUs with their own internal MMU), should be encouraged to set appropriate dma_parms, as they may get more efficient DMA mapping performance out of it. So unless there's any concerns (I'm open to discussion!), let's just follow suite and call dma_set_max_seg_size() with UINT_MAX as our limit to silence any warnings. Changes since v3: * Drop patch for enabling CONFIG_DMA_API_DEBUG_SG in CI. It looks like just turning it on causes the kernel to spit out bogus WARN_ONs() during some igt tests which would otherwise require teaching igt to disable the various DMA-API debugging options causing this. This is too much work to be worth it, since DMA-API debugging is useless for us. So, we'll just settle with this single patch to squelch WARN_ONs() during driver load for users that have CONFIG_DMA_API_DEBUG_SG turned on for some reason. * Move dma_set_max_seg_size() call into i915_driver_hw_probe() - Chris Wilson Signed-off-by: Lyude Paul Reviewed-by: Chris Wilson Cc: # v4.18+ Link: https://patchwork.freedesktop.org/patch/msgid/20190823205251.14298-1-lyude@redhat.com (cherry picked from commit acd674af95d3f627062007429b9c195c6b32361d) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_drv.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 5b6eefd667847ca6bd6925f7bd1afcecc457c889 Author: Manasi Navare Date: Wed Aug 21 14:59:50 2019 -0700 drm/i915/dp: Fix DSC enable code to use cpu_transcoder instead of encoder->type This patch fixes the intel_configure_pps_for_dsc_encoder() function to use cpu_transcoder instead of encoder->type to select the correct DSC registers that was wrongly used in the original patch for one DSC register isntance. Fixes: 7182414e2530 ("drm/i915/dp: Configure i915 Picture parameter Set registers during DSC enabling") Cc: Ville Syrjala Cc: Maarten Lankhorst Cc: Jani Nikula Cc: # v5.0+ Signed-off-by: Manasi Navare Reviewed-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20190821215950.24223-1-manasi.d.navare@intel.com (cherry picked from commit d4c61c4a16decd8ace8660f22c81609a539fccba) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/display/intel_vdsc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0a3dfbb5cd9033752639ef33e319c2f2863c713a Author: Xiong Zhang Date: Tue Aug 20 13:46:17 2019 +0800 drm/i915: Don't deballoon unused ggtt drm_mm_node in linux guest The following call trace may exist in linux guest dmesg when guest i915 driver is unloaded. [ 90.776610] [drm:vgt_deballoon_space.isra.0 [i915]] deballoon space: range [0x0 - 0x0] 0 KiB. [ 90.776621] BUG: unable to handle kernel NULL pointer dereference at 00000000000000c0 [ 90.776691] IP: drm_mm_remove_node+0x4d/0x320 [drm] [ 90.776718] PGD 800000012c7d0067 P4D 800000012c7d0067 PUD 138e4c067 PMD 0 [ 90.777091] task: ffff9adab60f2f00 task.stack: ffffaf39c0fe0000 [ 90.777142] RIP: 0010:drm_mm_remove_node+0x4d/0x320 [drm] [ 90.777573] Call Trace: [ 90.777653] intel_vgt_deballoon+0x4c/0x60 [i915] [ 90.777729] i915_ggtt_cleanup_hw+0x121/0x190 [i915] [ 90.777792] i915_driver_unload+0x145/0x180 [i915] [ 90.777856] i915_pci_remove+0x15/0x20 [i915] [ 90.777890] pci_device_remove+0x3b/0xc0 [ 90.777916] device_release_driver_internal+0x157/0x220 [ 90.777945] driver_detach+0x39/0x70 [ 90.777967] bus_remove_driver+0x51/0xd0 [ 90.777990] pci_unregister_driver+0x23/0x90 [ 90.778019] SyS_delete_module+0x1da/0x240 [ 90.778045] entry_SYSCALL_64_fastpath+0x24/0x87 [ 90.778072] RIP: 0033:0x7f34312af067 [ 90.778092] RSP: 002b:00007ffdea3da0d8 EFLAGS: 00000206 [ 90.778297] RIP: drm_mm_remove_node+0x4d/0x320 [drm] RSP: ffffaf39c0fe3dc0 [ 90.778344] ---[ end trace f4b1bc8305fc59dd ]--- Four drm_mm_node are used to reserve guest ggtt space, but some of them may be skipped and not initialised due to space constraints in intel_vgt_balloon(). If drm_mm_remove_node() is called with uninitialized drm_mm_node, the above call trace occurs. This patch check drm_mm_node's validity before calling drm_mm_remove_node(). Fixes: ff8f797557c7("drm/i915: return the correct usable aperture size under gvt environment") Cc: stable@vger.kernel.org Signed-off-by: Xiong Zhang Acked-by: Zhenyu Wang Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/1566279978-9659-1-git-send-email-xiong.y.zhang@intel.com (cherry picked from commit 4776f3529d6b1e47f02904ad1d264d25ea22b27b) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_vgpu.c | 3 +++ 1 file changed, 3 insertions(+) commit ed5fa90660d63bcec4c3a62b03fed9427418b53d Author: Ville Syrjälä Date: Tue Aug 20 19:16:57 2019 +0300 drm/i915: Do not create a new max_bpc prop for MST connectors We're not allowed to create new properties after device registration so for MST connectors we need to either create the max_bpc property earlier, or we reuse one we already have. Let's do the latter apporach since the corresponding SST connector already has the prop and its min/max are correct also for the MST connector. The problem was highlighted by commit 4f5368b5541a ("drm/kms: Catch mode_object lifetime errors") which results in the following spew: [ 1330.878941] WARNING: CPU: 2 PID: 1554 at drivers/gpu/drm/drm_mode_object.c:45 __drm_mode_object_add+0xa0/0xb0 [drm] ... [ 1330.879008] Call Trace: [ 1330.879023] drm_property_create+0xba/0x180 [drm] [ 1330.879036] drm_property_create_range+0x15/0x30 [drm] [ 1330.879048] drm_connector_attach_max_bpc_property+0x62/0x80 [drm] [ 1330.879086] intel_dp_add_mst_connector+0x11f/0x140 [i915] [ 1330.879094] drm_dp_add_port.isra.20+0x20b/0x440 [drm_kms_helper] ... Cc: stable@vger.kernel.org Cc: Lyude Paul Cc: sunpeng.li@amd.com Cc: Daniel Vetter Cc: Sean Paul Fixes: 5ca0ef8a56b8 ("drm/i915: Add max_bpc property for DP MST") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190820161657.9658-1-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza Reviewed-by: Lyude Paul (cherry picked from commit 1b9bd09630d4db4827cc04d358a41a16a6bc2cb0) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/display/intel_dp_mst.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 5752bc4373b21c3fb1dd6db4dcdd569fae391a1d Author: Arnd Bergmann Date: Mon Jul 8 14:53:02 2019 +0200 mfd: rk808: Mark pm functions __maybe_unused The newly added suspend/resume functions are only used if CONFIG_PM is enabled: drivers/mfd/rk808.c:752:12: error: 'rk8xx_resume' defined but not used [-Werror=unused-function] drivers/mfd/rk808.c:732:12: error: 'rk8xx_suspend' defined but not used [-Werror=unused-function] Mark them as __maybe_unused so the compiler can silently drop them when they are not needed. Fixes: 586c1b4125b3 ("mfd: rk808: Add RK817 and RK809 support") Signed-off-by: Arnd Bergmann Signed-off-by: Lee Jones drivers/mfd/rk808.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ddfd151f3def9258397fcde7a372205a2d661903 Author: Alexey Kardashevskiy Date: Mon Aug 26 14:55:20 2019 +1000 KVM: PPC: Book3S: Fix incorrect guest-to-user-translation error handling H_PUT_TCE_INDIRECT handlers receive a page with up to 512 TCEs from a guest. Although we verify correctness of TCEs before we do anything with the existing tables, there is a small window when a check in kvmppc_tce_validate might pass and right after that the guest alters the page of TCEs, causing an early exit from the handler and leaving srcu_read_lock(&vcpu->kvm->srcu) (virtual mode) or lock_rmap(rmap) (real mode) locked. This fixes the bug by jumping to the common exit code with an appropriate unlock. Cc: stable@vger.kernel.org # v4.11+ Fixes: 121f80ba68f1 ("KVM: PPC: VFIO: Add in-kernel acceleration for VFIO") Signed-off-by: Alexey Kardashevskiy Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_64_vio.c | 6 ++++-- arch/powerpc/kvm/book3s_64_vio_hv.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) commit 23b7f6c41d4717b1638eca47e09d7e99fc7b9fd9 Author: Kent Russell Date: Fri Aug 23 09:13:18 2019 -0400 drm/powerplay: Fix Vega20 power reading again For the 40.46 SMU release, they changed CurrSocketPower to AverageSocketPower, but this was changed back in 40.47 so just check if it's 40.46 and make the appropriate change Tested with 40.45, 40.46 and 40.47 successfully Signed-off-by: Kent Russell Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 7 ++++--- drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) commit 21649c0b6b7899f4fa3099c46d3d027f60b107ec Author: Kent Russell Date: Thu Aug 22 08:17:40 2019 -0400 drm/powerplay: Fix Vega20 Average Power value v4 The SMU changed reading from CurrSocketPower to AverageSocketPower, so reflect this accordingly. This fixes the issue where Average Power Consumption was being reported as 0 from SMU 40.46-onward v2: Fixed headline prefix v3: Add check for SMU version for proper compatibility v4: Style fix Signed-off-by: Kent Russell Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 5 ++++- drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 10 +++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) commit ede7c460b1da5be7b8ef4efe47f1687babf06408 Author: Naveen N. Rao Date: Thu Aug 22 00:53:58 2019 +0530 bpf: handle 32-bit zext during constant blinding Since BPF constant blinding is performed after the verifier pass, the ALU32 instructions inserted for doubleword immediate loads don't have a corresponding zext instruction. This is causing a kernel oops on powerpc and can be reproduced by running 'test_cgroup_storage' with bpf_jit_harden=2. Fix this by emitting BPF_ZEXT during constant blinding if prog->aux->verifier_zext is set. Fixes: a4b1d3c1ddf6cb ("bpf: verifier: insert zero extension according to analysis result") Reported-by: Michael Ellerman Signed-off-by: Naveen N. Rao Reviewed-by: Jiong Wang Signed-off-by: Daniel Borkmann kernel/bpf/core.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 86c28b2d69f93a218a9a5cef146ed0097a98687f Author: Jiong Wang Date: Fri Aug 23 19:00:28 2019 -0700 nfp: bpf: fix latency bug when updating stack index register NFP is using Local Memory to model stack. LM_addr could be used as base of a 16 32-bit word region of Local Memory. Then, if the stack offset is beyond the current region, the local index needs to be updated. The update needs at least three cycles to take effect, therefore the sequence normally looks like: local_csr_wr[ActLMAddr3, gprB_5] nop nop nop If the local index switch happens on a narrow loads, then the instruction preparing value to zero high 32-bit of the destination register could be counted as one cycle, the sequence then could be something like: local_csr_wr[ActLMAddr3, gprB_5] nop nop immed[gprB_5, 0] However, we have zero extension optimization that zeroing high 32-bit could be eliminated, therefore above IMMED insn won't be available for which case the first sequence needs to be generated. Fixes: 0b4de1ff19bf ("nfp: bpf: eliminate zero extension code-gen") Signed-off-by: Jiong Wang Reviewed-by: Jakub Kicinski Signed-off-by: Jakub Kicinski Signed-off-by: Daniel Borkmann drivers/net/ethernet/netronome/nfp/bpf/jit.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit 42068e1ef961c719f967dbbb4ddcb394a0ba7917 Author: Christian König Date: Fri Aug 16 14:56:35 2019 +0200 drm/amdgpu: fix dma_fence_wait without reference We need to grab a reference to the fence we wait for. Signed-off-by: Christian König Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) commit 96c4145599b30c0eb6cbeaa24207802452dd1872 Author: Trond Myklebust Date: Sat Aug 24 10:39:00 2019 -0400 NFS: Fix writepage(s) error handling to not report errors twice If writepage()/writepages() saw an error, but handled it without reporting it, we should not be re-reporting that error on exit. Signed-off-by: Trond Myklebust fs/nfs/write.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit 8f54c7a4babf58bbaf849e126f7ae9664bdc9e04 Author: Trond Myklebust Date: Thu Aug 15 12:26:05 2019 -0400 NFS: Fix spurious EIO read errors If the client attempts to read a page, but the read fails due to some spurious error (e.g. an ACCESS error or a timeout, ...) then we need to allow other processes to retry. Also try to report errors correctly when doing a synchronous readpage. Signed-off-by: Trond Myklebust fs/nfs/internal.h | 10 ++++++++++ fs/nfs/read.c | 35 ++++++++++++++++++++++++++--------- fs/nfs/write.c | 12 ------------ 3 files changed, 36 insertions(+), 21 deletions(-) commit 7af46292dadcf8870946916f79fdddf79bd7267f Author: Trond Myklebust Date: Fri Aug 23 08:37:50 2019 -0400 pNFS/flexfiles: Don't time out requests on hard mounts If the mount is hard, we should ignore the 'io_maxretrans' module parameter so that we always keep retrying. Signed-off-by: Trond Myklebust fs/nfs/flexfilelayout/flexfilelayout.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit c82e5472c9980e0e483f4b689044150eefaca408 Author: Trond Myklebust Date: Fri Aug 16 08:58:48 2019 -0400 SUNRPC: Handle connection breakages correctly in call_status() If the connection breaks while we're waiting for a reply from the server, then we want to immediately try to reconnect. Fixes: ec6017d90359 ("SUNRPC fix regression in umount of a secure mount") Signed-off-by: Trond Myklebust net/sunrpc/clnt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d5711920ec6e578f51db95caa6f185f5090b865e Author: Trond Myklebust Date: Fri Aug 16 08:37:26 2019 -0400 Revert "NFSv4/flexfiles: Abort I/O early if the layout segment was invalidated" This reverts commit a79f194aa4879e9baad118c3f8bb2ca24dbef765. The mechanism for aborting I/O is racy, since we are not guaranteed that the request is asleep while we're changing both task->tk_status and task->tk_action. Signed-off-by: Trond Myklebust Cc: stable@vger.kernel.org # v5.1 fs/nfs/flexfilelayout/flexfilelayout.c | 17 ----------------- include/linux/sunrpc/sched.h | 1 - net/sunrpc/xprt.c | 7 ------- 3 files changed, 25 deletions(-) commit 80f455da6cd0998a5be30a8af24ea2a22815c212 Author: Trond Myklebust Date: Thu Aug 15 22:55:19 2019 -0400 SUNRPC: Handle EADDRINUSE and ENOBUFS correctly If a connect or bind attempt returns EADDRINUSE, that means we want to retry with a different port. It is not a fatal connection error. Similarly, ENOBUFS is not fatal, but just indicates a memory allocation issue. Retry after a short delay. Signed-off-by: Trond Myklebust net/sunrpc/clnt.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit bf2bf9b80e0cd3568ddc85a241abe0dd8b46ebdc Author: Trond Myklebust Date: Thu Aug 15 20:18:48 2019 -0400 pNFS/flexfiles: Turn off soft RPC calls The pNFS/flexfiles I/O requests are sent with the SOFTCONN flag set, so they automatically time out if the connection breaks. It should therefore not be necessary to have the soft flag set in addition. Fixes: 5f01d9539496 ("nfs41: create NFSv3 DS connection if specified") Signed-off-by: Trond Myklebust fs/nfs/pnfs_nfs.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit bd736ed3e2d1088d9b4050f727342e1e619c3841 Author: Trond Myklebust Date: Thu Aug 15 17:26:17 2019 -0400 SUNRPC: Don't handle errors if the bind/connect succeeded Don't handle errors in call_bind_status()/call_connect_status() if it turns out that a previous call caused it to succeed. Signed-off-by: Trond Myklebust Cc: stable@vger.kernel.org # v5.1+ net/sunrpc/clnt.c | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) commit 558682b5291937a70748d36fd9ba757fb25b99ae Author: Bandan Das Date: Mon Aug 26 06:15:13 2019 -0400 x86/apic: Include the LDR when clearing out APIC registers Although APIC initialization will typically clear out the LDR before setting it, the APIC cleanup code should reset the LDR. This was discovered with a 32-bit KVM guest jumping into a kdump kernel. The stale bits in the LDR triggered a bug in the KVM APIC implementation which caused the destination mapping for VCPUs to be corrupted. Note that this isn't intended to paper over the KVM APIC bug. The kernel has to clear the LDR when resetting the APIC registers except when X2APIC is enabled. This lacks a Fixes tag because missing to clear LDR goes way back into pre git history. [ tglx: Made x2apic_enabled a function call as required ] Signed-off-by: Bandan Das Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20190826101513.5080-3-bsd@redhat.com arch/x86/kernel/apic/apic.c | 4 ++++ 1 file changed, 4 insertions(+) commit bae3a8d3308ee69a7dbdf145911b18dfda8ade0d Author: Bandan Das Date: Mon Aug 26 06:15:12 2019 -0400 x86/apic: Do not initialize LDR and DFR for bigsmp Legacy apic init uses bigsmp for smp systems with 8 and more CPUs. The bigsmp APIC implementation uses physical destination mode, but it nevertheless initializes LDR and DFR. The LDR even ends up incorrectly with multiple bit being set. This does not cause a functional problem because LDR and DFR are ignored when physical destination mode is active, but it triggered a problem on a 32-bit KVM guest which jumps into a kdump kernel. The multiple bits set unearthed a bug in the KVM APIC implementation. The code which creates the logical destination map for VCPUs ignores the disabled state of the APIC and ends up overwriting an existing valid entry and as a result, APIC calibration hangs in the guest during kdump initialization. Remove the bogus LDR/DFR initialization. This is not intended to work around the KVM APIC bug. The LDR/DFR ininitalization is wrong on its own. The issue goes back into the pre git history. The fixes tag is the commit in the bitkeeper import which introduced bigsmp support in 2003. git://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git Fixes: db7b9e9f26b8 ("[PATCH] Clustered APIC setup for >8 CPU systems") Suggested-by: Thomas Gleixner Signed-off-by: Bandan Das Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20190826101513.5080-2-bsd@redhat.com arch/x86/kernel/apic/bigsmp_32.c | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) commit 2f029413cbfbfe519d294c6ac83a0c00e2a48a97 Author: Nick Desaulniers Date: Mon Aug 12 14:50:35 2019 -0700 arc: prefer __section from compiler_attributes.h Reported-by: Sedat Dilek Suggested-by: Josh Poimboeuf Signed-off-by: Nick Desaulniers Signed-off-by: Vineet Gupta arch/arc/include/asm/linkage.h | 8 ++++---- arch/arc/include/asm/mach_desc.h | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) commit d85f6b93a76e74f1cbd0c14fb685cc1bc8df9044 Author: Mischa Jonker Date: Wed Jul 24 14:04:36 2019 +0200 dt-bindings: IDU-intc: Add support for edge-triggered interrupts This updates the documentation for supporting an optional extra interrupt cell to specify edge vs level triggered. Signed-off-by: Mischa Jonker Reviewed-by: Rob Herring Signed-off-by: Vineet Gupta .../interrupt-controller/snps,archs-idu-intc.txt | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit 01449985e644329e1fd5c269fff07b9a539eeebf Author: Mischa Jonker Date: Wed Jul 24 14:04:35 2019 +0200 dt-bindings: IDU-intc: Clean up documentation * Some lines exceeded 80 characters. * Clarified statement about AUX register interface Signed-off-by: Mischa Jonker Reviewed-by: Rob Herring Signed-off-by: Vineet Gupta .../bindings/interrupt-controller/snps,archs-idu-intc.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 174ae4e96e0f54958cbe3fd3090a3cefeb63af4d Author: Mischa Jonker Date: Wed Jul 24 14:04:34 2019 +0200 ARCv2: IDU-intc: Add support for edge-triggered interrupts This adds support for an optional extra interrupt cell to specify edge vs level triggered. It is backward compatible with dts files with only one cell, and will default to level-triggered in such a case. Note that I had to make a change to idu_irq_set_affinity as well, as this function was setting the interrupt type to "level" unconditionally, since this was the only type supported previously. Signed-off-by: Mischa Jonker Reviewed-by: Vineet Gupta Signed-off-by: Vineet Gupta arch/arc/kernel/mcip.c | 60 +++++++++++++++++++++++++++++++++++++++++++++----- include/soc/arc/mcip.h | 11 +++++++++ 2 files changed, 65 insertions(+), 6 deletions(-) commit 2fd2329393658514db074abd4f7dea8da1c20f81 Author: Takashi Sakamoto Date: Mon Aug 26 22:55:15 2019 +0900 ALSA: oxfw: fix to handle correct stream for PCM playback When userspace application calls ioctl(2) to configure hardware for PCM playback substream, ALSA OXFW driver handles incoming AMDTP stream. In this case, outgoing AMDTP stream should be handled. This commit fixes the bug for v5.3-rc kernel. Fixes: 4f380d007052 ("ALSA: oxfw: configure packet format in pcm.hw_params callback") Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/oxfw/oxfw-pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9212ec7d8357ea630031e89d0d399c761421c83b Author: Sebastian Mayr Date: Sun Jul 28 17:26:17 2019 +0200 uprobes/x86: Fix detection of 32-bit user mode 32-bit processes running on a 64-bit kernel are not always detected correctly, causing the process to crash when uretprobes are installed. The reason for the crash is that in_ia32_syscall() is used to determine the process's mode, which only works correctly when called from a syscall. In the case of uretprobes, however, the function is called from a exception and always returns 'false' on a 64-bit kernel. In consequence this leads to corruption of the process's return address. Fix this by using user_64bit_mode() instead of in_ia32_syscall(), which is correct in any situation. [ tglx: Add a comment and the following historical info ] This should have been detected by the rename which happened in commit abfb9498ee13 ("x86/entry: Rename is_{ia32,x32}_task() to in_{ia32,x32}_syscall()") which states in the changelog: The is_ia32_task()/is_x32_task() function names are a big misnomer: they suggests that the compat-ness of a system call is a task property, which is not true, the compatness of a system call purely depends on how it was invoked through the system call layer. ..... and then it went and blindly renamed every call site. Sadly enough this was already mentioned here: 8faaed1b9f50 ("uprobes/x86: Introduce sizeof_long(), cleanup adjust_ret_addr() and arch_uretprobe_hijack_return_addr()") where the changelog says: TODO: is_ia32_task() is not what we actually want, TS_COMPAT does not necessarily mean 32bit. Fortunately syscall-like insns can't be probed so it actually works, but it would be better to rename and use is_ia32_frame(). and goes all the way back to: 0326f5a94dde ("uprobes/core: Handle breakpoint and singlestep exceptions") Oh well. 7+ years until someone actually tried a uretprobe on a 32bit process on a 64bit kernel.... Fixes: 0326f5a94dde ("uprobes/core: Handle breakpoint and singlestep exceptions") Signed-off-by: Sebastian Mayr Signed-off-by: Thomas Gleixner Cc: Masami Hiramatsu Cc: Dmitry Safonov Cc: Oleg Nesterov Cc: Srikar Dronamraju Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20190728152617.7308-1-me@sam.st arch/x86/kernel/uprobes.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 3e5bedc2c258341702ddffbd7688c5e6eb01eafa Author: Thomas Gleixner Date: Wed Aug 21 15:16:31 2019 +0200 x86/apic: Fix arch_dynirq_lower_bound() bug for DT enabled machines Rahul Tanwar reported the following bug on DT systems: > 'ioapic_dynirq_base' contains the virtual IRQ base number. Presently, it is > updated to the end of hardware IRQ numbers but this is done only when IOAPIC > configuration type is IOAPIC_DOMAIN_LEGACY or IOAPIC_DOMAIN_STRICT. There is > a third type IOAPIC_DOMAIN_DYNAMIC which applies when IOAPIC configuration > comes from devicetree. > > See dtb_add_ioapic() in arch/x86/kernel/devicetree.c > > In case of IOAPIC_DOMAIN_DYNAMIC (DT/OF based system), 'ioapic_dynirq_base' > remains to zero initialized value. This means that for OF based systems, > virtual IRQ base will get set to zero. Such systems will very likely not even boot. For DT enabled machines ioapic_dynirq_base is irrelevant and not updated, so simply map the IRQ base 1:1 instead. Reported-by: Rahul Tanwar Tested-by: Rahul Tanwar Tested-by: Andy Shevchenko Signed-off-by: Thomas Gleixner Cc: Alexander Shishkin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: alan@linux.intel.com Cc: bp@alien8.de Cc: cheol.yong.kim@intel.com Cc: qi-ming.wu@intel.com Cc: rahul.tanwar@intel.com Cc: rppt@linux.ibm.com Cc: tony.luck@intel.com Link: http://lkml.kernel.org/r/20190821081330.1187-1-rahul.tanwar@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/kernel/apic/io_apic.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit f53a7ad189594a112167efaf17ea8d0242b5ac00 Author: Prashant Malani Date: Sat Aug 24 01:36:19 2019 -0700 r8152: Set memory to all 0xFFs on failed reg reads get_registers() blindly copies the memory written to by the usb_control_msg() call even if the underlying urb failed. This could lead to junk register values being read by the driver, since some indirect callers of get_registers() ignore the return values. One example is: ocp_read_dword() ignores the return value of generic_ocp_read(), which calls get_registers(). So, emulate PCI "Master Abort" behavior by setting the buffer to all 0xFFs when usb_control_msg() fails. This patch is copied from the r8152 driver (v2.12.0) published by Realtek (www.realtek.com). Signed-off-by: Prashant Malani Acked-by: Hayes Wang Signed-off-by: David S. Miller drivers/net/usb/r8152.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 7177895154e6a35179d332f4a584d396c50d0612 Author: Yi-Hung Wei Date: Thu Aug 22 13:17:50 2019 -0700 openvswitch: Fix conntrack cache with timeout This patch addresses a conntrack cache issue with timeout policy. Currently, we do not check if the timeout extension is set properly in the cached conntrack entry. Thus, after packet recirculate from conntrack action, the timeout policy is not applied properly. This patch fixes the aforementioned issue. Fixes: 06bd2bdf19d2 ("openvswitch: Add timeout support to ct action") Reported-by: kbuild test robot Signed-off-by: Yi-Hung Wei Acked-by: Pravin B Shelar Signed-off-by: David S. Miller net/openvswitch/conntrack.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 803f3e22ae10003a83c781498c0ac34cfe3463ff Author: Alexey Kodanev Date: Fri Aug 23 20:51:43 2019 +0300 ipv4: mpls: fix mpls_xmit for iptunnel When using mpls over gre/gre6 setup, rt->rt_gw4 address is not set, the same for rt->rt_gw_family. Therefore, when rt->rt_gw_family is checked in mpls_xmit(), neigh_xmit() call is skipped. As a result, such setup doesn't work anymore. This issue was found with LTP mpls03 tests. Fixes: 1550c171935d ("ipv4: Prepare rtable for IPv6 gateway") Signed-off-by: Alexey Kodanev Reviewed-by: David Ahern Signed-off-by: David S. Miller net/mpls/mpls_iptunnel.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9b5f684182403f2b338f797c44eca0061c797dc8 Author: David Ahern Date: Sun Aug 25 07:47:30 2019 -0700 nexthop: Fix nexthop_num_path for blackhole nexthops Donald reported this sequence: ip next add id 1 blackhole ip next add id 2 blackhole ip ro add 1.1.1.1/32 nhid 1 ip ro add 1.1.1.2/32 nhid 2 would cause a crash. Backtrace is: [ 151.302790] general protection fault: 0000 [#1] SMP DEBUG_PAGEALLOC KASAN PTI [ 151.304043] CPU: 1 PID: 277 Comm: ip Not tainted 5.3.0-rc5+ #37 [ 151.305078] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.11.1-1 04/01/2014 [ 151.306526] RIP: 0010:fib_add_nexthop+0x8b/0x2aa [ 151.307343] Code: 35 f7 81 48 8d 14 01 c7 02 f1 f1 f1 f1 c7 42 04 01 f4 f4 f4 48 89 f2 48 c1 ea 03 65 48 8b 0c 25 28 00 00 00 48 89 4d d0 31 c9 <80> 3c 02 00 74 08 48 89 f7 e8 1a e8 53 ff be 08 00 00 00 4c 89 e7 [ 151.310549] RSP: 0018:ffff888116c27340 EFLAGS: 00010246 [ 151.311469] RAX: dffffc0000000000 RBX: ffff8881154ece00 RCX: 0000000000000000 [ 151.312713] RDX: 0000000000000004 RSI: 0000000000000020 RDI: ffff888115649b40 [ 151.313968] RBP: ffff888116c273d8 R08: ffffed10221e3757 R09: ffff888110f1bab8 [ 151.315212] R10: 0000000000000001 R11: ffff888110f1bab3 R12: ffff888115649b40 [ 151.316456] R13: 0000000000000020 R14: ffff888116c273b0 R15: ffff888115649b40 [ 151.317707] FS: 00007f60b4d8d800(0000) GS:ffff88811ac00000(0000) knlGS:0000000000000000 [ 151.319113] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 151.320119] CR2: 0000555671ffdc00 CR3: 00000001136ba005 CR4: 0000000000020ee0 [ 151.321367] Call Trace: [ 151.321820] ? fib_nexthop_info+0x635/0x635 [ 151.322572] fib_dump_info+0xaa4/0xde0 [ 151.323247] ? fib_create_info+0x2431/0x2431 [ 151.324008] ? napi_alloc_frag+0x2a/0x2a [ 151.324711] rtmsg_fib+0x2c4/0x3be [ 151.325339] fib_table_insert+0xe2f/0xeee ... fib_dump_info incorrectly has nhs = 0 for blackhole nexthops, so it believes the nexthop object is a multipath group (nhs != 1) and ends up down the nexthop_mpath_fill_node() path which is wrong for a blackhole. The blackhole check in nexthop_num_path is leftover from early days of the blackhole implementation which did not initialize the device. In the end the design was simpler (fewer special case checks) to set the device to loopback in nh_info, so the check in nexthop_num_path should have been removed. Fixes: 430a049190de ("nexthop: Add support for nexthop groups") Reported-by: Donald Sharp Signed-off-by: David Ahern Signed-off-by: David S. Miller include/net/nexthop.h | 6 ------ 1 file changed, 6 deletions(-) commit a55aa89aab90fae7c815b0551b07be37db359d76 Author: Linus Torvalds Date: Sun Aug 25 12:01:23 2019 -0700 Linux 5.3-rc6 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c749088f254303c57cb3eaed2b29beaae145cef3 Merge: 32ae83ffec63 a180d023ec7b Author: Linus Torvalds Date: Sun Aug 25 11:43:17 2019 -0700 Merge tag 'auxdisplay-for-linus-v5.3-rc7' of git://github.com/ojeda/linux Pull auxdisplay cleanup from Miguel Ojeda: "Make ht16k33_fb_fix and ht16k33_fb_var constant (Nishka Dasgupta)" * tag 'auxdisplay-for-linus-v5.3-rc7' of git://github.com/ojeda/linux: auxdisplay: ht16k33: Make ht16k33_fb_fix and ht16k33_fb_var constant commit 32ae83ffec6373c226d177bdbbbb156962cc638e Merge: 94a76d9b525c e0917f879536 Author: Linus Torvalds Date: Sun Aug 25 11:40:24 2019 -0700 Merge tag 'for-linus-5.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml Pull UML fix from Richard Weinberger: "Fix time travel mode" * tag 'for-linus-5.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml: um: fix time travel mode commit 94a76d9b525c2dd81af2a98e26fe01f99b20727d Merge: 146c3d3220e0 0af83abbd4a6 Author: Linus Torvalds Date: Sun Aug 25 11:29:27 2019 -0700 Merge tag 'for-linus-5.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs Pull UBIFS and JFFS2 fixes from Richard Weinberger: "UBIFS: - Don't block too long in writeback_inodes_sb() - Fix for a possible overrun of the log head - Fix double unlock in orphan_delete() JFFS2: - Remove C++ style from UAPI header and unbreak picky toolchains" * tag 'for-linus-5.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs: ubifs: Limit the number of pages in shrink_liability ubifs: Correctly initialize c->min_log_bytes ubifs: Fix double unlock around orphan_delete() jffs2: Remove C++ style comments from uapi header commit 146c3d3220e039b5d61bf810e0b42218eb020f39 Merge: 5a13fc3d8ba0 b63f20a778c8 Author: Linus Torvalds Date: Sun Aug 25 10:10:15 2019 -0700 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Thomas Gleixner: "A few fixes for x86: - Fix a boot regression caused by the recent bootparam sanitizing change, which escaped the attention of all people who reviewed that code. - Address a boot problem on machines with broken E820 tables caused by an underflow which ended up placing the trampoline start at physical address 0. - Handle machines which do not advertise a legacy timer of any form, but need calibration of the local APIC timer gracefully by making the calibration routine independent from the tick interrupt. Marked for stable as well as there seems to be quite some new laptops rolled out which expose this. - Clear the RDRAND CPUID bit on AMD family 15h and 16h CPUs which are affected by broken firmware which does not initialize RDRAND correctly after resume. Add a command line parameter to override this for machine which either do not use suspend/resume or have a fixed BIOS. Unfortunately there is no way to detect this on boot, so the only safe decision is to turn it off by default. - Prevent RFLAGS from being clobbers in CALL_NOSPEC on 32bit which caused fast KVM instruction emulation to break. - Explain the Intel CPU model naming convention so that the repeating discussions come to an end" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/retpoline: Don't clobber RFLAGS during CALL_NOSPEC on i386 x86/boot: Fix boot regression caused by bootparam sanitizing x86/CPU/AMD: Clear RDRAND CPUID bit on AMD family 15h/16h x86/boot/compressed/64: Fix boot on machines with broken E820 table x86/apic: Handle missing global clockevent gracefully x86/cpu: Explain Intel model naming convention commit 5a13fc3d8ba00b786056e6fd3612b5102590992f Merge: 8a04c2ee62a4 b99328a60a48 Author: Linus Torvalds Date: Sun Aug 25 10:08:01 2019 -0700 Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timekeeping fix from Thomas Gleixner: "A single fix for a regression caused by the generic VDSO implementation where a math overflow causes CLOCK_BOOTTIME to become a random number generator" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: timekeeping/vsyscall: Prevent math overflow in BOOTTIME update commit 8a04c2ee62a4020cf1b7818c300626819d62ff5e Merge: 05bbb9360a00 b0fdc01354f4 Author: Linus Torvalds Date: Sun Aug 25 10:06:12 2019 -0700 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fix from Thomas Gleixner: "Handle the worker management in situations where a task is scheduled out on a PI lock contention correctly and schedule a new worker if possible" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/core: Schedule new worker even if PI-blocked commit 05bbb9360a000f509537a84554d69fb891fa7332 Merge: 44c471e43698 f1c6ece23729 Author: Linus Torvalds Date: Sun Aug 25 10:03:32 2019 -0700 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Thomas Gleixner: "Two small fixes for kprobes and perf: - Prevent a deadlock in kprobe_optimizer() causes by reverse lock ordering - Fix a comment typo" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: kprobes: Fix potential deadlock in kprobe_optimizer() perf/x86: Fix typo in comment commit 44c471e43698d966d2bf291a9631f7d22a861bbd Merge: f47edb59bb48 d0ff14fdc987 Author: Linus Torvalds Date: Sun Aug 25 10:00:21 2019 -0700 Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fix from Thomas Gleixner: "A single fix for a imbalanced kobject operation in the irq decriptor code which was unearthed by the new warnings in the kobject code" * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: genirq: Properly pair kobject_del() with kobject_add() commit f47edb59bb4897a5d495139bb12e93cd3f0cbded Merge: e67095fd2f72 00fb24a42a68 Author: Linus Torvalds Date: Sun Aug 25 09:56:27 2019 -0700 Merge branch 'akpm' (patches from Andrew) Mergr misc fixes from Andrew Morton: "11 fixes" Mostly VM fixes, one psi polling fix, and one parisc build fix. * emailed patches from Andrew Morton : mm/kasan: fix false positive invalid-free reports with CONFIG_KASAN_SW_TAGS=y mm/zsmalloc.c: fix race condition in zs_destroy_pool mm/zsmalloc.c: migration can leave pages in ZS_EMPTY indefinitely mm, page_owner: handle THP splits correctly userfaultfd_release: always remove uffd flags and clear vm_userfaultfd_ctx psi: get poll_work to run when calling poll syscall next time mm: memcontrol: flush percpu vmevents before releasing memcg mm: memcontrol: flush percpu vmstats before releasing memcg parisc: fix compilation errrors mm, page_alloc: move_freepages should not examine struct page of reserved memory mm/z3fold.c: fix race between migration and destruction commit 75545304eba6a3d282f923b96a466dc25a81e359 Author: Takashi Iwai Date: Sun Aug 25 09:21:44 2019 +0200 ALSA: seq: Fix potential concurrent access to the deleted pool The input pool of a client might be deleted via the resize ioctl, the the access to it should be covered by the proper locks. Currently the only missing place is the call in snd_seq_ioctl_get_client_pool(), and this patch papers over it. Reported-by: syzbot+4a75454b9ca2777f35c7@syzkaller.appspotmail.com Cc: Signed-off-by: Takashi Iwai sound/core/seq/seq_clientmgr.c | 3 +-- sound/core/seq/seq_fifo.c | 17 +++++++++++++++++ sound/core/seq/seq_fifo.h | 2 ++ 3 files changed, 20 insertions(+), 2 deletions(-) commit e67095fd2f727c35e510d831c588696f2138a1bb Merge: 083f0f2cd402 90ae409f9eb3 Author: Linus Torvalds Date: Sat Aug 24 20:00:11 2019 -0700 Merge tag 'dma-mapping-5.3-5' of git://git.infradead.org/users/hch/dma-mapping Pull dma-mapping fixes from Christoph Hellwig: "Two fixes for regressions in this merge window: - select the Kconfig symbols for the noncoherent dma arch helpers on arm if swiotlb is selected, not just for LPAE to not break then Xen build, that uses swiotlb indirectly through swiotlb-xen - fix the page allocator fallback in dma_alloc_contiguous if the CMA allocation fails" * tag 'dma-mapping-5.3-5' of git://git.infradead.org/users/hch/dma-mapping: dma-direct: fix zone selection after an unaddressable CMA allocation arm: select the dma-noncoherent symbols for all swiotlb builds commit 00fb24a42a68b1ee0f6495993fe1be7124433dfb Author: Andrey Ryabinin Date: Sat Aug 24 17:55:09 2019 -0700 mm/kasan: fix false positive invalid-free reports with CONFIG_KASAN_SW_TAGS=y The code like this: ptr = kmalloc(size, GFP_KERNEL); page = virt_to_page(ptr); offset = offset_in_page(ptr); kfree(page_address(page) + offset); may produce false-positive invalid-free reports on the kernel with CONFIG_KASAN_SW_TAGS=y. In the example above we lose the original tag assigned to 'ptr', so kfree() gets the pointer with 0xFF tag. In kfree() we check that 0xFF tag is different from the tag in shadow hence print false report. Instead of just comparing tags, do the following: 1) Check that shadow doesn't contain KASAN_TAG_INVALID. Otherwise it's double-free and it doesn't matter what tag the pointer have. 2) If pointer tag is different from 0xFF, make sure that tag in the shadow is the same as in the pointer. Link: http://lkml.kernel.org/r/20190819172540.19581-1-aryabinin@virtuozzo.com Fixes: 7f94ffbc4c6a ("kasan: add hooks implementation for tag-based mode") Signed-off-by: Andrey Ryabinin Reported-by: Walter Wu Reported-by: Mark Rutland Reviewed-by: Andrey Konovalov Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Catalin Marinas Cc: Will Deacon Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/kasan/common.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 701d678599d0c1623aaf4139c03eea260a75b027 Author: Henry Burns Date: Sat Aug 24 17:55:06 2019 -0700 mm/zsmalloc.c: fix race condition in zs_destroy_pool In zs_destroy_pool() we call flush_work(&pool->free_work). However, we have no guarantee that migration isn't happening in the background at that time. Since migration can't directly free pages, it relies on free_work being scheduled to free the pages. But there's nothing preventing an in-progress migrate from queuing the work *after* zs_unregister_migration() has called flush_work(). Which would mean pages still pointing at the inode when we free it. Since we know at destroy time all objects should be free, no new migrations can come in (since zs_page_isolate() fails for fully-free zspages). This means it is sufficient to track a "# isolated zspages" count by class, and have the destroy logic ensure all such pages have drained before proceeding. Keeping that state under the class spinlock keeps the logic straightforward. In this case a memory leak could lead to an eventual crash if compaction hits the leaked page. This crash would only occur if people are changing their zswap backend at runtime (which eventually starts destruction). Link: http://lkml.kernel.org/r/20190809181751.219326-2-henryburns@google.com Fixes: 48b4800a1c6a ("zsmalloc: page migration support") Signed-off-by: Henry Burns Reviewed-by: Sergey Senozhatsky Cc: Henry Burns Cc: Minchan Kim Cc: Shakeel Butt Cc: Jonathan Adams Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/zsmalloc.c | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 59 insertions(+), 2 deletions(-) commit 1a87aa03597efa9641e92875b883c94c7f872ccb Author: Henry Burns Date: Sat Aug 24 17:55:03 2019 -0700 mm/zsmalloc.c: migration can leave pages in ZS_EMPTY indefinitely In zs_page_migrate() we call putback_zspage() after we have finished migrating all pages in this zspage. However, the return value is ignored. If a zs_free() races in between zs_page_isolate() and zs_page_migrate(), freeing the last object in the zspage, putback_zspage() will leave the page in ZS_EMPTY for potentially an unbounded amount of time. To fix this, we need to do the same thing as zs_page_putback() does: schedule free_work to occur. To avoid duplicated code, move the sequence to a new putback_zspage_deferred() function which both zs_page_migrate() and zs_page_putback() call. Link: http://lkml.kernel.org/r/20190809181751.219326-1-henryburns@google.com Fixes: 48b4800a1c6a ("zsmalloc: page migration support") Signed-off-by: Henry Burns Reviewed-by: Sergey Senozhatsky Cc: Henry Burns Cc: Minchan Kim Cc: Shakeel Butt Cc: Jonathan Adams Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/zsmalloc.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit f7da677bc6e72033f0981b9d58b5c5d409fa641e Author: Vlastimil Babka Date: Sat Aug 24 17:54:59 2019 -0700 mm, page_owner: handle THP splits correctly THP splitting path is missing the split_page_owner() call that split_page() has. As a result, split THP pages are wrongly reported in the page_owner file as order-9 pages. Furthermore when the former head page is freed, the remaining former tail pages are not listed in the page_owner file at all. This patch fixes that by adding the split_page_owner() call into __split_huge_page(). Link: http://lkml.kernel.org/r/20190820131828.22684-2-vbabka@suse.cz Fixes: a9627bc5e34e ("mm/page_owner: introduce split_page_owner and replace manual handling") Reported-by: Kirill A. Shutemov Signed-off-by: Vlastimil Babka Cc: Michal Hocko Cc: Mel Gorman Cc: Matthew Wilcox Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/huge_memory.c | 4 ++++ 1 file changed, 4 insertions(+) commit 46d0b24c5ee10a15dfb25e20642f5a5ed59c5003 Author: Oleg Nesterov Date: Sat Aug 24 17:54:56 2019 -0700 userfaultfd_release: always remove uffd flags and clear vm_userfaultfd_ctx userfaultfd_release() should clear vm_flags/vm_userfaultfd_ctx even if mm->core_state != NULL. Otherwise a page fault can see userfaultfd_missing() == T and use an already freed userfaultfd_ctx. Link: http://lkml.kernel.org/r/20190820160237.GB4983@redhat.com Fixes: 04f5866e41fb ("coredump: fix race condition between mmget_not_zero()/get_task_mm() and core dumping") Signed-off-by: Oleg Nesterov Reported-by: Kefeng Wang Reviewed-by: Andrea Arcangeli Tested-by: Kefeng Wang Cc: Peter Xu Cc: Mike Rapoport Cc: Jann Horn Cc: Jason Gunthorpe Cc: Michal Hocko Cc: Tetsuo Handa Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/userfaultfd.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) commit 7b2b55da1db10a5525460633ae4b6fb0be060c41 Author: Jason Xing Date: Sat Aug 24 17:54:53 2019 -0700 psi: get poll_work to run when calling poll syscall next time Only when calling the poll syscall the first time can user receive POLLPRI correctly. After that, user always fails to acquire the event signal. Reproduce case: 1. Get the monitor code in Documentation/accounting/psi.txt 2. Run it, and wait for the event triggered. 3. Kill and restart the process. The question is why we can end up with poll_scheduled = 1 but the work not running (which would reset it to 0). And the answer is because the scheduling side sees group->poll_kworker under RCU protection and then schedules it, but here we cancel the work and destroy the worker. The cancel needs to pair with resetting the poll_scheduled flag. Link: http://lkml.kernel.org/r/1566357985-97781-1-git-send-email-joseph.qi@linux.alibaba.com Signed-off-by: Jason Xing Signed-off-by: Joseph Qi Reviewed-by: Caspar Zhang Reviewed-by: Suren Baghdasaryan Acked-by: Johannes Weiner Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/sched/psi.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit bb65f89b7d3d305c14951f49860711fbcae70692 Author: Roman Gushchin Date: Sat Aug 24 17:54:50 2019 -0700 mm: memcontrol: flush percpu vmevents before releasing memcg Similar to vmstats, percpu caching of local vmevents leads to an accumulation of errors on non-leaf levels. This happens because some leftovers may remain in percpu caches, so that they are never propagated up by the cgroup tree and just disappear into nonexistence with on releasing of the memory cgroup. To fix this issue let's accumulate and propagate percpu vmevents values before releasing the memory cgroup similar to what we're doing with vmstats. Since on cpu hotplug we do flush percpu vmstats anyway, we can iterate only over online cpus. Link: http://lkml.kernel.org/r/20190819202338.363363-4-guro@fb.com Fixes: 42a300353577 ("mm: memcontrol: fix recursive statistics correctness & scalabilty") Signed-off-by: Roman Gushchin Acked-by: Michal Hocko Cc: Johannes Weiner Cc: Vladimir Davydov Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memcontrol.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) commit c350a99ea2b1b666c28948d74ab46c16913c28a7 Author: Roman Gushchin Date: Sat Aug 24 17:54:47 2019 -0700 mm: memcontrol: flush percpu vmstats before releasing memcg Percpu caching of local vmstats with the conditional propagation by the cgroup tree leads to an accumulation of errors on non-leaf levels. Let's imagine two nested memory cgroups A and A/B. Say, a process belonging to A/B allocates 100 pagecache pages on the CPU 0. The percpu cache will spill 3 times, so that 32*3=96 pages will be accounted to A/B and A atomic vmstat counters, 4 pages will remain in the percpu cache. Imagine A/B is nearby memory.max, so that every following allocation triggers a direct reclaim on the local CPU. Say, each such attempt will free 16 pages on a new cpu. That means every percpu cache will have -16 pages, except the first one, which will have 4 - 16 = -12. A/B and A atomic counters will not be touched at all. Now a user removes A/B. All percpu caches are freed and corresponding vmstat numbers are forgotten. A has 96 pages more than expected. As memory cgroups are created and destroyed, errors do accumulate. Even 1-2 pages differences can accumulate into large numbers. To fix this issue let's accumulate and propagate percpu vmstat values before releasing the memory cgroup. At this point these numbers are stable and cannot be changed. Since on cpu hotplug we do flush percpu vmstats anyway, we can iterate only over online cpus. Link: http://lkml.kernel.org/r/20190819202338.363363-2-guro@fb.com Fixes: 42a300353577 ("mm: memcontrol: fix recursive statistics correctness & scalabilty") Signed-off-by: Roman Gushchin Acked-by: Michal Hocko Cc: Johannes Weiner Cc: Vladimir Davydov Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memcontrol.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit bbcb03a97ffe49169f02d34eff2ced56ddaafb4f Author: Qian Cai Date: Sat Aug 24 17:54:43 2019 -0700 parisc: fix compilation errrors Commit 0cfaee2af3a0 ("include/asm-generic/5level-fixup.h: fix variable 'p4d' set but not used") converted a few functions from macros to static inline, which causes parisc to complain, In file included from include/asm-generic/4level-fixup.h:38:0, from arch/parisc/include/asm/pgtable.h:5, from arch/parisc/include/asm/io.h:6, from include/linux/io.h:13, from sound/core/memory.c:9: include/asm-generic/5level-fixup.h:14:18: error: unknown type name 'pgd_t'; did you mean 'pid_t'? #define p4d_t pgd_t ^ include/asm-generic/5level-fixup.h:24:28: note: in expansion of macro 'p4d_t' static inline int p4d_none(p4d_t p4d) ^~~~~ It is because "4level-fixup.h" is included before "asm/page.h" where "pgd_t" is defined. Link: http://lkml.kernel.org/r/20190815205305.1382-1-cai@lca.pw Fixes: 0cfaee2af3a0 ("include/asm-generic/5level-fixup.h: fix variable 'p4d' set but not used") Signed-off-by: Qian Cai Reported-by: Guenter Roeck Tested-by: Guenter Roeck Cc: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/parisc/include/asm/pgtable.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit cd961038381f392b364a7c4a040f4576ca415b1a Author: David Rientjes Date: Sat Aug 24 17:54:40 2019 -0700 mm, page_alloc: move_freepages should not examine struct page of reserved memory After commit 907ec5fca3dc ("mm: zero remaining unavailable struct pages"), struct page of reserved memory is zeroed. This causes page->flags to be 0 and fixes issues related to reading /proc/kpageflags, for example, of reserved memory. The VM_BUG_ON() in move_freepages_block(), however, assumes that page_zone() is meaningful even for reserved memory. That assumption is no longer true after the aforementioned commit. There's no reason why move_freepages_block() should be testing the legitimacy of page_zone() for reserved memory; its scope is limited only to pages on the zone's freelist. Note that pfn_valid() can be true for reserved memory: there is a backing struct page. The check for page_to_nid(page) is also buggy but reserved memory normally only appears on node 0 so the zeroing doesn't affect this. Move the debug checks to after verifying PageBuddy is true. This isolates the scope of the checks to only be for buddy pages which are on the zone's freelist which move_freepages_block() is operating on. In this case, an incorrect node or zone is a bug worthy of being warned about (and the examination of struct page is acceptable bcause this memory is not reserved). Why does move_freepages_block() gets called on reserved memory? It's simply math after finding a valid free page from the per-zone free area to use as fallback. We find the beginning and end of the pageblock of the valid page and that can bring us into memory that was reserved per the e820. pfn_valid() is still true (it's backed by a struct page), but since it's zero'd we shouldn't make any inferences here about comparing its node or zone. The current node check just happens to succeed most of the time by luck because reserved memory typically appears on node 0. The fix here is to validate that we actually have buddy pages before testing if there's any type of zone or node strangeness going on. We noticed it almost immediately after bringing 907ec5fca3dc in on CONFIG_DEBUG_VM builds. It depends on finding specific free pages in the per-zone free area where the math in move_freepages() will bring the start or end pfn into reserved memory and wanting to claim that entire pageblock as a new migratetype. So the path will be rare, require CONFIG_DEBUG_VM, and require fallback to a different migratetype. Some struct pages were already zeroed from reserve pages before 907ec5fca3c so it theoretically could trigger before this commit. I think it's rare enough under a config option that most people don't run that others may not have noticed. I wouldn't argue against a stable tag and the backport should be easy enough, but probably wouldn't single out a commit that this is fixing. Mel said: : The overhead of the debugging check is higher with this patch although : it'll only affect debug builds and the path is not particularly hot. : If this was a concern, I think it would be reasonable to simply remove : the debugging check as the zone boundaries are checked in : move_freepages_block and we never expect a zone/node to be smaller than : a pageblock and stuck in the middle of another zone. Link: http://lkml.kernel.org/r/alpine.DEB.2.21.1908122036560.10779@chino.kir.corp.google.com Signed-off-by: David Rientjes Acked-by: Mel Gorman Cc: Naoya Horiguchi Cc: Masayoshi Mizuma Cc: Oscar Salvador Cc: Pavel Tatashin Cc: Vlastimil Babka Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) commit d776aaa9895eb6eb770908e899cb7f5bd5025b3c Author: Henry Burns Date: Sat Aug 24 17:54:37 2019 -0700 mm/z3fold.c: fix race between migration and destruction In z3fold_destroy_pool() we call destroy_workqueue(&pool->compact_wq). However, we have no guarantee that migration isn't happening in the background at that time. Migration directly calls queue_work_on(pool->compact_wq), if destruction wins that race we are using a destroyed workqueue. Link: http://lkml.kernel.org/r/20190809213828.202833-1-henryburns@google.com Signed-off-by: Henry Burns Cc: Vitaly Wool Cc: Shakeel Butt Cc: Jonathan Adams Cc: Henry Burns Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/z3fold.c | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) commit e0e6d062822529dbe9be21939359b0d1e065bb0f Author: Zhu Yanjun Date: Fri Aug 23 21:04:16 2019 -0400 net: rds: add service level support in rds-info >From IB specific 7.6.5 SERVICE LEVEL, Service Level (SL) is used to identify different flows within an IBA subnet. It is carried in the local route header of the packet. Before this commit, run "rds-info -I". The outputs are as below: " RDS IB Connections: LocalAddr RemoteAddr Tos SL LocalDev RemoteDev 192.2.95.3 192.2.95.1 2 0 fe80::21:28:1a:39 fe80::21:28:10:b9 192.2.95.3 192.2.95.1 1 0 fe80::21:28:1a:39 fe80::21:28:10:b9 192.2.95.3 192.2.95.1 0 0 fe80::21:28:1a:39 fe80::21:28:10:b9 " After this commit, the output is as below: " RDS IB Connections: LocalAddr RemoteAddr Tos SL LocalDev RemoteDev 192.2.95.3 192.2.95.1 2 2 fe80::21:28:1a:39 fe80::21:28:10:b9 192.2.95.3 192.2.95.1 1 1 fe80::21:28:1a:39 fe80::21:28:10:b9 192.2.95.3 192.2.95.1 0 0 fe80::21:28:1a:39 fe80::21:28:10:b9 " The commit fe3475af3bdf ("net: rds: add per rds connection cache statistics") adds cache_allocs in struct rds_info_rdma_connection as below: struct rds_info_rdma_connection { ... __u32 rdma_mr_max; __u32 rdma_mr_size; __u8 tos; __u32 cache_allocs; }; The peer struct in rds-tools of struct rds_info_rdma_connection is as below: struct rds_info_rdma_connection { ... uint32_t rdma_mr_max; uint32_t rdma_mr_size; uint8_t tos; uint8_t sl; uint32_t cache_allocs; }; The difference between userspace and kernel is the member variable sl. In the kernel struct, the member variable sl is missing. This will introduce risks. So it is necessary to use this commit to avoid this risk. Fixes: fe3475af3bdf ("net: rds: add per rds connection cache statistics") CC: Joe Jin CC: JUNXIAO_BI Suggested-by: Gerd Rausch Signed-off-by: Zhu Yanjun Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller include/uapi/linux/rds.h | 2 ++ net/rds/ib.c | 16 ++++++++++------ net/rds/ib.h | 1 + net/rds/ib_cm.c | 3 +++ net/rds/rdma_transport.c | 10 ++++++++-- 5 files changed, 24 insertions(+), 8 deletions(-) commit e93fb3e9521abffadb8f965c591a290cdd92b56c Author: John Fastabend Date: Fri Aug 23 17:11:38 2019 -0700 net: route dump netlink NLM_F_MULTI flag missing An excerpt from netlink(7) man page, In multipart messages (multiple nlmsghdr headers with associated payload in one byte stream) the first and all following headers have the NLM_F_MULTI flag set, except for the last header which has the type NLMSG_DONE. but, after (ee28906) there is a missing NLM_F_MULTI flag in the middle of a FIB dump. The result is user space applications following above man page excerpt may get confused and may stop parsing msg believing something went wrong. In the golang netlink lib [0] the library logic stops parsing believing the message is not a multipart message. Found this running Cilium[1] against net-next while adding a feature to auto-detect routes. I noticed with multiple route tables we no longer could detect the default routes on net tree kernels because the library logic was not returning them. Fix this by handling the fib_dump_info_fnhe() case the same way the fib_dump_info() handles it by passing the flags argument through the call chain and adding a flags argument to rt_fill_info(). Tested with Cilium stack and auto-detection of routes works again. Also annotated libs to dump netlink msgs and inspected NLM_F_MULTI and NLMSG_DONE flags look correct after this. Note: In inet_rtm_getroute() pass rt_fill_info() '0' for flags the same as is done for fib_dump_info() so this looks correct to me. [0] https://github.com/vishvananda/netlink/ [1] https://github.com/cilium/ Fixes: ee28906fd7a14 ("ipv4: Dump route exceptions if requested") Signed-off-by: John Fastabend Reviewed-by: Stefano Brivio Signed-off-by: David S. Miller include/net/route.h | 2 +- net/ipv4/fib_trie.c | 2 +- net/ipv4/route.c | 17 ++++++++++------- 3 files changed, 12 insertions(+), 9 deletions(-) commit 292a50e3fc2cf699587ea282e6253e0d6ae3cdc1 Author: Julian Wiedmann Date: Fri Aug 23 11:29:23 2019 +0200 s390/qeth: reject oversized SNMP requests Commit d4c08afafa04 ("s390/qeth: streamline SNMP cmd code") removed the bounds checking for req_len, under the assumption that the check in qeth_alloc_cmd() would suffice. But that code path isn't sufficiently robust to handle a user-provided data_length, which could overflow (when adding the cmd header overhead) before being checked against QETH_BUFSIZE. We end up allocating just a tiny iob, and the subsequent copy_from_user() writes past the end of that iob. Special-case this path and add a coarse bounds check, to protect against maliciuous requests. This let's the subsequent code flow do its normal job and precise checking, without risk of overflow. Fixes: d4c08afafa04 ("s390/qeth: streamline SNMP cmd code") Reported-by: Dan Carpenter Signed-off-by: Julian Wiedmann Reviewed-by: Ursula Braun Signed-off-by: David S. Miller drivers/s390/net/qeth_core_main.c | 4 ++++ 1 file changed, 4 insertions(+) commit b45ce32135d1c82a5bf12aa56957c3fd27956057 Author: zhanglin Date: Fri Aug 23 09:14:11 2019 +0800 sock: fix potential memory leak in proto_register() If protocols registered exceeded PROTO_INUSE_NR, prot will be added to proto_list, but no available bit left for prot in proto_inuse_idx. Changes since v2: * Propagate the error code properly Signed-off-by: zhanglin Signed-off-by: David S. Miller net/core/sock.c | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) commit d37fb9758f76316a9dd9aaafffad726eb2bc020a Merge: 0c69b19f92df a195784c105b Author: David S. Miller Date: Sat Aug 24 16:27:09 2019 -0700 Merge tag 'mlx5-fixes-2019-08-22' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== Mellanox, mlx5 fixes 2019-08-22 This series introduces some fixes to mlx5 driver. 1) Form Moshe, two fixes for firmware health reporter 2) From Eran, two ktls fixes. ==================== Signed-off-by: David S. Miller commit 0c69b19f92dfcc0962bbc09741677f658bc55452 Author: Andrew Lunn Date: Sun Aug 25 00:34:54 2019 +0200 MAINTAINERS: Add phylink keyword to SFF/SFP/SFP+ MODULE SUPPORT Russell king maintains phylink, as part of the SFP module support. However, much of the review work is about drivers swapping from phylib to phylink. Such changes don't make changes to the phylink core, and so the F: rules in MAINTAINERS don't match. Add a K:, keywork rule, which hopefully get_maintainers will match against for patches to MAC drivers swapping to phylink. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 9b45ff9106740d7f6a1cba31d53c4045d0724792 Merge: 12c6bc38f99b c3b4c3a47e05 Author: David S. Miller Date: Sat Aug 24 14:49:36 2019 -0700 Merge branch 'collect_md-mode-dev-null' Hangbin Liu says: ==================== fix dev null pointer dereference when send packets larger than mtu in collect_md mode When we send a packet larger than PMTU, we need to reply with icmp_send(ICMP_FRAG_NEEDED) or icmpv6_send(ICMPV6_PKT_TOOBIG). But with collect_md mode, kernel will crash while accessing the dst dev as __metadata_dst_init() init dst->dev to NULL by default. Here is what the code path looks like, for GRE: - ip6gre_tunnel_xmit - ip6gre_xmit_ipv4 - __gre6_xmit - ip6_tnl_xmit - if skb->len - t->tun_hlen - eth_hlen > mtu; return -EMSGSIZE - icmp_send - net = dev_net(rt->dst.dev); <-- here - ip6gre_xmit_ipv6 - __gre6_xmit - ip6_tnl_xmit - if skb->len - t->tun_hlen - eth_hlen > mtu; return -EMSGSIZE - icmpv6_send ... - decode_session4 - oif = skb_dst(skb)->dev->ifindex; <-- here - decode_session6 - oif = skb_dst(skb)->dev->ifindex; <-- here We could not fix it in __metadata_dst_init() as there is no dev supplied. Look in to the __icmp_send()/decode_session{4,6} code we could find the dst dev is actually not needed. In __icmp_send(), we could get the net by skb->dev. For decode_session{4,6}, as it was called by xfrm_decode_session_reverse() in this scenario, the oif is not used by fl4->flowi4_oif = reverse ? skb->skb_iif : oif; The reproducer is easy: ovs-vsctl add-br br0 ip link set br0 up ovs-vsctl add-port br0 gre0 -- set interface gre0 type=gre options:remote_ip=$dst_addr ip link set gre0 up ip addr add ${local_gre6}/64 dev br0 ping6 $remote_gre6 -s 1500 The kernel will crash like [40595.821651] BUG: kernel NULL pointer dereference, address: 0000000000000108 [40595.822411] #PF: supervisor read access in kernel mode [40595.822949] #PF: error_code(0x0000) - not-present page [40595.823492] PGD 0 P4D 0 [40595.823767] Oops: 0000 [#1] SMP PTI [40595.824139] CPU: 0 PID: 2831 Comm: handler12 Not tainted 5.2.0 #57 [40595.824788] Hardware name: Red Hat KVM, BIOS 1.11.1-3.module+el8.1.0+2983+b2ae9c0a 04/01/2014 [40595.825680] RIP: 0010:__xfrm_decode_session+0x6b/0x930 [40595.826219] Code: b7 c0 00 00 00 b8 06 00 00 00 66 85 d2 0f b7 ca 48 0f 45 c1 44 0f b6 2c 06 48 8b 47 58 48 83 e0 fe 0f 84 f4 04 00 00 48 8b 00 <44> 8b 80 08 01 00 00 41 f6 c4 01 4c 89 e7 ba 58 00 00 00 0f 85 47 [40595.828155] RSP: 0018:ffffc90000a73438 EFLAGS: 00010286 [40595.828705] RAX: 0000000000000000 RBX: ffff8881329d7100 RCX: 0000000000000000 [40595.829450] RDX: 0000000000000000 RSI: ffff8881339e70ce RDI: ffff8881329d7100 [40595.830191] RBP: ffffc90000a73470 R08: 0000000000000000 R09: 000000000000000a [40595.830936] R10: 0000000000000000 R11: 0000000000000000 R12: ffffc90000a73490 [40595.831682] R13: 000000000000002c R14: ffff888132ff1301 R15: ffff8881329d7100 [40595.832427] FS: 00007f5bfcfd6700(0000) GS:ffff88813ba00000(0000) knlGS:0000000000000000 [40595.833266] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [40595.833883] CR2: 0000000000000108 CR3: 000000013a368000 CR4: 00000000000006f0 [40595.834633] Call Trace: [40595.835392] ? rt6_multipath_hash+0x4c/0x390 [40595.835853] icmpv6_route_lookup+0xcb/0x1d0 [40595.836296] ? icmpv6_xrlim_allow+0x3e/0x140 [40595.836751] icmp6_send+0x537/0x840 [40595.837125] icmpv6_send+0x20/0x30 [40595.837494] tnl_update_pmtu.isra.27+0x19d/0x2a0 [ip_tunnel] [40595.838088] ip_md_tunnel_xmit+0x1b6/0x510 [ip_tunnel] [40595.838633] gre_tap_xmit+0x10c/0x160 [ip_gre] [40595.839103] dev_hard_start_xmit+0x93/0x200 [40595.839551] sch_direct_xmit+0x101/0x2d0 [40595.839967] __dev_queue_xmit+0x69f/0x9c0 [40595.840399] do_execute_actions+0x1717/0x1910 [openvswitch] [40595.840987] ? validate_set.isra.12+0x2f5/0x3d0 [openvswitch] [40595.841596] ? reserve_sfa_size+0x31/0x130 [openvswitch] [40595.842154] ? __ovs_nla_copy_actions+0x1b4/0xad0 [openvswitch] [40595.842778] ? __kmalloc_reserve.isra.50+0x2e/0x80 [40595.843285] ? should_failslab+0xa/0x20 [40595.843696] ? __kmalloc+0x188/0x220 [40595.844078] ? __alloc_skb+0x97/0x270 [40595.844472] ovs_execute_actions+0x47/0x120 [openvswitch] [40595.845041] ovs_packet_cmd_execute+0x27d/0x2b0 [openvswitch] [40595.845648] genl_family_rcv_msg+0x3a8/0x430 [40595.846101] genl_rcv_msg+0x47/0x90 [40595.846476] ? __alloc_skb+0x83/0x270 [40595.846866] ? genl_family_rcv_msg+0x430/0x430 [40595.847335] netlink_rcv_skb+0xcb/0x100 [40595.847777] genl_rcv+0x24/0x40 [40595.848113] netlink_unicast+0x17f/0x230 [40595.848535] netlink_sendmsg+0x2ed/0x3e0 [40595.848951] sock_sendmsg+0x4f/0x60 [40595.849323] ___sys_sendmsg+0x2bd/0x2e0 [40595.849733] ? sock_poll+0x6f/0xb0 [40595.850098] ? ep_scan_ready_list.isra.14+0x20b/0x240 [40595.850634] ? _cond_resched+0x15/0x30 [40595.851032] ? ep_poll+0x11b/0x440 [40595.851401] ? _copy_to_user+0x22/0x30 [40595.851799] __sys_sendmsg+0x58/0xa0 [40595.852180] do_syscall_64+0x5b/0x190 [40595.852574] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [40595.853105] RIP: 0033:0x7f5c00038c7d [40595.853489] Code: c7 20 00 00 75 10 b8 2e 00 00 00 0f 05 48 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 8e f7 ff ff 48 89 04 24 b8 2e 00 00 00 0f 05 <48> 8b 3c 24 48 89 c2 e8 d7 f7 ff ff 48 89 d0 48 83 c4 08 48 3d 01 [40595.855443] RSP: 002b:00007f5bfcf73c00 EFLAGS: 00003293 ORIG_RAX: 000000000000002e [40595.856244] RAX: ffffffffffffffda RBX: 00007f5bfcf74a60 RCX: 00007f5c00038c7d [40595.856990] RDX: 0000000000000000 RSI: 00007f5bfcf73c60 RDI: 0000000000000015 [40595.857736] RBP: 0000000000000004 R08: 0000000000000b7c R09: 0000000000000110 [40595.858613] R10: 0001000800050004 R11: 0000000000003293 R12: 000055c2d8329da0 [40595.859401] R13: 00007f5bfcf74120 R14: 0000000000000347 R15: 00007f5bfcf73c60 [40595.860185] Modules linked in: ip_gre ip_tunnel gre openvswitch nsh nf_conncount nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 sunrpc bochs_drm ttm drm_kms_helper drm pcspkr joydev i2c_piix4 qemu_fw_cfg xfs libcrc32c virtio_net net_failover serio_raw failover ata_generic virtio_blk pata_acpi floppy [40595.863155] CR2: 0000000000000108 [40595.863551] ---[ end trace 22209bbcacb4addd ]--- v4: Julian Anastasov remind skb->dev also could be NULL in icmp_send. We'd better still use dst.dev and do a check to avoid crash. v3: only replace pkg to packets in cover letter. So I didn't update the version info in the follow up patches. v2: fix it in __icmp_send() and decode_session{4,6} separately instead of updating shared dst dev in {ip_md, ip6}_tunnel_xmit. ==================== Signed-off-by: David S. Miller commit c3b4c3a47e05d5fecf7354d75824a9d1b37f3e84 Author: Hangbin Liu Date: Thu Aug 22 22:19:49 2019 +0800 xfrm/xfrm_policy: fix dst dev null pointer dereference in collect_md mode In decode_session{4,6} there is a possibility that the skb dst dev is NULL, e,g, with tunnel collect_md mode, which will cause kernel crash. Here is what the code path looks like, for GRE: - ip6gre_tunnel_xmit - ip6gre_xmit_ipv6 - __gre6_xmit - ip6_tnl_xmit - if skb->len - t->tun_hlen - eth_hlen > mtu; return -EMSGSIZE - icmpv6_send - icmpv6_route_lookup - xfrm_decode_session_reverse - decode_session4 - oif = skb_dst(skb)->dev->ifindex; <-- here - decode_session6 - oif = skb_dst(skb)->dev->ifindex; <-- here The reason is __metadata_dst_init() init dst->dev to NULL by default. We could not fix it in __metadata_dst_init() as there is no dev supplied. On the other hand, the skb_dst(skb)->dev is actually not needed as we called decode_session{4,6} via xfrm_decode_session_reverse(), so oif is not used by: fl4->flowi4_oif = reverse ? skb->skb_iif : oif; So make a dst dev check here should be clean and safe. v4: No changes. v3: No changes. v2: fix the issue in decode_session{4,6} instead of updating shared dst dev in {ip_md, ip6}_tunnel_xmit. Fixes: 8d79266bc48c ("ip6_tunnel: add collect_md mode to IPv6 tunnels") Signed-off-by: Hangbin Liu Tested-by: Jonathan Lemon Signed-off-by: David S. Miller net/xfrm/xfrm_policy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e2c693934194fd3b4e795635934883354c06ebc9 Author: Hangbin Liu Date: Thu Aug 22 22:19:48 2019 +0800 ipv4/icmp: fix rt dst dev null pointer dereference In __icmp_send() there is a possibility that the rt->dst.dev is NULL, e,g, with tunnel collect_md mode, which will cause kernel crash. Here is what the code path looks like, for GRE: - ip6gre_tunnel_xmit - ip6gre_xmit_ipv4 - __gre6_xmit - ip6_tnl_xmit - if skb->len - t->tun_hlen - eth_hlen > mtu; return -EMSGSIZE - icmp_send - net = dev_net(rt->dst.dev); <-- here The reason is __metadata_dst_init() init dst->dev to NULL by default. We could not fix it in __metadata_dst_init() as there is no dev supplied. On the other hand, the reason we need rt->dst.dev is to get the net. So we can just try get it from skb->dev when rt->dst.dev is NULL. v4: Julian Anastasov remind skb->dev also could be NULL. We'd better still use dst.dev and do a check to avoid crash. v3: No changes. v2: fix the issue in __icmp_send() instead of updating shared dst dev in {ip_md, ip6}_tunnel_xmit. Fixes: c8b34e680a09 ("ip_tunnel: Add tnl_update_pmtu in ip_md_tunnel_xmit") Signed-off-by: Hangbin Liu Reviewed-by: Julian Anastasov Acked-by: Jonathan Lemon Signed-off-by: David S. Miller net/ipv4/icmp.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 083f0f2cd402df40f62e16b1e4208e6033f52aba Merge: 361469211f87 48057ed1840f Author: Linus Torvalds Date: Sat Aug 24 14:45:33 2019 -0700 Merge tag 'gpio-v5.3-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO fixes from Linus Walleij: "Here is a (hopefully last) set of GPIO fixes for the v5.3 kernel cycle. Two are pretty core: - Fix not reporting open drain/source lines to userspace as "input" - Fix a minor build error found in randconfigs - Fix a chip select quirk on the Freescale SPI - Fix the irqchip initialization semantic order to reflect what it was using the old API" * tag 'gpio-v5.3-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpio: Fix irqchip initialization order gpio: of: fix Freescale SPI CS quirk handling gpio: Fix build error of function redefinition gpiolib: never report open-drain/source lines as 'input' to user-space commit 12c6bc38f99bb168b7f16bdb5e855a51a23ee9ec Author: Yi-Hung Wei Date: Wed Aug 21 17:16:10 2019 -0700 openvswitch: Fix log message in ovs conntrack Fixes: 06bd2bdf19d2 ("openvswitch: Add timeout support to ct action") Signed-off-by: Yi-Hung Wei Signed-off-by: David S. Miller net/openvswitch/conntrack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 12e2e15d837fd7d621d92fc81e3727304a2a2201 Merge: 211c46245215 074014abdf2b Author: David S. Miller Date: Sat Aug 24 13:46:57 2019 -0700 Merge branch 'ieee802154-for-davem-2019-08-24' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan Stefan Schmidt says: ==================== pull-request: ieee802154 for net 2019-08-24 An update from ieee802154 for your *net* tree. Yue Haibing fixed two bugs discovered by KASAN in the hwsim driver for ieee802154 and Colin Ian King cleaned up a redundant variable assignment. ==================== Signed-off-by: David S. Miller commit 361469211f876e67d7ca3d3d29e6d1c3e313d0f1 Merge: 0a022eccf7c4 a9fc4340aee0 Author: Linus Torvalds Date: Sat Aug 24 11:42:06 2019 -0700 Merge tag 'hyperv-fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux Pull Hyper-V fixes from Sasha Levin: - Fix for panics and network failures on PAE guests by Dexuan Cui. - Fix of a memory leak (and related cleanups) in the hyper-v keyboard driver by Dexuan Cui. - Code cleanups for hyper-v clocksource driver during the merge window by Dexuan Cui. - Fix for a false positive warning in the userspace hyper-v KVP store by Vitaly Kuznetsov. * tag 'hyperv-fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux: Drivers: hv: vmbus: Fix virt_to_hvpfn() for X86_PAE Tools: hv: kvp: eliminate 'may be used uninitialized' warning Input: hyperv-keyboard: Use in-place iterator API in the channel callback Drivers: hv: vmbus: Remove the unused "tsc_page" from struct hv_context commit 0a022eccf7c468efcb8aa5192b8d13e20127bbac Merge: 17d0fbf47eb1 087eeea9adcb Author: Linus Torvalds Date: Sat Aug 24 11:35:25 2019 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "Two KVM/arm fixes for MMIO emulation and UBSAN. Unusually, we're routing them via the arm64 tree as per Paolo's request on the list: https://lore.kernel.org/kvm/21ae69a2-2546-29d0-bff6-2ea825e3d968@redhat.com/ We don't actually have any other arm64 fixes pending at the moment (touch wood), so I've pulled from Marc, written a merge commit, tagged the result and run it through my build/boot/bisect scripts" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: KVM: arm/arm64: VGIC: Properly initialise private IRQ affinity KVM: arm/arm64: Only skip MMIO insn once commit 17d0fbf47eb15ab7780cc77b28de070ec37e15c5 Merge: 8942230a7e1c 77ffd3465ba8 Author: Linus Torvalds Date: Sat Aug 24 11:26:51 2019 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Four fixes, three for edge conditions which don't occur very often. The lpfc fix mitigates memory exhaustion for some high CPU systems" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: lpfc: Mitigate high memory pre-allocation by SCSI-MQ scsi: ufs: Fix NULL pointer dereference in ufshcd_config_vreg_hpm() scsi: target: tcmu: avoid use-after-free after command timeout scsi: qla2xxx: Fix gnl.l memory leak on adapter init failure commit 8942230a7e1c5277969adb0fbaad50dec9b4651b Merge: bc67b17eb91e 1fb254aa983b Author: Linus Torvalds Date: Sat Aug 24 11:21:26 2019 -0700 Merge tag 'xfs-5.3-fixes-6' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fix from Darrick Wong: "A single patch that fixes a xfs lockup problem when a chown/chgrp operation fails due to running out of quota. It has survived the usual xfstests runs and merges cleanly with this morning's master: - Fix a forgotten inode unlock when chown/chgrp fail due to quota" * tag 'xfs-5.3-fixes-6' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: fix missing ILOCK unlock when xfs_setattr_nonsize fails due to EDQUOT commit bc67b17eb91ea6a2b6d943bb64cde8d1438a11ec Merge: 9140d8bdd4c5 7837951a12fd Author: Linus Torvalds Date: Sat Aug 24 11:16:04 2019 -0700 Merge tag 'drm-fixes-2019-08-24' of git://anongit.freedesktop.org/drm/drm Pull more drm fixes from Dave Airlie: "Although the tree built for me fine on arm here, it appears either header cleanups in next or some kconfig combo it breaks, so this contains a fix to mediatek to include dma-mapping.h explicitly. There was also one nouveau fix that came in late that I was going to leave until next week, but since I was sending this I thought it may as well be in here: mediatek: - fix build in some cases nouveau: - fix hang with i2c and mst docks" * tag 'drm-fixes-2019-08-24' of git://anongit.freedesktop.org/drm/drm: drm/mediatek: include dma-mapping header drm/nouveau: Don't retry infinitely when receiving no data on i2c over AUX commit 087eeea9adcbaef55ae8d68335dcd3820c5b344b Merge: d1abaeb3be7b 2e16f3e926ed Author: Will Deacon Date: Sat Aug 24 12:45:20 2019 +0100 Merge tag 'kvmarm-fixes-for-5.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into kvm/fixes Pull KVM/arm fixes from Marc Zyngier as per Paulo's request at: https://lkml.kernel.org/r/21ae69a2-2546-29d0-bff6-2ea825e3d968@redhat.com "One (hopefully last) set of fixes for KVM/arm for 5.3: an embarassing MMIO emulation regression, and a UBSAN splat. Oh well... - Don't overskip instructions on MMIO emulation - Fix UBSAN splat when initializing PPI priorities" * tag 'kvmarm-fixes-for-5.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm: KVM: arm/arm64: VGIC: Properly initialise private IRQ affinity KVM: arm/arm64: Only skip MMIO insn once commit 7837951a12fdaf88d2c51ff0757980c00072790c Author: Dave Airlie Date: Sat Aug 24 15:07:07 2019 +1000 drm/mediatek: include dma-mapping header Although it builds fine here in my arm cross compile, it seems either via some other patches in -next or some Kconfig combination, this fails to build for everyone. Include linux/dma-mapping.h should fix it. Signed-off-by: Dave Airlie drivers/gpu/drm/mediatek/mtk_drm_drv.c | 1 + 1 file changed, 1 insertion(+) commit 211c4624521527b19cb82ffd53fb34ae320059aa Merge: 345b93265b3a 2c238177bd7f Author: David S. Miller Date: Fri Aug 23 17:34:11 2019 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2019-08-24 The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) Fix verifier precision tracking with BPF-to-BPF calls, from Alexei. 2) Fix a use-after-free in prog symbol exposure, from Daniel. 3) Several s390x JIT fixes plus BE related fixes in BPF kselftests, from Ilya. 4) Fix memory leak by unpinning XDP umem pages in error path, from Ivan. 5) Fix a potential use-after-free on flow dissector detach, from Jakub. 6) Fix bpftool to close prog fd after showing metadata, from Quentin. 7) BPF kselftest config and TEST_PROGS_EXTENDED fixes, from Anders. ==================== Signed-off-by: David S. Miller commit 2c238177bd7f4b14bdf7447cc1cd9bb791f147e6 Author: Ilya Leoshkevich Date: Tue Aug 20 17:50:25 2019 +0200 bpf: allow narrow loads of some sk_reuseport_md fields with offset > 0 test_select_reuseport fails on s390 due to verifier rejecting test_select_reuseport_kern.o with the following message: ; data_check.eth_protocol = reuse_md->eth_protocol; 18: (69) r1 = *(u16 *)(r6 +22) invalid bpf_context access off=22 size=2 This is because on big-endian machines casts from __u32 to __u16 are generated by referencing the respective variable as __u16 with an offset of 2 (as opposed to 0 on little-endian machines). The verifier already has all the infrastructure in place to allow such accesses, it's just that they are not explicitly enabled for eth_protocol field. Enable them for eth_protocol field by using bpf_ctx_range instead of offsetof. Ditto for ip_protocol, bind_inany and len, since they already allow narrowing, and the same problem can arise when working with them. Fixes: 2dbb9b9e6df6 ("bpf: Introduce BPF_PROG_TYPE_SK_REUSEPORT") Signed-off-by: Ilya Leoshkevich Signed-off-by: Daniel Borkmann net/core/filter.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c751798aa224fadc5124b49eeb38fb468c0fa039 Author: Daniel Borkmann Date: Fri Aug 23 22:14:23 2019 +0200 bpf: fix use after free in prog symbol exposure syzkaller managed to trigger the warning in bpf_jit_free() which checks via bpf_prog_kallsyms_verify_off() for potentially unlinked JITed BPF progs in kallsyms, and subsequently trips over GPF when walking kallsyms entries: [...] 8021q: adding VLAN 0 to HW filter on device batadv0 8021q: adding VLAN 0 to HW filter on device batadv0 WARNING: CPU: 0 PID: 9869 at kernel/bpf/core.c:810 bpf_jit_free+0x1e8/0x2a0 Kernel panic - not syncing: panic_on_warn set ... CPU: 0 PID: 9869 Comm: kworker/0:7 Not tainted 5.0.0-rc8+ #1 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events bpf_prog_free_deferred Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x113/0x167 lib/dump_stack.c:113 panic+0x212/0x40b kernel/panic.c:214 __warn.cold.8+0x1b/0x38 kernel/panic.c:571 report_bug+0x1a4/0x200 lib/bug.c:186 fixup_bug arch/x86/kernel/traps.c:178 [inline] do_error_trap+0x11b/0x200 arch/x86/kernel/traps.c:271 do_invalid_op+0x36/0x40 arch/x86/kernel/traps.c:290 invalid_op+0x14/0x20 arch/x86/entry/entry_64.S:973 RIP: 0010:bpf_jit_free+0x1e8/0x2a0 Code: 02 4c 89 e2 83 e2 07 38 d0 7f 08 84 c0 0f 85 86 00 00 00 48 ba 00 02 00 00 00 00 ad de 0f b6 43 02 49 39 d6 0f 84 5f fe ff ff <0f> 0b e9 58 fe ff ff 48 b8 00 00 00 00 00 fc ff df 4c 89 e2 48 c1 RSP: 0018:ffff888092f67cd8 EFLAGS: 00010202 RAX: 0000000000000007 RBX: ffffc90001947000 RCX: ffffffff816e9d88 RDX: dead000000000200 RSI: 0000000000000008 RDI: ffff88808769f7f0 RBP: ffff888092f67d00 R08: fffffbfff1394059 R09: fffffbfff1394058 R10: fffffbfff1394058 R11: ffffffff89ca02c7 R12: ffffc90001947002 R13: ffffc90001947020 R14: ffffffff881eca80 R15: ffff88808769f7e8 BUG: unable to handle kernel paging request at fffffbfff400d000 #PF error: [normal kernel read fault] PGD 21ffee067 P4D 21ffee067 PUD 21ffed067 PMD 9f942067 PTE 0 Oops: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 9869 Comm: kworker/0:7 Not tainted 5.0.0-rc8+ #1 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events bpf_prog_free_deferred RIP: 0010:bpf_get_prog_addr_region kernel/bpf/core.c:495 [inline] RIP: 0010:bpf_tree_comp kernel/bpf/core.c:558 [inline] RIP: 0010:__lt_find include/linux/rbtree_latch.h:115 [inline] RIP: 0010:latch_tree_find include/linux/rbtree_latch.h:208 [inline] RIP: 0010:bpf_prog_kallsyms_find+0x107/0x2e0 kernel/bpf/core.c:632 Code: 00 f0 ff ff 44 38 c8 7f 08 84 c0 0f 85 fa 00 00 00 41 f6 45 02 01 75 02 0f 0b 48 39 da 0f 82 92 00 00 00 48 89 d8 48 c1 e8 03 <42> 0f b6 04 30 84 c0 74 08 3c 03 0f 8e 45 01 00 00 8b 03 48 c1 e0 [...] Upon further debugging, it turns out that whenever we trigger this issue, the kallsyms removal in bpf_prog_ksym_node_del() was /skipped/ but yet bpf_jit_free() reported that the entry is /in use/. Problem is that symbol exposure via bpf_prog_kallsyms_add() but also perf_event_bpf_event() were done /after/ bpf_prog_new_fd(). Once the fd is exposed to the public, a parallel close request came in right before we attempted to do the bpf_prog_kallsyms_add(). Given at this time the prog reference count is one, we start to rip everything underneath us via bpf_prog_release() -> bpf_prog_put(). The memory is eventually released via deferred free, so we're seeing that bpf_jit_free() has a kallsym entry because we added it from bpf_prog_load() but /after/ bpf_prog_put() from the remote CPU. Therefore, move both notifications /before/ we install the fd. The issue was never seen between bpf_prog_alloc_id() and bpf_prog_new_fd() because upon bpf_prog_get_fd_by_id() we'll take another reference to the BPF prog, so we're still holding the original reference from the bpf_prog_load(). Fixes: 6ee52e2a3fe4 ("perf, bpf: Introduce PERF_RECORD_BPF_EVENT") Fixes: 74451e66d516 ("bpf: make jited programs visible in traces") Reported-by: syzbot+bd3bba6ff3fcea7a6ec6@syzkaller.appspotmail.com Signed-off-by: Daniel Borkmann Cc: Song Liu kernel/bpf/syscall.c | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) commit 6754172c208d9d3dae208c6494611ac167d56688 Author: Alexei Starovoitov Date: Wed Aug 21 14:07:10 2019 -0700 bpf: fix precision tracking in presence of bpf2bpf calls While adding extra tests for precision tracking and extra infra to adjust verifier heuristics the existing test "calls: cross frame pruning - liveness propagation" started to fail. The root cause is the same as described in verifer.c comment: * Also if parent's curframe > frame where backtracking started, * the verifier need to mark registers in both frames, otherwise callees * may incorrectly prune callers. This is similar to * commit 7640ead93924 ("bpf: verifier: make sure callees don't prune with caller differences") * For now backtracking falls back into conservative marking. Turned out though that returning -ENOTSUPP from backtrack_insn() and doing mark_all_scalars_precise() in the current parentage chain is not enough. Depending on how is_state_visited() heuristic is creating parentage chain it's possible that callee will incorrectly prune caller. Fix the issue by setting precise=true earlier and more aggressively. Before this fix the precision tracking _within_ functions that don't do bpf2bpf calls would still work. Whereas now precision tracking is completely disabled when bpf2bpf calls are present anywhere in the program. No difference in cilium tests (they don't have bpf2bpf calls). No difference in test_progs though some of them have bpf2bpf calls, but precision tracking wasn't effective there. Fixes: b5dc0163d8fd ("bpf: precise scalar_value tracking") Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann kernel/bpf/verifier.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit db38de39684dda2bf307f41797db2831deba64e9 Author: Jakub Sitnicki Date: Wed Aug 21 14:17:20 2019 +0200 flow_dissector: Fix potential use-after-free on BPF_PROG_DETACH Call to bpf_prog_put(), with help of call_rcu(), queues an RCU-callback to free the program once a grace period has elapsed. The callback can run together with new RCU readers that started after the last grace period. New RCU readers can potentially see the "old" to-be-freed or already-freed pointer to the program object before the RCU update-side NULLs it. Reorder the operations so that the RCU update-side resets the protected pointer before the end of the grace period after which the program will be freed. Fixes: d58e468b1112 ("flow_dissector: implements flow dissector BPF hook") Reported-by: Lorenz Bauer Signed-off-by: Jakub Sitnicki Acked-by: Petar Penkov Signed-off-by: Daniel Borkmann net/core/flow_dissector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 345b93265b3a3d001ec23b696b66059395238d16 Author: Heiner Kallweit Date: Fri Aug 23 19:57:49 2019 +0200 Revert "r8169: remove not needed call to dma_sync_single_for_device" This reverts commit f072218cca5b076dd99f3dfa3aaafedfd0023a51. As reported by Aaro this patch causes network problems on MIPS Loongson platform. Therefore revert it. Fixes: f072218cca5b ("r8169: remove not needed call to dma_sync_single_for_device") Signed-off-by: Heiner Kallweit Reported-by: Aaro Koskinen Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169_main.c | 1 + 1 file changed, 1 insertion(+) commit 9140d8bdd4c5a04abe181bb300378355d56990a4 Merge: b9bd6806d014 c536277e0db1 Author: Linus Torvalds Date: Fri Aug 23 14:53:09 2019 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fixes from Doug Ledford: "No beating around the bush: this is a monster pull request for an -rc5 kernel. Intel hit me with a series of fixes for TID processing. Mellanox hit me with a series for their UMR memory support. And we had one fix for siw that fixes the 32bit build warnings and because of the number of casts that had to be changed to properly silence the warnings, that one patch alone is a full 40% of the LOC of this entire pull request. Given that this is the initial release kernel for siw, I'm trying to fix anything in it that we can, so that adds to the impetus to take fixes for it like this one. I had to do a rebase early in the week. Jason had thought he put a patch on the rc queue that he needed to be there so he could base some work off of it, and it had actually not been placed there. So he asked me (on Tuesday) to fix that up before pushing my wip branch to the official rc branch. I did, and that's why the early patches look like they were all committed at the same time on Tuesday. That bunch had been in my queue prior. The various patches all pass my test for being legitimate fixes and not attempts to slide new features or development into a late rc. Well, they were all fixes with the exception of a couple clean up patches people wrote for making the fixes they also wrote better (like a cleanup patch to move UMR checking into a function so that the remaining UMR fix patches can reference that function), so I left those in place too. My apologies for the LOC count and the number of patches here, it's just how the cards fell this cycle. Summary: - Fix siw buffer mapping issue - Fix siw 32/64 casting issues - Fix a KASAN access issue in bnxt_re - Fix several memory leaks (hfi1, mlx4) - Fix a NULL deref in cma_cleanup - Fixes for UMR memory support in mlx5 (4 patch series) - Fix namespace check for restrack - Fixes for counter support - Fixes for hfi1 TID processing (5 patch series) - Fix potential NULL deref in siw - Fix memory page calculations in mlx5" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: (21 commits) RDMA/siw: Fix 64/32bit pointer inconsistency RDMA/siw: Fix SGL mapping issues RDMA/bnxt_re: Fix stack-out-of-bounds in bnxt_qplib_rcfw_send_message infiniband: hfi1: fix memory leaks infiniband: hfi1: fix a memory leak bug IB/mlx4: Fix memory leaks RDMA/cma: fix null-ptr-deref Read in cma_cleanup IB/mlx5: Block MR WR if UMR is not possible IB/mlx5: Fix MR re-registration flow to use UMR properly IB/mlx5: Report and handle ODP support properly IB/mlx5: Consolidate use_umr checks into single function RDMA/restrack: Rewrite PID namespace check to be reliable RDMA/counters: Properly implement PID checks IB/core: Fix NULL pointer dereference when bind QP to counter IB/hfi1: Drop stale TID RDMA packets that cause TIDErr IB/hfi1: Add additional checks when handling TID RDMA WRITE DATA packet IB/hfi1: Add additional checks when handling TID RDMA READ RESP packet IB/hfi1: Unsafe PSN checking for TID RDMA READ Resp packet IB/hfi1: Drop stale TID RDMA packets RDMA/siw: Fix potential NULL de-ref ... commit db0b99f59ae4d934a0af1a5670706d7c2a4b58ea Author: Sabrina Dubroca Date: Fri Aug 23 15:44:36 2019 +0200 ipv6: propagate ipv6_add_dev's error returns out of ipv6_find_idev Currently, ipv6_find_idev returns NULL when ipv6_add_dev fails, ignoring the specific error value. This results in addrconf_add_dev returning ENOBUFS in all cases, which is unfortunate in cases such as: # ip link add dummyX type dummy # ip link set dummyX mtu 1200 up # ip addr add 2000::/64 dev dummyX RTNETLINK answers: No buffer space available Commit a317a2f19da7 ("ipv6: fail early when creating netdev named all or default") introduced error returns in ipv6_add_dev. Before that, that function would simply return NULL for all failures. Signed-off-by: Sabrina Dubroca Signed-off-by: David S. Miller net/ipv6/addrconf.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit b9bd6806d014f7d3647caa66ea245329a3ee0253 Merge: dd469a456047 08f5439f1df2 Author: Linus Torvalds Date: Fri Aug 23 14:45:45 2019 -0700 Merge tag 'for-linus-20190823' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "Here's a set of fixes that should go into this release. This contains: - Three minor fixes for NVMe. - Three minor tweaks for the io_uring polling logic. - Officially mark Song as the MD maintainer, after he's been filling that role sucessfully for the last 6 months or so" * tag 'for-linus-20190823' of git://git.kernel.dk/linux-block: io_uring: add need_resched() check in inner poll loop md: update MAINTAINERS info io_uring: don't enter poll loop if we have CQEs pending nvme: Add quirk for LiteON CL1 devices running FW 22301111 nvme: Fix cntlid validation when not using NVMEoF nvme-multipath: fix possible I/O hang when paths are updated io_uring: fix potential hang with polled IO commit dd469a456047af5eb1ee0bcfc8fe61f5940ef0e0 Merge: f576518c9ab5 1cfd5d3399e8 Author: Linus Torvalds Date: Fri Aug 23 10:53:34 2019 -0700 Merge tag 'for-5.3/dm-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper fixes from Mike Snitzer: - Revert a DM bufio change from during the 5.3 merge window now that a proper fix has been made to the block loopback driver. - Fix DM kcopyd to wakeup so failed subjobs get completed. - Various fixes to DM zoned target to address error handling, and other small tweaks (SPDX license identifiers and fix typos). - Fix DM integrity range locking race by tracking whether journal has changed. - Fix DM dust target to detect reads of badblocks beyond the first 512b sector (applicable if blocksize is larger than 512b). - Fix DM persistent-data issue in both the DM btree and DM space-map-metadata interfaces. - Fix out of bounds memory access with certain DM table configurations. * tag 'for-5.3/dm-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm table: fix invalid memory accesses with too high sector number dm space map metadata: fix missing store of apply_bops() return value dm btree: fix order of block initialization in btree_split_beneath dm raid: add missing cleanup in raid_ctr() dm zoned: fix potential NULL dereference in dmz_do_reclaim() dm dust: use dust block size for badblocklist index dm integrity: fix a crash due to BUG_ON in __journal_read_write() dm zoned: fix a few typos dm zoned: add SPDX license identifiers dm zoned: properly handle backing device failure dm zoned: improve error handling in i/o map code dm zoned: improve error handling in reclaim dm kcopyd: always complete failed jobs Revert "dm bufio: fix deadlock with loop device" commit f576518c9ab5a6fbc7a4b9bbfc9be31aa18a1cc7 Merge: e3fb13b7e47c b68271609c4f Author: Linus Torvalds Date: Fri Aug 23 10:49:44 2019 -0700 Merge tag 'xfs-5.3-fixes-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fixes from Darrick Wong: "Here are a few more bug fixes that trickled in since the last pull. They've survived the usual xfstests runs and merge cleanly with this morning's master. I expect there to be one more pull request tomorrow for the fix to that quota related inode unlock bug that we were reviewing last night, but it will continue to soak in the testing machine for several more hours. - Fix missing compat ioctl handling for get/setlabel - Fix missing ioctl pointer sanitization on s390 - Fix a page locking deadlock in the dedupe comparison code - Fix inadequate locking in reflink code w.r.t. concurrent directio - Fix broken error detection when breaking layouts" * tag 'xfs-5.3-fixes-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: fs/xfs: Fix return code of xfs_break_leased_layouts() xfs: fix reflink source file racing with directio writes vfs: fix page locking deadlocks when deduping files xfs: compat_ioctl: use compat_ptr() xfs: fall back to native ioctls for unhandled compat ones commit 2e16f3e926ed48373c98edea85c6ad0ef69425d1 Author: Andre Przywara Date: Fri Aug 23 11:34:16 2019 +0100 KVM: arm/arm64: VGIC: Properly initialise private IRQ affinity At the moment we initialise the target *mask* of a virtual IRQ to the VCPU it belongs to, even though this mask is only defined for GICv2 and quickly runs out of bits for many GICv3 guests. This behaviour triggers an UBSAN complaint for more than 32 VCPUs: ------ [ 5659.462377] UBSAN: Undefined behaviour in virt/kvm/arm/vgic/vgic-init.c:223:21 [ 5659.471689] shift exponent 32 is too large for 32-bit type 'unsigned int' ------ Also for GICv3 guests the reporting of TARGET in the "vgic-state" debugfs dump is wrong, due to this very same problem. Because there is no requirement to create the VGIC device before the VCPUs (and QEMU actually does it the other way round), we can't safely initialise mpidr or targets in kvm_vgic_vcpu_init(). But since we touch every private IRQ for each VCPU anyway later (in vgic_init()), we can just move the initialisation of those fields into there, where we definitely know the VGIC type. On the way make sure we really have either a VGICv2 or a VGICv3 device, since the existing code is just checking for "VGICv3 or not", silently ignoring the uninitialised case. Signed-off-by: Andre Przywara Reported-by: Dave Martin Tested-by: Julien Grall Signed-off-by: Marc Zyngier virt/kvm/arm/vgic/vgic-init.c | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) commit e3fb13b7e47cd18b2bd067ea8a491020b4644baf Merge: 4e5639449069 3b5be16c7e90 Author: Linus Torvalds Date: Fri Aug 23 09:22:00 2019 -0700 Merge tag 'modules-for-v5.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux Pull modules fixes from Jessica Yu: "Fix BUG_ON() being triggered in frob_text() due to non-page-aligned module sections" * tag 'modules-for-v5.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux: modules: page-align module section allocations only for arches supporting strict module rwx modules: always page-align module section allocations commit 0ff0f15a32c093381ad1abc06abe85afb561ab28 Author: Sven Eckelmann Date: Thu Aug 22 08:55:36 2019 +0200 batman-adv: Only read OGM2 tvlv_len after buffer len check Multiple batadv_ogm2_packet can be stored in an skbuff. The functions batadv_v_ogm_send_to_if() uses batadv_v_ogm_aggr_packet() to check if there is another additional batadv_ogm2_packet in the skb or not before they continue processing the packet. The length for such an OGM2 is BATADV_OGM2_HLEN + batadv_ogm2_packet->tvlv_len. The check must first check that at least BATADV_OGM2_HLEN bytes are available before it accesses tvlv_len (which is part of the header. Otherwise it might try read outside of the currently available skbuff to get the content of tvlv_len. Fixes: 9323158ef9f4 ("batman-adv: OGMv2 - implement originators logic") Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/bat_v_ogm.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit a15d56a60760aa9dbe26343b9a0ac5228f35d445 Author: Sven Eckelmann Date: Thu Aug 22 08:55:36 2019 +0200 batman-adv: Only read OGM tvlv_len after buffer len check Multiple batadv_ogm_packet can be stored in an skbuff. The functions batadv_iv_ogm_send_to_if()/batadv_iv_ogm_receive() use batadv_iv_ogm_aggr_packet() to check if there is another additional batadv_ogm_packet in the skb or not before they continue processing the packet. The length for such an OGM is BATADV_OGM_HLEN + batadv_ogm_packet->tvlv_len. The check must first check that at least BATADV_OGM_HLEN bytes are available before it accesses tvlv_len (which is part of the header. Otherwise it might try read outside of the currently available skbuff to get the content of tvlv_len. Fixes: ef26157747d4 ("batman-adv: tvlv - basic infrastructure") Reported-by: syzbot+355cab184197dbbfa384@syzkaller.appspotmail.com Signed-off-by: Sven Eckelmann Acked-by: Antonio Quartulli Signed-off-by: Simon Wunderlich net/batman-adv/bat_iv_ogm.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit 4e5639449069d12e95edc10b63acf170843e1706 Merge: 1374a22e0641 a561372405cf Author: Linus Torvalds Date: Fri Aug 23 09:19:38 2019 -0700 Merge tag 'ceph-for-5.3-rc6' of git://github.com/ceph/ceph-client Pull ceph fixes from Ilya Dryomov: "Three important fixes tagged for stable (an indefinite hang, a crash on an assert and a NULL pointer dereference) plus a small series from Luis fixing instances of vfree() under spinlock" * tag 'ceph-for-5.3-rc6' of git://github.com/ceph/ceph-client: libceph: fix PG split vs OSD (re)connect race ceph: don't try fill file_lock on unsuccessful GETFILELOCK reply ceph: clear page dirty before invalidate page ceph: fix buffer free while holding i_ceph_lock in fill_inode() ceph: fix buffer free while holding i_ceph_lock in __ceph_build_xattrs_blob() ceph: fix buffer free while holding i_ceph_lock in __ceph_setxattr() libceph: allow ceph_buffer_put() to receive a NULL ceph_buffer commit c536277e0db1ad2e9fbb9dfd940c3565a14d9c52 Author: Bernard Metzler Date: Thu Aug 22 19:37:38 2019 +0200 RDMA/siw: Fix 64/32bit pointer inconsistency Fixes improper casting between addresses and unsigned types. Changes siw_pbl_get_buffer() function to return appropriate dma_addr_t, and not u64. Also fixes debug prints. Now any potentially kernel private pointers are printed formatted as '%pK', to allow keeping that information secret. Fixes: d941bfe500be ("RDMA/siw: Change CQ flags from 64->32 bits") Fixes: b0fff7317bb4 ("rdma/siw: completion queue methods") Fixes: 8b6a361b8c48 ("rdma/siw: receive path") Fixes: b9be6f18cf9e ("rdma/siw: transmit path") Fixes: f29dd55b0236 ("rdma/siw: queue pair methods") Fixes: 2251334dcac9 ("rdma/siw: application buffer management") Fixes: 303ae1cdfdf7 ("rdma/siw: application interface") Fixes: 6c52fdc244b5 ("rdma/siw: connection management") Fixes: a531975279f3 ("rdma/siw: main include file") Reported-by: Geert Uytterhoeven Reported-by: Jason Gunthorpe Reported-by: Leon Romanovsky Signed-off-by: Bernard Metzler Link: https://lore.kernel.org/r/20190822173738.26817-1-bmt@zurich.ibm.com Signed-off-by: Doug Ledford drivers/infiniband/sw/siw/siw.h | 8 ++-- drivers/infiniband/sw/siw/siw_cm.c | 77 ++++++++++++++++------------------- drivers/infiniband/sw/siw/siw_cq.c | 5 ++- drivers/infiniband/sw/siw/siw_mem.c | 14 +++---- drivers/infiniband/sw/siw/siw_mem.h | 2 +- drivers/infiniband/sw/siw/siw_qp.c | 2 +- drivers/infiniband/sw/siw/siw_qp_rx.c | 26 ++++++------ drivers/infiniband/sw/siw/siw_qp_tx.c | 43 +++++++++---------- drivers/infiniband/sw/siw/siw_verbs.c | 40 +++++++++--------- 9 files changed, 108 insertions(+), 109 deletions(-) commit 1374a22e0641783a5fa25a18f23d9d7a91c38add Merge: 59c36bc8d377 75710f08ea7e Author: Linus Torvalds Date: Fri Aug 23 09:03:06 2019 -0700 Merge tag 'drm-fixes-2019-08-23' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Live from the laundromat after my washing machine broke down, we have the 5.3-rc6 fixes. Changelog is in the tag below, but nothing too noteworthy in here: rcar-du: - LVDS dual-link mode fix mediatek: - of node refcount fix - prime buffer import fix - dma max seg fix komeda: - output polling fix - abfc format fix - memory-region DT fix amdgpu: - bpc display fix - ioctl memory leak fix - gfxoff fix - smu warnings fix i915: - HDMI mode readout fix" * tag 'drm-fixes-2019-08-23' of git://anongit.freedesktop.org/drm/drm: drm/amdgpu/powerplay: silence a warning in smu_v11_0_setup_pptable drm/amd/display: Calculate bpc based on max_requested_bpc drm/amdgpu: prevent memory leaks in AMDGPU_CS ioctl drm/amd/amdgpu: disable MMHUB PG for navi10 drm/amd/powerplay: remove duplicate macro smu_get_uclk_dpm_states in amdgpu_smu.h drm/amd/powerplay: fix variable type errors in smu_v11_0_setup_pptable drm/amdgpu/gfx9: update pg_flags after determining if gfx off is possible drm/i915: Fix HW readout for crtc_clock in HDMI mode drm/mediatek: mtk_drm_drv.c: Add of_node_put() before goto drm: rcar_lvds: Fix dual link mode operations drm/mediatek: set DMA max segment size drm/mediatek: use correct device to import PRIME buffers drm/omap: ensure we have a valid dma_mask drm/komeda: Add support for 'memory-region' DT node property drm/komeda: Adds internal bpp computing for arm afbc only format YU08 YU10 drm/komeda: Initialize and enable output polling on Komeda commit b63f20a778c88b6a04458ed6ffc69da953d3a109 Author: Sean Christopherson Date: Thu Aug 22 14:11:22 2019 -0700 x86/retpoline: Don't clobber RFLAGS during CALL_NOSPEC on i386 Use 'lea' instead of 'add' when adjusting %rsp in CALL_NOSPEC so as to avoid clobbering flags. KVM's emulator makes indirect calls into a jump table of sorts, where the destination of the CALL_NOSPEC is a small blob of code that performs fast emulation by executing the target instruction with fixed operands. adcb_al_dl: 0x000339f8 <+0>: adc %dl,%al 0x000339fa <+2>: ret A major motiviation for doing fast emulation is to leverage the CPU to handle consumption and manipulation of arithmetic flags, i.e. RFLAGS is both an input and output to the target of CALL_NOSPEC. Clobbering flags results in all sorts of incorrect emulation, e.g. Jcc instructions often take the wrong path. Sans the nops... asm("push %[flags]; popf; " CALL_NOSPEC " ; pushf; pop %[flags]\n" 0x0003595a <+58>: mov 0xc0(%ebx),%eax 0x00035960 <+64>: mov 0x60(%ebx),%edx 0x00035963 <+67>: mov 0x90(%ebx),%ecx 0x00035969 <+73>: push %edi 0x0003596a <+74>: popf 0x0003596b <+75>: call *%esi 0x000359a0 <+128>: pushf 0x000359a1 <+129>: pop %edi 0x000359a2 <+130>: mov %eax,0xc0(%ebx) 0x000359b1 <+145>: mov %edx,0x60(%ebx) ctxt->eflags = (ctxt->eflags & ~EFLAGS_MASK) | (flags & EFLAGS_MASK); 0x000359a8 <+136>: mov -0x10(%ebp),%eax 0x000359ab <+139>: and $0x8d5,%edi 0x000359b4 <+148>: and $0xfffff72a,%eax 0x000359b9 <+153>: or %eax,%edi 0x000359bd <+157>: mov %edi,0x4(%ebx) For the most part this has gone unnoticed as emulation of guest code that can trigger fast emulation is effectively limited to MMIO when running on modern hardware, and MMIO is rarely, if ever, accessed by instructions that affect or consume flags. Breakage is almost instantaneous when running with unrestricted guest disabled, in which case KVM must emulate all instructions when the guest has invalid state, e.g. when the guest is in Big Real Mode during early BIOS. Fixes: 776b043848fd2 ("x86/retpoline: Add initial retpoline support") Fixes: 1a29b5b7f347a ("KVM: x86: Make indirect calls in emulator speculation safe") Signed-off-by: Sean Christopherson Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20190822211122.27579-1-sean.j.christopherson@intel.com arch/x86/include/asm/nospec-branch.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1cfd5d3399e87167b7f9157ef99daa0e959f395d Author: Mikulas Patocka Date: Fri Aug 23 09:54:09 2019 -0400 dm table: fix invalid memory accesses with too high sector number If the sector number is too high, dm_table_find_target() should return a pointer to a zeroed dm_target structure (the caller should test it with dm_target_is_valid). However, for some table sizes, the code in dm_table_find_target() that performs btree lookup will access out of bound memory structures. Fix this bug by testing the sector number at the beginning of dm_table_find_target(). Also, add an "inline" keyword to the function dm_table_get_size() because this is a hot path. Fixes: 512875bd9661 ("dm: table detect io beyond device") Cc: stable@vger.kernel.org Reported-by: Zhang Tao Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer drivers/md/dm-table.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 51a44a28eefd0d4c1addeb23fc5a599ff1787dfd Author: Mihail Atanassov Date: Tue Aug 20 15:16:58 2019 +0000 drm/komeda: Add missing of_node_get() call komeda_pipeline_destroy has the matching of_node_put(). Fixes: 29e56aec911dd ("drm/komeda: Add DT parsing") Signed-off-by: Mihail Atanassov Reviewed-by: Ayan Kumar Halder [Rebased on the latest drm-misc-fixes] Signed-off-by: Ayan Kumar Halder Link: https://patchwork.freedesktop.org/patch/325278/ Change-Id: I5fa2479d6cb3a77182f1a92833c1c0bca8668cb4 drivers/gpu/drm/arm/display/komeda/komeda_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 95abcd33ad513faf9cf3f54a28fb4982407e5a92 Author: james qian wang (Arm Technology China) Date: Tue Aug 13 11:08:20 2019 +0000 drm/komeda: Clean warning 'komeda_component_add' might be a candidate for 'gnu_printf' komeda/komeda_pipeline.c: In function 'komeda_component_add': komeda/komeda_pipeline.c:212:3: warning: function 'komeda_component_add' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format] vsnprintf(c->name, sizeof(c->name), name_fmt, args); ^~~~~~~~~ Signed-off-by: james qian wang (Arm Technology China) Reviewed-by: Ayan Kumar Halder Link: https://patchwork.freedesktop.org/patch/msgid/20190813110759.10425-1-james.qian.wang@arm.com drivers/gpu/drm/arm/display/komeda/komeda_pipeline.h | 1 + 1 file changed, 1 insertion(+) commit 61d05b184963523e50729af8466b72e9c8a4f8be Author: james qian wang (Arm Technology China) Date: Mon Aug 12 11:23:41 2019 +0000 drm/komeda: Fix warning -Wunused-but-set-variable Fixed two -Wunused-but-set-variable warnings: /arm/linux/display/aosp-4.14-drm-next/drivers/gpu/drm/arm/display/komeda/komeda_kms.c: In function ‘komeda_crtc_normalize_zpos’: /arm/linux/display/aosp-4.14-drm-next/drivers/gpu/drm/arm/display/komeda/komeda_kms.c:150:26: warning: variable ‘fb’ set but not used [-Wunused-but-set-variable] struct drm_framebuffer *fb; ^~ /arm/linux/display/aosp-4.14-drm-next/drivers/gpu/drm/arm/display/komeda/komeda_kms.c: In function ‘komeda_kms_check’: /arm/linux/display/aosp-4.14-drm-next/drivers/gpu/drm/arm/display/komeda/komeda_kms.c:209:25: warning: variable ‘old_crtc_st’ set but not used [-Wunused-but-set-variable] struct drm_crtc_state *old_crtc_st, *new_crtc_st; ^~~~~~~~~~~ Signed-off-by: james qian wang (Arm Technology China) Reviewed-by: Ayan Kumar Halder Link: https://patchwork.freedesktop.org/patch/msgid/20190812112322.15990-1-james.qian.wang@arm.com drivers/gpu/drm/arm/display/komeda/komeda_kms.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 8f6a79112a360ff05b8aa4a9be081d3eb9057077 Author: james qian wang (Arm Technology China) Date: Mon Aug 19 08:01:57 2019 +0000 drm/komeda: Fix error: not allocating enough data 1592 vs 1584 The patch 5d51f6c0da1b: "drm/komeda: Add writeback support" from May 23, 2019, leads to the following static checker warning: drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c:151 komeda_wb_connector_add() error: not allocating enough data 1592 vs 1584 This is a typo which misuse "wb_conn" but which should be "kwb_conn" to allocate the memory. Reported-by: Dan Carpenter Signed-off-by: james qian wang (Arm Technology China) Reviewed-by: Ayan Kumar Halder Link: https://patchwork.freedesktop.org/patch/msgid/20190819080136.10190-1-james.qian.wang@arm.com drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 69389837171140e2a94c5b8683c08dceaa8c9c8c Author: Lvqiang Huang Date: Thu Aug 1 08:15:23 2019 +0100 ARM: 8897/1: check stmfd instruction using right shift In the commit ef41b5c92498 ("ARM: make kernel oops easier to read"), - .word 0xe92d0000 >> 10 @ stmfd sp!, {} + .word 0xe92d0000 >> 11 @ stmfd sp!, {} then the shift need to change to 11. Signed-off-by: Lvqiang Huang Signed-off-by: Chunyan Zhang Signed-off-by: Russell King arch/arm/lib/backtrace.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c51bc12d06b3a5494fbfcbd788a8e307932a06e9 Author: Doug Berger Date: Mon Jul 1 18:50:11 2019 +0100 ARM: 8874/1: mm: only adjust sections of valid mm structures A timing hazard exists when an early fork/exec thread begins exiting and sets its mm pointer to NULL while a separate core tries to update the section information. This commit ensures that the mm pointer is not NULL before setting its section parameters. The arguments provided by commit 11ce4b33aedc ("ARM: 8672/1: mm: remove tasklist locking from update_sections_early()") are equally valid for not requiring grabbing the task_lock around this check. Fixes: 08925c2f124f ("ARM: 8464/1: Update all mm structures with section adjustments") Signed-off-by: Doug Berger Acked-by: Laura Abbott Cc: Mike Rapoport Cc: Andrew Morton Cc: Florian Fainelli Cc: Rob Herring Cc: "Steven Rostedt (VMware)" Cc: Peng Fan Cc: Geert Uytterhoeven Signed-off-by: Russell King arch/arm/mm/init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 48057ed1840fde9239b1e000bea1a0a1f07c5e99 Author: Linus Walleij Date: Tue Aug 20 10:05:27 2019 +0200 gpio: Fix irqchip initialization order The new API for registering a gpio_irq_chip along with a gpio_chip has a different semantic ordering than the old API which added the irqchip explicitly after registering the gpio_chip. Move the calls to add the gpio_irq_chip *last* in the function, so that the different hooks setting up OF and ACPI and machine gpio_chips are called *before* we try to register the interrupts, preserving the elder semantic order. This cropped up in the PL061 driver which used to work fine with no special ACPI quirks, but started to misbehave using the new API. Fixes: e0d897289813 ("gpio: Implement tighter IRQ chip integration") Cc: Thierry Reding Cc: Grygorii Strashko Cc: Andy Shevchenko Reported-by: Wei Xu Tested-by: Wei Xu Reported-by: Andy Shevchenko Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20190820080527.11796-1-linus.walleij@linaro.org drivers/gpio/gpiolib.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit 9b2a0a1ef66f96bf34921a3865581eca32ff05ec Author: Gerd Hoffmann Date: Wed Aug 21 13:12:09 2019 +0200 drm/virtio: use virtio_max_dma_size We must make sure our scatterlist segments are not too big, otherwise we might see swiotlb failures (happens with sev, also reproducable with swiotlb=force). Suggested-by: Laszlo Ersek Signed-off-by: Gerd Hoffmann Reviewed-by: Laszlo Ersek Link: http://patchwork.freedesktop.org/patch/msgid/20190821111210.27165-1-kraxel@redhat.com drivers/gpu/drm/virtio/virtgpu_object.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 8090f7eb318d4241625449252db2741e7703e027 Author: Laurent Pinchart Date: Wed Aug 21 21:32:26 2019 +0300 drm/omap: Fix port lookup for SDI output When refactoring port lookup for DSS outputs, commit d17eb4537a7e ("drm/omap: Factor out common init/cleanup code for output devices") incorrectly hardcoded usage of DT port 0. This breaks operation for SDI (which uses the DT port 1) and DPI outputs other than DPI0 (which are not used in mainline DT sources). Fix this by using the port number from the output omap_dss_device of_ports field. Fixes: d17eb4537a7e ("drm/omap: Factor out common init/cleanup code for output devices") Signed-off-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20190821183226.13784-1-laurent.pinchart@ideasonboard.com Tested-by: Aaro Koskinen drivers/gpu/drm/omapdrm/dss/output.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit fbf0a7f44cdd4041b5a3e2b14deaa0adebaf40da Author: Gerd Hoffmann Date: Mon Aug 5 12:54:01 2019 +0200 drm/qxl: get vga ioports qxl has two modes: "native" (used by the drm driver) and "vga" (vga compatibility mode, typically used for boot display and firmware framebuffers). Accessing any vga ioport will switch the qxl device into vga mode. The qxl driver never does that, but other drivers accessing vga ports can trigger that too and therefore disturb qxl operation. So aquire the legacy vga ioports from vgaarb to avoid that. Reproducer: Boot kvm guest with both qxl and i915 vgpu, with qxl being first in pci scan order. v2: Skip this for secondary qxl cards which don't have vga mode in the first place (Frediano). Cc: Frediano Ziglio Signed-off-by: Gerd Hoffmann Reviewed-by: Dave Airlie Link: http://patchwork.freedesktop.org/patch/msgid/20190805105401.29874-1-kraxel@redhat.com drivers/gpu/drm/qxl/qxl_drv.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) commit 1fb254aa983bf190cfd685d40c64a480a9bafaee Author: Darrick J. Wong Date: Thu Aug 22 20:55:54 2019 -0700 xfs: fix missing ILOCK unlock when xfs_setattr_nonsize fails due to EDQUOT Benjamin Moody reported to Debian that XFS partially wedges when a chgrp fails on account of being out of disk quota. I ran his reproducer script: # adduser dummy # adduser dummy plugdev # dd if=/dev/zero bs=1M count=100 of=test.img # mkfs.xfs test.img # mount -t xfs -o gquota test.img /mnt # mkdir -p /mnt/dummy # chown -c dummy /mnt/dummy # xfs_quota -xc 'limit -g bsoft=100k bhard=100k plugdev' /mnt (and then as user dummy) $ dd if=/dev/urandom bs=1M count=50 of=/mnt/dummy/foo $ chgrp plugdev /mnt/dummy/foo and saw: ================================================ WARNING: lock held when returning to user space! 5.3.0-rc5 #rc5 Tainted: G W ------------------------------------------------ chgrp/47006 is leaving the kernel with locks still held! 1 lock held by chgrp/47006: #0: 000000006664ea2d (&xfs_nondir_ilock_class){++++}, at: xfs_ilock+0xd2/0x290 [xfs] ...which is clearly caused by xfs_setattr_nonsize failing to unlock the ILOCK after the xfs_qm_vop_chown_reserve call fails. Add the missing unlock. Reported-by: benjamin.moody@gmail.com Fixes: 253f4911f297 ("xfs: better xfs_trans_alloc interface") Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Tested-by: Salvatore Bonaccorso fs/xfs/xfs_iops.c | 1 + 1 file changed, 1 insertion(+) commit a4a759b2797ba9eff0dcfcdc532e886440da4e01 Merge: 75710f08ea7e c358ebf59634 Author: Dave Airlie Date: Fri Aug 23 13:53:59 2019 +1000 Merge branch 'linux-5.3' of git://github.com/skeggsb/linux into drm-fixes Fixes i2c on DP with some docks. Signed-off-by: Dave Airlie From: Ben Skeggs Link: https://patchwork.freedesktop.org/patch/msgid/CACAvsv713t2_BQ44gVV7Lqic6Vwmhq0r4FB5v-t0kD1jzFrbmQ@mail.gmail.com commit c358ebf59634f06d8ed176da651ec150df3c8686 Author: Lyude Paul Date: Thu Jul 25 15:40:01 2019 -0400 drm/nouveau: Don't retry infinitely when receiving no data on i2c over AUX While I had thought I had fixed this issue in: commit 342406e4fbba ("drm/nouveau/i2c: Disable i2c bus access after ->fini()") It turns out that while I did fix the error messages I was seeing on my P50 when trying to access i2c busses with the GPU in runtime suspend, I accidentally had missed one important detail that was mentioned on the bug report this commit was supposed to fix: that the CPU would only lock up when trying to access i2c busses _on connected devices_ _while the GPU is not in runtime suspend_. Whoops. That definitely explains why I was not able to get my machine to hang with i2c bus interactions until now, as plugging my P50 into it's dock with an HDMI monitor connected allowed me to finally reproduce this locally. Now that I have managed to reproduce this issue properly, it looks like the problem is much simpler then it looks. It turns out that some connected devices, such as MST laptop docks, will actually ACK i2c reads even if no data was actually read: [ 275.063043] nouveau 0000:01:00.0: i2c: aux 000a: 1: 0000004c 1 [ 275.063447] nouveau 0000:01:00.0: i2c: aux 000a: 00 01101000 10040000 [ 275.063759] nouveau 0000:01:00.0: i2c: aux 000a: rd 00000001 [ 275.064024] nouveau 0000:01:00.0: i2c: aux 000a: rd 00000000 [ 275.064285] nouveau 0000:01:00.0: i2c: aux 000a: rd 00000000 [ 275.064594] nouveau 0000:01:00.0: i2c: aux 000a: rd 00000000 Because we don't handle the situation of i2c ack without any data, we end up entering an infinite loop in nvkm_i2c_aux_i2c_xfer() since the value of cnt always remains at 0. This finally properly explains how this could result in a CPU hang like the ones observed in the aforementioned commit. So, fix this by retrying transactions if no data is written or received, and give up and fail the transaction if we continue to not write or receive any data after 32 retries. Signed-off-by: Lyude Paul Cc: stable@vger.kernel.org Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.c | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) commit f6edbf2d616435cda7823942c20005ce198e97c8 Author: Justin.Lee1@Dell.com Date: Wed Aug 21 21:24:52 2019 +0000 net/ncsi: Fix the payload copying for the request coming from Netlink The request coming from Netlink should use the OEM generic handler. The standard command handler expects payload in bytes/words/dwords but the actual payload is stored in data if the request is coming from Netlink. Signed-off-by: Justin Lee Reviewed-by: Vijay Khemka Signed-off-by: David S. Miller net/ncsi/ncsi-cmd.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 75710f08ea7e41b2f7010da3f6deab061f7a853b Author: Alex Deucher Date: Wed Aug 21 22:25:27 2019 -0500 drm/amdgpu/powerplay: silence a warning in smu_v11_0_setup_pptable I think gcc is confused as I don't see how size could be used unitialized, but go ahead and silence the warning. Signed-off-by: Alex Deucher Reviewed-by: Evan Quan Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20190822032527.1376-1-alexander.deucher@amd.com drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cf3627fb1af183dc385022029c4b5232f6eb715c Merge: dd89c1127f80 63daf4e16654 Author: Dave Airlie Date: Fri Aug 23 11:43:47 2019 +1000 Merge tag 'drm-misc-fixes-2019-08-22' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes Fixes for v5.3-rc6: - dma fix for omap. - Make output polling work on komeda. - Fix bpp computing for AFBC formats in komeda. - Support the memory-region property in komeda. Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/5f1fdfe3-814e-fad1-663c-7279217fc085@linux.intel.com commit dd89c1127f808eff5b09f971758b1095d839b1a4 Merge: 1e85e6cad2d1 ed19e3035c5a Author: Dave Airlie Date: Fri Aug 23 11:41:58 2019 +1000 Merge tag 'drm-intel-fixes-2019-08-22' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes drm/i915 fixes for v5.3-rc6: - fix hardware state readout for 10 bpc HDMI Signed-off-by: Dave Airlie From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87sgptd114.fsf@intel.com commit b99328a60a482108f5195b4d611f90992ca016ba Author: Thomas Gleixner Date: Thu Aug 22 13:00:15 2019 +0200 timekeeping/vsyscall: Prevent math overflow in BOOTTIME update The VDSO update for CLOCK_BOOTTIME has a overflow issue as it shifts the nanoseconds based boot time offset left by the clocksource shift. That overflows once the boot time offset becomes large enough. As a consequence CLOCK_BOOTTIME in the VDSO becomes a random number causing applications to misbehave. Fix it by storing a timespec64 representation of the offset when boot time is adjusted and add that to the MONOTONIC base time value in the vdso data page. Using the timespec64 representation avoids a 64bit division in the update code. Fixes: 44f57d788e7d ("timekeeping: Provide a generic update_vsyscall() implementation") Reported-by: Chris Clayton Signed-off-by: Thomas Gleixner Tested-by: Chris Clayton Tested-by: Vincenzo Frascino Link: https://lkml.kernel.org/r/alpine.DEB.2.21.1908221257580.1983@nanos.tec.linutronix.de include/linux/timekeeper_internal.h | 5 +++++ kernel/time/timekeeping.c | 5 +++++ kernel/time/vsyscall.c | 22 +++++++++++++--------- 3 files changed, 23 insertions(+), 9 deletions(-) commit 4df0d839babdcd2a17cae52f112afa148d48289f Merge: de0e4fd2f07c 5a8c31aa6357 Author: David S. Miller Date: Thu Aug 22 16:12:16 2019 -0700 Merge tag 'wireless-drivers-for-davem-2019-08-21' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for 5.3 Third set of fixes for 5.3, and most likely the last one. The rt2x00 regression has been reported multiple times, others are of lower priority. mt76 * fix hang on resume on certain machines rt2x00 * fix AP mode regression related to encryption iwlwifi * avoid unnecessary error messages due to multicast frames when not associated * fix configuration for ax201 devices * fix recognition of QuZ devices ==================== Signed-off-by: David S. Miller commit de0e4fd2f07ce3bbdb69dfb8d9426b7227451b69 Author: Wenwen Wang Date: Tue Aug 20 23:46:36 2019 -0500 qed: Add cleanup in qed_slowpath_start() If qed_mcp_send_drv_version() fails, no cleanup is executed, leading to memory leaks. To fix this issue, introduce the label 'err4' to perform the cleanup work before returning the error. Signed-off-by: Wenwen Wang Acked-by: Sudarsana Reddy Kalluru Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit a71d9eff9394d24f05cbe115309152fb4543cd6c Author: Yangbo Lu Date: Wed Aug 21 09:59:12 2019 +0800 ocelot_ace: fix action of trap The trap action should be copying the frame to CPU and dropping it for forwarding, but current setting was just copying frame to CPU. Fixes: b596229448dd ("net: mscc: ocelot: Add support for tcam") Signed-off-by: Yangbo Lu Acked-by: Allan W. Nielsen Signed-off-by: David S. Miller drivers/net/ethernet/mscc/ocelot_ace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e0917f879536cbf57367429d084775d8224c986c Author: Johannes Berg Date: Mon Jul 22 09:12:56 2019 +0200 um: fix time travel mode Unfortunately, my build fix for when time travel mode isn't enabled broke time travel mode, because I forgot that we need to use the timer time after the timer has been marked disabled, and thus need to leave the time stored instead of zeroing it. Fix that by splitting the inline into two, so we can call only the _mode() one in the relevant code path. Fixes: b482e48d29f1 ("um: fix build without CONFIG_UML_TIME_TRAVEL_SUPPORT") Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger arch/um/include/shared/timer-internal.h | 14 ++++++++++---- arch/um/kernel/process.c | 2 +- arch/um/kernel/time.c | 16 +++++++++------- 3 files changed, 20 insertions(+), 12 deletions(-) commit 08f5439f1df25a6cf6cf4c72cf6c13025599ce67 Author: Jens Axboe Date: Wed Aug 21 22:19:11 2019 -0600 io_uring: add need_resched() check in inner poll loop The outer poll loop checks for whether we need to reschedule, and returns to userspace if we do. However, it's possible to get stuck in the inner loop as well, if the CPU we are running on needs to reschedule to finish the IO work. Add the need_resched() check in the inner loop as well. This fixes a potential hang if the kernel is configured with CONFIG_PREEMPT_VOLUNTARY=y. Reported-by: Sagi Grimberg Reviewed-by: Sagi Grimberg Tested-by: Sagi Grimberg Signed-off-by: Jens Axboe fs/io_uring.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 59c36bc8d377c8764eb617a92211e0fc2f1318da Merge: 20eabc8966f5 7bafda88de20 Author: Linus Torvalds Date: Thu Aug 22 14:04:47 2019 -0700 Merge tag 'pci-v5.3-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fixes from Bjorn Helgaas: - Reset both NVIDIA GPU and HDA in ThinkPad P50 quirk, which was broken by another quirk that enabled the HDA device (Lyude Paul) - Fix pciebus-howto.rst documentation filename typo (Bjorn Helgaas) * tag 'pci-v5.3-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: Documentation PCI: Fix pciebus-howto.rst filename typo PCI: Reset both NVIDIA GPU and HDA in ThinkPad P50 workaround commit a195784c105b2907b45fd62307d9ce821da9dc20 Author: Eran Ben Elisha Date: Wed Aug 21 15:47:29 2019 +0300 net/mlx5e: Remove ethernet segment from dump WQE Dump WQE shall not include Ethernet segment. Define mlx5e_dump_wqe to be used for "Dump WQEs" instead of sharing it with the general mlx5e_tx_wqe layout. Fixes: d2ead1f360e8 ("net/mlx5e: Add kTLS TX HW offload support") Signed-off-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed .../ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c | 26 +++++++++------------- 1 file changed, 10 insertions(+), 16 deletions(-) commit 5c6f40c61777e059ac3692c4505dff5eb880a12d Author: Eran Ben Elisha Date: Thu Aug 22 15:03:27 2019 +0300 net/mlx5e: Add num bytes metadata to WQE info For TLS WQEs, metadata info did not include num_bytes. Due to this issue, tx_tls_dump_bytes counter did not increment. Modify tx_fill_wi() to fill num bytes. When it is called for non-traffic WQE, zero is expected. Fixes: d2ead1f360e8 ("net/mlx5e: Add kTLS TX HW offload support") Signed-off-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit a6633e11e8732b9c000774746a2c1827a7e3c316 Author: Moshe Shemesh Date: Tue Aug 13 12:49:13 2019 +0300 net/mlx5: Fix delay in fw fatal report handling due to fw report When fw fatal error occurs, poll health() first detects and reports on a fw error. Afterwards, it detects and reports on the fw fatal error itself. That can cause a long delay in fw fatal error handling which waits in a queue for the fw error handling to be finished. The fw error handle will try asking for fw core dump command while fw in fatal state may not respond and driver will wait for command timeout. Changing the flow to detect and handle first fw fatal errors and only if no fatal error detected look for a fw error to handle. Fixes: d1bf0e2cc4a6 ("net/mlx5: Report devlink health on FW issues") Signed-off-by: Moshe Shemesh Reviewed-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/health.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 8465df4025dd4ab84fc24dad6a91cc2b9ec1604d Author: Moshe Shemesh Date: Sun Jul 14 14:06:40 2019 +0300 net/mlx5: Fix crdump chunks print Crdump repeats itself every chunk of 256bytes. That is due to bug of missing progressing offset while copying the data from buffer to devlink_fmsg. Fixes: 9b1f29823605 ("net/mlx5: Add support for FW fatal reporter dump") Signed-off-by: Moshe Shemesh Reviewed-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/health.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ae148243d3f0816b37477106c05a2ec7d5f32614 Author: ZhangXiaoxu Date: Mon Aug 19 11:31:21 2019 +0800 dm space map metadata: fix missing store of apply_bops() return value In commit 6096d91af0b6 ("dm space map metadata: fix occasional leak of a metadata block on resize"), we refactor the commit logic to a new function 'apply_bops'. But when that logic was replaced in out() the return value was not stored. This may lead out() returning a wrong value to the caller. Fixes: 6096d91af0b6 ("dm space map metadata: fix occasional leak of a metadata block on resize") Cc: stable@vger.kernel.org Signed-off-by: ZhangXiaoxu Signed-off-by: Mike Snitzer drivers/md/persistent-data/dm-space-map-metadata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e4f9d6013820d1eba1432d51dd1c5795759aa77f Author: ZhangXiaoxu Date: Sat Aug 17 13:32:40 2019 +0800 dm btree: fix order of block initialization in btree_split_beneath When btree_split_beneath() splits a node to two new children, it will allocate two blocks: left and right. If right block's allocation failed, the left block will be unlocked and marked dirty. If this happened, the left block'ss content is zero, because it wasn't initialized with the btree struct before the attempot to allocate the right block. Upon return, when flushing the left block to disk, the validator will fail when check this block. Then a BUG_ON is raised. Fix this by completely initializing the left block before allocating and initializing the right block. Fixes: 4dcb8b57df359 ("dm btree: fix leak of bufio-backed block in btree_split_beneath error path") Cc: stable@vger.kernel.org Signed-off-by: ZhangXiaoxu Signed-off-by: Mike Snitzer drivers/md/persistent-data/dm-btree.c | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) commit 20eabc8966f5c1973c2dd2450060f4511389a19c Merge: e5b7c167e46f c3cb6674df4c Author: Linus Torvalds Date: Thu Aug 22 11:26:10 2019 -0700 Merge tag 'Wimplicit-fallthrough-5.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux Pull more fallthrough fixes from Gustavo A. R. Silva: "Fix fall-through warnings on arm and mips for multiple configurations" * tag 'Wimplicit-fallthrough-5.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux: video: fbdev: acornfb: Mark expected switch fall-through scsi: libsas: sas_discover: Mark expected switch fall-through MIPS: Octeon: Mark expected switch fall-through power: supply: ab8500_charger: Mark expected switch fall-through watchdog: wdt285: Mark expected switch fall-through mtd: sa1100: Mark expected switch fall-through drm/sun4i: tcon: Mark expected switch fall-through drm/sun4i: sun6i_mipi_dsi: Mark expected switch fall-through ARM: riscpc: Mark expected switch fall-through dmaengine: fsldma: Mark expected switch fall-through commit e5b7c167e46f7b412aeafc91c22805eb76b91ad4 Merge: e8c3fa9f4d3b 9cdde8580483 Author: Linus Torvalds Date: Thu Aug 22 11:17:20 2019 -0700 Merge tag 'tag-chrome-platform-fixes-for-v5.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux Pull chrome platform fix from Benson Leung: "Fix a kernel crash during suspend/resume of cros_ec_ishtp" * tag 'tag-chrome-platform-fixes-for-v5.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux: platform/chrome: cros_ec_ishtp: fix crash during suspend commit e8c3fa9f4d3b9c56ee9436c310318a8165d695c1 Merge: bb7ba8069de9 7533be858f5b Author: Linus Torvalds Date: Thu Aug 22 11:12:33 2019 -0700 Merge tag 'afs-fixes-20190822' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs Pull AFS fixes from David Howells: - Fix a cell record leak due to the default error not being cleared. - Fix an oops in tracepoint due to a pointer that may contain an error. - Fix the ACL storage op for YFS where the wrong op definition is being used. By luck, this only actually affects the information appearing in traces. * tag 'afs-fixes-20190822' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: afs: use correct afs_call_type in yfs_fs_store_opaque_acl2 afs: Fix possible oops in afs_lookup trace event afs: Fix leak in afs_lookup_cell_rcu() commit 0af83abbd4a6e36a4b209d8c57c26143e40eeec1 Author: Liu Song Date: Tue Aug 6 22:21:40 2019 +0800 ubifs: Limit the number of pages in shrink_liability If the number of dirty pages to be written back is large, then writeback_inodes_sb will block waiting for a long time, causing hung task detection alarm. Therefore, we should limit the maximum number of pages written back this time, which let the budget be completed faster. The remaining dirty pages tend to rely on the writeback mechanism to complete the synchronization. Fixes: b6e51316daed ("writeback: separate starting of sync vs opportunistic writeback") Signed-off-by: Liu Song Signed-off-by: Richard Weinberger fs/ubifs/budget.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 377e208f44784174f3002d9892d553715a3ab71b Author: Richard Weinberger Date: Tue Aug 13 23:55:48 2019 +0200 ubifs: Correctly initialize c->min_log_bytes Currently on a freshly mounted UBIFS, c->min_log_bytes is 0. This can lead to a log overrun and make commits fail. Recent kernels will report the following assert: UBIFS assert failed: c->lhead_lnum != c->ltail_lnum, in fs/ubifs/log.c:412 c->min_log_bytes can have two states, 0 and c->leb_size. It controls how much bytes of the log area are reserved for non-bud nodes such as commit nodes. After a commit it has to be set to c->leb_size such that we have always enough space for a commit. While a commit runs it can be 0 to make the remaining bytes of the log available to writers. Having it set to 0 right after mount is wrong since no space for commits is reserved. Fixes: 1e51764a3c2ac ("UBIFS: add new flash file system") Reported-and-tested-by: Uwe Kleine-König Signed-off-by: Richard Weinberger fs/ubifs/super.c | 4 ++++ 1 file changed, 4 insertions(+) commit 4dd75b335bc1f10fb1a01b5cd58870d47c13c4e7 Author: Richard Weinberger Date: Tue Aug 13 23:50:51 2019 +0200 ubifs: Fix double unlock around orphan_delete() We unlock after orphan_delete(), so no need to unlock in the function too. Reported-by: Han Xu Fixes: 8009ce956c3d ("ubifs: Don't leak orphans on memory during commit") Signed-off-by: Richard Weinberger fs/ubifs/orphan.c | 2 -- 1 file changed, 2 deletions(-) commit 7542c6dedbc1caa284ca4cbd6b64f99023ff1b97 Author: Masahiro Yamada Date: Tue Jun 18 12:09:26 2019 +0900 jffs2: Remove C++ style comments from uapi header Linux kernel tolerates C++ style comments these days. Actually, the SPDX License tags for .c files start with //. On the other hand, uapi headers are written in more strict C, where the C++ comment style is forbidden. I simply dropped these lines instead of fixing the comment style. This code has been always commented out since it was added around Linux 2.4.9 (i.e. commented out for more than 17 years). 'Maybe later...' will never happen. Signed-off-by: Masahiro Yamada Acked-by: Richard Weinberger Signed-off-by: Richard Weinberger include/uapi/linux/jffs2.h | 5 ----- 1 file changed, 5 deletions(-) commit fab4f97e1fe33cf08e58c09cf9eee334857d9fe7 Author: Bernard Metzler Date: Thu Aug 22 17:07:41 2019 +0200 RDMA/siw: Fix SGL mapping issues All user level and most in-kernel applications submit WQEs where the SG list entries are all of a single type. iSER in particular, however, will send us WQEs with mixed SG types: sge[0] = kernel buffer, sge[1] = PBL region. Check and set is_kva on each SG entry individually instead of assuming the first SGE type carries through to the last. This fixes iSER over siw. Fixes: b9be6f18cf9e ("rdma/siw: transmit path") Reported-by: Krishnamraju Eraparaju Tested-by: Krishnamraju Eraparaju Signed-off-by: Bernard Metzler Link: https://lore.kernel.org/r/20190822150741.21871-1-bmt@zurich.ibm.com Signed-off-by: Doug Ledford drivers/infiniband/sw/siw/siw_qp_tx.c | 37 ++++++++++++++--------------------- 1 file changed, 15 insertions(+), 22 deletions(-) commit d37b1e534071ab1983e7c85273234b132c77591a Author: Selvin Xavier Date: Thu Aug 22 03:02:50 2019 -0700 RDMA/bnxt_re: Fix stack-out-of-bounds in bnxt_qplib_rcfw_send_message Driver copies FW commands to the HW queue as units of 16 bytes. Some of the command structures are not exact multiple of 16. So while copying the data from those structures, the stack out of bounds messages are reported by KASAN. The following error is reported. [ 1337.530155] ================================================================== [ 1337.530277] BUG: KASAN: stack-out-of-bounds in bnxt_qplib_rcfw_send_message+0x40a/0x850 [bnxt_re] [ 1337.530413] Read of size 16 at addr ffff888725477a48 by task rmmod/2785 [ 1337.530540] CPU: 5 PID: 2785 Comm: rmmod Tainted: G OE 5.2.0-rc6+ #75 [ 1337.530541] Hardware name: Dell Inc. PowerEdge R730/0599V5, BIOS 1.0.4 08/28/2014 [ 1337.530542] Call Trace: [ 1337.530548] dump_stack+0x5b/0x90 [ 1337.530556] ? bnxt_qplib_rcfw_send_message+0x40a/0x850 [bnxt_re] [ 1337.530560] print_address_description+0x65/0x22e [ 1337.530568] ? bnxt_qplib_rcfw_send_message+0x40a/0x850 [bnxt_re] [ 1337.530575] ? bnxt_qplib_rcfw_send_message+0x40a/0x850 [bnxt_re] [ 1337.530577] __kasan_report.cold.3+0x37/0x77 [ 1337.530581] ? _raw_write_trylock+0x10/0xe0 [ 1337.530588] ? bnxt_qplib_rcfw_send_message+0x40a/0x850 [bnxt_re] [ 1337.530590] kasan_report+0xe/0x20 [ 1337.530592] memcpy+0x1f/0x50 [ 1337.530600] bnxt_qplib_rcfw_send_message+0x40a/0x850 [bnxt_re] [ 1337.530608] ? bnxt_qplib_creq_irq+0xa0/0xa0 [bnxt_re] [ 1337.530611] ? xas_create+0x3aa/0x5f0 [ 1337.530613] ? xas_start+0x77/0x110 [ 1337.530615] ? xas_clear_mark+0x34/0xd0 [ 1337.530623] bnxt_qplib_free_mrw+0x104/0x1a0 [bnxt_re] [ 1337.530631] ? bnxt_qplib_destroy_ah+0x110/0x110 [bnxt_re] [ 1337.530633] ? bit_wait_io_timeout+0xc0/0xc0 [ 1337.530641] bnxt_re_dealloc_mw+0x2c/0x60 [bnxt_re] [ 1337.530648] bnxt_re_destroy_fence_mr+0x77/0x1d0 [bnxt_re] [ 1337.530655] bnxt_re_dealloc_pd+0x25/0x60 [bnxt_re] [ 1337.530677] ib_dealloc_pd_user+0xbe/0xe0 [ib_core] [ 1337.530683] srpt_remove_one+0x5de/0x690 [ib_srpt] [ 1337.530689] ? __srpt_close_all_ch+0xc0/0xc0 [ib_srpt] [ 1337.530692] ? xa_load+0x87/0xe0 ... [ 1337.530840] do_syscall_64+0x6d/0x1f0 [ 1337.530843] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 1337.530845] RIP: 0033:0x7ff5b389035b [ 1337.530848] Code: 73 01 c3 48 8b 0d 2d 0b 2c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa b8 b0 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d fd 0a 2c 00 f7 d8 64 89 01 48 [ 1337.530849] RSP: 002b:00007fff83425c28 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0 [ 1337.530852] RAX: ffffffffffffffda RBX: 00005596443e6750 RCX: 00007ff5b389035b [ 1337.530853] RDX: 000000000000000a RSI: 0000000000000800 RDI: 00005596443e67b8 [ 1337.530854] RBP: 0000000000000000 R08: 00007fff83424ba1 R09: 0000000000000000 [ 1337.530856] R10: 00007ff5b3902960 R11: 0000000000000206 R12: 00007fff83425e50 [ 1337.530857] R13: 00007fff8342673c R14: 00005596443e6260 R15: 00005596443e6750 [ 1337.530885] The buggy address belongs to the page: [ 1337.530962] page:ffffea001c951dc0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 [ 1337.530964] flags: 0x57ffffc0000000() [ 1337.530967] raw: 0057ffffc0000000 0000000000000000 ffffffff1c950101 0000000000000000 [ 1337.530970] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 [ 1337.530970] page dumped because: kasan: bad access detected [ 1337.530996] Memory state around the buggy address: [ 1337.531072] ffff888725477900: 00 00 00 00 f1 f1 f1 f1 00 00 00 00 00 f2 f2 f2 [ 1337.531180] ffff888725477980: 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 [ 1337.531288] >ffff888725477a00: 00 f2 f2 f2 f2 f2 f2 00 00 00 f2 00 00 00 00 00 [ 1337.531393] ^ [ 1337.531478] ffff888725477a80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 1337.531585] ffff888725477b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 1337.531691] ================================================================== Fix this by passing the exact size of each FW command to bnxt_qplib_rcfw_send_message as req->cmd_size. Before sending the command to HW, modify the req->cmd_size to number of 16 byte units. Fixes: 1ac5a4047975 ("RDMA/bnxt_re: Add bnxt_re RoCE driver") Signed-off-by: Selvin Xavier Link: https://lore.kernel.org/r/1566468170-489-1-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Doug Ledford drivers/infiniband/hw/bnxt_re/qplib_rcfw.c | 8 +++++++- drivers/infiniband/hw/bnxt_re/qplib_rcfw.h | 11 ++++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) commit 7533be858f5b9a036b9f91556a3ed70786abca8e Author: YueHaibing Date: Mon Aug 19 16:05:31 2019 +0100 afs: use correct afs_call_type in yfs_fs_store_opaque_acl2 It seems that 'yfs_RXYFSStoreOpaqueACL2' should be use in yfs_fs_store_opaque_acl2(). Fixes: f5e4546347bc ("afs: Implement YFS ACL setting") Signed-off-by: YueHaibing Signed-off-by: David Howells fs/afs/yfsclient.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c4c613ff08d92e72bf64a65ec35a2c3aa1cfcd06 Author: Marc Dionne Date: Thu Aug 22 13:28:43 2019 +0100 afs: Fix possible oops in afs_lookup trace event The afs_lookup trace event can cause the following: [ 216.576777] BUG: kernel NULL pointer dereference, address: 000000000000023b [ 216.576803] #PF: supervisor read access in kernel mode [ 216.576813] #PF: error_code(0x0000) - not-present page ... [ 216.576913] RIP: 0010:trace_event_raw_event_afs_lookup+0x9e/0x1c0 [kafs] If the inode from afs_do_lookup() is an error other than ENOENT, or if it is ENOENT and afs_try_auto_mntpt() returns an error, the trace event will try to dereference the error pointer as a valid pointer. Use IS_ERR_OR_NULL to only pass a valid pointer for the trace, or NULL. Ideally the trace would include the error value, but for now just avoid the oops. Fixes: 80548b03991f ("afs: Add more tracepoints") Signed-off-by: Marc Dionne Signed-off-by: David Howells fs/afs/dir.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a5fb8e6c02d6a518fb2b1a2b8c2471fa77b69436 Author: David Howells Date: Thu Aug 22 13:28:43 2019 +0100 afs: Fix leak in afs_lookup_cell_rcu() Fix a leak on the cell refcount in afs_lookup_cell_rcu() due to non-clearance of the default error in the case a NULL cell name is passed and the workstation default cell is used. Also put a bit at the end to make sure we don't leak a cell ref if we're going to be returning an error. This leak results in an assertion like the following when the kafs module is unloaded: AFS: Assertion failed 2 == 1 is false 0x2 == 0x1 is false ------------[ cut here ]------------ kernel BUG at fs/afs/cell.c:770! ... RIP: 0010:afs_manage_cells+0x220/0x42f [kafs] ... process_one_work+0x4c2/0x82c ? pool_mayday_timeout+0x1e1/0x1e1 ? do_raw_spin_lock+0x134/0x175 worker_thread+0x336/0x4a6 ? rescuer_thread+0x4af/0x4af kthread+0x1de/0x1ee ? kthread_park+0xd4/0xd4 ret_from_fork+0x24/0x30 Fixes: 989782dcdc91 ("afs: Overhaul cell database management") Signed-off-by: David Howells fs/afs/cell.c | 4 ++++ 1 file changed, 4 insertions(+) commit 2113c5f62b7423e4a72b890bd479704aa85c81ba Author: Andrew Jones Date: Thu Aug 22 13:03:05 2019 +0200 KVM: arm/arm64: Only skip MMIO insn once If after an MMIO exit to userspace a VCPU is immediately run with an immediate_exit request, such as when a signal is delivered or an MMIO emulation completion is needed, then the VCPU completes the MMIO emulation and immediately returns to userspace. As the exit_reason does not get changed from KVM_EXIT_MMIO in these cases we have to be careful not to complete the MMIO emulation again, when the VCPU is eventually run again, because the emulation does an instruction skip (and doing too many skips would be a waste of guest code :-) We need to use additional VCPU state to track if the emulation is complete. As luck would have it, we already have 'mmio_needed', which even appears to be used in this way by other architectures already. Fixes: 0d640732dbeb ("arm64: KVM: Skip MMIO insn after emulation") Acked-by: Mark Rutland Signed-off-by: Andrew Jones Signed-off-by: Marc Zyngier virt/kvm/arm/mmio.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 7871aa60ae0086fe4626abdf5ed13eeddf306c61 Author: Eugen Hristev Date: Thu Aug 8 08:35:40 2019 +0000 mmc: sdhci-of-at91: add quirk for broken HS200 HS200 is not implemented in the driver, but the controller claims it through caps. Remove it via a quirk, to make sure the mmc core do not try to enable HS200, as it causes the eMMC initialization to fail. Signed-off-by: Eugen Hristev Acked-by: Ludovic Desroches Acked-by: Adrian Hunter Fixes: bb5f8ea4d514 ("mmc: sdhci-of-at91: introduce driver for the Atmel SDMMC") Cc: stable@vger.kernel.org # v4.4+ Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-of-at91.c | 3 +++ 1 file changed, 3 insertions(+) commit a561372405cf6bc6f14239b3a9e57bb39f2788b0 Author: Ilya Dryomov Date: Tue Aug 20 16:40:33 2019 +0200 libceph: fix PG split vs OSD (re)connect race We can't rely on ->peer_features in calc_target() because it may be called both when the OSD session is established and open and when it's not. ->peer_features is not valid unless the OSD session is open. If this happens on a PG split (pg_num increase), that could mean we don't resend a request that should have been resent, hanging the client indefinitely. In userspace this was fixed by looking at require_osd_release and get_xinfo[osd].features fields of the osdmap. However these fields belong to the OSD section of the osdmap, which the kernel doesn't decode (only the client section is decoded). Instead, let's drop this feature check. It effectively checks for luminous, so only pre-luminous OSDs would be affected in that on a PG split the kernel might resend a request that should not have been resent. Duplicates can occur in other scenarios, so both sides should already be prepared for them: see dup/replay logic on the OSD side and retry_attempt check on the client side. Cc: stable@vger.kernel.org Fixes: 7de030d6b10a ("libceph: resend on PG splits if OSD has RESEND_ON_SPLIT") Link: https://tracker.ceph.com/issues/41162 Reported-by: Jerry Lee Signed-off-by: Ilya Dryomov Tested-by: Jerry Lee Reviewed-by: Jeff Layton net/ceph/osd_client.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 28a282616f56990547b9dcd5c6fbd2001344664c Author: Jeff Layton Date: Thu Aug 15 06:23:38 2019 -0400 ceph: don't try fill file_lock on unsuccessful GETFILELOCK reply When ceph_mdsc_do_request returns an error, we can't assume that the filelock_reply pointer will be set. Only try to fetch fields out of the r_reply_info when it returns success. Cc: stable@vger.kernel.org Reported-by: Hector Martin Signed-off-by: Jeff Layton Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/locks.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c95f1c5f436badb9bb87e9b30fd573f6b3d59423 Author: Erqi Chen Date: Wed Jul 24 10:26:09 2019 +0800 ceph: clear page dirty before invalidate page clear_page_dirty_for_io(page) before mapping->a_ops->invalidatepage(). invalidatepage() clears page's private flag, if dirty flag is not cleared, the page may cause BUG_ON failure in ceph_set_page_dirty(). Cc: stable@vger.kernel.org Link: https://tracker.ceph.com/issues/40862 Signed-off-by: Erqi Chen Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov fs/ceph/addr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit af8a85a41734f37b67ba8ce69d56b685bee4ac48 Author: Luis Henriques Date: Fri Jul 19 15:32:22 2019 +0100 ceph: fix buffer free while holding i_ceph_lock in fill_inode() Calling ceph_buffer_put() in fill_inode() may result in freeing the i_xattrs.blob buffer while holding the i_ceph_lock. This can be fixed by postponing the call until later, when the lock is released. The following backtrace was triggered by fstests generic/070. BUG: sleeping function called from invalid context at mm/vmalloc.c:2283 in_atomic(): 1, irqs_disabled(): 0, pid: 3852, name: kworker/0:4 6 locks held by kworker/0:4/3852: #0: 000000004270f6bb ((wq_completion)ceph-msgr){+.+.}, at: process_one_work+0x1b8/0x5f0 #1: 00000000eb420803 ((work_completion)(&(&con->work)->work)){+.+.}, at: process_one_work+0x1b8/0x5f0 #2: 00000000be1c53a4 (&s->s_mutex){+.+.}, at: dispatch+0x288/0x1476 #3: 00000000559cb958 (&mdsc->snap_rwsem){++++}, at: dispatch+0x2eb/0x1476 #4: 000000000d5ebbae (&req->r_fill_mutex){+.+.}, at: dispatch+0x2fc/0x1476 #5: 00000000a83d0514 (&(&ci->i_ceph_lock)->rlock){+.+.}, at: fill_inode.isra.0+0xf8/0xf70 CPU: 0 PID: 3852 Comm: kworker/0:4 Not tainted 5.2.0+ #441 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.1-0-ga5cab58-prebuilt.qemu.org 04/01/2014 Workqueue: ceph-msgr ceph_con_workfn Call Trace: dump_stack+0x67/0x90 ___might_sleep.cold+0x9f/0xb1 vfree+0x4b/0x60 ceph_buffer_release+0x1b/0x60 fill_inode.isra.0+0xa9b/0xf70 ceph_fill_trace+0x13b/0xc70 ? dispatch+0x2eb/0x1476 dispatch+0x320/0x1476 ? __mutex_unlock_slowpath+0x4d/0x2a0 ceph_con_workfn+0xc97/0x2ec0 ? process_one_work+0x1b8/0x5f0 process_one_work+0x244/0x5f0 worker_thread+0x4d/0x3e0 kthread+0x105/0x140 ? process_one_work+0x5f0/0x5f0 ? kthread_park+0x90/0x90 ret_from_fork+0x3a/0x50 Signed-off-by: Luis Henriques Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov fs/ceph/inode.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 12fe3dda7ed89c95cc0ef7abc001ad1ad3e092f8 Author: Luis Henriques Date: Fri Jul 19 15:32:21 2019 +0100 ceph: fix buffer free while holding i_ceph_lock in __ceph_build_xattrs_blob() Calling ceph_buffer_put() in __ceph_build_xattrs_blob() may result in freeing the i_xattrs.blob buffer while holding the i_ceph_lock. This can be fixed by having this function returning the old blob buffer and have the callers of this function freeing it when the lock is released. The following backtrace was triggered by fstests generic/117. BUG: sleeping function called from invalid context at mm/vmalloc.c:2283 in_atomic(): 1, irqs_disabled(): 0, pid: 649, name: fsstress 4 locks held by fsstress/649: #0: 00000000a7478e7e (&type->s_umount_key#19){++++}, at: iterate_supers+0x77/0xf0 #1: 00000000f8de1423 (&(&ci->i_ceph_lock)->rlock){+.+.}, at: ceph_check_caps+0x7b/0xc60 #2: 00000000562f2b27 (&s->s_mutex){+.+.}, at: ceph_check_caps+0x3bd/0xc60 #3: 00000000f83ce16a (&mdsc->snap_rwsem){++++}, at: ceph_check_caps+0x3ed/0xc60 CPU: 1 PID: 649 Comm: fsstress Not tainted 5.2.0+ #439 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.1-0-ga5cab58-prebuilt.qemu.org 04/01/2014 Call Trace: dump_stack+0x67/0x90 ___might_sleep.cold+0x9f/0xb1 vfree+0x4b/0x60 ceph_buffer_release+0x1b/0x60 __ceph_build_xattrs_blob+0x12b/0x170 __send_cap+0x302/0x540 ? __lock_acquire+0x23c/0x1e40 ? __mark_caps_flushing+0x15c/0x280 ? _raw_spin_unlock+0x24/0x30 ceph_check_caps+0x5f0/0xc60 ceph_flush_dirty_caps+0x7c/0x150 ? __ia32_sys_fdatasync+0x20/0x20 ceph_sync_fs+0x5a/0x130 iterate_supers+0x8f/0xf0 ksys_sync+0x4f/0xb0 __ia32_sys_sync+0xa/0x10 do_syscall_64+0x50/0x1c0 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7fc6409ab617 Signed-off-by: Luis Henriques Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov fs/ceph/caps.c | 5 ++++- fs/ceph/snap.c | 4 +++- fs/ceph/super.h | 2 +- fs/ceph/xattr.c | 11 ++++++++--- 4 files changed, 16 insertions(+), 6 deletions(-) commit 86968ef21596515958d5f0a40233d02be78ecec0 Author: Luis Henriques Date: Fri Jul 19 15:32:20 2019 +0100 ceph: fix buffer free while holding i_ceph_lock in __ceph_setxattr() Calling ceph_buffer_put() in __ceph_setxattr() may end up freeing the i_xattrs.prealloc_blob buffer while holding the i_ceph_lock. This can be fixed by postponing the call until later, when the lock is released. The following backtrace was triggered by fstests generic/117. BUG: sleeping function called from invalid context at mm/vmalloc.c:2283 in_atomic(): 1, irqs_disabled(): 0, pid: 650, name: fsstress 3 locks held by fsstress/650: #0: 00000000870a0fe8 (sb_writers#8){.+.+}, at: mnt_want_write+0x20/0x50 #1: 00000000ba0c4c74 (&type->i_mutex_dir_key#6){++++}, at: vfs_setxattr+0x55/0xa0 #2: 000000008dfbb3f2 (&(&ci->i_ceph_lock)->rlock){+.+.}, at: __ceph_setxattr+0x297/0x810 CPU: 1 PID: 650 Comm: fsstress Not tainted 5.2.0+ #437 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.1-0-ga5cab58-prebuilt.qemu.org 04/01/2014 Call Trace: dump_stack+0x67/0x90 ___might_sleep.cold+0x9f/0xb1 vfree+0x4b/0x60 ceph_buffer_release+0x1b/0x60 __ceph_setxattr+0x2b4/0x810 __vfs_setxattr+0x66/0x80 __vfs_setxattr_noperm+0x59/0xf0 vfs_setxattr+0x81/0xa0 setxattr+0x115/0x230 ? filename_lookup+0xc9/0x140 ? rcu_read_lock_sched_held+0x74/0x80 ? rcu_sync_lockdep_assert+0x2e/0x60 ? __sb_start_write+0x142/0x1a0 ? mnt_want_write+0x20/0x50 path_setxattr+0xba/0xd0 __x64_sys_lsetxattr+0x24/0x30 do_syscall_64+0x50/0x1c0 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7ff23514359a Signed-off-by: Luis Henriques Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov fs/ceph/xattr.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 5c498950f730aa17c5f8a2cdcb903524e4002ed2 Author: Luis Henriques Date: Fri Jul 19 15:32:19 2019 +0100 libceph: allow ceph_buffer_put() to receive a NULL ceph_buffer Signed-off-by: Luis Henriques Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov include/linux/ceph/buffer.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f9f0e9ed350e15d51ad07364b4cf910de50c472a Author: Takashi Iwai Date: Tue Aug 20 21:43:42 2019 +0200 ALSA: usb-audio: Check mixer unit bitmap yet more strictly The bmControls (for UAC1) or bmMixerControls (for UAC2/3) bitmap has a variable size depending on both input and output pins. Its size is to fit with input * output bits. The problem is that the input size can't be determined simply from the unit descriptor itself but it needs to parse the whole connected sources. Although the uac_mixer_unit_get_channels() tries to check some possible overflow of this bitmap, it's incomplete due to the lack of the evaluation of input pins. For covering possible overflows, this patch adds the bitmap overflow check in the loop of input pins in parse_audio_mixer_unit(). Fixes: 0bfe5e434e66 ("ALSA: usb-audio: Check mixer unit descriptors more strictly") Cc: Signed-off-by: Takashi Iwai sound/usb/mixer.c | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) commit 5871cd93692c8071fb9358daccb715b5081316ac Author: Gary R Hook Date: Mon Aug 19 22:23:27 2019 +0000 crypto: ccp - Ignore unconfigured CCP device on suspend/resume If a CCP is unconfigured (e.g. there are no available queues) then there will be no data structures allocated for the device. Thus, we must check for validity of a pointer before trying to access structure members. Fixes: 720419f01832f ("crypto: ccp - Introduce the AMD Secure Processor device") Cc: Signed-off-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-dev.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 7035eef4496d95b69b0bc18e0bced09304e0afdf Author: Song Liu Date: Wed Aug 21 11:45:25 2019 -0700 md: update MAINTAINERS info I have been reviewing patches for md in the past few months. Mark me as the MD maintainer, as I have effectively been filling that role. Cc: NeilBrown Signed-off-by: Song Liu Signed-off-by: Jens Axboe MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cc07db5a5b100bc8eaab5097a23d72f858979750 Author: Dan Carpenter Date: Tue Aug 20 12:11:44 2019 +0300 gve: Copy and paste bug in gve_get_stats() There is a copy and paste error so we have "rx" where "tx" was intended in the priv->tx[] array. Fixes: f5cedc84a30d ("gve: Add transmit and receive support") Signed-off-by: Dan Carpenter Reviewed-by: Catherine Sullivan Signed-off-by: David S. Miller drivers/net/ethernet/google/gve/gve_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0f404bbdaf1624f4d25dd67da7ff85eab005beac Author: Li RongQing Date: Tue Aug 20 10:46:00 2019 +0800 net: fix icmp_socket_deliver argument 2 input it expects a unsigned int, but got a __be32 Signed-off-by: Li RongQing Signed-off-by: Zhang Yu Signed-off-by: David S. Miller net/ipv4/icmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f17f7648a49aa6728649ddf79bdbcac4f1970ce4 Author: Hangbin Liu Date: Tue Aug 20 10:19:47 2019 +0800 ipv6/addrconf: allow adding multicast addr if IFA_F_MCAUTOJOIN is set In commit 93a714d6b53d ("multicast: Extend ip address command to enable multicast group join/leave on") we added a new flag IFA_F_MCAUTOJOIN to make user able to add multicast address on ethernet interface. This works for IPv4, but not for IPv6. See the inet6_addr_add code. static int inet6_addr_add() { ... if (cfg->ifa_flags & IFA_F_MCAUTOJOIN) { ipv6_mc_config(net->ipv6.mc_autojoin_sk, true...) } ifp = ipv6_add_addr(idev, cfg, true, extack); <- always fail with maddr if (!IS_ERR(ifp)) { ... } else if (cfg->ifa_flags & IFA_F_MCAUTOJOIN) { ipv6_mc_config(net->ipv6.mc_autojoin_sk, false...) } } But in ipv6_add_addr() it will check the address type and reject multicast address directly. So this feature is never worked for IPv6. We should not remove the multicast address check totally in ipv6_add_addr(), but could accept multicast address only when IFA_F_MCAUTOJOIN flag supplied. v2: update commit description Fixes: 93a714d6b53d ("multicast: Extend ip address command to enable multicast group join/leave on") Reported-by: Jianlin Shi Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller net/ipv6/addrconf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 738a2e4b1774fe0d20d6c027a7cbafb6a1619675 Author: Florian Fainelli Date: Wed Aug 21 17:07:46 2019 -0700 net: dsa: bcm_sf2: Do not configure PHYLINK on CPU port The SF2 binding does not specify that the CPU port should have properties mandatory for successfully instantiating a PHYLINK object. As such, there will be missing properties (including fixed-link) and when attempting to validate and later configure link modes, we will have an incorrect set of parameters (interface, speed, duplex). Simply prevent the CPU port from being configured through PHYLINK since bcm_sf2_imp_setup() takes care of that already. Fixes: 0e27921816ad ("net: dsa: Use PHYLINK for the CPU/DSA ports") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/bcm_sf2.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 1e85e6cad2d1a63d71353b9d3c338e703bbeea19 Merge: 2ba552b29b54 ec6e491353b9 Author: Dave Airlie Date: Thu Aug 22 12:59:10 2019 +1000 Merge tag 'drm-fixes-5.3-2019-08-21' of git://people.freedesktop.org/~agd5f/linux into drm-fixes drm-fixes-5.3-2019-08-21: amdgpu: - Fix gfxoff logic on RV - Powerplay fixes - Fix a possible memory leak in CS ioctl - bpc fix for display Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20190822021022.3356-1-alexander.deucher@amd.com commit 2ba552b29b5407337ece2d2606805a888b800a4b Merge: 14673e153926 165d42c012be Author: Dave Airlie Date: Thu Aug 22 12:56:32 2019 +1000 Merge tag 'mediatek-drm-fixes-5.3' of https://github.com/ckhu-mediatek/linux.git-tags into drm-fixes Mediatek memory leak drm fix for Linux 5.3 Signed-off-by: Dave Airlie From: CK Hu Link: https://patchwork.freedesktop.org/patch/msgid/1566264270.30493.4.camel@mtksdaap41 commit 14673e153926d3ad89e303345d1412cd7bd7c9dd Merge: d1abaeb3be7b a53358a31c98 Author: Dave Airlie Date: Thu Aug 22 12:53:23 2019 +1000 Merge tag 'du-fixes-20190816' of git://linuxtv.org/pinchartl/media into drm-fixes R-Car LVDS encoder fix Signed-off-by: Dave Airlie From: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/20190816130115.GH5020@pendragon.ideasonboard.com commit ec6e491353b9024d4b1a65c48b21e3bc0faeae4e Author: Nicholas Kazlauskas Date: Wed Aug 21 11:27:13 2019 -0400 drm/amd/display: Calculate bpc based on max_requested_bpc [Why] The only place where state->max_bpc is updated on the connector is at the start of atomic check during drm_atomic_connector_check. It isn't updated when adding the connectors to the atomic state after the fact. It also doesn't necessarily reflect the right value when called in amdgpu during mode validation outside of atomic check. This can cause the wrong bpc to be used even if the max_requested_bpc is the correct value. [How] Don't rely on state->max_bpc reflecting the real bpc value and just do the min(...) based on display info bpc and max_requested_bpc. Fixes: 01933ba42d3d ("drm/amd/display: Use current connector state if NULL when checking bpc") Signed-off-by: Nicholas Kazlauskas Reviewed-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 1a701ea924815b0518733aa8d5d05c1f6fa87062 Author: Nicolai Hähnle Date: Tue Aug 20 15:39:53 2019 +0200 drm/amdgpu: prevent memory leaks in AMDGPU_CS ioctl Error out if the AMDGPU_CS ioctl is called with multiple SYNCOBJ_OUT and/or TIMELINE_SIGNAL chunks, since otherwise the last chunk wins while the allocated array as well as the reference counts of sync objects are leaked. Signed-off-by: Nicolai Hähnle Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 221a2bdbd5d3871a5f41d912b2f06cc02e8f8b38 Author: Kenneth Feng Date: Tue Aug 20 15:11:37 2019 +0800 drm/amd/amdgpu: disable MMHUB PG for navi10 Disable MMHUB PG for navi10 according to the production requirement. Signed-off-by: Kenneth Feng Reviewed-by: Hawking Zhang Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/nv.c | 1 - 1 file changed, 1 deletion(-) commit 155f85c0d56896552439fd4fb5f43dfc4e9f842a Author: Kevin Wang Date: Tue Aug 20 13:28:51 2019 +0800 drm/amd/powerplay: remove duplicate macro smu_get_uclk_dpm_states in amdgpu_smu.h remove duplicate macro smu_get_uclk_dpm_states in amdgpu_smu.h " #define smu_get_uclk_dpm_states(smu, clocks_in_khz, num_states) \ ((smu)->ppt_funcs->get_uclk_dpm_states ? (smu)->ppt_funcs->get_uclk_dpm_states((smu), (clocks_in_khz), (num_states)) : 0) #define smu_get_max_sustainable_clocks_by_dc(smu, max_clocks) \ ((smu)->funcs->get_max_sustainable_clocks_by_dc ? (smu)->funcs->get_max_sustainable_clocks_by_dc((smu), (max_clocks)) : 0) #define smu_get_uclk_dpm_states(smu, clocks_in_khz, num_states) \ ((smu)->ppt_funcs->get_uclk_dpm_states ? (smu)->ppt_funcs->get_uclk_dpm_states((smu), (clocks_in_khz), (num_states)) : 0) " Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 2 -- 1 file changed, 2 deletions(-) commit 00430144ff7343369222a110985aaa6726fb26e0 Author: Kevin Wang Date: Mon Aug 19 23:38:02 2019 +0800 drm/amd/powerplay: fix variable type errors in smu_v11_0_setup_pptable fix size type errors, from uint32_t to uint16_t. it will cause only initializes the highest 16 bits in smu_get_atom_data_table function. bug report: This fixes the following static checker warning. drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:390 smu_v11_0_setup_pptable() warn: passing casted pointer '&size' to 'smu_get_atom_data_table()' 32 vs 16. Signed-off-by: Kevin Wang Reported-by: Dan Carpenter Reviewed-by: Evan Quan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 98f58ada2d37e68125c056f1fc005748251879c2 Author: Alex Deucher Date: Thu Aug 15 08:27:09 2019 -0500 drm/amdgpu/gfx9: update pg_flags after determining if gfx off is possible We need to set certain power gating flags after we determine if the firmware version is sufficient to support gfxoff. Previously we set the pg flags in early init, but we later we might have disabled gfxoff if the firmware versions didn't support it. Move adding the additional pg flags after we determine whether or not to support gfxoff. Fixes: 005440066f92 ("drm/amdgpu: enable gfxoff again on raven series (v2)") Tested-by: Kai-Heng Feng Tested-by: Tom St Denis Signed-off-by: Alex Deucher Cc: Kai-Heng Feng Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 4 ++++ drivers/gpu/drm/amd/amdgpu/soc15.c | 5 ----- 2 files changed, 4 insertions(+), 5 deletions(-) commit 2d683eaaeeb9d33d23674ae635e0ef1448523d18 Author: Antoine Tenart Date: Wed Aug 21 16:41:23 2019 +0200 net: cpsw: fix NULL pointer exception in the probe error path In certain cases when the probe function fails the error path calls cpsw_remove_dt() before calling platform_set_drvdata(). This is an issue as cpsw_remove_dt() uses platform_get_drvdata() to retrieve the cpsw_common data and leds to a NULL pointer exception. This patches fixes it by calling platform_set_drvdata() earlier in the probe. Fixes: 83a8471ba255 ("net: ethernet: ti: cpsw: refactor probe to group common hw initialization") Reported-by: Maxime Chevallier Signed-off-by: Antoine Tenart Reviewed-by: Grygorii Strashko Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6e2866a9dfc63ca86290ad789961239de1b25a80 Merge: aad12c239418 3ee1bb7aae97 Author: David S. Miller Date: Wed Aug 21 13:49:20 2019 -0700 Merge tag 'batadv-net-for-davem-20190821' of git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== Here is a batman-adv bugfix: - fix uninit-value in batadv_netlink_get_ifindex(), by Eric Dumazet ==================== Signed-off-by: David S. Miller commit 7846f58fba964af7cb8cf77d4d13c33254725211 Author: John Hubbard Date: Wed Aug 21 12:25:13 2019 -0700 x86/boot: Fix boot regression caused by bootparam sanitizing commit a90118c445cc ("x86/boot: Save fields explicitly, zero out everything else") had two errors: * It preserved boot_params.acpi_rsdp_addr, and * It failed to preserve boot_params.hdr Therefore, zero out acpi_rsdp_addr, and preserve hdr. Fixes: a90118c445cc ("x86/boot: Save fields explicitly, zero out everything else") Reported-by: Neil MacLeod Suggested-by: Thomas Gleixner Signed-off-by: John Hubbard Signed-off-by: Thomas Gleixner Tested-by: Neil MacLeod Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20190821192513.20126-1-jhubbard@nvidia.com arch/x86/include/asm/bootparam_utils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aad12c2394189f606ce0308ab65505fdd9081a10 Author: Mike Rapoport Date: Wed Aug 21 14:29:29 2019 +0300 trivial: netns: fix typo in 'struct net.passive' description Replace 'decided' with 'decide' so that comment would be /* To decide when the network namespace should be freed. */ Signed-off-by: Mike Rapoport Signed-off-by: David S. Miller include/net/net_namespace.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 33dc03da87888d33b56ed4a74051df398b96e5d2 Merge: a1c4cd67840e 0d31d4dbf384 Author: David S. Miller Date: Wed Aug 21 13:01:16 2019 -0700 Merge tag 'mac80211-for-davem-2019-08-21' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== Just three fixes: * extended key ID key installation * regulatory processing * possible memory leak in an error path ==================== Signed-off-by: David S. Miller commit bb7ba8069de933d69cb45dd0a5806b61033796a3 Merge: 2babd34df229 e4427372398c Author: Linus Torvalds Date: Wed Aug 21 11:48:38 2019 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Paolo Bonzini: "A couple bugfixes, and mostly selftests changes" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: selftests/kvm: make platform_info_test pass on AMD Revert "KVM: x86/mmu: Zap only the relevant pages when removing a memslot" selftests: kvm: fix state save/load on processors without XSAVE selftests: kvm: fix vmx_set_nested_state_test selftests: kvm: provide common function to enable eVMCS selftests: kvm: do not try running the VM in vmx_set_nested_state_test KVM: x86: svm: remove redundant assignment of var new_entry MAINTAINERS: add KVM x86 reviewers MAINTAINERS: change list for KVM/s390 kvm: x86: skip populating logical dest map if apic is not sw enabled commit 1bc8d18c75fef3b478dbdfef722aae09e2a9fde7 Author: Takashi Iwai Date: Wed Aug 21 20:00:02 2019 +0200 ALSA: line6: Fix memory leak at line6_init_pcm() error path I forgot to release the allocated object at the early error path in line6_init_pcm(). For addressing it, slightly shuffle the code so that the PCM destructor (pcm->private_free) is assigned properly before all error paths. Fixes: 3450121997ce ("ALSA: line6: Fix write on zero-sized buffer") Cc: Signed-off-by: Takashi Iwai sound/usb/line6/pcm.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit e4427372398c31f57450565de277f861a4db5b3b Author: Vitaly Kuznetsov Date: Mon Jun 10 19:22:55 2019 +0200 selftests/kvm: make platform_info_test pass on AMD test_msr_platform_info_disabled() generates EXIT_SHUTDOWN but VMCB state is undefined after that so an attempt to launch this guest again from test_msr_platform_info_enabled() fails. Reorder the tests to make test pass. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/x86_64/platform_info_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2babd34df2294a72df02dc4a3745df3408147eba Merge: 15d90b242290 78e70e780b28 Author: Linus Torvalds Date: Wed Aug 21 10:04:38 2019 -0700 Merge tag 'nfsd-5.3-1' of git://linux-nfs.org/~bfields/linux Pull nfsd fixes from Bruce Fields: "Fix nfsd bugs: three in the new nfsd/clients/ code, one in the reply cache containerization" * tag 'nfsd-5.3-1' of git://linux-nfs.org/~bfields/linux: nfsd4: Fix kernel crash when reading proc file reply_cache_stats nfsd: initialize i_private before d_add nfsd: use i_wrlock instead of rcu for nfsdfs i_private nfsd: fix dentry leak upon mkdir failure. commit 08d676d1685c2a29e4d0e1b0242324e564d4589e Author: Henk van der Laan Date: Fri Aug 16 22:08:47 2019 +0200 usb-storage: Add new JMS567 revision to unusual_devs Revision 0x0117 suffers from an identical issue to earlier revisions, therefore it should be added to the quirks list. Signed-off-by: Henk van der Laan Cc: stable Link: https://lore.kernel.org/r/20190816200847.21366-1-opensource@henkvdlaan.com Signed-off-by: Greg Kroah-Hartman drivers/usb/storage/unusual_devs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cbe85c88ce80fb92956a0793518d415864dcead8 Author: Peter Chen Date: Tue Aug 20 02:07:58 2019 +0000 usb: chipidea: udc: don't do hardware access if gadget has stopped After _gadget_stop_activity is executed, we can consider the hardware operation for gadget has finished, and the udc can be stopped and enter low power mode. So, any later hardware operations (from usb_ep_ops APIs or usb_gadget_ops APIs) should be considered invalid, any deinitializatons has been covered at _gadget_stop_activity. I meet this problem when I plug out usb cable from PC using mass_storage gadget, my callstack like: vbus interrupt->.vbus_session-> composite_disconnect ->pm_runtime_put_sync(&_gadget->dev), the composite_disconnect will call fsg_disable, but fsg_disable calls usb_ep_disable using async way, there are register accesses for usb_ep_disable. So sometimes, I get system hang due to visit register without clock, sometimes not. The Linux Kernel USB maintainer Alan Stern suggests this kinds of solution. See: http://marc.info/?l=linux-usb&m=138541769810983&w=2. Cc: #v4.9+ Signed-off-by: Peter Chen Link: https://lore.kernel.org/r/20190820020503.27080-2-peter.chen@nxp.com Signed-off-by: Greg Kroah-Hartman drivers/usb/chipidea/udc.c | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) commit de7b9aa633b693e77942e12f1769506efae6917b Author: Oliver Neukum Date: Tue Aug 20 11:28:25 2019 +0200 usbtmc: more sanity checking for packet size A malicious device can make the driver divide ny zero with a nonsense maximum packet size. Signed-off-by: Oliver Neukum Cc: stable Link: https://lore.kernel.org/r/20190820092826.17694-1-oneukum@suse.com Signed-off-by: Greg Kroah-Hartman drivers/usb/class/usbtmc.c | 3 +++ 1 file changed, 3 insertions(+) commit 3afa758cfb6efe0dc94dd8500add7222f503bfa5 Author: Gustavo A. R. Silva Date: Tue Aug 20 21:16:27 2019 -0500 usb: udc: lpc32xx: silence fall-through warning Silence the following fall-through warning by adding a break statement: drivers/usb/gadget/udc/lpc32xx_udc.c:2230:3: warning: this statement may fall through [-Wimplicit-fallthrough=] Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20190821021627.GA2679@embeddedor Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/udc/lpc32xx_udc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dc1a3e8e0cc6b2293b48c044710e63395aeb4fb4 Author: Wenwen Wang Date: Sun Aug 18 19:18:34 2019 -0500 dm raid: add missing cleanup in raid_ctr() If rs_prepare_reshape() fails, no cleanup is executed, leading to leak of the raid_set structure allocated at the beginning of raid_ctr(). To fix this issue, go to the label 'bad' if the error occurs. Fixes: 11e4723206683 ("dm raid: stop keeping raid set frozen altogether") Cc: stable@vger.kernel.org Signed-off-by: Wenwen Wang Signed-off-by: Mike Snitzer drivers/md/dm-raid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e0702d90b79d430b0ccc276ead4f88440bb51352 Author: Dan Carpenter Date: Mon Aug 19 12:58:14 2019 +0300 dm zoned: fix potential NULL dereference in dmz_do_reclaim() This function is supposed to return error pointers so it matches the dmz_get_rnd_zone_for_reclaim() function. The current code could lead to a NULL dereference in dmz_do_reclaim() Fixes: b234c6d7a703 ("dm zoned: improve error handling in reclaim") Signed-off-by: Dan Carpenter Reviewed-by: Dmitry Fomichev Signed-off-by: Mike Snitzer drivers/md/dm-zoned-metadata.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 08c04c84a5cde3af9baac0645a7496d6dcd76822 Author: Bryan Gurney Date: Fri Aug 16 10:09:53 2019 -0400 dm dust: use dust block size for badblocklist index Change the "frontend" dust_remove_block, dust_add_block, and dust_query_block functions to store the "dust block number", instead of the sector number corresponding to the "dust block number". For the "backend" functions dust_map_read and dust_map_write, right-shift by sect_per_block_shift. This fixes the inability to emulate failure beyond the first sector of each "dust block" (for devices with a "dust block size" larger than 512 bytes). Fixes: e4f3fabd67480bf ("dm: add dust target") Cc: stable@vger.kernel.org Signed-off-by: Bryan Gurney Signed-off-by: Mike Snitzer drivers/md/dm-dust.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 3035bb72ee47d494c041465b4add9c6407c832ed Author: Anders Roxell Date: Tue Aug 20 15:41:21 2019 +0200 selftests/bpf: install files test_xdp_vlan.sh When ./test_xdp_vlan_mode_generic.sh runs it complains that it can't find file test_xdp_vlan.sh. # selftests: bpf: test_xdp_vlan_mode_generic.sh # ./test_xdp_vlan_mode_generic.sh: line 9: ./test_xdp_vlan.sh: No such file or directory Rework so that test_xdp_vlan.sh gets installed, added to the variable TEST_PROGS_EXTENDED. Fixes: d35661fcf95d ("selftests/bpf: add wrapper scripts for test_xdp_vlan.sh") Signed-off-by: Anders Roxell Acked-by: Jesper Dangaard Brouer Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0604409df9e04cdec7b08d471c8c1c0c10b5554d Author: Anders Roxell Date: Tue Aug 20 15:41:34 2019 +0200 selftests/bpf: add config fragment BPF_JIT When running test_kmod.sh the following shows up # sysctl cannot stat /proc/sys/net/core/bpf_jit_enable No such file or directory cannot: stat_/proc/sys/net/core/bpf_jit_enable # # sysctl cannot stat /proc/sys/net/core/bpf_jit_harden No such file or directory cannot: stat_/proc/sys/net/core/bpf_jit_harden # Rework to enable CONFIG_BPF_JIT to solve "No such file or directory" Signed-off-by: Anders Roxell Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/config | 1 + 1 file changed, 1 insertion(+) commit e91dcb536ae263ecff07118e36bf820c229a6ecd Author: Ilya Leoshkevich Date: Mon Aug 19 14:38:47 2019 +0200 selftests/bpf: fix test_btf_dump with O= test_btf_dump fails when run with O=, because it needs to access source files and assumes they live in ./progs/, which is not the case in this scenario. Fix by instructing kselftest to copy btf_dump_test_case_*.c files to the test directory. Since kselftest does not preserve directory structure, adjust the test to look in ./progs/ and then in ./. Signed-off-by: Ilya Leoshkevich Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/Makefile | 3 +++ tools/testing/selftests/bpf/test_btf_dump.c | 7 +++++++ 2 files changed, 10 insertions(+) commit 806ce6e2117a42528e7bb979e04e28229b34a612 Author: Ilya Leoshkevich Date: Tue Aug 20 16:18:04 2019 +0200 selftests/bpf: fix test_cgroup_storage on s390 test_cgroup_storage fails on s390 with an assertion failure: packets are dropped when they shouldn't. The problem is that BPF_DW packet count is accessed as BPF_W with an offset of 0, which is not correct on big-endian machines. Since the point of this test is not to verify narrow loads/stores, simply use BPF_DW when working with packet counts. Fixes: 68cfa3ac6b8d ("selftests/bpf: add a cgroup storage test") Fixes: 919646d2a3a9 ("selftests/bpf: extend the storage test to test per-cpu cgroup storage") Signed-off-by: Ilya Leoshkevich Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/test_cgroup_storage.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0f686ca933597cfcc0636253fc1740423c062ec7 Author: Dmitry Osipenko Date: Fri Aug 9 01:24:30 2019 +0300 Revert "mmc: sdhci-tegra: drop ->get_ro() implementation" The WRITE_PROTECT bit is always in a "protected mode" on Tegra and WP-GPIO state need to be used instead. In a case of the GPIO absence, write-enable should be assumed. External SD is writable once again as a result of this patch because the offending commit changed behaviour for the case of a missing WP-GPIO to fall back to WRITE_PROTECT bit-checking, which is incorrect for Tegra. Cc: stable@vger.kernel.org # v5.1+ Fixes: e8391453e27f ("mmc: sdhci-tegra: drop ->get_ro() implementation") Signed-off-by: Dmitry Osipenko Acked-by: Thierry Reding Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-tegra.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit ed19e3035c5a16034e896eed28c5e72e02e2ff58 Author: Imre Deak Date: Thu Aug 8 19:25:47 2019 +0300 drm/i915: Fix HW readout for crtc_clock in HDMI mode The conversion during HDMI HW readout from port_clock to crtc_clock was missed when HDMI 10bpc support was added, so fix that. v2: - Unscrew the non-HDMI case. Fixes: cd9e11a8bf25 ("drm/i915/icl: Add 10-bit support for hdmi") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109593 Cc: Radhakrishna Sripada Cc: Ville Syrjälä Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190808162547.7009-1-imre.deak@intel.com (cherry picked from commit 2969a78aead38b49e80c821a5c683544ab16160d) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/display/intel_ddi.c | 4 ++-- drivers/gpu/drm/i915/intel_drv.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 3b5be16c7e90a69c93349d210766250fffcb54bd Author: He Zhe Date: Tue Aug 20 22:53:10 2019 +0800 modules: page-align module section allocations only for arches supporting strict module rwx We should keep the case of "#define debug_align(X) (X)" for all arches without CONFIG_HAS_STRICT_MODULE_RWX ability, which would save people, who are sensitive to system size, a lot of memory when using modules, especially for embedded systems. This is also the intention of the original #ifdef... statement and still valid for now. Note that this still keeps the effect of the fix of the following commit, 38f054d549a8 ("modules: always page-align module section allocations"), since when CONFIG_ARCH_HAS_STRICT_MODULE_RWX is enabled, module pages are aligned. Signed-off-by: He Zhe Signed-off-by: Jessica Yu kernel/module.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 0d31d4dbf38412f5b8b11b4511d07b840eebe8cb Author: Hodaszi, Robert Date: Fri Jun 14 13:16:01 2019 +0000 Revert "cfg80211: fix processing world regdomain when non modular" This reverts commit 96cce12ff6e0 ("cfg80211: fix processing world regdomain when non modular"). Re-triggering a reg_process_hint with the last request on all events, can make the regulatory domain fail in case of multiple WiFi modules. On slower boards (espacially with mdev), enumeration of the WiFi modules can end up in an intersected regulatory domain, and user cannot set it with 'iw reg set' anymore. This is happening, because: - 1st module enumerates, queues up a regulatory request - request gets processed by __reg_process_hint_driver(): - checks if previous was set by CORE -> yes - checks if regulator domain changed -> yes, from '00' to e.g. 'US' -> sends request to the 'crda' - 2nd module enumerates, queues up a regulator request (which triggers the reg_todo() work) - reg_todo() -> reg_process_pending_hints() sees, that the last request is not processed yet, so it tries to process it again. __reg_process_hint driver() will run again, and: - checks if the last request's initiator was the core -> no, it was the driver (1st WiFi module) - checks, if the previous initiator was the driver -> yes - checks if the regulator domain changed -> yes, it was '00' (set by core, and crda call did not return yet), and should be changed to 'US' ------> __reg_process_hint_driver calls an intersect Besides, the reg_process_hint call with the last request is meaningless since the crda call has a timeout work. If that timeout expires, the first module's request will lost. Cc: stable@vger.kernel.org Fixes: 96cce12ff6e0 ("cfg80211: fix processing world regdomain when non modular") Signed-off-by: Robert Hodaszi Link: https://lore.kernel.org/r/20190614131600.GA13897@a1-hr Signed-off-by: Johannes Berg net/wireless/reg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d012a06ab1d23178fc6856d8d2161fbcc4dd8ebd Author: Paolo Bonzini Date: Thu Aug 15 09:43:32 2019 +0200 Revert "KVM: x86/mmu: Zap only the relevant pages when removing a memslot" This reverts commit 4e103134b862314dc2f2f18f2fb0ab972adc3f5f. Alex Williamson reported regressions with device assignment with this patch. Even though the bug is probably elsewhere and still latent, this is needed to fix the regression. Fixes: 4e103134b862 ("KVM: x86/mmu: Zap only the relevant pages when removing a memslot", 2019-02-05) Reported-by: Alex Willamson Cc: stable@vger.kernel.org Cc: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 33 +-------------------------------- 1 file changed, 1 insertion(+), 32 deletions(-) commit 54577e5018a8c0cb79c9a0fa118a55c68715d398 Author: Paolo Bonzini Date: Tue Aug 20 17:35:52 2019 +0200 selftests: kvm: fix state save/load on processors without XSAVE state_test and smm_test are failing on older processors that do not have xcr0. This is because on those processor KVM does provide support for KVM_GET/SET_XSAVE (to avoid having to rely on the older KVM_GET/SET_FPU) but not for KVM_GET/SET_XCRS. Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/lib/x86_64/processor.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit b67fd72e84a88cae64cea8ab47ccdaab3bb3094d Author: Alexander Wetzel Date: Mon Aug 5 14:34:00 2019 +0200 cfg80211: Fix Extended Key ID key install checks Fix two shortcomings in the Extended Key ID API: 1) Allow the userspace to install pairwise keys using keyid 1 without NL80211_KEY_NO_TX set. This allows the userspace to install and activate pairwise keys with keyid 1 in the same way as for keyid 0, simplifying the API usage for e.g. FILS and FT key installs. 2) IEEE 802.11 - 2016 restricts Extended Key ID usage to CCMP/GCMP ciphers in IEEE 802.11 - 2016 "9.4.2.25.4 RSN capabilities". Enforce that when installing a key. Cc: stable@vger.kernel.org # 5.2 Fixes: 6cdd3979a2bd ("nl80211/cfg80211: Extended Key ID support") Signed-off-by: Alexander Wetzel Link: https://lore.kernel.org/r/20190805123400.51567-1-alexander@wetzel-home.de Signed-off-by: Johannes Berg net/wireless/util.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) commit 5fd2f91ad483baffdbe798f8a08f1b41442d1e24 Author: Johannes Berg Date: Thu Aug 1 09:30:33 2019 +0200 mac80211: fix possible sta leak If TDLS station addition is rejected, the sta memory is leaked. Avoid this by moving the check before the allocation. Cc: stable@vger.kernel.org Fixes: 7ed5285396c2 ("mac80211: don't initiate TDLS connection if station is not associated to AP") Link: https://lore.kernel.org/r/20190801073033.7892-1-johannes@sipsolutions.net Signed-off-by: Johannes Berg net/mac80211/cfg.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 6de3c9e3f6b3eaf66859e1379b3f35dda781416b Author: Takashi Iwai Date: Thu Aug 15 11:41:06 2019 +0200 ALSA: usb-audio: Fix invalid NULL check in snd_emuusb_set_samplerate() The quirk function snd_emuusb_set_samplerate() has a NULL check for the mixer element, but this is useless in the current code. It used to be a check against mixer->id_elems[unitid] but it was changed later to the value after mixer_eleme_list_to_info() which is always non-NULL due to the container_of() usage. This patch fixes the check before the conversion. While we're at it, correct a typo in the comment in the function, too. Fixes: 8c558076c740 ("ALSA: usb-audio: Clean up mixer element list traverse") Cc: Signed-off-by: Takashi Iwai sound/usb/mixer_quirks.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c3cb6674df4c4a70f949e412dfe2230483092523 Author: Gustavo A. R. Silva Date: Tue Aug 20 19:07:46 2019 -0500 video: fbdev: acornfb: Mark expected switch fall-through Mark switch cases where we are expecting to fall through. Fix the following warning (Building: rpc_defconfig arm): drivers/video/fbdev/acornfb.c: In function ‘acornfb_parse_dram’: drivers/video/fbdev/acornfb.c:860:9: warning: this statement may fall through [-Wimplicit-fallthrough=] size *= 1024; ~~~~~^~~~~~~ drivers/video/fbdev/acornfb.c:861:3: note: here case 'K': ^~~~ Signed-off-by: Gustavo A. R. Silva drivers/video/fbdev/acornfb.c | 1 + 1 file changed, 1 insertion(+) commit da1fb2909e701ffbae8c5d6111f475603355e6e2 Author: Gustavo A. R. Silva Date: Tue Aug 20 16:20:05 2019 -0500 scsi: libsas: sas_discover: Mark expected switch fall-through Mark switch cases where we are expecting to fall through. Fix the following warning (Building: mtx1_defconfig mips): drivers/scsi/libsas/sas_discover.c: In function ‘sas_discover_domain’: ./include/linux/printk.h:309:2: warning: this statement may fall through [-Wimplicit-fallthrough=] printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/libsas/sas_discover.c:459:3: note: in expansion of macro ‘pr_notice’ pr_notice("ATA device seen but CONFIG_SCSI_SAS_ATA=N so cannot attach\n"); ^~~~~~~~~ drivers/scsi/libsas/sas_discover.c:462:2: note: here default: ^~~~~~~ Signed-off-by: Gustavo A. R. Silva drivers/scsi/libsas/sas_discover.c | 1 + 1 file changed, 1 insertion(+) commit 93cbcf5d22bbe6f2ecf64765d5f6085beceb3ee8 Author: Gustavo A. R. Silva Date: Tue Aug 20 16:03:09 2019 -0500 MIPS: Octeon: Mark expected switch fall-through Mark switch cases where we are expecting to fall through. Fix the following warning (Building: cavium_octeon_defconfig mips): arch/mips/include/asm/octeon/cvmx-sli-defs.h:47:6: warning: this statement may fall through [-Wimplicit-fallthrough=] Signed-off-by: Gustavo A. R. Silva arch/mips/include/asm/octeon/cvmx-sli-defs.h | 1 + 1 file changed, 1 insertion(+) commit 5274fdba8e3c04e9ac1ba457379afc8835f9aa0f Author: Gustavo A. R. Silva Date: Tue Aug 20 15:55:26 2019 -0500 power: supply: ab8500_charger: Mark expected switch fall-through Mark switch cases where we are expecting to fall through. Fix the following warning (Building: allmodconfig arm): drivers/power/supply/ab8500_charger.c: In function ‘ab8500_charger_max_usb_curr’: drivers/power/supply/ab8500_charger.c:738:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (di->vbus_detected) { ^ drivers/power/supply/ab8500_charger.c:745:2: note: here case USB_STAT_HM_IDGND: ^~~~ Signed-off-by: Gustavo A. R. Silva drivers/power/supply/ab8500_charger.c | 1 + 1 file changed, 1 insertion(+) commit c9cbbb9f04f3ee27970f08d3aa6e6742a43d4ca5 Author: Gustavo A. R. Silva Date: Tue Aug 20 13:07:46 2019 -0500 watchdog: wdt285: Mark expected switch fall-through Mark switch cases where we are expecting to fall through. Fix the following warning (Building: footbridge_defconfig arm): drivers/watchdog/wdt285.c: In function ‘watchdog_ioctl’: drivers/watchdog/wdt285.c:170:3: warning: this statement may fall through [-Wimplicit-fallthrough=] watchdog_ping(); ^~~~~~~~~~~~~~~ drivers/watchdog/wdt285.c:172:2: note: here case WDIOC_GETTIMEOUT: ^~~~ Signed-off-by: Gustavo A. R. Silva drivers/watchdog/wdt285.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3f0289cb9e0ee38e0075328e59b9cd88bf5ea474 Author: Gustavo A. R. Silva Date: Tue Aug 20 12:54:32 2019 -0500 mtd: sa1100: Mark expected switch fall-through Mark switch cases where we are expecting to fall through. Fix the following warning (Building: assabet_defconfig arm): drivers/mtd/maps/sa1100-flash.c: In function ‘sa1100_probe_subdev’: drivers/mtd/maps/sa1100-flash.c:82:3: warning: this statement may fall through [-Wimplicit-fallthrough=] printk(KERN_WARNING "SA1100 flash: unknown base address " ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "0x%08lx, assuming CS0\n", phys); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/mtd/maps/sa1100-flash.c:85:2: note: here case SA1100_CS0_PHYS: ^~~~ Signed-off-by: Gustavo A. R. Silva drivers/mtd/maps/sa1100-flash.c | 1 + 1 file changed, 1 insertion(+) commit 5334653d4ff29f5e1f216a2f5d3a86c19a479b1a Author: Gustavo A. R. Silva Date: Tue Aug 20 12:47:06 2019 -0500 drm/sun4i: tcon: Mark expected switch fall-through Mark switch cases where we are expecting to fall through. Fix the following warning (Building: sunxi_defconfig arm): drivers/gpu/drm/sun4i/sun4i_tcon.c: In function ‘sun4i_tcon0_mode_set_dithering’: drivers/gpu/drm/sun4i/sun4i_tcon.c:318:7: warning: this statement may fall through [-Wimplicit-fallthrough=] val |= SUN4I_TCON0_FRM_CTL_MODE_B; drivers/gpu/drm/sun4i/sun4i_tcon.c:319:2: note: here case MEDIA_BUS_FMT_RGB666_1X18: ^~~~ Signed-off-by: Gustavo A. R. Silva drivers/gpu/drm/sun4i/sun4i_tcon.c | 1 + 1 file changed, 1 insertion(+) commit edf6a05976980b5c21f19a60fde175f736e4ab61 Author: Gustavo A. R. Silva Date: Tue Aug 20 13:01:03 2019 -0500 drm/sun4i: sun6i_mipi_dsi: Mark expected switch fall-through Mark switch cases where we are expecting to fall through. Fix the following warning (Building: multi_v7_defconfig arm): drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c: In function ‘sun6i_dsi_transfer’: drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c:993:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (msg->rx_len == 1) { ^ drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c:998:2: note: here default: ^~~~~~~ Signed-off-by: Gustavo A. R. Silva drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 1 + 1 file changed, 1 insertion(+) commit 06264adfa2bcc8abb556dec9af0e86150a67faf0 Author: Gustavo A. R. Silva Date: Tue Aug 20 19:29:16 2019 -0500 ARM: riscpc: Mark expected switch fall-through Mark switch cases where we are expecting to fall through. Fix the following warning (Building: rpc_defconfig arm): arch/arm/mach-rpc/riscpc.c: In function ‘parse_tag_acorn’: arch/arm/mach-rpc/riscpc.c:48:13: warning: this statement may fall through [-Wimplicit-fallthrough=] vram_size += PAGE_SIZE * 256; ~~~~~~~~~~^~~~~~~~~~~~~~~~~~ arch/arm/mach-rpc/riscpc.c:49:2: note: here case 256: ^~~~ Signed-off-by: Gustavo A. R. Silva arch/arm/mach-rpc/riscpc.c | 1 + 1 file changed, 1 insertion(+) commit 377ec83643efcae869528b4b26a5070fdeba3abd Author: Gustavo A. R. Silva Date: Sun Aug 11 19:18:03 2019 -0500 dmaengine: fsldma: Mark expected switch fall-through Mark switch cases where we are expecting to fall through. Fix the following warnings (Building: powerpc-ppa8548_defconfig powerpc): drivers/dma/fsldma.c: In function ‘fsl_dma_chan_probe’: drivers/dma/fsldma.c:1165:26: warning: this statement may fall through [-Wimplicit-fallthrough=] chan->toggle_ext_pause = fsl_chan_toggle_ext_pause; ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/dma/fsldma.c:1166:2: note: here case FSL_DMA_IP_83XX: ^~~~ Reported-by: kbuild test robot Acked-by: Li Yang Signed-off-by: Gustavo A. R. Silva drivers/dma/fsldma.c | 1 + 1 file changed, 1 insertion(+) commit 90ae409f9eb3bcaf38688f9ec22375816053a08e Author: Christoph Hellwig Date: Tue Aug 20 11:45:49 2019 +0900 dma-direct: fix zone selection after an unaddressable CMA allocation The new dma_alloc_contiguous hides if we allocate CMA or regular pages, and thus fails to retry a ZONE_NORMAL allocation if the CMA allocation succeeds but isn't addressable. That means we either fail outright or dip into a small zone that might not succeed either. Thanks to Hillf Danton for debugging this issue. Fixes: b1d2dc009dec ("dma-contiguous: add dma_{alloc,free}_contiguous() helpers") Reported-by: Tobias Klausmann Signed-off-by: Christoph Hellwig Tested-by: Tobias Klausmann drivers/iommu/dma-iommu.c | 3 +++ include/linux/dma-contiguous.h | 5 +---- kernel/dma/contiguous.c | 8 ++------ kernel/dma/direct.c | 10 +++++++++- 4 files changed, 15 insertions(+), 11 deletions(-) commit a1c4cd67840ef80f6ca5f73326fa9a6719303a95 Author: Li RongQing Date: Tue Aug 20 13:52:47 2019 +0800 net: fix __ip_mc_inc_group usage in ip_mc_inc_group, memory allocation flag, not mcast mode, is expected by __ip_mc_inc_group similar issue in __ip_mc_join_group, both mcase mode and gfp_t are needed here, so use ____ip_mc_inc_group(...) Fixes: 9fb20801dab4 ("net: Fix ip_mc_{dec,inc}_group allocation context") Signed-off-by: Li RongQing Signed-off-by: Florian Fainelli Signed-off-by: Zhang Yu Signed-off-by: David S. Miller net/ipv4/igmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 96a1b033ac24ccc58156f05c183b2cba0b9412d5 Author: Terry S. Duncan Date: Mon Aug 19 17:24:02 2019 -0700 net/ncsi: Ensure 32-bit boundary for data cksum The NCSI spec indicates that if the data does not end on a 32 bit boundary, one to three padding bytes equal to 0x00 shall be present to align the checksum field to a 32-bit boundary. Signed-off-by: Terry S. Duncan Signed-off-by: David S. Miller net/ncsi/ncsi-cmd.c | 2 +- net/ncsi/ncsi-rsp.c | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) commit 4651d1802f7063e4d8c0bcad957f46ece0c04024 Author: Jason Baron Date: Mon Aug 19 14:36:01 2019 -0400 net/smc: make sure EPOLLOUT is raised Currently, we are only explicitly setting SOCK_NOSPACE on a write timeout for non-blocking sockets. Epoll() edge-trigger mode relies on SOCK_NOSPACE being set when -EAGAIN is returned to ensure that EPOLLOUT is raised. Expand the setting of SOCK_NOSPACE to non-blocking sockets as well that can use SO_SNDTIMEO to adjust their write timeout. This mirrors the behavior that Eric Dumazet introduced for tcp sockets. Signed-off-by: Jason Baron Cc: Eric Dumazet Cc: Ursula Braun Cc: Karsten Graul Signed-off-by: David S. Miller net/smc/smc_tx.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 15d90b242290f228166ea79ee1cc2db6b31a2143 Merge: 5f97cbe22b76 fcf887e7caaa Author: Linus Torvalds Date: Tue Aug 20 11:18:43 2019 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID fixes from Jiri Kosina: - a few regression fixes for wacom driver (including fix for my earlier mismerge) from Aaron Armstrong Skomra and Jason Gerecke - revert of a few Logitech device ID additions which turn out to not work perfectly with the hidpp driver at the moment; proper support is now scheduled for 5.4. Fixes from Benjamin Tissoires - scheduling-in-atomic fix for cp2112 driver, from Benjamin Tissoires - new device ID to intel-ish, from Even Xu * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: HID: wacom: correct misreported EKR ring values HID: cp2112: prevent sleeping function called from invalid context HID: intel-ish-hid: ipc: add EHL device id HID: wacom: Correct distance scale for 2nd-gen Intuos devices HID: logitech-hidpp: remove support for the G700 over USB Revert "HID: logitech-hidpp: add USB PID for a few more supported mice" HID: wacom: add back changes dropped in merge commit commit 2323d7baab2b18d87d9bc267452e387aa9f0060a Author: Wenwen Wang Date: Sun Aug 18 13:54:46 2019 -0500 infiniband: hfi1: fix memory leaks In fault_opcodes_write(), 'data' is allocated through kcalloc(). However, it is not deallocated in the following execution if an error occurs, leading to memory leaks. To fix this issue, introduce the 'free_data' label to free 'data' before returning the error. Signed-off-by: Wenwen Wang Reviewed-by: Leon Romanovsky Acked-by: Dennis Dalessandro Link: https://lore.kernel.org/r/1566154486-3713-1-git-send-email-wenwen@cs.uga.edu Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/fault.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit b08afa064c320e5d85cdc27228426b696c4c8dae Author: Wenwen Wang Date: Sun Aug 18 14:29:31 2019 -0500 infiniband: hfi1: fix a memory leak bug In fault_opcodes_read(), 'data' is not deallocated if debugfs_file_get() fails, leading to a memory leak. To fix this bug, introduce the 'free_data' label to free 'data' before returning the error. Signed-off-by: Wenwen Wang Reviewed-by: Leon Romanovsky Acked-by: Dennis Dalessandro Link: https://lore.kernel.org/r/1566156571-4335-1-git-send-email-wenwen@cs.uga.edu Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/fault.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5c1baaa82cea2c815a5180ded402a7cd455d1810 Author: Wenwen Wang Date: Sun Aug 18 15:23:01 2019 -0500 IB/mlx4: Fix memory leaks In mlx4_ib_alloc_pv_bufs(), 'tun_qp->tx_ring' is allocated through kcalloc(). However, it is not always deallocated in the following execution if an error occurs, leading to memory leaks. To fix this issue, free 'tun_qp->tx_ring' whenever an error occurs. Signed-off-by: Wenwen Wang Acked-by: Leon Romanovsky Link: https://lore.kernel.org/r/1566159781-4642-1-git-send-email-wenwen@cs.uga.edu Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/mad.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a7bfb93f0211b4a2f1ffeeb259ed6206bac30460 Author: zhengbin Date: Mon Aug 19 12:27:39 2019 +0800 RDMA/cma: fix null-ptr-deref Read in cma_cleanup In cma_init, if cma_configfs_init fails, need to free the previously memory and return fail, otherwise will trigger null-ptr-deref Read in cma_cleanup. cma_cleanup cma_configfs_exit configfs_unregister_subsystem Fixes: 045959db65c6 ("IB/cma: Add configfs for rdma_cm") Reported-by: Hulk Robot Signed-off-by: zhengbin Reviewed-by: Parav Pandit Link: https://lore.kernel.org/r/1566188859-103051-1-git-send-email-zhengbin13@huawei.com Signed-off-by: Doug Ledford drivers/infiniband/core/cma.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 841b07f99a4766d66f50d8a2ab941bce94cd4e70 Author: Moni Shoua Date: Thu Aug 15 11:38:34 2019 +0300 IB/mlx5: Block MR WR if UMR is not possible Check conditions that are mandatory to post_send UMR WQEs. 1. Modifying page size. 2. Modifying remote atomic permissions if atomic access is required. If either condition is not fulfilled then fail to post_send() flow. Fixes: c8d75a980fab ("IB/mlx5: Respect new UMR capabilities") Signed-off-by: Moni Shoua Reviewed-by: Guy Levi Signed-off-by: Leon Romanovsky Link: https://lore.kernel.org/r/20190815083834.9245-9-leon@kernel.org Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/qp.c | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) commit 25a4517214ffa217a443181f7f885b914e6b328f Author: Moni Shoua Date: Thu Aug 15 11:38:33 2019 +0300 IB/mlx5: Fix MR re-registration flow to use UMR properly The UMR WQE in the MR re-registration flow requires that modify_atomic and modify_entity_size capabilities are enabled. Therefore, check that the these capabilities are present before going to umr flow and go through slow path if not. Fixes: c8d75a980fab ("IB/mlx5: Respect new UMR capabilities") Signed-off-by: Moni Shoua Reviewed-by: Guy Levi Signed-off-by: Leon Romanovsky Link: https://lore.kernel.org/r/20190815083834.9245-8-leon@kernel.org Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/mr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 008157528ac5658502c0f87e872778c56c41109c Author: Moni Shoua Date: Thu Aug 15 11:38:32 2019 +0300 IB/mlx5: Report and handle ODP support properly ODP depends on the several device capabilities, among them is the ability to send UMR WQEs with that modify atomic and entity size of the MR. Therefore, only if all conditions to send such a UMR WQE are met then driver can report that ODP is supported. Use this check of conditions in all places where driver needs to know about ODP support. Also, implicit ODP support depends on ability of driver to send UMR WQEs for an indirect mkey. Therefore, verify that all conditions to do so are met when reporting support. Fixes: c8d75a980fab ("IB/mlx5: Respect new UMR capabilities") Signed-off-by: Moni Shoua Reviewed-by: Guy Levi Signed-off-by: Leon Romanovsky Link: https://lore.kernel.org/r/20190815083834.9245-7-leon@kernel.org Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 6 +++--- drivers/infiniband/hw/mlx5/odp.c | 17 +++++++++-------- 2 files changed, 12 insertions(+), 11 deletions(-) commit 0e6613b41edd2f55a4b33234c5f31410c1ed3783 Author: Moni Shoua Date: Thu Aug 15 11:38:31 2019 +0300 IB/mlx5: Consolidate use_umr checks into single function Introduce helper function to unify various use_umr checks. Signed-off-by: Moni Shoua Signed-off-by: Leon Romanovsky Link: https://lore.kernel.org/r/20190815083834.9245-6-leon@kernel.org Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/mlx5_ib.h | 14 ++++++++++++++ drivers/infiniband/hw/mlx5/mr.c | 4 +--- 2 files changed, 15 insertions(+), 3 deletions(-) commit 60c78668ae50d6b815ead4a62216822a92097125 Author: Leon Romanovsky Date: Thu Aug 15 11:38:29 2019 +0300 RDMA/restrack: Rewrite PID namespace check to be reliable task_active_pid_ns() is wrong API to check PID namespace because it posses some restrictions and return PID namespace where the process was allocated. It created mismatches with current namespace, which can be different. Rewrite whole rdma_is_visible_in_pid_ns() logic to provide reliable results without any relation to allocated PID namespace. Fixes: 8be565e65fa9 ("RDMA/nldev: Factor out the PID namespace check") Fixes: 6a6c306a09b5 ("RDMA/restrack: Make is_visible_in_pid_ns() as an API") Reviewed-by: Mark Zhang Signed-off-by: Leon Romanovsky Link: https://lore.kernel.org/r/20190815083834.9245-4-leon@kernel.org Signed-off-by: Doug Ledford drivers/infiniband/core/nldev.c | 3 +-- drivers/infiniband/core/restrack.c | 15 +++++++-------- include/rdma/restrack.h | 3 +-- 3 files changed, 9 insertions(+), 12 deletions(-) commit c8b32408b4074232d93e64b6c23b2aa96dde448e Author: Leon Romanovsky Date: Thu Aug 15 11:38:28 2019 +0300 RDMA/counters: Properly implement PID checks "Auto" configuration mode is called for visible in that PID namespace and it ensures that all counters and QPs are coexist in the same namespace and belong to same PID. Fixes: 99fa331dc862 ("RDMA/counter: Add "auto" configuration mode support") Reviewed-by: Mark Zhang Signed-off-by: Leon Romanovsky Link: https://lore.kernel.org/r/20190815083834.9245-3-leon@kernel.org Signed-off-by: Doug Ledford drivers/infiniband/core/counters.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 948a7287b29e06b8c629f5e70235d857a175ceaf Author: Ido Kalir Date: Thu Aug 15 11:38:27 2019 +0300 IB/core: Fix NULL pointer dereference when bind QP to counter If QP is not visible to the pid, then we try to decrease its reference count and return from the function before the QP pointer is initialized. This lead to NULL pointer dereference. Fix it by pass directly the res to the rdma_restract_put as arg instead of &qp->res. This fixes below call trace: [ 5845.110329] BUG: kernel NULL pointer dereference, address: 00000000000000dc [ 5845.120482] Oops: 0002 [#1] SMP PTI [ 5845.129119] RIP: 0010:rdma_restrack_put+0x5/0x30 [ib_core] [ 5845.169450] Call Trace: [ 5845.170544] rdma_counter_get_qp+0x5c/0x70 [ib_core] [ 5845.172074] rdma_counter_bind_qpn_alloc+0x6f/0x1a0 [ib_core] [ 5845.173731] nldev_stat_set_doit+0x314/0x330 [ib_core] [ 5845.175279] rdma_nl_rcv_msg+0xeb/0x1d0 [ib_core] [ 5845.176772] ? __kmalloc_node_track_caller+0x20b/0x2b0 [ 5845.178321] rdma_nl_rcv+0xcb/0x120 [ib_core] [ 5845.179753] netlink_unicast+0x179/0x220 [ 5845.181066] netlink_sendmsg+0x2d8/0x3d0 [ 5845.182338] sock_sendmsg+0x30/0x40 [ 5845.183544] __sys_sendto+0xdc/0x160 [ 5845.184832] ? syscall_trace_enter+0x1f8/0x2e0 [ 5845.186209] ? __audit_syscall_exit+0x1d9/0x280 [ 5845.187584] __x64_sys_sendto+0x24/0x30 [ 5845.188867] do_syscall_64+0x48/0x120 [ 5845.190097] entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: 1bd8e0a9d0fd1 ("RDMA/counter: Allow manual mode configuration support") Signed-off-by: Ido Kalir Signed-off-by: Leon Romanovsky Link: https://lore.kernel.org/r/20190815083834.9245-2-leon@kernel.org Signed-off-by: Doug Ledford drivers/infiniband/core/counters.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d9d1f5e7bb82415591e8b62b222cbb88c4797ef3 Author: Kaike Wan Date: Thu Aug 15 15:20:58 2019 -0400 IB/hfi1: Drop stale TID RDMA packets that cause TIDErr In a congested fabric with adaptive routing enabled, traces show that packets could be delivered out of order. A stale TID RDMA data packet could lead to TidErr if the TID entries have been released by duplicate data packets generated from retries, and subsequently erroneously force the qp into error state in the current implementation. Since the payload has already been dropped by hardware, the packet can be simply dropped and it is no longer necessary to put the qp into error state. Fixes: 9905bf06e890 ("IB/hfi1: Add functions to receive TID RDMA READ response") Cc: Reviewed-by: Mike Marciniszyn Signed-off-by: Kaike Wan Signed-off-by: Dennis Dalessandro Link: https://lore.kernel.org/r/20190815192058.105923.72324.stgit@awfm-01.aw.intel.com Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/tid_rdma.c | 47 +++-------------------------------- 1 file changed, 3 insertions(+), 44 deletions(-) commit 90fdae66e72bf0381d168f12dca0259617927895 Author: Kaike Wan Date: Thu Aug 15 15:20:51 2019 -0400 IB/hfi1: Add additional checks when handling TID RDMA WRITE DATA packet In a congested fabric with adaptive routing enabled, traces show that packets could be delivered out of order, which could cause incorrect processing of stale packets. For stale TID RDMA WRITE DATA packets that cause KDETH EFLAGS errors, this patch adds additional checks before processing the packets. Fixes: d72fe7d5008b ("IB/hfi1: Add a function to receive TID RDMA WRITE DATA packet") Cc: Reviewed-by: Mike Marciniszyn Signed-off-by: Kaike Wan Signed-off-by: Dennis Dalessandro Link: https://lore.kernel.org/r/20190815192051.105923.69979.stgit@awfm-01.aw.intel.com Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/tid_rdma.c | 7 +++++++ 1 file changed, 7 insertions(+) commit a8adbf7d0d0a6e3bf7f99da461a06039364e028b Author: Kaike Wan Date: Thu Aug 15 15:20:45 2019 -0400 IB/hfi1: Add additional checks when handling TID RDMA READ RESP packet In a congested fabric with adaptive routing enabled, traces show that packets could be delivered out of order, which could cause incorrect processing of stale packets. For stale TID RDMA READ RESP packets that cause KDETH EFLAGS errors, this patch adds additional checks before processing the packets. Fixes: 9905bf06e890 ("IB/hfi1: Add functions to receive TID RDMA READ response") Cc: Reviewed-by: Mike Marciniszyn Signed-off-by: Kaike Wan Signed-off-by: Dennis Dalessandro Link: https://lore.kernel.org/r/20190815192045.105923.59813.stgit@awfm-01.aw.intel.com Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/tid_rdma.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 35d5c8b82e2c32e8e29ca195bb4dac60ba7d97fc Author: Kaike Wan Date: Thu Aug 15 15:20:39 2019 -0400 IB/hfi1: Unsafe PSN checking for TID RDMA READ Resp packet When processing a TID RDMA READ RESP packet that causes KDETH EFLAGS errors, the packet's IB PSN is checked against qp->s_last_psn and qp->s_psn without the protection of qp->s_lock, which is not safe. This patch fixes the issue by acquiring qp->s_lock first. Fixes: 9905bf06e890 ("IB/hfi1: Add functions to receive TID RDMA READ response") Cc: Reviewed-by: Mike Marciniszyn Signed-off-by: Kaike Wan Signed-off-by: Dennis Dalessandro Link: https://lore.kernel.org/r/20190815192039.105923.7852.stgit@awfm-01.aw.intel.com Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/tid_rdma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d58c1834bf0d218a0bc00f8fb44874551b21da84 Author: Kaike Wan Date: Thu Aug 15 15:20:33 2019 -0400 IB/hfi1: Drop stale TID RDMA packets In a congested fabric with adaptive routing enabled, traces show that the sender could receive stale TID RDMA NAK packets that contain newer KDETH PSNs and older Verbs PSNs. If not dropped, these packets could cause the incorrect rewinding of the software flows and the incorrect completion of TID RDMA WRITE requests, and eventually leading to memory corruption and kernel crash. The current code drops stale TID RDMA ACK/NAK packets solely based on KDETH PSNs, which may lead to erroneous processing. This patch fixes the issue by also checking the Verbs PSN. Addition checks are added before rewinding the TID RDMA WRITE DATA packets. Fixes: 9e93e967f7b4 ("IB/hfi1: Add a function to receive TID RDMA ACK packet") Cc: Reviewed-by: Mike Marciniszyn Signed-off-by: Kaike Wan Signed-off-by: Dennis Dalessandro Link: https://lore.kernel.org/r/20190815192033.105923.44192.stgit@awfm-01.aw.intel.com Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/tid_rdma.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 9b440078017f194e56eaae3ac32f333f420c5c4e Author: Bernard Metzler Date: Mon Aug 19 16:02:57 2019 +0200 RDMA/siw: Fix potential NULL de-ref In siw_connect() we have an error flow where there is no valid qp pointer. Make sure we don't try to de-ref in that situation. Fixes: 6c52fdc244b5 ("rdma/siw: connection management") Reported-by: Dan Carpenter Signed-off-by: Bernard Metzler Link: https://lore.kernel.org/r/20190819140257.19319-1-bmt@zurich.ibm.com Signed-off-by: Doug Ledford drivers/infiniband/sw/siw/siw_cm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 27b7fb1ab7bfad45f5702ff0c78a4822a41b1456 Author: Jason Gunthorpe Date: Thu Aug 15 11:38:30 2019 +0300 RDMA/mlx5: Fix MR npages calculation for IB_ACCESS_HUGETLB When ODP is enabled with IB_ACCESS_HUGETLB then the required pages should be calculated based on the extent of the MR, which is rounded to the nearest huge page alignment. Fixes: d2183c6f1958 ("RDMA/umem: Move page_shift from ib_umem to ib_odp_umem") Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky Link: https://lore.kernel.org/r/20190815083834.9245-5-leon@kernel.org Signed-off-by: Doug Ledford drivers/infiniband/core/umem.c | 7 +------ drivers/infiniband/hw/mlx5/mem.c | 5 +++-- 2 files changed, 4 insertions(+), 8 deletions(-) commit a3a0e43fd77013819e4b6f55e37e0efe8e35d805 Author: Jens Axboe Date: Tue Aug 20 11:03:11 2019 -0600 io_uring: don't enter poll loop if we have CQEs pending We need to check if we have CQEs pending before starting a poll loop, as those could be the events we will be spinning for (and hence we'll find none). This can happen if a CQE triggers an error, or if it is found by eg an IRQ before we get a chance to find it through polling. Signed-off-by: Jens Axboe fs/io_uring.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) commit cb32de1b7e2591f844f18a5513fde8e2bd49bce0 Author: Mario Limonciello Date: Fri Aug 16 15:16:19 2019 -0500 nvme: Add quirk for LiteON CL1 devices running FW 22301111 One of the components in LiteON CL1 device has limitations that can be encountered based upon boundary race conditions using the nvme bus specific suspend to idle flow. When this situation occurs the drive doesn't resume properly from suspend-to-idle. LiteON has confirmed this problem and fixed in the next firmware version. As this firmware is already in the field, avoid running nvme specific suspend to idle flow. Fixes: d916b1be94b6 ("nvme-pci: use host managed power state for suspend") Link: http://lists.infradead.org/pipermail/linux-nvme/2019-July/thread.html Signed-off-by: Mario Limonciello Signed-off-by: Charles Hyde Reviewed-by: Keith Busch Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 10 ++++++++++ drivers/nvme/host/nvme.h | 5 +++++ drivers/nvme/host/pci.c | 3 ++- 3 files changed, 17 insertions(+), 1 deletion(-) commit a89fcca8185633993018dc081d6b021d005e6d0b Author: Guilherme G. Piccoli Date: Wed Aug 14 11:26:10 2019 -0300 nvme: Fix cntlid validation when not using NVMEoF Commit 1b1031ca63b2 ("nvme: validate cntlid during controller initialisation") introduced a validation for controllers with duplicate cntlid that runs on nvme_init_subsystem(). The problem is that the validation relies on ctrl->cntlid, and this value is assigned (from id_ctrl value) after the call for nvme_init_subsystem() in nvme_init_identify() for non-fabrics scenario. That leads to ctrl->cntlid always being 0 in case we have a physical set of controllers in the same subsystem. This patch fixes that by loading the discovered cntlid id_ctrl value into ctrl->cntlid before the subsystem initialization, only for the non-fabrics case. The patch was tested with emulated nvme devices (qemu) having two controllers in a single subsystem. Without the patch, we couldn't make it work failing in the duplicate check; when running with the patch, we could see the subsystem holding both controllers. For the fabrics case we see ctrl->cntlid has a more intricate relation with the admin connect, so we didn't change that. Fixes: 1b1031ca63b2 ("nvme: validate cntlid during controller initialisation") Signed-off-by: Guilherme G. Piccoli Reviewed-by: Sagi Grimberg Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 504db087aaccdb32af61539916409f7dca31ceb5 Author: Anton Eidelman Date: Mon Aug 12 23:00:36 2019 +0300 nvme-multipath: fix possible I/O hang when paths are updated nvme_state_set_live() making a path available triggers requeue_work in order to resubmit requests that ended up on requeue_list when no paths were available. This requeue_work may race with concurrent nvme_ns_head_make_request() that do not observe the live path yet. Such concurrent requests may by made by either: - New IO submission. - Requeue_work triggered by nvme_failover_req() or another ana_work. A race may cause requeue_work capture the state of requeue_list before more requests get onto the list. These requests will stay on the list forever unless requeue_work is triggered again. In order to prevent such race, nvme_state_set_live() should synchronize_srcu(&head->srcu) before triggering the requeue_work and prevent nvme_ns_head_make_request referencing an old snapshot of the path list. Reviewed-by: Christoph Hellwig Signed-off-by: Anton Eidelman Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/multipath.c | 1 + 1 file changed, 1 insertion(+) commit 500f9fbadef86466a435726192f4ca4df7d94236 Author: Jens Axboe Date: Mon Aug 19 12:15:59 2019 -0600 io_uring: fix potential hang with polled IO If a request issue ends up being punted to async context to avoid blocking, we can get into a situation where the original application enters the poll loop for that very request before it has been issued. This should not be an issue, except that the polling will hold the io_uring uring_ctx mutex for the duration of the poll. When the async worker has actually issued the request, it needs to acquire this mutex to add the request to the poll issued list. Since the application polling is already holding this mutex, the workqueue sleeps on the mutex forever, and the application thus never gets a chance to poll for the very request it was interested in. Fix this by ensuring that the polling drops the uring_ctx occasionally if it's not making any progress. Reported-by: Jeffrey M. Birnbaum Signed-off-by: Jens Axboe fs/io_uring.c | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) commit a9fc4340aee041dd186d1fb8f1b5d1e9caf28212 Author: Dexuan Cui Date: Tue May 7 07:46:55 2019 +0000 Drivers: hv: vmbus: Fix virt_to_hvpfn() for X86_PAE In the case of X86_PAE, unsigned long is u32, but the physical address type should be u64. Due to the bug here, the netvsc driver can not load successfully, and sometimes the VM can panic due to memory corruption (the hypervisor writes data to the wrong location). Fixes: 6ba34171bcbd ("Drivers: hv: vmbus: Remove use of slow_virt_to_phys()") Cc: stable@vger.kernel.org Cc: Michael Kelley Reported-and-tested-by: Juliana Rodrigueiro Signed-off-by: Dexuan Cui Reviewed-by: Michael Kelley Signed-off-by: Sasha Levin drivers/hv/channel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 89eb4d8d25722a0a0194cf7fa47ba602e32a6da7 Author: Vitaly Kuznetsov Date: Mon Aug 19 16:44:09 2019 +0200 Tools: hv: kvp: eliminate 'may be used uninitialized' warning When building hv_kvp_daemon GCC-8.3 complains: hv_kvp_daemon.c: In function ‘kvp_get_ip_info.constprop’: hv_kvp_daemon.c:812:30: warning: ‘ip_buffer’ may be used uninitialized in this function [-Wmaybe-uninitialized] struct hv_kvp_ipaddr_value *ip_buffer; this seems to be a false positive: we only use ip_buffer when op == KVP_OP_GET_IP_INFO and it is only unset when op == KVP_OP_ENUMERATE. Silence the warning by initializing ip_buffer to NULL. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Sasha Levin tools/hv/hv_kvp_daemon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d09bc83640d524b8467a660db7b1d15e6562a1de Author: Dexuan Cui Date: Tue Aug 20 03:01:23 2019 +0000 Input: hyperv-keyboard: Use in-place iterator API in the channel callback Simplify the ring buffer handling with the in-place API. Also avoid the dynamic allocation and the memory leak in the channel callback function. Signed-off-by: Dexuan Cui Acked-by: Dmitry Torokhov Signed-off-by: Sasha Levin drivers/input/serio/hyperv-keyboard.c | 35 ++++++----------------------------- 1 file changed, 6 insertions(+), 29 deletions(-) commit 16c75963723dfd8d7ca719527052f16be7258a23 Author: Dexuan Cui Date: Tue Aug 20 03:06:40 2019 +0000 Drivers: hv: vmbus: Remove the unused "tsc_page" from struct hv_context This field is no longer used after the commit 63ed4e0c67df ("Drivers: hv: vmbus: Consolidate all Hyper-V specific clocksource code") , because it's replaced by the global variable "struct ms_hyperv_tsc_page *tsc_pg;" (now, the variable is in drivers/clocksource/hyperv_timer.c). Fixes: 63ed4e0c67df ("Drivers: hv: vmbus: Consolidate all Hyper-V specific clocksource code") Signed-off-by: Dexuan Cui Signed-off-by: Sasha Levin drivers/hv/hyperv_vmbus.h | 2 -- 1 file changed, 2 deletions(-) commit fb89c39455e4b49881c5a42761bd71f03d3ef888 Author: Ivan Khoronzhuk Date: Thu Aug 15 23:56:35 2019 +0300 xdp: unpin xdp umem pages in error path Fix mem leak caused by missed unpin routine for umem pages. Fixes: 8aef7340ae9695 ("xsk: introduce xdp_umem_page") Signed-off-by: Ivan Khoronzhuk Acked-by: Jonathan Lemon Signed-off-by: Daniel Borkmann net/xdp/xdp_umem.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 5a8c31aa63578cb0ff390a57537f1cb4b312a1ed Author: Luca Coelho Date: Fri Aug 16 15:55:54 2019 +0300 iwlwifi: pcie: fix recognition of QuZ devices If the HW revision of Qu devices we found is QuZ, then we need to switch the configuration accordingly in order to use the correct FW. Add a block of ifs in order do that. Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 17e40e6979aaf60f356331bac129df20e1fd74a0 Author: Luca Coelho Date: Fri Aug 16 15:55:53 2019 +0300 iwlwifi: pcie: don't switch FW to qnj when ax201 is detected We have a too generic condition that switches from Qu configurations to QnJ configurations. We need to exclude some configurations so that they are not erroneously switched. Add the ax201 configuration to the list of exclusions. Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 1 + 1 file changed, 1 insertion(+) commit 884b75696873f5338c57a2613763ea8f37b4e26b Author: Emmanuel Grumbach Date: Fri Aug 16 15:55:52 2019 +0300 iwlwifi: pcie: fix the byte count table format for 22560 devices Starting from 22560, the byte count is expected to be in bytes and we have now 14 bits. Ajust the code to this. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit 50f5604476b2bd728910b2e1803a6eafd0eeaf3d Author: Ilan Peer Date: Fri Aug 16 15:55:51 2019 +0300 iwlwifi: mvm: Allow multicast data frames only when associated The MAC context configuration always allowed multicast data frames to pass to the driver for all MAC context types, and in the case of station MAC context both when associated and when not associated. One of the outcomes of this configuration is having the FW forward encrypted multicast frames to the driver with Rx status indicating that the frame was not decrypted (as expected, since no keys were configured yet) which in turn results with unnecessary error messages. Change this behavior to allow multicast data frames only when they are actually expected, e.g., station MAC context is associated etc. Signed-off-by: Ilan Peer Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 33 ++++++++++++++++++++--- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 10 +++++++ 2 files changed, 40 insertions(+), 3 deletions(-) commit 95844124385eae4bd9ca5f9514a0fc33d561ac3c Author: Stanislaw Gruszka Date: Mon Aug 19 13:20:07 2019 +0200 rt2x00: clear IV's on start to fix AP mode regression To do not brake HW restart we should keep initialization vectors data. I assumed that on start the data is already initialized to zeros, but that not true on some scenarios and we should clear it. So add additional flag to check if we are under HW restart and clear IV's data if we are not. Patch fixes AP mode regression. Reported-and-tested-by: Emil Karlson Fixes: 710e6cc1595e ("rt2800: do not nullify initialization vector data") Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 9 +++++++++ drivers/net/wireless/ralink/rt2x00/rt2x00.h | 1 + drivers/net/wireless/ralink/rt2x00/rt2x00dev.c | 13 ++++++++----- 3 files changed, 18 insertions(+), 5 deletions(-) commit 8f2d163cb26da87e7d8e1677368b8ba1ba4d30b3 Author: Stanislaw Gruszka Date: Thu Jul 18 12:38:10 2019 +0200 mt76: mt76x0u: do not reset radio on resume On some machines mt76x0u firmware can hung during resume, what result on messages like below: [ 475.480062] mt76x0 1-8:1.0: Error: MCU response pre-completed! [ 475.990066] mt76x0 1-8:1.0: Error: send MCU cmd failed:-110 [ 475.990075] mt76x0 1-8:1.0: Error: MCU response pre-completed! [ 476.500003] mt76x0 1-8:1.0: Error: send MCU cmd failed:-110 [ 476.500012] mt76x0 1-8:1.0: Error: MCU response pre-completed! [ 477.010046] mt76x0 1-8:1.0: Error: send MCU cmd failed:-110 [ 477.010055] mt76x0 1-8:1.0: Error: MCU response pre-completed! [ 477.529997] mt76x0 1-8:1.0: Error: send MCU cmd failed:-110 [ 477.530006] mt76x0 1-8:1.0: Error: MCU response pre-completed! [ 477.824907] mt76x0 1-8:1.0: Error: send MCU cmd failed:-71 [ 477.824916] mt76x0 1-8:1.0: Error: MCU response pre-completed! [ 477.825029] usb 1-8: USB disconnect, device number 6 and possible whole system freeze. This can be avoided, if we do not perform mt76x0_chip_onoff() reset. Cc: stable@vger.kernel.org Fixes: 134b2d0d1fcf ("mt76x0: init files") Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/mediatek/mt76/mt76x0/usb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 962411b05a6d3342aa649e39cda1704c1fc042c6 Author: Wenwen Wang Date: Fri Aug 16 01:56:08 2019 -0500 dmaengine: ti: omap-dma: Add cleanup in omap_dma_probe() If devm_request_irq() fails to disable all interrupts, no cleanup is performed before retuning the error. To fix this issue, invoke omap_dma_free() to do the cleanup. Signed-off-by: Wenwen Wang Acked-by: Peter Ujfalusi Link: https://lore.kernel.org/r/1565938570-7528-1-git-send-email-wenwen@cs.uga.edu Signed-off-by: Vinod Koul drivers/dma/ti/omap-dma.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2c231c0c1dec42192aca0f87f2dc68b8f0cbc7d2 Author: Wenwen Wang Date: Fri Aug 16 01:48:55 2019 -0500 dmaengine: ti: dma-crossbar: Fix a memory leak bug In ti_dra7_xbar_probe(), 'rsv_events' is allocated through kcalloc(). Then of_property_read_u32_array() is invoked to search for the property. However, if this process fails, 'rsv_events' is not deallocated, leading to a memory leak bug. To fix this issue, free 'rsv_events' before returning the error. Signed-off-by: Wenwen Wang Acked-by: Peter Ujfalusi Link: https://lore.kernel.org/r/1565938136-7249-1-git-send-email-wenwen@cs.uga.edu Signed-off-by: Vinod Koul drivers/dma/ti/dma-crossbar.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit a180d023ec7ba0e43b2385876950d9ce7ab618f1 Author: Nishka Dasgupta Date: Mon Aug 19 13:21:26 2019 +0530 auxdisplay: ht16k33: Make ht16k33_fb_fix and ht16k33_fb_var constant The static structures ht16k33_fb_fix and ht16k33_fb_var, of types fb_fix_screeninfo and fb_var_screeninfo respectively, are not used except to be copied into other variables. Hence make both of them constant to prevent unintended modification. Issue found with Coccinelle. Acked-by: Robin van der Gracht Signed-off-by: Nishka Dasgupta Signed-off-by: Miguel Ojeda drivers/auxdisplay/ht16k33.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fcf887e7caaa813eea821d11bf2b7619a37df37a Author: Aaron Armstrong Skomra Date: Fri Aug 16 12:00:54 2019 -0700 HID: wacom: correct misreported EKR ring values The EKR ring claims a range of 0 to 71 but actually reports values 1 to 72. The ring is used in relative mode so this change should not affect users. Signed-off-by: Aaron Armstrong Skomra Fixes: 72b236d60218f ("HID: wacom: Add support for Express Key Remote.") Cc: # v4.3+ Reviewed-by: Ping Cheng Reviewed-by: Jason Gerecke Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2ca371d847511f97ef991ef612a2ce805489840e Author: Paweł Rekowski Date: Mon Aug 19 22:40:07 2019 +0200 ALSA: hda/ca0132 - Add new SBZ quirk This patch adds a new PCI subsys ID for the SBZ, as found and tested by me and some reddit users. Link: https://lore.kernel.org/lkml/20190819204008.14426-1-p.rekowski@gmail.com Signed-off-by: Paweł Rekowski Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_ca0132.c | 1 + 1 file changed, 1 insertion(+) commit 1a15718b41df026cffd0e42cfdc38a1384ce19f9 Author: Takashi Iwai Date: Tue Aug 20 08:58:12 2019 +0200 ALSA: usb-audio: Add implicit fb quirk for Behringer UFX1604 Behringer UFX1604 requires the similar quirk to apply implicit fb like another Behringer model UFX1204 in order to fix the noisy playback. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=204631 Cc: Signed-off-by: Takashi Iwai sound/usb/pcm.c | 1 + 1 file changed, 1 insertion(+) commit 936376f88ff1845b384b3a82b9cd167e53039229 Author: Christoph Hellwig Date: Tue Aug 20 10:08:38 2019 +0900 arm: select the dma-noncoherent symbols for all swiotlb builds We need to provide the arch hooks for non-coherent dma-direct and swiotlb for all swiotlb builds, not just when LPAS is enabled. Without that the Xen build that selects SWIOTLB indirectly through SWIOTLB_XEN fails to build. Fixes: ad3c7b18c5b3 ("arm: use swiotlb for bounce buffering on LPAE configs") Reported-by: Stefan Wahren Signed-off-by: Christoph Hellwig Tested-by: Stefan Wahren arch/arm/Kconfig | 4 ++++ arch/arm/mm/Kconfig | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) commit 77ffd3465ba837e9dc714e17b014e77b2eae765a Author: James Smart Date: Thu Aug 15 19:36:49 2019 -0700 scsi: lpfc: Mitigate high memory pre-allocation by SCSI-MQ When SCSI-MQ is enabled, the SCSI-MQ layers will do pre-allocation of MQ resources based on shost values set by the driver. In newer cases of the driver, which attempts to set nr_hw_queues to the cpu count, the multipliers become excessive, with a single shost having SCSI-MQ pre-allocation reaching into the multiple GBytes range. NPIV, which creates additional shosts, only multiply this overhead. On lower-memory systems, this can exhaust system memory very quickly, resulting in a system crash or failures in the driver or elsewhere due to low memory conditions. After testing several scenarios, the situation can be mitigated by limiting the value set in shost->nr_hw_queues to 4. Although the shost values were changed, the driver still had per-cpu hardware queues of its own that allowed parallelization per-cpu. Testing revealed that even with the smallish number for nr_hw_queues for SCSI-MQ, performance levels remained near maximum with the within-driver affiinitization. A module parameter was created to allow the value set for the nr_hw_queues to be tunable. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Ming Lei Reviewed-by: Ewan D. Milne Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc.h | 1 + drivers/scsi/lpfc/lpfc_attr.c | 15 +++++++++++++++ drivers/scsi/lpfc/lpfc_init.c | 10 ++++++---- drivers/scsi/lpfc/lpfc_sli4.h | 5 +++++ 4 files changed, 27 insertions(+), 4 deletions(-) commit 1edfb8ed6cc12107c2ec61b5be7bc881cfc4460e Author: Vlad Buslov Date: Mon Aug 19 10:33:04 2019 +0300 nfp: flower: verify that block cb is not busy before binding When processing FLOW_BLOCK_BIND command on indirect block, check that flow block cb is not busy. Fixes: 0d4fd02e7199 ("net: flow_offload: add flow_block_cb_is_busy() and use it") Reported-by: Jakub Kicinski Signed-off-by: Vlad Buslov Acked-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/offload.c | 7 +++++++ 1 file changed, 7 insertions(+) commit b68271609c4f16a79eae8069933f64345afcf888 Author: Ira Weiny Date: Mon Aug 19 18:15:28 2019 -0700 fs/xfs: Fix return code of xfs_break_leased_layouts() The parens used in the while loop would result in error being assigned the value 1 rather than the intended errno value. This is required to return -ETXTBSY from follow on break_layout() changes. Signed-off-by: Ira Weiny Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_pnfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cd9d4ff9b78fcd0fc4708900ba3e52e71e1a7690 Author: Christophe JAILLET Date: Mon Aug 19 07:04:25 2019 +0200 Kconfig: Fix the reference to the IDT77105 Phy driver in the description of ATM_NICSTAR_USE_IDT77105 This should be IDT77105, not IDT77015. Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller drivers/atm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2f102274e8129c9c0bb3a2bde0f641531aefea8b Author: Denis Efremov Date: Tue Aug 13 09:05:30 2019 +0300 MAINTAINERS: net_failover: Fix typo in a filepath Replace "driver" with "drivers" in the filepath to net_failover.c Cc: Sridhar Samudrala Cc: David S. Miller Cc: netdev@vger.kernel.org Fixes: cfc80d9a1163 ("net: Introduce net_failover driver") Signed-off-by: Denis Efremov Signed-off-by: David S. Miller MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3a7ef457e85173a5b9ec7a03016db5a57b717b33 Author: Stefano Brivio Date: Tue Aug 13 00:46:01 2019 +0200 ipv6: Fix return value of ipv6_mc_may_pull() for malformed packets Commit ba5ea614622d ("bridge: simplify ip_mc_check_igmp() and ipv6_mc_check_mld() calls") replaces direct calls to pskb_may_pull() in br_ipv6_multicast_mld2_report() with calls to ipv6_mc_may_pull(), that returns -EINVAL on buffers too short to be valid IPv6 packets, while maintaining the previous handling of the return code. This leads to the direct opposite of the intended effect: if the packet is malformed, -EINVAL evaluates as true, and we'll happily proceed with the processing. Return 0 if the packet is too short, in the same way as this was fixed for IPv4 by commit 083b78a9ed64 ("ip: fix ip_mc_may_pull() return value"). I don't have a reproducer for this, unlike the one referred to by the IPv4 commit, but this is clearly broken. Fixes: ba5ea614622d ("bridge: simplify ip_mc_check_igmp() and ipv6_mc_check_mld() calls") Signed-off-by: Stefano Brivio Acked-by: Guillaume Nault Signed-off-by: David S. Miller include/net/addrconf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5f97cbe22b7616ead7ae267c29cad73bc1444811 Merge: 287c55ed7df5 24876f09a7df Author: Linus Torvalds Date: Mon Aug 19 16:28:25 2019 -0700 Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk fixes from Stephen Boyd: "A couple fixes to the core framework logic that finds clk parents, a handful of samsung clk driver fixes for audio and display clks, and a small fix for the Stratix10 SoC driver that was checking the wrong register for validity" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: Fix potential NULL dereference in clk_fetch_parent_index() clk: Fix falling back to legacy parent string matching clk: socfpga: stratix10: fix rate caclulationg for cnt_clks clk: samsung: exynos542x: Move MSCL subsystem clocks to its sub-CMU clk: samsung: exynos5800: Move MAU subsystem clocks to MAU sub-CMU clk: samsung: Change signature of exynos5_subcmus_init() function commit 287c55ed7df531c30f7a5093120339193dc7f166 Merge: 06821504fd47 33da8e7c814f Author: Linus Torvalds Date: Mon Aug 19 16:17:59 2019 -0700 Merge branch 'siginfo-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace Pull kernel thread signal handling fix from Eric Biederman: "I overlooked the fact that kernel threads are created with all signals set to SIG_IGN, and accidentally caused a regression in cifs and drbd when replacing force_sig with send_sig. This is my fix for that regression. I add a new function allow_kernel_signal which allows kernel threads to receive signals sent from the kernel, but continues to ignore all signals sent from userspace. This ensures the user space interface for cifs and drbd remain the same. These kernel threads depend on blocking networking calls which block until something is received or a signal is pending. Making receiving of signals somewhat necessary for these kernel threads. Perhaps someday we can cleanup those interfaces and remove allow_kernel_signal. If not allow_kernel_signal is pretty trivial and clearly documents what is going on so I don't think we will mind carrying it" * 'siginfo-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: signal: Allow cifs and drbd to receive their terminating signals commit e15dbcdeb9f66c9e6068f94aed60cee9844b621a Merge: ef8d8ccdc216 38a429c898dd Author: David S. Miller Date: Mon Aug 19 13:16:07 2019 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net The following patchset contains Netfilter fixes for net: 1) Remove IP MASQUERADING record in MAINTAINERS file, from Denis Efremov. 2) Counter arguments are swapped in ebtables, from Todd Seidelmann. 3) Missing netlink attribute validation in flow_offload extension. 4) Incorrect alignment in xt_nfacct that breaks 32-bits userspace / 64-bits kernels, from Juliana Rodrigueiro. 5) Missing include guard in nf_conntrack_h323_types.h, from Masahiro Yamada. ==================== Signed-off-by: David S. Miller commit ef8d8ccdc216f797e66cb4a1372f5c4c285ce1e4 Author: Eric Dumazet Date: Fri Aug 16 21:26:22 2019 -0700 tcp: make sure EPOLLOUT wont be missed As Jason Baron explained in commit 790ba4566c1a ("tcp: set SOCK_NOSPACE under memory pressure"), it is crucial we properly set SOCK_NOSPACE when needed. However, Jason patch had a bug, because the 'nonblocking' status as far as sk_stream_wait_memory() is concerned is governed by MSG_DONTWAIT flag passed at sendmsg() time : long timeo = sock_sndtimeo(sk, flags & MSG_DONTWAIT); So it is very possible that tcp sendmsg() calls sk_stream_wait_memory(), and that sk_stream_wait_memory() returns -EAGAIN with SOCK_NOSPACE cleared, if sk->sk_sndtimeo has been set to a small (but not zero) value. This patch removes the 'noblock' variable since we must always set SOCK_NOSPACE if -EAGAIN is returned. It also renames the do_nonblock label since we might reach this code path even if we were in blocking mode. Fixes: 790ba4566c1a ("tcp: set SOCK_NOSPACE under memory pressure") Signed-off-by: Eric Dumazet Cc: Jason Baron Reported-by: Vladimir Rutsky Acked-by: Soheil Hassas Yeganeh Acked-by: Neal Cardwell Acked-by: Jason Baron Signed-off-by: David S. Miller net/core/stream.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit d0ff14fdc987303aeeb7de6f1bd72c3749ae2a9b Author: Michael Kelley Date: Thu Aug 1 23:53:53 2019 +0000 genirq: Properly pair kobject_del() with kobject_add() If alloc_descs() fails before irq_sysfs_init() has run, free_desc() in the cleanup path will call kobject_del() even though the kobject has not been added with kobject_add(). Fix this by making the call to kobject_del() conditional on whether irq_sysfs_init() has run. This problem surfaced because commit aa30f47cf666 ("kobject: Add support for default attribute groups to kobj_type") makes kobject_del() stricter about pairing with kobject_add(). If the pairing is incorrrect, a WARNING and backtrace occur in sysfs_remove_group() because there is no parent. [ tglx: Add a comment to the code and make it work with CONFIG_SYSFS=n ] Fixes: ecb3f394c5db ("genirq: Expose interrupt information through sysfs") Signed-off-by: Michael Kelley Signed-off-by: Thomas Gleixner Acked-by: Greg Kroah-Hartman Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/1564703564-4116-1-git-send-email-mikelley@microsoft.com kernel/irq/irqdesc.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit c49a0a80137c7ca7d6ced4c812c9e07a949f6f24 Author: Tom Lendacky Date: Mon Aug 19 15:52:35 2019 +0000 x86/CPU/AMD: Clear RDRAND CPUID bit on AMD family 15h/16h There have been reports of RDRAND issues after resuming from suspend on some AMD family 15h and family 16h systems. This issue stems from a BIOS not performing the proper steps during resume to ensure RDRAND continues to function properly. RDRAND support is indicated by CPUID Fn00000001_ECX[30]. This bit can be reset by clearing MSR C001_1004[62]. Any software that checks for RDRAND support using CPUID, including the kernel, will believe that RDRAND is not supported. Update the CPU initialization to clear the RDRAND CPUID bit for any family 15h and 16h processor that supports RDRAND. If it is known that the family 15h or family 16h system does not have an RDRAND resume issue or that the system will not be placed in suspend, the "rdrand=force" kernel parameter can be used to stop the clearing of the RDRAND CPUID bit. Additionally, update the suspend and resume path to save and restore the MSR C001_1004 value to ensure that the RDRAND CPUID setting remains in place after resuming from suspend. Note, that clearing the RDRAND CPUID bit does not prevent a processor that normally supports the RDRAND instruction from executing it. So any code that determined the support based on family and model won't #UD. Signed-off-by: Tom Lendacky Signed-off-by: Borislav Petkov Cc: Andrew Cooper Cc: Andrew Morton Cc: Chen Yu Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jonathan Corbet Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Kees Cook Cc: "linux-doc@vger.kernel.org" Cc: "linux-pm@vger.kernel.org" Cc: Nathan Chancellor Cc: Paolo Bonzini Cc: Pavel Machek Cc: "Rafael J. Wysocki" Cc: Cc: Thomas Gleixner Cc: "x86@kernel.org" Link: https://lkml.kernel.org/r/7543af91666f491547bd86cebb1e17c66824ab9f.1566229943.git.thomas.lendacky@amd.com Documentation/admin-guide/kernel-parameters.txt | 7 ++ arch/x86/include/asm/msr-index.h | 1 + arch/x86/kernel/cpu/amd.c | 66 +++++++++++++++++++ arch/x86/power/cpu.c | 86 +++++++++++++++++++++---- 4 files changed, 147 insertions(+), 13 deletions(-) commit f9ef724d4896763479f3921afd1ee61552fc9836 Author: Jeronimo Borque Date: Sun Aug 18 22:35:38 2019 -0300 ALSA: hda - Fixes inverted Conexant GPIO mic mute led "enabled" parameter historically referred to the device input or output, not to the led indicator. After the changes added with the led helper functions the mic mute led logic refers to the led and not to the mic input which caused led indicator to be negated. Fixing logic in cxt_update_gpio_led and updated cxt_fixup_gpio_mute_hook Also updated debug messages to ease further debugging if necessary. Fixes: 184e302b46c9 ("ALSA: hda/conexant - Use the mic-mute LED helper") Suggested-by: Takashi Iwai Signed-off-by: Jeronimo Borque Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_conexant.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 06821504fd47a5e5b641aeeb638a0ae10a216ef8 Merge: 555df336c754 cfef46d692ef Author: Linus Torvalds Date: Mon Aug 19 10:00:01 2019 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from David Miller: 1) Fix jmp to 1st instruction in x64 JIT, from Alexei Starovoitov. 2) Severl kTLS fixes in mlx5 driver, from Tariq Toukan. 3) Fix severe performance regression due to lack of SKB coalescing of fragments during local delivery, from Guillaume Nault. 4) Error path memory leak in sch_taprio, from Ivan Khoronzhuk. 5) Fix batched events in skbedit packet action, from Roman Mashak. 6) Propagate VLAN TX offload to hw_enc_features in bond and team drivers, from Yue Haibing. 7) RXRPC local endpoint refcounting fix and read after free in rxrpc_queue_local(), from David Howells. 8) Fix endian bug in ibmveth multicast list handling, from Thomas Falcon. 9) Oops, make nlmsg_parse() wrap around the correct function, __nlmsg_parse not __nla_parse(). Fix from David Ahern. 10) Memleak in sctp_scend_reset_streams(), fro Zheng Bin. 11) Fix memory leak in cxgb4, from Wenwen Wang. 12) Yet another race in AF_PACKET, from Eric Dumazet. 13) Fix false detection of retransmit failures in tipc, from Tuong Lien. 14) Use after free in ravb_tstamp_skb, from Tho Vu. * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (101 commits) ravb: Fix use-after-free ravb_tstamp_skb netfilter: nf_tables: map basechain priority to hardware priority net: sched: use major priority number as hardware priority wimax/i2400m: fix a memory leak bug net: cavium: fix driver name ibmvnic: Unmap DMA address of TX descriptor buffers after use bnxt_en: Fix to include flow direction in L2 key bnxt_en: Use correct src_fid to determine direction of the flow bnxt_en: Suppress HWRM errors for HWRM_NVM_GET_VARIABLE command bnxt_en: Fix handling FRAG_ERR when NVM_INSTALL_UPDATE cmd fails bnxt_en: Improve RX doorbell sequence. bnxt_en: Fix VNIC clearing logic for 57500 chips. net: kalmia: fix memory leaks cx82310_eth: fix a memory leak bug bnx2x: Fix VF's VLAN reconfiguration in reload. Bluetooth: Add debug setting for changing minimum encryption key size tipc: fix false detection of retransmit failures lan78xx: Fix memory leaks MAINTAINERS: r8169: Update path to the driver MAINTAINERS: PHY LIBRARY: Update files in the record ... commit 555df336c754ac9de1af9a5c72508918b3796b18 Author: David Howells Date: Mon Aug 19 16:02:01 2019 +0100 keys: Fix description size The maximum key description size is 4095. Commit f771fde82051 ("keys: Simplify key description management") inadvertantly reduced that to 255 and made sizes between 256 and 4095 work weirdly, and any size whereby size & 255 == 0 would cause an assertion in __key_link_begin() at the following line: BUG_ON(index_key->desc_len == 0); This can be fixed by simply increasing the size of desc_len in struct keyring_index_key to a u16. Note the argument length test in keyutils only checked empty descriptions and descriptions with a size around the limit (ie. 4095) and not for all the values in between, so it missed this. This has been addressed and https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/keyutils.git/commit/?id=066bf56807c26cd3045a25f355b34c1d8a20a5aa now exhaustively tests all possible lengths of type, description and payload and then some. The assertion failure looks something like: kernel BUG at security/keys/keyring.c:1245! ... RIP: 0010:__key_link_begin+0x88/0xa0 ... Call Trace: key_create_or_update+0x211/0x4b0 __x64_sys_add_key+0x101/0x200 do_syscall_64+0x5b/0x1e0 entry_SYSCALL_64_after_hwframe+0x44/0xa9 It can be triggered by: keyctl add user "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" a @s Fixes: f771fde82051 ("keys: Simplify key description management") Reported-by: kernel test robot Signed-off-by: David Howells Signed-off-by: Linus Torvalds include/linux/key.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 0a46fff2f9108c2c44218380a43a736cf4612541 Author: Kirill A. Shutemov Date: Tue Aug 13 16:16:54 2019 +0300 x86/boot/compressed/64: Fix boot on machines with broken E820 table BIOS on Samsung 500C Chromebook reports very rudimentary E820 table that consists of 2 entries: BIOS-e820: [mem 0x0000000000000000-0x0000000000000fff] usable BIOS-e820: [mem 0x00000000fffff000-0x00000000ffffffff] reserved It breaks logic in find_trampoline_placement(): bios_start lands on the end of the first 4k page and trampoline start gets placed below 0. Detect underflow and don't touch bios_start for such cases. It makes kernel ignore E820 table on machines that doesn't have two usable pages below BIOS_START_MAX. Fixes: 1b3a62643660 ("x86/boot/compressed/64: Validate trampoline placement against E820") Signed-off-by: Kirill A. Shutemov Signed-off-by: Borislav Petkov Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Thomas Gleixner Cc: x86-ml Link: https://bugzilla.kernel.org/show_bug.cgi?id=203463 Link: https://lkml.kernel.org/r/20190813131654.24378-1-kirill.shutemov@linux.intel.com arch/x86/boot/compressed/pgtable_64.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 06c9fdf3b9f1acc6e53753c99c54c39764cc979f Author: Trond Myklebust Date: Wed Aug 14 15:42:43 2019 -0400 NFS: On fatal writeback errors, we need to call nfs_inode_remove_request() If the writeback error is fatal, we need to remove the tracking structures (i.e. the nfs_page) from the inode. Fixes: 6fbda89b257f ("NFS: Replace custom error reporting mechanism...") Signed-off-by: Trond Myklebust fs/nfs/write.c | 3 +++ 1 file changed, 3 insertions(+) commit 17d8c5d145000070c581f2a8aa01edc7998582ab Author: Trond Myklebust Date: Wed Aug 14 14:19:09 2019 -0400 NFS: Fix initialisation of I/O result struct in nfs_pgio_rpcsetup Initialise the result count to 0 rather than initialising it to the argument count. The reason is that we want to ensure we record the I/O stats correctly in the case where an error is returned (for instance in the layoutstats). Signed-off-by: Trond Myklebust fs/nfs/pagelist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eb2c50da9e256dbbb3ff27694440e4c1900cfef8 Author: Trond Myklebust Date: Mon Aug 12 18:04:36 2019 -0400 NFS: Ensure O_DIRECT reports an error if the bytes read/written is 0 If the attempt to resend the I/O results in no bytes being read/written, we must ensure that we report the error. Signed-off-by: Trond Myklebust Fixes: 0a00b77b331a ("nfs: mirroring support for direct io") Cc: stable@vger.kernel.org # v3.20+ fs/nfs/direct.c | 27 ++++++++++++++++++--------- fs/nfs/pagelist.c | 1 + 2 files changed, 19 insertions(+), 9 deletions(-) commit f4340e9314dbfadc48758945f85fc3b16612d06f Author: Trond Myklebust Date: Mon Aug 12 15:19:54 2019 -0400 NFSv4/pnfs: Fix a page lock leak in nfs_pageio_resend() If the attempt to resend the pages fails, we need to ensure that we clean up those pages that were not transmitted. Fixes: d600ad1f2bdb ("NFS41: pop some layoutget errors to application") Signed-off-by: Trond Myklebust Cc: stable@vger.kernel.org # v4.5+ fs/nfs/pagelist.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 9821421a291b548ef4369c6998745baa36ddecd5 Author: Trond Myklebust Date: Fri Aug 9 12:15:07 2019 -0400 NFSv4: Fix return value in nfs_finish_open() If the file turns out to be of the wrong type after opening, we want to revalidate the path and retry, so return EOPENSTALE rather than ESTALE. Signed-off-by: Trond Myklebust fs/nfs/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 90cf500e338ab3f3c0f126ba37e36fb6a9058441 Author: Trond Myklebust Date: Fri Aug 9 15:03:11 2019 -0400 NFSv4: Fix return values for nfs4_file_open() Currently, we are translating RPC level errors such as timeouts, as well as interrupts etc into EOPENSTALE, which forces a single replay of the open attempt. What we actually want to do is force the replay only in the cases where the returned error indicates that the file may have changed on the server. So the fix is to spell out the exact set of errors where we want to return EOPENSTALE. Signed-off-by: Trond Myklebust fs/nfs/nfs4file.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 7e10cc25bfa0dd3602bbcf5cc9c759a90eb675dc Author: Trond Myklebust Date: Fri Aug 9 12:06:43 2019 -0400 NFS: Don't refresh attributes with mounted-on-file information If we've been given the attributes of the mounted-on-file, then do not use those to check or update the attributes on the application-visible inode. Signed-off-by: Trond Myklebust fs/nfs/inode.c | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) commit 2d05dba2b25ecb0f8fc3a0b4eb2232da6454a47b Author: Benjamin Tissoires Date: Mon Aug 12 18:04:44 2019 +0200 HID: cp2112: prevent sleeping function called from invalid context When calling request_threaded_irq() with a CP2112, the function cp2112_gpio_irq_startup() is called in a IRQ context. Therefore we can not sleep, and we can not call cp2112_gpio_direction_input() there. Move the call to cp2112_gpio_direction_input() earlier to have a working driver. Signed-off-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-cp2112.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit b640be5bc8e4673dc8049cf74176ddedecea5597 Author: Even Xu Date: Fri Aug 9 21:18:29 2019 +0800 HID: intel-ish-hid: ipc: add EHL device id EHL is a new platform using ishtp solution, add its device id to support list. Signed-off-by: Even Xu Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina drivers/hid/intel-ish-hid/ipc/hw-ish.h | 1 + drivers/hid/intel-ish-hid/ipc/pci-ish.c | 1 + 2 files changed, 2 insertions(+) commit b72fb1dcd2ea9d29417711cb302cef3006fa8d5a Author: Jason Gerecke Date: Wed Aug 7 14:11:55 2019 -0700 HID: wacom: Correct distance scale for 2nd-gen Intuos devices Distance values reported by 2nd-gen Intuos tablets are on an inverted scale (0 == far, 63 == near). We need to change them over to a normal scale before reporting to userspace or else userspace drivers and applications can get confused. Ref: https://github.com/linuxwacom/input-wacom/issues/98 Fixes: eda01dab53 ("HID: wacom: Add four new Intuos devices") Signed-off-by: Jason Gerecke Cc: # v4.4+ Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 2 ++ 1 file changed, 2 insertions(+) commit 38a429c898ddd210cc35463b096389f97c3c5a73 Author: Masahiro Yamada Date: Mon Aug 19 16:39:27 2019 +0900 netfilter: add include guard to nf_conntrack_h323_types.h Add a header include guard just in case. Signed-off-by: Masahiro Yamada Signed-off-by: Pablo Neira Ayuso include/linux/netfilter/nf_conntrack_h323_types.h | 5 +++++ 1 file changed, 5 insertions(+) commit 33da8e7c814f77310250bb54a9db36a44c5de784 Author: Eric W. Biederman Date: Fri Aug 16 12:33:54 2019 -0500 signal: Allow cifs and drbd to receive their terminating signals My recent to change to only use force_sig for a synchronous events wound up breaking signal reception cifs and drbd. I had overlooked the fact that by default kthreads start out with all signals set to SIG_IGN. So a change I thought was safe turned out to have made it impossible for those kernel thread to catch their signals. Reverting the work on force_sig is a bad idea because what the code was doing was very much a misuse of force_sig. As the way force_sig ultimately allowed the signal to happen was to change the signal handler to SIG_DFL. Which after the first signal will allow userspace to send signals to these kernel threads. At least for wake_ack_receiver in drbd that does not appear actively wrong. So correct this problem by adding allow_kernel_signal that will allow signals whose siginfo reports they were sent by the kernel through, but will not allow userspace generated signals, and update cifs and drbd to call allow_kernel_signal in an appropriate place so that their thread can receive this signal. Fixing things this way ensures that userspace won't be able to send signals and cause problems, that it is clear which signals the threads are expecting to receive, and it guarantees that nothing else in the system will be affected. This change was partly inspired by similar cifs and drbd patches that added allow_signal. Reported-by: ronnie sahlberg Reported-by: Christoph Böhmwalder Tested-by: Christoph Böhmwalder Cc: Steve French Cc: Philipp Reisner Cc: David Laight Fixes: 247bc9470b1e ("cifs: fix rmmod regression in cifs.ko caused by force_sig changes") Fixes: 72abe3bcf091 ("signal/cifs: Fix cifs_put_tcp_session to call send_sig instead of force_sig") Fixes: fee109901f39 ("signal/drbd: Use send_sig not force_sig") Fixes: 3cf5d076fb4d ("signal: Remove task parameter from force_sig") Signed-off-by: "Eric W. Biederman" drivers/block/drbd/drbd_main.c | 2 ++ fs/cifs/connect.c | 2 +- include/linux/signal.h | 15 ++++++++++++++- kernel/signal.c | 5 +++++ 4 files changed, 22 insertions(+), 2 deletions(-) commit f897e60a12f0b9146357780d317879bce2a877dc Author: Thomas Gleixner Date: Fri Aug 9 14:54:07 2019 +0200 x86/apic: Handle missing global clockevent gracefully Some newer machines do not advertise legacy timers. The kernel can handle that situation if the TSC and the CPU frequency are enumerated by CPUID or MSRs and the CPU supports TSC deadline timer. If the CPU does not support TSC deadline timer the local APIC timer frequency has to be known as well. Some Ryzens machines do not advertize legacy timers, but there is no reliable way to determine the bus frequency which feeds the local APIC timer when the machine allows overclocking of that frequency. As there is no legacy timer the local APIC timer calibration crashes due to a NULL pointer dereference when accessing the not installed global clock event device. Switch the calibration loop to a non interrupt based one, which polls either TSC (if frequency is known) or jiffies. The latter requires a global clockevent. As the machines which do not have a global clockevent installed have a known TSC frequency this is a non issue. For older machines where TSC frequency is not known, there is no known case where the legacy timers do not exist as that would have been reported long ago. Reported-by: Daniel Drake Reported-by: Jiri Slaby Signed-off-by: Thomas Gleixner Tested-by: Daniel Drake Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/alpine.DEB.2.21.1908091443030.21433@nanos.tec.linutronix.de Link: http://bugzilla.opensuse.org/show_bug.cgi?id=1142926#c12 arch/x86/kernel/apic/apic.c | 68 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 53 insertions(+), 15 deletions(-) commit f1c6ece23729257fb46562ff9224cf5f61b818da Author: Andrea Righi Date: Mon Aug 12 20:43:02 2019 +0200 kprobes: Fix potential deadlock in kprobe_optimizer() lockdep reports the following deadlock scenario: WARNING: possible circular locking dependency detected kworker/1:1/48 is trying to acquire lock: 000000008d7a62b2 (text_mutex){+.+.}, at: kprobe_optimizer+0x163/0x290 but task is already holding lock: 00000000850b5e2d (module_mutex){+.+.}, at: kprobe_optimizer+0x31/0x290 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (module_mutex){+.+.}: __mutex_lock+0xac/0x9f0 mutex_lock_nested+0x1b/0x20 set_all_modules_text_rw+0x22/0x90 ftrace_arch_code_modify_prepare+0x1c/0x20 ftrace_run_update_code+0xe/0x30 ftrace_startup_enable+0x2e/0x50 ftrace_startup+0xa7/0x100 register_ftrace_function+0x27/0x70 arm_kprobe+0xb3/0x130 enable_kprobe+0x83/0xa0 enable_trace_kprobe.part.0+0x2e/0x80 kprobe_register+0x6f/0xc0 perf_trace_event_init+0x16b/0x270 perf_kprobe_init+0xa7/0xe0 perf_kprobe_event_init+0x3e/0x70 perf_try_init_event+0x4a/0x140 perf_event_alloc+0x93a/0xde0 __do_sys_perf_event_open+0x19f/0xf30 __x64_sys_perf_event_open+0x20/0x30 do_syscall_64+0x65/0x1d0 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #0 (text_mutex){+.+.}: __lock_acquire+0xfcb/0x1b60 lock_acquire+0xca/0x1d0 __mutex_lock+0xac/0x9f0 mutex_lock_nested+0x1b/0x20 kprobe_optimizer+0x163/0x290 process_one_work+0x22b/0x560 worker_thread+0x50/0x3c0 kthread+0x112/0x150 ret_from_fork+0x3a/0x50 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(module_mutex); lock(text_mutex); lock(module_mutex); lock(text_mutex); *** DEADLOCK *** As a reproducer I've been using bcc's funccount.py (https://github.com/iovisor/bcc/blob/master/tools/funccount.py), for example: # ./funccount.py '*interrupt*' That immediately triggers the lockdep splat. Fix by acquiring text_mutex before module_mutex in kprobe_optimizer(). Signed-off-by: Andrea Righi Acked-by: Masami Hiramatsu Cc: Anil S Keshavamurthy Cc: David S. Miller Cc: Linus Torvalds Cc: Naveen N. Rao Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: d5b844a2cf50 ("ftrace/x86: Remove possible deadlock between register_kprobe() and ftrace_run_update_code()") Link: http://lkml.kernel.org/r/20190812184302.GA7010@xps-13 Signed-off-by: Ingo Molnar kernel/kprobes.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 77d760328ee015cf89460c52bfd5a6b0a09b7472 Author: Su Yanjun Date: Fri Aug 16 16:43:21 2019 +0800 perf/x86: Fix typo in comment No functional change. Signed-off-by: Su Yanjun Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1565945001-4413-1-git-send-email-suyj.fnst@cn.fujitsu.com Signed-off-by: Ingo Molnar arch/x86/events/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b0fdc01354f45d43f082025636ef808968a27b36 Author: Sebastian Andrzej Siewior Date: Fri Aug 16 18:06:26 2019 +0200 sched/core: Schedule new worker even if PI-blocked If a task is PI-blocked (blocking on sleeping spinlock) then we don't want to schedule a new kworker if we schedule out due to lock contention because !RT does not do that as well. A spinning spinlock disables preemption and a worker does not schedule out on lock contention (but spin). On RT the RW-semaphore implementation uses an rtmutex so tsk_is_pi_blocked() will return true if a task blocks on it. In this case we will now start a new worker which may deadlock if one worker is waiting on progress from another worker. Since a RW-semaphore starts a new worker on !RT, we should do the same on RT. XFS is able to trigger this deadlock. Allow to schedule new worker if the current worker is PI-blocked. Signed-off-by: Sebastian Andrzej Siewior Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20190816160626.12742-1-bigeasy@linutronix.de Signed-off-by: Ingo Molnar kernel/sched/core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 89a26cd4b501e9511d3cd3d22327fc76a75a38b3 Author: Juliana Rodrigueiro Date: Fri Aug 16 17:02:22 2019 +0200 netfilter: xt_nfacct: Fix alignment mismatch in xt_nfacct_match_info When running a 64-bit kernel with a 32-bit iptables binary, the size of the xt_nfacct_match_info struct diverges. kernel: sizeof(struct xt_nfacct_match_info) : 40 iptables: sizeof(struct xt_nfacct_match_info)) : 36 Trying to append nfacct related rules results in an unhelpful message. Although it is suggested to look for more information in dmesg, nothing can be found there. # iptables -A -m nfacct --nfacct-name iptables: Invalid argument. Run `dmesg' for more information. This patch fixes the memory misalignment by enforcing 8-byte alignment within the struct's first revision. This solution is often used in many other uapi netfilter headers. Signed-off-by: Juliana Rodrigueiro Acked-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/uapi/linux/netfilter/xt_nfacct.h | 5 +++++ net/netfilter/xt_nfacct.c | 36 ++++++++++++++++++++++---------- 2 files changed, 30 insertions(+), 11 deletions(-) commit 14c415862c0630e01712a4eeaf6159a2b1b6d2a4 Author: Pablo Neira Ayuso Date: Fri Aug 16 11:23:58 2019 +0200 netfilter: nft_flow_offload: missing netlink attribute policy The netlink attribute policy for NFTA_FLOW_TABLE_NAME is missing. Fixes: a3c90f7a2323 ("netfilter: nf_tables: flow offload expression") Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_flow_offload.c | 6 ++++++ 1 file changed, 6 insertions(+) commit f20faa06d83de440bec8e200870784c3458793c4 Author: Todd Seidelmann Date: Wed Aug 14 10:54:16 2019 -0400 netfilter: ebtables: Fix argument order to ADD_COUNTER The ordering of arguments to the x_tables ADD_COUNTER macro appears to be wrong in ebtables (cf. ip_tables.c, ip6_tables.c, and arp_tables.c). This causes data corruption in the ebtables userspace tools because they get incorrect packet & byte counts from the kernel. Fixes: d72133e628803 ("netfilter: ebtables: use ADD_COUNTER macro") Signed-off-by: Todd Seidelmann Signed-off-by: Pablo Neira Ayuso net/bridge/netfilter/ebtables.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 0d7342c3637462fc6291b392ced9af0f4ca4dab4 Author: Denis Efremov Date: Wed Aug 14 15:35:02 2019 +0300 MAINTAINERS: Remove IP MASQUERADING record This entry is in MAINTAINERS for historical purpose. It doesn't match current sources since the commit adf82accc5f5 ("netfilter: x_tables: merge ip and ipv6 masquerade modules") moved the module. The net/netfilter/xt_MASQUERADE.c module is already under the netfilter section. Thus, there is no purpose to keep this separate entry in MAINTAINERS. Cc: Florian Westphal Cc: Juanjo Ciarlante Cc: netfilter-devel@vger.kernel.org Suggested-by: Pablo Neira Ayuso Signed-off-by: Denis Efremov Signed-off-by: Pablo Neira Ayuso MAINTAINERS | 5 ----- 1 file changed, 5 deletions(-) commit 5d888b481e6abc726b36c86f0bf13af1583bb336 Author: Darrick J. Wong Date: Wed Aug 14 17:38:09 2019 -0700 xfs: fix reflink source file racing with directio writes While trawling through the dedupe file comparison code trying to fix page deadlocking problems, Dave Chinner noticed that the reflink code only takes shared IOLOCK/MMAPLOCKs on the source file. Because page_mkwrite and directio writes do not take the EXCL versions of those locks, this means that reflink can race with writer processes. For pure remapping this can lead to undefined behavior and file corruption; for dedupe this means that we cannot be sure that the contents are identical when we decide to go ahead with the remapping. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/xfs_reflink.c | 63 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 37 insertions(+), 26 deletions(-) commit dec43da46f63eb71f519d963ba6832838e4262a3 Author: Phil Reid Date: Thu Jul 25 10:48:45 2019 +0800 fpga: altera-ps-spi: Fix getting of optional confd gpio Currently the driver does not handle EPROBE_DEFER for the confd gpio. Use devm_gpiod_get_optional() instead of devm_gpiod_get() and return error codes from altera_ps_probe(). Fixes: 5692fae0742d ("fpga manager: Add altera-ps-spi driver for Altera FPGAs") Signed-off-by: Phil Reid Signed-off-by: Moritz Fischer drivers/fpga/altera-ps-spi.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 165d42c012be69900f0e2f8545626cb9e7d4a832 Author: Nishka Dasgupta Date: Sat Jul 6 19:00:21 2019 +0530 drm/mediatek: mtk_drm_drv.c: Add of_node_put() before goto Each iteration of for_each_child_of_node puts the previous node, but in the case of a goto from the middle of the loop, there is no put, thus causing a memory leak. Hence add an of_node_put before the goto in two places. Issue found with Coccinelle. Fixes: 119f5173628a (drm/mediatek: Add DRM Driver for Mediatek SoC MT8173) Signed-off-by: Nishka Dasgupta Signed-off-by: CK Hu drivers/gpu/drm/mediatek/mtk_drm_drv.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit d1abaeb3be7b5fa6d7a1fbbd2e14e3310005c4c1 Author: Linus Torvalds Date: Sun Aug 18 14:31:08 2019 -0700 Linux 5.3-rc5 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cfef46d692efd852a0da6803f920cc756eea2855 Author: Tho Vu Date: Fri Aug 16 17:17:02 2019 +0200 ravb: Fix use-after-free ravb_tstamp_skb When a Tx timestamp is requested, a pointer to the skb is stored in the ravb_tstamp_skb struct. This was done without an skb_get. There exists the possibility that the skb could be freed by ravb_tx_free (when ravb_tx_free is called from ravb_start_xmit) before the timestamp was processed, leading to a use-after-free bug. Use skb_get when filling a ravb_tstamp_skb struct, and add appropriate frees/consumes when a ravb_tstamp_skb struct is freed. Fixes: c156633f1353 ("Renesas Ethernet AVB driver proper") Signed-off-by: Tho Vu Signed-off-by: Kazuya Mizuguchi Signed-off-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/renesas/ravb_main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 5cbe9102ae2398c0f410fd4f832d9f038e751a29 Merge: 44ef3a032528 3bc158f8d033 Author: David S. Miller Date: Sun Aug 18 14:13:23 2019 -0700 Merge branch 'flow_offload-hardware-priority-fixes' Pablo Neira Ayuso says: ==================== flow_offload hardware priority fixes This patchset contains two updates for the flow_offload users: 1) Pass the major tc priority to drivers so they do not have to lshift it. This is a preparation patch for the fix coming in patch #2. 2) Set the hardware priority from the netfilter basechain priority, some drivers break when using the existing hardware priority number that is set to zero. v5: fix patch 2/2 to address a clang warning and to simplify the priority mapping. ==================== Signed-off-by: David S. Miller commit 3bc158f8d0330f0ac58597c023acca2234c14616 Author: Pablo Neira Ayuso Date: Fri Aug 16 03:24:10 2019 +0200 netfilter: nf_tables: map basechain priority to hardware priority This patch adds initial support for offloading basechains using the priority range from 1 to 65535. This is restricting the netfilter priority range to 16-bit integer since this is what most drivers assume so far from tc. It should be possible to extend this range of supported priorities later on once drivers are updated to support for 32-bit integer priorities. Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller include/net/netfilter/nf_tables_offload.h | 2 ++ net/netfilter/nf_tables_api.c | 4 ++++ net/netfilter/nf_tables_offload.c | 17 ++++++++++++++--- 3 files changed, 20 insertions(+), 3 deletions(-) commit ef01adae0e43cfb2468d0ea07137cc63cf31495c Author: Pablo Neira Ayuso Date: Fri Aug 16 03:24:09 2019 +0200 net: sched: use major priority number as hardware priority tc transparently maps the software priority number to hardware. Update it to pass the major priority which is what most drivers expect. Update drivers too so they do not need to lshift the priority field of the flow_cls_common_offload object. The stmmac driver is an exception, since this code assumes the tc software priority is fine, therefore, lshift it just to be conservative. Signed-off-by: Pablo Neira Ayuso Acked-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 2 +- drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c | 2 +- drivers/net/ethernet/mscc/ocelot_flower.c | 12 +++--------- drivers/net/ethernet/netronome/nfp/flower/qos_conf.c | 2 +- drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c | 2 +- include/net/pkt_cls.h | 2 +- 6 files changed, 8 insertions(+), 14 deletions(-) commit 44ef3a03252844a8753479b0cea7f29e4a804bdc Author: Wenwen Wang Date: Thu Aug 15 15:29:51 2019 -0500 wimax/i2400m: fix a memory leak bug In i2400m_barker_db_init(), 'options_orig' is allocated through kstrdup() to hold the original command line options. Then, the options are parsed. However, if an error occurs during the parsing process, 'options_orig' is not deallocated, leading to a memory leak bug. To fix this issue, free 'options_orig' before returning the error. Signed-off-by: Wenwen Wang Signed-off-by: David S. Miller drivers/net/wimax/i2400m/fw.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 3434341004a380f4e47c3a03d4320d43982162a0 Author: Stephen Hemminger Date: Thu Aug 15 12:49:49 2019 -0700 net: cavium: fix driver name The driver name gets exposed in sysfs under /sys/bus/pci/drivers so it should look like other devices. Change it to be common format (instead of "Cavium PTP"). This is a trivial fix that was observed by accident because Debian kernels were building this driver into kernel (bug). Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/ethernet/cavium/common/cavium_ptp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 80f0fe0934cd3daa13a5e4d48a103f469115b160 Author: Thomas Falcon Date: Wed Aug 14 14:57:05 2019 -0500 ibmvnic: Unmap DMA address of TX descriptor buffers after use There's no need to wait until a completion is received to unmap TX descriptor buffers that have been passed to the hypervisor. Instead unmap it when the hypervisor call has completed. This patch avoids the possibility that a buffer will not be unmapped because a TX completion is lost or mishandled. Reported-by: Abdul Haleem Tested-by: Devesh K. Singh Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit 37b0a733c12137bc1d3325c44797333177607632 Merge: f1472cb09f11 9bf46566e80f Author: David S. Miller Date: Sun Aug 18 13:05:01 2019 -0700 Merge branch 'bnxt_en-Bug-fixes' Michael Chan says: ==================== bnxt_en: Bug fixes. 2 Bug fixes related to 57500 shutdown sequence and doorbell sequence, 2 TC Flower bug fixes related to the setting of the flow direction, 1 NVRAM update bug fix, and a minor fix to suppress an unnecessary error message. Please queue for -stable as well. Thanks. ==================== Signed-off-by: David S. Miller commit 9bf46566e80fd94845527d01ebd888eb49313551 Author: Somnath Kotur Date: Sat Aug 17 17:04:52 2019 -0400 bnxt_en: Fix to include flow direction in L2 key FW expects the driver to provide unique flow reference handles for Tx or Rx flows. When a Tx flow and an Rx flow end up sharing a reference handle, flow offload does not seem to work. This could happen in the case of 2 flows having their L2 fields wildcarded but in different direction. Fix to incorporate the flow direction as part of the L2 key v2: Move the dir field to the end of the bnxt_tc_l2_key struct to fix the warning reported by kbuild test robot . There is existing code that initializes the structure using nested initializer and will warn with the new u8 field added to the beginning. The structure also packs nicer when this new u8 is added to the end of the structure [MChan]. Fixes: abd43a13525d ("bnxt_en: Support for 64-bit flow handle.") Signed-off-by: Somnath Kotur Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | 4 ++-- drivers/net/ethernet/broadcom/bnxt/bnxt_tc.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) commit 685ec6a81bb0d47faf1dba49437d5bdaede2733d Author: Venkat Duvvuru Date: Sat Aug 17 17:04:51 2019 -0400 bnxt_en: Use correct src_fid to determine direction of the flow Direction of the flow is determined using src_fid. For an RX flow, src_fid is PF's fid and for TX flow, src_fid is VF's fid. Direction of the flow must be specified, when getting statistics for that flow. Currently, for DECAP flow, direction is determined incorrectly, i.e., direction is initialized as TX for DECAP flow, instead of RX. Because of which, stats are not reported for this DECAP flow, though it is offloaded and there is traffic for that flow, resulting in flow age out. This patch fixes the problem by determining the DECAP flow's direction using correct fid. Set the flow direction in all cases for consistency even if 64-bit flow handle is not used. Fixes: abd43a13525d ("bnxt_en: Support for 64-bit flow handle.") Signed-off-by: Venkat Duvvuru Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit b703ba751dbb4bcd086509ed4b28102bc1670b35 Author: Vasundhara Volam Date: Sat Aug 17 17:04:50 2019 -0400 bnxt_en: Suppress HWRM errors for HWRM_NVM_GET_VARIABLE command For newly added NVM parameters, older firmware may not have the support. Suppress the error message to avoid the unncessary error message which is triggered when devlink calls the driver during initialization. Fixes: 782a624d00fa ("bnxt_en: Add bnxt_en initial params table and register it.") Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit dd2ebf3404c7c295014bc025dea23960960ceb1a Author: Vasundhara Volam Date: Sat Aug 17 17:04:49 2019 -0400 bnxt_en: Fix handling FRAG_ERR when NVM_INSTALL_UPDATE cmd fails If FW returns FRAG_ERR in response error code, driver is resending the command only when HWRM command returns success. Fix the code to resend NVM_INSTALL_UPDATE command with DEFRAG install flags, if FW returns FRAG_ERR in its response error code. Fixes: cb4d1d626145 ("bnxt_en: Retry failed NVM_INSTALL_UPDATE with defragmentation flag enabled.") Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit e8f267b063208372f7a329c6d5288d58944d873c Author: Michael Chan Date: Sat Aug 17 17:04:48 2019 -0400 bnxt_en: Improve RX doorbell sequence. When both RX buffers and RX aggregation buffers have to be replenished at the end of NAPI, post the RX aggregation buffers first before RX buffers. Otherwise, we may run into a situation where there are only RX buffers without RX aggregation buffers for a split second. This will cause the hardware to abort the RX packet and report buffer errors, which will cause unnecessary cleanup by the driver. Ringing the Aggregation ring doorbell first before the RX ring doorbell will prevent some of these buffer errors. Use the same sequence during ring initialization as well. Fixes: 697197e5a173 ("bnxt_en: Re-structure doorbells.") Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit a46ecb116fb7f722fa8cb2da01959c36e4e10c41 Author: Michael Chan Date: Sat Aug 17 17:04:47 2019 -0400 bnxt_en: Fix VNIC clearing logic for 57500 chips. During device shutdown, the VNIC clearing sequence needs to be modified to free the VNIC first before freeing the RSS contexts. The current code is doing the reverse and we can get mis-directed RX completions to CP ring ID 0 when the RSS contexts are freed and zeroed. The clearing of RSS contexts is not required with the new sequence. Refactor the VNIC clearing logic into a new function bnxt_clear_vnic() and do the chip specific VNIC clearing sequence. Fixes: 7b3af4f75b81 ("bnxt_en: Add RSS support for 57500 chips.") Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) commit f1472cb09f11ddb41d4be84f0650835cb65a9073 Author: Wenwen Wang Date: Wed Aug 14 13:56:43 2019 -0500 net: kalmia: fix memory leaks In kalmia_init_and_get_ethernet_addr(), 'usb_buf' is allocated through kmalloc(). In the following execution, if the 'status' returned by kalmia_send_init_packet() is not 0, 'usb_buf' is not deallocated, leading to memory leaks. To fix this issue, add the 'out' label to free 'usb_buf'. Signed-off-by: Wenwen Wang Signed-off-by: David S. Miller drivers/net/usb/kalmia.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1eca92eef18719027d394bf1a2d276f43e7cf886 Author: Wenwen Wang Date: Wed Aug 14 13:03:38 2019 -0500 cx82310_eth: fix a memory leak bug In cx82310_bind(), 'dev->partial_data' is allocated through kmalloc(). Then, the execution waits for the firmware to become ready. If the firmware is not ready in time, the execution is terminated. However, the allocated 'dev->partial_data' is not deallocated on this path, leading to a memory leak bug. To fix this issue, free 'dev->partial_data' before returning the error. Signed-off-by: Wenwen Wang Signed-off-by: David S. Miller drivers/net/usb/cx82310_eth.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6825e5a6c45dbd473f8b2993a065bbea15347632 Merge: 3039fadf2bfd 834de5c1aa76 Author: Linus Torvalds Date: Sun Aug 18 12:56:42 2019 -0700 Merge tag 'fixes-for-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux Pull MTD fix from Richard Weinberger: "A single fix for MTD to correctly set the spi-nor WP pin" * tag 'fixes-for-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: mtd: spi-nor: Fix the disabling of write protection at init commit 4a4d2d372fb9b9229327e2ed01d5d9572eddf4de Author: Manish Chopra Date: Sun Aug 18 07:25:48 2019 -0700 bnx2x: Fix VF's VLAN reconfiguration in reload. Commit 04f05230c5c13 ("bnx2x: Remove configured vlans as part of unload sequence."), introduced a regression in driver that as a part of VF's reload flow, VLANs created on the VF doesn't get re-configured in hardware as vlan metadata/info was not getting cleared for the VFs which causes vlan PING to stop. This patch clears the vlan metadata/info so that VLANs gets re-configured back in the hardware in VF's reload flow and PING/traffic continues for VLANs created over the VFs. Fixes: 04f05230c5c13 ("bnx2x: Remove configured vlans as part of unload sequence.") Signed-off-by: Manish Chopra Signed-off-by: Sudarsana Kalluru Signed-off-by: Shahed Shaikh Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 7 ++++--- drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h | 2 ++ drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 17 ++++++++++++----- 3 files changed, 18 insertions(+), 8 deletions(-) commit 3039fadf2bfdc104dc963820c305778c7c1a6229 Merge: c332f3a70e7a 07301df7d2fc Author: Linus Torvalds Date: Sun Aug 18 09:51:48 2019 -0700 Merge tag 'for-5.3-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "Two fixes that popped up during testing: - fix for sysfs-related code that adds/removes block groups, warnings appear during several fstests in connection with sysfs updates in 5.3, the fix essentially replaces a workaround with scope NOFS and applies to 5.2-based branch too - add sanity check of trim range" * tag 'for-5.3-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: trim: Check the range passed into to prevent overflow Btrfs: fix sysfs warning and missing raid sysfs directories commit c332f3a70e7a094e4a60d68a2c4c6f051ed7f04d Merge: 645c03aaca2b a90118c445cc Author: Linus Torvalds Date: Sun Aug 18 09:45:42 2019 -0700 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Thomas Gleixner: "A set of fixes for x86: - Fix the inconsistent error handling in the umwait init code - Rework the boot param zeroing so gcc9 stops complaining about out of bound memset. The resulting source code is actually more sane to read than the smart solution we had - Maintainers update so Tony gets involved when Intel models are added - Some more fallthrough fixes" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/boot: Save fields explicitly, zero out everything else MAINTAINERS, x86/CPU: Tony Luck will maintain asm/intel-family.h x86/fpu/math-emu: Address fallthrough warnings x86/apic/32: Fix yet another implicit fallthrough warning x86/umwait: Fix error handling in umwait_init() commit 645c03aaca2bc02f5d5cc70804ca00b248b729dc Merge: 5bba5c9c86b3 cbd32a1c56e3 Author: Linus Torvalds Date: Sun Aug 18 09:36:51 2019 -0700 Merge branch 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull EFI fix from Thomas Gleixner: "A single fix for a EFI mixed mode regression caused by recent rework which did not take the firmware bitwidth into account" * 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: efi-stub: Fix get_efi_config_table on mixed-mode setups commit 5bba5c9c86b31895f5cb67f2db2b0f0cddc96dc6 Merge: 4503c0a41571 0dda5907b0fc Author: Linus Torvalds Date: Sun Aug 18 09:26:16 2019 -0700 Merge tag 'spdx-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx Pull SPDX fixes from Greg KH: "Here are four small SPDX fixes for 5.3-rc5. A few style fixes for some SPDX comments, added an SPDX tag for one file, and fix up some GPL boilerplate for another file. All of these have been in linux-next for a few weeks with no reported issues (they are comment changes only, so that's to be expected...)" * tag 'spdx-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx: i2c: stm32: Use the correct style for SPDX License Identifier intel_th: Use the correct style for SPDX License Identifier coccinelle: api/atomic_as_refcounter: add SPDX License Identifier kernel/configs: Replace GPL boilerplate code with SPDX identifier commit 4503c0a41571bf17ef49bd147da83250d86ff7d5 Merge: ae1a616af36e 9cd02b09a0f4 Author: Linus Torvalds Date: Sun Aug 18 09:17:41 2019 -0700 Merge tag 'char-misc-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver fixes from Greg KH: "Here are some small char and misc driver fixes for 5.3-rc5. These are two different subsystems needing some fixes, the habanalabs driver which is has some more big endian fixes for problems found. The other are some small soundwire fixes, including some Kconfig dependencies needed to resolve reported build errors. All of these have been in linux-next this week with no reported issues" * tag 'char-misc-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: misc: xilinx-sdfec: fix dependency and build error habanalabs: fix device IRQ unmasking for BE host habanalabs: fix endianness handling for internal QMAN submission habanalabs: fix completion queue handling when host is BE habanalabs: fix endianness handling for packets from user habanalabs: fix DRAM usage accounting on context tear down habanalabs: Avoid double free in error flow soundwire: fix regmap dependencies and align with other serial links soundwire: cadence_master: fix definitions for INTSTAT0/1 soundwire: cadence_master: fix register definition for SLAVE_STATE commit ae1a616af36e5ad0726407b76feed5060a424744 Merge: 359334caf777 48b30e10bfc2 Author: Linus Torvalds Date: Sun Aug 18 09:14:56 2019 -0700 Merge tag 'staging-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging/IIO fixes from Greg KH: "Here are four small staging and iio driver fixes for 5.3-rc5 Two are for the dt3000 comedi driver for some reported problems found in that codebase, and two are some small iio fixes. All of these have been in linux-next this week with no reported issues" * tag 'staging-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: staging: comedi: dt3000: Fix rounding up of timer divisor staging: comedi: dt3000: Fix signed integer overflow 'divider * base' iio: adc: max9611: Fix temperature reading in probe iio: frequency: adf4371: Fix output frequency setting commit 359334caf777854fc0647c610f4c34be5eaeb3ca Merge: 8fde2832bd0b 6a5f43d1d8bd Author: Linus Torvalds Date: Sun Aug 18 09:11:29 2019 -0700 Merge tag 'usb-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are number of small USB fixes for 5.3-rc5. Syzbot has been on a tear recently now that it has some good USB debugging hooks integrated, so there's a number of fixes in here found by those tools for some _very_ old bugs. Also a handful of gadget driver fixes for reported issues, some hopefully-final dma fixes for host controller drivers, and some new USB serial gadget driver ids. All of these have been in linux-next this week with no reported issues (the usb-serial ones were in linux-next in its own branch, but merged into mine on Friday)" * tag 'usb-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: usb: add a hcd_uses_dma helper usb: don't create dma pools for HCDs with a localmem_pool usb: chipidea: imx: fix EPROBE_DEFER support during driver probe usb: host: fotg2: restart hcd after port reset USB: CDC: fix sanity checks in CDC union parser usb: cdc-acm: make sure a refcount is taken early enough USB: serial: option: add the BroadMobi BM818 card USB: serial: option: Add Motorola modem UARTs USB: core: Fix races in character device registration and deregistraion usb: gadget: mass_storage: Fix races between fsg_disable and fsg_set_alt usb: gadget: composite: Clear "suspended" on reset/disconnect usb: gadget: udc: renesas_usb3: Fix sysfs interface of "role" USB: serial: option: add D-Link DWM-222 device ID USB: serial: option: Add support for ZTE MF871A commit 8fde2832bd0bdc5a2b57330a9e9c3d2fa16bd1d8 Merge: 85d8d3b172eb a982eeb09b60 Author: Linus Torvalds Date: Sat Aug 17 19:39:54 2019 -0700 Merge tag 'for-linus-2019-08-17' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "A collection of fixes that should go into this series. This contains: - Revert of the REQ_NOWAIT_INLINE and associated dio changes. There were still corner cases there, and even though I had a solution for it, it's too involved for this stage. (me) - Set of NVMe fixes (via Sagi) - io_uring fix for fixed buffers (Anthony) - io_uring defer issue fix (Jackie) - Regression fix for queue sync at exit time (zhengbin) - xen blk-back memory leak fix (Wenwen)" * tag 'for-linus-2019-08-17' of git://git.kernel.dk/linux-block: io_uring: fix an issue when IOSQE_IO_LINK is inserted into defer list block: remove REQ_NOWAIT_INLINE io_uring: fix manual setup of iov_iter for fixed buffers xen/blkback: fix memory leaks blk-mq: move cancel of requeue_work to the front of blk_exit_queue nvme-pci: Fix async probe remove race nvme: fix controller removal race with scan work nvme-rdma: fix possible use-after-free in connect error flow nvme: fix a possible deadlock when passthru commands sent to a multipath device nvme-core: Fix extra device_put() call on error path nvmet-file: fix nvmet_file_flush() always returning an error nvmet-loop: Flush nvme_delete_wq when removing the port nvmet: Fix use-after-free bug when a port is removed nvme-multipath: revalidate nvme_ns_head gendisk in nvme_validate_ns commit 85d8d3b172eb37b23dcdbe9fa7a85e343642bfea Merge: 05c525326957 bafe1e79e05d Author: Linus Torvalds Date: Sat Aug 17 19:31:30 2019 -0700 Merge tag 'hyperv-fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux Pull Hyper-V fixes from Sasha Levin: - A few fixes for the userspace hyper-v tools from Adrian Vladu. - A fix for the hyper-v MAINTAINERs entry from Lan Tianyu. - Fix for SPDX license identifier in the userspace tools from Nishad Kamdar. * tag 'hyperv-fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux: MAINTAINERS: Fix Hyperv vIOMMU driver file name tools: hv: Use the correct style for SPDX License Identifier tools: hv: fix typos in toolchain tools: hv: fix KVP and VSS daemons exit code tools: hv: fixed Python pep8/flake8 warnings for lsvmbus commit 42eb4554702d40668968da333ffa37cc0a15ff9e Merge: 712042313b23 58a96fc35375 Author: David S. Miller Date: Sat Aug 17 12:37:47 2019 -0700 Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth Johan Hedberg says: ==================== pull request: bluetooth 2019-08-17 Here's a set of Bluetooth fixes for the 5.3-rc series: - Multiple fixes for Qualcomm (btqca & hci_qca) drivers - Minimum encryption key size debugfs setting (this is required for Bluetooth Qualification) - Fix hidp_send_message() to have a meaningful return value ==================== Signed-off-by: David S. Miller commit bafe1e79e05de725e26b3f60c90b49e635b686b9 Author: Lan Tianyu Date: Tue Mar 26 14:28:21 2019 +0800 MAINTAINERS: Fix Hyperv vIOMMU driver file name The Hyperv vIOMMU file name should be "hyperv-iommu.c" rather than "hyperv_iommu.c". This patch is to fix it. Signed-off-by: Lan Tianyu Signed-off-by: Sasha Levin MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 61e0f39105b7926a41bc03158eccf5ed13207ebd Author: Nishad Kamdar Date: Mon Jul 22 19:01:17 2019 +0530 tools: hv: Use the correct style for SPDX License Identifier This patch corrects the SPDX License Identifier style in the trace header file related to Microsoft Hyper-V client drivers. For C header files Documentation/process/license-rules.rst mandates C-like comments (opposed to C source files where C++ style should be used) Changes made by using a script provided by Joe Perches here: https://lkml.org/lkml/2019/2/7/46 Suggested-by: Joe Perches Signed-off-by: Nishad Kamdar Acked-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin drivers/hv/hv_trace.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2d35c66036b2494c329a32468c85405493370e75 Author: Adrian Vladu Date: Mon May 6 16:51:24 2019 +0000 tools: hv: fix typos in toolchain Fix typos in the HyperV toolchain. Signed-off-by: Adrian Vladu Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Stephen Hemminger Cc: Sasha Levin Cc: Alessandro Pilotti Signed-off-by: Sasha Levin tools/hv/hv_get_dhcp_info.sh | 2 +- tools/hv/hv_kvp_daemon.c | 6 +++--- tools/hv/hv_set_ifconfig.sh | 2 +- tools/hv/hv_vss_daemon.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) commit b0995156071b0ff29a5902964a9dc8cfad6f81c0 Author: Adrian Vladu Date: Mon May 6 16:50:58 2019 +0000 tools: hv: fix KVP and VSS daemons exit code HyperV KVP and VSS daemons should exit with 0 when the '--help' or '-h' flags are used. Signed-off-by: Adrian Vladu Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Stephen Hemminger Cc: Sasha Levin Cc: Alessandro Pilotti Signed-off-by: Sasha Levin tools/hv/hv_kvp_daemon.c | 2 ++ tools/hv/hv_vss_daemon.c | 2 ++ 2 files changed, 4 insertions(+) commit 5912e791f3018de0a007c8cfa9cb38c97d3e5f5c Author: Adrian Vladu Date: Mon May 6 17:27:37 2019 +0000 tools: hv: fixed Python pep8/flake8 warnings for lsvmbus Fixed pep8/flake8 python style code for lsvmbus tool. The TAB indentation was on purpose ignored (pep8 rule W191) to make sure the code is complying with the Linux code guideline. The following command doe not show any warnings now: pep8 --ignore=W191 lsvmbus flake8 --ignore=W191 lsvmbus Signed-off-by: Adrian Vladu Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Stephen Hemminger Cc: Sasha Levin Cc: Dexuan Cui Cc: Alessandro Pilotti Signed-off-by: Sasha Levin tools/hv/lsvmbus | 75 +++++++++++++++++++++++++++++++------------------------- 1 file changed, 42 insertions(+), 33 deletions(-) commit 05c525326957b504561d271f669d3b315930422f Merge: 2f478b60118f 90865a3dc597 Author: Linus Torvalds Date: Sat Aug 17 10:44:50 2019 -0700 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "I2C has one revert because of a regression, two fixes for tiny race windows (which we were not able to trigger), a MAINTAINERS addition, and a SPDX fix" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: stm32: Use the correct style for SPDX License Identifier i2c: emev2: avoid race when unregistering slave client i2c: rcar: avoid race when unregistering slave client MAINTAINERS: i2c-imx: take over maintainership Revert "i2c: imx: improve the error handling in i2c_imx_dma_request()" commit 2f478b60118f48bf66eaddcca0d23e80f87a682d Merge: 6e625a1a3f47 69703eb9a8ae Author: Linus Torvalds Date: Sat Aug 17 10:36:47 2019 -0700 Merge tag 'riscv/for-v5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Paul Walmsley: - Two patches to fix significant bugs in floating point register context handling - A minor fix in RISC-V flush_tlb_page(), to supply a valid end address to flush_tlb_range() - Two minor defconfig additions: to build the virtio hwrng driver by default (for QEMU targets), and to partially synchronize the 32-bit defconfig with the 64-bit defconfig * tag 'riscv/for-v5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: Make __fstate_clean() work correctly. riscv: Correct the initialized flow of FP register riscv: defconfig: Update the defconfig riscv: rv32_defconfig: Update the defconfig riscv: fix flush_tlb_range() end address for flush_tlb_page() commit 6a5f43d1d8bd3779e428178438caf33f60427124 Merge: edfbcb321faf e5d8badf37e6 Author: Greg Kroah-Hartman Date: Sat Aug 17 17:09:33 2019 +0200 Merge tag 'usb-serial-5.3-rc5' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Johan writes: USB-serial fixes for 5.3-rc5 Here are some new modem device ids. All have been in linux-next with no reported issues. Signed-off-by: Johan Hovold * tag 'usb-serial-5.3-rc5' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: option: add the BroadMobi BM818 card USB: serial: option: Add Motorola modem UARTs USB: serial: option: add D-Link DWM-222 device ID USB: serial: option: Add support for ZTE MF871A commit 58a96fc35375ab87db7c5b69336f5befde1b548f Author: Marcel Holtmann Date: Tue Jul 16 20:34:41 2019 +0200 Bluetooth: Add debug setting for changing minimum encryption key size For testing and qualification purposes it is useful to allow changing the minimum encryption key size value that the host stack is going to enforce. This adds a new debugfs setting min_encrypt_key_size to achieve this functionality. Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg include/net/bluetooth/hci_core.h | 1 + net/bluetooth/hci_core.c | 1 + net/bluetooth/hci_debugfs.c | 31 +++++++++++++++++++++++++++++++ net/bluetooth/l2cap_core.c | 2 +- 4 files changed, 34 insertions(+), 1 deletion(-) commit 12ece2d53d3e8f827e972caf497c165f7729c717 Author: Tony Luck Date: Thu Aug 15 11:16:24 2019 -0700 x86/cpu: Explain Intel model naming convention Dave Hansen spelled out the rules in an e-mail: https://lkml.kernel.org/r/91eefbe4-e32b-d762-be4d-672ff915db47@intel.com Copy those right into the file to make it easy for people to find them. Suggested-by: Borislav Petkov Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov Acked-by: Thomas Gleixner Cc: "H. Peter Anvin" Cc: Dave Hansen Cc: Ingo Molnar Cc: x86-ml Link: https://lkml.kernel.org/r/20190815224704.GA10025@agluck-desk2.amr.corp.intel.com arch/x86/include/asm/intel-family.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit edc58dd0123b552453a74369bd0c8d890b497b4b Author: Darrick J. Wong Date: Sun Aug 11 15:52:25 2019 -0700 vfs: fix page locking deadlocks when deduping files When dedupe wants to use the page cache to compare parts of two files for dedupe, we must be very careful to handle locking correctly. The current code doesn't do this. It must lock and unlock the page only once if the two pages are the same, since the overlapping range check doesn't catch this when blocksize < pagesize. If the pages are distinct but from the same file, we must observe page locking order and lock them in order of increasing offset to avoid clashing with writeback locking. Fixes: 876bec6f9bbfcb3 ("vfs: refactor clone/dedupe_file_range common functions") Signed-off-by: Darrick J. Wong Reviewed-by: Bill O'Donnell Reviewed-by: Matthew Wilcox (Oracle) fs/read_write.c | 49 +++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 41 insertions(+), 8 deletions(-) commit 4529e6d7a6ab727aa85b1dd3cbfa9e82f10f730d Author: Christoph Hellwig Date: Thu Aug 15 23:41:06 2019 -0700 xfs: compat_ioctl: use compat_ptr() For 31-bit s390 user space, we have to pass pointer arguments through compat_ptr() in the compat_ioctl handler. Signed-off-by: Arnd Bergmann Signed-off-by: Christoph Hellwig Reviewed-by: Eric Sandeen Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_ioctl32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 314e01a6d7ddf04608440beb087b21d8aa32f03f Author: Christoph Hellwig Date: Thu Aug 15 23:41:06 2019 -0700 xfs: fall back to native ioctls for unhandled compat ones Always try the native ioctl if we don't have a compat handler. This removes a lot of boilerplate code as 'modern' ioctls should generally be compat clean, and fixes the missing entries for the recently added FS_IOC_GETFSLABEL/FS_IOC_SETFSLABEL ioctls. Fixes: f7664b31975b ("xfs: implement online get/set fs label") Signed-off-by: Christoph Hellwig Reviewed-by: Eric Sandeen Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_ioctl32.c | 54 ++-------------------------------------------------- 1 file changed, 2 insertions(+), 52 deletions(-) commit 6e625a1a3f471d63989d3a66cdf6a0c307654848 Merge: b7e7c85dc7b0 cd8869f4cb25 Author: Linus Torvalds Date: Fri Aug 16 17:27:55 2019 -0700 Merge tag 'xtensa-20190816' of git://github.com/jcmvbkbc/linux-xtensa Pull Xtensa fix from Max Filippov: "Add missing isync into cpu_reset to make sure ITLB changes are effective" * tag 'xtensa-20190816' of git://github.com/jcmvbkbc/linux-xtensa: xtensa: add missing isync to the cpu_reset TLB code commit 712042313b23b5df7451faf4b279beb3025e990c Author: Tuong Lien Date: Thu Aug 15 10:24:08 2019 +0700 tipc: fix false detection of retransmit failures This commit eliminates the use of the link 'stale_limit' & 'prev_from' (besides the already removed - 'stale_cnt') variables in the detection of repeated retransmit failures as there is no proper way to initialize them to avoid a false detection, i.e. it is not really a retransmission failure but due to a garbage values in the variables. Instead, a jiffies variable will be added to individual skbs (like the way we restrict the skb retransmissions) in order to mark the first skb retransmit time. Later on, at the next retransmissions, the timestamp will be checked to see if the skb in the link transmq is "too stale", that is, the link tolerance time has passed, so that a link reset will be ordered. Note, just checking on the first skb in the queue is fine enough since it must be the oldest one. A counter is also added to keep track the actual skb retransmissions' number for later checking when the failure happens. The downside of this approach is that the skb->cb[] buffer is about to be exhausted, however it is always able to allocate another memory area and keep a reference to it when needed. Fixes: 77cf8edbc0e7 ("tipc: simplify stale link failure criteria") Reported-by: Hoang Le Acked-by: Ying Xue Acked-by: Jon Maloy Signed-off-by: Tuong Lien Signed-off-by: David S. Miller net/tipc/link.c | 92 ++++++++++++++++++++++++++++++++------------------------- net/tipc/msg.h | 8 +++-- 2 files changed, 57 insertions(+), 43 deletions(-) commit df451f83e1fc0fa3764a2724b0faaaf9d07ab1b6 Author: Andreas Kemnade Date: Fri Aug 16 18:50:00 2019 +0200 gpio: of: fix Freescale SPI CS quirk handling On the gta04 we see: spi_gpio: probe of spi_lcd failed with error -2 The quirk introduced in commit e3023bf80639 ("gpio: of: Handle the Freescale SPI CS") can also be triggered by a temporary -EPROBE_DEFER and so "convert" it to a hard -ENOENT. Disable that conversion by checking for -EPROBE_DEFER. Fixes: e3023bf80639 ("gpio: of: Handle the Freescale SPI CS") Suggested-by: H. Nikolaus Schaller Signed-off-by: Andreas Kemnade Link: https://lore.kernel.org/r/20190816165000.32334-1-andreas@kemnade.info Signed-off-by: Linus Walleij drivers/gpio/gpiolib-of.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b9cbf8a64865b50fd0f4a3915fa00ac7365cdf8f Author: Wenwen Wang Date: Wed Aug 14 11:23:13 2019 -0500 lan78xx: Fix memory leaks In lan78xx_probe(), a new urb is allocated through usb_alloc_urb() and saved to 'dev->urb_intr'. However, in the following execution, if an error occurs, 'dev->urb_intr' is not deallocated, leading to memory leaks. To fix this issue, invoke usb_free_urb() to free the allocated urb before returning from the function. Signed-off-by: Wenwen Wang Signed-off-by: David S. Miller drivers/net/usb/lan78xx.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 0a66c20a6a123d6dc96c6197f02455cb64615271 Author: Denis Efremov Date: Wed Aug 14 15:12:09 2019 +0300 MAINTAINERS: r8169: Update path to the driver Update MAINTAINERS record to reflect the filename change. The file was moved in commit 25e992a4603c ("r8169: rename r8169.c to r8169_main.c") Cc: Heiner Kallweit Cc: nic_swsd@realtek.com Cc: David S. Miller Cc: netdev@vger.kernel.org Signed-off-by: Denis Efremov Reviewed-by: Heiner Kallweit Signed-off-by: David S. Miller MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5a69e4980258c56f6d4c2048a1b9c260218785b7 Author: Denis Efremov Date: Wed Aug 14 15:58:00 2019 +0300 MAINTAINERS: PHY LIBRARY: Update files in the record Update MAINTAINERS to reflect that sysfs-bus-mdio was removed in commit a6cd0d2d493a ("Documentation: net-sysfs: Remove duplicate PHY device documentation") and sysfs-class-net-phydev was added in commit 86f22d04dfb5 ("net: sysfs: Document PHY device sysfs attributes"). Cc: Florian Fainelli Cc: Andrew Lunn Cc: Heiner Kallweit Cc: David S. Miller Cc: netdev@vger.kernel.org Signed-off-by: Denis Efremov Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b7e7c85dc7b0ea5ff821756c331489e3b151eed1 Merge: 2d63ba3e41db b6143d10d23e Author: Linus Torvalds Date: Fri Aug 16 10:51:47 2019 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Catalin Marinas: - Don't taint the kernel if CPUs have different sets of page sizes supported (other than the one in use). - Issue I-cache maintenance for module ftrace trampoline. * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: ftrace: Ensure module ftrace trampoline is coherent with I-side arm64: cpufeature: Don't treat granule sizes as strict commit 78e70e780b289ff59ec33a9f9c1fcecaf17a46e1 Author: He Zhe Date: Tue Aug 6 17:41:04 2019 +0800 nfsd4: Fix kernel crash when reading proc file reply_cache_stats reply_cache_stats uses wrong parameter as seq file private structure and thus causes the following kernel crash when users read /proc/fs/nfsd/reply_cache_stats BUG: kernel NULL pointer dereference, address: 00000000000001f9 PGD 0 P4D 0 Oops: 0000 [#3] SMP PTI CPU: 6 PID: 1502 Comm: cat Tainted: G D 5.3.0-rc3+ #1 Hardware name: Intel Corporation Broadwell Client platform/Basking Ridge, BIOS BDW-E2R1.86C.0118.R01.1503110618 03/11/2015 RIP: 0010:nfsd_reply_cache_stats_show+0x3b/0x2d0 Code: 41 54 49 89 f4 48 89 fe 48 c7 c7 b3 10 33 88 53 bb e8 03 00 00 e8 88 82 d1 ff bf 58 89 41 00 e8 eb c5 85 00 48 83 eb 01 75 f0 <41> 8b 94 24 f8 01 00 00 48 c7 c6 be 10 33 88 4c 89 ef bb e8 03 00 RSP: 0018:ffffaa520106fe08 EFLAGS: 00010246 RAX: 000000cfe1a77123 RBX: 0000000000000000 RCX: 0000000000291b46 RDX: 000000cf00000000 RSI: 0000000000000006 RDI: 0000000000291b28 RBP: ffffaa520106fe20 R08: 0000000000000006 R09: 000000cfe17e55dd R10: ffffa424e47c0000 R11: 000000000000030b R12: 0000000000000001 R13: ffffa424e5697000 R14: 0000000000000001 R15: ffffa424e5697000 FS: 00007f805735f580(0000) GS:ffffa424f8f80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000000001f9 CR3: 00000000655ce005 CR4: 00000000003606e0 Call Trace: seq_read+0x194/0x3e0 __vfs_read+0x1b/0x40 vfs_read+0x95/0x140 ksys_read+0x61/0xe0 __x64_sys_read+0x1a/0x20 do_syscall_64+0x4d/0x120 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f805728b861 Code: fe ff ff 50 48 8d 3d 86 b4 09 00 e8 79 e0 01 00 66 0f 1f 84 00 00 00 00 00 48 8d 05 d9 19 0d 00 8b 00 85 c0 75 13 31 c0 0f 05 <48> 3d 00 f0 ff ff 77 57 c3 66 0f 1f 44 00 00 48 83 ec 28 48 89 54 RSP: 002b:00007ffea1ce3c38 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 0000000000020000 RCX: 00007f805728b861 RDX: 0000000000020000 RSI: 00007f8057183000 RDI: 0000000000000003 RBP: 00007f8057183000 R08: 00007f8057182010 R09: 0000000000000000 R10: 0000000000000022 R11: 0000000000000246 R12: 0000559a60e8ff10 R13: 0000000000000003 R14: 0000000000020000 R15: 0000000000020000 Modules linked in: CR2: 00000000000001f9 ---[ end trace 01613595153f0cba ]--- RIP: 0010:nfsd_reply_cache_stats_show+0x3b/0x2d0 Code: 41 54 49 89 f4 48 89 fe 48 c7 c7 b3 10 33 88 53 bb e8 03 00 00 e8 88 82 d1 ff bf 58 89 41 00 e8 eb c5 85 00 48 83 eb 01 75 f0 <41> 8b 94 24 f8 01 00 00 48 c7 c6 be 10 33 88 4c 89 ef bb e8 03 00 RSP: 0018:ffffaa52004b3e08 EFLAGS: 00010246 RAX: 0000002bab45a7c6 RBX: 0000000000000000 RCX: 0000000000291b4c RDX: 0000002b00000000 RSI: 0000000000000004 RDI: 0000000000291b28 RBP: ffffaa52004b3e20 R08: 0000000000000004 R09: 0000002bab1c8c7a R10: ffffa424e5500000 R11: 00000000000002a9 R12: 0000000000000001 R13: ffffa424e4475000 R14: 0000000000000001 R15: ffffa424e4475000 FS: 00007f805735f580(0000) GS:ffffa424f8f80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000000001f9 CR3: 00000000655ce005 CR4: 00000000003606e0 Killed Fixes: 3ba75830ce17 ("nfsd4: drc containerization") Signed-off-by: He Zhe Signed-off-by: J. Bruce Fields fs/nfsd/nfscache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 24876f09a7dfe36a82f53d304d8c1bceb3257a0f Author: Martin Blumenstingl Date: Fri Aug 16 00:31:55 2019 +0200 clk: Fix potential NULL dereference in clk_fetch_parent_index() Don't compare the parent clock name with a NULL name in the clk_parent_map. This prevents a kernel crash when passing NULL core->parents[i].name to strcmp(). An example which triggered this is a mux clock with four parents when each of them is referenced in the clock driver using clk_parent_data.fw_name and then calling clk_set_parent(clk, 3rd_parent) on this mux. In this case the first parent is also the HW default so core->parents[i].hw is populated when the clock is registered. Calling clk_set_parent(clk, 3rd_parent) will then go through all parents and skip the first parent because it's hw pointer doesn't match. For the second parent no hw pointer is cached yet and clk_core_get(core, 1) returns a non-matching pointer (which is correct because we are comparing the second with the third parent). Comparing the result of clk_core_get(core, 2) with the requested parent gives a match. However we don't reach this point because right after the clk_core_get(core, 1) mismatch the old code tried to !strcmp(parent->name, NULL) (where the second argument is actually core->parents[i].name, but that was never populated by the clock driver). Signed-off-by: Martin Blumenstingl Link: https://lkml.kernel.org/r/20190815223155.21384-1-martin.blumenstingl@googlemail.com Fixes: fc0c209c147f ("clk: Allow parents to be specified without string names") Signed-off-by: Stephen Boyd drivers/clk/clk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4f8c6aba37da199155a121c6cdc38505a9eb0259 Author: Stephen Boyd Date: Tue Aug 13 14:41:47 2019 -0700 clk: Fix falling back to legacy parent string matching Calls to clk_core_get() will return ERR_PTR(-EINVAL) if we've started migrating a clk driver to use the DT based style of specifying parents but we haven't made any DT updates yet. This happens when we pass a non-NULL value as the 'name' argument of of_parse_clkspec(). That function returns -EINVAL in such a situation, instead of -ENOENT like we expected. The return value comes back up to clk_core_fill_parent_index() which proceeds to skip calling clk_core_lookup() because the error pointer isn't equal to -ENOENT, it's -EINVAL. Furthermore, we blindly overwrite the error pointer returned by clk_core_get() with NULL when there isn't a legacy .name member specified in the parent map. This isn't too bad right now because we don't really care to differentiate NULL from an error, but in the future we should only try to do a legacy lookup if we know we might find something. This way DT lookups that fail don't try to lookup based on strings when there isn't any string to match, hiding the error from DT parsing. Fix both these problems so that clk provider drivers can use the new style of parent mapping without having to also update their DT at the same time. This patch is based on an earlier patch from Taniya Das which checked for -EINVAL in addition to -ENOENT return values from clk_core_get(). Fixes: 601b6e93304a ("clk: Allow parents to be specified via clkspec index") Cc: Taniya Das Cc: Jerome Brunet Cc: Chen-Yu Tsai Reported-by: Taniya Das Signed-off-by: Stephen Boyd Link: https://lkml.kernel.org/r/20190813214147.34394-1-sboyd@kernel.org Tested-by: Taniya Das drivers/clk/clk.c | 46 ++++++++++++++++++++++++++++++++++------------ 1 file changed, 34 insertions(+), 12 deletions(-) commit b6143d10d23ebb4a77af311e8b8b7f019d0163e6 Author: Will Deacon Date: Fri Aug 16 14:57:43 2019 +0100 arm64: ftrace: Ensure module ftrace trampoline is coherent with I-side The initial support for dynamic ftrace trampolines in modules made use of an indirect branch which loaded its target from the beginning of a special section (e71a4e1bebaf7 ("arm64: ftrace: add support for far branches to dynamic ftrace")). Since no instructions were being patched, no cache maintenance was needed. However, later in be0f272bfc83 ("arm64: ftrace: emit ftrace-mod.o contents through code") this code was reworked to output the trampoline instructions directly into the PLT entry but, unfortunately, the necessary cache maintenance was overlooked. Add a call to __flush_icache_range() after writing the new trampoline instructions but before patching in the branch to the trampoline. Cc: Ard Biesheuvel Cc: James Morse Cc: Fixes: be0f272bfc83 ("arm64: ftrace: emit ftrace-mod.o contents through code") Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas arch/arm64/kernel/ftrace.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit 2d63ba3e41db3ceb0d23924ed2879b910276e24c Merge: 9da5bb24bb36 a3ee2477c45f Author: Linus Torvalds Date: Fri Aug 16 09:13:16 2019 -0700 Merge tag 'pm-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These add a check to avoid recent suspend-to-idle power regression on systems with NVMe drives where the PCIe ASPM policy is "performance" (or when the kernel is built without ASPM support), fix an issue related to frequency limits in the schedutil cpufreq governor and fix a mistake related to the PM QoS usage in the cpufreq core introduced recently. Specifics: - Disable NVMe power optimization related to suspend-to-idle added recently on systems where PCIe ASPM is not able to put PCIe links into low-power states to prevent excess power from being drawn by the system while suspended (Rafael Wysocki). - Make the schedutil governor handle frequency limits changes properly in all cases (Viresh Kumar). - Prevent the cpufreq core from treating positive values returned by dev_pm_qos_update_request() as errors (Viresh Kumar)" * tag 'pm-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: nvme-pci: Allow PCI bus-level PM to be used if ASPM is disabled PCI/ASPM: Add pcie_aspm_enabled() cpufreq: schedutil: Don't skip freq update when limits change cpufreq: dev_pm_qos_update_request() can return 1 on success commit 9da5bb24bb368567a43ac2df0e108e43d80f3564 Merge: cfa0bb2aef99 d555c34338ca Author: Linus Torvalds Date: Fri Aug 16 08:59:33 2019 -0700 Merge tag 'dmaengine-fix-5.3-rc5' of git://git.infradead.org/users/vkoul/slave-dma Pull dmaengine fixes from Vinod Koul: "Fixes in dmaengine drivers for: - dw-edma: endianess, _iomem type and stack usages - ste_dma40: unneeded variable and null-pointer dereference - tegra210-adma: unused function - omap-dma: off-by-one fix" * tag 'dmaengine-fix-5.3-rc5' of git://git.infradead.org/users/vkoul/slave-dma: omap-dma/omap_vout_vrfb: fix off-by-one fi value dmaengine: stm32-mdma: Fix a possible null-pointer dereference in stm32_mdma_irq_handler() dmaengine: tegra210-adma: Fix unused function warnings dmaengine: ste_dma40: fix unneeded variable warning dmaengine: dw-edma: fix endianess confusion dmaengine: dw-edma: fix __iomem type confusion dmaengine: dw-edma: fix unnecessary stack usage commit cfa0bb2aef998a64d5ad2c065be8511ad98d5d79 Merge: ec037ac244c0 19bce474c45b Author: Linus Torvalds Date: Fri Aug 16 08:49:45 2019 -0700 Merge tag 'sound-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "All small fixes targeted for stable: - Two fixes for USB-audio with malformed descriptor, spotted by fuzzers - Two fixes Conexant HD-audio codec wrt power management - Quirks for HD-audio AMD platform and HP laptop - HD-audio memory leak fix" * tag 'sound-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: usb-audio: Fix a stack buffer overflow bug in check_input_term ALSA: usb-audio: Fix an OOB bug in parse_audio_mixer_unit ALSA: hda - Add a generic reboot_notify ALSA: hda - Let all conexant codec enter D3 when rebooting ALSA: hda/realtek - Add quirk for HP Envy x360 ALSA: hda - Fix a memory leak bug ALSA: hda - Apply workaround for another AMD chip 1022:1487 commit ec037ac244c070f9eedcdf5cdb23bd817e7b8cf4 Merge: a69e90512d9d a85abd5d45ad Author: Linus Torvalds Date: Fri Aug 16 08:41:15 2019 -0700 Merge tag 'drm-fixes-2019-08-16' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Nothing too crazy this week, one amdgpu fix to use vmalloc for a struct that grew in size, and another MST fix for nouveau, and some other misc fixes: i915: - single GVT use after free fix scheduler: - entity destruction race fix amdgpu: - struct allocation fix - gfx9 soft recovery fix nouveau: - followup MST fix ast: - vga register race fix" * tag 'drm-fixes-2019-08-16' of git://anongit.freedesktop.org/drm/drm: drm/nouveau: Only recalculate PBN/VCPI on mode/connector changes drm/ast: Fixed reboot test may cause system hanged drm/scheduler: use job count instead of peek drm/amd/display: use kvmalloc for dc_state (v2) drm/amdgpu: fix gfx9 soft recovery drm/i915: Use after free in error path in intel_vgpu_create_workload() commit a53358a31c989c360ea59536d28762b9d2d68d19 Author: Jacopo Mondi Date: Mon Aug 5 18:18:37 2019 +0200 drm: rcar_lvds: Fix dual link mode operations The R-Car LVDS encoder units support dual-link operations by splitting the pixel output between the primary encoder and the companion encoder. Currently the companion encoder fails at probe time, causing the registration of the primary to fail as well, preventing the whole DU unit from being registered at all. Fix this by not bailing out from probe with error if the "renesas,companion" property is not specified. Fixes: fa440d870358 ("drm: rcar-du: lvds: Add support for dual-link mode") Reported-by: Fabrizio Castro Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart drivers/gpu/drm/rcar-du/rcar_lvds.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit a3ee2477c45f73184a64d9c6cf97855a52732dc6 Merge: 4eaefe8c621c 600f5badb78c Author: Rafael J. Wysocki Date: Fri Aug 16 14:24:51 2019 +0200 Merge branch 'pm-cpufreq' * pm-cpufreq: cpufreq: schedutil: Don't skip freq update when limits change cpufreq: dev_pm_qos_update_request() can return 1 on success commit a90118c445cc7f07781de26a9684d4ec58bfcfd1 Author: John Hubbard Date: Tue Jul 30 22:46:27 2019 -0700 x86/boot: Save fields explicitly, zero out everything else Recent gcc compilers (gcc 9.1) generate warnings about an out of bounds memset, if the memset goes accross several fields of a struct. This generated a couple of warnings on x86_64 builds in sanitize_boot_params(). Fix this by explicitly saving the fields in struct boot_params that are intended to be preserved, and zeroing all the rest. [ tglx: Tagged for stable as it breaks the warning free build there as well ] Suggested-by: Thomas Gleixner Suggested-by: H. Peter Anvin Signed-off-by: John Hubbard Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20190731054627.5627-2-jhubbard@nvidia.com arch/x86/include/asm/bootparam_utils.h | 63 ++++++++++++++++++++++++++-------- 1 file changed, 48 insertions(+), 15 deletions(-) commit 9cd02b09a0f4439e5323c20b710331771c2b6341 Merge: 01fd150f4aff 8676b3ca4673 Author: Greg Kroah-Hartman Date: Fri Aug 16 12:35:56 2019 +0200 Merge tag 'soundwire-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire into char-misc-linus Vinod writes: soundwire fixes for v5.3-rc5 Pierre sent fixes which are queued now for v5.3-rc5 are: - regmap dependecy - cadence register definitions * tag 'soundwire-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire: soundwire: fix regmap dependencies and align with other serial links soundwire: cadence_master: fix definitions for INTSTAT0/1 soundwire: cadence_master: fix register definition for SLAVE_STATE commit d34b044038bfb0e19caa8b019910efc465f41d5f Author: Quentin Monnet Date: Thu Aug 15 15:22:23 2019 +0100 tools: bpftool: close prog FD before exit on showing a single program When showing metadata about a single program by invoking "bpftool prog show PROG", the file descriptor referring to the program is not closed before returning from the function. Let's close it. Fixes: 71bb428fe2c1 ("tools: bpf: add bpftool") Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski Acked-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov tools/bpf/bpftool/prog.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit a85abd5d45adba75535b7fc6d9f78329a693b7a9 Merge: 2f62c5d6ed0a daa37200d489 Author: Dave Airlie Date: Fri Aug 16 12:41:52 2019 +1000 Merge tag 'drm-intel-fixes-2019-08-15' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes drm/i915 fixes for v5.4-rc5: - GVT use-after-free fix Signed-off-by: Dave Airlie From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87zhkag9ic.fsf@intel.com commit 480fd998bdcd7f77ea601303144811099a12a442 Merge: 12ed60151345 06d9532fa6b3 Author: David S. Miller Date: Thu Aug 15 16:33:22 2019 -0700 Merge tag 'rxrpc-fixes-20190814' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== rxrpc: Fix local endpoint handling Here's a pair of patches that fix two issues in the handling of local endpoints (rxrpc_local structs): (1) Use list_replace_init() rather than list_replace() if we're going to unconditionally delete the replaced item later, lest the list get corrupted. (2) Don't access the rxrpc_local object after passing our ref to the workqueue, not even to illuminate tracepoints, as the work function may cause the object to be freed. We have to cache the information beforehand. ==================== Signed-off-by: David S. Miller commit 12ed60151345f92d788ee2693824c1831c6c6cb2 Merge: 32d3182cd2cd dfe42be15fde Author: David S. Miller Date: Thu Aug 15 14:01:14 2019 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net This patchset contains Netfilter fixes for net: 1) Extend selftest to cover flowtable with ipsec, from Florian Westphal. 2) Fix interaction of ipsec with flowtable, also from Florian. 3) User-after-free with bound set to rule that fails to load. 4) Adjust state and timeout for flows that expire. 5) Timeout update race with flows in teardown state. 6) Ensure conntrack id hash calculation use invariants as input, from Dirk Morris. 7) Do not push flows into flowtable for TCP fin/rst packets. ==================== Signed-off-by: David S. Miller commit 32d3182cd2cd29b2e7e04df7b0db350fbe11289f Author: Eric Dumazet Date: Wed Aug 14 02:11:57 2019 -0700 net/packet: fix race in tpacket_snd() packet_sendmsg() checks tx_ring.pg_vec to decide if it must call tpacket_snd(). Problem is that the check is lockless, meaning another thread can issue a concurrent setsockopt(PACKET_TX_RING ) to flip tx_ring.pg_vec back to NULL. Given that tpacket_snd() grabs pg_vec_lock mutex, we can perform the check again to solve the race. syzbot reported : kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] PREEMPT SMP KASAN CPU: 1 PID: 11429 Comm: syz-executor394 Not tainted 5.3.0-rc4+ #101 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:packet_lookup_frame+0x8d/0x270 net/packet/af_packet.c:474 Code: c1 ee 03 f7 73 0c 80 3c 0e 00 0f 85 cb 01 00 00 48 8b 0b 89 c0 4c 8d 24 c1 48 b8 00 00 00 00 00 fc ff df 4c 89 e1 48 c1 e9 03 <80> 3c 01 00 0f 85 94 01 00 00 48 8d 7b 10 4d 8b 3c 24 48 b8 00 00 RSP: 0018:ffff88809f82f7b8 EFLAGS: 00010246 RAX: dffffc0000000000 RBX: ffff8880a45c7030 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 1ffff110148b8e06 RDI: ffff8880a45c703c RBP: ffff88809f82f7e8 R08: ffff888087aea200 R09: fffffbfff134ae50 R10: fffffbfff134ae4f R11: ffffffff89a5727f R12: 0000000000000000 R13: 0000000000000001 R14: ffff8880a45c6ac0 R15: 0000000000000000 FS: 00007fa04716f700(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fa04716edb8 CR3: 0000000091eb4000 CR4: 00000000001406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: packet_current_frame net/packet/af_packet.c:487 [inline] tpacket_snd net/packet/af_packet.c:2667 [inline] packet_sendmsg+0x590/0x6250 net/packet/af_packet.c:2975 sock_sendmsg_nosec net/socket.c:637 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:657 ___sys_sendmsg+0x3e2/0x920 net/socket.c:2311 __sys_sendmmsg+0x1bf/0x4d0 net/socket.c:2413 __do_sys_sendmmsg net/socket.c:2442 [inline] __se_sys_sendmmsg net/socket.c:2439 [inline] __x64_sys_sendmmsg+0x9d/0x100 net/socket.c:2439 do_syscall_64+0xfd/0x6a0 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe Fixes: 69e3c75f4d54 ("net: TX_RING and packet mmap") Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David S. Miller net/packet/af_packet.c | 7 +++++++ 1 file changed, 7 insertions(+) commit bebd6997163addc1938db8c61754a23ffdf8ccc4 Author: J. Bruce Fields Date: Thu Aug 15 16:18:26 2019 -0400 nfsd: initialize i_private before d_add A process could race in an open and attempt to read one of these files before i_private is initialized, and get a spurious error. Reported-by: Al Viro Signed-off-by: J. Bruce Fields fs/nfsd/nfsctl.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 5729b6e5a1bcb0bbc28abe82d749c7392f66d2c7 Author: Mikulas Patocka Date: Sat Aug 10 12:30:27 2019 -0400 dm integrity: fix a crash due to BUG_ON in __journal_read_write() Fix a crash that was introduced by the commit 724376a04d1a. The crash is reported here: https://gitlab.com/cryptsetup/cryptsetup/issues/468 When reading from the integrity device, the function dm_integrity_map_continue calls find_journal_node to find out if the location to read is present in the journal. Then, it calculates how many sectors are consecutively stored in the journal. Then, it locks the range with add_new_range and wait_and_add_new_range. The problem is that during wait_and_add_new_range, we hold no locks (we don't hold ic->endio_wait.lock and we don't hold a range lock), so the journal may change arbitrarily while wait_and_add_new_range sleeps. The code then goes to __journal_read_write and hits BUG_ON(journal_entry_get_sector(je) != logical_sector); because the journal has changed. In order to fix this bug, we need to re-check the journal location after wait_and_add_new_range. We restrict the length to one block in order to not complicate the code too much. Fixes: 724376a04d1a ("dm integrity: implement fair range locks") Cc: stable@vger.kernel.org # v4.19+ Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer drivers/md/dm-integrity.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit ad1bd578bd5afdf20de0bead42d25f199601211d Author: Dmitry Fomichev Date: Fri Aug 2 15:02:51 2019 -0700 dm zoned: fix a few typos Signed-off-by: Dmitry Fomichev Reviewed-by: Damien Le Moal Signed-off-by: Mike Snitzer drivers/md/dm-zoned-metadata.c | 8 ++++---- drivers/md/dm-zoned-reclaim.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) commit bae9a0aa331d4cc20bd73c11f91abfceda4b7b29 Author: Dmitry Fomichev Date: Fri Aug 2 15:02:50 2019 -0700 dm zoned: add SPDX license identifiers Signed-off-by: Dmitry Fomichev Reviewed-by: Damien Le Moal Signed-off-by: Mike Snitzer drivers/md/dm-zoned-metadata.c | 1 + drivers/md/dm-zoned-reclaim.c | 1 + drivers/md/dm-zoned-target.c | 1 + drivers/md/dm-zoned.h | 1 + 4 files changed, 4 insertions(+) commit 75d66ffb48efb30f2dd42f041ba8b39c5b2bd115 Author: Dmitry Fomichev Date: Sat Aug 10 14:43:11 2019 -0700 dm zoned: properly handle backing device failure dm-zoned is observed to lock up or livelock in case of hardware failure or some misconfiguration of the backing zoned device. This patch adds a new dm-zoned target function that checks the status of the backing device. If the request queue of the backing device is found to be in dying state or the SCSI backing device enters offline state, the health check code sets a dm-zoned target flag prompting all further incoming I/O to be rejected. In order to detect backing device failures timely, this new function is called in the request mapping path, at the beginning of every reclaim run and before performing any metadata I/O. The proper way out of this situation is to do dmsetup remove and recreate the target when the problem with the backing device is resolved. Fixes: 3b1a94c88b79 ("dm zoned: drive-managed zoned block device target") Cc: stable@vger.kernel.org Signed-off-by: Dmitry Fomichev Reviewed-by: Damien Le Moal Signed-off-by: Mike Snitzer drivers/md/dm-zoned-metadata.c | 51 +++++++++++++++++++++++++++++++++--------- drivers/md/dm-zoned-reclaim.c | 18 +++++++++++++-- drivers/md/dm-zoned-target.c | 45 +++++++++++++++++++++++++++++++++++-- drivers/md/dm-zoned.h | 10 +++++++++ 4 files changed, 110 insertions(+), 14 deletions(-) commit d7428c50118e739e672656c28d2b26b09375d4e0 Author: Dmitry Fomichev Date: Sat Aug 10 14:43:10 2019 -0700 dm zoned: improve error handling in i/o map code Some errors are ignored in the I/O path during queueing chunks for processing by chunk works. Since at least these errors are transient in nature, it should be possible to retry the failed incoming commands. The fix - Errors that can happen while queueing chunks are carried upwards to the main mapping function and it now returns DM_MAPIO_REQUEUE for any incoming requests that can not be properly queued. Error logging/debug messages are added where needed. Fixes: 3b1a94c88b79 ("dm zoned: drive-managed zoned block device target") Cc: stable@vger.kernel.org Signed-off-by: Dmitry Fomichev Reviewed-by: Damien Le Moal Signed-off-by: Mike Snitzer drivers/md/dm-zoned-target.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) commit b234c6d7a703661b5045c5bf569b7c99d2edbf88 Author: Dmitry Fomichev Date: Sat Aug 10 14:43:09 2019 -0700 dm zoned: improve error handling in reclaim There are several places in reclaim code where errors are not propagated to the main function, dmz_reclaim(). This function is responsible for unlocking zones that might be still locked at the end of any failed reclaim iterations. As the result, some device zones may be left permanently locked for reclaim, degrading target's capability to reclaim zones. This patch fixes these issues as follows - Make sure that dmz_reclaim_buf(), dmz_reclaim_seq_data() and dmz_reclaim_rnd_data() return error codes to the caller. dmz_reclaim() function is renamed to dmz_do_reclaim() to avoid clashing with "struct dmz_reclaim" and is modified to return the error to the caller. dmz_get_zone_for_reclaim() now returns an error instead of NULL pointer and reclaim code checks for that error. Error logging/debug messages are added where necessary. Fixes: 3b1a94c88b79 ("dm zoned: drive-managed zoned block device target") Cc: stable@vger.kernel.org Signed-off-by: Dmitry Fomichev Reviewed-by: Damien Le Moal Signed-off-by: Mike Snitzer drivers/md/dm-zoned-metadata.c | 4 ++-- drivers/md/dm-zoned-reclaim.c | 28 +++++++++++++++++++--------- 2 files changed, 21 insertions(+), 11 deletions(-) commit d1fef41465f0e8cae0693fb184caa6bfafb6cd16 Author: Dmitry Fomichev Date: Mon Aug 5 16:56:03 2019 -0700 dm kcopyd: always complete failed jobs This patch fixes a problem in dm-kcopyd that may leave jobs in complete queue indefinitely in the event of backing storage failure. This behavior has been observed while running 100% write file fio workload against an XFS volume created on top of a dm-zoned target device. If the underlying storage of dm-zoned goes to offline state under I/O, kcopyd sometimes never issues the end copy callback and dm-zoned reclaim work hangs indefinitely waiting for that completion. This behavior was traced down to the error handling code in process_jobs() function that places the failed job to complete_jobs queue, but doesn't wake up the job handler. In case of backing device failure, all outstanding jobs may end up going to complete_jobs queue via this code path and then stay there forever because there are no more successful I/O jobs to wake up the job handler. This patch adds a wake() call to always wake up kcopyd job wait queue for all I/O jobs that fail before dm_io() gets called for that job. The patch also sets the write error status in all sub jobs that are failed because their master job has failed. Fixes: b73c67c2cbb00 ("dm kcopyd: add sequential write feature") Cc: stable@vger.kernel.org Signed-off-by: Dmitry Fomichev Reviewed-by: Damien Le Moal Signed-off-by: Mike Snitzer drivers/md/dm-kcopyd.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit cf3591ef832915892f2499b7e54b51d4c578b28c Author: Mikulas Patocka Date: Thu Aug 8 05:40:04 2019 -0400 Revert "dm bufio: fix deadlock with loop device" Revert the commit bd293d071ffe65e645b4d8104f9d8fe15ea13862. The proper fix has been made available with commit d0a255e795ab ("loop: set PF_MEMALLOC_NOIO for the worker thread"). Note that the fix offered by commit bd293d071ffe doesn't really prevent the deadlock from occuring - if we look at the stacktrace reported by Junxiao Bi, we see that it hangs in bit_wait_io and not on the mutex - i.e. it has already successfully taken the mutex. Changing the mutex from mutex_lock to mutex_trylock won't help with deadlocks that happen afterwards. PID: 474 TASK: ffff8813e11f4600 CPU: 10 COMMAND: "kswapd0" #0 [ffff8813dedfb938] __schedule at ffffffff8173f405 #1 [ffff8813dedfb990] schedule at ffffffff8173fa27 #2 [ffff8813dedfb9b0] schedule_timeout at ffffffff81742fec #3 [ffff8813dedfba60] io_schedule_timeout at ffffffff8173f186 #4 [ffff8813dedfbaa0] bit_wait_io at ffffffff8174034f #5 [ffff8813dedfbac0] __wait_on_bit at ffffffff8173fec8 #6 [ffff8813dedfbb10] out_of_line_wait_on_bit at ffffffff8173ff81 #7 [ffff8813dedfbb90] __make_buffer_clean at ffffffffa038736f [dm_bufio] #8 [ffff8813dedfbbb0] __try_evict_buffer at ffffffffa0387bb8 [dm_bufio] #9 [ffff8813dedfbbd0] dm_bufio_shrink_scan at ffffffffa0387cc3 [dm_bufio] #10 [ffff8813dedfbc40] shrink_slab at ffffffff811a87ce #11 [ffff8813dedfbd30] shrink_zone at ffffffff811ad778 #12 [ffff8813dedfbdc0] kswapd at ffffffff811ae92f #13 [ffff8813dedfbec0] kthread at ffffffff810a8428 #14 [ffff8813dedfbf50] ret_from_fork at ffffffff81745242 Signed-off-by: Mikulas Patocka Cc: stable@vger.kernel.org Fixes: bd293d071ffe ("dm bufio: fix deadlock with loop device") Depends-on: d0a255e795ab ("loop: set PF_MEMALLOC_NOIO for the worker thread") Signed-off-by: Mike Snitzer drivers/md/dm-bufio.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 19bce474c45be69a284ecee660aa12d8f1e88f18 Author: Hui Peng Date: Thu Aug 15 00:31:34 2019 -0400 ALSA: usb-audio: Fix a stack buffer overflow bug in check_input_term `check_input_term` recursively calls itself with input from device side (e.g., uac_input_terminal_descriptor.bCSourceID) as argument (id). In `check_input_term`, if `check_input_term` is called with the same `id` argument as the caller, it triggers endless recursive call, resulting kernel space stack overflow. This patch fixes the bug by adding a bitmap to `struct mixer_build` to keep track of the checked ids and stop the execution if some id has been checked (similar to how parse_audio_unit handles unitid argument). Reported-by: Hui Peng Reported-by: Mathias Payer Signed-off-by: Hui Peng Cc: Signed-off-by: Takashi Iwai sound/usb/mixer.c | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) commit 20fb7c7a39b5c719e2e619673b5f5729ee7d2306 Author: Wenwen Wang Date: Wed Aug 14 01:38:39 2019 -0500 net: myri10ge: fix memory leaks In myri10ge_probe(), myri10ge_alloc_slices() is invoked to allocate slices related structures. Later on, myri10ge_request_irq() is used to get an irq. However, if this process fails, the allocated slices related structures are not deallocated, leading to memory leaks. To fix this issue, revise the target label of the goto statement to 'abort_with_slices'. Signed-off-by: Wenwen Wang Signed-off-by: David S. Miller drivers/net/ethernet/myricom/myri10ge/myri10ge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d85f01775850a35eae47a0090839baf510c1ef12 Author: John Fastabend Date: Wed Aug 14 05:31:54 2019 +0000 net: tls, fix sk_write_space NULL write when tx disabled The ctx->sk_write_space pointer is only set when TLS tx mode is enabled. When running without TX mode its a null pointer but we still set the sk sk_write_space pointer on close(). Fix the close path to only overwrite sk->sk_write_space when the current pointer is to the tls_write_space function indicating the tls module should clean it up properly as well. Reported-by: Hillf Danton Cc: Ying Xue Cc: Andrey Konovalov Fixes: 57c722e932cfb ("net/tls: swap sk_write_space on close") Signed-off-by: John Fastabend Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller net/tls/tls_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6f967f8b1be7001b31c46429f2ee7d275af2190f Author: Wenwen Wang Date: Wed Aug 14 00:14:49 2019 -0500 liquidio: add cleanup in octeon_setup_iq() If oct->fn_list.enable_io_queues() fails, no cleanup is executed, leading to memory/resource leaks. To fix this issue, invoke octeon_delete_instr_queue() before returning from the function. Signed-off-by: Wenwen Wang Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/request_manager.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit a69e90512d9def6bd8064d84cff9ffd8b15eaa1b Merge: 4ec1fa692dc7 8612de3f7ba6 Author: Linus Torvalds Date: Thu Aug 15 12:29:36 2019 -0700 Merge tag 'xfs-5.3-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fixes from Darrick Wong: - Fix crashes when the attr fork isn't present due to errors but inode inactivation tries to zap the attr data anyway. - Convert more directory corruption debugging asserts to actual EFSCORRUPTED returns instead of blowing up later on. - Don't fail writeback just because we ran out of memory allocating metadata log data. * tag 'xfs-5.3-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: don't crash on null attr fork xfs_bmapi_read xfs: remove more ondisk directory corruption asserts fs: xfs: xfs_log: Don't use KM_MAYFAIL at xfs_log_reserve(). commit 4ec1fa692dc7dc915c3485a7fad928924fc13de2 Merge: 329120423947 9a67b72552f8 Author: Linus Torvalds Date: Thu Aug 15 12:15:45 2019 -0700 Merge tag 'iomap-5.3-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull iomap fixlet from Darrick Wong: "A single update to the MAINTAINERS entry for iomap now that we've removed fs/iomap.c" * tag 'iomap-5.3-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: MAINTAINERS: iomap: Remove fs/iomap.c record commit 0b24a441765527c797ef3bdb2a539547e0df9a7e Merge: 2aafdf5a5786 f43d48d10a42 Author: David S. Miller Date: Thu Aug 15 12:09:39 2019 -0700 Merge tag 'mlx5-fixes-2019-08-15' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== Mellanox, mlx5 fixes 2019-08-15 This series introduces two fixes to mlx5 driver. 1) Eran fixes a compatibility issue with ethtool flash. 2) Maxim fixes a race in XSK wakeup flow. Please pull and let me know if there is any problem. ==================== Signed-off-by: David S. Miller commit dc46bba709cfb45e4b2d40cf45aaeacb82690504 Author: J. Bruce Fields Date: Wed Aug 14 21:57:37 2019 -0400 nfsd: use i_wrlock instead of rcu for nfsdfs i_private synchronize_rcu() gets called multiple times each time a client is destroyed. If the laundromat thread has a lot of clients to destroy, the delay can be noticeable. This was causing pynfs test RENEW3 to fail. We could embed an rcu_head in each inode and do the kref_put in an rcu callback. But simplest is just to take a lock here. (I also wonder if the laundromat thread would be better replaced by a bunch of scheduled work or timers or something.) Signed-off-by: J. Bruce Fields fs/nfsd/nfsctl.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit d6846bfbeeac873d85f32bd2b988fa94c89dbcb8 Author: Tetsuo Handa Date: Mon Aug 12 11:16:11 2019 +0900 nfsd: fix dentry leak upon mkdir failure. syzbot is reporting that nfsd_mkdir() forgot to remove dentry created by d_alloc_name() when __nfsd_mkdir() failed (due to memory allocation fault injection) [1]. [1] https://syzkaller.appspot.com/bug?id=ce41a1f769ea4637ebffedf004a803e8405b4674 Signed-off-by: Tetsuo Handa Reported-by: syzbot Fixes: e8a79fb14f6b76b5 ("nfsd: add nfsd/clients directory") [bfields: clean up in nfsd_mkdir instead of __nfsd_mkdir] Signed-off-by: J. Bruce Fields fs/nfsd/nfsctl.c | 1 + 1 file changed, 1 insertion(+) commit f43d48d10a42787c1de1d3facd7db210c91db1da Author: Eran Ben Elisha Date: Thu Aug 1 14:27:30 2019 +0300 net/mlx5e: Fix compatibility issue with ethtool flash device Cited patch deleted ethtool flash device support, as ethtool core can fallback into devlink flash callback. However, this is supported only if there is a devlink port registered over the corresponding netdevice. As mlx5e do not have devlink port support over native netdevice, it broke the ability to flash device via ethtool. This patch re-add the ethtool callback to avoid user functionality breakage when trying to flash device via ethtool. Fixes: 9c8bca2637b8 ("mlx5: Move firmware flash implementation to devlink") Signed-off-by: Eran Ben Elisha Acked-by: Jiri Pirko Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 ++ .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 35 ++++++++++++++++++++++ .../ethernet/mellanox/mlx5/core/ipoib/ethtool.c | 9 ++++++ 3 files changed, 46 insertions(+) commit e0d57d9c7e7a223f3c2ff8b7b63ec1bf63f11ed4 Author: Maxim Mikityanskiy Date: Fri Aug 2 14:42:14 2019 +0300 net/mlx5e: Fix a race with XSKICOSQ in XSK wakeup flow Add a missing spinlock around XSKICOSQ usage at the activation stage, because there is a race between a configuration change and the application calling sendto(). Fixes: db05815b36cb ("net/mlx5e: Add XSK zero-copy support") Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en/xsk/setup.c | 3 +++ 1 file changed, 3 insertions(+) commit 2aafdf5a5786ebbd8ccfe132ed6267c6962c5c3c Author: Anders Roxell Date: Thu Aug 15 09:58:26 2019 +0200 selftests: net: tcp_fastopen_backup_key.sh: fix shellcheck issue When running tcp_fastopen_backup_key.sh the following issue was seen in a busybox environment. ./tcp_fastopen_backup_key.sh: line 33: [: -ne: unary operator expected Shellcheck showed the following issue. $ shellcheck tools/testing/selftests/net/tcp_fastopen_backup_key.sh In tools/testing/selftests/net/tcp_fastopen_backup_key.sh line 33: if [ $val -ne 0 ]; then ^-- SC2086: Double quote to prevent globbing and word splitting. Rework to do a string comparison instead. Signed-off-by: Anders Roxell Signed-off-by: David S. Miller tools/testing/selftests/net/tcp_fastopen_backup_key.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a982eeb09b6030e567b8b815277c8c9197168040 Author: Jackie Liu Date: Wed Aug 14 17:35:22 2019 +0800 io_uring: fix an issue when IOSQE_IO_LINK is inserted into defer list This patch may fix two issues: First, when IOSQE_IO_DRAIN set, the next IOs need to be inserted into defer list to delay execution, but link io will be actively scheduled to run by calling io_queue_sqe. Second, when multiple LINK_IOs are inserted together with defer_list, the LINK_IO is no longer keep order. |-------------| | LINK_IO | ----> insert to defer_list ----------- |-------------| | | LINK_IO | ----> insert to defer_list ----------| |-------------| | | LINK_IO | ----> insert to defer_list ----------| |-------------| | | NORMAL_IO | ----> insert to defer_list ----------| |-------------| | | queue_work at same time <-----| Fixes: 9e645e1105c ("io_uring: add support for sqe links") Signed-off-by: Jackie Liu Signed-off-by: Jens Axboe fs/io_uring.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 7bafda88de20b2990461d253c5475007436e355c Author: Bjorn Helgaas Date: Thu Aug 15 12:12:38 2019 -0500 Documentation PCI: Fix pciebus-howto.rst filename typo 2e6422444894 ("Documentation: PCI: convert PCIEBUS-HOWTO.txt to reST") incorrectly renamed PCIEBUS-HOWTO.txt to picebus-howto.rst. Rename it to pciebus-howto.rst. Fixes: 2e6422444894 ("Documentation: PCI: convert PCIEBUS-HOWTO.txt to reST") Signed-off-by: Bjorn Helgaas Documentation/PCI/index.rst | 2 +- Documentation/PCI/{picebus-howto.rst => pciebus-howto.rst} | 0 2 files changed, 1 insertion(+), 1 deletion(-) commit 7b6620d7db566a46f49b4b9deab9fa061fd4b59b Author: Jens Axboe Date: Thu Aug 15 11:09:16 2019 -0600 block: remove REQ_NOWAIT_INLINE We had a few issues with this code, and there's still a problem around how we deal with error handling for chained/split bios. For now, just revert the code and we'll try again with a thoroug solution. This reverts commits: e15c2ffa1091 ("block: fix O_DIRECT error handling for bio fragments") 0eb6ddfb865c ("block: Fix __blkdev_direct_IO() for bio fragments") 6a43074e2f46 ("block: properly handle IOCB_NOWAIT for async O_DIRECT IO") 893a1c97205a ("blk-mq: allow REQ_NOWAIT to return an error inline") Signed-off-by: Jens Axboe block/blk-mq.c | 8 ++------ fs/block_dev.c | 49 +++++------------------------------------------ include/linux/blk_types.h | 5 +---- 3 files changed, 8 insertions(+), 54 deletions(-) commit 99c79f6692ccdc42e04deea8a36e22bb48168a62 Author: Aleix Roca Nonell Date: Thu Aug 15 14:03:22 2019 +0200 io_uring: fix manual setup of iov_iter for fixed buffers Commit bd11b3a391e3 ("io_uring: don't use iov_iter_advance() for fixed buffers") introduced an optimization to avoid using the slow iov_iter_advance by manually populating the iov_iter iterator in some cases. However, the computation of the iterator count field was erroneous: The first bvec was always accounted for an extent of page size even if the bvec length was smaller. In consequence, some I/O operations on fixed buffers were unable to operate on the full extent of the buffer, consistently skipping some bytes at the end of it. Fixes: bd11b3a391e3 ("io_uring: don't use iov_iter_advance() for fixed buffers") Cc: stable@vger.kernel.org Signed-off-by: Aleix Roca Nonell Signed-off-by: Jens Axboe fs/io_uring.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit ad54567ad5d8e938ee6cf02e4f3867f18835ae6e Author: Lyude Paul Date: Thu Aug 1 18:01:17 2019 -0400 PCI: Reset both NVIDIA GPU and HDA in ThinkPad P50 workaround quirk_reset_lenovo_thinkpad_50_nvgpu() resets NVIDIA GPUs to work around an apparent BIOS defect. It previously used pci_reset_function(), and the available method was a bus reset, which was fine because there was only one function on the bus. After b516ea586d71 ("PCI: Enable NVIDIA HDA controllers"), there are now two functions (the HDA controller and the GPU itself) on the bus, so the reset fails. Use pci_reset_bus() explicitly instead of pci_reset_function() since it's OK to reset both devices. [bhelgaas: commit log, add e0547c81bfcf] Fixes: b516ea586d71 ("PCI: Enable NVIDIA HDA controllers") Fixes: e0547c81bfcf ("PCI: Reset Lenovo ThinkPad P50 nvgpu at boot if necessary") Link: https://lore.kernel.org/r/20190801220117.14952-1-lyude@redhat.com Signed-off-by: Lyude Paul Signed-off-by: Bjorn Helgaas Acked-by: Ben Skeggs Cc: Lukas Wunner Cc: Daniel Drake Cc: Aaron Plattner Cc: Peter Wu Cc: Ilia Mirkin Cc: Karol Herbst Cc: Maik Freudenberg drivers/pci/quirks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 329120423947e8b36fd2f8b5cf69944405d0aece Merge: 2b245b8b033a 6c4d6bc54864 Author: Linus Torvalds Date: Thu Aug 15 09:20:17 2019 -0700 Merge tag 'auxdisplay-for-linus-v5.3-rc5' of git://github.com/ojeda/linux Pull auxdisplay fixes from Miguel Ojeda: "A few minor auxdisplay improvements: - A couple of small header cleanups for charlcd (Masahiro Yamada) - A trivial typo fix for the examples of cfag12864b (Masahiro Yamada) - An Kconfig help text improvement for charlcd (Mans Rullgard) - An error path fix for panel (zhengbin)" * tag 'auxdisplay-for-linus-v5.3-rc5' of git://github.com/ojeda/linux: auxdisplay: Fix a typo in cfag12864b-example.c auxdisplay: charlcd: add include guard to charlcd.h auxdisplay: charlcd: move charlcd.h to drivers/auxdisplay auxdisplay: charlcd: add help text for backlight initial state auxdisplay: panel: need to delete scan_timer when misc_register fails in panel_attach commit 2b245b8b033a90c6373400a29ec93a8713601eff Merge: 41de59634046 83f82d7a4258 Author: Linus Torvalds Date: Thu Aug 15 09:18:56 2019 -0700 Merge tag 'devicetree-fixes-for-5.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull devicetree fixes from Rob Herring: - Fix building DT binding examples for in tree builds - Correct some refcounting in adjust_local_phandle_references() - Update FSL FEC binding with deprecated properties - Schema fix in stm32 pinctrl - Fix typo in of_irq_parse_one docbook comment * tag 'devicetree-fixes-for-5.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: of: irq: fix a trivial typo in a doc comment dt-bindings: pinctrl: stm32: Fix 'st,syscfg' schema dt-bindings: fec: explicitly mark deprecated properties of: resolver: Add of_node_put() before return and break dt-bindings: Fix generated example files getting added to schemas commit 01fd150f4aff5bee03db5bda3b94c1bdbe9c6375 Author: Randy Dunlap Date: Tue Aug 13 16:01:20 2019 -0700 misc: xilinx-sdfec: fix dependency and build error lib/devres.c, which implements devm_ioremap_resource(), is only built when CONFIG_HAS_IOMEM is set/enabled, so XILINX_SDFEC should depend on HAS_IOMEM. Fixes this build error (as seen on UML builds): ERROR: "devm_ioremap_resource" [drivers/misc/xilinx_sdfec.ko] undefined! Fixes: 76d83e1c3233 ("misc: xilinx-sdfec: add core driver") Signed-off-by: Randy Dunlap Cc: Derek Kiernan Cc: Dragan Cvetic Cc: Greg Kroah-Hartman Cc: Geert Uytterhoeven Cc: Arnd Bergmann Link: https://lore.kernel.org/r/f9004be5-9925-327b-3ec2-6506e46fe565@infradead.org Signed-off-by: Greg Kroah-Hartman drivers/misc/Kconfig | 1 + 1 file changed, 1 insertion(+) commit edfbcb321faf07ca970e4191abe061deeb7d3788 Author: Christoph Hellwig Date: Sun Aug 11 10:05:16 2019 +0200 usb: add a hcd_uses_dma helper The USB buffer allocation code is the only place in the usb core (and in fact the whole kernel) that uses is_device_dma_capable, while the URB mapping code uses the uses_dma flag in struct usb_bus. Switch the buffer allocation to use the uses_dma flag used by the rest of the USB code, and create a helper in hcd.h that checks this flag as well as the CONFIG_HAS_DMA to simplify the caller a bit. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20190811080520.21712-3-hch@lst.de Signed-off-by: Greg Kroah-Hartman drivers/usb/core/buffer.c | 10 +++------- drivers/usb/core/hcd.c | 4 ++-- drivers/usb/dwc2/hcd.c | 2 +- include/linux/usb.h | 2 +- include/linux/usb/hcd.h | 3 +++ 5 files changed, 10 insertions(+), 11 deletions(-) commit dd3ecf17ba70a70d2c9ef9ba725281b84f8eef12 Author: Christoph Hellwig Date: Sun Aug 11 10:05:15 2019 +0200 usb: don't create dma pools for HCDs with a localmem_pool If the HCD provides a localmem pool we will never use the DMA pools, so don't create them. Fixes: b0310c2f09bb ("USB: use genalloc for USB HCs with local memory") Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20190811080520.21712-2-hch@lst.de Signed-off-by: Greg Kroah-Hartman drivers/usb/core/buffer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 141822aa3f79efc8a2ec3ed464f2fd2c93ccd803 Author: André Draszik Date: Sat Aug 10 16:07:58 2019 +0100 usb: chipidea: imx: fix EPROBE_DEFER support during driver probe If driver probe needs to be deferred, e.g. because ci_hdrc_add_device() isn't ready yet, this driver currently misbehaves badly: a) success is still reported to the driver core (meaning a 2nd probe attempt will never be done), leaving the driver in a dysfunctional state and the hardware unusable b) driver remove / shutdown OOPSes: [ 206.786916] Unable to handle kernel paging request at virtual address fffffdff [ 206.794148] pgd = 880b9f82 [ 206.796890] [fffffdff] *pgd=abf5e861, *pte=00000000, *ppte=00000000 [ 206.803179] Internal error: Oops: 37 [#1] PREEMPT SMP ARM [ 206.808581] Modules linked in: wl18xx evbug [ 206.813308] CPU: 1 PID: 1 Comm: systemd-shutdow Not tainted 4.19.35+gf345c93b4195 #1 [ 206.821053] Hardware name: Freescale i.MX7 Dual (Device Tree) [ 206.826813] PC is at ci_hdrc_remove_device+0x4/0x20 [ 206.831699] LR is at ci_hdrc_imx_remove+0x20/0xe8 [ 206.836407] pc : [<805cd4b0>] lr : [<805d62cc>] psr: 20000013 [ 206.842678] sp : a806be40 ip : 00000001 fp : 80adbd3c [ 206.847906] r10: 80b1b794 r9 : 80d5dfe0 r8 : a8192c44 [ 206.853136] r7 : 80db93a0 r6 : a8192c10 r5 : a8192c00 r4 : a93a4a00 [ 206.859668] r3 : 00000000 r2 : a8192ce4 r1 : ffffffff r0 : fffffdfb [ 206.866201] Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none [ 206.873341] Control: 10c5387d Table: a9e0c06a DAC: 00000051 [ 206.879092] Process systemd-shutdow (pid: 1, stack limit = 0xb271353c) [ 206.885624] Stack: (0xa806be40 to 0xa806c000) [ 206.889992] be40: a93a4a00 805d62cc a8192c1c a8170e10 a8192c10 8049a490 80d04d08 00000000 [ 206.898179] be60: 00000000 80d0da2c fee1dead 00000000 a806a000 00000058 00000000 80148b08 [ 206.906366] be80: 01234567 80148d8c a9858600 00000000 00000000 00000000 00000000 80d04d08 [ 206.914553] bea0: 00000000 00000000 a82741e0 a9858600 00000024 00000002 a9858608 00000005 [ 206.922740] bec0: 0000001e 8022c058 00000000 00000000 a806bf14 a9858600 00000000 a806befc [ 206.930927] bee0: a806bf78 00000000 7ee12c30 8022c18c a806bef8 a806befc 00000000 00000001 [ 206.939115] bf00: 00000000 00000024 a806bf14 00000005 7ee13b34 7ee12c68 00000004 7ee13f20 [ 206.947302] bf20: 00000010 7ee12c7c 00000005 7ee12d04 0000000a 76e7dc00 00000001 80d0f140 [ 206.955490] bf40: ab637880 a974de40 60000013 80d0f140 ab6378a0 80d04d08 a8080470 a9858600 [ 206.963677] bf60: a9858600 00000000 00000000 8022c24c 00000000 80144310 00000000 00000000 [ 206.971864] bf80: 80101204 80d04d08 00000000 80d04d08 00000000 00000000 00000003 00000058 [ 206.980051] bfa0: 80101204 80101000 00000000 00000000 fee1dead 28121969 01234567 00000000 [ 206.988237] bfc0: 00000000 00000000 00000003 00000058 00000000 00000000 00000000 00000000 [ 206.996425] bfe0: 0049ffb0 7ee13d58 0048a84b 76f245a6 60000030 fee1dead 00000000 00000000 [ 207.004622] [<805cd4b0>] (ci_hdrc_remove_device) from [<805d62cc>] (ci_hdrc_imx_remove+0x20/0xe8) [ 207.013509] [<805d62cc>] (ci_hdrc_imx_remove) from [<8049a490>] (device_shutdown+0x16c/0x218) [ 207.022050] [<8049a490>] (device_shutdown) from [<80148b08>] (kernel_restart+0xc/0x50) [ 207.029980] [<80148b08>] (kernel_restart) from [<80148d8c>] (sys_reboot+0xf4/0x1f0) [ 207.037648] [<80148d8c>] (sys_reboot) from [<80101000>] (ret_fast_syscall+0x0/0x54) [ 207.045308] Exception stack(0xa806bfa8 to 0xa806bff0) [ 207.050368] bfa0: 00000000 00000000 fee1dead 28121969 01234567 00000000 [ 207.058554] bfc0: 00000000 00000000 00000003 00000058 00000000 00000000 00000000 00000000 [ 207.066737] bfe0: 0049ffb0 7ee13d58 0048a84b 76f245a6 [ 207.071799] Code: ebffffa8 e3a00000 e8bd8010 e92d4010 (e5904004) [ 207.078021] ---[ end trace be47424e3fd46e9f ]--- [ 207.082647] Kernel panic - not syncing: Fatal exception [ 207.087894] ---[ end Kernel panic - not syncing: Fatal exception ]--- c) the error path in combination with driver removal causes imbalanced calls to the clk_*() and pm_()* APIs a) happens because the original intended return value is overwritten (with 0) by the return code of regulator_disable() in ci_hdrc_imx_probe()'s error path b) happens because ci_pdev is -EPROBE_DEFER, which causes ci_hdrc_remove_device() to OOPS Fix a) by being more careful in ci_hdrc_imx_probe()'s error path and not overwriting the real error code Fix b) by calling the respective cleanup functions during remove only when needed (when ci_pdev != NULL, i.e. when everything was initialised correctly). This also has the side effect of not causing imbalanced clk_*() and pm_*() API calls as part of the error code path. Fixes: 7c8e8909417e ("usb: chipidea: imx: add HSIC support") Signed-off-by: André Draszik Cc: stable CC: Peter Chen CC: Greg Kroah-Hartman CC: Shawn Guo CC: Sascha Hauer CC: Pengutronix Kernel Team CC: Fabio Estevam CC: NXP Linux Team CC: linux-usb@vger.kernel.org CC: linux-arm-kernel@lists.infradead.org CC: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/20190810150758.17694-1-git@andred.net Signed-off-by: Greg Kroah-Hartman drivers/usb/chipidea/ci_hdrc_imx.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit 777758888ffe59ef754cc39ab2f275dc277732f4 Author: Hans Ulli Kroll Date: Sat Aug 10 17:04:58 2019 +0200 usb: host: fotg2: restart hcd after port reset On the Gemini SoC the FOTG2 stalls after port reset so restart the HCD after each port reset. Signed-off-by: Hans Ulli Kroll Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20190810150458.817-1-linus.walleij@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/usb/host/fotg210-hcd.c | 4 ++++ 1 file changed, 4 insertions(+) commit 54364278fb3cabdea51d6398b07c87415065b3fc Author: Oliver Neukum Date: Tue Aug 13 11:35:41 2019 +0200 USB: CDC: fix sanity checks in CDC union parser A few checks checked for the size of the pointer to a structure instead of the structure itself. Copy & paste issue presumably. Fixes: e4c6fb7794982 ("usbnet: move the CDC parser into USB core") Cc: stable Reported-by: syzbot+45a53506b65321c1fe91@syzkaller.appspotmail.com Signed-off-by: Oliver Neukum Link: https://lore.kernel.org/r/20190813093541.18889-1-oneukum@suse.com Signed-off-by: Greg Kroah-Hartman drivers/usb/core/message.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c52873e5a1ef72f845526d9f6a50704433f9c625 Author: Oliver Neukum Date: Thu Aug 8 16:21:19 2019 +0200 usb: cdc-acm: make sure a refcount is taken early enough destroy() will decrement the refcount on the interface, so that it needs to be taken so early that it never undercounts. Fixes: 7fb57a019f94e ("USB: cdc-acm: Fix potential deadlock (lockdep warning)") Cc: stable Reported-and-tested-by: syzbot+1b2449b7b5dc240d107a@syzkaller.appspotmail.com Signed-off-by: Oliver Neukum Link: https://lore.kernel.org/r/20190808142119.7998-1-oneukum@suse.com Signed-off-by: Greg Kroah-Hartman drivers/usb/class/cdc-acm.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 305cd70ec311be420cc9154e77427dd9aaa0b7bc Merge: c372740c070a dc7f2cb218b5 Author: Arnd Bergmann Date: Thu Aug 15 14:46:43 2019 +0200 Merge tag 'amlogic-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into arm/fixes arm64: dts: Amlogic fixes for v5.3-rc - a few small DT fixes for g12a/g12b platforms * tag 'amlogic-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: arm64: dts: amlogic: odroid-n2: keep SD card regulator always on arm64: dts: meson-g12a-sei510: enable IR controller arm64: dts: meson-g12a: add missing dwc2 phy-names commit c372740c070addb565bbd6837e2f750bdf262e30 Merge: ebc526233b9d 4a65bbb9109e Author: Arnd Bergmann Date: Thu Aug 15 14:27:41 2019 +0200 Merge tag 'omap-for-v5.3/fixes-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/fixes Fixes for omap variants for v5.3-rc cycle We have another fix to disable voltage switching for am57xx SDIO as the bootrom cannot handle all the voltages after a reset that thought I had already sent a pull request for earlier but forgot. And we also update dra74x iodelay configuration for mmc3 to use the recommended values. Then I noticed we had introduced few new boot warnings with the various recent ti-sysc changes and wanted to fix those. I also noticed we still have too many warnings to be able to spot the real ones easily and fixed up few of those. Sure some of the warnings have been around for a long time and few of the fixes could have waited for the merge window, but having more usable dmesg log level output is a valuable. Other fixes are IO size correction for am335x UARTs that cause issues for at least FreeBSD using the same device tree file that checks that the child IO range is not larger than the parent has. For omap1 ams-delta keyboard we need to fix a irq ack that broke with all the recent gpio changes. And there are also few static checker warning fixes for recent am335x PM changes and ti-sysc driver and one switch fall-though update. * tag 'omap-for-v5.3/fixes-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: soc: ti: pm33xx: Make two symbols static soc: ti: pm33xx: Fix static checker warnings ARM: OMAP: dma: Mark expected switch fall-throughs ARM: dts: Fix incomplete dts data for am3 and am4 mmc bus: ti-sysc: Simplify cleanup upon failures in sysc_probe() ARM: OMAP1: ams-delta-fiq: Fix missing irq_ack ARM: dts: dra74x: Fix iodelay configuration for mmc3 ARM: dts: am335x: Fix UARTs length ARM: OMAP2+: Fix omap4 errata warning on other SoCs ARM: dts: Fix incorrect dcan register mapping for am3, am4 and dra7 ARM: dts: Fix flags for gpio7 bus: ti-sysc: Fix using configured sysc mask value bus: ti-sysc: Fix handling of forced idle ARM: OMAP2+: Fix missing SYSC_HAS_RESET_STATUS for dra7 epwmss ARM: dts: am57xx: Disable voltage switching for SD card Link: https://lore.kernel.org/r/pull-1565844391-332885@atomide.com Signed-off-by: Arnd Bergmann commit e5d8badf37e6b547842f2fcde10361b29e08bd36 Author: Bob Ham Date: Wed Jul 24 07:52:26 2019 -0700 USB: serial: option: add the BroadMobi BM818 card Add a VID:PID for the BroadMobi BM818 M.2 card T: Bus=01 Lev=03 Prnt=40 Port=03 Cnt=01 Dev#= 44 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=2020 ProdID=2060 Rev=00.00 S: Manufacturer=Qualcomm, Incorporated S: Product=Qualcomm CDMA Technologies MSM C: #Ifs= 5 Cfg#= 1 Atr=e0 MxPwr=500mA I: If#=0x0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none) I: If#=0x1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none) I: If#=0x2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none) I: If#=0x3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=fe Prot=ff Driver=(none) I: If#=0x4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none) Signed-off-by: Bob Ham Signed-off-by: Angus Ainslie (Purism) Cc: stable [ johan: use USB_DEVICE_INTERFACE_CLASS() ] Signed-off-by: Johan Hovold drivers/usb/serial/option.c | 2 ++ 1 file changed, 2 insertions(+) commit 6caf0be40a707689e8ff8824fdb96ef77685b1ba Author: Tony Lindgren Date: Thu Aug 15 01:26:02 2019 -0700 USB: serial: option: Add Motorola modem UARTs On Motorola Mapphone devices such as Droid 4 there are five USB ports that do not use the same layout as Gobi 1K/2K/etc devices listed in qcserial.c. So we should use qcaux.c or option.c as noted by Dan Williams . As the Motorola USB serial ports have an interrupt endpoint as shown with lsusb -v, we should use option.c instead of qcaux.c as pointed out by Johan Hovold . The ff/ff/ff interfaces seem to always be UARTs on Motorola devices. For the other interfaces, class 0x0a (CDC Data) should not in general be added as they are typically part of a multi-interface function as noted earlier by Bjørn Mork . However, looking at the Motorola mapphone kernel code, the mdm6600 0x0a class is only used for flashing the modem firmware, and there are no other interfaces. So I've added that too with more details below as it works just fine. The ttyUSB ports on Droid 4 are: ttyUSB0 DIAG, CQDM-capable ttyUSB1 MUX or NMEA, no response ttyUSB2 MUX or NMEA, no response ttyUSB3 TCMD ttyUSB4 AT-capable The ttyUSB0 is detected as QCDM capable by ModemManager. I think it's only used for debugging with ModemManager --debug for sending custom AT commands though. ModemManager already can manage data connection using the USB QMI ports that are already handled by the qmi_wwan.c driver. To enable the MUX or NMEA ports, it seems that something needs to be done additionally to enable them, maybe via the DIAG or TCMD port. It might be just a NVRAM setting somewhere, but I have no idea what NVRAM settings may need changing for that. The TCMD port seems to be a Motorola custom protocol for testing the modem and to configure it's NVRAM and seems to work just fine based on a quick test with a minimal tcmdrw tool I wrote. The voice modem AT-capable port seems to provide only partial support, and no PM support compared to the TS 27.010 based UART wired directly to the modem. The UARTs added with this change are the same product IDs as the Motorola Mapphone Android Linux kernel mdm6600_id_table. I don't have any mdm9600 based devices, so I have only tested these on mdm6600 based droid 4. Then for the class 0x0a (CDC Data) mode, the Motorola Mapphone Android Linux kernel driver moto_flashqsc.c just seems to change the port->bulk_out_size to 8K from the default. And is only used for flashing the modem firmware it seems. I've verified that flashing the modem with signed firmware works just fine with the option driver after manually toggling the GPIO pins, so I've added droid 4 modem flashing mode to the option driver. I've not added the other devices listed in moto_flashqsc.c in case they really need different port->bulk_out_size. Those can be added as they get tested to work for flashing the modem. After this patch the output of /sys/kernel/debug/usb/devices has the following for normal 22b8:2a70 mode including the related qmi_wwan interfaces: T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=22b8 ProdID=2a70 Rev= 0.00 S: Manufacturer=Motorola, Incorporated S: Product=Flash MZ600 C:* #Ifs= 9 Cfg#= 1 Atr=e0 MxPwr=500mA I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=83(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=84(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=85(I) Atr=03(Int.) MxPS= 64 Ivl=5ms E: Ad=86(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms I:* If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=fb Prot=ff Driver=qmi_wwan E: Ad=87(I) Atr=03(Int.) MxPS= 64 Ivl=5ms E: Ad=88(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=06(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms I:* If#= 6 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=fb Prot=ff Driver=qmi_wwan E: Ad=89(I) Atr=03(Int.) MxPS= 64 Ivl=5ms E: Ad=8a(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=07(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms I:* If#= 7 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=fb Prot=ff Driver=qmi_wwan E: Ad=8b(I) Atr=03(Int.) MxPS= 64 Ivl=5ms E: Ad=8c(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=08(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms I:* If#= 8 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=fb Prot=ff Driver=qmi_wwan E: Ad=8d(I) Atr=03(Int.) MxPS= 64 Ivl=5ms E: Ad=8e(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=09(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms In 22b8:900e "qc_dload" mode the device shows up as: T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=22b8 ProdID=900e Rev= 0.00 S: Manufacturer=Motorola, Incorporated S: Product=Flash MZ600 C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=500mA I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms And in 22b8:4281 "ram_downloader" mode the device shows up as: T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=22b8 ProdID=4281 Rev= 0.00 S: Manufacturer=Motorola, Incorporated S: Product=Flash MZ600 C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=500mA I:* If#= 0 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=fc Driver=option E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms Cc: Bjørn Mork Cc: Dan Williams Cc: Lars Melin Cc: Marcel Partap Cc: Merlijn Wajer Cc: Michael Scott Cc: NeKit Cc: Pavel Machek Cc: Sebastian Reichel Tested-by: Pavel Machek Signed-off-by: Tony Lindgren Cc: stable Signed-off-by: Johan Hovold drivers/usb/serial/option.c | 5 +++++ 1 file changed, 5 insertions(+) commit 5ed1c835ed8b522ce25071cc2d56a9a09bd5b59e Author: Tony Luck Date: Wed Aug 14 16:40:30 2019 -0700 MAINTAINERS, x86/CPU: Tony Luck will maintain asm/intel-family.h There are a few different subsystems in the kernel that depend on model specific behaviour (perf, EDAC, power, ...). Easier for just one person to have the task to get new model numbers included instead of having these groups trip over each other to do it. [ bp: s/Cpu/CPU/ and add x86@kernel.org so that it gets CCed too as FYI. ] Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov Acked-by: Thomas Gleixner Cc: Dave Hansen Cc: x86-ml Link: https://lkml.kernel.org/r/20190814234030.30817-1-tony.luck@intel.com MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) commit c930e19790bbbff31c018009907c813fa0925f63 Author: Paolo Bonzini Date: Wed Aug 14 12:07:34 2019 -0400 selftests: kvm: fix vmx_set_nested_state_test vmx_set_nested_state_test is trying to use the KVM_STATE_NESTED_EVMCS without enabling enlightened VMCS first. Correct the outcome of the test, and actually test that it succeeds after the capability is enabled. Signed-off-by: Paolo Bonzini .../selftests/kvm/x86_64/vmx_set_nested_state_test.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit 65efa61dc0d536d5f0602c33ee805a57cc07e9dc Author: Paolo Bonzini Date: Wed Aug 14 12:02:41 2019 -0400 selftests: kvm: provide common function to enable eVMCS There are two tests already enabling eVMCS and a third is coming. Add a function that enables the capability and tests the result. Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/include/evmcs.h | 2 ++ tools/testing/selftests/kvm/lib/x86_64/vmx.c | 20 ++++++++++++++++++++ tools/testing/selftests/kvm/x86_64/evmcs_test.c | 15 ++------------- tools/testing/selftests/kvm/x86_64/hyperv_cpuid.c | 12 ++++-------- 4 files changed, 28 insertions(+), 21 deletions(-) commit 92cd0f0be3d7adb63611c28693ec0399beded837 Author: Paolo Bonzini Date: Wed Aug 14 18:18:55 2019 +0200 selftests: kvm: do not try running the VM in vmx_set_nested_state_test This test is only covering various edge cases of the KVM_SET_NESTED_STATE ioctl. Running the VM does not really add anything. Signed-off-by: Paolo Bonzini .../selftests/kvm/x86_64/vmx_set_nested_state_test.c | 15 --------------- 1 file changed, 15 deletions(-) commit 2f62c5d6ed0abae8e70bd83f4d41b9d63acde45a Merge: db1231ddc046 e1b4ce25dbc9 Author: Dave Airlie Date: Thu Aug 15 13:29:18 2019 +1000 Merge tag 'drm-fixes-5.3-2019-08-14' of git://people.freedesktop.org/~agd5f/linux into drm-fixes drm-fixes-5.3-2019-08-14: amdgpu: - Use kvalloc for dc_state to avoid allocation failures in some cases. - Fix gfx9 soft recovery scheduler: - Fix a race condition when destroying entities Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20190815024919.3434-1-alexander.deucher@amd.com commit db1231ddc04682f60d56ff42447f13099c6c4a4c Author: Lyude Paul Date: Thu Aug 8 20:53:05 2019 -0400 drm/nouveau: Only recalculate PBN/VCPI on mode/connector changes I -thought- I had fixed this entirely, but it looks like that I didn't test this thoroughly enough as we apparently still make one big mistake with nv50_msto_atomic_check() - we don't handle the following scenario: * CRTC #1 has n VCPI allocated to it, is attached to connector DP-4 which is attached to encoder #1. enabled=y active=n * CRTC #1 is changed from DP-4 to DP-5, causing: * DP-4 crtc=#1→NULL (VCPI n→0) * DP-5 crtc=NULL→#1 * CRTC #1 steals encoder #1 back from DP-4 and gives it to DP-5 * CRTC #1 maintains the same mode as before, just with a different connector * mode_changed=n connectors_changed=y (we _SHOULD_ do VCPI 0→n here, but don't) Once the above scenario is repeated once, we'll attempt freeing VCPI from the connector that we didn't allocate due to the connectors changing, but the mode staying the same. Sigh. Since nv50_msto_atomic_check() has broken a few times now, let's rethink things a bit to be more careful: limit both VCPI/PBN allocations to mode_changed || connectors_changed, since neither VCPI or PBN should ever need to change outside of routing and mode changes. Changes since v1: * Fix accidental reversal of clock and bpp arguments in drm_dp_calc_pbn_mode() - William Lewis Signed-off-by: Lyude Paul Reported-by: Bohdan Milar Tested-by: Bohdan Milar Fixes: 232c9eec417a ("drm/nouveau: Use atomic VCPI helpers for MST") References: 412e85b60531 ("drm/nouveau: Only release VCPI slots on mode changes") Cc: Lyude Paul Cc: Ben Skeggs Cc: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc: Harry Wentland Cc: Juston Li Cc: Laurent Pinchart Cc: Karol Herbst Cc: Ilia Mirkin Cc: # v5.1+ Acked-by: Ben Skeggs Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20190809005307.18391-1-lyude@redhat.com drivers/gpu/drm/nouveau/dispnv50/disp.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit 05b439711f6ff8700e8660f97a1179650778b9cb Author: Y.C. Chen Date: Wed Apr 11 09:27:39 2018 +0800 drm/ast: Fixed reboot test may cause system hanged There is another thread still access standard VGA I/O while loading drm driver. Disable standard VGA I/O decode to avoid this issue. Signed-off-by: Y.C. Chen Reviewed-by: Benjamin Herrenschmidt Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/1523410059-18415-1-git-send-email-yc_chen@aspeedtech.com drivers/gpu/drm/ast/ast_main.c | 5 ++++- drivers/gpu/drm/ast/ast_mode.c | 2 +- drivers/gpu/drm/ast/ast_post.c | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) commit c554336efa9bbc28d6ec14efbee3c7d63c61a34f Author: Wenwen Wang Date: Tue Aug 13 04:18:52 2019 -0500 cxgb4: fix a memory leak bug In blocked_fl_write(), 't' is not deallocated if bitmap_parse_user() fails, leading to a memory leak bug. To fix this issue, free t before returning the error. Signed-off-by: Wenwen Wang Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 83f82d7a42583e93d0f0dde3d61ed10f75c0f4d8 Author: Lubomir Rintel Date: Wed Aug 7 15:22:31 2019 +0200 of: irq: fix a trivial typo in a doc comment Diverged from what the code does with commit 530210c7814e ("of/irq: Replace of_irq with of_phandle_args"). Signed-off-by: Lubomir Rintel Signed-off-by: Rob Herring drivers/of/irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 626633425c079742c04f4f2d81c16962b084605c Author: Rob Herring Date: Tue Aug 13 14:47:54 2019 -0600 dt-bindings: pinctrl: stm32: Fix 'st,syscfg' schema The proper way to add additional contraints to an existing json-schema is using 'allOf' to reference the base schema. Using just '$ref' doesn't work. Fix this for the 'st,syscfg' property. Cc: Mark Rutland Cc: Maxime Coquelin Cc: Alexandre Torgue Cc: linux-gpio@vger.kernel.org Cc: linux-stm32@st-md-mailman.stormreply.com Cc: linux-arm-kernel@lists.infradead.org Reviewed-by: Linus Walleij Signed-off-by: Rob Herring Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7c7cfdcf7f1777c7376fc9a239980de04b6b5ea1 Author: Adrian Hunter Date: Wed Aug 14 15:59:50 2019 +0300 scsi: ufs: Fix NULL pointer dereference in ufshcd_config_vreg_hpm() Fix the following BUG: [ 187.065689] BUG: kernel NULL pointer dereference, address: 000000000000001c [ 187.065790] RIP: 0010:ufshcd_vreg_set_hpm+0x3c/0x110 [ufshcd_core] [ 187.065938] Call Trace: [ 187.065959] ufshcd_resume+0x72/0x290 [ufshcd_core] [ 187.065980] ufshcd_system_resume+0x54/0x140 [ufshcd_core] [ 187.065993] ? pci_pm_restore+0xb0/0xb0 [ 187.066005] ufshcd_pci_resume+0x15/0x20 [ufshcd_pci] [ 187.066017] pci_pm_thaw+0x4c/0x90 [ 187.066030] dpm_run_callback+0x5b/0x150 [ 187.066043] device_resume+0x11b/0x220 Voltage regulators are optional, so functions must check they exist before dereferencing. Note this issue is hidden if CONFIG_REGULATORS is not set, because the offending code is optimised away. Notes for stable: The issue first appears in commit 57d104c153d3 ("ufs: add UFS power management support") but is inadvertently fixed in commit 60f0187031c0 ("scsi: ufs: disable vccq if it's not needed by UFS device") which in turn was reverted by commit 730679817d83 ("Revert "scsi: ufs: disable vccq if it's not needed by UFS device""). So fix applies v3.18 to v4.5 and v5.1+ Fixes: 57d104c153d3 ("ufs: add UFS power management support") Fixes: 730679817d83 ("Revert "scsi: ufs: disable vccq if it's not needed by UFS device"") Cc: stable@vger.kernel.org Signed-off-by: Adrian Hunter Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 3 +++ 1 file changed, 3 insertions(+) commit a86a75865ff4d8c05f355d1750a5250aec89ab15 Author: Dmitry Fomichev Date: Sun Aug 11 11:25:10 2019 -0700 scsi: target: tcmu: avoid use-after-free after command timeout In tcmu_handle_completion() function, the variable called read_len is always initialized with a value taken from se_cmd structure. If this function is called to complete an expired (timed out) out command, the session command pointed by se_cmd is likely to be already deallocated by the target core at that moment. As the result, this access triggers a use-after-free warning from KASAN. This patch fixes the code not to touch se_cmd when completing timed out TCMU commands. It also resets the pointer to se_cmd at the time when the TCMU_CMD_BIT_EXPIRED flag is set because it is going to become invalid after calling target_complete_cmd() later in the same function, tcmu_check_expired_cmd(). Signed-off-by: Dmitry Fomichev Acked-by: Mike Christie Reviewed-by: Damien Le Moal Signed-off-by: Martin K. Petersen drivers/target/target_core_user.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 26fa656e9a0cbccddf7db132ea020d2169dbe46e Author: Bill Kuzeja Date: Wed Aug 14 10:24:41 2019 -0400 scsi: qla2xxx: Fix gnl.l memory leak on adapter init failure If HBA initialization fails unexpectedly (exiting via probe_failed:), we may fail to free vha->gnl.l. So that we don't attempt to double free, set this pointer to NULL after a free and check for NULL at probe_failed: so we know whether or not to call dma_free_coherent. Signed-off-by: Bill Kuzeja Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_attr.c | 2 ++ drivers/scsi/qla2xxx/qla_os.c | 11 ++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) commit 070955558e820b9a89c570b91b1f21762f62b288 Author: Alexandre Courbot Date: Mon Jul 29 14:33:35 2019 +0900 drm/mediatek: set DMA max segment size This driver requires imported PRIME buffers to appear contiguously in its IO address space. Make sure this is the case by setting the maximum DMA segment size to a more suitable value than the default 64KB. Signed-off-by: Alexandre Courbot Reviewed-by: Tomasz Figa Signed-off-by: CK Hu drivers/gpu/drm/mediatek/mtk_drm_drv.c | 35 ++++++++++++++++++++++++++++++++-- drivers/gpu/drm/mediatek/mtk_drm_drv.h | 2 ++ 2 files changed, 35 insertions(+), 2 deletions(-) commit 4c6f3196e6ea111c456c6086dc3f57d4706b0b2d Author: Alexandre Courbot Date: Mon Jul 29 14:33:34 2019 +0900 drm/mediatek: use correct device to import PRIME buffers PRIME buffers should be imported using the DMA device. To this end, use a custom import function that mimics drm_gem_prime_import_dev(), but passes the correct device. Fixes: 119f5173628aa ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.") Signed-off-by: Alexandre Courbot Signed-off-by: CK Hu drivers/gpu/drm/mediatek/mtk_drm_drv.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 41de59634046b19cd53a1983594a95135c656997 Merge: e22a97a2a85d 1ee1119d184b Author: Linus Torvalds Date: Wed Aug 14 15:29:53 2019 -0700 Merge tag 'Wimplicit-fallthrough-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux Pull fallthrough fixes from Gustavo A. R. Silva: "Fix sh mainline builds: - Fix fall-through warning in sh. - Fix missing break bug in sh (this is a 10-year-old bug) Currently, mainline builds for sh are broken. These patches fix that" * tag 'Wimplicit-fallthrough-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux: sh: kernel: hw_breakpoint: Fix missing break in switch statement sh: kernel: disassemble: Mark expected switch fall-throughs commit e22a97a2a85d2a0bdfb134cbbc7ff856ae67edba Merge: a8dba0531bc0 9dd0b82ef530 Author: Linus Torvalds Date: Wed Aug 14 14:21:14 2019 -0700 Merge tag 'afs-fixes-20190814' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs Pull afs fixes from David Howells: - Fix the CB.ProbeUuid handler to generate its reply correctly. - Fix a mix up in indices when parsing a Volume Location entry record. - Fix a potential NULL-pointer deref when cleaning up a read request. - Fix the expected data version of the destination directory in afs_rename(). - Fix afs_d_revalidate() to only update d_fsdata if it's not the same as the directory data version to reduce the likelihood of overwriting the result of a competing operation. (d_fsdata carries the directory DV or the least-significant word thereof). - Fix the tracking of the data-version on a directory and make sure that dentry objects get properly initialised, updated and revalidated. Also fix rename to update d_fsdata to match the new directory's DV if the dentry gets moved over and unhash the dentry to stop afs_d_revalidate() from interfering. * tag 'afs-fixes-20190814' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: afs: Fix missing dentry data version updating afs: Only update d_fsdata if different in afs_d_revalidate() afs: Fix off-by-one in afs_rename() expected data version calculation fs: afs: Fix a possible null-pointer dereference in afs_put_read() afs: Fix loop index mixup in afs_deliver_vl_get_entry_by_name_u() afs: Fix the CB.ProbeUuid service handler to reply correctly commit 27df5c7068bf23cab282dc64b1c9894429b3b8a0 Author: Ilya Leoshkevich Date: Wed Aug 14 12:41:09 2019 +0200 selftests/bpf: fix "bind{4, 6} deny specific IP & port" on s390 "bind4 allow specific IP & port" and "bind6 deny specific IP & port" fail on s390 because of endianness issue: the 4 IP address bytes are loaded as a word and compared with a constant, but the value of this constant should be different on big- and little- endian machines, which is not the case right now. Use __bpf_constant_ntohl to generate proper value based on machine endianness. Fixes: 1d436885b23b ("selftests/bpf: Selftest for sys_bind post-hooks.") Signed-off-by: Ilya Leoshkevich Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/test_sock.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit e1b4ce25dbc93ab0cb8ed0f236a3b9ff7b03802c Author: Christian König Date: Fri Aug 9 17:27:21 2019 +0200 drm/scheduler: use job count instead of peek The spsc_queue_peek function is accessing queue->head which belongs to the consumer thread and shouldn't be accessed by the producer This is fixing a rare race condition when destroying entities. Signed-off-by: Christian König Acked-by: Andrey Grodzovsky Reviewed-by: Monk.liu@amd.com Signed-off-by: Alex Deucher drivers/gpu/drm/scheduler/sched_entity.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 69703eb9a8ae28a46cd5bce7d69ceeef6273a104 Author: Vincent Chen Date: Wed Aug 14 16:23:53 2019 +0800 riscv: Make __fstate_clean() work correctly. Make the __fstate_clean() function correctly set the state of sstatus.FS in pt_regs to SR_FS_CLEAN. Fixes: 7db91e57a0acd ("RISC-V: Task implementation") Cc: linux-stable Signed-off-by: Vincent Chen Reviewed-by: Anup Patel Reviewed-by: Christoph Hellwig [paul.walmsley@sifive.com: expanded "Fixes" commit ID] Signed-off-by: Paul Walmsley arch/riscv/include/asm/switch_to.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8ac71d7e46b94a4fc8ffc6f1c88004cdf24459e8 Author: Vincent Chen Date: Wed Aug 14 16:23:52 2019 +0800 riscv: Correct the initialized flow of FP register The following two reasons cause FP registers are sometimes not initialized before starting the user program. 1. Currently, the FP context is initialized in flush_thread() function and we expect these initial values to be restored to FP register when doing FP context switch. However, the FP context switch only occurs in switch_to function. Hence, if this process does not be scheduled out and scheduled in before entering the user space, the FP registers have no chance to initialize. 2. In flush_thread(), the state of reg->sstatus.FS inherits from the parent. Hence, the state of reg->sstatus.FS may be dirty. If this process is scheduled out during flush_thread() and initializing the FP register, the fstate_save() in switch_to will corrupt the FP context which has been initialized until flush_thread(). To solve the 1st case, the initialization of the FP register will be completed in start_thread(). It makes sure all FP registers are initialized before starting the user program. For the 2nd case, the state of reg->sstatus.FS in start_thread will be set to SR_FS_OFF to prevent this process from corrupting FP context in doing context save. The FP state is set to SR_FS_INITIAL in start_trhead(). Signed-off-by: Vincent Chen Reviewed-by: Anup Patel Reviewed-by: Christoph Hellwig Fixes: 7db91e57a0acd ("RISC-V: Task implementation") Cc: stable@vger.kernel.org [paul.walmsley@sifive.com: fixed brace alignment issue reported by checkpatch] Signed-off-by: Paul Walmsley arch/riscv/include/asm/switch_to.h | 6 ++++++ arch/riscv/kernel/process.c | 11 +++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) commit a8dba0531bc0ba8b65e77a4a858da4b6eeaa1b92 Merge: e83b009c5c36 2c8ccb37b08f Author: Linus Torvalds Date: Wed Aug 14 11:10:38 2019 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fixes from Doug Ledford: "Fairly small pull request for -rc3. I'm out of town the rest of this week, so I made sure to clean out as much as possible from patchworks in enough time for 0-day to chew through it (Yay! for 0-day being back online! :-)). Jason might send through any emergency stuff that could pop up, otherwise I'm back next week. The only real thing of note is the siw ABI change. Since we just merged siw *this* release, there are no prior kernel releases to maintain kernel ABI with. I told Bernard that if there is anything else about the siw ABI he thinks he might want to change before it goes set in stone, he should get it in ASAP. The siw module was around for several years outside the kernel tree, and it had to be revamped considerably for inclusion upstream, so we are making no attempts to be backward compatible with the out of tree version. Once 5.3 is actually released, we will have our baseline ABI to maintain. Summary: - Fix a memory registration release flow issue that was causing a WARN_ON (mlx5) - If the counters for a port aren't allocated, then we can't do operations on the non-existent counters (core) - Check the right variable for error code result (mlx5) - Fix a use after free issue (mlx5) - Fix an off by one memory leak (siw) - Actually return an error code on error (core) - Allow siw to be built on 32bit arches (siw, ABI change, but OK since siw was just merged this merge window and there is no prior released kernel to maintain compatibility with and we also updated the rdma-core user space package to match)" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: RDMA/siw: Change CQ flags from 64->32 bits RDMA/core: Fix error code in stat_get_doit_qp() RDMA/siw: Fix a memory leak in siw_init_cpulist() IB/mlx5: Fix use-after-free error while accessing ev_file pointer IB/mlx5: Check the correct variable in error handling code RDMA/counter: Prevent QP counter binding if counters unsupported IB/mlx5: Fix implicit MR release flow commit daac07156b330b18eb5071aec4b3ddca1c377f2c Author: Hui Peng Date: Tue Aug 13 22:34:04 2019 -0400 ALSA: usb-audio: Fix an OOB bug in parse_audio_mixer_unit The `uac_mixer_unit_descriptor` shown as below is read from the device side. In `parse_audio_mixer_unit`, `baSourceID` field is accessed from index 0 to `bNrInPins` - 1, the current implementation assumes that descriptor is always valid (the length of descriptor is no shorter than 5 + `bNrInPins`). If a descriptor read from the device side is invalid, it may trigger out-of-bound memory access. ``` struct uac_mixer_unit_descriptor { __u8 bLength; __u8 bDescriptorType; __u8 bDescriptorSubtype; __u8 bUnitID; __u8 bNrInPins; __u8 baSourceID[]; } ``` This patch fixes the bug by add a sanity check on the length of the descriptor. Reported-by: Hui Peng Reported-by: Mathias Payer Cc: Signed-off-by: Hui Peng Signed-off-by: Takashi Iwai sound/usb/mixer.c | 2 ++ 1 file changed, 2 insertions(+) commit e83b009c5c366b678c7986fa6c1d38fed06c954c Merge: b5e33e44d994 33dcb37cef74 Author: Linus Torvalds Date: Wed Aug 14 10:31:11 2019 -0700 Merge tag 'dma-mapping-5.3-4' of git://git.infradead.org/users/hch/dma-mapping Pull dma-mapping fixes from Christoph Hellwig: - fix the handling of the bus_dma_mask in dma_get_required_mask, which caused a regression in this merge window (Lucas Stach) - fix a regression in the handling of DMA_ATTR_NO_KERNEL_MAPPING (me) - fix dma_mmap_coherent to not cause page attribute mismatches on coherent architectures like x86 (me) * tag 'dma-mapping-5.3-4' of git://git.infradead.org/users/hch/dma-mapping: dma-mapping: fix page attributes for dma_mmap_* dma-direct: don't truncate dma_required_mask to bus addressing capabilities dma-direct: fix DMA_ATTR_NO_KERNEL_MAPPING commit 3ee1bb7aae97324ec9078da1f00cb2176919563f Author: Eric Dumazet Date: Mon Aug 12 04:57:27 2019 -0700 batman-adv: fix uninit-value in batadv_netlink_get_ifindex() batadv_netlink_get_ifindex() needs to make sure user passed a correct u32 attribute. syzbot reported : BUG: KMSAN: uninit-value in batadv_netlink_dump_hardif+0x70d/0x880 net/batman-adv/netlink.c:968 CPU: 1 PID: 11705 Comm: syz-executor888 Not tainted 5.1.0+ #1 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x191/0x1f0 lib/dump_stack.c:113 kmsan_report+0x130/0x2a0 mm/kmsan/kmsan.c:622 __msan_warning+0x75/0xe0 mm/kmsan/kmsan_instr.c:310 batadv_netlink_dump_hardif+0x70d/0x880 net/batman-adv/netlink.c:968 genl_lock_dumpit+0xc6/0x130 net/netlink/genetlink.c:482 netlink_dump+0xa84/0x1ab0 net/netlink/af_netlink.c:2253 __netlink_dump_start+0xa3a/0xb30 net/netlink/af_netlink.c:2361 genl_family_rcv_msg net/netlink/genetlink.c:550 [inline] genl_rcv_msg+0xfc1/0x1a40 net/netlink/genetlink.c:627 netlink_rcv_skb+0x431/0x620 net/netlink/af_netlink.c:2486 genl_rcv+0x63/0x80 net/netlink/genetlink.c:638 netlink_unicast_kernel net/netlink/af_netlink.c:1311 [inline] netlink_unicast+0xf3e/0x1020 net/netlink/af_netlink.c:1337 netlink_sendmsg+0x127e/0x12f0 net/netlink/af_netlink.c:1926 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg net/socket.c:661 [inline] ___sys_sendmsg+0xcc6/0x1200 net/socket.c:2260 __sys_sendmsg net/socket.c:2298 [inline] __do_sys_sendmsg net/socket.c:2307 [inline] __se_sys_sendmsg+0x305/0x460 net/socket.c:2305 __x64_sys_sendmsg+0x4a/0x70 net/socket.c:2305 do_syscall_64+0xbc/0xf0 arch/x86/entry/common.c:291 entry_SYSCALL_64_after_hwframe+0x63/0xe7 RIP: 0033:0x440209 Fixes: b60620cf567b ("batman-adv: netlink: hardif query") Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b5e33e44d994bb03c75f1901d47b1cf971f752a0 Merge: cab6d5b66b98 3a18844dcf89 Author: Linus Torvalds Date: Wed Aug 14 10:16:59 2019 -0700 Merge tag 'iommu-fixes-v5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull iommu fixes from Joerg Roedel: - A couple more fixes for the Intel VT-d driver for bugs introduced during the recent conversion of this driver to use IOMMU core default domains. - Fix for common dma-iommu code to make sure MSI mappings happen in the correct domain for a device. - Fix a corner case in the handling of sg-lists in dma-iommu code that might cause dma_length to be truncated. - Mark a switch as fall-through in arm-smmu code. * tag 'iommu-fixes-v5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/vt-d: Fix possible use-after-free of private domain iommu/vt-d: Detach domain before using a private one iommu/dma: Handle SG length overflow better iommu/vt-d: Correctly check format of page table in debugfs iommu/vt-d: Detach domain when move device out of group iommu/arm-smmu: Mark expected switch fall-through iommu/dma: Handle MSI mappings separately commit cab6d5b66b984ddeb8b0ff2ad2ddc06f7f406cda Merge: ee1c7bd33e66 4643d67e8cb0 Author: Linus Torvalds Date: Wed Aug 14 09:53:46 2019 -0700 Merge branch 'akpm' (patches from Andrew) Merge misc VM fixes from Andrew Morton: "A bunch of hotfixes, all affecting mm/. The two-patch series from Andrea may be controversial. This restores patches which were reverted in Dec 2018 due to a regression report [*]. After extensive discussion it is evident that the problems which these patches solved were significantly more serious than the problems they introduced. I am told that major distros are already carrying these two patches for this reason" [*] See https://lore.kernel.org/lkml/alpine.DEB.2.21.1812061343240.144733@chino.kir.corp.google.com/ https://lore.kernel.org/lkml/alpine.DEB.2.21.1812031545560.161134@chino.kir.corp.google.com/ for the google-specific issues brought up by David Rijentes. And as Andrew says: "I'm unaware of anyone else who will be adversely affected by this, and google already carries over a thousand kernel patches - another won't kill them. There has been sporadic discussion about fixing these things for real but it's clear that nobody apart from David is particularly motivated" * emailed patches from Andrew Morton : hugetlbfs: fix hugetlb page migration/fault race causing SIGBUS mm, vmscan: do not special-case slab reclaim when watermarks are boosted Revert "mm, thp: restore node-local hugepage allocations" Revert "Revert "mm, thp: consolidate THP gfp handling into alloc_hugepage_direct_gfpmask"" include/asm-generic/5level-fixup.h: fix variable 'p4d' set but not used seq_file: fix problem when seeking mid-record mm: workingset: fix vmstat counters for shadow nodes mm/usercopy: use memory range to be accessed for wraparound check mm: kmemleak: disable early logging in case of error mm/vmalloc.c: fix percpu free VM area search criteria mm/memcontrol.c: fix use after free in mem_cgroup_iter() mm/z3fold.c: fix z3fold_destroy_pool() race condition mm/z3fold.c: fix z3fold_destroy_pool() ordering mm: mempolicy: handle vma with unmovable pages mapped correctly in mbind mm: mempolicy: make the behavior consistent when MPOL_MF_MOVE* and MPOL_MF_STRICT were specified mm/hmm: fix bad subpage pointer in try_to_unmap_one mm/hmm: fix ZONE_DEVICE anon page mapping reuse mm: document zone device struct page field usage commit c7ec75ea4d5316518adc87224e3cff47192579e7 Author: Dinh Nguyen Date: Wed Aug 14 10:30:14 2019 -0500 clk: socfpga: stratix10: fix rate caclulationg for cnt_clks Checking bypass_reg is incorrect for calculating the cnt_clk rates. Instead we should be checking that there is a proper hardware register that holds the clock divider. Cc: stable@vger.kernel.org Signed-off-by: Dinh Nguyen Link: https://lkml.kernel.org/r/20190814153014.12962-1-dinguyen@kernel.org Signed-off-by: Stephen Boyd drivers/clk/socfpga/clk-periph-s10.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c8e174b39887ea1992286ff8ffdbcf79f6057cf2 Author: Miaohe Lin Date: Mon Aug 12 10:33:00 2019 +0800 KVM: x86: svm: remove redundant assignment of var new_entry new_entry is reassigned a new value next line. So it's redundant and remove it. Signed-off-by: Miaohe Lin Signed-off-by: Paolo Bonzini arch/x86/kvm/svm.c | 1 - 1 file changed, 1 deletion(-) commit ed4e7b057e9e75cecd56f6c3434f88eaa69c1209 Author: Paolo Bonzini Date: Fri Aug 9 09:30:02 2019 +0200 MAINTAINERS: add KVM x86 reviewers This is probably overdue---KVM x86 has quite a few contributors that usually review each other's patches, which is really helpful to me. Formalize this by listing them as reviewers. I am including people with various expertise: - Joerg for SVM (with designated reviewers, it makes more sense to have him in the main KVM/x86 stanza) - Sean for MMU and VMX - Jim for VMX - Vitaly for Hyper-V and possibly SVM - Wanpeng for LAPIC and paravirtualization. Please ack if you are okay with this arrangement, otherwise speak up. In other news, Radim is going to leave Red Hat soon. However, he has not been very much involved in upstream KVM development for some time, and in the immediate future he is still going to help maintain kvm/queue while I am on vacation. Since not much is going to change, I will let him decide whether he wants to keep the maintainer role after he leaves. Acked-by: Joerg Roedel Acked-by: Vitaly Kuznetsov Acked-by: Wanpeng Li Cc: Sean Christopherson Cc: Jim Mattson Signed-off-by: Paolo Bonzini MAINTAINERS | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 74260dc278a725b692b1a201c6b780a02804d3e4 Author: Paolo Bonzini Date: Fri Aug 9 09:18:43 2019 +0200 MAINTAINERS: change list for KVM/s390 KVM/s390 does not have a list of its own, and linux-s390 is in the loop anyway thanks to the generic arch/s390 match. So use the generic KVM list for s390 patches. Signed-off-by: Paolo Bonzini MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b14c876b994f208b6b95c222056e1deb0a45de0e Author: Radim Krcmar Date: Tue Aug 13 23:37:37 2019 -0400 kvm: x86: skip populating logical dest map if apic is not sw enabled recalculate_apic_map does not santize ldr and it's possible that multiple bits are set. In that case, a previous valid entry can potentially be overwritten by an invalid one. This condition is hit when booting a 32 bit, >8 CPU, RHEL6 guest and then triggering a crash to boot a kdump kernel. This is the sequence of events: 1. Linux boots in bigsmp mode and enables PhysFlat, however, it still writes to the LDR which probably will never be used. 2. However, when booting into kdump, the stale LDR values remain as they are not cleared by the guest and there isn't a apic reset. 3. kdump boots with 1 cpu, and uses Logical Destination Mode but the logical map has been overwritten and points to an inactive vcpu. Signed-off-by: Radim Krcmar Signed-off-by: Bandan Das Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 5 +++++ 1 file changed, 5 insertions(+) commit 6600c0808e2ea2939009e53983f066fe38bd308a Author: Rocky Liao Date: Wed Aug 14 15:42:39 2019 +0800 Bluetooth: hci_qca: Skip 1 error print in device_want_to_sleep() Don't fall through to print error message when receive sleep indication in HCI_IBS_RX_ASLEEP state, this is allowed behavior. Signed-off-by: Rocky Liao Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_qca.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 90865a3dc597bd8463efacb749561095ba70b0aa Author: Nishad Kamdar Date: Sat Aug 3 19:43:35 2019 +0530 i2c: stm32: Use the correct style for SPDX License Identifier This patch corrects the SPDX License Identifier style in header file related to STM32 Driver for I2C hardware bus support. For C header files Documentation/process/license-rules.rst mandates C-like comments (opposed to C source files where C++ style should be used) Changes made by using a script provided by Joe Perches here: https://lkml.org/lkml/2019/2/7/46 Suggested-by: Joe Perches Signed-off-by: Nishad Kamdar Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-stm32.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d7437fc0d8291181debe032671a289b6bd93f46f Author: Wolfram Sang Date: Thu Aug 8 21:54:17 2019 +0200 i2c: emev2: avoid race when unregistering slave client After we disabled interrupts, there might still be an active one running. Sync before clearing the pointer to the slave device. Fixes: c31d0a00021d ("i2c: emev2: add slave support") Reported-by: Krzysztof Adamski Signed-off-by: Wolfram Sang Reviewed-by: Krzysztof Adamski Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-emev2.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 7b814d852af6944657c2961039f404c4490771c0 Author: Wolfram Sang Date: Thu Aug 8 21:39:10 2019 +0200 i2c: rcar: avoid race when unregistering slave client After we disabled interrupts, there might still be an active one running. Sync before clearing the pointer to the slave device. Fixes: de20d1857dd6 ("i2c: rcar: add slave support") Reported-by: Krzysztof Adamski Signed-off-by: Wolfram Sang Reviewed-by: Krzysztof Adamski Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-rcar.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 06d9532fa6b34f12a6d75711162d47c17c1add72 Author: David Howells Date: Tue Aug 13 22:26:36 2019 +0100 rxrpc: Fix read-after-free in rxrpc_queue_local() rxrpc_queue_local() attempts to queue the local endpoint it is given and then, if successful, prints a trace line. The trace line includes the current usage count - but we're not allowed to look at the local endpoint at this point as we passed our ref on it to the workqueue. Fix this by reading the usage count before queuing the work item. Also fix the reading of local->debug_id for trace lines, which must be done with the same consideration as reading the usage count. Fixes: 09d2bf595db4 ("rxrpc: Add a tracepoint to track rxrpc_local refcounting") Reported-by: syzbot+78e71c5bab4f76a6a719@syzkaller.appspotmail.com Signed-off-by: David Howells include/trace/events/rxrpc.h | 6 +++--- net/rxrpc/local_object.c | 19 ++++++++++--------- 2 files changed, 13 insertions(+), 12 deletions(-) commit b00df840fb4004b7087940ac5f68801562d0d2de Author: David Howells Date: Mon Aug 12 23:30:06 2019 +0100 rxrpc: Fix local endpoint replacement When a local endpoint (struct rxrpc_local) ceases to be in use by any AF_RXRPC sockets, it starts the process of being destroyed, but this doesn't cause it to be removed from the namespace endpoint list immediately as tearing it down isn't trivial and can't be done in softirq context, so it gets deferred. If a new socket comes along that wants to bind to the same endpoint, a new rxrpc_local object will be allocated and rxrpc_lookup_local() will use list_replace() to substitute the new one for the old. Then, when the dying object gets to rxrpc_local_destroyer(), it is removed unconditionally from whatever list it is on by calling list_del_init(). However, list_replace() doesn't reset the pointers in the replaced list_head and so the list_del_init() will likely corrupt the local endpoints list. Fix this by using list_replace_init() instead. Fixes: 730c5fd42c1e ("rxrpc: Fix local endpoint refcounting") Reported-by: syzbot+193e29e9387ea5837f1d@syzkaller.appspotmail.com Signed-off-by: David Howells net/rxrpc/local_object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8fc3ae3b109d17157102f0abf9c8fb1e16bf810a Author: Oleksij Rempel Date: Mon Aug 12 07:08:17 2019 +0200 MAINTAINERS: i2c-imx: take over maintainership I would like to maintain the i2c-imx driver. Since I work with different i.MX variants and have access to the hardware, I can spend some time on the reviewing of this driver. Signed-off-by: Oleksij Rempel Signed-off-by: Wolfram Sang MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) commit e8c220fac415d9f4a994b0c2871b835feac1eb4e Author: Fabio Estevam Date: Thu Aug 8 18:01:36 2019 -0300 Revert "i2c: imx: improve the error handling in i2c_imx_dma_request()" Since commit e1ab9a468e3b ("i2c: imx: improve the error handling in i2c_imx_dma_request()") when booting with the DMA driver as module (such as CONFIG_FSL_EDMA=m) the following endless clk warnings are seen: [ 153.077831] ------------[ cut here ]------------ [ 153.082528] WARNING: CPU: 0 PID: 15 at drivers/clk/clk.c:924 clk_core_disable_lock+0x18/0x24 [ 153.093077] i2c0 already disabled [ 153.096416] Modules linked in: [ 153.099521] CPU: 0 PID: 15 Comm: kworker/0:1 Tainted: G W 5.2.0+ #321 [ 153.107290] Hardware name: Freescale Vybrid VF5xx/VF6xx (Device Tree) [ 153.113772] Workqueue: events deferred_probe_work_func [ 153.118979] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 153.126778] [] (show_stack) from [] (dump_stack+0x9c/0xd4) [ 153.134051] [] (dump_stack) from [] (__warn+0xf8/0x124) [ 153.141056] [] (__warn) from [] (warn_slowpath_fmt+0x38/0x48) [ 153.148580] [] (warn_slowpath_fmt) from [] (clk_core_disable_lock+0x18/0x24) [ 153.157413] [] (clk_core_disable_lock) from [] (i2c_imx_probe+0x554/0x6ec) [ 153.166076] [] (i2c_imx_probe) from [] (platform_drv_probe+0x48/0x98) [ 153.174297] [] (platform_drv_probe) from [] (really_probe+0x1d8/0x2c0) [ 153.182605] [] (really_probe) from [] (driver_probe_device+0x5c/0x174) [ 153.190909] [] (driver_probe_device) from [] (bus_for_each_drv+0x44/0x8c) [ 153.199480] [] (bus_for_each_drv) from [] (__device_attach+0xa0/0x108) [ 153.207782] [] (__device_attach) from [] (bus_probe_device+0x88/0x90) [ 153.215999] [] (bus_probe_device) from [] (deferred_probe_work_func+0x60/0x90) [ 153.225003] [] (deferred_probe_work_func) from [] (process_one_work+0x204/0x634) [ 153.234178] [] (process_one_work) from [] (worker_thread+0x20/0x484) [ 153.242315] [] (worker_thread) from [] (kthread+0x118/0x150) [ 153.249758] [] (kthread) from [] (ret_from_fork+0x14/0x20) [ 153.257006] Exception stack(0xdde43fb0 to 0xdde43ff8) [ 153.262095] 3fa0: 00000000 00000000 00000000 00000000 [ 153.270306] 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 153.278520] 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000 [ 153.285159] irq event stamp: 3323022 [ 153.288787] hardirqs last enabled at (3323021): [] _raw_spin_unlock_irq+0x24/0x2c [ 153.297261] hardirqs last disabled at (3323022): [] clk_enable_lock+0x10/0x124 [ 153.305392] softirqs last enabled at (3322092): [] __do_softirq+0x344/0x540 [ 153.313352] softirqs last disabled at (3322081): [] irq_exit+0x10c/0x128 [ 153.320946] ---[ end trace a506731ccd9bd703 ]--- This endless clk warnings behaviour is well explained by Andrey Smirnov: "Allocating DMA after registering I2C adapter can lead to infinite probing loop, for example, consider the following scenario: 1. i2c_imx_probe() is called and successfully registers an I2C adapter via i2c_add_numbered_adapter() 2. As a part of i2c_add_numbered_adapter() new I2C slave devices are added from DT which results in a call to driver_deferred_probe_trigger() 3. i2c_imx_probe() continues and calls i2c_imx_dma_request() which due to lack of proper DMA driver returns -EPROBE_DEFER 4. i2c_imx_probe() fails, removes I2C adapter and returns -EPROBE_DEFER, which places it into deferred probe list 5. Deferred probe work triggered in #2 above kicks in and calls i2c_imx_probe() again thus bringing us to step #1" So revert commit e1ab9a468e3b ("i2c: imx: improve the error handling in i2c_imx_dma_request()") and restore the old behaviour, in order to avoid regressions on existing setups. Cc: Reported-by: Andrey Smirnov Reported-by: Russell King Fixes: e1ab9a468e3b ("i2c: imx: improve the error handling in i2c_imx_dma_request()") Signed-off-by: Fabio Estevam Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-imx.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit dfe42be15fde16232340b8b2a57c359f51cc10d9 Author: Pablo Neira Ayuso Date: Tue Aug 13 17:41:13 2019 +0200 netfilter: nft_flow_offload: skip tcp rst and fin packets TCP rst and fin packets do not qualify to place a flow into the flowtable. Most likely there will be no more packets after connection closure. Without this patch, this flow entry expires and connection tracking picks up the entry in ESTABLISHED state using the fixup timeout, which makes this look inconsistent to the user for a connection that is actually already closed. Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_flow_offload.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 68e03b85474a51ec1921b4d13204782594ef7223 Author: YueHaibing Date: Wed Jul 31 20:38:14 2019 +0800 gpio: Fix build error of function redefinition when do randbuilding, I got this error: In file included from drivers/hwmon/pmbus/ucd9000.c:19:0: ./include/linux/gpio/driver.h:576:1: error: redefinition of gpiochip_add_pin_range gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name, ^~~~~~~~~~~~~~~~~~~~~~ In file included from drivers/hwmon/pmbus/ucd9000.c:18:0: ./include/linux/gpio.h:245:1: note: previous definition of gpiochip_add_pin_range was here gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name, ^~~~~~~~~~~~~~~~~~~~~~ Reported-by: Hulk Robot Fixes: 964cb341882f ("gpio: move pincontrol calls to ") Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20190731123814.46624-1-yuehaibing@huawei.com Signed-off-by: Linus Walleij include/linux/gpio.h | 24 ------------------------ 1 file changed, 24 deletions(-) commit 2c60e6b5c9241b24b8b523fefd3e44fb85622cda Author: Bartosz Golaszewski Date: Tue Aug 6 13:41:51 2019 +0200 gpiolib: never report open-drain/source lines as 'input' to user-space If the driver doesn't support open-drain/source config options, we emulate this behavior when setting the direction by calling gpiod_direction_input() if the default value is 0 (open-source) or 1 (open-drain), thus not actively driving the line in those cases. This however clears the FLAG_IS_OUT bit for the GPIO line descriptor and makes the LINEINFO ioctl() incorrectly report this line's mode as 'input' to user-space. This commit modifies the ioctl() to always set the GPIOLINE_FLAG_IS_OUT bit in the lineinfo structure's flags field. Since it's impossible to use the input mode and open-drain/source options at the same time, we can be sure the reported information will be correct. Fixes: 521a2ad6f862 ("gpio: add userspace ABI for GPIO line information") Cc: stable Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20190806114151.17652-1-brgl@bgdev.pl Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 871b9066027702e6e6589da0e1edd3b7dede7205 Author: Hui Wang Date: Wed Aug 14 12:09:08 2019 +0800 ALSA: hda - Add a generic reboot_notify Make codec enter D3 before rebooting or poweroff can fix the noise issue on some laptops. And in theory it is harmless for all codecs to enter D3 before rebooting or poweroff, let us add a generic reboot_notify, then realtek and conexant drivers can call this function. Cc: stable@vger.kernel.org Signed-off-by: Hui Wang Signed-off-by: Takashi Iwai sound/pci/hda/hda_generic.c | 19 +++++++++++++++++++ sound/pci/hda/hda_generic.h | 1 + sound/pci/hda/patch_conexant.c | 6 +----- sound/pci/hda/patch_realtek.c | 11 +---------- 4 files changed, 22 insertions(+), 15 deletions(-) commit 401714d9534aad8c24196b32600da683116bbe09 Author: Hui Wang Date: Wed Aug 14 12:09:07 2019 +0800 ALSA: hda - Let all conexant codec enter D3 when rebooting We have 3 new lenovo laptops which have conexant codec 0x14f11f86, these 3 laptops also have the noise issue when rebooting, after letting the codec enter D3 before rebooting or poweroff, the noise disappers. Instead of adding a new ID again in the reboot_notify(), let us make this function apply to all conexant codec. In theory make codec enter D3 before rebooting or poweroff is harmless, and I tested this change on a couple of other Lenovo laptops which have different conexant codecs, there is no side effect so far. Cc: stable@vger.kernel.org Signed-off-by: Hui Wang Signed-off-by: Takashi Iwai sound/pci/hda/patch_conexant.c | 9 --------- 1 file changed, 9 deletions(-) commit 6d5afe20397b478192ed8c38ec0ee10fa3aec649 Author: zhengbin Date: Tue Aug 13 22:05:50 2019 +0800 sctp: fix memleak in sctp_send_reset_streams If the stream outq is not empty, need to kfree nstr_list. Fixes: d570a59c5b5f ("sctp: only allow the out stream reset when the stream outq is empty") Reported-by: Hulk Robot Signed-off-by: zhengbin Acked-by: Marcelo Ricardo Leitner Acked-by: Neil Horman Signed-off-by: Jakub Kicinski net/sctp/stream.c | 1 + 1 file changed, 1 insertion(+) commit d00ee64e1dcf09b3afefd1340f3e9eb637272714 Author: David Ahern Date: Mon Aug 12 13:07:07 2019 -0700 netlink: Fix nlmsg_parse as a wrapper for strict message parsing Eric reported a syzbot warning: BUG: KMSAN: uninit-value in nh_valid_get_del_req+0x6f1/0x8c0 net/ipv4/nexthop.c:1510 CPU: 0 PID: 11812 Comm: syz-executor444 Not tainted 5.3.0-rc3+ #17 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x191/0x1f0 lib/dump_stack.c:113 kmsan_report+0x162/0x2d0 mm/kmsan/kmsan_report.c:109 __msan_warning+0x75/0xe0 mm/kmsan/kmsan_instr.c:294 nh_valid_get_del_req+0x6f1/0x8c0 net/ipv4/nexthop.c:1510 rtm_del_nexthop+0x1b1/0x610 net/ipv4/nexthop.c:1543 rtnetlink_rcv_msg+0x115a/0x1580 net/core/rtnetlink.c:5223 netlink_rcv_skb+0x431/0x620 net/netlink/af_netlink.c:2477 rtnetlink_rcv+0x50/0x60 net/core/rtnetlink.c:5241 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0xf6c/0x1050 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x110f/0x1330 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:637 [inline] sock_sendmsg net/socket.c:657 [inline] ___sys_sendmsg+0x14ff/0x1590 net/socket.c:2311 __sys_sendmmsg+0x53a/0xae0 net/socket.c:2413 __do_sys_sendmmsg net/socket.c:2442 [inline] __se_sys_sendmmsg+0xbd/0xe0 net/socket.c:2439 __x64_sys_sendmmsg+0x56/0x70 net/socket.c:2439 do_syscall_64+0xbc/0xf0 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x63/0xe7 The root cause is nlmsg_parse calling __nla_parse which means the header struct size is not checked. nlmsg_parse should be a wrapper around __nlmsg_parse with NL_VALIDATE_STRICT for the validate argument very much like nlmsg_parse_deprecated is for NL_VALIDATE_LIBERAL. Fixes: 3de6440354465 ("netlink: re-add parse/validate functions in strict mode") Reported-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David Ahern Reviewed-by: Eric Dumazet Signed-off-by: Jakub Kicinski include/net/netlink.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit c36757eb9dee13681227ad3676d37f14b3a2b2af Author: Heiner Kallweit Date: Mon Aug 12 21:20:02 2019 +0200 net: phy: consider AN_RESTART status when reading link status After configuring and restarting aneg we immediately try to read the link status. On some systems the PHY may not yet have cleared the "aneg complete" and "link up" bits, resulting in a false link-up signal. See [0] for a report. Clause 22 and 45 both require the PHY to keep the AN_RESTART bit set until the PHY actually starts auto-negotiation. Let's consider this in the generic functions for reading link status. The commit marked as fixed is the first one where the patch applies cleanly. [0] https://marc.info/?t=156518400300003&r=1&w=2 Fixes: c1164bb1a631 ("net: phy: check PMAPMD link status only in genphy_c45_read_link") Tested-by: Yonglong Liu Signed-off-by: Heiner Kallweit Reviewed-by: Andrew Lunn Signed-off-by: Jakub Kicinski drivers/net/phy/phy-c45.c | 14 ++++++++++++++ drivers/net/phy/phy_device.c | 12 +++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) commit 48ec7014c56e5eb2fbf6f479896143622d834f3b Author: Wenwen Wang Date: Mon Aug 12 14:11:35 2019 -0500 net/mlx4_en: fix a memory leak bug In mlx4_en_config_rss_steer(), 'rss_map->indir_qp' is allocated through kzalloc(). After that, mlx4_qp_alloc() is invoked to configure RSS indirection. However, if mlx4_qp_alloc() fails, the allocated 'rss_map->indir_qp' is not deallocated, leading to a memory leak bug. To fix the above issue, add the 'qp_alloc_err' label to free 'rss_map->indir_qp'. Fixes: 4931c6ef04b4 ("net/mlx4_en: Optimized single ring steering") Signed-off-by: Wenwen Wang Reviewed-by: Tariq Toukan Signed-off-by: Jakub Kicinski drivers/net/ethernet/mellanox/mlx4/en_rx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 66cf4710b23ab2adda11155684a2c8826f4fe732 Author: Thomas Falcon Date: Mon Aug 12 16:13:06 2019 -0500 ibmveth: Convert multicast list size for little-endian system The ibm,mac-address-filters property defines the maximum number of addresses the hypervisor's multicast filter list can support. It is encoded as a big-endian integer in the OF device tree, but the virtual ethernet driver does not convert it for use by little-endian systems. As a result, the driver is not behaving as it should on affected systems when a large number of multicast addresses are assigned to the device. Reported-by: Hangbin Liu Signed-off-by: Thomas Falcon Signed-off-by: Jakub Kicinski drivers/net/ethernet/ibm/ibmveth.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 072f79400032f74917726cf76f4248367ea2b5b8 Author: Julian Wiedmann Date: Mon Aug 12 16:44:35 2019 +0200 s390/qeth: serialize cmd reply with concurrent timeout Callbacks for a cmd reply run outside the protection of card->lock, to allow for additional cmds to be issued & enqueued in parallel. When qeth_send_control_data() bails out for a cmd without having received a reply (eg. due to timeout), its callback may concurrently be processing a reply that just arrived. In this case, the callback potentially accesses a stale reply->reply_param area that eg. was on-stack and has already been released. To avoid this race, add some locking so that qeth_send_control_data() can (1) wait for a concurrently running callback, and (2) zap any pending callback that still wants to run. Signed-off-by: Julian Wiedmann Signed-off-by: Jakub Kicinski drivers/s390/net/qeth_core.h | 1 + drivers/s390/net/qeth_core_main.c | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) commit d568cb3f935123b4fb42b9029ebcfebc4e4533a2 Author: Alistair Francis Date: Tue Aug 13 16:32:30 2019 -0700 riscv: defconfig: Update the defconfig Update the defconfig: - Add CONFIG_HW_RANDOM=y and CONFIG_HW_RANDOM_VIRTIO=y to enable VirtIORNG when running on QEMU Signed-off-by: Alistair Francis Signed-off-by: Paul Walmsley arch/riscv/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+) commit 500bc2c1f48aa6efad9474fdbe0c7cd8d600484c Author: Alistair Francis Date: Tue Aug 13 16:32:29 2019 -0700 riscv: rv32_defconfig: Update the defconfig Update the rv32_defconfig: - Add 'CONFIG_DEVTMPFS_MOUNT=y' to match the RISC-V defconfig - Add CONFIG_HW_RANDOM=y and CONFIG_HW_RANDOM_VIRTIO=y to enable VirtIORNG when running on QEMU Signed-off-by: Alistair Francis Signed-off-by: Paul Walmsley arch/riscv/configs/rv32_defconfig | 3 +++ 1 file changed, 3 insertions(+) commit a1794de8b92ea6bc2037f445b296814ac826693e Author: Xin Long Date: Mon Aug 12 20:49:12 2019 +0800 sctp: fix the transport error_count check As the annotation says in sctp_do_8_2_transport_strike(): "If the transport error count is greater than the pf_retrans threshold, and less than pathmaxrtx ..." It should be transport->error_count checked with pathmaxrxt, instead of asoc->pf_retrans. Fixes: 5aa93bcf66f4 ("sctp: Implement quick failover draft from tsvwg") Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: Jakub Kicinski net/sctp/sm_sideeffect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 074014abdf2bd2a00da3dd14a6ae04cafc1d62cc Author: Colin Ian King Date: Tue Aug 13 15:28:18 2019 +0100 net: ieee802154: remove redundant assignment to rc Variable rc is initialized to a value that is never read and it is re-assigned later. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Stefan Schmidt net/ieee802154/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4643d67e8cb0b3536ef0ab5cddd1cedc73fa14ad Author: Mike Kravetz Date: Tue Aug 13 15:38:00 2019 -0700 hugetlbfs: fix hugetlb page migration/fault race causing SIGBUS Li Wang discovered that LTP/move_page12 V2 sometimes triggers SIGBUS in the kernel-v5.2.3 testing. This is caused by a race between hugetlb page migration and page fault. If a hugetlb page can not be allocated to satisfy a page fault, the task is sent SIGBUS. This is normal hugetlbfs behavior. A hugetlb fault mutex exists to prevent two tasks from trying to instantiate the same page. This protects against the situation where there is only one hugetlb page, and both tasks would try to allocate. Without the mutex, one would fail and SIGBUS even though the other fault would be successful. There is a similar race between hugetlb page migration and fault. Migration code will allocate a page for the target of the migration. It will then unmap the original page from all page tables. It does this unmap by first clearing the pte and then writing a migration entry. The page table lock is held for the duration of this clear and write operation. However, the beginnings of the hugetlb page fault code optimistically checks the pte without taking the page table lock. If clear (as it can be during the migration unmap operation), a hugetlb page allocation is attempted to satisfy the fault. Note that the page which will eventually satisfy this fault was already allocated by the migration code. However, the allocation within the fault path could fail which would result in the task incorrectly being sent SIGBUS. Ideally, we could take the hugetlb fault mutex in the migration code when modifying the page tables. However, locks must be taken in the order of hugetlb fault mutex, page lock, page table lock. This would require significant rework of the migration code. Instead, the issue is addressed in the hugetlb fault code. After failing to allocate a huge page, take the page table lock and check for huge_pte_none before returning an error. This is the same check that must be made further in the code even if page allocation is successful. Link: http://lkml.kernel.org/r/20190808000533.7701-1-mike.kravetz@oracle.com Fixes: 290408d4a250 ("hugetlb: hugepage migration core") Signed-off-by: Mike Kravetz Reported-by: Li Wang Tested-by: Li Wang Reviewed-by: Naoya Horiguchi Acked-by: Michal Hocko Cc: Cyril Hrubis Cc: Xishi Qiu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/hugetlb.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 28360f398778d7623a5ff8a8e90958c0d925e120 Author: Mel Gorman Date: Tue Aug 13 15:37:57 2019 -0700 mm, vmscan: do not special-case slab reclaim when watermarks are boosted Dave Chinner reported a problem pointing a finger at commit 1c30844d2dfe ("mm: reclaim small amounts of memory when an external fragmentation event occurs"). The report is extensive: https://lore.kernel.org/linux-mm/20190807091858.2857-1-david@fromorbit.com/ and it's worth recording the most relevant parts (colorful language and typos included). When running a simple, steady state 4kB file creation test to simulate extracting tarballs larger than memory full of small files into the filesystem, I noticed that once memory fills up the cache balance goes to hell. The workload is creating one dirty cached inode for every dirty page, both of which should require a single IO each to clean and reclaim, and creation of inodes is throttled by the rate at which dirty writeback runs at (via balance dirty pages). Hence the ingest rate of new cached inodes and page cache pages is identical and steady. As a result, memory reclaim should quickly find a steady balance between page cache and inode caches. The moment memory fills, the page cache is reclaimed at a much faster rate than the inode cache, and evidence suggests that the inode cache shrinker is not being called when large batches of pages are being reclaimed. In roughly the same time period that it takes to fill memory with 50% pages and 50% slab caches, memory reclaim reduces the page cache down to just dirty pages and slab caches fill the entirety of memory. The LRU is largely full of dirty pages, and we're getting spikes of random writeback from memory reclaim so it's all going to shit. Behaviour never recovers, the page cache remains pinned at just dirty pages, and nothing I could tune would make any difference. vfs_cache_pressure makes no difference - I would set it so high it should trim the entire inode caches in a single pass, yet it didn't do anything. It was clear from tracing and live telemetry that the shrinkers were pretty much not running except when there was absolutely no memory free at all, and then they did the minimum necessary to free memory to make progress. So I went looking at the code, trying to find places where pages got reclaimed and the shrinkers weren't called. There's only one - kswapd doing boosted reclaim as per commit 1c30844d2dfe ("mm: reclaim small amounts of memory when an external fragmentation event occurs"). The watermark boosting introduced by the commit is triggered in response to an allocation "fragmentation event". The boosting was not intended to target THP specifically and triggers even if THP is disabled. However, with Dave's perfectly reasonable workload, fragmentation events can be very common given the ratio of slab to page cache allocations so boosting remains active for long periods of time. As high-order allocations might use compaction and compaction cannot move slab pages the decision was made in the commit to special-case kswapd when watermarks are boosted -- kswapd avoids reclaiming slab as reclaiming slab does not directly help compaction. As Dave notes, this decision means that slab can be artificially protected for long periods of time and messes up the balance with slab and page caches. Removing the special casing can still indirectly help avoid fragmentation by avoiding fragmentation-causing events due to slab allocation as pages from a slab pageblock will have some slab objects freed. Furthermore, with the special casing, reclaim behaviour is unpredictable as kswapd sometimes examines slab and sometimes does not in a manner that is tricky to tune or analyse. This patch removes the special casing. The downside is that this is not a universal performance win. Some benchmarks that depend on the residency of data when rereading metadata may see a regression when slab reclaim is restored to its original behaviour. Similarly, some benchmarks that only read-once or write-once may perform better when page reclaim is too aggressive. The primary upside is that slab shrinker is less surprising (arguably more sane but that's a matter of opinion), behaves consistently regardless of the fragmentation state of the system and properly obeys VM sysctls. A fsmark benchmark configuration was constructed similar to what Dave reported and is codified by the mmtest configuration config-io-fsmark-small-file-stream. It was evaluated on a 1-socket machine to avoid dealing with NUMA-related issues and the timing of reclaim. The storage was an SSD Samsung Evo and a fresh trimmed XFS filesystem was used for the test data. This is not an exact replication of Dave's setup. The configuration scales its parameters depending on the memory size of the SUT to behave similarly across machines. The parameters mean the first sample reported by fs_mark is using 50% of RAM which will barely be throttled and look like a big outlier. Dave used fake NUMA to have multiple kswapd instances which I didn't replicate. Finally, the number of iterations differ from Dave's test as the target disk was not large enough. While not identical, it should be representative. fsmark 5.3.0-rc3 5.3.0-rc3 vanilla shrinker-v1r1 Min 1-files/sec 4444.80 ( 0.00%) 4765.60 ( 7.22%) 1st-qrtle 1-files/sec 5005.10 ( 0.00%) 5091.70 ( 1.73%) 2nd-qrtle 1-files/sec 4917.80 ( 0.00%) 4855.60 ( -1.26%) 3rd-qrtle 1-files/sec 4667.40 ( 0.00%) 4831.20 ( 3.51%) Max-1 1-files/sec 11421.50 ( 0.00%) 9999.30 ( -12.45%) Max-5 1-files/sec 11421.50 ( 0.00%) 9999.30 ( -12.45%) Max-10 1-files/sec 11421.50 ( 0.00%) 9999.30 ( -12.45%) Max-90 1-files/sec 4649.60 ( 0.00%) 4780.70 ( 2.82%) Max-95 1-files/sec 4491.00 ( 0.00%) 4768.20 ( 6.17%) Max-99 1-files/sec 4491.00 ( 0.00%) 4768.20 ( 6.17%) Max 1-files/sec 11421.50 ( 0.00%) 9999.30 ( -12.45%) Hmean 1-files/sec 5004.75 ( 0.00%) 5075.96 ( 1.42%) Stddev 1-files/sec 1778.70 ( 0.00%) 1369.66 ( 23.00%) CoeffVar 1-files/sec 33.70 ( 0.00%) 26.05 ( 22.71%) BHmean-99 1-files/sec 5053.72 ( 0.00%) 5101.52 ( 0.95%) BHmean-95 1-files/sec 5053.72 ( 0.00%) 5101.52 ( 0.95%) BHmean-90 1-files/sec 5107.05 ( 0.00%) 5131.41 ( 0.48%) BHmean-75 1-files/sec 5208.45 ( 0.00%) 5206.68 ( -0.03%) BHmean-50 1-files/sec 5405.53 ( 0.00%) 5381.62 ( -0.44%) BHmean-25 1-files/sec 6179.75 ( 0.00%) 6095.14 ( -1.37%) 5.3.0-rc3 5.3.0-rc3 vanillashrinker-v1r1 Duration User 501.82 497.29 Duration System 4401.44 4424.08 Duration Elapsed 8124.76 8358.05 This is showing a slight skew for the max result representing a large outlier for the 1st, 2nd and 3rd quartile are similar indicating that the bulk of the results show little difference. Note that an earlier version of the fsmark configuration showed a regression but that included more samples taken while memory was still filling. Note that the elapsed time is higher. Part of this is that the configuration included time to delete all the test files when the test completes -- the test automation handles the possibility of testing fsmark with multiple thread counts. Without the patch, many of these objects would be memory resident which is part of what the patch is addressing. There are other important observations that justify the patch. 1. With the vanilla kernel, the number of dirty pages in the system is very low for much of the test. With this patch, dirty pages is generally kept at 10% which matches vm.dirty_background_ratio which is normal expected historical behaviour. 2. With the vanilla kernel, the ratio of Slab/Pagecache is close to 0.95 for much of the test i.e. Slab is being left alone and dominating memory consumption. With the patch applied, the ratio varies between 0.35 and 0.45 with the bulk of the measured ratios roughly half way between those values. This is a different balance to what Dave reported but it was at least consistent. 3. Slabs are scanned throughout the entire test with the patch applied. The vanille kernel has periods with no scan activity and then relatively massive spikes. 4. Without the patch, kswapd scan rates are very variable. With the patch, the scan rates remain quite steady. 4. Overall vmstats are closer to normal expectations 5.3.0-rc3 5.3.0-rc3 vanilla shrinker-v1r1 Ops Direct pages scanned 99388.00 328410.00 Ops Kswapd pages scanned 45382917.00 33451026.00 Ops Kswapd pages reclaimed 30869570.00 25239655.00 Ops Direct pages reclaimed 74131.00 5830.00 Ops Kswapd efficiency % 68.02 75.45 Ops Kswapd velocity 5585.75 4002.25 Ops Page reclaim immediate 1179721.00 430927.00 Ops Slabs scanned 62367361.00 73581394.00 Ops Direct inode steals 2103.00 1002.00 Ops Kswapd inode steals 570180.00 5183206.00 o Vanilla kernel is hitting direct reclaim more frequently, not very much in absolute terms but the fact the patch reduces it is interesting o "Page reclaim immediate" in the vanilla kernel indicates dirty pages are being encountered at the tail of the LRU. This is generally bad and means in this case that the LRU is not long enough for dirty pages to be cleaned by the background flush in time. This is much reduced by the patch. o With the patch, kswapd is reclaiming 10 times more slab pages than with the vanilla kernel. This is indicative of the watermark boosting over-protecting slab A more complete set of tests were run that were part of the basis for introducing boosting and while there are some differences, they are well within tolerances. Bottom line, the special casing kswapd to avoid slab behaviour is unpredictable and can lead to abnormal results for normal workloads. This patch restores the expected behaviour that slab and page cache is balanced consistently for a workload with a steady allocation ratio of slab/pagecache pages. It also means that if there are workloads that favour the preservation of slab over pagecache that it can be tuned via vm.vfs_cache_pressure where as the vanilla kernel effectively ignores the parameter when boosting is active. Link: http://lkml.kernel.org/r/20190808182946.GM2739@techsingularity.net Fixes: 1c30844d2dfe ("mm: reclaim small amounts of memory when an external fragmentation event occurs") Signed-off-by: Mel Gorman Reviewed-by: Dave Chinner Acked-by: Vlastimil Babka Cc: Michal Hocko Cc: [5.0+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmscan.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) commit a8282608c88e08b1782141026eab61204c1e533f Author: Andrea Arcangeli Date: Tue Aug 13 15:37:53 2019 -0700 Revert "mm, thp: restore node-local hugepage allocations" This reverts commit 2f0799a0ffc033b ("mm, thp: restore node-local hugepage allocations"). commit 2f0799a0ffc033b was rightfully applied to avoid the risk of a severe regression that was reported by the kernel test robot at the end of the merge window. Now we understood the regression was a false positive and was caused by a significant increase in fairness during a swap trashing benchmark. So it's safe to re-apply the fix and continue improving the code from there. The benchmark that reported the regression is very useful, but it provides a meaningful result only when there is no significant alteration in fairness during the workload. The removal of __GFP_THISNODE increased fairness. __GFP_THISNODE cannot be used in the generic page faults path for new memory allocations under the MPOL_DEFAULT mempolicy, or the allocation behavior significantly deviates from what the MPOL_DEFAULT semantics are supposed to be for THP and 4k allocations alike. Setting THP defrag to "always" or using MADV_HUGEPAGE (with THP defrag set to "madvise") has never meant to provide an implicit MPOL_BIND on the "current" node the task is running on, causing swap storms and providing a much more aggressive behavior than even zone_reclaim_node = 3. Any workload who could have benefited from __GFP_THISNODE has now to enable zone_reclaim_mode=1||2||3. __GFP_THISNODE implicitly provided the zone_reclaim_mode behavior, but it only did so if THP was enabled: if THP was disabled, there would have been no chance to get any 4k page from the current node if the current node was full of pagecache, which further shows how this __GFP_THISNODE was misplaced in MADV_HUGEPAGE. MADV_HUGEPAGE has never been intended to provide any zone_reclaim_mode semantics, in fact the two are orthogonal, zone_reclaim_mode = 1|2|3 must work exactly the same with MADV_HUGEPAGE set or not. The performance characteristic of memory depends on the hardware details. The numbers below are obtained on Naples/EPYC architecture and the N/A projection extends them to show what we should aim for in the future as a good THP NUMA locality default. The benchmark used exercises random memory seeks (note: the cost of the page faults is not part of the measurement). D0 THP | D0 4k | D1 THP | D1 4k | D2 THP | D2 4k | D3 THP | D3 4k | ... 0% | +43% | +45% | +106% | +131% | +224% | N/A | N/A D0 means distance zero (i.e. local memory), D1 means distance one (i.e. intra socket memory), D2 means distance two (i.e. inter socket memory), etc... For the guest physical memory allocated by qemu and for guest mode kernel the performance characteristic of RAM is more complex and an ideal default could be: D0 THP | D1 THP | D0 4k | D2 THP | D1 4k | D3 THP | D2 4k | D3 4k | ... 0% | +58% | +101% | N/A | +222% | N/A | N/A | N/A NOTE: the N/A are projections and haven't been measured yet, the measurement in this case is done on a 1950x with only two NUMA nodes. The THP case here means THP was used both in the host and in the guest. After applying this commit the THP NUMA locality order that we'll get out of MADV_HUGEPAGE is this: D0 THP | D1 THP | D2 THP | D3 THP | ... | D0 4k | D1 4k | D2 4k | D3 4k | ... Before this commit it was: D0 THP | D0 4k | D1 4k | D2 4k | D3 4k | ... Even if we ignore the breakage of large workloads that can't fit in a single node that the __GFP_THISNODE implicit "current node" mbind caused, the THP NUMA locality order provided by __GFP_THISNODE was still not the one we shall aim for in the long term (i.e. the first one at the top). After this commit is applied, we can introduce a new allocator multi order API and to replace those two alloc_pages_vmas calls in the page fault path, with a single multi order call: unsigned int order = (1 << HPAGE_PMD_ORDER) | (1 << 0); page = alloc_pages_multi_order(..., &order); if (!page) goto out; if (!(order & (1 << 0))) { VM_WARN_ON(order != 1 << HPAGE_PMD_ORDER); /* THP fault */ } else { VM_WARN_ON(order != 1 << 0); /* 4k fallback */ } The page allocator logic has to be altered so that when it fails on any zone with order 9, it has to try again with a order 0 before falling back to the next zone in the zonelist. After that we need to do more measurements and evaluate if adding an opt-in feature for guest mode is worth it, to swap "DN 4k | DN+1 THP" with "DN+1 THP | DN 4k" at every NUMA distance crossing. Link: http://lkml.kernel.org/r/20190503223146.2312-3-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Acked-by: Michal Hocko Acked-by: Mel Gorman Cc: Vlastimil Babka Cc: David Rientjes Cc: Zi Yan Cc: Stefan Priebe - Profihost AG Cc: "Kirill A. Shutemov" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mempolicy.h | 2 ++ mm/huge_memory.c | 42 ++++++++++++++++++++++++++---------------- mm/mempolicy.c | 2 +- 3 files changed, 29 insertions(+), 17 deletions(-) commit 92717d429b38e4f9f934eed7e605cc42858f1839 Author: Andrea Arcangeli Date: Tue Aug 13 15:37:50 2019 -0700 Revert "Revert "mm, thp: consolidate THP gfp handling into alloc_hugepage_direct_gfpmask"" Patch series "reapply: relax __GFP_THISNODE for MADV_HUGEPAGE mappings". The fixes for what was originally reported as "pathological THP behavior" we rightfully reverted to be sure not to introduced regressions at end of a merge window after a severe regression report from the kernel bot. We can safely re-apply them now that we had time to analyze the problem. The mm process worked fine, because the good fixes were eventually committed upstream without excessive delay. The regression reported by the kernel bot however forced us to revert the good fixes to be sure not to introduce regressions and to give us the time to analyze the issue further. The silver lining is that this extra time allowed to think more at this issue and also plan for a future direction to improve things further in terms of THP NUMA locality. This patch (of 2): This reverts commit 356ff8a9a78fb35d ("Revert "mm, thp: consolidate THP gfp handling into alloc_hugepage_direct_gfpmask"). So it reapplies 89c83fb539f954 ("mm, thp: consolidate THP gfp handling into alloc_hugepage_direct_gfpmask"). Consolidation of the THP allocation flags at the same place was meant to be a clean up to easier handle otherwise scattered code which is imposing a maintenance burden. There were no real problems observed with the gfp mask consolidation but the reversion was rushed through without a larger consensus regardless. This patch brings the consolidation back because this should make the long term maintainability easier as well as it should allow future changes to be less error prone. [mhocko@kernel.org: changelog additions] Link: http://lkml.kernel.org/r/20190503223146.2312-2-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Acked-by: Michal Hocko Cc: Mel Gorman Cc: Vlastimil Babka Cc: David Rientjes Cc: Zi Yan Cc: Stefan Priebe - Profihost AG Cc: "Kirill A. Shutemov" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/gfp.h | 12 ++++-------- mm/huge_memory.c | 27 ++++++++++++++------------- mm/mempolicy.c | 32 +++----------------------------- mm/shmem.c | 2 +- 4 files changed, 22 insertions(+), 51 deletions(-) commit 0cfaee2af3a04c0be5f056cebe5f804dedc59a43 Author: Qian Cai Date: Tue Aug 13 15:37:47 2019 -0700 include/asm-generic/5level-fixup.h: fix variable 'p4d' set but not used A compiler throws a warning on an arm64 system since commit 9849a5697d3d ("arch, mm: convert all architectures to use 5level-fixup.h"), mm/kasan/init.c: In function 'kasan_free_p4d': mm/kasan/init.c:344:9: warning: variable 'p4d' set but not used [-Wunused-but-set-variable] p4d_t *p4d; ^~~ because p4d_none() in "5level-fixup.h" is compiled away while it is a static inline function in "pgtable-nopud.h". However, if converted p4d_none() to a static inline there, powerpc would be unhappy as it reads those in assembler language in "arch/powerpc/include/asm/book3s/64/pgtable.h", so it needs to skip assembly include for the static inline C function. While at it, converted a few similar functions to be consistent with the ones in "pgtable-nopud.h". Link: http://lkml.kernel.org/r/20190806232917.881-1-cai@lca.pw Signed-off-by: Qian Cai Acked-by: Arnd Bergmann Cc: Kirill A. Shutemov Cc: Michal Hocko Cc: Jason Gunthorpe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/asm-generic/5level-fixup.h | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) commit 6a2aeab59e97101b4001bac84388fc49a992f87e Author: NeilBrown Date: Tue Aug 13 15:37:44 2019 -0700 seq_file: fix problem when seeking mid-record If you use lseek or similar (e.g. pread) to access a location in a seq_file file that is within a record, rather than at a record boundary, then the first read will return the remainder of the record, and the second read will return the whole of that same record (instead of the next record). When seeking to a record boundary, the next record is correctly returned. This bug was introduced by a recent patch (identified below). Before that patch, seq_read() would increment m->index when the last of the buffer was returned (m->count == 0). After that patch, we rely on ->next to increment m->index after filling the buffer - but there was one place where that didn't happen. Link: https://lkml.kernel.org/lkml/877e7xl029.fsf@notabene.neil.brown.name/ Fixes: 1f4aace60b0e ("fs/seq_file.c: simplify seq_file iteration code and interface") Signed-off-by: NeilBrown Reported-by: Sergei Turchanov Tested-by: Sergei Turchanov Cc: Alexander Viro Cc: Markus Elfring Cc: [4.19+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/seq_file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ec9f02384f6053f2a5417e82b65078edc5364a8d Author: Roman Gushchin Date: Tue Aug 13 15:37:41 2019 -0700 mm: workingset: fix vmstat counters for shadow nodes Memcg counters for shadow nodes are broken because the memcg pointer is obtained in a wrong way. The following approach is used: virt_to_page(xa_node)->mem_cgroup Since commit 4d96ba353075 ("mm: memcg/slab: stop setting page->mem_cgroup pointer for slab pages") page->mem_cgroup pointer isn't set for slab pages, so memcg_from_slab_page() should be used instead. Also I doubt that it ever worked correctly: virt_to_head_page() should be used instead of virt_to_page(). Otherwise objects residing on tail pages are not accounted, because only the head page contains a valid mem_cgroup pointer. That was a case since the introduction of these counters by the commit 68d48e6a2df5 ("mm: workingset: add vmstat counter for shadow nodes"). Link: http://lkml.kernel.org/r/20190801233532.138743-1-guro@fb.com Fixes: 4d96ba353075 ("mm: memcg/slab: stop setting page->mem_cgroup pointer for slab pages") Signed-off-by: Roman Gushchin Acked-by: Johannes Weiner Cc: Vladimir Davydov Cc: Shakeel Butt Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memcontrol.h | 19 +++++++++++++++++++ mm/memcontrol.c | 20 ++++++++++++++++++++ mm/workingset.c | 10 ++++------ 3 files changed, 43 insertions(+), 6 deletions(-) commit 951531691c4bcaa59f56a316e018bc2ff1ddf855 Author: Isaac J. Manjarres Date: Tue Aug 13 15:37:37 2019 -0700 mm/usercopy: use memory range to be accessed for wraparound check Currently, when checking to see if accessing n bytes starting at address "ptr" will cause a wraparound in the memory addresses, the check in check_bogus_address() adds an extra byte, which is incorrect, as the range of addresses that will be accessed is [ptr, ptr + (n - 1)]. This can lead to incorrectly detecting a wraparound in the memory address, when trying to read 4 KB from memory that is mapped to the the last possible page in the virtual address space, when in fact, accessing that range of memory would not cause a wraparound to occur. Use the memory range that will actually be accessed when considering if accessing a certain amount of bytes will cause the memory address to wrap around. Link: http://lkml.kernel.org/r/1564509253-23287-1-git-send-email-isaacm@codeaurora.org Fixes: f5509cc18daa ("mm: Hardened usercopy") Signed-off-by: Prasad Sodagudi Signed-off-by: Isaac J. Manjarres Co-developed-by: Prasad Sodagudi Reviewed-by: William Kucharski Acked-by: Kees Cook Cc: Greg Kroah-Hartman Cc: Trilok Soni Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/usercopy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fcf3a5b62f431ce9feeac73afbe128b7b6395dbc Author: Catalin Marinas Date: Tue Aug 13 15:37:34 2019 -0700 mm: kmemleak: disable early logging in case of error If an error occurs during kmemleak_init() (e.g. kmem cache cannot be created), kmemleak is disabled but kmemleak_early_log remains enabled. Subsequently, when the .init.text section is freed, the log_early() function no longer exists. To avoid a page fault in such scenario, ensure that kmemleak_disable() also disables early logging. Link: http://lkml.kernel.org/r/20190731152302.42073-1-catalin.marinas@arm.com Signed-off-by: Catalin Marinas Reported-by: Qian Cai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/kmemleak.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5336e52c9e46afa69b7a85a0a091f0e4daa23d6e Author: Kuppuswamy Sathyanarayanan Date: Tue Aug 13 15:37:31 2019 -0700 mm/vmalloc.c: fix percpu free VM area search criteria Recent changes to the vmalloc code by commit 68ad4a330433 ("mm/vmalloc.c: keep track of free blocks for vmap allocation") can cause spurious percpu allocation failures. These, in turn, can result in panic()s in the slub code. One such possible panic was reported by Dave Hansen in following link https://lkml.org/lkml/2019/6/19/939. Another related panic observed is, RIP: 0033:0x7f46f7441b9b Call Trace: dump_stack+0x61/0x80 pcpu_alloc.cold.30+0x22/0x4f mem_cgroup_css_alloc+0x110/0x650 cgroup_apply_control_enable+0x133/0x330 cgroup_mkdir+0x41b/0x500 kernfs_iop_mkdir+0x5a/0x90 vfs_mkdir+0x102/0x1b0 do_mkdirat+0x7d/0xf0 do_syscall_64+0x5b/0x180 entry_SYSCALL_64_after_hwframe+0x44/0xa9 VMALLOC memory manager divides the entire VMALLOC space (VMALLOC_START to VMALLOC_END) into multiple VM areas (struct vm_areas), and it mainly uses two lists (vmap_area_list & free_vmap_area_list) to track the used and free VM areas in VMALLOC space. And pcpu_get_vm_areas(offsets[], sizes[], nr_vms, align) function is used for allocating congruent VM areas for percpu memory allocator. In order to not conflict with VMALLOC users, pcpu_get_vm_areas allocates VM areas near the end of the VMALLOC space. So the search for free vm_area for the given requirement starts near VMALLOC_END and moves upwards towards VMALLOC_START. Prior to commit 68ad4a330433, the search for free vm_area in pcpu_get_vm_areas() involves following two main steps. Step 1: Find a aligned "base" adress near VMALLOC_END. va = free vm area near VMALLOC_END Step 2: Loop through number of requested vm_areas and check, Step 2.1: if (base < VMALLOC_START) 1. fail with error Step 2.2: // end is offsets[area] + sizes[area] if (base + end > va->vm_end) 1. Move the base downwards and repeat Step 2 Step 2.3: if (base + start < va->vm_start) 1. Move to previous free vm_area node, find aligned base address and repeat Step 2 But Commit 68ad4a330433 removed Step 2.2 and modified Step 2.3 as below: Step 2.3: if (base + start < va->vm_start || base + end > va->vm_end) 1. Move to previous free vm_area node, find aligned base address and repeat Step 2 Above change is the root cause of spurious percpu memory allocation failures. For example, consider a case where a relatively large vm_area (~ 30 TB) was ignored in free vm_area search because it did not pass the base + end < vm->vm_end boundary check. Ignoring such large free vm_area's would lead to not finding free vm_area within boundary of VMALLOC_start to VMALLOC_END which in turn leads to allocation failures. So modify the search algorithm to include Step 2.2. Link: http://lkml.kernel.org/r/20190729232139.91131-1-sathyanarayanan.kuppuswamy@linux.intel.com Fixes: 68ad4a330433 ("mm/vmalloc.c: keep track of free blocks for vmap allocation") Signed-off-by: Kuppuswamy Sathyanarayanan Reported-by: Dave Hansen Acked-by: Dennis Zhou Reviewed-by: Uladzislau Rezki (Sony) Cc: Roman Gushchin Cc: sathyanarayanan kuppuswamy Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmalloc.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 54a83d6bcbf8f4700013766b974bf9190d40b689 Author: Miles Chen Date: Tue Aug 13 15:37:28 2019 -0700 mm/memcontrol.c: fix use after free in mem_cgroup_iter() This patch is sent to report an use after free in mem_cgroup_iter() after merging commit be2657752e9e ("mm: memcg: fix use after free in mem_cgroup_iter()"). I work with android kernel tree (4.9 & 4.14), and commit be2657752e9e ("mm: memcg: fix use after free in mem_cgroup_iter()") has been merged to the trees. However, I can still observe use after free issues addressed in the commit be2657752e9e. (on low-end devices, a few times this month) backtrace: css_tryget <- crash here mem_cgroup_iter shrink_node shrink_zones do_try_to_free_pages try_to_free_pages __perform_reclaim __alloc_pages_direct_reclaim __alloc_pages_slowpath __alloc_pages_nodemask To debug, I poisoned mem_cgroup before freeing it: static void __mem_cgroup_free(struct mem_cgroup *memcg) for_each_node(node) free_mem_cgroup_per_node_info(memcg, node); free_percpu(memcg->stat); + /* poison memcg before freeing it */ + memset(memcg, 0x78, sizeof(struct mem_cgroup)); kfree(memcg); } The coredump shows the position=0xdbbc2a00 is freed. (gdb) p/x ((struct mem_cgroup_per_node *)0xe5009e00)->iter[8] $13 = {position = 0xdbbc2a00, generation = 0x2efd} 0xdbbc2a00: 0xdbbc2e00 0x00000000 0xdbbc2800 0x00000100 0xdbbc2a10: 0x00000200 0x78787878 0x00026218 0x00000000 0xdbbc2a20: 0xdcad6000 0x00000001 0x78787800 0x00000000 0xdbbc2a30: 0x78780000 0x00000000 0x0068fb84 0x78787878 0xdbbc2a40: 0x78787878 0x78787878 0x78787878 0xe3fa5cc0 0xdbbc2a50: 0x78787878 0x78787878 0x00000000 0x00000000 0xdbbc2a60: 0x00000000 0x00000000 0x00000000 0x00000000 0xdbbc2a70: 0x00000000 0x00000000 0x00000000 0x00000000 0xdbbc2a80: 0x00000000 0x00000000 0x00000000 0x00000000 0xdbbc2a90: 0x00000001 0x00000000 0x00000000 0x00100000 0xdbbc2aa0: 0x00000001 0xdbbc2ac8 0x00000000 0x00000000 0xdbbc2ab0: 0x00000000 0x00000000 0x00000000 0x00000000 0xdbbc2ac0: 0x00000000 0x00000000 0xe5b02618 0x00001000 0xdbbc2ad0: 0x00000000 0x78787878 0x78787878 0x78787878 0xdbbc2ae0: 0x78787878 0x78787878 0x78787878 0x78787878 0xdbbc2af0: 0x78787878 0x78787878 0x78787878 0x78787878 0xdbbc2b00: 0x78787878 0x78787878 0x78787878 0x78787878 0xdbbc2b10: 0x78787878 0x78787878 0x78787878 0x78787878 0xdbbc2b20: 0x78787878 0x78787878 0x78787878 0x78787878 0xdbbc2b30: 0x78787878 0x78787878 0x78787878 0x78787878 0xdbbc2b40: 0x78787878 0x78787878 0x78787878 0x78787878 0xdbbc2b50: 0x78787878 0x78787878 0x78787878 0x78787878 0xdbbc2b60: 0x78787878 0x78787878 0x78787878 0x78787878 0xdbbc2b70: 0x78787878 0x78787878 0x78787878 0x78787878 0xdbbc2b80: 0x78787878 0x78787878 0x00000000 0x78787878 0xdbbc2b90: 0x78787878 0x78787878 0x78787878 0x78787878 0xdbbc2ba0: 0x78787878 0x78787878 0x78787878 0x78787878 In the reclaim path, try_to_free_pages() does not setup sc.target_mem_cgroup and sc is passed to do_try_to_free_pages(), ..., shrink_node(). In mem_cgroup_iter(), root is set to root_mem_cgroup because sc->target_mem_cgroup is NULL. It is possible to assign a memcg to root_mem_cgroup.nodeinfo.iter in mem_cgroup_iter(). try_to_free_pages struct scan_control sc = {...}, target_mem_cgroup is 0x0; do_try_to_free_pages shrink_zones shrink_node mem_cgroup *root = sc->target_mem_cgroup; memcg = mem_cgroup_iter(root, NULL, &reclaim); mem_cgroup_iter() if (!root) root = root_mem_cgroup; ... css = css_next_descendant_pre(css, &root->css); memcg = mem_cgroup_from_css(css); cmpxchg(&iter->position, pos, memcg); My device uses memcg non-hierarchical mode. When we release a memcg: invalidate_reclaim_iterators() reaches only dead_memcg and its parents. If non-hierarchical mode is used, invalidate_reclaim_iterators() never reaches root_mem_cgroup. static void invalidate_reclaim_iterators(struct mem_cgroup *dead_memcg) { struct mem_cgroup *memcg = dead_memcg; for (; memcg; memcg = parent_mem_cgroup(memcg) ... } So the use after free scenario looks like: CPU1 CPU2 try_to_free_pages do_try_to_free_pages shrink_zones shrink_node mem_cgroup_iter() if (!root) root = root_mem_cgroup; ... css = css_next_descendant_pre(css, &root->css); memcg = mem_cgroup_from_css(css); cmpxchg(&iter->position, pos, memcg); invalidate_reclaim_iterators(memcg); ... __mem_cgroup_free() kfree(memcg); try_to_free_pages do_try_to_free_pages shrink_zones shrink_node mem_cgroup_iter() if (!root) root = root_mem_cgroup; ... mz = mem_cgroup_nodeinfo(root, reclaim->pgdat->node_id); iter = &mz->iter[reclaim->priority]; pos = READ_ONCE(iter->position); css_tryget(&pos->css) <- use after free To avoid this, we should also invalidate root_mem_cgroup.nodeinfo.iter in invalidate_reclaim_iterators(). [cai@lca.pw: fix -Wparentheses compilation warning] Link: http://lkml.kernel.org/r/1564580753-17531-1-git-send-email-cai@lca.pw Link: http://lkml.kernel.org/r/20190730015729.4406-1-miles.chen@mediatek.com Fixes: 5ac8fb31ad2e ("mm: memcontrol: convert reclaim iterator to simple css refcounting") Signed-off-by: Miles Chen Signed-off-by: Qian Cai Acked-by: Michal Hocko Cc: Johannes Weiner Cc: Vladimir Davydov Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memcontrol.c | 39 +++++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 10 deletions(-) commit b997052bc3ac444a0bceab1093aff7ae71ed419e Author: Henry Burns Date: Tue Aug 13 15:37:25 2019 -0700 mm/z3fold.c: fix z3fold_destroy_pool() race condition The constraint from the zpool use of z3fold_destroy_pool() is there are no outstanding handles to memory (so no active allocations), but it is possible for there to be outstanding work on either of the two wqs in the pool. Calling z3fold_deregister_migration() before the workqueues are drained means that there can be allocated pages referencing a freed inode, causing any thread in compaction to be able to trip over the bad pointer in PageMovable(). Link: http://lkml.kernel.org/r/20190726224810.79660-2-henryburns@google.com Fixes: 1f862989b04a ("mm/z3fold.c: support page migration") Signed-off-by: Henry Burns Reviewed-by: Shakeel Butt Reviewed-by: Jonathan Adams Cc: Vitaly Vul Cc: Vitaly Wool Cc: David Howells Cc: Thomas Gleixner Cc: Al Viro Cc: Henry Burns Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/z3fold.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 6051d3bd3b91e96c59e62b8be2dba1cc2b19ee40 Author: Henry Burns Date: Tue Aug 13 15:37:21 2019 -0700 mm/z3fold.c: fix z3fold_destroy_pool() ordering The constraint from the zpool use of z3fold_destroy_pool() is there are no outstanding handles to memory (so no active allocations), but it is possible for there to be outstanding work on either of the two wqs in the pool. If there is work queued on pool->compact_workqueue when it is called, z3fold_destroy_pool() will do: z3fold_destroy_pool() destroy_workqueue(pool->release_wq) destroy_workqueue(pool->compact_wq) drain_workqueue(pool->compact_wq) do_compact_page(zhdr) kref_put(&zhdr->refcount) __release_z3fold_page(zhdr, ...) queue_work_on(pool->release_wq, &pool->work) *BOOM* So compact_wq needs to be destroyed before release_wq. Link: http://lkml.kernel.org/r/20190726224810.79660-1-henryburns@google.com Fixes: 5d03a6613957 ("mm/z3fold.c: use kref to prevent page free/compact race") Signed-off-by: Henry Burns Reviewed-by: Shakeel Butt Reviewed-by: Jonathan Adams Cc: Vitaly Vul Cc: Vitaly Wool Cc: David Howells Cc: Thomas Gleixner Cc: Al Viro Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/z3fold.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit a53190a4aaa36494f4d7209fd1fcc6f2ee08e0e0 Author: Yang Shi Date: Tue Aug 13 15:37:18 2019 -0700 mm: mempolicy: handle vma with unmovable pages mapped correctly in mbind When running syzkaller internally, we ran into the below bug on 4.9.x kernel: kernel BUG at mm/huge_memory.c:2124! invalid opcode: 0000 [#1] SMP KASAN CPU: 0 PID: 1518 Comm: syz-executor107 Not tainted 4.9.168+ #2 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 0.5.1 01/01/2011 task: ffff880067b34900 task.stack: ffff880068998000 RIP: split_huge_page_to_list+0x8fb/0x1030 mm/huge_memory.c:2124 Call Trace: split_huge_page include/linux/huge_mm.h:100 [inline] queue_pages_pte_range+0x7e1/0x1480 mm/mempolicy.c:538 walk_pmd_range mm/pagewalk.c:50 [inline] walk_pud_range mm/pagewalk.c:90 [inline] walk_pgd_range mm/pagewalk.c:116 [inline] __walk_page_range+0x44a/0xdb0 mm/pagewalk.c:208 walk_page_range+0x154/0x370 mm/pagewalk.c:285 queue_pages_range+0x115/0x150 mm/mempolicy.c:694 do_mbind mm/mempolicy.c:1241 [inline] SYSC_mbind+0x3c3/0x1030 mm/mempolicy.c:1370 SyS_mbind+0x46/0x60 mm/mempolicy.c:1352 do_syscall_64+0x1d2/0x600 arch/x86/entry/common.c:282 entry_SYSCALL_64_after_swapgs+0x5d/0xdb Code: c7 80 1c 02 00 e8 26 0a 76 01 <0f> 0b 48 c7 c7 40 46 45 84 e8 4c RIP [] split_huge_page_to_list+0x8fb/0x1030 mm/huge_memory.c:2124 RSP with the below test: uint64_t r[1] = {0xffffffffffffffff}; int main(void) { syscall(__NR_mmap, 0x20000000, 0x1000000, 3, 0x32, -1, 0); intptr_t res = 0; res = syscall(__NR_socket, 0x11, 3, 0x300); if (res != -1) r[0] = res; *(uint32_t*)0x20000040 = 0x10000; *(uint32_t*)0x20000044 = 1; *(uint32_t*)0x20000048 = 0xc520; *(uint32_t*)0x2000004c = 1; syscall(__NR_setsockopt, r[0], 0x107, 0xd, 0x20000040, 0x10); syscall(__NR_mmap, 0x20fed000, 0x10000, 0, 0x8811, r[0], 0); *(uint64_t*)0x20000340 = 2; syscall(__NR_mbind, 0x20ff9000, 0x4000, 0x4002, 0x20000340, 0x45d4, 3); return 0; } Actually the test does: mmap(0x20000000, 16777216, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x20000000 socket(AF_PACKET, SOCK_RAW, 768) = 3 setsockopt(3, SOL_PACKET, PACKET_TX_RING, {block_size=65536, block_nr=1, frame_size=50464, frame_nr=1}, 16) = 0 mmap(0x20fed000, 65536, PROT_NONE, MAP_SHARED|MAP_FIXED|MAP_POPULATE|MAP_DENYWRITE, 3, 0) = 0x20fed000 mbind(..., MPOL_MF_STRICT|MPOL_MF_MOVE) = 0 The setsockopt() would allocate compound pages (16 pages in this test) for packet tx ring, then the mmap() would call packet_mmap() to map the pages into the user address space specified by the mmap() call. When calling mbind(), it would scan the vma to queue the pages for migration to the new node. It would split any huge page since 4.9 doesn't support THP migration, however, the packet tx ring compound pages are not THP and even not movable. So, the above bug is triggered. However, the later kernel is not hit by this issue due to commit d44d363f6578 ("mm: don't assume anonymous pages have SwapBacked flag"), which just removes the PageSwapBacked check for a different reason. But, there is a deeper issue. According to the semantic of mbind(), it should return -EIO if MPOL_MF_MOVE or MPOL_MF_MOVE_ALL was specified and MPOL_MF_STRICT was also specified, but the kernel was unable to move all existing pages in the range. The tx ring of the packet socket is definitely not movable, however, mbind() returns success for this case. Although the most socket file associates with non-movable pages, but XDP may have movable pages from gup. So, it sounds not fine to just check the underlying file type of vma in vma_migratable(). Change migrate_page_add() to check if the page is movable or not, if it is unmovable, just return -EIO. But do not abort pte walk immediately, since there may be pages off LRU temporarily. We should migrate other pages if MPOL_MF_MOVE* is specified. Set has_unmovable flag if some paged could not be not moved, then return -EIO for mbind() eventually. With this change the above test would return -EIO as expected. [yang.shi@linux.alibaba.com: fix review comments from Vlastimil] Link: http://lkml.kernel.org/r/1563556862-54056-3-git-send-email-yang.shi@linux.alibaba.com Link: http://lkml.kernel.org/r/1561162809-59140-3-git-send-email-yang.shi@linux.alibaba.com Signed-off-by: Yang Shi Reviewed-by: Vlastimil Babka Cc: Michal Hocko Cc: Mel Gorman Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mempolicy.c | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) commit d883544515aae54842c21730b880172e7894fde9 Author: Yang Shi Date: Tue Aug 13 15:37:15 2019 -0700 mm: mempolicy: make the behavior consistent when MPOL_MF_MOVE* and MPOL_MF_STRICT were specified When both MPOL_MF_MOVE* and MPOL_MF_STRICT was specified, mbind() should try best to migrate misplaced pages, if some of the pages could not be migrated, then return -EIO. There are three different sub-cases: 1. vma is not migratable 2. vma is migratable, but there are unmovable pages 3. vma is migratable, pages are movable, but migrate_pages() fails If #1 happens, kernel would just abort immediately, then return -EIO, after a7f40cfe3b7a ("mm: mempolicy: make mbind() return -EIO when MPOL_MF_STRICT is specified"). If #3 happens, kernel would set policy and migrate pages with best-effort, but won't rollback the migrated pages and reset the policy back. Before that commit, they behaves in the same way. It'd better to keep their behavior consistent. But, rolling back the migrated pages and resetting the policy back sounds not feasible, so just make #1 behave as same as #3. Userspace will know that not everything was successfully migrated (via -EIO), and can take whatever steps it deems necessary - attempt rollback, determine which exact page(s) are violating the policy, etc. Make queue_pages_range() return 1 to indicate there are unmovable pages or vma is not migratable. The #2 is not handled correctly in the current kernel, the following patch will fix it. [yang.shi@linux.alibaba.com: fix review comments from Vlastimil] Link: http://lkml.kernel.org/r/1563556862-54056-2-git-send-email-yang.shi@linux.alibaba.com Link: http://lkml.kernel.org/r/1561162809-59140-2-git-send-email-yang.shi@linux.alibaba.com Signed-off-by: Yang Shi Reviewed-by: Vlastimil Babka Cc: Michal Hocko Cc: Mel Gorman Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mempolicy.c | 68 +++++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 48 insertions(+), 20 deletions(-) commit 1de13ee59225dfc98d483f8cce7d83f97c0b31de Author: Ralph Campbell Date: Tue Aug 13 15:37:11 2019 -0700 mm/hmm: fix bad subpage pointer in try_to_unmap_one When migrating an anonymous private page to a ZONE_DEVICE private page, the source page->mapping and page->index fields are copied to the destination ZONE_DEVICE struct page and the page_mapcount() is increased. This is so rmap_walk() can be used to unmap and migrate the page back to system memory. However, try_to_unmap_one() computes the subpage pointer from a swap pte which computes an invalid page pointer and a kernel panic results such as: BUG: unable to handle page fault for address: ffffea1fffffffc8 Currently, only single pages can be migrated to device private memory so no subpage computation is needed and it can be set to "page". [rcampbell@nvidia.com: add comment] Link: http://lkml.kernel.org/r/20190724232700.23327-4-rcampbell@nvidia.com Link: http://lkml.kernel.org/r/20190719192955.30462-4-rcampbell@nvidia.com Fixes: a5430dda8a3a1c ("mm/migrate: support un-addressable ZONE_DEVICE page in migration") Signed-off-by: Ralph Campbell Cc: "Jérôme Glisse" Cc: "Kirill A. Shutemov" Cc: Mike Kravetz Cc: Christoph Hellwig Cc: Jason Gunthorpe Cc: John Hubbard Cc: Andrea Arcangeli Cc: Andrey Ryabinin Cc: Christoph Lameter Cc: Dan Williams Cc: Dave Hansen Cc: Ira Weiny Cc: Jan Kara Cc: Lai Jiangshan Cc: Logan Gunthorpe Cc: Martin Schwidefsky Cc: Matthew Wilcox Cc: Mel Gorman Cc: Michal Hocko Cc: Pekka Enberg Cc: Randy Dunlap Cc: Vlastimil Babka Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/rmap.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 7ab0ad0e74f82db1a7e0810828785e44305cff20 Author: Ralph Campbell Date: Tue Aug 13 15:37:07 2019 -0700 mm/hmm: fix ZONE_DEVICE anon page mapping reuse When a ZONE_DEVICE private page is freed, the page->mapping field can be set. If this page is reused as an anonymous page, the previous value can prevent the page from being inserted into the CPU's anon rmap table. For example, when migrating a pte_none() page to device memory: migrate_vma(ops, vma, start, end, src, dst, private) migrate_vma_collect() src[] = MIGRATE_PFN_MIGRATE migrate_vma_prepare() /* no page to lock or isolate so OK */ migrate_vma_unmap() /* no page to unmap so OK */ ops->alloc_and_copy() /* driver allocates ZONE_DEVICE page for dst[] */ migrate_vma_pages() migrate_vma_insert_page() page_add_new_anon_rmap() __page_set_anon_rmap() /* This check sees the page's stale mapping field */ if (PageAnon(page)) return /* page->mapping is not updated */ The result is that the migration appears to succeed but a subsequent CPU fault will be unable to migrate the page back to system memory or worse. Clear the page->mapping field when freeing the ZONE_DEVICE page so stale pointer data doesn't affect future page use. Link: http://lkml.kernel.org/r/20190719192955.30462-3-rcampbell@nvidia.com Fixes: b7a523109fb5c9d2d6dd ("mm: don't clear ->mapping in hmm_devmem_free") Signed-off-by: Ralph Campbell Reviewed-by: John Hubbard Reviewed-by: Christoph Hellwig Cc: Dan Williams Cc: Jason Gunthorpe Cc: Logan Gunthorpe Cc: Ira Weiny Cc: Matthew Wilcox Cc: Mel Gorman Cc: Jan Kara Cc: "Kirill A. Shutemov" Cc: Michal Hocko Cc: Andrea Arcangeli Cc: Mike Kravetz Cc: "Jérôme Glisse" Cc: Andrey Ryabinin Cc: Christoph Lameter Cc: Dave Hansen Cc: Lai Jiangshan Cc: Martin Schwidefsky Cc: Pekka Enberg Cc: Randy Dunlap Cc: Vlastimil Babka Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memremap.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 76470ccd62f18bfa0954bec10f2329339f793914 Author: Ralph Campbell Date: Tue Aug 13 15:37:04 2019 -0700 mm: document zone device struct page field usage Patch series "mm/hmm: fixes for device private page migration", v3. Testing the latest linux git tree turned up a few bugs with page migration to and from ZONE_DEVICE private and anonymous pages. Hopefully it clarifies how ZONE_DEVICE private struct page uses the same mapping and index fields from the source anonymous page mapping. This patch (of 3): Struct page for ZONE_DEVICE private pages uses the page->mapping and and page->index fields while the source anonymous pages are migrated to device private memory. This is so rmap_walk() can find the page when migrating the ZONE_DEVICE private page back to system memory. ZONE_DEVICE pmem backed fsdax pages also use the page->mapping and page->index fields when files are mapped into a process address space. Add comments to struct page and remove the unused "_zd_pad_1" field to make this more clear. Link: http://lkml.kernel.org/r/20190724232700.23327-2-rcampbell@nvidia.com Signed-off-by: Ralph Campbell Reviewed-by: John Hubbard Cc: Matthew Wilcox Cc: Vlastimil Babka Cc: Christoph Lameter Cc: Dave Hansen Cc: Jérôme Glisse Cc: "Kirill A . Shutemov" Cc: Lai Jiangshan Cc: Martin Schwidefsky Cc: Pekka Enberg Cc: Randy Dunlap Cc: Andrey Ryabinin Cc: Christoph Hellwig Cc: Jason Gunthorpe Cc: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm_types.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit eb93685847a9055283d05951c1b205e737f38533 Author: Paul Walmsley Date: Wed Aug 7 19:07:34 2019 -0700 riscv: fix flush_tlb_range() end address for flush_tlb_page() The RISC-V kernel implementation of flush_tlb_page() when CONFIG_SMP is set is wrong. It passes zero to flush_tlb_range() as the final address to flush, but it should be at least 'addr'. Some other Linux architecture ports use the beginning address to flush, plus PAGE_SIZE, as the final address to flush. This might flush slightly more than what's needed, but it seems unlikely that being more clever would improve anything. So let's just take that implementation for now. While here, convert the macro into a static inline function, primarily to avoid unintentional multiple evaluations of 'addr'. This second version of the patch fixes a coding style issue found by Christoph Hellwig . Reported-by: Andreas Schwab Signed-off-by: Paul Walmsley Reviewed-by: Christoph Hellwig arch/riscv/include/asm/tlbflush.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit ee1c7bd33e66376067fd6306b730789ee2ae53e4 Merge: 60a8db790255 2d6c25215ab2 Author: Linus Torvalds Date: Tue Aug 13 11:46:24 2019 -0700 Merge tag 'tpmdd-next-20190813' of git://git.infradead.org/users/jjs/linux-tpmdd Pull tpm fixes from Jarkko Sakkinen: "One more bug fix for the next release" * tag 'tpmdd-next-20190813' of git://git.infradead.org/users/jjs/linux-tpmdd: KEYS: trusted: allow module init if TPM is inactive or deactivated commit 60a8db790255a6bebcdc41d97e8084a440398206 Merge: d45331b00ddb a86c71ba3022 Author: Linus Torvalds Date: Tue Aug 13 10:31:31 2019 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fix from James Bottomley: "Single lpfc fix, for a single-cpu corner case" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: lpfc: Fix crash when cpu count is 1 and null irq affinity mask commit 2d6c25215ab26bb009de3575faab7b685f138e92 Author: Roberto Sassu Date: Mon Aug 5 18:44:27 2019 +0200 KEYS: trusted: allow module init if TPM is inactive or deactivated Commit c78719203fc6 ("KEYS: trusted: allow trusted.ko to initialize w/o a TPM") allows the trusted module to be loaded even if a TPM is not found, to avoid module dependency problems. However, trusted module initialization can still fail if the TPM is inactive or deactivated. tpm_get_random() returns an error. This patch removes the call to tpm_get_random() and instead extends the PCR specified by the user with zeros. The security of this alternative is equivalent to the previous one, as either option prevents with a PCR update unsealing and misuse of sealed data by a user space process. Even if a PCR is extended with zeros, instead of random data, it is still computationally infeasible to find a value as input for a new PCR extend operation, to obtain again the PCR value that would allow unsealing. Cc: stable@vger.kernel.org Fixes: 240730437deb ("KEYS: trusted: explicitly use tpm_chip structure...") Signed-off-by: Roberto Sassu Reviewed-by: Tyler Hicks Suggested-by: Mimi Zohar Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen security/keys/trusted.c | 13 ------------- 1 file changed, 13 deletions(-) commit 2c8ccb37b08fe364f02a9914daca474d43151453 Author: Bernard Metzler Date: Fri Aug 9 17:18:16 2019 +0200 RDMA/siw: Change CQ flags from 64->32 bits This patch changes the driver/user shared (mmapped) CQ notification flags field from unsigned 64-bits size to unsigned 32-bits size. This enables building siw on 32-bit architectures. This patch changes the siw-abi, but as siw was only just merged in this merge window cycle, there are no released kernels with the prior abi. We are making no attempt to be binary compatible with siw user space libraries prior to the merge of siw into the upstream kernel, only moving forward with upstream kernels and upstream rdma-core provided siw libraries are we guaranteeing compatibility. Signed-off-by: Bernard Metzler Link: https://lore.kernel.org/r/20190809151816.13018-1-bmt@zurich.ibm.com Signed-off-by: Doug Ledford drivers/infiniband/sw/siw/Kconfig | 2 +- drivers/infiniband/sw/siw/siw.h | 2 +- drivers/infiniband/sw/siw/siw_qp.c | 14 ++++++++++---- drivers/infiniband/sw/siw/siw_verbs.c | 16 +++++++++++----- include/uapi/rdma/siw-abi.h | 3 ++- 5 files changed, 25 insertions(+), 12 deletions(-) commit 656c8e9cc1badbc18eefe6ba01d33ebbcae61b9a Author: Dirk Morris Date: Thu Aug 8 13:57:51 2019 -0700 netfilter: conntrack: Use consistent ct id hash calculation Change ct id hash calculation to only use invariants. Currently the ct id hash calculation is based on some fields that can change in the lifetime on a conntrack entry in some corner cases. The current hash uses the whole tuple which contains an hlist pointer which will change when the conntrack is placed on the dying list resulting in a ct id change. This patch also removes the reply-side tuple and extension pointer from the hash calculation so that the ct id will will not change from initialization until confirmation. Fixes: 3c79107631db1f7 ("netfilter: ctnetlink: don't use conntrack/expect object addresses as id") Signed-off-by: Dirk Morris Acked-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_core.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 190d03814eb3b49d4f87ff38fef26d36f3568a60 Author: Takashi Iwai Date: Tue Aug 13 17:39:56 2019 +0200 ALSA: hda/realtek - Add quirk for HP Envy x360 HP Envy x360 (AMD Ryzen-based model) with 103c:8497 needs the same quirk like HP Spectre x360 for enabling the mute LED over Mic3 pin. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=204373 Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit 9a67b72552f8d019948453e56ca7db8c7e5a94ba Author: Denis Efremov Date: Tue Aug 13 08:15:07 2019 -0700 MAINTAINERS: iomap: Remove fs/iomap.c record Update MAINTAINERS to reflect that fs/iomap.c file was splitted into separate files in fs/iomap/ Cc: Darrick J. Wong Cc: Christoph Hellwig Cc: linux-fsdevel@vger.kernel.org Fixes: cb7181ff4b1c ("iomap: move the main iteration code into a separate file") Signed-off-by: Denis Efremov Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit a3384b8d9f63cc042711293bb97bdc92dca0391d Author: Benjamin Tissoires Date: Tue Aug 13 15:38:07 2019 +0200 HID: logitech-hidpp: remove support for the G700 over USB The G700 suffers from the same issue than the G502: when plugging it in, the driver tries to contact it but it fails. This timeout is problematic as it introduce a delay in the boot, and having only the mouse event node means that the hardware macros keys can not be relayed to the userspace. Link: https://github.com/libratbag/libratbag/issues/797 Fixes: 91cf9a98ae41 ("HID: logitech-hidpp: make .probe usbhid capable") Cc: stable@vger.kernel.org # v5.2 Reviewed-by: Filipe Laíns Signed-off-by: Benjamin Tissoires drivers/hid/hid-logitech-hidpp.c | 2 -- 1 file changed, 2 deletions(-) commit addf3382c47c033e579c9c88f18e36c4e75d806a Author: Benjamin Tissoires Date: Tue Aug 13 15:38:06 2019 +0200 Revert "HID: logitech-hidpp: add USB PID for a few more supported mice" This partially reverts commit 27fc32fd9417968a459d43d9a7c50fd423d53eb9. It turns out that the G502 has some issues with hid-logitech-hidpp: when plugging it in, the driver tries to contact it but it fails. So the driver bails out leaving only the mouse event node available. This timeout is problematic as it introduce a delay in the boot, and having only the mouse event node means that the hardware macros keys can not be relayed to the userspace. Filipe and I just gave a shot at the following devices: G403 Wireless (0xC082) G703 (0xC087) G703 Hero (0xC090) G903 (0xC086) G903 Hero (0xC091) G Pro (0xC088) Reverting the devices we are not sure that works flawlessly. Reviewed-by: Filipe Laíns Signed-off-by: Benjamin Tissoires drivers/hid/hid-logitech-hidpp.c | 20 -------------------- 1 file changed, 20 deletions(-) commit 91b4db5313a2c793aabc2143efb8ed0cf0fdd097 Author: Ilya Leoshkevich Date: Mon Aug 12 18:18:07 2019 +0200 s390/bpf: use 32-bit index for tail calls "p runtime/jit: pass > 32bit index to tail_call" fails when bpf_jit_enable=1, because the tail call is not executed. This in turn is because the generated code assumes index is 64-bit, while it must be 32-bit, and as a result prog array bounds check fails, while it should pass. Even if bounds check would have passed, the code that follows uses 64-bit index to compute prog array offset. Fix by using clrj instead of clgrj for comparing index with array size, and also by using llgfr for truncating index to 32 bits before using it to compute prog array offset. Fixes: 6651ee070b31 ("s390/bpf: implement bpf_tail_call() helper") Reported-by: Yauheni Kaliuta Acked-by: Vasily Gorbik Signed-off-by: Ilya Leoshkevich Signed-off-by: Daniel Borkmann arch/s390/net/bpf_jit_comp.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit daa37200d48906d71c63ce178bf7d410b7e07082 Merge: d45331b00ddb eac4471d0882 Author: Jani Nikula Date: Tue Aug 13 16:26:34 2019 +0300 Merge tag 'gvt-fixes-2019-08-13' of https://github.com/intel/gvt-linux into drm-intel-fixes gvt-fixes-2019-08-13 - Fix one use-after-free error (Dan) Signed-off-by: Jani Nikula From: Zhenyu Wang Link: https://patchwork.freedesktop.org/patch/msgid/20190813095845.GF19140@zhen-hp.sh.intel.com commit 834de5c1aa768eb3d233d6544ea7153826c4b206 Author: Tudor Ambarus Date: Wed Jul 31 08:46:16 2019 +0000 mtd: spi-nor: Fix the disabling of write protection at init spi_nor_spansion_clear_sr_bp() depends on spansion_quad_enable(). While spansion_quad_enable() is selected as default when initializing the flash parameters, the nor->quad_enable() method can be overwritten later on when parsing BFPT. Select the write protection disable mechanism at spi_nor_init() time, when the nor->quad_enable() method is already known. Fixes: 191f5c2ed4b6faba ("mtd: spi-nor: use 16-bit WRR command when QE is set on spansion flashes") Signed-off-by: Tudor Ambarus Reviewed-by: Vignesh Raghavendra Signed-off-by: Richard Weinberger drivers/mtd/spi-nor/spi-nor.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 4a65bbb9109ed7edd4b6ed7168ced48abb8561a2 Author: YueHaibing Date: Sat Apr 13 22:12:43 2019 +0800 soc: ti: pm33xx: Make two symbols static Fix sparse warnings: drivers/soc/ti/pm33xx.c:144:27: warning: symbol 'rtc_wake_src' was not declared. Should it be static? drivers/soc/ti/pm33xx.c:160:5: warning: symbol 'am33xx_rtc_only_idle' was not declared. Should it be static? Signed-off-by: YueHaibing Signed-off-by: Tony Lindgren drivers/soc/ti/pm33xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ebc526233b9dd2a5aefdc012048b56f09481e460 Merge: d45331b00ddb a5580eb394c8 Author: Arnd Bergmann Date: Tue Aug 13 14:05:09 2019 +0200 Merge tag 'imx-fixes-5.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/fixes i.MX fixes for 5.3, round 2: - A fix on vf610-bk4 board qspi device description to get SPI-NOR memory recognized correctly. * tag 'imx-fixes-5.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: dts: vf610-bk4: Fix qspi node description Link: https://lore.kernel.org/r/20190812160020.GA12364@X250 Signed-off-by: Arnd Bergmann commit d8e0cecbcaf09f38661bfb7da4c1e62297308672 Author: Keerthy Date: Wed Jun 26 13:20:14 2019 +0530 soc: ti: pm33xx: Fix static checker warnings The patch fixes a bunch of static checker warnings. Reported-by: Dan Carpenter Signed-off-by: Keerthy Signed-off-by: Tony Lindgren drivers/soc/ti/pm33xx.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 5717fe5ab38f9ccb32718bcb03bea68409c9cce4 Author: Will Deacon Date: Mon Aug 12 16:02:25 2019 +0100 arm64: cpufeature: Don't treat granule sizes as strict If a CPU doesn't support the page size for which the kernel is configured, then we will complain and refuse to bring it online. For secondary CPUs (and the boot CPU on a system booting with EFI), we will also print an error identifying the mismatch. Consequently, the only time that the cpufeature code can detect a granule size mismatch is for a granule other than the one that is currently being used. Although we would rather such systems didn't exist, we've unfortunately lost that battle and Kevin reports that on his amlogic S922X (odroid-n2 board) we end up warning and taining with defconfig because 16k pages are not supported by all of the CPUs. In such a situation, we don't actually care about the feature mismatch, particularly now that KVM only exposes the sanitised view of the CPU registers (commit 93390c0a1b20 - "arm64: KVM: Hide unsupported AArch64 CPU features from guests"). Treat the granule fields as non-strict and let Kevin run without a tainted kernel. Cc: Marc Zyngier Reported-by: Kevin Hilman Tested-by: Kevin Hilman Acked-by: Mark Rutland Acked-by: Suzuki K Poulose Signed-off-by: Will Deacon [catalin.marinas@arm.com: changelog updated with KVM sanitised regs commit] Signed-off-by: Catalin Marinas arch/arm64/kernel/cpufeature.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 0c0d1ec21b2f6070e22b54b2de874f1af960ced8 Author: Gustavo A. R. Silva Date: Sun Jul 28 18:22:40 2019 -0500 ARM: OMAP: dma: Mark expected switch fall-throughs Mark switch cases where we are expecting to fall through. This patch fixes the following warnings: arch/arm/plat-omap/dma.c: In function 'omap_set_dma_src_burst_mode': arch/arm/plat-omap/dma.c:384:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (dma_omap2plus()) { ^ arch/arm/plat-omap/dma.c:393:2: note: here case OMAP_DMA_DATA_BURST_16: ^~~~ arch/arm/plat-omap/dma.c:394:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (dma_omap2plus()) { ^ arch/arm/plat-omap/dma.c:402:2: note: here default: ^~~~~~~ arch/arm/plat-omap/dma.c: In function 'omap_set_dma_dest_burst_mode': arch/arm/plat-omap/dma.c:473:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (dma_omap2plus()) { ^ arch/arm/plat-omap/dma.c:481:2: note: here default: ^~~~~~~ Notice that, in this particular case, the code comment is modified in accordance with what GCC is expecting to find. Reported-by: Stephen Rothwell Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook Signed-off-by: Tony Lindgren arch/arm/plat-omap/dma.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 50e4b5cac403b9d376fe61d64fd2d41f26a194f9 Merge: 58e16d792a6a 5b63fb90adb9 Author: Tony Lindgren Date: Tue Aug 13 04:04:16 2019 -0700 Merge branch 'ti-sysc-fixes' into fixes commit 5b63fb90adb95a178ad403e1703f59bf1ff2c16b Author: Tony Lindgren Date: Tue Jul 23 00:29:23 2019 -0700 ARM: dts: Fix incomplete dts data for am3 and am4 mmc Commit 4e27f752ab8c ("ARM: OMAP2+: Drop mmc platform data for am330x and am43xx") dropped legacy mmc platform data for am3 and am4, but missed the fact that we never updated the dts files for mmc3 that is directly on l3 interconnect instead of l4 interconnect. This leads to a situation with no legacy platform data and incomplete dts data. Let's update the mmc instances on l3 interconnect to probe properly with ti-sysc interconnect target module driver to make mmc3 work again. Let's still keep legacy "ti,hwmods" property around for v5.2 kernel and only drop it later on. Note that there is no need to use property status = "disabled" for mmc3. The default for dts is enabled, and runtime PM will idle unused instances just fine. Fixes: 4e27f752ab8c ("ARM: OMAP2+: Drop mmc platform data for am330x and am43xx") Reported-by: David Lechner Tested-by: David Lechner Signed-off-by: Tony Lindgren arch/arm/boot/dts/am33xx.dtsi | 32 ++++++++++++++++++++++++++------ arch/arm/boot/dts/am4372.dtsi | 32 ++++++++++++++++++++++++++------ 2 files changed, 52 insertions(+), 12 deletions(-) commit 58e16d792a6a8c6b750f637a4649967fcac853dc Merge: fa8397e45c64 a304f483b6b0 Author: Tony Lindgren Date: Tue Aug 13 03:40:10 2019 -0700 Merge branch 'ti-sysc-fixes' into fixes commit a304f483b6b00d42bde41c45ca52c670945348e2 Author: Suman Anna Date: Tue Jun 25 18:33:15 2019 -0500 bus: ti-sysc: Simplify cleanup upon failures in sysc_probe() The clocks are not yet parsed and prepared until after a successful sysc_get_clocks(), so there is no need to unprepare the clocks upon any failure of any of the prior functions in sysc_probe(). The current code path would have been a no-op because of the clock validity checks within sysc_unprepare(), but let's just simplify the cleanup path by returning the error directly. While at this, also fix the cleanup path for a sysc_init_resets() failure which is executed after the clocks are prepared. Signed-off-by: Suman Anna Signed-off-by: Tony Lindgren drivers/bus/ti-sysc.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit fa8397e45c64e60c80373bc19ee56e42a6bed9b6 Author: Janusz Krzysztofik Date: Sun Aug 11 10:48:02 2019 +0200 ARM: OMAP1: ams-delta-fiq: Fix missing irq_ack Non-serio path of Amstrad Delta FIQ deferred handler depended on irq_ack() method provided by OMAP GPIO driver. That method has been removed by commit 693de831c6e5 ("gpio: omap: remove irq_ack method"). Remove useless code from the deferred handler and reimplement the missing operation inside the base FIQ handler. Should another dependency - irq_unmask() - be ever removed from the OMAP GPIO driver, WARN once if missing. Signed-off-by: Janusz Krzysztofik Signed-off-by: Tony Lindgren arch/arm/mach-omap1/ams-delta-fiq-handler.S | 3 ++- arch/arm/mach-omap1/ams-delta-fiq.c | 4 +--- 2 files changed, 3 insertions(+), 4 deletions(-) commit 07f9a8be66a9bd86f9eaedf8f8aeb416195adab8 Author: Faiz Abbas Date: Wed Aug 7 16:22:38 2019 +0530 ARM: dts: dra74x: Fix iodelay configuration for mmc3 According to the latest am572x[1] and dra74x[2] data manuals, mmc3 default, hs, sdr12 and sdr25 modes use iodelay values given in MMC3_MANUAL1. Set the MODE_SELECT bit for these so that manual mode is selected and correct iodelay values can be configured. [1] http://www.ti.com/lit/ds/symlink/am5728.pdf [2] http://www.ti.com/lit/ds/symlink/dra746.pdf Signed-off-by: Faiz Abbas Signed-off-by: Tony Lindgren arch/arm/boot/dts/dra74x-mmc-iodelay.dtsi | 50 +++++++++++++++---------------- 1 file changed, 25 insertions(+), 25 deletions(-) commit 8613e2ca4fff764f23785eadfa54a08631ee682a Author: Emmanuel Vadot Date: Wed Jul 24 14:23:29 2019 +0200 ARM: dts: am335x: Fix UARTs length As seen on the AM335x TRM all the UARTs controller only are 0x1000 in size. Fix this in the DTS. Signed-off-by: Emmanuel Vadot Signed-off-by: Tony Lindgren arch/arm/boot/dts/am33xx-l4.dtsi | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 45da5e09dd32fa98c32eaafe2513db6bd75e2f4f Author: Tony Lindgren Date: Tue Jul 23 04:37:45 2019 -0700 ARM: OMAP2+: Fix omap4 errata warning on other SoCs We have errata i688 workaround produce warnings on SoCs other than omap4 and omap5: omap4_sram_init:Unable to allocate sram needed to handle errata I688 omap4_sram_init:Unable to get sram pool needed to handle errata I688 This is happening because there is no ti,omap4-mpu node, or no SRAM to configure for the other SoCs, so let's remove the warning based on the SoC revision checks. As nobody has complained it seems that the other SoC variants do not need this workaround. Signed-off-by: Tony Lindgren arch/arm/mach-omap2/omap4-common.c | 3 +++ 1 file changed, 3 insertions(+) commit 7cdf6e40537f4f287c8e21b99cb4cd082a33bef0 Author: Aaron Armstrong Skomra Date: Mon Aug 12 11:55:52 2019 -0700 HID: wacom: add back changes dropped in merge commit Merge commit 74acee309fb2 ("Merge branches 'for-5.2/fixes', 'for-5.3/doc', 'for-5.3/ish', 'for-5.3/logitech' and 'for-5.3/wacom' into for-linus") inadvertently dropped this change from commit 912c6aa67ad4 ("HID: wacom: Add 2nd gen Intuos Pro Small support"). Signed-off-by: Aaron Armstrong Skomra Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 10e62b47973b0b0ceda076255bcb147b83e20517 Author: John Garry Date: Tue Jul 30 21:29:56 2019 +0800 bus: hisi_lpc: Add .remove method to avoid driver unbind crash The original driver author seemed to be under the impression that a driver cannot be removed if it does not have a .remove method. Or maybe if it is a built-in platform driver. This is not true. This crash can be created: root@ubuntu:/sys/bus/platform/drivers/hisi-lpc# echo HISI0191\:00 > unbind root@ubuntu:/sys/bus/platform/drivers/hisi-lpc# ipmitool raw 6 1 Unable to handle kernel paging request at virtual address ffff000010035010 Mem abort info: ESR = 0x96000047 Exception class = DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 Data abort info: ISV = 0, ISS = 0x00000047 CM = 0, WnR = 1 swapper pgtable: 4k pages, 48-bit VAs, pgdp=000000000118b000 [ffff000010035010] pgd=0000041ffbfff003, pud=0000041ffbffe003, pmd=0000041ffbffd003, pte=0000000000000000 Internal error: Oops: 96000047 [#1] PREEMPT SMP Modules linked in: CPU: 17 PID: 1473 Comm: ipmitool Not tainted 5.2.0-rc5-00003-gf68c53b414a3-dirty #198 Hardware name: Huawei Taishan 2280 /D05, BIOS Hisilicon D05 IT21 Nemo 2.0 RC0 04/18/2018 pstate: 20000085 (nzCv daIf -PAN -UAO) pc : hisi_lpc_target_in+0x7c/0x120 lr : hisi_lpc_target_in+0x70/0x120 sp : ffff00001efe3930 x29: ffff00001efe3930 x28: ffff841f9f599200 x27: 0000000000000002 x26: 0000000000000000 x25: 0000000000000080 x24: 00000000000000e4 x23: 0000000000000000 x22: 0000000000000064 x21: ffff801fb667d280 x20: 0000000000000001 x19: ffff00001efe39ac x18: 0000000000000000 x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000 x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000 x11: 0000000000000000 x10: 0000000000000000 x9 : 0000000000000000 x8 : ffff841febe60340 x7 : ffff801fb55c52e8 x6 : 0000000000000000 x5 : 0000000000ffc0e3 x4 : 0000000000000001 x3 : ffff801fb667d280 x2 : 0000000000000001 x1 : ffff000010035010 x0 : ffff000010035000 Call trace: hisi_lpc_target_in+0x7c/0x120 hisi_lpc_comm_in+0x88/0x98 logic_inb+0x5c/0xb8 port_inb+0x18/0x20 bt_event+0x38/0x808 smi_event_handler+0x4c/0x5a0 check_start_timer_thread.part.4+0x40/0x58 sender+0x78/0x88 smi_send.isra.6+0x94/0x108 i_ipmi_request+0x2c4/0x8f8 ipmi_request_settime+0x124/0x160 handle_send_req+0x19c/0x208 ipmi_ioctl+0x2c0/0x990 do_vfs_ioctl+0xb8/0x8f8 ksys_ioctl+0x80/0xb8 __arm64_sys_ioctl+0x1c/0x28 el0_svc_common.constprop.0+0x64/0x160 el0_svc_handler+0x28/0x78 el0_svc+0x8/0xc Code: 941d1511 aa0003f9 f94006a0 91004001 (b9000034) ---[ end trace aa842b86af7069e4 ]--- The problem here is that the host goes away but the associated logical PIO region remains registered, as do the children devices. Fix by adding a .remove method to tidy-up by removing the child devices and unregistering the logical PIO region. Cc: stable@vger.kernel.org Fixes: adf38bb0b595 ("HISI LPC: Support the LPC host on Hip06/Hip07 with DT bindings") Signed-off-by: John Garry Signed-off-by: Wei Xu drivers/bus/hisi_lpc.c | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) commit 1b15a5632a809ab57d403fd972ca68785363b654 Author: John Garry Date: Tue Jul 30 21:29:55 2019 +0800 bus: hisi_lpc: Unregister logical PIO range to avoid potential use-after-free If, after registering a logical PIO range, the driver probe later fails, the logical PIO range memory will be released automatically. This causes an issue, in that the logical PIO range is not unregistered and the released range memory may be later referenced. Fix by unregistering the logical PIO range. And since we now unregister the logical PIO range for probe failure, avoid the special ordering of setting logical PIO range ops, which was the previous (poor) attempt at a safeguard against this. Cc: stable@vger.kernel.org Fixes: adf38bb0b595 ("HISI LPC: Support the LPC host on Hip06/Hip07 with DT bindings") Signed-off-by: John Garry Signed-off-by: Wei Xu drivers/bus/hisi_lpc.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit b884e2de2afc68ce30f7093747378ef972dde253 Author: John Garry Date: Tue Jul 30 21:29:54 2019 +0800 lib: logic_pio: Add logic_pio_unregister_range() Add a function to unregister a logical PIO range. Logical PIO space can still be leaked when unregistering certain LOGIC_PIO_CPU_MMIO regions, but this acceptable for now since there are no callers to unregister LOGIC_PIO_CPU_MMIO regions, and the logical PIO region allocation scheme would need significant work to improve this. Cc: stable@vger.kernel.org Signed-off-by: John Garry Signed-off-by: Wei Xu include/linux/logic_pio.h | 1 + lib/logic_pio.c | 14 ++++++++++++++ 2 files changed, 15 insertions(+) commit 0a27142bd1ee259e24a0be2b0133e5ca5df8da91 Author: John Garry Date: Tue Jul 30 21:29:53 2019 +0800 lib: logic_pio: Avoid possible overlap for unregistering regions The code was originally written to not support unregistering logical PIO regions. To accommodate supporting unregistering logical PIO regions, subtly modify LOGIC_PIO_CPU_MMIO region registration code, such that the "end" of the registered regions is the "end" of the last region, and not the sum of the sizes of all the registered regions. Cc: stable@vger.kernel.org Signed-off-by: John Garry Signed-off-by: Wei Xu lib/logic_pio.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 06709e81c668f5f56c65b806895b278517bd44e0 Author: John Garry Date: Tue Jul 30 21:29:52 2019 +0800 lib: logic_pio: Fix RCU usage The traversing of io_range_list with list_for_each_entry_rcu() is not properly protected by rcu_read_lock() and rcu_read_unlock(), so add them. These functions mark the critical section scope where the list is protected for the reader, it cannot be "reclaimed". Any updater - in this case, the logical PIO registration functions - cannot update the list until the reader exits this critical section. In addition, the list traversing used in logic_pio_register_range() does not need to use the rcu variant. This is because we are already using io_range_mutex to guarantee mutual exclusion from mutating the list. Cc: stable@vger.kernel.org Fixes: 031e3601869c ("lib: Add generic PIO mapping method") Signed-off-by: John Garry Signed-off-by: Wei Xu lib/logic_pio.c | 49 +++++++++++++++++++++++++++++++++++-------------- 1 file changed, 35 insertions(+), 14 deletions(-) commit 31ec0dd38085aaeb75ab04211bf3b51ad917c9b4 Author: Alex Deucher Date: Thu Aug 8 00:29:23 2019 -0500 drm/amd/display: use kvmalloc for dc_state (v2) It's large and doesn't need contiguous memory. Fixes allocation failures in some cases. v2: kvfree the memory. Reviewed-by: Andrey Grodzovsky Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 17b6d2d528542bc60ad400add35728b2259b3cc1 Author: Pierre-Eric Pelloux-Prayer Date: Tue Aug 6 18:27:26 2019 +0200 drm/amdgpu: fix gfx9 soft recovery The SOC15_REG_OFFSET() macro wasn't used, making the soft recovery fail. v2: use WREG32_SOC15 instead of WREG32 + SOC15_REG_OFFSET Signed-off-by: Pierre-Eric Pelloux-Prayer Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fd295733e702a63c189fea8294c12e04b5e5ecc0 Author: Sven Van Asbroeck Date: Thu Jul 18 16:14:53 2019 -0400 dt-bindings: fec: explicitly mark deprecated properties fec's gpio phy reset properties have been deprecated. Update the dt-bindings documentation to explicitly mark them as such, and provide a short description of the recommended alternative. Signed-off-by: Sven Van Asbroeck Signed-off-by: Rob Herring Documentation/devicetree/bindings/net/fsl-fec.txt | 30 +++++++++++++---------- 1 file changed, 17 insertions(+), 13 deletions(-) commit 60d437bbff358748fcfc3bce5f08da9a6b3761da Author: Nishka Dasgupta Date: Tue Jul 16 11:13:30 2019 +0530 of: resolver: Add of_node_put() before return and break Each iteration of for_each_child_of_node puts the previous node, but in the case of a return or break from the middle of the loop, there is no put, thus causing a memory leak. Hence add an of_node_put before the return or break in three places. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Rob Herring drivers/of/resolver.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit cd8869f4cb257f22b89495ca40f5281e58ba359c Author: Max Filippov Date: Mon Aug 12 15:01:30 2019 -0700 xtensa: add missing isync to the cpu_reset TLB code ITLB entry modifications must be followed by the isync instruction before the new entries are possibly used. cpu_reset lacks one isync between ITLB way 6 initialization and jump to the identity mapping. Add missing isync to xtensa cpu_reset. Cc: stable@vger.kernel.org Signed-off-by: Max Filippov arch/xtensa/kernel/setup.c | 1 + 1 file changed, 1 insertion(+) commit bb0ce4c1517d299d1a38075ecded62a5a5342c6b Author: André Draszik Date: Fri Aug 9 12:20:25 2019 +0100 net: phy: at803x: stop switching phy delay config needlessly This driver does a funny dance disabling and re-enabling RX and/or TX delays. In any of the RGMII-ID modes, it first disables the delays, just to re-enable them again right away. This looks like a needless exercise. Just enable the respective delays when in any of the relevant 'id' modes, and disable them otherwise. Also, remove comments which don't add anything that can't be seen by looking at the code. Signed-off-by: André Draszik CC: Andrew Lunn CC: Florian Fainelli CC: Heiner Kallweit CC: "David S. Miller" CC: netdev@vger.kernel.org Signed-off-by: David S. Miller drivers/net/phy/at803x.c | 32 ++++++++------------------------ 1 file changed, 8 insertions(+), 24 deletions(-) commit 48b30e10bfc20ec6195642cc09ea6f08a8015df7 Merge: 8e2a589a3fc3 b9ddd5091160 Author: Greg Kroah-Hartman Date: Mon Aug 12 22:47:59 2019 +0200 Merge tag 'iio-fixes-for-5.3b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus Jonathan writes: Second set of IIO fix for the 5.3 cycle. * adf4371 - Calculation of the value to program to control the output frequency was incorrect. * max9611 - Fix temperature reading in probe. A recent fix for a wrong mask meant this code was looked at afresh. A second bug became obvious in which the return value was used inplace of the desired register value. This had no visible effect other than a communication test not actually testing the communications. * tag 'iio-fixes-for-5.3b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: iio: adc: max9611: Fix temperature reading in probe iio: frequency: adf4371: Fix output frequency setting commit 303911cfc5b95d33687d9046133ff184cf5043ff Author: Alan Stern Date: Mon Aug 12 16:11:07 2019 -0400 USB: core: Fix races in character device registration and deregistraion The syzbot fuzzer has found two (!) races in the USB character device registration and deregistration routines. This patch fixes the races. The first race results from the fact that usb_deregister_dev() sets usb_minors[intf->minor] to NULL before calling device_destroy() on the class device. This leaves a window during which another thread can allocate the same minor number but will encounter a duplicate name error when it tries to register its own class device. A typical error message in the system log would look like: sysfs: cannot create duplicate filename '/class/usbmisc/ldusb0' The patch fixes this race by destroying the class device first. The second race is in usb_register_dev(). When that routine runs, it first allocates a minor number, then drops minor_rwsem, and then creates the class device. If the device creation fails, the minor number is deallocated and the whole routine returns an error. But during the time while minor_rwsem was dropped, there is a window in which the minor number is allocated and so another thread can successfully open the device file. Typically this results in use-after-free errors or invalid accesses when the other thread closes its open file reference, because the kernel then tries to release resources that were already deallocated when usb_register_dev() failed. The patch fixes this race by keeping minor_rwsem locked throughout the entire routine. Reported-and-tested-by: syzbot+30cf45ebfe0b0c4847a1@syzkaller.appspotmail.com Signed-off-by: Alan Stern CC: Link: https://lore.kernel.org/r/Pine.LNX.4.44L0.1908121607590.1659-100000@iolanthe.rowland.org Signed-off-by: Greg Kroah-Hartman drivers/usb/core/file.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 91be2587e82a0f16348fd8f12a57e4c328baffc7 Author: Thomas Gleixner Date: Mon Aug 12 20:16:17 2019 +0200 x86/fpu/math-emu: Address fallthrough warnings /home/tglx/work/kernel/linus/linux/arch/x86/math-emu/errors.c: In function ‘FPU_printall’: /home/tglx/work/kernel/linus/linux/arch/x86/math-emu/errors.c:187:9: warning: this statement may fall through [-Wimplicit-fallthrough=] tagi = FPU_Special(r); ~~~~~^~~~~~~~~~~~~~~~ /home/tglx/work/kernel/linus/linux/arch/x86/math-emu/errors.c:188:3: note: here case TAG_Valid: ^~~~ /home/tglx/work/kernel/linus/linux/arch/x86/math-emu/fpu_trig.c: In function ‘fyl2xp1’: /home/tglx/work/kernel/linus/linux/arch/x86/math-emu/fpu_trig.c:1353:7: warning: this statement may fall through [-Wimplicit-fallthrough=] if (denormal_operand() < 0) ^ /home/tglx/work/kernel/linus/linux/arch/x86/math-emu/fpu_trig.c:1356:3: note: here case TAG_Zero: Remove the pointless 'break;' after 'continue;' while at it. Signed-off-by: Thomas Gleixner arch/x86/math-emu/errors.c | 5 +++-- arch/x86/math-emu/fpu_trig.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) commit 5785675dfef4f9edcee66edef7b3af21618d2707 Author: Borislav Petkov Date: Sun Aug 11 17:40:36 2019 +0200 x86/apic/32: Fix yet another implicit fallthrough warning Fix arch/x86/kernel/apic/probe_32.c: In function ‘default_setup_apic_routing’: arch/x86/kernel/apic/probe_32.c:146:7: warning: this statement may fall through [-Wimplicit-fallthrough=] if (!APIC_XAPIC(version)) { ^ arch/x86/kernel/apic/probe_32.c:151:3: note: here case X86_VENDOR_HYGON: ^~~~ for 32-bit builds. Signed-off-by: Borislav Petkov Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20190811154036.29805-1-bp@alien8.de arch/x86/kernel/apic/probe_32.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 12072a68961af20e84ddb4aba2387ba5f70e8c14 Author: Balakrishna Godavarthi Date: Thu Aug 8 14:26:08 2019 +0530 Bluetooth: btqca: Reset download type to default This patch will reset the download flag to default value before retrieving the download mode type. Fixes: 32646db8cc28 ("Bluetooth: btqca: inject command complete event during fw download") Signed-off-by: Balakrishna Godavarthi Tested-by: Claire Chang Reviewed-by: Claire Chang Signed-off-by: Marcel Holtmann drivers/bluetooth/btqca.c | 1 + 1 file changed, 1 insertion(+) commit c7c5ae2902bf8fe9acc75f798c0de75ac9295ccf Author: Claire Chang Date: Tue Aug 6 17:56:29 2019 +0800 Bluetooth: btqca: release_firmware after qca_inject_cmd_complete_event commit 32646db8cc28 ("Bluetooth: btqca: inject command complete event during fw download") added qca_inject_cmd_complete_event() for certain qualcomm chips. However, qca_download_firmware() will return without calling release_firmware() in this case. This leads to a memory leak like the following found by kmemleak: unreferenced object 0xfffffff3868a5880 (size 128): comm "kworker/u17:5", pid 347, jiffies 4294676481 (age 312.157s) hex dump (first 32 bytes): ac fd 00 00 00 00 00 00 00 d0 7e 17 80 ff ff ff ..........~..... 00 00 00 00 00 00 00 00 00 59 8a 86 f3 ff ff ff .........Y...... backtrace: [<00000000978ce31d>] kmem_cache_alloc_trace+0x194/0x298 [<000000006ea0398c>] _request_firmware+0x74/0x4e4 [<000000004da31ca0>] request_firmware+0x44/0x64 [<0000000094572996>] qca_download_firmware+0x74/0x6e4 [btqca] [<00000000b24d615a>] qca_uart_setup+0xc0/0x2b0 [btqca] [<00000000364a6d5a>] qca_setup+0x204/0x570 [hci_uart] [<000000006be1a544>] hci_uart_setup+0xa8/0x148 [hci_uart] [<00000000d64c0f4f>] hci_dev_do_open+0x144/0x530 [bluetooth] [<00000000f69f5110>] hci_power_on+0x84/0x288 [bluetooth] [<00000000d4151583>] process_one_work+0x210/0x420 [<000000003cf3dcfb>] worker_thread+0x2c4/0x3e4 [<000000007ccaf055>] kthread+0x124/0x134 [<00000000bef1f723>] ret_from_fork+0x10/0x18 [<00000000c36ee3dd>] 0xffffffffffffffff unreferenced object 0xfffffff37b16de00 (size 128): comm "kworker/u17:5", pid 347, jiffies 4294676873 (age 311.766s) hex dump (first 32 bytes): da 07 00 00 00 00 00 00 00 50 ff 0b 80 ff ff ff .........P...... 00 00 00 00 00 00 00 00 00 dd 16 7b f3 ff ff ff ...........{.... backtrace: [<00000000978ce31d>] kmem_cache_alloc_trace+0x194/0x298 [<000000006ea0398c>] _request_firmware+0x74/0x4e4 [<000000004da31ca0>] request_firmware+0x44/0x64 [<0000000094572996>] qca_download_firmware+0x74/0x6e4 [btqca] [<000000000cde20a9>] qca_uart_setup+0x144/0x2b0 [btqca] [<00000000364a6d5a>] qca_setup+0x204/0x570 [hci_uart] [<000000006be1a544>] hci_uart_setup+0xa8/0x148 [hci_uart] [<00000000d64c0f4f>] hci_dev_do_open+0x144/0x530 [bluetooth] [<00000000f69f5110>] hci_power_on+0x84/0x288 [bluetooth] [<00000000d4151583>] process_one_work+0x210/0x420 [<000000003cf3dcfb>] worker_thread+0x2c4/0x3e4 [<000000007ccaf055>] kthread+0x124/0x134 [<00000000bef1f723>] ret_from_fork+0x10/0x18 [<00000000c36ee3dd>] 0xffffffffffffffff Make sure release_firmware() is called aftre qca_inject_cmd_complete_event() to avoid the memory leak. Fixes: 32646db8cc28 ("Bluetooth: btqca: inject command complete event during fw download") Signed-off-by: Claire Chang Reviewed-by: Balakrishna Godavarthi Signed-off-by: Marcel Holtmann drivers/bluetooth/btqca.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8612de3f7ba6e900465e340516b8313806d27b2d Author: Darrick J. Wong Date: Sun Aug 11 15:52:27 2019 -0700 xfs: don't crash on null attr fork xfs_bmapi_read Zorro Lang reported a crash in generic/475 if we try to inactivate a corrupt inode with a NULL attr fork (stack trace shortened somewhat): RIP: 0010:xfs_bmapi_read+0x311/0xb00 [xfs] RSP: 0018:ffff888047f9ed68 EFLAGS: 00010202 RAX: dffffc0000000000 RBX: ffff888047f9f038 RCX: 1ffffffff5f99f51 RDX: 0000000000000002 RSI: 0000000000000008 RDI: 0000000000000012 RBP: ffff888002a41f00 R08: ffffed10005483f0 R09: ffffed10005483ef R10: ffffed10005483ef R11: ffff888002a41f7f R12: 0000000000000004 R13: ffffe8fff53b5768 R14: 0000000000000005 R15: 0000000000000001 FS: 00007f11d44b5b80(0000) GS:ffff888114200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000ef6000 CR3: 000000002e176003 CR4: 00000000001606e0 Call Trace: xfs_dabuf_map.constprop.18+0x696/0xe50 [xfs] xfs_da_read_buf+0xf5/0x2c0 [xfs] xfs_da3_node_read+0x1d/0x230 [xfs] xfs_attr_inactive+0x3cc/0x5e0 [xfs] xfs_inactive+0x4c8/0x5b0 [xfs] xfs_fs_destroy_inode+0x31b/0x8e0 [xfs] destroy_inode+0xbc/0x190 xfs_bulkstat_one_int+0xa8c/0x1200 [xfs] xfs_bulkstat_one+0x16/0x20 [xfs] xfs_bulkstat+0x6fa/0xf20 [xfs] xfs_ioc_bulkstat+0x182/0x2b0 [xfs] xfs_file_ioctl+0xee0/0x12a0 [xfs] do_vfs_ioctl+0x193/0x1000 ksys_ioctl+0x60/0x90 __x64_sys_ioctl+0x6f/0xb0 do_syscall_64+0x9f/0x4d0 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f11d39a3e5b The "obvious" cause is that the attr ifork is null despite the inode claiming an attr fork having at least one extent, but it's not so obvious why we ended up with an inode in that state. Reported-by: Zorro Lang Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=204031 Signed-off-by: Darrick J. Wong Reviewed-by: Bill O'Donnell fs/xfs/libxfs/xfs_bmap.c | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) commit 858b44dc62a1018312fd9cbd15db24237a897e0e Author: Darrick J. Wong Date: Sun Aug 11 15:52:26 2019 -0700 xfs: remove more ondisk directory corruption asserts Continue our game of replacing ASSERTs for corrupt ondisk metadata with EFSCORRUPTED returns. Signed-off-by: Darrick J. Wong Reviewed-by: Bill O'Donnell fs/xfs/libxfs/xfs_da_btree.c | 19 ++++++++++++------- fs/xfs/libxfs/xfs_dir2_node.c | 3 ++- 2 files changed, 14 insertions(+), 8 deletions(-) commit 48d9cc9d85dde37c87abb7ac9bbec6598ba44b56 Author: Fabian Henneke Date: Mon Jul 15 19:40:56 2019 +0200 Bluetooth: hidp: Let hidp_send_message return number of queued bytes Let hidp_send_message return the number of successfully queued bytes instead of an unconditional 0. With the return value fixed to 0, other drivers relying on hidp, such as hidraw, can not return meaningful values from their respective implementations of write(). In particular, with the current behavior, a hidraw device's write() will have different return values depending on whether the device is connected via USB or Bluetooth, which makes it harder to abstract away the transport layer. Signed-off-by: Fabian Henneke Signed-off-by: Marcel Holtmann net/bluetooth/hidp/core.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit a2780889e247561744dd8efbd3478a1999b72ae3 Author: Harish Bandi Date: Fri Jul 12 10:39:40 2019 +0530 Bluetooth: hci_qca: Send VS pre shutdown command. WCN399x chips are coex chips, it needs a VS pre shutdown command while turning off the BT. So that chip can inform BT is OFF to other active clients. Signed-off-by: Harish Bandi Signed-off-by: Marcel Holtmann drivers/bluetooth/btqca.c | 21 +++++++++++++++++++++ drivers/bluetooth/btqca.h | 7 +++++++ drivers/bluetooth/hci_qca.c | 3 +++ 3 files changed, 31 insertions(+) commit 2fde6afb8c7fce8e679c1072891cd31d54af5b83 Author: Matthias Kaehlcke Date: Mon Jul 8 14:57:42 2019 -0700 Bluetooth: btqca: Use correct byte format for opcode of injected command The opcode of the command injected by commit 32646db8cc28 ("Bluetooth: btqca: inject command complete event during fw download") uses the CPU byte format, however it should always be little endian. In practice it shouldn't really matter, since all we need is an opcode != 0, but still let's do things correctly and keep sparse happy. Fixes: 32646db8cc28 ("Bluetooth: btqca: inject command complete event during fw download") Reported-by: kbuild test robot Signed-off-by: Matthias Kaehlcke Signed-off-by: Marcel Holtmann drivers/bluetooth/btqca.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4974c839d45e2ac89ce0e82b49d548cc12e02a9c Author: Wei Yongjun Date: Tue Jul 9 01:35:30 2019 +0000 Bluetooth: hci_qca: Use kfree_skb() instead of kfree() Use kfree_skb() instead of kfree() to free sk_buff. Fixes: 2faa3f15fa2f ("Bluetooth: hci_qca: wcn3990: Drop baudrate change vendor event") Signed-off-by: Wei Yongjun Reviewed-by: Matthias Kaehlcke Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_qca.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8059ba0bd0e4694e51c2ee6438a77b325f06c0d5 Author: Matthias Kaehlcke Date: Tue Jul 9 15:44:50 2019 -0700 Bluetooth: btqca: Add a short delay before downloading the NVM On WCN3990 downloading the NVM sometimes fails with a "TLV response size mismatch" error: [ 174.949955] Bluetooth: btqca.c:qca_download_firmware() hci0: QCA Downloading qca/crnv21.bin [ 174.958718] Bluetooth: btqca.c:qca_tlv_send_segment() hci0: QCA TLV response size mismatch It seems the controller needs a short time after downloading the firmware before it is ready for the NVM. A delay as short as 1 ms seems sufficient, make it 10 ms just in case. No event is received during the delay, hence we don't just silently drop an extra event. Signed-off-by: Matthias Kaehlcke Signed-off-by: Marcel Holtmann drivers/bluetooth/btqca.c | 3 +++ 1 file changed, 3 insertions(+) commit 5ee6310fb163ba7c66718905d4a19f1e71e641e0 Author: Wei Yongjun Date: Wed Jul 10 06:12:22 2019 +0000 Bluetooth: btusb: Fix error return code in btusb_mtk_setup_firmware() Fix to return error code -EINVAL from the error handling case instead of 0, as done elsewhere in this function. Fixes: a1c49c434e15 ("Bluetooth: btusb: Add protocol support for MediaTek MT7668U USB devices") Signed-off-by: Wei Yongjun Signed-off-by: Marcel Holtmann drivers/bluetooth/btusb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit bb2d267c448f4bc3a3389d97c56391cb779178ae Author: Ilya Leoshkevich Date: Mon Aug 12 17:03:32 2019 +0200 s390/bpf: fix lcgr instruction encoding "masking, test in bounds 3" fails on s390, because BPF_ALU64_IMM(BPF_NEG, BPF_REG_2, 0) ignores the top 32 bits of BPF_REG_2. The reason is that JIT emits lcgfr instead of lcgr. The associated comment indicates that the code was intended to emit lcgr in the first place, it's just that the wrong opcode was used. Fix by using the correct opcode. Fixes: 054623105728 ("s390/bpf: Add s390x eBPF JIT compiler backend") Signed-off-by: Ilya Leoshkevich Acked-by: Vasily Gorbik Signed-off-by: Daniel Borkmann arch/s390/net/bpf_jit_comp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 932727c55653c1d7838d0ecd0cdce4393be156e0 Author: Dan Carpenter Date: Fri Aug 9 13:13:19 2019 +0300 RDMA/core: Fix error code in stat_get_doit_qp() We need to set the error codes on these paths. Currently the only possible error code is -EMSGSIZE so that's what the patch uses. Fixes: 83c2c1fcbd08 ("RDMA/nldev: Allow get counter mode through RDMA netlink") Signed-off-by: Dan Carpenter Reviewed-by: Leon Romanovsky Link: https://lore.kernel.org/r/20190809101311.GA17867@mwanda Signed-off-by: Doug Ledford drivers/infiniband/core/nldev.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 17c19287ecf54fb55f155902dcd39c62a9547c4e Author: Dan Carpenter Date: Fri Aug 9 17:09:04 2019 +0300 RDMA/siw: Fix a memory leak in siw_init_cpulist() The error handling code doesn't free siw_cpu_info.tx_valid_cpus[0]. The first iteration through the loop is a no-op so this is sort of an off by one bug. Also Bernard pointed out that we can remove the NULL assignment and simplify the code a bit. Fixes: bdcf26bf9b3a ("rdma/siw: network and RDMA core interface") Signed-off-by: Dan Carpenter Reviewed-by: Bernard Metzler Reviewed-by: Bernard Metzler Link: https://lore.kernel.org/r/20190809140904.GB3552@mwanda Signed-off-by: Doug Ledford drivers/infiniband/sw/siw/siw_main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 7ea33253e910647876c9ccab720b662ae240a157 Merge: d45331b00ddb b421d83a3947 Author: Greg Kroah-Hartman Date: Mon Aug 12 16:51:07 2019 +0200 Merge tag 'misc-habanalabs-fixes-2019-08-12' of git://people.freedesktop.org/~gabbayo/linux into char-misc-next Oded writes: This tag contains a couple of important fixes: - Four fixes when running on s390 architecture (BE). With these fixes, the driver is fully functional on Big-endian architectures. The fixes include: - Validation/Patching of user packets - Completion queue handling - Internal H/W queues submission - Device IRQ unmasking operation - Fix to double free in an error path to avoid kernel corruption - Fix to DRAM usage accounting when a user process is terminated forcefully. * tag 'misc-habanalabs-fixes-2019-08-12' of git://people.freedesktop.org/~gabbayo/linux: habanalabs: fix device IRQ unmasking for BE host habanalabs: fix endianness handling for internal QMAN submission habanalabs: fix completion queue handling when host is BE habanalabs: fix endianness handling for packets from user habanalabs: fix DRAM usage accounting on context tear down habanalabs: Avoid double free in error flow commit e9eec6a55c95fb918036bfe29c26a535dca1ad49 Author: Yishai Hadas Date: Thu Aug 8 11:15:38 2019 +0300 IB/mlx5: Fix use-after-free error while accessing ev_file pointer Call to uverbs_close_fd() releases file pointer to 'ev_file' and mlx5_ib_dev is going to be inaccessible. Cache pointer prior cleaning resources to solve the KASAN warning below. BUG: KASAN: use-after-free in devx_async_event_close+0x391/0x480 [mlx5_ib] Read of size 8 at addr ffff888301e3cec0 by task devx_direct_tes/4631 CPU: 1 PID: 4631 Comm: devx_direct_tes Tainted: G OE 5.3.0-rc1-for-upstream-dbg-2019-07-26_01-19-56-93 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Ubuntu-1.8.2-1ubuntu2 04/01/2014 Call Trace: dump_stack+0x9a/0xeb print_address_description+0x1e2/0x400 ? devx_async_event_close+0x391/0x480 [mlx5_ib] __kasan_report+0x15c/0x1df ? devx_async_event_close+0x391/0x480 [mlx5_ib] kasan_report+0xe/0x20 devx_async_event_close+0x391/0x480 [mlx5_ib] __fput+0x26a/0x7b0 task_work_run+0x10d/0x180 exit_to_usermode_loop+0x137/0x160 do_syscall_64+0x3c7/0x490 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f5df907d664 Code: 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b7 0f 1f 80 00 00 00 00 8b 05 6a cd 20 00 48 63 ff 85 c0 75 13 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 44 f3 c3 66 90 48 83 ec 18 48 89 7c 24 08 e8 RSP: 002b:00007ffd353cb958 EFLAGS: 00000246 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 000056017a88c348 RCX: 00007f5df907d664 RDX: 00007f5df969d400 RSI: 00007f5de8f1ec90 RDI: 0000000000000006 RBP: 00007f5df9681dc0 R08: 00007f5de8736410 R09: 000056017a9d2dd0 R10: 000000000000000b R11: 0000000000000246 R12: 00007f5de899d7d0 R13: 00007f5df96c4248 R14: 00007f5de8f1ecb0 R15: 000056017ae41308 Allocated by task 4631: save_stack+0x19/0x80 kasan_kmalloc.constprop.3+0xa0/0xd0 alloc_uobj+0x71/0x230 [ib_uverbs] alloc_begin_fd_uobject+0x2e/0xc0 [ib_uverbs] rdma_alloc_begin_uobject+0x96/0x140 [ib_uverbs] ib_uverbs_run_method+0xdf0/0x1940 [ib_uverbs] ib_uverbs_cmd_verbs+0x57e/0xdb0 [ib_uverbs] ib_uverbs_ioctl+0x177/0x260 [ib_uverbs] do_vfs_ioctl+0x18f/0x1010 ksys_ioctl+0x70/0x80 __x64_sys_ioctl+0x6f/0xb0 do_syscall_64+0x95/0x490 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 4631: save_stack+0x19/0x80 __kasan_slab_free+0x11d/0x160 slab_free_freelist_hook+0x67/0x1a0 kfree+0xb9/0x2a0 uverbs_close_fd+0x118/0x1c0 [ib_uverbs] devx_async_event_close+0x28a/0x480 [mlx5_ib] __fput+0x26a/0x7b0 task_work_run+0x10d/0x180 exit_to_usermode_loop+0x137/0x160 do_syscall_64+0x3c7/0x490 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff888301e3cda8 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 280 bytes inside of 512-byte region [ffff888301e3cda8, ffff888301e3cfa8) The buggy address belongs to the page: page:ffffea000c078e00 refcount:1 mapcount:0 mapping:ffff888352811300 index:0x0 compound_mapcount: 0 flags: 0x2fffff80010200(slab|head) raw: 002fffff80010200 ffffea000d152608 ffffea000c077808 ffff888352811300 raw: 0000000000000000 0000000000250025 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888301e3cd80: fc fc fc fc fc fb fb fb fb fb fb fb fb fb fb fb ffff888301e3ce00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888301e3ce80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888301e3cf00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888301e3cf80: fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc Disabling lock debugging due to kernel taint Cc: # 5.2 Fixes: 759738537142 ("IB/mlx5: Enable subscription for device events over DEVX") Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20190808081538.28772-1-leon@kernel.org Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/devx.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 8e2a589a3fc36ce858d42e767c3bcd8fc62a512b Author: Ian Abbott Date: Mon Aug 12 13:08:14 2019 +0100 staging: comedi: dt3000: Fix rounding up of timer divisor `dt3k_ns_to_timer()` determines the prescaler and divisor to use to produce a desired timing period. It is influenced by a rounding mode and can round the divisor up, down, or to the nearest value. However, the code for rounding up currently does the same as rounding down! Fix ir by using the `DIV_ROUND_UP()` macro to calculate the divisor when rounding up. Also, change the types of the `divider`, `base` and `prescale` variables from `int` to `unsigned int` to avoid mixing signed and unsigned types in the calculations. Also fix a typo in a nearby comment: "improvment" => "improvement". Signed-off-by: Ian Abbott Cc: stable Link: https://lore.kernel.org/r/20190812120814.21188-1-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/dt3000.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b4d98bc3fc93ec3a58459948a2c0e0c9b501cd88 Author: Ian Abbott Date: Mon Aug 12 12:15:17 2019 +0100 staging: comedi: dt3000: Fix signed integer overflow 'divider * base' In `dt3k_ns_to_timer()` the following lines near the end of the function result in a signed integer overflow: prescale = 15; base = timer_base * (1 << prescale); divider = 65535; *nanosec = divider * base; (`divider`, `base` and `prescale` are type `int`, `timer_base` and `*nanosec` are type `unsigned int`. The value of `timer_base` will be either 50 or 100.) The main reason for the overflow is that the calculation for `base` is completely wrong. It should be: base = timer_base * (prescale + 1); which matches an earlier instance of this calculation in the same function. Reported-by: David Binderman Cc: Signed-off-by: Ian Abbott Link: https://lore.kernel.org/r/20190812111517.26803-1-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/dt3000.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ae78ca3cf3d9e9f914bfcd0bc5c389ff18b9c2e0 Author: Wenwen Wang Date: Sun Aug 11 12:23:22 2019 -0500 xen/blkback: fix memory leaks In read_per_ring_refs(), after 'req' and related memory regions are allocated, xen_blkif_map() is invoked to map the shared frame, irq, and etc. However, if this mapping process fails, no cleanup is performed, leading to memory leaks. To fix this issue, invoke the cleanup before returning the error. Acked-by: Roger Pau Monné Reviewed-by: Boris Ostrovsky Signed-off-by: Wenwen Wang Signed-off-by: Jens Axboe drivers/block/xen-blkback/xenbus.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e26cc08265dda37d2acc8394604f220ef412299d Author: zhengbin Date: Mon Aug 12 20:36:55 2019 +0800 blk-mq: move cancel of requeue_work to the front of blk_exit_queue blk_exit_queue will free elevator_data, while blk_mq_requeue_work will access it. Move cancel of requeue_work to the front of blk_exit_queue to avoid use-after-free. blk_exit_queue blk_mq_requeue_work __elevator_exit blk_mq_run_hw_queues blk_mq_exit_sched blk_mq_run_hw_queue dd_exit_queue blk_mq_hctx_has_pending kfree(elevator_data) blk_mq_sched_has_work dd_has_work Fixes: fbc2a15e3433 ("blk-mq: move cancel of requeue_work into blk_mq_release") Cc: stable@vger.kernel.org Reviewed-by: Ming Lei Signed-off-by: zhengbin Signed-off-by: Jens Axboe block/blk-mq.c | 2 -- block/blk-sysfs.c | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) commit 0cf25bc5d0816a40b464269d36b85021dd091f6d Merge: d45331b00ddb 4a56a478a525 Author: Greg Kroah-Hartman Date: Mon Aug 12 15:39:53 2019 +0200 Merge tag 'fixes-for-v5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus Felipe writes: USB: fixes for v5.3-rc4 Just a three fixes this time around. A race condition on mass storage gadget between disable() and set_alt() Clear a flag that was left set upon reset or disconnect A fix for renesas_usb3 UDC's sysfs interface * tag 'fixes-for-v5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb: usb: gadget: mass_storage: Fix races between fsg_disable and fsg_set_alt usb: gadget: composite: Clear "suspended" on reset/disconnect usb: gadget: udc: renesas_usb3: Fix sysfs interface of "role" commit 63daf4e166545363f3b875f5b81aecb46e1e1d19 Author: Tomi Valkeinen Date: Fri Aug 9 13:00:38 2019 +0300 drm/omap: ensure we have a valid dma_mask The omapdrm driver uses dma_set_coherent_mask(), but that's not enough anymore when LPAE is enabled. From Christoph Hellwig : > The traditional arm DMA code ignores, but the generic dma-direct/swiotlb > has stricter checks and thus fails mappings without a DMA mask. As we > use swiotlb for arm with LPAE now, omapdrm needs to catch up and > actually set a DMA mask. Change the dma_set_coherent_mask() call to dma_coerce_mask_and_coherent() so that the dev->dma_mask is also set. Fixes: ad3c7b18c5b3 ("arm: use swiotlb for bounce buffering on LPAE configs") Reported-by: "H. Nikolaus Schaller" Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/c219e7e6-0f66-d6fd-e0cf-59c803386825@ti.com Reviewed-by: Christoph Hellwig Reviewed-by: Peter Ujfalusi drivers/gpu/drm/omapdrm/omap_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 181ae8844578d0a80f188c1d195fd6bb91bcec81 Merge: 8f1c748b9a77 d45331b00ddb Author: Maarten Lankhorst Date: Mon Aug 12 15:14:03 2019 +0200 Merge remote-tracking branch 'drm/drm-fixes' into drm-misc-fixes Backport requested for omap dma mask fix. I'm not sure it still requires it, but just in case. :) Signed-off-by: Maarten Lankhorst commit b9ee5e04fd77898208c51b1395fa0b5e8536f9b6 Author: Christophe Leroy Date: Thu Aug 8 12:48:26 2019 +0000 powerpc/64e: Drop stale call to smp_processor_id() which hangs SMP startup Commit ebb9d30a6a74 ("powerpc/mm: any thread in one core can be the first to setup TLB1") removed the need to know the cpu_id in early_init_this_mmu(), but the call to smp_processor_id() which was marked __maybe_used remained. Since commit ed1cd6deb013 ("powerpc: Activate CONFIG_THREAD_INFO_IN_TASK") thread_info cannot be reached before MMU is properly set up. Drop this stale call to smp_processor_id() which makes SMP hang when CONFIG_PREEMPT is set. Fixes: ebb9d30a6a74 ("powerpc/mm: any thread in one core can be the first to setup TLB1") Fixes: ed1cd6deb013 ("powerpc: Activate CONFIG_THREAD_INFO_IN_TASK") Cc: stable@vger.kernel.org # v5.1+ Reported-by: Chris Packham Signed-off-by: Christophe Leroy Tested-by: Chris Packham Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/bef479514f4c08329fa649f67735df8918bc0976.1565268248.git.christophe.leroy@c-s.fr arch/powerpc/mm/nohash/tlb.c | 1 - 1 file changed, 1 deletion(-) commit e7409258845a0f64967f8377e99294d438137537 Author: Fenghua Yu Date: Fri Aug 9 18:40:37 2019 -0700 x86/umwait: Fix error handling in umwait_init() Currently, failure of cpuhp_setup_state() is ignored and the syscore ops and the control interfaces can still be added even after the failure. But, this error handling will cause a few issues: 1. The CPUs may have different values in the IA32_UMWAIT_CONTROL MSR because there is no way to roll back the control MSR on the CPUs which already set the MSR before the failure. 2. If the sysfs interface is added successfully, there will be a mismatch between the global control value and the control MSR: - The interface shows the default global control value. But, the control MSR is not set to the value because the CPU online function, which is supposed to set the MSR to the value, is not installed. - If the sysadmin changes the global control value through the interface, the control MSR on all current online CPUs is set to the new value. But, the control MSR on newly onlined CPUs after the value change will not be set to the new value due to lack of the CPU online function. 3. On resume from suspend/hibernation, the boot CPU restores the control MSR to the global control value through the syscore ops. But, the control MSR on all APs is not set due to lake of the CPU online function. To solve the issues and enforce consistent behavior on the failure of the CPU hotplug setup, make the following changes: 1. Cache the original control MSR value which is configured by hardware or BIOS before kernel boot. This value is likely to be 0. But it could be a different number as well. Cache the control MSR only once before the MSR is changed. 2. Add the CPU offline function so that the MSR is restored to the original control value on all CPUs on the failure. 3. On the failure, exit from cpumait_init() so that the syscore ops and the control interfaces are not added. Reported-by: Valdis Kletnieks Suggested-by: Thomas Gleixner Signed-off-by: Fenghua Yu Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/1565401237-60936-1-git-send-email-fenghua.yu@intel.com arch/x86/kernel/cpu/umwait.c | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) commit cbd32a1c56e36fedaa93a727699188bd3e6e6f67 Merge: 48c7d73b2362 b61fbc887af7 Author: Thomas Gleixner Date: Mon Aug 12 14:36:27 2019 +0200 Merge tag 'efi-urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi into efi/urgent Pull a single EFI fix for v5.3 from Ard: - Fix mixed mode breakage in EFI config table handling for TPM. commit 8f1c748b9a7751ee1297b4880788a09f7c802eb4 Author: Mihail Atanassov Date: Mon Aug 5 09:56:25 2019 +0000 drm/komeda: Add support for 'memory-region' DT node property The 'memory-region' property of the komeda display driver DT binding allows the use of a 'reserved-memory' node for buffer allocations. Add the requisite of_reserved_mem_device_{init,release} calls to actually make use of the memory if present. Changes since v1: - Move handling inside komeda_parse_dt Signed-off-by: Mihail Atanassov Reviewed-by: James Qian Wang (Arm Technology China) Signed-off-by: james qian wang (Arm Technology China) Link: https://patchwork.freedesktop.org/patch/msgid/20190805095408.21285-1-mihail.atanassov@arm.com drivers/gpu/drm/arm/display/komeda/komeda_dev.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit a9577f1921255b975da2a47d8f6733b2d6c98193 Author: Lowry Li (Arm Technology China) Date: Tue Aug 6 06:31:56 2019 +0000 drm/komeda: Adds internal bpp computing for arm afbc only format YU08 YU10 The drm_format_info doesn't have any cpp or block_size (both are zero) information for arm only afbc format YU08/YU10. we need to compute it by ourselves. Changes since v1: 1. Removed redundant warning check in komeda_get_afbc_format_bpp(); 2. Removed a redundant empty line; 3. Rebased the branch. Signed-off-by: Lowry Li (Arm Technology China) Reviewed-by: James Qian Wang (Arm Technology China) Signed-off-by: james qian wang (Arm Technology China) Link: https://patchwork.freedesktop.org/patch/msgid/1565073104-24047-1-git-send-email-lowry.li@arm.com Link: https://patchwork.freedesktop.org/patch/msgid/1565073104-24047-1-git-send-email-lowry.li@arm.com .../gpu/drm/arm/display/komeda/komeda_format_caps.c | 19 +++++++++++++++++++ .../gpu/drm/arm/display/komeda/komeda_format_caps.h | 3 +++ .../gpu/drm/arm/display/komeda/komeda_framebuffer.c | 5 +++-- 3 files changed, 25 insertions(+), 2 deletions(-) commit b61fbc887af7a13a1c90c84c1feaeb4c9780e1e2 Author: Hans de Goede Date: Wed Aug 7 23:59:03 2019 +0200 efi-stub: Fix get_efi_config_table on mixed-mode setups Fix get_efi_config_table using the wrong structs when booting a 64 bit kernel on 32 bit firmware. Fixes: 82d736ac56d7 ("Abstract out support for locating an EFI config table") Signed-off-by: Hans de Goede Acked-By: Matthew Garrett Reviewed-by: Ard Biesheuvel Acked-by: Jarkko Sakkinen Signed-off-by: Ard Biesheuvel drivers/firmware/efi/libstub/efi-stub-helper.c | 38 ++++++++++++++++++-------- 1 file changed, 27 insertions(+), 11 deletions(-) commit 4eaefe8c621c6195c91044396ed8060c179f7aae Author: Rafael J. Wysocki Date: Thu Aug 8 23:58:38 2019 +0200 nvme-pci: Allow PCI bus-level PM to be used if ASPM is disabled One of the modifications made by commit d916b1be94b6 ("nvme-pci: use host managed power state for suspend") was adding a pci_save_state() call to nvme_suspend() so as to instruct the PCI bus type to leave devices handled by the nvme driver in D0 during suspend-to-idle. That was done with the assumption that ASPM would transition the device's PCIe link into a low-power state when the device became inactive. However, if ASPM is disabled for the device, its PCIe link will stay in L0 and in that case commit d916b1be94b6 is likely to cause the energy used by the system while suspended to increase. Namely, if the device in question works in accordance with the PCIe specification, putting it into D3hot causes its PCIe link to go to L1 or L2/L3 Ready, which is lower-power than L0. Since the energy used by the system while suspended depends on the state of its PCIe link (as a general rule, the lower-power the state of the link, the less energy the system will use), putting the device into D3hot during suspend-to-idle should be more energy-efficient that leaving it in D0 with disabled ASPM. For this reason, avoid leaving NVMe devices with disabled ASPM in D0 during suspend-to-idle. Instead, shut them down entirely and let the PCI bus type put them into D3. Fixes: d916b1be94b6 ("nvme-pci: use host managed power state for suspend") Link: https://lore.kernel.org/linux-pm/2763495.NmdaWeg79L@kreacher/T/#t Signed-off-by: Rafael J. Wysocki Reviewed-by: Keith Busch drivers/nvme/host/pci.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit accd2dd72c8f087441d725dd916688171519e4e6 Author: Rafael J. Wysocki Date: Fri Aug 9 10:23:57 2019 +0200 PCI/ASPM: Add pcie_aspm_enabled() Add a function checking whether or not PCIe ASPM has been enabled for a given device. It will be used by the NVMe driver to decide how to handle the device during system suspend. Signed-off-by: Rafael J. Wysocki Reviewed-by: Keith Busch Acked-by: Bjorn Helgaas drivers/pci/pcie/aspm.c | 20 ++++++++++++++++++++ include/linux/pci.h | 2 ++ 2 files changed, 22 insertions(+) commit b421d83a3947369fd5718824aecfaebe1efbf7ed Author: Ben Segal Date: Wed Aug 7 13:54:54 2019 +0000 habanalabs: fix device IRQ unmasking for BE host When unmasking IRQs inside the ASIC, the driver passes an array of all the IRQ to unmask. The ASIC's CPU is working in LE so when running in a BE host, the driver needs to do the proper endianness swapping when preparing this array. In addition, this patch also fixes the endianness of a couple of kernel log debug messages that print values of packets Signed-off-by: Ben Segal Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/goya/goya.c | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) commit b9040c99414ba5b85090595a61abc686a5dbb388 Author: Oded Gabbay Date: Thu Aug 8 15:45:58 2019 +0300 habanalabs: fix endianness handling for internal QMAN submission The PQs of internal H/W queues (QMANs) can be located in different memory areas for different ASICs. Therefore, when writing PQEs, we need to use the correct function according to the location of the PQ. e.g. if the PQ is located in the device's memory (SRAM or DRAM), we need to use memcpy_toio() so it would work in architectures that have separate address ranges for IO memory. This patch makes the code that writes the PQE to be ASIC-specific so we can handle this properly per ASIC. Signed-off-by: Oded Gabbay Tested-by: Ben Segal drivers/misc/habanalabs/goya/goya.c | 7 ++++--- drivers/misc/habanalabs/goya/goyaP.h | 2 +- drivers/misc/habanalabs/habanalabs.h | 9 +++++++-- drivers/misc/habanalabs/hw_queue.c | 14 +++++--------- 4 files changed, 17 insertions(+), 15 deletions(-) commit 4e87334a0ef43663019dbaf3638ad10fd8c3320c Author: Ben Segal Date: Thu Aug 1 23:22:20 2019 +0000 habanalabs: fix completion queue handling when host is BE This patch fix the CQ irq handler to work in hosts with BE architecture. It adds the correct endian-swapping macros around the relevant memory accesses. Signed-off-by: Ben Segal Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/irq.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) commit 213ad5ad016a0da975b35f54e8cd236c3b04724b Author: Ben Segal Date: Thu Aug 1 23:20:32 2019 +0000 habanalabs: fix endianness handling for packets from user Packets that arrive from the user and need to be parsed by the driver are assumed to be in LE format. This patch fix all the places where the code handles these packets and use the correct endianness macros to handle them, as the driver handles the packets in CPU format (LE or BE depending on the arch). Signed-off-by: Ben Segal Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/goya/goya.c | 32 +++++++++++++--------- .../misc/habanalabs/include/goya/goya_packets.h | 13 +++++++++ 2 files changed, 32 insertions(+), 13 deletions(-) commit c8113756ba27298d6e95403c087dc5881b419a99 Author: Tomer Tayar Date: Sun Aug 4 07:03:41 2019 +0000 habanalabs: fix DRAM usage accounting on context tear down The patch fix the DRAM usage accounting by adding a missing update of the DRAM memory consumption, when a context is being torn down without an organized release of the allocated memory. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/memory.c | 2 ++ 1 file changed, 2 insertions(+) commit 508c5849c62d009e03f37ad0f556071fac5112f0 Author: Tomer Tayar Date: Thu Aug 1 13:57:36 2019 +0000 habanalabs: Avoid double free in error flow In case kernel context init fails during device initialization, both hl_ctx_put() and kfree() are called, ending with a double free of the kernel context. Calling kfree() is needed only when a failure happens between the allocation of the kernel context and its initialization, so move it to there and remove it from the error flow. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/device.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 4a56a478a525d6427be90753451c40e1327caa1a Author: Benjamin Herrenschmidt Date: Fri Jul 26 14:59:04 2019 +1000 usb: gadget: mass_storage: Fix races between fsg_disable and fsg_set_alt If fsg_disable() and fsg_set_alt() are called too closely to each other (for example due to a quick reset/reconnect), what can happen is that fsg_set_alt sets common->new_fsg from an interrupt while handle_exception is trying to process the config change caused by fsg_disable(): fsg_disable() ... handle_exception() sets state back to FSG_STATE_NORMAL hasn't yet called do_set_interface() or is inside it. ---> interrupt fsg_set_alt sets common->new_fsg queues a new FSG_STATE_CONFIG_CHANGE <--- Now, the first handle_exception can "see" the updated new_fsg, treats it as if it was a fsg_set_alt() response, call usb_composite_setup_continue() etc... But then, the thread sees the second FSG_STATE_CONFIG_CHANGE, and goes back down the same path, wipes and reattaches a now active fsg, and .. calls usb_composite_setup_continue() which at this point is wrong. Not only we get a backtrace, but I suspect the second set_interface wrecks some state causing the host to get upset in my case. This fixes it by replacing "new_fsg" by a "state argument" (same principle) which is set in the same lock section as the state update, and retrieved similarly. That way, there is never any discrepancy between the dequeued state and the observed value of it. We keep the ability to have the latest reconfig operation take precedence, but we guarantee that once "dequeued" the argument (new_fsg) will not be clobbered by any new event. Signed-off-by: Benjamin Herrenschmidt Acked-by: Alan Stern Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_mass_storage.c | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) commit 602fda17c7356bb7ae98467d93549057481d11dd Author: Benjamin Herrenschmidt Date: Fri Jul 26 14:59:03 2019 +1000 usb: gadget: composite: Clear "suspended" on reset/disconnect In some cases, one can get out of suspend with a reset or a disconnect followed by a reconnect. Previously we would leave a stale suspended flag set. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Felipe Balbi drivers/usb/gadget/composite.c | 1 + 1 file changed, 1 insertion(+) commit 5dac665cf403967bb79a7aeb8c182a621fe617ff Author: Yoshihiro Shimoda Date: Wed Jul 31 19:15:43 2019 +0900 usb: gadget: udc: renesas_usb3: Fix sysfs interface of "role" Since the role_store() uses strncmp(), it's possible to refer out-of-memory if the sysfs data size is smaller than strlen("host"). This patch fixes it by using sysfs_streq() instead of strncmp(). Fixes: cc995c9ec118 ("usb: gadget: udc: renesas_usb3: add support for usb role swap") Cc: # v4.12+ Reviewed-by: Geert Uytterhoeven Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/renesas_usb3.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 125b7e0949d4e72b15c2b1a1590f8cece985a918 Author: Nathan Chancellor Date: Sun Aug 11 20:13:45 2019 -0700 net: tc35815: Explicitly check NET_IP_ALIGN is not zero in tc35815_rx clang warns: drivers/net/ethernet/toshiba/tc35815.c:1507:30: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand] if (!HAVE_DMA_RXALIGN(lp) && NET_IP_ALIGN) ^ ~~~~~~~~~~~~ drivers/net/ethernet/toshiba/tc35815.c:1507:30: note: use '&' for a bitwise operation if (!HAVE_DMA_RXALIGN(lp) && NET_IP_ALIGN) ^~ & drivers/net/ethernet/toshiba/tc35815.c:1507:30: note: remove constant to silence this warning if (!HAVE_DMA_RXALIGN(lp) && NET_IP_ALIGN) ~^~~~~~~~~~~~~~~ 1 warning generated. Explicitly check that NET_IP_ALIGN is not zero, which matches how this is checked in other parts of the tree. Because NET_IP_ALIGN is a build time constant, this check will be constant folded away during optimization. Fixes: 82a9928db560 ("tc35815: Enable StripCRC feature") Link: https://github.com/ClangBuiltLinux/linux/issues/608 Signed-off-by: Nathan Chancellor Signed-off-by: David S. Miller drivers/net/ethernet/toshiba/tc35815.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8874ecae2977e5a2d4f0ba301364435b81c05938 Author: Chris Packham Date: Mon Aug 12 08:18:25 2019 +1200 tipc: initialise addr_trail_end when setting node addresses We set the field 'addr_trial_end' to 'jiffies', instead of the current value 0, at the moment the node address is initialized. This guarantees we don't inadvertently enter an address trial period when the node address is explicitly set by the user. Signed-off-by: Chris Packham Acked-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/addr.c | 1 + 1 file changed, 1 insertion(+) commit 58799865be84e2a895dab72de0e1b996ed943f22 Author: Chen-Yu Tsai Date: Sun Aug 11 22:18:25 2019 +0800 net: dsa: Check existence of .port_mdb_add callback before calling it The dsa framework has optional .port_mdb_{prepare,add,del} callback fields for drivers to handle multicast database entries. When adding an entry, the framework goes through a prepare phase, then a commit phase. Drivers not providing these callbacks should be detected in the prepare phase. DSA core may still bypass the bridge layer and call the dsa_port_mdb_add function directly with no prepare phase or no switchdev trans object, and the framework ends up calling an undefined .port_mdb_add callback. This results in a NULL pointer dereference, as shown in the log below. The other functions seem to be properly guarded. Do the same for .port_mdb_add in dsa_switch_mdb_add_bitmap() as well. 8<--- cut here --- Unable to handle kernel NULL pointer dereference at virtual address 00000000 pgd = (ptrval) [00000000] *pgd=00000000 Internal error: Oops: 80000005 [#1] SMP ARM Modules linked in: rtl8xxxu rtl8192cu rtl_usb rtl8192c_common rtlwifi mac80211 cfg80211 CPU: 1 PID: 134 Comm: kworker/1:2 Not tainted 5.3.0-rc1-00247-gd3519030752a #1 Hardware name: Allwinner sun7i (A20) Family Workqueue: events switchdev_deferred_process_work PC is at 0x0 LR is at dsa_switch_event+0x570/0x620 pc : [<00000000>] lr : [] psr: 80070013 sp : ee871db8 ip : 00000000 fp : ee98d0a4 r10: 0000000c r9 : 00000008 r8 : ee89f710 r7 : ee98d040 r6 : ee98d088 r5 : c0f04c48 r4 : ee98d04c r3 : 00000000 r2 : ee89f710 r1 : 00000008 r0 : ee98d040 Flags: Nzcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none Control: 10c5387d Table: 6deb406a DAC: 00000051 Process kworker/1:2 (pid: 134, stack limit = 0x(ptrval)) Stack: (0xee871db8 to 0xee872000) 1da0: ee871e14 103ace2d 1dc0: 00000000 ffffffff 00000000 ee871e14 00000005 00000000 c08524a0 00000000 1de0: ffffe000 c014bdfc c0f04c48 ee871e98 c0f04c48 ee9e5000 c0851120 c014bef0 1e00: 00000000 b643aea2 ee9b4068 c08509a8 ee2bf940 ee89f710 ee871ecb 00000000 1e20: 00000008 103ace2d 00000000 c087e248 ee29c868 103ace2d 00000001 ffffffff 1e40: 00000000 ee871e98 00000006 00000000 c0fb2a50 c087e2d0 ffffffff c08523c4 1e60: ffffffff c014bdfc 00000006 c0fad2d0 ee871e98 ee89f710 00000000 c014c500 1e80: 00000000 ee89f3c0 c0f04c48 00000000 ee9e5000 c087dfb4 ee9e5000 00000000 1ea0: ee89f710 ee871ecb 00000001 103ace2d 00000000 c0f04c48 00000000 c087e0a8 1ec0: 00000000 efd9a3e0 0089f3c0 103ace2d ee89f700 ee89f710 ee9e5000 00000122 1ee0: 00000100 c087e130 ee89f700 c0fad2c8 c1003ef0 c087de4c 2e928000 c0fad2ec 1f00: c0fad2ec ee839580 ef7a62c0 ef7a9400 00000000 c087def8 c0fad2ec c01447dc 1f20: ef315640 ef7a62c0 00000008 ee839580 ee839594 ef7a62c0 00000008 c0f03d00 1f40: ef7a62d8 ef7a62c0 ffffe000 c0145b84 ffffe000 c0fb2420 c0bfaa8c 00000000 1f60: ffffe000 ee84b600 ee84b5c0 00000000 ee870000 ee839580 c0145b40 ef0e5ea4 1f80: ee84b61c c014a6f8 00000001 ee84b5c0 c014a5b0 00000000 00000000 00000000 1fa0: 00000000 00000000 00000000 c01010e8 00000000 00000000 00000000 00000000 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000 [] (dsa_switch_event) from [] (notifier_call_chain+0x48/0x84) [] (notifier_call_chain) from [] (raw_notifier_call_chain+0x18/0x20) [] (raw_notifier_call_chain) from [] (dsa_port_mdb_add+0x48/0x74) [] (dsa_port_mdb_add) from [] (__switchdev_handle_port_obj_add+0x54/0xd4) [] (__switchdev_handle_port_obj_add) from [] (switchdev_handle_port_obj_add+0x8/0x14) [] (switchdev_handle_port_obj_add) from [] (dsa_slave_switchdev_blocking_event+0x94/0xa4) [] (dsa_slave_switchdev_blocking_event) from [] (notifier_call_chain+0x48/0x84) [] (notifier_call_chain) from [] (blocking_notifier_call_chain+0x50/0x68) [] (blocking_notifier_call_chain) from [] (switchdev_port_obj_notify+0x44/0xa8) [] (switchdev_port_obj_notify) from [] (switchdev_port_obj_add_now+0x90/0x104) [] (switchdev_port_obj_add_now) from [] (switchdev_port_obj_add_deferred+0x14/0x5c) [] (switchdev_port_obj_add_deferred) from [] (switchdev_deferred_process+0x64/0x104) [] (switchdev_deferred_process) from [] (switchdev_deferred_process_work+0xc/0x14) [] (switchdev_deferred_process_work) from [] (process_one_work+0x218/0x50c) [] (process_one_work) from [] (worker_thread+0x44/0x5bc) [] (worker_thread) from [] (kthread+0x148/0x150) [] (kthread) from [] (ret_from_fork+0x14/0x2c) Exception stack(0xee871fb0 to 0xee871ff8) 1fa0: 00000000 00000000 00000000 00000000 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000 Code: bad PC value ---[ end trace 1292c61abd17b130 ]--- [] (dsa_switch_event) from [] (notifier_call_chain+0x48/0x84) corresponds to $ arm-linux-gnueabihf-addr2line -C -i -e vmlinux c08533ec linux/net/dsa/switch.c:156 linux/net/dsa/switch.c:178 linux/net/dsa/switch.c:328 Fixes: e6db98db8a95 ("net: dsa: add switch mdb bitmap functions") Signed-off-by: Chen-Yu Tsai Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller net/dsa/switch.c | 3 +++ 1 file changed, 3 insertions(+) commit 8028ccda39bb440d86aee6948405c8337afbed8b Author: Petr Machata Date: Sun Aug 11 10:48:37 2019 +0300 mlxsw: spectrum_ptp: Keep unmatched entries in a linked list To identify timestamps for matching with their packets, Spectrum-1 uses a five-tuple of (port, direction, domain number, message type, sequence ID). If there are several clients from the same domain behind a single port sending Delay_Req's, the only thing differentiating these packets, as far as Spectrum-1 is concerned, is the sequence ID. Should sequence IDs between individual clients be similar, conflicts may arise. That is not a problem to hardware, which will simply deliver timestamps on a first comes, first served basis. However the driver uses a simple hash table to store the unmatched pieces. When a new conflicting piece arrives, it pushes out the previously stored one, which if it is a packet, is delivered without timestamp. Later on as the corresponding timestamps arrive, the first one is mismatched to the second packet, and the second one is never matched and eventually is GCd. To correct this issue, instead of using a simple rhashtable, use rhltable to keep the unmatched entries. Previously, a found unmatched entry would always be removed from the hash table. That is not the case anymore--an incompatible entry is left in the hash table. Therefore removal from the hash table cannot be used to confirm the validity of the looked-up pointer, instead the lookup would simply need to be redone. Therefore move it inside the critical section. This simplifies a lot of the code. Fixes: 8748642751ed ("mlxsw: spectrum: PTP: Support SIOCGHWTSTAMP, SIOCSHWTSTAMP ioctls") Reported-by: Alex Veber Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c | 138 ++++++++------------- 1 file changed, 55 insertions(+), 83 deletions(-) commit d81f41411c2549b0ae42f23140d9589172096759 Author: Jonathan Neuschäfer Date: Sat Aug 10 13:11:56 2019 +0200 net: nps_enet: Fix function names in doc comments Adjust the function names in two doc comments to match the corresponding functions. Signed-off-by: Jonathan Neuschäfer Signed-off-by: David S. Miller drivers/net/ethernet/ezchip/nps_enet.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 68553f1a6f746bf860bce3eb42d78c26a717d9c0 Author: David Howells Date: Fri Aug 9 22:47:47 2019 +0100 rxrpc: Fix local refcounting Fix rxrpc_unuse_local() to handle a NULL local pointer as it can be called on an unbound socket on which rx->local is not yet set. The following reproduced (includes omitted): int main(void) { socket(AF_RXRPC, SOCK_DGRAM, AF_INET); return 0; } causes the following oops to occur: BUG: kernel NULL pointer dereference, address: 0000000000000010 ... RIP: 0010:rxrpc_unuse_local+0x8/0x1b ... Call Trace: rxrpc_release+0x2b5/0x338 __sock_release+0x37/0xa1 sock_close+0x14/0x17 __fput+0x115/0x1e9 task_work_run+0x72/0x98 do_exit+0x51b/0xa7a ? __context_tracking_exit+0x4e/0x10e do_group_exit+0xab/0xab __x64_sys_exit_group+0x14/0x17 do_syscall_64+0x89/0x1d4 entry_SYSCALL_64_after_hwframe+0x49/0xbe Reported-by: syzbot+20dee719a2e090427b5f@syzkaller.appspotmail.com Fixes: 730c5fd42c1e ("rxrpc: Fix local endpoint refcounting") Signed-off-by: David Howells cc: Jeffrey Altman Signed-off-by: David S. Miller net/rxrpc/local_object.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 59c84b9fcf42c99a945d5fdc49220d854e539690 Author: David Ahern Date: Tue Aug 6 12:15:17 2019 -0700 netdevsim: Restore per-network namespace accounting for fib entries Prior to the commit in the fixes tag, the resource controller in netdevsim tracked fib entries and rules per network namespace. Restore that behavior. Fixes: 5fc494225c1e ("netdevsim: create devlink instance per netdevsim instance") Signed-off-by: David Ahern Signed-off-by: David S. Miller drivers/net/netdevsim/dev.c | 63 ++++++++++------------- drivers/net/netdevsim/fib.c | 102 +++++++++++++++++++++++--------------- drivers/net/netdevsim/netdev.c | 9 +++- drivers/net/netdevsim/netdevsim.h | 10 ++-- 4 files changed, 98 insertions(+), 86 deletions(-) commit 9481382b36fe1dbdada9303ebd6b9dba915da989 Merge: 57c722e932cf 4f7aafd78aea Author: David S. Miller Date: Sun Aug 11 14:49:34 2019 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2019-08-11 The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) x64 JIT code generation fix for backward-jumps to 1st insn, from Alexei. 2) Fix buggy multi-closing of BTF file descriptor in libbpf, from Andrii. 3) Fix libbpf_num_possible_cpus() to make it thread safe, from Takshak. 4) Fix bpftool to dump an error if pinning fails, from Jakub. ==================== Signed-off-by: David S. Miller commit 1ee1119d184bb06af921b48c3021d921bbd85bac Author: Gustavo A. R. Silva Date: Fri Aug 9 23:43:56 2019 -0500 sh: kernel: hw_breakpoint: Fix missing break in switch statement Add missing break statement in order to prevent the code from falling through to case SH_BREAKPOINT_WRITE. Fixes: 09a072947791 ("sh: hw-breakpoints: Add preliminary support for SH-4A UBC.") Cc: stable@vger.kernel.org Reviewed-by: Geert Uytterhoeven Reviewed-by: Guenter Roeck Tested-by: Guenter Roeck Signed-off-by: Gustavo A. R. Silva arch/sh/kernel/hw_breakpoint.c | 1 + 1 file changed, 1 insertion(+) commit 54b13723f765122f3f5f49d07f3e48fa9fcf8c7c Author: Gustavo A. R. Silva Date: Sat Aug 10 00:19:11 2019 -0500 sh: kernel: disassemble: Mark expected switch fall-throughs Remove logically dead code and mark switch cases where we are expecting to fall through. Fix the following warnings (Building: defconfig sh): arch/sh/kernel/disassemble.c:478:8: warning: this statement may fall through [-Wimplicit-fallthrough=] arch/sh/kernel/disassemble.c:487:8: warning: this statement may fall through [-Wimplicit-fallthrough=] arch/sh/kernel/disassemble.c:496:8: warning: this statement may fall through [-Wimplicit-fallthrough=] Reviewed-by: Geert Uytterhoeven Reviewed-by: Guenter Roeck Tested-by: Guenter Roeck Signed-off-by: Gustavo A. R. Silva arch/sh/kernel/disassemble.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d45331b00ddb179e291766617259261c112db872 Author: Linus Torvalds Date: Sun Aug 11 13:26:41 2019 -0700 Linux 5.3-rc4 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b6c0649caf351d39e1dfb5698d7b3bb7536850b1 Merge: f6192cb74292 06282373ff57 Author: Linus Torvalds Date: Sun Aug 11 13:15:10 2019 -0700 Merge tag 'dax-fixes-5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull dax fixes from Dan Williams: "A filesystem-dax and device-dax fix for v5.3. The filesystem-dax fix is tagged for stable as the implementation has been mistakenly throwing away all cow pages on any truncate or hole punch operation as part of the solution to coordinate device-dma vs truncate to dax pages. The device-dax change fixes up a regression this cycle from the introduction of a common 'internal per-cpu-ref' implementation. Summary: - Fix dax_layout_busy_page() to not discard private cow pages of fs/dax private mappings. - Update the memremap_pages core to properly cleanup on behalf of internal reference-count users like device-dax" * tag 'dax-fixes-5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: mm/memremap: Fix reuse of pgmap instances with internal references dax: dax_layout_busy_page() should not unmap cow pages commit f6192cb7429211bfaac1178c35607b0c989900b8 Merge: 296d05cb0d3c 49da065f7b1f Author: Linus Torvalds Date: Sun Aug 11 10:13:53 2019 -0700 Merge tag 'ntb-5.3-bugfixes' of git://github.com/jonmason/ntb Pull NTB fix from Jon Mason: "Bug fix for NTB MSI kernel compile warning" * tag 'ntb-5.3-bugfixes' of git://github.com/jonmason/ntb: NTB/msi: remove incorrect MODULE defines commit 0c9c83043d4957092f74173cfeeb5bc63e7a70e7 Merge: 20621fedb2a6 bd46a9063430 Author: Jens Axboe Date: Sat Aug 10 21:41:41 2019 -0600 Merge branch 'nvme-5.3-rc' of git://git.infradead.org/nvme into for-linus Pull NVMe fixes from Sagi: "Few nvme fixes for the next rc round. - detect capacity changes on the mpath disk from Anthony - probe/remove fix from Keith - various fixes to pass blktests from Logan - deadlock in reset/scan race fix - nvme-rdma use-after-free fix - deadlock fix when passthru commands race mpath disk info update" * 'nvme-5.3-rc' of git://git.infradead.org/nvme: nvme-pci: Fix async probe remove race nvme: fix controller removal race with scan work nvme-rdma: fix possible use-after-free in connect error flow nvme: fix a possible deadlock when passthru commands sent to a multipath device nvme-core: Fix extra device_put() call on error path nvmet-file: fix nvmet_file_flush() always returning an error nvmet-loop: Flush nvme_delete_wq when removing the port nvmet: Fix use-after-free bug when a port is removed nvme-multipath: revalidate nvme_ns_head gendisk in nvme_validate_ns commit 296d05cb0d3c9f4648e31abb8ce404ac6915d66c Merge: 6d8f809cb55a b390e0bfd299 Author: Linus Torvalds Date: Sat Aug 10 16:31:47 2019 -0700 Merge tag 'riscv/for-v5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V updates from Paul Walmsley: "A few minor RISC-V updates for v5.3-rc4: - Remove __udivdi3() from the 32-bit Linux port, converting the only upstream user to use do_div(), per Linux policy - Convert the RISC-V standard clocksource away from per-cpu data structures, since only one is used by Linux, even on a multi-CPU system - A set of DT binding updates that remove an obsolete text binding in favor of a YAML binding, fix a bogus compatible string in the schema (thus fixing a "make dtbs_check" warning), and clarifies the future values expected in one of the RISC-V CPU properties" * tag 'riscv/for-v5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: dt-bindings: riscv: fix the schema compatible string for the HiFive Unleashed board dt-bindings: riscv: remove obsolete cpus.txt RISC-V: Remove udivdi3 riscv: delay: use do_div() instead of __udivdi3() dt-bindings: Update the riscv,isa string description RISC-V: Remove per cpu clocksource commit 6d8f809cb55a8fc0ebfae27984215e4a0b201984 Merge: d2359a5153eb 04f5bda84b07 Author: Linus Torvalds Date: Sat Aug 10 16:24:03 2019 -0700 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Thomas Gleixner: "A few fixes for x86: - Don't reset the carefully adjusted build flags for the purgatory and remove the unwanted flags instead. The 'reset all' approach led to build fails under certain circumstances. - Unbreak CLANG build of the purgatory by avoiding the builtin memcpy/memset implementations. - Address missing prototype warnings by including the proper header - Fix yet more fall-through issues" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/lib/cpu: Address missing prototypes warning x86/purgatory: Use CFLAGS_REMOVE rather than reset KBUILD_CFLAGS x86/purgatory: Do not use __builtin_memcpy and __builtin_memset x86: mtrr: cyrix: Mark expected switch fall-through x86/ptrace: Mark expected switch fall-through commit d2359a5153ebb16412daedd8f104b886643cbd1a Merge: dcbb4a153971 d7731b8133ad Author: Linus Torvalds Date: Sat Aug 10 16:19:02 2019 -0700 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf tooling fixes from Thomas Gleixner: "Perf tooling fixes all over the place: - Fix the selection of the main thread COMM in db-export - Fix the disassemmbly display for BPF in annotate - Fix cpumap mask setup in perf ftrace when only one CPU is present - Add the missing 'cpu_clk_unhalted.core' event - Fix CPU 0 bindings in NUMA benchmarks - Fix the module size calculations for s390 - Handle the gap between kernel end and module start on s390 correctly - Build and typo fixes" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf pmu-events: Fix missing "cpu_clk_unhalted.core" event perf annotate: Fix s390 gap between kernel end and module start perf record: Fix module size on s390 perf tools: Fix include paths in ui directory perf tools: Fix a typo in a variable name in the Documentation Makefile perf cpumap: Fix writing to illegal memory in handling cpumap mask perf ftrace: Fix failure to set cpumask when only one cpu is present perf db-export: Fix thread__exec_comm() perf annotate: Fix printing of unaugmented disassembled instructions from BPF perf bench numa: Fix cpu0 binding commit dcbb4a153971ff8646af0c963f5698bf21bfbfdc Merge: ed254bb54fed 04e048cf09d7 Author: Linus Torvalds Date: Sat Aug 10 15:48:02 2019 -0700 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixes from Thomas Gleixner: "Three fixlets for the scheduler: - Avoid double bandwidth accounting in the push & pull code - Use a sane FIFO priority for the Pressure Stall Information (PSI) thread. - Avoid permission checks when setting the scheduler params for the PSI thread" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/psi: Do not require setsched permission from the trigger creator sched/psi: Reduce psimon FIFO priority sched/deadline: Fix double accounting of rq/running bw in push & pull commit ed254bb54fed18549b96285cfdadd69780f52c14 Merge: 6054f4ecdc11 491beed3b102 Author: Linus Torvalds Date: Sat Aug 10 15:46:25 2019 -0700 Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fix from Thomas Gleixner: "A small fix for the affinity spreading code. It failed to handle situations where a single vector was requested either due to only one CPU being available or vector exhaustion causing only a single interrupt to be granted. The fix is to simply remove the requirement in the affinity spreading code for more than one interrupt being available" * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: genirq/affinity: Create affinity mask for single vector commit 6054f4ecdc116ce64bd5c50df8edd01d2c105e69 Merge: 829890d266e3 e6a9522ac3ff Author: Linus Torvalds Date: Sat Aug 10 15:44:09 2019 -0700 Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull objtool warning fix from Thomas Gleixner: "The recent objtool fixes/enhancements unearthed a unbalanced CLAC in the i915 driver. Chris asked me to pick the fix up and route it through" * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: drm/i915: Remove redundant user_access_end() from __copy_from_user() error path commit 829890d266e37d368a404b5ecc8575aceae23a3f Merge: bfd77145f35c a27a0c9b6a20 Author: Linus Torvalds Date: Sat Aug 10 15:41:15 2019 -0700 Merge tag 'gfs2-v5.3-rc3.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull gfs2 fix from Andreas Gruenbacher: "Fix incorrect lseek / fiemap results" * tag 'gfs2-v5.3-rc3.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: gfs2: gfs2_walk_metadata fix commit bfd77145f35c3deafe57e9eb67fff4ccffdaef6e Author: Joe Perches Date: Mon Aug 5 15:11:15 2019 -0700 Makefile: Convert -Wimplicit-fallthrough=3 to just -Wimplicit-fallthrough for clang A compilation -Wimplicit-fallthrough warning was enabled by commit a035d552a93b ("Makefile: Globally enable fall-through warning") Even though clang 10.0.0 does not currently support this warning without a patch, clang currently does not support a value for this option. Link: https://bugs.llvm.org/show_bug.cgi?id=39382 The gcc default for this warning is 3 so removing the =3 has no effect for gcc and enables the warning for patched versions of clang. Also remove the =3 from an existing use in a parisc Makefile: arch/parisc/math-emu/Makefile Signed-off-by: Joe Perches Reviewed-and-tested-by: Nathan Chancellor Cc: Gustavo A. R. Silva Signed-off-by: Linus Torvalds Makefile | 2 +- arch/parisc/math-emu/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 5aa910073744e5ed6d79410d81fa44149b2deeb7 Merge: 36e630ed98d5 5511c0c309db Author: Linus Torvalds Date: Sat Aug 10 12:24:20 2019 -0700 Merge tag 'char-misc-5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver fixes Greg KH: "Here are some small char/misc driver fixes for 5.3-rc4. Two of these are for the habanalabs driver for issues found when running on a big-endian system (are they still alive?) The others are tiny fixes reported by people, and a MAINTAINERS update about the location of the fpga development tree. All of these have been in linux-next for a while with no reported issues" * tag 'char-misc-5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: coresight: Fix DEBUG_LOCKS_WARN_ON for uninitialized attribute MAINTAINERS: Move linux-fpga tree to new location nvmem: Use the same permissions for eeprom as for nvmem habanalabs: fix host memory polling in BE architecture habanalabs: fix F/W download in BE architecture commit 36e630ed98d5daa628368121f74bf37bead9206b Merge: c13f86701e1e 8097c43bcbec Author: Linus Torvalds Date: Sat Aug 10 12:20:02 2019 -0700 Merge tag 'driver-core-5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core fixes from Greg KH: "Here are two small fixes for some driver core issues that have been reported. There is also a kernfs "fix" here, which was then reverted because it was found to cause problems in linux-next. The driver core fixes both resolve reported issues, one with gpioint stuff that showed up in 5.3-rc1, and the other finally (and hopefully) resolves a very long standing race when removing glue directories. It's nice to get that issue finally resolved and the developers involved should be applauded for the persistence it took to get this patch finally accepted. All of these have been in linux-next for a while with no reported issues. Well, the one reported issue, hence the revert :)" * tag 'driver-core-5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: Revert "kernfs: fix memleak in kernel_ops_readdir()" kernfs: fix memleak in kernel_ops_readdir() driver core: Fix use-after-free and double free on glue directory driver core: platform: return -ENXIO for missing GpioInt commit c13f86701e1e03fa3f94165d46425ead51a191c8 Merge: 15fa98e40e0c 81eaadcae81b Author: Linus Torvalds Date: Sat Aug 10 12:17:12 2019 -0700 Merge tag 'tty-5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty fix from Greg KH: "Here is a single tty kgdb fix for 5.3-rc4. It fixes an annoying log message that has caused kdb to become useless. It's another fallout from commit ddde3c18b700 ("vt: More locking checks") which tries to enforce locking checks more strictly in the tty layer, unfortunatly when kdb is stopped, there's no need for locks :) This patch has been linux-next for a while with no reported issues" * tag 'tty-5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: kgdboc: disable the console lock when in kgdb commit 15fa98e40e0c305145da9a95f8ac6dc0bda64884 Merge: 1041f5092179 09f6109ff4f8 Author: Linus Torvalds Date: Sat Aug 10 12:13:39 2019 -0700 Merge tag 'staging-5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging / IIO driver fixes from Greg KH: "Here are some small staging and IIO driver fixes for 5.3-rc4. Nothing major, just resolutions for a number of small reported issues, full details in the shortlog. All have been in linux-next for a while with no reported issues" * tag 'staging-5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: iio: adc: gyroadc: fix uninitialized return code docs: generic-counter.rst: fix broken references for ABI file staging: android: ion: Bail out upon SIGKILL when allocating memory. Staging: fbtft: Fix GPIO handling staging: unisys: visornic: Update the description of 'poll_for_irq()' staging: wilc1000: flush the workqueue before deinit the host staging: gasket: apex: fix copy-paste typo Staging: fbtft: Fix reset assertion when using gpio descriptor Staging: fbtft: Fix probing of gpio descriptor iio: imu: mpu6050: add missing available scan masks iio: cros_ec_accel_legacy: Fix incorrect channel setting IIO: Ingenic JZ47xx: Set clock divider on probe iio: adc: max9611: Fix misuse of GENMASK macro commit 1041f5092179ab3dfb8ceb8f1f54bc07d4ba3399 Merge: 97946f59fe7f 27709ae4e2fe Author: Linus Torvalds Date: Sat Aug 10 11:59:57 2019 -0700 Merge tag 'usb-5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are some small USB fixes for 5.3-rc4. The "biggest" one here is moving code from one file to another in order to fix a long-standing race condition with the creation of sysfs files for USB devices. Turns out that there are now userspace tools out there that are hitting this long-known bug, so it's time to fix them. Thankfully the tool-maker in this case fixed the issue :) The other patches in here are all fixes for reported issues. Now that syzbot knows how to fuzz USB drivers better, and is starting to now fuzz the userspace facing side of them at the same time, there will be more and more small fixes like these coming, which is a good thing. All of these have been in linux-next with no reported issues" * tag 'usb-5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: usb: setup authorized_default attributes using usb_bus_notify usb: iowarrior: fix deadlock on disconnect Revert "USB: rio500: simplify locking" usb: usbfs: fix double-free of usb memory upon submiturb error usb: yurex: Fix use-after-free in yurex_delete usb: typec: tcpm: Ignore unsupported/unknown alternate mode requests xhci: Fix NULL pointer dereference at endpoint zero reset. usb: host: xhci-rcar: Fix timeout in xhci_suspend() usb: typec: ucsi: ccg: Fix uninitilized symbol error usb: typec: tcpm: remove tcpm dir if no children usb: typec: tcpm: free log buf memory when remove debug file usb: typec: tcpm: Add NULL check before dereferencing config commit 33dcb37cef741294b481f4d889a465b8091f11bf Author: Christoph Hellwig Date: Fri Jul 26 09:26:40 2019 +0200 dma-mapping: fix page attributes for dma_mmap_* All the way back to introducing dma_common_mmap we've defaulted to mark the pages as uncached. But this is wrong for DMA coherent devices. Later on DMA_ATTR_WRITE_COMBINE also got incorrect treatment as that flag is only treated special on the alloc side for non-coherent devices. Introduce a new dma_pgprot helper that deals with the check for coherent devices so that only the remapping cases ever reach arch_dma_mmap_pgprot and we thus ensure no aliasing of page attributes happens, which makes the powerpc version of arch_dma_mmap_pgprot obsolete and simplifies the remaining ones. Note that this means arch_dma_mmap_pgprot is a bit misnamed now, but we'll phase it out soon. Fixes: 64ccc9c033c6 ("common: dma-mapping: add support for generic dma_mmap_* calls") Reported-by: Shawn Anastasio Reported-by: Gavin Li Signed-off-by: Christoph Hellwig Acked-by: Catalin Marinas # arm64 arch/arm/mm/dma-mapping.c | 4 +--- arch/arm64/mm/dma-mapping.c | 4 +--- arch/powerpc/Kconfig | 1 - arch/powerpc/kernel/Makefile | 3 +-- arch/powerpc/kernel/dma-common.c | 17 ----------------- drivers/iommu/dma-iommu.c | 6 +++--- include/linux/dma-noncoherent.h | 13 +++++++++---- kernel/dma/mapping.c | 19 ++++++++++++++++++- kernel/dma/remap.c | 2 +- 9 files changed, 34 insertions(+), 35 deletions(-) commit d8ad55538abe443919e20e0bb996561bca9cad84 Author: Lucas Stach Date: Mon Aug 5 17:51:53 2019 +0200 dma-direct: don't truncate dma_required_mask to bus addressing capabilities The dma required_mask needs to reflect the actual addressing capabilities needed to handle the whole system RAM. When truncated down to the bus addressing capabilities dma_addressing_limited() will incorrectly signal no limitations for devices which are restricted by the bus_dma_mask. Fixes: b4ebe6063204 (dma-direct: implement complete bus_dma_mask handling) Signed-off-by: Lucas Stach Tested-by: Atish Patra Signed-off-by: Christoph Hellwig kernel/dma/direct.c | 3 --- 1 file changed, 3 deletions(-) commit cf14be0b41c659ede89abef3f7ec0e98e6cfea5b Author: Christoph Hellwig Date: Tue Aug 6 14:33:23 2019 +0300 dma-direct: fix DMA_ATTR_NO_KERNEL_MAPPING The new DMA_ATTR_NO_KERNEL_MAPPING needs to actually assign a dma_addr to work. Also skip it if the architecture needs forced decryption handling, as that needs a kernel virtual address. Fixes: d98849aff879 (dma-direct: handle DMA_ATTR_NO_KERNEL_MAPPING in common code) Signed-off-by: Christoph Hellwig Reviewed-by: Lucas Stach kernel/dma/direct.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 97946f59fe7fecff44032f8e775975991a612d18 Merge: 23df57afe8ee 8c4407de3be4 Author: Linus Torvalds Date: Sat Aug 10 10:21:25 2019 -0700 Merge tag 'pinctrl-v5.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fixes from Linus Walleij: - Delay acquisition of regmaps in the Aspeed G5 driver. - Make a symbol static to reduce compiler noise. * tag 'pinctrl-v5.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: aspeed: Make aspeed_pinmux_ips static pinctrl: aspeed-g5: Delay acquisition of regmaps commit 23df57afe8eebff6ece05a815934f2f70a851e0a Merge: bf1881cf484d ed4289e8b488 Author: Linus Torvalds Date: Sat Aug 10 10:17:19 2019 -0700 Merge tag 'powerpc-5.3-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fix from Michael Ellerman: "Just one fix, a revert of a commit that was meant to be a minor improvement to some inline asm, but ended up having no real benefit with GCC and broke booting 32-bit machines when using Clang. Thanks to: Arnd Bergmann, Christophe Leroy, Nathan Chancellor, Nick Desaulniers, Segher Boessenkool" * tag 'powerpc-5.3-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: Revert "powerpc: slightly improve cache helpers" commit bf1881cf484dd96a97606a804553019f8f08f0d4 Merge: 451577f3e3a9 1f7585f30a3a Author: Linus Torvalds Date: Sat Aug 10 10:10:33 2019 -0700 Merge tag 'Wimplicit-fallthrough-5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux Pull fall-through fixes from Gustavo A. R. Silva: "Mark more switch cases where we are expecting to fall through, fixing fall-through warnings in arm, sparc64, mips, i386 and s390" * tag 'Wimplicit-fallthrough-5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux: ARM: ep93xx: Mark expected switch fall-through scsi: fas216: Mark expected switch fall-throughs pcmcia: db1xxx_ss: Mark expected switch fall-throughs video: fbdev: omapfb_main: Mark expected switch fall-throughs watchdog: riowd: Mark expected switch fall-through s390/net: Mark expected switch fall-throughs crypto: ux500/crypt: Mark expected switch fall-throughs watchdog: wdt977: Mark expected switch fall-through watchdog: scx200_wdt: Mark expected switch fall-through watchdog: Mark expected switch fall-throughs ARM: signal: Mark expected switch fall-through mfd: omap-usb-host: Mark expected switch fall-throughs mfd: db8500-prcmu: Mark expected switch fall-throughs ARM: OMAP: dma: Mark expected switch fall-throughs ARM: alignment: Mark expected switch fall-throughs ARM: tegra: Mark expected switch fall-through ARM/hw_breakpoint: Mark expected switch fall-throughs commit 600f5badb78c316146d062cfd7af4a2cfb655baa Author: Viresh Kumar Date: Wed Aug 7 12:36:01 2019 +0530 cpufreq: schedutil: Don't skip freq update when limits change To avoid reducing the frequency of a CPU prematurely, we skip reducing the frequency if the CPU had been busy recently. This should not be done when the limits of the policy are changed, for example due to thermal throttling. We should always get the frequency within the new limits as soon as possible. Trying to fix this by using only one flag, i.e. need_freq_update, can lead to a race condition where the flag gets cleared without forcing us to change the frequency at least once. And so this patch introduces another flag to avoid that race condition. Fixes: ecd288429126 ("cpufreq: schedutil: Don't set next_freq to UINT_MAX") Cc: v4.18+ # v4.18+ Reported-by: Doug Smythies Tested-by: Doug Smythies Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki kernel/sched/cpufreq_schedutil.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit e61a41256edf9f425039129757af4a80b5ed8162 Author: Viresh Kumar Date: Fri Aug 9 08:01:17 2019 +0530 cpufreq: dev_pm_qos_update_request() can return 1 on success dev_pm_qos_update_request() can return 1 on success, so don't treat it as an error. Fixes: 18c49926c4bf ("cpufreq: Add QoS requests for userspace constraints") Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cfef67f016e4c00a2f423256fc678a6967a9fc09 Author: Wenwen Wang Date: Fri Aug 9 23:29:48 2019 -0500 ALSA: hda - Fix a memory leak bug In snd_hda_parse_generic_codec(), 'spec' is allocated through kzalloc(). Then, the pin widgets in 'codec' are parsed. However, if the parsing process fails, 'spec' is not deallocated, leading to a memory leak. To fix the above issue, free 'spec' before returning the error. Fixes: 352f7f914ebb ("ALSA: hda - Merge Realtek parser code to generic parser") Signed-off-by: Wenwen Wang Cc: Signed-off-by: Takashi Iwai sound/pci/hda/hda_generic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 451577f3e3a9bf1861218641dbbf98e214e77851 Merge: 7f20fd23377a c07d8d47bca1 Author: Linus Torvalds Date: Fri Aug 9 20:31:04 2019 -0700 Merge tag 'kbuild-fixes-v5.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fixes from Masahiro Yamada: - revive single target %.ko - do not create built-in.a where it is unneeded - do not create modules.order where it is unneeded - show a warning if subdir-y/m is used to visit a module Makefile * tag 'kbuild-fixes-v5.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kbuild: show hint if subdir-y/m is used to visit module Makefile kbuild: generate modules.order only in directories visited by obj-y/m kbuild: fix false-positive need-builtin calculation kbuild: revive single target %.ko commit 57c722e932cfb82e9820bbaae1b1f7222ea97b52 Author: Jakub Kicinski Date: Fri Aug 9 18:36:23 2019 -0700 net/tls: swap sk_write_space on close Now that we swap the original proto and clear the ULP pointer on close we have to make sure no callback will try to access the freed state. sk_write_space is not part of sk_prot, remember to swap it. Reported-by: syzbot+dcdc9deefaec44785f32@syzkaller.appspotmail.com Fixes: 95fa145479fb ("bpf: sockmap/tls, close can race with map free") Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller net/tls/tls_main.c | 1 + 1 file changed, 1 insertion(+) commit 1f7585f30a3af595ac07f610b807c738c9e3baab Author: Gustavo A. R. Silva Date: Wed Aug 7 21:34:48 2019 -0500 ARM: ep93xx: Mark expected switch fall-through Mark switch cases where we are expecting to fall through. Fix the following warnings (Building: arm-ep93xx_defconfig arm): arch/arm/mach-ep93xx/crunch.c: In function 'crunch_do': arch/arm/mach-ep93xx/crunch.c:46:3: warning: this statement may fall through [-Wimplicit-fallthrough=] memset(crunch_state, 0, sizeof(*crunch_state)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/arm/mach-ep93xx/crunch.c:53:2: note: here case THREAD_NOTIFY_EXIT: ^~~~ Notice that, in this particular case, the code comment is modified in accordance with what GCC is expecting to find. Reported-by: kbuild test robot Signed-off-by: Gustavo A. R. Silva arch/arm/mach-ep93xx/crunch.c | 1 + 1 file changed, 1 insertion(+) commit fccf01b6473c68692579bc008c1d38d6c3fcb276 Author: Gustavo A. R. Silva Date: Tue Aug 6 03:26:15 2019 -0500 scsi: fas216: Mark expected switch fall-throughs Mark switch cases where we are expecting to fall through. Fix the following warnings (Building: rpc_defconfig arm): drivers/scsi/arm/fas216.c: In function ‘fas216_disconnect_intr’: drivers/scsi/arm/fas216.c:913:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (fas216_get_last_msg(info, info->scsi.msgin_fifo) == ABORT) { ^ drivers/scsi/arm/fas216.c:919:2: note: here default: /* huh? */ ^~~~~~~ drivers/scsi/arm/fas216.c: In function ‘fas216_kick’: drivers/scsi/arm/fas216.c:1959:3: warning: this statement may fall through [-Wimplicit-fallthrough=] fas216_allocate_tag(info, SCpnt); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/arm/fas216.c:1960:2: note: here case TYPE_OTHER: ^~~~ drivers/scsi/arm/fas216.c: In function ‘fas216_busservice_intr’: drivers/scsi/arm/fas216.c:1413:3: warning: this statement may fall through [-Wimplicit-fallthrough=] fas216_stoptransfer(info); ^~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/arm/fas216.c:1414:2: note: here case STATE(STAT_STATUS, PHASE_SELSTEPS):/* Sel w/ steps -> Status */ ^~~~ drivers/scsi/arm/fas216.c:1424:3: warning: this statement may fall through [-Wimplicit-fallthrough=] fas216_stoptransfer(info); ^~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/arm/fas216.c:1425:2: note: here case STATE(STAT_MESGIN, PHASE_COMMAND): /* Command -> Message In */ ^~~~ drivers/scsi/arm/fas216.c: In function ‘fas216_funcdone_intr’: drivers/scsi/arm/fas216.c:1573:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if ((stat & STAT_BUSMASK) == STAT_MESGIN) { ^ drivers/scsi/arm/fas216.c:1579:2: note: here default: ^~~~~~~ drivers/scsi/arm/fas216.c: In function ‘fas216_handlesync’: drivers/scsi/arm/fas216.c:605:20: warning: this statement may fall through [-Wimplicit-fallthrough=] info->scsi.phase = PHASE_MSGOUT_EXPECT; ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ drivers/scsi/arm/fas216.c:607:2: note: here case async: ^~~~ Signed-off-by: Gustavo A. R. Silva drivers/scsi/arm/fas216.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 5f163f331b645106d548f3fcddfa1f92c1af60d0 Author: Gustavo A. R. Silva Date: Mon Aug 5 14:47:35 2019 -0500 pcmcia: db1xxx_ss: Mark expected switch fall-throughs Mark switch cases where we are expecting to fall through. This patch fixes the following warnings (Building: db1xxx_defconfig mips): drivers/pcmcia/db1xxx_ss.c:257:3: warning: this statement may fall through [-Wimplicit-fallthrough=] drivers/pcmcia/db1xxx_ss.c:269:3: warning: this statement may fall through [-Wimplicit-fallthrough=] Reviewed-by: Kees Cook Signed-off-by: Gustavo A. R. Silva drivers/pcmcia/db1xxx_ss.c | 4 ++++ 1 file changed, 4 insertions(+) commit 70a2783c1893a7e485b3be1c2ef23286fa252493 Author: Gustavo A. R. Silva Date: Fri Aug 2 14:10:29 2019 -0500 video: fbdev: omapfb_main: Mark expected switch fall-throughs Mark switch cases where we are expecting to fall through. This patch fixes the following warning (Building: omap1_defconfig arm): drivers/watchdog/wdt285.c:170:3: warning: this statement may fall through [-Wimplicit-fallthrough=] drivers/watchdog/ar7_wdt.c:237:3: warning: this statement may fall through [-Wimplicit-fallthrough=] drivers/video/fbdev/omap/omapfb_main.c:449:23: warning: this statement may fall through [-Wimplicit-fallthrough=] drivers/video/fbdev/omap/omapfb_main.c:1549:6: warning: this statement may fall through [-Wimplicit-fallthrough=] drivers/video/fbdev/omap/omapfb_main.c:1547:3: warning: this statement may fall through [-Wimplicit-fallthrough=] drivers/video/fbdev/omap/omapfb_main.c:1545:3: warning: this statement may fall through [-Wimplicit-fallthrough=] drivers/video/fbdev/omap/omapfb_main.c:1543:3: warning: this statement may fall through [-Wimplicit-fallthrough=] drivers/video/fbdev/omap/omapfb_main.c:1540:6: warning: this statement may fall through [-Wimplicit-fallthrough=] drivers/video/fbdev/omap/omapfb_main.c:1538:3: warning: this statement may fall through [-Wimplicit-fallthrough=] drivers/video/fbdev/omap/omapfb_main.c:1535:3: warning: this statement may fall through [-Wimplicit-fallthrough=] Reviewed-by: Kees Cook Signed-off-by: Gustavo A. R. Silva drivers/video/fbdev/omap/omapfb_main.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 40ad2de37f2a6be5726eb40ed085dff60df3099b Author: Gustavo A. R. Silva Date: Mon Jul 29 20:45:29 2019 -0500 watchdog: riowd: Mark expected switch fall-through Mark switch cases where we are expecting to fall through. This patch fixes the following warnings (Building: sparc64): drivers/watchdog/riowd.c: In function ‘riowd_ioctl’: drivers/watchdog/riowd.c:136:3: warning: this statement may fall through [-Wimplicit-fallthrough=] riowd_writereg(p, riowd_timeout, WDTO_INDEX); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/watchdog/riowd.c:139:2: note: here case WDIOC_GETTIMEOUT: ^~~~ Reviewed-by: Kees Cook Reviewed-by: Guenter Roeck Signed-off-by: Gustavo A. R. Silva drivers/watchdog/riowd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7b7331511e66cfe671e88daa7133f6597a86aced Author: Gustavo A. R. Silva Date: Mon Jul 29 19:13:54 2019 -0500 s390/net: Mark expected switch fall-throughs Mark switch cases where we are expecting to fall through. This patch fixes the following warnings (Building: s390): drivers/s390/net/ctcm_fsms.c: In function ‘ctcmpc_chx_attnbusy’: drivers/s390/net/ctcm_fsms.c:1703:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (grp->changed_side == 1) { ^ drivers/s390/net/ctcm_fsms.c:1707:2: note: here case MPCG_STATE_XID0IOWAIX: ^~~~ drivers/s390/net/ctcm_mpc.c: In function ‘ctc_mpc_alloc_channel’: drivers/s390/net/ctcm_mpc.c:358:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (callback) ^ drivers/s390/net/ctcm_mpc.c:360:2: note: here case MPCG_STATE_XID0IOWAIT: ^~~~ drivers/s390/net/ctcm_mpc.c: In function ‘mpc_action_timeout’: drivers/s390/net/ctcm_mpc.c:1469:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if ((fsm_getstate(rch->fsm) == CH_XID0_PENDING) && ^ drivers/s390/net/ctcm_mpc.c:1472:2: note: here default: ^~~~~~~ drivers/s390/net/ctcm_mpc.c: In function ‘mpc_send_qllc_discontact’: drivers/s390/net/ctcm_mpc.c:2087:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (grp->estconnfunc) { ^ drivers/s390/net/ctcm_mpc.c:2092:2: note: here case MPCG_STATE_FLOWC: ^~~~ drivers/s390/net/qeth_l2_main.c: In function ‘qeth_l2_process_inbound_buffer’: drivers/s390/net/qeth_l2_main.c:328:7: warning: this statement may fall through [-Wimplicit-fallthrough=] if (IS_OSN(card)) { ^ drivers/s390/net/qeth_l2_main.c:337:3: note: here default: ^~~~~~~ Reviewed-by: Kees Cook Signed-off-by: Gustavo A. R. Silva drivers/s390/net/ctcm_fsms.c | 1 + drivers/s390/net/ctcm_mpc.c | 3 +++ drivers/s390/net/qeth_l2_main.c | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) commit 3d86c7ad56a9b1109a705a100990f1e7be1d3d43 Author: Gustavo A. R. Silva Date: Mon Jul 29 17:35:45 2019 -0500 crypto: ux500/crypt: Mark expected switch fall-throughs Mark switch cases where we are expecting to fall through. This patch fixes the following warning (Building: arm): drivers/crypto/ux500/cryp/cryp.c: In function ‘cryp_save_device_context’: drivers/crypto/ux500/cryp/cryp.c:316:16: warning: this statement may fall through [-Wimplicit-fallthrough=] ctx->key_4_r = readl_relaxed(&src_reg->key_4_r); drivers/crypto/ux500/cryp/cryp.c:318:2: note: here case CRYP_KEY_SIZE_192: ^~~~ drivers/crypto/ux500/cryp/cryp.c:320:16: warning: this statement may fall through [-Wimplicit-fallthrough=] ctx->key_3_r = readl_relaxed(&src_reg->key_3_r); drivers/crypto/ux500/cryp/cryp.c:322:2: note: here case CRYP_KEY_SIZE_128: ^~~~ drivers/crypto/ux500/cryp/cryp.c:324:16: warning: this statement may fall through [-Wimplicit-fallthrough=] ctx->key_2_r = readl_relaxed(&src_reg->key_2_r); drivers/crypto/ux500/cryp/cryp.c:326:2: note: here default: ^~~~~~~ In file included from ./include/linux/io.h:13:0, from drivers/crypto/ux500/cryp/cryp_p.h:14, from drivers/crypto/ux500/cryp/cryp.c:15: drivers/crypto/ux500/cryp/cryp.c: In function ‘cryp_restore_device_context’: ./arch/arm/include/asm/io.h:92:22: warning: this statement may fall through [-Wimplicit-fallthrough=] #define __raw_writel __raw_writel ^ ./arch/arm/include/asm/io.h:299:29: note: in expansion of macro ‘__raw_writel’ #define writel_relaxed(v,c) __raw_writel((__force u32) cpu_to_le32(v),c) ^~~~~~~~~~~~ drivers/crypto/ux500/cryp/cryp.c:363:3: note: in expansion of macro ‘writel_relaxed’ writel_relaxed(ctx->key_4_r, ®->key_4_r); ^~~~~~~~~~~~~~ drivers/crypto/ux500/cryp/cryp.c:365:2: note: here case CRYP_KEY_SIZE_192: ^~~~ In file included from ./include/linux/io.h:13:0, from drivers/crypto/ux500/cryp/cryp_p.h:14, from drivers/crypto/ux500/cryp/cryp.c:15: ./arch/arm/include/asm/io.h:92:22: warning: this statement may fall through [-Wimplicit-fallthrough=] #define __raw_writel __raw_writel ^ ./arch/arm/include/asm/io.h:299:29: note: in expansion of macro ‘__raw_writel’ #define writel_relaxed(v,c) __raw_writel((__force u32) cpu_to_le32(v),c) ^~~~~~~~~~~~ drivers/crypto/ux500/cryp/cryp.c:367:3: note: in expansion of macro ‘writel_relaxed’ writel_relaxed(ctx->key_3_r, ®->key_3_r); ^~~~~~~~~~~~~~ drivers/crypto/ux500/cryp/cryp.c:369:2: note: here case CRYP_KEY_SIZE_128: ^~~~ In file included from ./include/linux/io.h:13:0, from drivers/crypto/ux500/cryp/cryp_p.h:14, from drivers/crypto/ux500/cryp/cryp.c:15: ./arch/arm/include/asm/io.h:92:22: warning: this statement may fall through [-Wimplicit-fallthrough=] #define __raw_writel __raw_writel ^ ./arch/arm/include/asm/io.h:299:29: note: in expansion of macro ‘__raw_writel’ #define writel_relaxed(v,c) __raw_writel((__force u32) cpu_to_le32(v),c) ^~~~~~~~~~~~ drivers/crypto/ux500/cryp/cryp.c:371:3: note: in expansion of macro ‘writel_relaxed’ writel_relaxed(ctx->key_2_r, ®->key_2_r); ^~~~~~~~~~~~~~ drivers/crypto/ux500/cryp/cryp.c:373:2: note: here default: ^~~~~~~ Signed-off-by: Gustavo A. R. Silva drivers/crypto/ux500/cryp/cryp.c | 6 ++++++ 1 file changed, 6 insertions(+) commit d51c61637b4aca6c06015a34063e41279c32b8e8 Author: Gustavo A. R. Silva Date: Mon Jul 29 17:30:57 2019 -0500 watchdog: wdt977: Mark expected switch fall-through Mark switch cases where we are expecting to fall through. This patch fixes the following warning (Building: arm): drivers/watchdog/wdt977.c: In function ‘wdt977_ioctl’: LD [M] drivers/media/platform/vicodec/vicodec.o drivers/watchdog/wdt977.c:400:3: warning: this statement may fall through [-Wimplicit-fallthrough=] wdt977_keepalive(); ^~~~~~~~~~~~~~~~~~ drivers/watchdog/wdt977.c:403:2: note: here case WDIOC_GETTIMEOUT: ^~~~ Reviewed-by: Kees Cook Reviewed-by: Guenter Roeck Signed-off-by: Gustavo A. R. Silva drivers/watchdog/wdt977.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 24f2161887c90ca3791f0224933642b6da7f9573 Author: Gustavo A. R. Silva Date: Mon Jul 29 15:03:49 2019 -0500 watchdog: scx200_wdt: Mark expected switch fall-through Mark switch cases where we are expecting to fall through. This patch fixes the following warning (Building: i386): drivers/watchdog/scx200_wdt.c: In function ‘scx200_wdt_ioctl’: drivers/watchdog/scx200_wdt.c:188:3: warning: this statement may fall through [-Wimplicit-fallthrough=] scx200_wdt_ping(); ^~~~~~~~~~~~~~~~~ drivers/watchdog/scx200_wdt.c:189:2: note: here case WDIOC_GETTIMEOUT: ^~~~ Reviewed-by: Kees Cook Reviewed-by: Guenter Roeck Signed-off-by: Gustavo A. R. Silva drivers/watchdog/scx200_wdt.c | 1 + 1 file changed, 1 insertion(+) commit d259f94f7265065b5c2b2bd5bbe4fa9b76504440 Author: Gustavo A. R. Silva Date: Mon Jul 29 10:08:05 2019 -0500 watchdog: Mark expected switch fall-throughs Mark switch cases where we are expecting to fall through. This patch fixes the following warnings: drivers/watchdog/ar7_wdt.c: warning: this statement may fall through [-Wimplicit-fallthrough=]: => 237:3 drivers/watchdog/pcwd.c: warning: this statement may fall through [-Wimplicit-fallthrough=]: => 653:3 drivers/watchdog/sb_wdog.c: warning: this statement may fall through [-Wimplicit-fallthrough=]: => 204:3 drivers/watchdog/wdt.c: warning: this statement may fall through [-Wimplicit-fallthrough=]: => 391:3 Reported-by: Geert Uytterhoeven Reviewed-by: Kees Cook Reviewed-by: Guenter Roeck Signed-off-by: Gustavo A. R. Silva drivers/watchdog/ar7_wdt.c | 1 + drivers/watchdog/pcwd.c | 2 +- drivers/watchdog/sb_wdog.c | 1 + drivers/watchdog/wdt.c | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) commit e9d81fc5b2014eb17d45ba4940bfb603d57bbcb3 Author: Gustavo A. R. Silva Date: Sun Jul 28 19:11:11 2019 -0500 ARM: signal: Mark expected switch fall-through Mark switch cases where we are expecting to fall through. This patch fixes the following warning: arch/arm/kernel/signal.c: In function 'do_signal': arch/arm/kernel/signal.c:598:12: warning: this statement may fall through [-Wimplicit-fallthrough=] restart -= 2; ~~~~~~~~^~~~ arch/arm/kernel/signal.c:599:3: note: here case -ERESTARTNOHAND: ^~~~ Reported-by: Stephen Rothwell Reviewed-by: Kees Cook Signed-off-by: Gustavo A. R. Silva arch/arm/kernel/signal.c | 1 + 1 file changed, 1 insertion(+) commit 9039782047e769bd446667a9c14c0d3b8948ae51 Author: Gustavo A. R. Silva Date: Sun Jul 28 18:57:05 2019 -0500 mfd: omap-usb-host: Mark expected switch fall-throughs Mark switch cases where we are expecting to fall through. This patch fixes the following warnings: drivers/mfd/omap-usb-host.c: In function 'usbhs_runtime_resume': drivers/mfd/omap-usb-host.c:303:7: warning: this statement may fall through [-Wimplicit-fallthrough=] if (!IS_ERR(omap->hsic480m_clk[i])) { ^ drivers/mfd/omap-usb-host.c:313:3: note: here case OMAP_EHCI_PORT_MODE_TLL: ^~~~ drivers/mfd/omap-usb-host.c: In function 'usbhs_runtime_suspend': drivers/mfd/omap-usb-host.c:345:7: warning: this statement may fall through [-Wimplicit-fallthrough=] if (!IS_ERR(omap->hsic480m_clk[i])) ^ drivers/mfd/omap-usb-host.c:349:3: note: here case OMAP_EHCI_PORT_MODE_TLL: ^~~~ Reported-by: Stephen Rothwell Reviewed-by: Kees Cook Signed-off-by: Gustavo A. R. Silva drivers/mfd/omap-usb-host.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 795952d9f40c451a8b22c6610df1d59f57ce2046 Author: Gustavo A. R. Silva Date: Sun Jul 28 18:53:15 2019 -0500 mfd: db8500-prcmu: Mark expected switch fall-throughs Mark switch cases where we are expecting to fall through. This patch fixes the following warnings: drivers/mfd/db8500-prcmu.c: In function 'dsiclk_rate': drivers/mfd/db8500-prcmu.c:1592:7: warning: this statement may fall through [-Wimplicit-fallthrough=] div *= 2; ~~~~^~~~ drivers/mfd/db8500-prcmu.c:1593:2: note: here case PRCM_DSI_PLLOUT_SEL_PHI_2: ^~~~ drivers/mfd/db8500-prcmu.c:1594:7: warning: this statement may fall through [-Wimplicit-fallthrough=] div *= 2; ~~~~^~~~ drivers/mfd/db8500-prcmu.c:1595:2: note: here case PRCM_DSI_PLLOUT_SEL_PHI: ^~~~ Reported-by: Stephen Rothwell Reviewed-by: Kees Cook Reviewed-by: Linus Walleij Signed-off-by: Gustavo A. R. Silva drivers/mfd/db8500-prcmu.c | 2 ++ 1 file changed, 2 insertions(+) commit 3da6bd945b71c5fdd5db7b19224b8fc0b4d78ed8 Author: Gustavo A. R. Silva Date: Sun Jul 28 18:19:41 2019 -0500 ARM: OMAP: dma: Mark expected switch fall-throughs Mark switch cases where we are expecting to fall through. This patch fixes the following warnings: arch/arm/plat-omap/dma.c: In function 'omap_set_dma_src_burst_mode': arch/arm/plat-omap/dma.c:384:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (dma_omap2plus()) { ^ arch/arm/plat-omap/dma.c:393:2: note: here case OMAP_DMA_DATA_BURST_16: ^~~~ arch/arm/plat-omap/dma.c:394:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (dma_omap2plus()) { ^ arch/arm/plat-omap/dma.c:402:2: note: here default: ^~~~~~~ arch/arm/plat-omap/dma.c: In function 'omap_set_dma_dest_burst_mode': arch/arm/plat-omap/dma.c:473:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (dma_omap2plus()) { ^ arch/arm/plat-omap/dma.c:481:2: note: here default: ^~~~~~~ Notice that, in this particular case, the code comment is modified in accordance with what GCC is expecting to find. Reported-by: Stephen Rothwell Reviewed-by: Kees Cook Signed-off-by: Gustavo A. R. Silva arch/arm/plat-omap/dma.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit e7c0c9f6028dfa09ea9f20c5f1d387e5858afede Author: Gustavo A. R. Silva Date: Sun Jul 28 18:17:18 2019 -0500 ARM: alignment: Mark expected switch fall-throughs Mark switch cases where we are expecting to fall through. This patch fixes the following warnings: arch/arm/mm/alignment.c: In function 'thumb2arm': arch/arm/mm/alignment.c:688:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if ((tinstr & (3 << 9)) == 0x0400) { ^ arch/arm/mm/alignment.c:700:2: note: here default: ^~~~~~~ arch/arm/mm/alignment.c: In function 'do_alignment_t32_to_handler': arch/arm/mm/alignment.c:753:15: warning: this statement may fall through [-Wimplicit-fallthrough=] poffset->un = (tinst2 & 0xff) << 2; ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ arch/arm/mm/alignment.c:754:2: note: here case 0xe940: ^~~~ Reported-by: Stephen Rothwell Reviewed-by: Kees Cook Signed-off-by: Gustavo A. R. Silva arch/arm/mm/alignment.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 9b76ad3a9cc5ebb1dde650c8a9937f045e2707a2 Author: Gustavo A. R. Silva Date: Sun Jul 28 18:10:21 2019 -0500 ARM: tegra: Mark expected switch fall-through Mark switch cases where we are expecting to fall through. This patch fixes the following warning: arch/arm/mach-tegra/reset.c: In function 'tegra_cpu_reset_handler_enable': arch/arm/mach-tegra/reset.c:72:3: warning: this statement may fall through [-Wimplicit-fallthrough=] tegra_cpu_reset_handler_set(reset_address); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/arm/mach-tegra/reset.c:74:2: note: here case 0: ^~~~ Reported-by: Stephen Rothwell Reviewed-by: Kees Cook Signed-off-by: Gustavo A. R. Silva arch/arm/mach-tegra/reset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2d0e988d8427b7b9c6d5c7835b6944405c038011 Author: Gustavo A. R. Silva Date: Sun Jul 28 18:02:41 2019 -0500 ARM/hw_breakpoint: Mark expected switch fall-throughs Mark switch cases where we are expecting to fall through. This patch fixes the following warnings: arch/arm/kernel/hw_breakpoint.c: In function 'hw_breakpoint_arch_parse': arch/arm/kernel/hw_breakpoint.c:609:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (hw->ctrl.len == ARM_BREAKPOINT_LEN_2) ^ arch/arm/kernel/hw_breakpoint.c:611:2: note: here case 3: ^~~~ arch/arm/kernel/hw_breakpoint.c:613:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (hw->ctrl.len == ARM_BREAKPOINT_LEN_1) ^ arch/arm/kernel/hw_breakpoint.c:615:2: note: here default: ^~~~~~~ arch/arm/kernel/hw_breakpoint.c: In function 'arch_build_bp_info': arch/arm/kernel/hw_breakpoint.c:544:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if ((hw->ctrl.type != ARM_BREAKPOINT_EXECUTE) ^ arch/arm/kernel/hw_breakpoint.c:547:2: note: here default: ^~~~~~~ In file included from include/linux/kernel.h:11, from include/linux/list.h:9, from include/linux/preempt.h:11, from include/linux/hardirq.h:5, from arch/arm/kernel/hw_breakpoint.c:16: arch/arm/kernel/hw_breakpoint.c: In function 'hw_breakpoint_pending': include/linux/compiler.h:78:22: warning: this statement may fall through [-Wimplicit-fallthrough=] # define unlikely(x) __builtin_expect(!!(x), 0) ^~~~~~~~~~~~~~~~~~~~~~~~~~ include/asm-generic/bug.h:136:2: note: in expansion of macro 'unlikely' unlikely(__ret_warn_on); \ ^~~~~~~~ arch/arm/kernel/hw_breakpoint.c:863:3: note: in expansion of macro 'WARN' WARN(1, "Asynchronous watchpoint exception taken. Debugging results may be unreliable\n"); ^~~~ arch/arm/kernel/hw_breakpoint.c:864:2: note: here case ARM_ENTRY_SYNC_WATCHPOINT: ^~~~ arch/arm/kernel/hw_breakpoint.c: In function 'core_has_os_save_restore': arch/arm/kernel/hw_breakpoint.c:910:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (oslsr & ARM_OSLSR_OSLM0) ^ arch/arm/kernel/hw_breakpoint.c:912:2: note: here default: ^~~~~~~ Reported-by: Stephen Rothwell Reviewed-by: Kees Cook Signed-off-by: Gustavo A. R. Silva arch/arm/kernel/hw_breakpoint.c | 5 +++++ 1 file changed, 5 insertions(+) commit 7f20fd23377ac3356657ce35fcaf19ee2fea8345 Merge: 15abf14202a2 a738b5e75b4c Author: Linus Torvalds Date: Fri Aug 9 15:46:29 2019 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: "Bugfixes (arm and x86) and cleanups" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: selftests: kvm: Adding config fragments KVM: selftests: Update gitignore file for latest changes kvm: remove unnecessary PageReserved check KVM: arm/arm64: vgic: Reevaluate level sensitive interrupts on enable KVM: arm: Don't write junk to CP15 registers on reset KVM: arm64: Don't write junk to sysregs on reset KVM: arm/arm64: Sync ICH_VMCR_EL2 back when about to block x86: kvm: remove useless calls to kvm_para_available KVM: no need to check return value of debugfs_create functions KVM: remove kvm_arch_has_vcpu_debugfs() KVM: Fix leak vCPU's VMCS value into other pCPU KVM: Check preempted_in_kernel for involuntary preemption KVM: LAPIC: Don't need to wakeup vCPU twice afer timer fire arm64: KVM: hyp: debug-sr: Mark expected switch fall-through KVM: arm64: Update kvm_arm_exception_class and esr_class_str for new EC KVM: arm: vgic-v3: Mark expected switch fall-through arm64: KVM: regmap: Fix unexpected switch fall-through KVM: arm/arm64: Introduce kvm_pmu_vcpu_init() to setup PMU counter index commit 15abf14202a2fe7e5c5fc0e815587f45de4fd500 Merge: 2226fb57a908 849f5ae3a513 Author: Linus Torvalds Date: Fri Aug 9 15:31:19 2019 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input updates from Dmitry Torokhov: - newer systems with Elan touchpads will be switched over to SMBus - HP Spectre X360 will be using SMbus/RMI4 - checks for invalid USB descriptors in kbtab and iforce - build fixes for applespi driver (misconfigs) * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: iforce - add sanity checks Input: applespi - use struct_size() helper Input: kbtab - sanity check for endpoint type Input: usbtouchscreen - initialize PM mutex before using it Input: applespi - add dependency on LEDS_CLASS Input: synaptics - enable RMI mode for HP Spectre X360 Input: elantech - annotate fall-through case in elantech_use_host_notify() Input: elantech - enable SMBus on new (2018+) systems Input: applespi - fix trivial typo in struct description Input: applespi - select CRC16 module Input: applespi - fix warnings detected by sparse commit 06282373ff57a2b82621be4f84f981e1b0a4eb28 Author: Dan Williams Date: Thu Aug 8 14:43:49 2019 -0700 mm/memremap: Fix reuse of pgmap instances with internal references Currently, attempts to shutdown and re-enable a device-dax instance trigger: Missing reference count teardown definition WARNING: CPU: 37 PID: 1608 at mm/memremap.c:211 devm_memremap_pages+0x234/0x850 [..] RIP: 0010:devm_memremap_pages+0x234/0x850 [..] Call Trace: dev_dax_probe+0x66/0x190 [device_dax] really_probe+0xef/0x390 driver_probe_device+0xb4/0x100 device_driver_attach+0x4f/0x60 Given that the setup path initializes pgmap->ref, arrange for it to be also torn down so devm_memremap_pages() is ready to be called again and not be mistaken for the 3rd-party per-cpu-ref case. Fixes: 24917f6b1041 ("memremap: provide an optional internal refcount in struct dev_pagemap") Reported-by: Fan Du Tested-by: Vishal Verma Cc: Andrew Morton Cc: Christoph Hellwig Cc: Ira Weiny Cc: Jason Gunthorpe Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/156530042781.2068700.8733813683117819799.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams mm/memremap.c | 6 ++++++ 1 file changed, 6 insertions(+) commit e6a9522ac3ff59980ea00e070b6b8573aface36a Author: Josh Poimboeuf Date: Thu Jul 25 15:29:57 2019 -0500 drm/i915: Remove redundant user_access_end() from __copy_from_user() error path Objtool reports: drivers/gpu/drm/i915/gem/i915_gem_execbuffer.o: warning: objtool: .altinstr_replacement+0x36: redundant UACCESS disable __copy_from_user() already does both STAC and CLAC, so the user_access_end() in its error path adds an extra unnecessary CLAC. Fixes: 0b2c8f8b6b0c ("i915: fix missing user_access_end() in page fault exception case") Reported-by: Thomas Gleixner Reported-by: Sedat Dilek Signed-off-by: Josh Poimboeuf Signed-off-by: Thomas Gleixner Tested-by: Nick Desaulniers Tested-by: Sedat Dilek Acked-by: Peter Zijlstra (Intel) Acked-by: Chris Wilson Link: https://github.com/ClangBuiltLinux/linux/issues/617 Link: https://lkml.kernel.org/r/51a4155c5bc2ca847a9cbe85c1c11918bb193141.1564086017.git.jpoimboe@redhat.com drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit 6d0d779dca73cd5acb649c54f81401f93098b298 Author: Dexuan Cui Date: Fri Aug 9 01:58:08 2019 +0000 hv_netvsc: Fix a warning of suspicious RCU usage This fixes a warning of "suspicious rcu_dereference_check() usage" when nload runs. Fixes: 776e726bfb34 ("netvsc: fix RCU warning in get_stats") Signed-off-by: Dexuan Cui Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 9566e650bf7fdf58384bb06df634f7531ca3a97e Merge: 8b6381600d59 a4e508cab623 Author: David S. Miller Date: Fri Aug 9 13:23:33 2019 -0700 Merge tag 'mlx5-fixes-2019-08-08' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== Mellanox, mlx5 fixes 2019-08-08 This series introduces some fixes to mlx5 driver. Highlights: 1) From Tariq, Critical mlx5 kTLS fixes to better align with hw specs. 2) From Aya, Fixes to mlx5 tx devlink health reporter. 3) From Maxim, aRFs parsing to use flow dissector to avoid relying on invalid skb fields. Please pull and let me know if there is any problem. For -stable v4.3 ('net/mlx5e: Only support tx/rx pause setting for port owner') For -stable v4.9 ('net/mlx5e: Use flow keys dissector to parse packets for ARFS') For -stable v5.1 ('net/mlx5e: Fix false negative indication on tx reporter CQE recovery') ('net/mlx5e: Remove redundant check in CQE recovery flow of tx reporter') ('net/mlx5e: ethtool, Avoid setting speed to 56GBASE when autoneg off') Note: when merged with net-next this minor conflict will pop up: ++<<<<<<< (net-next) + if (is_eswitch_flow) { + flow->esw_attr->match_level = match_level; + flow->esw_attr->tunnel_match_level = tunnel_match_level; ++======= + if (flow->flags & MLX5E_TC_FLOW_ESWITCH) { + flow->esw_attr->inner_match_level = inner_match_level; + flow->esw_attr->outer_match_level = outer_match_level; ++>>>>>>> (net) To resolve, use hunks from net (2nd) and replace: if (flow->flags & MLX5E_TC_FLOW_ESWITCH) with if (is_eswitch_flow) ==================== Signed-off-by: David S. Miller commit 8b6381600d59871fbe44d36522272f961ab42410 Author: Taehee Yoo Date: Thu Aug 8 09:37:56 2019 -0700 ixgbe: fix possible deadlock in ixgbe_service_task() ixgbe_service_task() calls unregister_netdev() under rtnl_lock(). But unregister_netdev() internally calls rtnl_lock(). So deadlock would occur. Fixes: 59dd45d550c5 ("ixgbe: firmware recovery mode") Signed-off-by: Taehee Yoo Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher Signed-off-by: David S. Miller drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 703acf62596589acba6bfa31ab5573d1e8e4afa6 Merge: 7bac762d8da3 609a2ca57afc Author: David S. Miller Date: Fri Aug 9 13:14:46 2019 -0700 Merge branch 'Fix-collisions-in-socket-cookie-generation' Daniel Borkmann says: ==================== Fix collisions in socket cookie generation This change makes the socket cookie generator as a global counter instead of per netns in order to fix cookie collisions for BPF use cases we ran into. See main patch #1 for more details. Given the change is small/trivial and fixes an issue we're seeing my preference would be net tree (though it cleanly applies to net-next as well). Went for net tree instead of bpf tree here given the main change is in net/core/sock_diag.c, but either way would be fine with me. v1 -> v2: - Fix up commit description in patch #1, thanks Eric! ==================== Signed-off-by: David S. Miller commit 609a2ca57afc467fbc46b7f3453de4e1811456c5 Author: Daniel Borkmann Date: Thu Aug 8 13:57:26 2019 +0200 bpf: sync bpf.h to tools infrastructure Pull in updates in BPF helper function description. Signed-off-by: Daniel Borkmann Signed-off-by: David S. Miller tools/include/uapi/linux/bpf.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit cd48bdda4fb82c2fe569d97af4217c530168c99c Author: Daniel Borkmann Date: Thu Aug 8 13:57:25 2019 +0200 sock: make cookie generation global instead of per netns Generating and retrieving socket cookies are a useful feature that is exposed to BPF for various program types through bpf_get_socket_cookie() helper. The fact that the cookie counter is per netns is quite a limitation for BPF in practice in particular for programs in host namespace that use socket cookies as part of a map lookup key since they will be causing socket cookie collisions e.g. when attached to BPF cgroup hooks or cls_bpf on tc egress in host namespace handling container traffic from veth or ipvlan devices with peer in different netns. Change the counter to be global instead. Socket cookie consumers must assume the value as opqaue in any case. Not every socket must have a cookie generated and knowledge of the counter value itself does not provide much value either way hence conversion to global is fine. Signed-off-by: Daniel Borkmann Cc: Eric Dumazet Cc: Alexei Starovoitov Cc: Willem de Bruijn Cc: Martynas Pumputis Signed-off-by: David S. Miller include/net/net_namespace.h | 1 - include/uapi/linux/bpf.h | 4 ++-- net/core/sock_diag.c | 3 ++- 3 files changed, 4 insertions(+), 4 deletions(-) commit 45f5d5a9e34d3fe4140a9a3b5f7ebe86c252440a Author: Geert Uytterhoeven Date: Wed Jul 31 09:48:01 2019 +0200 arm64: dts: renesas: r8a77995: draak: Fix backlight regulator name Currently there are two nodes named "regulator1" in the Draak DTS: a 3.3V regulator for the eMMC and the LVDS decoder, and a 12V regulator for the backlight. This causes the former to be overwritten by the latter. Fix this by renaming all regulators with numerical suffixes to use named suffixes, which are less likely to conflict. Fixes: 4fbd4158fe8967e9 ("arm64: dts: renesas: r8a77995: draak: Add backlight") Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77995-draak.dts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7bac762d8da39ae215171bfa93c6662894ce17dc Merge: 8c25d0887a8b e8c3af6bb33a Author: David S. Miller Date: Fri Aug 9 11:27:17 2019 -0700 Merge tag 'rxrpc-fixes-20190809' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== Here's a couple of fixes for rxrpc: (1) Fix refcounting of the local endpoint. (2) Don't calculate or report packet skew information. This has been obsolete since AFS 3.1 and so is a waste of resources. ==================== Signed-off-by: David S. Miller commit c07d8d47bca1b325102fa2be3a463075f7b051d9 Author: Masahiro Yamada Date: Thu Aug 8 20:21:11 2019 +0900 kbuild: show hint if subdir-y/m is used to visit module Makefile Since commit ff9b45c55b26 ("kbuild: modpost: read modules.order instead of $(MODVERDIR)/*.mod"), a module is no longer built in the following pattern: [Makefile] subdir-y := some-module [some-module/Makefile] obj-m := some-module.o You cannot write Makefile this way in upstream because modules.order is not correctly generated. subdir-y is used to descend to a sub-directory that builds tools, device trees, etc. For external modules, the modules order does not matter. So, the Makefile above was known to work. I believe the Makefile should be re-written as follows: [Makefile] obj-m := some-module/ [some-module/Makefile] obj-m := some-module.o However, people will have no idea if their Makefile suddenly stops working. In fact, I received questions from multiple people. Show a warning for a while if obj-m is specified in a Makefile visited by subdir-y or subdir-m. I touched the %/ rule to avoid false-positive warnings for the single target. Cc: Jan Kiszka Cc: Tom Stonecypher Signed-off-by: Masahiro Yamada Tested-by: Jan Kiszka Makefile | 2 +- scripts/Makefile.build | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) commit 4f2c8f3089f538f556c86f26603a062865e4aa94 Author: Masahiro Yamada Date: Tue Aug 6 19:03:22 2019 +0900 kbuild: generate modules.order only in directories visited by obj-y/m The modules.order files in directories visited by the chain of obj-y or obj-m are merged to the upper-level ones, and become parts of the top-level modules.order. On the other hand, there is no need to generate modules.order in directories visited by subdir-y or subdir-m since they would become orphan anyway. Signed-off-by: Masahiro Yamada scripts/Makefile.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d9f78edfd81b9e484423534360350ef7253cc888 Author: Masahiro Yamada Date: Tue Aug 6 19:03:21 2019 +0900 kbuild: fix false-positive need-builtin calculation The current implementation of need-builtin is false-positive, for example, in the following Makefile: obj-m := foo/ obj-y := foo/bar/ ..., where foo/built-in.a is not required. Signed-off-by: Masahiro Yamada scripts/Makefile.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 47801c97deb71b9e279c15a02a44cf00aa11e7d9 Author: Masahiro Yamada Date: Fri Aug 2 19:23:58 2019 +0900 kbuild: revive single target %.ko I removed the single target %.ko in commit ff9b45c55b26 ("kbuild: modpost: read modules.order instead of $(MODVERDIR)/*.mod") because the modpost stage does not work reliably. For instance, the module dependency, modversion, etc. do not work if we lack symbol information from the other modules. Yet, some people still want to build only one module in their interest, and it may be still useful if it is used within those limitations. Fixes: ff9b45c55b26 ("kbuild: modpost: read modules.order instead of $(MODVERDIR)/*.mod") Reported-by: Don Brace Reported-by: Arend Van Spriel Signed-off-by: Masahiro Yamada Makefile | 11 +++++++++++ scripts/Makefile.modpost | 6 ++---- 2 files changed, 13 insertions(+), 4 deletions(-) commit 2226fb57a908330c7e2b83d363d450f2000de837 Merge: 15a555a4b8be a111ef6b0822 Author: Linus Torvalds Date: Fri Aug 9 09:35:23 2019 -0700 Merge tag 'drm-fixes-2019-08-09' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Usual fixes roundup. Nothing too crazy or serious, one non-released ioctl is removed in the amdkfd driver. core: - mode parser strncpy fix i915: - GLK DSI escape clock setting - HDCP memleak fix tegra: - one gpiod/of regression fix amdgpu: - fix VCN to handle the latest navi10 firmware - fix for fan control on navi10 - properly handle SMU metrics table on navi10 - fix a resume regression on Stoney - kfd revert a GWS ioctl vmwgfx: - memory leak fix rockchip: - suspend fix" * tag 'drm-fixes-2019-08-09' of git://anongit.freedesktop.org/drm/drm: drm/vmwgfx: fix memory leak when too many retries have occurred Revert "drm/amdkfd: New IOCTL to allocate queue GWS" Revert "drm/amdgpu: fix transform feedback GDS hang on gfx10 (v2)" drm/amdgpu: pin the csb buffer on hw init for gfx v8 drm/rockchip: Suspend DP late drm/i915: Fix wrong escape clock divisor init for GLK drm/i915: fix possible memory leak in intel_hdcp_auth_downstream() drm/modes: Fix unterminated strncpy drm/amd/powerplay: correct navi10 vcn powergate drm/amd/powerplay: honor hw limit on fetching metrics data for navi10 drm/amd/powerplay: Allow changing of fan_control in smu_v11_0 drm/amd/amdgpu/vcn_v2_0: Move VCN 2.0 specific dec ring test to vcn_v2_0 drm/amd/amdgpu/vcn_v2_0: Mark RB commands as KMD commands drm/tegra: Fix gpiod_get_from_of_node() regression commit 15a555a4b8be26683d77df8d5dbe8ac83f5ec3a6 Merge: cb7ef4bc9272 30e235389faa Author: Linus Torvalds Date: Fri Aug 9 09:31:40 2019 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fix from Catalin Marinas: "Fix bad_pte warning caused by pte_mkdevmap() not setting PTE_SPECIAL" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: mm: add missing PTE_SPECIAL in pte_mkdevmap on arm64 commit cb7ef4bc927233304aeeeb891c1cfc5ad6f87975 Merge: 50e73a4a4159 404861e15b5f Author: Linus Torvalds Date: Fri Aug 9 09:30:00 2019 -0700 Merge tag 's390-5.3-5' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Vasily Gorbik: - Map vdso also for statically linked binaries like all other architectures. - Fix no .bss usage compile-time check to account common objects with the help of binutils size tool. Top level Makefile change acked-by Masahiro. - A fix to make perf happy with _etext symbol type. - Fix dump_pagetables which is broken since p*d_offset implementation change to comply with mm/gup.c expectations. - Revert memory sharing for diag calls in protected virtualization, since this is not required after all. - Couple of other minor code cleanups. * tag 's390-5.3-5' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/vdso: map vdso also for statically linked binaries s390/build: use size command to perform empty .bss check kbuild: add OBJSIZE variable for the size tool s390: put _stext and _etext into .text section s390/head64: cleanup unused labels s390/unwind: remove stack recursion warning s390/setup: adjust start_code of init_mm to _text s390/mm: fix dump_pagetables top level page table walking s390/protvirt: avoid memory sharing for diag 308 set/store commit 50e73a4a41598f9a785a986d25b731d3968dedb1 Merge: 461d2815ac9e 20621fedb2a6 Author: Linus Torvalds Date: Fri Aug 9 09:28:18 2019 -0700 Merge tag 'for-linus-20190809' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: - Revert of a bcache patch that caused an oops for some (Coly) - ata rb532 unused warning fix (Gustavo) - AoE kernel crash fix (He) - Error handling fixup for blkdev_get() (Jan) - libata read/write translation and SFF PIO fix (me) - Use after free and error handling fix for O_DIRECT fragments. There's still a nowait + sync oddity in there, we'll nail that start next week. If all else fails, I'll queue a revert of the NOWAIT change. (me) - Loop GFP_KERNEL -> GFP_NOIO deadlock fix (Mikulas) - Two BFQ regression fixes that caused crashes (Paolo) * tag 'for-linus-20190809' of git://git.kernel.dk/linux-block: bcache: Revert "bcache: use sysfs_match_string() instead of __sysfs_match_string()" loop: set PF_MEMALLOC_NOIO for the worker thread bdev: Fixup error handling in blkdev_get() block, bfq: handle NULL return value by bfq_init_rq() block, bfq: move update of waker and woken list to queue freeing block, bfq: reset last_completed_rq_bfqq if the pointed queue is freed block: aoe: Fix kernel crash due to atomic sleep when exiting libata: add SG safety checks in SFF pio transfers libata: have ata_scsi_rw_xlat() fail invalid passthrough requests block: fix O_DIRECT error handling for bio fragments ata: rb532_cf: Fix unused variable warning in rb532_pata_driver_probe commit 461d2815ac9ec1b3f66fc243cc39bd2374facafa Merge: ec4c99ad7bd2 b803974a8603 Author: Linus Torvalds Date: Fri Aug 9 09:26:47 2019 -0700 Merge tag 'mmc-v5.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: - cavium: Fix DMA support - sdhci-sprd: Fix soft reset when runtime resuming" * tag 'mmc-v5.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: cavium: Add the missing dma unmap when the dma has finished. mmc: cavium: Set the correct dma max segment size for mmc_host mmc: sdhci-sprd: Fix the incorrect soft reset operation when runtime resuming commit ec4c99ad7bd23dd39ffb1381136cefa4bb632e31 Merge: c808f2ad8fcd 6a7553e8d84d Author: Linus Torvalds Date: Fri Aug 9 09:24:49 2019 -0700 Merge tag 'fbdev-v5.3-rc4' of git://github.com/bzolnier/linux Pull fbdev fix from Bartlomiej Zolnierkiewicz: "fbdev patches will now go to upstream through drm-misc tree for improved maintainership and better integration testing so update MAINTAINERS file accordingly" * tag 'fbdev-v5.3-rc4' of git://github.com/bzolnier/linux: MAINTAINERS: handle fbdev changes through drm-misc tree commit c808f2ad8fcddb856ce42901cd5b4f06f9da9184 Merge: cb42f06c9f41 6cf9481b440d Author: Linus Torvalds Date: Fri Aug 9 09:23:23 2019 -0700 Merge tag 'pwm/for-5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm Pull pwm fix from Thierry Reding: "A single fix for a backlight brightness regression introduced in this merge window" * tag 'pwm/for-5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: pwm: Fallback to the static lookup-list when acpi_pwm_get fails commit cb42f06c9f418ec2ee56667d01e9ba965a4c61c9 Merge: 6c02b6300fec 1be3c1fae6c1 Author: Linus Torvalds Date: Fri Aug 9 09:21:27 2019 -0700 Merge tag 'sound-5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Lots of small fixes at this time since we've received the ASoC fix batch now. - Some coverage in ASoC core mostly for minor issues like NULL checks for DPCM and proper error handling in DAI instantiation - A collection of small device-specific changes in various ASoC codec and platform drivers - OF-tree refcount fixes in a few ASoC drivers - Fixes of memory leaks in the error paths of various ASoC / ALSA drivers - A workaround for a long-standing issue on AMD HD-audio device - Updates of MAINTAINERS, mail addresses, file permission fixups" * tag 'sound-5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (38 commits) ALSA: firewire: fix a memory leak bug sound: fix a memory leak bug ALSA: hda - Workaround for crackled sound on AMD controller (1022:1457) ALSA: hiface: fix multiple memory leak bugs ALSA: hda - Don't override global PCM hw info flag ALSA: usb-audio: fix a memory leak bug ASoC: max98373: Remove executable bits ASoC: amd: acp3x: use dma address for acp3x dma driver ASoC: amd: acp3x: use dma_ops of parent device for acp3x dma driver ASoC: max98373: add 88200 and 96000 sampling rate support ASoC: sun4i-i2s: Incorrect SR and WSS computation MAINTAINERS: Update Intel ASoC drivers maintainers ASoC: ti: davinci-mcasp: Correct slot_width posed constraint ASoC: rockchip: Fix mono capture ASoC: Intel: Fix some acpi vs apci typo in somme comments ASoC: ti: davinci-mcasp: Fix clk PDIR handling for i2s master mode ASoC: Fail card instantiation if DAI format setup fails ASoC: SOF: Intel: hda: remove misleading error trace from IRQ thread ASoC: qcom: apq8016_sbc: Fix oops with multiple DAI links ASoC: dapm: fix a memory leak bug ... commit 6c02b6300fec062405ed0215e8ed1ed2b690da55 Merge: 0acf5676dc0f 92f5b0313e37 Author: Linus Torvalds Date: Fri Aug 9 09:19:53 2019 -0700 Merge tag 'media/v5.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fix from Mauro Carvalho Chehab: "A fix at the vivid CEC support" * tag 'media/v5.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: media: vivid: fix missing cec adapter name commit 0acf5676dc0ffe0683543a20d5ecbd112af5b8ee Merge: e577dc152e23 0617bdede511 Author: Linus Torvalds Date: Fri Aug 9 09:18:36 2019 -0700 Merge tag 'pm-5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fix from Rafael Wysocki: "Revert a recent PCI power management change that caused problems to occur on multiple systems (Mika Westerberg)" * tag 'pm-5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: Revert "PCI: Add missing link delays required by the PCIe spec" commit e577dc152e232c78e5774e4c9b5486a04561920b Merge: b678c568c561 e2664ecbb2f2 Author: Linus Torvalds Date: Fri Aug 9 09:17:05 2019 -0700 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fixes from Herbert Xu: "Fix a number of bugs in the ccp driver" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: ccp - Ignore tag length when decrypting GCM ciphertext crypto: ccp - Add support for valid authsize values less than 16 crypto: ccp - Fix oops by properly managing allocated structures commit a27a0c9b6a208722016c8ec5ad31ec96082b91ec Author: Andreas Gruenbacher Date: Mon Aug 5 12:22:03 2019 +0100 gfs2: gfs2_walk_metadata fix It turns out that the current version of gfs2_metadata_walker suffers from multiple problems that can cause gfs2_hole_size to report an incorrect size. This will confuse fiemap as well as lseek with the SEEK_DATA flag. Fix that by changing gfs2_hole_walker to compute the metapath to the first data block after the hole (if any), and compute the hole size based on that. Fixes xfstest generic/490. Signed-off-by: Andreas Gruenbacher Reviewed-by: Bob Peterson Cc: stable@vger.kernel.org # v4.18+ fs/gfs2/bmap.c | 164 +++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 101 insertions(+), 63 deletions(-) commit 4f7aafd78aeaf18a4f6dea9415df60e745c9dfa7 Merge: f1fc7249dddc 3c7be384fe6d Author: Daniel Borkmann Date: Fri Aug 9 17:38:53 2019 +0200 Merge branch 'bpf-bpftool-pinning-error-msg' Jakub Kicinski says: ==================== First make sure we don't use "prog" in error messages because the pinning operation could be performed on a map. Second add back missing error message if pin syscall failed. ==================== Acked-by: Yonghong Song Signed-off-by: Daniel Borkmann commit 3c7be384fe6da0d7b1d6fc0ad6b4a33edb73aad5 Author: Jakub Kicinski Date: Tue Aug 6 17:19:23 2019 -0700 tools: bpftool: add error message on pin failure No error message is currently printed if the pin syscall itself fails. It got lost in the loadall refactoring. Fixes: 77380998d91d ("bpftool: add loadall command") Reported-by: Andy Lutomirski Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Acked-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann tools/bpf/bpftool/common.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit b3e78adcbf991a4e8b2ebb23c9889e968ec76c5f Author: Jakub Kicinski Date: Tue Aug 6 17:19:22 2019 -0700 tools: bpftool: fix error message (prog -> object) Change an error message to work for any object being pinned not just programs. Fixes: 71bb428fe2c1 ("tools: bpf: add bpftool") Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Signed-off-by: Daniel Borkmann tools/bpf/bpftool/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3a18844dcf89e636b2d0cbf577e3963b0bcb6d23 Author: Lu Baolu Date: Tue Aug 6 08:14:09 2019 +0800 iommu/vt-d: Fix possible use-after-free of private domain Multiple devices might share a private domain. One real example is a pci bridge and all devices behind it. When remove a private domain, make sure that it has been detached from all devices to avoid use-after-free case. Cc: Ashok Raj Cc: Jacob Pan Cc: Kevin Tian Cc: Alex Williamson Fixes: 942067f1b6b97 ("iommu/vt-d: Identify default domains replaced with private") Signed-off-by: Lu Baolu Tested-by: Alex Williamson Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ae23bfb68f2896835e54a137688906713cb607e7 Author: Lu Baolu Date: Tue Aug 6 08:14:08 2019 +0800 iommu/vt-d: Detach domain before using a private one When the default domain of a group doesn't work for a device, the iommu driver will try to use a private domain. The domain which was previously attached to the device must be detached. Cc: Ashok Raj Cc: Jacob Pan Cc: Kevin Tian Cc: Alex Williamson Fixes: 942067f1b6b97 ("iommu/vt-d: Identify default domains replaced with private") Reported-by: Alex Williamson Link: https://lkml.org/lkml/2019/8/2/1379 Signed-off-by: Lu Baolu Tested-by: Alex Williamson Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit ab2cbeb0ed301a9f0460078e91b09f39958212ef Author: Robin Murphy Date: Mon Jul 29 17:46:00 2019 +0100 iommu/dma: Handle SG length overflow better Since scatterlist dimensions are all unsigned ints, in the relatively rare cases where a device's max_segment_size is set to UINT_MAX, then the "cur_len + s_length <= max_len" check in __finalise_sg() will always return true. As a result, the corner case of such a device mapping an excessively large scatterlist which is mergeable to or beyond a total length of 4GB can lead to overflow and a bogus truncated dma_length in the resulting segment. As we already assume that any single segment must be no longer than max_len to begin with, this can easily be addressed by reshuffling the comparison. Fixes: 809eac54cdd6 ("iommu/dma: Implement scatterlist segment merging") Reported-by: Nicolin Chen Tested-by: Nicolin Chen Signed-off-by: Robin Murphy Signed-off-by: Joerg Roedel drivers/iommu/dma-iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bfeaec7f7d2f6b09764a1b48e88e9ca3d5076419 Author: Lu Baolu Date: Sat Jul 20 10:01:26 2019 +0800 iommu/vt-d: Correctly check format of page table in debugfs PASID support and enable bit in the context entry isn't the right indicator for the type of tables (legacy or scalable mode). Check the DMA_RTADDR_SMT bit in the root context pointer instead. Cc: Ashok Raj Cc: Jacob Pan Cc: Kevin Tian Cc: Sai Praneeth Fixes: dd5142ca5d24b ("iommu/vt-d: Add debugfs support to show scalable mode DMAR table internals") Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu-debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a738b5e75b4c13be3485c82eb62c30047aa9f164 Merge: 0e1c438c44dd 16e604a437c8 Author: Paolo Bonzini Date: Fri Aug 9 16:53:50 2019 +0200 Merge tag 'kvmarm-fixes-for-5.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm fixes for 5.3, take #2 - Fix our system register reset so that we stop writing non-sensical values to them, and track which registers get reset instead. - Sync VMCR back from the GIC on WFI so that KVM has an exact vue of PMR. - Reevaluate state of HW-mapped, level triggered interrupts on enable. commit 0e1c438c44dd9cde56effb44c5f1cfeda72e108d Merge: c096397c78f7 cdb2d3ee0436 Author: Paolo Bonzini Date: Fri Aug 9 16:53:39 2019 +0200 Merge tag 'kvmarm-fixes-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm fixes for 5.3 - A bunch of switch/case fall-through annotation, fixing one actual bug - Fix PMU reset bug - Add missing exception class debug strings commit c096397c78f766db972f923433031f2dec01cae0 Author: Naresh Kamboju Date: Wed Aug 7 13:58:14 2019 +0000 selftests: kvm: Adding config fragments selftests kvm test cases need pre-required kernel configs for the test to get pass. Signed-off-by: Naresh Kamboju Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/config | 3 +++ 1 file changed, 3 insertions(+) commit e2c26537ea7652d123ddb01ceb1aa0e2a5edb7ad Author: Thomas Huth Date: Wed Jul 31 16:28:51 2019 +0200 KVM: selftests: Update gitignore file for latest changes The kvm_create_max_vcpus test has been moved to the main directory, and sync_regs_test is now available on s390x, too. Signed-off-by: Thomas Huth Acked-by: Shuah Khan Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/.gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8f946da73aaa1c3f609bd14d1193f39afa6830c7 Author: Paolo Bonzini Date: Mon Aug 5 11:11:08 2019 +0200 kvm: remove unnecessary PageReserved check The same check is already done in kvm_is_reserved_pfn. Reviewed-by: Sean Christopherson Signed-off-by: Paolo Bonzini virt/kvm/kvm_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e8c3af6bb33a9e4b56920ee00aef92eb5e4cf485 Author: David Howells Date: Fri Aug 9 15:20:41 2019 +0100 rxrpc: Don't bother generating maxSkew in the ACK packet Don't bother generating maxSkew in the ACK packet as it has been obsolete since AFS 3.1. Signed-off-by: David Howells Reviewed-by: Jeffrey Altman net/rxrpc/af_rxrpc.c | 2 +- net/rxrpc/ar-internal.h | 3 +-- net/rxrpc/call_event.c | 15 ++++++--------- net/rxrpc/input.c | 43 ++++++++++++++++--------------------------- net/rxrpc/output.c | 3 +-- net/rxrpc/recvmsg.c | 6 +++--- 6 files changed, 28 insertions(+), 44 deletions(-) commit 730c5fd42c1e3652a065448fd235cb9fafb2bd10 Author: David Howells Date: Fri Aug 9 15:20:41 2019 +0100 rxrpc: Fix local endpoint refcounting The object lifetime management on the rxrpc_local struct is broken in that the rxrpc_local_processor() function is expected to clean up and remove an object - but it may get requeued by packets coming in on the backing UDP socket once it starts running. This may result in the assertion in rxrpc_local_rcu() firing because the memory has been scheduled for RCU destruction whilst still queued: rxrpc: Assertion failed ------------[ cut here ]------------ kernel BUG at net/rxrpc/local_object.c:468! Note that if the processor comes around before the RCU free function, it will just do nothing because ->dead is true. Fix this by adding a separate refcount to count active users of the endpoint that causes the endpoint to be destroyed when it reaches 0. The original refcount can then be used to refcount objects through the work processor and cause the memory to be rcu freed when that reaches 0. Fixes: 4f95dd78a77e ("rxrpc: Rework local endpoint management") Reported-by: syzbot+1e0edc4b8b7494c28450@syzkaller.appspotmail.com Signed-off-by: David Howells net/rxrpc/af_rxrpc.c | 4 +-- net/rxrpc/ar-internal.h | 5 ++- net/rxrpc/input.c | 16 ++++++--- net/rxrpc/local_object.c | 86 ++++++++++++++++++++++++++++++------------------ 4 files changed, 72 insertions(+), 39 deletions(-) commit 6a7553e8d84d5322d883cb83bb9888c49a0f04e0 Author: Bartlomiej Zolnierkiewicz Date: Fri Aug 9 15:46:40 2019 +0200 MAINTAINERS: handle fbdev changes through drm-misc tree fbdev patches will now go to upstream through drm-misc tree (IOW starting with v5.4 merge window fbdev changes will be included in DRM pull request) for improved maintainership and better integration testing. Update MAINTAINERS file accordingly. Acked-by: Daniel Vetter Signed-off-by: Bartlomiej Zolnierkiewicz MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 20621fedb2a696e4dc60bc1c5de37cf21976abcb Author: Coly Li Date: Fri Aug 9 14:14:05 2019 +0800 bcache: Revert "bcache: use sysfs_match_string() instead of __sysfs_match_string()" This reverts commit 89e0341af082dbc170019f908846f4a424efc86b. In drivers/md/bcache/sysfs.c:bch_snprint_string_list(), NULL pointer at the end of list is necessary. Remove the NULL from last element of each lists will cause the following panic, [ 4340.455652] bcache: register_cache() registered cache device nvme0n1 [ 4340.464603] bcache: register_bdev() registered backing device sdk [ 4421.587335] bcache: bch_cached_dev_run() cached dev sdk is running already [ 4421.587348] bcache: bch_cached_dev_attach() Caching sdk as bcache0 on set 354e1d46-d99f-4d8b-870b-078b80dc88a6 [ 5139.247950] general protection fault: 0000 [#1] SMP NOPTI [ 5139.247970] CPU: 9 PID: 5896 Comm: cat Not tainted 4.12.14-95.29-default #1 SLE12-SP4 [ 5139.247988] Hardware name: HPE ProLiant DL380 Gen10/ProLiant DL380 Gen10, BIOS U30 04/18/2019 [ 5139.248006] task: ffff888fb25c0b00 task.stack: ffff9bbacc704000 [ 5139.248021] RIP: 0010:string+0x21/0x70 [ 5139.248030] RSP: 0018:ffff9bbacc707bf0 EFLAGS: 00010286 [ 5139.248043] RAX: ffffffffa7e432e3 RBX: ffff8881c20da02a RCX: ffff0a00ffffff04 [ 5139.248058] RDX: 3f00656863616362 RSI: ffff8881c20db000 RDI: ffffffffffffffff [ 5139.248075] RBP: ffff8881c20db000 R08: 0000000000000000 R09: ffff8881c20da02a [ 5139.248090] R10: 0000000000000004 R11: 0000000000000000 R12: ffff9bbacc707c48 [ 5139.248104] R13: 0000000000000fd6 R14: ffffffffc0665855 R15: ffffffffc0665855 [ 5139.248119] FS: 00007faf253b8700(0000) GS:ffff88903f840000(0000) knlGS:0000000000000000 [ 5139.248137] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 5139.248149] CR2: 00007faf25395008 CR3: 0000000f72150006 CR4: 00000000007606e0 [ 5139.248164] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 5139.248179] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 5139.248193] PKRU: 55555554 [ 5139.248200] Call Trace: [ 5139.248210] vsnprintf+0x1fb/0x510 [ 5139.248221] snprintf+0x39/0x40 [ 5139.248238] bch_snprint_string_list.constprop.15+0x5b/0x90 [bcache] [ 5139.248256] __bch_cached_dev_show+0x44d/0x5f0 [bcache] [ 5139.248270] ? __alloc_pages_nodemask+0xb2/0x210 [ 5139.248284] bch_cached_dev_show+0x2c/0x50 [bcache] [ 5139.248297] sysfs_kf_seq_show+0xbb/0x190 [ 5139.248308] seq_read+0xfc/0x3c0 [ 5139.248317] __vfs_read+0x26/0x140 [ 5139.248327] vfs_read+0x87/0x130 [ 5139.248336] SyS_read+0x42/0x90 [ 5139.248346] do_syscall_64+0x74/0x160 [ 5139.248358] entry_SYSCALL_64_after_hwframe+0x3d/0xa2 [ 5139.248370] RIP: 0033:0x7faf24eea370 [ 5139.248379] RSP: 002b:00007fff82d03f38 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 [ 5139.248395] RAX: ffffffffffffffda RBX: 0000000000020000 RCX: 00007faf24eea370 [ 5139.248411] RDX: 0000000000020000 RSI: 00007faf25396000 RDI: 0000000000000003 [ 5139.248426] RBP: 00007faf25396000 R08: 00000000ffffffff R09: 0000000000000000 [ 5139.248441] R10: 000000007c9d4d41 R11: 0000000000000246 R12: 00007faf25396000 [ 5139.248456] R13: 0000000000000003 R14: 0000000000000000 R15: 0000000000000fff [ 5139.248892] Code: ff ff ff 0f 1f 80 00 00 00 00 49 89 f9 48 89 cf 48 c7 c0 e3 32 e4 a7 48 c1 ff 30 48 81 fa ff 0f 00 00 48 0f 46 d0 48 85 ff 74 45 <44> 0f b6 02 48 8d 42 01 45 84 c0 74 38 48 01 fa 4c 89 cf eb 0e The simplest way to fix is to revert commit 89e0341af082 ("bcache: use sysfs_match_string() instead of __sysfs_match_string()"). This bug was introduced in Linux v5.2, so this fix only applies to Linux v5.2 is enough for stable tree maintainer. Fixes: 89e0341af082 ("bcache: use sysfs_match_string() instead of __sysfs_match_string()") Cc: stable@vger.kernel.org Cc: Alexandru Ardelean Reported-by: Peifeng Lin Acked-by: Alexandru Ardelean Signed-off-by: Coly Li Signed-off-by: Jens Axboe drivers/md/bcache/sysfs.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 1e5b2471bcc4838df298080ae1ec042c2cbc9ce9 Author: Pablo Neira Ayuso Date: Fri Aug 9 11:01:35 2019 +0200 netfilter: nf_flow_table: teardown flow timeout race Flows that are in teardown state (due to RST / FIN TCP packet) still have their offload flag set on. Hence, the conntrack garbage collector may race to undo the timeout adjustment that the fixup routine performs, leaving the conntrack entry in place with the internal offload timeout (one day). Update teardown flow state to ESTABLISHED and set tracking to liberal, then once the offload bit is cleared, adjust timeout if it is more than the default fixup timeout (conntrack might already have set a lower timeout from the packet path). Fixes: da5984e51063 ("netfilter: nf_flow_table: add support for sending flows back to the slow path") Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_flow_table_core.c | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) commit 3e68db2f6422d711550a32cbc87abd97bb6efab3 Author: Pablo Neira Ayuso Date: Fri Aug 9 11:01:33 2019 +0200 netfilter: nf_flow_table: conntrack picks up expired flows Update conntrack entry to pick up expired flows, otherwise the conntrack entry gets stuck with the internal offload timeout (one day). The TCP state also needs to be adjusted to ESTABLISHED state and tracking is set to liberal mode in order to give conntrack a chance to pick up the expired flow. Fixes: ac2a66665e23 ("netfilter: add generic flow table infrastructure") Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_flow_table_core.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 6a0a8d10a3661a036b55af695542a714c429ab7c Author: Pablo Neira Ayuso Date: Fri Aug 9 11:01:27 2019 +0200 netfilter: nf_tables: use-after-free in failing rule with bound set If a rule that has already a bound anonymous set fails to be added, the preparation phase releases the rule and the bound set. However, the transaction object from the abort path still has a reference to the set object that is stale, leading to a use-after-free when checking for the set->bound field. Add a new field to the transaction that specifies if the set is bound, so the abort path can skip releasing it since the rule command owns it and it takes care of releasing it. After this update, the set->bound field is removed. [ 24.649883] Unable to handle kernel paging request at virtual address 0000000000040434 [ 24.657858] Mem abort info: [ 24.660686] ESR = 0x96000004 [ 24.663769] Exception class = DABT (current EL), IL = 32 bits [ 24.669725] SET = 0, FnV = 0 [ 24.672804] EA = 0, S1PTW = 0 [ 24.675975] Data abort info: [ 24.678880] ISV = 0, ISS = 0x00000004 [ 24.682743] CM = 0, WnR = 0 [ 24.685723] user pgtable: 4k pages, 48-bit VAs, pgdp=0000000428952000 [ 24.692207] [0000000000040434] pgd=0000000000000000 [ 24.697119] Internal error: Oops: 96000004 [#1] SMP [...] [ 24.889414] Call trace: [ 24.891870] __nf_tables_abort+0x3f0/0x7a0 [ 24.895984] nf_tables_abort+0x20/0x40 [ 24.899750] nfnetlink_rcv_batch+0x17c/0x588 [ 24.904037] nfnetlink_rcv+0x13c/0x190 [ 24.907803] netlink_unicast+0x18c/0x208 [ 24.911742] netlink_sendmsg+0x1b0/0x350 [ 24.915682] sock_sendmsg+0x4c/0x68 [ 24.919185] ___sys_sendmsg+0x288/0x2c8 [ 24.923037] __sys_sendmsg+0x7c/0xd0 [ 24.926628] __arm64_sys_sendmsg+0x2c/0x38 [ 24.930744] el0_svc_common.constprop.0+0x94/0x158 [ 24.935556] el0_svc_handler+0x34/0x90 [ 24.939322] el0_svc+0x8/0xc [ 24.942216] Code: 37280300 f9404023 91014262 aa1703e0 (f9401863) [ 24.948336] ---[ end trace cebbb9dcbed3b56f ]--- Fixes: f6ac85858976 ("netfilter: nf_tables: unbind set in rule from commit path") Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables.h | 9 +++++++-- net/netfilter/nf_tables_api.c | 15 ++++++++++----- 2 files changed, 17 insertions(+), 7 deletions(-) commit d555c34338cae844b207564c482e5a3fb089d25e Author: Hans Verkuil Date: Fri Aug 9 10:32:40 2019 +0200 omap-dma/omap_vout_vrfb: fix off-by-one fi value The OMAP 4 TRM specifies that when using double-index addressing the address increases by the ES plus the EI value minus 1 within a frame. When a full frame is transferred, the address increases by the ES plus the frame index (FI) value minus 1. The omap-dma code didn't account for the 'minus 1' in the FI register. To get correct addressing, add 1 to the src_icg value. This was found when testing a hacked version of the media m2m-deinterlace.c driver on a Pandaboard. The only other source that uses this feature is omap_vout_vrfb.c, and that adds a + 1 when setting the dst_icg. This is a workaround for the broken omap-dma.c behavior. So remove the workaround at the same time that we fix omap-dma.c. I tested the omap_vout driver with a Beagle XM board to check that the '+ 1' in omap_vout_vrfb.c was indeed a workaround for the omap-dma bug. Signed-off-by: Hans Verkuil Reviewed-by: Laurent Pinchart Acked-by: Peter Ujfalusi Acked-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/952e7f51-f208-9333-6f58-b7ed20d2ea0b@xs4all.nl Signed-off-by: Vinod Koul drivers/dma/ti/omap-dma.c | 4 ++-- drivers/media/platform/omap/omap_vout_vrfb.c | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) commit de768ce45466f3009809719eb7b1f6f5277d9373 Author: Takashi Iwai Date: Fri Aug 9 11:23:00 2019 +0200 ALSA: hda - Apply workaround for another AMD chip 1022:1487 MSI MPG X570 board is with another AMD HD-audio controller (PCI ID 1022:1487) and it requires the same workaround applied for X370, etc (PCI ID 1022:1457). BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=195303 Cc: Signed-off-by: Takashi Iwai sound/pci/hda/hda_intel.c | 3 +++ 1 file changed, 3 insertions(+) commit 404861e15b5fa7edbab22400f9174c1a21fde731 Author: Heiko Carstens Date: Wed Aug 7 14:31:59 2019 +0200 s390/vdso: map vdso also for statically linked binaries s390 does not map the vdso for statically linked binaries, assuming that this doesn't make sense. See commit fc5243d98ac2 ("[S390] arch_setup_additional_pages arguments"). However with glibc commit d665367f596d ("linux: Enable vDSO for static linking as default (BZ#19767)") and commit 5e855c895401 ("s390: Enable VDSO for static linking") the vdso is also used for statically linked binaries - if the kernel would make it available. Therefore map the vdso always, just like all other architectures. Reported-by: Stefan Liebler Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik arch/s390/kernel/vdso.c | 5 ----- 1 file changed, 5 deletions(-) commit eac4471d0882da14be652ef0a55b914145fab15a Author: Dan Carpenter Date: Thu Aug 8 13:32:36 2019 +0300 drm/i915: Use after free in error path in intel_vgpu_create_workload() We can't free "workload" until after the printk or it's a use after free. Fixes: 2089a76ade90 ("drm/i915/gvt: Checking workload's gma earlier") Signed-off-by: Dan Carpenter Reviewed-by: Chris Wilson Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/scheduler.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 16e604a437c89751dc626c9e90cf88ba93c5be64 Author: Alexandru Elisei Date: Wed Aug 7 10:53:20 2019 +0100 KVM: arm/arm64: vgic: Reevaluate level sensitive interrupts on enable A HW mapped level sensitive interrupt asserted by a device will not be put into the ap_list if it is disabled at the VGIC level. When it is enabled again, it will be inserted into the ap_list and written to a list register on guest entry regardless of the state of the device. We could argue that this can also happen on real hardware, when the command to enable the interrupt reached the GIC before the device had the chance to de-assert the interrupt signal; however, we emulate the distributor and redistributors in software and we can do better than that. Signed-off-by: Alexandru Elisei Signed-off-by: Marc Zyngier virt/kvm/arm/vgic/vgic-mmio.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit c69509c70aa45a8c4954c88c629a64acf4ee4a36 Author: Marc Zyngier Date: Mon Aug 5 10:34:51 2019 +0100 KVM: arm: Don't write junk to CP15 registers on reset At the moment, the way we reset CP15 registers is mildly insane: We write junk to them, call the reset functions, and then check that we have something else in them. The "fun" thing is that this can happen while the guest is running (PSCI, for example). If anything in KVM has to evaluate the state of a CP15 register while junk is in there, bad thing may happen. Let's stop doing that. Instead, we track that we have called a reset function for that register, and assume that the reset function has done something. In the end, the very need of this reset check is pretty dubious, as it doesn't check everything (a lot of the CP15 reg leave outside of the cp15_regs[] array). It may well be axed in the near future. Signed-off-by: Marc Zyngier arch/arm/kvm/coproc.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) commit 03fdfb2690099c19160a3f2c5b77db60b3afeded Author: Marc Zyngier Date: Mon Aug 5 10:34:51 2019 +0100 KVM: arm64: Don't write junk to sysregs on reset At the moment, the way we reset system registers is mildly insane: We write junk to them, call the reset functions, and then check that we have something else in them. The "fun" thing is that this can happen while the guest is running (PSCI, for example). If anything in KVM has to evaluate the state of a system register while junk is in there, bad thing may happen. Let's stop doing that. Instead, we track that we have called a reset function for that register, and assume that the reset function has done something. This requires fixing a couple of sysreg refinition in the trap table. In the end, the very need of this reset check is pretty dubious, as it doesn't check everything (a lot of the sysregs leave outside of the sys_regs[] array). It may well be axed in the near future. Tested-by: Zenghui Yu Signed-off-by: Marc Zyngier arch/arm64/kvm/sys_regs.c | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) commit 1109635b292c82e7a2aa15e38edb7c389e34b693 Author: Lowry Li (Arm Technology China) Date: Fri Aug 2 08:07:52 2019 +0000 drm/komeda: Initialize and enable output polling on Komeda Initialize and enable output polling on Komeda. Changes since v1: 1. Enable the polling before registering the driver; 2. Disable the polling after unregistering the driver. Changes since v2: 1. If driver register failed, disable the polling. Signed-off-by: Lowry Li (Arm Technology China) Reviewed-by: James Qian Wang (Arm Technology China) Signed-off-by: james qian wang (Arm Technology China) Link: https://patchwork.freedesktop.org/patch/msgid/1564733249-24329-1-git-send-email-lowry.li@arm.com drivers/gpu/drm/arm/display/komeda/komeda_kms.c | 5 +++++ 1 file changed, 5 insertions(+) commit a111ef6b082270f6cbeea5556caf1cbb0143b812 Merge: 359f1dcbae12 73a0ff0b30af Author: Dave Airlie Date: Fri Aug 9 15:46:09 2019 +1000 Merge tag 'drm-intel-fixes-2019-08-08' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes drm/i915 fixes for v5.3-rc4: - Fix GLK DSI escape clock setting - Fix a memleak on HDCP revoked Ksv error path Signed-off-by: Dave Airlie From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87pnlghz79.fsf@intel.com commit 359f1dcbae12b691fa40aae912fab4c129cb7561 Merge: 6ca847a947d9 f7ccbed656f7 Author: Dave Airlie Date: Fri Aug 9 15:45:02 2019 +1000 Merge tag 'drm-misc-fixes-2019-08-08' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes drm-misc-fixes for v5.3-rc4: - Suspend fix for rockchip - Fix unterminated strncpy cmdline mode parser Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/ace294a6-6bb2-d9b1-695d-3260e1d60831@linux.intel.com commit 8c25d0887a8bd0e1ca2074ac0c6dff173787a83b Author: Fuqian Huang Date: Fri Aug 9 13:35:39 2019 +0800 net: tundra: tsi108: use spin_lock_irqsave instead of spin_lock_irq in IRQ context As spin_unlock_irq will enable interrupts. Function tsi108_stat_carry is called from interrupt handler tsi108_irq. Interrupts are enabled in interrupt handler. Use spin_lock_irqsave/spin_unlock_irqrestore instead of spin_(un)lock_irq in IRQ context to avoid this. Signed-off-by: Fuqian Huang Signed-off-by: David S. Miller drivers/net/ethernet/tundra/tsi108_eth.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 227f2f030e28d8783c3d10ce70ff4ba79cad653f Author: YueHaibing Date: Thu Aug 8 14:22:47 2019 +0800 team: Add vlan tx offload to hw_enc_features We should also enable team's vlan tx offload in hw_enc_features, pass the vlan packets to the slave devices with vlan tci, let the slave handle vlan tunneling offload implementation. Fixes: 3268e5cb494d ("team: Advertise tunneling offload features") Signed-off-by: YueHaibing Signed-off-by: David S. Miller drivers/net/team/team.c | 2 ++ 1 file changed, 2 insertions(+) commit 6ca847a947d9da958047dba570d4727069a4861b Merge: f536579c1482 6b7c3b86f0b6 Author: Dave Airlie Date: Fri Aug 9 15:40:06 2019 +1000 Merge branch 'vmwgfx-fixes-5.3' of git://people.freedesktop.org/~thomash/linux into drm-fixes One single memory leak fix. Signed-off-by: Dave Airlie From: Thomas Hellstrom "VMware" Link: https://patchwork.freedesktop.org/patch/msgid/20190808094615.31040-1-thomas@shipmail.org commit 414776621d1006e57e80e6db7fdc3837897aaa64 Author: Jakub Kicinski Date: Wed Aug 7 17:03:59 2019 -0700 net/tls: prevent skb_orphan() from leaking TLS plain text with offload sk_validate_xmit_skb() and drivers depend on the sk member of struct sk_buff to identify segments requiring encryption. Any operation which removes or does not preserve the original TLS socket such as skb_orphan() or skb_clone() will cause clear text leaks. Make the TCP socket underlying an offloaded TLS connection mark all skbs as decrypted, if TLS TX is in offload mode. Then in sk_validate_xmit_skb() catch skbs which have no socket (or a socket with no validation) and decrypted flag set. Note that CONFIG_SOCK_VALIDATE_XMIT, CONFIG_TLS_DEVICE and sk->sk_validate_xmit_skb are slightly interchangeable right now, they all imply TLS offload. The new checks are guarded by CONFIG_TLS_DEVICE because that's the option guarding the sk_buff->decrypted member. Second, smaller issue with orphaning is that it breaks the guarantee that packets will be delivered to device queues in-order. All TLS offload drivers depend on that scheduling property. This means skb_orphan_partial()'s trick of preserving partial socket references will cause issues in the drivers. We need a full orphan, and as a result netem delay/throttling will cause all TLS offload skbs to be dropped. Reusing the sk_buff->decrypted flag also protects from leaking clear text when incoming, decrypted skb is redirected (e.g. by TC). See commit 0608c69c9a80 ("bpf: sk_msg, sock{map|hash} redirect through ULP") for justification why the internal flag is safe. The only location which could leak the flag in is tcp_bpf_sendmsg(), which is taken care of by clearing the previously unused bit. v2: - remove superfluous decrypted mark copy (Willem); - remove the stale doc entry (Boris); - rely entirely on EOR marking to prevent coalescing (Boris); - use an internal sendpages flag instead of marking the socket (Boris). v3 (Willem): - reorganize the can_skb_orphan_partial() condition; - fix the flag leak-in through tcp_bpf_sendmsg. Signed-off-by: Jakub Kicinski Acked-by: Willem de Bruijn Reviewed-by: Boris Pismenny Signed-off-by: David S. Miller Documentation/networking/tls-offload.rst | 18 ------------------ include/linux/skbuff.h | 8 ++++++++ include/linux/socket.h | 3 +++ include/net/sock.h | 10 +++++++++- net/core/sock.c | 19 ++++++++++++++----- net/ipv4/tcp.c | 3 +++ net/ipv4/tcp_bpf.c | 6 +++++- net/ipv4/tcp_output.c | 3 +++ net/tls/tls_device.c | 9 +++++++-- 9 files changed, 52 insertions(+), 27 deletions(-) commit 0de94de18027540200f2f193be6a2fa749cb7ebe Merge: e3e3af9aa29a 7bc161846dcf Author: David S. Miller Date: Thu Aug 8 22:37:06 2019 -0700 Merge branch 'skbedit-batch-fixes' Roman Mashak says: ==================== Fix batched event generation for skbedit action When adding or deleting a batch of entries, the kernel sends up to TCA_ACT_MAX_PRIO (defined to 32 in kernel) entries in an event to user space. However it does not consider that the action sizes may vary and require different skb sizes. For example, consider the following script adding 32 entries with all supported skbedit parameters and cookie (in order to maximize netlink messages size): % cat tc-batch.sh TC="sudo /mnt/iproute2.git/tc/tc" $TC actions flush action skbedit for i in `seq 1 $1`; do cmd="action skbedit queue_mapping 2 priority 10 mark 7/0xaabbccdd \ ptype host inheritdsfield \ index $i cookie aabbccddeeff112233445566778800a1 " args=$args$cmd done $TC actions add $args % % ./tc-batch.sh 32 Error: Failed to fill netlink attributes while adding TC action. We have an error talking to the kernel % patch 1 adds callback in tc_action_ops of skbedit action, which calculates the action size, and passes size to tcf_add_notify()/tcf_del_notify(). patch 2 updates the TDC test suite with relevant skbedit test cases. ==================== Signed-off-by: David S. Miller commit 7bc161846dcf4af0485f260930d17fdd892a4980 Author: Roman Mashak Date: Wed Aug 7 15:57:29 2019 -0400 tc-testing: updated skbedit action tests with batch create/delete Update TDC tests with cases varifying ability of TC to install or delete batches of skbedit actions. Signed-off-by: Roman Mashak Signed-off-by: David S. Miller .../tc-testing/tc-tests/actions/skbedit.json | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) commit e1fea322fc6d4075254ca9c5f2afdace0281da2a Author: Roman Mashak Date: Wed Aug 7 15:57:28 2019 -0400 net sched: update skbedit action for batched events operations Add get_fill_size() routine used to calculate the action size when building a batch of events. Fixes: ca9b0e27e ("pkt_action: add new action skbedit") Signed-off-by: Roman Mashak Signed-off-by: David S. Miller net/sched/act_skbedit.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit e3e3af9aa29a2ada43d5c27b47ea320415cd5bb3 Author: YueHaibing Date: Wed Aug 7 21:08:56 2019 +0800 net: dsa: sja1105: remove set but not used variables 'tx_vid' and 'rx_vid' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/dsa/sja1105/sja1105_main.c: In function sja1105_fdb_dump: drivers/net/dsa/sja1105/sja1105_main.c:1226:14: warning: variable tx_vid set but not used [-Wunused-but-set-variable] drivers/net/dsa/sja1105/sja1105_main.c:1226:6: warning: variable rx_vid set but not used [-Wunused-but-set-variable] They are not used since commit 6d7c7d948a2e ("net: dsa: sja1105: Fix broken learning with vlan_filtering disabled") Reported-by: Hulk Robot Signed-off-by: YueHaibing Reviewed-by: Vladimir Oltean Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/sja1105/sja1105_main.c | 4 ---- 1 file changed, 4 deletions(-) commit d595b03de2cb0bdf9bcdf35ff27840cc3a37158f Author: YueHaibing Date: Wed Aug 7 10:19:59 2019 +0800 bonding: Add vlan tx offload to hw_enc_features As commit 30d8177e8ac7 ("bonding: Always enable vlan tx offload") said, we should always enable bonding's vlan tx offload, pass the vlan packets to the slave devices with vlan tci, let them to handle vlan implementation. Now if encapsulation protocols like VXLAN is used, skb->encapsulation may be set, then the packet is passed to vlan device which based on bonding device. However in netif_skb_features(), the check of hw_enc_features: if (skb->encapsulation) features &= dev->hw_enc_features; clears NETIF_F_HW_VLAN_CTAG_TX/NETIF_F_HW_VLAN_STAG_TX. This results in same issue in commit 30d8177e8ac7 like this: vlan_dev_hard_start_xmit -->dev_queue_xmit -->validate_xmit_skb -->netif_skb_features //NETIF_F_HW_VLAN_CTAG_TX is cleared -->validate_xmit_vlan -->__vlan_hwaccel_push_inside //skb->tci is cleared ... --> bond_start_xmit --> bond_xmit_hash //BOND_XMIT_POLICY_ENCAP34 --> __skb_flow_dissect // nhoff point to IP header --> case htons(ETH_P_8021Q) // skb_vlan_tag_present is false, so vlan = __skb_header_pointer(skb, nhoff, sizeof(_vlan), //vlan point to ip header wrongly Fixes: b2a103e6d0af ("bonding: convert to ndo_fix_features") Signed-off-by: YueHaibing Acked-by: Jay Vosburgh Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 2 ++ 1 file changed, 2 insertions(+) commit 51650d33b2771acd505068da669cf85cffac369a Author: Ivan Khoronzhuk Date: Wed Aug 7 01:45:40 2019 +0300 net: sched: sch_taprio: fix memleak in error path for sched list parse In error case, all entries should be freed from the sched list before deleting it. For simplicity use rcu way. Fixes: 5a781ccbd19e46 ("tc: Add support for configuring the taprio scheduler") Acked-by: Vinicius Costa Gomes Signed-off-by: Ivan Khoronzhuk Signed-off-by: David S. Miller net/sched/sch_taprio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8676b3ca4673517650fd509d7fa586aff87b3c28 Author: Pierre-Louis Bossart Date: Thu Jul 18 18:02:15 2019 -0500 soundwire: fix regmap dependencies and align with other serial links The existing code has a mixed select/depend usage which makes no sense. config SOUNDWIRE_BUS tristate select REGMAP_SOUNDWIRE config REGMAP_SOUNDWIRE tristate depends on SOUNDWIRE_BUS Let's remove one layer of Kconfig definitions and align with the solutions used by all other serial links. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20190718230215.18675-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul drivers/base/regmap/Kconfig | 2 +- drivers/soundwire/Kconfig | 7 +------ drivers/soundwire/Makefile | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) commit fe90689fed119cb55ff04e6a1df0817f0a3e9d32 Author: Stephen Hemminger Date: Mon Aug 5 15:30:03 2019 -0700 net: docs: replace IPX in tuntap documentation IPX is no longer supported, but the example in the documentation might useful. Replace it with IPv6. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller Documentation/networking/tuntap.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7e7c076e123ae8c4faa1966fc0da64f6e24eb57e Author: Stephen Hemminger Date: Mon Aug 5 15:30:02 2019 -0700 docs: admin-guide: remove references to IPX and token-ring Both IPX and TR have not been supported for a while now. Remove them from the /proc/sys/net documentation. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller Documentation/admin-guide/sysctl/net.rst | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) commit 3a0233ddec554b886298de2428edb5c50a20e694 Author: Ross Lagerwall Date: Mon Aug 5 16:34:34 2019 +0100 xen/netback: Reset nr_frags before freeing skb At this point nr_frags has been incremented but the frag does not yet have a page assigned so freeing the skb results in a crash. Reset nr_frags before freeing the skb to prevent this. Signed-off-by: Ross Lagerwall Signed-off-by: David S. Miller drivers/net/xen-netback/netback.c | 2 ++ 1 file changed, 2 insertions(+) commit b390e0bfd2996f1215231395f4e25a4c011eeaf9 Author: Paul Walmsley Date: Thu Aug 8 15:36:44 2019 -0700 dt-bindings: riscv: fix the schema compatible string for the HiFive Unleashed board The YAML binding document for SiFive boards has an incorrect compatible string for the HiFive Unleashed board. Change it to match the name of the board on the SiFive web site: https://www.sifive.com/boards/hifive-unleashed which also matches the contents of the board DT data file: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts#n13 Signed-off-by: Paul Walmsley Acked-by: Rob Herring Documentation/devicetree/bindings/riscv/sifive.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8e5e72e3314021a3d166c1d19a991a0870568856 Author: Paul Walmsley Date: Thu Aug 8 14:46:58 2019 -0700 dt-bindings: riscv: remove obsolete cpus.txt Remove the now-obsolete riscv/cpus.txt DT binding document, since we are using YAML binding documentation instead. While doing so, transfer the explanatory text about 'harts' (with some edits) into the YAML file, at Rob's request. Link: https://lore.kernel.org/linux-riscv/CAL_JsqJs6MtvmuyAknsUxQymbmoV=G+=JfS1PQj9kNHV7fjC9g@mail.gmail.com/ Signed-off-by: Paul Walmsley Cc: Rob Herring Reviewed-by: Rob Herring Documentation/devicetree/bindings/riscv/cpus.txt | 162 ---------------------- Documentation/devicetree/bindings/riscv/cpus.yaml | 12 ++ 2 files changed, 12 insertions(+), 162 deletions(-) commit 81a48ee417387bef9cb720ca75980ee11ae9c901 Author: Palmer Dabbelt Date: Tue Aug 6 17:05:08 2019 -0700 RISC-V: Remove udivdi3 This should never have landed in the first place: it was added as part of 64-bit divide support for 32-bit systems, but the kernel doesn't allow this sort of division. I must have forgotten to remove it. This patch removes the support. Since this routine only worked on 64-bit platforms but was only built on 32-bit platforms, it's essentially just nonsense anyway. Signed-off-by: Palmer Dabbelt Acked-by: Nicolas Pitre Link: https://lore.kernel.org/linux-riscv/nycvar.YSQ.7.76.1908061413360.19480@knanqh.ubzr/T/#t Reported-by: Eric Lin Signed-off-by: Paul Walmsley arch/riscv/lib/Makefile | 2 -- arch/riscv/lib/udivdi3.S | 32 -------------------------------- 2 files changed, 34 deletions(-) commit 66cc016ab7c780d53450fd1648010da02ddf2770 Author: Paul Walmsley Date: Tue Aug 6 18:28:33 2019 -0700 riscv: delay: use do_div() instead of __udivdi3() In preparation for removing __udivdi3() from the RISC-V architecture-specific files, convert its one user to use do_div(). This avoids breaking the RV32 build after __udivdi3() is removed. This second version removes the assignment of the remainder to an unused temporary variable. Thanks to Nicolas Pitre for the suggestion. Signed-off-by: Paul Walmsley Cc: Nicolas Pitre arch/riscv/lib/delay.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 94ed3fde38c7c1347cd82b945553905cfd992ab9 Author: Atish Patra Date: Fri Aug 2 21:27:23 2019 -0700 dt-bindings: Update the riscv,isa string description Since the RISC-V specification states that ISA description strings are case-insensitive, there's no functional difference between mixed-case, upper-case, and lower-case ISA strings. Thus, to simplify parsing, specify that the letters present in "riscv,isa" must be all lowercase. Suggested-by: Paul Walmsley Signed-off-by: Atish Patra Signed-off-by: Paul Walmsley Documentation/devicetree/bindings/riscv/cpus.yaml | 4 ++++ 1 file changed, 4 insertions(+) commit 891584f48a9084ba462f10da4c6bb28b6181b543 Author: Guillaume Nault Date: Fri Aug 2 17:15:03 2019 +0200 inet: frags: re-introduce skb coalescing for local delivery Before commit d4289fcc9b16 ("net: IP6 defrag: use rbtrees for IPv6 defrag"), a netperf UDP_STREAM test[0] using big IPv6 datagrams (thus generating many fragments) and running over an IPsec tunnel, reported more than 6Gbps throughput. After that patch, the same test gets only 9Mbps when receiving on a be2net nic (driver can make a big difference here, for example, ixgbe doesn't seem to be affected). By reusing the IPv4 defragmentation code, IPv6 lost fragment coalescing (IPv4 fragment coalescing was dropped by commit 14fe22e33462 ("Revert "ipv4: use skb coalescing in defragmentation"")). Without fragment coalescing, be2net runs out of Rx ring entries and starts to drop frames (ethtool reports rx_drops_no_frags errors). Since the netperf traffic is only composed of UDP fragments, any lost packet prevents reassembly of the full datagram. Therefore, fragments which have no possibility to ever get reassembled pile up in the reassembly queue, until the memory accounting exeeds the threshold. At that point no fragment is accepted anymore, which effectively discards all netperf traffic. When reassembly timeout expires, some stale fragments are removed from the reassembly queue, so a few packets can be received, reassembled and delivered to the netperf receiver. But the nic still drops frames and soon the reassembly queue gets filled again with stale fragments. These long time frames where no datagram can be received explain why the performance drop is so significant. Re-introducing fragment coalescing is enough to get the initial performances again (6.6Gbps with be2net): driver doesn't drop frames anymore (no more rx_drops_no_frags errors) and the reassembly engine works at full speed. This patch is quite conservative and only coalesces skbs for local IPv4 and IPv6 delivery (in order to avoid changing skb geometry when forwarding). Coalescing could be extended in the future if need be, as more scenarios would probably benefit from it. [0]: Test configuration Sender: ip xfrm policy flush ip xfrm state flush ip xfrm state add src fc00:1::1 dst fc00:2::1 proto esp spi 0x1000 aead 'rfc4106(gcm(aes))' 0x0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b 96 mode transport sel src fc00:1::1 dst fc00:2::1 ip xfrm policy add src fc00:1::1 dst fc00:2::1 dir in tmpl src fc00:1::1 dst fc00:2::1 proto esp mode transport action allow ip xfrm state add src fc00:2::1 dst fc00:1::1 proto esp spi 0x1001 aead 'rfc4106(gcm(aes))' 0x0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b 96 mode transport sel src fc00:2::1 dst fc00:1::1 ip xfrm policy add src fc00:2::1 dst fc00:1::1 dir out tmpl src fc00:2::1 dst fc00:1::1 proto esp mode transport action allow netserver -D -L fc00:2::1 Receiver: ip xfrm policy flush ip xfrm state flush ip xfrm state add src fc00:2::1 dst fc00:1::1 proto esp spi 0x1001 aead 'rfc4106(gcm(aes))' 0x0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b 96 mode transport sel src fc00:2::1 dst fc00:1::1 ip xfrm policy add src fc00:2::1 dst fc00:1::1 dir in tmpl src fc00:2::1 dst fc00:1::1 proto esp mode transport action allow ip xfrm state add src fc00:1::1 dst fc00:2::1 proto esp spi 0x1000 aead 'rfc4106(gcm(aes))' 0x0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b 96 mode transport sel src fc00:1::1 dst fc00:2::1 ip xfrm policy add src fc00:1::1 dst fc00:2::1 dir out tmpl src fc00:1::1 dst fc00:2::1 proto esp mode transport action allow netperf -H fc00:2::1 -f k -P 0 -L fc00:1::1 -l 60 -t UDP_STREAM -I 99,5 -i 5,5 -T5,5 -6 Signed-off-by: Guillaume Nault Acked-by: Florian Westphal Signed-off-by: David S. Miller include/net/inet_frag.h | 2 +- net/ieee802154/6lowpan/reassembly.c | 2 +- net/ipv4/inet_fragment.c | 39 +++++++++++++++++++++++---------- net/ipv4/ip_fragment.c | 8 ++++++- net/ipv6/netfilter/nf_conntrack_reasm.c | 2 +- net/ipv6/reassembly.c | 2 +- 6 files changed, 39 insertions(+), 16 deletions(-) commit b678c568c561cf7e4ed40f4bcc3e85d2b50310a2 Merge: 518a1c2f0912 67e7b52d44e3 Author: Linus Torvalds Date: Thu Aug 8 14:47:19 2019 -0700 Merge tag 'nfs-for-5.3-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs Pull NFS client fixes from Trond Myklebust: "Highlights include: Stable fixes: - NFSv4: Ensure we check the return value of update_open_stateid() so we correctly track active open state. - NFSv4: Fix for delegation state recovery to ensure we recover all open modes that are active. - NFSv4: Fix an Oops in nfs4_do_setattr Fixes: - NFS: Fix regression whereby fscache errors are appearing on 'nofsc' mounts - NFSv4: Fix a potential sleep while atomic in nfs4_do_reclaim() - NFSv4: Fix a credential refcount leak in nfs41_check_delegation_stateid - pNFS: Report errors from the call to nfs4_select_rw_stateid() - NFSv4: Various other delegation and open stateid recovery fixes - NFSv4: Fix state recovery behaviour when server connection times out" * tag 'nfs-for-5.3-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: NFSv4: Ensure state recovery handles ETIMEDOUT correctly NFS: Fix regression whereby fscache errors are appearing on 'nofsc' mounts NFSv4: Fix an Oops in nfs4_do_setattr NFSv4: Fix a potential sleep while atomic in nfs4_do_reclaim() NFSv4: Check the return value of update_open_stateid() NFSv4.1: Only reap expired delegations NFSv4.1: Fix open stateid recovery NFSv4: Report the error from nfs4_select_rw_stateid() NFSv4: When recovering state fails with EAGAIN, retry the same recovery NFSv4: Print an error in the syslog when state is marked as irrecoverable NFSv4: Fix delegation state recovery NFSv4: Fix a credential refcount leak in nfs41_check_delegation_stateid commit baf7b79e1ad79a41fafd8ab8597b9a96962d822d Author: Marek Szyprowski Date: Thu Aug 8 14:18:39 2019 +0200 clk: samsung: exynos542x: Move MSCL subsystem clocks to its sub-CMU M2M scaler clocks require special handling of their parent bus clock during power domain on/off sequences. MSCL clocks were not initially added to the sub-CMU handler, because that time there was no driver for the M2M scaler device and it was not possible to test it. This patch fixes this issue. Parent clock for M2M scaler devices is now properly preserved during MSC power domain on/off sequence. This gives M2M scaler devices proper performance: fullHD XRGB32 image 1000 rotations test takes 3.17s instead of 45.08s. Fixes: b06a532bf1fa ("clk: samsung: Add Exynos5 sub-CMU clock driver") Signed-off-by: Marek Szyprowski Link: https://lkml.kernel.org/r/20190808121839.23892-1-m.szyprowski@samsung.com Acked-by: Sylwester Nawrocki Signed-off-by: Stephen Boyd drivers/clk/samsung/clk-exynos5420.c | 48 +++++++++++++++++++++++++----------- 1 file changed, 34 insertions(+), 14 deletions(-) commit b6adeb6bc61c2567b9efd815d61a61b34a2e51a6 Author: Sylwester Nawrocki Date: Thu Aug 8 16:49:29 2019 +0200 clk: samsung: exynos5800: Move MAU subsystem clocks to MAU sub-CMU This patch fixes broken sound on Exynos5422/5800 platforms after system/suspend resume cycle in cases where the audio root clock is derived from MAU_EPLL_CLK. In order to preserve state of the USER_MUX_MAU_EPLL_CLK clock mux during system suspend/resume cycle for Exynos5800 we group the MAU block input clocks in "MAU" sub-CMU and add the clock mux control bit to .suspend_regs. This ensures that user configuration of the mux is not lost after the PMU block changes the mux setting to OSC_DIV when switching off the MAU power domain. Adding the SRC_TOP9 register to exynos5800_clk_regs[] array is not sufficient as at the time of the syscore_ops suspend call MAU power domain is already turned off and we already save and subsequently restore an incorrect register's value. Fixes: b06a532bf1fa ("clk: samsung: Add Exynos5 sub-CMU clock driver") Reported-by: Jaafar Ali Suggested-by: Marek Szyprowski Tested-by: Jaafar Ali Signed-off-by: Sylwester Nawrocki Link: https://lkml.kernel.org/r/20190808144929.18685-2-s.nawrocki@samsung.com Signed-off-by: Stephen Boyd drivers/clk/samsung/clk-exynos5420.c | 54 ++++++++++++++++++++++++++++-------- 1 file changed, 43 insertions(+), 11 deletions(-) commit bf32e7dbfce87d518c0ca77af890eae9ab8d6ab9 Author: Sylwester Nawrocki Date: Thu Aug 8 16:49:28 2019 +0200 clk: samsung: Change signature of exynos5_subcmus_init() function In order to make it easier in subsequent patch to create different subcmu lists for exynos5420 and exynos5800 SoCs the code is rewritten so we pass an array of pointers to the subcmus initialization function. Fixes: b06a532bf1fa ("clk: samsung: Add Exynos5 sub-CMU clock driver") Tested-by: Jaafar Ali Signed-off-by: Sylwester Nawrocki Link: https://lkml.kernel.org/r/20190808144929.18685-1-s.nawrocki@samsung.com Reviewed-by: Marek Szyprowski Signed-off-by: Stephen Boyd drivers/clk/samsung/clk-exynos5-subcmu.c | 16 ++++----- drivers/clk/samsung/clk-exynos5-subcmu.h | 2 +- drivers/clk/samsung/clk-exynos5250.c | 7 +++- drivers/clk/samsung/clk-exynos5420.c | 60 ++++++++++++++++++-------------- 4 files changed, 49 insertions(+), 36 deletions(-) commit d7731b8133ad64cd98bf34a33dcf810df4410308 Merge: b3c303be4c35 8e6e5bea2e34 Author: Thomas Gleixner Date: Thu Aug 8 22:12:01 2019 +0200 Merge tag 'perf-urgent-for-mingo-5.3-20190808' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent perf/urgent fixes: db-export: Adrian Hunter: - Fix thread__exec_comm() picking of main thread COMM for pre-existing, synthesized from /proc data records. annotate: Arnaldo Carvalho de Melo: - Fix printing of unaugmented disassembled instructions from BPF, some lines were leaving leftovers from the previous screen, due to use of newlines by binutils's libopcode disassembler. perf ftrace: He Zhe: - Fix cpumask problems when only one CPU is present. PMU events: Jin Yao: - Add missing "cpu_clk_unhalted.core" event. perf bench: Jiri Olsa: - Fix cpu0 binding in the NUMA benchmarks. s390: Thomas Richter: - Fix module size calculations. build system: Masanari Iida: - Fix a typo in a variable name in the Documentation Makefile misc: Ian Rogers: - Fix include paths in ui directory. Signed-off-by: Arnaldo Carvalho de Melo commit a4e508cab623951dc4754f346e5673714f3bbade Author: Aya Levin Date: Thu Aug 8 15:55:48 2019 +0300 net/mlx5e: Remove redundant check in CQE recovery flow of tx reporter Remove check of recovery bit, in the beginning of the CQE recovery function. This test is already performed right before the reporter is invoked, when CQE error is detected. Fixes: de8650a82071 ("net/mlx5e: Add tx reporter support") Signed-off-by: Aya Levin Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c | 3 --- 1 file changed, 3 deletions(-) commit 276d197e70bcc47153592f4384675b51c7d83aba Author: Aya Levin Date: Tue Aug 6 15:19:19 2019 +0300 net/mlx5e: Fix error flow of CQE recovery on tx reporter CQE recovery function begins with test and set of recovery bit. Add an error flow which ensures clearing of this bit when leaving the recovery function, to allow further recoveries to take place. This allows removal of clearing recovery bit on sq activate. Fixes: de8650a82071 ("net/mlx5e: Add tx reporter support") Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c | 12 ++++++++---- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 1 - 2 files changed, 8 insertions(+), 5 deletions(-) commit d9a2fcf53c76a7edb2bcf99e94507935561a83d5 Author: Aya Levin Date: Wed Aug 7 15:59:06 2019 +0300 net/mlx5e: Fix false negative indication on tx reporter CQE recovery Remove wrong error return value when SQ is not in error state. CQE recovery on TX reporter queries the sq state. If the sq is not in error state, the sq is either in ready or reset state. Ready state is good state which doesn't require recovery and reset state is a temporal state which ends in ready state. With this patch, CQE recovery in this scenario is successful. Fixes: de8650a82071 ("net/mlx5e: Add tx reporter support") Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit b86f1abe2c275e6f9abf7e2669ccc318b7ef7bb9 Author: Tariq Toukan Date: Tue Jul 30 13:45:42 2019 +0300 net/mlx5e: kTLS, Fix tisn field placement Shift the tisn field in the WQE control segment, per the HW specification. Fixes: d2ead1f360e8 ("net/mlx5e: Add kTLS TX HW offload support") Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f1897b3cd1af1dce8d6c06b06f02551c71112003 Author: Tariq Toukan Date: Thu Aug 8 12:26:57 2019 +0300 net/mlx5e: kTLS, Fix tisn field name Use the proper tisn field name from the union in struct mlx5_wqe_ctrl_seg. Fixes: d2ead1f360e8 ("net/mlx5e: Add kTLS TX HW offload support") Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a9bc3390327317345dd4683b70970c83ab400ea3 Author: Tariq Toukan Date: Tue Jul 30 11:55:25 2019 +0300 net/mlx5e: kTLS, Fix progress params context WQE layout The TLS progress params context WQE should not include an Eth segment, drop it. In addition, align the tls_progress_params layout with the HW specification document: - fix the tisn field name. - remove the valid bit. Fixes: a12ff35e0fb7 ("net/mlx5: Introduce TLS TX offload hardware bits and structures") Fixes: d2ead1f360e8 ("net/mlx5e: Add kTLS TX HW offload support") Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 9 +++++++-- drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls.h | 6 ++++-- drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c | 4 ++-- include/linux/mlx5/mlx5_ifc.h | 5 ++--- 4 files changed, 15 insertions(+), 9 deletions(-) commit 26149e3e1f44d27897d0af9ca4bcd723674bad44 Author: Tariq Toukan Date: Sun Jul 21 14:18:42 2019 +0300 net/mlx5: kTLS, Fix wrong TIS opmod constants Fix the used constants for TLS TIS opmods, per the HW specification. Fixes: a12ff35e0fb7 ("net/mlx5: Introduce TLS TX offload hardware bits and structures") Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed include/linux/mlx5/device.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 55c9bd37ef5a0bd79c80c8eb418ce162bbc65590 Author: Tariq Toukan Date: Sun Jul 21 14:13:15 2019 +0300 net/mlx5: crypto, Fix wrong offset in encryption key command Fix the 128b key offset in key encryption key creation command, per the HW specification. Fixes: 45d3b55dc665 ("net/mlx5: Add crypto library to support create/destroy encryption key") Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/lib/crypto.c | 1 + 1 file changed, 1 insertion(+) commit 5faf5b70c51dd9c9905bf8209e33cbd867486607 Author: Mohamad Heib Date: Tue Apr 23 21:13:48 2019 +0300 net/mlx5e: ethtool, Avoid setting speed to 56GBASE when autoneg off Setting speed to 56GBASE is allowed only with auto-negotiation enabled. This patch prevent setting speed to 56GBASE when auto-negotiation disabled. Fixes: f62b8bb8f2d3 ("net/mlx5: Extend mlx5_core to support ConnectX-4 Ethernet functionality") Signed-off-by: Mohamad Heib Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 466df6eb4a9e813b3cfc674363316450c57a89c5 Author: Huy Nguyen Date: Thu Aug 1 11:10:19 2019 -0500 net/mlx5e: Only support tx/rx pause setting for port owner Only support changing tx/rx pause frame setting if the net device is the vport group manager. Fixes: 3c2d18ef22df ("net/mlx5e: Support ethtool get/set_pauseparam") Signed-off-by: Huy Nguyen Reviewed-by: Parav Pandit Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 3 +++ 1 file changed, 3 insertions(+) commit 93b3586e070b14704dd7bff81fbcefd64663f3c2 Author: Huy Nguyen Date: Wed Jul 17 14:04:31 2019 -0500 net/mlx5: Support inner header match criteria for non decap flow action We have an issue that OVS application creates an offloaded drop rule that drops VXLAN traffic with both inner and outer header match criteria. mlx5_core driver detects correctly the inner and outer header match criteria but does not enable the inner header match criteria due to an incorrect assumption in mlx5_eswitch_add_offloaded_rule that only decap rule needs inner header criteria. Solution: Remove mlx5_esw_flow_attr's match_level and tunnel_match_level and add two new members: inner_match_level and outer_match_level. inner/outer_match_level is set to NONE if the inner/outer match criteria is not specified in the tc rule creation request. The decap assumption is removed and the code just needs to check for inner/outer_match_level to enable the corresponding bit in firmware's match_criteria_enable value. Fixes: 6363651d6dd7 ("net/mlx5e: Properly set steering match levels for offloaded TC decap rules") Signed-off-by: Huy Nguyen Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 31 ++++++++++++++-------- drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 4 +-- .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 12 +++------ 3 files changed, 26 insertions(+), 21 deletions(-) commit 405b93eb764367a670e729da18e54dc42db32620 Author: Maxim Mikityanskiy Date: Fri Jul 5 17:59:28 2019 +0300 net/mlx5e: Use flow keys dissector to parse packets for ARFS The current ARFS code relies on certain fields to be set in the SKB (e.g. transport_header) and extracts IP addresses and ports by custom code that parses the packet. The necessary SKB fields, however, are not always set at that point, which leads to an out-of-bounds access. Use skb_flow_dissect_flow_keys() to get the necessary information reliably, fix the out-of-bounds access and reuse the code. Fixes: 18c908e477dc ("net/mlx5e: Add accelerated RFS support") Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c | 97 ++++++++--------------- 1 file changed, 34 insertions(+), 63 deletions(-) commit 8e6e5bea2e34c61291d00cb3f47560341aa84bc3 Author: Jin Yao Date: Mon Jul 29 15:27:55 2019 +0800 perf pmu-events: Fix missing "cpu_clk_unhalted.core" event The events defined in pmu-events JSON are parsed and added into perf tool. For fixed counters, we handle the encodings between JSON and perf by using a static array fixed[]. But the fixed[] has missed an important event "cpu_clk_unhalted.core". For example, on the Tremont platform, [root@localhost ~]# perf stat -e cpu_clk_unhalted.core -a event syntax error: 'cpu_clk_unhalted.core' \___ parser error With this patch, the event cpu_clk_unhalted.core can be parsed. [root@localhost perf]# ./perf stat -e cpu_clk_unhalted.core -a -vvv ------------------------------------------------------------ perf_event_attr: type 4 size 112 config 0x3c sample_type IDENTIFIER read_format TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING disabled 1 inherit 1 exclude_guest 1 ------------------------------------------------------------ ... Signed-off-by: Jin Yao Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20190729072755.2166-1-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/jevents.c | 1 + 1 file changed, 1 insertion(+) commit b9c0a64901d5bdec6eafd38d1dc8fa0e2974fccb Author: Thomas Richter Date: Wed Jul 24 14:27:03 2019 +0200 perf annotate: Fix s390 gap between kernel end and module start During execution of command 'perf top' the error message: Not enough memory for annotating '__irf_end' symbol!) is emitted from this call sequence: __cmd_top perf_top__mmap_read perf_top__mmap_read_idx perf_event__process_sample hist_entry_iter__add hist_iter__top_callback perf_top__record_precise_ip hist_entry__inc_addr_samples symbol__inc_addr_samples symbol__get_annotation symbol__alloc_hist In this function the size of symbol __irf_end is calculated. The size of a symbol is the difference between its start and end address. When the symbol was read the first time, its start and end was set to: symbol__new: __irf_end 0xe954d0-0xe954d0 which is correct and maps with /proc/kallsyms: root@s8360046:~/linux-4.15.0/tools/perf# fgrep _irf_end /proc/kallsyms 0000000000e954d0 t __irf_end root@s8360046:~/linux-4.15.0/tools/perf# In function symbol__alloc_hist() the end of symbol __irf_end is symbol__alloc_hist sym:__irf_end start:0xe954d0 end:0x3ff80045a8 which is identical with the first module entry in /proc/kallsyms This results in a symbol size of __irf_req for histogram analyses of 70334140059072 bytes and a malloc() for this requested size fails. The root cause of this is function __dso__load_kallsyms() +-> symbols__fixup_end() Function symbols__fixup_end() enlarges the last symbol in the kallsyms map: # fgrep __irf_end /proc/kallsyms 0000000000e954d0 t __irf_end # to the start address of the first module: # cat /proc/kallsyms | sort | egrep ' [tT] ' .... 0000000000e952d0 T __security_initcall_end 0000000000e954d0 T __initramfs_size 0000000000e954d0 t __irf_end 000003ff800045a8 T fc_get_event_number [scsi_transport_fc] 000003ff800045d0 t store_fc_vport_disable [scsi_transport_fc] 000003ff800046a8 T scsi_is_fc_rport [scsi_transport_fc] 000003ff800046d0 t fc_target_setup [scsi_transport_fc] On s390 the kernel is located around memory address 0x200, 0x10000 or 0x100000, depending on linux version. Modules however start some- where around 0x3ff xxxx xxxx. This is different than x86 and produces a large gap for which histogram allocation fails. Fix this by detecting the kernel's last symbol and do no adjustment for it. Introduce a weak function and handle s390 specifics. Reported-by: Klaus Theurich Signed-off-by: Thomas Richter Acked-by: Heiko Carstens Cc: Hendrik Brueckner Cc: Vasily Gorbik Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/20190724122703.3996-2-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/s390/util/machine.c | 17 +++++++++++++++++ tools/perf/util/symbol.c | 7 ++++++- tools/perf/util/symbol.h | 1 + 3 files changed, 24 insertions(+), 1 deletion(-) commit 12a6d2940b5f02b4b9f71ce098e3bb02bc24a9ea Author: Thomas Richter Date: Wed Jul 24 14:27:02 2019 +0200 perf record: Fix module size on s390 On s390 the modules loaded in memory have the text segment located after the GOT and Relocation table. This can be seen with this output: [root@m35lp76 perf]# fgrep qeth /proc/modules qeth 151552 1 qeth_l2, Live 0x000003ff800b2000 ... [root@m35lp76 perf]# cat /sys/module/qeth/sections/.text 0x000003ff800b3990 [root@m35lp76 perf]# There is an offset of 0x1990 bytes. The size of the qeth module is 151552 bytes (0x25000 in hex). The location of the GOT/relocation table at the beginning of a module is unique to s390. commit 203d8a4aa6ed ("perf s390: Fix 'start' address of module's map") adjusts the start address of a module in the map structures, but does not adjust the size of the modules. This leads to overlapping of module maps as this example shows: [root@m35lp76 perf] # ./perf report -D 0 0 0xfb0 [0xa0]: PERF_RECORD_MMAP -1/0: [0x3ff800b3990(0x25000) @ 0]: x /lib/modules/.../qeth.ko.xz 0 0 0x1050 [0xb0]: PERF_RECORD_MMAP -1/0: [0x3ff800d85a0(0x8000) @ 0]: x /lib/modules/.../ip6_tables.ko.xz The module qeth.ko has an adjusted start address modified to b3990, but its size is unchanged and the module ends at 0x3ff800d8990. This end address overlaps with the next modules start address of 0x3ff800d85a0. When the size of the leading GOT/Relocation table stored in the beginning of the text segment (0x1990 bytes) is subtracted from module qeth end address, there are no overlaps anymore: 0x3ff800d8990 - 0x1990 = 0x0x3ff800d7000 which is the same as 0x3ff800b2000 + 0x25000 = 0x0x3ff800d7000. To fix this issue, also adjust the modules size in function arch__fix_module_text_start(). Add another function parameter named size and reduce the size of the module when the text segment start address is changed. Output after: 0 0 0xfb0 [0xa0]: PERF_RECORD_MMAP -1/0: [0x3ff800b3990(0x23670) @ 0]: x /lib/modules/.../qeth.ko.xz 0 0 0x1050 [0xb0]: PERF_RECORD_MMAP -1/0: [0x3ff800d85a0(0x7a60) @ 0]: x /lib/modules/.../ip6_tables.ko.xz Reported-by: Stefan Liebler Signed-off-by: Thomas Richter Acked-by: Heiko Carstens Cc: Hendrik Brueckner Cc: Vasily Gorbik Cc: stable@vger.kernel.org Fixes: 203d8a4aa6ed ("perf s390: Fix 'start' address of module's map") Link: http://lkml.kernel.org/r/20190724122703.3996-1-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/s390/util/machine.c | 14 +++++++++++++- tools/perf/util/machine.c | 3 ++- tools/perf/util/machine.h | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) commit fa37bab6d7154658d8a35920513f9396587754cc Author: Ian Rogers Date: Wed Jul 31 15:54:41 2019 -0700 perf tools: Fix include paths in ui directory These paths point to the wrong location but still work because they get picked up by a -I flag that happens to direct to the correct file. Fix paths to point to the correct location without -I flags. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/r/20190731225441.233800-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browser.c | 9 +++++---- tools/perf/ui/tui/progress.c | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) commit 89b66500f739e0033ef59011e3df694f2053679d Author: Masanari Iida Date: Thu Aug 1 12:28:12 2019 +0900 perf tools: Fix a typo in a variable name in the Documentation Makefile This patch fix a spelling typo in a variable name in the Documentation Makefile. Signed-off-by: Masanari Iida Reviewed-by: Mukesh Ojha Cc: Alexander Shishkin Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20190801032812.25018-1-standby24x7@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5f5e25f1c7933a6e1673515c0b1d5acd82fea1ed Author: He Zhe Date: Fri Aug 2 16:29:52 2019 +0800 perf cpumap: Fix writing to illegal memory in handling cpumap mask cpu_map__snprint_mask() would write to illegal memory pointed by zalloc(0) when there is only one cpu. This patch fixes the calculation and adds sanity check against the input parameters. Signed-off-by: He Zhe Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Fixes: 4400ac8a9a90 ("perf cpumap: Introduce cpu_map__snprint_mask()") Link: http://lkml.kernel.org/r/1564734592-15624-2-git-send-email-zhe.he@windriver.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/cpumap.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit cf30ae726c011e0372fd4c2d588466c8b50a8907 Author: He Zhe Date: Fri Aug 2 16:29:51 2019 +0800 perf ftrace: Fix failure to set cpumask when only one cpu is present The buffer containing the string used to set cpumask is overwritten at the end of the string later in cpu_map__snprint_mask due to not enough memory space, when there is only one cpu. And thus causes the following failure: $ perf ftrace ls failed to reset ftrace $ This patch fixes the calculation of the cpumask string size. Signed-off-by: He Zhe Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Fixes: dc23103278c5 ("perf ftrace: Add support for -a and -C option") Link: http://lkml.kernel.org/r/1564734592-15624-1-git-send-email-zhe.he@windriver.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-ftrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3de7ae0b2a1d86dbb23d0cb135150534fdb2e836 Author: Adrian Hunter Date: Thu Aug 8 09:48:23 2019 +0300 perf db-export: Fix thread__exec_comm() Threads synthesized from /proc have comms with a start time of zero, and not marked as "exec". Currently, there can be 2 such comms. The first is created by processing a synthesized fork event and is set to the parent's comm string, and the second by processing a synthesized comm event set to the thread's current comm string. In the absence of an "exec" comm, thread__exec_comm() picks the last (oldest) comm, which, in the case above, is the parent's comm string. For a main thread, that is very probably wrong. Use the second-to-last in that case. This affects only db-export because it is the only user of thread__exec_comm(). Example: $ sudo perf record -a -o pt-a-sleep-1 -e intel_pt//u -- sleep 1 $ sudo chown ahunter pt-a-sleep-1 Before: $ perf script -i pt-a-sleep-1 --itrace=bep -s tools/perf/scripts/python/export-to-sqlite.py pt-a-sleep-1.db branches calls $ sqlite3 -header -column pt-a-sleep-1.db 'select * from comm_threads_view' comm_id command thread_id pid tid ---------- ---------- ---------- ---------- ---------- 1 swapper 1 0 0 2 rcu_sched 2 10 10 3 kthreadd 3 78 78 5 sudo 4 15180 15180 5 sudo 5 15180 15182 7 kworker/4: 6 10335 10335 8 kthreadd 7 55 55 10 systemd 8 865 865 10 systemd 9 865 875 13 perf 10 15181 15181 15 sleep 10 15181 15181 16 kworker/3: 11 14179 14179 17 kthreadd 12 29376 29376 19 systemd 13 746 746 21 systemd 14 401 401 23 systemd 15 879 879 23 systemd 16 879 945 25 kthreadd 17 556 556 27 kworker/u1 18 14136 14136 28 kworker/u1 19 15021 15021 29 kthreadd 20 509 509 31 systemd 21 836 836 31 systemd 22 836 967 33 systemd 23 1148 1148 33 systemd 24 1148 1163 35 kworker/2: 25 17988 17988 36 kworker/0: 26 13478 13478 After: $ perf script -i pt-a-sleep-1 --itrace=bep -s tools/perf/scripts/python/export-to-sqlite.py pt-a-sleep-1b.db branches calls $ sqlite3 -header -column pt-a-sleep-1b.db 'select * from comm_threads_view' comm_id command thread_id pid tid ---------- ---------- ---------- ---------- ---------- 1 swapper 1 0 0 2 rcu_sched 2 10 10 3 kswapd0 3 78 78 4 perf 4 15180 15180 4 perf 5 15180 15182 6 kworker/4: 6 10335 10335 7 kcompactd0 7 55 55 8 accounts-d 8 865 865 8 accounts-d 9 865 875 10 perf 10 15181 15181 12 sleep 10 15181 15181 13 kworker/3: 11 14179 14179 14 kworker/1: 12 29376 29376 15 haveged 13 746 746 16 systemd-jo 14 401 401 17 NetworkMan 15 879 879 17 NetworkMan 16 879 945 19 irq/131-iw 17 556 556 20 kworker/u1 18 14136 14136 21 kworker/u1 19 15021 15021 22 kworker/u1 20 509 509 23 thermald 21 836 836 23 thermald 22 836 967 25 unity-sett 23 1148 1148 25 unity-sett 24 1148 1163 27 kworker/2: 25 17988 17988 28 kworker/0: 26 13478 13478 Signed-off-by: Adrian Hunter Cc: Jiri Olsa Cc: stable@vger.kernel.org Fixes: 65de51f93ebf ("perf tools: Identify which comms are from exec") Link: http://lkml.kernel.org/r/20190808064823.14846-1-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/thread.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 85127775a65fc58e69af0c44513937d471ccbe7b Author: Arnaldo Carvalho de Melo Date: Tue Aug 6 11:24:09 2019 -0300 perf annotate: Fix printing of unaugmented disassembled instructions from BPF The code to disassemble BPF programs uses binutil's disassembling routines, and those use in turn fprintf to print to a memstream FILE, adding a newline at the end of each line, which ends up confusing the TUI routines called from: annotate_browser__write() annotate_line__write() annotate_browser__printf() ui_browser__vprintf() SLsmg_vprintf() The SLsmg_vprintf() function in the slang library gets confused with the terminating newline, so make the disasm_line__parse() function that parses the lines produced by the BPF specific disassembler (that uses binutil's libopcodes) and the lines produced by the objdump based disassembler used for everything else (and that doesn't adds this terminating newline) trim the end of the line in addition of the beginning. This way when disasm_line->ops.raw, i.e. for instructions without a special scnprintf() method, we'll not have that \n getting in the way of filling the screen right after the instruction with spaces to avoid leaving what was on the screen before and thus garbling the annotation screen, breaking scrolling, etc. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Cc: Song Liu Fixes: 6987561c9e86 ("perf annotate: Enable annotation of BPF programs") Link: https://lkml.kernel.org/n/tip-unbr5a5efakobfr6rhxq99ta@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/annotate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f6649feb264ed10ce425455df48242c0e704cba2 Merge: 33920f1ec5bf f7af86ccf188 Author: David S. Miller Date: Thu Aug 8 11:25:39 2019 -0700 Merge tag 'batadv-net-for-davem-20190808' of git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== Here are some batman-adv bugfixes: - Fix netlink dumping of all mcast_flags buckets, by Sven Eckelmann - Fix deletion of RTR(4|6) mcast list entries, by Sven Eckelmann ==================== Signed-off-by: David S. Miller commit 6c4d6bc5486466e3a67cc47270001d0b4a26eed4 Author: Masanari Iida Date: Tue Aug 6 23:23:28 2019 +0900 auxdisplay: Fix a typo in cfag12864b-example.c This patch fix a spelling typo in cfag12864b-example.c Signed-off-by: Masanari Iida Signed-off-by: Miguel Ojeda samples/auxdisplay/cfag12864b-example.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 390235c3e66036351e2a89b925843a741c8afd6c Author: Masahiro Yamada Date: Tue Aug 6 16:14:45 2019 +0900 auxdisplay: charlcd: add include guard to charlcd.h Add a header include guard just in case. Signed-off-by: Masahiro Yamada Signed-off-by: Miguel Ojeda drivers/auxdisplay/charlcd.h | 5 +++++ 1 file changed, 5 insertions(+) commit 75354284cc3aa58f7e54d479d9bee69bd2ca828f Author: Masahiro Yamada Date: Tue Aug 6 16:14:44 2019 +0900 auxdisplay: charlcd: move charlcd.h to drivers/auxdisplay This header is included in drivers/auxdisplay/. Make it a local header. Reviewed-by: Geert Uytterhoeven Signed-off-by: Masahiro Yamada Signed-off-by: Miguel Ojeda drivers/auxdisplay/charlcd.c | 2 +- {include/misc => drivers/auxdisplay}/charlcd.h | 0 drivers/auxdisplay/hd44780.c | 3 +-- drivers/auxdisplay/panel.c | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) commit 30e235389faadb9e3d918887b1f126155d7d761d Author: Jia He Date: Wed Aug 7 12:58:51 2019 +0800 arm64: mm: add missing PTE_SPECIAL in pte_mkdevmap on arm64 Without this patch, the MAP_SYNC test case will cause a print_bad_pte warning on arm64 as follows: [ 25.542693] BUG: Bad page map in process mapdax333 pte:2e8000448800f53 pmd:41ff5f003 [ 25.546360] page:ffff7e0010220000 refcount:1 mapcount:-1 mapping:ffff8003e29c7440 index:0x0 [ 25.550281] ext4_dax_aops [ 25.550282] name:"__aaabbbcccddd__" [ 25.551553] flags: 0x3ffff0000001002(referenced|reserved) [ 25.555802] raw: 03ffff0000001002 ffff8003dfffa908 0000000000000000 ffff8003e29c7440 [ 25.559446] raw: 0000000000000000 0000000000000000 00000001fffffffe 0000000000000000 [ 25.563075] page dumped because: bad pte [ 25.564938] addr:0000ffffbe05b000 vm_flags:208000fb anon_vma:0000000000000000 mapping:ffff8003e29c7440 index:0 [ 25.574272] file:__aaabbbcccddd__ fault:ext4_dax_fault mmmmap:ext4_file_mmap readpage:0x0 [ 25.578799] CPU: 1 PID: 1180 Comm: mapdax333 Not tainted 5.2.0+ #21 [ 25.581702] Hardware name: QEMU KVM Virtual Machine, BIOS 0.0.0 02/06/2015 [ 25.585624] Call trace: [ 25.587008] dump_backtrace+0x0/0x178 [ 25.588799] show_stack+0x24/0x30 [ 25.590328] dump_stack+0xa8/0xcc [ 25.591901] print_bad_pte+0x18c/0x218 [ 25.593628] unmap_page_range+0x778/0xc00 [ 25.595506] unmap_single_vma+0x94/0xe8 [ 25.597304] unmap_vmas+0x90/0x108 [ 25.598901] unmap_region+0xc0/0x128 [ 25.600566] __do_munmap+0x284/0x3f0 [ 25.602245] __vm_munmap+0x78/0xe0 [ 25.603820] __arm64_sys_munmap+0x34/0x48 [ 25.605709] el0_svc_common.constprop.0+0x78/0x168 [ 25.607956] el0_svc_handler+0x34/0x90 [ 25.609698] el0_svc+0x8/0xc [...] The root cause is in _vm_normal_page, without the PTE_SPECIAL bit, the return value will be incorrectly set to pfn_to_page(pfn) instead of NULL. Besides, this patch also rewrite the pmd_mkdevmap to avoid setting PTE_SPECIAL for pmd The MAP_SYNC test case is as follows(Provided by Yibo Cai) $#include $#include $#include $#include $#include $#ifndef MAP_SYNC $#define MAP_SYNC 0x80000 $#endif /* mount -o dax /dev/pmem0 /mnt */ $#define F "/mnt/__aaabbbcccddd__" int main(void) { int fd; char buf[4096]; void *addr; if ((fd = open(F, O_CREAT|O_TRUNC|O_RDWR, 0644)) < 0) { perror("open1"); return 1; } if (write(fd, buf, 4096) != 4096) { perror("lseek"); return 1; } addr = mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_SYNC, fd, 0); if (addr == MAP_FAILED) { perror("mmap"); printf("did you mount with '-o dax'?\n"); return 1; } memset(addr, 0x55, 4096); if (munmap(addr, 4096) == -1) { perror("munmap"); return 1; } close(fd); return 0; } Fixes: 73b20c84d42d ("arm64: mm: implement pte_devmap support") Reported-by: Yibo Cai Acked-by: Will Deacon Acked-by: Robin Murphy Signed-off-by: Jia He Signed-off-by: Catalin Marinas arch/arm64/include/asm/pgtable.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 518a1c2f091290219783d5624284c140544a261e Merge: ecb095bff5d4 ee9d66182392 Author: Linus Torvalds Date: Thu Aug 8 09:57:50 2019 -0700 Merge tag '5.3-rc3-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "Six small SMB3 fixes, two for stable" * tag '5.3-rc3-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6: SMB3: Kernel oops mounting a encryptData share with CONFIG_DEBUG_VIRTUAL smb3: update TODO list of missing features smb3: send CAP_DFS capability during session setup SMB3: Fix potential memory leak when processing compound chain SMB3: Fix deadlock in validate negotiate hits reconnect cifs: fix rmmod regression in cifs.ko caused by force_sig changes commit d0a255e795ab976481565f6ac178314b34fbf891 Author: Mikulas Patocka Date: Thu Aug 8 11:17:01 2019 -0400 loop: set PF_MEMALLOC_NOIO for the worker thread A deadlock with this stacktrace was observed. The loop thread does a GFP_KERNEL allocation, it calls into dm-bufio shrinker and the shrinker depends on I/O completion in the dm-bufio subsystem. In order to fix the deadlock (and other similar ones), we set the flag PF_MEMALLOC_NOIO at loop thread entry. PID: 474 TASK: ffff8813e11f4600 CPU: 10 COMMAND: "kswapd0" #0 [ffff8813dedfb938] __schedule at ffffffff8173f405 #1 [ffff8813dedfb990] schedule at ffffffff8173fa27 #2 [ffff8813dedfb9b0] schedule_timeout at ffffffff81742fec #3 [ffff8813dedfba60] io_schedule_timeout at ffffffff8173f186 #4 [ffff8813dedfbaa0] bit_wait_io at ffffffff8174034f #5 [ffff8813dedfbac0] __wait_on_bit at ffffffff8173fec8 #6 [ffff8813dedfbb10] out_of_line_wait_on_bit at ffffffff8173ff81 #7 [ffff8813dedfbb90] __make_buffer_clean at ffffffffa038736f [dm_bufio] #8 [ffff8813dedfbbb0] __try_evict_buffer at ffffffffa0387bb8 [dm_bufio] #9 [ffff8813dedfbbd0] dm_bufio_shrink_scan at ffffffffa0387cc3 [dm_bufio] #10 [ffff8813dedfbc40] shrink_slab at ffffffff811a87ce #11 [ffff8813dedfbd30] shrink_zone at ffffffff811ad778 #12 [ffff8813dedfbdc0] kswapd at ffffffff811ae92f #13 [ffff8813dedfbec0] kthread at ffffffff810a8428 #14 [ffff8813dedfbf50] ret_from_fork at ffffffff81745242 PID: 14127 TASK: ffff881455749c00 CPU: 11 COMMAND: "loop1" #0 [ffff88272f5af228] __schedule at ffffffff8173f405 #1 [ffff88272f5af280] schedule at ffffffff8173fa27 #2 [ffff88272f5af2a0] schedule_preempt_disabled at ffffffff8173fd5e #3 [ffff88272f5af2b0] __mutex_lock_slowpath at ffffffff81741fb5 #4 [ffff88272f5af330] mutex_lock at ffffffff81742133 #5 [ffff88272f5af350] dm_bufio_shrink_count at ffffffffa03865f9 [dm_bufio] #6 [ffff88272f5af380] shrink_slab at ffffffff811a86bd #7 [ffff88272f5af470] shrink_zone at ffffffff811ad778 #8 [ffff88272f5af500] do_try_to_free_pages at ffffffff811adb34 #9 [ffff88272f5af590] try_to_free_pages at ffffffff811adef8 #10 [ffff88272f5af610] __alloc_pages_nodemask at ffffffff811a09c3 #11 [ffff88272f5af710] alloc_pages_current at ffffffff811e8b71 #12 [ffff88272f5af760] new_slab at ffffffff811f4523 #13 [ffff88272f5af7b0] __slab_alloc at ffffffff8173a1b5 #14 [ffff88272f5af880] kmem_cache_alloc at ffffffff811f484b #15 [ffff88272f5af8d0] do_blockdev_direct_IO at ffffffff812535b3 #16 [ffff88272f5afb00] __blockdev_direct_IO at ffffffff81255dc3 #17 [ffff88272f5afb30] xfs_vm_direct_IO at ffffffffa01fe3fc [xfs] #18 [ffff88272f5afb90] generic_file_read_iter at ffffffff81198994 #19 [ffff88272f5afc50] __dta_xfs_file_read_iter_2398 at ffffffffa020c970 [xfs] #20 [ffff88272f5afcc0] lo_rw_aio at ffffffffa0377042 [loop] #21 [ffff88272f5afd70] loop_queue_work at ffffffffa0377c3b [loop] #22 [ffff88272f5afe60] kthread_worker_fn at ffffffff810a8a0c #23 [ffff88272f5afec0] kthread at ffffffff810a8428 #24 [ffff88272f5aff50] ret_from_fork at ffffffff81745242 Signed-off-by: Mikulas Patocka Cc: stable@vger.kernel.org Signed-off-by: Jens Axboe drivers/block/loop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 27709ae4e2fe6cf7da2ae45e718e190c5433342b Author: Thiébaud Weksteen Date: Tue Aug 6 13:00:50 2019 +0200 usb: setup authorized_default attributes using usb_bus_notify Currently, the authorized_default and interface_authorized_default attributes for HCD are set up after the uevent has been sent to userland. This creates a race condition where userland may fail to access this file when processing the event. Move the appending of these attributes earlier relying on the usb_bus_notify dispatcher. Signed-off-by: Thiébaud Weksteen Cc: stable Link: https://lore.kernel.org/r/20190806110050.38918-1-tweek@google.com Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hcd.c | 123 ----------------------------------------------- drivers/usb/core/sysfs.c | 121 ++++++++++++++++++++++++++++++++++++++++++++++ drivers/usb/core/usb.h | 5 ++ 3 files changed, 126 insertions(+), 123 deletions(-) commit e91455bad5cff40a8c232f2204a5104127e3fec2 Author: Jan Kara Date: Wed Aug 7 11:36:47 2019 +0200 bdev: Fixup error handling in blkdev_get() Commit 89e524c04fa9 ("loop: Fix mount(2) failure due to race with LOOP_SET_FD") converted blkdev_get() to use the new helpers for finishing claiming of a block device. However the conversion botched the error handling in blkdev_get() and thus the bdev has been marked as held even in case __blkdev_get() returned error. This led to occasional warnings with block/001 test from blktests like: kernel: WARNING: CPU: 5 PID: 907 at fs/block_dev.c:1899 __blkdev_put+0x396/0x3a0 Correct the error handling. CC: stable@vger.kernel.org Fixes: 89e524c04fa9 ("loop: Fix mount(2) failure due to race with LOOP_SET_FD") Signed-off-by: Jan Kara Signed-off-by: Jens Axboe fs/block_dev.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 39c71a5b8212f4b502d9a630c6706ac723abd422 Author: Jia-Ju Bai Date: Mon Jul 29 10:08:49 2019 +0800 dmaengine: stm32-mdma: Fix a possible null-pointer dereference in stm32_mdma_irq_handler() In stm32_mdma_irq_handler(), chan is checked on line 1368. When chan is NULL, it is still used on line 1369: dev_err(chan2dev(chan), "MDMA channel not initialized\n"); Thus, a possible null-pointer dereference may occur. To fix this bug, "dev_dbg(mdma2dev(dmadev), ...)" is used instead. Signed-off-by: Jia-Ju Bai Fixes: a4ffb13c8946 ("dmaengine: Add STM32 MDMA driver") Link: https://lore.kernel.org/r/20190729020849.17971-1-baijiaju1990@gmail.com Signed-off-by: Vinod Koul drivers/dma/stm32-mdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fd03177c33b287c6541f4048f1d67b7b45a1abc9 Author: Paolo Valente Date: Wed Aug 7 19:21:11 2019 +0200 block, bfq: handle NULL return value by bfq_init_rq() As reported in [1], the call bfq_init_rq(rq) may return NULL in case of OOM (in particular, if rq->elv.icq is NULL because memory allocation failed in failed in ioc_create_icq()). This commit handles this circumstance. [1] https://lkml.org/lkml/2019/7/22/824 Cc: Hsin-Yi Wang Cc: Nicolas Boichat Cc: Doug Anderson Reported-by: Guenter Roeck Reported-by: Hsin-Yi Wang Reviewed-by: Guenter Roeck Signed-off-by: Paolo Valente Signed-off-by: Jens Axboe block/bfq-iosched.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 3f758e844aa9800eb660d60ee10226fa802594d4 Author: Paolo Valente Date: Wed Aug 7 16:17:54 2019 +0200 block, bfq: move update of waker and woken list to queue freeing Since commit 13a857a4c4e8 ("block, bfq: detect wakers and unconditionally inject their I/O"), every bfq_queue has a pointer to a waker bfq_queue and a list of the bfq_queues it may wake. In this respect, when a bfq_queue, say Q, remains with no I/O source attached to it, Q cannot be woken by any other bfq_queue, and cannot wake any other bfq_queue. Then Q must be removed from the woken list of its possible waker bfq_queue, and all bfq_queues in the woken list of Q must stop having a waker bfq_queue. Q remains with no I/O source in two cases: when the last process associated with Q exits or when such a process gets associated with a different bfq_queue. Unfortunately, commit 13a857a4c4e8 ("block, bfq: detect wakers and unconditionally inject their I/O") performed the above updates only in the first case. This commit fixes this bug by moving these updates to when Q gets freed. This is a simple and safe way to handle all cases, as both the above events, process exit and re-association, lead to Q being freed soon, and because dangling references would come out only after Q gets freed (if no update were performed). Fixes: 13a857a4c4e8 ("block, bfq: detect wakers and unconditionally inject their I/O") Reported-by: Douglas Anderson Tested-by: Douglas Anderson Signed-off-by: Paolo Valente Signed-off-by: Jens Axboe block/bfq-iosched.c | 44 +++++++++++++++++++++++++++++--------------- 1 file changed, 29 insertions(+), 15 deletions(-) commit 08d383a74948b43eb6e96c86153e63cbf276f1fa Author: Paolo Valente Date: Wed Aug 7 16:17:53 2019 +0200 block, bfq: reset last_completed_rq_bfqq if the pointed queue is freed Since commit 13a857a4c4e8 ("block, bfq: detect wakers and unconditionally inject their I/O"), BFQ stores, in a per-device pointer last_completed_rq_bfqq, the last bfq_queue that had an I/O request completed. If some bfq_queue receives new I/O right after the last request of last_completed_rq_bfqq has been completed, then last_completed_rq_bfqq may be a waker bfq_queue. But if the bfq_queue last_completed_rq_bfqq points to is freed, then last_completed_rq_bfqq becomes a dangling reference. This commit resets last_completed_rq_bfqq if the pointed bfq_queue is freed. Fixes: 13a857a4c4e8 ("block, bfq: detect wakers and unconditionally inject their I/O") Reported-by: Douglas Anderson Tested-by: Douglas Anderson Signed-off-by: Paolo Valente Signed-off-by: Jens Axboe block/bfq-iosched.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 430380b4637aec646996b4aef67ad417593923b2 Author: He Zhe Date: Thu Aug 8 11:09:54 2019 +0800 block: aoe: Fix kernel crash due to atomic sleep when exiting Since commit 3582dd291788 ("aoe: convert aoeblk to blk-mq"), aoedev_downdev has had the possibility of sleeping and causing the following crash. BUG: scheduling while atomic: rmmod/2242/0x00000003 Modules linked in: aoe Preemption disabled at: [] flush+0x95/0x4a0 [aoe] CPU: 7 PID: 2242 Comm: rmmod Tainted: G I 5.2.3 #1 Hardware name: Intel Corporation S5520HC/S5520HC, BIOS S5500.86B.01.10.0025.030220091519 03/02/2009 Call Trace: dump_stack+0x4f/0x6a ? flush+0x95/0x4a0 [aoe] __schedule_bug.cold+0x44/0x54 __schedule+0x44f/0x680 schedule+0x44/0xd0 blk_mq_freeze_queue_wait+0x46/0xb0 ? wait_woken+0x80/0x80 blk_mq_freeze_queue+0x1b/0x20 aoedev_downdev+0x111/0x160 [aoe] flush+0xff/0x4a0 [aoe] aoedev_exit+0x23/0x30 [aoe] aoe_exit+0x35/0x948 [aoe] __se_sys_delete_module+0x183/0x210 __x64_sys_delete_module+0x16/0x20 do_syscall_64+0x4d/0x130 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f24e0043b07 Code: 73 01 c3 48 8b 0d 89 73 0b 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 b0 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 59 73 0b 00 f7 d8 64 89 01 48 RSP: 002b:00007ffe18f7f1e8 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f24e0043b07 RDX: 000000000000000a RSI: 0000000000000800 RDI: 0000555c3ecf87c8 RBP: 00007ffe18f7f1f0 R08: 0000000000000000 R09: 0000000000000000 R10: 00007f24e00b4ac0 R11: 0000000000000206 R12: 00007ffe18f7f238 R13: 00007ffe18f7f410 R14: 00007ffe18f80e73 R15: 0000555c3ecf8760 This patch, handling in the same way of pass two, unlocks the locks and restart pass one after aoedev_downdev is done. Fixes: 3582dd291788 ("aoe: convert aoeblk to blk-mq") Signed-off-by: He Zhe Signed-off-by: Jens Axboe drivers/block/aoe/aoedev.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 739bacbf7aa2c44bb25d9ad5f7d5b256082c5e66 Author: Vasily Gorbik Date: Mon Jan 21 13:54:53 2019 +0100 s390/build: use size command to perform empty .bss check Currently empty .bss checks performed do not pay attention to "common objects" in object files which end up in .bss section eventually. The "size" tool is a part of binutils and since version 2.18 provides "--common" command line option, which allows to account "common objects" sizes in .bss section size. Utilize "size --common" to perform accurate check that .bss section is unused. Besides that the size tool handles object files without .bss section gracefully and doesn't require additional objdump run. The linux kernel requires binutils 2.20 since 4.13. Kbuild exports OBJSIZE to reference the right size tool. Link: http://lkml.kernel.org/r/patch-2.thread-2257a1.git-2257a1c53d4a.your-ad-here.call-01565088755-ext-5120@work.hours Reported-and-tested-by: Heiko Carstens Acked-by: Heiko Carstens Signed-off-by: Vasily Gorbik arch/s390/scripts/Makefile.chkbss | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7bac98707f65b93bf994ef4e99b1eb9e7dbb9c32 Author: Vasily Gorbik Date: Mon Jan 21 13:54:39 2019 +0100 kbuild: add OBJSIZE variable for the size tool Define and export OBJSIZE variable for "size" tool from binutils to be used in architecture specific Makefiles (naming the variable just "SIZE" would be too risky). In particular this tool is useful to perform checks that early boot code is not using bss section (which might have not been zeroed yet or intersects with initrd or other files boot loader might have put right after the linux kernel). Link: http://lkml.kernel.org/r/patch-1.thread-2257a1.git-188f5a3d81d5.your-ad-here.call-01565088755-ext-5120@work.hours Acked-by: Masahiro Yamada Signed-off-by: Vasily Gorbik Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 6cf9481b440da6d6d86bd8e4c99a8b553b9d1271 Author: Hans de Goede Date: Tue Jul 30 17:48:48 2019 +0200 pwm: Fallback to the static lookup-list when acpi_pwm_get fails Commit 4a6ef8e37c4d ("pwm: Add support referencing PWMs from ACPI") made pwm_get unconditionally return the acpi_pwm_get return value if the device passed to pwm_get has an ACPI fwnode. But even if the passed in device has an ACPI fwnode, it does not necessarily have the necessary ACPI package defining its pwm bindings, especially since the binding / API of this ACPI package has only been introduced very recently. Up until now X86/ACPI devices which use a separate pwm controller for controlling their LCD screen's backlight brightness have been relying on the static lookup-list to get their pwm. pwm_get unconditionally returning the acpi_pwm_get return value breaks this, breaking backlight control on these devices. This commit fixes this by making pwm_get fall back to the static lookup-list if acpi_pwm_get returns -ENOENT. BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=96571 Reported-by: youling257@gmail.com Fixes: 4a6ef8e37c4d ("pwm: Add support referencing PWMs from ACPI") Cc: Nikolaus Voss Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Acked-by: Nikolaus Voss Signed-off-by: Thierry Reding drivers/pwm/core.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit c468a8aa790e0dfe0a7f8a39db282d39c2c00b46 Author: Oliver Neukum Date: Thu Aug 8 11:27:28 2019 +0200 usb: iowarrior: fix deadlock on disconnect We have to drop the mutex before we close() upon disconnect() as close() needs the lock. This is safe to do by dropping the mutex as intfdata is already set to NULL, so open() will fail. Fixes: 03f36e885fc26 ("USB: open disconnect race in iowarrior") Reported-by: syzbot+a64a382964bf6c71a9c0@syzkaller.appspotmail.com Cc: stable Signed-off-by: Oliver Neukum Link: https://lore.kernel.org/r/20190808092728.23417-1-oneukum@suse.com Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/iowarrior.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 2ca359f4f8b954b3a9d15a89f22a8b7283e7669f Author: Oliver Neukum Date: Thu Aug 8 11:28:54 2019 +0200 Revert "USB: rio500: simplify locking" This reverts commit d710734b06770814de2bfa2819420fb5df7f3a81. This simplification causes a deadlock. Reported-by: syzbot+7bbcbe9c9ff0cd49592a@syzkaller.appspotmail.com Fixes: d710734b0677 ("USB: rio500: simplify locking") Cc: stable Signed-off-by: Oliver Neukum Link: https://lore.kernel.org/r/20190808092854.23519-1-oneukum@suse.com Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/rio500.c | 43 +++++++++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 16 deletions(-) commit 6b7c3b86f0b63134b2ab56508921a0853ffa687a Author: Colin Ian King Date: Mon Jun 24 09:39:59 2019 -0700 drm/vmwgfx: fix memory leak when too many retries have occurred Currently when too many retries have occurred there is a memory leak on the allocation for reply on the error return path. Fix this by kfree'ing reply before returning. Addresses-Coverity: ("Resource leak") Fixes: a9cd9c044aa9 ("drm/vmwgfx: Add a check to handle host message failure") Signed-off-by: Colin Ian King Reviewed-by: Deepak Rawat Signed-off-by: Deepak Rawat Signed-off-by: Thomas Hellstrom drivers/gpu/drm/vmwgfx/vmwgfx_msg.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 1be3c1fae6c1e1f5bb982b255d2034034454527a Author: Wenwen Wang Date: Thu Aug 8 00:50:58 2019 -0500 ALSA: firewire: fix a memory leak bug In iso_packets_buffer_init(), 'b->packets' is allocated through kmalloc_array(). Then, the aligned packet size is checked. If it is larger than PAGE_SIZE, -EINVAL will be returned to indicate the error. However, the allocated 'b->packets' is not deallocated on this path, leading to a memory leak. To fix the above issue, free 'b->packets' before returning the error code. Fixes: 31ef9134eb52 ("ALSA: add LaCie FireWire Speakers/Griffin FireWave Surround driver") Signed-off-by: Wenwen Wang Reviewed-by: Takashi Sakamoto Cc: # v2.6.39+ Signed-off-by: Takashi Iwai sound/firewire/packets-buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 491beed3b102b6e6c0e7734200661242226e3933 Author: Ming Lei Date: Mon Aug 5 09:19:06 2019 +0800 genirq/affinity: Create affinity mask for single vector Since commit c66d4bd110a1f8 ("genirq/affinity: Add new callback for (re)calculating interrupt sets"), irq_create_affinity_masks() returns NULL in case of single vector. This change has caused regression on some drivers, such as lpfc. The problem is that single vector requests can happen in some generic cases: 1) kdump kernel 2) irq vectors resource is close to exhaustion. If in that situation the affinity mask for a single vector is not created, every caller has to handle the special case. There is no reason why the mask cannot be created, so remove the check for a single vector and create the mask. Fixes: c66d4bd110a1f8 ("genirq/affinity: Add new callback for (re)calculating interrupt sets") Signed-off-by: Ming Lei Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20190805011906.5020-1-ming.lei@redhat.com kernel/irq/affinity.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 8097c43bcbec56fbd0788d99e1e236c0e0d4013f Author: Greg Kroah-Hartman Date: Thu Aug 8 08:39:35 2019 +0200 Revert "kernfs: fix memleak in kernel_ops_readdir()" This reverts commit cc798c83898ea0a77fcaa1a92afda35c3c3ded74. Tony writes: Somehow this causes a regression in Linux next for me where I'm seeing lots of sysfs entries now missing under /sys/bus/platform/devices. For example, I now only see one .serial entry show up in sysfs. Things work again if I revert commit cc798c83898e ("kernfs: fix memleak inkernel_ops_readdir()"). Any ideas why that would be? Tejun says: Ugh, you're right. It can get double-put cuz ctx->pos is put by release too. So reverting it for now. Reported-by: Tony Lindgren Cc: Andrea Arcangeli Cc: Tejun Heo Fixes: cc798c83898e ("kernfs: fix memleak in kernel_ops_readdir()") Cc: stable Signed-off-by: Greg Kroah-Hartman fs/kernfs/dir.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 04f5bda84b0712d6f172556a7e8dca9ded5e73b9 Author: Valdis Klētnieks Date: Wed Aug 7 23:27:17 2019 -0400 x86/lib/cpu: Address missing prototypes warning When building with W=1, warnings about missing prototypes are emitted: CC arch/x86/lib/cpu.o arch/x86/lib/cpu.c:5:14: warning: no previous prototype for 'x86_family' [-Wmissing-prototypes] 5 | unsigned int x86_family(unsigned int sig) | ^~~~~~~~~~ arch/x86/lib/cpu.c:18:14: warning: no previous prototype for 'x86_model' [-Wmissing-prototypes] 18 | unsigned int x86_model(unsigned int sig) | ^~~~~~~~~ arch/x86/lib/cpu.c:33:14: warning: no previous prototype for 'x86_stepping' [-Wmissing-prototypes] 33 | unsigned int x86_stepping(unsigned int sig) | ^~~~~~~~~~~~ Add the proper include file so the prototypes are there. Signed-off-by: Valdis Kletnieks Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/42513.1565234837@turing-police arch/x86/lib/cpu.c | 1 + 1 file changed, 1 insertion(+) commit b059f801a937d164e03b33c1848bb3dca67c0b04 Author: Nick Desaulniers Date: Wed Aug 7 15:15:33 2019 -0700 x86/purgatory: Use CFLAGS_REMOVE rather than reset KBUILD_CFLAGS KBUILD_CFLAGS is very carefully built up in the top level Makefile, particularly when cross compiling or using different build tools. Resetting KBUILD_CFLAGS via := assignment is an antipattern. The comment above the reset mentions that -pg is problematic. Other Makefiles use `CFLAGS_REMOVE_file.o = $(CC_FLAGS_FTRACE)` when CONFIG_FUNCTION_TRACER is set. Prefer that pattern to wiping out all of the important KBUILD_CFLAGS then manually having to re-add them. Seems also that __stack_chk_fail references are generated when using CONFIG_STACKPROTECTOR or CONFIG_STACKPROTECTOR_STRONG. Fixes: 8fc5b4d4121c ("purgatory: core purgatory functionality") Reported-by: Vaibhav Rustagi Suggested-by: Peter Zijlstra Suggested-by: Thomas Gleixner Signed-off-by: Nick Desaulniers Signed-off-by: Thomas Gleixner Tested-by: Vaibhav Rustagi Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20190807221539.94583-2-ndesaulniers@google.com arch/x86/purgatory/Makefile | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) commit 4ce97317f41d38584fb93578e922fcd19e535f5b Author: Nick Desaulniers Date: Wed Aug 7 15:15:32 2019 -0700 x86/purgatory: Do not use __builtin_memcpy and __builtin_memset Implementing memcpy and memset in terms of __builtin_memcpy and __builtin_memset is problematic. GCC at -O2 will replace calls to the builtins with calls to memcpy and memset (but will generate an inline implementation at -Os). Clang will replace the builtins with these calls regardless of optimization level. $ llvm-objdump -dr arch/x86/purgatory/string.o | tail 0000000000000339 memcpy: 339: 48 b8 00 00 00 00 00 00 00 00 movabsq $0, %rax 000000000000033b: R_X86_64_64 memcpy 343: ff e0 jmpq *%rax 0000000000000345 memset: 345: 48 b8 00 00 00 00 00 00 00 00 movabsq $0, %rax 0000000000000347: R_X86_64_64 memset 34f: ff e0 Such code results in infinite recursion at runtime. This is observed when doing kexec. Instead, reuse an implementation from arch/x86/boot/compressed/string.c. This requires to implement a stub function for warn(). Also, Clang may lower memcmp's that compare against 0 to bcmp's, so add a small definition, too. See also: commit 5f074f3e192f ("lib/string.c: implement a basic bcmp") Fixes: 8fc5b4d4121c ("purgatory: core purgatory functionality") Reported-by: Vaibhav Rustagi Debugged-by: Vaibhav Rustagi Debugged-by: Manoj Gupta Suggested-by: Alistair Delva Signed-off-by: Nick Desaulniers Signed-off-by: Thomas Gleixner Tested-by: Vaibhav Rustagi Cc: stable@vger.kernel.org Link: https://bugs.chromium.org/p/chromium/issues/detail?id=984056 Link: https://lkml.kernel.org/r/20190807221539.94583-1-ndesaulniers@google.com arch/x86/boot/string.c | 8 ++++++++ arch/x86/purgatory/Makefile | 3 +++ arch/x86/purgatory/purgatory.c | 6 ++++++ arch/x86/purgatory/string.c | 23 ----------------------- 4 files changed, 17 insertions(+), 23 deletions(-) commit c7cd7c748a3250ca33509f9235efab9c803aca09 Author: Wenwen Wang Date: Thu Aug 8 00:15:21 2019 -0500 sound: fix a memory leak bug In sound_insert_unit(), the controlling structure 's' is allocated through kmalloc(). Then it is added to the sound driver list by invoking __sound_insert_unit(). Later on, if __register_chrdev() fails, 's' is removed from the list through __sound_remove_unit(). If 'index' is not less than 0, -EBUSY is returned to indicate the error. However, 's' is not deallocated on this execution path, leading to a memory leak bug. To fix the above issue, free 's' before -EBUSY is returned. Signed-off-by: Wenwen Wang Cc: Signed-off-by: Takashi Iwai sound/sound_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f536579c148249505b388d525ac1866e080fd66a Merge: abffedaaa770 4b3e30ed3ec7 Author: Dave Airlie Date: Thu Aug 8 13:25:49 2019 +1000 Merge tag 'drm-fixes-5.3-2019-08-07' of git://people.freedesktop.org/~agd5f/linux into drm-fixes drm-fixes-5.3-2019-08-07: amdgpu: - Fixes VCN to handle the latest navi10 firmware - Fixes for fan control on navi10 - Properly handle SMU metrics table on navi10 - Fix a resume regression on Stoney amdkfd: - Revert new GWS ioctl. It's not ready. Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20190807184221.3323-1-alexander.deucher@amd.com commit abffedaaa7702d1194934169fe65553804a2b064 Merge: e21a712a9685 2a6fc3cb5cb6 Author: Dave Airlie Date: Thu Aug 8 13:21:46 2019 +1000 Merge tag 'drm/tegra/for-5.3-rc4' of git://anongit.freedesktop.org/tegra/linux into drm-fixes drm/tegra: Fixes for v5.3-rc4 This contains a single fix for a regression introduced by a combination of a GPIO and a drm/tegra patch merged in v5.3-rc1. Signed-off-by: Dave Airlie From: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20190807140634.29166-1-thierry.reding@gmail.com commit a86c71ba3022331f79662d7f12d1b25188c7e377 Author: James Smart Date: Fri Aug 2 13:26:12 2019 -0700 scsi: lpfc: Fix crash when cpu count is 1 and null irq affinity mask When a configurations runs with a single cpu (such as a kdump kernel), which causes the driver to request a single vector, when the driver subsequently requests an irq affinity mask, the mask comes back null. The driver currently does nothing in this scenario, which leaves mappings to hardware queues incomplete and crashes the system. Fix by recognizing the null mask and assigning the vector to the first cpu in the system. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_init.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) commit ecb095bff5d4b8711a81968625b3b4a235d3e477 Merge: 33920f1ec5bf a95a4f3f2702 Author: Linus Torvalds Date: Wed Aug 7 15:06:31 2019 -0700 Merge tag 'hwmon-for-v5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fixes from Guenter Roeck: "Fixes to lm75 and nct7802 drivers In the lm75 driver, fix TMP75B chip description to ensure correct initialization. In the nct7802 driver, fix in4 presence detection" * tag 'hwmon-for-v5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (lm75) Fixup tmp75b clr_mask hwmon: (nct7802) Fix wrong detection of in4 presence commit a95a4f3f2702b55a89393bf0f1b2b3d79e0f7da2 Author: Iker Perez del Palomar Sustatxa Date: Thu Aug 1 08:53:24 2019 +0100 hwmon: (lm75) Fixup tmp75b clr_mask The configuration register of the tmp75b sensor is 16bit long, however the first byte is reserved, so there is not no need to take care of it. Because the order of the bytes is little endian and it is only necessary to write one byte, the desired bits must be shifted into a 8 bit range. Fixes: 39abe9d88b30 ("hwmon: (lm75) Add support for TMP75B") Cc: stable@vger.kernel.org Signed-off-by: Iker Perez del Palomar Sustatxa Link: https://lore.kernel.org/r/20190801075324.4638-1-iker.perez@codethink.co.uk Signed-off-by: Guenter Roeck drivers/hwmon/lm75.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 38ada2f406a9b81fb1249c5c9227fa657e7d5671 Author: Guenter Roeck Date: Fri Jul 26 08:00:49 2019 -0700 hwmon: (nct7802) Fix wrong detection of in4 presence The code to detect if in4 is present is wrong; if in4 is not present, the in4_input sysfs attribute is still present. In detail: - Ihen RTD3_MD=11 (VSEN3 present), everything is as expected (no bug). - If we have RTD3_MD!=11 (no VSEN3), we unexpectedly have a in4_input file under /sys and the "sensors" command displays in4_input. But as expected, we have no in4_min, in4_max, in4_alarm, in4_beep. Fix is_visible function to detect and report in4_input visibility as expected. Reported-by: Gilles Buloz Cc: Gilles Buloz Cc: stable@vger.kernel.org Fixes: 3434f37835804 ("hwmon: Driver for Nuvoton NCT7802Y") Signed-off-by: Guenter Roeck drivers/hwmon/nct7802.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e7e6c6320c8c9ed923250cd019e5f9ca0f59b4b8 Author: Dan Carpenter Date: Wed Aug 7 15:32:36 2019 +0300 IB/mlx5: Check the correct variable in error handling code The code accidentally checks "event_sub" instead of "event_sub->eventfd". Fixes: 759738537142 ("IB/mlx5: Enable subscription for device events over DEVX") Signed-off-by: Dan Carpenter Reviewed-by: Jason Gunthorpe Acked-by: Leon Romanovsky Link: https://lore.kernel.org/r/20190807123236.GA11452@mwanda Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/devx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d97de8887a12c598abc4d2e4e57a54c1f030e112 Author: Mark Zhang Date: Wed Aug 7 13:18:19 2019 +0300 RDMA/counter: Prevent QP counter binding if counters unsupported In case of rdma_counter_init() fails, counter allocation and QP bind should not be allowed. Fixes: 413d3347503b ("RDMA/counter: Add set/clear per-port auto mode support") Fixes: 1bd8e0a9d0fd ("RDMA/counter: Allow manual mode configuration support") Signed-off-by: Mark Zhang Reviewed-by: Parav Pandit Signed-off-by: Leon Romanovsky Link: https://lore.kernel.org/r/20190807101819.7581-1-leon@kernel.org Signed-off-by: Doug Ledford drivers/infiniband/core/counters.c | 6 ++++++ 1 file changed, 6 insertions(+) commit f591822c3cf314442819486f45ff7dc1f690e0c0 Author: Yishai Hadas Date: Mon Aug 5 11:30:10 2019 +0300 IB/mlx5: Fix implicit MR release flow Once implicit MR is being called to be released by ib_umem_notifier_release() its leaves were marked as "dying". However, when dereg_mr()->mlx5_ib_free_implicit_mr()->mr_leaf_free() is called, it skips running the mr_leaf_free_action (i.e. umem_odp->work) when those leaves were marked as "dying". As such ib_umem_release() for the leaves won't be called and their MRs will be leaked as well. When an application exits/killed without calling dereg_mr we might hit the above flow. This fatal scenario is reported by WARN_ON() upon mlx5_ib_dealloc_ucontext() as ibcontext->per_mm_list is not empty, the call trace can be seen below. Originally the "dying" mark as part of ib_umem_notifier_release() was introduced to prevent pagefault_mr() from returning a success response once this happened. However, we already have today the completion mechanism so no need for that in those flows any more. Even in case a success response will be returned the firmware will not find the pages and an error will be returned in the following call as a released mm will cause ib_umem_odp_map_dma_pages() to permanently fail mmget_not_zero(). Fix the above issue by dropping the "dying" from the above flows. The other flows that are using "dying" are still needed it for their synchronization purposes. WARNING: CPU: 1 PID: 7218 at drivers/infiniband/hw/mlx5/main.c:2004 mlx5_ib_dealloc_ucontext+0x84/0x90 [mlx5_ib] CPU: 1 PID: 7218 Comm: ibv_rc_pingpong Tainted: G E 5.2.0-rc6+ #13 Call Trace: uverbs_destroy_ufile_hw+0xb5/0x120 [ib_uverbs] ib_uverbs_close+0x1f/0x80 [ib_uverbs] __fput+0xbe/0x250 task_work_run+0x88/0xa0 do_exit+0x2cb/0xc30 ? __fput+0x14b/0x250 do_group_exit+0x39/0xb0 get_signal+0x191/0x920 ? _raw_spin_unlock_bh+0xa/0x20 ? inet_csk_accept+0x229/0x2f0 do_signal+0x36/0x5e0 ? put_unused_fd+0x5b/0x70 ? __sys_accept4+0x1a6/0x1e0 ? inet_hash+0x35/0x40 ? release_sock+0x43/0x90 ? _raw_spin_unlock_bh+0xa/0x20 ? inet_listen+0x9f/0x120 exit_to_usermode_loop+0x5c/0xc6 do_syscall_64+0x182/0x1b0 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: 81713d3788d2 ("IB/mlx5: Add implicit MR support") Link: https://lore.kernel.org/r/20190805083010.21777-1-leon@kernel.org Signed-off-by: Yishai Hadas Reviewed-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe drivers/infiniband/core/umem_odp.c | 4 ---- drivers/infiniband/hw/mlx5/odp.c | 24 +++++++++--------------- 2 files changed, 9 insertions(+), 19 deletions(-) commit 752ead44491e8c91e14d7079625c5916b30921c5 Author: Jens Axboe Date: Wed Aug 7 12:23:57 2019 -0600 libata: add SG safety checks in SFF pio transfers Abort processing of a command if we run out of mapped data in the SG list. This should never happen, but a previous bug caused it to be possible. Play it safe and attempt to abort nicely if we don't have more SG segments left. Reviewed-by: Kees Cook Signed-off-by: Jens Axboe drivers/ata/libata-sff.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 2d7271501720038381d45fb3dcbe4831228fc8cc Author: Jens Axboe Date: Wed Aug 7 12:20:52 2019 -0600 libata: have ata_scsi_rw_xlat() fail invalid passthrough requests For passthrough requests, libata-scsi takes what the user passes in as gospel. This can be problematic if the user fills in the CDB incorrectly. One example of that is in request sizes. For read/write commands, the CDB contains fields describing the transfer length of the request. These should match with the SG_IO header fields, but libata-scsi currently does no validation of that. Check that the number of blocks in the CDB for passthrough requests matches what was mapped into the request. If the CDB asks for more data then the validated SG_IO header fields, error it. Reported-by: Krishna Ram Prakash R Reviewed-by: Kees Cook Signed-off-by: Jens Axboe drivers/ata/libata-scsi.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit e15c2ffa1091c4f72370f01af4de8f9dddeb17a6 Author: Jens Axboe Date: Tue Aug 6 13:34:31 2019 -0600 block: fix O_DIRECT error handling for bio fragments 0eb6ddfb865c tried to fix this up, but introduced a use-after-free of dio. Additionally, we still had an issue with error handling, as reported by Darrick: "I noticed a regression in xfs/747 (an unreleased xfstest for the xfs_scrub media scanning feature) on 5.3-rc3. I'll condense that down to a simpler reproducer: error-test: 0 209 linear 8:48 0 error-test: 209 1 error error-test: 210 6446894 linear 8:48 210 Basically we have a ~3G /dev/sdd and we set up device mapper to fail IO for sector 209 and to pass the io to the scsi device everywhere else. On 5.3-rc3, performing a directio pread of this range with a < 1M buffer (in other words, a request for fewer than MAX_BIO_PAGES bytes) yields EIO like you'd expect: pread64(3, 0x7f880e1c7000, 1048576, 0) = -1 EIO (Input/output error) pread: Input/output error +++ exited with 0 +++ But doing it with a larger buffer succeeds(!): pread64(3, "XFSB\0\0\20\0\0\0\0\0\0\fL\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1146880, 0) = 1146880 read 1146880/1146880 bytes at offset 0 1 MiB, 1 ops; 0.0009 sec (1.124 GiB/sec and 1052.6316 ops/sec) +++ exited with 0 +++ (Note that the part of the buffer corresponding to the dm-error area is uninitialized) On 5.3-rc2, both commands would fail with EIO like you'd expect. The only change between rc2 and rc3 is commit 0eb6ddfb865c ("block: Fix __blkdev_direct_IO() for bio fragments"). AFAICT we end up in __blkdev_direct_IO with a 1120K buffer, which gets split into two bios: one for the first BIO_MAX_PAGES worth of data (1MB) and a second one for the 96k after that." Fix this by noting that it's always safe to dereference dio if we get BLK_QC_T_EAGAIN returned, as end_io hasn't been run for that case. So we can safely increment the dio size before calling submit_bio(), and then decrement it on failure (not that it really matters, as the bio and dio are going away). For error handling, return to the original method of just using 'ret' for tracking the error, and the size tracking in dio->size. Fixes: 0eb6ddfb865c ("block: Fix __blkdev_direct_IO() for bio fragments") Fixes: 6a43074e2f46 ("block: properly handle IOCB_NOWAIT for async O_DIRECT IO") Reported-by: Darrick J. Wong Signed-off-by: Jens Axboe fs/block_dev.c | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) commit 67e7b52d44e3d539dfbfcd866c3d3d69da23a909 Author: Trond Myklebust Date: Wed Aug 7 07:31:27 2019 -0400 NFSv4: Ensure state recovery handles ETIMEDOUT correctly Ensure that the state recovery code handles ETIMEDOUT correctly, and also that we set RPC_TASK_TIMEOUT when recovering open state. Signed-off-by: Trond Myklebust fs/nfs/nfs4proc.c | 2 ++ fs/nfs/nfs4state.c | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) commit 4b3e30ed3ec7864e798403a63ff2e96bd0c19ab0 Author: Alex Deucher Date: Wed Aug 7 00:23:07 2019 -0500 Revert "drm/amdkfd: New IOCTL to allocate queue GWS" This reverts commit 1a058c3376765ee31d65e28cbbb9d4ff15120056. This interface is still in too much flux. Revert until it's sorted out. Acked-by: Oak Zeng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 28 ---------------------------- include/uapi/linux/kfd_ioctl.h | 20 +------------------- 2 files changed, 1 insertion(+), 47 deletions(-) commit 07301df7d2fc220d3de5f7ad804dcb941400cb00 Author: Qu Wenruo Date: Tue May 28 16:21:54 2019 +0800 btrfs: trim: Check the range passed into to prevent overflow Normally the range->len is set to default value (U64_MAX), but when it's not default value, we should check if the range overflows. And if it overflows, return -EINVAL before doing anything. Reviewed-by: Nikolay Borisov Reviewed-by: Anand Jain Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit d7cd4dd907c19c0295829c947d79afa290b6fc24 Author: Filipe Manana Date: Wed Aug 7 11:21:46 2019 +0100 Btrfs: fix sysfs warning and missing raid sysfs directories In the 5.3 merge window, commit 7c7e301406d0a9 ("btrfs: sysfs: Replace default_attrs in ktypes with groups"), we started using the member "defaults_groups" for the kobject type "btrfs_raid_ktype". That leads to a series of warnings when running some test cases of fstests, such as btrfs/027, btrfs/124 and btrfs/176. The traces produced by those warnings are like the following: [116648.059212] kernfs: can not remove 'total_bytes', no directory [116648.060112] WARNING: CPU: 3 PID: 28500 at fs/kernfs/dir.c:1504 kernfs_remove_by_name_ns+0x75/0x80 (...) [116648.066482] CPU: 3 PID: 28500 Comm: umount Tainted: G W 5.3.0-rc3-btrfs-next-54 #1 (...) [116648.069376] RIP: 0010:kernfs_remove_by_name_ns+0x75/0x80 (...) [116648.072385] RSP: 0018:ffffabfd0090bd08 EFLAGS: 00010282 [116648.073437] RAX: 0000000000000000 RBX: ffffffffc0c11998 RCX: 0000000000000000 [116648.074201] RDX: ffff9fff603a7a00 RSI: ffff9fff603978a8 RDI: ffff9fff603978a8 [116648.074956] RBP: ffffffffc0b9ca2f R08: 0000000000000000 R09: 0000000000000001 [116648.075708] R10: ffff9ffe1f72e1c0 R11: 0000000000000000 R12: ffffffffc0b94120 [116648.076434] R13: ffffffffb3d9b4e0 R14: 0000000000000000 R15: dead000000000100 [116648.077143] FS: 00007f9cdc78a2c0(0000) GS:ffff9fff60380000(0000) knlGS:0000000000000000 [116648.077852] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [116648.078546] CR2: 00007f9fc4747ab4 CR3: 00000005c7832003 CR4: 00000000003606e0 [116648.079235] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [116648.079907] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [116648.080585] Call Trace: [116648.081262] remove_files+0x31/0x70 [116648.081929] sysfs_remove_group+0x38/0x80 [116648.082596] sysfs_remove_groups+0x34/0x70 [116648.083258] kobject_del+0x20/0x60 [116648.083933] btrfs_free_block_groups+0x405/0x430 [btrfs] [116648.084608] close_ctree+0x19a/0x380 [btrfs] [116648.085278] generic_shutdown_super+0x6c/0x110 [116648.085951] kill_anon_super+0xe/0x30 [116648.086621] btrfs_kill_super+0x12/0xa0 [btrfs] [116648.087289] deactivate_locked_super+0x3a/0x70 [116648.087956] cleanup_mnt+0xb4/0x160 [116648.088620] task_work_run+0x7e/0xc0 [116648.089285] exit_to_usermode_loop+0xfa/0x100 [116648.089933] do_syscall_64+0x1cb/0x220 [116648.090567] entry_SYSCALL_64_after_hwframe+0x49/0xbe [116648.091197] RIP: 0033:0x7f9cdc073b37 (...) [116648.100046] ---[ end trace 22e24db328ccadf8 ]--- [116648.100618] ------------[ cut here ]------------ [116648.101175] kernfs: can not remove 'used_bytes', no directory [116648.101731] WARNING: CPU: 3 PID: 28500 at fs/kernfs/dir.c:1504 kernfs_remove_by_name_ns+0x75/0x80 (...) [116648.105649] CPU: 3 PID: 28500 Comm: umount Tainted: G W 5.3.0-rc3-btrfs-next-54 #1 (...) [116648.107461] RIP: 0010:kernfs_remove_by_name_ns+0x75/0x80 (...) [116648.109336] RSP: 0018:ffffabfd0090bd08 EFLAGS: 00010282 [116648.109979] RAX: 0000000000000000 RBX: ffffffffc0c119a0 RCX: 0000000000000000 [116648.110625] RDX: ffff9fff603a7a00 RSI: ffff9fff603978a8 RDI: ffff9fff603978a8 [116648.111283] RBP: ffffffffc0b9ca41 R08: 0000000000000000 R09: 0000000000000001 [116648.111940] R10: ffff9ffe1f72e1c0 R11: 0000000000000000 R12: ffffffffc0b94120 [116648.112603] R13: ffffffffb3d9b4e0 R14: 0000000000000000 R15: dead000000000100 [116648.113268] FS: 00007f9cdc78a2c0(0000) GS:ffff9fff60380000(0000) knlGS:0000000000000000 [116648.113939] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [116648.114607] CR2: 00007f9fc4747ab4 CR3: 00000005c7832003 CR4: 00000000003606e0 [116648.115286] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [116648.115966] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [116648.116649] Call Trace: [116648.117326] remove_files+0x31/0x70 [116648.117997] sysfs_remove_group+0x38/0x80 [116648.118671] sysfs_remove_groups+0x34/0x70 [116648.119342] kobject_del+0x20/0x60 [116648.120022] btrfs_free_block_groups+0x405/0x430 [btrfs] [116648.120707] close_ctree+0x19a/0x380 [btrfs] [116648.121396] generic_shutdown_super+0x6c/0x110 [116648.122057] kill_anon_super+0xe/0x30 [116648.122702] btrfs_kill_super+0x12/0xa0 [btrfs] [116648.123335] deactivate_locked_super+0x3a/0x70 [116648.123961] cleanup_mnt+0xb4/0x160 [116648.124586] task_work_run+0x7e/0xc0 [116648.125210] exit_to_usermode_loop+0xfa/0x100 [116648.125830] do_syscall_64+0x1cb/0x220 [116648.126463] entry_SYSCALL_64_after_hwframe+0x49/0xbe [116648.127080] RIP: 0033:0x7f9cdc073b37 (...) [116648.135923] ---[ end trace 22e24db328ccadf9 ]--- These happen because, during the unmount path, we call kobject_del() for raid kobjects that are not fully initialized, meaning that we set their ktype (as btrfs_raid_ktype) through link_block_group() but we didn't set their parent kobject, which is done through btrfs_add_raid_kobjects(). We have this split raid kobject setup since commit 75cb379d263521 ("btrfs: defer adding raid type kobject until after chunk relocation") in order to avoid triggering reclaim during contextes where we can not (either we are holding a transaction handle or some lock required by the transaction commit path), so that we do the calls to kobject_add(), which triggers GFP_KERNEL allocations, through btrfs_add_raid_kobjects() in contextes where it is safe to trigger reclaim. That change expected that a new raid kobject can only be created either when mounting the filesystem or after raid profile conversion through the relocation path. However, we can have new raid kobject created in other two cases at least: 1) During device replace (or scrub) after adding a device a to the filesystem. The replace procedure (and scrub) do calls to btrfs_inc_block_group_ro() which can allocate a new block group with a new raid profile (because we now have more devices). This can be triggered by test cases btrfs/027 and btrfs/176. 2) During a degraded mount trough any write path. This can be triggered by test case btrfs/124. Fixing this by adding extra calls to btrfs_add_raid_kobjects(), not only makes things more complex and fragile, can also introduce deadlocks with reclaim the following way: 1) Calling btrfs_add_raid_kobjects() at btrfs_inc_block_group_ro() or anywhere in the replace/scrub path will cause a deadlock with reclaim because if reclaim happens and a transaction commit is triggered, the transaction commit path will block at btrfs_scrub_pause(). 2) During degraded mounts it is essentially impossible to figure out where to add extra calls to btrfs_add_raid_kobjects(), because allocation of a block group with a new raid profile can happen anywhere, which means we can't safely figure out which contextes are safe for reclaim, as we can either hold a transaction handle or some lock needed by the transaction commit path. So it is too complex and error prone to have this split setup of raid kobjects. So fix the issue by consolidating the setup of the kobjects in a single place, at link_block_group(), and setup a nofs context there in order to prevent reclaim being triggered by the memory allocations done through the call chain of kobject_add(). Besides fixing the sysfs warnings during kobject_del(), this also ensures the sysfs directories for the new raid profiles end up created and visible to users (a bug that existed before the 5.3 commit 7c7e301406d0a9 ("btrfs: sysfs: Replace default_attrs in ktypes with groups")). Fixes: 75cb379d263521 ("btrfs: defer adding raid type kobject until after chunk relocation") Fixes: 7c7e301406d0a9 ("btrfs: sysfs: Replace default_attrs in ktypes with groups") Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 4 ---- fs/btrfs/disk-io.c | 2 -- fs/btrfs/extent-tree.c | 57 +++++++++++++++++++++----------------------------- fs/btrfs/volumes.c | 13 ------------ 4 files changed, 24 insertions(+), 52 deletions(-) commit 7468a4eae541ce5aff65595aa502aa0a4def6615 Author: Gustavo A. R. Silva Date: Mon Aug 5 15:17:12 2019 -0500 x86: mtrr: cyrix: Mark expected switch fall-through Mark switch cases where we are expecting to fall through. Fix the following warning (Building: i386_defconfig i386): arch/x86/kernel/cpu/mtrr/cyrix.c:99:6: warning: this statement may fall through [-Wimplicit-fallthrough=] Signed-off-by: Gustavo A. R. Silva Signed-off-by: Thomas Gleixner Reviewed-by: Kees Cook Link: https://lkml.kernel.org/r/20190805201712.GA19927@embeddedor arch/x86/kernel/cpu/mtrr/cyrix.c | 1 + 1 file changed, 1 insertion(+) commit 4ab9ab656a6cea5257bfa31f00c922d68f7a5c2f Author: Gustavo A. R. Silva Date: Mon Aug 5 14:56:54 2019 -0500 x86/ptrace: Mark expected switch fall-through Mark switch cases where we are expecting to fall through. Fix the following warning (Building: allnoconfig i386): arch/x86/kernel/ptrace.c:202:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (unlikely(value == 0)) ^ arch/x86/kernel/ptrace.c:206:2: note: here default: ^~~~~~~ Signed-off-by: Gustavo A. R. Silva Signed-off-by: Thomas Gleixner Reviewed-by: Kees Cook Link: https://lkml.kernel.org/r/20190805195654.GA17831@embeddedor arch/x86/kernel/ptrace.c | 1 + 1 file changed, 1 insertion(+) commit c02f77d32d2c45cfb1b2bb99eabd8a78f5ecc7db Author: Takashi Iwai Date: Tue Aug 6 17:31:48 2019 +0200 ALSA: hda - Workaround for crackled sound on AMD controller (1022:1457) A long-time problem on the recent AMD chip (X370, X470, B450, etc with PCI ID 1022:1457) with Realtek codecs is the crackled or distorted sound for capture streams, as well as occasional playback hiccups. After lengthy debugging sessions, the workarounds we've found are like the following: - Set up the proper driver caps for this controller, similar as the other AMD controller. - Correct the DMA position reporting with the fixed FIFO size, which is similar like as workaround used for VIA chip set. - Even after the position correction, PulseAudio still shows mysterious stalls of playback streams when a capture is triggered in timer-scheduled mode. Since we have no clear way to eliminate the stall, pass the BATCH PCM flag for PA to suppress the tsched mode as a temporary workaround. This patch implements the workarounds. For the driver caps, it defines a new preset, AXZ_DCAPS_PRESET_AMD_SB. It enables the FIFO- corrected position reporting (corresponding to the new position_fix=6) and enforces the SNDRV_PCM_INFO_BATCH flag. Note that the current implementation is merely a workaround. Hopefully we'll find a better alternative in future, especially about removing the BATCH flag hack again. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=195303 Cc: Signed-off-by: Takashi Iwai sound/pci/hda/hda_controller.c | 7 +++++ sound/pci/hda/hda_controller.h | 2 +- sound/pci/hda/hda_intel.c | 63 +++++++++++++++++++++++++++++++++++++++++- 3 files changed, 70 insertions(+), 2 deletions(-) commit 0617bdede5114a0002298b12cd0ca2b0cfd0395d Author: Mika Westerberg Date: Wed Aug 7 13:57:18 2019 +0300 Revert "PCI: Add missing link delays required by the PCIe spec" Commit c2bf1fc212f7 ("PCI: Add missing link delays required by the PCIe spec") turned out causing issues with some systems either by making them unresponsive or slowing down runtime and system wide resume of PCIe devices. While root cause for the unresponsiveness is still under investigation given the amount of issues reported better to revert it for now. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=204413 Link: https://lore.kernel.org/linux-pci/SL2P216MB01878BBCD75F21D882AEEA2880C60@SL2P216MB0187.KORP216.PROD.OUTLOOK.COM/ Link: https://lore.kernel.org/linux-pci/2857501d-c167-547d-c57d-d5d24ea1f1dc@molgen.mpg.de/ Reported-by: Matthias Andree Reported-by: Paul Menzel Reported-by: Nicholas Johnson Signed-off-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki drivers/pci/pci.c | 29 +++++++----------- drivers/pci/pci.h | 1 - drivers/pci/pcie/portdrv_core.c | 66 ----------------------------------------- 3 files changed, 10 insertions(+), 86 deletions(-) commit 3d92aa45fbfd7319e3a19f4ec59fd32b3862b723 Author: Wenwen Wang Date: Wed Aug 7 04:08:51 2019 -0500 ALSA: hiface: fix multiple memory leak bugs In hiface_pcm_init(), 'rt' is firstly allocated through kzalloc(). Later on, hiface_pcm_init_urb() is invoked to initialize 'rt->out_urbs[i]'. In hiface_pcm_init_urb(), 'rt->out_urbs[i].buffer' is allocated through kzalloc(). However, if hiface_pcm_init_urb() fails, both 'rt' and 'rt->out_urbs[i].buffer' are not deallocated, leading to memory leak bugs. Also, 'rt->out_urbs[i].buffer' is not deallocated if snd_pcm_new() fails. To fix the above issues, free 'rt' and 'rt->out_urbs[i].buffer'. Fixes: a91c3fb2f842 ("Add M2Tech hiFace USB-SPDIF driver") Signed-off-by: Wenwen Wang Cc: Signed-off-by: Takashi Iwai sound/usb/hiface/pcm.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit d9dfe768b3f30faa8340cbf34196668714780c3c Author: Marek Olšák Date: Fri Aug 2 17:44:06 2019 -0400 Revert "drm/amdgpu: fix transform feedback GDS hang on gfx10 (v2)" This reverts commit 9ed2c993d723129f85101e51b2ccc36ef5400a67. SET_CONFIG_REG writes to memory if register shadowing is enabled, causing a VM fault. NGG streamout is unstable anyway, so all UMDs should use legacy streamout. I think Mesa is the only driver using NGG streamout. Signed-off-by: Marek Olšák Reviewed-by: Le Ma Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gds.h | 1 - drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 12 +----------- 2 files changed, 1 insertion(+), 12 deletions(-) commit 33920f1ec5bf47c5c0a1d2113989bdd9dfb3fae9 Merge: 76d7961ff4ee feac1d680233 Author: Linus Torvalds Date: Tue Aug 6 17:11:59 2019 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from David Miller: "Yeah I should have sent a pull request last week, so there is a lot more here than usual: 1) Fix memory leak in ebtables compat code, from Wenwen Wang. 2) Several kTLS bug fixes from Jakub Kicinski (circular close on disconnect etc.) 3) Force slave speed check on link state recovery in bonding 802.3ad mode, from Thomas Falcon. 4) Clear RX descriptor bits before assigning buffers to them in stmmac, from Jose Abreu. 5) Several missing of_node_put() calls, mostly wrt. for_each_*() OF loops, from Nishka Dasgupta. 6) Double kfree_skb() in peak_usb can driver, from Stephane Grosjean. 7) Need to hold sock across skb->destructor invocation, from Cong Wang. 8) IP header length needs to be validated in ipip tunnel xmit, from Haishuang Yan. 9) Use after free in ip6 tunnel driver, also from Haishuang Yan. 10) Do not use MSI interrupts on r8169 chips before RTL8168d, from Heiner Kallweit. 11) Upon bridge device init failure, we need to delete the local fdb. From Nikolay Aleksandrov. 12) Handle erros from of_get_mac_address() properly in stmmac, from Martin Blumenstingl. 13) Handle concurrent rename vs. dump in netfilter ipset, from Jozsef Kadlecsik. 14) Setting NETIF_F_LLTX on mac80211 causes complete breakage with some devices, so revert. From Johannes Berg. 15) Fix deadlock in rxrpc, from David Howells. 16) Fix Kconfig deps of enetc driver, we must have PHYLIB. From Yue Haibing. 17) Fix mvpp2 crash on module removal, from Matteo Croce. 18) Fix race in genphy_update_link, from Heiner Kallweit. 19) bpf_xdp_adjust_head() stopped working with generic XDP when we fixes generic XDP to support stacked devices properly, fix from Jesper Dangaard Brouer. 20) Unbalanced RCU locking in rt6_update_exception_stamp_rt(), from David Ahern. 21) Several memory leaks in new sja1105 driver, from Vladimir Oltean" * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (214 commits) net: dsa: sja1105: Fix memory leak on meta state machine error path net: dsa: sja1105: Fix memory leak on meta state machine normal path net: dsa: sja1105: Really fix panic on unregistering PTP clock net: dsa: sja1105: Use the LOCKEDS bit for SJA1105 E/T as well net: dsa: sja1105: Fix broken learning with vlan_filtering disabled net: dsa: qca8k: Add of_node_put() in qca8k_setup_mdio_bus() net: sched: sample: allow accessing psample_group with rtnl net: sched: police: allow accessing police->params with rtnl net: hisilicon: Fix dma_map_single failed on arm64 net: hisilicon: fix hip04-xmit never return TX_BUSY net: hisilicon: make hip04_tx_reclaim non-reentrant tc-testing: updated vlan action tests with batch create/delete net sched: update vlan action for batched events operations net: stmmac: tc: Do not return a fragment entry net: stmmac: Fix issues when number of Queues >= 4 net: stmmac: xgmac: Fix XGMAC selftests be2net: disable bh with spin_lock in be_process_mcc net: cxgb3_main: Fix a resource leak in a error path in 'init_one()' net: ethernet: sun4i-emac: Support phy-handle property for finding PHYs net: bridge: move default pvid init/deinit to NETDEV_REGISTER/UNREGISTER ... commit 713203e303ca9f75be8c729b533bf1559e442f6e Author: Atish Patra Date: Fri Aug 2 21:27:20 2019 -0700 RISC-V: Remove per cpu clocksource There is only one clocksource in RISC-V. The boot cpu initializes that clocksource. No need to keep a percpu data structure. Signed-off-by: Atish Patra Signed-off-by: Paul Walmsley Acked-by: Daniel Lezcano drivers/clocksource/timer-riscv.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit feac1d680233a48603213d52230f92222462a1c8 Merge: f26e0cca14c9 93fa8587b253 Author: David S. Miller Date: Tue Aug 6 14:37:02 2019 -0700 Merge branch 'sja1105-fixes' Vladimir Oltean says: ==================== Fixes for SJA1105 DSA: FDBs, Learning and PTP This is an assortment of functional fixes for the sja1105 switch driver targeted for the "net" tree (although they apply on net-next just as well). Patch 1/5 ("net: dsa: sja1105: Fix broken learning with vlan_filtering disabled") repairs a breakage introduced in the early development stages of the driver: support for traffic from the CPU has broken "normal" frame forwarding (based on DMAC) - there is connectivity through the switch only because all frames are flooded. I debated whether this patch qualifies as a fix, since it puts the switch into a mode it has never operated in before (aka SVL). But "normal" forwarding did use to work before the "Traffic support for SJA1105 DSA driver" patchset, and arguably this patch should have been part of that. Also, it would be strange for this feature to be broken in the 5.2 LTS. Patch 2/5 ("net: dsa: sja1105: Use the LOCKEDS bit for SJA1105 E/T as well") is a simplification of a previous FDB-related patch that is currently in the 5.3 rc's. Patches 3/5 - 5/5 fix various crashes found while running linuxptp over the switch ports for extended periods of time, or in conjunction with other error conditions. The fixed-up commits were all introduced in 5.2. ==================== Signed-off-by: David S. Miller commit 93fa8587b25356382a39f1ca3a81d6c1b42ac731 Author: Vladimir Oltean Date: Mon Aug 5 01:38:48 2019 +0300 net: dsa: sja1105: Fix memory leak on meta state machine error path When RX timestamping is enabled and two link-local (non-meta) frames are received in a row, this constitutes an error. The tagger is always caching the last link-local frame, in an attempt to merge it with the meta follow-up frame when that arrives. To recover from the above error condition, the initial cached link-local frame is dropped and the second frame in a row is cached (in expectance of the second meta frame). However, when dropping the initial link-local frame, its backing memory was being leaked. Fixes: f3097be21bf1 ("net: dsa: sja1105: Add a state machine for RX timestamping") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller net/dsa/tag_sja1105.c | 1 + 1 file changed, 1 insertion(+) commit f163fed2764e66511fb5c489bf87e532ad7606fb Author: Vladimir Oltean Date: Mon Aug 5 01:38:47 2019 +0300 net: dsa: sja1105: Fix memory leak on meta state machine normal path After a meta frame is received, it is associated with the cached sp->data->stampable_skb from the DSA tagger private structure. Cached means its refcount is incremented with skb_get() in order for dsa_switch_rcv() to not free it when the tagger .rcv returns NULL. The mistake is that skb_unref() is not the correct function to use. It will correctly decrement the refcount (which will go back to zero) but the skb memory will not be freed. That is the job of kfree_skb(), which also calls skb_unref(). But it turns out that freeing the cached stampable_skb is in fact not necessary. It is still a perfectly valid skb, and now it is even annotated with the partial RX timestamp. So remove the skb_copy() altogether and simply pass the stampable_skb with a refcount of 1 (incremented by us, decremented by dsa_switch_rcv) up the stack. Fixes: f3097be21bf1 ("net: dsa: sja1105: Add a state machine for RX timestamping") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller net/dsa/tag_sja1105.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit 6cb0abbdf90c180e1310976c47399f57477e0e53 Author: Vladimir Oltean Date: Mon Aug 5 01:38:46 2019 +0300 net: dsa: sja1105: Really fix panic on unregistering PTP clock The IS_ERR_OR_NULL(priv->clock) check inside sja1105_ptp_clock_unregister() is preventing cancel_delayed_work_sync from actually being run. Additionally, sja1105_ptp_clock_unregister() does not actually get run, when placed in sja1105_remove(). The DSA switch gets torn down, but the sja1105 module does not get unregistered. So sja1105_ptp_clock_unregister needs to be moved to sja1105_teardown, to be symmetrical with sja1105_ptp_clock_register which is called from the DSA sja1105_setup. It is strange to fix a "fixes" patch, but the probe failure can only be seen when the attached PHY does not respond to MDIO (issue which I can't pinpoint the reason to) and it goes away after I power-cycle the board. This time the patch was validated on a failing board, and the kernel panic from the fixed commit's message can no longer be seen. Fixes: 29dd908d355f ("net: dsa: sja1105: Cancel PTP delayed work on unregister") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller drivers/net/dsa/sja1105/sja1105_main.c | 4 ++-- drivers/net/dsa/sja1105/sja1105_ptp.c | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) commit 4b7da3d808f91cdad3e34059cd68ba3dfe4c3695 Author: Vladimir Oltean Date: Mon Aug 5 01:38:45 2019 +0300 net: dsa: sja1105: Use the LOCKEDS bit for SJA1105 E/T as well It looks like the FDB dump taken from first-generation switches also contains information on whether entries are static or not. So use that instead of searching through the driver's tables. Fixes: d763778224ea ("net: dsa: sja1105: Implement is_static for FDB entries on E/T") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller drivers/net/dsa/sja1105/sja1105_dynamic_config.c | 14 +++++++++++++- drivers/net/dsa/sja1105/sja1105_main.c | 15 --------------- 2 files changed, 13 insertions(+), 16 deletions(-) commit 6d7c7d948a2e9f87b4e7726dee94c59300e1786b Author: Vladimir Oltean Date: Mon Aug 5 01:38:44 2019 +0300 net: dsa: sja1105: Fix broken learning with vlan_filtering disabled When put under a bridge with vlan_filtering 0, the SJA1105 ports will flood all traffic as if learning was broken. This is because learning interferes with the rx_vid's configured by dsa_8021q as unique pvid's. So learning technically still *does* work, it's just that the learnt entries never get matched due to their unique VLAN ID. The setting that saves the day is Shared VLAN Learning, which on this switch family works exactly as desired: VLAN tagging still works (untagged traffic gets the correct pvid) and FDB entries are still populated with the correct contents including VID. Also, a frame cannot violate the forwarding domain restrictions enforced by its classified VLAN. It is just that the VID is ignored when looking up the FDB for taking a forwarding decision (selecting the egress port). This patch activates SVL, and the result is that frames with a learnt DMAC are no longer flooded in the scenario described above. Now exactly *because* SVL works as desired, we have to revisit some earlier patches: - It is no longer necessary to manipulate the VID of the 'bridge fdb {add,del}' command when vlan_filtering is off. This is because now, SVL is enabled for that case, so the actual VID does not matter*. - It is still desirable to hide dsa_8021q VID's in the FDB dump callback. But right now the dump callback should no longer hide duplicates (one per each front panel port's pvid, plus one for the VLAN that the CPU port is going to tag a TX frame with), because there shouldn't be any (the switch will match a single FDB entry no matter its VID anyway). * Not really... It's no longer necessary to transform a 'bridge fdb add' into 5 fdb add operations, but the user might still add a fdb entry with any vid, and all of them would appear as duplicates in 'bridge fdb show'. So force a 'bridge fdb add' to insert the VID of 0**, so that we can prune the duplicates at insertion time. ** The VID of 0 is better than 1 because it is always guaranteed to be in the ports' hardware filter. DSA also avoids putting the VID inside the netlink response message towards the bridge driver when we return this particular VID, which makes it suitable for FDB entries learnt with vlan_filtering off. Fixes: 227d07a07ef1 ("net: dsa: sja1105: Add support for traffic through standalone ports") Signed-off-by: Vladimir Oltean Signed-off-by: Georg Waibel Signed-off-by: David S. Miller drivers/net/dsa/sja1105/sja1105_main.c | 121 +++++++++++++++------------------ 1 file changed, 55 insertions(+), 66 deletions(-) commit f26e0cca14c9494c863d8fa6825b10bd12dc9eaa Author: Nishka Dasgupta Date: Sun Aug 4 21:00:18 2019 +0530 net: dsa: qca8k: Add of_node_put() in qca8k_setup_mdio_bus() Each iteration of for_each_available_child_of_node() puts the previous node, but in the case of a return from the middle of the loop, there is no put, thus causing a memory leak. Hence add an of_node_put() before the return. Additionally, the local variable ports in the function qca8k_setup_mdio_bus() takes the return value of of_get_child_by_name(), which gets a node but does not put it. If the function returns without putting ports, it may cause a memory leak. Hence put ports before the mid-loop return statement, and also outside the loop after its last usage in this function. Issues found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: David S. Miller drivers/net/dsa/qca8k.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 443bfb4acb83a6f0b7d9b11ac32f17c67f14e995 Merge: 2b0dfc175333 67cbf7dedd03 Author: David S. Miller Date: Tue Aug 6 14:15:39 2019 -0700 Merge branch 'flow_offload-action-fixes' Vlad Buslov says: ==================== action fixes for flow_offload infra compatibility Fix rcu warnings due to usage of action helpers that expect rcu read lock protection from rtnl-protected context of flow_offload infra. ==================== Signed-off-by: David S. Miller commit 67cbf7dedd03a63ca2fbd9df2049eabba7a37edf Author: Vlad Buslov Date: Sat Aug 3 16:36:19 2019 +0300 net: sched: sample: allow accessing psample_group with rtnl Recently implemented support for sample action in flow_offload infra leads to following rcu usage warning: [ 1938.234856] ============================= [ 1938.234858] WARNING: suspicious RCU usage [ 1938.234863] 5.3.0-rc1+ #574 Not tainted [ 1938.234866] ----------------------------- [ 1938.234869] include/net/tc_act/tc_sample.h:47 suspicious rcu_dereference_check() usage! [ 1938.234872] other info that might help us debug this: [ 1938.234875] rcu_scheduler_active = 2, debug_locks = 1 [ 1938.234879] 1 lock held by tc/19540: [ 1938.234881] #0: 00000000b03cb918 (rtnl_mutex){+.+.}, at: tc_new_tfilter+0x47c/0x970 [ 1938.234900] stack backtrace: [ 1938.234905] CPU: 2 PID: 19540 Comm: tc Not tainted 5.3.0-rc1+ #574 [ 1938.234908] Hardware name: Supermicro SYS-2028TP-DECR/X10DRT-P, BIOS 2.0b 03/30/2017 [ 1938.234911] Call Trace: [ 1938.234922] dump_stack+0x85/0xc0 [ 1938.234930] tc_setup_flow_action+0xed5/0x2040 [ 1938.234944] fl_hw_replace_filter+0x11f/0x2e0 [cls_flower] [ 1938.234965] fl_change+0xd24/0x1b30 [cls_flower] [ 1938.234990] tc_new_tfilter+0x3e0/0x970 [ 1938.235021] ? tc_del_tfilter+0x720/0x720 [ 1938.235028] rtnetlink_rcv_msg+0x389/0x4b0 [ 1938.235038] ? netlink_deliver_tap+0x95/0x400 [ 1938.235044] ? rtnl_dellink+0x2d0/0x2d0 [ 1938.235053] netlink_rcv_skb+0x49/0x110 [ 1938.235063] netlink_unicast+0x171/0x200 [ 1938.235073] netlink_sendmsg+0x224/0x3f0 [ 1938.235091] sock_sendmsg+0x5e/0x60 [ 1938.235097] ___sys_sendmsg+0x2ae/0x330 [ 1938.235111] ? __handle_mm_fault+0x12cd/0x19e0 [ 1938.235125] ? __handle_mm_fault+0x12cd/0x19e0 [ 1938.235138] ? find_held_lock+0x2b/0x80 [ 1938.235147] ? do_user_addr_fault+0x22d/0x490 [ 1938.235160] __sys_sendmsg+0x59/0xa0 [ 1938.235178] do_syscall_64+0x5c/0xb0 [ 1938.235187] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 1938.235192] RIP: 0033:0x7ff9a4d597b8 [ 1938.235197] Code: 89 02 48 c7 c0 ff ff ff ff eb bb 0f 1f 80 00 00 00 00 f3 0f 1e fa 48 8d 05 65 8f 0c 00 8b 00 85 c0 75 17 b8 2e 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 58 c3 0f 1f 80 00 00 00 00 48 83 ec 28 89 54 [ 1938.235200] RSP: 002b:00007ffcfe381c48 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 1938.235205] RAX: ffffffffffffffda RBX: 000000005d4497f9 RCX: 00007ff9a4d597b8 [ 1938.235208] RDX: 0000000000000000 RSI: 00007ffcfe381cb0 RDI: 0000000000000003 [ 1938.235211] RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000006 [ 1938.235214] R10: 0000000000404ec2 R11: 0000000000000246 R12: 0000000000000001 [ 1938.235217] R13: 0000000000480640 R14: 0000000000000012 R15: 0000000000000001 Change tcf_sample_psample_group() helper to allow using it from both rtnl and rcu protected contexts. Fixes: a7a7be6087b0 ("net/sched: add sample action to the hardware intermediate representation") Signed-off-by: Vlad Buslov Reviewed-by: Pieter Jansen van Vuuren Signed-off-by: David S. Miller include/net/tc_act/tc_sample.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c4bd48699beb92d6bb99d6139d1e9737cca73480 Author: Vlad Buslov Date: Sat Aug 3 16:36:18 2019 +0300 net: sched: police: allow accessing police->params with rtnl Recently implemented support for police action in flow_offload infra leads to following rcu usage warning: [ 1925.881092] ============================= [ 1925.881094] WARNING: suspicious RCU usage [ 1925.881098] 5.3.0-rc1+ #574 Not tainted [ 1925.881100] ----------------------------- [ 1925.881104] include/net/tc_act/tc_police.h:57 suspicious rcu_dereference_check() usage! [ 1925.881106] other info that might help us debug this: [ 1925.881109] rcu_scheduler_active = 2, debug_locks = 1 [ 1925.881112] 1 lock held by tc/18591: [ 1925.881115] #0: 00000000b03cb918 (rtnl_mutex){+.+.}, at: tc_new_tfilter+0x47c/0x970 [ 1925.881124] stack backtrace: [ 1925.881127] CPU: 2 PID: 18591 Comm: tc Not tainted 5.3.0-rc1+ #574 [ 1925.881130] Hardware name: Supermicro SYS-2028TP-DECR/X10DRT-P, BIOS 2.0b 03/30/2017 [ 1925.881132] Call Trace: [ 1925.881138] dump_stack+0x85/0xc0 [ 1925.881145] tc_setup_flow_action+0x1771/0x2040 [ 1925.881155] fl_hw_replace_filter+0x11f/0x2e0 [cls_flower] [ 1925.881175] fl_change+0xd24/0x1b30 [cls_flower] [ 1925.881200] tc_new_tfilter+0x3e0/0x970 [ 1925.881231] ? tc_del_tfilter+0x720/0x720 [ 1925.881243] rtnetlink_rcv_msg+0x389/0x4b0 [ 1925.881250] ? netlink_deliver_tap+0x95/0x400 [ 1925.881257] ? rtnl_dellink+0x2d0/0x2d0 [ 1925.881264] netlink_rcv_skb+0x49/0x110 [ 1925.881275] netlink_unicast+0x171/0x200 [ 1925.881284] netlink_sendmsg+0x224/0x3f0 [ 1925.881299] sock_sendmsg+0x5e/0x60 [ 1925.881305] ___sys_sendmsg+0x2ae/0x330 [ 1925.881309] ? task_work_add+0x43/0x50 [ 1925.881314] ? fput_many+0x45/0x80 [ 1925.881329] ? __lock_acquire+0x248/0x1930 [ 1925.881342] ? find_held_lock+0x2b/0x80 [ 1925.881347] ? task_work_run+0x7b/0xd0 [ 1925.881359] __sys_sendmsg+0x59/0xa0 [ 1925.881375] do_syscall_64+0x5c/0xb0 [ 1925.881381] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 1925.881384] RIP: 0033:0x7feb245047b8 [ 1925.881388] Code: 89 02 48 c7 c0 ff ff ff ff eb bb 0f 1f 80 00 00 00 00 f3 0f 1e fa 48 8d 05 65 8f 0c 00 8b 00 85 c0 75 17 b8 2e 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 58 c3 0f 1f 80 00 00 00 00 48 83 ec 28 89 54 [ 1925.881391] RSP: 002b:00007ffc2d2a5788 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 1925.881395] RAX: ffffffffffffffda RBX: 000000005d4497ed RCX: 00007feb245047b8 [ 1925.881398] RDX: 0000000000000000 RSI: 00007ffc2d2a57f0 RDI: 0000000000000003 [ 1925.881400] RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000006 [ 1925.881403] R10: 0000000000404ec2 R11: 0000000000000246 R12: 0000000000000001 [ 1925.881406] R13: 0000000000480640 R14: 0000000000000012 R15: 0000000000000001 Change tcf_police_rate_bytes_ps() and tcf_police_tcfp_burst() helpers to allow using them from both rtnl and rcu protected contexts. Fixes: 8c8cfc6ed274 ("net/sched: add police action to the hardware intermediate representation") Signed-off-by: Vlad Buslov Reviewed-by: Pieter Jansen van Vuuren Signed-off-by: David S. Miller include/net/tc_act/tc_police.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2b0dfc1753332d81d8e6654d682d8740aed4dec9 Merge: 5b0bce247cc2 96a50c0d907a Author: David S. Miller Date: Tue Aug 6 14:14:01 2019 -0700 Merge branch 'hisilicon-fixes' Jiangfeng Xiao says: ==================== net: hisilicon: Fix a few problems with hip04_eth During the use of the hip04_eth driver, several problems were found, which solved the hip04_tx_reclaim reentry problem, fixed the problem that hip04_mac_start_xmit never returns NETDEV_TX_BUSY and the dma_map_single failed on the arm64 platform. ==================== Signed-off-by: David S. Miller commit 96a50c0d907ac8f5c3d6b051031a19eb8a2b53e3 Author: Jiangfeng Xiao Date: Sat Aug 3 20:31:41 2019 +0800 net: hisilicon: Fix dma_map_single failed on arm64 On the arm64 platform, executing "ifconfig eth0 up" will fail, returning "ifconfig: SIOCSIFFLAGS: Input/output error." ndev->dev is not initialized, dma_map_single->get_dma_ops-> dummy_dma_ops->__dummy_map_page will return DMA_ERROR_CODE directly, so when we use dma_map_single, the first parameter is to use the device of platform_device. Signed-off-by: Jiangfeng Xiao Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hip04_eth.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit f2243b82785942be519016067ee6c55a063bbfe2 Author: Jiangfeng Xiao Date: Sat Aug 3 20:31:40 2019 +0800 net: hisilicon: fix hip04-xmit never return TX_BUSY TX_DESC_NUM is 256, in tx_count, the maximum value of mod(TX_DESC_NUM - 1) is 254, the variable "count" in the hip04_mac_start_xmit function is never equal to (TX_DESC_NUM - 1), so hip04_mac_start_xmit never return NETDEV_TX_BUSY. tx_count is modified to mod(TX_DESC_NUM) so that the maximum value of tx_count can reach (TX_DESC_NUM - 1), then hip04_mac_start_xmit can reurn NETDEV_TX_BUSY. Signed-off-by: Jiangfeng Xiao Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hip04_eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1a2c070ae805910a853b4a14818481ed2e17c727 Author: Jiangfeng Xiao Date: Sat Aug 3 20:31:39 2019 +0800 net: hisilicon: make hip04_tx_reclaim non-reentrant If hip04_tx_reclaim is interrupted while it is running and then __napi_schedule continues to execute hip04_rx_poll->hip04_tx_reclaim, reentrancy occurs and oops is generated. So you need to mask the interrupt during the hip04_tx_reclaim run. The kernel oops exception stack is as follows: Unable to handle kernel NULL pointer dereference at virtual address 00000050 pgd = c0003000 [00000050] *pgd=80000000a04003, *pmd=00000000 Internal error: Oops: 206 [#1] SMP ARM Modules linked in: hip04_eth mtdblock mtd_blkdevs mtd ohci_platform ehci_platform ohci_hcd ehci_hcd vfat fat sd_mod usb_storage scsi_mod usbcore usb_common CPU: 0 PID: 0 Comm: swapper/0 Tainted: G O 4.4.185 #1 Hardware name: Hisilicon A15 task: c0a250e0 task.stack: c0a00000 PC is at hip04_tx_reclaim+0xe0/0x17c [hip04_eth] LR is at hip04_tx_reclaim+0x30/0x17c [hip04_eth] pc : [] lr : [] psr: 600e0313 sp : c0a01d88 ip : 00000000 fp : c0601f9c r10: 00000000 r9 : c3482380 r8 : 00000001 r7 : 00000000 r6 : 000000e1 r5 : c3482000 r4 : 0000000c r3 : f2209800 r2 : 00000000 r1 : 00000000 r0 : 00000000 Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel Control: 32c5387d Table: 03d28c80 DAC: 55555555 Process swapper/0 (pid: 0, stack limit = 0xc0a00190) Stack: (0xc0a01d88 to 0xc0a02000) [] (hip04_tx_reclaim [hip04_eth]) from [] (hip04_rx_poll+0x88/0x368 [hip04_eth]) [] (hip04_rx_poll [hip04_eth]) from [] (net_rx_action+0x114/0x34c) [] (net_rx_action) from [] (__do_softirq+0x218/0x318) [] (__do_softirq) from [] (irq_exit+0x88/0xac) [] (irq_exit) from [] (msa_irq_exit+0x11c/0x1d4) [] (msa_irq_exit) from [] (__handle_domain_irq+0x110/0x148) [] (__handle_domain_irq) from [] (gic_handle_irq+0xd4/0x118) [] (gic_handle_irq) from [] (__irq_svc+0x40/0x58) Exception stack(0xc0a01f30 to 0xc0a01f78) 1f20: c0ae8b40 00000000 00000000 00000000 1f40: 00000002 ffffe000 c0601f9c 00000000 ffffffff c0a2257c c0a22440 c0831a38 1f60: c0a01ec4 c0a01f80 c0203714 c0203718 600e0213 ffffffff [] (__irq_svc) from [] (arch_cpu_idle+0x20/0x3c) [] (arch_cpu_idle) from [] (cpu_startup_entry+0x244/0x29c) [] (cpu_startup_entry) from [] (rest_init+0xc8/0x10c) [] (rest_init) from [] (start_kernel+0x468/0x514) Code: a40599e5 016086e2 018088e2 7660efe6 (503090e5) ---[ end trace 1db21d6d09c49d74 ]--- Kernel panic - not syncing: Fatal exception in interrupt CPU3: stopping CPU: 3 PID: 0 Comm: swapper/3 Tainted: G D O 4.4.185 #1 Signed-off-by: Jiangfeng Xiao Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hip04_eth.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 5b0bce247cc2423defedf289f8b84e22385426ee Merge: 3abd24a1831d 8571deb01381 Author: David S. Miller Date: Tue Aug 6 14:05:40 2019 -0700 Merge branch 'Fix-batched-event-generation-for-vlan-action' Roman Mashak says: ==================== Fix batched event generation for vlan action When adding or deleting a batch of entries, the kernel sends up to TCA_ACT_MAX_PRIO (defined to 32 in kernel) entries in an event to user space. However it does not consider that the action sizes may vary and require different skb sizes. For example, consider the following script adding 32 entries with all supported vlan parameters (in order to maximize netlink messages size): % cat tc-batch.sh TC="sudo /mnt/iproute2.git/tc/tc" $TC actions flush action vlan for i in `seq 1 $1`; do cmd="action vlan push protocol 802.1q id 4094 priority 7 pipe \ index $i cookie aabbccddeeff112233445566778800a1 " args=$args$cmd done $TC actions add $args % % ./tc-batch.sh 32 Error: Failed to fill netlink attributes while adding TC action. We have an error talking to the kernel % patch 1 adds callback in tc_action_ops of vlan action, which calculates the action size, and passes size to tcf_add_notify()/tcf_del_notify(). patch 2 updates the TDC test suite with relevant vlan test cases. ==================== Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller commit 8571deb013812f35260b2b7152a522eacfa9ccf9 Author: Roman Mashak Date: Fri Aug 2 15:16:47 2019 -0400 tc-testing: updated vlan action tests with batch create/delete Update TDC tests with cases varifying ability of TC to install or delete batches of vlan actions. Signed-off-by: Roman Mashak Signed-off-by: David S. Miller .../tc-testing/tc-tests/actions/vlan.json | 94 ++++++++++++++++++++++ 1 file changed, 94 insertions(+) commit b35475c5491a14c8ce7a5046ef7bcda8a860581a Author: Roman Mashak Date: Fri Aug 2 15:16:46 2019 -0400 net sched: update vlan action for batched events operations Add get_fill_size() routine used to calculate the action size when building a batch of events. Fixes: c7e2b9689 ("sched: introduce vlan action") Signed-off-by: Roman Mashak Signed-off-by: David S. Miller net/sched/act_vlan.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 76d7961ff4ee02cc70365600a52fb59ca544dc7c Merge: f4eb1423e433 74034a09267c Author: Linus Torvalds Date: Tue Aug 6 14:01:08 2019 -0700 Merge tag 'mips_fixes_5.3_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS fixes from Paul Burton: "A few MIPS fixes for 5.3: - Various switch fall through annotations to fixup warnings & errors resulting from -Wimplicit-fallthrough. - A fix for systems (at least jazz) using an i8253 PIT as clocksource when it's not suitably configured. - Set struct cacheinfo's cpu_map_populated field to true, indicating that we filled in cache info detected from cop0 registers & avoiding complaints about that info being (intentionally) missing in devicetree" * tag 'mips_fixes_5.3_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: MIPS: BCM63XX: Mark expected switch fall-through MIPS: OProfile: Mark expected switch fall-throughs MIPS: Annotate fall-through in Cavium Octeon code MIPS: Annotate fall-through in kvm/emulate.c mips: fix cacheinfo MIPS: kernel: only use i8253 clocksource with periodic clockevent commit 72cda9bb5e219aea0f2f62f56ae05198c59022a7 Author: Likun Gao Date: Fri Aug 2 15:18:57 2019 +0800 drm/amdgpu: pin the csb buffer on hw init for gfx v8 Without this pin, the csb buffer will be filled with inconsistent data after S3 resume. And that will causes gfx hang on gfxoff exit since this csb will be executed then. Signed-off-by: Likun Gao Tested-by: Paul Gover Reviewed-by: Feifei Xu Reviewed-by: Xiaojie Yuan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit 3abd24a1831d0507e15702184c6319c253145a6c Merge: 0574f2ed3060 4a6a1385a4db Author: David S. Miller Date: Tue Aug 6 12:26:11 2019 -0700 Merge branch 'stmmac-fixes' Jose Abreu says: ==================== net: stmmac: Fixes for -net Couple of fixes for -net. More info in commit log. ==================== Signed-off-by: David S. Miller commit 4a6a1385a4db5f42258a40fcd497cbfd22075968 Author: Jose Abreu Date: Tue Aug 6 15:16:18 2019 +0200 net: stmmac: tc: Do not return a fragment entry Do not try to return a fragment entry from TC list. Otherwise we may not clean properly allocated entries. Signed-off-by: Jose Abreu Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e8df7e8c233a18d2704e37ecff47583b494789d3 Author: Jose Abreu Date: Tue Aug 6 15:16:17 2019 +0200 net: stmmac: Fix issues when number of Queues >= 4 When queues >= 4 we use different registers but we were not subtracting the offset of 4. Fix this. Found out by Coverity. Signed-off-by: Jose Abreu Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 4 ++++ drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c | 4 ++++ 2 files changed, 8 insertions(+) commit 0efedbf11f07adee555e0c4ba9c6eb58760aa94f Author: Jose Abreu Date: Tue Aug 6 15:16:16 2019 +0200 net: stmmac: xgmac: Fix XGMAC selftests Fixup the XGMAC selftests by correctly finishing the implementation of set_filter callback. Result: $ ethtool -t enp4s0 The test result is PASS The test extra info: 1. MAC Loopback 0 2. PHY Loopback -95 3. MMC Counters -95 4. EEE -95 5. Hash Filter MC 0 6. Perfect Filter UC 0 7. MC Filter 0 8. UC Filter 0 9. Flow Control 0 Signed-off-by: Jose Abreu Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h | 7 +- .../net/ethernet/stmicro/stmmac/dwxgmac2_core.c | 83 +++++++++++++++++++--- 2 files changed, 79 insertions(+), 11 deletions(-) commit 0574f2ed30609fd1720489a9dcb50a805958c796 Merge: d0d006a43e9a 1f6607250331 Author: David S. Miller Date: Tue Aug 6 11:48:48 2019 -0700 Merge tag 'wireless-drivers-for-davem-2019-08-06' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for 5.3 Second set of fixes for 5.3. Lots of iwlwifi fixes have accumulated which consists most of patches in this pull request. Only most notable iwlwifi fixes are listed below. mwifiex * fix a regression related to WPA1 networks since v5.3-rc1 iwlwifi * fix use-after-free issues * fix DMA mapping API usage errors * fix frame drop occurring due to reorder buffer handling in RSS in certain conditions * fix rate scale locking issues * disable TX A-MSDU on older NICs as it causes problems and was never supposed to be supported * new PCI IDs * GEO_TX_POWER_LIMIT API issue that many people were hitting ==================== Signed-off-by: David S. Miller commit f4eb1423e43376bec578c5696635b074c8bd2035 Merge: 4368c4bc9d36 e0f6974a54d3 Author: Linus Torvalds Date: Tue Aug 6 11:47:23 2019 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID fixes from Jiri Kosina: - functional regression fix for some of the Logitech unifying devices, from Hans de Goede - race condition fix in hid-sony for bug severely affecting Valve/Android deployments, from Roderick Colenbrander - several fixes for issues found by syzbot/kasan, from Oliver Neukum and Hillf Danton - functional regression fix for Wacom Cintiq device, from Aaron Armstrong Skomra - a few other assorted device-specific quirks * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: HID: sony: Fix race condition between rumble and device remove. HID: hiddev: do cleanup in failure of opening a device HID: hiddev: avoid opening a disconnected device HID: input: fix a4tech horizontal wheel custom usage HID: Add quirk for HP X1200 PIXART OEM mouse HID: holtek: test for sanity of intfdata HID: wacom: fix bit shift for Cintiq Companion 2 HID: quirks: Set the INCREMENT_USAGE_ON_DUPLICATE quirk on Saitek X52 HID: logitech-dj: Really fix return value of logi_dj_recv_query_hidpp_devices HID: Add 044f:b320 ThrustMaster, Inc. 2 in 1 DT HID: logitech-dj: add the Powerplay receiver HID: logitech-hidpp: add USB PID for a few more supported mice HID: logitech-dj: rename "gaming" receiver to "lightspeed" commit d0d006a43e9a7a796f6f178839c92fcc222c564d Author: Denis Kirjanov Date: Tue Aug 6 12:51:11 2019 +0200 be2net: disable bh with spin_lock in be_process_mcc be_process_mcc() is invoked in 3 different places and always with BHs disabled except the be_poll function but since it's invoked from softirq with BHs disabled it won't hurt. v1->v2: added explanation to the patch v2->v3: add a missing call from be_cmds.c Signed-off-by: Denis Kirjanov Signed-off-by: David S. Miller drivers/net/ethernet/emulex/benet/be_cmds.c | 6 ++---- drivers/net/ethernet/emulex/benet/be_main.c | 2 -- 2 files changed, 2 insertions(+), 6 deletions(-) commit debea2cd3193ac868289e8893c3a719c265b0612 Author: Christophe JAILLET Date: Tue Aug 6 10:55:12 2019 +0200 net: cxgb3_main: Fix a resource leak in a error path in 'init_one()' A call to 'kfree_skb()' is missing in the error handling path of 'init_one()'. This is already present in 'remove_one()' but is missing here. Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 5c4e2e1af345426f63410a50e2a678673574aa02 Author: Chen-Yu Tsai Date: Tue Aug 6 15:35:39 2019 +0800 net: ethernet: sun4i-emac: Support phy-handle property for finding PHYs The sun4i-emac uses the "phy" property to find the PHY it's supposed to use. This property was deprecated in favor of "phy-handle" in commit 8c5b09447625 ("dt-bindings: net: sun4i-emac: Convert the binding to a schemas"). Add support for this new property name, and fall back to the old one in case the device tree hasn't been updated. Signed-off-by: Chen-Yu Tsai Signed-off-by: David S. Miller drivers/net/ethernet/allwinner/sun4i-emac.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 4368c4bc9d36821690d6bb2e743d5a075b6ddb55 Merge: 0eb0ce0a78e1 4c92057661a3 Author: Linus Torvalds Date: Tue Aug 6 11:22:22 2019 -0700 Merge branch 'x86/grand-schemozzle' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull pti updates from Thomas Gleixner: "The performance deterioration departement is not proud at all to present yet another set of speculation fences to mitigate the next chapter in the 'what could possibly go wrong' story. The new vulnerability belongs to the Spectre class and affects GS based data accesses and has therefore been dubbed 'Grand Schemozzle' for secret communication purposes. It's officially listed as CVE-2019-1125. Conditional branches in the entry paths which contain a SWAPGS instruction (interrupts and exceptions) can be mis-speculated which results in speculative accesses with a wrong GS base. This can happen on entry from user mode through a mis-speculated branch which takes the entry from kernel mode path and therefore does not execute the SWAPGS instruction. The following speculative accesses are done with user GS base. On entry from kernel mode the mis-speculated branch executes the SWAPGS instruction in the entry from user mode path which has the same effect that the following GS based accesses are done with user GS base. If there is a disclosure gadget available in these code paths the mis-speculated data access can be leaked through the usual side channels. The entry from user mode issue affects all CPUs which have speculative execution. The entry from kernel mode issue affects only Intel CPUs which can speculate through SWAPGS. On CPUs from other vendors SWAPGS has semantics which prevent that. SMAP migitates both problems but only when the CPU is not affected by the Meltdown vulnerability. The mitigation is to issue LFENCE instructions in the entry from kernel mode path for all affected CPUs and on the affected Intel CPUs also in the entry from user mode path unless PTI is enabled because the CR3 write is serializing. The fences are as usual enabled conditionally and can be completely disabled on the kernel command line. The Spectre V1 documentation is updated accordingly. A big "Thank You!" goes to Josh for doing the heavy lifting for this round of hardware misfeature 'repair'. Of course also "Thank You!" to everybody else who contributed in one way or the other" * 'x86/grand-schemozzle' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: Documentation: Add swapgs description to the Spectre v1 documentation x86/speculation/swapgs: Exclude ATOMs from speculation through SWAPGS x86/entry/64: Use JMP instead of JMPQ x86/speculation: Enable Spectre v1 swapgs mitigations x86/speculation: Prepare entry code for Spectre v1 swapgs mitigations commit b803974a86039913d5280add083d730b2b9ed8ec Author: Kevin Hao Date: Fri Jul 26 10:30:49 2019 +0800 mmc: cavium: Add the missing dma unmap when the dma has finished. This fixes the below calltrace when the CONFIG_DMA_API_DEBUG is enabled. DMA-API: thunderx_mmc 0000:01:01.4: cpu touching an active dma mapped cacheline [cln=0x000000002fdf9800] WARNING: CPU: 21 PID: 1 at kernel/dma/debug.c:596 debug_dma_assert_idle+0x1f8/0x270 Modules linked in: CPU: 21 PID: 1 Comm: init Not tainted 5.3.0-rc1-next-20190725-yocto-standard+ #64 Hardware name: Marvell OcteonTX CN96XX board (DT) pstate: 80400009 (Nzcv daif +PAN -UAO) pc : debug_dma_assert_idle+0x1f8/0x270 lr : debug_dma_assert_idle+0x1f8/0x270 sp : ffff0000113cfc10 x29: ffff0000113cfc10 x28: 0000ffff8c880000 x27: ffff800bc72a0000 x26: ffff000010ff8000 x25: ffff000010ff8940 x24: ffff000010ff8968 x23: 0000000000000000 x22: ffff000010e83700 x21: ffff000010ea2000 x20: ffff000010e835c8 x19: ffff800bc2c73300 x18: ffffffffffffffff x17: 0000000000000000 x16: 0000000000000000 x15: ffff000010e835c8 x14: 6d20616d64206576 x13: 69746361206e6120 x12: 676e696863756f74 x11: 20757063203a342e x10: 31303a31303a3030 x9 : 303020636d6d5f78 x8 : 3230303030303030 x7 : 00000000000002fd x6 : ffff000010fd57d0 x5 : 0000000000000000 x4 : ffff0000106c5210 x3 : 00000000ffffffff x2 : 0000800bee9c0000 x1 : 57d5843f4aa62800 x0 : 0000000000000000 Call trace: debug_dma_assert_idle+0x1f8/0x270 wp_page_copy+0xb0/0x688 do_wp_page+0xa8/0x5b8 __handle_mm_fault+0x600/0xd00 handle_mm_fault+0x118/0x1e8 do_page_fault+0x200/0x500 do_mem_abort+0x50/0xb0 el0_da+0x20/0x24 ---[ end trace a005534bd23e109f ]--- DMA-API: Mapped at: debug_dma_map_sg+0x94/0x350 cvm_mmc_request+0x3c4/0x988 __mmc_start_request+0x9c/0x1f8 mmc_start_request+0x7c/0xb0 mmc_blk_mq_issue_rq+0x5c4/0x7b8 Signed-off-by: Kevin Hao Fixes: ba3869ff32e4 ("mmc: cavium: Add core MMC driver for Cavium SOCs") Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson drivers/mmc/host/cavium.c | 1 + 1 file changed, 1 insertion(+) commit fa25eba6993b3750f417baabba169afaba076178 Author: Kevin Hao Date: Fri Jul 26 10:30:48 2019 +0800 mmc: cavium: Set the correct dma max segment size for mmc_host We have set the mmc_host.max_seg_size to 8M, but the dma max segment size of PCI device is set to 64K by default in function pci_device_add(). The mmc_host.max_seg_size is used to set the max segment size of the blk queue. Then this mismatch will trigger a calltrace like below when a bigger than 64K segment request arrives at mmc dev. So we should consider the limitation of the cvm_mmc_host when setting the mmc_host.max_seg_size. DMA-API: thunderx_mmc 0000:01:01.4: mapping sg segment longer than device claims to support [len=131072] [max=65536] WARNING: CPU: 6 PID: 238 at kernel/dma/debug.c:1221 debug_dma_map_sg+0x2b8/0x350 Modules linked in: CPU: 6 PID: 238 Comm: kworker/6:1H Not tainted 5.3.0-rc1-next-20190724-yocto-standard+ #62 Hardware name: Marvell OcteonTX CN96XX board (DT) Workqueue: kblockd blk_mq_run_work_fn pstate: 80c00009 (Nzcv daif +PAN +UAO) pc : debug_dma_map_sg+0x2b8/0x350 lr : debug_dma_map_sg+0x2b8/0x350 sp : ffff00001770f9e0 x29: ffff00001770f9e0 x28: ffffffff00000000 x27: 00000000ffffffff x26: ffff800bc2c73180 x25: ffff000010e83700 x24: 0000000000000002 x23: 0000000000000001 x22: 0000000000000001 x21: 0000000000000000 x20: ffff800bc48ba0b0 x19: ffff800bc97e8c00 x18: ffffffffffffffff x17: 0000000000000000 x16: 0000000000000000 x15: ffff000010e835c8 x14: 6874207265676e6f x13: 6c20746e656d6765 x12: 7320677320676e69 x11: 7070616d203a342e x10: 31303a31303a3030 x9 : 303020636d6d5f78 x8 : 35363d78616d5b20 x7 : 00000000000002fd x6 : ffff000010fd57dc x5 : 0000000000000000 x4 : ffff0000106c61f0 x3 : 00000000ffffffff x2 : 0000800bee060000 x1 : 7010678df3041a00 x0 : 0000000000000000 Call trace: debug_dma_map_sg+0x2b8/0x350 cvm_mmc_request+0x3c4/0x988 __mmc_start_request+0x9c/0x1f8 mmc_start_request+0x7c/0xb0 mmc_blk_mq_issue_rq+0x5c4/0x7b8 mmc_mq_queue_rq+0x11c/0x278 blk_mq_dispatch_rq_list+0xb0/0x568 blk_mq_do_dispatch_sched+0x6c/0x108 blk_mq_sched_dispatch_requests+0x110/0x1b8 __blk_mq_run_hw_queue+0xb0/0x118 blk_mq_run_work_fn+0x28/0x38 process_one_work+0x210/0x490 worker_thread+0x48/0x458 kthread+0x130/0x138 ret_from_fork+0x10/0x1c Signed-off-by: Kevin Hao Fixes: ba3869ff32e4 ("mmc: cavium: Add core MMC driver for Cavium SOCs") Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson drivers/mmc/host/cavium.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c6303c5d52d5ec3e5bce2e6a5480fa2a1baa45e6 Author: Baolin Wang Date: Thu Jul 25 11:14:22 2019 +0800 mmc: sdhci-sprd: Fix the incorrect soft reset operation when runtime resuming The SD host controller specification defines 3 types software reset: software reset for data line, software reset for command line and software reset for all. Software reset for all means this reset affects the entire Host controller except for the card detection circuit. In sdhci_runtime_resume_host() we always do a software "reset for all", which causes the Spreadtrum variant controller to work abnormally after resuming. To fix the problem, let's do a software reset for the data and the command part, rather than "for all". However, as sdhci_runtime_resume() is a common sdhci function and we don't want to change the behaviour for other variants, let's introduce a new in-parameter for it. This enables the caller to decide if a "reset for all" shall be done or not. Signed-off-by: Baolin Wang Fixes: fb8bd90f83c4 ("mmc: sdhci-sprd: Add Spreadtrum's initial host controller") Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-acpi.c | 2 +- drivers/mmc/host/sdhci-esdhc-imx.c | 2 +- drivers/mmc/host/sdhci-of-at91.c | 2 +- drivers/mmc/host/sdhci-pci-core.c | 4 ++-- drivers/mmc/host/sdhci-pxav3.c | 2 +- drivers/mmc/host/sdhci-s3c.c | 2 +- drivers/mmc/host/sdhci-sprd.c | 2 +- drivers/mmc/host/sdhci-xenon.c | 2 +- drivers/mmc/host/sdhci.c | 4 ++-- drivers/mmc/host/sdhci.h | 2 +- 10 files changed, 12 insertions(+), 12 deletions(-) commit 849f5ae3a513c550cad741c68dd3d7eb2bcc2a2c Author: Oliver Neukum Date: Tue Aug 6 09:05:55 2019 -0700 Input: iforce - add sanity checks The endpoint type should also be checked before a device is accepted. Reported-by: syzbot+5efc10c005014d061a74@syzkaller.appspotmail.com Signed-off-by: Oliver Neukum Signed-off-by: Dmitry Torokhov drivers/input/joystick/iforce/iforce-usb.c | 5 +++++ 1 file changed, 5 insertions(+) commit 37ad2e343449ced9e41505eae5494bf40f433181 Author: Gustavo A. R. Silva Date: Tue Aug 6 09:03:16 2019 -0700 Input: applespi - use struct_size() helper One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct touchpad_protocol { ... struct tp_finger fingers[0]; }; Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. So, replace the following form: sizeof(*tp) + tp->number_of_fingers * sizeof(tp->fingers[0]); with: struct_size(tp, fingers, tp->number_of_fingers) This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Dmitry Torokhov drivers/input/keyboard/applespi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 458b7c8e0dde12d140e3472b80919cbb9ae793f4 Author: Lu Baolu Date: Thu Aug 1 11:14:58 2019 +0800 iommu/vt-d: Detach domain when move device out of group When removing a device from an iommu group, the domain should be detached from the device. Otherwise, the stale domain info will still be cached by the driver and the driver will refuse to attach any domain to the device again. Cc: Ashok Raj Cc: Jacob Pan Cc: Kevin Tian Fixes: b7297783c2bb6 ("iommu/vt-d: Remove duplicated code for device hotplug") Reported-and-tested-by: Vlad Buslov Suggested-by: Robin Murphy Link: https://lkml.org/lkml/2019/7/26/1133 Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 2 ++ 1 file changed, 2 insertions(+) commit 11f4fe9ba3c85a4efac7ec25e75056a9b612d9da Author: Anders Roxell Date: Tue Jul 30 17:20:11 2019 +0200 iommu/arm-smmu: Mark expected switch fall-through Now that -Wimplicit-fallthrough is passed to GCC by default, the following warning shows up: ../drivers/iommu/arm-smmu-v3.c: In function ‘arm_smmu_write_strtab_ent’: ../drivers/iommu/arm-smmu-v3.c:1189:7: warning: this statement may fall through [-Wimplicit-fallthrough=] if (disable_bypass) ^ ../drivers/iommu/arm-smmu-v3.c:1191:3: note: here default: ^~~~~~~ Rework so that the compiler doesn't warn about fall-through. Make it clearer by calling 'BUG_ON()' when disable_bypass is set, and always 'break;' Signed-off-by: Anders Roxell Acked-by: Will Deacon Signed-off-by: Joerg Roedel drivers/iommu/arm-smmu-v3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8af23fad626173eed7cc02733874d4124049bd5e Author: Robin Murphy Date: Mon Jul 29 16:32:38 2019 +0100 iommu/dma: Handle MSI mappings separately MSI pages must always be mapped into a device's *current* domain, which *might* be the default DMA domain, but might instead be a VFIO domain with its own MSI cookie. This subtlety got accidentally lost in the streamlining of __iommu_dma_map(), but rather than reintroduce more complexity and/or special-casing, it turns out neater to just split this path out entirely. Since iommu_dma_get_msi_page() already duplicates much of what __iommu_dma_map() does, it can easily just make the allocation and mapping calls directly as well. That way we can further streamline the helper back to exclusively operating on DMA domains. Fixes: b61d271e59d7 ("iommu/dma: Move domain lookup into __iommu_dma_{map,unmap}") Reported-by: Shameer Kolothum Reported-by: Andre Przywara Signed-off-by: Robin Murphy Tested-by: Marc Zyngier Tested-by: Andre Przywara Tested-by: Shameer Kolothum Signed-off-by: Joerg Roedel drivers/iommu/dma-iommu.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit db341a049ec7e87053c91008cb452d0bfa6dde72 Author: Gustavo A. R. Silva Date: Tue Aug 6 03:08:08 2019 -0500 ata: rb532_cf: Fix unused variable warning in rb532_pata_driver_probe Fix the following warning (Building: rb532_defconfig mips): drivers/ata/pata_rb532_cf.c: In function ‘rb532_pata_driver_remove’: drivers/ata/pata_rb532_cf.c:161:24: warning: unused variable ‘info’ [-Wunused-variable] struct rb532_cf_info *info = ah->private_data; ^~~~ Fixes: cd56f35e52d9 ("ata: rb532_cf: Convert to use GPIO descriptors") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Jens Axboe drivers/ata/pata_rb532_cf.c | 1 - 1 file changed, 1 deletion(-) commit c1c6c877b0c79fd7e05c931435aa42211eaeebaf Author: Takashi Iwai Date: Tue Aug 6 14:03:56 2019 +0200 ALSA: hda - Don't override global PCM hw info flag The commit bfcba288b97f ("ALSA - hda: Add support for link audio time reporting") introduced the conditional PCM hw info setup, but it overwrites the global azx_pcm_hw object. This will cause a problem if any other HD-audio controller, as it'll inherit the same bit flag although another controller doesn't support that feature. Fix the bug by setting the PCM hw info flag locally. Fixes: bfcba288b97f ("ALSA - hda: Add support for link audio time reporting") Cc: Signed-off-by: Takashi Iwai sound/pci/hda/hda_controller.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 24350fdadbdec780406a1ef988e6cd3875e374a8 Author: Vasily Gorbik Date: Mon Aug 5 14:25:16 2019 +0200 s390: put _stext and _etext into .text section Perf relies on _etext and _stext symbols being one of 't', 'T', 'v' or 'V'. Put them into .text section to guarantee that. Also moves padding to page boundary inside .text which has an effect that .text section is now padded with nops rather than 0's, which apparently has been the initial intention for specifying 0x0700 fill expression. Reported-by: Thomas Richter Tested-by: Thomas Richter Suggested-by: Andreas Krebbel Signed-off-by: Vasily Gorbik arch/s390/kernel/vmlinux.lds.S | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit b9f23b7376c21f5bf7f5e2b7dfcb82cc9ce92dfc Author: Vasily Gorbik Date: Mon Aug 5 16:36:56 2019 +0200 s390/head64: cleanup unused labels Cleanup labels in head64 some of which are not being used since git recorded history. Acked-by: Heiko Carstens Signed-off-by: Vasily Gorbik arch/s390/kernel/head64.S | 7 ------- 1 file changed, 7 deletions(-) commit fd0c7435d7bfd46161ef43b185f55d759022238c Author: Vasily Gorbik Date: Mon Aug 5 15:07:19 2019 +0200 s390/unwind: remove stack recursion warning Remove pointless stack recursion on stack type ... warning, which only confuses people. There is no way to make backchain unwinder 100% reliable. When a task is interrupted in-between stack frame allocation and backchain write instructions new stack frame backchain pointer is left uninitialized (there are also sometimes additional instruction in-between stack frame allocation and backchain write instructions due to gcc shrink-wrapping). In attempt to unwind such stack the unwinder would still try to use that invalid backchain value and perform all kind of sanity checks on it to make sure we are not pointed out of stack. In some cases that invalid backchain value would be 0 and we would falsely treat next stackframe as pt_regs and again gprs[15] in those pt_regs might happen to point at some address within the task's stack. Acked-by: Heiko Carstens Signed-off-by: Vasily Gorbik arch/s390/kernel/dumpstack.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 218ddd5acfeae9e19a2fa97c284bf3c2e9de8ebd Author: Vasily Gorbik Date: Fri Aug 2 17:44:29 2019 +0200 s390/setup: adjust start_code of init_mm to _text After some investigation it doesn't look like init_mm fields start_code/end_code are used anywhere besides potentially in dump_mm for debugging purposes. Originally the value of 0 for start_code reflected the presence of lowcore and early boot code. But with kaslr in place start_code/end_code range should not span over unoccupied by the code segment memory. So, adjust init_mm start_code to point at the beginning of the code segment like other architectures do it. Acked-by: Heiko Carstens Signed-off-by: Vasily Gorbik arch/s390/kernel/setup.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8024b5a9fc2bed9a00f0bdba60b443fa3cc4bb5d Author: Vasily Gorbik Date: Fri Jul 26 08:23:20 2019 +0200 s390/mm: fix dump_pagetables top level page table walking Since commit d1874a0c2805 ("s390/mm: make the pxd_offset functions more robust") behaviour of p4d_offset, pud_offset and pmd_offset has been changed so that they cannot be used to iterate through top level page table, because the index for the top level page table is now calculated in pgd_offset. To avoid dumping the very first region/segment top level table entry 2048 times simply iterate entry pointer like it is already done in other page walking cases. Fixes: d1874a0c2805 ("s390/mm: make the pxd_offset functions more robust") Reported-by: Ilya Leoshkevich Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik arch/s390/mm/dump_pagetables.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit a287a49e672d9762bb85de117b477bdf3ef20bd5 Author: Vasily Gorbik Date: Fri Aug 2 13:27:22 2019 +0200 s390/protvirt: avoid memory sharing for diag 308 set/store This reverts commit db9492cef45e ("s390/protvirt: add memory sharing for diag 308 set/store") which due to ultravisor implementation change is not needed after all. Fixes: db9492cef45e ("s390/protvirt: add memory sharing for diag 308 set/store") Reviewed-by: Janosch Frank Signed-off-by: Vasily Gorbik arch/s390/boot/ipl_parm.c | 2 -- arch/s390/kernel/ipl.c | 9 --------- 2 files changed, 11 deletions(-) commit 04e048cf09d7b5fc995817cdc5ae1acd4482429c Author: Suren Baghdasaryan Date: Mon Jul 29 18:33:10 2019 -0700 sched/psi: Do not require setsched permission from the trigger creator When a process creates a new trigger by writing into /proc/pressure/* files, permissions to write such a file should be used to determine whether the process is allowed to do so or not. Current implementation would also require such a process to have setsched capability. Setting of psi trigger thread's scheduling policy is an implementation detail and should not be exposed to the user level. Remove the permission check by using _nocheck version of the function. Suggested-by: Nick Kralevich Signed-off-by: Suren Baghdasaryan Signed-off-by: Peter Zijlstra (Intel) Cc: lizefan@huawei.com Cc: mingo@redhat.com Cc: akpm@linux-foundation.org Cc: kernel-team@android.com Cc: dennisszhou@gmail.com Cc: dennis@kernel.org Cc: hannes@cmpxchg.org Cc: axboe@kernel.dk Link: https://lkml.kernel.org/r/20190730013310.162367-1-surenb@google.com kernel/sched/psi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 14f5c7b46a41a595fc61db37f55721714729e59e Author: Peter Zijlstra Date: Thu Aug 1 12:41:31 2019 +0200 sched/psi: Reduce psimon FIFO priority PSI defaults to a FIFO-99 thread, reduce this to FIFO-1. FIFO-99 is the very highest priority available to SCHED_FIFO and it not a suitable default; it would indicate the psi work is the most important work on the machine. Since Real-Time tasks will have pre-allocated memory and locked it in place, Real-Time tasks do not care about PSI. All it needs is to be above OTHER. Signed-off-by: Peter Zijlstra (Intel) Acked-by: Johannes Weiner Tested-by: Suren Baghdasaryan Cc: Thomas Gleixner kernel/sched/psi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f4904815f97a934258445a8f763f6b6c48f007e7 Author: Dietmar Eggemann Date: Fri Aug 2 15:59:43 2019 +0100 sched/deadline: Fix double accounting of rq/running bw in push & pull {push,pull}_dl_task() always calls {de,}activate_task() with .flags=0 which sets p->on_rq=TASK_ON_RQ_MIGRATING. {push,pull}_dl_task()->{de,}activate_task()->{de,en}queue_task()-> {de,en}queue_task_dl() calls {sub,add}_{running,rq}_bw() since p->on_rq==TASK_ON_RQ_MIGRATING. So {sub,add}_{running,rq}_bw() in {push,pull}_dl_task() is double-accounting for that task. Fix it by removing rq/running bw accounting in [push/pull]_dl_task(). Fixes: 7dd778841164 ("sched/core: Unify p->on_rq updates") Signed-off-by: Dietmar Eggemann Signed-off-by: Peter Zijlstra (Intel) Cc: Valentin Schneider Cc: Ingo Molnar Cc: Luca Abeni Cc: Daniel Bristot de Oliveira Cc: Juri Lelli Cc: Qais Yousef Link: https://lkml.kernel.org/r/20190802145945.18702-2-dietmar.eggemann@arm.com kernel/sched/deadline.c | 8 -------- 1 file changed, 8 deletions(-) commit e0f6974a54d3f7f1b5fdf5a593bd43ce9206ec04 Author: Roderick Colenbrander Date: Fri Aug 2 15:50:19 2019 -0700 HID: sony: Fix race condition between rumble and device remove. Valve reported a kernel crash on Ubuntu 18.04 when disconnecting a DS4 gamepad while rumble is enabled. This issue is reproducible with a frequency of 1 in 3 times in the game Borderlands 2 when using an automatic weapon, which triggers many rumble operations. We found the issue to be a race condition between sony_remove and the final device destruction by the HID / input system. The problem was that sony_remove didn't clean some of its work_item state in "struct sony_sc". After sony_remove work, the corresponding evdev node was around for sufficient time for applications to still queue rumble work after "sony_remove". On pre-4.19 kernels the race condition caused a kernel crash due to a NULL-pointer dereference as "sc->output_report_dmabuf" got freed during sony_remove. On newer kernels this crash doesn't happen due the buffer now being allocated using devm_kzalloc. However we can still queue work, while the driver is an undefined state. This patch fixes the described problem, by guarding the work_item "state_worker" with an initialized variable, which we are setting back to 0 on cleanup. Signed-off-by: Roderick Colenbrander CC: stable@vger.kernel.org Signed-off-by: Jiri Kosina drivers/hid/hid-sony.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit a67060201b746a308b1674f66bf289c9faef6d09 Author: Wenwen Wang Date: Tue Aug 6 03:00:27 2019 -0400 ALSA: usb-audio: fix a memory leak bug In snd_usb_get_audioformat_uac3(), a structure for channel maps 'chmap' is allocated through kzalloc() before the execution goto 'found_clock'. However, this structure is not deallocated if the memory allocation for 'pd' fails, leading to a memory leak bug. To fix the above issue, free 'fp->chmap' before returning NULL. Fixes: 7edf3b5e6a45 ("ALSA: usb-audio: AudioStreaming Power Domain parsing") Signed-off-by: Wenwen Wang Cc: Signed-off-by: Takashi Iwai sound/usb/stream.c | 1 + 1 file changed, 1 insertion(+) commit 6d4472d7bec39917b54e4e80245784ea5d60ce49 Author: Hillf Danton Date: Tue Aug 6 16:40:15 2019 +0800 HID: hiddev: do cleanup in failure of opening a device Undo what we did for opening before releasing the memory slice. Reported-by: syzbot Cc: Andrey Konovalov Signed-off-by: Hillf Danton Signed-off-by: Jiri Kosina drivers/hid/usbhid/hiddev.c | 4 ++++ 1 file changed, 4 insertions(+) commit 9c09b214f30e3c11f9b0b03f89442df03643794d Author: Hillf Danton Date: Tue Aug 6 16:38:58 2019 +0800 HID: hiddev: avoid opening a disconnected device syzbot found the following crash on: HEAD commit: e96407b4 usb-fuzzer: main usb gadget fuzzer driver git tree: https://github.com/google/kasan.git usb-fuzzer console output: https://syzkaller.appspot.com/x/log.txt?x=147ac20c600000 kernel config: https://syzkaller.appspot.com/x/.config?x=792eb47789f57810 dashboard link: https://syzkaller.appspot.com/bug?extid=62a1e04fd3ec2abf099e compiler: gcc (GCC) 9.0.0 20181231 (experimental) ================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x302a/0x3b50 kernel/locking/lockdep.c:3753 Read of size 8 at addr ffff8881cf591a08 by task syz-executor.1/26260 CPU: 1 PID: 26260 Comm: syz-executor.1 Not tainted 5.3.0-rc2+ #24 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0xca/0x13e lib/dump_stack.c:113 print_address_description+0x6a/0x32c mm/kasan/report.c:351 __kasan_report.cold+0x1a/0x33 mm/kasan/report.c:482 kasan_report+0xe/0x12 mm/kasan/common.c:612 __lock_acquire+0x302a/0x3b50 kernel/locking/lockdep.c:3753 lock_acquire+0x127/0x320 kernel/locking/lockdep.c:4412 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x32/0x50 kernel/locking/spinlock.c:159 hiddev_release+0x82/0x520 drivers/hid/usbhid/hiddev.c:221 __fput+0x2d7/0x840 fs/file_table.c:280 task_work_run+0x13f/0x1c0 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0x8ef/0x2c50 kernel/exit.c:878 do_group_exit+0x125/0x340 kernel/exit.c:982 get_signal+0x466/0x23d0 kernel/signal.c:2728 do_signal+0x88/0x14e0 arch/x86/kernel/signal.c:815 exit_to_usermode_loop+0x1a2/0x200 arch/x86/entry/common.c:159 prepare_exit_to_usermode arch/x86/entry/common.c:194 [inline] syscall_return_slowpath arch/x86/entry/common.c:274 [inline] do_syscall_64+0x45f/0x580 arch/x86/entry/common.c:299 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x459829 Code: fd b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 cb b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f75b2a6ccf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 000000000075c078 RCX: 0000000000459829 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 000000000075c078 RBP: 000000000075c070 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000075c07c R13: 00007ffcdfe1023f R14: 00007f75b2a6d9c0 R15: 000000000075c07c Allocated by task 104: save_stack+0x1b/0x80 mm/kasan/common.c:69 set_track mm/kasan/common.c:77 [inline] __kasan_kmalloc mm/kasan/common.c:487 [inline] __kasan_kmalloc.constprop.0+0xbf/0xd0 mm/kasan/common.c:460 kmalloc include/linux/slab.h:552 [inline] kzalloc include/linux/slab.h:748 [inline] hiddev_connect+0x242/0x5b0 drivers/hid/usbhid/hiddev.c:900 hid_connect+0x239/0xbb0 drivers/hid/hid-core.c:1882 hid_hw_start drivers/hid/hid-core.c:1981 [inline] hid_hw_start+0xa2/0x130 drivers/hid/hid-core.c:1972 appleir_probe+0x13e/0x1a0 drivers/hid/hid-appleir.c:308 hid_device_probe+0x2be/0x3f0 drivers/hid/hid-core.c:2209 really_probe+0x281/0x650 drivers/base/dd.c:548 driver_probe_device+0x101/0x1b0 drivers/base/dd.c:709 __device_attach_driver+0x1c2/0x220 drivers/base/dd.c:816 bus_for_each_drv+0x15c/0x1e0 drivers/base/bus.c:454 __device_attach+0x217/0x360 drivers/base/dd.c:882 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:514 device_add+0xae6/0x16f0 drivers/base/core.c:2114 hid_add_device+0x33c/0x990 drivers/hid/hid-core.c:2365 usbhid_probe+0xa81/0xfa0 drivers/hid/usbhid/hid-core.c:1386 usb_probe_interface+0x305/0x7a0 drivers/usb/core/driver.c:361 really_probe+0x281/0x650 drivers/base/dd.c:548 driver_probe_device+0x101/0x1b0 drivers/base/dd.c:709 __device_attach_driver+0x1c2/0x220 drivers/base/dd.c:816 bus_for_each_drv+0x15c/0x1e0 drivers/base/bus.c:454 __device_attach+0x217/0x360 drivers/base/dd.c:882 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:514 device_add+0xae6/0x16f0 drivers/base/core.c:2114 usb_set_configuration+0xdf6/0x1670 drivers/usb/core/message.c:2023 generic_probe+0x9d/0xd5 drivers/usb/core/generic.c:210 usb_probe_device+0x99/0x100 drivers/usb/core/driver.c:266 really_probe+0x281/0x650 drivers/base/dd.c:548 driver_probe_device+0x101/0x1b0 drivers/base/dd.c:709 __device_attach_driver+0x1c2/0x220 drivers/base/dd.c:816 bus_for_each_drv+0x15c/0x1e0 drivers/base/bus.c:454 __device_attach+0x217/0x360 drivers/base/dd.c:882 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:514 device_add+0xae6/0x16f0 drivers/base/core.c:2114 usb_new_device.cold+0x6a4/0xe79 drivers/usb/core/hub.c:2536 hub_port_connect drivers/usb/core/hub.c:5098 [inline] hub_port_connect_change drivers/usb/core/hub.c:5213 [inline] port_event drivers/usb/core/hub.c:5359 [inline] hub_event+0x1b5c/0x3640 drivers/usb/core/hub.c:5441 process_one_work+0x92b/0x1530 kernel/workqueue.c:2269 worker_thread+0x96/0xe20 kernel/workqueue.c:2415 kthread+0x318/0x420 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 Freed by task 104: save_stack+0x1b/0x80 mm/kasan/common.c:69 set_track mm/kasan/common.c:77 [inline] __kasan_slab_free+0x130/0x180 mm/kasan/common.c:449 slab_free_hook mm/slub.c:1423 [inline] slab_free_freelist_hook mm/slub.c:1470 [inline] slab_free mm/slub.c:3012 [inline] kfree+0xe4/0x2f0 mm/slub.c:3953 hiddev_connect.cold+0x45/0x5c drivers/hid/usbhid/hiddev.c:914 hid_connect+0x239/0xbb0 drivers/hid/hid-core.c:1882 hid_hw_start drivers/hid/hid-core.c:1981 [inline] hid_hw_start+0xa2/0x130 drivers/hid/hid-core.c:1972 appleir_probe+0x13e/0x1a0 drivers/hid/hid-appleir.c:308 hid_device_probe+0x2be/0x3f0 drivers/hid/hid-core.c:2209 really_probe+0x281/0x650 drivers/base/dd.c:548 driver_probe_device+0x101/0x1b0 drivers/base/dd.c:709 __device_attach_driver+0x1c2/0x220 drivers/base/dd.c:816 bus_for_each_drv+0x15c/0x1e0 drivers/base/bus.c:454 __device_attach+0x217/0x360 drivers/base/dd.c:882 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:514 device_add+0xae6/0x16f0 drivers/base/core.c:2114 hid_add_device+0x33c/0x990 drivers/hid/hid-core.c:2365 usbhid_probe+0xa81/0xfa0 drivers/hid/usbhid/hid-core.c:1386 usb_probe_interface+0x305/0x7a0 drivers/usb/core/driver.c:361 really_probe+0x281/0x650 drivers/base/dd.c:548 driver_probe_device+0x101/0x1b0 drivers/base/dd.c:709 __device_attach_driver+0x1c2/0x220 drivers/base/dd.c:816 bus_for_each_drv+0x15c/0x1e0 drivers/base/bus.c:454 __device_attach+0x217/0x360 drivers/base/dd.c:882 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:514 device_add+0xae6/0x16f0 drivers/base/core.c:2114 usb_set_configuration+0xdf6/0x1670 drivers/usb/core/message.c:2023 generic_probe+0x9d/0xd5 drivers/usb/core/generic.c:210 usb_probe_device+0x99/0x100 drivers/usb/core/driver.c:266 really_probe+0x281/0x650 drivers/base/dd.c:548 driver_probe_device+0x101/0x1b0 drivers/base/dd.c:709 __device_attach_driver+0x1c2/0x220 drivers/base/dd.c:816 bus_for_each_drv+0x15c/0x1e0 drivers/base/bus.c:454 __device_attach+0x217/0x360 drivers/base/dd.c:882 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:514 device_add+0xae6/0x16f0 drivers/base/core.c:2114 usb_new_device.cold+0x6a4/0xe79 drivers/usb/core/hub.c:2536 hub_port_connect drivers/usb/core/hub.c:5098 [inline] hub_port_connect_change drivers/usb/core/hub.c:5213 [inline] port_event drivers/usb/core/hub.c:5359 [inline] hub_event+0x1b5c/0x3640 drivers/usb/core/hub.c:5441 process_one_work+0x92b/0x1530 kernel/workqueue.c:2269 worker_thread+0x96/0xe20 kernel/workqueue.c:2415 kthread+0x318/0x420 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 The buggy address belongs to the object at ffff8881cf591900 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 264 bytes inside of 512-byte region [ffff8881cf591900, ffff8881cf591b00) The buggy address belongs to the page: page:ffffea00073d6400 refcount:1 mapcount:0 mapping:ffff8881da002500 index:0x0 compound_mapcount: 0 flags: 0x200000000010200(slab|head) raw: 0200000000010200 0000000000000000 0000000100000001 ffff8881da002500 raw: 0000000000000000 00000000000c000c 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881cf591900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881cf591980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb > ffff8881cf591a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8881cf591a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881cf591b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== In order to avoid opening a disconnected device, we need to check exist again after acquiring the existance lock, and bail out if necessary. Reported-by: syzbot Cc: Andrey Konovalov Signed-off-by: Hillf Danton Signed-off-by: Jiri Kosina drivers/hid/usbhid/hiddev.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit d1d03306659d24cba3f594bbbb11a22ef32f45fe Merge: c2913b140f90 7c0767643f3b Author: Takashi Iwai Date: Tue Aug 6 12:28:28 2019 +0200 Merge tag 'asoc-fix-v5.3-rc3-2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v5.3 Incremental fix removing executable bits added in a prior patch accidentally. commit c2913b140f901a705809f8b6c83998cf8147f848 Merge: 5d78e1c2b7f4 30c21734d853 Author: Takashi Iwai Date: Tue Aug 6 12:28:08 2019 +0200 Merge tag 'asoc-fix-v5.3-rc3' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v5.3 A relatively large batch of mostly unremarkable fixes here, a couple of small core fixes for fairly obscure issues, more comment/email updates with no code impact than usual and a bunch of small driver fixes. The support for new sample rates in the max98373 driver is a fix for the fact that the driver declared support for those rates but would in fact return an error if these rates were selected. commit 7c0767643f3b6b0dd2cda923ae37a18590d431cf Author: Mark Brown Date: Tue Aug 6 11:15:06 2019 +0100 ASoC: max98373: Remove executable bits Signed-off-by: Mark Brown sound/soc/codecs/max98373.c | 0 sound/soc/codecs/max98373.h | 0 2 files changed, 0 insertions(+), 0 deletions(-) commit e86d94fdda8e11a2acbe0a910e82f7519f6088b7 Author: Gustavo A. R. Silva Date: Mon Aug 5 14:32:32 2019 -0500 ARC: unwind: Mark expected switch fall-throughs Mark switch cases where we are expecting to fall through. This patch fixes the following warnings (Building: haps_hs_defconfig arc): arch/arc/kernel/unwind.c:827:20: warning: this statement may fall through [-Wimplicit-fallthrough=] arch/arc/kernel/unwind.c:836:20: warning: this statement may fall through [-Wimplicit-fallthrough=] Reviewed-by: Kees Cook Signed-off-by: Gustavo A. R. Silva Signed-off-by: Vineet Gupta arch/arc/kernel/unwind.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ee9d66182392695535cc9fccfcb40c16f72de2a9 Author: Sebastien Tisserant Date: Thu Aug 1 12:06:08 2019 -0500 SMB3: Kernel oops mounting a encryptData share with CONFIG_DEBUG_VIRTUAL Fix kernel oops when mounting a encryptData CIFS share with CONFIG_DEBUG_VIRTUAL Signed-off-by: Sebastien Tisserant Reviewed-by: Pavel Shilovsky Signed-off-by: Steve French fs/cifs/smb2ops.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 108624eaff6f17f1966e4a94dc7bc5df2c5115ee Author: Steve French Date: Wed Jul 31 16:41:03 2019 -0500 smb3: update TODO list of missing features minor cleanup of documentation, updating to more current status. Signed-off-by: Steve French Documentation/filesystems/cifs/TODO | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) commit 8d33096a460d5b9bd13300f01615df5bb454db10 Author: Steve French Date: Thu Jul 25 18:13:10 2019 -0500 smb3: send CAP_DFS capability during session setup We had a report of a server which did not do a DFS referral because the session setup Capabilities field was set to 0 (unlike negotiate protocol where we set CAP_DFS). Better to send it session setup in the capabilities as well (this also more closely matches Windows client behavior). Signed-off-by: Steve French Reviewed-off-by: Ronnie Sahlberg Reviewed-by: Pavel Shilovsky CC: Stable fs/cifs/smb2pdu.c | 5 +++++ 1 file changed, 5 insertions(+) commit 3edeb4a4146dc3b54d6fa71b7ee0585cb52ebfdf Author: Pavel Shilovsky Date: Mon Jul 22 11:38:22 2019 -0700 SMB3: Fix potential memory leak when processing compound chain When a reconnect happens in the middle of processing a compound chain the code leaks a buffer from the memory pool. Fix this by properly checking for a return code and freeing buffers in case of error. Also maintain a buf variable to be equal to either smallbuf or bigbuf depending on a response buffer size while parsing a chain and when returning to the caller. Signed-off-by: Pavel Shilovsky Reviewed-by: Ronnie Sahlberg Signed-off-by: Steve French fs/cifs/smb2ops.c | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) commit e99c63e4d86d3a94818693147b469fa70de6f945 Author: Pavel Shilovsky Date: Mon Jul 22 11:34:59 2019 -0700 SMB3: Fix deadlock in validate negotiate hits reconnect Currently we skip SMB2_TREE_CONNECT command when checking during reconnect because Tree Connect happens when establishing an SMB session. For SMB 3.0 protocol version the code also calls validate negotiate which results in SMB2_IOCL command being sent over the wire. This may deadlock on trying to acquire a mutex when checking for reconnect. Fix this by skipping SMB2_IOCL command when doing the reconnect check. Signed-off-by: Pavel Shilovsky Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg CC: Stable fs/cifs/smb2pdu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 74034a09267c1f48d5ce7ae4c4a317fac7d43418 Author: Gustavo A. R. Silva Date: Mon Aug 5 13:55:33 2019 -0500 MIPS: BCM63XX: Mark expected switch fall-through Mark switch cases where we are expecting to fall through. This patch fixes the following warning (Building: bcm63xx_defconfig mips): arch/mips/pci/ops-bcm63xx.c: In function ‘bcm63xx_pcie_can_access’: arch/mips/pci/ops-bcm63xx.c:474:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (PCI_SLOT(devfn) == 0) ^ arch/mips/pci/ops-bcm63xx.c:477:2: note: here default: ^~~~~~~ Signed-off-by: Gustavo A. R. Silva Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: Florian Fainelli Cc: bcm-kernel-feedback-list@broadcom.com Cc: linux-mips@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org arch/mips/pci/ops-bcm63xx.c | 1 + 1 file changed, 1 insertion(+) commit d75996dd022b6d83bd14af59b2775b1aa639e4b9 Author: Vivek Goyal Date: Fri Aug 2 15:29:56 2019 -0400 dax: dax_layout_busy_page() should not unmap cow pages Vivek: "As of now dax_layout_busy_page() calls unmap_mapping_range() with last argument as 1, which says even unmap cow pages. I am wondering who needs to get rid of cow pages as well. I noticed one interesting side affect of this. I mount xfs with -o dax and mmaped a file with MAP_PRIVATE and wrote some data to a page which created cow page. Then I called fallocate() on that file to zero a page of file. fallocate() called dax_layout_busy_page() which unmapped cow pages as well and then I tried to read back the data I wrote and what I get is old data from persistent memory. I lost the data I had written. This read basically resulted in new fault and read back the data from persistent memory. This sounds wrong. Are there any users which need to unmap cow pages as well? If not, I am proposing changing it to not unmap cow pages. I noticed this while while writing virtio_fs code where when I tried to reclaim a memory range and that corrupted the executable and I was running from virtio-fs and program got segment violation." Dan: "In fact the unmap_mapping_range() in this path is only to synchronize against get_user_pages_fast() and force it to call back into the filesystem to re-establish the mapping. COW pages should be left untouched by dax_layout_busy_page()." Cc: Fixes: 5fac7408d828 ("mm, fs, dax: handle layout changes to pinned dax mappings") Signed-off-by: Vivek Goyal Link: https://lore.kernel.org/r/20190802192956.GA3032@redhat.com Signed-off-by: Dan Williams fs/dax.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f7813d5c637e43209ffdc20a9b25a13fcbb86eef Merge: 091adf9ba6cd ead16e53c2f0 Author: David S. Miller Date: Mon Aug 5 14:44:53 2019 -0700 Merge tag 'linux-can-fixes-for-5.3-20190802' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2019-08-02 this is a pull request of 4 patches for net/master. The first two patches are by Wang Xiayang, they force that the string buffer during a dev_info() is properly NULL terminated. The last two patches are by Tomas Bortoli and fix both a potential info leak of kernel memory to USB devices. ==================== Signed-off-by: David S. Miller commit dc7f2cb218b5ef65ab3d455a0e62d27e44075203 Author: Xavier Ruppen Date: Fri Jul 19 21:29:54 2019 +0200 arm64: dts: amlogic: odroid-n2: keep SD card regulator always on When powering off the Odroid N2, the tflash_vdd regulator is automatically turned off by the kernel. This is a problem when issuing the "reboot" command while using an SD card. The boot ROM does not power this regulator back on, blocking the reboot process at the boot ROM stage, preventing the SD card from being detected. Adding the "regulator-always-on" property fixes the problem. Signed-off-by: Xavier Ruppen Suggested-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Fixes: c35f6dc5c377 ("arm64: dts: meson: Add minimal support for Odroid-N2") [khilman: minor subject change: s/meson/amlogic/] Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts | 1 + 1 file changed, 1 insertion(+) commit 54f374d1fd302fe6ca21220174c1dcb294049311 Author: Neil Armstrong Date: Mon Jul 1 13:57:24 2019 +0200 arm64: dts: meson-g12a-sei510: enable IR controller Enable the IR receiver controller on the SEI510 board. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts | 6 ++++++ 1 file changed, 6 insertions(+) commit 3d4bacdc207a7b62941700b374e7199cbb184a43 Author: Neil Armstrong Date: Tue Jun 25 14:36:47 2019 +0200 arm64: dts: meson-g12a: add missing dwc2 phy-names The G12A USB2 OTG capable PHY uses a 8bit large UTMI bus, and the OTG controller gets the PHY but width by probing the associated phy. By default it will use 16bit wide settings if a phy is not specified, in our case we specified the phy, but not the phy-names. The dwc2 bindings specifies that if phys is present, phy-names shall be "usb2-phy". Adding phy-names = "usb2-phy" solves the OTG PHY bus configuration. Fixes: 9baf7d6be730 ("arm64: dts: meson: g12a: Add G12A USB nodes") Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 1 + 1 file changed, 1 insertion(+) commit ba2c1340d7c8e1ba5957d814ec18592b315fd4de Author: Mans Rullgard Date: Thu Jul 4 20:33:54 2019 +0100 auxdisplay: charlcd: add help text for backlight initial state While the individual CHARLCD_BL_xxx options have help texts, the menu itself does not. Fix this. Suggested-by: Linus Torvalds Signed-off-by: Mans Rullgard [Added a bit more text to address Linus' suggestion] Signed-off-by: Miguel Ojeda drivers/auxdisplay/Kconfig | 5 +++++ 1 file changed, 5 insertions(+) commit b33d567560c1aadf3033290d74d4fd67af47aa61 Author: zhengbin Date: Mon Jul 8 20:42:18 2019 +0800 auxdisplay: panel: need to delete scan_timer when misc_register fails in panel_attach In panel_attach, if misc_register fails, we need to delete scan_timer, which was setup in keypad_init->init_scan_timer. Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Miguel Ojeda drivers/auxdisplay/panel.c | 2 ++ 1 file changed, 2 insertions(+) commit 091adf9ba6cdb432cbcc217b47e4ffb8aa0d8865 Author: Nikolay Aleksandrov Date: Fri Aug 2 13:57:36 2019 +0300 net: bridge: move default pvid init/deinit to NETDEV_REGISTER/UNREGISTER Most of the bridge device's vlan init bugs come from the fact that its default pvid is created at the wrong time, way too early in ndo_init() before the device is even assigned an ifindex. It introduces a bug when the bridge's dev_addr is added as fdb during the initial default pvid creation the notification has ifindex/NDA_MASTER both equal to 0 (see example below) which really makes no sense for user-space[0] and is wrong. Usually user-space software would ignore such entries, but they are actually valid and will eventually have all necessary attributes. It makes much more sense to send a notification *after* the device has registered and has a proper ifindex allocated rather than before when there's a chance that the registration might still fail or to receive it with ifindex/NDA_MASTER == 0. Note that we can remove the fdb flush from br_vlan_flush() since that case can no longer happen. At NETDEV_REGISTER br->default_pvid is always == 1 as it's initialized by br_vlan_init() before that and at NETDEV_UNREGISTER it can be anything depending why it was called (if called due to NETDEV_REGISTER error it'll still be == 1, otherwise it could be any value changed during the device life time). For the demonstration below a small change to iproute2 for printing all fdb notifications is added, because it contained a workaround not to show entries with ifindex == 0. Command executed while monitoring: $ ip l add br0 type bridge Before (both ifindex and master == 0): $ bridge monitor fdb 36:7e:8a:b3:56:ba dev * vlan 1 master * permanent After (proper br0 ifindex): $ bridge monitor fdb e6:2a:ae:7a:b7:48 dev br0 vlan 1 master br0 permanent v4: move only the default pvid init/deinit to NETDEV_REGISTER/UNREGISTER v3: send the correct v2 patch with all changes (stub should return 0) v2: on error in br_vlan_init set br->vlgrp to NULL and return 0 in the br_vlan_bridge_event stub when bridge vlans are disabled [0] https://bugzilla.kernel.org/show_bug.cgi?id=204389 Reported-by: michael-dev Fixes: 5be5a2df40f0 ("bridge: Add filtering support for default_pvid") Signed-off-by: Nikolay Aleksandrov Acked-by: Roopa Prabhu Signed-off-by: David S. Miller net/bridge/br.c | 5 ++++- net/bridge/br_private.h | 9 +++++---- net/bridge/br_vlan.c | 34 ++++++++++++++++------------------ 3 files changed, 25 insertions(+), 23 deletions(-) commit d934423ac26ed373dfe089734d505dca5ff679b6 Author: Arnaud Patard (Rtp) Date: Fri Aug 2 10:32:40 2019 +0200 drivers/net/ethernet/marvell/mvmdio.c: Fix non OF case Orion5.x systems are still using machine files and not device-tree. Commit 96cb4342382290c9 ("net: mvmdio: allow up to three clocks to be specified for orion-mdio") has replaced devm_clk_get() with of_clk_get(), leading to a oops at boot and not working network, as reported in https://lists.debian.org/debian-arm/2019/07/msg00088.html and possibly in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=908712. Link: https://lists.debian.org/debian-arm/2019/07/msg00088.html Fixes: 96cb4342382290c9 ("net: mvmdio: allow up to three clocks to be specified for orion-mdio") Signed-off-by: Arnaud Patard Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvmdio.c | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) commit cd2063604ea6a8c2683b4eb9b5f4c4da74592d87 Author: Ursula Braun Date: Fri Aug 2 10:47:50 2019 +0200 net/smc: avoid fallback in case of non-blocking connect FASTOPEN is not possible with SMC. sendmsg() with msg_flag MSG_FASTOPEN triggers a fallback to TCP if the socket is in state SMC_INIT. But if a nonblocking connect is already started, fallback to TCP is no longer possible, even though the socket may still be in state SMC_INIT. And if a nonblocking connect is already started, a listen() call does not make sense. Reported-by: syzbot+bd8cc73d665590a1fcad@syzkaller.appspotmail.com Fixes: 50717a37db032 ("net/smc: nonblocking connect rework") Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: David S. Miller net/smc/af_smc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit f9cedf1a9b1cdcfb0c52edb391d01771e43994a4 Author: Ursula Braun Date: Fri Aug 2 10:16:38 2019 +0200 net/smc: do not schedule tx_work in SMC_CLOSED state The setsockopts options TCP_NODELAY and TCP_CORK may schedule the tx worker. Make sure the socket is not yet moved into SMC_CLOSED state (for instance by a shutdown SHUT_RDWR call). Reported-by: syzbot+92209502e7aab127c75f@syzkaller.appspotmail.com Reported-by: syzbot+b972214bb803a343f4fe@syzkaller.appspotmail.com Fixes: 01d2f7e2cdd31 ("net/smc: sockopts TCP_NODELAY and TCP_CORK") Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: David S. Miller net/smc/af_smc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 438b43bdb95d3189e0098919f321c014ed71f410 Author: Catherine Sullivan Date: Thu Aug 1 16:07:31 2019 -0700 gve: Fix case where desc_cnt and data_cnt can get out of sync desc_cnt and data_cnt should always be equal. In the case of a dropped packet desc_cnt was still getting updated (correctly), data_cnt was not. To eliminate this bug and prevent it from recurring this patch combines them into one ring level cnt. Signed-off-by: Catherine Sullivan Reviewed-by: Sagi Shahar Signed-off-by: David S. Miller drivers/net/ethernet/google/gve/gve.h | 8 +++---- drivers/net/ethernet/google/gve/gve_ethtool.c | 4 ++-- drivers/net/ethernet/google/gve/gve_rx.c | 34 ++++++++++++--------------- 3 files changed, 20 insertions(+), 26 deletions(-) commit cff6a327d78b05c98e0d1c4be77225ea2c0bfe8e Author: David Ahern Date: Thu Aug 1 14:36:35 2019 -0700 ipv6: Fix unbalanced rcu locking in rt6_update_exception_stamp_rt The nexthop path in rt6_update_exception_stamp_rt needs to call rcu_read_unlock if it fails to find a fib6_nh match rather than just returning. Fixes: e659ba31d806 ("ipv6: Handle all fib6_nh in a nexthop in exception handling") Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv6/route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cd114d2e81f632104b3f1e804104060b97337410 Author: Jakub Kicinski Date: Thu Aug 1 14:36:02 2019 -0700 selftests/tls: add a litmus test for the socket reuse through shutdown Make sure that shutdown never works, and at the same time document how I tested to came to the conclusion that currently reuse is not possible. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller tools/testing/selftests/net/tls.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 5d92e631b8be8965a90c144320f06e096081a551 Author: Jakub Kicinski Date: Thu Aug 1 14:36:01 2019 -0700 net/tls: partially revert fix transition through disconnect with close Looks like we were slightly overzealous with the shutdown() cleanup. Even though the sock->sk_state can reach CLOSED again, socket->state will not got back to SS_UNCONNECTED once connections is ESTABLISHED. Meaning we will see EISCONN if we try to reconnect, and EINVAL if we try to listen. Only listen sockets can be shutdown() and reused, but since ESTABLISHED sockets can never be re-connected() or used for listen() we don't need to try to clean up the ULP state early. Fixes: 32857cf57f92 ("net/tls: fix transition through disconnect with close") Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller Documentation/networking/tls-offload.rst | 6 ---- include/net/tls.h | 2 -- net/tls/tls_main.c | 55 -------------------------------- 3 files changed, 63 deletions(-) commit 49da065f7b1f27be625de65d6d55bdd22ac6b5c2 Author: Logan Gunthorpe Date: Fri Jul 26 12:31:30 2019 -0600 NTB/msi: remove incorrect MODULE defines msi.c is not a module on its own right and should not have the MODULE_[LICENSE|VERSION|AUTHOR|DESCRIPTION] definitions. This caused a regression noticed by lkp with the following back trace: WARNING: CPU: 0 PID: 1 at kernel/params.c:861 param_sysfs_init+0xb1/0x20a Modules linked in: CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.2.0-rc1-00018-g26b3a37b928457 #2 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014 RIP: 0010:param_sysfs_init+0xb1/0x20a Code: 24 38 e8 ec 17 2e fd 49 8b 7c 24 38 e8 76 fe ff ff 48 85 c0 48 89 c5 74 25 31 d2 4c 89 e6 48 89 c7 e8 6d 6f 3c fd 85 c0 74 02 <0f> 0b 48 89 ef 31 f6 e8 5d 70 a7 fe 48 89 ef e8 95 52 a7 fe 48 83 RSP: 0000:ffff88806b0ffe30 EFLAGS: 00010282 RAX: 00000000ffffffef RBX: ffffffff83774220 RCX: ffff88806a85e880 RDX: 00000000ffffffef RSI: ffff88806b000400 RDI: ffff88806a8608c0 RBP: ffff88806b392000 R08: ffffed100d61ff59 R09: ffffed100d61ff59 R10: 0000000000000001 R11: ffffed100d61ff58 R12: ffffffff83974bc0 R13: 0000000000000004 R14: 0000000000000028 R15: 00000000000003b9 FS: 0000000000000000(0000) GS:ffff88806b800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 000000000380e000 CR4: 00000000000406b0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ? file_caps_disable+0x10/0x10 ? locate_module_kobject+0xf2/0xf2 do_one_initcall+0x47/0x1f0 kernel_init_freeable+0x1b1/0x243 ? rest_init+0xd0/0xd0 kernel_init+0xa/0x130 ? calculate_sigpending+0x63/0x80 ? rest_init+0xd0/0xd0 ret_from_fork+0x1f/0x30 ---[ end trace 78201497ae74cc91 ]--- Reported-by: kernel test robot Fixes: 26b3a37b9284 ("NTB: Introduce MSI library") Signed-off-by: Logan Gunthorpe Signed-off-by: Jon Mason drivers/ntb/msi.c | 5 ----- 1 file changed, 5 deletions(-) commit 0eb0ce0a78e1f57082bca6cbdea6fd04feedb876 Merge: df9edcba0b11 a4127952859a Author: Linus Torvalds Date: Mon Aug 5 11:49:02 2019 -0700 Merge tag 'spi-fix-v5.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "A bunch of small, device specific things here plus a DT bindings fix for the new validatable YAML binding format. The most notable thing is the fix for GPIO chip selects which fixes a corner case in updates of that code to modern APIs, unfortunately due to a historical mess the code around GPIO support is obscure, fragile and an ABI which makes and attempt to improve the situation painful" * tag 'spi-fix-v5.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: pxa2xx: Add support for Intel Tiger Lake spi: bcm2835: Fix 3-wire mode if DMA is enabled spi: pxa2xx: Balance runtime PM enable/disable on error spi: gpio: Add SPI_MASTER_GPIO_SS flag spi: spi-fsl-qspi: change i.MX7D RX FIFO size spi: dt-bindings: spi-controller: remove unnecessary 'maxItems: 1' from reg commit df9edcba0b1146da5e4a2d1921bbc10c1a2fb55d Merge: 9e9671cea72e 811ba489fa52 Author: Linus Torvalds Date: Mon Aug 5 11:47:02 2019 -0700 Merge tag 'regulator-fix-v5.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fixes from Mark Brown: "A few small driver specific fixes here plus one core fix for a refcounting problem with DT which will have little practical impact unless overlays are used" * tag 'regulator-fix-v5.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: of: Add of_node_put() before return in function regulator: lp87565: Fix probe failure for "ti,lp87565" regulator: axp20x: fix DCDC5 and DCDC6 for AXP803 regulator: axp20x: fix DCDCA and DCDCD for AXP806 commit 9e9671cea72e0652a8a0d03b7c96a8a798470c43 Merge: e21a712a9685 fbb01c52471c Author: Linus Torvalds Date: Mon Aug 5 11:43:16 2019 -0700 Merge tag 'linux-kselftest-5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull kselftest fixes from Shuah Khan: "A fix to the Kselftest framework to save and restore errno and a fix to livepatch to push and pop dynamic debug config" * tag 'linux-kselftest-5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests/livepatch: push and pop dynamic debug config kselftest: save-and-restore errno to allow for %m formatting commit cc798c83898ea0a77fcaa1a92afda35c3c3ded74 Author: Andrea Arcangeli Date: Mon Aug 5 10:34:04 2019 -0700 kernfs: fix memleak in kernel_ops_readdir() If getdents64 is killed or hits on segfault, it'll leave cgroups directories in sysfs pinned leaking memory because the kernfs node won't be freed on rmdir and the parent neither. Repro: # for i in `seq 1000`; do mkdir $i; done # rmdir * # for i in `seq 1000`; do mkdir $i; done # rmdir * # for i in `seq 1000`; do while :; do ls $i/ >/dev/null; done & done # while :; do killall ls; done kernfs_node_cache in /proc/slabinfo keeps going up as expected. Signed-off-by: Andrea Arcangeli Signed-off-by: Tejun Heo Cc: stable@vger.kernel.org # goes way back to original sysfs days Link: https://lore.kernel.org/r/20190805173404.GF136335@devbig004.ftw2.facebook.com Signed-off-by: Greg Kroah-Hartman fs/kernfs/dir.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 4130741736d4bc27add2ab4f7e53bc401846ce27 Merge: 60d60c8fbd8d 065af3554705 Author: David S. Miller Date: Mon Aug 5 11:17:40 2019 -0700 Merge branch 'net-fix-regressions-for-generic-XDP' Jesper Dangaard Brouer says: ==================== net: fix regressions for generic-XDP Thanks to Brandon Cazander, who wrote a very detailed bug report that even used perf probe's on xdp-newbies mailing list, we discovered that generic-XDP contains some regressions when using bpf_xdp_adjust_head(). First issue were that my selftests script, that use bpf_xdp_adjust_head(), by mistake didn't use generic-XDP any-longer. That selftest should have caught the real regression introduced in commit 458bf2f224f0 ("net: core: support XDP generic on stacked devices."). To verify this patchset fix the regressions, you can invoked manually via: cd tools/testing/selftests/bpf/ sudo ./test_xdp_vlan_mode_generic.sh sudo ./test_xdp_vlan_mode_native.sh ==================== Link: https://www.spinics.net/lists/xdp-newbies/msg01231.html Fixes: 458bf2f224f0 ("net: core: support XDP generic on stacked devices.") Reported by: Brandon Cazander Signed-off-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller commit 065af355470519bd184019a93ac579f22b036045 Author: Jesper Dangaard Brouer Date: Thu Aug 1 20:00:31 2019 +0200 net: fix bpf_xdp_adjust_head regression for generic-XDP When generic-XDP was moved to a later processing step by commit 458bf2f224f0 ("net: core: support XDP generic on stacked devices.") a regression was introduced when using bpf_xdp_adjust_head. The issue is that after this commit the skb->network_header is now changed prior to calling generic XDP and not after. Thus, if the header is changed by XDP (via bpf_xdp_adjust_head), then skb->network_header also need to be updated again. Fix by calling skb_reset_network_header(). Fixes: 458bf2f224f0 ("net: core: support XDP generic on stacked devices.") Reported-by: Brandon Cazander Signed-off-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller net/core/dev.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 13978d1e73d2fcfb6addcf3392707ad68fa88ccb Author: Jesper Dangaard Brouer Date: Thu Aug 1 20:00:26 2019 +0200 selftests/bpf: reduce time to execute test_xdp_vlan.sh Given the increasing number of BPF selftests, it makes sense to reduce the time to execute these tests. The ping parameters are adjusted to reduce the time from measures 9 sec to approx 2.8 sec. Signed-off-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller tools/testing/selftests/bpf/test_xdp_vlan.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit d35661fcf95d8818c1f9acc818a1bad23dda4e1c Author: Jesper Dangaard Brouer Date: Thu Aug 1 20:00:21 2019 +0200 selftests/bpf: add wrapper scripts for test_xdp_vlan.sh In-order to test both native-XDP (xdpdrv) and generic-XDP (xdpgeneric) create two wrapper test scripts, that start the test_xdp_vlan.sh script with these modes. Signed-off-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller tools/testing/selftests/bpf/Makefile | 3 ++- tools/testing/selftests/bpf/test_xdp_vlan.sh | 5 ++++- tools/testing/selftests/bpf/test_xdp_vlan_mode_generic.sh | 9 +++++++++ tools/testing/selftests/bpf/test_xdp_vlan_mode_native.sh | 9 +++++++++ 4 files changed, 24 insertions(+), 2 deletions(-) commit 4de9c89a4982431c4a02739743fd360dc5581f22 Author: Jesper Dangaard Brouer Date: Thu Aug 1 20:00:16 2019 +0200 bpf: fix XDP vlan selftests test_xdp_vlan.sh Change BPF selftest test_xdp_vlan.sh to (default) use generic XDP. This selftest was created together with a fix for generic XDP, in commit 297249569932 ("net: fix generic XDP to handle if eth header was mangled"). And was suppose to catch if generic XDP was broken again. The tests are using veth and assumed that veth driver didn't support native driver XDP, thus it used the (ip link set) 'xdp' attach that fell back to generic-XDP. But veth gained native-XDP support in 948d4f214fde ("veth: Add driver XDP"), which caused this test script to use native-XDP. Fixes: 948d4f214fde ("veth: Add driver XDP") Fixes: 97396ff0bc2d ("selftests/bpf: add XDP selftests for modifying and popping VLAN headers") Signed-off-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller tools/testing/selftests/bpf/test_xdp_vlan.sh | 42 ++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 6 deletions(-) commit 60d60c8fbd8d1acf25b041ecd72ae4fa16e9405b Author: Qian Cai Date: Thu Aug 1 09:52:54 2019 -0400 net/mlx5e: always initialize frag->last_in_page The commit 069d11465a80 ("net/mlx5e: RX, Enhance legacy Receive Queue memory scheme") introduced an undefined behaviour below due to "frag->last_in_page" is only initialized in mlx5e_init_frags_partition() when, if (next_frag.offset + frag_info[f].frag_stride > PAGE_SIZE) or after bailed out the loop, for (i = 0; i < mlx5_wq_cyc_get_size(&rq->wqe.wq); i++) As the result, there could be some "frag" have uninitialized value of "last_in_page". Later, get_frag() obtains those "frag" and check "frag->last_in_page" in mlx5e_put_rx_frag() and triggers the error during boot. Fix it by always initializing "frag->last_in_page" to "false" in mlx5e_init_frags_partition(). UBSAN: Undefined behaviour in drivers/net/ethernet/mellanox/mlx5/core/en_rx.c:325:12 load of value 170 is not a valid value for type 'bool' (aka '_Bool') Call trace: dump_backtrace+0x0/0x264 show_stack+0x20/0x2c dump_stack+0xb0/0x104 __ubsan_handle_load_invalid_value+0x104/0x128 mlx5e_handle_rx_cqe+0x8e8/0x12cc [mlx5_core] mlx5e_poll_rx_cq+0xca8/0x1a94 [mlx5_core] mlx5e_napi_poll+0x17c/0xa30 [mlx5_core] net_rx_action+0x248/0x940 __do_softirq+0x350/0x7b8 irq_exit+0x200/0x26c __handle_domain_irq+0xc8/0x128 gic_handle_irq+0x138/0x228 el1_irq+0xb8/0x140 arch_cpu_idle+0x1a4/0x348 do_idle+0x114/0x1b0 cpu_startup_entry+0x24/0x28 rest_init+0x1ac/0x1dc arch_call_rest_init+0x10/0x18 start_kernel+0x4d4/0x57c Fixes: 069d11465a80 ("net/mlx5e: RX, Enhance legacy Receive Queue memory scheme") Signed-off-by: Qian Cai Reviewed-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 7be8ef2cdbfe41a2e524b7c6cc3f8e6cfaa906e4 Author: Dmytro Linkin Date: Thu Aug 1 13:02:51 2019 +0000 net: sched: use temporary variable for actions indexes Currently init call of all actions (except ipt) init their 'parm' structure as a direct pointer to nla data in skb. This leads to race condition when some of the filter actions were initialized successfully (and were assigned with idr action index that was written directly into nla data), but then were deleted and retried (due to following action module missing or classifier-initiated retry), in which case action init code tries to insert action to idr with index that was assigned on previous iteration. During retry the index can be reused by another action that was inserted concurrently, which causes unintended action sharing between filters. To fix described race condition, save action idr index to temporary stack-allocated variable instead on nla data. Fixes: 0190c1d452a9 ("net: sched: atomically check-allocate action") Signed-off-by: Dmytro Linkin Signed-off-by: Vlad Buslov Acked-by: Cong Wang Signed-off-by: David S. Miller net/sched/act_bpf.c | 9 +++++---- net/sched/act_connmark.c | 9 +++++---- net/sched/act_csum.c | 9 +++++---- net/sched/act_ct.c | 9 +++++---- net/sched/act_ctinfo.c | 9 +++++---- net/sched/act_gact.c | 8 +++++--- net/sched/act_ife.c | 8 +++++--- net/sched/act_mirred.c | 13 +++++++------ net/sched/act_mpls.c | 8 +++++--- net/sched/act_nat.c | 9 +++++---- net/sched/act_pedit.c | 10 ++++++---- net/sched/act_police.c | 8 +++++--- net/sched/act_sample.c | 10 +++++----- net/sched/act_simple.c | 10 ++++++---- net/sched/act_skbedit.c | 11 ++++++----- net/sched/act_skbmod.c | 11 ++++++----- net/sched/act_tunnel_key.c | 8 +++++--- net/sched/act_vlan.c | 16 +++++++++------- 18 files changed, 100 insertions(+), 75 deletions(-) commit 7fb5a711545d7d25fe9726a9ad277474dd83bd06 Author: Hubert Feurstein Date: Wed Jul 31 17:42:39 2019 +0200 net: dsa: mv88e6xxx: drop adjust_link to enabled phylink We have to drop the adjust_link callback in order to finally migrate to phylink. Otherwise we get the following warning during startup: "mv88e6xxx 2188000.ethernet-1:10: Using legacy PHYLIB callbacks. Please migrate to PHYLINK!" The warning is generated in the function dsa_port_link_register_of in dsa/port.c: int dsa_port_link_register_of(struct dsa_port *dp) { struct dsa_switch *ds = dp->ds; if (!ds->ops->adjust_link) return dsa_port_phylink_register(dp); dev_warn(ds->dev, "Using legacy PHYLIB callbacks. Please migrate to PHYLINK!\n"); [...] } Signed-off-by: Hubert Feurstein Reviewed-by: Andrew Lunn Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 26 -------------------------- 1 file changed, 26 deletions(-) commit c3953a3c2d3175d2f9f0304c9a1ba89e7743c5e4 Author: Johan Hovold Date: Mon Aug 5 12:00:55 2019 +0200 NFC: nfcmrvl: fix gpio-handling regression Fix two reset-gpio sanity checks which were never converted to use gpio_is_valid(), and make sure to use -EINVAL to indicate a missing reset line also for the UART-driver module parameter and for the USB driver. This specifically prevents the UART and USB drivers from incidentally trying to request and use gpio 0, and also avoids triggering a WARN() in gpio_to_desc() during probe when no valid reset line has been specified. Fixes: e33a3f84f88f ("NFC: nfcmrvl: allow gpio 0 for reset signalling") Reported-by: syzbot+cf35b76f35e068a1107f@syzkaller.appspotmail.com Tested-by: syzbot+cf35b76f35e068a1107f@syzkaller.appspotmail.com Signed-off-by: Johan Hovold drivers/nfc/nfcmrvl/main.c | 4 ++-- drivers/nfc/nfcmrvl/uart.c | 4 ++-- drivers/nfc/nfcmrvl/usb.c | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) commit b9ddd5091160793ee9fac10da765cf3f53d2aaf0 Author: Jacopo Mondi Date: Mon Aug 5 17:55:15 2019 +0200 iio: adc: max9611: Fix temperature reading in probe The max9611 driver reads the die temperature at probe time to validate the communication channel. Use the actual read value to perform the test instead of the read function return value, which was mistakenly used so far. The temperature reading test was only successful because the 0 return value is in the range of supported temperatures. Fixes: 69780a3bbc0b ("iio: adc: Add Maxim max9611 ADC driver") Signed-off-by: Jacopo Mondi Cc: Signed-off-by: Jonathan Cameron drivers/iio/adc/max9611.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 82a5008a341d301da3ab529ca888c64f529bd075 Author: Nuno Sá Date: Mon Aug 5 15:37:16 2019 +0200 iio: frequency: adf4371: Fix output frequency setting The fract1 word was not being properly programmed on the device leading to wrong output frequencies. Fixes: 7f699bd14913 (iio: frequency: adf4371: Add support for ADF4371 PLL) Signed-off-by: Nuno Sá Reviewed-by: Stefan Popa Cc: Signed-off-by: Jonathan Cameron drivers/iio/frequency/adf4371.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 0dda5907b0fc60f72f67f479f224e02c95d06e21 Author: Nishad Kamdar Date: Sat Aug 3 19:43:35 2019 +0530 i2c: stm32: Use the correct style for SPDX License Identifier This patch corrects the SPDX License Identifier style in header file related to STM32 Driver for I2C hardware bus support. For C header files Documentation/process/license-rules.rst mandates C-like comments (opposed to C source files where C++ style should be used) Changes made by using a script provided by Joe Perches here: https://lkml.org/lkml/2019/2/7/46 Suggested-by: Joe Perches Signed-off-by: Nishad Kamdar Signed-off-by: Greg Kroah-Hartman drivers/i2c/busses/i2c-stm32.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c43f28dfdc4654e738aa6d3fd08a105b2bee758d Author: Gavin Li Date: Sun Aug 4 16:50:44 2019 -0700 usb: usbfs: fix double-free of usb memory upon submiturb error Upon an error within proc_do_submiturb(), dec_usb_memory_use_count() gets called once by the error handling tail and again by free_async(). Remove the first call. Signed-off-by: Gavin Li Acked-by: Alan Stern Cc: stable Link: https://lore.kernel.org/r/20190804235044.22327-1-gavinli@thegavinli.com Signed-off-by: Greg Kroah-Hartman drivers/usb/core/devio.c | 2 -- 1 file changed, 2 deletions(-) commit fc05481b2fcabaaeccf63e32ac1baab54e5b6963 Author: Suzuki K Poulose Date: Mon Aug 5 12:15:28 2019 +0100 usb: yurex: Fix use-after-free in yurex_delete syzbot reported the following crash [0]: BUG: KASAN: use-after-free in usb_free_coherent+0x79/0x80 drivers/usb/core/usb.c:928 Read of size 8 at addr ffff8881b18599c8 by task syz-executor.4/16007 CPU: 0 PID: 16007 Comm: syz-executor.4 Not tainted 5.3.0-rc2+ #23 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0xca/0x13e lib/dump_stack.c:113 print_address_description+0x6a/0x32c mm/kasan/report.c:351 __kasan_report.cold+0x1a/0x33 mm/kasan/report.c:482 kasan_report+0xe/0x12 mm/kasan/common.c:612 usb_free_coherent+0x79/0x80 drivers/usb/core/usb.c:928 yurex_delete+0x138/0x330 drivers/usb/misc/yurex.c:100 kref_put include/linux/kref.h:65 [inline] yurex_release+0x66/0x90 drivers/usb/misc/yurex.c:392 __fput+0x2d7/0x840 fs/file_table.c:280 task_work_run+0x13f/0x1c0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_usermode_loop+0x1d2/0x200 arch/x86/entry/common.c:163 prepare_exit_to_usermode arch/x86/entry/common.c:194 [inline] syscall_return_slowpath arch/x86/entry/common.c:274 [inline] do_syscall_64+0x45f/0x580 arch/x86/entry/common.c:299 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x413511 Code: 75 14 b8 03 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 04 1b 00 00 c3 48 83 ec 08 e8 0a fc ff ff 48 89 04 24 b8 03 00 00 00 0f 05 <48> 8b 3c 24 48 89 c2 e8 53 fc ff ff 48 89 d0 48 83 c4 08 48 3d 01 RSP: 002b:00007ffc424ea2e0 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000007 RCX: 0000000000413511 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000006 RBP: 0000000000000001 R08: 0000000029a2fc22 R09: 0000000029a2fc26 R10: 00007ffc424ea3c0 R11: 0000000000000293 R12: 000000000075c9a0 R13: 000000000075c9a0 R14: 0000000000761938 R15: ffffffffffffffff Allocated by task 2776: save_stack+0x1b/0x80 mm/kasan/common.c:69 set_track mm/kasan/common.c:77 [inline] __kasan_kmalloc mm/kasan/common.c:487 [inline] __kasan_kmalloc.constprop.0+0xbf/0xd0 mm/kasan/common.c:460 kmalloc include/linux/slab.h:552 [inline] kzalloc include/linux/slab.h:748 [inline] usb_alloc_dev+0x51/0xf95 drivers/usb/core/usb.c:583 hub_port_connect drivers/usb/core/hub.c:5004 [inline] hub_port_connect_change drivers/usb/core/hub.c:5213 [inline] port_event drivers/usb/core/hub.c:5359 [inline] hub_event+0x15c0/0x3640 drivers/usb/core/hub.c:5441 process_one_work+0x92b/0x1530 kernel/workqueue.c:2269 worker_thread+0x96/0xe20 kernel/workqueue.c:2415 kthread+0x318/0x420 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 Freed by task 16007: save_stack+0x1b/0x80 mm/kasan/common.c:69 set_track mm/kasan/common.c:77 [inline] __kasan_slab_free+0x130/0x180 mm/kasan/common.c:449 slab_free_hook mm/slub.c:1423 [inline] slab_free_freelist_hook mm/slub.c:1470 [inline] slab_free mm/slub.c:3012 [inline] kfree+0xe4/0x2f0 mm/slub.c:3953 device_release+0x71/0x200 drivers/base/core.c:1064 kobject_cleanup lib/kobject.c:693 [inline] kobject_release lib/kobject.c:722 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x171/0x280 lib/kobject.c:739 put_device+0x1b/0x30 drivers/base/core.c:2213 usb_put_dev+0x1f/0x30 drivers/usb/core/usb.c:725 yurex_delete+0x40/0x330 drivers/usb/misc/yurex.c:95 kref_put include/linux/kref.h:65 [inline] yurex_release+0x66/0x90 drivers/usb/misc/yurex.c:392 __fput+0x2d7/0x840 fs/file_table.c:280 task_work_run+0x13f/0x1c0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_usermode_loop+0x1d2/0x200 arch/x86/entry/common.c:163 prepare_exit_to_usermode arch/x86/entry/common.c:194 [inline] syscall_return_slowpath arch/x86/entry/common.c:274 [inline] do_syscall_64+0x45f/0x580 arch/x86/entry/common.c:299 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8881b1859980 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 72 bytes inside of 2048-byte region [ffff8881b1859980, ffff8881b185a180) The buggy address belongs to the page: page:ffffea0006c61600 refcount:1 mapcount:0 mapping:ffff8881da00c000 index:0x0 compound_mapcount: 0 flags: 0x200000000010200(slab|head) raw: 0200000000010200 0000000000000000 0000000100000001 ffff8881da00c000 raw: 0000000000000000 00000000000f000f 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881b1859880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8881b1859900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc > ffff8881b1859980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8881b1859a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881b1859a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== A quick look at the yurex_delete() shows that we drop the reference to the usb_device before releasing any buffers associated with the device. Delay the reference drop until we have finished the cleanup. [0] https://lore.kernel.org/lkml/0000000000003f86d8058f0bd671@google.com/ Fixes: 6bc235a2e24a5e ("USB: add driver for Meywa-Denki & Kayac YUREX") Cc: Jiri Kosina Cc: Tomoki Sekiyama Cc: Oliver Neukum Cc: andreyknvl@google.com Cc: gregkh@linuxfoundation.org Cc: Alan Stern Cc: syzkaller-bugs@googlegroups.com Cc: dtor@chromium.org Reported-by: syzbot+d1fedb1c1fdb07fca507@syzkaller.appspotmail.com Signed-off-by: Suzuki K Poulose Cc: stable Link: https://lore.kernel.org/r/20190805111528.6758-1-suzuki.poulose@arm.com Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/yurex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5eeaf10eec394b28fad2c58f1f5c3a5da0e87d1c Author: Marc Zyngier Date: Fri Aug 2 10:28:32 2019 +0100 KVM: arm/arm64: Sync ICH_VMCR_EL2 back when about to block Since commit commit 328e56647944 ("KVM: arm/arm64: vgic: Defer touching GICH_VMCR to vcpu_load/put"), we leave ICH_VMCR_EL2 (or its GICv2 equivalent) loaded as long as we can, only syncing it back when we're scheduled out. There is a small snag with that though: kvm_vgic_vcpu_pending_irq(), which is indirectly called from kvm_vcpu_check_block(), needs to evaluate the guest's view of ICC_PMR_EL1. At the point were we call kvm_vcpu_check_block(), the vcpu is still loaded, and whatever changes to PMR is not visible in memory until we do a vcpu_put(). Things go really south if the guest does the following: mov x0, #0 // or any small value masking interrupts msr ICC_PMR_EL1, x0 [vcpu preempted, then rescheduled, VMCR sampled] mov x0, #ff // allow all interrupts msr ICC_PMR_EL1, x0 wfi // traps to EL2, so samping of VMCR [interrupt arrives just after WFI] Here, the hypervisor's view of PMR is zero, while the guest has enabled its interrupts. kvm_vgic_vcpu_pending_irq() will then say that no interrupts are pending (despite an interrupt being received) and we'll block for no reason. If the guest doesn't have a periodic interrupt firing once it has blocked, it will stay there forever. To avoid this unfortuante situation, let's resync VMCR from kvm_arch_vcpu_blocking(), ensuring that a following kvm_vcpu_check_block() will observe the latest value of PMR. This has been found by booting an arm64 Linux guest with the pseudo NMI feature, and thus using interrupt priorities to mask interrupts instead of the usual PSTATE masking. Cc: stable@vger.kernel.org # 4.12 Fixes: 328e56647944 ("KVM: arm/arm64: vgic: Defer touching GICH_VMCR to vcpu_load/put") Signed-off-by: Marc Zyngier include/kvm/arm_vgic.h | 1 + virt/kvm/arm/arm.c | 11 +++++++++++ virt/kvm/arm/vgic/vgic-v2.c | 9 ++++++++- virt/kvm/arm/vgic/vgic-v3.c | 7 ++++++- virt/kvm/arm/vgic/vgic.c | 11 +++++++++++ virt/kvm/arm/vgic/vgic.h | 2 ++ 6 files changed, 39 insertions(+), 2 deletions(-) commit f7ccbed656f78212593ca965d9a8f34bf24e0aab Author: Douglas Anderson Date: Fri Aug 2 11:46:16 2019 -0700 drm/rockchip: Suspend DP late In commit fe64ba5c6323 ("drm/rockchip: Resume DP early") we moved resume to be early but left suspend at its normal time. This seems like it could be OK, but casues problems if a suspend gets interrupted partway through. The OS only balances matching suspend/resume levels. ...so if suspend was called then resume will be called. If suspend late was called then resume early will be called. ...but if suspend was called resume early might not get called. This leads to an unbalance in the clock enables / disables. Lets take the simple fix and just move suspend to be late to match. This makes the PM core take proper care in keeping things balanced. Fixes: fe64ba5c6323 ("drm/rockchip: Resume DP early") Signed-off-by: Douglas Anderson Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190802184616.44822-1-dianders@chromium.org drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ce0eff0d9b4d37702df48a39e3fddb5e39b2c25b Author: Eugeniy Paltsev Date: Mon Jul 22 12:31:45 2019 +0300 ARC: [plat-hsdk]: allow to switch between AXI DMAC port configurations We want to use DW AXI DMAC on HSDK board in our automated verification to test cache & dma kernel code changes. This is perfect candidate as we don't depend on any external peripherals like MMC card / USB storage / etc. To increase test coverage we want to test both options: * DW AXI DMAC is connected through IOC port & dma direct ops used * DW AXI DMAC is connected to DDR port & dma noncoherent ops used Introduce 'arc_hsdk_axi_dmac_coherent' global variable which can be modified by debugger (same way as we patch 'ioc_enable') to switch between these options without recompiling the kernel. Depend on this value we tweak memory bridge configuration and "dma-coherent" DTS property of DW AXI DMAC. Signed-off-by: Eugeniy Paltsev Acked-by: Alexey Brodkin Signed-off-by: Vineet Gupta arch/arc/boot/dts/Makefile | 3 ++ arch/arc/plat-hsdk/platform.c | 87 +++++++++++++++++++++++++++++++++++++------ 2 files changed, 78 insertions(+), 12 deletions(-) commit 1c703b53e5bfb5c2205c30f0fb157ce271fd42fb Author: Nicolas Saenz Julienne Date: Tue Jun 11 14:13:20 2019 +0200 HID: input: fix a4tech horizontal wheel custom usage Some a4tech mice use the 'GenericDesktop.00b8' usage to inform whether the previous wheel report was horizontal or vertical. Before c01908a14bf73 ("HID: input: add mapping for "Toggle Display" key") this usage was being mapped to 'Relative.Misc'. After the patch it's simply ignored (usage->type == 0 & usage->code == 0). Which ultimately makes hid-a4tech ignore the WHEEL/HWHEEL selection event, as it has no usage->type. We shouldn't rely on a mapping for that usage as it's nonstandard and doesn't really map to an input event. So we bypass the mapping and make sure the custom event handling properly handles both reports. Fixes: c01908a14bf73 ("HID: input: add mapping for "Toggle Display" key") Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Jiri Kosina drivers/hid/hid-a4tech.c | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) commit 49869d2ea9eecc105a10724c1abf035151a3c4e2 Author: Sebastian Parschauer Date: Wed Jul 24 20:40:03 2019 +0200 HID: Add quirk for HP X1200 PIXART OEM mouse The PixArt OEM mice are known for disconnecting every minute in runlevel 1 or 3 if they are not always polled. So add quirk ALWAYS_POLL for this one as well. Jonathan Teh (@jonathan-teh) reported and tested the quirk. Reference: https://github.com/sriemer/fix-linux-mouse/issues/15 Signed-off-by: Sebastian Parschauer CC: stable@vger.kernel.org Signed-off-by: Jiri Kosina drivers/hid/hid-ids.h | 1 + drivers/hid/hid-quirks.c | 1 + 2 files changed, 2 insertions(+) commit 01ec0a5f19c8c82960a07f6c7410fc9e01d7fb51 Author: Oliver Neukum Date: Thu Jul 25 15:13:33 2019 +0200 HID: holtek: test for sanity of intfdata The ioctl handler uses the intfdata of a second interface, which may not be present in a broken or malicious device, hence the intfdata needs to be checked for NULL. [jkosina@suse.cz: fix newly added spurious space] Reported-by: syzbot+965152643a75a56737be@syzkaller.appspotmail.com Signed-off-by: Oliver Neukum Signed-off-by: Jiri Kosina drivers/hid/hid-holtek-kbd.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 693c3dab4e50403f91bca4b52fc6d8562a3180f6 Author: Aaron Armstrong Skomra Date: Tue Jul 23 11:09:15 2019 -0700 HID: wacom: fix bit shift for Cintiq Companion 2 The bit indicating BTN_6 on this device is overshifted by 2 bits, resulting in the incorrect button being reported. Also fix copy-paste mistake in comments. Signed-off-by: Aaron Armstrong Skomra Reviewed-by: Ping Cheng Link: https://github.com/linuxwacom/xf86-input-wacom/issues/71 Fixes: c7f0522a1ad1 ("HID: wacom: Slim down wacom_intuos_pad processing") Cc: # v4.5+ Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 7bc74853fd61432ec59f812a40425bf6d8c986a4 Author: István Váradi Date: Wed Jul 24 20:09:18 2019 +0200 HID: quirks: Set the INCREMENT_USAGE_ON_DUPLICATE quirk on Saitek X52 The Saitek X52 joystick has a pair of axes that are originally (by the Windows driver) used as mouse pointer controls. The corresponding usage->hid values are 0x50024 and 0x50026. Thus they are handled as unknown axes and both get mapped to ABS_MISC. The quirk makes the second axis to be mapped to ABS_MISC1 and thus made available separately. [jkosina@suse.cz: squashed two patches into one] Signed-off-by: István Váradi Signed-off-by: Jiri Kosina drivers/hid/hid-ids.h | 1 + drivers/hid/hid-quirks.c | 1 + 2 files changed, 2 insertions(+) commit 552573e42aab5f75aff9bab855a9677979d9a7d5 Author: Rogan Dawes Date: Wed Jul 17 11:11:34 2019 +0200 USB: serial: option: add D-Link DWM-222 device ID Add device id for D-Link DWM-222 A2. MI_00 D-Link HS-USB Diagnostics MI_01 D-Link HS-USB Modem MI_02 D-Link HS-USB AT Port MI_03 D-Link HS-USB NMEA MI_04 D-Link HS-USB WWAN Adapter (qmi_wwan) MI_05 USB Mass Storage Device Cc: stable@vger.kernel.org Signed-off-by: Rogan Dawes Signed-off-by: Johan Hovold drivers/usb/serial/option.c | 2 ++ 1 file changed, 2 insertions(+) commit 7e7ae38bf928c5cfa6dd6e9a2cf8b42c84a27c92 Author: Yoshiaki Okamoto Date: Sat Jul 20 22:23:18 2019 +0900 USB: serial: option: Add support for ZTE MF871A This patch adds support for MF871A USB modem (aka Speed USB STICK U03) to option driver. This modem is manufactured by ZTE corporation, and sold by KDDI. Interface layout: 0: AT 1: MODEM usb-devices output: T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 9 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=19d2 ProdID=1481 Rev=52.87 S: Manufacturer=ZTE,Incorporated S: Product=ZTE Technologies MSM S: SerialNumber=1234567890ABCDEF C: #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=500mA I: If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option I: If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option Co-developed-by: Hiroyuki Yamamoto Signed-off-by: Hiroyuki Yamamoto Signed-off-by: Yoshiaki Okamoto Cc: stable Signed-off-by: Johan Hovold drivers/usb/serial/option.c | 1 + 1 file changed, 1 insertion(+) commit 57b76bdb20ecb05c87f4e12b7ced66bc03a976c3 Author: Paolo Bonzini Date: Thu Jul 25 12:59:40 2019 +0200 x86: kvm: remove useless calls to kvm_para_available Most code in arch/x86/kernel/kvm.c is called through x86_hyper_kvm, and thus only runs if KVM has been detected. There is no need to check again for the CPUID base. Cc: Sergio Lopez Cc: Jan Kiszka Signed-off-by: Paolo Bonzini arch/x86/kernel/kvm.c | 8 -------- 1 file changed, 8 deletions(-) commit 3e7093d045196b1016517631645e874fe903db7e Author: Greg KH Date: Wed Jul 31 20:56:20 2019 +0200 KVM: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Also, when doing this, change kvm_arch_create_vcpu_debugfs() to return void instead of an integer, as we should not care at all about if this function actually does anything or not. Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: Cc: Signed-off-by: Greg Kroah-Hartman Signed-off-by: Paolo Bonzini arch/x86/kvm/debugfs.c | 41 +++++++++++++---------------------------- include/linux/kvm_host.h | 2 +- virt/kvm/kvm_main.c | 21 +++++---------------- 3 files changed, 19 insertions(+), 45 deletions(-) commit 741cbbae0768b828be2d48331eb371a4f08bbea8 Author: Paolo Bonzini Date: Sat Aug 3 08:14:25 2019 +0200 KVM: remove kvm_arch_has_vcpu_debugfs() There is no need for this function as all arches have to implement kvm_arch_create_vcpu_debugfs() no matter what. A #define symbol let us actually simplify the code. Signed-off-by: Paolo Bonzini arch/mips/kvm/mips.c | 10 ---------- arch/powerpc/kvm/powerpc.c | 10 ---------- arch/s390/kvm/kvm-s390.c | 10 ---------- arch/x86/include/asm/kvm_host.h | 2 ++ arch/x86/kvm/debugfs.c | 5 ----- include/linux/kvm_host.h | 3 ++- virt/kvm/arm/arm.c | 5 ----- virt/kvm/kvm_main.c | 5 ++--- 8 files changed, 6 insertions(+), 44 deletions(-) commit 17e433b54393a6269acbcb792da97791fe1592d8 Author: Wanpeng Li Date: Mon Aug 5 10:03:19 2019 +0800 KVM: Fix leak vCPU's VMCS value into other pCPU After commit d73eb57b80b (KVM: Boost vCPUs that are delivering interrupts), a five years old bug is exposed. Running ebizzy benchmark in three 80 vCPUs VMs on one 80 pCPUs Skylake server, a lot of rcu_sched stall warning splatting in the VMs after stress testing: INFO: rcu_sched detected stalls on CPUs/tasks: { 4 41 57 62 77} (detected by 15, t=60004 jiffies, g=899, c=898, q=15073) Call Trace: flush_tlb_mm_range+0x68/0x140 tlb_flush_mmu.part.75+0x37/0xe0 tlb_finish_mmu+0x55/0x60 zap_page_range+0x142/0x190 SyS_madvise+0x3cd/0x9c0 system_call_fastpath+0x1c/0x21 swait_active() sustains to be true before finish_swait() is called in kvm_vcpu_block(), voluntarily preempted vCPUs are taken into account by kvm_vcpu_on_spin() loop greatly increases the probability condition kvm_arch_vcpu_runnable(vcpu) is checked and can be true, when APICv is enabled the yield-candidate vCPU's VMCS RVI field leaks(by vmx_sync_pir_to_irr()) into spinning-on-a-taken-lock vCPU's current VMCS. This patch fixes it by checking conservatively a subset of events. Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Christian Borntraeger Cc: Marc Zyngier Cc: stable@vger.kernel.org Fixes: 98f4a1467 (KVM: add kvm_arch_vcpu_runnable() test to kvm_vcpu_on_spin() loop) Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini arch/powerpc/kvm/powerpc.c | 5 +++++ arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/svm.c | 6 ++++++ arch/x86/kvm/vmx/vmx.c | 6 ++++++ arch/x86/kvm/x86.c | 16 ++++++++++++++++ include/linux/kvm_host.h | 1 + virt/kvm/kvm_main.c | 25 ++++++++++++++++++++++++- 7 files changed, 59 insertions(+), 1 deletion(-) commit 046ddeed0461b5d270470c253cbb321103d048b6 Author: Wanpeng Li Date: Thu Aug 1 11:30:14 2019 +0800 KVM: Check preempted_in_kernel for involuntary preemption preempted_in_kernel is updated in preempt_notifier when involuntary preemption ocurrs, it can be stale when the voluntarily preempted vCPUs are taken into account by kvm_vcpu_on_spin() loop. This patch lets it just check preempted_in_kernel for involuntary preemption. Cc: Paolo Bonzini Cc: Radim Krčmář Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini virt/kvm/kvm_main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit a48d06f9b7cedbb8ad7804d1720168b7ee6a34e7 Author: Wanpeng Li Date: Thu Aug 1 11:30:13 2019 +0800 KVM: LAPIC: Don't need to wakeup vCPU twice afer timer fire kvm_set_pending_timer() will take care to wake up the sleeping vCPU which has pending timer, don't need to check this in apic_timer_expired() again. Cc: Paolo Bonzini Cc: Radim Krčmář Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 8 -------- 1 file changed, 8 deletions(-) commit 6fb08f1a5f7e5cdde1ce00104788e602f4299b99 Author: Hans de Goede Date: Mon Jul 29 17:50:36 2019 +0200 HID: logitech-dj: Really fix return value of logi_dj_recv_query_hidpp_devices Commit dbcbabf7da92 ("HID: logitech-dj: fix return value of logi_dj_recv_query_hidpp_devices") made logi_dj_recv_query_hidpp_devices return the return value of hid_hw_raw_request instead of unconditionally returning 0. But hid_hw_raw_request returns the report-size on a successful request (and a negative error-code on failure) where as the callers of logi_dj_recv_query_hidpp_devices expect a 0 return on success. This commit fixes things so that either the negative error gets returned or 0 on success, fixing HID++ receivers such as the Logitech nano receivers no longer working. Cc: YueHaibing Cc: Rafael J. Wysocki Cc: Lionel Landwerlin Fixes: dbcbabf7da92 ("HID: logitech-dj: fix return value of logi_dj_recv_query_hidpp_devices") Reported-by: Lionel Landwerlin Reported-by: Rafael J. Wysocki Signed-off-by: Hans de Goede Tested-by: Rafael J. Wysocki Reviewed-by: Petr Vorel Tested-by: Petr Vorel Reviewed-by: YueHaibing Signed-off-by: Jiri Kosina drivers/hid/hid-logitech-dj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 589b474a4b7ce409d6821ef17234a995841bd131 Author: Florian Westphal Date: Tue Jul 30 14:57:19 2019 +0200 netfilter: nf_flow_table: fix offload for flows that are subject to xfrm This makes the previously added 'encap test' pass. Because its possible that the xfrm dst entry becomes stale while such a flow is offloaded, we need to call dst_check() -- the notifier that handles this for non-tunneled traffic isn't sufficient, because SA or or policies might have changed. If dst becomes stale the flow offload entry will be tagged for teardown and packets will be passed to 'classic' forwarding path. Removing the entry right away is problematic, as this would introduce a race condition with the gc worker. In case flow is long-lived, it could eventually be offloaded again once the gc worker removes the entry from the flow table. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_flow_table_ip.c | 43 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) commit 0ca1bbb7f4212aeef83a67a8aed9da1d84567fcc Author: Florian Westphal Date: Tue Jul 30 14:57:18 2019 +0200 selftests: netfilter: extend flowtable test script for ipsec 'flow offload' expression should not offload flows that will be subject to ipsec, but it does. This results in a connectivity blackhole for the affected flows -- first packets will go through (offload happens after established state is reached), but all remaining ones bypass ipsec encryption and are thus discarded by the peer. This can be worked around by adding "rt ipsec exists accept" before the 'flow offload' rule matches. This test case will fail, support for such flows is added in next patch. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso tools/testing/selftests/netfilter/nft_flowtable.sh | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit 73a0ff0b30af79bf0303d557eb82f1d1945bb6ee Author: Stanislav Lisovskiy Date: Fri Jul 12 11:19:38 2019 +0300 drm/i915: Fix wrong escape clock divisor init for GLK According to Bspec clock divisor registers in GeminiLake should be initialized by shifting 1(<<) to amount of correspondent divisor. While i915 was writing all this time that value as is. Surprisingly that it by accident worked, until we met some issues with Microtech Etab. v2: Added Fixes tag and cc v3: Added stable to cc as well. Signed-off-by: Stanislav Lisovskiy Reviewed-by: Vandita Kulkarni Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108826 Fixes: bcc657004841 ("drm/i915/glk: Program txesc clock divider for GLK") Cc: Deepak M Cc: Madhav Chauhan Cc: Jani Nikula Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: intel-gfx@lists.freedesktop.org Cc: stable@vger.kernel.org Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190712081938.14185-1-stanislav.lisovskiy@intel.com (cherry picked from commit ce52ad5dd52cfaf3398058384e0ff94134bbd89c) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/display/vlv_dsi_pll.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0584674d7fe407c2db91a009294d5ec19f7cb1d5 Author: Wei Yongjun Date: Thu Jul 4 10:45:34 2019 +0000 drm/i915: fix possible memory leak in intel_hdcp_auth_downstream() 'ksv_fifo' is malloced in intel_hdcp_auth_downstream() and should be freed before leaving from the error handling cases, otherwise it will cause memory leak. Fixes: f26ae6a652f2 ("drm/i915: SRM revocation check for HDCP1.4 and 2.2") Signed-off-by: Wei Yongjun Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190704104534.12508-1-weiyongjun1@huawei.com (cherry picked from commit de70fdd7d24cd07e51fbec420f8704d956a47949) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/display/intel_hdcp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit da31076f96fc41af41d64e94b9fefe0d21c8ee9c Author: Eugeniy Paltsev Date: Fri Jul 19 21:46:00 2019 +0300 ARC: fix typo in setup_dma_ops log message Signed-off-by: Eugeniy Paltsev Signed-off-by: Vineet Gupta arch/arc/mm/dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 97abfd5d801abb6eac35e2d7d725123950e2153d Author: Alexey Brodkin Date: Tue Jul 16 23:50:34 2019 +0300 ARCv2: entry: early return from exception need not clear U & DE bits Exception handlers call FAKE_RET_FROM_EXCPN to - clear AE bit: drop down from exception active to pure kernel mode allowing further excptions - set IE bit: re-enable interrupts It additionally also clears U bit (user mode) and DE bit (delay slot execution) which is redundant as hardware does that already on any taken exception. Morevoer the current software clearing is bogus anyways as the KFLAG instruction being used for purpose can't possibly write those bits anyways. So don't pretend to clear them. Signed-off-by: Alexey Brodkin Signed-off-by: Vineet Gupta [vgupta: rewrote changelog] arch/arc/include/asm/entry-arcv2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 247bc9470b1eeefc7b58cdf2c39f2866ba651509 Author: Steve French Date: Tue Jul 23 22:14:29 2019 -0500 cifs: fix rmmod regression in cifs.ko caused by force_sig changes Fixes: 72abe3bcf091 ("signal/cifs: Fix cifs_put_tcp_session to call send_sig instead of force_sig") The global change from force_sig caused module unloading of cifs.ko to fail (since the cifsd process could not be killed, "rmmod cifs" now would always fail) Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg CC: Eric W. Biederman fs/cifs/connect.c | 1 + 1 file changed, 1 insertion(+) commit dea1bb35c5f35e0577cfc61f79261d80b8715221 Author: Trond Myklebust Date: Sat Aug 3 13:39:24 2019 -0400 NFS: Fix regression whereby fscache errors are appearing on 'nofsc' mounts People are reporing seeing fscache errors being reported concerning duplicate cookies even in cases where they are not setting up fscache at all. The rule needs to be that if fscache is not enabled, then it should have no side effects at all. To ensure this is the case, we disable fscache completely on all superblocks for which the 'fsc' mount option was not set. In order to avoid issues with '-oremount', we also disable the ability to turn fscache on via remount. Fixes: f1fe29b4a02d ("NFS: Use i_writecount to control whether...") Link: https://bugzilla.kernel.org/show_bug.cgi?id=200145 Signed-off-by: Trond Myklebust Cc: Steve Dickson Cc: David Howells fs/nfs/fscache.c | 7 ++++++- fs/nfs/fscache.h | 2 +- fs/nfs/super.c | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) commit 09a54f0ebfe263bc27c90bbd80187b9a93283887 Author: Trond Myklebust Date: Sat Aug 3 10:28:18 2019 -0400 NFSv4: Fix an Oops in nfs4_do_setattr If the user specifies an open mode of 3, then we don't have a NFSv4 state attached to the context, and so we Oops when we try to dereference it. Reported-by: Olga Kornievskaia Fixes: 29b59f9416937 ("NFSv4: change nfs4_do_setattr to take...") Signed-off-by: Trond Myklebust Cc: stable@vger.kernel.org # v4.10: 991eedb1371dc: NFSv4: Only pass the... Cc: stable@vger.kernel.org # v4.10+ fs/nfs/nfs4proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c77e22834ae9a11891cb613bd9a551be1b94f2bc Author: Trond Myklebust Date: Sat Aug 3 10:11:27 2019 -0400 NFSv4: Fix a potential sleep while atomic in nfs4_do_reclaim() John Hubbard reports seeing the following stack trace: nfs4_do_reclaim rcu_read_lock /* we are now in_atomic() and must not sleep */ nfs4_purge_state_owners nfs4_free_state_owner nfs4_destroy_seqid_counter rpc_destroy_wait_queue cancel_delayed_work_sync __cancel_work_timer __flush_work start_flush_work might_sleep: (kernel/workqueue.c:2975: BUG) The solution is to separate out the freeing of the state owners from nfs4_purge_state_owners(), and perform that outside the atomic context. Reported-by: John Hubbard Fixes: 0aaaf5c424c7f ("NFS: Cache state owners after files are closed") Signed-off-by: Trond Myklebust fs/nfs/nfs4_fs.h | 3 ++- fs/nfs/nfs4client.c | 5 ++++- fs/nfs/nfs4state.c | 27 ++++++++++++++++++++++----- 3 files changed, 28 insertions(+), 7 deletions(-) commit e3c8dc761ead061da2220ee8f8132f729ac3ddfe Author: Trond Myklebust Date: Mon Jul 29 18:25:00 2019 +0100 NFSv4: Check the return value of update_open_stateid() Ensure that we always check the return value of update_open_stateid() so that we can retry if the update of local state failed. This fixes infinite looping on state recovery. Fixes: e23008ec81ef3 ("NFSv4 reduce attribute requests for open reclaim") Signed-off-by: Trond Myklebust Cc: stable@vger.kernel.org # v3.7+ fs/nfs/nfs4proc.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit ad11408970df79d5f481aa9964e91f183133424c Author: Trond Myklebust Date: Fri Jul 26 14:40:53 2019 +0100 NFSv4.1: Only reap expired delegations Fix nfs_reap_expired_delegations() to ensure that we only reap delegations that are actually expired, rather than triggering on random errors. Fixes: 45870d6909d5a ("NFSv4.1: Test delegation stateids when server...") Signed-off-by: Trond Myklebust fs/nfs/delegation.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) commit 27a30cf64a5cbe2105e4ff9613246b32d584766a Author: Trond Myklebust Date: Mon Jul 22 18:32:59 2019 +0100 NFSv4.1: Fix open stateid recovery The logic for checking in nfs41_check_open_stateid() whether the state is supported by a delegation is inverted. In addition, it makes more sense to perform that check before we check for expired locks. Fixes: 8a64c4ef106d1 ("NFSv4.1: Even if the stateid is OK,...") Signed-off-by: Trond Myklebust fs/nfs/nfs4proc.c | 65 ++++++++++++++++++++++++++++++++----------------------- 1 file changed, 38 insertions(+), 27 deletions(-) commit 731c74dd987e4f1f3179223314c039ce38dd4f19 Author: Trond Myklebust Date: Mon Jul 22 18:06:17 2019 +0100 NFSv4: Report the error from nfs4_select_rw_stateid() In pnfs_update_layout() ensure that we do report any fatal errors from nfs4_select_rw_stateid(). Fixes: d9aba2b40de6 ("NFSv4: Don't use the zero stateid with layoutget") Signed-off-by: Trond Myklebust fs/nfs/pnfs.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit c34fae003c79570b6c930b425fea3f0b7b1e7056 Author: Trond Myklebust Date: Mon Jul 22 09:54:29 2019 +0100 NFSv4: When recovering state fails with EAGAIN, retry the same recovery If the server returns with EAGAIN when we're trying to recover from a server reboot, we currently delay for 1 second, but then mark the stateid as needing recovery after the grace period has expired. Instead, we should just retry the same recovery process immediately after the 1 second delay. Break out of the loop after 10 retries. Fixes: 35a61606a612 ("NFS: Reduce indentation of the switch statement...") Signed-off-by: Trond Myklebust fs/nfs/nfs4state.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 86dbd08b32838dc8940ccab2eebd47cf80224494 Author: Trond Myklebust Date: Mon Jul 22 09:44:04 2019 +0100 NFSv4: Print an error in the syslog when state is marked as irrecoverable When error recovery fails due to a fatal error on the server, ensure we log it in the syslog. Signed-off-by: Trond Myklebust fs/nfs/nfs4state.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 5eb8d18ca0e001c6055da2b7f30d8f6dca23a44f Author: Trond Myklebust Date: Fri Jul 19 14:08:37 2019 -0400 NFSv4: Fix delegation state recovery Once we clear the NFS_DELEGATED_STATE flag, we're telling nfs_delegation_claim_opens() that we're done recovering all open state for that stateid, so we really need to ensure that we test for all open modes that are currently cached and recover them before exiting nfs4_open_delegation_recall(). Fixes: 24311f884189d ("NFSv4: Recovery of recalled read delegations...") Signed-off-by: Trond Myklebust Cc: stable@vger.kernel.org # v4.3+ fs/nfs/delegation.c | 2 +- fs/nfs/delegation.h | 2 +- fs/nfs/nfs4proc.c | 25 ++++++++++++------------- 3 files changed, 14 insertions(+), 15 deletions(-) commit 8c39a39e28b86a4021d9be314ce01019bafa5fdc Author: Trond Myklebust Date: Fri Jul 19 13:48:44 2019 -0400 NFSv4: Fix a credential refcount leak in nfs41_check_delegation_stateid It is unsafe to dereference delegation outside the rcu lock, and in any case, the refcount is guaranteed held if cred is non-zero. Signed-off-by: Trond Myklebust fs/nfs/nfs4proc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e21a712a9685488f5ce80495b37b9fdbe96c230d Author: Linus Torvalds Date: Sun Aug 4 18:40:12 2019 -0700 Linux 5.3-rc3 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a6831a89bcaf351cf41b3a5922640c89beaaf9eb Merge: 62d1716304d1 fa4f99c05320 Author: Linus Torvalds Date: Sun Aug 4 16:39:07 2019 -0700 Merge tag 'tpmdd-next-20190805' of git://git.infradead.org/users/jjs/linux-tpmdd Pull tpm fixes from Jarkko Sakkinen: "Two bug fixes that did not make into my first pull request" * tag 'tpmdd-next-20190805' of git://git.infradead.org/users/jjs/linux-tpmdd: tpm: tpm_ibm_vtpm: Fix unallocated banks tpm: Fix null pointer dereference on chip register error path commit 62d1716304d1bb35ad9cdafe40efbbb6b3981cfe Merge: 4b6f23161b4e 2b372a9685a7 Author: Linus Torvalds Date: Sun Aug 4 16:37:08 2019 -0700 Merge tag 'mtd/fixes-for-5.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux Pull MTD fixes from Miquel Raynal: "NAND: - Fix Micron driver as some chips enable internal ECC correction during their discovery while they advertize they do not have any. Hyperbus: - Restrict the build to only ARM64 SoCs (and compile testing) which is what should have been done since the beginning. - Fix Kconfig issue by selection something instead of implying it" * tag 'mtd/fixes-for-5.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: mtd: hyperbus: Add hardware dependency to AM654 driver mtd: hyperbus: Kconfig: Fix HBMC_AM654 dependencies mtd: rawnand: micron: handle on-die "ECC-off" devices correctly commit fa4f99c05320eb28bf6ba52a9adf64d888da1f9e Author: Nayna Jain Date: Thu Jul 11 12:13:35 2019 -0400 tpm: tpm_ibm_vtpm: Fix unallocated banks The nr_allocated_banks and allocated banks are initialized as part of tpm_chip_register. Currently, this is done as part of auto startup function. However, some drivers, like the ibm vtpm driver, do not run auto startup during initialization. This results in uninitialized memory issue and causes a kernel panic during boot. This patch moves the pcr allocation outside the auto startup function into tpm_chip_register. This ensures that allocated banks are initialized in any case. Fixes: 879b589210a9 ("tpm: retrieve digest size of unknown algorithms with PCR read") Reported-by: Michal Suchanek Signed-off-by: Nayna Jain Reviewed-by: Mimi Zohar Tested-by: Sachin Sant Tested-by: Michal Suchánek Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm-chip.c | 20 ++++++++++++++++++++ drivers/char/tpm/tpm.h | 2 ++ drivers/char/tpm/tpm1-cmd.c | 36 ++++++++++++++++++++++++------------ drivers/char/tpm/tpm2-cmd.c | 6 +----- 4 files changed, 47 insertions(+), 17 deletions(-) commit 1e5ac6300a07ceecfc70a893ebef3352be21e6f8 Author: Milan Broz Date: Thu Jul 4 09:26:15 2019 +0200 tpm: Fix null pointer dereference on chip register error path If clk_enable is not defined and chip initialization is canceled code hits null dereference. Easily reproducible with vTPM init fail: swtpm chardev --tpmstate dir=nonexistent_dir --tpm2 --vtpm-proxy BUG: kernel NULL pointer dereference, address: 00000000 ... Call Trace: tpm_chip_start+0x9d/0xa0 [tpm] tpm_chip_register+0x10/0x1a0 [tpm] vtpm_proxy_work+0x11/0x30 [tpm_vtpm_proxy] process_one_work+0x214/0x5a0 worker_thread+0x134/0x3e0 ? process_one_work+0x5a0/0x5a0 kthread+0xd4/0x100 ? process_one_work+0x5a0/0x5a0 ? kthread_park+0x90/0x90 ret_from_fork+0x19/0x24 Fixes: 719b7d81f204 ("tpm: introduce tpm_chip_start() and tpm_chip_stop()") Cc: stable@vger.kernel.org # v5.1+ Signed-off-by: Milan Broz Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm-chip.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) commit 4b6f23161b4e888e72671e377c32eabe9a8e62fc Merge: 4c0d228c3bd4 d7e23b887f67 Author: Linus Torvalds Date: Sun Aug 4 10:30:47 2019 -0700 Merge tag 'powerpc-5.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "Some more powerpc fixes for 5.3: - Wire up the new clone3 syscall. - A fix for the PAPR SCM nvdimm driver, to fix a crash when firmware gives us a device that's attached to a non-online NUMA node. - A fix for a boot failure on 32-bit with KASAN enabled. - Three fixes for implicit fall through warnings, some of which are errors for us due to -Werror. Thanks to: Aneesh Kumar K.V, Christophe Leroy, Kees Cook, Santosh Sivaraj, Stephen Rothwell" * tag 'powerpc-5.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/kasan: fix early boot failure on PPC32 drivers/macintosh/smu.c: Mark expected switch fall-through powerpc/spe: Mark expected switch fall-throughs powerpc/nvdimm: Pick nearby online node if the device node is not online powerpc/kvm: Fall through switch case explicitly powerpc: Wire up clone3 syscall commit 4c0d228c3bd498b3119d68eb41a17880f7728993 Author: Geert Uytterhoeven Date: Mon Jul 29 19:56:58 2019 +0200 MAINTAINERS: Add Geert as Renesas SoC Co-Maintainer At the end of the v5.3 upstream kernel development cycle, Simon will be stepping down from his role as Renesas SoC maintainer. Starting with the v5.4 development cycle, Geert is taking over this role. Add Geert as a co-maintainer, and add his git repository and branch. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Acked-by: Simon Horman Signed-off-by: Linus Torvalds MAINTAINERS | 4 ++++ 1 file changed, 4 insertions(+) commit 05e4f88b7d25fa8bf65b846f05197c47ddece278 Merge: 8449c980c3cd 0c5b6c28ed68 Author: Linus Torvalds Date: Sun Aug 4 10:16:30 2019 -0700 Merge tag 'kbuild-fixes-v5.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fixes from Masahiro Yamada: - detect missing missing "WITH Linux-syscall-note" for uapi headers - fix needless rebuild when using Clang - fix false-positive cc-option in Kconfig when using Clang - avoid including corrupted .*.cmd files in the modpost stage - fix warning of 'make vmlinux' - fix {m,n,x,g}config to not generate the broken .config on the second save operation. - some trivial Makefile fixes * tag 'kbuild-fixes-v5.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kconfig: Clear "written" flag to avoid data loss kbuild: Check for unknown options with cc-option usage in Kconfig and clang lib/raid6: fix unnecessary rebuild of vpermxor*.c kbuild: modpost: do not parse unnecessary rules for vmlinux modpost kbuild: modpost: remove unnecessary dependency for __modpost kbuild: modpost: handle KBUILD_EXTRA_SYMBOLS only for external modules kbuild: modpost: include .*.cmd files only when targets exist kbuild: initialize CLANG_FLAGS correctly in the top Makefile kbuild: detect missing "WITH Linux-syscall-note" for uapi headers commit 8449c980c3cd915cd436d0aa02c25693e1a0eed5 Merge: d8778f13b73f fc5b34a35458 Author: Linus Torvalds Date: Sun Aug 4 10:02:13 2019 -0700 Merge tag 'safesetid-maintainers-correction-5.3-rc2' of git://github.com/micah-morton/linux Pull SafeSetID maintainer update from Micah Morton: "Add entry in MAINTAINERS file for SafeSetID LSM" * tag 'safesetid-maintainers-correction-5.3-rc2' of git://github.com/micah-morton/linux: Add entry in MAINTAINERS file for SafeSetID LSM commit 0c5b6c28ed68becb692b43eae5e44d5aa7e160ce Author: M. Vefa Bicakci Date: Sat Aug 3 06:02:12 2019 -0400 kconfig: Clear "written" flag to avoid data loss Prior to this commit, starting nconfig, xconfig or gconfig, and saving the .config file more than once caused data loss, where a .config file that contained only comments would be written to disk starting from the second save operation. This bug manifests itself because the SYMBOL_WRITTEN flag is never cleared after the first call to conf_write, and subsequent calls to conf_write then skip all of the configuration symbols due to the SYMBOL_WRITTEN flag being set. This commit resolves this issue by clearing the SYMBOL_WRITTEN flag from all symbols before conf_write returns. Fixes: 8e2442a5f86e ("kconfig: fix missing choice values in auto.conf") Cc: linux-stable # 4.19+ Signed-off-by: M. Vefa Bicakci Signed-off-by: Masahiro Yamada scripts/kconfig/confdata.c | 4 ++++ 1 file changed, 4 insertions(+) commit d8778f13b73f1cde08be0ece18571dee495b92f1 Merge: cf6c8aef16cc e3cacb73e626 Author: Linus Torvalds Date: Sat Aug 3 18:50:52 2019 -0700 Merge tag 'xtensa-20190803' of git://github.com/jcmvbkbc/linux-xtensa Pull Xtensa fix from Max Filippov: "Fix build for xtensa cores with coprocessors that was broken by entry/return abstraction patch" * tag 'xtensa-20190803' of git://github.com/jcmvbkbc/linux-xtensa: xtensa: fix build for cores with coprocessors commit cf6c8aef16cc0cd15e91a930befd8e312d5703f5 Merge: 8b7fd679427c 8eb9a2dff019 Author: Linus Torvalds Date: Sat Aug 3 12:56:34 2019 -0700 Merge branch 'i2c/for-current-fixed' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "A set of driver fixes for the I2C subsystem" * 'i2c/for-current-fixed' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: s3c2410: Mark expected switch fall-through i2c: at91: fix clk_offset for sama5d2 i2c: at91: disable TXRDY interrupt after sending data i2c: iproc: Fix i2c master read more than 63 bytes eeprom: at24: make spd world-readable again commit 4c92057661a3412f547ede95715641d7ee16ddac Author: Josh Poimboeuf Date: Sat Aug 3 21:21:54 2019 +0200 Documentation: Add swapgs description to the Spectre v1 documentation Add documentation to the Spectre document about the new swapgs variant of Spectre v1. Signed-off-by: Josh Poimboeuf Signed-off-by: Thomas Gleixner Documentation/admin-guide/hw-vuln/spectre.rst | 88 ++++++++++++++++++++++++--- 1 file changed, 80 insertions(+), 8 deletions(-) commit 5e5412c365a32e452daa762eac36121cb8a370bb Author: Qian Cai Date: Tue Jul 30 11:30:33 2019 -0400 net/socket: fix GCC8+ Wpacked-not-aligned warnings There are a lot of those warnings with GCC8+ 64-bit, In file included from ./include/linux/sctp.h:42, from net/core/skbuff.c:47: ./include/uapi/linux/sctp.h:395:1: warning: alignment 4 of 'struct sctp_paddr_change' is less than 8 [-Wpacked-not-aligned] } __attribute__((packed, aligned(4))); ^ ./include/uapi/linux/sctp.h:728:1: warning: alignment 4 of 'struct sctp_setpeerprim' is less than 8 [-Wpacked-not-aligned] } __attribute__((packed, aligned(4))); ^ ./include/uapi/linux/sctp.h:727:26: warning: 'sspp_addr' offset 4 in 'struct sctp_setpeerprim' isn't aligned to 8 [-Wpacked-not-aligned] struct sockaddr_storage sspp_addr; ^~~~~~~~~ ./include/uapi/linux/sctp.h:741:1: warning: alignment 4 of 'struct sctp_prim' is less than 8 [-Wpacked-not-aligned] } __attribute__((packed, aligned(4))); ^ ./include/uapi/linux/sctp.h:740:26: warning: 'ssp_addr' offset 4 in 'struct sctp_prim' isn't aligned to 8 [-Wpacked-not-aligned] struct sockaddr_storage ssp_addr; ^~~~~~~~ ./include/uapi/linux/sctp.h:792:1: warning: alignment 4 of 'struct sctp_paddrparams' is less than 8 [-Wpacked-not-aligned] } __attribute__((packed, aligned(4))); ^ ./include/uapi/linux/sctp.h:784:26: warning: 'spp_address' offset 4 in 'struct sctp_paddrparams' isn't aligned to 8 [-Wpacked-not-aligned] struct sockaddr_storage spp_address; ^~~~~~~~~~~ ./include/uapi/linux/sctp.h:905:1: warning: alignment 4 of 'struct sctp_paddrinfo' is less than 8 [-Wpacked-not-aligned] } __attribute__((packed, aligned(4))); ^ ./include/uapi/linux/sctp.h:899:26: warning: 'spinfo_address' offset 4 in 'struct sctp_paddrinfo' isn't aligned to 8 [-Wpacked-not-aligned] struct sockaddr_storage spinfo_address; ^~~~~~~~~~~~~~ This is because the commit 20c9c825b12f ("[SCTP] Fix SCTP socket options to work with 32-bit apps on 64-bit kernels.") added "packed, aligned(4)" GCC attributes to some structures but one of the members, i.e, "struct sockaddr_storage" in those structures has the attribute, "aligned(__alignof__ (struct sockaddr *)" which is 8-byte on 64-bit systems, so the commit overwrites the designed alignments for "sockaddr_storage". To fix this, "struct sockaddr_storage" needs to be aligned to 4-byte as it is only used in those packed sctp structure which is part of UAPI, and "struct __kernel_sockaddr_storage" is used in some other places of UAPI that need not to change alignments in order to not breaking userspace. Use an implicit alignment for "struct __kernel_sockaddr_storage" so it can keep the same alignments as a member in both packed and un-packed structures without breaking UAPI. Suggested-by: David Laight Signed-off-by: Qian Cai Signed-off-by: David S. Miller include/uapi/linux/socket.h | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit 8b7fd679427c571c34f61d9eafed3562c52424ae Merge: 0432a0a066b0 b3c303be4c35 Author: Linus Torvalds Date: Sat Aug 3 10:58:46 2019 -0700 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf tooling fixes from Thomas Gleixner: "A set of updates for perf tools and documentation: perf header: - Prevent a division by zero - Deal with an uninitialized warning proper libbpf: - Fix the missiong __WORDSIZE definition for musl & al UAPI headers: - Synchronize kernel headers Documentation: - Fix the memory units for perf.data size" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: libbpf: fix missing __WORDSIZE definition perf tools: Fix perf.data documentation units for memory size perf header: Fix use of unitialized value warning perf header: Fix divide by zero error if f_header.attr_size==0 tools headers UAPI: Sync if_link.h with the kernel tools headers UAPI: Sync sched.h with the kernel tools headers UAPI: Sync usbdevice_fs.h with the kernels to get new ioctl tools perf beauty: Fix usbdevfs_ioctl table generator to handle _IOC() tools headers UAPI: Update tools's copy of drm.h headers tools headers UAPI: Update tools's copy of mman.h headers tools headers UAPI: Update tools's copy of kvm.h headers tools include UAPI: Sync x86's syscalls_64.tbl and generic unistd.h to pick up clone3 and pidfd_open commit 0432a0a066b05361b6d4d26522233c3c76c9e5da Merge: af42e7450f4b 33a58980ff3c Author: Linus Torvalds Date: Sat Aug 3 10:51:29 2019 -0700 Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull vdso timer fixes from Thomas Gleixner: "A series of commits to deal with the regression caused by the generic VDSO implementation. The usage of clock_gettime64() for 32bit compat fallback syscalls caused seccomp filters to kill innocent processes because they only allow clock_gettime(). Handle the compat syscalls with clock_gettime() as before, which is not a functional problem for the VDSO as the legacy compat application interface is not y2038 safe anyway. It's just extra fallback code which needs to be implemented on every architecture. It's opt in for now so that it does not break the compile of already converted architectures in linux-next. Once these are fixed, the #ifdeffery goes away. So much for trying to be smart and reuse code..." * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: arm64: compat: vdso: Use legacy syscalls as fallback x86/vdso/32: Use 32bit syscall fallback lib/vdso/32: Provide legacy syscall fallbacks lib/vdso: Move fallback invocation to the callers lib/vdso/32: Remove inconsistent NULL pointer checks commit af42e7450f4b174a0a3f7611791ba73109997171 Merge: e12b243de76d a5dbba8f443e Author: Linus Torvalds Date: Sat Aug 3 10:49:45 2019 -0700 Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fixes from Thomas Gleixner: "A small bunch of fixes from the irqchip department: - Fix a couple of UAF on error paths (RZA1, GICv3 ITS) - Fix iMX GPCv2 trigger setting - Add missing of_node_put() on error path in MBIGEN - Add another bunch of /* fall-through */ to silence warnings" * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/renesas-rza1: Fix an use-after-free in rza1_irqc_probe() irqchip/irq-imx-gpcv2: Forward irq type to parent irqchip/irq-mbigen: Add of_node_put() before return irqchip/gic-v3-its: Free unused vpt_page when alloc vpe table fail irqchip/gic-v3: Mark expected switch fall-through commit e12b243de76dcc24a904a48a2efda94fdc4cdf07 Merge: b7aea68a19f3 afa1d96d1430 Author: Linus Torvalds Date: Sat Aug 3 10:43:44 2019 -0700 Merge tag 'xfs-5.3-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fixes from Darrick Wong: - Avoid leaking kernel stack contents to userspace - Fix a potential null pointer dereference in the dabtree scrub code * tag 'xfs-5.3-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: Fix possible null-pointer dereferences in xchk_da_btree_block_check_sibling() xfs: fix stack contents leakage in the v1 inumber ioctls commit 294fc7a4c8ec42b3053b1d2e87b0dafef80a76b8 Author: Tetsuo Handa Date: Thu Aug 1 13:47:07 2019 -0700 fs: xfs: xfs_log: Don't use KM_MAYFAIL at xfs_log_reserve(). When the system is close-to-OOM, fsync() may fail due to -ENOMEM because xfs_log_reserve() is using KM_MAYFAIL. It is a bad thing to fail writeback operation due to user-triggerable OOM condition. Since we are not using KM_MAYFAIL at xfs_trans_alloc() before calling xfs_log_reserve(), let's use the same flags at xfs_log_reserve(). oom-torture: page allocation failure: order:0, mode:0x46c40(GFP_NOFS|__GFP_NOWARN|__GFP_RETRY_MAYFAIL|__GFP_COMP), nodemask=(null) CPU: 7 PID: 1662 Comm: oom-torture Kdump: loaded Not tainted 5.3.0-rc2+ #925 Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 Call Trace: dump_stack+0x67/0x95 warn_alloc+0xa9/0x140 __alloc_pages_slowpath+0x9a8/0xbce __alloc_pages_nodemask+0x372/0x3b0 alloc_slab_page+0x3a/0x8d0 new_slab+0x330/0x420 ___slab_alloc.constprop.94+0x879/0xb00 __slab_alloc.isra.89.constprop.93+0x43/0x6f kmem_cache_alloc+0x331/0x390 kmem_zone_alloc+0x9f/0x110 [xfs] kmem_zone_alloc+0x9f/0x110 [xfs] xlog_ticket_alloc+0x33/0xd0 [xfs] xfs_log_reserve+0xb4/0x410 [xfs] xfs_trans_reserve+0x1d1/0x2b0 [xfs] xfs_trans_alloc+0xc9/0x250 [xfs] xfs_setfilesize_trans_alloc.isra.27+0x44/0xc0 [xfs] xfs_submit_ioend.isra.28+0xa5/0x180 [xfs] xfs_vm_writepages+0x76/0xa0 [xfs] do_writepages+0x17/0x80 __filemap_fdatawrite_range+0xc1/0xf0 file_write_and_wait_range+0x53/0xa0 xfs_file_fsync+0x87/0x290 [xfs] vfs_fsync_range+0x37/0x80 do_fsync+0x38/0x60 __x64_sys_fsync+0xf/0x20 do_syscall_64+0x4a/0x1c0 entry_SYSCALL_64_after_hwframe+0x49/0xbe Fixes: eb01c9cd87 ("[XFS] Remove the xlog_ticket allocator") Signed-off-by: Tetsuo Handa Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_log.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit b7aea68a19f3b13455a889ab58954c5fb2b5e1db Merge: 616725492ec7 7291edca2021 Author: Linus Torvalds Date: Sat Aug 3 09:20:49 2019 -0700 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "17 fixes" * emailed patches from Andrew Morton : drivers/acpi/scan.c: document why we don't need the device_hotplug_lock memremap: move from kernel/ to mm/ lib/test_meminit.c: use GFP_ATOMIC in RCU critical section asm-generic: fix -Wtype-limits compiler warnings cgroup: kselftest: relax fs_spec checks mm/memory_hotplug.c: remove unneeded return for void function mm/migrate.c: initialize pud_entry in migrate_vma() coredump: split pipe command whitespace before expanding template page flags: prioritize kasan bits over last-cpuid ubsan: build ubsan.c more conservatively kasan: remove clang version check for KASAN_STACK mm: compaction: avoid 100% CPU usage during compaction when a task is killed mm: migrate: fix reference check race between __find_get_block() and migration mm: vmscan: check if mem cgroup is disabled or not before calling memcg slab shrinker ocfs2: remove set but not used variable 'last_hash' Revert "kmemleak: allow to coexist with fault injection" kernel/signal.c: fix a kernel-doc markup commit 616725492ec7519643d5638de02a92a28200d03f Merge: 0e31225f99e0 b7edabfe8438 Author: Linus Torvalds Date: Sat Aug 3 08:59:11 2019 -0700 Merge tag 'riscv/for-v5.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Paul Walmsley: "Three minor RISC-V-related changes for v5.3-rc3: - Add build ID to VDSO builds to avoid a double-free in perf when libelf isn't used - Align the RV64 defconfig to the output of "make savedefconfig" so subsequent defconfig patches don't get out of hand - Drop a superfluous DT property from the FU540 SoC DT data (since it must be already set in board data that includes it)" * tag 'riscv/for-v5.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: defconfig: align RV64 defconfig to the output of "make savedefconfig" riscv: dts: fu540-c000: drop "timebase-frequency" riscv: Fix perf record without libelf support commit a5580eb394c8a48afc3e64aaad68db0d44662cc6 Author: Lukasz Majewski Date: Wed Jul 31 16:11:51 2019 +0200 ARM: dts: vf610-bk4: Fix qspi node description Before this change the device tree description of qspi node for second memory on BK4 board was wrong (applicable to old, removed fsl-quadspi.c driver). As a result this memory was not recognized correctly when used with the new spi-fsl-qspi.c driver. From the dt-bindings: "Required SPI slave node properties: - reg: There are two buses (A and B) with two chip selects each. This encodes to which bus and CS the flash is connected: <0>: Bus A, CS 0 <1>: Bus A, CS 1 <2>: Bus B, CS 0 <3>: Bus B, CS 1" According to above with new driver the second SPI-NOR memory shall have reg=<2> as it is connected to Bus B, CS 0. Fixes: a67d2c52a82f ("ARM: dts: Add support for Liebherr's BK4 device (vf610 based)") Suggested-by: Fabio Estevam Signed-off-by: Lukasz Majewski Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/vf610-bk4.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7291edca20215dfdf0eb841881d63753448ef09c Author: David Hildenbrand Date: Fri Aug 2 21:49:29 2019 -0700 drivers/acpi/scan.c: document why we don't need the device_hotplug_lock Let's document why the lock is not needed in acpi_scan_init(), right now this is not really obvious. [akpm@linux-foundation.org: fix tpyo] Link: http://lkml.kernel.org/r/20190731135306.31524-1-david@redhat.com Signed-off-by: David Hildenbrand Acked-by: Michal Hocko Acked-by: Rafael J. Wysocki Cc: Oscar Salvador Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/acpi/scan.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 14c5cebad510c2875ca525f36605b47058769670 Author: Christoph Hellwig Date: Fri Aug 2 21:49:26 2019 -0700 memremap: move from kernel/ to mm/ memremap.c implements MM functionality for ZONE_DEVICE, so it really should be in the mm/ directory, not the kernel/ one. Link: http://lkml.kernel.org/r/20190722094143.18387-1-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Anshuman Khandual Acked-by: Dan Williams Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/Makefile | 1 - mm/Makefile | 1 + {kernel => mm}/memremap.c | 0 3 files changed, 1 insertion(+), 1 deletion(-) commit 733d1d1a7745113e2b6a1761300e7e26b6eb6009 Author: Alexander Potapenko Date: Fri Aug 2 21:49:22 2019 -0700 lib/test_meminit.c: use GFP_ATOMIC in RCU critical section kmalloc() shouldn't sleep while in RCU critical section, therefore use GFP_ATOMIC instead of GFP_KERNEL. The bug was spotted by the 0day kernel testing robot. Link: http://lkml.kernel.org/r/20190725121703.210874-1-glider@google.com Fixes: 7e659650cbda ("lib: introduce test_meminit module") Signed-off-by: Alexander Potapenko Reviewed-by: Andrew Morton Reported-by: kernel test robot Cc: Kees Cook Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/test_meminit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cbedfe11347fe418621bd188d58a206beb676218 Author: Qian Cai Date: Fri Aug 2 21:49:19 2019 -0700 asm-generic: fix -Wtype-limits compiler warnings Commit d66acc39c7ce ("bitops: Optimise get_order()") introduced a compilation warning because "rx_frag_size" is an "ushort" while PAGE_SHIFT here is 16. The commit changed the get_order() to be a multi-line macro where compilers insist to check all statements in the macro even when __builtin_constant_p(rx_frag_size) will return false as "rx_frag_size" is a module parameter. In file included from ./arch/powerpc/include/asm/page_64.h:107, from ./arch/powerpc/include/asm/page.h:242, from ./arch/powerpc/include/asm/mmu.h:132, from ./arch/powerpc/include/asm/lppaca.h:47, from ./arch/powerpc/include/asm/paca.h:17, from ./arch/powerpc/include/asm/current.h:13, from ./include/linux/thread_info.h:21, from ./arch/powerpc/include/asm/processor.h:39, from ./include/linux/prefetch.h:15, from drivers/net/ethernet/emulex/benet/be_main.c:14: drivers/net/ethernet/emulex/benet/be_main.c: In function 'be_rx_cqs_create': ./include/asm-generic/getorder.h:54:9: warning: comparison is always true due to limited range of data type [-Wtype-limits] (((n) < (1UL << PAGE_SHIFT)) ? 0 : \ ^ drivers/net/ethernet/emulex/benet/be_main.c:3138:33: note: in expansion of macro 'get_order' adapter->big_page_size = (1 << get_order(rx_frag_size)) * PAGE_SIZE; ^~~~~~~~~ Fix it by moving all of this multi-line macro into a proper function, and killing __get_order() off. [akpm@linux-foundation.org: remove __get_order() altogether] [cai@lca.pw: v2] Link: http://lkml.kernel.org/r/1564000166-31428-1-git-send-email-cai@lca.pw Link: http://lkml.kernel.org/r/1563914986-26502-1-git-send-email-cai@lca.pw Fixes: d66acc39c7ce ("bitops: Optimise get_order()") Signed-off-by: Qian Cai Reviewed-by: Nathan Chancellor Cc: David S. Miller Cc: Arnd Bergmann Cc: David Howells Cc: Jakub Jelinek Cc: Nick Desaulniers Cc: Bill Wendling Cc: James Y Knight Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/asm-generic/getorder.h | 50 +++++++++++++++++------------------------- 1 file changed, 20 insertions(+), 30 deletions(-) commit b59b1baab789eacdde809135542e3d4f256f6878 Author: Chris Down Date: Fri Aug 2 21:49:15 2019 -0700 cgroup: kselftest: relax fs_spec checks On my laptop most memcg kselftests were being skipped because it claimed cgroup v2 hierarchy wasn't mounted, but this isn't correct. Instead, it seems current systemd HEAD mounts it with the name "cgroup2" instead of "cgroup": % grep cgroup /proc/mounts cgroup2 /sys/fs/cgroup cgroup2 rw,nosuid,nodev,noexec,relatime,nsdelegate 0 0 I can't think of a reason to need to check fs_spec explicitly since it's arbitrary, so we can just rely on fs_vfstype. After these changes, `make TARGETS=cgroup kselftest` actually runs the cgroup v2 tests in more cases. Link: http://lkml.kernel.org/r/20190723210737.GA487@chrisdown.name Signed-off-by: Chris Down Cc: Johannes Weiner Cc: Tejun Heo Cc: Roman Gushchin Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/testing/selftests/cgroup/cgroup_util.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit aa4996b3af19f8535177ba21cb7241348a34fb94 Author: Weitao Hou Date: Fri Aug 2 21:49:12 2019 -0700 mm/memory_hotplug.c: remove unneeded return for void function return is unneeded in void function Link: http://lkml.kernel.org/r/20190723130814.21826-1-houweitaoo@gmail.com Signed-off-by: Weitao Hou Reviewed-by: David Hildenbrand Reviewed-by: Oscar Salvador Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory_hotplug.c | 2 -- 1 file changed, 2 deletions(-) commit 7b358c6f12dc82364f6d317f8c8f1d794adbc3f5 Author: Ralph Campbell Date: Fri Aug 2 21:49:08 2019 -0700 mm/migrate.c: initialize pud_entry in migrate_vma() When CONFIG_MIGRATE_VMA_HELPER is enabled, migrate_vma() calls migrate_vma_collect() which initializes a struct mm_walk but didn't initialize mm_walk.pud_entry. (Found by code inspection) Use a C structure initialization to make sure it is set to NULL. Link: http://lkml.kernel.org/r/20190719233225.12243-1-rcampbell@nvidia.com Fixes: 8763cb45ab967 ("mm/migrate: new memory migration helper for use with device memory") Signed-off-by: Ralph Campbell Reviewed-by: John Hubbard Reviewed-by: Andrew Morton Cc: "Jérôme Glisse" Cc: Mel Gorman Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/migrate.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit 315c69261dd3fa12dbc830d4fa00d1fad98d3b03 Author: Paul Wise Date: Fri Aug 2 21:49:05 2019 -0700 coredump: split pipe command whitespace before expanding template Save the offsets of the start of each argument to avoid having to update pointers to each argument after every corename krealloc and to avoid having to duplicate the memory for the dump command. Executable names containing spaces were previously being expanded from %e or %E and then split in the middle of the filename. This is incorrect behaviour since an argument list can represent arguments with spaces. The splitting could lead to extra arguments being passed to the core dump handler that it might have interpreted as options or ignored completely. Core dump handlers that are not aware of this Linux kernel issue will be using %e or %E without considering that it may be split and so they will be vulnerable to processes with spaces in their names breaking their argument list. If their internals are otherwise well written, such as if they are written in shell but quote arguments, they will work better after this change than before. If they are not well written, then there is a slight chance of breakage depending on the details of the code but they will already be fairly broken by the split filenames. Core dump handlers that are aware of this Linux kernel issue will be placing %e or %E as the last item in their core_pattern and then aggregating all of the remaining arguments into one, separated by spaces. Alternatively they will be obtaining the filename via other methods. Both of these will be compatible with the new arrangement. A side effect from this change is that unknown template types (for example %z) result in an empty argument to the dump handler instead of the argument being dropped. This is a desired change as: It is easier for dump handlers to process empty arguments than dropped ones, especially if they are written in shell or don't pass each template item with a preceding command-line option in order to differentiate between individual template types. Most core_patterns in the wild do not use options so they can confuse different template types (especially numeric ones) if an earlier one gets dropped in old kernels. If the kernel introduces a new template type and a core_pattern uses it, the core dump handler might not expect that the argument can be dropped in old kernels. For example, this can result in security issues when %d is dropped in old kernels. This happened with the corekeeper package in Debian and resulted in the interface between corekeeper and Linux having to be rewritten to use command-line options to differentiate between template types. The core_pattern for most core dump handlers is written by the handler author who would generally not insert unknown template types so this change should be compatible with all the core dump handlers that exist. Link: http://lkml.kernel.org/r/20190528051142.24939-1-pabs3@bonedaddy.net Fixes: 74aadce98605 ("core_pattern: allow passing of arguments to user mode helper when core_pattern is a pipe") Signed-off-by: Paul Wise Reported-by: Jakub Wilk [https://bugs.debian.org/924398] Reported-by: Paul Wise [https://lore.kernel.org/linux-fsdevel/c8b7ecb8508895bf4adb62a748e2ea2c71854597.camel@bonedaddy.net/] Suggested-by: Jakub Wilk Acked-by: Neil Horman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/coredump.c | 44 +++++++++++++++++++++++++++++++++++++++----- 1 file changed, 39 insertions(+), 5 deletions(-) commit ee38d94a0ad89890b770f6c876263cf9fcbfde84 Author: Arnd Bergmann Date: Fri Aug 2 21:49:02 2019 -0700 page flags: prioritize kasan bits over last-cpuid ARM64 randdconfig builds regularly run into a build error, especially when NUMA_BALANCING and SPARSEMEM are enabled but not SPARSEMEM_VMEMMAP: #error "KASAN: not enough bits in page flags for tag" The last-cpuid bits are already contitional on the available space, so the result of the calculation is a bit random on whether they were already left out or not. Adding the kasan tag bits before last-cpuid makes it much more likely to end up with a successful build here, and should be reliable for randconfig at least, as long as that does not randomize NR_CPUS or NODES_SHIFT but uses the defaults. In order for the modified check to not trigger in the x86 vdso32 code where all constants are wrong (building with -m32), enclose all the definitions with an #ifdef. [arnd@arndb.de: build fix] Link: http://lkml.kernel.org/r/CAK8P3a3Mno1SWTcuAOT0Wa9VS15pdU6EfnkxLbDpyS55yO04+g@mail.gmail.com Link: http://lkml.kernel.org/r/20190722115520.3743282-1-arnd@arndb.de Link: https://lore.kernel.org/lkml/20190618095347.3850490-1-arnd@arndb.de/ Fixes: 2813b9c02962 ("kasan, mm, arm64: tag non slab memory allocated via pagealloc") Signed-off-by: Arnd Bergmann Signed-off-by: Arnd Bergmann Reviewed-by: Andrey Konovalov Reviewed-by: Andrey Ryabinin Cc: Andrey Konovalov Cc: Dmitry Vyukov Cc: Will Deacon Cc: Christoph Lameter Cc: Mark Rutland Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/mips/vdso/vdso.h | 1 + include/linux/page-flags-layout.h | 18 +++++++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) commit af700eaed0564d5d3963a7a51cb0843629d7fe3d Author: Arnd Bergmann Date: Fri Aug 2 21:48:58 2019 -0700 ubsan: build ubsan.c more conservatively objtool points out several conditions that it does not like, depending on the combination with other configuration options and compiler variants: stack protector: lib/ubsan.o: warning: objtool: __ubsan_handle_type_mismatch()+0xbf: call to __stack_chk_fail() with UACCESS enabled lib/ubsan.o: warning: objtool: __ubsan_handle_type_mismatch_v1()+0xbe: call to __stack_chk_fail() with UACCESS enabled stackleak plugin: lib/ubsan.o: warning: objtool: __ubsan_handle_type_mismatch()+0x4a: call to stackleak_track_stack() with UACCESS enabled lib/ubsan.o: warning: objtool: __ubsan_handle_type_mismatch_v1()+0x4a: call to stackleak_track_stack() with UACCESS enabled kasan: lib/ubsan.o: warning: objtool: __ubsan_handle_type_mismatch()+0x25: call to memcpy() with UACCESS enabled lib/ubsan.o: warning: objtool: __ubsan_handle_type_mismatch_v1()+0x25: call to memcpy() with UACCESS enabled The stackleak and kasan options just need to be disabled for this file as we do for other files already. For the stack protector, we already attempt to disable it, but this fails on clang because the check is mixed with the gcc specific -fno-conserve-stack option. According to Andrey Ryabinin, that option is not even needed, dropping it here fixes the stackprotector issue. Link: http://lkml.kernel.org/r/20190722125139.1335385-1-arnd@arndb.de Link: https://lore.kernel.org/lkml/20190617123109.667090-1-arnd@arndb.de/t/ Link: https://lore.kernel.org/lkml/20190722091050.2188664-1-arnd@arndb.de/t/ Fixes: d08965a27e84 ("x86/uaccess, ubsan: Fix UBSAN vs. SMAP") Signed-off-by: Arnd Bergmann Reviewed-by: Andrey Ryabinin Cc: Josh Poimboeuf Cc: Peter Zijlstra Cc: Arnd Bergmann Cc: Borislav Petkov Cc: Dmitry Vyukov Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Kees Cook Cc: Matthew Wilcox Cc: Ard Biesheuvel Cc: Andy Shevchenko Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ebb6d35a74ce21ce1673b8f404c1039d5a1e7e2d Author: Arnd Bergmann Date: Fri Aug 2 21:48:54 2019 -0700 kasan: remove clang version check for KASAN_STACK asan-stack mode still uses dangerously large kernel stacks of tens of kilobytes in some drivers, and it does not seem that anyone is working on the clang bug. Turn it off for all clang versions to prevent users from accidentally enabling it once they update to clang-9, and to help automated build testing with clang-9. Link: https://bugs.llvm.org/show_bug.cgi?id=38809 Link: http://lkml.kernel.org/r/20190719200347.2596375-1-arnd@arndb.de Fixes: 6baec880d7a5 ("kasan: turn off asan-stack for clang-8 and earlier") Signed-off-by: Arnd Bergmann Acked-by: Nick Desaulniers Reviewed-by: Mark Brown Reviewed-by: Andrey Ryabinin Cc: Qian Cai Cc: Andrey Konovalov Cc: Vasily Gorbik Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/Kconfig.kasan | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 670105a25608affe01cb0ccdc2a1f4bd2327172b Author: Mel Gorman Date: Fri Aug 2 21:48:51 2019 -0700 mm: compaction: avoid 100% CPU usage during compaction when a task is killed "howaboutsynergy" reported via kernel buzilla number 204165 that compact_zone_order was consuming 100% CPU during a stress test for prolonged periods of time. Specifically the following command, which should exit in 10 seconds, was taking an excessive time to finish while the CPU was pegged at 100%. stress -m 220 --vm-bytes 1000000000 --timeout 10 Tracing indicated a pattern as follows stress-3923 [007] 519.106208: mm_compaction_isolate_migratepages: range=(0x70bb80 ~ 0x70bb80) nr_scanned=0 nr_taken=0 stress-3923 [007] 519.106212: mm_compaction_isolate_migratepages: range=(0x70bb80 ~ 0x70bb80) nr_scanned=0 nr_taken=0 stress-3923 [007] 519.106216: mm_compaction_isolate_migratepages: range=(0x70bb80 ~ 0x70bb80) nr_scanned=0 nr_taken=0 stress-3923 [007] 519.106219: mm_compaction_isolate_migratepages: range=(0x70bb80 ~ 0x70bb80) nr_scanned=0 nr_taken=0 stress-3923 [007] 519.106223: mm_compaction_isolate_migratepages: range=(0x70bb80 ~ 0x70bb80) nr_scanned=0 nr_taken=0 stress-3923 [007] 519.106227: mm_compaction_isolate_migratepages: range=(0x70bb80 ~ 0x70bb80) nr_scanned=0 nr_taken=0 stress-3923 [007] 519.106231: mm_compaction_isolate_migratepages: range=(0x70bb80 ~ 0x70bb80) nr_scanned=0 nr_taken=0 stress-3923 [007] 519.106235: mm_compaction_isolate_migratepages: range=(0x70bb80 ~ 0x70bb80) nr_scanned=0 nr_taken=0 stress-3923 [007] 519.106238: mm_compaction_isolate_migratepages: range=(0x70bb80 ~ 0x70bb80) nr_scanned=0 nr_taken=0 stress-3923 [007] 519.106242: mm_compaction_isolate_migratepages: range=(0x70bb80 ~ 0x70bb80) nr_scanned=0 nr_taken=0 Note that compaction is entered in rapid succession while scanning and isolating nothing. The problem is that when a task that is compacting receives a fatal signal, it retries indefinitely instead of exiting while making no progress as a fatal signal is pending. It's not easy to trigger this condition although enabling zswap helps on the basis that the timing is altered. A very small window has to be hit for the problem to occur (signal delivered while compacting and isolating a PFN for migration that is not aligned to SWAP_CLUSTER_MAX). This was reproduced locally -- 16G single socket system, 8G swap, 30% zswap configured, vm-bytes 22000000000 using Colin Kings stress-ng implementation from github running in a loop until the problem hits). Tracing recorded the problem occurring almost 200K times in a short window. With this patch, the problem hit 4 times but the task existed normally instead of consuming CPU. This problem has existed for some time but it was made worse by commit cf66f0700c8f ("mm, compaction: do not consider a need to reschedule as contention"). Before that commit, if the same condition was hit then locks would be quickly contended and compaction would exit that way. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=204165 Link: http://lkml.kernel.org/r/20190718085708.GE24383@techsingularity.net Fixes: cf66f0700c8f ("mm, compaction: do not consider a need to reschedule as contention") Signed-off-by: Mel Gorman Reviewed-by: Vlastimil Babka Cc: [5.1+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/compaction.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit ebdf4de5642fb6580b0763158b6b4b791c4d6a4d Author: Jan Kara Date: Fri Aug 2 21:48:47 2019 -0700 mm: migrate: fix reference check race between __find_get_block() and migration buffer_migrate_page_norefs() can race with bh users in the following way: CPU1 CPU2 buffer_migrate_page_norefs() buffer_migrate_lock_buffers() checks bh refs spin_unlock(&mapping->private_lock) __find_get_block() spin_lock(&mapping->private_lock) grab bh ref spin_unlock(&mapping->private_lock) move page do bh work This can result in various issues like lost updates to buffers (i.e. metadata corruption) or use after free issues for the old page. This patch closes the race by holding mapping->private_lock while the mapping is being moved to a new page. Ordinarily, a reference can be taken outside of the private_lock using the per-cpu BH LRU but the references are checked and the LRU invalidated if necessary. The private_lock is held once the references are known so the buffer lookup slow path will spin on the private_lock. Between the page lock and private_lock, it should be impossible for other references to be acquired and updates to happen during the migration. A user had reported data corruption issues on a distribution kernel with a similar page migration implementation as mainline. The data corruption could not be reproduced with this patch applied. A small number of migration-intensive tests were run and no performance problems were noted. [mgorman@techsingularity.net: Changelog, removed tracing] Link: http://lkml.kernel.org/r/20190718090238.GF24383@techsingularity.net Fixes: 89cb0888ca14 "mm: migrate: provide buffer_migrate_page_norefs()" Signed-off-by: Jan Kara Signed-off-by: Mel Gorman Cc: [5.0+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/migrate.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit fa1e512fac717f34e7c12d7a384c46e90a647392 Author: Yang Shi Date: Fri Aug 2 21:48:44 2019 -0700 mm: vmscan: check if mem cgroup is disabled or not before calling memcg slab shrinker Shakeel Butt reported premature oom on kernel with "cgroup_disable=memory" since mem_cgroup_is_root() returns false even though memcg is actually NULL. The drop_caches is also broken. It is because commit aeed1d325d42 ("mm/vmscan.c: generalize shrink_slab() calls in shrink_node()") removed the !memcg check before !mem_cgroup_is_root(). And, surprisingly root memcg is allocated even though memory cgroup is disabled by kernel boot parameter. Add mem_cgroup_disabled() check to make reclaimer work as expected. Link: http://lkml.kernel.org/r/1563385526-20805-1-git-send-email-yang.shi@linux.alibaba.com Fixes: aeed1d325d42 ("mm/vmscan.c: generalize shrink_slab() calls in shrink_node()") Signed-off-by: Yang Shi Reported-by: Shakeel Butt Reviewed-by: Shakeel Butt Reviewed-by: Kirill Tkhai Acked-by: Michal Hocko Cc: Jan Hadrava Cc: Vladimir Davydov Cc: Johannes Weiner Cc: Roman Gushchin Cc: Hugh Dickins Cc: Qian Cai Cc: Kirill A. Shutemov Cc: [4.19+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmscan.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 7bc36e3ce91471b6377c8eadc0a2f220a2280083 Author: YueHaibing Date: Fri Aug 2 21:48:40 2019 -0700 ocfs2: remove set but not used variable 'last_hash' Fixes gcc '-Wunused-but-set-variable' warning: fs/ocfs2/xattr.c: In function ocfs2_xattr_bucket_find: fs/ocfs2/xattr.c:3828:6: warning: variable last_hash set but not used [-Wunused-but-set-variable] It's never used and can be removed. Link: http://lkml.kernel.org/r/20190716132110.34836-1-yuehaibing@huawei.com Signed-off-by: YueHaibing Acked-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Gang He Cc: Jun Piao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/xattr.c | 3 --- 1 file changed, 3 deletions(-) commit df9576def004d2cd5beedc00cb6e8901427634b9 Author: Yang Shi Date: Fri Aug 2 21:48:37 2019 -0700 Revert "kmemleak: allow to coexist with fault injection" When running ltp's oom test with kmemleak enabled, the below warning was triggerred since kernel detects __GFP_NOFAIL & ~__GFP_DIRECT_RECLAIM is passed in: WARNING: CPU: 105 PID: 2138 at mm/page_alloc.c:4608 __alloc_pages_nodemask+0x1c31/0x1d50 Modules linked in: loop dax_pmem dax_pmem_core ip_tables x_tables xfs virtio_net net_failover virtio_blk failover ata_generic virtio_pci virtio_ring virtio libata CPU: 105 PID: 2138 Comm: oom01 Not tainted 5.2.0-next-20190710+ #7 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.2-0-g5f4c7b1-prebuilt.qemu-project.org 04/01/2014 RIP: 0010:__alloc_pages_nodemask+0x1c31/0x1d50 ... kmemleak_alloc+0x4e/0xb0 kmem_cache_alloc+0x2a7/0x3e0 mempool_alloc_slab+0x2d/0x40 mempool_alloc+0x118/0x2b0 bio_alloc_bioset+0x19d/0x350 get_swap_bio+0x80/0x230 __swap_writepage+0x5ff/0xb20 The mempool_alloc_slab() clears __GFP_DIRECT_RECLAIM, however kmemleak has __GFP_NOFAIL set all the time due to d9570ee3bd1d4f2 ("kmemleak: allow to coexist with fault injection"). But, it doesn't make any sense to have __GFP_NOFAIL and ~__GFP_DIRECT_RECLAIM specified at the same time. According to the discussion on the mailing list, the commit should be reverted for short term solution. Catalin Marinas would follow up with a better solution for longer term. The failure rate of kmemleak metadata allocation may increase in some circumstances, but this should be expected side effect. Link: http://lkml.kernel.org/r/1563299431-111710-1-git-send-email-yang.shi@linux.alibaba.com Fixes: d9570ee3bd1d4f2 ("kmemleak: allow to coexist with fault injection") Signed-off-by: Yang Shi Suggested-by: Catalin Marinas Acked-by: Michal Hocko Cc: Dmitry Vyukov Cc: David Rientjes Cc: Matthew Wilcox Cc: Qian Cai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/kmemleak.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 68d8681e97bd1c90259f341c1695af05002070ef Author: Mauro Carvalho Chehab Date: Fri Aug 2 21:48:33 2019 -0700 kernel/signal.c: fix a kernel-doc markup The kernel-doc parser doesn't handle expressions with %foo*. Instead, when an asterisk should be part of a constant, it uses an alternative notation: `foo*`. Link: http://lkml.kernel.org/r/7f18c2e0b5e39e6b7eb55ddeb043b8b260b49f2d.1563361575.git.mchehab+samsung@kernel.org Signed-off-by: Mauro Carvalho Chehab Cc: Deepa Dinamani Cc: Jonathan Corbet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/signal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9b562437d388582f5463a4c3f60ee97a2d4d8d58 Author: Chuhong Yuan Date: Wed Jul 31 10:01:40 2019 +0800 drm/modes: Fix unterminated strncpy strncpy(dest, src, strlen(src)) leads to unterminated dest, which is dangerous. Fix it by using strscpy. Fixes: 3aeeb13d8996 ("drm/modes: Support modes names on the command line") Signed-off-by: Chuhong Yuan Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20190731020140.3529-1-hslester96@gmail.com drivers/gpu/drm/drm_modes.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit b887011803582c8539cd9f963035eef91373a169 Author: Evan Quan Date: Fri Aug 2 16:38:32 2019 +0800 drm/amd/powerplay: correct navi10 vcn powergate vcn dpm on is a prerequisite for vcn power gate control. Signed-off-by: Evan Quan Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 4 +++- drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 1 + drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 23 +++++++++++++++-------- 3 files changed, 19 insertions(+), 9 deletions(-) commit 8ecd998debe1280ef8aab45049e69ac3d2116398 Author: Kevin Wang Date: Fri Aug 2 12:01:00 2019 +0800 drm/amd/powerplay: honor hw limit on fetching metrics data for navi10 too frequently to update mertrics table will cause smu internal error. Signed-off-by: Kevin Wang Reviewed-by: Evan Quan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 56 ++++++++++++++++++++---------- 1 file changed, 38 insertions(+), 18 deletions(-) commit 4853fc32306faaef03d409c38921c401379da2ea Author: Matt Coffin Date: Wed Jul 31 14:14:35 2019 -0600 drm/amd/powerplay: Allow changing of fan_control in smu_v11_0 [Why] Before this change, the fan control state on smu_v11 was not able to be changed because the capability check for checking if the fan control capability existed was inverted. [How] The capability check for fan control in smu_v11_0_auto_fan_control was inverted, to correctly check for the absence, instead of presence of fan control capabilities. Reviewed-by: Evan Quan Signed-off-by: Matt Coffin Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0e31225f99e077d0b8c7f8577aab39e766e2477b Merge: 4f1a6ef1df6f 9c8c9c7cdb4c Author: Linus Torvalds Date: Fri Aug 2 18:53:51 2019 -0700 Merge tag 'drm-fixes-2019-08-02-1' of git://anongit.freedesktop.org/drm/drm Pull more drm fixes from Daniel Vetter: "Dave sends his pull, everyone realizes they've been asleep at the wheel and hits send on their own pulls :-/ Normally I'd just ignore these all because w/e for me and Dave. But this time around the latecomers also included drm-intel-fixes, which failed to send out a -fixes pull thus far for this release (screwed up vacation coverage, despite that 2/3 maintainers were around ... they all look appropriately guilty), and that really is overdue to get landed. And since I had to do a pull request anyway I pulled the other two late ones too. intel fixes (didn't have any ever since the main merge window pull): - gvt fixes (2 cc: stable) - fix gpu reset vs mm-shrinker vs wakeup fun (needed a few patches) - two gem locking fixes (one cc: stable) - pile of misc fixes all over with minor impact, 6 cc: stable, others from this window exynos: - misc minor fixes misc: - some build/Kconfig fixes - regression fix for vm scalability perf test which seems to mostly exercise dmesg/console logging ... - the vgem cache flush fix for arm64 broke the world on x86, so that's reverted again * tag 'drm-fixes-2019-08-02-1' of git://anongit.freedesktop.org/drm/drm: (42 commits) Revert "drm/vgem: fix cache synchronization on arm/arm64" drm/exynos: fix missing decrement of retry counter drm/exynos: add CONFIG_MMU dependency drm/exynos: remove redundant assignment to pointer 'node' drm/exynos: using dev_get_drvdata directly drm/bochs: Use shadow buffer for bochs framebuffer console drm/fb-helper: Instanciate shadow FB if configured in device's mode_config drm/fb-helper: Map DRM client buffer only when required drm/client: Support unmapping of DRM client buffers drm/i915: Only recover active engines drm/i915: Add a wakeref getter for iff the wakeref is already active drm/i915: Lift intel_engines_resume() to callers drm/vgem: fix cache synchronization on arm/arm64 drm/i810: Use CONFIG_PREEMPTION drm/bridge: tc358764: Fix build error drm/bridge: lvds-encoder: Fix build error while CONFIG_DRM_KMS_HELPER=m drm/i915/gvt: Adding ppgtt to GVT GEM context after shadow pdps settled. drm/i915/gvt: grab runtime pm first for forcewake use drm/i915/gvt: fix incorrect cache entry for guest page mapping drm/i915/gvt: Checking workload's gma earlier ... commit 4f1a6ef1df6f952fc9f22f34d51a6c3d3c4fbe23 Merge: dcb8cfbd8fe9 45385237f65a Author: Linus Torvalds Date: Fri Aug 2 18:40:49 2019 -0700 Merge tag 'selinux-pr-20190801' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux Pull selinux fix from Paul Moore: "One more small fix for a potential memory leak in an error path" * tag 'selinux-pr-20190801' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux: selinux: fix memory leak in policydb_init() commit 59c0b47a1e11b5e81ab1dfd13579c9fbdb02f0b4 Author: Kevin Lo Date: Thu Aug 1 11:29:38 2019 +0800 r8152: fix typo in register name It is likely that PAL_BDC_CR should be PLA_BDC_CR. Signed-off-by: Kevin Lo Acked-by: Hayes Wang Signed-off-by: David S. Miller drivers/net/usb/r8152.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit aa6b1956158f1afc52761137620d4b3f8a058d24 Author: Heiner Kallweit Date: Wed Jul 31 23:05:10 2019 +0200 net: phy: fix race in genphy_update_link In phy_start_aneg() autoneg is started, and immediately after that link and autoneg status are read. As reported in [0] it can happen that at time of this read the PHY has reset the "aneg complete" bit but not yet the "link up" bit, what can result in a false link-up detection. To fix this don't report link as up if we're in aneg mode and PHY doesn't signal "aneg complete". [0] https://marc.info/?t=156413509900003&r=1&w=2 Fixes: 4950c2ba49cc ("net: phy: fix autoneg mismatch case in genphy_read_status") Reported-by: liuyonglong Tested-by: liuyonglong Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/phy/phy_device.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 2802d2cf24b1ca7ea4c54dde266ded6a16020eb5 Author: YueHaibing Date: Thu Aug 1 09:24:19 2019 +0800 enetc: Select PHYLIB while CONFIG_FSL_ENETC_VF is set Like FSL_ENETC, when CONFIG_FSL_ENETC_VF is set, we should select PHYLIB, otherwise building still fails: drivers/net/ethernet/freescale/enetc/enetc.o: In function `enetc_open': enetc.c:(.text+0x2744): undefined reference to `phy_start' enetc.c:(.text+0x282c): undefined reference to `phy_disconnect' drivers/net/ethernet/freescale/enetc/enetc.o: In function `enetc_close': enetc.c:(.text+0x28f8): undefined reference to `phy_stop' enetc.c:(.text+0x2904): undefined reference to `phy_disconnect' drivers/net/ethernet/freescale/enetc/enetc_ethtool.o:(.rodata+0x3f8): undefined reference to `phy_ethtool_get_link_ksettings' drivers/net/ethernet/freescale/enetc/enetc_ethtool.o:(.rodata+0x400): undefined reference to `phy_ethtool_set_link_ksettings' Reported-by: Hulk Robot Fixes: d4fd0404c1c9 ("enetc: Introduce basic PF and VF ENETC ethernet drivers") Signed-off-by: YueHaibing Signed-off-by: David S. Miller drivers/net/ethernet/freescale/enetc/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 3690c8c9a8edff0db077a38783112d8fe12a7dd2 Author: Wang Xiayang Date: Wed Jul 31 16:15:42 2019 +0800 net/ethernet/qlogic/qed: force the string buffer NULL-terminated strncpy() does not ensure NULL-termination when the input string size equals to the destination buffer size 30. The output string is passed to qed_int_deassertion_aeu_bit() which calls DP_INFO() and relies NULL-termination. Use strlcpy instead. The other conditional branch above strncpy() needs no fix as snprintf() ensures NULL-termination. This issue is identified by a Coccinelle script. Signed-off-by: Wang Xiayang Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_int.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ea443e5e98b5b74e317ef3d26bcaea54931ccdee Author: Gustavo A. R. Silva Date: Tue Jul 30 22:21:41 2019 -0500 atm: iphase: Fix Spectre v1 vulnerability board is controlled by user-space, hence leading to a potential exploitation of the Spectre variant 1 vulnerability. This issue was detected with the help of Smatch: drivers/atm/iphase.c:2765 ia_ioctl() warn: potential spectre issue 'ia_dev' [r] (local cap) drivers/atm/iphase.c:2774 ia_ioctl() warn: possible spectre second half. 'iadev' drivers/atm/iphase.c:2782 ia_ioctl() warn: possible spectre second half. 'iadev' drivers/atm/iphase.c:2816 ia_ioctl() warn: possible spectre second half. 'iadev' drivers/atm/iphase.c:2823 ia_ioctl() warn: possible spectre second half. 'iadev' drivers/atm/iphase.c:2830 ia_ioctl() warn: potential spectre issue '_ia_dev' [r] (local cap) drivers/atm/iphase.c:2845 ia_ioctl() warn: possible spectre second half. 'iadev' drivers/atm/iphase.c:2856 ia_ioctl() warn: possible spectre second half. 'iadev' Fix this by sanitizing board before using it to index ia_dev and _ia_dev Notice that given that speculation windows are large, the policy is to kill the speculation on the first load and not worry if it can be completed with a dependent load/store [1]. [1] https://lore.kernel.org/lkml/20180423164740.GY17484@dhcp22.suse.cz/ Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller drivers/atm/iphase.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 685703b497bacea8765bb409d6b73455b73c540e Author: Dexuan Cui Date: Wed Jul 31 01:25:45 2019 +0000 hv_sock: Fix hang when a connection is closed There is a race condition for an established connection that is being closed by the guest: the refcnt is 4 at the end of hvs_release() (Note: here the 'remove_sock' is false): 1 for the initial value; 1 for the sk being in the bound list; 1 for the sk being in the connected list; 1 for the delayed close_work. After hvs_release() finishes, __vsock_release() -> sock_put(sk) *may* decrease the refcnt to 3. Concurrently, hvs_close_connection() runs in another thread: calls vsock_remove_sock() to decrease the refcnt by 2; call sock_put() to decrease the refcnt to 0, and free the sk; next, the "release_sock(sk)" may hang due to use-after-free. In the above, after hvs_release() finishes, if hvs_close_connection() runs faster than "__vsock_release() -> sock_put(sk)", then there is not any issue, because at the beginning of hvs_close_connection(), the refcnt is still 4. The issue can be resolved if an extra reference is taken when the connection is established. Fixes: a9eeb998c28d ("hv_sock: Add support for delayed close") Signed-off-by: Dexuan Cui Reviewed-by: Sunil Muthuswamy Signed-off-by: David S. Miller net/vmw_vsock/hyperv_transport.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 2b372a9685a757a1d3ab30615ef42b2db7c45298 Author: Jean Delvare Date: Wed Jul 31 10:07:06 2019 +0200 mtd: hyperbus: Add hardware dependency to AM654 driver The hbmc-am654 driver is for the TI AM654, which is an ARM64 SoC, so don't propose this driver on other architectures unless build-testing. Fixes: b07079f1642c ("mtd: hyperbus: Add driver for TI's HyperBus memory controller") Signed-off-by: Jean Delvare Cc: Vignesh Raghavendra Cc: Miquel Raynal Signed-off-by: Miquel Raynal drivers/mtd/hyperbus/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 2d75989d2d92b71f3f34f2704ac109897a87319f Author: Vignesh Raghavendra Date: Fri Jul 19 13:59:12 2019 +0530 mtd: hyperbus: Kconfig: Fix HBMC_AM654 dependencies On x86_64, when CONFIG_OF is not disabled: WARNING: unmet direct dependencies detected for MUX_MMIO Depends on [n]: MULTIPLEXER [=y] && (OF [=n] || COMPILE_TEST [=n]) Selected by [y]: - HBMC_AM654 [=y] && MTD [=y] && MTD_HYPERBUS [=y] due to config HBMC_AM654 tristate "HyperBus controller driver for AM65x SoC" select MULTIPLEXER select MUX_MMIO Fix this by making HBMC_AM654 imply MUX_MMIO instead of select so that dependencies are taken care of. MUX_MMIO is optional for functioning of driver. Fixes: b07079f1642c ("mtd: hyperbus: Add driver for TI's HyperBus memory controller") Reported-by: Randy Dunlap Signed-off-by: Vignesh Raghavendra Acked-by: Randy Dunlap # build-tested Signed-off-by: Miquel Raynal drivers/mtd/hyperbus/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8493b2a06fc5b77ef5c579dc32b12761f7b7a84c Author: Marco Felsch Date: Tue Jul 30 15:44:07 2019 +0200 mtd: rawnand: micron: handle on-die "ECC-off" devices correctly Some devices are not supposed to support on-die ECC but experience shows that internal ECC machinery can actually be enabled through the "SET FEATURE (EFh)" command, even if a read of the "READ ID Parameter Tables" returns that it is not. Currently, the driver checks the "READ ID Parameter" field directly after having enabled the feature. If the check fails it returns immediately but leaves the ECC on. When using buggy chips like MT29F2G08ABAGA and MT29F2G08ABBGA, all future read/program cycles will go through the on-die ECC, confusing the host controller which is supposed to be the one handling correction. To address this in a common way we need to turn off the on-die ECC directly after reading the "READ ID Parameter" and before checking the "ECC status". Cc: stable@vger.kernel.org Fixes: dbc44edbf833 ("mtd: rawnand: micron: Fix on-die ECC detection logic") Signed-off-by: Marco Felsch Reviewed-by: Boris Brezillon Signed-off-by: Miquel Raynal drivers/mtd/nand/raw/nand_micron.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit dcb8cfbd8fe9e62c7d64e82288d3ffe2502b7371 Merge: a507f25d1c20 b877ac9815a8 Author: Linus Torvalds Date: Fri Aug 2 15:26:48 2019 -0700 Merge tag 'for-linus-5.3a-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fixes from Juergen Gross: - a small cleanup - a fix for a build error on ARM with some configs - a fix of a patch for the Xen gntdev driver - three patches for fixing a potential problem in the swiotlb-xen driver which Konrad was fine with me carrying them through the Xen tree * tag 'for-linus-5.3a-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen/swiotlb: remember having called xen_create_contiguous_region() xen/swiotlb: simplify range_straddles_page_boundary() xen/swiotlb: fix condition for calling xen_destroy_contiguous_region() xen: avoid link error on ARM xen/gntdev.c: Replace vm_map_pages() with vm_map_pages_zero() xen/pciback: remove set but not used variable 'old_state' commit a507f25d1c2048c136f6834f10966510b62af987 Merge: 9100fc5ae83e d8bb6718c4db Author: Linus Torvalds Date: Fri Aug 2 15:23:27 2019 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Catalin Marinas: - Update the compat layer to allow single-byte watchpoints on all addresses (similar to the native support) - arm_pmu: fix the restoration of the counters on the CPU_PM_ENTER_FAILED path - Fix build regression with vDSO and Makefile not stripping CROSS_COMPILE_COMPAT - Fix the CTR_EL0 (cache type register) sanitisation on heterogeneous machines (e.g. big.LITTLE) - Fix the interrupt controller priority mask value when pseudo-NMIs are enabled - arm64 kprobes fixes: recovering of the PSTATE.D flag in the single-step exception handler, NOKPROBE annotations for unwind_frame() and walk_stackframe(), remove unneeded rcu_read_lock/unlock from debug handlers - Several gcc fall-through warnings - Unused variable warnings * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: Make debug exception handlers visible from RCU arm64: kprobes: Recover pstate.D in single-step exception handler arm64/mm: fix variable 'tag' set but not used arm64/mm: fix variable 'pud' set but not used arm64: Remove unneeded rcu_read_lock from debug handlers arm64: unwind: Prohibit probing on return_address() arm64: Lower priority mask for GIC_PRIO_IRQON arm64/efi: fix variable 'si' set but not used arm64: cpufeature: Fix feature comparison for CTR_EL0.{CWG,ERG} arm64: vdso: Fix Makefile regression arm64: module: Mark expected switch fall-through arm64: smp: Mark expected switch fall-through arm64: hw_breakpoint: Fix warnings about implicit fallthrough drivers/perf: arm_pmu: Fix failure path in PM notifier arm64: compat: Allow single-byte watchpoints on all addresses commit 9100fc5ae83e64d99fd3300104893ef0e0b0aadb Merge: 4dd68199f3ed f2c5ed0dd500 Author: Linus Torvalds Date: Fri Aug 2 15:18:51 2019 -0700 Merge branch 'parisc-5.3-4' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc fixes from Helge Deller: "A few small fixes for the parisc architecture: - Fix fall-through warnings in parisc math emu code - Fix vmlinuz linking failure with debug-enabled kernels - Fix a race condition in kernel live-patching code - Add missing archclean Makefile target & defconfig adjustments" * 'parisc-5.3-4' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Add archclean Makefile target parisc: Strip debug info from kernel before creating compressed vmlinuz parisc: Fix build of compressed kernel even with debug enabled parisc: fix race condition in patching code parisc: rename default_defconfig to defconfig parisc: Fix fall-through warnings in fpudispatch.c parisc: Mark expected switch fall-throughs in fault.c commit 4dd68199f3ed7ee62f94869a1d7b29749e3696fb Merge: 6e6d05360b80 3cdd98606750 Author: Linus Torvalds Date: Fri Aug 2 15:13:27 2019 -0700 Merge tag 's390-5.3-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 updates from Vasily Gorbik: - Default configs updates - Minor qdio cleanup - Sparse warnings fixes - Implicit-fallthrough warnings fixes * tag 's390-5.3-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/zcrypt: adjust switch fall through comments for -Wimplicit-fallthrough vfio-ccw: make vfio_ccw_async_region_ops static s390/3215: add switch fall through comment for -Wimplicit-fallthrough s390/tape: add fallthrough annotations s390/mm: add fallthrough annotations s390/mm: make gmap_test_and_clear_dirty_pmd static s390/kexec: add missing include to machine_kexec_reloc.c s390/perf: make cf_diag_csd static s390/lib: add missing include s390/boot: add missing declarations and includes s390: update configs s390: clean up qdio.h commit 6e6d05360b80f196ed07061327f03346b204abea Merge: 10e5ddd71fb3 e82f04ec6ba9 Author: Linus Torvalds Date: Fri Aug 2 14:46:33 2019 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Seven fixes to four drivers with no core changes. The mpt3sas one is theoretical until we get a CPU that goes up to 64 bits physical, the qla2xxx one fixes an oops in a driver initialization error leg and the others are mostly cosmetic" [ The fcoe patches may be worth highlighting - they may be "just" cleanups, but they simplify and fix the odd fc_rport_priv structure handling rules so that the new gcc-9 warnings about memset crossing structure boundaries are gone. The old code was hard for humans to understand too, and really confused the compiler sanity checks - Linus ] * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: qla2xxx: Fix possible fcport null-pointer dereferences scsi: mpt3sas: Use 63-bit DMA addressing on SAS35 HBA scsi: hpsa: remove printing internal cdb on tag collision scsi: hpsa: correct scsi command status issue after reset scsi: fcoe: pass in fcoe_rport structure instead of fc_rport_priv scsi: fcoe: Embed fc_rport_priv in fcoe_rport structure scsi: libfc: Whitespace cleanup in libfc.h commit 10e5ddd71fb35cfa4eb86a980b6951d4fe9f68a9 Merge: b2c742373d19 41995342b40c Author: Linus Torvalds Date: Fri Aug 2 14:31:26 2019 -0700 Merge tag 'for-linus-20190802' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "Here's a small collection of fixes that should go into this series. This contains: - io_uring potential use-after-free fix (Jackie) - loop regression fix (Jan) - O_DIRECT fragmented bio regression fix (Damien) - Mark Denis as the new floppy maintainer (Denis) - ataflop switch fall-through annotation (Gustavo) - libata zpodd overflow fix (Kees) - libata ahci deferred probe fix (Miquel) - nbd invalidation BUG_ON() fix (Munehisa) - dasd endless loop fix (Stefan)" * tag 'for-linus-20190802' of git://git.kernel.dk/linux-block: s390/dasd: fix endless loop after read unit address configuration block: Fix __blkdev_direct_IO() for bio fragments MAINTAINERS: floppy: take over maintainership nbd: replace kill_bdev() with __invalidate_device() again ata: libahci: do not complain in case of deferred probe io_uring: fix KASAN use after free in io_sq_wq_submit_work loop: Fix mount(2) failure due to race with LOOP_SET_FD libata: zpodd: Fix small read overflow in zpodd_get_mech_type() ataflop: Mark expected switch fall-through commit b2c742373d19b356b112d9f3ca4e9377c6f9708d Merge: b07042ca32ff 9c50a98f55f4 Author: Linus Torvalds Date: Fri Aug 2 14:28:40 2019 -0700 Merge tag 'for-5.3/dm-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper fixes from Mike Snitzer: "Fix NULL pointer and various whitespace issues with DM's recent DAX code changes from commit in 5.3 merge" * tag 'for-5.3/dm-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm table: fix various whitespace issues with recent DAX code dm table: fix dax_dev NULL dereference in device_synchronous() commit b07042ca32ffca69b4e3c3b938bb89ab8aa18035 Merge: d38c3fa6f959 020fb3bebc22 Author: Linus Torvalds Date: Fri Aug 2 14:23:24 2019 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fixes from Doug Ledford: "Here's our second -rc pull request. Nothing particularly special in this one. The client removal deadlock fix is kindy tricky, but we had multiple eyes on it and no one could find a fault in it. A couple Spectre V1 fixes too. Otherwise, all just normal -rc fodder: - A couple Spectre V1 fixes (umad, hfi1) - Fix a tricky deadlock in the rdma core code with refcounting instead of locks (client removal patches) - Build errors (hns) - Fix a scheduling while atomic issue (mlx5) - Use after free fix (mad) - Fix error path return code (hns) - Null deref fix (siw_crypto_hash) - A few other misc. minor fixes" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: RDMA/hns: Fix error return code in hns_roce_v1_rsv_lp_qp() RDMA/mlx5: Release locks during notifier unregister IB/hfi1: Fix Spectre v1 vulnerability IB/mad: Fix use-after-free in ib mad completion handling RDMA/restrack: Track driver QP types in resource tracker IB/mlx5: Fix MR registration flow to use UMR properly RDMA/devices: Remove the lock around remove_client_context RDMA/devices: Do not deadlock during client removal IB/core: Add mitigation for Spectre V1 Do not dereference 'siw_crypto_shash' before checking RDMA/qedr: Fix the hca_type and hca_rev returned in device attributes RDMA/hns: Fix build error commit d38c3fa6f959b8b5b167f120d70d66418714dbe4 Merge: 97b00aff2c45 a6d155d2e363 Author: Linus Torvalds Date: Fri Aug 2 14:19:41 2019 -0700 Merge tag 'for-5.3-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: - tiny race window during 2 transactions aborting at the same time can accidentally lead to a commit - regression fix, possible deadlock during fiemap - fix for an old bug when incremental send can fail on a file that has been deduplicated in a special way * tag 'for-5.3-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: Btrfs: fix deadlock between fiemap and transaction commits Btrfs: fix race leading to fs corruption after transaction abort Btrfs: fix incremental send failure after deduplication commit 30c21734d853dae99d05a5295a59b7e26ccd5135 Author: Vijendar Mukunda Date: Fri Aug 2 19:21:24 2019 +0530 ASoC: amd: acp3x: use dma address for acp3x dma driver We shouldn't assume CPU physical address we get from page_to_phys() is same as DMA address we get from dma_alloc_coherent(). On x86_64, we won't run into any problem with the assumption when dma_ops is nommu_dma_ops. However, DMA address is IOVA when IOMMU is enabled. And it's most likely different from CPU physical address when AMD IOMMU is not in passthrough mode. This patch fixes page faults when IOMMU is enabled. Signed-off-by: Vijendar Mukunda Link: https://lore.kernel.org/r/1564753899-17124-2-git-send-email-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown sound/soc/amd/raven/acp3x-pcm-dma.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 88639051017fb61a414b636dd0fc490da2b62b64 Author: Vijendar Mukunda Date: Fri Aug 2 19:21:23 2019 +0530 ASoC: amd: acp3x: use dma_ops of parent device for acp3x dma driver AMD platform device acp3x_rv_i2s created by parent PCI device driver. Pass struct device of the parent to snd_pcm_lib_preallocate_pages() so dma_alloc_coherent() can use correct dma_ops. Otherwise, it will use default dma_ops which is nommu_dma_ops on x86_64 even when IOMMU is enabled and set to non passthrough mode. Signed-off-by: Vijendar Mukunda Link: https://lore.kernel.org/r/1564753899-17124-1-git-send-email-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown sound/soc/amd/raven/acp3x-pcm-dma.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 88d02c9ba2e83fc22d37ccb1f11c62ea6fc9ae50 Author: Guenter Roeck Date: Fri Aug 2 09:03:42 2019 -0700 usb: typec: tcpm: Ignore unsupported/unknown alternate mode requests TCPM may receive PD messages associated with unknown or unsupported alternate modes. If that happens, calls to typec_match_altmode() will return NULL. The tcpm code does not currently take this into account. This results in crashes. Unable to handle kernel NULL pointer dereference at virtual address 000001f0 pgd = 41dad9a1 [000001f0] *pgd=00000000 Internal error: Oops: 5 [#1] THUMB2 Modules linked in: tcpci tcpm CPU: 0 PID: 2338 Comm: kworker/u2:0 Not tainted 5.1.18-sama5-armv7-r2 #6 Hardware name: Atmel SAMA5 Workqueue: 2-0050 tcpm_pd_rx_handler [tcpm] PC is at typec_altmode_attention+0x0/0x14 LR is at tcpm_pd_rx_handler+0xa3b/0xda0 [tcpm] ... [] (typec_altmode_attention) from [] (tcpm_pd_rx_handler+0xa3b/0xda0 [tcpm]) [] (tcpm_pd_rx_handler [tcpm]) from [] (process_one_work+0x123/0x2a8) [] (process_one_work) from [] (worker_thread+0xbd/0x3b0) [] (worker_thread) from [] (kthread+0xcf/0xf4) [] (kthread) from [] (ret_from_fork+0x11/0x38) Ignore PD messages if the associated alternate mode is not supported. Fixes: e9576fe8e605c ("usb: typec: tcpm: Support for Alternate Modes") Cc: stable Reported-by: Douglas Gilbert Cc: Douglas Gilbert Acked-by: Heikki Krogerus Tested-by: Douglas Gilbert Signed-off-by: Guenter Roeck Link: https://lore.kernel.org/r/1564761822-13984-1-git-send-email-linux@roeck-us.net Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/tcpm/tcpm.c | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) commit cb53c517285f8d2548d11422173ca8ec7b9c8f44 Author: Mathias Nyman Date: Fri Aug 2 18:00:44 2019 +0300 xhci: Fix NULL pointer dereference at endpoint zero reset. Usb core will reset the default control endpoint "ep0" before resetting a device. if the endpoint has a valid pointer back to the usb device then the xhci driver reset callback will try to clear the toggle for the endpoint. ep0 didn't use to have this pointer set as ep0 was always allocated by default together with a xhci slot for the usb device. Other endpoints got their usb device pointer set in xhci_add_endpoint() This changed with commit ef513be0a905 ("usb: xhci: Add Clear_TT_Buffer") which sets the pointer for any endpoint on a FS/LS device behind a HS hub that halts, including ep0. If xHC controller needs to be reset at resume, then all the xhci slots will be lost. Slots will be reenabled and reallocated at device reset, but unlike other endpoints the ep0 is reset before device reset, while the xhci slot may still be invalid, causing NULL pointer dereference. Fix it by checking that the endpoint has both a usb device pointer and valid xhci slot before trying to clear the toggle. This issue was not seen earlier as ep0 didn't use to have a valid usb device pointer, and other endpoints were only reset after device reset when xhci slots were properly reenabled. Reported-by: Bob Gleitsmann Reported-by: Enric Balletbo Serra Fixes: ef513be0a905 ("usb: xhci: Add Clear_TT_Buffer") Signed-off-by: Mathias Nyman Tested-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/1564758044-24748-1-git-send-email-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 783bda5e41acc71f98336e1a402c180f9748e5dc Author: Yoshihiro Shimoda Date: Fri Aug 2 17:33:35 2019 +0900 usb: host: xhci-rcar: Fix timeout in xhci_suspend() When a USB device is connected to the host controller and the system enters suspend, the following error happens in xhci_suspend(): xhci-hcd ee000000.usb: WARN: xHC CMD_RUN timeout Since the firmware/internal CPU control the USBSTS.STS_HALT and the process speed is down when the roothub port enters U3, long delay for the handshake of STS_HALT is neeed in xhci_suspend(). So, this patch adds to set the XHCI_SLOW_SUSPEND. Fixes: 435cc1138ec9 ("usb: host: xhci-plat: set resume_quirk() for R-Car controllers") Cc: # v4.12+ Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/1564734815-17964-1-git-send-email-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-rcar.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 97b00aff2c45069bb8ea88acac664a17d63f77f9 Merge: 755f1fed27f4 706cb5492c8c Author: Linus Torvalds Date: Fri Aug 2 09:02:58 2019 -0700 Merge tag 'gfs2-v5.3-rc2.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull gfs2 fix from Andreas Gruenbacher: "Fix gfs2 cluster coherency bug" * tag 'gfs2-v5.3-rc2.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: gfs2: Inode dirtying fix commit 755f1fed27f4b1d57dd8b2856c06086636cd7284 Merge: 75cdf416b322 42787ed79638 Author: Linus Torvalds Date: Fri Aug 2 08:55:28 2019 -0700 Merge tag 'pm-5.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fix from Rafael Wysocki: "Fix recent regression affecting ACPI device power management" * tag 'pm-5.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: PM: Fix regression in acpi_device_set_power() commit 75cdf416b32293dfc348d4c06fcc775ba4dacff6 Merge: f26dbb2302e9 5d78e1c2b7f4 Author: Linus Torvalds Date: Fri Aug 2 08:53:34 2019 -0700 Merge tag 'sound-5.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: - A further fix for syzcaller issues with USB-audio, addressing NULL dereference that was introduced by the recent fix - Avoid a long delay at boot with HD-audio when i915 module was built but not installed, found on some Debian systems - A fix of small race window at PCM draining * tag 'sound-5.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: usb-audio: Fix gpf in snd_usb_pipe_sanity_check ALSA: pcm: fix lost wakeup event scenarios in snd_pcm_drain ALSA: hda: Fix 1-minute detection delay when i915 module is not available commit f26dbb2302e94c0964f52b9193166430cc8b922a Merge: 42d21900b39c f8981e0309e9 Author: Linus Torvalds Date: Fri Aug 2 08:50:37 2019 -0700 Merge tag 'drm-fixes-2019-08-02' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Thanks to Daniel for handling the email the last couple of weeks, flus and break-ins combined to derail me. Surprised nothing materialised today to take me out again. Just more amdgpu navi fixes, msm fixes and a single nouveau regression fix: amdgpu: - navi10 temperature and pstate fixes - vcn dynamic power management fix - CS ioctl error handling fix - debugfs info leak fix - amdkfd VegaM fix msm: - dma sync call fix - mdp5 dsi command mode fix - fall-through fixes - disabled GPU fix nouveau: - regression fix for displayport MST support" * tag 'drm-fixes-2019-08-02' of git://anongit.freedesktop.org/drm/drm: drm/nouveau: Only release VCPI slots on mode changes drm: msm: Fix add_gpu_components drm/msm: Annotate intentional switch statement fall throughs drm/msm: add support for per-CRTC max_vblank_count on mdp5 drm/msm: Use the correct dma_sync calls in msm_gem drm/amd/powerplay: correct UVD/VCE/VCN power status retrieval drm/amd/powerplay: correct Navi10 VCN powergate control (v2) drm/amd/powerplay: support VCN powergate status retrieval for SW SMU drm/amd/powerplay: support VCN powergate status retrieval on Raven drm/amd/powerplay: add new sensor type for VCN powergate status drm/amdgpu: fix a potential information leaking bug drm/amdgpu: fix error handling in amdgpu_cs_process_fence_dep drm/amd/powerplay: enable SW SMU reset functionality drm/amd/powerplay: fix null pointer dereference around dpm state relates drm/amdgpu/powerplay: use proper revision id for navi drm/amd/powerplay: fix temperature granularity error in smu11 drm/amd/powerplay: add callback function of get_thermal_temperature_range drm/amdkfd: Fix byte align on VegaM commit 42d21900b39ceebf7be1512d02d915280ba2bba5 Merge: 234172f6bbf8 e1f1ae8002e4 Author: Linus Torvalds Date: Fri Aug 2 08:47:28 2019 -0700 Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk fixes from Stephen Boyd: "A few fixes for code that came in during the merge window or that started getting exercised differently this time around: - Select regmap MMIO kconfig in spreadtrum driver to avoid compile errors - Complete kerneldoc on devm_clk_bulk_get_optional() - Register an essential clk earlier on mediatek mt8183 SoCs so the clocksource driver can use it - Fix divisor math in the at91 driver - Plug a race in Renesas reset control logic" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: renesas: cpg-mssr: Fix reset control race condition clk: sprd: Select REGMAP_MMIO to avoid compile errors clk: mediatek: mt8183: Register 13MHz clock earlier for clocksource clk: Add missing documentation of devm_clk_bulk_get_optional() argument clk: at91: generated: Truncate divisor to GENERATED_MAX_DIV + 1 commit 234172f6bbf8e26fa8407c4bbbf2a36da30d7913 Merge: 35fca9f8a999 ad3c7b18c5b3 Author: Linus Torvalds Date: Fri Aug 2 08:44:33 2019 -0700 Merge tag 'arm-swiotlb-5.3' of git://git.infradead.org/users/hch/dma-mapping Pull arm swiotlb support from Christoph Hellwig: "This fixes a cascade of regressions that originally started with the addition of the ia64 port, but only got fatal once we removed most uses of block layer bounce buffering in Linux 4.18. The reason is that while the original i386/PAE code that was the first architecture that supported > 4GB of memory without an iommu decided to leave bounce buffering to the subsystems, which in those days just mean block and networking as no one else consumed arbitrary userspace memory. Later with ia64, x86_64 and other ports we assumed that either an iommu or something that fakes it up ("software IOTLB" in beautiful Intel speak) is present and that subsystems can rely on that for dealing with addressing limitations in devices. Except that the ARM LPAE scheme that added larger physical address to 32-bit ARM did not follow that scheme and thus only worked by chance and only for block and networking I/O directly to highmem. Long story, short fix - add swiotlb support to arm when build for LPAE platforms, which actuallys turns out to be pretty trivial with the modern dma-direct / swiotlb code to fix the Linux 4.18-ish regression" * tag 'arm-swiotlb-5.3' of git://git.infradead.org/users/hch/dma-mapping: arm: use swiotlb for bounce buffering on LPAE configs dma-mapping: check pfn validity in dma_common_{mmap,get_sgtable} commit 35fca9f8a999627e3291907992b299b1207baee5 Merge: 1e78030e5e5b f46cc0152501 Author: Linus Torvalds Date: Fri Aug 2 08:41:11 2019 -0700 Merge tag 'dma-mapping-5.3-3' of git://git.infradead.org/users/hch/dma-mapping Pull dma-mapping regression fixes from Christoph Hellwig: "Two related regression fixes for changes from this merge window to fix alignment issues introduced in the CMA allocation rework (Nicolin Chen)" * tag 'dma-mapping-5.3-3' of git://git.infradead.org/users/hch/dma-mapping: dma-contiguous: page-align the size in dma_free_contiguous() dma-contiguous: do not overwrite align in dma_alloc_contiguous() commit d1836f3813ee0742a2067d5f4d78e811d2b76d9d Author: Thong Thai Date: Thu Jul 25 11:26:56 2019 -0400 drm/amd/amdgpu/vcn_v2_0: Move VCN 2.0 specific dec ring test to vcn_v2_0 VCN 2.0 firmware now requires a packet start command to be sent before any other decode ring buffer command. Signed-off-by: Thong Thai Reviewed-by: Leo Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) commit af655cc5aae800f30cd71c5d72d36bd3ecb1e7df Author: Thong Thai Date: Thu Jul 25 11:21:58 2019 -0400 drm/amd/amdgpu/vcn_v2_0: Mark RB commands as KMD commands Sets the CMD_SOURCE bit for VCN 2.0 Decoder Ring Buffer commands. This bit was previously set by the RBC HW on older firmware. Newer firmware uses a SW RBC and this bit has to be set by the driver. Signed-off-by: Thong Thai Reviewed-by: Leo Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 1 + drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) commit 9c8c9c7cdb4c8fb48a2bc70f41a07920f761d2cd Merge: 63dc6e63e682 1bbbab097a05 Author: Daniel Vetter Date: Fri Aug 2 17:10:16 2019 +0200 Merge tag 'exynos-drm-fixes-for-v5.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-fixes - Two cleanup patches . use dev_get_drvdata for readability instead of platform_get_drvdata . remove redundant assignment to node. - Two fixup patches . fix undefined reference to 'vmf_insert_mixed' with NOMMU configuration. . fix potential infinite spin issue by decrementing 'retry' variable in scaler_reset function of exynos_drm_scaler.c Signed-off-by: Daniel Vetter From: Inki Dae Link: https://patchwork.freedesktop.org/patch/msgid/1564734791-745-1-git-send-email-inki.dae@samsung.com commit 63dc6e63e682cf756ab8c18aa1b85b0efb358dad Author: Chris Wilson Date: Thu Aug 1 13:44:58 2019 +0100 Revert "drm/vgem: fix cache synchronization on arm/arm64" commit 7e9e5ead55be ("drm/vgem: fix cache synchronization on arm/arm64") broke all of the !llc i915-vgem coherency tests in CI, and left the HW very, very unhappy (which is even more scary). Fixes: 7e9e5ead55be ("drm/vgem: fix cache synchronization on arm/arm64") Signed-off-by: Chris Wilson Cc: Daniel Vetter Cc: Rob Clark Cc: Sean Paul Acked-by: Sean Paul Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190801124458.24949-1-chris@chris-wilson.co.uk drivers/gpu/drm/vgem/vgem_drv.c | 130 +++++++++++++++------------------------- 1 file changed, 47 insertions(+), 83 deletions(-) commit 5fd5d2b7c53de5a1290d82f8085876e2afadc97d Merge: ab35c8a5b07e 585405945707 Author: Daniel Vetter Date: Fri Aug 2 17:03:04 2019 +0200 Merge tag 'drm-misc-fixes-2019-08-02' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes drm-misc-fixes for v5.3-rc3: - Fix some build errors in drm/bridge. - Do not build i810 on CONFIG_PREEMPTION. - Fix cache sync on arm in vgem. - Allow mapping fb in drm_client only when required, and use it to fix bochs fbdev. Signed-off-by: Daniel Vetter From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/af0dc371-16e0-cee8-0d71-4824d44aa973@linux.intel.com commit 664b16589f882202b8fa8149d0074f3159bade76 Author: Pierre-Louis Bossart Date: Thu Jul 25 18:40:06 2019 -0500 soundwire: cadence_master: fix definitions for INTSTAT0/1 Two off-by-one errors: INTSTAT0 missed BIT(31) and INTSTAT1 is only defined on first 16 bits. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20190725234032.21152-15-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul drivers/soundwire/cadence_master.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b07dd9b400981f487940a4d84292d3a0e7cd9362 Author: Pierre-Louis Bossart Date: Thu Jul 25 18:40:05 2019 -0500 soundwire: cadence_master: fix register definition for SLAVE_STATE wrong prefix and wrong macro. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20190725234032.21152-14-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul drivers/soundwire/cadence_master.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3cdd98606750a5a1d1c8bcda5b481cb86ed67b3b Author: Vasily Gorbik Date: Mon Jul 29 01:23:46 2019 +0200 s390/zcrypt: adjust switch fall through comments for -Wimplicit-fallthrough Silence the following warnings when built with -Wimplicit-fallthrough=3 enabled by default since 5.3-rc2: In file included from ./include/linux/preempt.h:11, from ./include/linux/spinlock.h:51, from ./include/linux/mmzone.h:8, from ./include/linux/gfp.h:6, from ./include/linux/slab.h:15, from drivers/s390/crypto/ap_queue.c:13: drivers/s390/crypto/ap_queue.c: In function 'ap_sm_recv': ./include/linux/list.h:577:2: warning: this statement may fall through [-Wimplicit-fallthrough=] 577 | for (pos = list_first_entry(head, typeof(*pos), member); \ | ^~~ drivers/s390/crypto/ap_queue.c:147:3: note: in expansion of macro 'list_for_each_entry' 147 | list_for_each_entry(ap_msg, &aq->pendingq, list) { | ^~~~~~~~~~~~~~~~~~~ drivers/s390/crypto/ap_queue.c:155:2: note: here 155 | case AP_RESPONSE_NO_PENDING_REPLY: | ^~~~ drivers/s390/crypto/zcrypt_msgtype6.c: In function 'convert_response_ep11_xcrb': drivers/s390/crypto/zcrypt_msgtype6.c:871:6: warning: this statement may fall through [-Wimplicit-fallthrough=] 871 | if (msg->cprbx.cprb_ver_id == 0x04) | ^ drivers/s390/crypto/zcrypt_msgtype6.c:874:2: note: here 874 | default: /* Unknown response type, this should NEVER EVER happen */ | ^~~~~~~ drivers/s390/crypto/zcrypt_msgtype6.c: In function 'convert_response_rng': drivers/s390/crypto/zcrypt_msgtype6.c:901:6: warning: this statement may fall through [-Wimplicit-fallthrough=] 901 | if (msg->cprbx.cprb_ver_id == 0x02) | ^ drivers/s390/crypto/zcrypt_msgtype6.c:907:2: note: here 907 | default: /* Unknown response type, this should NEVER EVER happen */ | ^~~~~~~ drivers/s390/crypto/zcrypt_msgtype6.c: In function 'convert_response_xcrb': drivers/s390/crypto/zcrypt_msgtype6.c:838:6: warning: this statement may fall through [-Wimplicit-fallthrough=] 838 | if (msg->cprbx.cprb_ver_id == 0x02) | ^ drivers/s390/crypto/zcrypt_msgtype6.c:844:2: note: here 844 | default: /* Unknown response type, this should NEVER EVER happen */ | ^~~~~~~ drivers/s390/crypto/zcrypt_msgtype6.c: In function 'convert_response_ica': drivers/s390/crypto/zcrypt_msgtype6.c:801:6: warning: this statement may fall through [-Wimplicit-fallthrough=] 801 | if (msg->cprbx.cprb_ver_id == 0x02) | ^ drivers/s390/crypto/zcrypt_msgtype6.c:808:2: note: here 808 | default: /* Unknown response type, this should NEVER EVER happen */ | ^~~~~~~ Acked-by: Patrick Steuer Signed-off-by: Vasily Gorbik drivers/s390/crypto/ap_queue.c | 1 + drivers/s390/crypto/zcrypt_msgtype6.c | 17 ++++------------- 2 files changed, 5 insertions(+), 13 deletions(-) commit ead16e53c2f0ed946d82d4037c630e2f60f4ab69 Author: Tomas Bortoli Date: Wed Jul 31 10:54:47 2019 -0400 can: peak_usb: pcan_usb_pro: Fix info-leaks to USB devices Uninitialized Kernel memory can leak to USB devices. Fix by using kzalloc() instead of kmalloc() on the affected buffers. Signed-off-by: Tomas Bortoli Reported-by: syzbot+d6a5a1a3657b596ef132@syzkaller.appspotmail.com Fixes: f14e22435a27 ("net: can: peak_usb: Do not do dma on the stack") Cc: linux-stable Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/peak_usb/pcan_usb_pro.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 30a8beeb3042f49d0537b7050fd21b490166a3d9 Author: Tomas Bortoli Date: Wed Jul 31 10:54:47 2019 -0400 can: peak_usb: pcan_usb_fd: Fix info-leaks to USB devices Uninitialized Kernel memory can leak to USB devices. Fix by using kzalloc() instead of kmalloc() on the affected buffers. Signed-off-by: Tomas Bortoli Reported-by: syzbot+513e4d0985298538bf9b@syzkaller.appspotmail.com Fixes: 0a25e1f4f185 ("can: peak_usb: add support for PEAK new CANFD USB adapters") Cc: linux-stable Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/peak_usb/pcan_usb_fd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e787f19373b8a5fa24087800ed78314fd17b984a Author: Wang Xiayang Date: Wed Jul 31 15:25:59 2019 +0800 can: peak_usb: force the string buffer NULL-terminated strncpy() does not ensure NULL-termination when the input string size equals to the destination buffer size IFNAMSIZ. The output string is passed to dev_info() which relies on the NULL-termination. Use strlcpy() instead. This issue is identified by a Coccinelle script. Signed-off-by: Wang Xiayang Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/peak_usb/pcan_usb_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cd28aa2e056cd1ea79fc5f24eed0ce868c6cab5c Author: Wang Xiayang Date: Wed Jul 31 15:31:14 2019 +0800 can: sja1000: force the string buffer NULL-terminated strncpy() does not ensure NULL-termination when the input string size equals to the destination buffer size IFNAMSIZ. The output string 'name' is passed to dev_info which relies on NULL-termination. Use strlcpy() instead. This issue is identified by a Coccinelle script. Signed-off-by: Wang Xiayang Signed-off-by: Marc Kleine-Budde drivers/net/can/sja1000/peak_pcmcia.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a4127952859a869cf3fc5a49547dbe2ffa2eac89 Author: Jarkko Nikula Date: Thu Aug 1 16:49:01 2019 +0300 spi: pxa2xx: Add support for Intel Tiger Lake Intel Tiger Lake -LP LPSS SPI controller is otherwise similar than Cannon Lake but has more controllers and up to two chip selects per controller. Signed-off-by: Jarkko Nikula Link: https://lore.kernel.org/r/20190801134901.12635-1-jarkko.nikula@linux.intel.com Signed-off-by: Mark Brown drivers/spi/spi-pxa2xx.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit d8bb6718c4db9bcd075dde7ff55d46091ccfae15 Author: Masami Hiramatsu Date: Thu Aug 1 23:36:14 2019 +0900 arm64: Make debug exception handlers visible from RCU Make debug exceptions visible from RCU so that synchronize_rcu() correctly track the debug exception handler. This also introduces sanity checks for user-mode exceptions as same as x86's ist_enter()/ist_exit(). The debug exception can interrupt in idle task. For example, it warns if we put a kprobe on a function called from idle task as below. The warning message showed that the rcu_read_lock() caused this problem. But actually, this means the RCU is lost the context which is already in NMI/IRQ. /sys/kernel/debug/tracing # echo p default_idle_call >> kprobe_events /sys/kernel/debug/tracing # echo 1 > events/kprobes/enable /sys/kernel/debug/tracing # [ 135.122237] [ 135.125035] ============================= [ 135.125310] WARNING: suspicious RCU usage [ 135.125581] 5.2.0-08445-g9187c508bdc7 #20 Not tainted [ 135.125904] ----------------------------- [ 135.126205] include/linux/rcupdate.h:594 rcu_read_lock() used illegally while idle! [ 135.126839] [ 135.126839] other info that might help us debug this: [ 135.126839] [ 135.127410] [ 135.127410] RCU used illegally from idle CPU! [ 135.127410] rcu_scheduler_active = 2, debug_locks = 1 [ 135.128114] RCU used illegally from extended quiescent state! [ 135.128555] 1 lock held by swapper/0/0: [ 135.128944] #0: (____ptrval____) (rcu_read_lock){....}, at: call_break_hook+0x0/0x178 [ 135.130499] [ 135.130499] stack backtrace: [ 135.131192] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.2.0-08445-g9187c508bdc7 #20 [ 135.131841] Hardware name: linux,dummy-virt (DT) [ 135.132224] Call trace: [ 135.132491] dump_backtrace+0x0/0x140 [ 135.132806] show_stack+0x24/0x30 [ 135.133133] dump_stack+0xc4/0x10c [ 135.133726] lockdep_rcu_suspicious+0xf8/0x108 [ 135.134171] call_break_hook+0x170/0x178 [ 135.134486] brk_handler+0x28/0x68 [ 135.134792] do_debug_exception+0x90/0x150 [ 135.135051] el1_dbg+0x18/0x8c [ 135.135260] default_idle_call+0x0/0x44 [ 135.135516] cpu_startup_entry+0x2c/0x30 [ 135.135815] rest_init+0x1b0/0x280 [ 135.136044] arch_call_rest_init+0x14/0x1c [ 135.136305] start_kernel+0x4d4/0x500 [ 135.136597] So make debug exception visible to RCU can fix this warning. Reported-by: Naresh Kamboju Acked-by: Paul E. McKenney Signed-off-by: Masami Hiramatsu Signed-off-by: Will Deacon arch/arm64/mm/fault.c | 57 +++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 49 insertions(+), 8 deletions(-) commit b3980e48528c4d2a9e70b145a5bba328b73a0f93 Author: Masami Hiramatsu Date: Thu Aug 1 23:25:49 2019 +0900 arm64: kprobes: Recover pstate.D in single-step exception handler kprobes manipulates the interrupted PSTATE for single step, and doesn't restore it. Thus, if we put a kprobe where the pstate.D (debug) masked, the mask will be cleared after the kprobe hits. Moreover, in the most complicated case, this can lead a kernel crash with below message when a nested kprobe hits. [ 152.118921] Unexpected kernel single-step exception at EL1 When the 1st kprobe hits, do_debug_exception() will be called. At this point, debug exception (= pstate.D) must be masked (=1). But if another kprobes hits before single-step of the first kprobe (e.g. inside user pre_handler), it unmask the debug exception (pstate.D = 0) and return. Then, when the 1st kprobe setting up single-step, it saves current DAIF, mask DAIF, enable single-step, and restore DAIF. However, since "D" flag in DAIF is cleared by the 2nd kprobe, the single-step exception happens soon after restoring DAIF. This has been introduced by commit 7419333fa15e ("arm64: kprobe: Always clear pstate.D in breakpoint exception handler") To solve this issue, this stores all DAIF bits and restore it after single stepping. Reported-by: Naresh Kamboju Fixes: 7419333fa15e ("arm64: kprobe: Always clear pstate.D in breakpoint exception handler") Reviewed-by: James Morse Tested-by: James Morse Signed-off-by: Masami Hiramatsu Signed-off-by: Will Deacon arch/arm64/include/asm/daifflags.h | 2 ++ arch/arm64/kernel/probes/kprobes.c | 40 ++++++-------------------------------- 2 files changed, 8 insertions(+), 34 deletions(-) commit ab35c8a5b07ee70f8544a2f2a131153a6584cb53 Merge: f8981e0309e9 4b9bb9728c91 Author: Daniel Vetter Date: Fri Aug 2 11:31:20 2019 +0200 Merge tag 'drm-intel-fixes-2019-08-02' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes drm/i915 fixes for v5.3-rc3: - GVT fixes - Fix TBT aux powerwell - Fix PSR2 training pattern duration - Fix memory leak in runtime wakeref tracking - Fix ICL memory bandwidth issue preventing planes from being enabled - Fix OA mux configuration delays for accurate performance data - Fix VLV/CHV DP audio cdclk frequency requirements - Fix register whitelisting to fix a number of GL & Vulkan CTS tests - Fix ICL perf register offsets - Fix Gen11 Sampler Prefetch workaround, impacting dEQP tests - Fix various gen2 tracepoints - A number of GEM locking fixes addressing lockdep issues - Fix idle engine reset, recover only active engines - Fix incorrect MCR programming Signed-off-by: Daniel Vetter From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87d0hnncgo.fsf@intel.com commit 1bbbab097a05276e312dd2462791d32b21ceb1ee Author: Colin Ian King Date: Mon Jul 22 23:25:35 2019 +0100 drm/exynos: fix missing decrement of retry counter Currently the retry counter is not being decremented, leading to a potential infinite spin if the scalar_reads don't change state. Addresses-Coverity: ("Infinite loop") Fixes: 280e54c9f614 ("drm/exynos: scaler: Reset hardware before starting the operation") Signed-off-by: Colin Ian King Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_scaler.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d6f25bd9d4079165ea90f12d71e06d1dca83cd86 Author: Arnd Bergmann Date: Tue Jul 9 21:08:48 2019 +0900 drm/exynos: add CONFIG_MMU dependency Compile-testing this driver on a NOMMU configuration shows a link failure: drivers/gpu/drm/exynos/exynos_drm_gem.o: In function `exynos_drm_gem_fault': exynos_drm_gem.c:(.text+0x484): undefined reference to `vmf_insert_mixed' Add a CONFIG_MMU dependency to ensure we only enable this in configurations that build correctly. Many other drm drivers have the same dependency. It would be nice to make this work in MMU-less configurations, but evidently nobody has ever needed this so far. Fixes: 156bdac99061 ("drm/exynos: trigger build of all modules") Signed-off-by: Arnd Bergmann Reviewed-by: Vladimir Murzin Signed-off-by: Inki Dae drivers/gpu/drm/exynos/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 59d431746f1b3c76fd551b71241d7fdce38a58e9 Author: Colin Ian King Date: Tue Jul 9 21:01:14 2019 +0900 drm/exynos: remove redundant assignment to pointer 'node' The pointer 'node' is being assigned with a value that is never read and is re-assigned later. The assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_g2d.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9eae7c3bcb52ec0a9f816d830e232e36a20b46d4 Author: Fuqian Huang Date: Thu Jul 4 10:34:36 2019 +0800 drm/exynos: using dev_get_drvdata directly Several drivers cast a struct device pointer to a struct platform_device pointer only to then call platform_get_drvdata(). To improve readability, these constructs can be simplified by using dev_get_drvdata() directly. Signed-off-by: Fuqian Huang Reviewed-by: Emil Velikov Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_fimc.c | 2 +- drivers/gpu/drm/exynos/exynos_drm_gsc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit e2664ecbb2f26225ac6646876f2899558ffb2604 Author: Gary R Hook Date: Tue Jul 30 16:05:26 2019 +0000 crypto: ccp - Ignore tag length when decrypting GCM ciphertext AES GCM input buffers for decryption contain AAD+CTEXT+TAG. Only decrypt the ciphertext, and use the tag for comparison. Fixes: 36cf515b9bbe2 ("crypto: ccp - Enable support for AES GCM on v5 CCPs") Cc: Signed-off-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-ops.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 9f00baf74e4b6f79a3a3dfab44fb7bb2e797b551 Author: Gary R Hook Date: Tue Jul 30 16:05:24 2019 +0000 crypto: ccp - Add support for valid authsize values less than 16 AES GCM encryption allows for authsize values of 4, 8, and 12-16 bytes. Validate the requested authsize, and retain it to save in the request context. Fixes: 36cf515b9bbe2 ("crypto: ccp - Enable support for AES GCM on v5 CCPs") Cc: Signed-off-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-crypto-aes-galois.c | 14 ++++++++++++++ drivers/crypto/ccp/ccp-ops.c | 26 +++++++++++++++++++++----- include/linux/ccp.h | 2 ++ 3 files changed, 37 insertions(+), 5 deletions(-) commit 25e44338321af545ab34243a6081c3f0fc6107d0 Author: Gary R Hook Date: Tue Jul 30 16:05:22 2019 +0000 crypto: ccp - Fix oops by properly managing allocated structures A plaintext or ciphertext length of 0 is allowed in AES, in which case no encryption occurs. Ensure that we don't clean up data structures that were never allocated. Fixes: 36cf515b9bbe2 ("crypto: ccp - Enable support for AES GCM on v5 CCPs") Cc: Signed-off-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-ops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 41995342b40c418a47603e1321256d2c4a2ed0fb Author: Stefan Haberland Date: Thu Aug 1 13:06:30 2019 +0200 s390/dasd: fix endless loop after read unit address configuration After getting a storage server event that causes the DASD device driver to update its unit address configuration during a device shutdown there is the possibility of an endless loop in the device driver. In the system log there will be ongoing DASD error messages with RC: -19. The reason is that the loop starting the ruac request only terminates when the retry counter is decreased to 0. But in the sleep_on function there are early exit paths that do not decrease the retry counter. Prevent an endless loop by handling those cases separately. Remove the unnecessary do..while loop since the sleep_on function takes care of retries by itself. Fixes: 8e09f21574ea ("[S390] dasd: add hyper PAV support to DASD device driver, part 1") Cc: stable@vger.kernel.org # 2.6.25+ Signed-off-by: Stefan Haberland Reviewed-by: Jan Hoeppner Signed-off-by: Jens Axboe drivers/s390/block/dasd_alias.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) commit f8981e0309e9004c6e86d218049045700c79d740 Merge: 412e85b60531 9ca7ad6c7706 Author: Dave Airlie Date: Fri Aug 2 10:17:25 2019 +1000 Merge tag 'msm-fixes-2019_08_01' of https://gitlab.freedesktop.org/drm/msm into drm-fixes - Fix the dma_sync calls applied last week (Rob) - Fix mdp5 dsi command mode (Brian) - Squash fall through warnings (Jordan) - Don't add disabled gpu nodes to the of device list (Jeffrey) Cc: Jeffrey Hugo Cc: Jordan Crouse Cc: Brian Masney Cc: Rob Clark Signed-off-by: Dave Airlie # gpg: Signature made Fri 02 Aug 2019 05:54:27 AM AEST # gpg: using RSA key 96F70DFDA84A070A # gpg: Can't check signature: public key not found From: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190801200439.GV104440@art_vandelay commit 412e85b605315fd129a849599cf4a5a7959573a8 Author: Lyude Paul Date: Thu Aug 1 18:02:15 2019 -0400 drm/nouveau: Only release VCPI slots on mode changes Looks like a regression got introduced into nv50_mstc_atomic_check() that somehow didn't get found until now. If userspace changes crtc_state->active to false but leaves the CRTC enabled, we end up calling drm_dp_atomic_find_vcpi_slots() using the PBN calculated in asyh->dp.pbn. However, if the display is inactive we end up calculating a PBN of 0, which inadvertently causes us to have an allocation of 0. >From there, if userspace then disables the CRTC afterwards we end up accidentally attempting to free the VCPI twice: WARNING: CPU: 0 PID: 1484 at drivers/gpu/drm/drm_dp_mst_topology.c:3336 drm_dp_atomic_release_vcpi_slots+0x87/0xb0 [drm_kms_helper] RIP: 0010:drm_dp_atomic_release_vcpi_slots+0x87/0xb0 [drm_kms_helper] Call Trace: drm_atomic_helper_check_modeset+0x3f3/0xa60 [drm_kms_helper] ? drm_atomic_check_only+0x43/0x780 [drm] drm_atomic_helper_check+0x15/0x90 [drm_kms_helper] nv50_disp_atomic_check+0x83/0x1d0 [nouveau] drm_atomic_check_only+0x54d/0x780 [drm] ? drm_atomic_set_crtc_for_connector+0xec/0x100 [drm] drm_atomic_commit+0x13/0x50 [drm] drm_atomic_helper_set_config+0x81/0x90 [drm_kms_helper] drm_mode_setcrtc+0x194/0x6a0 [drm] ? vprintk_emit+0x16a/0x230 ? drm_ioctl+0x163/0x390 [drm] ? drm_mode_getcrtc+0x180/0x180 [drm] drm_ioctl_kernel+0xaa/0xf0 [drm] drm_ioctl+0x208/0x390 [drm] ? drm_mode_getcrtc+0x180/0x180 [drm] nouveau_drm_ioctl+0x63/0xb0 [nouveau] do_vfs_ioctl+0x405/0x660 ? recalc_sigpending+0x17/0x50 ? _copy_from_user+0x37/0x60 ksys_ioctl+0x5e/0x90 ? exit_to_usermode_loop+0x92/0xe0 __x64_sys_ioctl+0x16/0x20 do_syscall_64+0x59/0x190 entry_SYSCALL_64_after_hwframe+0x44/0xa9 WARNING: CPU: 0 PID: 1484 at drivers/gpu/drm/drm_dp_mst_topology.c:3336 drm_dp_atomic_release_vcpi_slots+0x87/0xb0 [drm_kms_helper] ---[ end trace 4c395c0c51b1f88d ]--- [drm:drm_dp_atomic_release_vcpi_slots [drm_kms_helper]] *ERROR* no VCPI for [MST PORT:00000000e288eb7d] found in mst state 000000008e642070 So, fix this by doing what we probably should have done from the start: only call drm_dp_atomic_find_vcpi_slots() when crtc_state->mode_changed is set, so that VCPI allocations remain for as long as the CRTC is enabled. Signed-off-by: Lyude Paul Fixes: 232c9eec417a ("drm/nouveau: Use atomic VCPI helpers for MST") Cc: Lyude Paul Cc: Ben Skeggs Cc: Daniel Vetter Cc: David Airlie Cc: Jerry Zuo Cc: Harry Wentland Cc: Juston Li Cc: Karol Herbst Cc: Laurent Pinchart Cc: Ilia Mirkin Cc: # v5.1+ Acked-by: Ben Skeggs Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20190801220216.15323-1-lyude@redhat.com drivers/gpu/drm/nouveau/dispnv50/disp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4b381ee25d9bd02ad9d75a96938472cf1f443013 Merge: 609488bc979f 6dee4829cfde Author: Dave Airlie Date: Fri Aug 2 09:35:39 2019 +1000 Merge tag 'drm-fixes-5.3-2019-07-31' of git://people.freedesktop.org/~agd5f/linux into drm-fixes drm-fixes-5.3-2019-07-31: amdgpu: - Fix temperature granularity for navi - Fix stable pstate setting for navi - Fix VCN DPM enablement on navi - Fix error handling on CS ioctl when processing dependencies - Fix possible information leak in debugfs amdkfd: - fix memory alignment for VegaM Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20190731191648.25729-1-alexander.deucher@amd.com commit 224c04973db1125fcebefffd86115f99f50f8277 Author: Denis Kirjanov Date: Tue Jul 30 15:13:57 2019 +0200 net: usb: pegasus: fix improper read if get_registers() fail get_registers() may fail with -ENOMEM and in this case we can read a garbage from the status variable tmp. Reported-by: syzbot+3499a83b2d062ae409d4@syzkaller.appspotmail.com Signed-off-by: Denis Kirjanov Signed-off-by: David S. Miller drivers/net/usb/pegasus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4da5f0018eef4c0de31675b670c80e82e13e99d1 Author: Taras Kondratiuk Date: Mon Jul 29 22:15:07 2019 +0000 tipc: compat: allow tipc commands without arguments Commit 2753ca5d9009 ("tipc: fix uninit-value in tipc_nl_compat_doit") broke older tipc tools that use compat interface (e.g. tipc-config from tipcutils package): % tipc-config -p operation not supported The commit started to reject TIPC netlink compat messages that do not have attributes. It is too restrictive because some of such messages are valid (they don't need any arguments): % grep 'tx none' include/uapi/linux/tipc_config.h #define TIPC_CMD_NOOP 0x0000 /* tx none, rx none */ #define TIPC_CMD_GET_MEDIA_NAMES 0x0002 /* tx none, rx media_name(s) */ #define TIPC_CMD_GET_BEARER_NAMES 0x0003 /* tx none, rx bearer_name(s) */ #define TIPC_CMD_SHOW_PORTS 0x0006 /* tx none, rx ultra_string */ #define TIPC_CMD_GET_REMOTE_MNG 0x4003 /* tx none, rx unsigned */ #define TIPC_CMD_GET_MAX_PORTS 0x4004 /* tx none, rx unsigned */ #define TIPC_CMD_GET_NETID 0x400B /* tx none, rx unsigned */ #define TIPC_CMD_NOT_NET_ADMIN 0xC001 /* tx none, rx none */ This patch relaxes the original fix and rejects messages without arguments only if such arguments are expected by a command (reg_type is non zero). Fixes: 2753ca5d9009 ("tipc: fix uninit-value in tipc_nl_compat_doit") Cc: stable@vger.kernel.org Signed-off-by: Taras Kondratiuk Acked-by: Ying Xue Signed-off-by: David S. Miller net/tipc/netlink_compat.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 42787ed79638dc7f0f8d5c164caba1e87bfab50f Author: Rafael J. Wysocki Date: Thu Aug 1 01:31:08 2019 +0200 ACPI: PM: Fix regression in acpi_device_set_power() Commit f850a48a0799 ("ACPI: PM: Allow transitions to D0 to occur in special cases") overlooked the fact that acpi_power_transition() may change the power.state value for the target device and if that happens, it may confuse acpi_device_set_power() and cause it to omit the _PS0 evaluation which on some systems is necessary to change power states of devices from low-power to D0. Fix that by saving the current value of power.state for the target device before passing it to acpi_power_transition() and using the saved value in a subsequent check. Fixes: f850a48a0799 ("ACPI: PM: Allow transitions to D0 to occur in special cases") Reported-by: Kai-Heng Feng Reported-by: Mario Limonciello Signed-off-by: Rafael J. Wysocki Tested-by: Kai-Heng Feng Tested-by: Mario Limonciello drivers/acpi/device_pm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 8eb9a2dff019055e4ff307bb7f8c64a7a20e79c8 Author: Gustavo A. R. Silva Date: Sun Jul 28 18:51:38 2019 -0500 i2c: s3c2410: Mark expected switch fall-through Mark switch cases where we are expecting to fall through. This patch fixes the following warning: drivers/i2c/busses/i2c-s3c2410.c: In function 'i2c_s3c_irq_nextbyte': drivers/i2c/busses/i2c-s3c2410.c:431:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (i2c->state == STATE_READ) ^ drivers/i2c/busses/i2c-s3c2410.c:439:2: note: here case STATE_WRITE: ^~~~ Notice that, in this particular case, the code comment is modified in accordance with what GCC is expecting to find. Reported-by: Stephen Rothwell Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-s3c2410.c | 1 + 1 file changed, 1 insertion(+) commit b1ac6704493fa14b5dc19eb6b69a73932361a131 Author: Michał Mirosław Date: Mon Jul 22 21:05:56 2019 +0200 i2c: at91: fix clk_offset for sama5d2 In SAMA5D2 datasheet, TWIHS_CWGR register rescription mentions clock offset of 3 cycles (compared to 4 in eg. SAMA5D3). Cc: stable@vger.kernel.org # 5.2.x [needs applying to i2c-at91.c instead for earlier kernels] Fixes: 0ef6f3213dac ("i2c: at91: add support for new alternative command mode") Signed-off-by: Michał Mirosław Acked-by: Ludovic Desroches Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-at91-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d12e3aae160fb26b534c4496b211d6e60a5179ed Author: Michał Mirosław Date: Mon Jul 22 20:55:27 2019 +0200 i2c: at91: disable TXRDY interrupt after sending data Driver was not disabling TXRDY interrupt after last TX byte. This caused interrupt storm until transfer timeouts for slow or broken device on the bus. The patch fixes the interrupt storm on my SAMA5D2-based board. Cc: stable@vger.kernel.org # 5.2.x [v5.2 introduced file split; the patch should apply to i2c-at91.c before the split] Fixes: fac368a04048 ("i2c: at91: add new driver") Signed-off-by: Michał Mirosław Acked-by: Ludovic Desroches Tested-by: Raag Jadav Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-at91-master.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit f1fc7249dddc0e52d9e805e2e661caa118649509 Author: Alexei Starovoitov Date: Tue Jul 30 18:38:27 2019 -0700 selftests/bpf: tests for jmp to 1st insn Add 2 tests that check JIT code generation to jumps to 1st insn. 1st test is similar to syzbot reproducer. The backwards branch is never taken at runtime. 2nd test has branch to 1st insn that executes. The test is written as two bpf functions, since it's not possible to construct valid single bpf program that jumps to 1st insn. Signed-off-by: Alexei Starovoitov Acked-by: Song Liu tools/testing/selftests/bpf/verifier/loops1.c | 28 +++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 7c2e988f400e83501e0a3568250780609b7c8263 Author: Alexei Starovoitov Date: Tue Jul 30 18:38:26 2019 -0700 bpf: fix x64 JIT code generation for jmp to 1st insn Introduction of bounded loops exposed old bug in x64 JIT. JIT maintains the array of offsets to the end of all instructions to compute jmp offsets. addrs[0] - offset of the end of the 1st insn (that includes prologue). addrs[1] - offset of the end of the 2nd insn. JIT didn't keep the offset of the beginning of the 1st insn, since classic BPF didn't have backward jumps and valid extended BPF couldn't have a branch to 1st insn, because it didn't allow loops. With bounded loops it's possible to construct a valid program that jumps backwards to the 1st insn. Fix JIT by computing: addrs[0] - offset of the end of prologue == start of the 1st insn. addrs[1] - offset of the end of 1st insn. v1->v2: - Yonghong noticed a bug in jit linfo. Fix it by passing 'addrs + 1' to bpf_prog_fill_jited_linfo(), since it expects insn_to_jit_off array to be offsets to last byte. Reported-by: syzbot+35101610ff3e83119b1b@syzkaller.appspotmail.com Fixes: 2589726d12a1 ("bpf: introduce bounded loops") Fixes: 0a14842f5a3c ("net: filter: Just In Time compiler for x86-64") Signed-off-by: Alexei Starovoitov Acked-by: Song Liu arch/x86/net/bpf_jit_comp.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 3415ec643e7bd644b03026efbe2f2b36cbe9b34b Author: Andrii Nakryiko Date: Thu Aug 1 00:24:05 2019 -0700 libbpf: set BTF FD for prog only when there is supported .BTF.ext data 5d01ab7bac46 ("libbpf: fix erroneous multi-closing of BTF FD") introduced backwards-compatibility issue, manifesting itself as -E2BIG error returned on program load due to unknown non-zero btf_fd attribute value for BPF_PROG_LOAD sys_bpf() sub-command. This patch fixes bug by ensuring that we only ever associate BTF FD with program if there is a BTF.ext data that was successfully loaded into kernel, which automatically means kernel supports func_info/line_info and associated BTF FD for progs (checked and ensured also by BTF sanitization code). Fixes: 5d01ab7bac46 ("libbpf: fix erroneous multi-closing of BTF FD") Reported-by: Andrey Ignatov Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov tools/lib/bpf/libbpf.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 0eb6ddfb865c7d7ec05cb330050671363515e67f Author: Damien Le Moal Date: Thu Aug 1 19:21:51 2019 +0900 block: Fix __blkdev_direct_IO() for bio fragments The recent fix to properly handle IOCB_NOWAIT for async O_DIRECT IO (patch 6a43074e2f46) introduced two problems with BIO fragment handling for direct IOs: 1) The dio size processed is calculated by incrementing the ret variable by the size of the bio fragment issued for the dio. However, this size is obtained directly from bio->bi_iter.bi_size AFTER the bio submission which may result in referencing the bi_size value after the bio completed, resulting in an incorrect value use. 2) The ret variable is not incremented by the size of the last bio fragment issued for the bio, leading to an invalid IO size being returned to the user. Fix both problem by using dio->size (which is incremented before the bio submission) to update the value of ret after bio submissions, including for the last bio fragment issued. Fixes: 6a43074e2f46 ("block: properly handle IOCB_NOWAIT for async O_DIRECT IO") Reported-by: Masato Suzuki Signed-off-by: Damien Le Moal Signed-off-by: Jens Axboe fs/block_dev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5511c0c309db4c526a6e9f8b2b8a1483771574bc Author: Suzuki K Poulose Date: Thu Aug 1 11:23:23 2019 -0600 coresight: Fix DEBUG_LOCKS_WARN_ON for uninitialized attribute While running the linux-next with CONFIG_DEBUG_LOCKS_ALLOC enabled, I get the following splat. BUG: key ffffcb5636929298 has not been registered! ------------[ cut here ]------------ DEBUG_LOCKS_WARN_ON(1) WARNING: CPU: 1 PID: 53 at kernel/locking/lockdep.c:3669 lockdep_init_map+0x164/0x1f0 CPU: 1 PID: 53 Comm: kworker/1:1 Tainted: G W 5.2.0-next-20190712-00015-g00ad4634222e-dirty #603 Workqueue: events amba_deferred_retry_func pstate: 60c00005 (nZCv daif +PAN +UAO) pc : lockdep_init_map+0x164/0x1f0 lr : lockdep_init_map+0x164/0x1f0 [ trimmed ] Call trace: lockdep_init_map+0x164/0x1f0 __kernfs_create_file+0x9c/0x158 sysfs_add_file_mode_ns+0xa8/0x1d0 sysfs_add_file_to_group+0x88/0xd8 etm_perf_add_symlink_sink+0xcc/0x138 coresight_register+0x110/0x280 tmc_probe+0x160/0x420 [ trimmed ] ---[ end trace ab4cc669615ba1b0 ]--- Fix this by initialising the dynamically allocated attribute properly. Cc: Mathieu Poirier Fixes: bb8e370bdc14 ("coresight: perf: Add "sinks" group to PMU directory") Cc: stable Signed-off-by: Suzuki K Poulose [Fixed a typograhic error in the changelog] Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20190801172323.18359-2-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-etm-perf.c | 1 + 1 file changed, 1 insertion(+) commit a5dbba8f443e2046c63e5dd2907f562c1179169f Merge: 5f9e832c1370 b5fa9fc9e809 Author: Thomas Gleixner Date: Thu Aug 1 20:21:00 2019 +0200 Merge tag 'irqchip-fixes-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/urgent Pull irqchip fixes from Marc Zyngier: A small bunch of fixes from the irqchip department: - Fix a couple of UAF on error paths (RZA1, GICv3 ITS) - Fix iMX GPCv2 trigger setting - Add missing of_node_put on error path in MBIGEN - Add another bunch of /* fall-through */ to silence warnings commit c88090dfc84254fa149174eb3e6a8458de1912c4 Author: Oliver Neukum Date: Thu Aug 1 09:44:25 2019 -0700 Input: kbtab - sanity check for endpoint type The driver should check whether the endpoint it uses has the correct type. Reported-by: syzbot+c7df50363aaff50aa363@syzkaller.appspotmail.com Signed-off-by: Oliver Neukum Signed-off-by: Dmitry Torokhov drivers/input/tablet/kbtab.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit b55d996f057bf2e7ba9422a80b5e17e99860cb0b Author: Oliver Neukum Date: Thu Aug 1 09:40:26 2019 -0700 Input: usbtouchscreen - initialize PM mutex before using it Mutexes shall be initialized before they are used. Fixes: 12e510dbc57b2 ("Input: usbtouchscreen - fix deadlock in autosuspend") Reported-by: syzbot+199ea16c7f26418b4365@syzkaller.appspotmail.com Signed-off-by: Oliver Neukum Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/usbtouchscreen.c | 2 ++ 1 file changed, 2 insertions(+) commit 18601078957b8b9e529a2cc99e72617923e21a55 Merge: 944a83a2669a 509b0538bc28 Author: David S. Miller Date: Thu Aug 1 13:45:49 2019 -0400 Merge branch 'net-Manufacturer-names-and-spelling-fixes' Geert Uytterhoeven says: ==================== net: Manufacturer names and spelling fixes This is a set of fixes for (some blatantly) wrong manufacturer names and various spelling issues, mostly in Kconfig help texts. ==================== Signed-off-by: David S. Miller commit 509b0538bc28870164903f5683e4c3f3b1eca965 Author: Geert Uytterhoeven Date: Wed Jul 31 15:22:16 2019 +0200 net: samsung: Spelling s/case/cause/ Signed-off-by: Geert Uytterhoeven Signed-off-by: David S. Miller drivers/net/ethernet/samsung/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1583d448ea84a5b8b98c8d250200ce768b6ced38 Author: Geert Uytterhoeven Date: Wed Jul 31 15:22:15 2019 +0200 net: packetengines: Fix manufacturer spelling and capitalization Use "Packet Engines" consistently. Signed-off-by: Geert Uytterhoeven Signed-off-by: David S. Miller drivers/net/ethernet/packetengines/Kconfig | 6 +++--- drivers/net/ethernet/packetengines/Makefile | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 85aee0a793ba223c48fd2cfe534edf83729deef6 Author: Geert Uytterhoeven Date: Wed Jul 31 15:22:14 2019 +0200 net: nixge: Spelling s/Instrument/Instruments/ Signed-off-by: Geert Uytterhoeven Signed-off-by: David S. Miller drivers/net/ethernet/ni/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cec754cc7813f300d286b1d7e14480f82f7f2ffa Author: Geert Uytterhoeven Date: Wed Jul 31 15:22:13 2019 +0200 net: ixp4xx: Spelling s/XSacle/XScale/ Signed-off-by: Geert Uytterhoeven Signed-off-by: David S. Miller drivers/net/ethernet/xscale/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aca3432a607b6f9db2a9fe34f4b87d01cd99a68a Author: Geert Uytterhoeven Date: Wed Jul 31 15:22:12 2019 +0200 net: broadcom: Fix manufacturer name in Kconfig help text The help text refers to AMD instead of Broadcom, presumably because it was copied from the former. Fixes: adfc5217e9db68d3 ("broadcom: Move the Broadcom drivers") Signed-off-by: Geert Uytterhoeven Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ac0e3f20c7a9fbace30d38e7d306ab15f3e6fd31 Author: Geert Uytterhoeven Date: Wed Jul 31 15:22:11 2019 +0200 net: apple: Fix manufacturer name in Kconfig help text The help text refers to IBM instead of Apple, presumably because it was copied from the former. Fixes: 8fb6b0908176704a ("bmac/mace/macmace/mac89x0/cs89x0: Move the Macintosh (Apple) drivers") Signed-off-by: Geert Uytterhoeven Signed-off-by: David S. Miller drivers/net/ethernet/apple/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 93ae6d2d2e0eef6973d634dd6e1a19ba1b031c30 Author: Geert Uytterhoeven Date: Wed Jul 31 15:22:10 2019 +0200 net: amd: Spelling s/case/cause/ Signed-off-by: Geert Uytterhoeven Signed-off-by: David S. Miller drivers/net/ethernet/amd/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 14f1c0f2ff156c89b14fa4c52605e7586436ffb8 Author: Geert Uytterhoeven Date: Wed Jul 31 15:22:09 2019 +0200 net: 8390: Fix manufacturer name in Kconfig help text The help text refers to Western Digital instead of National Semiconductor 8390, presumably because it was copied from the former. Fixes: 644570b830266ff3 ("8390: Move the 8390 related drivers") Signed-off-by: Geert Uytterhoeven Signed-off-by: David S. Miller drivers/net/ethernet/8390/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fc5b34a35458314df1dd00281f6e41f419581aa9 Author: Micah Morton Date: Thu Aug 1 10:28:27 2019 -0700 Add entry in MAINTAINERS file for SafeSetID LSM This LSM was added in v5.1 and needs an entry in the MAINTAINERS file. Signed-off-by: Micah Morton Acked-by: James Morris MAINTAINERS | 6 ++++++ 1 file changed, 6 insertions(+) commit 944a83a2669ae8aa2c7664e79376ca7468eb0a2b Author: Matteo Croce Date: Thu Aug 1 14:13:30 2019 +0200 mvpp2: fix panic on module removal mvpp2 uses a delayed workqueue to gather traffic statistics. On module removal the workqueue can be destroyed before calling cancel_delayed_work_sync() on its works. Fix it by moving the destroy_workqueue() call after mvpp2_port_remove(). Also remove an unneeded call to flush_workqueue() # rmmod mvpp2 [ 2743.311722] mvpp2 f4000000.ethernet eth1: phy link down 10gbase-kr/10Gbps/Full [ 2743.320063] mvpp2 f4000000.ethernet eth1: Link is Down [ 2743.572263] mvpp2 f4000000.ethernet eth2: phy link down sgmii/1Gbps/Full [ 2743.580076] mvpp2 f4000000.ethernet eth2: Link is Down [ 2744.102169] mvpp2 f2000000.ethernet eth0: phy link down 10gbase-kr/10Gbps/Full [ 2744.110441] mvpp2 f2000000.ethernet eth0: Link is Down [ 2744.115614] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 [ 2744.115615] Mem abort info: [ 2744.115616] ESR = 0x96000005 [ 2744.115617] Exception class = DABT (current EL), IL = 32 bits [ 2744.115618] SET = 0, FnV = 0 [ 2744.115619] EA = 0, S1PTW = 0 [ 2744.115620] Data abort info: [ 2744.115621] ISV = 0, ISS = 0x00000005 [ 2744.115622] CM = 0, WnR = 0 [ 2744.115624] user pgtable: 4k pages, 39-bit VAs, pgdp=0000000422681000 [ 2744.115626] [0000000000000000] pgd=0000000000000000, pud=0000000000000000 [ 2744.115630] Internal error: Oops: 96000005 [#1] SMP [ 2744.115632] Modules linked in: mvpp2(-) algif_hash af_alg nls_iso8859_1 nls_cp437 vfat fat xhci_plat_hcd m25p80 spi_nor xhci_hcd mtd usbcore i2c_mv64xxx sfp usb_common marvell10g phy_generic spi_orion mdio_i2c i2c_core mvmdio phylink sbsa_gwdt ip_tables x_tables autofs4 [last unloaded: mvpp2] [ 2744.115654] CPU: 3 PID: 8357 Comm: kworker/3:2 Not tainted 5.3.0-rc2 #1 [ 2744.115655] Hardware name: Marvell 8040 MACCHIATOBin Double-shot (DT) [ 2744.115665] Workqueue: events_power_efficient phylink_resolve [phylink] [ 2744.115669] pstate: a0000085 (NzCv daIf -PAN -UAO) [ 2744.115675] pc : __queue_work+0x9c/0x4d8 [ 2744.115677] lr : __queue_work+0x170/0x4d8 [ 2744.115678] sp : ffffff801001bd50 [ 2744.115680] x29: ffffff801001bd50 x28: ffffffc422597600 [ 2744.115684] x27: ffffff80109ae6f0 x26: ffffff80108e4018 [ 2744.115688] x25: 0000000000000003 x24: 0000000000000004 [ 2744.115691] x23: ffffff80109ae6e0 x22: 0000000000000017 [ 2744.115694] x21: ffffffc42c030000 x20: ffffffc42209e8f8 [ 2744.115697] x19: 0000000000000000 x18: 0000000000000000 [ 2744.115699] x17: 0000000000000000 x16: 0000000000000000 [ 2744.115701] x15: 0000000000000010 x14: ffffffffffffffff [ 2744.115702] x13: ffffff8090e2b95f x12: ffffff8010e2b967 [ 2744.115704] x11: ffffff8010906000 x10: 0000000000000040 [ 2744.115706] x9 : ffffff80109223b8 x8 : ffffff80109223b0 [ 2744.115707] x7 : ffffffc42bc00068 x6 : 0000000000000000 [ 2744.115709] x5 : ffffffc42bc00000 x4 : 0000000000000000 [ 2744.115710] x3 : 0000000000000000 x2 : 0000000000000000 [ 2744.115712] x1 : 0000000000000008 x0 : ffffffc42c030000 [ 2744.115714] Call trace: [ 2744.115716] __queue_work+0x9c/0x4d8 [ 2744.115718] delayed_work_timer_fn+0x28/0x38 [ 2744.115722] call_timer_fn+0x3c/0x180 [ 2744.115723] expire_timers+0x60/0x168 [ 2744.115724] run_timer_softirq+0xbc/0x1e8 [ 2744.115727] __do_softirq+0x128/0x320 [ 2744.115731] irq_exit+0xa4/0xc0 [ 2744.115734] __handle_domain_irq+0x70/0xc0 [ 2744.115735] gic_handle_irq+0x58/0xa8 [ 2744.115737] el1_irq+0xb8/0x140 [ 2744.115738] console_unlock+0x3a0/0x568 [ 2744.115740] vprintk_emit+0x200/0x2a0 [ 2744.115744] dev_vprintk_emit+0x1c8/0x1e4 [ 2744.115747] dev_printk_emit+0x6c/0x7c [ 2744.115751] __netdev_printk+0x104/0x1d8 [ 2744.115752] netdev_printk+0x60/0x70 [ 2744.115756] phylink_resolve+0x38c/0x3c8 [phylink] [ 2744.115758] process_one_work+0x1f8/0x448 [ 2744.115760] worker_thread+0x54/0x500 [ 2744.115762] kthread+0x12c/0x130 [ 2744.115764] ret_from_fork+0x10/0x1c [ 2744.115768] Code: aa1403e0 97fffbbe aa0003f5 b4000700 (f9400261) Fixes: 118d6298f6f0 ("net: mvpp2: add ethtool GOP statistics") Signed-off-by: Lorenzo Bianconi Signed-off-by: Matteo Croce Acked-by: Antoine Tenart Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 020fb3bebc224dfe9353a56ecbe2d5fac499dffc Author: Wei Yongjun Date: Thu Aug 1 01:27:25 2019 +0000 RDMA/hns: Fix error return code in hns_roce_v1_rsv_lp_qp() Fix to return error code -ENOMEM from the rdma_zalloc_drv_obj() error handling case instead of 0, as done elsewhere in this function. Fixes: e8ac9389f0d7 ("RDMA: Fix allocation failure on pointer pd") Fixes: 21a428a019c9 ("RDMA: Handle PD allocations by IB/core") Signed-off-by: Wei Yongjun Reviewed-by: Leon Romanovsky Link: https://lore.kernel.org/r/20190801012725.150493-1-weiyongjun1@huawei.com Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 9ca7ad6c7706edeae331c1632d0c63897418ebad Author: Jeffrey Hugo Date: Wed Jun 26 11:00:15 2019 -0700 drm: msm: Fix add_gpu_components add_gpu_components() adds found GPU nodes from the DT to the match list, regardless of the status of the nodes. This is a problem, because if the nodes are disabled, they should not be on the match list because they will not be matched. This prevents display from initing if a GPU node is defined, but it's status is disabled. Fix this by checking the node's status before adding it to the match list. Fixes: dc3ea265b856 (drm/msm: Drop the gpu binding) Reviewed-by: Rob Clark Signed-off-by: Jeffrey Hugo Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190626180015.45242-1-jeffrey.l.hugo@gmail.com drivers/gpu/drm/msm/msm_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1f66072503316134873060b24b7895dbbcccf00e Author: Mauro Rossi Date: Thu Aug 1 09:04:34 2019 +0200 iwlwifi: dbg_ini: fix compile time assert build errors This patch fixes and preserves existing code style, and readability, for IWL_ERR() and IWL_WARN() macros invocations recently added in dbg.c Fixes the following build errors with Android build system: /home/utente/pie-x86_kernel/kernel/drivers/net/wireless/intel/iwlwifi/fw/dbg.c: In function '_iwl_fw_dbg_apply_point': /home/utente/pie-x86_kernel/kernel/drivers/net/wireless/intel/iwlwifi/fw/dbg.c:2445:3: error: call to '__compiletime_assert_2446' declared with attribute error: BUILD_BUG_ON failed: err_str[sizeof(err_str) - 2] != '\n' /home/utente/pie-x86_kernel/kernel/drivers/net/wireless/intel/iwlwifi/fw/dbg.c:2451:3: error: call to '__compiletime_assert_2452' declared with attribute error: BUILD_BUG_ON failed: err_str[sizeof(err_str) - 2] != '\n' ... /home/utente/pie-x86_kernel/kernel/drivers/net/wireless/intel/iwlwifi/fw/dbg.c:2789:5: error: call to '__compiletime_assert_2790' declared with attribute error: BUILD_BUG_ON failed: invalid_ap_str[sizeof(invalid_ap_str) - 2] != '\n' /home/utente/pie-x86_kernel/kernel/drivers/net/wireless/intel/iwlwifi/fw/dbg.c:2800:5: error: call to '__compiletime_assert_2801' declared with attribute error: BUILD_BUG_ON failed: invalid_ap_str[sizeof(invalid_ap_str) - 2] != '\n' Fixes: 427ab6385cf3 ("iwlwifi: dbg_ini: enforce apply point early on buffer allocation tlv") Fixes: 57d88b116175 ("iwlwifi: dbg_ini: support debug info TLV") Signed-off-by: Mauro Rossi Signed-off-by: Johannes Berg Reviewed-by: Nathan Chancellor Tested-by: Nathan Chancellor Signed-off-by: Kalle Valo drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit 23eaf3b5c1a755e3193480c76fb29414be648688 Author: Leon Romanovsky Date: Wed Jul 31 11:38:52 2019 +0300 RDMA/mlx5: Release locks during notifier unregister The below kernel panic was observed when created bond mode LACP with GRE tunnel on top. The reason to it was not released spinlock during mlx5 notify unregsiter sequence. [ 234.562007] BUG: scheduling while atomic: sh/10900/0x00000002 [ 234.563005] Preemption disabled at: [ 234.566864] ------------[ cut here ]------------ [ 234.567120] DEBUG_LOCKS_WARN_ON(val > preempt_count()) [ 234.567139] WARNING: CPU: 16 PID: 10900 at kernel/sched/core.c:3203 preempt_count_sub+0xca/0x170 [ 234.569550] CPU: 16 PID: 10900 Comm: sh Tainted: G W 5.2.0-rc1-for-linust-dbg-2019-05-25_04-57-33-60 #1 [ 234.569886] Hardware name: Dell Inc. PowerEdge R720/0X3D66, BIOS 2.6.1 02/12/2018 [ 234.570183] RIP: 0010:preempt_count_sub+0xca/0x170 [ 234.570404] Code: 03 38 d0 7c 08 84 d2 0f 85 b0 00 00 00 8b 15 dd 02 03 04 85 d2 75 ba 48 c7 c6 00 e1 88 83 48 c7 c7 40 e1 88 83 e8 76 11 f7 ff <0f> 0b 5b c3 65 8b 05 d3 1f d8 7e 84 c0 75 82 e8 62 c3 c3 00 85 c0 [ 234.570911] RSP: 0018:ffff888b94477b08 EFLAGS: 00010286 [ 234.571133] RAX: 0000000000000000 RBX: 0000000000000001 RCX: 0000000000000000 [ 234.571391] RDX: 0000000000000000 RSI: 0000000000000004 RDI: 0000000000000246 [ 234.571648] RBP: ffff888ba5560000 R08: fffffbfff08962d5 R09: fffffbfff08962d5 [ 234.571902] R10: 0000000000000001 R11: fffffbfff08962d4 R12: ffff888bac6e9548 [ 234.572157] R13: ffff888babfaf728 R14: ffff888bac6e9568 R15: ffff888babfaf750 [ 234.572412] FS: 00007fcafa59b740(0000) GS:ffff888bed200000(0000) knlGS:0000000000000000 [ 234.572686] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 234.572914] CR2: 00007f984f16b140 CR3: 0000000b2bf0a001 CR4: 00000000001606e0 [ 234.573172] Call Trace: [ 234.573336] _raw_spin_unlock+0x2e/0x50 [ 234.573542] mlx5_ib_unbind_slave_port+0x1bc/0x690 [mlx5_ib] [ 234.573793] mlx5_ib_cleanup_multiport_master+0x1d3/0x660 [mlx5_ib] [ 234.574039] mlx5_ib_stage_init_cleanup+0x4c/0x360 [mlx5_ib] [ 234.574271] ? kfree+0xf5/0x2f0 [ 234.574465] __mlx5_ib_remove+0x61/0xd0 [mlx5_ib] [ 234.574688] ? __mlx5_ib_remove+0xd0/0xd0 [mlx5_ib] [ 234.574951] mlx5_remove_device+0x234/0x300 [mlx5_core] [ 234.575224] mlx5_unregister_device+0x4d/0x1e0 [mlx5_core] [ 234.575493] remove_one+0x4f/0x160 [mlx5_core] [ 234.575704] pci_device_remove+0xef/0x2a0 [ 234.581407] ? pcibios_free_irq+0x10/0x10 [ 234.587143] ? up_read+0xc1/0x260 [ 234.592785] device_release_driver_internal+0x1ab/0x430 [ 234.598442] unbind_store+0x152/0x200 [ 234.604064] ? sysfs_kf_write+0x3b/0x180 [ 234.609441] ? sysfs_file_ops+0x160/0x160 [ 234.615021] kernfs_fop_write+0x277/0x440 [ 234.620288] ? __sb_start_write+0x1ef/0x2c0 [ 234.625512] vfs_write+0x15e/0x460 [ 234.630786] ksys_write+0x156/0x1e0 [ 234.635988] ? __ia32_sys_read+0xb0/0xb0 [ 234.641120] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 234.646163] do_syscall_64+0x95/0x470 [ 234.651106] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 234.656004] RIP: 0033:0x7fcaf9c9cfd0 [ 234.660686] Code: 73 01 c3 48 8b 0d c0 6e 2d 00 f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 83 3d cd cf 2d 00 00 75 10 b8 01 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 ee cb 01 00 48 89 04 24 [ 234.670128] RSP: 002b:00007ffd3b01ddd8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 234.674811] RAX: ffffffffffffffda RBX: 000000000000000d RCX: 00007fcaf9c9cfd0 [ 234.679387] RDX: 000000000000000d RSI: 00007fcafa5c1000 RDI: 0000000000000001 [ 234.683848] RBP: 00007fcafa5c1000 R08: 000000000000000a R09: 00007fcafa59b740 [ 234.688167] R10: 00007ffd3b01d8e0 R11: 0000000000000246 R12: 00007fcaf9f75400 [ 234.692386] R13: 000000000000000d R14: 0000000000000001 R15: 0000000000000000 [ 234.696495] irq event stamp: 153067 [ 234.700525] hardirqs last enabled at (153067): [] _raw_spin_unlock_irqrestore+0x59/0x70 [ 234.704665] hardirqs last disabled at (153066): [] _raw_spin_lock_irqsave+0x22/0x90 [ 234.708722] softirqs last enabled at (153058): [] __do_softirq+0x6c5/0xb4e [ 234.712673] softirqs last disabled at (153051): [] irq_exit+0x17d/0x1d0 [ 234.716601] ---[ end trace 5dbf096843ee9ce6 ]--- Fixes: df097a278c75 ("IB/mlx5: Use the new mlx5 core notifier API") Signed-off-by: Leon Romanovsky Link: https://lore.kernel.org/r/20190731083852.584-1-leon@kernel.org Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit a29d56c2ed24ad33062bfdafdec9e34149715320 Author: Heikki Krogerus Date: Thu Aug 1 10:55:12 2019 +0300 usb: typec: ucsi: ccg: Fix uninitilized symbol error Fix smatch error: drivers/usb/typec/ucsi/ucsi_ccg.c:975 ccg_fw_update() error: uninitialized symbol 'err'. Fixes: 5c9ae5a87573 ("usb: typec: ucsi: ccg: add firmware flashing support") Cc: stable@vger.kernel.org Reported-by: kbuild test robot Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20190801075512.24354-1-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/ucsi/ucsi_ccg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6497d0a9c53df6e98b25e2b79f2295d7caa47b6e Author: Gustavo A. R. Silva Date: Wed Jul 31 12:54:28 2019 -0500 IB/hfi1: Fix Spectre v1 vulnerability sl is controlled by user-space, hence leading to a potential exploitation of the Spectre variant 1 vulnerability. Fix this by sanitizing sl before using it to index ibp->sl_to_sc. Notice that given that speculation windows are large, the policy is to kill the speculation on the first load and not worry if it can be completed with a dependent load/store [1]. [1] https://lore.kernel.org/lkml/20180423164740.GY17484@dhcp22.suse.cz/ Cc: stable@vger.kernel.org Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20190731175428.GA16736@embeddedor Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/verbs.c | 2 ++ 1 file changed, 2 insertions(+) commit 770b7d96cfff6a8bf6c9f261ba6f135dc9edf484 Author: Jack Morgenstein Date: Thu Aug 1 15:14:49 2019 +0300 IB/mad: Fix use-after-free in ib mad completion handling We encountered a use-after-free bug when unloading the driver: [ 3562.116059] BUG: KASAN: use-after-free in ib_mad_post_receive_mads+0xddc/0xed0 [ib_core] [ 3562.117233] Read of size 4 at addr ffff8882ca5aa868 by task kworker/u13:2/23862 [ 3562.118385] [ 3562.119519] CPU: 2 PID: 23862 Comm: kworker/u13:2 Tainted: G OE 5.1.0-for-upstream-dbg-2019-05-19_16-44-30-13 #1 [ 3562.121806] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Ubuntu-1.8.2-1ubuntu2 04/01/2014 [ 3562.123075] Workqueue: ib-comp-unb-wq ib_cq_poll_work [ib_core] [ 3562.124383] Call Trace: [ 3562.125640] dump_stack+0x9a/0xeb [ 3562.126911] print_address_description+0xe3/0x2e0 [ 3562.128223] ? ib_mad_post_receive_mads+0xddc/0xed0 [ib_core] [ 3562.129545] __kasan_report+0x15c/0x1df [ 3562.130866] ? ib_mad_post_receive_mads+0xddc/0xed0 [ib_core] [ 3562.132174] kasan_report+0xe/0x20 [ 3562.133514] ib_mad_post_receive_mads+0xddc/0xed0 [ib_core] [ 3562.134835] ? find_mad_agent+0xa00/0xa00 [ib_core] [ 3562.136158] ? qlist_free_all+0x51/0xb0 [ 3562.137498] ? mlx4_ib_sqp_comp_worker+0x1970/0x1970 [mlx4_ib] [ 3562.138833] ? quarantine_reduce+0x1fa/0x270 [ 3562.140171] ? kasan_unpoison_shadow+0x30/0x40 [ 3562.141522] ib_mad_recv_done+0xdf6/0x3000 [ib_core] [ 3562.142880] ? _raw_spin_unlock_irqrestore+0x46/0x70 [ 3562.144277] ? ib_mad_send_done+0x1810/0x1810 [ib_core] [ 3562.145649] ? mlx4_ib_destroy_cq+0x2a0/0x2a0 [mlx4_ib] [ 3562.147008] ? _raw_spin_unlock_irqrestore+0x46/0x70 [ 3562.148380] ? debug_object_deactivate+0x2b9/0x4a0 [ 3562.149814] __ib_process_cq+0xe2/0x1d0 [ib_core] [ 3562.151195] ib_cq_poll_work+0x45/0xf0 [ib_core] [ 3562.152577] process_one_work+0x90c/0x1860 [ 3562.153959] ? pwq_dec_nr_in_flight+0x320/0x320 [ 3562.155320] worker_thread+0x87/0xbb0 [ 3562.156687] ? __kthread_parkme+0xb6/0x180 [ 3562.158058] ? process_one_work+0x1860/0x1860 [ 3562.159429] kthread+0x320/0x3e0 [ 3562.161391] ? kthread_park+0x120/0x120 [ 3562.162744] ret_from_fork+0x24/0x30 ... [ 3562.187615] Freed by task 31682: [ 3562.188602] save_stack+0x19/0x80 [ 3562.189586] __kasan_slab_free+0x11d/0x160 [ 3562.190571] kfree+0xf5/0x2f0 [ 3562.191552] ib_mad_port_close+0x200/0x380 [ib_core] [ 3562.192538] ib_mad_remove_device+0xf0/0x230 [ib_core] [ 3562.193538] remove_client_context+0xa6/0xe0 [ib_core] [ 3562.194514] disable_device+0x14e/0x260 [ib_core] [ 3562.195488] __ib_unregister_device+0x79/0x150 [ib_core] [ 3562.196462] ib_unregister_device+0x21/0x30 [ib_core] [ 3562.197439] mlx4_ib_remove+0x162/0x690 [mlx4_ib] [ 3562.198408] mlx4_remove_device+0x204/0x2c0 [mlx4_core] [ 3562.199381] mlx4_unregister_interface+0x49/0x1d0 [mlx4_core] [ 3562.200356] mlx4_ib_cleanup+0xc/0x1d [mlx4_ib] [ 3562.201329] __x64_sys_delete_module+0x2d2/0x400 [ 3562.202288] do_syscall_64+0x95/0x470 [ 3562.203277] entry_SYSCALL_64_after_hwframe+0x49/0xbe The problem was that the MAD PD was deallocated before the MAD CQ. There was completion work pending for the CQ when the PD got deallocated. When the mad completion handling reached procedure ib_mad_post_receive_mads(), we got a use-after-free bug in the following line of code in that procedure: sg_list.lkey = qp_info->port_priv->pd->local_dma_lkey; (the pd pointer in the above line is no longer valid, because the pd has been deallocated). We fix this by allocating the PD before the CQ in procedure ib_mad_port_open(), and deallocating the PD after freeing the CQ in procedure ib_mad_port_close(). Since the CQ completion work queue is flushed during ib_free_cq(), no completions will be pending for that CQ when the PD is later deallocated. Note that freeing the CQ before deallocating the PD is the practice in the ULPs. Fixes: 4be90bc60df4 ("IB/mad: Remove ib_get_dma_mr calls") Signed-off-by: Jack Morgenstein Signed-off-by: Leon Romanovsky Link: https://lore.kernel.org/r/20190801121449.24973-1-leon@kernel.org Signed-off-by: Doug Ledford drivers/infiniband/core/mad.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 52e0a118a20308dd6aa531e20a5ab5907d2264c8 Author: Gal Pressman Date: Thu Aug 1 13:43:54 2019 +0300 RDMA/restrack: Track driver QP types in resource tracker The check for QP type different than XRC has excluded driver QP types from the resource tracker. As a result, "rdma resource show" user command would not show opened driver QPs which does not reflect the real state of the system. Check QP type explicitly instead of assuming enum values/ordering. Fixes: 40909f664d27 ("RDMA/efa: Add EFA verbs implementation") Signed-off-by: Gal Pressman Reviewed-by: Leon Romanovsky Link: https://lore.kernel.org/r/20190801104354.11417-1-galpress@amazon.com Signed-off-by: Doug Ledford drivers/infiniband/core/core_priv.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e5366d309a772fef264ec85e858f9ea46f939848 Author: Guy Levi Date: Wed Jul 31 11:19:29 2019 +0300 IB/mlx5: Fix MR registration flow to use UMR properly Driver shouldn't allow to use UMR to register a MR when umr_modify_atomic_disabled is set. Otherwise it will always end up with a failure in the post send flow which sets the UMR WQE to modify atomic access right. Fixes: c8d75a980fab ("IB/mlx5: Respect new UMR capabilities") Signed-off-by: Guy Levi Reviewed-by: Moni Shoua Signed-off-by: Leon Romanovsky Link: https://lore.kernel.org/r/20190731081929.32559-1-leon@kernel.org Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/mr.c | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) commit 9cd5881719e9555cae300ec8b389eda3c8101339 Author: Jason Gunthorpe Date: Wed Jul 31 11:18:41 2019 +0300 RDMA/devices: Remove the lock around remove_client_context Due to the complexity of client->remove() callbacks it is desirable to not hold any locks while calling them. Remove the last one by tracking only the highest client ID and running backwards from there over the xarray. Since the only purpose of that lock was to protect the linked list, we can drop the lock. Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky Link: https://lore.kernel.org/r/20190731081841.32345-3-leon@kernel.org Signed-off-by: Doug Ledford drivers/infiniband/core/device.c | 48 ++++++++++++++++++++++------------------ include/rdma/ib_verbs.h | 1 - 2 files changed, 27 insertions(+), 22 deletions(-) commit 621e55ff5b8e0ab5d1063f0eae0ef3960bef8f6e Author: Jason Gunthorpe Date: Wed Jul 31 11:18:40 2019 +0300 RDMA/devices: Do not deadlock during client removal lockdep reports: WARNING: possible circular locking dependency detected modprobe/302 is trying to acquire lock: 0000000007c8919c ((wq_completion)ib_cm){+.+.}, at: flush_workqueue+0xdf/0x990 but task is already holding lock: 000000002d3d2ca9 (&device->client_data_rwsem){++++}, at: remove_client_context+0x79/0xd0 [ib_core] which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&device->client_data_rwsem){++++}: down_read+0x3f/0x160 ib_get_net_dev_by_params+0xd5/0x200 [ib_core] cma_ib_req_handler+0x5f6/0x2090 [rdma_cm] cm_process_work+0x29/0x110 [ib_cm] cm_req_handler+0x10f5/0x1c00 [ib_cm] cm_work_handler+0x54c/0x311d [ib_cm] process_one_work+0x4aa/0xa30 worker_thread+0x62/0x5b0 kthread+0x1ca/0x1f0 ret_from_fork+0x24/0x30 -> #1 ((work_completion)(&(&work->work)->work)){+.+.}: process_one_work+0x45f/0xa30 worker_thread+0x62/0x5b0 kthread+0x1ca/0x1f0 ret_from_fork+0x24/0x30 -> #0 ((wq_completion)ib_cm){+.+.}: lock_acquire+0xc8/0x1d0 flush_workqueue+0x102/0x990 cm_remove_one+0x30e/0x3c0 [ib_cm] remove_client_context+0x94/0xd0 [ib_core] disable_device+0x10a/0x1f0 [ib_core] __ib_unregister_device+0x5a/0xe0 [ib_core] ib_unregister_device+0x21/0x30 [ib_core] mlx5_ib_stage_ib_reg_cleanup+0x9/0x10 [mlx5_ib] __mlx5_ib_remove+0x3d/0x70 [mlx5_ib] mlx5_ib_remove+0x12e/0x140 [mlx5_ib] mlx5_remove_device+0x144/0x150 [mlx5_core] mlx5_unregister_interface+0x3f/0xf0 [mlx5_core] mlx5_ib_cleanup+0x10/0x3a [mlx5_ib] __x64_sys_delete_module+0x227/0x350 do_syscall_64+0xc3/0x6a4 entry_SYSCALL_64_after_hwframe+0x49/0xbe Which is due to the read side of the client_data_rwsem being obtained recursively through a work queue flush during cm client removal. The lock is being held across the remove in remove_client_context() so that the function is a fence, once it returns the client is removed. This is required so that the two callers do not proceed with destruction until the client completes removal. Instead of using client_data_rwsem use the existing device unregistration refcount and add a similar client unregistration (client->uses) refcount. This will fence the two unregistration paths without holding any locks. Cc: Fixes: 921eab1143aa ("RDMA/devices: Re-organize device.c locking") Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky Link: https://lore.kernel.org/r/20190731081841.32345-2-leon@kernel.org Signed-off-by: Doug Ledford drivers/infiniband/core/device.c | 54 ++++++++++++++++++++++++++++++---------- include/rdma/ib_verbs.h | 3 +++ 2 files changed, 44 insertions(+), 13 deletions(-) commit 61f259821dd3306e49b7d42a3f90fb5a4ff3351b Author: Luck, Tony Date: Tue Jul 30 21:39:57 2019 -0700 IB/core: Add mitigation for Spectre V1 Some processors may mispredict an array bounds check and speculatively access memory that they should not. With a user supplied array index we like to play things safe by masking the value with the array size before it is used as an index. Signed-off-by: Tony Luck Link: https://lore.kernel.org/r/20190731043957.GA1600@agluck-desk2.amr.corp.intel.com Signed-off-by: Doug Ledford drivers/infiniband/core/user_mad.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 7732d20a160c76006c7fe7bca5178aea6af1d2e8 Author: Qian Cai Date: Thu Aug 1 10:47:05 2019 -0400 arm64/mm: fix variable 'tag' set but not used When CONFIG_KASAN_SW_TAGS=n, set_tag() is compiled away. GCC throws a warning, mm/kasan/common.c: In function '__kasan_kmalloc': mm/kasan/common.c:464:5: warning: variable 'tag' set but not used [-Wunused-but-set-variable] u8 tag = 0xff; ^~~ Fix it by making __tag_set() a static inline function the same as arch_kasan_set_tag() in mm/kasan/kasan.h for consistency because there is a macro in arch/arm64/include/asm/kasan.h, #define arch_kasan_set_tag(addr, tag) __tag_set(addr, tag) However, when CONFIG_DEBUG_VIRTUAL=n and CONFIG_SPARSEMEM_VMEMMAP=y, page_to_virt() will call __tag_set() with incorrect type of a parameter, so fix that as well. Also, still let page_to_virt() return "void *" instead of "const void *", so will not need to add a similar cast in lowmem_page_address(). Signed-off-by: Qian Cai Signed-off-by: Will Deacon arch/arm64/include/asm/memory.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 6bbfe4e602691b90ac866712bd4c43c51e546a60 Author: Jiri Olsa Date: Thu Aug 1 16:26:42 2019 +0200 perf bench numa: Fix cpu0 binding Michael reported an issue with perf bench numa failing with binding to cpu0 with '-0' option. # perf bench numa mem -p 3 -t 1 -P 512 -s 100 -zZcm0 --thp 1 -M 1 -ddd # Running 'numa/mem' benchmark: # Running main, "perf bench numa numa-mem -p 3 -t 1 -P 512 -s 100 -zZcm0 --thp 1 -M 1 -ddd" binding to node 0, mask: 0000000000000001 => -1 perf: bench/numa.c:356: bind_to_memnode: Assertion `!(ret)' failed. Aborted (core dumped) This happens when the cpu0 is not part of node0, which is the benchmark assumption and we can see that's not the case for some powerpc servers. Using correct node for cpu0 binding. Reported-by: Michael Petlan Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Satheesh Rajendran Link: http://lkml.kernel.org/r/20190801142642.28004-1-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/bench/numa.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit c14b5dce5ece48035cfd0aa951b39c69ad5056f4 Author: Jordan Crouse Date: Thu Jul 25 10:53:08 2019 -0600 drm/msm: Annotate intentional switch statement fall throughs Explicitly mark intentional fall throughs in switch statements to keep -Wimplicit-fallthrough from complaining. Reviewed-by: Rob Clark Signed-off-by: Jordan Crouse Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/1564073588-27386-1-git-send-email-jcrouse@codeaurora.org drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 2 ++ drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 1 + drivers/gpu/drm/msm/adreno/adreno_gpu.c | 1 + 3 files changed, 4 insertions(+) commit 2bab52af6fe68c43b327a57e5ce5fc10eefdfadf Author: Brian Masney Date: Fri May 31 05:46:15 2019 -0400 drm/msm: add support for per-CRTC max_vblank_count on mdp5 The mdp5 drm/kms driver currently does not work on command-mode DSI panels due to 'vblank wait timed out' errors. This causes a latency of seconds, or tens of seconds in some cases, before content is shown on the panel. This hardware does not have the something that we can use as a frame counter available when running in command mode, so we need to fall back to using timestamps by setting the max_vblank_count to zero. This can be done on a per-CRTC basis, so the convert mdp5 to use drm_crtc_set_max_vblank_count(). This change was tested on a LG Nexus 5 (hammerhead) phone. Suggested-by: Jeffrey Hugo Reviewed-by: Jeffrey Hugo Signed-off-by: Brian Masney Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190531094619.31704-3-masneyb@onstation.org drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c | 16 +++++++++++++++- drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 2 +- 2 files changed, 16 insertions(+), 2 deletions(-) commit 7d4e2dcf311d3b98421d1f119efe5964cafa32fc Author: Qian Cai Date: Wed Jul 31 16:05:45 2019 -0400 arm64/mm: fix variable 'pud' set but not used GCC throws a warning, arch/arm64/mm/mmu.c: In function 'pud_free_pmd_page': arch/arm64/mm/mmu.c:1033:8: warning: variable 'pud' set but not used [-Wunused-but-set-variable] pud_t pud; ^~~ because pud_table() is a macro and compiled away. Fix it by making it a static inline function and for pud_sect() as well. Signed-off-by: Qian Cai Signed-off-by: Will Deacon arch/arm64/include/asm/pgtable.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 760d8ed069c4e32a92e2ba251a3b0d9a87a3e771 Author: Masami Hiramatsu Date: Thu Jul 25 17:16:25 2019 +0900 arm64: Remove unneeded rcu_read_lock from debug handlers Remove rcu_read_lock()/rcu_read_unlock() from debug exception handlers since we are sure those are not preemptible and interrupts are off. Acked-by: Paul E. McKenney Signed-off-by: Masami Hiramatsu Signed-off-by: Will Deacon arch/arm64/kernel/debug-monitors.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit ee07b93e7721ccd5d5b9fa6f0c10cb3fe2f1f4f9 Author: Masami Hiramatsu Date: Thu Jul 25 17:16:05 2019 +0900 arm64: unwind: Prohibit probing on return_address() Prohibit probing on return_address() and subroutines which is called from return_address(), since the it is invoked from trace_hardirqs_off() which is also kprobe blacklisted. Reported-by: Naresh Kamboju Signed-off-by: Masami Hiramatsu Signed-off-by: Will Deacon arch/arm64/kernel/return_address.c | 3 +++ arch/arm64/kernel/stacktrace.c | 3 +++ 2 files changed, 6 insertions(+) commit 677379bc9139ac24b310a281fcb21a2f04288353 Author: Julien Thierry Date: Mon Jul 29 15:57:46 2019 +0100 arm64: Lower priority mask for GIC_PRIO_IRQON On a system with two security states, if SCR_EL3.FIQ is cleared, non-secure IRQ priorities get shifted to fit the secure view but priority masks aren't. On such system, it turns out that GIC_PRIO_IRQON masks the priority of normal interrupts, which obviously ends up in a hang. Increase GIC_PRIO_IRQON value (i.e. lower priority) to make sure interrupts are not blocked by it. Cc: Oleg Nesterov Fixes: bd82d4bd21880b7c ("arm64: Fix incorrect irqflag restore for priority masking") Acked-by: Marc Zyngier Signed-off-by: Julien Thierry Signed-off-by: Catalin Marinas [will: fixed Fixes: tag] Signed-off-by: Will Deacon arch/arm64/include/asm/arch_gicv3.h | 6 ++++++ arch/arm64/include/asm/ptrace.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) commit 1e78030e5e5b2d8b0cad7136caf9cfab986a6bff Merge: 28f5ab1e12ba 3a6ffb3c8c32 Author: Linus Torvalds Date: Thu Aug 1 06:37:42 2019 -0700 Merge tag 'mmc-v5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: - sdhci-sprd: Add a missing pm_runtime_put_noidle() to fix deferred probe - dw_mmc: Fix occasional hang after tuning on eMMC - meson-mx-sdio: Fix misuse of GENMASK macro - mmc_spi: Fix CRC problems for writes by using BDI_CAP_STABLE_WRITES * tag 'mmc-v5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: mmc_spi: Enable stable writes mmc: meson-mx-sdio: Fix misuse of GENMASK macro mmc: dw_mmc: Fix occasional hang after tuning on eMMC mmc: host: sdhci-sprd: Fix the missing pm_runtime_put_noidle() commit 28f5ab1e12ba702389c41bc95d02733673020d85 Merge: 5c6207539aea d95da993383c Author: Linus Torvalds Date: Thu Aug 1 06:26:30 2019 -0700 Merge tag 'gpio-v5.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO fixes from Linus Walleij: "Three GPIO fixes, all touching the core, so quite important: - Fix the request of active low GPIO line events. - Don't issue WARN() stuff on NULL descriptors if the GPIOLIB is disabled. - Preserve the descriptor flags when setting the initial direction on lines" * tag 'gpio-v5.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpiolib: Preserve desc->flags when setting state gpio: don't WARN() on NULL descs if gpiolib is disabled gpiolib: fix incorrect IRQ requesting of an active-low lineevent commit 811ba489fa524ec634933cdf83aaf6c007a4c004 Author: Nishka Dasgupta Date: Wed Jul 24 14:02:31 2019 +0530 regulator: of: Add of_node_put() before return in function The local variable search in regulator_of_get_init_node takes the value returned by either of_get_child_by_name or of_node_get, both of which get a node. If this node is not put before returning, it could cause a memory leak. Hence put search before a mid-loop return statement. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Link: https://lore.kernel.org/r/20190724083231.10276-1-nishkadg.linux@gmail.com Signed-off-by: Mark Brown drivers/regulator/of_regulator.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 58540594570778fd149cd8c9b2bff61f2cefa8c9 Author: Thomas Zimmermann Date: Wed Jul 3 09:58:34 2019 +0200 drm/bochs: Use shadow buffer for bochs framebuffer console The bochs driver (and virtual hardware) requires buffer objects to reside in video ram to display them to the screen. So it can not display the framebuffer console because the respective buffer object is permanently pinned in system memory. Using a shadow buffer for the console solves this problem. The console emulation will pin the buffer object only during updates from the shadow buffer. Otherwise, the bochs driver can freely relocated the buffer between system memory and video ram. v2: * select shadow FB via struct drm_mode_config.prefer_shadow_fbdev Signed-off-by: Thomas Zimmermann Acked-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/315833/ Signed-off-by: Gerd Hoffmann drivers/gpu/drm/bochs/bochs_kms.c | 1 + 1 file changed, 1 insertion(+) commit 01b947afaa940327e7adf57070a4bf3d0bed9810 Author: Thomas Zimmermann Date: Fri Jul 5 09:31:00 2019 +0200 drm/fb-helper: Instanciate shadow FB if configured in device's mode_config Generic framebuffer emulation uses a shadow buffer for framebuffers with dirty() function. If drivers want to use the shadow FB without such a function, they can now set prefer_shadow or prefer_shadow_fbdev in their mode_config structures. The former flag is exported to userspace, the latter flag is fbdev-only. v3: * only schedule dirty worker if fbdev uses shadow fb * test shadow fb settings with boolean operators * use bool for struct drm_mode_config.prefer_shadow_fbdev * fix documentation comments Signed-off-by: Thomas Zimmermann Reviewed-by: Noralf Trønnes Tested-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/315834/ Signed-off-by: Gerd Hoffmann drivers/gpu/drm/drm_fb_helper.c | 18 +++++++++++++++--- include/drm/drm_mode_config.h | 7 +++++++ 2 files changed, 22 insertions(+), 3 deletions(-) commit 87e281f88f3aa4ed401554f793685bcb2463580a Author: Thomas Zimmermann Date: Wed Jul 3 09:58:24 2019 +0200 drm/fb-helper: Map DRM client buffer only when required This patch changes DRM clients to not map the buffer by default. The buffer, like any buffer object, should be mapped and unmapped when needed. An unmapped buffer object can be evicted to system memory and does not consume video ram until displayed. This allows to use generic fbdev emulation with drivers for low-memory devices, such as ast and mgag200. This change affects the generic framebuffer console. HW-based consoles map their console buffer once and keep it mapped. Userspace can mmap this buffer into its address space. The shadow-buffered framebuffer console only needs the buffer object to be mapped during updates. While not being updated from the shadow buffer, the buffer object can remain unmapped. Userspace will always mmap the shadow buffer. v2: * change DRM client to not map buffer by default * manually map client buffer for fbdev with HW framebuffer Signed-off-by: Thomas Zimmermann Reviewed-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/315830/ Signed-off-by: Gerd Hoffmann drivers/gpu/drm/drm_client.c | 16 ++++------------ drivers/gpu/drm/drm_fb_helper.c | 33 +++++++++++++++++++++++++-------- 2 files changed, 29 insertions(+), 20 deletions(-) commit d9b42dfab513c9130ee0458f2e6febb75c89d1c8 Author: Thomas Zimmermann Date: Wed Jul 3 09:58:18 2019 +0200 drm/client: Support unmapping of DRM client buffers DRM clients, such as the fbdev emulation, have their buffer objects mapped by default. Mapping a buffer implicitly prevents its relocation. Hence, the buffer may permanently consume video memory while it's allocated. This is a problem for drivers of low-memory devices, such as ast, mgag200 or older framebuffer hardware, which will then not have enough memory to display other content (e.g., X11). This patch introduces drm_client_buffer_vmap() and _vunmap(). Internal DRM clients can use these functions to unmap and remap buffer objects as needed. There's no reference counting for vmap operations. Callers are expected to either keep buffers mapped (as it is now), or call vmap and vunmap in pairs around code that accesses the mapped memory. v2: * remove several duplicated NULL-pointer checks v3: * style and typo fixes Signed-off-by: Thomas Zimmermann Reviewed-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/315831/ Signed-off-by: Gerd Hoffmann drivers/gpu/drm/drm_client.c | 66 +++++++++++++++++++++++++++++++++++++------- include/drm/drm_client.h | 2 ++ 2 files changed, 58 insertions(+), 10 deletions(-) commit fd01eecdf9591453177d7b06faaabef8c300114a Author: Rayagonda Kokatanur Date: Wed Jul 24 13:58:27 2019 +0530 i2c: iproc: Fix i2c master read more than 63 bytes Use SMBUS_MASTER_DATA_READ.MASTER_RD_STATUS bit to check for RX FIFO empty condition because SMBUS_MASTER_FIFO_CONTROL.MASTER_RX_PKT_COUNT is not updated for read >= 64 bytes. This fixes the issue when trying to read from the I2C slave more than 63 bytes. Fixes: c24b8d574b7c ("i2c: iproc: Extend I2C read up to 255 bytes") Cc: stable@kernel.org Signed-off-by: Rayagonda Kokatanur Reviewed-by: Ray Jui Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-bcm-iproc.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit f2c5ed0dd5004c2cff5c0e3d430a107576fcc17f Author: James Bottomley Date: Thu Aug 1 13:47:03 2019 +0200 parisc: Add archclean Makefile target Apparently we don't have an archclean target in our arch/parisc/Makefile, so files in there never get cleaned out by make mrproper. This, in turn means that the sizes.h file in arch/parisc/boot/compressed never gets removed and worse, when you transition to an O=build/parisc[64] build model it overrides the generated file. The upshot being my bzImage was building with a SZ_end that was too small. I fixed it by making mrproper clean everything. Signed-off-by: James Bottomley Cc: stable@vger.kernel.org # v4.20+ Signed-off-by: Helge Deller arch/parisc/Makefile | 3 +++ arch/parisc/boot/compressed/Makefile | 1 + 2 files changed, 4 insertions(+) commit e50beea8e7738377b4fa664078547be338038ff9 Author: Helge Deller Date: Thu Aug 1 13:42:18 2019 +0200 parisc: Strip debug info from kernel before creating compressed vmlinuz Same as on x86-64, strip the .comment, .note and debug sections from the Linux kernel before creating the compressed image for the boot loader. Reported-by: James Bottomley Reported-by: Sven Schnelle Cc: stable@vger.kernel.org # v4.20+ Signed-off-by: Helge Deller arch/parisc/boot/compressed/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3fe6c873af2f2247544debdbe51ec29f690a2ccf Author: Helge Deller Date: Thu Aug 1 13:33:39 2019 +0200 parisc: Fix build of compressed kernel even with debug enabled With debug info enabled (CONFIG_DEBUG_INFO=y) the resulting vmlinux may get that huge that we need to increase the start addresss for the decompression text section otherwise one will face a linker error. Reported-by: Sven Schnelle Tested-by: Sven Schnelle Cc: stable@vger.kernel.org # v4.14+ Signed-off-by: Helge Deller arch/parisc/boot/compressed/vmlinux.lds.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3a5ff11be8dc1f5ea4e89158623204672fc588de Merge: 609488bc979f 25e5ef302c24 Author: Wolfram Sang Date: Thu Aug 1 14:05:17 2019 +0200 Merge tag 'at24-v5.3-rc3-fixes-for-wolfram' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into i2c/for-current at24 fixes for v5.3-rc3 - make spd eeproms world-readable again commit 4b9bb9728c915c6079619e71e3340fe4840d9d40 Author: Chris Wilson Date: Wed Jun 26 16:45:48 2019 +0100 drm/i915: Only recover active engines If we issue a reset to a currently idle engine, leave it idle afterwards. This is useful to excise a linkage between reset and the shrinker. When waking the engine, we need to pin the default context image which we use for overwriting a guilty context -- if the engine is idle we do not need this pinned image! However, this pinning means that waking the engine acquires the FS_RECLAIM, and so may trigger the shrinker. The shrinker itself may need to wait upon the GPU to unbind and object and so may require services of reset; ergo we should avoid the engine wake up path. The danger in skipping the recovery for idle engines is that we leave the engine with no context defined, which may interfere with the operation of the power context on some older platforms. In practice, we should only be resetting an active GPU but it something to look out for on Ironlake (if memory serves). Fixes: 79ffac8599c4 ("drm/i915: Invert the GEM wakeref hierarchy") Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Cc: Tvrtko Ursulin Cc: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20190626154549.10066-2-chris@chris-wilson.co.uk (cherry picked from commit 18398904ca9e3ddd180e2ecd45886e146b1d9d5b) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/gt/intel_reset.c | 37 +++++++++++++++++++------------- drivers/gpu/drm/i915/gt/selftest_reset.c | 5 ++++- 2 files changed, 26 insertions(+), 16 deletions(-) commit b1fa6fd94fc6a5d6be85359743b5f3626f3f881c Author: Chris Wilson Date: Wed Jun 26 16:45:47 2019 +0100 drm/i915: Add a wakeref getter for iff the wakeref is already active For use in the next patch, we want to acquire a wakeref without having to wake the device up -- i.e. only acquire the engine wakeref if the engine is already active. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190626154549.10066-1-chris@chris-wilson.co.uk (cherry picked from commit de5147b8ce6d51f634661d7c531385371485cec6) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/gt/intel_engine_pm.h | 10 +++++++++- drivers/gpu/drm/i915/intel_wakeref.h | 15 +++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) commit 0de50e40fc685fed4d6896a379b123f859ffb17b Author: Chris Wilson Date: Wed Jun 26 16:45:49 2019 +0100 drm/i915: Lift intel_engines_resume() to callers Since the reset path wants to recover the engines itself, it only wants to reinitialise the hardware using i915_gem_init_hw(). Pull the call to intel_engines_resume() to the module init/resume path so we can avoid it during reset. Fixes: 79ffac8599c4 ("drm/i915: Invert the GEM wakeref hierarchy") Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Cc: Tvrtko Ursulin Cc: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20190626154549.10066-3-chris@chris-wilson.co.uk (cherry picked from commit 092be382a2602067766f190a113514d469162456) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/gem/i915_gem_pm.c | 7 ++++--- drivers/gpu/drm/i915/gt/intel_engine_pm.c | 24 ------------------------ drivers/gpu/drm/i915/gt/intel_engine_pm.h | 2 -- drivers/gpu/drm/i915/gt/intel_gt_pm.c | 21 ++++++++++++++++++++- drivers/gpu/drm/i915/gt/intel_gt_pm.h | 2 +- drivers/gpu/drm/i915/gt/intel_reset.c | 21 ++++++++++++++++++++- drivers/gpu/drm/i915/i915_gem.c | 25 +++++++++++-------------- 7 files changed, 56 insertions(+), 46 deletions(-) commit b877ac9815a8fe7e5f6d7fdde3dc34652408840a Author: Juergen Gross Date: Fri Jun 14 07:46:04 2019 +0200 xen/swiotlb: remember having called xen_create_contiguous_region() Instead of always calling xen_destroy_contiguous_region() in case the memory is DMA-able for the used device, do so only in case it has been made DMA-able via xen_create_contiguous_region() before. This will avoid a lot of xen_destroy_contiguous_region() calls for 64-bit capable devices. As the memory in question is owned by swiotlb-xen the PG_owner_priv_1 flag of the first allocated page can be used for remembering. Signed-off-by: Juergen Gross Acked-by: Konrad Rzeszutek Wilk Signed-off-by: Juergen Gross drivers/xen/swiotlb-xen.c | 4 +++- include/linux/page-flags.h | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) commit bf70726668c6116aa4976e0cc87f470be6268a2f Author: Juergen Gross Date: Fri Jun 14 07:46:03 2019 +0200 xen/swiotlb: simplify range_straddles_page_boundary() range_straddles_page_boundary() is open coding several macros from include/xen/page.h. Use those instead. Additionally there is no need to have check_pages_physically_contiguous() as a separate function as it is used only once, so merge it into range_straddles_page_boundary(). Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Acked-by: Konrad Rzeszutek Wilk Signed-off-by: Juergen Gross drivers/xen/swiotlb-xen.c | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) commit 50f6393f9654c561df4cdcf8e6cfba7260143601 Author: Juergen Gross Date: Fri Jun 14 07:46:02 2019 +0200 xen/swiotlb: fix condition for calling xen_destroy_contiguous_region() The condition in xen_swiotlb_free_coherent() for deciding whether to call xen_destroy_contiguous_region() is wrong: in case the region to be freed is not contiguous calling xen_destroy_contiguous_region() is the wrong thing to do: it would result in inconsistent mappings of multiple PFNs to the same MFN. This will lead to various strange crashes or data corruption. Instead of calling xen_destroy_contiguous_region() in that case a warning should be issued as that situation should never occur. Cc: stable@vger.kernel.org Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Reviewed-by: Jan Beulich Acked-by: Konrad Rzeszutek Wilk Signed-off-by: Juergen Gross drivers/xen/swiotlb-xen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 56fbc24116f458a0ea48f9f37fe770fd791042d9 Author: Takshak Chahande Date: Wed Jul 31 15:10:55 2019 -0700 libbpf : make libbpf_num_possible_cpus function thread safe Having static variable `cpus` in libbpf_num_possible_cpus function without guarding it with mutex makes this function thread-unsafe. If multiple threads accessing this function, in the current form; it leads to incrementing the static variable value `cpus` in the multiple of total available CPUs. Used local stack variable to calculate the number of possible CPUs and then updated the static variable using WRITE_ONCE(). Changes since v1: * added stack variable to calculate cpus * serialized static variable update using WRITE_ONCE() * fixed Fixes tag Fixes: 6446b3155521 ("bpf: add a new API libbpf_num_possible_cpus()") Signed-off-by: Takshak Chahande Acked-by: Andrey Ignatov Reviewed-by: Jakub Kicinski Signed-off-by: Alexei Starovoitov tools/lib/bpf/libbpf.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit bd46a90634302bfe791e93ad5496f98f165f7ae0 Author: Keith Busch Date: Mon Jul 29 16:34:52 2019 -0600 nvme-pci: Fix async probe remove race Ensure the controller is not in the NEW state when nvme_probe() exits. This will always allow a subsequent nvme_remove() to set the state to DELETING, fixing a potential race between the initial asynchronous probe and device removal. Reported-by: Li Zhong Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch Signed-off-by: Sagi Grimberg drivers/nvme/host/pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0157ec8dad3c8fc9bc9790f76e0831ffdaf2e7f0 Author: Sagi Grimberg Date: Thu Jul 25 11:56:57 2019 -0700 nvme: fix controller removal race with scan work With multipath enabled, nvme_scan_work() can read from the device (through nvme_mpath_add_disk()) and hang [1]. However, with fabrics, once ctrl->state is set to NVME_CTRL_DELETING, the reads will hang (see nvmf_check_ready()) and the mpath stack device make_request will block if head->list is not empty. However, when the head->list consistst of only DELETING/DEAD controllers, we should actually not block, but rather fail immediately. In addition, before we go ahead and remove the namespaces, make sure to clear the current path and kick the requeue list so that the request will fast fail upon requeuing. [1]: -- INFO: task kworker/u4:3:166 blocked for more than 120 seconds. Not tainted 5.2.0-rc6-vmlocalyes-00005-g808c8c2dc0cf #316 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. kworker/u4:3 D 0 166 2 0x80004000 Workqueue: nvme-wq nvme_scan_work Call Trace: __schedule+0x851/0x1400 schedule+0x99/0x210 io_schedule+0x21/0x70 do_read_cache_page+0xa57/0x1330 read_cache_page+0x4a/0x70 read_dev_sector+0xbf/0x380 amiga_partition+0xc4/0x1230 check_partition+0x30f/0x630 rescan_partitions+0x19a/0x980 __blkdev_get+0x85a/0x12f0 blkdev_get+0x2a5/0x790 __device_add_disk+0xe25/0x1250 device_add_disk+0x13/0x20 nvme_mpath_set_live+0x172/0x2b0 nvme_update_ns_ana_state+0x130/0x180 nvme_set_ns_ana_state+0x9a/0xb0 nvme_parse_ana_log+0x1c3/0x4a0 nvme_mpath_add_disk+0x157/0x290 nvme_validate_ns+0x1017/0x1bd0 nvme_scan_work+0x44d/0x6a0 process_one_work+0x7d7/0x1240 worker_thread+0x8e/0xff0 kthread+0x2c3/0x3b0 ret_from_fork+0x35/0x40 INFO: task kworker/u4:1:1034 blocked for more than 120 seconds. Not tainted 5.2.0-rc6-vmlocalyes-00005-g808c8c2dc0cf #316 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. kworker/u4:1 D 0 1034 2 0x80004000 Workqueue: nvme-delete-wq nvme_delete_ctrl_work Call Trace: __schedule+0x851/0x1400 schedule+0x99/0x210 schedule_timeout+0x390/0x830 wait_for_completion+0x1a7/0x310 __flush_work+0x241/0x5d0 flush_work+0x10/0x20 nvme_remove_namespaces+0x85/0x3d0 nvme_do_delete_ctrl+0xb4/0x1e0 nvme_delete_ctrl_work+0x15/0x20 process_one_work+0x7d7/0x1240 worker_thread+0x8e/0xff0 kthread+0x2c3/0x3b0 ret_from_fork+0x35/0x40 -- Reported-by: Logan Gunthorpe Tested-by: Logan Gunthorpe Reviewed-by: Logan Gunthorpe Reviewed-by: Ming Lei Signed-off-by: Sagi Grimberg drivers/nvme/host/core.c | 7 +++++++ drivers/nvme/host/multipath.c | 46 +++++++++++++++++++++++++++++++++++++------ drivers/nvme/host/nvme.h | 9 +++++++-- 3 files changed, 54 insertions(+), 8 deletions(-) commit d94211b8bad3787e0655a67284105f57db728cb1 Author: Sagi Grimberg Date: Fri Jul 26 10:29:49 2019 -0700 nvme-rdma: fix possible use-after-free in connect error flow When start_queue fails, we need to make sure to drain the queue cq before freeing the rdma resources because we might still race with the completion path. Have start_queue() error path safely stop the queue. -- [30371.808111] nvme nvme1: Failed reconnect attempt 11 [30371.808113] nvme nvme1: Reconnecting in 10 seconds... [...] [30382.069315] nvme nvme1: creating 4 I/O queues. [30382.257058] nvme nvme1: Connect Invalid SQE Parameter, qid 4 [30382.257061] nvme nvme1: failed to connect queue: 4 ret=386 [30382.305001] BUG: unable to handle kernel NULL pointer dereference at 0000000000000018 [30382.305022] IP: qedr_poll_cq+0x8a3/0x1170 [qedr] [30382.305028] PGD 0 P4D 0 [30382.305037] Oops: 0000 [#1] SMP PTI [...] [30382.305153] Call Trace: [30382.305166] ? __switch_to_asm+0x34/0x70 [30382.305187] __ib_process_cq+0x56/0xd0 [ib_core] [30382.305201] ib_poll_handler+0x26/0x70 [ib_core] [30382.305213] irq_poll_softirq+0x88/0x110 [30382.305223] ? sort_range+0x20/0x20 [30382.305232] __do_softirq+0xde/0x2c6 [30382.305241] ? sort_range+0x20/0x20 [30382.305249] run_ksoftirqd+0x1c/0x60 [30382.305258] smpboot_thread_fn+0xef/0x160 [30382.305265] kthread+0x113/0x130 [30382.305273] ? kthread_create_worker_on_cpu+0x50/0x50 [30382.305281] ret_from_fork+0x35/0x40 -- Reported-by: Nicolas Morey-Chaisemartin Reviewed-by: Max Gurtovoy Reviewed-by: Hannes Reinecke Signed-off-by: Sagi Grimberg drivers/nvme/host/rdma.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit b9156daeb1601d69007b7e50efcf89d69d72ec1d Author: Sagi Grimberg Date: Wed Jul 31 11:00:26 2019 -0700 nvme: fix a possible deadlock when passthru commands sent to a multipath device When the user issues a command with side effects, we will end up freezing the namespace request queue when updating disk info (and the same for the corresponding mpath disk node). However, we are not freezing the mpath node request queue, which means that mpath I/O can still come in and block on blk_queue_enter (called from nvme_ns_head_make_request -> direct_make_request). This is a deadlock, because blk_queue_enter will block until the inner namespace request queue is unfroze, but that process is blocked because the namespace revalidation is trying to update the mpath disk info and freeze its request queue (which will never complete because of the I/O that is blocked on blk_queue_enter). Fix this by freezing all the subsystem nsheads request queues before executing the passthru command. Given that these commands are infrequent we should not worry about this temporary I/O freeze to keep things sane. Here is the matching hang traces: -- [ 374.465002] INFO: task systemd-udevd:17994 blocked for more than 122 seconds. [ 374.472975] Not tainted 5.2.0-rc3-mpdebug+ #42 [ 374.478522] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 374.487274] systemd-udevd D 0 17994 1 0x00000000 [ 374.493407] Call Trace: [ 374.496145] __schedule+0x2ef/0x620 [ 374.500047] schedule+0x38/0xa0 [ 374.503569] blk_queue_enter+0x139/0x220 [ 374.507959] ? remove_wait_queue+0x60/0x60 [ 374.512540] direct_make_request+0x60/0x130 [ 374.517219] nvme_ns_head_make_request+0x11d/0x420 [nvme_core] [ 374.523740] ? generic_make_request_checks+0x307/0x6f0 [ 374.529484] generic_make_request+0x10d/0x2e0 [ 374.534356] submit_bio+0x75/0x140 [ 374.538163] ? guard_bio_eod+0x32/0xe0 [ 374.542361] submit_bh_wbc+0x171/0x1b0 [ 374.546553] block_read_full_page+0x1ed/0x330 [ 374.551426] ? check_disk_change+0x70/0x70 [ 374.556008] ? scan_shadow_nodes+0x30/0x30 [ 374.560588] blkdev_readpage+0x18/0x20 [ 374.564783] do_read_cache_page+0x301/0x860 [ 374.569463] ? blkdev_writepages+0x10/0x10 [ 374.574037] ? prep_new_page+0x88/0x130 [ 374.578329] ? get_page_from_freelist+0xa2f/0x1280 [ 374.583688] ? __alloc_pages_nodemask+0x179/0x320 [ 374.588947] read_cache_page+0x12/0x20 [ 374.593142] read_dev_sector+0x2d/0xd0 [ 374.597337] read_lba+0x104/0x1f0 [ 374.601046] find_valid_gpt+0xfa/0x720 [ 374.605243] ? string_nocheck+0x58/0x70 [ 374.609534] ? find_valid_gpt+0x720/0x720 [ 374.614016] efi_partition+0x89/0x430 [ 374.618113] ? string+0x48/0x60 [ 374.621632] ? snprintf+0x49/0x70 [ 374.625339] ? find_valid_gpt+0x720/0x720 [ 374.629828] check_partition+0x116/0x210 [ 374.634214] rescan_partitions+0xb6/0x360 [ 374.638699] __blkdev_reread_part+0x64/0x70 [ 374.643377] blkdev_reread_part+0x23/0x40 [ 374.647860] blkdev_ioctl+0x48c/0x990 [ 374.651956] block_ioctl+0x41/0x50 [ 374.655766] do_vfs_ioctl+0xa7/0x600 [ 374.659766] ? locks_lock_inode_wait+0xb1/0x150 [ 374.664832] ksys_ioctl+0x67/0x90 [ 374.668539] __x64_sys_ioctl+0x1a/0x20 [ 374.672732] do_syscall_64+0x5a/0x1c0 [ 374.676828] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 374.738474] INFO: task nvmeadm:49141 blocked for more than 123 seconds. [ 374.745871] Not tainted 5.2.0-rc3-mpdebug+ #42 [ 374.751419] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 374.760170] nvmeadm D 0 49141 36333 0x00004080 [ 374.766301] Call Trace: [ 374.769038] __schedule+0x2ef/0x620 [ 374.772939] schedule+0x38/0xa0 [ 374.776452] blk_mq_freeze_queue_wait+0x59/0x100 [ 374.781614] ? remove_wait_queue+0x60/0x60 [ 374.786192] blk_mq_freeze_queue+0x1a/0x20 [ 374.790773] nvme_update_disk_info.isra.57+0x5f/0x350 [nvme_core] [ 374.797582] ? nvme_identify_ns.isra.50+0x71/0xc0 [nvme_core] [ 374.804006] __nvme_revalidate_disk+0xe5/0x110 [nvme_core] [ 374.810139] nvme_revalidate_disk+0xa6/0x120 [nvme_core] [ 374.816078] ? nvme_submit_user_cmd+0x11e/0x320 [nvme_core] [ 374.822299] nvme_user_cmd+0x264/0x370 [nvme_core] [ 374.827661] nvme_dev_ioctl+0x112/0x1d0 [nvme_core] [ 374.833114] do_vfs_ioctl+0xa7/0x600 [ 374.837117] ? __audit_syscall_entry+0xdd/0x130 [ 374.842184] ksys_ioctl+0x67/0x90 [ 374.845891] __x64_sys_ioctl+0x1a/0x20 [ 374.850082] do_syscall_64+0x5a/0x1c0 [ 374.854178] entry_SYSCALL_64_after_hwframe+0x44/0xa9 -- Reported-by: James Puthukattukaran Tested-by: James Puthukattukaran Reviewed-by: Keith Busch Signed-off-by: Sagi Grimberg drivers/nvme/host/core.c | 5 +++++ drivers/nvme/host/multipath.c | 30 ++++++++++++++++++++++++++++++ drivers/nvme/host/nvme.h | 12 ++++++++++++ 3 files changed, 47 insertions(+) commit 8c36e66fb407ce076535a7db98ab9f6d720b866a Author: Logan Gunthorpe Date: Wed Jul 31 17:35:34 2019 -0600 nvme-core: Fix extra device_put() call on error path In the error path for nvme_init_subsystem(), nvme_put_subsystem() will call device_put(), but it will get called again after the mutex_unlock(). The device_put() only needs to be called if device_add() fails. This bug caused a KASAN use-after-free error when adding and removing subsytems in a loop: BUG: KASAN: use-after-free in device_del+0x8d9/0x9a0 Read of size 8 at addr ffff8883cdaf7120 by task multipathd/329 CPU: 0 PID: 329 Comm: multipathd Not tainted 5.2.0-rc6-vmlocalyes-00019-g70a2b39005fd-dirty #314 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014 Call Trace: dump_stack+0x7b/0xb5 print_address_description+0x6f/0x280 ? device_del+0x8d9/0x9a0 __kasan_report+0x148/0x199 ? device_del+0x8d9/0x9a0 ? class_release+0x100/0x130 ? device_del+0x8d9/0x9a0 kasan_report+0x12/0x20 __asan_report_load8_noabort+0x14/0x20 device_del+0x8d9/0x9a0 ? device_platform_notify+0x70/0x70 nvme_destroy_subsystem+0xf9/0x150 nvme_free_ctrl+0x280/0x3a0 device_release+0x72/0x1d0 kobject_put+0x144/0x410 put_device+0x13/0x20 nvme_free_ns+0xc4/0x100 nvme_release+0xb3/0xe0 __blkdev_put+0x549/0x6e0 ? kasan_check_write+0x14/0x20 ? bd_set_size+0xb0/0xb0 ? kasan_check_write+0x14/0x20 ? mutex_lock+0x8f/0xe0 ? __mutex_lock_slowpath+0x20/0x20 ? locks_remove_file+0x239/0x370 blkdev_put+0x72/0x2c0 blkdev_close+0x8d/0xd0 __fput+0x256/0x770 ? _raw_read_lock_irq+0x40/0x40 ____fput+0xe/0x10 task_work_run+0x10c/0x180 ? filp_close+0xf7/0x140 exit_to_usermode_loop+0x151/0x170 do_syscall_64+0x240/0x2e0 ? prepare_exit_to_usermode+0xd5/0x190 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f5a79af05d7 Code: 00 00 0f 05 48 3d 00 f0 ff ff 77 3f c3 66 0f 1f 44 00 00 53 89 fb 48 83 ec 10 e8 c4 fb ff ff 89 df 89 c2 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 2b 89 d7 89 44 24 0c e8 06 fc ff ff 8b 44 24 RSP: 002b:00007f5a7799c810 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000008 RCX: 00007f5a79af05d7 RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000008 RBP: 00007f5a58000f98 R08: 0000000000000002 R09: 00007f5a7935ee80 R10: 0000000000000000 R11: 0000000000000293 R12: 000055e432447240 R13: 0000000000000000 R14: 0000000000000001 R15: 000055e4324a9cf0 Allocated by task 1236: save_stack+0x21/0x80 __kasan_kmalloc.constprop.6+0xab/0xe0 kasan_kmalloc+0x9/0x10 kmem_cache_alloc_trace+0x102/0x210 nvme_init_identify+0x13c3/0x3820 nvme_loop_configure_admin_queue+0x4fa/0x5e0 nvme_loop_create_ctrl+0x469/0xf40 nvmf_dev_write+0x19a3/0x21ab __vfs_write+0x66/0x120 vfs_write+0x154/0x490 ksys_write+0x104/0x240 __x64_sys_write+0x73/0xb0 do_syscall_64+0xa5/0x2e0 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 329: save_stack+0x21/0x80 __kasan_slab_free+0x129/0x190 kasan_slab_free+0xe/0x10 kfree+0xa7/0x200 nvme_release_subsystem+0x49/0x60 device_release+0x72/0x1d0 kobject_put+0x144/0x410 put_device+0x13/0x20 klist_class_dev_put+0x31/0x40 klist_put+0x8f/0xf0 klist_del+0xe/0x10 device_del+0x3a7/0x9a0 nvme_destroy_subsystem+0xf9/0x150 nvme_free_ctrl+0x280/0x3a0 device_release+0x72/0x1d0 kobject_put+0x144/0x410 put_device+0x13/0x20 nvme_free_ns+0xc4/0x100 nvme_release+0xb3/0xe0 __blkdev_put+0x549/0x6e0 blkdev_put+0x72/0x2c0 blkdev_close+0x8d/0xd0 __fput+0x256/0x770 ____fput+0xe/0x10 task_work_run+0x10c/0x180 exit_to_usermode_loop+0x151/0x170 do_syscall_64+0x240/0x2e0 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: 32fd90c40768 ("nvme: change locking for the per-subsystem controller list") Signed-off-by: Logan Gunthorpe Reviewed-by: Sagi Grimberg Reviewed-by : Chaitanya Kulkarni Signed-off-by: Sagi Grimberg drivers/nvme/host/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cfc1a1af56200362d1508b82b9a3cc3acb2eae0c Author: Logan Gunthorpe Date: Wed Jul 31 17:35:33 2019 -0600 nvmet-file: fix nvmet_file_flush() always returning an error Presently, nvmet_file_flush() always returns a call to errno_to_nvme_status() but that helper doesn't take into account the case when errno=0. So nvmet_file_flush() always returns an error code. All other callers of errno_to_nvme_status() check for success before calling it. To fix this, ensure errno_to_nvme_status() returns success if the errno is zero. This should prevent future mistakes like this from happening. Fixes: c6aa3542e010 ("nvmet: add error log support for file backend") Signed-off-by: Logan Gunthorpe Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Signed-off-by: Sagi Grimberg drivers/nvme/target/core.c | 3 +++ 1 file changed, 3 insertions(+) commit 86b9a63e595ff03f9d0a7b92b6acc231fecefc29 Author: Logan Gunthorpe Date: Wed Jul 31 17:35:32 2019 -0600 nvmet-loop: Flush nvme_delete_wq when removing the port After calling nvme_loop_delete_ctrl(), the controllers will not yet be deleted because nvme_delete_ctrl() only schedules work to do the delete. This means a race can occur if a port is removed but there are still active controllers trying to access that memory. To fix this, flush the nvme_delete_wq before returning from nvme_loop_remove_port() so that any controllers that might be in the process of being deleted won't access a freed port. Signed-off-by: Logan Gunthorpe Reviewed-by: Sagi Grimberg Reviewed-by: Max Gurtovoy Reviewed-by : Chaitanya Kulkarni Signed-off-by: Sagi Grimberg drivers/nvme/target/loop.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 3aed86731ee2b23e4dc4d2c6d943d33992cd551b Author: Logan Gunthorpe Date: Wed Jul 31 17:35:31 2019 -0600 nvmet: Fix use-after-free bug when a port is removed When a port is removed through configfs, any connected controllers are still active and can still send commands. This causes a use-after-free bug which is detected by KASAN for any admin command that dereferences req->port (like in nvmet_execute_identify_ctrl). To fix this, disconnect all active controllers when a subsystem is removed from a port. This ensures there are no active controllers when the port is eventually removed. Signed-off-by: Logan Gunthorpe Reviewed-by: Sagi Grimberg Reviewed-by: Max Gurtovoy Reviewed-by : Chaitanya Kulkarni Signed-off-by: Sagi Grimberg drivers/nvme/target/configfs.c | 1 + drivers/nvme/target/core.c | 12 ++++++++++++ drivers/nvme/target/nvmet.h | 3 +++ 3 files changed, 16 insertions(+) commit 4d97972b45f080db4c6d27cc0b54321d9cd7be17 Author: Frode Isaksen Date: Tue Jul 30 13:38:14 2019 +0200 net: stmmac: Use netif_tx_napi_add() for TX polling function This variant of netif_napi_add() should be used from drivers using NAPI to exclusively poll a TX queue. Signed-off-by: Frode Isaksen Tested-by: Bartosz Golaszewski Signed-off-by: Bartosz Golaszewski Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 5c725b6b65067909548ac9ca9bc777098ec9883d Author: Nikolay Aleksandrov Date: Tue Jul 30 14:21:00 2019 +0300 net: bridge: mcast: don't delete permanent entries when fast leave is enabled When permanent entries were introduced by the commit below, they were exempt from timing out and thus igmp leave wouldn't affect them unless fast leave was enabled on the port which was added before permanent entries existed. It shouldn't matter if fast leave is enabled or not if the user added a permanent entry it shouldn't be deleted on igmp leave. Before: $ echo 1 > /sys/class/net/eth4/brport/multicast_fast_leave $ bridge mdb add dev br0 port eth4 grp 229.1.1.1 permanent $ bridge mdb show dev br0 port eth4 grp 229.1.1.1 permanent < join and leave 229.1.1.1 on eth4 > $ bridge mdb show $ After: $ echo 1 > /sys/class/net/eth4/brport/multicast_fast_leave $ bridge mdb add dev br0 port eth4 grp 229.1.1.1 permanent $ bridge mdb show dev br0 port eth4 grp 229.1.1.1 permanent < join and leave 229.1.1.1 on eth4 > $ bridge mdb show dev br0 port eth4 grp 229.1.1.1 permanent Fixes: ccb1c31a7a87 ("bridge: add flags to distinguish permanent mdb entires") Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/bridge/br_multicast.c | 3 +++ 1 file changed, 3 insertions(+) commit 271da132e29b5341c31eca6ba6a72ea1302ebac8 Author: Jia-Ju Bai Date: Tue Jul 30 16:08:13 2019 +0800 net: phy: phy_led_triggers: Fix a possible null-pointer dereference in phy_led_trigger_change_speed() In phy_led_trigger_change_speed(), there is an if statement on line 48 to check whether phy->last_triggered is NULL: if (!phy->last_triggered) When phy->last_triggered is NULL, it is used on line 52: led_trigger_event(&phy->last_triggered->trigger, LED_OFF); Thus, a possible null-pointer dereference may occur. To fix this bug, led_trigger_event(&phy->last_triggered->trigger, LED_OFF) is called when phy->last_triggered is not NULL. This bug is found by a static analysis tool STCheck written by the OSLAB group in Tsinghua University. Signed-off-by: Jia-Ju Bai Signed-off-by: David S. Miller drivers/net/phy/phy_led_triggers.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e29903c49990376e5e928b20f658cdf7c29bf1eb Author: Jakub Kicinski Date: Mon Jul 29 16:08:03 2019 -0700 selftests/tls: fix TLS tests with CONFIG_TLS=n Build bot reports some recent TLS tests are failing with CONFIG_TLS=n. Correct the expected return code and skip TLS installation if not supported. Tested with CONFIG_TLS=n and CONFIG_TLS=m. Reported-by: kernel test robot Fixes: cf32526c8842 ("selftests/tls: add a test for ULP but no keys") Fixes: 65d41fb317c6 ("selftests/tls: add a bidirectional test") Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller tools/testing/selftests/net/tls.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) commit 45385237f65aeee73641f1ef737d7273905a233f Author: Ondrej Mosnacek Date: Thu Jul 25 12:52:43 2019 +0200 selinux: fix memory leak in policydb_init() Since roles_init() adds some entries to the role hash table, we need to destroy also its keys/values on error, otherwise we get a memory leak in the error path. Cc: Reported-by: syzbot+fee3a14d4cdf92646287@syzkaller.appspotmail.com Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Ondrej Mosnacek Signed-off-by: Paul Moore security/selinux/ss/policydb.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 3de433c5b38af49a5fc7602721e2ab5d39f1e69c Author: Rob Clark Date: Tue Jul 30 14:46:28 2019 -0700 drm/msm: Use the correct dma_sync calls in msm_gem [subject was: drm/msm: shake fist angrily at dma-mapping] So, using dma_sync_* for our cache needs works out w/ dma iommu ops, but it falls appart with dma direct ops. The problem is that, depending on display generation, we can have either set of dma ops (mdp4 and dpu have iommu wired to mdss node, which maps to toplevel drm device, but mdp5 has iommu wired up to the mdp sub-node within mdss). Fixes this splat on mdp5 devices: Unable to handle kernel paging request at virtual address ffffffff80000000 Mem abort info: ESR = 0x96000144 Exception class = DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 Data abort info: ISV = 0, ISS = 0x00000144 CM = 1, WnR = 1 swapper pgtable: 4k pages, 48-bit VAs, pgdp=00000000810e4000 [ffffffff80000000] pgd=0000000000000000 Internal error: Oops: 96000144 [#1] SMP Modules linked in: btqcomsmd btqca bluetooth cfg80211 ecdh_generic ecc rfkill libarc4 panel_simple msm wcnss_ctrl qrtr_smd drm_kms_helper venus_enc venus_dec videobuf2_dma_sg videobuf2_memops drm venus_core ipv6 qrtr qcom_wcnss_pil v4l2_mem2mem qcom_sysmon videobuf2_v4l2 qmi_helpers videobuf2_common crct10dif_ce mdt_loader qcom_common videodev qcom_glink_smem remoteproc bmc150_accel_i2c bmc150_magn_i2c bmc150_accel_core bmc150_magn snd_soc_lpass_apq8016 snd_soc_msm8916_analog mms114 mc nf_defrag_ipv6 snd_soc_lpass_cpu snd_soc_apq8016_sbc industrialio_triggered_buffer kfifo_buf snd_soc_lpass_platform snd_soc_msm8916_digital drm_panel_orientation_quirks CPU: 2 PID: 33 Comm: kworker/2:1 Not tainted 5.3.0-rc2 #1 Hardware name: Samsung Galaxy A5U (EUR) (DT) Workqueue: events deferred_probe_work_func pstate: 80000005 (Nzcv daif -PAN -UAO) pc : __clean_dcache_area_poc+0x20/0x38 lr : arch_sync_dma_for_device+0x28/0x30 sp : ffff0000115736a0 x29: ffff0000115736a0 x28: 0000000000000001 x27: ffff800074830800 x26: ffff000011478000 x25: 0000000000000000 x24: 0000000000000001 x23: ffff000011478a98 x22: ffff800009fd1c10 x21: 0000000000000001 x20: ffff800075ad0a00 x19: 0000000000000000 x18: ffff0000112b2000 x17: 0000000000000000 x16: 0000000000000000 x15: 00000000fffffff0 x14: ffff000011455d70 x13: 0000000000000000 x12: 0000000000000028 x11: 0000000000000001 x10: ffff00001106c000 x9 : ffff7e0001d6b380 x8 : 0000000000001000 x7 : ffff7e0001d6b380 x6 : ffff7e0001d6b382 x5 : 0000000000000000 x4 : 0000000000001000 x3 : 000000000000003f x2 : 0000000000000040 x1 : ffffffff80001000 x0 : ffffffff80000000 Call trace: __clean_dcache_area_poc+0x20/0x38 dma_direct_sync_sg_for_device+0xb8/0xe8 get_pages+0x22c/0x250 [msm] msm_gem_get_and_pin_iova+0xdc/0x168 [msm] ... Fixes the combination of two patches: Fixes: 0036bc73ccbe (drm/msm: stop abusing dma_map/unmap for cache) Fixes: 449fa54d6815 (dma-direct: correct the physical addr in dma_direct_sync_sg_for_cpu/device) Tested-by: Stephan Gerhold Signed-off-by: Rob Clark [seanpaul changed subject to something more desriptive] Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190730214633.17820-1-robdclark@gmail.com drivers/gpu/drm/msm/msm_gem.c | 47 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 42 insertions(+), 5 deletions(-) commit 5c6207539aea8b22490f9569db5aa72ddfd0d486 Merge: b36a1552d731 c2c44ec20a84 Author: Linus Torvalds Date: Wed Jul 31 13:26:54 2019 -0700 Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull mount_capable() fix from Al Viro. * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: Unbreak mount_capable() commit b36a1552d7319bbfd5cf7f08726c23c5c66d4f73 Author: Vladis Dronov Date: Tue Jul 30 11:33:45 2019 +0200 Bluetooth: hci_uart: check for missing tty operations Certain ttys operations (pty_unix98_ops) lack tiocmget() and tiocmset() functions which are called by the certain HCI UART protocols (hci_ath, hci_bcm, hci_intel, hci_mrvl, hci_qca) via hci_uart_set_flow_control() or directly. This leads to an execution at NULL and can be triggered by an unprivileged user. Fix this by adding a helper function and a check for the missing tty operations in the protocols code. This fixes CVE-2019-10207. The Fixes: lines list commits where calls to tiocm[gs]et() or hci_uart_set_flow_control() were added to the HCI UART protocols. Link: https://syzkaller.appspot.com/bug?id=1b42faa2848963564a5b1b7f8c837ea7b55ffa50 Reported-by: syzbot+79337b501d6aa974d0f6@syzkaller.appspotmail.com Cc: stable@vger.kernel.org # v2.6.36+ Fixes: b3190df62861 ("Bluetooth: Support for Atheros AR300x serial chip") Fixes: 118612fb9165 ("Bluetooth: hci_bcm: Add suspend/resume PM functions") Fixes: ff2895592f0f ("Bluetooth: hci_intel: Add Intel baudrate configuration support") Fixes: 162f812f23ba ("Bluetooth: hci_uart: Add Marvell support") Fixes: fa9ad876b8e0 ("Bluetooth: hci_qca: Add support for Qualcomm Bluetooth chip wcn3990") Signed-off-by: Vladis Dronov Signed-off-by: Marcel Holtmann Reviewed-by: Yu-Chen, Cho Tested-by: Yu-Chen, Cho Signed-off-by: Linus Torvalds drivers/bluetooth/hci_ath.c | 3 +++ drivers/bluetooth/hci_bcm.c | 3 +++ drivers/bluetooth/hci_intel.c | 3 +++ drivers/bluetooth/hci_ldisc.c | 13 +++++++++++++ drivers/bluetooth/hci_mrvl.c | 3 +++ drivers/bluetooth/hci_qca.c | 3 +++ drivers/bluetooth/hci_uart.h | 1 + 7 files changed, 29 insertions(+) commit 1b7e816fc80e668f0ccc8542cec20b9259abace1 Author: Laura Abbott Date: Wed Jul 31 15:32:40 2019 -0400 mm: slub: Fix slab walking for init_on_free To properly clear the slab on free with slab_want_init_on_free, we walk the list of free objects using get_freepointer/set_freepointer. The value we get from get_freepointer may not be valid. This isn't an issue since an actual value will get written later but this means there's a chance of triggering a bug if we use this value with set_freepointer: kernel BUG at mm/slub.c:306! invalid opcode: 0000 [#1] PREEMPT PTI CPU: 0 PID: 0 Comm: swapper Not tainted 5.2.0-05754-g6471384a #4 RIP: 0010:kfree+0x58a/0x5c0 Code: 48 83 05 78 37 51 02 01 0f 0b 48 83 05 7e 37 51 02 01 48 83 05 7e 37 51 02 01 48 83 05 7e 37 51 02 01 48 83 05 d6 37 51 02 01 <0f> 0b 48 83 05 d4 37 51 02 01 48 83 05 d4 37 51 02 01 48 83 05 d4 RSP: 0000:ffffffff82603d90 EFLAGS: 00010002 RAX: ffff8c3976c04320 RBX: ffff8c3976c04300 RCX: 0000000000000000 RDX: ffff8c3976c04300 RSI: 0000000000000000 RDI: ffff8c3976c04320 RBP: ffffffff82603db8 R08: 0000000000000000 R09: 0000000000000000 R10: ffff8c3976c04320 R11: ffffffff8289e1e0 R12: ffffd52cc8db0100 R13: ffff8c3976c01a00 R14: ffffffff810f10d4 R15: ffff8c3976c04300 FS: 0000000000000000(0000) GS:ffffffff8266b000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffff8c397ffff000 CR3: 0000000125020000 CR4: 00000000000406b0 Call Trace: apply_wqattrs_prepare+0x154/0x280 apply_workqueue_attrs_locked+0x4e/0xe0 apply_workqueue_attrs+0x36/0x60 alloc_workqueue+0x25a/0x6d0 workqueue_init_early+0x246/0x348 start_kernel+0x3c7/0x7ec x86_64_start_reservations+0x40/0x49 x86_64_start_kernel+0xda/0xe4 secondary_startup_64+0xb6/0xc0 Modules linked in: ---[ end trace f67eb9af4d8d492b ]--- Fix this by ensuring the value we set with set_freepointer is either NULL or another value in the chain. Reported-by: kernel test robot Signed-off-by: Laura Abbott Fixes: 6471384af2a6 ("mm: security: introduce init_on_alloc=1 and init_on_free=1 boot options") Reviewed-by: Kees Cook Signed-off-by: Linus Torvalds mm/slub.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit b7edabfe843805b7ab8a91396b0782042a289308 Author: Paul Walmsley Date: Thu Jul 25 15:05:59 2019 -0700 riscv: defconfig: align RV64 defconfig to the output of "make savedefconfig" Align the RV64 defconfig to the output of "make savedefconfig" to avoid unnecessary deltas for future defconfig patches. This patch should have no runtime functional impact. Signed-off-by: Paul Walmsley Reviewed-by: Bin Meng arch/riscv/configs/defconfig | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 11ae2d892139a1086f257188d457ddcb71ab5257 Author: Paul Walmsley Date: Thu Jul 25 13:41:31 2019 -0700 riscv: dts: fu540-c000: drop "timebase-frequency" On FU540-based systems, the "timebase-frequency" (RTCCLK) is sourced from an external crystal located on the PCB. Thus the timebase-frequency DT property should be defined by the board that uses the SoC, not the SoC itself. Drop the superfluous timebase-frequency property from the SoC DT data. (It's already present in the board DT data.) Signed-off-by: Paul Walmsley Reviewed-by: Bin Meng arch/riscv/boot/dts/sifive/fu540-c000.dtsi | 1 - 1 file changed, 1 deletion(-) commit b399abe7c21e248dc6224cadc9a378a2beb10cfd Author: Mao Han Date: Thu Jul 11 10:38:40 2019 +0800 riscv: Fix perf record without libelf support This patch fix following perf record error by linking vdso.so with build id. perf.data perf.data.old [ perf record: Woken up 1 times to write data ] free(): double free detected in tcache 2 Aborted perf record use filename__read_build_id(util/symbol-minimal.c) to get build id when libelf is not supported. When vdso.so is linked without build id, the section size of PT_NOTE will be zero, buf size will realloc to zero and cause memory corruption. Signed-off-by: Mao Han Cc: Paul Walmsley Cc: Palmer Dabbelt Cc: Albert Ou Signed-off-by: Paul Walmsley arch/riscv/kernel/vdso/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7e9e5ead55beacc11116b3fb90b0de6e7cf55a69 Author: Rob Clark Date: Wed Jul 17 14:15:37 2019 -0700 drm/vgem: fix cache synchronization on arm/arm64 drm_cflush_pages() is no-op on arm/arm64. But instead we can use dma_sync API. Fixes failures w/ vgem_test. Acked-by: Daniel Vetter Signed-off-by: Rob Clark Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190717211542.30482-1-robdclark@gmail.com drivers/gpu/drm/vgem/vgem_drv.c | 130 +++++++++++++++++++++++++--------------- 1 file changed, 83 insertions(+), 47 deletions(-) commit d2eee9fca172d0d010ef3060cdc971e0b079b87f Merge: 52fde4348ccc 6c77221df961 Author: Linus Torvalds Date: Wed Jul 31 10:26:59 2019 -0700 Merge tag 'trace-v5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fixes from Steven Rostedt: "Two minor fixes: - Fix trace event header include guards, as several did not match the #define to the #ifdef - Remove a redundant test to ftrace_graph_notrace_addr() that was accidentally added" * tag 'trace-v5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: fgraph: Remove redundant ftrace_graph_notrace_addr() test tracing: Fix header include guards in trace event headers commit f1d4836201543e88ebe70237e67938168d5fab19 Author: Qian Cai Date: Tue Jul 30 17:23:48 2019 -0400 arm64/efi: fix variable 'si' set but not used GCC throws out this warning on arm64. drivers/firmware/efi/libstub/arm-stub.c: In function 'efi_entry': drivers/firmware/efi/libstub/arm-stub.c:132:22: warning: variable 'si' set but not used [-Wunused-but-set-variable] Fix it by making free_screen_info() a static inline function. Acked-by: Will Deacon Signed-off-by: Qian Cai Signed-off-by: Catalin Marinas arch/arm64/include/asm/efi.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 52fde4348ccc317e7ad091a3280f5d4ae19f91ef Merge: 4010b622f1d2 71be7b0e7d40 Author: Linus Torvalds Date: Wed Jul 31 10:13:00 2019 -0700 Merge tag 'for-linus-5.3-2' of git://github.com/cminyard/linux-ipmi Pull IPMI fix from Corey Minyard: "One necessary fix for an uninitialized variable in the new IPMB driver. Nothing else has come in besides things that need to wait until later" * tag 'for-linus-5.3-2' of git://github.com/cminyard/linux-ipmi: Fix uninitialized variable in ipmb_dev_int.c commit 147b9635e6347104b91f48ca9dca61eb0fbf2a54 Author: Will Deacon Date: Tue Jul 30 15:40:20 2019 +0100 arm64: cpufeature: Fix feature comparison for CTR_EL0.{CWG,ERG} If CTR_EL0.{CWG,ERG} are 0b0000 then they must be interpreted to have their architecturally maximum values, which defeats the use of FTR_HIGHER_SAFE when sanitising CPU ID registers on heterogeneous machines. Introduce FTR_HIGHER_OR_ZERO_SAFE so that these fields effectively saturate at zero. Fixes: 3c739b571084 ("arm64: Keep track of CPU feature registers") Cc: # 4.4.x- Reviewed-by: Suzuki K Poulose Acked-by: Mark Rutland Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas arch/arm64/include/asm/cpufeature.h | 7 ++++--- arch/arm64/kernel/cpufeature.c | 8 ++++++-- 2 files changed, 10 insertions(+), 5 deletions(-) commit a22c5cf5d37ddcd4d2dd98ee9cf04fa5dd1e1c01 Author: Vincenzo Frascino Date: Mon Jul 29 13:54:21 2019 +0100 arm64: vdso: Fix Makefile regression Using an old .config in combination with "make oldconfig" can cause an incorrect detection of the compat compiler: $ grep CROSS_COMPILE_COMPAT .config CONFIG_CROSS_COMPILE_COMPAT_VDSO="" $ make oldconfig && make arch/arm64/Makefile:58: gcc not found, check CROSS_COMPILE_COMPAT. Stop. Accordingly to the section 7.2 of the GNU Make manual "Syntax of Conditionals", "When the value results from complex expansions of variables and functions, expansions you would consider empty may actually contain whitespace characters and thus are not seen as empty. However, you can use the strip function to avoid interpreting whitespace as a non-empty value." Fix the issue adding strip to the CROSS_COMPILE_COMPAT string evaluation. Reported-by: Matteo Croce Tested-by: Matteo Croce Acked-by: Will Deacon Signed-off-by: Vincenzo Frascino Signed-off-by: Catalin Marinas arch/arm64/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 706cb5492c8c459199fa0ab3b5fd2ba54ee53b0c Author: Andreas Gruenbacher Date: Sat Jul 27 17:12:54 2019 +0200 gfs2: Inode dirtying fix With the recent iomap write page reclaim deadlock fix, it turns out that the GLF_DIRTY flag isn't always set when it needs to be anymore: previously, this happened as a side effect of always adding the inode buffer head to the current transaction with gfs2_trans_add_meta, but this isn't happening consistently anymore. Fix by removing an additional unnecessary gfs2_trans_add_meta call and by setting the GLF_DIRTY flag in gfs2_iomap_end. (The GLF_DIRTY flag causes inode_go_sync to flush the transaction log when syncing out the glock of that inode. When the flag isn't set, inode_go_sync will skip inodes, including ones with an i_state of I_DIRTY_PAGES, which will lead to cluster incoherency.) In addition, in gfs2_iomap_page_done, if the metadata has changed, mark the inode as I_DIRTY_DATASYNC to have the inode added to the current transaction: we don't expect metadata to change here, but let's err on the safe side. Fixes: d0a22a4b03b8 ("gfs2: Fix iomap write page reclaim deadlock"); Signed-off-by: Andreas Gruenbacher fs/gfs2/bmap.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit c2c44ec20a8496f7a3b3401c092afe96908eced1 Author: Al Viro Date: Sat Jul 27 08:29:57 2019 -0400 Unbreak mount_capable() In "consolidate the capability checks in sget_{fc,userns}())" the wrong argument had been passed to mount_capable() by sget_fc(). That mistake had been further obscured later, when switching mount_capable() to fs_context has moved the calculation of bogus argument from sget_fc() to mount_capable() itself. It should've been fc->user_ns all along. Screwed-up-by: Al Viro Reported-by: Christian Brauner Tested-by: Christian Brauner Reviewed-by: David Howells Signed-off-by: Al Viro fs/super.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit d8a1de3d5bb881507602bc02e004904828f88711 Author: Juliana Rodrigueiro Date: Wed Jul 31 15:17:23 2019 +0200 isdn: hfcsusb: Fix mISDN driver crash caused by transfer buffer on the stack Since linux 4.9 it is not possible to use buffers on the stack for DMA transfers. During usb probe the driver crashes with "transfer buffer is on stack" message. This fix k-allocates a buffer to be used on "read_reg_atomic", which is a macro that calls "usb_control_msg" under the hood. Kernel 4.19 backtrace: usb_hcd_submit_urb+0x3e5/0x900 ? sched_clock+0x9/0x10 ? log_store+0x203/0x270 ? get_random_u32+0x6f/0x90 ? cache_alloc_refill+0x784/0x8a0 usb_submit_urb+0x3b4/0x550 usb_start_wait_urb+0x4e/0xd0 usb_control_msg+0xb8/0x120 hfcsusb_probe+0x6bc/0xb40 [hfcsusb] usb_probe_interface+0xc2/0x260 really_probe+0x176/0x280 driver_probe_device+0x49/0x130 __driver_attach+0xa9/0xb0 ? driver_probe_device+0x130/0x130 bus_for_each_dev+0x5a/0x90 driver_attach+0x14/0x20 ? driver_probe_device+0x130/0x130 bus_add_driver+0x157/0x1e0 driver_register+0x51/0xe0 usb_register_driver+0x5d/0x120 ? 0xf81ed000 hfcsusb_drv_init+0x17/0x1000 [hfcsusb] do_one_initcall+0x44/0x190 ? free_unref_page_commit+0x6a/0xd0 do_init_module+0x46/0x1c0 load_module+0x1dc1/0x2400 sys_init_module+0xed/0x120 do_fast_syscall_32+0x7a/0x200 entry_SYSENTER_32+0x6b/0xbe Signed-off-by: Juliana Rodrigueiro Signed-off-by: David S. Miller drivers/isdn/hardware/mISDN/hfcsusb.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit c6349f8807324e270c5214920a1309481dd89ba4 Author: Geert Uytterhoeven Date: Wed Jul 31 15:12:02 2019 +0200 net: mediatek: Drop unneeded dependency on NET_VENDOR_MEDIATEK The whole block is protected by "if NET_VENDOR_MEDIATEK", so there is no need for individual driver config symbols to duplicate this dependency. Signed-off-by: Geert Uytterhoeven Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/Kconfig | 1 - 1 file changed, 1 deletion(-) commit f86a677e5752a0250fef0415c40bbe4af37e8653 Merge: fa9586aff919 eef347f846ee Author: David S. Miller Date: Wed Jul 31 08:51:34 2019 -0700 Merge tag 'mac80211-for-davem-2019-07-31' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== Just a few fixes: * revert NETIF_F_LLTX usage as it caused problems * avoid warning on WMM parameters from AP that are too short * fix possible null-ptr dereference in hwsim * fix interface combinations with 4-addr and crypto control ==================== Signed-off-by: David S. Miller commit fa9586aff919a93761a76feb69718b54d49fdd8e Merge: 246902bdf562 7cdc44122847 Author: David S. Miller Date: Wed Jul 31 08:49:09 2019 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== netfilter fixes for net The following patchset contains Netfilter fixes for your net tree: 1) memleak in ebtables from the error path for the 32/64 compat layer, from Florian Westphal. 2) Fix inverted meta ifname/ifidx matching when no interface is set on either from the input/output path, from Phil Sutter. 3) Remove goto label in nft_meta_bridge, also from Phil. 4) Missing include guard in xt_connlabel, from Masahiro Yamada. 5) Two patch to fix ipset destination MAC matching coming from Stephano Brivio, via Jozsef Kadlecsik. 6) Fix set rename and listing concurrency problem, from Shijie Luo. Patch also coming via Jozsef Kadlecsik. 7) ebtables 32/64 compat missing base chain policy in rule count, from Florian Westphal. ==================== Signed-off-by: David S. Miller commit 246902bdf562d45ea3475fac64c93048a7a39f01 Author: Christophe JAILLET Date: Wed Jul 31 10:06:48 2019 +0200 net: ag71xx: Use GFP_KERNEL instead of GFP_ATOMIC in 'ag71xx_rings_init()' There is no need to use GFP_ATOMIC here, GFP_KERNEL should be enough. The 'kcalloc()' just a few lines above, already uses GFP_KERNEL. Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller drivers/net/ethernet/atheros/ag71xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 47b69bf74f16b20a3bb95b1fe27e5347dd34b683 Author: Christophe JAILLET Date: Wed Jul 31 09:38:42 2019 +0200 net: ethernet: et131x: Use GFP_KERNEL instead of GFP_ATOMIC when allocating tx_ring->tcb_ring There is no good reason to use GFP_ATOMIC here. Other memory allocations are performed with GFP_KERNEL (see other 'dma_alloc_coherent()' below and 'kzalloc()' in 'et131x_rx_dma_memory_alloc()') Use GFP_KERNEL which should be enough. Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller drivers/net/ethernet/agere/et131x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3d0b63c5dfa8a912ac2d5026a24826b99b20ecc9 Author: Denis Efremov Date: Wed Jul 31 08:53:42 2019 -0600 MAINTAINERS: floppy: take over maintainership I would like to maintain the floppy driver. After the recent fixes, I think I know the code pretty well. Nowadays I've got 2 physical 3.5" readers to test all the changes. Signed-off-by: Denis Efremov Acked-by: Will Deacon Signed-off-by: Jens Axboe MAINTAINERS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5b31f3e39a6c4be55ede49da0dd352017f09e8cf Author: Ido Schimmel Date: Wed Jul 31 09:38:19 2019 +0300 drop_monitor: Add missing uAPI file to MAINTAINERS file Fixes: 6e43650cee64 ("add maintainer for network drop monitor kernel service") Signed-off-by: Ido Schimmel Acked-by: Neil Horman Signed-off-by: David S. Miller MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 23201ea57f6957ff9e02fcafafe6e0844a0087b5 Merge: abb48f801396 744ad9a35728 Author: David S. Miller Date: Wed Jul 31 08:22:12 2019 -0700 Merge branch 'mlxsw-Two-small-fixes' Ido Schimmel says: ==================== mlxsw: Two small fixes Patch #1 from Jiri fixes the error path of the module initialization function. Found during manual code inspection. Patch #2 from Petr further reduces the default shared buffer pool sizes in order to work around a problem that was originally described in commit e891ce1dd2a5 ("mlxsw: spectrum_buffers: Reduce pool size on Spectrum-2"). ==================== Signed-off-by: David S. Miller commit 744ad9a357280d03d567538cee7e1e457dedd481 Author: Petr Machata Date: Wed Jul 31 09:33:15 2019 +0300 mlxsw: spectrum_buffers: Further reduce pool size on Spectrum-2 In commit e891ce1dd2a5 ("mlxsw: spectrum_buffers: Reduce pool size on Spectrum-2"), pool size was reduced to mitigate a problem in port buffer usage of ports split four ways. It turns out that this work around does not solve the issue, and a further reduction is required. Thus reduce the size of pool 0 by another 2.7 MiB, and round down to the whole number of cells. Fixes: e891ce1dd2a5 ("mlxsw: spectrum_buffers: Reduce pool size on Spectrum-2") Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 28fe79000e9b0a6f99959869947f1ca305f14599 Author: Jiri Pirko Date: Wed Jul 31 09:33:14 2019 +0300 mlxsw: spectrum: Fix error path in mlxsw_sp_module_init() In case of sp2 pci driver registration fail, fix the error path to start with sp1 pci driver unregister. Fixes: c3ab435466d5 ("mlxsw: spectrum: Extend to support Spectrum-2 ASIC") Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e8de12fb7cde2c85bc31097cd098da79a4818305 Author: Stephen Boyd Date: Tue Jul 30 09:48:03 2019 -0700 kbuild: Check for unknown options with cc-option usage in Kconfig and clang If the particular version of clang a user has doesn't enable -Werror=unknown-warning-option by default, even though it is the default[1], then make sure to pass the option to the Kconfig cc-option command so that testing options from Kconfig files works properly. Otherwise, depending on the default values setup in the clang toolchain we will silently assume options such as -Wmaybe-uninitialized are supported by clang, when they really aren't. A compilation issue only started happening for me once commit 589834b3a009 ("kbuild: Add -Werror=unknown-warning-option to CLANG_FLAGS") was applied on top of commit b303c6df80c9 ("kbuild: compute false-positive -Wmaybe-uninitialized cases in Kconfig"). This leads kbuild to try and test for the existence of the -Wmaybe-uninitialized flag with the cc-option command in scripts/Kconfig.include, and it doesn't see an error returned from the option test so it sets the config value to Y. Then the Makefile tries to pass the unknown option on the command line and -Werror=unknown-warning-option catches the invalid option and breaks the build. Before commit 589834b3a009 ("kbuild: Add -Werror=unknown-warning-option to CLANG_FLAGS") the build works fine, but any cc-option test of a warning option in Kconfig files silently evaluates to true, even if the warning option flag isn't supported on clang. Note: This doesn't change cc-option usages in Makefiles because those use a different rule that includes KBUILD_CFLAGS by default (see the __cc-option command in scripts/Kbuild.incluide). The KBUILD_CFLAGS variable already has the -Werror=unknown-warning-option flag set. Thanks to Doug for pointing out the different rule. [1] https://clang.llvm.org/docs/DiagnosticsReference.html#wunknown-warning-option Cc: Peter Smith Cc: Nick Desaulniers Cc: Douglas Anderson Signed-off-by: Stephen Boyd Reviewed-by: Nathan Chancellor Signed-off-by: Masahiro Yamada scripts/Kconfig.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e2a280d28d32d2cf7eaa2b1cecefd079b24c0245 Author: Masahiro Yamada Date: Wed Jul 31 01:40:42 2019 +0900 lib/raid6: fix unnecessary rebuild of vpermxor*.c The following four files are every time rebuilt: UNROLL lib/raid6/vpermxor1.c UNROLL lib/raid6/vpermxor2.c UNROLL lib/raid6/vpermxor4.c UNROLL lib/raid6/vpermxor8.c Fix the suffixes in the targets. Fixes: 72ad21075df8 ("lib/raid6: refactor unroll rules with pattern rules") Signed-off-by: Masahiro Yamada lib/raid6/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a721588d9475cbbf9e8b3ae1a69b1dea88d01653 Author: Masahiro Yamada Date: Wed Jul 31 00:59:02 2019 +0900 kbuild: modpost: do not parse unnecessary rules for vmlinux modpost Since commit ff9b45c55b26 ("kbuild: modpost: read modules.order instead of $(MODVERDIR)/*.mod"), 'make vmlinux' emits a warning, like this: $ make defconfig vmlinux [ snip ] LD vmlinux.o cat: modules.order: No such file or directory MODPOST vmlinux.o MODINFO modules.builtin.modinfo KSYM .tmp_kallsyms1.o KSYM .tmp_kallsyms2.o LD vmlinux SORTEX vmlinux SYSMAP System.map When building only vmlinux, KBUILD_MODULES is not set. Hence, the modules.order is not generated. For the vmlinux modpost, it is not necessary at all. Separate scripts/Makefile.modpost for the vmlinux/modules stages. This works more efficiently because the vmlinux modpost does not need to include .*.cmd files. Fixes: ff9b45c55b26 ("kbuild: modpost: read modules.order instead of $(MODVERDIR)/*.mod") Signed-off-by: Masahiro Yamada scripts/Makefile.modpost | 76 ++++++++++++++++++++++++++---------------------- scripts/link-vmlinux.sh | 2 +- 2 files changed, 42 insertions(+), 36 deletions(-) commit acf2a1397a686365775385ed4657941119172263 Author: Masahiro Yamada Date: Wed Jul 31 00:59:01 2019 +0900 kbuild: modpost: remove unnecessary dependency for __modpost __modpost is a phony target. The dependency on FORCE is pointless. All the objects have been built in the previous stage, so the dependency on the objects are not necessary either. Count the number of modules in a more straightforward way. Signed-off-by: Masahiro Yamada scripts/Makefile.modpost | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cb4819934a7f9b87876f11ed05b8624c0114551b Author: Masahiro Yamada Date: Wed Jul 31 00:59:00 2019 +0900 kbuild: modpost: handle KBUILD_EXTRA_SYMBOLS only for external modules KBUILD_EXTRA_SYMBOLS makes sense only when building external modules. Moreover, the modpost sets 'external_module' if the -e option is given. I replaced $(patsubst %, -e %,...) with simpler $(addprefix -e,...) while I was here. Signed-off-by: Masahiro Yamada scripts/Makefile.modpost | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 944cfe9be1fbbec73bab2f7e77fe2e8f9c72970f Author: Masahiro Yamada Date: Wed Jul 31 00:58:59 2019 +0900 kbuild: modpost: include .*.cmd files only when targets exist If a build rule fails, the .DELETE_ON_ERROR special target removes the target, but does nothing for the .*.cmd file, which might be corrupted. So, .*.cmd files should be included only when the corresponding targets exist. Commit 392885ee82d3 ("kbuild: let fixdep directly write to .*.cmd files") missed to fix up this file. Fixes: 392885ee82d3 ("kbuild: let fixdep directly write to .*.cmd") Cc: # v5.0+ Signed-off-by: Masahiro Yamada scripts/Makefile.modpost | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit dc25ace66c74ca148c393952bd2ce0856029c692 Author: Thomas Gleixner Date: Fri Jul 26 22:25:20 2019 +0200 drm/i810: Use CONFIG_PREEMPTION CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT. Both PREEMPT and PREEMPT_RT require the same functionality which today depends on CONFIG_PREEMPT. Change the Kconfig dependency of i810 to !CONFIG_PREEMPTION so the driver is not accidentally built on a RT kernel. Signed-off-by: Thomas Gleixner Cc: dri-devel@lists.freedesktop.org Cc: Maarten Lankhorst Cc: David Airlie Cc: Daniel Vetter Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/alpine.DEB.2.21.1907262223280.1791@nanos.tec.linutronix.de drivers/gpu/drm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1956ecf4c6ed4f7e4f728c360f378937d249bcd4 Merge: e1ae72a21e5f 609488bc979f Author: Maarten Lankhorst Date: Wed Jul 31 17:02:40 2019 +0200 Merge tag 'v5.3-rc2' into drm-misc-fixes Linux 5.3-rc2 Required for a CONFIG_PREEMPTION fix to i810. :) Signed-off-by: Maarten Lankhorst commit 2b5c8f0063e4b263cf2de82029798183cf85c320 Author: Munehisa Kamata Date: Wed Jul 31 20:13:10 2019 +0800 nbd: replace kill_bdev() with __invalidate_device() again Commit abbbdf12497d ("replace kill_bdev() with __invalidate_device()") once did this, but 29eaadc03649 ("nbd: stop using the bdev everywhere") resurrected kill_bdev() and it has been there since then. So buffer_head mappings still get killed on a server disconnection, and we can still hit the BUG_ON on a filesystem on the top of the nbd device. EXT4-fs (nbd0): mounted filesystem with ordered data mode. Opts: (null) block nbd0: Receive control failed (result -32) block nbd0: shutting down sockets print_req_error: I/O error, dev nbd0, sector 66264 flags 3000 EXT4-fs warning (device nbd0): htree_dirblock_to_tree:979: inode #2: lblock 0: comm ls: error -5 reading directory block print_req_error: I/O error, dev nbd0, sector 2264 flags 3000 EXT4-fs error (device nbd0): __ext4_get_inode_loc:4690: inode #2: block 283: comm ls: unable to read itable block EXT4-fs error (device nbd0) in ext4_reserve_inode_write:5894: IO failure ------------[ cut here ]------------ kernel BUG at fs/buffer.c:3057! invalid opcode: 0000 [#1] SMP PTI CPU: 7 PID: 40045 Comm: jbd2/nbd0-8 Not tainted 5.1.0-rc3+ #4 Hardware name: Amazon EC2 m5.12xlarge/, BIOS 1.0 10/16/2017 RIP: 0010:submit_bh_wbc+0x18b/0x190 ... Call Trace: jbd2_write_superblock+0xf1/0x230 [jbd2] ? account_entity_enqueue+0xc5/0xf0 jbd2_journal_update_sb_log_tail+0x94/0xe0 [jbd2] jbd2_journal_commit_transaction+0x12f/0x1d20 [jbd2] ? __switch_to_asm+0x40/0x70 ... ? lock_timer_base+0x67/0x80 kjournald2+0x121/0x360 [jbd2] ? remove_wait_queue+0x60/0x60 kthread+0xf8/0x130 ? commit_timeout+0x10/0x10 [jbd2] ? kthread_bind+0x10/0x10 ret_from_fork+0x35/0x40 With __invalidate_device(), I no longer hit the BUG_ON with sync or unmount on the disconnected device. Fixes: 29eaadc03649 ("nbd: stop using the bdev everywhere") Cc: linux-block@vger.kernel.org Cc: Ratna Manoj Bolla Cc: nbd@other.debian.org Cc: stable@vger.kernel.org Cc: David Woodhouse Reviewed-by: Josef Bacik Signed-off-by: Munehisa Kamata Signed-off-by: Jens Axboe drivers/block/nbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 090bb803708198e5ab6b0046398c7ed9f4d12d6b Author: Miquel Raynal Date: Wed Jul 31 14:26:51 2019 +0200 ata: libahci: do not complain in case of deferred probe Retrieving PHYs can defer the probe, do not spawn an error when -EPROBE_DEFER is returned, it is normal behavior. Fixes: b1a9edbda040 ("ata: libahci: allow to use multiple PHYs") Reviewed-by: Hans de Goede Signed-off-by: Miquel Raynal Signed-off-by: Jens Axboe drivers/ata/libahci_platform.c | 3 +++ 1 file changed, 3 insertions(+) commit d0ee879187df966ef638031b5f5183078d672141 Author: Jackie Liu Date: Wed Jul 31 14:39:33 2019 +0800 io_uring: fix KASAN use after free in io_sq_wq_submit_work [root@localhost ~]# ./liburing/test/link QEMU Standard PC report that: [ 29.379892] CPU: 0 PID: 84 Comm: kworker/u2:2 Not tainted 5.3.0-rc2-00051-g4010b622f1d2-dirty #86 [ 29.379902] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 29.379913] Workqueue: io_ring-wq io_sq_wq_submit_work [ 29.379929] Call Trace: [ 29.379953] dump_stack+0xa9/0x10e [ 29.379970] ? io_sq_wq_submit_work+0xbf4/0xe90 [ 29.379986] print_address_description.cold.6+0x9/0x317 [ 29.379999] ? io_sq_wq_submit_work+0xbf4/0xe90 [ 29.380010] ? io_sq_wq_submit_work+0xbf4/0xe90 [ 29.380026] __kasan_report.cold.7+0x1a/0x34 [ 29.380044] ? io_sq_wq_submit_work+0xbf4/0xe90 [ 29.380061] kasan_report+0xe/0x12 [ 29.380076] io_sq_wq_submit_work+0xbf4/0xe90 [ 29.380104] ? io_sq_thread+0xaf0/0xaf0 [ 29.380152] process_one_work+0xb59/0x19e0 [ 29.380184] ? pwq_dec_nr_in_flight+0x2c0/0x2c0 [ 29.380221] worker_thread+0x8c/0xf40 [ 29.380248] ? __kthread_parkme+0xab/0x110 [ 29.380265] ? process_one_work+0x19e0/0x19e0 [ 29.380278] kthread+0x30b/0x3d0 [ 29.380292] ? kthread_create_on_node+0xe0/0xe0 [ 29.380311] ret_from_fork+0x3a/0x50 [ 29.380635] Allocated by task 209: [ 29.381255] save_stack+0x19/0x80 [ 29.381268] __kasan_kmalloc.constprop.6+0xc1/0xd0 [ 29.381279] kmem_cache_alloc+0xc0/0x240 [ 29.381289] io_submit_sqe+0x11bc/0x1c70 [ 29.381300] io_ring_submit+0x174/0x3c0 [ 29.381311] __x64_sys_io_uring_enter+0x601/0x780 [ 29.381322] do_syscall_64+0x9f/0x4d0 [ 29.381336] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 29.381633] Freed by task 84: [ 29.382186] save_stack+0x19/0x80 [ 29.382198] __kasan_slab_free+0x11d/0x160 [ 29.382210] kmem_cache_free+0x8c/0x2f0 [ 29.382220] io_put_req+0x22/0x30 [ 29.382230] io_sq_wq_submit_work+0x28b/0xe90 [ 29.382241] process_one_work+0xb59/0x19e0 [ 29.382251] worker_thread+0x8c/0xf40 [ 29.382262] kthread+0x30b/0x3d0 [ 29.382272] ret_from_fork+0x3a/0x50 [ 29.382569] The buggy address belongs to the object at ffff888067172140 which belongs to the cache io_kiocb of size 224 [ 29.384692] The buggy address is located 120 bytes inside of 224-byte region [ffff888067172140, ffff888067172220) [ 29.386723] The buggy address belongs to the page: [ 29.387575] page:ffffea00019c5c80 refcount:1 mapcount:0 mapping:ffff88806ace5180 index:0x0 [ 29.387587] flags: 0x100000000000200(slab) [ 29.387603] raw: 0100000000000200 dead000000000100 dead000000000122 ffff88806ace5180 [ 29.387617] raw: 0000000000000000 00000000800c000c 00000001ffffffff 0000000000000000 [ 29.387624] page dumped because: kasan: bad access detected [ 29.387920] Memory state around the buggy address: [ 29.388771] ffff888067172080: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc [ 29.390062] ffff888067172100: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 29.391325] >ffff888067172180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.392578] ^ [ 29.393480] ffff888067172200: fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc [ 29.394744] ffff888067172280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 29.396003] ================================================================== [ 29.397260] Disabling lock debugging due to kernel taint io_sq_wq_submit_work free and read req again. Cc: Zhengyuan Liu Cc: linux-block@vger.kernel.org Cc: stable@vger.kernel.org Fixes: f7b76ac9d17e ("io_uring: fix counter inc/dec mismatch in async_list") Signed-off-by: Jackie Liu Signed-off-by: Jens Axboe fs/io_uring.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 740f05f30a8c49ec63668055d28feedd906d3c50 Author: Sven Schnelle Date: Tue Jul 23 22:37:54 2019 +0200 parisc: fix race condition in patching code Assume the following ftrace code sequence that was patched in earlier by ftrace_make_call(): PAGE A: ffc: addr of ftrace_caller() PAGE B: 000: 0x6fc10080 /* stw,ma r1,40(sp) */ 004: 0x48213fd1 /* ldw -18(r1),r1 */ 008: 0xe820c002 /* bv,n r0(r1) */ 00c: 0xe83f1fdf /* b,l,n .-c,r1 */ When a Code sequences that is to be patched spans a page break, we might have already cleared the part on the PAGE A. If an interrupt is coming in during the remap of the fixed mapping to PAGE B, it might execute the patched function with only parts of the FTRACE code cleared. To prevent this, clear the jump to our mini trampoline first, and clear the remaining parts after this. This might also happen when patch_text() patches a function that it calls during remap. Signed-off-by: Sven Schnelle Cc: # 5.2+ Signed-off-by: Helge Deller arch/parisc/kernel/ftrace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c5df04521b521f14c30de327aa1e880f1190a355 Author: Masahiro Yamada Date: Tue Jul 23 18:47:51 2019 +0900 parisc: rename default_defconfig to defconfig 'default_defconfig' is an awkward name since 'defconfig' is the default. Let's simply say 'defconfig' like other architectures. You can drop the KBUILD_DEFCONFIG define by following the standard naming. Signed-off-by: Masahiro Yamada Signed-off-by: Helge Deller arch/parisc/Makefile | 2 -- arch/parisc/configs/{default_defconfig => defconfig} | 0 2 files changed, 2 deletions(-) commit 73b886724747ea5fa599ada988fe0a30edcc2e00 Author: Helge Deller Date: Wed Jul 31 16:16:43 2019 +0200 parisc: Fix fall-through warnings in fpudispatch.c In fpudispatch.c we see a lot of fall-through warnings, but for this file we prefer to not mark the switches and instead keep it in it's original state as it's copied from HP-UX. Fixes: a035d552a93b ("Makefile: Globally enable fall-through warning") Signed-off-by: Helge Deller arch/parisc/math-emu/Makefile | 1 + 1 file changed, 1 insertion(+) commit 12d1402ce35a900b4273893b885ddf35dbea0571 Author: Helge Deller Date: Wed Jul 31 16:16:00 2019 +0200 parisc: Mark expected switch fall-throughs in fault.c Fix a fall-through warning in fault.c. Fixes: a035d552a93b ("Makefile: Globally enable fall-through warning") Signed-off-by: Helge Deller arch/parisc/mm/fault.c | 1 + 1 file changed, 1 insertion(+) commit e77ff779a0c6666b697c56a6e41972bbf30b977f Author: YueHaibing Date: Wed Jul 31 06:48:09 2019 -0700 Input: applespi - add dependency on LEDS_CLASS If applespi is enabled, but LEDs class support is not, the build fails: drivers/input/keyboard/applespi.o: In function `applespi_probe': applespi.c:(.text+0x1fcd): undefined reference to `devm_led_classdev_register_ext' Add "depends on LEDS_CLASS" to the Konfig Reported-by: Hulk Robot Fixes: 038b1a05eae6 ("Input: add Apple SPI keyboard and trackpad driver") Signed-off-by: YueHaibing Signed-off-by: Dmitry Torokhov drivers/input/keyboard/Kconfig | 1 + 1 file changed, 1 insertion(+) commit ed4289e8b48845888ee46377bd2b55884a55e60b Author: Michael Ellerman Date: Mon Jul 29 22:28:54 2019 +1000 Revert "powerpc: slightly improve cache helpers" This reverts commit 6c5875843b87c3adea2beade9d1b8b3d4523900a. It triggers a probable compiler bug on clang which leads to crashes. With GCC it allows the compiler to use a more efficient register allocation but current GCC versions never do that at any of the current call sites, so there's no benefit. Signed-off-by: Michael Ellerman arch/powerpc/include/asm/cache.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit d7e23b887f67178c4f840781be7a6aa6aeb52ab1 Author: Christophe Leroy Date: Wed Jul 31 06:01:42 2019 +0000 powerpc/kasan: fix early boot failure on PPC32 Due to commit 4a6d8cf90017 ("powerpc/mm: don't use pte_alloc_kernel() until slab is available on PPC32"), pte_alloc_kernel() cannot be used during early KASAN init. Fix it by using memblock_alloc() instead. Fixes: 2edb16efc899 ("powerpc/32: Add KASAN support") Cc: stable@vger.kernel.org # v5.2+ Reported-by: Erhard F. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/da89670093651437f27d2975224712e0a130b055.1564552796.git.christophe.leroy@c-s.fr arch/powerpc/mm/kasan/kasan_init_32.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 66f5772ee29db1062d5677a26e4e0ec9c6308c16 Merge: df612421fe25 71b256f8f7a5 Author: Kalle Valo Date: Wed Jul 31 14:51:55 2019 +0300 Merge tag 'iwlwifi-fixes-for-kvalo-2019-07-30' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes We have a lot of fixes, most of them are also applicable to stable. Notably: * fix use-after-free issues * fix DMA mapping API usage errors * fix frame drop occurring due to reorder buffer handling in RSS in certain conditions * fix rate scale locking issues * disable TX A-MSDU on older NICs as it causes problems and was never supposed to be supported * new PCI IDs * GEO_TX_POWER_LIMIT API issue that many people were hitting commit 7440ea8b2a4430eef5120d0a7faac6c39304ae6d Author: Stephen Rothwell Date: Tue Jul 30 14:37:04 2019 +1000 drivers/macintosh/smu.c: Mark expected switch fall-through Mark switch cases where we are expecting to fall through. This patch fixes the following warning (Building: powerpc): drivers/macintosh/smu.c: In function 'smu_queue_i2c': drivers/macintosh/smu.c:854:21: warning: this statement may fall through [-Wimplicit-fallthrough=] cmd->info.devaddr &= 0xfe; ~~~~~~~~~~~~~~~~~~^~~~~~~ drivers/macintosh/smu.c:855:2: note: here case SMU_I2C_TRANSFER_STDSUB: ^~~~ Fixes: 0365ba7fb1fa ("[PATCH] ppc64: SMU driver update & i2c support") Signed-off-by: Stephen Rothwell Reviewed-by: Kees Cook Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190730143704.060a2606@canb.auug.org.au drivers/macintosh/smu.c | 1 + 1 file changed, 1 insertion(+) commit b9da500bde81ad820b5d95c6bf52fc33e1f490ee Author: fengchunguo Date: Wed Jul 31 15:41:56 2019 +0800 ASoC: max98373: add 88200 and 96000 sampling rate support 88200 and 96000 sampling rate was not enabled on driver, so can't be played. The error information: max98373 3-0031:rate 96000 not supported max98373 3-0031:ASoC: can't set max98373-aif1 hw params: -22 Signed-off-by: fengchunguo Link: https://lore.kernel.org/r/20190731074156.5620-1-chunguo.feng@amlogic.com Signed-off-by: Mark Brown sound/soc/codecs/max98373.c | 6 ++++++ sound/soc/codecs/max98373.h | 2 ++ 2 files changed, 8 insertions(+) commit 52f87f3ca251f5e43b42e78ab9816b2b07718bfe Author: Marcus Cooper Date: Mon Jul 29 17:21:30 2019 +0200 ASoC: sun4i-i2s: Incorrect SR and WSS computation The A64 audio codec uses the original I2S block but the SR and WSS computation currently assigned is for the newer block. Fixes: 619c15f7fac9 (ASoC: sun4i-i2s: Change SR and WSS computation) Signed-off-by: Marcus Cooper Link: https://lore.kernel.org/r/20190729152130.27955-1-codekipper@gmail.com Signed-off-by: Mark Brown sound/soc/sunxi/sun4i-i2s.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6963d00bb6e42e91882d2eb36639701aca9fe032 Author: Cezary Rojewski Date: Fri Jul 26 20:15:17 2019 +0200 MAINTAINERS: Update Intel ASoC drivers maintainers Adding myself to Intel ASoC drivers maintainers list. Signed-off-by: Cezary Rojewski Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20190726181517.27655-1-cezary.rojewski@intel.com Signed-off-by: Mark Brown MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 6dee4829cfde106a8af7d0d3ba23022f8f054761 Author: Evan Quan Date: Mon Jul 22 10:42:29 2019 +0800 drm/amd/powerplay: correct UVD/VCE/VCN power status retrieval VCN should be used for Vega20 later ASICs while UVD and VCE are for previous ASICs. Signed-off-by: Evan Quan Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 56 ++++++++++++++++++++++------------ 1 file changed, 36 insertions(+), 20 deletions(-) commit a3ebbdb95f8c343a547ee2abec4d8abbf71f8a94 Author: Evan Quan Date: Mon Jul 22 10:27:21 2019 +0800 drm/amd/powerplay: correct Navi10 VCN powergate control (v2) No VCN DPM bit check as that's different from VCN PG. Also no extra check for possible double enablement/disablement as that's already done by VCN. v2: check return value of smu_feature_set_enabled Signed-off-by: Evan Quan Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) commit e21e3581e2a1df75abb96b545be15e526bd8c1c6 Author: Evan Quan Date: Mon Jul 22 09:57:27 2019 +0800 drm/amd/powerplay: support VCN powergate status retrieval for SW SMU Commonly used for VCN powergate status retrieval for SW SMU. Signed-off-by: Evan Quan Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 4 ++++ 1 file changed, 4 insertions(+) commit 201cd702b7012ecee2a613e09b6a227ca0e12504 Author: Evan Quan Date: Mon Jul 22 09:55:36 2019 +0800 drm/amd/powerplay: support VCN powergate status retrieval on Raven Enable VCN powergate status report on Raven. Signed-off-by: Evan Quan Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit a02709818f397e7ed7a0943d65a49d54b2752626 Author: Evan Quan Date: Mon Jul 22 09:51:59 2019 +0800 drm/amd/powerplay: add new sensor type for VCN powergate status VCN is widely used in new ASICs and different from tranditional UVD and VCE. Signed-off-by: Evan Quan Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/kgd_pp_interface.h | 1 + 1 file changed, 1 insertion(+) commit 929e571c04c285861e0bb049a396a2bdaea63282 Author: Wang Xiayang Date: Sat Jul 27 17:30:30 2019 +0800 drm/amdgpu: fix a potential information leaking bug Coccinelle reports a path that the array "data" is never initialized. The path skips the checks in the conditional branches when either of callback functions, read_wave_vgprs and read_wave_sgprs, is not registered. Later, the uninitialized "data" array is read in the while-loop below and passed to put_user(). Fix the path by allocating the array with kcalloc(). The patch is simplier than adding a fall-back branch that explicitly calls memset(data, 0, ...). Also it does not need the multiplication 1024*sizeof(*data) as the size parameter for memset() though there is no risk of integer overflow. Signed-off-by: Wang Xiayang Reviewed-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 67d0859e2758ef992fd32499747ce4b1038a63c0 Author: Christian König Date: Tue Jul 30 11:17:03 2019 +0200 drm/amdgpu: fix error handling in amdgpu_cs_process_fence_dep We always need to drop the ctx reference and should check for errors first and then dereference the fence pointer. Signed-off-by: Christian König Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) commit a78d14a31666c636a9e00a589032119fb59e3b94 Author: Arnd Bergmann Date: Mon Jul 22 09:46:29 2019 +0200 xen: avoid link error on ARM Building the privcmd code as a loadable module on ARM, we get a link error due to the private cache management functions: ERROR: "__sync_icache_dcache" [drivers/xen/xen-privcmd.ko] undefined! Move the code into a new that is always built in when Xen is enabled, as suggested by Juergen Gross and Boris Ostrovsky. Signed-off-by: Arnd Bergmann Reviewed-by: Stefano Stabellini Signed-off-by: Juergen Gross drivers/xen/privcmd.c | 35 +++++------------------------------ drivers/xen/xlate_mmu.c | 32 ++++++++++++++++++++++++++++++++ include/xen/xen-ops.h | 3 +++ 3 files changed, 40 insertions(+), 30 deletions(-) commit 8d1502f629c9966743de45744f4c1ba93a57d105 Author: Souptick Joarder Date: Wed Jul 31 00:04:56 2019 +0530 xen/gntdev.c: Replace vm_map_pages() with vm_map_pages_zero() 'commit df9bde015a72 ("xen/gntdev.c: convert to use vm_map_pages()")' breaks gntdev driver. If vma->vm_pgoff > 0, vm_map_pages() will: - use map->pages starting at vma->vm_pgoff instead of 0 - verify map->count against vma_pages()+vma->vm_pgoff instead of just vma_pages(). In practice, this breaks using a single gntdev FD for mapping multiple grants. relevant strace output: [pid 857] ioctl(7, IOCTL_GNTDEV_MAP_GRANT_REF, 0x7ffd3407b6d0) = 0 [pid 857] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_SHARED, 7, 0) = 0x777f1211b000 [pid 857] ioctl(7, IOCTL_GNTDEV_SET_UNMAP_NOTIFY, 0x7ffd3407b710) = 0 [pid 857] ioctl(7, IOCTL_GNTDEV_MAP_GRANT_REF, 0x7ffd3407b6d0) = 0 [pid 857] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_SHARED, 7, 0x1000) = -1 ENXIO (No such device or address) details here: https://github.com/QubesOS/qubes-issues/issues/5199 The reason is -> ( copying Marek's word from discussion) vma->vm_pgoff is used as index passed to gntdev_find_map_index. It's basically using this parameter for "which grant reference to map". map struct returned by gntdev_find_map_index() describes just the pages to be mapped. Specifically map->pages[0] should be mapped at vma->vm_start, not vma->vm_start+vma->vm_pgoff*PAGE_SIZE. When trying to map grant with index (aka vma->vm_pgoff) > 1, __vm_map_pages() will refuse to map it because it will expect map->count to be at least vma_pages(vma)+vma->vm_pgoff, while it is exactly vma_pages(vma). Converting vm_map_pages() to use vm_map_pages_zero() will fix the problem. Marek has tested and confirmed the same. Cc: stable@vger.kernel.org # v5.2+ Fixes: df9bde015a72 ("xen/gntdev.c: convert to use vm_map_pages()") Reported-by: Marek Marczykowski-Górecki Signed-off-by: Souptick Joarder Tested-by: Marek Marczykowski-Górecki Reviewed-by: Boris Ostrovsky Signed-off-by: Juergen Gross drivers/xen/gntdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f0bc1ee473fefd4d9f2ace9fad1cefdc0b7f6fdd Author: Evan Quan Date: Thu Jul 25 10:12:42 2019 +0800 drm/amd/powerplay: enable SW SMU reset functionality Move SMU irq handler register to sw_init as that's totally software related. Otherwise, it will prevent SMU reset working. Signed-off-by: Evan Quan Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 479156f2e5540077377a823eaf5a4263bd329063 Author: Evan Quan Date: Thu Jul 25 12:10:34 2019 +0800 drm/amd/powerplay: fix null pointer dereference around dpm state relates DPM state relates are not supported on the new SW SMU ASICs. But still it's not OK to trigger null pointer dereference on accessing them. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 18 +++++++++++++----- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 3 ++- 2 files changed, 15 insertions(+), 6 deletions(-) commit 090efd946d00cd23ce4ac25bce125f408b704d7d Author: Alex Deucher Date: Thu Jul 25 22:28:58 2019 -0500 drm/amdgpu/powerplay: use proper revision id for navi The PCI revision id determines the sku. Reviewed-by: Feifei Xu Reviewed-by: Kevin Wang Reviewed-by: Evan Quan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 45a660143bf90a35ab64df663b88d82c02a17091 Author: Kevin Wang Date: Tue Jul 23 19:56:52 2019 +0800 drm/amd/powerplay: fix temperature granularity error in smu11 in this patch, drm/amd/powerplay: add callback function of get_thermal_temperature_range the driver missed temperature granularity change on other temperature. Signed-off-by: Kevin Wang Reviewed-by: Evan Quan Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 2c0f07fe3ca57c8fb4ee179c9fb50d6eba75349e Author: Kevin Wang Date: Mon Jun 3 15:58:31 2019 +0800 drm/amd/powerplay: add callback function of get_thermal_temperature_range 1. the thermal temperature is asic related data, move the code logic to xxx_ppt.c. 2. replace data structure PP_TemperatureRange with smu_temperature_range. 3. change temperature uint from temp*1000 to temp (temperature uint). Signed-off-by: Kevin Wang Signed-off-by: Kenneth Feng Acked-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 1 - drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 17 +++++++++++++ drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 18 +++++++++----- drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 34 +++++++++----------------- 4 files changed, 40 insertions(+), 30 deletions(-) commit d65848657c3da5c0d4b685f823d0230f151ab34e Author: Kent Russell Date: Tue Jul 23 10:18:01 2019 -0400 drm/amdkfd: Fix byte align on VegaM This was missed during the addition of VegaM support Reviewed-by: Alex Deucher Signed-off-by: Kent Russell Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6c77221df96177da0520847ce91e33f539fb8b2d Author: Changbin Du Date: Tue Jul 30 22:08:50 2019 +0800 fgraph: Remove redundant ftrace_graph_notrace_addr() test We already have tested it before. The second one should be removed. With this change, the performance should have little improvement. Link: http://lkml.kernel.org/r/20190730140850.7927-1-changbin.du@gmail.com Cc: stable@vger.kernel.org Fixes: 9cd2992f2d6c ("fgraph: Have set_graph_notrace only affect function_graph tracer") Signed-off-by: Changbin Du Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_functions_graph.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit b1d45c23284e55a379f85554a27a548b7988d47a Author: Masahiro Yamada Date: Sat Jul 20 19:39:43 2019 +0900 tracing: Fix header include guards in trace event headers These include guards are broken. Match the #if !define() and #define lines so that they work correctly. Link: http://lkml.kernel.org/r/20190720103943.16982-1-yamada.masahiro@socionext.com Fixes: f54d1867005c3 ("dma-buf: Rename struct fence to dma_fence") Fixes: 2e26ca7150a4f ("tracing: Fix tracepoint.h DECLARE_TRACE() to allow more than one header") Fixes: e543002f77f46 ("qdisc: add tracepoint qdisc:qdisc_dequeue for dequeued SKBs") Fixes: 95f295f9fe081 ("dmaengine: tegra: add tracepoints to driver") Signed-off-by: Masahiro Yamada Signed-off-by: Steven Rostedt (VMware) include/trace/events/dma_fence.h | 2 +- include/trace/events/napi.h | 4 ++-- include/trace/events/qdisc.h | 4 ++-- include/trace/events/tegra_apb_dma.h | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) commit 4010b622f1d2a6112244101f38225eaee20c07f2 Merge: 629f8205a6cc 61c30c98ef17 Author: Linus Torvalds Date: Tue Jul 30 17:32:46 2019 -0700 Merge branch 'dax-fix-5.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull dax fix from Dan Williams: "Fix a botched manual patch update that got dropped between testing and application" * 'dax-fix-5.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: dax: Fix missed wakeup in put_unlocked_entry() commit 9c50a98f55f4b123227eebb25009524d20bc4c2a Author: Mike Snitzer Date: Tue Jul 30 14:39:43 2019 -0400 dm table: fix various whitespace issues with recent DAX code Also, rename device_synchronous to device_dax_synchronous. Signed-off-by: Mike Snitzer drivers/md/dm-table.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 5348deb138abb90ca8f728356772e38abc791cf9 Author: Pankaj Gupta Date: Tue Jul 30 17:07:08 2019 +0530 dm table: fix dax_dev NULL dereference in device_synchronous() If a device doesn't support DAX its 'dax_dev' is NULL. Fix device_synchronous() to first check if dax_dev is NULL before dereferencing it. Fixes: 2e9ee0955d3c ("dm: enable synchronous dax") Reported-by: jencce.kernel@gmail.com Signed-off-by: Pankaj Gupta Acked-by: Dan Williams Signed-off-by: Mike Snitzer drivers/md/dm-table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 33a58980ff3cc5dbf0bb1b325746ac69223eda0b Author: Thomas Gleixner Date: Sun Jul 28 15:12:56 2019 +0200 arm64: compat: vdso: Use legacy syscalls as fallback The generic VDSO implementation uses the Y2038 safe clock_gettime64() and clock_getres_time64() syscalls as fallback for 32bit VDSO. This breaks seccomp setups because these syscalls might be not (yet) allowed. Implement the 32bit variants which use the legacy syscalls and select the variant in the core library. The 64bit time variants are not removed because they are required for the time64 based vdso accessors. Fixes: 00b26474c2f1 ("lib/vdso: Provide generic VDSO implementation") Reported-by: Sean Christopherson Reported-by: Paul Bolle Suggested-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Tested-by: Vincenzo Frascino Reviewed-by: Vincenzo Frascino Link: https://lkml.kernel.org/r/20190728131648.971361611@linutronix.de arch/arm64/include/asm/vdso/compat_gettimeofday.h | 40 +++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit d2f5d3fa26196183adb44a413c44caa9872275b4 Author: Thomas Gleixner Date: Sun Jul 28 15:12:55 2019 +0200 x86/vdso/32: Use 32bit syscall fallback The generic VDSO implementation uses the Y2038 safe clock_gettime64() and clock_getres_time64() syscalls as fallback for 32bit VDSO. This breaks seccomp setups because these syscalls might be not (yet) allowed. Implement the 32bit variants which use the legacy syscalls and select the variant in the core library. The 64bit time variants are not removed because they are required for the time64 based vdso accessors. Fixes: 7ac870747988 ("x86/vdso: Switch to generic vDSO implementation") Reported-by: Sean Christopherson Reported-by: Paul Bolle Suggested-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Reviewed-by: Vincenzo Frascino Reviewed-by: Andy Lutomirski Link: https://lkml.kernel.org/r/20190728131648.879156507@linutronix.de arch/x86/include/asm/vdso/gettimeofday.h | 36 ++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit c60a32ea4f459f99b98d383cad3b1ac7cfb3f4be Author: Thomas Gleixner Date: Tue Jul 30 11:38:50 2019 +0200 lib/vdso/32: Provide legacy syscall fallbacks To address the regression which causes seccomp to deny applications the access to clock_gettime64() and clock_getres64() syscalls because they are not enabled in the existing filters. That trips over the fact that 32bit VDSOs use the new clock_gettime64() and clock_getres64() syscalls in the fallback path. Add a conditional to invoke the 32bit legacy fallback syscalls instead of the new 64bit variants. The conditional can go away once all architectures are converted. Fixes: 00b26474c2f1 ("lib/vdso: Provide generic VDSO implementation") Signed-off-by: Thomas Gleixner Tested-by: Sean Christopherson Reviewed-by: Sean Christopherson Link: https://lkml.kernel.org/r/alpine.DEB.2.21.1907301134470.1738@nanos.tec.linutronix.de lib/vdso/gettimeofday.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 502a590a170b3b3d0ad998ee0b639ac0b3db1dfa Author: Thomas Gleixner Date: Sun Jul 28 15:12:53 2019 +0200 lib/vdso: Move fallback invocation to the callers To allow syscall fallbacks using the legacy 32bit syscall for 32bit VDSO builds, move the fallback invocation out into the callers. Split the common code out of __cvdso_clock_gettime/getres() and invoke the syscall fallback in the 64bit and 32bit variants. Preparatory work for using legacy syscalls in 32bit VDSO. No functional change. Fixes: 00b26474c2f1 ("lib/vdso: Provide generic VDSO implementation") Signed-off-by: Thomas Gleixner Tested-by: Vincenzo Frascino Reviewed-by: Andy Lutomirski Reviewed-by: Vincenzo Frascino Link: https://lkml.kernel.org/r/20190728131648.695579736@linutronix.de lib/vdso/gettimeofday.c | 53 +++++++++++++++++++++++++++++++++---------------- 1 file changed, 36 insertions(+), 17 deletions(-) commit a9446a906f52292c52ecbd5be78eaa4d8395756c Author: Thomas Gleixner Date: Sun Jul 28 15:12:52 2019 +0200 lib/vdso/32: Remove inconsistent NULL pointer checks The 32bit variants of vdso_clock_gettime()/getres() have a NULL pointer check for the timespec pointer. That's inconsistent vs. 64bit. But the vdso implementation will never be consistent versus the syscall because the only case which it can handle is NULL. Any other invalid pointer will cause a segfault. So special casing NULL is not really useful. Remove it along with the superflouos syscall fallback invocation as that will return -EFAULT anyway. That also gets rid of the dubious typecast which only works because the pointer is NULL. Fixes: 00b26474c2f1 ("lib/vdso: Provide generic VDSO implementation") Signed-off-by: Thomas Gleixner Tested-by: Vincenzo Frascino Reviewed-by: Vincenzo Frascino Reviewed-by: Andy Lutomirski Link: https://lkml.kernel.org/r/20190728131648.587523358@linutronix.de lib/vdso/gettimeofday.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) commit abb48f801396ba312e95f3c11072425221ce7401 Author: xiaofeis Date: Sun Jul 28 08:57:50 2019 +0800 net: dsa: qca8k: enable port flow control Set phy device advertising to enable MAC flow control. Signed-off-by: Xiaofei Shen Signed-off-by: David S. Miller drivers/net/dsa/qca8k.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit fbb01c52471c8fb4ec2422c0ab26c134bd90bbff Author: Joe Lawrence Date: Thu Jul 18 16:29:48 2019 -0400 selftests/livepatch: push and pop dynamic debug config The livepatching self-tests tweak the dynamic debug config to verify the kernel log during the tests. Enhance set_dynamic_debug() so that the config changes are restored when the script exits. Note this functionality needs to keep in sync with: - dynamic_debug input/output formatting - functions affected by set_dynamic_debug() For example, push_dynamic_debug() transforms: kernel/livepatch/transition.c:530 [livepatch]klp_init_transition =_ "'%s': initializing %s transition\012" to the following: file kernel/livepatch/transition.c line 530 =_ Signed-off-by: Joe Lawrence Tested-by: Petr Mladek Signed-off-by: Shuah Khan tools/testing/selftests/livepatch/functions.sh | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) commit fc2e634e997d84f2610a482b500865ef2c04fcde Author: Aleksa Sarai Date: Sat Jul 20 10:03:32 2019 +1000 kselftest: save-and-restore errno to allow for %m formatting Previously, using "%m" in a ksft_* format string can result in strange output because the errno value wasn't saved before calling other libc functions. The solution is to simply save and restore the errno before we format the user-supplied format string. Signed-off-by: Aleksa Sarai Signed-off-by: Shuah Khan tools/testing/selftests/kselftest.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 055d88242a6046a1ceac3167290f054c72571cd9 Author: Arnd Bergmann Date: Tue Jul 30 21:25:20 2019 +0200 compat_ioctl: pppoe: fix PPPOEIOCSFWD handling Support for handling the PPPOEIOCSFWD ioctl in compat mode was added in linux-2.5.69 along with hundreds of other commands, but was always broken sincen only the structure is compatible, but the command number is not, due to the size being sizeof(size_t), or at first sizeof(sizeof((struct sockaddr_pppox)), which is different on 64-bit architectures. Guillaume Nault adds: And the implementation was broken until 2016 (see 29e73269aa4d ("pppoe: fix reference counting in PPPoE proxy")), and nobody ever noticed. I should probably have removed this ioctl entirely instead of fixing it. Clearly, it has never been used. Fix it by adding a compat_ioctl handler for all pppoe variants that translates the command number and then calls the regular ioctl function. All other ioctl commands handled by pppoe are compatible between 32-bit and 64-bit, and require compat_ptr() conversion. This should apply to all stable kernels. Acked-by: Guillaume Nault Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ppp/pppoe.c | 3 +++ drivers/net/ppp/pppox.c | 13 +++++++++++++ drivers/net/ppp/pptp.c | 3 +++ fs/compat_ioctl.c | 3 --- include/linux/if_pppox.h | 3 +++ net/l2tp/l2tp_ppp.c | 3 +++ 6 files changed, 25 insertions(+), 3 deletions(-) commit 2948a1fcd77a8bb11604387e3fc52f0ebf5729e9 Author: Jon Maloy Date: Tue Jul 30 20:19:10 2019 +0200 tipc: fix unitilized skb list crash Our test suite somtimes provokes the following crash: Description of problem: [ 1092.597234] BUG: unable to handle kernel NULL pointer dereference at 00000000000000e8 [ 1092.605072] PGD 0 P4D 0 [ 1092.607620] Oops: 0000 [#1] SMP PTI [ 1092.611118] CPU: 37 PID: 0 Comm: swapper/37 Kdump: loaded Not tainted 4.18.0-122.el8.x86_64 #1 [ 1092.619724] Hardware name: Dell Inc. PowerEdge R740/08D89F, BIOS 1.3.7 02/08/2018 [ 1092.627215] RIP: 0010:tipc_mcast_filter_msg+0x93/0x2d0 [tipc] [ 1092.632955] Code: 0f 84 aa 01 00 00 89 cf 4d 01 ca 4c 8b 26 c1 ef 19 83 e7 0f 83 ff 0c 4d 0f 45 d1 41 8b 6a 10 0f cd 4c 39 e6 0f 84 81 01 00 00 <4d> 8b 9c 24 e8 00 00 00 45 8b 13 41 0f ca 44 89 d7 c1 ef 13 83 e7 [ 1092.651703] RSP: 0018:ffff929e5fa83a18 EFLAGS: 00010282 [ 1092.656927] RAX: ffff929e3fb38100 RBX: 00000000069f29ee RCX: 00000000416c0045 [ 1092.664058] RDX: ffff929e5fa83a88 RSI: ffff929e31a28420 RDI: 0000000000000000 [ 1092.671209] RBP: 0000000029b11821 R08: 0000000000000000 R09: ffff929e39b4407a [ 1092.678343] R10: ffff929e39b4407a R11: 0000000000000007 R12: 0000000000000000 [ 1092.685475] R13: 0000000000000001 R14: ffff929e3fb38100 R15: ffff929e39b4407a [ 1092.692614] FS: 0000000000000000(0000) GS:ffff929e5fa80000(0000) knlGS:0000000000000000 [ 1092.700702] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1092.706447] CR2: 00000000000000e8 CR3: 000000031300a004 CR4: 00000000007606e0 [ 1092.713579] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 1092.720712] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 1092.727843] PKRU: 55555554 [ 1092.730556] Call Trace: [ 1092.733010] [ 1092.735034] tipc_sk_filter_rcv+0x7ca/0xb80 [tipc] [ 1092.739828] ? __kmalloc_node_track_caller+0x1cb/0x290 [ 1092.744974] ? dev_hard_start_xmit+0xa5/0x210 [ 1092.749332] tipc_sk_rcv+0x389/0x640 [tipc] [ 1092.753519] tipc_sk_mcast_rcv+0x23c/0x3a0 [tipc] [ 1092.758224] tipc_rcv+0x57a/0xf20 [tipc] [ 1092.762154] ? ktime_get_real_ts64+0x40/0xe0 [ 1092.766432] ? tpacket_rcv+0x50/0x9f0 [ 1092.770098] tipc_l2_rcv_msg+0x4a/0x70 [tipc] [ 1092.774452] __netif_receive_skb_core+0xb62/0xbd0 [ 1092.779164] ? enqueue_entity+0xf6/0x630 [ 1092.783084] ? kmem_cache_alloc+0x158/0x1c0 [ 1092.787272] ? __build_skb+0x25/0xd0 [ 1092.790849] netif_receive_skb_internal+0x42/0xf0 [ 1092.795557] napi_gro_receive+0xba/0xe0 [ 1092.799417] mlx5e_handle_rx_cqe+0x83/0xd0 [mlx5_core] [ 1092.804564] mlx5e_poll_rx_cq+0xd5/0x920 [mlx5_core] [ 1092.809536] mlx5e_napi_poll+0xb2/0xce0 [mlx5_core] [ 1092.814415] ? __wake_up_common_lock+0x89/0xc0 [ 1092.818861] net_rx_action+0x149/0x3b0 [ 1092.822616] __do_softirq+0xe3/0x30a [ 1092.826193] irq_exit+0x100/0x110 [ 1092.829512] do_IRQ+0x85/0xd0 [ 1092.832483] common_interrupt+0xf/0xf [ 1092.836147] [ 1092.838255] RIP: 0010:cpuidle_enter_state+0xb7/0x2a0 [ 1092.843221] Code: e8 3e 79 a5 ff 80 7c 24 03 00 74 17 9c 58 0f 1f 44 00 00 f6 c4 02 0f 85 d7 01 00 00 31 ff e8 a0 6b ab ff fb 66 0f 1f 44 00 00 <48> b8 ff ff ff ff f3 01 00 00 4c 29 f3 ba ff ff ff 7f 48 39 c3 7f [ 1092.861967] RSP: 0018:ffffaa5ec6533e98 EFLAGS: 00000246 ORIG_RAX: ffffffffffffffdd [ 1092.869530] RAX: ffff929e5faa3100 RBX: 000000fe63dd2092 RCX: 000000000000001f [ 1092.876665] RDX: 000000fe63dd2092 RSI: 000000003a518aaa RDI: 0000000000000000 [ 1092.883795] RBP: 0000000000000003 R08: 0000000000000004 R09: 0000000000022940 [ 1092.890929] R10: 0000040cb0666b56 R11: ffff929e5faa20a8 R12: ffff929e5faade78 [ 1092.898060] R13: ffffffffb59258f8 R14: 000000fe60f3228d R15: 0000000000000000 [ 1092.905196] ? cpuidle_enter_state+0x92/0x2a0 [ 1092.909555] do_idle+0x236/0x280 [ 1092.912785] cpu_startup_entry+0x6f/0x80 [ 1092.916715] start_secondary+0x1a7/0x200 [ 1092.920642] secondary_startup_64+0xb7/0xc0 [...] The reason is that the skb list tipc_socket::mc_method.deferredq only is initialized for connectionless sockets, while nothing stops arriving multicast messages from being filtered by connection oriented sockets, with subsequent access to the said list. We fix this by initializing the list unconditionally at socket creation. This eliminates the crash, while the message still is dropped further down in tipc_sk_filter_rcv() as it should be. Reported-by: Li Shuang Signed-off-by: Jon Maloy Reviewed-by: Xin Long Signed-off-by: David S. Miller net/tipc/socket.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 629f8205a6cc63d2e8e30956bad958a3507d018f Merge: 0572d7668a58 30b692d3b390 Author: Linus Torvalds Date: Tue Jul 30 13:25:14 2019 -0700 Merge tag 'for-linus-20190730' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux Pull pidfd fixes from Christian Brauner: "This makes setting the exit_state in exit_notify() consistent after fixing the pidfd polling race pre-rc1. Related to the race fix, this adds a WARN_ON() to do_notify_pidfd() to catch any future exit_state races. Last, this removes an obsolete comment from the pidfd tests" * tag 'for-linus-20190730' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux: exit: make setting exit_state consistent pidfd: Add warning if exit_state is 0 during notification pidfd: remove obsolete comments from test commit 0572d7668a58794059030b88945f78dfb94e3325 Merge: 2f6f0a996218 38fb6d0ea342 Author: Linus Torvalds Date: Tue Jul 30 13:15:39 2019 -0700 Merge tag 'f2fs-for-5.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs Pull f2fs fixes from Jaegeuk Kim: "This set of patches adjust to follow recent setflags changes and fix two regressions" * tag 'f2fs-for-5.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: f2fs: use EINVAL for superblock with invalid magic f2fs: fix to read source block before invalidating it f2fs: remove redundant check from f2fs_setflags_common() f2fs: use generic checking function for FS_IOC_FSSETXATTR f2fs: use generic checking and prep function for FS_IOC_SETFLAGS commit 2f6f0a996218cdd9d275aac41828f54367e6fa28 Merge: 32a024b9a9f3 527d37e9e575 Author: Linus Torvalds Date: Tue Jul 30 13:10:07 2019 -0700 Merge tag 'linux-kselftest-5.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull kselftest fixes from Shuah Khan: "Minor fixes to tests and one major fix to livepatch test to add skip handling to avoid false fail reports when livepatch is disabled" * tag 'linux-kselftest-5.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests/livepatch: add test skip handling selftests: mlxsw: Fix typo in qos_mc_aware.sh selftests/x86: fix spelling mistake "FAILT" -> "FAIL" selftests: kmod: Fix typo in kmod.sh commit 32a024b9a9f3b40f84bc55a6dd35eaa770ea26a4 Merge: 515f12b9eeed b7165bd0d6cb Author: Linus Torvalds Date: Tue Jul 30 13:01:04 2019 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fixes from Jason Gunthorpe: "A few regression and bug fixes for the patches merged in the last cycle: - hns fixes a subtle crash from the ib core SGL rework - hfi1 fixes various error handling, oops and protocol errors - bnxt_re fixes a regression where nvmeof doesn't work on some configurations - mlx5 fixes a serious 'use after free' bug in how MR caching is handled - some edge case crashers in the new statistic core code - more siw static checker fixups" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: IB/mlx5: Fix RSS Toeplitz setup to be aligned with the HW specification IB/counters: Always initialize the port counter object IB/core: Fix querying total rdma stats IB/mlx5: Prevent concurrent MR updates during invalidation IB/mlx5: Fix clean_mr() to work in the expected order IB/mlx5: Move MRs to a kernel PD when freeing them to the MR cache IB/mlx5: Use direct mkey destroy command upon UMR unreg failure IB/mlx5: Fix unreg_umr to ignore the mkey state RDMA/siw: Remove set but not used variables 'rv' IB/mlx5: Replace kfree with kvfree RDMA/bnxt_re: Honor vlan_id in GID entry comparison IB/hfi1: Drop all TID RDMA READ RESP packets after r_next_psn IB/hfi1: Field not zero-ed when allocating TID flow memory IB/hfi1: Unreserve a flushed OPFN request IB/hfi1: Check for error on call to alloc_rsm_map_table RDMA/hns: Fix sg offset non-zero issue RDMA/siw: Fix error return code in siw_init_module() commit 515f12b9eeed35250d793b7c874707c33f7f6e05 Merge: 2a11c76e5301 de4ee728465f Author: Linus Torvalds Date: Tue Jul 30 12:54:44 2019 -0700 Merge tag 'for-linus-hmm' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull HMM fixes from Jason Gunthorpe: "Fix the locking around nouveau's use of the hmm_range_* APIs. It works correctly in the success case, but many of the the edge cases have missing unlocks or double unlocks. The diffstat is a bit big as Christoph did a comprehensive job to move the obsolete API from the core header and into the driver before fixing its flow, but the risk of regression from this code motion is low" * tag 'for-linus-hmm' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: nouveau: unlock mmap_sem on all errors from nouveau_range_fault nouveau: remove the block parameter to nouveau_range_fault mm/hmm: move hmm_vma_range_done and hmm_vma_fault to nouveau mm/hmm: always return EBUSY for invalid ranges in hmm_range_{fault,snapshot} commit 89e524c04fa966330e2e80ab2bc50b9944c5847a Author: Jan Kara Date: Tue Jul 30 13:10:14 2019 +0200 loop: Fix mount(2) failure due to race with LOOP_SET_FD Commit 33ec3e53e7b1 ("loop: Don't change loop device under exclusive opener") made LOOP_SET_FD ioctl acquire exclusive block device reference while it updates loop device binding. However this can make perfectly valid mount(2) fail with EBUSY due to racing LOOP_SET_FD holding temporarily the exclusive bdev reference in cases like this: for i in {a..z}{a..z}; do dd if=/dev/zero of=$i.image bs=1k count=0 seek=1024 mkfs.ext2 $i.image mkdir mnt$i done echo "Run" for i in {a..z}{a..z}; do mount -o loop -t ext2 $i.image mnt$i & done Fix the problem by not getting full exclusive bdev reference in LOOP_SET_FD but instead just mark the bdev as being claimed while we update the binding information. This just blocks new exclusive openers instead of failing them with EBUSY thus fixing the problem. Fixes: 33ec3e53e7b1 ("loop: Don't change loop device under exclusive opener") Cc: stable@vger.kernel.org Tested-by: Kai-Heng Feng Signed-off-by: Jan Kara Signed-off-by: Jens Axboe drivers/block/loop.c | 16 +++++----- fs/block_dev.c | 83 ++++++++++++++++++++++++++++++++++++---------------- include/linux/fs.h | 6 ++++ 3 files changed, 73 insertions(+), 32 deletions(-) commit 740ce365a4dccc1df4d05219cd5bf68f01359196 Author: Rob Herring Date: Tue Jul 30 08:49:34 2019 -0600 dt-bindings: Fix generated example files getting added to schemas Commit 837158b847a4 ("dt-bindings: Check the examples against the schemas") started generating YAML encoded DT files to validate the examples against the schema. When running 'make dt_binding_check' in tree after the 1st time, the generated example .dt.yaml files are mistakenly added to the list of schema files. Exclude *.example.dt.yaml files from the search for schema files. Fixes: 837158b847a4 ("dt-bindings: Check the examples against the schemas") Reported-by: Guido Günther Tested-by: Guido Günther Signed-off-by: Rob Herring Documentation/devicetree/bindings/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit afa1d96d1430c2138c545fb76e6dcb21222098d4 Author: Jia-Ju Bai Date: Tue Jul 30 11:28:20 2019 -0700 xfs: Fix possible null-pointer dereferences in xchk_da_btree_block_check_sibling() In xchk_da_btree_block_check_sibling(), there is an if statement on line 274 to check whether ds->state->altpath.blk[level].bp is NULL: if (ds->state->altpath.blk[level].bp) When ds->state->altpath.blk[level].bp is NULL, it is used on line 281: xfs_trans_brelse(..., ds->state->altpath.blk[level].bp); struct xfs_buf_log_item *bip = bp->b_log_item; ASSERT(bp->b_transp == tp); Thus, possible null-pointer dereferences may occur. To fix these bugs, ds->state->altpath.blk[level].bp is checked before being used. These bugs are found by a static analysis tool STCheck written by us. Signed-off-by: Jia-Ju Bai Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/scrub/dabtree.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 30b692d3b390c6fe78a5064be0c4bbd44a41be59 Author: Christian Brauner Date: Mon Jul 29 17:48:24 2019 +0200 exit: make setting exit_state consistent Since commit b191d6491be6 ("pidfd: fix a poll race when setting exit_state") we unconditionally set exit_state to EXIT_ZOMBIE before calling into do_notify_parent(). This was done to eliminate a race when querying exit_state in do_notify_pidfd(). Back then we decided to do the absolute minimal thing to fix this and not touch the rest of the exit_notify() function where exit_state is set. Since this fix has not caused any issues change the setting of exit_state to EXIT_DEAD in the autoreap case to account for the fact hat exit_state is set to EXIT_ZOMBIE unconditionally. This fix was planned but also explicitly requested in [1] and makes the whole code more consistent. /* References */ [1]: https://lore.kernel.org/lkml/CAHk-=wigcxGFR2szue4wavJtH5cYTTeNES=toUBVGsmX0rzX+g@mail.gmail.com Signed-off-by: Christian Brauner Acked-by: Oleg Nesterov Cc: Linus Torvalds kernel/exit.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit fac7b714c514fcc555541e1d6450c694b0a5f8d3 Author: Nishad Kamdar Date: Fri Jul 26 19:58:45 2019 +0530 intel_th: Use the correct style for SPDX License Identifier This patch corrects the SPDX License Identifier style in header files related to Drivers for Intel(R) Trace Hub controller. For C header files Documentation/process/license-rules.rst mandates C-like comments (opposed to C source files where C++ style should be used) Changes made by using a script provided by Joe Perches here: https://lkml.org/lkml/2019/2/7/46 Suggested-by: Joe Perches Signed-off-by: Nishad Kamdar Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/intel_th/msu.h | 2 +- drivers/hwtracing/intel_th/pti.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit a17c42f968969fbd5c34befef933bbdb81205c33 Merge: 5f4e4203add2 c69565ee6681 Author: David S. Miller Date: Tue Jul 30 10:31:25 2019 -0700 Merge tag 'rxrpc-fixes-20190730' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== Here are a couple of fixes for rxrpc: (1) Fix a potential deadlock in the peer keepalive dispatcher. (2) Fix a missing notification when a UDP sendmsg error occurs in rxrpc. ==================== Signed-off-by: David S. Miller commit 5f4e4203add2b860d2345312509a160f8292063b Author: YueHaibing Date: Tue Jul 30 22:29:59 2019 +0800 enetc: Fix build error without PHYLIB If PHYLIB is not set, build enetc will fails: drivers/net/ethernet/freescale/enetc/enetc.o: In function `enetc_open': enetc.c: undefined reference to `phy_disconnect' enetc.c: undefined reference to `phy_start' drivers/net/ethernet/freescale/enetc/enetc.o: In function `enetc_close': enetc.c: undefined reference to `phy_stop' enetc.c: undefined reference to `phy_disconnect' drivers/net/ethernet/freescale/enetc/enetc_ethtool.o: undefined reference to `phy_ethtool_get_link_ksettings' drivers/net/ethernet/freescale/enetc/enetc_ethtool.o: undefined reference to `phy_ethtool_set_link_ksettings' drivers/net/ethernet/freescale/enetc/enetc_mdio.o: In function `enetc_mdio_probe': enetc_mdio.c: undefined reference to `mdiobus_alloc_size' enetc_mdio.c: undefined reference to `mdiobus_free' Reported-by: Hulk Robot Fixes: d4fd0404c1c9 ("enetc: Introduce basic PF and VF ENETC ethernet drivers") Signed-off-by: YueHaibing Acked-by: Claudiu Manoil Signed-off-by: David S. Miller drivers/net/ethernet/freescale/enetc/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 3caa61c208753492fe59efb20e06f7c608eb8db2 Author: Jose Abreu Date: Tue Jul 30 15:57:16 2019 +0200 net: stmmac: Sync RX Buffer upon allocation With recent changes that introduced support for Page Pool in stmmac, Jon reported that NFS boot was no longer working on an ARM64 based platform that had the IP behind an IOMMU. As Page Pool API does not guarantee DMA syncing because of the use of DMA_ATTR_SKIP_CPU_SYNC flag, we have to explicit sync the whole buffer upon re-allocation because we are always re-using same pages. In fact, ARM64 code invalidates the DMA area upon two situations [1]: - sync_single_for_cpu(): Invalidates if direction != DMA_TO_DEVICE - sync_single_for_device(): Invalidates if direction == DMA_FROM_DEVICE So, as we must invalidate both the current RX buffer and the newly allocated buffer we propose this fix. [1] arch/arm64/mm/cache.S Reported-by: Jon Hunter Tested-by: Jon Hunter Fixes: 2af6106ae949 ("net: stmmac: Introducing support for Page Pool") Signed-off-by: Jose Abreu Tested-by: Ezequiel Garcia Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 2ad07086a557efdd80dd036f7b843bd3c51b81c2 Author: Colin Ian King Date: Tue Jul 30 12:47:52 2019 +0100 mlxsw: spectrum_ptp: fix duplicated check on orig_egr_types Currently are duplicated checks on orig_egr_types which are redundant, I believe this is a typo and should actually be orig_ing_types || orig_egr_types instead of the expression orig_egr_types || orig_egr_types. Fix these. Addresses-Coverity: ("Same on both sides") Fixes: c6b36bdd04b5 ("mlxsw: spectrum_ptp: Increase parsing depth when PTP is enabled") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 43c8e0ae76bdcb5c00b381c294c176b373316c8d Author: Hubert Feurstein Date: Tue Jul 30 12:11:42 2019 +0200 net: dsa: mv88e6xxx: use link-down-define instead of plain value Using the define here makes the code more expressive. Signed-off-by: Hubert Feurstein Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ab98c008ac761752cdc27f9eb053419feadeb2f7 Author: Hubert Feurstein Date: Tue Jul 30 11:46:23 2019 +0200 net: phy: fixed_phy: print gpio error only if gpio node is present It is perfectly ok to not have an gpio attached to the fixed-link node. So the driver should not throw an error message when the gpio is missing. Fixes: 5468e82f7034 ("net: phy: fixed-phy: Drop GPIO from fixed_phy_add()") Signed-off-by: Hubert Feurstein Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/fixed_phy.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e82f04ec6ba91065fd33a6201ffd7cab840e1475 Author: Jia-Ju Bai Date: Mon Jul 29 16:44:51 2019 +0800 scsi: qla2xxx: Fix possible fcport null-pointer dereferences In qla2x00_alloc_fcport(), fcport is assigned to NULL in the error handling code on line 4880: fcport = NULL; Then fcport is used on lines 4883-4886: INIT_WORK(&fcport->del_work, qla24xx_delete_sess_fn); INIT_WORK(&fcport->reg_work, qla_register_fcport_fn); INIT_LIST_HEAD(&fcport->gnl_entry); INIT_LIST_HEAD(&fcport->list); Thus, possible null-pointer dereferences may occur. To fix these bugs, qla2x00_alloc_fcport() directly returns NULL in the error handling code. These bugs are found by a static analysis tool STCheck written by us. Signed-off-by: Jia-Ju Bai Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit df9a606184bfdb5ae3ca9d226184e9489f5c24f7 Author: Suganath Prabu Date: Tue Jul 30 03:43:57 2019 -0400 scsi: mpt3sas: Use 63-bit DMA addressing on SAS35 HBA Although SAS3 & SAS3.5 IT HBA controllers support 64-bit DMA addressing, as per hardware design, if DMA-able range contains all 64-bits set (0xFFFFFFFF-FFFFFFFF) then it results in a firmware fault. E.g. SGE's start address is 0xFFFFFFFF-FFFF000 and data length is 0x1000 bytes. when HBA tries to DMA the data at 0xFFFFFFFF-FFFFFFFF location then HBA will fault the firmware. Driver will set 63-bit DMA mask to ensure the above address will not be used. Cc: # 5.1.20+ Signed-off-by: Suganath Prabu Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit ac43432cb1f5c2950408534987e57c2071e24d8f Author: Muchun Song Date: Sat Jul 27 11:21:22 2019 +0800 driver core: Fix use-after-free and double free on glue directory There is a race condition between removing glue directory and adding a new device under the glue dir. It can be reproduced in following test: CPU1: CPU2: device_add() get_device_parent() class_dir_create_and_add() kobject_add_internal() create_dir() // create glue_dir device_add() get_device_parent() kobject_get() // get glue_dir device_del() cleanup_glue_dir() kobject_del(glue_dir) kobject_add() kobject_add_internal() create_dir() // in glue_dir sysfs_create_dir_ns() kernfs_create_dir_ns(sd) sysfs_remove_dir() // glue_dir->sd=NULL sysfs_put() // free glue_dir->sd // sd is freed kernfs_new_node(sd) kernfs_get(glue_dir) kernfs_add_one() kernfs_put() Before CPU1 remove last child device under glue dir, if CPU2 add a new device under glue dir, the glue_dir kobject reference count will be increase to 2 via kobject_get() in get_device_parent(). And CPU2 has been called kernfs_create_dir_ns(), but not call kernfs_new_node(). Meanwhile, CPU1 call sysfs_remove_dir() and sysfs_put(). This result in glue_dir->sd is freed and it's reference count will be 0. Then CPU2 call kernfs_get(glue_dir) will trigger a warning in kernfs_get() and increase it's reference count to 1. Because glue_dir->sd is freed by CPU1, the next call kernfs_add_one() by CPU2 will fail(This is also use-after-free) and call kernfs_put() to decrease reference count. Because the reference count is decremented to 0, it will also call kmem_cache_free() to free the glue_dir->sd again. This will result in double free. In order to avoid this happening, we also should make sure that kernfs_node for glue_dir is released in CPU1 only when refcount for glue_dir kobj is 1 to fix this race. The following calltrace is captured in kernel 4.14 with the following patch applied: commit 726e41097920 ("drivers: core: Remove glue dirs from sysfs earlier") -------------------------------------------------------------------------- [ 3.633703] WARNING: CPU: 4 PID: 513 at .../fs/kernfs/dir.c:494 Here is WARN_ON(!atomic_read(&kn->count) in kernfs_get(). .... [ 3.633986] Call trace: [ 3.633991] kernfs_create_dir_ns+0xa8/0xb0 [ 3.633994] sysfs_create_dir_ns+0x54/0xe8 [ 3.634001] kobject_add_internal+0x22c/0x3f0 [ 3.634005] kobject_add+0xe4/0x118 [ 3.634011] device_add+0x200/0x870 [ 3.634017] _request_firmware+0x958/0xc38 [ 3.634020] request_firmware_into_buf+0x4c/0x70 .... [ 3.634064] kernel BUG at .../mm/slub.c:294! Here is BUG_ON(object == fp) in set_freepointer(). .... [ 3.634346] Call trace: [ 3.634351] kmem_cache_free+0x504/0x6b8 [ 3.634355] kernfs_put+0x14c/0x1d8 [ 3.634359] kernfs_create_dir_ns+0x88/0xb0 [ 3.634362] sysfs_create_dir_ns+0x54/0xe8 [ 3.634366] kobject_add_internal+0x22c/0x3f0 [ 3.634370] kobject_add+0xe4/0x118 [ 3.634374] device_add+0x200/0x870 [ 3.634378] _request_firmware+0x958/0xc38 [ 3.634381] request_firmware_into_buf+0x4c/0x70 -------------------------------------------------------------------------- Fixes: 726e41097920 ("drivers: core: Remove glue dirs from sysfs earlier") Signed-off-by: Muchun Song Reviewed-by: Mukesh Ojha Signed-off-by: Prateek Sood Link: https://lore.kernel.org/r/20190727032122.24639-1-smuchun@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/base/core.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) commit 18a56d699d174f3ac41f2ea86e1ca21f98b01d8f Author: Don Brace Date: Wed Jul 24 17:08:12 2019 -0500 scsi: hpsa: remove printing internal cdb on tag collision Remove racy printing of internal commands. Completion thread can be cleaning up the command in parallel. Reviewed-by: Bader Ali - Saleh Reviewed-by: Scott Teel Reviewed-by: Scott Benesh Reviewed-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 2 -- 1 file changed, 2 deletions(-) commit 2d291e6cc183608e1f6eb8580268df7c68bdf7c3 Author: Gustavo A. R. Silva Date: Mon Jul 29 18:32:10 2019 -0500 MIPS: OProfile: Mark expected switch fall-throughs Mark switch cases where we are expecting to fall through. This patch fixes the following warning (Building: mips): arch/mips/oprofile/op_model_mipsxx.c: In function ‘mipsxx_cpu_stop’: arch/mips/oprofile/op_model_mipsxx.c:217:3: warning: this statement may fall through [-Wimplicit-fallthrough=] w_c0_perfctrl3(0); ^~~~~~~~~~~~~~~~~ arch/mips/oprofile/op_model_mipsxx.c:218:2: note: here case 3: ^~~~ arch/mips/oprofile/op_model_mipsxx.c:219:3: warning: this statement may fall through [-Wimplicit-fallthrough=] w_c0_perfctrl2(0); ^~~~~~~~~~~~~~~~~ arch/mips/oprofile/op_model_mipsxx.c:220:2: note: here case 2: ^~~~ arch/mips/oprofile/op_model_mipsxx.c:221:3: warning: this statement may fall through [-Wimplicit-fallthrough=] w_c0_perfctrl1(0); ^~~~~~~~~~~~~~~~~ arch/mips/oprofile/op_model_mipsxx.c:222:2: note: here case 1: ^~~~ arch/mips/oprofile/op_model_mipsxx.c: In function ‘mipsxx_cpu_start’: arch/mips/oprofile/op_model_mipsxx.c:197:3: warning: this statement may fall through [-Wimplicit-fallthrough=] w_c0_perfctrl3(WHAT | reg.control[3]); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/mips/oprofile/op_model_mipsxx.c:198:2: note: here case 3: ^~~~ arch/mips/oprofile/op_model_mipsxx.c:199:3: warning: this statement may fall through [-Wimplicit-fallthrough=] w_c0_perfctrl2(WHAT | reg.control[2]); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/mips/oprofile/op_model_mipsxx.c:200:2: note: here case 2: ^~~~ arch/mips/oprofile/op_model_mipsxx.c:201:3: warning: this statement may fall through [-Wimplicit-fallthrough=] w_c0_perfctrl1(WHAT | reg.control[1]); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/mips/oprofile/op_model_mipsxx.c:202:2: note: here case 1: ^~~~ arch/mips/oprofile/op_model_mipsxx.c: In function ‘reset_counters’: arch/mips/oprofile/op_model_mipsxx.c:299:3: warning: this statement may fall through [-Wimplicit-fallthrough=] w_c0_perfcntr3(0); ^~~~~~~~~~~~~~~~~ arch/mips/oprofile/op_model_mipsxx.c:300:2: note: here case 3: ^~~~ arch/mips/oprofile/op_model_mipsxx.c:302:3: warning: this statement may fall through [-Wimplicit-fallthrough=] w_c0_perfcntr2(0); ^~~~~~~~~~~~~~~~~ arch/mips/oprofile/op_model_mipsxx.c:303:2: note: here case 2: ^~~~ arch/mips/oprofile/op_model_mipsxx.c:305:3: warning: this statement may fall through [-Wimplicit-fallthrough=] w_c0_perfcntr1(0); ^~~~~~~~~~~~~~~~~ arch/mips/oprofile/op_model_mipsxx.c:306:2: note: here case 1: ^~~~ arch/mips/oprofile/op_model_mipsxx.c: In function ‘mipsxx_perfcount_handler’: arch/mips/oprofile/op_model_mipsxx.c:242:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if ((control & MIPS_PERFCTRL_IE) && \ ^ arch/mips/oprofile/op_model_mipsxx.c:248:2: note: in expansion of macro ‘HANDLE_COUNTER’ HANDLE_COUNTER(3) ^~~~~~~~~~~~~~ arch/mips/oprofile/op_model_mipsxx.c:239:2: note: here case n + 1: \ ^ arch/mips/oprofile/op_model_mipsxx.c:249:2: note: in expansion of macro ‘HANDLE_COUNTER’ HANDLE_COUNTER(2) ^~~~~~~~~~~~~~ arch/mips/oprofile/op_model_mipsxx.c:242:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if ((control & MIPS_PERFCTRL_IE) && \ ^ arch/mips/oprofile/op_model_mipsxx.c:249:2: note: in expansion of macro ‘HANDLE_COUNTER’ HANDLE_COUNTER(2) ^~~~~~~~~~~~~~ arch/mips/oprofile/op_model_mipsxx.c:239:2: note: here case n + 1: \ ^ arch/mips/oprofile/op_model_mipsxx.c:250:2: note: in expansion of macro ‘HANDLE_COUNTER’ HANDLE_COUNTER(1) ^~~~~~~~~~~~~~ arch/mips/oprofile/op_model_mipsxx.c:242:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if ((control & MIPS_PERFCTRL_IE) && \ ^ arch/mips/oprofile/op_model_mipsxx.c:250:2: note: in expansion of macro ‘HANDLE_COUNTER’ HANDLE_COUNTER(1) ^~~~~~~~~~~~~~ arch/mips/oprofile/op_model_mipsxx.c:239:2: note: here case n + 1: \ ^ arch/mips/oprofile/op_model_mipsxx.c:251:2: note: in expansion of macro ‘HANDLE_COUNTER’ HANDLE_COUNTER(0) ^~~~~~~~~~~~~~ CC usr/include/linux/pmu.h.s arch/mips/oprofile/op_model_mipsxx.c: In function ‘mipsxx_cpu_setup’: arch/mips/oprofile/op_model_mipsxx.c:174:3: warning: this statement may fall through [-Wimplicit-fallthrough=] w_c0_perfcntr3(reg.counter[3]); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/mips/oprofile/op_model_mipsxx.c:175:2: note: here case 3: ^~~~ arch/mips/oprofile/op_model_mipsxx.c:177:3: warning: this statement may fall through [-Wimplicit-fallthrough=] w_c0_perfcntr2(reg.counter[2]); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/mips/oprofile/op_model_mipsxx.c:178:2: note: here case 2: ^~~~ arch/mips/oprofile/op_model_mipsxx.c:180:3: warning: this statement may fall through [-Wimplicit-fallthrough=] w_c0_perfcntr1(reg.counter[1]); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/mips/oprofile/op_model_mipsxx.c:181:2: note: here case 1: ^~~~ Signed-off-by: Gustavo A. R. Silva Signed-off-by: Paul Burton Cc: Robert Richter Cc: Ralf Baechle Cc: James Hogan Cc: oprofile-list@lists.sf.net Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Kees Cook arch/mips/oprofile/op_model_mipsxx.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit eeebce1862970653cdf5c01e98bc669edd8f529a Author: Don Brace Date: Wed Jul 24 17:08:06 2019 -0500 scsi: hpsa: correct scsi command status issue after reset Reviewed-by: Bader Ali - Saleh Reviewed-by: Scott Teel Reviewed-by: Scott Benesh Reviewed-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 71b256f8f7a5c09810d2c3ed6165629c2cc0a652 Author: Emmanuel Grumbach Date: Mon Jul 22 13:02:25 2019 +0300 iwlwifi: mvm: fix a use-after-free bug in iwl_mvm_tx_tso_segment Accessing the hdr of an skb that was consumed already isn't a good idea. First ask if the skb is a QoS packet, then keep that data on stack, and then consume the skb. This was spotted by KASAN. Cc: stable@vger.kernel.org Fixes: 08f7d8b69aaf ("iwlwifi: mvm: bring back mvm GSO code") Signed-off-by: Emmanuel Grumbach Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ba3224db78034435e9ff0247277cce7c7bb1756c Author: Emmanuel Grumbach Date: Mon Jul 22 12:47:27 2019 +0300 iwlwifi: mvm: fix an out-of-bound access The index for the elements of the ACPI object we dereference was static. This means that if we called the function twice we wouldn't start from 3 again, but rather from the latest index we reached in the previous call. This was dutifully reported by KASAN. Fix this. Cc: stable@vger.kernel.org Fixes: 6996490501ed ("iwlwifi: mvm: add support for EWRD (Dynamic SAR) ACPI table") Signed-off-by: Emmanuel Grumbach Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 87e7e25aee6b59fef740856f4e86d4b60496c9e1 Author: Emmanuel Grumbach Date: Sun Jul 21 14:02:27 2019 +0300 iwlwifi: don't unmap as page memory that was mapped as single In order to remember how to unmap a memory (as single or as page), we maintain a bit per Transmit Buffer (TBs) in the meta data (structure iwl_cmd_meta). We maintain a bitmap: 1 bit per TB. If the TB is set, we will free the memory as a page. This bitmap was never cleared. Fix this. Cc: stable@vger.kernel.org Fixes: 3cd1980b0cdf ("iwlwifi: pcie: introduce new tfd and tb formats") Signed-off-by: Emmanuel Grumbach Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 2 ++ 1 file changed, 2 insertions(+) commit f5a47fae6aa3eb06f100e701d2342ee56b857bee Author: Luca Coelho Date: Fri Jul 19 12:21:59 2019 +0300 iwlwifi: mvm: fix version check for GEO_TX_POWER_LIMIT support We erroneously added a check for FW API version 41 before sending GEO_TX_POWER_LIMIT, but this was already implemented in version 38. Additionally, it was cherry-picked to older versions, namely 17, 26 and 29, so check for those as well. Cc: stable@vger.kernel.org Fixes: eca1e56ceedd ("iwlwifi: mvm: don't send GEO_TX_POWER_LIMIT to old firmwares") Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 03a0995ccc0717ca0c0c7454a033c260872d45ae Author: Ihab Zhaika Date: Mon Jul 15 15:30:48 2019 +0300 iwlwifi: add 3 new IDs for the 9000 series (iwl9260_2ac_160_cfg) Add a few PCI ID'S for 9000 series. Signed-off-by: Ihab Zhaika Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 3 +++ 1 file changed, 3 insertions(+) commit 514ea05b0743435bf181c41f48d83aac050cc6fa Author: Gregory Greenman Date: Mon Jul 8 09:07:42 2019 +0300 iwlwifi: mvm: fix possible out-of-bounds read when accessing lq_info lq_info is an arary of size 2, active_tbl index is u8. When accessing lq_info[1 - active_tbl], theoretically it's possible that the access will be made to a negative index value. Signed-off-by: Gregory Greenman Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/rs.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) commit ecd09ddc1d14cca4f874151aed51a7feee3f765b Author: Emmanuel Grumbach Date: Thu Jun 27 21:50:24 2019 +0300 iwlwifi: mvm: fix frame drop from the reordering buffer An earlier patch made sure that the queues are not lagging too far behind. This means that iwl_mvm_release_frames should not be called with a head_sn too far behind NSSN. Don't take the risk to change completely the entry condition to iwl_mvm_release_frames, but don't update the head_sn is the NSSN is more than 2048 packets ahead of us. Since this just cannot be right. This means that the scenario described here happened. We are queue 0. Q:0 Q:1 head_sn: 0 -> 2047 head_sn: 2048 Lots of packets arrive: head_sn: 2047 -> 2150 send NSSN_SYNC notification Handle notification from the firmware and do NOT move the head_sn back to 2048 Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 44 ++++++++++++++++++++------- 1 file changed, 33 insertions(+), 11 deletions(-) commit f5d88fa334e6c8e2d840512ffbb30e3cb58d065b Author: Gregory Greenman Date: Sun Jun 30 09:42:57 2019 +0300 iwlwifi: mvm: replace RS mutex with a spin_lock The solution with the worker still had a bug, as in order to get sta, rcu_read_lock should be used and thus no mutex can be used inside iwl_mvm_rs_rate_init. Also, spin_lock is a simpler solution, no need to spawn a dedicated worker. Signed-off-by: Gregory Greenman Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/rs.c | 530 +++++++++++++-------------- drivers/net/wireless/intel/iwlwifi/mvm/rs.h | 6 +- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 6 +- drivers/net/wireless/intel/iwlwifi/mvm/sta.h | 1 - 4 files changed, 258 insertions(+), 285 deletions(-) commit cd4d6b0bcd51580efda9ae54ab7b2d630b4147dc Author: Gregory Greenman Date: Sun Jun 30 09:18:15 2019 +0300 iwlwifi: mvm: send LQ command always ASYNC The only place where the command was sent as SYNC is during init and this is not really critical. This change is required for replacing RS mutex with a spinlock (in the subsequent patch), since SYNC comamnd requres sleeping and thus the flow cannot be done when holding a spinlock. Signed-off-by: Gregory Greenman Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/rs.c | 23 ++++++++++++----------- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 4 ++-- 4 files changed, 16 insertions(+), 15 deletions(-) commit b6cf28796756246f9e317eed6f63f1e2981e9817 Author: Colin Ian King Date: Mon Jul 1 17:26:57 2019 +0100 iwlwifi: mvm: fix comparison of u32 variable with less than zero The comparison of the u32 variable wgds_tbl_idx with less than zero is always going to be false because it is unsigned. Fix this by making wgds_tbl_idx a plain signed int. Addresses-Coverity: ("Unsigned compared against 0") Fixes: 4fd445a2c855 ("iwlwifi: mvm: Add log information about SAR status") Signed-off-by: Colin Ian King Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/nvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6569e7d36773956298ec1d5f4e6a2487913d2752 Author: Johannes Berg Date: Thu Jun 27 09:44:50 2019 +0200 iwlwifi: fix locking in delayed GTK setting This code clearly never could have worked, since it locks while already locked. Add an unlocked __iwl_mvm_mac_set_key() variant that doesn't do locking to fix that. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 39 +++++++++++++++-------- 1 file changed, 26 insertions(+), 13 deletions(-) commit abcbef5977df1fb61026ba429964cd6b9a085699 Author: Shahar S Matityahu Date: Thu Jun 13 15:11:24 2019 +0300 iwlwifi: dbg_ini: move iwl_dbg_tlv_free outside of debugfs ifdef The driver should call iwl_dbg_tlv_free even if debugfs is not defined since ini mode does not depend on debugfs ifdef. Signed-off-by: Shahar S Matityahu Fixes: 68f6f492c4fa ("iwlwifi: trans: support loading ini TLVs from external file") Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 072b30642f90b01d139131ec7bf763778a3a3f41 Author: Shahar S Matityahu Date: Thu Jun 13 15:08:24 2019 +0300 iwlwifi: dbg_ini: move iwl_dbg_tlv_load_bin out of debug override ifdef ini debug mode should work even if debug override is not defined. Signed-off-by: Shahar S Matityahu Fixes: 68f6f492c4fa ("iwlwifi: trans: support loading ini TLVs from external file") Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 2 ++ 1 file changed, 2 insertions(+) commit ef349abd91c1b37f87639170bcd9d11fe3ac58ff Author: Matthias Maennich Date: Thu Jul 25 11:17:04 2019 +0100 coccinelle: api/atomic_as_refcounter: add SPDX License Identifier Add the missing GPLv2 SPDX license identifier. It appears this single file was missing from 7f904d7e1f3e ("treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 505"), which addressed all other files in scripts/coccinelle. Hence I added GPL-2.0-only consitently with the mentioned patch. Cc: linux-spdx@vger.kernel.org Cc: Elena Reshetova Signed-off-by: Matthias Maennich Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman scripts/coccinelle/api/atomic_as_refcounter.cocci | 1 + 1 file changed, 1 insertion(+) commit 23babdf06779482a65c5072a145d826a62979534 Author: Gregory Greenman Date: Tue Jun 25 11:42:49 2019 +0300 iwlwifi: mvm: add a wrapper around rs_tx_status to handle locks iwl_mvm_rs_tx_status can be called from two places in the code, but the mutex is taken only on one of the calls. Split it into a wrapper taking locks and an internal __iwl_mvm_rs_tx_status function. Signed-off-by: Gregory Greenman Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/rs.c | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) commit 2b089bf8d19c66f70ae3b2d2d101be1ae49bfe24 Author: Thomas Huth Date: Mon Jul 22 11:20:08 2019 +0200 kernel/configs: Replace GPL boilerplate code with SPDX identifier The FSF does not reside in "675 Mass Ave, Cambridge" anymore... let's replace the old GPL boilerplate code with a proper SPDX identifier instead. Signed-off-by: Thomas Huth Signed-off-by: Greg Kroah-Hartman kernel/configs.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) commit 3c514bf831ac12356b695ff054bef641b9e99593 Author: Emmanuel Grumbach Date: Mon Jun 24 16:26:24 2019 +0300 iwlwifi: mvm: add a loose synchronization of the NSSN across Rx queues In order to support MSI-X efficiently, we want to avoid communication across Rx queues. Each Rx queue should have all the data it needs to process a packet. The reordering buffer is a challenge in the MSI-X world since we can have a single BA session whose packets are directed to different queues. This is why each queue has its own reordering buffer. The hardware is able to hint the driver whether we have a hole or not, which allows the driver to know whether it can release a packet or not. This indication is called NSSN. Roughly, if the packet's SN is lower than the NSSN, we can release the packet to the stack. The NSSN is the SN of the newest packet received without any holes + 1. This is working as long as we don't have packets that we release because of a timeout. When that happens, we could have taken the decision to release a packet after we have been waiting for its predecessor for too long. If this predecessor comes later, we have to drop it because we can't release packets out of order. In that case, the hardware will give us an indication that we can we release the packet (SN < NSSN), but the packet still needs to be dropped. This is why we sometimes need to ignore the NSSN and we track the head_sn in software. Here is a specific example of this: 1) Rx queue 1 got packets: 480, 482, 483 2) We release 480 to to the stack and wait for 481 3) NSSN is now 481 4) The timeout expires 5) We release 482 and 483, NSSN is still 480 6) 481 arrives its NSSN is 484. We need to drop 481 even if 481 < 484. This is why we'll update the head_sn to 484 at step 2. The flow now is: 1) Rx queue 1 got packets: 480, 482, 483 2) We release 480 to to the stack and wait for 481 3) NSSN is now 481 / head_sn is 481 4) The timeout expires 5) We release 482 and 483, NSSN is still 480 but head_sn is 484. 6) 481 arrives its NSSN is 484, but head_sn is 484 and we drop it. This code introduces another problem in case all the traffic goes well (no hole, no timeout): Rx queue 1: 0 -> 483 (head_sn = 484) Rx queue 2: 501 -> 4095 (head_sn = 0) Rx queue 2: 0 -> 480 (head_sn = 481) Rx queue 1: 481 but head_sn = 484 and we drop it. At this point, the SN of queue 1 is far behind: more than 4040 packets behind. Queue 1 will consider 481 "old" because 481 is in [501-64:501] whereas it is a very new packet. In order to fix that, send an Rx notification from time to time (twice across the full set of 4096 packets) to make sure no Rx queue is lagging too far behind. What will happen then is: Rx queue 1: 0 -> 483 (head_sn = 484) Rx queue 2: 501 -> 2047 (head_sn = 2048) Rx queue 1: Sync nofication (head_sn = 2048) Rx queue 2: 2048 -> 4095 (head_sn = 0) Rx queue 1: Sync notification (head_sn = 0) Rx queue 2: 1 -> 481 (head_sn = 482) Rx queue 1: 481 and head_sn = 0. In queue 1's data, head_sn is now 0, the packet coming in is 481, it'll understand that the new packet is new and it won't be dropped. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 5 +- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 64 ++++++++++++++++++----- 3 files changed, 56 insertions(+), 15 deletions(-) commit 521dc6c7c74e88fbd02947e4e50a5cb0d49b4395 Author: Emmanuel Grumbach Date: Tue Jun 25 09:14:14 2019 +0300 iwlwiif: mvm: refactor iwl_mvm_notify_rx_queue Instead of allocating memory for which we have an upper limit, use a small buffer on stack. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/fw/api/rx.h | 1 - drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 17 +++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) commit c61b655a88a54d8690c1e134c47bc3f6d40d2dc3 Author: Emmanuel Grumbach Date: Mon Jun 24 13:57:34 2019 +0300 iwlwifi: mvm: add a new RSS sync notification for NSSN sync We will soon be using a new notification that will be initiated by the driver, sent to the firmware and sent back to all the RSS queues by the firmware. This new notification will be useful to synchronize the NSSN across all the queues. For now, don't send the notification, just add the code to handle it. Later patch will add the code to actually send it. While at it, validate the baid coming from the firmware to avoid accessing an array with a bad index in the driver. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/fw/api/rx.h | 2 + drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 4 +- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 4 +- drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 84 ++++++++++++++++---------- drivers/net/wireless/intel/iwlwifi/mvm/sta.h | 6 ++ 5 files changed, 64 insertions(+), 36 deletions(-) commit 6b2dbce549bb513316823af34e92f0bb2e0dbd55 Author: Emmanuel Grumbach Date: Mon Jun 24 13:41:13 2019 +0300 iwlwifi: mvm: prepare the ground for more RSS notifications We will need a new type of synchronization message going through all the RSS queues. Prepare the ground for this. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/sta.h | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) commit 39bd984c203e86f3109b49c2a2e20677c4d3ab65 Author: Luca Coelho Date: Mon Jun 24 22:29:33 2019 +0300 iwlwifi: mvm: don't send GEO_TX_POWER_LIMIT on version < 41 Firmware versions before 41 don't support the GEO_TX_POWER_LIMIT command, and sending it to the firmware will cause a firmware crash. We allow this via debugfs, so we need to return an error value in case it's not supported. This had already been fixed during init, when we send the command if the ACPI WGDS table is present. Fix it also for the other, userspace-triggered case. Cc: stable@vger.kernel.org Fixes: 7fe90e0e3d60 ("iwlwifi: mvm: refactor geo init") Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) commit 0f8084cdc1f9d4a6693ef4168167febb0918c6f6 Author: Mordechay Goodstein Date: Thu Jun 13 16:34:07 2019 +0300 iwlwifi: mvm: avoid races in rate init and rate perform Rate perform uses the lq_sta table to calculate the next rate to scale while rate init resets the same table, Rate perform is done in soft irq context in parallel to rate init that can be called in case we are doing changes like AP changes BW or moving state for auth to assoc. Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/rs.c | 42 +++++++++++++++++++++++++--- drivers/net/wireless/intel/iwlwifi/mvm/rs.h | 7 ++++- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 6 ++++ drivers/net/wireless/intel/iwlwifi/mvm/sta.h | 1 + 4 files changed, 51 insertions(+), 5 deletions(-) commit cfb21b11b891b08b79be07be57c40a85bb926668 Author: Johannes Berg Date: Wed Jun 12 11:09:58 2019 +0200 iwlwifi: mvm: disable TX-AMSDU on older NICs On older NICs, we occasionally see issues with A-MSDU support, where the commands in the FIFO get confused and then we see an assert EDC because the next command in the FIFO isn't TX. We've tried to isolate this issue and understand where it comes from, but haven't found any errors in building the A-MSDU in software. At least for now, disable A-MSDU support on older hardware so that users can use it again without fearing the assert. This fixes https://bugzilla.kernel.org/show_bug.cgi?id=203315. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 1dd38ae96973006c45a8010a7fc3c313f1c229a9 Author: Moritz Fischer Date: Thu Jul 25 10:45:17 2019 -0700 MAINTAINERS: Move linux-fpga tree to new location Move the linux-fpga tree to new location at: git://git.kernel.org/pub/scm/linux/kernel/git/mdf/linux-fpga.git Signed-off-by: Moritz Fischer Link: https://lore.kernel.org/r/20190725174517.10516-1-mdf@kernel.org Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a6d155d2e363f26290ffd50591169cb96c2a609e Author: Filipe Manana Date: Mon Jul 29 09:37:10 2019 +0100 Btrfs: fix deadlock between fiemap and transaction commits The fiemap handler locks a file range that can have unflushed delalloc, and after locking the range, it tries to attach to a running transaction. If the running transaction started its commit, that is, it is in state TRANS_STATE_COMMIT_START, and either the filesystem was mounted with the flushoncommit option or the transaction is creating a snapshot for the subvolume that contains the file that fiemap is operating on, we end up deadlocking. This happens because fiemap is blocked on the transaction, waiting for it to complete, and the transaction is waiting for the flushed dealloc to complete, which requires locking the file range that the fiemap task already locked. The following stack traces serve as an example of when this deadlock happens: (...) [404571.515510] Workqueue: btrfs-endio-write btrfs_endio_write_helper [btrfs] [404571.515956] Call Trace: [404571.516360] ? __schedule+0x3ae/0x7b0 [404571.516730] schedule+0x3a/0xb0 [404571.517104] lock_extent_bits+0x1ec/0x2a0 [btrfs] [404571.517465] ? remove_wait_queue+0x60/0x60 [404571.517832] btrfs_finish_ordered_io+0x292/0x800 [btrfs] [404571.518202] normal_work_helper+0xea/0x530 [btrfs] [404571.518566] process_one_work+0x21e/0x5c0 [404571.518990] worker_thread+0x4f/0x3b0 [404571.519413] ? process_one_work+0x5c0/0x5c0 [404571.519829] kthread+0x103/0x140 [404571.520191] ? kthread_create_worker_on_cpu+0x70/0x70 [404571.520565] ret_from_fork+0x3a/0x50 [404571.520915] kworker/u8:6 D 0 31651 2 0x80004000 [404571.521290] Workqueue: btrfs-flush_delalloc btrfs_flush_delalloc_helper [btrfs] (...) [404571.537000] fsstress D 0 13117 13115 0x00004000 [404571.537263] Call Trace: [404571.537524] ? __schedule+0x3ae/0x7b0 [404571.537788] schedule+0x3a/0xb0 [404571.538066] wait_current_trans+0xc8/0x100 [btrfs] [404571.538349] ? remove_wait_queue+0x60/0x60 [404571.538680] start_transaction+0x33c/0x500 [btrfs] [404571.539076] btrfs_check_shared+0xa3/0x1f0 [btrfs] [404571.539513] ? extent_fiemap+0x2ce/0x650 [btrfs] [404571.539866] extent_fiemap+0x2ce/0x650 [btrfs] [404571.540170] do_vfs_ioctl+0x526/0x6f0 [404571.540436] ksys_ioctl+0x70/0x80 [404571.540734] __x64_sys_ioctl+0x16/0x20 [404571.540997] do_syscall_64+0x60/0x1d0 [404571.541279] entry_SYSCALL_64_after_hwframe+0x49/0xbe (...) [404571.543729] btrfs D 0 14210 14208 0x00004000 [404571.544023] Call Trace: [404571.544275] ? __schedule+0x3ae/0x7b0 [404571.544526] ? wait_for_completion+0x112/0x1a0 [404571.544795] schedule+0x3a/0xb0 [404571.545064] schedule_timeout+0x1ff/0x390 [404571.545351] ? lock_acquire+0xa6/0x190 [404571.545638] ? wait_for_completion+0x49/0x1a0 [404571.545890] ? wait_for_completion+0x112/0x1a0 [404571.546228] wait_for_completion+0x131/0x1a0 [404571.546503] ? wake_up_q+0x70/0x70 [404571.546775] btrfs_wait_ordered_extents+0x27c/0x400 [btrfs] [404571.547159] btrfs_commit_transaction+0x3b0/0xae0 [btrfs] [404571.547449] ? btrfs_mksubvol+0x4a4/0x640 [btrfs] [404571.547703] ? remove_wait_queue+0x60/0x60 [404571.547969] btrfs_mksubvol+0x605/0x640 [btrfs] [404571.548226] ? __sb_start_write+0xd4/0x1c0 [404571.548512] ? mnt_want_write_file+0x24/0x50 [404571.548789] btrfs_ioctl_snap_create_transid+0x169/0x1a0 [btrfs] [404571.549048] btrfs_ioctl_snap_create_v2+0x11d/0x170 [btrfs] [404571.549307] btrfs_ioctl+0x133f/0x3150 [btrfs] [404571.549549] ? mem_cgroup_charge_statistics+0x4c/0xd0 [404571.549792] ? mem_cgroup_commit_charge+0x84/0x4b0 [404571.550064] ? __handle_mm_fault+0xe3e/0x11f0 [404571.550306] ? do_raw_spin_unlock+0x49/0xc0 [404571.550608] ? _raw_spin_unlock+0x24/0x30 [404571.550976] ? __handle_mm_fault+0xedf/0x11f0 [404571.551319] ? do_vfs_ioctl+0xa2/0x6f0 [404571.551659] ? btrfs_ioctl_get_supported_features+0x30/0x30 [btrfs] [404571.552087] do_vfs_ioctl+0xa2/0x6f0 [404571.552355] ksys_ioctl+0x70/0x80 [404571.552621] __x64_sys_ioctl+0x16/0x20 [404571.552864] do_syscall_64+0x60/0x1d0 [404571.553104] entry_SYSCALL_64_after_hwframe+0x49/0xbe (...) If we were joining the transaction instead of attaching to it, we would not risk a deadlock because a join only blocks if the transaction is in a state greater then or equals to TRANS_STATE_COMMIT_DOING, and the delalloc flush performed by a transaction is done before it reaches that state, when it is in the state TRANS_STATE_COMMIT_START. However a transaction join is intended for use cases where we do modify the filesystem, and fiemap only needs to peek at delayed references from the current transaction in order to determine if extents are shared, and, besides that, when there is no current transaction or when it blocks to wait for a current committing transaction to complete, it creates a new transaction without reserving any space. Such unnecessary transactions, besides doing unnecessary IO, can cause transaction aborts (-ENOSPC) and unnecessary rotation of the precious backup roots. So fix this by adding a new transaction join variant, named join_nostart, which behaves like the regular join, but it does not create a transaction when none currently exists or after waiting for a committing transaction to complete. Fixes: 03628cdbc64db6 ("Btrfs: do not start a transaction during fiemap") Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/backref.c | 2 +- fs/btrfs/transaction.c | 22 ++++++++++++++++++---- fs/btrfs/transaction.h | 3 +++ 3 files changed, 22 insertions(+), 5 deletions(-) commit cb2d3daddbfb6318d170e79aac1f7d5e4d49f0d7 Author: Filipe Manana Date: Thu Jul 25 11:27:04 2019 +0100 Btrfs: fix race leading to fs corruption after transaction abort When one transaction is finishing its commit, it is possible for another transaction to start and enter its initial commit phase as well. If the first ends up getting aborted, we have a small time window where the second transaction commit does not notice that the previous transaction aborted and ends up committing, writing a superblock that points to btrees that reference extent buffers (nodes and leafs) that were not persisted to disk. The consequence is that after mounting the filesystem again, we will be unable to load some btree nodes/leafs, either because the content on disk is either garbage (or just zeroes) or corresponds to the old content of a previouly COWed or deleted node/leaf, resulting in the well known error messages "parent transid verify failed on ...". The following sequence diagram illustrates how this can happen. CPU 1 CPU 2 btrfs_commit_transaction() (...) --> sets transaction state to TRANS_STATE_UNBLOCKED --> sets fs_info->running_transaction to NULL (...) btrfs_start_transaction() start_transaction() wait_current_trans() --> returns immediately because fs_info->running_transaction is NULL join_transaction() --> creates transaction N + 1 --> sets fs_info->running_transaction to transaction N + 1 --> adds transaction N + 1 to the fs_info->trans_list list --> returns transaction handle pointing to the new transaction N + 1 (...) btrfs_sync_file() btrfs_start_transaction() --> returns handle to transaction N + 1 (...) btrfs_write_and_wait_transaction() --> writeback of some extent buffer fails, returns an error btrfs_handle_fs_error() --> sets BTRFS_FS_STATE_ERROR in fs_info->fs_state --> jumps to label "scrub_continue" cleanup_transaction() btrfs_abort_transaction(N) --> sets BTRFS_FS_STATE_TRANS_ABORTED flag in fs_info->fs_state --> sets aborted field in the transaction and transaction handle structures, for transaction N only --> removes transaction from the list fs_info->trans_list btrfs_commit_transaction(N + 1) --> transaction N + 1 was not aborted, so it proceeds (...) --> sets the transaction's state to TRANS_STATE_COMMIT_START --> does not find the previous transaction (N) in the fs_info->trans_list, so it doesn't know that transaction was aborted, and the commit of transaction N + 1 proceeds (...) --> sets transaction N + 1 state to TRANS_STATE_UNBLOCKED btrfs_write_and_wait_transaction() --> succeeds writing all extent buffers created in the transaction N + 1 write_all_supers() --> succeeds --> we now have a superblock on disk that points to trees that refer to at least one extent buffer that was never persisted So fix this by updating the transaction commit path to check if the flag BTRFS_FS_STATE_TRANS_ABORTED is set on fs_info->fs_state if after setting the transaction to the TRANS_STATE_COMMIT_START we do not find any previous transaction in the fs_info->trans_list. If the flag is set, just fail the transaction commit with -EROFS, as we do in other places. The exact error code for the previous transaction abort was already logged and reported. Fixes: 49b25e0540904b ("btrfs: enhance transaction abort infrastructure") CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/transaction.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit b4f9a1a87a48c255bb90d8a6c3d555a1abb88130 Author: Filipe Manana Date: Wed Jul 17 13:23:39 2019 +0100 Btrfs: fix incremental send failure after deduplication When doing an incremental send operation we can fail if we previously did deduplication operations against a file that exists in both snapshots. In that case we will fail the send operation with -EIO and print a message to dmesg/syslog like the following: BTRFS error (device sdc): Send: inconsistent snapshot, found updated \ extent for inode 257 without updated inode item, send root is 258, \ parent root is 257 This requires that we deduplicate to the same file in both snapshots for the same amount of times on each snapshot. The issue happens because a deduplication only updates the iversion of an inode and does not update any other field of the inode, therefore if we deduplicate the file on each snapshot for the same amount of time, the inode will have the same iversion value (stored as the "sequence" field on the inode item) on both snapshots, therefore it will be seen as unchanged between in the send snapshot while there are new/updated/deleted extent items when comparing to the parent snapshot. This makes the send operation return -EIO and print an error message. Example reproducer: $ mkfs.btrfs -f /dev/sdb $ mount /dev/sdb /mnt # Create our first file. The first half of the file has several 64Kb # extents while the second half as a single 512Kb extent. $ xfs_io -f -s -c "pwrite -S 0xb8 -b 64K 0 512K" /mnt/foo $ xfs_io -c "pwrite -S 0xb8 512K 512K" /mnt/foo # Create the base snapshot and the parent send stream from it. $ btrfs subvolume snapshot -r /mnt /mnt/mysnap1 $ btrfs send -f /tmp/1.snap /mnt/mysnap1 # Create our second file, that has exactly the same data as the first # file. $ xfs_io -f -c "pwrite -S 0xb8 0 1M" /mnt/bar # Create the second snapshot, used for the incremental send, before # doing the file deduplication. $ btrfs subvolume snapshot -r /mnt /mnt/mysnap2 # Now before creating the incremental send stream: # # 1) Deduplicate into a subrange of file foo in snapshot mysnap1. This # will drop several extent items and add a new one, also updating # the inode's iversion (sequence field in inode item) by 1, but not # any other field of the inode; # # 2) Deduplicate into a different subrange of file foo in snapshot # mysnap2. This will replace an extent item with a new one, also # updating the inode's iversion by 1 but not any other field of the # inode. # # After these two deduplication operations, the inode items, for file # foo, are identical in both snapshots, but we have different extent # items for this inode in both snapshots. We want to check this doesn't # cause send to fail with an error or produce an incorrect stream. $ xfs_io -r -c "dedupe /mnt/bar 0 0 512K" /mnt/mysnap1/foo $ xfs_io -r -c "dedupe /mnt/bar 512K 512K 512K" /mnt/mysnap2/foo # Create the incremental send stream. $ btrfs send -p /mnt/mysnap1 -f /tmp/2.snap /mnt/mysnap2 ERROR: send ioctl failed with -5: Input/output error This issue started happening back in 2015 when deduplication was updated to not update the inode's ctime and mtime and update only the iversion. Back then we would hit a BUG_ON() in send, but later in 2016 send was updated to return -EIO and print the error message instead of doing the BUG_ON(). A test case for fstests follows soon. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=203933 Fixes: 1c919a5e13702c ("btrfs: don't update mtime/ctime on deduped inodes") CC: stable@vger.kernel.org # 4.4+ Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/send.c | 77 +++++++++++---------------------------------------------- 1 file changed, 15 insertions(+), 62 deletions(-) commit e70d8b287301eb6d7c7761c6171c56af62110ea3 Author: Jean Delvare Date: Sun Jul 28 18:42:55 2019 +0200 nvmem: Use the same permissions for eeprom as for nvmem The compatibility "eeprom" attribute is currently root-only no matter what the configuration says. The "nvmem" attribute does respect the setting of the root_only configuration bit, so do the same for "eeprom". Signed-off-by: Jean Delvare Fixes: b6c217ab9be6 ("nvmem: Add backwards compatibility support for older EEPROM drivers.") Reviewed-by: Bartosz Golaszewski Cc: Andrew Lunn Cc: Srinivas Kandagatla Cc: Arnd Bergmann Link: https://lore.kernel.org/r/20190728184255.563332e6@endymion Signed-off-by: Greg Kroah-Hartman drivers/nvmem/nvmem-sysfs.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 5241ab4cf42d3a93b933b55d3d53f43049081fa1 Author: Masahiro Yamada Date: Mon Jul 29 18:15:17 2019 +0900 kbuild: initialize CLANG_FLAGS correctly in the top Makefile CLANG_FLAGS is initialized by the following line: CLANG_FLAGS := --target=$(notdir $(CROSS_COMPILE:%-=%)) ..., which is run only when CROSS_COMPILE is set. Some build targets (bindeb-pkg etc.) recurse to the top Makefile. When you build the kernel with Clang but without CROSS_COMPILE, the same compiler flags such as -no-integrated-as are accumulated into CLANG_FLAGS. If you run 'make CC=clang' and then 'make CC=clang bindeb-pkg', Kbuild will recompile everything needlessly due to the build command change. Fix this by correctly initializing CLANG_FLAGS. Fixes: 238bcbc4e07f ("kbuild: consolidate Clang compiler flags") Cc: # v5.0+ Signed-off-by: Masahiro Yamada Reviewed-by: Nathan Chancellor Acked-by: Nick Desaulniers Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 92f5b0313e37e2b37aaf8f0bb75b6c50eafb5808 Author: Hans Verkuil Date: Fri Jul 26 10:01:07 2019 -0400 media: vivid: fix missing cec adapter name Commit "vivid: reorder CEC allocation and control set-up" missed that the CEC adapter needs a valid vfd->name, and that was now filled in after the CEC adapter was created, leading to an empty adapter name. Fill in the name earlier. Signed-off-by: Hans Verkuil Fixes: 4ee895e71abb ("media: vivid: reorder CEC allocation and control set-up") Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vivid/vivid-core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 81eaadcae81b4c1bf01649a3053d1f54e2d81cf1 Author: Douglas Anderson Date: Thu Jul 25 11:35:51 2019 -0700 kgdboc: disable the console lock when in kgdb After commit ddde3c18b700 ("vt: More locking checks") kdb / kgdb has become useless because my console is filled with spews of: WARNING: CPU: 0 PID: 0 at .../drivers/tty/vt/vt.c:3846 con_is_visible+0x50/0x74 CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.3.0-rc1+ #48 Hardware name: Rockchip (Device Tree) Backtrace: [] (dump_backtrace) from [] (show_stack+0x20/0x24) [] (show_stack) from [] (dump_stack+0xb0/0xd0) [] (dump_stack) from [] (__warn+0xec/0x11c) [] (__warn) from [] (warn_slowpath_null+0x4c/0x58) [] (warn_slowpath_null) from [] (con_is_visible+0x50/0x74) [] (con_is_visible) from [] (con_scroll+0x108/0x1ac) [] (con_scroll) from [] (lf+0x44/0x88) [] (lf) from [] (vt_console_print+0x1a4/0x2bc) [] (vt_console_print) from [] (vkdb_printf+0x420/0x8a4) [] (vkdb_printf) from [] (kdb_printf+0x44/0x60) [] (kdb_printf) from [] (kdb_main_loop+0xf4/0x6e0) [] (kdb_main_loop) from [] (kdb_stub+0x268/0x398) [] (kdb_stub) from [] (kgdb_cpu_enter+0x1f8/0x674) [] (kgdb_cpu_enter) from [] (kgdb_handle_exception+0x1c4/0x1fc) [] (kgdb_handle_exception) from [] (kgdb_compiled_brk_fn+0x30/0x3c) [] (kgdb_compiled_brk_fn) from [] (do_undefinstr+0x180/0x1a0) [] (do_undefinstr) from [] (__und_svc_finish+0x0/0x3c) ... [] (kgdb_breakpoint) from [] (sysrq_handle_dbg+0x58/0x6c) [] (sysrq_handle_dbg) from [] (__handle_sysrq+0xac/0x154) Let's disable this warning when we're in kgdb to avoid the spew. The whole system is stopped when we're in kgdb so we can't exactly wait for someone else to drop the lock. Presumably the best we can do is to disable the warning and hope for the best. Fixes: ddde3c18b700 ("vt: More locking checks") Cc: Daniel Vetter Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20190725183551.169208-1-dianders@chromium.org Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/kgdboc.c | 4 ++++ 1 file changed, 4 insertions(+) commit df612421fe2566654047769c6852ffae1a31df16 Author: Brian Norris Date: Wed Jul 24 12:46:34 2019 -0700 mwifiex: fix 802.11n/WPA detection Commit 63d7ef36103d ("mwifiex: Don't abort on small, spec-compliant vendor IEs") adjusted the ieee_types_vendor_header struct, which inadvertently messed up the offsets used in mwifiex_is_wpa_oui_present(). Add that offset back in, mirroring mwifiex_is_rsn_oui_present(). As it stands, commit 63d7ef36103d breaks compatibility with WPA (not WPA2) 802.11n networks, since we hit the "info: Disable 11n if AES is not supported by AP" case in mwifiex_is_network_compatible(). Fixes: 63d7ef36103d ("mwifiex: Don't abort on small, spec-compliant vendor IEs") Cc: Signed-off-by: Brian Norris Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/main.h | 1 + drivers/net/wireless/marvell/mwifiex/scan.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) commit c69565ee6681e151e2bb80502930a16e04b553d1 Author: David Howells Date: Tue Jul 30 14:42:50 2019 +0100 rxrpc: Fix the lack of notification when sendmsg() fails on a DATA packet Fix the fact that a notification isn't sent to the recvmsg side to indicate a call failed when sendmsg() fails to transmit a DATA packet with the error ENETUNREACH, EHOSTUNREACH or ECONNREFUSED. Without this notification, the afs client just sits there waiting for the call to complete in some manner (which it's not now going to do), which also pins the rxrpc call in place. This can be seen if the client has a scope-level IPv6 address, but not a global-level IPv6 address, and we try and transmit an operation to a server's IPv6 address. Looking in /proc/net/rxrpc/calls shows completed calls just sat there with an abort code of RX_USER_ABORT and an error code of -ENETUNREACH. Fixes: c54e43d752c7 ("rxrpc: Fix missing start of call timeout") Signed-off-by: David Howells Reviewed-by: Marc Dionne Reviewed-by: Jeffrey Altman net/rxrpc/sendmsg.c | 1 + 1 file changed, 1 insertion(+) commit 7db57e77586744af46c8bbf8f831bb2b941b7afc Author: Michael Ellerman Date: Wed Jul 31 00:00:15 2019 +1000 powerpc/spe: Mark expected switch fall-throughs Mark switch cases where we are expecting to fall through. Fixes errors such as below, seen with mpc85xx_defconfig: arch/powerpc/kernel/align.c: In function 'emulate_spe': arch/powerpc/kernel/align.c:178:8: error: this statement may fall through ret |= __get_user_inatomic(temp.v[3], p++); ^~ Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190730141917.21817-1-mpe@ellerman.id.au arch/powerpc/kernel/align.c | 4 ++++ 1 file changed, 4 insertions(+) commit 60034d3d146b11922ab1db613bce062dddc0327a Author: David Howells Date: Tue Jul 30 14:42:50 2019 +0100 rxrpc: Fix potential deadlock There is a potential deadlock in rxrpc_peer_keepalive_dispatch() whereby rxrpc_put_peer() is called with the peer_hash_lock held, but if it reduces the peer's refcount to 0, rxrpc_put_peer() calls __rxrpc_put_peer() - which the tries to take the already held lock. Fix this by providing a version of rxrpc_put_peer() that can be called in situations where the lock is already held. The bug may produce the following lockdep report: ============================================ WARNING: possible recursive locking detected 5.2.0-next-20190718 #41 Not tainted -------------------------------------------- kworker/0:3/21678 is trying to acquire lock: 00000000aa5eecdf (&(&rxnet->peer_hash_lock)->rlock){+.-.}, at: spin_lock_bh /./include/linux/spinlock.h:343 [inline] 00000000aa5eecdf (&(&rxnet->peer_hash_lock)->rlock){+.-.}, at: __rxrpc_put_peer /net/rxrpc/peer_object.c:415 [inline] 00000000aa5eecdf (&(&rxnet->peer_hash_lock)->rlock){+.-.}, at: rxrpc_put_peer+0x2d3/0x6a0 /net/rxrpc/peer_object.c:435 but task is already holding lock: 00000000aa5eecdf (&(&rxnet->peer_hash_lock)->rlock){+.-.}, at: spin_lock_bh /./include/linux/spinlock.h:343 [inline] 00000000aa5eecdf (&(&rxnet->peer_hash_lock)->rlock){+.-.}, at: rxrpc_peer_keepalive_dispatch /net/rxrpc/peer_event.c:378 [inline] 00000000aa5eecdf (&(&rxnet->peer_hash_lock)->rlock){+.-.}, at: rxrpc_peer_keepalive_worker+0x6b3/0xd02 /net/rxrpc/peer_event.c:430 Fixes: 330bdcfadcee ("rxrpc: Fix the keepalive generator [ver #2]") Reported-by: syzbot+72af434e4b3417318f84@syzkaller.appspotmail.com Signed-off-by: David Howells Reviewed-by: Marc Dionne Reviewed-by: Jeffrey Altman net/rxrpc/ar-internal.h | 1 + net/rxrpc/peer_event.c | 2 +- net/rxrpc/peer_object.c | 18 ++++++++++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) commit 9dd0b82ef530cdfe805c9f7079c99e104be59a14 Author: David Howells Date: Tue Jul 30 14:38:52 2019 +0100 afs: Fix missing dentry data version updating In the in-kernel afs filesystem, the d_fsdata dentry field is used to hold the data version of the parent directory when it was created or when d_revalidate() last caused it to be updated. This is compared to the ->invalid_before field in the directory inode, rather than the actual data version number, thereby allowing changes due to local edits to be ignored. Only if the server data version gets bumped unexpectedly (eg. by a competing client), do we need to revalidate stuff. However, the d_fsdata field should also be updated if an rpc op is performed that modifies that particular dentry. Such ops return the revised data version of the directory(ies) involved, so we should use that. This is particularly problematic for rename, since a dentry from one directory may be moved directly into another directory (ie. mv a/x b/x). It would then be sporting the wrong data version - and if this is in the future, for the destination directory, revalidations would be missed, leading to foreign renames and hard-link deletion being missed. Fix this by the following means: (1) Return the data version number from operations that read the directory contents - if they issue the read. This starts in afs_dir_iterate() and is used, ignored or passed back by its callers. (2) In afs_lookup*(), set the dentry version to the version returned by (1) before d_splice_alias() is called and the dentry published. (3) In afs_d_revalidate(), set the dentry version to that returned from (1) if an rpc call was issued. This means that if a parallel procedure, such as mkdir(), modifies the directory, we won't accidentally use the data version from that. (4) In afs_{mkdir,create,link,symlink}(), set the new dentry's version to the directory data version before d_instantiate() is called. (5) In afs_{rmdir,unlink}, update the target dentry's version to the directory data version as soon as we've updated the directory inode. (6) In afs_rename(), we need to unhash the old dentry before we start so that we don't get afs_d_revalidate() reverting the version change in cross-directory renames. We then need to set both the old and the new dentry versions the data version of the new directory before we call d_move() as d_move() will rehash them. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: David Howells fs/afs/dir.c | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 70 insertions(+), 14 deletions(-) commit 5dc84855b0fc7e1db182b55c5564fd539d6eff92 Author: David Howells Date: Tue Jul 30 14:38:51 2019 +0100 afs: Only update d_fsdata if different in afs_d_revalidate() In the in-kernel afs filesystem, d_fsdata is set with the data version of the parent directory. afs_d_revalidate() will update this to the current directory version, but it shouldn't do this if it the value it read from d_fsdata is the same as no lock is held and cmpxchg() is not used. Fix the code to only change the value if it is different from the current directory version. Fixes: 260a980317da ("[AFS]: Add "directory write" support.") Signed-off-by: David Howells fs/afs/dir.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 37c0bbb3326674940e657118306ac52364314523 Author: David Howells Date: Tue Jul 30 14:38:51 2019 +0100 afs: Fix off-by-one in afs_rename() expected data version calculation When afs_rename() calculates the expected data version of the target directory in a cross-directory rename, it doesn't increment it as it should, so it always thinks that the target inode is unexpectedly modified on the server. Fixes: a58823ac4589 ("afs: Fix application of status and callback to be under same lock") Signed-off-by: David Howells fs/afs/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a6eed4ab5dd4bfb696c1a3f49742b8d1846a66a0 Author: Jia-Ju Bai Date: Tue Jul 30 14:38:51 2019 +0100 fs: afs: Fix a possible null-pointer dereference in afs_put_read() In afs_read_dir(), there is an if statement on line 255 to check whether req->pages is NULL: if (!req->pages) goto error; If req->pages is NULL, afs_put_read() on line 337 is executed. In afs_put_read(), req->pages[i] is used on line 195. Thus, a possible null-pointer dereference may occur in this case. To fix this possible bug, an if statement is added in afs_put_read() to check req->pages. This bug is found by a static analysis tool STCheck written by us. Fixes: f3ddee8dc4e2 ("afs: Fix directory handling") Signed-off-by: Jia-Ju Bai Signed-off-by: David Howells fs/afs/file.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 4a46fdba449a5cd890271df5a9e23927d519ed00 Author: Marc Dionne Date: Tue Jul 30 14:38:51 2019 +0100 afs: Fix loop index mixup in afs_deliver_vl_get_entry_by_name_u() afs_deliver_vl_get_entry_by_name_u() scans through the vl entry received from the volume location server and builds a return list containing the sites that are currently valid. When assigning values for the return list, the index into the vl entry (i) is used rather than the one for the new list (entry->nr_server). If all sites are usable, this works out fine as the indices will match. If some sites are not valid, for example if AFS_VLSF_DONTUSE is set, fs_mask and the uuid will be set for the wrong return site. Fix this by using entry->nr_server as the index into the arrays being filled in rather than i. This can lead to EDESTADDRREQ errors if none of the returned sites have a valid fs_mask. Fixes: d2ddc776a458 ("afs: Overhaul volume and server record caching and fileserver rotation") Signed-off-by: Marc Dionne Signed-off-by: David Howells Reviewed-by: Jeffrey Altman fs/afs/vlclient.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 2067b2b3f4846402a040286135f98f46f8919939 Author: David Howells Date: Tue Jul 30 14:38:51 2019 +0100 afs: Fix the CB.ProbeUuid service handler to reply correctly Fix the service handler function for the CB.ProbeUuid RPC call so that it replies in the correct manner - that is an empty reply for success and an abort of 1 for failure. Putting 0 or 1 in an integer in the body of the reply should result in the fileserver throwing an RX_PROTOCOL_ERROR abort and discarding its record of the client; older servers, however, don't necessarily check that all the data got consumed, and so might incorrectly think that they got a positive response and associate the client with the wrong host record. If the client is incorrectly associated, this will result in callbacks intended for a different client being delivered to this one and then, when the other client connects and responds positively, all of the callback promises meant for the client that issued the improper response will be lost and it won't receive any further change notifications. Fixes: 9396d496d745 ("afs: support the CB.ProbeUuid RPC op") Signed-off-by: David Howells Reviewed-by: Jeffrey Altman fs/afs/cmservice.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit e1ae72a21e5f0d1846e26e3f5963930664702071 Author: YueHaibing Date: Mon Jul 29 17:05:20 2019 +0800 drm/bridge: tc358764: Fix build error If CONFIG_DRM_TOSHIBA_TC358764=y but CONFIG_DRM_KMS_HELPER=m, building fails: drivers/gpu/drm/bridge/tc358764.o:(.rodata+0x228): undefined reference to `drm_atomic_helper_connector_reset' drivers/gpu/drm/bridge/tc358764.o:(.rodata+0x240): undefined reference to `drm_helper_probe_single_connector_modes' drivers/gpu/drm/bridge/tc358764.o:(.rodata+0x268): undefined reference to `drm_atomic_helper_connector_duplicate_state' drivers/gpu/drm/bridge/tc358764.o:(.rodata+0x270): undefined reference to `drm_atomic_helper_connector_destroy_state' Like TC358767, select DRM_KMS_HELPER to fix this, and change to select DRM_PANEL to avoid recursive dependency. Reported-by: Hulk Robot Fixes: f38b7cca6d0e ("drm/bridge: tc358764: Add DSI to LVDS bridge driver") Signed-off-by: YueHaibing Reviewed-by: Laurent Pinchart Reviewed-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20190729090520.25968-1-yuehaibing@huawei.com drivers/gpu/drm/bridge/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit eef347f846ee8f7296a6f84e3866c057ca6bcce0 Author: Johannes Berg Date: Tue Jul 30 14:52:07 2019 +0200 Revert "mac80211: set NETIF_F_LLTX when using intermediate tx queues" Revert this for now, it has been reported multiple times that it completely breaks connectivity on various devices. Cc: stable@vger.kernel.org Fixes: 8dbb000ee73b ("mac80211: set NETIF_F_LLTX when using intermediate tx queues") Reported-by: Jean Delvare Reported-by: Peter Lebbing Signed-off-by: Johannes Berg net/mac80211/iface.c | 1 - 1 file changed, 1 deletion(-) commit f4cc743a98136df3c3763050a0e8223b52d9a960 Author: YueHaibing Date: Mon Jul 29 15:12:16 2019 +0800 drm/bridge: lvds-encoder: Fix build error while CONFIG_DRM_KMS_HELPER=m If DRM_LVDS_ENCODER=y but CONFIG_DRM_KMS_HELPER=m, build fails: drivers/gpu/drm/bridge/lvds-encoder.o: In function `lvds_encoder_probe': lvds-encoder.c:(.text+0x155): undefined reference to `devm_drm_panel_bridge_add' Reported-by: Hulk Robot Fixes: dbb58bfd9ae6 ("drm/bridge: Fix lvds-encoder since the panel_bridge rework.") Signed-off-by: YueHaibing Reviewed-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20190729071216.27488-1-yuehaibing@huawei.com drivers/gpu/drm/bridge/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 46c42d844211ef5902e32aa507beac0817c585e9 Author: Brian Norris Date: Mon Jul 29 13:49:54 2019 -0700 driver core: platform: return -ENXIO for missing GpioInt Commit daaef255dc96 ("driver: platform: Support parsing GpioInt 0 in platform_get_irq()") broke the Embedded Controller driver on most LPC Chromebooks (i.e., most x86 Chromebooks), because cros_ec_lpc expects platform_get_irq() to return -ENXIO for non-existent IRQs. Unfortunately, acpi_dev_gpio_irq_get() doesn't follow this convention and returns -ENOENT instead. So we get this error from cros_ec_lpc: couldn't retrieve IRQ number (-2) I see a variety of drivers that treat -ENXIO specially, so rather than fix all of them, let's fix up the API to restore its previous behavior. I reported this on v2 of this patch: https://lore.kernel.org/lkml/20190220180538.GA42642@google.com/ but apparently the patch had already been merged before v3 got sent out: https://lore.kernel.org/lkml/20190221193429.161300-1-egranata@chromium.org/ and the result is that the bug landed and remains unfixed. I differ from the v3 patch by: * allowing for ret==0, even though acpi_dev_gpio_irq_get() specifically documents (and enforces) that 0 is not a valid return value (noted on the v3 review) * adding a small comment Reported-by: Brian Norris Reported-by: Salvatore Bellizzi Cc: Enrico Granata Cc: Fixes: daaef255dc96 ("driver: platform: Support parsing GpioInt 0 in platform_get_irq()") Signed-off-by: Brian Norris Reviewed-by: Andy Shevchenko Acked-by: Enrico Granata Link: https://lore.kernel.org/r/20190729204954.25510-1-briannorris@chromium.org Signed-off-by: Greg Kroah-Hartman drivers/base/platform.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 7cdc4412284777c76c919e2ab33b3b8dbed18559 Merge: 3b48300d5cc7 6c1f7e2c1b96 Author: Pablo Neira Ayuso Date: Tue Jul 30 13:39:20 2019 +0200 Merge branch 'master' of git://blackhole.kfki.hu/nf Jozsef Kadlecsik says: ==================== ipset patches for the nf tree - When the support of destination MAC addresses for hash:mac sets was introduced, it was forgotten to add the same functionality to hash:ip,mac types of sets. The patch from Stefano Brivio adds the missing part. - When the support of destination MAC addresses for hash:mac sets was introduced, a copy&paste error was made in the code of the hash:ip,mac and bitmap:ip,mac types: the MAC address in these set types is in the second position and not in the first one. Stefano Brivio's patch fixes the issue. - There was still a not properly handled concurrency handling issue between renaming and listing sets at the same time, reported by Shijie Luo. ==================== Signed-off-by: Pablo Neira Ayuso commit 3b48300d5cc7c7bed63fddb006c4046549ed4aec Author: Florian Westphal Date: Mon Jul 29 17:58:10 2019 +0200 netfilter: ebtables: also count base chain policies ebtables doesn't include the base chain policies in the rule count, so we need to add them manually when we call into the x_tables core to allocate space for the comapt offset table. This lead syzbot to trigger: WARNING: CPU: 1 PID: 9012 at net/netfilter/x_tables.c:649 xt_compat_add_offset.cold+0x11/0x36 net/netfilter/x_tables.c:649 Reported-by: syzbot+276ddebab3382bbf72db@syzkaller.appspotmail.com Fixes: 2035f3ff8eaa ("netfilter: ebtables: compat: un-break 32bit setsockopt when no rules are present") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/bridge/netfilter/ebtables.c | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) commit da1115fdbd6e86c62185cdd2b4bf7add39f2f82b Author: Aneesh Kumar K.V Date: Mon Jul 29 15:21:28 2019 +0530 powerpc/nvdimm: Pick nearby online node if the device node is not online Currently, nvdimm subsystem expects the device numa node for SCM device to be an online node. It also doesn't try to bring the device numa node online. Hence if we use a non-online numa node as device node we hit crashes like below. This is because we try to access uninitialized NODE_DATA in different code paths. cpu 0x0: Vector: 300 (Data Access) at [c0000000fac53170] pc: c0000000004bbc50: ___slab_alloc+0x120/0xca0 lr: c0000000004bc834: __slab_alloc+0x64/0xc0 sp: c0000000fac53400 msr: 8000000002009033 dar: 73e8 dsisr: 80000 current = 0xc0000000fabb6d80 paca = 0xc000000003870000 irqmask: 0x03 irq_happened: 0x01 pid = 7, comm = kworker/u16:0 Linux version 5.2.0-06234-g76bd729b2644 (kvaneesh@ltc-boston123) (gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1)) #135 SMP Thu Jul 11 05:36:30 CDT 2019 enter ? for help [link register ] c0000000004bc834 __slab_alloc+0x64/0xc0 [c0000000fac53400] c0000000fac53480 (unreliable) [c0000000fac53500] c0000000004bc818 __slab_alloc+0x48/0xc0 [c0000000fac53560] c0000000004c30a0 __kmalloc_node_track_caller+0x3c0/0x6b0 [c0000000fac535d0] c000000000cfafe4 devm_kmalloc+0x74/0xc0 [c0000000fac53600] c000000000d69434 nd_region_activate+0x144/0x560 [c0000000fac536d0] c000000000d6b19c nd_region_probe+0x17c/0x370 [c0000000fac537b0] c000000000d6349c nvdimm_bus_probe+0x10c/0x230 [c0000000fac53840] c000000000cf3cc4 really_probe+0x254/0x4e0 [c0000000fac538d0] c000000000cf429c driver_probe_device+0x16c/0x1e0 [c0000000fac53950] c000000000cf0b44 bus_for_each_drv+0x94/0x130 [c0000000fac539b0] c000000000cf392c __device_attach+0xdc/0x200 [c0000000fac53a50] c000000000cf231c bus_probe_device+0x4c/0xf0 [c0000000fac53a90] c000000000ced268 device_add+0x528/0x810 [c0000000fac53b60] c000000000d62a58 nd_async_device_register+0x28/0xa0 [c0000000fac53bd0] c0000000001ccb8c async_run_entry_fn+0xcc/0x1f0 [c0000000fac53c50] c0000000001bcd9c process_one_work+0x46c/0x860 [c0000000fac53d20] c0000000001bd4f4 worker_thread+0x364/0x5f0 [c0000000fac53db0] c0000000001c7260 kthread+0x1b0/0x1c0 [c0000000fac53e20] c00000000000b954 ret_from_kernel_thread+0x5c/0x68 The patch tries to fix this by picking the nearest online node as the SCM node. This does have a problem of us losing the information that SCM node is equidistant from two other online nodes. If applications need to understand these fine-grained details we should express then like x86 does via /sys/devices/system/node/nodeX/accessY/initiators/ With the patch we get # numactl -H available: 2 nodes (0-1) node 0 cpus: node 0 size: 0 MB node 0 free: 0 MB node 1 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 node 1 size: 130865 MB node 1 free: 129130 MB node distances: node 0 1 0: 10 20 1: 20 10 # cat /sys/bus/nd/devices/region0/numa_node 0 # dmesg | grep papr_scm [ 91.332305] papr_scm ibm,persistent-memory:ibm,pmemory@44104001: Region registered with target node 2 and online node 0 Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190729095128.23707-1-aneesh.kumar@linux.ibm.com arch/powerpc/platforms/pseries/papr_scm.c | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) commit 5d78e1c2b7f4be00bbe62141603a631dc7812f35 Author: Hillf Danton Date: Tue Jul 30 17:24:36 2019 +0800 ALSA: usb-audio: Fix gpf in snd_usb_pipe_sanity_check syzbot found the following crash on: general protection fault: 0000 [#1] SMP KASAN RIP: 0010:snd_usb_pipe_sanity_check+0x80/0x130 sound/usb/helper.c:75 Call Trace: snd_usb_motu_microbookii_communicate.constprop.0+0xa0/0x2fb sound/usb/quirks.c:1007 snd_usb_motu_microbookii_boot_quirk sound/usb/quirks.c:1051 [inline] snd_usb_apply_boot_quirk.cold+0x163/0x370 sound/usb/quirks.c:1280 usb_audio_probe+0x2ec/0x2010 sound/usb/card.c:576 usb_probe_interface+0x305/0x7a0 drivers/usb/core/driver.c:361 really_probe+0x281/0x650 drivers/base/dd.c:548 .... It was introduced in commit 801ebf1043ae for checking pipe and endpoint types. It is fixed by adding a check of the ep pointer in question. BugLink: https://syzkaller.appspot.com/bug?extid=d59c4387bfb6eced94e2 Reported-by: syzbot Fixes: 801ebf1043ae ("ALSA: usb-audio: Sanity checks for each pipe and EP types") Cc: Andrey Konovalov Signed-off-by: Hillf Danton Signed-off-by: Takashi Iwai sound/usb/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fab7772bfbcfe8fb8e3e352a6a8fcaf044cded17 Author: Anthony Iliopoulos Date: Mon Jul 29 14:40:40 2019 +0200 nvme-multipath: revalidate nvme_ns_head gendisk in nvme_validate_ns When CONFIG_NVME_MULTIPATH is set, only the hidden gendisk associated with the per-controller ns is run through revalidate_disk when a rescan is triggered, while the visible blockdev never gets its size (bdev->bd_inode->i_size) updated to reflect any capacity changes that may have occurred. This prevents online resizing of nvme block devices and in extension of any filesystems atop that will are unable to expand while mounted, as userspace relies on the blockdev size for obtaining the disk capacity (via BLKGETSIZE/64 ioctls). Fix this by explicitly revalidating the actual namespace gendisk in addition to the per-controller gendisk, when multipath is enabled. Signed-off-by: Anthony Iliopoulos Reviewed-by: Sagi Grimberg Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 1 + 1 file changed, 1 insertion(+) commit 12ca7297b8855c0af1848503d37196159b24e6b9 Author: Li Jun Date: Wed Jul 17 16:06:46 2019 +0800 usb: typec: tcpm: remove tcpm dir if no children If config tcpm as module, module unload will not remove tcpm dir, then the next module load will have problem: the rootdir is NULL but tcpm dir is still there, so tcpm_debugfs_init() will create tcpm dir again with failure, fix it by remove the tcpm dir if no children. Cc: stable@vger.kernel.org # v4.15+ Fixes: 4b4e02c83167 ("typec: tcpm: Move out of staging") Signed-off-by: Li Jun Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20190717080646.30421-2-jun.li@nxp.com Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/tcpm/tcpm.c | 4 ++++ 1 file changed, 4 insertions(+) commit fd5da3e2cc61b4a7c877172fdc9348c82cf6ccfc Author: Li Jun Date: Wed Jul 17 16:06:45 2019 +0800 usb: typec: tcpm: free log buf memory when remove debug file The logbuffer memory should be freed when remove debug file. Cc: stable@vger.kernel.org # v4.15+ Fixes: 4b4e02c83167 ("typec: tcpm: Move out of staging") Signed-off-by: Li Jun Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20190717080646.30421-1-jun.li@nxp.com Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/tcpm/tcpm.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 1957de95d425d1c06560069dc7277a73a8b28683 Author: Guenter Roeck Date: Wed Jul 24 07:38:32 2019 -0700 usb: typec: tcpm: Add NULL check before dereferencing config When instantiating tcpm on an NXP OM 13588 board with NXP PTN5110, the following crash is seen when writing into the 'preferred_role' sysfs attribute. Unable to handle kernel NULL pointer dereference at virtual address 00000028 pgd = f69149ad [00000028] *pgd=00000000 Internal error: Oops: 5 [#1] THUMB2 Modules linked in: tcpci tcpm CPU: 0 PID: 1882 Comm: bash Not tainted 5.1.18-sama5-armv7-r2 #4 Hardware name: Atmel SAMA5 PC is at tcpm_try_role+0x3a/0x4c [tcpm] LR is at tcpm_try_role+0x15/0x4c [tcpm] pc : [] lr : [] psr: 60030033 sp : dc1a1e88 ip : c03fb47d fp : 00000000 r10: dc216190 r9 : dc1a1f78 r8 : 00000001 r7 : df4ae044 r6 : dd032e90 r5 : dd1ce340 r4 : df4ae054 r3 : 00000000 r2 : 00000000 r1 : 00000000 r0 : df4ae044 Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA Thumb Segment none Control: 50c53c7d Table: 3efec059 DAC: 00000051 Process bash (pid: 1882, stack limit = 0x6a6d4aa5) Stack: (0xdc1a1e88 to 0xdc1a2000) 1e80: dd05d808 dd1ce340 00000001 00000007 dd1ce340 c03fb4a7 1ea0: 00000007 00000007 dc216180 00000000 00000000 c01e1e03 00000000 00000000 1ec0: c0907008 dee98b40 c01e1d5d c06106c4 00000000 00000000 00000007 c0194e8b 1ee0: 0000000a 00000400 00000000 c01a97db dc22bf00 ffffe000 df4b6a00 df745900 1f00: 00000001 00000001 000000dd c01a9c2f 7aeab3be c0907008 00000000 dc22bf00 1f20: c0907008 00000000 00000000 00000000 00000000 7aeab3be 00000007 dee98b40 1f40: 005dc318 dc1a1f78 00000000 00000000 00000007 c01969f7 0000000a c01a20cb 1f60: dee98b40 c0907008 dee98b40 005dc318 00000000 c0196b9b 00000000 00000000 1f80: dee98b40 7aeab3be 00000074 005dc318 b6f3bdb0 00000004 c0101224 dc1a0000 1fa0: 00000004 c0101001 00000074 005dc318 00000001 005dc318 00000007 00000000 1fc0: 00000074 005dc318 b6f3bdb0 00000004 00000007 00000007 00000000 00000000 1fe0: 00000004 be800880 b6ed35b3 b6e5c746 60030030 00000001 00000000 00000000 [] (tcpm_try_role [tcpm]) from [] (preferred_role_store+0x2b/0x5c) [] (preferred_role_store) from [] (kernfs_fop_write+0xa7/0x150) [] (kernfs_fop_write) from [] (__vfs_write+0x1f/0x104) [] (__vfs_write) from [] (vfs_write+0x6b/0x104) [] (vfs_write) from [] (ksys_write+0x43/0x94) [] (ksys_write) from [] (ret_fast_syscall+0x1/0x62) Since commit 96232cbc6c994 ("usb: typec: tcpm: support get typec and pd config from device properties"), the 'config' pointer in struct tcpc_dev is optional when registering a Type-C port. Since it is optional, we have to check if it is NULL before dereferencing it. Reported-by: Douglas Gilbert Cc: Douglas Gilbert Fixes: 96232cbc6c994 ("usb: typec: tcpm: support get typec and pd config from device properties") Signed-off-by: Guenter Roeck Cc: stable Reviewed-by: Jun Li Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/1563979112-22483-1-git-send-email-linux@roeck-us.net Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/tcpm/tcpm.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 38f054d549a869f22a02224cd276a27bf14b6171 Author: Jessica Yu Date: Tue Jul 23 15:26:28 2019 +0200 modules: always page-align module section allocations Some arches (e.g., arm64, x86) have moved towards non-executable module_alloc() allocations for security hardening reasons. That means that the module loader will need to set the text section of a module to executable, regardless of whether or not CONFIG_STRICT_MODULE_RWX is set. When CONFIG_STRICT_MODULE_RWX=y, module section allocations are always page-aligned to handle memory rwx permissions. On some arches with CONFIG_STRICT_MODULE_RWX=n however, when setting the module text to executable, the BUG_ON() in frob_text() gets triggered since module section allocations are not page-aligned when CONFIG_STRICT_MODULE_RWX=n. Since the set_memory_* API works with pages, and since we need to call set_memory_x() regardless of whether CONFIG_STRICT_MODULE_RWX is set, we might as well page-align all module section allocations for ease of managing rwx permissions of module sections (text, rodata, etc). Fixes: 2eef1399a866 ("modules: fix BUG when load module with rodata=n") Reported-by: Martin Kaiser Reported-by: Bartosz Golaszewski Tested-by: David Lechner Tested-by: Martin Kaiser Tested-by: Bartosz Golaszewski Signed-off-by: Jessica Yu kernel/module.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit cf4a459031f23ebb0c3d0b9edd55cb3a1a71a5b7 Merge: 89f5752307cf 418741480809 Author: Jani Nikula Date: Tue Jul 30 11:26:05 2019 +0300 Merge tag 'gvt-fixes-2019-07-30' of https://github.com/intel/gvt-linux into drm-intel-fixes gvt-fixes-2019-07-30 - Guard against potential ggtt access error (Xiong) - Fix includecheck (Zhenyu) - Fix cache entry for guest page mapping found by 2M ppgtt guest (Xiaolin) - Fix runtime pm warning (Xiaolin) - Fix shadow mm settlement for Windows guest reset failure (Colin) Signed-off-by: Jani Nikula From: Zhenyu Wang Link: https://patchwork.freedesktop.org/patch/msgid/20190730070020.GX8319@zhen-hp.sh.intel.com commit d21a95e0ef3e06e403f296c3a409b307c47bdd08 Merge: 609488bc979f 2aa4e410795c Author: Greg Kroah-Hartman Date: Tue Jul 30 09:06:46 2019 +0200 Merge tag 'misc-habanalabs-fixes-2019-07-29' of git://people.freedesktop.org/~gabbayo/linux into char-misc-next Oded writes: This tag contains two fixes when running in BE architecture: - Fix for F/W download. The F/W is in LE so use a function that doesn't do bytw-swapping. - Fix for polling on host memory locations that are written by the device. The device always works in LE, so we need to do byte-swap when polling on those locations. * tag 'misc-habanalabs-fixes-2019-07-29' of git://people.freedesktop.org/~gabbayo/linux: habanalabs: fix host memory polling in BE architecture habanalabs: fix F/W download in BE architecture commit 4187414808095f645ca0661f8dde77617e2e7cb3 Author: Colin Xu Date: Thu Jul 4 16:45:06 2019 +0800 drm/i915/gvt: Adding ppgtt to GVT GEM context after shadow pdps settled. Windows guest can't run after force-TDR with host log: ... gvt: vgpu 1: workload shadow ppgtt isn't ready gvt: vgpu 1: fail to dispatch workload, skip ... The error is raised by set_context_ppgtt_from_shadow(), when it checks and found the shadow_mm isn't marked as shadowed. In work thread before each submission, a shadow_mm is set to shadowed in: shadow_ppgtt_mm() <-intel_vgpu_pin_mm() <-prepare_workload() <-dispatch_workload() <-workload_thread() However checking whether or not shadow_mm is shadowed is prior to it: set_context_ppgtt_from_shadow() <-dispatch_workload() <-workload_thread() In normal case, create workload will check the existence of shadow_mm, if not it will create a new one and marked as shadowed. If already exist it will reuse the old one. Since shadow_mm is reused, checking of shadowed in set_context_ppgtt_from_shadow() actually always see the state set in creation, but not the state set in intel_vgpu_pin_mm(). When force-TDR, all engines are reset, since it's not dmlr level, all ppgtt_mm are invalidated but not destroyed. Invalidation will mark all reused shadow_mm as not shadowed but still keeps in ppgtt_mm_list_head. If workload submission phase those shadow_mm are reused with shadowed not set, then set_context_ppgtt_from_shadow() will report error. Pin for context after shadow_mm pinned and shadow pdps settled. v2: Move set_context_ppgtt_from_shadow() after prepare_workload(). (zhenyu) v3: Move set_context_ppgtt_from_shadow() after shadow pdps updated.(zhenyu) Fixes: 4f15665ccbba ("drm/i915: Add ppgtt to GVT GEM context") Cc: stable@vger.kernel.org Signed-off-by: Colin Xu Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/scheduler.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) commit ef5b0b444e6297d03ac0bdc0c82f65396ef4dccd Author: Xiaolin Zhang Date: Thu Jun 20 10:29:24 2019 -0400 drm/i915/gvt: grab runtime pm first for forcewake use in workload_thread, it should grab runtime pm wakelock and later uncore forcewake get will check rpm wakelock held successfully. otherwise, sometimes, rpm wakelock not hold and print call trace below: Call Trace: intel_uncore_forcewake_get+0x15/0x20 [i915] workload_thread+0x5f9/0x16f0 [i915] ? __switch_to_asm+0x34/0x70 ? __switch_to_asm+0x40/0x70 ? __switch_to_asm+0x34/0x70 ? __switch_to_asm+0x40/0x70 ? __switch_to_asm+0x34/0x70 ? __switch_to+0x85/0x3f0 ? __switch_to_asm+0x40/0x70 ? do_wait_intr_irq+0x90/0x90 kthread+0x121/0x140 ? intel_vgpu_clean_workloads+0x100/0x100 [i915] ? kthread_park+0x90/0x90 ret_from_fork+0x35/0x40 --[ end trace 86525f742a02e12c ]-- v2: adapted to use rpm structure. Fixes: 251d46b0875c ("drm/i915/gvt: Pin the per-engine GVT shadow contexts") Reviewed-by: Zhenyu Wang Signed-off-by: Xiaolin Zhang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/scheduler.c | 4 ++++ 1 file changed, 4 insertions(+) commit 7366aeb77cd840f3edea02c65065d40affaa7f45 Author: Xiaolin Zhang Date: Thu Jul 18 01:10:24 2019 +0800 drm/i915/gvt: fix incorrect cache entry for guest page mapping GPU hang observed during the guest OCL conformance test which is caused by THP GTT feature used durning the test. It was observed the same GFN with different size (4K and 2M) requested from the guest in GVT. So during the guest page dma map stage, it is required to unmap first with orginal size and then remap again with requested size. Fixes: b901b252b6cf ("drm/i915/gvt: Add 2M huge gtt support") Cc: stable@vger.kernel.org Reviewed-by: Zhenyu Wang Signed-off-by: Xiaolin Zhang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/kvmgt.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 2089a76ade9005a06c5e08e8454f45f3625fdc1c Author: Xiong Zhang Date: Mon May 27 13:45:53 2019 +0800 drm/i915/gvt: Checking workload's gma earlier Workload contains RB and WA_CTX which are in ggtt space, if they aren't in valid ggtt space, the workload shouldn't be shadowed and scanned. So checking them earlier to avoid shadow them. Reviewed-by: Zhenyu Wang Signed-off-by: Xiong Zhang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/cmd_parser.c | 10 ---------- drivers/gpu/drm/i915/gvt/scheduler.c | 28 ++++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 10 deletions(-) commit c25144098bee19b089c8a37c54517bf467f06403 Author: Xiong Zhang Date: Mon May 27 13:45:52 2019 +0800 drm/i915/gvt: Don't use ggtt_validdate_range() with size=0 Use vgpu_gmadr_is_valid() directly instead. Reviewed-by: Zhenyu Wang Signed-off-by: Xiong Zhang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/fb_decoder.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d18fd0576e05a4b03b588e131093b0437fccb75f Author: Xiong Zhang Date: Mon May 27 13:45:51 2019 +0800 drm/i915/gvt: Warning for invalid ggtt access Instead of silently return virtual ggtt entries that guest is allowed to access, this patch add extra range check. If guest read out of range, it will print a warning and return 0. If guest write out of range, the write will be dropped without any message. Reviewed-by: Zhenyu Wang Signed-off-by: Xiong Zhang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gtt.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit c00f9c6b79f7e1c5caf774c38e9fd5dad2d2ef1c Author: Zhenyu Wang Date: Wed Jun 12 11:17:46 2019 +0800 drm/i915/gvt: remove duplicate include of trace.h This removes duplicate include of trace.h. Found by Hariprasad Kelam with includecheck. Reported-by: Hariprasad Kelam Reviewed-by: Yan Zhao Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/trace_points.c | 2 -- 1 file changed, 2 deletions(-) commit d478418703d6bcdd163d5d8127683c6c471539f0 Author: Hannes Reinecke Date: Wed Jul 24 11:00:56 2019 +0200 scsi: fcoe: pass in fcoe_rport structure instead of fc_rport_priv Instead of using the generic 'fc_rport_priv' structure as argument and then having to painstakingly outcast this to fcoe_rport we should be passing the fcoe_rport structure itself and reduce complexity. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/fcoe/fcoe_ctlr.c | 99 ++++++++++++++++++++++--------------------- 1 file changed, 51 insertions(+), 48 deletions(-) commit 023358b136d490ca91735ac6490db3741af5a8bd Author: Hannes Reinecke Date: Wed Jul 24 11:00:55 2019 +0200 scsi: fcoe: Embed fc_rport_priv in fcoe_rport structure Gcc-9 complains for a memset across pointer boundaries, which happens as the code tries to allocate a flexible array on the stack. Turns out we cannot do this without relying on gcc-isms, so with this patch we'll embed the fc_rport_priv structure into fcoe_rport, can use the normal 'container_of' outcast, and will only have to do a memset over one structure. Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/fcoe/fcoe_ctlr.c | 51 +++++++++++++++++-------------------------- drivers/scsi/libfc/fc_rport.c | 5 ++++- include/scsi/libfcoe.h | 1 + 3 files changed, 25 insertions(+), 32 deletions(-) commit f3e4ff28b8685d856f381ee6bcf88b6149a6db5b Author: Hannes Reinecke Date: Wed Jul 24 11:00:54 2019 +0200 scsi: libfc: Whitespace cleanup in libfc.h No functional change. [mkp: typo] Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen include/scsi/libfc.h | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) commit a20961cc9493be46b5c4f565b925284a90c7864c Author: Gustavo A. R. Silva Date: Mon Jul 29 17:10:16 2019 -0500 net: smc911x: Mark expected switch fall-through Mark switch cases where we are expecting to fall through. This patch fixes the following warning (Building: arm): drivers/net/ethernet/smsc/smc911x.c: In function ‘smc911x_phy_detect’: drivers/net/ethernet/smsc/smc911x.c:677:7: warning: this statement may fall through [-Wimplicit-fallthrough=] if (cfg & HW_CFG_EXT_PHY_DET_) { ^ drivers/net/ethernet/smsc/smc911x.c:715:3: note: here default: ^~~~~~~ Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller drivers/net/ethernet/smsc/smc911x.c | 1 + 1 file changed, 1 insertion(+) commit 71d6c505b4d9e6f76586350450e785e3d452b346 Author: Kees Cook Date: Mon Jul 29 14:47:22 2019 -0700 libata: zpodd: Fix small read overflow in zpodd_get_mech_type() Jeffrin reported a KASAN issue: BUG: KASAN: global-out-of-bounds in ata_exec_internal_sg+0x50f/0xc70 Read of size 16 at addr ffffffff91f41f80 by task scsi_eh_1/149 ... The buggy address belongs to the variable: cdb.48319+0x0/0x40 Much like commit 18c9a99bce2a ("libata: zpodd: small read overflow in eject_tray()"), this fixes a cdb[] buffer length, this time in zpodd_get_mech_type(): We read from the cdb[] buffer in ata_exec_internal_sg(). It has to be ATAPI_CDB_LEN (16) bytes long, but this buffer is only 12 bytes. Reported-by: Jeffrin Jose T Fixes: afe759511808c ("libata: identify and init ZPODD devices") Link: https://lore.kernel.org/lkml/201907181423.E808958@keescook/ Tested-by: Jeffrin Jose T Reviewed-by: Nick Desaulniers Signed-off-by: Kees Cook Signed-off-by: Jens Axboe drivers/ata/libata-zpodd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8c4407de3be44c2a0ec3e316cd3e4a711bc2aaba Author: YueHaibing Date: Thu Jul 11 22:24:57 2019 +0800 pinctrl: aspeed: Make aspeed_pinmux_ips static Fix sparse warning: drivers/pinctrl/aspeed/pinmux-aspeed.c:8:12: warning: symbol 'aspeed_pinmux_ips' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20190711142457.37028-1-yuehaibing@huawei.com Reviewed-by: Andrew Jeffery Signed-off-by: Linus Walleij drivers/pinctrl/aspeed/pinmux-aspeed.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7be21763f703d0f7e878283ec31e52b225097449 Author: Gustavo A. R. Silva Date: Mon Jul 29 16:10:53 2019 -0500 ataflop: Mark expected switch fall-through Mark switch cases where we are expecting to fall through. This patch fixes the following warning (Building: m68k): drivers/block/ataflop.c: In function ‘fd_locked_ioctl’: drivers/block/ataflop.c:1728:3: warning: this statement may fall through [-Wimplicit-fallthrough=] set_capacity(floppy->disk, MAX_DISK_SIZE * 2); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/block/ataflop.c:1729:2: note: here case FDFMTEND: ^~~~ Signed-off-by: Gustavo A. R. Silva Signed-off-by: Jens Axboe drivers/block/ataflop.c | 1 + 1 file changed, 1 insertion(+) commit b3c303be4c35856945cb17ec639b94637447dae2 Merge: 2a11c76e5301 8aa259b10a6a Author: Ingo Molnar Date: Mon Jul 29 23:24:07 2019 +0200 Merge tag 'perf-urgent-for-mingo-5.3-20190729' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/urgent fixes from Arnaldo Carvalho de Melo: perf header: Vince Weaver: - Fix divide by zero error if f_header.attr_size==0, found using a perf tool fuzzer. Numfor Mbiziwo-Tiapo: - Silence use of uninitialized value warning pointed out by clang's MSAN tool. libbpf: Andrii Nakryiko: - Fix missing __WORDSIZE definition in some systems, such as musl libc (Alpine Linux). tools header UAPI: Arnaldo Carvalho de Melo: - Sync headers to address perf build warnings: - syscalls_64.tbl and generic unistd.h to pick up clone3 and pidfd_open. - With new ioctls: kvm.h, drm.h and usbdevice_fs.h. - No tooling change: mman.h, sched.h and if_link.h. Documentation: Vince Weaver: - Fix perf.data documentation units for memory size, its kB, not bytes. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 7bd6ba4ef4b29db7464da496963081f5fdc88300 Author: Gustavo A. R. Silva Date: Mon Jul 29 15:12:31 2019 -0500 net: hamradio: baycom_epp: Mark expected switch fall-through Mark switch cases where we are expecting to fall through. This patch fixes the following warning (Building: i386): drivers/net/hamradio/baycom_epp.c: In function ‘transmit’: drivers/net/hamradio/baycom_epp.c:491:7: warning: this statement may fall through [-Wimplicit-fallthrough=] if (i) { ^ drivers/net/hamradio/baycom_epp.c:504:3: note: here default: /* fall through */ ^~~~~~~ Notice that, in this particular case, the code comment is modified in accordance with what GCC is expecting to find. Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller drivers/net/hamradio/baycom_epp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0bc10ad3a42a1c8ef2cef6e158cc40b87c46352d Author: Gustavo A. R. Silva Date: Mon Jul 29 15:01:39 2019 -0500 net: wan: sdla: Mark expected switch fall-through Mark switch cases where we are expecting to fall through. This patch fixes the following warning (Building: i386): drivers/net/wan/sdla.c: In function ‘sdla_errors’: drivers/net/wan/sdla.c:414:7: warning: this statement may fall through [-Wimplicit-fallthrough=] if (cmd == SDLA_INFORMATION_WRITE) ^ drivers/net/wan/sdla.c:417:3: note: here default: ^~~~~~~ Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller drivers/net/wan/sdla.c | 1 + 1 file changed, 1 insertion(+) commit d4e575ba9fcc04d10c0a2e555a5b32fa3a8a19d3 Author: Enrico Weigelt Date: Mon Jul 29 20:55:21 2019 +0200 net: sctp: drop unneeded likely() call around IS_ERR() IS_ERR() already calls unlikely(), so this extra unlikely() call around IS_ERR() is not needed. Signed-off-by: Enrico Weigelt Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/socket.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c6b36bdd04b5c22b2705f7ae561d4f3b4d8a0ac3 Author: Petr Machata Date: Mon Jul 29 18:26:14 2019 +0000 mlxsw: spectrum_ptp: Increase parsing depth when PTP is enabled Spectrum systems have a configurable limit on how far into the packet they parse. By default, the limit is 96 bytes. An IPv6 PTP packet is layered as Ethernet/IPv6/UDP (14+40+8 bytes), and sequence ID of a PTP event is only available 32 bytes into payload, for a total of 94 bytes. When an additional 802.1q header is present as well (such as when ptp4l is running on a VLAN port), the parsing limit is exceeded. Such packets are not recognized as PTP, and are not timestamped. Therefore generalize the current VXLAN-specific parsing depth setting to allow reference-counted requests from other modules as well. Keep it in the VXLAN module, because the MPRS register also configures UDP destination port number used for VXLAN, and is thus closely tied to the VXLAN code anyway. Then invoke the new interfaces from both VXLAN (in obvious places), as well as from PTP code, when the (global) timestamping configuration changes from disabled to enabled or vice versa. Fixes: 8748642751ed ("mlxsw: spectrum: PTP: Support SIOCGHWTSTAMP, SIOCSHWTSTAMP ioctls") Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 4 ++ drivers/net/ethernet/mellanox/mlxsw/spectrum_nve.c | 1 + drivers/net/ethernet/mellanox/mlxsw/spectrum_nve.h | 1 + .../ethernet/mellanox/mlxsw/spectrum_nve_vxlan.c | 76 +++++++++++++++++----- drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c | 17 +++++ 5 files changed, 82 insertions(+), 17 deletions(-) commit 6c1f7e2c1b96ab9b09ac97c4df2bd9dc327206f6 Author: Jozsef Kadlecsik Date: Tue Jul 23 10:25:55 2019 +0200 netfilter: ipset: Fix rename concurrency with listing Shijie Luo reported that when stress-testing ipset with multiple concurrent create, rename, flush, list, destroy commands, it can result ipset : Broken LIST kernel message: missing DATA part! error messages and broken list results. The problem was the rename operation was not properly handled with respect of listing. The patch fixes the issue. Reported-by: Shijie Luo Signed-off-by: Jozsef Kadlecsik net/netfilter/ipset/ip_set_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1b4a75108d5bc153daf965d334e77e8e94534f96 Author: Stefano Brivio Date: Mon Jun 24 15:20:12 2019 +0200 netfilter: ipset: Copy the right MAC address in bitmap:ip,mac and hash:ip,mac sets In commit 8cc4ccf58379 ("ipset: Allow matching on destination MAC address for mac and ipmac sets"), ipset.git commit 1543514c46a7, I added to the KADT functions for sets matching on MAC addreses the copy of source or destination MAC address depending on the configured match. This was done correctly for hash:mac, but for hash:ip,mac and bitmap:ip,mac, copying and pasting the same code block presents an obvious problem: in these two set types, the MAC address is the second dimension, not the first one, and we are actually selecting the MAC address depending on whether the first dimension (IP address) specifies source or destination. Fix this by checking for the IPSET_DIM_TWO_SRC flag in option flags. This way, mixing source and destination matches for the two dimensions of ip,mac set types works as expected. With this setup: ip netns add A ip link add veth1 type veth peer name veth2 netns A ip addr add 192.0.2.1/24 dev veth1 ip -net A addr add 192.0.2.2/24 dev veth2 ip link set veth1 up ip -net A link set veth2 up dst=$(ip netns exec A cat /sys/class/net/veth2/address) ip netns exec A ipset create test_bitmap bitmap:ip,mac range 192.0.0.0/16 ip netns exec A ipset add test_bitmap 192.0.2.1,${dst} ip netns exec A iptables -A INPUT -m set ! --match-set test_bitmap src,dst -j DROP ip netns exec A ipset create test_hash hash:ip,mac ip netns exec A ipset add test_hash 192.0.2.1,${dst} ip netns exec A iptables -A INPUT -m set ! --match-set test_hash src,dst -j DROP ipset correctly matches a test packet: # ping -c1 192.0.2.2 >/dev/null # echo $? 0 Reported-by: Chen Yi Fixes: 8cc4ccf58379 ("ipset: Allow matching on destination MAC address for mac and ipmac sets") Signed-off-by: Stefano Brivio Signed-off-by: Jozsef Kadlecsik net/netfilter/ipset/ip_set_bitmap_ipmac.c | 2 +- net/netfilter/ipset/ip_set_hash_ipmac.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit b89d15480d0cacacae1a0fe0b3da01b529f2914f Author: Stefano Brivio Date: Mon Jun 24 15:20:11 2019 +0200 netfilter: ipset: Actually allow destination MAC address for hash:ip,mac sets too In commit 8cc4ccf58379 ("ipset: Allow matching on destination MAC address for mac and ipmac sets"), ipset.git commit 1543514c46a7, I removed the KADT check that prevents matching on destination MAC addresses for hash:mac sets, but forgot to remove the same check for hash:ip,mac set. Drop this check: functionality is now commented in man pages and there's no reason to restrict to source MAC address matching anymore. Reported-by: Chen Yi Fixes: 8cc4ccf58379 ("ipset: Allow matching on destination MAC address for mac and ipmac sets") Signed-off-by: Stefano Brivio Signed-off-by: Jozsef Kadlecsik net/netfilter/ipset/ip_set_hash_ipmac.c | 4 ---- 1 file changed, 4 deletions(-) commit 2a11c76e5301dddefcb618dac04f74e6314df6bc Merge: 45aee68e19a5 73f628ec9e6b Author: Linus Torvalds Date: Mon Jul 29 11:34:12 2019 -0700 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio/vhost fixes from Michael Tsirkin: - Fixes in the iommu and balloon devices. - Disable the meta-data optimization for now - I hope we can get it fixed shortly, but there's no point in making users suffer crashes while we are working on that. * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: vhost: disable metadata prefetch optimization iommu/virtio: Update to most recent specification balloon: fix up comments mm/balloon_compaction: avoid duplicate page removal commit 52023a53993061b524f6ba1de68858c472f52aad Author: Gustavo A. R. Silva Date: Sun Jul 28 19:32:51 2019 -0500 net: spider_net: Mark expected switch fall-through Mark switch cases where we are expecting to fall through. This patch fixes the following warning: drivers/net/ethernet/toshiba/spider_net.c: In function 'spider_net_release_tx_chain': drivers/net/ethernet/toshiba/spider_net.c:783:7: warning: this statement may fall through [-Wimplicit-fallthrough=] if (!brutal) { ^ drivers/net/ethernet/toshiba/spider_net.c:792:3: note: here case SPIDER_NET_DESCR_RESPONSE_ERROR: ^~~~ Notice that, in this particular case, the code comment is modified in accordance with what GCC is expecting to find. Reported-by: Stephen Rothwell Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook Signed-off-by: David S. Miller drivers/net/ethernet/toshiba/spider_net.c | 1 + 1 file changed, 1 insertion(+) commit 6f315c42d4120303d4cd6520f67889ff7f42736e Author: Gustavo A. R. Silva Date: Sun Jul 28 19:30:09 2019 -0500 net: ehea: Mark expected switch fall-through Mark switch cases where we are expecting to fall through. This patch fixes the following warning: drivers/net/ethernet/ibm/ehea/ehea_main.c: In function 'ehea_mem_notifier': include/linux/printk.h:311:2: warning: this statement may fall through [-Wimplicit-fallthrough=] printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/ibm/ehea/ehea_main.c:3253:3: note: in expansion of macro 'pr_info' pr_info("memory offlining canceled"); ^~~~~~~ drivers/net/ethernet/ibm/ehea/ehea_main.c:3256:2: note: here case MEM_ONLINE: ^~~~ Notice that, in this particular case, the code comment is modified in accordance with what GCC is expecting to find. Reported-by: Stephen Rothwell Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ehea/ehea_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 45aee68e19a52d434624bdd322a0c1d6c0b9be4f Merge: 609488bc979f f14312a93b34 Author: Linus Torvalds Date: Mon Jul 29 11:11:05 2019 -0700 Merge tag 'platform-drivers-x86-v5.3-3' of git://git.infradead.org/linux-platform-drivers-x86 Pull x86 platform driver fixes from Andy Shevchenko: "Business as usual, a few fixes and new IDs: - PC Engines APU got one fix for software dependencies to automatically load them and another fix for mapping of key button in the front to issue restart event. - OLPC driver is now probed automatically based on module device table. - Intel PMC core driver supports Intel Ice Lake NNPI processor. - WMI driver missed description of a new field in the structure that has been added" * tag 'platform-drivers-x86-v5.3-3' of git://git.infradead.org/linux-platform-drivers-x86: platform/x86: pcengines-apuv2: use KEY_RESTART for front button platform/x86: intel_pmc_core: Add ICL-NNPI support to PMC Core Platform: OLPC: add SPI MODULE_DEVICE_TABLE platform/x86: wmi: add missing struct parameter description platform/x86: pcengines-apuv2: Fix softdep statement commit d66503c43c0036d8db526d6c47c149bb971ac0b9 Author: Matteo Croce Date: Sun Jul 28 19:35:49 2019 +0200 mvpp2: refactor the HW checksum setup The hardware can only offload checksum calculation on first port due to the Tx FIFO size limitation, and has a maximum L3 offset of 128 bytes. Document this in a comment and move duplicated code in a function. Fixes: 576193f2d579 ("net: mvpp2: jumbo frames support") Signed-off-by: Matteo Croce Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 35 ++++++++++++++++--------- 1 file changed, 22 insertions(+), 13 deletions(-) commit 55b40dbf0e76b4bfb9d8b3a16a0208640a9a45df Author: Jiri Pirko Date: Sun Jul 28 14:56:36 2019 +0200 net: fix ifindex collision during namespace removal Commit aca51397d014 ("netns: Fix arbitrary net_device-s corruptions on net_ns stop.") introduced a possibility to hit a BUG in case device is returning back to init_net and two following conditions are met: 1) dev->ifindex value is used in a name of another "dev%d" device in init_net. 2) dev->name is used by another device in init_net. Under real life circumstances this is hard to get. Therefore this has been present happily for over 10 years. To reproduce: $ ip a 1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: dummy0: mtu 1500 qdisc noop state DOWN group default qlen 1000 link/ether 86:89:3f:86:61:29 brd ff:ff:ff:ff:ff:ff 3: enp0s2: mtu 1500 qdisc noop state DOWN group default qlen 1000 link/ether 52:54:00:12:34:56 brd ff:ff:ff:ff:ff:ff $ ip netns add ns1 $ ip -n ns1 link add dummy1ns1 type dummy $ ip -n ns1 link add dummy2ns1 type dummy $ ip link set enp0s2 netns ns1 $ ip -n ns1 link set enp0s2 name dummy0 [ 100.858894] virtio_net virtio0 dummy0: renamed from enp0s2 $ ip link add dev4 type dummy $ ip -n ns1 a 1: lo: mtu 65536 qdisc noop state DOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: dummy1ns1: mtu 1500 qdisc noop state DOWN group default qlen 1000 link/ether 16:63:4c:38:3e:ff brd ff:ff:ff:ff:ff:ff 3: dummy2ns1: mtu 1500 qdisc noop state DOWN group default qlen 1000 link/ether aa:9e:86:dd:6b:5d brd ff:ff:ff:ff:ff:ff 4: dummy0: mtu 1500 qdisc noop state DOWN group default qlen 1000 link/ether 52:54:00:12:34:56 brd ff:ff:ff:ff:ff:ff $ ip a 1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: dummy0: mtu 1500 qdisc noop state DOWN group default qlen 1000 link/ether 86:89:3f:86:61:29 brd ff:ff:ff:ff:ff:ff 4: dev4: mtu 1500 qdisc noop state DOWN group default qlen 1000 link/ether 5a:e1:4a:b6:ec:f8 brd ff:ff:ff:ff:ff:ff $ ip netns del ns1 [ 158.717795] default_device_exit: failed to move dummy0 to init_net: -17 [ 158.719316] ------------[ cut here ]------------ [ 158.720591] kernel BUG at net/core/dev.c:9824! [ 158.722260] invalid opcode: 0000 [#1] SMP KASAN PTI [ 158.723728] CPU: 0 PID: 56 Comm: kworker/u2:1 Not tainted 5.3.0-rc1+ #18 [ 158.725422] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-2.fc30 04/01/2014 [ 158.727508] Workqueue: netns cleanup_net [ 158.728915] RIP: 0010:default_device_exit.cold+0x1d/0x1f [ 158.730683] Code: 84 e8 18 c9 3e fe 0f 0b e9 70 90 ff ff e8 36 e4 52 fe 89 d9 4c 89 e2 48 c7 c6 80 d6 25 84 48 c7 c7 20 c0 25 84 e8 f4 c8 3e [ 158.736854] RSP: 0018:ffff8880347e7b90 EFLAGS: 00010282 [ 158.738752] RAX: 000000000000003b RBX: 00000000ffffffef RCX: 0000000000000000 [ 158.741369] RDX: 0000000000000000 RSI: ffffffff8128013d RDI: ffffed10068fcf64 [ 158.743418] RBP: ffff888033550170 R08: 000000000000003b R09: fffffbfff0b94b9c [ 158.745626] R10: fffffbfff0b94b9b R11: ffffffff85ca5cdf R12: ffff888032f28000 [ 158.748405] R13: dffffc0000000000 R14: ffff8880335501b8 R15: 1ffff110068fcf72 [ 158.750638] FS: 0000000000000000(0000) GS:ffff888036000000(0000) knlGS:0000000000000000 [ 158.752944] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 158.755245] CR2: 00007fe8b45d21d0 CR3: 00000000340b4005 CR4: 0000000000360ef0 [ 158.757654] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 158.760012] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 158.762758] Call Trace: [ 158.763882] ? dev_change_net_namespace+0xbb0/0xbb0 [ 158.766148] ? devlink_nl_cmd_set_doit+0x520/0x520 [ 158.768034] ? dev_change_net_namespace+0xbb0/0xbb0 [ 158.769870] ops_exit_list.isra.0+0xa8/0x150 [ 158.771544] cleanup_net+0x446/0x8f0 [ 158.772945] ? unregister_pernet_operations+0x4a0/0x4a0 [ 158.775294] process_one_work+0xa1a/0x1740 [ 158.776896] ? pwq_dec_nr_in_flight+0x310/0x310 [ 158.779143] ? do_raw_spin_lock+0x11b/0x280 [ 158.780848] worker_thread+0x9e/0x1060 [ 158.782500] ? process_one_work+0x1740/0x1740 [ 158.784454] kthread+0x31b/0x420 [ 158.786082] ? __kthread_create_on_node+0x3f0/0x3f0 [ 158.788286] ret_from_fork+0x3a/0x50 [ 158.789871] ---[ end trace defd6c657c71f936 ]--- [ 158.792273] RIP: 0010:default_device_exit.cold+0x1d/0x1f [ 158.795478] Code: 84 e8 18 c9 3e fe 0f 0b e9 70 90 ff ff e8 36 e4 52 fe 89 d9 4c 89 e2 48 c7 c6 80 d6 25 84 48 c7 c7 20 c0 25 84 e8 f4 c8 3e [ 158.804854] RSP: 0018:ffff8880347e7b90 EFLAGS: 00010282 [ 158.807865] RAX: 000000000000003b RBX: 00000000ffffffef RCX: 0000000000000000 [ 158.811794] RDX: 0000000000000000 RSI: ffffffff8128013d RDI: ffffed10068fcf64 [ 158.816652] RBP: ffff888033550170 R08: 000000000000003b R09: fffffbfff0b94b9c [ 158.820930] R10: fffffbfff0b94b9b R11: ffffffff85ca5cdf R12: ffff888032f28000 [ 158.825113] R13: dffffc0000000000 R14: ffff8880335501b8 R15: 1ffff110068fcf72 [ 158.829899] FS: 0000000000000000(0000) GS:ffff888036000000(0000) knlGS:0000000000000000 [ 158.834923] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 158.838164] CR2: 00007fe8b45d21d0 CR3: 00000000340b4005 CR4: 0000000000360ef0 [ 158.841917] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 158.845149] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Fix this by checking if a device with the same name exists in init_net and fallback to original code - dev%d to allocate name - in case it does. This was found using syzkaller. Fixes: aca51397d014 ("netns: Fix arbitrary net_device-s corruptions on net_ns stop.") Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller net/core/dev.c | 2 ++ 1 file changed, 2 insertions(+) commit 230bd958c2c846ee292aa38bc6b006296c24ca01 Author: Matteo Croce Date: Sun Jul 28 02:46:45 2019 +0200 mvpp2: refactor MTU change code The MTU change code can call napi_disable() with the device already down, leading to a deadlock. Also, lot of code is duplicated unnecessarily. Rework mvpp2_change_mtu() to avoid the deadlock and remove duplicated code. Fixes: 3f518509dedc ("ethernet: Add new driver for Marvell Armada 375 network unit") Signed-off-by: Matteo Croce Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 41 ++++++++----------------- 1 file changed, 13 insertions(+), 28 deletions(-) commit 011f175428d46461f94a65dacb9a416529d08dda Author: Colin Ian King Date: Sun Jul 28 00:37:26 2019 +0100 rocker: fix memory leaks of fib_work on two error return paths Currently there are two error return paths that leak memory allocated to fib_work. Fix this by kfree'ing fib_work before returning. Addresses-Coverity: ("Resource leak") Fixes: 19a9d136f198 ("ipv4: Flag fib_info with a fib_nh using IPv6 gateway") Fixes: dbcc4fa718ee ("rocker: Fail attempts to use routes with nexthop objects") Signed-off-by: Colin Ian King Reviewed-by: David Ahern Acked-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/rocker/rocker_main.c | 2 ++ 1 file changed, 2 insertions(+) commit 195b2919ccd7ffcaf6b6bbcb39444a53ab8308c7 Author: Martin Blumenstingl Date: Sat Jul 27 21:21:37 2019 +0200 net: stmmac: manage errors returned by of_get_mac_address() Commit d01f449c008a ("of_net: add NVMEM support to of_get_mac_address") added support for reading the MAC address from an nvmem-cell. This required changing the logic to return an error pointer upon failure. If stmmac is loaded before the nvmem provider driver then of_get_mac_address() return an error pointer with -EPROBE_DEFER. Propagate this error so the stmmac driver will be probed again after the nvmem provider driver is loaded. Default to a random generated MAC address in case of any other error, instead of using the error pointer as MAC address. Fixes: d01f449c008a ("of_net: add NVMEM support to of_get_mac_address") Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 708637e65abd487ebb75fb55401c36a466c3135b Author: Bernard Metzler Date: Sat Jul 27 12:38:32 2019 +0200 Do not dereference 'siw_crypto_shash' before checking Reported-by: "Dan Carpenter" Fixes: f29dd55b0236 ("rdma/siw: queue pair methods") Link: https://lore.kernel.org/r/OF61E386ED.49A73798-ON00258444.003BD6A6-00258444.003CC8D9@notes.na.collabserv.com Signed-off-by: Bernard Metzler Signed-off-by: Doug Ledford drivers/infiniband/sw/siw/siw_qp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 05bba1edaf9c11023901800bc4d2ce5b96e0836a Author: Gustavo A. R. Silva Date: Mon Jul 29 09:59:47 2019 -0500 net/af_iucv: mark expected switch fall-throughs Mark switch cases where we are expecting to fall through. This patch fixes the following warnings: net/iucv/af_iucv.c: warning: this statement may fall through [-Wimplicit-fallthrough=]: => 537:3, 519:6, 2246:6, 510:6 Notice that, in this particular case, the code comment is modified in accordance with what GCC is expecting to find. Reported-by: Geert Uytterhoeven Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook Signed-off-by: David S. Miller net/iucv/af_iucv.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit e1ab2431ebee2634b9868013d3fefd03c800e510 Author: Gustavo A. R. Silva Date: Mon Jul 29 09:25:03 2019 -0500 arcnet: com20020-isa: Mark expected switch fall-throughs Mark switch cases where we are expecting to fall through. This patch fixes the following warnings: drivers/net/arcnet/com20020-isa.c: warning: this statement may fall through [-Wimplicit-fallthrough=]: => 205:13, 203:10, 209:7, 201:11, 207:8 Reported-by: Geert Uytterhoeven Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook Signed-off-by: David S. Miller drivers/net/arcnet/com20020-isa.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 37151a41df800493cfcbbef4f7208ffe04feb959 Author: Yuki Tsunashima Date: Mon Jul 29 17:10:36 2019 +0200 ALSA: pcm: fix lost wakeup event scenarios in snd_pcm_drain lost wakeup can occur after enabling irq, therefore put task into interruptible before enabling interrupts, without this change, task can be put to sleep and snd_pcm_drain will delay Fixes: f2b3614cefb6 ("ALSA: PCM - Don't check DMA time-out too shortly") Signed-off-by: Yuki Tsunashima Signed-off-by: Suresh Udipi [ported from 4.9] Signed-off-by: Adam Miartus Signed-off-by: Takashi Iwai sound/core/pcm_native.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 15fe6a8dcc3b48358c28e17b485fc837f9605ec4 Author: Michal Kalderon Date: Sun Jul 28 14:13:38 2019 +0300 RDMA/qedr: Fix the hca_type and hca_rev returned in device attributes There was a place holder for hca_type and vendor was returned in hca_rev. Fix the hca_rev to return the hw revision and fix the hca_type to return an informative string representing the hca. Signed-off-by: Michal Kalderon Link: https://lore.kernel.org/r/20190728111338.21930-1-michal.kalderon@marvell.com Signed-off-by: Doug Ledford drivers/infiniband/hw/qedr/main.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit d7bae09fa008c6c9a489580db0a5a12063b97f97 Author: Nikolay Aleksandrov Date: Mon Jul 29 12:28:41 2019 +0300 net: bridge: delete local fdb on device init failure On initialization failure we have to delete the local fdb which was inserted due to the default pvid creation. This problem has been present since the inception of default_pvid. Note that currently there are 2 cases: 1) in br_dev_init() when br_multicast_init() fails 2) if register_netdevice() fails after calling ndo_init() This patch takes care of both since br_vlan_flush() is called on both occasions. Also the new fdb delete would be a no-op on normal bridge device destruction since the local fdb would've been already flushed by br_dev_delete(). This is not an issue for ports since nbp_vlan_init() is called last when adding a port thus nothing can fail after it. Reported-by: syzbot+88533dc8b582309bf3ee@syzkaller.appspotmail.com Fixes: 5be5a2df40f0 ("bridge: Add filtering support for default_pvid") Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/bridge/br_vlan.c | 5 +++++ 1 file changed, 5 insertions(+) commit 051c7b39be4a91f6b7d8c4548444e4b850f1f56c Author: Jia-Ju Bai Date: Mon Jul 29 16:24:33 2019 +0800 net: sched: Fix a possible null-pointer dereference in dequeue_func() In dequeue_func(), there is an if statement on line 74 to check whether skb is NULL: if (skb) When skb is NULL, it is used on line 77: prefetch(&skb->end); Thus, a possible null-pointer dereference may occur. To fix this bug, skb->end is used when skb is not NULL. This bug is found by a static analysis tool STCheck written by us. Fixes: 76e3cc126bb2 ("codel: Controlled Delay AQM") Signed-off-by: Jia-Ju Bai Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller net/sched/sch_codel.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a7f9cbf0ed2f67380b547971145e823b9225d39d Author: Jesper Dangaard Brouer Date: Mon Jul 29 14:16:37 2019 +0200 MAINTAINERS: Remove mailing-list entry for XDP (eXpress Data Path) This removes the mailing list xdp-newbies@vger.kernel.org from the XDP kernel maintainers entry. Being in the kernel MAINTAINERS file successfully caused the list to receive kbuild bot warnings, syzbot reports and sometimes developer patches. The level of details in these messages, doesn't match the target audience of the XDP-newbies list. This is based on a survey on the mailing list, where 73% voted for removal from MAINTAINERS file. Signed-off-by: Jesper Dangaard Brouer Acked-by: Jakub Kicinski Signed-off-by: David S. Miller MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit 26027f4243c1a23399b85a3cff9b0b89e405be59 Author: Gustavo A. R. Silva Date: Mon Jul 29 06:15:50 2019 -0500 arcnet: arc-rimi: Mark expected switch fall-throughs Mark switch cases where we are expecting to fall through. This patch fixes the following warnings (Building: powerpc allyesconfig): drivers/net/arcnet/arc-rimi.c: In function 'arcrimi_setup': include/linux/printk.h:304:2: warning: this statement may fall through [-Wimplicit-fallthrough=] printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/arcnet/arc-rimi.c:365:3: note: in expansion of macro 'pr_err' pr_err("Too many arguments\n"); ^~~~~~ drivers/net/arcnet/arc-rimi.c:366:2: note: here case 3: /* Node ID */ ^~~~ drivers/net/arcnet/arc-rimi.c:367:8: warning: this statement may fall through [-Wimplicit-fallthrough=] node = ints[3]; ~~~~~^~~~~~~~~ drivers/net/arcnet/arc-rimi.c:368:2: note: here case 2: /* IRQ */ ^~~~ drivers/net/arcnet/arc-rimi.c:369:7: warning: this statement may fall through [-Wimplicit-fallthrough=] irq = ints[2]; ~~~~^~~~~~~~~ drivers/net/arcnet/arc-rimi.c:370:2: note: here case 1: /* IO address */ ^~~~ Reported-by: Stephen Rothwell Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook Signed-off-by: David S. Miller drivers/net/arcnet/arc-rimi.c | 3 +++ 1 file changed, 3 insertions(+) commit 56f37a3fa2190732957882e10ec20adf83c6cb93 Author: Gustavo A. R. Silva Date: Mon Jul 29 06:13:20 2019 -0500 arcnet: com90io: Mark expected switch fall-throughs Mark switch cases where we are expecting to fall through. This patch fixes the following warnings (Building: powerpc allyesconfig): drivers/net/arcnet/com90io.c: In function 'com90io_setup': include/linux/printk.h:304:2: warning: this statement may fall through [-Wimplicit-fallthrough=] printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/arcnet/com90io.c:365:3: note: in expansion of macro 'pr_err' pr_err("Too many arguments\n"); ^~~~~~ drivers/net/arcnet/com90io.c:366:2: note: here case 2: /* IRQ */ ^~~~ drivers/net/arcnet/com90io.c:367:7: warning: this statement may fall through [-Wimplicit-fallthrough=] irq = ints[2]; ~~~~^~~~~~~~~ drivers/net/arcnet/com90io.c:368:2: note: here case 1: /* IO address */ ^~~~ Reported-by: Stephen Rothwell Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook Signed-off-by: David S. Miller drivers/net/arcnet/com90io.c | 2 ++ 1 file changed, 2 insertions(+) commit f3eb2c334a6d3f5e704ecd0b150d5cfe6e3aca40 Author: Gustavo A. R. Silva Date: Mon Jul 29 06:09:53 2019 -0500 arcnet: com90xx: Mark expected switch fall-throughs Mark switch cases where we are expecting to fall through. This patch fixes the following warnings (Building: powerpc allyesconfig): drivers/net/arcnet/com90xx.c: In function 'com90xx_setup': include/linux/printk.h:304:2: warning: this statement may fall through [-Wimplicit-fallthrough=] printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/arcnet/com90xx.c:695:3: note: in expansion of macro 'pr_err' pr_err("Too many arguments\n"); ^~~~~~ drivers/net/arcnet/com90xx.c:696:2: note: here case 3: /* Mem address */ ^~~~ drivers/net/arcnet/com90xx.c:697:9: warning: this statement may fall through [-Wimplicit-fallthrough=] shmem = ints[3]; ~~~~~~^~~~~~~~~ drivers/net/arcnet/com90xx.c:698:2: note: here case 2: /* IRQ */ ^~~~ drivers/net/arcnet/com90xx.c:699:7: warning: this statement may fall through [-Wimplicit-fallthrough=] irq = ints[2]; ~~~~^~~~~~~~~ drivers/net/arcnet/com90xx.c:700:2: note: here case 1: /* IO address */ ^~~~ Reported-by: Stephen Rothwell Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook Signed-off-by: David S. Miller drivers/net/arcnet/com90xx.c | 3 +++ 1 file changed, 3 insertions(+) commit 61c30c98ef17e5a330d7bb8494b78b3d6dffe9b8 Author: Jan Kara Date: Mon Jul 29 13:57:49 2019 +0200 dax: Fix missed wakeup in put_unlocked_entry() The condition checking whether put_unlocked_entry() needs to wake up following waiter got broken by commit 23c84eb78375 ("dax: Fix missed wakeup with PMD faults"). We need to wake the waiter whenever the passed entry is valid (i.e., non-NULL and not special conflict entry). This could lead to processes never being woken up when waiting for entry lock. Fix the condition. Cc: Link: http://lore.kernel.org/r/20190729120228.GC17833@quack2.suse.cz Fixes: 23c84eb78375 ("dax: Fix missed wakeup with PMD faults") Signed-off-by: Jan Kara Signed-off-by: Dan Williams fs/dax.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a07fc0bb483eb24444cebd59a8112ce6e6964c48 Author: YueHaibing Date: Wed Jul 24 14:54:43 2019 +0800 RDMA/hns: Fix build error If INFINIBAND_HNS_HIP08 is selected and HNS3 is m, but INFINIBAND_HNS is y, building fails: drivers/infiniband/hw/hns/hns_roce_hw_v2.o: In function `hns_roce_hw_v2_exit': hns_roce_hw_v2.c:(.exit.text+0xd): undefined reference to `hnae3_unregister_client' drivers/infiniband/hw/hns/hns_roce_hw_v2.o: In function `hns_roce_hw_v2_init': hns_roce_hw_v2.c:(.init.text+0xd): undefined reference to `hnae3_register_client' Also if INFINIBAND_HNS_HIP06 is selected and HNS_DSAF is m, but INFINIBAND_HNS is y, building fails: drivers/infiniband/hw/hns/hns_roce_hw_v1.o: In function `hns_roce_v1_reset': hns_roce_hw_v1.c:(.text+0x39fa): undefined reference to `hns_dsaf_roce_reset' hns_roce_hw_v1.c:(.text+0x3a25): undefined reference to `hns_dsaf_roce_reset' Reported-by: Hulk Robot Fixes: dd74282df573 ("RDMA/hns: Initialize the PCI device for hip08 RoCE") Fixes: 08805fdbeb2d ("RDMA/hns: Split hw v1 driver from hns roce driver") Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20190724065443.53068-1-yuehaibing@huawei.com Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/Kconfig | 6 +++--- drivers/infiniband/hw/hns/Makefile | 8 ++------ 2 files changed, 5 insertions(+), 9 deletions(-) commit 8480657280ee769ad23101297e1e6be0f8d205ec Author: Vasily Gorbik Date: Wed Jul 17 20:09:28 2019 +0200 vfio-ccw: make vfio_ccw_async_region_ops static Since vfio_ccw_async_region_ops is not exported and has no reason to be globally visible make it static to avoid the following sparse warning: drivers/s390/cio/vfio_ccw_async.c:73:30: warning: symbol 'vfio_ccw_async_region_ops' was not declared. Should it be static? Fixes: d5afd5d135c8 ("vfio-ccw: add handling for async channel instructions") Reviewed-by: Cornelia Huck Signed-off-by: Vasily Gorbik drivers/s390/cio/vfio_ccw_async.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 943dd5fa70ada0266c3a572c641be537b69ae2a8 Author: Vasily Gorbik Date: Mon Jul 29 01:01:21 2019 +0200 s390/3215: add switch fall through comment for -Wimplicit-fallthrough Silence the following warning when built with -Wimplicit-fallthrough=3 enabled by default since 5.3-rc2: drivers/s390/char/con3215.c: In function 'raw3215_irq': drivers/s390/char/con3215.c:399:6: warning: this statement may fall through [-Wimplicit-fallthrough=] 399 | if (dstat == 0x08) | ^ drivers/s390/char/con3215.c:401:2: note: here 401 | case 0x04: | ^~~~ Signed-off-by: Vasily Gorbik drivers/s390/char/con3215.c | 1 + 1 file changed, 1 insertion(+) commit 90a93ff4051ede8320c5576d99f34e0f75e99c1a Author: Heiko Carstens Date: Mon Jul 29 07:47:02 2019 +0200 s390/tape: add fallthrough annotations Commit a035d552a93b ("Makefile: Globally enable fall-through warning") enables fall-through warnings globally. Add missing annotations. Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik drivers/s390/char/tape_core.c | 3 +++ 1 file changed, 3 insertions(+) commit 7f5aa1154b1a30653a12e0f7f473494de77ad670 Author: Heiko Carstens Date: Mon Jul 29 07:39:44 2019 +0200 s390/mm: add fallthrough annotations Commit a035d552a93b ("Makefile: Globally enable fall-through warning") enables fall-through warnings globally. Add missing annotations. Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik arch/s390/mm/fault.c | 3 +++ 1 file changed, 3 insertions(+) commit ffbd268506ca70c2cd18238762a29b9a47d8d9fa Author: Vasily Gorbik Date: Wed Jul 17 19:41:09 2019 +0200 s390/mm: make gmap_test_and_clear_dirty_pmd static Since gmap_test_and_clear_dirty_pmd is not exported and has no reason to be globally visible make it static to avoid the following sparse warning: arch/s390/mm/gmap.c:2427:6: warning: symbol 'gmap_test_and_clear_dirty_pmd' was not declared. Should it be static? Signed-off-by: Vasily Gorbik arch/s390/mm/gmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1877011a3568fcadf2ee28f4d02fe5c31b1bb060 Author: Vasily Gorbik Date: Wed Jul 17 19:42:22 2019 +0200 s390/kexec: add missing include to machine_kexec_reloc.c Include into machine_kexec_reloc.c to expose arch_kexec_do_relocs declaration and avoid the following sparse warnings: arch/s390/kernel/machine_kexec_reloc.c:4:5: warning: symbol 'arch_kexec_do_relocs' was not declared. Should it be static? arch/s390/boot/../kernel/machine_kexec_reloc.c:4:5: warning: symbol 'arch_kexec_do_relocs' was not declared. Should it be static? Signed-off-by: Vasily Gorbik arch/s390/kernel/machine_kexec_reloc.c | 1 + 1 file changed, 1 insertion(+) commit 06f9895fda39422fb9250a78454e69aadace13c7 Author: Vasily Gorbik Date: Wed Jul 17 20:05:11 2019 +0200 s390/perf: make cf_diag_csd static Since there is really no reason for cf_diag_csd per cpu variable to be globally visible make it static to avoid the following sparse warning: arch/s390/kernel/perf_cpum_cf_diag.c:37:1: warning: symbol 'cf_diag_csd' was not declared. Should it be static? Signed-off-by: Vasily Gorbik arch/s390/kernel/perf_cpum_cf_diag.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d25220d2f2ece9e516588ed5df2ed373069b3a02 Author: Vasily Gorbik Date: Wed Jul 17 20:07:42 2019 +0200 s390/lib: add missing include Include into arch/s390/lib/xor.c to expose xor_block_xc declaration and avoid the following sparse warning: arch/s390/lib/xor.c:128:27: warning: symbol 'xor_block_xc' was not declared. Should it be static? Signed-off-by: Vasily Gorbik arch/s390/lib/xor.c | 1 + 1 file changed, 1 insertion(+) commit 868202ce15a7b52534257426a94f40b6d9f6150f Author: Vasily Gorbik Date: Wed Jul 17 19:38:42 2019 +0200 s390/boot: add missing declarations and includes Add __swsusp_reset_dma declaration to avoid the following sparse warnings: arch/s390/kernel/setup.c:107:15: warning: symbol '__swsusp_reset_dma' was not declared. Should it be static? arch/s390/boot/startup.c:52:15: warning: symbol '__swsusp_reset_dma' was not declared. Should it be static? Add verify_facilities declaration to avoid the following sparse warning: arch/s390/boot/als.c:105:6: warning: symbol 'verify_facilities' was not declared. Should it be static? Include "boot.h" into arch/s390/boot/kaslr.c to expose get_random_base function declaration and avoid the following sparse warning: arch/s390/boot/kaslr.c:90:15: warning: symbol 'get_random_base' was not declared. Should it be static? Signed-off-by: Vasily Gorbik arch/s390/boot/boot.h | 1 + arch/s390/boot/kaslr.c | 1 + arch/s390/include/asm/setup.h | 1 + 3 files changed, 3 insertions(+) commit 3361f3193c747e8b32b9edf60f2567187ed4faef Author: Heiko Carstens Date: Thu Jul 25 13:52:08 2019 +0200 s390: update configs Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik arch/s390/configs/debug_defconfig | 330 +++++++++++++++++++++-------------- arch/s390/configs/defconfig | 233 ++++++++++++++++--------- arch/s390/configs/zfcpdump_defconfig | 31 ++-- 3 files changed, 366 insertions(+), 228 deletions(-) commit d655e5b4e1c8ce207f0a1868aa334c4ecdcbddfb Author: Julian Wiedmann Date: Tue Jul 23 10:24:51 2019 +0200 s390: clean up qdio.h Fix two typos, document missing fields in the driver initialization data and remove the copy&pasted 'pfmt' field from the qdr struct. Signed-off-by: Julian Wiedmann Reviewed-by: Jens Remus Signed-off-by: Vasily Gorbik arch/s390/include/asm/qdio.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit f14312a93b34b9350dc33ff0b4215c24f4c82617 Author: Enrico Weigelt Date: Thu Jul 25 21:06:03 2019 +0200 platform/x86: pcengines-apuv2: use KEY_RESTART for front button The keycode KEY_RESTART is more appropriate for the front button, as most people use it for things like restart or factory reset. Signed-off-by: Enrico Weigelt Fixes: f8eb0235f659 ("x86: pcengines apuv2 gpio/leds/keys platform driver") Signed-off-by: Andy Shevchenko drivers/platform/x86/pcengines-apuv2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1caf7d50f46bd0388e38e653b146aa81700e8eb8 Author: Joel Fernandes (Google) Date: Wed Jul 24 12:48:16 2019 -0400 pidfd: Add warning if exit_state is 0 during notification Previously a condition got missed where the pidfd waiters are awakened before the exit_state gets set. This can result in a missed notification [1] and the polling thread waiting forever. It is fixed now, however it would be nice to avoid this kind of issue going unnoticed in the future. So just add a warning to catch it in the future. /* References */ [1]: https://lore.kernel.org/lkml/20190717172100.261204-1-joel@joelfernandes.org/ Signed-off-by: Joel Fernandes (Google) Link: https://lore.kernel.org/r/20190724164816.201099-1-joel@joelfernandes.org Signed-off-by: Christian Brauner kernel/signal.c | 1 + 1 file changed, 1 insertion(+) commit 3884ae44f41247e0ae41952d4fad46db86d2e0a8 Author: Christian Brauner Date: Tue Jul 23 10:08:28 2019 +0200 pidfd: remove obsolete comments from test Since the introduction of CLONE_PIDFD pidfd_send_signal() is independent of CONFIG_PROC_FS. Signed-off-by: Christian Brauner tools/testing/selftests/pidfd/pidfd_test.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit b55f3b841099e641bdb2701d361a4c304e2dbd6f Author: Jia-Ju Bai Date: Mon Jul 29 16:23:32 2019 +0800 mac80211_hwsim: Fix possible null-pointer dereferences in hwsim_dump_radio_nl() In hwsim_dump_radio_nl(), when genlmsg_put() on line 3617 fails, hdr is assigned to NULL. Then hdr is used on lines 3622 and 3623: genl_dump_check_consistent(cb, hdr); genlmsg_end(skb, hdr); Thus, possible null-pointer dereferences may occur. To fix these bugs, hdr is used here when it is not NULL. This bug is found by a static analysis tool STCheck written by us. Signed-off-by: Jia-Ju Bai Link: https://lore.kernel.org/r/20190729082332.28895-1-baijiaju1990@gmail.com [put braces on all branches] Signed-off-by: Johannes Berg drivers/net/wireless/mac80211_hwsim.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 05aaa5c97dce4c10a9e7eae2f1569a684e0c5ced Author: Brian Norris Date: Fri Jul 26 15:47:58 2019 -0700 mac80211: don't WARN on short WMM parameters from AP In a very similar spirit to commit c470bdc1aaf3 ("mac80211: don't WARN on bad WMM parameters from buggy APs"), an AP may not transmit a fully-formed WMM IE. For example, it may miss or repeat an Access Category. The above loop won't catch that and will instead leave one of the four ACs zeroed out. This triggers the following warning in drv_conf_tx() wlan0: invalid CW_min/CW_max: 0/0 and it may leave one of the hardware queues unconfigured. If we detect such a case, let's just print a warning and fall back to the defaults. Tested with a hacked version of hostapd, intentionally corrupting the IEs in hostapd_eid_wmm(). Cc: stable@vger.kernel.org Signed-off-by: Brian Norris Link: https://lore.kernel.org/r/20190726224758.210953-1-briannorris@chromium.org Signed-off-by: Johannes Berg net/mac80211/mlme.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 8aa259b10a6a759c50137bbbf225df0c17ca5d27 Author: Andrii Nakryiko Date: Thu Jul 18 10:30:21 2019 -0700 libbpf: fix missing __WORDSIZE definition hashmap.h depends on __WORDSIZE being defined. It is defined by glibc/musl in different headers. It's an explicit goal for musl to be "non-detectable" at compilation time, so instead include glibc header if glibc is explicitly detected and fall back to musl header otherwise. Reported-by: Arnaldo Carvalho de Melo Signed-off-by: Andrii Nakryiko Tested-by: Arnaldo Carvalho de Melo Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Daniel Borkmann Fixes: e3b924224028 ("libbpf: add resizable non-thread safe internal hashmap") Link: https://lkml.kernel.org/r/20190718173021.2418606-1-andriin@fb.com Signed-off-by: Arnaldo Carvalho de Melo tools/lib/bpf/hashmap.h | 5 +++++ 1 file changed, 5 insertions(+) commit 91826ba13855f73e252fef68369b3b0e1ed25253 Author: Masahiro Yamada Date: Mon Jul 29 00:51:38 2019 +0900 netfilter: add include guard to xt_connlabel.h Add a header include guard just in case. Signed-off-by: Masahiro Yamada Acked-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/uapi/linux/netfilter/xt_connlabel.h | 6 ++++++ 1 file changed, 6 insertions(+) commit 89f5752307cf53010d97503ac501b2ca1b089922 Author: Imre Deak Date: Fri Jun 28 17:36:18 2019 +0300 drm/i915: Fix the TBT AUX power well enabling Fix the mapping from a TBT AUX power well index to the DP_AUX_CH_CTL register. Fixes: c7375d9542f1 ("drm/i915: Configure AUX_CH_CTL when enabling the AUX power domain") Cc: José Roberto de Souza Cc: Rodrigo Vivi Signed-off-by: Imre Deak Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20190628143635.22066-7-imre.deak@intel.com (cherry picked from commit 29ae36abf08f943b76a2959f5000c44efa335be7) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/display/intel_display_power.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 0bbfdce345c8cf01a3a985fa99fefd2146dcc748 Author: Tvrtko Ursulin Date: Wed Jul 17 19:06:19 2019 +0100 drm/i915: Fix GEN8_MCR_SELECTOR programming fls returns bit positions starting from one for the lsb and the MCR register expects zero based (sub)slice addressing. Incorrent MCR programming can have the effect of directing MMIO reads of registers in the 0xb100-0xb3ff range to invalid subslice returning zeroes instead of actual content. Signed-off-by: Tvrtko Ursulin Fixes: 1e40d4aea57b ("drm/i915/cnl: Implement WaProgramMgsrForCorrectSliceSpecificMmioReads") Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190717180624.20354-2-tvrtko.ursulin@linux.intel.com (cherry picked from commit 15160879d47213c32f357bc67b6014d9aaf14ed7) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/gt/intel_engine_cs.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 6d61f716a01ec0e134de38ae97e71d6fec5a6ff6 Author: Dhinakaran Pandiyan Date: Wed Jul 17 15:34:51 2019 -0700 drm/i915/vbt: Fix VBT parsing for the PSR section A single 32-bit PSR2 training pattern field follows the sixteen element array of PSR table entries in the VBT spec. But, we incorrectly define this PSR2 field for each of the PSR table entries. As a result, the PSR1 training pattern duration for any panel_type != 0 will be parsed incorrectly. Secondly, PSR2 training pattern durations for VBTs with bdb version >= 226 will also be wrong. Cc: Rodrigo Vivi Cc: José Roberto de Souza Cc: stable@vger.kernel.org Cc: stable@vger.kernel.org #v5.2 Fixes: 88a0d9606aff ("drm/i915/vbt: Parse and use the new field with PSR2 TP2/3 wakeup time") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111088 Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=204183 Signed-off-by: Dhinakaran Pandiyan Reviewed-by: Ville Syrjälä Reviewed-by: José Roberto de Souza Acked-by: Rodrigo Vivi Tested-by: François Guerraz Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20190717223451.2595-1-dhinakaran.pandiyan@intel.com (cherry picked from commit b5ea9c9337007d6e700280c8a60b4e10d070fb53) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/display/intel_bios.c | 2 +- drivers/gpu/drm/i915/display/intel_vbt_defs.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit a8f196a0fa6391a436f63f360a1fb57031fdf26c Author: Ville Syrjälä Date: Wed Jul 17 14:45:36 2019 +0300 drm/i915: Make sure cdclk is high enough for DP audio on VLV/CHV On VLV/CHV there is some kind of linkage between the cdclk frequency and the DP link frequency. The spec says: "For DP audio configuration, cdclk frequency shall be set to meet the following requirements: DP Link Frequency(MHz) | Cdclk frequency(MHz) 270 | 320 or higher 162 | 200 or higher" I suspect that would more accurately be expressed as "cdclk >= DP link clock", and in any case we can express it like that in the code because of the limited set of cdclk (200, 266, 320, 400 MHz) and link frequencies (162 and 270 MHz) we support. Without this we can end up in a situation where the cdclk is too low and enabling DP audio will kill the pipe. Happens eg. with 2560x1440 modes where the 266MHz cdclk is sufficient to pump the pixels (241.5 MHz dotclock) but is too low for the DP audio due to the link frequency being 270 MHz. v2: Spell out the cdclk and link frequencies we actually support Cc: stable@vger.kernel.org Tested-by: Stefan Gottwald Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111149 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190717114536.22937-1-ville.syrjala@linux.intel.com Acked-by: Chris Wilson (cherry picked from commit bffb31f73b29a60ef693842d8744950c2819851d) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/display/intel_cdclk.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 982b1d002f16c2695871e005c4132060c836db56 Author: Chris Wilson Date: Mon Jul 15 09:09:28 2019 +0100 drm/i915: Lock the engine while dumping the active request We cannot let the request be retired and freed while we are trying to dump it during error capture. It is not sufficient just to grab a reference to the request, as during retirement we may free the ring which we are also dumping. So take the engine lock to prevent retiring and freeing of the request. Reported-by: Alex Shumsky Fixes: 83c317832eb1 ("drm/i915: Dump the ringbuffer of the active request for debugging") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Cc: Alex Shumsky Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190715080946.15593-6-chris@chris-wilson.co.uk (cherry picked from commit cfe7288c276e359eebf057699fe86c2f8af14224) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/gt/intel_engine_cs.c | 11 ++++------- drivers/gpu/drm/i915/i915_gpu_error.c | 6 ++++-- 2 files changed, 8 insertions(+), 9 deletions(-) commit 8f48de49795ca52f70c96558ccc6a0c174504779 Author: Lionel Landwerlin Date: Wed Jul 10 11:55:24 2019 +0100 drm/i915/perf: add missing delay for OA muxes configuration This was dropped from the original patch series, we weren't sure whether it was needed at the time. More recent tests show it's definitely needed to have acurate performance data. Signed-off-by: Lionel Landwerlin Fixes: 19f81df2859eb1 ("drm/i915/perf: Add OA unit support for Gen 8+") Acked-by: Chris Wilson [ickle: combine duplicate code and comments] Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190710105524.23017-1-chris@chris-wilson.co.uk (cherry picked from commit 14bfcd3e0daeb0f757a02aac85fd03e0933ab37e) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_perf.c | 49 +++++++++++++++++++++++----------------- 1 file changed, 28 insertions(+), 21 deletions(-) commit 06c12ae3b401238477e65e8c4e04e065699a6115 Author: Lionel Landwerlin Date: Tue Jul 9 15:33:39 2019 +0300 drm/i915/perf: ensure we keep a reference on the driver The i915 perf stream has its own file descriptor and is tied to reference of the driver. We haven't taken care of keep the driver alive. Signed-off-by: Lionel Landwerlin Suggested-by: Chris Wilson Fixes: eec688e1420da5 ("drm/i915: Add i915 perf infrastructure") Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190709123351.5645-2-lionel.g.landwerlin@intel.com (cherry picked from commit a5af1df716c123a09341351008fc497bea137b77) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_perf.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit aa56a292ce623734ddd30f52d73f527d1f3529b5 Author: Chris Wilson Date: Mon Jul 8 15:03:27 2019 +0100 drm/i915/userptr: Acquire the page lock around set_page_dirty() set_page_dirty says: For pages with a mapping this should be done under the page lock for the benefit of asynchronous memory errors who prefer a consistent dirty state. This rule can be broken in some special cases, but should be better not to. Under those rules, it is only safe for us to use the plain set_page_dirty calls for shmemfs/anonymous memory. Userptr may be used with real mappings and so needs to use the locked version (set_page_dirty_lock). Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=203317 Fixes: 5cc9ed4b9a7a ("drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl") References: 6dcc693bc57f ("ext4: warn when page is dirtied without buffers") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: stable@vger.kernel.org Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190708140327.26825-1-chris@chris-wilson.co.uk (cherry picked from commit cb6d7c7dc7ff8cace666ddec66334117a6068ce2) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/gem/i915_gem_userptr.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 5f4c82c89ff0e11b31561aa7e547acb10bf650c2 Author: Chris Wilson Date: Thu Jul 4 21:16:56 2019 +0100 drm/i915/gtt: Mark the freed page table entries with scratch On unwinding the allocation error path and having freed the page table entry, it is imperative that we mark it as scratch. <4> [416.075569] general protection fault: 0000 [#1] PREEMPT SMP PTI <4> [416.075801] CPU: 0 PID: 2385 Comm: kworker/u2:11 Tainted: G U 5.2.0-rc7-CI-Patchwork_13534+ #1 <4> [416.076162] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.1-0-g8891697-prebuilt.qemu-project.org 04/01/2014 <4> [416.076522] Workqueue: i915 __i915_vm_release [i915] <4> [416.076754] RIP: 0010:gen8_ppgtt_cleanup_3lvl+0x58/0xb0 [i915] <4> [416.077023] Code: 81 e2 04 fe ff ff 81 c2 ff 01 00 00 4c 8d 74 d6 58 4d 8b 65 00 4d 3b a7 28 02 00 00 74 40 49 8d 5c 24 50 49 81 c4 50 10 00 00 <48> 8b 2b 49 3b af 20 02 00 00 74 13 4c 89 ff 48 89 ee e8 01 fb ff <4> [416.077445] RSP: 0018:ffffc9000046bd98 EFLAGS: 00010206 <4> [416.077625] RAX: 0001000000000000 RBX: 6b6b6b6b6b6b6bbb RCX: 8b4b56d500000000 <4> [416.077838] RDX: 00000000000001ff RSI: ffff88805a578008 RDI: ffff88805bd0efc8 <4> [416.078167] RBP: ffff88805bd0efc8 R08: 0000000004e42b93 R09: 0000000000000001 <4> [416.078381] R10: 0000000000000000 R11: ffff888077a1b0b8 R12: 6b6b6b6b6b6b7bbb <4> [416.078594] R13: ffff88805a578058 R14: ffff88805a579058 R15: ffff88805bd0efc8 <4> [416.078815] FS: 0000000000000000(0000) GS:ffff88807da00000(0000) knlGS:0000000000000000 <4> [416.079395] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 <4> [416.079851] CR2: 000056160fec2b14 CR3: 0000000071bbc003 CR4: 00000000003606f0 <4> [416.080388] Call Trace: <4> [416.080828] gen8_ppgtt_cleanup+0x64/0x100 [i915] <4> [416.081399] __i915_vm_release+0xfc/0x1d0 [i915] Fixes: 1d1b5490b91c ("drm/i915/gtt: Replace struct_mutex serialisation for allocation") Signed-off-by: Chris Wilson Cc: Matthew Auld Cc: Mika Kuoppala Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20190704201656.15775-1-chris@chris-wilson.co.uk (cherry picked from commit e7539b79f703a6b533385088fc15cb5c9ab3f56f) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_gem_gtt.c | 2 ++ 1 file changed, 2 insertions(+) commit f691eaa4801484fffc8a2bcb24caa27fb2edcce3 Author: Chris Wilson Date: Wed Jul 3 18:19:12 2019 +0100 drm/i915/gtt: Defer the free for alloc error paths If we hit an error while allocating the page tables, we have to unwind the incomplete updates, and wish to free the unused pd. However, we are not allowed to be hoding the spinlock at that point, and so must use the later free to defer it until after we drop the lock. <3> [414.363795] BUG: sleeping function called from invalid context at drivers/gpu/drm/i915/i915_gem_gtt.c:472 <3> [414.364167] in_atomic(): 1, irqs_disabled(): 0, pid: 3905, name: i915_selftest <4> [414.364406] 3 locks held by i915_selftest/3905: <4> [414.364408] #0: 0000000034fe8aa8 (&dev->mutex){....}, at: device_driver_attach+0x18/0x50 <4> [414.364415] #1: 000000006bd8a560 (&dev->struct_mutex){+.+.}, at: igt_ctx_exec+0xb7/0x410 [i915] <4> [414.364476] #2: 000000003dfdc766 (&(&pd->lock)->rlock){+.+.}, at: gen8_ppgtt_alloc_pdp+0x448/0x540 [i915] <3> [414.364529] Preemption disabled at: <4> [414.364530] [<0000000000000000>] 0x0 <4> [414.364696] CPU: 0 PID: 3905 Comm: i915_selftest Tainted: G U 5.2.0-rc7-CI-CI_DRM_6403+ #1 <4> [414.364698] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.1-0-g8891697-prebuilt.qemu-project.org 04/01/2014 <4> [414.364699] Call Trace: <4> [414.364704] dump_stack+0x67/0x9b <4> [414.364708] ___might_sleep+0x167/0x250 <4> [414.364777] vm_free_page+0x24/0xc0 [i915] <4> [414.364852] free_pd+0xf/0x20 [i915] <4> [414.364897] gen8_ppgtt_alloc_pdp+0x489/0x540 [i915] <4> [414.364946] gen8_ppgtt_alloc_4lvl+0x8e/0x2e0 [i915] <4> [414.364992] ppgtt_bind_vma+0x2e/0x60 [i915] <4> [414.365039] i915_vma_bind+0xe8/0x2c0 [i915] <4> [414.365088] __i915_vma_do_pin+0xa1/0xd20 [i915] Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111050 Fixes: 1d1b5490b91c ("drm/i915/gtt: Replace struct_mutex serialisation for allocation") Signed-off-by: Chris Wilson Cc: Matthew Auld Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190703171913.16585-3-chris@chris-wilson.co.uk (cherry picked from commit 068610895ebd4bd86f496f01eb7b97e56d7269b2) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_gem_gtt.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit d1b739f326b960631827f0ea350002c5bc8df443 Author: Ville Syrjälä Date: Thu Jun 6 15:42:10 2019 +0300 drm/i915: Deal with machines that expose less than three QGV points When SAGV is forced to disabled/min/med/max in the BIOS pcode will only hand us a single QGV point instead of the normal three. Fix the code to deal with that instead declaring the bandwidth limit to be 0 MB/s (and thus preventing any planes from being enabled). Also shrink the max_bw sturct a bit while at it, and change the deratedbw type to unsigned since the code returns the bw as an unsigned int. Since we now keep track of how many qgv points we got from pcode we can drop the earlier check added for the "pcode doesn't support the memory subsystem query" case. Cc: felix.j.degrood@intel.com Cc: Mark Janes Cc: Matt Roper Cc: Clint Taylor Fixes: c457d9cf256e ("drm/i915: Make sure we have enough memory bandwidth on ICL") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110838 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190606124210.3482-1-ville.syrjala@linux.intel.com Reviewed-by: Matt Roper (cherry picked from commit 56e9371bc3f3e7d6c1a197a45d550b2ce6af25f6) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/display/intel_bw.c | 15 ++++++++++----- drivers/gpu/drm/i915/i915_drv.h | 5 +++-- 2 files changed, 13 insertions(+), 7 deletions(-) commit fdcc789a4a0bb2ef01857095752be12b03cbb341 Author: Mika Kuoppala Date: Mon Jul 1 13:44:42 2019 +0300 drm/i915: Fix memleak in runtime wakeref tracking If we untrack wakerefs, the actual count may reach zero. However the krealloced owners array is still there and needs to be taken care of. Free the owners unconditionally to fix the leak. Fixes: bd780f37a361 ("drm/i915: Track all held rpm wakerefs") Reported-by: Juha-Pekka Heikkila Cc: Juha-Pekka Heikkila Cc: Chris Wilson Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190701104442.9319-1-mika.kuoppala@linux.intel.com (cherry picked from commit c5f846eed2a1856b78e988eeef08215c70598ecd) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_runtime_pm.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit cf8f9aa1eda7d916bd23f6b8c226404deb11690c Author: Lionel Landwerlin Date: Fri Jun 28 15:07:20 2019 +0300 drm/i915/icl: whitelist PS_(DEPTH|INVOCATION)_COUNT The same tests failing on CFL+ platforms are also failing on ICL. Documentation doesn't list the WaAllowPMDepthAndInvocationCountAccessFromUMD workaround for ICL but applying it fixes the same tests as CFL. v2: Use only one whitelist entry (Lionel) Signed-off-by: Lionel Landwerlin Tested-by: Anuj Phogat Cc: stable@vger.kernel.org # 6883eab27481: drm/i915: Support flags in whitlist WAs Cc: stable@vger.kernel.org Acked-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190628120720.21682-4-lionel.g.landwerlin@intel.com (cherry picked from commit 3fe0107e45ab396342497e06b8924cdd485cde3b) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/gt/intel_workarounds.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 6ce5bfe936ac31d5c52c4b1328d0bfda5f97e7ca Author: Lionel Landwerlin Date: Fri Jun 28 15:07:19 2019 +0300 drm/i915: whitelist PS_(DEPTH|INVOCATION)_COUNT CFL:C0+ changed the status of those registers which are now blacklisted by default. This is breaking a number of CTS tests on GL & Vulkan : KHR-GL45.pipeline_statistics_query_tests_ARB.functional_fragment_shader_invocations (GL) dEQP-VK.query_pool.statistics_query.fragment_shader_invocations.* (Vulkan) v2: Only use one whitelist entry (Lionel) Bspec: 14091 Signed-off-by: Lionel Landwerlin Cc: stable@vger.kernel.org # 6883eab27481: drm/i915: Support flags in whitlist WAs Cc: stable@vger.kernel.org Acked-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190628120720.21682-3-lionel.g.landwerlin@intel.com (cherry picked from commit 2c903da50f5a9522b134e488bd0f92646c46f3c0) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/gt/intel_workarounds.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit c270cac40828eca4fb8d7c27cab1d0ac7765ff3d Author: Lionel Landwerlin Date: Sat Jun 29 14:13:50 2019 +0100 drm/i915: fix whitelist selftests with readonly registers When a register is readonly there is not much we can tell about its value (apart from its default value?). This can be covered by tests exercising the value of the register from userspace. For PS_INVOCATION_COUNT we've got the following piglit tests : KHR-GL45.pipeline_statistics_query_tests_ARB.functional_fragment_shader_invocations Vulkan CTS tests : dEQP-VK.query_pool.statistics_query.fragment_shader_invocations.* v2: Use a local to shrink under 80cols. Signed-off-by: Lionel Landwerlin Fixes: 86554f48e511 ("drm/i915/selftests: Verify whitelist of context registers") Tested-by: Anuj Phogat Signed-off-by: Chris Wilson Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190629131350.31185-1-chris@chris-wilson.co.uk (cherry picked from commit 361b69051326ed0e07553315227678d00d651a9e) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/gt/selftest_workarounds.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 705d0abbcc7adf04743d04ea8754acbcdf21c326 Author: Santosh Sivaraj Date: Mon Jul 29 11:25:36 2019 +0530 powerpc/kvm: Fall through switch case explicitly Implicit fallthrough warning was enabled globally which broke the build. Make it explicit with a `fall through` comment. Signed-off-by: Santosh Sivaraj Reviewed-by: Stephen Rothwell Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190729055536.25591-1-santosh@fossix.org arch/powerpc/kvm/book3s_32_mmu.c | 1 + 1 file changed, 1 insertion(+) commit 2e9a06dda10aea81a17c623f08534dac6735434a Author: Vince Weaver Date: Thu Jul 25 11:57:43 2019 -0400 perf tools: Fix perf.data documentation units for memory size The perf.data-file-format documentation incorrectly says the HEADER_TOTAL_MEM results are in bytes. The results are in kilobytes (perf reads the value from /proc/meminfo) Signed-off-by: Vince Weaver Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/alpine.DEB.2.21.1907251155500.22624@macbook-air Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf.data-file-format.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 20f9781f491360e7459c589705a2e4b1f136bee9 Author: Numfor Mbiziwo-Tiapo Date: Wed Jul 24 16:44:58 2019 -0700 perf header: Fix use of unitialized value warning When building our local version of perf with MSAN (Memory Sanitizer) and running the perf record command, MSAN throws a use of uninitialized value warning in "tools/perf/util/util.c:333:6". This warning stems from the "buf" variable being passed into "write". It originated as the variable "ev" with the type union perf_event* defined in the "perf_event__synthesize_attr" function in "tools/perf/util/header.c". In the "perf_event__synthesize_attr" function they allocate space with a malloc call using ev, then go on to only assign some of the member variables before passing "ev" on as a parameter to the "process" function therefore "ev" contains uninitialized memory. Changing the malloc call to zalloc to initialize all the members of "ev" which gets rid of the warning. To reproduce this warning, build perf by running: make -C tools/perf CLANG=1 CC=clang EXTRA_CFLAGS="-fsanitize=memory\ -fsanitize-memory-track-origins" (Additionally, llvm might have to be installed and clang might have to be specified as the compiler - export CC=/usr/bin/clang) then running: tools/perf/perf record -o - ls / | tools/perf/perf --no-pager annotate\ -i - --stdio Please see the cover letter for why false positive warnings may be generated. Signed-off-by: Numfor Mbiziwo-Tiapo Cc: Alexander Shishkin Cc: Ian Rogers Cc: Jiri Olsa Cc: Mark Drayton Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Cc: Stephane Eranian Link: http://lkml.kernel.org/r/20190724234500.253358-2-nums@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/header.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7622236ceb167aa3857395f9bdaf871442aa467e Author: Vince Weaver Date: Tue Jul 23 11:06:01 2019 -0400 perf header: Fix divide by zero error if f_header.attr_size==0 So I have been having lots of trouble with hand-crafted perf.data files causing segfaults and the like, so I have started fuzzing the perf tool. First issue found: If f_header.attr_size is 0 in the perf.data file, then perf will crash with a divide-by-zero error. Committer note: Added a pr_err() to tell the user why the command failed. Signed-off-by: Vince Weaver Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/alpine.DEB.2.21.1907231100440.14532@macbook-air Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/header.c | 7 +++++++ 1 file changed, 7 insertions(+) commit e54599c93dbf487ef80ba2833c5760c22bd20c32 Author: Arnaldo Carvalho de Melo Date: Fri Jul 26 15:44:41 2019 -0300 tools headers UAPI: Sync if_link.h with the kernel To pick the changes in: 07a4ddec3ce9 ("bonding: add an option to specify a delay between peer notifications") And silence this build warning: Kernel ABI header at 'tools/include/uapi/linux/if_link.h' differs from latest version at 'include/uapi/linux/if_link.h' Cc: Adrian Hunter Cc: David S. Miller Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Vincent Bernat Link: https://lkml.kernel.org/n/tip-3liw4exxh8goc0rq9xryl2kv@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/uapi/linux/if_link.h | 5 +++++ 1 file changed, 5 insertions(+) commit c093de6bd3c50d3dd597ff9fa5cf7a30acbb3eb7 Author: Arnaldo Carvalho de Melo Date: Fri Jul 26 15:41:09 2019 -0300 tools headers UAPI: Sync sched.h with the kernel To get the changes in: a509a7cd7974 ("sched/uclamp: Extend sched_setattr() to support utilization clamping") 1d6362fa0cfc ("sched/core: Allow sched_setattr() to use the current policy") 7f192e3cd316 ("fork: add clone3") And silence this perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/linux/sched.h' differs from latest version at 'include/uapi/linux/sched.h' diff -u tools/include/uapi/linux/sched.h include/uapi/linux/sched.h No changes in tools/ due to the above. Cc: Adrian Hunter Cc: Christian Brauner Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Patrick Bellasi Link: https://lkml.kernel.org/n/tip-mtrpsjrux5hgyr5uf8l1aa46@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/uapi/linux/sched.h | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) commit 0f58163c9d5702efbc242d144fd038e54b4c6ad0 Author: Arnaldo Carvalho de Melo Date: Fri Jul 26 15:31:25 2019 -0300 tools headers UAPI: Sync usbdevice_fs.h with the kernels to get new ioctl To get the changes in: 6d101f24f1dd ("USB: add usbfs ioctl to retrieve the connection parameters") And address this perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/linux/usbdevice_fs.h' differs from latest version at 'include/uapi/linux/usbdevice_fs.h' diff -u tools/include/uapi/linux/usbdevice_fs.h include/uapi/linux/usbdevice_fs.h Which ends up autogenerating a ioctl_cmd->string table used by 'perf trace': $ tools/perf/trace/beauty/usbdevfs_ioctl.sh > before $ cp include/uapi/linux/usbdevice_fs.h tools/include/uapi/linux/usbdevice_fs.h $ tools/perf/trace/beauty/usbdevfs_ioctl.sh > after $ diff -u before after --- before 2019-07-26 15:26:55.513636844 -0300 +++ after 2019-07-26 15:29:11.650518677 -0300 @@ -23,6 +23,7 @@ [2] = "BULK", [30] = "DROP_PRIVILEGES", [31] = "GET_SPEED", + [32] = "CONNINFO_EX", [3] = "RESETEP", [4] = "SETINTERFACE", [5] = "SETCONFIGURATION", $ Now 'perf trace' ioctl beautifier will translate this new ioctl to a string and at some point will allow filtering the 'ioctl' syscall with something like this in a system wide strace-like sessin: # perf trace -e ioctl/cmd=USBDEVFS_CONNINFO_EX/ Cc: Adrian Hunter Cc: Dmitry Torokhov Cc: Greg Kroah-Hartman Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-tkdfbgzqypwco96b309c0ovd@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/uapi/linux/usbdevice_fs.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 7ee526152db7a75d7b8713346dac76ffc3662b29 Author: Arnaldo Carvalho de Melo Date: Fri Jul 26 15:29:56 2019 -0300 tools perf beauty: Fix usbdevfs_ioctl table generator to handle _IOC() In addition to _IOW() and _IOR(), to handle this case: #define USBDEVFS_CONNINFO_EX(len) _IOC(_IOC_READ, 'U', 32, len) That will happen in the next sync of this header file. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-3br5e4t64e4lp0goo84che3s@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/trace/beauty/usbdevfs_ioctl.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 95dc663aa6382fec92674e748682cefeeb2bfc22 Author: Arnaldo Carvalho de Melo Date: Fri Jul 26 15:00:24 2019 -0300 tools headers UAPI: Update tools's copy of drm.h headers Picking the changes from: c5d3e39caa45 ("drm/i915: Engine discovery query") a88b6e4cbafd ("drm/i915: Allow specification of parallel execbuf") ee1136908e9b ("drm/i915/execlists: Virtual engine bonding") 6d06779e8672 ("drm/i915: Load balancing across a virtual engine") b81dde719439 ("drm/i915: Allow userspace to clone contexts on creation") 8319f44c0525 ("drm/i915: Re-expose SINGLE_TIMELINE flags for context creation") e620f7b3a263 ("drm/i915: Extend I915_CONTEXT_PARAM_SSEU to support local ctx->engine[]") 976b55f0e1db ("drm/i915: Allow a context to define its set of engines") 7f3f317a66ca ("drm/i915: Restore control over ppgtt for context creation ABI") 75b3f1cb50bd ("drm: Fix drm.h uapi header for GNU/kFreeBSD") Silencing these perf build warnings: Warning: Kernel ABI header at 'tools/include/uapi/drm/drm.h' differs from latest version at 'include/uapi/drm/drm.h' diff -u tools/include/uapi/drm/drm.h include/uapi/drm/drm.h Warning: Kernel ABI header at 'tools/include/uapi/drm/i915_drm.h' differs from latest version at 'include/uapi/drm/i915_drm.h' diff -u tools/include/uapi/drm/i915_drm.h include/uapi/drm/i915_drm.h Now 'perf trace' and other code that might use the tools/perf/trace/beauty autogenerated tables will be able to translate this new ioctl code into a string: $ tools/perf/trace/beauty/drm_ioctl.sh > before $ cp include/uapi/drm/i915_drm.h tools/include/uapi/drm/i915_drm.h $ tools/perf/trace/beauty/drm_ioctl.sh > after $ diff -u before after --- before 2019-07-26 13:02:22.052723640 -0300 +++ after 2019-07-26 13:02:35.354906036 -0300 @@ -163,4 +163,6 @@ [DRM_COMMAND_BASE + 0x37] = "I915_PERF_ADD_CONFIG", [DRM_COMMAND_BASE + 0x38] = "I915_PERF_REMOVE_CONFIG", [DRM_COMMAND_BASE + 0x39] = "I915_QUERY", + [DRM_COMMAND_BASE + 0x3a] = "I915_GEM_VM_CREATE", + [DRM_COMMAND_BASE + 0x3b] = "I915_GEM_VM_DESTROY", }; $ Cc: Adrian Hunter Cc: Chris Wilson Cc: Eric Anholt Cc: James Clarke Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Cc: Tvrtko Ursulin Link: https://lkml.kernel.org/n/tip-a9173whgu3h1vo24jgdg5do8@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/uapi/drm/drm.h | 1 + tools/include/uapi/drm/i915_drm.h | 209 +++++++++++++++++++++++++++++++++++++- 2 files changed, 207 insertions(+), 3 deletions(-) commit b830f94f7303a49d509d5b1bb34ecb2e648b23c4 Author: Arnaldo Carvalho de Melo Date: Fri Jul 26 12:49:00 2019 -0300 tools headers UAPI: Update tools's copy of mman.h headers To pick up the changes from: 8aa3c927ec10 ("mm/mmap: move common defines to mman-common.h") 22fcea6f85f2 ("mm: move MAP_SYNC to asm-generic/mman-common.h") 0bf5f9492389 ("mm: fix the MAP_UNINITIALIZED flag") To address the following perf build warnings: Warning: Kernel ABI header at 'tools/include/uapi/asm-generic/mman-common.h' differs from latest version at 'include/uapi/asm-generic/mman-common.h' diff -u tools/include/uapi/asm-generic/mman-common.h include/uapi/asm-generic/mman-common.h Warning: Kernel ABI header at 'tools/include/uapi/asm-generic/mman.h' differs from latest version at 'include/uapi/asm-generic/mman.h' diff -u tools/include/uapi/asm-generic/mman.h include/uapi/asm-generic/mman.h That ends up just moving a bit the auto-generated code->string tables: $ tools/perf/trace/beauty/mmap_flags.sh > before $ cp include/uapi/asm-generic/mman.h tools/include/uapi/asm-generic/mman.h $ cp include/uapi/asm-generic/mman-common.h tools/include/uapi/asm-generic/mman-common.h $ tools/perf/trace/beauty/mmap_flags.sh > after $ diff -u before after --- before 2019-07-26 12:45:02.948335904 -0300 +++ after 2019-07-26 12:48:05.342893539 -0300 @@ -4,15 +4,15 @@ [ilog2(0x02) + 1] = "PRIVATE", [ilog2(0x10) + 1] = "FIXED", [ilog2(0x20) + 1] = "ANONYMOUS", + [ilog2(0x008000) + 1] = "POPULATE", + [ilog2(0x010000) + 1] = "NONBLOCK", + [ilog2(0x020000) + 1] = "STACK", + [ilog2(0x040000) + 1] = "HUGETLB", + [ilog2(0x080000) + 1] = "SYNC", [ilog2(0x100000) + 1] = "FIXED_NOREPLACE", [ilog2(0x0100) + 1] = "GROWSDOWN", [ilog2(0x0800) + 1] = "DENYWRITE", [ilog2(0x1000) + 1] = "EXECUTABLE", [ilog2(0x2000) + 1] = "LOCKED", [ilog2(0x4000) + 1] = "NORESERVE", - [ilog2(0x8000) + 1] = "POPULATE", - [ilog2(0x10000) + 1] = "NONBLOCK", - [ilog2(0x20000) + 1] = "STACK", - [ilog2(0x40000) + 1] = "HUGETLB", - [ilog2(0x80000) + 1] = "SYNC", }; $ Cc: Adrian Hunter Cc: Aneesh Kumar K.V Cc: Christoph Hellwig Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-fzqvzni9megaurmsp0k4vy27@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/arch/powerpc/include/uapi/asm/mman.h | 4 ---- tools/arch/sparc/include/uapi/asm/mman.h | 4 ---- tools/include/uapi/asm-generic/mman-common.h | 15 +++++++++------ tools/include/uapi/asm-generic/mman.h | 10 ++++------ 4 files changed, 13 insertions(+), 20 deletions(-) commit 7d3cd66261665da491d0ee582beabe23df60f983 Author: Ville Syrjälä Date: Wed Jun 19 20:08:39 2019 +0300 drm/i915: Fix various tracepoints for gen2 Gen2 doesn't have a frame counter and apparently we no longer provide a fake .get_vblank_counter() hook for it. That means all tracepoints calling that hook will oops. Update the tracepoints to use intel_crtc_get_vblank_counter() which will gracefully fall back to using the software counter. This is actually a better approach since we now get (hopefully accurate) frame numbers in the traces. This also gets rid of the raw driver->get_vblank_counter() calls, which we need to do in order to switch to the per-crtc vblank vfuncs. v2: Deal with new tracepoints v3: Use a distinct variable name for the internal crtc iterator (Chris) Cc: Shawn Guo Cc: Daniel Vetter Fixes: 967dd4841787 ("drm: remove drm_vblank_no_hw_counter assignment from driver code") Signed-off-by: Ville Syrjälä Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190619170842.20579-2-ville.syrjala@linux.intel.com (cherry picked from commit 4c888e7bd26f58deb27c2e6ddc90000b89ee9393) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/display/intel_display.c | 4 +- drivers/gpu/drm/i915/i915_trace.h | 76 ++++++++++++---------------- 2 files changed, 35 insertions(+), 45 deletions(-) commit 95eef14cdad150fed43147bcd4f29eea3d0a3f03 Author: Lionel Landwerlin Date: Mon Jun 10 11:19:14 2019 +0300 drm/i915/perf: fix ICL perf register offsets We got the wrong offsets (could they have changed?). New values were computed off an error state by looking up the register offset in the context image as written by the HW. Signed-off-by: Lionel Landwerlin Fixes: 1de401c08fa805 ("drm/i915/perf: enable perf support on ICL") Cc: # v4.18+ Acked-by: Kenneth Graunke Link: https://patchwork.freedesktop.org/patch/msgid/20190610081914.25428-1-lionel.g.landwerlin@intel.com (cherry picked from commit 8dcfdfb4501012a8d36d2157dc73925715f2befb) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_perf.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 248f883db61283b4f5a1c92a5e27277377b09f16 Author: Kenneth Graunke Date: Tue Jun 25 10:06:55 2019 +0100 drm/i915: Disable SAMPLER_STATE prefetching on all Gen11 steppings. The Demand Prefetch workaround (binding table prefetching) only applies to Icelake A0/B0. But the Sampler Prefetch workaround needs to be applied to all Gen11 steppings, according to a programming note in the SARCHKMD documentation. Using the Intel Gallium driver, I have seen intermittent failures in the dEQP-GLES31.functional.copy_image.non_compressed.* tests. After applying this workaround, the tests reliably pass. v2: Remove the overlap with a pre-production w/a BSpec: 9663 Signed-off-by: Kenneth Graunke Signed-off-by: Chris Wilson Cc: stable@vger.kernel.org Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190625090655.19220-1-chris@chris-wilson.co.uk (cherry picked from commit f9a393875d3af13cc3267477746608dadb7f17c1) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/gt/intel_workarounds.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit ac65bdfef14a902b40ff69a35f5c604dba096547 Author: Chris Wilson Date: Wed Jun 19 18:01:35 2019 +0100 drm/i915: Keep rings pinned while the context is active Remember to keep the rings pinned as well as the context image until the GPU is no longer active. v2: Introduce a ring->pin_count primarily to hide the mock_ring that doesn't fit into the normal GGTT vma picture. v3: Order is important in teardown, ringbuffer submission needs to drop the pin count on the engine->kernel_context before it can gleefully free its ring. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110946 Fixes: ce476c80b8bf ("drm/i915: Keep contexts pinned until after the next kernel context switch") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190619170135.15281-1-chris@chris-wilson.co.uk (cherry picked from commit 09c5ab384f6fb30f834a5777888b4486dd7f015d) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/gt/intel_context.c | 27 ++++++++++++++++-------- drivers/gpu/drm/i915/gt/intel_engine_types.h | 12 +++++++++++ drivers/gpu/drm/i915/gt/intel_lrc.c | 10 ++------- drivers/gpu/drm/i915/gt/intel_ringbuffer.c | 31 ++++++++++++++++++---------- drivers/gpu/drm/i915/gt/mock_engine.c | 1 + 5 files changed, 53 insertions(+), 28 deletions(-) commit 9cdde85804833af77c6afbf7c53f0d959c42eb9f Author: Hyungwoo Yang Date: Wed May 29 21:03:54 2019 -0700 platform/chrome: cros_ec_ishtp: fix crash during suspend Kernel crashes during suspend due to wrong conversion in suspend and resume functions. Use the proper helper to get ishtp_cl_device instance. Cc: # 5.2.x: b12bbdc5: HID: intel-ish-hid: fix wrong driver_data usage Signed-off-by: Hyungwoo Yang Signed-off-by: Enric Balletbo i Serra drivers/platform/chrome/cros_ec_ishtp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit eca92a53a6ab9f27f1b61dcb3e16ebef75f0d5bb Author: Anders Roxell Date: Fri Jul 26 13:27:21 2019 +0200 arm64: module: Mark expected switch fall-through When fall-through warnings was enabled by default the following warnings was starting to show up: ../arch/arm64/kernel/module.c: In function ‘apply_relocate_add’: ../arch/arm64/kernel/module.c:316:19: warning: this statement may fall through [-Wimplicit-fallthrough=] overflow_check = false; ~~~~~~~~~~~~~~~^~~~~~~ ../arch/arm64/kernel/module.c:317:3: note: here case R_AARCH64_MOVW_UABS_G0: ^~~~ ../arch/arm64/kernel/module.c:322:19: warning: this statement may fall through [-Wimplicit-fallthrough=] overflow_check = false; ~~~~~~~~~~~~~~~^~~~~~~ ../arch/arm64/kernel/module.c:323:3: note: here case R_AARCH64_MOVW_UABS_G1: ^~~~ Rework so that the compiler doesn't warn about fall-through. Fixes: d93512ef0f0e ("Makefile: Globally enable fall-through warning") Signed-off-by: Anders Roxell Signed-off-by: Will Deacon arch/arm64/kernel/module.c | 4 ++++ 1 file changed, 4 insertions(+) commit 6655473920129eb2dd1dded147722316294a699a Author: Anders Roxell Date: Fri Jul 26 13:27:25 2019 +0200 arm64: smp: Mark expected switch fall-through When fall-through warnings was enabled by default the following warning was starting to show up: In file included from ../include/linux/kernel.h:15, from ../include/linux/list.h:9, from ../include/linux/kobject.h:19, from ../include/linux/of.h:17, from ../include/linux/irqdomain.h:35, from ../include/linux/acpi.h:13, from ../arch/arm64/kernel/smp.c:9: ../arch/arm64/kernel/smp.c: In function ‘__cpu_up’: ../include/linux/printk.h:302:2: warning: this statement may fall through [-Wimplicit-fallthrough=] printk(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../arch/arm64/kernel/smp.c:156:4: note: in expansion of macro ‘pr_crit’ pr_crit("CPU%u: may not have shut down cleanly\n", cpu); ^~~~~~~ ../arch/arm64/kernel/smp.c:157:3: note: here case CPU_STUCK_IN_KERNEL: ^~~~ Rework so that the compiler doesn't warn about fall-through. Fixes: d93512ef0f0e ("Makefile: Globally enable fall-through warning") Signed-off-by: Anders Roxell Signed-off-by: Will Deacon arch/arm64/kernel/smp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 75a382f1c9e5092db10ad1e2111633d61b65e578 Author: Will Deacon Date: Mon Jul 29 11:39:45 2019 +0100 arm64: hw_breakpoint: Fix warnings about implicit fallthrough Now that -Wimplicit-fallthrough is passed to GCC by default, the kernel build has suddenly got noisy. Annotate the two fall-through cases in our hw_breakpoint implementation, since they are both intentional. Reported-by: Anders Roxell Signed-off-by: Will Deacon arch/arm64/kernel/hw_breakpoint.c | 4 ++++ 1 file changed, 4 insertions(+) commit 0d7fd70f26039bd4b33444ca47f0e69ce3ae0354 Author: Will Deacon Date: Mon Jul 29 11:43:48 2019 +0100 drivers/perf: arm_pmu: Fix failure path in PM notifier Handling of the CPU_PM_ENTER_FAILED transition in the Arm PMU PM notifier code incorrectly skips restoration of the counters. Fix the logic so that CPU_PM_ENTER_FAILED follows the same path as CPU_PM_EXIT. Cc: Fixes: da4e4f18afe0f372 ("drivers/perf: arm_pmu: implement CPU_PM notifier") Reported-by: Anders Roxell Acked-by: Lorenzo Pieralisi Signed-off-by: Will Deacon drivers/perf/arm_pmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 849adec41203ac5837c40c2d7e08490ffdef3c2c Author: Will Deacon Date: Mon Jul 29 11:06:17 2019 +0100 arm64: compat: Allow single-byte watchpoints on all addresses Commit d968d2b801d8 ("ARM: 7497/1: hw_breakpoint: allow single-byte watchpoints on all addresses") changed the validation requirements for hardware watchpoints on arch/arm/. Update our compat layer to implement the same relaxation. Cc: Signed-off-by: Will Deacon arch/arm64/kernel/hw_breakpoint.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit cdb2d3ee0436d74fa9092f2df46aaa6f9e03c969 Author: Anders Roxell Date: Fri Jul 26 13:27:10 2019 +0200 arm64: KVM: hyp: debug-sr: Mark expected switch fall-through When fall-through warnings was enabled by default the following warnings was starting to show up: ../arch/arm64/kvm/hyp/debug-sr.c: In function ‘__debug_save_state’: ../arch/arm64/kvm/hyp/debug-sr.c:20:19: warning: this statement may fall through [-Wimplicit-fallthrough=] case 15: ptr[15] = read_debug(reg, 15); \ ../arch/arm64/kvm/hyp/debug-sr.c:113:2: note: in expansion of macro ‘save_debug’ save_debug(dbg->dbg_bcr, dbgbcr, brps); ^~~~~~~~~~ ../arch/arm64/kvm/hyp/debug-sr.c:21:2: note: here case 14: ptr[14] = read_debug(reg, 14); \ ^~~~ ../arch/arm64/kvm/hyp/debug-sr.c:113:2: note: in expansion of macro ‘save_debug’ save_debug(dbg->dbg_bcr, dbgbcr, brps); ^~~~~~~~~~ ../arch/arm64/kvm/hyp/debug-sr.c:21:19: warning: this statement may fall through [-Wimplicit-fallthrough=] case 14: ptr[14] = read_debug(reg, 14); \ ../arch/arm64/kvm/hyp/debug-sr.c:113:2: note: in expansion of macro ‘save_debug’ save_debug(dbg->dbg_bcr, dbgbcr, brps); ^~~~~~~~~~ ../arch/arm64/kvm/hyp/debug-sr.c:22:2: note: here case 13: ptr[13] = read_debug(reg, 13); \ ^~~~ ../arch/arm64/kvm/hyp/debug-sr.c:113:2: note: in expansion of macro ‘save_debug’ save_debug(dbg->dbg_bcr, dbgbcr, brps); ^~~~~~~~~~ Rework to add a 'Fall through' comment where the compiler warned about fall-through, hence silencing the warning. Fixes: d93512ef0f0e ("Makefile: Globally enable fall-through warning") Signed-off-by: Anders Roxell [maz: fixed commit message] Signed-off-by: Marc Zyngier arch/arm64/kvm/hyp/debug-sr.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 2aa4e410795cb94b6577fe0e251b5f5226499310 Author: Ben Segal Date: Thu Jul 18 12:27:00 2019 +0000 habanalabs: fix host memory polling in BE architecture This patch fix a bug in the host memory polling macro. The bug is that the memory being polled can be written by the device, which always writes it in LE. However, if the host is running Linux in BE mode, we need to convert the value that was written by the device before matching it to the required value that the caller has given to the macro. Signed-off-by: Ben Segal Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/command_submission.c | 2 +- drivers/misc/habanalabs/firmware_if.c | 3 ++- drivers/misc/habanalabs/goya/goya.c | 5 +++-- drivers/misc/habanalabs/habanalabs.h | 16 ++++++++++++++-- 4 files changed, 20 insertions(+), 6 deletions(-) commit 75035fe22b808a520e1d712ebe913684ba406e01 Author: Ben Segal Date: Tue Jul 23 11:22:42 2019 +0300 habanalabs: fix F/W download in BE architecture writeX macros might perform byte-swapping in BE architectures. As our F/W is in LE format, we need to make sure no byte-swapping will occur. There is a standard kernel function (called memcpy_toio) for copying data to I/O area which is used in a lot of drivers to download F/W to PCIe adapters. That function also makes sure the data is copied "as-is", without byte-swapping. This patch use that function to copy the F/W to the GOYA ASIC instead of writeX macros. Signed-off-by: Ben Segal Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/firmware_if.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) commit f46cc0152501e46d1b3aa5e7eade61145070eab0 Author: Nicolin Chen Date: Fri Jul 26 12:34:33 2019 -0700 dma-contiguous: page-align the size in dma_free_contiguous() According to the original dma_direct_alloc_pages() code: { unsigned int count = PAGE_ALIGN(size) >> PAGE_SHIFT; if (!dma_release_from_contiguous(dev, page, count)) __free_pages(page, get_order(size)); } The count parameter for dma_release_from_contiguous() was page aligned before the right-shifting operation, while the new API dma_free_contiguous() forgets to have PAGE_ALIGN() at the size. So this patch simply adds it to prevent any corner case. Fixes: fdaeec198ada ("dma-contiguous: add dma_{alloc,free}_contiguous() helpers") Signed-off-by: Nicolin Chen Reviewed-by: Christoph Hellwig Signed-off-by: Christoph Hellwig kernel/dma/contiguous.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c6622a425acd1d2f3a443cd39b490a8777b622d7 Author: Nicolin Chen Date: Fri Jul 26 12:34:32 2019 -0700 dma-contiguous: do not overwrite align in dma_alloc_contiguous() The dma_alloc_contiguous() limits align at CONFIG_CMA_ALIGNMENT for cma_alloc() however it does not restore it for the fallback routine. This will result in a size mismatch between the allocation and free when running into the fallback routines after cma_alloc() fails, if the align is larger than CONFIG_CMA_ALIGNMENT. This patch adds a cma_align to take care of cma_alloc() and prevent the align from being overwritten. Fixes: fdaeec198ada ("dma-contiguous: add dma_{alloc,free}_contiguous() helpers") Reported-by: Dafna Hirschfeld Signed-off-by: Nicolin Chen Signed-off-by: Christoph Hellwig kernel/dma/contiguous.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 38fb6d0ea34299d97b031ed64fe994158b6f8eb3 Author: Icenowy Zheng Date: Thu Jul 25 11:08:52 2019 +0800 f2fs: use EINVAL for superblock with invalid magic The kernel mount_block_root() function expects -EACESS or -EINVAL for a unmountable filesystem when trying to mount the root with different filesystem types. However, in 5.3-rc1 the behavior when F2FS code cannot find valid block changed to return -EFSCORRUPTED(-EUCLEAN), and this error code makes mount_block_root() fail when trying to probe F2FS. When the magic number of the superblock mismatches, it has a high probability that it's just not a F2FS. In this case return -EINVAL seems to be a better result, and this return value can make mount_block_root() probing work again. Return -EINVAL when the superblock has magic mismatch, -EFSCORRUPTED in other cases (the magic matches but the superblock cannot be recognized). Fixes: 10f966bbf521 ("f2fs: use generic EFSBADCRC/EFSCORRUPTED") Signed-off-by: Icenowy Zheng Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/super.c | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) commit 2e616d9f9ce8d469db4cd0a019cdc2ff3feab577 Author: Darrick J. Wong Date: Sun Jul 28 21:12:32 2019 -0700 xfs: fix stack contents leakage in the v1 inumber ioctls Explicitly initialize the onstack structures to zero so we don't leak kernel memory into userspace when converting the in-core inumbers structure to the v1 inogrp ioctl structure. Add a comment about why we have to use memset to ensure that the padding holes in the structures are set to zero. Fixes: 5f19c7fc6873351 ("xfs: introduce v5 inode group structure") Reported-by: Dan Carpenter Signed-off-by: Darrick J. Wong Reviewed-by: Eric Sandeen fs/xfs/xfs_itable.c | 3 +++ 1 file changed, 3 insertions(+) commit 622445541b751ce70a952b8486ce4512a792c0a2 Author: Masahiro Yamada Date: Thu Jul 25 17:05:13 2019 +0900 kbuild: detect missing "WITH Linux-syscall-note" for uapi headers UAPI headers licensed under GPL are supposed to have exception "WITH Linux-syscall-note" so that they can be included into non-GPL user space application code. Unfortunately, people often miss to add it. Break 'make headers' when any of exported headers lacks the exception note so that the 0-day bot can easily catch it. Signed-off-by: Masahiro Yamada scripts/headers_install.sh | 6 ++++++ 1 file changed, 6 insertions(+) commit cee3536d24a1d5db66b9f68c3ece0af128187ab4 Author: Michael Ellerman Date: Mon Jul 22 22:26:56 2019 +1000 powerpc: Wire up clone3 syscall Wire up the new clone3 syscall added in commit 7f192e3cd316 ("fork: add clone3"). This requires a ppc_clone3 wrapper, in order to save the non-volatile GPRs before calling into the generic syscall code. Otherwise we hit the BUG_ON in CHECK_FULL_REGS in copy_thread(). Lightly tested using Christian's test code on a Power8 LE VM. Signed-off-by: Michael Ellerman Acked-by: Christian Brauner Link: https://lore.kernel.org/r/20190724140259.23554-1-mpe@ellerman.id.au arch/powerpc/include/asm/unistd.h | 1 + arch/powerpc/kernel/entry_32.S | 8 ++++++++ arch/powerpc/kernel/entry_64.S | 5 +++++ arch/powerpc/kernel/syscalls/syscall.tbl | 2 +- 4 files changed, 15 insertions(+), 1 deletion(-) commit d95da993383c78f7efd25957ba3af23af4b1c613 Author: Chris Packham Date: Mon Jul 8 08:35:58 2019 +1200 gpiolib: Preserve desc->flags when setting state desc->flags may already have values set by of_gpiochip_add() so make sure that this isn't undone when setting the initial direction. Cc: stable@vger.kernel.org Fixes: 3edfb7bd76bd1cba ("gpiolib: Show correct direction from the beginning") Signed-off-by: Chris Packham Link: https://lore.kernel.org/r/20190707203558.10993-1-chris.packham@alliedtelesis.co.nz Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 674fa8daa8c922c42a84b6aa85bf5ddc616accf5 Author: Andrew Jeffery Date: Wed Jul 24 17:31:55 2019 +0930 pinctrl: aspeed-g5: Delay acquisition of regmaps While sorting out some devicetree issues I found that the pinctrl driver was failing to acquire its GFX regmap even though the phandle was present in the devicetree: [ 0.124190] aspeed-g5-pinctrl 1e6e2000.syscon:pinctrl: No GFX phandle found, some mux configurations may fail Without access to the GFX regmap we fail to configure the mux for the VPO function: [ 1.548866] pinctrl core: add 1 pinctrl maps [ 1.549826] aspeed-g5-pinctrl 1e6e2000.syscon:pinctrl: found group selector 164 for VPO [ 1.550638] aspeed-g5-pinctrl 1e6e2000.syscon:pinctrl: request pin 144 (V20) for 1e6e6000.display [ 1.551346] aspeed-g5-pinctrl 1e6e2000.syscon:pinctrl: request pin 145 (U19) for 1e6e6000.display ... [ 1.562057] aspeed-g5-pinctrl 1e6e2000.syscon:pinctrl: request pin 218 (T22) for 1e6e6000.display [ 1.562541] aspeed-g5-pinctrl 1e6e2000.syscon:pinctrl: request pin 219 (R20) for 1e6e6000.display [ 1.563113] Muxing pin 144 for VPO [ 1.563456] Want SCU8C[0x00000001]=0x1, got 0x0 from 0x00000000 [ 1.564624] aspeed_gfx 1e6e6000.display: Error applying setting, reverse things back This turned out to be a simple problem of timing: The ASPEED pinctrl driver is probed during arch_initcall(), while GFX is processed much later. As such the GFX syscon is not yet registered during the pinctrl probe() and we get an -EPROBE_DEFER when we try to look it up, however we must not defer probing the pinctrl driver for the inability to mux some GFX-related functions. Switch to lazily grabbing the regmaps when they're first required by the mux configuration. This generates a bit of noise in the patch as we have to drop the `const` qualifier on arguments for several function prototypes, but has the benefit of working. I've smoke tested this for the ast2500-evb under qemu with a dummy graphics device. We now succeed in our attempts to configure the SoC's VPO pinmux function. Fixes: 7d29ed88acbb ("pinctrl: aspeed: Read and write bits in LPC and GFX controllers") Signed-off-by: Andrew Jeffery Link: https://lore.kernel.org/r/20190724080155.12209-1-andrew@aj.id.au Signed-off-by: Linus Walleij drivers/pinctrl/aspeed/pinctrl-aspeed-g4.c | 2 +- drivers/pinctrl/aspeed/pinctrl-aspeed-g5.c | 92 +++++++++++++++++++++--------- drivers/pinctrl/aspeed/pinctrl-aspeed.c | 12 ++-- drivers/pinctrl/aspeed/pinmux-aspeed.h | 5 +- 4 files changed, 74 insertions(+), 37 deletions(-) commit 238644ce4b50a16f1c028d2b92ab2947f61d322e Merge: 5f9e832c1370 ffe0bbabb0cf Author: Linus Walleij Date: Sun Jul 28 23:04:19 2019 +0200 Merge tag 'gpio-v5.3-rc3-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into fixes gpio fixes for v5.3-rc3 - fix for user space handling of active-low flag for GPIO events - fix the stubs for gpiolib: don't WARN() on NULL gpio descriptors if gpiolib is not compiled commit 7a30bdd99f37352b188575b27924c407c6ddff9e Merge: f36cf386e3fe 609488bc979f Author: Thomas Gleixner Date: Sun Jul 28 22:22:40 2019 +0200 Merge branch master from git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git Pick up the spectre documentation so the Grand Schemozzle can be added. commit 609488bc979f99f805f34e9a32c1e3b71179d10b Author: Linus Torvalds Date: Sun Jul 28 12:47:02 2019 -0700 Linux 5.3-rc2 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f36cf386e3fec258a341d446915862eded3e13d8 Author: Thomas Gleixner Date: Wed Jul 17 21:18:59 2019 +0200 x86/speculation/swapgs: Exclude ATOMs from speculation through SWAPGS Intel provided the following information: On all current Atom processors, instructions that use a segment register value (e.g. a load or store) will not speculatively execute before the last writer of that segment retires. Thus they will not use a speculatively written segment value. That means on ATOMs there is no speculation through SWAPGS, so the SWAPGS entry paths can be excluded from the extra LFENCE if PTI is disabled. Create a separate bug flag for the through SWAPGS speculation and mark all out-of-order ATOMs and AMD/HYGON CPUs as not affected. The in-order ATOMs are excluded from the whole mitigation mess anyway. Reported-by: Andrew Cooper Signed-off-by: Thomas Gleixner Reviewed-by: Tyler Hicks Reviewed-by: Josh Poimboeuf arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/kernel/cpu/bugs.c | 18 ++++------------ arch/x86/kernel/cpu/common.c | 44 ++++++++++++++++++++++++-------------- 3 files changed, 33 insertions(+), 30 deletions(-) commit c622fc5f54cb0c7ea2e6fedba27ba533b97657d8 Merge: 8e61ea11c23b 173e6ee21e2b Author: Linus Torvalds Date: Sun Jul 28 12:33:15 2019 -0700 Merge tag 'meminit-v5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull structleak fix from Kees Cook: "Disable gcc-based stack variable auto-init under KASAN (Arnd Bergmann). This fixes a bunch of build warnings under KASAN and the gcc-plugin-based stack auto-initialization features (which are arguably redundant, so better to let KASAN control this)" * tag 'meminit-v5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: structleak: disable STRUCTLEAK_BYREF in combination with KASAN_STACK commit 8e61ea11c23b108c8ce062f791dfa737896da346 Merge: 04ce9318898b b25e8a23d4ea Author: Linus Torvalds Date: Sun Jul 28 10:35:04 2019 -0700 Merge tag 'kbuild-fixes-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fixes from Masahiro Yamada: - add compile_commands.json to .gitignore - fix false-positive warning from gen_compile_commands.py after allnoconfig build - remove unused code * tag 'kbuild-fixes-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kbuild: remove unused single-used-m gen_compile_commands: lower the entry count threshold .gitignore: Add compilation database file kbuild: remove unused objectify macro commit 04ce9318898b294001459b5d705795085a9eac64 Merge: 572782b213b2 d4fddac5a51c Author: Linus Torvalds Date: Sun Jul 28 10:26:10 2019 -0700 Merge tag 'char-misc-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver fixes from Greg KH: "Here are some small char and misc driver fixes for 5.3-rc2 to resolve some reported issues. Nothing major at all, some binder bugfixes for issues found, some new mei device ids, firmware building warning fixes, habanalabs fixes, a few other build fixes, and a MAINTAINERS update. All of these have been in linux-next with no reported issues" * tag 'char-misc-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: test_firmware: fix a memory leak bug hpet: Fix division by zero in hpet_time_div() eeprom: make older eeprom drivers select NVMEM_SYSFS vmw_balloon: Remove Julien from the maintainers list fpga-manager: altera-ps-spi: Fix build error mei: me: add mule creek canyon (EHL) device ids binder: prevent transactions to context manager from its own process. binder: Set end of SG buffer area properly. firmware: Fix missing inline firmware: fix build errors in paged buffer handling code habanalabs: don't reset device when getting VRHOT habanalabs: use %pad for printing a dma_addr_t commit 572782b213b284e05cbbe941a18df055d8d1d898 Merge: ad28fd1cb2bd 61d51456f357 Author: Linus Torvalds Date: Sun Jul 28 10:18:33 2019 -0700 Merge tag 'tty-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty fixes from Greg KH: "Here are two tty/vt fixes: - delete the netx-serial driver as the arch has been removed, no need to keep the serial driver for it around either. - vt console_lock fix to resolve a reported noisy warning at runtime Both of these have been in linux-next with no reported issues" * tag 'tty-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: vt: Grab console_lock around con_is_bound in show_bind tty: serial: netx: Delete driver commit ad28fd1cb2bd7d67f9240f596ea4740c95545fdf Merge: 29af915cabd4 0ce38c5f929c Author: Linus Torvalds Date: Sun Jul 28 10:00:06 2019 -0700 Merge tag 'spdx-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx Pull SPDX fixes from Greg KH: "Here are some small SPDX fixes for 5.3-rc2 for things that came in during the 5.3-rc1 merge window that we previously missed. Only three small patches here: - two uapi patches to resolve some SPDX tags that were not correct - fix an invalid SPDX tag in the iomap Makefile file All have been properly reviewed on the public mailing lists" * tag 'spdx-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx: iomap: fix Invalid License ID treewide: remove SPDX "WITH Linux-syscall-note" from kernel-space headers again treewide: add "WITH Linux-syscall-note" to SPDX tag of uapi headers commit 29af915cabd4d51a2306008f84ee447f3a0d4e8f Merge: 5bb575bcc6d1 d39b5bad8658 Author: Linus Torvalds Date: Sun Jul 28 09:52:35 2019 -0700 Merge tag 'usb-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are some small fixes for 5.3-rc2. All of these resolve some reported issues, some more than others :) Included in here is: - xhci fix for an annoying issue with odd devices - reversion of some usb251xb patches that should not have been merged - usb pci quirk additions and fixups - usb storage fix - usb host controller error test fix All of these have been in linux-next with no reported issues" * tag 'usb-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: xhci: Fix crash if scatter gather is used with Immediate Data Transfer (IDT). usb: usb251xb: Reallow swap-dx-lanes to apply to the upstream port Revert "usb: usb251xb: Add US port lanes inversion property" Revert "usb: usb251xb: Add US lanes inversion dts-bindings" usb: wusbcore: fix unbalanced get/put cluster_id usb/hcd: Fix a NULL vs IS_ERR() bug in usb_hcd_setup_local_mem() usb-storage: Add a limitation for blk_queue_max_hw_sectors() usb: pci-quirks: Minor cleanup for AMD PLL quirk usb: pci-quirks: Correct AMD PLL quirk detection commit 25e5ef302c24a6fead369c0cfe88c073d7b97ca8 Author: Jean Delvare Date: Sun Jul 28 18:41:38 2019 +0200 eeprom: at24: make spd world-readable again The integration of the at24 driver into the nvmem framework broke the world-readability of spd EEPROMs. Fix it. Signed-off-by: Jean Delvare Cc: stable@vger.kernel.org Fixes: 57d155506dd5 ("eeprom: at24: extend driver to plug into the NVMEM framework") Cc: Andrew Lunn Cc: Srinivas Kandagatla Cc: Greg Kroah-Hartman Cc: Bartosz Golaszewski Cc: Arnd Bergmann Signed-off-by: Bartosz Golaszewski drivers/misc/eeprom/at24.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5bb575bcc6d1564340f969c5aa2bff8a500b239f Merge: a9815a4fa2fd 7bd9d465140a Author: Linus Torvalds Date: Sun Jul 28 09:38:55 2019 -0700 Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC fixes from Olof Johansson: "Here's the first batch of fixes for this release cycle. Main diffstat here is the re-deletion of netx. I messed up and most likely didn't remove the files from the index when I test-merged this and saw conflicts, and from there on out 'git rerere' remembered the mistake and I missed checking it. Here it's done again as expected. Besides that: - A defconfig refresh + enabling of new drivers for u8500 - i.MX fixlets for i2c/SAI/pinmux - sleep.S build fix for Davinci - Broadcom devicetree build/warning fix" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: ARM: defconfig: u8500: Add new drivers ARM: defconfig: u8500: Refresh defconfig ARM: dts: bcm: bcm47094: add missing #cells for mdio-bus-mux ARM: davinci: fix sleep.S build error on ARMv4 arm64: dts: imx8mq: fix SAI compatible arm64: dts: imx8mm: Correct SAI3 RXC/TXFS pin's mux option #1 ARM: dts: imx6ul: fix clock frequency property name of I2C buses ARM: Delete netx a second time ARM: dts: imx7ulp: Fix usb-phy unit address format commit ffe0bbabb0cffceceae07484fde1ec2a63b1537c Author: Bartosz Golaszewski Date: Mon Jul 8 10:23:43 2019 +0200 gpio: don't WARN() on NULL descs if gpiolib is disabled If gpiolib is disabled, we use the inline stubs from gpio/consumer.h instead of regular definitions of GPIO API. The stubs for 'optional' variants of gpiod_get routines return NULL in this case as if the relevant GPIO wasn't found. This is correct so far. Calling other (non-gpio_get) stubs from this header triggers a warning because the GPIO descriptor couldn't have been requested. The warning however is unconditional (WARN_ON(1)) and is emitted even if the passed descriptor pointer is NULL. We don't want to force the users of 'optional' gpio_get to check the returned pointer before calling e.g. gpiod_set_value() so let's only WARN on non-NULL descriptors. Cc: stable@vger.kernel.org Reported-by: Claus H. Stovgaard Signed-off-by: Bartosz Golaszewski include/linux/gpio/consumer.h | 64 +++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 32 deletions(-) commit 09f6109ff4f8003af3370dfee0f73fcf6d20087a Merge: 8f9e86ee7959 90c6260c1905 Author: Greg Kroah-Hartman Date: Sun Jul 28 11:07:26 2019 +0200 Merge tag 'iio-fixes-for-5.3a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus Jonathan writes: First set of IIO fixes in the 5.3 cycle. * cros_ec_accel_legacy - Fix a false double entry for channel scale as both per channel and shared. * gyro_adc - Fix uninitialized return code that got detected by GCC 9.0 having be previously missed. * ingenic_adc - Set the clock divider on probe to avoid an issue seen with false button press detections on JZ4725B SoCs. * max9611 - Backwards parameters in GENMASK. * mpu6050 - Enforce the fact only certain scan modes are actually possible. One counter fix also picked up for William, * generic-counter.rst - Fix some references. * tag 'iio-fixes-for-5.3a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: iio: adc: gyroadc: fix uninitialized return code docs: generic-counter.rst: fix broken references for ABI file iio: imu: mpu6050: add missing available scan masks iio: cros_ec_accel_legacy: Fix incorrect channel setting IIO: Ingenic JZ47xx: Set clock divider on probe iio: adc: max9611: Fix misuse of GENMASK macro commit a9815a4fa2fd297cab9fa7a12161b16657290293 Merge: e24ce84e85ab 517c3ba00916 Author: Linus Torvalds Date: Sat Jul 27 21:46:43 2019 -0700 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Thomas Gleixner: "A set of x86 fixes and functional updates: - Prevent stale huge I/O TLB mappings on 32bit. A long standing bug which got exposed by KPTI support for 32bit - Prevent bogus access_ok() warnings in arch_stack_walk_user() - Add display quirks for Lenovo devices which have height and width swapped - Add the missing CR2 fixup for 32 bit async pagefaults. Fallout of the CR2 bug fix series. - Unbreak handling of force enabled HPET by moving the 'is HPET counting' check back to the original place. - A more accurate check for running on a hypervisor platform in the MDS mitigation code. Not perfect, but more accurate than the previous one. - Update a stale and confusing comment vs. IRQ stacks" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/speculation/mds: Apply more accurate check on hypervisor platform x86/hpet: Undo the early counter is counting check x86/entry/32: Pass cr2 to do_async_page_fault() x86/irq/64: Update stale comment x86/sysfb_efi: Add quirks for some devices with swapped width and height x86/stacktrace: Prevent access_ok() warnings in arch_stack_walk_user() mm/vmalloc: Sync unmappings in __purge_vmap_area_lazy() x86/mm: Sync also unmappings in vmalloc_sync_all() x86/mm: Check for pfn instead of page in vmalloc_sync_one() commit e24ce84e85abe50811f33caecbf104b7d9dffb03 Merge: 750991f9af5b cb361d8cdef6 Author: Linus Torvalds Date: Sat Jul 27 21:22:33 2019 -0700 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixes from Thomas Gleixner: "Two fixes for the fair scheduling class: - Prevent freeing memory which is accessible by concurrent readers - Make the RCU annotations for numa groups consistent" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/fair: Use RCU accessors consistently for ->numa_group sched/fair: Don't free p->numa_faults with concurrent readers commit 750991f9af5b4019fd0232c23a4815682ff91021 Merge: 431f288ed730 289a2d22b5b6 Author: Linus Torvalds Date: Sat Jul 27 21:17:56 2019 -0700 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Thomas Gleixner: "A pile of perf related fixes: Kernel: - Fix SLOTS PEBS event constraints for Icelake CPUs - Add the missing mask bit to allow counting hardware generated prefetches on L3 for Icelake CPUs - Make the test for hypervisor platforms more accurate (as far as possible) - Handle PMUs correctly which override event->cpu - Yet another missing fallthrough annotation Tools: perf.data: - Fix loading of compressed data split across adjacent records - Fix buffer size setting for processing CPU topology perf.data header. perf stat: - Fix segfault for event group in repeat mode - Always separate "stalled cycles per insn" line, it was being appended to the "instructions" line. perf script: - Fix --max-blocks man page description. - Improve man page description of metrics. - Fix off by one in brstackinsn IPC computation. perf probe: - Avoid calling freeing routine multiple times for same pointer. perf build: - Do not use -Wshadow on gcc < 4.8, avoiding too strict warnings treated as errors, breaking the build" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86/intel: Mark expected switch fall-throughs perf/core: Fix creating kernel counters for PMUs that override event->cpu perf/x86: Apply more accurate check on hypervisor platform perf/x86/intel: Fix invalid Bit 13 for Icelake MSR_OFFCORE_RSP_x register perf/x86/intel: Fix SLOTS PEBS event constraint perf build: Do not use -Wshadow on gcc < 4.8 perf probe: Avoid calling freeing routine multiple times for same pointer perf probe: Set pev->nargs to zero after freeing pev->args entries perf session: Fix loading of compressed data split across adjacent records perf stat: Always separate stalled cycles per insn perf stat: Fix segfault for event group in repeat mode perf tools: Fix proper buffer size for feature processing perf script: Fix off by one in brstackinsn IPC computation perf script: Improve man page description of metrics perf script: Fix --max-blocks man page description commit 431f288ed730abfaca5cb73f7e0a2d04459aa65c Merge: 13fbe991b5b1 6c11c6e3d5e9 Author: Linus Torvalds Date: Sat Jul 27 21:10:26 2019 -0700 Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking fixes from Thomas Gleixner: "A set of locking fixes: - Address the fallout of the rwsem rework. Missing ACQUIREs and a sanity check to prevent a use-after-free - Add missing checks for unitialized mutexes when mutex debugging is enabled. - Remove the bogus code in the generic SMP variant of arch_futex_atomic_op_inuser() - Fixup the #ifdeffery in lockdep to prevent compile warnings" * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: locking/mutex: Test for initialized mutex locking/lockdep: Clean up #ifdef checks locking/lockdep: Hide unused 'class' variable locking/rwsem: Add ACQUIRE comments tty/ldsem, locking/rwsem: Add missing ACQUIRE to read_failed sleep loop lcoking/rwsem: Add missing ACQUIRE to read_slowpath sleep loop locking/rwsem: Add missing ACQUIRE to read_slowpath exit when queue is empty locking/rwsem: Don't call owner_on_cpu() on read-owner futex: Cleanup generic SMP variant of arch_futex_atomic_op_inuser() commit 13fbe991b5b1bbb52ede39be11d5c196721349bf Merge: 88c508344245 882a0db9d143 Author: Linus Torvalds Date: Sat Jul 27 20:49:43 2019 -0700 Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull objtool fix from Thomas Gleixner: "A single robustness fix for objtool to handle unbalanced CLAC invocations under all circumstances" * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: objtool: Improve UACCESS coverage commit 003bd5b4a7b4a94b501e3a1e2e7c9df6b2a94ed4 Author: Heiner Kallweit Date: Sat Jul 27 12:43:31 2019 +0200 r8169: don't use MSI before RTL8168d It was reported that after resuming from suspend network fails with error "do_IRQ: 3.38 No irq handler for vector", see [0]. Enabling WoL can work around the issue, but the only actual fix is to disable MSI. So let's mimic the behavior of the vendor driver and disable MSI on all chip versions before RTL8168d. [0] https://bugzilla.kernel.org/show_bug.cgi?id=204079 Fixes: 6c6aa15fdea5 ("r8169: improve interrupt handling") Reported-by: Dušan Dragić Tested-by: Dušan Dragić Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169_main.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 66058b1ca5651c7671bf2ba27fcf6907fb20bd0b Author: Heiner Kallweit Date: Sat Jul 27 12:32:28 2019 +0200 Revert ("r8169: remove 1000/Half from supported modes") This reverts commit a6851c613fd7fccc5d1f28d5d8a0cbe9b0f4e8cc. It was reported that RTL8111b successfully finishes 1000/Full autoneg but no data flows. Reverting the original patch fixes the issue. It seems to be a HW issue with the integrated RTL8211B PHY. This PHY version used also e.g. on RTL8168d, so better revert the original patch. Reported-by: Bernhard Held Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169_main.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 8aace4f3eba2a3ceb431e18683ea0e1ecbade5cd Author: René van Dorst Date: Sat Jul 27 11:40:11 2019 +0200 net: phylink: Fix flow control for fixed-link In phylink_parse_fixedlink() the pl->link_config.advertising bits are AND with pl->supported, pl->supported is zeroed and only the speed/duplex modes and MII bits are set. So pl->link_config.advertising always loses the flow control/pause bits. By setting Pause and Asym_Pause bits in pl->supported, the flow control work again when devicetree "pause" is set in fixes-link node and the MAC advertise that is supports pause. Results with this patch. Legend: - DT = 'Pause' is set in the fixed-link in devicetree. - validate() = ‘Yes’ means phylink_set(mask, Pause) is set in the validate(). - flow = results reported my link is Up line. +-----+------------+-------+ | DT | validate() | flow | +-----+------------+-------+ | Yes | Yes | rx/tx | | No | Yes | off | | Yes | No | off | +-----+------------+-------+ Fixes: 9525ae83959b ("phylink: add phylink infrastructure") Signed-off-by: René van Dorst Acked-by: Russell King Signed-off-by: David S. Miller drivers/net/phy/phylink.c | 2 ++ 1 file changed, 2 insertions(+) commit 3db1fa8bb489370b6df634a3d548728294139d66 Author: Paul Bolle Date: Sat Jul 27 00:05:41 2019 +0200 gigaset: stop maintaining seperately The Dutch consumer grade ISDN network will be shut down on September 1, 2019. This means I'll be converted to some sort of VOIP shortly. At that point it would be unwise to try to maintain the gigaset driver, even for odd fixes as I do. So I'll stop maintaining it as a seperate driver and bump support to CAPI in staging. De facto this means the driver will be unmaintained, since no-one seems to be working on CAPI. I've lighty tested the hardware specific modules of this driver (bas-gigaset, ser-gigaset, and usb-gigaset) for v5.3-rc1. The basic functionality appears to be working. It's unclear whether anyone still cares. I'm aware of only one person sort of using the driver a few years ago. Thanks to Karsten Keil for the ISDN subsystems gigaset was using (I4L and CAPI). And many thanks to Hansjoerg Lipp and Tilman Schmidt for writing and upstreaming this driver. Signed-off-by: Paul Bolle Signed-off-by: David S. Miller MAINTAINERS | 7 ------- 1 file changed, 7 deletions(-) commit c7ba50fe2399f0621fae39eb6f5e6abfbb83c38d Author: Jia-Ju Bai Date: Fri Jul 26 22:17:05 2019 +0800 net: rds: Fix possible null-pointer dereferences in rds_rdma_cm_event_handler_cmn() In rds_rdma_cm_event_handler_cmn(), there are some if statements to check whether conn is NULL, such as on lines 65, 96 and 112. But conn is not checked before being used on line 108: trans->cm_connect_complete(conn, event); and on lines 140-143: rdsdebug("DISCONNECT event - dropping connection " "%pI6c->%pI6c\n", &conn->c_laddr, &conn->c_faddr); rds_conn_drop(conn); Thus, possible null-pointer dereferences may occur. To fix these bugs, conn is checked before being used. These bugs are found by a static analysis tool STCheck written by us. Signed-off-by: Jia-Ju Bai Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller net/rds/rdma_transport.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 90c6260c1905a68fb596844087f2223bd4657fee Author: Arnd Bergmann Date: Thu Jul 18 15:57:49 2019 +0200 iio: adc: gyroadc: fix uninitialized return code gcc-9 complains about a blatant uninitialized variable use that all earlier compiler versions missed: drivers/iio/adc/rcar-gyroadc.c:510:5: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized] Return -EINVAL instead here and a few lines above it where we accidentally return 0 on failure. Cc: stable@vger.kernel.org Fixes: 059c53b32329 ("iio: adc: Add Renesas GyroADC driver") Signed-off-by: Arnd Bergmann Reviewed-by: Wolfram Sang Signed-off-by: Jonathan Cameron drivers/iio/adc/rcar-gyroadc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a0d57a552b836206ad7705a1060e6e1ce5a38203 Author: Jia-Ju Bai Date: Fri Jul 26 16:27:36 2019 +0800 isdn: mISDN: hfcsusb: Fix possible null-pointer dereferences in start_isoc_chain() In start_isoc_chain(), usb_alloc_urb() on line 1392 may fail and return NULL. At this time, fifo->iso[i].urb is assigned to NULL. Then, fifo->iso[i].urb is used at some places, such as: LINE 1405: fill_isoc_urb(fifo->iso[i].urb, ...) urb->number_of_packets = num_packets; urb->transfer_flags = URB_ISO_ASAP; urb->actual_length = 0; urb->interval = interval; LINE 1416: fifo->iso[i].urb->... LINE 1419: fifo->iso[i].urb->... Thus, possible null-pointer dereferences may occur. To fix these bugs, "continue" is added to avoid using fifo->iso[i].urb when it is NULL. These bugs are found by a static analysis tool STCheck written by us. Signed-off-by: Jia-Ju Bai Signed-off-by: David S. Miller drivers/isdn/hardware/mISDN/hfcsusb.c | 1 + 1 file changed, 1 insertion(+) commit 88c5083442454e5e8a505b11fa16f32d2879651e Merge: 43e317c1bbdf a035d552a93b Author: Linus Torvalds Date: Sat Jul 27 11:04:18 2019 -0700 Merge tag 'Wimplicit-fallthrough-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux Pull Wimplicit-fallthrough enablement from Gustavo A. R. Silva: "This marks switch cases where we are expecting to fall through, and globally enables the -Wimplicit-fallthrough option in the main Makefile. Finally, some missing-break fixes that have been tagged for -stable: - drm/amdkfd: Fix missing break in switch statement - drm/amdgpu/gfx10: Fix missing break in switch statement With these changes, we completely get rid of all the fall-through warnings in the kernel" * tag 'Wimplicit-fallthrough-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux: Makefile: Globally enable fall-through warning drm/i915: Mark expected switch fall-throughs drm/amd/display: Mark expected switch fall-throughs drm/amdkfd/kfd_mqd_manager_v10: Avoid fall-through warning drm/amdgpu/gfx10: Fix missing break in switch statement drm/amdkfd: Fix missing break in switch statement perf/x86/intel: Mark expected switch fall-throughs mtd: onenand_base: Mark expected switch fall-through afs: fsclient: Mark expected switch fall-throughs afs: yfsclient: Mark expected switch fall-throughs can: mark expected switch fall-throughs firewire: mark expected switch fall-throughs commit 43e317c1bbdfe1d4d6d19d28f925f400898d41b9 Merge: 5efbd93708df 98abe0227827 Author: Linus Torvalds Date: Sat Jul 27 08:58:04 2019 -0700 Merge tag 's390-5.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 updates from Heiko Carstens: - Add ABI to kernel image file which allows e.g. the file utility to figure out the kernel version. - Wire up clone3 system call. - Add support for kasan bitops instrumentation. - uapi header cleanup: use __u{16,32,64} instead of uint{16,32,64}_t. - Provide proper ARCH_ZONE_DMA_BITS so the s390 DMA zone is correctly defined with 2 GB instead of the default value of 1 MB. - Farhan Ali leaves the group of vfio-ccw maintainers. - Various small vfio-ccw fixes. - Add missing locking for airq_areas array in virtio code. - Minor qdio improvements. * tag 's390-5.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: MAINTAINERS: vfio-ccw: Remove myself as the maintainer s390/mm: use shared variables for sysctl range check virtio/s390: fix race on airq_areas[] s390/dma: provide proper ARCH_ZONE_DMA_BITS value s390/kasan: add bitops instrumentation s390/bitops: make test functions return bool s390: wire up clone3 system call kbuild: enable arch/s390/include/uapi/asm/zcrypt.h for uapi header test s390: use __u{16,32,64} instead of uint{16,32,64}_t in uapi header s390/hypfs: fix a typo in the name of a function s390/qdio: restrict QAOB usage to IQD unicast queues s390/qdio: add sanity checks to the fast-requeue path s390: enable detection of kernel version from bzImage Documentation: fix vfio-ccw doc vfio-ccw: Update documentation for csch/hsch vfio-ccw: Don't call cp_free if we are processing a channel program vfio-ccw: Set pa_nr to 0 if memory allocation fails for pa_iova_pfn vfio-ccw: Fix memory leak and don't call cp_free in cp_init vfio-ccw: Fix misleading comment when setting orb.cmd.c64 commit 5efbd93708df56e0fb92b4398960a5bb1ab62f02 Merge: 523634db145a e1ff7390f58e Author: Linus Torvalds Date: Sat Jul 27 08:49:19 2019 -0700 Merge tag 'devicetree-fixes-for-5.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull Devicetree fixes from Rob Herring: "The nvmem changes would typically go thru Greg's tree, but they were missed in the merge window. [ Acked by Greg ] Summary: - Fix mismatches in $id values and actual filenames. Now checked by tools. - Convert nvmem binding to DT schema - Fix a typo in of_property_read_bool() kerneldoc - Remove some redundant description in al-fic interrupt-controller" * tag 'devicetree-fixes-for-5.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: dt-bindings: Fix more $id value mismatches filenames dt-bindings: nvmem: SID: Fix the examples node names dt-bindings: nvmem: Add YAML schemas for the generic NVMEM bindings of: Fix typo in kerneldoc dt-bindings: interrupt-controller: al-fic: remove redundant binding dt-bindings: clk: allwinner,sun4i-a10-ccu: Correct path in $id commit 523634db145a22cd5562714d4c59ea74686afe38 Merge: 5168afe6ef59 87a30e1f05d7 Author: Linus Torvalds Date: Sat Jul 27 08:25:51 2019 -0700 Merge tag 'libnvdimm-fixes-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm fixes from Dan Williams: "A collection of locking and async operations fixes for v5.3-rc2. These had been soaking in a branch targeting the merge window, but missed due to a regression hunt. This fixed up version has otherwise been in -next this past week with no reported issues. In order to gain confidence in the locking changes the pull also includes a debug / instrumentation patch to enable lockdep coverage for libnvdimm subsystem operations that depend on the device_lock for exclusion. As mentioned in the changelog it is a hack, but it works and documents the locking expectations of the sub-system in a way that others can use lockdep to verify. The driver core touches got an ack from Greg. Summary: - Fix duplicate device_unregister() calls (multiple threads competing to do unregister work when scheduling device removal from a sysfs attribute of the self-same device). - Fix badblocks registration order bug. Ensure region badblocks are initialized in advance of namespace registration. - Fix a deadlock between the bus lock and probe operations. - Export device-core infrastructure to coordinate async operations via the device ->dead state. - Add device-core infrastructure to validate device_lock() usage with lockdep" * tag 'libnvdimm-fixes-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: driver-core, libnvdimm: Let device subsystems add local lockdep coverage libnvdimm/bus: Fix wait_nvdimm_bus_probe_idle() ABBA deadlock libnvdimm/bus: Stop holding nvdimm_bus_list_mutex over __nd_ioctl() libnvdimm/bus: Prepare the nd_ioctl() path to be re-entrant libnvdimm/region: Register badblocks before namespaces libnvdimm/bus: Prevent duplicate device_unregister() calls drivers/base: Introduce kill_device() commit 41e6ada93356400ec8bc8dba04818d9e30ee6e9d Author: Mauro Carvalho Chehab Date: Fri Jul 26 08:47:22 2019 -0300 docs: generic-counter.rst: fix broken references for ABI file There are two references to the generic counter ABI, with was added on a separate patch. Both point to a non-existing file. Fix them. Fixes: ea2b23b89579 ("counter: Documentation: Add Generic Counter sysfs documentation") Fixes: 09e7d4ed8991 ("docs: Add Generic Counter interface documentation") Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Cameron Documentation/driver-api/generic-counter.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 74bf71ed792ab0f64631cc65ccdb54c356c36d45 Author: Samuel Thibault Date: Fri Jul 26 23:47:02 2019 +0200 ALSA: hda: Fix 1-minute detection delay when i915 module is not available Distribution installation images such as Debian include different sets of modules which can be downloaded dynamically. Such images may notably include the hda sound modules but not the i915 DRM module, even if the latter was enabled at build time, as reported on https://bugs.debian.org/931507 In such a case hdac_i915 would be linked in and try to load the i915 module, fail since it is not there, but still wait for a whole minute before giving up binding with it. This fixes such as case by only waiting for the binding if the module was properly loaded (or module support is disabled, in which case i915 is already compiled-in anyway). Fixes: f9b54e1961c7 ("ALSA: hda/i915: Allow delayed i915 audio component binding") Signed-off-by: Samuel Thibault Cc: Signed-off-by: Takashi Iwai sound/hda/hdac_i915.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit b25e8a23d4ea7e8ade2c349c22efe88da88c0988 Author: Masahiro Yamada Date: Fri Jul 26 11:17:38 2019 +0900 kbuild: remove unused single-used-m This is unused since commit 9f69a496f100 ("kbuild: split out *.mod out of {single,multi}-used-m rules"). Signed-off-by: Masahiro Yamada scripts/Makefile.lib | 2 -- 1 file changed, 2 deletions(-) commit cb36955a5569f1ff17a42ae93264ef391c013a97 Author: Masahiro Yamada Date: Sat Jul 27 12:01:10 2019 +0900 gen_compile_commands: lower the entry count threshold Running gen_compile_commands.py after building the kernel with allnoconfig gave this: $ ./scripts/gen_compile_commands.py WARNING: Found 449 entries. Have you compiled the kernel? Signed-off-by: Masahiro Yamada scripts/gen_compile_commands.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 26c4c71bcd9a9f2baf8334995b31f718854f7f42 Author: Toru Komatsu Date: Wed Jul 24 09:22:33 2019 +0900 .gitignore: Add compilation database file This file is used by clangd to use language server protocol. It can be generated at each compile using scripts/gen_compile_commands.py. Therefore it is different depending on the environment and should be ignored. Signed-off-by: Toru Komatsu Reviewed-by: Nick Desaulniers Signed-off-by: Masahiro Yamada .gitignore | 3 +++ 1 file changed, 3 insertions(+) commit b2eff0921805935132bc308d3c769ef2efb321ad Author: Masahiro Yamada Date: Tue Jul 23 13:11:26 2019 +0900 kbuild: remove unused objectify macro Commit 415008af3219 ("docs-rst: convert lsm from DocBook to ReST") removed the last users of this macro. Signed-off-by: Masahiro Yamada scripts/Kbuild.include | 3 --- 1 file changed, 3 deletions(-) commit 5168afe6ef596eaf2ff7a533b780c79ce14445e4 Merge: 40233e7c4473 c6c84f78e2f7 Author: Linus Torvalds Date: Fri Jul 26 19:20:34 2019 -0700 Merge tag 'for-linus-20190726-2' of git://git.kernel.dk/linux-block Pull block DMA segment fix from Jens Axboe: "Here's the virtual boundary segment size fix" * tag 'for-linus-20190726-2' of git://git.kernel.dk/linux-block: block: fix max segment size handling in blk_queue_virt_boundary commit 40233e7c447367ffc615b524187970732848d5e3 Merge: a68983891367 acbc372e6109 Author: Linus Torvalds Date: Fri Jul 26 19:13:38 2019 -0700 Merge tag 'selinux-pr-20190726' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux Pull selinux fix from Paul Moore: "One small SELinux patch to add some proper bounds/overflow checking when adding a new sid/secid" * tag 'selinux-pr-20190726' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux: selinux: check sidtab limit before adding a new entry commit 543b8c468f55f27f3c0178a22a91a51aabbbc428 Author: Jaegeuk Kim Date: Wed Jul 17 18:31:53 2019 -0700 f2fs: fix to read source block before invalidating it f2fs_allocate_data_block() invalidates old block address and enable new block address. Then, if we try to read old block by f2fs_submit_page_bio(), it will give WARN due to reading invalid blocks. Let's make the order sanely back. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/gc.c | 70 +++++++++++++++++++++++++++++------------------------------- 1 file changed, 34 insertions(+), 36 deletions(-) commit 5d01ab7bac467edfc530e6ccf953921def935c62 Author: Andrii Nakryiko Date: Fri Jul 26 14:24:38 2019 -0700 libbpf: fix erroneous multi-closing of BTF FD Libbpf stores associated BTF FD per each instance of bpf_program. When program is unloaded, that FD is closed. This is wrong, because leads to a race and possibly closing of unrelated files, if application simultaneously opens new files while bpf_programs are unloaded. It's also unnecessary, because struct btf "owns" that FD, and btf__free(), called from bpf_object__close() will close it. Thus the fix is to never have per-program BTF FD and fetch it from obj->btf, when necessary. Fixes: 2993e0515bb4 ("tools/bpf: add support to read .BTF.ext sections") Reported-by: Andrey Ignatov Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov tools/lib/bpf/libbpf.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit e1ff7390f58e609aa113a2452a953f669abce6cc Author: Rob Herring Date: Fri Jul 26 17:36:52 2019 -0600 dt-bindings: Fix more $id value mismatches filenames The path in the schema '$id' values are wrong. Fix them. Signed-off-by: Rob Herring Documentation/devicetree/bindings/arm/renesas.yaml | 2 +- Documentation/devicetree/bindings/arm/socionext/milbeaut.yaml | 2 +- Documentation/devicetree/bindings/arm/ti/ti,davinci.yaml | 2 +- .../bindings/firmware/intel,ixp4xx-network-processing-engine.yaml | 2 +- Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml | 2 +- Documentation/devicetree/bindings/iio/accel/adi,adxl372.yaml | 2 +- .../bindings/interrupt-controller/intel,ixp4xx-interrupt.yaml | 2 +- ...el,ixp4xx-queue-manager.yaml => intel,ixp4xx-ahb-queue-manager.yaml} | 2 +- Documentation/devicetree/bindings/net/allwinner,sun8i-a83t-emac.yaml | 2 +- .../devicetree/bindings/phy/allwinner,sun6i-a31-mipi-dphy.yaml | 2 +- Documentation/devicetree/bindings/timer/intel,ixp4xx-timer.yaml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) commit ce842e73bccfc61e851c68e155d6365456a4cc16 Author: Maxime Ripard Date: Wed Jul 3 11:54:21 2019 +0200 dt-bindings: nvmem: SID: Fix the examples node names Now that the examples are validated, the examples in the SID binding generates an error since the node names aren't one of the valid ones. Let's switch for one that is ok. Signed-off-by: Maxime Ripard Signed-off-by: Rob Herring Documentation/devicetree/bindings/nvmem/allwinner,sun4i-a10-sid.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c61f0256964b173e4dc71d0e24465ebfd68ef6e1 Author: Maxime Ripard Date: Thu Jun 27 16:10:37 2019 +0100 dt-bindings: nvmem: Add YAML schemas for the generic NVMEM bindings The nvmem providers and consumers have a bunch of generic properties that are needed in a device tree. Add a YAML schemas for those. Reviewed-by: Rob Herring Signed-off-by: Maxime Ripard [Srini: Changed licence to (GPL-2.0 OR BSD-2-Clause)] Signed-off-by: Srinivas Kandagatla Signed-off-by: Rob Herring .../devicetree/bindings/nvmem/nvmem-consumer.yaml | 45 +++++++++++ Documentation/devicetree/bindings/nvmem/nvmem.txt | 81 +------------------ Documentation/devicetree/bindings/nvmem/nvmem.yaml | 93 ++++++++++++++++++++++ 3 files changed, 139 insertions(+), 80 deletions(-) commit f1765a1819ff3489db9500c6d464e682e6844a14 Author: Thierry Reding Date: Fri Jul 26 12:17:44 2019 +0200 of: Fix typo in kerneldoc "Findfrom" is not a word. Replace the function synopsis by something that makes sense. Signed-off-by: Thierry Reding Signed-off-by: Rob Herring include/linux/of.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0a062ba725cdad3b167782179ee914a8402a0184 Merge: a7cf3d24ee60 280c08991622 Author: David S. Miller Date: Fri Jul 26 14:26:41 2019 -0700 Merge tag 'mlx5-fixes-2019-07-25' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== Mellanox, mlx5 fixes 2019-07-25 This series introduces some fixes to mlx5 driver. 1) Ariel is addressing an issue with enacp flow counter race condition 2) Aya fixes ethtool speed handling 3) Edward fixes modify_cq hw bits alignment 4) Maor fixes RDMA_RX capabilities handling 5) Mark reverses unregister devices order to address an issue with LAG 6) From Tariq, - wrong max num channels indication regression - TLS counters naming and documentation as suggested by Jakub - kTLS, Call WARN_ONCE on netdev mismatch There is one patch in this series that touches nfp driver to align TLS statistics names with latest documentation, Jakub is CC'ed. Please pull and let me know if there is any problem. For -stable v4.9: ('net/mlx5: Use reversed order when unregister devices') For -stable v4.20 ('net/mlx5e: Prevent encap flow counter update async to user query') ('net/mlx5: Fix modify_cq_in alignment') For -stable v5.1 ('net/mlx5e: Fix matching of speed to PRM link modes') For -stable v5.2 ('net/mlx5: Add missing RDMA_RX capabilities') ==================== Signed-off-by: David S. Miller commit a689838913670765f7754bb1ba749acac9541626 Merge: e2921f9f95f1 20122994e38a Author: Linus Torvalds Date: Fri Jul 26 14:20:28 2019 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Nine fixes: The most important core one is the dma_max_mapping_size fix that corrects the boot problem Gunter Roeck was having. A couple of other driver only fixes are significant, like the cxgbi selector support addition, the alua 2 second delay and the fdomain build fix" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: scsi_dh_alua: always use a 2 second delay before retrying RTPG scsi: ibmvfc: fix WARN_ON during event pool release scsi: fcoe: fix a typo scsi: megaraid_sas: Make some functions static scsi: megaraid_sas: fix panic on loading firmware crashdump scsi: megaraid_sas: fix spelling mistake "megarid_sas" -> "megaraid_sas" scsi: core: fix the dma_max_mapping_size call scsi: fdomain: fix building pcmcia front-end scsi: target: cxgbit: add support for IEEE_8021QAZ_APP_SEL_STREAM selector commit a7cf3d24ee6081930feb4c830a7f6f16ebe31c49 Author: Subash Abhinov Kasiviswanathan Date: Thu Jul 25 12:07:12 2019 -0600 net: qualcomm: rmnet: Fix incorrect UL checksum offload logic The udp_ip4_ind bit is set only for IPv4 UDP non-fragmented packets so that the hardware can flip the checksum to 0xFFFF if the computed checksum is 0 per RFC768. However, this bit had to be set for IPv6 UDP non fragmented packets as well per hardware requirements. Otherwise, IPv6 UDP packets with computed checksum as 0 were transmitted by hardware and were dropped in the network. In addition to setting this bit for IPv6 UDP, the field is also appropriately renamed to udp_ind as part of this change. Fixes: 5eb5f8608ef1 ("net: qualcomm: rmnet: Add support for TX checksum offload") Cc: Sean Tranchetti Signed-off-by: Subash Abhinov Kasiviswanathan Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c | 13 +++++++++---- include/linux/if_rmnet.h | 4 ++-- 2 files changed, 11 insertions(+), 6 deletions(-) commit 01f5bffad555f8e22a61f4b1261fe09cf1b96994 Author: Haishuang Yan Date: Fri Jul 26 00:40:17 2019 +0800 ip6_tunnel: fix possible use-after-free on xmit ip4ip6/ip6ip6 tunnels run iptunnel_handle_offloads on xmit which can cause a possible use-after-free accessing iph/ipv6h pointer since the packet will be 'uncloned' running pskb_expand_head if it is a cloned gso skb. Fixes: 0e9a709560db ("ip6_tunnel, ip6_gre: fix setting of DSCP on encapsulated packets") Signed-off-by: Haishuang Yan Signed-off-by: David S. Miller net/ipv6/ip6_tunnel.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit e2921f9f95f1c1355a39e54dc038ad95b6e032be Merge: 3ea54d9b0d65 4d5308e78527 Author: Linus Torvalds Date: Fri Jul 26 14:12:54 2019 -0700 Merge tag 'drm-fixes-2019-07-26' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Daniel Vetter: "Dave seems to collect an entire streak of things happening, so again me typing pull summary. Nothing nefarious here, most of the fixes are for new stuff or things users won't see. The amd-display patches are a bit different, and very much look like they should have at least some cc: stable tags. Might be amd is a bit too comfortable with their internal tree and not enough looking at upstream. Dave&me are looking into this, in case something needs rectified with process here. Also no intel fixes pull, but intel CI is general become rather good, still I guess expect a notch more for -rc3. Summary: amdgpu: - fixes for (new in 5.3) hw support (vega20, navi) - disable RAS - lots of display fixes all over (audio, DSC, dongle, clock mgr) ttm: - fix dma_free_attrs calls to appease dma debugging msm: - fixes for dma-api, locking debug and compiler splats core: - fix cmdline mode to not apply rotation if not specified (new in 5.3) - compiler warn fix" * tag 'drm-fixes-2019-07-26' of git://anongit.freedesktop.org/drm/drm: (46 commits) drm/amd/display: Set enabled to false at start of audio disable drm/amdgpu/smu: move fan rpm query into the asic specific code drm/amd/powerplay: custom peak clock freq for navi10 drm: silence variable 'conn' set but not used drm/msm: stop abusing dma_map/unmap for cache drm/msm/dpu: Correct dpu encoder spinlock initialization drm/msm: correct NULL pointer dereference in context_init drm/amd/display: handle active dongle port type is DP++ or DP case drm/amd/display: do not read link setting if edp not connected drm/amd/display: Increase size of audios array drm/amd/display: drop ASSERT() if eDP panel is not connected drm/amd/display: Only enable audio if speaker allocation exists drm/amd/display: Fix dc_create failure handling and 666 color depths drm/amd/display: allocate 4 ddc engines for RV2 drm/amd/display: put back front end initialization sequence drm/amd/display: Wait for flip to complete drm/amd/display: Change min_h_sync_width from 8 to 4 drm/amd/display: use encoder's engine id to find matched free audio device drm/amd/display: fix DMCU hang when going into Modern Standby drm/amd/display: Disable Audio on reinitialize hardware ... commit c5d139697d5d9ecf9c7cd92d7d7838a173508900 Author: Claudiu Manoil Date: Thu Jul 25 16:33:18 2019 +0300 ocelot: Cancel delayed work before wq destruction Make sure the delayed work for stats update is not pending before wq destruction. This fixes the module unload path. The issue is there since day 1. Fixes: a556c76adc05 ("net: mscc: Add initial Ocelot switch support") Signed-off-by: Claudiu Manoil Reviewed-by: Alexandre Belloni Signed-off-by: David S. Miller drivers/net/ethernet/mscc/ocelot.c | 1 + 1 file changed, 1 insertion(+) commit 81af04b432fdfabcdbd2c06be2ee647e3ca41a22 Author: Michal Kalderon Date: Thu Jul 25 13:59:55 2019 +0300 qed: RDMA - Fix the hw_ver returned in device attributes The hw_ver field was initialized to zero. Return the chip revision. This is relevant for rdma driver. Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_rdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9a07406b00cdc6ec689dc142540739575c717f3c Author: Bob Ham Date: Wed Jul 24 07:52:27 2019 -0700 net: usb: qmi_wwan: Add the BroadMobi BM818 card The BroadMobi BM818 M.2 card uses the QMI protocol Signed-off-by: Bob Ham Signed-off-by: Angus Ainslie (Purism) Signed-off-by: David S. Miller drivers/net/usb/qmi_wwan.c | 1 + 1 file changed, 1 insertion(+) commit c6c84f78e2f77be37b9a150ed33be992198741f0 Author: Christoph Hellwig Date: Wed Jul 24 18:26:56 2019 +0200 block: fix max segment size handling in blk_queue_virt_boundary We should only set the max segment size to unlimited if we actually have a virt boundary. Otherwise we accidentally clear that limit when called from the SCSI midlayer, which always calls blk_queue_virt_boundary, even if that mask is 0. Fixes: 7ad388d8e4c7 ("scsi: core: add a host / host template field for the virt boundary") Reported-by: Guenter Roeck Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/blk-settings.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3ea54d9b0d655dab5b5becc7d6456082089fc166 Merge: 0ed288665686 d2eba640a4b9 Author: Linus Torvalds Date: Fri Jul 26 11:29:24 2019 -0700 Merge tag 'docs-5.3-1' of git://git.lwn.net/linux Pull documentation fixes from Jonathan Corbet: "This is mostly a set of follow-on fixes from Mauro fixing various fallout from the massive RST conversion; a few other small fixes as well" * tag 'docs-5.3-1' of git://git.lwn.net/linux: (21 commits) docs: phy: Drop duplicate 'be made' doc:it_IT: translations in process/ docs/vm: transhuge: fix typo in madvise reference doc:it_IT: rephrase statement doc:it_IT: align translation to mainline docs: load_config.py: ensure subdirs end with "/" docs: virtual: add it to the documentation body docs: remove extra conf.py files docs: load_config.py: avoid needing a conf.py just due to LaTeX docs scripts/sphinx-pre-install: seek for Noto CJK fonts for pdf output scripts/sphinx-pre-install: cleanup Gentoo checks scripts/sphinx-pre-install: fix latexmk dependencies scripts/sphinx-pre-install: don't use LaTeX with CentOS 7 scripts/sphinx-pre-install: fix script for RHEL/CentOS docs: conf.py: only use CJK if the font is available docs: conf.py: add CJK package needed by translations docs: pdf: add all Documentation/*/index.rst to PDF output docs: fix broken doc references due to renames docs: power: add it to to the main documentation index docs: powerpc: convert docs to ReST and rename to *.rst ... commit 0ed288665686a52781c0ff04ddfe402c7a5397e1 Merge: 4792ba1f1ff0 5a46d3f71d5e Author: Linus Torvalds Date: Fri Jul 26 11:20:42 2019 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "There's more here than we usually have at this stage, but that's mainly down to the stacktrace changes which came in slightly too late for the merge window. Summary: - Big bad batch of MAINTAINERS updates - Fix handling of SP alignment fault exceptions - Fix PSTATE.SSBS handling on heterogeneous systems - Fix fallout from moving to the generic vDSO implementation - Fix stack unwinding in the face of frame corruption - Fix off-by-one in IORT code - Minor SVE cleanups" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: ACPI/IORT: Fix off-by-one check in iort_dev_find_its_id() arm64: entry: SP Alignment Fault doesn't write to FAR_EL1 arm64: Force SSBS on context switch MAINTAINERS: Update my email address MAINTAINERS: Update my email address MAINTAINERS: Fix spelling mistake in my name MAINTAINERS: Update my email address to @kernel.org arm64: mm: Drop pte_huge() arm64/sve: Fix a couple of magic numbers for the Z-reg count arm64/sve: Factor out FPSIMD to SVE state conversion arm64: stacktrace: Better handle corrupted stacks arm64: stacktrace: Factor out backtrace initialisation arm64: stacktrace: Constify stacktrace.h functions arm64: vdso: Cleanup Makefiles arm64: vdso: fix flip/flop vdso build bug arm64: vdso: Fix population of AT_SYSINFO_EHDR for compat vdso commit 4792ba1f1ff0db30369f7016c1611fda3f84b895 Merge: 863fa8887bef a3b46b86ca76 Author: Linus Torvalds Date: Fri Jul 26 11:08:37 2019 -0700 Merge tag 'for-5.3-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "Two regression fixes: - hangs caused by a missing barrier in the locking code - memory leaks of extent_state due to bad handling of a cached pointer" * tag 'for-5.3-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: fix extent_state leak in btrfs_lock_and_flush_ordered_range btrfs: Fix deadlock caused by missing memory barrier commit 863fa8887befa19c89fadb1dc6666ac34314fbce Merge: 04412819652f 19a1c4092e7c Author: Linus Torvalds Date: Fri Jul 26 10:58:44 2019 -0700 Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs umount_tree() leak fix from Al Viro: "Fix braino introduced in 'switch the remnants of releasing the mountpoint away from fs_pin'. The most visible result is leaking struct mount when mounting btrfs, making it impossible to shut down" * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fix the struct mount leak in umount_tree() commit 04412819652fe30f900d11e96c67b4adfdf17f6b Merge: 750c930b085b 9c0b2596f2ac Author: Linus Torvalds Date: Fri Jul 26 10:32:12 2019 -0700 Merge tag 'for-linus-20190726' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: - Several io_uring fixes/improvements: - Blocking fix for O_DIRECT (me) - Latter page slowness for registered buffers (me) - Fix poll hang under certain conditions (me) - Defer sequence check fix for wrapped rings (Zhengyuan) - Mismatch in async inc/dec accounting (Zhengyuan) - Memory ordering issue that could cause stall (Zhengyuan) - Track sequential defer in bytes, not pages (Zhengyuan) - NVMe pull request from Christoph - Set of hang fixes for wbt (Josef) - Redundant error message kill for libahci (Ding) - Remove unused blk_mq_sched_started_request() and related ops (Marcos) - drbd dynamic alloc shash descriptor to reduce stack use (Arnd) - blkcg ->pd_stat() non-debug print (Tejun) - bcache memory leak fix (Wei) - Comment fix (Akinobu) - BFQ perf regression fix (Paolo) * tag 'for-linus-20190726' of git://git.kernel.dk/linux-block: (24 commits) io_uring: ensure ->list is initialized for poll commands Revert "nvme-pci: don't create a read hctx mapping without read queues" nvme: fix multipath crash when ANA is deactivated nvme: fix memory leak caused by incorrect subsystem free nvme: ignore subnqn for ADATA SX6000LNP drbd: dynamically allocate shash descriptor block: blk-mq: Remove blk_mq_sched_started_request and started_request bcache: fix possible memory leak in bch_cached_dev_run() io_uring: track io length in async_list based on bytes io_uring: don't use iov_iter_advance() for fixed buffers block: properly handle IOCB_NOWAIT for async O_DIRECT IO blk-mq: allow REQ_NOWAIT to return an error inline io_uring: add a memory barrier before atomic_read rq-qos: use a mb for got_token rq-qos: set ourself TASK_UNINTERRUPTIBLE after we schedule rq-qos: don't reset has_sleepers on spurious wakeups rq-qos: fix missed wake-ups in rq_qos_throttle wait: add wq_has_single_sleeper helper block, bfq: check also in-flight I/O in dispatch plugging block: fix sysfs module parameters directory path in comment ... commit 750c930b085ba56cfac3649e8e0dff72a8c5f8a5 Merge: b381c016c5cf 3f8809499bf0 Author: Linus Torvalds Date: Fri Jul 26 10:23:45 2019 -0700 Merge tag 'sound-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "All relatively small changes: - a regression fix for PCM link code with CONFIG_REFCOUNT_FULL; stumbled on a slight difference between atomic_t and refcount_t - a couple of HD-audio stabilization patches addressing the too slow PM resume seen on some Intel chips - a series of ALSA compress-offload API fixes, including the regression by the previous capture stream support - trivial LINE6 USB-audio driver fixes, a new Conexant HD-audio chip coverage, and a fix in AC97 bus error path" * tag 'sound-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda - Add a conexant codec entry to let mute led work ALSA: hda - Fix intermittent CORB/RIRB stall on Intel chips ALSA: ac97: Fix double free of ac97_codec_device ALSA: compress: Be more restrictive about when a drain is allowed ALSA: compress: Don't allow paritial drain operations on capture streams ALSA: compress: Prevent bypasses of set_params ALSA: compress: Fix regression on compressed capture streams ALSA: line6: Fix a typo ALSA: pcm: Fix refcount_inc() on zero usage ALSA: line6: Fix wrong altsetting for LINE6_PODHD500_1 ALSA: hda - Optimize resume for codecs without jack detection commit b381c016c5cfea94f2ad22c0c2195306a70d54ac Merge: 55d31aaec0da 66929812955b Author: Linus Torvalds Date: Fri Jul 26 10:04:19 2019 -0700 Merge tag 'iommu-fixes-v5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull IOMMU fixes from Joerg Roedel: - revert an Intel VT-d patch that caused boot problems on some machines - fix AMD IOMMU interrupts with x2apic enabled - fix a potential crash when Intel VT-d domain allocation fails - fix crash in Intel VT-d driver when accessing a domain without a flush queue - formatting fix for new Intel VT-d debugfs code - fix for use-after-free bug in IOVA code - fix for a NULL-pointer dereference in Intel VT-d driver when PCI hotplug is used - compilation fix for one of the previous fixes * tag 'iommu-fixes-v5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/amd: Add support for X2APIC IOMMU interrupts iommu/iova: Fix compilation error with !CONFIG_IOMMU_IOVA iommu/vt-d: Print pasid table entries MSB to LSB in debugfs iommu/iova: Remove stale cached32_node iommu/vt-d: Check if domain->pgd was allocated iommu/vt-d: Don't queue_iova() if there is no flush queue iommu/vt-d: Avoid duplicated pci dma alias consideration Revert "iommu/vt-d: Consolidate domain_init() to avoid duplication" commit 55d31aaec0da46801e7337779bb3ebe88b034ef3 Merge: 6108cd475ca8 94bccc340710 Author: Linus Torvalds Date: Fri Jul 26 09:43:43 2019 -0700 Merge branch 'for-linus-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/ibft Pull iscsi_ibft fix from Konrad Rzeszutek Wilk: "One tiny fix to enable iSCSI IBFT to be compiled under ARM" * 'for-linus-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/ibft: iscsi_ibft: make ISCSI_IBFT depend on ACPI instead of ISCSI_IBFT_FIND commit 6108cd475ca8323fa9d9b584c44a5229a9a26aa5 Merge: 6789f873ed37 223b2b5030f3 Author: Linus Torvalds Date: Fri Jul 26 09:36:01 2019 -0700 Merge tag 'hwmon-for-v5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fixes from Guenter Roeck: "A couple of hwmon bug fixes: - Update k8temp documentation URL - Register address fixes in nct6775 driver - Fix potential division by zero in occ driver" * tag 'hwmon-for-v5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (k8temp) documentation: update URL of datasheet hwmon: (nct6775) Fix register address and added missed tolerance for nct6106 hwmon: (occ) Fix division by zero issue commit e0d99c4d24fd8861da724b88ebd18a9fae8a2260 Author: Arnaldo Carvalho de Melo Date: Fri Jul 26 12:43:23 2019 -0300 tools headers UAPI: Update tools's copy of kvm.h headers Picking the changes from: 66bb8a065f5a ("KVM: x86: PMU Event Filter") f087a02941fe ("KVM: nVMX: Stash L1's CR3 in vmcs01.GUEST_CR3 on nested entry w/o EPT") 99adb567632b ("KVM: arm/arm64: Add save/restore support for firmware workaround state") Silencing this perf build warning: Warning: Kernel ABI header at 'tools/arch/arm/include/uapi/asm/kvm.h' differs from latest version at 'arch/arm/include/uapi/asm/kvm.h' diff -u tools/arch/arm/include/uapi/asm/kvm.h arch/arm/include/uapi/asm/kvm.h Warning: Kernel ABI header at 'tools/arch/arm64/include/uapi/asm/kvm.h' differs from latest version at 'arch/arm64/include/uapi/asm/kvm.h' diff -u tools/arch/arm64/include/uapi/asm/kvm.h arch/arm64/include/uapi/asm/kvm.h Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/vmx.h' differs from latest version at 'arch/x86/include/uapi/asm/vmx.h' diff -u tools/arch/x86/include/uapi/asm/vmx.h arch/x86/include/uapi/asm/vmx.h Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/kvm.h' differs from latest version at 'arch/x86/include/uapi/asm/kvm.h' diff -u tools/arch/x86/include/uapi/asm/kvm.h arch/x86/include/uapi/asm/kvm.h Warning: Kernel ABI header at 'tools/include/uapi/linux/kvm.h' differs from latest version at 'include/uapi/linux/kvm.h' diff -u tools/include/uapi/linux/kvm.h include/uapi/linux/kvm.h Now 'perf trace' and other code that might use the tools/perf/trace/beauty autogenerated tables will be able to translate this new ioctl code into a string: $ tools/perf/trace/beauty/kvm_ioctl.sh > before $ $ cp include/uapi/linux/kvm.h tools/include/uapi/linux/kvm.h $ tools/perf/trace/beauty/kvm_ioctl.sh > after $ diff -u before after --- before 2019-07-26 12:32:47.959220236 -0300 +++ after 2019-07-26 12:33:05.766464871 -0300 @@ -79,6 +79,7 @@ [0xac] = "SET_ONE_REG", [0xad] = "KVMCLOCK_CTRL", [0xb0] = "GET_REG_LIST", + [0xb2] = "SET_PMU_EVENT_FILTER", [0xb7] = "SMI", [0xba] = "MEMORY_ENCRYPT_OP", [0xbb] = "MEMORY_ENCRYPT_REG_REGION", $ Cc: Adrian Hunter Cc: Andre Przywara Cc: Brendan Gregg Cc: Eric Hankland Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Marc Zyngier Cc: Namhyung Kim Cc: Paolo Bonzini Cc: Sean Christopherson Link: https://lkml.kernel.org/n/tip-py1gcmt6rboehlwg6zvagfg2@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/arch/arm/include/uapi/asm/kvm.h | 12 ++++++++++++ tools/arch/arm64/include/uapi/asm/kvm.h | 10 ++++++++++ tools/arch/x86/include/uapi/asm/kvm.h | 22 ++++++++++++++++++---- tools/arch/x86/include/uapi/asm/vmx.h | 1 - tools/include/uapi/linux/kvm.h | 3 +++ 5 files changed, 43 insertions(+), 5 deletions(-) commit 820571af721990e354649368e641313f85a29976 Author: Arnaldo Carvalho de Melo Date: Fri Jul 26 12:31:28 2019 -0300 tools include UAPI: Sync x86's syscalls_64.tbl and generic unistd.h to pick up clone3 and pidfd_open 05a70a8ec287 ("unistd: protect clone3 via __ARCH_WANT_SYS_CLONE3") 8f3220a80654 ("arch: wire-up clone3() syscall") 7615d9e1780e ("arch: wire-up pidfd_open()") Silencing the following tools/perf build warnings Warning: Kernel ABI header at 'tools/include/uapi/asm-generic/unistd.h' differs from latest version at 'include/uapi/asm-generic/unistd.h' diff -u tools/include/uapi/asm-generic/unistd.h include/uapi/asm-generic/unistd.h Warning: Kernel ABI header at 'tools/perf/arch/x86/entry/syscalls/syscall_64.tbl' differs from latest version at 'arch/x86/entry/syscalls/syscall_64.tbl' diff -u tools/perf/arch/x86/entry/syscalls/syscall_64.tbl arch/x86/entry/syscalls/syscall_64.tbl Now 'perf trace -e pidfd*,clone*' will trace those syscalls as well as the others with those prefixes. $ diff -u /tmp/build/perf/arch/x86/include/generated/asm/syscalls_64.c.before /tmp/build/perf/arch/x86/include/generated/asm/syscalls_64.c --- /tmp/build/perf/arch/x86/include/generated/asm/syscalls_64.c.before 2019-07-26 12:24:55.020944201 -0300 +++ /tmp/build/perf/arch/x86/include/generated/asm/syscalls_64.c 2019-07-26 12:25:03.919047217 -0300 @@ -344,5 +344,7 @@ [431] = "fsconfig", [432] = "fsmount", [433] = "fspick", + [434] = "pidfd_open", + [435] = "clone3", }; -#define SYSCALLTBL_x86_64_MAX_ID 433 +#define SYSCALLTBL_x86_64_MAX_ID 435 $ Cc: Adrian Hunter Cc: Brendan Gregg Cc: Christian Brauner Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-0isnnqxtr1ihz6p8wzjiy47d@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/uapi/asm-generic/unistd.h | 8 +++++++- tools/perf/arch/x86/entry/syscalls/syscall_64.tbl | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) commit 6701c619fa082e6660ecd7573fbad2177380c7cc Author: Zenghui Yu Date: Sat Jul 13 04:40:54 2019 +0000 KVM: arm64: Update kvm_arm_exception_class and esr_class_str for new EC We've added two ESR exception classes for new ARM hardware extensions: ESR_ELx_EC_PAC and ESR_ELx_EC_SVE, but failed to update the strings used in tracing and other debug. Let's update "kvm_arm_exception_class" for these two EC, which the new EC will be visible to user-space via kvm_exit trace events Also update to "esr_class_str" for ESR_ELx_EC_PAC, by which we can get more readable debug info. Cc: Marc Zyngier Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland Cc: Dave Martin Reviewed-by: James Morse Signed-off-by: Zenghui Yu Signed-off-by: Marc Zyngier arch/arm64/include/asm/kvm_arm.h | 7 ++++--- arch/arm64/kernel/traps.c | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) commit 1a8248c74c81a15a32dc3344fb5c622e19072791 Author: Anders Roxell Date: Fri Jul 26 13:28:31 2019 +0200 KVM: arm: vgic-v3: Mark expected switch fall-through When fall-through warnings was enabled by default the following warnings was starting to show up: ../virt/kvm/arm/hyp/vgic-v3-sr.c: In function ‘__vgic_v3_save_aprs’: ../virt/kvm/arm/hyp/vgic-v3-sr.c:351:24: warning: this statement may fall through [-Wimplicit-fallthrough=] cpu_if->vgic_ap0r[2] = __vgic_v3_read_ap0rn(2); ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ ../virt/kvm/arm/hyp/vgic-v3-sr.c:352:2: note: here case 6: ^~~~ ../virt/kvm/arm/hyp/vgic-v3-sr.c:353:24: warning: this statement may fall through [-Wimplicit-fallthrough=] cpu_if->vgic_ap0r[1] = __vgic_v3_read_ap0rn(1); ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ ../virt/kvm/arm/hyp/vgic-v3-sr.c:354:2: note: here default: ^~~~~~~ Rework so that the compiler doesn't warn about fall-through. Fixes: d93512ef0f0e ("Makefile: Globally enable fall-through warning") Signed-off-by: Anders Roxell Signed-off-by: Marc Zyngier virt/kvm/arm/hyp/vgic-v3-sr.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 3d584a3c85d6fe2cf878f220d4ad7145e7f89218 Author: Anders Roxell Date: Fri Jul 26 13:27:05 2019 +0200 arm64: KVM: regmap: Fix unexpected switch fall-through When fall-through warnings was enabled by default, commit d93512ef0f0e ("Makefile: Globally enable fall-through warning"), the following warnings was starting to show up: In file included from ../arch/arm64/include/asm/kvm_emulate.h:19, from ../arch/arm64/kvm/regmap.c:13: ../arch/arm64/kvm/regmap.c: In function ‘vcpu_write_spsr32’: ../arch/arm64/include/asm/kvm_hyp.h:31:3: warning: this statement may fall through [-Wimplicit-fallthrough=] asm volatile(ALTERNATIVE(__msr_s(r##nvh, "%x0"), \ ^~~ ../arch/arm64/include/asm/kvm_hyp.h:46:31: note: in expansion of macro ‘write_sysreg_elx’ #define write_sysreg_el1(v,r) write_sysreg_elx(v, r, _EL1, _EL12) ^~~~~~~~~~~~~~~~ ../arch/arm64/kvm/regmap.c:180:3: note: in expansion of macro ‘write_sysreg_el1’ write_sysreg_el1(v, SYS_SPSR); ^~~~~~~~~~~~~~~~ ../arch/arm64/kvm/regmap.c:181:2: note: here case KVM_SPSR_ABT: ^~~~ In file included from ../arch/arm64/include/asm/cputype.h:132, from ../arch/arm64/include/asm/cache.h:8, from ../include/linux/cache.h:6, from ../include/linux/printk.h:9, from ../include/linux/kernel.h:15, from ../include/asm-generic/bug.h:18, from ../arch/arm64/include/asm/bug.h:26, from ../include/linux/bug.h:5, from ../include/linux/mmdebug.h:5, from ../include/linux/mm.h:9, from ../arch/arm64/kvm/regmap.c:11: ../arch/arm64/include/asm/sysreg.h:837:2: warning: this statement may fall through [-Wimplicit-fallthrough=] asm volatile("msr " __stringify(r) ", %x0" \ ^~~ ../arch/arm64/kvm/regmap.c:182:3: note: in expansion of macro ‘write_sysreg’ write_sysreg(v, spsr_abt); ^~~~~~~~~~~~ ../arch/arm64/kvm/regmap.c:183:2: note: here case KVM_SPSR_UND: ^~~~ Rework to add a 'break;' in the swich-case since it didn't have that, leading to an interresting set of bugs. Cc: stable@vger.kernel.org # v4.17+ Fixes: a892819560c4 ("KVM: arm64: Prepare to handle deferred save/restore of 32-bit registers") Signed-off-by: Anders Roxell [maz: reworked commit message, fixed stable range] Signed-off-by: Marc Zyngier arch/arm64/kvm/regmap.c | 5 +++++ 1 file changed, 5 insertions(+) commit d2eba640a4b96bc1bdc0f4a500b8b8d5e16725c8 Author: Guido Günther Date: Fri Jul 26 11:55:34 2019 +0200 docs: phy: Drop duplicate 'be made' Fix duplicate words. Signed-off-by: Guido Günther Signed-off-by: Jonathan Corbet Documentation/driver-api/phy/phy.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b5fa9fc9e809f84bb20439730162eccfed906a76 Author: Wen Yang Date: Mon Jul 8 14:19:04 2019 +0800 irqchip/renesas-rza1: Fix an use-after-free in rza1_irqc_probe() The gic_node is still being used in the rza1_irqc_parse_map() call after the of_node_put() call, which may result in use-after-free. Fixes: a644ccb819bc ("irqchip: Add Renesas RZ/A1 Interrupt Controller driver") Signed-off-by: Wen Yang Reviewed-by: Geert Uytterhoeven Signed-off-by: Marc Zyngier drivers/irqchip/irq-renesas-rza1.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 9a446ef08f3bfc0c3deb9c6be840af2528ef8cf8 Author: Lucas Stach Date: Fri Jul 12 15:29:05 2019 +0200 irqchip/irq-imx-gpcv2: Forward irq type to parent The GPCv2 is a stacked IRQ controller below the ARM GIC. It doesn't care about the IRQ type itself, but needs to forward the type to the parent IRQ controller, so this one can be configured correctly. Signed-off-by: Lucas Stach Signed-off-by: Marc Zyngier drivers/irqchip/irq-imx-gpcv2.c | 1 + 1 file changed, 1 insertion(+) commit 321275f0d8f5939f2a98749fe03ee97ac97e73d0 Author: Nishka Dasgupta Date: Tue Jul 23 16:09:10 2019 +0530 irqchip/irq-mbigen: Add of_node_put() before return Each iteration of for_each_child_of_node puts the previous node, but in the case of a return from the middle of the loop, there is no put, thus causing a memory leak. Add an of_node_put before the return in three places. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Marc Zyngier drivers/irqchip/irq-mbigen.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 34f8eb92ca053cbba2887bb7e4dbf2b2cd6eb733 Author: Nianyao Tang Date: Fri Jul 26 17:32:57 2019 +0800 irqchip/gic-v3-its: Free unused vpt_page when alloc vpe table fail In its_vpe_init, when its_alloc_vpe_table fails, we should free vpt_page allocated just before, instead of vpe->vpt_page. Let's fix it. Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Signed-off-by: Nianyao Tang Signed-off-by: Shaokun Zhang Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 52f8c8b32ea2f2044efcb4214c1857e29f421c5d Author: Anders Roxell Date: Fri Jul 26 13:28:26 2019 +0200 irqchip/gic-v3: Mark expected switch fall-through When fall-through warnings was enabled by default the following warning was starting to show up: In file included from ../arch/arm64/include/asm/cputype.h:132, from ../arch/arm64/include/asm/cache.h:8, from ../include/linux/cache.h:6, from ../include/linux/printk.h:9, from ../include/linux/kernel.h:15, from ../include/linux/list.h:9, from ../include/linux/kobject.h:19, from ../include/linux/of.h:17, from ../include/linux/irqdomain.h:35, from ../include/linux/acpi.h:13, from ../drivers/irqchip/irq-gic-v3.c:9: ../drivers/irqchip/irq-gic-v3.c: In function ‘gic_cpu_sys_reg_init’: ../arch/arm64/include/asm/sysreg.h:853:2: warning: this statement may fall through [-Wimplicit-fallthrough=] asm volatile(__msr_s(r, "%x0") : : "rZ" (__val)); \ ^~~ ../arch/arm64/include/asm/arch_gicv3.h:20:29: note: in expansion of macro ‘write_sysreg_s’ #define write_gicreg(v, r) write_sysreg_s(v, SYS_ ## r) ^~~~~~~~~~~~~~ ../drivers/irqchip/irq-gic-v3.c:773:4: note: in expansion of macro ‘write_gicreg’ write_gicreg(0, ICC_AP0R2_EL1); ^~~~~~~~~~~~ ../drivers/irqchip/irq-gic-v3.c:774:3: note: here case 6: ^~~~ Rework so that the compiler doesn't warn about fall-through. Fixes: d93512ef0f0e ("Makefile: Globally enable fall-through warning") Signed-off-by: Anders Roxell Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3.c | 4 ++++ 1 file changed, 4 insertions(+) commit 1e112c35e3c96db7c8ca6ddaa96574f00c06e7db Author: Peter Ujfalusi Date: Fri Jul 26 09:42:43 2019 +0300 ASoC: ti: davinci-mcasp: Correct slot_width posed constraint The slot_width is a property for the bus while the constraint for SNDRV_PCM_HW_PARAM_SAMPLE_BITS is for the in memory format. Applying slot_width constraint to sample_bits works most of the time, but it will blacklist valid formats in some cases. With slot_width 24 we can support S24_3LE and S24_LE formats as they both look the same on the bus, but a a 24 constraint on sample_bits would not allow S24_LE as it is stored in 32bits in memory. Implement a simple hw_rule function to allow all formats which require less or equal number of bits on the bus as slot_width (if configured). Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20190726064244.3762-2-peter.ujfalusi@ti.com Signed-off-by: Mark Brown sound/soc/ti/davinci-mcasp.c | 43 ++++++++++++++++++++++++++++++++++--------- 1 file changed, 34 insertions(+), 9 deletions(-) commit 789e162a6255325325bd321ab0cd51dc7e285054 Author: Cheng-Yi Chiang Date: Fri Jul 26 12:42:02 2019 +0800 ASoC: rockchip: Fix mono capture This reverts commit db51707b9c9aeedd310ebce60f15d5bb006567e0. Revert "ASoC: rockchip: i2s: Support mono capture" Previous discussion in https://patchwork.kernel.org/patch/10147153/ explains the issue of the patch. While device is configured as 1-ch, hardware is still generating a 2-ch stream. When user space reads the data and assumes it is a 1-ch stream, the rate will be slower by 2x. Revert the change so 1-ch is not supported. User space can selectively take one channel data out of two channel if 1-ch is preferred. Currently, both channels record identical data. Signed-off-by: Cheng-Yi Chiang Link: https://lore.kernel.org/r/20190726044202.26866-1-cychiang@chromium.org Signed-off-by: Mark Brown sound/soc/rockchip/rockchip_i2s.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit e51b69808b7ec06fc61f5a332f338d94b64b0537 Author: Christophe JAILLET Date: Thu Jul 25 07:35:23 2019 +0200 ASoC: Intel: Fix some acpi vs apci typo in somme comments Fix some typo to have the filaname given in a comment match the real name of the file. Some 'acpi' have erroneously been written 'apci' Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/20190725053523.16542-1-christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown sound/soc/intel/common/soc-acpi-intel-bxt-match.c | 2 +- sound/soc/intel/common/soc-acpi-intel-byt-match.c | 2 +- sound/soc/intel/common/soc-acpi-intel-cht-match.c | 2 +- sound/soc/intel/common/soc-acpi-intel-cnl-match.c | 2 +- sound/soc/intel/common/soc-acpi-intel-glk-match.c | 2 +- sound/soc/intel/common/soc-acpi-intel-hda-match.c | 2 +- sound/soc/intel/common/soc-acpi-intel-hsw-bdw-match.c | 2 +- sound/soc/intel/common/soc-acpi-intel-icl-match.c | 2 +- sound/soc/intel/common/soc-acpi-intel-kbl-match.c | 2 +- sound/soc/intel/common/soc-acpi-intel-skl-match.c | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) commit 34a2a80ff30b5d2330abfa8980c7f0cc15a8158a Author: Peter Ujfalusi Date: Thu Jul 25 11:34:23 2019 +0300 ASoC: ti: davinci-mcasp: Fix clk PDIR handling for i2s master mode When running McASP as master capture alone will not record any audio unless a parallel playback stream is running. As soon as the playback stops the captured data is going to be silent again. In McASP master mode we need to set the PDIR for the clock pins and fix the mcasp_set_axr_pdir() to skip the bits in the PDIR registers above AMUTE. This went unnoticed as most of the boards uses McASP as slave and neither of these issues are visible (audible) in those setups. Fixes: ca3d9433349e ("ASoC: davinci-mcasp: Update PDIR (pin direction) register handling") Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20190725083423.7321-1-peter.ujfalusi@ti.com Signed-off-by: Mark Brown sound/soc/ti/davinci-mcasp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 19a1c4092e7ca1ad1a72ac5535f902c483372cd5 Author: Al Viro Date: Wed Jul 24 12:45:46 2019 -0400 fix the struct mount leak in umount_tree() We need to drop everything we remove from the tree, whether mnt_has_parent() is true or not. Usually the bug manifests as a slow memory leak (leaked struct mount for initramfs); it becomes much more visible in mount_subtree() users, such as btrfs. There we leak a struct mount for btrfs superblock being mounted, which prevents fs shutdown on subsequent umount. Fixes: 56cbb429d911 ("switch the remnants of releasing the mountpoint away from fs_pin") Reported-by: Nikolay Borisov Tested-by: Nikolay Borisov Signed-off-by: Al Viro fs/namespace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e6f4051123fd33901e9655a675b22aefcdc5d277 Author: Manikanta Pubbisetty Date: Mon Jul 22 12:44:50 2019 +0530 {nl,mac}80211: fix interface combinations on crypto controlled devices Commit 33d915d9e8ce ("{nl,mac}80211: allow 4addr AP operation on crypto controlled devices") has introduced a change which allows 4addr operation on crypto controlled devices (ex: ath10k). This change has inadvertently impacted the interface combinations logic on such devices. General rule is that software interfaces like AP/VLAN should not be listed under supported interface combinations and should not be considered during validation of these combinations; because of the aforementioned change, AP/VLAN interfaces(if present) will be checked against interfaces supported by the device and blocks valid interface combinations. Consider a case where an AP and AP/VLAN are up and running; when a second AP device is brought up on the same physical device, this AP will be checked against the AP/VLAN interface (which will not be part of supported interface combinations of the device) and blocks second AP to come up. Add a new API cfg80211_iftype_allowed() to fix the problem, this API works for all devices with/without SW crypto control. Signed-off-by: Manikanta Pubbisetty Fixes: 33d915d9e8ce ("{nl,mac}80211: allow 4addr AP operation on crypto controlled devices") Link: https://lore.kernel.org/r/1563779690-9716-1-git-send-email-mpubbise@codeaurora.org Signed-off-by: Johannes Berg include/net/cfg80211.h | 15 +++++++++++++++ net/mac80211/util.c | 7 +++---- net/wireless/core.c | 6 ++---- net/wireless/nl80211.c | 4 +--- net/wireless/util.c | 27 +++++++++++++++++++++++++-- 5 files changed, 46 insertions(+), 13 deletions(-) commit 73f628ec9e6bcc45b77c53fe6d0c0ec55eaf82af Author: Michael S. Tsirkin Date: Fri Jul 26 07:49:29 2019 -0400 vhost: disable metadata prefetch optimization This seems to cause guest and host memory corruption. Disable for now until we get a better handle on that. Signed-off-by: Michael S. Tsirkin drivers/vhost/vhost.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 98abe0227827f45cddb21875b2ffa9aeca3848b3 Author: Farhan Ali Date: Wed Jul 24 17:32:03 2019 -0400 MAINTAINERS: vfio-ccw: Remove myself as the maintainer I will not be able to continue with my maintainership responsibilities going forward, so remove myself as the maintainer. Signed-off-by: Farhan Ali Acked-by: Cornelia Huck Signed-off-by: Christian Borntraeger Signed-off-by: Heiko Carstens MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit ac7a0fcea39d29125b83b73583463e5ab70fdb37 Author: Vasily Gorbik Date: Wed Jun 26 00:00:42 2019 +0200 s390/mm: use shared variables for sysctl range check Since commit eec4844fae7c ("proc/sysctl: add shared variables for range check") special shared variables are available for sysctl range check. Reuse them for /proc/sys/vm/allocate_pgste proc handler. Acked-by: Christian Borntraeger Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens arch/s390/mm/pgalloc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 4f419eb14272e0698e8c55bb5f3f266cc2a21c81 Author: Halil Pasic Date: Tue Jul 23 17:11:01 2019 +0200 virtio/s390: fix race on airq_areas[] The access to airq_areas was racy ever since the adapter interrupts got introduced to virtio-ccw, but since commit 39c7dcb15892 ("virtio/s390: make airq summary indicators DMA") this became an issue in practice as well. Namely before that commit the airq_info that got overwritten was still functional. After that commit however the two infos share a summary_indicator, which aggravates the situation. Which means auto-online mechanism occasionally hangs the boot with virtio_blk. Signed-off-by: Halil Pasic Reported-by: Marc Hartmayer Reviewed-by: Cornelia Huck Cc: stable@vger.kernel.org Fixes: 96b14536d935 ("virtio-ccw: virtio-ccw adapter interrupt support.") Signed-off-by: Heiko Carstens drivers/s390/virtio/virtio_ccw.c | 4 ++++ 1 file changed, 4 insertions(+) commit 1a2dcff881059dedc14fafc8a442664c8dbd60f1 Author: Halil Pasic Date: Wed Jul 24 00:51:55 2019 +0200 s390/dma: provide proper ARCH_ZONE_DMA_BITS value On s390 ZONE_DMA is up to 2G, i.e. ARCH_ZONE_DMA_BITS should be 31 bits. The current value is 24 and makes __dma_direct_alloc_pages() take a wrong turn first (but __dma_direct_alloc_pages() recovers then). Let's correct ARCH_ZONE_DMA_BITS value and avoid wrong turns. Signed-off-by: Halil Pasic Reported-by: Petr Tesarik Fixes: c61e9637340e ("dma-direct: add support for allocation from ZONE_DMA and ZONE_DMA32") Signed-off-by: Heiko Carstens arch/s390/include/asm/page.h | 2 ++ 1 file changed, 2 insertions(+) commit a3b46b86ca76d7f9d487e6a0b594fd1984e0796e Author: Naohiro Aota Date: Fri Jul 26 16:47:05 2019 +0900 btrfs: fix extent_state leak in btrfs_lock_and_flush_ordered_range btrfs_lock_and_flush_ordered_range() loads given "*cached_state" into cachedp, which, in general, is NULL. Then, lock_extent_bits() updates "cachedp", but it never goes backs to the caller. Thus the caller still see its "cached_state" to be NULL and never free the state allocated under btrfs_lock_and_flush_ordered_range(). As a result, we will see massive state leak with e.g. fstests btrfs/005. Fix this bug by properly handling the pointers. Fixes: bd80d94efb83 ("btrfs: Always use a cached extent_state in btrfs_lock_and_flush_ordered_range") Reviewed-by: Nikolay Borisov Signed-off-by: Naohiro Aota Signed-off-by: David Sterba fs/btrfs/ordered-data.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 09e088a4903bd0dd911b4f1732b250130cdaffed Author: YueHaibing Date: Wed Jul 24 22:08:50 2019 +0800 xen/pciback: remove set but not used variable 'old_state' Fixes gcc '-Wunused-but-set-variable' warning: drivers/xen/xen-pciback/conf_space_capability.c: In function pm_ctrl_write: drivers/xen/xen-pciback/conf_space_capability.c:119:25: warning: variable old_state set but not used [-Wunused-but-set-variable] It is never used so can be removed. Reported-by: Hulk Robot Signed-off-by: YueHaibing Reviewed-by: Boris Ostrovsky Signed-off-by: Juergen Gross drivers/xen/xen-pciback/conf_space_capability.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 4d5308e7852741318e4d40fb8d43d9311b3984ae Merge: f480de3f4a2b 92e6475ae0a0 Author: Dave Airlie Date: Fri Jul 26 14:10:24 2019 +1000 Merge tag 'drm-fixes-5.3-2019-07-24' of git://people.freedesktop.org/~agd5f/linux into drm-fixes drm-fixes-5.3-2019-07-24: amdgpu: - RAS fixes for vega20 - Navi VCN fix - DC audio fixes - DC DSC fixes - DC dongle fixes - DC clk mgr fixes - Fix DDC lines on some RV2 boards - GDS fixes for compute - Navi SMU fixes ttm: - Use the same attributes when freeing d_page->vaddr Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20190724210527.3415-1-alexander.deucher@amd.com commit f480de3f4a2b1ec184f7b5178943adf31080fc2c Merge: 5f9e832c1370 bbb6fc43f131 Author: Dave Airlie Date: Fri Jul 26 14:09:49 2019 +1000 Merge tag 'drm-misc-fixes-2019-07-25' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes - pick up the cmdline fix which missed the merge window (Dmitry) - a handful of msm fixes so i don't have to spin up msm-fixes (Various) - fix -Wunused-but-set-variable warning in drm_framebuffer (Qian) Cc: Dmitry Osipenko Cc: Rob Clark Cc: Qian Cai Signed-off-by: Dave Airlie From: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190725160909.GA106249@art_vandelay commit a035d552a93bb9ef6048733bb9f2a0dc857ff869 Author: Gustavo A. R. Silva Date: Thu Jun 6 19:46:17 2019 -0500 Makefile: Globally enable fall-through warning Now that all the fall-through warnings have been addressed in the kernel, enable the fall-through warning globally. Also, update the deprecated.rst file to include implicit fall-through as 'deprecated' so people can be pointed to a single location for justification. Cc: Masahiro Yamada Cc: Andrew Morton Cc: Michal Marek Cc: Kees Cook Cc: linux-kbuild@vger.kernel.org Signed-off-by: Gustavo A. R. Silva Documentation/process/deprecated.rst | 14 ++++++++++++++ Makefile | 3 +++ 2 files changed, 17 insertions(+) commit 2defb94edb44784b0b5064633e05c97fdb1b0e0f Author: Gustavo A. R. Silva Date: Mon Jul 22 13:03:46 2019 -0500 drm/i915: Mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warnings: drivers/gpu/drm/i915/gem/i915_gem_mman.c: In function ‘i915_gem_fault’: drivers/gpu/drm/i915/gem/i915_gem_mman.c:342:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (!i915_terminally_wedged(i915)) ^ drivers/gpu/drm/i915/gem/i915_gem_mman.c:345:2: note: here case -EAGAIN: ^~~~ drivers/gpu/drm/i915/gem/i915_gem_pages.c: In function ‘i915_gem_object_map’: ./include/linux/compiler.h:78:22: warning: this statement may fall through [-Wimplicit-fallthrough=] # define unlikely(x) __builtin_expect(!!(x), 0) ^~~~~~~~~~~~~~~~~~~~~~~~~~ ./include/asm-generic/bug.h:136:2: note: in expansion of macro ‘unlikely’ unlikely(__ret_warn_on); \ ^~~~~~~~ drivers/gpu/drm/i915/i915_utils.h:49:25: note: in expansion of macro ‘WARN’ #define MISSING_CASE(x) WARN(1, "Missing case (%s == %ld)\n", \ ^~~~ drivers/gpu/drm/i915/gem/i915_gem_pages.c:270:3: note: in expansion of macro ‘MISSING_CASE’ MISSING_CASE(type); ^~~~~~~~~~~~ drivers/gpu/drm/i915/gem/i915_gem_pages.c:272:2: note: here case I915_MAP_WB: ^~~~ drivers/gpu/drm/i915/i915_gpu_error.c: In function ‘error_record_engine_registers’: ./include/linux/compiler.h:78:22: warning: this statement may fall through [-Wimplicit-fallthrough=] # define unlikely(x) __builtin_expect(!!(x), 0) ^~~~~~~~~~~~~~~~~~~~~~~~~~ ./include/asm-generic/bug.h:136:2: note: in expansion of macro ‘unlikely’ unlikely(__ret_warn_on); \ ^~~~~~~~ drivers/gpu/drm/i915/i915_utils.h:49:25: note: in expansion of macro ‘WARN’ #define MISSING_CASE(x) WARN(1, "Missing case (%s == %ld)\n", \ ^~~~ drivers/gpu/drm/i915/i915_gpu_error.c:1196:5: note: in expansion of macro ‘MISSING_CASE’ MISSING_CASE(engine->id); ^~~~~~~~~~~~ drivers/gpu/drm/i915/i915_gpu_error.c:1197:4: note: here case RCS0: ^~~~ drivers/gpu/drm/i915/display/intel_dp.c: In function ‘intel_dp_get_fia_supported_lane_count’: ./include/linux/compiler.h:78:22: warning: this statement may fall through [-Wimplicit-fallthrough=] # define unlikely(x) __builtin_expect(!!(x), 0) ^~~~~~~~~~~~~~~~~~~~~~~~~~ ./include/asm-generic/bug.h:136:2: note: in expansion of macro ‘unlikely’ unlikely(__ret_warn_on); \ ^~~~~~~~ drivers/gpu/drm/i915/i915_utils.h:49:25: note: in expansion of macro ‘WARN’ #define MISSING_CASE(x) WARN(1, "Missing case (%s == %ld)\n", \ ^~~~ drivers/gpu/drm/i915/display/intel_dp.c:233:3: note: in expansion of macro ‘MISSING_CASE’ MISSING_CASE(lane_info); ^~~~~~~~~~~~ drivers/gpu/drm/i915/display/intel_dp.c:234:2: note: here case 1: ^~~~ drivers/gpu/drm/i915/display/intel_display.c: In function ‘check_digital_port_conflicts’: CC [M] drivers/gpu/drm/nouveau/nvkm/engine/disp/cursgv100.o drivers/gpu/drm/i915/display/intel_display.c:12043:7: warning: this statement may fall through [-Wimplicit-fallthrough=] if (WARN_ON(!HAS_DDI(to_i915(dev)))) ^ drivers/gpu/drm/i915/display/intel_display.c:12046:3: note: here case INTEL_OUTPUT_DP: ^~~~ Also, notice that the Makefile is modified to stop ignoring fall-through warnings. The -Wimplicit-fallthrough option will be enabled globally in v5.3. Warning level 3 was used: -Wimplicit-fallthrough=3 This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough. Reviewed-by: Kees Cook Signed-off-by: Gustavo A. R. Silva drivers/gpu/drm/i915/Makefile | 1 - drivers/gpu/drm/i915/display/intel_display.c | 2 +- drivers/gpu/drm/i915/display/intel_dp.c | 1 + drivers/gpu/drm/i915/gem/i915_gem_mman.c | 2 +- drivers/gpu/drm/i915/gem/i915_gem_pages.c | 2 +- drivers/gpu/drm/i915/i915_gpu_error.c | 1 + 6 files changed, 5 insertions(+), 4 deletions(-) commit 9e87891799dc4b203ad680ff431bfcce679c89be Author: Gustavo A. R. Silva Date: Thu Jul 25 19:13:51 2019 -0500 drm/amd/display: Mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Warning level 3 was used: -Wimplicit-fallthrough=3 This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough. Signed-off-by: Gustavo A. R. Silva drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dccg.c | 5 +++++ 1 file changed, 5 insertions(+) commit 12fce1ab4ad97773a19b7de4f5f4953cb74e9881 Author: Gustavo A. R. Silva Date: Mon Jul 22 11:26:31 2019 -0500 drm/amdkfd/kfd_mqd_manager_v10: Avoid fall-through warning In preparation to enabling -Wimplicit-fallthrough, this patch silences the following warning: drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_mqd_manager_v10.c: In function ‘mqd_manager_init_v10’: ./include/linux/dynamic_debug.h:122:52: warning: this statement may fall through [-Wimplicit-fallthrough=] #define __dynamic_func_call(id, fmt, func, ...) do { \ ^ ./include/linux/dynamic_debug.h:143:2: note: in expansion of macro ‘__dynamic_func_call’ __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__) ^~~~~~~~~~~~~~~~~~~ ./include/linux/dynamic_debug.h:153:2: note: in expansion of macro ‘_dynamic_func_call’ _dynamic_func_call(fmt, __dynamic_pr_debug, \ ^~~~~~~~~~~~~~~~~~ ./include/linux/printk.h:336:2: note: in expansion of macro ‘dynamic_pr_debug’ dynamic_pr_debug(fmt, ##__VA_ARGS__) ^~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_mqd_manager_v10.c:432:3: note: in expansion of macro ‘pr_debug’ pr_debug("%s@%i\n", __func__, __LINE__); ^~~~~~~~ drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_mqd_manager_v10.c:433:2: note: here case KFD_MQD_TYPE_COMPUTE: ^~~~ by removing the call to pr_debug() in KFD_MQD_TYPE_CP: "The mqd init for CP and COMPUTE will have the same routine." [1] This bug was found thanks to the ongoing efforts to enable -Wimplicit-fallthrough. [1] https://lore.kernel.org/lkml/c735a1cc-a545-50fb-44e7-c0ad93ee8ee7@amd.com/ Reviewed-by: Alex Deucher Signed-off-by: Gustavo A. R. Silva drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c | 1 - 1 file changed, 1 deletion(-) commit d64062b57eeb58d4928aed945515bf53f7944913 Author: Gustavo A. R. Silva Date: Sun Jul 21 17:37:33 2019 -0500 drm/amdgpu/gfx10: Fix missing break in switch statement Add missing break statement in order to prevent the code from falling through to case AMDGPU_IRQ_STATE_ENABLE. This bug was found thanks to the ongoing efforts to enable -Wimplicit-fallthrough. Fixes: a644d85a5cd4 ("drm/amdgpu: add gfx v10 implementation (v10)") Cc: stable@vger.kernel.org Reviewed-by: Alex Deucher Signed-off-by: Gustavo A. R. Silva drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 1 + 1 file changed, 1 insertion(+) commit 737298d18836fd14b8820de6504536c998986bcd Author: Gustavo A. R. Silva Date: Sun Jul 21 16:41:37 2019 -0500 drm/amdkfd: Fix missing break in switch statement Add missing break statement in order to prevent the code from falling through to case CHIP_NAVI10. This bug was found thanks to the ongoing efforts to enable -Wimplicit-fallthrough. Fixes: 14328aa58ce5 ("drm/amdkfd: Add navi10 support to amdkfd. (v3)") Cc: stable@vger.kernel.org Reviewed-by: Alex Deucher Signed-off-by: Gustavo A. R. Silva drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 1 + 1 file changed, 1 insertion(+) commit 7b26b91d3b2320a64af63b6ec989ee3bed59f0d3 Author: Gustavo A. R. Silva Date: Mon Jun 24 11:11:07 2019 -0500 perf/x86/intel: Mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warnings: arch/x86/events/intel/core.c: In function ‘intel_pmu_init’: arch/x86/events/intel/core.c:4959:8: warning: this statement may fall through [-Wimplicit-fallthrough=] pmem = true; ~~~~~^~~~~~ arch/x86/events/intel/core.c:4960:2: note: here case INTEL_FAM6_SKYLAKE_MOBILE: ^~~~ arch/x86/events/intel/core.c:5008:8: warning: this statement may fall through [-Wimplicit-fallthrough=] pmem = true; ~~~~~^~~~~~ arch/x86/events/intel/core.c:5009:2: note: here case INTEL_FAM6_ICELAKE_MOBILE: ^~~~ Warning level 3 was used: -Wimplicit-fallthrough=3 This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough. Signed-off-by: Gustavo A. R. Silva arch/x86/events/intel/core.c | 2 ++ 1 file changed, 2 insertions(+) commit cc4070449a5bd700c02de4a9d37adb40e116773d Author: Gustavo A. R. Silva Date: Tue Jun 4 08:58:02 2019 -0500 mtd: onenand_base: Mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warning: drivers/mtd/nand/onenand/onenand_base.c: In function ‘onenand_check_features’: drivers/mtd/nand/onenand/onenand_base.c:3264:17: warning: this statement may fall through [-Wimplicit-fallthrough=] this->options |= ONENAND_HAS_NOP_1; drivers/mtd/nand/onenand/onenand_base.c:3265:2: note: here case ONENAND_DEVICE_DENSITY_4Gb: ^~~~ Warning level 3 was used: -Wimplicit-fallthrough=3 This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough. Cc: Jonathan Bakker Signed-off-by: Gustavo A. R. Silva drivers/mtd/nand/onenand/onenand_base.c | 1 + 1 file changed, 1 insertion(+) commit 2988160827b780eec3f958ade2100cc223d4d2d6 Author: Gustavo A. R. Silva Date: Sun May 19 18:43:53 2019 -0500 afs: fsclient: Mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warnings: Warning level 3 was used: -Wimplicit-fallthrough=3 fs/afs/fsclient.c: In function ‘afs_deliver_fs_fetch_acl’: fs/afs/fsclient.c:2199:19: warning: this statement may fall through [-Wimplicit-fallthrough=] call->unmarshall++; ~~~~~~~~~~~~~~~~^~ fs/afs/fsclient.c:2202:2: note: here case 1: ^~~~ fs/afs/fsclient.c:2216:19: warning: this statement may fall through [-Wimplicit-fallthrough=] call->unmarshall++; ~~~~~~~~~~~~~~~~^~ fs/afs/fsclient.c:2219:2: note: here case 2: ^~~~ fs/afs/fsclient.c:2225:19: warning: this statement may fall through [-Wimplicit-fallthrough=] call->unmarshall++; ~~~~~~~~~~~~~~~~^~ fs/afs/fsclient.c:2228:2: note: here case 3: ^~~~ This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough. Signed-off-by: Gustavo A. R. Silva fs/afs/fsclient.c | 51 +++++++++++++++++++++++++++++++++------------------ 1 file changed, 33 insertions(+), 18 deletions(-) commit 35a3a90cc56cee54fb4d45afbbc6dfea0835de0c Author: Gustavo A. R. Silva Date: Sun May 19 18:56:50 2019 -0500 afs: yfsclient: Mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warnings: fs/afs/yfsclient.c: In function ‘yfs_deliver_fs_fetch_opaque_acl’: fs/afs/yfsclient.c:1984:19: warning: this statement may fall through [-Wimplicit-fallthrough=] call->unmarshall++; ~~~~~~~~~~~~~~~~^~ fs/afs/yfsclient.c:1987:2: note: here case 1: ^~~~ fs/afs/yfsclient.c:2005:19: warning: this statement may fall through [-Wimplicit-fallthrough=] call->unmarshall++; ~~~~~~~~~~~~~~~~^~ fs/afs/yfsclient.c:2008:2: note: here case 2: ^~~~ fs/afs/yfsclient.c:2014:19: warning: this statement may fall through [-Wimplicit-fallthrough=] call->unmarshall++; ~~~~~~~~~~~~~~~~^~ fs/afs/yfsclient.c:2017:2: note: here case 3: ^~~~ fs/afs/yfsclient.c:2035:19: warning: this statement may fall through [-Wimplicit-fallthrough=] call->unmarshall++; ~~~~~~~~~~~~~~~~^~ fs/afs/yfsclient.c:2038:2: note: here case 4: ^~~~ fs/afs/yfsclient.c:2047:19: warning: this statement may fall through [-Wimplicit-fallthrough=] call->unmarshall++; ~~~~~~~~~~~~~~~~^~ fs/afs/yfsclient.c:2050:2: note: here case 5: ^~~~ Warning level 3 was used: -Wimplicit-fallthrough=3 Also, fix some commenting style issues. This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough. Signed-off-by: Gustavo A. R. Silva fs/afs/yfsclient.c | 54 +++++++++++++++++++++++++++++++++++------------------- 1 file changed, 35 insertions(+), 19 deletions(-) commit 5a8dadbcfa6b04ea3be6f0ffa04eba173c865378 Author: Gustavo A. R. Silva Date: Tue Jan 29 11:59:28 2019 -0600 can: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warnings: drivers/net/can/peak_canfd/peak_pciefd_main.c:668:3: warning: this statement may fall through [-Wimplicit-fallthrough=] drivers/net/can/spi/mcp251x.c:875:7: warning: this statement may fall through [-Wimplicit-fallthrough=] drivers/net/can/usb/peak_usb/pcan_usb.c:422:6: warning: this statement may fall through [-Wimplicit-fallthrough=] drivers/net/can/at91_can.c:895:6: warning: this statement may fall through [-Wimplicit-fallthrough=] drivers/net/can/at91_can.c:953:15: warning: this statement may fall through [-Wimplicit-fallthrough=] drivers/net/can/usb/peak_usb/pcan_usb.c: In function ‘pcan_usb_decode_error’: drivers/net/can/usb/peak_usb/pcan_usb.c:422:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (n & PCAN_USB_ERROR_BUS_LIGHT) { ^ drivers/net/can/usb/peak_usb/pcan_usb.c:428:2: note: here case CAN_STATE_ERROR_WARNING: ^~~~ Warning level 3 was used: -Wimplicit-fallthrough=3 This patch is part of the ongoing efforts to enabling -Wimplicit-fallthrough. Notice that in some cases spelling mistakes were fixed. In other cases, the /* fall through */ comment is placed at the bottom of the case statement, which is what GCC is expecting to find. Signed-off-by: Gustavo A. R. Silva drivers/net/can/at91_can.c | 6 ++++-- drivers/net/can/peak_canfd/peak_pciefd_main.c | 2 +- drivers/net/can/spi/mcp251x.c | 3 ++- drivers/net/can/usb/peak_usb/pcan_usb.c | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) commit eba6120de93b8d5f2987fac1f533c35b53eaa771 Author: Gustavo A. R. Silva Date: Mon Feb 11 11:48:21 2019 -0600 firewire: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warnings: drivers/firewire/core-device.c: In function ‘set_broadcast_channel’: drivers/firewire/core-device.c:969:7: warning: this statement may fall through [-Wimplicit-fallthrough=] if (data & cpu_to_be32(1 << 31)) { ^ drivers/firewire/core-device.c:974:3: note: here case RCODE_ADDRESS_ERROR: ^~~~ drivers/firewire/core-iso.c: In function ‘manage_channel’: drivers/firewire/core-iso.c:308:7: warning: this statement may fall through [-Wimplicit-fallthrough=] if ((data[0] & bit) == (data[1] & bit)) ^ drivers/firewire/core-iso.c:312:3: note: here default: ^~~~~~~ drivers/firewire/core-topology.c: In function ‘count_ports’: drivers/firewire/core-topology.c:69:23: warning: this statement may fall through [-Wimplicit-fallthrough=] (*child_port_count)++; ~~~~~~~~~~~~~~~~~~~^~ drivers/firewire/core-topology.c:70:3: note: here case SELFID_PORT_PARENT: ^~~~ Warning level 3 was used: -Wimplicit-fallthrough=3 Notice that in some cases, the code comment is modified in accordance with what GCC is expecting to find. This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough. Cc: Kees Cook Cc: Mathieu Malaterre Signed-off-by: Stefan Richter (reworded a comment) Signed-off-by: Gustavo A. R. Silva drivers/firewire/core-device.c | 2 +- drivers/firewire/core-iso.c | 2 +- drivers/firewire/core-topology.c | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) commit 28ba934d28cf46c1ea92f6aff28e8d9ec52e194e Merge: 47d858d0bdcd cb8ffde5694a Author: David S. Miller Date: Thu Jul 25 17:35:03 2019 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Alexei Starovoitov says: ==================== pull-request: bpf 2019-07-25 The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) fix segfault in libbpf, from Andrii. 2) fix gso_segs access, from Eric. 3) tls/sockmap fixes, from Jakub and John. ==================== Signed-off-by: David S. Miller commit 47d858d0bdcd47cc1c6c9eeca91b091dd9e55637 Author: Haishuang Yan Date: Thu Jul 25 11:07:56 2019 +0800 ipip: validate header length in ipip_tunnel_xmit We need the same checks introduced by commit cb9f1b783850 ("ip: validate header length on virtual device xmit") for ipip tunnel. Fixes: cb9f1b783850b ("ip: validate header length on virtual device xmit") Signed-off-by: Haishuang Yan Signed-off-by: David S. Miller net/ipv4/ipip.c | 3 +++ 1 file changed, 3 insertions(+) commit 53db1cced401e4c65d49edf198e00daa9fc837e6 Author: Jakub Kicinski Date: Wed Jul 24 17:07:14 2019 -0700 selftests/net: add missing gitignores (ipv6_flowlabel) ipv6_flowlabel and ipv6_flowlabel_mgr are missing from gitignore. Quentin points out that the original commit 3fb321fde22d ("selftests/net: ipv6 flowlabel") did add ignore entries, they are just missing the "ipv6_" prefix. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Acked-by: Willem de Bruijn Signed-off-by: David S. Miller tools/testing/selftests/net/.gitignore | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d1f0b5dce8fda09a7f5f04c1878f181d548e42f5 Author: Sudarsana Reddy Kalluru Date: Tue Jul 23 19:32:41 2019 -0700 bnx2x: Disable multi-cos feature. Commit 3968d38917eb ("bnx2x: Fix Multi-Cos.") which enabled multi-cos feature after prolonged time in driver added some regression causing numerous issues (sudden reboots, tx timeout etc.) reported by customers. We plan to backout this commit and submit proper fix once we have root cause of issues reported with this feature enabled. Fixes: 3968d38917eb ("bnx2x: Fix Multi-Cos.") Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Manish Chopra Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 173e6ee21e2b3f477f07548a79c43b8d9cfbb37d Author: Arnd Bergmann Date: Mon Jul 22 13:41:20 2019 +0200 structleak: disable STRUCTLEAK_BYREF in combination with KASAN_STACK The combination of KASAN_STACK and GCC_PLUGIN_STRUCTLEAK_BYREF leads to much larger kernel stack usage, as seen from the warnings about functions that now exceed the 2048 byte limit: drivers/media/i2c/tvp5150.c:253:1: error: the frame size of 3936 bytes is larger than 2048 bytes drivers/media/tuners/r820t.c:1327:1: error: the frame size of 2816 bytes is larger than 2048 bytes drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c:16552:1: error: the frame size of 3144 bytes is larger than 2048 bytes [-Werror=frame-larger-than=] fs/ocfs2/aops.c:1892:1: error: the frame size of 2088 bytes is larger than 2048 bytes fs/ocfs2/dlm/dlmrecovery.c:737:1: error: the frame size of 2088 bytes is larger than 2048 bytes fs/ocfs2/namei.c:1677:1: error: the frame size of 2584 bytes is larger than 2048 bytes fs/ocfs2/super.c:1186:1: error: the frame size of 2640 bytes is larger than 2048 bytes fs/ocfs2/xattr.c:3678:1: error: the frame size of 2176 bytes is larger than 2048 bytes net/bluetooth/l2cap_core.c:7056:1: error: the frame size of 2144 bytes is larger than 2048 bytes [-Werror=frame-larger-than=] net/bluetooth/l2cap_core.c: In function 'l2cap_recv_frame': net/bridge/br_netlink.c:1505:1: error: the frame size of 2448 bytes is larger than 2048 bytes net/ieee802154/nl802154.c:548:1: error: the frame size of 2232 bytes is larger than 2048 bytes net/wireless/nl80211.c:1726:1: error: the frame size of 2224 bytes is larger than 2048 bytes net/wireless/nl80211.c:2357:1: error: the frame size of 4584 bytes is larger than 2048 bytes net/wireless/nl80211.c:5108:1: error: the frame size of 2760 bytes is larger than 2048 bytes net/wireless/nl80211.c:6472:1: error: the frame size of 2112 bytes is larger than 2048 bytes The structleak plugin was previously disabled for CONFIG_COMPILE_TEST, but meant we missed some bugs, so this time we should address them. The frame size warnings are distracting, and risking a kernel stack overflow is generally not beneficial to performance, so it may be best to disallow that particular combination. This can be done by turning off either one. I picked the dependency in GCC_PLUGIN_STRUCTLEAK_BYREF and GCC_PLUGIN_STRUCTLEAK_BYREF_ALL, as this option is designed to make uninitialized stack usage less harmful when enabled on its own, but it also prevents KASAN from detecting those cases in which it was in fact needed. KASAN_STACK is currently implied by KASAN on gcc, but could be made a user selectable option if we want to allow combining (non-stack) KASAN with GCC_PLUGIN_STRUCTLEAK_BYREF. Note that it would be possible to specifically address the files that print the warning, but presumably the overall stack usage is still significantly higher than in other configurations, so this would not address the full problem. I could not test this with CONFIG_INIT_STACK_ALL, which may or may not suffer from a similar problem. Fixes: 81a56f6dcd20 ("gcc-plugins: structleak: Generalize to all variable types") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20190722114134.3123901-1-arnd@arndb.de Signed-off-by: Kees Cook security/Kconfig.hardening | 7 +++++++ 1 file changed, 7 insertions(+) commit 280c089916228a005af7f95c1716ea1fea1027b5 Author: Tariq Toukan Date: Mon Jul 22 13:43:03 2019 +0300 Documentation: TLS: fix stat counters description Add missing description of counters. Split tx_tls_encrypted counter into two, to give packets and bytes indications. Fixes: f42c104f2ec9 ("Documentation: add TLS offload documentation") Suggested-by: Jakub Kicinski Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed Documentation/networking/tls-offload.rst | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) commit 4ea52e25089724abf7ee2d6c0c52064e49252b64 Author: Tariq Toukan Date: Thu Jul 18 16:34:05 2019 +0300 nfp: tls: rename tls packet counters Align to the naming convention in TLS documentation. Fixes: 51a5e563298d ("nfp: tls: add basic statistics") Suggested-by: Jakub Kicinski Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 304ecc9a34b81a8b03b685f4460d0f9c1d6d4df9 Author: Tariq Toukan Date: Thu Jul 18 16:32:31 2019 +0300 net/mlx5e: kTLS, Call WARN_ONCE on netdev mismatch A netdev mismatch in the processed TLS SKB should not occur, and indicates a kernel bug. Add WARN_ONCE to spot such cases. Fixes: d2ead1f360e8 ("net/mlx5e: Add kTLS TX HW offload support") Suggested-by: Jakub Kicinski Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 90bb769291161cf25a818d69cf608c181654473e Author: Ariel Levkovich Date: Sat Jul 6 18:06:15 2019 +0300 net/mlx5e: Prevent encap flow counter update async to user query This patch prevents a race between user invoked cached counters query and a neighbor last usage updater. The cached flow counter stats can be queried by calling "mlx5_fc_query_cached" which provides the number of bytes and packets that passed via this flow since the last time this counter was queried. It does so by reducting the last saved stats from the current, cached stats and then updating the last saved stats with the cached stats. It also provide the lastuse value for that flow. Since "mlx5e_tc_update_neigh_used_value" needs to retrieve the last usage time of encapsulation flows, it calls the flow counter query method periodically and async to user queries of the flow counter using cls_flower. This call is causing the driver to update the last reported bytes and packets from the cache and therefore, future user queries of the flow stats will return lower than expected number for bytes and packets since the last saved stats in the driver was updated async to the last saved stats in cls_flower. This causes wrong stats presentation of encapsulation flows to user. Since the neighbor usage updater only needs the lastuse stats from the cached counter, the fix is to use a dedicated lastuse query call that returns the lastuse value without synching between the cached stats and the last saved stats. Fixes: f6dfb4c3f216 ("net/mlx5e: Update neighbour 'used' state using HW flow rules counters") Signed-off-by: Ariel Levkovich Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 4 ++-- drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c | 5 +++++ include/linux/mlx5/fs.h | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) commit 4b95840a6ced0634082f6d962ba9aa0ce797f12f Author: Aya Levin Date: Sun Jun 16 13:20:29 2019 +0300 net/mlx5e: Fix matching of speed to PRM link modes Speed translation is performed based on legacy or extended PTYS register. Translate speed with respect to: 1) Capability bit of extended PTYS table. 2) User request: a) When auto-negotiation is turned on, inspect advertisement whether it contains extended link modes. b) When auto-negotiation is turned off, speed > 100Gbps (maximal speed supported in legacy mode). With both conditions fulfilled translation is done with extended PTYS table otherwise use legacy PTYS table. Without this patch 25/50/100 Gbps speed cannot be set, since try to configure in extended mode but read from legacy mode. Fixes: dd1b9e09c12b ("net/mlx5: ethtool, Allow legacy link-modes configuration via non-extended ptys") Signed-off-by: Aya Levin Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en/port.c | 27 ++++++--- drivers/net/ethernet/mellanox/mlx5/core/en/port.h | 6 +- .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 67 +++++++++++++++------- 3 files changed, 68 insertions(+), 32 deletions(-) commit 694826e366349d5b27599f591d3bd3a53512306e Author: Tariq Toukan Date: Sun Jul 14 11:43:43 2019 +0300 net/mlx5e: Fix wrong max num channels indication No XSK support in the enhanced IPoIB driver and representors. Add a profile property to specify this, and enhance the logic that calculates the max number of channels to take it into account. Fixes: db05815b36cb ("net/mlx5e: Add XSK zero-copy support") Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 12 ++------ .../net/ethernet/mellanox/mlx5/core/en/params.h | 5 +-- .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 2 +- .../ethernet/mellanox/mlx5/core/en_fs_ethtool.c | 3 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 36 ++++++++++------------ drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 2 ++ drivers/net/ethernet/mellanox/mlx5/core/en_stats.c | 8 ++--- .../net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 7 ++--- .../ethernet/mellanox/mlx5/core/ipoib/ipoib_vlan.c | 1 + 9 files changed, 35 insertions(+), 41 deletions(-) commit 7a32f2962c56d9d8a836b4469855caeee8766bd4 Author: Edward Srouji Date: Tue Jul 23 10:12:55 2019 +0300 net/mlx5: Fix modify_cq_in alignment Fix modify_cq_in alignment to match the device specification. After this fix the 'cq_umem_valid' field will be in the right offset. Cc: # 4.19 Fixes: bd37197554eb ("net/mlx5: Update mlx5_ifc with DEVX UID bits") Signed-off-by: Edward Srouji Reviewed-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed include/linux/mlx5/mlx5_ifc.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 987f6c69dd923069d443f6a37225f5b1630a30f2 Author: Maor Gottlieb Date: Sun Jul 14 11:33:07 2019 +0300 net/mlx5: Add missing RDMA_RX capabilities New flow table type RDMA_RX was added but the MLX5_CAP_FLOW_TABLE_TYPE didn't handle this new flow table type. This means that MLX5_CAP_FLOW_TABLE_TYPE returns an empty capability to this flow table type. Update both the macro and the maximum supported flow table type to RDMA_RX. Fixes: d83eb50e29de ("net/mlx5: Add support in RDMA RX steering") Signed-off-by: Maor Gottlieb Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/fs_core.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 08aa5e7da6bce1a1963f63cf32c2e7ad434ad578 Author: Mark Zhang Date: Tue Jul 9 05:37:12 2019 +0300 net/mlx5: Use reversed order when unregister devices When lag is active, which is controlled by the bonded mlx5e netdev, mlx5 interface unregestering must happen in the reverse order where rdma is unregistered (unloaded) first, to guarantee all references to the lag context in hardware is removed, then remove mlx5e netdev interface which will cleanup the lag context from hardware. Without this fix during destroy of LAG interface, we observed following errors: * mlx5_cmd_check:752:(pid 12556): DESTROY_LAG(0x843) op_mod(0x0) failed, status bad parameter(0x3), syndrome (0xe4ac33) * mlx5_cmd_check:752:(pid 12556): DESTROY_LAG(0x843) op_mod(0x0) failed, status bad parameter(0x3), syndrome (0xa5aee8). Fixes: a31208b1e11d ("net/mlx5_core: New init and exit flow for mlx5_core") Reviewed-by: Parav Pandit Reviewed-by: Leon Romanovsky Signed-off-by: Mark Zhang Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit de4ee728465f7c0c29241550e083139b2ce9159c Author: Christoph Hellwig Date: Wed Jul 24 08:52:55 2019 +0200 nouveau: unlock mmap_sem on all errors from nouveau_range_fault Currently nouveau_svm_fault expects nouveau_range_fault to never unlock mmap_sem, but the latter unlocks it for a random selection of error codes. Fix this up by always unlocking mmap_sem for non-zero return values in nouveau_range_fault, and only unlocking it in the caller for successful returns. Link: https://lore.kernel.org/r/20190724065258.16603-5-hch@lst.de Tested-by: Ralph Campbell Signed-off-by: Christoph Hellwig Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe drivers/gpu/drm/nouveau/nouveau_svm.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 5fbcf5015db8e9f04a9da6d40322622fa229da54 Author: Christoph Hellwig Date: Wed Jul 24 08:52:54 2019 +0200 nouveau: remove the block parameter to nouveau_range_fault The parameter is always false, so remove it as well as the -EAGAIN handling that can only happen for the non-blocking case. Link: https://lore.kernel.org/r/20190724065258.16603-4-hch@lst.de Tested-by: Ralph Campbell Signed-off-by: Christoph Hellwig Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe drivers/gpu/drm/nouveau/nouveau_svm.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 02712bc3250849c1cf99d626aea98f610e695f34 Author: Christoph Hellwig Date: Wed Jul 24 08:52:53 2019 +0200 mm/hmm: move hmm_vma_range_done and hmm_vma_fault to nouveau These two functions are marked as a legacy APIs to get rid of, but seem to suit the current nouveau flow. Move it to the only user in preparation for fixing a locking bug involving caller and callee. All comments referring to the old API have been removed as this now is a driver private helper. Link: https://lore.kernel.org/r/20190724065258.16603-3-hch@lst.de Tested-by: Ralph Campbell Signed-off-by: Christoph Hellwig Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe drivers/gpu/drm/nouveau/nouveau_svm.c | 46 +++++++++++++++++++++++++++-- include/linux/hmm.h | 54 ----------------------------------- 2 files changed, 44 insertions(+), 56 deletions(-) commit 2bcbeaefde2f0384d6ad351c151b1a9fe7791a0a Author: Christoph Hellwig Date: Wed Jul 24 08:52:52 2019 +0200 mm/hmm: always return EBUSY for invalid ranges in hmm_range_{fault,snapshot} We should not have two different error codes for the same condition. EAGAIN must be reserved for the FAULT_FLAG_ALLOW_RETRY retry case and signals to the caller that the mmap_sem has been unlocked. Use EBUSY for the !valid case so that callers can get the locking right. Link: https://lore.kernel.org/r/20190724065258.16603-2-hch@lst.de Tested-by: Ralph Campbell Signed-off-by: Christoph Hellwig Reviewed-by: Ralph Campbell Reviewed-by: Jason Gunthorpe Reviewed-by: Felix Kuehling [jgg: elaborated commit message] Signed-off-by: Jason Gunthorpe Documentation/vm/hmm.rst | 2 +- mm/hmm.c | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) commit 83fbae60fd3885c6e8da5863582d0317731c5528 Author: Chris Packham Date: Wed Jul 24 11:35:01 2019 +1200 fsl/fman: Remove comment referring to non-existent function fm_set_max_frm() existed in the Freescale SDK as a callback for an early_param. When this code was ported to the upstream kernel the early_param was converted to a module_param making the reference to the function incorrect. The rest of the comment already does a good job of explaining the parameter so removing the reference to the non-existent function seems like the best thing to do. Signed-off-by: Chris Packham Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fman/fman.c | 3 --- 1 file changed, 3 deletions(-) commit 3008e06fdf0973770370f97d5f1fba3701d8281d Author: Navid Emamdoost Date: Tue Jul 23 17:11:51 2019 -0500 st_nci_hci_connectivity_event_received: null check the allocation devm_kzalloc may fail and return NULL. So the null check is needed. Signed-off-by: Navid Emamdoost Signed-off-by: David S. Miller drivers/nfc/st-nci/se.c | 2 ++ 1 file changed, 2 insertions(+) commit 9891d06836e67324c9e9c4675ed90fc8b8110034 Author: Navid Emamdoost Date: Tue Jul 23 17:04:30 2019 -0500 st21nfca_connectivity_event_received: null check the allocation devm_kzalloc may fail and return null. So the null check is needed. Signed-off-by: Navid Emamdoost Signed-off-by: David S. Miller drivers/nfc/st21nfca/se.c | 2 ++ 1 file changed, 2 insertions(+) commit 4b663366246be1d1d4b1b8b01245b2e88ad9e706 Author: Alexis Bauvin Date: Tue Jul 23 16:23:01 2019 +0200 tun: mark small packets as owned by the tap sock - v1 -> v2: Move skb_set_owner_w to __tun_build_skb to reduce patch size Small packets going out of a tap device go through an optimized code path that uses build_skb() rather than sock_alloc_send_pskb(). The latter calls skb_set_owner_w(), but the small packet code path does not. The net effect is that small packets are not owned by the userland application's socket (e.g. QEMU), while large packets are. This can be seen with a TCP session, where packets are not owned when the window size is small enough (around PAGE_SIZE), while they are once the window grows (note that this requires the host to support virtio tso for the guest to offload segmentation). All this leads to inconsistent behaviour in the kernel, especially on netfilter modules that uses sk->socket (e.g. xt_owner). Fixes: 66ccbc9c87c2 ("tap: use build_skb() for small packet") Signed-off-by: Alexis Bauvin Acked-by: Jason Wang Signed-off-by: David S. Miller drivers/net/tun.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 16b2084a8afa1432d14ba72b7c97d7908e178178 Merge: c8ec4632c6ac f8be17b81d44 Author: David S. Miller Date: Thu Jul 25 11:34:39 2019 -0700 Merge branch 'dim-fixes' Leon Romanovsky says: ==================== DIM fixes for 5.3 Those two fixes for recently merged DIM patches, both exposed through RDMa DIM usage. ==================== Signed-off-by: David S. Miller commit f8be17b81d44aed1f9ea68c3fc70f501c9616e2d Author: Leon Romanovsky Date: Tue Jul 23 10:22:48 2019 +0300 lib/dim: Fix -Wunused-const-variable warnings DIM causes to the following warnings during kernel compilation which indicates that tx_profile and rx_profile are supposed to be declared in *.c and not in *.h files. In file included from ./include/rdma/ib_verbs.h:64, from ./include/linux/mlx5/device.h:37, from ./include/linux/mlx5/driver.h:51, from ./include/linux/mlx5/vport.h:36, from drivers/infiniband/hw/mlx5/ib_virt.c:34: ./include/linux/dim.h:326:1: warning: _tx_profile_ defined but not used [-Wunused-const-variable=] 326 | tx_profile[DIM_CQ_PERIOD_NUM_MODES][NET_DIM_PARAMS_NUM_PROFILES] = { | ^~~~~~~~~~ ./include/linux/dim.h:320:1: warning: _rx_profile_ defined but not used [-Wunused-const-variable=] 320 | rx_profile[DIM_CQ_PERIOD_NUM_MODES][NET_DIM_PARAMS_NUM_PROFILES] = { | ^~~~~~~~~~ Fixes: 4f75da3666c0 ("linux/dim: Move implementation to .c files") Signed-off-by: Leon Romanovsky Reviewed-by: Bart Van Assche Acked-by: Saeed Mahameed Signed-off-by: David S. Miller include/linux/dim.h | 56 ----------------------------------------------------- lib/dim/net_dim.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 56 deletions(-) commit f06d0ca45827a5790d7508de4759aed976933d4d Author: Yamin Friedman Date: Tue Jul 23 10:22:47 2019 +0300 linux/dim: Fix overflow in dim calculation While using net_dim, a dim_sample was used without ever initializing the comps value. Added use of DIV_ROUND_DOWN_ULL() to prevent potential overflow, it should not be a problem to save the final result in an int because after the division by epms the value should not be larger than a few thousand. [ 1040.127124] UBSAN: Undefined behaviour in lib/dim/dim.c:78:23 [ 1040.130118] signed integer overflow: [ 1040.131643] 134718714 * 100 cannot be represented in type 'int' Fixes: 398c2b05bbee ("linux/dim: Add completions count to dim_sample") Signed-off-by: Yamin Friedman Signed-off-by: Leon Romanovsky Acked-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bcmsysport.c | 2 +- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +- drivers/net/ethernet/broadcom/genet/bcmgenet.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c | 4 ++-- lib/dim/dim.c | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) commit c8ec4632c6ac9cda0e8c3d51aa41eeab66585bd5 Author: Cong Wang Date: Mon Jul 22 21:43:00 2019 -0700 ife: error out when nla attributes are empty act_ife at least requires TCA_IFE_PARMS, so we have to bail out when there is no attribute passed in. Reported-by: syzbot+fbb5b288c9cb6a2eeac4@syzkaller.appspotmail.com Fixes: ef6980b6becb ("introduce IFE action") Cc: Jamal Hadi Salim Cc: Jiri Pirko Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/sched/act_ife.c | 5 +++++ 1 file changed, 5 insertions(+) commit 66013e8ec6850f9c62df6aea555fe7668e84dc3c Author: Rajneesh Bhardwaj Date: Fri Jun 14 13:39:40 2019 +0530 platform/x86: intel_pmc_core: Add ICL-NNPI support to PMC Core Ice Lake Neural Network Processor for deep learning inference a.k.a. ICL-NNPI can re-use Ice Lake Mobile regmap to enable Intel PMC Core driver on it. Cc: Darren Hart Cc: Andy Shevchenko Cc: platform-driver-x86@vger.kernel.org Link: https://lkml.org/lkml/2019/6/5/1034 Signed-off-by: Rajneesh Bhardwaj Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_pmc_core.c | 1 + 1 file changed, 1 insertion(+) commit 6acf5d76ab685e921771abbbae5353929f3ebbe6 Author: Lubomir Rintel Date: Tue Jul 23 11:20:22 2019 +0200 Platform: OLPC: add SPI MODULE_DEVICE_TABLE The SPI bus creates a device with the modalias of "xo1.75-ec". This fixes XO-1.75 EC driver autoloading Fixes: 0c3d931b3ab9 ("Platform: OLPC: Add XO-1.75 EC driver") Signed-off-by: Lubomir Rintel Signed-off-by: Andy Shevchenko drivers/platform/olpc/olpc-xo175-ec.c | 6 ++++++ 1 file changed, 6 insertions(+) commit cb8ffde5694ae5fffb456eae932aac442aa3a207 Author: Andrii Nakryiko Date: Wed Jul 24 14:47:53 2019 -0700 libbpf: silence GCC8 warning about string truncation Despite a proper NULL-termination after strncpy(..., ..., IFNAMSIZ - 1), GCC8 still complains about *expected* string truncation: xsk.c:330:2: error: 'strncpy' output may be truncated copying 15 bytes from a string of length 15 [-Werror=stringop-truncation] strncpy(ifr.ifr_name, xsk->ifname, IFNAMSIZ - 1); This patch gets rid of the issue altogether by using memcpy instead. There is no performance regression, as strncpy will still copy and fill all of the bytes anyway. v1->v2: - rebase against bpf tree. Cc: Magnus Karlsson Signed-off-by: Andrii Nakryiko Acked-by: Magnus Karlsson Acked-by: Song Liu Signed-off-by: Alexei Starovoitov tools/lib/bpf/xsk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8732d85a69a0411f16a4b78df8fdc7b09c50a849 Author: Mattias Jacobsson <2pi@mok.nu> Date: Fri Jul 19 19:51:45 2019 +0200 platform/x86: wmi: add missing struct parameter description Add a description for the context parameter in the struct wmi_device_id. Reported-by: kbuild test robot Fixes: a48e23385fcf ("platform/x86: wmi: add context pointer field to struct wmi_device_id") Signed-off-by: Mattias Jacobsson <2pi@mok.nu> Signed-off-by: Andy Shevchenko include/linux/mod_devicetable.h | 1 + 1 file changed, 1 insertion(+) commit edbfe83def34153a05439ecb3352ae0bb65024de Author: Jean Delvare Date: Sat Jun 29 11:41:36 2019 +0200 platform/x86: pcengines-apuv2: Fix softdep statement Only first MODULE_SOFTDEP statement is handled per module. Multiple dependencies must be expressed in a single statement. Signed-off-by: Jean Delvare Cc: "Enrico Weigelt, metux IT consult" Cc: Darren Hart Cc: Andy Shevchenko [andy: massaged commit message] Signed-off-by: Andy Shevchenko drivers/platform/x86/pcengines-apuv2.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 9c0b2596f2ac30967af0b8bb9f038b65926a6f00 Merge: 36703247d5f5 8fe34be14ecb Author: Jens Axboe Date: Thu Jul 25 10:23:15 2019 -0600 Merge branch 'nvme-5.3' of git://git.infradead.org/nvme into for-linus Pull NVMe fixes from Christoph. * 'nvme-5.3' of git://git.infradead.org/nvme: Revert "nvme-pci: don't create a read hctx mapping without read queues" nvme: fix multipath crash when ANA is deactivated nvme: fix memory leak caused by incorrect subsystem free nvme: ignore subnqn for ADATA SX6000LNP commit 36703247d5f52a679df9da51192b6950fe81689f Author: Jens Axboe Date: Thu Jul 25 10:20:18 2019 -0600 io_uring: ensure ->list is initialized for poll commands Daniel reports that when testing an http server that uses io_uring to poll for incoming connections, sometimes it hard crashes. This is due to an uninitialized list member for the io_uring request. Normally this doesn't trigger and none of the test cases caught it. Reported-by: Daniel Kozak Tested-by: Daniel Kozak Signed-off-by: Jens Axboe fs/io_uring.c | 2 ++ 1 file changed, 2 insertions(+) commit 6789f873ed373319cbf83b56455baf00769bb79a Merge: a51edf751b66 fdc757015782 Author: Linus Torvalds Date: Thu Jul 25 09:07:32 2019 -0700 Merge tag 'pm-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki "These fix two issues related to the RAPL MMIO interface support added recently and one cpufreq driver issue. Specifics: - Initialize the power capping subsystem and the RAPL driver earlier in case the int340X thermal driver is built-in and attempts to register an MMIO interface for RAPL which must not happen before the requisite infrastructure is ready (Zhang Rui) - Fix the int340X thermal driver's RAPL MMIO interface registration error path (Rafael Wysocki) - Fix possible use-after-free in the pasemi cpufreq driver (Wen Yang)" * tag 'pm-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq/pasemi: fix use-after-free in pas_cpufreq_cpu_init() int340X/processor_thermal_device: Fix proc_thermal_rapl_remove() powercap: Invoke powercap_init() and rapl_init() earlier commit a51edf751b660f3fc1d0724bc4cb839bdaf5576c Merge: da3cc2e6f168 26091eef3c17 Author: Linus Torvalds Date: Thu Jul 25 09:02:34 2019 -0700 Merge tag 'riscv/for-v5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V updates from Paul Walmsley: "Four minor RISC-V-related changes: - Add support for the new clone3 syscall for RV64, relying on the generic support - Add DT data for the gigabit Ethernet controller on the SiFive FU540 and the HiFive Unleashed board - Update MAINTAINERS to add me to the arch/riscv maintainers' list - Add support for PCIe message-signaled interrupts by reusing the generic header file" * tag 'riscv/for-v5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: dts: Add DT node for SiFive FU540 Ethernet controller driver riscv: include generic support for MSI irqdomains MAINTAINERS: Add Paul as a RISC-V maintainer riscv: enable sys_clone3 syscall for rv64 commit da3cc2e6f168fd52630892f4672f2f26bd217198 Merge: a29a0a467e2c aecea57f84b0 Author: Linus Torvalds Date: Thu Jul 25 08:58:32 2019 -0700 Merge tag 'ktest-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest Pull ktest fixlets from Steven Rostedt: "This contains only simple spelling fixes" * tag 'ktest-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest: ktest: Fix some typos in config-bisect.pl commit a29a0a467e2c02fe4287c2d4eff86c9eb6beff0c Merge: bed38c3e2dca d7852fbd0f04 Author: Linus Torvalds Date: Thu Jul 25 08:36:29 2019 -0700 Merge branch 'access-creds' The access() (and faccessat()) credentials change can cause an unnecessary load on the RCU machinery because every access() call ends up freeing the temporary access credential using RCU. This isn't really noticeable on small machines, but if you have hundreds of cores you can cause huge slowdowns due to RCU storms. It's easy to avoid: the temporary access crededntials aren't actually normally accessed using RCU at all, so we can avoid the whole issue by just marking them as such. * access-creds: access: avoid the RCU grace period for the temporary subjective credentials commit 6e7ca09b583de4be6c27d9d4b06e8c5dd46a58fa Author: Nikolay Borisov Date: Thu Jul 25 11:27:29 2019 +0300 btrfs: Fix deadlock caused by missing memory barrier Commit 06297d8cefca ("btrfs: switch extent_buffer blocking_writers from atomic to int") changed the type of blocking_writers but forgot to adjust relevant code in btrfs_tree_unlock by converting the smp_mb__after_atomic to smp_mb. This opened up the possibility of a deadlock due to re-ordering of setting blocking_writers and checking/waking up the waiter. This particular lockup is explained in a comment above waitqueue_active() function. Fix it by converting the memory barrier to a full smp_mb, accounting for the fact that blocking_writers is a simple integer. Fixes: 06297d8cefca ("btrfs: switch extent_buffer blocking_writers from atomic to int") Tested-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/locking.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit b7165bd0d6cbb93732559be6ea8774653b204480 Author: Yishai Hadas Date: Tue Jul 23 09:57:29 2019 +0300 IB/mlx5: Fix RSS Toeplitz setup to be aligned with the HW specification The specification for the Toeplitz function doesn't require to set the key explicitly to be symmetric. In case a symmetric functionality is required a symmetric key can be simply used. Wrongly forcing the algorithm to symmetric causes the wrong packet distribution and a performance degradation. Link: https://lore.kernel.org/r/20190723065733.4899-7-leon@kernel.org Cc: # 4.7 Fixes: 28d6137008b2 ("IB/mlx5: Add RSS QP support") Signed-off-by: Yishai Hadas Reviewed-by: Alex Vainman Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/qp.c | 1 - 1 file changed, 1 deletion(-) commit d191152f43a5869d7dbb50dd2a7a4b3b8b71f1f0 Author: Parav Pandit Date: Tue Jul 23 09:57:33 2019 +0300 IB/counters: Always initialize the port counter object Port counter objects should be initialized even if alloc_stats is unsupported, otherwise QP bind operations in user space can trigger a NULL pointer deference if they try to bind QP on RDMA device which doesn't support counters. Fixes: f34a55e497e8 ("RDMA/core: Get sum value of all counters when perform a sysfs stat read") Link: https://lore.kernel.org/r/20190723065733.4899-11-leon@kernel.org Signed-off-by: Parav Pandit Reviewed-by: Mark Zhang Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/counters.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a379d1ce32f1c97b19d68cffbd195e025dbb9d43 Author: Parav Pandit Date: Tue Jul 23 09:57:32 2019 +0300 IB/core: Fix querying total rdma stats rdma_counter_init() may fail for a device. In such case while calculating total sum, ignore NULL hstats. This fixes below observed call trace. BUG: kernel NULL pointer dereference, address: 00000000000000a0 PGD 8000001009b30067 P4D 8000001009b30067 PUD 10549c9067 PMD 0 Oops: 0000 [#1] SMP PTI CPU: 55 PID: 20887 Comm: cat Kdump: loaded Not tainted 5.2.0-rc6-jdc+ #13 RIP: 0010:rdma_counter_get_hwstat_value+0xf2/0x150 [ib_core] Call Trace: show_hw_stats+0x5e/0x130 [ib_core] dev_attr_show+0x15/0x50 sysfs_kf_seq_show+0xc6/0x1a0 seq_read+0x132/0x370 vfs_read+0x89/0x140 ksys_read+0x5c/0xd0 do_syscall_64+0x5a/0x240 entry_SYSCALL_64_after_hwframe+0x49/0xbe Fixes: f34a55e497e8 ("RDMA/core: Get sum value of all counters when perform a sysfs stat read") Link: https://lore.kernel.org/r/20190723065733.4899-10-leon@kernel.org Signed-off-by: Parav Pandit Reviewed-by: Mark Zhang Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/counters.c | 3 +++ 1 file changed, 3 insertions(+) commit 296e3a2aad09d328f22e54655c3d736033fe1ae8 Author: Moni Shoua Date: Tue Jul 23 09:57:30 2019 +0300 IB/mlx5: Prevent concurrent MR updates during invalidation The device requires that memory registration work requests that update the address translation table of a MR will be fenced if posted together. This scenario can happen when address ranges are invalidated by the mmu in separate concurrent calls to the invalidation callback. We prefer to block concurrent address updates for a single MR over fencing since making the decision if a WQE needs fencing will be more expensive and fencing all WQEs is a too radical choice. Further, it isn't clear that this code can even run safely concurrently, so a lock is a safer choice. Fixes: b4cfe447d47b ("IB/mlx5: Implement on demand paging by adding support for MMU notifiers") Link: https://lore.kernel.org/r/20190723065733.4899-8-leon@kernel.org Signed-off-by: Moni Shoua Reviewed-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/odp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 289a2d22b5b611d85030795802a710e9f520df29 Author: Gustavo A. R. Silva Date: Mon Jun 24 11:19:13 2019 -0500 perf/x86/intel: Mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warnings: arch/x86/events/intel/core.c: In function ‘intel_pmu_init’: arch/x86/events/intel/core.c:4959:8: warning: this statement may fall through [-Wimplicit-fallthrough=] arch/x86/events/intel/core.c:5008:8: warning: this statement may fall through [-Wimplicit-fallthrough=] Warning level 3 was used: -Wimplicit-fallthrough=3 This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: H. Peter Anvin Cc: Jiri Olsa Cc: Kan Liang Cc: Kees Cook Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20190624161913.GA32270@embeddedor Signed-off-by: Ingo Molnar arch/x86/events/intel/core.c | 2 ++ 1 file changed, 2 insertions(+) commit 4ce54af8b33d3e21ca935fc1b89b58cbba956051 Author: Leonard Crestez Date: Wed Jul 24 15:53:24 2019 +0300 perf/core: Fix creating kernel counters for PMUs that override event->cpu Some hardware PMU drivers will override perf_event.cpu inside their event_init callback. This causes a lockdep splat when initialized through the kernel API: WARNING: CPU: 0 PID: 250 at kernel/events/core.c:2917 ctx_sched_out+0x78/0x208 pc : ctx_sched_out+0x78/0x208 Call trace: ctx_sched_out+0x78/0x208 __perf_install_in_context+0x160/0x248 remote_function+0x58/0x68 generic_exec_single+0x100/0x180 smp_call_function_single+0x174/0x1b8 perf_install_in_context+0x178/0x188 perf_event_create_kernel_counter+0x118/0x160 Fix this by calling perf_install_in_context with event->cpu, just like perf_event_open Signed-off-by: Leonard Crestez Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Mark Rutland Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Frank Li Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Will Deacon Link: https://lkml.kernel.org/r/c4ebe0503623066896d7046def4d6b1e06e0eb2e.1563972056.git.leonard.crestez@nxp.com Signed-off-by: Ingo Molnar kernel/events/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5ea3f6fb37b79da33ac9211df336fd2b9f47c39f Author: Zhenzhong Duan Date: Thu Jul 25 10:39:26 2019 +0800 perf/x86: Apply more accurate check on hypervisor platform check_msr is used to fix a bug report in guest where KVM doesn't support LBR MSR and cause #GP. The msr check is bypassed on real HW to workaround a false failure, see commit d0e1a507bdc7 ("perf/x86/intel: Disable check_msr for real HW") When running a guest with CONFIG_HYPERVISOR_GUEST not set or "nopv" enabled, current check isn't enough and #GP could trigger. Signed-off-by: Zhenzhong Duan Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Jiri Olsa Cc: Juergen Gross Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/1564022366-18293-1-git-send-email-zhenzhong.duan@oracle.com Signed-off-by: Ingo Molnar arch/x86/events/intel/core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 3b238a64c3009fed36eaea1af629d9377759d87d Author: Yunying Sun Date: Wed Jul 24 16:29:32 2019 +0800 perf/x86/intel: Fix invalid Bit 13 for Icelake MSR_OFFCORE_RSP_x register The Intel SDM states that bit 13 of Icelake's MSR_OFFCORE_RSP_x register is valid, and used for counting hardware generated prefetches of L3 cache. Update the bitmask to allow bit 13. Before: $ perf stat -e cpu/event=0xb7,umask=0x1,config1=0x1bfff/u sleep 3 Performance counter stats for 'sleep 3': cpu/event=0xb7,umask=0x1,config1=0x1bfff/u After: $ perf stat -e cpu/event=0xb7,umask=0x1,config1=0x1bfff/u sleep 3 Performance counter stats for 'sleep 3': 9,293 cpu/event=0xb7,umask=0x1,config1=0x1bfff/u Signed-off-by: Yunying Sun Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Kan Liang Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: acme@kernel.org Cc: alexander.shishkin@linux.intel.com Cc: bp@alien8.de Cc: hpa@zytor.com Cc: jolsa@redhat.com Cc: namhyung@kernel.org Link: https://lkml.kernel.org/r/20190724082932.12833-1-yunying.sun@intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3d0c3953601d250175c7684ec0d9df612061dae5 Author: Kan Liang Date: Tue Jul 23 13:04:29 2019 -0700 perf/x86/intel: Fix SLOTS PEBS event constraint Sampling SLOTS event and ref-cycles event in a group on Icelake gives EINVAL. SLOTS event is the event stands for the fixed counter 3, not fixed counter 2. Wrong mask was set to SLOTS event in intel_icl_pebs_event_constraints[]. Reported-by: Andi Kleen Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 6017608936c1 ("perf/x86/intel: Add Icelake support") Link: https://lkml.kernel.org/r/20190723200429.8180-1-kan.liang@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/ds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6c11c6e3d5e9e5caf8686cd6a5e4552cfc3ea326 Author: Sebastian Andrzej Siewior Date: Wed Jul 3 11:21:26 2019 +0200 locking/mutex: Test for initialized mutex An uninitialized/ zeroed mutex will go unnoticed because there is no check for it. There is a magic check in the unlock's slowpath path which might go unnoticed if the unlock happens in the fastpath. Add a ->magic check early in the mutex_lock() and mutex_trylock() path. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Acked-by: Will Deacon Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20190703092125.lsdf4gpsh2plhavb@linutronix.de Signed-off-by: Ingo Molnar kernel/locking/mutex.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 30a35f79faadfeb1b89a7fdb3875f14063519041 Author: Arnd Bergmann Date: Fri Jun 28 12:29:03 2019 +0200 locking/lockdep: Clean up #ifdef checks As Will Deacon points out, CONFIG_PROVE_LOCKING implies TRACE_IRQFLAGS, so the conditions I added in the previous patch, and some others in the same file can be simplified by only checking for the former. No functional change. Signed-off-by: Arnd Bergmann Signed-off-by: Peter Zijlstra (Intel) Acked-by: Will Deacon Cc: Andrew Morton Cc: Bart Van Assche Cc: Frederic Weisbecker Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Waiman Long Cc: Yuyang Du Fixes: 886532aee3cd ("locking/lockdep: Move mark_lock() inside CONFIG_TRACE_IRQFLAGS && CONFIG_PROVE_LOCKING") Link: https://lkml.kernel.org/r/20190628102919.2345242-1-arnd@arndb.de Signed-off-by: Ingo Molnar kernel/locking/lockdep.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 68037aa78208f34bda4e5cd76c357f718b838cbb Author: Arnd Bergmann Date: Mon Jul 15 11:27:49 2019 +0200 locking/lockdep: Hide unused 'class' variable The usage is now hidden in an #ifdef, so we need to move the variable itself in there as well to avoid this warning: kernel/locking/lockdep_proc.c:203:21: error: unused variable 'class' [-Werror,-Wunused-variable] Signed-off-by: Arnd Bergmann Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Bart Van Assche Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Qian Cai Cc: Thomas Gleixner Cc: Waiman Long Cc: Will Deacon Cc: Will Deacon Cc: Yuyang Du Cc: frederic@kernel.org Fixes: 68d41d8c94a3 ("locking/lockdep: Fix lock used or unused stats error") Link: https://lkml.kernel.org/r/20190715092809.736834-1-arnd@arndb.de Signed-off-by: Ingo Molnar kernel/locking/lockdep_proc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6ffddfb9e1de21c3d0c0cfa4fe4a20dd3291a812 Author: Peter Zijlstra Date: Thu Jul 18 15:08:53 2019 +0200 locking/rwsem: Add ACQUIRE comments Since we just reviewed read_slowpath for ACQUIRE correctness, add a few coments to retain our findings. Signed-off-by: Peter Zijlstra (Intel) Acked-by: Will Deacon Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar kernel/locking/rwsem.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit 952041a8639a7a3a73a2b6573cb8aa8518bc39f8 Author: Peter Zijlstra Date: Thu Jul 18 15:03:15 2019 +0200 tty/ldsem, locking/rwsem: Add missing ACQUIRE to read_failed sleep loop While reviewing rwsem down_slowpath, Will noticed ldsem had a copy of a bug we just found for rwsem. X = 0; CPU0 CPU1 rwsem_down_read() for (;;) { set_current_state(TASK_UNINTERRUPTIBLE); X = 1; rwsem_up_write(); rwsem_mark_wake() atomic_long_add(adjustment, &sem->count); smp_store_release(&waiter->task, NULL); if (!waiter.task) break; ... } r = X; Allows 'r == 0'. Reported-by: Will Deacon Signed-off-by: Peter Zijlstra (Intel) Acked-by: Will Deacon Cc: Linus Torvalds Cc: Peter Hurley Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 4898e640caf0 ("tty: Add timed, writer-prioritized rw semaphore") Signed-off-by: Ingo Molnar drivers/tty/tty_ldsem.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 99143f82a255e7f054bead8443462fae76dd829e Author: Peter Zijlstra Date: Thu Jul 18 14:56:17 2019 +0200 lcoking/rwsem: Add missing ACQUIRE to read_slowpath sleep loop While reviewing another read_slowpath patch, both Will and I noticed another missing ACQUIRE, namely: X = 0; CPU0 CPU1 rwsem_down_read() for (;;) { set_current_state(TASK_UNINTERRUPTIBLE); X = 1; rwsem_up_write(); rwsem_mark_wake() atomic_long_add(adjustment, &sem->count); smp_store_release(&waiter->task, NULL); if (!waiter.task) break; ... } r = X; Allows 'r == 0'. Reported-by: Peter Zijlstra (Intel) Reported-by: Will Deacon Signed-off-by: Peter Zijlstra (Intel) Acked-by: Will Deacon Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Ingo Molnar kernel/locking/rwsem.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e1b98fa316648420d0434d9ff5b92ad6609ba6c3 Author: Jan Stancek Date: Thu Jul 18 10:51:25 2019 +0200 locking/rwsem: Add missing ACQUIRE to read_slowpath exit when queue is empty LTP mtest06 has been observed to occasionally hit "still mapped when deleted" and following BUG_ON on arm64. The extra mapcount originated from pagefault handler, which handled pagefault for vma that has already been detached. vma is detached under mmap_sem write lock by detach_vmas_to_be_unmapped(), which also invalidates vmacache. When the pagefault handler (under mmap_sem read lock) calls find_vma(), vmacache_valid() wrongly reports vmacache as valid. After rwsem down_read() returns via 'queue empty' path (as of v5.2), it does so without an ACQUIRE on sem->count: down_read() __down_read() rwsem_down_read_failed() __rwsem_down_read_failed_common() raw_spin_lock_irq(&sem->wait_lock); if (list_empty(&sem->wait_list)) { if (atomic_long_read(&sem->count) >= 0) { raw_spin_unlock_irq(&sem->wait_lock); return sem; The problem can be reproduced by running LTP mtest06 in a loop and building the kernel (-j $NCPUS) in parallel. It does reproduces since v4.20 on arm64 HPE Apollo 70 (224 CPUs, 256GB RAM, 2 nodes). It triggers reliably in about an hour. The patched kernel ran fine for 10+ hours. Signed-off-by: Jan Stancek Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Will Deacon Acked-by: Waiman Long Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: dbueso@suse.de Fixes: 4b486b535c33 ("locking/rwsem: Exit read lock slowpath if queue empty & no writer") Link: https://lkml.kernel.org/r/50b8914e20d1d62bb2dee42d342836c2c16ebee7.1563438048.git.jstancek@redhat.com Signed-off-by: Ingo Molnar kernel/locking/rwsem.c | 2 ++ 1 file changed, 2 insertions(+) commit 78134300579a45f527ca173ec8fdb4701b69f16e Author: Waiman Long Date: Sat Jul 20 11:04:10 2019 -0400 locking/rwsem: Don't call owner_on_cpu() on read-owner For writer, the owner value is cleared on unlock. For reader, it is left intact on unlock for providing better debugging aid on crash dump and the unlock of one reader may not mean the lock is free. As a result, the owner_on_cpu() shouldn't be used on read-owner as the task pointer value may not be valid and it might have been freed. That is the case in rwsem_spin_on_owner(), but not in rwsem_can_spin_on_owner(). This can lead to use-after-free error from KASAN. For example, BUG: KASAN: use-after-free in rwsem_down_write_slowpath (/home/miguel/kernel/linux/kernel/locking/rwsem.c:669 /home/miguel/kernel/linux/kernel/locking/rwsem.c:1125) Fix this by checking for RWSEM_READER_OWNED flag before calling owner_on_cpu(). Reported-by: Luis Henriques Tested-by: Luis Henriques Signed-off-by: Waiman Long Signed-off-by: Peter Zijlstra (Intel) Cc: Borislav Petkov Cc: Davidlohr Bueso Cc: H. Peter Anvin Cc: Jeff Layton Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tim Chen Cc: Will Deacon Cc: huang ying Fixes: 94a9717b3c40e ("locking/rwsem: Make rwsem->owner an atomic_long_t") Link: https://lkml.kernel.org/r/81e82d5b-5074-77e8-7204-28479bbe0df0@redhat.com Signed-off-by: Ingo Molnar kernel/locking/rwsem.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit cb361d8cdef69990f6b4504dc1fd9a594d983c97 Author: Jann Horn Date: Tue Jul 16 17:20:47 2019 +0200 sched/fair: Use RCU accessors consistently for ->numa_group The old code used RCU annotations and accessors inconsistently for ->numa_group, which can lead to use-after-frees and NULL dereferences. Let all accesses to ->numa_group use proper RCU helpers to prevent such issues. Signed-off-by: Jann Horn Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Petr Mladek Cc: Sergey Senozhatsky Cc: Thomas Gleixner Cc: Will Deacon Fixes: 8c8a743c5087 ("sched/numa: Use {cpu, pid} to create task groups for shared faults") Link: https://lkml.kernel.org/r/20190716152047.14424-3-jannh@google.com Signed-off-by: Ingo Molnar include/linux/sched.h | 10 ++++- kernel/sched/fair.c | 120 ++++++++++++++++++++++++++++++++++---------------- 2 files changed, 90 insertions(+), 40 deletions(-) commit 16d51a590a8ce3befb1308e0e7ab77f3b661af33 Author: Jann Horn Date: Tue Jul 16 17:20:45 2019 +0200 sched/fair: Don't free p->numa_faults with concurrent readers When going through execve(), zero out the NUMA fault statistics instead of freeing them. During execve, the task is reachable through procfs and the scheduler. A concurrent /proc/*/sched reader can read data from a freed ->numa_faults allocation (confirmed by KASAN) and write it back to userspace. I believe that it would also be possible for a use-after-free read to occur through a race between a NUMA fault and execve(): task_numa_fault() can lead to task_numa_compare(), which invokes task_weight() on the currently running task of a different CPU. Another way to fix this would be to make ->numa_faults RCU-managed or add extra locking, but it seems easier to wipe the NUMA fault statistics on execve. Signed-off-by: Jann Horn Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Petr Mladek Cc: Sergey Senozhatsky Cc: Thomas Gleixner Cc: Will Deacon Fixes: 82727018b0d3 ("sched/numa: Call task_numa_free() from do_execve()") Link: https://lkml.kernel.org/r/20190716152047.14424-1-jannh@google.com Signed-off-by: Ingo Molnar fs/exec.c | 2 +- include/linux/sched/numa_balancing.h | 4 ++-- kernel/fork.c | 2 +- kernel/sched/fair.c | 24 ++++++++++++++++++++---- 4 files changed, 24 insertions(+), 8 deletions(-) commit 2a6fc3cb5cb68597f1072bfeef28d2ca02310220 Author: Dmitry Osipenko Date: Fri Jul 5 18:11:39 2019 +0300 drm/tegra: Fix gpiod_get_from_of_node() regression That function now returns ERR_PTR instead of NULL if "hpd-gpio" is not present in device-tree. The offending patch missed to adapt the Tegra's DRM driver for the API change. Fixes: 025bf37725f1 ("gpio: Fix return value mismatch of function gpiod_get_from_of_node()") Signed-off-by: Dmitry Osipenko Acked-by: Jon Hunter Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/output.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit d105ef8120dd522c3233a1395ee0b318ed0929e8 Author: YueHaibing Date: Tue Jul 9 16:32:58 2019 +0800 dmaengine: tegra210-adma: Fix unused function warnings If CONFIG_PM is not set, build warnings: drivers/dma/tegra210-adma.c:747:12: warning: tegra_adma_runtime_resume defined but not used [-Wunused-function] static int tegra_adma_runtime_resume(struct device *dev) drivers/dma/tegra210-adma.c:715:12: warning: tegra_adma_runtime_suspend defined but not used [-Wunused-function] static int tegra_adma_runtime_suspend(struct device *dev) Mark the two function as __maybe_unused. Reported-by: Hulk Robot Signed-off-by: YueHaibing Fixes: 3145d73e69ba ("dmaengine: tegra210-adma: remove PM_CLK dependency") Fixes: f46b195799b5 ("dmaengine: tegra-adma: Add support for Tegra210 ADMA") Reported-by: Arnd Bergmann Acked-by: Jon Hunter Link: https://lore.kernel.org/r/20190709083258.57112-1-yuehaibing@huawei.com Signed-off-by: Vinod Koul drivers/dma/tegra210-adma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d4fddac5a51c378c5d3e68658816c37132611e1f Author: Wenwen Wang Date: Sun Jul 14 01:11:35 2019 -0500 test_firmware: fix a memory leak bug In test_firmware_init(), the buffer pointed to by the global pointer 'test_fw_config' is allocated through kzalloc(). Then, the buffer is initialized in __test_firmware_config_init(). In the case that the initialization fails, the following execution in test_firmware_init() needs to be terminated with an error code returned to indicate this failure. However, the allocated buffer is not freed on this execution path, leading to a memory leak bug. To fix the above issue, free the allocated buffer before returning from test_firmware_init(). Signed-off-by: Wenwen Wang Link: https://lore.kernel.org/r/1563084696-6865-1-git-send-email-wang6495@umn.edu Signed-off-by: Greg Kroah-Hartman lib/test_firmware.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 0c7d37f4d9b8446956e97b7c5e61173cdb7c8522 Author: Kefeng Wang Date: Thu Jul 11 21:27:57 2019 +0800 hpet: Fix division by zero in hpet_time_div() The base value in do_div() called by hpet_time_div() is truncated from unsigned long to uint32_t, resulting in a divide-by-zero exception. UBSAN: Undefined behaviour in ../drivers/char/hpet.c:572:2 division by zero CPU: 1 PID: 23682 Comm: syz-executor.3 Not tainted 4.4.184.x86_64+ #4 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Ubuntu-1.8.2-1ubuntu1 04/01/2014 0000000000000000 b573382df1853d00 ffff8800a3287b98 ffffffff81ad7561 ffff8800a3287c00 ffffffff838b35b0 ffffffff838b3860 ffff8800a3287c20 0000000000000000 ffff8800a3287bb0 ffffffff81b8f25e ffffffff838b35a0 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x120 lib/dump_stack.c:51 [] ubsan_epilogue+0x12/0x8d lib/ubsan.c:166 [] __ubsan_handle_divrem_overflow+0x282/0x2c8 lib/ubsan.c:262 [] hpet_time_div drivers/char/hpet.c:572 [inline] [] hpet_ioctl_common drivers/char/hpet.c:663 [inline] [] hpet_ioctl_common.cold+0xa8/0xad drivers/char/hpet.c:577 [] hpet_ioctl+0xc6/0x180 drivers/char/hpet.c:676 [] vfs_ioctl fs/ioctl.c:43 [inline] [] file_ioctl fs/ioctl.c:470 [inline] [] do_vfs_ioctl+0x6e0/0xf70 fs/ioctl.c:605 [] SYSC_ioctl fs/ioctl.c:622 [inline] [] SyS_ioctl+0x94/0xc0 fs/ioctl.c:613 [] tracesys_phase2+0x90/0x95 The main C reproducer autogenerated by syzkaller, syscall(__NR_mmap, 0x20000000, 0x1000000, 3, 0x32, -1, 0); memcpy((void*)0x20000100, "/dev/hpet\000", 10); syscall(__NR_openat, 0xffffffffffffff9c, 0x20000100, 0, 0); syscall(__NR_ioctl, r[0], 0x40086806, 0x40000000000000); Fix it by using div64_ul(). Signed-off-by: Kefeng Wang Signed-off-by: Zhang HongJun Cc: stable Reviewed-by: Arnd Bergmann Link: https://lore.kernel.org/r/20190711132757.130092-1-wangkefeng.wang@huawei.com Signed-off-by: Greg Kroah-Hartman drivers/char/hpet.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 1b5621832f9bd9899370ea6928462cd02ebe7dc0 Author: Arseny Solokha Date: Tue Jul 16 18:12:36 2019 +0700 eeprom: make older eeprom drivers select NVMEM_SYSFS misc/eeprom/{at24,at25,eeprom_93xx46} drivers all register their corresponding devices in the nvmem framework in compat mode which requires nvmem sysfs interface to be present. The latter, however, has been split out from nvmem under a separate Kconfig in commit ae0c2d725512 ("nvmem: core: add NVMEM_SYSFS Kconfig"). As a result, probing certain I2C-attached EEPROMs now fails with at24: probe of 0-0050 failed with error -38 because of a stub implementation of nvmem_sysfs_setup_compat() in drivers/nvmem/nvmem.h. Update the nvmem dependency for these drivers so they could load again: at24 0-0050: 32768 byte 24c256 EEPROM, writable, 64 bytes/write Cc: Adrian Bunk Cc: Bartosz Golaszewski Cc: Srinivas Kandagatla Cc: stable@vger.kernel.org # v5.2+ Signed-off-by: Arseny Solokha Link: https://lore.kernel.org/r/20190716111236.27803-1-asolokha@kb.kras.ru Signed-off-by: Greg Kroah-Hartman drivers/misc/eeprom/Kconfig | 3 +++ 1 file changed, 3 insertions(+) commit 61d51456f35760a09e8aa1e6ddd247f1547015d3 Author: Daniel Vetter Date: Thu Jul 18 10:09:03 2019 +0200 vt: Grab console_lock around con_is_bound in show_bind Not really harmful not to, but also not harm in grabbing the lock. And this shuts up a new WARNING I introduced in commit ddde3c18b700 ("vt: More locking checks"). Reported-by: Jens Remus Cc: linux-kernel@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org Cc: linux-s390@vger.kernel.org Cc: Nicolas Pitre Cc: Martin Hostettler Cc: Adam Borowski Cc: Mikulas Patocka Cc: Daniel Vetter Cc: Sam Ravnborg Fixes: ddde3c18b700 ("vt: More locking checks") Signed-off-by: Daniel Vetter Tested-by: Jens Remus Acked-by: Sam Ravnborg Link: https://lore.kernel.org/r/20190718080903.22622-1-daniel.vetter@ffwll.ch Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/vt.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 10b0f1c227ed8236555318cb26933881b7e907f9 Author: Nadav Amit Date: Tue Jul 2 03:05:19 2019 -0700 vmw_balloon: Remove Julien from the maintainers list Julien will not be a maintainer anymore. Signed-off-by: Nadav Amit Link: https://lore.kernel.org/r/20190702100519.7464-1-namit@vmware.com Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit 8f9e86ee795971eabbf372e6d804d6b8578287a7 Author: Tetsuo Handa Date: Mon Jul 1 19:55:19 2019 +0900 staging: android: ion: Bail out upon SIGKILL when allocating memory. syzbot found that a thread can stall for minutes inside ion_system_heap_allocate() after that thread was killed by SIGKILL [1]. Let's check for SIGKILL before doing memory allocation. [1] https://syzkaller.appspot.com/bug?id=a0e3436829698d5824231251fad9d8e998f94f5e Signed-off-by: Tetsuo Handa Cc: stable Reported-by: syzbot Acked-by: Laura Abbott Acked-by: Sumit Semwal Link: https://lore.kernel.org/r/d088f188-5f32-d8fc-b9a0-0b404f7501cc@I-love.SAKURA.ne.jp Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion_page_pool.c | 3 +++ 1 file changed, 3 insertions(+) commit 517c3ba00916383af6411aec99442c307c23f684 Author: Zhenzhong Duan Date: Thu Jul 25 10:39:09 2019 +0800 x86/speculation/mds: Apply more accurate check on hypervisor platform X86_HYPER_NATIVE isn't accurate for checking if running on native platform, e.g. CONFIG_HYPERVISOR_GUEST isn't set or "nopv" is enabled. Checking the CPU feature bit X86_FEATURE_HYPERVISOR to determine if it's running on native platform is more accurate. This still doesn't cover the platforms on which X86_FEATURE_HYPERVISOR is unsupported, e.g. VMware, but there is nothing which can be done about this scenario. Fixes: 8a4b06d391b0 ("x86/speculation/mds: Add sysfs reporting for MDS") Signed-off-by: Zhenzhong Duan Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/1564022349-17338-1-git-send-email-zhenzhong.duan@oracle.com arch/x86/kernel/cpu/bugs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 643d83f0a3518d6fbcf88f970de0340a5aa6b5a2 Author: Thomas Gleixner Date: Thu Jul 25 08:28:45 2019 +0200 x86/hpet: Undo the early counter is counting check Rui reported that on a Pentium D machine which has HPET forced enabled because it is not advertised by ACPI, the early counter is counting check leads to a silent boot hang. The reason is that the ordering of checking the counter first and then reconfiguring the HPET fails to work on that machine. As the HPET is not advertised and presumably not initialized by the BIOS the early enable and the following reconfiguration seems to bring it into a broken state. Adding clocksource=jiffies to the command line results in the following clocksource watchdog warning: clocksource: timekeeping watchdog on CPU1: Marking clocksource 'tsc-early' as unstable because the skew is too large: clocksource: 'hpet' wd_now: 33 wd_last: 33 mask: ffffffff That clearly shows that the HPET is not counting after it got reconfigured and reenabled. If the counter is not working then the HPET timer is not expiring either, which explains the boot hang. Move the counter is counting check after the full configuration again to unbreak these systems. Reported-by: Rui Salvaterra Fixes: 3222daf970f3 ("x86/hpet: Separate counter check out of clocksource register code") Signed-off-by: Thomas Gleixner Tested-by: Rui Salvaterra Link: https://lkml.kernel.org/r/alpine.DEB.2.21.1907250810530.1791@nanos.tec.linutronix.de arch/x86/kernel/hpet.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 4a2b8560e3dff8637ccb09524650864f60ebab7f Author: Linus Walleij Date: Mon Jul 22 08:51:46 2019 +0200 tty: serial: netx: Delete driver The Netx ARM machine was deleted from the kernel. This driver had no users and has to go. Cc: Robert Schwebel Cc: Sascha Hauer Signed-off-by: Linus Walleij Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20190722065146.4844-1-linus.walleij@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/Kconfig | 19 - drivers/tty/serial/Makefile | 1 - drivers/tty/serial/netx-serial.c | 733 --------------------------------------- include/uapi/linux/serial_core.h | 3 - 4 files changed, 756 deletions(-) commit d39b5bad8658d6d94cb2d98a44a7e159db4f5030 Author: Mathias Nyman Date: Thu Jul 25 11:54:21 2019 +0300 xhci: Fix crash if scatter gather is used with Immediate Data Transfer (IDT). A second regression was found in the immediate data transfer (IDT) support which was added to 5.2 kernel IDT is used to transfer small amounts of data (up to 8 bytes) in the field normally used for data dma address, thus avoiding dma mapping. If the data was not already dma mapped, then IDT support assumed data was in urb->transfer_buffer, and did not take into accound that even small amounts of data (8 bytes) can be in a scatterlist instead. This caused a NULL pointer dereference when sg_dma_len() was used with non-dma mapped data. Solve this by not using IDT if scatter gather buffer list is used. Fixes: 33e39350ebd2 ("usb: xhci: add Immediate Data Transfer support") Cc: # v5.2 Reported-by: Maik Stohn Tested-by: Maik Stohn CC: Nicolas Saenz Julienne Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/1564044861-1445-1-git-send-email-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4849ee6129702dcb05d36f9c7c61b4661fcd751f Author: Lucas Stach Date: Fri Jul 19 10:44:07 2019 +0200 usb: usb251xb: Reallow swap-dx-lanes to apply to the upstream port This is a partial revert of 73d31def1aab "usb: usb251xb: Create a ports field collector method", which broke a existing devicetree (arch/arm64/boot/dts/freescale/imx8mq.dtsi). There is no reason why the swap-dx-lanes property should not apply to the upstream port. The reason given in the breaking commit was that it's inconsitent with respect to other port properties, but in fact it is not. All other properties which only apply to the downstream ports explicitly reject port 0, so there is pretty strong precedence that the driver referred to the upstream port as port 0. So there is no inconsistency in this property at all, other than the swapping being also applicable to the upstream port. CC: stable@vger.kernel.org #5.2 Signed-off-by: Lucas Stach Link: https://lore.kernel.org/r/20190719084407.28041-3-l.stach@pengutronix.de Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/usb251xb.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 79f6fafad4e2a874015cb67d735f9f87f1834367 Author: Lucas Stach Date: Fri Jul 19 10:44:06 2019 +0200 Revert "usb: usb251xb: Add US port lanes inversion property" This property isn't needed and not yet used anywhere. The swap-dx-lanes property is perfectly fine for doing the swap on the upstream port lanes. CC: stable@vger.kernel.org #5.2 Signed-off-by: Lucas Stach Link: https://lore.kernel.org/r/20190719084407.28041-2-l.stach@pengutronix.de Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/usb251xb.c | 2 -- 1 file changed, 2 deletions(-) commit bafe64e5f0edaa689e72e2f8dc236641da37fed4 Author: Lucas Stach Date: Fri Jul 19 10:44:05 2019 +0200 Revert "usb: usb251xb: Add US lanes inversion dts-bindings" This reverts commit 3342ce35a1, as there is no need for this separate property and it breaks compatibility with existing devicetree files (arch/arm64/boot/dts/freescale/imx8mq.dtsi). CC: stable@vger.kernel.org #5.2 Fixes: 3342ce35a183 ("usb: usb251xb: Add US lanes inversion dts-bindings") Signed-off-by: Lucas Stach Link: https://lore.kernel.org/r/20190719084407.28041-1-l.stach@pengutronix.de Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/usb/usb251xb.txt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 0ce38c5f929c83dff8ea805f6c6ef2eb97b66431 Author: Masahiro Yamada Date: Thu Jul 25 16:58:33 2019 +0900 iomap: fix Invalid License ID Detected by: $ ./scripts/spdxcheck.py fs/iomap/Makefile: 1:27 Invalid License ID: GPL-2.0-or-newer Fixes: 1c230208f53d ("iomap: start moving code to fs/iomap/") Signed-off-by: Masahiro Yamada Reviewed-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman fs/iomap/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dc3bf49ea330414724e429e4e9b291899c134e3b Author: Masahiro Yamada Date: Thu Jul 25 16:58:32 2019 +0900 treewide: remove SPDX "WITH Linux-syscall-note" from kernel-space headers again The "WITH Linux-syscall-note" exception exists for headers exported to user space. It is strange to add it to non-exported headers. Commit 687a3e4d8e61 ("treewide: remove SPDX "WITH Linux-syscall-note" from kernel-space headers") did cleanups some months ago, but it looks like we need to do this periodically. This patch was generated by the following script: git grep -l -e Linux-syscall-note \ -- :*.h :^arch/*/include/uapi/asm/*.h :^include/uapi/ :^tools | while read file do sed -i -e 's/(\(GPL-[^[:space:]]*\) WITH Linux-syscall-note)/\1/g' \ -e 's/ WITH Linux-syscall-note//g' $file done I did not commit drivers/staging/android/uapi/ion.h . This header is not currently exported, but somebody may plan to move it to include/uapi/ when the time comes. I am not sure. Anyway, it will be better to check the license inconsistency in drivers/staging/android/uapi/. Signed-off-by: Masahiro Yamada Reviewed-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman include/sound/sof/control.h | 2 +- include/sound/sof/dai-intel.h | 2 +- include/sound/sof/dai.h | 2 +- include/sound/sof/header.h | 2 +- include/sound/sof/info.h | 2 +- include/sound/sof/pm.h | 2 +- include/sound/sof/stream.h | 2 +- include/sound/sof/topology.h | 2 +- include/sound/sof/trace.h | 2 +- include/sound/sof/xtensa.h | 2 +- samples/vfio-mdev/mdpy-defs.h | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) commit d9c5252295218df4cfe64353aa860d7b5c8700ef Author: Masahiro Yamada Date: Thu Jul 25 16:58:31 2019 +0900 treewide: add "WITH Linux-syscall-note" to SPDX tag of uapi headers UAPI headers licensed under GPL are supposed to have exception "WITH Linux-syscall-note" so that they can be included into non-GPL user space application code. The exception note is missing in some UAPI headers. Some of them slipped in by the treewide conversion commit b24413180f56 ("License cleanup: add SPDX GPL-2.0 license identifier to files with no license"). Just run: $ git show --oneline b24413180f56 -- arch/x86/include/uapi/asm/ I believe they are not intentional, and should be fixed too. This patch was generated by the following script: git grep -l --not -e Linux-syscall-note --and -e SPDX-License-Identifier \ -- :arch/*/include/uapi/asm/*.h :include/uapi/ :^*/Kbuild | while read file do sed -i -e '/[[:space:]]OR[[:space:]]/s/\(GPL-[^[:space:]]*\)/(\1 WITH Linux-syscall-note)/g' \ -e '/[[:space:]]or[[:space:]]/s/\(GPL-[^[:space:]]*\)/(\1 WITH Linux-syscall-note)/g' \ -e '/[[:space:]]OR[[:space:]]/!{/[[:space:]]or[[:space:]]/!s/\(GPL-[^[:space:]]*\)/\1 WITH Linux-syscall-note/g}' $file done After this patch is applied, there are 5 UAPI headers that do not contain "WITH Linux-syscall-note". They are kept untouched since this exception applies only to GPL variants. $ git grep --not -e Linux-syscall-note --and -e SPDX-License-Identifier \ -- :arch/*/include/uapi/asm/*.h :include/uapi/ :^*/Kbuild include/uapi/drm/panfrost_drm.h:/* SPDX-License-Identifier: MIT */ include/uapi/linux/batman_adv.h:/* SPDX-License-Identifier: MIT */ include/uapi/linux/qemu_fw_cfg.h:/* SPDX-License-Identifier: BSD-3-Clause */ include/uapi/linux/vbox_err.h:/* SPDX-License-Identifier: MIT */ include/uapi/linux/virtio_iommu.h:/* SPDX-License-Identifier: BSD-3-Clause */ Signed-off-by: Masahiro Yamada Reviewed-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman arch/arm64/include/uapi/asm/bpf_perf_event.h | 2 +- arch/csky/include/uapi/asm/byteorder.h | 2 +- arch/csky/include/uapi/asm/cachectl.h | 2 +- arch/csky/include/uapi/asm/perf_regs.h | 2 +- arch/csky/include/uapi/asm/ptrace.h | 2 +- arch/csky/include/uapi/asm/sigcontext.h | 2 +- arch/csky/include/uapi/asm/unistd.h | 2 +- arch/nds32/include/uapi/asm/auxvec.h | 2 +- arch/nds32/include/uapi/asm/byteorder.h | 2 +- arch/nds32/include/uapi/asm/cachectl.h | 2 +- arch/nds32/include/uapi/asm/fp_udfiex_crtl.h | 2 +- arch/nds32/include/uapi/asm/param.h | 2 +- arch/nds32/include/uapi/asm/ptrace.h | 2 +- arch/nds32/include/uapi/asm/sigcontext.h | 2 +- arch/nds32/include/uapi/asm/unistd.h | 2 +- arch/powerpc/include/uapi/asm/bpf_perf_event.h | 2 +- arch/riscv/include/uapi/asm/auxvec.h | 2 +- arch/riscv/include/uapi/asm/bitsperlong.h | 2 +- arch/riscv/include/uapi/asm/byteorder.h | 2 +- arch/riscv/include/uapi/asm/hwcap.h | 2 +- arch/riscv/include/uapi/asm/ptrace.h | 2 +- arch/riscv/include/uapi/asm/sigcontext.h | 2 +- arch/riscv/include/uapi/asm/ucontext.h | 2 +- arch/s390/include/uapi/asm/bpf_perf_event.h | 2 +- arch/s390/include/uapi/asm/ipl.h | 2 +- arch/sh/include/uapi/asm/setup.h | 2 +- arch/sh/include/uapi/asm/types.h | 2 +- arch/sparc/include/uapi/asm/oradax.h | 2 +- arch/x86/include/uapi/asm/byteorder.h | 2 +- arch/x86/include/uapi/asm/hwcap2.h | 2 +- arch/x86/include/uapi/asm/sigcontext32.h | 2 +- arch/x86/include/uapi/asm/types.h | 2 +- include/uapi/linux/bpfilter.h | 2 +- include/uapi/linux/ipmi_bmc.h | 2 +- include/uapi/linux/isst_if.h | 2 +- include/uapi/linux/netfilter/nf_synproxy.h | 2 +- include/uapi/linux/psp-sev.h | 2 +- include/uapi/linux/rxrpc.h | 2 +- include/uapi/linux/usb/g_uvc.h | 2 +- include/uapi/linux/vbox_vmmdev_types.h | 2 +- include/uapi/linux/vboxguest.h | 2 +- include/uapi/linux/virtio_pmem.h | 2 +- include/uapi/linux/vmcore.h | 2 +- include/uapi/linux/wmi.h | 2 +- include/uapi/misc/fastrpc.h | 2 +- include/uapi/rdma/rvt-abi.h | 2 +- include/uapi/rdma/siw-abi.h | 2 +- include/uapi/scsi/scsi_bsg_ufs.h | 2 +- include/uapi/sound/skl-tplg-interface.h | 2 +- 49 files changed, 49 insertions(+), 49 deletions(-) commit fdc75701578269f6931975aebf4069d9d8c77d34 Merge: c528adefd645 e0a12445d1cb Author: Rafael J. Wysocki Date: Thu Jul 25 10:46:07 2019 +0200 Merge branch 'pm-cpufreq' * pm-cpufreq: cpufreq/pasemi: fix use-after-free in pas_cpufreq_cpu_init() commit f90bf1ece48a736097ea224430578fe586a9544c Author: Phong Tran Date: Wed Jul 24 09:06:01 2019 +0700 usb: wusbcore: fix unbalanced get/put cluster_id syzboot reported that https://syzkaller.appspot.com/bug?extid=fd2bd7df88c606eea4ef There is not consitency parameter in cluste_id_get/put calling. In case of getting the id with result is failure, the wusbhc->cluster_id will not be updated and this can not be used for wusb_cluster_id_put(). Tested report https://groups.google.com/d/msg/syzkaller-bugs/0znZopp3-9k/oxOrhLkLEgAJ Reproduce and gdb got the details: 139 addr = wusb_cluster_id_get(); (gdb) n 140 if (addr == 0) (gdb) print addr $1 = 254 '\376' (gdb) n 142 result = __hwahc_set_cluster_id(hwahc, addr); (gdb) print result $2 = -71 (gdb) break wusb_cluster_id_put Breakpoint 3 at 0xffffffff836e3f20: file drivers/usb/wusbcore/wusbhc.c, line 384. (gdb) s Thread 2 hit Breakpoint 3, wusb_cluster_id_put (id=0 '\000') at drivers/usb/wusbcore/wusbhc.c:384 384 id = 0xff - id; (gdb) n 385 BUG_ON(id >= CLUSTER_IDS); (gdb) print id $3 = 255 '\377' Reported-by: syzbot+fd2bd7df88c606eea4ef@syzkaller.appspotmail.com Signed-off-by: Phong Tran Cc: stable Link: https://lore.kernel.org/r/20190724020601.15257-1-tranmanphong@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/hwa-hc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 94b9a70d32db0d1e8eeaeb27d74a5ae712644da9 Author: Dan Carpenter Date: Fri Jun 7 16:57:09 2019 +0300 usb/hcd: Fix a NULL vs IS_ERR() bug in usb_hcd_setup_local_mem() The devm_memremap() function doesn't return NULL, it returns error pointers. Fixes: b0310c2f09bb ("USB: use genalloc for USB HCs with local memory") Signed-off-by: Dan Carpenter Acked-by: Sebastian Andrzej Siewior Link: https://lore.kernel.org/r/20190607135709.GC16718@mwanda Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hcd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d74ffae8b8dd17eaa8b82fc163e6aa2076dc8fb1 Author: Yoshihiro Shimoda Date: Mon Jul 22 19:58:25 2019 +0900 usb-storage: Add a limitation for blk_queue_max_hw_sectors() This patch fixes an issue that the following error happens on swiotlb environment: xhci-hcd ee000000.usb: swiotlb buffer is full (sz: 524288 bytes), total 32768 (slots), used 1338 (slots) On the kernel v5.1, block settings of a usb-storage with SuperSpeed were the following so that the block layer will allocate buffers up to 64 KiB, and then the issue didn't happen. max_segment_size = 65536 max_hw_sectors_kb = 1024 After the commit 09324d32d2a0 ("block: force an unlimited segment size on queues with a virt boundary") is applied, the block settings are the following. So, the block layer will allocate buffers up to 1024 KiB, and then the issue happens: max_segment_size = 4294967295 max_hw_sectors_kb = 1024 To fix the issue, the usb-storage driver checks the maximum size of a mapping for the device and then adjusts the max_hw_sectors_kb if required. After this patch is applied, the block settings will be the following, and then the issue doesn't happen. max_segment_size = 4294967295 max_hw_sectors_kb = 256 Fixes: 09324d32d2a0 ("block: force an unlimited segment size on queues with a virt boundary") Cc: stable Signed-off-by: Yoshihiro Shimoda Acked-by: Alan Stern Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/1563793105-20597-1-git-send-email-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Greg Kroah-Hartman drivers/usb/storage/scsiglue.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 4fbb8aa75836c3361987f431d9451aecc1830bdd Author: Ryan Kennedy Date: Thu Jul 4 11:35:29 2019 -0400 usb: pci-quirks: Minor cleanup for AMD PLL quirk usb_amd_find_chipset_info() is used for chipset detection for several quirks. It is strange that its return value indicates the need for the PLL quirk, which means it is often ignored. This patch adds a function specifically for checking the PLL quirk like the other ones. Additionally, rename probe_result to something more appropriate. Signed-off-by: Ryan Kennedy Acked-by: Alan Stern Link: https://lore.kernel.org/r/20190704153529.9429-3-ryan5544@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ehci-pci.c | 4 ++-- drivers/usb/host/ohci-pci.c | 2 +- drivers/usb/host/pci-quirks.c | 30 ++++++++++++++++-------------- drivers/usb/host/pci-quirks.h | 2 +- drivers/usb/host/xhci-pci.c | 2 +- 5 files changed, 21 insertions(+), 19 deletions(-) commit f3dccdaade4118070a3a47bef6b18321431f9ac6 Author: Ryan Kennedy Date: Thu Jul 4 11:35:28 2019 -0400 usb: pci-quirks: Correct AMD PLL quirk detection The AMD PLL USB quirk is incorrectly enabled on newer Ryzen chipsets. The logic in usb_amd_find_chipset_info currently checks for unaffected chipsets rather than affected ones. This broke once a new chipset was added in e788787ef. It makes more sense to reverse the logic so it won't need to be updated as new chipsets are added. Note that the core of the workaround in usb_amd_quirk_pll does correctly check the chipset. Signed-off-by: Ryan Kennedy Fixes: e788787ef4f9 ("usb:xhci:Add quirk for Certain failing HP keyboard on reset after resume") Cc: stable Acked-by: Alan Stern Link: https://lore.kernel.org/r/20190704153529.9429-2-ryan5544@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/pci-quirks.c | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) commit 25f8c834e2a6871920cc1ca113f02fb301d007c3 Author: Dmitry Torokhov Date: Fri Jul 12 11:37:17 2019 -0700 Input: synaptics - enable RMI mode for HP Spectre X360 The 2016 kabylake HP Spectre X360 (model number 13-w013dx) works much better with psmouse.synaptics_intertouch=1 kernel parameter, so let's enable RMI4 mode automatically. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=204115 Reported-by: Nate Graham Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/mouse/synaptics.c | 1 + 1 file changed, 1 insertion(+) commit 92e3e884887c0d278042fbbb6f6c9b41d6addb71 Author: Jan Sebastian Götte Date: Wed Jul 17 23:41:37 2019 +0900 Staging: fbtft: Fix GPIO handling Commit c440eee1a7a1 ("Staging: fbtft: Switch to the gpio descriptor interface") breaks GPIO handling. In several places, checks to only set a GPIO if it was configured ended up backwards. I have tested this fix. The fixed driver works with a ili9486 display connected to a raspberry pi via SPI. Fixes: c440eee1a7a1d ("Staging: fbtft: Switch to the gpio descriptor interface") Tested-by: Jan Sebastian Götte Reviewed-by: Nicolas Saenz Julienne Signed-off-by: Jan Sebastian Götte Link: https://lore.kernel.org/r/75ada52f-afa1-08bc-d0ce-966fc1110e70@jaseg.net Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fb_bd663474.c | 2 +- drivers/staging/fbtft/fb_ili9163.c | 2 +- drivers/staging/fbtft/fb_ili9325.c | 2 +- drivers/staging/fbtft/fb_s6d1121.c | 2 +- drivers/staging/fbtft/fb_ssd1289.c | 2 +- drivers/staging/fbtft/fb_ssd1331.c | 4 ++-- drivers/staging/fbtft/fb_upd161704.c | 2 +- drivers/staging/fbtft/fbtft-bus.c | 2 +- drivers/staging/fbtft/fbtft-core.c | 4 ++-- 9 files changed, 11 insertions(+), 11 deletions(-) commit 610504301235e6d7c5a8505d1d3401bed0403d05 Author: Christophe JAILLET Date: Sun Jul 21 19:08:24 2019 +0200 staging: unisys: visornic: Update the description of 'poll_for_irq()' Commit e99e88a9d2b06 ("treewide: setup_timer() -> timer_setup()") has updated the parameters of 'poll_for_irq()' but not the comment above the function. Update the comment and fix a typo. s/visronic/visornic/ Signed-off-by: Christophe JAILLET Reviewed-By: Enrico Weigelt Link: https://lore.kernel.org/r/20190721170824.3412-1-christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visornic/visornic_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fb2b055b7e6e44efda737c7c92f46c0868bb04e5 Author: Adham Abozaeid Date: Mon Jul 22 21:38:44 2019 +0000 staging: wilc1000: flush the workqueue before deinit the host Before deinitializing the host interface, the workqueue should be flushed to handle any pending deferred work Signed-off-by: Adham Abozaeid Cc: stable Link: https://lore.kernel.org/r/20190722213837.21952-1-adham.abozaeid@microchip.com Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 1 + 1 file changed, 1 insertion(+) commit 66665bb9979246729562a09fcdbb101c83127989 Author: Ivan Bornyakov Date: Wed Jul 10 23:45:18 2019 +0300 staging: gasket: apex: fix copy-paste typo In sysfs_show() case-branches ATTR_KERNEL_HIB_PAGE_TABLE_SIZE and ATTR_KERNEL_HIB_SIMPLE_PAGE_TABLE_SIZE do the same. It looks like copy-paste mistake. Signed-off-by: Ivan Bornyakov Cc: stable Link: https://lore.kernel.org/r/20190710204518.16814-1-brnkv.i1@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/gasket/apex_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b918d1c2706619cb0712a61cc8c05148b68b24b2 Author: Phil Reid Date: Tue Jul 16 08:24:37 2019 +0800 Staging: fbtft: Fix reset assertion when using gpio descriptor Typically gpiod_set_value calls would assert the reset line and then release it using the symantics of: gpiod_set_value(par->gpio.reset, 0); ... delay gpiod_set_value(par->gpio.reset, 1); And the gpio binding would specify the polarity. Prior to conversion to gpiod calls the polarity in the DT was ignored and assumed to be active low. Fix it so that DT polarity is respected. Fixes: c440eee1a7a1 ("Staging: fbtft: Switch to the gpio descriptor interface") Reviewed-by: Nicolas Saenz Julienne Tested-by: Nicolas Saenz Julienne Tested-by: Jan Sebastian Götte Signed-off-by: Phil Reid Cc: stable Link: https://lore.kernel.org/r/1563236677-5045-3-git-send-email-preid@electromag.com.au Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fbtft-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dbc4f989c878fe101fb7920e9609e8ec44e097cd Author: Phil Reid Date: Tue Jul 16 08:24:36 2019 +0800 Staging: fbtft: Fix probing of gpio descriptor Conversion to use gpio descriptors broke all gpio lookups as devm_gpiod_get_index was converted to use dev->driver->name for the gpio name lookup. Fix this by using the name param. In addition gpiod_get post-fixes the -gpios to the name so that shouldn't be included in the call. However this then breaks the of_find_property call to see if the gpio entry exists as all fbtft treats all gpios as optional. So use devm_gpiod_get_index_optional instead which achieves the same thing and is simpler. Nishad confirmed the changes where only ever compile tested. Fixes: c440eee1a7a1 ("Staging: fbtft: Switch to the gpio descriptor interface") Reviewed-by: Nicolas Saenz Julienne Tested-by: Nicolas Saenz Julienne Tested-by: Jan Sebastian Götte Signed-off-by: Phil Reid Cc: stable Link: https://lore.kernel.org/r/1563236677-5045-2-git-send-email-preid@electromag.com.au Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fbtft-core.c | 39 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 21 deletions(-) commit 3f8809499bf02ef7874254c5e23fc764a47a21a0 Author: Hui Wang Date: Thu Jul 25 14:57:37 2019 +0800 ALSA: hda - Add a conexant codec entry to let mute led work This conexant codec isn't in the supported codec list yet, the hda generic driver can drive this codec well, but on a Lenovo machine with mute/mic-mute leds, we need to apply CXT_FIXUP_THINKPAD_ACPI to make the leds work. After adding this codec to the list, the driver patch_conexant.c will apply THINKPAD_ACPI to this machine. Cc: stable@vger.kernel.org Signed-off-by: Hui Wang Signed-off-by: Takashi Iwai sound/pci/hda/patch_conexant.c | 1 + 1 file changed, 1 insertion(+) commit 67d86835840a533ce868c42a7f05507e66ba95f0 Author: Phil Sutter Date: Tue Jul 23 15:27:53 2019 +0200 netfilter: nft_meta_bridge: Eliminate 'out' label The label is used just once and the code it points at is not reused, no point in keeping it. Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso net/bridge/netfilter/nft_meta_bridge.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit cb81572e8cb50c5fb98b0b962cdfe48fff71fd37 Author: Phil Sutter Date: Tue Jul 23 15:27:52 2019 +0200 netfilter: nf_tables: Make nft_meta expression more robust nft_meta_get_eval()'s tendency to bail out setting NFT_BREAK verdict in situations where required data is missing leads to unexpected behaviour with inverted checks like so: | meta iifname != eth0 accept This rule will never match if there is no input interface (or it is not known) which is not intuitive and, what's worse, breaks consistency of iptables-nft with iptables-legacy. Fix this by falling back to placing a value in dreg which never matches (avoiding accidental matches), i.e. zero for interface index and an empty string for interface name. Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso net/bridge/netfilter/nft_meta_bridge.c | 6 +----- net/netfilter/nft_meta.c | 16 ++++------------ 2 files changed, 5 insertions(+), 17 deletions(-) commit 882a0db9d143e5e8dac54b96e83135bccd1f68d1 Author: Peter Zijlstra Date: Wed Jul 24 17:47:26 2019 -0500 objtool: Improve UACCESS coverage A clang build reported an (obvious) double CLAC while a GCC build did not; it turns out that objtool only re-visits instructions if the first visit was with AC=0. If OTOH the first visit was with AC=1, it completely ignores any subsequent visit, even when it has AC=0. Fix this by using a visited mask instead of a boolean, and (explicitly) mark the AC state. $ ./objtool check -b --no-fp --retpoline --uaccess drivers/gpu/drm/i915/gem/i915_gem_execbuffer.o drivers/gpu/drm/i915/gem/i915_gem_execbuffer.o: warning: objtool: .altinstr_replacement+0x22: redundant UACCESS disable drivers/gpu/drm/i915/gem/i915_gem_execbuffer.o: warning: objtool: eb_copy_relocations.isra.34()+0xea: (alt) drivers/gpu/drm/i915/gem/i915_gem_execbuffer.o: warning: objtool: .altinstr_replacement+0xffffffffffffffff: (branch) drivers/gpu/drm/i915/gem/i915_gem_execbuffer.o: warning: objtool: eb_copy_relocations.isra.34()+0xd9: (alt) drivers/gpu/drm/i915/gem/i915_gem_execbuffer.o: warning: objtool: eb_copy_relocations.isra.34()+0xb2: (branch) drivers/gpu/drm/i915/gem/i915_gem_execbuffer.o: warning: objtool: eb_copy_relocations.isra.34()+0x39: (branch) drivers/gpu/drm/i915/gem/i915_gem_execbuffer.o: warning: objtool: eb_copy_relocations.isra.34()+0x0: <=== (func) Reported-by: Josh Poimboeuf Reported-by: Thomas Gleixner Reported-by: Sedat Dilek Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Josh Poimboeuf Signed-off-by: Thomas Gleixner Tested-by: Nathan Chancellor Tested-by: Nick Desaulniers Tested-by: Sedat Dilek Link: https://github.com/ClangBuiltLinux/linux/issues/617 Link: https://lkml.kernel.org/r/5359166aad2d53f3145cd442d83d0e5115e0cd17.1564007838.git.jpoimboe@redhat.com tools/objtool/check.c | 7 ++++--- tools/objtool/check.h | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) commit e3cacb73e626d885b8cf24103fed0ae26518e3c4 Author: Max Filippov Date: Wed Jul 24 17:39:47 2019 -0700 xtensa: fix build for cores with coprocessors Assembly entry/return abstraction change didn't add asmmacro.h include statement to coprocessor.S, resulting in references to undefined macros abi_entry and abi_ret on cores that define XTENSA_HAVE_COPROCESSORS. Fix that by including asm/asmmacro.h from the coprocessor.S. Signed-off-by: Max Filippov arch/xtensa/kernel/coprocessor.S | 1 + 1 file changed, 1 insertion(+) commit 4638faac032756f7eab5524be7be56bee77e426b Author: Cong Wang Date: Mon Jul 22 20:41:22 2019 -0700 netrom: hold sock when setting skb->destructor sock_efree() releases the sock refcnt, if we don't hold this refcnt when setting skb->destructor to it, the refcnt would not be balanced. This leads to several bug reports from syzbot. I have checked other users of sock_efree(), all of them hold the sock refcnt. Fixes: c8c8218ec5af ("netrom: fix a memory leak in nr_rx_frame()") Reported-and-tested-by: Reported-and-tested-by: Reported-and-tested-by: Reported-and-tested-by: Cc: Ralf Baechle Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/netrom/af_netrom.c | 1 + 1 file changed, 1 insertion(+) commit 260637903f47f20c5918bb5c1eea52b2a28ea863 Author: Arnd Bergmann Date: Mon Jul 22 17:00:01 2019 +0200 ovs: datapath: hide clang frame-overflow warnings Some functions in the datapath code are factored out so that each one has a stack frame smaller than 1024 bytes with gcc. However, when compiling with clang, the functions are inlined more aggressively and combined again so we get net/openvswitch/datapath.c:1124:12: error: stack frame size of 1528 bytes in function 'ovs_flow_cmd_set' [-Werror,-Wframe-larger-than=] Marking both get_flow_actions() and ovs_nla_init_match_and_action() as 'noinline_for_stack' gives us the same behavior that we see with gcc, and no warning. Note that this does not mean we actually use less stack, as the functions call each other, and we still get three copies of the large 'struct sw_flow_key' type on the stack. The comment tells us that this was previously considered safe, presumably since the netlink parsing functions are called with a known backchain that does not also use a lot of stack space. Fixes: 9cc9a5cb176c ("datapath: Avoid using stack larger than 1024.") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller net/openvswitch/datapath.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 47b79bbb19e1cfc615823ccaac258cdd2c810c47 Author: Jakub Kicinski Date: Wed Jul 24 11:02:48 2019 -0700 net/tls: add myself as a co-maintainer I've been spending quite a bit of time fixing and preventing bit rot in the core TLS code. TLS seems to only be growing in importance, I'd like to help ensuring the quality of our implementation. Signed-off-by: Jakub Kicinski Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Acked-by: John Fastabend Acked-by: Simon Horman Signed-off-by: David S. Miller MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit f972037e71246c5e0916eef835174d58ffc517e4 Author: Andreas Schwab Date: Wed Jul 24 17:32:57 2019 +0200 net: phy: mscc: initialize stats array The memory allocated for the stats array may contain arbitrary data. Fixes: e4f9ba642f0b ("net: phy: mscc: add support for VSC8514 PHY.") Fixes: 00d70d8e0e78 ("net: phy: mscc: add support for VSC8574 PHY") Fixes: a5afc1678044 ("net: phy: mscc: add support for VSC8584 PHY") Fixes: f76178dc5218 ("net: phy: mscc: add ethtool statistics counters") Signed-off-by: Andreas Schwab Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/mscc.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 2756d9143aa517b97961e85412882b8ce31371a6 Author: Takashi Iwai Date: Fri Jul 19 10:27:54 2019 +0200 ALSA: hda - Fix intermittent CORB/RIRB stall on Intel chips It turned out that the recent Intel HD-audio controller chips show a significant stall during the system PM resume intermittently. It doesn't happen so often and usually it may read back successfully after one or more seconds, but in some rare worst cases the driver went into fallback mode. After trial-and-error, we found out that the communication stall seems covered by issuing the sync after each verb write, as already done for AMD and other chipsets. So this patch enables the write-sync flag for the recent Intel chips, Skylake and onward, as a workaround. Also, since Broxton and co have the very same driver flags as Skylake, refer to the Skylake driver flags instead of defining the same contents again for simplification. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=201901 Reported-and-tested-by: Todd Brandt Cc: Signed-off-by: Takashi Iwai sound/pci/hda/hda_intel.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit c7fa7f567cab6532be285a5df104617d80bce245 Author: Arseny Solokha Date: Wed Jul 24 20:31:39 2019 +0700 net: phylink: don't start and stop SGMII PHYs in SFP modules twice SFP modules connected using the SGMII interface have their own PHYs which are handled by the struct phylink's phydev field. On the other hand, for the modules connected using 1000Base-X interface that field is not set. Since commit ce0aa27ff3f6 ("sfp: add sfp-bus to bridge between network devices and sfp cages") phylink_start() ends up setting the phydev field using the sfp-bus infrastructure, which eventually calls phy_start() on it, and then calling phy_start() again on the same phydev from phylink_start() itself. Similar call sequence holds for phylink_stop(), only in the reverse order. This results in WARNs during network interface bringup and shutdown when a copper SFP module is connected, as phy_start() and phy_stop() are called twice in a row for the same phy_device: % ip link set up dev eth0 ------------[ cut here ]------------ called from state UP WARNING: CPU: 1 PID: 155 at drivers/net/phy/phy.c:895 phy_start+0x74/0xc0 Modules linked in: CPU: 1 PID: 155 Comm: backend Not tainted 5.2.0+ #1 NIP: c0227bf0 LR: c0227bf0 CTR: c004d224 REGS: df547720 TRAP: 0700 Not tainted (5.2.0+) MSR: 00029000 CR: 24002822 XER: 00000000 GPR00: c0227bf0 df5477d8 df5d7080 00000014 df9d2370 df9d5ac4 1f4eb000 00000001 GPR08: c061fe58 00000000 00000000 df5477d8 0000003c 100c8768 00000000 00000000 GPR16: df486a00 c046f1c8 c046eea0 00000000 c046e904 c0239604 db68449c 00000000 GPR24: e9083204 00000000 00000001 db684460 e9083404 00000000 db6dce00 db6dcc00 NIP [c0227bf0] phy_start+0x74/0xc0 LR [c0227bf0] phy_start+0x74/0xc0 Call Trace: [df5477d8] [c0227bf0] phy_start+0x74/0xc0 (unreliable) [df5477e8] [c023cad0] startup_gfar+0x398/0x3f4 [df547828] [c023cf08] gfar_enet_open+0x364/0x374 [df547898] [c029d870] __dev_open+0xe4/0x140 [df5478c8] [c029db70] __dev_change_flags+0xf0/0x188 [df5478f8] [c029dc28] dev_change_flags+0x20/0x54 [df547918] [c02ae304] do_setlink+0x310/0x818 [df547a08] [c02b1eb8] __rtnl_newlink+0x384/0x6b0 [df547c28] [c02b222c] rtnl_newlink+0x48/0x68 [df547c48] [c02ad7c8] rtnetlink_rcv_msg+0x240/0x27c [df547c98] [c02cc068] netlink_rcv_skb+0x8c/0xf0 [df547cd8] [c02cba3c] netlink_unicast+0x114/0x19c [df547d08] [c02cbd74] netlink_sendmsg+0x2b0/0x2c0 [df547d58] [c027b668] sock_sendmsg_nosec+0x20/0x40 [df547d68] [c027d080] ___sys_sendmsg+0x17c/0x1dc [df547e98] [c027df7c] __sys_sendmsg+0x68/0x84 [df547ef8] [c027e430] sys_socketcall+0x1a0/0x204 [df547f38] [c000d1d8] ret_from_syscall+0x0/0x38 --- interrupt: c01 at 0xfd4e030 LR = 0xfd4e010 Instruction dump: 813f0188 38800000 2b890005 419d0014 3d40c046 5529103a 394aa208 7c8a482e 3c60c046 3863a1b8 4cc63182 4be009a1 <0fe00000> 48000030 3c60c046 3863a1d0 ---[ end trace d4c095aeaf6ea998 ]--- and % ip link set down dev eth0 ------------[ cut here ]------------ called from state HALTED WARNING: CPU: 1 PID: 184 at drivers/net/phy/phy.c:858 phy_stop+0x3c/0x88 <...> Call Trace: [df581788] [c0228450] phy_stop+0x3c/0x88 (unreliable) [df581798] [c022d548] sfp_sm_phy_detach+0x1c/0x44 [df5817a8] [c022e8cc] sfp_sm_event+0x4b0/0x87c [df581848] [c022f04c] sfp_upstream_stop+0x34/0x44 [df581858] [c0225608] phylink_stop+0x7c/0xe4 [df581868] [c023c57c] stop_gfar+0x7c/0x94 [df581888] [c023c5b8] gfar_close+0x24/0x94 [df5818a8] [c0298688] __dev_close_many+0xdc/0xf8 [df5818c8] [c029db58] __dev_change_flags+0xd8/0x188 [df5818f8] [c029dc28] dev_change_flags+0x20/0x54 [df581918] [c02ae304] do_setlink+0x310/0x818 [df581a08] [c02b1eb8] __rtnl_newlink+0x384/0x6b0 [df581c28] [c02b222c] rtnl_newlink+0x48/0x68 [df581c48] [c02ad7c8] rtnetlink_rcv_msg+0x240/0x27c [df581c98] [c02cc068] netlink_rcv_skb+0x8c/0xf0 [df581cd8] [c02cba3c] netlink_unicast+0x114/0x19c [df581d08] [c02cbd74] netlink_sendmsg+0x2b0/0x2c0 [df581d58] [c027b668] sock_sendmsg_nosec+0x20/0x40 [df581d68] [c027d080] ___sys_sendmsg+0x17c/0x1dc [df581e98] [c027df7c] __sys_sendmsg+0x68/0x84 [df581ef8] [c027e430] sys_socketcall+0x1a0/0x204 [df581f38] [c000d1d8] ret_from_syscall+0x0/0x38 <...> ---[ end trace d4c095aeaf6ea999 ]--- SFP modules with the 1000Base-X interface are not affected. Place explicit calls to phy_start() and phy_stop() before enabling or after disabling an attached SFP module, where phydev is not yet set (or is already unset), so they will be made only from the inside of sfp-bus, if needed. Fixes: 217962615662 ("net: phy: warn if phy_start is called from invalid state") Signed-off-by: Arseny Solokha Acked-by: Russell King Signed-off-by: David S. Miller drivers/net/phy/phylink.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 09ea26792a5712732845b9c6b799a30b7b33efd1 Merge: 3bc817d665ac b7a14297f102 Author: David S. Miller Date: Wed Jul 24 14:14:50 2019 -0700 Merge tag 'linux-can-fixes-for-5.3-20190724' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2019-07-24 this is a pull reqeust of 7 patches for net/master. The first patch is by Rasmus Villemoes add a missing netif_carrier_off() to register_candev() so that generic netdev trigger based LEDs are initially off. Nikita Yushchenko's patch for the rcar_canfd driver fixes a possible IRQ storm on high load. The patch by Weitao Hou for the mcp251x driver add missing error checking to the work queue allocation. Both Wen Yang's and Joakim Zhang's patch for the flexcan driver fix a problem with the stop-mode. Stephane Grosjean contributes a patch for the peak_usb driver to fix a potential double kfree_skb(). The last patch is by YueHaibing and fixes the error path in can-gw's cgw_module_init() function. ==================== Signed-off-by: David S. Miller commit 3bc817d665ac6d9de89f59df522ad86f5b5dfc03 Author: Haishuang Yan Date: Wed Jul 24 20:00:42 2019 +0800 ip6_gre: reload ipv6h in prepare_ip6gre_xmit_ipv6 Since ip6_tnl_parse_tlv_enc_lim() can call pskb_may_pull() which may change skb->data, so we need to re-load ipv6h at the right place. Fixes: 898b29798e36 ("ip6_gre: Refactor ip6gre xmit codes") Cc: William Tu Signed-off-by: Haishuang Yan Acked-by: William Tu Signed-off-by: David S. Miller net/ipv6/ip6_gre.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c7148c03db80e44da7197ec5f558f630333c5cad Author: Pavel Machek Date: Wed Jul 24 13:56:37 2019 -0700 net/ipv4: cleanup error condition testing Cleanup testing for error condition. Signed-off-by: Pavel Machek Signed-off-by: David S. Miller net/ipv4/inet_fragment.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 71be7b0e7d4069822c89146daed800686db8f147 Author: Asmaa Mnebhi Date: Wed Jul 24 15:32:57 2019 -0400 Fix uninitialized variable in ipmb_dev_int.c ret at line 112 of ipmb_dev_int.c is uninitialized which results in a warning during build regressions. This warning was found by build regression/improvement testing for v5.3-rc1. Reported-by: build regression/improvement testing for v5.3-rc1. Fixes: 51bd6f291583 ("Add support for IPMB driver") Signed-off-by: Asmaa Mnebhi Message-Id: <571dbb67cf58411d567953d9fb3739eb4789238b.1563996586.git.Asmaa@mellanox.com> Signed-off-by: Corey Minyard drivers/char/ipmi/ipmb_dev_int.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 50ce73cfbb4aa47ed14d223e3dd6a66ea5c792a1 Author: Talel Shenhar Date: Thu Jul 11 09:38:59 2019 +0300 dt-bindings: interrupt-controller: al-fic: remove redundant binding Remove dt binding description for standard binding. Signed-off-by: Talel Shenhar Signed-off-by: Rob Herring .../bindings/interrupt-controller/amazon,al-fic.txt | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 527d37e9e575bc0e9024de9b499385e7bb31f1ad Author: Joe Lawrence Date: Wed Jul 24 16:05:58 2019 -0400 selftests/livepatch: add test skip handling Add a skip() message function that stops the test, logs an explanation, and sets the "skip" return code (4). Before loading a livepatch self-test kernel module, first verify that we've built and installed it by running a 'modprobe --dry-run'. This should catch a few environment issues, including !CONFIG_LIVEPATCH and !CONFIG_TEST_LIVEPATCH. In these cases, exit gracefully with the new skip() function. Reported-by: Jiri Benc Suggested-by: Shuah Khan Reviewed-by: Petr Mladek Signed-off-by: Joe Lawrence Signed-off-by: Shuah Khan tools/testing/selftests/livepatch/functions.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit b9332dad987018745a0c0bb718d12dacfa760489 Author: Yishai Hadas Date: Tue Jul 23 09:57:28 2019 +0300 IB/mlx5: Fix clean_mr() to work in the expected order Any dma map underlying the MR should only be freed once the MR is fenced at the hardware. As of the above we first destroy the MKEY and just after that can safely call to dma_unmap_single(). Link: https://lore.kernel.org/r/20190723065733.4899-6-leon@kernel.org Cc: # 4.3 Fixes: 8a187ee52b04 ("IB/mlx5: Support the new memory registration API") Signed-off-by: Yishai Hadas Reviewed-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/mr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9ec4483a3f0f71a228a5933bc040441322bfb090 Author: Yishai Hadas Date: Tue Jul 23 09:57:27 2019 +0300 IB/mlx5: Move MRs to a kernel PD when freeing them to the MR cache Fix unreg_umr to move the MR to a kernel owned PD (i.e. the UMR PD) which can't be accessed by userspace. This ensures that nothing can continue to access the MR once it has been placed in the kernels cache for reuse. MRs in the cache continue to have their HW state, including DMA tables, present. Even though the MR has been invalidated, changing the PD provides an additional layer of protection against use of the MR. Link: https://lore.kernel.org/r/20190723065733.4899-5-leon@kernel.org Cc: # 3.10 Fixes: e126ba97dba9 ("mlx5: Add driver for Mellanox Connect-IB adapters") Signed-off-by: Yishai Hadas Reviewed-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/mr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit afd1417404fba6dbfa6c0a8e5763bd348da682e4 Author: Yishai Hadas Date: Tue Jul 23 09:57:26 2019 +0300 IB/mlx5: Use direct mkey destroy command upon UMR unreg failure Use a direct firmware command to destroy the mkey in case the unreg UMR operation has failed. This prevents a case that a mkey will leak out from the cache post a failure to be destroyed by a UMR WR. In case the MR cache limit didn't reach a call to add another entry to the cache instead of the destroyed one is issued. In addition, replaced a warn message to WARN_ON() as this flow is fatal and can't happen unless some bug around. Link: https://lore.kernel.org/r/20190723065733.4899-4-leon@kernel.org Cc: # 4.10 Fixes: 49780d42dfc9 ("IB/mlx5: Expose MR cache for mlx5_ib") Signed-off-by: Yishai Hadas Reviewed-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/mr.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 6a053953739d23694474a5f9c81d1a30093da81a Author: Yishai Hadas Date: Tue Jul 23 09:57:25 2019 +0300 IB/mlx5: Fix unreg_umr to ignore the mkey state Fix unreg_umr to ignore the mkey state and do not fail if was freed. This prevents a case that a user space application already changed the mkey state to free and then the UMR operation will fail leaving the mkey in an inappropriate state. Link: https://lore.kernel.org/r/20190723065733.4899-3-leon@kernel.org Cc: # 3.19 Fixes: 968e78dd9644 ("IB/mlx5: Enhance UMR support to allow partial page table update") Signed-off-by: Yishai Hadas Reviewed-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/mlx5_ib.h | 1 + drivers/infiniband/hw/mlx5/mr.c | 4 ++-- drivers/infiniband/hw/mlx5/qp.c | 12 ++++++++---- 3 files changed, 11 insertions(+), 6 deletions(-) commit aecea57f84b0586b62c010bea946468d77f6bf0f Author: Masanari Iida Date: Tue Jul 23 12:24:45 2019 +0900 ktest: Fix some typos in config-bisect.pl This patch fixes some spelling typos in config-bisect.pl Link: http://lkml.kernel.org/r/20190723032445.14220-1-standby24x7@gmail.com Acked-by: Randy Dunlap Signed-off-by: Masanari Iida Signed-off-by: Steven Rostedt (VMware) tools/testing/ktest/config-bisect.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8d8bef50365847134b51c1ec46786bc2873e4e47 Author: Lukas Wunner Date: Wed Jul 3 12:29:31 2019 +0200 spi: bcm2835: Fix 3-wire mode if DMA is enabled Commit 6935224da248 ("spi: bcm2835: enable support of 3-wire mode") added 3-wire support to the BCM2835 SPI driver by setting the REN bit (Read Enable) in the CS register when receiving data. The REN bit puts the transmitter in high-impedance state. The driver recognizes that data is to be received by checking whether the rx_buf of a transfer is non-NULL. Commit 3ecd37edaa2a ("spi: bcm2835: enable dma modes for transfers meeting certain conditions") subsequently broke 3-wire support because it set the SPI_MASTER_MUST_RX flag which causes spi_map_msg() to replace rx_buf with a dummy buffer if it is NULL. As a result, rx_buf is *always* non-NULL if DMA is enabled. Reinstate 3-wire support by not only checking whether rx_buf is non-NULL, but also checking that it is not the dummy buffer. Fixes: 3ecd37edaa2a ("spi: bcm2835: enable dma modes for transfers meeting certain conditions") Reported-by: Nuno Sá Signed-off-by: Lukas Wunner Cc: stable@vger.kernel.org # v4.2+ Cc: Martin Sperl Acked-by: Stefan Wahren Link: https://lore.kernel.org/r/328318841455e505370ef8ecad97b646c033dc8a.1562148527.git.lukas@wunner.de Signed-off-by: Mark Brown drivers/spi/spi-bcm2835.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2e05ec4834f9bb7fe3575e4c48acebebfa1e24d9 Author: Masanari Iida Date: Wed Jul 24 23:15:54 2019 +0900 selftests: mlxsw: Fix typo in qos_mc_aware.sh This patch fixes some spelling typo in qos_mc_aware.sh Signed-off-by: Masanari Iida Acked-by: Randy Dunlap Reviewed-by: Ido Schimmel Signed-off-by: Shuah Khan tools/testing/selftests/drivers/net/mlxsw/qos_mc_aware.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d7852fbd0f0423937fa287a598bfde188bb68c22 Author: Linus Torvalds Date: Thu Jul 11 09:54:40 2019 -0700 access: avoid the RCU grace period for the temporary subjective credentials It turns out that 'access()' (and 'faccessat()') can cause a lot of RCU work because it installs a temporary credential that gets allocated and freed for each system call. The allocation and freeing overhead is mostly benign, but because credentials can be accessed under the RCU read lock, the freeing involves a RCU grace period. Which is not a huge deal normally, but if you have a lot of access() calls, this causes a fair amount of seconday damage: instead of having a nice alloc/free patterns that hits in hot per-CPU slab caches, you have all those delayed free's, and on big machines with hundreds of cores, the RCU overhead can end up being enormous. But it turns out that all of this is entirely unnecessary. Exactly because access() only installs the credential as the thread-local subjective credential, the temporary cred pointer doesn't actually need to be RCU free'd at all. Once we're done using it, we can just free it synchronously and avoid all the RCU overhead. So add a 'non_rcu' flag to 'struct cred', which can be set by users that know they only use it in non-RCU context (there are other potential users for this). We can make it a union with the rcu freeing list head that we need for the RCU case, so this doesn't need any extra storage. Note that this also makes 'get_current_cred()' clear the new non_rcu flag, in case we have filesystems that take a long-term reference to the cred and then expect the RCU delayed freeing afterwards. It's not entirely clear that this is required, but it makes for clear semantics: the subjective cred remains non-RCU as long as you only access it synchronously using the thread-local accessors, but you _can_ use it as a generic cred if you want to. It is possible that we should just remove the whole RCU markings for ->cred entirely. Only ->real_cred is really supposed to be accessed through RCU, and the long-term cred copies that nfs uses might want to explicitly re-enable RCU freeing if required, rather than have get_current_cred() do it implicitly. But this is a "minimal semantic changes" change for the immediate problem. Acked-by: Peter Zijlstra (Intel) Acked-by: Eric Dumazet Acked-by: Paul E. McKenney Cc: Oleg Nesterov Cc: Jan Glauber Cc: Jiri Kosina Cc: Jayachandran Chandrasekharan Nair Cc: Greg KH Cc: Kees Cook Cc: David Howells Cc: Miklos Szeredi Cc: Al Viro Signed-off-by: Linus Torvalds fs/open.c | 19 +++++++++++++++++++ include/linux/cred.h | 8 +++++++- kernel/cred.c | 21 +++++++++++++++++++-- 3 files changed, 45 insertions(+), 3 deletions(-) commit bed38c3e2dca01b358a62b5e73b46e875742fd75 Merge: 76260774575c 3a855b7ac7d5 Author: Linus Torvalds Date: Wed Jul 24 09:58:39 2019 -0700 Merge tag 'powerpc-5.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "An assortment of non-regression fixes that have accumulated since the start of the merge window. - A fix for a user triggerable oops on machines where transactional memory is disabled, eg. Power9 bare metal, Power8 with TM disabled on the command line, or all Power7 or earlier machines. - Three fixes for handling of PMU and power saving registers when running nested KVM on Power9. - Two fixes for bugs found while stress testing the XIVE interrupt controller code, also on Power9. - A fix to allow guests to boot under Qemu/KVM on Power9 using the the Hash MMU with >= 1TB of memory. - Two fixes for bugs in the recent DMA cleanup, one of which could lead to checkstops. - And finally three fixes for the PAPR SCM nvdimm driver. Thanks to: Alexey Kardashevskiy, Andrea Arcangeli, Cédric Le Goater, Christoph Hellwig, David Gibson, Gautham R. Shenoy, Michael Neuling, Oliver O'Halloran, Satheesh Rajendran, Shawn Anastasio, Suraj Jitindar Singh, Vaibhav Jain" * tag 'powerpc-5.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/papr_scm: Force a scm-unbind if initial scm-bind fails powerpc/papr_scm: Update drc_pmem_unbind() to use H_SCM_UNBIND_ALL powerpc/pseries: Update SCM hcall op-codes in hvcall.h powerpc/tm: Fix oops on sigreturn on systems without TM powerpc/dma: Fix invalid DMA mmap behavior KVM: PPC: Book3S HV: XIVE: fix rollback when kvmppc_xive_create fails powerpc/xive: Fix loop exit-condition in xive_find_target_in_mask() powerpc: fix off by one in max_zone_pfn initialization for ZONE_DMA KVM: PPC: Book3S HV: Save and restore guest visible PSSCR bits on pseries powerpc/pmu: Set pmcregs_in_use in paca when running as LPAR KVM: PPC: Book3S HV: Always save guest pmu for guest capable of nesting powerpc/mm: Limit rma_size to 1TB when running without HV mode commit 76260774575c0ff7464bf5a4beabc9852180799f Merge: c2626876c24f 266e85a5ec91 Author: Linus Torvalds Date: Wed Jul 24 09:46:13 2019 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Paolo Bonzini: "Bugfixes, a pvspinlock optimization, and documentation moving" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: X86: Boost queue head vCPU to mitigate lock waiter preemption Documentation: move Documentation/virtual to Documentation/virt KVM: nVMX: Set cached_vmcs12 and cached_shadow_vmcs12 NULL after free KVM: X86: Dynamically allocate user_fpu KVM: X86: Fix fpu state crash in kvm guest Revert "kvm: x86: Use task structs fpu field for user" KVM: nVMX: Clear pending KVM_REQ_GET_VMCS12_PAGES when leaving nested commit c2626876c24fe1f326381e3f1d48301bfc627d8e Merge: ad5e427e0f6b 06532750010e Author: Linus Torvalds Date: Wed Jul 24 09:28:55 2019 -0700 Merge tag 'dma-mapping-5.3-2' of git://git.infradead.org/users/hch/dma-mapping Pull dma-mapping regression fix from Christoph Hellwig: "Ensure that dma_addressing_limited doesn't crash on devices without a dma mask (Eric Auger)" * tag 'dma-mapping-5.3-2' of git://git.infradead.org/users/hch/dma-mapping: dma-mapping: use dma_get_mask in dma_addressing_limited commit a853c0a0b013af3fee0f028cff3c44e275ce9abd Author: Axel Lin Date: Thu Jul 11 19:35:17 2019 +0800 regulator: lp87565: Fix probe failure for "ti,lp87565" The "ti,lp87565" compatible string is still in of_lp87565_match_table, but current code will return -EINVAL because lp87565->dev_type is unknown. This was working in earlier kernel versions, so fix it. Fixes: 7ee63bd74750 ("regulator: lp87565: Add 4-phase lp87561 regulator support") Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20190711113517.26077-1-axel.lin@ingics.com Signed-off-by: Mark Brown drivers/regulator/lp87565-regulator.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 40aa5383e393d72f6aa3943a4e7b1aae25a1e43b Author: Ricard Wanderlof Date: Wed Jul 24 11:38:44 2019 +0200 ASoC: Fail card instantiation if DAI format setup fails If the DAI format setup fails, there is no valid communication format between CPU and CODEC, so fail card instantiation, rather than continue with a card that will most likely not function properly. Signed-off-by: Ricard Wanderlof Link: https://lore.kernel.org/r/alpine.DEB.2.20.1907241132350.6338@lnxricardw1.se.axis.com Signed-off-by: Mark Brown sound/soc/soc-core.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 27988c96687667e74df1a9a3b8662519bc1c29c9 Merge: 8f46e22b5ac6 5f9e832c1370 Author: Mark Brown Date: Wed Jul 24 17:00:06 2019 +0100 Merge tag 'v5.3-rc1' into regulator-5.3 Linus 5.3-rc1 commit ad3c7b18c5b362be5dbd0f2c0bcf1fd5fd659315 Author: Christoph Hellwig Date: Tue Jul 23 11:33:12 2019 +0200 arm: use swiotlb for bounce buffering on LPAE configs The DMA API requires that 32-bit DMA masks are always supported, but on arm LPAE configs they do not currently work when memory is present above 4GB. Wire up the swiotlb code like for all other architectures to provide the bounce buffering in that case. Fixes: 21e07dba9fb11 ("scsi: reduce use of block bounce buffers"). Reported-by: Roger Quadros Signed-off-by: Christoph Hellwig Tested-by: Vignesh Raghavendra arch/arm/include/asm/dma-mapping.h | 4 ++- arch/arm/mm/Kconfig | 5 ++++ arch/arm/mm/dma-mapping.c | 61 ++++++++++++++++++++++++++++++++++++++ arch/arm/mm/init.c | 5 ++++ 4 files changed, 74 insertions(+), 1 deletion(-) commit 66d7780f18eae0232827fcffeaded39a6a168236 Author: Christoph Hellwig Date: Mon Jul 8 11:51:56 2019 -0700 dma-mapping: check pfn validity in dma_common_{mmap,get_sgtable} Check that the pfn returned from arch_dma_coherent_to_pfn refers to a valid page and reject the mmap / get_sgtable requests otherwise. Based on the arm implementation of the mmap and get_sgtable methods. Signed-off-by: Christoph Hellwig Tested-by: Vignesh Raghavendra kernel/dma/mapping.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit acbc372e6109c803cbee4733769d02008381740f Author: Ondrej Mosnacek Date: Tue Jul 23 08:50:59 2019 +0200 selinux: check sidtab limit before adding a new entry We need to error out when trying to add an entry above SIDTAB_MAX in sidtab_reverse_lookup() to avoid overflow on the odd chance that this happens. Cc: stable@vger.kernel.org Fixes: ee1a84fdfeed ("selinux: overhaul sidtab to fix bug and improve performance") Signed-off-by: Ondrej Mosnacek Reviewed-by: Kees Cook Signed-off-by: Paul Moore security/selinux/ss/sidtab.c | 5 +++++ 1 file changed, 5 insertions(+) commit c7842d1080a31ab02950be74d3c6960139ff0f7f Author: Rob Herring Date: Tue Jul 23 17:03:44 2019 -0600 dt-bindings: clk: allwinner,sun4i-a10-ccu: Correct path in $id The path in the schema '$id' value is wrong. Fix it. Cc: Michael Turquette Cc: Stephen Boyd Cc: Chen-Yu Tsai Cc: linux-clk@vger.kernel.org Acked-by: Maxime Ripard Signed-off-by: Rob Herring Documentation/devicetree/bindings/clock/allwinner,sun4i-a10-ccu.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 266e85a5ec9100dcd9ae03601453bbc96fefee5d Author: Wanpeng Li Date: Wed Jul 24 17:43:13 2019 +0800 KVM: X86: Boost queue head vCPU to mitigate lock waiter preemption Commit 11752adb (locking/pvqspinlock: Implement hybrid PV queued/unfair locks) introduces hybrid PV queued/unfair locks - queued mode (no starvation) - unfair mode (good performance on not heavily contended lock) The lock waiter goes into the unfair mode especially in VMs with over-commit vCPUs since increaing over-commitment increase the likehood that the queue head vCPU may have been preempted and not actively spinning. However, reschedule queue head vCPU timely to acquire the lock still can get better performance than just depending on lock stealing in over-subscribe scenario. Testing on 80 HT 2 socket Xeon Skylake server, with 80 vCPUs VM 80GB RAM: ebizzy -M vanilla boosting improved 1VM 23520 25040 6% 2VM 8000 13600 70% 3VM 3100 5400 74% The lock holder vCPU yields to the queue head vCPU when unlock, to boost queue head vCPU which is involuntary preemption or the one which is voluntary halt due to fail to acquire the lock after a short spin in the guest. Cc: Waiman Long Cc: Peter Zijlstra Cc: Paolo Bonzini Cc: Radim Krčmář Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b8f70953c1251d8b16276995816a95639f598e70 Author: Matt Mullins Date: Tue Jul 23 21:20:58 2019 -0700 x86/entry/32: Pass cr2 to do_async_page_fault() Commit a0d14b8909de ("x86/mm, tracing: Fix CR2 corruption") added the address parameter to do_async_page_fault(), but does not pass it from the 32-bit entry point. To plumb it through, factor-out common_exception_read_cr2 in the same fashion as common_exception, and uses it from both page_fault and async_page_fault. For a 32-bit KVM guest, this fixes: Run /sbin/init as init process Starting init: /sbin/init exists but couldn't execute it (error -14) Fixes: a0d14b8909de ("x86/mm, tracing: Fix CR2 corruption") Signed-off-by: Matt Mullins Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20190724042058.24506-1-mmullins@fb.com arch/x86/entry/entry_32.S | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit f3b5720cabafe90b8b7cffbc7b8fec1c17d4ff4b Author: Dmitry Torokhov Date: Wed Jul 24 10:29:03 2019 +0300 Input: elantech - annotate fall-through case in elantech_use_host_notify() This avoids a warning when building with -Wimplicit-fallthrough. Fixes: 883a2a80f79c ("Input: elantech - enable SMBus on new (2018+) systems") Reported-by: Stephen Rothwell Signed-off-by: Dmitry Torokhov drivers/input/mouse/elantech.c | 1 + 1 file changed, 1 insertion(+) commit 3d139703d397f6281368047ba7ad1c8bf95aa8ab Author: YueHaibing Date: Mon Jul 8 15:13:56 2019 +0800 fpga-manager: altera-ps-spi: Fix build error If BITREVERSE is m and FPGA_MGR_ALTERA_PS_SPI is y, build fails: drivers/fpga/altera-ps-spi.o: In function `altera_ps_write': altera-ps-spi.c:(.text+0x4ec): undefined reference to `byte_rev_table' Select BITREVERSE to fix this. Reported-by: Hulk Robot Fixes: fcfe18f885f6 ("fpga-manager: altera-ps-spi: use bitrev8x4") Signed-off-by: YueHaibing Cc: stable Acked-by: Moritz Fischer Link: https://lore.kernel.org/r/20190708071356.50928-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman drivers/fpga/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 1be8624a0cbef720e8da39a15971e01abffc865b Author: Alexander Usyskin Date: Fri Jul 12 12:58:14 2019 +0300 mei: me: add mule creek canyon (EHL) device ids Add Mule Creek Canyon (PCH) MEI device ids for Elkhart Lake (EHL) Platform. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Cc: stable Link: https://lore.kernel.org/r/20190712095814.20746-1-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/hw-me-regs.h | 3 +++ drivers/misc/mei/pci-me.c | 3 +++ 2 files changed, 6 insertions(+) commit b7a14297f102b6e2ce6f16feffebbb9bde1e9b55 Author: YueHaibing Date: Sat May 18 17:35:43 2019 +0800 can: gw: Fix error path of cgw_module_init This patch add error path for cgw_module_init to avoid possible crash if some error occurs. Fixes: c1aabdf379bc ("can-gw: add netlink based CAN routing") Signed-off-by: YueHaibing Acked-by: Oliver Hartkopp Signed-off-by: Marc Kleine-Budde net/can/gw.c | 48 +++++++++++++++++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 15 deletions(-) commit fee6a8923ae0d318a7f7950c6c6c28a96cea099b Author: Stephane Grosjean Date: Fri Jul 5 15:32:16 2019 +0200 can: peak_usb: fix potential double kfree_skb() When closing the CAN device while tx skbs are inflight, echo skb could be released twice. By calling close_candev() before unlinking all pending tx urbs, then the internal echo_skb[] array is fully and correctly cleared before the USB write callback and, therefore, can_get_echo_skb() are called, for each aborted URB. Fixes: bb4785551f64 ("can: usb: PEAK-System Technik USB adapters driver core") Signed-off-by: Stephane Grosjean Cc: linux-stable Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/peak_usb/pcan_usb_core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 5f186c257fa4808bb7f14e643b9fba3e11f08a30 Author: Joakim Zhang Date: Tue Jul 2 01:45:41 2019 +0000 can: flexcan: fix stop mode acknowledgment To enter stop mode, the CPU should manually assert a global Stop Mode request and check the acknowledgment asserted by FlexCAN. The CPU must only consider the FlexCAN in stop mode when both request and acknowledgment conditions are satisfied. Fixes: de3578c198c6 ("can: flexcan: add self wakeup support") Reported-by: Marc Kleine-Budde Signed-off-by: Joakim Zhang Cc: linux-stable # >= v5.0 Signed-off-by: Marc Kleine-Budde drivers/net/can/flexcan.c | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) commit e9f2a856e102fa27715b94bcc2240f686536d29b Author: Wen Yang Date: Sat Jul 6 11:37:20 2019 +0800 can: flexcan: fix an use-after-free in flexcan_setup_stop_mode() The gpr_np variable is still being used in dev_dbg() after the of_node_put() call, which may result in use-after-free. Fixes: de3578c198c6 ("can: flexcan: add self wakeup support") Signed-off-by: Wen Yang Cc: linux-stable # >= v5.0 Signed-off-by: Marc Kleine-Budde drivers/net/can/flexcan.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 375f755899b8fc21196197e02aab26257df26e85 Author: Weitao Hou Date: Tue Jun 25 20:50:48 2019 +0800 can: mcp251x: add error check when wq alloc failed add error check when workqueue alloc failed, and remove redundant code to make it clear. Fixes: e0000163e30e ("can: Driver for the Microchip MCP251x SPI CAN controllers") Signed-off-by: Weitao Hou Acked-by: Willem de Bruijn Tested-by: Sean Nyekjaer Signed-off-by: Marc Kleine-Budde drivers/net/can/spi/mcp251x.c | 49 +++++++++++++++++++------------------------ 1 file changed, 22 insertions(+), 27 deletions(-) commit d4b890aec4bea7334ca2ca56fd3b12fb48a00cd1 Author: Nikita Yushchenko Date: Wed Jun 26 16:08:48 2019 +0300 can: rcar_canfd: fix possible IRQ storm on high load We have observed rcar_canfd driver entering IRQ storm under high load, with following scenario: - rcar_canfd_global_interrupt() in entered due to Rx available, - napi_schedule_prep() is called, and sets NAPIF_STATE_SCHED in state - Rx fifo interrupts are masked, - rcar_canfd_global_interrupt() is entered again, this time due to error interrupt (e.g. due to overflow), - since scheduled napi poller has not yet executed, condition for calling napi_schedule_prep() from rcar_canfd_global_interrupt() remains true, thus napi_schedule_prep() gets called and sets NAPIF_STATE_MISSED flag in state, - later, napi poller function rcar_canfd_rx_poll() gets executed, and calls napi_complete_done(), - due to NAPIF_STATE_MISSED flag in state, this call does not clear NAPIF_STATE_SCHED flag from state, - on return from napi_complete_done(), rcar_canfd_rx_poll() unmasks Rx interrutps, - Rx interrupt happens, rcar_canfd_global_interrupt() gets called and calls napi_schedule_prep(), - since NAPIF_STATE_SCHED is set in state at this time, this call returns false, - due to that false return, rcar_canfd_global_interrupt() returns without masking Rx interrupt - and this results into IRQ storm: unmasked Rx interrupt happens again and again is misprocessed in the same way. This patch fixes that scenario by unmasking Rx interrupts only when napi_complete_done() returns true, which means it has cleared NAPIF_STATE_SCHED in state. Fixes: dd3bd23eb438 ("can: rcar_canfd: Add Renesas R-Car CAN FD driver") Signed-off-by: Nikita Yushchenko Cc: linux-stable Signed-off-by: Marc Kleine-Budde drivers/net/can/rcar/rcar_canfd.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit c63845609c4700488e5eacd6ab4d06d5d420e5ef Author: Rasmus Villemoes Date: Mon Jun 24 08:34:13 2019 +0000 can: dev: call netif_carrier_off() in register_candev() CONFIG_CAN_LEDS is deprecated. When trying to use the generic netdev trigger as suggested, there's a small inconsistency with the link property: The LED is on initially, stays on when the device is brought up, and then turns off (as expected) when the device is brought down. Make sure the LED always reflects the state of the CAN device. Signed-off-by: Rasmus Villemoes Acked-by: Willem de Bruijn Signed-off-by: Marc Kleine-Budde drivers/net/can/dev.c | 2 ++ 1 file changed, 2 insertions(+) commit 49ed96943a8e0c62cc5a9b0a6cfc88be87d1fcec Author: Hridya Valsaraju Date: Mon Jul 15 12:18:04 2019 -0700 binder: prevent transactions to context manager from its own process. Currently, a transaction to context manager from its own process is prevented by checking if its binder_proc struct is the same as that of the sender. However, this would not catch cases where the process opens the binder device again and uses the new fd to send a transaction to the context manager. Reported-by: syzbot+8b3c354d33c4ac78bfad@syzkaller.appspotmail.com Signed-off-by: Hridya Valsaraju Acked-by: Todd Kjos Cc: stable Link: https://lore.kernel.org/r/20190715191804.112933-1-hridya@google.com Signed-off-by: Greg Kroah-Hartman drivers/android/binder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a56587065094fd96eb4c2b5ad65571daad32156d Author: Martijn Coenen Date: Tue Jul 9 13:09:23 2019 +0200 binder: Set end of SG buffer area properly. In case the target node requests a security context, the extra_buffers_size is increased with the size of the security context. But, that size is not available for use by regular scatter-gather buffers; make sure the ending of that buffer is marked correctly. Acked-by: Todd Kjos Fixes: ec74136ded79 ("binder: create node flag to request sender's security context") Signed-off-by: Martijn Coenen Cc: stable@vger.kernel.org # 5.1+ Link: https://lore.kernel.org/r/20190709110923.220736-1-maco@android.com Signed-off-by: Greg Kroah-Hartman drivers/android/binder.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2f5947dfcaecb99f2dd559156eecbeb7b95e4c02 Author: Christoph Hellwig Date: Wed Jul 24 09:24:49 2019 +0200 Documentation: move Documentation/virtual to Documentation/virt Renaming docs seems to be en vogue at the moment, so fix on of the grossly misnamed directories. We usually never use "virtual" as a shortcut for virtualization in the kernel, but always virt, as seen in the virt/ top-level directory. Fix up the documentation to match that. Fixes: ed16648eb5b8 ("Move kvm, uml, and lguest subdirectories under a common "virtual" directory, I.E:") Signed-off-by: Christoph Hellwig Signed-off-by: Paolo Bonzini Documentation/admin-guide/kernel-parameters.txt | 2 +- Documentation/{virtual => virt}/index.rst | 0 Documentation/{virtual => virt}/kvm/amd-memory-encryption.rst | 0 Documentation/{virtual => virt}/kvm/api.txt | 2 +- Documentation/{virtual => virt}/kvm/arm/hyp-abi.txt | 0 Documentation/{virtual => virt}/kvm/arm/psci.txt | 0 Documentation/{virtual => virt}/kvm/cpuid.rst | 0 Documentation/{virtual => virt}/kvm/devices/README | 0 Documentation/{virtual => virt}/kvm/devices/arm-vgic-its.txt | 0 Documentation/{virtual => virt}/kvm/devices/arm-vgic-v3.txt | 0 Documentation/{virtual => virt}/kvm/devices/arm-vgic.txt | 0 Documentation/{virtual => virt}/kvm/devices/mpic.txt | 0 Documentation/{virtual => virt}/kvm/devices/s390_flic.txt | 0 Documentation/{virtual => virt}/kvm/devices/vcpu.txt | 0 Documentation/{virtual => virt}/kvm/devices/vfio.txt | 0 Documentation/{virtual => virt}/kvm/devices/vm.txt | 0 Documentation/{virtual => virt}/kvm/devices/xics.txt | 0 Documentation/{virtual => virt}/kvm/devices/xive.txt | 0 Documentation/{virtual => virt}/kvm/halt-polling.txt | 0 Documentation/{virtual => virt}/kvm/hypercalls.txt | 4 ++-- Documentation/{virtual => virt}/kvm/index.rst | 0 Documentation/{virtual => virt}/kvm/locking.txt | 0 Documentation/{virtual => virt}/kvm/mmu.txt | 2 +- Documentation/{virtual => virt}/kvm/msr.txt | 0 Documentation/{virtual => virt}/kvm/nested-vmx.txt | 0 Documentation/{virtual => virt}/kvm/ppc-pv.txt | 0 Documentation/{virtual => virt}/kvm/review-checklist.txt | 2 +- Documentation/{virtual => virt}/kvm/s390-diag.txt | 0 Documentation/{virtual => virt}/kvm/timekeeping.txt | 0 Documentation/{virtual => virt}/kvm/vcpu-requests.rst | 0 Documentation/{virtual => virt}/paravirt_ops.rst | 0 Documentation/{virtual => virt}/uml/UserModeLinux-HOWTO.txt | 0 MAINTAINERS | 6 +++--- arch/powerpc/include/uapi/asm/kvm_para.h | 2 +- arch/x86/kvm/mmu.c | 2 +- include/uapi/linux/kvm.h | 4 ++-- tools/include/uapi/linux/kvm.h | 4 ++-- virt/kvm/arm/arm.c | 2 +- virt/kvm/arm/vgic/vgic-mmio-v3.c | 2 +- virt/kvm/arm/vgic/vgic.h | 4 ++-- 40 files changed, 19 insertions(+), 19 deletions(-) commit 89bbc6f1eb90809b1538b3a9c54030c558180e3b Author: Tony Lindgren Date: Mon Jul 22 03:44:42 2019 -0700 ARM: dts: Fix incorrect dcan register mapping for am3, am4 and dra7 We are currently using a wrong register for dcan revision. Although this is currently only used for detecting the dcan module, let's fix it to avoid confusion. Tested-by: Keerthy Signed-off-by: Tony Lindgren arch/arm/boot/dts/am33xx-l4.dtsi | 4 ++++ arch/arm/boot/dts/am437x-l4.dtsi | 4 ++++ arch/arm/boot/dts/dra7-l4.dtsi | 4 ++-- drivers/bus/ti-sysc.c | 3 ++- 4 files changed, 12 insertions(+), 3 deletions(-) commit 2e8647bbe1c8233a20c32fd2648258f2c05c7335 Author: Tony Lindgren Date: Mon Jul 22 03:44:47 2019 -0700 ARM: dts: Fix flags for gpio7 The ti,no-idle-on-init and ti,no-reset-on-init flags need to be at the interconnect target module level for the modules that have it defined. Otherwise we get the following warnings: dts flag should be at module level for ti,no-idle-on-init dts flag should be at module level for ti,no-reset-on-init Reviewed-by: Suman Anna Tested-by: Keerthy Signed-off-by: Tony Lindgren arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi | 2 +- arch/arm/boot/dts/dra7-evm.dts | 2 +- arch/arm/boot/dts/dra7-l4.dtsi | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit e212abd452a4af3174fcd469d46656f83e135a19 Author: Tony Lindgren Date: Mon Jul 22 03:44:52 2019 -0700 bus: ti-sysc: Fix using configured sysc mask value We have cases where there are no softreset bits like with am335x lcdc. In that case ti,sysc-mask = <0> needs to be handled properly. Tested-by: Keerthy Signed-off-by: Tony Lindgren drivers/bus/ti-sysc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 6ee8241d17c68b94a91efabfd6bdfe63bb1b79c1 Author: Tony Lindgren Date: Mon Jul 22 03:44:42 2019 -0700 bus: ti-sysc: Fix handling of forced idle For some devices we can get the following warning on boot: ti-sysc 48485200.target-module: sysc_disable_module: invalid midlemode Fix this by treating SYSC_IDLE_FORCE like we do for the other bits for idlemodes mask. Fixes: d59b60564cbf ("bus: ti-sysc: Add generic enable/disable functions") Cc: Roger Quadros Reviewed-by: Suman Anna Tested-by: Keerthy Signed-off-by: Tony Lindgren drivers/bus/ti-sysc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit afd58b162e48076e3fe66d08a69eefbd6fe71643 Author: Tony Lindgren Date: Mon Jul 22 03:44:52 2019 -0700 ARM: OMAP2+: Fix missing SYSC_HAS_RESET_STATUS for dra7 epwmss TRM says PWMSS_SYSCONFIG bit for SOFTRESET changes to zero when reset is completed. Let's configure it as otherwise we get warnings on boot when we check the data against dts provided data. Eventually the legacy platform data will be just dropped, but let's fix the warning first. Reviewed-by: Suman Anna Tested-by: Keerthy Signed-off-by: Tony Lindgren arch/arm/mach-omap2/omap_hwmod_7xx_data.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 20122994e38aef0ae50555884d287adde6641c94 Author: Hannes Reinecke Date: Fri Jul 12 08:53:47 2019 +0200 scsi: scsi_dh_alua: always use a 2 second delay before retrying RTPG Retrying immediately after we've received a 'transitioning' sense code is pretty much pointless, we should always use a delay before retrying. So ensure the default delay is applied before retrying. Signed-off-by: Hannes Reinecke Tested-by: Zhangguanghui Signed-off-by: Martin K. Petersen drivers/scsi/device_handler/scsi_dh_alua.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 5578257ca0e21056821e6481bd534ba267b84e58 Author: Tyrel Datwyler Date: Wed Jul 17 14:48:27 2019 -0500 scsi: ibmvfc: fix WARN_ON during event pool release While removing an ibmvfc client adapter a WARN_ON like the following WARN_ON is seen in the kernel log: WARNING: CPU: 6 PID: 5421 at ./include/linux/dma-mapping.h:541 ibmvfc_free_event_pool+0x12c/0x1f0 [ibmvfc] CPU: 6 PID: 5421 Comm: rmmod Tainted: G E 4.17.0-rc1-next-20180419-autotest #1 NIP: d00000000290328c LR: d00000000290325c CTR: c00000000036ee20 REGS: c000000288d1b7e0 TRAP: 0700 Tainted: G E (4.17.0-rc1-next-20180419-autotest) MSR: 800000010282b033 CR: 44008828 XER: 20000000 CFAR: c00000000036e408 SOFTE: 1 GPR00: d00000000290325c c000000288d1ba60 d000000002917900 c000000289d75448 GPR04: 0000000000000071 c0000000ff870000 0000000018040000 0000000000000001 GPR08: 0000000000000000 c00000000156e838 0000000000000001 d00000000290c640 GPR12: c00000000036ee20 c00000001ec4dc00 0000000000000000 0000000000000000 GPR16: 0000000000000000 0000000000000000 00000100276901e0 0000000010020598 GPR20: 0000000010020550 0000000010020538 0000000010020578 00000000100205b0 GPR24: 0000000000000000 0000000000000000 0000000010020590 5deadbeef0000100 GPR28: 5deadbeef0000200 d000000002910b00 0000000000000071 c0000002822f87d8 NIP [d00000000290328c] ibmvfc_free_event_pool+0x12c/0x1f0 [ibmvfc] LR [d00000000290325c] ibmvfc_free_event_pool+0xfc/0x1f0 [ibmvfc] Call Trace: [c000000288d1ba60] [d00000000290325c] ibmvfc_free_event_pool+0xfc/0x1f0 [ibmvfc] (unreliable) [c000000288d1baf0] [d000000002909390] ibmvfc_abort_task_set+0x7b0/0x8b0 [ibmvfc] [c000000288d1bb70] [c0000000000d8c68] vio_bus_remove+0x68/0x100 [c000000288d1bbb0] [c0000000007da7c4] device_release_driver_internal+0x1f4/0x2d0 [c000000288d1bc00] [c0000000007da95c] driver_detach+0x7c/0x100 [c000000288d1bc40] [c0000000007d8af4] bus_remove_driver+0x84/0x140 [c000000288d1bcb0] [c0000000007db6ac] driver_unregister+0x4c/0xa0 [c000000288d1bd20] [c0000000000d6e7c] vio_unregister_driver+0x2c/0x50 [c000000288d1bd50] [d00000000290ba0c] cleanup_module+0x24/0x15e0 [ibmvfc] [c000000288d1bd70] [c0000000001dadb0] sys_delete_module+0x220/0x2d0 [c000000288d1be30] [c00000000000b284] system_call+0x58/0x6c Instruction dump: e8410018 e87f0068 809f0078 e8bf0080 e8df0088 2fa30000 419e008c e9230200 2fa90000 419e0080 894d098a 794a07e0 <0b0a0000> e9290008 2fa90000 419e0028 This is tripped as a result of irqs being disabled during the call to dma_free_coherent() by ibmvfc_free_event_pool(). At this point in the code path we have quiesced the adapter and its overly paranoid anyways to be holding the host lock. Reported-by: Abdul Haleem Signed-off-by: Tyrel Datwyler Signed-off-by: Martin K. Petersen drivers/scsi/ibmvscsi/ibmvfc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5523ca8f624dc9268bda109d37cbdc3efb5e79be Author: Christophe JAILLET Date: Sun Jul 21 14:50:39 2019 +0200 scsi: fcoe: fix a typo #define relative to FCOE CTLR start with FCOE_CTLR, except FCOE_CTRL_SOL_TOV. This is likely a typo and CTRL should be CTLR here as well. Signed-off-by: Christophe JAILLET Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/fcoe/fcoe_ctlr.c | 2 +- include/scsi/libfcoe.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit e45ab43b1d404c5a9bacf565652421e8541c9f26 Author: YueHaibing Date: Tue Jul 23 22:34:50 2019 +0800 scsi: megaraid_sas: Make some functions static Fix sparse warnings: drivers/scsi/megaraid/megaraid_sas_fusion.c:541:1: warning: symbol 'megasas_alloc_cmdlist_fusion' was not declared. Should it be static? drivers/scsi/megaraid/megaraid_sas_fusion.c:580:1: warning: symbol 'megasas_alloc_request_fusion' was not declared. Should it be static? drivers/scsi/megaraid/megaraid_sas_fusion.c:661:1: warning: symbol 'megasas_alloc_reply_fusion' was not declared. Should it be static? drivers/scsi/megaraid/megaraid_sas_fusion.c:738:1: warning: symbol 'megasas_alloc_rdpq_fusion' was not declared. Should it be static? drivers/scsi/megaraid/megaraid_sas_fusion.c:920:1: warning: symbol 'megasas_alloc_cmds_fusion' was not declared. Should it be static? drivers/scsi/megaraid/megaraid_sas_fusion.c:1740:1: warning: symbol 'megasas_init_adapter_fusion' was not declared. Should it be static? drivers/scsi/megaraid/megaraid_sas_fusion.c:1966:1: warning: symbol 'map_cmd_status' was not declared. Should it be static? drivers/scsi/megaraid/megaraid_sas_fusion.c:2379:1: warning: symbol 'megasas_set_pd_lba' was not declared. Should it be static? drivers/scsi/megaraid/megaraid_sas_fusion.c:2718:1: warning: symbol 'megasas_build_ldio_fusion' was not declared. Should it be static? drivers/scsi/megaraid/megaraid_sas_fusion.c:3215:1: warning: symbol 'megasas_build_io_fusion' was not declared. Should it be static? drivers/scsi/megaraid/megaraid_sas_fusion.c:3328:6: warning: symbol 'megasas_prepare_secondRaid1_IO' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: YueHaibing Acked-by: Sumit Saxena Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_fusion.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) commit 3b5f307ef3cb5022bfe3c8ca5b8f2114d5bf6c29 Author: Junxiao Bi Date: Mon Jul 22 09:15:24 2019 -0700 scsi: megaraid_sas: fix panic on loading firmware crashdump While loading fw crashdump in function fw_crash_buffer_show(), left bytes in one dma chunk was not checked, if copying size over it, overflow access will cause kernel panic. Signed-off-by: Junxiao Bi Acked-by: Sumit Saxena Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 3 +++ 1 file changed, 3 insertions(+) commit 359603a3847e58843881db87e5f464bb85539e95 Author: Colin Ian King Date: Sat Jul 20 22:58:40 2019 +0100 scsi: megaraid_sas: fix spelling mistake "megarid_sas" -> "megaraid_sas" Fix spelling mistake in kernel warning message and replace printk with with pr_warn. Signed-off-by: Colin Ian King Acked-by: Sumit Saxena Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ad5e427e0f6b702e52c11d1f7b2b7be3bac7de82 Merge: 7b5cf701ea9c 69245c97560b Author: Linus Torvalds Date: Tue Jul 23 15:34:59 2019 -0700 Merge branch 'parisc-5.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc fixes from Helge Deller: - Fix build issues when kprobes are enabled - Speed up ITLB/DTLB cache flushes when running on machines with combined TLBs * 'parisc-5.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Flush ITLB in flush_tlb_all_local() only on split TLB machines parisc: add kprobe_fault_handler() commit decb705e01a5d325c9876b9674043cde4b54f0db Author: Ilya Maximets Date: Tue Jul 23 15:08:10 2019 +0300 libbpf: fix using uninitialized ioctl results 'channels.max_combined' initialized only on ioctl success and errno is only valid on ioctl failure. The code doesn't produce any runtime issues, but makes memory sanitizers angry: Conditional jump or move depends on uninitialised value(s) at 0x55C056F: xsk_get_max_queues (xsk.c:336) by 0x55C05B2: xsk_create_bpf_maps (xsk.c:354) by 0x55C089F: xsk_setup_xdp_prog (xsk.c:447) by 0x55C0E57: xsk_socket__create (xsk.c:601) Uninitialised value was created by a stack allocation at 0x55C04CD: xsk_get_max_queues (xsk.c:318) Additionally fixed warning on uninitialized bytes in ioctl arguments: Syscall param ioctl(SIOCETHTOOL) points to uninitialised byte(s) at 0x648D45B: ioctl (in /usr/lib64/libc-2.28.so) by 0x55C0546: xsk_get_max_queues (xsk.c:330) by 0x55C05B2: xsk_create_bpf_maps (xsk.c:354) by 0x55C089F: xsk_setup_xdp_prog (xsk.c:447) by 0x55C0E57: xsk_socket__create (xsk.c:601) Address 0x1ffefff378 is on thread 1's stack in frame #1, created by xsk_get_max_queues (xsk.c:318) Uninitialised value was created by a stack allocation at 0x55C04CD: xsk_get_max_queues (xsk.c:318) CC: Magnus Karlsson Fixes: 1cad07884239 ("libbpf: add support for using AF_XDP sockets") Signed-off-by: Ilya Maximets Acked-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov tools/lib/bpf/xsk.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 49902052fc6b9babf5b60fb5e31b821299f3f675 Merge: 7b5cf701ea9c 39e7317e37f7 Author: Ingo Molnar Date: Tue Jul 23 23:41:33 2019 +0200 Merge tag 'perf-urgent-for-mingo-5.3-20190723' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/urgent fixes from Arnaldo Carvalho de Melo: perf.data: Alexey Budankov: - Fix loading of compressed data split across adjacent records Jiri Olsa: - Fix buffer size setting for processing CPU topology perf.data header. perf stat: Jiri Olsa: - Fix segfault for event group in repeat mode Cong Wang: - Always separate "stalled cycles per insn" line, it was being appended to the "instructions" line. perf script: Andi Kleen: - Fix --max-blocks man page description. - Improve man page description of metrics. - Fix off by one in brstackinsn IPC computation. perf probe: Arnaldo Carvalho de Melo: - Avoid calling freeing routine multiple times for same pointer. perf build: - Do not use -Wshadow on gcc < 4.8, avoiding too strict warnings treated as errors, breaking the build. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 7c8b87f012614697596b78841c0d0b1520b1f88a Merge: d9b8aadaffa6 be69483bf4f3 Author: Alexei Starovoitov Date: Tue Jul 23 14:12:38 2019 -0700 Merge branch 'fix-gso_segs' Eric Dumazet says: ==================== First patch changes the kernel, second patch adds a new test. Note that other patches might be needed to take care of similar issues in sock_ops_convert_ctx_access() and SOCK_OPS_GET_FIELD() ==================== Signed-off-by: Alexei Starovoitov commit be69483bf4f3abaaca5d5ba460dbb50239463552 Author: Eric Dumazet Date: Tue Jul 23 03:15:38 2019 -0700 selftests/bpf: add another gso_segs access Use BPF_REG_1 for source and destination of gso_segs read, to exercise "bpf: fix access to skb_shared_info->gso_segs" fix. Signed-off-by: Eric Dumazet Suggested-by: Stanislav Fomichev Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/verifier/ctx_skb.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 06a22d897d82f12776d44dbf0850f5895469cb2a Author: Eric Dumazet Date: Tue Jul 23 03:15:37 2019 -0700 bpf: fix access to skb_shared_info->gso_segs It is possible we reach bpf_convert_ctx_access() with si->dst_reg == si->src_reg Therefore, we need to load BPF_REG_AX before eventually mangling si->src_reg. syzbot generated this x86 code : 3: 55 push %rbp 4: 48 89 e5 mov %rsp,%rbp 7: 48 81 ec 00 00 00 00 sub $0x0,%rsp // Might be avoided ? e: 53 push %rbx f: 41 55 push %r13 11: 41 56 push %r14 13: 41 57 push %r15 15: 6a 00 pushq $0x0 17: 31 c0 xor %eax,%eax 19: 48 8b bf c0 00 00 00 mov 0xc0(%rdi),%rdi 20: 44 8b 97 bc 00 00 00 mov 0xbc(%rdi),%r10d 27: 4c 01 d7 add %r10,%rdi 2a: 48 0f b7 7f 06 movzwq 0x6(%rdi),%rdi // Crash 2f: 5b pop %rbx 30: 41 5f pop %r15 32: 41 5e pop %r14 34: 41 5d pop %r13 36: 5b pop %rbx 37: c9 leaveq 38: c3 retq Fixes: d9ff286a0f59 ("bpf: allow BPF programs access skb_shared_info->gso_segs field") Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: Alexei Starovoitov net/core/filter.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d86afb89305de205b0d2f20c2160adf039e9508d Author: Andy Shevchenko Date: Tue Jul 23 23:03:43 2019 +0300 net: thunderx: Use fwnode_get_mac_address() Replace the custom implementation with fwnode_get_mac_address, which works on both DT and ACPI platforms. While here, replace memcpy() by ether_addr_copy(). Signed-off-by: Andy Shevchenko Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit d9b8aadaffa65809d146cf0f8632a22a946367d7 Author: Ilya Leoshkevich Date: Fri Jul 19 11:18:15 2019 +0200 bpf: fix narrower loads on s390 The very first check in test_pkt_md_access is failing on s390, which happens because loading a part of a struct __sk_buff field produces an incorrect result. The preprocessed code of the check is: { __u8 tmp = *((volatile __u8 *)&skb->len + ((sizeof(skb->len) - sizeof(__u8)) / sizeof(__u8))); if (tmp != ((*(volatile __u32 *)&skb->len) & 0xFF)) return 2; }; clang generates the following code for it: 0: 71 21 00 03 00 00 00 00 r2 = *(u8 *)(r1 + 3) 1: 61 31 00 00 00 00 00 00 r3 = *(u32 *)(r1 + 0) 2: 57 30 00 00 00 00 00 ff r3 &= 255 3: 5d 23 00 1d 00 00 00 00 if r2 != r3 goto +29 Finally, verifier transforms it to: 0: (61) r2 = *(u32 *)(r1 +104) 1: (bc) w2 = w2 2: (74) w2 >>= 24 3: (bc) w2 = w2 4: (54) w2 &= 255 5: (bc) w2 = w2 The problem is that when verifier emits the code to replace a partial load of a struct __sk_buff field (*(u8 *)(r1 + 3)) with a full load of struct sk_buff field (*(u32 *)(r1 + 104)), an optional shift and a bitwise AND, it assumes that the machine is little endian and incorrectly decides to use a shift. Adjust shift count calculation to account for endianness. Fixes: 31fd85816dbe ("bpf: permits narrower load from bpf program context fields") Signed-off-by: Ilya Leoshkevich Signed-off-by: Alexei Starovoitov include/linux/filter.h | 13 +++++++++++++ kernel/bpf/verifier.c | 4 ++-- 2 files changed, 15 insertions(+), 2 deletions(-) commit a261e3797506bd561700be643fe1a85bf81e9661 Author: Takashi Iwai Date: Tue Jul 23 17:15:25 2019 +0200 sky2: Disable MSI on ASUS P6T The onboard sky2 NIC on ASUS P6T WS PRO doesn't work after PM resume due to the infamous IRQ problem. Disabling MSI works around it, so let's add it to the blacklist. Unfortunately the BIOS on the machine doesn't fill the standard DMI_SYS_* entry, so we pick up DMI_BOARD_* entries instead. BugLink: https://bugzilla.suse.com/show_bug.cgi?id=1142496 Reported-and-tested-by: Marcus Seyfarth Signed-off-by: Takashi Iwai Signed-off-by: David S. Miller drivers/net/ethernet/marvell/sky2.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 7ba771e3e246fa8787abf2cce9064ec8c9b38133 Author: Nishka Dasgupta Date: Tue Jul 23 16:14:48 2019 +0530 net: dsa: sja1105: sja1105_main: Add of_node_put() Each iteration of for_each_child_of_node puts the previous node, but in the case of a return from the middle of the loop, there is no put, thus causing a memory leak. Hence add an of_node_put before the return. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: David S. Miller drivers/net/dsa/sja1105/sja1105_main.c | 3 +++ 1 file changed, 3 insertions(+) commit 78e420408d12eddd0e72613fc717f7994736ea9a Author: Nishka Dasgupta Date: Tue Jul 23 16:13:07 2019 +0530 net: dsa: mv88e6xxx: chip: Add of_node_put() before return Each iteration of for_each_available_child_of_node puts the previous node, but in the case of a return from the middle of the loop, there is no put, thus causing a memory leak. Hence add an of_node_put before the return. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 1 + 1 file changed, 1 insertion(+) commit 92e6475ae0a0383b012eb21c1aaf0e5456b1a3d9 Author: Nicholas Kazlauskas Date: Wed Jul 3 10:02:39 2019 -0400 drm/amd/display: Set enabled to false at start of audio disable [Why] In an effort to stop redundant calls to dce110_disable_audio_stream the audio->enabled flag was added to the audio resource struct. While this state probably shouldn't have been tracked on the audio struct itself it still works fine for some sequences. However, it does not work for cases where we're freeing the audio resource (such as hotplugs) or when dynamic audio is enabled. In these cases the pipe_ctx->stream_res.audio = NULL before we can set audio->enabled = false. The next time we acquire the audio resource such as on hotplug the audio will not be enabled for the stream since DC thinks it's still enabled. Audio state tracking should cover this sequence. [How] Set audio->enabled = false at the start as long as we have pipe_ctx->stream_res.audio. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Zhan Liu Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8eadf9bbab45ca29d823a974c1e3118a864b5e47 Merge: b3e487c0cf42 1be79d89b7ae Author: David S. Miller Date: Tue Jul 23 13:06:49 2019 -0700 Merge branch 'selftests-forwarding-GRE-multipath-fixes' Ido Schimmel says: ==================== selftests: forwarding: GRE multipath fixes Patch #1 ensures IPv4 forwarding is enabled during the test. Patch #2 fixes the flower filters used to measure the distribution of the traffic between the two nexthops, so that the test will pass regardless if traffic is offloaded or not. ==================== Signed-off-by: David S. Miller commit 1be79d89b7ae96e004911bd228ce8c2b5cc6415f Author: Ido Schimmel Date: Tue Jul 23 11:19:26 2019 +0300 selftests: forwarding: gre_multipath: Fix flower filters The TC filters used in the test do not work with veth devices because the outer Ethertype is 802.1Q and not IPv4. The test passes with mlxsw netdevs since the hardware always looks at "The first Ethertype that does not point to either: VLAN, CNTAG or configurable Ethertype". Fix this by matching on the VLAN ID instead, but on the ingress side. The reason why this is not performed at egress is explained in the commit cited below. Fixes: 541ad323db3a ("selftests: forwarding: gre_multipath: Update next-hop statistics match criteria") Signed-off-by: Ido Schimmel Reported-by: Stephen Suryaputra Tested-by: Stephen Suryaputra Signed-off-by: David S. Miller .../selftests/net/forwarding/gre_multipath.sh | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) commit efa7b79f675da0efafe3f32ba0d6efe916cf4867 Author: Ido Schimmel Date: Tue Jul 23 11:19:25 2019 +0300 selftests: forwarding: gre_multipath: Enable IPv4 forwarding The test did not enable IPv4 forwarding during its setup phase, which causes the test to fail on machines where IPv4 forwarding is disabled. Fixes: 54818c4c4b93 ("selftests: forwarding: Test multipath tunneling") Signed-off-by: Ido Schimmel Reported-by: Stephen Suryaputra Tested-by: Stephen Suryaputra Signed-off-by: David S. Miller tools/testing/selftests/net/forwarding/gre_multipath.sh | 4 ++++ 1 file changed, 4 insertions(+) commit 7bd9d465140a93c0a21ba2d2f426451c78bfcc7d Merge: 02a0242549aa 8d0148473dec Author: Olof Johansson Date: Tue Jul 23 10:13:23 2019 -0700 Merge tag 'imx-fixes-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/fixes i.MX fixes for 5.3: - Fix i.MX8MM SAI3 RXC/TXFS pinmux configuration. - Fix i.MX7ULP usb-phy unit address to drop extra '0x' notation. - Fix typo of clock frequency property name in a few i.MX6UL board I2C buses. - Drop "fsl,imx6sx-sai" from i.MX8M SAI device, as it's not compatible with i.MX6SX SAI. * tag 'imx-fixes-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: arm64: dts: imx8mq: fix SAI compatible arm64: dts: imx8mm: Correct SAI3 RXC/TXFS pin's mux option #1 ARM: dts: imx6ul: fix clock frequency property name of I2C buses ARM: dts: imx7ulp: Fix usb-phy unit address format Link: https://lore.kernel.org/r/20190723090827.GU15632@dragon Signed-off-by: Olof Johansson commit 02a0242549aaec4490e9280cebbb1474b36281ca Author: Linus Walleij Date: Tue Jul 23 10:15:23 2019 +0200 ARM: defconfig: u8500: Add new drivers This enables the new or updates driver options for U8500 that got merged into v5.3-rc1: - CMA, MCDE driver, LIMA driver and the Samsung S6D16D0 driver enabled by default bringing up the new graphics support. Include the LOGO so we can see when the graphics are live. - We use the IIO hwmon bridge for reflecting temperature in the system. - Set MUSB to PIO mode as this is the one working most stable for the time being. - HWSPINLOCK needs to be set to get the hardware semaphore driver to compile and link properly. Link: https://lore.kernel.org/r/20190723081523.13079-2-linus.walleij@linaro.org Signed-off-by: Linus Walleij Signed-off-by: Olof Johansson arch/arm/configs/u8500_defconfig | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 14d017bee4accf6ba80ed01b190e4f61b47d9327 Author: Linus Walleij Date: Tue Jul 23 10:15:22 2019 +0200 ARM: defconfig: u8500: Refresh defconfig This refreshes the outdated U8500 defconfig: some options moved around, PS/2 mouse is no longer default on, crypto options moved around etc. Link: https://lore.kernel.org/r/20190723081523.13079-1-linus.walleij@linaro.org Signed-off-by: Linus Walleij Signed-off-by: Olof Johansson arch/arm/configs/u8500_defconfig | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) commit 3a9d2569e45cb02769cda26fee4a02126867c934 Author: Arnd Bergmann Date: Mon Jul 22 16:55:52 2019 +0200 ARM: dts: bcm: bcm47094: add missing #cells for mdio-bus-mux The mdio-bus-mux has no #address-cells/#size-cells property, which causes a few dtc warnings: arch/arm/boot/dts/bcm47094-linksys-panamera.dts:129.4-18: Warning (reg_format): /mdio-bus-mux/mdio@200:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1) arch/arm/boot/dts/bcm47094-linksys-panamera.dtb: Warning (pci_device_bus_num): Failed prerequisite 'reg_format' arch/arm/boot/dts/bcm47094-linksys-panamera.dtb: Warning (i2c_bus_reg): Failed prerequisite 'reg_format' arch/arm/boot/dts/bcm47094-linksys-panamera.dtb: Warning (spi_bus_reg): Failed prerequisite 'reg_format' arch/arm/boot/dts/bcm47094-linksys-panamera.dts:128.22-132.5: Warning (avoid_default_addr_size): /mdio-bus-mux/mdio@200: Relying on default #address-cells value arch/arm/boot/dts/bcm47094-linksys-panamera.dts:128.22-132.5: Warning (avoid_default_addr_size): /mdio-bus-mux/mdio@200: Relying on default #size-cells value Add the normal cell numbers. Link: https://lore.kernel.org/r/20190722145618.1155492-1-arnd@arndb.de Fixes: 2bebdfcdcd0f ("ARM: dts: BCM5301X: Add support for Linksys EA9500") Signed-off-by: Arnd Bergmann Signed-off-by: Olof Johansson arch/arm/boot/dts/bcm47094-linksys-panamera.dts | 3 +++ 1 file changed, 3 insertions(+) commit d64b212ea960db4276a1d8372bd98cb861dfcbb0 Author: Arnd Bergmann Date: Mon Jul 22 16:51:50 2019 +0200 ARM: davinci: fix sleep.S build error on ARMv4 When building a multiplatform kernel that includes armv4 support, the default target CPU does not support the blx instruction, which leads to a build failure: arch/arm/mach-davinci/sleep.S: Assembler messages: arch/arm/mach-davinci/sleep.S:56: Error: selected processor does not support `blx ip' in ARM mode Add a .arch statement in the sources to make this file build. Link: https://lore.kernel.org/r/20190722145211.1154785-1-arnd@arndb.de Acked-by: Sekhar Nori Signed-off-by: Arnd Bergmann Signed-off-by: Olof Johansson arch/arm/mach-davinci/sleep.S | 1 + 1 file changed, 1 insertion(+) commit 399ea57a4c8bc5fdb71a024a6870b5767b2ef6d8 Author: Colin Ian King Date: Mon Jul 1 14:04:31 2019 +0100 selftests/x86: fix spelling mistake "FAILT" -> "FAIL" There is an spelling mistake in an a test error message. Fix it. Acked-by: Andy Lutomirski Signed-off-by: Colin Ian King Signed-off-by: Shuah Khan tools/testing/selftests/x86/test_vsyscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 36876b30d2143121322cd199cc23f27143912deb Author: Masanari Iida Date: Tue Jul 23 19:22:52 2019 +0900 selftests: kmod: Fix typo in kmod.sh This patch fixes some spelling typos in kmod.sh Signed-off-by: Masanari Iida Acked-by: Randy Dunlap Signed-off-by: Shuah Khan tools/testing/selftests/kmod/kmod.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8fe34be14ecb5eb0ef8d8d44aa7ab62d9e2911ca Author: yangerkun Date: Tue Jul 23 11:23:13 2019 +0800 Revert "nvme-pci: don't create a read hctx mapping without read queues" This reverts commit 0298d5435276e7795b0b939d74827f6e775e7009. With this patch, set 'poll_queues > hard queues' will lead to 'nr_read_queues = 0' in nvme_calc_irq_sets. Then poll_queues setting can fail since dev->tagset.nr_maps equals to 2 and nvme_pci_map_queues will not do map for poll queues. Signed-off-by: yangerkun Signed-off-by: Christoph Hellwig drivers/nvme/host/pci.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 66b20ac0a1a10769d059d6903202f53494e3d902 Author: Marta Rybczynska Date: Tue Jul 23 07:41:20 2019 +0200 nvme: fix multipath crash when ANA is deactivated Fix a crash with multipath activated. It happends when ANA log page is larger than MDTS and because of that ANA is disabled. The driver then tries to access unallocated buffer when connecting to a nvme target. The signature is as follows: [ 300.433586] nvme nvme0: ANA log page size (8208) larger than MDTS (8192). [ 300.435387] nvme nvme0: disabling ANA support. [ 300.437835] nvme nvme0: creating 4 I/O queues. [ 300.459132] nvme nvme0: new ctrl: NQN "nqn.0.0.0", addr 10.91.0.1:8009 [ 300.464609] BUG: unable to handle kernel NULL pointer dereference at 0000000000000008 [ 300.466342] #PF error: [normal kernel read fault] [ 300.467385] PGD 0 P4D 0 [ 300.467987] Oops: 0000 [#1] SMP PTI [ 300.468787] CPU: 3 PID: 50 Comm: kworker/u8:1 Not tainted 5.0.20kalray+ #4 [ 300.470264] Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011 [ 300.471532] Workqueue: nvme-wq nvme_scan_work [nvme_core] [ 300.472724] RIP: 0010:nvme_parse_ana_log+0x21/0x140 [nvme_core] [ 300.474038] Code: 45 01 d2 d8 48 98 c3 66 90 0f 1f 44 00 00 41 57 41 56 41 55 41 54 55 53 48 89 fb 48 83 ec 08 48 8b af 20 0a 00 00 48 89 34 24 <66> 83 7d 08 00 0f 84 c6 00 00 00 44 8b 7d 14 49 89 d5 8b 55 10 48 [ 300.477374] RSP: 0018:ffffa50e80fd7cb8 EFLAGS: 00010296 [ 300.478334] RAX: 0000000000000001 RBX: ffff9130f1872258 RCX: 0000000000000000 [ 300.479784] RDX: ffffffffc06c4c30 RSI: ffff9130edad4280 RDI: ffff9130f1872258 [ 300.481488] RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000044 [ 300.483203] R10: 0000000000000220 R11: 0000000000000040 R12: ffff9130f18722c0 [ 300.484928] R13: ffff9130f18722d0 R14: ffff9130edad4280 R15: ffff9130f18722c0 [ 300.486626] FS: 0000000000000000(0000) GS:ffff9130f7b80000(0000) knlGS:0000000000000000 [ 300.488538] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 300.489907] CR2: 0000000000000008 CR3: 00000002365e6000 CR4: 00000000000006e0 [ 300.491612] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 300.493303] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 300.494991] Call Trace: [ 300.495645] nvme_mpath_add_disk+0x5c/0xb0 [nvme_core] [ 300.496880] nvme_validate_ns+0x2ef/0x550 [nvme_core] [ 300.498105] ? nvme_identify_ctrl.isra.45+0x6a/0xb0 [nvme_core] [ 300.499539] nvme_scan_work+0x2b4/0x370 [nvme_core] [ 300.500717] ? __switch_to_asm+0x35/0x70 [ 300.501663] process_one_work+0x171/0x380 [ 300.502340] worker_thread+0x49/0x3f0 [ 300.503079] kthread+0xf8/0x130 [ 300.503795] ? max_active_store+0x80/0x80 [ 300.504690] ? kthread_bind+0x10/0x10 [ 300.505502] ret_from_fork+0x35/0x40 [ 300.506280] Modules linked in: nvme_tcp nvme_rdma rdma_cm iw_cm ib_cm ib_core nvme_fabrics nvme_core xt_physdev ip6table_raw ip6table_mangle ip6table_filter ip6_tables xt_comment iptable_nat nf_nat_ipv4 nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 xt_CHECKSUM iptable_mangle iptable_filter veth ebtable_filter ebtable_nat ebtables iptable_raw vxlan ip6_udp_tunnel udp_tunnel sunrpc joydev pcspkr virtio_balloon br_netfilter bridge stp llc ip_tables xfs libcrc32c ata_generic pata_acpi virtio_net virtio_console net_failover virtio_blk failover ata_piix serio_raw libata virtio_pci virtio_ring virtio [ 300.514984] CR2: 0000000000000008 [ 300.515569] ---[ end trace faa2eefad7e7f218 ]--- [ 300.516354] RIP: 0010:nvme_parse_ana_log+0x21/0x140 [nvme_core] [ 300.517330] Code: 45 01 d2 d8 48 98 c3 66 90 0f 1f 44 00 00 41 57 41 56 41 55 41 54 55 53 48 89 fb 48 83 ec 08 48 8b af 20 0a 00 00 48 89 34 24 <66> 83 7d 08 00 0f 84 c6 00 00 00 44 8b 7d 14 49 89 d5 8b 55 10 48 [ 300.520353] RSP: 0018:ffffa50e80fd7cb8 EFLAGS: 00010296 [ 300.521229] RAX: 0000000000000001 RBX: ffff9130f1872258 RCX: 0000000000000000 [ 300.522399] RDX: ffffffffc06c4c30 RSI: ffff9130edad4280 RDI: ffff9130f1872258 [ 300.523560] RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000044 [ 300.524734] R10: 0000000000000220 R11: 0000000000000040 R12: ffff9130f18722c0 [ 300.525915] R13: ffff9130f18722d0 R14: ffff9130edad4280 R15: ffff9130f18722c0 [ 300.527084] FS: 0000000000000000(0000) GS:ffff9130f7b80000(0000) knlGS:0000000000000000 [ 300.528396] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 300.529440] CR2: 0000000000000008 CR3: 00000002365e6000 CR4: 00000000000006e0 [ 300.530739] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 300.531989] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 300.533264] Kernel panic - not syncing: Fatal exception [ 300.534338] Kernel Offset: 0x17c00000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff) [ 300.536227] ---[ end Kernel panic - not syncing: Fatal exception ]--- Condition check refactoring from Christoph Hellwig. Signed-off-by: Marta Rybczynska Tested-by: Jean-Baptiste Riaux Signed-off-by: Christoph Hellwig drivers/nvme/host/multipath.c | 8 ++------ drivers/nvme/host/nvme.h | 6 +++++- 2 files changed, 7 insertions(+), 7 deletions(-) commit e654dfd38c1ecf58d8d019f3c053189413484a5b Author: Logan Gunthorpe Date: Thu Jul 18 17:53:50 2019 -0600 nvme: fix memory leak caused by incorrect subsystem free When freeing the subsystem after finding another match with __nvme_find_get_subsystem(), use put_device() instead of __nvme_release_subsystem() which calls kfree() directly. Per the documentation, put_device() should always be used after device_initialization() is called. Otherwise, leaks like the one below which was detected by kmemleak may occur. Once the call of __nvme_release_subsystem() is removed it no longer makes sense to keep the helper, so fold it back into nvme_release_subsystem(). unreferenced object 0xffff8883d12bfbc0 (size 16): comm "nvme", pid 2635, jiffies 4294933602 (age 739.952s) hex dump (first 16 bytes): 6e 76 6d 65 2d 73 75 62 73 79 73 32 00 88 ff ff nvme-subsys2.... backtrace: [<000000007d8fc208>] __kmalloc_track_caller+0x16d/0x2a0 [<0000000081169e5f>] kvasprintf+0xad/0x130 [<0000000025626f25>] kvasprintf_const+0x47/0x120 [<00000000fa66ad36>] kobject_set_name_vargs+0x44/0x120 [<000000004881f8b3>] dev_set_name+0x98/0xc0 [<000000007124dae3>] nvme_init_identify+0x1995/0x38e0 [<000000009315020a>] nvme_loop_configure_admin_queue+0x4fa/0x5e0 [<000000001a63e766>] nvme_loop_create_ctrl+0x489/0xf80 [<00000000a46ecc23>] nvmf_dev_write+0x1a12/0x2220 [<000000002259b3d5>] __vfs_write+0x66/0x120 [<000000002f6df81e>] vfs_write+0x154/0x490 [<000000007e8cfc19>] ksys_write+0x10a/0x240 [<00000000ff5c7b85>] __x64_sys_write+0x73/0xb0 [<00000000fee6d692>] do_syscall_64+0xaa/0x470 [<00000000997e1ede>] entry_SYSCALL_64_after_hwframe+0x49/0xbe Fixes: ab9e00cc72fa ("nvme: track subsystems") Signed-off-by: Logan Gunthorpe Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 08b903b5fd0c49e5f224a9bf085b6329ec3c55c0 Author: Misha Nasledov Date: Mon Jul 15 00:11:49 2019 -0700 nvme: ignore subnqn for ADATA SX6000LNP The ADATA SX6000LNP NVMe SSDs have the same subnqn and, due to this, a system with more than one of these SSDs will only have one usable. [ 0.942706] nvme nvme1: ignoring ctrl due to duplicate subnqn (nqn.2018-05.com.example:nvme:nvm-subsystem-OUI00E04C). [ 0.943017] nvme nvme1: Removing after probe failure status: -22 02:00.0 Non-Volatile memory controller [0108]: Realtek Semiconductor Co., Ltd. Device [10ec:5762] (rev 01) 71:00.0 Non-Volatile memory controller [0108]: Realtek Semiconductor Co., Ltd. Device [10ec:5762] (rev 01) There are no firmware updates available from the vendor, unfortunately. Applying the NVME_QUIRK_IGNORE_DEV_SUBNQN quirk for these SSDs resolves the issue, and they all work after this patch: /dev/nvme0n1 2J1120050420 ADATA SX6000LNP [...] /dev/nvme1n1 2J1120050540 ADATA SX6000LNP [...] Signed-off-by: Misha Nasledov Signed-off-by: Christoph Hellwig drivers/nvme/host/pci.c | 2 ++ 1 file changed, 2 insertions(+) commit 06532750010e06dd4b6d69983773677df7fc5291 Author: Eric Auger Date: Mon Jul 22 18:51:49 2019 +0200 dma-mapping: use dma_get_mask in dma_addressing_limited We currently have cases where the dma_addressing_limited() gets called with dma_mask unset. This causes a NULL pointer dereference. Use dma_get_mask() accessor to prevent the crash. Fixes: b866455423e0 ("dma-mapping: add a dma_addressing_limited helper") Signed-off-by: Eric Auger Acked-by: Michael S. Tsirkin Signed-off-by: Christoph Hellwig include/linux/dma-mapping.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 66929812955bbec808c94d7a3916f41638a98a0a Author: Suthikulpanit, Suravee Date: Tue Jul 16 04:29:16 2019 +0000 iommu/amd: Add support for X2APIC IOMMU interrupts AMD IOMMU requires IntCapXT registers to be setup in order to generate its own interrupts (for Event Log, PPR Log, and GA Log) with 32-bit APIC destination ID. Without this support, AMD IOMMU MSI interrupts will not be routed correctly when booting the system in X2APIC mode. Cc: Joerg Roedel Fixes: 90fcffd9cf5e ('iommu/amd: Add support for IOMMU XT mode') Signed-off-by: Suravee Suthikulpanit Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu_init.c | 90 +++++++++++++++++++++++++++++++++++++++++ drivers/iommu/amd_iommu_types.h | 9 +++++ 2 files changed, 99 insertions(+) commit 5a46d3f71d5e5a9f82eabc682f996f1281705ac7 Author: Lorenzo Pieralisi Date: Mon Jul 22 17:25:48 2019 +0100 ACPI/IORT: Fix off-by-one check in iort_dev_find_its_id() Static analysis identified that index comparison against ITS entries in iort_dev_find_its_id() is off by one. Update the comparison condition and clarify the resulting error message. Fixes: 4bf2efd26d76 ("ACPI: Add new IORT functions to support MSI domain handling") Link: https://lore.kernel.org/linux-arm-kernel/20190613065410.GB16334@mwanda/ Reviewed-by: Hanjun Guo Reported-by: Dan Carpenter Signed-off-by: Lorenzo Pieralisi Cc: Dan Carpenter Cc: Will Deacon Cc: Hanjun Guo Cc: Sudeep Holla Cc: Catalin Marinas Cc: Robin Murphy Signed-off-by: Will Deacon drivers/acpi/arm64/iort.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 883a2a80f79ca5c0c105605fafabd1f3df99b34c Author: Kai-Heng Feng Date: Mon Jul 22 10:56:55 2019 +0300 Input: elantech - enable SMBus on new (2018+) systems There are some new HP laptops with Elantech touchpad that don't support multitouch. Currently we use ETP_NEW_IC_SMBUS_HOST_NOTIFY() to check if SMBus is supported, but in addition to firmware version, the bus type also informs us whether the IC can support SMBus. To avoid breaking old ICs, we will only enable SMbus support based the bus type on systems manufactured after 2018. Lastly, let's consolidate all checks into elantech_use_host_notify() and use it to determine whether to use PS/2 or SMBus. Signed-off-by: Kai-Heng Feng Acked-by: Benjamin Tissoires Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/mouse/elantech.c | 54 +++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 29 deletions(-) commit b1cbb2f09d7b3f1726215987d5b28f5aea9548da Author: Nikolas Nyby Date: Tue Jul 23 16:42:57 2019 +0300 Input: applespi - fix trivial typo in struct description This fixes a typo in the keyboard_protocol description. coodinate -> coordinate. Signed-off-by: Nikolas Nyby Signed-off-by: Dmitry Torokhov drivers/input/keyboard/applespi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 020834bebbcb5db4026757556710ea58ccb76a06 Author: Arnd Bergmann Date: Tue Jul 23 16:41:35 2019 +0300 Input: applespi - select CRC16 module In some rare randconfig builds, CRC16 is disabled, which leads to a link error: drivers/input/keyboard/applespi.o: In function `applespi_send_cmd_msg': applespi.c:(.text+0x449f): undefined reference to `crc16' drivers/input/keyboard/applespi.o: In function `applespi_verify_crc': applespi.c:(.text+0x7538): undefined reference to `crc16' This symbol is meant to be selected for each user in Kconfig, so do that here as well. Fixes: 038b1a05eae6 ("Input: add Apple SPI keyboard and trackpad driver") Signed-off-by: Arnd Bergmann Signed-off-by: Dmitry Torokhov drivers/input/keyboard/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 77ce56e2bfaa64127ae5e23ef136c0168b818777 Author: Arnd Bergmann Date: Mon Jul 22 14:26:34 2019 +0200 drbd: dynamically allocate shash descriptor Building with clang and KASAN, we get a warning about an overly large stack frame on 32-bit architectures: drivers/block/drbd/drbd_receiver.c:921:31: error: stack frame size of 1280 bytes in function 'conn_connect' [-Werror,-Wframe-larger-than=] We already allocate other data dynamically in this function, so just do the same for the shash descriptor, which makes up most of this memory. Link: https://lore.kernel.org/lkml/20190617132440.2721536-1-arnd@arndb.de/ Reviewed-by: Kees Cook Reviewed-by: Roland Kammerer Signed-off-by: Arnd Bergmann Signed-off-by: Jens Axboe drivers/block/drbd/drbd_receiver.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 327fe1d42b83f8a06b33ba30159582b49af5fc8e Author: Marcos Paulo de Souza Date: Tue Jul 23 00:27:41 2019 -0300 block: blk-mq: Remove blk_mq_sched_started_request and started_request blk_mq_sched_completed_request is a function that checks if the elevator related to the request has started_request implemented, but currently, none of the available IO schedulers implement started_request, so remove both. Signed-off-by: Marcos Paulo de Souza Signed-off-by: Jens Axboe block/blk-mq-sched.h | 9 --------- block/blk-mq.c | 2 -- include/linux/elevator.h | 1 - 3 files changed, 12 deletions(-) commit 607975b30db41aad6edc846ed567191aa6b7d893 Author: Ding Xiang Date: Tue Jul 23 15:44:41 2019 +0800 ALSA: ac97: Fix double free of ac97_codec_device put_device will call ac97_codec_release to free ac97_codec_device and other resources, so remove the kfree and other redundant code. Fixes: 74426fbff66e ("ALSA: ac97: add an ac97 bus") Signed-off-by: Ding Xiang Cc: Signed-off-by: Takashi Iwai sound/ac97/bus.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit 39e7317e37f7f0be366d1201c283f968c17268da Author: Arnaldo Carvalho de Melo Date: Fri Jul 19 15:34:30 2019 -0300 perf build: Do not use -Wshadow on gcc < 4.8 As it is too strict, see https://lkml.org/lkml/2006/11/28/253 and https://gcc.gnu.org/gcc-4.8/changes.html, that takes into account Linus's comments (search for Wshadow) for the reasoning about -Wshadow not being interesting before gcc 4.8. Acked-by: Andrii Nakryiko Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/r/20190719183417.GQ3624@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/scripts/Makefile.include | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit d95daf5accf4a72005daa13fbb1d1bd8709f2861 Author: Arnaldo Carvalho de Melo Date: Thu Jul 18 11:28:37 2019 -0300 perf probe: Avoid calling freeing routine multiple times for same pointer When perf_add_probe_events() we call cleanup_perf_probe_events() for the pev pointer it receives, then, as part of handling this failure the main 'perf probe' goes on and calls cleanup_params() and that will again call cleanup_perf_probe_events()for the same pointer, so just set nevents to zero when handling the failure of perf_add_probe_events() to avoid the double free. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-x8qgma4g813z96dvtw9w219q@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-probe.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit df8350ed56a26f502a9636f37faf699a12ee906e Author: Arnaldo Carvalho de Melo Date: Thu Jul 18 11:22:58 2019 -0300 perf probe: Set pev->nargs to zero after freeing pev->args entries So that, when perf_add_probe_events() fails, like in: # perf probe icmp_rcv:64 "type=icmph->type" Failed to find 'icmph' in this function. Error: Failed to add events. Segmentation fault (core dumped) # We don't segfault. clear_perf_probe_event() was zeroing the whole pev, and since the switch to zfree() for the members in the pev, that memset() was removed, which left nargs with its original value, in the above case 1. With the memset the same pev could be passed to clear_perf_probe_event() multiple times, since all it would have would be zeroes, and free() accepts zero, the loop would not happen and we would just memset it again to zeroes. Without it we got that segfault, so zero nargs to keep it like it was, next cset will avoid calling clear_perf_probe_event() for the same pevs in case of failure. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Namhyung Kim Fixes: d8f9da240495 ("perf tools: Use zfree() where applicable") Link: https://lkml.kernel.org/n/tip-802f2jypnwqsvyavvivs8464@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/probe-event.c | 1 + 1 file changed, 1 insertion(+) commit 872c8ee8f0f47222f7b10da96eea84d0486540a3 Author: Alexey Budankov Date: Tue Jul 9 17:48:14 2019 +0300 perf session: Fix loading of compressed data split across adjacent records Fix decompression failure found during the loading of compressed trace collected on larger scale systems (>48 cores). The error happened due to lack of decompression space for a mmaped buffer data chunk split across adjacent PERF_RECORD_COMPRESSED records. $ perf report -i bt.16384.data --stats failed to decompress (B): 63869 -> 0 : Destination buffer is too small user stack dump failure Can't parse sample, err = -14 0x2637e436 [0x4080]: failed to process type: 9 Error: failed to process sample $ perf test 71 71: Zstd perf.data compression/decompression : Ok Signed-off-by: Alexey Budankov Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/4d839e1b-9c48-89c4-9702-a12217420611@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/session.c | 22 ++++++++++++++-------- tools/perf/util/session.h | 1 + tools/perf/util/zstd.c | 4 ++-- 3 files changed, 17 insertions(+), 10 deletions(-) commit 146540fb545b8464ba1be298e3392daca0d183a2 Author: Cong Wang Date: Fri May 17 15:10:39 2019 -0700 perf stat: Always separate stalled cycles per insn The "stalled cycles per insn" is appended to "instructions" when the CPU has this hardware counter directly. We should always make it a separate line, which also aligns to the output when we hit the "if (total && avg)" branch. Before: $ sudo perf stat --all-cpus --field-separator , --log-fd 1 -einstructions,cycles -- sleep 1 4565048704,,instructions,64114578096,100.00,1.34,insn per cycle,, 3396325133,,cycles,64146628546,100.00,, After: $ sudo ./tools/perf/perf stat --all-cpus --field-separator , --log-fd 1 -einstructions,cycles -- sleep 1 6721924,,instructions,24026790339,100.00,0.22,insn per cycle ,,,,,0.00,stalled cycles per insn 30939953,,cycles,24025512526,100.00,, Signed-off-by: Cong Wang Acked-by: Jiri Olsa Cc: Andi Kleen Link: http://lkml.kernel.org/r/20190517221039.8975-1-xiyou.wangcong@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-shadow.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 08ef3af1579d0446db1c1bd08e2c42565addf10f Author: Jiri Olsa Date: Mon Jul 15 16:21:21 2019 +0200 perf stat: Fix segfault for event group in repeat mode Numfor Mbiziwo-Tiapo reported segfault on stat of event group in repeat mode: # perf stat -e '{cycles,instructions}' -r 10 ls It's caused by memory corruption due to not cleaned evsel's id array and index, which needs to be rebuilt in every stat iteration. Currently the ids index grows, while the array (which is also not freed) has the same size. Fixing this by releasing id array and zeroing ids index in perf_evsel__close function. We also need to keep the evsel_list alive for stat record (which is disabled in repeat mode). Reported-by: Numfor Mbiziwo-Tiapo Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Ian Rogers Cc: Mark Drayton Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Cc: Stephane Eranian Link: http://lkml.kernel.org/r/20190715142121.GC6032@krava Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 9 ++++++++- tools/perf/util/evsel.c | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-) commit 79b2fe5e756163897175a8f57d66b26cd9befd59 Author: Jiri Olsa Date: Mon Jul 15 16:04:26 2019 +0200 perf tools: Fix proper buffer size for feature processing After Song Liu's segfault fix for pipe mode, Arnaldo reported following error: # perf record -o - | perf script 0x514 [0x1ac]: failed to process type: 80 It's caused by wrong buffer size setup in feature processing, which makes cpu topology feature fail, because it's using buffer size to recognize its header version. Reported-by: Arnaldo Carvalho de Melo Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: David Carrillo-Cisneros Cc: Kan Liang Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Fixes: e9def1b2e74e ("perf tools: Add feature header record to pipe-mode") Link: http://lkml.kernel.org/r/20190715140426.32509-1-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/header.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dde4e732a5b02fa5599c2c0e6c48a0c11789afc4 Author: Andi Kleen Date: Thu Jul 11 11:19:21 2019 -0700 perf script: Fix off by one in brstackinsn IPC computation When we hit the end of a program block, need to count the last instruction too for the IPC computation. This caused large errors for small blocks. % perf script -b ls / > /dev/null Before: % perf script -F +brstackinsn --xed ... 00007f94c9ac70d8 jz 0x7f94c9ac70e3 # PRED 3 cycles [36] 4.33 IPC 00007f94c9ac70e3 testb $0x20, 0x31d(%rbx) 00007f94c9ac70ea jnz 0x7f94c9ac70b0 00007f94c9ac70ec testb $0x8, 0x205ad(%rip) 00007f94c9ac70f3 jz 0x7f94c9ac6ff0 # PRED 1 cycles [37] 3.00 IPC After: % perf script -F +brstackinsn --xed ... 00007f94c9ac70d8 jz 0x7f94c9ac70e3 # PRED 3 cycles [15] 4.67 IPC 00007f94c9ac70e3 testb $0x20, 0x31d(%rbx) 00007f94c9ac70ea jnz 0x7f94c9ac70b0 00007f94c9ac70ec testb $0x8, 0x205ad(%rip) 00007f94c9ac70f3 jz 0x7f94c9ac6ff0 # PRED 1 cycles [16] 4.00 IPC Suggested-by: Denis Bakhvalov Signed-off-by: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190711181922.18765-2-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-script.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7db7218a7ea577f04c2df92453d47ab5ebfc8863 Author: Andi Kleen Date: Thu Jul 11 11:19:22 2019 -0700 perf script: Improve man page description of metrics Clarify that a metric is based on events, not referring to itself. Also some improvements with the sentences. Signed-off-by: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190711181922.18765-3-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-script.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5f8eec3225ff7b86763b060164e9ce47b1a71406 Author: Andi Kleen Date: Thu Jul 11 11:19:20 2019 -0700 perf script: Fix --max-blocks man page description The --max-blocks description was using the old name brstackasm. Use brstackinsn instead. Signed-off-by: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190711181922.18765-1-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-script.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 717dedb1dcee92788b81233aa0a221573c95daff Author: Kai Vehmanen Date: Mon Jul 22 09:14:01 2019 -0500 ASoC: SOF: Intel: hda: remove misleading error trace from IRQ thread Downgrade "nothing to do in IRQ thread" message from error to a debug message in the IPC interrupt handler thread. The spurious wake-up can happen if a HDA stream interrupt is raised while the IPC interrupt thread is running. IPC functionality is not impacted by this condition, so debug is a more appropriate trace level. Signed-off-by: Kai Vehmanen Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20190722141402.7194-21-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/cnl.c | 4 ++-- sound/soc/sof/intel/hda-ipc.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 8201f11a1f75e3aa7d5327d0b1d8cb544aeaa62f Author: Stephan Gerhold Date: Mon Jul 22 15:03:52 2019 +0200 ASoC: qcom: apq8016_sbc: Fix oops with multiple DAI links apq8016_sbc_parse_of() sets up multiple DAI links, depending on the number of nodes in the device tree. However, at the moment CPU and platform components are only allocated for the first link. This causes an oops when more than one link is defined: Internal error: Oops: 96000044 [#1] SMP CPU: 0 PID: 1015 Comm: kworker/0:2 Not tainted 5.3.0-rc1 #4 Call trace: apq8016_sbc_platform_probe+0x1a8/0x3f0 platform_drv_probe+0x50/0xa0 ... Move the allocation inside the loop to ensure that each link is properly initialized. Fixes: 98b232ca9e0e ("ASoC: qcom: apq8016_sbc: use modern dai_link style") Signed-off-by: Stephan Gerhold Acked-by: Kuninori Morimoto Link: https://lore.kernel.org/r/20190722130352.95874-1-stephan@gerhold.net Signed-off-by: Mark Brown sound/soc/qcom/apq8016_sbc.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 3b8179944cb0dd53e5223996966746cdc8a60657 Author: Charles Keepax Date: Mon Jul 22 10:24:36 2019 +0100 ALSA: compress: Be more restrictive about when a drain is allowed Draining makes little sense in the situation of hardware overrun, as the hardware will have consumed all its available samples. Additionally, draining whilst the stream is paused would presumably get stuck as no data is being consumed on the DSP side. Signed-off-by: Charles Keepax Acked-by: Vinod Koul Signed-off-by: Takashi Iwai sound/core/compress_offload.c | 6 ++++++ 1 file changed, 6 insertions(+) commit a70ab8a8645083f3700814e757f2940a88b7ef88 Author: Charles Keepax Date: Mon Jul 22 10:24:35 2019 +0100 ALSA: compress: Don't allow paritial drain operations on capture streams Partial drain and next track are intended for gapless playback and don't really have an obvious interpretation for a capture stream, so makes sense to not allow those operations on capture streams. Signed-off-by: Charles Keepax Acked-by: Vinod Koul Signed-off-by: Takashi Iwai sound/core/compress_offload.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 26c3f1542f5064310ad26794c09321780d00c57d Author: Charles Keepax Date: Mon Jul 22 10:24:34 2019 +0100 ALSA: compress: Prevent bypasses of set_params Currently, whilst in SNDRV_PCM_STATE_OPEN it is possible to call snd_compr_stop, snd_compr_drain and snd_compr_partial_drain, which allow a transition to SNDRV_PCM_STATE_SETUP. The stream should only be able to move to the setup state once it has received a SNDRV_COMPRESS_SET_PARAMS ioctl. Fix this issue by not allowing those ioctls whilst in the open state. Signed-off-by: Charles Keepax Acked-by: Vinod Koul Signed-off-by: Takashi Iwai sound/core/compress_offload.c | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) commit 4475f8c4ab7b248991a60d9c02808dbb813d6be8 Author: Charles Keepax Date: Mon Jul 22 10:24:33 2019 +0100 ALSA: compress: Fix regression on compressed capture streams A previous fix to the stop handling on compressed capture streams causes some knock on issues. The previous fix updated snd_compr_drain_notify to set the state back to PREPARED for capture streams. This causes some issues however as the handling for snd_compr_poll differs between the two states and some user-space applications were relying on the poll failing after the stream had been stopped. To correct this regression whilst still fixing the original problem the patch was addressing, update the capture handling to skip the PREPARED state rather than skipping the SETUP state as it has done until now. Fixes: 4f2ab5e1d13d ("ALSA: compress: Fix stop handling on compressed capture streams") Signed-off-by: Charles Keepax Acked-by: Vinod Koul Signed-off-by: Takashi Iwai include/sound/compress_driver.h | 5 +---- sound/core/compress_offload.c | 16 +++++++++++----- 2 files changed, 12 insertions(+), 9 deletions(-) commit e32db73c5aca895a43061cf6621076aa798530e3 Author: Maxime Ripard Date: Thu Jul 18 21:24:55 2019 +0200 MAINTAINERS: Update my email address Use my kernel.org address instead of the bootlin one. Signed-off-by: Maxime Ripard .mailmap | 2 ++ MAINTAINERS | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) commit 9779048d71b18ea85c067a85b648cebb2d29858e Author: Vasily Gorbik Date: Sun Jul 14 20:49:29 2019 +0200 s390/kasan: add bitops instrumentation Add KASAN instrumentation of architecture-specific asm implementation of bitops. It also covers s390 specific *_inv functions. Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens arch/s390/include/asm/bitops.h | 65 +++++++++++++++++++++++------------------- 1 file changed, 35 insertions(+), 30 deletions(-) commit 0a5c3c2f47667a14cd1a3127160af709e64e67b2 Author: Vasily Gorbik Date: Sun Jul 14 20:49:26 2019 +0200 s390/bitops: make test functions return bool Make s390/bitops test functions return bool values. That enforces return value range to 0 and 1 and matches with asm-generic/bitops-instrumented.h declarations as well as some other architectures implementations. Signed-off-by: Vasily Gorbik Reviewed-by: Christian Borntraeger Signed-off-by: Heiko Carstens arch/s390/include/asm/bitops.h | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) commit 5518aed82d2abd97f8d3ec91d8ba455d939e8cd1 Author: Vasily Gorbik Date: Sun Jul 14 20:49:23 2019 +0200 s390: wire up clone3 system call Tested (64-bit and compat mode) using program from http://lkml.kernel.org/r/20190604212930.jaaztvkent32b7d3@brauner.io with the following: return syscall(__NR_clone, flags, 0, pidfd, 0, 0); changed to: return syscall(__NR_clone, 0, flags, pidfd, 0, 0); due to CLONE_BACKWARDS2. Signed-off-by: Vasily Gorbik Acked-by: Christian Borntraeger Signed-off-by: Heiko Carstens arch/s390/include/asm/unistd.h | 1 + arch/s390/kernel/syscalls/syscall.tbl | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit a963609e27786e2b0a80e649ca78798bf769c5d3 Author: Heiko Carstens Date: Mon Jul 22 14:16:46 2019 +0200 kbuild: enable arch/s390/include/uapi/asm/zcrypt.h for uapi header test Masahiro Yamada changed the zcrypt.h header file to use __u{16,32,64} instead of uint{16,32,64}_t with ("s390: use __u{16,32,64} instead of uint{16,32,64}_t in uapi header"). This makes all s390 header files pass - remove zcrypt.h from the blacklist. Cc: Masahiro Yamada Signed-off-by: Heiko Carstens usr/include/Makefile | 4 ---- 1 file changed, 4 deletions(-) commit 061c996239490a402aa31cd116f71a8bf9db1d8c Author: Masahiro Yamada Date: Sun Jul 21 23:20:08 2019 +0900 s390: use __u{16,32,64} instead of uint{16,32,64}_t in uapi header When CONFIG_UAPI_HEADER_TEST=y, exported headers are compile-tested to make sure they can be included from user-space. Currently, zcrypt.h is excluded from the test coverage. To make it join the compile-test, we need to fix the build errors attached below. For a case like this, we decided to use __u{8,16,32,64} variable types in this discussion: https://lkml.org/lkml/2019/6/5/18 Build log: CC usr/include/asm/zcrypt.h.s In file included from :32:0: ./usr/include/asm/zcrypt.h:163:2: error: unknown type name ‘uint16_t’ uint16_t cprb_len; ^~~~~~~~ ./usr/include/asm/zcrypt.h:168:2: error: unknown type name ‘uint32_t’ uint32_t source_id; ^~~~~~~~ ./usr/include/asm/zcrypt.h:169:2: error: unknown type name ‘uint32_t’ uint32_t target_id; ^~~~~~~~ ./usr/include/asm/zcrypt.h:170:2: error: unknown type name ‘uint32_t’ uint32_t ret_code; ^~~~~~~~ ./usr/include/asm/zcrypt.h:171:2: error: unknown type name ‘uint32_t’ uint32_t reserved1; ^~~~~~~~ ./usr/include/asm/zcrypt.h:172:2: error: unknown type name ‘uint32_t’ uint32_t reserved2; ^~~~~~~~ ./usr/include/asm/zcrypt.h:173:2: error: unknown type name ‘uint32_t’ uint32_t payload_len; ^~~~~~~~ ./usr/include/asm/zcrypt.h:182:2: error: unknown type name ‘uint16_t’ uint16_t ap_id; ^~~~~~~~ ./usr/include/asm/zcrypt.h:183:2: error: unknown type name ‘uint16_t’ uint16_t dom_id; ^~~~~~~~ ./usr/include/asm/zcrypt.h:198:2: error: unknown type name ‘uint16_t’ uint16_t targets_num; ^~~~~~~~ ./usr/include/asm/zcrypt.h:199:2: error: unknown type name ‘uint64_t’ uint64_t targets; ^~~~~~~~ ./usr/include/asm/zcrypt.h:200:2: error: unknown type name ‘uint64_t’ uint64_t weight; ^~~~~~~~ ./usr/include/asm/zcrypt.h:201:2: error: unknown type name ‘uint64_t’ uint64_t req_no; ^~~~~~~~ ./usr/include/asm/zcrypt.h:202:2: error: unknown type name ‘uint64_t’ uint64_t req_len; ^~~~~~~~ ./usr/include/asm/zcrypt.h:203:2: error: unknown type name ‘uint64_t’ uint64_t req; ^~~~~~~~ ./usr/include/asm/zcrypt.h:204:2: error: unknown type name ‘uint64_t’ uint64_t resp_len; ^~~~~~~~ ./usr/include/asm/zcrypt.h:205:2: error: unknown type name ‘uint64_t’ uint64_t resp; ^~~~~~~~ Signed-off-by: Masahiro Yamada Signed-off-by: Heiko Carstens arch/s390/include/uapi/asm/zcrypt.h | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) commit 3f4b04e3cfd40fb779f2404453f53157ec171da5 Author: Christophe JAILLET Date: Sun Jul 21 14:33:21 2019 +0200 s390/hypfs: fix a typo in the name of a function Everything is about hypfs_..., except 'hpyfs_vm_create_guest()' s/hpy/hyp/ Signed-off-by: Christophe JAILLET Signed-off-by: Christian Borntraeger Signed-off-by: Heiko Carstens arch/s390/hypfs/hypfs_vm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit eed341976014c5d0a689febf3fac81a0f730f643 Merge: 69e96207ebf9 4c4cbbaa693a Author: Heiko Carstens Date: Tue Jul 23 10:44:28 2019 +0200 Merge tag 'vfio-ccw-20190717-2' of https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/vfio-ccw into fixes Fixes in vfio-ccw for older and newer issues. commit 69e96207ebf90ff8d5bac457134b0d4569f6634e Author: Julian Wiedmann Date: Mon Jul 1 14:19:29 2019 +0200 s390/qdio: restrict QAOB usage to IQD unicast queues The IQD mcast queue doesn't support QAOB mode, so skip the qdio_enable_async_operation() setup call for this queue. This avoids the allocation of an unneeded QAOB pointer array, and sets up q->use_cq properly so that drivers are prohibited from using QAOBs for mcast traffic. Take this opportunity to streamline the q->use_cq and aob != 0 checks. The path to qdio_siga_output() is straight-forward, we don't need to worry about being called with bad operands. Signed-off-by: Julian Wiedmann Signed-off-by: Heiko Carstens drivers/s390/cio/qdio_main.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit a6ec414a4dd529eeac5c3ea51c661daba3397108 Author: Julian Wiedmann Date: Thu Jul 11 18:17:36 2019 +0200 s390/qdio: add sanity checks to the fast-requeue path If the device driver were to send out a full queue's worth of SBALs, current code would end up discovering the last of those SBALs as PRIMED and erroneously skip the SIGA-w. This immediately stalls the queue. Add a check to not attempt fast-requeue in this case. While at it also make sure that the state of the previous SBAL was successfully extracted before inspecting it. Signed-off-by: Julian Wiedmann Reviewed-by: Jens Remus Signed-off-by: Heiko Carstens drivers/s390/cio/qdio_main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 6abe28197024f732f1e298b1a593505282505857 Author: Vasily Gorbik Date: Mon Jul 15 15:30:33 2019 +0200 s390: enable detection of kernel version from bzImage Extend "parmarea" to include an offset of the version string, which is stored as 8-byte big endian value. To retrieve version string from bzImage reliably, one should check the presence of "S390EP" ascii string at 0x10008 (available since v3.2), then read the version string offset from 0x10428 (which has been 0 since v3.2 up to now). The string is null terminated. Could be retrieved with the following "file" command magic (requires file v5.34): 8 string \x02\x00\x00\x18\x60\x00\x00\x50\x02\x00\x00\x68\x60\x00\x00\x50\x40\x40\x40\x40\x40\x40\x40\x40 Linux S390 >0x10008 string S390EP >>0x10428 bequad >0 >>>(0x10428.Q) string >\0 \b, version %s Reported-by: Petr Tesarik Suggested-by: Petr Tesarik Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens arch/s390/boot/Makefile | 2 +- arch/s390/boot/boot.h | 1 + arch/s390/boot/head.S | 1 + arch/s390/boot/version.c | 7 +++++++ arch/s390/include/asm/setup.h | 4 +++- 5 files changed, 13 insertions(+), 2 deletions(-) commit bca031e2c8aa22a978a2452bf959e27e9fa73dc7 Author: Zenghui Yu Date: Thu Jul 18 08:15:10 2019 +0000 KVM: arm/arm64: Introduce kvm_pmu_vcpu_init() to setup PMU counter index We use "pmc->idx" and the "chained" bitmap to determine if the pmc is chained, in kvm_pmu_pmc_is_chained(). But idx might be uninitialized (and random) when we doing this decision, through a KVM_ARM_VCPU_INIT ioctl -> kvm_pmu_vcpu_reset(). And the test_bit() against this random idx will potentially hit a KASAN BUG [1]. In general, idx is the static property of a PMU counter that is not expected to be modified across resets, as suggested by Julien. It looks more reasonable if we can setup the PMU counter idx for a vcpu in its creation time. Introduce a new function - kvm_pmu_vcpu_init() for this basic setup. Oh, and the KASAN BUG will get fixed this way. [1] https://www.spinics.net/lists/kvm-arm/msg36700.html Fixes: 80f393a23be6 ("KVM: arm/arm64: Support chained PMU counters") Suggested-by: Andrew Murray Suggested-by: Julien Thierry Acked-by: Julien Thierry Signed-off-by: Zenghui Yu Signed-off-by: Marc Zyngier include/kvm/arm_pmu.h | 2 ++ virt/kvm/arm/arm.c | 2 ++ virt/kvm/arm/pmu.c | 18 +++++++++++++++--- 3 files changed, 19 insertions(+), 3 deletions(-) commit 333a2101f47c4360ee78bb827277615d405b1cf7 Author: Takashi Iwai Date: Tue Jul 23 10:11:59 2019 +0200 firmware: Fix missing inline I mistakenly dropped the inline while resolving the patch conflicts in the previous fix patch. Without inline, we get compiler warnings wrt unused functions. Note that Mauro's original patch contained the correct changes; it's all my fault to submit a patch before a morning coffee. Fixes: c8917b8ff09e ("firmware: fix build errors in paged buffer handling code") Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20190723081159.22624-1-tiwai@suse.de Signed-off-by: Greg Kroah-Hartman drivers/base/firmware_loader/firmware.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 201c1db90cd643282185a00770f12f95da330eca Author: Joerg Roedel Date: Tue Jul 23 09:51:00 2019 +0200 iommu/iova: Fix compilation error with !CONFIG_IOMMU_IOVA The stub function for !CONFIG_IOMMU_IOVA needs to be 'static inline'. Fixes: effa467870c76 ('iommu/vt-d: Don't queue_iova() if there is no flush queue') Signed-off-by: Joerg Roedel include/linux/iova.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e0a12445d1cb186d875410d093a00d215bec6a89 Author: Wen Yang Date: Wed Jul 17 11:55:04 2019 +0800 cpufreq/pasemi: fix use-after-free in pas_cpufreq_cpu_init() The cpu variable is still being used in the of_get_property() call after the of_node_put() call, which may result in use-after-free. Fixes: a9acc26b75f6 ("cpufreq/pasemi: fix possible object reference leak") Signed-off-by: Wen Yang Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/pasemi-cpufreq.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) commit 8d0148473dece51675d11dd59b8db5fe4b5d2e7e Author: Lucas Stach Date: Wed Jul 17 11:54:36 2019 +0200 arm64: dts: imx8mq: fix SAI compatible The i.MX8M SAI block is not compatible with the i.MX6SX one, as the register layout has changed due to two version registers being added at the beginning of the address map. Remove the bogus compatible. Fixes: 8c61538dc945 ("arm64: dts: imx8mq: Add SAI2 node") Signed-off-by: Lucas Stach Reviewed-by: Daniel Baluta Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mq.dtsi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c528adefd645f5cd16fff658c863e2142d775c61 Author: Rafael J. Wysocki Date: Mon Jul 22 12:22:57 2019 +0200 int340X/processor_thermal_device: Fix proc_thermal_rapl_remove() Passing 0 to cpuhp_remove_state() triggers the BUG_ON() in __cpuhp_remove_state_cpuslocked() and the argument passed to powercap_unregister_control_type() is expected to be a valid pointer, so avoid calling these functions with incorrect arguments from proc_thermal_rapl_remove(). Fixes: 555c45fe0d04 ("int340X/processor_thermal_device: add support for MMIO RAPL") Signed-off-by: Rafael J. Wysocki Acked-by: Zhang Rui drivers/thermal/intel/int340x_thermal/processor_thermal_device.c | 4 ++++ 1 file changed, 4 insertions(+) commit 52d09014bb104a9157c0f5530700291052d2955c Author: Anson Huang Date: Tue Jul 16 11:09:33 2019 +0800 arm64: dts: imx8mm: Correct SAI3 RXC/TXFS pin's mux option #1 According to i.MX8MM reference manual Rev.1, 03/2019: SAI3_RXC pin's mux option #1 should be GPT1_CLK, NOT GPT1_CAPTURE2; SAI3_TXFS pin's mux option #1 should be GPT1_CAPTURE2, NOT GPT1_CLK. Fixes: c1c9d41319c3 ("dt-bindings: imx: Add pinctrl binding doc for imx8mm") Signed-off-by: Anson Huang Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mm-pinfunc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b3e487c0cf425369a48049251af75593a5652dc1 Author: David S. Miller Date: Mon Jul 22 20:44:48 2019 -0700 Revert "net: hns: fix LED configuration for marvell phy" This reverts commit f4e5f775db5a4631300dccd0de5eafb50a77c131. Andrew Lunn says this should be handled another way. Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_enet.c | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) commit 1b5d9a6e98350e0713b4faa1b04e8f239f63b581 Author: Christoph Hellwig Date: Mon Jul 22 11:20:38 2019 +0200 scsi: core: fix the dma_max_mapping_size call We should only call dma_max_mapping_size for devices that have a DMA mask set, otherwise we can run into a NULL pointer dereference that will crash the system. Also we need to do right shift to get the sectors from the size in bytes, not a left shift. Fixes: bdd17bdef7d8 ("scsi: core: take the DMA max mapping size into account") Reported-by: Bart Van Assche Reported-by: Ming Lei Tested-by: Guilherme G. Piccoli Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/scsi_lib.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e70bdd81bfe230a1044eaa49f7d9c9450178d635 Author: Arnd Bergmann Date: Mon Jul 22 14:19:08 2019 +0200 scsi: fdomain: fix building pcmcia front-end We get a warning when CONFIG_SCSI_LOWLEVEL is disabled here: WARNING: unmet direct dependencies detected for SCSI_FDOMAIN Depends on [n]: SCSI_LOWLEVEL [=n] && SCSI [=y] Selected by [m]: - PCMCIA_FDOMAIN [=m] && SCSI_LOWLEVEL_PCMCIA [=y] && SCSI [=y] && PCMCIA [=y] && m && MODULES [=y] Move all of SCSI_LOWLEVEL_PCMCIA inside of the existing SCSI_LOWLEVEL section. Very few people use the PCMCIA support these days, and they likely don't mind having to turn on SCSI_LOWLEVEL as well. This way we avoid the link error and get a more sensible structure. Fixes: 7d47fa065e62 ("scsi: fdomain: Add PCMCIA support") Signed-off-by: Arnd Bergmann Signed-off-by: Martin K. Petersen drivers/scsi/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit df7699c70c1bc1d9333d610fdc91fbbad84b59f2 Author: Jose Abreu Date: Mon Jul 22 16:07:21 2019 +0200 net: stmmac: Do not cut down 1G modes Some glue logic drivers support 1G without having GMAC/GMAC4/XGMAC. Let's allow this speed by default. Reported-by: Ondrej Jirman Tested-by: Ondrej Jirman Fixes: 5b0d7d7da64b ("net: stmmac: Add the missing speeds that XGMAC supports") Signed-off-by: Jose Abreu Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 01ad7facb68f6dc309eb344c0d1d19b33df8cff6 Merge: f4e5f775db5a ec5e5ce1e18b Author: David S. Miller Date: Mon Jul 22 18:23:32 2019 -0700 Merge branch 'stmmac-fixes' Jose Abreu says: ==================== net: stmmac: Two fixes Two fixes targeting -net. ==================== Signed-off-by: David S. Miller commit ec5e5ce1e18b44d0c4779619de3552e0afa5a11d Author: Jose Abreu Date: Mon Jul 22 10:39:31 2019 +0200 net: stmmac: Use kcalloc() instead of kmalloc_array() We need the memory to be zeroed upon allocation so use kcalloc() instead. Signed-off-by: Jose Abreu Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit cbcf0999ae33e7a8e1dba7ca935556634f679ccf Author: Jose Abreu Date: Mon Jul 22 10:39:30 2019 +0200 net: stmmac: RX Descriptors need to be clean before setting buffers RX Descriptors are being cleaned after setting the buffers which may lead to buffer addresses being wiped out. Fix this by clearing earlier the RX Descriptors. Fixes: 2af6106ae949 ("net: stmmac: Introducing support for Page Pool") Signed-off-by: Jose Abreu Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f4e5f775db5a4631300dccd0de5eafb50a77c131 Author: Yonglong Liu Date: Mon Jul 22 13:59:12 2019 +0800 net: hns: fix LED configuration for marvell phy Since commit(net: phy: marvell: change default m88e1510 LED configuration), the active LED of Hip07 devices is always off, because Hip07 just use 2 LEDs. This patch adds a phy_register_fixup_for_uid() for m88e1510 to correct the LED configuration. Fixes: 077772468ec1 ("net: phy: marvell: change default m88e1510 LED configuration") Signed-off-by: Yonglong Liu Reviewed-by: linyunsheng Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_enet.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) commit bba18318e7d1d5c8b0bbafd65010a0cee3c65608 Author: Maxime Chevallier Date: Fri Jul 19 16:38:48 2019 +0200 net: mvpp2: Don't check for 3 consecutive Idle frames for 10G links PPv2's XLGMAC can wait for 3 idle frames before triggering a link up event. This can cause the link to be stuck low when there's traffic on the interface, so disable this feature. Fixes: 4bb043262878 ("net: mvpp2: phylink support") Signed-off-by: Maxime Chevallier Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e1f1ae8002e4b06addc52443fcd975bbf554ae92 Author: Geert Uytterhoeven Date: Thu Jul 11 15:03:59 2019 +0200 clk: renesas: cpg-mssr: Fix reset control race condition The module reset code in the Renesas CPG/MSSR driver uses read-modify-write (RMW) operations to write to a Software Reset Register (SRCRn), and simple writes to write to a Software Reset Clearing Register (SRSTCLRn), as was mandated by the R-Car Gen2 and Gen3 Hardware User's Manuals. However, this may cause a race condition when two devices are reset in parallel: if the reset for device A completes in the middle of the RMW operation for device B, device A may be reset again, causing subtle failures (e.g. i2c timeouts): thread A thread B -------- -------- val = SRCRn val |= bit A SRCRn = val delay val = SRCRn (bit A is set) SRSTCLRn = bit A (bit A in SRCRn is cleared) val |= bit B SRCRn = val (bit A and B are set) This can be reproduced on e.g. Salvator-XS using: $ while true; do i2cdump -f -y 4 0x6A b > /dev/null; done & $ while true; do i2cdump -f -y 2 0x10 b > /dev/null; done & i2c-rcar e6510000.i2c: error -110 : 40000002 i2c-rcar e66d8000.i2c: error -110 : 40000002 According to the R-Car Gen3 Hardware Manual Errata for Rev. 0.80 of Feb 28, 2018, reflected in Rev. 1.00 of the R-Car Gen3 Hardware User's Manual, writes to SRCRn do not require read-modify-write cycles. Note that the R-Car Gen2 Hardware User's Manual has not been updated yet, and still says a read-modify-write sequence is required. According to the hardware team, the reset hardware block is the same on both R-Car Gen2 and Gen3, though. Hence fix the issue by replacing the read-modify-write operations on SRCRn by simple writes. Reported-by: Yao Lihua Fixes: 6197aa65c4905532 ("clk: renesas: cpg-mssr: Add support for reset control") Signed-off-by: Geert Uytterhoeven Tested-by: Linh Phung Signed-off-by: Stephen Boyd drivers/clk/renesas/renesas-cpg-mssr.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) commit c9a67cbb5189e966c70451562b2ca4c3876ab546 Author: Chunyan Zhang Date: Thu Jul 18 13:36:16 2019 +0800 clk: sprd: Select REGMAP_MMIO to avoid compile errors Make REGMAP_MMIO selected to avoid undefined reference to regmap symbols. Fixes: d41f59fd92f2 ("clk: sprd: Add common infrastructure") Signed-off-by: Chunyan Zhang Signed-off-by: Stephen Boyd drivers/clk/sprd/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 26091eef3c179f940d2967e9bef6e22c9e1c445f Author: Yash Shah Date: Fri Jul 19 16:40:31 2019 +0530 riscv: dts: Add DT node for SiFive FU540 Ethernet controller driver DT node for SiFive FU540-C000 GEMGXL Ethernet controller driver added Signed-off-by: Yash Shah Reviewed-by: Sagar Kadam Cc: Andrew Lunn [paul.walmsley@sifive.com: changed "phy1" to "phy0" at Andrew Lunn's suggestion] Signed-off-by: Paul Walmsley arch/riscv/boot/dts/sifive/fu540-c000.dtsi | 15 +++++++++++++++ arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts | 9 +++++++++ 2 files changed, 24 insertions(+) commit c93d059a80450af99dd6c0e8c36790579343675a Author: Weiyi Lu Date: Fri Jun 28 15:22:34 2019 +0800 clk: mediatek: mt8183: Register 13MHz clock earlier for clocksource The 13MHz clock should be registered before clocksource driver is initialized. Use CLK_OF_DECLARE_DRIVER() to guarantee. Fixes: acddfc2c261b ("clk: mediatek: Add MT8183 clock support") Cc: Signed-off-by: Weiyi Lu Signed-off-by: Stephen Boyd drivers/clk/mediatek/clk-mt8183.c | 46 +++++++++++++++++++++++++++++---------- 1 file changed, 34 insertions(+), 12 deletions(-) commit 6ee82ef04e38b0d8b09b04bc1b068673deed6582 Author: Sylwester Nawrocki Date: Mon Jul 1 13:46:51 2019 +0200 clk: Add missing documentation of devm_clk_bulk_get_optional() argument Fix an incomplete devm_clk_bulk_get_optional() function documentation by adding description of the num_clks argument as in other *clk_bulk* functions. Fixes: 9bd5ef0bd874 ("clk: Add devm_clk_bulk_get_optional() function") Reported-by: kbuild test robot Signed-off-by: Sylwester Nawrocki Signed-off-by: Stephen Boyd include/linux/clk.h | 1 + 1 file changed, 1 insertion(+) commit 1573eebeaa8055777eb753f9b4d1cbe653380c38 Author: Codrin Ciubotariu Date: Tue Jun 25 12:10:02 2019 +0300 clk: at91: generated: Truncate divisor to GENERATED_MAX_DIV + 1 In clk_generated_determine_rate(), if the divisor is greater than GENERATED_MAX_DIV + 1, then the wrong best_rate will be returned. If clk_generated_set_rate() will be called later with this wrong rate, it will return -EINVAL, so the generated clock won't change its value. Do no let the divisor be greater than GENERATED_MAX_DIV + 1. Fixes: 8c7aa6328947 ("clk: at91: clk-generated: remove useless divisor loop") Signed-off-by: Codrin Ciubotariu Acked-by: Nicolas Ferre Acked-by: Ludovic Desroches Signed-off-by: Stephen Boyd drivers/clk/at91/clk-generated.c | 2 ++ 1 file changed, 2 insertions(+) commit 985eaf99eb180a9a194ef2787cc03682c7ad615b Author: Varun Prakash Date: Mon Jun 17 18:47:45 2019 +0530 scsi: target: cxgbit: add support for IEEE_8021QAZ_APP_SEL_STREAM selector IEEE_8021QAZ_APP_SEL_STREAM is a valid selector for iSCSI connections, so add code to use IEEE_8021QAZ_APP_SEL_STREAM selector to get priority mask. Signed-off-by: Varun Prakash Signed-off-by: Martin K. Petersen drivers/target/iscsi/cxgbit/cxgbit_cm.c | 8 +++++--- drivers/target/iscsi/cxgbit/cxgbit_main.c | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) commit 2b607f7088f915e561225311ff6f9f3dc23411c5 Author: Federico Vaga Date: Fri Jul 12 11:48:22 2019 +0200 doc:it_IT: translations in process/ This patch add translations for: - programming-languages - kernel-docs (It is better to not translate this since English is a requirement to get something useful out of it) Signed-off-by: Federico Vaga Signed-off-by: Jonathan Corbet Documentation/translations/it_IT/process/index.rst | 1 + .../translations/it_IT/process/kernel-docs.rst | 11 +++-- .../it_IT/process/programming-language.rst | 51 ++++++++++++++++++++++ 3 files changed, 60 insertions(+), 3 deletions(-) commit 74af0d0be1d76d407ebda3b357108111bd62ff3e Author: Jeremy Cline Date: Tue Jul 16 10:49:08 2019 -0400 docs/vm: transhuge: fix typo in madvise reference Fix an off-by-one typo in the transparent huge pages admin documentation. Signed-off-by: Jeremy Cline Acked-by: Mike Rapoport Signed-off-by: Jonathan Corbet Documentation/admin-guide/mm/transhuge.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1bcff32679f60fe2387f63f22b8b35375052bcb0 Author: Alex Deucher Date: Thu Jul 18 15:25:04 2019 -0500 drm/amdgpu/smu: move fan rpm query into the asic specific code On vega20, there is an SMU message to query it. On navi, it's fetched from the metrics table. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 4 ++-- drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 6 +++--- drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 12 +++++++----- drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 18 ------------------ drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 20 +++++++++++++++++++- 5 files changed, 31 insertions(+), 29 deletions(-) commit b840e4d5fec6fe2019de36b10412b69df9c4d39a Author: Kevin Wang Date: Fri Jul 19 11:39:21 2019 +0800 drm/amd/powerplay: custom peak clock freq for navi10 v2: add function smu_default_set_performance_level as default dpm level handler. change function name smu_set_performance_level to smu_asic_set_performance_level v1: 1.NAVI10_PEAK_SCLK_XTX 1830 Mhz 2.NAVI10_PEAK_SCLK_XT 1755 Mhz 3.NAVI10_PEAK_SCLK_XL 1625 Mhz Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Reviewed-by: Kenneth Feng Reviewed-by: Evan Quan Reviewed-by: Jack Gui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 73 ++++++++++++++------------ drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 4 ++ drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 55 +++++++++++++++++++ drivers/gpu/drm/amd/powerplay/navi10_ppt.h | 4 ++ 4 files changed, 103 insertions(+), 33 deletions(-) commit 251a44888183003b0380df184835a2c00bfa39d7 Author: Wesley Terpstra Date: Mon May 20 10:29:26 2019 -0700 riscv: include generic support for MSI irqdomains Some RISC-V systems include PCIe host controllers that support PCIe message-signaled interrupts. For this to work on Linux, we need to enable PCI_MSI_IRQ_DOMAIN and define struct msi_alloc_info. Support for the latter is enabled by including the architecture-generic msi.h include. Signed-off-by: Wesley Terpstra [paul.walmsley@sifive.com: split initial patch into one arch/riscv patch and one drivers/pci patch] Signed-off-by: Paul Walmsley arch/riscv/include/asm/Kbuild | 1 + 1 file changed, 1 insertion(+) commit bbb6fc43f131f77fcb7ae8081f6d7c51396a2120 Author: Qian Cai Date: Mon Jul 22 15:14:46 2019 -0400 drm: silence variable 'conn' set but not used The "struct drm_connector" iteration cursor from "for_each_new_connector_in_state" is never used in atomic_remove_fb() which generates a compilation warning, drivers/gpu/drm/drm_framebuffer.c: In function 'atomic_remove_fb': drivers/gpu/drm/drm_framebuffer.c:838:24: warning: variable 'conn' set but not used [-Wunused-but-set-variable] Silence it by marking "conn" __maybe_unused. Signed-off-by: Qian Cai Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/1563822886-13570-1-git-send-email-cai@lca.pw drivers/gpu/drm/drm_framebuffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f4da5d074c8e51fcafd44889bf1caaa6a71ed6d9 Author: Palmer Dabbelt Date: Thu Jun 27 17:27:53 2019 -0700 MAINTAINERS: Add Paul as a RISC-V maintainer The RISC-V port has grown significantly over the past year. Paul's been helping out for a while ago. We agreed in person that he'd take over collecting the patches and submitting the PRs, but it looks like I forgot to make it official. Signed-off-by: Palmer Dabbelt Signed-off-by: Paul Walmsley MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 48ffc3d12b55bed8d9452a89bc13de4864dc3106 Merge: 143134ba4983 d6f0f2f19a9e Author: Jonathan Corbet Date: Mon Jul 22 13:51:20 2019 -0600 Merge branch 'pdf_fixes_v1' of https://git.linuxtv.org/mchehab/experimental into mauro Bring in a set of post-thrashup fixes from Mauro. commit 143134ba498327e3d389e10f55f56e9c37257c7c Author: Federico Vaga Date: Thu Jul 18 09:47:54 2019 +0200 doc:it_IT: rephrase statement The statement sounds more like a literal translation Signed-off-by: Federico Vaga Signed-off-by: Jonathan Corbet Documentation/translations/it_IT/doc-guide/sphinx.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5adcce34f8a3880a7b3b1cfd90b094d8a931bbae Author: Federico Vaga Date: Thu Jul 18 09:47:24 2019 +0200 doc:it_IT: align translation to mainline The patch translates the following patches in Italian: d9d7c0c497b8 docs: Note that :c:func: should no longer be used 83e8b971f81c sphinx.rst: Add note about code snippets embedded in the text cca5e0b8a430 Documentation: PGP: update for newer HW devices Signed-off-by: Federico Vaga Signed-off-by: Jonathan Corbet .../translations/it_IT/doc-guide/sphinx.rst | 17 +++++++++------ .../it_IT/process/maintainer-pgp-guide.rst | 25 ++++++++++++++-------- 2 files changed, 26 insertions(+), 16 deletions(-) commit e27a24210aa17b8a0cd462865130fe73afd7e001 Merge: 224d5fd43d25 5f9e832c1370 Author: Jonathan Corbet Date: Mon Jul 22 13:42:10 2019 -0600 Merge tag 'v5.3-rc1' into docs-next Pull in all of the massive docs changes from elsewhere. commit f7af86ccf1882084293b11077deec049fd01da63 Author: Sven Eckelmann Date: Sun Jul 7 23:04:57 2019 +0200 batman-adv: Fix deletion of RTR(4|6) mcast list entries The multicast code uses the lists bat_priv->mcast.want_all_rtr*_list to store all all originator nodes which don't have the flag no-RTR4 or no-RTR6 set. When an originator is purged, it has to be removed from these lists. Since all entries without the BATADV_MCAST_WANT_NO_RTR4/6 are stored in these lists, they have to be handled like entries which have these flags set to force the update routines to remove them from the lists when purging the originator. Not doing so will leave a pointer to a freed memory region inside the list. Trying to operate on these lists will then cause an use-after-free error: BUG: KASAN: use-after-free in batadv_mcast_want_rtr4_update+0x335/0x3a0 [batman_adv] Write of size 8 at addr ffff888007b41a38 by task swapper/0/0 Fixes: 61caf3d109f5 ("batman-adv: mcast: detect, distribute and maintain multicast router presence") Signed-off-by: Sven Eckelmann Acked-by: Linus Lüssing Signed-off-by: Simon Wunderlich net/batman-adv/multicast.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit fa3a03da549a889fc9dbc0d3c5908eb7882cac8f Author: Sven Eckelmann Date: Sun Jul 7 22:15:13 2019 +0200 batman-adv: Fix netlink dumping of all mcast_flags buckets The bucket variable is only updated outside the loop over the mcast_flags buckets. It will only be updated during a dumping run when the dumping has to be interrupted and a new message has to be started. This could result in repeated or missing entries when the multicast flags are dumped to userspace. Fixes: d2d489b7d851 ("batman-adv: Add inconsistent multicast netlink dump detection") Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/multicast.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 12185dfe44360f814ac4ead9d22ad2af7511b2e9 Author: Thomas Falcon Date: Tue Jul 16 17:25:10 2019 -0500 bonding: Force slave speed check after link state recovery for 802.3ad The following scenario was encountered during testing of logical partition mobility on pseries partitions with bonded ibmvnic adapters in LACP mode. 1. Driver receives a signal that the device has been swapped, and it needs to reset to initialize the new device. 2. Driver reports loss of carrier and begins initialization. 3. Bonding driver receives NETDEV_CHANGE notifier and checks the slave's current speed and duplex settings. Because these are unknown at the time, the bond sets its link state to BOND_LINK_FAIL and handles the speed update, clearing AD_PORT_LACP_ENABLE. 4. Driver finishes recovery and reports that the carrier is on. 5. Bond receives a new notification and checks the speed again. The speeds are valid but miimon has not altered the link state yet. AD_PORT_LACP_ENABLE remains off. Because the slave's link state is still BOND_LINK_FAIL, no further port checks are made when it recovers. Though the slave devices are operational and have valid speed and duplex settings, the bond will not send LACPDU's. The simplest fix I can see is to force another speed check in bond_miimon_commit. This way the bond will update AD_PORT_LACP_ENABLE if needed when transitioning from BOND_LINK_FAIL to BOND_LINK_UP. CC: Jarod Wilson CC: Jay Vosburgh CC: Veaceslav Falico CC: Andy Gospodarek Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 0036bc73ccbe7e600a3468bf8e8879b122252274 Author: Rob Clark Date: Sun Jun 30 05:47:22 2019 -0700 drm/msm: stop abusing dma_map/unmap for cache Recently splats like this started showing up: WARNING: CPU: 4 PID: 251 at drivers/iommu/dma-iommu.c:451 __iommu_dma_unmap+0xb8/0xc0 Modules linked in: ath10k_snoc ath10k_core fuse msm ath mac80211 uvcvideo cfg80211 videobuf2_vmalloc videobuf2_memops vide CPU: 4 PID: 251 Comm: kworker/u16:4 Tainted: G W 5.2.0-rc5-next-20190619+ #2317 Hardware name: LENOVO 81JL/LNVNB161216, BIOS 9UCN23WW(V1.06) 10/25/2018 Workqueue: msm msm_gem_free_work [msm] pstate: 80c00005 (Nzcv daif +PAN +UAO) pc : __iommu_dma_unmap+0xb8/0xc0 lr : __iommu_dma_unmap+0x54/0xc0 sp : ffff0000119abce0 x29: ffff0000119abce0 x28: 0000000000000000 x27: ffff8001f9946648 x26: ffff8001ec271068 x25: 0000000000000000 x24: ffff8001ea3580a8 x23: ffff8001f95ba010 x22: ffff80018e83ba88 x21: ffff8001e548f000 x20: fffffffffffff000 x19: 0000000000001000 x18: 00000000c00001fe x17: 0000000000000000 x16: 0000000000000000 x15: ffff000015b70068 x14: 0000000000000005 x13: 0003142cc1be1768 x12: 0000000000000001 x11: ffff8001f6de9100 x10: 0000000000000009 x9 : ffff000015b78000 x8 : 0000000000000000 x7 : 0000000000000001 x6 : fffffffffffff000 x5 : 0000000000000fff x4 : ffff00001065dbc8 x3 : 000000000000000d x2 : 0000000000001000 x1 : fffffffffffff000 x0 : 0000000000000000 Call trace: __iommu_dma_unmap+0xb8/0xc0 iommu_dma_unmap_sg+0x98/0xb8 put_pages+0x5c/0xf0 [msm] msm_gem_free_work+0x10c/0x150 [msm] process_one_work+0x1e0/0x330 worker_thread+0x40/0x438 kthread+0x12c/0x130 ret_from_fork+0x10/0x18 ---[ end trace afc0dc5ab81a06bf ]--- Not quite sure what triggered that, but we really shouldn't be abusing dma_{map,unmap}_sg() for cache maint. Cc: Stephen Boyd Tested-by: Stephen Boyd Reviewed-by: Jordan Crouse Signed-off-by: Rob Clark Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190630124735.27786-1-robdclark@gmail.com drivers/gpu/drm/msm/msm_gem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit af0653d56657340a80622aeb96707f7fc8506225 Author: Mao Wenan Date: Fri Jul 19 09:29:38 2019 +0800 RDMA/siw: Remove set but not used variables 'rv' Fixes gcc '-Wunused-but-set-variable' warning: drivers/infiniband/sw/siw/siw_cm.c: In function siw_cep_set_inuse: drivers/infiniband/sw/siw/siw_cm.c:223:6: warning: variable rv set but not used [-Wunused-but-set-variable] Fixes: 6c52fdc244b5 ("rdma/siw: connection management") Link: https://lore.kernel.org/r/20190719012938.100628-1-maowenan@huawei.com Signed-off-by: Mao Wenan Reviewed-by: Bernard Metzler Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/siw/siw_cm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit b7f406bb883ba7ac3222298f6b44cebc4cfe2dde Author: Chuhong Yuan Date: Wed Jul 17 16:21:01 2019 +0800 IB/mlx5: Replace kfree with kvfree Memory allocated by kvzalloc should not be freed by kfree(), use kvfree() instead. Fixes: 813e90b1aeaa ("IB/mlx5: Add advise_mr() support") Link: https://lore.kernel.org/r/20190717082101.14196-1-hslester96@gmail.com Signed-off-by: Chuhong Yuan Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/odp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c56b593d2af4cbd189c6af5fd6790728fade80cc Author: Selvin Xavier Date: Mon Jul 15 05:19:13 2019 -0400 RDMA/bnxt_re: Honor vlan_id in GID entry comparison A GID entry consists of GID, vlan, netdev and smac. Extend GID duplicate check comparisons to consider vlan_id as well to support IPv6 VLAN based link local addresses. Introduce a new structure (bnxt_qplib_gid_info) to hold gid and vlan_id information. The issue is discussed in the following thread https://lore.kernel.org/r/AM0PR05MB4866CFEDCDF3CDA1D7D18AA5D1F20@AM0PR05MB4866.eurprd05.prod.outlook.com Fixes: 823b23da7113 ("IB/core: Allow vlan link local address based RoCE GIDs") Cc: # v5.2+ Link: https://lore.kernel.org/r/20190715091913.15726-1-selvin.xavier@broadcom.com Reported-by: Yi Zhang Co-developed-by: Parav Pandit Signed-off-by: Parav Pandit Signed-off-by: Selvin Xavier Tested-by: Yi Zhang Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/bnxt_re/ib_verbs.c | 7 +++++-- drivers/infiniband/hw/bnxt_re/qplib_res.c | 13 +++++++++---- drivers/infiniband/hw/bnxt_re/qplib_res.h | 2 +- drivers/infiniband/hw/bnxt_re/qplib_sp.c | 14 +++++++++----- drivers/infiniband/hw/bnxt_re/qplib_sp.h | 7 ++++++- 5 files changed, 30 insertions(+), 13 deletions(-) commit f4d46119f214f9a7620b0d18b153d7e0e8c90b4f Author: Kaike Wan Date: Mon Jul 15 12:45:40 2019 -0400 IB/hfi1: Drop all TID RDMA READ RESP packets after r_next_psn When a TID sequence error occurs while receiving TID RDMA READ RESP packets, all packets after flow->flow_state.r_next_psn should be dropped, including those response packets for subsequent segments. The current implementation will drop the subsequent response packets for the segment to complete next, but may accept packets for subsequent segments and therefore mistakenly advance the r_next_psn fields for the corresponding software flows. This may result in failures to complete subsequent segments after the current segment is completed. The fix is to only use the flow pointed by req->clear_tail for checking KDETH PSN instead of finding a flow from the request's flow array. Fixes: b885d5be9ca1 ("IB/hfi1: Unify the software PSN check for TID RDMA READ/WRITE") Cc: Link: https://lore.kernel.org/r/20190715164540.74174.54702.stgit@awfm-01.aw.intel.com Reviewed-by: Mike Marciniszyn Signed-off-by: Kaike Wan Signed-off-by: Mike Marciniszyn Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hfi1/tid_rdma.c | 42 +---------------------------------- 1 file changed, 1 insertion(+), 41 deletions(-) commit dc25b239ebeaa3c58e5ceaa732140427d386aa16 Author: Kaike Wan Date: Mon Jul 15 12:45:34 2019 -0400 IB/hfi1: Field not zero-ed when allocating TID flow memory The field flow->resync_npkts is added for TID RDMA WRITE request and zero-ed when a TID RDMA WRITE RESP packet is received by the requester. This field is used to rewind a request during retry in the function hfi1_tid_rdma_restart_req() shared by both TID RDMA WRITE and TID RDMA READ requests. Therefore, when a TID RDMA READ request is retried, this field may not be initialized at all, which causes the retry to start at an incorrect psn, leading to the drop of the retry request by the responder. This patch fixes the problem by zeroing out the field when the flow memory is allocated. Fixes: 838b6fd2d9ca ("IB/hfi1: TID RDMA RcvArray programming and TID allocation") Cc: Link: https://lore.kernel.org/r/20190715164534.74174.6177.stgit@awfm-01.aw.intel.com Reviewed-by: Mike Marciniszyn Signed-off-by: Kaike Wan Signed-off-by: Mike Marciniszyn Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hfi1/tid_rdma.c | 1 + 1 file changed, 1 insertion(+) commit 2b74c878b0eae4c32629c2d5ba69a29f69048313 Author: Kaike Wan Date: Mon Jul 15 12:45:28 2019 -0400 IB/hfi1: Unreserve a flushed OPFN request When an OPFN request is flushed, the request is completed without unreserving itself from the send queue. Subsequently, when a new request is post sent, the following warning will be triggered: WARNING: CPU: 4 PID: 8130 at rdmavt/qp.c:1761 rvt_post_send+0x72a/0x880 [rdmavt] Call Trace: [] dump_stack+0x19/0x1b [] __warn+0xd8/0x100 [] warn_slowpath_null+0x1d/0x20 [] rvt_post_send+0x72a/0x880 [rdmavt] [] ? account_entity_dequeue+0xae/0xd0 [] ? __kmalloc+0x55/0x230 [] ib_uverbs_post_send+0x37c/0x5d0 [ib_uverbs] [] ? rdma_lookup_put_uobject+0x26/0x60 [ib_uverbs] [] ib_uverbs_write+0x286/0x460 [ib_uverbs] [] ? security_file_permission+0x27/0xa0 [] vfs_write+0xc0/0x1f0 [] SyS_write+0x7f/0xf0 [] system_call_fastpath+0x22/0x27 This patch fixes the problem by moving rvt_qp_wqe_unreserve() into rvt_qp_complete_swqe() to simplify the code and make it less error-prone. Fixes: ca95f802ef51 ("IB/hfi1: Unreserve a reserved request when it is completed") Link: https://lore.kernel.org/r/20190715164528.74174.31364.stgit@awfm-01.aw.intel.com Cc: Reviewed-by: Mike Marciniszyn Reviewed-by: Dennis Dalessandro Signed-off-by: Kaike Wan Signed-off-by: Mike Marciniszyn Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hfi1/rc.c | 2 -- include/rdma/rdmavt_qp.h | 9 ++++----- 2 files changed, 4 insertions(+), 7 deletions(-) commit cd48a82087231fdba0e77521102386c6ed0168d6 Author: John Fleck Date: Mon Jul 15 12:45:21 2019 -0400 IB/hfi1: Check for error on call to alloc_rsm_map_table The call to alloc_rsm_map_table does not check if the kmalloc fails. Check for a NULL on alloc, and bail if it fails. Fixes: 372cc85a13c9 ("IB/hfi1: Extract RSM map table init from QOS") Link: https://lore.kernel.org/r/20190715164521.74174.27047.stgit@awfm-01.aw.intel.com Cc: Reviewed-by: Mike Marciniszyn Signed-off-by: John Fleck Signed-off-by: Mike Marciniszyn Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hfi1/chip.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 2e7b801eadbf327bf61041c943e5c44a5de4b0e5 Author: Shubhashree Dhar Date: Mon Jun 24 11:57:12 2019 +0530 drm/msm/dpu: Correct dpu encoder spinlock initialization dpu encoder spinlock should be initialized during dpu encoder init instead of dpu encoder setup which is part of modeset init. Signed-off-by: Shubhashree Dhar [seanpaul resolved conflict in old init removal and revised the commit message] Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/1561357632-15361-1-git-send-email-dhar@codeaurora.org drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 60c3becfd1a138fdcfe48f2a5ef41ef0078d481e Author: Xi Wang Date: Thu Jul 11 09:32:17 2019 +0800 RDMA/hns: Fix sg offset non-zero issue When run perftest in many times, the system will report a BUG as follows: BUG: Bad rss-counter state mm:(____ptrval____) idx:0 val:-1 BUG: Bad rss-counter state mm:(____ptrval____) idx:1 val:1 We tested with different kernel version and found it started from the the following commit: commit d10bcf947a3e ("RDMA/umem: Combine contiguous PAGE_SIZE regions in SGEs") In this commit, the sg->offset is always 0 when sg_set_page() is called in ib_umem_get() and the drivers are not allowed to change the sgl, otherwise it will get bad page descriptor when unfolding SGEs in __ib_umem_release() as sg_page_count() will get wrong result while sgl->offset is not 0. However, there is a weird sgl usage in the current hns driver, the driver modified sg->offset after calling ib_umem_get(), which caused we iterate past the wrong number of pages in for_each_sg_page iterator. This patch fixes it by correcting the non-standard sgl usage found in the hns_roce_db_map_user() function. Fixes: d10bcf947a3e ("RDMA/umem: Combine contiguous PAGE_SIZE regions in SGEs") Fixes: 0425e3e6e0c7 ("RDMA/hns: Support flush cqe for hip08 in kernel space") Link: https://lore.kernel.org/r/1562808737-45723-1-git-send-email-oulijun@huawei.com Signed-off-by: Xi Wang Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hns/hns_roce_db.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 7af5cdb158f3398a3220bd2fe81cec8d2be9317c Author: Brian Masney Date: Wed Jun 26 22:05:15 2019 -0400 drm/msm: correct NULL pointer dereference in context_init Correct attempted NULL pointer dereference in context_init() when running without an IOMMU. Reviewed-by: Rob Clark Signed-off-by: Brian Masney Fixes: 295b22ae596c ("drm/msm: Pass the MMU domain index in struct msm_file_private") Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190627020515.5660-1-masneyb@onstation.org drivers/gpu/drm/msm/msm_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d5121ffebc38a16b2419b664e466a2f3e5c7b457 Author: Wei Yongjun Date: Thu Jul 18 09:27:10 2019 +0000 RDMA/siw: Fix error return code in siw_init_module() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: bdcf26bf9b3a ("rdma/siw: network and RDMA core interface") Link: https://lore.kernel.org/r/20190718092710.85709-1-weiyongjun1@huawei.com Signed-off-by: Wei Yongjun Reviewed-by: Bernard Metzler Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/siw/siw_main.c | 1 + 1 file changed, 1 insertion(+) commit 45004d66f2a28d78f543fb2ffbc133e31dc2d162 Author: Wenwen Wang Date: Mon Jul 22 08:57:44 2019 -0500 ASoC: dapm: fix a memory leak bug In snd_soc_dapm_new_control_unlocked(), a kernel buffer is allocated in dapm_cnew_widget() to hold the new dapm widget. Then, different actions are taken according to the id of the widget, i.e., 'w->id'. If any failure occurs during this process, snd_soc_dapm_new_control_unlocked() should be terminated by going to the 'request_failed' label. However, the allocated kernel buffer is not freed on this code path, leading to a memory leak bug. To fix the above issue, free the buffer before returning from snd_soc_dapm_new_control_unlocked() through the 'request_failed' label. Signed-off-by: Wenwen Wang Link: https://lore.kernel.org/r/1563803864-2809-1-git-send-email-wang6495@umn.edu Signed-off-by: Mark Brown sound/soc/soc-dapm.c | 2 ++ 1 file changed, 2 insertions(+) commit 7b5cf701ea9c395c792e2a7e3b7caf4c68b87721 Merge: 44b912cd0b55 b8d3349803ba Author: Linus Torvalds Date: Mon Jul 22 09:30:34 2019 -0700 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull preemption Kconfig fix from Thomas Gleixner: "The PREEMPT_RT stub config renamed PREEMPT to PREEMPT_LL and defined PREEMPT outside of the menu and made it selectable by both PREEMPT_LL and PREEMPT_RT. Stupid me missed that 114 defconfigs select CONFIG_PREEMPT which obviously can't work anymore. oldconfig builds are affected as well, but it's more obvious as the user gets asked. [old]defconfig silently fixes it up and selects PREEMPT_NONE. Unbreak it by undoing the rename and adding a intermediate config symbol which is selected by both PREEMPT and PREEMPT_RT. That requires to chase down a few #ifdefs, but it's better than tweaking 114 defconfigs and annoying users" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/rt, Kconfig: Unbreak def/oldconfig with CONFIG_PREEMPT=y commit 44b912cd0b55777796c5ae8ae857bd1d5ff83ed5 Merge: 21c730d73471 b191d6491be6 Author: Linus Torvalds Date: Mon Jul 22 09:14:19 2019 -0700 Merge tag 'for-linus-20190722' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux Pull pidfd polling fix from Christian Brauner: "A fix for pidfd polling. It ensures that the task's exit state is visible to all waiters" * tag 'for-linus-20190722' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux: pidfd: fix a poll race when setting exit_state commit 21c730d7347126886c40453feb973161f4ae3fb3 Merge: c92f0380673b 373c3b80e459 Author: Linus Torvalds Date: Mon Jul 22 09:08:38 2019 -0700 Merge tag 'for-5.3-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: - fixes for leaks caused by recently merged patches - one build fix - a fix to prevent mixing of incompatible features * tag 'for-5.3-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: don't leak extent_map in btrfs_get_io_geometry() btrfs: free checksum hash on in close_ctree btrfs: Fix build error while LIBCRC32C is module btrfs: inode: Don't compress if NODATASUM or NODATACOW set commit b8d3349803ba34afda429e87a837fd95a99b2349 Author: Thomas Gleixner Date: Mon Jul 22 17:59:19 2019 +0200 sched/rt, Kconfig: Unbreak def/oldconfig with CONFIG_PREEMPT=y The merge of the CONFIG_PREEMPT_RT stub renamed CONFIG_PREEMPT to CONFIG_PREEMPT_LL which causes all defconfigs which have CONFIG_PREEMPT=y set to fall back to CONFIG_PREEMPT_NONE because CONFIG_PREEMPT depends on the preemption mode choice wich defaults to NONE. This also affects oldconfig builds. So rather than changing 114 defconfig files and being an annoyance to users, revert the rename and select a new config symbol PREEMPTION. That keeps everything working smoothly and the revelant ifdef's are going to be fixed up step by step. Reported-by: Mark Rutland Fixes: a50a3f4b6a31 ("sched/rt, Kconfig: Introduce CONFIG_PREEMPT_RT") Signed-off-by: Thomas Gleixner kernel/Kconfig.preempt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c92f0380673bd295c9ac73030a17c16b9df3e702 Merge: 83768245a3b1 22be8233b34f Author: Linus Torvalds Date: Mon Jul 22 09:01:47 2019 -0700 Merge tag 'media/v5.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: "For two regressions in media core: - v4l2-subdev: fix regression in check_pad() - videodev2.h: change V4L2_PIX_FMT_BGRA444 define: fourcc was already in use" * tag 'media/v5.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: media: videodev2.h: change V4L2_PIX_FMT_BGRA444 define: fourcc was already in use media: v4l2-subdev: fix regression in check_pad() commit 7f6cade5b6bf47daa315118a05aab613c73462ff Author: Sai Praneeth Prakhya Date: Sun Jul 21 17:22:07 2019 -0700 iommu/vt-d: Print pasid table entries MSB to LSB in debugfs Commit dd5142ca5d24 ("iommu/vt-d: Add debugfs support to show scalable mode DMAR table internals") prints content of pasid table entries from LSB to MSB where as other entries are printed MSB to LSB. So, to maintain uniformity among all entries and to not confuse the user, print MSB first. Cc: Joerg Roedel Cc: Lu Baolu Cc: Sohil Mehta Cc: Jacob Pan Signed-off-by: Sai Praneeth Prakhya Fixes: dd5142ca5d24 ("iommu/vt-d: Add debugfs support to show scalable mode DMAR table internals") Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu-debugfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ae24fb49d01103c80d6ff3b78714259c1c62c958 Author: Jean-Philippe Brucker Date: Mon Jul 22 15:40:07 2019 +0100 iommu/virtio: Update to most recent specification Following specification review a few things were changed in v8 of the virtio-iommu series [1], but have been omitted when merging the base driver. Add them now: * Remove the EXEC flag. * Add feature bit for the MMIO flag. * Change domain_bits to domain_range. * Add NOMEM status flag. [1] https://lore.kernel.org/linux-iommu/20190530170929.19366-1-jean-philippe.brucker@arm.com/ Fixes: edcd69ab9a32 ("iommu: Add virtio-iommu driver") Reported-by: Eric Auger Signed-off-by: Jean-Philippe Brucker Signed-off-by: Michael S. Tsirkin Reviewed-by: Eric Auger Tested-by: Eric Auger Acked-by: Joerg Roedel drivers/iommu/virtio-iommu.c | 40 ++++++++++++++++++++++++++++----------- include/uapi/linux/virtio_iommu.h | 32 +++++++++++++++++-------------- 2 files changed, 47 insertions(+), 25 deletions(-) commit 9eed17d37c77171cf5ffb95c4257f87df3cd4c8f Author: Chris Wilson Date: Sat Jul 20 19:08:48 2019 +0100 iommu/iova: Remove stale cached32_node Since the cached32_node is allowed to be advanced above dma_32bit_pfn (to provide a shortcut into the limited range), we need to be careful to remove the to be freed node if it is the cached32_node. [ 48.477773] BUG: KASAN: use-after-free in __cached_rbnode_delete_update+0x68/0x110 [ 48.477812] Read of size 8 at addr ffff88870fc19020 by task kworker/u8:1/37 [ 48.477843] [ 48.477879] CPU: 1 PID: 37 Comm: kworker/u8:1 Tainted: G U 5.2.0+ #735 [ 48.477915] Hardware name: Intel Corporation NUC7i5BNK/NUC7i5BNB, BIOS BNKBL357.86A.0052.2017.0918.1346 09/18/2017 [ 48.478047] Workqueue: i915 __i915_gem_free_work [i915] [ 48.478075] Call Trace: [ 48.478111] dump_stack+0x5b/0x90 [ 48.478137] print_address_description+0x67/0x237 [ 48.478178] ? __cached_rbnode_delete_update+0x68/0x110 [ 48.478212] __kasan_report.cold.3+0x1c/0x38 [ 48.478240] ? __cached_rbnode_delete_update+0x68/0x110 [ 48.478280] ? __cached_rbnode_delete_update+0x68/0x110 [ 48.478308] __cached_rbnode_delete_update+0x68/0x110 [ 48.478344] private_free_iova+0x2b/0x60 [ 48.478378] iova_magazine_free_pfns+0x46/0xa0 [ 48.478403] free_iova_fast+0x277/0x340 [ 48.478443] fq_ring_free+0x15a/0x1a0 [ 48.478473] queue_iova+0x19c/0x1f0 [ 48.478597] cleanup_page_dma.isra.64+0x62/0xb0 [i915] [ 48.478712] __gen8_ppgtt_cleanup+0x63/0x80 [i915] [ 48.478826] __gen8_ppgtt_cleanup+0x42/0x80 [i915] [ 48.478940] __gen8_ppgtt_clear+0x433/0x4b0 [i915] [ 48.479053] __gen8_ppgtt_clear+0x462/0x4b0 [i915] [ 48.479081] ? __sg_free_table+0x9e/0xf0 [ 48.479116] ? kfree+0x7f/0x150 [ 48.479234] i915_vma_unbind+0x1e2/0x240 [i915] [ 48.479352] i915_vma_destroy+0x3a/0x280 [i915] [ 48.479465] __i915_gem_free_objects+0xf0/0x2d0 [i915] [ 48.479579] __i915_gem_free_work+0x41/0xa0 [i915] [ 48.479607] process_one_work+0x495/0x710 [ 48.479642] worker_thread+0x4c7/0x6f0 [ 48.479687] ? process_one_work+0x710/0x710 [ 48.479724] kthread+0x1b2/0x1d0 [ 48.479774] ? kthread_create_worker_on_cpu+0xa0/0xa0 [ 48.479820] ret_from_fork+0x1f/0x30 [ 48.479864] [ 48.479907] Allocated by task 631: [ 48.479944] save_stack+0x19/0x80 [ 48.479994] __kasan_kmalloc.constprop.6+0xc1/0xd0 [ 48.480038] kmem_cache_alloc+0x91/0xf0 [ 48.480082] alloc_iova+0x2b/0x1e0 [ 48.480125] alloc_iova_fast+0x58/0x376 [ 48.480166] intel_alloc_iova+0x90/0xc0 [ 48.480214] intel_map_sg+0xde/0x1f0 [ 48.480343] i915_gem_gtt_prepare_pages+0xb8/0x170 [i915] [ 48.480465] huge_get_pages+0x232/0x2b0 [i915] [ 48.480590] ____i915_gem_object_get_pages+0x40/0xb0 [i915] [ 48.480712] __i915_gem_object_get_pages+0x90/0xa0 [i915] [ 48.480834] i915_gem_object_prepare_write+0x2d6/0x330 [i915] [ 48.480955] create_test_object.isra.54+0x1a9/0x3e0 [i915] [ 48.481075] igt_shared_ctx_exec+0x365/0x3c0 [i915] [ 48.481210] __i915_subtests.cold.4+0x30/0x92 [i915] [ 48.481341] __run_selftests.cold.3+0xa9/0x119 [i915] [ 48.481466] i915_live_selftests+0x3c/0x70 [i915] [ 48.481583] i915_pci_probe+0xe7/0x220 [i915] [ 48.481620] pci_device_probe+0xe0/0x180 [ 48.481665] really_probe+0x163/0x4e0 [ 48.481710] device_driver_attach+0x85/0x90 [ 48.481750] __driver_attach+0xa5/0x180 [ 48.481796] bus_for_each_dev+0xda/0x130 [ 48.481831] bus_add_driver+0x205/0x2e0 [ 48.481882] driver_register+0xca/0x140 [ 48.481927] do_one_initcall+0x6c/0x1af [ 48.481970] do_init_module+0x106/0x350 [ 48.482010] load_module+0x3d2c/0x3ea0 [ 48.482058] __do_sys_finit_module+0x110/0x180 [ 48.482102] do_syscall_64+0x62/0x1f0 [ 48.482147] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 48.482190] [ 48.482224] Freed by task 37: [ 48.482273] save_stack+0x19/0x80 [ 48.482318] __kasan_slab_free+0x12e/0x180 [ 48.482363] kmem_cache_free+0x70/0x140 [ 48.482406] __free_iova+0x1d/0x30 [ 48.482445] fq_ring_free+0x15a/0x1a0 [ 48.482490] queue_iova+0x19c/0x1f0 [ 48.482624] cleanup_page_dma.isra.64+0x62/0xb0 [i915] [ 48.482749] __gen8_ppgtt_cleanup+0x63/0x80 [i915] [ 48.482873] __gen8_ppgtt_cleanup+0x42/0x80 [i915] [ 48.482999] __gen8_ppgtt_clear+0x433/0x4b0 [i915] [ 48.483123] __gen8_ppgtt_clear+0x462/0x4b0 [i915] [ 48.483250] i915_vma_unbind+0x1e2/0x240 [i915] [ 48.483378] i915_vma_destroy+0x3a/0x280 [i915] [ 48.483500] __i915_gem_free_objects+0xf0/0x2d0 [i915] [ 48.483622] __i915_gem_free_work+0x41/0xa0 [i915] [ 48.483659] process_one_work+0x495/0x710 [ 48.483704] worker_thread+0x4c7/0x6f0 [ 48.483748] kthread+0x1b2/0x1d0 [ 48.483787] ret_from_fork+0x1f/0x30 [ 48.483831] [ 48.483868] The buggy address belongs to the object at ffff88870fc19000 [ 48.483868] which belongs to the cache iommu_iova of size 40 [ 48.483920] The buggy address is located 32 bytes inside of [ 48.483920] 40-byte region [ffff88870fc19000, ffff88870fc19028) [ 48.483964] The buggy address belongs to the page: [ 48.484006] page:ffffea001c3f0600 refcount:1 mapcount:0 mapping:ffff8888181a91c0 index:0x0 compound_mapcount: 0 [ 48.484045] flags: 0x8000000000010200(slab|head) [ 48.484096] raw: 8000000000010200 ffffea001c421a08 ffffea001c447e88 ffff8888181a91c0 [ 48.484141] raw: 0000000000000000 0000000000120012 00000001ffffffff 0000000000000000 [ 48.484188] page dumped because: kasan: bad access detected [ 48.484230] [ 48.484265] Memory state around the buggy address: [ 48.484314] ffff88870fc18f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 48.484361] ffff88870fc18f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 48.484406] >ffff88870fc19000: fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc [ 48.484451] ^ [ 48.484494] ffff88870fc19080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 48.484530] ffff88870fc19100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108602 Fixes: e60aa7b53845 ("iommu/iova: Extend rbtree node caching") Signed-off-by: Chris Wilson Cc: Robin Murphy Cc: Joerg Roedel Cc: Joerg Roedel Cc: # v4.15+ Reviewed-by: Robin Murphy Signed-off-by: Joerg Roedel drivers/iommu/iova.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 83768245a3b158b96d33012b22ab01d193afb2da Merge: 5f9e832c1370 b617158dc096 Author: Linus Torvalds Date: Mon Jul 22 08:49:22 2019 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Several netfilter fixes including a nfnetlink deadlock fix from Florian Westphal and fix for dropping VRF packets from Miaohe Lin. 2) Flow offload fixes from Pablo Neira Ayuso including a fix to restore proper block sharing. 3) Fix r8169 PHY init from Thomas Voegtle. 4) Fix memory leak in mac80211, from Lorenzo Bianconi. 5) Missing NULL check on object allocation in cxgb4, from Navid Emamdoost. 6) Fix scaling of RX power in sfp phy driver, from Andrew Lunn. 7) Check that there is actually an ip header to access in skb->data in VRF, from Peter Kosyh. 8) Remove spurious rcu unlock in hv_netvsc, from Haiyang Zhang. 9) One more tweak the the TCP fragmentation memory limit changes, to be less harmful to applications setting small SO_SNDBUF values. From Eric Dumazet. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (40 commits) tcp: be more careful in tcp_fragment() hv_netvsc: Fix extra rcu_read_unlock in netvsc_recv_callback() vrf: make sure skb->data contains ip header to make routing connector: remove redundant input callback from cn_dev qed: Prefer pcie_capability_read_word() igc: Prefer pcie_capability_read_word() cxgb4: Prefer pcie_capability_read_word() be2net: Synchronize be_update_queues with dev_watchdog bnx2x: Prevent load reordering in tx completion processing net: phy: sfp: hwmon: Fix scaling of RX power net: sched: verify that q!=NULL before setting q->flags chelsio: Fix a typo in a function name allocate_flower_entry: should check for null deref net: hns3: typo in the name of a constant kbuild: add net/netfilter/nf_tables_offload.h to header-test blacklist. tipc: Fix a typo mac80211: don't warn about CW params when not using them mac80211: fix possible memory leak in ieee80211_assign_beacon nl80211: fix NL80211_HE_MAX_CAPABILITY_LEN nl80211: fix VENDOR_CMD_RAW_DATA ... commit 3ee9eca760e7d0b68c55813243de66bbb499dc3b Author: Dmitry Safonov Date: Tue Jul 16 22:38:06 2019 +0100 iommu/vt-d: Check if domain->pgd was allocated There is a couple of places where on domain_init() failure domain_exit() is called. While currently domain_init() can fail only if alloc_pgtable_page() has failed. Make domain_exit() check if domain->pgd present, before calling domain_unmap(), as it theoretically should crash on clearing pte entries in dma_pte_clear_level(). Cc: David Woodhouse Cc: Joerg Roedel Cc: Lu Baolu Cc: iommu@lists.linux-foundation.org Signed-off-by: Dmitry Safonov Reviewed-by: Lu Baolu Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit effa467870c7612012885df4e246bdb8ffd8e44c Author: Dmitry Safonov Date: Tue Jul 16 22:38:05 2019 +0100 iommu/vt-d: Don't queue_iova() if there is no flush queue Intel VT-d driver was reworked to use common deferred flushing implementation. Previously there was one global per-cpu flush queue, afterwards - one per domain. Before deferring a flush, the queue should be allocated and initialized. Currently only domains with IOMMU_DOMAIN_DMA type initialize their flush queue. It's probably worth to init it for static or unmanaged domains too, but it may be arguable - I'm leaving it to iommu folks. Prevent queuing an iova flush if the domain doesn't have a queue. The defensive check seems to be worth to keep even if queue would be initialized for all kinds of domains. And is easy backportable. On 4.19.43 stable kernel it has a user-visible effect: previously for devices in si domain there were crashes, on sata devices: BUG: spinlock bad magic on CPU#6, swapper/0/1 lock: 0xffff88844f582008, .magic: 00000000, .owner: /-1, .owner_cpu: 0 CPU: 6 PID: 1 Comm: swapper/0 Not tainted 4.19.43 #1 Call Trace: dump_stack+0x61/0x7e spin_bug+0x9d/0xa3 do_raw_spin_lock+0x22/0x8e _raw_spin_lock_irqsave+0x32/0x3a queue_iova+0x45/0x115 intel_unmap+0x107/0x113 intel_unmap_sg+0x6b/0x76 __ata_qc_complete+0x7f/0x103 ata_qc_complete+0x9b/0x26a ata_qc_complete_multiple+0xd0/0xe3 ahci_handle_port_interrupt+0x3ee/0x48a ahci_handle_port_intr+0x73/0xa9 ahci_single_level_irq_intr+0x40/0x60 __handle_irq_event_percpu+0x7f/0x19a handle_irq_event_percpu+0x32/0x72 handle_irq_event+0x38/0x56 handle_edge_irq+0x102/0x121 handle_irq+0x147/0x15c do_IRQ+0x66/0xf2 common_interrupt+0xf/0xf RIP: 0010:__do_softirq+0x8c/0x2df The same for usb devices that use ehci-pci: BUG: spinlock bad magic on CPU#0, swapper/0/1 lock: 0xffff88844f402008, .magic: 00000000, .owner: /-1, .owner_cpu: 0 CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.19.43 #4 Call Trace: dump_stack+0x61/0x7e spin_bug+0x9d/0xa3 do_raw_spin_lock+0x22/0x8e _raw_spin_lock_irqsave+0x32/0x3a queue_iova+0x77/0x145 intel_unmap+0x107/0x113 intel_unmap_page+0xe/0x10 usb_hcd_unmap_urb_setup_for_dma+0x53/0x9d usb_hcd_unmap_urb_for_dma+0x17/0x100 unmap_urb_for_dma+0x22/0x24 __usb_hcd_giveback_urb+0x51/0xc3 usb_giveback_urb_bh+0x97/0xde tasklet_action_common.isra.4+0x5f/0xa1 tasklet_action+0x2d/0x30 __do_softirq+0x138/0x2df irq_exit+0x7d/0x8b smp_apic_timer_interrupt+0x10f/0x151 apic_timer_interrupt+0xf/0x20 RIP: 0010:_raw_spin_unlock_irqrestore+0x17/0x39 Cc: David Woodhouse Cc: Joerg Roedel Cc: Lu Baolu Cc: iommu@lists.linux-foundation.org Cc: # 4.14+ Fixes: 13cf01744608 ("iommu/vt-d: Make use of iova deferred flushing") Signed-off-by: Dmitry Safonov Reviewed-by: Lu Baolu Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 3 ++- drivers/iommu/iova.c | 18 ++++++++++++++---- include/linux/iova.h | 6 ++++++ 3 files changed, 22 insertions(+), 5 deletions(-) commit 5d6fb560729a5d5554e23db8d00eb57cd0021083 Author: Arnd Bergmann Date: Fri Jul 12 11:13:30 2019 +0200 dmaengine: ste_dma40: fix unneeded variable warning clang-9 points out that there are two variables that depending on the configuration may only be used in an ARRAY_SIZE() expression but not referenced: drivers/dma/ste_dma40.c:145:12: error: variable 'd40_backup_regs' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration] static u32 d40_backup_regs[] = { ^ drivers/dma/ste_dma40.c:214:12: error: variable 'd40_backup_regs_chan' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration] static u32 d40_backup_regs_chan[] = { Mark these __maybe_unused to shut up the warning. Signed-off-by: Arnd Bergmann Reviewed-by: Nathan Chancellor Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20190712091357.744515-1-arnd@arndb.de Signed-off-by: Vinod Koul drivers/dma/ste_dma40.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6f4722b1d1ebf274deb0459a36fad57a7d7fab31 Author: Arnd Bergmann Date: Mon Jul 22 14:44:45 2019 +0200 dmaengine: dw-edma: fix endianess confusion When building with 'make C=1', sparse reports an endianess bug: drivers/dma/dw-edma/dw-edma-v0-debugfs.c:60:30: warning: cast removes address space of expression drivers/dma/dw-edma/dw-edma-v0-debugfs.c:86:24: warning: incorrect type in argument 1 (different address spaces) drivers/dma/dw-edma/dw-edma-v0-debugfs.c:86:24: expected void const volatile [noderef] *addr drivers/dma/dw-edma/dw-edma-v0-debugfs.c:86:24: got void *[assigned] ptr drivers/dma/dw-edma/dw-edma-v0-debugfs.c:86:24: warning: incorrect type in argument 1 (different address spaces) drivers/dma/dw-edma/dw-edma-v0-debugfs.c:86:24: expected void const volatile [noderef] *addr drivers/dma/dw-edma/dw-edma-v0-debugfs.c:86:24: got void *[assigned] ptr drivers/dma/dw-edma/dw-edma-v0-debugfs.c:86:24: warning: incorrect type in argument 1 (different address spaces) drivers/dma/dw-edma/dw-edma-v0-debugfs.c:86:24: expected void const volatile [noderef] *addr drivers/dma/dw-edma/dw-edma-v0-debugfs.c:86:24: got void *[assigned] ptr The current code is clearly wrong, as it passes an endian-swapped word into a register function where it gets swapped again. Just pass the variables directly into lower_32_bits()/upper_32_bits(). Fixes: 7e4b8a4fbe2c ("dmaengine: Add Synopsys eDMA IP version 0 support") Link: https://lore.kernel.org/lkml/20190617131820.2470686-1-arnd@arndb.de/ Signed-off-by: Arnd Bergmann Acked-by: Gustavo Pimentel Link: https://lore.kernel.org/r/20190722124457.1093886-3-arnd@arndb.de Signed-off-by: Vinod Koul drivers/dma/dw-edma/dw-edma-v0-core.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) commit 756c3ef93492af382c541e039c1417b96a3d335e Author: Arnd Bergmann Date: Mon Jul 22 14:44:44 2019 +0200 dmaengine: dw-edma: fix __iomem type confusion The new driver mixes up dma_addr_t and __iomem pointers, which results in warnings on some 32-bit architectures, like: drivers/dma/dw-edma/dw-edma-v0-core.c: In function '__dw_regs': drivers/dma/dw-edma/dw-edma-v0-core.c:28:9: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] return (struct dw_edma_v0_regs __iomem *)dw->rg_region.vaddr; Make it use __iomem pointers consistently here, and avoid using dma_addr_t for __iomem tokens altogether. A small complication here is the debugfs code, which passes an __iomem token as the private data for debugfs files, requiring the use of extra __force. Fixes: 7e4b8a4fbe2c ("dmaengine: Add Synopsys eDMA IP version 0 support") Link: https://lore.kernel.org/lkml/20190617131918.2518727-1-arnd@arndb.de/ Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20190722124457.1093886-2-arnd@arndb.de Signed-off-by: Vinod Koul drivers/dma/dw-edma/dw-edma-core.h | 2 +- drivers/dma/dw-edma/dw-edma-pcie.c | 18 +++++++++--------- drivers/dma/dw-edma/dw-edma-v0-core.c | 10 +++++----- drivers/dma/dw-edma/dw-edma-v0-debugfs.c | 27 ++++++++++++++------------- 4 files changed, 29 insertions(+), 28 deletions(-) commit f0414087a1b9933adac40974c3ea50261227b5f0 Author: Arnd Bergmann Date: Mon Jul 22 14:44:43 2019 +0200 dmaengine: dw-edma: fix unnecessary stack usage Putting large constant data on the stack causes unnecessary overhead and stack usage: drivers/dma/dw-edma/dw-edma-v0-debugfs.c:285:6: error: stack frame size of 1376 bytes in function 'dw_edma_v0_debugfs_on' [-Werror,-Wframe-larger-than=] Mark the variable 'static const' in order for the compiler to move it into the .rodata section where it does no such harm. Fixes: 305aebeff879 ("dmaengine: Add Synopsys eDMA IP version 0 debugfs support") Signed-off-by: Arnd Bergmann Acked-by: Gustavo Pimentel Link: https://lore.kernel.org/r/20190722124457.1093886-1-arnd@arndb.de Signed-off-by: Vinod Koul drivers/dma/dw-edma/dw-edma-v0-debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 40ca0ce56d4bb889dc43b455c55398468115569a Author: James Morse Date: Mon Jul 22 16:11:48 2019 +0100 arm64: entry: SP Alignment Fault doesn't write to FAR_EL1 Comparing the arm-arm's pseudocode for AArch64.PCAlignmentFault() with AArch64.SPAlignmentFault() shows that SP faults don't copy the faulty-SP to FAR_EL1, but this is where we read from, and the address we provide to user-space with the BUS_ADRALN signal. For user-space this value will be UNKNOWN due to the previous ERET to user-space. If the last value is preserved, on systems with KASLR or KPTI this will be the user-space link-register left in FAR_EL1 by tramp_exit(). Fix this to retrieve the original sp_el0 value, and pass this to do_sp_pc_fault(). SP alignment faults from EL1 will cause us to take the fault again when trying to store the pt_regs. This eventually takes us to the overflow stack. Remove the ESR_ELx_EC_SP_ALIGN check as we will never make it this far. Fixes: 60ffc30d5652 ("arm64: Exception handling") Signed-off-by: James Morse [will: change label name and fleshed out comment] Signed-off-by: Will Deacon arch/arm64/kernel/entry.S | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit cfe61801b0f11eb561f1adf452d995efaafbc68b Author: Michael S. Tsirkin Date: Thu Jul 18 08:19:24 2019 -0400 balloon: fix up comments Lots of comments bitrotted. Fix them up. Fixes: 418a3ab1e778 (mm/balloon_compaction: List interfaces) Reviewed-by: Wei Wang Signed-off-by: Michael S. Tsirkin Reviewed-by: Ralph Campbell Acked-by: Nadav Amit mm/balloon_compaction.c | 67 +++++++++++++++++++++++++++---------------------- 1 file changed, 37 insertions(+), 30 deletions(-) commit dd422906799f240bfd400a5d376aa43f7b89c38a Author: Wei Wang Date: Thu Jul 18 17:27:20 2019 +0800 mm/balloon_compaction: avoid duplicate page removal A #GP is reported in the guest when requesting balloon inflation via virtio-balloon. The reason is that the virtio-balloon driver has removed the page from its internal page list (via balloon_page_pop), but balloon_page_enqueue_one also calls "list_del" to do the removal. This is necessary when it's used from balloon_page_enqueue_list, but not from balloon_page_enqueue. Move list_del to balloon_page_enqueue, and update comments accordingly. Fixes: 418a3ab1e778 (mm/balloon_compaction: List interfaces) Signed-off-by: Wei Wang Signed-off-by: Michael S. Tsirkin mm/balloon_compaction.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 557529494d79f3f1fadd486dd18d2de0b19be4da Author: Lu Baolu Date: Tue Jul 9 13:22:45 2019 +0800 iommu/vt-d: Avoid duplicated pci dma alias consideration As we have abandoned the home-made lazy domain allocation and delegated the DMA domain life cycle up to the default domain mechanism defined in the generic iommu layer, we needn't consider pci alias anymore when mapping/unmapping the context entries. Without this fix, we see kernel NULL pointer dereference during pci device hot-plug test. Cc: Ashok Raj Cc: Jacob Pan Cc: Kevin Tian Fixes: fa954e6831789 ("iommu/vt-d: Delegate the dma domain to upper layer") Signed-off-by: Lu Baolu Reported-and-tested-by: Xu Pengfei Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 55 ++------------------------------------------- 1 file changed, 2 insertions(+), 53 deletions(-) commit cbdf8a189a66001c36007bf0f5c975d0376c5c3a Author: Marc Zyngier Date: Mon Jul 22 14:53:09 2019 +0100 arm64: Force SSBS on context switch On a CPU that doesn't support SSBS, PSTATE[12] is RES0. In a system where only some of the CPUs implement SSBS, we end-up losing track of the SSBS bit across task migration. To address this issue, let's force the SSBS bit on context switch. Fixes: 8f04e8e6e29c ("arm64: ssbd: Add support for PSTATE.SSBS rather than trapping to EL3") Signed-off-by: Marc Zyngier [will: inverted logic and added comments] Signed-off-by: Will Deacon arch/arm64/include/asm/processor.h | 14 ++++++++++++-- arch/arm64/kernel/process.c | 29 ++++++++++++++++++++++++++++- 2 files changed, 40 insertions(+), 3 deletions(-) commit 301e7ee1dec513e5aca12d01c819a1f762918d0a Author: Joerg Roedel Date: Mon Jul 22 16:21:05 2019 +0200 Revert "iommu/vt-d: Consolidate domain_init() to avoid duplication" This reverts commit 123b2ffc376e1b3e9e015c75175b61e88a8b8518. This commit reportedly caused boot failures on some systems and needs to be reverted for now. Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 123 +++++++++++++++++++++++++++++++------------- 1 file changed, 87 insertions(+), 36 deletions(-) commit c8eee4135a456bc031d67cadc454e76880d1afd8 Author: Ilya Leoshkevich Date: Fri Jul 19 11:06:11 2019 +0200 selftests/bpf: fix sendmsg6_prog on s390 "sendmsg6: rewrite IP & port (C)" fails on s390, because the code in sendmsg_v6_prog() assumes that (ctx->user_ip6[0] & 0xFFFF) refers to leading IPv6 address digits, which is not the case on big-endian machines. Since checking bitwise operations doesn't seem to be the point of the test, replace two short comparisons with a single int comparison. Signed-off-by: Ilya Leoshkevich Acked-by: Andrey Ignatov Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/progs/sendmsg6_prog.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 5d9e06d60eee95e021ffccf0d2c7ed800ae9dc14 Author: Wei Yongjun Date: Mon Jul 22 22:12:36 2019 +0800 bcache: fix possible memory leak in bch_cached_dev_run() memory malloced in bch_cached_dev_run() and should be freed before leaving from the error handling cases, otherwise it will cause memory leak. Fixes: 0b13efecf5f2 ("bcache: add return value check to bch_cached_dev_run()") Signed-off-by: Wei Yongjun Signed-off-by: Coly Li Signed-off-by: Jens Axboe drivers/md/bcache/super.c | 3 +++ 1 file changed, 3 insertions(+) commit 4be6e05c4d4c2ff87750d3242f69999245d119f8 Author: Arnaldo Carvalho de Melo Date: Fri Jul 19 11:34:07 2019 -0300 libbpf: Avoid designated initializers for unnamed union members As it fails to build in some systems with: libbpf.c: In function 'perf_buffer__new': libbpf.c:4515: error: unknown field 'sample_period' specified in initializer libbpf.c:4516: error: unknown field 'wakeup_events' specified in initializer Doing as: attr.sample_period = 1; I.e. not as a designated initializer makes it build everywhere. Cc: Andrii Nakryiko Cc: Adrian Hunter Cc: Daniel Borkmann Cc: Jiri Olsa Cc: Namhyung Kim Fixes: fb84b8224655 ("libbpf: add perf buffer API") Link: https://lkml.kernel.org/n/tip-hnlmch8qit1ieksfppmr32si@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo Acked-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann tools/lib/bpf/libbpf.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit cdb2f9207109c9c858277fde8b7dc1445b9f952e Author: Arnaldo Carvalho de Melo Date: Fri Jul 19 11:34:06 2019 -0300 libbpf: Fix endianness macro usage for some compilers Using endian.h and its endianness macros makes this code build in a wider range of compilers, as some don't have those macros (__BYTE_ORDER__, __ORDER_LITTLE_ENDIAN__, __ORDER_BIG_ENDIAN__), so use instead endian.h's macros (__BYTE_ORDER, __LITTLE_ENDIAN, __BIG_ENDIAN) which makes this code even shorter :-) Acked-by: Andrii Nakryiko Cc: Adrian Hunter Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Jiri Olsa Cc: Namhyung Kim Fixes: 12ef5634a855 ("libbpf: simplify endianness check") Fixes: e6c64855fd7a ("libbpf: add btf__parse_elf API to load .BTF and .BTF.ext") Link: https://lkml.kernel.org/n/tip-eep5n8vgwcdphw3uc058k03u@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Daniel Borkmann tools/lib/bpf/btf.c | 5 +++-- tools/lib/bpf/libbpf.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) commit 57ebc6230f060fd467fd5fd4552de5ebc40cb48c Merge: 1d4126c4e119 d4d34185e710 Author: Daniel Borkmann Date: Mon Jul 22 16:04:17 2019 +0200 Merge branch 'bpf-sockmap-tls-fixes' Jakub Kicinski says: ==================== John says: Resolve a series of splats discovered by syzbot and an unhash TLS issue noted by Eric Dumazet. The main issues revolved around interaction between TLS and sockmap tear down. TLS and sockmap could both reset sk->prot ops creating a condition where a close or unhash op could be called forever. A rare race condition resulting from a missing rcu sync operation was causing a use after free. Then on the TLS side dropping the sock lock and re-acquiring it during the close op could hang. Finally, sockmap must be deployed before tls for current stack assumptions to be met. This is enforced now. A feature series can enable it. To fix this first refactor TLS code so the lock is held for the entire teardown operation. Then add an unhash callback to ensure TLS can not transition from ESTABLISHED to LISTEN state. This transition is a similar bug to the one found and fixed previously in sockmap. Then apply three fixes to sockmap to fix up races on tear down around map free and close. Finally, if sockmap is destroyed before TLS we add a new ULP op update to inform the TLS stack it should not call sockmap ops. This last one appears to be the most commonly found issue from syzbot. v4: - fix some use after frees; - disable disconnect work for offload (ctx lifetime is much more complex); - remove some of the dead code which made it hard to understand (for me) that things work correctly (e.g. the checks TLS is the top ULP); - add selftets. ==================== Signed-off-by: Daniel Borkmann commit d4d34185e710750ad748a0f0a73e8cdac7480bfc Author: Jakub Kicinski Date: Fri Jul 19 10:29:27 2019 -0700 selftests/tls: add shutdown tests Add test for killing the connection via shutdown. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: Daniel Borkmann tools/testing/selftests/net/tls.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 8051bb7f2cbf68ec1289753616703791dd004b5c Author: Jakub Kicinski Date: Fri Jul 19 10:29:26 2019 -0700 selftests/tls: close the socket with open record Add test which sends some data with MSG_MORE and then closes the socket (never calling send without MSG_MORE). This should make sure we clean up open records correctly. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: Daniel Borkmann tools/testing/selftests/net/tls.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 65d41fb317c62b7c8663a134e88eaee439f270d6 Author: Jakub Kicinski Date: Fri Jul 19 10:29:25 2019 -0700 selftests/tls: add a bidirectional test Add a simple test which installs the TLS state for both directions, sends and receives data on both sockets. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: Daniel Borkmann tools/testing/selftests/net/tls.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit 78b5dc3d68dcb1d18d805e8f4e565f19ed6d976a Author: Jakub Kicinski Date: Fri Jul 19 10:29:24 2019 -0700 selftests/tls: test error codes around TLS ULP installation Test the error codes returned when TCP connection is not in ESTABLISHED state. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: Daniel Borkmann tools/testing/selftests/net/tls.c | 52 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) commit cf32526c8842781e32d6652a1e01e83b20490948 Author: Jakub Kicinski Date: Fri Jul 19 10:29:23 2019 -0700 selftests/tls: add a test for ULP but no keys Make sure we test the TLS_BASE/TLS_BASE case both with data and the tear down/clean up path. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: Daniel Borkmann tools/testing/selftests/net/tls.c | 74 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) commit 95fa145479fbc0a0c1fd3274ceb42ec03c042a4a Author: John Fastabend Date: Fri Jul 19 10:29:22 2019 -0700 bpf: sockmap/tls, close can race with map free When a map free is called and in parallel a socket is closed we have two paths that can potentially reset the socket prot ops, the bpf close() path and the map free path. This creates a problem with which prot ops should be used from the socket closed side. If the map_free side completes first then we want to call the original lowest level ops. However, if the tls path runs first we want to call the sockmap ops. Additionally there was no locking around prot updates in TLS code paths so the prot ops could be changed multiple times once from TLS path and again from sockmap side potentially leaving ops pointed at either TLS or sockmap when psock and/or tls context have already been destroyed. To fix this race first only update ops inside callback lock so that TLS, sockmap and lowest level all agree on prot state. Second and a ULP callback update() so that lower layers can inform the upper layer when they are being removed allowing the upper layer to reset prot ops. This gets us close to allowing sockmap and tls to be stacked in arbitrary order but will save that patch for *next trees. v4: - make sure we don't free things for device; - remove the checks which swap the callbacks back only if TLS is at the top. Reported-by: syzbot+06537213db7ba2745c4a@syzkaller.appspotmail.com Fixes: 02c558b2d5d6 ("bpf: sockmap, support for msg_peek in sk_msg with redirect ingress") Signed-off-by: John Fastabend Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: Daniel Borkmann include/linux/skmsg.h | 8 +++++++- include/net/tcp.h | 3 +++ net/core/skmsg.c | 4 ++-- net/ipv4/tcp_ulp.c | 13 +++++++++++++ net/tls/tls_main.c | 33 ++++++++++++++++++++++++++++----- 5 files changed, 53 insertions(+), 8 deletions(-) commit 0e858739c2d2eedeeac1d35bfa0ec3cc2a7190d8 Author: John Fastabend Date: Fri Jul 19 10:29:21 2019 -0700 bpf: sockmap, only create entry if ulp is not already enabled Sockmap does not currently support adding sockets after TLS has been enabled. There never was a real use case for this so it was never added. But, we lost the test for ULP at some point so add it here and fail the socket insert if TLS is enabled. Future work could make sockmap support this use case but fixup the bug here. Fixes: 604326b41a6fb ("bpf, sockmap: convert to generic sk_msg interface") Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann net/core/sock_map.c | 3 +++ 1 file changed, 3 insertions(+) commit 2bb90e5cc90e1d09f631aeab041a9cf913a5bbe5 Author: John Fastabend Date: Fri Jul 19 10:29:20 2019 -0700 bpf: sockmap, synchronize_rcu before free'ing map We need to have a synchronize_rcu before free'ing the sockmap because any outstanding psock references will have a pointer to the map and when they use this could trigger a use after free. Fixes: 604326b41a6fb ("bpf, sockmap: convert to generic sk_msg interface") Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann net/core/sock_map.c | 2 ++ 1 file changed, 2 insertions(+) commit 45a4521dcbd92e71c9e53031b40e34211d3b4feb Author: John Fastabend Date: Fri Jul 19 10:29:19 2019 -0700 bpf: sockmap, sock_map_delete needs to use xchg __sock_map_delete() may be called from a tcp event such as unhash or close from the following trace, tcp_bpf_close() tcp_bpf_remove() sk_psock_unlink() sock_map_delete_from_link() __sock_map_delete() In this case the sock lock is held but this only protects against duplicate removals on the TCP side. If the map is free'd then we have this trace, sock_map_free xchg() <- replaces map entry sock_map_unref() sk_psock_put() sock_map_del_link() The __sock_map_delete() call however uses a read, test, null over the map entry which can result in both paths trying to free the map entry. To fix use xchg in TCP paths as well so we avoid having two references to the same map entry. Fixes: 604326b41a6fb ("bpf, sockmap: convert to generic sk_msg interface") Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann net/core/sock_map.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 32857cf57f920cdc03b5095f08febec94cf9c36b Author: John Fastabend Date: Fri Jul 19 10:29:18 2019 -0700 net/tls: fix transition through disconnect with close It is possible (via shutdown()) for TCP socks to go through TCP_CLOSE state via tcp_disconnect() without actually calling tcp_close which would then call the tls close callback. Because of this a user could disconnect a socket then put it in a LISTEN state which would break our assumptions about sockets always being ESTABLISHED state. More directly because close() can call unhash() and unhash is implemented by sockmap if a sockmap socket has TLS enabled we can incorrectly destroy the psock from unhash() and then call its close handler again. But because the psock (sockmap socket representation) is already destroyed we call close handler in sk->prot. However, in some cases (TLS BASE/BASE case) this will still point at the sockmap close handler resulting in a circular call and crash reported by syzbot. To fix both above issues implement the unhash() routine for TLS. v4: - add note about tls offload still needing the fix; - move sk_proto to the cold cache line; - split TX context free into "release" and "free", otherwise the GC work itself is in already freed memory; - more TX before RX for consistency; - reuse tls_ctx_free(); - schedule the GC work after we're done with context to avoid UAF; - don't set the unhash in all modes, all modes "inherit" TLS_BASE's callbacks anyway; - disable the unhash hook for TLS_HW. Fixes: 3c4d7559159bf ("tls: kernel TLS support") Reported-by: Eric Dumazet Signed-off-by: John Fastabend Signed-off-by: Jakub Kicinski Signed-off-by: Daniel Borkmann Documentation/networking/tls-offload.rst | 6 ++++ include/net/tls.h | 5 ++- net/tls/tls_main.c | 55 ++++++++++++++++++++++++++++++++ 3 files changed, 65 insertions(+), 1 deletion(-) commit 313ab004805cf52a42673b15852b3842474ccd87 Author: John Fastabend Date: Fri Jul 19 10:29:17 2019 -0700 net/tls: remove sock unlock/lock around strp_done() The tls close() callback currently drops the sock lock to call strp_done(). Split up the RX cleanup into stopping the strparser and releasing most resources, syncing strparser and finally freeing the context. To avoid the need for a strp_done() call on the cleanup path of device offload make sure we don't arm the strparser until we are sure init will be successful. Signed-off-by: John Fastabend Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: Daniel Borkmann include/net/tls.h | 7 +++--- net/tls/tls_device.c | 1 - net/tls/tls_main.c | 61 ++++++++++++++++++++++++++-------------------------- net/tls/tls_sw.c | 40 +++++++++++++++++++++++++--------- 4 files changed, 64 insertions(+), 45 deletions(-) commit f87e62d45e51b12d48d2cb46b5cde8f83b866bc4 Author: John Fastabend Date: Fri Jul 19 10:29:16 2019 -0700 net/tls: remove close callback sock unlock/lock around TX work flush The tls close() callback currently drops the sock lock, makes a cancel_delayed_work_sync() call, and then relocks the sock. By restructuring the code we can avoid droping lock and then reclaiming it. To simplify this we do the following, tls_sk_proto_close set_bit(CLOSING) set_bit(SCHEDULE) cancel_delay_work_sync() <- cancel workqueue lock_sock(sk) ... release_sock(sk) strp_done() Setting the CLOSING bit prevents the SCHEDULE bit from being cleared by any workqueue items e.g. if one happens to be scheduled and run between when we set SCHEDULE bit and cancel work. Then because SCHEDULE bit is set now no new work will be scheduled. Tested with net selftests and bpf selftests. Signed-off-by: John Fastabend Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: Daniel Borkmann include/net/tls.h | 2 ++ net/tls/tls_main.c | 3 +++ net/tls/tls_sw.c | 24 +++++++++++++++++------- 3 files changed, 22 insertions(+), 7 deletions(-) commit ac78fc148d8249dbf382c2127456dd08ec5b161c Author: Jakub Kicinski Date: Fri Jul 19 10:29:15 2019 -0700 net/tls: don't call tls_sk_proto_close for hw record offload The deprecated TOE offload doesn't actually do anything in tls_sk_proto_close() - all TLS code is skipped and context not freed. Remove the callback to make it easier to refactor tls_sk_proto_close(). Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: Daniel Borkmann net/tls/tls_main.c | 4 ---- 1 file changed, 4 deletions(-) commit 318892ac068397f40ff81d9155898da01493b1d2 Author: Jakub Kicinski Date: Fri Jul 19 10:29:14 2019 -0700 net/tls: don't arm strparser immediately in tls_set_sw_offload() In tls_set_device_offload_rx() we prepare the software context for RX fallback and proceed to add the connection to the device. Unfortunately, software context prep includes arming strparser so in case of a later error we have to release the socket lock to call strp_done(). In preparation for not releasing the socket lock half way through callbacks move arming strparser into a separate function. Following patches will make use of that. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: Daniel Borkmann include/net/tls.h | 1 + net/tls/tls_device.c | 1 + net/tls/tls_main.c | 8 +++++--- net/tls/tls_sw.c | 19 ++++++++++++------- 4 files changed, 19 insertions(+), 10 deletions(-) commit b191d6491be67cef2b3fa83015561caca1394ab9 Author: Suren Baghdasaryan Date: Wed Jul 17 13:21:00 2019 -0400 pidfd: fix a poll race when setting exit_state There is a race between reading task->exit_state in pidfd_poll and writing it after do_notify_parent calls do_notify_pidfd. Expected sequence of events is: CPU 0 CPU 1 ------------------------------------------------ exit_notify do_notify_parent do_notify_pidfd tsk->exit_state = EXIT_DEAD pidfd_poll if (tsk->exit_state) However nothing prevents the following sequence: CPU 0 CPU 1 ------------------------------------------------ exit_notify do_notify_parent do_notify_pidfd pidfd_poll if (tsk->exit_state) tsk->exit_state = EXIT_DEAD This causes a polling task to wait forever, since poll blocks because exit_state is 0 and the waiting task is not notified again. A stress test continuously doing pidfd poll and process exits uncovered this bug. To fix it, we make sure that the task's exit_state is always set before calling do_notify_pidfd. Fixes: b53b0b9d9a6 ("pidfd: add polling support") Cc: kernel-team@android.com Cc: Oleg Nesterov Signed-off-by: Suren Baghdasaryan Signed-off-by: Joel Fernandes (Google) Link: https://lore.kernel.org/r/20190717172100.261204-1-joel@joelfernandes.org [christian@brauner.io: adapt commit message and drop unneeded changes from wait_task_zombie] Signed-off-by: Christian Brauner kernel/exit.c | 1 + 1 file changed, 1 insertion(+) commit 4574b0b9abc83a3522b2e91c43b9f0c479855d3a Author: Jean-Philippe Brucker Date: Mon Jul 22 14:44:40 2019 +0100 MAINTAINERS: Update my email address Update MAINTAINERS and .mailmap with my @linaro.org address, since I don't have access to my @arm.com address anymore. Signed-off-by: Jean-Philippe Brucker Signed-off-by: Will Deacon .mailmap | 1 + MAINTAINERS | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit cfb7156672dd4de51bcdbc89cfc67c653300f260 Merge: 5f9e832c1370 7aaddd96d5fe Author: Sean Paul Date: Mon Jul 22 09:56:14 2019 -0400 Merge drm-misc-next-fixes-2019-07-18 into drm-misc-fixes Picking up 7aaddd96d5f ("drm/modes: Don't apply cmdline's rotation if it wasn't specified") from drm-misc-next-fixes. It missed the merge window. Signed-off-by: Sean Paul commit 223ecaf140b1dd1c1d2a1a1d96281efc5c906984 Author: Michael Wu Date: Mon Jul 8 13:23:08 2019 +0800 gpiolib: fix incorrect IRQ requesting of an active-low lineevent When a pin is active-low, logical trigger edge should be inverted to match the same interrupt opportunity. For example, a button pushed triggers falling edge in ACTIVE_HIGH case; in ACTIVE_LOW case, the button pushed triggers rising edge. For user space the IRQ requesting doesn't need to do any modification except to configuring GPIOHANDLE_REQUEST_ACTIVE_LOW. For example, we want to catch the event when the button is pushed. The button on the original board drives level to be low when it is pushed, and drives level to be high when it is released. In user space we can do: req.handleflags = GPIOHANDLE_REQUEST_INPUT; req.eventflags = GPIOEVENT_REQUEST_FALLING_EDGE; while (1) { read(fd, &dat, sizeof(dat)); if (dat.id == GPIOEVENT_EVENT_FALLING_EDGE) printf("button pushed\n"); } Run the same logic on another board which the polarity of the button is inverted; it drives level to be high when pushed, and level to be low when released. For this inversion we add flag GPIOHANDLE_REQUEST_ACTIVE_LOW: req.handleflags = GPIOHANDLE_REQUEST_INPUT | GPIOHANDLE_REQUEST_ACTIVE_LOW; req.eventflags = GPIOEVENT_REQUEST_FALLING_EDGE; At the result, there are no any events caught when the button is pushed. By the way, button releasing will emit a "falling" event. The timing of "falling" catching is not expected. Cc: stable@vger.kernel.org Signed-off-by: Michael Wu Tested-by: Bartosz Golaszewski Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 3a6ffb3c8c3274a39dc8f2514526e645c5d21753 Author: Andreas Koop Date: Mon Jul 22 12:03:06 2019 +0800 mmc: mmc_spi: Enable stable writes While using the mmc_spi driver occasionally errors like this popped up: mmcblk0: error -84 transferring data end_request: I/O error, dev mmcblk0, sector 581756 I looked on the Internet for occurrences of the same problem and came across a helpful post [1]. It includes source code to reproduce the bug. There is also an analysis about the cause. During transmission data in the supplied buffer is being modified. Thus the previously calculated checksum is not correct anymore. After some digging I found out that device drivers are supposed to report they need stable writes. To fix this I set the appropriate flag at queue initialization if CRC checksumming is enabled for that SPI host. [1] https://groups.google.com/forum/#!msg/sim1/gLlzWeXGFr8/KevXinUXfc8J Signed-off-by: Andreas Koop [shihpo: Rebase on top of v5.3-rc1] Signed-off-by: ShihPo Hung Cc: Paul Walmsley CC: stable@vger.kernel.org Signed-off-by: Ulf Hansson drivers/mmc/core/queue.c | 5 +++++ 1 file changed, 5 insertions(+) commit 3a855b7ac7d5021674aa3e1cc9d3bfd6b604e9c0 Author: Vaibhav Jain Date: Sat Jun 29 21:36:10 2019 +0530 powerpc/papr_scm: Force a scm-unbind if initial scm-bind fails In some cases initial bind of scm memory for an lpar can fail if previously it wasn't released using a scm-unbind hcall. This situation can arise due to panic of the previous kernel or forced lpar fadump. In such cases the H_SCM_BIND_MEM return a H_OVERLAP error. To mitigate such cases the patch updates papr_scm_probe() to force a call to drc_pmem_unbind() in case the initial bind of scm memory fails with EBUSY error. In case scm-bind operation again fails after the forced scm-unbind then we follow the existing error path. We also update drc_pmem_bind() to handle the H_OVERLAP error returned by phyp and indicate it as a EBUSY error back to the caller. Suggested-by: "Oliver O'Halloran" Signed-off-by: Vaibhav Jain Reviewed-by: Oliver O'Halloran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190629160610.23402-4-vaibhav@linux.ibm.com arch/powerpc/platforms/pseries/papr_scm.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 0d7fc080ba139a2a639d3732616403ccddfa2d36 Author: Vaibhav Jain Date: Sat Jun 29 21:36:09 2019 +0530 powerpc/papr_scm: Update drc_pmem_unbind() to use H_SCM_UNBIND_ALL The new hcall named H_SCM_UNBIND_ALL has been introduce that can unbind all or specific scm memory assigned to an lpar. This is more efficient than using H_SCM_UNBIND_MEM as currently we don't support partial unbind of scm memory. Hence this patch proposes following changes to drc_pmem_unbind(): * Update drc_pmem_unbind() to replace hcall H_SCM_UNBIND_MEM to H_SCM_UNBIND_ALL. * Update drc_pmem_unbind() to handles cases when PHYP asks the guest kernel to wait for specific amount of time before retrying the hcall via the 'LONG_BUSY' return value. * Ensure appropriate error code is returned back from the function in case of an error. Reviewed-by: Oliver O'Halloran Signed-off-by: Vaibhav Jain Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190629160610.23402-3-vaibhav@linux.ibm.com arch/powerpc/platforms/pseries/papr_scm.c | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) commit 6d140e7569db89a1b596c1c2d1c2293d5c594432 Author: Vaibhav Jain Date: Sat Jun 29 21:36:08 2019 +0530 powerpc/pseries: Update SCM hcall op-codes in hvcall.h Update the hvcalls.h to include op-codes for new hcalls introduce to manage SCM memory. Also update existing hcall definitions to reflect current papr specification for SCM. The removed hcall op-codes H_SCM_MEM_QUERY, H_SCM_BLOCK_CLEAR were transient proposals and there support was never implemented by Power-VM nor they were used anywhere in Linux kernel. Hence we don't expect anyone to be impacted by this change. Signed-off-by: Vaibhav Jain Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190629160610.23402-2-vaibhav@linux.ibm.com arch/powerpc/include/asm/hvcall.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 8d419adb0511c8f0a2324fefb27752051eacc995 Author: Julien Thierry Date: Wed Jul 17 11:32:15 2019 +0100 MAINTAINERS: Update my email address My @arm.com address will stop working in a couple of weeks. Update MAINTAINERS and .mailmap files with an address I'll have access to. Signed-off-by: Julien Thierry Signed-off-by: Will Deacon .mailmap | 1 + MAINTAINERS | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit 01233d47836d96264f3d66eda4514739b0ce7d9d Author: Suzuki K Poulose Date: Wed Jul 17 13:33:30 2019 +0100 MAINTAINERS: Fix spelling mistake in my name Fix a typo in my name for the KVM-ARM reviewers entry. Acked-by: Marc Zyngier Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0aafd138b322d0b1bec3f14cdef4be3374d9fc39 Author: Marc Zyngier Date: Tue Jul 16 18:43:08 2019 +0100 MAINTAINERS: Update my email address to @kernel.org I will soon lose access to my @arm.com email address, so let's update the MAINTAINERS file to point to my @kernel.org address, as well as .mailmap for good measure. Note that my @arm.com address will still work, but someone else will be reading whatever is sent there. Don't say you didn't know! Signed-off-by: Marc Zyngier Signed-off-by: Will Deacon .mailmap | 1 + MAINTAINERS | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) commit 665e985c2f41bebc3e6cee7e04c36a44afbc58f7 Author: Joe Perches Date: Tue Jul 9 22:04:19 2019 -0700 mmc: meson-mx-sdio: Fix misuse of GENMASK macro Arguments are supposed to be ordered high then low. Signed-off-by: Joe Perches Reviewed-by: Neil Armstrong Fixes: ed80a13bb4c4 ("mmc: meson-mx-sdio: Add a driver for the Amlogic Meson8 and Meson8b SoCs") Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson drivers/mmc/host/meson-mx-sdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ba2d139b02ba684c6c101de42fed782d6cd2b997 Author: Douglas Anderson Date: Mon Jul 8 12:56:13 2019 -0700 mmc: dw_mmc: Fix occasional hang after tuning on eMMC In commit 46d179525a1f ("mmc: dw_mmc: Wait for data transfer after response errors.") we fixed a tuning-induced hang that I saw when stress testing tuning on certain SD cards. I won't re-hash that whole commit, but the summary is that as a normal part of tuning you need to deal with transfer errors and there were cases where these transfer errors was putting my system into a bad state causing all future transfers to fail. That commit fixed handling of the transfer errors for me. In downstream Chrome OS my fix landed and had the same behavior for all SD/MMC commands. However, it looks like when the commit landed upstream we limited it to only SD tuning commands. Presumably this was to try to get around problems that Alim Akhtar reported on exynos [1]. Unfortunately while stress testing reboots (and suspend/resume) on some rk3288-based Chromebooks I found the same problem on the eMMC on some of my Chromebooks (the ones with Hynix eMMC). Since the eMMC tuning command is different (MMC_SEND_TUNING_BLOCK_HS200 vs. MMC_SEND_TUNING_BLOCK) we were basically getting back into the same situation. I'm hoping that whatever problems exynos was having in the past are somehow magically fixed now and we can make the behavior the same for all commands. [1] https://lkml.kernel.org/r/CAGOxZ53WfNbaMe0_AM0qBqU47kAfgmPBVZC8K8Y-_J3mDMqW4A@mail.gmail.com Fixes: 46d179525a1f ("mmc: dw_mmc: Wait for data transfer after response errors.") Signed-off-by: Douglas Anderson Cc: Marek Szyprowski Cc: Alim Akhtar Cc: Enric Balletbo i Serra Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit fc62113b32c95906b3ea8ba42e91014c7d0c6fa6 Author: Baolin Wang Date: Mon Jul 15 18:00:14 2019 +0800 mmc: host: sdhci-sprd: Fix the missing pm_runtime_put_noidle() When the SD host controller tries to probe again due to the derferred probe mechanism, it will always keep the SD host device as runtime resume state due to missing the runtime put operation in error path last time. Thus add the pm_runtime_put_noidle() in error path to make the PM runtime counter balance, which can make the SD host device's PM runtime work well. Signed-off-by: Baolin Wang Acked-by: Adrian Hunter Fixes: fb8bd90f83c4 ("mmc: sdhci-sprd: Add Spreadtrum's initial host controller") Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-sprd.c | 1 + 1 file changed, 1 insertion(+) commit 85697853beb2533ff4b387b4c26154c78425a0ff Merge: c8917b8ff09e 717261e1769d Author: Greg Kroah-Hartman Date: Mon Jul 22 14:08:06 2019 +0200 Merge tag 'misc-habanalabs-fixes-2019-07-22' of git://people.freedesktop.org/~gabbayo/linux into char-misc-linux Oded writes: This tag contains the following fixes: - Fix to VRHOT event handling from the ASIC. No need to reset the ASIC, just notify it in dmesg. - Fix printk specifier for printing dma address * tag 'misc-habanalabs-fixes-2019-07-22' of git://people.freedesktop.org/~gabbayo/linux: habanalabs: don't reset device when getting VRHOT habanalabs: use %pad for printing a dma_addr_t commit 1274204542f683e1d8491ebe9cc86284d5a8ebcc Author: Lubomir Rintel Date: Fri Jul 19 14:27:13 2019 +0200 spi: pxa2xx: Balance runtime PM enable/disable on error Don't undo the PM initialization if we error out before we managed to initialize it. The call to pm_runtime_disable() without being preceded by pm_runtime_enable() would disturb the balance of the Force. In practice, this happens if we fail to allocate any of the GPIOS ("cs", "ready") due to -EPROBE_DEFER because we're getting probled before the GPIO driver. Signed-off-by: Lubomir Rintel Link: https://lore.kernel.org/r/20190719122713.3444318-1-lkundrak@v3.sk Signed-off-by: Mark Brown drivers/spi/spi-pxa2xx.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 62ec3d13601bd626ca7a0edef6d45dbb753d94e8 Author: Masahiro Yamada Date: Sun Jul 21 23:23:08 2019 +0900 ASoC: SOF: use __u32 instead of uint32_t in uapi headers When CONFIG_UAPI_HEADER_TEST=y, exported headers are compile-tested to make sure they can be included from user-space. Currently, header.h and fw.h are excluded from the test coverage. To make them join the compile-test, we need to fix the build errors attached below. For a case like this, we decided to use __u{8,16,32,64} variable types in this discussion: https://lkml.org/lkml/2019/6/5/18 Build log: CC usr/include/sound/sof/header.h.s CC usr/include/sound/sof/fw.h.s In file included from :32:0: ./usr/include/sound/sof/header.h:19:2: error: unknown type name ‘uint32_t’ uint32_t magic; /**< 'S', 'O', 'F', '\0' */ ^~~~~~~~ ./usr/include/sound/sof/header.h:20:2: error: unknown type name ‘uint32_t’ uint32_t type; /**< component specific type */ ^~~~~~~~ ./usr/include/sound/sof/header.h:21:2: error: unknown type name ‘uint32_t’ uint32_t size; /**< size in bytes of data excl. this struct */ ^~~~~~~~ ./usr/include/sound/sof/header.h:22:2: error: unknown type name ‘uint32_t’ uint32_t abi; /**< SOF ABI version */ ^~~~~~~~ ./usr/include/sound/sof/header.h:23:2: error: unknown type name ‘uint32_t’ uint32_t reserved[4]; /**< reserved for future use */ ^~~~~~~~ ./usr/include/sound/sof/header.h:24:2: error: unknown type name ‘uint32_t’ uint32_t data[0]; /**< Component data - opaque to core */ ^~~~~~~~ In file included from :32:0: ./usr/include/sound/sof/fw.h:49:2: error: unknown type name ‘uint32_t’ uint32_t size; /* bytes minus this header */ ^~~~~~~~ ./usr/include/sound/sof/fw.h:50:2: error: unknown type name ‘uint32_t’ uint32_t offset; /* offset from base */ ^~~~~~~~ ./usr/include/sound/sof/fw.h:64:2: error: unknown type name ‘uint32_t’ uint32_t size; /* bytes minus this header */ ^~~~~~~~ ./usr/include/sound/sof/fw.h:65:2: error: unknown type name ‘uint32_t’ uint32_t num_blocks; /* number of blocks */ ^~~~~~~~ ./usr/include/sound/sof/fw.h:73:2: error: unknown type name ‘uint32_t’ uint32_t file_size; /* size of file minus this header */ ^~~~~~~~ ./usr/include/sound/sof/fw.h:74:2: error: unknown type name ‘uint32_t’ uint32_t num_modules; /* number of modules */ ^~~~~~~~ ./usr/include/sound/sof/fw.h:75:2: error: unknown type name ‘uint32_t’ uint32_t abi; /* version of header format */ ^~~~~~~~ Signed-off-by: Masahiro Yamada Link: https://lore.kernel.org/r/20190721142308.30306-1-yamada.masahiro@socionext.com Signed-off-by: Mark Brown include/uapi/sound/sof/fw.h | 16 +++++++++------- include/uapi/sound/sof/header.h | 14 ++++++++------ 2 files changed, 17 insertions(+), 13 deletions(-) commit f86621cd6c6f54edfdd62da347b2bbb8d7fddc8d Author: Enric Balletbo i Serra Date: Fri Jul 19 19:39:29 2019 +0200 SoC: rockchip: rockchip_max98090: Enable MICBIAS for headset keypress detection The TS3A227E says that the headset keypress detection needs the MICBIAS power in order to report the key events to ensure proper operation The headset keypress detection needs the MICBIAS power in order to report the key events all the time as long as MIC is present. So MICBIAS pin is forced on when a MICROPHONE is detected. On Veyron Minnie I observed that if the MICBIAS power is not present and the key press detection is activated (just because it is enabled when you insert a headset), it randomly reports a keypress on insert. E.g. (KEY_PLAYPAUSE) Event: (SW_HEADPHONE_INSERT), value 1 Event: (SW_MICROPHONE_INSERT), value 1 Event: -------------- SYN_REPORT ------------ Event: (KEY_PLAYPAUSE), value 1 Userspace thinks that KEY_PLAYPAUSE is pressed and produces the annoying effect that the media player starts a play/pause loop. Note that, although most of the time the key reported is the one associated with BTN_0, not always this is true. On my tests I also saw different keys reported Signed-off-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20190719173929.24065-1-enric.balletbo@collabora.com Signed-off-by: Mark Brown sound/soc/rockchip/rockchip_max98090.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 48dfd37a0f85400610153101c72222bf01523699 Author: Shengjiu Wang Date: Tue Jul 16 17:45:47 2019 +0800 ASoC: cs42xx8: Fix MFREQ selection issue for async mode When sample rate of TX is different with sample rate of RX in async mode, the MFreq selection will be wrong. For example, sysclk = 24.576MHz, TX rate = 96000Hz, RX rate = 48000Hz. Then ratio of TX = 256, ratio of RX = 512, For MFreq is shared by TX and RX instance, the correct value of MFreq is 2 for both TX and RX. But original method will cause MFreq = 0 for TX, MFreq = 2 for RX. If TX is started after RX, RX will be impacted, RX work abnormal with MFreq = 0. This patch is to select proper MFreq value according to TX rate and RX rate. Fixes: 0c516b4ff85c ("ASoC: cs42xx8: Add codec driver support for CS42448/CS42888") Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/20190716094547.46787-1-shengjiu.wang@nxp.com Signed-off-by: Mark Brown sound/soc/codecs/cs42xx8.c | 116 +++++++++++++++++++++++++++++++++++++-------- 1 file changed, 97 insertions(+), 19 deletions(-) commit 8dd26dff00c0636b1d8621acaeef3f6f3a39dd77 Author: Charles Keepax Date: Thu Jul 18 09:43:33 2019 +0100 ASoC: dapm: Fix handling of custom_stop_condition on DAPM graph walks DPCM uses snd_soc_dapm_dai_get_connected_widgets to build a list of the widgets connected to a specific front end DAI so it can search through this list for available back end DAIs. The custom_stop_condition was added to is_connected_ep to facilitate this list not containing more widgets than is necessary. Doing so both speeds up the DPCM handling as less widgets need to be searched and avoids issues with CODEC to CODEC links as these would be confused with back end DAIs if they appeared in the list of available widgets. custom_stop_condition was implemented by aborting the graph walk when the condition is triggered, however there is an issue with this approach. Whilst walking the graph is_connected_ep should update the endpoints cache on each widget, if the walk is aborted the number of attached end points is unknown for that sub-graph. When the stop condition triggered, the original patch ignored the triggering widget and returned zero connected end points; a later patch updated this to set the triggering widget's cache to 1 and return that. Both of these approaches result in inaccurate values being stored in various end point caches as the values propagate back through the graph, which can result in later issues with widgets powering/not powering unexpectedly. As the original goal was to reduce the size of the widget list passed to the DPCM code, the simplest solution is to limit the functionality of the custom_stop_condition to the widget list. This means the rest of the graph will still be processed resulting in correct end point caches, but only widgets up to the stop condition will be added to the returned widget list. Fixes: 6742064aef7f ("ASoC: dapm: support user-defined stop condition in dai_get_connected_widgets") Fixes: 5fdd022c2026 ("ASoC: dpcm: play nice with CODEC<->CODEC links") Fixes: 09464974eaa8 ("ASoC: dapm: Fix to return correct path list in is_connected_ep.") Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20190718084333.15598-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown sound/soc/soc-dapm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c6bf2ae931adbd3e10967e12142856439a211813 Author: Jan Kiszka Date: Sun Jul 21 16:01:36 2019 +0200 KVM: nVMX: Set cached_vmcs12 and cached_shadow_vmcs12 NULL after free Shall help finding use-after-free bugs earlier. Suggested-by: Liran Alon Signed-off-by: Jan Kiszka Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 2 ++ 1 file changed, 2 insertions(+) commit d9a710e5fc4941944d565b013414e9fdc66242b5 Author: Wanpeng Li Date: Mon Jul 22 12:26:21 2019 +0800 KVM: X86: Dynamically allocate user_fpu After reverting commit 240c35a3783a (kvm: x86: Use task structs fpu field for user), struct kvm_vcpu is 19456 bytes on my server, PAGE_ALLOC_COSTLY_ORDER(3) is the order at which allocations are deemed costly to service. In serveless scenario, one host can service hundreds/thoudands firecracker/kata-container instances, howerver, new instance will fail to launch after memory is too fragmented to allocate kvm_vcpu struct on host, this was observed in some cloud provider product environments. This patch dynamically allocates user_fpu, kvm_vcpu is 15168 bytes now on my Skylake server. Cc: Paolo Bonzini Cc: Radim Krčmář Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 2 +- arch/x86/kvm/svm.c | 13 ++++++++++++- arch/x86/kvm/vmx/vmx.c | 13 ++++++++++++- arch/x86/kvm/x86.c | 4 ++-- 4 files changed, 27 insertions(+), 5 deletions(-) commit e751732486eb3f159089a64d1901992b1357e7cc Author: Wanpeng Li Date: Mon Jul 22 12:26:20 2019 +0800 KVM: X86: Fix fpu state crash in kvm guest The idea before commit 240c35a37 (which has just been reverted) was that we have the following FPU states: userspace (QEMU) guest --------------------------------------------------------------------------- processor vcpu->arch.guest_fpu >>> KVM_RUN: kvm_load_guest_fpu vcpu->arch.user_fpu processor >>> preempt out vcpu->arch.user_fpu current->thread.fpu >>> preempt in vcpu->arch.user_fpu processor >>> back to userspace >>> kvm_put_guest_fpu processor vcpu->arch.guest_fpu --------------------------------------------------------------------------- With the new lazy model we want to get the state back to the processor when schedule in from current->thread.fpu. Reported-by: Thomas Lambertz Reported-by: anthony Tested-by: anthony Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Thomas Lambertz Cc: anthony Cc: stable@vger.kernel.org Fixes: 5f409e20b (x86/fpu: Defer FPU state load until return to userspace) Signed-off-by: Wanpeng Li [Add a comment in front of the warning. - Paolo] Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit ec269475cba7bcdd1eb8fdf8e87f4c6c81a376fe Author: Paolo Bonzini Date: Mon Jul 22 13:31:27 2019 +0200 Revert "kvm: x86: Use task structs fpu field for user" This reverts commit 240c35a3783ab9b3a0afaba0dde7291295680a6b ("kvm: x86: Use task structs fpu field for user", 2018-11-06). The commit is broken and causes QEMU's FPU state to be destroyed when KVM_RUN is preempted. Fixes: 240c35a3783a ("kvm: x86: Use task structs fpu field for user") Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 7 ++++--- arch/x86/kvm/x86.c | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) commit cf64527bb33f6cec2ed50f89182fc4688d0056b6 Author: Jan Kiszka Date: Sun Jul 21 13:52:18 2019 +0200 KVM: nVMX: Clear pending KVM_REQ_GET_VMCS12_PAGES when leaving nested Letting this pend may cause nested_get_vmcs12_pages to run against an invalid state, corrupting the effective vmcs of L1. This was triggerable in QEMU after a guest corruption in L2, followed by a L1 reset. Signed-off-by: Jan Kiszka Reviewed-by: Liran Alon Cc: stable@vger.kernel.org Fixes: 7f7f1ba33cf2 ("KVM: x86: do not load vmcs12 pages while still in SMM") Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 2 ++ 1 file changed, 2 insertions(+) commit 5a9060e9437be47f92f85a2b5c7cd73314d080e8 Author: Anshuman Khandual Date: Tue Jul 2 11:02:55 2019 +0530 arm64: mm: Drop pte_huge() This helper is required from generic huge_pte_alloc() which is available when arch subscribes ARCH_WANT_GENERAL_HUGETLB. arm64 implements it's own huge_pte_alloc() and does not depend on the generic definition. Drop this helper which is redundant on arm64. Cc: Mark Rutland Cc: Steve Capper Acked-by: Catalin Marinas Signed-off-by: Anshuman Khandual Signed-off-by: Will Deacon arch/arm64/include/asm/pgtable.h | 1 - 1 file changed, 1 deletion(-) commit ed2f3e9ff637c7c9f65b98468a084393683ff93b Author: Dave Martin Date: Wed Jun 12 17:00:34 2019 +0100 arm64/sve: Fix a couple of magic numbers for the Z-reg count There are some hand-written instances of "32" to express the number of SVE Z-registers. Since this code was written a #define was added for this, so convert trivial instances of this magic number as appropriate. No functional change. Reviewed-by: Julien Grall Acked-by: Catalin Marinas Signed-off-by: Dave Martin Signed-off-by: Will Deacon arch/arm64/kernel/fpsimd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d16af870a70e0e399126c6419f92e7badf5e465b Author: Dave Martin Date: Wed Jun 12 17:00:33 2019 +0100 arm64/sve: Factor out FPSIMD to SVE state conversion Currently we convert from FPSIMD to SVE register state in memory in two places. To ease future maintenance, let's consolidate this in one place. Reviewed-by: Julien Grall Acked-by: Catalin Marinas Signed-off-by: Dave Martin Signed-off-by: Will Deacon arch/arm64/kernel/fpsimd.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) commit 592700f094be229b5c9cc1192d5cea46eb4c7afc Author: Mark Rutland Date: Tue Jul 2 14:07:29 2019 +0100 arm64: stacktrace: Better handle corrupted stacks The arm64 stacktrace code is careful to only dereference frame records in valid stack ranges, ensuring that a corrupted frame record won't result in a faulting access. However, it's still possible for corrupt frame records to result in infinite loops in the stacktrace code, which is also undesirable. This patch ensures that we complete a stacktrace in finite time, by keeping track of which stacks we have already completed unwinding, and verifying that if the next frame record is on the same stack, it is at a higher address. As this has turned out to be particularly subtle, comments are added to explain the procedure. Signed-off-by: Mark Rutland Reviewed-by: James Morse Tested-by: James Morse Acked-by: Dave Martin Acked-by: Catalin Marinas Cc: Tengfei Fan Signed-off-by: Will Deacon arch/arm64/include/asm/stacktrace.h | 57 +++++++++++++++++++++++++++++++------ arch/arm64/kernel/stacktrace.c | 40 +++++++++++++++++++++++++- 2 files changed, 88 insertions(+), 9 deletions(-) commit f3dcbe67ed424f1cf92065f9ad0cc647f2b44eac Author: Dave Martin Date: Tue Jul 2 14:07:28 2019 +0100 arm64: stacktrace: Factor out backtrace initialisation Some common code is required by each stacktrace user to initialise struct stackframe before the first call to unwind_frame(). In preparation for adding to the common code, this patch factors it out into a separate function start_backtrace(), and modifies the stacktrace callers appropriately. No functional change. Signed-off-by: Dave Martin [Mark: drop tsk argument, update more callsites] Signed-off-by: Mark Rutland Reviewed-by: James Morse Acked-by: Catalin Marinas Signed-off-by: Will Deacon arch/arm64/include/asm/stacktrace.h | 10 ++++++++++ arch/arm64/kernel/perf_callchain.c | 7 +------ arch/arm64/kernel/process.c | 7 ++----- arch/arm64/kernel/return_address.c | 9 +++------ arch/arm64/kernel/stacktrace.c | 19 ++++++------------- arch/arm64/kernel/time.c | 7 ++----- arch/arm64/kernel/traps.c | 13 ++++++------- 7 files changed, 30 insertions(+), 42 deletions(-) commit 8caa6e2be72313c170f2b30e8475323526dd7ed1 Author: Dave Martin Date: Tue Jul 2 14:07:27 2019 +0100 arm64: stacktrace: Constify stacktrace.h functions on_accessible_stack() and on_task_stack() shouldn't (and don't) modify their task argument, so it can be const. This patch adds the appropriate modifiers. Whitespace violations in the parameter lists are fixed at the same time. No functional change. Acked-by: Catalin Marinas Signed-off-by: Dave Martin [Mark: fixup const location, whitespace] Signed-off-by: Mark Rutland Signed-off-by: Will Deacon arch/arm64/include/asm/stacktrace.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit a88754b23114cfb61efed56ed448c05e4cb7e20d Author: Vincenzo Frascino Date: Fri Jul 19 11:10:18 2019 +0100 arm64: vdso: Cleanup Makefiles The recent changes to the vdso library for arm64 and the introduction of the compat vdso library have generated some misalignment in the Makefiles. Cleanup the Makefiles for vdso and vdso32 libraries: * Removing unused rules. * Unifying the displayed compilation messages. * Simplifying the generic library inclusion path for arm64 vdso. Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Vincenzo Frascino Signed-off-by: Will Deacon arch/arm64/kernel/vdso/Makefile | 9 +++------ arch/arm64/kernel/vdso32/Makefile | 10 +++++----- 2 files changed, 8 insertions(+), 11 deletions(-) commit 2e2f3c9b864d9f21fb82aa8da5ac9adc1e020f60 Author: Naohiro Aota Date: Fri Jul 12 19:15:56 2019 +0900 arm64: vdso: fix flip/flop vdso build bug Running "make" on an already compiled kernel tree will rebuild the kernel even without any modifications: $ make ARCH=arm64 CROSS_COMPILE=/usr/bin/aarch64-unknown-linux-gnu- arch/arm64/Makefile:58: CROSS_COMPILE_COMPAT not defined or empty, the compat vDSO will not be built CALL scripts/checksyscalls.sh CALL scripts/atomic/check-atomics.sh VDSOCHK arch/arm64/kernel/vdso/vdso.so.dbg VDSOSYM include/generated/vdso-offsets.h CHK include/generated/compile.h CC arch/arm64/kernel/signal.o CC arch/arm64/kernel/vdso.o CC arch/arm64/kernel/signal32.o LD arch/arm64/kernel/vdso/vdso.so.dbg OBJCOPY arch/arm64/kernel/vdso/vdso.so AS arch/arm64/kernel/vdso/vdso.o AR arch/arm64/kernel/vdso/built-in.a AR arch/arm64/kernel/built-in.a GEN .version CHK include/generated/compile.h UPD include/generated/compile.h CC init/version.o AR init/built-in.a LD vmlinux.o This is the same bug fixed in commit 92a4728608a8 ("x86/boot: Fix if_changed build flip/flop bug"). We cannot use two "if_changed" in one target. Fix this build bug by merging two commands into one function. Fixes: a7f71a2c8903 ("arm64: compat: Add vDSO") Fixes: 28b1a824a4f4 ("arm64: vdso: Substitute gettimeofday() with C implementation") Reviewed-by: Masahiro Yamada Reviewed-by: Vincenzo Frascino Tested-by: Vincenzo Frascino Co-developed-by: Vincenzo Frascino Signed-off-by: Vincenzo Frascino Signed-off-by: Naohiro Aota [will: merged in compat fix from Vincenzo and made rule names consistent] Signed-off-by: Will Deacon arch/arm64/kernel/vdso/Makefile | 6 ++++-- arch/arm64/kernel/vdso32/Makefile | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) commit 85751e9e5b1480fc675106aeaf94fadb8028469b Author: Vincenzo Frascino Date: Wed Jul 10 15:01:19 2019 +0100 arm64: vdso: Fix population of AT_SYSINFO_EHDR for compat vdso Prior to the introduction of Unified vDSO support and compat layer for vDSO on arm64, AT_SYSINFO_EHDR was not defined for compat tasks. In the current implementation, AT_SYSINFO_EHDR is defined even if the compat vdso layer is not built, which has been shown to break Android applications using bionic: | 01-01 01:22:14.097 755 755 F libc : Fatal signal 11 (SIGSEGV), | code 1 (SEGV_MAPERR), fault addr 0x3cf2c96c in tid 755 (cameraserver), | pid 755 (cameraserver) | 01-01 01:22:14.112 759 759 F libc : Fatal signal 11 (SIGSEGV), | code 1 (SEGV_MAPERR), fault addr 0x3cf2c96c in tid 759 | (android.hardwar), pid 759 (android.hardwar) | 01-01 01:22:14.120 756 756 F libc : Fatal signal 11 (SIGSEGV) | code 1 (SEGV_MAPERR), fault addr 0x3cf2c96c in tid 756 (drmserver), | pid 756 (drmserver) Restore the old behaviour by making sure that AT_SYSINFO_EHDR for compat tasks is defined only when CONFIG_COMPAT_VDSO is enabled. Reported-by: John Stultz Tested-by: John Stultz Signed-off-by: Vincenzo Frascino Signed-off-by: Will Deacon arch/arm64/include/asm/elf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f76cb066edd1eef84edc85e5dd93c8aee71992da Author: Zhang Rui Date: Fri Jul 19 23:25:14 2019 +0800 powercap: Invoke powercap_init() and rapl_init() earlier The MMIO RAPL interface driver depends on both powercap subsystem and the intel_rapl_common code. But when all of them are built-in, the MMIO RAPL interface driver can be loaded before the other two and this breaks the system during boot. Fix this by adjusting the init order of the powercap subsystem and the intel_rapl_common code, so that it can be initialized first. Fixes: 555c45fe0d04 ("int340X/processor_thermal_device: add support for MMIO RAPL") Reported-by: Kenneth R. Crudup Tested-by: Kenneth R. Crudup Signed-off-by: Zhang Rui [ rjw: Subject & changelog ] Signed-off-by: Rafael J. Wysocki drivers/powercap/intel_rapl_common.c | 2 +- drivers/powercap/powercap_sys.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit f9adc23ee91e6f561bb70c6147d8d45bd164d62f Author: Vasily Averin Date: Tue Jul 16 09:22:03 2019 +0300 futex: Cleanup generic SMP variant of arch_futex_atomic_op_inuser() The generic SMP variant of arch_futex_atomic_op_inuser() returns always -ENOSYS so the switch case and surrounding code are pointless. Remove it and just return -ENOSYS. Signed-off-by: Vasily Averin Signed-off-by: Thomas Gleixner Acked-by: Arnd Bergmann Link: https://lkml.kernel.org/r/12bdaca8-99eb-e576-f842-5970ab1d6a92@virtuozzo.com include/asm-generic/futex.h | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) commit 385065734cd417b9d7739b2ebb62c960aeb3ccb5 Author: Cao jin Date: Fri Jul 19 16:16:35 2019 +0800 x86/irq/64: Update stale comment Commit e6401c130931 ("x86/irq/64: Split the IRQ stack into its own pages") missed to update one piece of comment as it did to its peer in Xen, which will confuse people who still need to read comment. Signed-off-by: Cao jin Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20190719081635.26528-1-caoj.fnst@cn.fujitsu.com arch/x86/kernel/head_64.S | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit d02f1aa39189e0619c3525d5cd03254e61bf606a Author: Hans de Goede Date: Sun Jul 21 17:24:18 2019 +0200 x86/sysfb_efi: Add quirks for some devices with swapped width and height Some Lenovo 2-in-1s with a detachable keyboard have a portrait screen but advertise a landscape resolution and pitch, resulting in a messed up display if the kernel tries to show anything on the efifb (because of the wrong pitch). Fix this by adding a new DMI match table for devices which need to have their width and height swapped. At first it was tried to use the existing table for overriding some of the efifb parameters, but some of the affected devices have variants with different LCD resolutions which will not work with hardcoded override values. Reference: https://bugzilla.redhat.com/show_bug.cgi?id=1730783 Signed-off-by: Hans de Goede Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20190721152418.11644-1-hdegoede@redhat.com arch/x86/kernel/sysfb_efi.c | 46 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) commit 2af7c85714d8cafadf925d55441458eae312cd6b Author: Eiichi Tsukata Date: Mon Jul 22 17:32:16 2019 +0900 x86/stacktrace: Prevent access_ok() warnings in arch_stack_walk_user() When arch_stack_walk_user() is called from atomic contexts, access_ok() can trigger the following warning if compiled with CONFIG_DEBUG_ATOMIC_SLEEP=y. Reproducer: // CONFIG_DEBUG_ATOMIC_SLEEP=y # cd /sys/kernel/debug/tracing # echo 1 > options/userstacktrace # echo 1 > events/irq/irq_handler_entry/enable WARNING: CPU: 0 PID: 2649 at arch/x86/kernel/stacktrace.c:103 arch_stack_walk_user+0x6e/0xf6 CPU: 0 PID: 2649 Comm: bash Not tainted 5.3.0-rc1+ #99 RIP: 0010:arch_stack_walk_user+0x6e/0xf6 Call Trace: stack_trace_save_user+0x10a/0x16d trace_buffer_unlock_commit_regs+0x185/0x240 trace_event_buffer_commit+0xec/0x330 trace_event_raw_event_irq_handler_entry+0x159/0x1e0 __handle_irq_event_percpu+0x22d/0x440 handle_irq_event_percpu+0x70/0x100 handle_irq_event+0x5a/0x8b handle_edge_irq+0x12f/0x3f0 handle_irq+0x34/0x40 do_IRQ+0xa6/0x1f0 common_interrupt+0xf/0xf Fix it by calling __range_not_ok() directly instead of access_ok() as copy_from_user_nmi() does. This is fine here because the actual copy is inside a pagefault disabled region. Reported-by: Juri Lelli Signed-off-by: Eiichi Tsukata Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20190722083216.16192-2-devel@etsukata.com arch/x86/kernel/stacktrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3f8fd02b1bf1d7ba964485a56f2f4b53ae88c167 Author: Joerg Roedel Date: Fri Jul 19 20:46:52 2019 +0200 mm/vmalloc: Sync unmappings in __purge_vmap_area_lazy() On x86-32 with PTI enabled, parts of the kernel page-tables are not shared between processes. This can cause mappings in the vmalloc/ioremap area to persist in some page-tables after the region is unmapped and released. When the region is re-used the processes with the old mappings do not fault in the new mappings but still access the old ones. This causes undefined behavior, in reality often data corruption, kernel oopses and panics and even spontaneous reboots. Fix this problem by activly syncing unmaps in the vmalloc/ioremap area to all page-tables in the system before the regions can be re-used. References: https://bugzilla.suse.com/show_bug.cgi?id=1118689 Fixes: 5d72b4fba40ef ('x86, mm: support huge I/O mapping capability I/F') Signed-off-by: Joerg Roedel Signed-off-by: Thomas Gleixner Reviewed-by: Dave Hansen Link: https://lkml.kernel.org/r/20190719184652.11391-4-joro@8bytes.org mm/vmalloc.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 8e998fc24de47c55b47a887f6c95ab91acd4a720 Author: Joerg Roedel Date: Fri Jul 19 20:46:51 2019 +0200 x86/mm: Sync also unmappings in vmalloc_sync_all() With huge-page ioremap areas the unmappings also need to be synced between all page-tables. Otherwise it can cause data corruption when a region is unmapped and later re-used. Make the vmalloc_sync_one() function ready to sync unmappings and make sure vmalloc_sync_all() iterates over all page-tables even when an unmapped PMD is found. Fixes: 5d72b4fba40ef ('x86, mm: support huge I/O mapping capability I/F') Signed-off-by: Joerg Roedel Signed-off-by: Thomas Gleixner Reviewed-by: Dave Hansen Link: https://lkml.kernel.org/r/20190719184652.11391-3-joro@8bytes.org arch/x86/mm/fault.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 51b75b5b563a2637f9d8dc5bd02a31b2ff9e5ea0 Author: Joerg Roedel Date: Fri Jul 19 20:46:50 2019 +0200 x86/mm: Check for pfn instead of page in vmalloc_sync_one() Do not require a struct page for the mapped memory location because it might not exist. This can happen when an ioremapped region is mapped with 2MB pages. Fixes: 5d72b4fba40ef ('x86, mm: support huge I/O mapping capability I/F') Signed-off-by: Joerg Roedel Signed-off-by: Thomas Gleixner Reviewed-by: Dave Hansen Link: https://lkml.kernel.org/r/20190719184652.11391-2-joro@8bytes.org arch/x86/mm/fault.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2ca99396333999b9b5c5b91b36cbccacfe571aaf Author: Sébastien Szymanski Date: Thu Jul 4 13:00:53 2019 +0200 ARM: dts: imx6ul: fix clock frequency property name of I2C buses A few boards set clock frequency of their I2C buses with "clock_frequency" property. The right property is "clock-frequency". Signed-off-by: Sébastien Szymanski Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6ul-14x14-evk.dtsi | 2 +- arch/arm/boot/dts/imx6ul-geam.dts | 2 +- arch/arm/boot/dts/imx6ul-isiot.dtsi | 2 +- arch/arm/boot/dts/imx6ul-pico-hobbit.dts | 2 +- arch/arm/boot/dts/imx6ul-pico-pi.dts | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) commit e4091bdd2fd957793a10449a8682c767578b0430 Author: Christophe JAILLET Date: Sun Jul 21 12:25:58 2019 +0200 ALSA: line6: Fix a typo s/Vairax/Variax/ Signed-off-by: Christophe JAILLET Signed-off-by: Takashi Iwai sound/usb/line6/variax.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c8917b8ff09e8a4d6ef77e32ce0052f7158baa1f Author: Mauro Rossi Date: Mon Jul 22 07:55:36 2019 +0200 firmware: fix build errors in paged buffer handling code fw_{grow,map}_paged_buf() need to be defined as static inline when CONFIG_FW_LOADER_PAGED_BUF is not enabled, infact fw_free_paged_buf() is also defined as static inline when CONFIG_FW_LOADER_PAGED_BUF is not enabled. Fixes the following mutiple definition building errors for Android kernel: drivers/base/firmware_loader/fallback_efi.o: In function `fw_grow_paged_buf': fallback_efi.c:(.text+0x0): multiple definition of `fw_grow_paged_buf' drivers/base/firmware_loader/main.o:(.text+0x73b): first defined here drivers/base/firmware_loader/fallback_efi.o: In function `fw_map_paged_buf': fallback_efi.c:(.text+0xf): multiple definition of `fw_map_paged_buf' drivers/base/firmware_loader/main.o:(.text+0x74a): first defined here [ slightly corrected the patch description -- tiwai ] Fixes: 5342e7093ff2 ("firmware: Factor out the paged buffer handling code") Fixes: 82fd7a8142a1 ("firmware: Add support for loading compressed files") Signed-off-by: Mauro Rossi Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20190722055536.15342-1-tiwai@suse.de Signed-off-by: Greg Kroah-Hartman drivers/base/firmware_loader/firmware.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9310a7ba6de8cce6209e3e8a3cdf733f824cdd9b Author: Zhengyuan Liu Date: Mon Jul 22 10:23:27 2019 +0800 io_uring: track io length in async_list based on bytes We are using PAGE_SIZE as the unit to determine if the total len in async_list has exceeded max_pages, it's not fair for smaller io sizes. For example, if we are doing 1k-size io streams, we will never exceed max_pages since len >>= PAGE_SHIFT always gets zero. So use original bytes to make it more accurate. Signed-off-by: Zhengyuan Liu Signed-off-by: Jens Axboe fs/io_uring.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) commit bd11b3a391e3df6fa958facbe4b3f9f4cca9bd49 Author: Jens Axboe Date: Sat Jul 20 08:37:31 2019 -0600 io_uring: don't use iov_iter_advance() for fixed buffers Hrvoje reports that when a large fixed buffer is registered and IO is being done to the latter pages of said buffer, the IO submission time is much worse: reading to the start of the buffer: 11238 ns reading to the end of the buffer: 1039879 ns In fact, it's worse by two orders of magnitude. The reason for that is how io_uring figures out how to setup the iov_iter. We point the iter at the first bvec, and then use iov_iter_advance() to fast-forward to the offset within that buffer we need. However, that is abysmally slow, as it entails iterating the bvecs that we setup as part of buffer registration. There's really no need to use this generic helper, as we know it's a BVEC type iterator, and we also know that each bvec is PAGE_SIZE in size, apart from possibly the first and last. Hence we can just use a shift on the offset to find the right index, and then adjust the iov_iter appropriately. After this fix, the timings are: reading to the start of the buffer: 10135 ns reading to the end of the buffer: 1377 ns Or about an 755x improvement for the tail page. Reported-by: Hrvoje Zeba Tested-by: Hrvoje Zeba Signed-off-by: Jens Axboe fs/io_uring.c | 40 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) commit 6a43074e2f461c2c49a607f9f6f5218d53f97d1e Author: Jens Axboe Date: Tue Jul 16 13:56:42 2019 -0600 block: properly handle IOCB_NOWAIT for async O_DIRECT IO A caller is supposed to pass in REQ_NOWAIT if we can't block for any given operation, but O_DIRECT for block devices just ignore this. Hence we'll block for various resource shortages on the block layer side, like having to wait for requests. Use the new REQ_NOWAIT_INLINE to ask for this error to be returned inline, so we can handle it appropriately and return -EAGAIN to the caller. Signed-off-by: Jens Axboe fs/block_dev.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 50 insertions(+), 8 deletions(-) commit 893a1c97205a3ece0cbb3f571a3b972080f3b4c7 Author: Jens Axboe Date: Tue Jul 16 13:55:23 2019 -0600 blk-mq: allow REQ_NOWAIT to return an error inline By default, if a caller sets REQ_NOWAIT and we need to block, we'll return -EAGAIN through the bio->bi_end_io() callback. For some use cases, this makes it hard to use. Allow a caller to ask for inline return of errors related to blocking by also setting REQ_NOWAIT_INLINE. Signed-off-by: Jens Axboe block/blk-mq.c | 8 ++++++-- include/linux/blk_types.h | 5 ++++- 2 files changed, 10 insertions(+), 3 deletions(-) commit b617158dc096709d8600c53b6052144d12b89fab Author: Eric Dumazet Date: Fri Jul 19 11:52:33 2019 -0700 tcp: be more careful in tcp_fragment() Some applications set tiny SO_SNDBUF values and expect TCP to just work. Recent patches to address CVE-2019-11478 broke them in case of losses, since retransmits might be prevented. We should allow these flows to make progress. This patch allows the first and last skb in retransmit queue to be split even if memory limits are hit. It also adds the some room due to the fact that tcp_sendmsg() and tcp_sendpage() might overshoot sk_wmem_queued by about one full TSO skb (64KB size). Note this allowance was already present in stable backports for kernels < 4.15 Note for < 4.15 backports : tcp_rtx_queue_tail() will probably look like : static inline struct sk_buff *tcp_rtx_queue_tail(const struct sock *sk) { struct sk_buff *skb = tcp_send_head(sk); return skb ? tcp_write_queue_prev(sk, skb) : tcp_write_queue_tail(sk); } Fixes: f070ef2ac667 ("tcp: tcp_fragment() should apply sane memory limits") Signed-off-by: Eric Dumazet Reported-by: Andrew Prout Tested-by: Andrew Prout Tested-by: Jonathan Lemon Tested-by: Michal Kubecek Acked-by: Neal Cardwell Acked-by: Yuchung Cheng Acked-by: Christoph Paasch Cc: Jonathan Looney Signed-off-by: David S. Miller include/net/tcp.h | 5 +++++ net/ipv4/tcp_output.c | 13 +++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) commit be4363bdf0ce9530f15aa0a03d1060304d116b15 Author: Haiyang Zhang Date: Fri Jul 19 17:33:51 2019 +0000 hv_netvsc: Fix extra rcu_read_unlock in netvsc_recv_callback() There is an extra rcu_read_unlock left in netvsc_recv_callback(), after a previous patch that removes RCU from this function. This patch removes the extra RCU unlock. Fixes: 345ac08990b8 ("hv_netvsc: pass netvsc_device to receive callback") Signed-off-by: Haiyang Zhang Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 1 - 1 file changed, 1 deletion(-) commit f16d80b75a096c52354c6e0a574993f3b0dfbdfe Author: Michael Neuling Date: Fri Jul 19 15:05:02 2019 +1000 powerpc/tm: Fix oops on sigreturn on systems without TM On systems like P9 powernv where we have no TM (or P8 booted with ppc_tm=off), userspace can construct a signal context which still has the MSR TS bits set. The kernel tries to restore this context which results in the following crash: Unexpected TM Bad Thing exception at c0000000000022fc (msr 0x8000000102a03031) tm_scratch=800000020280f033 Oops: Unrecoverable exception, sig: 6 [#1] LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA pSeries Modules linked in: CPU: 0 PID: 1636 Comm: sigfuz Not tainted 5.2.0-11043-g0a8ad0ffa4 #69 NIP: c0000000000022fc LR: 00007fffb2d67e48 CTR: 0000000000000000 REGS: c00000003fffbd70 TRAP: 0700 Not tainted (5.2.0-11045-g7142b497d8) MSR: 8000000102a03031 CR: 42004242 XER: 00000000 CFAR: c0000000000022e0 IRQMASK: 0 GPR00: 0000000000000072 00007fffb2b6e560 00007fffb2d87f00 0000000000000669 GPR04: 00007fffb2b6e728 0000000000000000 0000000000000000 00007fffb2b6f2a8 GPR08: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 GPR12: 0000000000000000 00007fffb2b76900 0000000000000000 0000000000000000 GPR16: 00007fffb2370000 00007fffb2d84390 00007fffea3a15ac 000001000a250420 GPR20: 00007fffb2b6f260 0000000010001770 0000000000000000 0000000000000000 GPR24: 00007fffb2d843a0 00007fffea3a14a0 0000000000010000 0000000000800000 GPR28: 00007fffea3a14d8 00000000003d0f00 0000000000000000 00007fffb2b6e728 NIP [c0000000000022fc] rfi_flush_fallback+0x7c/0x80 LR [00007fffb2d67e48] 0x7fffb2d67e48 Call Trace: Instruction dump: e96a0220 e96a02a8 e96a0330 e96a03b8 394a0400 4200ffdc 7d2903a6 e92d0c00 e94d0c08 e96d0c10 e82d0c18 7db242a6 <4c000024> 7db243a6 7db142a6 f82d0c18 The problem is the signal code assumes TM is enabled when CONFIG_PPC_TRANSACTIONAL_MEM is enabled. This may not be the case as with P9 powernv or if `ppc_tm=off` is used on P8. This means any local user can crash the system. Fix the problem by returning a bad stack frame to the user if they try to set the MSR TS bits with sigreturn() on systems where TM is not supported. Found with sigfuz kernel selftest on P9. This fixes CVE-2019-13648. Fixes: 2b0a576d15e0 ("powerpc: Add new transactional memory state to the signal context") Cc: stable@vger.kernel.org # v3.9 Reported-by: Praveen Pandey Signed-off-by: Michael Neuling Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190719050502.405-1-mikey@neuling.org arch/powerpc/kernel/signal_32.c | 3 +++ arch/powerpc/kernel/signal_64.c | 5 +++++ 2 files changed, 8 insertions(+) commit ae00fcc51e714ce0fc72382332147ffffcf9a883 Author: Linus Walleij Date: Mon Jul 22 00:41:57 2019 +0200 ARM: Delete netx a second time Commit ceb02dcf676f ARM: delete netx machine deleted the mach-netx machine. Then eight days later it was resurrected by SPDX tag fixes. I think. Taking the liberty to fix some additional debug uart cruft. Link: https://lore.kernel.org/r/20190721224157.6597-1-linus.walleij@linaro.org Fixes: ceb02dcf676f ("ARM: delete netx machine") Acked-By: Robert Schwebel Acked-by: Sascha Hauer Signed-off-by: Linus Walleij Signed-off-by: Olof Johansson arch/arm/Kconfig.debug | 5 - arch/arm/mach-netx/Kconfig | 22 -- arch/arm/mach-netx/Makefile | 13 - arch/arm/mach-netx/Makefile.boot | 3 - arch/arm/mach-netx/fb.c | 65 ----- arch/arm/mach-netx/fb.h | 12 - arch/arm/mach-netx/generic.c | 182 ------------ arch/arm/mach-netx/generic.h | 14 - arch/arm/mach-netx/include/mach/hardware.h | 27 -- arch/arm/mach-netx/include/mach/irqs.h | 58 ---- arch/arm/mach-netx/include/mach/netx-regs.h | 420 --------------------------- arch/arm/mach-netx/include/mach/pfifo.h | 42 --- arch/arm/mach-netx/include/mach/uncompress.h | 63 ---- arch/arm/mach-netx/include/mach/xc.h | 30 -- arch/arm/mach-netx/nxdb500.c | 197 ------------- arch/arm/mach-netx/nxdkn.c | 90 ------ arch/arm/mach-netx/nxeb500hmi.c | 174 ----------- arch/arm/mach-netx/pfifo.c | 56 ---- arch/arm/mach-netx/time.c | 141 --------- arch/arm/mach-netx/xc.c | 246 ---------------- 20 files changed, 1860 deletions(-) commit 223b2b5030f370f219c23c2c4678b419a72434d9 Author: Robert Karszniewicz Date: Sat Jul 20 15:16:52 2019 +0200 hwmon: (k8temp) documentation: update URL of datasheet The old URL is dead. Signed-off-by: Robert Karszniewicz Link: https://lore.kernel.org/r/7139bc7707c24bd4dd7eb323e2da90105a3de9c1.1563522498.git.avoidr@firemail.cc Signed-off-by: Guenter Roeck Documentation/hwmon/k8temp.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f3d43e2e45fd9d44ba52d20debd12cd4ee9c89bf Author: Björn Gerhart Date: Mon Jul 15 18:33:55 2019 +0200 hwmon: (nct6775) Fix register address and added missed tolerance for nct6106 Fixed address of third NCT6106_REG_WEIGHT_DUTY_STEP, and added missed NCT6106_REG_TOLERANCE_H. Fixes: 6c009501ff200 ("hwmon: (nct6775) Add support for NCT6102D/6106D") Signed-off-by: Bjoern Gerhart Signed-off-by: Guenter Roeck drivers/hwmon/nct6775.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 211186cae14de09573b062e478eb9fe215aed8d9 Author: Lei YU Date: Thu Jul 11 10:44:48 2019 +0800 hwmon: (occ) Fix division by zero issue The code in occ_get_powr_avg() invokes div64_u64() without checking the divisor. In case the divisor is zero, kernel gets an "Division by zero in kernel" error. Check the divisor and make it return 0 if the divisor is 0. Fixes: c10e753d43eb ("hwmon (occ): Add sensor types and versions") Signed-off-by: Lei YU Reviewed-by: Eddie James Link: https://lore.kernel.org/r/1562813088-23708-1-git-send-email-mine260309@gmail.com Signed-off-by: Guenter Roeck drivers/hwmon/occ/common.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 6e998ef24d603839c29a8f75a31d176142786e03 Author: Fabio Estevam Date: Tue Jun 25 12:40:00 2019 -0300 ARM: dts: imx7ulp: Fix usb-phy unit address format The following warning is seen when building with W=1: arch/arm/boot/dts/imx7ulp.dtsi:189.31-195.5: Warning (simple_bus_reg): /bus@40000000/usb-phy@0x40350000: simple-bus unit address format error, expected "40350000" Fix it as suggested by removing the extra "0x" notation. Fixes: 5b7bd456318a ("ARM: dts: imx7ulp: add imx7ulp USBOTG1 support") Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7ulp.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5f9e832c137075045d15cd6899ab0505cfb2ca4b Author: Linus Torvalds Date: Sun Jul 21 14:05:38 2019 -0700 Linus 5.3-rc1 Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 107e47cc80ec37cb332bd41b22b1c7779e22e018 Author: Peter Kosyh Date: Fri Jul 19 11:11:47 2019 +0300 vrf: make sure skb->data contains ip header to make routing vrf_process_v4_outbound() and vrf_process_v6_outbound() do routing using ip/ipv6 addresses, but don't make sure the header is available in skb->data[] (skb_headlen() is less then header size). Case: 1) igb driver from intel. 2) Packet size is greater then 255. 3) MPLS forwards to VRF device. So, patch adds pskb_may_pull() calls in vrf_process_v4/v6_outbound() functions. Signed-off-by: Peter Kosyh Reviewed-by: David Ahern Signed-off-by: David S. Miller drivers/net/vrf.c | 58 +++++++++++++++++++++++++++++++++---------------------- 1 file changed, 35 insertions(+), 23 deletions(-) commit 903e9d1bffb557220af276eda97b9d6b103ec9e0 Author: Vasily Averin Date: Thu Jul 18 07:26:46 2019 +0300 connector: remove redundant input callback from cn_dev A small cleanup: this callback is never used. Originally fixed by Stanislav Kinsburskiy for OpenVZ7 bug OVZ-6877 cc: stanislav.kinsburskiy@gmail.com Signed-off-by: Vasily Averin Signed-off-by: David S. Miller drivers/connector/connector.c | 6 +----- include/linux/connector.h | 1 - 2 files changed, 1 insertion(+), 6 deletions(-) commit 93428c582604f5d548afa885e72acaa16f03cc8d Author: Frederick Lawler Date: Wed Jul 17 21:07:42 2019 -0500 qed: Prefer pcie_capability_read_word() Commit 8c0d3a02c130 ("PCI: Add accessors for PCI Express Capability") added accessors for the PCI Express Capability so that drivers didn't need to be aware of differences between v1 and v2 of the PCI Express Capability. Replace pci_read_config_word() and pci_write_config_word() calls with pcie_capability_read_word() and pcie_capability_write_word(). Signed-off-by: Frederick Lawler Acked-by: Michal Kalderon  Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_rdma.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit a16f6d3a150543ddb7d78ab5ee4ca2f301ef9c6b Author: Frederick Lawler Date: Wed Jul 17 21:07:39 2019 -0500 igc: Prefer pcie_capability_read_word() Commit 8c0d3a02c130 ("PCI: Add accessors for PCI Express Capability") added accessors for the PCI Express Capability so that drivers didn't need to be aware of differences between v1 and v2 of the PCI Express Capability. Replace pci_read_config_word() and pci_write_config_word() calls with pcie_capability_read_word() and pcie_capability_write_word(). Signed-off-by: Frederick Lawler Signed-off-by: David S. Miller drivers/net/ethernet/intel/igc/igc_main.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 6133b9204c0ab5bbd38799f3309d5f59f1702561 Author: Frederick Lawler Date: Wed Jul 17 21:07:36 2019 -0500 cxgb4: Prefer pcie_capability_read_word() Commit 8c0d3a02c130 ("PCI: Add accessors for PCI Express Capability") added accessors for the PCI Express Capability so that drivers didn't need to be aware of differences between v1 and v2 of the PCI Express Capability. Replace pci_read_config_word() and pci_write_config_word() calls with pcie_capability_read_word() and pcie_capability_write_word(). Signed-off-by: Frederick Lawler Reviewed-by: Bjorn Helgaas Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 6 ++---- drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 9 +++------ 2 files changed, 5 insertions(+), 10 deletions(-) commit ffd342e087d5c56882c232f6a1812b5e3d89b37b Author: Benjamin Poirier Date: Thu Jul 18 10:42:18 2019 +0900 be2net: Synchronize be_update_queues with dev_watchdog As pointed out by Firo Yang, a netdev tx timeout may trigger just before an ethtool set_channels operation is started. be_tx_timeout(), which dumps some queue structures, is not written to run concurrently with be_update_queues(), which frees/allocates those queues structures. Add some synchronization between the two. Message-id: Signed-off-by: Benjamin Poirier Signed-off-by: David S. Miller drivers/net/ethernet/emulex/benet/be_main.c | 5 +++++ 1 file changed, 5 insertions(+) commit ea811b795df24644a8eb760b493c43fba4450677 Author: Brian King Date: Mon Jul 15 16:41:50 2019 -0500 bnx2x: Prevent load reordering in tx completion processing This patch fixes an issue seen on Power systems with bnx2x which results in the skb is NULL WARN_ON in bnx2x_free_tx_pkt firing due to the skb pointer getting loaded in bnx2x_free_tx_pkt prior to the hw_cons load in bnx2x_tx_int. Adding a read memory barrier resolves the issue. Signed-off-by: Brian King Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 3 +++ 1 file changed, 3 insertions(+) commit 15a78ba1844a8e052c1226f930133de4cef4e7ad Author: Wenwen Wang Date: Sat Jul 20 07:22:45 2019 -0500 netfilter: ebtables: fix a memory leak bug in compat In compat_do_replace(), a temporary buffer is allocated through vmalloc() to hold entries copied from the user space. The buffer address is firstly saved to 'newinfo->entries', and later on assigned to 'entries_tmp'. Then the entries in this temporary buffer is copied to the internal kernel structure through compat_copy_entries(). If this copy process fails, compat_do_replace() should be terminated. However, the allocated temporary buffer is not freed on this path, leading to a memory leak. To fix the bug, free the buffer before returning from compat_do_replace(). Signed-off-by: Wenwen Wang Reviewed-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/bridge/netfilter/ebtables.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 0cea0e1148fe134a4a3aaf0b1496f09241fb943a Author: Andrew Lunn Date: Sun Jul 21 18:50:08 2019 +0200 net: phy: sfp: hwmon: Fix scaling of RX power The RX power read from the SFP uses units of 0.1uW. This must be scaled to units of uW for HWMON. This requires a divide by 10, not the current 100. With this change in place, sensors(1) and ethtool -m agree: sff2-isa-0000 Adapter: ISA adapter in0: +3.23 V temp1: +33.1 C power1: 270.00 uW power2: 200.00 uW curr1: +0.01 A Laser output power : 0.2743 mW / -5.62 dBm Receiver signal average optical power : 0.2014 mW / -6.96 dBm Reported-by: chris.healy@zii.aero Signed-off-by: Andrew Lunn Fixes: 1323061a018a ("net: phy: sfp: Add HWMON support for module sensors") Signed-off-by: David S. Miller drivers/net/phy/sfp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 503d81d428bd598430f7f9d02021634e1a8139a0 Author: Vlad Buslov Date: Sun Jul 21 17:44:12 2019 +0300 net: sched: verify that q!=NULL before setting q->flags In function int tc_new_tfilter() q pointer can be NULL when adding filter on a shared block. With recent change that resets TCQ_F_CAN_BYPASS after filter creation, following NULL pointer dereference happens in case parent block is shared: [ 212.925060] BUG: kernel NULL pointer dereference, address: 0000000000000010 [ 212.925445] #PF: supervisor write access in kernel mode [ 212.925709] #PF: error_code(0x0002) - not-present page [ 212.925965] PGD 8000000827923067 P4D 8000000827923067 PUD 827924067 PMD 0 [ 212.926302] Oops: 0002 [#1] SMP KASAN PTI [ 212.926539] CPU: 18 PID: 2617 Comm: tc Tainted: G B 5.2.0+ #512 [ 212.926938] Hardware name: Supermicro SYS-2028TP-DECR/X10DRT-P, BIOS 2.0b 03/30/2017 [ 212.927364] RIP: 0010:tc_new_tfilter+0x698/0xd40 [ 212.927633] Code: 74 0d 48 85 c0 74 08 48 89 ef e8 03 aa 62 00 48 8b 84 24 a0 00 00 00 48 8d 78 10 48 89 44 24 18 e8 4d 0c 6b ff 48 8b 44 24 18 <83> 60 10 f b 48 85 ed 0f 85 3d fe ff ff e9 4f fe ff ff e8 81 26 f8 [ 212.928607] RSP: 0018:ffff88884fd5f5d8 EFLAGS: 00010296 [ 212.928905] RAX: 0000000000000000 RBX: 0000000000000000 RCX: dffffc0000000000 [ 212.929201] RDX: 0000000000000007 RSI: 0000000000000004 RDI: 0000000000000297 [ 212.929402] RBP: ffff88886bedd600 R08: ffffffffb91d4b51 R09: fffffbfff7616e4d [ 212.929609] R10: fffffbfff7616e4c R11: ffffffffbb0b7263 R12: ffff88886bc61040 [ 212.929803] R13: ffff88884fd5f950 R14: ffffc900039c5000 R15: ffff88835e927680 [ 212.929999] FS: 00007fe7c50b6480(0000) GS:ffff88886f980000(0000) knlGS:0000000000000000 [ 212.930235] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 212.930394] CR2: 0000000000000010 CR3: 000000085bd04002 CR4: 00000000001606e0 [ 212.930588] Call Trace: [ 212.930682] ? tc_del_tfilter+0xa40/0xa40 [ 212.930811] ? __lock_acquire+0x5b5/0x2460 [ 212.930948] ? find_held_lock+0x85/0xa0 [ 212.931081] ? tc_del_tfilter+0xa40/0xa40 [ 212.931201] rtnetlink_rcv_msg+0x4ab/0x5f0 [ 212.931332] ? rtnl_dellink+0x490/0x490 [ 212.931454] ? lockdep_hardirqs_on+0x260/0x260 [ 212.931589] ? netlink_deliver_tap+0xab/0x5a0 [ 212.931717] ? match_held_lock+0x1b/0x240 [ 212.931844] netlink_rcv_skb+0xd0/0x200 [ 212.931958] ? rtnl_dellink+0x490/0x490 [ 212.932079] ? netlink_ack+0x440/0x440 [ 212.932205] ? netlink_deliver_tap+0x161/0x5a0 [ 212.932335] ? lock_downgrade+0x360/0x360 [ 212.932457] ? lock_acquire+0xe5/0x210 [ 212.932579] netlink_unicast+0x296/0x350 [ 212.932705] ? netlink_attachskb+0x390/0x390 [ 212.932834] ? _copy_from_iter_full+0xe0/0x3a0 [ 212.932976] netlink_sendmsg+0x394/0x600 [ 212.937998] ? netlink_unicast+0x350/0x350 [ 212.943033] ? move_addr_to_kernel.part.0+0x90/0x90 [ 212.948115] ? netlink_unicast+0x350/0x350 [ 212.953185] sock_sendmsg+0x96/0xa0 [ 212.958099] ___sys_sendmsg+0x482/0x520 [ 212.962881] ? match_held_lock+0x1b/0x240 [ 212.967618] ? copy_msghdr_from_user+0x250/0x250 [ 212.972337] ? lock_downgrade+0x360/0x360 [ 212.976973] ? rwlock_bug.part.0+0x60/0x60 [ 212.981548] ? __mod_node_page_state+0x1f/0xa0 [ 212.986060] ? match_held_lock+0x1b/0x240 [ 212.990567] ? find_held_lock+0x85/0xa0 [ 212.994989] ? do_user_addr_fault+0x349/0x5b0 [ 212.999387] ? lock_downgrade+0x360/0x360 [ 213.003713] ? find_held_lock+0x85/0xa0 [ 213.007972] ? __fget_light+0xa1/0xf0 [ 213.012143] ? sockfd_lookup_light+0x91/0xb0 [ 213.016165] __sys_sendmsg+0xba/0x130 [ 213.020040] ? __sys_sendmsg_sock+0xb0/0xb0 [ 213.023870] ? handle_mm_fault+0x337/0x470 [ 213.027592] ? page_fault+0x8/0x30 [ 213.031316] ? lockdep_hardirqs_off+0xbe/0x100 [ 213.034999] ? mark_held_locks+0x24/0x90 [ 213.038671] ? do_syscall_64+0x1e/0xe0 [ 213.042297] do_syscall_64+0x74/0xe0 [ 213.045828] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 213.049354] RIP: 0033:0x7fe7c527c7b8 [ 213.052792] Code: 89 02 48 c7 c0 ff ff ff ff eb bb 0f 1f 80 00 00 00 00 f3 0f 1e fa 48 8d 05 65 8f 0c 00 8b 00 85 c0 75 17 b8 2e 00 00 00 0f 05 <48> 3d 00 f 0 ff ff 77 58 c3 0f 1f 80 00 00 00 00 48 83 ec 28 89 54 [ 213.060269] RSP: 002b:00007ffc3f7908a8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 213.064144] RAX: ffffffffffffffda RBX: 000000005d34716f RCX: 00007fe7c527c7b8 [ 213.068094] RDX: 0000000000000000 RSI: 00007ffc3f790910 RDI: 0000000000000003 [ 213.072109] RBP: 0000000000000000 R08: 0000000000000001 R09: 00007fe7c5340cc0 [ 213.076113] R10: 0000000000404ec2 R11: 0000000000000246 R12: 0000000000000080 [ 213.080146] R13: 0000000000480640 R14: 0000000000000080 R15: 0000000000000000 [ 213.084147] Modules linked in: act_gact cls_flower sch_ingress nfsv3 nfs_acl nfs lockd grace fscache bridge stp llc sunrpc intel_rapl_msr intel_rapl_common [<1;69;32Msb_edac rdma_ucm rdma_cm x86_pkg_temp_thermal iw_cm intel_powerclamp ib_cm coretemp kvm_intel kvm irqbypass mlx5_ib ib_uverbs ib_core crct10dif_pclmul crc32_pc lmul crc32c_intel ghash_clmulni_intel mlx5_core intel_cstate intel_uncore iTCO_wdt igb iTCO_vendor_support mlxfw mei_me ptp ses intel_rapl_perf mei pcspkr ipmi _ssif i2c_i801 joydev enclosure pps_core lpc_ich ioatdma wmi dca ipmi_si ipmi_devintf ipmi_msghandler acpi_power_meter acpi_pad ast i2c_algo_bit drm_vram_helpe r ttm drm_kms_helper drm mpt3sas raid_class scsi_transport_sas [ 213.112326] CR2: 0000000000000010 [ 213.117429] ---[ end trace adb58eb0a4ee6283 ]--- Verify that q pointer is not NULL before setting the 'flags' field. Fixes: 3f05e6886a59 ("net_sched: unset TCQ_F_CAN_BYPASS when adding filters") Signed-off-by: Vlad Buslov Acked-by: Jiri Pirko Signed-off-by: David S. Miller net/sched/cls_api.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 85d9bf979592d2a8678de3f2dd4004effb3b7f5a Author: Christophe JAILLET Date: Sun Jul 21 15:16:05 2019 +0200 chelsio: Fix a typo in a function name It is likely that 'my3216_poll()' should be 'my3126_poll()'. (1 and 2 switched in 3126. Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb/my3126.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bb1320834b8a80c6ac2697ab418d066981ea08ba Author: Navid Emamdoost Date: Sun Jul 21 01:37:31 2019 -0500 allocate_flower_entry: should check for null deref allocate_flower_entry does not check for allocation success, but tries to deref the result. I only moved the spin_lock under null check, because the caller is checking allocation's status at line 652. Signed-off-by: Navid Emamdoost Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4803d0100196209137c8cff3666d354756525d58 Author: Christophe JAILLET Date: Sun Jul 21 15:08:31 2019 +0200 net: hns3: typo in the name of a constant All constant in 'enum HCLGE_MBX_OPCODE' start with HCLGE, except 'HLCGE_MBX_PUSH_VLAN_INFO' (C and L switched) s/HLC/HCL/ Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hclge_mbx.h | 2 +- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c | 2 +- drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_mbx.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) commit 408d2bbbfd4687c435ee5d4967dbe95bc9be82ed Author: Jeremy Sowden Date: Sun Jul 21 12:31:05 2019 +0100 kbuild: add net/netfilter/nf_tables_offload.h to header-test blacklist. net/netfilter/nf_tables_offload.h includes net/netfilter/nf_tables.h which is itself on the blacklist. Reported-by: Jakub Kicinski Signed-off-by: Jeremy Sowden Acked-by: Pablo Neira Ayuso Signed-off-by: David S. Miller include/Kbuild | 1 + 1 file changed, 1 insertion(+) commit bad7f869d864b5c5139b4cc6579f927d780467b5 Author: Christophe JAILLET Date: Sun Jul 21 12:38:11 2019 +0200 tipc: Fix a typo s/tipc_toprsv_listener_data_ready/tipc_topsrv_listener_data_ready/ (r and s switched in topsrv) Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller net/tipc/topsrv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 953ba0a6382025bb63da18cb358d3b893fa85a51 Merge: 1a03bb532934 d2b3fe42bc62 Author: David S. Miller Date: Sun Jul 21 11:39:05 2019 -0700 Merge tag 'mac80211-for-davem-2019-07-20' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== We have a handful of fixes: * ignore bad CW parameters if we aren't using them, instead of warning * fix operation (and then build) with the new netlink vendor command policy requirement * fix a memory leak in an error path when setting beacons ==================== Signed-off-by: David S. Miller commit c7bf0a0f3703bc145368b9ced02749bf75fc718d Merge: d6788eb7d0dc e2297f7c3ab3 Author: Linus Torvalds Date: Sun Jul 21 10:28:39 2019 -0700 Merge tag 'devicetree-fixes-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull Devicetree fixes from Rob Herring: "Fix several warnings/errors in validation of binding schemas" * tag 'devicetree-fixes-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: dt-bindings: pinctrl: stm32: Fix missing 'clocks' property in examples dt-bindings: iio: ad7124: Fix dtc warnings in example dt-bindings: iio: avia-hx711: Fix avdd-supply typo in example dt-bindings: pinctrl: aspeed: Fix AST2500 example errors dt-bindings: pinctrl: aspeed: Fix 'compatible' schema errors dt-bindings: riscv: Limit cpus schema to only check RiscV 'cpu' nodes dt-bindings: Ensure child nodes are of type 'object' commit d6788eb7d0dcac9ce4084f7b87884812ebf5d941 Merge: 91962d0f79cb 1b03bc5c1163 Author: Linus Torvalds Date: Sun Jul 21 10:09:43 2019 -0700 Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs documentation typo fix from Al Viro. * 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: typo fix: it's d_make_root, not d_make_inode... commit 91962d0f79cb61776bfb97eb5ea912e49e809d6c Merge: 8cf66504210d 2a957ace44d4 Author: Linus Torvalds Date: Sun Jul 21 10:01:17 2019 -0700 Merge tag '5.3-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "Two fixes for stable, one that had dependency on earlier patch in this merge window and can now go in, and a perf improvement in SMB3 open" * tag '5.3-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6: cifs: update internal module number cifs: flush before set-info if we have writeable handles smb3: optimize open to not send query file internal info cifs: copy_file_range needs to strip setuid bits and update timestamps CIFS: fix deadlock in cached root handling commit 8cf66504210d308a35cca35fe9c310b1241f9fa7 Author: Qian Cai Date: Thu Jul 11 12:17:45 2019 -0400 iommu/amd: fix a crash in iova_magazine_free_pfns The commit b3aa14f02254 ("iommu: remove the mapping_error dma_map_ops method") incorrectly changed the checking from dma_ops_alloc_iova() in map_sg() causes a crash under memory pressure as dma_ops_alloc_iova() never return DMA_MAPPING_ERROR on failure but 0, so the error handling is all wrong. kernel BUG at drivers/iommu/iova.c:801! Workqueue: kblockd blk_mq_run_work_fn RIP: 0010:iova_magazine_free_pfns+0x7d/0xc0 Call Trace: free_cpu_cached_iovas+0xbd/0x150 alloc_iova_fast+0x8c/0xba dma_ops_alloc_iova.isra.6+0x65/0xa0 map_sg+0x8c/0x2a0 scsi_dma_map+0xc6/0x160 pqi_aio_submit_io+0x1f6/0x440 [smartpqi] pqi_scsi_queue_command+0x90c/0xdd0 [smartpqi] scsi_queue_rq+0x79c/0x1200 blk_mq_dispatch_rq_list+0x4dc/0xb70 blk_mq_sched_dispatch_requests+0x249/0x310 __blk_mq_run_hw_queue+0x128/0x200 blk_mq_run_work_fn+0x27/0x30 process_one_work+0x522/0xa10 worker_thread+0x63/0x5b0 kthread+0x1d2/0x1f0 ret_from_fork+0x22/0x40 Fixes: b3aa14f02254 ("iommu: remove the mapping_error dma_map_ops method") Signed-off-by: Qian Cai Reviewed-by: Christoph Hellwig Signed-off-by: Linus Torvalds drivers/iommu/amd_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 618381f09cc15592bf3afe846c6a94e9bfcd9ce4 Author: Mike Rapoport Date: Tue Apr 30 17:27:50 2019 +0300 hexagon: switch to generic version of pte allocation The hexagon implementation pte_alloc_one(), pte_alloc_one_kernel(), pte_free_kernel() and pte_free() is identical to the generic except of lack of __GFP_ACCOUNT for the user PTEs allocation. Switch hexagon to use generic version of these functions. Signed-off-by: Mike Rapoport Signed-off-by: Linus Torvalds arch/hexagon/include/asm/pgalloc.h | 34 ++-------------------------------- 1 file changed, 2 insertions(+), 32 deletions(-) commit bec5545edef658f81cd9721dbe8fbebeb3c7534d Merge: f1a3b43cc1f5 d9c53aa440b3 Author: Linus Torvalds Date: Sun Jul 21 09:46:59 2019 -0700 Merge tag 'ntb-5.3' of git://github.com/jonmason/ntb Pull NTB updates from Jon Mason: "New feature to add support for NTB virtual MSI interrupts, the ability to test and use this feature in the NTB transport layer. Also, bug fixes for the AMD and Switchtec drivers, as well as some general patches" * tag 'ntb-5.3' of git://github.com/jonmason/ntb: (22 commits) NTB: Describe the ntb_msi_test client in the documentation. NTB: Add MSI interrupt support to ntb_transport NTB: Add ntb_msi_test support to ntb_test NTB: Introduce NTB MSI Test Client NTB: Introduce MSI library NTB: Rename ntb.c to support multiple source files in the module NTB: Introduce functions to calculate multi-port resource index NTB: Introduce helper functions to calculate logical port number PCI/switchtec: Add module parameter to request more interrupts PCI/MSI: Support allocating virtual MSI interrupts ntb_hw_switchtec: Fix setup MW with failure bug ntb_hw_switchtec: Skip unnecessary re-setup of shared memory window for crosslink case ntb_hw_switchtec: Remove redundant steps of switchtec_ntb_reinit_peer() function NTB: correct ntb_dev_ops and ntb_dev comment typos NTB: amd: Silence shift wrapping warning in amd_ntb_db_vector_mask() ntb_hw_switchtec: potential shift wrapping bug in switchtec_ntb_init_sndev() NTB: ntb_transport: Ensure qp->tx_mw_dma_addr is initaliazed NTB: ntb_hw_amd: set peer limit register NTB: ntb_perf: Clear stale values in doorbell and command SPAD register NTB: ntb_perf: Disable NTB link after clearing peer XLAT registers ... commit a7cd67e2b76edd46fbd2517078eeba369f933575 Author: Ronald Tschalär Date: Sun Jul 21 15:15:12 2019 +0300 Input: applespi - fix warnings detected by sparse This makes sure that we convert from on-wire to CPU endianness in applespi_debug_update_dimensions() and also marks as "static" as it is not needed to be visible outside of the driver. Reported-by: kbuild test robot Signed-off-by: Ronald Tschalär Signed-off-by: Dmitry Torokhov drivers/input/keyboard/applespi.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 69245c97560b40f88c609b078f4b51c5be81d88b Author: Helge Deller Date: Sun Jul 21 00:55:48 2019 +0200 parisc: Flush ITLB in flush_tlb_all_local() only on split TLB machines flush_tlb_all_local() flushes the ITLB and DTLB of the CPU. In case the machine does not have separate ITLBs and DTLBs, use the alternative functionality to replace the code which flushes the ITLB with nops while keeping the code which flushes the DTLB. Signed-off-by: Helge Deller arch/parisc/kernel/pacache.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f5e03d3a04978d2866f82cb11cc7a6b808c8ce07 Author: Sven Schnelle Date: Sun Jul 21 11:00:39 2019 +0200 parisc: add kprobe_fault_handler() Add kprobe_fault_handler() to fix compilation for PA-RISC. On PA-RISC we actually don't need that function as the recovery counter is restored after interrupt. See the PA-RISC 2.0 Architecture Manual, pg. 4-8, Figure 4-4: "Interruption Processing". Fixes: b98cca444d28 ("mm, kprobes: generalize and rename notify_page_fault() as kprobe_page_fault()") Signed-off-by: Sven Schnelle Signed-off-by: Helge Deller arch/parisc/include/asm/kprobes.h | 4 ++++ 1 file changed, 4 insertions(+) commit 1b03bc5c116383b8bc099e8d60978c379196a687 Author: Al Viro Date: Sat Jul 20 23:17:30 2019 -0400 typo fix: it's d_make_root, not d_make_inode... Signed-off-by: Al Viro Documentation/filesystems/porting | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e2297f7c3ab3b68dda2ac732b1767212019d3bdf Author: Rob Herring Date: Tue Jul 16 15:34:40 2019 -0600 dt-bindings: pinctrl: stm32: Fix missing 'clocks' property in examples Now that examples are validated against the DT schema, an error with required 'clocks' property missing is exposed: Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.example.dt.yaml: \ pinctrl@40020000: gpio@0: 'clocks' is a required property Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.example.dt.yaml: \ pinctrl@50020000: gpio@1000: 'clocks' is a required property Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.example.dt.yaml: \ pinctrl@50020000: gpio@2000: 'clocks' is a required property Add the missing 'clocks' properties to the examples to fix the errors. Fixes: 2c9239c125f0 ("dt-bindings: pinctrl: Convert stm32 pinctrl bindings to json-schema") Cc: Linus Walleij Cc: Maxime Coquelin Cc: linux-gpio@vger.kernel.org Cc: linux-stm32@st-md-mailman.stormreply.com Acked-by: Alexandre TORGUE Signed-off-by: Rob Herring Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.yaml | 4 ++++ 1 file changed, 4 insertions(+) commit 20051f5fdf6770f05d677e2f03b0a2bab6b0fc64 Author: Rob Herring Date: Tue Jul 16 14:21:56 2019 -0600 dt-bindings: iio: ad7124: Fix dtc warnings in example With the conversion to DT schema, the examples are now compiled with dtc. The ad7124 binding example has the following warning: Documentation/devicetree/bindings/iio/adc/adi,ad7124.example.dts:19.11-21: \ Warning (reg_format): /example-0/adc@0:reg: property has invalid length (4 bytes) (#address-cells == 1, #size-cells == 1) There's a default #size-cells and #address-cells values of 1 for examples. For examples needing different values such as this one on a SPI bus, they need to provide a SPI bus parent node. Fixes: 26ae15e62d3c ("Convert AD7124 bindings documentation to YAML format.") Cc: Jonathan Cameron Cc: linux-iio@vger.kernel.org Signed-off-by: Rob Herring .../devicetree/bindings/iio/adc/adi,ad7124.yaml | 71 ++++++++++++---------- 1 file changed, 38 insertions(+), 33 deletions(-) commit fbbf2b6e9b74ffa79bef5e3da91200195045379e Author: Rob Herring Date: Tue Jul 16 14:13:29 2019 -0600 dt-bindings: iio: avia-hx711: Fix avdd-supply typo in example Now that examples are validated against the DT schema, a typo in avia-hx711 example generates a warning: Documentation/devicetree/bindings/iio/adc/avia-hx711.example.dt.yaml: weight: 'avdd-supply' is a required property Fix the typo. Fixes: 5150ec3fe125 ("avia-hx711.yaml: transform DT binding to YAML") Cc: Andreas Klinger Cc: Jonathan Cameron Cc: linux-iio@vger.kernel.org Signed-off-by: Rob Herring Documentation/devicetree/bindings/iio/adc/avia-hx711.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fcbe7e3cf86d665bf4924eecb13a5af10bcfa372 Author: Rob Herring Date: Mon Jul 15 16:48:41 2019 -0600 dt-bindings: pinctrl: aspeed: Fix AST2500 example errors The schema examples are now validated against the schema itself. The AST2500 pinctrl schema has a couple of errors: Documentation/devicetree/bindings/pinctrl/aspeed,ast2500-pinctrl.example.dt.yaml: \ example-0: $nodename:0: 'example-0' does not match '^(bus|soc|axi|ahb|apb)(@[0-9a-f]+)?$' Documentation/devicetree/bindings/pinctrl/aspeed,ast2500-pinctrl.example.dt.yaml: \ pinctrl: aspeed,external-nodes: [[1, 2]] is too short Fixes: 0a617de16730 ("dt-bindings: pinctrl: aspeed: Convert AST2500 bindings to json-schema") Cc: Andrew Jeffery Cc: Linus Walleij Cc: Joel Stanley Cc: linux-aspeed@lists.ozlabs.org Cc: linux-gpio@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Acked-by: Andrew Jeffery Signed-off-by: Rob Herring .../devicetree/bindings/pinctrl/aspeed,ast2500-pinctrl.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit ad21a4ce040cc41b4a085417169b558e86af56b7 Author: Rob Herring Date: Mon Jul 15 16:37:25 2019 -0600 dt-bindings: pinctrl: aspeed: Fix 'compatible' schema errors The Aspeed pinctl schema have errors in the 'compatible' schema: Documentation/devicetree/bindings/pinctrl/aspeed,ast2400-pinctrl.yaml: \ properties:compatible:enum: ['aspeed', 'ast2400-pinctrl', 'aspeed', 'g4-pinctrl'] has non-unique elements Documentation/devicetree/bindings/pinctrl/aspeed,ast2500-pinctrl.yaml: \ properties:compatible:enum: ['aspeed', 'ast2500-pinctrl', 'aspeed', 'g5-pinctrl'] has non-unique elements Flow style sequences have to be quoted if the vales contain ','. Fix this by using the more common one line per entry formatting. Fixes: 0a617de16730 ("dt-bindings: pinctrl: aspeed: Convert AST2500 bindings to json-schema") Fixes: 07457937bb5c ("dt-bindings: pinctrl: aspeed: Convert AST2400 bindings to json-schema") Cc: Andrew Jeffery Cc: Linus Walleij Cc: Joel Stanley Cc: linux-aspeed@lists.ozlabs.org Cc: linux-gpio@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Acked-by: Andrew Jeffery Signed-off-by: Rob Herring Documentation/devicetree/bindings/pinctrl/aspeed,ast2400-pinctrl.yaml | 4 +++- Documentation/devicetree/bindings/pinctrl/aspeed,ast2500-pinctrl.yaml | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) commit 7d9ef7f37d1f37981344d1a8c8578b67bdf4736a Author: Rob Herring Date: Wed Jun 26 17:57:59 2019 -0600 dt-bindings: riscv: Limit cpus schema to only check RiscV 'cpu' nodes Matching on the 'cpus' node was a bad choice because the schema is incorrectly applied to non-RiscV cpus nodes. As we now have a common cpus schema which checks the general structure, it is also redundant to do so in the Risc-V CPU schema. The downside is one could conceivably mix different architecture's cpu nodes or have typos in the compatible string. The latter problem pretty much exists for every schema. Acked-by: Paul Walmsley Signed-off-by: Rob Herring Documentation/devicetree/bindings/riscv/cpus.yaml | 143 +++++++++------------- 1 file changed, 61 insertions(+), 82 deletions(-) commit 15ffef1ae69e99ebb54326f0220916b1fe619b24 Author: Rob Herring Date: Wed Jul 3 14:17:06 2019 -0600 dt-bindings: Ensure child nodes are of type 'object' Properties which are child node definitions need to have an explict type. Otherwise, a matching (DT) property can silently match when an error is desired. Fix this up tree-wide. Once this is fixed, the meta-schema will enforce this on any child node definitions. Cc: Chen-Yu Tsai Cc: David Woodhouse Cc: Brian Norris Cc: Marek Vasut Cc: Richard Weinberger Cc: Vignesh Raghavendra Cc: Linus Walleij Cc: Maxime Coquelin Cc: linux-mtd@lists.infradead.org Cc: linux-gpio@vger.kernel.org Cc: linux-stm32@st-md-mailman.stormreply.com Cc: linux-spi@vger.kernel.org Acked-by: Miquel Raynal Acked-by: Maxime Ripard Acked-by: Mark Brown Acked-by: Alexandre TORGUE Signed-off-by: Rob Herring Documentation/devicetree/bindings/bus/allwinner,sun8i-a23-rsb.yaml | 1 + Documentation/devicetree/bindings/mtd/allwinner,sun4i-a10-nand.yaml | 1 + Documentation/devicetree/bindings/mtd/nand-controller.yaml | 1 + Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.yaml | 3 +++ Documentation/devicetree/bindings/spi/allwinner,sun4i-a10-spi.yaml | 1 + Documentation/devicetree/bindings/spi/allwinner,sun6i-a31-spi.yaml | 1 + 6 files changed, 8 insertions(+) commit d2b3fe42bc629c2d4002f652b3abdfb2e72991c7 Author: Brian Norris Date: Wed Jul 17 18:57:12 2019 -0700 mac80211: don't warn about CW params when not using them ieee80211_set_wmm_default() normally sets up the initial CW min/max for each queue, except that it skips doing this if the driver doesn't support ->conf_tx. We still end up calling drv_conf_tx() in some cases (e.g., ieee80211_reconfig()), which also still won't do anything useful...except it complains here about the invalid CW parameters. Let's just skip the WARN if we weren't going to do anything useful with the parameters. Signed-off-by: Brian Norris Link: https://lore.kernel.org/r/20190718015712.197499-1-briannorris@chromium.org Signed-off-by: Johannes Berg net/mac80211/driver-ops.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit bcc27fab8cc673ddc95452674373cce618ccb3a3 Author: Lorenzo Bianconi Date: Wed Jul 3 00:29:47 2019 +0200 mac80211: fix possible memory leak in ieee80211_assign_beacon Free new beacon_data in ieee80211_assign_beacon whenever ieee80211_assign_beacon fails Fixes: 8860020e0be1 ("cfg80211: restructure AP/GO mode API") Fixes: bc847970f432 ("mac80211: support FTM responder configuration/statistic") Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/770285772543c9fca33777bb4ad4760239e56256.1562105631.git.lorenzo@kernel.org Signed-off-by: Johannes Berg net/mac80211/cfg.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 5edaac063bbf1267260ad2a5b9bb803399343e58 Author: John Crispin Date: Thu Jun 27 11:58:32 2019 +0200 nl80211: fix NL80211_HE_MAX_CAPABILITY_LEN NL80211_HE_MAX_CAPABILITY_LEN has changed between D2.0 and D4.0. It is now MAC (6) + PHY (11) + MCS (12) + PPE (25) = 54. Signed-off-by: John Crispin Link: https://lore.kernel.org/r/20190627095832.19445-1-john@phrozen.org Signed-off-by: Johannes Berg include/uapi/linux/nl80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 91046d6364afde646734c7ead1f649d253c386e9 Author: Johannes Berg Date: Tue Jun 25 10:04:51 2019 +0200 nl80211: fix VENDOR_CMD_RAW_DATA Since ERR_PTR() is an inline, not a macro, just open-code it here so it's usable as an initializer, fixing the build in brcmfmac. Reported-by: Arend Van Spriel Fixes: 901bb9891855 ("nl80211: require and validate vendor command policy") Signed-off-by: Johannes Berg include/net/cfg80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1667e4f9bcfb6785362a300ac4486df0854a72aa Author: Johannes Berg Date: Tue Jun 25 10:04:51 2019 +0200 wireless: fix nl80211 vendor commands In my previous commit to validate a policy I neglected to actually add one to the few drivers using vendor commands, fix that now. Reported-by: Tony Lindgren Tested-by: Tony Lindgren Fixes: 901bb9891855 ("nl80211: require and validate vendor command policy") Signed-off-by: Johannes Berg drivers/net/wireless/ath/wil6210/cfg80211.c | 4 ++++ drivers/net/wireless/broadcom/brcm80211/brcmfmac/vendor.c | 1 + drivers/net/wireless/ti/wlcore/vendor_cmd.c | 3 +++ 3 files changed, 8 insertions(+) commit f1a3b43cc1f50c6ee5ba582f2025db3dea891208 Merge: ac60602a6d8f c39f2d9db0fd Author: Linus Torvalds Date: Sat Jul 20 12:22:30 2019 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull more input updates from Dmitry Torokhov: - Apple SPI keyboard and trackpad driver for newer Macs - ALPS driver will ignore trackpoint-only devices to give the trackpoint driver a chance to handle them properly - another Lenovo is switched over to SMbus from PS/2 - assorted driver fixups. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: alps - fix a mismatch between a condition check and its comment Input: psmouse - fix build error of multiple definition Input: applespi - remove set but not used variables 'sts' Input: add Apple SPI keyboard and trackpad driver Input: alps - don't handle ALPS cs19 trackpoint-only device Input: hyperv-keyboard - remove dependencies on PAGE_SIZE for ring buffer Input: adp5589 - initialize GPIO controller parent device Input: iforce - remove empty multiline comments Input: synaptics - fix misuse of strlcpy Input: auo-pixcir-ts - switch to using devm_add_action_or_reset() Input: gtco - bounds check collection indent level Input: mtk-pmic-keys - add of_node_put() before return Input: sun4i-lradc-keys - add of_node_put() before return Input: synaptics - whitelist Lenovo T580 SMBus intertouch commit 1a03bb532934e90c7d662f7c59f4f66ea8451fa4 Author: Thomas Voegtle Date: Sat Jul 20 19:01:22 2019 +0200 r8169: fix RTL8168g PHY init This fixes a copy&paste error in the original patch. Setting the wrong register resulted in massive packet loss on some systems. Fixes: a2928d28643e ("r8169: use paged versions of phylib MDIO access functions") Tested-by: Thomas Voegtle Signed-off-by: Thomas Voegtle Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ac60602a6d8f6830dee89f4b87ee005f62eb7171 Merge: c6dd78fcb8ee 449fa54d6815 Author: Linus Torvalds Date: Sat Jul 20 12:09:52 2019 -0700 Merge tag 'dma-mapping-5.3-1' of git://git.infradead.org/users/hch/dma-mapping Pull dma-mapping fixes from Christoph Hellwig: "Fix various regressions: - force unencrypted dma-coherent buffers if encryption bit can't fit into the dma coherent mask (Tom Lendacky) - avoid limiting request size if swiotlb is not used (me) - fix swiotlb handling in dma_direct_sync_sg_for_cpu/device (Fugang Duan)" * tag 'dma-mapping-5.3-1' of git://git.infradead.org/users/hch/dma-mapping: dma-direct: correct the physical addr in dma_direct_sync_sg_for_cpu/device dma-direct: only limit the mapping size if swiotlb could be used dma-mapping: add a dma_addressing_limited helper dma-direct: Force unencrypted DMA under SME for certain DMA masks commit c6dd78fcb8eefa15dd861889e0f59d301cb5230c Merge: 46f5c0cc3af0 6879298bd067 Author: Linus Torvalds Date: Sat Jul 20 11:24:49 2019 -0700 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Thomas Gleixner: "A set of x86 specific fixes and updates: - The CR2 corruption fixes which store CR2 early in the entry code and hand the stored address to the fault handlers. - Revert a forgotten leftover of the dropped FSGSBASE series. - Plug a memory leak in the boot code. - Make the Hyper-V assist functionality robust by zeroing the shadow page. - Remove a useless check for dead processes with LDT - Update paravirt and VMware maintainers entries. - A few cleanup patches addressing various compiler warnings" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/entry/64: Prevent clobbering of saved CR2 value x86/hyper-v: Zero out the VP ASSIST PAGE on allocation x86, boot: Remove multiple copy of static function sanitize_boot_params() x86/boot/compressed/64: Remove unused variable x86/boot/efi: Remove unused variables x86/mm, tracing: Fix CR2 corruption x86/entry/64: Update comments and sanity tests for create_gap x86/entry/64: Simplify idtentry a little x86/entry/32: Simplify common_exception x86/paravirt: Make read_cr2() CALLEE_SAVE MAINTAINERS: Update PARAVIRT_OPS_INTERFACE and VMWARE_HYPERVISOR_INTERFACE x86/process: Delete useless check for dead process with LDT x86: math-emu: Hide clang warnings for 16-bit overflow x86/e820: Use proper booleans instead of 0/1 x86/apic: Silence -Wtype-limits compiler warnings x86/mm: Free sme_early_buffer after init x86/boot: Fix memory leak in default_get_smp_config() Revert "x86/ptrace: Prevent ptrace from clearing the FS/GS selector" and fix the test commit 46f5c0cc3af0ecb76224a91d2997d74e35ff7821 Merge: e6023adc5c6a e0c5c5e308ee Author: Linus Torvalds Date: Sat Jul 20 11:06:12 2019 -0700 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf tooling updates from Thomas Gleixner: "A set of perf improvements and fixes: perf db-export: - Improvements in how COMM details are exported to databases for post processing and use in the sql-viewer.py UI. - Export switch events to the database. BPF: - Bump rlimit(MEMLOCK) for 'perf test bpf' and 'perf trace', just like selftests/bpf/bpf_rlimit.h do, which makes errors due to exhaustion of this limit, which are kinda cryptic (EPERM sometimes) less frequent. perf version: - Fix segfault due to missing OPT_END(), noticed on PowerPC. perf vendor events: - Add JSON files for IBM s/390 machine type 8561. perf cs-etm (ARM): - Fix two cases of error returns not bing done properly: Invalid ERR_PTR() use and loss of propagation error codes" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (28 commits) perf version: Fix segfault due to missing OPT_END() perf vendor events s390: Add JSON files for machine type 8561 perf cs-etm: Return errcode in cs_etm__process_auxtrace_info() perf cs-etm: Remove errnoeous ERR_PTR() usage in cs_etm__process_auxtrace_info perf scripts python: export-to-postgresql.py: Export switch events perf scripts python: export-to-sqlite.py: Export switch events perf db-export: Export switch events perf db-export: Factor out db_export__threads() perf script: Add scripting operation process_switch() perf scripts python: exported-sql-viewer.py: Use new 'has_calls' column perf scripts python: exported-sql-viewer.py: Remove redundant semi-colons perf scripts python: export-to-postgresql.py: Add has_calls column to comms table perf scripts python: export-to-sqlite.py: Add has_calls column to comms table perf db-export: Also export thread's current comm perf db-export: Factor out db_export__comm() perf scripts python: export-to-postgresql.py: Export comm details perf scripts python: export-to-sqlite.py: Export comm details perf db-export: Export comm details perf db-export: Fix a white space issue in db_export__sample() perf db-export: Move export__comm_thread into db_export__sample() ... commit e6023adc5c6af79ac8ac5b17939f58091fa0d870 Merge: 4b01f5a4c9c4 b68b9907069a Author: Linus Torvalds Date: Sat Jul 20 10:45:15 2019 -0700 Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull core fixes from Thomas Gleixner: - A collection of objtool fixes which address recent fallout partially exposed by newer toolchains, clang, BPF and general code changes. - Force USER_DS for user stack traces [ Note: the "objtool fixes" are not all to objtool itself, but for kernel code that triggers objtool warnings. Things like missing function size annotations, or code that confuses the unwinder etc. - Linus] * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (27 commits) objtool: Support conditional retpolines objtool: Convert insn type to enum objtool: Fix seg fault on bad switch table entry objtool: Support repeated uses of the same C jump table objtool: Refactor jump table code objtool: Refactor sibling call detection logic objtool: Do frame pointer check before dead end check objtool: Change dead_end_function() to return boolean objtool: Warn on zero-length functions objtool: Refactor function alias logic objtool: Track original function across branches objtool: Add mcsafe_handle_tail() to the uaccess safe list bpf: Disable GCC -fgcse optimization for ___bpf_prog_run() x86/uaccess: Remove redundant CLACs in getuser/putuser error paths x86/uaccess: Don't leak AC flag into fentry from mcsafe_handle_tail() x86/uaccess: Remove ELF function annotation from copy_user_handle_tail() x86/head/64: Annotate start_cpu0() as non-callable x86/entry: Fix thunk function ELF sizes x86/kvm: Don't call kvm_spurious_fault() from .fixup x86/kvm: Replace vmx_vmenter()'s call to kvm_spurious_fault() with UD2 ... commit 4b01f5a4c9c4f0c502875c1fb31dcd5d0df86475 Merge: 70e6e1b971e4 19dbdcb8039c Author: Linus Torvalds Date: Sat Jul 20 10:43:03 2019 -0700 Merge branch 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull smp fix from Thomas Gleixner: "Add warnings to the smp function calls so callers from wrong contexts get detected" * 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: smp: Warn on function calls from softirq context commit 70e6e1b971e46f5c1c2d72217ba62401a2edc22b Merge: 07ab9d5bc53d a50a3f4b6a31 Author: Linus Torvalds Date: Sat Jul 20 10:33:44 2019 -0700 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull CONFIG_PREEMPT_RT stub config from Thomas Gleixner: "The real-time preemption patch set exists for almost 15 years now and while the vast majority of infrastructure and enhancements have found their way into the mainline kernel, the final integration of RT is still missing. Over the course of the last few years, we have worked on reducing the intrusivenness of the RT patches by refactoring kernel infrastructure to be more real-time friendly. Almost all of these changes were benefitial to the mainline kernel on their own, so there was no objection to integrate them. Though except for the still ongoing printk refactoring, the remaining changes which are required to make RT a first class mainline citizen are not longer arguable as immediately beneficial for the mainline kernel. Most of them are either reordering code flows or adding RT specific functionality. But this now has hit a wall and turned into a classic hen and egg problem: Maintainers are rightfully wary vs. these changes as they make only sense if the final integration of RT into the mainline kernel takes place. Adding CONFIG_PREEMPT_RT aims to solve this as a clear sign that RT will be fully integrated into the mainline kernel. The final integration of the missing bits and pieces will be of course done with the same careful approach as we have used in the past. While I'm aware that you are not entirely enthusiastic about that, I think that RT should receive the same treatment as any other widely used out of tree functionality, which we have accepted into mainline over the years. RT has become the de-facto standard real-time enhancement and is shipped by enterprise, embedded and community distros. It's in use throughout a wide range of industries: telecommunications, industrial automation, professional audio, medical devices, data acquisition, automotive - just to name a few major use cases. RT development is backed by a Linuxfoundation project which is supported by major stakeholders of this technology. The funding will continue over the actual inclusion into mainline to make sure that the functionality is neither introducing regressions, regressing itself, nor becomes subject to bitrot. There is also a lifely user community around RT as well, so contrary to the grim situation 5 years ago, it's a healthy project. As RT is still a good vehicle to exercise rarely used code paths and to detect hard to trigger issues, you could at least view it as a QA tool if nothing else" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/rt, Kconfig: Introduce CONFIG_PREEMPT_RT commit 07ab9d5bc53d7fe84047be1d403566123ab9cfaa Merge: f65420df914a 30cd8604323d Author: Linus Torvalds Date: Sat Jul 20 10:20:27 2019 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull more KVM updates from Paolo Bonzini: "Mostly bugfixes, but also: - s390 support for KVM selftests - LAPIC timer offloading to housekeeping CPUs - Extend an s390 optimization for overcommitted hosts to all architectures - Debugging cleanups and improvements" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (25 commits) KVM: x86: Add fixed counters to PMU filter KVM: nVMX: do not use dangling shadow VMCS after guest reset KVM: VMX: dump VMCS on failed entry KVM: x86/vPMU: refine kvm_pmu err msg when event creation failed KVM: s390: Use kvm_vcpu_wake_up in kvm_s390_vcpu_wakeup KVM: Boost vCPUs that are delivering interrupts KVM: selftests: Remove superfluous define from vmx.c KVM: SVM: Fix detection of AMD Errata 1096 KVM: LAPIC: Inject timer interrupt via posted interrupt KVM: LAPIC: Make lapic timer unpinned KVM: x86/vPMU: reset pmc->counter to 0 for pmu fixed_counters KVM: nVMX: Ignore segment base for VMX memory operand when segment not FS or GS kvm: x86: ioapic and apic debug macros cleanup kvm: x86: some tsc debug cleanup kvm: vmx: fix coccinelle warnings x86: kvm: avoid constant-conversion warning x86: kvm: avoid -Wsometimes-uninitized warning KVM: x86: expose AVX512_BF16 feature to guest KVM: selftests: enable pgste option for the linker on s390 KVM: selftests: Move kvm_create_max_vcpus test to generic code ... commit f65420df914a85e33b2c8b1cab310858b2abb7c0 Merge: 168c79971b4a 07d9aa143464 Author: Linus Torvalds Date: Sat Jul 20 10:04:58 2019 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "This is the final round of mostly small fixes in our initial submit. It's mostly minor fixes and driver updates. The only change of note is adding a virt_boundary_mask to the SCSI host and host template to parametrise this for NVMe devices instead of having them do a call in slave_alloc. It's a fairly straightforward conversion except in the two NVMe handling drivers that didn't set it who now have a virtual infinity parameter added" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (24 commits) scsi: megaraid_sas: set an unlimited max_segment_size scsi: mpt3sas: set an unlimited max_segment_size for SAS 3.0 HBAs scsi: IB/srp: set virt_boundary_mask in the scsi host scsi: IB/iser: set virt_boundary_mask in the scsi host scsi: storvsc: set virt_boundary_mask in the scsi host template scsi: ufshcd: set max_segment_size in the scsi host template scsi: core: take the DMA max mapping size into account scsi: core: add a host / host template field for the virt boundary scsi: core: Fix race on creating sense cache scsi: sd_zbc: Fix compilation warning scsi: libfc: fix null pointer dereference on a null lport scsi: zfcp: fix GCC compiler warning emitted with -Wmaybe-uninitialized scsi: zfcp: fix request object use-after-free in send path causing wrong traces scsi: zfcp: fix request object use-after-free in send path causing seqno errors scsi: megaraid_sas: Update driver version to 07.710.50.00 scsi: megaraid_sas: Add module parameter for FW Async event logging scsi: megaraid_sas: Enable msix_load_balance for Invader and later controllers scsi: megaraid_sas: Fix calculation of target ID scsi: lpfc: reduce stack size with CONFIG_GCC_PLUGIN_STRUCTLEAK_VERBOSE scsi: devinfo: BLIST_TRY_VPD_PAGES for SanDisk Cruzer Blade ... commit 168c79971b4a7be7011e73bf488b740a8e1135c8 Merge: 18253e034d2a 29be86d7f9cb Author: Linus Torvalds Date: Sat Jul 20 09:34:55 2019 -0700 Merge tag 'kbuild-v5.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull more Kbuild updates from Masahiro Yamada: - match the directory structure of the linux-libc-dev package to that of Debian-based distributions - fix incorrect include/config/auto.conf generation when Kconfig creates it along with the .config file - remove misleading $(AS) from documents - clean up precious tag files by distclean instead of mrproper - add a new coccinelle patch for devm_platform_ioremap_resource migration - refactor module-related scripts to read modules.order instead of $(MODVERDIR)/*.mod files to get the list of created modules - remove MODVERDIR - update list of header compile-test - add -fcf-protection=none flag to avoid conflict with the retpoline flags when CONFIG_RETPOLINE=y - misc cleanups * tag 'kbuild-v5.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (25 commits) kbuild: add -fcf-protection=none when using retpoline flags kbuild: update compile-test header list for v5.3-rc1 kbuild: split out *.mod out of {single,multi}-used-m rules kbuild: remove 'prepare1' target kbuild: remove the first line of *.mod files kbuild: create *.mod with full directory path and remove MODVERDIR kbuild: export_report: read modules.order instead of .tmp_versions/*.mod kbuild: modpost: read modules.order instead of $(MODVERDIR)/*.mod kbuild: modsign: read modules.order instead of $(MODVERDIR)/*.mod kbuild: modinst: read modules.order instead of $(MODVERDIR)/*.mod scsi: remove pointless $(MODVERDIR)/$(obj)/53c700.ver kbuild: remove duplication from modules.order in sub-directories kbuild: get rid of kernel/ prefix from in-tree modules.{order,builtin} kbuild: do not create empty modules.order in the prepare stage coccinelle: api: add devm_platform_ioremap_resource script kbuild: compile-test headers listed in header-test-m as well kbuild: remove unused hostcc-option kbuild: remove tag files by distclean instead of mrproper kbuild: add --hash-style= and --build-id unconditionally kbuild: get rid of misleading $(AS) from documents ... commit 18253e034d2aeee140f82fc9fe89c4bce5c81799 Merge: abdfd52a295f 56cbb429d911 Author: Linus Torvalds Date: Sat Jul 20 09:15:51 2019 -0700 Merge branch 'work.dcache2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull dcache and mountpoint updates from Al Viro: "Saner handling of refcounts to mountpoints. Transfer the counting reference from struct mount ->mnt_mountpoint over to struct mountpoint ->m_dentry. That allows us to get rid of the convoluted games with ordering of mount shutdowns. The cost is in teaching shrink_dcache_{parent,for_umount} to cope with mixed-filesystem shrink lists, which we'll also need for the Slab Movable Objects patchset" * 'work.dcache2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: switch the remnants of releasing the mountpoint away from fs_pin get rid of detach_mnt() make struct mountpoint bear the dentry reference to mountpoint, not struct mount Teach shrink_dcache_parent() to cope with mixed-filesystem shrink lists fs/namespace.c: shift put_mountpoint() to callers of unhash_mnt() __detach_mounts(): lookup_mountpoint() can't return ERR_PTR() anymore nfs: dget_parent() never returns NULL ceph: don't open-code the check for dead lockref commit 6879298bd0673840cadd1fb36d7225485504ceb4 Author: Thomas Gleixner Date: Sat Jul 20 10:56:41 2019 +0200 x86/entry/64: Prevent clobbering of saved CR2 value The recent fix for CR2 corruption introduced a new way to reliably corrupt the saved CR2 value. CR2 is saved early in the entry code in RDX, which is the third argument to the fault handling functions. But it missed that between saving and invoking the fault handler enter_from_user_mode() can be called. RDX is a caller saved register so the invoked function can freely clobber it with the obvious consequences. The TRACE_IRQS_OFF call is safe as it calls through the thunk which preserves RDX, but TRACE_IRQS_OFF_DEBUG is not because it also calls into C-code outside of the thunk. Store CR2 in R12 instead which is a callee saved register and move R12 to RDX just before calling the fault handler. Fixes: a0d14b8909de ("x86/mm, tracing: Fix CR2 corruption") Reported-by: Sean Christopherson Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/alpine.DEB.2.21.1907201020540.1782@nanos.tec.linutronix.de arch/x86/entry/entry_64.S | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 19dbdcb8039cff16669a05136a29180778d16d0a Author: Peter Zijlstra Date: Thu Jul 18 11:20:09 2019 +0200 smp: Warn on function calls from softirq context It's clearly documented that smp function calls cannot be invoked from softirq handling context. Unfortunately nothing enforces that or emits a warning. A single function call can be invoked from softirq context only via smp_call_function_single_async(). The only legit context is task context, so add a warning to that effect. Reported-by: luferry Signed-off-by: Peter Zijlstra Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20190718160601.GP3402@hirez.programming.kicks-ass.net kernel/smp.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 30cd8604323dbaf20a80e797fe7057f5b02e394d Author: Eric Hankland Date: Thu Jul 18 11:38:18 2019 -0700 KVM: x86: Add fixed counters to PMU filter Updates KVM_CAP_PMU_EVENT_FILTER so it can also whitelist or blacklist fixed counters. Signed-off-by: Eric Hankland [No need to check padding fields for zero. - Paolo] Signed-off-by: Paolo Bonzini Documentation/virtual/kvm/api.txt | 15 ++++++++++----- arch/x86/include/uapi/asm/kvm.h | 9 ++++++--- arch/x86/kvm/pmu.c | 23 +++++++++++++++++++---- 3 files changed, 35 insertions(+), 12 deletions(-) commit 88dddc11a8d6b09201b4db9d255b3394d9bc9e57 Author: Paolo Bonzini Date: Fri Jul 19 18:41:10 2019 +0200 KVM: nVMX: do not use dangling shadow VMCS after guest reset If a KVM guest is reset while running a nested guest, free_nested will disable the shadow VMCS execution control in the vmcs01. However, on the next KVM_RUN vmx_vcpu_run would nevertheless try to sync the VMCS12 to the shadow VMCS which has since been freed. This causes a vmptrld of a NULL pointer on my machime, but Jan reports the host to hang altogether. Let's see how much this trivial patch fixes. Reported-by: Jan Kiszka Cc: Liran Alon Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 3b20e03a1066ab2056711166c1b41d421d1ff7b7 Author: Paolo Bonzini Date: Fri Jul 19 18:15:08 2019 +0200 KVM: VMX: dump VMCS on failed entry This is useful for debugging, and is ratelimited nowadays. Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/vmx.c | 1 + 1 file changed, 1 insertion(+) commit 6fc3977ccc5d3c22e851f2dce2d3ce2a0a843842 Author: Like Xu Date: Thu Jul 18 13:35:14 2019 +0800 KVM: x86/vPMU: refine kvm_pmu err msg when event creation failed If a perf_event creation fails due to any reason of the host perf subsystem, it has no chance to log the corresponding event for guest which may cause abnormal sampling data in guest result. In debug mode, this message helps to understand the state of vPMC and we may not limit the number of occurrences but not in a spamming style. Suggested-by: Joe Perches Signed-off-by: Like Xu Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini arch/x86/kvm/pmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d984740944308a310f9d33df774e2304fc1e6959 Author: Wanpeng Li Date: Thu Jul 18 19:39:07 2019 +0800 KVM: s390: Use kvm_vcpu_wake_up in kvm_s390_vcpu_wakeup Use kvm_vcpu_wake_up() in kvm_s390_vcpu_wakeup(). Suggested-by: Paolo Bonzini Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Christian Borntraeger Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini arch/s390/kvm/interrupt.c | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) commit d73eb57b80b98ae147e4e6a7d9877c2ba175f972 Author: Wanpeng Li Date: Thu Jul 18 19:39:06 2019 +0800 KVM: Boost vCPUs that are delivering interrupts Inspired by commit 9cac38dd5d (KVM/s390: Set preempted flag during vcpu wakeup and interrupt delivery), we want to also boost not just lock holders but also vCPUs that are delivering interrupts. Most smp_call_function_many calls are synchronous, so the IPI target vCPUs are also good yield candidates. This patch introduces vcpu->ready to boost vCPUs during wakeup and interrupt delivery time; unlike s390 we do not reuse vcpu->preempted so that voluntarily preempted vCPUs are taken into account by kvm_vcpu_on_spin, but vmx_vcpu_pi_put is not affected (VT-d PI handles voluntary preemption separately, in pi_pre_block). Testing on 80 HT 2 socket Xeon Skylake server, with 80 vCPUs VM 80GB RAM: ebizzy -M vanilla boosting improved 1VM 21443 23520 9% 2VM 2800 8000 180% 3VM 1800 3100 72% Testing on my Haswell desktop 8 HT, with 8 vCPUs VM 8GB RAM, two VMs, one running ebizzy -M, the other running 'stress --cpu 2': w/ boosting + w/o pv sched yield(vanilla) vanilla boosting improved 1570 4000 155% w/ boosting + w/ pv sched yield(vanilla) vanilla boosting improved 1844 5157 179% w/o boosting, perf top in VM: 72.33% [kernel] [k] smp_call_function_many 4.22% [kernel] [k] call_function_i 3.71% [kernel] [k] async_page_fault w/ boosting, perf top in VM: 38.43% [kernel] [k] smp_call_function_many 6.31% [kernel] [k] async_page_fault 6.13% libc-2.23.so [.] __memcpy_avx_unaligned 4.88% [kernel] [k] call_function_interrupt Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Christian Borntraeger Cc: Paul Mackerras Cc: Marc Zyngier Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini arch/s390/kvm/interrupt.c | 2 +- include/linux/kvm_host.h | 1 + virt/kvm/kvm_main.c | 12 ++++++++---- 3 files changed, 10 insertions(+), 5 deletions(-) commit 2417c87059b0f29535bcedf9360b94a0110bc3da Author: Thomas Huth Date: Thu Jul 18 13:55:27 2019 +0200 KVM: selftests: Remove superfluous define from vmx.c The code in vmx.c does not use "program_invocation_name", so there is no need to "#define _GNU_SOURCE" here. Signed-off-by: Thomas Huth Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/lib/x86_64/vmx.c | 2 -- 1 file changed, 2 deletions(-) commit 118154bdf54ca79e4b5f3ce6d4a8a7c6b7c2c76f Author: Liran Alon Date: Wed Jul 17 02:56:58 2019 +0300 KVM: SVM: Fix detection of AMD Errata 1096 When CPU raise #NPF on guest data access and guest CR4.SMAP=1, it is possible that CPU microcode implementing DecodeAssist will fail to read bytes of instruction which caused #NPF. This is AMD errata 1096 and it happens because CPU microcode reading instruction bytes incorrectly attempts to read code as implicit supervisor-mode data accesses (that is, just like it would read e.g. a TSS), which are susceptible to SMAP faults. The microcode reads CS:RIP and if it is a user-mode address according to the page tables, the processor gives up and returns no instruction bytes. In this case, GuestIntrBytes field of the VMCB on a VMEXIT will incorrectly return 0 instead of the correct guest instruction bytes. Current KVM code attemps to detect and workaround this errata, but it has multiple issues: 1) It mistakenly checks if guest CR4.SMAP=0 instead of guest CR4.SMAP=1, which is required for encountering a SMAP fault. 2) It assumes SMAP faults can only occur when guest CPL==3. However, in case guest CR4.SMEP=0, the guest can execute an instruction which reside in a user-accessible page with CPL<3 priviledge. If this instruction raise a #NPF on it's data access, then CPU DecodeAssist microcode will still encounter a SMAP violation. Even though no sane OS will do so (as it's an obvious priviledge escalation vulnerability), we still need to handle this semanticly correct in KVM side. Note that (2) *is* a useful optimization, because CR4.SMAP=1 is an easy triggerable condition and guests usually enable SMAP together with SMEP. If the vCPU has CR4.SMEP=1, the errata could indeed be encountered onlt at guest CPL==3; otherwise, the CPU would raise a SMEP fault to guest instead of #NPF. We keep this condition to avoid false positives in the detection of the errata. In addition, to avoid future confusion and improve code readbility, include details of the errata in code and not just in commit message. Fixes: 05d5a4863525 ("KVM: SVM: Workaround errata#1096 (insn_len maybe zero on SMAP violation)") Cc: Singh Brijesh Cc: Sean Christopherson Cc: Paolo Bonzini Reviewed-by: Boris Ostrovsky Signed-off-by: Liran Alon Reviewed-by: Brijesh Singh Signed-off-by: Paolo Bonzini arch/x86/kvm/svm.c | 42 +++++++++++++++++++++++++++++++++++------- 1 file changed, 35 insertions(+), 7 deletions(-) commit 0c5f81dad46c90792e6c3c4797131323c9e96dcd Author: Wanpeng Li Date: Sat Jul 6 09:26:51 2019 +0800 KVM: LAPIC: Inject timer interrupt via posted interrupt Dedicated instances are currently disturbed by unnecessary jitter due to the emulated lapic timers firing on the same pCPUs where the vCPUs reside. There is no hardware virtual timer on Intel for guest like ARM, so both programming timer in guest and the emulated timer fires incur vmexits. This patch tries to avoid vmexit when the emulated timer fires, at least in dedicated instance scenario when nohz_full is enabled. In that case, the emulated timers can be offload to the nearest busy housekeeping cpus since APICv has been found for several years in server processors. The guest timer interrupt can then be injected via posted interrupts, which are delivered by the housekeeping cpu once the emulated timer fires. The host should tuned so that vCPUs are placed on isolated physical processors, and with several pCPUs surplus for busy housekeeping. If disabled mwait/hlt/pause vmexits keep the vCPUs in non-root mode, ~3% redis performance benefit can be observed on Skylake server, and the number of external interrupt vmexits drops substantially. Without patch VM-EXIT Samples Samples% Time% Min Time Max Time Avg time EXTERNAL_INTERRUPT 42916 49.43% 39.30% 0.47us 106.09us 0.71us ( +- 1.09% ) While with patch: VM-EXIT Samples Samples% Time% Min Time Max Time Avg time EXTERNAL_INTERRUPT 6871 9.29% 2.96% 0.44us 57.88us 0.72us ( +- 4.02% ) Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Marcelo Tosatti Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 99 ++++++++++++++++++++++++++--------------- arch/x86/kvm/lapic.h | 1 + arch/x86/kvm/vmx/vmx.c | 3 +- arch/x86/kvm/x86.c | 6 +++ arch/x86/kvm/x86.h | 2 + include/linux/sched/isolation.h | 6 +++ kernel/sched/isolation.c | 6 +++ 7 files changed, 87 insertions(+), 36 deletions(-) commit 89099d855bf084c3e428ca257b50d77d1a468437 Merge: 9a2f97bb8ddd 14bfb13f0ed5 Author: David S. Miller Date: Fri Jul 19 21:27:45 2019 -0700 Merge branch 'flow_offload-fixes' Pablo Neira Ayuso says: ==================== flow_offload fixes The following patchset contains fixes for the flow_offload infrastructure: 1) Fix possible build breakage before patch 3/4. Both the flow_offload infrastructure and OVS define the flow_stats structure. Patch 3/4 in this batch indirectly pulls in the flow_stats definition from include/net/flow_offload.h into OVS, leading to structure redefinition compile-time errors. 2) Remove netns parameter from flow_block_cb_alloc(), this is not required as Jiri suggests. The flow_block_cb_is_busy() function uses the per-driver block list to check for used blocks which was the original intention for this parameter. 3) Rename tc_setup_cb_t to flow_setup_cb_t. This callback is not exclusive of tc anymore, this might confuse the reader as Jiri suggests, fix this semantic inconsistency. Add #include to include/net/netfilter/nf_tables_offload.h to avoid a compile break with CONFIG_HEADER_TEST=y. 4) Fix block sharing feature: Add flow_block structure and use it, update flow_block_cb_lookup() to use this flow_block object. ==================== Signed-off-by: David S. Miller commit 14bfb13f0ed525ed117b5d1f3e77e7c0a6be15de Author: Pablo Neira Ayuso Date: Fri Jul 19 18:20:16 2019 +0200 net: flow_offload: add flow_block structure and use it This object stores the flow block callbacks that are attached to this block. Update flow_block_cb_lookup() to take this new object. This patch restores the block sharing feature. Fixes: da3eeb904ff4 ("net: flow_offload: add list handling functions") Signed-off-by: Pablo Neira Ayuso Acked-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 2 +- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 8 +++++--- drivers/net/ethernet/mscc/ocelot_flower.c | 8 ++++---- drivers/net/ethernet/mscc/ocelot_tc.c | 2 +- drivers/net/ethernet/netronome/nfp/flower/offload.c | 5 +++-- include/net/flow_offload.h | 12 +++++++++++- include/net/netfilter/nf_tables.h | 5 +++-- include/net/sch_generic.h | 2 +- net/core/flow_offload.c | 6 +++--- net/dsa/slave.c | 2 +- net/netfilter/nf_tables_api.c | 2 +- net/netfilter/nf_tables_offload.c | 5 +++-- net/sched/cls_api.c | 10 +++++++--- 13 files changed, 44 insertions(+), 25 deletions(-) commit a7323311515d488b7714bb7504a1d50fabb0bfcf Author: Pablo Neira Ayuso Date: Fri Jul 19 18:20:15 2019 +0200 net: flow_offload: rename tc_setup_cb_t to flow_setup_cb_t Rename this type definition and adapt users. Signed-off-by: Pablo Neira Ayuso Acked-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 2 +- drivers/net/ethernet/mscc/ocelot_tc.c | 2 +- include/net/flow_offload.h | 17 +++++++++++------ include/net/pkt_cls.h | 5 ++--- include/net/sch_generic.h | 6 ++---- net/core/flow_offload.c | 9 +++++---- net/dsa/slave.c | 2 +- net/sched/cls_api.c | 2 +- net/sched/cls_bpf.c | 2 +- net/sched/cls_flower.c | 2 +- net/sched/cls_matchall.c | 2 +- net/sched/cls_u32.c | 6 +++--- 12 files changed, 30 insertions(+), 27 deletions(-) commit 0c7294ddae73ad8d7532f95a86259e311e991a55 Author: Pablo Neira Ayuso Date: Fri Jul 19 18:20:14 2019 +0200 net: flow_offload: remove netns parameter from flow_block_cb_alloc() No need to annotate the netns on the flow block callback object, flow_block_cb_is_busy() already checks for used blocks. Fixes: d63db30c8537 ("net: flow_offload: add flow_block_cb_alloc() and flow_block_cb_free()") Signed-off-by: Pablo Neira Ayuso Acked-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 3 +-- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 5 ++--- drivers/net/ethernet/mscc/ocelot_flower.c | 3 +-- drivers/net/ethernet/mscc/ocelot_tc.c | 2 +- drivers/net/ethernet/netronome/nfp/flower/offload.c | 6 ++---- include/net/flow_offload.h | 3 +-- net/core/flow_offload.c | 9 +++------ net/dsa/slave.c | 2 +- 8 files changed, 12 insertions(+), 21 deletions(-) commit aef833c58d321f09ae4ce4467723542842ba9faf Author: Pablo Neira Ayuso Date: Fri Jul 19 18:20:13 2019 +0200 net: openvswitch: rename flow_stats to sw_flow_stats There is a flow_stats structure defined in include/net/flow_offload.h and a follow up patch adds #include to net/sch_generic.h. This breaks compilation since OVS codebase includes net/sock.h which pulls in linux/filter.h which includes net/sch_generic.h. In file included from ./include/net/sch_generic.h:18:0, from ./include/linux/filter.h:25, from ./include/net/sock.h:59, from ./include/linux/tcp.h:19, from net/openvswitch/datapath.c:24 This definition takes precedence on OVS since it is placed in the networking core, so rename flow_stats in OVS to sw_flow_stats since this structure is contained in sw_flow. Signed-off-by: Pablo Neira Ayuso Acked-by: Jiri Pirko Signed-off-by: David S. Miller net/openvswitch/flow.c | 8 ++++---- net/openvswitch/flow.h | 4 ++-- net/openvswitch/flow_table.c | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) commit 9a2f97bb8ddddbf655ce1fcdf688dcec19deb59f Merge: 31cc088a4f5d dfee0e99bcff Author: David S. Miller Date: Fri Jul 19 21:25:10 2019 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net The following patchset contains Netfilter fixes for net: 1) Fix a deadlock when module is requested via netlink_bind() in nfnetlink, from Florian Westphal. 2) Fix ipt_rpfilter and ip6t_rpfilter with VRF, from Miaohe Lin. 3) Skip master comparison in SIP helper to fix expectation clash under two valid scenarios, from xiao ruizhu. 4) Remove obsolete comments in nf_conntrack codebase, from Yonatan Goldschmidt. 5) Fix redirect extension module autoload, from Christian Hesse. 6) Fix incorrect mssg option sent to client in synproxy, from Fernando Fernandez. 7) Fix incorrect window calculations in TCP conntrack, from Florian Westphal. 8) Don't bail out when updating basechain policy due to recent offload works, also from Florian. 9) Allow symhash to use modulus 1 as other hash extensions do, from Laura.Garcia. 10) Missing NAT chain module autoload for the inet family, from Phil Sutter. 11) Fix missing adjustment of TCP RST packet in synproxy, from Fernando Fernandez. 12) Skip EAGAIN path when nft_meta_bridge is built-in or not selected. 13) Conntrack bridge does not depend on nf_tables_bridge. 14) Turn NF_TABLES_BRIDGE into tristate to fix possible link break of nft_meta_bridge, from Arnd Bergmann. ==================== Signed-off-by: David S. Miller commit c39f2d9db0fd81ea20bb5cce9b3f082ca63753e2 Merge: 597473720f4d 771a081e44a9 Author: Dmitry Torokhov Date: Sat Jul 20 07:07:56 2019 +0300 Merge branch 'next' into for-linus Prepare second round of input updates for 5.3 merge window. commit 29be86d7f9cb18df4123f309ac7857570513e8bc Author: Seth Forshee Date: Wed Jul 17 11:06:26 2019 -0500 kbuild: add -fcf-protection=none when using retpoline flags The gcc -fcf-protection=branch option is not compatible with -mindirect-branch=thunk-extern. The latter is used when CONFIG_RETPOLINE is selected, and this will fail to build with a gcc which has -fcf-protection=branch enabled by default. Adding -fcf-protection=none when building with retpoline enabled prevents such build failures. Signed-off-by: Seth Forshee Signed-off-by: Masahiro Yamada Makefile | 6 ++++++ 1 file changed, 6 insertions(+) commit 67bf47452ea00edd90e796054229b651e64b82c1 Author: Masahiro Yamada Date: Wed Jul 17 15:29:13 2019 +0900 kbuild: update compile-test header list for v5.3-rc1 - Some headers graduated from the blacklist - hyperv_timer.h joined the header-test when CONFIG_X86=y - nf_tables*.h joined the header-test when CONFIG_NF_TABLES is enabled. - The entry for nf_tables_offload.h was added to fix build error for the combination of CONFIG_NF_TABLES=n and CONFIG_KERNEL_HEADER_TEST=y. - The entry for iomap.h was added because this header is supposed to be included only when CONFIG_BLOCK=y Signed-off-by: Masahiro Yamada include/Kbuild | 14 ++++++-------- usr/include/Makefile | 8 -------- 2 files changed, 6 insertions(+), 16 deletions(-) commit abdfd52a295fb5731ab07b5c9013e2e39f4d1cbe Merge: af6af87d7e4f a151f2753725 Author: Linus Torvalds Date: Fri Jul 19 17:27:27 2019 -0700 Merge tag 'armsoc-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC defconfig updates from Olof Johansson: "We keep this in a separate branch to avoid cross-branch conflicts, but most of the material here is fairly boring -- some new drivers turned on for hardware since they were merged, and some refreshed files due to time having moved a lot of entries around" * tag 'armsoc-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (47 commits) ARM: configs: multi_v5: Remove duplicate ASPEED options arm64: defconfig: Enable CONFIG_KEYBOARD_SNVS_PWRKEY as module ARM: imx_v6_v7_defconfig: Enable CONFIG_ARM_IMX_CPUFREQ_DT defconfig: arm64: enable i.MX8 SCU octop driver arm64: defconfig: Add i.MX SCU SoC info driver arm64: defconfig: Enable CONFIG_QORIQ_THERMAL ARM: imx_v6_v7_defconfig: Select CONFIG_NVMEM_SNVS_LPGPR arm64: defconfig: ARM_IMX_CPUFREQ_DT=m ARM: imx_v6_v7_defconfig: Add TPM PWM support by default ARM: imx_v6_v7_defconfig: Enable the OV2680 camera driver ARM: imx_v6_v7_defconfig: Enable CONFIG_THERMAL_STATISTICS arm64: defconfig: NVMEM_IMX_OCOTP=y for imx8m ARM: multi_v7_defconfig: enable STMFX pinctrl support arm64 defconfig: enable LVM support ARM: configs: multi_v5: Add more ASPEED devices arm64: defconfig: Add Tegra194 PCIe driver ARM: configs: aspeed: Add new drivers ARM: exynos_defconfig: Enable Panfrost and Lima drivers ARM: multi_v7_defconfig: Enable Panfrost and Lima drivers arm64 defconfig: enable Mellanox cards ... commit af6af87d7e4ff67324425daa699b9cda32e3161d Merge: 8362fd64f07e f90b8fda3a9d Author: Linus Torvalds Date: Fri Jul 19 17:19:24 2019 -0700 Merge tag 'armsoc-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM Devicetree updates from Olof Johansson: "We continue to see a lot of new material. I've highlighted some of it below, but there's been more beyond that as well. One of the sweeping changes is that many boards have seen their ARM Mali GPU devices added to device trees, since the DRM drivers have now been merged. So, with the caveat that I have surely missed several great contributions, here's a collection of the material this time around: New SoCs: - Mediatek mt8183 (4x Cortex-A73 + 4x Cortex-A53) - TI J721E (2x Cortex-A72 + 3x Cortex-R5F + 3 DSPs + MMA) - Amlogic G12B (4x Cortex-A73 + 2x Cortex-A53) New Boards / platforms: - Aspeed BMC support for a number of new server platforms - Kontron SMARC SoM (several i.MX6 versions) - Novtech's Meerkat96 (i.MX7) - ST Micro Avenger96 board - Hardkernel ODROID-N2 (Amlogic G12B) - Purism Librem5 devkit (i.MX8MQ) - Google Cheza (Qualcomm SDM845) - Qualcomm Dragonboard 845c (Qualcomm SDM845) - Hugsun X99 TV Box (Rockchip RK3399) - Khadas Edge/Edge-V/Captain (Rockchip RK3399) Updated / expanded boards and platforms: - Renesas r7s9210 has a lot of new peripherals added - Fixes and polish for Rockchip-based Chromebooks - Amlogic G12A has a lot of peripherals added - Nvidia Jetson Nano sees various fixes and improvements, and is now at feature parity with TX1" * tag 'armsoc-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (586 commits) ARM: dts: gemini: Set DIR-685 SPI CS as active low ARM: dts: exynos: Adjust buck[78] regulators to supported values on Arndale Octa ARM: dts: exynos: Adjust buck[78] regulators to supported values on Odroid XU3 family ARM: dts: exynos: Move Mali400 GPU node to "/soc" ARM: dts: exynos: Fix imprecise abort on Mali GPU probe on Exynos4210 arm64: dts: qcom: qcs404: Add missing space for cooling-cells property arm64: dts: rockchip: Fix USB3 Type-C on rk3399-sapphire arm64: dts: rockchip: Update DWC3 modules on RK3399 SoCs arm64: dts: rockchip: enable rk3328 watchdog clock ARM: dts: rockchip: add display nodes for rk322x ARM: dts: rockchip: fix vop iommu-cells on rk322x arm64: dts: rockchip: Add support for Hugsun X99 TV Box arm64: dts: rockchip: Define values for the IPA governor for rock960 arm64: dts: rockchip: Fix multiple thermal zones conflict in rk3399.dtsi arm64: dts: rockchip: add core dtsi file for RK3399Pro SoCs arm64: dts: rockchip: improve rk3328-roc-cc rgmii performance. Revert "ARM: dts: rockchip: set PWM delay backlight settings for Minnie" ARM: dts: rockchip: Configure BT_DEV_WAKE in on rk3288-veyron arm64: dts: qcom: sdm845-cheza: add initial cheza dt ARM: dts: msm8974-FP2: Add vibration motor ... commit 8362fd64f07eaef7155c94fca8dee91c4f99a666 Merge: 24e44913aa74 8c0993621c3e Author: Linus Torvalds Date: Fri Jul 19 17:13:56 2019 -0700 Merge tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC-related driver updates from Olof Johansson: "Various driver updates for platforms and a couple of the small driver subsystems we merge through our tree: - A driver for SCU (system control) on NXP i.MX8QXP - Qualcomm Always-on Subsystem messaging driver (AOSS QMP) - Qualcomm PM support for MSM8998 - Support for a newer version of DRAM PHY driver for Broadcom (DPFE) - Reset controller support for Bitmain BM1880 - TI SCI (System Control Interface) support for CPU control on AM654 processors - More TI sysc refactoring and rework" * tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (84 commits) reset: remove redundant null check on pointer dev soc: rockchip: work around clang warning dt-bindings: reset: imx7: Fix the spelling of 'indices' soc: imx: Add i.MX8MN SoC driver support soc: aspeed: lpc-ctrl: Fix probe error handling soc: qcom: geni: Add support for ACPI firmware: ti_sci: Fix gcc unused-but-set-variable warning firmware: ti_sci: Use the correct style for SPDX License Identifier soc: imx8: Use existing of_root directly soc: imx8: Fix potential kernel dump in error path firmware/psci: psci_checker: Park kthreads before stopping them memory: move jedec_ddr.h from include/memory to drivers/memory/ memory: move jedec_ddr_data.c from lib/ to drivers/memory/ MAINTAINERS: Remove myself as qcom maintainer soc: aspeed: lpc-ctrl: make parameter optional soc: qcom: apr: Don't use reg for domain id soc: qcom: fix QCOM_AOSS_QMP dependency and build errors memory: tegra: Fix -Wunused-const-variable firmware: tegra: Early resume BPMP soc/tegra: Select pinctrl for Tegra194 ... commit 24e44913aa746098349370a0f279733c0cadcba7 Merge: 31cc088a4f5d 7e8a0f108990 Author: Linus Torvalds Date: Fri Jul 19 17:05:08 2019 -0700 Merge tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC platform updates from Olof Johansson: "SoC platform changes. Main theme this merge window: - The Netx platform (Netx 100/500) platform is removed by Linus Walleij-- the SoC doesn't have active maintainers with hardware, and in discussions with the vendor the agreement was that it's OK to remove. - Russell King has a series of patches that cleans up and refactors SA1101 and RiscPC support" * tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (47 commits) ARM: stm32: use "depends on" instead of "if" after prompt ARM: sa1100: convert to common clock framework ARM: exynos: Cleanup cppcheck shifting warning ARM: pxa/lubbock: remove lubbock_set_misc_wr() from global view ARM: exynos: Only build MCPM support if used arm: add missing include platform-data/atmel.h ARM: davinci: Use GPIO lookup table for DA850 LEDs ARM: OMAP2: drop explicit assembler architecture ARM: use arch_extension directive instead of arch argument ARM: imx: Switch imx7d to imx-cpufreq-dt for speed-grading ARM: bcm: Enable PINCTRL for ARCH_BRCMSTB ARM: bcm: Enable ARCH_HAS_RESET_CONTROLLER for ARCH_BRCMSTB ARM: riscpc: enable chained scatterlist support ARM: riscpc: reduce IRQ handling code ARM: riscpc: move RiscPC assembly files from arch/arm/lib to mach-rpc ARM: riscpc: parse video information from tagged list ARM: riscpc: add ecard quirk for Atomwide 3port serial card MAINTAINERS: mvebu: Add git entry soc: ti: pm33xx: Add a print while entering RTC only mode with DDR in self-refresh ARM: OMAP2+: Make some variables static ... commit 94bccc34071094c165c79b515d21b63c78f7e968 Author: Thomas Tai Date: Thu Jul 18 18:37:34 2019 +0000 iscsi_ibft: make ISCSI_IBFT dependson ACPI instead of ISCSI_IBFT_FIND iscsi_ibft can use ACPI to find the iBFT entry during bootup, currently, ISCSI_IBFT depends on ISCSI_IBFT_FIND which is a X86 legacy way to find the iBFT by searching through the low memory. This patch changes the dependency so that other arch like ARM64 can use ISCSI_IBFT as long as the arch supports ACPI. ibft_init() needs to use the global variable ibft_addr declared in iscsi_ibft_find.c. A #ifndef CONFIG_ISCSI_IBFT_FIND is needed to declare the variable if CONFIG_ISCSI_IBFT_FIND is not selected. Moving ibft_addr into the iscsi_ibft.c does not work because if ISCSI_IBFT is selected as a module, the arch/x86/kernel/setup.c won't be able to find the variable at compile time. Signed-off-by: Thomas Tai Signed-off-by: Konrad Rzeszutek Wilk drivers/firmware/Kconfig | 5 +++-- drivers/firmware/iscsi_ibft.c | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) commit 1d4126c4e1190d2f7d3f388552f9bd17ae0c64fc Author: Andrii Nakryiko Date: Fri Jul 19 12:46:03 2019 -0700 libbpf: sanitize VAR to conservative 1-byte INT If VAR in non-sanitized BTF was size less than 4, converting such VAR into an INT with size=4 will cause BTF validation failure due to violationg of STRUCT (into which DATASEC was converted) member size. Fix by conservatively using size=1. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov tools/lib/bpf/libbpf.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 04efe5911fb30664a56ec63d272a0f39a71545db Author: Andrii Nakryiko Date: Fri Jul 19 12:32:42 2019 -0700 libbpf: fix SIGSEGV when BTF loading fails, but .BTF.ext exists In case when BTF loading fails despite sanitization, but BPF object has .BTF.ext loaded as well, we free and null obj->btf, but not obj->btf_ext. This leads to an attempt to relocate .BTF.ext later on during bpf_object__load(), which assumes obj->btf is present. This leads to SIGSEGV on null pointer access. Fix bug by freeing and nulling obj->btf_ext as well. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov tools/lib/bpf/libbpf.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 31cc088a4f5d83481c6f5041bd6eb06115b974af Merge: dd4542d2823a 8ee795625665 Author: Linus Torvalds Date: Fri Jul 19 12:29:43 2019 -0700 Merge tag 'drm-next-2019-07-19' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Daniel Vetter: "Dave is back in shape, but now family got it so I'm doing the pull. Two things worthy of note: - nouveau feature pull was way too late, Dave&me decided to not take that, so Ben spun up a pull with just the fixes. - after some chatting with the arm display maintainers we decided to change a bit how that's maintained, for more oversight/review and cross vendor collab. More details below: nouveau: - bugfixes - TU116 enabling (minor iteration) :w amdgpu: - large pile of fixes for new hw support this release (navi, vega20) - audio hotplug fix - bunch of corner cases and small fixes all over for amdgpu/kfd komeda: - back out some new properties (from this merge window) that needs more pondering. bochs: - fb pitch setup core: - a new panel quirk - misc fixes" * tag 'drm-next-2019-07-19' of git://anongit.freedesktop.org/drm/drm: (73 commits) drm/nouveau/secboot/gp102-: remove WAR for SEC2 RTOS start bug drm/nouveau/flcn/gp102-: improve implementation of bind_context() on SEC2/GSP drm/nouveau: fix memory leak in nouveau_conn_reset() drm/nouveau/dmem: missing mutex_lock in error path drm/nouveau/hwmon: return EINVAL if the GPU is powered down for sensors reads drm/nouveau: fix bogus GPL-2 license header drm/nouveau: fix bogus GPL-2 license header drm/nouveau/i2c: Enable i2c pads & busses during preinit drm/nouveau/disp/tu102-: wire up scdc parameter setter drm/nouveau/core: recognise TU116 chipset drm/nouveau/kms: disallow dual-link harder if hdmi connection detected drm/nouveau/disp/nv50-: fix center/aspect-corrected scaling drm/nouveau/disp/nv50-: force scaler for any non-default LVDS/eDP modes drm/nouveau/mcp89/mmu: Use mcp77_mmu_new instead of g84_mmu_new on MCP89. drm/amd/display: init res_pool dccg_ref, dchub_ref with xtalin_freq drm/amdgpu/pm: remove check for pp funcs in freq sysfs handlers drm/amd/display: Force uclk to max for every state drm/amdkfd: Remove GWS from process during uninit drm/amd/amdgpu: Fix offset for vmid selection in debugfs interface drm/amd/powerplay: update vega20 driver if to fit latest SMU firmware ... commit dd4542d2823ac55cb86450960423f55e818aa182 Merge: 40ef768ab6ee cf144f81a99d Author: Linus Torvalds Date: Fri Jul 19 12:23:37 2019 -0700 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fixes from Herbert Xu: - Fix missed wake-up race in padata - Use crypto_memneq in ccp - Fix version check in ccp - Fix fuzz test failure in ccp - Fix potential double free in crypto4xx - Fix compile warning in stm32 * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: padata: use smp_mb in padata_reorder to avoid orphaned padata jobs crypto: ccp - Fix SEV_VERSION_GREATER_OR_EQUAL crypto: ccp/gcm - use const time tag comparison. crypto: ccp - memset structure fields to zero before reuse crypto: crypto4xx - fix a potential double free in ppc4xx_trng_probe crypto: stm32/hash - Fix incorrect printk modifier for size_t commit 40ef768ab6eecc1b51461a034274350b31fc29d1 Author: Dave Jones Date: Thu Jul 18 23:51:56 2019 -0400 Remove references to dead website. This fell into disrepair a while ago, and the majority of hits to the snapshots were from bots, so it's more trouble to keep running than it's worth. Signed-off-by: Dave Jones Signed-off-by: Linus Torvalds CREDITS | 1 - Documentation/dev-tools/sparse.rst | 5 ----- Documentation/translations/zh_CN/sparse.txt | 4 ---- 3 files changed, 10 deletions(-) commit 41ba485ef1d0dca98c5b194b8fb19201e123a08d Merge: a84d2d2906f9 6d54ceb539aa Author: Linus Torvalds Date: Fri Jul 19 12:18:46 2019 -0700 Merge tag 'trace-v5.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fix from Steven Rostedt: "Eiichi Tsukata found a small bug from the fixup of the stack code Removing ULONG_MAX as the marker for the user stack trace end, made the tracing code not know where the end is. The end is now marked with a zero (NULL) pointer. Eiichi fixed this in the tracing code" * tag 'trace-v5.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Fix user stack trace "??" output commit a84d2d2906f983fb80f5dcc3e8e7c3ad70aa9f0d Merge: b5d72dda8976 bdfeb0ccea1a Author: Linus Torvalds Date: Fri Jul 19 12:15:33 2019 -0700 Merge tag 'csky-for-linus-5.3-rc1' of git://github.com/c-sky/csky-linux Pull arch/csky pupdates from Guo Ren: "This round of csky subsystem gives two features (ASID algorithm update, Perf pmu record support) and some fixups. ASID updates: - Revert mmu ASID mechanism - Add new asid lib code from arm - Use generic asid algorithm to implement switch_mm - Improve tlb operation with help of asid Perf pmu record support: - Init pmu as a device - Add count-width property for csky pmu - Add pmu interrupt support - Fix perf record in kernel/user space - dt-bindings: Add csky PMU bindings Fixes: - Fixup no panic in kernel for some traps - Fixup some error count in 810 & 860. - Fixup abiv1 memset error" * tag 'csky-for-linus-5.3-rc1' of git://github.com/c-sky/csky-linux: csky: Fixup abiv1 memset error csky: Improve tlb operation with help of asid csky: Use generic asid algorithm to implement switch_mm csky: Add new asid lib code from arm csky: Revert mmu ASID mechanism dt-bindings: csky: Add csky PMU bindings dt-bindings: interrupt-controller: Update csky mpintc csky: Fixup some error count in 810 & 860. csky: Fix perf record in kernel/user space csky: Add pmu interrupt support csky: Add count-width property for csky pmu csky: Init pmu as a device csky: Fixup no panic in kernel for some traps csky: Select intc & timer drivers commit b5d72dda8976e878be47415b94bca8465d1fa22d Merge: 26473f83703e a1078e821b60 Author: Linus Torvalds Date: Fri Jul 19 11:41:26 2019 -0700 Merge tag 'for-linus-5.3a-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen updates from Juergen Gross: "Fixes and features: - A series to introduce a common command line parameter for disabling paravirtual extensions when running as a guest in virtualized environment - A fix for int3 handling in Xen pv guests - Removal of the Xen-specific tmem driver as support of tmem in Xen has been dropped (and it was experimental only) - A security fix for running as Xen dom0 (XSA-300) - A fix for IRQ handling when offlining cpus in Xen guests - Some small cleanups" * tag 'for-linus-5.3a-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen: let alloc_xenballooned_pages() fail if not enough memory free xen/pv: Fix a boot up hang revealed by int3 self test x86/xen: Add "nopv" support for HVM guest x86/paravirt: Remove const mark from x86_hyper_xen_hvm variable xen: Map "xen_nopv" parameter to "nopv" and mark it obsolete x86: Add "nopv" parameter to disable PV extensions x86/xen: Mark xen_hvm_need_lapic() and xen_x2apic_para_available() as __init xen: remove tmem driver Revert "x86/paravirt: Set up the virt_spin_lock_key after static keys get initialized" xen/events: fix binding user event channels to cpus commit 26473f83703e6bc56114ce4b045000de6efcfff7 Merge: 4f5ed1318c01 5d907307adc1 Author: Linus Torvalds Date: Fri Jul 19 11:38:12 2019 -0700 Merge tag 'iomap-5.3-merge-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull iomap split/cleanup from Darrick Wong: "As promised, here's the second part of the iomap merge for 5.3, in which we break up iomap.c into smaller files grouped by functional area so that it'll be easier in the long run to maintain cohesiveness of code units and to review incoming patches. There are no functional changes and fs/iomap.c split cleanly. Summary: - Regroup the fs/iomap.c code by major functional area so that we can start development for 5.4 from a more stable base" * tag 'iomap-5.3-merge-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: iomap: move internal declarations into fs/iomap/ iomap: move the main iteration code into a separate file iomap: move the buffered IO code into a separate file iomap: move the direct IO code into a separate file iomap: move the SEEK_HOLE code into a separate file iomap: move the file mapping reporting code into a separate file iomap: move the swapfile code into a separate file iomap: start moving code to fs/iomap/ commit 4f5ed1318c0108369a76f4a56242fbeea537abe9 Merge: d2fbf4b6d585 02e5ad973883 Author: Linus Torvalds Date: Fri Jul 19 11:35:08 2019 -0700 Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull misc vfs updates from Al Viro: "Assorted stuff" * 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: perf_event_get(): don't bother with fget_raw() vfs: update d_make_root() description commit d2fbf4b6d585e40f2369675148777abce3abd0e7 Merge: 933a90bf4f35 b4ed8f75c828 Author: Linus Torvalds Date: Fri Jul 19 11:33:22 2019 -0700 Merge branch 'work.adfs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull adfs updates from Al Viro: "More ADFS patches from Russell King" * 'work.adfs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fs/adfs: add time stamp and file type helpers fs/adfs: super: limit idlen according to directory type fs/adfs: super: fix use-after-free bug fs/adfs: super: safely update options on remount fs/adfs: super: correct superblock flags fs/adfs: clean up indirect disc addresses and fragment IDs fs/adfs: clean up error message printing fs/adfs: use %pV for error messages fs/adfs: use format_version from disc_record fs/adfs: add helper to get filesystem size fs/adfs: add helper to get discrecord from map fs/adfs: correct disc record structure commit 933a90bf4f3505f8ec83bda21a3c7d70d7c2b426 Merge: 5f4fc6d440d7 037f11b4752f Author: Linus Torvalds Date: Fri Jul 19 10:42:02 2019 -0700 Merge branch 'work.mount0' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs mount updates from Al Viro: "The first part of mount updates. Convert filesystems to use the new mount API" * 'work.mount0' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (63 commits) mnt_init(): call shmem_init() unconditionally constify ksys_mount() string arguments don't bother with registering rootfs init_rootfs(): don't bother with init_ramfs_fs() vfs: Convert smackfs to use the new mount API vfs: Convert selinuxfs to use the new mount API vfs: Convert securityfs to use the new mount API vfs: Convert apparmorfs to use the new mount API vfs: Convert openpromfs to use the new mount API vfs: Convert xenfs to use the new mount API vfs: Convert gadgetfs to use the new mount API vfs: Convert oprofilefs to use the new mount API vfs: Convert ibmasmfs to use the new mount API vfs: Convert qib_fs/ipathfs to use the new mount API vfs: Convert efivarfs to use the new mount API vfs: Convert configfs to use the new mount API vfs: Convert binfmt_misc to use the new mount API convenience helper: get_tree_single() convenience helper get_tree_nodev() vfs: Kill sget_userns() ... commit 5f4fc6d440d77a2cf74fe4ea56955674ac7e35e7 Merge: 249be8511b26 8d650cdedaab Author: Linus Torvalds Date: Fri Jul 19 10:06:06 2019 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Fix AF_XDP cq entry leak, from Ilya Maximets. 2) Fix handling of PHY power-down on RTL8411B, from Heiner Kallweit. 3) Add some new PCI IDs to iwlwifi, from Ihab Zhaika. 4) Fix handling of neigh timers wrt. entries added by userspace, from Lorenzo Bianconi. 5) Various cases of missing of_node_put(), from Nishka Dasgupta. 6) The new NET_ACT_CT needs to depend upon NF_NAT, from Yue Haibing. 7) Various RDS layer fixes, from Gerd Rausch. 8) Fix some more fallout from TCQ_F_CAN_BYPASS generalization, from Cong Wang. 9) Fix FIB source validation checks over loopback, also from Cong Wang. 10) Use promisc for unsupported number of filters, from Justin Chen. 11) Missing sibling route unlink on failure in ipv6, from Ido Schimmel. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (90 commits) tcp: fix tcp_set_congestion_control() use from bpf hook ag71xx: fix return value check in ag71xx_probe() ag71xx: fix error return code in ag71xx_probe() usb: qmi_wwan: add D-Link DWM-222 A2 device ID bnxt_en: Fix VNIC accounting when enabling aRFS on 57500 chips. net: dsa: sja1105: Fix missing unlock on error in sk_buff() gve: replace kfree with kvfree selftests/bpf: fix test_xdp_noinline on s390 selftests/bpf: fix "valid read map access into a read-only array 1" on s390 net/mlx5: Replace kfree with kvfree MAINTAINERS: update netsec driver ipv6: Unlink sibling route in case of failure liquidio: Replace vmalloc + memset with vzalloc udp: Fix typo in net/ipv4/udp.c net: bcmgenet: use promisc for unsupported filters ipv6: rt6_check should return NULL if 'from' is NULL tipc: initialize 'validated' field of received packets selftests: add a test case for rp_filter fib: relax source validation check for loopback packets mlxsw: spectrum: Do not process learned records with a dummy FID ... commit 249be8511b269495bc95cb8bdfdd5840b2ba73c0 Merge: 3bfe1fc46794 eec4844fae7c Author: Linus Torvalds Date: Fri Jul 19 09:45:58 2019 -0700 Merge branch 'akpm' (patches from Andrew) Merge yet more updates from Andrew Morton: "The rest of MM and a kernel-wide procfs cleanup. Summary of the more significant patches: - Patch series "mm/memory_hotplug: Factor out memory block devicehandling", v3. David Hildenbrand. Some spring-cleaning of the memory hotplug code, notably in drivers/base/memory.c - "mm: thp: fix false negative of shmem vma's THP eligibility". Yang Shi. Fix /proc/pid/smaps output for THP pages used in shmem. - "resource: fix locking in find_next_iomem_res()" + 1. Nadav Amit. Bugfix and speedup for kernel/resource.c - Patch series "mm: Further memory block device cleanups", David Hildenbrand. More spring-cleaning of the memory hotplug code. - Patch series "mm: Sub-section memory hotplug support". Dan Williams. Generalise the memory hotplug code so that pmem can use it more completely. Then remove the hacks from the libnvdimm code which were there to work around the memory-hotplug code's constraints. - "proc/sysctl: add shared variables for range check", Matteo Croce. We have about 250 instances of int zero; ... .extra1 = &zero, in the tree. This is a tree-wide sweep to make all those private "zero"s and "one"s use global variables. Alas, it isn't practical to make those two global integers const" * emailed patches from Andrew Morton : (38 commits) proc/sysctl: add shared variables for range check mm: migrate: remove unused mode argument mm/sparsemem: cleanup 'section number' data types libnvdimm/pfn: stop padding pmem namespaces to section alignment libnvdimm/pfn: fix fsdax-mode namespace info-block zero-fields mm/devm_memremap_pages: enable sub-section remap mm: document ZONE_DEVICE memory-model implications mm/sparsemem: support sub-section hotplug mm/sparsemem: prepare for sub-section ranges mm: kill is_dev_zone() helper mm/hotplug: kill is_dev_zone() usage in __remove_pages() mm/sparsemem: convert kmalloc_section_memmap() to populate_section_memmap() mm/hotplug: prepare shrink_{zone, pgdat}_span for sub-section removal mm/sparsemem: add helpers track active portions of a section at boot mm/sparsemem: introduce a SECTION_IS_EARLY flag mm/sparsemem: introduce struct mem_section_usage drivers/base/memory.c: get rid of find_memory_block_hinted() mm/memory_hotplug: move and simplify walk_memory_blocks() mm/memory_hotplug: rename walk_memory_range() and pass start+size instead of pfns mm: make register_mem_sect_under_node() static ... commit 6d54ceb539aacc3df65c89500e8b045924f3ef81 Author: Eiichi Tsukata Date: Sun Jun 30 17:54:38 2019 +0900 tracing: Fix user stack trace "??" output Commit c5c27a0a5838 ("x86/stacktrace: Remove the pointless ULONG_MAX marker") removes ULONG_MAX marker from user stack trace entries but trace_user_stack_print() still uses the marker and it outputs unnecessary "??". For example: less-1911 [001] d..2 34.758944: => <00007f16f2295910> => ?? => ?? => ?? => ?? => ?? => ?? => ?? The user stack trace code zeroes the storage before saving the stack, so if the trace is shorter than the maximum number of entries it can terminate the print loop if a zero entry is detected. Link: http://lkml.kernel.org/r/20190630085438.25545-1-devel@etsukata.com Cc: stable@vger.kernel.org Fixes: 4285f2fcef80 ("tracing: Remove the ULONG_MAX stack trace hackery") Signed-off-by: Eiichi Tsukata Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_output.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit dfee0e99bcff718fa14d973c41f161220fdcb7d5 Author: Arnd Bergmann Date: Wed Jul 10 10:08:20 2019 +0200 netfilter: bridge: make NF_TABLES_BRIDGE tristate The new nft_meta_bridge code fails to link as built-in when NF_TABLES is a loadable module. net/bridge/netfilter/nft_meta_bridge.o: In function `nft_meta_bridge_get_eval': nft_meta_bridge.c:(.text+0x1e8): undefined reference to `nft_meta_get_eval' net/bridge/netfilter/nft_meta_bridge.o: In function `nft_meta_bridge_get_init': nft_meta_bridge.c:(.text+0x468): undefined reference to `nft_meta_get_init' nft_meta_bridge.c:(.text+0x49c): undefined reference to `nft_parse_register' nft_meta_bridge.c:(.text+0x4cc): undefined reference to `nft_validate_register_store' net/bridge/netfilter/nft_meta_bridge.o: In function `nft_meta_bridge_module_exit': nft_meta_bridge.c:(.exit.text+0x14): undefined reference to `nft_unregister_expr' net/bridge/netfilter/nft_meta_bridge.o: In function `nft_meta_bridge_module_init': nft_meta_bridge.c:(.init.text+0x14): undefined reference to `nft_register_expr' net/bridge/netfilter/nft_meta_bridge.o:(.rodata+0x60): undefined reference to `nft_meta_get_dump' net/bridge/netfilter/nft_meta_bridge.o:(.rodata+0x88): undefined reference to `nft_meta_set_eval' This can happen because the NF_TABLES_BRIDGE dependency itself is just a 'bool'. Make the symbol a 'tristate' instead so Kconfig can propagate the dependencies correctly. Fixes: 30e103fe24de ("netfilter: nft_meta: move bridge meta keys into nft_meta_bridge") Signed-off-by: Arnd Bergmann Signed-off-by: Pablo Neira Ayuso net/bridge/netfilter/Kconfig | 2 +- net/netfilter/nft_chain_filter.c | 2 +- net/netfilter/nft_meta.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 0e279dcea0ec897af1c979ebee4ec92b461793f5 Author: Takashi Iwai Date: Fri Jul 19 10:55:05 2019 +0200 ALSA: pcm: Fix refcount_inc() on zero usage The recent rewrite of PCM link lock management introduced the refcount in snd_pcm_group object, managed by the kernel refcount_t API. This caused unexpected kernel warnings when the kernel is built with CONFIG_REFCOUNT_FULL=y. As the warning line indicates, the problem is obviously that we start with refcount=0 and do refcount_inc() for adding each PCM link, while refcount_t API doesn't like refcount_inc() performed on zero. For adapting the proper refcount_t usage, this patch changes the logic slightly: - The initial refcount is 1, assuming the single list entry - The refcount is incremented / decremented at each PCM link addition and deletion - ... which allows us concentrating only on the refcount as a release condition Fixes: f57f3df03a8e ("ALSA: pcm: More fine-grained PCM link locking") BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=204221 Reported-and-tested-by: Duncan Overbruck Cc: Signed-off-by: Takashi Iwai sound/core/pcm_native.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 449fa54d6815be8c2c1f68fa9dbbae9384a7c03e Author: Fugang Duan Date: Fri Jul 19 17:26:48 2019 +0800 dma-direct: correct the physical addr in dma_direct_sync_sg_for_cpu/device dma_map_sg() may use swiotlb buffer when the kernel command line includes "swiotlb=force" or the dma_addr is out of dev->dma_mask range. After DMA complete the memory moving from device to memory, then user call dma_sync_sg_for_cpu() to sync with DMA buffer, and copy the original virtual buffer to other space. So dma_direct_sync_sg_for_cpu() should use swiotlb physical addr, not the original physical addr from sg_phys(sg). dma_direct_sync_sg_for_device() also has the same issue, correct it as well. Fixes: 55897af63091("dma-direct: merge swiotlb_dma_ops into the dma_direct code") Signed-off-by: Fugang Duan Reviewed-by: Robin Murphy Signed-off-by: Christoph Hellwig kernel/dma/direct.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit d6f0f2f19a9e41bd0bcd5757f68500ed29352509 Author: Mauro Carvalho Chehab Date: Thu Jul 18 16:13:48 2019 -0300 docs: load_config.py: ensure subdirs end with "/" The logic with seeks for a subdir passed via SPHINXDIRS is incomplete: if one uses something like: make SPHINXDIRS=arm pdfdocs It will find both "arm" and "arm64" directories. Worse than that, it will convert "arm64/index" to "4/index". Signed-off-by: Mauro Carvalho Chehab Documentation/sphinx/load_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b4fc36e60f25cf22bf8b7b015a701015740c3743 Author: Shawn Anastasio Date: Wed Jul 17 18:54:37 2019 -0500 powerpc/dma: Fix invalid DMA mmap behavior The refactor of powerpc DMA functions in commit 6666cc17d780 ("powerpc/dma: remove dma_nommu_mmap_coherent") incorrectly changes the way DMA mappings are handled on powerpc. Since this change, all mapped pages are marked as cache-inhibited through the default implementation of arch_dma_mmap_pgprot. This differs from the previous behavior of only marking pages in noncoherent mappings as cache-inhibited and has resulted in sporadic system crashes in certain hardware configurations and workloads (see Bugzilla). This commit restores the previous correct behavior by providing an implementation of arch_dma_mmap_pgprot that only marks pages in noncoherent mappings as cache-inhibited. As this behavior should be universal for all powerpc platforms a new file, dma-generic.c, was created to store it. Fixes: 6666cc17d780 ("powerpc/dma: remove dma_nommu_mmap_coherent") # NOTE: fixes commit 6666cc17d780 released in v5.1. # Consider a stable tag: # Cc: stable@vger.kernel.org # v5.1+ # NOTE: fixes commit 6666cc17d780 released in v5.1. # Consider a stable tag: # Cc: stable@vger.kernel.org # v5.1+ Cc: stable@vger.kernel.org # v5.1+ Signed-off-by: Shawn Anastasio Reviewed-by: Alexey Kardashevskiy Reviewed-by: Christoph Hellwig Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190717235437.12908-1-shawn@anastas.io arch/powerpc/Kconfig | 1 + arch/powerpc/kernel/Makefile | 3 ++- arch/powerpc/kernel/dma-common.c | 17 +++++++++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) commit 771a081e44a9baa1991ef011cc453ef425591740 Author: Hui Wang Date: Fri Jul 19 12:38:58 2019 +0300 Input: alps - fix a mismatch between a condition check and its comment In the function alps_is_cs19_trackpoint(), we check if the param[1] is in the 0x20~0x2f range, but the code we wrote for this checking is not correct: (param[1] & 0x20) does not mean param[1] is in the range of 0x20~0x2f, it also means the param[1] is in the range of 0x30~0x3f, 0x60~0x6f... Now fix it with a new condition checking ((param[1] & 0xf0) == 0x20). Fixes: 7e4935ccc323 ("Input: alps - don't handle ALPS cs19 trackpoint-only device") Cc: stable@vger.kernel.org Signed-off-by: Hui Wang Signed-off-by: Dmitry Torokhov drivers/input/mouse/alps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 49e6979e7e92cf496105b5636f1df0ac17c159c0 Author: YueHaibing Date: Tue Jul 16 20:17:20 2019 +0200 Input: psmouse - fix build error of multiple definition trackpoint_detect() should be static inline while CONFIG_MOUSE_PS2_TRACKPOINT is not set, otherwise, we build fails: drivers/input/mouse/alps.o: In function `trackpoint_detect': alps.c:(.text+0x8e00): multiple definition of `trackpoint_detect' drivers/input/mouse/psmouse-base.o:psmouse-base.c:(.text+0x1b50): first defined here Reported-by: Hulk Robot Fixes: 55e3d9224b60 ("Input: psmouse - allow disabing certain protocol extensions") Signed-off-by: YueHaibing Signed-off-by: Dmitry Torokhov drivers/input/mouse/trackpoint.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d56fef0ec85b8a8bae5d7d003b93f0a0aaf82ed9 Author: Mao Wenan Date: Tue Jul 16 20:16:28 2019 +0200 Input: applespi - remove set but not used variables 'sts' Fixes gcc '-Wunused-but-set-variable' warning: drivers/input/keyboard/applespi.c: In function applespi_set_bl_level: drivers/input/keyboard/applespi.c:902:6: warning: variable sts set but not used [-Wunused-but-set-variable] Fixes: b426ac0452093d ("Input: add Apple SPI keyboard and trackpad driver") Signed-off-by: Mao Wenan Signed-off-by: Dmitry Torokhov drivers/input/keyboard/applespi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 038b1a05eae6666b731920e46f47d8e2332e07ff Author: Ronald Tschalär Date: Mon Jul 15 10:30:11 2019 -0700 Input: add Apple SPI keyboard and trackpad driver The keyboard and trackpad on recent MacBook's (since 8,1) and MacBookPro's (13,* and 14,*) are attached to an SPI controller instead of USB, as previously. The higher level protocol is not publicly documented and hence has been reverse engineered. As a consequence there are still a number of unknown fields and commands. However, the known parts have been working well and received extensive testing and use. In order for this driver to work, the proper SPI drivers need to be loaded too; for MB8,1 these are spi_pxa2xx_platform and spi_pxa2xx_pci; for all others they are spi_pxa2xx_platform and intel_lpss_pci. Link: https://bugzilla.kernel.org/show_bug.cgi?id=99891 Link: https://bugzilla.kernel.org/show_bug.cgi?id=108331 Signed-off-by: Ronald Tschalär Reviewed-by: Andy Shevchenko Signed-off-by: Dmitry Torokhov drivers/input/keyboard/Kconfig | 16 + drivers/input/keyboard/Makefile | 1 + drivers/input/keyboard/applespi.c | 1978 +++++++++++++++++++++++++++++++ drivers/input/keyboard/applespi.h | 29 + drivers/input/keyboard/applespi_trace.h | 93 ++ 5 files changed, 2117 insertions(+) commit e320ab3cec7dd8b1606964d81ae1e14391ff8e96 Author: Dexuan Cui Date: Fri Jul 19 03:22:35 2019 +0000 x86/hyper-v: Zero out the VP ASSIST PAGE on allocation The VP ASSIST PAGE is an "overlay" page (see Hyper-V TLFS's Section 5.2.1 "GPA Overlay Pages" for the details) and here is an excerpt: "The hypervisor defines several special pages that "overlay" the guest's Guest Physical Addresses (GPA) space. Overlays are addressed GPA but are not included in the normal GPA map maintained internally by the hypervisor. Conceptually, they exist in a separate map that overlays the GPA map. If a page within the GPA space is overlaid, any SPA page mapped to the GPA page is effectively "obscured" and generally unreachable by the virtual processor through processor memory accesses. If an overlay page is disabled, the underlying GPA page is "uncovered", and an existing mapping becomes accessible to the guest." SPA = System Physical Address = the final real physical address. When a CPU (e.g. CPU1) is onlined, hv_cpu_init() allocates the VP ASSIST PAGE and enables the EOI optimization for this CPU by writing the MSR HV_X64_MSR_VP_ASSIST_PAGE. From now on, hvp->apic_assist belongs to the special SPA page, and this CPU *always* uses hvp->apic_assist (which is shared with the hypervisor) to decide if it needs to write the EOI MSR. When a CPU is offlined then on the outgoing CPU: 1. hv_cpu_die() disables the EOI optimizaton for this CPU, and from now on hvp->apic_assist belongs to the original "normal" SPA page; 2. the remaining work of stopping this CPU is done 3. this CPU is completely stopped. Between 1 and 3, this CPU can still receive interrupts (e.g. reschedule IPIs from CPU0, and Local APIC timer interrupts), and this CPU *must* write the EOI MSR for every interrupt received, otherwise the hypervisor may not deliver further interrupts, which may be needed to completely stop the CPU. So, after the EOI optimization is disabled in hv_cpu_die(), it's required that the hvp->apic_assist's bit0 is zero, which is not guaranteed by the current allocation mode because it lacks __GFP_ZERO. As a consequence the bit might be set and interrupt handling would not write the EOI MSR causing interrupt delivery to become stuck. Add the missing __GFP_ZERO to the allocation. Note 1: after the "normal" SPA page is allocted and zeroed out, neither the hypervisor nor the guest writes into the page, so the page remains with zeros. Note 2: see Section 10.3.5 "EOI Assist" for the details of the EOI optimization. When the optimization is enabled, the guest can still write the EOI MSR register irrespective of the "No EOI required" value, but that's slower than the optimized assist based variant. Fixes: ba696429d290 ("x86/hyper-v: Implement EOI assist") Signed-off-by: Dexuan Cui Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/ Date: Fri Jul 19 17:28:10 2019 +1000 Merge branch 'linux-5.3' of git://github.com/skeggsb/linux into drm-next nouveau fixes and TU116 enablement. Signed-off-by: Dave Airlie From: Ben Skeggs Link: https://patchwork.freedesktop.org/patch/msgid/CACAvsv5hZ3B4S9cVTPd2-Ug7dMSasLPJrWMyoDo4MOg8cbXWkA@mail.gmail.com commit 9fb7dc73b923ef5e9251ee7c58239a790720904c Merge: b3c8a40cfc4a 41a5a2a8531f Author: Dave Airlie Date: Fri Jul 19 17:21:48 2019 +1000 Merge tag 'drm-next-5.3-2019-07-18' of git://people.freedesktop.org/~agd5f/linux into drm-next drm-next-5.3-2019-07-18: amdgpu: - Navi DC fix for secondary adapters - Fix Navi flickering with high res panels - Navi SMU fixes - Vega20 SMU fixes - Fixes for audio hotplug on HG systems - Fix for potential integer overflows on large buffer migrations - debugfs fixes for umr - Various other small fixes amdkfd: - Apply noretry setting consistently - Fix hang in eviction - Properly clean up GWS on uninit UAPI: - clarify a comment on ctx priority Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20190718211525.3374-1-alexander.deucher@amd.com commit 4d352dbd5850bfc752609d46b5c8403ae0bd5163 Author: Ben Skeggs Date: Tue Jul 2 16:29:40 2019 +1000 drm/nouveau/secboot/gp102-: remove WAR for SEC2 RTOS start bug Appears to be fixed by "flcn/gp102-: improve implementation of bind_context() on SEC2/GSP". Tested on GP10[24678] and GV100. Signed-off-by: Ben Skeggs .../nvkm/subdev/secboot/ls_ucode_msgqueue.c | 29 ---------------------- 1 file changed, 29 deletions(-) commit 5210e967d3c9d32b5394c1f86edebb03e3202954 Author: Ben Skeggs Date: Tue Jul 2 07:52:15 2019 +1000 drm/nouveau/flcn/gp102-: improve implementation of bind_context() on SEC2/GSP Fixes various issues encountered while attempting to initialise ACR. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/falcon/v1.c | 36 ++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit 09b90e2fe35faeace2488234e2a7728f2ea8ba26 Author: Yongxin Liu Date: Mon Jul 1 09:46:22 2019 +0800 drm/nouveau: fix memory leak in nouveau_conn_reset() In nouveau_conn_reset(), if connector->state is true, __drm_atomic_helper_connector_destroy_state() will be called, but the memory pointed by asyc isn't freed. Memory leak happens in the following function __drm_atomic_helper_connector_reset(), where newly allocated asyc->state will be assigned to connector->state. So using nouveau_conn_atomic_destroy_state() instead of __drm_atomic_helper_connector_destroy_state to free the "old" asyc. Here the is the log showing memory leak. unreferenced object 0xffff8c5480483c80 (size 192): comm "kworker/0:2", pid 188, jiffies 4294695279 (age 53.179s) hex dump (first 32 bytes): 00 f0 ba 7b 54 8c ff ff 00 00 00 00 00 00 00 00 ...{T........... 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<000000005005c0d0>] kmem_cache_alloc_trace+0x195/0x2c0 [<00000000a122baed>] nouveau_conn_reset+0x25/0xc0 [nouveau] [<000000004fd189a2>] nouveau_connector_create+0x3a7/0x610 [nouveau] [<00000000c73343a8>] nv50_display_create+0x343/0x980 [nouveau] [<000000002e2b03c3>] nouveau_display_create+0x51f/0x660 [nouveau] [<00000000c924699b>] nouveau_drm_device_init+0x182/0x7f0 [nouveau] [<00000000cc029436>] nouveau_drm_probe+0x20c/0x2c0 [nouveau] [<000000007e961c3e>] local_pci_probe+0x47/0xa0 [<00000000da14d569>] work_for_cpu_fn+0x1a/0x30 [<0000000028da4805>] process_one_work+0x27c/0x660 [<000000001d415b04>] worker_thread+0x22b/0x3f0 [<0000000003b69f1f>] kthread+0x12f/0x150 [<00000000c94c29b7>] ret_from_fork+0x3a/0x50 Signed-off-by: Yongxin Liu Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_connector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d304654bd79332ace9ac46b9a3d8de60acb15da3 Author: Ralph Campbell Date: Fri Jun 14 13:20:03 2019 -0700 drm/nouveau/dmem: missing mutex_lock in error path In nouveau_dmem_pages_alloc(), the drm->dmem->mutex is unlocked before calling nouveau_dmem_chunk_alloc() as shown when CONFIG_PROVE_LOCKING is enabled: [ 1294.871933] ===================================== [ 1294.876656] WARNING: bad unlock balance detected! [ 1294.881375] 5.2.0-rc3+ #5 Not tainted [ 1294.885048] ------------------------------------- [ 1294.889773] test-malloc-vra/6299 is trying to release lock (&drm->dmem->mutex) at: [ 1294.897482] [] nouveau_dmem_migrate_alloc_and_copy+0x79f/0xbf0 [nouveau] [ 1294.905782] but there are no more locks to release! [ 1294.910690] [ 1294.910690] other info that might help us debug this: [ 1294.917249] 1 lock held by test-malloc-vra/6299: [ 1294.921881] #0: 0000000016e10454 (&mm->mmap_sem#2){++++}, at: nouveau_svmm_bind+0x142/0x210 [nouveau] [ 1294.931313] [ 1294.931313] stack backtrace: [ 1294.935702] CPU: 4 PID: 6299 Comm: test-malloc-vra Not tainted 5.2.0-rc3+ #5 [ 1294.942786] Hardware name: ASUS X299-A/PRIME X299-A, BIOS 1401 05/21/2018 [ 1294.949590] Call Trace: [ 1294.952059] dump_stack+0x7c/0xc0 [ 1294.955469] ? nouveau_dmem_migrate_alloc_and_copy+0x79f/0xbf0 [nouveau] [ 1294.962213] print_unlock_imbalance_bug.cold.52+0xca/0xcf [ 1294.967641] lock_release+0x306/0x380 [ 1294.971383] ? nouveau_dmem_migrate_alloc_and_copy+0x79f/0xbf0 [nouveau] [ 1294.978089] ? lock_downgrade+0x2d0/0x2d0 [ 1294.982121] ? find_held_lock+0xac/0xd0 [ 1294.985979] __mutex_unlock_slowpath+0x8f/0x3f0 [ 1294.990540] ? wait_for_completion+0x230/0x230 [ 1294.995002] ? rwlock_bug.part.2+0x60/0x60 [ 1294.999197] nouveau_dmem_migrate_alloc_and_copy+0x79f/0xbf0 [nouveau] [ 1295.005751] ? page_mapping+0x98/0x110 [ 1295.009511] migrate_vma+0xa74/0x1090 [ 1295.013186] ? move_to_new_page+0x480/0x480 [ 1295.017400] ? __kmalloc+0x153/0x300 [ 1295.021052] ? nouveau_dmem_migrate_vma+0xd8/0x1e0 [nouveau] [ 1295.026796] nouveau_dmem_migrate_vma+0x157/0x1e0 [nouveau] [ 1295.032466] ? nouveau_dmem_init+0x490/0x490 [nouveau] [ 1295.037612] ? vmacache_find+0xc2/0x110 [ 1295.041537] nouveau_svmm_bind+0x1b4/0x210 [nouveau] [ 1295.046583] ? nouveau_svm_fault+0x13e0/0x13e0 [nouveau] [ 1295.051912] drm_ioctl_kernel+0x14d/0x1a0 [ 1295.055930] ? drm_setversion+0x330/0x330 [ 1295.059971] drm_ioctl+0x308/0x530 [ 1295.063384] ? drm_version+0x150/0x150 [ 1295.067153] ? find_held_lock+0xac/0xd0 [ 1295.070996] ? __pm_runtime_resume+0x3f/0xa0 [ 1295.075285] ? mark_held_locks+0x29/0xa0 [ 1295.079230] ? _raw_spin_unlock_irqrestore+0x3c/0x50 [ 1295.084232] ? lockdep_hardirqs_on+0x17d/0x250 [ 1295.088768] nouveau_drm_ioctl+0x9a/0x100 [nouveau] [ 1295.093661] do_vfs_ioctl+0x137/0x9a0 [ 1295.097341] ? ioctl_preallocate+0x140/0x140 [ 1295.101623] ? match_held_lock+0x1b/0x230 [ 1295.105646] ? match_held_lock+0x1b/0x230 [ 1295.109660] ? find_held_lock+0xac/0xd0 [ 1295.113512] ? __do_page_fault+0x324/0x630 [ 1295.117617] ? lock_downgrade+0x2d0/0x2d0 [ 1295.121648] ? mark_held_locks+0x79/0xa0 [ 1295.125583] ? handle_mm_fault+0x352/0x430 [ 1295.129687] ksys_ioctl+0x60/0x90 [ 1295.133020] ? mark_held_locks+0x29/0xa0 [ 1295.136964] __x64_sys_ioctl+0x3d/0x50 [ 1295.140726] do_syscall_64+0x68/0x250 [ 1295.144400] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 1295.149465] RIP: 0033:0x7f1a3495809b [ 1295.153053] Code: 0f 1e fa 48 8b 05 ed bd 0c 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d bd bd 0c 00 f7 d8 64 89 01 48 [ 1295.171850] RSP: 002b:00007ffef7ed1358 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 1295.179451] RAX: ffffffffffffffda RBX: 00007ffef7ed1628 RCX: 00007f1a3495809b [ 1295.186601] RDX: 00007ffef7ed13b0 RSI: 0000000040406449 RDI: 0000000000000004 [ 1295.193759] RBP: 00007ffef7ed13b0 R08: 0000000000000000 R09: 000000000157e770 [ 1295.200917] R10: 000000000151c010 R11: 0000000000000246 R12: 0000000040406449 [ 1295.208083] R13: 0000000000000004 R14: 0000000000000000 R15: 0000000000000000 Reacquire the lock before continuing to the next page. Signed-off-by: Ralph Campbell Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_dmem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 68bf8b577977a2804af82ffe03ce25d952f82fd2 Author: Karol Herbst Date: Tue Jun 18 13:01:33 2019 +0200 drm/nouveau/hwmon: return EINVAL if the GPU is powered down for sensors reads fixes bogus values userspace gets from hwmon while the GPU is powered down Signed-off-by: Karol Herbst Reviewed-by: Rhys Kidd Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_hwmon.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit b0f84a84fff180718995b1269da2988e5b28be42 Author: Ben Skeggs Date: Fri Jul 5 15:11:42 2019 +1000 drm/nouveau: fix bogus GPL-2 license header The bulk SPDX addition made all these files into GPL-2.0 licensed files. However the remainder of the project is MIT-licensed, these files were simply missing the boiler plate and got caught up in the global update. Fixes: 96ac6d4351004 (treewide: Add SPDX license identifier - Kbuild) Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/Kbuild | 2 +- drivers/gpu/drm/nouveau/dispnv04/Kbuild | 2 +- drivers/gpu/drm/nouveau/dispnv50/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvif/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/core/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/bsp/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/ce/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/cipher/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/device/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/dma/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/mpeg/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/msenc/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/mspdec/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/msppp/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/msvld/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/nvdec/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/nvenc/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/pm/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/sec/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/sec2/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/sw/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/vic/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/vp/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/falcon/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/bar/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/bios/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/bus/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/clk/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/devinit/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/fault/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/fb/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/fuse/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/gpio/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/gsp/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/i2c/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/ibus/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/instmem/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/ltc/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/mc/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/mxm/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/pci/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/pmu/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/secboot/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/therm/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/timer/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/top/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/volt/Kbuild | 2 +- 55 files changed, 55 insertions(+), 55 deletions(-) commit b7019ac550eb3916f34d79db583e9b7ea2524afa Author: Ilia Mirkin Date: Wed Jun 19 20:13:43 2019 -0400 drm/nouveau: fix bogus GPL-2 license header The bulk SPDX addition made all these files into GPL-2.0 licensed files. However the remainder of the project is MIT-licensed, these files (primarily header files) were simply missing the boiler plate and got caught up in the global update. Fixes: b24413180f5 (License cleanup: add SPDX GPL-2.0 license identifier to files with no license) Signed-off-by: Ilia Mirkin Acked-by: Emil Velikov Acked-by: Karol Herbst Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/dispnv04/cursor.c | 2 +- drivers/gpu/drm/nouveau/dispnv04/disp.h | 2 +- drivers/gpu/drm/nouveau/include/nvif/cl0002.h | 2 +- drivers/gpu/drm/nouveau/include/nvif/cl0046.h | 2 +- drivers/gpu/drm/nouveau/include/nvif/cl006b.h | 2 +- drivers/gpu/drm/nouveau/include/nvif/cl0080.h | 2 +- drivers/gpu/drm/nouveau/include/nvif/cl506e.h | 2 +- drivers/gpu/drm/nouveau/include/nvif/cl506f.h | 2 +- drivers/gpu/drm/nouveau/include/nvif/cl5070.h | 2 +- drivers/gpu/drm/nouveau/include/nvif/cl507a.h | 2 +- drivers/gpu/drm/nouveau/include/nvif/cl507b.h | 2 +- drivers/gpu/drm/nouveau/include/nvif/cl507c.h | 2 +- drivers/gpu/drm/nouveau/include/nvif/cl507d.h | 2 +- drivers/gpu/drm/nouveau/include/nvif/cl507e.h | 2 +- drivers/gpu/drm/nouveau/include/nvif/cl826e.h | 2 +- drivers/gpu/drm/nouveau/include/nvif/cl826f.h | 2 +- drivers/gpu/drm/nouveau/include/nvif/cl906f.h | 2 +- drivers/gpu/drm/nouveau/include/nvif/cl9097.h | 2 +- drivers/gpu/drm/nouveau/include/nvif/cla06f.h | 2 +- drivers/gpu/drm/nouveau/include/nvif/class.h | 2 +- drivers/gpu/drm/nouveau/include/nvif/clc36f.h | 2 +- drivers/gpu/drm/nouveau/include/nvif/clc37b.h | 2 +- drivers/gpu/drm/nouveau/include/nvif/clc37e.h | 2 +- drivers/gpu/drm/nouveau/include/nvif/client.h | 2 +- drivers/gpu/drm/nouveau/include/nvif/device.h | 2 +- drivers/gpu/drm/nouveau/include/nvif/driver.h | 2 +- drivers/gpu/drm/nouveau/include/nvif/event.h | 2 +- drivers/gpu/drm/nouveau/include/nvif/if0000.h | 2 +- drivers/gpu/drm/nouveau/include/nvif/if0001.h | 2 +- drivers/gpu/drm/nouveau/include/nvif/if0002.h | 2 +- drivers/gpu/drm/nouveau/include/nvif/if0003.h | 2 +- drivers/gpu/drm/nouveau/include/nvif/if0004.h | 2 +- drivers/gpu/drm/nouveau/include/nvif/if0005.h | 2 +- drivers/gpu/drm/nouveau/include/nvif/ioctl.h | 2 +- drivers/gpu/drm/nouveau/include/nvif/notify.h | 2 +- drivers/gpu/drm/nouveau/include/nvif/object.h | 2 +- drivers/gpu/drm/nouveau/include/nvif/os.h | 2 +- drivers/gpu/drm/nouveau/include/nvif/unpack.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/core/client.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/core/debug.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/core/device.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/core/engine.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/core/enum.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/core/event.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/core/firmware.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/core/gpuobj.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/core/ioctl.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/core/memory.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/core/mm.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/core/notify.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/core/object.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/core/oproxy.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/core/option.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/core/os.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/core/pci.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/core/ramht.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/core/tegra.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/engine/bsp.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/engine/ce.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/engine/cipher.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/engine/disp.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/engine/dma.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/engine/falcon.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/engine/fifo.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/engine/gr.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/engine/mpeg.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/engine/msenc.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/engine/mspdec.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/engine/msppp.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/engine/msvld.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/engine/nvdec.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/engine/nvenc.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/engine/pm.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/engine/sec.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/engine/sec2.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/engine/sw.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/engine/vic.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/engine/vp.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/engine/xtensa.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/bar.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/bios.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/M0203.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/M0205.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/M0209.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/P0260.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/bit.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/bmp.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/boost.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/conn.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/cstep.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/dcb.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/disp.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/dp.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/extdev.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/fan.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/gpio.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/i2c.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/iccsense.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/image.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/init.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/mxm.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/npde.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/pcir.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/perf.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/pll.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/pmu.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/power_budget.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/ramcfg.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/rammap.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/therm.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/timing.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/vmap.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/volt.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/vpstate.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/xpio.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/bus.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/clk.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/devinit.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/fuse.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/gpio.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/i2c.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/ibus.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/iccsense.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/instmem.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/ltc.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/mc.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/mmu.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/mxm.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/pci.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/pmu.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/therm.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/timer.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/top.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/vga.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/volt.h | 2 +- drivers/gpu/drm/nouveau/nouveau_abi16.h | 2 +- drivers/gpu/drm/nouveau/nouveau_acpi.c | 2 +- drivers/gpu/drm/nouveau/nouveau_acpi.h | 2 +- drivers/gpu/drm/nouveau/nouveau_bo.h | 2 +- drivers/gpu/drm/nouveau/nouveau_chan.h | 2 +- drivers/gpu/drm/nouveau/nouveau_debugfs.h | 2 +- drivers/gpu/drm/nouveau/nouveau_display.h | 2 +- drivers/gpu/drm/nouveau/nouveau_drv.h | 2 +- drivers/gpu/drm/nouveau/nouveau_fence.h | 2 +- drivers/gpu/drm/nouveau/nouveau_gem.h | 2 +- drivers/gpu/drm/nouveau/nouveau_ioctl.h | 2 +- drivers/gpu/drm/nouveau/nouveau_reg.h | 2 +- drivers/gpu/drm/nouveau/nouveau_sgdma.c | 2 +- drivers/gpu/drm/nouveau/nouveau_ttm.h | 2 +- drivers/gpu/drm/nouveau/nouveau_usif.h | 2 +- drivers/gpu/drm/nouveau/nouveau_vga.c | 2 +- drivers/gpu/drm/nouveau/nouveau_vga.h | 2 +- drivers/gpu/drm/nouveau/nv10_fence.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/ce/fuc/gf100.fuc3.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/ce/fuc/gt215.fuc3.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/ce/priv.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/device/acpi.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/device/ctrl.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/device/priv.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/conn.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/hdmi.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/hdmi.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/head.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/priv.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv50.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/dma/priv.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/dma/user.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/changf100.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/changk104.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv04.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv04.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv50.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/regsnv04.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnv40.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgf100.fuc3.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgf117.fuc3.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgk104.fuc3.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgk110.fuc3.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgk208.fuc5.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgm107.fuc5.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubgf100.fuc3.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubgf117.fuc3.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubgk104.fuc3.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubgk110.fuc3.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubgk208.fuc5.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubgm107.fuc5.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/os.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/nv50.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/priv.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/regs.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv31.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/mpeg/priv.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/mspdec/priv.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/msppp/priv.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/msvld/priv.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/nvdec/priv.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/pm/gf100.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/pm/nv40.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/pm/priv.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/sec/fuc/g98.fuc0s.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/sec2/priv.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/sw/chan.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/sw/nv50.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/sw/nvsw.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/sw/priv.h | 2 +- drivers/gpu/drm/nouveau/nvkm/falcon/priv.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/bar/gf100.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/bar/priv.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/bios/priv.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/bus/hwsq.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/bus/priv.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/clk/gt215.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/clk/nv50.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/clk/pll.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/clk/priv.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/clk/seq.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv04.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv50.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/devinit/priv.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/fb/gf100.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv50.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/fb/priv.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramfuc.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv40.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramseq.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/fb/regsnv04.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/fuse/priv.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/gpio/priv.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/i2c/bus.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/i2c/pad.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/i2c/priv.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/ibus/priv.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/priv.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/instmem/priv.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/ltc/priv.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/mc/priv.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/priv.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/mxm/mxms.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/mxm/priv.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/pci/agp.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/pci/priv.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/pmu/fuc/gf100.fuc3.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/pmu/fuc/gf119.fuc4.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/pmu/fuc/gk208.fuc5.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/pmu/fuc/gt215.fuc3.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/pmu/fuc/os.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/pmu/memx.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/pmu/priv.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/timer/priv.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/timer/regsnv04.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/top/priv.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/volt/priv.h | 2 +- 277 files changed, 277 insertions(+), 277 deletions(-) commit 7cb95eeea6706c790571042a06782e378b2561ea Author: Lyude Paul Date: Wed Jun 26 14:10:27 2019 -0400 drm/nouveau/i2c: Enable i2c pads & busses during preinit It turns out that while disabling i2c bus access from software when the GPU is suspended was a step in the right direction with: commit 342406e4fbba ("drm/nouveau/i2c: Disable i2c bus access after ->fini()") We also ended up accidentally breaking the vbios init scripts on some older Tesla GPUs, as apparently said scripts can actually use the i2c bus. Since these scripts are executed before initializing any subdevices, we end up failing to acquire access to the i2c bus which has left a number of cards with their fan controllers uninitialized. Luckily this doesn't break hardware - it just means the fan gets stuck at 100%. This also means that we've always been using our i2c busses before initializing them during the init scripts for older GPUs, we just didn't notice it until we started preventing them from being used until init. It's pretty impressive this never caused us any issues before! So, fix this by initializing our i2c pad and busses during subdev pre-init. We skip initializing aux busses during pre-init, as those are guaranteed to only ever be used by nouveau for DP aux transactions. Signed-off-by: Lyude Paul Tested-by: Marc Meledandri Fixes: 342406e4fbba ("drm/nouveau/i2c: Disable i2c bus access after ->fini()") Cc: stable@vger.kernel.org Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/i2c/base.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 3485b7b50b53953d6e9e7cb997949f42bc624853 Author: Ben Skeggs Date: Tue Jun 18 18:40:16 2019 +1000 drm/nouveau/disp/tu102-: wire up scdc parameter setter Regs seem valid here still, and tested on TU116. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/disp/sortu102.c | 1 + 1 file changed, 1 insertion(+) commit 75dec321cd2dceb439686b771c67e677c47618c5 Author: Ben Skeggs Date: Mon Jun 17 12:52:48 2019 +1000 drm/nouveau/core: recognise TU116 chipset Modesetting only, still waiting on ACR/GR firmware from NVIDIA for Turing graphics/compute bring-up. Each subsystem was compared with traces, along with various tests to check that things generally work as they should, and appears compatible enough with the current TU117 code to enable support. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 36 +++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit d1084184789d677df4e9c110f38cb3f3d709195d Author: Ben Skeggs Date: Wed May 29 09:58:18 2019 +1000 drm/nouveau/kms: disallow dual-link harder if hdmi connection detected The fallthrough cases (pre-Fermi) would accidentally allow dual-link pixel clocks even where they shouldn't be. This leads to a high resolution HDMI displays, connected via a DVI->HDMI adapter, to fail on the original NV50. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_connector.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 533f4752407543f488a9118d817b8c504352b6fb Author: Ilia Mirkin Date: Sat May 25 18:41:49 2019 -0400 drm/nouveau/disp/nv50-: fix center/aspect-corrected scaling Previously center scaling would get scaling applied to it (when it was only supposed to center the image), and aspect-corrected scaling did not always correctly pick whether to reduce width or height for a particular combination of inputs/outputs. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110660 Signed-off-by: Ilia Mirkin Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/dispnv50/head.c | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) commit f8d6211ac77f0d1f7aebc64e961dc28771ba0052 Author: Ilia Mirkin Date: Sat May 25 18:41:48 2019 -0400 drm/nouveau/disp/nv50-: force scaler for any non-default LVDS/eDP modes Higher layers tend to add a lot of modes not actually in the EDID, such as the standard DMT modes. Changing this would be extremely intrusive to everyone, so just force the scaler more often. There are no practical cases we're aware of where a LVDS/eDP panel has multiple resolutions exposed, and i915 already does it this way. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110660 Signed-off-by: Ilia Mirkin Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/dispnv50/disp.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit bb2b4074f8d99214718f45c379ceb74564aad3bc Author: Timo Wiren Date: Wed May 22 20:01:06 2019 +0300 drm/nouveau/mcp89/mmu: Use mcp77_mmu_new instead of g84_mmu_new on MCP89. Fix a crash or broken depth testing in all OpenGL applications that use the depth buffer on MCP89 (GeForce 320M) seen on a MacBook Pro Late 2010. The bug is tracked in https://bugs.freedesktop.org/show_bug.cgi?id=108500 Signed-off-by: Timo Wiren Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bdfeb0ccea1a12b58299b95eb0f28e2aa26de4c2 Author: Guo Ren Date: Fri Jun 28 20:39:46 2019 +0800 csky: Fixup abiv1 memset error Current memset implementation in abiv1 is wrong and it'll cause unalign access. Just remove it and use the generic one. This patch will cause performance degradation and we will improve it with a new design in next patchset. Signed-off-by: Guo Ren Cc: Arnd Bergmann arch/csky/abiv1/Makefile | 1 - arch/csky/abiv1/inc/abi/string.h | 3 --- arch/csky/abiv1/memset.c | 37 ------------------------------------- arch/csky/abiv1/strksyms.c | 1 - 4 files changed, 42 deletions(-) commit 4e562c11664c0e0e84bb8495894b8637acc1c095 Author: Guo Ren Date: Tue Jun 18 20:34:35 2019 +0800 csky: Improve tlb operation with help of asid There are two generations of tlb operation instruction for C-SKY. First generation is use mcr register and it need software do more things, second generation is use specific instructions, eg: tlbi.va, tlbi.vas, tlbi.alls We implemented the following functions: - flush_tlb_range (a range of entries) - flush_tlb_page (one entry) Above functions use asid from vma->mm to invalid tlb entries and we could use tlbi.vas instruction for newest generation csky cpu. - flush_tlb_kernel_range - flush_tlb_one Above functions don't care asid and it invalid the tlb entries only with vpn and we could use tlbi.vaas instruction for newest generat- ion csky cpu. Signed-off-by: Guo Ren Cc: Arnd Bergmann arch/csky/mm/tlb.c | 136 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 132 insertions(+), 4 deletions(-) commit 22d55f02b8922a097cd4be1e2f131dfa7ef65901 Author: Guo Ren Date: Tue Jun 18 20:33:32 2019 +0800 csky: Use generic asid algorithm to implement switch_mm Use linux generic asid/vmid algorithm to implement csky switch_mm function. The algorithm is from arm and it could work with SMP system. It'll help reduce tlb flush for switch_mm in task/vm switch. Signed-off-by: Guo Ren Cc: Arnd Bergmann arch/csky/abiv1/inc/abi/ckmmu.h | 6 +++++ arch/csky/abiv2/inc/abi/ckmmu.h | 10 ++++++++ arch/csky/include/asm/mmu.h | 1 + arch/csky/include/asm/mmu_context.h | 12 ++++++++-- arch/csky/mm/Makefile | 1 + arch/csky/mm/context.c | 46 +++++++++++++++++++++++++++++++++++++ 6 files changed, 74 insertions(+), 2 deletions(-) commit a231b8839cd4259de1d37a78165739a4d5d08e72 Author: Guo Ren Date: Tue Jun 18 20:06:52 2019 +0800 csky: Add new asid lib code from arm This patch only contains asid help code from arm for next patch to use. The asid allocator use five level check to reduce the cost of switch_mm. 1. Check if the asid version is the same (it's general) 2. Check reserved_asid which is set in rollover flush_context() and key point is to keep the same bit position with the current asid version instead of input version. 3. Check if the position of bitmap is free then it could be set & used directly. 4. find_next_zero_bit() (a little performance cost) 5. flush_context (this is the worst cost with increase current asid version) Check is level by level and cost is also higher with the next level. The reserved_asid and bitmap mechanism prevent unnecessary find_next_zero_bit(). The atomic 64 bit asid is also suitable for 32-bit system and it won't cost a lot in 1th 2th 3th level check. The operation of set/clear mm_cpumask was removed in arm64 compared to arm32. It seems no side effect on current arm64 system, but from software meaning it's wrong. Although csky also needn't it, we add it back for csky. The asid_per_ctxt is no use for csky and it reserves the lowest bits for other use, maybe: trust zone ? Ok, just keep it in csky copy. Seems it also could be used by other archs and it's worth to move asid code to generic in future. Signed-off-by: Guo Ren Cc: Arnd Bergmann Cc: Julien Grall arch/csky/include/asm/asid.h | 78 ++++++++++++++++++ arch/csky/mm/Makefile | 1 + arch/csky/mm/asid.c | 189 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 268 insertions(+) commit 9d35dc3006a9865eb5b55cc79df49933601131f8 Author: Guo Ren Date: Tue Jun 18 17:20:10 2019 +0800 csky: Revert mmu ASID mechanism Current C-SKY ASID mechanism is from mips and it doesn't work well with multi-cores. ASID per core mechanism is not suitable for C-SKY SMP tlb maintain operations, eg: tlbi.vas need share the same asid in all processors and it'll invalid the tlb entry in all cores with the same asid. This patch is prepare for new ASID mechanism. Signed-off-by: Guo Ren Cc: Arnd Bergmann arch/csky/include/asm/mmu.h | 1 - arch/csky/include/asm/mmu_context.h | 112 ++------------------- arch/csky/include/asm/pgtable.h | 2 - arch/csky/kernel/smp.c | 2 - arch/csky/mm/init.c | 2 - arch/csky/mm/tlb.c | 190 ++---------------------------------- 6 files changed, 14 insertions(+), 295 deletions(-) commit 4d581034f9086f784a3408575bdb3c201740c6cb Author: Mao Han Date: Tue Jun 4 18:54:47 2019 +0800 dt-bindings: csky: Add csky PMU bindings This patch adds the documentation to describe that how to add pmu node in dts. Signed-off-by: Mao Han Signed-off-by: Guo Ren Cc: Rob Herring Documentation/devicetree/bindings/csky/pmu.txt | 38 ++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit 69d812f5eb249bf30069f81dd508aa4548ec6eb1 Author: Guo Ren Date: Thu Jun 6 15:37:32 2019 +0800 dt-bindings: interrupt-controller: Update csky mpintc Add trigger type setting for csky,mpintc. The driver also could support #interrupt-cells <1> and it wouldn't invalidate existing DTs. Here we only show the complete format. Signed-off-by: Guo Ren Reviewed-by: Rob Herring Cc: Marc Zyngier .../bindings/interrupt-controller/csky,mpintc.txt | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit e7534198abd6af7091a40d79cbb365a80ba9f82d Author: Guo Ren Date: Tue Jun 4 18:54:48 2019 +0800 csky: Fixup some error count in 810 & 860. CK810 pmu only support event with index 0-8 and 0xd; CK860 only support event 1~4, 0xa~0x1b. So do not register unsupport event to hardware cache event, which may leader to unknown behavior. Signed-off-by: Mao Han Signed-off-by: Guo Ren arch/csky/kernel/perf_event.c | 60 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 54 insertions(+), 6 deletions(-) commit d41435d9b2b3f8fb58dc1258220401ad16aa8a19 Author: Mao Han Date: Tue Jun 4 18:54:49 2019 +0800 csky: Fix perf record in kernel/user space csky_pmu_event_init is called several times during the perf record initialzation. After configure the event counter in either kernel space or user space, csky_pmu_event_init is called twice with no attr specified. Configuration will be overwritten with sampling in both kernel space and user space. --all-kernel/--all-user is useless without this patch applied. Signed-off-by: Mao Han Signed-off-by: Guo Ren arch/csky/kernel/perf_event.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) commit f622fbf205966a8e911f81a00db17997dd171404 Author: Mao Han Date: Tue Jun 4 18:54:46 2019 +0800 csky: Add pmu interrupt support This patch add interrupt request and handler for csky pmu. perf can record on hardware event with this patch applied. Signed-off-by: Mao Han Signed-off-by: Guo Ren arch/csky/kernel/perf_event.c | 261 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 246 insertions(+), 15 deletions(-) commit ccffa1ad15be95b11dab128e1a59270057322934 Author: Mao Han Date: Tue Jun 4 18:54:45 2019 +0800 csky: Add count-width property for csky pmu The csky pmu counter may have different io width. When the counter is smaller then 64 bits and counter value is smaller than the old value, it will result to a extremely large delta value. So the sampled value should be extend to 64 bits to avoid this, the extension bits base on the count-width property from dts. Signed-off-by: Mao Han Signed-off-by: Guo Ren arch/csky/kernel/perf_event.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit f132076c8ff9ec1603c7079c3ce3b2cce8b72a89 Author: Mao Han Date: Tue Jun 4 18:54:44 2019 +0800 csky: Init pmu as a device This patch change the csky pmu initialization from arch init to device init. The pmu can be configued with information from device tree(pmu device name, irq number and etc.). Signed-off-by: Mao Han Signed-off-by: Guo Ren arch/csky/kernel/perf_event.c | 50 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 48 insertions(+), 2 deletions(-) commit 3158d28953fcd85492b28b1d2d5a5e20bb62a626 Author: Guo Ren Date: Fri May 10 17:07:01 2019 +0800 csky: Fixup no panic in kernel for some traps These traps couldn't be hanppen in kernel and we must panic there not send a signal to userspace. Signed-off-by: Guo Ren Cc: Arnd Bergmann arch/csky/kernel/traps.c | 5 +++++ 1 file changed, 5 insertions(+) commit 1994cc49f18b47a18dfb0371063fc9d80c464b33 Author: Guo Ren Date: Fri May 10 12:57:27 2019 +0800 csky: Select intc & timer drivers Let arch help to select interrupt controller's and timer's drivers instead of people using menuconfig to select. This help the mini system boot up. Signed-off-by: Guo Ren Cc: Arnd Bergmann arch/csky/Kconfig | 4 ++++ 1 file changed, 4 insertions(+) commit 56ac5e2139331898f29e6990f67ae8d2f080686b Author: Paul Walmsley Date: Thu Jul 18 17:15:06 2019 -0700 riscv: enable sys_clone3 syscall for rv64 Enable the sys_clone3 syscall for RV64. We simply include the generic version. Tested by running the program from https://lore.kernel.org/lkml/20190716130631.tohj4ub54md25dys@brauner.io/ and verifying that it completes successfully. Signed-off-by: Paul Walmsley Acked-by: Christian Brauner Cc: Christian Brauner arch/riscv/include/uapi/asm/unistd.h | 1 + 1 file changed, 1 insertion(+) commit 9798f4ea71eaf8eaad7e688c5b298528089c7bf8 Author: Cédric Le Goater Date: Thu Jul 18 23:51:54 2019 +0200 KVM: PPC: Book3S HV: XIVE: fix rollback when kvmppc_xive_create fails The XIVE device structure is now allocated in kvmppc_xive_get_device() and kfree'd in kvmppc_core_destroy_vm(). In case of an OPAL error when allocating the XIVE VPs, the kfree() call in kvmppc_xive_*create() will result in a double free and corrupt the host memory. Fixes: 5422e95103cf ("KVM: PPC: Book3S HV: XIVE: Replace the 'destroy' method by a 'release' method") Cc: stable@vger.kernel.org # v5.2+ Signed-off-by: Cédric Le Goater Tested-by: Michael Ellerman Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/6ea6998b-a890-2511-01d1-747d7621eb19@kaod.org arch/powerpc/kvm/book3s_xive.c | 4 +--- arch/powerpc/kvm/book3s_xive_native.c | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) commit 8d650cdedaabb33e85e9b7c517c0c71fcecc1de9 Author: Eric Dumazet Date: Thu Jul 18 19:28:14 2019 -0700 tcp: fix tcp_set_congestion_control() use from bpf hook Neal reported incorrect use of ns_capable() from bpf hook. bpf_setsockopt(...TCP_CONGESTION...) -> tcp_set_congestion_control() -> ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN) -> ns_capable_common() -> current_cred() -> rcu_dereference_protected(current->cred, 1) Accessing 'current' in bpf context makes no sense, since packets are processed from softirq context. As Neal stated : The capability check in tcp_set_congestion_control() was written assuming a system call context, and then was reused from a BPF call site. The fix is to add a new parameter to tcp_set_congestion_control(), so that the ns_capable() call is only performed under the right context. Fixes: 91b5b21c7c16 ("bpf: Add support for changing congestion control") Signed-off-by: Eric Dumazet Cc: Lawrence Brakmo Reported-by: Neal Cardwell Acked-by: Neal Cardwell Acked-by: Lawrence Brakmo Signed-off-by: David S. Miller include/net/tcp.h | 3 ++- net/core/filter.c | 2 +- net/ipv4/tcp.c | 4 +++- net/ipv4/tcp_cong.c | 6 +++--- 4 files changed, 9 insertions(+), 6 deletions(-) commit 269b7c5ff78264e3728b95828d219e0e0eeaec94 Author: Wei Yongjun Date: Fri Jul 19 01:22:06 2019 +0000 ag71xx: fix return value check in ag71xx_probe() In case of error, the function of_get_mac_address() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: d51b6ce441d3 ("net: ethernet: add ag71xx driver") Signed-off-by: Wei Yongjun Reviewed-by: Oleksij Rempel Signed-off-by: David S. Miller drivers/net/ethernet/atheros/ag71xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6f5fa8d2c05f247ab50440df0f07867ae0fc9050 Author: Wei Yongjun Date: Fri Jul 19 01:21:57 2019 +0000 ag71xx: fix error return code in ag71xx_probe() Fix to return error code -ENOMEM from the dmam_alloc_coherent() error handling case instead of 0, as done elsewhere in this function. Fixes: d51b6ce441d3 ("net: ethernet: add ag71xx driver") Signed-off-by: Wei Yongjun Reviewed-by: Oleksij Rempel Signed-off-by: David S. Miller drivers/net/ethernet/atheros/ag71xx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit eec4844fae7c033a0c1fc1eb3b8517aeb8b6cc49 Author: Matteo Croce Date: Thu Jul 18 15:58:50 2019 -0700 proc/sysctl: add shared variables for range check In the sysctl code the proc_dointvec_minmax() function is often used to validate the user supplied value between an allowed range. This function uses the extra1 and extra2 members from struct ctl_table as minimum and maximum allowed value. On sysctl handler declaration, in every source file there are some readonly variables containing just an integer which address is assigned to the extra1 and extra2 members, so the sysctl range is enforced. The special values 0, 1 and INT_MAX are very often used as range boundary, leading duplication of variables like zero=0, one=1, int_max=INT_MAX in different source files: $ git grep -E '\.extra[12].*&(zero|one|int_max)' |wc -l 248 Add a const int array containing the most commonly used values, some macros to refer more easily to the correct array member, and use them instead of creating a local one for every object file. This is the bloat-o-meter output comparing the old and new binary compiled with the default Fedora config: # scripts/bloat-o-meter -d vmlinux.o.old vmlinux.o add/remove: 2/2 grow/shrink: 0/2 up/down: 24/-188 (-164) Data old new delta sysctl_vals - 12 +12 __kstrtab_sysctl_vals - 12 +12 max 14 10 -4 int_max 16 - -16 one 68 - -68 zero 128 28 -100 Total: Before=20583249, After=20583085, chg -0.00% [mcroce@redhat.com: tipc: remove two unused variables] Link: http://lkml.kernel.org/r/20190530091952.4108-1-mcroce@redhat.com [akpm@linux-foundation.org: fix net/ipv6/sysctl_net_ipv6.c] [arnd@arndb.de: proc/sysctl: make firmware loader table conditional] Link: http://lkml.kernel.org/r/20190617130014.1713870-1-arnd@arndb.de [akpm@linux-foundation.org: fix fs/eventpoll.c] Link: http://lkml.kernel.org/r/20190430180111.10688-1-mcroce@redhat.com Signed-off-by: Matteo Croce Signed-off-by: Arnd Bergmann Acked-by: Kees Cook Reviewed-by: Aaron Tomlin Cc: Matthew Wilcox Cc: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/s390/appldata/appldata_base.c | 15 +- arch/s390/kernel/topology.c | 6 +- arch/x86/entry/vdso/vdso32-setup.c | 7 +- arch/x86/kernel/itmt.c | 6 +- drivers/base/firmware_loader/fallback_table.c | 13 +- drivers/gpu/drm/i915/i915_perf.c | 8 +- drivers/hv/vmbus_drv.c | 6 +- drivers/tty/tty_ldisc.c | 6 +- drivers/xen/balloon.c | 7 +- fs/eventpoll.c | 4 +- fs/notify/inotify/inotify_user.c | 8 +- fs/proc/proc_sysctl.c | 4 + include/linux/sysctl.h | 7 + ipc/ipc_sysctl.c | 35 +++-- kernel/pid_namespace.c | 3 +- kernel/sysctl.c | 197 +++++++++++++------------- kernel/ucount.c | 6 +- net/core/neighbour.c | 20 ++- net/core/sysctl_net_core.c | 34 +++-- net/dccp/sysctl.c | 16 +-- net/ipv4/sysctl_net_ipv4.c | 60 ++++---- net/ipv6/addrconf.c | 6 +- net/ipv6/route.c | 7 +- net/ipv6/sysctl_net_ipv6.c | 10 +- net/mpls/af_mpls.c | 10 +- net/netfilter/ipvs/ip_vs_ctl.c | 3 +- net/rxrpc/sysctl.c | 9 +- net/sctp/sysctl.c | 35 +++-- net/sunrpc/xprtrdma/transport.c | 3 +- net/tipc/sysctl.c | 6 +- security/keys/sysctl.c | 26 ++-- security/loadpin/loadpin.c | 6 +- security/yama/yama_lsm.c | 3 +- 33 files changed, 270 insertions(+), 322 deletions(-) commit 371096949f0ad3950b06729989bd27de51b8c5f5 Author: Keith Busch Date: Thu Jul 18 15:58:46 2019 -0700 mm: migrate: remove unused mode argument migrate_page_move_mapping() doesn't use the mode argument. Remove it and update callers accordingly. Link: http://lkml.kernel.org/r/20190508210301.8472-1-keith.busch@intel.com Signed-off-by: Keith Busch Reviewed-by: Zi Yan Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/aio.c | 2 +- fs/f2fs/data.c | 2 +- fs/iomap.c | 2 +- fs/ubifs/file.c | 2 +- include/linux/migrate.h | 3 +-- mm/migrate.c | 7 +++---- 6 files changed, 8 insertions(+), 10 deletions(-) commit 9a845030427c7a2879a7d635cc7c0e5f79ec962d Author: Dan Williams Date: Thu Jul 18 15:58:43 2019 -0700 mm/sparsemem: cleanup 'section number' data types David points out that there is a mixture of 'int' and 'unsigned long' usage for section number data types. Update the memory hotplug path to use 'unsigned long' consistently for section numbers. [akpm@linux-foundation.org: fix printk format] Link: http://lkml.kernel.org/r/156107543656.1329419.11505835211949439815.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams Reported-by: David Hildenbrand Reviewed-by: David Hildenbrand Cc: Michal Hocko Cc: Oscar Salvador Cc: Jason Gunthorpe Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory_hotplug.c | 10 +++++----- mm/sparse.c | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) commit a3619190d62ed9d66416891be2416f6bea2b3ca4 Author: Dan Williams Date: Thu Jul 18 15:58:40 2019 -0700 libnvdimm/pfn: stop padding pmem namespaces to section alignment Now that the mm core supports section-unaligned hotplug of ZONE_DEVICE memory, we no longer need to add padding at pfn/dax device creation time. The kernel will still honor padding established by older kernels. Link: http://lkml.kernel.org/r/156092356588.979959.6793371748950931916.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams Reported-by: Jeff Moyer Tested-by: Aneesh Kumar K.V [ppc64] Cc: David Hildenbrand Cc: Jane Chu Cc: Jérôme Glisse Cc: Jonathan Corbet Cc: Logan Gunthorpe Cc: Michal Hocko Cc: Mike Rapoport Cc: Oscar Salvador Cc: Pavel Tatashin Cc: Toshi Kani Cc: Vlastimil Babka Cc: Wei Yang Cc: Jason Gunthorpe Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/nvdimm/pfn.h | 14 --------- drivers/nvdimm/pfn_devs.c | 77 ++++++++--------------------------------------- include/linux/mmzone.h | 3 ++ 3 files changed, 16 insertions(+), 78 deletions(-) commit 7e3e888dfc138089f4c15a81b418e88f0978f744 Author: Dan Williams Date: Thu Jul 18 15:58:36 2019 -0700 libnvdimm/pfn: fix fsdax-mode namespace info-block zero-fields At namespace creation time there is the potential for the "expected to be zero" fields of a 'pfn' info-block to be filled with indeterminate data. While the kernel buffer is zeroed on allocation it is immediately overwritten by nd_pfn_validate() filling it with the current contents of the on-media info-block location. For fields like, 'flags' and the 'padding' it potentially means that future implementations can not rely on those fields being zero. In preparation to stop using the 'start_pad' and 'end_trunc' fields for section alignment, arrange for fields that are not explicitly initialized to be guaranteed zero. Bump the minor version to indicate it is safe to assume the 'padding' and 'flags' are zero. Otherwise, this corruption is expected to benign since all other critical fields are explicitly initialized. Note The cc: stable is about spreading this new policy to as many kernels as possible not fixing an issue in those kernels. It is not until the change titled "libnvdimm/pfn: Stop padding pmem namespaces to section alignment" where this improper initialization becomes a problem. So if someone decides to backport "libnvdimm/pfn: Stop padding pmem namespaces to section alignment" (which is not tagged for stable), make sure this pre-requisite is flagged. Link: http://lkml.kernel.org/r/156092356065.979959.6681003754765958296.stgit@dwillia2-desk3.amr.corp.intel.com Fixes: 32ab0a3f5170 ("libnvdimm, pmem: 'struct page' for pmem") Signed-off-by: Dan Williams Tested-by: Aneesh Kumar K.V [ppc64] Cc: Cc: David Hildenbrand Cc: Jane Chu Cc: Jeff Moyer Cc: Jérôme Glisse Cc: Jonathan Corbet Cc: Logan Gunthorpe Cc: Michal Hocko Cc: Mike Rapoport Cc: Oscar Salvador Cc: Pavel Tatashin Cc: Toshi Kani Cc: Vlastimil Babka Cc: Wei Yang Cc: Jason Gunthorpe Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/nvdimm/dax_devs.c | 2 +- drivers/nvdimm/pfn.h | 1 + drivers/nvdimm/pfn_devs.c | 18 +++++++++++++++--- 3 files changed, 17 insertions(+), 4 deletions(-) commit 7cc7867fb06166ac113eda9cf20d3c15d95ff6f5 Author: Dan Williams Date: Thu Jul 18 15:58:33 2019 -0700 mm/devm_memremap_pages: enable sub-section remap Teach devm_memremap_pages() about the new sub-section capabilities of arch_{add,remove}_memory(). Effectively, just replace all usage of align_start, align_end, and align_size with res->start, res->end, and resource_size(res). The existing sanity check will still make sure that the two separate remap attempts do not collide within a sub-section (2MB on x86). Link: http://lkml.kernel.org/r/156092355542.979959.10060071713397030576.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams Tested-by: Aneesh Kumar K.V [ppc64] Cc: Michal Hocko Cc: Toshi Kani Cc: Jérôme Glisse Cc: Logan Gunthorpe Cc: Oscar Salvador Cc: Pavel Tatashin Cc: David Hildenbrand Cc: Jane Chu Cc: Jeff Moyer Cc: Jonathan Corbet Cc: Mike Rapoport Cc: Vlastimil Babka Cc: Wei Yang Cc: Jason Gunthorpe Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/memremap.c | 57 ++++++++++++++++++++++--------------------------------- 1 file changed, 23 insertions(+), 34 deletions(-) commit a0653406a3a671c1609d54835f0443869525ca30 Author: Dan Williams Date: Thu Jul 18 15:58:29 2019 -0700 mm: document ZONE_DEVICE memory-model implications Explain the general mechanisms of 'ZONE_DEVICE' pages and list the users of 'devm_memremap_pages()'. [dan.j.williams@intel.com: update ZONE_DEVICE memory model documentation] Link: http://lkml.kernel.org/r/156109575458.1409767.1885676287099277666.stgit@dwillia2-desk3.amr.corp.intel.com Link: http://lkml.kernel.org/r/156092354985.979959.15763234410543451710.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams Reported-by: Mike Rapoport Reviewed-by: Mike Rapoport Tested-by: Aneesh Kumar K.V [ppc64] Cc: Jonathan Corbet Cc: David Hildenbrand Cc: Jane Chu Cc: Jeff Moyer Cc: Jérôme Glisse Cc: Logan Gunthorpe Cc: Michal Hocko Cc: Oscar Salvador Cc: Pavel Tatashin Cc: Toshi Kani Cc: Vlastimil Babka Cc: Wei Yang Cc: Jason Gunthorpe Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/vm/memory-model.rst | 40 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit ba72b4c8cf60e452cf6f0258ed9ee697957b7dfd Author: Dan Williams Date: Thu Jul 18 15:58:26 2019 -0700 mm/sparsemem: support sub-section hotplug The libnvdimm sub-system has suffered a series of hacks and broken workarounds for the memory-hotplug implementation's awkward section-aligned (128MB) granularity. For example the following backtrace is emitted when attempting arch_add_memory() with physical address ranges that intersect 'System RAM' (RAM) with 'Persistent Memory' (PMEM) within a given section: # cat /proc/iomem | grep -A1 -B1 Persistent\ Memory 100000000-1ffffffff : System RAM 200000000-303ffffff : Persistent Memory (legacy) 304000000-43fffffff : System RAM 440000000-23ffffffff : Persistent Memory 2400000000-43bfffffff : Persistent Memory 2400000000-43bfffffff : namespace2.0 WARNING: CPU: 38 PID: 928 at arch/x86/mm/init_64.c:850 add_pages+0x5c/0x60 [..] RIP: 0010:add_pages+0x5c/0x60 [..] Call Trace: devm_memremap_pages+0x460/0x6e0 pmem_attach_disk+0x29e/0x680 [nd_pmem] ? nd_dax_probe+0xfc/0x120 [libnvdimm] nvdimm_bus_probe+0x66/0x160 [libnvdimm] It was discovered that the problem goes beyond RAM vs PMEM collisions as some platform produce PMEM vs PMEM collisions within a given section. The libnvdimm workaround for that case revealed that the libnvdimm section-alignment-padding implementation has been broken for a long while. A fix for that long-standing breakage introduces as many problems as it solves as it would require a backward-incompatible change to the namespace metadata interpretation. Instead of that dubious route [1], address the root problem in the memory-hotplug implementation. Note that EEXIST is no longer treated as success as that is how sparse_add_section() reports subsection collisions, it was also obviated by recent changes to perform the request_region() for 'System RAM' before arch_add_memory() in the add_memory() sequence. [1] https://lore.kernel.org/r/155000671719.348031.2347363160141119237.stgit@dwillia2-desk3.amr.corp.intel.com [osalvador@suse.de: fix deactivate_section for early sections] Link: http://lkml.kernel.org/r/20190715081549.32577-2-osalvador@suse.de Link: http://lkml.kernel.org/r/156092354368.979959.6232443923440952359.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams Signed-off-by: Oscar Salvador Tested-by: Aneesh Kumar K.V [ppc64] Reviewed-by: Oscar Salvador Cc: Michal Hocko Cc: Vlastimil Babka Cc: Logan Gunthorpe Cc: Pavel Tatashin Cc: David Hildenbrand Cc: Jane Chu Cc: Jeff Moyer Cc: Jérôme Glisse Cc: Jonathan Corbet Cc: Mike Rapoport Cc: Toshi Kani Cc: Wei Yang Cc: Jason Gunthorpe Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memory_hotplug.h | 2 +- mm/memory_hotplug.c | 27 +----- mm/page_alloc.c | 2 +- mm/sparse.c | 206 +++++++++++++++++++++++++++-------------- 4 files changed, 141 insertions(+), 96 deletions(-) commit 7ea6216049ff9cf250a6722cd766d99c8d1424e5 Author: Dan Williams Date: Thu Jul 18 15:58:22 2019 -0700 mm/sparsemem: prepare for sub-section ranges Prepare the memory hot-{add,remove} paths for handling sub-section ranges by plumbing the starting page frame and number of pages being handled through arch_{add,remove}_memory() to sparse_{add,remove}_one_section(). This is simply plumbing, small cleanups, and some identifier renames. No intended functional changes. Link: http://lkml.kernel.org/r/156092353780.979959.9713046515562743194.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams Reviewed-by: Pavel Tatashin Tested-by: Aneesh Kumar K.V [ppc64] Reviewed-by: Oscar Salvador Cc: Michal Hocko Cc: Vlastimil Babka Cc: Logan Gunthorpe Cc: David Hildenbrand Cc: Jane Chu Cc: Jeff Moyer Cc: Jérôme Glisse Cc: Jonathan Corbet Cc: Mike Rapoport Cc: Toshi Kani Cc: Wei Yang Cc: Jason Gunthorpe Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memory_hotplug.h | 5 +- mm/memory_hotplug.c | 114 +++++++++++++++++++++++++---------------- mm/sparse.c | 16 +++--- 3 files changed, 81 insertions(+), 54 deletions(-) commit 46d945aeab4d7dd837bd0724662de2caf712f047 Author: Dan Williams Date: Thu Jul 18 15:58:18 2019 -0700 mm: kill is_dev_zone() helper Given there are no more usages of is_dev_zone() outside of 'ifdef CONFIG_ZONE_DEVICE' protection, kill off the compilation helper. Link: http://lkml.kernel.org/r/156092353211.979959.1489004866360828964.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams Reviewed-by: Oscar Salvador Reviewed-by: Pavel Tatashin Reviewed-by: Wei Yang Acked-by: David Hildenbrand Tested-by: Aneesh Kumar K.V [ppc64] Cc: Michal Hocko Cc: Logan Gunthorpe Cc: Jane Chu Cc: Jeff Moyer Cc: Jérôme Glisse Cc: Jonathan Corbet Cc: Mike Rapoport Cc: Toshi Kani Cc: Vlastimil Babka Cc: Jason Gunthorpe Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mmzone.h | 12 ------------ mm/page_alloc.c | 2 +- 2 files changed, 1 insertion(+), 13 deletions(-) commit 96da4350000973ef9310a10d077d65bbc017f093 Author: Dan Williams Date: Thu Jul 18 15:58:15 2019 -0700 mm/hotplug: kill is_dev_zone() usage in __remove_pages() The zone type check was a leftover from the cleanup that plumbed altmap through the memory hotplug path, i.e. commit da024512a1fa "mm: pass the vmem_altmap to arch_remove_memory and __remove_pages". Link: http://lkml.kernel.org/r/156092352642.979959.6664333788149363039.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams Reviewed-by: David Hildenbrand Reviewed-by: Oscar Salvador Tested-by: Aneesh Kumar K.V [ppc64] Cc: Michal Hocko Cc: Logan Gunthorpe Cc: Pavel Tatashin Cc: Jane Chu Cc: Jeff Moyer Cc: Jérôme Glisse Cc: Jonathan Corbet Cc: Mike Rapoport Cc: Toshi Kani Cc: Vlastimil Babka Cc: Wei Yang Cc: Jason Gunthorpe Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory_hotplug.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit e9c0a3f05477e18d2dae816cb61b62be1b7e90d3 Author: Dan Williams Date: Thu Jul 18 15:58:11 2019 -0700 mm/sparsemem: convert kmalloc_section_memmap() to populate_section_memmap() Allow sub-section sized ranges to be added to the memmap. populate_section_memmap() takes an explict pfn range rather than assuming a full section, and those parameters are plumbed all the way through to vmmemap_populate(). There should be no sub-section usage in current deployments. New warnings are added to clarify which memmap allocation paths are sub-section capable. Link: http://lkml.kernel.org/r/156092352058.979959.6551283472062305149.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams Reviewed-by: Pavel Tatashin Tested-by: Aneesh Kumar K.V [ppc64] Reviewed-by: Oscar Salvador Cc: Michal Hocko Cc: David Hildenbrand Cc: Logan Gunthorpe Cc: Jane Chu Cc: Jeff Moyer Cc: Jérôme Glisse Cc: Jonathan Corbet Cc: Mike Rapoport Cc: Toshi Kani Cc: Vlastimil Babka Cc: Wei Yang Cc: Jason Gunthorpe Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/mm/init_64.c | 4 +++- include/linux/mm.h | 4 ++-- mm/sparse-vmemmap.c | 21 ++++++++++++++------- mm/sparse.c | 50 +++++++++++++++++++++++++++----------------------- 4 files changed, 46 insertions(+), 33 deletions(-) commit 49ba3c6b37b38b58251c27864f551908c583e99d Author: Dan Williams Date: Thu Jul 18 15:58:07 2019 -0700 mm/hotplug: prepare shrink_{zone, pgdat}_span for sub-section removal Sub-section hotplug support reduces the unit of operation of hotplug from section-sized-units (PAGES_PER_SECTION) to sub-section-sized units (PAGES_PER_SUBSECTION). Teach shrink_{zone,pgdat}_span() to consider PAGES_PER_SUBSECTION boundaries as the points where pfn_valid(), not valid_section(), can toggle. [osalvador@suse.de: fix shrink_{zone,node}_span] Link: http://lkml.kernel.org/r/20190717090725.23618-3-osalvador@suse.de Link: http://lkml.kernel.org/r/156092351496.979959.12703722803097017492.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams Signed-off-by: Oscar Salvador Reviewed-by: Pavel Tatashin Reviewed-by: Oscar Salvador Tested-by: Aneesh Kumar K.V [ppc64] Cc: Michal Hocko Cc: Vlastimil Babka Cc: Logan Gunthorpe Cc: David Hildenbrand Cc: Jane Chu Cc: Jeff Moyer Cc: Jérôme Glisse Cc: Jonathan Corbet Cc: Mike Rapoport Cc: Toshi Kani Cc: Wei Yang Cc: Jason Gunthorpe Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory_hotplug.c | 37 ++++++++++++------------------------- 1 file changed, 12 insertions(+), 25 deletions(-) commit f46edbd1b1516da1fb34c917775168d5df576f78 Author: Dan Williams Date: Thu Jul 18 15:58:04 2019 -0700 mm/sparsemem: add helpers track active portions of a section at boot Prepare for hot{plug,remove} of sub-ranges of a section by tracking a sub-section active bitmask, each bit representing a PMD_SIZE span of the architecture's memory hotplug section size. The implications of a partially populated section is that pfn_valid() needs to go beyond a valid_section() check and either determine that the section is an "early section", or read the sub-section active ranges from the bitmask. The expectation is that the bitmask (subsection_map) fits in the same cacheline as the valid_section() / early_section() data, so the incremental performance overhead to pfn_valid() should be negligible. The rationale for using early_section() to short-ciruit the subsection_map check is that there are legacy code paths that use pfn_valid() at section granularity before validating the pfn against pgdat data. So, the early_section() check allows those traditional assumptions to persist while also permitting subsection_map to tell the truth for purposes of populating the unused portions of early sections with PMEM and other ZONE_DEVICE mappings. Link: http://lkml.kernel.org/r/156092350874.979959.18185938451405518285.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams Reported-by: Qian Cai Tested-by: Jane Chu Tested-by: Aneesh Kumar K.V [ppc64] Reviewed-by: Oscar Salvador Cc: Michal Hocko Cc: Vlastimil Babka Cc: Logan Gunthorpe Cc: Pavel Tatashin Cc: David Hildenbrand Cc: Jeff Moyer Cc: Jérôme Glisse Cc: Jonathan Corbet Cc: Mike Rapoport Cc: Toshi Kani Cc: Wei Yang Cc: Jason Gunthorpe Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mmzone.h | 33 ++++++++++++++++++++++++++++++++- mm/page_alloc.c | 10 ++++++++-- mm/sparse.c | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 75 insertions(+), 3 deletions(-) commit 326e1b8f83a4318b09033ef754f40c785aed5e68 Author: Dan Williams Date: Thu Jul 18 15:58:00 2019 -0700 mm/sparsemem: introduce a SECTION_IS_EARLY flag In preparation for sub-section hotplug, track whether a given section was created during early memory initialization, or later via memory hotplug. This distinction is needed to maintain the coarse expectation that pfn_valid() returns true for any pfn within a given section even if that section has pages that are reserved from the page allocator. For example one of the of goals of subsection hotplug is to support cases where the system physical memory layout collides System RAM and PMEM within a section. Several pfn_valid() users expect to just check if a section is valid, but they are not careful to check if the given pfn is within a "System RAM" boundary and instead expect pgdat information to further validate the pfn. Rather than unwind those paths to make their pfn_valid() queries more precise a follow on patch uses the SECTION_IS_EARLY flag to maintain the traditional expectation that pfn_valid() returns true for all early sections. Link: https://lore.kernel.org/lkml/1560366952-10660-1-git-send-email-cai@lca.pw/ Link: http://lkml.kernel.org/r/156092350358.979959.5817209875548072819.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams Reported-by: Qian Cai Tested-by: Aneesh Kumar K.V [ppc64] Reviewed-by: Oscar Salvador Cc: Michal Hocko Cc: Logan Gunthorpe Cc: David Hildenbrand Cc: Pavel Tatashin Cc: Jane Chu Cc: Jeff Moyer Cc: Jérôme Glisse Cc: Jonathan Corbet Cc: Mike Rapoport Cc: Toshi Kani Cc: Vlastimil Babka Cc: Wei Yang Cc: Jason Gunthorpe Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mmzone.h | 8 +++++++- mm/sparse.c | 20 +++++++++----------- 2 files changed, 16 insertions(+), 12 deletions(-) commit f1eca35a0dc7cb3cdb00c88c8c5e5138a65face0 Author: Dan Williams Date: Thu Jul 18 15:57:57 2019 -0700 mm/sparsemem: introduce struct mem_section_usage Patch series "mm: Sub-section memory hotplug support", v10. The memory hotplug section is an arbitrary / convenient unit for memory hotplug. 'Section-size' units have bled into the user interface ('memblock' sysfs) and can not be changed without breaking existing userspace. The section-size constraint, while mostly benign for typical memory hotplug, has and continues to wreak havoc with 'device-memory' use cases, persistent memory (pmem) in particular. Recall that pmem uses devm_memremap_pages(), and subsequently arch_add_memory(), to allocate a 'struct page' memmap for pmem. However, it does not use the 'bottom half' of memory hotplug, i.e. never marks pmem pages online and never exposes the userspace memblock interface for pmem. This leaves an opening to redress the section-size constraint. To date, the libnvdimm subsystem has attempted to inject padding to satisfy the internal constraints of arch_add_memory(). Beyond complicating the code, leading to bugs [2], wasting memory, and limiting configuration flexibility, the padding hack is broken when the platform changes this physical memory alignment of pmem from one boot to the next. Device failure (intermittent or permanent) and physical reconfiguration are events that can cause the platform firmware to change the physical placement of pmem on a subsequent boot, and device failure is an everyday event in a data-center. It turns out that sections are only a hard requirement of the user-facing interface for memory hotplug and with a bit more infrastructure sub-section arch_add_memory() support can be added for kernel internal usages like devm_memremap_pages(). Here is an analysis of the current design assumptions in the current code and how they are addressed in the new implementation: Current design assumptions: - Sections that describe boot memory (early sections) are never unplugged / removed. - pfn_valid(), in the CONFIG_SPARSEMEM_VMEMMAP=y, case devolves to a valid_section() check - __add_pages() and helper routines assume all operations occur in PAGES_PER_SECTION units. - The memblock sysfs interface only comprehends full sections New design assumptions: - Sections are instrumented with a sub-section bitmask to track (on x86) individual 2MB sub-divisions of a 128MB section. - Partially populated early sections can be extended with additional sub-sections, and those sub-sections can be removed with arch_remove_memory(). With this in place we no longer lose usable memory capacity to padding. - pfn_valid() is updated to look deeper than valid_section() to also check the active-sub-section mask. This indication is in the same cacheline as the valid_section() so the performance impact is expected to be negligible. So far the lkp robot has not reported any regressions. - Outside of the core vmemmap population routines which are replaced, other helper routines like shrink_{zone,pgdat}_span() are updated to handle the smaller granularity. Core memory hotplug routines that deal with online memory are not touched. - The existing memblock sysfs user api guarantees / assumptions are not touched since this capability is limited to !online !memblock-sysfs-accessible sections. Meanwhile the issue reports continue to roll in from users that do not understand when and how the 128MB constraint will bite them. The current implementation relied on being able to support at least one misaligned namespace, but that immediately falls over on any moderately complex namespace creation attempt. Beyond the initial problem of 'System RAM' colliding with pmem, and the unsolvable problem of physical alignment changes, Linux is now being exposed to platforms that collide pmem ranges with other pmem ranges by default [3]. In short, devm_memremap_pages() has pushed the venerable section-size constraint past the breaking point, and the simplicity of section-aligned arch_add_memory() is no longer tenable. These patches are exposed to the kbuild robot on a subsection-v10 branch [4], and a preview of the unit test for this functionality is available on the 'subsection-pending' branch of ndctl [5]. [2]: https://lore.kernel.org/r/155000671719.348031.2347363160141119237.stgit@dwillia2-desk3.amr.corp.intel.com [3]: https://github.com/pmem/ndctl/issues/76 [4]: https://git.kernel.org/pub/scm/linux/kernel/git/djbw/nvdimm.git/log/?h=subsection-v10 [5]: https://github.com/pmem/ndctl/commit/7c59b4867e1c This patch (of 13): Towards enabling memory hotplug to track partial population of a section, introduce 'struct mem_section_usage'. A pointer to a 'struct mem_section_usage' instance replaces the existing pointer to a 'pageblock_flags' bitmap. Effectively it adds one more 'unsigned long' beyond the 'pageblock_flags' (usemap) allocation to house a new 'subsection_map' bitmap. The new bitmap enables the memory hot{plug,remove} implementation to act on incremental sub-divisions of a section. SUBSECTION_SHIFT is defined as global constant instead of per-architecture value like SECTION_SIZE_BITS in order to allow cross-arch compatibility of subsection users. Specifically a common subsection size allows for the possibility that persistent memory namespace configurations be made compatible across architectures. The primary motivation for this functionality is to support platforms that mix "System RAM" and "Persistent Memory" within a single section, or multiple PMEM ranges with different mapping lifetimes within a single section. The section restriction for hotplug has caused an ongoing saga of hacks and bugs for devm_memremap_pages() users. Beyond the fixups to teach existing paths how to retrieve the 'usemap' from a section, and updates to usemap allocation path, there are no expected behavior changes. Link: http://lkml.kernel.org/r/156092349845.979959.73333291612799019.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams Reviewed-by: Oscar Salvador Reviewed-by: Wei Yang Tested-by: Aneesh Kumar K.V [ppc64] Cc: Michal Hocko Cc: Vlastimil Babka Cc: Logan Gunthorpe Cc: Pavel Tatashin Cc: David Hildenbrand Cc: Jérôme Glisse Cc: Mike Rapoport Cc: Jane Chu Cc: Pavel Tatashin Cc: Jonathan Corbet Cc: Qian Cai Cc: Logan Gunthorpe Cc: Toshi Kani Cc: Jeff Moyer Cc: Michal Hocko Cc: Vlastimil Babka Cc: Jason Gunthorpe Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mmzone.h | 28 +++++++++++++++-- mm/memory_hotplug.c | 18 ++++++----- mm/page_alloc.c | 2 +- mm/sparse.c | 81 +++++++++++++++++++++++++------------------------- 4 files changed, 76 insertions(+), 53 deletions(-) commit dd625285910d3cff535fa76355e49949513918a4 Author: David Hildenbrand Date: Thu Jul 18 15:57:53 2019 -0700 drivers/base/memory.c: get rid of find_memory_block_hinted() No longer needed, let's remove it. Also, drop the "hint" parameter completely from "find_memory_block_by_id", as nobody needs it anymore. [david@redhat.com: v3] Link: http://lkml.kernel.org/r/20190620183139.4352-7-david@redhat.com [david@redhat.com: handle zero-length walks] Link: http://lkml.kernel.org/r/1c2edc22-afd7-2211-c4c7-40e54e5007e8@redhat.com Link: http://lkml.kernel.org/r/20190614100114.311-7-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Andrew Morton Tested-by: Qian Cai Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Cc: David Hildenbrand Cc: Stephen Rothwell Cc: Pavel Tatashin Cc: Andrew Banman Cc: Mike Travis Cc: Oscar Salvador Cc: Michal Hocko Cc: Wei Yang Cc: Arun KS Cc: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/base/memory.c | 40 ++++++++++++++-------------------------- include/linux/memory.h | 2 -- 2 files changed, 14 insertions(+), 28 deletions(-) commit ea8846411ad686ff626e00bb2c3821b3db2ab56a Author: David Hildenbrand Date: Thu Jul 18 15:57:50 2019 -0700 mm/memory_hotplug: move and simplify walk_memory_blocks() Let's move walk_memory_blocks() to the place where memory block logic resides and simplify it. While at it, add a type for the callback function. Link: http://lkml.kernel.org/r/20190614100114.311-6-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Andrew Morton Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Cc: David Hildenbrand Cc: Stephen Rothwell Cc: Pavel Tatashin Cc: Andrew Banman Cc: Mike Travis Cc: Oscar Salvador Cc: Michal Hocko Cc: Wei Yang Cc: Arun KS Cc: Qian Cai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/base/memory.c | 42 ++++++++++++++++++++++++++++++++ include/linux/memory.h | 3 +++ include/linux/memory_hotplug.h | 2 -- mm/memory_hotplug.c | 55 ------------------------------------------ 4 files changed, 45 insertions(+), 57 deletions(-) commit fbcf73ce65827c3d8935f38b832a43153a0c78d1 Author: David Hildenbrand Date: Thu Jul 18 15:57:46 2019 -0700 mm/memory_hotplug: rename walk_memory_range() and pass start+size instead of pfns walk_memory_range() was once used to iterate over sections. Now, it iterates over memory blocks. Rename the function, fixup the documentation. Also, pass start+size instead of PFNs, which is what most callers already have at hand. (we'll rework link_mem_sections() most probably soon) Follow-up patches will rework, simplify, and move walk_memory_blocks() to drivers/base/memory.c. Note: walk_memory_blocks() only works correctly right now if the start_pfn is aligned to a section start. This is the case right now, but we'll generalize the function in a follow up patch so the semantics match the documentation. [akpm@linux-foundation.org: remove unused variable] Link: http://lkml.kernel.org/r/20190614100114.311-5-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Andrew Morton Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: "Rafael J. Wysocki" Cc: Len Brown Cc: Greg Kroah-Hartman Cc: David Hildenbrand Cc: Rashmica Gupta Cc: Pavel Tatashin Cc: Anshuman Khandual Cc: Michael Neuling Cc: Thomas Gleixner Cc: Oscar Salvador Cc: Michal Hocko Cc: Wei Yang Cc: Juergen Gross Cc: Qian Cai Cc: Arun KS Cc: Nick Desaulniers Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/platforms/powernv/memtrace.c | 23 +++++++++++------------ drivers/acpi/acpi_memhotplug.c | 19 ++++--------------- drivers/base/node.c | 5 +++-- include/linux/memory_hotplug.h | 2 +- mm/memory_hotplug.c | 24 +++++++++++++----------- 5 files changed, 32 insertions(+), 41 deletions(-) commit 8d595c4c0f768f19db043d378b22e98405f9fd47 Author: David Hildenbrand Date: Thu Jul 18 15:57:43 2019 -0700 mm: make register_mem_sect_under_node() static It is only used internally. Link: http://lkml.kernel.org/r/20190614100114.311-4-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Andrew Morton Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Cc: Keith Busch Cc: Oscar Salvador Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/base/node.c | 3 ++- include/linux/node.h | 7 ------- 2 files changed, 2 insertions(+), 8 deletions(-) commit 90ec010fe0d690665852d6bac21643e9ae7affd8 Author: David Hildenbrand Date: Thu Jul 18 15:57:40 2019 -0700 drivers/base/memory: use "unsigned long" for block ids Block ids are just shifted section numbers, so let's also use "unsigned long" for them, too. Link: http://lkml.kernel.org/r/20190614100114.311-3-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Andrew Morton Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/base/memory.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 2491f0a2c0b117b9097e9c9eee0c21f2e5f716d7 Author: David Hildenbrand Date: Thu Jul 18 15:57:37 2019 -0700 mm: section numbers use the type "unsigned long" Patch series "mm: Further memory block device cleanups", v1. Some further cleanups around memory block devices. Especially, clean up and simplify walk_memory_range(). Including some other minor cleanups. This patch (of 6): We are using a mixture of "int" and "unsigned long". Let's make this consistent by using "unsigned long" everywhere. We'll do the same with memory block ids next. While at it, turn the "unsigned long i" in removable_show() into an int - sections_per_block is an int. [akpm@linux-foundation.org: s/unsigned long i/unsigned long nr/] [david@redhat.com: v3] Link: http://lkml.kernel.org/r/20190620183139.4352-2-david@redhat.com Link: http://lkml.kernel.org/r/20190614100114.311-2-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Andrew Morton Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Cc: Vlastimil Babka Cc: Michal Hocko Cc: Dan Williams Cc: Mel Gorman Cc: Wei Yang Cc: Johannes Weiner Cc: Arun KS Cc: Pavel Tatashin Cc: Oscar Salvador Cc: Stephen Rothwell Cc: Mike Rapoport Cc: Baoquan He Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/base/memory.c | 27 +++++++++++++-------------- include/linux/mmzone.h | 4 ++-- mm/sparse.c | 12 ++++++------ 3 files changed, 21 insertions(+), 22 deletions(-) commit 756398750e11ade1e617cd2a8f8d66fe7ed637e1 Author: Nadav Amit Date: Thu Jul 18 15:57:34 2019 -0700 resource: avoid unnecessary lookups in find_next_iomem_res() find_next_iomem_res() shows up to be a source for overhead in dax benchmarks. Improve performance by not considering children of the tree if the top level does not match. Since the range of the parents should include the range of the children such check is redundant. Running sysbench on dax (pmem emulation, with write_cache disabled): sysbench fileio --file-total-size=3G --file-test-mode=rndwr \ --file-io-mode=mmap --threads=4 --file-fsync-mode=fdatasync run Provides the following results: events (avg/stddev) ------------------- 5.2-rc3: 1247669.0000/16075.39 w/patch: 1286320.5000/16402.72 (+3%) Link: http://lkml.kernel.org/r/20190613045903.4922-3-namit@vmware.com Signed-off-by: Nadav Amit Cc: Borislav Petkov Cc: Toshi Kani Cc: Peter Zijlstra Cc: Dave Hansen Cc: Dan Williams Cc: Bjorn Helgaas Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/resource.c | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) commit 49f17c26c123b60fd1c74629eef077740d16ffc2 Author: Nadav Amit Date: Thu Jul 18 15:57:31 2019 -0700 resource: fix locking in find_next_iomem_res() Since resources can be removed, locking should ensure that the resource is not removed while accessing it. However, find_next_iomem_res() does not hold the lock while copying the data of the resource. Keep holding the lock while the data is copied. While at it, change the return value to a more informative value. It is disregarded by the callers. [akpm@linux-foundation.org: fix find_next_iomem_res() documentation] Link: http://lkml.kernel.org/r/20190613045903.4922-2-namit@vmware.com Fixes: ff3cc952d3f00 ("resource: Add remove_resource interface") Signed-off-by: Nadav Amit Reviewed-by: Andrew Morton Reviewed-by: Dan Williams Cc: Borislav Petkov Cc: Toshi Kani Cc: Peter Zijlstra Cc: Dave Hansen Cc: Bjorn Helgaas Cc: Ingo Molnar Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/resource.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit c06306696f8368b08774e2a743dbc52d92a61693 Author: Yang Shi Date: Thu Jul 18 15:57:27 2019 -0700 mm: thp: fix false negative of shmem vma's THP eligibility Commit 7635d9cbe832 ("mm, thp, proc: report THP eligibility for each vma") introduced THPeligible bit for processes' smaps. But, when checking the eligibility for shmem vma, __transparent_hugepage_enabled() is called to override the result from shmem_huge_enabled(). It may result in the anonymous vma's THP flag override shmem's. For example, running a simple test which create THP for shmem, but with anonymous THP disabled, when reading the process's smaps, it may show: 7fc92ec00000-7fc92f000000 rw-s 00000000 00:14 27764 /dev/shm/test Size: 4096 kB ... [snip] ... ShmemPmdMapped: 4096 kB ... [snip] ... THPeligible: 0 And, /proc/meminfo does show THP allocated and PMD mapped too: ShmemHugePages: 4096 kB ShmemPmdMapped: 4096 kB This doesn't make too much sense. The shmem objects should be treated separately from anonymous THP. Calling shmem_huge_enabled() with checking MMF_DISABLE_THP sounds good enough. And, we could skip stack and dax vma check since we already checked if the vma is shmem already. Also check if vma is suitable for THP by calling transhuge_vma_suitable(). And minor fix to smaps output format and documentation. Link: http://lkml.kernel.org/r/1560401041-32207-3-git-send-email-yang.shi@linux.alibaba.com Fixes: 7635d9cbe832 ("mm, thp, proc: report THP eligibility for each vma") Signed-off-by: Yang Shi Acked-by: Hugh Dickins Cc: Kirill A. Shutemov Cc: Michal Hocko Cc: Vlastimil Babka Cc: David Rientjes Cc: Andrea Arcangeli Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/filesystems/proc.txt | 4 ++-- fs/proc/task_mmu.c | 3 ++- mm/huge_memory.c | 9 +++++++-- mm/shmem.c | 3 +++ 4 files changed, 14 insertions(+), 5 deletions(-) commit 43675e6fbbeadca90c6c5031557ff95e217e6d2f Author: Yang Shi Date: Thu Jul 18 15:57:24 2019 -0700 mm: thp: make transhuge_vma_suitable available for anonymous THP transhuge_vma_suitable() was only available for shmem THP, but anonymous THP has the same check except pgoff check. And, it will be used for THP eligible check in the later patch, so make it available for all kind of THPs. This also helps reduce code duplication slightly. Since anonymous THP doesn't have to check pgoff, so make pgoff check shmem vma only. And regroup some functions in include/linux/mm.h to solve compile issue since transhuge_vma_suitable() needs call vma_is_anonymous() which was defined after huge_mm.h is included. [akpm@linux-foundation.org: fix typo] [yang.shi@linux.alibaba.com: v4] Link: http://lkml.kernel.org/r/1563400758-124759-2-git-send-email-yang.shi@linux.alibaba.com Link: http://lkml.kernel.org/r/1560401041-32207-2-git-send-email-yang.shi@linux.alibaba.com Signed-off-by: Yang Shi Acked-by: Hugh Dickins Cc: Kirill A. Shutemov Cc: Michal Hocko Cc: Vlastimil Babka Cc: David Rientjes Cc: Andrea Arcangeli Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/huge_mm.h | 23 +++++++++++++++++++++++ include/linux/mm.h | 34 +++++++++++++++++----------------- mm/huge_memory.c | 2 +- mm/memory.c | 13 ------------- 4 files changed, 41 insertions(+), 31 deletions(-) commit 26f26bedab337c9c7e1e55b21949a3e2e0d62840 Author: Wei Yang Date: Thu Jul 18 15:57:21 2019 -0700 mm/sparse.c: set section nid for hot-add memory In case of NODE_NOT_IN_PAGE_FLAGS is set, we store section's node id in section_to_node_table[]. While for hot-add memory, this is missed. Without this information, page_to_nid() may not give the right node id. BTW, current online_pages works because it leverages nid in memory_block. But the granularity of node id should be mem_section wide. Link: http://lkml.kernel.org/r/20190618005537.18878-1-richardw.yang@linux.intel.com Signed-off-by: Wei Yang Reviewed-by: Oscar Salvador Reviewed-by: David Hildenbrand Reviewed-by: Anshuman Khandual Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/sparse.c | 1 + 1 file changed, 1 insertion(+) commit b9bf8d342d9b443c0d19aa57883d8ddb38d965de Author: David Hildenbrand Date: Thu Jul 18 15:57:17 2019 -0700 mm/memory_hotplug: remove "zone" parameter from sparse_remove_one_section The parameter is unused, so let's drop it. Memory removal paths should never care about zones. This is the job of memory offlining and will require more refactorings. Link: http://lkml.kernel.org/r/20190527111152.16324-12-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Dan Williams Reviewed-by: Wei Yang Reviewed-by: Oscar Salvador Acked-by: Michal Hocko Cc: Alex Deucher Cc: Andrew Banman Cc: Andy Lutomirski Cc: Anshuman Khandual Cc: Ard Biesheuvel Cc: Arun KS Cc: Baoquan He Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Catalin Marinas Cc: Chintan Pandya Cc: Christophe Leroy Cc: Chris Wilson Cc: Dave Hansen Cc: "David S. Miller" Cc: Fenghua Yu Cc: Greg Kroah-Hartman Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jonathan Cameron Cc: Joonsoo Kim Cc: Jun Yao Cc: "Kirill A. Shutemov" Cc: Logan Gunthorpe Cc: Mark Brown Cc: Mark Rutland Cc: Masahiro Yamada Cc: Mathieu Malaterre Cc: Michael Ellerman Cc: Mike Rapoport Cc: "mike.travis@hpe.com" Cc: Nicholas Piggin Cc: Paul Mackerras Cc: Pavel Tatashin Cc: Peter Zijlstra Cc: Qian Cai Cc: "Rafael J. Wysocki" Cc: Rich Felker Cc: Rob Herring Cc: Robin Murphy Cc: Thomas Gleixner Cc: Tony Luck Cc: Vasily Gorbik Cc: Will Deacon Cc: Yoshinori Sato Cc: Yu Zhao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memory_hotplug.h | 2 +- mm/memory_hotplug.c | 2 +- mm/sparse.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) commit a31b264c2b415b29660da0bc2ba291a98629ce51 Author: David Hildenbrand Date: Thu Jul 18 15:57:12 2019 -0700 mm/memory_hotplug: make unregister_memory_block_under_nodes() never fail We really don't want anything during memory hotunplug to fail. We always pass a valid memory block device, that check can go. Avoid allocating memory and eventually failing. As we are always called under lock, we can use a static piece of memory. This avoids having to put the structure onto the stack, having to guess about the stack size of callers. Patch inspired by a patch from Oscar Salvador. In the future, there might be no need to iterate over nodes at all. mem->nid should tell us exactly what to remove. Memory block devices with mixed nodes (added during boot) should properly fenced off and never removed. Link: http://lkml.kernel.org/r/20190527111152.16324-11-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Wei Yang Reviewed-by: Oscar Salvador Acked-by: Michal Hocko Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Cc: Alex Deucher Cc: "David S. Miller" Cc: Mark Brown Cc: Chris Wilson Cc: David Hildenbrand Cc: Jonathan Cameron Cc: Andrew Banman Cc: Andy Lutomirski Cc: Anshuman Khandual Cc: Ard Biesheuvel Cc: Arun KS Cc: Baoquan He Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Catalin Marinas Cc: Chintan Pandya Cc: Christophe Leroy Cc: Dan Williams Cc: Dave Hansen Cc: Fenghua Yu Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Joonsoo Kim Cc: Jun Yao Cc: "Kirill A. Shutemov" Cc: Logan Gunthorpe Cc: Mark Rutland Cc: Masahiro Yamada Cc: Mathieu Malaterre Cc: Michael Ellerman Cc: Mike Rapoport Cc: "mike.travis@hpe.com" Cc: Nicholas Piggin Cc: Paul Mackerras Cc: Pavel Tatashin Cc: Peter Zijlstra Cc: Qian Cai Cc: Rich Felker Cc: Rob Herring Cc: Robin Murphy Cc: Thomas Gleixner Cc: Tony Luck Cc: Vasily Gorbik Cc: Will Deacon Cc: Yoshinori Sato Cc: Yu Zhao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/base/node.c | 18 +++++------------- include/linux/node.h | 5 ++--- 2 files changed, 7 insertions(+), 16 deletions(-) commit 4c4b7f9ba9486c565aead99a198ceeef73ae81f6 Author: David Hildenbrand Date: Thu Jul 18 15:57:06 2019 -0700 mm/memory_hotplug: remove memory block devices before arch_remove_memory() Let's factor out removing of memory block devices, which is only necessary for memory added via add_memory() and friends that created memory block devices. Remove the devices before calling arch_remove_memory(). This finishes factoring out memory block device handling from arch_add_memory() and arch_remove_memory(). Link: http://lkml.kernel.org/r/20190527111152.16324-10-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Dan Williams Acked-by: Michal Hocko Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Cc: David Hildenbrand Cc: "mike.travis@hpe.com" Cc: Andrew Banman Cc: Ingo Molnar Cc: Alex Deucher Cc: "David S. Miller" Cc: Mark Brown Cc: Chris Wilson Cc: Oscar Salvador Cc: Jonathan Cameron Cc: Arun KS Cc: Mathieu Malaterre Cc: Andy Lutomirski Cc: Anshuman Khandual Cc: Ard Biesheuvel Cc: Baoquan He Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Catalin Marinas Cc: Chintan Pandya Cc: Christophe Leroy Cc: Dave Hansen Cc: Fenghua Yu Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Joonsoo Kim Cc: Jun Yao Cc: "Kirill A. Shutemov" Cc: Logan Gunthorpe Cc: Mark Rutland Cc: Masahiro Yamada Cc: Michael Ellerman Cc: Mike Rapoport Cc: Nicholas Piggin Cc: Oscar Salvador Cc: Paul Mackerras Cc: Pavel Tatashin Cc: Peter Zijlstra Cc: Qian Cai Cc: Rich Felker Cc: Rob Herring Cc: Robin Murphy Cc: Thomas Gleixner Cc: Tony Luck Cc: Vasily Gorbik Cc: Wei Yang Cc: Will Deacon Cc: Yoshinori Sato Cc: Yu Zhao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/base/memory.c | 37 ++++++++++++++++++------------------- drivers/base/node.c | 11 ++++++----- include/linux/memory.h | 2 +- include/linux/node.h | 6 ++---- mm/memory_hotplug.c | 5 +++-- 5 files changed, 30 insertions(+), 31 deletions(-) commit 05f800a0bd08e14606ac63e0a5c63ed6880acaab Author: David Hildenbrand Date: Thu Jul 18 15:57:01 2019 -0700 mm/memory_hotplug: drop MHP_MEMBLOCK_API No longer needed, the callers of arch_add_memory() can handle this manually. Link: http://lkml.kernel.org/r/20190527111152.16324-9-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Wei Yang Acked-by: Michal Hocko Cc: David Hildenbrand Cc: Oscar Salvador Cc: Pavel Tatashin Cc: Joonsoo Kim Cc: Qian Cai Cc: Arun KS Cc: Mathieu Malaterre Cc: Mike Rapoport Cc: Alex Deucher Cc: Andrew Banman Cc: Andy Lutomirski Cc: Anshuman Khandual Cc: Ard Biesheuvel Cc: Baoquan He Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Catalin Marinas Cc: Chintan Pandya Cc: Christophe Leroy Cc: Chris Wilson Cc: Dan Williams Cc: Dave Hansen Cc: "David S. Miller" Cc: Fenghua Yu Cc: Greg Kroah-Hartman Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jonathan Cameron Cc: Jun Yao Cc: "Kirill A. Shutemov" Cc: Logan Gunthorpe Cc: Mark Brown Cc: Mark Rutland Cc: Masahiro Yamada Cc: Michael Ellerman Cc: Mike Rapoport Cc: "mike.travis@hpe.com" Cc: Nicholas Piggin Cc: Oscar Salvador Cc: Paul Mackerras Cc: Peter Zijlstra Cc: "Rafael J. Wysocki" Cc: Rich Felker Cc: Rob Herring Cc: Robin Murphy Cc: Thomas Gleixner Cc: Tony Luck Cc: Vasily Gorbik Cc: Will Deacon Cc: Yoshinori Sato Cc: Yu Zhao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memory_hotplug.h | 8 -------- mm/memory_hotplug.c | 9 +++------ 2 files changed, 3 insertions(+), 14 deletions(-) commit db051a0dac13db24d58470d75cee0ce7c6b031a1 Author: David Hildenbrand Date: Thu Jul 18 15:56:56 2019 -0700 mm/memory_hotplug: create memory block devices after arch_add_memory() Only memory to be added to the buddy and to be onlined/offlined by user space using /sys/devices/system/memory/... needs (and should have!) memory block devices. Factor out creation of memory block devices. Create all devices after arch_add_memory() succeeded. We can later drop the want_memblock parameter, because it is now effectively stale. Only after memory block devices have been added, memory can be onlined by user space. This implies, that memory is not visible to user space at all before arch_add_memory() succeeded. While at it - use WARN_ON_ONCE instead of BUG_ON in moved unregister_memory() - introduce find_memory_block_by_id() to search via block id - Use find_memory_block_by_id() in init_memory_block() to catch duplicates Link: http://lkml.kernel.org/r/20190527111152.16324-8-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Pavel Tatashin Acked-by: Michal Hocko Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Cc: David Hildenbrand Cc: "mike.travis@hpe.com" Cc: Ingo Molnar Cc: Andrew Banman Cc: Oscar Salvador Cc: Qian Cai Cc: Wei Yang Cc: Arun KS Cc: Mathieu Malaterre Cc: Alex Deucher Cc: Andy Lutomirski Cc: Anshuman Khandual Cc: Ard Biesheuvel Cc: Baoquan He Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Catalin Marinas Cc: Chintan Pandya Cc: Christophe Leroy Cc: Chris Wilson Cc: Dan Williams Cc: Dave Hansen Cc: "David S. Miller" Cc: Fenghua Yu Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Jonathan Cameron Cc: Joonsoo Kim Cc: Jun Yao Cc: "Kirill A. Shutemov" Cc: Logan Gunthorpe Cc: Mark Brown Cc: Mark Rutland Cc: Masahiro Yamada Cc: Michael Ellerman Cc: Mike Rapoport Cc: Nicholas Piggin Cc: Oscar Salvador Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Rich Felker Cc: Rob Herring Cc: Robin Murphy Cc: Thomas Gleixner Cc: Tony Luck Cc: Vasily Gorbik Cc: Will Deacon Cc: Yoshinori Sato Cc: Yu Zhao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/base/memory.c | 82 +++++++++++++++++++++++++++++++++----------------- include/linux/memory.h | 2 +- mm/memory_hotplug.c | 15 ++++----- 3 files changed, 63 insertions(+), 36 deletions(-) commit 80ec922dbd87fd38d15719c86a94457204648aeb Author: David Hildenbrand Date: Thu Jul 18 15:56:51 2019 -0700 mm/memory_hotplug: allow arch_remove_memory() without CONFIG_MEMORY_HOTREMOVE We want to improve error handling while adding memory by allowing to use arch_remove_memory() and __remove_pages() even if CONFIG_MEMORY_HOTREMOVE is not set to e.g., implement something like: arch_add_memory() rc = do_something(); if (rc) { arch_remove_memory(); } We won't get rid of CONFIG_MEMORY_HOTREMOVE for now, as it will require quite some dependencies for memory offlining. Link: http://lkml.kernel.org/r/20190527111152.16324-7-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Pavel Tatashin Cc: Tony Luck Cc: Fenghua Yu Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Heiko Carstens Cc: Yoshinori Sato Cc: Rich Felker Cc: Dave Hansen Cc: Andy Lutomirski Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Cc: Michal Hocko Cc: David Hildenbrand Cc: Oscar Salvador Cc: "Kirill A. Shutemov" Cc: Alex Deucher Cc: "David S. Miller" Cc: Mark Brown Cc: Chris Wilson Cc: Christophe Leroy Cc: Nicholas Piggin Cc: Vasily Gorbik Cc: Rob Herring Cc: Masahiro Yamada Cc: "mike.travis@hpe.com" Cc: Andrew Banman Cc: Arun KS Cc: Qian Cai Cc: Mathieu Malaterre Cc: Baoquan He Cc: Logan Gunthorpe Cc: Anshuman Khandual Cc: Ard Biesheuvel Cc: Catalin Marinas Cc: Chintan Pandya Cc: Dan Williams Cc: Ingo Molnar Cc: Jonathan Cameron Cc: Joonsoo Kim Cc: Jun Yao Cc: Mark Rutland Cc: Mike Rapoport Cc: Oscar Salvador Cc: Robin Murphy Cc: Wei Yang Cc: Will Deacon Cc: Yu Zhao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm64/mm/mmu.c | 2 -- arch/ia64/mm/init.c | 2 -- arch/powerpc/mm/mem.c | 2 -- arch/s390/mm/init.c | 2 -- arch/sh/mm/init.c | 2 -- arch/x86/mm/init_32.c | 2 -- arch/x86/mm/init_64.c | 2 -- drivers/base/memory.c | 2 -- include/linux/memory.h | 2 -- include/linux/memory_hotplug.h | 2 -- mm/memory_hotplug.c | 2 -- mm/sparse.c | 6 ------ 12 files changed, 28 deletions(-) commit 1811582587c43bdf13d690d83345610d4df433bb Author: David Hildenbrand Date: Thu Jul 18 15:56:46 2019 -0700 drivers/base/memory: pass a block_id to init_memory_block() We'll rework hotplug_memory_register() shortly, so it no longer consumes pass a section. [cai@lca.pw: fix a compilation warning] Link: http://lkml.kernel.org/r/1559320186-28337-1-git-send-email-cai@lca.pw Link: http://lkml.kernel.org/r/20190527111152.16324-6-david@redhat.com Signed-off-by: David Hildenbrand Signed-off-by: Qian Cai Acked-by: Michal Hocko Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Cc: Alex Deucher Cc: Andrew Banman Cc: Andy Lutomirski Cc: Anshuman Khandual Cc: Ard Biesheuvel Cc: Arun KS Cc: Baoquan He Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Catalin Marinas Cc: Chintan Pandya Cc: Christophe Leroy Cc: Chris Wilson Cc: Dan Williams Cc: Dave Hansen Cc: "David S. Miller" Cc: Fenghua Yu Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jonathan Cameron Cc: Joonsoo Kim Cc: Jun Yao Cc: "Kirill A. Shutemov" Cc: Logan Gunthorpe Cc: Mark Brown Cc: Mark Rutland Cc: Masahiro Yamada Cc: Mathieu Malaterre Cc: Michael Ellerman Cc: Mike Rapoport Cc: "mike.travis@hpe.com" Cc: Nicholas Piggin Cc: Oscar Salvador Cc: Oscar Salvador Cc: Paul Mackerras Cc: Pavel Tatashin Cc: Peter Zijlstra Cc: Rich Felker Cc: Rob Herring Cc: Robin Murphy Cc: Thomas Gleixner Cc: Tony Luck Cc: Vasily Gorbik Cc: Wei Yang Cc: Will Deacon Cc: Yoshinori Sato Cc: Yu Zhao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/base/memory.c | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) commit 22eb634632a2359769f8a2a91a41d3c566a0a450 Author: David Hildenbrand Date: Thu Jul 18 15:56:41 2019 -0700 arm64/mm: add temporary arch_remove_memory() implementation A proper arch_remove_memory() implementation is on its way, which also cleanly removes page tables in arch_add_memory() in case something goes wrong. As we want to use arch_remove_memory() in case something goes wrong during memory hotplug after arch_add_memory() finished, let's add a temporary hack that is sufficient enough until we get a proper implementation that cleans up page table entries. We will remove CONFIG_MEMORY_HOTREMOVE around this code in follow up patches. Link: http://lkml.kernel.org/r/20190527111152.16324-5-david@redhat.com Signed-off-by: David Hildenbrand Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland Cc: Ard Biesheuvel Cc: Chintan Pandya Cc: Mike Rapoport Cc: Jun Yao Cc: Yu Zhao Cc: Robin Murphy Cc: Anshuman Khandual Cc: Alex Deucher Cc: Andrew Banman Cc: Andy Lutomirski Cc: Arun KS Cc: Baoquan He Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Christophe Leroy Cc: Chris Wilson Cc: Dan Williams Cc: Dave Hansen Cc: "David S. Miller" Cc: Fenghua Yu Cc: Greg Kroah-Hartman Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jonathan Cameron Cc: Joonsoo Kim Cc: "Kirill A. Shutemov" Cc: Logan Gunthorpe Cc: Mark Brown Cc: Masahiro Yamada Cc: Mathieu Malaterre Cc: Michael Ellerman Cc: Michal Hocko Cc: Mike Rapoport Cc: "mike.travis@hpe.com" Cc: Nicholas Piggin Cc: Oscar Salvador Cc: Oscar Salvador Cc: Paul Mackerras Cc: Pavel Tatashin Cc: Peter Zijlstra Cc: Qian Cai Cc: "Rafael J. Wysocki" Cc: Rich Felker Cc: Rob Herring Cc: Thomas Gleixner Cc: Tony Luck Cc: Vasily Gorbik Cc: Wei Yang Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm64/mm/mmu.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 18c86506c80f6b6b5e67d95bf0d6f7e665de5239 Author: David Hildenbrand Date: Thu Jul 18 15:56:35 2019 -0700 s390x/mm: implement arch_remove_memory() Will come in handy when wanting to handle errors after arch_add_memory(). Link: http://lkml.kernel.org/r/20190527111152.16324-4-david@redhat.com Signed-off-by: David Hildenbrand Cc: Heiko Carstens Cc: Michal Hocko Cc: Mike Rapoport Cc: David Hildenbrand Cc: Vasily Gorbik Cc: Oscar Salvador Cc: Alex Deucher Cc: Andrew Banman Cc: Andy Lutomirski Cc: Anshuman Khandual Cc: Ard Biesheuvel Cc: Arun KS Cc: Baoquan He Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Catalin Marinas Cc: Chintan Pandya Cc: Christophe Leroy Cc: Chris Wilson Cc: Dan Williams Cc: Dave Hansen Cc: "David S. Miller" Cc: Fenghua Yu Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jonathan Cameron Cc: Joonsoo Kim Cc: Jun Yao Cc: "Kirill A. Shutemov" Cc: Logan Gunthorpe Cc: Mark Brown Cc: Mark Rutland Cc: Masahiro Yamada Cc: Mathieu Malaterre Cc: Michael Ellerman Cc: Mike Rapoport Cc: "mike.travis@hpe.com" Cc: Nicholas Piggin Cc: Oscar Salvador Cc: Paul Mackerras Cc: Pavel Tatashin Cc: Peter Zijlstra Cc: Qian Cai Cc: "Rafael J. Wysocki" Cc: Rich Felker Cc: Rob Herring Cc: Robin Murphy Cc: Thomas Gleixner Cc: Tony Luck Cc: Wei Yang Cc: Will Deacon Cc: Yoshinori Sato Cc: Yu Zhao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/s390/mm/init.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 973de24a78493d115ec157c68fd31bc0a114134e Author: David Hildenbrand Date: Thu Jul 18 15:56:30 2019 -0700 s390x/mm: fail when an altmap is used for arch_add_memory() ZONE_DEVICE is not yet supported, fail if an altmap is passed, so we don't forget arch_add_memory()/arch_remove_memory() when unlocking support. Link: http://lkml.kernel.org/r/20190527111152.16324-3-david@redhat.com Signed-off-by: David Hildenbrand Suggested-by: Dan Williams Cc: Heiko Carstens Cc: Michal Hocko Cc: Mike Rapoport Cc: David Hildenbrand Cc: Vasily Gorbik Cc: Oscar Salvador Cc: Alex Deucher Cc: Andrew Banman Cc: Andy Lutomirski Cc: Anshuman Khandual Cc: Ard Biesheuvel Cc: Arun KS Cc: Baoquan He Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Catalin Marinas Cc: Chintan Pandya Cc: Christophe Leroy Cc: Chris Wilson Cc: Dave Hansen Cc: "David S. Miller" Cc: Fenghua Yu Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jonathan Cameron Cc: Joonsoo Kim Cc: Jun Yao Cc: "Kirill A. Shutemov" Cc: Logan Gunthorpe Cc: Mark Brown Cc: Mark Rutland Cc: Masahiro Yamada Cc: Mathieu Malaterre Cc: Michael Ellerman Cc: Mike Rapoport Cc: "mike.travis@hpe.com" Cc: Nicholas Piggin Cc: Oscar Salvador Cc: Paul Mackerras Cc: Pavel Tatashin Cc: Peter Zijlstra Cc: Qian Cai Cc: "Rafael J. Wysocki" Cc: Rich Felker Cc: Rob Herring Cc: Robin Murphy Cc: Thomas Gleixner Cc: Tony Luck Cc: Wei Yang Cc: Will Deacon Cc: Yoshinori Sato Cc: Yu Zhao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/s390/mm/init.c | 3 +++ 1 file changed, 3 insertions(+) commit cec3ebd083d4e8d161d0b18894c78e3311bcd026 Author: David Hildenbrand Date: Thu Jul 18 15:56:25 2019 -0700 mm/memory_hotplug: simplify and fix check_hotplug_memory_range() Patch series "mm/memory_hotplug: Factor out memory block devicehandling", v3. We only want memory block devices for memory to be onlined/offlined (add/remove from the buddy). This is required so user space can online/offline memory and kdump gets notified about newly onlined memory. Let's factor out creation/removal of memory block devices. This helps to further cleanup arch_add_memory/arch_remove_memory() and to make implementation of new features easier - especially sub-section memory hot add from Dan. Anshuman Khandual is currently working on arch_remove_memory(). I added a temporary solution via "arm64/mm: Add temporary arch_remove_memory() implementation", that is sufficient as a firsts tep in the context of this series. (we don't cleanup page tables in case anything goes wrong already) Did a quick sanity test with DIMM plug/unplug, making sure all devices and sysfs links properly get added/removed. Compile tested on s390x and x86-64. This patch (of 11): By converting start and size to page granularity, we actually ignore unaligned parts within a page instead of properly bailing out with an error. Link: http://lkml.kernel.org/r/20190527111152.16324-2-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Dan Williams Reviewed-by: Wei Yang Reviewed-by: Pavel Tatashin Reviewed-by: Oscar Salvador Acked-by: Michal Hocko Cc: David Hildenbrand Cc: Qian Cai Cc: Arun KS Cc: Mathieu Malaterre Cc: Alex Deucher Cc: Andrew Banman Cc: Andy Lutomirski Cc: Anshuman Khandual Cc: Ard Biesheuvel Cc: Baoquan He Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Catalin Marinas Cc: Chintan Pandya Cc: Christophe Leroy Cc: Chris Wilson Cc: Dave Hansen Cc: "David S. Miller" Cc: Fenghua Yu Cc: Greg Kroah-Hartman Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jonathan Cameron Cc: Joonsoo Kim Cc: Jun Yao Cc: "Kirill A. Shutemov" Cc: Logan Gunthorpe Cc: Mark Brown Cc: Mark Rutland Cc: Masahiro Yamada Cc: Michael Ellerman Cc: Mike Rapoport Cc: "mike.travis@hpe.com" Cc: Nicholas Piggin Cc: Paul Mackerras Cc: Peter Zijlstra Cc: "Rafael J. Wysocki" Cc: Rich Felker Cc: Rob Herring Cc: Robin Murphy Cc: Thomas Gleixner Cc: Tony Luck Cc: Vasily Gorbik Cc: Will Deacon Cc: Yoshinori Sato Cc: Yu Zhao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory_hotplug.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 7d6053097311643545a8118100175a39bd6fa637 Author: Rogan Dawes Date: Wed Jul 17 11:14:33 2019 +0200 usb: qmi_wwan: add D-Link DWM-222 A2 device ID Signed-off-by: Rogan Dawes Signed-off-by: David S. Miller drivers/net/usb/qmi_wwan.c | 1 + 1 file changed, 1 insertion(+) commit 9b3d15e6b05e0b916be5fbd915f90300a403098b Author: Michael Chan Date: Wed Jul 17 03:07:23 2019 -0400 bnxt_en: Fix VNIC accounting when enabling aRFS on 57500 chips. Unlike legacy chips, 57500 chips don't need additional VNIC resources for aRFS/ntuple. Fix the code accordingly so that we don't reserve and allocate additional VNICs on 57500 chips. Without this patch, the driver is failing to initialize when it tries to allocate extra VNICs. Fixes: ac33906c67e2 ("bnxt_en: Add support for aRFS on 57500 chips.") Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 008cfbaa3f9f84efead76d2cea12b4dd05cce67d Author: Wei Yongjun Date: Wed Jul 17 06:29:56 2019 +0000 net: dsa: sja1105: Fix missing unlock on error in sk_buff() Add the missing unlock before return from function sk_buff() in the error handling case. Fixes: f3097be21bf1 ("net: dsa: sja1105: Add a state machine for RX timestamping") Signed-off-by: Wei Yongjun Reviewed-by: Vladimir Oltean Reviewed-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/tag_sja1105.c | 1 + 1 file changed, 1 insertion(+) commit 8ec1e9006908a606b2a67c905f33ee2d3b6be5c2 Author: Chuhong Yuan Date: Wed Jul 17 10:05:11 2019 +0800 gve: replace kfree with kvfree Variables allocated by kvzalloc should not be freed by kfree. Because they may be allocated by vmalloc. So we replace kfree with kvfree here. Signed-off-by: Chuhong Yuan Signed-off-by: David S. Miller drivers/net/ethernet/google/gve/gve_main.c | 22 +++++++++++----------- drivers/net/ethernet/google/gve/gve_rx.c | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) commit 87a30e1f05d73a34e6d1895065541369131aaf1c Author: Dan Williams Date: Wed Jul 17 18:08:26 2019 -0700 driver-core, libnvdimm: Let device subsystems add local lockdep coverage For good reason, the standard device_lock() is marked lockdep_set_novalidate_class() because there is simply no sane way to describe the myriad ways the device_lock() ordered with other locks. However, that leaves subsystems that know their own local device_lock() ordering rules to find lock ordering mistakes manually. Instead, introduce an optional / additional lockdep-enabled lock that a subsystem can acquire in all the same paths that the device_lock() is acquired. A conversion of the NFIT driver and NVDIMM subsystem to a lockdep-validate device_lock() scheme is included. The debug_nvdimm_lock() implementation implements the correct lock-class and stacking order for the libnvdimm device topology hierarchy. Yes, this is a hack, but hopefully it is a useful hack for other subsystems device_lock() debug sessions. Quoting Greg: "Yeah, it feels a bit hacky but it's really up to a subsystem to mess up using it as much as anything else, so user beware :) I don't object to it if it makes things easier for you to debug." Cc: Ingo Molnar Cc: Ira Weiny Cc: Will Deacon Cc: Dave Jiang Cc: Keith Busch Cc: Peter Zijlstra Cc: Vishal Verma Cc: "Rafael J. Wysocki" Cc: Greg Kroah-Hartman Signed-off-by: Dan Williams Acked-by: Greg Kroah-Hartman Reviewed-by: Ira Weiny Link: https://lore.kernel.org/r/156341210661.292348.7014034644265455704.stgit@dwillia2-desk3.amr.corp.intel.com drivers/acpi/nfit/core.c | 28 ++++++++--------- drivers/acpi/nfit/nfit.h | 24 +++++++++++++++ drivers/base/core.c | 3 ++ drivers/nvdimm/btt_devs.c | 16 +++++----- drivers/nvdimm/bus.c | 28 ++++++++++------- drivers/nvdimm/core.c | 10 +++--- drivers/nvdimm/dimm_devs.c | 4 +-- drivers/nvdimm/namespace_devs.c | 36 +++++++++++----------- drivers/nvdimm/nd-core.h | 68 +++++++++++++++++++++++++++++++++++++++++ drivers/nvdimm/pfn_devs.c | 24 +++++++-------- drivers/nvdimm/pmem.c | 4 +-- drivers/nvdimm/region.c | 2 +- drivers/nvdimm/region_devs.c | 16 +++++----- include/linux/device.h | 5 +++ 14 files changed, 187 insertions(+), 81 deletions(-) commit ca6bf264f6d856f959c4239cda1047b587745c67 Author: Dan Williams Date: Wed Jul 17 18:08:21 2019 -0700 libnvdimm/bus: Fix wait_nvdimm_bus_probe_idle() ABBA deadlock A multithreaded namespace creation/destruction stress test currently deadlocks with the following lockup signature: INFO: task ndctl:2924 blocked for more than 122 seconds. Tainted: G OE 5.2.0-rc4+ #3382 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. ndctl D 0 2924 1176 0x00000000 Call Trace: ? __schedule+0x27e/0x780 schedule+0x30/0xb0 wait_nvdimm_bus_probe_idle+0x8a/0xd0 [libnvdimm] ? finish_wait+0x80/0x80 uuid_store+0xe6/0x2e0 [libnvdimm] kernfs_fop_write+0xf0/0x1a0 vfs_write+0xb7/0x1b0 ksys_write+0x5c/0xd0 do_syscall_64+0x60/0x240 INFO: task ndctl:2923 blocked for more than 122 seconds. Tainted: G OE 5.2.0-rc4+ #3382 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. ndctl D 0 2923 1175 0x00000000 Call Trace: ? __schedule+0x27e/0x780 ? __mutex_lock+0x489/0x910 schedule+0x30/0xb0 schedule_preempt_disabled+0x11/0x20 __mutex_lock+0x48e/0x910 ? nvdimm_namespace_common_probe+0x95/0x4d0 [libnvdimm] ? __lock_acquire+0x23f/0x1710 ? nvdimm_namespace_common_probe+0x95/0x4d0 [libnvdimm] nvdimm_namespace_common_probe+0x95/0x4d0 [libnvdimm] __dax_pmem_probe+0x5e/0x210 [dax_pmem_core] ? nvdimm_bus_probe+0x1d0/0x2c0 [libnvdimm] dax_pmem_probe+0xc/0x20 [dax_pmem] nvdimm_bus_probe+0x90/0x2c0 [libnvdimm] really_probe+0xef/0x390 driver_probe_device+0xb4/0x100 In this sequence an 'nd_dax' device is being probed and trying to take the lock on its backing namespace to validate that the 'nd_dax' device indeed has exclusive access to the backing namespace. Meanwhile, another thread is trying to update the uuid property of that same backing namespace. So one thread is in the probe path trying to acquire the lock, and the other thread has acquired the lock and tries to flush the probe path. Fix this deadlock by not holding the namespace device_lock over the wait_nvdimm_bus_probe_idle() synchronization step. In turn this requires the device_lock to be held on entry to wait_nvdimm_bus_probe_idle() and subsequently dropped internally to wait_nvdimm_bus_probe_idle(). Cc: Fixes: bf9bccc14c05 ("libnvdimm: pmem label sets and namespace instantiation") Cc: Vishal Verma Tested-by: Jane Chu Link: https://lore.kernel.org/r/156341210094.292348.2384694131126767789.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams drivers/nvdimm/bus.c | 14 +++++++++----- drivers/nvdimm/region_devs.c | 4 ++++ 2 files changed, 13 insertions(+), 5 deletions(-) commit b70d31d054ee3a6fc1034b9d7fc0ae1e481aa018 Author: Dan Williams Date: Wed Jul 17 18:08:15 2019 -0700 libnvdimm/bus: Stop holding nvdimm_bus_list_mutex over __nd_ioctl() In preparation for fixing a deadlock between wait_for_bus_probe_idle() and the nvdimm_bus_list_mutex arrange for __nd_ioctl() without nvdimm_bus_list_mutex held. This also unifies the 'dimm' and 'bus' level ioctls into a common nd_ioctl() preamble implementation. Marked for -stable as it is a pre-requisite for a follow-on fix. Cc: Fixes: bf9bccc14c05 ("libnvdimm: pmem label sets and namespace instantiation") Cc: Vishal Verma Tested-by: Jane Chu Link: https://lore.kernel.org/r/156341209518.292348.7183897251740665198.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams drivers/nvdimm/bus.c | 96 +++++++++++++++++++++++++++++------------------- drivers/nvdimm/nd-core.h | 3 +- 2 files changed, 60 insertions(+), 39 deletions(-) commit 6de5d06e657acdbcf9637dac37916a4a5309e0f4 Author: Dan Williams Date: Wed Jul 17 18:08:09 2019 -0700 libnvdimm/bus: Prepare the nd_ioctl() path to be re-entrant In preparation for not holding a lock over the execution of nd_ioctl(), update the implementation to allow multiple threads to be attempting ioctls at the same time. The bus lock still prevents multiple in-flight ->ndctl() invocations from corrupting each other's state, but static global staging buffers are moved to the heap. Reported-by: Vishal Verma Reviewed-by: Vishal Verma Tested-by: Vishal Verma Link: https://lore.kernel.org/r/156341208947.292348.10560140326807607481.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams drivers/nvdimm/bus.c | 59 ++++++++++++++++++++++++++++++++-------------------- 1 file changed, 37 insertions(+), 22 deletions(-) commit 700cd033a82d466ad8f9615f9985525e45f8960a Author: Dan Williams Date: Wed Jul 17 18:08:03 2019 -0700 libnvdimm/region: Register badblocks before namespaces Namespace activation expects to be able to reference region badblocks. The following warning sometimes triggers when asynchronous namespace activation races in front of the completion of namespace probing. Move all possible namespace probing after region badblocks initialization. Otherwise, lockdep sometimes catches the uninitialized state of the badblocks seqlock with stack trace signatures like: INFO: trying to register non-static key. pmem2: detected capacity change from 0 to 136365211648 the code is fine but needs lockdep annotation. turning off the locking correctness validator. CPU: 9 PID: 358 Comm: kworker/u80:5 Tainted: G OE 5.2.0-rc4+ #3382 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 0.0.0 02/06/2015 Workqueue: events_unbound async_run_entry_fn Call Trace: dump_stack+0x85/0xc0 pmem1.12: detected capacity change from 0 to 8589934592 register_lock_class+0x56a/0x570 ? check_object+0x140/0x270 __lock_acquire+0x80/0x1710 ? __mutex_lock+0x39d/0x910 lock_acquire+0x9e/0x180 ? nd_pfn_validate+0x28f/0x440 [libnvdimm] badblocks_check+0x93/0x1f0 ? nd_pfn_validate+0x28f/0x440 [libnvdimm] nd_pfn_validate+0x28f/0x440 [libnvdimm] ? lockdep_hardirqs_on+0xf0/0x180 nd_dax_probe+0x9a/0x120 [libnvdimm] nd_pmem_probe+0x6d/0x180 [nd_pmem] nvdimm_bus_probe+0x90/0x2c0 [libnvdimm] Fixes: 48af2f7e52f4 ("libnvdimm, pfn: during init, clear errors...") Cc: Cc: Vishal Verma Reviewed-by: Vishal Verma Link: https://lore.kernel.org/r/156341208365.292348.1547528796026249120.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams drivers/nvdimm/region.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 8aac0e2338916e273ccbd438a2b7a1e8c61749f5 Author: Dan Williams Date: Wed Jul 17 18:07:58 2019 -0700 libnvdimm/bus: Prevent duplicate device_unregister() calls A multithreaded namespace creation/destruction stress test currently fails with signatures like the following: sysfs group 'power' not found for kobject 'dax1.1' RIP: 0010:sysfs_remove_group+0x76/0x80 Call Trace: device_del+0x73/0x370 device_unregister+0x16/0x50 nd_async_device_unregister+0x1e/0x30 [libnvdimm] async_run_entry_fn+0x39/0x160 process_one_work+0x23c/0x5e0 worker_thread+0x3c/0x390 BUG: kernel NULL pointer dereference, address: 0000000000000020 RIP: 0010:klist_put+0x1b/0x6c Call Trace: klist_del+0xe/0x10 device_del+0x8a/0x2c9 ? __switch_to_asm+0x34/0x70 ? __switch_to_asm+0x40/0x70 device_unregister+0x44/0x4f nd_async_device_unregister+0x22/0x2d [libnvdimm] async_run_entry_fn+0x47/0x15a process_one_work+0x1a2/0x2eb worker_thread+0x1b8/0x26e Use the kill_device() helper to atomically resolve the race of multiple threads issuing kill, device_unregister(), requests. Reported-by: Jane Chu Reported-by: Erwin Tsaur Fixes: 4d88a97aa9e8 ("libnvdimm, nvdimm: dimm driver and base libnvdimm device-driver...") Cc: Link: https://github.com/pmem/ndctl/issues/96 Tested-by: Tested-by: Jane Chu Link: https://lore.kernel.org/r/156341207846.292348.10435719262819764054.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams drivers/nvdimm/bus.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 00289cd87676e14913d2d8492d1ce05c4baafdae Author: Dan Williams Date: Wed Jul 17 18:07:53 2019 -0700 drivers/base: Introduce kill_device() The libnvdimm subsystem arranges for devices to be destroyed as a result of a sysfs operation. Since device_unregister() cannot be called from an actively running sysfs attribute of the same device libnvdimm arranges for device_unregister() to be performed in an out-of-line async context. The driver core maintains a 'dead' state for coordinating its own racing async registration / de-registration requests. Rather than add local 'dead' state tracking infrastructure to libnvdimm device objects, export the existing state tracking via a new kill_device() helper. The kill_device() helper simply marks the device as dead, i.e. that it is on its way to device_del(), or returns that the device was already dead. This can be used in advance of calling device_unregister() for subsystems like libnvdimm that might need to handle multiple user threads racing to delete a device. This refactoring does not change any behavior, but it is a pre-requisite for follow-on fixes and therefore marked for -stable. Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Fixes: 4d88a97aa9e8 ("libnvdimm, nvdimm: dimm driver and base libnvdimm device-driver...") Cc: Tested-by: Jane Chu Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/156341207332.292348.14959761496009347574.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams drivers/base/core.c | 27 +++++++++++++++++++-------- include/linux/device.h | 1 + 2 files changed, 20 insertions(+), 8 deletions(-) commit 2a957ace44d4cf0f6194a4209d4fa67ee5461d8f Author: Steve French Date: Mon Jul 1 16:25:46 2019 -0500 cifs: update internal module number To 2.21 Signed-off-by: Steve French fs/cifs/cifsfs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aa081859b10c5d8b19f5c525c78883a59d73c2b8 Author: Ronnie Sahlberg Date: Fri Jul 19 08:12:11 2019 +1000 cifs: flush before set-info if we have writeable handles Servers can defer destaging any data and updating the mtime until close(). This means that if we do a setinfo to modify the mtime while other handles are open for write the server may overwrite our setinfo timestamps when if flushes the file on close() of the writeable handle. To solve this we add an explicit flush when the mtime is about to be updated. This fixes "cp -p" to preserve mtime when copying a file onto an SMB2 share. CC: Stable Signed-off-by: Ronnie Sahlberg Reviewed-by: Pavel Shilovsky Signed-off-by: Steve French fs/cifs/inode.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 89a5bfa350faf87156acda4d7c457808bfecaa0e Author: Steve French Date: Thu Jul 18 17:22:18 2019 -0500 smb3: optimize open to not send query file internal info We can cut one third of the traffic on open by not querying the inode number explicitly via SMB3 query_info since it is now returned on open in the qfid context. This is better in multiple ways, and speeds up file open about 10% (more if network is slow). Reviewed-by: Pavel Shilovsky Signed-off-by: Steve French fs/cifs/smb2file.c | 18 ++++++++++++------ fs/cifs/smb2ops.c | 7 ++++--- fs/cifs/smb2pdu.c | 46 +++++++++++++++++++++++++++++++++------------- fs/cifs/smb2pdu.h | 4 +++- fs/cifs/smb2proto.h | 7 ++++--- 5 files changed, 56 insertions(+), 26 deletions(-) commit 3bfe1fc46794631366faa3ef075e1b0ff7ba120a Merge: 6860c981b967 733232f8c852 Author: Linus Torvalds Date: Thu Jul 18 14:49:33 2019 -0700 Merge tag 'for-5.3/dm-changes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull more device mapper updates from Mike Snitzer: - Fix zone state management race in DM zoned target by eliminating the unnecessary DMZ_ACTIVE state. - A couple fixes for issues the DM snapshot target's optional discard support added during first week of the 5.3 merge. - Increase default size of outstanding IO that is allowed for a each dm-kcopyd client and introduce tunable to allow user adjust. - Update DM core to use printk ratelimiting functions rather than duplicate them and in doing so fix an issue where DMDEBUG_LIMIT() rate limited KERN_DEBUG messages had excessive "callbacks suppressed" messages. * tag 'for-5.3/dm-changes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm: use printk ratelimiting functions dm kcopyd: Increase default sub-job size to 512KB dm snapshot: fix oversights in optional discard support dm zoned: fix zone state management race commit 2a15d6481741a418837a22df3a440d5bd8b9c412 Author: Paul Burton Date: Wed Jul 17 20:12:23 2019 +0000 MIPS: Annotate fall-through in Cavium Octeon code There's an intentional switch case fall-through in Cavium Octeon USB code, which triggers compile errors with -Wimplicit-fallthrough due to -Werror being enabled for arch/mips. This can be encountered when building cavium_octeon_defconfig. Fix the build issue by annotating the intentional fall-through. Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org arch/mips/cavium-octeon/octeon-usb.c | 1 + 1 file changed, 1 insertion(+) commit 5bbe54346b539b5938b65d542b6ff5e956c3c08d Author: Paul Burton Date: Wed Jul 17 19:49:10 2019 +0000 MIPS: Annotate fall-through in kvm/emulate.c kvm_compute_return_epc contains a switch statement with an intentional fall-through from a case handling jal (jump and link) instructions to one handling j (jump) instructions. With -Wimplicit-fallthrough this triggers a compile error (due to -Werror being enabled for arch/mips). This can be reproduced using malta_kvm_defconfig. Fix this by annotating the intentional fall-through. Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org arch/mips/kvm/emulate.c | 1 + 1 file changed, 1 insertion(+) commit b8bea8a5e5d942e62203416ab41edecaed4fda02 Author: Vladimir Kondratiev Date: Tue Jul 16 10:36:56 2019 +0300 mips: fix cacheinfo Because CONFIG_OF defined for MIPS, cacheinfo attempts to fill information from DT, ignoring data filled by architecture routine. This leads to error reported cacheinfo: Unable to detect cache hierarchy for CPU 0 Way to fix this provided in commit fac51482577d ("drivers: base: cacheinfo: fix x86 with CONFIG_OF enabled") Utilize same mechanism to report that cacheinfo set by architecture specific function Signed-off-by: Vladimir Kondratiev Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org arch/mips/kernel/cacheinfo.c | 2 ++ 1 file changed, 2 insertions(+) commit a07e3324538a989b7cdbf2c679be6a7f9df2544f Author: Thomas Bogendoerfer Date: Mon May 13 13:47:25 2019 +0200 MIPS: kernel: only use i8253 clocksource with periodic clockevent i8253 clocksource needs a free running timer. This could only be used, if i8253 clockevent is set up as periodic. Signed-off-by: Thomas Bogendoerfer Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org arch/mips/kernel/i8253.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6860c981b9672324cb53b883cfda8d2ea1445ff1 Merge: 0570bc8b7c9b d5b9216fd511 Author: Linus Torvalds Date: Thu Jul 18 14:32:33 2019 -0700 Merge tag 'nfs-for-5.3-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs Pull NFS client updates from Trond Myklebust: "Highlights include: Stable fixes: - SUNRPC: Ensure bvecs are re-synced when we re-encode the RPC request - Fix an Oops in ff_layout_track_ds_error due to a PTR_ERR() dereference - Revert buggy NFS readdirplus optimisation - NFSv4: Handle the special Linux file open access mode - pnfs: Fix a problem where we gratuitously start doing I/O through the MDS Features: - Allow NFS client to set up multiple TCP connections to the server using a new 'nconnect=X' mount option. Queue length is used to balance load. - Enhance statistics reporting to report on all transports when using multiple connections. - Speed up SUNRPC by removing bh-safe spinlocks - Add a mechanism to allow NFSv4 to request that containers set a unique per-host identifier for when the hostname is not set. - Ensure NFSv4 updates the lease_time after a clientid update Bugfixes and cleanup: - Fix use-after-free in rpcrdma_post_recvs - Fix a memory leak when nfs_match_client() is interrupted - Fix buggy file access checking in NFSv4 open for execute - disable unsupported client side deduplication - Fix spurious client disconnections - Fix occasional RDMA transport deadlock - Various RDMA cleanups - Various tracepoint fixes - Fix the TCP callback channel to guarantee the server can actually send the number of callback requests that was negotiated at mount time" * tag 'nfs-for-5.3-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (68 commits) pnfs/flexfiles: Add tracepoints for detecting pnfs fallback to MDS pnfs: Fix a problem where we gratuitously start doing I/O through the MDS SUNRPC: Optimise transport balancing code SUNRPC: Ensure the bvecs are reset when we re-encode the RPC request pnfs/flexfiles: Fix PTR_ERR() dereferences in ff_layout_track_ds_error NFSv4: Don't use the zero stateid with layoutget SUNRPC: Fix up backchannel slot table accounting SUNRPC: Fix initialisation of struct rpc_xprt_switch SUNRPC: Skip zero-refcount transports SUNRPC: Replace division by multiplication in calculation of queue length NFSv4: Validate the stateid before applying it to state recovery nfs4.0: Refetch lease_time after clientid update nfs4: Rename nfs41_setup_state_renewal nfs4: Make nfs4_proc_get_lease_time available for nfs4.0 nfs: Fix copy-and-paste error in debug message NFS: Replace 16 seq_printf() calls by seq_puts() NFS: Use seq_putc() in nfs_show_stats() Revert "NFS: readdirplus optimization by cache mechanism" (memleak) SUNRPC: Fix transport accounting when caller specifies an rpc_xprt NFS: Record task, client ID, and XID in xdr_status trace points ... commit a50a3f4b6a313dc76912bd4ad3b8b4f4b479c801 Author: Thomas Gleixner Date: Wed Jul 17 22:01:49 2019 +0200 sched/rt, Kconfig: Introduce CONFIG_PREEMPT_RT Add a new entry to the preemption menu which enables the real-time support for the kernel. The choice is only enabled when an architecture supports it. It selects PREEMPT as the RT features depend on it. To achieve that the existing PREEMPT choice is renamed to PREEMPT_LL which select PREEMPT as well. No functional change. Signed-off-by: Thomas Gleixner Acked-by: Paul E. McKenney Acked-by: Steven Rostedt (VMware) Acked-by: Clark Williams Acked-by: Daniel Bristot de Oliveira Acked-by: Frederic Weisbecker Acked-by: Peter Zijlstra (Intel) Acked-by: Marc Zyngier Acked-by: Daniel Wagner Acked-by: Luis Claudio R. Goncalves Acked-by: Julia Cartwright Acked-by: Tom Zanussi Acked-by: Gratian Crisan Acked-by: Sebastian Siewior Cc: Andrew Morton Cc: Christoph Hellwig Cc: Greg Kroah-Hartman Cc: Linus Torvalds Cc: Lukas Bulwahn Cc: Mike Galbraith Cc: Tejun Heo Link: http://lkml.kernel.org/r/alpine.DEB.2.21.1907172200190.1778@nanos.tec.linutronix.de Signed-off-by: Ingo Molnar arch/Kconfig | 3 +++ kernel/Kconfig.preempt | 25 +++++++++++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) commit bb745231678cd92ab0c4d37343b06e4879072368 Merge: 7369c10f8117 59fd3486c3dd Author: David S. Miller Date: Thu Jul 18 14:04:45 2019 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Alexei Starovoitov says: ==================== pull-request: bpf 2019-07-18 The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) verifier precision propagation fix, from Andrii. 2) BTF size fix for typedefs, from Andrii. 3) a bunch of big endian fixes, from Ilya. 4) wide load from bpf_sock_addr fixes, from Stanislav. 5) a bunch of misc fixes from a number of developers. ==================== Signed-off-by: David S. Miller commit 59fd3486c3dd5678bc2fcac75e14466775465c3e Author: Ilya Leoshkevich Date: Wed Jul 17 14:26:20 2019 +0200 selftests/bpf: fix test_xdp_noinline on s390 test_xdp_noinline fails on s390 due to a handful of endianness issues. Use ntohs for parsing eth_proto. Replace bswaps with ntohs/htons. Signed-off-by: Ilya Leoshkevich Acked-by: Vasily Gorbik Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/progs/test_xdp_noinline.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 01a0f9e4496d9f54e06abb71bf9f56c617ef8c24 Author: Ilya Leoshkevich Date: Thu Jul 18 11:13:35 2019 +0200 selftests/bpf: fix "valid read map access into a read-only array 1" on s390 This test looks up a 32-bit map element and then loads it using a 64-bit load. This does not work on s390, which is a big-endian machine. Since the point of this test doesn't seem to be loading a smaller value using a larger load, simply use a 32-bit load. Signed-off-by: Ilya Leoshkevich Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/verifier/array_access.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d5b9216fd5114be4ed98ca9c1ecc5f164cd8cf5e Author: Trond Myklebust Date: Thu Jul 18 09:32:17 2019 -0400 pnfs/flexfiles: Add tracepoints for detecting pnfs fallback to MDS Add tracepoints to allow debugging of the event chain leading to a pnfs fallback to doing I/O through the MDS. Signed-off-by: Trond Myklebust fs/nfs/flexfilelayout/flexfilelayout.c | 26 ++++++++++++ fs/nfs/nfs4trace.c | 8 ++++ fs/nfs/nfs4trace.h | 76 +++++++++++++++++++++++++++++++++- fs/nfs/pnfs.c | 2 + include/linux/nfs4.h | 1 + 5 files changed, 112 insertions(+), 1 deletion(-) commit 8c5477e8046ca139bac250386c08453da37ec1ae Author: Zhenzhong Duan Date: Tue Jul 16 21:18:12 2019 +0800 x86, boot: Remove multiple copy of static function sanitize_boot_params() Kernel build warns: 'sanitize_boot_params' defined but not used [-Wunused-function] at below files: arch/x86/boot/compressed/cmdline.c arch/x86/boot/compressed/error.c arch/x86/boot/compressed/early_serial_console.c arch/x86/boot/compressed/acpi.c That's becausethey each include misc.h which includes a definition of sanitize_boot_params() via bootparam_utils.h. Remove the inclusion from misc.h and have the c file including bootparam_utils.h directly. Signed-off-by: Zhenzhong Duan Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/1563283092-1189-1-git-send-email-zhenzhong.duan@oracle.com arch/x86/boot/compressed/misc.c | 1 + arch/x86/boot/compressed/misc.h | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) commit 449f328637e3ca62461da04d60ccb35aa5aa21dc Author: Zhenzhong Duan Date: Tue Jul 16 21:17:20 2019 +0800 x86/boot/compressed/64: Remove unused variable Fix gcc warning: arch/x86/boot/compressed/pgtable_64.c: In function 'find_trampoline_placement': arch/x86/boot/compressed/pgtable_64.c:43:16: warning: unused variable 'trampoline_start' [-Wunused-variable] unsigned long trampoline_start; ^ Signed-off-by: Zhenzhong Duan Signed-off-by: Thomas Gleixner Acked-by: Kirill A. Shutemov Link: https://lkml.kernel.org/r/1563283040-31101-1-git-send-email-zhenzhong.duan@oracle.com arch/x86/boot/compressed/pgtable_64.c | 1 - 1 file changed, 1 deletion(-) commit cd6697b8b8751b65abd7859af55cf06f36b8e716 Author: Zhenzhong Duan Date: Tue Jul 16 21:15:57 2019 +0800 x86/boot/efi: Remove unused variables Fix gcc warnings: arch/x86/boot/compressed/eboot.c: In function 'make_boot_params': arch/x86/boot/compressed/eboot.c:394:6: warning: unused variable 'i' [-Wunused-variable] int i; ^ arch/x86/boot/compressed/eboot.c:393:6: warning: unused variable 's1' [-Wunused-variable] u8 *s1; ^ arch/x86/boot/compressed/eboot.c:392:7: warning: unused variable 's2' [-Wunused-variable] u16 *s2; ^ arch/x86/boot/compressed/eboot.c:387:8: warning: unused variable 'options' [-Wunused-variable] void *options, *handle; ^ arch/x86/boot/compressed/eboot.c: In function 'add_e820ext': arch/x86/boot/compressed/eboot.c:498:16: warning: unused variable 'size' [-Wunused-variable] unsigned long size; ^ arch/x86/boot/compressed/eboot.c:497:15: warning: unused variable 'status' [-Wunused-variable] efi_status_t status; ^ arch/x86/boot/compressed/eboot.c: In function 'exit_boot_func': arch/x86/boot/compressed/eboot.c:681:15: warning: unused variable 'status' [-Wunused-variable] efi_status_t status; ^ arch/x86/boot/compressed/eboot.c:680:8: warning: unused variable 'nr_desc' [-Wunused-variable] __u32 nr_desc; ^ arch/x86/boot/compressed/eboot.c: In function 'efi_main': arch/x86/boot/compressed/eboot.c:750:22: warning: unused variable 'image' [-Wunused-variable] efi_loaded_image_t *image; ^ Signed-off-by: Zhenzhong Duan Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/1563282957-26898-1-git-send-email-zhenzhong.duan@oracle.com arch/x86/boot/compressed/eboot.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit 58bbeab425c6c5e318f5b6ae31d351331ddfb34b Author: Trond Myklebust Date: Thu Jul 18 15:33:42 2019 -0400 pnfs: Fix a problem where we gratuitously start doing I/O through the MDS If the client has to stop in pnfs_update_layout() to wait for another layoutget to complete, it currently exits and defaults to I/O through the MDS if the layoutget was successful. Fixes: d03360aaf5cc ("pNFS: Ensure we return the error if someone kills...") Signed-off-by: Trond Myklebust Cc: stable@vger.kernel.org # v4.20+ fs/nfs/pnfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0570bc8b7c9b41deba6f61ac218922e7168ad648 Merge: 0e2a5b5bd9a6 2d69fbf3d01a Author: Linus Torvalds Date: Thu Jul 18 12:26:59 2019 -0700 Merge tag 'riscv/for-v5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V updates from Paul Walmsley: - Hugepage support - "Image" header support for RISC-V kernel binaries, compatible with the current ARM64 "Image" header - Initial page table setup now split into two stages - CONFIG_SOC support (starting with SiFive SoCs) - Avoid reserving memory between RAM start and the kernel in setup_bootmem() - Enable high-res timers and dynamic tick in the RV64 defconfig - Remove long-deprecated gate area stubs - MAINTAINERS updates to switch to the newly-created shared RISC-V git tree, and to fix a get_maintainers.pl issue for patches involving SiFive E-mail addresses Also, one integration fix to resolve a build problem introduced during in the v5.3-rc1 merge window: - Fix build break after macro-to-function conversion in asm-generic/cacheflush.h * tag 'riscv/for-v5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: fix build break after macro-to-function conversion in generic cacheflush.h RISC-V: Add an Image header that boot loader can parse. RISC-V: Setup initial page tables in two stages riscv: remove free_initrd_mem riscv: ccache: Remove unused variable riscv: Introduce huge page support for 32/64bit kernel x86, arm64: Move ARCH_WANT_HUGE_PMD_SHARE config in arch/Kconfig RISC-V: Fix memory reservation in setup_bootmem() riscv: defconfig: enable SOC_SIFIVE riscv: select SiFive platform drivers with SOC_SIFIVE arch: riscv: add config option for building SiFive's SoC resource riscv: Remove gate area stubs MAINTAINERS: change the arch/riscv git tree to the new shared tree MAINTAINERS: don't automatically patches involving SiFive to the linux-riscv list RISC-V: defconfig: Enable NO_HZ_IDLE and HIGH_RES_TIMERS commit 0e2a5b5bd9a6aaec85df347dd71432a1d2d10763 Merge: da0acd7c656c 45800fb45139 Author: Linus Torvalds Date: Thu Jul 18 12:23:45 2019 -0700 Merge branch 'parisc-5.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc fixes from Helge Deller: - Prevent kernel panics by adding proper checking of register values injected via the ptrace interface - Wire up the new clone3 syscall * 'parisc-5.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Wire up clone3 syscall parisc: Avoid kernel panic triggered by invalid kprobe parisc: Ensure userspace privilege for ptraced processes in regset functions parisc: Fix kernel panic due invalid values in IAOQ0 or IAOQ1 commit b70666934b41c081489d5ff3c5bf017796545d35 Author: Dale Zhao Date: Wed Jul 10 17:36:53 2019 +0800 drm/amd/display: handle active dongle port type is DP++ or DP case [Why]: Some active dongles have DP++ port and DP port at the same time. Current code doesn't cover DP++ case and processes as default DVI case, in which audio is disabled. Because of dual mode, DP case is also treat as DVI case for the other port. [How]: According DP 1.4 spec, add DP++ procedure similar with HDMI case. Also add None dongle type for DP case. Signed-off-by: Dale Zhao Reviewed-by: Wenjing Liu Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 30 ++++++++++++++++-------- drivers/gpu/drm/amd/display/include/dpcd_defs.h | 2 +- 2 files changed, 21 insertions(+), 11 deletions(-) commit b791f9dc2de4f9e66aae28451d1284d054542614 Author: Eric Yang Date: Sat Jun 29 14:38:04 2019 -0400 drm/amd/display: do not read link setting if edp not connected [Why] Previously assume eDP sink present if connector present. Do not need to enforce this restriction. Fix issue where driver attempt to read link setting even though no edp connected. {How] Only read link setting after reading connection status. Signed-off-by: Eric Yang Reviewed-by: Yongqiang Sun Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 7352193a33dfc9b69ba3bf6a8caea925b96243b1 Author: Tai Man Date: Fri Jun 28 11:40:38 2019 -0400 drm/amd/display: Increase size of audios array [Why] The audios array defined in "struct resource_pool" is only 6 (MAX_PIPES) but the max number of audio devices (num_audio) is 7. In some projects, it will run out of audios array. [How] Incraese the audios array size to 7. Signed-off-by: Tai Man Reviewed-by: Joshua Aberback Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/inc/core_types.h | 2 +- drivers/gpu/drm/amd/display/dc/inc/hw/hw_shared.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit 58caae27df41d2ef3b1ae3bd06284da5b85ac288 Author: Zhan Liu Date: Tue Jul 2 15:17:07 2019 -0400 drm/amd/display: drop ASSERT() if eDP panel is not connected [Why] For boards that support eDP but do not have a physical eDP display connected an ASSERT will be thrown. This is not a critical failure and shouldn't be treated as such. [How] Drop the assertion. Signed-off-by: Zhan Liu Reviewed-by: Nicholas Kazlauskas Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 2 -- 1 file changed, 2 deletions(-) commit 6ac25e6d5b2fbf251e9fa2f4131d42c815b43867 Author: Alvin Lee Date: Thu Jul 4 15:17:42 2019 -0400 drm/amd/display: Only enable audio if speaker allocation exists [Why] In dm_helpers_parse_edid_caps, there is a corner case where no speakers can be allocated even though the audio mode count is greater than 0. Enabling audio when no speaker allocations exists can cause issues in the video stream. [How] Add a check to not enable audio unless one or more speaker allocations exist (since doing this can cause issues in the video stream). Signed-off-by: Alvin Lee Reviewed-by: Jun Lei Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0905f32977268149f06e3ce6ea4bd6d374dd891f Author: Julian Parkin Date: Tue Jun 25 14:55:53 2019 -0400 drm/amd/display: Fix dc_create failure handling and 666 color depths [Why] It is possible (but very unlikely) that constructing dc fails before current_state is created. We support 666 color depth in some scenarios, but this isn't handled in get_norm_pix_clk. It uses exactly the same pixel clock as the 888 case. [How] Check for non null current_state before destructing. Add case for 666 color depth to get_norm_pix_clk to avoid assertion. Signed-off-by: Julian Parkin Reviewed-by: Charlene Liu Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 6 ++++-- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) commit 67fd6c0d2de8e51e84ff3fa6e68bbd524f823e49 Author: Derek Lai Date: Tue Jul 2 17:50:41 2019 +0800 drm/amd/display: allocate 4 ddc engines for RV2 [Why] Driver will create 0, 1, and 2 ddc engines for RV2, but some platforms used 0, 1, and 3. [How] Still allocate 4 ddc engines for RV2. Signed-off-by: Derek Lai Reviewed-by: Aric Cyr Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit feb7eb522e0a7a22c1e60d386bd3c3bfa1d5e4f7 Author: Eric Yang Date: Mon Jun 24 18:18:58 2019 -0400 drm/amd/display: put back front end initialization sequence [Why] Seamless boot optimization removed proper front end power off sequence. In driver disable enable case, this causes driver to power gate hubp and dpp while there is still memory fetching going on, this can cause invalid memory requests to be generated which will hang data fabric. [How] Put back proper front end power off sequence Signed-off-by: Eric Yang Reviewed-by: Anthony Koo Acked-by: Leo Li Acked-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) commit 39fee5f60ce069cfba55fc3a8ba55faacae330b9 Author: Alvin Lee Date: Mon Jun 24 09:49:44 2019 -0400 drm/amd/display: Wait for flip to complete [why] In pipe split issue occurs when we program immediate flip while vsync flip is pending [how] Don't program immediate flip until flip is no longer pending Signed-off-by: Alvin Lee Reviewed-by: Jaehyun Chung Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 09fc26c1718fe7a552866d4eda84e2cc5f9c9c78 Author: Fatemeh Darbehani Date: Fri Jun 21 17:44:50 2019 -0400 drm/amd/display: Change min_h_sync_width from 8 to 4 [Why] Some display's hsync width is lower than the minimum dcn20 is set to support right now. This will cause optc1_validate_timing to fail which eventually will result in wrong set mode. This was set to 8 as per HW team's request for no valid reason. [How] Changing min_h_sync_width to 4 will let us validate timing for preffered mode and light up the headset. This change was made to Vega 10 before for a similar issue. Signed-off-by: Fatemeh Darbehani Reviewed-by: Joshua Aberback Acked-by: Aric Cyr Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_optc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 74eda776d7a4e69ec7aa1ce30a87636f14220fbb Author: Tai Man Date: Fri Jun 7 17:32:27 2019 -0400 drm/amd/display: use encoder's engine id to find matched free audio device [Why] On some platforms, the encoder id 3 is not populated. So the encoders are not stored in right order as index (id: 0, 1, 2, 4, 5) at pool. This would cause encoders id 4 & id 5 to fail when finding corresponding audio device, defaulting to the first available audio device. As result, we cannot stream audio into two DP ports with encoders id 4 & id 5. [How] It need to create enough audio device objects (0 - 5) to perform matching. Then use encoder engine id to find matched audio device. Signed-off-by: Tai Man Reviewed-by: Charlene Liu Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 1ca068ed34d6b39d336c1b0d618ed73ba8f04548 Author: Zi Yu Liao Date: Thu Jun 20 10:55:26 2019 -0400 drm/amd/display: fix DMCU hang when going into Modern Standby [why] When the system is going into suspend, set_backlight gets called after the eDP got blanked. Since smooth brightness is enabled, the driver will make a call into the DMCU to ramp the brightness. The DMCU would try to enable ABM to do so. But since the display is blanked, this ends up causing ABM1_ACE_DBUF_REG_UPDATE_PENDING to get stuck at 1, which results in a dead lock in the DMCU firmware. [how] Disable brightness ramping when the eDP display is blanked. Signed-off-by: Zi Yu Liao Reviewed-by: Eric Yang Acked-by: Anthony Koo Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 19f876967a98db63fbfca7e0d9f55099f52189e0 Author: Alvin Lee Date: Thu Jun 20 13:03:25 2019 -0400 drm/amd/display: Disable Audio on reinitialize hardware [Why] When we recover from hang, we do not want to skip the audio enable call. [How] Disable audio in dc_reinitialize_hardware Signed-off-by: Alvin Lee Reviewed-by: Jun Lei Acked-by: Leo Li Signed-off-by: Alex Deucher .../drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c | 1 + .../drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 20 ++++++++++++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) commit 12d0e503dd9e0576487b2f20577717b2a36fe0c5 Author: Derek Lai Date: Tue Jun 18 14:55:57 2019 +0800 drm/amd/display: Read max down spread [Why] When launch D10.2, driver will write DPCD 0x107 with 0x00 [How] Read MAX_DOWNSPREAD (0x0003h) then keep in current link settings Signed-off-by: Derek Lai Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 288af96df16b629552c5bcc9ec0f0191c6198a72 Author: Ilya Bakoulin Date: Wed May 29 18:52:17 2019 -0400 drm/amd/display: Check for valid stream_encode Before accessing it's vtable, check that stream_encoder is non-null. Signed-off-by: Ilya Bakoulin Reviewed-by: Eric Bernstein Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c7990daebe71d11a9e360b5c3b0ecd1846a3a4bb Author: SivapiriyanKumarasamy Date: Fri Jun 14 15:04:00 2019 -0400 drm/amd/display: Wait for backlight programming completion in set backlight level [WHY] Currently we don't wait for blacklight programming completion in DMCU when setting backlight level. Some sequences such as PSR static screen event trigger reprogramming requires it to be complete. [How] Add generic wait for dmcu command completion in set backlight level. Signed-off-by: SivapiriyanKumarasamy Reviewed-by: Anthony Koo Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_abm.c | 4 ++++ 1 file changed, 4 insertions(+) commit ca6f188cdf80de09b92174cf5fb2716021264222 Author: Julian Parkin Date: Thu Jun 13 12:49:37 2019 -0400 drm/amd/display: Poll for GPUVM context ready (v2) [Why] Hardware docs state that we must wait until the GPUVM context is ready after programming it. [How] Poll until the valid bit of PAGE_TABLE_BASE_ADDR_LO32 is set to 1 after programming it. v2: fix include for udelay (Alex) Signed-off-by: Julian Parkin Reviewed-by: Charlene Liu Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_vmid.c | 37 +++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit dd5d9348da02dd83dbb235e55aa0acb3f48ccc95 Author: Wenjing Liu Date: Tue Jun 11 18:18:36 2019 -0400 drm/amd/display: wait for the whole frame after global unlock [why] The current code will not wait for the entire frame after global unlock. This causes dsc dynamic target bpp update corruption when there is a surface update immediately happens after this. [how] Wait for the entire whole frame after unlock before continuing the rest of stream and surface update. Signed-off-by: Wenjing Liu Reviewed-by: Jun Lei Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 2 ++ 1 file changed, 2 insertions(+) commit 7f6964c5a05e6593bda3a4bcb5581d0b72fc71cb Author: Nicholas Kazlauskas Date: Wed Jun 5 15:02:04 2019 -0400 drm/amd/display: Copy max_clks_by_state after dce_clk_mgr_construct [Why] For DCE110, DCE112 and DCE120 the max_clks_by_state for the clk_mgr are copied from their respective table before the call to dce_clk_mgr_construct, but then dce_clk_mgr_construct overwrites these with the dce80_max_clks_by_state. [How] Copy these after we call dce_clk_mgr_construct so we're using the right tables. Signed-off-by: Nicholas Kazlauskas Reviewed-by: David Francis Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/dce110/dce110_clk_mgr.c | 4 ++-- drivers/gpu/drm/amd/display/dc/clk_mgr/dce112/dce112_clk_mgr.c | 4 ++-- drivers/gpu/drm/amd/display/dc/clk_mgr/dce120/dce120_clk_mgr.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) commit 492d9ec244923420af96db6b69ad7d575859aa92 Author: Murton Liu Date: Mon Jun 10 17:55:28 2019 -0400 drm/amd/display: Clock does not lower in Updateplanes [why] We reset the optimized_required in atomic_plane_disable flag immediately after it is set in atomic_plane_disconnect, causing us to never have flag set during next flip in UpdatePlanes. [how] Optimize directly after each time plane is removed. Signed-off-by: Murton Liu Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 4fc1609bcd5475a9cef1caeb10a04106f4f85fac Author: Samson Tam Date: Tue Jun 4 15:52:59 2019 -0400 drm/amd/display: skip retrain in dc_link_set_preferred_link_settings() if using passive dongle [Why] Fixes issue when we have a display connected using a passive dongle and then emulate over it using a DP connection at 1 x 1.62 Ghz. System hangs because register bus returns back 0xFFFFFFFF for all register reads after setting register DIG_BE_CNTL in dcn10_link_encoder_connect_dig_be_to_fe(). Hang occurs later when trying to do a register read. [How] At the start of the emulation, dc_link_set_preferred_link_settings() and dp_retrain_link_dp_test() is called, even though it is connected using a passive dongle. Add an extra condition in dp_retrain_link_dp_test() to check for link->dongle_max_pix_clk > 0. This is the only way we know if the connection is using passive dongle so we don't retrain DP. Signed-off-by: Samson Tam Reviewed-by: Jun Lei Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 4a876eecf6a5bfbe05ca6358e1b6a484e27ce32f Author: Jun Lei Date: Wed Jun 5 10:53:40 2019 -0400 drm/amd/display: swap system aperture high/low [why] Currently logical values are swapped in HW, causing system aperture to be undefined, so VA and PA cannot co-exist [how] program values correctly Signed-off-by: Jun Lei Reviewed-by: Yongqiang Sun Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 61011e63f87fe5dd0ebff787cd78df4d7d66aec5 Author: Nikola Cornij Date: Wed Jun 5 14:29:47 2019 -0400 drm/amd/display: Set one 4:2:0-related PPS field as recommended by DSC spec [why] 'second_line_offset_adj' was mistakenly left at zero, even though DSC spec v1.2a recommends setting this field to 512 for 4:2:0. [how] Set 'second_line_offset_adj' to 512 for 4:2:0 and leave at zero otherwise Signed-off-by: Nikola Cornij Reviewed-by: Eric Bernstein Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dsc/drm_dsc_dc.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 90bbf6374b88bdc1411fd83b24d87513ba23d519 Author: Dmytro Laktyushkin Date: Tue Jun 4 14:48:33 2019 -0400 drm/amd/display: Set default block_size, even in unexpected cases We're not expected to enter the default case, but not returning a default value here is incorrect. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Eric Bernstein Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubbub.c | 1 + drivers/gpu/drm/amd/display/dc/inc/hw/dchubbub.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit 5b25e5f1a97284020abee7348427f89abdb674e8 Author: Harmanprit Tatla Date: Tue Jun 4 14:12:21 2019 -0400 drm/amd/display: No audio endpoint for Dell MST display [Why] There are certain MST displays (i.e. Dell P2715Q) that although have the MST feature set to off may still report it is a branch device and a non-zero value for downstream port present. This can lead to us incorrectly classifying a dp dongle connection as being active and disabling the audio endpoint for the display. [How] Modified the placement and condition used to assign the is_branch_dev bit. Signed-off-by: Harmanprit Tatla Reviewed-by: Aric Cyr Acked-by: Anthony Koo Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit db31af12a5169f4ac26acec759c1d872eef26554 Author: Jun Lei Date: Mon Jun 3 11:37:44 2019 -0400 drm/amd/display: cap DCFCLK hardmin to 507 for NV10 [why] Due to limitation in SMU/PPLIB, it is not possible to know Fmax @ Vmin for DCFCLK. This causes issues at high display configurations where extra headroom of DCFCLK can enable P-state switching [how] Use existing override logic. If override not defined, then force min = 507 Signed-off-by: Jun Lei Reviewed-by: Eric Yang Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 4 ++++ 1 file changed, 4 insertions(+) commit 5d109be38b23c8859ec78a2ed7c254ccd569719d Author: Dmytro Laktyushkin Date: Thu May 30 15:47:51 2019 -0400 drm/amd/display: fix dsc disable A regression caused dsc to never get disabled in certain situations. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Nikola Cornij Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 0bd8ac7ed5f9a1a26c722c6cdbc4cb178d36cc03 Author: Jun Lei Date: Mon Jun 3 08:13:12 2019 -0400 drm/amd/display: fix up HUBBUB hw programming for VM [why] Some values were not being converted or bit-shifted properly for HW registers, causing black screen [how] Fix up the values before programming HW Signed-off-by: Jun Lei Reviewed-by: Anthony Koo Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubbub.c | 17 ++++++++--------- drivers/gpu/drm/amd/display/dc/inc/hw/dchubbub.h | 4 ++-- 2 files changed, 10 insertions(+), 11 deletions(-) commit 61f33f6aa88388e36ff8ef27a40b4a173c1511d1 Author: Jun Lei Date: Fri May 31 15:14:13 2019 -0400 drm/amd/display: initialize p_state to proper value [why] On some modes SMU will be in infinite loop state at boot, this is because driver assumes p_state_support is false, but this is the opposite of the assumed boot state by SMU. we optimize away notifying SMU about no pstate, and so they will get stuck [how] when we init clk manager, init pstate to true, so it matches driver load assumption Signed-off-by: Jun Lei Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c | 2 ++ 1 file changed, 2 insertions(+) commit c6d5245d41de3a9786707b34189c41d6412fd0ba Author: Leo Liu Date: Thu Jul 18 11:38:46 2019 -0400 drm/amdgpu: use VCN firmware offset for cache window Since we are using the signed FW now, and also using PSP firmware loading, but it's still potential to break driver when loading FW directly instead of PSP, so we should add offset. Signed-off-by: Leo Liu Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 3 --- 1 file changed, 3 deletions(-) commit 3457b3055e43fbe457d9779c1362d56f19a888e7 Author: Fuqian Huang Date: Thu Jul 11 11:10:21 2019 +0800 drm/ttm: use the same attributes when freeing d_page->vaddr In function __ttm_dma_alloc_page(), d_page->addr is allocated by dma_alloc_attrs() but freed with use dma_free_coherent() in __ttm_dma_free_page(). Use the correct dma_free_attrs() to free d_page->vaddr. Signed-off-by: Fuqian Huang Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 1a195ed5f197fcfd1d99ceedd469857fcd7d8c4f Author: Kevin Wang Date: Thu Jul 18 15:46:55 2019 +0800 drm/amd/powerplay: change sysfs pp_dpm_xxx format for navi10 v2: set average clock value on level 1 when current clock equal min or max clock (fine grained dpm support). the navi10 gfxclk (sclk) support fine grained DPM, so use level 1 to show current dpm freq in sysfs pp_dpm_xxx Signed-off-by: Kevin Wang Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 47 ++++++++++++++++++++++++++---- 1 file changed, 41 insertions(+), 6 deletions(-) commit 578a4daa1cd61f9783b5d0f566d6ec0a2cb9f6a3 Author: Hawking Zhang Date: Thu Jul 18 16:03:46 2019 +0800 drm/amdgpu: drop ras self test this function is not needed any more. error injection is the only way to validate ras but it can't be executed in amdgpu_ras_init, where gpu is even not initialized Signed-off-by: Hawking Zhang Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 7 ------- 1 file changed, 7 deletions(-) commit 29bd650809225f51ba475c556f43e53e392c44e3 Author: Hawking Zhang Date: Thu Jul 18 13:59:38 2019 +0800 drm/amdgpu: only allow error injection to UMC IP block error injection to other IP blocks (except UMC) will be enabled until RAS feature stablize on those IP blocks Signed-off-by: Hawking Zhang Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 59d9c0ab7169346d53b12db6a5e986a26a28c479 Author: Hawking Zhang Date: Thu Jul 18 12:52:56 2019 +0800 drm/amdgpu: disable GFX RAS by default GFX RAS has not been stablized yet. disable GFX ras until it is fully funcitonal. Signed-off-by: Hawking Zhang Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5f872b723a451a26ad0f1d29541df9de5d23529d Author: Hawking Zhang Date: Thu Jul 18 12:49:15 2019 +0800 drm/amdgpu: do not create ras debugfs/sysfs node for ASICs that don't have ras ability driver shouldn't init any ras debugfs/sysfs node for ASICs that don't have ras hardware ability Signed-off-by: Hawking Zhang Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 23d66e75d7c75f108754297f6eae77348a7cd544 Author: Evan Quan Date: Wed Jul 17 16:32:27 2019 +0800 drm/amd/powerplay: report bootup clock as max supported on dpm disabled With gfxclk or uclk dpm disabled, it's reasonable to report bootup clock as the max supported. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) commit ad28e02420beae459bf48be14de5de1d76e79704 Author: Joseph Greathouse Date: Wed Jul 17 11:55:22 2019 -0500 drm/amdgpu: Default disable GDS for compute VMIDs The GDS and GWS blocks default to allowing all VMIDs to access all entries. Graphics VMIDs can handle setting these limits when the driver launches work. However, compute workloads under HWS control don't go through the kernel driver. Instead, HWS firmware should set these limits when a process is put into a VMID slot. Disable access to these devices by default by turning off all mask bits (for OA) and setting BASE=SIZE=0 (for GDS and GWS) for all compute VMIDs. If a process wants to use these resources, they can request this from the HWS firmware (when such capabilities are enabled). HWS will then handle setting the base and limit for the process when it is assigned to a VMID. This will also prevent user kernels from getting 'stuck' in GWS by accident if they write GWS-using code but HWS firmware is not set up to handle GWS reset. Until HWS is enabled to handle GWS properly, all GWS accesses will MEM_VIOL fault the kernel. v2: Move initialization outside of SRBM mutex Signed-off-by: Joseph Greathouse Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 9 +++++++++ drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 9 +++++++++ drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 9 +++++++++ drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 9 +++++++++ 4 files changed, 36 insertions(+) commit 41a5a2a8531f95d18bb4efddea581ccb469e8ee5 Author: hersen wu Date: Wed Jun 26 13:06:07 2019 -0400 drm/amd/display: init res_pool dccg_ref, dchub_ref with xtalin_freq [WHY] dc sw clock implementation of navi10 and raven are not exact the same. dcccg, dchub reference clock initialization is done after dc calls vbios dispcontroller_init table. for raven family, before dispcontroller_init is called by dc, the ref clk values are referred by sw clock implementation and program asic register using wrong values. this causes dchub pstate error. This need provide valid ref clk values. for navi10, since dispcontroller_init is not called, dchubbub_global_timer_enable = 0, hubbub2_get_dchub_ref_freq will hit aeert. this need remove hubbub2_get_dchub_ref_freq from this location and move to dcn20_init_hw. [HOW] for all asic, initialize dccg, dchub ref clk with data from vbios firmware table by default. for raven asic family, use these data from vbios, for asic which support sw dccg component, like navi10, read ref clk by sw dccg functions and update the ref clk. Signed-off-by: hersen wu Reviewed-by: Jun Lei Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 42 +++++++++------------- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 25 +++++++++++++ 2 files changed, 41 insertions(+), 26 deletions(-) commit 8a5b5d425e5454fdef0e5457826f4aa7f96cf463 Author: Alex Deucher Date: Wed Jul 17 13:10:39 2019 -0500 drm/amdgpu/pm: remove check for pp funcs in freq sysfs handlers The dpm sensor function already does this for us. This fixes the freq*_input files with the new SMU implementation. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 10 ---------- 1 file changed, 10 deletions(-) commit 02316e963a5a2217aa13f64bb5fc37a3a6d0f5ef Author: Nicholas Kazlauskas Date: Fri Jul 5 16:54:28 2019 -0400 drm/amd/display: Force uclk to max for every state Workaround for now to avoid underflow. The uclk switch time should really be bumped up to 404, but doing so would expose p-state hang issues for higher bandwidth display configurations. Signed-off-by: Nicholas Kazlauskas Signed-off-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c | 6 +++--- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 10 ++++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) commit 7369c10f81172b55b284944caa2f51f595bbdb84 Author: Chuhong Yuan Date: Wed Jul 17 18:14:57 2019 +0800 net/mlx5: Replace kfree with kvfree Variable allocated by kvmalloc should not be freed by kfree. Because it may be allocated by vmalloc. So replace kfree with kvfree here. Fixes: 9b1f298236057 ("net/mlx5: Add support for FW fatal reporter dump") Signed-off-by: Chuhong Yuan Acked-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/health.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit da0acd7c656c09b362b5095dc8595f8655dc1223 Merge: 818e95c768c6 93651f80dcb6 Author: Linus Torvalds Date: Thu Jul 18 12:06:57 2019 -0700 Merge tag 'modules-for-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux Pull module updates from Jessica Yu: "Summary of modules changes for the 5.3 merge window: - Code fixes and cleanups - Fix bug where set_memory_x() wasn't being called when rodata=n - Fix bug where -EEXIST was being returned for going modules - Allow arches to override module_exit_section()" * tag 'modules-for-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux: modules: fix compile error if don't have strict module rwx ARM: module: recognize unwind exit sections module: allow arch overrides for .exit section names modules: fix BUG when load module with rodata=n kernel/module: Fix mem leak in module_add_modinfo_attrs kernel: module: Use struct_size() helper kernel/module.c: Only return -EEXIST for modules that have finished loading commit 184528af92a87e334789f6a22af4e392baf6bf60 Author: Ilias Apalodimas Date: Thu Jul 18 17:38:30 2019 +0300 MAINTAINERS: update netsec driver Add myself to maintainers since i provided the XDP and page_pool implementation Signed-off-by: Ilias Apalodimas Acked-by: Jassi Brar Acked-by: Ard Biesheuvel Signed-off-by: David S. Miller MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit bf3c90ee1efe4dd3417d2129f9f6c68a4c76de00 Author: Amir Goldstein Date: Mon Jun 10 20:36:57 2019 +0300 cifs: copy_file_range needs to strip setuid bits and update timestamps cifs has both source and destination inodes locked throughout the copy. Like ->write_iter(), we update mtime and strip setuid bits of destination file before copy and like ->read_iter(), we update atime of source file after copy. Signed-off-by: Amir Goldstein Signed-off-by: Steve French fs/cifs/cifsfs.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 54851aa90cf27041d64b12f65ac72e9f97bd90fd Author: Ido Schimmel Date: Wed Jul 17 23:39:33 2019 +0300 ipv6: Unlink sibling route in case of failure When a route needs to be appended to an existing multipath route, fib6_add_rt2node() first appends it to the siblings list and increments the number of sibling routes on each sibling. Later, the function notifies the route via call_fib6_entry_notifiers(). In case the notification is vetoed, the route is not unlinked from the siblings list, which can result in a use-after-free. Fix this by unlinking the route from the siblings list before returning an error. Audited the rest of the call sites from which the FIB notification chain is called and could not find more problems. Fixes: 2233000cba40 ("net/ipv6: Move call_fib6_entry_notifiers up for route adds") Signed-off-by: Ido Schimmel Reported-by: Alexander Petrovskiy Reviewed-by: David Ahern Signed-off-by: David S. Miller net/ipv6/ip6_fib.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit b68b9907069a8d3a65bc16a35360bf8f8603c8fa Author: Josh Poimboeuf Date: Wed Jul 17 20:36:57 2019 -0500 objtool: Support conditional retpolines A Clang-built kernel is showing the following warning: arch/x86/kernel/platform-quirks.o: warning: objtool: x86_early_init_platform_quirks()+0x84: unreachable instruction That corresponds to this code: 7e: 0f 85 00 00 00 00 jne 84 80: R_X86_64_PC32 __x86_indirect_thunk_r11-0x4 84: c3 retq This is a conditional retpoline sibling call, which is now possible thanks to retpolines. Objtool hasn't seen that before. It's incorrectly interpreting the conditional jump as an unconditional dynamic jump. Reported-by: Nick Desaulniers Signed-off-by: Josh Poimboeuf Signed-off-by: Thomas Gleixner Tested-by: Nick Desaulniers Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/30d4c758b267ef487fb97e6ecb2f148ad007b554.1563413318.git.jpoimboe@redhat.com tools/objtool/arch.h | 1 + tools/objtool/check.c | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) commit 9fe7b7642fe2c5158904d06fe31b740ca0695a01 Author: Josh Poimboeuf Date: Wed Jul 17 20:36:56 2019 -0500 objtool: Convert insn type to enum This makes it easier to add new instruction types. Also it's hopefully more robust since the compiler should warn about out-of-range enums. Signed-off-by: Josh Poimboeuf Signed-off-by: Thomas Gleixner Tested-by: Nick Desaulniers Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/0740e96af0d40e54cfd6a07bf09db0fbd10793cd.1563413318.git.jpoimboe@redhat.com tools/objtool/arch.h | 35 ++++++++++++++++++----------------- tools/objtool/arch/x86/decode.c | 2 +- tools/objtool/check.c | 7 ------- tools/objtool/check.h | 2 +- 4 files changed, 20 insertions(+), 26 deletions(-) commit e65050b94d8c518fdbee572ea4ca6d352e1fda37 Author: Josh Poimboeuf Date: Wed Jul 17 20:36:55 2019 -0500 objtool: Fix seg fault on bad switch table entry In one rare case, Clang generated the following code: 5ca: 83 e0 21 and $0x21,%eax 5cd: b9 04 00 00 00 mov $0x4,%ecx 5d2: ff 24 c5 00 00 00 00 jmpq *0x0(,%rax,8) 5d5: R_X86_64_32S .rodata+0x38 which uses the corresponding jump table relocations: 000000000038 000200000001 R_X86_64_64 0000000000000000 .text + 834 000000000040 000200000001 R_X86_64_64 0000000000000000 .text + 5d9 000000000048 000200000001 R_X86_64_64 0000000000000000 .text + b96 000000000050 000200000001 R_X86_64_64 0000000000000000 .text + b96 000000000058 000200000001 R_X86_64_64 0000000000000000 .text + b96 000000000060 000200000001 R_X86_64_64 0000000000000000 .text + b96 000000000068 000200000001 R_X86_64_64 0000000000000000 .text + b96 000000000070 000200000001 R_X86_64_64 0000000000000000 .text + b96 000000000078 000200000001 R_X86_64_64 0000000000000000 .text + b96 000000000080 000200000001 R_X86_64_64 0000000000000000 .text + b96 000000000088 000200000001 R_X86_64_64 0000000000000000 .text + b96 000000000090 000200000001 R_X86_64_64 0000000000000000 .text + b96 000000000098 000200000001 R_X86_64_64 0000000000000000 .text + b96 0000000000a0 000200000001 R_X86_64_64 0000000000000000 .text + b96 0000000000a8 000200000001 R_X86_64_64 0000000000000000 .text + b96 0000000000b0 000200000001 R_X86_64_64 0000000000000000 .text + b96 0000000000b8 000200000001 R_X86_64_64 0000000000000000 .text + b96 0000000000c0 000200000001 R_X86_64_64 0000000000000000 .text + b96 0000000000c8 000200000001 R_X86_64_64 0000000000000000 .text + b96 0000000000d0 000200000001 R_X86_64_64 0000000000000000 .text + b96 0000000000d8 000200000001 R_X86_64_64 0000000000000000 .text + b96 0000000000e0 000200000001 R_X86_64_64 0000000000000000 .text + b96 0000000000e8 000200000001 R_X86_64_64 0000000000000000 .text + b96 0000000000f0 000200000001 R_X86_64_64 0000000000000000 .text + b96 0000000000f8 000200000001 R_X86_64_64 0000000000000000 .text + b96 000000000100 000200000001 R_X86_64_64 0000000000000000 .text + b96 000000000108 000200000001 R_X86_64_64 0000000000000000 .text + b96 000000000110 000200000001 R_X86_64_64 0000000000000000 .text + b96 000000000118 000200000001 R_X86_64_64 0000000000000000 .text + b96 000000000120 000200000001 R_X86_64_64 0000000000000000 .text + b96 000000000128 000200000001 R_X86_64_64 0000000000000000 .text + b96 000000000130 000200000001 R_X86_64_64 0000000000000000 .text + b96 000000000138 000200000001 R_X86_64_64 0000000000000000 .text + 82f 000000000140 000200000001 R_X86_64_64 0000000000000000 .text + 828 Since %eax was masked with 0x21, only the first two and the last two entries are possible. Objtool doesn't actually emulate all the code, so it isn't smart enough to know that all the middle entries aren't reachable. They point to the NOP padding area after the end of the function, so objtool seg faulted when it tried to dereference a NULL insn->func. After this fix, objtool still gives an "unreachable" error because it stops reading the jump table when it encounters the bad addresses: /home/jpoimboe/objtool-tests/adm1275.o: warning: objtool: adm1275_probe()+0x828: unreachable instruction While the above code is technically correct, it's very wasteful of memory -- it uses 34 jump table entries when only 4 are needed. It's also not possible for objtool to validate this type of switch table because the unused entries point outside the function and objtool has no way of determining if that's intentional. Hopefully the Clang folks can fix it. Reported-by: Arnd Bergmann Signed-off-by: Josh Poimboeuf Signed-off-by: Thomas Gleixner Tested-by: Nick Desaulniers Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/a9db88eec4f1ca089e040989846961748238b6d8.1563413318.git.jpoimboe@redhat.com tools/objtool/check.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bd98c81346468fc2f86aeeb44d4d0d6f763a62b7 Author: Jann Horn Date: Wed Jul 17 20:36:54 2019 -0500 objtool: Support repeated uses of the same C jump table This fixes objtool for both a GCC issue and a Clang issue: 1) GCC issue: kernel/bpf/core.o: warning: objtool: ___bpf_prog_run()+0x8d5: sibling call from callable instruction with modified stack frame With CONFIG_RETPOLINE=n, GCC is doing the following optimization in ___bpf_prog_run(). Before: select_insn: jmp *jumptable(,%rax,8) ... ALU64_ADD_X: ... jmp select_insn ALU_ADD_X: ... jmp select_insn After: select_insn: jmp *jumptable(, %rax, 8) ... ALU64_ADD_X: ... jmp *jumptable(, %rax, 8) ALU_ADD_X: ... jmp *jumptable(, %rax, 8) This confuses objtool. It has never seen multiple indirect jump sites which use the same jump table. For GCC switch tables, the only way of detecting the size of a table is by continuing to scan for more tables. The size of the previous table can only be determined after another switch table is found, or when the scan reaches the end of the function. That logic was reused for C jump tables, and was based on the assumption that each jump table only has a single jump site. The above optimization breaks that assumption. 2) Clang issue: drivers/usb/misc/sisusbvga/sisusb.o: warning: objtool: sisusb_write_mem_bulk()+0x588: can't find switch jump table With clang 9, code can be generated where a function contains two indirect jump instructions which use the same switch table. The fix is the same for both issues: split the jump table parsing into two passes. In the first pass, locate the heads of all switch tables for the function and mark their locations. In the second pass, parse the switch tables and add them. Fixes: e55a73251da3 ("bpf: Fix ORC unwinding in non-JIT BPF code") Reported-by: Randy Dunlap Reported-by: Arnd Bergmann Signed-off-by: Jann Horn Signed-off-by: Josh Poimboeuf Signed-off-by: Thomas Gleixner Tested-by: Nick Desaulniers Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/e995befaada9d4d8b2cf788ff3f566ba900d2b4d.1563413318.git.jpoimboe@redhat.com Co-developed-by: Josh Poimboeuf tools/objtool/check.c | 53 +++++++++++++++++++++++++++------------------------ tools/objtool/check.h | 1 + tools/objtool/elf.h | 1 + 3 files changed, 30 insertions(+), 25 deletions(-) commit e7c2bc37bfae120bce3e7cc8c8abf9d110af0757 Author: Josh Poimboeuf Date: Wed Jul 17 20:36:53 2019 -0500 objtool: Refactor jump table code Now that C jump tables are supported, call them "jump tables" instead of "switch tables". Also rename some other variables, add comments, and simplify the code flow a bit. Signed-off-by: Josh Poimboeuf Signed-off-by: Thomas Gleixner Tested-by: Nick Desaulniers Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/cf951b0c0641628e0b9b81f7ceccd9bcabcb4bd8.1563413318.git.jpoimboe@redhat.com tools/objtool/check.c | 82 +++++++++++++++++++++++++++------------------------ tools/objtool/elf.c | 2 +- tools/objtool/elf.h | 2 +- 3 files changed, 46 insertions(+), 40 deletions(-) commit 0c1ddd33177530feb3685a800bba1ac4cc58cc4b Author: Josh Poimboeuf Date: Wed Jul 17 20:36:52 2019 -0500 objtool: Refactor sibling call detection logic Simplify the sibling call detection logic a bit. Signed-off-by: Josh Poimboeuf Signed-off-by: Thomas Gleixner Tested-by: Nick Desaulniers Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/8357dbef9e7f5512e76bf83a76c81722fc09eb5e.1563413318.git.jpoimboe@redhat.com tools/objtool/check.c | 65 ++++++++++++++++++++++++++------------------------- 1 file changed, 33 insertions(+), 32 deletions(-) commit c9bab22bc449ad2496a6bbbf68acc711d9c5301c Author: Josh Poimboeuf Date: Wed Jul 17 20:36:51 2019 -0500 objtool: Do frame pointer check before dead end check Even calls to __noreturn functions need the frame pointer setup first. Such functions often dump the stack. Signed-off-by: Josh Poimboeuf Signed-off-by: Thomas Gleixner Tested-by: Nick Desaulniers Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/aed62fbd60e239280218be623f751a433658e896.1563413318.git.jpoimboe@redhat.com tools/objtool/check.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 8e25c9f8b482ea8d8b6fb4f6f5c09bcc5ee18663 Author: Josh Poimboeuf Date: Wed Jul 17 20:36:50 2019 -0500 objtool: Change dead_end_function() to return boolean dead_end_function() can no longer return an error. Simplify its interface by making it return boolean. Signed-off-by: Josh Poimboeuf Signed-off-by: Thomas Gleixner Tested-by: Nick Desaulniers Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/9e6679610768fb6e6c51dca23f7d4d0c03b0c910.1563413318.git.jpoimboe@redhat.com tools/objtool/check.c | 36 ++++++++++++++---------------------- 1 file changed, 14 insertions(+), 22 deletions(-) commit 61e9b75a0ccf1fecacc28a2d77ea4a19aa404e39 Author: Josh Poimboeuf Date: Wed Jul 17 20:36:49 2019 -0500 objtool: Warn on zero-length functions All callable functions should have an ELF size. Signed-off-by: Josh Poimboeuf Signed-off-by: Thomas Gleixner Tested-by: Nick Desaulniers Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/03d429c4fa87829c61c5dc0e89652f4d9efb62f1.1563413318.git.jpoimboe@redhat.com tools/objtool/check.c | 6 ++++++ 1 file changed, 6 insertions(+) commit e10cd8fe8ddfd28a172d2be57ae0e90c7f752e6a Author: Josh Poimboeuf Date: Wed Jul 17 20:36:48 2019 -0500 objtool: Refactor function alias logic - Add an alias check in validate_functions(). With this change, aliases no longer need uaccess_safe set. - Add an alias check in decode_instructions(). With this change, the "if (!insn->func)" check is no longer needed. - Don't create aliases for zero-length functions, as it can have unexpected results. The next patch will spit out a warning for zero-length functions anyway. Signed-off-by: Josh Poimboeuf Signed-off-by: Thomas Gleixner Tested-by: Nick Desaulniers Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/26a99c31426540f19c9a58b9e10727c385a147bc.1563413318.git.jpoimboe@redhat.com tools/objtool/check.c | 16 +++++++++------- tools/objtool/elf.c | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) commit c705cecc8431951b4f34178e6b1db51b4a504c43 Author: Josh Poimboeuf Date: Wed Jul 17 20:36:47 2019 -0500 objtool: Track original function across branches If 'insn->func' is NULL, objtool skips some important checks, including sibling call validation. So if some .fixup code does an invalid sibling call, objtool ignores it. Treat all code branches (including alts) as part of the original function by keeping track of the original func value from validate_functions(). This improves the usefulness of some clang function fallthrough warnings, and exposes some additional kernel bugs in the process. Signed-off-by: Josh Poimboeuf Signed-off-by: Thomas Gleixner Tested-by: Nick Desaulniers Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/505df630f33c9717e1ccde6e4b64c5303135c25f.1563413318.git.jpoimboe@redhat.com tools/objtool/check.c | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) commit a7e47f26039c26312a4144c3001b4e9fa886bd45 Author: Josh Poimboeuf Date: Wed Jul 17 20:36:46 2019 -0500 objtool: Add mcsafe_handle_tail() to the uaccess safe list After an objtool improvement, it's reporting that __memcpy_mcsafe() is calling mcsafe_handle_tail() with AC=1: arch/x86/lib/memcpy_64.o: warning: objtool: .fixup+0x13: call to mcsafe_handle_tail() with UACCESS enabled arch/x86/lib/memcpy_64.o: warning: objtool: __memcpy_mcsafe()+0x34: (alt) arch/x86/lib/memcpy_64.o: warning: objtool: __memcpy_mcsafe()+0xb: (branch) arch/x86/lib/memcpy_64.o: warning: objtool: __memcpy_mcsafe()+0x0: <=== (func) mcsafe_handle_tail() is basically an extension of __memcpy_mcsafe(), so AC=1 is supposed to be set. Add mcsafe_handle_tail() to the uaccess safe list. Signed-off-by: Josh Poimboeuf Signed-off-by: Thomas Gleixner Tested-by: Nick Desaulniers Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/035c38f7eac845281d3c3d36749144982e06e58c.1563413318.git.jpoimboe@redhat.com tools/objtool/check.c | 1 + 1 file changed, 1 insertion(+) commit 3193c0836f203a91bef96d88c64cccf0be090d9c Author: Josh Poimboeuf Date: Wed Jul 17 20:36:45 2019 -0500 bpf: Disable GCC -fgcse optimization for ___bpf_prog_run() On x86-64, with CONFIG_RETPOLINE=n, GCC's "global common subexpression elimination" optimization results in ___bpf_prog_run()'s jumptable code changing from this: select_insn: jmp *jumptable(, %rax, 8) ... ALU64_ADD_X: ... jmp *jumptable(, %rax, 8) ALU_ADD_X: ... jmp *jumptable(, %rax, 8) to this: select_insn: mov jumptable, %r12 jmp *(%r12, %rax, 8) ... ALU64_ADD_X: ... jmp *(%r12, %rax, 8) ALU_ADD_X: ... jmp *(%r12, %rax, 8) The jumptable address is placed in a register once, at the beginning of the function. The function execution can then go through multiple indirect jumps which rely on that same register value. This has a few issues: 1) Objtool isn't smart enough to be able to track such a register value across multiple recursive indirect jumps through the jump table. 2) With CONFIG_RETPOLINE enabled, this optimization actually results in a small slowdown. I measured a ~4.7% slowdown in the test_bpf "tcpdump port 22" selftest. This slowdown is actually predicted by the GCC manual: Note: When compiling a program using computed gotos, a GCC extension, you may get better run-time performance if you disable the global common subexpression elimination pass by adding -fno-gcse to the command line. So just disable the optimization for this function. Fixes: e55a73251da3 ("bpf: Fix ORC unwinding in non-JIT BPF code") Reported-by: Randy Dunlap Signed-off-by: Josh Poimboeuf Signed-off-by: Thomas Gleixner Acked-by: Alexei Starovoitov Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/30c3ca29ba037afcbd860a8672eef0021addf9fe.1563413318.git.jpoimboe@redhat.com include/linux/compiler-gcc.h | 2 ++ include/linux/compiler_types.h | 4 ++++ kernel/bpf/core.c | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) commit 82e844a6536d1a3c12a73e44712f4021d90a4b53 Author: Josh Poimboeuf Date: Wed Jul 17 20:36:44 2019 -0500 x86/uaccess: Remove redundant CLACs in getuser/putuser error paths The same getuser/putuser error paths are used regardless of whether AC is set. In non-exception failure cases, this results in an unnecessary CLAC. Fixes the following warnings: arch/x86/lib/getuser.o: warning: objtool: .altinstr_replacement+0x18: redundant UACCESS disable arch/x86/lib/putuser.o: warning: objtool: .altinstr_replacement+0x18: redundant UACCESS disable Signed-off-by: Josh Poimboeuf Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/bc14ded2755ae75bd9010c446079e113dbddb74b.1563413318.git.jpoimboe@redhat.com arch/x86/lib/getuser.S | 20 ++++++++++---------- arch/x86/lib/putuser.S | 29 ++++++++++++++++------------- 2 files changed, 26 insertions(+), 23 deletions(-) commit 5e307a6bc7b600999742675dd182bcb8a6fe308e Author: Josh Poimboeuf Date: Wed Jul 17 20:36:43 2019 -0500 x86/uaccess: Don't leak AC flag into fentry from mcsafe_handle_tail() After adding mcsafe_handle_tail() to the objtool uaccess safe list, objtool reports: arch/x86/lib/usercopy_64.o: warning: objtool: mcsafe_handle_tail()+0x0: call to __fentry__() with UACCESS enabled With SMAP, this function is called with AC=1, so it needs to be careful about which functions it calls. Disable the ftrace entry hook, which can potentially pull in a lot of extra code. Signed-off-by: Josh Poimboeuf Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/8e13d6f0da1c8a3f7603903da6cbf6d582bbfe10.1563413318.git.jpoimboe@redhat.com arch/x86/lib/usercopy_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3a6ab4bcc52263dd5b1d2fd2e4ce95a38c798b4d Author: Josh Poimboeuf Date: Wed Jul 17 20:36:42 2019 -0500 x86/uaccess: Remove ELF function annotation from copy_user_handle_tail() After an objtool improvement, it's complaining about the CLAC in copy_user_handle_tail(): arch/x86/lib/copy_user_64.o: warning: objtool: .altinstr_replacement+0x12: redundant UACCESS disable arch/x86/lib/copy_user_64.o: warning: objtool: copy_user_handle_tail()+0x6: (alt) arch/x86/lib/copy_user_64.o: warning: objtool: copy_user_handle_tail()+0x2: (alt) arch/x86/lib/copy_user_64.o: warning: objtool: copy_user_handle_tail()+0x0: <=== (func) copy_user_handle_tail() is incorrectly marked as a callable function, so objtool is rightfully concerned about the CLAC with no corresponding STAC. Remove the ELF function annotation. The copy_user_handle_tail() code path is already verified by objtool because it's jumped to by other callable asm code (which does the corresponding STAC). Signed-off-by: Josh Poimboeuf Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/6b6e436774678b4b9873811ff023bd29935bee5b.1563413318.git.jpoimboe@redhat.com arch/x86/lib/copy_user_64.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 61a73f5cd1a5794626d216cc56e20a1b195c5d0c Author: Josh Poimboeuf Date: Wed Jul 17 20:36:41 2019 -0500 x86/head/64: Annotate start_cpu0() as non-callable After an objtool improvement, it complains about the fact that start_cpu0() jumps to code which has an LRET instruction. arch/x86/kernel/head_64.o: warning: objtool: .head.text+0xe4: unsupported instruction in callable function Technically, start_cpu0() is callable, but it acts nothing like a callable function. Prevent objtool from treating it like one by removing its ELF function annotation. Signed-off-by: Josh Poimboeuf Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/6b1b4505fcb90571a55fa1b52d71fb458ca24454.1563413318.git.jpoimboe@redhat.com arch/x86/kernel/head_64.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e6dd47394493061c605285a868fc72eae2e9c866 Author: Josh Poimboeuf Date: Wed Jul 17 20:36:40 2019 -0500 x86/entry: Fix thunk function ELF sizes Fix the following warnings: arch/x86/entry/thunk_64.o: warning: objtool: trace_hardirqs_on_thunk() is missing an ELF size annotation arch/x86/entry/thunk_64.o: warning: objtool: trace_hardirqs_off_thunk() is missing an ELF size annotation arch/x86/entry/thunk_64.o: warning: objtool: lockdep_sys_exit_thunk() is missing an ELF size annotation Signed-off-by: Josh Poimboeuf Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/89c97adc9f6cc44a0f5d03cde6d0357662938909.1563413318.git.jpoimboe@redhat.com arch/x86/entry/thunk_64.S | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 3901336ed9887b075531bffaeef7742ba614058b Author: Josh Poimboeuf Date: Wed Jul 17 20:36:39 2019 -0500 x86/kvm: Don't call kvm_spurious_fault() from .fixup After making a change to improve objtool's sibling call detection, it started showing the following warning: arch/x86/kvm/vmx/nested.o: warning: objtool: .fixup+0x15: sibling call from callable instruction with modified stack frame The problem is the ____kvm_handle_fault_on_reboot() macro. It does a fake call by pushing a fake RIP and doing a jump. That tricks the unwinder into printing the function which triggered the exception, rather than the .fixup code. Instead of the hack to make it look like the original function made the call, just change the macro so that the original function actually does make the call. This allows removal of the hack, and also makes objtool happy. I triggered a vmx instruction exception and verified that the stack trace is still sane: kernel BUG at arch/x86/kvm/x86.c:358! invalid opcode: 0000 [#1] SMP PTI CPU: 28 PID: 4096 Comm: qemu-kvm Not tainted 5.2.0+ #16 Hardware name: Lenovo THINKSYSTEM SD530 -[7X2106Z000]-/-[7X2106Z000]-, BIOS -[TEE113Z-1.00]- 07/17/2017 RIP: 0010:kvm_spurious_fault+0x5/0x10 Code: 00 00 00 00 00 8b 44 24 10 89 d2 45 89 c9 48 89 44 24 10 8b 44 24 08 48 89 44 24 08 e9 d4 40 22 00 0f 1f 40 00 0f 1f 44 00 00 <0f> 0b 66 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 41 55 49 89 fd 41 RSP: 0018:ffffbf91c683bd00 EFLAGS: 00010246 RAX: 000061f040000000 RBX: ffff9e159c77bba0 RCX: ffff9e15a5c87000 RDX: 0000000665c87000 RSI: ffff9e15a5c87000 RDI: ffff9e159c77bba0 RBP: 0000000000000000 R08: 0000000000000000 R09: ffff9e15a5c87000 R10: 0000000000000000 R11: fffff8f2d99721c0 R12: ffff9e159c77bba0 R13: ffffbf91c671d960 R14: ffff9e159c778000 R15: 0000000000000000 FS: 00007fa341cbe700(0000) GS:ffff9e15b7400000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fdd38356804 CR3: 00000006759de003 CR4: 00000000007606e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: loaded_vmcs_init+0x4f/0xe0 alloc_loaded_vmcs+0x38/0xd0 vmx_create_vcpu+0xf7/0x600 kvm_vm_ioctl+0x5e9/0x980 ? __switch_to_asm+0x40/0x70 ? __switch_to_asm+0x34/0x70 ? __switch_to_asm+0x40/0x70 ? __switch_to_asm+0x34/0x70 ? free_one_page+0x13f/0x4e0 do_vfs_ioctl+0xa4/0x630 ksys_ioctl+0x60/0x90 __x64_sys_ioctl+0x16/0x20 do_syscall_64+0x55/0x1c0 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7fa349b1ee5b Signed-off-by: Josh Poimboeuf Signed-off-by: Thomas Gleixner Acked-by: Paolo Bonzini Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/64a9b64d127e87b6920a97afde8e96ea76f6524e.1563413318.git.jpoimboe@redhat.com arch/x86/include/asm/kvm_host.h | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) commit 19f2d8fa98644c7b78845b1d66abeae4e3d9dfa8 Author: Josh Poimboeuf Date: Wed Jul 17 20:36:38 2019 -0500 x86/kvm: Replace vmx_vmenter()'s call to kvm_spurious_fault() with UD2 Objtool reports the following: arch/x86/kvm/vmx/vmenter.o: warning: objtool: vmx_vmenter()+0x14: call without frame pointer save/setup But frame pointers are necessarily broken anyway, because __vmx_vcpu_run() clobbers RBP with the guest's value before calling vmx_vmenter(). So calling without a frame pointer doesn't make things any worse. Make objtool happy by changing the call to a UD2. Suggested-by: Paolo Bonzini Signed-off-by: Josh Poimboeuf Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Acked-by: Paolo Bonzini Link: https://lkml.kernel.org/r/9fc2216c9dc972f95bb65ce2966a682c6bda1cb0.1563413318.git.jpoimboe@redhat.com arch/x86/kvm/vmx/vmenter.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d99a6ce70ec6ed990b74bd4e34232fd830d20d27 Author: Josh Poimboeuf Date: Wed Jul 17 20:36:37 2019 -0500 x86/kvm: Fix fastop function ELF metadata Some of the fastop functions, e.g. em_setcc(), are actually just used as global labels which point to blocks of functions. The global labels are incorrectly annotated as functions. Also the functions themselves don't have size annotations. Fixes a bunch of warnings like the following: arch/x86/kvm/emulate.o: warning: objtool: seto() is missing an ELF size annotation arch/x86/kvm/emulate.o: warning: objtool: em_setcc() is missing an ELF size annotation arch/x86/kvm/emulate.o: warning: objtool: setno() is missing an ELF size annotation arch/x86/kvm/emulate.o: warning: objtool: setc() is missing an ELF size annotation Signed-off-by: Josh Poimboeuf Signed-off-by: Thomas Gleixner Acked-by: Paolo Bonzini Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/c8cc9be60ebbceb3092aa5dd91916039a1f88275.1563413318.git.jpoimboe@redhat.com arch/x86/kvm/emulate.c | 44 +++++++++++++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 13 deletions(-) commit 083db6764821996526970e42d09c1ab2f4155dd4 Author: Josh Poimboeuf Date: Wed Jul 17 20:36:36 2019 -0500 x86/paravirt: Fix callee-saved function ELF sizes The __raw_callee_save_*() functions have an ELF symbol size of zero, which confuses objtool and other tools. Fixes a bunch of warnings like the following: arch/x86/xen/mmu_pv.o: warning: objtool: __raw_callee_save_xen_pte_val() is missing an ELF size annotation arch/x86/xen/mmu_pv.o: warning: objtool: __raw_callee_save_xen_pgd_val() is missing an ELF size annotation arch/x86/xen/mmu_pv.o: warning: objtool: __raw_callee_save_xen_make_pte() is missing an ELF size annotation arch/x86/xen/mmu_pv.o: warning: objtool: __raw_callee_save_xen_make_pgd() is missing an ELF size annotation Signed-off-by: Josh Poimboeuf Signed-off-by: Thomas Gleixner Reviewed-by: Juergen Gross Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/afa6d49bb07497ca62e4fc3b27a2d0cece545b4e.1563413318.git.jpoimboe@redhat.com arch/x86/include/asm/paravirt.h | 1 + arch/x86/kernel/kvm.c | 1 + 2 files changed, 2 insertions(+) commit 9c2a57d16d3c59624281de72233ac81e970f8123 Merge: 5a860f9184eb 41a531ffa4c5 Author: David S. Miller Date: Thu Jul 18 12:00:16 2019 -0700 Merge tag 'wireless-drivers-for-davem-2019-07-18' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for 5.3 First set of fixes for 5.3. iwlwifi * add new cards for 9000 and 20000 series and qu c-step devices ath10k * workaround an uninitialised variable warning rt2x00 * fix rx queue hand on USB ==================== Signed-off-by: David S. Miller commit fc2f14f8f7beac518996f9e8e4ef7c4754c0ab7d Author: Pablo Neira Ayuso Date: Thu Jul 18 20:20:00 2019 +0200 netfilter: bridge: NF_CONNTRACK_BRIDGE does not depend on NF_TABLES_BRIDGE Place NF_CONNTRACK_BRIDGE away from the NF_TABLES_BRIDGE dependency. Fixes: 3c171f496ef5 ("netfilter: bridge: add connection tracking system") Signed-off-by: Pablo Neira Ayuso net/bridge/netfilter/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 78e21eb699203f32f8c524b01fb7363125cf9d68 Author: Pablo Neira Ayuso Date: Wed Jul 17 21:48:32 2019 +0200 netfilter: nft_meta: skip EAGAIN if nft_meta_bridge is not a module If it is a module, request this module. Otherwise, if it is compiled built-in or not selected, skip this. Fixes: 0ef1efd1354d ("netfilter: nf_tables: force module load in case select_ops() returns -EAGAIN") Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_meta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e971ceb803e147e47c15cbb7c5b84327c6453786 Author: Fernando Fernandez Mancera Date: Mon Jul 15 21:31:49 2019 +0200 netfilter: synproxy: fix rst sequence number mismatch 14:51:00.024418 IP 192.168.122.1.41462 > netfilter.90: Flags [S], seq 4023580551, 14:51:00.024454 IP netfilter.90 > 192.168.122.1.41462: Flags [S.], seq 727560212, ack 4023580552, 14:51:00.024524 IP 192.168.122.1.41462 > netfilter.90: Flags [.], ack 1, Note: here, synproxy will send a SYN to the real server, as the 3whs was completed sucessfully. Instead of a syn/ack that we can intercept, we instead received a reset packet from the real backend, that we forward to the original client. However, we don't use the correct sequence number, so the reset is not effective in closing the connection coming from the client. 14:51:00.024550 IP netfilter.90 > 192.168.122.1.41462: Flags [R.], seq 3567407084, 14:51:00.231196 IP 192.168.122.1.41462 > netfilter.90: Flags [.], ack 1, 14:51:00.647911 IP 192.168.122.1.41462 > netfilter.90: Flags [.], ack 1, 14:51:01.474395 IP 192.168.122.1.41462 > netfilter.90: Flags [.], ack 1, Fixes: 48b1de4c110a ("netfilter: add SYNPROXY core/target") Signed-off-by: Fernando Fernandez Mancera Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_synproxy_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5a860f9184eb45b2df3fb3364a6b7d076545f83d Author: Chuhong Yuan Date: Thu Jul 18 15:45:42 2019 +0800 liquidio: Replace vmalloc + memset with vzalloc Use vzalloc and vzalloc_node instead of using vmalloc and vmalloc_node and then zeroing the allocated memory by memset 0. This simplifies the code. Signed-off-by: Chuhong Yuan Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/request_manager.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 7e5a70ad88b1e6f6d9b934b2efb41afff496820f Author: Aurelien Aptel Date: Wed Jul 17 12:46:28 2019 +0200 CIFS: fix deadlock in cached root handling Prevent deadlock between open_shroot() and cifs_mark_open_files_invalid() by releasing the lock before entering SMB2_open, taking it again after and checking if we still need to use the result. Link: https://lore.kernel.org/linux-cifs/684ed01c-cbca-2716-bc28-b0a59a0f8521@prodrive-technologies.com/T/#u Fixes: 3d4ef9a15343 ("smb3: fix redundant opens on root") Signed-off-by: Aurelien Aptel Reviewed-by: Pavel Shilovsky Signed-off-by: Steve French CC: Stable fs/cifs/smb2ops.c | 46 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) commit 818e95c768c6607a1df4cf022c00c3c58e2f203e Merge: d4df33b0e992 0aeb1def4416 Author: Linus Torvalds Date: Thu Jul 18 11:51:00 2019 -0700 Merge tag 'trace-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing updates from Steven Rostedt: "The main changes in this release include: - Add user space specific memory reading for kprobes - Allow kprobes to be executed earlier in boot The rest are mostly just various clean ups and small fixes" * tag 'trace-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (33 commits) tracing: Make trace_get_fields() global tracing: Let filter_assign_type() detect FILTER_PTR_STRING tracing: Pass type into tracing_generic_entry_update() ftrace/selftest: Test if set_event/ftrace_pid exists before writing ftrace/selftests: Return the skip code when tracing directory not configured in kernel tracing/kprobe: Check registered state using kprobe tracing/probe: Add trace_event_call accesses APIs tracing/probe: Add probe event name and group name accesses APIs tracing/probe: Add trace flag access APIs for trace_probe tracing/probe: Add trace_event_file access APIs for trace_probe tracing/probe: Add trace_event_call register API for trace_probe tracing/probe: Add trace_probe init and free functions tracing/uprobe: Set print format when parsing command tracing/kprobe: Set print format right after parsed command kprobes: Fix to init kprobes in subsys_initcall tracepoint: Use struct_size() in kmalloc() ring-buffer: Remove HAVE_64BIT_ALIGNED_ACCESS ftrace: Enable trampoline when rec count returns back to one tracing/kprobe: Do not run kprobe boot tests if kprobe_event is on cmdline tracing: Make a separate config for trace event self tests ... commit 54f698f31e595f3f0caf28bfe2bde0c3373f9a60 Merge: cac9b9a4b083 e55a73251da3 Author: Thomas Gleixner Date: Thu Jul 18 20:50:48 2019 +0200 Merge branch 'x86/debug' into core/urgent Pick up the two pending objtool patches as the next round of objtool fixes depend on them. commit 666a3d6e1e6b78df34f59e6c0b8907aa3c8dbb2e Author: Su Yanjun Date: Thu Jul 18 10:19:23 2019 +0800 udp: Fix typo in net/ipv4/udp.c Signed-off-by: Su Yanjun Signed-off-by: David S. Miller net/ipv4/udp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d4df33b0e9925c158b313a586fb1557cf29cfdf4 Merge: 366a4e38b8d0 8492101e15f9 Author: Linus Torvalds Date: Thu Jul 18 11:48:05 2019 -0700 Merge branch 'for-linus-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb Pull swiotlb updates from Konrad Rzeszutek Wilk: "One compiler fix, and a bug-fix in swiotlb_nr_tbl() and swiotlb_max_segment() to check also for no_iotlb_memory" * 'for-linus-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb: swiotlb: fix phys_addr_t overflow warning swiotlb: Return consistent SWIOTLB segments/nr_tbl swiotlb: Group identical cleanup in swiotlb_cleanup() commit 35cbef9863640f06107144687bd13151bc2e8ce3 Author: Justin Chen Date: Wed Jul 17 14:58:53 2019 -0700 net: bcmgenet: use promisc for unsupported filters Currently we silently ignore filters if we cannot meet the filter requirements. This will lead to the MAC dropping packets that are expected to pass. A better solution would be to set the NIC to promisc mode when the required filters cannot be met. Also correct the number of MDF filters supported. It should be 17, not 16. Signed-off-by: Justin Chen Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmgenet.c | 57 ++++++++++++-------------- 1 file changed, 26 insertions(+), 31 deletions(-) commit f554af280a80a49412acdd26a6371963f4741e70 Author: Trond Myklebust Date: Tue Jul 16 13:27:23 2019 -0400 SUNRPC: Optimise transport balancing code Moves the balancing code to avoid doing cursor changes on every search iteration. Signed-off-by: Trond Myklebust net/sunrpc/xprtmultipath.c | 67 ++++++++++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 29 deletions(-) commit 75369089820473eac45e9ddd970081901a373c08 Author: Trond Myklebust Date: Wed Jul 17 21:22:38 2019 -0400 SUNRPC: Ensure the bvecs are reset when we re-encode the RPC request The bvec tracks the list of pages, so if the number of pages changes due to a re-encode, we need to reset the bvec as well. Fixes: 277e4ab7d530 ("SUNRPC: Simplify TCP receive code by switching...") Signed-off-by: Trond Myklebust Cc: stable@vger.kernel.org # v4.20+ net/sunrpc/clnt.c | 3 +-- net/sunrpc/xprt.c | 2 ++ net/sunrpc/xprtsock.c | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) commit 8e04fdfadda75a849c649f7e50fe7d97772e1fcb Author: Trond Myklebust Date: Wed Jul 17 13:57:44 2019 -0400 pnfs/flexfiles: Fix PTR_ERR() dereferences in ff_layout_track_ds_error mirror->mirror_ds can be NULL if uninitialised, but can contain a PTR_ERR() if call to GETDEVICEINFO failed. Fixes: 65990d1afbd2 ("pNFS/flexfiles: Fix a deadlock on LAYOUTGET") Signed-off-by: Trond Myklebust Cc: stable@vger.kernel.org # 4.10+ fs/nfs/flexfilelayout/flexfilelayoutdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d9aba2b40de6fddd83f2fe3a5ac2bcd2c98fa66b Author: Trond Myklebust Date: Tue Jul 16 15:38:28 2019 -0400 NFSv4: Don't use the zero stateid with layoutget The NFSv4.1 protocol explicitly forbids us from using the zero stateid together with layoutget, so when we see that nfs4_select_rw_stateid() is unable to return a valid delegation, lock or open stateid, then we should initiate recovery and retry. Signed-off-by: Trond Myklebust fs/nfs/nfs4state.c | 3 +-- fs/nfs/pnfs.c | 14 +++++++++++--- 2 files changed, 12 insertions(+), 5 deletions(-) commit b4f1483cbfa5fafca4874e90063f75603edbc210 Author: Phil Sutter Date: Wed Jul 17 21:38:19 2019 +0200 netfilter: nf_tables: Support auto-loading for inet nat Trying to create an inet family nat chain would not cause nft_chain_nat.ko module to auto-load due to missing module alias. Add a proper one with hard-coded family value 1 for the pseudo-family NFPROTO_INET. Fixes: d164385ec572 ("netfilter: nat: add inet family nat support") Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_chain_nat.c | 3 +++ 1 file changed, 3 insertions(+) commit 366a4e38b8d0d3e8c7673ab5c1b5e76bbfbc0085 Merge: ae9b728c8dc0 89b408a68b9d Author: Linus Torvalds Date: Thu Jul 18 11:18:00 2019 -0700 Merge tag 'xfs-5.3-merge-13' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs cleanups from Darrick Wong: "We had a few more lateish cleanup patches come in for 5.3 -- a couple of syncups with the userspace libxfs code and a conversion of the XFS administrator's guide to ReST format. Summary: - Bring fs/xfs/libxfs/xfs_trans_inode.c in sync with userspace libxfs. - Convert the xfs administrator guide to rst and move it into the official admin guide under Documentation" * tag 'xfs-5.3-merge-13' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: Documentation: filesystem: Convert xfs.txt to ReST xfs: sync up xfs_trans_inode with userspace xfs: move xfs_trans_inode.c to libxfs/ commit ae9b728c8dc0a9939d89f84e8603258ca2a0df22 Merge: d9b9c893048e e9630660bd92 Author: Linus Torvalds Date: Thu Jul 18 11:11:51 2019 -0700 Merge tag '4.3-rc-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs updates from Steve French: "Fixes (three for stable) and improvements including much faster encryption (SMB3.1.1 GCM)" * tag '4.3-rc-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6: (27 commits) smb3: smbdirect no longer experimental cifs: fix crash in smb2_compound_op()/smb2_set_next_command() cifs: fix crash in cifs_dfs_do_automount cifs: fix parsing of symbolic link error response cifs: refactor and clean up arguments in the reparse point parsing SMB3: query inode number on open via create context smb3: Send netname context during negotiate protocol smb3: do not send compression info by default smb3: add new mount option to retrieve mode from special ACE smb3: Allow query of symlinks stored as reparse points cifs: Fix a race condition with cifs_echo_request cifs: always add credits back for unsolicited PDUs fs: cifs: cifsssmb: Change return type of convert_ace_to_cifs_ace add some missing definitions cifs: fix typo in debug message with struct field ia_valid smb3: minor cleanup of compound_send_recv CIFS: Fix module dependency cifs: simplify code by removing CONFIG_CIFS_ACL ifdef cifs: Fix check for matching with existing mount cifs: Properly handle auto disabling of serverino option ... commit d9b9c893048e9d308a833619f0866f1f52778cf5 Merge: 0fe49f70a08d d31d07b97a5e Author: Linus Torvalds Date: Thu Jul 18 11:05:25 2019 -0700 Merge tag 'ceph-for-5.3-rc1' of git://github.com/ceph/ceph-client Pull ceph updates from Ilya Dryomov: "Lots of exciting things this time! - support for rbd object-map and fast-diff features (myself). This will speed up reads, discards and things like snap diffs on sparse images. - ceph.snap.btime vxattr to expose snapshot creation time (David Disseldorp). This will be used to integrate with "Restore Previous Versions" feature added in Windows 7 for folks who reexport ceph through SMB. - security xattrs for ceph (Zheng Yan). Only selinux is supported for now due to the limitations of ->dentry_init_security(). - support for MSG_ADDR2, FS_BTIME and FS_CHANGE_ATTR features (Jeff Layton). This is actually a single feature bit which was missing because of the filesystem pieces. With this in, the kernel client will finally be reported as "luminous" by "ceph features" -- it is still being reported as "jewel" even though all required Luminous features were implemented in 4.13. - stop NULL-terminating ceph vxattrs (Jeff Layton). The convention with xattrs is to not terminate and this was causing inconsistencies with ceph-fuse. - change filesystem time granularity from 1 us to 1 ns, again fixing an inconsistency with ceph-fuse (Luis Henriques). On top of this there are some additional dentry name handling and cap flushing fixes from Zheng. Finally, Jeff is formally taking over for Zheng as the filesystem maintainer" * tag 'ceph-for-5.3-rc1' of git://github.com/ceph/ceph-client: (71 commits) ceph: fix end offset in truncate_inode_pages_range call ceph: use generic_delete_inode() for ->drop_inode ceph: use ceph_evict_inode to cleanup inode's resource ceph: initialize superblock s_time_gran to 1 MAINTAINERS: take over for Zheng as CephFS kernel client maintainer rbd: setallochint only if object doesn't exist rbd: support for object-map and fast-diff rbd: call rbd_dev_mapping_set() from rbd_dev_image_probe() libceph: export osd_req_op_data() macro libceph: change ceph_osdc_call() to take page vector for response libceph: bump CEPH_MSG_MAX_DATA_LEN (again) rbd: new exclusive lock wait/wake code rbd: quiescing lock should wait for image requests rbd: lock should be quiesced on reacquire rbd: introduce copyup state machine rbd: rename rbd_obj_setup_*() to rbd_obj_init_*() rbd: move OSD request allocation into object request state machines rbd: factor out __rbd_osd_setup_discard_ops() rbd: factor out rbd_osd_setup_copyup() rbd: introduce obj_req->osd_reqs list ... commit 0fe49f70a08d7d25acee3b066a88c654fea26121 Merge: f8c3500cd137 23c84eb78375 Author: Linus Torvalds Date: Thu Jul 18 10:58:52 2019 -0700 Merge tag 'dax-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull dax updates from Dan Williams: "The fruits of a bug hunt in the fsdax implementation with Willy and a small feature update for device-dax: - Fix a hang condition that started triggering after the Xarray conversion of fsdax in the v4.20 kernel. - Add a 'resource' (root-only physical base address) sysfs attribute to device-dax instances to correlate memory-blocks onlined via the kmem driver with a given device instance" * tag 'dax-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: dax: Fix missed wakeup with PMD faults device-dax: Add a 'resource' attribute commit f8c3500cd137867927bc080f4a6e02e0222dd1b8 Merge: d77e9e4e18ce 8c2e408e73f7 Author: Linus Torvalds Date: Thu Jul 18 10:52:08 2019 -0700 Merge tag 'libnvdimm-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm updates from Dan Williams: "Primarily just the virtio_pmem driver: - virtio_pmem The new virtio_pmem facility introduces a paravirtualized persistent memory device that allows a guest VM to use DAX mechanisms to access a host-file with host-page-cache. It arranges for MAP_SYNC to be disabled and instead triggers a host fsync() when a 'write-cache flush' command is sent to the virtual disk device. - Miscellaneous small fixups" * tag 'libnvdimm-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: virtio_pmem: fix sparse warning xfs: disable map_sync for async flush ext4: disable map_sync for async flush dax: check synchronous mapping is supported dm: enable synchronous dax libnvdimm: add dax_dev sync flag virtio-pmem: Add virtio pmem driver libnvdimm: nd_region flush callback support libnvdimm, namespace: Drop uuid_t implementation detail commit d77e9e4e18ce9da3b4981a5c537979c42b06638c Merge: 2ae048e16636 7fb832ae7294 Author: Linus Torvalds Date: Thu Jul 18 10:47:59 2019 -0700 Merge tag 'linux-watchdog-5.3-rc1' of git://www.linux-watchdog.org/linux-watchdog Pull watchdog updates from Wim Van Sebroeck: - add Allwinner H6 watchdog - drop warning after registering device patches - hpwdt improvements - gpio: add support for nowayout option - introduce CONFIG_WATCHDOG_OPEN_TIMEOUT - convert remaining drivers to use SPDX license identifier - Fixes and improvements on several watchdog device drivers * tag 'linux-watchdog-5.3-rc1' of git://www.linux-watchdog.org/linux-watchdog: (74 commits) watchdog: digicolor_wdt: Remove unused variable in dc_wdt_probe watchdog: ie6xx_wdt: Use spinlock_t instead of struct spinlock watchdog: atmel: atmel-sama5d4-wdt: Disable watchdog on system suspend watchdog: convert remaining drivers to use SPDX license identifier dt-bindings: watchdog: Rename bindings documentation file watchdog: mei_wdt: no need to check return value of debugfs_create functions watchdog: bcm_kona_wdt: no need to check return value of debugfs_create functions docs: watchdog: Fix build error. docs: watchdog: convert docs to ReST and rename to *.rst watchdog: make the device time out at open_deadline when open_timeout is used watchdog: introduce CONFIG_WATCHDOG_OPEN_TIMEOUT watchdog: introduce watchdog.open_timeout commandline parameter dt-bindings: watchdog: move i.MX system controller watchdog binding to SCU watchdog: imx_sc: Add pretimeout support watchdog: renesas_wdt: Add a few cycles delay watchdog: gpio: add support for nowayout option watchdog: renesas_wdt: Use 'dev' instead of dereferencing it repeatedly dt-bindings: watchdog: add Allwinner H6 watchdog watchdog: jz4740: Avoid starting watchdog in set_timeout watchdog: jz4740: Use register names from ... commit c0e48f9dea9129aa11bec3ed13803bcc26e96e49 Author: Zhengyuan Liu Date: Thu Jul 18 20:44:00 2019 +0800 io_uring: add a memory barrier before atomic_read There is a hang issue while using fio to do some basic test. The issue can be easily reproduced using the below script: while true do fio --ioengine=io_uring -rw=write -bs=4k -numjobs=1 \ -size=1G -iodepth=64 -name=uring --filename=/dev/zero done After several minutes (or more), fio would block at io_uring_enter->io_cqring_wait in order to waiting for previously committed sqes to be completed and can't return to user anymore until we send a SIGTERM to fio. After receiving SIGTERM, fio hangs at io_ring_ctx_wait_and_kill with a backtrace like this: [54133.243816] Call Trace: [54133.243842] __schedule+0x3a0/0x790 [54133.243868] schedule+0x38/0xa0 [54133.243880] schedule_timeout+0x218/0x3b0 [54133.243891] ? sched_clock+0x9/0x10 [54133.243903] ? wait_for_completion+0xa3/0x130 [54133.243916] ? _raw_spin_unlock_irq+0x2c/0x40 [54133.243930] ? trace_hardirqs_on+0x3f/0xe0 [54133.243951] wait_for_completion+0xab/0x130 [54133.243962] ? wake_up_q+0x70/0x70 [54133.243984] io_ring_ctx_wait_and_kill+0xa0/0x1d0 [54133.243998] io_uring_release+0x20/0x30 [54133.244008] __fput+0xcf/0x270 [54133.244029] ____fput+0xe/0x10 [54133.244040] task_work_run+0x7f/0xa0 [54133.244056] do_exit+0x305/0xc40 [54133.244067] ? get_signal+0x13b/0xbd0 [54133.244088] do_group_exit+0x50/0xd0 [54133.244103] get_signal+0x18d/0xbd0 [54133.244112] ? _raw_spin_unlock_irqrestore+0x36/0x60 [54133.244142] do_signal+0x34/0x720 [54133.244171] ? exit_to_usermode_loop+0x7e/0x130 [54133.244190] exit_to_usermode_loop+0xc0/0x130 [54133.244209] do_syscall_64+0x16b/0x1d0 [54133.244221] entry_SYSCALL_64_after_hwframe+0x49/0xbe The reason is that we had added a req to ctx->pending_async at the very end, but it didn't get a chance to be processed. How could this happen? fio#cpu0 wq#cpu1 io_add_to_prev_work io_sq_wq_submit_work atomic_read() <<< 1 atomic_dec_return() << 1->0 list_empty(); <<< true; list_add_tail() atomic_read() << 0 or 1? As atomic_ops.rst states, atomic_read does not guarantee that the runtime modification by any other thread is visible yet, so we must take care of that with a proper implicit or explicit memory barrier. This issue was detected with the help of Jackie's Fixes: 31b515106428 ("io_uring: allow workqueue item to handle multiple buffered requests") Signed-off-by: Zhengyuan Liu Signed-off-by: Jens Axboe fs/io_uring.c | 4 ++++ 1 file changed, 4 insertions(+) commit 2ae048e16636afd7521270acacb08d9c42fd23f0 Merge: d0411ec8ca6b 4914da2fb0c8 Author: Linus Torvalds Date: Thu Jul 18 09:36:51 2019 -0700 Merge tag 'sound-fix-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A collection of small fixes. - The optimization of PM resume with HD-audio HDMI codecs, which eventually work around weird issues - A correction of Intel Icelake HDMI audio code - Quirks for Dell machines with Realtek HD-audio codecs - The fix for too long sequencer write stall that was spotted by syzkaller - A few trivial cleanups reported by coccinelle" * tag 'sound-fix-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda - Don't resume forcibly i915 HDMI/DP codec ALSA: hda/hdmi - Fix i915 reverse port/pin mapping ALSA: hda/hdmi - Remove duplicated define ALSA: seq: Break too long mutex context in the write loop ALSA: hda/realtek: apply ALC891 headset fixup to one Dell machine ALSA: rme9652: Unneeded variable: "result". ALSA: emu10k1: Remove unneeded variable "change" ALSA: au88x0: Remove unneeded variable: "changed" ALSA: hda/realtek - Fixed Headphone Mic can't record on Dell platform ALSA: ps3: Remove Unneeded variable: "ret" ALSA: lx6464es: Remove unneeded variable err commit d0411ec8ca6b98061023873e334323ef102100cc Merge: 4b09ddbcd107 918e162e6a71 Author: Linus Torvalds Date: Thu Jul 18 09:32:28 2019 -0700 Merge tag 'pm-5.3-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more power management updates from Rafael Wysocki: "These modify the Intel RAPL driver to allow it to use an MMIO interface to the hardware, make the int340X thermal driver provide such an interface for it, add Intel Ice Lake CPU IDs to the RAPL driver (these changes depend on the previously merged x86 arch changes), update cpufreq to use the PM QoS framework for managing the min and max frequency limits, and add update the imx-cpufreq-dt cpufreq driver to support i.MX8MN. Specifics: - Add MMIO interface support to the Intel RAPL power capping driver and update the int340X thermal driver to provide a RAPL MMIO interface (Zhang Rui, Stephen Rothwell). - Add Intel Ice Lake CPU IDs to the RAPL driver (Zhang Rui, Rajneesh Bhardwaj). - Make cpufreq use the PM QoS framework (instead of notifiers) for managing the min and max frequency constraints (Viresh Kumar). - Add i.MX8MN support to the imx-cpufreq-dt cpufreq driver (Anson Huang)" * tag 'pm-5.3-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (27 commits) cpufreq: Make cpufreq_generic_init() return void intel_rapl: need linux/cpuhotplug.h for enum cpuhp_state powercap/rapl: Add Ice Lake NNPI support to RAPL driver powercap/intel_rapl: add support for ICX-D powercap/intel_rapl: add support for ICX powercap/intel_rapl: add support for IceLake desktop intel_rapl: Fix module autoloading issue int340X/processor_thermal_device: add support for MMIO RAPL intel_rapl: support two power limits for every RAPL domain intel_rapl: support 64 bit register intel_rapl: abstract RAPL common code intel_rapl: cleanup hardcoded MSR access intel_rapl: cleanup some functions intel_rapl: abstract register access operations intel_rapl: abstract register address intel_rapl: introduce struct rapl_if_private intel_rapl: introduce intel_rapl.h intel_rapl: remove hardcoded register index intel_rapl: use reg instead of msr cpufreq: imx-cpufreq-dt: Add i.MX8MN support ... commit ac38297f7038cd5b80d66f8809c7bbf5b70031f3 Author: Josef Bacik Date: Tue Jul 16 16:19:29 2019 -0400 rq-qos: use a mb for got_token Oleg noticed that our checking of data.got_token is unsafe in the cleanup case, and should really use a memory barrier. Use a wmb on the write side, and a rmb() on the read side. We don't need one in the main loop since we're saved by set_current_state(). Reviewed-by: Oleg Nesterov Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe block/blk-rq-qos.c | 3 +++ 1 file changed, 3 insertions(+) commit d14a9b389a86a5154b704bc88ce8dd37c701456a Author: Josef Bacik Date: Tue Jul 16 16:19:28 2019 -0400 rq-qos: set ourself TASK_UNINTERRUPTIBLE after we schedule In case we get a spurious wakeup we need to make sure to re-set ourselves to TASK_UNINTERRUPTIBLE so we don't busy wait. Reviewed-by: Oleg Nesterov Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe block/blk-rq-qos.c | 1 + 1 file changed, 1 insertion(+) commit 64e7ea875ef63b2801be7954cf7257d1bfccc266 Author: Josef Bacik Date: Tue Jul 16 16:19:27 2019 -0400 rq-qos: don't reset has_sleepers on spurious wakeups If we raced with somebody else getting an inflight counter we could fail to get an inflight counter with no sleepers on the list, and thus need to go to sleep. In this case has_sleepers should be true because we are now relying on the waker to get our inflight counter for us. And in the case of spurious wakeups we'd still want this to be the case. So set has_sleepers to true if we went to sleep to make sure we're woken up the proper way. Reviewed-by: Oleg Nesterov Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe block/blk-rq-qos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 545fbd0775bafcefc8f7bc844291bd13c44b7fdc Author: Josef Bacik Date: Tue Jul 16 16:19:26 2019 -0400 rq-qos: fix missed wake-ups in rq_qos_throttle We saw a hang in production with WBT where there was only one waiter in the throttle path and no outstanding IO. This is because of the has_sleepers optimization that is used to make sure we don't steal an inflight counter for new submitters when there are people already on the list. We can race with our check to see if the waitqueue has any waiters (this is done locklessly) and the time we actually add ourselves to the waitqueue. If this happens we'll go to sleep and never be woken up because nobody is doing IO to wake us up. Fix this by checking if the waitqueue has a single sleeper on the list after we add ourselves, that way we have an uptodate view of the list. Reviewed-by: Oleg Nesterov Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe block/blk-rq-qos.c | 1 + 1 file changed, 1 insertion(+) commit a6d81d30d3cd87f85bfd922358eb18b8146c4925 Author: Josef Bacik Date: Tue Jul 16 16:19:25 2019 -0400 wait: add wq_has_single_sleeper helper rq-qos sits in the io path so we want to take locks as sparingly as possible. To accomplish this we try not to take the waitqueue head lock unless we are sure we need to go to sleep, and we have an optimization to make sure that we don't starve out existing waiters. Since we check if there are existing waiters locklessly we need to be able to update our view of the waitqueue list after we've added ourselves to the waitqueue. Accomplish this by adding this helper to see if there is more than just ourselves on the list. Reviewed-by: Oleg Nesterov Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe include/linux/wait.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 4b09ddbcd107e280077bd3e918c8089dfa426980 Merge: 47d6a7607443 2c66a5b52e9e Author: Linus Torvalds Date: Thu Jul 18 09:12:34 2019 -0700 Merge tag 'acpi-5.3-rc1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more ACPI updates from Rafael Wysocki: "These get rid of two clang warnings, add a new quirk mechanism to the ACPI backlight driver (and apply it to one machine) and update the table load object initialization in ACPICA (this is a replacement for a previously reverted ACPICA commit). Specifics: - Make ACPI table loading work more consistently regardless of the exact mechanism used for loading a table (Erik Schmauss). - Get rid of two clang warnings (Arnd Bergmann). - Add new quirk mechanism to the ACPI backlight driver and use it to add a quirk for PB Easynote MZ35 (Hans de Goede)" * tag 'acpi-5.3-rc1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: video: Add new hw_changes_brightness quirk, set it on PB Easynote MZ35 ACPI: fix false-positive -Wuninitialized warning ACPI: blacklist: fix clang warning for unused DMI table ACPICA: Update table load object initialization commit 47d6a7607443ea43dbc4d0f371bf773540a8f8f4 Merge: 22051d9c4a57 be2ece49e683 Author: Linus Torvalds Date: Thu Jul 18 08:43:20 2019 -0700 Merge branch 'floppy' Merge floppy ioctl verification fixes from Denis Efremov. This also marks the floppy driver as orphaned - it turns out that Jiri no longer has working hardware. Actual working physical floppy hardware is getting hard to find, and while Willy was able to test this, I think the driver can be considered pretty much dead from an actual hardware standpoint. The hardware that is still sold seems to be mainly USB-based, which doesn't use this legacy driver at all. The old floppy disk controller is still emulated in various VM environments, so the driver isn't going away, but let's see if anybody is interested to step up to maintain it. The lack of hardware also likely means that the ioctl range verification fixes are probably mostly relevant to anybody using floppies in a virtual environment. Which is probably also going away in favor of USB storage emulation, but who knows. Will Decon reviewed the patches but I'm not rebasing them just for that, so I'll add a Reviewed-by: Will Deacon here instead. * floppy: MAINTAINERS: mark floppy.c orphaned floppy: fix out-of-bounds read in copy_buffer floppy: fix invalid pointer dereference in drive_name floppy: fix out-of-bounds read in next_valid_format floppy: fix div-by-zero in setup_format_params commit be2ece49e68361f9b56098e5df3ddbccf87d140a Author: Jiri Kosina Date: Thu Jul 18 00:03:51 2019 +0200 MAINTAINERS: mark floppy.c orphaned I volunteered myself to maintain it quite some time ago back when I fixed the concurrency issues which exhibited itself only with VM-emulated devices, and at the same time I still had the physical 3.5" reader to test all the changes. The reader doesn't work any more though, so I guess it's time to step down from this super-prestigious role :p and mark floppy.c as Orphaned. Signed-off-by: Jiri Kosina Signed-off-by: Linus Torvalds MAINTAINERS | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 2d69fbf3d01a5b71e98137e2406d4087960c512e Author: Paul Walmsley Date: Wed Jul 17 13:41:51 2019 -0700 riscv: fix build break after macro-to-function conversion in generic cacheflush.h Commit c296d4dc13ae ("asm-generic: fix a compilation warning") converted the various flush_*cache_* macros in asm-generic/cacheflush.h to static inline functions. This breaks RISC-V builds, since RISC-V's cacheflush.h includes the generic cacheflush.h and then undefines the macros to be overridden. Fix by copying the subset of the no-op functions that are reused from the generic cacheflush.h into the RISC-V cacheflush.h, and dropping the include of the generic cacheflush.h. Fixes: c296d4dc13ae ("asm-generic: fix a compilation warning") Signed-off-by: Paul Walmsley Cc: Qian Cai Cc: Arnd Bergmann Cc: Andrew Morton Cc: Linus Torvalds arch/riscv/include/asm/cacheflush.h | 63 ++++++++++++++++++++++++++++++++++--- 1 file changed, 59 insertions(+), 4 deletions(-) commit cac9b9a4b08304f11daace03b8b48659355e44c1 Author: Peter Zijlstra Date: Thu Jul 18 10:47:47 2019 +0200 stacktrace: Force USER_DS for stack_trace_save_user() When walking userspace stacks, USER_DS needs to be set, otherwise access_ok() will not function as expected. Reported-by: Vegard Nossum Reported-by: Eiichi Tsukata Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Tested-by: Vegard Nossum Reviewed-by: Joel Fernandes (Google) Link: https://lkml.kernel.org/r/20190718085754.GM3402@hirez.programming.kicks-ass.net kernel/stacktrace.c | 5 +++++ 1 file changed, 5 insertions(+) commit 4d202c8c8ed3822327285747db1765967110b274 Author: Gautham R. Shenoy Date: Wed Jul 17 16:05:24 2019 +0530 powerpc/xive: Fix loop exit-condition in xive_find_target_in_mask() xive_find_target_in_mask() has the following for(;;) loop which has a bug when @first == cpumask_first(@mask) and condition 1 fails to hold for every CPU in @mask. In this case we loop forever in the for-loop. first = cpu; for (;;) { if (cpu_online(cpu) && xive_try_pick_target(cpu)) // condition 1 return cpu; cpu = cpumask_next(cpu, mask); if (cpu == first) // condition 2 break; if (cpu >= nr_cpu_ids) // condition 3 cpu = cpumask_first(mask); } This is because, when @first == cpumask_first(@mask), we never hit the condition 2 (cpu == first) since prior to this check, we would have executed "cpu = cpumask_next(cpu, mask)" which will set the value of @cpu to a value greater than @first or to nr_cpus_ids. When this is coupled with the fact that condition 1 is not met, we will never exit this loop. This was discovered by the hard-lockup detector while running LTP test concurrently with SMT switch tests. watchdog: CPU 12 detected hard LOCKUP on other CPUs 68 watchdog: CPU 12 TB:85587019220796, last SMP heartbeat TB:85578827223399 (15999ms ago) watchdog: CPU 68 Hard LOCKUP watchdog: CPU 68 TB:85587019361273, last heartbeat TB:85576815065016 (19930ms ago) CPU: 68 PID: 45050 Comm: hxediag Kdump: loaded Not tainted 4.18.0-100.el8.ppc64le #1 NIP: c0000000006f5578 LR: c000000000cba9ec CTR: 0000000000000000 REGS: c000201fff3c7d80 TRAP: 0100 Not tainted (4.18.0-100.el8.ppc64le) MSR: 9000000002883033 CR: 24028424 XER: 00000000 CFAR: c0000000006f558c IRQMASK: 1 GPR00: c0000000000afc58 c000201c01c43400 c0000000015ce500 c000201cae26ec18 GPR04: 0000000000000800 0000000000000540 0000000000000800 00000000000000f8 GPR08: 0000000000000020 00000000000000a8 0000000080000000 c00800001a1beed8 GPR12: c0000000000b1410 c000201fff7f4c00 0000000000000000 0000000000000000 GPR16: 0000000000000000 0000000000000000 0000000000000540 0000000000000001 GPR20: 0000000000000048 0000000010110000 c00800001a1e3780 c000201cae26ed18 GPR24: 0000000000000000 c000201cae26ed8c 0000000000000001 c000000001116bc0 GPR28: c000000001601ee8 c000000001602494 c000201cae26ec18 000000000000001f NIP [c0000000006f5578] find_next_bit+0x38/0x90 LR [c000000000cba9ec] cpumask_next+0x2c/0x50 Call Trace: [c000201c01c43400] [c000201cae26ec18] 0xc000201cae26ec18 (unreliable) [c000201c01c43420] [c0000000000afc58] xive_find_target_in_mask+0x1b8/0x240 [c000201c01c43470] [c0000000000b0228] xive_pick_irq_target.isra.3+0x168/0x1f0 [c000201c01c435c0] [c0000000000b1470] xive_irq_startup+0x60/0x260 [c000201c01c43640] [c0000000001d8328] __irq_startup+0x58/0xf0 [c000201c01c43670] [c0000000001d844c] irq_startup+0x8c/0x1a0 [c000201c01c436b0] [c0000000001d57b0] __setup_irq+0x9f0/0xa90 [c000201c01c43760] [c0000000001d5aa0] request_threaded_irq+0x140/0x220 [c000201c01c437d0] [c00800001a17b3d4] bnx2x_nic_load+0x188c/0x3040 [bnx2x] [c000201c01c43950] [c00800001a187c44] bnx2x_self_test+0x1fc/0x1f70 [bnx2x] [c000201c01c43a90] [c000000000adc748] dev_ethtool+0x11d8/0x2cb0 [c000201c01c43b60] [c000000000b0b61c] dev_ioctl+0x5ac/0xa50 [c000201c01c43bf0] [c000000000a8d4ec] sock_do_ioctl+0xbc/0x1b0 [c000201c01c43c60] [c000000000a8dfb8] sock_ioctl+0x258/0x4f0 [c000201c01c43d20] [c0000000004c9704] do_vfs_ioctl+0xd4/0xa70 [c000201c01c43de0] [c0000000004ca274] sys_ioctl+0xc4/0x160 [c000201c01c43e30] [c00000000000b388] system_call+0x5c/0x70 Instruction dump: 78aad182 54a806be 3920ffff 78a50664 794a1f24 7d294036 7d43502a 7d295039 4182001c 48000034 78a9d182 79291f24 <7d23482a> 2fa90000 409e0020 38a50040 To fix this, move the check for condition 2 after the check for condition 3, so that we are able to break out of the loop soon after iterating through all the CPUs in the @mask in the problem case. Use do..while() to achieve this. Fixes: 243e25112d06 ("powerpc/xive: Native exploitation of the XIVE interrupt controller") Cc: stable@vger.kernel.org # v4.12+ Reported-by: Indira P. Joga Signed-off-by: Gautham R. Shenoy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1563359724-13931-1-git-send-email-ego@linux.vnet.ibm.com arch/powerpc/sysdev/xive/common.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit b5e02b484d6f12112d49326bff2aecfccd2f518d Author: Paolo Valente Date: Thu Jul 18 09:08:52 2019 +0200 block, bfq: check also in-flight I/O in dispatch plugging Consider a sync bfq_queue Q that remains empty while in service, and suppose that, when this happens, there is a fair amount of already in-flight I/O not belonging to Q. In such a situation, I/O dispatching may need to be plugged (until new I/O arrives for Q), for the following reason. The drive may decide to serve in-flight non-Q's I/O requests before Q's ones, thereby delaying the arrival of new I/O requests for Q (recall that Q is sync). If I/O-dispatching is not plugged, then, while Q remains empty, a basically uncontrolled amount of I/O from other queues may be dispatched too, possibly causing the service of Q's I/O to be delayed even longer in the drive. This problem gets more and more serious as the speed and the queue depth of the drive grow, because, as these two quantities grow, the probability to find no queue busy but many requests in flight grows too. If Q has the same weight and priority as the other queues, then the above delay is unlikely to cause any issue, because all queues tend to undergo the same treatment. So, since not plugging I/O dispatching is convenient for throughput, it is better not to plug. Things change in case Q has a higher weight or priority than some other queue, because Q's service guarantees may simply be violated. For this reason, commit 1de0c4cd9ea6 ("block, bfq: reduce idling only in symmetric scenarios") does plug I/O in such an asymmetric scenario. Plugging minimizes the delay induced by already in-flight I/O, and enables Q to recover the bandwidth it may lose because of this delay. Yet the above commit does not cover the case of weight-raised queues, for efficiency concerns. For weight-raised queues, I/O-dispatch plugging is activated simply if not all bfq_queues are weight-raised. But this check does not handle the case of in-flight requests, because a bfq_queue may become non busy *before* all its in-flight requests are completed. This commit performs I/O-dispatch plugging for weight-raised queues if there are some in-flight requests. As a practical example of the resulting recover of control, under write load on a Samsung SSD 970 PRO, gnome-terminal starts in 1.5 seconds after this fix, against 15 seconds before the fix (as a reference, gnome-terminal takes about 35 seconds to start with any of the other I/O schedulers). Fixes: 1de0c4cd9ea6 ("block, bfq: reduce idling only in symmetric scenarios") Signed-off-by: Paolo Valente Signed-off-by: Jens Axboe block/bfq-iosched.c | 67 ++++++++++++++++++++++++++++++++++------------------- 1 file changed, 43 insertions(+), 24 deletions(-) commit 70256b42caaf3e13c2932c2be7903a73fbe8bb8b Author: Kai-Heng Feng Date: Thu Jul 18 17:53:13 2019 +0800 ALSA: line6: Fix wrong altsetting for LINE6_PODHD500_1 Commit 7b9584fa1c0b ("staging: line6: Move altsetting to properties") set a wrong altsetting for LINE6_PODHD500_1 during refactoring. Set the correct altsetting number to fix the issue. BugLink: https://bugs.launchpad.net/bugs/1790595 Fixes: 7b9584fa1c0b ("staging: line6: Move altsetting to properties") Signed-off-by: Kai-Heng Feng Cc: Signed-off-by: Takashi Iwai sound/usb/line6/podhd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 59d81c1e3cade953a0cb3f66ce9a3f2398fdfac3 Author: Takashi Iwai Date: Tue Jul 16 11:52:00 2019 +0200 ALSA: hda - Optimize resume for codecs without jack detection The codecs without jack detection also don't have to be resumed forcibly because, obviously, they have no jack. Skip the forced resume in such a case as optimization as well. Reviewed-by: Kai Vehmanen Signed-off-by: Takashi Iwai sound/pci/hda/hda_codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2c66a5b52e9e328cd52af0d961f99a0e6717a065 Merge: d1fb5b2f623b dfd6f9ad3636 4f7f96453b46 Author: Rafael J. Wysocki Date: Thu Jul 18 10:22:20 2019 +0200 Merge branches 'acpi-misc' and 'acpi-video' * acpi-misc: ACPI: fix false-positive -Wuninitialized warning ACPI: blacklist: fix clang warning for unused DMI table * acpi-video: ACPI: video: Add new hw_changes_brightness quirk, set it on PB Easynote MZ35 commit 918e162e6a71e924a343b41f71789ad14e1e3229 Merge: 8da04e05cdfc c4dcc8a16278 Author: Rafael J. Wysocki Date: Thu Jul 18 09:49:30 2019 +0200 Merge branch 'pm-cpufreq' * pm-cpufreq: cpufreq: Make cpufreq_generic_init() return void cpufreq: imx-cpufreq-dt: Add i.MX8MN support cpufreq: Add QoS requests for userspace constraints cpufreq: intel_pstate: Reuse refresh_frequency_limits() cpufreq: Register notifiers with the PM QoS framework PM / QoS: Add support for MIN/MAX frequency constraints PM / QOS: Pass request type to dev_pm_qos_read_value() PM / QOS: Rename __dev_pm_qos_read_value() and dev_pm_qos_raw_read_value() PM / QOS: Pass request type to dev_pm_qos_{add|remove}_notifier() commit cf144f81a99d1a3928f90b0936accfd3f45c9a0a Author: Daniel Jordan Date: Tue Jul 16 12:32:53 2019 -0400 padata: use smp_mb in padata_reorder to avoid orphaned padata jobs Testing padata with the tcrypt module on a 5.2 kernel... # modprobe tcrypt alg="pcrypt(rfc4106(gcm(aes)))" type=3 # modprobe tcrypt mode=211 sec=1 ...produces this splat: INFO: task modprobe:10075 blocked for more than 120 seconds. Not tainted 5.2.0-base+ #16 modprobe D 0 10075 10064 0x80004080 Call Trace: ? __schedule+0x4dd/0x610 ? ring_buffer_unlock_commit+0x23/0x100 schedule+0x6c/0x90 schedule_timeout+0x3b/0x320 ? trace_buffer_unlock_commit_regs+0x4f/0x1f0 wait_for_common+0x160/0x1a0 ? wake_up_q+0x80/0x80 { crypto_wait_req } # entries in braces added by hand { do_one_aead_op } { test_aead_jiffies } test_aead_speed.constprop.17+0x681/0xf30 [tcrypt] do_test+0x4053/0x6a2b [tcrypt] ? 0xffffffffa00f4000 tcrypt_mod_init+0x50/0x1000 [tcrypt] ... The second modprobe command never finishes because in padata_reorder, CPU0's load of reorder_objects is executed before the unlocking store in spin_unlock_bh(pd->lock), causing CPU0 to miss CPU1's increment: CPU0 CPU1 padata_reorder padata_do_serial LOAD reorder_objects // 0 INC reorder_objects // 1 padata_reorder TRYLOCK pd->lock // failed UNLOCK pd->lock CPU0 deletes the timer before returning from padata_reorder and since no other job is submitted to padata, modprobe waits indefinitely. Add a pair of full barriers to guarantee proper ordering: CPU0 CPU1 padata_reorder padata_do_serial UNLOCK pd->lock smp_mb() LOAD reorder_objects INC reorder_objects smp_mb__after_atomic() padata_reorder TRYLOCK pd->lock smp_mb__after_atomic is needed so the read part of the trylock operation comes after the INC, as Andrea points out. Thanks also to Andrea for help with writing a litmus test. Fixes: 16295bec6398 ("padata: Generic parallelization/serialization interface") Signed-off-by: Daniel Jordan Cc: Cc: Andrea Parri Cc: Boqun Feng Cc: Herbert Xu Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Steffen Klassert Cc: linux-arch@vger.kernel.org Cc: linux-crypto@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Herbert Xu kernel/padata.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 83bf42510d7f7e1daa692c096e8e9919334d7b57 Author: David Rientjes Date: Fri Jul 12 13:41:58 2019 -0700 crypto: ccp - Fix SEV_VERSION_GREATER_OR_EQUAL SEV_VERSION_GREATER_OR_EQUAL() will fail if upgrading from 2.2 to 3.1, for example, because the minor version is not equal to or greater than the major. Fix this and move to a static inline function for appropriate type checking. Fixes: edd303ff0e9e ("crypto: ccp - Add DOWNLOAD_FIRMWARE SEV command") Reported-by: Cfir Cohen Signed-off-by: David Rientjes Acked-by: Tom Lendacky Acked-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/psp-dev.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit 538a5a072e6ef04377b180ee9b3ce5bae0a85da4 Author: Cfir Cohen Date: Tue Jul 2 10:32:56 2019 -0700 crypto: ccp/gcm - use const time tag comparison. Avoid leaking GCM tag through timing side channel. Fixes: 36cf515b9bbe ("crypto: ccp - Enable support for AES GCM on v5 CCPs") Cc: # v4.12+ Signed-off-by: Cfir Cohen Acked-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-ops.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7402a4fedc2bc448100c2d086406c708451b16dc Author: Trond Myklebust Date: Tue Jul 16 13:51:29 2019 -0400 SUNRPC: Fix up backchannel slot table accounting Add a per-transport maximum limit in the socket case, and add helpers to allow the NFSv4 code to discover that limit. Signed-off-by: Trond Myklebust fs/nfs/nfs4proc.c | 3 +++ include/linux/sunrpc/bc_xprt.h | 1 + include/linux/sunrpc/clnt.h | 1 + include/linux/sunrpc/xprt.h | 6 ++++-- net/sunrpc/backchannel_rqst.c | 40 +++++++++++++++++++++------------------ net/sunrpc/clnt.c | 13 +++++++++++++ net/sunrpc/svc.c | 2 +- net/sunrpc/xprtrdma/backchannel.c | 7 +++++++ net/sunrpc/xprtrdma/transport.c | 1 + net/sunrpc/xprtrdma/xprt_rdma.h | 1 + net/sunrpc/xprtsock.c | 1 + 11 files changed, 55 insertions(+), 21 deletions(-) commit 9f98effc19bd490a375c4e764a56a2c015d27c3c Author: Trond Myklebust Date: Thu Jul 18 01:10:51 2019 -0400 SUNRPC: Fix initialisation of struct rpc_xprt_switch Ensure that we do initialise the fields xps_nactive, xps_queuelen and xps_net. Signed-off-by: Trond Myklebust net/sunrpc/xprtmultipath.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit b3c8a40cfc4a7051ac8b7b3fc5fe1ee1467bef25 Merge: 3729fe2bc2a0 7f3bbc0b817b Author: Dave Airlie Date: Thu Jul 18 15:03:13 2019 +1000 Merge tag 'drm-misc-next-fixes-2019-07-11' of git://anongit.freedesktop.org/drm/drm-misc into drm-next Pull request for drm-misc-fixes-next for v5.3: - Revert properties exposed in komeda that need improvement before they become ABI. - Only add modes from the cmdline if they are valid. - Add orientation quirk for GPD MicroPC. - Reduce stack usage in drm selftests. - Fix bochs framebuffer setup. Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/e6b84ce4-2728-fb02-87c1-6a6b87703c0b@linux.intel.com commit a1078e821b605813b63bf6bca414a85f804d5c66 Author: Juergen Gross Date: Wed Jun 19 11:00:56 2019 +0200 xen: let alloc_xenballooned_pages() fail if not enough memory free Instead of trying to allocate pages with GFP_USER in add_ballooned_pages() check the available free memory via si_mem_available(). GFP_USER is far less limiting memory exhaustion than the test via si_mem_available(). This will avoid dom0 running out of memory due to excessive foreign page mappings especially on ARM and on x86 in PVH mode, as those don't have a pre-ballooned area which can be used for foreign mappings. As the normal ballooning suffers from the same problem don't balloon down more than si_mem_available() pages in one iteration. At the same time limit the default maximum number of retries. This is part of XSA-300. Signed-off-by: Juergen Gross drivers/xen/balloon.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit 8e144797f1a67c52e386161863da4614a23ad913 Author: Michael Forney Date: Wed Jul 10 16:20:11 2019 -0500 objtool: Rename elf_open() to prevent conflict with libelf from elftoolchain The elftoolchain version of libelf has a function named elf_open(). The function name isn't quite accurate anyway, since it also reads all the ELF data. Rename it to elf_read(), which is more accurate. [ jpoimboe: rename to elf_read(); write commit description ] Signed-off-by: Michael Forney Signed-off-by: Josh Poimboeuf Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/7ce2d1b35665edf19fd0eb6fbc0b17b81a48e62f.1562793604.git.jpoimboe@redhat.com tools/objtool/check.c | 2 +- tools/objtool/elf.c | 2 +- tools/objtool/elf.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 3c3ea5031761fdd144b461d23a077c3a0cf427fa Author: Michael Forney Date: Wed Jul 10 16:17:35 2019 -0500 objtool: Use Elf_Scn typedef instead of assuming struct name The libelf implementation might use a different struct name, and the Elf_Scn typedef is already used throughout the rest of objtool. Signed-off-by: Michael Forney Signed-off-by: Josh Poimboeuf Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/d270e1be2835fc2a10acf67535ff2ebd2145bf43.1562793448.git.jpoimboe@redhat.com tools/objtool/elf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e0c5c5e308ee9b3548844f0d88da937782b895ef Merge: e4557c1a46b0 916c31fff946 Author: Thomas Gleixner Date: Thu Jul 18 00:32:52 2019 +0200 Merge tag 'perf-core-for-mingo-5.3-20190715' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: perf db-export: Adrian Hunter: - Improvements in how COMM details are exported to databases for post processing and use in the sql-viewer.py UI. - Export switch events to the database. BPF: Arnaldo Carvalho de Melo: - Bump rlimit(MEMLOCK) for 'perf test bpf' and 'perf trace', just like selftests/bpf/bpf_rlimit.h do, which makes errors due to exhaustion of this limit, which are kinda cryptic (EPERM sometimes) less frequent. perf version: Ravi Bangoria: - Fix segfault due to missing OPT_END(), noticed on PowerPC. perf vendor events: Thomas Richter: - Add JSON files for IBM s/390 machine type 8561. perf cs-etm (ARM): YueHaibing: - Fix two cases of error returns not bing done properly: Invalid ERR_PTR() use and loss of propagation error codes. commit 49d05fe2c9d1b4a27761c9807fec39b8155bef9e Author: David Ahern Date: Wed Jul 17 15:08:43 2019 -0700 ipv6: rt6_check should return NULL if 'from' is NULL Paul reported that l2tp sessions were broken after the commit referenced in the Fixes tag. Prior to this commit rt6_check returned NULL if the rt6_info 'from' was NULL - ie., the dst_entry was disconnected from a FIB entry. Restore that behavior. Fixes: 93531c674315 ("net/ipv6: separate handling of FIB entries from dst based routes") Reported-by: Paul Donohue Tested-by: Paul Donohue Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv6/route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 866e5fd8a7123444d865340ff21c1673f74cdecd Author: Jon Maloy Date: Wed Jul 17 23:43:44 2019 +0200 tipc: initialize 'validated' field of received packets The tipc_msg_validate() function leaves a boolean flag 'validated' in the validated buffer's control block, to avoid performing this action more than once. However, at reception of new packets, the position of this field may already have been set by lower layer protocols, so that the packet is erroneously perceived as already validated by TIPC. We fix this by initializing the said field to 'false' before performing the initial validation. Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/node.c | 1 + 1 file changed, 1 insertion(+) commit 7b379472bc530fd9929f8791c4daffc63ca90e0c Merge: f1bf3e2ab42d adb701d6cfa4 Author: David S. Miller Date: Wed Jul 17 15:23:39 2019 -0700 Merge branch 'ipv4-relax-source-validation-check-for-loopback-packets' Cong Wang says: ==================== ipv4: relax source validation check for loopback packets This patchset fixes a corner case when loopback packets get dropped by rp_filter when we route them from veth to lo. Patch 1 is the fix and patch 2 provides a simplified test case for this scenario. ==================== Signed-off-by: David S. Miller commit adb701d6cfa432f5dbdf28839b5e64291a7ed30b Author: Cong Wang Date: Wed Jul 17 14:41:59 2019 -0700 selftests: add a test case for rp_filter Add a test case to simulate the loopback packet case fixed in the previous patch. This test gets passed after the fix: IPv4 rp_filter tests TEST: rp_filter passes local packets [ OK ] TEST: rp_filter passes loopback packets [ OK ] Cc: David Ahern Signed-off-by: Cong Wang Reviewed-by: David Ahern Signed-off-by: David S. Miller tools/testing/selftests/net/fib_tests.sh | 35 +++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) commit 66f8209547cc11d8e139d45cb7c937c1bbcce182 Author: Cong Wang Date: Wed Jul 17 14:41:58 2019 -0700 fib: relax source validation check for loopback packets In a rare case where we redirect local packets from veth to lo, these packets fail to pass the source validation when rp_filter is turned on, as the tracing shows: <...>-311708 [040] ..s1 7951180.957825: fib_table_lookup: table 254 oif 0 iif 1 src 10.53.180.130 dst 10.53.180.130 tos 0 scope 0 flags 0 <...>-311708 [040] ..s1 7951180.957826: fib_table_lookup_nh: nexthop dev eth0 oif 4 src 10.53.180.130 So, the fib table lookup returns eth0 as the nexthop even though the packets are local and should be routed to loopback nonetheless, but they can't pass the dev match check in fib_info_nh_uses_dev() without this patch. It should be safe to relax this check for this special case, as normally packets coming out of loopback device still have skb_dst so they won't even hit this slow path. Cc: Julian Anastasov Cc: David Ahern Signed-off-by: Cong Wang Reviewed-by: David Ahern Signed-off-by: David S. Miller net/ipv4/fib_frontend.c | 5 +++++ 1 file changed, 5 insertions(+) commit f1bf3e2ab42d20a7683e1c689f3ce8e942da03d4 Merge: a6574227a81f 577fa14d2100 Author: David S. Miller Date: Wed Jul 17 15:19:46 2019 -0700 Merge branch 'mlxsw-Two-fixes' Ido Schimmel says: ==================== mlxsw: Two fixes This patchset contains two fixes for mlxsw. Patch #1 from Petr fixes an issue in which DSCP rewrite can occur even if the egress port was switched to Trust L2 mode where priority mapping is based on PCP. Patch #2 fixes a problem where packets can be learned on a non-existing FID if a tc filter with a redirect action is configured on a bridged port. The problem and fix are explained in detail in the commit message. Please consider both patches for 5.2.y ==================== Signed-off-by: David S. Miller commit 577fa14d210073ba1ce6237c659a8820312104ad Author: Ido Schimmel Date: Wed Jul 17 23:29:08 2019 +0300 mlxsw: spectrum: Do not process learned records with a dummy FID The switch periodically sends notifications about learned FDB entries. Among other things, the notification includes the FID (Filtering Identifier) and the port on which the MAC was learned. In case the driver does not have the FID defined on the relevant port, the following error will be periodically generated: mlxsw_spectrum2 0000:06:00.0 swp32: Failed to find a matching {Port, VID} following FDB notification This is not supposed to happen under normal conditions, but can happen if an ingress tc filter with a redirect action is installed on a bridged port. The redirect action will cause the packet's FID to be changed to the dummy FID and a learning notification will be emitted with this FID - which is not defined on the bridged port. Fix this by having the driver ignore learning notifications generated with the dummy FID and delete them from the device. Another option is to chain an ignore action after the redirect action which will cause the device to disable learning, but this means that we need to consume another action whenever a redirect action is used. In addition, the scenario described above is merely a corner case. Fixes: cedbb8b25948 ("mlxsw: spectrum_flower: Set dummy FID before forward action") Signed-off-by: Ido Schimmel Reported-by: Alex Kushnarov Acked-by: Jiri Pirko Tested-by: Alex Kushnarov Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 1 + drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c | 10 ++++++++++ drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 6 ++++++ 3 files changed, 17 insertions(+) commit dedfde2fe1c4ccf27179fcb234e2112d065c39bb Author: Petr Machata Date: Wed Jul 17 23:29:07 2019 +0300 mlxsw: spectrum_dcb: Configure DSCP map as the last rule is removed Spectrum systems use DSCP rewrite map to update DSCP field in egressing packets to correspond to priority that the packet has. Whether rewriting will take place is determined at the point when the packet ingresses the switch: if the port is in Trust L3 mode, packet priority is determined from the DSCP map at the port, and DSCP rewrite will happen. If the port is in Trust L2 mode, 802.1p is used for packet prioritization, and no DSCP rewrite will happen. The driver determines the port trust mode based on whether any DSCP prioritization rules are in effect at given port. If there are any, trust level is L3, otherwise it's L2. When the last DSCP rule is removed, the port is switched to trust L2. Under that scenario, if DSCP of a packet should be rewritten, it should be rewritten to 0. However, when switching to Trust L2, the driver neglects to also update the DSCP rewrite map. The last DSCP rule thus remains in effect, and packets egressing through this port, if they have the right priority, will have their DSCP set according to this rule. Fix by first configuring the rewrite map, and only then switching to trust L2 and bailing out. Fixes: b2b1dab6884e ("mlxsw: spectrum: Support ieee_setapp, ieee_delapp") Signed-off-by: Petr Machata Reported-by: Alex Veber Tested-by: Alex Veber Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit a6574227a81ffd443cd715f8946baddccce66ada Author: Rosen Penev Date: Wed Jul 17 12:46:45 2019 -0700 net: ag71xx: Add missing header ag71xx uses devm_ioremap_nocache. This fixes usage of an implicit function Fixes: d51b6ce441d3 ("net: ethernet: add ag71xx driver") Signed-off-by: Rosen Penev Signed-off-by: David S. Miller drivers/net/ethernet/atheros/ag71xx.c | 1 + 1 file changed, 1 insertion(+) commit da99466ac243f15fbba65bd261bfc75ffa1532b6 Author: Denis Efremov Date: Fri Jul 12 21:55:23 2019 +0300 floppy: fix out-of-bounds read in copy_buffer This fixes a global out-of-bounds read access in the copy_buffer function of the floppy driver. The FDDEFPRM ioctl allows one to set the geometry of a disk. The sect and head fields (unsigned int) of the floppy_drive structure are used to compute the max_sector (int) in the make_raw_rw_request function. It is possible to overflow the max_sector. Next, max_sector is passed to the copy_buffer function and used in one of the memcpy calls. An unprivileged user could trigger the bug if the device is accessible, but requires a floppy disk to be inserted. The patch adds the check for the .sect * .head multiplication for not overflowing in the set_geometry function. The bug was found by syzkaller. Signed-off-by: Denis Efremov Tested-by: Willy Tarreau Signed-off-by: Linus Torvalds drivers/block/floppy.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 9b04609b784027968348796a18f601aed9db3789 Author: Denis Efremov Date: Fri Jul 12 21:55:22 2019 +0300 floppy: fix invalid pointer dereference in drive_name This fixes the invalid pointer dereference in the drive_name function of the floppy driver. The native_format field of the struct floppy_drive_params is used as floppy_type array index in the drive_name function. Thus, the field should be checked the same way as the autodetect field. To trigger the bug, one could use a value out of range and set the drive parameters with the FDSETDRVPRM ioctl. Next, FDGETDRVTYP ioctl should be used to call the drive_name. A floppy disk is not required to be inserted. CAP_SYS_ADMIN is required to call FDSETDRVPRM. The patch adds the check for a value of the native_format field to be in the '0 <= x < ARRAY_SIZE(floppy_type)' range of the floppy_type array indices. The bug was found by syzkaller. Signed-off-by: Denis Efremov Tested-by: Willy Tarreau Signed-off-by: Linus Torvalds drivers/block/floppy.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 5635f897ed83fd539df78e98ba69ee91592f9bb8 Author: Denis Efremov Date: Fri Jul 12 21:55:21 2019 +0300 floppy: fix out-of-bounds read in next_valid_format This fixes a global out-of-bounds read access in the next_valid_format function of the floppy driver. The values from autodetect field of the struct floppy_drive_params are used as indices for the floppy_type array in the next_valid_format function 'floppy_type[DP->autodetect[probed_format]].sect'. To trigger the bug, one could use a value out of range and set the drive parameters with the FDSETDRVPRM ioctl. A floppy disk is not required to be inserted. CAP_SYS_ADMIN is required to call FDSETDRVPRM. The patch adds the check for values of the autodetect field to be in the '0 <= x < ARRAY_SIZE(floppy_type)' range of the floppy_type array indices. The bug was found by syzkaller. Signed-off-by: Denis Efremov Tested-by: Willy Tarreau Signed-off-by: Linus Torvalds drivers/block/floppy.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit f3554aeb991214cbfafd17d55e2bfddb50282e32 Author: Denis Efremov Date: Fri Jul 12 21:55:20 2019 +0300 floppy: fix div-by-zero in setup_format_params This fixes a divide by zero error in the setup_format_params function of the floppy driver. Two consecutive ioctls can trigger the bug: The first one should set the drive geometry with such .sect and .rate values for the F_SECT_PER_TRACK to become zero. Next, the floppy format operation should be called. A floppy disk is not required to be inserted. An unprivileged user could trigger the bug if the device is accessible. The patch checks F_SECT_PER_TRACK for a non-zero value in the set_geometry function. The proper check should involve a reasonable upper limit for the .sect and .rate fields, but it could change the UAPI. The patch also checks F_SECT_PER_TRACK in the setup_format_params, and cancels the formatting operation in case of zero. The bug was found by syzkaller. Signed-off-by: Denis Efremov Tested-by: Willy Tarreau Signed-off-by: Linus Torvalds drivers/block/floppy.c | 5 +++++ 1 file changed, 5 insertions(+) commit a0d14b8909de55139b8702fe0c7e80b69763dcfb Author: Peter Zijlstra Date: Thu Jul 11 13:40:59 2019 +0200 x86/mm, tracing: Fix CR2 corruption Despite the current efforts to read CR2 before tracing happens there still exist a number of possible holes: idtentry page_fault do_page_fault has_error_code=1 call error_entry TRACE_IRQS_OFF call trace_hardirqs_off* #PF // modifies CR2 CALL_enter_from_user_mode __context_tracking_exit() trace_user_exit(0) #PF // modifies CR2 call do_page_fault address = read_cr2(); /* whoopsie */ And similar for i386. Fix it by pulling the CR2 read into the entry code, before any of that stuff gets a chance to run and ruin things. Reported-by: He Zhe Reported-by: Eiichi Tsukata Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Reviewed-by: Andy Lutomirski Cc: bp@alien8.de Cc: rostedt@goodmis.org Cc: torvalds@linux-foundation.org Cc: hpa@zytor.com Cc: dave.hansen@linux.intel.com Cc: jgross@suse.com Cc: joel@joelfernandes.org Link: https://lkml.kernel.org/r/20190711114336.116812491@infradead.org Debugged-by: Steven Rostedt arch/x86/entry/entry_32.S | 25 ++++++++++++++++++++++--- arch/x86/entry/entry_64.S | 35 ++++++++++++++++++----------------- arch/x86/include/asm/kvm_para.h | 2 +- arch/x86/include/asm/traps.h | 4 ++-- arch/x86/kernel/kvm.c | 8 ++++---- arch/x86/kernel/traps.c | 6 +----- arch/x86/mm/fault.c | 30 +++++++++++------------------- 7 files changed, 59 insertions(+), 51 deletions(-) commit 4234653e882740cbf6625eeee294e388b3176583 Author: Peter Zijlstra Date: Thu Jul 11 13:40:58 2019 +0200 x86/entry/64: Update comments and sanity tests for create_gap Commit 2700fefdb2d9 ("x86_64: Add gap to int3 to allow for call emulation") forgot to update the comment, do so now. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Reviewed-by: Steven Rostedt (VMware) Acked-by: Andy Lutomirski Cc: bp@alien8.de Cc: torvalds@linux-foundation.org Cc: hpa@zytor.com Cc: dave.hansen@linux.intel.com Cc: jgross@suse.com Cc: zhe.he@windriver.com Cc: joel@joelfernandes.org Cc: devel@etsukata.com Link: https://lkml.kernel.org/r/20190711114336.059780563@infradead.org arch/x86/entry/entry_64.S | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 2fd37912cfb019228bf246215938e6f7619516a2 Author: Peter Zijlstra Date: Thu Jul 11 13:40:57 2019 +0200 x86/entry/64: Simplify idtentry a little There's a bunch of duplication in idtentry, namely the .Lfrom_usermode_switch_stack is a paranoid=0 copy of the normal flow. Make this explicit by creating a idtentry_part helper macro. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Reviewed-by: Steven Rostedt (VMware) Acked-by: Andy Lutomirski Cc: bp@alien8.de Cc: torvalds@linux-foundation.org Cc: hpa@zytor.com Cc: dave.hansen@linux.intel.com Cc: jgross@suse.com Cc: zhe.he@windriver.com Cc: joel@joelfernandes.org Cc: devel@etsukata.com Link: https://lkml.kernel.org/r/20190711114336.002429503@infradead.org arch/x86/entry/entry_64.S | 102 ++++++++++++++++++++++------------------------ 1 file changed, 48 insertions(+), 54 deletions(-) commit e67f1c11e5ea7fa47449a16325ecc997dbbf9bdf Author: Peter Zijlstra Date: Thu Jul 11 13:40:56 2019 +0200 x86/entry/32: Simplify common_exception Adding one more option to SAVE_ALL can be used in common_exception to simplify things. This also saves duplication later where page_fault will no longer use common_exception. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Reviewed-by: Steven Rostedt (VMware) Reviewed-by: Andy Lutomirski Cc: bp@alien8.de Cc: torvalds@linux-foundation.org Cc: hpa@zytor.com Cc: dave.hansen@linux.intel.com Cc: jgross@suse.com Cc: zhe.he@windriver.com Cc: joel@joelfernandes.org Cc: devel@etsukata.com Link: https://lkml.kernel.org/r/20190711114335.945136187@infradead.org arch/x86/entry/entry_32.S | 36 +++++++++++++----------------------- 1 file changed, 13 insertions(+), 23 deletions(-) commit 55aedddb6149ab71bec9f050846855113977b033 Author: Peter Zijlstra Date: Thu Jul 11 13:40:55 2019 +0200 x86/paravirt: Make read_cr2() CALLEE_SAVE The one paravirt read_cr2() implementation (Xen) is actually quite trivial and doesn't need to clobber anything other than the return register. Making read_cr2() CALLEE_SAVE avoids all the PUSH/POP nonsense and allows more convenient use from assembly. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Reviewed-by: Juergen Gross Cc: bp@alien8.de Cc: rostedt@goodmis.org Cc: luto@kernel.org Cc: torvalds@linux-foundation.org Cc: hpa@zytor.com Cc: dave.hansen@linux.intel.com Cc: zhe.he@windriver.com Cc: joel@joelfernandes.org Cc: devel@etsukata.com Link: https://lkml.kernel.org/r/20190711114335.887392493@infradead.org arch/x86/entry/calling.h | 6 ++++++ arch/x86/include/asm/paravirt.h | 22 +++++++++++++--------- arch/x86/include/asm/paravirt_types.h | 2 +- arch/x86/kernel/asm-offsets.c | 1 + arch/x86/kernel/head_64.S | 4 +--- arch/x86/kernel/paravirt.c | 2 +- arch/x86/xen/enlighten_pv.c | 3 ++- arch/x86/xen/mmu_pv.c | 12 +----------- arch/x86/xen/xen-asm.S | 16 ++++++++++++++++ arch/x86/xen/xen-ops.h | 3 +++ 10 files changed, 45 insertions(+), 26 deletions(-) commit 45800fb45139284f0db4f5ac7fbbf5dad81e4172 Author: Helge Deller Date: Mon Jul 15 22:33:26 2019 +0200 parisc: Wire up clone3 syscall Signed-off-by: Helge Deller Tested-by: Sven Schnelle Acked-by: Christian Brauner arch/parisc/include/asm/unistd.h | 1 + arch/parisc/kernel/entry.S | 1 + arch/parisc/kernel/syscalls/syscall.tbl | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) commit 59a783dbc0d5fd6792aabff933055373b6dcbf2a Author: Helge Deller Date: Tue Jul 16 21:16:26 2019 +0200 parisc: Avoid kernel panic triggered by invalid kprobe When running gdb I was able to trigger this kernel panic: Kernel Fault: Code=26 (Data memory access rights trap) at addr 0000000000000060 CPU: 0 PID: 1401 Comm: gdb-crash Not tainted 5.2.0-rc7-64bit+ #1053 YZrvWESTHLNXBCVMcbcbcbcbOGFRQPDI PSW: 00001000000001000000000000001111 Not tainted r00-03 000000000804000f 0000000040dee1a0 0000000040c78cf0 00000000b8d50160 r04-07 0000000040d2b1a0 000000004360a098 00000000bbbe87b8 0000000000000003 r08-11 00000000fac20a70 00000000fac24160 00000000fac1bbe0 0000000000000000 r12-15 00000000fabfb79a 00000000fac244a4 0000000000010000 0000000000000001 r16-19 00000000bbbe87b8 00000000f8f02910 0000000000010034 0000000000000000 r20-23 00000000fac24630 00000000fac24630 000000006474e552 00000000fac1aa52 r24-27 0000000000000028 00000000bbbe87b8 00000000bbbe87b8 0000000040d2b1a0 r28-31 0000000000000000 00000000b8d501c0 00000000b8d501f0 0000000003424000 sr00-03 0000000000423000 0000000000000000 0000000000000000 0000000000423000 sr04-07 0000000000000000 0000000000000000 0000000000000000 0000000000000000 IASQ: 0000000000000000 0000000000000000 IAOQ: 0000000040c78cf0 0000000040c78cf4 IIR: 539f00c0 ISR: 0000000000000000 IOR: 0000000000000060 CPU: 0 CR30: 00000000b8d50000 CR31: 00000000d22345e2 ORIG_R28: 0000000040250798 IAOQ[0]: parisc_kprobe_ss_handler+0x58/0x170 IAOQ[1]: parisc_kprobe_ss_handler+0x5c/0x170 RP(r2): parisc_kprobe_ss_handler+0x58/0x170 Backtrace: [<0000000040206ff8>] handle_interruption+0x178/0xbb8 Kernel panic - not syncing: Kernel Fault Avoid this panic by checking the return value of kprobe_running() and skip kprobe if none is currently active. Cc: # v5.2 Acked-by: Sven Schnelle Tested-by: Rolf Eike Beer Signed-off-by: Helge Deller arch/parisc/kernel/kprobes.c | 3 +++ 1 file changed, 3 insertions(+) commit 34c32fc603311a72cb558e5e337555434f64c27b Author: Helge Deller Date: Thu Jul 4 03:44:17 2019 +0200 parisc: Ensure userspace privilege for ptraced processes in regset functions On parisc the privilege level of a process is stored in the lowest two bits of the instruction pointers (IAOQ0 and IAOQ1). On Linux we use privilege level 0 for the kernel and privilege level 3 for user-space. So userspace should not be allowed to modify IAOQ0 or IAOQ1 of a ptraced process to change it's privilege level to e.g. 0 to try to gain kernel privileges. This patch prevents such modifications in the regset support functions by always setting the two lowest bits to one (which relates to privilege level 3 for user-space) if IAOQ0 or IAOQ1 are modified via ptrace regset calls. Link: https://bugs.gentoo.org/481768 Cc: # v4.7+ Tested-by: Rolf Eike Beer Signed-off-by: Helge Deller arch/parisc/kernel/ptrace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 10835c854685393a921b68f529bf740fa7c9984d Author: Helge Deller Date: Tue Jul 16 21:43:11 2019 +0200 parisc: Fix kernel panic due invalid values in IAOQ0 or IAOQ1 On parisc the privilege level of a process is stored in the lowest two bits of the instruction pointers (IAOQ0 and IAOQ1). On Linux we use privilege level 0 for the kernel and privilege level 3 for user-space. So userspace should not be allowed to modify IAOQ0 or IAOQ1 of a ptraced process to change it's privilege level to e.g. 0 to try to gain kernel privileges. This patch prevents such modifications by always setting the two lowest bits to one (which relates to privilege level 3 for user-space) if IAOQ0 or IAOQ1 are modified via ptrace calls in the native and compat ptrace paths. Link: https://bugs.gentoo.org/481768 Reported-by: Jeroen Roovers Cc: Tested-by: Rolf Eike Beer Signed-off-by: Helge Deller arch/parisc/kernel/ptrace.c | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) commit 3f05e6886a595c9a29a309c52f45326be917823c Author: Cong Wang Date: Tue Jul 16 13:57:30 2019 -0700 net_sched: unset TCQ_F_CAN_BYPASS when adding filters For qdisc's that support TC filters and set TCQ_F_CAN_BYPASS, notably fq_codel, it makes no sense to let packets bypass the TC filters we setup in any scenario, otherwise our packets steering policy could not be enforced. This can be reproduced easily with the following script: ip li add dev dummy0 type dummy ifconfig dummy0 up tc qd add dev dummy0 root fq_codel tc filter add dev dummy0 parent 8001: protocol arp basic action mirred egress redirect dev lo tc filter add dev dummy0 parent 8001: protocol ip basic action mirred egress redirect dev lo ping -I dummy0 192.168.112.1 Without this patch, packets are sent directly to dummy0 without hitting any of the filters. With this patch, packets are redirected to loopback as expected. This fix is not perfect, it only unsets the flag but does not set it back because we have to save the information somewhere in the qdisc if we really want that. Note, both fq_codel and sfq clear this flag in their ->bind_tcf() but this is clearly not sufficient when we don't use any class ID. Fixes: 23624935e0c4 ("net_sched: TCQ_F_CAN_BYPASS generalization") Cc: Eric Dumazet Signed-off-by: Cong Wang Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller net/sched/cls_api.c | 1 + net/sched/sch_fq_codel.c | 2 -- net/sched/sch_sfq.c | 2 -- 3 files changed, 1 insertion(+), 4 deletions(-) commit 22051d9c4a57d3b4a8b5a7407efc80c71c7bfb16 Merge: aac09ce27556 9af93db9e140 Author: Linus Torvalds Date: Wed Jul 17 13:16:30 2019 -0700 Merge tag 'platform-drivers-x86-v5.3-2' of git://git.infradead.org/linux-platform-drivers-x86 Pull another x86 platform driver update from Andy Shevchenko: "Provide better naming for ABI, i.e. tell that we have fan boost mode. It won't break any ABI, but has to be done now to avoid confusion in the future" * tag 'platform-drivers-x86-v5.3-2' of git://git.infradead.org/linux-platform-drivers-x86: platform/x86: asus: Rename "fan mode" to "fan boost mode" commit aac09ce27556f79f20a860ae89d790d7bfbf1747 Merge: c3c08f939abe 6c395f66e98c Author: Linus Torvalds Date: Wed Jul 17 13:13:41 2019 -0700 Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux Pull thermal management updates from Zhang Rui: - Convert thermal documents to ReST (Mauro Carvalho Chehab) - Fix a cyclic depedency in between thermal core and governors (Daniel Lezcano) - Fix processor_thermal_device driver to re-evaluate power limits after resume (Srinivas Pandruvada, Zhang Rui) * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: drivers: thermal: processor_thermal_device: Fix build warning docs: thermal: convert to ReST thermal/drivers/core: Use governor table to initialize thermal/drivers/core: Add init section table for self-encapsulation drivers: thermal: processor_thermal: Read PPCC on resume commit c3c08f939abe3a1c95338a246c550aca0989dade Merge: 57ab5f740202 88785b7fa74a Author: Linus Torvalds Date: Wed Jul 17 13:05:21 2019 -0700 Merge tag 'gpio-v5.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO fixes from Linus Walleij: - Revert a SPIO GPIO fix that didn't fix anything but instead created new problems. - Remove the EM GPIO irqdomain in a safe manner. - Fix a memory leak in the gpio quirks. - Make the DaVinci error path silent on probe deferral. * tag 'gpio-v5.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: Revert "gpio/spi: Fix spi-gpio regression on active high CS" gpio: em: remove the gpiochip before removing the irq domain gpiolib: of: fix a memory leak in of_gpio_flags_quirks() gpio: davinci: silence error prints in case of EPROBE_DEFER commit 4809bba7289b4594d93da4fa70fb9b5ef48b5cf4 Merge: f11fe1dae1c4 aa4948937b7d Author: David S. Miller Date: Wed Jul 17 12:06:52 2019 -0700 Merge branch 'net-rds-RDMA-fixes' Gerd Rausch says: ==================== net/rds: RDMA fixes A number of net/rds fixes necessary to make "rds_rdma.ko" pass some basic Oracle internal tests. ==================== Signed-off-by: David S. Miller commit aa4948937b7d5b4a8e6553f4938f8431b2fd783a Author: Gerd Rausch Date: Tue Jul 16 15:29:23 2019 -0700 net/rds: Initialize ic->i_fastreg_wrs upon allocation Otherwise, if an IB connection is torn down before "rds_ib_setup_qp" is called, the value of "ic->i_fastreg_wrs" is still at zero (as it wasn't initialized by "rds_ib_setup_qp"). Consequently "rds_ib_conn_path_shutdown" will spin forever, waiting for it to go back to "RDS_IB_DEFAULT_FR_WR", which of course will never happen as there are no outstanding work requests. Signed-off-by: Gerd Rausch Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller net/rds/ib_cm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3a2886cca703fde5ee21baea9fedf8b1389c59d7 Author: Gerd Rausch Date: Tue Jul 16 15:29:17 2019 -0700 net/rds: Keep track of and wait for FRWR segments in use upon shutdown Since "rds_ib_free_frmr" and "rds_ib_free_frmr_list" simply put the FRMR memory segments on the "drop_list" or "free_list", and it is the job of "rds_ib_flush_mr_pool" to reap those entries by ultimately issuing a "IB_WR_LOCAL_INV" work-request, we need to trigger and then wait for all those memory segments attached to a particular connection to be fully released before we can move on to release the QP, CQ, etc. So we make "rds_ib_conn_path_shutdown" wait for one more atomic_t called "i_fastreg_inuse_count" that keeps track of how many FRWR memory segments are out there marked "FRMR_IS_INUSE" (and also wake_up rds_ib_ring_empty_wait, as they go away). Signed-off-by: Gerd Rausch Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller net/rds/ib.h | 1 + net/rds/ib_cm.c | 7 +++++++ net/rds/ib_frmr.c | 43 +++++++++++++++++++++++++++++++++++++------ 3 files changed, 45 insertions(+), 6 deletions(-) commit 9547dff1085d5935d6070377023096821033e30c Author: Gerd Rausch Date: Tue Jul 16 15:29:12 2019 -0700 net/rds: Set fr_state only to FRMR_IS_FREE if IB_WR_LOCAL_INV had been successful Fix a bug where fr_state first goes to FRMR_IS_STALE, because of a failure of operation IB_WR_LOCAL_INV, but then gets set back to "FRMR_IS_FREE" uncoditionally, even though the operation failed. Signed-off-by: Gerd Rausch Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller net/rds/ib_frmr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit aea01a2234d26ffa9d9ee01e43705824c0c7b08a Author: Gerd Rausch Date: Tue Jul 16 15:29:07 2019 -0700 net/rds: Fix NULL/ERR_PTR inconsistency Make function "rds_ib_try_reuse_ibmr" return NULL in case memory region could not be allocated, since callers simply check if the return value is not NULL. Signed-off-by: Gerd Rausch Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller net/rds/ib_rdma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5f33141d2fc05a2d2134ba0e7b47ce4aa88340f0 Author: Gerd Rausch Date: Tue Jul 16 15:29:02 2019 -0700 net/rds: Wait for the FRMR_IS_FREE (or FRMR_IS_STALE) transition after posting IB_WR_LOCAL_INV In order to: 1) avoid a silly bouncing between "clean_list" and "drop_list" triggered by function "rds_ib_reg_frmr" as it is releases frmr regions whose state is not "FRMR_IS_FREE" right away. 2) prevent an invalid access error in a race from a pending "IB_WR_LOCAL_INV" operation with a teardown ("dma_unmap_sg", "put_page") and de-registration ("ib_dereg_mr") of the corresponding memory region. Signed-off-by: Gerd Rausch Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller net/rds/ib_frmr.c | 65 ++++++++++++++++++++++++++++++++----------------------- net/rds/ib_mr.h | 2 ++ 2 files changed, 40 insertions(+), 27 deletions(-) commit c9467447fc50ec3715d8ec98f4da874fce539235 Author: Gerd Rausch Date: Tue Jul 16 15:28:57 2019 -0700 net/rds: Get rid of "wait_clean_list_grace" and add locking Waiting for activity on the "clean_list" to quiesce is no substitute for proper locking. We can have multiple threads competing for "llist_del_first" via "rds_ib_reuse_mr", and a single thread competing for "llist_del_all" and "llist_del_first" via "rds_ib_flush_mr_pool". Since "llist_del_first" depends on "list->first->next" not to change in the midst of the operation, simply waiting for all current calls to "rds_ib_reuse_mr" to quiesce across all CPUs is woefully inadequate: By the time "wait_clean_list_grace" is done iterating over all CPUs to see that there is no concurrent caller to "rds_ib_reuse_mr", a new caller may have just shown up on the first CPU. Furthermore, explicitly calls out the need for locking: * Cases where locking is needed: * If we have multiple consumers with llist_del_first used in one consumer, * and llist_del_first or llist_del_all used in other consumers, * then a lock is needed. Also, while at it, drop the unused "pool" parameter from "list_to_llist_nodes". Signed-off-by: Gerd Rausch Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller net/rds/ib_mr.h | 1 + net/rds/ib_rdma.c | 56 ++++++++++++++++++------------------------------------- 2 files changed, 19 insertions(+), 38 deletions(-) commit 2c7da8e6b041a8df2661def81ac90c9c0c719909 Author: Gerd Rausch Date: Tue Jul 16 15:28:51 2019 -0700 net/rds: Give fr_state a chance to transition to FRMR_IS_FREE In the context of FRMR (ib_frmr.c): Memory regions make it onto the "clean_list" via "rds_ib_flush_mr_pool", after the memory region has been posted for invalidation via "rds_ib_post_inv". At that point in time, "fr_state" may still be in state "FRMR_IS_INUSE", since the only place where "fr_state" transitions to "FRMR_IS_FREE" is in "rds_ib_mr_cqe_handler", which is triggered by a tasklet. So in case we notice that "fr_state != FRMR_IS_FREE" (see below), we wait for "fr_inv_done" to trigger with a maximum of 10msec. Then we check again, and only put the memory region onto the drop_list (via "rds_ib_free_frmr") in case the situation remains unchanged. This avoids the problem of memory-regions bouncing between "clean_list" and "drop_list" before they even have a chance to be properly invalidated. Signed-off-by: Gerd Rausch Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller net/rds/ib_frmr.c | 27 ++++++++++++++++++++++++++- net/rds/ib_mr.h | 1 + 2 files changed, 27 insertions(+), 1 deletion(-) commit f11fe1dae1c46762a9a7b0dd142b6bfebe7783ff Author: YueHaibing Date: Tue Jul 16 15:16:02 2019 +0800 net/sched: Make NET_ACT_CT depends on NF_NAT If NF_NAT is m and NET_ACT_CT is y, build fails: net/sched/act_ct.o: In function `tcf_ct_act': act_ct.c:(.text+0x21ac): undefined reference to `nf_ct_nat_ext_add' act_ct.c:(.text+0x229a): undefined reference to `nf_nat_icmp_reply_translation' act_ct.c:(.text+0x233a): undefined reference to `nf_nat_setup_info' act_ct.c:(.text+0x234a): undefined reference to `nf_nat_alloc_null_binding' act_ct.c:(.text+0x237c): undefined reference to `nf_nat_packet' Reported-by: Hulk Robot Fixes: b57dc7c13ea9 ("net/sched: Introduce action ct") Signed-off-by: YueHaibing Signed-off-by: David S. Miller net/sched/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 86fda90ab5888d983f7307442ba62978e3504bd3 Author: Hariprasad Kelam Date: Tue Jul 16 07:50:02 2019 +0530 net: sctp: fix warning "NULL check before some freeing functions is not needed" This patch removes NULL checks before calling kfree. fixes below issues reported by coccicheck net/sctp/sm_make_chunk.c:2586:3-8: WARNING: NULL check before some freeing functions is not needed. net/sctp/sm_make_chunk.c:2652:3-8: WARNING: NULL check before some freeing functions is not needed. net/sctp/sm_make_chunk.c:2667:3-8: WARNING: NULL check before some freeing functions is not needed. net/sctp/sm_make_chunk.c:2684:3-8: WARNING: NULL check before some freeing functions is not needed. Signed-off-by: Hariprasad Kelam Acked-by: Marcelo Ricardo Leitner Acked-by: Neil Horman Signed-off-by: David S. Miller net/sctp/sm_make_chunk.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit fdd258d49e88a9e0b49ef04a506a796f1c768a8e Author: Taehee Yoo Date: Mon Jul 15 14:10:17 2019 +0900 caif-hsi: fix possible deadlock in cfhsi_exit_module() cfhsi_exit_module() calls unregister_netdev() under rtnl_lock(). but unregister_netdev() internally calls rtnl_lock(). So deadlock would occur. Fixes: c41254006377 ("caif-hsi: Add rtnl support") Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller drivers/net/caif/caif_hsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 57ab5f740202babe93c8796013c5cfdfd6d08d7d Merge: fdcec00405fa 360aa640a59f Author: Linus Torvalds Date: Wed Jul 17 11:53:53 2019 -0700 Merge tag 'hwlock-v5.3' of git://github.com/andersson/remoteproc Pull hwspinlock updates from Bjorn Andersson: "This contains support for hardware spinlock TI K3 AM65x and J721E family of SoCs, support for using hwspinlocks from atomic context and better error reporting when dealing with hardware disabled in DeviceTree" * tag 'hwlock-v5.3' of git://github.com/andersson/remoteproc: hwspinlock: add the 'in_atomic' API hwspinlock: document the hwspinlock 'raw' API hwspinlock: stm32: implement the relax() ops hwspinlock: ignore disabled device hwspinlock/omap: Add a trace during probe hwspinlock/omap: Add support for TI K3 SoCs dt-bindings: hwlock: Update OMAP binding for TI K3 SoCs commit fdcec00405fae0befdd7bbcbe738b7325e5746fb Merge: 7636b7589f81 93f1d3e4b59c Author: Linus Torvalds Date: Wed Jul 17 11:44:41 2019 -0700 Merge tag 'rproc-v5.3' of git://github.com/andersson/remoteproc Pull remoteproc updates from Bjorn Andersson: "This adds support for the STM32 remoteproc, additional i.MX platforms with Cortex M4 remoteprocs and Qualcomm's QCS404 Compute DSP. Also initial support for vendor specific resource table entries and support for unprocessed Qualcomm firmware files" * tag 'rproc-v5.3' of git://github.com/andersson/remoteproc: remoteproc: stm32: fix building without ARM SMCC remoteproc: qcom: q6v5-mss: Fix build error without QCOM_MDT_LOADER remoteproc: copy parent dma_pfn_offset for vdev remoteproc: qcom: q6v5-mss: Support loading non-split images soc: qcom: mdt_loader: Support loading non-split images remoteproc: stm32: add an ST stm32_rproc driver dt-bindings: remoteproc: add bindings for stm32 remote processor driver dt-bindings: stm32: add bindings for ML-AHB interconnect remoteproc: Use struct_size() helper remoteproc: add vendor resources handling remoteproc: imx: Fix typo in "failed" remoteproc: imx: Broaden the Kconfig selection logic remoteproc,rpmsg: add missing MAINTAINERS file entries remoteproc: qcom: qdsp6-adsp: Add support for QCS404 CDSP dt-bindings: remoteproc: Rename and amend Hexagon v56 binding commit 6a5d4877544b9014c70533200ad4a5f9d6e005c5 Author: Joseph Greathouse Date: Wed Jul 17 09:47:58 2019 -0500 drm/amdkfd: Remove GWS from process during uninit If we shut down a process without having destroyed its GWS-using queues, it is possible that GWS BO will still be in the process BO list during the gpuvm destruction. This list should be empty at that time, so we should remove the GWS allocation at the process uninit point if it is still around. Signed-off-by: Joseph Greathouse Acked-by: Alex Deucher Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 3 +++ 1 file changed, 3 insertions(+) commit 88891430a2c06b6be9b1ed08c095befb17fb4cb2 Author: Tom St Denis Date: Tue Jul 16 07:23:22 2019 -0400 drm/amd/amdgpu: Fix offset for vmid selection in debugfs interface The register debugfs interface was using the wrong bitmask for vmid selection for GFX_CNTL. Signed-off-by: Tom St Denis Acked-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cd6e0c4ba19375ec5a7bcb959015d5f90eef0a1c Author: Evan Quan Date: Fri Jul 12 10:53:11 2019 +0800 drm/amd/powerplay: update vega20 driver if to fit latest SMU firmware Optimization for the socket power calculation is introduced. Signed-off-by: Evan Quan Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/smu11_driver_if.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 93002849ffc7d1f12db60a37c30610d02844363b Author: Evan Quan Date: Tue Jul 16 14:20:22 2019 +0800 drm/amd/powerplay: maintain SMU FW backward compatibility Do not halt driver loading on if_version mismatch. As our driver and FWs are backward compatible. Signed-off-by: Evan Quan Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 0d9d78b57bf32fdc4baf6eb8853e65059dcd5e06 Author: Evan Quan Date: Thu Jul 11 15:13:17 2019 +0800 drm/amd/powerplay: correct smu_update_table usage The interface was used in a confusing way. In profile mode scenario, the 2nd parameter of the interface was used in a different way from other scenarios. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 4 ++-- drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 2 +- drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 16 ++++++++-------- drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 4 ++-- drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 20 ++++++++++---------- 5 files changed, 23 insertions(+), 23 deletions(-) commit f68ccf43acbc31751cff48d0ac1e5ff50d91a451 Author: Evan Quan Date: Fri Jul 12 13:18:16 2019 +0800 drm/amd/powerplay: fix deadlock around smu_handle_task V2 As the lock was already held on the entrance to smu_handle_task. - V2: lock in small granularity Signed-off-by: Evan Quan Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 3 --- 1 file changed, 3 deletions(-) commit 7ef65bbd01fd59b749e8bd5b19d0c01e315fef8d Author: Evan Quan Date: Fri Jul 12 10:32:02 2019 +0800 drm/amd/powerplay: avoid access before allocation No access before allocation. Signed-off-by: Evan Quan Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 366cf03ec00f18e802f304c2cc057cac842e1244 Author: Evan Quan Date: Fri Jul 12 10:07:31 2019 +0800 drm/amd/powerplay: fix memory allocation failure check V2 Fix memory allocation failure check. - V2: fix one more similar error Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 67adb569ddf4aee12de999e02c67c1a168dd1a15 Author: Felix Kuehling Date: Sat Jul 13 02:27:34 2019 -0400 drm/amdgpu: Fix silent amdgpu_bo_move failures Under memory pressure, buffer moves between RAM to VRAM can fail when there is no GTT space available. In those cases amdgpu_bo_move falls back to ttm_bo_move_memcpy, which seems to succeed, although it doesn't really support non-contiguous or invisible VRAM. This manifests as VM faults with corrupted page table entries in KFD eviction stress tests. Print some helpful messages when lack of GTT space is causing buffer moves to fail. Check that source and destination memory regions are supported by ttm_bo_move_memcpy before taking that fallback. Signed-off-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 40 ++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) commit 6ea624f60393edc114feb33fa738d6f2f47e9032 Author: Alex Deucher Date: Tue Jul 16 09:28:41 2019 -0500 drm/amdgpu: drop dead header Not used anymore. Reviewed-by: Evan Quan Acked-by: Christian König Noticed-by: Dave Airlie Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vi.c | 1 - drivers/gpu/drm/amd/amdgpu/vi_dpm.h | 32 -------------------------------- 2 files changed, 33 deletions(-) commit 7636b7589f81940c6d6518786f93de74495575fa Merge: 3a1d5384b7de 54119bc1110d Author: Linus Torvalds Date: Wed Jul 17 11:31:11 2019 -0700 Merge tag 'rpmsg-v5.3' of git://github.com/andersson/remoteproc Pull rpmsg updates from Bjorn Andersson: "This contains a DT binding update and a change to make the remote function of rpmsg_devices optional" * tag 'rpmsg-v5.3' of git://github.com/andersson/remoteproc: rpmsg: core: Make remove handler for rpmsg driver optional. dt-bindings: soc: qcom: Add remote-pid binding for GLINK SMEM commit 3a1d5384b7decbff6519daa9c65a35665e227323 Merge: 37d4607ebbbf 5e663f0410fa Author: Linus Torvalds Date: Wed Jul 17 11:26:09 2019 -0700 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio, vhost updates from Michael Tsirkin: "Fixes, features, performance: - new iommu device - vhost guest memory access using vmap (just meta-data for now) - minor fixes" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: virtio-mmio: add error check for platform_get_irq scsi: virtio_scsi: Use struct_size() helper iommu/virtio: Add event queue iommu/virtio: Add probe request iommu: Add virtio-iommu driver PCI: OF: Initialize dev->fwnode appropriately of: Allow the iommu-map property to omit untranslated devices dt-bindings: virtio: Add virtio-pci-iommu node dt-bindings: virtio-mmio: Add IOMMU description vhost: fix clang build warning vhost: access vq metadata through kernel virtual address vhost: factor out setting vring addr and num vhost: introduce helpers to get the size of metadata area vhost: rename vq_iotlb_prefetch() to vq_meta_prefetch() vhost: fine grain userspace memory accessors vhost: generalize adding used elem commit 37d4607ebbbf5d8b74cbcb9434a5ce6897a51864 Merge: 916f562fb28a 1e4d09d2212d Author: Linus Torvalds Date: Wed Jul 17 11:23:13 2019 -0700 Merge tag 'vfio-v5.3-rc1' of git://github.com/awilliam/linux-vfio Pull VFIO updates from Alex Williamson: - Static symbol cleanup in mdev samples (Kefeng Wang) - Use vma help in nvlink code (Peng Hao) - Remove unused code in mbochs sample (YueHaibing) - Send uevents around mdev registration (Alex Williamson) * tag 'vfio-v5.3-rc1' of git://github.com/awilliam/linux-vfio: mdev: Send uevents around parent device registration sample/mdev/mbochs: remove set but not used variable 'mdev_state' vfio: vfio_pci_nvlink2: use a vma helper function vfio-mdev/samples: make some symbols static commit 2922d1cc1696200a3e1fd6d82a7798fcd2cadf12 Author: Linus Walleij Date: Tue Jul 16 22:46:51 2019 +0200 spi: gpio: Add SPI_MASTER_GPIO_SS flag The GPIO SPI master has some code in its local CS callback to set the initial sck GPIO value. This was lost in the commit converting it to use SPI core GPIO handling as this callback isn't called if the internal GPIO handling is active. Add the special SPI_MASTER_GPIO_SS to ascertain it gets called anyway so we get the initial SCK setting right. There is some platform provided GPIO handling there as well but this will be skipped as the cs_gpios will be NULL. My test targets seem not to care about the initial SCK value so I am uncertain if this is a regression, but to preserve the previous semantic we better do this. Cc: Andrey Smirnov Fixes: 249e2632dcd0 ("spi: gpio: Don't request CS GPIO in DT use-case") Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20190716204651.7743-1-linus.walleij@linaro.org Signed-off-by: Mark Brown drivers/spi/spi-gpio.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 9f69a496f1001bd27c484da43da30b2cdc8e06ed Author: Masahiro Yamada Date: Wed Jul 17 15:18:00 2019 +0900 kbuild: split out *.mod out of {single,multi}-used-m rules Currently, *.mod is created as a side-effect of obj-m. Split out *.mod as a dedicated build rule, which allows to unify the %.c -> %.o rule, and remove the single-used-m rule. This also makes the incremental build of allmodconfig faster because it saves $(NM) invocation when there is no change in the module. Signed-off-by: Masahiro Yamada scripts/Makefile.build | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit 30527cefb37d2ad796feb1f469cd097dee8420cb Author: Masahiro Yamada Date: Wed Jul 17 15:17:59 2019 +0900 kbuild: remove 'prepare1' target Now that there is no rule for 'prepare1', it can go away. Signed-off-by: Masahiro Yamada Makefile | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 60ae1b194b4548102fea0f5091af83b478f2352b Author: Masahiro Yamada Date: Wed Jul 17 15:17:58 2019 +0900 kbuild: remove the first line of *.mod files The current format of *.mod is like this: line 1: directory path to the .ko file line 2: a list of objects linked into this module line 3: unresolved symbols (only when CONFIG_TRIM_UNUSED_KSYMS=y) Now that *.mod and *.ko are created in the same directory, the line 1 provides no valuable information. It can be derived by replacing the extension .mod with .ko. In fact, nobody uses the first line any more. Cut down the first line. Signed-off-by: Masahiro Yamada scripts/Makefile.build | 4 ++-- scripts/adjust_autoksyms.sh | 4 ++-- scripts/mod/sumversion.c | 9 ++------- 3 files changed, 6 insertions(+), 11 deletions(-) commit b7dca6dd1e591ad19a9aae716f3898be8063f880 Author: Masahiro Yamada Date: Wed Jul 17 15:17:57 2019 +0900 kbuild: create *.mod with full directory path and remove MODVERDIR While descending directories, Kbuild produces objects for modules, but do not link final *.ko files; it is done in the modpost. To keep track of modules, Kbuild creates a *.mod file in $(MODVERDIR) for every module it is building. Some post-processing steps read the necessary information from *.mod files. This avoids descending into directories again. This mechanism was introduced in 2003 or so. Later, commit 551559e13af1 ("kbuild: implement modules.order") added modules.order. So, we can simply read it out to know all the modules with directory paths. This is easier than parsing the first line of *.mod files. $(MODVERDIR) has a flat directory structure, that is, *.mod files are named only with base names. This is based on the assumption that the module name is unique across the tree. This assumption is really fragile. Stephen Rothwell reported a race condition caused by a module name conflict: https://lkml.org/lkml/2019/5/13/991 In parallel building, two different threads could write to the same $(MODVERDIR)/*.mod simultaneously. Non-unique module names are the source of all kind of troubles, hence commit 3a48a91901c5 ("kbuild: check uniqueness of module names") introduced a new checker script. However, it is still fragile in the build system point of view because this race happens before scripts/modules-check.sh is invoked. If it happens again, the modpost will emit unclear error messages. To fix this issue completely, create *.mod with full directory path so that two threads never attempt to write to the same file. $(MODVERDIR) is no longer needed. Since modules with directory paths are listed in modules.order, Kbuild is still able to find *.mod files without additional descending. I also killed cmd_secanalysis; scripts/mod/sumversion.c computes MD4 hash for modules with MODULE_VERSION(). When CONFIG_DEBUG_SECTION_MISMATCH=y, it occurs not only in the modpost stage, but also during directory descending, where sumversion.c may parse stale *.mod files. It would emit 'No such file or directory' warning when an object consisting a module is renamed, or when a single-obj module is turned into a multi-obj module or vice versa. Signed-off-by: Masahiro Yamada Acked-by: Nicolas Pitre .gitignore | 1 + Documentation/dontdiff | 1 + Makefile | 20 +++----------------- lib/Kconfig.debug | 12 +----------- scripts/Makefile.build | 15 +++------------ scripts/Makefile.modpost | 4 ++-- scripts/adjust_autoksyms.sh | 14 +++++--------- scripts/mod/sumversion.c | 16 +++------------- scripts/package/mkspec | 2 +- tools/power/cpupower/debug/kernel/Makefile | 4 ++-- 10 files changed, 22 insertions(+), 67 deletions(-) commit 7deb55f57159f9de696ef8d5e93b201a6aba871c Author: Masahiro Yamada Date: Wed Jul 17 15:17:56 2019 +0900 kbuild: export_report: read modules.order instead of .tmp_versions/*.mod Towards the goal of removing MODVERDIR aka .tmp_versions, read out modules.order to get the list of modules to be processed. This is simpler than parsing *.mod files in .tmp_versions. Signed-off-by: Masahiro Yamada scripts/export_report.pl | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit ff9b45c55b2659d14420424da0ce4e8aa3dbce28 Author: Masahiro Yamada Date: Wed Jul 17 15:17:55 2019 +0900 kbuild: modpost: read modules.order instead of $(MODVERDIR)/*.mod Towards the goal of removing MODVERDIR, read out modules.order to get the list of modules to be processed. This is simpler than parsing *.mod files in $(MODVERDIR). For external modules, $(KBUILD_EXTMOD)/modules.order should be read. I removed the single target %.ko from the top Makefile. To make sure modpost works correctly, vmlinux and the other modules must be built. You cannot build a particular .ko file alone. Signed-off-by: Masahiro Yamada Makefile | 2 -- scripts/Makefile.modpost | 15 +++++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) commit 733232f8c852bcc2ad6fc1db7f4c43eb01c7c217 Author: Mike Snitzer Date: Wed Jul 17 12:57:06 2019 -0400 dm: use printk ratelimiting functions DM provided its own ratelimiting printk wrapper but given printk advances this is no longer needed. Also, switching DMDEBUG_LIMIT to using pr_debug_ratelimited() fixes the reported issue where DMDEBUG_LIMIT() still caused a flood of "callbacks suppressed" messages. Reported-by: Milan Broz Depends-on: 29fc2bc7539386 ("printk: pr_debug_ratelimited: check state first to reduce "callbacks suppressed" messages") Signed-off-by: Mike Snitzer include/linux/device-mapper.h | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) commit 916f562fb28a49457d3d99d156ca415b50d6750e Merge: edafb6fe42cf b1511f7a48c3 Author: Linus Torvalds Date: Wed Jul 17 10:07:48 2019 -0700 Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk updates from Stephen Boyd: "This round of clk driver and framework updates is heavy on the driver update side. The two main highlights in the core framework are the addition of an bulk clk_get API that handles optional clks and an extra debugfs file that tells the developer about the current parent of a clk. The driver updates are dominated by i.MX in the diffstat, but that is mostly because that SoC has started converting to the clk_hw style of clk registration. The next big update is in the Amlogic meson clk driver that gained some support for audio, cpu, and temperature clks while fixing some PLL issues. Finally, the biggest thing that stands out is the conversion of a large part of the Allwinner sunxi-ng driver to the new clk parent scheme that uses less strings and more pointer comparisons to match clk parents and children up. In general, it looks like we have a lot of little fixes and tweaks here and there to clk data along with the normal addition of a handful of new drivers and a couple new core framework features. Core: - Add a 'clk_parent' file in clk debugfs - Add a clk_bulk_get_optional() API (with devm too) New Drivers: - Support gated clk controller on MIPS based BCM63XX SoCs - Support SiLabs Si5341 and Si5340 chips - Support for CPU clks on Raspberry Pi devices - Audsys clock driver for MediaTek MT8516 SoCs Updates: - Convert a large portion of the Allwinner sunxi-ng driver to new clk parent scheme - Small frequency support for SiLabs Si544 chips - Slow clk support for AT91 SAM9X60 SoCs - Remove dead code in various clk drivers (-Wunused) - Support for Marvell 98DX1135 SoCs - Get duty cycle of generic pwm clks - Improvement in mmc phase calculation and cleanup of some rate defintions - Switch i.MX6 and i.MX7 clock drivers to clk_hw based APIs - Add GPIO, SNVS and GIC clocks for i.MX8 drivers - Mark imx6sx/ul/ull/sll MMDC_P1_IPG and imx8mm DRAM_APB as critical clock - Correct imx7ulp nic1_bus_clk and imx8mm audio_pll2_clk clock setting - Add clks for new Exynos5422 Dynamic Memory Controller driver - Clock definition for Exynos4412 Mali - Add CMM (Color Management Module) clocks on Renesas R-Car H3, M3-N, E3, and D3 - Add TPU (Timer Pulse Unit / PWM) clocks on Renesas RZ/G2M - Support for 32 bit clock IDs in TI's sci-clks for J721e SoCs - TI clock probing done from DT by default instead of firmware - Fix Amlogic Meson mpll fractional part and spread sprectrum issues - Add Amlogic meson8 audio clocks - Add Amlogic g12a temperature sensors clocks - Add Amlogic g12a and g12b cpu clocks - Add TPU (Timer Pulse Unit / PWM) clocks on Renesas R-Car H3, M3-W, and M3-N - Add CMM (Color Management Module) clocks on Renesas R-Car M3-W - Add Clock Domain support on Renesas RZ/N1" * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (190 commits) clk: consoldiate the __clk_get_hw() declarations clk: sprd: Add check for return value of sprd_clk_regmap_init() clk: lochnagar: Update DT binding doc to include the primary SPDIF MCLK clk: Add Si5341/Si5340 driver dt-bindings: clock: Add silabs,si5341 clk: clk-si544: Implement small frequency change support clk: add BCM63XX gated clock controller driver devicetree: document the BCM63XX gated clock bindings clk: at91: sckc: use dedicated functions to unregister clock clk: at91: sckc: improve error path for sama5d4 sck registration clk: at91: sckc: remove unnecessary line clk: at91: sckc: improve error path for sam9x5 sck register clk: at91: sckc: add support to free slow clock osclillator clk: at91: sckc: add support to free slow rc oscillator clk: at91: sckc: add support to free slow oscillator clk: rockchip: export HDMIPHY clock on rk3228 clk: rockchip: add watchdog pclk on rk3328 clk: rockchip: add clock id for hdmi_phy special clock on rk3228 clk: rockchip: add clock id for watchdog pclk on rk3328 clk: at91: sckc: add support for SAM9X60 ... commit edafb6fe42cfa98f4abf8c63acc5f4db011ed7b9 Merge: 47ebe00b684c f0162d21cc80 Author: Linus Torvalds Date: Wed Jul 17 10:03:50 2019 -0700 Merge tag 'rtc-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux Pull RTC updates from Alexandre Belloni: "A quiet cycle this time. - ds1307: properly handle oscillator failure flags - imx-sc: alarm support - pcf2123: alarm support, correct offset handling - sun6i: add R40 support - simplify getting the adapter of an i2c client" * tag 'rtc-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (37 commits) rtc: wm831x: Add IRQF_ONESHOT flag rtc: stm32: remove one condition check in stm32_rtc_set_alarm() rtc: pcf2123: Fix build error rtc: interface: Change type of 'count' from int to u64 rtc: pcf8563: Clear event flags and disable interrupts before requesting irq rtc: pcf8563: Fix interrupt trigger method rtc: pcf2123: fix negative offset rounding rtc: pcf2123: add alarm support rtc: pcf2123: use %ptR rtc: pcf2123: port to regmap rtc: pcf2123: remove sysfs register view rtc: rx8025: simplify getting the adapter of a client rtc: rx8010: simplify getting the adapter of a client rtc: rv8803: simplify getting the adapter of a client rtc: m41t80: simplify getting the adapter of a client rtc: fm3130: simplify getting the adapter of a client rtc: tegra: Drop MODULE_ALIAS rtc: sun6i: Add R40 compatible dt-bindings: rtc: sun6i: Add the R40 RTC compatible dt-bindings: rtc: Convert Allwinner A31 RTC to a schema ... commit 47ebe00b684c2bc183a766bc33c8b5943bc0df85 Merge: fa121bb3fed6 5c274ca4cfb2 Author: Linus Torvalds Date: Wed Jul 17 09:55:43 2019 -0700 Merge tag 'dmaengine-5.3-rc1' of git://git.infradead.org/users/vkoul/slave-dma Pull dmaengine updates from Vinod Koul: - Add support in dmaengine core to do device node checks for DT devices and update bunch of drivers to use that and remove open coding from drivers - New driver/driver support for new hardware, namely: - MediaTek UART APDMA - Freescale i.mx7ulp edma2 - Synopsys eDMA IP core version 0 - Allwinner H6 DMA - Updates to axi-dma and support for interleaved cyclic transfers - Greg's debugfs return value check removals on drivers - Updates to stm32-dma, hsu, dw, pl330, tegra drivers * tag 'dmaengine-5.3-rc1' of git://git.infradead.org/users/vkoul/slave-dma: (68 commits) dmaengine: Revert "dmaengine: fsl-edma: add i.mx7ulp edma2 version support" dmaengine: at_xdmac: check for non-empty xfers_list before invoking callback Documentation: dmaengine: clean up description of dmatest usage dmaengine: tegra210-adma: remove PM_CLK dependency dmaengine: fsl-edma: add i.mx7ulp edma2 version support dt-bindings: dma: fsl-edma: add new i.mx7ulp-edma dmaengine: fsl-edma-common: version check for v2 instead dmaengine: fsl-edma-common: move dmamux register to another single function dmaengine: fsl-edma: add drvdata for fsl-edma dmaengine: Revert "dmaengine: fsl-edma: support little endian for edma driver" dmaengine: rcar-dmac: Reject zero-length slave DMA requests dmaengine: dw: Enable iDMA 32-bit on Intel Elkhart Lake dmaengine: dw-edma: fix semicolon.cocci warnings dmaengine: sh: usb-dmac: Use [] to denote a flexible array member dmaengine: dmatest: timeout value of -1 should specify infinite wait dmaengine: dw: Distinguish ->remove() between DW and iDMA 32-bit dmaengine: fsl-edma: support little endian for edma driver dmaengine: hsu: Revert "set HSU_CH_MTSR to memory width" dmagengine: pl330: add code to get reset property dt-bindings: pl330: document the optional resets property ... commit fa121bb3fed6313b1f0af23952301e06cf6d32ed Merge: 7d4901c08ae5 e5793cd1b5fe Author: Linus Torvalds Date: Wed Jul 17 09:42:03 2019 -0700 Merge tag 'mips_5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS updates from Paul Burton: "A light batch this time around but significant improvements for certain systems: - Removal of readq & writeq for MIPS32 kernels where they would simply BUG() anyway, allowing drivers or other code that #ifdefs on their presence to work properly. - Improvements for Ingenic JZ4740 systems, including support for the external memory controller & pinmuxing fixes for qi_lb60/NanoNote systems. - Improvements for Lantiq systems, in particular around SMP & IPIs. - DT updates for ralink/MediaTek MT7628a systems to probe & configure a bunch more devices. - Miscellaneous cleanups & build fixes" * tag 'mips_5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: (30 commits) MIPS: fix some more fall through errors in arch/mips MIPS: perf events: handle switch statement falling through warnings mips/kprobes: Export kprobe_fault_handler() MAINTAINERS: Add myself as Ingenic SoCs maintainer MIPS: ralink: mt7628a.dtsi: Add watchdog controller DT node MIPS: ralink: mt7628a.dtsi: Add SPI controller DT node MIPS: ralink: mt7628a.dtsi: Add GPIO controller DT node MIPS: ralink: mt7628a.dtsi: Add pinctrl DT properties to the UART nodes MIPS: ralink: mt7628a.dtsi: Add pinmux DT node MIPS: ralink: mt7628a.dtsi: Add SPDX GPL-2.0 license identifier MIPS: lantiq: Add SMP support for lantiq interrupt controller MIPS: lantiq: Shorten register names, remove unused macros MIPS: lantiq: Fix bitfield masking MIPS: lantiq: Remove unused macros MIPS: lantiq: Fix attributes of of_device_id structure MIPS: lantiq: Change variables to the same type as the source MIPS: lantiq: Move macro directly to iomem function mips: Remove q-accessors from non-64bit platforms FDDI: defza: Include linux/io-64-nonatomic-lo-hi.h MIPS: configs: Remove useless UEVENT_HELPER_PATH ... commit 7d4901c08ae573e569dd01a29bef2ad404a40f97 Merge: 415bfd9cdb17 38ef0515e1e8 Author: Linus Torvalds Date: Wed Jul 17 09:36:38 2019 -0700 Merge tag 'h8300-for-linus-20190617' of git://git.sourceforge.jp/gitroot/uclinux-h8/linux Pull h8300 update from Yoshinori Sato: "Remove unused barrier defines" * tag 'h8300-for-linus-20190617' of git://git.sourceforge.jp/gitroot/uclinux-h8/linux: H8300: remove unused barrier defines commit 415bfd9cdb175cf870fb173ae9d3958862de2c97 Merge: 57a8ec387e14 d3023897b437 Author: Linus Torvalds Date: Wed Jul 17 09:34:10 2019 -0700 Merge tag 'for-linus-20190617' of git://git.sourceforge.jp/gitroot/uclinux-h8/linux Pull SH updates from Yoshinori Sato. kprobe fix, defconfig updates and a SH Kconfig fix. * tag 'for-linus-20190617' of git://git.sourceforge.jp/gitroot/uclinux-h8/linux: arch/sh: Check for kprobe trap number before trying to handle a kprobe trap sh: configs: Remove useless UEVENT_HELPER_PATH Fix allyesconfig output. commit 4d151bf3b89e71490e69defc811579b2bde617e2 Author: Wanpeng Li Date: Sat Jul 6 09:26:50 2019 +0800 KVM: LAPIC: Make lapic timer unpinned Commit 61abdbe0bcc2 ("kvm: x86: make lapic hrtimer pinned") pinned the lapic timer to avoid to wait until the next kvm exit for the guest to see KVM_REQ_PENDING_TIMER set. There is another solution to give a kick after setting the KVM_REQ_PENDING_TIMER bit, make lapic timer unpinned will be used in follow up patches. Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Marcelo Tosatti Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 8 ++++---- arch/x86/kvm/x86.c | 6 +----- 2 files changed, 5 insertions(+), 9 deletions(-) commit 9af93db9e140a4e6e79cdb098919bc928a72cd59 Author: Daniel Drake Date: Wed Jul 17 13:10:58 2019 +0800 platform/x86: asus: Rename "fan mode" to "fan boost mode" The Asus WMI spec indicates that the function being controlled here is called "Fan Boost Mode". The user-facing documentation also calls it this. The spec uses the term "fan mode" is used to refer to other things, including functionality expected to appear on future products. We missed this before as we are not dealing with the most readable of specs, and didn't forsee any confusion around shortening the name. Rename "fan mode" to "fan boost mode" to improve consistency with the spec and to avoid a future naming conflict. There is no interface breakage here since this has yet to be included in an official kernel release. I also updated the kernel version listed under ABI accordingly. Signed-off-by: Daniel Drake Acked-by: Yurii Pavlovskyi Signed-off-by: Andy Shevchenko Documentation/ABI/testing/sysfs-platform-asus-wmi | 6 +- drivers/platform/x86/asus-wmi.c | 118 ++++++++++++---------- include/linux/platform_data/x86/asus-wmi.h | 2 +- 3 files changed, 66 insertions(+), 60 deletions(-) commit 57a8ec387e1441ea5e1232bc0749fb99a8cba7e7 Merge: 0a8ad0ffa4d8 43e11fa2d1d3 Author: Linus Torvalds Date: Wed Jul 17 08:58:04 2019 -0700 Merge branch 'akpm' (patches from Andrew) Merge more updates from Andrew Morton: "VM: - z3fold fixes and enhancements by Henry Burns and Vitaly Wool - more accurate reclaimed slab caches calculations by Yafang Shao - fix MAP_UNINITIALIZED UAPI symbol to not depend on config, by Christoph Hellwig - !CONFIG_MMU fixes by Christoph Hellwig - new novmcoredd parameter to omit device dumps from vmcore, by Kairui Song - new test_meminit module for testing heap and pagealloc initialization, by Alexander Potapenko - ioremap improvements for huge mappings, by Anshuman Khandual - generalize kprobe page fault handling, by Anshuman Khandual - device-dax hotplug fixes and improvements, by Pavel Tatashin - enable synchronous DAX fault on powerpc, by Aneesh Kumar K.V - add pte_devmap() support for arm64, by Robin Murphy - unify locked_vm accounting with a helper, by Daniel Jordan - several misc fixes core/lib: - new typeof_member() macro including some users, by Alexey Dobriyan - make BIT() and GENMASK() available in asm, by Masahiro Yamada - changed LIST_POISON2 on x86_64 to 0xdead000000000122 for better code generation, by Alexey Dobriyan - rbtree code size optimizations, by Michel Lespinasse - convert struct pid count to refcount_t, by Joel Fernandes get_maintainer.pl: - add --no-moderated switch to skip moderated ML's, by Joe Perches misc: - ptrace PTRACE_GET_SYSCALL_INFO interface - coda updates - gdb scripts, various" [ Using merge message suggestion from Vlastimil Babka, with some editing - Linus ] * emailed patches from Andrew Morton : (100 commits) fs/select.c: use struct_size() in kmalloc() mm: add account_locked_vm utility function arm64: mm: implement pte_devmap support mm: introduce ARCH_HAS_PTE_DEVMAP mm: clean up is_device_*_page() definitions mm/mmap: move common defines to mman-common.h mm: move MAP_SYNC to asm-generic/mman-common.h device-dax: "Hotremove" persistent memory that is used like normal RAM mm/hotplug: make remove_memory() interface usable device-dax: fix memory and resource leak if hotplug fails include/linux/lz4.h: fix spelling and copy-paste errors in documentation ipc/mqueue.c: only perform resource calculation if user valid include/asm-generic/bug.h: fix "cut here" for WARN_ON for __WARN_TAINT architectures scripts/gdb: add helpers to find and list devices scripts/gdb: add lx-genpd-summary command drivers/pps/pps.c: clear offset flags in PPS_SETPARAMS ioctl kernel/pid.c: convert struct pid count to refcount_t drivers/rapidio/devices/rio_mport_cdev.c: NUL terminate some strings select: shift restore_saved_sigmask_unless() into poll_select_copy_remaining() select: change do_poll() to return -ERESTARTNOHAND rather than -EINTR ... commit c663e04097f4e286fc146f79eb5ef6a47c01d337 Author: Nikos Tsironis Date: Wed Jul 17 14:24:10 2019 +0300 dm kcopyd: Increase default sub-job size to 512KB Currently, kcopyd has a sub-job size of 64KB and a maximum number of 8 sub-jobs. As a result, for any kcopyd job, we have a maximum of 512KB of I/O in flight. This upper limit to the amount of in-flight I/O under-utilizes fast devices and results in decreased throughput, e.g., when writing to a snapshotted thin LV with I/O size less than the pool's block size (so COW is performed using kcopyd). Increase kcopyd's default sub-job size to 512KB, so we have a maximum of 4MB of I/O in flight for each kcopyd job. This results in an up to 96% improvement of bandwidth when writing to a snapshotted thin LV, with I/O sizes less than the pool's block size. Also, add dm_mod.kcopyd_subjob_size_kb module parameter to allow users to fine tune the sub-job size of kcopyd. The default value of this parameter is 512KB and the maximum allowed value is 1024KB. We evaluate the performance impact of the change by running the snap_breaking_throughput benchmark, from the device mapper test suite [1]. The benchmark: 1. Creates a 1G thin LV 2. Provisions the thin LV 3. Takes a snapshot of the thin LV 4. Writes to the thin LV with: dd if=/dev/zero of=/dev/vg/thin_lv oflag=direct bs= Running this benchmark with various thin pool block sizes and dd I/O sizes (all combinations triggering the use of kcopyd) we get the following results: +-----------------+-------------+------------------+-----------------+ | Pool block size | dd I/O size | BW before (MB/s) | BW after (MB/s) | +-----------------+-------------+------------------+-----------------+ | 1 MB | 256 KB | 242 | 280 | | 1 MB | 512 KB | 238 | 295 | | | | | | | 2 MB | 256 KB | 238 | 354 | | 2 MB | 512 KB | 241 | 380 | | 2 MB | 1 MB | 245 | 394 | | | | | | | 4 MB | 256 KB | 248 | 412 | | 4 MB | 512 KB | 234 | 432 | | 4 MB | 1 MB | 251 | 474 | | 4 MB | 2 MB | 257 | 504 | | | | | | | 8 MB | 256 KB | 239 | 420 | | 8 MB | 512 KB | 256 | 431 | | 8 MB | 1 MB | 264 | 467 | | 8 MB | 2 MB | 264 | 502 | | 8 MB | 4 MB | 281 | 537 | +-----------------+-------------+------------------+-----------------+ [1] https://github.com/jthornber/device-mapper-test-suite Signed-off-by: Nikos Tsironis Signed-off-by: Mike Snitzer drivers/md/dm-kcopyd.c | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) commit 3ee25485ba8e8271fe9401eef5003c20ab648ddf Author: Mike Snitzer Date: Wed Jul 17 11:12:30 2019 -0400 dm snapshot: fix oversights in optional discard support __find_snapshots_sharing_cow() should always be used with _origins_lock held so fix snapshot_io_hints() accordingly. Also, once a snapshot is being merged discards must not be allowed -- otherwise incorrect or duplicate work will be performed. Fixes: 2e6023850e177d ("dm snapshot: add optional discard support features") Reported-by: Nikos Tsironis Signed-off-by: Mike Snitzer drivers/md/dm-snap.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 3b8cafdd5436f9298b3bf6eb831df5eef5ee82b6 Author: Damien Le Moal Date: Tue Jul 16 14:39:34 2019 +0900 dm zoned: fix zone state management race dm-zoned uses the zone flag DMZ_ACTIVE to indicate that a zone of the backend device is being actively read or written and so cannot be reclaimed. This flag is set as long as the zone atomic reference counter is not 0. When this atomic is decremented and reaches 0 (e.g. on BIO completion), the active flag is cleared and set again whenever the zone is reused and BIO issued with the atomic counter incremented. These 2 operations (atomic inc/dec and flag set/clear) are however not always executed atomically under the target metadata mutex lock and this causes the warning: WARN_ON(!test_bit(DMZ_ACTIVE, &zone->flags)); in dmz_deactivate_zone() to be displayed. This problem is regularly triggered with xfstests generic/209, generic/300, generic/451 and xfs/077 with XFS being used as the file system on the dm-zoned target device. Similarly, xfstests ext4/303, ext4/304, generic/209 and generic/300 trigger the warning with ext4 use. This problem can be easily fixed by simply removing the DMZ_ACTIVE flag and managing the "ACTIVE" state by directly looking at the reference counter value. To do so, the functions dmz_activate_zone() and dmz_deactivate_zone() are changed to inline functions respectively calling atomic_inc() and atomic_dec(), while the dmz_is_active() macro is changed to an inline function calling atomic_read(). Fixes: 3b1a94c88b79 ("dm zoned: drive-managed zoned block device target") Cc: stable@vger.kernel.org Reported-by: Masato Suzuki Signed-off-by: Damien Le Moal Signed-off-by: Mike Snitzer drivers/md/dm-zoned-metadata.c | 24 ------------------------ drivers/md/dm-zoned.h | 28 ++++++++++++++++++++++++---- 2 files changed, 24 insertions(+), 28 deletions(-) commit 373c3b80e459cb57c34381b928588a3794eb5bbd Author: Johannes Thumshirn Date: Mon Jul 15 15:16:12 2019 +0200 btrfs: don't leak extent_map in btrfs_get_io_geometry() btrfs_get_io_geometry() calls btrfs_get_chunk_map() to acquire a reference on a extent_map, but on normal operation it does not drop this reference anymore. This leads to excessive kmemleak reports. Always call free_extent_map(), not just in the error case. Fixes: 5f1411265e16 ("btrfs: Introduce btrfs_io_geometry infrastructure") Reviewed-by: Nikolay Borisov Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/volumes.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit bfcea1c661eddabd7b5fee85dd3399bb16712c5a Author: Johannes Thumshirn Date: Thu Jul 11 17:23:04 2019 +0200 btrfs: free checksum hash on in close_ctree fs_info::csum_hash gets initialized in btrfs_init_csum_hash() which is called by open_ctree(). But it only gets freed if open_ctree() fails, not on normal operation. This leads to a memory leak like the following found by kmemleak: unreferenced object 0xffff888132cb8720 (size 96): comm "mount", pid 450, jiffies 4294912436 (age 17.584s) hex dump (first 32 bytes): 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<000000000c9643d4>] crypto_create_tfm+0x2d/0xd0 [<00000000ae577f68>] crypto_alloc_tfm+0x4b/0xb0 [<000000002b5cdf30>] open_ctree+0xb84/0x2060 [btrfs] [<0000000043204297>] btrfs_mount_root+0x552/0x640 [btrfs] [<00000000c99b10ea>] legacy_get_tree+0x22/0x40 [<0000000071a6495f>] vfs_get_tree+0x1f/0xc0 [<00000000f180080e>] fc_mount+0x9/0x30 [<000000009e36cebd>] vfs_kern_mount.part.11+0x6a/0x80 [<0000000004594c05>] btrfs_mount+0x174/0x910 [btrfs] [<00000000c99b10ea>] legacy_get_tree+0x22/0x40 [<0000000071a6495f>] vfs_get_tree+0x1f/0xc0 [<00000000b86e92c5>] do_mount+0x6b0/0x940 [<0000000097464494>] ksys_mount+0x7b/0xd0 [<0000000057213c80>] __x64_sys_mount+0x1c/0x20 [<00000000cb689b5e>] do_syscall_64+0x43/0x130 [<000000002194e289>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 Free fs_info::csum_hash in close_ctree() to avoid the memory leak. Fixes: 6d97c6e31b55 ("btrfs: add boilerplate code for directly including the crypto framework") Reviewed-by: Qu Wenruo Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/disk-io.c | 1 + 1 file changed, 1 insertion(+) commit 314c4cd6d9e60b9412dcd1b1783a66532f91ea2d Author: YueHaibing Date: Tue Jul 2 22:39:03 2019 +0800 btrfs: Fix build error while LIBCRC32C is module If CONFIG_BTRFS_FS is y and CONFIG_LIBCRC32C is m, building fails: fs/btrfs/super.o: In function `btrfs_mount_root': super.c:(.text+0xb7f9): undefined reference to `crc32c_impl' fs/btrfs/super.o: In function `init_btrfs_fs': super.c:(.init.text+0x3465): undefined reference to `crc32c_impl' fs/btrfs/extent-tree.o: In function `hash_extent_data_ref': extent-tree.c:(.text+0xe60): undefined reference to `crc32c' extent-tree.c:(.text+0xe78): undefined reference to `crc32c' extent-tree.c:(.text+0xe8b): undefined reference to `crc32c' fs/btrfs/dir-item.o: In function `btrfs_insert_xattr_item': dir-item.c:(.text+0x291): undefined reference to `crc32c' fs/btrfs/dir-item.o: In function `btrfs_insert_dir_item': dir-item.c:(.text+0x429): undefined reference to `crc32c' Select LIBCRC32C to fix it. Reported-by: Hulk Robot Fixes: d5178578bcd4 ("btrfs: directly call into crypto framework for checksumming") Reviewed-by: Johannes Thumshirn Signed-off-by: YueHaibing Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 42c16da6d684391db83788eb680accd84f6c2083 Author: Qu Wenruo Date: Mon Jul 1 05:12:46 2019 +0000 btrfs: inode: Don't compress if NODATASUM or NODATACOW set As btrfs(5) specified: Note If nodatacow or nodatasum are enabled, compression is disabled. If NODATASUM or NODATACOW set, we should not compress the extent. Normally NODATACOW is detected properly in run_delalloc_range() so compression won't happen for NODATACOW. However for NODATASUM we don't have any check, and it can cause compressed extent without csum pretty easily, just by: mkfs.btrfs -f $dev mount $dev $mnt -o nodatasum touch $mnt/foobar mount -o remount,datasum,compress $mnt xfs_io -f -c "pwrite 0 128K" $mnt/foobar And in fact, we have a bug report about corrupted compressed extent without proper data checksum so even RAID1 can't recover the corruption. (https://bugzilla.kernel.org/show_bug.cgi?id=199707) Running compression without proper checksum could cause more damage when corruption happens, as compressed data could make the whole extent unreadable, so there is no need to allow compression for NODATACSUM. The fix will refactor the inode compression check into two parts: - inode_can_compress() As the hard requirement, checked at btrfs_run_delalloc_range(), so no compression will happen for NODATASUM inode at all. - inode_need_compress() As the soft requirement, checked at btrfs_run_delalloc_range() and compress_file_range(). Reported-by: James Harvey CC: stable@vger.kernel.org # 4.4+ Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/inode.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) commit 5d907307adc14cd5148b07629c2b4535acd06062 Author: Darrick J. Wong Date: Mon Jul 15 08:51:01 2019 -0700 iomap: move internal declarations into fs/iomap/ Move internal function declarations out of fs/internal.h into include/linux/iomap.h so that our transition is complete. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/dax.c | 1 - fs/internal.h | 10 ---------- fs/iomap/apply.c | 2 -- fs/iomap/fiemap.c | 2 -- fs/iomap/seek.c | 2 -- fs/iomap/swapfile.c | 2 -- include/linux/iomap.h | 10 ++++++++++ 7 files changed, 10 insertions(+), 19 deletions(-) commit cb7181ff4b1ca1e4a9dbea8a3982142ce4ed73fd Author: Darrick J. Wong Date: Mon Jul 15 08:51:00 2019 -0700 iomap: move the main iteration code into a separate file Move the main iteration code into a separate file so that we can group related functions in a single file instead of having a single enormous source file. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/Makefile | 1 - fs/iomap/Makefile | 1 + fs/{iomap.c => iomap/apply.c} | 17 +---------------- 3 files changed, 2 insertions(+), 17 deletions(-) commit afc51aaa22f26cb2894083c4f25097e0950f1609 Author: Darrick J. Wong Date: Mon Jul 15 08:50:59 2019 -0700 iomap: move the buffered IO code into a separate file Move the buffered IO code into a separate file so that we can group related functions in a single file instead of having a single enormous source file. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/iomap.c | 1053 ----------------------------------------------- fs/iomap/Makefile | 1 + fs/iomap/buffered-io.c | 1073 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1074 insertions(+), 1053 deletions(-) commit db074436f421967f4f30cfbb6fbc2a728f3e62b3 Author: Darrick J. Wong Date: Mon Jul 15 08:50:59 2019 -0700 iomap: move the direct IO code into a separate file Move the direct IO code into a separate file so that we can group related functions in a single file instead of having a single enormous source file. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/iomap.c | 554 ------------------------------------------------- fs/iomap/Makefile | 1 + fs/iomap/direct-io.c | 562 ++++++++++++++++++++++++++++++++++++++++++++++++++ include/linux/iomap.h | 7 + 4 files changed, 570 insertions(+), 554 deletions(-) commit 56a178981d47075f6fe5e1c4de77036c821d2877 Author: Darrick J. Wong Date: Mon Jul 15 08:50:58 2019 -0700 iomap: move the SEEK_HOLE code into a separate file Move the SEEK_HOLE/SEEK_DATA code into a separate file so that we can group related functions in a single file instead of having a single enormous source file. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/iomap.c | 201 -------------------------------------------------- fs/iomap/Makefile | 3 +- fs/iomap/seek.c | 214 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 216 insertions(+), 202 deletions(-) commit 5157fb8f5ae123badeeb5effd0716712066e20d8 Author: Darrick J. Wong Date: Mon Jul 15 08:50:58 2019 -0700 iomap: move the file mapping reporting code into a separate file Move the file mapping reporting code (FIEMAP/FIBMAP) into a separate file so that we can group related functions in a single file instead of having a single enormous source file. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/iomap.c | 136 -------------------------------------------------- fs/iomap/Makefile | 3 ++ fs/iomap/fiemap.c | 146 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 149 insertions(+), 136 deletions(-) commit a45c0eccc564649541305c71539350c7a890226e Author: Darrick J. Wong Date: Mon Jul 15 08:50:57 2019 -0700 iomap: move the swapfile code into a separate file Move the swapfile activation code into a separate file so that we can group related functions in a single file instead of having a single enormous source file. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/iomap.c | 170 ------------------------------------------------- fs/iomap/Makefile | 3 + fs/iomap/swapfile.c | 180 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 183 insertions(+), 170 deletions(-) commit c35c87d6f258ad943d0fb350ed45fa9302c36b52 Author: Masahiro Yamada Date: Wed Jul 17 15:17:54 2019 +0900 kbuild: modsign: read modules.order instead of $(MODVERDIR)/*.mod Towards the goal of removing MODVERDIR, read out modules.order to get the list of modules to be signed. This is simpler than parsing *.mod files in $(MODVERDIR). The modules_sign target is only supported for in-kernel modules. So, this commit does not take care of external modules. Signed-off-by: Masahiro Yamada scripts/Makefile.modsign | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d56aec102c0c462b94513421726e33938695cef4 Author: Masahiro Yamada Date: Wed Jul 17 15:17:53 2019 +0900 kbuild: modinst: read modules.order instead of $(MODVERDIR)/*.mod Towards the goal of removing MODVERDIR, read out modules.order to get the list of modules to be installed. This is simpler than parsing *.mod files in $(MODVERDIR). For external modules, $(KBUILD_EXTMOD)/modules.order should be read. Signed-off-by: Masahiro Yamada scripts/Makefile.modinst | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 0e5d8b7fb2c675b4fe45adee289e640e848dd881 Author: Masahiro Yamada Date: Wed Jul 17 15:17:52 2019 +0900 scsi: remove pointless $(MODVERDIR)/$(obj)/53c700.ver Nothing depends on this, so it is dead code. Signed-off-by: Masahiro Yamada drivers/scsi/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e0e1b1ec397e153da10f90355545607d2fd13293 Author: Masahiro Yamada Date: Wed Jul 17 15:17:51 2019 +0900 kbuild: remove duplication from modules.order in sub-directories Currently, only the top-level modules.order drops duplicated entries. The modules.order files in sub-directories potentially contain duplication. To list out the paths of all modules, I want to use modules.order instead of parsing *.mod files in $(MODVERDIR). To achieve this, I want to rip off duplication from modules.order of external modules too. Signed-off-by: Masahiro Yamada scripts/Makefile.build | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 1bd9a468018dd318283c7c620729ddf1923f2024 Author: Masahiro Yamada Date: Wed Jul 17 15:17:50 2019 +0900 kbuild: get rid of kernel/ prefix from in-tree modules.{order,builtin} Removing the 'kernel/' prefix will make our life easier because we can simply do 'cat modules.order' to get all built modules with full paths. Currently, we parse the first line of '*.mod' files in $(MODVERDIR). Since we have duplicated functionality here, I plan to remove MODVERDIR entirely. In fact, modules.order is generated also for external modules in a broken format. It adds the 'kernel/' prefix to the absolute path of the module, like this: kernel//path/to/your/external/module/foo.ko This is fine for now since modules.order is not used for external modules. However, I want to sanitize the format everywhere towards the goal of removing MODVERDIR. We cannot change the format of installed module.{order,builtin}. So, 'make modules_install' will add the 'kernel/' prefix while copying them to $(MODLIB)/. Signed-off-by: Masahiro Yamada Makefile | 4 ++-- scripts/Makefile.build | 2 +- scripts/Makefile.modbuiltin | 2 +- scripts/modules-check.sh | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) commit 7e13191879d6d589cd987a8db3a70019251fc757 Author: Masahiro Yamada Date: Wed Jul 17 15:17:49 2019 +0900 kbuild: do not create empty modules.order in the prepare stage Currently, $(objtree)/modules.order is touched in two places. In the 'prepare0' rule, scripts/Makefile.build creates an empty modules.order while processing 'obj=.' In the 'modules' rule, the top-level Makefile overwrites it with the correct list of modules. While this might be a good side-effect that modules.order is made empty every time (probably this is not intended functionality), I personally do not like this behavior. Create modules.order only when it is sensible to do so. This avoids creating the following pointless files: scripts/basic/modules.order scripts/dtc/modules.order scripts/gcc-plugins/modules.order scripts/genksyms/modules.order scripts/mod/modules.order scripts/modules.order scripts/selinux/genheaders/modules.order scripts/selinux/mdp/modules.order scripts/selinux/modules.order Going forward, $(objtree)/modules.order lists the modules that was built in the last successful build. Signed-off-by: Masahiro Yamada Makefile | 4 ++-- scripts/Makefile.build | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit d09778d16e20bc4f1f4971cc9a9fd7ff6ba898ff Author: Himanshu Jha Date: Tue Jul 16 11:22:22 2019 +0530 coccinelle: api: add devm_platform_ioremap_resource script Use recently introduced devm_platform_ioremap_resource helper which wraps platform_get_resource() and devm_ioremap_resource() together. This helps produce much cleaner code and remove local `struct resource` declaration. Signed-off-by: Himanshu Jha Signed-off-by: Julia Lawall Signed-off-by: Masahiro Yamada .../api/devm_platform_ioremap_resource.cocci | 60 ++++++++++++++++++++++ 1 file changed, 60 insertions(+) commit 4bd01de8f201abb704ae9bda3af4ea9ba3a10b0a Author: Masahiro Yamada Date: Tue Jul 16 22:29:45 2019 +0900 kbuild: compile-test headers listed in header-test-m as well It will be useful to control the header-test by a tristate option. If CONFIG_FOO is a tristate option, you can write like this: header-test-$(CONFIG_FOO) += foo.h Signed-off-by: Masahiro Yamada scripts/Makefile.build | 2 +- scripts/Makefile.lib | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit c04d1e46fcd6090f2ae04e285e9d3adcf376f5b1 Author: Masahiro Yamada Date: Mon Jul 15 23:11:03 2019 +0900 kbuild: remove unused hostcc-option We can re-add this whenever it is needed. At this moment, it is unused. Signed-off-by: Masahiro Yamada scripts/Kbuild.include | 5 ----- 1 file changed, 5 deletions(-) commit 46457133ac9d55272ce410f5e701e23e4d68bcdb Author: Masahiro Yamada Date: Mon Jul 15 23:01:49 2019 +0900 kbuild: remove tag files by distclean instead of mrproper It takes somewhat long time to generate these tag files. Keep such precious files until we run 'make distclean'. Signed-off-by: Masahiro Yamada Makefile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 89ff7131f78ad083665382146e66430d66399076 Author: Masahiro Yamada Date: Sat Jul 13 13:01:10 2019 +0900 kbuild: add --hash-style= and --build-id unconditionally As commit 1e0221374e30 ("mips: vdso: drop unnecessary cc-ldoption") explained, these flags are supported by the minimal required version of binutils. They are supported by ld.lld too. Signed-off-by: Masahiro Yamada Reviewed-by: Nathan Chancellor Tested-by: Nathan Chancellor Makefile | 6 ++---- arch/arm/vdso/Makefile | 3 +-- arch/arm64/kernel/vdso32/Makefile | 4 ++-- arch/sparc/vdso/Makefile | 3 +-- arch/x86/entry/vdso/Makefile | 5 ++--- 5 files changed, 8 insertions(+), 13 deletions(-) commit 5ef872636ca71d35ddc5ee5951c9272a51c74418 Author: Masahiro Yamada Date: Sat Jul 13 11:45:58 2019 +0900 kbuild: get rid of misleading $(AS) from documents The assembler files in the kernel are *.S instead of *.s, so they must be preprocessed. Since 'as' of GNU binutils is not able to preprocess, we always use $(CC) as an assembler driver. $(AS) is almost unused in Kbuild. As of v5.2, there is just one place that directly invokes $(AS). $ git grep -e '$(AS)' -e '${AS}' -e '$AS' -e '$(AS:' -e '${AS:' -- :^Documentation drivers/net/wan/Makefile: AS68K = $(AS) The documentation about *_AFLAGS* sounds like the flags were passed to $(AS). This is somewhat misleading. Signed-off-by: Masahiro Yamada Reviewed-by: Nathan Chancellor Documentation/kbuild/kbuild.rst | 5 ++--- Documentation/kbuild/makefiles.rst | 12 ++++++------ 2 files changed, 8 insertions(+), 9 deletions(-) commit 8e2442a5f86e1f77b86401fce274a7f622740bc4 Author: Masahiro Yamada Date: Fri Jul 12 15:07:09 2019 +0900 kconfig: fix missing choice values in auto.conf Since commit 00c864f8903d ("kconfig: allow all config targets to write auto.conf if missing"), Kconfig creates include/config/auto.conf in the defconfig stage when it is missing. Joonas Kylmälä reported incorrect auto.conf generation under some circumstances. To reproduce it, apply the following diff: | --- a/arch/arm/configs/imx_v6_v7_defconfig | +++ b/arch/arm/configs/imx_v6_v7_defconfig | @@ -345,14 +345,7 @@ CONFIG_USB_CONFIGFS_F_MIDI=y | CONFIG_USB_CONFIGFS_F_HID=y | CONFIG_USB_CONFIGFS_F_UVC=y | CONFIG_USB_CONFIGFS_F_PRINTER=y | -CONFIG_USB_ZERO=m | -CONFIG_USB_AUDIO=m | -CONFIG_USB_ETH=m | -CONFIG_USB_G_NCM=m | -CONFIG_USB_GADGETFS=m | -CONFIG_USB_FUNCTIONFS=m | -CONFIG_USB_MASS_STORAGE=m | -CONFIG_USB_G_SERIAL=m | +CONFIG_USB_FUNCTIONFS=y | CONFIG_MMC=y | CONFIG_MMC_SDHCI=y | CONFIG_MMC_SDHCI_PLTFM=y And then, run: $ make ARCH=arm mrproper imx_v6_v7_defconfig You will see CONFIG_USB_FUNCTIONFS=y is correctly contained in the .config, but not in the auto.conf. Please note drivers/usb/gadget/legacy/Kconfig is included from a choice block in drivers/usb/gadget/Kconfig. So USB_FUNCTIONFS is a choice value. This is probably a similar situation described in commit beaaddb62540 ("kconfig: tests: test defconfig when two choices interact"). When sym_calc_choice() is called, the choice symbol forgets the SYMBOL_DEF_USER unless all of its choice values are explicitly set by the user. The choice symbol is given just one chance to recall it because set_all_choice_values() is called if SYMBOL_NEED_SET_CHOICE_VALUES is set. When sym_calc_choice() is called again, the choice symbol forgets it forever, since SYMBOL_NEED_SET_CHOICE_VALUES is a one-time aid. Hence, we cannot call sym_clear_all_valid() again and again. It is crazy to repeat set and unset of internal flags. However, we cannot simply get rid of "sym->flags &= flags | ~SYMBOL_DEF_USER;" Doing so would re-introduce the problem solved by commit 5d09598d488f ("kconfig: fix new choices being skipped upon config update"). To work around the issue, conf_write_autoconf() stopped calling sym_clear_all_valid(). conf_write() must be changed accordingly. Currently, it clears SYMBOL_WRITE after the symbol is written into the .config file. This is needed to prevent it from writing the same symbol multiple times in case the symbol is declared in two or more locations. I added the new flag SYMBOL_WRITTEN, to track the symbols that have been written. Anyway, this is a cheesy workaround in order to suppress the issue as far as defconfig is concerned. Handling of choices is totally broken. sym_clear_all_valid() is called every time a user touches a symbol from the GUI interface. To reproduce it, just add a new symbol drivers/usb/gadget/legacy/Kconfig, then touch around unrelated symbols from menuconfig. USB_FUNCTIONFS will disappear from the .config file. I added the Fixes tag since it is more fatal than before. But, this has been broken since long long time before, and still it is. We should take a closer look to fix this correctly somehow. Fixes: 00c864f8903d ("kconfig: allow all config targets to write auto.conf if missing") Cc: linux-stable # 4.19+ Reported-by: Joonas Kylmälä Signed-off-by: Masahiro Yamada Tested-by: Joonas Kylmälä scripts/kconfig/confdata.c | 7 +++---- scripts/kconfig/expr.h | 1 + 2 files changed, 4 insertions(+), 4 deletions(-) commit 64dbc122b20f75183d8822618c24f85144a5a94d Author: Josh Poimboeuf Date: Mon Jul 15 11:51:39 2019 -0500 x86/entry/64: Use JMP instead of JMPQ Somehow the swapgs mitigation entry code patch ended up with a JMPQ instruction instead of JMP, where only the short jump is needed. Some assembler versions apparently fail to optimize JMPQ into a two-byte JMP when possible, instead always using a 7-byte JMP with relocation. For some reason that makes the entry code explode with a #GP during boot. Change it back to "JMP" as originally intended. Fixes: 18ec54fdd6d1 ("x86/speculation: Prepare entry code for Spectre v1 swapgs mitigations") Signed-off-by: Josh Poimboeuf Signed-off-by: Thomas Gleixner arch/x86/entry/entry_64.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 65f11c72780fa9d598df88def045ccb6a885cf80 Author: Ilya Trukhanov Date: Tue Jul 2 13:37:16 2019 +0300 HID: Add 044f:b320 ThrustMaster, Inc. 2 in 1 DT Enable force feedback for the Thrustmaster Dual Trigger 2 in 1 Rumble Force gamepad. Compared to other Thrustmaster devices, left and right rumble motors here are swapped. Signed-off-by: Ilya Trukhanov Signed-off-by: Jiri Kosina drivers/hid/hid-tmff.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit d79f7badd118e678cf85462df637329aff26e9d5 Author: Filipe Laíns Date: Tue Jul 16 08:37:47 2019 +0100 HID: logitech-dj: add the Powerplay receiver Add device ID for Powerplay receiver. Signed-off-by: Filipe Laíns Signed-off-by: Jiri Kosina drivers/hid/hid-ids.h | 1 + drivers/hid/hid-logitech-dj.c | 4 ++++ 2 files changed, 5 insertions(+) commit 27fc32fd9417968a459d43d9a7c50fd423d53eb9 Author: Filipe Laíns Date: Tue Jul 16 08:37:26 2019 +0100 HID: logitech-hidpp: add USB PID for a few more supported mice Add more device IDs to logitech-hidpp driver. Signed-off-by: Filipe Laíns Signed-off-by: Jiri Kosina drivers/hid/hid-logitech-hidpp.c | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) commit 600ea54dbaecdf3f68ec52b8d027bacbebf27d92 Author: Filipe Laíns Date: Tue Jul 16 08:36:21 2019 +0100 HID: logitech-dj: rename "gaming" receiver to "lightspeed" This should help people identify the receiver. there are several receivers used in gaming mice. the "lightspeed" technology is pretty well advertise so this won't just be an obscure name. Signed-off-by: Filipe Laíns Signed-off-by: Jiri Kosina drivers/hid/hid-ids.h | 2 +- drivers/hid/hid-logitech-dj.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 4d1a082da968ff0c9d7b69a7ec44e6be6fc6e213 Author: Like Xu Date: Wed Jul 17 10:51:18 2019 +0800 KVM: x86/vPMU: reset pmc->counter to 0 for pmu fixed_counters To avoid semantic inconsistency, the fixed_counters in Intel vPMU need to be reset to 0 in intel_pmu_reset() as gp_counters does. Signed-off-by: Like Xu Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/pmu_intel.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 518b7d55f80eb548595c7940b6975ba350e5255d Author: Mauro Carvalho Chehab Date: Tue Jun 18 15:13:40 2019 -0300 docs: virtual: add it to the documentation body As files are getting converted to ReST, add them to the documentation body. Signed-off-by: Mauro Carvalho Chehab Documentation/index.rst | 1 + Documentation/virtual/kvm/index.rst | 1 + 2 files changed, 2 insertions(+) commit 9fc3a18a942f74d245429211577a733930d365fa Author: Mauro Carvalho Chehab Date: Sun Jul 14 11:44:23 2019 -0300 docs: remove extra conf.py files Now that the latex_documents are handled automatically, we can remove those extra conf.py files. Signed-off-by: Mauro Carvalho Chehab Documentation/admin-guide/conf.py | 10 ---------- Documentation/core-api/conf.py | 10 ---------- Documentation/crypto/conf.py | 10 ---------- Documentation/dev-tools/conf.py | 10 ---------- Documentation/doc-guide/conf.py | 10 ---------- Documentation/driver-api/80211/conf.py | 10 ---------- Documentation/driver-api/conf.py | 10 ---------- Documentation/driver-api/pm/conf.py | 10 ---------- Documentation/filesystems/conf.py | 10 ---------- Documentation/gpu/conf.py | 10 ---------- Documentation/input/conf.py | 10 ---------- Documentation/kernel-hacking/conf.py | 10 ---------- Documentation/maintainer/conf.py | 10 ---------- Documentation/media/conf.py | 12 ------------ Documentation/networking/conf.py | 10 ---------- Documentation/process/conf.py | 10 ---------- Documentation/sh/conf.py | 10 ---------- Documentation/sound/conf.py | 10 ---------- Documentation/userspace-api/conf.py | 10 ---------- Documentation/vm/conf.py | 10 ---------- Documentation/x86/conf.py | 10 ---------- 21 files changed, 212 deletions(-) commit a84d9e899683cd79cb134c6d962e57d0de9446cc Author: Mauro Carvalho Chehab Date: Sun Jul 14 11:18:13 2019 -0300 docs: load_config.py: avoid needing a conf.py just due to LaTeX docs Right now, for every directory that we need to have LaTeX output, a conf.py file is required. That causes an extra overhead and it is actually a hack, as the latex_documents line there are usually a copy of the ones that are there already at the main conf.py. So, instead, re-use the global latex_documents var, just adjusting the path to be relative ones. Signed-off-by: Mauro Carvalho Chehab Documentation/sphinx/load_config.py | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) commit 27eed923f715f6269b98e089ad2164f9b016eace Author: Mauro Carvalho Chehab Date: Sat Jul 13 08:19:44 2019 -0300 scripts/sphinx-pre-install: seek for Noto CJK fonts for pdf output The translations guide need Noto CJK fonts. So, add a logic that would suggest its install for distros. It also fix a few other issues while testing the script with several distributions. Signed-off-by: Mauro Carvalho Chehab scripts/sphinx-pre-install | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 4ea96d57bbfda93ae6cfdc8e565a3c419a78f328 Author: Mauro Carvalho Chehab Date: Sat Jul 13 08:19:44 2019 -0300 scripts/sphinx-pre-install: cleanup Gentoo checks On Gentoo, the portage changes for ImageMagick to work are always suggested, even if already applied. While the two extra commands should be harmless, add a check to avoid reporting it without need. Signed-off-by: Mauro Carvalho Chehab scripts/sphinx-pre-install | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 353290a9eb5362a80bc8e52fcd7eb77a30f48afc Author: Mauro Carvalho Chehab Date: Sat Jul 13 08:19:44 2019 -0300 scripts/sphinx-pre-install: fix latexmk dependencies The name of the package with carries latexmk is different on two distros: - On OpenSUSE, latexmk is packaged as "texlive-latexmk-bin" - On Mageia, latexmk is packaged at "texlive-collection-basic" Signed-off-by: Mauro Carvalho Chehab scripts/sphinx-pre-install | 4 ++++ 1 file changed, 4 insertions(+) commit 56e5a633923793b31515795ad30156a307572c1e Author: Mauro Carvalho Chehab Date: Sat Jul 13 09:37:16 2019 -0300 scripts/sphinx-pre-install: don't use LaTeX with CentOS 7 There aren't enough texlive packages for LaTeX-based builds to work on CentOS/RHEL <= 7. Signed-off-by: Mauro Carvalho Chehab scripts/sphinx-pre-install | 68 ++++++++++++++++++++++++++++++++++------------ 1 file changed, 50 insertions(+), 18 deletions(-) commit b308467c916aa7acc5069802ab76a9f657434701 Author: Mauro Carvalho Chehab Date: Sat Jul 13 08:50:24 2019 -0300 scripts/sphinx-pre-install: fix script for RHEL/CentOS There's a missing parenthesis at the script, with causes it to fail to detect non-Fedora releases (e. g. RHEL/CentOS). Tested with Centos 7.6.1810. Signed-off-by: Mauro Carvalho Chehab scripts/sphinx-pre-install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e0de2b59e243c88296fc983e32dd6484365e87a7 Author: Mauro Carvalho Chehab Date: Sun Jul 14 07:16:18 2019 -0300 docs: conf.py: only use CJK if the font is available If we try to build a book with asian characters with XeLaTeX and the font is not available, it will produce an error. So, instead, add a logic at conf.py to detect if the proper font is installed. This will avoid an error while building the document, although the result may not be readable. Signed-off-by: Mauro Carvalho Chehab Documentation/conf.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 24889dad3d9e7c9e22f5be46d9ae7b8ca92cc1cc Author: Mauro Carvalho Chehab Date: Tue Jul 9 15:14:17 2019 -0300 docs: conf.py: add CJK package needed by translations In order to be able to output Asian symbols with XeLaTeX, we need the xeCJK package, and a default font for CJK symbols. Signed-off-by: Mauro Carvalho Chehab Documentation/conf.py | 4 ++++ 1 file changed, 4 insertions(+) commit 9d42afbe6bd4ce6d424159715e4abf3ea3ddb789 Author: Mauro Carvalho Chehab Date: Tue Jul 9 06:52:36 2019 -0300 docs: pdf: add all Documentation/*/index.rst to PDF output Currently, all index files should be manually added to the latex_documents array at conf.py. While this allows fine-tuning some LaTeX specific things, like the name of the output file and the name of the document, it is not uncommon to forget adding new documents there. So, add a logic that will seek for all Documentation/*/index.rst. If the index is not yet at latex_documents, it includes using a reasonable default. Signed-off-by: Mauro Carvalho Chehab Documentation/conf.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit bff9e34c678552eb172916d9288913e8bd8cc9d1 Author: Mauro Carvalho Chehab Date: Mon Jul 15 05:31:06 2019 -0300 docs: fix broken doc references due to renames Some files got renamed but probably due to some merge conflicts, a few references still point to the old locations. Signed-off-by: Mauro Carvalho Chehab Documentation/RCU/rculist_nulls.txt | 2 +- Documentation/devicetree/bindings/arm/idle-states.txt | 2 +- Documentation/locking/spinlocks.rst | 4 ++-- Documentation/memory-barriers.txt | 2 +- Documentation/translations/ko_KR/memory-barriers.txt | 2 +- Documentation/watchdog/hpwdt.rst | 2 +- MAINTAINERS | 8 ++++---- drivers/gpu/drm/drm_modes.c | 2 +- drivers/i2c/busses/i2c-nvidia-gpu.c | 2 +- drivers/scsi/hpsa.c | 4 ++-- 10 files changed, 15 insertions(+), 15 deletions(-) commit 08a69058c02f9588775360c8703e69fc0ec4626c Author: Mauro Carvalho Chehab Date: Mon Jul 15 09:39:57 2019 -0300 docs: power: add it to to the main documentation index The power docs are orphaned at the documentation body. While it could likely be moved to be inside some guide, I'm opting to just adding it to the main index.rst, removing the :orphan: and adding the SPDX header. The reason is similar to what it was done for other driver-specific subsystems: the docs there contain a mix of Kernelspace, uAPI and admin-guide. So, better to keep them on its own directory, while the docs there are not properly classified. Signed-off-by: Mauro Carvalho Chehab Documentation/index.rst | 1 + Documentation/power/index.rst | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit 4d2e26a38fbcde2ba14882cbdb845caa1c17e19b Author: Mauro Carvalho Chehab Date: Wed Apr 10 08:32:42 2019 -0300 docs: powerpc: convert docs to ReST and rename to *.rst Convert docs to ReST and add them to the arch-specific book. The conversion here was trivial, as almost every file there was already using an elegant format close to ReST standard. The changes were mostly to mark literal blocks and add a few missing section title identifiers. One note with regards to "--": on Sphinx, this can't be used to identify a list, as it will format it badly. This can be used, however, to identify a long hyphen - and "---" is an even longer one. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Acked-by: Andrew Donnellan # cxl Documentation/PCI/pci-error-recovery.rst | 5 +- Documentation/index.rst | 1 + .../powerpc/{bootwrapper.txt => bootwrapper.rst} | 28 +++- .../powerpc/{cpu_families.txt => cpu_families.rst} | 23 +-- .../powerpc/{cpu_features.txt => cpu_features.rst} | 6 +- Documentation/powerpc/{cxl.txt => cxl.rst} | 46 ++++-- .../powerpc/{cxlflash.txt => cxlflash.rst} | 10 +- .../powerpc/{DAWR-POWER9.txt => dawr-power9.rst} | 15 +- Documentation/powerpc/{dscr.txt => dscr.rst} | 18 ++- ...ror-recovery.txt => eeh-pci-error-recovery.rst} | 108 +++++++------- ...ssisted-dump.txt => firmware-assisted-dump.rst} | 117 +++++++++------- Documentation/powerpc/{hvcs.txt => hvcs.rst} | 108 +++++++------- Documentation/powerpc/index.rst | 34 +++++ Documentation/powerpc/isa-versions.rst | 15 +- Documentation/powerpc/{mpc52xx.txt => mpc52xx.rst} | 12 +- ...powernv.txt => pci_iov_resource_on_powernv.rst} | 15 +- Documentation/powerpc/{pmu-ebb.txt => pmu-ebb.rst} | 1 + Documentation/powerpc/ptrace.rst | 156 +++++++++++++++++++++ Documentation/powerpc/ptrace.txt | 151 -------------------- .../powerpc/{qe_firmware.txt => qe_firmware.rst} | 37 ++--- .../{syscall64-abi.txt => syscall64-abi.rst} | 29 ++-- ...ctional_memory.txt => transactional_memory.rst} | 45 +++--- MAINTAINERS | 6 +- arch/powerpc/kernel/exceptions-64s.S | 2 +- drivers/soc/fsl/qe/qe.c | 2 +- drivers/tty/hvc/hvcs.c | 2 +- include/soc/fsl/qe/qe.h | 2 +- 27 files changed, 567 insertions(+), 427 deletions(-) commit 4c4cbbaa693a5cc435664f2f220c8b0be873abd1 Author: Cornelia Huck Date: Wed Jul 17 11:35:35 2019 +0200 Documentation: fix vfio-ccw doc *Really* mark the literal block as such. Fixes: 127e62174041 ("vfio-ccw: Update documentation for csch/hsch") Signed-off-by: Cornelia Huck Documentation/s390/vfio-ccw.rst | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit a5008b59cd9d8de12ab623cb5052bb4735330e5c Author: Christoph Hellwig Date: Tue Jul 16 22:00:54 2019 +0200 dma-direct: only limit the mapping size if swiotlb could be used Don't just check for a swiotlb buffer, but also if buffering might be required for this particular device. Fixes: 133d624b1cee ("dma: Introduce dma_max_mapping_size()") Reported-by: Benjamin Herrenschmidt Signed-off-by: Christoph Hellwig Tested-by: Benjamin Herrenschmidt kernel/dma/direct.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit b866455423e040813f113d8b87e8297778ee2014 Author: Christoph Hellwig Date: Tue Jul 16 21:59:11 2019 +0200 dma-mapping: add a dma_addressing_limited helper This helper returns if the device has issues addressing all present memory in the system. Signed-off-by: Christoph Hellwig include/linux/dma-mapping.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit b23e5844dfe78a80ba672793187d3f52e4b528d7 Author: Zhenzhong Duan Date: Sun Jul 14 17:15:32 2019 +0800 xen/pv: Fix a boot up hang revealed by int3 self test Commit 7457c0da024b ("x86/alternatives: Add int3_emulate_call() selftest") is used to ensure there is a gap setup in int3 exception stack which could be used for inserting call return address. This gap is missed in XEN PV int3 exception entry path, then below panic triggered: [ 0.772876] general protection fault: 0000 [#1] SMP NOPTI [ 0.772886] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.2.0+ #11 [ 0.772893] RIP: e030:int3_magic+0x0/0x7 [ 0.772905] RSP: 3507:ffffffff82203e98 EFLAGS: 00000246 [ 0.773334] Call Trace: [ 0.773334] alternative_instructions+0x3d/0x12e [ 0.773334] check_bugs+0x7c9/0x887 [ 0.773334] ? __get_locked_pte+0x178/0x1f0 [ 0.773334] start_kernel+0x4ff/0x535 [ 0.773334] ? set_init_arg+0x55/0x55 [ 0.773334] xen_start_kernel+0x571/0x57a For 64bit PV guests, Xen's ABI enters the kernel with using SYSRET, with %rcx/%r11 on the stack. To convert back to "normal" looking exceptions, the xen thunks do 'xen_*: pop %rcx; pop %r11; jmp *'. E.g. Extracting 'xen_pv_trap xenint3' we have: xen_xenint3: pop %rcx; pop %r11; jmp xenint3 As xenint3 and int3 entry code are same except xenint3 doesn't generate a gap, we can fix it by using int3 and drop useless xenint3. Signed-off-by: Zhenzhong Duan Reviewed-by: Juergen Gross Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Stefano Stabellini Cc: Andy Lutomirski Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Andrew Cooper Signed-off-by: Juergen Gross arch/x86/entry/entry_64.S | 1 - arch/x86/include/asm/traps.h | 2 +- arch/x86/xen/enlighten_pv.c | 2 +- arch/x86/xen/xen-asm_64.S | 1 - 4 files changed, 2 insertions(+), 4 deletions(-) commit bef6e0ae7420bfddfb150dda529bbe835f87b9f2 Author: Zhenzhong Duan Date: Tue Jul 16 12:26:09 2019 +0800 x86/xen: Add "nopv" support for HVM guest PVH guest needs PV extentions to work, so "nopv" parameter should be ignored for PVH but not for HVM guest. If PVH guest boots up via the Xen-PVH boot entry, xen_pvh is set early, we know it's PVH guest and ignore "nopv" parameter directly. If PVH guest boots up via the normal boot entry same as HVM guest, it's hard to distinguish PVH and HVM guest at that time. In this case, we have to panic early if PVH is detected and nopv is enabled to avoid a worse situation later. Remove static from bool_x86_init_noop/x86_op_int_noop so they could be used globally. Move xen_platform_hvm() after xen_hvm_guest_late_init() to avoid compile error. Signed-off-by: Zhenzhong Duan Reviewed-by: Boris Ostrovsky Cc: Juergen Gross Cc: Stefano Stabellini Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Signed-off-by: Juergen Gross arch/x86/include/asm/x86_init.h | 2 ++ arch/x86/kernel/x86_init.c | 4 ++-- arch/x86/xen/enlighten_hvm.c | 43 +++++++++++++++++++++++++++++++++-------- 3 files changed, 39 insertions(+), 10 deletions(-) commit cc8f3b4dd2eb859bc57187ccd94b5cd715d9cfba Author: Zhenzhong Duan Date: Tue Jul 16 12:26:08 2019 +0800 x86/paravirt: Remove const mark from x86_hyper_xen_hvm variable .. as "nopv" support needs it to be changeable at boot up stage. Checkpatch reports warning, so move variable declarations from hypervisor.c to hypervisor.h Signed-off-by: Zhenzhong Duan Reviewed-by: Juergen Gross Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Stefano Stabellini Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Signed-off-by: Juergen Gross arch/x86/include/asm/hypervisor.h | 8 ++++++++ arch/x86/kernel/cpu/hypervisor.c | 8 -------- arch/x86/xen/enlighten_hvm.c | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) commit b39b049749ce08c7756be57082177730617bb9a0 Author: Zhenzhong Duan Date: Thu Jul 11 20:02:10 2019 +0800 xen: Map "xen_nopv" parameter to "nopv" and mark it obsolete Clean up unnecessory code after that operation. Signed-off-by: Zhenzhong Duan Reviewed-by: Boris Ostrovsky Cc: Juergen Gross Cc: Stefano Stabellini Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Signed-off-by: Juergen Gross Documentation/admin-guide/kernel-parameters.txt | 2 ++ arch/x86/xen/enlighten_hvm.c | 12 ++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) commit 30978346372e5c43a652cfbd4533c6bd5427c33b Author: Zhenzhong Duan Date: Thu Jul 11 20:02:09 2019 +0800 x86: Add "nopv" parameter to disable PV extensions In virtualization environment, PV extensions (drivers, interrupts, timers, etc) are enabled in the majority of use cases which is the best option. However, in some cases (kexec not fully working, benchmarking) we want to disable PV extensions. We have "xen_nopv" for that purpose but only for XEN. For a consistent admin experience a common command line parameter "nopv" set across all PV guest implementations is a better choice. There are guest types which just won't work without PV extensions, like Xen PV, Xen PVH and jailhouse. add a "ignore_nopv" member to struct hypervisor_x86 set to true for those guest types and call the detect functions only if nopv is false or ignore_nopv is true. Suggested-by: Juergen Gross Signed-off-by: Zhenzhong Duan Reviewed-by: Juergen Gross Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Jan Kiszka Cc: Boris Ostrovsky Cc: Stefano Stabellini Signed-off-by: Juergen Gross Documentation/admin-guide/kernel-parameters.txt | 5 +++++ arch/x86/include/asm/hypervisor.h | 4 ++++ arch/x86/kernel/cpu/hypervisor.c | 11 +++++++++++ arch/x86/kernel/jailhouse.c | 1 + arch/x86/xen/enlighten_pv.c | 1 + 5 files changed, 22 insertions(+) commit 1b37683cda0217305837fd1b79e7c57104d4f983 Author: Zhenzhong Duan Date: Thu Jul 11 20:02:08 2019 +0800 x86/xen: Mark xen_hvm_need_lapic() and xen_x2apic_para_available() as __init .. as they are only called at early bootup stage. In fact, other functions in x86_hyper_xen_hvm.init.* are all marked as __init. Unexport xen_hvm_need_lapic as it's never used outside. Signed-off-by: Zhenzhong Duan Reviewed-by: Juergen Gross Cc: Boris Ostrovsky Cc: Stefano Stabellini Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Signed-off-by: Juergen Gross arch/x86/include/asm/xen/hypervisor.h | 6 +++--- arch/x86/xen/enlighten_hvm.c | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) commit 814bbf49dcd0ad642e7ceb8991e57555c5472cce Author: Juergen Gross Date: Sun Jul 14 14:04:14 2019 +0200 xen: remove tmem driver The Xen tmem (transcendent memory) driver can be removed, as the related Xen hypervisor feature never made it past the "experimental" state and will be removed in future Xen versions (>= 4.13). The xen-selfballoon driver depends on tmem, so it can be removed, too. Signed-off-by: Juergen Gross Acked-by: Boris Ostrovsky Signed-off-by: Juergen Gross Documentation/admin-guide/kernel-parameters.txt | 21 - drivers/xen/Kconfig | 23 - drivers/xen/Makefile | 2 - drivers/xen/tmem.c | 419 ----------------- drivers/xen/xen-balloon.c | 2 - drivers/xen/xen-selfballoon.c | 579 ------------------------ include/xen/balloon.h | 10 - include/xen/tmem.h | 18 - 8 files changed, 1074 deletions(-) commit 090d54bcbc54af75e94442e60f42d973341a5f53 Author: Zhenzhong Duan Date: Wed Jun 26 16:57:09 2019 +0800 Revert "x86/paravirt: Set up the virt_spin_lock_key after static keys get initialized" This reverts commit ca5d376e17072c1b60c3fee66f3be58ef018952d. Commit 8990cac6e5ea ("x86/jump_label: Initialize static branching early") adds jump_label_init() call in setup_arch() to make static keys initialized early, so we could use the original simpler code again. Signed-off-by: Zhenzhong Duan Reviewed-by: Thomas Gleixner Signed-off-by: Juergen Gross arch/x86/kernel/smpboot.c | 3 +-- arch/x86/xen/spinlock.c | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) commit bce5963bcb4f9934faa52be323994511d59fd13c Author: Juergen Gross Date: Fri Jun 21 20:47:03 2019 +0200 xen/events: fix binding user event channels to cpus When binding an interdomain event channel to a vcpu via IOCTL_EVTCHN_BIND_INTERDOMAIN not only the event channel needs to be bound, but the affinity of the associated IRQi must be changed, too. Otherwise the IRQ and the event channel won't be moved to another vcpu in case the original vcpu they were bound to is going offline. Cc: # 4.13 Fixes: c48f64ab472389df ("xen-evtchn: Bind dyn evtchn:qemu-dm interrupt to next online VCPU") Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Juergen Gross drivers/xen/events/events_base.c | 12 ++++++++++-- drivers/xen/evtchn.c | 2 +- include/xen/events.h | 3 ++- 3 files changed, 13 insertions(+), 4 deletions(-) commit 07d9aa14346489d6facae5777ceb267a1dcadbc5 Author: Christoph Hellwig Date: Mon Jun 17 14:20:00 2019 +0200 scsi: megaraid_sas: set an unlimited max_segment_size When using a virt_boundary_mask, as done for NVMe devices attached to megaraid_sas controllers, we require an unlimited max_segment_size as the virt boundary merging code assumes that. But we also need to propagate that to the DMA mapping layer to make dma-debug happy. The SCSI layer takes care of that when using the per-host virt_boundary setting, but given that megaraid_sas only wants to set the virt_boundary for actual NVMe devices, we can't rely on that. The DMA layer maximum segment is global to the HBA however, so we have to set it explicitly. This patch assumes that megaraid_sas does not have a segment size limitation, which seems true based on the SGL format, but will need to be verified. Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 1 + 1 file changed, 1 insertion(+) commit ce0ad853109733d772d26224297fda0de313bf13 Author: Christoph Hellwig Date: Mon Jun 17 14:19:59 2019 +0200 scsi: mpt3sas: set an unlimited max_segment_size for SAS 3.0 HBAs When using a virt_boundary_mask, as done for NVMe devices attached to mpt3sas controllers, we require an unlimited max_segment_size as the virt boundary merging code assumes that. But we also need to propagate that to the DMA mapping layer to make dma-debug happy. The SCSI layer takes care of that when using the per-host virt_boundary setting, but given that mpt3sas only wants to set the virt_boundary for actual NVMe devices, we can't rely on that. The DMA layer maximum segment is global to the HBA however, so we have to set it explicitly. This patch assumes that mpt3sas does not have a segment size limitation, which seems true based on the SGL format, but will need to be verified. Signed-off-by: Christoph Hellwig Acked-by: Suganath Prabu Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_scsih.c | 1 + 1 file changed, 1 insertion(+) commit 8c175d3131acd166ba57f1fd31f0d76f6fa4f376 Author: Christoph Hellwig Date: Mon Jun 17 14:19:58 2019 +0200 scsi: IB/srp: set virt_boundary_mask in the scsi host This ensures all proper DMA layer handling is taken care of by the SCSI midlayer. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Acked-by: Bart Van Assche Reviewed-by: Max Gurtovoy Signed-off-by: Martin K. Petersen drivers/infiniband/ulp/srp/ib_srp.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) commit 09a4460ba4434ef0327cd26bf25f2d7afb973251 Author: Christoph Hellwig Date: Mon Jun 17 14:19:57 2019 +0200 scsi: IB/iser: set virt_boundary_mask in the scsi host This ensures all proper DMA layer handling is taken care of by the SCSI midlayer. Signed-off-by: Christoph Hellwig Acked-by: Sagi Grimberg Reviewed-by: Max Gurtovoy Signed-off-by: Martin K. Petersen drivers/infiniband/ulp/iser/iscsi_iser.c | 35 +++++++------------------------- 1 file changed, 7 insertions(+), 28 deletions(-) commit 83eed4592f19a04004c80e6f256236264db95dd8 Author: Christoph Hellwig Date: Mon Jun 17 14:19:56 2019 +0200 scsi: storvsc: set virt_boundary_mask in the scsi host template This ensures all proper DMA layer handling is taken care of by the SCSI midlayer. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/storvsc_drv.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 552a990ca1668895851271df1224cb02003af348 Author: Christoph Hellwig Date: Mon Jun 17 14:19:55 2019 +0200 scsi: ufshcd: set max_segment_size in the scsi host template We need to also mirror the value to the device to ensure IOMMU merging doesn't undo it, and the SCSI host level parameter will ensure that. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit bdd17bdef7d8da4d8eee254abb4c92d8a566bdc1 Author: Christoph Hellwig Date: Mon Jun 17 14:19:54 2019 +0200 scsi: core: take the DMA max mapping size into account We need to limit the device's max_sectors to what the DMA mapping implementation can support. If not, we risk running out of swiotlb buffers easily. Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/scsi_lib.c | 2 ++ 1 file changed, 2 insertions(+) commit 7ad388d8e4c703980b7018b938cdeec58832d78d Author: Christoph Hellwig Date: Mon Jun 17 14:19:53 2019 +0200 scsi: core: add a host / host template field for the virt boundary This allows drivers setting it up easily instead of branching out to block layer calls in slave_alloc, and ensures the upgraded max_segment_size setting gets picked up by the DMA layer. Signed-off-by: Christoph Hellwig Acked-by: Kashyap Desai < kashyap.desai@broadcom.com> Signed-off-by: Martin K. Petersen drivers/scsi/hosts.c | 3 +++ drivers/scsi/scsi_lib.c | 3 ++- include/scsi/scsi_host.h | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) commit 56cbb429d911991170fe867b4bba14f0efed5829 Author: Al Viro Date: Thu Jul 4 16:57:51 2019 -0400 switch the remnants of releasing the mountpoint away from fs_pin We used to need rather convoluted ordering trickery to guarantee that dput() of ex-mountpoints happens before the final mntput() of the same. Since we don't need that anymore, there's no point playing with fs_pin for that. Signed-off-by: Al Viro fs/fs_pin.c | 10 ++-------- fs/mount.h | 7 +++++-- fs/namespace.c | 37 +++++++++++++++++++------------------ include/linux/fs_pin.h | 1 - 4 files changed, 26 insertions(+), 29 deletions(-) commit 2763d11912317a12318135ca03e592bb6df65624 Author: Al Viro Date: Sun Jun 30 19:18:53 2019 -0400 get rid of detach_mnt() Lift getting the original mount (dentry is actually not needed at all) of the mountpoint into the callers - to do_move_mount() and pivot_root() level. That simplifies the cleanup in those and allows to get saner arguments for attach_mnt_recursive(). Signed-off-by: Al Viro fs/namespace.c | 62 ++++++++++++++++++++++++++-------------------------------- 1 file changed, 28 insertions(+), 34 deletions(-) commit 8c2e408e73f735d2e6e8b43f9b038c9abb082939 Author: Pankaj Gupta Date: Fri Jul 12 10:46:10 2019 +0530 virtio_pmem: fix sparse warning This patch fixes below sparse warning related to __virtio type in virtio pmem driver. This is reported by Intel test bot on linux-next tree. nd_virtio.c:56:28: warning: incorrect type in assignment (different base types) nd_virtio.c:56:28: expected unsigned int [unsigned] [usertype] type nd_virtio.c:56:28: got restricted __virtio32 nd_virtio.c:93:59: warning: incorrect type in argument 2 (different base types) nd_virtio.c:93:59: expected restricted __virtio32 [usertype] val nd_virtio.c:93:59: got unsigned int [unsigned] [usertype] ret Reported-by: kbuild test robot Signed-off-by: Pankaj Gupta Acked-by: Michael S. Tsirkin Signed-off-by: Dan Williams drivers/nvdimm/nd_virtio.c | 4 ++-- include/uapi/linux/virtio_pmem.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 4edbe133f851c9e3a2f2a1db367e826b01e72594 Author: Al Viro Date: Sun Jun 30 10:39:08 2019 -0400 make struct mountpoint bear the dentry reference to mountpoint, not struct mount Using dput_to_list() to shift the contributing reference from ->mnt_mountpoint to ->mnt_mp->m_dentry. Dentries are dropped (with dput_to_list()) as soon as struct mountpoint is destroyed; in cases where we are under namespace_sem we use the global list, shrinking it in namespace_unlock(). In case of detaching stuck MNT_LOCKed children at final mntput_no_expire() we use a local list and shrink it ourselves. ->mnt_ex_mountpoint crap is gone. Signed-off-by: Al Viro fs/mount.h | 1 - fs/namespace.c | 52 +++++++++++++++++++++++++--------------------------- 2 files changed, 25 insertions(+), 28 deletions(-) commit f9b0530fa02e0c73f31a49ef743e8f44eb8e32cc Author: Ming Lei Date: Fri Jul 12 10:08:19 2019 +0800 scsi: core: Fix race on creating sense cache When scsi_init_sense_cache(host) is called concurrently from different hosts, each code path may find that no cache has been created and allocate a new one. The lack of locking can lead to potentially overriding a cache allocated by a different host. Fix the issue by moving 'mutex_lock(&scsi_sense_cache_mutex)' before scsi_select_sense_cache(). Fixes: 0a6ac4ee7c21 ("scsi: respect unchecked_isa_dma for blk-mq") Cc: Stable Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Ewan D. Milne Signed-off-by: Ming Lei Signed-off-by: Martin K. Petersen drivers/scsi/scsi_lib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0cdc58580b37a160fac4b884266b8b7cb096f539 Author: Damien Le Moal Date: Wed Jul 17 10:51:49 2019 +0900 scsi: sd_zbc: Fix compilation warning kbuild test robot gets the following compilation warning using gcc 7.4 cross compilation for c6x (GCC_VERSION=7.4.0 make.cross ARCH=c6x). In file included from include/asm-generic/bug.h:18:0, from arch/c6x/include/asm/bug.h:12, from include/linux/bug.h:5, from include/linux/thread_info.h:12, from include/asm-generic/current.h:5, from ./arch/c6x/include/generated/asm/current.h:1, from include/linux/sched.h:12, from include/linux/blkdev.h:5, from drivers//scsi/sd_zbc.c:11: drivers//scsi/sd_zbc.c: In function 'sd_zbc_read_zones': >> include/linux/kernel.h:62:48: warning: 'zone_blocks' may be used uninitialized in this function [-Wmaybe-uninitialized] #define __round_mask(x, y) ((__typeof__(x))((y)-1)) ^ drivers//scsi/sd_zbc.c:464:6: note: 'zone_blocks' was declared here u32 zone_blocks; ^~~~~~~~~~~ This is a false-positive report. The variable zone_blocks is always initialized in sd_zbc_check_zones() before use. It is not initialized only and only if sd_zbc_check_zones() fails. Avoid this warning by initializing the zone_blocks variable to 0. Fixes: 5f832a395859 ("scsi: sd_zbc: Fix sd_zbc_check_zones() error checks") Cc: Stable Signed-off-by: Damien Le Moal Signed-off-by: Martin K. Petersen drivers/scsi/sd_zbc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 41a6bf6529edd10a6def42e3b2c34a7474bcc2f5 Author: Colin Ian King Date: Tue Jul 2 10:18:35 2019 +0100 scsi: libfc: fix null pointer dereference on a null lport Currently if lport is null then the null lport pointer is dereference when printing out debug via the FC_LPORT_DB macro. Fix this by using the more generic FC_LIBFC_DBG debug macro instead that does not use lport. Addresses-Coverity: ("Dereference after null check") Fixes: 7414705ea4ae ("libfc: Add runtime debugging with debug_logging module parameter") Signed-off-by: Colin Ian King Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/libfc/fc_exch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 23c84eb7837514e16d79ed6d849b13745e0ce688 Author: Matthew Wilcox (Oracle) Date: Wed Jul 3 23:21:25 2019 -0400 dax: Fix missed wakeup with PMD faults RocksDB can hang indefinitely when using a DAX file. This is due to a bug in the XArray conversion when handling a PMD fault and finding a PTE entry. We use the wrong index in the hash and end up waiting on the wrong waitqueue. There's actually no need to wait; if we find a PTE entry while looking for a PMD entry, we can return immediately as we know we should fall back to a PTE fault (which may not conflict with the lock held). We reuse the XA_RETRY_ENTRY to signal a conflicting entry was found. This value can never be found in an XArray while holding its lock, so it does not create an ambiguity. Cc: Link: http://lkml.kernel.org/r/CAPcyv4hwHpX-MkUEqxwdTj7wCCZCN4RV-L4jsnuwLGyL_UEG4A@mail.gmail.com Fixes: b15cd800682f ("dax: Convert page fault handlers to XArray") Signed-off-by: Matthew Wilcox (Oracle) Tested-by: Dan Williams Reported-by: Robert Barror Reported-by: Seema Pandit Reviewed-by: Jan Kara Signed-off-by: Dan Williams fs/dax.c | 53 +++++++++++++++++++++++++++++++++-------------------- 1 file changed, 33 insertions(+), 20 deletions(-) commit 43e11fa2d1d3b6e35629fa556eb7d571edba2010 Author: Gustavo A. R. Silva Date: Tue Jul 16 16:30:58 2019 -0700 fs/select.c: use struct_size() in kmalloc() One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct foo { int stuff; struct boo entry[]; }; size = sizeof(struct foo) + count * sizeof(struct boo); instance = kmalloc(size, GFP_KERNEL); Instead of leaving these open-coded and prone to type mistakes, we can now use the new struct_size() helper: instance = kmalloc(struct_size(instance, entry, count), GFP_KERNEL); Also, notice that variable size is unnecessary, hence it is removed. This code was detected with the help of Coccinelle. Link: http://lkml.kernel.org/r/20190604164226.GA13823@embeddedor Signed-off-by: Gustavo A. R. Silva Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/select.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 79eb597cba06c435b72f220e9d426ae413fc2579 Author: Daniel Jordan Date: Tue Jul 16 16:30:54 2019 -0700 mm: add account_locked_vm utility function locked_vm accounting is done roughly the same way in five places, so unify them in a helper. Include the helper's caller in the debug print to distinguish between callsites. Error codes stay the same, so user-visible behavior does too. The one exception is that the -EPERM case in tce_account_locked_vm is removed because Alexey has never seen it triggered. [daniel.m.jordan@oracle.com: v3] Link: http://lkml.kernel.org/r/20190529205019.20927-1-daniel.m.jordan@oracle.com [sfr@canb.auug.org.au: fix mm/util.c] Link: http://lkml.kernel.org/r/20190524175045.26897-1-daniel.m.jordan@oracle.com Signed-off-by: Daniel Jordan Signed-off-by: Stephen Rothwell Tested-by: Alexey Kardashevskiy Acked-by: Alex Williamson Cc: Alan Tull Cc: Alex Williamson Cc: Benjamin Herrenschmidt Cc: Christoph Lameter Cc: Christophe Leroy Cc: Davidlohr Bueso Cc: Jason Gunthorpe Cc: Mark Rutland Cc: Michael Ellerman Cc: Moritz Fischer Cc: Paul Mackerras Cc: Steve Sistare Cc: Wu Hao Cc: Ira Weiny Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/kvm/book3s_64_vio.c | 44 ++------------------- arch/powerpc/mm/book3s64/iommu_api.c | 41 ++------------------ drivers/fpga/dfl-afu-dma-region.c | 53 ++----------------------- drivers/vfio/vfio_iommu_spapr_tce.c | 54 +++----------------------- drivers/vfio/vfio_iommu_type1.c | 17 +------- include/linux/mm.h | 4 ++ mm/util.c | 75 ++++++++++++++++++++++++++++++++++++ 7 files changed, 98 insertions(+), 190 deletions(-) commit 73b20c84d42de14673a987816dd4d132c7b1f801 Author: Robin Murphy Date: Tue Jul 16 16:30:51 2019 -0700 arm64: mm: implement pte_devmap support In order for things like get_user_pages() to work on ZONE_DEVICE memory, we need a software PTE bit to identify device-backed PFNs. Hook this up along with the relevant helpers to join in with ARCH_HAS_PTE_DEVMAP. [robin.murphy@arm.com: build fixes] Link: http://lkml.kernel.org/r/13026c4e64abc17133bbfa07d7731ec6691c0bcd.1559050949.git.robin.murphy@arm.com Link: http://lkml.kernel.org/r/817d92886fc3b33bcbf6e105ee83a74babb3a5aa.1558547956.git.robin.murphy@arm.com Signed-off-by: Robin Murphy Acked-by: Will Deacon Cc: Anshuman Khandual Cc: Catalin Marinas Cc: Dan Williams Cc: David Hildenbrand Cc: Ira Weiny Cc: Jerome Glisse Cc: Michael Ellerman Cc: Michal Hocko Cc: Oliver O'Halloran Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm64/Kconfig | 1 + arch/arm64/include/asm/pgtable-prot.h | 1 + arch/arm64/include/asm/pgtable.h | 21 +++++++++++++++++++++ 3 files changed, 23 insertions(+) commit 175967318c3018d01931ac950c82adab5deb47ca Author: Robin Murphy Date: Tue Jul 16 16:30:47 2019 -0700 mm: introduce ARCH_HAS_PTE_DEVMAP ARCH_HAS_ZONE_DEVICE is somewhat meaningless in itself, and combined with the long-out-of-date comment can lead to the impression than an architecture may just enable it (since __add_pages() now "comprehends device memory" for itself) and expect things to work. In practice, however, ZONE_DEVICE users have little chance of functioning correctly without __HAVE_ARCH_PTE_DEVMAP, so let's clean that up the same way as ARCH_HAS_PTE_SPECIAL and make it the proper dependency so the real situation is clearer. Link: http://lkml.kernel.org/r/87554aa78478a02a63f2c4cf60a847279ae3eb3b.1558547956.git.robin.murphy@arm.com Signed-off-by: Robin Murphy Acked-by: Dan Williams Reviewed-by: Ira Weiny Acked-by: Oliver O'Halloran Reviewed-by: Anshuman Khandual Cc: Michael Ellerman Cc: Catalin Marinas Cc: David Hildenbrand Cc: Jerome Glisse Cc: Michal Hocko Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/Kconfig | 2 +- arch/powerpc/include/asm/book3s/64/pgtable.h | 1 - arch/x86/Kconfig | 2 +- arch/x86/include/asm/pgtable.h | 4 ++-- arch/x86/include/asm/pgtable_types.h | 1 - include/linux/mm.h | 4 ++-- include/linux/pfn_t.h | 4 ++-- mm/Kconfig | 5 ++--- mm/gup.c | 2 +- 9 files changed, 11 insertions(+), 14 deletions(-) commit 7588adf8dff12c4b358557a13796a25fef796548 Author: Robin Murphy Date: Tue Jul 16 16:30:44 2019 -0700 mm: clean up is_device_*_page() definitions Refactor is_device_{public,private}_page() with is_pci_p2pdma_page() to make them all consistent in depending on their respective config options even when CONFIG_DEV_PAGEMAP_OPS is enabled for other reasons. This allows a little more compile-time optimisation as well as the conceptual and cosmetic cleanup. Link: http://lkml.kernel.org/r/187c2ab27dea70635d375a61b2f2076d26c032b0.1558547956.git.robin.murphy@arm.com Signed-off-by: Robin Murphy Suggested-by: Jerome Glisse Reviewed-by: Anshuman Khandual Cc: Catalin Marinas Cc: Dan Williams Cc: David Hildenbrand Cc: Ira Weiny Cc: Michael Ellerman Cc: Michal Hocko Cc: Oliver O'Halloran Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm.h | 31 +++++++++---------------------- 1 file changed, 9 insertions(+), 22 deletions(-) commit 8aa3c927ec10d1230c3ace8357f624479665f701 Author: Aneesh Kumar K.V Date: Tue Jul 16 16:30:41 2019 -0700 mm/mmap: move common defines to mman-common.h Two architecture that use arch specific MMAP flags are powerpc and sparc. We still have few flag values common across them and other architectures. Consolidate this in mman-common.h. Also update the comment to indicate where to find HugeTLB specific reserved values Link: http://lkml.kernel.org/r/20190604090950.31417-1-aneesh.kumar@linux.ibm.com Signed-off-by: Aneesh Kumar K.V Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/include/uapi/asm/mman.h | 6 +----- arch/sparc/include/uapi/asm/mman.h | 6 ------ include/uapi/asm-generic/mman-common.h | 6 +++++- include/uapi/asm-generic/mman.h | 9 ++++----- 4 files changed, 10 insertions(+), 17 deletions(-) commit 22fcea6f85f2cc74e61bd8b3640faa8467553c24 Author: Aneesh Kumar K.V Date: Tue Jul 16 16:30:38 2019 -0700 mm: move MAP_SYNC to asm-generic/mman-common.h This enables support for synchronous DAX fault on powerpc The generic changes are added as part of b6fb293f2497 ("mm: Define MAP_SYNC and VM_SYNC flags") Without this, mmap returns EOPNOTSUPP for MAP_SYNC with MAP_SHARED_VALIDATE Instead of adding MAP_SYNC with same value to arch/powerpc/include/uapi/asm/mman.h, I am moving the #define to asm-generic/mman-common.h. Two architectures using mman-common.h directly are sparc and powerpc. We should be able to consloidate more #defines to mman-common.h. That can be done as a separate patch. Link: http://lkml.kernel.org/r/20190528091120.13322-1-aneesh.kumar@linux.ibm.com Signed-off-by: Aneesh Kumar K.V Reviewed-by: Jan Kara Cc: Michael Ellerman Cc: Ross Zwisler Cc: Dan Williams Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/uapi/asm-generic/mman-common.h | 3 ++- include/uapi/asm-generic/mman.h | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) commit 9f960da72b25054163cf555e622dcdc3b8ccc488 Author: Pavel Tatashin Date: Tue Jul 16 16:30:35 2019 -0700 device-dax: "Hotremove" persistent memory that is used like normal RAM It is now allowed to use persistent memory like a regular RAM, but currently there is no way to remove this memory until machine is rebooted. This work expands the functionality to also allows hotremoving previously hotplugged persistent memory, and recover the device for use for other purposes. To hotremove persistent memory, the management software must first offline all memory blocks of dax region, and than unbind it from device-dax/kmem driver. So, operations should look like this: echo offline > /sys/devices/system/memory/memoryN/state ... echo dax0.0 > /sys/bus/dax/drivers/kmem/unbind Note: if unbind is done without offlining memory beforehand, it won't be possible to do dax0.0 hotremove, and dax's memory is going to be part of System RAM until reboot. Link: http://lkml.kernel.org/r/20190517215438.6487-4-pasha.tatashin@soleen.com Signed-off-by: Pavel Tatashin Reviewed-by: David Hildenbrand Cc: James Morris Cc: Sasha Levin Cc: Michal Hocko Cc: Dave Hansen Cc: Dan Williams Cc: Keith Busch Cc: Vishal Verma Cc: Dave Jiang Cc: Ross Zwisler Cc: Tom Lendacky Cc: Huang Ying Cc: Fengguang Wu Cc: Borislav Petkov Cc: Bjorn Helgaas Cc: Yaowei Bai Cc: Takashi Iwai Cc: Jérôme Glisse Cc: Dave Hansen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/dax/dax-private.h | 2 ++ drivers/dax/kmem.c | 41 +++++++++++++++++++++++++++++++++++++---- 2 files changed, 39 insertions(+), 4 deletions(-) commit eca499ab3749a4537dee77ffead47a1a2c0dee19 Author: Pavel Tatashin Date: Tue Jul 16 16:30:31 2019 -0700 mm/hotplug: make remove_memory() interface usable Presently the remove_memory() interface is inherently broken. It tries to remove memory but panics if some memory is not offline. The problem is that it is impossible to ensure that all memory blocks are offline as this function also takes lock_device_hotplug that is required to change memory state via sysfs. So, between calling this function and offlining all memory blocks there is always a window when lock_device_hotplug is released, and therefore, there is always a chance for a panic during this window. Make this interface to return an error if memory removal fails. This way it is safe to call this function without panicking machine, and also makes it symmetric to add_memory() which already returns an error. Link: http://lkml.kernel.org/r/20190517215438.6487-3-pasha.tatashin@soleen.com Signed-off-by: Pavel Tatashin Reviewed-by: David Hildenbrand Acked-by: Michal Hocko Cc: Bjorn Helgaas Cc: Borislav Petkov Cc: Dan Williams Cc: Dave Hansen Cc: Dave Hansen Cc: Dave Jiang Cc: Fengguang Wu Cc: Huang Ying Cc: James Morris Cc: Jérôme Glisse Cc: Keith Busch Cc: Ross Zwisler Cc: Sasha Levin Cc: Takashi Iwai Cc: Tom Lendacky Cc: Vishal Verma Cc: Yaowei Bai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memory_hotplug.h | 8 ++++-- mm/memory_hotplug.c | 64 ++++++++++++++++++++++++++++-------------- 2 files changed, 49 insertions(+), 23 deletions(-) commit 31e4ca92a7dd4cdebd7fe1456b3b0b6ace9a816f Author: Pavel Tatashin Date: Tue Jul 16 16:30:27 2019 -0700 device-dax: fix memory and resource leak if hotplug fails Patch series ""Hotremove" persistent memory", v6. Recently, adding a persistent memory to be used like a regular RAM was added to Linux. This work extends this functionality to also allow hot removing persistent memory. We (Microsoft) have an important use case for this functionality. The requirement is for physical machines with small amount of RAM (~8G) to be able to reboot in a very short period of time (<1s). Yet, there is a userland state that is expensive to recreate (~2G). The solution is to boot machines with 2G preserved for persistent memory. Copy the state, and hotadd the persistent memory so machine still has all 8G available for runtime. Before reboot, offline and hotremove device-dax 2G, copy the memory that is needed to be preserved to pmem0 device, and reboot. The series of operations look like this: 1. After boot restore /dev/pmem0 to ramdisk to be consumed by apps. and free ramdisk. 2. Convert raw pmem0 to devdax ndctl create-namespace --mode devdax --map mem -e namespace0.0 -f 3. Hotadd to System RAM echo dax0.0 > /sys/bus/dax/drivers/device_dax/unbind echo dax0.0 > /sys/bus/dax/drivers/kmem/new_id echo online_movable > /sys/devices/system/memoryXXX/state 4. Before reboot hotremove device-dax memory from System RAM echo offline > /sys/devices/system/memoryXXX/state echo dax0.0 > /sys/bus/dax/drivers/kmem/unbind 5. Create raw pmem0 device ndctl create-namespace --mode raw -e namespace0.0 -f 6. Copy the state that was stored by apps to ramdisk to pmem device 7. Do kexec reboot or reboot through firmware if firmware does not zero memory in pmem0 region (These machines have only regular volatile memory). So to have pmem0 device either memmap kernel parameter is used, or devices nodes in dtb are specified. This patch (of 3): When add_memory() fails, the resource and the memory should be freed. Link: http://lkml.kernel.org/r/20190517215438.6487-2-pasha.tatashin@soleen.com Fixes: c221c0b0308f ("device-dax: "Hotplug" persistent memory for use like normal RAM") Signed-off-by: Pavel Tatashin Reviewed-by: Dave Hansen Cc: Bjorn Helgaas Cc: Borislav Petkov Cc: Dan Williams Cc: Dave Hansen Cc: Dave Jiang Cc: David Hildenbrand Cc: Fengguang Wu Cc: Huang Ying Cc: James Morris Cc: Jérôme Glisse Cc: Keith Busch Cc: Michal Hocko Cc: Ross Zwisler Cc: Sasha Levin Cc: Takashi Iwai Cc: Tom Lendacky Cc: Vishal Verma Cc: Yaowei Bai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/dax/kmem.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 97a0efea657e986322b09b99016b3f7d2ce37021 Author: Tom Levy Date: Tue Jul 16 16:30:24 2019 -0700 include/linux/lz4.h: fix spelling and copy-paste errors in documentation Fix a few spelling and grammar errors, and two places where fast/safe in the documentation did not match the function. Link: http://lkml.kernel.org/r/20190321014452.13297-1-tomlevy93@gmail.com Signed-off-by: Tom Levy Reviewed-by: Andrew Morton Cc: Jiri Kosina Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/lz4.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit a318f12ed8843cfac53198390c74a565c632f417 Author: Kees Cook Date: Tue Jul 16 16:30:21 2019 -0700 ipc/mqueue.c: only perform resource calculation if user valid Andreas Christoforou reported: UBSAN: Undefined behaviour in ipc/mqueue.c:414:49 signed integer overflow: 9 * 2305843009213693951 cannot be represented in type 'long int' ... Call Trace: mqueue_evict_inode+0x8e7/0xa10 ipc/mqueue.c:414 evict+0x472/0x8c0 fs/inode.c:558 iput_final fs/inode.c:1547 [inline] iput+0x51d/0x8c0 fs/inode.c:1573 mqueue_get_inode+0x8eb/0x1070 ipc/mqueue.c:320 mqueue_create_attr+0x198/0x440 ipc/mqueue.c:459 vfs_mkobj+0x39e/0x580 fs/namei.c:2892 prepare_open ipc/mqueue.c:731 [inline] do_mq_open+0x6da/0x8e0 ipc/mqueue.c:771 Which could be triggered by: struct mq_attr attr = { .mq_flags = 0, .mq_maxmsg = 9, .mq_msgsize = 0x1fffffffffffffff, .mq_curmsgs = 0, }; if (mq_open("/testing", 0x40, 3, &attr) == (mqd_t) -1) perror("mq_open"); mqueue_get_inode() was correctly rejecting the giant mq_msgsize, and preparing to return -EINVAL. During the cleanup, it calls mqueue_evict_inode() which performed resource usage tracking math for updating "user", before checking if there was a valid "user" at all (which would indicate that the calculations would be sane). Instead, delay this check to after seeing a valid "user". The overflow was real, but the results went unused, so while the flaw is harmless, it's noisy for kernel fuzzers, so just fix it by moving the calculation under the non-NULL "user" where it actually gets used. Link: http://lkml.kernel.org/r/201906072207.ECB65450@keescook Signed-off-by: Kees Cook Reported-by: Andreas Christoforou Acked-by: "Eric W. Biederman" Cc: Al Viro Cc: Arnd Bergmann Cc: Davidlohr Bueso Cc: Manfred Spraul Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds ipc/mqueue.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 6b15f678fb7d5ef54e089e6ace72f007fe6e9895 Author: Drew Davenport Date: Tue Jul 16 16:30:18 2019 -0700 include/asm-generic/bug.h: fix "cut here" for WARN_ON for __WARN_TAINT architectures For architectures using __WARN_TAINT, the WARN_ON macro did not print out the "cut here" string. The other WARN_XXX macros would print "cut here" inside __warn_printk, which is not called for WARN_ON since it doesn't have a message to print. Link: http://lkml.kernel.org/r/20190624154831.163888-1-ddavenport@chromium.org Fixes: a7bed27af194 ("bug: fix "cut here" location for __WARN_TAINT architectures") Signed-off-by: Drew Davenport Acked-by: Kees Cook Tested-by: Kees Cook Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/asm-generic/bug.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 778c1f5ccbd95722cf84d2233c6acbf4d01a3ec7 Author: Leonard Crestez Date: Tue Jul 16 16:30:15 2019 -0700 scripts/gdb: add helpers to find and list devices Add helper commands and functions for finding pointers to struct device by enumerating linux device bus/class infrastructure. This can be used to fetch subsystem and driver-specific structs: (gdb) p *$container_of($lx_device_find_by_class_name("net", "eth0"), "struct net_device", "dev") (gdb) p *$container_of($lx_device_find_by_bus_name("i2c", "0-004b"), "struct i2c_client", "dev") (gdb) p *(struct imx_port*)$lx_device_find_by_class_name("tty", "ttymxc1")->parent->driver_data Several generic "lx-device-list" functions are included to enumerate devices by bus and class: (gdb) lx-device-list-bus usb (gdb) lx-device-list-class (gdb) lx-device-list-tree &platform_bus Similar information is available in /sys but pointer values are deliberately hidden. Link: http://lkml.kernel.org/r/c948628041311cbf1b9b4cff3dda7d2073cb3eaa.1561492937.git.leonard.crestez@nxp.com Signed-off-by: Leonard Crestez Reviewed-by: Stephen Boyd Cc: Kieran Bingham Cc: Jan Kiszka Cc: "Rafael J. Wysocki" Cc: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/gdb/linux/device.py | 182 ++++++++++++++++++++++++++++++++++++++++++++ scripts/gdb/vmlinux-gdb.py | 1 + 2 files changed, 183 insertions(+) commit 8207d4a88e1ef4ab54f05f2f18edd444a5099099 Author: Leonard Crestez Date: Tue Jul 16 16:30:12 2019 -0700 scripts/gdb: add lx-genpd-summary command This is like /sys/kernel/debug/pm/pm_genpd_summary except it's accessible through a debugger. This can be useful if the target crashes or hangs because power domains were not properly enabled. Link: http://lkml.kernel.org/r/f9ee627a0d4f94b894aa202fee8a98444049bed8.1561492937.git.leonard.crestez@nxp.com Signed-off-by: Leonard Crestez Reviewed-by: Stephen Boyd Cc: Kieran Bingham Cc: Jan Kiszka Cc: "Rafael J. Wysocki" Cc: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/gdb/linux/genpd.py | 83 ++++++++++++++++++++++++++++++++++++++++++++++ scripts/gdb/vmlinux-gdb.py | 1 + 2 files changed, 84 insertions(+) commit 5515e9a6273b8c02034466bcbd717ac9f53dab99 Author: Miroslav Lichvar Date: Tue Jul 16 16:30:09 2019 -0700 drivers/pps/pps.c: clear offset flags in PPS_SETPARAMS ioctl The PPS assert/clear offset corrections are set by the PPS_SETPARAMS ioctl in the pps_ktime structs, which also contain flags. The flags are not initialized by applications (using the timepps.h header) and they are not used by the kernel for anything except returning them back in the PPS_GETPARAMS ioctl. Set the flags to zero to make it clear they are unused and avoid leaking uninitialized data of the PPS_SETPARAMS caller to other applications that have a read access to the PPS device. Link: http://lkml.kernel.org/r/20190702092251.24303-1-mlichvar@redhat.com Signed-off-by: Miroslav Lichvar Reviewed-by: Thomas Gleixner Acked-by: Rodolfo Giometti Cc: Greg KH Cc: Dan Carpenter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/pps/pps.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit f57e515a1b56325a28a0972c632a623a9c84590c Author: Joel Fernandes (Google) Date: Tue Jul 16 16:30:06 2019 -0700 kernel/pid.c: convert struct pid count to refcount_t struct pid's count is an atomic_t field used as a refcount. Use refcount_t for it which is basically atomic_t but does additional checking to prevent use-after-free bugs. For memory ordering, the only change is with the following: - if ((atomic_read(&pid->count) == 1) || - atomic_dec_and_test(&pid->count)) { + if (refcount_dec_and_test(&pid->count)) { kmem_cache_free(ns->pid_cachep, pid); Here the change is from: Fully ordered --> RELEASE + ACQUIRE (as per refcount-vs-atomic.rst) This ACQUIRE should take care of making sure the free happens after the refcount_dec_and_test(). The above hunk also removes atomic_read() since it is not needed for the code to work and it is unclear how beneficial it is. The removal lets refcount_dec_and_test() check for cases where get_pid() happened before the object was freed. Link: http://lkml.kernel.org/r/20190701183826.191936-1-joel@joelfernandes.org Signed-off-by: Joel Fernandes (Google) Reviewed-by: Andrea Parri Reviewed-by: Kees Cook Cc: Mathieu Desnoyers Cc: Matthew Wilcox Cc: Peter Zijlstra Cc: Will Deacon Cc: Paul E. McKenney Cc: Elena Reshetova Cc: Jann Horn Cc: Eric W. Biederman Cc: KJ Tsanaktsidis Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/pid.h | 5 +++-- kernel/pid.c | 9 ++++----- 2 files changed, 7 insertions(+), 7 deletions(-) commit 156e0b1a8112b76e351684ac948c59757037ac36 Author: Dan Carpenter Date: Tue Jul 16 16:30:03 2019 -0700 drivers/rapidio/devices/rio_mport_cdev.c: NUL terminate some strings The dev_info.name[] array has space for RIO_MAX_DEVNAME_SZ + 1 characters. But the problem here is that we don't ensure that the user put a NUL terminator on the end of the string. It could lead to an out of bounds read. Link: http://lkml.kernel.org/r/20190529110601.GB19119@mwanda Fixes: e8de370188d0 ("rapidio: add mport char device driver") Signed-off-by: Dan Carpenter Acked-by: Alexandre Bounine Cc: Ira Weiny Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/rapidio/devices/rio_mport_cdev.c | 2 ++ 1 file changed, 2 insertions(+) commit ac301020627e258a304f40cab5b35b6814a6f033 Author: Oleg Nesterov Date: Tue Jul 16 16:29:59 2019 -0700 select: shift restore_saved_sigmask_unless() into poll_select_copy_remaining() Now that restore_saved_sigmask_unless() is always called with the same argument right before poll_select_copy_remaining() we can move it into poll_select_copy_remaining() and make it the only caller of restore() in fs/select.c. The patch also renames poll_select_copy_remaining(), poll_select_finish() looks better after this change. kern_select() doesn't use set_user_sigmask(), so in this case poll_select_finish() does restore_saved_sigmask_unless() "for no reason". But this won't hurt, and WARN_ON(!TIF_SIGPENDING) is still valid. Link: http://lkml.kernel.org/r/20190606140915.GC13440@redhat.com Signed-off-by: Oleg Nesterov Cc: Al Viro Cc: Arnd Bergmann Cc: David Laight Cc: Davidlohr Bueso Cc: Deepa Dinamani Cc: Eric W. Biederman Cc: Eric Wong Cc: Jason Baron Cc: Jens Axboe Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/select.c | 46 +++++++++++++--------------------------------- 1 file changed, 13 insertions(+), 33 deletions(-) commit 8cf8b5539a414da3257db6d121bcee2d883135cb Author: Oleg Nesterov Date: Tue Jul 16 16:29:56 2019 -0700 select: change do_poll() to return -ERESTARTNOHAND rather than -EINTR do_poll() returns -EINTR if interrupted and after that all its callers have to translate it into -ERESTARTNOHAND. Change do_poll() to return -ERESTARTNOHAND and update (simplify) the callers. Note that this also unifies all users of restore_saved_sigmask_unless(), see the next patch. Linus: : The *right* return value will actually be then chosen by : poll_select_copy_remaining(), which will turn ERESTARTNOHAND to EINTR : when it can't update the timeout. : : Except for the cases that use restart_block and do that instead and : don't have the whole timeout restart issue as a result. Link: http://lkml.kernel.org/r/20190606140852.GB13440@redhat.com Signed-off-by: Oleg Nesterov Acked-by: Linus Torvalds Cc: Al Viro Cc: Arnd Bergmann Cc: David Laight Cc: Davidlohr Bueso Cc: Deepa Dinamani Cc: Eric W. Biederman Cc: Eric Wong Cc: Jason Baron Cc: Jens Axboe Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/select.c | 30 +++++++----------------------- 1 file changed, 7 insertions(+), 23 deletions(-) commit b772434be0891ed1081a08ae7cfd4666728f8e82 Author: Oleg Nesterov Date: Tue Jul 16 16:29:53 2019 -0700 signal: simplify set_user_sigmask/restore_user_sigmask task->saved_sigmask and ->restore_sigmask are only used in the ret-from- syscall paths. This means that set_user_sigmask() can save ->blocked in ->saved_sigmask and do set_restore_sigmask() to indicate that ->blocked was modified. This way the callers do not need 2 sigset_t's passed to set/restore and restore_user_sigmask() renamed to restore_saved_sigmask_unless() turns into the trivial helper which just calls restore_saved_sigmask(). Link: http://lkml.kernel.org/r/20190606113206.GA9464@redhat.com Signed-off-by: Oleg Nesterov Cc: Deepa Dinamani Cc: Arnd Bergmann Cc: Jens Axboe Cc: Davidlohr Bueso Cc: Eric Wong Cc: Jason Baron Cc: Thomas Gleixner Cc: Al Viro Cc: Eric W. Biederman Cc: David Laight Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/aio.c | 20 +++++-------- fs/eventpoll.c | 12 +++----- fs/io_uring.c | 11 ++----- fs/select.c | 34 ++++++++-------------- include/linux/compat.h | 3 +- include/linux/sched/signal.h | 12 ++++++-- include/linux/signal.h | 4 --- kernel/signal.c | 69 ++++++++++++-------------------------------- 8 files changed, 57 insertions(+), 108 deletions(-) commit e2d9018e81ba9357d3bb8bddc0ee58d460d092fe Author: Alexey Dobriyan Date: Tue Jul 16 16:29:50 2019 -0700 signal: reorder struct sighand_struct struct sighand_struct::siglock field is the most used field by far, put it first so that is can be accessed without IMM8 or IMM32 encoding on x86_64. Space savings (on trimmed down VM test config): add/remove: 0/0 grow/shrink: 8/68 up/down: 49/-1147 (-1098) Function old new delta complete_signal 512 533 +21 do_signalfd4 335 346 +11 __cleanup_sighand 39 43 +4 unhandled_signal 49 52 +3 prepare_signal 692 695 +3 ignore_signals 37 40 +3 __tty_check_change.part 248 251 +3 ksys_unshare 780 781 +1 sighand_ctor 33 29 -4 ptrace_trap_notify 60 56 -4 sigqueue_free 98 91 -7 run_posix_cpu_timers 1389 1382 -7 proc_pid_status 2448 2441 -7 proc_pid_limits 344 337 -7 posix_cpu_timer_rearm 222 215 -7 posix_cpu_timer_get 249 242 -7 kill_pid_info_as_cred 243 236 -7 freeze_task 197 190 -7 flush_old_exec 1873 1866 -7 do_task_stat 3363 3356 -7 do_send_sig_info 98 91 -7 do_group_exit 147 140 -7 init_sighand 2088 2080 -8 do_notify_parent_cldstop 399 391 -8 signalfd_cleanup 50 41 -9 do_notify_parent 557 545 -12 __send_signal 1029 1017 -12 ptrace_stop 590 577 -13 get_signal 1576 1563 -13 __lock_task_sighand 112 99 -13 zap_pid_ns_processes 391 377 -14 update_rlimit_cpu 78 64 -14 tty_signal_session_leader 413 399 -14 tty_open_proc_set_tty 149 135 -14 tty_jobctrl_ioctl 936 922 -14 set_cpu_itimer 339 325 -14 ptrace_resume 226 212 -14 ptrace_notify 110 96 -14 proc_clear_tty 81 67 -14 posix_cpu_timer_del 229 215 -14 kernel_sigaction 156 142 -14 getrusage 977 963 -14 get_current_tty 98 84 -14 force_sigsegv 89 75 -14 force_sig_info 205 191 -14 flush_signals 83 69 -14 flush_itimer_signals 85 71 -14 do_timer_create 1120 1106 -14 do_sigpending 88 74 -14 do_signal_stop 537 523 -14 cgroup_init_fs_context 644 630 -14 call_usermodehelper_exec_async 402 388 -14 calculate_sigpending 58 44 -14 __x64_sys_timer_delete 248 234 -14 __set_current_blocked 80 66 -14 __ptrace_unlink 310 296 -14 __ptrace_detach.part 187 173 -14 send_sigqueue 362 347 -15 get_cpu_itimer 214 199 -15 signalfd_poll 175 159 -16 dequeue_signal 340 323 -17 do_getitimer 192 174 -18 release_task.part 1060 1040 -20 ptrace_peek_siginfo 408 387 -21 posix_cpu_timer_set 827 806 -21 exit_signals 437 416 -21 do_sigaction 541 520 -21 do_setitimer 485 464 -21 disassociate_ctty.part 545 517 -28 __x64_sys_rt_sigtimedwait 721 679 -42 __x64_sys_ptrace 1319 1277 -42 ptrace_request 1828 1782 -46 signalfd_read 507 459 -48 wait_consider_task 2027 1971 -56 do_coredump 3672 3616 -56 copy_process.part 6936 6871 -65 Link: http://lkml.kernel.org/r/20190503192800.GA18004@avx2 Signed-off-by: Alexey Dobriyan Cc: Michal Hocko Cc: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/sched/signal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ac76de555d76b8cc7f8ef231692a3ad9cbd0ce63 Author: Dmitry V. Levin Date: Tue Jul 16 16:29:46 2019 -0700 selftests/ptrace: add a test case for PTRACE_GET_SYSCALL_INFO Check whether PTRACE_GET_SYSCALL_INFO semantics implemented in the kernel matches userspace expectations. [akpm@linux-foundation.org: coding-style fixes] Link: http://lkml.kernel.org/r/20190510152852.GG28558@altlinux.org Signed-off-by: Dmitry V. Levin Acked-by: Shuah Khan Cc: Oleg Nesterov Cc: Andy Lutomirski Cc: Elvira Khabirova Cc: Eugene Syromyatnikov Cc: Benjamin Herrenschmidt Cc: Greentime Hu Cc: Helge Deller [parisc] Cc: James E.J. Bottomley Cc: James Hogan Cc: kbuild test robot Cc: Kees Cook Cc: Michael Ellerman Cc: Paul Burton Cc: Paul Mackerras Cc: Ralf Baechle Cc: Richard Kuo Cc: Vincent Chen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/testing/selftests/ptrace/.gitignore | 1 + tools/testing/selftests/ptrace/Makefile | 2 +- tools/testing/selftests/ptrace/get_syscall_info.c | 271 ++++++++++++++++++++++ 3 files changed, 273 insertions(+), 1 deletion(-) commit 201766a20e30f982ccfe36bebfad9602c3ff574a Author: Elvira Khabirova Date: Tue Jul 16 16:29:42 2019 -0700 ptrace: add PTRACE_GET_SYSCALL_INFO request PTRACE_GET_SYSCALL_INFO is a generic ptrace API that lets ptracer obtain details of the syscall the tracee is blocked in. There are two reasons for a special syscall-related ptrace request. Firstly, with the current ptrace API there are cases when ptracer cannot retrieve necessary information about syscalls. Some examples include: * The notorious int-0x80-from-64-bit-task issue. See [1] for details. In short, if a 64-bit task performs a syscall through int 0x80, its tracer has no reliable means to find out that the syscall was, in fact, a compat syscall, and misidentifies it. * Syscall-enter-stop and syscall-exit-stop look the same for the tracer. Common practice is to keep track of the sequence of ptrace-stops in order not to mix the two syscall-stops up. But it is not as simple as it looks; for example, strace had a (just recently fixed) long-standing bug where attaching strace to a tracee that is performing the execve system call led to the tracer identifying the following syscall-exit-stop as syscall-enter-stop, which messed up all the state tracking. * Since the introduction of commit 84d77d3f06e7 ("ptrace: Don't allow accessing an undumpable mm"), both PTRACE_PEEKDATA and process_vm_readv become unavailable when the process dumpable flag is cleared. On such architectures as ia64 this results in all syscall arguments being unavailable for the tracer. Secondly, ptracers also have to support a lot of arch-specific code for obtaining information about the tracee. For some architectures, this requires a ptrace(PTRACE_PEEKUSER, ...) invocation for every syscall argument and return value. ptrace(2) man page: long ptrace(enum __ptrace_request request, pid_t pid, void *addr, void *data); ... PTRACE_GET_SYSCALL_INFO Retrieve information about the syscall that caused the stop. The information is placed into the buffer pointed by "data" argument, which should be a pointer to a buffer of type "struct ptrace_syscall_info". The "addr" argument contains the size of the buffer pointed to by "data" argument (i.e., sizeof(struct ptrace_syscall_info)). The return value contains the number of bytes available to be written by the kernel. If the size of data to be written by the kernel exceeds the size specified by "addr" argument, the output is truncated. [ldv@altlinux.org: selftests/seccomp/seccomp_bpf: update for PTRACE_GET_SYSCALL_INFO] Link: http://lkml.kernel.org/r/20190708182904.GA12332@altlinux.org Link: http://lkml.kernel.org/r/20190510152842.GF28558@altlinux.org Signed-off-by: Elvira Khabirova Co-developed-by: Dmitry V. Levin Signed-off-by: Dmitry V. Levin Reviewed-by: Oleg Nesterov Reviewed-by: Kees Cook Reviewed-by: Andy Lutomirski Cc: Eugene Syromyatnikov Cc: Benjamin Herrenschmidt Cc: Greentime Hu Cc: Helge Deller [parisc] Cc: James E.J. Bottomley Cc: James Hogan Cc: kbuild test robot Cc: Michael Ellerman Cc: Paul Burton Cc: Paul Mackerras Cc: Ralf Baechle Cc: Richard Kuo Cc: Shuah Khan Cc: Vincent Chen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/tracehook.h | 9 ++- include/uapi/linux/ptrace.h | 35 +++++++++ kernel/ptrace.c | 101 +++++++++++++++++++++++++- tools/testing/selftests/seccomp/seccomp_bpf.c | 13 +++- 4 files changed, 150 insertions(+), 8 deletions(-) commit f296f1df6e0e5b17654709c05b1821a1b58d329f Author: Dmitry V. Levin Date: Tue Jul 16 16:29:39 2019 -0700 powerpc: define syscall_get_error() syscall_get_error() is required to be implemented on this architecture in addition to already implemented syscall_get_nr(), syscall_get_arguments(), syscall_get_return_value(), and syscall_get_arch() functions in order to extend the generic ptrace API with PTRACE_GET_SYSCALL_INFO request. Link: http://lkml.kernel.org/r/20190510152824.GE28558@altlinux.org Signed-off-by: Dmitry V. Levin Acked-by: Michael Ellerman Cc: Elvira Khabirova Cc: Eugene Syromyatnikov Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Oleg Nesterov Cc: Andy Lutomirski Cc: Greentime Hu Cc: Helge Deller [parisc] Cc: James E.J. Bottomley Cc: James Hogan Cc: kbuild test robot Cc: Kees Cook Cc: Paul Burton Cc: Ralf Baechle Cc: Richard Kuo Cc: Shuah Khan Cc: Vincent Chen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/include/asm/syscall.h | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 2938c1f8faa0b3b95581eba9738cd24f7b791c80 Author: Dmitry V. Levin Date: Tue Jul 16 16:29:35 2019 -0700 parisc: define syscall_get_error() syscall_get_error() is required to be implemented on all architectures in addition to already implemented syscall_get_nr(), syscall_get_arguments(), syscall_get_return_value(), and syscall_get_arch() functions in order to extend the generic ptrace API with PTRACE_GET_SYSCALL_INFO request. Link: http://lkml.kernel.org/r/20190510152812.GD28558@altlinux.org Signed-off-by: Dmitry V. Levin Acked-by: Helge Deller [parisc] Cc: James E.J. Bottomley Cc: Elvira Khabirova Cc: Eugene Syromyatnikov Cc: Oleg Nesterov Cc: Andy Lutomirski Cc: Benjamin Herrenschmidt Cc: Greentime Hu Cc: James Hogan Cc: kbuild test robot Cc: Kees Cook Cc: Michael Ellerman Cc: Paul Burton Cc: Paul Mackerras Cc: Ralf Baechle Cc: Richard Kuo Cc: Shuah Khan Cc: Vincent Chen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/parisc/include/asm/syscall.h | 7 +++++++ 1 file changed, 7 insertions(+) commit ba849160a0fa634eaad34183632f84ac82506f14 Author: Dmitry V. Levin Date: Tue Jul 16 16:29:32 2019 -0700 mips: define syscall_get_error() syscall_get_error() is required to be implemented on all architectures in addition to already implemented syscall_get_nr(), syscall_get_arguments(), syscall_get_return_value(), and syscall_get_arch() functions in order to extend the generic ptrace API with PTRACE_GET_SYSCALL_INFO request. Link: http://lkml.kernel.org/r/20190510152803.GC28558@altlinux.org Signed-off-by: Dmitry V. Levin Acked-by: Paul Burton Cc: Elvira Khabirova Cc: Eugene Syromyatnikov Cc: Ralf Baechle Cc: James Hogan Cc: Oleg Nesterov Cc: Andy Lutomirski Cc: Benjamin Herrenschmidt Cc: Greentime Hu Cc: Helge Deller [parisc] Cc: James E.J. Bottomley Cc: kbuild test robot Cc: Kees Cook Cc: Michael Ellerman Cc: Paul Mackerras Cc: Richard Kuo Cc: Shuah Khan Cc: Vincent Chen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/mips/include/asm/syscall.h | 6 ++++++ 1 file changed, 6 insertions(+) commit 6c132dd6d4020ab37a842be93125d3f96432d01d Author: Dmitry V. Levin Date: Tue Jul 16 16:29:28 2019 -0700 hexagon: define syscall_get_error() and syscall_get_return_value() syscall_get_* functions are required to be implemented on all architectures in order to extend the generic ptrace API with PTRACE_GET_SYSCALL_INFO request. This adds remaining 2 syscall_get_* functions as documented in asm-generic/syscall.h: syscall_get_error and syscall_get_return_value. Link: http://lkml.kernel.org/r/20190510152756.GB28558@altlinux.org Signed-off-by: Dmitry V. Levin Cc: Richard Kuo Cc: Elvira Khabirova Cc: Eugene Syromyatnikov Cc: Oleg Nesterov Cc: Andy Lutomirski Cc: Benjamin Herrenschmidt Cc: Greentime Hu Cc: Helge Deller [parisc] Cc: James E.J. Bottomley Cc: James Hogan Cc: kbuild test robot Cc: Kees Cook Cc: Michael Ellerman Cc: Paul Burton Cc: Paul Mackerras Cc: Ralf Baechle Cc: Shuah Khan Cc: Vincent Chen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/hexagon/include/asm/syscall.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 33644b95eb342201511fc951d8fcd10362bd435b Author: Dmitry V. Levin Date: Tue Jul 16 16:29:24 2019 -0700 nds32: fix asm/syscall.h PTRACE_GET_SYSCALL_INFO is a generic ptrace API that lets ptracer obtain details of the syscall the tracee is blocked in. There are two reasons for a special syscall-related ptrace request. Firstly, with the current ptrace API there are cases when ptracer cannot retrieve necessary information about syscalls. Some examples include: * The notorious int-0x80-from-64-bit-task issue. See [1] for details. In short, if a 64-bit task performs a syscall through int 0x80, its tracer has no reliable means to find out that the syscall was, in fact, a compat syscall, and misidentifies it. * Syscall-enter-stop and syscall-exit-stop look the same for the tracer. Common practice is to keep track of the sequence of ptrace-stops in order not to mix the two syscall-stops up. But it is not as simple as it looks; for example, strace had a (just recently fixed) long-standing bug where attaching strace to a tracee that is performing the execve system call led to the tracer identifying the following syscall-exit-stop as syscall-enter-stop, which messed up all the state tracking. * Since the introduction of commit 84d77d3f06e7 ("ptrace: Don't allow accessing an undumpable mm"), both PTRACE_PEEKDATA and process_vm_readv become unavailable when the process dumpable flag is cleared. On such architectures as ia64 this results in all syscall arguments being unavailable for the tracer. Secondly, ptracers also have to support a lot of arch-specific code for obtaining information about the tracee. For some architectures, this requires a ptrace(PTRACE_PEEKUSER, ...) invocation for every syscall argument and return value. PTRACE_GET_SYSCALL_INFO returns the following structure: struct ptrace_syscall_info { __u8 op; /* PTRACE_SYSCALL_INFO_* */ __u32 arch __attribute__((__aligned__(sizeof(__u32)))); __u64 instruction_pointer; __u64 stack_pointer; union { struct { __u64 nr; __u64 args[6]; } entry; struct { __s64 rval; __u8 is_error; } exit; struct { __u64 nr; __u64 args[6]; __u32 ret_data; } seccomp; }; }; The structure was chosen according to [2], except for the following changes: * seccomp substructure was added as a superset of entry substructure * the type of nr field was changed from int to __u64 because syscall numbers are, as a practical matter, 64 bits * stack_pointer field was added along with instruction_pointer field since it is readily available and can save the tracer from extra PTRACE_GETREGS/PTRACE_GETREGSET calls * arch is always initialized to aid with tracing system calls such as execve() * instruction_pointer and stack_pointer are always initialized so they could be easily obtained for non-syscall stops * a boolean is_error field was added along with rval field, this way the tracer can more reliably distinguish a return value from an error value strace has been ported to PTRACE_GET_SYSCALL_INFO. Starting with release 4.26, strace uses PTRACE_GET_SYSCALL_INFO API as the preferred mechanism of obtaining syscall information. [1] https://lore.kernel.org/lkml/CA+55aFzcSVmdDj9Lh_gdbz1OzHyEm6ZrGPBDAJnywm2LF_eVyg@mail.gmail.com/ [2] https://lore.kernel.org/lkml/CAObL_7GM0n80N7J_DFw_eQyfLyzq+sf4y2AvsCCV88Tb3AwEHA@mail.gmail.com/ This patch (of 7): All syscall_get_*() and syscall_set_*() functions must be defined as static inline as on all other architectures, otherwise asm/syscall.h cannot be included in more than one compilation unit. This bug has to be fixed in order to extend the generic ptrace API with PTRACE_GET_SYSCALL_INFO request. Link: http://lkml.kernel.org/r/20190510152749.GA28558@altlinux.org Fixes: 1932fbe36e02 ("nds32: System calls handling") Signed-off-by: Dmitry V. Levin Reported-by: kbuild test robot Acked-by: Greentime Hu Cc: Vincent Chen Cc: Elvira Khabirova Cc: Eugene Syromyatnikov Cc: Oleg Nesterov Cc: Andy Lutomirski Cc: Benjamin Herrenschmidt Cc: Helge Deller [parisc] Cc: James E.J. Bottomley Cc: James Hogan Cc: Kees Cook Cc: Michael Ellerman Cc: Paul Burton Cc: Paul Mackerras Cc: Ralf Baechle Cc: Richard Kuo Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/nds32/include/asm/syscall.h | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) commit dc0dde61f17d4e83776e7c5d8b81787436447346 Author: Hariprasad Kelam Date: Tue Jul 16 16:29:21 2019 -0700 fs/reiserfs/journal.c: change return type of dirty_one_transaction Change return type of dirty_one_transaction from int to void. As this function always return success. Fixes below issue reported by coccicheck: fs/reiserfs/journal.c:1690:5-8: Unneeded variable: "ret". Return "0" on line 1719 Link: http://lkml.kernel.org/r/20190702175430.GA5882@hari-Inspiron-1545 Signed-off-by: Hariprasad Kelam Reviewed-by: Jan Kara Cc: Arnd Bergmann Cc: Bharath Vedartham Cc: Hariprasad Kelam Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/reiserfs/journal.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit ba542f20f97e7cee83c50b52ff7418c3ec599796 Author: YueHaibing Date: Tue Jul 16 16:29:18 2019 -0700 fs/ufs/super.c: remove set but not used variable 'usb3' Fixes gcc '-Wunused-but-set-variable' warning: fs/ufs/super.c: In function ufs_statfs: fs/ufs/super.c:1409:32: warning: variable usb3 set but not used [-Wunused-but-set-variable] It is not used since commmit c596961d1b4c ("ufs: fix s_size/s_dsize users") Link: http://lkml.kernel.org/r/20190525140654.15924-1-yuehaibing@huawei.com Signed-off-by: YueHaibing Cc: Evgeniy Dushistov Cc: Al Viro Cc: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ufs/super.c | 2 -- 1 file changed, 2 deletions(-) commit 29774f3f4e5af8f01dc5410e807b32ac6b765106 Author: Mathieu Malaterre Date: Tue Jul 16 16:29:15 2019 -0700 fs/hfsplus/xattr.c: replace strncpy with memcpy strncpy() was used to copy a fixed size buffer. Since NUL-terminating string is not required here, prefer a memcpy function. The generated code (ppc32) remains the same. Silence the following warning triggered using W=1: fs/hfsplus/xattr.c:410:3: warning: 'strncpy' output truncated before terminating nul copying 4 bytes from a string of the same length [-Wstringop-truncation] Link: http://lkml.kernel.org/r/20190529113341.11972-1-malat@debian.org Signed-off-by: Mathieu Malaterre Reviewed-by: Vyacheslav Dubeyko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/hfsplus/xattr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a9fba24c6ac9b66c09dfc2a0e845ecace187e89c Author: Pedro Cuadra Date: Tue Jul 16 16:29:13 2019 -0700 coda: add hinting support for partial file caching This adds support for partial file caching in Coda. Every read, write and mmap informs the userspace cache manager about what part of a file is about to be accessed so that the cache manager can ensure the relevant parts are available before the operation is allowed to proceed. When a read or write operation completes, this is also reported to allow the cache manager to track when partially cached content can be released. If the cache manager does not support partial file caching, or when the entire file has been fetched into the local cache, the cache manager may return an EOPNOTSUPP error to indicate that intent upcalls are no longer necessary until the file is closed. [akpm@linux-foundation.org: little whitespace fixup] Link: http://lkml.kernel.org/r/20190618181301.6960-1-jaharkes@cs.cmu.edu Signed-off-by: Pedro Cuadra Signed-off-by: Jan Harkes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/coda/coda_fs_i.h | 1 + fs/coda/coda_psdev.h | 3 ++ fs/coda/file.c | 61 +++++++++++++++++++++++++++++++++-------- fs/coda/psdev.c | 2 +- fs/coda/upcall.c | 70 +++++++++++++++++++++++++++++++++++++++-------- include/uapi/linux/coda.h | 29 ++++++++++++++++++-- 6 files changed, 139 insertions(+), 27 deletions(-) commit 5bb44810f47a00b608ed2cb9f892ae7ce37b02bd Author: Fabian Frederick Date: Tue Jul 16 16:29:09 2019 -0700 coda: ftoc validity check integration This patch moves cfi check in coda_ftoc() instead of repeating it in the wild. Module size text data bss dec hex filename 28297 1040 700 30037 7555 fs/coda/coda.ko.before 28263 980 700 29943 74f7 fs/coda/coda.ko.after Link: http://lkml.kernel.org/r/a2c27663ec4547018c92d71c63b1dff4650b6546.1558117389.git.jaharkes@cs.cmu.edu Signed-off-by: Fabian Frederick Signed-off-by: Jan Harkes Cc: Arnd Bergmann Cc: Colin Ian King Cc: Dan Carpenter Cc: David Howells Cc: Mikko Rapeli Cc: Sam Protsenko Cc: Yann Droneaud Cc: Zhouyang Jia Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/coda/cnode.c | 10 ++++++++++ fs/coda/coda_fs_i.h | 3 +-- fs/coda/dir.c | 6 ++---- fs/coda/file.c | 17 +++++------------ 4 files changed, 18 insertions(+), 18 deletions(-) commit 7f6118ce95d2673f8c936dd47d9bbeb60f4d16ad Author: Fabian Frederick Date: Tue Jul 16 16:29:06 2019 -0700 coda: remove sb test in coda_fid_to_inode() coda_fid_to_inode() is only called by coda_downcall() where sb is already being tested. Link: http://lkml.kernel.org/r/d2163b3136348faf83ba47dc2d65a5d0a9a135dd.1558117389.git.jaharkes@cs.cmu.edu Signed-off-by: Fabian Frederick Signed-off-by: Jan Harkes Cc: Arnd Bergmann Cc: Colin Ian King Cc: Dan Carpenter Cc: David Howells Cc: Mikko Rapeli Cc: Sam Protsenko Cc: Yann Droneaud Cc: Zhouyang Jia Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/coda/cnode.c | 5 ----- 1 file changed, 5 deletions(-) commit 6975259ae30e05068e87ab35dfc4caefb47cffe2 Author: Fabian Frederick Date: Tue Jul 16 16:29:03 2019 -0700 coda: remove sysctl object from module when unused Inspired by NFS sysctl process Link: http://lkml.kernel.org/r/9afcc2cd09490849b309786bbf47fef75de7f91c.1558117389.git.jaharkes@cs.cmu.edu Signed-off-by: Fabian Frederick Signed-off-by: Jan Harkes Cc: Arnd Bergmann Cc: Colin Ian King Cc: Dan Carpenter Cc: David Howells Cc: Mikko Rapeli Cc: Sam Protsenko Cc: Yann Droneaud Cc: Zhouyang Jia Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/coda/Makefile | 3 ++- fs/coda/coda_int.h | 10 ++++++++++ fs/coda/coda_linux.h | 4 ---- fs/coda/sysctl.c | 11 ----------- 4 files changed, 12 insertions(+), 16 deletions(-) commit f94845284abedf80b8d9ab37eafe0d8f737543e8 Author: Fabian Frederick Date: Tue Jul 16 16:29:00 2019 -0700 coda: add __init to init_coda_psdev() init_coda_psdev() was only called by __init function. Link: http://lkml.kernel.org/r/a12a5a135fa6b0ea997e1a0af4be0a235c463a24.1558117389.git.jaharkes@cs.cmu.edu Signed-off-by: Fabian Frederick Signed-off-by: Jan Harkes Cc: Arnd Bergmann Cc: Colin Ian King Cc: Dan Carpenter Cc: David Howells Cc: Mikko Rapeli Cc: Sam Protsenko Cc: Yann Droneaud Cc: Zhouyang Jia Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/coda/psdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 50e9a6efb0fa6ee54b2b8a311a75fc6ae2d6a0ec Author: Fabian Frederick Date: Tue Jul 16 16:28:57 2019 -0700 coda: use SIZE() for stat max_t expression was already defined in coda sources Link: http://lkml.kernel.org/r/e6cda497ce8691db155cb35f8d13ea44ca6cedeb.1558117389.git.jaharkes@cs.cmu.edu Signed-off-by: Fabian Frederick Signed-off-by: Jan Harkes Cc: Arnd Bergmann Cc: Colin Ian King Cc: Dan Carpenter Cc: David Howells Cc: Mikko Rapeli Cc: Sam Protsenko Cc: Yann Droneaud Cc: Zhouyang Jia Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/coda/upcall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 79a0d65e77ed5e9081492848a1b936d19cdfbb0f Author: Fabian Frederick Date: Tue Jul 16 16:28:54 2019 -0700 coda: destroy mutex in put_super() We can safely destroy vc_mutex at the end of umount process. Link: http://lkml.kernel.org/r/f436f68908c467c5663bc6a9251b52cd7b95d2a5.1558117389.git.jaharkes@cs.cmu.edu Signed-off-by: Fabian Frederick Signed-off-by: Jan Harkes Cc: Arnd Bergmann Cc: Colin Ian King Cc: Dan Carpenter Cc: David Howells Cc: Mikko Rapeli Cc: Sam Protsenko Cc: Yann Droneaud Cc: Zhouyang Jia Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/coda/inode.c | 1 + 1 file changed, 1 insertion(+) commit 6dc280ebeed2c96a2fb933103dafe655a922b9c1 Author: Jan Harkes Date: Tue Jul 16 16:28:51 2019 -0700 coda: remove uapi/linux/coda_psdev.h Nothing is left in this header that is used by userspace. Link: http://lkml.kernel.org/r/bb11378cef94739f2cf89425dd6d302a52c64480.1558117389.git.jaharkes@cs.cmu.edu Signed-off-by: Jan Harkes Cc: Arnd Bergmann Cc: Colin Ian King Cc: Dan Carpenter Cc: David Howells Cc: Fabian Frederick Cc: Mikko Rapeli Cc: Sam Protsenko Cc: Yann Droneaud Cc: Zhouyang Jia Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/coda/coda_psdev.h | 5 ++++- include/uapi/linux/coda_psdev.h | 10 ---------- 2 files changed, 4 insertions(+), 11 deletions(-) commit 8fc8b9df831387e0d02c1d0f5bb53d327e0d477a Author: David Howells Date: Tue Jul 16 16:28:47 2019 -0700 coda: move internal defs out of include/linux/ [ver #2] Move include/linux/coda_psdev.h to fs/coda/ as there's nothing else that uses it. Link: http://lkml.kernel.org/r/3ceeee0415a929b89fb02700b6b4b3a07938acb8.1558117389.git.jaharkes@cs.cmu.edu Link: https://patchwork.kernel.org/patch/10590257/ Signed-off-by: David Howells Signed-off-by: Jan Harkes Cc: Yann Droneaud Cc: Jan Harkes Cc: Arnd Bergmann Cc: Colin Ian King Cc: Dan Carpenter Cc: Fabian Frederick Cc: Mikko Rapeli Cc: Sam Protsenko Cc: Zhouyang Jia Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/coda/cache.c | 2 +- fs/coda/cnode.c | 2 +- fs/coda/coda_linux.c | 2 +- {include/linux => fs/coda}/coda_psdev.h | 50 ++++++++++++++++----------------- fs/coda/dir.c | 2 +- fs/coda/file.c | 3 +- fs/coda/inode.c | 2 +- fs/coda/pioctl.c | 3 +- fs/coda/psdev.c | 3 +- fs/coda/symlink.c | 3 +- fs/coda/upcall.c | 2 +- 11 files changed, 35 insertions(+), 39 deletions(-) commit b6a18c60080fcff0921e81991fec049394fb04e9 Author: Jan Harkes Date: Tue Jul 16 16:28:44 2019 -0700 coda: bump module version The out of tree module version had been bumped several times already, but we haven't kept this in-tree one in sync, partly because most changes go from here to the out-of-tree copy. Link: http://lkml.kernel.org/r/8b0ab50a2da2f0180ac32c79d91811b4d1d0bd8b.1558117389.git.jaharkes@cs.cmu.edu Signed-off-by: Jan Harkes Cc: Arnd Bergmann Cc: Colin Ian King Cc: Dan Carpenter Cc: David Howells Cc: Fabian Frederick Cc: Mikko Rapeli Cc: Sam Protsenko Cc: Yann Droneaud Cc: Zhouyang Jia Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/coda/psdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 936dae4525322fb46f6f7bb407c5663c83e5d353 Author: Dan Carpenter Date: Tue Jul 16 16:28:41 2019 -0700 coda: get rid of CODA_FREE() The CODA_FREE() macro just calls kvfree(). We can call that directly instead. Link: http://lkml.kernel.org/r/4950a94fd30ec5f84835dd4ca0bb67c0448672f5.1558117389.git.jaharkes@cs.cmu.edu Signed-off-by: Dan Carpenter Signed-off-by: Jan Harkes Cc: Arnd Bergmann Cc: Colin Ian King Cc: David Howells Cc: Fabian Frederick Cc: Mikko Rapeli Cc: Sam Protsenko Cc: Yann Droneaud Cc: Zhouyang Jia Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/coda/coda_linux.h | 2 -- fs/coda/psdev.c | 8 ++++---- fs/coda/upcall.c | 36 ++++++++++++++++++------------------ 3 files changed, 22 insertions(+), 24 deletions(-) commit 4dc48193d748f0f0fbe37105a905466ff3a6ad50 Author: Dan Carpenter Date: Tue Jul 16 16:28:38 2019 -0700 coda: get rid of CODA_ALLOC() These days we have kvzalloc() so we can delete CODA_ALLOC(). I made a couple related changes in coda_psdev_write(). First, I added some error handling to avoid a NULL dereference if the allocation failed. Second, I used kvmalloc() instead of kvzalloc() because we copy over the memory on the next line so there is no need to zero it first. Link: http://lkml.kernel.org/r/e56010c822e7a7cbaa8a238cf82ad31c67eaa800.1558117389.git.jaharkes@cs.cmu.edu Signed-off-by: Dan Carpenter Signed-off-by: Jan Harkes Cc: Arnd Bergmann Cc: Colin Ian King Cc: David Howells Cc: Fabian Frederick Cc: Mikko Rapeli Cc: Sam Protsenko Cc: Yann Droneaud Cc: Zhouyang Jia Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/coda/coda_linux.h | 10 ---------- fs/coda/psdev.c | 6 +++++- fs/coda/upcall.c | 4 ++-- 3 files changed, 7 insertions(+), 13 deletions(-) commit 5e7c31dfe74703f428220384b2863525957cc160 Author: Jan Harkes Date: Tue Jul 16 16:28:35 2019 -0700 coda: change Coda's user api to use 64-bit time_t in timespec Move the 32-bit time_t problems to userspace. Link: http://lkml.kernel.org/r/8d089068823bfb292a4020f773922fbd82ffad39.1558117389.git.jaharkes@cs.cmu.edu Signed-off-by: Jan Harkes Cc: Arnd Bergmann Cc: Colin Ian King Cc: Dan Carpenter Cc: David Howells Cc: Fabian Frederick Cc: Mikko Rapeli Cc: Sam Protsenko Cc: Yann Droneaud Cc: Zhouyang Jia Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/filesystems/coda.txt | 10 +++++----- fs/coda/coda_linux.c | 21 +++++++-------------- include/uapi/linux/coda.h | 33 +++++++-------------------------- 3 files changed, 19 insertions(+), 45 deletions(-) commit 6ced9aa7b56baeb241a715df4539e60d5e3118e2 Author: Arnd Bergmann Date: Tue Jul 16 16:28:32 2019 -0700 coda: stop using 'struct timespec' in user API We exchange file timestamps with user space using psdev device read/write operations with a fixed but architecture specific binary layout. On 32-bit systems, this uses a 'timespec' structure that is defined by the C library to contain two 32-bit values for seconds and nanoseconds. As we get ready for the year 2038 overflow of the 32-bit signed seconds, the kernel now uses 64-bit timestamps internally, and user space will do the same change by changing the 'timespec' definition in the future. Unfortunately, this breaks the layout of the coda_vattr structure, so we need to redefine that in terms of something that does not change. I'm introducing a new 'struct vtimespec' structure here that keeps the existing layout, and the same change has to be done in the coda user space copy of linux/coda.h before anyone can use that on a 32-bit architecture with 64-bit time_t. An open question is what should happen to actual times past y2038, as they are now truncated to the last valid date when sent to user space, and interpreted as pre-1970 times when a timestamp with the MSB set is read back into the kernel. Alternatively, we could change the new timespec64_to_coda()/coda_to_timespec64() functions to use a different interpretation and extend the available range further to the future by disallowing past timestamps. This would require more changes in the user space side though. Link: http://lkml.kernel.org/r/562b7324149461743e4fbe2fedbf7c242f7e274a.1558117389.git.jaharkes@cs.cmu.edu Link: https://patchwork.kernel.org/patch/10474735/ Signed-off-by: Arnd Bergmann Signed-off-by: Jan Harkes Acked-by: Jan Harkes Cc: Colin Ian King Cc: Dan Carpenter Cc: David Howells Cc: Fabian Frederick Cc: Mikko Rapeli Cc: Sam Protsenko Cc: Yann Droneaud Cc: Zhouyang Jia Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/filesystems/coda.txt | 11 ++++++--- fs/coda/coda_linux.c | 50 +++++++++++++++++++++++++++++--------- include/uapi/linux/coda.h | 20 ++++++++++++--- 3 files changed, 62 insertions(+), 19 deletions(-) commit 850622136ff2a1296b2c8aa5280a74a6a3aabe4e Author: Colin Ian King Date: Tue Jul 16 16:28:29 2019 -0700 coda: clean up indentation, replace spaces with tab Trivial fix to clean up indentation, replace spaces with tab Link: http://lkml.kernel.org/r/ffc2bfa5a37ffcdf891c51b2e2ed618103965b24.1558117389.git.jaharkes@cs.cmu.edu Signed-off-by: Colin Ian King Signed-off-by: Jan Harkes Cc: Arnd Bergmann Cc: Dan Carpenter Cc: David Howells Cc: Fabian Frederick Cc: Mikko Rapeli Cc: Sam Protsenko Cc: Yann Droneaud Cc: Zhouyang Jia Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/coda/psdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2fe7491d219428a32f09948e88bfaf8e71b9a66b Author: Jan Harkes Date: Tue Jul 16 16:28:26 2019 -0700 uapi linux/coda_psdev.h: move CODA_REQ_ from uapi to kernel side headers These constants only used internally and not exposed to userspace. Link: http://lkml.kernel.org/r/baeafc30dad70d8b422ee679420099c2d8aa7da0.1558117389.git.jaharkes@cs.cmu.edu Signed-off-by: Jan Harkes Cc: Arnd Bergmann Cc: Colin Ian King Cc: Dan Carpenter Cc: David Howells Cc: Fabian Frederick Cc: Mikko Rapeli Cc: Sam Protsenko Cc: Yann Droneaud Cc: Zhouyang Jia Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/coda_psdev.h | 5 +++++ include/uapi/linux/coda_psdev.h | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) commit 9a05671dd8d85cbce6cf1a00727d5919c1e56192 Author: Jan Harkes Date: Tue Jul 16 16:28:23 2019 -0700 coda: don't try to print names that were considered too long Probably safer to just show the unexpected length and debug it from the userspace side. Link: http://lkml.kernel.org/r/582ae759a4fdfa31a64c35de489fa4efabac09d6.1558117389.git.jaharkes@cs.cmu.edu Signed-off-by: Jan Harkes Cc: Arnd Bergmann Cc: Colin Ian King Cc: Dan Carpenter Cc: David Howells Cc: Fabian Frederick Cc: Mikko Rapeli Cc: Sam Protsenko Cc: Yann Droneaud Cc: Zhouyang Jia Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/coda/dir.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b2a57e334086602be56b74958d9f29b955cd157f Author: Sam Protsenko Date: Tue Jul 16 16:28:20 2019 -0700 coda: fix build using bare-metal toolchain The kernel is self-contained project and can be built with bare-metal toolchain. But bare-metal toolchain doesn't define __linux__. Because of this u_quad_t type is not defined when using bare-metal toolchain and codafs build fails. This patch fixes it by defining u_quad_t type unconditionally. Link: http://lkml.kernel.org/r/3cbb40b0a57b6f9923a9d67b53473c0b691a3eaa.1558117389.git.jaharkes@cs.cmu.edu Signed-off-by: Sam Protsenko Signed-off-by: Jan Harkes Cc: Arnd Bergmann Cc: Colin Ian King Cc: Dan Carpenter Cc: David Howells Cc: Fabian Frederick Cc: Mikko Rapeli Cc: Yann Droneaud Cc: Zhouyang Jia Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/coda.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 6e51f8aa76b67d0a6eb168fd41a81e8478ae07a9 Author: Jan Harkes Date: Tue Jul 16 16:28:16 2019 -0700 coda: potential buffer overflow in coda_psdev_write() Add checks to make sure the downcall message we got from the Coda cache manager is large enough to contain the data it is supposed to have. i.e. when we get a CODA_ZAPDIR we can access &out->coda_zapdir.CodaFid. Link: http://lkml.kernel.org/r/894fb6b250add09e4e3935f14649f21284a5cb18.1558117389.git.jaharkes@cs.cmu.edu Signed-off-by: Jan Harkes Reported-by: Dan Carpenter Cc: Arnd Bergmann Cc: Colin Ian King Cc: David Howells Cc: Fabian Frederick Cc: Mikko Rapeli Cc: Sam Protsenko Cc: Yann Droneaud Cc: Zhouyang Jia Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/coda/psdev.c | 8 ++++++-- fs/coda/upcall.c | 34 +++++++++++++++++++++++++++++++++- include/linux/coda_psdev.h | 3 ++- 3 files changed, 41 insertions(+), 4 deletions(-) commit 02551c23bcd85f0c68a8259c7b953d49d44f86af Author: Zhouyang Jia Date: Tue Jul 16 16:28:13 2019 -0700 coda: add error handling for fget When fget fails, the lack of error-handling code may cause unexpected results. This patch adds error-handling code after calling fget. Link: http://lkml.kernel.org/r/2514ec03df9c33b86e56748513267a80dd8004d9.1558117389.git.jaharkes@cs.cmu.edu Signed-off-by: Zhouyang Jia Signed-off-by: Jan Harkes Cc: Arnd Bergmann Cc: Colin Ian King Cc: Dan Carpenter Cc: David Howells Cc: Fabian Frederick Cc: Mikko Rapeli Cc: Sam Protsenko Cc: Yann Droneaud Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/coda/psdev.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit f90fb3c7e2c13ae829db2274b88b845a75038b8a Author: Mikko Rapeli Date: Tue Jul 16 16:28:10 2019 -0700 uapi linux/coda_psdev.h: move upc_req definition from uapi to kernel side headers Only users of upc_req in kernel side fs/coda/psdev.c and fs/coda/upcall.c already include linux/coda_psdev.h. Suggested by Jan Harkes in https://lore.kernel.org/lkml/20150531111913.GA23377@cs.cmu.edu/ Fixes these include/uapi/linux/coda_psdev.h compilation errors in userspace: linux/coda_psdev.h:12:19: error: field `uc_chain' has incomplete type struct list_head uc_chain; ^ linux/coda_psdev.h:13:2: error: unknown type name `caddr_t' caddr_t uc_data; ^ linux/coda_psdev.h:14:2: error: unknown type name `u_short' u_short uc_flags; ^ linux/coda_psdev.h:15:2: error: unknown type name `u_short' u_short uc_inSize; /* Size is at most 5000 bytes */ ^ linux/coda_psdev.h:16:2: error: unknown type name `u_short' u_short uc_outSize; ^ linux/coda_psdev.h:17:2: error: unknown type name `u_short' u_short uc_opcode; /* copied from data to save lookup */ ^ linux/coda_psdev.h:19:2: error: unknown type name `wait_queue_head_t' wait_queue_head_t uc_sleep; /* process' wait queue */ ^ Link: http://lkml.kernel.org/r/9f99f5ce6a0563d5266e6cf7aa9585aac2cae971.1558117389.git.jaharkes@cs.cmu.edu Signed-off-by: Mikko Rapeli Signed-off-by: Jan Harkes Cc: Arnd Bergmann Cc: Colin Ian King Cc: Dan Carpenter Cc: David Howells Cc: Fabian Frederick Cc: Sam Protsenko Cc: Yann Droneaud Cc: Zhouyang Jia Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/coda_psdev.h | 11 +++++++++++ include/uapi/linux/coda_psdev.h | 13 ------------- 2 files changed, 11 insertions(+), 13 deletions(-) commit 694a58e29ef27c4c26f103a9decfd053f94dd34c Author: Mikko Rapeli Date: Tue Jul 16 16:28:07 2019 -0700 uapi linux/coda.h: use __kernel_pid_t for userspace Part of a patch by Mikko Rapeli, as Arnd Bergman commented on the original patch. pid_t might differ between libc and the kernel, so the kernel interface has to use types that the kernel defines. Link: http://lkml.kernel.org/r/f374a71f4d351bc8c8b3ac18ad7765c88d806d10.1558117389.git.jaharkes@cs.cmu.edu Signed-off-by: Mikko Rapeli Signed-off-by: Jan Harkes Cc: Arnd Bergmann Cc: Colin Ian King Cc: Dan Carpenter Cc: David Howells Cc: Fabian Frederick Cc: Sam Protsenko Cc: Yann Droneaud Cc: Zhouyang Jia Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/uapi/linux/coda.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7fa0a1da3dadfd9216df7745a1331fdaa0940d1c Author: Jan Harkes Date: Tue Jul 16 16:28:04 2019 -0700 coda: pass the host file in vma->vm_file on mmap Patch series "Coda updates". The following patch series is a collection of various fixes for Coda, most of which were collected from linux-fsdevel or linux-kernel but which have as yet not found their way upstream. This patch (of 22): Various file systems expect that vma->vm_file points at their own file handle, several use file_inode(vma->vm_file) to get at their inode or use vma->vm_file->private_data. However the way Coda wrapped mmap on a host file broke this assumption, vm_file was still pointing at the Coda file and the host file systems would scribble over Coda's inode and private file data. This patch fixes the incorrect expectation and wraps vm_ops->open and vm_ops->close to allow Coda to track when the vm_area_struct is destroyed so we still release the reference on the Coda file handle at the right time. Link: http://lkml.kernel.org/r/0e850c6e59c0b147dc2dcd51a3af004c948c3697.1558117389.git.jaharkes@cs.cmu.edu Signed-off-by: Jan Harkes Cc: Arnd Bergmann Cc: Colin Ian King Cc: Dan Carpenter Cc: David Howells Cc: Fabian Frederick Cc: Mikko Rapeli Cc: Sam Protsenko Cc: Yann Droneaud Cc: Zhouyang Jia Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/coda/file.c | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 68 insertions(+), 2 deletions(-) commit b98cca444d287a63dd96df04af7fb9793567599e Author: Anshuman Khandual Date: Tue Jul 16 16:28:00 2019 -0700 mm, kprobes: generalize and rename notify_page_fault() as kprobe_page_fault() Architectures which support kprobes have very similar boilerplate around calling kprobe_fault_handler(). Use a helper function in kprobes.h to unify them, based on the x86 code. This changes the behaviour for other architectures when preemption is enabled. Previously, they would have disabled preemption while calling the kprobe handler. However, preemption would be disabled if this fault was due to a kprobe, so we know the fault was not due to a kprobe handler and can simply return failure. This behaviour was introduced in commit a980c0ef9f6d ("x86/kprobes: Refactor kprobes_fault() like kprobe_exceptions_notify()") [anshuman.khandual@arm.com: export kprobe_fault_handler()] Link: http://lkml.kernel.org/r/1561133358-8876-1-git-send-email-anshuman.khandual@arm.com Link: http://lkml.kernel.org/r/1560420444-25737-1-git-send-email-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Reviewed-by: Dave Hansen Cc: Michal Hocko Cc: Matthew Wilcox Cc: Mark Rutland Cc: Christophe Leroy Cc: Stephen Rothwell Cc: Andrey Konovalov Cc: Michael Ellerman Cc: Paul Mackerras Cc: Russell King Cc: Catalin Marinas Cc: Will Deacon Cc: Tony Luck Cc: Fenghua Yu Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Yoshinori Sato Cc: "David S. Miller" Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Andy Lutomirski Cc: Vineet Gupta Cc: James Hogan Cc: Paul Burton Cc: Ralf Baechle Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm/mm/fault.c | 24 +----------------------- arch/arm64/mm/fault.c | 24 +----------------------- arch/ia64/mm/fault.c | 24 +----------------------- arch/mips/include/asm/kprobes.h | 1 + arch/mips/kernel/kprobes.c | 2 +- arch/powerpc/mm/fault.c | 23 ++--------------------- arch/s390/mm/fault.c | 16 +--------------- arch/sh/mm/fault.c | 18 ++---------------- arch/sparc/mm/fault_64.c | 16 +--------------- arch/x86/mm/fault.c | 21 ++------------------- include/linux/kprobes.h | 19 +++++++++++++++++++ 11 files changed, 32 insertions(+), 156 deletions(-) commit 92bae787c483b015d8985c43784e5afb5ec67895 Author: Kees Cook Date: Tue Jul 16 16:27:57 2019 -0700 init/Kconfig: fix neighboring typos This fixes a couple typos I noticed in the slab Kconfig: sacrifies -> sacrifices accellerate -> accelerate Seeing as no other instances of these typos are found elsewhere in the kernel and that I originally added one of the two, I can only assume working on slab must have caused damage to the spelling centers of my brain. Link: http://lkml.kernel.org/r/201905292203.CD000546EB@keescook Signed-off-by: Kees Cook Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds init/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit aa94b1dc5bca1c23d1a1f4110b4e77bfe88c0061 Author: Alexey Dobriyan Date: Tue Jul 16 16:27:54 2019 -0700 fs/binfmt_elf.c: delete stale comment "passed_fileno" variable was deleted 11 years ago in 2.6.25. Link: http://lkml.kernel.org/r/20190529201747.GA23248@avx2 Fixes: d20894a23708 ("Remove a.out interpreter support in ELF loader") Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/binfmt_elf.c | 1 - 1 file changed, 1 deletion(-) commit 1b113e04e20298b08c82c709a4501c0d6e1e4374 Author: YueHaibing Date: Tue Jul 16 16:27:51 2019 -0700 fs/binfmt_flat.c: remove set but not used variable 'inode' Fixes gcc '-Wunused-but-set-variable' warning: fs/binfmt_flat.c: In function load_flat_file: fs/binfmt_flat.c:419:16: warning: variable inode set but not used [-Wunused-but-set-variable] It's never used and can be removed. Link: http://lkml.kernel.org/r/20190525125341.9844-1-yuehaibing@huawei.com Signed-off-by: YueHaibing Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/binfmt_flat.c | 2 -- 1 file changed, 2 deletions(-) commit 6a8d76cbd647d414248d314300106d1ce04daa4b Author: Matteo Croce Date: Tue Jul 16 16:27:48 2019 -0700 checkpatch.pl: warn on duplicate sysctl local variable Commit d91bff3011cf ("proc/sysctl: add shared variables for range check") adds some shared const variables to be used instead of a local copy in each source file. Warn when a chunk duplicates one of these values in a ctl_table struct: $ scripts/checkpatch.pl 0001-test-commit.patch WARNING: duplicated sysctl range checking value 'zero', consider using the shared one in include/linux/sysctl.h #27: FILE: arch/arm/kernel/isa.c:48: + .extra1 = &zero, WARNING: duplicated sysctl range checking value 'int_max', consider using the shared one in include/linux/sysctl.h #28: FILE: arch/arm/kernel/isa.c:49: + .extra2 = &int_max, total: 0 errors, 2 warnings, 14 lines checked Link: http://lkml.kernel.org/r/20190531131422.14970-1-mcroce@redhat.com Signed-off-by: Matteo Croce Reviewed-by: Kees Cook Cc: Joe Perches Cc: Aaron Tomlin Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 6 ++++++ 1 file changed, 6 insertions(+) commit 9f973cb38088e0cf42e0bae97ff140813e623f13 Author: Michel Lespinasse Date: Tue Jul 16 16:27:45 2019 -0700 lib/rbtree: avoid generating code twice for the cached versions As was already noted in rbtree.h, the logic to cache rb_first (or rb_last) can easily be implemented externally to the core rbtree api. Change the implementation to do just that. Previously the update of rb_leftmost was wired deeper into the implmentation, but there were some disadvantages to that - mostly, lib/rbtree.c had separate instantiations for rb_insert_color() vs rb_insert_color_cached(), as well as rb_erase() vs rb_erase_cached(), which were doing exactly the same thing save for the rb_leftmost update at the start of either function. text data bss dec hex filename 5405 120 0 5525 1595 lib/rbtree.o-vanilla 3827 96 0 3923 f53 lib/rbtree.o-patch [dave@stgolabs.net: changelog addition] Link: http://lkml.kernel.org/r/20190628171416.by5gdizl3rcxk5h5@linux-r8p5 [akpm@linux-foundation.org: coding-style fixes] Link: http://lkml.kernel.org/r/20190628045008.39926-1-walken@google.com Signed-off-by: Michel Lespinasse Acked-by: Davidlohr Bueso Acked-by: Peter Zijlstra (Intel) Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/rbtree.h | 70 ++++++++++++++++++++++++++-------------- include/linux/rbtree_augmented.h | 27 ++++++---------- lib/rbtree.c | 40 ++--------------------- 3 files changed, 59 insertions(+), 78 deletions(-) commit 4ab7ace465466d25c12cee9854e7140077e208cb Author: Alexander Potapenko Date: Tue Jul 16 16:27:42 2019 -0700 lib/test_meminit.c: minor test fixes Fix the following issues in test_meminit.c: - |size| in fill_with_garbage_skip() should be signed so that it doesn't overflow if it's not aligned on sizeof(*p); - fill_with_garbage_skip() should actually skip |skip| bytes; - do_kmem_cache_size() should deallocate memory in the RCU case. Link: http://lkml.kernel.org/r/20190626133135.217355-1-glider@google.com Fixes: 7e659650cbda ("lib: introduce test_meminit module") Fixes: 94e8988d91c7 ("lib/test_meminit.c: fix -Wmaybe-uninitialized false positive") Signed-off-by: Alexander Potapenko Cc: Arnd Bergmann Cc: Kees Cook Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/test_meminit.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit d3a811617ae629d7c0c5b7f0b7b0a72715ae3407 Author: Arnd Bergmann Date: Tue Jul 16 16:27:39 2019 -0700 lib/test_meminit.c: fix -Wmaybe-uninitialized false positive The conditional logic is too complicated for the compiler to fully comprehend: lib/test_meminit.c: In function 'test_meminit_init': lib/test_meminit.c:236:5: error: 'buf_copy' may be used uninitialized in this function [-Werror=maybe-uninitialized] kfree(buf_copy); ^~~~~~~~~~~~~~~ lib/test_meminit.c:201:14: note: 'buf_copy' was declared here Simplify it by splitting out the non-rcu section. Link: http://lkml.kernel.org/r/20190617131210.2190280-1-arnd@arndb.de Fixes: af734ee6ec85 ("lib: introduce test_meminit module") Signed-off-by: Arnd Bergmann Acked-by: Alexander Potapenko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/test_meminit.c | 50 ++++++++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 24 deletions(-) commit b4658cdd8cab49c978334dc5db9070d0d881e3dd Author: Jonathan Corbet Date: Tue Jul 16 16:27:36 2019 -0700 lib/string_helpers: fix some kerneldoc warnings Due to some sad limitations in how kerneldoc comments are parsed, the documentation in lib/string_helpers.c generates these warnings: lib/string_helpers.c:236: WARNING: Unexpected indentation. lib/string_helpers.c:241: WARNING: Block quote ends without a blank line; unexpected unindent. lib/string_helpers.c:446: WARNING: Unexpected indentation. lib/string_helpers.c:451: WARNING: Block quote ends without a blank line; unexpected unindent. lib/string_helpers.c:474: WARNING: Unexpected indentation. Rework the comments to obtain something like the desired result. Link: http://lkml.kernel.org/r/20190607110952.409011ba@lwn.net Signed-off-by: Jonathan Corbet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/string_helpers.c | 77 +++++++++++++++++++++++++++------------------------- 1 file changed, 40 insertions(+), 37 deletions(-) commit 0f472d04f59ff89d15b2a1c4eafde7317ddd67a2 Author: Anshuman Khandual Date: Tue Jul 16 16:27:33 2019 -0700 mm/ioremap: probe platform for p4d huge map support Finish up what commit c2febafc6773 ("mm: convert generic code to 5-level paging") started while levelling up P4D huge mapping support at par with PUD and PMD. A new arch call back arch_ioremap_p4d_supported() is added which just maintains status quo (P4D huge map not supported) on x86, arm64 and powerpc. When HAVE_ARCH_HUGE_VMAP is enabled its just a simple check from the arch about the support, hence runtime effects are minimal. Link: http://lkml.kernel.org/r/1561699231-20991-1-git-send-email-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Acked-by: Thomas Gleixner Acked-by: Michael Ellerman (powerpc) Cc: Catalin Marinas Cc: Will Deacon Cc: Dave Hansen Cc: Andy Lutomirski Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Kirill A. Shutemov Cc: Michal Hocko Cc: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm64/mm/mmu.c | 5 +++++ arch/powerpc/mm/book3s64/radix_pgtable.c | 5 +++++ arch/x86/mm/ioremap.c | 5 +++++ include/linux/io.h | 1 + lib/ioremap.c | 2 ++ 5 files changed, 18 insertions(+) commit 6b95ab4218bfa59bc315105127ffe03aef3b5742 Author: Anshuman Khandual Date: Tue Jul 16 16:27:30 2019 -0700 mm/ioremap: check virtual address alignment while creating huge mappings Virtual address alignment is essential in ensuring correct clearing for all intermediate level pgtable entries and freeing associated pgtable pages. An unaligned address can end up randomly freeing pgtable page that potentially still contains valid mappings. Hence also check it's alignment along with existing phys_addr check. Signed-off-by: Anshuman Khandual Reviewed-by: Catalin Marinas Cc: Toshi Kani Cc: Will Deacon Cc: Chintan Pandya Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/ioremap.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 5015a300a522c8fb542dc993140e4c360cf4cf5f Author: Alexander Potapenko Date: Tue Jul 16 16:27:27 2019 -0700 lib: introduce test_meminit module Add tests for heap and pagealloc initialization. These can be used to check init_on_alloc and init_on_free implementations as well as other approaches to initialization. Expected test output in the case the kernel provides heap initialization (e.g. when running with either init_on_alloc=1 or init_on_free=1): test_meminit: all 10 tests in test_pages passed test_meminit: all 40 tests in test_kvmalloc passed test_meminit: all 60 tests in test_kmemcache passed test_meminit: all 10 tests in test_rcu_persistent passed test_meminit: all 120 tests passed! Link: http://lkml.kernel.org/r/20190529123812.43089-4-glider@google.com Signed-off-by: Alexander Potapenko Acked-by: Kees Cook Cc: Christoph Lameter Cc: Nick Desaulniers Cc: Kostya Serebryany Cc: Dmitry Vyukov Cc: Sandeep Patil Cc: Laura Abbott Cc: Jann Horn Cc: Marco Elver Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/Kconfig.debug | 8 ++ lib/Makefile | 1 + lib/test_meminit.c | 362 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 371 insertions(+) commit 8e060c21ae2c265a2b596e9e7f9f97ec274151a4 Author: Kees Cook Date: Tue Jul 16 16:27:24 2019 -0700 lib/test_overflow.c: avoid tainting the kernel and fix wrap size This adds __GFP_NOWARN to the kmalloc()-portions of the overflow test to avoid tainting the kernel. Additionally fixes up the math on wrap size to be architecture and page size agnostic. Link: http://lkml.kernel.org/r/201905282012.0A8767E24@keescook Fixes: ca90800a91ba ("test_overflow: Add memory allocation overflow tests") Signed-off-by: Kees Cook Reported-by: Randy Dunlap Suggested-by: Rasmus Villemoes Cc: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/test_overflow.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit d1a5dc5e6accbeaabe59e3d55b47f15a8b19c2bd Author: Peter Rosin Date: Tue Jul 16 16:27:21 2019 -0700 lib/test_string.c: add some testcases for strchr and strnchr Make sure that the trailing NUL is considered part of the string and can be found. Link: http://lkml.kernel.org/r/20190506124634.6807-4-peda@axentia.se Signed-off-by: Peter Rosin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/test_string.c | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) commit 33d6e0ff68af74be0c846c8e042e84a9a1a0561e Author: Peter Rosin Date: Tue Jul 16 16:27:18 2019 -0700 lib/test_string.c: avoid masking memset16/32/64 failures If a memsetXX implementation is completely broken and fails in the first iteration, when i, j, and k are all zero, the failure is masked as zero is returned. Failing in the first iteration is perhaps the most likely failure, so this makes the tests pretty much useless. Avoid the situation by always setting a random unused bit in the result on failure. Link: http://lkml.kernel.org/r/20190506124634.6807-3-peda@axentia.se Fixes: 03270c13c5ff ("lib/string.c: add testcases for memset16/32/64") Signed-off-by: Peter Rosin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/test_string.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b09757104e433447226a95eff4b92583acc0b0fb Author: Peter Rosin Date: Tue Jul 16 16:27:15 2019 -0700 lib/string.c: allow searching for NUL with strnchr Patch series "lib/string: search for NUL with strchr/strnchr". I noticed an inconsistency where strchr and strnchr do not behave the same with respect to the trailing NUL. strchr is standardised and the kernel function conforms, and the kernel relies on the behavior. So, naturally strchr stays as-is and strnchr is what I change. While writing a few tests to verify that my new strnchr loop was sane, I noticed that the tests for memset16/32/64 had a problem. Since it's all about the lib/string.c file I made a short series of it all... This patch (of 3): strchr considers the terminating NUL to be part of the string, and NUL can thus be searched for with that function. For consistency, do the same with strnchr. Link: http://lkml.kernel.org/r/20190506124634.6807-2-peda@axentia.se Signed-off-by: Peter Rosin Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/string.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 4c6080cd6f8baad9f7faa3deac9a90e59726b119 Author: Alexey Dobriyan Date: Tue Jul 16 16:27:12 2019 -0700 lib/list: tweak LIST_POISON2 for better code generation on x86_64 list_del() poisoning can generate 2 64-bit immediate loads but it also can generate one 64-bit immediate load and an addition: 48 b8 00 01 00 00 00 00 ad de movabs rax,0xdead000000000100 48 89 47 58 mov QWORD PTR [rdi+0x58],rax 48 05 00 01 00 00 <=====> add rax,0x100 48 89 47 60 mov QWORD PTR [rdi+0x60],rax However on x86_64 not all constants are equal: those within [-128, 127] range can be added with shorter "add r64, imm32" instruction: 48 b8 00 01 00 00 00 00 ad de movabs rax,0xdead000000000100 48 89 47 58 mov QWORD PTR [rdi+0x58],rax 48 83 c0 22 <======> add rax,0x22 48 89 47 60 mov QWORD PTR [rdi+0x60],rax Patch saves 2 bytes per some LIST_POISON2 usage. (Slightly disappointing) space savings on F29 x86_64 config: add/remove: 0/0 grow/shrink: 0/2164 up/down: 0/-5184 (-5184) Function old new delta zstd_get_workspace 548 546 -2 ... mlx4_delete_all_resources_for_slave 4826 4804 -22 Total: Before=83304131, After=83298947, chg -0.01% New constants are: 0xdead000000000100 0xdead000000000122 Note: LIST_POISON1 can't be changed to ...11 because something in page allocator requires low bit unset. Link: http://lkml.kernel.org/r/20190513191502.GA8492@avx2 Signed-off-by: Alexey Dobriyan Cc: Vasiliy Kulikov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/poison.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 49662503e8e4df9db29bfc354112a9a6312d7a25 Author: Joe Perches Date: Tue Jul 16 16:27:09 2019 -0700 get_maintainer: add ability to skip moderated mailing lists Add a command line switch --no-moderated to skip L: mailing lists marked with 'moderated'. Some people prefer not emailing moderated mailing lists as the moderation time can be indeterminate and some emails can be intentionally dropped by a moderator. This can cause fragmentation of email threads when some are subscribed to a moderated list but others are not and emails are dropped. Link: http://lkml.kernel.org/r/6f23c2918ad9fc744269feb8f909bdfb105c5afc.camel@perches.com Signed-off-by: Joe Perches Tested-by: Peter Zijlstra (Intel) Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/get_maintainer.pl | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit c296d4dc13aefe96792538a949996b8938f28f13 Author: Qian Cai Date: Tue Jul 16 16:27:06 2019 -0700 asm-generic: fix a compilation warning Fix this compilation warning on x86 by making flush_cache_vmap() inline. lib/ioremap.c: In function 'ioremap_page_range': lib/ioremap.c:214:16: warning: variable 'start' set but not used [-Wunused-but-set-variable] unsigned long start; ^~~~~ While at it, convert all other similar functions to inline for consistency. Link: http://lkml.kernel.org/r/1562594592-15228-1-git-send-email-cai@lca.pw Signed-off-by: Qian Cai Reviewed-by: Andrew Morton Cc: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/asm-generic/cacheflush.h | 74 ++++++++++++++++++++++++++++++++-------- 1 file changed, 60 insertions(+), 14 deletions(-) commit 3a7f0adfe7c27cdaf6dc3456226a430398732e2c Author: Stephen Kitt Date: Tue Jul 16 16:27:04 2019 -0700 arch/*: remove unused isa_page_to_bus() isa_page_to_bus() is deprecated and is no longer used anywhere. Remove it entirely. Link: http://lkml.kernel.org/r/20190613161155.16946-1-steve@sk2.org Signed-off-by: Stephen Kitt Acked-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/alpha/include/asm/io.h | 5 ----- arch/arm/include/asm/io.h | 1 - arch/mips/include/asm/io.h | 2 -- arch/x86/include/asm/io.h | 1 - 4 files changed, 9 deletions(-) commit fe6ba88b251aa76a94be2cb441d2e6b7c623b989 Author: Masahiro Yamada Date: Tue Jul 16 16:27:01 2019 -0700 arch: replace _BITUL() in kernel-space headers with BIT() Now that BIT() can be used from assembly code, we can safely replace _BITUL() with equivalent BIT(). UAPI headers are still required to use _BITUL(), but there is no more reason to use it in kernel headers. BIT() is shorter. Link: http://lkml.kernel.org/r/20190609153941.17249-2-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Christian Borntraeger Cc: Vineet Gupta Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arc/include/asm/pgtable.h | 8 ++-- arch/arc/plat-eznps/include/plat/ctop.h | 15 +++--- arch/arm64/include/asm/sysreg.h | 82 ++++++++++++++++----------------- arch/s390/include/asm/ctl_reg.h | 42 ++++++++--------- arch/s390/include/asm/nmi.h | 20 ++++---- arch/s390/include/asm/processor.h | 20 ++++---- arch/s390/include/asm/ptrace.h | 10 ++-- arch/s390/include/asm/setup.h | 40 ++++++++-------- arch/s390/include/asm/thread_info.h | 34 +++++++------- 9 files changed, 136 insertions(+), 135 deletions(-) commit 95b980d62d52c4c1768ee719e8db3efe27ef52b2 Author: Masahiro Yamada Date: Tue Jul 16 16:26:57 2019 -0700 linux/bits.h: make BIT(), GENMASK(), and friends available in assembly BIT(), GENMASK(), etc. are useful to define register bits of hardware. However, low-level code is often written in assembly, where they are not available due to the hard-coded 1UL, 0UL. In fact, in-kernel headers such as arch/arm64/include/asm/sysreg.h use _BITUL() instead of BIT() so that the register bit macros are available in assembly. Using macros in include/uapi/linux/const.h have two reasons: [1] For use in uapi headers We should use underscore-prefixed variants for user-space. [2] For use in assembly code Since _BITUL() uses UL(1) instead of 1UL, it can be used as an alternative of BIT(). For [2], it is pretty easy to change BIT() etc. for use in assembly. This allows to replace _BUTUL() in kernel-space headers with BIT(). Link: http://lkml.kernel.org/r/20190609153941.17249-1-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Cc: Catalin Marinas Cc: Christian Borntraeger Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Vineet Gupta Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/bits.h | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 65f50f255349959f15f2761abd17ead8530b2f33 Author: Weitao Hou Date: Tue Jul 16 16:26:54 2019 -0700 kernel: fix typos and some coding style in comments fix lenght to length Link: http://lkml.kernel.org/r/20190521050937.4370-1-houweitaoo@gmail.com Signed-off-by: Weitao Hou Acked-by: Kees Cook Cc: Colin Ian King Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/devicetree/bindings/usb/s3c2410-usb.txt | 2 +- drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c | 2 +- kernel/sysctl.c | 18 +++++++++--------- sound/soc/qcom/qdsp6/q6asm.c | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) commit 5ec27ec735ba0477d48c80561cc5e856f0c5dfaf Author: Radoslaw Burny Date: Tue Jul 16 16:26:51 2019 -0700 fs/proc/proc_sysctl.c: fix the default values of i_uid/i_gid on /proc/sys inodes. Normally, the inode's i_uid/i_gid are translated relative to s_user_ns, but this is not a correct behavior for proc. Since sysctl permission check in test_perm is done against GLOBAL_ROOT_[UG]ID, it makes more sense to use these values in u_[ug]id of proc inodes. In other words: although uid/gid in the inode is not read during test_perm, the inode logically belongs to the root of the namespace. I have confirmed this with Eric Biederman at LPC and in this thread: https://lore.kernel.org/lkml/87k1kzjdff.fsf@xmission.com Consequences ============ Since the i_[ug]id values of proc nodes are not used for permissions checks, this change usually makes no functional difference. However, it causes an issue in a setup where: * a namespace container is created without root user in container - hence the i_[ug]id of proc nodes are set to INVALID_[UG]ID * container creator tries to configure it by writing /proc/sys files, e.g. writing /proc/sys/kernel/shmmax to configure shared memory limit Kernel does not allow to open an inode for writing if its i_[ug]id are invalid, making it impossible to write shmmax and thus - configure the container. Using a container with no root mapping is apparently rare, but we do use this configuration at Google. Also, we use a generic tool to configure the container limits, and the inability to write any of them causes a failure. History ======= The invalid uids/gids in inodes first appeared due to 81754357770e (fs: Update i_[ug]id_(read|write) to translate relative to s_user_ns). However, AFAIK, this did not immediately cause any issues. The inability to write to these "invalid" inodes was only caused by a later commit 0bd23d09b874 (vfs: Don't modify inodes with a uid or gid unknown to the vfs). Tested: Used a repro program that creates a user namespace without any mapping and stat'ed /proc/$PID/root/proc/sys/kernel/shmmax from outside. Before the change, it shows the overflow uid, with the change it's 0. The overflow uid indicates that the uid in the inode is not correct and thus it is not possible to open the file for writing. Link: http://lkml.kernel.org/r/20190708115130.250149-1-rburny@google.com Fixes: 0bd23d09b874 ("vfs: Don't modify inodes with a uid or gid unknown to the vfs") Signed-off-by: Radoslaw Burny Acked-by: Luis Chamberlain Cc: Kees Cook Cc: "Eric W . Biederman" Cc: Seth Forshee Cc: John Sperbeck Cc: Alexey Dobriyan Cc: [4.8+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/proc_sysctl.c | 4 ++++ 1 file changed, 4 insertions(+) commit 7dbbade1f285e881119049563ab2a036c96dd9f3 Author: Alexey Dobriyan Date: Tue Jul 16 16:26:48 2019 -0700 proc: test /proc/sysvipc vs setns(CLONE_NEWIPC) I thought that /proc/sysvipc has the same bug as /proc/net commit 1fde6f21d90f8ba5da3cb9c54ca991ed72696c43 proc: fix /proc/net/* after setns(2) However, it doesn't! /proc/sysvipc files do get_ipc_ns(current->nsproxy->ipc_ns); in their open() hook and avoid the problem. Keep the test, maybe /proc/sysvipc will become broken someday :-\ Link: http://lkml.kernel.org/r/20190706180146.GA21015@avx2 Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/testing/selftests/proc/.gitignore | 1 + tools/testing/selftests/proc/Makefile | 1 + tools/testing/selftests/proc/setns-sysvipc.c | 133 +++++++++++++++++++++++++++ 3 files changed, 135 insertions(+) commit 9af27b28b1da1020e427b626c4967d0206b55100 Author: Alexey Dobriyan Date: Tue Jul 16 16:26:45 2019 -0700 fs/proc/inode.c: use typeof_member() macro Don't repeat function signatures twice. This is a kind-of-precursor for "struct proc_ops". Note: typeof(pde->proc_fops->...) ...; can't be used because ->proc_fops is "const struct file_operations *". "const" prevents assignment down the code and it can't be deleted in the type system. Link: http://lkml.kernel.org/r/20190529191110.GB5703@avx2 Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/inode.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) commit ce251e0e3c0597ea8cab5787df579bd1f9c1aca1 Author: Alexey Dobriyan Date: Tue Jul 16 16:26:42 2019 -0700 include/linux/kernel.h: add typeof_member() macro Add typeof_member() macro so that types can be extracted without introducing dummy variables. Link: http://lkml.kernel.org/r/20190529190720.GA5703@avx2 Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/kernel.h | 2 ++ 1 file changed, 2 insertions(+) commit c6c405336bd3b0ebd1d76aaf9ea88b35dba77e61 Author: Kairui Song Date: Tue Jul 16 16:26:39 2019 -0700 vmcore: add a kernel parameter novmcoredd Since commit 2724273e8fd0 ("vmcore: add API to collect hardware dump in second kernel"), drivers are allowed to add device related dump data to vmcore as they want by using the device dump API. This has a potential issue, the data is stored in memory, drivers may append too much data and use too much memory. The vmcore is typically used in a kdump kernel which runs in a pre-reserved small chunk of memory. So as a result it will make kdump unusable at all due to OOM issues. So introduce new 'novmcoredd' command line option. User can disable device dump to reduce memory usage. This is helpful if device dump is using too much memory, disabling device dump could make sure a regular vmcore without device dump data is still available. [akpm@linux-foundation.org: tweak documentation] [akpm@linux-foundation.org: vmcore.c needs moduleparam.h] Link: http://lkml.kernel.org/r/20190528111856.7276-1-kasong@redhat.com Signed-off-by: Kairui Song Acked-by: Dave Young Reviewed-by: Bhupesh Sharma Cc: Rahul Lakkireddy Cc: "David S . Miller" Cc: Eric Biederman Cc: Alexey Dobriyan Cc: Baoquan He Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/admin-guide/kernel-parameters.txt | 11 +++++++++++ fs/proc/Kconfig | 3 ++- fs/proc/vmcore.c | 9 +++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) commit bca1eac55a940025065645158c1a3429ac697df6 Author: Alexey Dobriyan Date: Tue Jul 16 16:26:36 2019 -0700 tools/testing/selftests/proc/proc-pid-vm.c: hide "segfault at ffffffffff600000" dmesg spam Test tries to access vsyscall page and if it doesn't exist gets SIGSEGV which can spam into dmesg. However the segfault happens by design. Handle it and carry information via exit code to parent. Link: http://lkml.kernel.org/r/20190524181256.GA2260@avx2 Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/testing/selftests/proc/proc-pid-vm.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit 9b98fa22948551e20a15b0b9d22589e3724c361a Author: Christoph Hellwig Date: Tue Jul 16 16:26:33 2019 -0700 mm: stub out all of swapops.h for !CONFIG_MMU The whole header file deals with swap entries and PTEs, none of which can exist for nommu builds. The current nommu ports have lots of stubs to allow the inline functions in swapops.h to compile, but as none of this functionality is actually used there is no point in even providing it. This way we don't have to provide the stubs for the upcoming RISC-V nommu port, and can eventually remove it from the existing ports. Link: http://lkml.kernel.org/r/20190703122359.18200-4-hch@lst.de Signed-off-by: Christoph Hellwig Cc: Vladimir Murzin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/swapops.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 89165b8b0ee97bd775ac4376b932fd030f7462bd Author: Christoph Hellwig Date: Tue Jul 16 16:26:30 2019 -0700 mm: provide a print_vma_addr stub for !CONFIG_MMU Link: http://lkml.kernel.org/r/20190703122359.18200-3-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Vladimir Murzin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm.h | 6 ++++++ 1 file changed, 6 insertions(+) commit 0bf5f9492389aa8df5c8e38fcb4488802d24504d Author: Christoph Hellwig Date: Tue Jul 16 16:26:27 2019 -0700 mm: fix the MAP_UNINITIALIZED flag We can't expose UAPI symbols differently based on CONFIG_ symbols, as userspace won't have them available. Instead always define the flag, but only respect it based on the config option. Link: http://lkml.kernel.org/r/20190703122359.18200-2-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Vladimir Murzin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/xtensa/include/uapi/asm/mman.h | 6 +----- include/uapi/asm-generic/mman-common.h | 8 +++----- mm/nommu.c | 4 +++- 3 files changed, 7 insertions(+), 11 deletions(-) commit c633324e311243586675e732249339685e5d6faa Author: Doug Berger Date: Tue Jul 16 16:26:24 2019 -0700 mm/cma.c: fail if fixed declaration can't be honored The description of cma_declare_contiguous() indicates that if the 'fixed' argument is true the reserved contiguous area must be exactly at the address of the 'base' argument. However, the function currently allows the 'base', 'size', and 'limit' arguments to be silently adjusted to meet alignment constraints. This commit enforces the documented behavior through explicit checks that return an error if the region does not fit within a specified region. Link: http://lkml.kernel.org/r/1561422051-16142-1-git-send-email-opendmb@gmail.com Fixes: 5ea3b1b2f8ad ("cma: add placement specifier for "cma=" kernel parameter") Signed-off-by: Doug Berger Acked-by: Michal Nazarewicz Cc: Yue Hu Cc: Mike Rapoport Cc: Laura Abbott Cc: Peng Fan Cc: Thomas Gleixner Cc: Marek Szyprowski Cc: Andrey Konovalov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/cma.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit c92d2f38563db20c20c8db2f98fa1349290477d5 Author: Henry Burns Date: Tue Jul 16 16:26:21 2019 -0700 mm/z3fold.c: reinitialize zhdr structs after migration z3fold_page_migration() calls memcpy(new_zhdr, zhdr, PAGE_SIZE). However, zhdr contains fields that can't be directly coppied over (ex: list_head, a circular linked list). We only need to initialize the linked lists in new_zhdr, as z3fold_isolate_page() already ensures that these lists are empty Additionally it is possible that zhdr->work has been placed in a workqueue. In this case we shouldn't migrate the page, as zhdr->work references zhdr as opposed to new_zhdr. Link: http://lkml.kernel.org/r/20190716000520.230595-1-henryburns@google.com Fixes: 1f862989b04ade61d3 ("mm/z3fold.c: support page migration") Signed-off-by: Henry Burns Reviewed-by: Shakeel Butt Cc: Vitaly Vul Cc: Vitaly Wool Cc: Jonathan Adams Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/z3fold.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit be03074c9af25d06cf8e9ebddfcd284c0bf7f947 Author: Henry Burns Date: Tue Jul 16 16:26:18 2019 -0700 mm/z3fold.c: remove z3fold_migration trylock z3fold_page_migrate() will never succeed because it attempts to acquire a lock that has already been taken by migrate.c in __unmap_and_move(). __unmap_and_move() migrate.c trylock_page(oldpage) move_to_new_page(oldpage_newpage) a_ops->migrate_page(oldpage, newpage) z3fold_page_migrate(oldpage, newpage) trylock_page(oldpage) Link: http://lkml.kernel.org/r/20190710213238.91835-1-henryburns@google.com Fixes: 1f862989b04a ("mm/z3fold.c: support page migration") Signed-off-by: Henry Burns Reviewed-by: Shakeel Butt Cc: Vitaly Wool Cc: Vitaly Vul Cc: Jonathan Adams Cc: Greg Kroah-Hartman Cc: Snild Dolkow Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/z3fold.c | 6 ------ 1 file changed, 6 deletions(-) commit 1732d2b0117c26a6bf6027c919e49603156ea93d Author: Andrew Morton Date: Tue Jul 16 16:26:15 2019 -0700 mm/vmscan.c: add checks for incorrect handling of current->reclaim_state Six sites are presently altering current->reclaim_state. There is a risk that one function stomps on a caller's value. Use a helper function to catch such errors. Cc: Yafang Shao Cc: Kirill Tkhai Cc: Michal Hocko Cc: Johannes Weiner Cc: Vladimir Davydov Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmscan.c | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) commit 0308f7cf19c9741837f5b4c8cde14342bba72604 Author: Yafang Shao Date: Tue Jul 16 16:26:12 2019 -0700 mm/vmscan.c: calculate reclaimed slab caches in all reclaim paths There are six different reclaim paths by now: - kswapd reclaim path - node reclaim path - hibernate preallocate memory reclaim path - direct reclaim path - memcg reclaim path - memcg softlimit reclaim path The slab caches reclaimed in these paths are only calculated in the above three paths. There're some drawbacks if we don't calculate the reclaimed slab caches. - The sc->nr_reclaimed isn't correct if there're some slab caches relcaimed in this path. - The slab caches may be reclaimed thoroughly if there're lots of reclaimable slab caches and few page caches. Let's take an easy example for this case. If one memcg is full of slab caches and the limit of it is 512M, in other words there're approximately 512M slab caches in this memcg. Then the limit of the memcg is reached and the memcg reclaim begins, and then in this memcg reclaim path it will continuesly reclaim the slab caches until the sc->priority drops to 0. After this reclaim stops, you will find there're few slab caches left, which is less than 20M in my test case. While after this patch applied the number is greater than 300M and the sc->priority only drops to 3. Link: http://lkml.kernel.org/r/1561112086-6169-3-git-send-email-laoar.shao@gmail.com Signed-off-by: Yafang Shao Reviewed-by: Kirill Tkhai Reviewed-by: Andrew Morton Cc: Kirill Tkhai Cc: Michal Hocko Cc: Johannes Weiner Cc: Vladimir Davydov Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmscan.c | 7 +++++++ 1 file changed, 7 insertions(+) commit e5ca8071fe65f409ba074d1c45ec2db977b5b222 Author: Yafang Shao Date: Tue Jul 16 16:26:09 2019 -0700 mm/vmscan.c: add a new member reclaim_state in struct shrink_control Patch series "mm/vmscan: calculate reclaimed slab in all reclaim paths". This patchset is to fix the issues in doing shrink slab. There're six different reclaim paths by now, - kswapd reclaim path - node reclaim path - hibernate preallocate memory reclaim path - direct reclaim path - memcg reclaim path - memcg softlimit reclaim path The slab caches reclaimed in these paths are only calculated in the above three paths. The issues are detailed explained in patch #2. We should calculate the reclaimed slab caches in every reclaim path. In order to do it, the struct reclaim_state is placed into the struct shrink_control. In node reclaim path, there'is another issue about shrinking slab, which is adressed in "mm/vmscan: shrink slab in node reclaim" (https://lore.kernel.org/linux-mm/1559874946-22960-1-git-send-email-laoar.shao@gmail.com/). This patch (of 2): The struct reclaim_state is used to record how many slab caches are reclaimed in one reclaim path. The struct shrink_control is used to control one reclaim path. So we'd better put reclaim_state into shrink_control. [laoar.shao@gmail.com: remove reclaim_state assignment from __perform_reclaim()] Link: http://lkml.kernel.org/r/1561381582-13697-1-git-send-email-laoar.shao@gmail.com Link: http://lkml.kernel.org/r/1561112086-6169-2-git-send-email-laoar.shao@gmail.com Signed-off-by: Yafang Shao Reviewed-by: Andrew Morton Reviewed-by: Kirill Tkhai Cc: Michal Hocko Cc: Johannes Weiner Cc: Vladimir Davydov Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 4 ---- mm/vmscan.c | 20 ++++++++------------ 2 files changed, 8 insertions(+), 16 deletions(-) commit 766a4c19d880887c457811b86f1f68525e416965 Author: Yafang Shao Date: Tue Jul 16 16:26:06 2019 -0700 mm/memcontrol.c: keep local VM counters in sync with the hierarchical ones After commit 815744d75152 ("mm: memcontrol: don't batch updates of local VM stats and events"), the local VM counter are not in sync with the hierarchical ones. Below is one example in a leaf memcg on my server (with 8 CPUs): inactive_file 3567570944 total_inactive_file 3568029696 We find that the deviation is very great because the 'val' in __mod_memcg_state() is in pages while the effective value in memcg_stat_show() is in bytes. So the maximum of this deviation between local VM stats and total VM stats can be (32 * number_of_cpu * PAGE_SIZE), that may be an unacceptably great value. We should keep the local VM stats in sync with the total stats. In order to keep this behavior the same across counters, this patch updates __mod_lruvec_state() and __count_memcg_events() as well. Link: http://lkml.kernel.org/r/1562851979-10610-1-git-send-email-laoar.shao@gmail.com Signed-off-by: Yafang Shao Acked-by: Johannes Weiner Cc: Michal Hocko Cc: Vladimir Davydov Cc: Yafang Shao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memcontrol.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) commit f1549cb5ab2bd04cb370502b720268f610e21baa Author: Henry Burns Date: Tue Jul 16 16:26:03 2019 -0700 mm/z3fold.c: allow __GFP_HIGHMEM in z3fold_alloc One of the gfp flags used to show that a page is movable is __GFP_HIGHMEM. Currently z3fold_alloc() fails when __GFP_HIGHMEM is passed. Now that z3fold pages are movable, we allow __GFP_HIGHMEM. We strip the movability related flags from the call to kmem_cache_alloc() for our slots since it is a kernel allocation. [akpm@linux-foundation.org: coding-style fixes] Link: http://lkml.kernel.org/r/20190712222118.108192-1-henryburns@google.com Signed-off-by: Henry Burns Acked-by: Vitaly Wool Reviewed-by: Shakeel Butt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/z3fold.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 929f92f78068a18ffa38ea7af3faad7fceca529c Author: Ryohei Suzuki Date: Tue Jul 16 16:26:00 2019 -0700 mm/cma.c: fix a typo ("alloc_cma" -> "cma_alloc") in cma_release() comments A comment referred to a non-existent function alloc_cma(), which should have been cma_alloc(). Link: http://lkml.kernel.org/r/20190712085549.5920-1-ryh.szk.cmnty@gmail.com Signed-off-by: Ryohei Suzuki Reviewed-by: Andrew Morton Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/cma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a07057dce2823e10d64a2b73cefbf09d8645efe9 Author: Arnd Bergmann Date: Tue Jul 16 16:25:57 2019 -0700 mm/slab_common.c: work around clang bug #42570 Clang gets rather confused about two variables in the same special section when one of them is not initialized, leading to an assembler warning later: /tmp/slab_common-18f869.s: Assembler messages: /tmp/slab_common-18f869.s:7526: Warning: ignoring changed section attributes for .data..ro_after_init Adding an initialization to kmalloc_caches is rather silly here but does avoid the issue. Link: https://bugs.llvm.org/show_bug.cgi?id=42570 Link: http://lkml.kernel.org/r/20190712090455.266021-1-arnd@arndb.de Signed-off-by: Arnd Bergmann Acked-by: David Rientjes Reviewed-by: Andrew Morton Cc: Christoph Lameter Cc: Pekka Enberg Cc: Joonsoo Kim Cc: Stephen Rothwell Cc: Roman Gushchin Cc: Shakeel Butt Cc: Vladimir Davydov Cc: Andrey Konovalov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab_common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7b7c1df2883dd4393592859758c3e76207da8b1d Author: Arnd Bergmann Date: Tue Jul 16 16:25:54 2019 -0700 lib/mpi/longlong.h: fix building with 32-bit x86 The mpi library contains some rather old inline assembly statements that produce a lot of warnings for 32-bit x86, such as: lib/mpi/mpih-div.c:76:16: error: invalid use of a cast in a inline asm context requiring an l-value: remove the cast or build with -fheinous-gnu-extensions udiv_qrnnd(qp[i], n1, n1, np[i], d); ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ lib/mpi/longlong.h:423:20: note: expanded from macro 'udiv_qrnnd' : "=a" ((USItype)(q)), \ ~~~~~~~~~~^~ There is no point in doing a type cast for the output of an inline assembler statement, so just remove the cast here, as we have done for other architectures in the past. See also dea632cadd12 ("lib/mpi: fix build with clang"). Link: http://lkml.kernel.org/r/20190712090740.340186-1-arnd@arndb.de Signed-off-by: Arnd Bergmann Reviewed-by: Nick Desaulniers Cc: Stefan Agner Cc: Dmitry Kasatkin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/mpi/longlong.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit e5f2249ab8538feb86ba844fea87974c1973f63f Author: Arnd Bergmann Date: Tue Jul 16 16:25:51 2019 -0700 mm/shmem.c: fix unused shmem_parse_huge() function warning When CONFIG_SYSFS is disabled but CONFIG_TMPFS is enabled, we get a warning about shmem_parse_huge() never being called: mm/shmem.c:417:12: error: unused function 'shmem_parse_huge' [-Werror,-Wunused-function] static int shmem_parse_huge(const char *str) Change the #ifdef so we no longer build this function in that configuration. Link: http://lkml.kernel.org/r/20190712091141.673355-1-arnd@arndb.de Fixes: 144df3b288c4 ("vfs: Convert ramfs, shmem, tmpfs, devtmpfs, rootfs to use the new mount API") Signed-off-by: Arnd Bergmann Cc: Hugh Dickins Cc: Arnd Bergmann Cc: David Howells Cc: Al Viro Cc: Matthew Wilcox Cc: Vlastimil Babka Cc: Andrea Arcangeli Cc: Vineeth Remanan Pillai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/shmem.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit bb9a374dfa3a2f46581455ab66cd1d24c5e3d183 Author: Vitaly Wool Date: Tue Jul 16 16:25:48 2019 -0700 mm/z3fold: don't try to use buddy slots after free As reported by Henry Burns: Running z3fold stress testing with address sanitization showed zhdr->slots was being used after it was freed. z3fold_free(z3fold_pool, handle) free_handle(handle) kmem_cache_free(pool->c_handle, zhdr->slots) release_z3fold_page_locked_list(kref) __release_z3fold_page(zhdr, true) zhdr_to_pool(zhdr) slots_to_pool(zhdr->slots) *BOOM* To fix this, add pointer to the pool back to z3fold_header and modify zhdr_to_pool to return zhdr->pool. Link: http://lkml.kernel.org/r/20190708134808.e89f3bfadd9f6ffd7eff9ba9@gmail.com Fixes: 7c2b8baa61fe ("mm/z3fold.c: add structure for buddy handles") Signed-off-by: Vitaly Wool Reported-by: Henry Burns Reviewed-by: Shakeel Butt Cc: Jonathan Adams Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/z3fold.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 1cb59a6074e23c6f6513642f752a6d8d38327354 Author: Ilya Leoshkevich Date: Tue Jul 16 14:58:27 2019 +0200 selftests/bpf: fix perf_buffer on s390 perf_buffer test fails for exactly the same reason test_attach_probe used to fail: different nanosleep syscall kprobe name. Reuse the test_attach_probe fix. Fixes: ee5cf82ce04a ("selftests/bpf: test perf buffer API") Signed-off-by: Ilya Leoshkevich Acked-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/prog_tests/attach_probe.c | 12 ++---------- tools/testing/selftests/bpf/prog_tests/perf_buffer.c | 8 +------- tools/testing/selftests/bpf/test_progs.h | 8 ++++++++ 3 files changed, 11 insertions(+), 17 deletions(-) commit 9d1f62a6dcf0de3ab184c1f7b7d82117dcbab090 Author: Andrii Nakryiko Date: Tue Jul 16 12:38:37 2019 -0700 selftests/bpf: structure test_{progs, maps, verifier} test runners uniformly It's easier to follow the logic if it's structured the same. There is just slight difference between test_progs/test_maps and test_verifier. test_verifier's verifier/*.c files are not really compilable C files (they are more of include headers), so they can't be specified as explicit dependencies of test_verifier. Cc: Alexei Starovoitov Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/Makefile | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) commit 36646b22ce2455c25c76c9023a0e5ca58d62899a Author: Andrii Nakryiko Date: Tue Jul 16 12:38:36 2019 -0700 selftests/bpf: fix test_verifier/test_maps make dependencies e46fc22e60a4 ("selftests/bpf: make directory prerequisites order-only") exposed existing problem in Makefile for test_verifier and test_maps tests: their dependency on auto-generated header file with a list of all tests wasn't recorded explicitly. This patch fixes these issues. Fixes: 51a0e301a563 ("bpf: Add BPF_MAP_TYPE_SK_STORAGE test to test_maps") Fixes: 6b7b6995c43e ("selftests: bpf: tests.h should depend on .c files, not the output") Cc: Ilya Leoshkevich Cc: Stanislav Fomichev Cc: Martin KaFai Lau Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5a46421789f46165416d2b4834647b153c231c55 Author: Cedric Hombourger Date: Tue Jul 9 09:43:35 2019 +0200 builddeb: generate multi-arch friendly linux-libc-dev package Debian-based distributions place libc header files in a machine specific directory (/usr/include/) instead of /usr/include/asm to support installation of the linux-libc-dev package from multiple architectures. Move headers installed by "make headers_install" accordingly using Debian's tuple from dpkg-architecture (stored in debian/arch). Signed-off-by: Cedric Hombourger Signed-off-by: Masahiro Yamada scripts/package/builddeb | 5 +++++ scripts/package/mkdebian | 1 + 2 files changed, 6 insertions(+) commit 3266c806dc8692e079768ee2814498dcd6a91e61 Author: Masahiro Yamada Date: Wed Jun 5 03:14:53 2019 +0900 kconfig: run olddefconfig instead of oldconfig after merging fragments 'make olddefconfig' is non-interactive, so we can drop 'yes'. The behavior is equivalent. Signed-off-by: Masahiro Yamada scripts/kconfig/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b74c0cad3d5f4f2252f1a42e160dc0e202e88e93 Author: Masahiro Yamada Date: Wed May 15 13:27:21 2019 +0900 riscv: drop unneeded -Wall addition The top level Makefile adds -Wall globally: KBUILD_CFLAGS := -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs \ For riscv, I see two "-Wall" added for compiling each object. Signed-off-by: Masahiro Yamada arch/riscv/Makefile | 2 -- 1 file changed, 2 deletions(-) commit eef58fdd010796a39be721b66c80d4a19b876e79 Author: Masahiro Yamada Date: Fri Apr 12 12:09:41 2019 +0900 memory: ti-emif-sram: move driver-specific asm-offset.h to drivers/memory/ is only generated and included by drivers/memory/, so it does not need to reside in the globally visible include/generated/. Signed-off-by: Masahiro Yamada Acked-by: Santosh Shilimkar drivers/memory/.gitignore | 1 + drivers/memory/Makefile | 5 +++-- drivers/memory/ti-emif-sram-pm.S | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) commit 406de552c2be6ded524c75d14a73cf7f027f587e Author: Thomas Hellstrom Date: Thu Mar 28 12:06:37 2019 +0000 MAINTAINERS: Update PARAVIRT_OPS_INTERFACE and VMWARE_HYPERVISOR_INTERFACE Alok Kataria will be handing over VMware's maintainership of these interfaces to Thomas Hellström, with pv-drivers as backup contact. Signed-off-by: Thomas Hellstrom Signed-off-by: Thomas Gleixner Acked-by: Alok Kataria Acked-by: Juergen Gross Link: https://lkml.kernel.org/r/20190328120558.29897-1-thellstrom@vmware.com MAINTAINERS | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 50e04acf2990d0d93983720b0a85b11ef805df60 Author: Jann Horn Date: Sat Jul 13 00:41:52 2019 +0200 x86/process: Delete useless check for dead process with LDT At release_thread(), ->mm is NULL; and it is fine for the former mm to still have an LDT. Delete this check in process_64.c, similar to commit 2684927c6b93 ("[PATCH] x86: Deprecate useless bug"), which did the same in process_32.c. Signed-off-by: Jann Horn Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20190712224152.13129-1-jannh@google.com arch/x86/kernel/process_64.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit 29e7e9664aec17b94a9c8c5a75f8d216a206aa3a Author: Arnd Bergmann Date: Fri Jul 12 11:08:05 2019 +0200 x86: math-emu: Hide clang warnings for 16-bit overflow clang warns about a few parts of the math-emu implementation where a 16-bit integer becomes negative during assignment: arch/x86/math-emu/poly_tan.c:88:35: error: implicit conversion from 'int' to 'short' changes value from 49216 to -16320 [-Werror,-Wconstant-conversion] (0x41 + EXTENDED_Ebias) | SIGN_Negative); ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~ arch/x86/math-emu/fpu_emu.h:180:58: note: expanded from macro 'setexponent16' #define setexponent16(x,y) { (*(short *)&((x)->exp)) = (y); } ~ ^ arch/x86/math-emu/reg_constant.c:37:32: error: implicit conversion from 'int' to 'short' changes value from 49085 to -16451 [-Werror,-Wconstant-conversion] FPU_REG const CONST_PI2extra = MAKE_REG(NEG, -66, ^~~~~~~~~~~~~~~~~~ arch/x86/math-emu/reg_constant.c:21:25: note: expanded from macro 'MAKE_REG' ((EXTENDED_Ebias+(e)) | ((SIGN_##s != 0)*0x8000)) } ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ arch/x86/math-emu/reg_constant.c:48:28: error: implicit conversion from 'int' to 'short' changes value from 65535 to -1 [-Werror,-Wconstant-conversion] FPU_REG const CONST_QNaN = MAKE_REG(NEG, EXP_OVER, 0x00000000, 0xC0000000); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/x86/math-emu/reg_constant.c:21:25: note: expanded from macro 'MAKE_REG' ((EXTENDED_Ebias+(e)) | ((SIGN_##s != 0)*0x8000)) } ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ The code is correct as is, so add a typecast to shut up the warnings. Signed-off-by: Arnd Bergmann Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20190712090816.350668-1-arnd@arndb.de arch/x86/math-emu/fpu_emu.h | 2 +- arch/x86/math-emu/reg_constant.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 0a8ad0ffa4d80a544f6cbff703bf6394339afcdf Merge: a18f8775419d e65682b55956 Author: Linus Torvalds Date: Tue Jul 16 15:15:29 2019 -0700 Merge tag 'for-linus-5.3-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux Pull orangefs updates from Mike Marshall: "Two small fixes. This is just a fix for an unused value that Colin King sent me and a related fix I added" * tag 'for-linus-5.3-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux: orangefs: eliminate needless variable assignments orangefs: remove redundant assignment to variable buffer_index commit a18f8775419d3df282dd83efdb51c5a64d092f31 Merge: 3eb514866f20 e02d48eaaed7 Author: Linus Torvalds Date: Tue Jul 16 15:12:56 2019 -0700 Merge tag 'for-5.3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs updates from David Sterba: "Highlights: - chunks that have been trimmed and unchanged since last mount are tracked and skipped on repeated trims - use hw assissed crc32c on more arches, speedups if native instructions or optimized implementation is available - the RAID56 incompat bit is automatically removed when the last block group of that type is removed Fixes: - fsync fix for reflink on NODATACOW files that could lead to ENOSPC - fix data loss after inode eviction, renaming it, and fsync it - fix fsync not persisting dentry deletions due to inode evictions - update ctime/mtime/iversion after hole punching - fix compression type validation (reported by KASAN) - send won't be allowed to start when relocation is in progress, this can cause spurious errors or produce incorrect send stream Core: - new tracepoints for space update - tree-checker: better check for end of extents for some tree items - preparatory work for more checksum algorithms - run delayed iput at unlink time and don't push the work to cleaner thread where it's not properly throttled - wrap block mapping to structures and helpers, base for further refactoring - split large files, part 1: - space info handling - block group reservations - delayed refs - delayed allocation - other cleanups and refactoring" * tag 'for-5.3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: (103 commits) btrfs: fix memory leak of path on error return path btrfs: move the subvolume reservation stuff out of extent-tree.c btrfs: migrate the delalloc space stuff to it's own home btrfs: migrate btrfs_trans_release_chunk_metadata btrfs: migrate the delayed refs rsv code btrfs: Evaluate io_tree in find_lock_delalloc_range() btrfs: migrate the global_block_rsv helpers to block-rsv.c btrfs: migrate the block-rsv code to block-rsv.c btrfs: stop using block_rsv_release_bytes everywhere btrfs: cleanup the target logic in __btrfs_block_rsv_release btrfs: export __btrfs_block_rsv_release btrfs: export btrfs_block_rsv_add_bytes btrfs: move btrfs_block_rsv definitions into it's own header btrfs: Simplify update of space_info in __reserve_metadata_bytes() btrfs: unexport can_overcommit btrfs: move reserve_metadata_bytes and supporting code to space-info.c btrfs: move dump_space_info to space-info.c btrfs: export block_rsv_use_bytes btrfs: move btrfs_space_info_add_*_bytes to space-info.c btrfs: move the space info update macro to space-info.h ... commit 3eb514866f20c5eb74637279774b6d73b855480a Merge: c309b6f24222 24a20b0a443f Author: Linus Torvalds Date: Tue Jul 16 15:07:51 2019 -0700 Merge tag 'arc-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc Pull ARC updates from Vineet Gupta: - long due rewrite of do_page_fault - refactoring of entry/exit code to utilize the double load/store instructions - hsdk platform updates * tag 'arc-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: ARC: [plat-hsdk]: Enable AXI DW DMAC in defconfig ARC: [plat-hsdk]: enable DW SPI controller ARC: hide unused function unw_hdr_alloc ARC: [haps] Add Virtio support ARCv2: entry: simplify return to Delay Slot via interrupt ARC: entry: EV_Trap expects r10 (vs. r9) to have exception cause ARCv2: entry: rewrite to enable use of double load/stores LDD/STD ARCv2: entry: avoid a branch ARCv2: entry: push out the Z flag unclobber from common EXCEPTION_PROLOGUE ARCv2: entry: comments about hardware auto-save on taken interrupts ARC: mm: do_page_fault refactor #8: release mmap_sem sooner ARC: mm: do_page_fault refactor #7: fold the various error handling ARC: mm: do_page_fault refactor #6: error handlers to use same pattern ARC: mm: do_page_fault refactor #5: scoot no_context to end ARC: mm: do_page_fault refactor #4: consolidate retry related logic ARC: mm: do_page_fault refactor #3: tidyup vma access permission code ARC: mm: do_page_fault refactor #2: remove short lived variable ARC: mm: do_page_fault refactor #1: remove label @good_area commit a5b647007e9d794956dbed9339a3354a9fc4d5c3 Author: Vedang Patel Date: Tue Jul 16 12:52:18 2019 -0700 fix: taprio: Change type of txtime-delay parameter to u32 During the review of the iproute2 patches for txtime-assist mode, it was pointed out that it does not make sense for the txtime-delay parameter to be negative. So, change the type of the parameter from s32 to u32. Fixes: 4cfd5779bd6e ("taprio: Add support for txtime-assist mode") Reported-by: Stephen Hemminger Signed-off-by: Vedang Patel Signed-off-by: David S. Miller include/uapi/linux/pkt_sched.h | 2 +- net/sched/sch_taprio.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit f709f81483d652b4ae5bbda2204b95593ce07c8f Author: Yi Wang Date: Mon Jul 15 10:47:09 2019 +0800 x86/e820: Use proper booleans instead of 0/1 This fixes the following coccinelle warning: ./arch/x86/kernel/e820.c:89:9-10: WARNING: return of 0/1 in function '_e820__mapped_any' with return type bool Return type bool instead of 0/1. Signed-off-by: Yi Wang Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/1563158829-44373-1-git-send-email-wang.yi59@zte.com.cn arch/x86/kernel/e820.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ec6335586953b0df32f83ef696002063090c7aef Author: Qian Cai Date: Mon Jul 8 17:36:45 2019 -0400 x86/apic: Silence -Wtype-limits compiler warnings There are many compiler warnings like this, In file included from ./arch/x86/include/asm/smp.h:13, from ./arch/x86/include/asm/mmzone_64.h:11, from ./arch/x86/include/asm/mmzone.h:5, from ./include/linux/mmzone.h:969, from ./include/linux/gfp.h:6, from ./include/linux/mm.h:10, from arch/x86/kernel/apic/io_apic.c:34: arch/x86/kernel/apic/io_apic.c: In function 'check_timer': ./arch/x86/include/asm/apic.h:37:11: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] if ((v) <= apic_verbosity) \ ^~ arch/x86/kernel/apic/io_apic.c:2160:2: note: in expansion of macro 'apic_printk' apic_printk(APIC_QUIET, KERN_INFO "..TIMER: vector=0x%02X " ^~~~~~~~~~~ ./arch/x86/include/asm/apic.h:37:11: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] if ((v) <= apic_verbosity) \ ^~ arch/x86/kernel/apic/io_apic.c:2207:4: note: in expansion of macro 'apic_printk' apic_printk(APIC_QUIET, KERN_ERR "..MP-BIOS bug: " ^~~~~~~~~~~ APIC_QUIET is 0, so silence them by making apic_verbosity type int. Signed-off-by: Qian Cai Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/1562621805-24789-1-git-send-email-cai@lca.pw arch/x86/include/asm/apic.h | 2 +- arch/x86/kernel/apic/apic.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit ffdb07f31252625b7bcbf1f424d7beccff02ba97 Author: David Rientjes Date: Wed Jul 10 13:19:35 2019 -0700 x86/mm: Free sme_early_buffer after init The contents of sme_early_buffer should be cleared after __sme_early_enc_dec() because it is used to move encrypted and decrypted data, but since __sme_early_enc_dec() is __init this buffer simply can be freed after init. This saves a page that is otherwise unreferenced after init. Reported-by: Cfir Cohen Signed-off-by: David Rientjes Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/alpine.DEB.2.21.1907101318170.197432@chino.kir.corp.google.com arch/x86/mm/mem_encrypt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e74bd96989dd42a51a73eddb4a5510a6f5e42ac3 Author: David Rientjes Date: Tue Jul 9 19:44:03 2019 -0700 x86/boot: Fix memory leak in default_get_smp_config() When default_get_smp_config() is called with early == 1 and mpf->feature1 is non-zero, mpf is leaked because the return path does not do early_memunmap(). Fix this and share a common exit routine. Fixes: 5997efb96756 ("x86/boot: Use memremap() to map the MPF and MPC data") Reported-by: Cfir Cohen Signed-off-by: David Rientjes Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/alpine.DEB.2.21.1907091942570.28240@chino.kir.corp.google.com arch/x86/kernel/mpparse.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit db8051f30fbab7f579d691137f1e23f3bb1ac2eb Author: Qian Cai Date: Tue Jul 16 11:43:05 2019 -0400 skbuff: fix compilation warnings in skb_dump() The commit 6413139dfc64 ("skbuff: increase verbosity when dumping skb data") introduced a few compilation warnings. net/core/skbuff.c:766:32: warning: format specifies type 'unsigned short' but the argument has type 'unsigned int' [-Wformat] level, sk->sk_family, sk->sk_type, sk->sk_protocol); ^~~~~~~~~~~ net/core/skbuff.c:766:45: warning: format specifies type 'unsigned short' but the argument has type 'unsigned int' [-Wformat] level, sk->sk_family, sk->sk_type, sk->sk_protocol); ^~~~~~~~~~~~~~~ Fix them by using the proper types. Fixes: 6413139dfc64 ("skbuff: increase verbosity when dumping skb data") Signed-off-by: Qian Cai Reviewed-by: Nathan Chancellor Acked-by: Willem de Bruijn Signed-off-by: David S. Miller net/core/skbuff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4914da2fb0c89205790503f20dfdde854f3afdd8 Author: Takashi Iwai Date: Tue Jul 16 08:56:51 2019 +0200 ALSA: hda - Don't resume forcibly i915 HDMI/DP codec We apply the codec resume forcibly at system resume callback for updating and syncing the jack detection state that may have changed during sleeping. This is, however, superfluous for the codec like Intel HDMI/DP, where the jack detection is managed via the audio component notification; i.e. the jack state change shall be reported sooner or later from the graphics side at mode change. This patch changes the codec resume callback to avoid the forcible resume conditionally with a new flag, codec->relaxed_resume, for reducing the resume time. The flag is set in the codec probe. Although this doesn't fix the entire bug mentioned in the bugzilla entry below, it's still a good optimization and some improvements are seen. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=201901 Cc: Signed-off-by: Takashi Iwai include/sound/hda_codec.h | 2 ++ sound/pci/hda/hda_codec.c | 8 ++++++-- sound/pci/hda/patch_hdmi.c | 6 +++++- 3 files changed, 13 insertions(+), 3 deletions(-) commit 9087c37584fb7d8315877bb55f85e4268cc0b4f4 Author: Tom Lendacky Date: Wed Jul 10 19:01:19 2019 +0000 dma-direct: Force unencrypted DMA under SME for certain DMA masks If a device doesn't support DMA to a physical address that includes the encryption bit (currently bit 47, so 48-bit DMA), then the DMA must occur to unencrypted memory. SWIOTLB is used to satisfy that requirement if an IOMMU is not active (enabled or configured in passthrough mode). However, commit fafadcd16595 ("swiotlb: don't dip into swiotlb pool for coherent allocations") modified the coherent allocation support in SWIOTLB to use the DMA direct coherent allocation support. When an IOMMU is not active, this resulted in dma_alloc_coherent() failing for devices that didn't support DMA addresses that included the encryption bit. Addressing this requires changes to the force_dma_unencrypted() function in kernel/dma/direct.c. Since the function is now non-trivial and SME/SEV specific, update the DMA direct support to add an arch override for the force_dma_unencrypted() function. The arch override is selected when CONFIG_AMD_MEM_ENCRYPT is set. The arch override function resides in the arch/x86/mm/mem_encrypt.c file and forces unencrypted DMA when either SEV is active or SME is active and the device does not support DMA to physical addresses that include the encryption bit. Fixes: fafadcd16595 ("swiotlb: don't dip into swiotlb pool for coherent allocations") Suggested-by: Christoph Hellwig Signed-off-by: Tom Lendacky Acked-by: Thomas Gleixner [hch: moved the force_dma_unencrypted declaration to dma-mapping.h, fold the s390 fix from Halil Pasic] Signed-off-by: Christoph Hellwig arch/s390/Kconfig | 1 + arch/s390/mm/init.c | 7 ++++++- arch/x86/Kconfig | 1 + arch/x86/mm/mem_encrypt.c | 30 ++++++++++++++++++++++++++++++ include/linux/dma-direct.h | 9 +++++++++ kernel/dma/Kconfig | 3 +++ kernel/dma/direct.c | 16 ++++------------ 7 files changed, 54 insertions(+), 13 deletions(-) commit d72e04d97efdd518514018bf96169bf68922eed6 Author: Nathan Chancellor Date: Wed Jul 3 22:52:17 2019 -0700 drm/amd/powerplay: Use proper enums in vega20_print_clk_levels clang warns: drivers/gpu/drm/amd/amdgpu/../powerplay/vega20_ppt.c:995:39: warning: implicit conversion from enumeration type 'PPCLK_e' to different enumeration type 'enum smu_clk_type' [-Wenum-conversion] ret = smu_get_current_clk_freq(smu, PPCLK_SOCCLK, &now); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../powerplay/vega20_ppt.c:1016:39: warning: implicit conversion from enumeration type 'PPCLK_e' to different enumeration type 'enum smu_clk_type' [-Wenum-conversion] ret = smu_get_current_clk_freq(smu, PPCLK_FCLK, &now); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../powerplay/vega20_ppt.c:1031:39: warning: implicit conversion from enumeration type 'PPCLK_e' to different enumeration type 'enum smu_clk_type' [-Wenum-conversion] ret = smu_get_current_clk_freq(smu, PPCLK_DCEFCLK, &now); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ The values are mapped one to one in vega20_get_smu_clk_index so just use the proper enums here. Fixes: 096761014227 ("drm/amd/powerplay: support sysfs to get socclk, fclk, dcefclk") Link: https://github.com/ClangBuiltLinux/linux/issues/587 Reviewed-by: Evan Quan Signed-off-by: Nathan Chancellor Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 08473888e09b0136ceb4d65784b02b537d977a2a Author: Nicolai Hähnle Date: Tue Jul 16 13:11:22 2019 -0500 drm/amdgpu/gfx10: set SH_MEM_CONFIG.INITIAL_INST_PREFETCH Prefetch mode 0 is not supported and can lead to hangs with certain very specific code patterns. Set a sound prefetch mode for all VMIDs rather than forcing all shaders to set the prefetch mode at the beginning. Reduce code duplication a bit while we're at it. Note that the 64-bit address mode enum and the retry all enum are both 0, so the only functional change is in the INITIAL_INST_PREFETCH field. Signed-off-by: Nicolai Hähnle Reviewed-by: Marek Olšák Acked-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) commit 597292eb73eefe4e48f9f72640955813d59b733a Author: Kenneth Feng Date: Tue Jul 16 15:01:31 2019 +0800 drm/amd/powerplay: enable fw ctf,apcc dfll and gfx ss enable fw ctf, apcc dfll and gfx ss on navi10. fw ctf: when the fw ctf is triggered, the gfx and soc power domain are shut down. fan speed is boosted to the maximum. gfx ss: hardware feature, sanity check has been done. apcc dfll: can check the scoreboard in smu fw to confirm if it's enabled. no need to do further check since the gfx hardware control the frequency once a pcc signal comes. Signed-off-by: Kenneth Feng Reviewed-by: Evan Quan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit f216994613bc9f44202eac3a298e52124eb3e35e Author: Hawking Zhang Date: Tue Jul 16 13:48:19 2019 +0800 drm/amdgpu: check kdb_bin_size to exclude kdb loading sequence The legacy navi10 sos binary will not carry on kdb image. the kdb_start_addr is actually the start address of sys_drv image and shouldn't be sent to psp bootloader. Signed-off-by: Hawking Zhang Reviewed-by: John Clements Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9288b874c5006a22d1fbff303b812cb03241cdfb Author: Felix Kuehling Date: Sat Jul 13 02:35:37 2019 -0400 drm/amdgpu: Fix unaligned memory copies When starting a new mm_node, the page_offset becomes 0. Signed-off-by: Felix Kuehling Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 ++ 1 file changed, 2 insertions(+) commit 7429c6c0d9cb086d8e79f0d2a48ae14851d2115e Author: Benjamin Poirier Date: Tue Jul 16 17:16:55 2019 +0900 be2net: Signal that the device cannot transmit during reconfiguration While changing the number of interrupt channels, be2net stops adapter operation (including netif_tx_disable()) but it doesn't signal that it cannot transmit. This may lead dev_watchdog() to falsely trigger during that time. Add the missing call to netif_carrier_off(), following the pattern used in many other drivers. netif_carrier_on() is already taken care of in be_open(). Signed-off-by: Benjamin Poirier Signed-off-by: David S. Miller drivers/net/ethernet/emulex/benet/be_main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit cf36dd2f7793e8b2723e3eca518fff1be840a297 Author: Nishka Dasgupta Date: Tue Jul 16 11:25:04 2019 +0530 net: ethernet: mediatek: mtk_eth_soc: Add of_node_put() before goto Each iteration of for_each_child_of_node puts the previous node, but in the case of a goto from the middle of the loop, there is no put, thus causing a memory leak. Hence add an of_node_put before the goto. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 64fc973dee130019b86f2c4634a10d7a3158687e Author: Nishka Dasgupta Date: Tue Jul 16 11:22:19 2019 +0530 net: ethernet: mscc: ocelot_board: Add of_node_put() before return Each iteration of for_each_available_child_of_node puts the previous node, but in the case of a return from the middle of the loop, there is no put, thus causing a memory leak. Hence add an of_node_put before the return in two places. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: David S. Miller drivers/net/ethernet/mscc/ocelot_board.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 3cd6e20f54d5003ea895717b67017397056749ce Author: Nishka Dasgupta Date: Tue Jul 16 11:18:43 2019 +0530 net: ethernet: ti: cpsw: Add of_node_put() before return and break Each iteration of for_each_available_child_of_node puts the previous node, but in the case of a return or break from the middle of the loop, there is no put, thus causing a memory leak. Hence, for function cpsw_probe_dt, create an extra label err_node_put that puts the last used node and returns ret; modify the return statements in the loop to save the return value in ret and goto this new label. For function cpsw_remove_dt, add an of_node_put before the break. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) commit c309b6f24222246c18a8b65d3950e6e755440865 Merge: 3e859477a1db 168869492e70 Author: Linus Torvalds Date: Tue Jul 16 12:21:41 2019 -0700 Merge tag 'docs/v5.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull rst conversion of docs from Mauro Carvalho Chehab: "As agreed with Jon, I'm sending this big series directly to you, c/c him, as this series required a special care, in order to avoid conflicts with other trees" * tag 'docs/v5.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (77 commits) docs: kbuild: fix build with pdf and fix some minor issues docs: block: fix pdf output docs: arm: fix a breakage with pdf output docs: don't use nested tables docs: gpio: add sysfs interface to the admin-guide docs: locking: add it to the main index docs: add some directories to the main documentation index docs: add SPDX tags to new index files docs: add a memory-devices subdir to driver-api docs: phy: place documentation under driver-api docs: serial: move it to the driver-api docs: driver-api: add remaining converted dirs to it docs: driver-api: add xilinx driver API documentation docs: driver-api: add a series of orphaned documents docs: admin-guide: add a series of orphaned documents docs: cgroup-v1: add it to the admin-guide book docs: aoe: add it to the driver-api book docs: add some documentation dirs to the driver-api book docs: driver-model: move it to the driver-api book docs: lp855x-driver.rst: add it to the driver-api book ... commit 3e859477a1db52a0435d06a55fdb54f62d69c292 Merge: 1ec4013bab89 775f1f7eaced Author: Linus Torvalds Date: Tue Jul 16 12:17:07 2019 -0700 Merge tag 'xtensa-20190715' of git://github.com/jcmvbkbc/linux-xtensa Pull Xtensa updates from Max Filippov: - clean up PCI support code - add defconfig and DTS for the 'virt' board - abstract 'entry' and 'retw' uses in xtensa assembly in preparation for XEA3/NX pipeline support - random small cleanups * tag 'xtensa-20190715' of git://github.com/jcmvbkbc/linux-xtensa: xtensa: virt: add defconfig and DTS xtensa: abstract 'entry' and 'retw' in assembly code xtensa: One function call less in bootmem_init() xtensa: remove arch/xtensa/include/asm/types.h xtensa: use generic pcibios_set_master and pcibios_enable_device xtensa: drop dead PCI support code xtensa/PCI: Remove unused variable commit 0aeb1def44169cbe7119f26cf10b974a2046142e Author: Cong Wang Date: Sat May 25 09:58:01 2019 -0700 tracing: Make trace_get_fields() global trace_get_fields() is the only way to read tracepoint fields at run time, as their fields are defined at compile-time with macros. Make this function visible to all users and it will be used by trace event injection code to calculate the size of a tracepoint entry. Link: http://lkml.kernel.org/r/20190525165802.25944-4-xiyou.wangcong@gmail.com Cc: Ingo Molnar Signed-off-by: Cong Wang Signed-off-by: Steven Rostedt (VMware) include/linux/trace_events.h | 8 ++++++++ kernel/trace/trace_events.c | 8 -------- 2 files changed, 8 insertions(+), 8 deletions(-) commit 5967bd5c4239be449744a1471daf60c866486c24 Author: Cong Wang Date: Sat May 25 09:58:00 2019 -0700 tracing: Let filter_assign_type() detect FILTER_PTR_STRING filter_assign_type() could detect dynamic string and static string, but not string pointers. Teach filter_assign_type() to detect string pointers, and this will be needed by trace event injection code. BTW, trace event hist uses FILTER_PTR_STRING too. Link: http://lkml.kernel.org/r/20190525165802.25944-3-xiyou.wangcong@gmail.com Cc: Ingo Molnar Signed-off-by: Cong Wang Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events_filter.c | 3 +++ 1 file changed, 3 insertions(+) commit 46710f3a34b592ac5c51a95f696b2d2a2a0d9419 Author: Cong Wang Date: Sat May 25 09:57:59 2019 -0700 tracing: Pass type into tracing_generic_entry_update() All callers of tracing_generic_entry_update() have to initialize entry->type, so let's just simply move it inside. Link: http://lkml.kernel.org/r/20190525165802.25944-2-xiyou.wangcong@gmail.com Cc: Ingo Molnar Signed-off-by: Cong Wang Signed-off-by: Steven Rostedt (VMware) include/linux/trace_events.h | 1 + kernel/trace/trace.c | 8 ++++---- kernel/trace/trace_event_perf.c | 3 +-- 3 files changed, 6 insertions(+), 6 deletions(-) commit 6e55f320f00e4db7144a4906dd8ac53701891e31 Author: Steven Rostedt (VMware) Date: Wed Jul 3 15:46:08 2019 -0400 ftrace/selftest: Test if set_event/ftrace_pid exists before writing While testing on a very old kernel (3.5), the tests failed because the write to set_event_pid in the setup code, did not exist. The tests themselves could pass, but the setup failed causing an error. Other files test for existance before writing to them. Do the same for set_event_pid and set_ftrace_pid. Acked-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) tools/testing/selftests/ftrace/test.d/functions | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cbd965bde74c3d0e53798404fd4b9829a68ccec8 Author: Steven Rostedt (VMware) Date: Wed Jul 3 14:40:42 2019 -0400 ftrace/selftests: Return the skip code when tracing directory not configured in kernel If the kernel is not configured with ftrace enabled, the ftracetest selftests should return the error code of "4" as that is the kselftests "skip" code, and not "1" which means an error. To determine if ftrace is enabled, first the newer "tracefs" is searched for in /proc/mounts. If it is not found, then "debugfs" is searched for (as old kernels do not have tracefs). If that is not found, an attempt to mount the tracefs or debugfs is performed. This is done by seeing first if the /sys/kernel/tracing directory exists. If it does than tracefs is configured in the kernel and an attempt to mount it is performed. If /sys/kernel/tracing does not exist, then /sys/kernel/debug is tested to see if that directory exists. If it does, then an attempt to mount debugfs on that directory is performed. If it does not exist, then debugfs is not configured in the running kernel and the test exits with the skip code. If either mount fails, then a normal error is returned as they do exist in the kernel but something went wrong to mount them. This changes the test to always try the tracefs file system first as it has been in the kernel for some time now and it is better to test it if it is available instead of always testing debugfs. Link: http://lkml.kernel.org/r/20190702062358.7330-1-po-hsu.lin@canonical.com Reported-by: Po-Hsu Lin Acked-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) tools/testing/selftests/ftrace/ftracetest | 38 ++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 6 deletions(-) commit 715fa2fd4c6c3e9165659ac26a582b8a2e607b93 Author: Masami Hiramatsu Date: Sat Jun 1 00:18:07 2019 +0900 tracing/kprobe: Check registered state using kprobe Change registered check only by trace_kprobe and remove TP_FLAG_REGISTERED from trace_probe, since this feature is only used for trace_kprobe. Link: http://lkml.kernel.org/r/155931588704.28323.4952266828256245833.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_kprobe.c | 23 +++++++++++++++-------- kernel/trace/trace_probe.h | 6 ------ 2 files changed, 15 insertions(+), 14 deletions(-) commit e3dc9f898ef9c6a1a96378517573ee2d04d0abcc Author: Masami Hiramatsu Date: Sat Jun 1 00:17:57 2019 +0900 tracing/probe: Add trace_event_call accesses APIs Add trace_event_call access APIs for trace_probe. Instead of accessing trace_probe.call directly, use those accesses by trace_probe_event_call() method. This hides the relationship of trace_event_call and trace_probe from trace_kprobe and trace_uprobe. Link: http://lkml.kernel.org/r/155931587711.28323.8335129014686133120.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_kprobe.c | 23 ++++++++++++----------- kernel/trace/trace_probe.c | 24 ++++++++++++++---------- kernel/trace/trace_probe.h | 6 ++++++ kernel/trace/trace_uprobe.c | 15 ++++++++------- 4 files changed, 40 insertions(+), 28 deletions(-) commit b55ce203a8f327b623688c8fb551ac3f9781edea Author: Masami Hiramatsu Date: Sat Jun 1 00:17:47 2019 +0900 tracing/probe: Add probe event name and group name accesses APIs Add trace_probe_name() and trace_probe_group_name() functions for accessing probe name and group name of trace_probe. Link: http://lkml.kernel.org/r/155931586717.28323.8738615064952254761.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_kprobe.c | 24 ++++++++++++------------ kernel/trace/trace_probe.h | 10 ++++++++++ kernel/trace/trace_uprobe.c | 22 +++++++++++----------- 3 files changed, 33 insertions(+), 23 deletions(-) commit 747774d6b018ca02493fd3f321624dfce749da61 Author: Masami Hiramatsu Date: Sat Jun 1 00:17:37 2019 +0900 tracing/probe: Add trace flag access APIs for trace_probe Add trace_probe_test/set/clear_flag() functions for accessing trace_probe.flag field. This flags field should not be accessed directly. Link: http://lkml.kernel.org/r/155931585683.28323.314290023236905988.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_kprobe.c | 20 ++++++++++---------- kernel/trace/trace_probe.c | 4 ++-- kernel/trace/trace_probe.h | 22 ++++++++++++++++++++-- kernel/trace/trace_uprobe.c | 18 +++++++++--------- 4 files changed, 41 insertions(+), 23 deletions(-) commit b5f935ee133911b3ed2d4429dd86d2bd5385519d Author: Masami Hiramatsu Date: Sat Jun 1 00:17:26 2019 +0900 tracing/probe: Add trace_event_file access APIs for trace_probe Add trace_event_file access APIs for trace_probe data structure. This simplifies enabling/disabling operations in uprobe and kprobe events so that those don't touch deep inside the trace_probe. This also removing a redundant synchronization when the kprobe event is used from perf, since the perf itself uses tracepoint_synchronize_unregister() after disabling (ftrace- defined) event, thus we don't have to synchronize in that path. Also we don't need to identify local trace_kprobe too anymore. Link: http://lkml.kernel.org/r/155931584587.28323.372301976283354629.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_kprobe.c | 85 ++++++++++++++++----------------------------- kernel/trace/trace_probe.c | 47 +++++++++++++++++++++++++ kernel/trace/trace_probe.h | 36 ++++++++++--------- kernel/trace/trace_uprobe.c | 42 +++++++--------------- 4 files changed, 109 insertions(+), 101 deletions(-) commit 46e5376d404d14cb321f5d4e446fe3fb6d8a93ab Author: Masami Hiramatsu Date: Sat Jun 1 00:17:16 2019 +0900 tracing/probe: Add trace_event_call register API for trace_probe Since trace_event_call is a field of trace_probe, these operations should be done in trace_probe.c. trace_kprobe and trace_uprobe use new functions to register/unregister trace_event_call. Link: http://lkml.kernel.org/r/155931583643.28323.14828411185591538876.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_kprobe.c | 20 +++----------------- kernel/trace/trace_probe.c | 16 ++++++++++++++++ kernel/trace/trace_probe.h | 6 ++++++ kernel/trace/trace_uprobe.c | 22 +++------------------- 4 files changed, 28 insertions(+), 36 deletions(-) commit 455b289973f7df350ea179c7eb8bfed0c766ec40 Author: Masami Hiramatsu Date: Sat Jun 1 00:17:06 2019 +0900 tracing/probe: Add trace_probe init and free functions Add common trace_probe init and cleanup function in trace_probe.c, and use it from trace_kprobe.c and trace_uprobe.c Link: http://lkml.kernel.org/r/155931582664.28323.5934870189034740822.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_kprobe.c | 49 ++++++++++++--------------------------------- kernel/trace/trace_probe.c | 36 +++++++++++++++++++++++++++++++++ kernel/trace/trace_probe.h | 4 ++++ kernel/trace/trace_uprobe.c | 27 +++++-------------------- 4 files changed, 58 insertions(+), 58 deletions(-) commit b4d4b96be89466049a0d383d019edc1403bf0ba9 Author: Masami Hiramatsu Date: Sat Jun 1 00:16:56 2019 +0900 tracing/uprobe: Set print format when parsing command Set event call's print format right after parsed command for simplifying (un)register_uprobe_event(). Link: http://lkml.kernel.org/r/155931581659.28323.5404667166417404076.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_uprobe.c | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) commit f730e0f2da4d0035775ab3c85757fee37bb9cbbe Author: Masami Hiramatsu Date: Sat Jun 1 00:16:46 2019 +0900 tracing/kprobe: Set print format right after parsed command Set event call's print format right after parsed command for simplifying (un)register_kprobe_event(). Link: http://lkml.kernel.org/r/155931580625.28323.5158822928646225903.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_kprobe.c | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) commit 65fc965c708c90b8c8b2cea980db0618333dd7fe Author: Masami Hiramatsu Date: Mon Jun 3 22:04:42 2019 +0900 kprobes: Fix to init kprobes in subsys_initcall Since arm64 kernel initializes breakpoint trap vector in arch_initcall(), initializing kprobe (and run smoke test) in postcore_initcall() causes a kernel panic. To fix this issue, move the kprobe initialization in subsys_initcall() (which is called right afer the arch_initcall). In-kernel kprobe users (ftrace and bpf) are using fs_initcall() which is called after subsys_initcall(), so this shouldn't cause more problem. Link: http://lkml.kernel.org/r/155956708268.12228.10363800793132214198.stgit@devnote2 Link: http://lkml.kernel.org/r/20190709153755.GB10123@lakrids.cambridge.arm.com Reported-by: Anders Roxell Fixes: b5f8b32c93b2 ("kprobes: Initialize kprobes at postcore_initcall") Tested-by: Anders Roxell Tested-by: Mark Rutland Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) kernel/kprobes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1ec4013bab89058dcc594dfe7b5a20f5d46bbc5f Merge: 3c69914b4c7b e10337daefec Author: Linus Torvalds Date: Tue Jul 16 11:49:58 2019 -0700 Merge tag 'safesetid-5.3' of git://github.com/micah-morton/linux Pull safesetid updates from Micah Morton: "These changes from Jann Horn fix a couple issues in the recently added SafeSetID LSM: - There was a simple logic bug in one of the hooks for the LSM where the code was incorrectly returning early in some cases before all security checks had been passed. - There was a more high level issue with how this LSM gets configured that could allow for a program to bypass the security restrictions by switching to an allowed UID and then again to any other UID on the system if the target UID of the first transition is unconstrained on the system. Luckily this is an easy fix that we now enforce at the time the LSM gets configured. There are also some changes from Jann that make policy updates for this LSM atomic. Kees Cook, Jann and myself have reviewed these changes and they look good from our point of view" * tag 'safesetid-5.3' of git://github.com/micah-morton/linux: LSM: SafeSetID: fix use of literal -1 in capable hook LSM: SafeSetID: verify transitive constrainedness LSM: SafeSetID: add read handler LSM: SafeSetID: rewrite userspace API to atomic updates LSM: SafeSetID: fix userns handling in securityfs LSM: SafeSetID: refactor policy parsing LSM: SafeSetID: refactor safesetid_security_capable() LSM: SafeSetID: refactor policy hash table LSM: SafeSetID: fix check for setresuid(new1, new2, new3) LSM: SafeSetID: fix pr_warn() to include newline commit 3c69914b4c7b0b72ff0275c14743778057ee8a6e Merge: 2954152298c3 69b53720e92c Author: Linus Torvalds Date: Tue Jul 16 11:30:07 2019 -0700 Merge tag 'for-linus-20190715' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux Pull pidfd and clone3 fixes from Christian Brauner: "This contains a bugfix for CLONE_PIDFD when used with the legacy clone syscall, two fixes to ensure that syscall numbering and clone3 entrypoint implementations will stay consistent, and an update for the maintainers file: - The addition of clone3 broke CLONE_PIDFD for legacy clone on all architectures that use do_fork() directly instead of calling the clone syscall itself. (Fwiw, cleaning do_fork() up is on my todo.) The reason this happened was that during conversion of _do_fork() to use struct kernel_clone_args we missed that do_fork() is called directly by various architectures. This is fixed by making sure that the pidfd argument in struct kernel_clone_args is correctly initialized with the parent_tidptr argument passed down from do_fork(). Additionally, do_fork() missed a check to make CLONE_PIDFD and CLONE_PARENT_SETTID mutually exclusive just a clone() does. This is now fixed too. - When clone3() was introduced we skipped architectures that require special handling for fork-like syscalls. Their syscall tables did not contain any mention of clone3(). To make sure that Arnd's work to make syscall numbers on all architectures identical (minus alpha) was not for naught we are placing a comment in all syscall tables that do not yet implement clone3(). The comment makes it clear that 435 is reserved for clone3 and should not be used. - Also, this contains a patch to make the clone3() syscall definition in asm-generic/unist.h conditional on __ARCH_WANT_SYS_CLONE3. This lets us catch new architectures that implicitly make use of clone3 without setting __ARCH_WANT_SYS_CLONE3 which is a good indicator that they did not check whether it needs special treatment or not. - Finally, this contains a patch to add me as maintainer for pidfd stuff so people can start blaming me (more)" * tag 'for-linus-20190715' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux: MAINTAINERS: add new entry for pidfd api unistd: protect clone3 via __ARCH_WANT_SYS_CLONE3 arch: mark syscall number 435 reserved for clone3 clone: fix CLONE_PIDFD support commit aa2ba991c4206d5b778dcaa7b4997396e79f8e90 Author: Hans de Goede Date: Fri Jul 12 13:27:08 2019 +0200 ASoC: Intel: bytcht_es8316: Add quirk for Irbis NB41 netbook The Irbis NB41 netbook has its internal mic on IN2, inverted jack-detect and stereo speakers, add a quirk for this. Cc: russianneuromancer@ya.ru Reported-and-tested-by: russianneuromancer@ya.ru Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20190712112708.25327-1-hdegoede@redhat.com Signed-off-by: Mark Brown sound/soc/intel/boards/bytcht_es8316.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 2abee12c0ab1924a69993d2c063a39a952e7d836 Author: Wen Yang Date: Sat Jul 13 11:46:15 2019 +0800 ASoC: samsung: odroid: fix a double-free issue for cpu_dai The cpu_dai variable is still being used after the of_node_put() call, which may result in double-free: of_node_put(cpu_dai); ---> released here ret = devm_snd_soc_register_card(dev, card); if (ret < 0) { ... goto err_put_clk_i2s; --> jump to err_put_clk_i2s ... err_put_clk_i2s: clk_put(priv->clk_i2s_bus); err_put_sclk: clk_put(priv->sclk_i2s); err_put_cpu_dai: of_node_put(cpu_dai); --> double-free here Fixes: d832d2b246c5 ("ASoC: samsung: odroid: Fix of_node refcount unbalance") Signed-off-by: Wen Yang Cc: Krzysztof Kozlowski Cc: Sangbeom Kim Cc: Sylwester Nawrocki Cc: Liam Girdwood Cc: Mark Brown Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: alsa-devel@alsa-project.org Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/1562989575-33785-3-git-send-email-wen.yang99@zte.com.cn Signed-off-by: Mark Brown sound/soc/samsung/odroid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9b6d104a6b150bd4d3e5b039340e1f6b20c2e3c1 Author: Wen Yang Date: Sat Jul 13 11:46:14 2019 +0800 ASoC: samsung: odroid: fix an use-after-free issue for codec The codec variable is still being used after the of_node_put() call, which may result in use-after-free. Fixes: bc3cf17b575a ("ASoC: samsung: odroid: Add support for secondary CPU DAI") Signed-off-by: Wen Yang Cc: Krzysztof Kozlowski Cc: Sangbeom Kim Cc: Sylwester Nawrocki Cc: Liam Girdwood Cc: Mark Brown Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: alsa-devel@alsa-project.org Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/1562989575-33785-2-git-send-email-wen.yang99@zte.com.cn Signed-off-by: Mark Brown sound/soc/samsung/odroid.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 8f46e22b5ac692b48d04bb722547ca17b66dda02 Author: Jernej Skrabec Date: Sat Jul 13 11:07:17 2019 +0200 regulator: axp20x: fix DCDC5 and DCDC6 for AXP803 Refactoring of axp20x driver introduced a bug in AXP803's DCDC6 regulator definition. AXP803_DCDC6_1120mV_STEPS was obtained by subtracting 0x47 and 0x33. This should be 0x14 (hex) and not 14 (dec). Refactoring also carried over a bug in DCDC5 regulator definition. Number of possible voltages must be for 1 bigger than maximum valid voltage index, because 0 is also valid and it means lowest voltage. Fixes: 1dbe0ccb0631 ("regulator: axp20x-regulator: add support for AXP803") Fixes: db4a555f7c4c ("regulator: axp20x: use defines for masks") Signed-off-by: Jernej Skrabec Link: https://lore.kernel.org/r/20190713090717.347-3-jernej.skrabec@siol.net Signed-off-by: Mark Brown drivers/regulator/axp20x-regulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1ef55fed9219963359a7b3bc7edca8517c6e45ac Author: Jernej Skrabec Date: Sat Jul 13 11:07:16 2019 +0200 regulator: axp20x: fix DCDCA and DCDCD for AXP806 Refactoring of the driver introduced bugs in AXP806's DCDCA and DCDCD regulator definitions. In DCDCA case, AXP806_DCDCA_1120mV_STEPS was obtained by subtracting 0x47 and 0x33. This should be 0x14 (hex) and not 14 (dec). In DCDCD case, axp806_dcdcd_ranges[] contains two ranges with same start and end macros, which is clearly wrong. Second range starts at 1.6V so it should use AXP806_DCDCD_1600mV_[START|END] macros. They are already defined but unused. Fixes: db4a555f7c4c ("regulator: axp20x: use defines for masks") Signed-off-by: Jernej Skrabec Link: https://lore.kernel.org/r/20190713090717.347-2-jernej.skrabec@siol.net Signed-off-by: Mark Brown drivers/regulator/axp20x-regulator.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3bd532692d93a9c72f4f11e38437b30c0e13007f Author: Wang Xiayang Date: Mon Jul 15 16:53:01 2019 +0800 drm/amdgpu: replace simple_strtol() by kstrtou32() The simple_strtol() function is deprecated. kstrto[l,u32]() is the correct replacement as it can properly handle overflows. This patch replaces the deprecated simple_strtol() use introduced recently. As clk is of type uint32_t, we are safe to use kstrtou32(). It is also safe to return zero on string parsing error, similar to the case of returning zero if buf is empty in parse_clk(). Fixes: bb5a2bdf36a8 ("drm/amdgpu: support dpm level modification under virtualization v3") Signed-off-by: Wang Xiayang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5db7b0d29086b621e294d5c52bb3ff25283cff60 Author: Fuqian Huang Date: Mon Jul 15 11:17:31 2019 +0800 drm/amdgpu: remove memset after kzalloc kzalloc has already zeroed the memory during the allocation. So memset is unneeded. Reviewed-by: Emil Velikov Signed-off-by: Fuqian Huang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c | 2 -- drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c | 2 -- drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c | 2 -- drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c | 2 -- 4 files changed, 8 deletions(-) commit b5203d16aef462f52df47242178718768038319a Author: Arnd Bergmann Date: Fri Jul 12 11:40:49 2019 +0200 drm/amd/amdgpu: hide #warning for missing DC config It is annoying to have #warnings that trigger in randconfig builds like drivers/gpu/drm/amd/amdgpu/soc15.c:653:3: error: "Enable CONFIG_DRM_AMD_DC for display support on SOC15." drivers/gpu/drm/amd/amdgpu/nv.c:400:3: error: "Enable CONFIG_DRM_AMD_DC for display support on navi." Remove these and rely on the users to turn these on. Signed-off-by: Arnd Bergmann Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/nv.c | 2 -- drivers/gpu/drm/amd/amdgpu/soc15.c | 4 ---- 2 files changed, 6 deletions(-) commit 9417f703afe3bf4e9c87342fb191d113ee83a818 Author: Kent Russell Date: Mon Jul 15 08:53:06 2019 -0400 drm/amdgpu: Fix Vega20 Perf counter for pcie_bw The perf counter for Vega20 is 108, instead of 104 which it was on all previous GPUs, so add a check to use the appropriate value. Signed-off-by: Kent Russell Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc15.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit ca9db7d1e07237db81c81518d52241d33d72298f Author: Tom St Denis Date: Fri Jul 12 09:41:32 2019 -0400 drm/amd/amdgpu: Add missing select_me_pipe_q() for gfx10 The ability to select GFX GRBM me/pipe/queue/vmid was missing from the gfx10 driver. This patch adds it. Used by the debugfs register interface to select GFX resources when read/writing registers. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 0fa4246e8ebfb389142034ffcdf6e70de32dddf4 Author: Tom St Denis Date: Fri Jul 12 09:27:06 2019 -0400 drm/amd/amdgpu: Add VMID to SRBM debugfs bank selection Add 5 bits to the offset for SRBM selection to handle VMIDs. Also update the select_me_pipe_q() callback to also select VMID. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 9 +++++---- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 4 ++-- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 4 ++-- 6 files changed, 14 insertions(+), 13 deletions(-) commit cf034477321e8c88d667514923763b93a0892f49 Author: Emil Velikov Date: Fri Jun 14 18:33:35 2019 +0100 drm/amdgpu: extend AMDGPU_CTX_PRIORITY_NORMAL comment Currently the AMDGPU_CTX_PRIORITY_* defines are used in both drm_amdgpu_ctx_in::priority and drm_amdgpu_sched_in::priority. Extend the comment to mention the CAP_SYS_NICE or DRM_MASTER requirement is only applicable with the former. Cc: Bas Nieuwenhuizen Cc: Christian König Cc: Alex Deucher Signed-off-by: Emil Velikov Reviewed-by: Christian König Signed-off-by: Alex Deucher include/uapi/drm/amdgpu_drm.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 54728170e00cecfac0394c6ee7ea4043778a512b Author: Kevin Wang Date: Fri Jul 12 15:22:40 2019 +0800 drm/amd/powerplay: add helper of smu_clk_dpm_is_enabled for smu v2: change function name to smu_clk_dpm_is_enabled. add this helper function to check dpm clk feature is enabled. Signed-off-by: Kevin Wang Reviewed-by: Evan Quan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 63 ++++++++++++++++---------- drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 1 + 2 files changed, 41 insertions(+), 23 deletions(-) commit 8e33376b7649b353ffd55f2b40fe129ead3880f7 Author: Kevin Wang Date: Fri Jul 12 17:05:52 2019 +0800 drm/amd/powerplay: fix save dpm level error for smu the save dpm level should be save previous dpm profile level, should not modified by get dpm level function. eg: default auto 1. auto -> standard ==> dpm_level = standard, save_dpm = auto. 2. standard -> auto ==> dpm_level = auto, save_dpm = standard. Signed-off-by: Kevin Wang Reviewed-by: Evan Quan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 42b3aa9a5bafef922de78f0b4d54435bf774d1c1 Author: Kevin Wang Date: Tue Jul 16 13:07:23 2019 -0500 drm/amd/powerplay: avoid double check feature enabled the unforce_dpm_levels doesn't need to check feature enablement. because the smu_get_dpm_freq_range function has check feature logic. Signed-off-by: Kevin Wang Reviewed-by: Evan Quan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) commit 75728f512e1f6cc37da9c173b7a7690b10b1c3f5 Author: Kevin Wang Date: Fri Jul 12 14:42:12 2019 +0800 drm/amd/powerplay: add standard profile dpm support for smu 1. the standard dpm is not support before. 2. use auto profile to adapt standard profile. Signed-off-by: Kevin Wang Reviewed-by: Evan Quan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eaf963b5c17e611ca35850f65db7ebe929bef774 Author: Kevin Wang Date: Fri Jul 12 14:40:12 2019 +0800 drm/amd/powerplay: add socclk profile dpm support. 1.miss socclk profile support when bringup. 2.add feature check for socclk. Signed-off-by: Kevin Wang Reviewed-by: Evan Quan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 75ee64875e758b2f10d319a50dc787516c52d3de Author: Felix Kuehling Date: Fri Jun 21 19:50:03 2019 -0400 drm/amdkfd: Consistently apply noretry setting Apply the same setting to SH_MEM_CONFIG and VM_CONTEXT1_CNTL. This makes the noretry param no longer KFD-specific. On GFX10 I'm not changing SH_MEM_CONFIG in this commit because GFX10 has different retry behaviour in the SQ and I don't have a way to test it at the moment. Suggested-by: Christian König CC: Philip Yang Signed-off-by: Felix Kuehling Reviewed-by : Shaoyun.liu < Shaoyun.liu@amd.com> Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 16 +++++----------- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 4 ++++ drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 3 ++- drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c | 3 ++- drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 3 ++- drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c | 3 ++- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager_v9.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 2 +- 9 files changed, 20 insertions(+), 17 deletions(-) commit 7a17c8ce3321bb0738283706d3b46b047a9cbcfb Author: Arnd Bergmann Date: Fri Jul 12 11:39:52 2019 +0200 drm/amd/display: return 'NULL' instead of 'false' from dcn20_acquire_idle_pipe_for_layer clang complains that 'false' is a not a pointer: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:2428:10: error: expression which evaluates to zero treated as a null pointer constant of type 'struct pipe_ctx *' [-Werror,-Wnon-literal-null-conversion] return false; Changing it to 'NULL' looks like the right thing that will shut up the warning and make it easier to read, while not changing behavior. Fixes: 7ed4e6352c16 ("drm/amd/display: Add DCN2 HW Sequencer and Resource") Reviewed-by: Nathan Chancellor Signed-off-by: Arnd Bergmann Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7e446b3c76b4ef0d3808305c0a51f895236b37bf Author: Arnd Bergmann Date: Fri Jul 12 11:37:00 2019 +0200 drm/amd/display: Support clang option for stack alignment As previously fixed for dml in commit 4769278e5c7f ("amdgpu/dc/dml: Support clang option for stack alignment") and calcs in commit cc32ad8f559c ("amdgpu/dc/calcs: Support clang option for stack alignment"), dcn20 uses an option that is not available with clang: clang: error: unknown argument: '-mpreferred-stack-boundary=4' scripts/Makefile.build:281: recipe for target 'drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.o' failed Use the same trick that we have in the other two files. Fixes: 7ed4e6352c16 ("drm/amd/display: Add DCN2 HW Sequencer and Resource") Signed-off-by: Arnd Bergmann Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/Makefile | 8 +++++++- drivers/gpu/drm/amd/display/dc/dsc/Makefile | 16 ++++++++++++---- 2 files changed, 19 insertions(+), 5 deletions(-) commit 2954152298c37804dab49d630aa959625b50cf64 Merge: 50950626414a d26d0cd97c88 Author: Linus Torvalds Date: Tue Jul 16 10:37:27 2019 -0700 Merge branch 'proc-cmdline' (/proc//cmdline fixes) This fixes two problems reported with the cmdline simplification and cleanup last year: - the setproctitle() special cases didn't quite match the original semantics, and it can be noticeable: https://lore.kernel.org/lkml/alpine.LNX.2.21.1904052326230.3249@kich.toxcorp.com/ - it could leak an uninitialized byte from the temporary buffer under the right (wrong) circustances: https://lore.kernel.org/lkml/20190712160913.17727-1-izbyshev@ispras.ru/ It rewrites the logic entirely, splitting it into two separate commits (and two separate functions) for the two different cases ("unedited cmdline" vs "setproctitle() has been used to change the command line"). * proc-cmdline: /proc//cmdline: add back the setproctitle() special case /proc//cmdline: remove all the special cases commit 763ff0e7d9c72e7094b31e7fb84a859be9325635 Author: Andrii Nakryiko Date: Mon Jul 15 20:57:03 2019 -0700 libbpf: fix another GCC8 warning for strncpy Similar issue was fixed in cdfc7f888c2a ("libbpf: fix GCC8 warning for strncpy") already. This one was missed. Fixing now. Cc: Magnus Karlsson Signed-off-by: Andrii Nakryiko Acked-by: Magnus Karlsson Signed-off-by: Alexei Starovoitov tools/lib/bpf/xsk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d26d0cd97c88eb1a5704b42e41ab443406807810 Author: Linus Torvalds Date: Sat Jul 13 14:27:14 2019 -0700 /proc//cmdline: add back the setproctitle() special case This makes the setproctitle() special case very explicit indeed, and handles it with a separate helper function entirely. In the process, it re-instates the original semantics of simply stopping at the first NUL character when the original last NUL character is no longer there. [ The original semantics can still be seen in mm/util.c: get_cmdline() that is limited to a fixed-size buffer ] This makes the logic about when we use the string lengths etc much more obvious, and makes it easier to see what we do and what the two very different cases are. Note that even when we allow walking past the end of the argument array (because the setproctitle() might have overwritten and overflowed the original argv[] strings), we only allow it when it overflows into the environment region if it is immediately adjacent. [ Fixed for missing 'count' checks noted by Alexey Izbyshev ] Link: https://lore.kernel.org/lkml/alpine.LNX.2.21.1904052326230.3249@kich.toxcorp.com/ Fixes: 5ab827189965 ("fs/proc: simplify and clarify get_mm_cmdline() function") Cc: Jakub Jankowski Cc: Alexey Dobriyan Cc: Alexey Izbyshev Signed-off-by: Linus Torvalds fs/proc/base.c | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 77 insertions(+), 4 deletions(-) commit 3d712546d8ba9f25cdf080d79f90482aa4231ed4 Author: Linus Torvalds Date: Sat Jul 13 13:40:13 2019 -0700 /proc//cmdline: remove all the special cases Start off with a clean slate that only reads exactly from arg_start to arg_end, without any oddities. This simplifies the code and in the process removes the case that caused us to potentially leak an uninitialized byte from the temporary kernel buffer. Note that in order to start from scratch with an understandable base, this simplifies things _too_ much, and removes all the legacy logic to handle setproctitle() having changed the argument strings. We'll add back those special cases very differently in the next commit. Link: https://lore.kernel.org/lkml/20190712160913.17727-1-izbyshev@ispras.ru/ Fixes: f5b65348fd77 ("proc: fix missing final NUL in get_mm_cmdline() rewrite") Cc: Alexey Izbyshev Cc: Alexey Dobriyan Signed-off-by: Linus Torvalds fs/proc/base.c | 71 +++++++--------------------------------------------------- 1 file changed, 8 insertions(+), 63 deletions(-) commit 50950626414a982c8ed539128c7f69a3d328a970 Merge: 9637d517347e 73fbfc499448 Author: Linus Torvalds Date: Tue Jul 16 09:25:04 2019 -0700 Merge tag 'backlight-next-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight Pull backlight updates from Lee Jones: "New Functionality: - Provide support for ACPI enumeration; gpio_backlight Fix-ups: - SPDX fixups; pwm_bl - Fix linear brightness levels to include number available; pwm_bl" * tag 'backlight-next-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight: backlight: pwm_bl: Fix heuristic to determine number of brightness levels backlight: gpio_backlight: Enable ACPI enumeration backlight: pwm_bl: Convert to use SPDX identifier commit 4e59afbbed9638f95adfac8d2f222aca3b2b1bc0 Author: Ilya Leoshkevich Date: Tue Jul 16 12:56:34 2019 +0200 selftests/bpf: skip nmi test when perf hw events are disabled Some setups (e.g. virtual machines) might run with hardware perf events disabled. If this is the case, skip the test_send_signal_nmi test. Add a separate test involving a software perf event. This allows testing the perf event path regardless of hardware perf event support. Signed-off-by: Ilya Leoshkevich Acked-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov .../testing/selftests/bpf/prog_tests/send_signal.c | 33 +++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) commit 3461a0a02141b2612f2916e9250a430de41b0290 Author: Ilya Leoshkevich Date: Tue Jul 16 12:53:53 2019 +0200 selftests/bpf: fix "alu with different scalars 1" on s390 BPF_LDX_MEM is used to load the least significant byte of the retrieved test_val.index, however, on big-endian machines it ends up retrieving the most significant byte. Change the test to load the whole int in order to make it endianness-independent. Signed-off-by: Ilya Leoshkevich Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/verifier/value_ptr_arith.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1624b0b200399bd6cd2b46ab3494738d1aef6b75 Author: Akinobu Mita Date: Tue Jul 16 21:59:35 2019 +0900 block: fix sysfs module parameters directory path in comment The runtime configurable module parameter files are located under /sys/module/MODULENAME/parameters, not /sys/module/MODULENAME. Cc: Jens Axboe Signed-off-by: Akinobu Mita Signed-off-by: Jens Axboe block/genhd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 07b0fdecb2477396bcb69609019aade2b22124a1 Author: Tejun Heo Date: Tue Jul 16 07:58:31 2019 -0700 blkcg: allow blkcg_policy->pd_stat() to print non-debug info too Currently, ->pd_stat() is called only when moduleparam blkcg_debug_stats is set which prevents it from printing non-debug policy-specific statistics. Let's move debug testing down so that ->pd_stat() can print non-debug stat too. This patch doesn't cause any visible behavior change. Signed-off-by: Tejun Heo Cc: Josef Bacik Signed-off-by: Jens Axboe block/blk-cgroup.c | 9 +++------ block/blk-iolatency.c | 3 +++ include/linux/blk-cgroup.h | 1 + 3 files changed, 7 insertions(+), 6 deletions(-) commit f7b76ac9d17e16e44feebb6d2749fec92bfd6dd4 Author: Zhengyuan Liu Date: Tue Jul 16 23:26:14 2019 +0800 io_uring: fix counter inc/dec mismatch in async_list We could queue a work for each req in defer and link list without increasing async_list->cnt, so we shouldn't decrease it while exiting from workqueue as well if we didn't process the req in async list. Thanks to Jens Axboe for his guidance. Fixes: 31b515106428 ("io_uring: allow workqueue item to handle multiple buffered requests") Signed-off-by: Zhengyuan Liu Signed-off-by: Jens Axboe fs/io_uring.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 4f7f96453b462b3de0fa18d18fe983960bb5ee7f Author: Hans de Goede Date: Fri Jul 12 12:00:33 2019 +0200 ACPI: video: Add new hw_changes_brightness quirk, set it on PB Easynote MZ35 Some machines change the brightness themselves when a brightness hotkey gets pressed, despite us telling them not to. This causes the brightness to go two steps up / down when the hotkey is pressed. This is esp. a problem on older machines with only a few brightness levels. This commit adds a new hw_changes_brightness quirk which makes acpi_video_device_notify() only call backlight_force_update(..., BACKLIGHT_UPDATE_HOTKEY) and not do anything else, notifying userspace that the brightness was changed and leaving it at that fixing the dual step problem. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=204077 Reported-by: Kacper Piwiński Tested-by: Kacper Piwiński Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/acpi/acpi_video.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit 3140aafb22edeab0cc41f15f53b12a118c0ac215 Author: Takashi Iwai Date: Mon Jul 15 23:14:53 2019 +0200 ALSA: hda/hdmi - Fix i915 reverse port/pin mapping The recent fix for Icelake HDMI codec introduced the mapping from pin NID to the i915 gfx port number. However, it forgot the reverse mapping from the port number to the pin NID that is used in the ELD notifier callback. As a result, it's processed to a wrong widget and gives a warning like snd_hda_codec_hdmi hdaudioC0D2: HDMI: pin nid 5 not registered This patch corrects it with a proper reverse mapping function. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=204133 Fixes: b0d8bc50b9f2 ("ALSA: hda: hdmi - add Icelake support") Reviewed-by: Kai Vehmanen Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_hdmi.c | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) commit c56cbfae62b7d572c7994c927202d337633cc7d9 Author: Ding Xiang Date: Tue Jul 16 17:54:08 2019 +0800 ata: libahci_platform: remove redundant dev_err message devm_ioremap_resource already contains error message, so remove the redundant dev_err message Signed-off-by: Ding Xiang Signed-off-by: Jens Axboe drivers/ata/libahci_platform.c | 1 - 1 file changed, 1 deletion(-) commit dbd0f6d6c2a11eb9c31ca9cd454f95bb5713e92e Author: Zhengyuan Liu Date: Sat Jul 13 11:58:26 2019 +0800 io_uring: fix the sequence comparison in io_sequence_defer sq->cached_sq_head and cq->cached_cq_tail are both unsigned int. If cached_sq_head overflows before cached_cq_tail, then we may miss a barrier req. As cached_cq_tail always follows cached_sq_head, the NQ should be enough. Cc: stable@vger.kernel.org Fixes: de0617e46717 ("io_uring: add support for marking commands as draining") Signed-off-by: Zhengyuan Liu Signed-off-by: Jens Axboe fs/io_uring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e5793cd1b5fedb39337cfa62251a25030f526e56 Author: Stephen Rothwell Date: Tue Jul 16 12:40:16 2019 +0100 MIPS: fix some more fall through errors in arch/mips Fix these errors: arch/mips/cavium-octeon/executive/cvmx-pko.c:489:7: error: this statement may fall through [-Werror=implicit-fallthrough=] arch/mips/bcm63xx/dev-flash.c:89:3: error: this statement may fall through [-Werror=implicit-fallthrough=] arch/mips/ath79/setup.c:155:17: error: this statement may fall through [-Werror=implicit-fallthrough=] arch/mips/ar7/setup.c:50:3: error: this statement may fall through [-Werror=implicit-fallthrough=] Cc: Florian Fainelli Cc: Thomas Gleixner Cc: John Crispin Cc: Matthias Schiffer Cc: "Petr Štetiar" Signed-off-by: Stephen Rothwell Signed-off-by: Paul Burton arch/mips/ar7/setup.c | 1 + arch/mips/ath79/setup.c | 2 +- arch/mips/bcm63xx/dev-flash.c | 1 + arch/mips/cavium-octeon/executive/cvmx-pko.c | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) commit 28b1d6ef53e3303b90ca8924bb78f31fa527cafb Author: Laura Garcia Liebana Date: Mon Jul 15 13:23:37 2019 +0200 netfilter: nft_hash: fix symhash with modulus one The rule below doesn't work as the kernel raises -ERANGE. nft add rule netdev nftlb lb01 ip daddr set \ symhash mod 1 map { 0 : 192.168.0.10 } fwd to "eth0" This patch allows to use the symhash modulus with one element, in the same way that the other types of hashes and algorithms that uses the modulus parameter. Signed-off-by: Laura Garcia Liebana Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b717273ddb66a0c576d8c9884a6cfa70a5f49f6b Author: Florian Westphal Date: Sat Jul 13 23:59:21 2019 +0200 netfilter: nf_tables: don't fail when updating base chain policy The following nftables test case fails on nf-next: tests/shell/run-tests.sh tests/shell/testcases/transactions/0011chain_0 The test case contains: add chain x y { type filter hook input priority 0; } add chain x y { policy drop; }" The new test if (chain->flags ^ flags) return -EOPNOTSUPP; triggers here, because chain->flags has NFT_BASE_CHAIN set, but flags is 0 because no flag attribute was present in the policy update. Just fetch the current flag settings of a pre-existing chain in case userspace did not provide any. Fixes: c9626a2cbdb20 ("netfilter: nf_tables: add hardware offload support") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 2 ++ 1 file changed, 2 insertions(+) commit 959b69ef57db00cb33e9c4777400ae7183ebddd3 Author: Florian Westphal Date: Fri Jul 12 00:29:05 2019 +0200 netfilter: conntrack: always store window size un-scaled Jakub Jankowski reported following oddity: After 3 way handshake completes, timeout of new connection is set to max_retrans (300s) instead of established (5 days). shortened excerpt from pcap provided: 25.070622 IP (flags [DF], proto TCP (6), length 52) 10.8.5.4.1025 > 10.8.1.2.80: Flags [S], seq 11, win 64240, [wscale 8] 26.070462 IP (flags [DF], proto TCP (6), length 48) 10.8.1.2.80 > 10.8.5.4.1025: Flags [S.], seq 82, ack 12, win 65535, [wscale 3] 27.070449 IP (flags [DF], proto TCP (6), length 40) 10.8.5.4.1025 > 10.8.1.2.80: Flags [.], ack 83, win 512, length 0 Turns out the last_win is of u16 type, but we store the scaled value: 512 << 8 (== 0x20000) becomes 0 window. The Fixes tag is not correct, as the bug has existed forever, but without that change all that this causes might cause is to mistake a window update (to-nonzero-from-zero) for a retransmit. Fixes: fbcd253d2448b8 ("netfilter: conntrack: lower timeout to RETRANS seconds if window is 0") Reported-by: Jakub Jankowski Tested-by: Jakub Jankowski Signed-off-by: Florian Westphal Acked-by: Jozsef Kadlecsik Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_proto_tcp.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit b83329fb473f29d34d85d642e3a3313bb2871fa9 Author: Fernando Fernandez Mancera Date: Wed Jul 10 12:05:57 2019 +0200 netfilter: synproxy: fix erroneous tcp mss option Now synproxy sends the mss value set by the user on client syn-ack packet instead of the mss value that client announced. Fixes: 48b1de4c110a ("netfilter: add SYNPROXY core/target") Signed-off-by: Fernando Fernandez Mancera Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack_synproxy.h | 1 + net/ipv4/netfilter/ipt_SYNPROXY.c | 2 ++ net/ipv6/netfilter/ip6t_SYNPROXY.c | 2 ++ net/netfilter/nf_synproxy_core.c | 4 ++-- net/netfilter/nft_synproxy.c | 2 ++ 5 files changed, 9 insertions(+), 2 deletions(-) commit f41828ee10b36644bb2b2bfa9dd1d02f55aa0516 Author: Christian Hesse Date: Thu Jul 11 01:31:12 2019 +0200 netfilter: nf_tables: fix module autoload for redir Fix expression for autoloading. Fixes: 5142967ab524 ("netfilter: nf_tables: fix module autoload with inet family") Signed-off-by: Christian Hesse Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_redir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 05ba4c895363db795f3d54f2da0de56d6520e52d Author: Yonatan Goldschmidt Date: Mon Jul 8 15:57:09 2019 -0700 netfilter: Update obsolete comments referring to ip_conntrack In 9fb9cbb1082d ("[NETFILTER]: Add nf_conntrack subsystem.") the new generic nf_conntrack was introduced, and it came to supersede the old ip_conntrack. This change updates (some) of the obsolete comments referring to old file/function names of the ip_conntrack mechanism, as well as removes a few self-referencing comments that we shouldn't maintain anymore. I did not update any comments referring to historical actions (e.g, comments like "this file was derived from ..." were left untouched, even if the referenced file is no longer here). Signed-off-by: Yonatan Goldschmidt Signed-off-by: Pablo Neira Ayuso include/linux/netfilter/nf_conntrack_h323_asn1.h | 3 +-- net/ipv4/netfilter/ipt_CLUSTERIP.c | 4 ++-- net/netfilter/Kconfig | 6 ++---- net/netfilter/nf_conntrack_core.c | 4 +--- net/netfilter/nf_conntrack_h323_asn1.c | 5 ++--- net/netfilter/nf_conntrack_proto_gre.c | 2 -- net/netfilter/nf_conntrack_proto_icmp.c | 2 +- net/netfilter/nf_nat_core.c | 2 +- 8 files changed, 10 insertions(+), 18 deletions(-) commit 3c00fb0bf0e0f061715c04ad609de93ddc046aa1 Author: xiao ruizhu Date: Thu Jul 4 11:31:13 2019 +0800 netfilter: nf_conntrack_sip: fix expectation clash When conntracks change during a dialog, SDP messages may be sent from different conntracks to establish expects with identical tuples. In this case expects conflict may be detected for the 2nd SDP message and end up with a process failure. The fixing here is to reuse an existing expect who has the same tuple for a different conntrack if any. Here are two scenarios for the case. 1) SERVER CPE | INVITE SDP | 5060 |<----------------------|5060 | 100 Trying | 5060 |---------------------->|5060 | 183 SDP | 5060 |---------------------->|5060 ===> Conntrack 1 | PRACK | 50601 |<----------------------|5060 | 200 OK (PRACK) | 50601 |---------------------->|5060 | 200 OK (INVITE) | 5060 |---------------------->|5060 | ACK | 50601 |<----------------------|5060 | | |<--- RTP stream ------>| | | | INVITE SDP (t38) | 50601 |---------------------->|5060 ===> Conntrack 2 With a certain configuration in the CPE, SIP messages "183 with SDP" and "re-INVITE with SDP t38" will go through the sip helper to create expects for RTP and RTCP. It is okay to create RTP and RTCP expects for "183", whose master connection source port is 5060, and destination port is 5060. In the "183" message, port in Contact header changes to 50601 (from the original 5060). So the following requests e.g. PRACK and ACK are sent to port 50601. It is a different conntrack (let call Conntrack 2) from the original INVITE (let call Conntrack 1) due to the port difference. In this example, after the call is established, there is RTP stream but no RTCP stream for Conntrack 1, so the RTP expect created upon "183" is cleared, and RTCP expect created for Conntrack 1 retains. When "re-INVITE with SDP t38" arrives to create RTP&RTCP expects, current ALG implementation will call nf_ct_expect_related() for RTP and RTCP. The expects tuples are identical to those for Conntrack 1. RTP expect for Conntrack 2 succeeds in creation as the one for Conntrack 1 has been removed. RTCP expect for Conntrack 2 fails in creation because it has idential tuples and 'conflict' with the one retained for Conntrack 1. And then result in a failure in processing of the re-INVITE. 2) SERVER A CPE | REGISTER | 5060 |<------------------| 5060 ==> CT1 | 200 | 5060 |------------------>| 5060 | | | INVITE SDP(1) | 5060 |<------------------| 5060 | 300(multi choice) | 5060 |------------------>| 5060 SERVER B | ACK | 5060 |<------------------| 5060 | INVITE SDP(2) | 5060 |-------------------->| 5060 ==> CT2 | 100 | 5060 |<--------------------| 5060 | 200(contact changes)| 5060 |<--------------------| 5060 | ACK | 5060 |-------------------->| 50601 ==> CT3 | | |<--- RTP stream ---->| | | | BYE | 5060 |<--------------------| 50601 | 200 | 5060 |-------------------->| 50601 | INVITE SDP(3) | 5060 |<------------------| 5060 ==> CT1 CPE sends an INVITE request(1) to Server A, and creates a RTP&RTCP expect pair for this Conntrack 1 (CT1). Server A responds 300 to redirect to Server B. The RTP&RTCP expect pairs created on CT1 are removed upon 300 response. CPE sends the INVITE request(2) to Server B, and creates an expect pair for the new conntrack (due to destination address difference), let call CT2. Server B changes the port to 50601 in 200 OK response, and the following requests ACK and BYE from CPE are sent to 50601. The call is established. There is RTP stream and no RTCP stream. So RTP expect is removed and RTCP expect for CT2 retains. As BYE request is sent from port 50601, it is another conntrack, let call CT3, different from CT2 due to the port difference. So the BYE request will not remove the RTCP expect for CT2. Then another outgoing call is made, with the same RTP port being used (not definitely but possibly). CPE firstly sends the INVITE request(3) to Server A, and tries to create a RTP&RTCP expect pairs for this CT1. In current ALG implementation, the RTCP expect for CT1 fails in creation because it 'conflicts' with the residual one for CT2. As a result the INVITE request fails to send. Signed-off-by: xiao ruizhu Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack_expect.h | 12 +++++++++--- net/ipv4/netfilter/nf_nat_h323.c | 12 ++++++------ net/netfilter/ipvs/ip_vs_nfct.c | 2 +- net/netfilter/nf_conntrack_amanda.c | 2 +- net/netfilter/nf_conntrack_broadcast.c | 2 +- net/netfilter/nf_conntrack_expect.c | 26 +++++++++++++++++++------- net/netfilter/nf_conntrack_ftp.c | 2 +- net/netfilter/nf_conntrack_h323_main.c | 18 +++++++++--------- net/netfilter/nf_conntrack_irc.c | 2 +- net/netfilter/nf_conntrack_netlink.c | 4 ++-- net/netfilter/nf_conntrack_pptp.c | 4 ++-- net/netfilter/nf_conntrack_sane.c | 2 +- net/netfilter/nf_conntrack_sip.c | 10 +++++++--- net/netfilter/nf_conntrack_tftp.c | 2 +- net/netfilter/nf_nat_amanda.c | 2 +- net/netfilter/nf_nat_ftp.c | 2 +- net/netfilter/nf_nat_irc.c | 2 +- net/netfilter/nf_nat_sip.c | 8 +++++--- net/netfilter/nf_nat_tftp.c | 2 +- net/netfilter/nft_ct.c | 2 +- 20 files changed, 71 insertions(+), 47 deletions(-) commit b575b24b8eee37f10484e951b62ce2a31c579775 Author: Miaohe Lin Date: Tue Jul 2 03:59:36 2019 +0000 netfilter: Fix rpfilter dropping vrf packets by mistake When firewalld is enabled with ipv4/ipv6 rpfilter, vrf ipv4/ipv6 packets will be dropped. Vrf device will pass through netfilter hook twice. One with enslaved device and another one with l3 master device. So in device may dismatch witch out device because out device is always enslaved device.So failed with the check of the rpfilter and drop the packets by mistake. Signed-off-by: Miaohe Lin Signed-off-by: Pablo Neira Ayuso net/ipv4/netfilter/ipt_rpfilter.c | 1 + net/ipv6/netfilter/ip6t_rpfilter.c | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) commit 163f88211c147d96b46e376337190a02203ace02 Author: Trond Myklebust Date: Tue Jul 16 07:07:28 2019 -0400 SUNRPC: Skip zero-refcount transports When looking for the next transport to use for an RPC call, skip those that are in the process of being destroyed and that have a zero refcount. Signed-off-by: Trond Myklebust net/sunrpc/xprtmultipath.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) commit 3cf7292280d5e484747a5f0ee4b62327b037344c Author: Trond Myklebust Date: Mon Jul 15 15:12:08 2019 -0400 SUNRPC: Replace division by multiplication in calculation of queue length When checking whether or not a particular xprt queue length is shorter than the average queue length for all xprts, prefer to use multiplication rather than division for performance reasons. Signed-off-by: Trond Myklebust net/sunrpc/xprtmultipath.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 88785b7fa74ae2dc52f879140b976984b5374c79 Merge: da7f134972f4 19ec11a2233d Author: Linus Walleij Date: Tue Jul 16 11:12:14 2019 +0200 Merge tag 'gpio-v5.3-rc1-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into fixes GPIO fixes for v5.3-rc1 - silence error messages on probe deferral in gpio-davinci - fix a memory leak in gpiolib-of - fix a potential use-after-free error in gpio-em commit da7f134972f473053ea9d721a1d8397546476dc4 Author: Linus Walleij Date: Mon Jul 15 22:45:29 2019 +0200 Revert "gpio/spi: Fix spi-gpio regression on active high CS" This reverts commit fbbf145a0e0a0177e089c52275fbfa55763e7d1d. It seems I was misguided in my fixup, which was working at the time but did not work on the final v5.2. The patch tried to avoid a quirk the gpiolib code not to treat "spi-gpio" CS gpios "special" by enforcing them to be active low, in the belief that since the "spi-gpio" driver was parsing the device tree on its own, it did not care to inspect the "spi-cs-high" attribute on the device nodes. That's wrong. The SPI core was inspecting them inside the of_spi_parse_dt() funtion and setting SPI_CS_HIGH on the nodes, and the driver inspected this flag when driving the line. As of now, the core handles the GPIO and it will consistently set the GPIO descriptor to 1 to enable CS, strictly requireing the gpiolib to invert it. And the gpiolib should indeed enforce active low on the CS line. Device trees should of course put the right flag on the GPIO handles, but it used to not matter. If we don't enforce active low on "gpio-gpio" we may run into ABI backward compatibility issues, so revert this. Cc: linux-spi@vger.kernel.org Cc: stable@vger.kernel.org Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20190715204529.9539-1-linus.walleij@linaro.org drivers/gpio/gpiolib-of.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 7aaddd96d5febcf5b24357a326b3038d49a20532 Author: Dmitry Osipenko Date: Thu Jul 11 05:13:13 2019 +0300 drm/modes: Don't apply cmdline's rotation if it wasn't specified The rotation mode from cmdline shouldn't be taken into account if it wasn't specified in the cmdline. This fixes ignored default display orientation when display mode is given using cmdline without the rotation being specified. Fixes: 1bf4e09227c3 ("drm/modes: Allow to specify rotation and reflection on the commandline") Signed-off-by: Dmitry Osipenko Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20190711021313.29445-1-digetx@gmail.com drivers/gpu/drm/drm_client_modeset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c4dcc8a162784c1f827c7f6d8409598f19708fe6 Author: Viresh Kumar Date: Tue Jul 16 09:36:08 2019 +0530 cpufreq: Make cpufreq_generic_init() return void It always returns 0 (success) and its return type should really be void. Over that, many drivers have added error handling code based on its return value, which is not required at all. Change its return type to void and update all the callers. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/bmips-cpufreq.c | 17 ++++++----------- drivers/cpufreq/cpufreq.c | 4 +--- drivers/cpufreq/davinci-cpufreq.c | 3 ++- drivers/cpufreq/imx6q-cpufreq.c | 6 ++---- drivers/cpufreq/kirkwood-cpufreq.c | 3 ++- drivers/cpufreq/loongson1-cpufreq.c | 8 +++----- drivers/cpufreq/loongson2_cpufreq.c | 3 ++- drivers/cpufreq/maple-cpufreq.c | 3 ++- drivers/cpufreq/omap-cpufreq.c | 15 +++++---------- drivers/cpufreq/pasemi-cpufreq.c | 3 ++- drivers/cpufreq/pmac32-cpufreq.c | 3 ++- drivers/cpufreq/pmac64-cpufreq.c | 3 ++- drivers/cpufreq/s3c2416-cpufreq.c | 9 ++------- drivers/cpufreq/s3c64xx-cpufreq.c | 15 +++------------ drivers/cpufreq/s5pv210-cpufreq.c | 3 ++- drivers/cpufreq/sa1100-cpufreq.c | 3 ++- drivers/cpufreq/sa1110-cpufreq.c | 3 ++- drivers/cpufreq/spear-cpufreq.c | 3 ++- drivers/cpufreq/tegra20-cpufreq.c | 8 +------- include/linux/cpufreq.h | 2 +- 20 files changed, 46 insertions(+), 71 deletions(-) commit eb4177116bf568a413c544eca3f4446cb4064be9 Author: Takashi Iwai Date: Mon Jul 15 23:12:13 2019 +0200 ALSA: hda/hdmi - Remove duplicated define INTEL_GET_VENDOR_VERB is defined twice identically. Let's remove a superfluous line. Fixes: b0d8bc50b9f2 ("ALSA: hda: hdmi - add Icelake support") Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_hdmi.c | 1 - 1 file changed, 1 deletion(-) commit ede34f397ddb063b145b9e7d79c6026f819ded13 Author: Takashi Iwai Date: Mon Jul 15 22:50:27 2019 +0200 ALSA: seq: Break too long mutex context in the write loop The fix for the racy writes and ioctls to sequencer widened the application of client->ioctl_mutex to the whole write loop. Although it does unlock/relock for the lengthy operation like the event dup, the loop keeps the ioctl_mutex for the whole time in other situations. This may take quite long time if the user-space would give a huge buffer, and this is a likely cause of some weird behavior spotted by syzcaller fuzzer. This patch puts a simple workaround, just adding a mutex break in the loop when a large number of events have been processed. This shouldn't hit any performance drop because the threshold is set high enough for usual operations. Fixes: 7bd800915677 ("ALSA: seq: More protection for concurrent write and ioctl races") Reported-by: syzbot+97aae04ce27e39cbfca9@syzkaller.appspotmail.com Reported-by: syzbot+4c595632b98bb8ffcc66@syzkaller.appspotmail.com Cc: Signed-off-by: Takashi Iwai sound/core/seq/seq_clientmgr.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 4b4e0e32e4b09274dbc9d173016c1a026f44608c Author: Hui Wang Date: Tue Jul 16 15:21:34 2019 +0800 ALSA: hda/realtek: apply ALC891 headset fixup to one Dell machine Without this patch, the headset-mic and headphone-mic don't work. Cc: Signed-off-by: Hui Wang Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 5 +++++ 1 file changed, 5 insertions(+) commit 9637d517347e80ee2fe1c5d8ce45ba1b88d8b5cd Merge: 273cbf61c3dd 787c79d6393f Author: Linus Torvalds Date: Mon Jul 15 21:20:52 2019 -0700 Merge tag 'for-linus-20190715' of git://git.kernel.dk/linux-block Pull more block updates from Jens Axboe: "A later pull request with some followup items. I had some vacation coming up to the merge window, so certain things items were delayed a bit. This pull request also contains fixes that came in within the last few days of the merge window, which I didn't want to push right before sending you a pull request. This contains: - NVMe pull request, mostly fixes, but also a few minor items on the feature side that were timing constrained (Christoph et al) - Report zones fixes (Damien) - Removal of dead code (Damien) - Turn on cgroup psi memstall (Josef) - block cgroup MAINTAINERS entry (Konstantin) - Flush init fix (Josef) - blk-throttle low iops timing fix (Konstantin) - nbd resize fixes (Mike) - nbd 0 blocksize crash fix (Xiubo) - block integrity error leak fix (Wenwen) - blk-cgroup writeback and priority inheritance fixes (Tejun)" * tag 'for-linus-20190715' of git://git.kernel.dk/linux-block: (42 commits) MAINTAINERS: add entry for block io cgroup null_blk: fixup ->report_zones() for !CONFIG_BLK_DEV_ZONED block: Limit zone array allocation size sd_zbc: Fix report zones buffer allocation block: Kill gfp_t argument of blkdev_report_zones() block: Allow mapping of vmalloc-ed buffers block/bio-integrity: fix a memory leak bug nvme: fix NULL deref for fabrics options nbd: add netlink reconfigure resize support nbd: fix crash when the blksize is zero block: Disable write plugging for zoned block devices block: Fix elevator name declaration block: Remove unused definitions nvme: fix regression upon hot device removal and insertion blk-throttle: fix zero wait time for iops throttled group block: Fix potential overflow in blk_report_zones() blkcg: implement REQ_CGROUP_PUNT blkcg, writeback: Implement wbc_blkcg_css() blkcg, writeback: Add wbc->no_cgroup_owner blkcg, writeback: Rename wbc_account_io() to wbc_account_cgroup_owner() ... commit 273cbf61c3ddee9574ef1f4959b9bc6db5b24271 Merge: 5fe7b600a116 cc6b9dfb2c57 Author: Linus Torvalds Date: Mon Jul 15 21:10:39 2019 -0700 Merge branch 'i2c/for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c updates from Wolfram Sang: "New stuff from the I2C world: - in the core, getting irqs from ACPI is now similar to OF - new driver for MediaTek MT7621/7628/7688 SoCs - bcm2835, i801, and tegra drivers got some more attention - GPIO API cleanups - cleanups in the core headers - lots of usual driver updates" * 'i2c/for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (74 commits) i2c: mt7621: Fix platform_no_drv_owner.cocci warnings i2c: cpm: remove casting dma_alloc dt-bindings: i2c: sun6i-p2wi: Fix the binding example dt-bindings: i2c: mv64xxx: Fix the example compatible i2c: i801: Documentation update i2c: i801: Add support for Intel Tiger Lake i2c: i801: Fix PCI ID sorting dt-bindings: i2c-stm32: document optional dmas i2c: i2c-stm32f7: Add I2C_SMBUS_I2C_BLOCK_DATA support i2c: core: Tidy up handling of init_irq i2c: core: Move ACPI gpio IRQ handling into i2c_acpi_get_irq i2c: core: Move ACPI IRQ handling to probe time i2c: acpi: Factor out getting the IRQ from ACPI i2c: acpi: Use available IRQ helper functions i2c: core: Allow whole core to use i2c_dev_irq_from_resources eeprom: at24: modify a comment referring to platform data dt-bindings: i2c: omap: Add new compatible for J721E SoCs dt-bindings: i2c: mv64xxx: Add YAML schemas dt-bindings: i2c: sun6i-p2wi: Add YAML schemas i2c: mt7621: Add MediaTek MT7621/7628/7688 I2C driver ... commit 5fe7b600a116187e10317d83fb56922c4ef6b76d Merge: fb4da215ed92 caa2b557841c Author: Linus Torvalds Date: Mon Jul 15 21:06:15 2019 -0700 Merge tag 'for-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull power supply and reset updates from Sebastian Reichel: "Core: - add HWMON compat layer - new properties: - input power limit - input voltage limit Drivers: - qcom-pon: add gen2 support - new driver for storing reboot move in NVMEM - new driver for Wilco EC charger configuration - simplify getting the adapter of a client" * tag 'for-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: power: reset: nvmem-reboot-mode: add CONFIG_OF dependency power_supply: wilco_ec: Add charging config driver power: supply: cros: allow to set input voltage and current limit power: supply: add input power and voltage limit properties power: supply: fix semicolon.cocci warnings power: reset: nvmem-reboot-mode: use NVMEM as reboot mode write interface dt-bindings: power: reset: add document for NVMEM based reboot-mode reset: qcom-pon: Add support for gen2 pon dt-bindings: power: reset: qcom: Add qcom,pm8998-pon compatibility line power: supply: Add HWMON compatibility layer power: supply: sbs-manager: simplify getting the adapter of a client power: supply: rt9455_charger: simplify getting the adapter of a client power: supply: rt5033_battery: simplify getting the adapter of a client power: supply: max17042_battery: simplify getting the adapter of a client power: supply: max17040_battery: simplify getting the adapter of a client power: supply: max14656_charger_detector: simplify getting the adapter of a client power: supply: bq25890_charger: simplify getting the adapter of a client power: supply: bq24257_charger: simplify getting the adapter of a client power: supply: bq24190_charger: simplify getting the adapter of a client commit fb4da215ed92f564f7ca090bb81a199b0d6cab8a Merge: 2a3c389a0fde 7b4b0f6b34d8 Author: Linus Torvalds Date: Mon Jul 15 20:44:49 2019 -0700 Merge tag 'pci-v5.3-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI updates from Bjorn Helgaas: "Enumeration changes: - Evaluate PCI Boot Configuration _DSM to learn if firmware wants us to preserve its resource assignments (Benjamin Herrenschmidt) - Simplify resource distribution (Nicholas Johnson) - Decode 32 GT/s link speed (Gustavo Pimentel) Virtualization: - Fix incorrect caching of VF config space size (Alex Williamson) - Fix VF driver probing sysfs knobs (Alex Williamson) Peer-to-peer DMA: - Fix dma_virt_ops check (Logan Gunthorpe) Altera host bridge driver: - Allow building as module (Ley Foon Tan) Armada 8K host bridge driver: - add PHYs support (Miquel Raynal) DesignWare host bridge driver: - Export APIs to support removable loadable module (Vidya Sagar) - Enable Relaxed Ordering erratum workaround only on Tegra20 & Tegra30 (Vidya Sagar) Hyper-V host bridge driver: - Fix use-after-free in eject (Dexuan Cui) Mobiveil host bridge driver: - Clean up and fix many issues, including non-identify mapped windows, 64-bit windows, multi-MSI, class code, INTx clearing (Hou Zhiqiang) Qualcomm host bridge driver: - Use clk bulk API for 2.4.0 controllers (Bjorn Andersson) - Add QCS404 support (Bjorn Andersson) - Assert PERST for at least 100ms (Niklas Cassel) R-Car host bridge driver: - Add r8a774a1 DT support (Biju Das) Tegra host bridge driver: - Add support for Gen2, opportunistic UpdateFC and ACK (PCIe protocol details) AER, GPIO-based PERST# (Manikanta Maddireddy) - Fix many issues, including power-on failure cases, interrupt masking in suspend, UPHY settings, AFI dynamic clock gating, pending DLL transactions (Manikanta Maddireddy) Xilinx host bridge driver: - Fix NWL Multi-MSI programming (Bharat Kumar Gogada) Endpoint support: - Fix 64bit BAR support (Alan Mikhak) - Fix pcitest build issues (Alan Mikhak, Andy Shevchenko) Bug fixes: - Fix NVIDIA GPU multi-function power dependencies (Abhishek Sahu) - Fix NVIDIA GPU HDA enablement issue (Lukas Wunner) - Ignore lockdep for sysfs "remove" (Marek Vasut) Misc: - Convert docs to reST (Changbin Du, Mauro Carvalho Chehab)" * tag 'pci-v5.3-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (107 commits) PCI: Enable NVIDIA HDA controllers tools: PCI: Fix installation when `make tools/pci_install` PCI: dwc: pci-dra7xx: Fix compilation when !CONFIG_GPIOLIB PCI: Fix typos and whitespace errors PCI: mobiveil: Fix INTx interrupt clearing in mobiveil_pcie_isr() PCI: mobiveil: Fix infinite-loop in the INTx handling function PCI: mobiveil: Move PCIe PIO enablement out of inbound window routine PCI: mobiveil: Add upper 32-bit PCI base address setup in inbound window PCI: mobiveil: Add upper 32-bit CPU base address setup in outbound window PCI: mobiveil: Mask out hardcoded bits in inbound/outbound windows setup PCI: mobiveil: Clear the control fields before updating it PCI: mobiveil: Add configured inbound windows counter PCI: mobiveil: Fix the valid check for inbound and outbound windows PCI: mobiveil: Clean-up program_{ib/ob}_windows() PCI: mobiveil: Remove an unnecessary return value check PCI: mobiveil: Fix error return values PCI: mobiveil: Refactor the MEM/IO outbound window initialization PCI: mobiveil: Make some register updates more readable PCI: mobiveil: Reformat the code for readability dt-bindings: PCI: mobiveil: Change gpio_slave and apb_csr to optional ... commit 2a3c389a0fde49b241430df806a34276568cfb29 Merge: 8de262531f5f 0b043644c0ca Author: Linus Torvalds Date: Mon Jul 15 20:38:15 2019 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma updates from Jason Gunthorpe: "A smaller cycle this time. Notably we see another new driver, 'Soft iWarp', and the deletion of an ancient unused driver for nes. - Revise and simplify the signature offload RDMA MR APIs - More progress on hoisting object allocation boiler plate code out of the drivers - Driver bug fixes and revisions for hns, hfi1, efa, cxgb4, qib, i40iw - Tree wide cleanups: struct_size, put_user_page, xarray, rst doc conversion - Removal of obsolete ib_ucm chardev and nes driver - netlink based discovery of chardevs and autoloading of the modules providing them - Move more of the rdamvt/hfi1 uapi to include/uapi/rdma - New driver 'siw' for software based iWarp running on top of netdev, much like rxe's software RoCE. - mlx5 feature to report events in their raw devx format to userspace - Expose per-object counters through rdma tool - Adaptive interrupt moderation for RDMA (DIM), sharing the DIM core from netdev" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: (194 commits) RMDA/siw: Require a 64 bit arch RDMA/siw: Mark expected switch fall-throughs RDMA/core: Fix -Wunused-const-variable warnings rdma/siw: Remove set but not used variable 's' rdma/siw: Add missing dependencies on LIBCRC32C and DMA_VIRT_OPS RDMA/siw: Add missing rtnl_lock around access to ifa rdma/siw: Use proper enumerated type in map_cqe_status RDMA/siw: Remove unnecessary kthread create/destroy printouts IB/rdmavt: Fix variable shadowing issue in rvt_create_cq RDMA/core: Fix race when resolving IP address RDMA/core: Make rdma_counter.h compile stand alone IB/core: Work on the caller socket net namespace in nldev_newlink() RDMA/rxe: Fill in wc byte_len with IB_WC_RECV_RDMA_WITH_IMM RDMA/mlx5: Set RDMA DIM to be enabled by default RDMA/nldev: Added configuration of RDMA dynamic interrupt moderation to netlink RDMA/core: Provide RDMA DIM support for ULPs linux/dim: Implement RDMA adaptive moderation (DIM) IB/mlx5: Report correctly tag matching rendezvous capability docs: infiniband: add it to the driver-api bookset IB/mlx5: Implement VHCA tunnel mechanism in DEVX ... commit e9630660bd9253b3ed3926e18278b740cf218365 Author: Steve French Date: Mon Jul 15 21:59:41 2019 -0500 smb3: smbdirect no longer experimental clarify Kconfig to indicate that smb direct (SMB3 over RDMA) is no longer experimental. Over the last three releases Long Li has fixed various problems uncovered by xfstesting. Signed-off-by: Steve French Acked-by: Ronnie Sahlberg fs/cifs/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8de262531f5fbb7458463224a7587429800c24bf Merge: be8454afc50f 7efd105c27fd Author: Linus Torvalds Date: Mon Jul 15 20:18:40 2019 -0700 Merge tag 'mfd-next-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD updates from Lee Jones: "Core Frameworks: - Set 'struct device' fwnode when registering a new device New Drivers: - Add support for ROHM BD70528 PMIC New Device Support: - Add support for LP87561 4-Phase Regulator to TI LP87565 PMIC - Add support for RK809 and RK817 to Rockchip RK808 - Add support for Lid Angle to ChromeOS core - Add support for CS47L15 CODEC to Madera core - Add support for CS47L92 CODEC to Madera core - Add support for ChromeOS (legacy) Accelerometers in ChromeOS core - Add support for Add Intel Elkhart Lake PCH to Intel LPSS New Functionality: - Provide regulator supply information when registering; madera-core - Additional Device Tree support; lp87565, madera, cros-ec, rohm,bd71837-pmic - Allow over-riding power button press via Device Tree; rohm-bd718x7 - Differentiate between running processors; cros_ec_dev Fix-ups: - Big header file update; cros_ec_commands.h - Split header per-subsystem; rohm-bd718x7 - Remove superfluous code; menelaus, cs5535-mfd, cs47lXX-tables - Trivial; sorting, coding style; intel-lpss-pci - Only remove Power Off functionality if set locally; rk808 - Make use for Power Off Prepare(); rk808 - Fix spelling mistake in header guards; stmfx - Properly free IDA resources - SPDX fixups; cs47lXX-tables, madera - Error path fixups; hi655x-pmic Bug Fixes: - Add missing break in case() statement - Repair undefined behaviour when not initialising variables; arizona-core, madera-core - Fix reference to Device Tree documentation; madera" * tag 'mfd-next-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (45 commits) mfd: hi655x-pmic: Fix missing return value check for devm_regmap_init_mmio_clk mfd: madera: Fixup SPDX headers mfd: madera: Remove some unused registers and fix some defaults mfd: intel-lpss: Release IDA resources mfd: intel-lpss: Add Intel Elkhart Lake PCH PCI IDs mfd: cs5535-mfd: Remove ifdef OLPC noise mfd: stmfx: Fix macro definition spelling dt-bindings: mfd: Add link to ROHM BD71847 Datasheet MAINAINERS: Swap words in INTEL PMIC MULTIFUNCTION DEVICE DRIVERS mfd: cros_ec_dev: Register cros_ec_accel_legacy driver as a subdevice mfd: rk808: Prepare rk805 for poweroff mfd: rk808: Check pm_power_off pointer mfd: cros_ec: differentiate SCP from EC by feature bit dt-bindings: Add binding for cros-ec-rpmsg mfd: madera: Add Madera core support for CS47L92 mfd: madera: Add Madera core support for CS47L15 mfd: madera: Update DT bindings to add additional CODECs mfd: madera: Add supply mapping for MICVDD mfd: madera: Fix potential uninitialised use of variable mfd: madera: Fix bad reference to pinctrl.txt file ... commit 88a92c913cef09e70b1744a8877d177aa6cb2189 Author: Ronnie Sahlberg Date: Tue Jul 16 10:41:46 2019 +1000 cifs: fix crash in smb2_compound_op()/smb2_set_next_command() RHBZ: 1722704 In low memory situations the various SMB2_*_init() functions can fail to allocate a request PDU and thus leave the request iovector as NULL. If we don't check the return code for failure we end up calling smb2_set_next_command() with a NULL iovector causing a crash when it tries to dereference it. CC: Stable Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French fs/cifs/smb2inode.c | 12 ++++++++++++ fs/cifs/smb2ops.c | 11 ++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) commit be8454afc50f43016ca8b6130d9673bdd0bd56ec Merge: fec88ab0af97 3729fe2bc2a0 Author: Linus Torvalds Date: Mon Jul 15 19:04:27 2019 -0700 Merge tag 'drm-next-2019-07-16' of git://anongit.freedesktop.org/drm/drm Pull drm updates from Dave Airlie: "The biggest thing in this is the AMD Navi GPU support, this again contains a bunch of header files that are large. These are the new AMD RX5700 GPUs that just recently became available. New drivers: - ST-Ericsson MCDE driver - Ingenic JZ47xx SoC UAPI change: - HDR source metadata property Core: - HDR inforframes and EDID parsing - drm hdmi infoframe unpacking - remove prime sg_table caching into dma-buf - New gem vram helpers to reduce driver code - Lots of drmP.h removal - reservation fencing fix - documentation updates - drm_fb_helper_connector removed - mode name command handler rewrite fbcon: - Remove the fbcon notifiers ttm: - forward progress fixes dma-buf: - make mmap call optional - debugfs refcount fixes - dma-fence free with pending signals fix - each dma-buf gets an inode Panels: - Lots of additional panel bindings amdgpu: - initial navi10 support - avoid hw reset - HDR metadata support - new thermal sensors for vega asics - RAS fixes - use HMM rather than MMU notifier - xgmi topology via kfd - SR-IOV fixes - driver reload fixes - DC use a core bpc attribute - Aux fixes for DC - Bandwidth calc updates for DC - Clock handling refactor - kfd VEGAM support vmwgfx: - Coherent memory support changes i915: - HDR Support - HDMI i2c link - Icelake multi-segmented gamma support - GuC firmware update - Mule Creek Canyon PCH support for EHL - EHL platform updtes - move i915.alpha_support to i915.force_probe - runtime PM refactoring - VBT parsing refactoring - DSI fixes - struct mutex dependency reduction - GEM code reorg mali-dp: - Komeda driver features msm: - dsi vs EPROBE_DEFER fixes - msm8998 snapdragon 835 support - a540 gpu support - mdp5 and dpu interconnect support exynos: - drmP.h removal tegra: - misc fixes tda998x: - audio support improvements - pixel repeated mode support - quantisation range handling corrections - HDMI vendor info fix armada: - interlace support fix - overlay/video plane register handling refactor - add gamma support rockchip: - RX3328 support panfrost: - expose perf counters via hidden ioctls vkms: - enumerate CRC sources list ast: - rework BO handling mgag200: - rework BO handling dw-hdmi: - suspend/resume support rcar-du: - R8A774A1 Soc Support - LVDS dual-link mode support - Additional formats - Misc fixes omapdrm: - DSI command mode display support stm - fb modifier support - runtime PM support sun4i: - use vmap ops vc4: - binner bo binding rework v3d: - compute shader support - resync/sync fixes - job management refactoring lima: - NULL pointer in irq handler fix - scheduler default timeout virtio: - fence seqno support - trace events bochs: - misc fixes tc458767: - IRQ/HDP handling sii902x: - HDMI audio support atmel-hlcdc: - misc fixes meson: - zpos support" * tag 'drm-next-2019-07-16' of git://anongit.freedesktop.org/drm/drm: (1815 commits) Revert "Merge branch 'vmwgfx-next' of git://people.freedesktop.org/~thomash/linux into drm-next" Revert "mm: adjust apply_to_pfn_range interface for dropped token." mm: adjust apply_to_pfn_range interface for dropped token. drm/amdgpu/navi10: add uclk activity sensor drm/amdgpu: properly guard the generic discovery code drm/amdgpu: add missing documentation on new module parameters drm/amdgpu: don't invalidate caches in RELEASE_MEM, only do the writeback drm/amd/display: avoid 64-bit division drm/amdgpu/psp11: simplify the ucode register logic drm/amdgpu: properly guard DC support in navi code drm/amd/powerplay: vega20: fix uninitialized variable use drm/amd/display: dcn20: include linux/delay.h amdgpu: make pmu support optional drm/amd/powerplay: Zero initialize current_rpm in vega20_get_fan_speed_percent drm/amd/powerplay: Zero initialize freq in smu_v11_0_get_current_clk_freq drm/amd/powerplay: Use memset to initialize metrics structs drm/amdgpu/mes10.1: Fix header guard drm/amd/powerplay: add temperature sensor support for navi10 drm/amdgpu: fix scheduler timeout calc drm/amdgpu: Prepare for hmm_range_register API change (v2) ... commit f90b8fda3a9d72a9422ea80ae95843697f94ea4a Author: Linus Walleij Date: Mon Jul 15 22:21:01 2019 +0200 ARM: dts: gemini: Set DIR-685 SPI CS as active low The SPI to the display on the DIR-685 is active low, we were just saved by the SPI library enforcing active low on everything before, so set it as active low to avoid ambiguity. Link: https://lore.kernel.org/r/20190715202101.16060-1-linus.walleij@linaro.org Cc: stable@vger.kernel.org Signed-off-by: Linus Walleij Signed-off-by: Olof Johansson arch/arm/boot/dts/gemini-dlink-dir-685.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7e8a0f10899075ac2665c78c4e49dbaf32bf3346 Author: Masahiro Yamada Date: Wed Jul 10 14:13:20 2019 +0900 ARM: stm32: use "depends on" instead of "if" after prompt This appeared after the global fixups by commit e32465429490 ("ARM: use "depends on" for SoC configs instead of "if" after prompt"). Fix it now. Link: https://lore.kernel.org/r/20190710051320.8738-1-yamada.masahiro@socionext.com Fixes: e32465429490 ("ARM: use "depends on" for SoC configs instead of "if" after prompt") Signed-off-by: Masahiro Yamada Signed-off-by: Olof Johansson arch/arm/mach-stm32/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7cba7caceebc0c17acd4165db313575f8c0f5387 Merge: da4d0b289142 1f6db18fbd76 Author: Olof Johansson Date: Mon Jul 15 17:29:45 2019 -0700 Merge branch 'for-arm-soc' of git://git.armlinux.org.uk/~rmk/linux-arm into arm/soc * 'for-arm-soc' of git://git.armlinux.org.uk/~rmk/linux-arm: (21 commits) ARM: sa1100: convert to common clock framework ARM: riscpc: enable chained scatterlist support ARM: riscpc: reduce IRQ handling code ARM: riscpc: move RiscPC assembly files from arch/arm/lib to mach-rpc ARM: riscpc: parse video information from tagged list ARM: riscpc: add ecard quirk for Atomwide 3port serial card ARM: sa1100/neponset: convert serial to use gpiod APIs ARM: sa1100/hackkit: remove empty serial mctrl functions ARM: sa1100/badge4: remove commented out modem control initialisers ARM: sa1100/h3xxx: convert serial to gpiod APIs ARM: sa1100/assabet: convert serial to gpiod APIs serial: sa1100: add note about modem control signals serial: sa1100: add support for mctrl gpios ARM: riscpc: dma: use __iomem pointers for writing DMA ARM: riscpc: dma: improve address/length writing ARM: riscpc: dma: make state a local variable ARM: riscpc: dma: eliminate "cur_sg" scatterlist usage ARM: riscpc: fix DMA ARM: riscpc: fix ecard printing ARM: riscpc: fix lack of keyboard interrupts after irq conversion ... Signed-off-by: Olof Johansson commit 1d43d5e469d92601ed5b606998bdc7d450276636 Merge: f384e62a82ba 3d144578c91a Author: David S. Miller Date: Mon Jul 15 17:18:15 2019 -0700 Merge tag 'mlx5-fixes-2019-07-15' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mameed says: ==================== Mellanox, mlx5 fixes 2019-07-15 This pull request provides mlx5 TC flower and tunnel fixes for kernel 5.2 from Eli and Vlad. ==================== Signed-off-by: David S. Miller commit d5e1db990fcce571a4af2434d6fc2b312d94b45e Author: Andrii Nakryiko Date: Fri Jul 12 10:44:41 2019 -0700 selftests/bpf: remove logic duplication in test_verifier test_verifier tests can specify single- and multi-runs tests. Internally logic of handling them is duplicated. Get rid of it by making single run retval/data specification to be a first run spec. Signed-off-by: Andrii Nakryiko Cc: Krzesimir Nowak Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/test_verifier.c | 35 +++++++++++++---------------- 1 file changed, 15 insertions(+), 20 deletions(-) commit 6da193569cbe2127faa7a934a3c18fffe32c6041 Merge: 81f522f96f78 073a4834a813 Author: Daniel Borkmann Date: Mon Jul 15 23:15:53 2019 +0200 Merge branch 'bpf-fix-wide-loads-sockaddr' Stanislav Fomichev says: ==================== When fixing selftests by adding support for wide stores, Yonghong reported that he had seen some examples where clang generates single u64 loads for two adjacent u32s as well: http://lore.kernel.org/netdev/a66c937f-94c0-eaf8-5b37-8587d66c0c62@fb.com Fix this to support aligned u64 reads for some bpf_sock_addr fields as well. ==================== Acked-by: Andrii Narkyiko Acked-by: Yonghong Song Signed-off-by: Daniel Borkmann commit 073a4834a81368c8af9cc9e99ff83245600a8f6b Author: Stanislav Fomichev Date: Mon Jul 15 09:39:56 2019 -0700 bpf: sync bpf.h to tools/ Update bpf_sock_addr comments to indicate support for 8-byte reads from user_ip6 and msg_src_ip6. Cc: Yonghong Song Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann tools/include/uapi/linux/bpf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7dd8d6119d481da1c4619eb7d8cfef33edfbee81 Author: Stanislav Fomichev Date: Mon Jul 15 09:39:55 2019 -0700 selftests/bpf: add selftests for wide loads Mirror existing wide store tests with wide loads. The only significant difference is expected error string. Cc: Yonghong Song Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/verifier/wide_access.c | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit 8b45063c8584b3e6caff0b109dd0f47b35487aba Author: Stanislav Fomichev Date: Mon Jul 15 09:39:54 2019 -0700 selftests/bpf: rename verifier/wide_store.c to verifier/wide_access.c Move the file and rename internal BPF_SOCK_ADDR define to BPF_SOCK_ADDR_STORE. This selftest will be extended in the next commit with the wide loads. Cc: Yonghong Song Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/verifier/wide_access.c | 36 ++++++++++++++++++++++ tools/testing/selftests/bpf/verifier/wide_store.c | 36 ---------------------- 2 files changed, 36 insertions(+), 36 deletions(-) commit d4ecfeb15494ec261fef2d25d96eecba66f0b182 Author: Stanislav Fomichev Date: Mon Jul 15 09:39:53 2019 -0700 bpf: allow wide aligned loads for bpf_sock_addr user_ip6 and msg_src_ip6 Add explicit check for u64 loads of user_ip6 and msg_src_ip6 and update the comment. Cc: Yonghong Song Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann include/uapi/linux/bpf.h | 4 ++-- net/core/filter.c | 12 +++++++++++- 2 files changed, 13 insertions(+), 3 deletions(-) commit b43995469e5804636a55372e9bbb17ccb22441c5 Author: Stanislav Fomichev Date: Mon Jul 15 09:39:52 2019 -0700 bpf: rename bpf_ctx_wide_store_ok to bpf_ctx_wide_access_ok Rename bpf_ctx_wide_store_ok to bpf_ctx_wide_access_ok to indicate that it can be used for both loads and stores. Cc: Yonghong Song Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann include/linux/filter.h | 2 +- net/core/filter.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) commit 81f522f96f788ba978f505d5a03a039f75360b8b Author: Ilya Leoshkevich Date: Mon Jul 15 11:11:03 2019 +0200 samples/bpf: build with -D__TARGET_ARCH_$(SRCARCH) While $ARCH can be relatively flexible (see Makefile and tools/scripts/Makefile.arch), $SRCARCH always corresponds to a directory name under arch/. Therefore, build samples with -D__TARGET_ARCH_$(SRCARCH), since that matches the expectations of bpf_helpers.h. Signed-off-by: Ilya Leoshkevich Acked-by: Vasily Gorbik Acked-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann samples/bpf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f83a46d4711e789642033eb00fed8e017e34fe7d Author: Ilya Leoshkevich Date: Fri Jul 12 15:59:50 2019 +0200 selftests/bpf: put test_stub.o into $(OUTPUT) Add a rule to put test_stub.o in $(OUTPUT) and change the references to it accordingly. This prevents test_stub.o from being created in the source directory. Signed-off-by: Ilya Leoshkevich Acked-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit e46fc22e60a410d896448835adca95aa3332d25d Author: Ilya Leoshkevich Date: Fri Jul 12 15:56:31 2019 +0200 selftests/bpf: make directory prerequisites order-only When directories are used as prerequisites in Makefiles, they can cause a lot of unnecessary rebuilds, because a directory is considered changed whenever a file in this directory is added, removed or modified. If the only thing a target is interested in is the existence of the directory it depends on, which is the case for selftests/bpf, this directory should be specified as an order-only prerequisite: it would still be created in case it does not exist, but it would not trigger a rebuild of a target in case it's considered changed. Signed-off-by: Ilya Leoshkevich Acked-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/Makefile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 025c0c0917b78f21e3aaffecda75968d54172095 Author: Ilya Leoshkevich Date: Fri Jul 12 15:41:42 2019 +0200 selftests/bpf: fix attach_probe on s390 attach_probe test fails, because it cannot install a kprobe on a non-existent sys_nanosleep symbol. Use the correct symbol name for the nanosleep syscall on 64-bit s390. Don't bother adding one for 31-bit mode, since tests are compiled only in 64-bit mode. Fixes: 1e8611bbdfc9 ("selftests/bpf: add kprobe/uprobe selftests") Signed-off-by: Ilya Leoshkevich Acked-by: Vasily Gorbik Acked-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/prog_tests/attach_probe.c | 2 ++ 1 file changed, 2 insertions(+) commit 896bcc908a2f422acf604ad0717aee593f3e823f Merge: af3c24e0e2ed 8981e56fa172 Author: Daniel Borkmann Date: Mon Jul 15 23:02:17 2019 +0200 Merge branch 'bpf-btf-size-verification-fix' Andrii Nakryiko says: ==================== BTF size resolution logic isn't always resolving type size correctly, leading to erroneous map creation failures due to value size mismatch. This patch set: 1. fixes the issue (patch #1); 2. adds tests for trickier cases (patch #2); 3. and converts few test cases utilizing BTF-defined maps, that previously couldn't use typedef'ed arrays due to kernel bug (patch #3). ==================== Acked-by: Yonghong Song Signed-off-by: Daniel Borkmann commit 8981e56fa17282598571958ae6a29cbc3209a6cb Author: Andrii Nakryiko Date: Fri Jul 12 10:25:57 2019 -0700 selftests/bpf: use typedef'ed arrays as map values Convert few tests that couldn't use typedef'ed arrays due to kernel bug. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/progs/test_get_stack_rawtp.c | 3 ++- tools/testing/selftests/bpf/progs/test_stacktrace_build_id.c | 3 +-- tools/testing/selftests/bpf/progs/test_stacktrace_map.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit dd13f3ca642986b59a1863101e58cd694e81f888 Author: Andrii Nakryiko Date: Fri Jul 12 10:25:56 2019 -0700 selftests/bpf: add trickier size resolution tests Add more BTF tests, validating that size resolution logic is correct in few trickier cases. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/test_btf.c | 88 ++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) commit 1acc5d5c5832da9a98b22374a8fae08ffe31b3f8 Author: Andrii Nakryiko Date: Fri Jul 12 10:25:55 2019 -0700 bpf: fix BTF verifier size resolution logic BTF verifier has a size resolution bug which in some circumstances leads to invalid size resolution for, e.g., TYPEDEF modifier. This happens if we have [1] PTR -> [2] TYPEDEF -> [3] ARRAY, in which case due to being in pointer context ARRAY size won't be resolved (because for pointer it doesn't matter, so it's a sink in pointer context), but it will be permanently remembered as zero for TYPEDEF and TYPEDEF will be marked as RESOLVED. Eventually ARRAY size will be resolved correctly, but TYPEDEF resolved_size won't be updated anymore. This, subsequently, will lead to erroneous map creation failure, if that TYPEDEF is specified as either key or value, as key_size/value_size won't correspond to resolved size of TYPEDEF (kernel will believe it's zero). Note, that if BTF was ordered as [1] ARRAY <- [2] TYPEDEF <- [3] PTR, this won't be a problem, as by the time we get to TYPEDEF, ARRAY's size is already calculated and stored. This bug manifests itself in rejecting BTF-defined maps that use array typedef as a value type: typedef int array_t[16]; struct { __uint(type, BPF_MAP_TYPE_ARRAY); __type(value, array_t); /* i.e., array_t *value; */ } test_map SEC(".maps"); The fix consists on not relying on modifier's resolved_size and instead using modifier's resolved_id (type ID for "concrete" type to which modifier eventually resolves) and doing size determination for that resolved type. This allow to preserve existing "early DFS termination" logic for PTR or STRUCT_OR_ARRAY contexts, but still do correct size determination for modifier types. Fixes: eb3f595dab40 ("bpf: btf: Validate type reference") Cc: Martin KaFai Lau Signed-off-by: Andrii Nakryiko Acked-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann kernel/bpf/btf.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit 3d144578c91a2db417923ba905ce7a84ce0c274b Author: Vlad Buslov Date: Thu Jul 11 13:03:48 2019 +0300 net/mlx5e: Allow dissector meta key in tc flower Recently, fl_flow_key->indev_ifindex int field was refactored into flow_dissector_key_meta field. With this, flower classifier also sets FLOW_DISSECTOR_KEY_META flow dissector key. However, mlx5 flower dissector validation code rejects filters that use flow dissector keys that are not supported. Add FLOW_DISSECTOR_KEY_META to the list of allowed dissector keys in __parse_cls_flower() to prevent following error when offloading flower classifier to mlx5: Error: mlx5_core: Unsupported key. Fixes: 8212ed777f40 ("net: sched: cls_flower: use flow_dissector for ingress ifindex") Signed-off-by: Vlad Buslov Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 075973c7d7bb866a5bb37f96027ef99bf7244c83 Author: Vlad Buslov Date: Mon Jul 8 17:02:36 2019 +0300 net/mlx5e: Rely on filter_dev instead of dissector keys for tunnels Currently, tunnel attributes are parsed and inner header matching is used only when flow dissector specifies match on some of the supported encapsulation fields. When user tries to offload tc filter that doesn't match any encapsulation fields on tunnel device, mlx5 tc layer incorrectly sets to match packet header keys on encap header (outer header) and firmware rejects the rule with syndrome 0x7e1579 when creating new flow group. Change __parse_cls_flower() to determine whether tunnel is used based on fitler_dev tunnel info, instead of determining it indirectly by checking flow dissector enc keys. Fixes: bbd00f7e2349 ("net/mlx5e: Add TC tunnel release action for SRIOV offloads") Signed-off-by: Vlad Buslov Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit d71f895c31952cfd3277f82ebed60fc3f2350b52 Author: Eli Cohen Date: Thu Jun 27 08:34:41 2019 +0300 net/mlx5e: Verify encapsulation is supported When mlx5e_attach_encap() calls mlx5e_get_tc_tun() to get the tunnel info data struct, check that returned value is not NULL, as would be in the case of unsupported encapsulation. Fixes: d386939a327d2 ("net/mlx5e: Rearrange tc tunnel code in a modular way") Signed-off-by: Eli Cohen Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 4 ++++ 1 file changed, 4 insertions(+) commit 6694e48012826351036fd10fc506ca880023e25f Author: Liran Alon Date: Mon Jul 15 18:47:44 2019 +0300 KVM: nVMX: Ignore segment base for VMX memory operand when segment not FS or GS As reported by Maxime at https://bugzilla.kernel.org/show_bug.cgi?id=204175: In vmx/nested.c::get_vmx_mem_address(), when the guest runs in long mode, the base address of the memory operand is computed with a simple: *ret = s.base + off; This is incorrect, the base applies only to FS and GS, not to the others. Because of that, if the guest uses a VMX instruction based on DS and has a DS.base that is non-zero, KVM wrongfully adds the base to the resulting address. Reported-by: Maxime Villard Reviewed-by: Joao Martins Signed-off-by: Liran Alon Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 0d88800d547211ce07be3551c812d404cf2be3a8 Author: Yi Wang Date: Sat Jul 6 01:08:48 2019 +0800 kvm: x86: ioapic and apic debug macros cleanup The ioapic_debug and apic_debug have been not used for years, and kvm tracepoints are enough for debugging, so remove them as Paolo suggested. However, there may be something wrong when pv evi get/put user, so it's better to retain some log there. Signed-off-by: Yi Wang Signed-off-by: Paolo Bonzini arch/x86/kvm/ioapic.c | 15 -------- arch/x86/kvm/lapic.c | 95 +++++---------------------------------------------- 2 files changed, 9 insertions(+), 101 deletions(-) commit f384e62a82ba5d85408405fdd6aeff89354deaa9 Author: Phong Tran Date: Mon Jul 15 22:08:14 2019 +0700 ISDN: hfcsusb: checking idx of ep configuration The syzbot test with random endpoint address which made the idx is overflow in the table of endpoint configuations. this adds the checking for fixing the error report from syzbot KASAN: stack-out-of-bounds Read in hfcsusb_probe [1] The patch tested by syzbot [2] Reported-by: syzbot+8750abbc3a46ef47d509@syzkaller.appspotmail.com [1]: https://syzkaller.appspot.com/bug?id=30a04378dac680c5d521304a00a86156bb913522 [2]: https://groups.google.com/d/msg/syzkaller-bugs/_6HBdge8F3E/OJn7wVNpBAAJ Signed-off-by: Phong Tran Signed-off-by: David S. Miller drivers/isdn/hardware/mISDN/hfcsusb.c | 3 +++ 1 file changed, 3 insertions(+) commit 3729fe2bc2a01f4cc1aa88be8f64af06084c87d6 Author: Dave Airlie Date: Tue Jul 16 04:07:13 2019 +1000 Revert "Merge branch 'vmwgfx-next' of git://people.freedesktop.org/~thomash/linux into drm-next" This reverts commit 031e610a6a21448a63dff7a0416e5e206724caac, reversing changes made to 52d2d44eee8091e740d0d275df1311fb8373c9a9. The mm changes in there we premature and not fully ack or reviewed by core mm folks, I dropped the ball by merging them via this tree, so lets take em all back out. Signed-off-by: Dave Airlie MAINTAINERS | 1 - drivers/gpu/drm/ttm/ttm_bo.c | 1 - drivers/gpu/drm/ttm/ttm_bo_vm.c | 169 +++----- drivers/gpu/drm/vmwgfx/Kconfig | 1 - drivers/gpu/drm/vmwgfx/Makefile | 2 +- .../drm/vmwgfx/device_include/svga3d_surfacedefs.h | 233 +--------- drivers/gpu/drm/vmwgfx/ttm_lock.c | 100 +++++ drivers/gpu/drm/vmwgfx/ttm_lock.h | 30 ++ drivers/gpu/drm/vmwgfx/vmwgfx_bo.c | 12 +- drivers/gpu/drm/vmwgfx/vmwgfx_context.c | 4 - drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c | 13 +- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 167 +++++++- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 139 ++---- drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 1 + drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 23 +- drivers/gpu/drm/vmwgfx/vmwgfx_page_dirty.c | 472 --------------------- drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | 245 ++--------- drivers/gpu/drm/vmwgfx/vmwgfx_resource_priv.h | 15 - drivers/gpu/drm/vmwgfx/vmwgfx_shader.c | 8 +- drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 405 +----------------- drivers/gpu/drm/vmwgfx/vmwgfx_validation.c | 74 +--- drivers/gpu/drm/vmwgfx/vmwgfx_validation.h | 16 +- include/drm/ttm/ttm_bo_api.h | 10 - include/drm/ttm/ttm_bo_driver.h | 6 - include/linux/mm.h | 19 +- include/uapi/drm/vmwgfx_drm.h | 4 +- mm/Kconfig | 3 - mm/Makefile | 1 - mm/as_dirty_helpers.c | 300 ------------- mm/memory.c | 145 ++----- 30 files changed, 483 insertions(+), 2136 deletions(-) commit 7e4b4dfc98d54bc79f7ca29c8bc6307ed2948014 Author: Dave Airlie Date: Tue Jul 16 04:06:29 2019 +1000 Revert "mm: adjust apply_to_pfn_range interface for dropped token." This reverts commit 6dfc43d3a19174faead54575c204aee106225f43. Going to revert the whole vmwwgfx pull. Signed-off-by: Dave Airlie include/linux/mm.h | 2 +- mm/as_dirty_helpers.c | 6 ++++-- mm/memory.c | 6 +++--- 3 files changed, 8 insertions(+), 6 deletions(-) commit c5ec23bb190267f8b6cb287b761c1f6630c4b694 Author: Fuqian Huang Date: Mon Jul 15 11:21:18 2019 +0800 vmxnet3: Remove call to memset after dma_alloc_coherent In commit 518a2f1925c3 ("dma-mapping: zero memory returned from dma_alloc_*"), dma_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang Signed-off-by: David S. Miller drivers/net/vmxnet3/vmxnet3_drv.c | 1 - 1 file changed, 1 deletion(-) commit 6a24c8fb0d889b39079215970210f88255b81c80 Author: Fuqian Huang Date: Mon Jul 15 11:19:21 2019 +0800 hippi: Remove call to memset after pci_alloc_consistent pci_alloc_consistent calls dma_alloc_coherent directly. In commit 518a2f1925c3 ("dma-mapping: zero memory returned from dma_alloc_*"), dma_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang Signed-off-by: David S. Miller drivers/net/hippi/rrunner.c | 2 -- 1 file changed, 2 deletions(-) commit 3a5ee3b30126bd7dc5d6299f3a985d4fefcf42c9 Author: Fuqian Huang Date: Mon Jul 15 11:19:11 2019 +0800 ethernet: remove redundant memset kvzalloc already zeroes the memory during the allocation. pci_alloc_consistent calls dma_alloc_coherent directly. In commit 518a2f1925c3 ("dma-mapping: zero memory returned from dma_alloc_*"), dma_alloc_coherent has already zeroed the memory. So the memset after these function is not needed. Signed-off-by: Fuqian Huang Signed-off-by: David S. Miller drivers/net/ethernet/atheros/atlx/atl1.c | 2 -- drivers/net/ethernet/atheros/atlx/atl2.c | 1 - drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 -- drivers/net/ethernet/chelsio/cxgb4/sched.c | 1 - drivers/net/ethernet/freescale/fec_main.c | 2 -- drivers/net/ethernet/jme.c | 5 ----- drivers/net/ethernet/marvell/skge.c | 2 -- drivers/net/ethernet/mellanox/mlx4/eq.c | 2 -- drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 1 - drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 3 --- drivers/net/ethernet/mellanox/mlxsw/pci.c | 1 - drivers/net/ethernet/neterion/s2io.c | 1 - drivers/net/ethernet/qlogic/netxen/netxen_nic_ctx.c | 3 --- drivers/net/ethernet/ti/tlan.c | 1 - 14 files changed, 27 deletions(-) commit cef86f1536b02e61e699f53b5f8782067481580d Author: Fuqian Huang Date: Mon Jul 15 11:17:09 2019 +0800 atm: idt77252: Remove call to memset after dma_alloc_coherent In commit 518a2f1925c3 ("dma-mapping: zero memory returned from dma_alloc_*"), dma_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang Signed-off-by: David S. Miller drivers/atm/idt77252.c | 1 - 1 file changed, 1 deletion(-) commit 071c37983d99da07797294ea78e9da1a6e287144 Author: Lorenzo Bianconi Date: Sun Jul 14 23:36:11 2019 +0200 net: neigh: fix multiple neigh timer scheduling Neigh timer can be scheduled multiple times from userspace adding multiple neigh entries and forcing the neigh timer scheduling passing NTF_USE in the netlink requests. This will result in a refcount leak and in the following dump stack: [ 32.465295] NEIGH: BUG, double timer add, state is 8 [ 32.465308] CPU: 0 PID: 416 Comm: double_timer_ad Not tainted 5.2.0+ #65 [ 32.465311] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.12.0-2.fc30 04/01/2014 [ 32.465313] Call Trace: [ 32.465318] dump_stack+0x7c/0xc0 [ 32.465323] __neigh_event_send+0x20c/0x880 [ 32.465326] ? ___neigh_create+0x846/0xfb0 [ 32.465329] ? neigh_lookup+0x2a9/0x410 [ 32.465332] ? neightbl_fill_info.constprop.0+0x800/0x800 [ 32.465334] neigh_add+0x4f8/0x5e0 [ 32.465337] ? neigh_xmit+0x620/0x620 [ 32.465341] ? find_held_lock+0x85/0xa0 [ 32.465345] rtnetlink_rcv_msg+0x204/0x570 [ 32.465348] ? rtnl_dellink+0x450/0x450 [ 32.465351] ? mark_held_locks+0x90/0x90 [ 32.465354] ? match_held_lock+0x1b/0x230 [ 32.465357] netlink_rcv_skb+0xc4/0x1d0 [ 32.465360] ? rtnl_dellink+0x450/0x450 [ 32.465363] ? netlink_ack+0x420/0x420 [ 32.465366] ? netlink_deliver_tap+0x115/0x560 [ 32.465369] ? __alloc_skb+0xc9/0x2f0 [ 32.465372] netlink_unicast+0x270/0x330 [ 32.465375] ? netlink_attachskb+0x2f0/0x2f0 [ 32.465378] netlink_sendmsg+0x34f/0x5a0 [ 32.465381] ? netlink_unicast+0x330/0x330 [ 32.465385] ? move_addr_to_kernel.part.0+0x20/0x20 [ 32.465388] ? netlink_unicast+0x330/0x330 [ 32.465391] sock_sendmsg+0x91/0xa0 [ 32.465394] ___sys_sendmsg+0x407/0x480 [ 32.465397] ? copy_msghdr_from_user+0x200/0x200 [ 32.465401] ? _raw_spin_unlock_irqrestore+0x37/0x40 [ 32.465404] ? lockdep_hardirqs_on+0x17d/0x250 [ 32.465407] ? __wake_up_common_lock+0xcb/0x110 [ 32.465410] ? __wake_up_common+0x230/0x230 [ 32.465413] ? netlink_bind+0x3e1/0x490 [ 32.465416] ? netlink_setsockopt+0x540/0x540 [ 32.465420] ? __fget_light+0x9c/0xf0 [ 32.465423] ? sockfd_lookup_light+0x8c/0xb0 [ 32.465426] __sys_sendmsg+0xa5/0x110 [ 32.465429] ? __ia32_sys_shutdown+0x30/0x30 [ 32.465432] ? __fd_install+0xe1/0x2c0 [ 32.465435] ? lockdep_hardirqs_off+0xb5/0x100 [ 32.465438] ? mark_held_locks+0x24/0x90 [ 32.465441] ? do_syscall_64+0xf/0x270 [ 32.465444] do_syscall_64+0x63/0x270 [ 32.465448] entry_SYSCALL_64_after_hwframe+0x49/0xbe Fix the issue unscheduling neigh_timer if selected entry is in 'IN_TIMER' receiving a netlink request with NTF_USE flag set Reported-by: Marek Majkowski Fixes: 0c5c2d308906 ("neigh: Allow for user space users of the neighbour table") Signed-off-by: Lorenzo Bianconi Reviewed-by: David Ahern Signed-off-by: David S. Miller net/core/neighbour.c | 2 ++ 1 file changed, 2 insertions(+) commit 41a531ffa4c5aeb062f892227c00fabb3b4a9c91 Author: Soeren Moch Date: Mon Jul 1 12:53:13 2019 +0200 rt2x00usb: fix rx queue hang Since commit ed194d136769 ("usb: core: remove local_irq_save() around ->complete() handler") the handler rt2x00usb_interrupt_rxdone() is not running with interrupts disabled anymore. So this completion handler is not guaranteed to run completely before workqueue processing starts for the same queue entry. Be sure to set all other flags in the entry correctly before marking this entry ready for workqueue processing. This way we cannot miss error conditions that need to be signalled from the completion handler to the worker thread. Note that rt2x00usb_work_rxdone() processes all available entries, not only such for which queue_work() was called. This patch is similar to what commit df71c9cfceea ("rt2x00: fix order of entry flags modification") did for TX processing. This fixes a regression on a RT5370 based wifi stick in AP mode, which suddenly stopped data transmission after some period of heavy load. Also stopping the hanging hostapd resulted in the error message "ieee80211 phy0: rt2x00queue_flush_queue: Warning - Queue 14 failed to flush". Other operation modes are probably affected as well, this just was the used testcase. Fixes: ed194d136769 ("usb: core: remove local_irq_save() around ->complete() handler") Cc: stable@vger.kernel.org # 4.20+ Signed-off-by: Soeren Moch Acked-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2x00usb.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit ff414f31ce3750d259549c3b9eac8e855b5348f0 Author: Arnd Bergmann Date: Mon Jul 8 14:50:06 2019 +0200 ath10k: work around uninitialized vht_pfr variable As clang points out, the vht_pfr is assigned to a struct member without being initialized in one case: drivers/net/wireless/ath/ath10k/mac.c:7528:7: error: variable 'vht_pfr' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] if (!ath10k_mac_can_set_bitrate_mask(ar, band, mask, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/wireless/ath/ath10k/mac.c:7551:20: note: uninitialized use occurs here arvif->vht_pfr = vht_pfr; ^~~~~~~ drivers/net/wireless/ath/ath10k/mac.c:7528:3: note: remove the 'if' if its condition is always true if (!ath10k_mac_can_set_bitrate_mask(ar, band, mask, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/wireless/ath/ath10k/mac.c:7483:12: note: initialize the variable 'vht_pfr' to silence this warning u8 vht_pfr; Add an explicit but probably incorrect initialization here. I suspect we want a better fix here, but chose this approach to illustrate the issue. Fixes: 8b97b055dc9d ("ath10k: fix failure to set multiple fixed rate") Signed-off-by: Arnd Bergmann Reviewed-by: Nathan Chancellor Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/mac.c | 2 ++ 1 file changed, 2 insertions(+) commit a7d544d63120061f89459585f06ca44d30842a22 Author: Luca Coelho Date: Mon Jul 8 18:55:34 2019 +0300 iwlwifi: pcie: add support for qu c-step devices Add support for C-step devices. Currently we don't have a nice way of matching the step and choosing the proper configuration, so we need to switch the config structs one by one. Cc: stable@vger.kernel.org Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo drivers/net/wireless/intel/iwlwifi/cfg/22000.c | 53 +++++++++++++++++++++++++ drivers/net/wireless/intel/iwlwifi/iwl-config.h | 7 ++++ drivers/net/wireless/intel/iwlwifi/iwl-csr.h | 2 + drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 21 ++++++++++ 4 files changed, 83 insertions(+) commit ffcb60a54f245528e1d49f957ca2d20d6079577c Author: Ihab Zhaika Date: Mon Jul 8 18:55:33 2019 +0300 iwlwifi: add new cards for 9000 and 20000 series add two new PCI ID's for 9000 and 20000 series Cc: stable@vger.kernel.org Signed-off-by: Ihab Zhaika Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 2 ++ 1 file changed, 2 insertions(+) commit 7e4935ccc3236751e5fe4bd6846f86e46bb2e427 Author: Hui Wang Date: Mon Jul 15 10:00:58 2019 -0700 Input: alps - don't handle ALPS cs19 trackpoint-only device On a latest Lenovo laptop, the trackpoint and 3 buttons below it don't work at all, when we move the trackpoint or press those 3 buttons, the kernel will print out: "Rejected trackstick packet from non DualPoint device" This device is identified as an alps touchpad but the packet has trackpoint format, so the alps.c drops the packet and prints out the message above. According to XiaoXiao's explanation, this device is named cs19 and is trackpoint-only device, its firmware is only for trackpoint, it is independent of touchpad and is a device completely different from DualPoint ones. To drive this device with mininal changes to the existing driver, we just let the alps driver not handle this device, then the trackpoint.c will be the driver of this device if the trackpoint driver is enabled. (if not, this device will fallback to a bare PS/2 device) With the trackpoint.c, this trackpoint and 3 buttons all work well, they have all features that the trackpoint should have, like scrolling-screen, drag-and-drop and frame-selection. Signed-off-by: XiaoXiao Liu Signed-off-by: Hui Wang Reviewed-by: Pali Rohár Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/mouse/alps.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 88f28e95e72eebecce5ba6944adffdf3654f626c Author: Maya Nakamura Date: Sun Jul 14 16:27:18 2019 -0700 Input: hyperv-keyboard - remove dependencies on PAGE_SIZE for ring buffer Define the ring buffer size as a constant expression because it should not depend on the guest page size. Signed-off-by: Maya Nakamura Reviewed-by: Michael Kelley Signed-off-by: Dmitry Torokhov drivers/input/serio/hyperv-keyboard.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b8374b85529d9fb974be80c0809c070398aa8cb2 Author: Lars-Peter Clausen Date: Sun Jul 14 14:30:36 2019 -0700 Input: adp5589 - initialize GPIO controller parent device While not strictly required for normal operation setting the GPIO parent device allows the GPIO framework to generate more verbose debug output for the GPIO chip. Signed-off-by: Lars-Peter Clausen Signed-off-by: Alexandru Ardelean Signed-off-by: Dmitry Torokhov drivers/input/keyboard/adp5589-keys.c | 1 + 1 file changed, 1 insertion(+) commit 6d45d3e08b7460d8ae4199a71a5ad271b0d98f83 Author: Tim Schumacher Date: Sun Jul 14 14:25:59 2019 -0700 Input: iforce - remove empty multiline comments Those are remnants of the SPDX identifier migration, which haven't been removed properly. Signed-off-by: Tim Schumacher Signed-off-by: Dmitry Torokhov drivers/input/joystick/iforce/iforce-ff.c | 3 --- drivers/input/joystick/iforce/iforce-main.c | 3 --- drivers/input/joystick/iforce/iforce-packets.c | 3 --- drivers/input/joystick/iforce/iforce-serio.c | 3 --- drivers/input/joystick/iforce/iforce-usb.c | 3 --- drivers/input/joystick/iforce/iforce.h | 3 --- 6 files changed, 18 deletions(-) commit ecb41832bd2a7a3f8ac93527cec5e51e3827daed Merge: d38b6cf50a6b 0ecfebd2b524 Author: Dmitry Torokhov Date: Mon Jul 15 09:42:32 2019 -0700 Merge tag 'v5.2' into next Sync up with mainline to resolve conflicts in iforce driver. commit d38b6cf50a6b911ee46683330f3af17fcceca509 Author: Joe Perches Date: Sun Jul 14 11:27:51 2019 -0700 Input: synaptics - fix misuse of strlcpy Probable cut&paste typo - use the correct field size. Signed-off-by: Joe Perches Signed-off-by: Dmitry Torokhov drivers/input/mouse/synaptics.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 89b408a68b9dd163b2705b6f73d8e3cc3579b457 Author: Sheriff Esseson Date: Mon Jul 15 09:15:09 2019 -0700 Documentation: filesystem: Convert xfs.txt to ReST Move xfs.txt to admin-guide, convert xfs.txt to ReST and broken references Signed-off-by: Sheriff Esseson Reviewed-by: Matthew Wilcox (Oracle) Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Documentation/admin-guide/index.rst | 1 + .../{filesystems/xfs.txt => admin-guide/xfs.rst} | 132 ++++++++++----------- Documentation/filesystems/dax.txt | 2 +- MAINTAINERS | 3 +- 4 files changed, 67 insertions(+), 71 deletions(-) commit 1c230208f53de479352cdb7fa2f851005df7cdc9 Author: Darrick J. Wong Date: Mon Jul 15 08:50:57 2019 -0700 iomap: start moving code to fs/iomap/ Create the build infrastructure we need to start migrating iomap code to fs/iomap/ from fs/iomap.c. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig MAINTAINERS | 1 + fs/Makefile | 1 + fs/iomap/Makefile | 5 +++++ 3 files changed, 7 insertions(+) commit c7ca0b614513afba57824cae68447f9c32b1ee61 Author: Andy Lutomirski Date: Mon Jul 15 07:21:44 2019 -0700 Revert "x86/ptrace: Prevent ptrace from clearing the FS/GS selector" and fix the test This reverts commit 48f5e52e916b55fb73754833efbacc7f8081a159. The ptrace ABI change was a prerequisite to the proposed design for FSGSBASE. Since FSGSBASE support has been reverted, and since I'm not convinced that the ABI was ever adequately tested, revert the ABI change as well. This also modifies the test case so that it tests the preexisting behavior. Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/fca39c478ea7fb15bc76fe8a36bd180810a067f6.1563200250.git.luto@kernel.org arch/x86/kernel/ptrace.c | 14 ++++++++++++-- tools/testing/selftests/x86/fsgsbase.c | 22 ++++------------------ 2 files changed, 16 insertions(+), 20 deletions(-) commit 79ba2a2185432e8ea40e35eb261f10076d205ea3 Author: Eric Sandeen Date: Fri Jul 12 15:07:05 2019 -0700 xfs: sync up xfs_trans_inode with userspace Add an XFS_ICHGTIME_CREATE case to xfs_trans_ichgtime() to keep in sync with userspace. (Currently no kernel caller sends this flag.) Signed-off-by: Eric Sandeen Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_trans_inode.c | 4 ++++ 1 file changed, 4 insertions(+) commit 3f6d70e88555d2513b0199c0c383602bf8aec059 Author: Eric Sandeen Date: Fri Jul 12 15:07:05 2019 -0700 xfs: move xfs_trans_inode.c to libxfs/ Userspace now has an identical xfs_trans_inode.c which it has already moved to libxfs/ so do the same move for kernelspace. Signed-off-by: Eric Sandeen Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/Makefile | 4 ++-- fs/xfs/{ => libxfs}/xfs_trans_inode.c | 0 2 files changed, 2 insertions(+), 2 deletions(-) commit e10337daefecb47209fd2af5f4fab0d1a370737f Author: Jann Horn Date: Wed Apr 10 09:56:27 2019 -0700 LSM: SafeSetID: fix use of literal -1 in capable hook The capable() hook returns an error number. -EPERM is actually the same as -1, so this doesn't make a difference in behavior. Signed-off-by: Jann Horn Signed-off-by: Micah Morton security/safesetid/lsm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4f72123da579655855301b591535a1415224f123 Author: Jann Horn Date: Thu Apr 11 13:12:43 2019 -0700 LSM: SafeSetID: verify transitive constrainedness Someone might write a ruleset like the following, expecting that it securely constrains UID 1 to UIDs 1, 2 and 3: 1:2 1:3 However, because no constraints are applied to UIDs 2 and 3, an attacker with UID 1 can simply first switch to UID 2, then switch to any UID from there. The secure way to write this ruleset would be: 1:2 1:3 2:2 3:3 , which uses "transition to self" as a way to inhibit the default-allow policy without allowing anything specific. This is somewhat unintuitive. To make sure that policy authors don't accidentally write insecure policies because of this, let the kernel verify that a new ruleset does not contain any entries that are constrained, but transitively unconstrained. Signed-off-by: Jann Horn Signed-off-by: Micah Morton security/safesetid/securityfs.c | 38 +++++++++++++++++++++- tools/testing/selftests/safesetid/safesetid-test.c | 4 ++- 2 files changed, 40 insertions(+), 2 deletions(-) commit fbd9acb2dc2aa55902c48a83f157082849209fba Author: Jann Horn Date: Thu Apr 11 13:11:54 2019 -0700 LSM: SafeSetID: add read handler For debugging a running system, it is very helpful to be able to see what policy the system is using. Add a read handler that can dump out a copy of the loaded policy. Signed-off-by: Jann Horn Signed-off-by: Micah Morton security/safesetid/lsm.h | 1 + security/safesetid/securityfs.c | 35 +++++++++++++++++++++++++++++++---- 2 files changed, 32 insertions(+), 4 deletions(-) commit 03638e62f55f27e7a96d6b1175e75b7a81e562b3 Author: Jann Horn Date: Wed Apr 10 09:56:05 2019 -0700 LSM: SafeSetID: rewrite userspace API to atomic updates The current API of the SafeSetID LSM uses one write() per rule, and applies each written rule instantly. This has several downsides: - While a policy is being loaded, once a single parent-child pair has been loaded, the parent is restricted to that specific child, even if subsequent rules would allow transitions to other child UIDs. This means that during policy loading, set*uid() can randomly fail. - To replace the policy without rebooting, it is necessary to first flush all old rules. This creates a time window in which no constraints are placed on the use of CAP_SETUID. - If we want to perform sanity checks on the final policy, this requires that the policy isn't constructed in a piecemeal fashion without telling the kernel when it's done. Other kernel APIs - including things like the userns code and netfilter - avoid this problem by performing updates atomically. Luckily, SafeSetID hasn't landed in a stable (upstream) release yet, so maybe it's not too late to completely change the API. The new API for SafeSetID is: If you want to change the policy, open "safesetid/whitelist_policy" and write the entire policy, newline-delimited, in there. Signed-off-by: Jann Horn Signed-off-by: Micah Morton security/safesetid/lsm.c | 84 +++------ security/safesetid/lsm.h | 24 +-- security/safesetid/securityfs.c | 194 ++++++++++++--------- tools/testing/selftests/safesetid/safesetid-test.c | 16 +- 4 files changed, 149 insertions(+), 169 deletions(-) commit 71a98971b932174e121bc19056475c601598132f Author: Jann Horn Date: Wed Apr 10 09:55:58 2019 -0700 LSM: SafeSetID: fix userns handling in securityfs Looking at current_cred() in write handlers is bad form, stop doing that. Also, let's just require that the write is coming from the initial user namespace. Especially SAFESETID_WHITELIST_FLUSH requires privilege over all namespaces, and SAFESETID_WHITELIST_ADD should probably require it as well. Signed-off-by: Jann Horn Signed-off-by: Micah Morton security/safesetid/securityfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 78ae7df96d647627ceae0b65eea9e4f83a0a4b66 Author: Jann Horn Date: Wed Apr 10 09:55:48 2019 -0700 LSM: SafeSetID: refactor policy parsing In preparation for changing the policy parsing logic, refactor the line parsing logic to be less verbose and move it into a separate function. Signed-off-by: Jann Horn Signed-off-by: Micah Morton security/safesetid/securityfs.c | 84 ++++++++++++++++------------------------- 1 file changed, 33 insertions(+), 51 deletions(-) commit 8068866c4af124345e2a129be921278aada7830f Author: Jann Horn Date: Wed Apr 10 09:55:41 2019 -0700 LSM: SafeSetID: refactor safesetid_security_capable() At the moment, safesetid_security_capable() has two nested conditional blocks, and one big comment for all the logic. Chop it up and reduce the amount of indentation. Signed-off-by: Jann Horn Signed-off-by: Micah Morton security/safesetid/lsm.c | 41 ++++++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 15 deletions(-) commit 1cd02a27a9473fed0294561137cfb7dcc9b3aaa0 Author: Jann Horn Date: Wed Apr 10 09:55:34 2019 -0700 LSM: SafeSetID: refactor policy hash table parent_kuid and child_kuid are kuids, there is no reason to make them uint64_t. (And anyway, in the kernel, the normal name for that would be u64, not uint64_t.) check_setuid_policy_hashtable_key() and check_setuid_policy_hashtable_key_value() are basically the same thing, merge them. Also fix the comment that claimed that (1<<8)==128. Signed-off-by: Jann Horn Signed-off-by: Micah Morton security/safesetid/lsm.c | 62 ++++++++++++++---------------------------------- security/safesetid/lsm.h | 19 +++++++++++++++ 2 files changed, 37 insertions(+), 44 deletions(-) commit 7ef6b3062fb9f0b9dbaaec182495189459100807 Author: Jann Horn Date: Wed Apr 10 09:55:19 2019 -0700 LSM: SafeSetID: fix check for setresuid(new1, new2, new3) With the old code, when a process with the (real,effective,saved) UID set (1,1,1) calls setresuid(2,3,4), safesetid_task_fix_setuid() only checks whether the transition 1->2 is permitted; the transitions 1->3 and 1->4 are not checked. Fix this. This is also a good opportunity to refactor safesetid_task_fix_setuid() to be less verbose - having one branch per set*uid() syscall is unnecessary. Note that this slightly changes semantics: The UID transition check for UIDs that were not in the old cred struct is now always performed against the policy of the RUID. I think that's more consistent anyway, since the RUID is also the one that decides whether any policy is enforced at all. Signed-off-by: Jann Horn Signed-off-by: Micah Morton security/safesetid/lsm.c | 125 +++++++++++++---------------------------------- 1 file changed, 35 insertions(+), 90 deletions(-) commit c783d525f9e7e1fd6a5dc3379f3c1fb041495b76 Author: Jann Horn Date: Wed Apr 10 09:54:34 2019 -0700 LSM: SafeSetID: fix pr_warn() to include newline Fix the pr_warn() calls in the SafeSetID LSM to have newlines at the end. Without this, denial messages will be buffered as incomplete lines in log_output(), and will then only show up once something else prints into dmesg. Signed-off-by: Jann Horn Signed-off-by: Micah Morton security/safesetid/lsm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 50c8000744463aa8534de0d739b50ed4f06f8275 Author: Trond Myklebust Date: Thu Jul 11 19:02:18 2019 -0400 NFSv4: Validate the stateid before applying it to state recovery If the stateid is the zero or invalid stateid, then it is pointless to attempt to use it for recovery. In that case, try to fall back to using the open state stateid, or just doing a general recovery of all state on a given inode. Signed-off-by: Trond Myklebust fs/nfs/nfs4proc.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) commit 168869492e7009b6861b615f1d030c99bc805e83 Author: Mauro Carvalho Chehab Date: Tue Jul 9 13:25:51 2019 -0300 docs: kbuild: fix build with pdf and fix some minor issues The tag ".. include" should be replaced by ".. literalinclude" at issues.rst, otherwise it causes TeX to crash due to excessive usage of stack with Sphinx 2.0. While here, solve a few minor issues at the kbuild book output by adding extra blank lines. Signed-off-by: Mauro Carvalho Chehab Documentation/kbuild/issues.rst | 20 ++++++++++++-------- Documentation/kbuild/kbuild.rst | 3 ++- Documentation/kbuild/kconfig-language.rst | 12 ++++++++++++ Documentation/kbuild/kconfig.rst | 8 ++++++-- Documentation/kbuild/makefiles.rst | 1 + 5 files changed, 33 insertions(+), 11 deletions(-) commit 8bb0776b8b27d548c7e65828ec3a02cb31fe3eed Author: Mauro Carvalho Chehab Date: Tue Jul 9 12:36:09 2019 -0300 docs: block: fix pdf output Add an extra blank line and use a markup for the enumberated list, in order to make it possible to build the block book on pdf format. Signed-off-by: Mauro Carvalho Chehab Documentation/block/biodoc.rst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 38cbfed28b3178dd9004064b1a72a992a3b31969 Author: Mauro Carvalho Chehab Date: Tue Jul 9 12:22:41 2019 -0300 docs: arm: fix a breakage with pdf output Add an extra blank line, as otherwise XeLaTex will complain with: ! LaTeX Error: Too deeply nested. Signed-off-by: Mauro Carvalho Chehab Documentation/arm/spear/overview.rst | 1 + 1 file changed, 1 insertion(+) commit eddeed127b06ea2542dc18f2fe37d383b6369fec Author: Mauro Carvalho Chehab Date: Sat Jul 6 13:38:56 2019 -0300 docs: don't use nested tables Nested tables aren't supported for pdf output on Sphinx 1.7.9: admin-guide/laptops/sonypi:: nested tables are not yet implemented. admin-guide/laptops/toshiba_haps:: nested tables are not yet implemented. driver-api/nvdimm/btt:: nested tables are not yet implemented. s390/debugging390:: nested tables are not yet implemented. Signed-off-by: Mauro Carvalho Chehab Acked-by: Andy Shevchenko # laptops Documentation/admin-guide/laptops/sonypi.rst | 28 ++++++++++------------ Documentation/admin-guide/laptops/toshiba_haps.rst | 8 +++---- Documentation/driver-api/nvdimm/btt.rst | 2 +- Documentation/s390/debugging390.rst | 2 +- 4 files changed, 19 insertions(+), 21 deletions(-) commit c2746a1eb741759590e8766958232d06a71840d5 Author: Mauro Carvalho Chehab Date: Fri Jun 28 08:14:42 2019 -0300 docs: gpio: add sysfs interface to the admin-guide While this is stated as obsoleted, the sysfs interface described there is still valid, and belongs to the admin-guide. Signed-off-by: Mauro Carvalho Chehab Acked-by: Linus Walleij Documentation/ABI/obsolete/sysfs-gpio | 2 +- Documentation/{ => admin-guide}/gpio/index.rst | 2 +- Documentation/{ => admin-guide}/gpio/sysfs.rst | 0 Documentation/admin-guide/index.rst | 1 + Documentation/firmware-guide/acpi/enumeration.rst | 2 +- Documentation/translations/zh_CN/gpio.txt | 4 ++-- MAINTAINERS | 2 +- 7 files changed, 7 insertions(+), 6 deletions(-) commit 4c68060bf6d3eac6e86b995a200eb21b847236da Author: Mauro Carvalho Chehab Date: Fri Jun 28 07:29:15 2019 -0300 docs: locking: add it to the main index The locking directory is part of the Kernel API bookset. Add it to the index file. Signed-off-by: Mauro Carvalho Chehab Documentation/index.rst | 1 + Documentation/locking/index.rst | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit 113094f743fc97559c068ad20fd2808b64f6989d Author: Mauro Carvalho Chehab Date: Fri Jun 28 08:36:50 2019 -0300 docs: add some directories to the main documentation index The contents of those directories were orphaned at the documentation body. While those directories could likely be moved to be inside some guide, I'm opting to just adding their indexes to the main one, removing the :orphan: and adding the SPDX header. For the drivers, the rationale is that the documentation contains a mix of Kernelspace, uAPI and admin-guide. So, better to keep them on separate directories, as we've be doing with similar subsystem-specific docs that were not split yet. For the others, well... I'm too lazy to do the move. Also, it seems to make sense to keep at least some of those at the main dir (like kbuild, for example). In any case, a latter patch could do the move. Signed-off-by: Mauro Carvalho Chehab Acked-by: Bartlomiej Zolnierkiewicz Documentation/cdrom/index.rst | 2 +- Documentation/fault-injection/index.rst | 2 +- Documentation/fb/index.rst | 2 +- Documentation/fpga/index.rst | 2 +- Documentation/ide/index.rst | 2 +- Documentation/index.rst | 13 +++++++++++++ Documentation/kbuild/index.rst | 2 +- Documentation/livepatch/index.rst | 2 +- Documentation/netlabel/index.rst | 2 +- Documentation/pcmcia/index.rst | 2 +- Documentation/target/index.rst | 2 +- Documentation/timers/index.rst | 2 +- Documentation/watchdog/index.rst | 2 +- 13 files changed, 25 insertions(+), 12 deletions(-) commit 7e042736faab9457dd754668b9db2a1113cd322b Author: Mauro Carvalho Chehab Date: Fri Jun 28 07:13:34 2019 -0300 docs: add SPDX tags to new index files All those new files I added are under GPL v2.0 license. Add the corresponding SPDX headers to them. Signed-off-by: Mauro Carvalho Chehab Documentation/admin-guide/blockdev/drbd/figures.rst | 2 ++ Documentation/admin-guide/blockdev/index.rst | 2 ++ Documentation/admin-guide/laptops/index.rst | 1 + Documentation/admin-guide/namespaces/index.rst | 2 ++ Documentation/admin-guide/perf/index.rst | 2 ++ Documentation/arm/index.rst | 2 ++ Documentation/arm/nwfpe/index.rst | 2 ++ Documentation/arm/omap/index.rst | 2 ++ Documentation/arm/sa1100/index.rst | 2 ++ Documentation/arm/samsung-s3c24xx/index.rst | 2 ++ Documentation/arm/samsung/index.rst | 2 ++ Documentation/driver-api/early-userspace/index.rst | 2 ++ Documentation/driver-api/md/index.rst | 2 ++ Documentation/driver-api/memory-devices/index.rst | 2 ++ Documentation/driver-api/mmc/index.rst | 2 ++ Documentation/driver-api/mtd/index.rst | 2 ++ Documentation/driver-api/nfc/index.rst | 2 ++ Documentation/driver-api/nvdimm/index.rst | 2 ++ Documentation/driver-api/phy/index.rst | 2 ++ Documentation/driver-api/rapidio/index.rst | 2 ++ Documentation/ia64/index.rst | 2 ++ 21 files changed, 41 insertions(+) commit 652a49bc68ce3cf0355bde357b3998bd63e73915 Author: Mauro Carvalho Chehab Date: Tue Jun 18 15:03:13 2019 -0300 docs: add a memory-devices subdir to driver-api There are two docs describing memory device drivers. Add both to this new chapter of the driver-api. Signed-off-by: Mauro Carvalho Chehab Documentation/driver-api/index.rst | 1 + Documentation/driver-api/memory-devices/index.rst | 16 ++++++++++++++++ .../{ => driver-api}/memory-devices/ti-emif.rst | 2 +- .../memory-devices}/ti-gpmc.rst | 2 +- 4 files changed, 19 insertions(+), 2 deletions(-) commit 4745dc8abb0a0a9851c07265eea01d844886d5c8 Author: Mauro Carvalho Chehab Date: Thu Jun 27 16:36:04 2019 -0300 docs: phy: place documentation under driver-api This subsystem-specific documentation belongs to the driver-api. Signed-off-by: Mauro Carvalho Chehab Documentation/devicetree/bindings/phy/phy-bindings.txt | 2 +- Documentation/devicetree/bindings/phy/phy-pxa-usb.txt | 2 +- Documentation/driver-api/index.rst | 1 + Documentation/driver-api/phy/index.rst | 16 ++++++++++++++++ Documentation/{phy.txt => driver-api/phy/phy.rst} | 0 Documentation/{ => driver-api}/phy/samsung-usb2.rst | 0 Documentation/index.rst | 1 - MAINTAINERS | 2 +- 8 files changed, 20 insertions(+), 4 deletions(-) commit 65388dad1bbb51a4eb6cc91b9fa865b57646fb67 Author: Mauro Carvalho Chehab Date: Thu Jun 27 16:31:35 2019 -0300 docs: serial: move it to the driver-api The contents of this directory is mostly driver-api stuff. Signed-off-by: Mauro Carvalho Chehab Documentation/driver-api/index.rst | 1 + Documentation/{ => driver-api}/serial/cyclades_z.rst | 0 Documentation/{ => driver-api}/serial/driver.rst | 2 +- Documentation/{ => driver-api}/serial/index.rst | 2 +- Documentation/{ => driver-api}/serial/moxa-smartio.rst | 0 Documentation/{ => driver-api}/serial/n_gsm.rst | 0 Documentation/{ => driver-api}/serial/rocket.rst | 0 Documentation/{ => driver-api}/serial/serial-iso7816.rst | 0 Documentation/{ => driver-api}/serial/serial-rs485.rst | 0 Documentation/{ => driver-api}/serial/tty.rst | 0 MAINTAINERS | 6 +++--- drivers/tty/Kconfig | 4 ++-- drivers/tty/serial/ucc_uart.c | 2 +- include/linux/serial_core.h | 2 +- 14 files changed, 10 insertions(+), 9 deletions(-) commit c92992fc609fe99d926855eb1945f38ef4ad8e6c Author: Mauro Carvalho Chehab Date: Mon Apr 22 16:49:11 2019 -0300 docs: driver-api: add remaining converted dirs to it There are a number of driver-specific descriptions that contain a mix of userspace and kernelspace documentation. Just like we did with other similar subsystems, add them at the driver-api groupset, but don't move the directories. Signed-off-by: Mauro Carvalho Chehab Documentation/driver-api/index.rst | 2 ++ Documentation/driver-api/pps.rst | 2 +- Documentation/driver-api/ptp.rst | 2 +- Documentation/index.rst | 3 +++ Documentation/mic/index.rst | 2 -- Documentation/phy/samsung-usb2.rst | 2 -- Documentation/scheduler/index.rst | 2 -- 7 files changed, 7 insertions(+), 8 deletions(-) commit fb8c5327b3c6c78b74a27a3c42e4f32b2cc30a04 Author: Mauro Carvalho Chehab Date: Thu Jun 13 14:40:42 2019 -0300 docs: driver-api: add xilinx driver API documentation The current file there (emmi) provides a description of the driver uAPI and kAPI. Signed-off-by: Mauro Carvalho Chehab Documentation/driver-api/index.rst | 1 + Documentation/{ => driver-api}/xilinx/eemi.rst | 0 Documentation/{ => driver-api}/xilinx/index.rst | 1 - 3 files changed, 1 insertion(+), 1 deletion(-) commit baa293e9544bea71361950d071579f0e4d5713ed Author: Mauro Carvalho Chehab Date: Thu Jun 27 15:39:22 2019 -0300 docs: driver-api: add a series of orphaned documents There are lots of documents under Documentation/*.txt and a few other orphan documents elsehwere that belong to the driver-API book. Move them to their right place. Reviewed-by: Cornelia Huck # vfio-related parts Acked-by: Logan Gunthorpe # switchtec Signed-off-by: Mauro Carvalho Chehab Documentation/ABI/removed/sysfs-class-rfkill | 2 +- Documentation/ABI/stable/sysfs-class-rfkill | 2 +- Documentation/ABI/testing/sysfs-class-switchtec | 2 +- Documentation/admin-guide/kernel-parameters.txt | 2 +- .../admin-guide/laptops/thinkpad-acpi.rst | 6 ++--- .../{bt8xxgpio.txt => driver-api/bt8xxgpio.rst} | 0 .../{connector => driver-api}/connector.rst | 2 +- Documentation/{console => driver-api}/console.rst | 2 +- .../{dcdbas.txt => driver-api/dcdbas.rst} | 0 .../{dell_rbu.txt => driver-api/dell_rbu.rst} | 0 .../{EDID/howto.rst => driver-api/edid.rst} | 2 +- Documentation/{eisa.txt => driver-api/eisa.rst} | 0 Documentation/driver-api/index.rst | 26 ++++++++++++++++++++++ Documentation/{isa.txt => driver-api/isa.rst} | 0 .../{isapnp.txt => driver-api/isapnp.rst} | 0 .../pblk.txt => driver-api/lightnvm-pblk.rst} | 0 .../men-chameleon-bus.rst} | 0 Documentation/{ntb.txt => driver-api/ntb.rst} | 0 Documentation/{nvmem => driver-api}/nvmem.rst | 2 +- .../parport-lowlevel.rst} | 0 .../{pti => driver-api}/pti_intel_mid.rst | 2 +- Documentation/{pwm.txt => driver-api/pwm.rst} | 0 .../{rfkill.txt => driver-api/rfkill.rst} | 0 .../{sgi-ioc4.txt => driver-api/sgi-ioc4.rst} | 0 Documentation/{SM501.txt => driver-api/sm501.rst} | 0 .../smsc_ece1099.rst} | 0 .../{switchtec.txt => driver-api/switchtec.rst} | 2 +- .../{sync_file.txt => driver-api/sync_file.rst} | 0 .../vfio-mediated-device.rst} | 2 +- Documentation/{vfio.txt => driver-api/vfio.rst} | 0 .../{xillybus.txt => driver-api/xillybus.rst} | 0 Documentation/{zorro.txt => driver-api/zorro.rst} | 0 Documentation/fb/fbcon.rst | 4 ++-- Documentation/s390/vfio-ccw.rst | 6 ++--- Documentation/w1/w1.netlink | 2 +- MAINTAINERS | 22 +++++++++--------- drivers/dma-buf/Kconfig | 2 +- drivers/gpio/Kconfig | 2 +- drivers/gpu/drm/Kconfig | 2 +- drivers/pci/switch/Kconfig | 2 +- drivers/platform/x86/Kconfig | 4 ++-- drivers/platform/x86/dcdbas.c | 2 +- drivers/platform/x86/dell_rbu.c | 2 +- drivers/pnp/isapnp/Kconfig | 2 +- drivers/tty/Kconfig | 2 +- drivers/vfio/Kconfig | 2 +- drivers/vfio/mdev/Kconfig | 2 +- drivers/w1/Kconfig | 2 +- samples/Kconfig | 2 +- 49 files changed, 71 insertions(+), 45 deletions(-) commit 4f4cfa6c560c93ba180c30675cf845e1597de44c Author: Mauro Carvalho Chehab Date: Thu Jun 27 14:56:51 2019 -0300 docs: admin-guide: add a series of orphaned documents There are lots of documents that belong to the admin-guide but are on random places (most under Documentation root dir). Move them to the admin guide. Signed-off-by: Mauro Carvalho Chehab Acked-by: Alexandre Belloni Acked-by: Bartlomiej Zolnierkiewicz Documentation/ABI/stable/sysfs-devices-node | 2 +- Documentation/ABI/testing/procfs-diskstats | 2 +- Documentation/ABI/testing/sysfs-block | 2 +- Documentation/ABI/testing/sysfs-devices-system-cpu | 4 ++-- Documentation/{btmrvl.txt => admin-guide/btmrvl.rst} | 0 .../clearing-warn-once.rst} | 0 .../{cpu-load.txt => admin-guide/cpu-load.rst} | 0 .../{cputopology.txt => admin-guide/cputopology.rst} | 0 Documentation/admin-guide/device-mapper/statistics.rst | 4 ++-- .../{efi-stub.txt => admin-guide/efi-stub.rst} | 0 Documentation/{highuid.txt => admin-guide/highuid.rst} | 0 Documentation/admin-guide/hw-vuln/l1tf.rst | 2 +- .../{hw_random.txt => admin-guide/hw_random.rst} | 0 Documentation/admin-guide/index.rst | 17 +++++++++++++++++ Documentation/{iostats.txt => admin-guide/iostats.rst} | 0 Documentation/admin-guide/kernel-parameters.txt | 2 +- .../kernel-per-CPU-kthreads.rst} | 0 .../{auxdisplay => admin-guide}/lcd-panel-cgram.rst | 2 -- Documentation/{ldm.txt => admin-guide/ldm.rst} | 0 .../lockup-watchdogs.rst} | 0 .../{cma/debugfs.rst => admin-guide/mm/cma_debugfs.rst} | 2 -- Documentation/admin-guide/mm/index.rst | 1 + .../{numastat.txt => admin-guide/numastat.rst} | 0 Documentation/{pnp.txt => admin-guide/pnp.rst} | 0 Documentation/{rtc.txt => admin-guide/rtc.rst} | 0 Documentation/{svga.txt => admin-guide/svga.rst} | 0 Documentation/admin-guide/sysctl/kernel.rst | 2 +- .../{video-output.txt => admin-guide/video-output.rst} | 0 Documentation/fb/vesafb.rst | 2 +- Documentation/x86/topology.rst | 2 +- MAINTAINERS | 12 ++++++------ arch/arm/Kconfig | 2 +- arch/parisc/Kconfig | 2 +- arch/sh/Kconfig | 2 +- arch/sparc/Kconfig | 2 +- arch/x86/Kconfig | 4 ++-- block/partitions/Kconfig | 2 +- drivers/char/Kconfig | 4 ++-- drivers/char/hw_random/core.c | 2 +- include/linux/hw_random.h | 2 +- 40 files changed, 47 insertions(+), 33 deletions(-) commit da82c92f1150f66afabf78d2c85ef9ac18dc6d38 Author: Mauro Carvalho Chehab Date: Thu Jun 27 13:08:35 2019 -0300 docs: cgroup-v1: add it to the admin-guide book Those files belong to the admin guide, so add them. Signed-off-by: Mauro Carvalho Chehab Documentation/{ => admin-guide}/cgroup-v1/blkio-controller.rst | 0 Documentation/{ => admin-guide}/cgroup-v1/cgroups.rst | 4 ++-- Documentation/{ => admin-guide}/cgroup-v1/cpuacct.rst | 0 Documentation/{ => admin-guide}/cgroup-v1/cpusets.rst | 2 +- Documentation/{ => admin-guide}/cgroup-v1/devices.rst | 0 Documentation/{ => admin-guide}/cgroup-v1/freezer-subsystem.rst | 0 Documentation/{ => admin-guide}/cgroup-v1/hugetlb.rst | 0 Documentation/{ => admin-guide}/cgroup-v1/index.rst | 2 -- Documentation/{ => admin-guide}/cgroup-v1/memcg_test.rst | 4 ++-- Documentation/{ => admin-guide}/cgroup-v1/memory.rst | 0 Documentation/{ => admin-guide}/cgroup-v1/net_cls.rst | 0 Documentation/{ => admin-guide}/cgroup-v1/net_prio.rst | 0 Documentation/{ => admin-guide}/cgroup-v1/pids.rst | 0 Documentation/{ => admin-guide}/cgroup-v1/rdma.rst | 0 Documentation/admin-guide/cgroup-v2.rst | 2 +- Documentation/admin-guide/index.rst | 1 + Documentation/admin-guide/kernel-parameters.txt | 4 ++-- Documentation/admin-guide/mm/numa_memory_policy.rst | 2 +- Documentation/block/bfq-iosched.rst | 2 +- Documentation/filesystems/tmpfs.txt | 2 +- Documentation/kernel-per-CPU-kthreads.txt | 2 +- Documentation/scheduler/sched-deadline.rst | 2 +- Documentation/scheduler/sched-design-CFS.rst | 2 +- Documentation/scheduler/sched-rt-group.rst | 2 +- Documentation/vm/numa.rst | 4 ++-- Documentation/vm/page_migration.rst | 2 +- Documentation/vm/unevictable-lru.rst | 2 +- Documentation/x86/x86_64/fake-numa-for-cpusets.rst | 4 ++-- MAINTAINERS | 4 ++-- block/Kconfig | 2 +- include/linux/cgroup-defs.h | 2 +- include/uapi/linux/bpf.h | 2 +- init/Kconfig | 4 ++-- kernel/cgroup/cpuset.c | 2 +- security/device_cgroup.c | 2 +- tools/include/uapi/linux/bpf.h | 2 +- 36 files changed, 32 insertions(+), 33 deletions(-) commit 83bbf6e103544d65f17f4b2ccea1c6a51c0b0769 Author: Mauro Carvalho Chehab Date: Thu Jun 27 12:59:40 2019 -0300 docs: aoe: add it to the driver-api book Those files belong to the admin guide, so add them. Signed-off-by: Mauro Carvalho Chehab Acked-by: Justin Sanders Documentation/{ => admin-guide}/aoe/aoe.rst | 4 ++-- Documentation/{ => admin-guide}/aoe/autoload.sh | 0 Documentation/{ => admin-guide}/aoe/examples.rst | 0 Documentation/{ => admin-guide}/aoe/index.rst | 2 -- Documentation/{ => admin-guide}/aoe/status.sh | 0 Documentation/{ => admin-guide}/aoe/todo.rst | 0 Documentation/{ => admin-guide}/aoe/udev-install.sh | 0 Documentation/{ => admin-guide}/aoe/udev.txt | 2 +- Documentation/admin-guide/index.rst | 1 + MAINTAINERS | 2 +- 10 files changed, 5 insertions(+), 6 deletions(-) commit df1b7ce784c220373d202ea9f8bc0c424f2c9f7c Author: Mauro Carvalho Chehab Date: Tue Jun 18 17:16:23 2019 -0300 docs: add some documentation dirs to the driver-api book Those are subsystem docs, with a mix of kABI and user-faced docs. While they're not split, keep the dirs where they are, adding just a pointer to the main index. Signed-off-by: Mauro Carvalho Chehab Documentation/accounting/index.rst | 2 +- Documentation/block/index.rst | 2 +- Documentation/hid/index.rst | 2 +- Documentation/iio/index.rst | 2 +- Documentation/index.rst | 4 ++++ 5 files changed, 8 insertions(+), 4 deletions(-) commit fe34c89d25429e079ba67416529514120dd715f8 Author: Mauro Carvalho Chehab Date: Tue Jun 18 12:34:59 2019 -0300 docs: driver-model: move it to the driver-api book The audience for the Kernel driver-model is clearly Kernel hackers. Signed-off-by: Mauro Carvalho Chehab Acked-by: Jeff Kirsher # ice driver changes Documentation/{ => driver-api}/driver-model/binding.rst | 0 Documentation/{ => driver-api}/driver-model/bus.rst | 0 Documentation/{ => driver-api}/driver-model/class.rst | 0 Documentation/{ => driver-api}/driver-model/design-patterns.rst | 0 Documentation/{ => driver-api}/driver-model/device.rst | 0 Documentation/{ => driver-api}/driver-model/devres.rst | 0 Documentation/{ => driver-api}/driver-model/driver.rst | 0 Documentation/{ => driver-api}/driver-model/index.rst | 2 -- Documentation/{ => driver-api}/driver-model/overview.rst | 0 Documentation/{ => driver-api}/driver-model/platform.rst | 0 Documentation/{ => driver-api}/driver-model/porting.rst | 2 +- Documentation/driver-api/gpio/driver.rst | 2 +- Documentation/driver-api/index.rst | 1 + Documentation/eisa.txt | 4 ++-- Documentation/filesystems/sysfs.txt | 2 +- Documentation/hwmon/submitting-patches.rst | 2 +- Documentation/translations/zh_CN/filesystems/sysfs.txt | 2 +- drivers/base/platform.c | 2 +- drivers/gpio/gpio-cs5535.c | 2 +- drivers/net/ethernet/intel/ice/ice_main.c | 2 +- drivers/staging/unisys/Documentation/overview.txt | 4 ++-- include/linux/device.h | 2 +- include/linux/platform_device.h | 2 +- scripts/coccinelle/free/devm_free.cocci | 2 +- 24 files changed, 16 insertions(+), 17 deletions(-) commit 56198359b64125dd0f9fa991972b61e4bc4fc6b5 Author: Mauro Carvalho Chehab Date: Tue Jun 18 11:44:24 2019 -0300 docs: lp855x-driver.rst: add it to the driver-api book The content of this file is intended for backlight Kernel developers. Signed-off-by: Mauro Carvalho Chehab Documentation/{ => driver-api}/backlight/lp855x-driver.rst | 2 -- Documentation/driver-api/index.rst | 1 + MAINTAINERS | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) commit 2dbc0838bcf24ca59cabc3130cf3b1d6809cdcd4 Author: Mauro Carvalho Chehab Date: Tue Jun 18 11:39:21 2019 -0300 docs: ocxl.rst: add it to the uAPI book The content of this file is user-faced. Signed-off-by: Mauro Carvalho Chehab Acked-by: Andrew Donnellan Documentation/{ => userspace-api}/accelerators/ocxl.rst | 2 -- Documentation/userspace-api/index.rst | 1 + MAINTAINERS | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) commit e8d776f20f92b9c679bcdcbdf3aee5026d5265f5 Author: Mauro Carvalho Chehab Date: Sat Apr 20 09:20:52 2019 -0300 docs: x86: move two x86-specific files to x86 arch dir Those two docs belong to the x86 architecture: Documentation/Intel-IOMMU.txt -> Documentation/x86/intel-iommu.rst Documentation/intel_txt.txt -> Documentation/x86/intel_txt.rst Signed-off-by: Mauro Carvalho Chehab Documentation/x86/index.rst | 2 ++ Documentation/{Intel-IOMMU.txt => x86/intel-iommu.rst} | 0 Documentation/{intel_txt.txt => x86/intel_txt.rst} | 0 MAINTAINERS | 2 +- security/Kconfig | 2 +- 5 files changed, 4 insertions(+), 2 deletions(-) commit 4d3beaa06d3536aa8968d1828a66bd5ccb5036ac Author: Mauro Carvalho Chehab Date: Fri Apr 19 21:39:29 2019 -0300 docs: security: move some books to it and update The following files belong to security: Documentation/security/LSM.rst -> Documentation/security/lsm-development.rst Documentation/lsm.txt -> Documentation/security/lsm.rst Documentation/SAK.txt -> Documentation/security/sak.rst Documentation/siphash.txt -> Documentation/security/siphash.rst Signed-off-by: Mauro Carvalho Chehab Documentation/security/index.rst | 5 ++++- Documentation/security/{LSM.rst => lsm-development.rst} | 0 Documentation/{lsm.txt => security/lsm.rst} | 0 Documentation/{SAK.txt => security/sak.rst} | 0 Documentation/{siphash.txt => security/siphash.rst} | 0 Documentation/security/tpm/index.rst | 1 + Documentation/security/tpm/xen-tpmfront.rst | 2 -- 7 files changed, 5 insertions(+), 3 deletions(-) commit e7751617dd0599ceadf4221cb08e04307b00aa1f Author: Mauro Carvalho Chehab Date: Tue Jun 18 11:47:10 2019 -0300 docs: blockdev: add it to the admin-guide The blockdev book basically contains user-faced documentation. Signed-off-by: Mauro Carvalho Chehab .../blockdev/drbd/DRBD-8.3-data-packets.svg | 0 .../blockdev/drbd/DRBD-data-packets.svg | 0 .../{ => admin-guide}/blockdev/drbd/conn-states-8.dot | 0 .../blockdev/drbd/data-structure-v9.rst | 0 .../{ => admin-guide}/blockdev/drbd/disk-states-8.dot | 0 .../blockdev/drbd/drbd-connection-state-overview.dot | 0 .../{ => admin-guide}/blockdev/drbd/figures.rst | 0 .../{ => admin-guide}/blockdev/drbd/index.rst | 0 .../{ => admin-guide}/blockdev/drbd/node-states-8.dot | 1 - Documentation/{ => admin-guide}/blockdev/floppy.rst | 0 Documentation/{ => admin-guide}/blockdev/index.rst | 2 -- Documentation/{ => admin-guide}/blockdev/nbd.rst | 0 Documentation/{ => admin-guide}/blockdev/paride.rst | 0 Documentation/{ => admin-guide}/blockdev/ramdisk.rst | 0 Documentation/{ => admin-guide}/blockdev/zram.rst | 0 Documentation/admin-guide/index.rst | 1 + Documentation/admin-guide/kernel-parameters.txt | 18 +++++++++--------- MAINTAINERS | 10 +++++----- drivers/block/Kconfig | 8 ++++---- drivers/block/floppy.c | 2 +- drivers/block/zram/Kconfig | 6 +++--- tools/testing/selftests/zram/README | 2 +- 22 files changed, 24 insertions(+), 26 deletions(-) commit 330d48105245abfb8c9ca491dc53ea500657217a Author: Mauro Carvalho Chehab Date: Thu Jun 13 15:21:39 2019 -0300 docs: admin-guide: add kdump documentation into it The Kdump documentation describes procedures with admins use in order to solve issues on their systems. Signed-off-by: Mauro Carvalho Chehab Documentation/admin-guide/bug-hunting.rst | 4 ++-- Documentation/admin-guide/index.rst | 1 + Documentation/{ => admin-guide}/kdump/gdbmacros.txt | 0 Documentation/{ => admin-guide}/kdump/index.rst | 1 - Documentation/{ => admin-guide}/kdump/kdump.rst | 0 Documentation/{ => admin-guide}/kdump/vmcoreinfo.rst | 0 Documentation/admin-guide/kernel-parameters.txt | 6 +++--- Documentation/powerpc/firmware-assisted-dump.txt | 2 +- Documentation/translations/zh_CN/oops-tracing.txt | 4 ++-- MAINTAINERS | 2 +- arch/arm/Kconfig | 2 +- arch/arm64/Kconfig | 2 +- arch/sh/Kconfig | 2 +- arch/x86/Kconfig | 4 ++-- 14 files changed, 15 insertions(+), 15 deletions(-) commit 9e1cbede267916e737c4a755059418da3ac4de95 Author: Mauro Carvalho Chehab Date: Thu Jun 13 15:07:43 2019 -0300 docs: admin-guide: add laptops documentation The docs under Documentation/laptops contain users specific information. Signed-off-by: Mauro Carvalho Chehab Acked-by: Andy Shevchenko Documentation/ABI/testing/sysfs-block-device | 2 +- Documentation/ABI/testing/sysfs-platform-asus-laptop | 2 +- Documentation/admin-guide/index.rst | 1 + Documentation/admin-guide/kernel-parameters.txt | 2 +- Documentation/{ => admin-guide}/laptops/asus-laptop.rst | 0 Documentation/{ => admin-guide}/laptops/disk-shock-protection.rst | 0 Documentation/{ => admin-guide}/laptops/index.rst | 1 - Documentation/{ => admin-guide}/laptops/laptop-mode.rst | 0 Documentation/{ => admin-guide}/laptops/lg-laptop.rst | 1 - Documentation/{ => admin-guide}/laptops/sony-laptop.rst | 0 Documentation/{ => admin-guide}/laptops/sonypi.rst | 0 Documentation/{ => admin-guide}/laptops/thinkpad-acpi.rst | 0 Documentation/{ => admin-guide}/laptops/toshiba_haps.rst | 0 Documentation/admin-guide/sysctl/vm.rst | 4 ++-- MAINTAINERS | 4 ++-- drivers/char/Kconfig | 2 +- drivers/platform/x86/Kconfig | 4 ++-- 17 files changed, 11 insertions(+), 12 deletions(-) commit 570432470275c3da15b85362bc1461945b9c1919 Author: Mauro Carvalho Chehab Date: Mon Apr 22 16:48:00 2019 -0300 docs: admin-guide: move sysctl directory to it The stuff under sysctl describes /sys interface from userspace point of view. So, add it to the admin-guide and remove the :orphan: from its index file. Signed-off-by: Mauro Carvalho Chehab CREDITS | 2 +- Documentation/admin-guide/index.rst | 1 + Documentation/admin-guide/kernel-parameters.txt | 2 +- Documentation/admin-guide/mm/index.rst | 2 +- Documentation/admin-guide/mm/ksm.rst | 2 +- Documentation/{ => admin-guide}/sysctl/abi.rst | 0 Documentation/{ => admin-guide}/sysctl/fs.rst | 0 Documentation/{ => admin-guide}/sysctl/index.rst | 2 -- Documentation/{ => admin-guide}/sysctl/kernel.rst | 0 Documentation/{ => admin-guide}/sysctl/net.rst | 0 Documentation/{ => admin-guide}/sysctl/sunrpc.rst | 0 Documentation/{ => admin-guide}/sysctl/user.rst | 0 Documentation/{ => admin-guide}/sysctl/vm.rst | 0 Documentation/core-api/printk-formats.rst | 2 +- Documentation/filesystems/proc.txt | 2 +- Documentation/networking/ip-sysctl.txt | 2 +- Documentation/vm/unevictable-lru.rst | 2 +- fs/proc/Kconfig | 2 +- kernel/panic.c | 2 +- mm/swap.c | 2 +- 20 files changed, 12 insertions(+), 13 deletions(-) commit ec4b78a0e7dd4751423089b7cfd32168f9052377 Author: Mauro Carvalho Chehab Date: Tue Jun 18 15:00:25 2019 -0300 docs: early-userspace: move to driver-api guide Those documents describe a kAPI. So, add to the driver-api book. Signed-off-by: Mauro Carvalho Chehab Documentation/{ => driver-api}/early-userspace/buffer-format.rst | 0 .../{ => driver-api}/early-userspace/early_userspace_support.rst | 0 Documentation/{ => driver-api}/early-userspace/index.rst | 2 -- Documentation/driver-api/index.rst | 1 + Documentation/filesystems/nfs/nfsroot.txt | 2 +- Documentation/filesystems/ramfs-rootfs-initramfs.txt | 4 ++-- usr/Kconfig | 2 +- 7 files changed, 5 insertions(+), 6 deletions(-) commit 6cf2a73cb2bc422a03984b285a63632c27f8c4e4 Author: Mauro Carvalho Chehab Date: Tue Jun 18 12:40:23 2019 -0300 docs: device-mapper: move it to the admin-guide The DM support describes lots of aspects related to mapped disk partitions from the userspace PoV. Signed-off-by: Mauro Carvalho Chehab Documentation/{ => admin-guide}/device-mapper/cache-policies.rst | 0 Documentation/{ => admin-guide}/device-mapper/cache.rst | 0 Documentation/{ => admin-guide}/device-mapper/delay.rst | 0 Documentation/{ => admin-guide}/device-mapper/dm-crypt.rst | 0 Documentation/{ => admin-guide}/device-mapper/dm-dust.txt | 0 Documentation/{ => admin-guide}/device-mapper/dm-flakey.rst | 0 Documentation/{ => admin-guide}/device-mapper/dm-init.rst | 0 Documentation/{ => admin-guide}/device-mapper/dm-integrity.rst | 0 Documentation/{ => admin-guide}/device-mapper/dm-io.rst | 0 Documentation/{ => admin-guide}/device-mapper/dm-log.rst | 0 Documentation/{ => admin-guide}/device-mapper/dm-queue-length.rst | 0 Documentation/{ => admin-guide}/device-mapper/dm-raid.rst | 0 Documentation/{ => admin-guide}/device-mapper/dm-service-time.rst | 0 Documentation/{ => admin-guide}/device-mapper/dm-uevent.rst | 0 Documentation/{ => admin-guide}/device-mapper/dm-zoned.rst | 0 Documentation/{ => admin-guide}/device-mapper/era.rst | 0 Documentation/{ => admin-guide}/device-mapper/index.rst | 2 -- Documentation/{ => admin-guide}/device-mapper/kcopyd.rst | 0 Documentation/{ => admin-guide}/device-mapper/linear.rst | 0 Documentation/{ => admin-guide}/device-mapper/log-writes.rst | 0 Documentation/{ => admin-guide}/device-mapper/persistent-data.rst | 0 Documentation/{ => admin-guide}/device-mapper/snapshot.rst | 0 Documentation/{ => admin-guide}/device-mapper/statistics.rst | 0 Documentation/{ => admin-guide}/device-mapper/striped.rst | 0 Documentation/{ => admin-guide}/device-mapper/switch.rst | 0 Documentation/{ => admin-guide}/device-mapper/thin-provisioning.rst | 0 Documentation/{ => admin-guide}/device-mapper/unstriped.rst | 0 Documentation/{ => admin-guide}/device-mapper/verity.rst | 0 Documentation/{ => admin-guide}/device-mapper/writecache.rst | 0 Documentation/{ => admin-guide}/device-mapper/zero.rst | 0 Documentation/admin-guide/index.rst | 1 + MAINTAINERS | 2 +- drivers/md/Kconfig | 2 +- drivers/md/dm-init.c | 2 +- drivers/md/dm-raid.c | 2 +- 35 files changed, 5 insertions(+), 6 deletions(-) commit 159a5e78bdcabb1f87ee5536182a99a307ae0bac Author: Mauro Carvalho Chehab Date: Mon Apr 22 16:10:26 2019 -0300 docs: add arch doc directories to the index Now that several arch documents were converted to ReST, add their indexes to Documentation/index.rst and remove the :orphan: from them. Signed-off-by: Mauro Carvalho Chehab Documentation/arm/index.rst | 2 -- Documentation/arm64/index.rst | 2 -- Documentation/ia64/index.rst | 2 -- Documentation/index.rst | 9 +++++++++ Documentation/m68k/index.rst | 2 +- Documentation/riscv/index.rst | 2 -- Documentation/s390/index.rst | 2 -- Documentation/sparc/index.rst | 2 -- Documentation/xtensa/index.rst | 2 +- 9 files changed, 11 insertions(+), 14 deletions(-) commit 127e62174041496b383f82d696e1592ce6838604 Author: Farhan Ali Date: Thu Jul 11 10:28:55 2019 -0400 vfio-ccw: Update documentation for csch/hsch We now support CLEAR SUBCHANNEL and HALT SUBCHANNEL via ccw_cmd_region. Fixes: d5afd5d135c8 ("vfio-ccw: add handling for async channel instructions") Signed-off-by: Farhan Ali Message-Id: <7d977612c3f3152ffb950d77ae11b4b25c1e20c4.1562854091.git.alifm@linux.ibm.com> [CH: properly mark region as literal block] Reviewed-by: Cornelia Huck Reviewed-by: Eric Farman Signed-off-by: Cornelia Huck Documentation/s390/vfio-ccw.rst | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) commit 9b1f44028ff2e051816517781153e10a2d748dc3 Author: Mauro Carvalho Chehab Date: Tue Jun 18 17:15:10 2019 -0300 docs: interconnect.rst: add it to the driver-api guide This is intended for Kernel hackers audience. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Georgi Djakov Documentation/driver-api/index.rst | 1 + Documentation/{interconnect => driver-api}/interconnect.rst | 2 -- MAINTAINERS | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) commit 616b81db2fa757f48895242ea6aaf3c1a1ad22f4 Author: Mauro Carvalho Chehab Date: Tue Jun 18 17:13:24 2019 -0300 docs: ioctl: add it to the uAPI guide While 100% of its contents is userspace, let's keep the dir at the same place, as this is a well-known location. Signed-off-by: Mauro Carvalho Chehab Documentation/index.rst | 1 + Documentation/ioctl/index.rst | 2 +- Documentation/ioctl/ioctl-number.rst | 2 -- 3 files changed, 2 insertions(+), 3 deletions(-) commit 09fdc957ad0d0ee83c00cd1e0c3a605047f63bf7 Author: Mauro Carvalho Chehab Date: Tue Jun 18 16:51:34 2019 -0300 docs: leds: add it to the driver-api book The contents of leds driver docs is messy: it has lots of admin-guide stuff and kernel internal ones, just like other driver subsystems. I'm opting to keep the dir at the same place and just add a link to it. This makes clearer that this require changes. Signed-off-by: Mauro Carvalho Chehab Documentation/index.rst | 1 + Documentation/leds/index.rst | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit c0b11a50aee643ac40ded5dbcd48189ee0926ee4 Author: Mauro Carvalho Chehab Date: Tue Jun 18 16:50:07 2019 -0300 docs: md: move it to the driver-api book The docs there were meant to be read by a Kernel developer. Signed-off-by: Mauro Carvalho Chehab Documentation/driver-api/index.rst | 1 + Documentation/{ => driver-api}/md/index.rst | 2 -- Documentation/{ => driver-api}/md/md-cluster.rst | 0 Documentation/{ => driver-api}/md/raid5-cache.rst | 0 Documentation/{ => driver-api}/md/raid5-ppl.rst | 0 5 files changed, 1 insertion(+), 2 deletions(-) commit 19024c09c243c5107f738286459a0dd85697b089 Author: Mauro Carvalho Chehab Date: Tue Jun 18 16:48:15 2019 -0300 docs: mmc: move it to the driver-api Most of the stuff here is related to the kAPI. Signed-off-by: Mauro Carvalho Chehab Documentation/driver-api/index.rst | 1 + Documentation/{ => driver-api}/mmc/index.rst | 2 -- Documentation/{ => driver-api}/mmc/mmc-async-req.rst | 0 Documentation/{ => driver-api}/mmc/mmc-dev-attrs.rst | 0 Documentation/{ => driver-api}/mmc/mmc-dev-parts.rst | 0 Documentation/{ => driver-api}/mmc/mmc-tools.rst | 0 6 files changed, 1 insertion(+), 2 deletions(-) commit e253d2c551ce876a374d533fbcc9e8f31142dcad Author: Mauro Carvalho Chehab Date: Tue Jun 18 16:46:30 2019 -0300 docs: nfc: add it to the driver-api book Most of the descriptions here are oriented to a Kernel developer. Signed-off-by: Mauro Carvalho Chehab Documentation/driver-api/index.rst | 1 + Documentation/{ => driver-api}/nfc/index.rst | 2 -- Documentation/{ => driver-api}/nfc/nfc-hci.rst | 0 Documentation/{ => driver-api}/nfc/nfc-pn544.rst | 0 4 files changed, 1 insertion(+), 2 deletions(-) commit 43f6c0787c1781b951d686e8302377fcf85ccb8a Author: Mauro Carvalho Chehab Date: Tue Jun 18 16:40:16 2019 -0300 docs: mtd: move it to the driver-api book While I was tempted to move it to admin-guide, as some docs there are more userspace-faced, there are some very technical discussions about memory error correction code from the Kernel implementer's PoV. So, let's place it inside the driver-api book. Signed-off-by: Mauro Carvalho Chehab Documentation/driver-api/index.rst | 1 + Documentation/{ => driver-api}/mtd/index.rst | 2 -- Documentation/{ => driver-api}/mtd/intel-spi.rst | 0 Documentation/{ => driver-api}/mtd/nand_ecc.rst | 0 Documentation/{ => driver-api}/mtd/spi-nor.rst | 0 drivers/mtd/nand/raw/nand_ecc.c | 2 +- 6 files changed, 2 insertions(+), 3 deletions(-) commit bf6b7a742e3f82b3132e149fb17761e84207f9f1 Author: Mauro Carvalho Chehab Date: Tue Jun 18 16:33:50 2019 -0300 docs: namespace: move it to the admin-guide As stated at the documentation, this is meant to be for users to better understand namespaces. Signed-off-by: Mauro Carvalho Chehab Documentation/admin-guide/index.rst | 1 + Documentation/{ => admin-guide}/namespaces/compatibility-list.rst | 0 Documentation/{ => admin-guide}/namespaces/index.rst | 2 -- Documentation/{ => admin-guide}/namespaces/resource-control.rst | 0 4 files changed, 1 insertion(+), 2 deletions(-) commit ae4a05027e2f883fb5f822e48d67cacc26bf60e1 Author: Mauro Carvalho Chehab Date: Tue Jun 18 16:32:31 2019 -0300 docs: nvdimm: add it to the driver-api book The descriptions here are from Kernel driver's PoV. Signed-off-by: Mauro Carvalho Chehab Acked-by: Dan Williams Documentation/driver-api/index.rst | 1 + Documentation/{ => driver-api}/nvdimm/btt.rst | 0 Documentation/{ => driver-api}/nvdimm/index.rst | 2 -- Documentation/{ => driver-api}/nvdimm/nvdimm.rst | 0 Documentation/{ => driver-api}/nvdimm/security.rst | 0 drivers/nvdimm/Kconfig | 2 +- 6 files changed, 2 insertions(+), 3 deletions(-) commit 59809fe88224db24432ad50e62fd8d5f0df738a1 Author: Mauro Carvalho Chehab Date: Tue Jun 18 16:06:08 2019 -0300 docs: perf: move to the admin-guide The perf infrastructure is used for userspace to track issues. At least a good part of what's described here is related to it. So, add it to the admin-guide. Signed-off-by: Mauro Carvalho Chehab Documentation/admin-guide/index.rst | 1 + Documentation/{ => admin-guide}/perf/arm-ccn.rst | 0 Documentation/{ => admin-guide}/perf/arm_dsu_pmu.rst | 0 Documentation/{ => admin-guide}/perf/hisi-pmu.rst | 0 Documentation/{ => admin-guide}/perf/index.rst | 2 -- Documentation/{ => admin-guide}/perf/qcom_l2_pmu.rst | 0 Documentation/{ => admin-guide}/perf/qcom_l3_pmu.rst | 0 Documentation/{ => admin-guide}/perf/thunderx2-pmu.rst | 0 Documentation/{ => admin-guide}/perf/xgene-pmu.rst | 0 MAINTAINERS | 4 ++-- drivers/perf/qcom_l3_pmu.c | 2 +- 11 files changed, 4 insertions(+), 5 deletions(-) commit d2bdd48a652bd0f7a5c78f3e418b4529fc469e1f Author: Mauro Carvalho Chehab Date: Tue Jun 18 16:03:23 2019 -0300 docs: rapidio: add it to the driver API This is actually a subsystem description, with contains both kAPI and uAPI. While it should ideally be slplit, let's place it at driver-api, as most things are related to kAPI and driver-specific info. Signed-off-by: Mauro Carvalho Chehab Documentation/admin-guide/index.rst | 1 + Documentation/{driver-api => admin-guide}/rapidio.rst | 0 Documentation/driver-api/index.rst | 2 +- Documentation/{ => driver-api}/rapidio/index.rst | 2 -- Documentation/{ => driver-api}/rapidio/mport_cdev.rst | 0 Documentation/{ => driver-api}/rapidio/rapidio.rst | 0 Documentation/{ => driver-api}/rapidio/rio_cm.rst | 0 Documentation/{ => driver-api}/rapidio/sysfs.rst | 0 Documentation/{ => driver-api}/rapidio/tsi721.rst | 0 drivers/rapidio/Kconfig | 2 +- 10 files changed, 3 insertions(+), 4 deletions(-) commit 74684f8ff44e8b9cf85542762ec347b96bd92559 Author: Mauro Carvalho Chehab Date: Wed Jun 26 12:24:01 2019 -0300 docs: logo.txt: rename it to COPYING-logo This file has nothing to do with the Kernel documentation. It contains the copyright permissions for Tux at Documentation/logo.gif. So, rename it accordingly. Signed-off-by: Mauro Carvalho Chehab Documentation/{logo.txt => COPYING-logo} | 0 1 file changed, 0 insertions(+), 0 deletions(-) commit d5ccd65ab6272f21f442695b0022a4f553d818e5 Author: Mauro Carvalho Chehab Date: Fri Apr 19 19:01:18 2019 -0300 docs: move gcc_plugins.txt to core-api and rename to .rst The gcc_plugins.txt file is already a ReST file. Move it to the core-api book while renaming it. Signed-off-by: Mauro Carvalho Chehab Acked-by: Kees Cook Documentation/{gcc-plugins.txt => core-api/gcc-plugins.rst} | 0 Documentation/core-api/index.rst | 1 + MAINTAINERS | 2 +- scripts/gcc-plugins/Kconfig | 2 +- 4 files changed, 3 insertions(+), 2 deletions(-) commit 898bd37a92063e46bc8d7b870781cecd66234f92 Author: Mauro Carvalho Chehab Date: Thu Apr 18 19:45:00 2019 -0300 docs: block: convert to ReST Rename the block documentation files to ReST, add an index for them and adjust in order to produce a nice html output via the Sphinx build system. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Documentation/admin-guide/kernel-parameters.txt | 8 +- .../block/{bfq-iosched.txt => bfq-iosched.rst} | 66 +++-- Documentation/block/{biodoc.txt => biodoc.rst} | 330 +++++++++++++-------- Documentation/block/{biovecs.txt => biovecs.rst} | 20 +- Documentation/block/capability.rst | 18 ++ Documentation/block/capability.txt | 15 - ...cmdline-partition.txt => cmdline-partition.rst} | 13 +- .../{data-integrity.txt => data-integrity.rst} | 60 ++-- .../{deadline-iosched.txt => deadline-iosched.rst} | 21 +- Documentation/block/index.rst | 25 ++ Documentation/block/{ioprio.txt => ioprio.rst} | 103 ++++--- .../block/{kyber-iosched.txt => kyber-iosched.rst} | 3 +- Documentation/block/{null_blk.txt => null_blk.rst} | 65 ++-- Documentation/block/{pr.txt => pr.rst} | 18 +- .../block/{queue-sysfs.txt => queue-sysfs.rst} | 7 +- Documentation/block/{request.txt => request.rst} | 47 +-- Documentation/block/{stat.txt => stat.rst} | 13 +- .../{switching-sched.txt => switching-sched.rst} | 28 +- ...che_control.txt => writeback_cache_control.rst} | 12 +- Documentation/blockdev/zram.rst | 2 +- MAINTAINERS | 2 +- block/Kconfig | 2 +- block/Kconfig.iosched | 2 +- block/bfq-iosched.c | 2 +- block/blk-integrity.c | 2 +- block/ioprio.c | 2 +- block/mq-deadline.c | 2 +- block/partitions/cmdline.c | 2 +- 28 files changed, 545 insertions(+), 345 deletions(-) commit 53b9537509654a6267c3f56b4d2e7409b9089686 Author: Mauro Carvalho Chehab Date: Thu Apr 18 18:35:54 2019 -0300 docs: sysctl: convert to ReST Rename the /proc/sys/ documentation files to ReST, using the README file as a template for an index.rst, adding the other files there via TOC markup. Despite being written on different times with different styles, try to make them somewhat coherent with a similar look and feel, ensuring that they'll look nice as both raw text file and as via the html output produced by the Sphinx build system. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Documentation/admin-guide/kernel-parameters.txt | 2 +- Documentation/admin-guide/mm/index.rst | 2 +- Documentation/admin-guide/mm/ksm.rst | 2 +- Documentation/core-api/printk-formats.rst | 2 +- Documentation/networking/ip-sysctl.txt | 2 +- Documentation/sysctl/abi.rst | 67 +++++ Documentation/sysctl/abi.txt | 54 ---- Documentation/sysctl/{fs.txt => fs.rst} | 146 +++++----- Documentation/sysctl/{README => index.rst} | 36 ++- Documentation/sysctl/{kernel.txt => kernel.rst} | 372 +++++++++++++----------- Documentation/sysctl/{net.txt => net.rst} | 141 +++++---- Documentation/sysctl/{sunrpc.txt => sunrpc.rst} | 13 +- Documentation/sysctl/{user.txt => user.rst} | 32 +- Documentation/sysctl/{vm.txt => vm.rst} | 260 +++++++++-------- Documentation/vm/unevictable-lru.rst | 2 +- kernel/panic.c | 2 +- mm/swap.c | 2 +- 17 files changed, 653 insertions(+), 484 deletions(-) commit 6baec31591cee0f2f6d446abb81c828499a6ed23 Author: Mauro Carvalho Chehab Date: Thu Apr 18 17:35:40 2019 -0300 docs: perf: convert to ReST Rename the perf documentation files to ReST, add an index for them and adjust in order to produce a nice html output via the Sphinx build system. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Documentation/perf/{arm-ccn.txt => arm-ccn.rst} | 18 ++++++----- .../perf/{arm_dsu_pmu.txt => arm_dsu_pmu.rst} | 5 +-- Documentation/perf/{hisi-pmu.txt => hisi-pmu.rst} | 37 +++++++++++++--------- Documentation/perf/index.rst | 16 ++++++++++ .../perf/{qcom_l2_pmu.txt => qcom_l2_pmu.rst} | 3 +- .../perf/{qcom_l3_pmu.txt => qcom_l3_pmu.rst} | 3 +- .../perf/{thunderx2-pmu.txt => thunderx2-pmu.rst} | 25 ++++++++------- .../perf/{xgene-pmu.txt => xgene-pmu.rst} | 3 +- MAINTAINERS | 4 +-- drivers/perf/qcom_l3_pmu.c | 2 +- 10 files changed, 73 insertions(+), 43 deletions(-) commit 39443104c7d3f2b05a4a330fbcef6da68f80d60b Author: Mauro Carvalho Chehab Date: Thu Apr 18 17:29:24 2019 -0300 docs: blockdev: convert to ReST Rename the blockdev documentation files to ReST, add an index for them and adjust in order to produce a nice html output via the Sphinx build system. The drbd sub-directory contains some graphs and data flows. Add those too to the documentation. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Documentation/admin-guide/kernel-parameters.txt | 18 +- ...data-structure-v9.txt => data-structure-v9.rst} | 6 +- Documentation/blockdev/drbd/figures.rst | 28 +++ .../blockdev/drbd/{README.txt => index.rst} | 15 +- Documentation/blockdev/{floppy.txt => floppy.rst} | 88 +++++---- Documentation/blockdev/index.rst | 16 ++ Documentation/blockdev/{nbd.txt => nbd.rst} | 2 +- Documentation/blockdev/{paride.txt => paride.rst} | 196 ++++++++++++--------- .../blockdev/{ramdisk.txt => ramdisk.rst} | 55 +++--- Documentation/blockdev/{zram.txt => zram.rst} | 195 +++++++++++++------- MAINTAINERS | 8 +- drivers/block/Kconfig | 8 +- drivers/block/floppy.c | 2 +- drivers/block/zram/Kconfig | 6 +- tools/testing/selftests/zram/README | 2 +- 15 files changed, 399 insertions(+), 246 deletions(-) commit e0ae154404c33477473244f286b1193364144289 Author: Mauro Carvalho Chehab Date: Thu Apr 18 16:49:39 2019 -0300 docs: rapidio: convert to ReST Rename the rapidio documentation files to ReST, add an index for them and adjust in order to produce a nice html output via the Sphinx build system. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Documentation/rapidio/index.rst | 15 +++++ .../rapidio/{mport_cdev.txt => mport_cdev.rst} | 47 +++++++-------- Documentation/rapidio/{rapidio.txt => rapidio.rst} | 39 ++++++++----- Documentation/rapidio/{rio_cm.txt => rio_cm.rst} | 66 ++++++++++++++-------- Documentation/rapidio/{sysfs.txt => sysfs.rst} | 4 ++ Documentation/rapidio/{tsi721.txt => tsi721.rst} | 45 ++++++++++----- drivers/rapidio/Kconfig | 2 +- 7 files changed, 141 insertions(+), 77 deletions(-) commit 5c04dceaa152d9dd9fe94dec6594965069e19e9e Author: Mauro Carvalho Chehab Date: Thu Apr 18 11:38:26 2019 -0300 docs: ioctl: convert to ReST Rename the iio documentation files to ReST, add an index for them and adjust in order to produce a nice html output via the Sphinx build system. The cdrom.txt and hdio.txt have their own particular syntax. In order to speedup the conversion, I used a small ancillary perl script: my $d; $d .= $_ while(<>); $d =~ s/(\nCDROM\S+)\s+(\w[^\n]*)/$1\n\t$2\n/g; $d =~ s/(\nHDIO\S+)\s+(\w[^\n]*)/$1\n\t$2\n/g; $d =~ s/(\n\s*usage:)[\s\n]*(\w[^\n]*)/$1:\n\n\t $2\n/g; $d =~ s/(\n\s*)(E\w+[\s\n]*\w[^\n]*)/$1- $2/g; $d =~ s/(\n\s*)(inputs|outputs|notes):\s*(\w[^\n]*)/$1$2:\n\t\t$3\n/g; print $d; It basically add blank lines on a few interesting places. The script is not perfect: still several things require manual work, but it saved quite some time doing some obvious stuff. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab ...tching-up-ioctls.txt => botching-up-ioctls.rst} | 1 + Documentation/ioctl/cdrom.rst | 1233 ++++++++++++++++++++ Documentation/ioctl/cdrom.txt | 967 --------------- Documentation/ioctl/{hdio.txt => hdio.rst} | 835 ++++++++----- Documentation/ioctl/index.rst | 16 + .../{ioctl-decoding.txt => ioctl-decoding.rst} | 13 +- drivers/gpu/drm/drm_ioctl.c | 2 +- 7 files changed, 1814 insertions(+), 1253 deletions(-) commit 08536105d93fe371743709b85350db141bafc51f Author: Mauro Carvalho Chehab Date: Thu Apr 18 11:21:26 2019 -0300 docs: ioctl-number.txt: convert it to ReST format The conversion itself is simple: add a markup for the title of this file and add markups for both tables. Yet, the big table here with IOCTL numbers is badly formatted: on several lines, the "Include File" column has some values that are bigger than the reserved space there. Also, on several places, a comment was misplaced at the "Include File" space. So, most of the work here is to actually ensure that each field will be properly fixed. Also worth to mention that some URLs have the asterisk character on it. Well, Sphinx has an issue with asterisks in the middle of an string. As this is URL, use the alternate format: %2A. As a side effect of this patch, it is now a lot easier to see that some reserved ioctl numbers are missing the include files where it is supposed to be used. PS.: While this is part of a subdir, I opted to convert this single file alone, as this file has a potential of conflicts, as most subsystem maintainers touch it. Signed-off-by: Mauro Carvalho Chehab Documentation/ioctl/ioctl-number.rst | 363 +++++++++++++++++++++ Documentation/ioctl/ioctl-number.txt | 351 -------------------- Documentation/process/submit-checklist.rst | 2 +- .../it_IT/process/submit-checklist.rst | 2 +- .../zh_CN/process/submit-checklist.rst | 2 +- include/uapi/rdma/rdma_user_ioctl_cmds.h | 2 +- 6 files changed, 367 insertions(+), 355 deletions(-) commit f408510c4ff38965289bb53e8462861ad05dfada Author: Mauro Carvalho Chehab Date: Thu Apr 18 14:44:06 2019 -0300 docs: mmc: convert to ReST Rename the mmc documentation files to ReST, add an index for them and adjust in order to produce a nice html output via the Sphinx build system. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Documentation/mmc/index.rst | 13 +++++ .../mmc/{mmc-async-req.txt => mmc-async-req.rst} | 59 +++++++++++++--------- .../mmc/{mmc-dev-attrs.txt => mmc-dev-attrs.rst} | 32 ++++++++---- .../mmc/{mmc-dev-parts.txt => mmc-dev-parts.rst} | 13 ++--- Documentation/mmc/{mmc-tools.txt => mmc-tools.rst} | 5 +- 5 files changed, 82 insertions(+), 40 deletions(-) commit 8ea0afa3b801e9fe3ff676c3e60e74afa1a0848a Author: Mauro Carvalho Chehab Date: Thu Apr 18 14:34:34 2019 -0300 docs: xtensa: convert to ReST Rename the xtensa documentation files to ReST, add an index for them and adjust in order to produce a nice html output via the Sphinx build system. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Documentation/xtensa/{atomctl.txt => atomctl.rst} | 13 +- Documentation/xtensa/{booting.txt => booting.rst} | 5 +- Documentation/xtensa/index.rst | 12 ++ Documentation/xtensa/mmu.rst | 195 ++++++++++++++++++++++ Documentation/xtensa/mmu.txt | 189 --------------------- arch/xtensa/include/asm/initialize_mmu.h | 2 +- 6 files changed, 222 insertions(+), 194 deletions(-) commit b0a4aa950c68b5010831ecfc450510c64e4d80ba Author: Mauro Carvalho Chehab Date: Thu Apr 18 14:21:14 2019 -0300 docs: nvdimm: convert to ReST Rename the nvdimm documentation files to ReST, add an index for them and adjust in order to produce a nice html output via the Sphinx build system. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Acked-by: Dan Williams Documentation/nvdimm/{btt.txt => btt.rst} | 144 +++--- Documentation/nvdimm/index.rst | 12 + Documentation/nvdimm/{nvdimm.txt => nvdimm.rst} | 526 ++++++++++++--------- .../nvdimm/{security.txt => security.rst} | 4 +- drivers/nvdimm/Kconfig | 2 +- 5 files changed, 393 insertions(+), 295 deletions(-) commit 6e58e2d81367308ffd891bd0b34d47e9104e7ae4 Author: Mauro Carvalho Chehab Date: Thu Apr 18 13:44:38 2019 -0300 docs: mtd: convert to ReST Rename the mtd documentation files to ReST, add an index for them and adjust in order to produce a nice html output via the Sphinx build system. It should be noticed that Sphinx doesn't handle very well URLs with dots in the middle. Thankfully, internally, the '.' char is translated to %2E, so we can jus use %2E instead of dots, and this will work fine on both text and processed files. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Documentation/mtd/index.rst | 12 + Documentation/mtd/{intel-spi.txt => intel-spi.rst} | 46 +- Documentation/mtd/{nand_ecc.txt => nand_ecc.rst} | 497 +++++++++++---------- Documentation/mtd/{spi-nor.txt => spi-nor.rst} | 7 +- drivers/mtd/nand/raw/nand_ecc.c | 2 +- 5 files changed, 314 insertions(+), 250 deletions(-) commit 7ed44d59f1959942b8d882e6eeea51616b72e2ec Author: Mauro Carvalho Chehab Date: Thu Apr 18 13:31:33 2019 -0300 docs: md: convert to ReST Rename the md documentation files to ReST, add an index for them and adjust in order to produce a nice html output via the Sphinx build system. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Documentation/md/index.rst | 12 ++ .../md/{md-cluster.txt => md-cluster.rst} | 184 ++++++++++++++------- .../md/{raid5-cache.txt => raid5-cache.rst} | 28 ++-- Documentation/md/{raid5-ppl.txt => raid5-ppl.rst} | 2 + 4 files changed, 151 insertions(+), 75 deletions(-) commit 9e678dd886c11fad6511ffad4d400e3abde81d64 Author: Mauro Carvalho Chehab Date: Thu Apr 18 13:02:23 2019 -0300 docs: nfc: convert to ReST Rename the nfc documentation files to ReST, add an index for them and adjust in order to produce a nice html output via the Sphinx build system. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Documentation/nfc/index.rst | 11 ++ Documentation/nfc/{nfc-hci.txt => nfc-hci.rst} | 167 ++++++++++++--------- Documentation/nfc/{nfc-pn544.txt => nfc-pn544.rst} | 6 +- 3 files changed, 109 insertions(+), 75 deletions(-) commit 20a78ae9ed297f217537211e3304f525326ee517 Author: Mauro Carvalho Chehab Date: Thu Apr 18 12:43:16 2019 -0300 docs: namespaces: convert to ReST Rename the namespaces documentation files to ReST, add an index for them and adjust in order to produce a nice html output via the Sphinx build system. There are two upper case file names. Rename them to lower case, as we're working to avoid upper case file names at Documentation. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab .../{compatibility-list.txt => compatibility-list.rst} | 10 +++++++--- Documentation/namespaces/index.rst | 11 +++++++++++ .../namespaces/{resource-control.txt => resource-control.rst} | 4 ++++ 3 files changed, 22 insertions(+), 3 deletions(-) commit b02f1651ff7758c4db0d759ab765d39986a79f5a Author: Mauro Carvalho Chehab Date: Thu Apr 18 11:12:57 2019 -0300 docs: laptops: convert to ReST Rename the laptops documentation files to ReST, add an index for them and adjust in order to produce a nice html output via the Sphinx build system. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Acked-by: Andy Shevchenko Documentation/ABI/testing/sysfs-block-device | 2 +- .../ABI/testing/sysfs-platform-asus-laptop | 2 +- Documentation/admin-guide/kernel-parameters.txt | 2 +- .../laptops/{asus-laptop.txt => asus-laptop.rst} | 92 ++-- ...ck-protection.txt => disk-shock-protection.rst} | 32 +- Documentation/laptops/index.rst | 17 + .../laptops/{laptop-mode.txt => laptop-mode.rst} | 579 ++++++++++----------- .../laptops/{sony-laptop.txt => sony-laptop.rst} | 58 ++- Documentation/laptops/{sonypi.txt => sonypi.rst} | 28 +- .../{thinkpad-acpi.txt => thinkpad-acpi.rst} | 363 ++++++++----- .../laptops/{toshiba_haps.txt => toshiba_haps.rst} | 47 +- Documentation/sysctl/vm.txt | 4 +- MAINTAINERS | 2 +- drivers/char/Kconfig | 2 +- drivers/platform/x86/Kconfig | 4 +- 15 files changed, 695 insertions(+), 539 deletions(-) commit db9a0975a20c1f21c108b9d44545792d790593e4 Author: Mauro Carvalho Chehab Date: Thu Apr 18 10:10:33 2019 -0300 docs: ia64: convert to ReST Rename the ia64 documentation files to ReST, add an index for them and adjust in order to produce a nice html output via the Sphinx build system. There are two upper case file names. Rename them to lower case, as we're working to avoid upper case file names at Documentation. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Documentation/ia64/{aliasing.txt => aliasing.rst} | 73 +++-- Documentation/ia64/{efirtc.txt => efirtc.rst} | 120 ++++--- .../ia64/{err_inject.txt => err_inject.rst} | 359 ++++++++++----------- Documentation/ia64/{fsys.txt => fsys.rst} | 133 ++++---- Documentation/ia64/{README => ia64.rst} | 26 +- Documentation/ia64/index.rst | 18 ++ .../ia64/{IRQ-redir.txt => irq-redir.rst} | 31 +- Documentation/ia64/{mca.txt => mca.rst} | 10 +- Documentation/ia64/{serial.txt => serial.rst} | 36 ++- Documentation/ia64/xen.rst | 206 ++++++++++++ Documentation/ia64/xen.txt | 183 ----------- MAINTAINERS | 2 +- arch/ia64/kernel/efi.c | 2 +- arch/ia64/kernel/fsys.S | 2 +- arch/ia64/mm/ioremap.c | 2 +- arch/ia64/pci/pci.c | 2 +- 16 files changed, 669 insertions(+), 536 deletions(-) commit c3123552aad3ffd7a35e16d4402231225165e343 Author: Mauro Carvalho Chehab Date: Wed Apr 17 05:46:08 2019 -0300 docs: accounting: convert to ReST Rename the accounting documentation files to ReST, add an index for them and adjust in order to produce a nice html output via the Sphinx build system. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab .../{cgroupstats.txt => cgroupstats.rst} | 14 ++-- .../{delay-accounting.txt => delay-accounting.rst} | 61 ++++++++++------- Documentation/accounting/index.rst | 14 ++++ Documentation/accounting/{psi.txt => psi.rst} | 42 ++++++------ .../{taskstats-struct.txt => taskstats-struct.rst} | 79 ++++++++++++++-------- .../accounting/{taskstats.txt => taskstats.rst} | 15 ++-- Documentation/admin-guide/cgroup-v2.rst | 6 +- init/Kconfig | 2 +- 8 files changed, 140 insertions(+), 93 deletions(-) commit a36d053863a1b6cd6e79a632af01be014517f9ac Author: Mauro Carvalho Chehab Date: Mon May 27 15:59:13 2019 -0300 docs: DMA-API-HOWTO.txt: fix an unmarked code block When building with Sphinx, it would produce this warning: docs/Documentation/DMA-API-HOWTO.rst:222: WARNING: Definition list ends without a blank line; unexpected unindent. Signed-off-by: Mauro Carvalho Chehab Documentation/DMA-API-HOWTO.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eaf5211d8c00060a3b41a031a762c906d3603098 Author: Mauro Carvalho Chehab Date: Mon Apr 15 23:00:35 2019 -0300 docs: rbtree.txt: fix Sphinx build warnings Ths file is already at ReST format. Yet, some recent changes made it to produce a few warnings when building it with Sphinx. Those are trivially fixed by marking some literal blocks. Fix them before adding it to the docs building system. Signed-off-by: Mauro Carvalho Chehab Documentation/rbtree.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1945a035540e2cef0362a2e7e828f8cf547e86b8 Author: Mauro Carvalho Chehab Date: Mon Apr 15 19:27:55 2019 -0300 docs: phy: convert samsung-usb2.txt to ReST format In order to merge it into a Sphinx book, we need first to convert to ReST. While this is not part of any book, mark it as :orphan:, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab .../phy/{samsung-usb2.txt => samsung-usb2.rst} | 62 ++++++++++++---------- MAINTAINERS | 2 +- 2 files changed, 34 insertions(+), 30 deletions(-) commit a278295ccc2ddd1dc0ac8423a12ff6dd74f0d502 Author: Mauro Carvalho Chehab Date: Mon Apr 15 19:25:27 2019 -0300 docs: nvmem: convert docs to ReST and rename to *.rst In order to be able to add it into a doc book, we need first convert it to ReST. The conversion is actually: - add blank lines and identation in order to identify paragraphs; - mark literal blocks; - adjust title markups. While this is not part of any book, mark it as :orphan:, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Documentation/nvmem/{nvmem.txt => nvmem.rst} | 112 ++++++++++++++------------- 1 file changed, 59 insertions(+), 53 deletions(-) commit 619ba4516771bdfb96658e7a5f57e6551232549a Author: Mauro Carvalho Chehab Date: Fri Apr 19 18:49:49 2019 -0300 docs: bus-devices: ti-gpmc.rst: convert it to ReST In order to be able to add this file to a book, it needs first to be converted to ReST and renamed. While this is not part of any book, mark it as :orphan:, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab .../bus-devices/{ti-gpmc.txt => ti-gpmc.rst} | 163 ++++++++++++++------- 1 file changed, 110 insertions(+), 53 deletions(-) commit 675aaf05d8982d3d304d4652d1555714be8b4af2 Author: Mauro Carvalho Chehab Date: Mon Apr 15 18:46:48 2019 -0300 docs: xen-tpmfront.txt: convert it to .rst In order to be able to add this file to the security book, we need first to convert it to reST. While this is not part of any book, mark it as :orphan:, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab .../tpm/{xen-tpmfront.txt => xen-tpmfront.rst} | 107 ++++++++++++--------- 1 file changed, 60 insertions(+), 47 deletions(-) commit 2bbbf827d339032dbeda62f0a5f20d2fde07b0f5 Author: Mauro Carvalho Chehab Date: Mon Apr 15 18:39:27 2019 -0300 docs: memory-devices: convert ti-emif.txt to ReST Prepare this file to be moved to a kernel book by converting it to ReST format and renaming it to ti-emif.rst. While this is not part of any book, mark it as :orphan:, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab .../memory-devices/{ti-emif.txt => ti-emif.rst} | 27 ++++++++++++++-------- 1 file changed, 17 insertions(+), 10 deletions(-) commit dc7a12bdfccd94c31f79e294f16f7549bd411b49 Author: Mauro Carvalho Chehab Date: Sun Apr 14 15:51:10 2019 -0300 docs: arm: convert docs to ReST and rename to *.rst Converts ARM the text files to ReST, preparing them to be an architecture book. The conversion is actually: - add blank lines and identation in order to identify paragraphs; - fix tables markups; - add some lists markups; - mark literal blocks; - adjust title markups. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Reviewed-by Corentin Labbe # For sun4i-ss Documentation/arm/Marvell/README | 395 ----------------- Documentation/arm/Netwinder | 78 ---- Documentation/arm/SA1100/FreeBird | 21 - Documentation/arm/SA1100/empeg | 2 - Documentation/arm/SA1100/serial_UART | 47 -- Documentation/arm/{README => arm.rst} | 50 ++- Documentation/arm/{Booting => booting.rst} | 71 +-- ...avoidance.txt => cluster-pm-race-avoidance.rst} | 177 +++++--- Documentation/arm/{firmware.txt => firmware.rst} | 14 +- Documentation/arm/index.rst | 80 ++++ Documentation/arm/{Interrupts => interrupts.rst} | 90 ++-- Documentation/arm/{IXP4xx => ixp4xx.rst} | 61 +-- .../{kernel_mode_neon.txt => kernel_mode_neon.rst} | 3 + ...el_user_helpers.txt => kernel_user_helpers.rst} | 79 ++-- .../arm/keystone/{knav-qmss.txt => knav-qmss.rst} | 6 +- .../arm/keystone/{Overview.txt => overview.rst} | 47 +- Documentation/arm/marvel.rst | 488 +++++++++++++++++++++ .../arm/{mem_alignment => mem_alignment.rst} | 11 +- Documentation/arm/{memory.txt => memory.rst} | 9 +- .../arm/{Microchip/README => microchip.rst} | 63 ++- Documentation/arm/netwinder.rst | 85 ++++ Documentation/arm/nwfpe/index.rst | 11 + .../arm/nwfpe/{README.FPE => netwinder-fpe.rst} | 24 +- Documentation/arm/nwfpe/{NOTES => notes.rst} | 3 + Documentation/arm/nwfpe/{README => nwfpe.rst} | 10 +- Documentation/arm/nwfpe/{TODO => todo.rst} | 47 +- Documentation/arm/{OMAP/DSS => omap/dss.rst} | 102 +++-- Documentation/arm/omap/index.rst | 10 + Documentation/arm/{OMAP/README => omap/omap.rst} | 7 + .../arm/{OMAP/omap_pm => omap/omap_pm.rst} | 55 ++- Documentation/arm/{Porting => porting.rst} | 14 +- Documentation/arm/pxa/{mfp.txt => mfp.rst} | 110 ++--- .../arm/{SA1100/ADSBitsy => sa1100/adsbitsy.rst} | 14 +- .../arm/{SA1100/Assabet => sa1100/assabet.rst} | 193 ++++---- .../arm/{SA1100/Brutus => sa1100/brutus.rst} | 49 ++- Documentation/arm/{SA1100/CERF => sa1100/cerf.rst} | 10 +- Documentation/arm/sa1100/freebird.rst | 25 ++ .../GraphicsClient => sa1100/graphicsclient.rst} | 48 +- .../GraphicsMaster => sa1100/graphicsmaster.rst} | 13 +- .../HUW_WEBPANEL => sa1100/huw_webpanel.rst} | 8 +- Documentation/arm/sa1100/index.rst | 23 + Documentation/arm/{SA1100/Itsy => sa1100/itsy.rst} | 14 +- Documentation/arm/{SA1100/LART => sa1100/lart.rst} | 3 +- .../{SA1100/nanoEngine => sa1100/nanoengine.rst} | 6 +- .../arm/{SA1100/Pangolin => sa1100/pangolin.rst} | 10 +- Documentation/arm/{SA1100/PLEB => sa1100/pleb.rst} | 6 +- Documentation/arm/sa1100/serial_uart.rst | 51 +++ .../arm/{SA1100/Tifon => sa1100/tifon.rst} | 4 +- Documentation/arm/{SA1100/Yopy => sa1100/yopy.rst} | 5 +- .../CPUfreq.txt => samsung-s3c24xx/cpufreq.rst} | 5 +- .../eb2410itx.rst} | 5 +- .../GPIO.txt => samsung-s3c24xx/gpio.rst} | 23 +- .../H1940.txt => samsung-s3c24xx/h1940.rst} | 5 +- Documentation/arm/samsung-s3c24xx/index.rst | 18 + .../NAND.txt => samsung-s3c24xx/nand.rst} | 6 +- .../Overview.txt => samsung-s3c24xx/overview.rst} | 21 +- .../S3C2412.txt => samsung-s3c24xx/s3c2412.rst} | 5 +- .../S3C2413.txt => samsung-s3c24xx/s3c2413.rst} | 7 +- .../SMDK2440.txt => samsung-s3c24xx/smdk2440.rst} | 5 +- .../Suspend.txt => samsung-s3c24xx/suspend.rst} | 20 +- .../USB-Host.txt => samsung-s3c24xx/usb-host.rst} | 16 +- .../bootloader-interface.rst} | 27 +- .../clksrc-change-registers.awk | 0 .../arm/{Samsung/GPIO.txt => samsung/gpio.rst} | 7 +- Documentation/arm/samsung/index.rst | 10 + .../{Samsung/Overview.txt => samsung/overview.rst} | 15 +- Documentation/arm/{Setup => setup.rst} | 49 +-- .../arm/{SH-Mobile => sh-mobile}/.gitignore | 0 .../arm/{SPEAr/overview.txt => spear/overview.rst} | 20 +- .../arm/sti/{overview.txt => overview.rst} | 21 +- .../{stih407-overview.txt => stih407-overview.rst} | 9 +- .../{stih415-overview.txt => stih415-overview.rst} | 8 +- .../{stih416-overview.txt => stih416-overview.rst} | 5 +- .../{stih418-overview.txt => stih418-overview.rst} | 9 +- Documentation/arm/stm32/overview.rst | 2 - Documentation/arm/stm32/stm32f429-overview.rst | 7 +- Documentation/arm/stm32/stm32f746-overview.rst | 7 +- Documentation/arm/stm32/stm32f769-overview.rst | 7 +- Documentation/arm/stm32/stm32h743-overview.rst | 7 +- Documentation/arm/stm32/stm32mp157-overview.rst | 3 +- Documentation/arm/{sunxi/README => sunxi.rst} | 98 +++-- Documentation/arm/sunxi/{clocks.txt => clocks.rst} | 7 +- .../arm/{swp_emulation => swp_emulation.rst} | 24 +- Documentation/arm/{tcm.txt => tcm.rst} | 54 ++- Documentation/arm/{uefi.txt => uefi.rst} | 39 +- .../release-notes.txt => vfp/release-notes.rst} | 4 +- Documentation/arm/{vlocks.txt => vlocks.rst} | 9 +- Documentation/devicetree/bindings/arm/xen.txt | 2 +- Documentation/devicetree/booting-without-of.txt | 4 +- Documentation/index.rst | 1 + Documentation/translations/zh_CN/arm/Booting | 4 +- .../translations/zh_CN/arm/kernel_user_helpers.txt | 4 +- MAINTAINERS | 4 +- arch/arm/Kconfig | 2 +- arch/arm/common/mcpm_entry.c | 2 +- arch/arm/common/mcpm_head.S | 2 +- arch/arm/common/vlock.S | 2 +- arch/arm/include/asm/setup.h | 2 +- arch/arm/include/uapi/asm/setup.h | 2 +- arch/arm/kernel/entry-armv.S | 2 +- arch/arm/mach-exynos/common.h | 2 +- arch/arm/mach-ixp4xx/Kconfig | 14 +- arch/arm/mach-s3c24xx/pm.c | 2 +- arch/arm/mm/Kconfig | 4 +- arch/arm/plat-samsung/Kconfig | 6 +- arch/arm/tools/mach-types | 2 +- arch/arm64/Kconfig | 2 +- arch/arm64/kernel/kuser32.S | 2 +- arch/mips/bmips/setup.c | 2 +- drivers/crypto/sunxi-ss/sun4i-ss-cipher.c | 2 +- drivers/crypto/sunxi-ss/sun4i-ss-core.c | 2 +- drivers/crypto/sunxi-ss/sun4i-ss-hash.c | 2 +- drivers/crypto/sunxi-ss/sun4i-ss.h | 2 +- drivers/input/touchscreen/sun4i-ts.c | 2 +- drivers/tty/serial/Kconfig | 2 +- 115 files changed, 1991 insertions(+), 1426 deletions(-) commit 0d07cf5e53a21e35289adc3ab99b6804ff0c3833 Author: Mauro Carvalho Chehab Date: Sun Apr 14 08:58:05 2019 -0300 docs: early-userspace: convert docs to ReST and rename to *.rst The two files there describes a Kernel API feature, used to support early userspace stuff. Prepare for moving them to the kernel API book by converting to ReST format. The conversion itself was quite trivial: just add/mark a few titles as such, add a literal block markup, add a table markup and a few blank lines, in order to make Sphinx to properly parse it. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab .../{buffer-format.txt => buffer-format.rst} | 19 +++++++++++++------ .../{README => early_userspace_support.rst} | 3 +++ Documentation/early-userspace/index.rst | 18 ++++++++++++++++++ Documentation/filesystems/nfs/nfsroot.txt | 2 +- Documentation/filesystems/ramfs-rootfs-initramfs.txt | 4 ++-- usr/Kconfig | 2 +- 6 files changed, 38 insertions(+), 10 deletions(-) commit 93d2c159673325624ef3f2d14ededfcdf76f948b Author: Mauro Carvalho Chehab Date: Sun Apr 14 08:50:59 2019 -0300 docs: pti_intel_mid.txt: convert it to pti_intel_mid.rst Convert this small file to ReST format and rename it. Most of the conversion were related to adjusting whitespaces in order for each section to be properly parsed. While this is not part of any book, mark it as :orphan:, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Documentation/pti/pti_intel_mid.rst | 106 ++++++++++++++++++++++++++++++++++++ Documentation/pti/pti_intel_mid.txt | 99 --------------------------------- 2 files changed, 106 insertions(+), 99 deletions(-) commit 8db8acee4b326bfd5bc9a164a7f9ef844ec0fd2e Author: Mauro Carvalho Chehab Date: Sun Apr 14 08:44:17 2019 -0300 docs: console.txt: convert docs to ReST and rename to *.rst Convert this small file to ReST in preparation for adding it to the driver-api book. While this is not part of the driver-api book, mark it as :orphan:, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Acked-by: Greg Kroah-Hartman Acked-by: Bartlomiej Zolnierkiewicz Documentation/console/{console.txt => console.rst} | 63 ++++++++++++---------- Documentation/fb/fbcon.rst | 4 +- drivers/tty/Kconfig | 2 +- 3 files changed, 38 insertions(+), 31 deletions(-) commit 01c0aa794305ae08eb977d0719e43577e93f9ef5 Author: Mauro Carvalho Chehab Date: Sun Apr 14 08:37:58 2019 -0300 docs: cma/debugfs.txt: convert docs to ReST and rename to *.rst The debugfs interface for CMA should be there together with other mm-related documents. Convert this small file to ReST and move it to its rightful place. The conversion is actually quite simple: just add a title for the document. In order to make it to look better for the audience, also mark the "echo" command as a literal block. While this is not part of any book, mark it as :orphan:, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Documentation/cma/{debugfs.txt => debugfs.rst} | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 23e02422877b7fac868d8610a4265003da4ac0f4 Author: Mauro Carvalho Chehab Date: Sun Apr 14 08:27:15 2019 -0300 docs: m68k: convert docs to ReST and rename to *.rst Convert the m68k kernel-options.txt file to ReST. The conversion is trivial, as the document is already on a format close enough to ReST. Just some small adjustments were needed in order to make it both good for being parsed while keeping it on a good txt shape. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Documentation/admin-guide/kernel-parameters.rst | 2 +- Documentation/m68k/index.rst | 17 ++ .../{kernel-options.txt => kernel-options.rst} | 319 +++++++++++---------- 3 files changed, 191 insertions(+), 147 deletions(-) commit 6f2846cc2ebae4a8c875389e3aedb0cda3c4f462 Author: Mauro Carvalho Chehab Date: Sun Apr 14 08:03:23 2019 -0300 docs: lp855x-driver.txt: convert to ReST and move to kernel-api This small file seems to be an attempt to start documenting backlight drivers. It contains descriptions of the controls for the driver with could sound as an somewhat user-faced description, but it's main focus is to describe, instead, the data that should be passed via platform data and some driver-specific stuff. While this is not part of the driver-api book, mark it as :orphan:, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Documentation/backlight/lp855x-driver.rst | 83 +++++++++++++++++++++++++++++++ Documentation/backlight/lp855x-driver.txt | 66 ------------------------ MAINTAINERS | 2 +- 3 files changed, 84 insertions(+), 67 deletions(-) commit 065504d5b45bc780b8da221162145a4c9ec67ffc Author: Mauro Carvalho Chehab Date: Sun Apr 14 07:59:32 2019 -0300 docs: lcd-panel-cgram.txt: convert docs to ReST and rename to *.rst This small text file describes the usage of parallel port LCD displays from userspace PoV. So, a good candidate for the admin guide. While this is not part of the admin-guide book, mark it as :orphan:, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab .../auxdisplay/{lcd-panel-cgram.txt => lcd-panel-cgram.rst} | 9 +++++++-- MAINTAINERS | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) commit 720594f691e5c8fb0624f3653b20b24ba8e57742 Author: Mauro Carvalho Chehab Date: Sat Apr 13 22:54:53 2019 -0300 docs: connector: convert to ReST and rename to connector.rst As it has some function definitions, move them to connector.h. The remaining conversion is actually: - add blank lines and identation in order to identify paragraphs; - fix tables markups; - add some lists markups; - mark literal blocks; - adjust title markups. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab .../connector/{connector.txt => connector.rst} | 130 +++++++-------------- drivers/w1/Kconfig | 2 +- include/linux/connector.h | 63 +++++++++- samples/Kconfig | 2 +- 4 files changed, 109 insertions(+), 88 deletions(-) commit f4c9939433bd396d0b08e803b2b880a9d02682b9 Author: Farhan Ali Date: Thu Jul 11 10:28:54 2019 -0400 vfio-ccw: Don't call cp_free if we are processing a channel program There is a small window where it's possible that we could be working on an interrupt (queued in the workqueue) and setting up a channel program (i.e allocating memory, pinning pages, translating address). This can lead to allocating and freeing the channel program at the same time and can cause memory corruption. Let's not call cp_free if we are currently processing a channel program. The only way we know for sure that we don't have a thread setting up a channel program is when the state is set to VFIO_CCW_STATE_CP_PENDING. Fixes: d5afd5d135c8 ("vfio-ccw: add handling for async channel instructions") Signed-off-by: Farhan Ali Reviewed-by: Cornelia Huck Message-Id: <62e87bf67b38dc8d5760586e7c96d400db854ebe.1562854091.git.alifm@linux.ibm.com> Reviewed-by: Eric Farman Signed-off-by: Cornelia Huck drivers/s390/cio/vfio_ccw_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c1ab69268d124ebdbb3864580808188ccd3ea355 Author: Farhan Ali Date: Thu Jul 11 10:28:53 2019 -0400 vfio-ccw: Set pa_nr to 0 if memory allocation fails for pa_iova_pfn So we don't call try to call vfio_unpin_pages() incorrectly. Fixes: 0a19e61e6d4c ("vfio: ccw: introduce channel program interfaces") Signed-off-by: Farhan Ali Reviewed-by: Eric Farman Reviewed-by: Cornelia Huck Message-Id: <33a89467ad6369196ae6edf820cbcb1e2d8d050c.1562854091.git.alifm@linux.ibm.com> Signed-off-by: Cornelia Huck drivers/s390/cio/vfio_ccw_cp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 8b515be512a2435bb8aedc6390cbe140167f9eb9 Author: Farhan Ali Date: Thu Jul 11 10:28:52 2019 -0400 vfio-ccw: Fix memory leak and don't call cp_free in cp_init We don't set cp->initialized to true so calling cp_free will just return and not do anything. Also fix a memory leak where we fail to free a ccwchain on an error. Fixes: 812271b910 ("s390/cio: Squash cp_free() and cp_unpin_free()") Signed-off-by: Farhan Ali Message-Id: <3173c4216f4555d9765eb6e4922534982bc820e4.1562854091.git.alifm@linux.ibm.com> Reviewed-by: Cornelia Huck Reviewed-by: Eric Farman Signed-off-by: Cornelia Huck drivers/s390/cio/vfio_ccw_cp.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit c9f597a4d6d7a01590571291f659a2f146111e34 Author: Farhan Ali Date: Thu Jul 11 10:28:51 2019 -0400 vfio-ccw: Fix misleading comment when setting orb.cmd.c64 The comment is misleading because it tells us that we should set orb.cmd.c64 before calling ccwchain_calc_length, otherwise the function ccwchain_calc_length would return an error. This is not completely accurate. We want to allow an orb without cmd.c64, and this is fine as long as the channel program does not use IDALs. But we do want to reject any channel program that uses IDALs and does not set the flag, which is what we do in ccwchain_calc_length. After we have done the ccw processing, we need to set cmd.c64, as we use IDALs for all translated channel programs. Also for better code readability let's move the setting of cmd.c64 within the non error path. Fixes: fb9e7880af35 ("vfio: ccw: push down unsupported IDA check") Signed-off-by: Farhan Ali Reviewed-by: Cornelia Huck Message-Id: Reviewed-by: Eric Farman Signed-off-by: Cornelia Huck drivers/s390/cio/vfio_ccw_cp.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 9a5611af5edb5fa5fed11b4c5e96906524f8c323 Author: Yi Wang Date: Sat Jul 6 01:10:22 2019 +0800 kvm: x86: some tsc debug cleanup There are some pr_debug in TSC code, which may have been no use, so remove them as Paolo suggested. Signed-off-by: Yi Wang Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 8 -------- 1 file changed, 8 deletions(-) commit 9481b7f10c5a7f149048310c25510f0386eb6631 Author: Yi Wang Date: Mon Jul 15 12:35:17 2019 +0800 kvm: vmx: fix coccinelle warnings This fixes the following coccinelle warning: WARNING: return of 0/1 in function 'vmx_need_emulation_on_page_fault' with return type bool Return false instead of 0. Signed-off-by: Yi Wang Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/vmx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 387b14684f94483cbbb72843db406ec9a8d0d6d2 Author: Mauro Carvalho Chehab Date: Wed Apr 10 08:32:41 2019 -0300 docs: locking: convert docs to ReST and rename to *.rst Convert the locking documents to ReST and add them to the kernel development book where it belongs. Most of the stuff here is just to make Sphinx to properly parse the text file, as they're already in good shape, not requiring massive changes in order to be parsed. The conversion is actually: - add blank lines and identation in order to identify paragraphs; - fix tables markups; - add some lists markups; - mark literal blocks; - adjust title markups. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Acked-by: Federico Vaga Documentation/kernel-hacking/locking.rst | 2 +- Documentation/locking/index.rst | 24 +++ .../{lockdep-design.txt => lockdep-design.rst} | 51 +++--- Documentation/locking/lockstat.rst | 204 +++++++++++++++++++++ Documentation/locking/lockstat.txt | 183 ------------------ .../locking/{locktorture.txt => locktorture.rst} | 105 +++++++---- .../locking/{mutex-design.txt => mutex-design.rst} | 26 ++- .../{rt-mutex-design.txt => rt-mutex-design.rst} | 139 +++++++------- .../locking/{rt-mutex.txt => rt-mutex.rst} | 30 +-- .../locking/{spinlocks.txt => spinlocks.rst} | 32 ++-- .../{ww-mutex-design.txt => ww-mutex-design.rst} | 82 +++++---- Documentation/pi-futex.txt | 2 +- .../translations/it_IT/kernel-hacking/locking.rst | 2 +- drivers/gpu/drm/drm_modeset_lock.c | 2 +- include/linux/lockdep.h | 2 +- include/linux/mutex.h | 2 +- include/linux/rwsem.h | 2 +- kernel/locking/mutex.c | 2 +- kernel/locking/rtmutex.c | 2 +- lib/Kconfig.debug | 4 +- 20 files changed, 511 insertions(+), 387 deletions(-) commit fd4198bf17ca9321fb8043e846b780cfd2889dac Merge: a6a6d3b1f867 8343ba2d4820 Author: Paolo Bonzini Date: Mon Jul 15 12:50:46 2019 +0200 Merge tag 'kvm-s390-next-5.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD KVM: s390: add kselftests This is the initial implementation for KVM selftests on s390. commit 03bcba73cb3c223ea8ab8d7f33bd85545e47fc75 Author: Stephen Rothwell Date: Mon Jul 15 11:55:04 2019 +0100 MIPS: perf events: handle switch statement falling through warnings Now that we build with -Wimplicit-fallthrough=3, some warnings are produced in the arch/mips perf events code that are promoted to errors: arch/mips/kernel/perf_event_mipsxx.c:792:3: error: this statement may fall through [-Werror=implicit-fallthrough=] arch/mips/kernel/perf_event_mipsxx.c:795:3: error: this statement may fall through [-Werror=implicit-fallthrough=] arch/mips/kernel/perf_event_mipsxx.c:798:3: error: this statement may fall through [-Werror=implicit-fallthrough=] arch/mips/kernel/perf_event_mipsxx.c:1407:6: error: this statement may fall through [-Werror=implicit-fallthrough=] Assume the fall throughs are deliberate amd annotate/eliminate them. Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Gustavo A. R. Silva Cc: Kees Cook Signed-off-by: Stephen Rothwell [paul.burton@mips.com: - Make n signed to fix the loop condition. - Simplify the initialization of n, which should never have a value greater than 4. - Invert conditions in the loop to decrease indentation.] Signed-off-by: Paul Burton arch/mips/kernel/perf_event_mipsxx.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit 69b53720e92c1bdea854a2fc204477ddabfa902b Author: Christian Brauner Date: Mon Jul 15 02:30:21 2019 +0200 MAINTAINERS: add new entry for pidfd api Add me as a maintainer for pidfd stuff so people know who to yell at and to easily keep track of incoming changes. Signed-off-by: Christian Brauner Link: https://lore.kernel.org/r/20190715003021.25040-1-christian@brauner.io MAINTAINERS | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 916c31fff946fae0e05862f9b2435fdb29fd5090 Author: Ravi Bangoria Date: Tue Jun 11 08:31:09 2019 +0530 perf version: Fix segfault due to missing OPT_END() 'perf version' on powerpc segfaults when used with non-supported option: # perf version -a Segmentation fault (core dumped) Fix this. Signed-off-by: Ravi Bangoria Reviewed-by: Kamalesh Babulal Tested-by: Mamatha Inamdar Cc: Jiri Olsa Cc: Kamalesh Babulal Link: http://lkml.kernel.org/r/20190611030109.20228-1-ravi.bangoria@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-version.c | 1 + 1 file changed, 1 insertion(+) commit a6a6d3b1f867d34ba5bd61aa7bb056b48ca67cff Author: Arnd Bergmann Date: Fri Jul 12 11:12:30 2019 +0200 x86: kvm: avoid constant-conversion warning clang finds a contruct suspicious that converts an unsigned character to a signed integer and back, causing an overflow: arch/x86/kvm/mmu.c:4605:39: error: implicit conversion from 'int' to 'u8' (aka 'unsigned char') changes value from -205 to 51 [-Werror,-Wconstant-conversion] u8 wf = (pfec & PFERR_WRITE_MASK) ? ~w : 0; ~~ ^~ arch/x86/kvm/mmu.c:4607:38: error: implicit conversion from 'int' to 'u8' (aka 'unsigned char') changes value from -241 to 15 [-Werror,-Wconstant-conversion] u8 uf = (pfec & PFERR_USER_MASK) ? ~u : 0; ~~ ^~ arch/x86/kvm/mmu.c:4609:39: error: implicit conversion from 'int' to 'u8' (aka 'unsigned char') changes value from -171 to 85 [-Werror,-Wconstant-conversion] u8 ff = (pfec & PFERR_FETCH_MASK) ? ~x : 0; ~~ ^~ Add an explicit cast to tell clang that everything works as intended here. Signed-off-by: Arnd Bergmann Link: https://github.com/ClangBuiltLinux/linux/issues/95 Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f4e4805e4bf7a06235d2aa216e1d00cb1f3bd0c1 Author: Arnd Bergmann Date: Fri Jul 12 16:13:09 2019 +0200 x86: kvm: avoid -Wsometimes-uninitized warning Clang notices a code path in which some variables are never initialized, but fails to figure out that this can never happen on i386 because is_64_bit_mode() always returns false. arch/x86/kvm/hyperv.c:1610:6: error: variable 'ingpa' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] if (!longmode) { ^~~~~~~~~ arch/x86/kvm/hyperv.c:1632:55: note: uninitialized use occurs here trace_kvm_hv_hypercall(code, fast, rep_cnt, rep_idx, ingpa, outgpa); ^~~~~ arch/x86/kvm/hyperv.c:1610:2: note: remove the 'if' if its condition is always true if (!longmode) { ^~~~~~~~~~~~~~~ arch/x86/kvm/hyperv.c:1595:18: note: initialize the variable 'ingpa' to silence this warning u64 param, ingpa, outgpa, ret = HV_STATUS_SUCCESS; ^ = 0 arch/x86/kvm/hyperv.c:1610:6: error: variable 'outgpa' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] arch/x86/kvm/hyperv.c:1610:6: error: variable 'param' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] Flip the condition around to avoid the conditional execution on i386. Signed-off-by: Arnd Bergmann Signed-off-by: Paolo Bonzini arch/x86/kvm/hyperv.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit 0b774629512057b4becc705e2495220844e6e795 Author: Jing Liu Date: Thu Jul 11 13:49:57 2019 +0800 KVM: x86: expose AVX512_BF16 feature to guest AVX512 BFLOAT16 instructions support 16-bit BFLOAT16 floating-point format (BF16) for deep learning optimization. Intel adds AVX512 BFLOAT16 feature in CooperLake, which is CPUID.7.1.EAX[5]. Detailed information of the CPUID bit can be found here, https://software.intel.com/sites/default/files/managed/c5/15/\ architecture-instruction-set-extensions-programming-reference.pdf. Signed-off-by: Jing Liu [Fix type mismatch in min, changing constant "1" to "1u". - Paolo] Signed-off-by: Paolo Bonzini arch/x86/kvm/cpuid.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 19ec11a2233d24a7811836fa735203aaccf95a23 Author: Bartosz Golaszewski Date: Thu Jul 11 10:29:35 2019 +0200 gpio: em: remove the gpiochip before removing the irq domain In commit 8764c4ca5049 ("gpio: em: use the managed version of gpiochip_add_data()") we implicitly altered the ordering of resource freeing: since gpiochip_remove() calls gpiochip_irqchip_remove() internally, we now can potentially use the irq_domain after it was destroyed in the remove() callback (as devm resources are freed after remove() has returned). Use devm_add_action_or_reset() to keep the ordering right and entirely kill the remove() callback in the driver. Reported-by: Geert Uytterhoeven Fixes: 8764c4ca5049 ("gpio: em: use the managed version of gpiochip_add_data()") Cc: stable@vger.kernel.org Signed-off-by: Bartosz Golaszewski Reviewed-by: Geert Uytterhoeven drivers/gpio/gpio-em.c | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) commit 89fea04c85e85f21ef4937611055abce82330d48 Author: Nishka Dasgupta Date: Sat Jul 6 19:04:22 2019 +0530 gpiolib: of: fix a memory leak in of_gpio_flags_quirks() Each iteration of for_each_child_of_node puts the previous node, but in the case of a break from the middle of the loop, there is no put, thus causing a memory leak. Hence add an of_node_put before the break. Issue found with Coccinelle. Cc: Signed-off-by: Nishka Dasgupta [Bartosz: tweaked the commit message] Signed-off-by: Bartosz Golaszewski drivers/gpio/gpiolib-of.c | 1 + 1 file changed, 1 insertion(+) commit 541e4095f388c196685685633c950cb9b97f8039 Author: Keerthy Date: Mon Jul 8 14:19:04 2019 +0530 gpio: davinci: silence error prints in case of EPROBE_DEFER Silence error prints in case of EPROBE_DEFER. This avoids multiple/duplicate defer prints during boot. Cc: Signed-off-by: Keerthy Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-davinci.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 8da04e05cdfc715d414a1c5f8318c03030eb68fb Author: Stephen Rothwell Date: Mon Jul 15 09:56:30 2019 +1000 intel_rapl: need linux/cpuhotplug.h for enum cpuhp_state Fixes: 7ebf8eff63b4 ("intel_rapl: introduce struct rapl_if_private") Signed-off-by: Stephen Rothwell Signed-off-by: Rafael J. Wysocki include/linux/intel_rapl.h | 1 + 1 file changed, 1 insertion(+) commit dfd6f9ad36368b8dbd5f5a2b2f0a4705ae69a323 Author: Arnd Bergmann Date: Fri Jul 12 11:01:21 2019 +0200 ACPI: fix false-positive -Wuninitialized warning clang gets confused by an uninitialized variable in what looks to it like a never executed code path: arch/x86/kernel/acpi/boot.c:618:13: error: variable 'polarity' is uninitialized when used here [-Werror,-Wuninitialized] polarity = polarity ? ACPI_ACTIVE_LOW : ACPI_ACTIVE_HIGH; ^~~~~~~~ arch/x86/kernel/acpi/boot.c:606:32: note: initialize the variable 'polarity' to silence this warning int rc, irq, trigger, polarity; ^ = 0 arch/x86/kernel/acpi/boot.c:617:12: error: variable 'trigger' is uninitialized when used here [-Werror,-Wuninitialized] trigger = trigger ? ACPI_LEVEL_SENSITIVE : ACPI_EDGE_SENSITIVE; ^~~~~~~ arch/x86/kernel/acpi/boot.c:606:22: note: initialize the variable 'trigger' to silence this warning int rc, irq, trigger, polarity; ^ = 0 This is unfortunately a design decision in clang and won't be fixed. Changing the acpi_get_override_irq() macro to an inline function reliably avoids the issue. Signed-off-by: Arnd Bergmann Reviewed-by: Andy Shevchenko Reviewed-by: Nathan Chancellor Signed-off-by: Rafael J. Wysocki include/linux/acpi.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 2f235d92ac225361a9c653cb76c7ca8ef99621de Author: Hariprasad Kelam Date: Thu Jul 11 22:51:07 2019 +0530 ALSA: rme9652: Unneeded variable: "result". This patch fixes below issue reported by coccicheck sound/pci/rme9652/rme9652.c:2161:5-11: Unneeded variable: "result". Return "0" on line 2167 Signed-off-by: Hariprasad Kelam Signed-off-by: Takashi Iwai sound/pci/rme9652/rme9652.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit b7cad26d150b05955b5e35b30a82c3eb66761cdc Author: Hariprasad Kelam Date: Thu Jul 11 22:47:26 2019 +0530 ALSA: emu10k1: Remove unneeded variable "change" fix below issue reported by coccicheck sound/pci/emu10k1/emu10k1x.c:1077:5-11: Unneeded variable: "change". Return "0" on line 1092 Signed-off-by: Hariprasad Kelam Signed-off-by: Takashi Iwai sound/pci/emu10k1/emu10k1x.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 5e19cad550a0b01b778fbfde23e036c9759c4f53 Author: Hariprasad Kelam Date: Thu Jul 11 22:43:02 2019 +0530 ALSA: au88x0: Remove unneeded variable: "changed" Fix below issues reported by coccicheck sound/pci/au88x0/au88x0_a3d.c:821:8-15: Unneeded variable: "changed". Return "1" on line 834 sound/pci/au88x0/au88x0_a3d.c:768:5-12: Unneeded variable: "changed". Return "1" on line 777 sound/pci/au88x0/au88x0_a3d.c:804:5-12: Unneeded variable: "changed". Return "1" on line 813 sound/pci/au88x0/au88x0_a3d.c:786:8-15: Unneeded variable: "changed". Return "1" on line 796 Signed-off-by: Hariprasad Kelam Signed-off-by: Takashi Iwai sound/pci/au88x0/au88x0_a3d.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit fbc571290d9f7bfe089c50f4ac4028dd98ebfe98 Author: Kailang Yang Date: Mon Jul 15 10:41:50 2019 +0800 ALSA: hda/realtek - Fixed Headphone Mic can't record on Dell platform It assigned to wrong model. So, The headphone Mic can't work. Fixes: 3f640970a414 ("ALSA: hda - Fix headset mic detection problem for several Dell laptops") Signed-off-by: Kailang Yang Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 7fb832ae72949c883da52d6316ff08f03c75d300 Author: Nathan Chancellor Date: Tue Jul 9 13:34:09 2019 -0700 watchdog: digicolor_wdt: Remove unused variable in dc_wdt_probe clang warns: drivers/watchdog/digicolor_wdt.c:121:6: warning: unused variable 'ret' [-Wunused-variable] int ret; ^ 1 warning generated. It's unused now, remove it. Fixes: cdad26977e3f ("watchdog: digicolor_wdt: drop warning after registering device") Link: https://github.com/ClangBuiltLinux/linux/issues/591 Reported-by: kernelci.org bot Signed-off-by: Nathan Chancellor Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20190709203409.117123-1-natechancellor@gmail.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/digicolor_wdt.c | 1 - 1 file changed, 1 deletion(-) commit 1b0890cd60829bd51455dc5ad689ed58c4408227 Author: Florian Westphal Date: Tue Jul 2 21:41:40 2019 +0200 netfilter: nfnetlink: avoid deadlock due to synchronous request_module Thomas and Juliana report a deadlock when running: (rmmod nf_conntrack_netlink/xfrm_user) conntrack -e NEW -E & modprobe -v xfrm_user They provided following analysis: conntrack -e NEW -E netlink_bind() netlink_lock_table() -> increases "nl_table_users" nfnetlink_bind() # does not unlock the table as it's locked by netlink_bind() __request_module() call_usermodehelper_exec() This triggers "modprobe nf_conntrack_netlink" from kernel, netlink_bind() won't return until modprobe process is done. "modprobe xfrm_user": xfrm_user_init() register_pernet_subsys() -> grab pernet_ops_rwsem .. netlink_table_grab() calls schedule() as "nl_table_users" is non-zero so modprobe is blocked because netlink_bind() increased nl_table_users while also holding pernet_ops_rwsem. "modprobe nf_conntrack_netlink" runs and inits nf_conntrack_netlink: ctnetlink_init() register_pernet_subsys() -> blocks on "pernet_ops_rwsem" thanks to xfrm_user module both modprobe processes wait on one another -- neither can make progress. Switch netlink_bind() to "nowait" modprobe -- this releases the netlink table lock, which then allows both modprobe instances to complete. Reported-by: Thomas Jarosch Reported-by: Juliana Rodrigueiro Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nfnetlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6dfc43d3a19174faead54575c204aee106225f43 Author: Dave Airlie Date: Mon Jul 15 15:16:20 2019 +1000 mm: adjust apply_to_pfn_range interface for dropped token. mm/pgtable: drop pgtable_t variable from pte_fn_t functions drops the token came in via the hmm tree, this caused lots of conflicts, but applying this cleanup patch should reduce it to something easier to handle. Just accept the token is unused at this point. Signed-off-by: Dave Airlie include/linux/mm.h | 2 +- mm/as_dirty_helpers.c | 6 ++---- mm/memory.c | 6 +++--- 3 files changed, 6 insertions(+), 8 deletions(-) commit 03800e0526ee25ed7c843ca1e57b69ac2a5af642 Author: Andrea Arcangeli Date: Tue Jun 25 10:17:27 2019 -0400 powerpc: fix off by one in max_zone_pfn initialization for ZONE_DMA 25078dc1f74be16b858e914f52cc8f4d03c2271a first introduced an off by one error in the ZONE_DMA initialization of PPC_BOOK3E_64=y and since 9739ab7eda459f0669ec9807e0d9be5020bab88c the off by one applies to PPC32=y too. This simply corrects the off by one and should resolve crashes like below: [ 65.179101] page 0x7fff outside node 0 zone DMA [ 0x0 - 0x7fff ] Unfortunately in various MM places "max" means a non inclusive end of range. free_area_init_nodes max_zone_pfn parameter is one case and MAX_ORDER is another one (unrelated) that comes by memory. Reported-by: Zorro Lang Fixes: 25078dc1f74b ("powerpc: use mm zones more sensibly") Fixes: 9739ab7eda45 ("powerpc: enable a 30-bit ZONE_DMA for 32-bit pmac") Signed-off-by: Andrea Arcangeli Reviewed-by: Christoph Hellwig Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190625141727.2883-1-aarcange@redhat.com arch/powerpc/mm/mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c8b4083db915dfe5a3b4a755ad2317e0509b43f1 Author: Suraj Jitindar Singh Date: Wed Jul 3 11:20:22 2019 +1000 KVM: PPC: Book3S HV: Save and restore guest visible PSSCR bits on pseries The Performance Stop Status and Control Register (PSSCR) is used to control the power saving facilities of the processor. This register has various fields, some of which can be modified only in hypervisor state, and others which can be modified in both hypervisor and privileged non-hypervisor state. The bits which can be modified in privileged non-hypervisor state are referred to as guest visible. Currently the L0 hypervisor saves and restores both it's own host value as well as the guest value of the PSSCR when context switching between the hypervisor and guest. However a nested hypervisor running it's own nested guests (as indicated by kvmhv_on_pseries()) doesn't context switch the PSSCR register. That means if a nested (L2) guest modifies the PSSCR then the L1 guest hypervisor will run with that modified value, and if the L1 guest hypervisor modifies the PSSCR and then goes to run the nested (L2) guest again then the L2 PSSCR value will be lost. Fix this by having the (L1) nested hypervisor save and restore both its host and the guest PSSCR value when entering and exiting a nested (L2) guest. Note that only the guest visible parts of the PSSCR are context switched since this is all the L1 nested hypervisor can access, this is fine however as these are the only fields the L0 hypervisor provides guest control of anyway and so all other fields are ignored. This could also have been implemented by adding the PSSCR register to the hv_regs passed to the L0 hypervisor as input to the H_ENTER_NESTED hcall, however this would have meant updating the structure layout and thus required modifications to both the L0 and L1 kernels. Whereas the approach used doesn't require L0 kernel modifications while achieving the same result. Fixes: 95a6432ce903 ("KVM: PPC: Book3S HV: Streamlined guest entry/exit path on P9 for radix guests") Cc: stable@vger.kernel.org # v4.20+ Signed-off-by: Suraj Jitindar Singh Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190703012022.15644-3-sjitindarsingh@gmail.com arch/powerpc/kvm/book3s_hv.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit fec88ab0af9706b2201e5daf377c5031c62d11f7 Merge: fa6e951a2a44 cc5dfd59e375 Author: Linus Torvalds Date: Sun Jul 14 19:42:11 2019 -0700 Merge tag 'for-linus-hmm' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull HMM updates from Jason Gunthorpe: "Improvements and bug fixes for the hmm interface in the kernel: - Improve clarity, locking and APIs related to the 'hmm mirror' feature merged last cycle. In linux-next we now see AMDGPU and nouveau to be using this API. - Remove old or transitional hmm APIs. These are hold overs from the past with no users, or APIs that existed only to manage cross tree conflicts. There are still a few more of these cleanups that didn't make the merge window cut off. - Improve some core mm APIs: - export alloc_pages_vma() for driver use - refactor into devm_request_free_mem_region() to manage DEVICE_PRIVATE resource reservations - refactor duplicative driver code into the core dev_pagemap struct - Remove hmm wrappers of improved core mm APIs, instead have drivers use the simplified API directly - Remove DEVICE_PUBLIC - Simplify the kconfig flow for the hmm users and core code" * tag 'for-linus-hmm' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: (42 commits) mm: don't select MIGRATE_VMA_HELPER from HMM_MIRROR mm: remove the HMM config option mm: sort out the DEVICE_PRIVATE Kconfig mess mm: simplify ZONE_DEVICE page private data mm: remove hmm_devmem_add mm: remove hmm_vma_alloc_locked_page nouveau: use devm_memremap_pages directly nouveau: use alloc_page_vma directly PCI/P2PDMA: use the dev_pagemap internal refcount device-dax: use the dev_pagemap internal refcount memremap: provide an optional internal refcount in struct dev_pagemap memremap: replace the altmap_valid field with a PGMAP_ALTMAP_VALID flag memremap: remove the data field in struct dev_pagemap memremap: add a migrate_to_ram method to struct dev_pagemap_ops memremap: lift the devmap_enable manipulation into devm_memremap_pages memremap: pass a struct dev_pagemap to ->kill and ->cleanup memremap: move dev_pagemap callbacks into a separate structure memremap: validate the pagemap type passed to devm_memremap_pages mm: factor out a devm_request_free_mem_region helper mm: export alloc_pages_vma ... commit 28d2a6e6684d9851905f379816d8a4d03587ed94 Author: Suraj Jitindar Singh Date: Wed Jul 3 11:20:21 2019 +1000 powerpc/pmu: Set pmcregs_in_use in paca when running as LPAR The ability to run nested guests under KVM means that a guest can also act as a hypervisor for it's own nested guest. Currently ppc_set_pmu_inuse() assumes that either FW_FEATURE_LPAR is set, indicating a guest environment, and so sets the pmcregs_in_use flag in the lppaca, or that it isn't set, indicating a hypervisor environment, and so sets the pmcregs_in_use flag in the paca. The pmcregs_in_use flag in the lppaca is used to communicate this information to a hypervisor and so must be set in a guest environment. The pmcregs_in_use flag in the paca is used by KVM code to determine whether the host state of the performance monitoring unit (PMU) must be saved and restored when running a guest. Thus when a guest also acts as a hypervisor it must set this bit in both places since it needs to ensure both that the real hypervisor saves it's PMU registers when it runs (requires pmcregs_in_use flag in lppaca), and that it saves it's own PMU registers when running a nested guest (requires pmcregs_in_use flag in paca). Modify ppc_set_pmu_inuse() so that the pmcregs_in_use bit is set in both the lppaca and the paca when a guest (LPAR) is running with the capability of running it's own guests (CONFIG_KVM_BOOK3S_HV_POSSIBLE). Fixes: 95a6432ce903 ("KVM: PPC: Book3S HV: Streamlined guest entry/exit path on P9 for radix guests") Cc: stable@vger.kernel.org # v4.20+ Signed-off-by: Suraj Jitindar Singh Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190703012022.15644-2-sjitindarsingh@gmail.com arch/powerpc/include/asm/pmc.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 63279eeb7f93abb1692573c26f1e038e1a87358b Author: Suraj Jitindar Singh Date: Wed Jul 3 11:20:20 2019 +1000 KVM: PPC: Book3S HV: Always save guest pmu for guest capable of nesting The performance monitoring unit (PMU) registers are saved on guest exit when the guest has set the pmcregs_in_use flag in its lppaca, if it exists, or unconditionally if it doesn't. If a nested guest is being run then the hypervisor doesn't, and in most cases can't, know if the PMU registers are in use since it doesn't know the location of the lppaca for the nested guest, although it may have one for its immediate guest. This results in the values of these registers being lost across nested guest entry and exit in the case where the nested guest was making use of the performance monitoring facility while it's nested guest hypervisor wasn't. Further more the hypervisor could interrupt a guest hypervisor between when it has loaded up the PMU registers and it calling H_ENTER_NESTED or between returning from the nested guest to the guest hypervisor and the guest hypervisor reading the PMU registers, in kvmhv_p9_guest_entry(). This means that it isn't sufficient to just save the PMU registers when entering or exiting a nested guest, but that it is necessary to always save the PMU registers whenever a guest is capable of running nested guests to ensure the register values aren't lost in the context switch. Ensure the PMU register values are preserved by always saving their value into the vcpu struct when a guest is capable of running nested guests. This should have minimal performance impact however any impact can be avoided by booting a guest with "-machine pseries,cap-nested-hv=false" on the qemu commandline. Fixes: 95a6432ce903 ("KVM: PPC: Book3S HV: Streamlined guest entry/exit path on P9 for radix guests") Cc: stable@vger.kernel.org # v4.20+ Signed-off-by: Suraj Jitindar Singh Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190703012022.15644-1-sjitindarsingh@gmail.com arch/powerpc/kvm/book3s_hv.c | 2 ++ 1 file changed, 2 insertions(+) commit da0ef93310e67ae6902efded60b6724dab27a5d1 Author: Suraj Jitindar Singh Date: Wed Jul 10 15:20:18 2019 +1000 powerpc/mm: Limit rma_size to 1TB when running without HV mode The virtual real mode addressing (VRMA) mechanism is used when a partition is using HPT (Hash Page Table) translation and performs real mode accesses (MSR[IR|DR] = 0) in non-hypervisor mode. In this mode effective address bits 0:23 are treated as zero (i.e. the access is aliased to 0) and the access is performed using an implicit 1TB SLB entry. The size of the RMA (Real Memory Area) is communicated to the guest as the size of the first memory region in the device tree. And because of the mechanism described above can be expected to not exceed 1TB. In the event that the host erroneously represents the RMA as being larger than 1TB, guest accesses in real mode to memory addresses above 1TB will be aliased down to below 1TB. This means that a memory access performed in real mode may differ to one performed in virtual mode for the same memory address, which would likely have unintended consequences. To avoid this outcome have the guest explicitly limit the size of the RMA to the current maximum, which is 1TB. This means that even if the first memory block is larger than 1TB, only the first 1TB should be accessed in real mode. Fixes: c610d65c0ad0 ("powerpc/pseries: lift RTAS limit for hash") Cc: stable@vger.kernel.org # v4.16+ Signed-off-by: Suraj Jitindar Singh Tested-by: Satheesh Rajendran Reviewed-by: David Gibson Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190710052018.14628-1-sjitindarsingh@gmail.com arch/powerpc/mm/book3s64/hash_utils.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit fa6e951a2a440babd7a7310d0f4713e618061767 Merge: a318423b61e8 7451c54abc91 Author: Linus Torvalds Date: Sun Jul 14 19:29:04 2019 -0700 Merge tag 'ecryptfs-5.3-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs Pull eCryptfs updates from Tyler Hicks: - Fix error handling when ecryptfs_read_lower() encounters an error - Fix read-only file creation when the eCryptfs mount is configured to store metadata in xattrs - Minor code cleanups * tag 'ecryptfs-5.3-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs: ecryptfs: Change return type of ecryptfs_process_flags ecryptfs: Make ecryptfs_xattr_handler static ecryptfs: remove unnessesary null check in ecryptfs_keyring_auth_tok_for_sig ecryptfs: use print_hex_dump_bytes for hexdump eCryptfs: fix permission denied with ecryptfs_xattr mount option when create readonly file ecryptfs: re-order a condition for static checkers eCryptfs: fix a couple type promotion bugs commit a318423b61e8c67aa5c0a428540c58439a20baac Merge: f2772a0e4833 8009ce956c3d Author: Linus Torvalds Date: Sun Jul 14 17:24:12 2019 -0700 Merge tag 'upstream-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs Pull UBIFS updates from Richard Weinberger: - Support for zstd compression - Support for offline signed filesystems - Various fixes for regressions * tag 'upstream-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs: ubifs: Don't leak orphans on memory during commit ubifs: Check link count of inodes when killing orphans. ubifs: Add support for zstd compression. ubifs: support offline signed images ubifs: remove unnecessary check in ubifs_log_start_commit ubifs: Fix typo of output in get_cs_sqnum ubifs: Simplify redundant code ubifs: Correctly use tnc_next() in search_dh_cookie() commit f2772a0e4833d1af1901b6f1a38136fb71d1350c Merge: fcd98147ac71 b482e48d29f1 Author: Linus Torvalds Date: Sun Jul 14 17:17:34 2019 -0700 Merge tag 'for-linus-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml Pull UML updates from Richard Weinberger: - A new timer mode, time travel, for testing with UML - Many bugixes/improvements for the serial line driver - Various bugfixes * tag 'for-linus-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml: um: fix build without CONFIG_UML_TIME_TRAVEL_SUPPORT um: Fix kcov crash during startup um: configs: Remove useless UEVENT_HELPER_PATH um: Support time travel mode um: Pass nsecs to os timer functions um: Remove drivers/ssl.h um: Don't garbage collect in deactivate_all_fds() um: Silence lockdep complaint about mmap_sem um: Remove locking in deactivate_all_fds() um: Timer code cleanup um: fix os_timer_one_shot() um: Fix IRQ controller regression on console read commit fcd98147ac71f35b69e2f50b5fddc5524dd2dfa8 Merge: 55167453111d 3975b097e577 Author: Linus Torvalds Date: Sun Jul 14 17:08:08 2019 -0700 Merge tag 'stream_open-5.3' of https://lab.nexedi.com/kirr/linux Pull stream_open() updates from Kirill Smelkov: "This time on stream_open front it is only two small changes: - the first one converts stream_open.cocci to treat all functions that start with wait_.* as blocking. Previously it was only wait_event_.* functions that were considered as blocking, but this was falsely reporting several deadlock cases as only warning. This was picked by linux-kbuild and entered mainline as commit 0c4ab18fc33b ("coccinelle: api/stream_open: treat all wait_.*() calls as blocking"), and already merged earlier. - the second one teaches stream_open.cocci to consider files as being stream-like even if they use noop_llseek. It results in two more drivers being converted to stream_open() (mousedev.c and hid-sensor-custom.c)" * tag 'stream_open-5.3' of https://lab.nexedi.com/kirr/linux: *: convert stream-like files -> stream_open, even if they use noop_llseek commit 55167453111d3a1e600e29ba6c8e63906bb4821b Merge: fde7dc63b1ca 7d67c8ac25fb Author: Linus Torvalds Date: Sun Jul 14 16:51:47 2019 -0700 Merge tag 'platform-drivers-x86-v5.3-1' of git://git.infradead.org/linux-platform-drivers-x86 Pull x86 platform driver updates from Andy Shevchenko: "Gathered a bunch of x86 platform driver changes. It's rather big, since includes two big refactors and completely new driver: - ASUS WMI driver got a big refactoring in order to support the TUF Gaming laptops. Besides that, the regression with backlight being permanently off on various EeePC laptops has been fixed. - Accelerometer on HP ProBook 450 G0 shows wrong measurements due to X axis being inverted. This has been fixed. - Intel PMC core driver has been extended to be ACPI enumerated if the DSDT provides device with _HID "INT33A1". This allows to convert the driver to be pure platform and support new hardware purely based on ACPI DSDT. - From now on the Intel Speed Select Technology is supported thru a corresponding driver. This driver provides an access to the features of the ISST, such as Performance Profile, Core Power, Base frequency and Turbo Frequency. - Mellanox platform drivers has been refactored and now extended to support more systems, including new coming ones. - The OLPC XO-1.75 platform is now supported. - CB4063 Beckhoff Automation board is using PMC clocks, provided via pmc_atom driver, for ethernet controllers in a way that they can't be managed by the clock driver. The quirk has been extended to cover this case. - Touchscreen on Chuwi Hi10 Plus tablet has been enabled. Meanwhile the information of Chuwi Hi10 Air has been fixed to cover more models based on the same platform. - Xiaomi notebooks have WMI interface enabled. Thus, the driver to support it has been provided. It required some extension of the generic WMI library, which allows to propagate opaque context to the ->probe() of the individual drivers. This release includes debugfs clean up from Greg KH for several drivers that drop return code check and make debugfs absence or failure non-fatal. Also miscellaneous fixes here and there, mostly for Acer WMI and various Intel drivers" * tag 'platform-drivers-x86-v5.3-1' of git://git.infradead.org/linux-platform-drivers-x86: (74 commits) platform/x86: Fix PCENGINES_APU2 Kconfig warning tools/power/x86/intel-speed-select: Add .gitignore file platform/x86: mlx-platform: Fix error handling in mlxplat_init() platform/x86: intel_pmc_core: Attach using APCI HID "INT33A1" platform/x86: intel_pmc_core: transform Pkg C-state residency from TSC ticks into microseconds platform/x86: asus-wmi: Use dev_get_drvdata() Documentation/ABI: Add new attribute for mlxreg-io sysfs interfaces platform/x86: mlx-platform: Add more reset cause attributes platform/x86: mlx-platform: Modify DMI matching order platform/x86: mlx-platform: Add regmap structure for the next generation systems platform/x86: mlx-platform: Change API for i2c-mlxcpld driver activation platform/x86: mlx-platform: Move regmap initialization before all drivers activation MAINTAINERS: Update for Intel Speed Select Technology tools/power/x86: A tool to validate Intel Speed Select commands platform/x86: ISST: Restore state on resume platform/x86: ISST: Add Intel Speed Select PUNIT MSR interface platform/x86: ISST: Add Intel Speed Select mailbox interface via MSRs platform/x86: ISST: Add Intel Speed Select mailbox interface via PCI platform/x86: ISST: Add Intel Speed Select mmio interface platform/x86: ISST: Add IOCTL to Translate Linux logical CPU to PUNIT CPU number ... commit fde7dc63b1caa6dedf9af7cbf79895589629bc95 Merge: a1240cf74e82 25777e5784a7 Author: Linus Torvalds Date: Sun Jul 14 16:36:51 2019 -0700 Merge tag 'mailbox-v5.3' of git://git.linaro.org/landing-teams/working/fujitsu/integration Pull mailbox updates from Jassi Brar: - stm32: race fix by adding a spinlock - mhu: trim included headers - omap: add support for K3 SoCs - imx: Irq disable fix - bcm: tidy up extracting driver data - tegra: make resume 'noirq' - api: fix error handling * tag 'mailbox-v5.3' of git://git.linaro.org/landing-teams/working/fujitsu/integration: mailbox: handle failed named mailbox channel request mailbox: tegra: avoid resume NULL mailboxes mailbox: tegra: hsp: add noirq resume mailbox: bcm-flexrm-mailbox: using dev_get_drvdata directly mailbox: imx: Clear GIEn bit at shutdown mailbox: omap: Add support for TI K3 SoCs dt-bindings: mailbox: omap: Update bindings for TI K3 SoCs mailbox: arm_mhu: reorder header inclusion and drop unneeded ones mailbox: stm32_ipcc: add spinlock to fix channels concurrent access commit a1240cf74e8228f7c80d44af17914c0ffc5633fb Merge: 1d039859330b 7d9ab9b6adff Author: Linus Torvalds Date: Sun Jul 14 16:17:18 2019 -0700 Merge branch 'for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu Pull percpu updates from Dennis Zhou: "This includes changes to let percpu_ref release the backing percpu memory earlier after it has been switched to atomic in cases where the percpu ref is not revived. This will help recycle percpu memory earlier in cases where the refcounts are pinned for prolonged periods of time" * 'for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu: percpu_ref: release percpu memory early without PERCPU_REF_ALLOW_REINIT md: initialize percpu refcounters using PERCU_REF_ALLOW_REINIT io_uring: initialize percpu refcounters using PERCU_REF_ALLOW_REINIT percpu_ref: introduce PERCPU_REF_ALLOW_REINIT flag commit 05a70a8ec287c4381ee1441ca779deab7bae124d Author: Christian Brauner Date: Sun Jul 14 21:22:05 2019 +0200 unistd: protect clone3 via __ARCH_WANT_SYS_CLONE3 This lets us catch new architectures that implicitly make use of clone3 without setting __ARCH_WANT_SYS_CLONE3. Failing on missing __ARCH_WANT_SYS_CLONE3 is a good indicator that they either did not really want this syscall or haven't really thought about whether it needs special treatment and just accidently included it in their entrypoints by e.g. generating their syscall table automatically via asm-generic/unistd.h This patch has been compile-tested for the h8300 architecture which is one of the architectures that does not yet implement clone3 and generates its syscall table via asm-generic/unistd.h. Signed-off-by: Christian Brauner Suggested-by: Arnd Bergmann Link: https://lore.kernel.org/r/20190714192205.27190-3-christian@brauner.io Reviewed-by: Arnd Bergmann Signed-off-by: Christian Brauner include/uapi/asm-generic/unistd.h | 2 ++ 1 file changed, 2 insertions(+) commit 1a271a68e030f3e134de12087117574a883e20f0 Author: Christian Brauner Date: Sun Jul 14 21:22:04 2019 +0200 arch: mark syscall number 435 reserved for clone3 A while ago Arnd made it possible to give new system calls the same syscall number on all architectures (except alpha). To not break this nice new feature let's mark 435 for clone3 as reserved on all architectures that do not yet implement it. Even if an architecture does not plan to implement it this ensures that new system calls coming after clone3 will have the same number on all architectures. Signed-off-by: Christian Brauner Cc: linux-arch@vger.kernel.org Cc: linux-alpha@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-ia64@vger.kernel.org Cc: linux-m68k@lists.linux-m68k.org Cc: linux-mips@vger.kernel.org Cc: linux-parisc@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-s390@vger.kernel.org Cc: linux-sh@vger.kernel.org Cc: sparclinux@vger.kernel.org Link: https://lore.kernel.org/r/20190714192205.27190-2-christian@brauner.io Reviewed-by: Arnd Bergmann Signed-off-by: Christian Brauner arch/alpha/kernel/syscalls/syscall.tbl | 1 + arch/ia64/kernel/syscalls/syscall.tbl | 1 + arch/m68k/kernel/syscalls/syscall.tbl | 1 + arch/mips/kernel/syscalls/syscall_n32.tbl | 1 + arch/mips/kernel/syscalls/syscall_n64.tbl | 1 + arch/mips/kernel/syscalls/syscall_o32.tbl | 1 + arch/parisc/kernel/syscalls/syscall.tbl | 1 + arch/powerpc/kernel/syscalls/syscall.tbl | 1 + arch/s390/kernel/syscalls/syscall.tbl | 1 + arch/sh/kernel/syscalls/syscall.tbl | 1 + arch/sparc/kernel/syscalls/syscall.tbl | 1 + 11 files changed, 11 insertions(+) commit 76104862cccaeaa84fdd23e39f2610a96296291c Author: Tasos Sahanidis Date: Sun Jul 14 13:31:11 2019 +0300 sky2: Disable MSI on P5W DH Deluxe The onboard sky2 NICs send IRQs after S3, resulting in ethernet not working after resume. Maskable MSI and MSI-X are also not supported, so fall back to INTx. Signed-off-by: Tasos Sahanidis Signed-off-by: David S. Miller drivers/net/ethernet/marvell/sky2.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 79f5943a87d21a902d5248466acd152f766981ad Author: Sergej Benilov Date: Sun Jul 14 18:56:27 2019 +0200 sis900: correct a few typos Correct a few typos in comments and debug text. Signed-off-by: Sergej Benilov Signed-off-by: David S. Miller drivers/net/ethernet/sis/sis900.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6e3d1bbbba55265d327e44a2d14de70462232853 Author: Haishuang Yan Date: Sun Jul 14 21:31:22 2019 +0800 sit: use dst_cache in ipip6_tunnel_xmit Same as other ip tunnel, use dst_cache in xmit action to avoid unnecessary fib lookups. Signed-off-by: Haishuang Yan Signed-off-by: David S. Miller net/ipv6/sit.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 14b4c48bb1ce6ff429a9288c9579cc984193ebaf Author: Denis Efremov Date: Sun Jul 14 15:02:25 2019 +0300 gve: Remove the exporting of gve_probe The function gve_probe is declared static and marked EXPORT_SYMBOL, which is at best an odd combination. Because the function is not used outside of the drivers/net/ethernet/google/gve/gve_main.c file it is defined in, this commit removes the EXPORT_SYMBOL() marking. Signed-off-by: Denis Efremov Signed-off-by: David S. Miller drivers/net/ethernet/google/gve/gve_main.c | 1 - 1 file changed, 1 deletion(-) commit 1d039859330b874d48080885eb31f4f129c246f1 Merge: 0c85ce135456 e4557c1a46b0 Author: Linus Torvalds Date: Sun Jul 14 11:40:33 2019 -0700 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Ingo Molnar: "A number of PMU driver corner case fixes, a race fix, an event grouping fix, plus a bunch of tooling fixes/updates" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (30 commits) perf/x86/intel: Fix spurious NMI on fixed counter perf/core: Fix exclusive events' grouping perf/x86/amd/uncore: Set the thread mask for F17h L3 PMCs perf/x86/amd/uncore: Do not set 'ThreadMask' and 'SliceMask' for non-L3 PMCs perf/core: Fix race between close() and fork() perf intel-pt: Fix potential NULL pointer dereference found by the smatch tool perf intel-bts: Fix potential NULL pointer dereference found by the smatch tool perf script: Assume native_arch for pipe mode perf scripts python: export-to-sqlite.py: Fix DROP VIEW power_events_view perf scripts python: export-to-postgresql.py: Fix DROP VIEW power_events_view perf hists browser: Fix potential NULL pointer dereference found by the smatch tool perf cs-etm: Fix potential NULL pointer dereference found by the smatch tool perf parse-events: Remove unused variable: error perf parse-events: Remove unused variable 'i' perf metricgroup: Add missing list_del_init() when flushing egroups list perf tools: Use list_del_init() more thorougly perf tools: Use zfree() where applicable tools lib: Adopt zalloc()/zfree() from tools/perf perf tools: Move get_current_dir_name() cond prototype out of util.h perf namespaces: Move the conditional setns() prototype to namespaces.h ... commit 0c85ce135456a3927f552e738f730c47ac905ac3 Merge: 577d9460d3d0 68d41d8c94a3 Author: Linus Torvalds Date: Sun Jul 14 11:39:21 2019 -0700 Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking fix from Ingo Molnar: "A single fix for a locking statistics bug" * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: locking/lockdep: Fix lock used or unused stats error commit 577d9460d3d0a69b96f749f974642441ae186a7f Merge: 50ec18819cad e9a1379f9219 Author: Linus Torvalds Date: Sun Jul 14 11:36:44 2019 -0700 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fix from Ingo Molnar: "A single build system bugfix" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/vdso: Fix flip/flop vdso build bug commit 028b6e8a89de9133a869bb4cd1bc72445b1ec8ca Author: Dmitry V. Levin Date: Sun Jul 14 19:20:47 2019 +0300 clone: fix CLONE_PIDFD support The introduction of clone3 syscall accidentally broke CLONE_PIDFD support in traditional clone syscall on compat x86 and those architectures that use do_fork to implement clone syscall. This bug was found by strace test suite. Link: https://strace.io/logs/strace/2019-07-12 Fixes: 7f192e3cd316 ("fork: add clone3") Bisected-and-tested-by: Anatoly Pugachev Signed-off-by: Dmitry V. Levin Link: https://lore.kernel.org/r/20190714162047.GB10389@altlinux.org Signed-off-by: Christian Brauner arch/x86/ia32/sys_ia32.c | 4 ++++ include/linux/sched/task.h | 1 + kernel/fork.c | 17 +++++++++++++++-- 3 files changed, 20 insertions(+), 2 deletions(-) commit 50ec18819cade37cccc914ffc71a8b0a2783c345 Merge: 192f0f8e9db7 e3d85487fba4 Author: Linus Torvalds Date: Sun Jul 14 11:34:05 2019 -0700 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fix from Ingo Molnar: "Fix a sched statistics related bug that would trigger a kernel warning on certain configs" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/core: Fix preempt warning in ttwu commit 1244a720572fd1680ac8d6b8a4235f2e8557b810 Author: Jean-Baptiste Maneyrol Date: Thu Jun 27 13:19:53 2019 +0000 iio: imu: mpu6050: add missing available scan masks Driver only supports 3-axis gyro and/or 3-axis accel. For icm20602, temp data is mandatory for all configurations. Fix all single and double axis configurations (almost never used) and more importantly fix 3-axis gyro and 6-axis accel+gyro buffer on icm20602 when temp data is not enabled. Signed-off-by: Jean-Baptiste Maneyrol Fixes: 1615fe41a195 ("iio: imu: mpu6050: Fix FIFO layout for ICM20602") Cc: Signed-off-by: Jonathan Cameron drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 43 ++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) commit 6cdff99c9f7d7d28b87cf05dd464f7c7736332ae Author: Gwendal Grignou Date: Fri Jun 28 12:17:09 2019 -0700 iio: cros_ec_accel_legacy: Fix incorrect channel setting INFO_SCALE is set both for each channel and all channels. iio is using all channel setting, so the error was not user visible. Signed-off-by: Gwendal Grignou Cc: Signed-off-by: Jonathan Cameron drivers/iio/accel/cros_ec_accel_legacy.c | 1 - 1 file changed, 1 deletion(-) commit 5a304e1a4ea000177cf25f5ecf26e786dda25b98 Author: Maarten ter Huurne Date: Thu Jul 4 19:36:56 2019 +0200 IIO: Ingenic JZ47xx: Set clock divider on probe The SADC component can run at up to 8 MHz on JZ4725B, but is fed a 12 MHz input clock (EXT). Divide it by two to get 6 MHz, then set up another divider to match, to produce a 10us clock. If the clock dividers are left on their power-on defaults (a divider of 1), the SADC mostly works, but will occasionally produce erroneous readings. This led to button presses being detected out of nowhere on the RS90 every few minutes. With this change, no ghost button presses were logged in almost a day worth of testing. The ADCLK register for configuring clock dividers doesn't exist on JZ4740, so avoid writing it there. A function has been introduced rather than a flag because there is a lot of variation between the ADCLK registers on JZ47xx SoCs, both in the internal layout of the register and in the frequency range supported by the SADC. So this solution should make it easier to add support for other JZ47xx SoCs later. Fixes: 1a78daea107d ("iio: adc: probe should set clock divider") Signed-off-by: Maarten ter Huurne Signed-off-by: Artur Rojek Cc: Signed-off-by: Jonathan Cameron drivers/iio/adc/ingenic-adc.c | 54 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) commit 3975b097e577bac77267ed8df0f525e3ad3499ec Author: Kirill Smelkov Date: Wed Jun 19 20:26:56 2019 +0300 *: convert stream-like files -> stream_open, even if they use noop_llseek This patch continues 10dce8af3422 (fs: stream_open - opener for stream-like files so that read and write can run simultaneously without deadlock) and c5bf68fe0c86 (*: convert stream-like files from nonseekable_open -> stream_open) and teaches steam_open.cocci to consider files as being stream-like not only if they have .llseek=no_llseek, but also if they have .llseek=noop_llseek. This is safe to do: the comment about noop_llseek says This is an implementation of ->llseek useable for the rare special case when userspace expects the seek to succeed but the (device) file is actually not able to perform the seek. In this case you use noop_llseek() instead of falling back to the default implementation of ->llseek. and in general noop_llseek was massively added to drivers in 6038f373a3dc (llseek: automatically add .llseek fop) when changing default for NULL .llseek from NOP to no_llseek with the idea to avoid breaking compatibility, if maybe some user-space program was using lseek on a device without caring about the result, but caring if it was an error or not. Amended semantic patch produces two changes when applied tree-wide: drivers/hid/hid-sensor-custom.c:690:8-24: WARNING: hid_sensor_custom_fops: .read() has stream semantic; safe to change nonseekable_open -> stream_open. drivers/input/mousedev.c:564:1-17: ERROR: mousedev_fops: .read() can deadlock .write(); change nonseekable_open -> stream_open to fix. Cc: Julia Lawall Cc: Jan Blunck Cc: Arnd Bergmann Cc: Jiri Kosina Cc: Jonathan Cameron Cc: Srinivas Pandruvada Cc: Benjamin Tissoires Cc: Dmitry Torokhov Signed-off-by: Kirill Smelkov drivers/hid/hid-sensor-custom.c | 2 +- drivers/input/mousedev.c | 2 +- scripts/coccinelle/api/stream_open.cocci | 9 ++++++++- 3 files changed, 10 insertions(+), 3 deletions(-) commit ae8cc91a7d85e018c0c267f580820b2bb558cd48 Author: Joe Perches Date: Tue Jul 9 22:04:17 2019 -0700 iio: adc: max9611: Fix misuse of GENMASK macro Arguments are supposed to be ordered high then low. Signed-off-by: Joe Perches Fixes: 69780a3bbc0b ("iio: adc: Add Maxim max9611 ADC driver") Cc: Signed-off-by: Jonathan Cameron drivers/iio/adc/max9611.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0307d589c4d6f84349afb7a53717baa2392f6a38 Author: Vincent Bernat Date: Sat Jul 13 16:35:27 2019 +0200 bonding: add documentation for peer_notif_delay Ability to tweak the interval between peer notifications has been added in 07a4ddec3ce9 ("bonding: add an option to specify a delay between peer notifications") but the documentation was not updated. Signed-off-by: Vincent Bernat Signed-off-by: David S. Miller Documentation/networking/bonding.txt | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit fe4e8db0392a6c2e795eb89ef5fcd86522e66248 Author: Heiner Kallweit Date: Sat Jul 13 13:45:47 2019 +0200 r8169: fix issue with confused RX unit after PHY power-down on RTL8411b On RTL8411b the RX unit gets confused if the PHY is powered-down. This was reported in [0] and confirmed by Realtek. Realtek provided a sequence to fix the RX unit after PHY wakeup. The issue itself seems to have been there longer, the Fixes tag refers to where the fix applies properly. [0] https://bugzilla.redhat.com/show_bug.cgi?id=1692075 Fixes: a99790bf5c7f ("r8169: Reinstate ASPM Support") Tested-by: Ionut Radu Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169_main.c | 137 ++++++++++++++++++++++++++++++ 1 file changed, 137 insertions(+) commit 192f0f8e9db7efe4ac98d47f5fa4334e43c1204d Merge: ec9249752465 f5a9e488d623 Author: Linus Torvalds Date: Sat Jul 13 16:08:36 2019 -0700 Merge tag 'powerpc-5.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc updates from Michael Ellerman: "Notable changes: - Removal of the NPU DMA code, used by the out-of-tree Nvidia driver, as well as some other functions only used by drivers that haven't (yet?) made it upstream. - A fix for a bug in our handling of hardware watchpoints (eg. perf record -e mem: ...) which could lead to register corruption and kernel crashes. - Enable HAVE_ARCH_HUGE_VMAP, which allows us to use large pages for vmalloc when using the Radix MMU. - A large but incremental rewrite of our exception handling code to use gas macros rather than multiple levels of nested CPP macros. And the usual small fixes, cleanups and improvements. Thanks to: Alastair D'Silva, Alexey Kardashevskiy, Andreas Schwab, Aneesh Kumar K.V, Anju T Sudhakar, Anton Blanchard, Arnd Bergmann, Athira Rajeev, Cédric Le Goater, Christian Lamparter, Christophe Leroy, Christophe Lombard, Christoph Hellwig, Daniel Axtens, Denis Efremov, Enrico Weigelt, Frederic Barrat, Gautham R. Shenoy, Geert Uytterhoeven, Geliang Tang, Gen Zhang, Greg Kroah-Hartman, Greg Kurz, Gustavo Romero, Krzysztof Kozlowski, Madhavan Srinivasan, Masahiro Yamada, Mathieu Malaterre, Michael Neuling, Nathan Lynch, Naveen N. Rao, Nicholas Piggin, Nishad Kamdar, Oliver O'Halloran, Qian Cai, Ravi Bangoria, Sachin Sant, Sam Bobroff, Satheesh Rajendran, Segher Boessenkool, Shaokun Zhang, Shawn Anastasio, Stewart Smith, Suraj Jitindar Singh, Thiago Jung Bauermann, YueHaibing" * tag 'powerpc-5.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (163 commits) powerpc/powernv/idle: Fix restore of SPRN_LDBAR for POWER9 stop state. powerpc/eeh: Handle hugepages in ioremap space ocxl: Update for AFU descriptor template version 1.1 powerpc/boot: pass CONFIG options in a simpler and more robust way powerpc/boot: add {get, put}_unaligned_be32 to xz_config.h powerpc/irq: Don't WARN continuously in arch_local_irq_restore() powerpc/module64: Use symbolic instructions names. powerpc/module32: Use symbolic instructions names. powerpc: Move PPC_HA() PPC_HI() and PPC_LO() to ppc-opcode.h powerpc/module64: Fix comment in R_PPC64_ENTRY handling powerpc/boot: Add lzo support for uImage powerpc/boot: Add lzma support for uImage powerpc/boot: don't force gzipped uImage powerpc/8xx: Add microcode patch to move SMC parameter RAM. powerpc/8xx: Use IO accessors in microcode programming. powerpc/8xx: replace #ifdefs by IS_ENABLED() in microcode.c powerpc/8xx: refactor programming of microcode CPM params. powerpc/8xx: refactor printing of microcode patch name. powerpc/8xx: Refactor microcode write powerpc/8xx: refactor writing of CPM microcode arrays ... commit ec9249752465b87b5b26d03f476eebaf872ebd12 Merge: d12109291ccb 61daf52c4ddd Author: Linus Torvalds Date: Sat Jul 13 16:04:19 2019 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc Pull sparc updates from David Miller: "Just a few small changes: - Fix console naming inconsistency with hypervisor consoles, from John Paul Adrian Glaubitz - Fix userland compilation due to use of u_int, from Masahiro Yamada" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: sparc64: Add missing newline at end of file sparc: fix unknown type name u_int in uapi header sparc: configs: Remove useless UEVENT_HELPER_PATH sparc: Remove redundant copy of the LGPL-2.0 sunhv: Fix device naming inconsistency between sunhv_console and sunhv_reg commit d12109291ccbef7e879cc0d0733f31685cd80854 Merge: 1fa91854dcdf 25a09ce79639 Author: Linus Torvalds Date: Sat Jul 13 15:57:37 2019 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Fix excessive stack usage in cxgb4, from Arnd Bergmann. 2) Missing skb queue lock init in tipc, from Chris Packham. 3) Fix some regressions in ipv6 flow label handling, from Eric Dumazet. 4) Elide flow dissection of local packets in FIB rules, from Petar Penkov. 5) Fix TLS support build failure in mlx5, from Tariq Toukab. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (36 commits) ppp: mppe: Revert "ppp: mppe: Add softdep to arc4" net: dsa: qca8k: replace legacy gpio include net: hisilicon: Use devm_platform_ioremap_resource cxgb4: reduce kernel stack usage in cudbg_collect_mem_region() tipc: ensure head->lock is initialised tc-tests: updated skbedit tests nfp: flower: ensure ip protocol is specified for L4 matches nfp: flower: fix ethernet check on match fields net/mlx5e: Provide cb_list pointer when setting up tc block on rep net: phy: make exported variables non-static net: sched: Fix NULL-pointer dereference in tc_indr_block_ing_cmd() davinci_cpdma: don't cast dma_addr_t to pointer net: openvswitch: do not update max_headroom if new headroom is equal to old headroom net/mlx5e: Convert single case statement switch statements into if statements net/mlx5: E-Switch, Reduce ingress acl modify metadata stack usage net/mlx5e: Fix unused variable warning when CONFIG_MLX5_ESWITCH is off net/mlx5e: Fix compilation error in TLS code ipv6: fix static key imbalance in fl_create() ipv6: fix potential crash in ip6_datagram_dst_update() ipv6: tcp: fix flowlabels reflection for RST packets ... commit 1fa91854dcdf7829e2694873b19f96b65947112d Merge: 3f06962273e7 13990cf8a180 Author: Linus Torvalds Date: Sat Jul 13 15:51:06 2019 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide Pull IDE update from David Miller: "Small cleanup" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide: ide: use BIT() macro for defining bit-flags commit 3f06962273e73c5f7a651726b191d531cadef788 Merge: 2260840592fb 46ce10df799f Author: Linus Torvalds Date: Sat Jul 13 15:42:44 2019 -0700 Merge tag 'mtd/for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux Pull MTD updates from Miquel Raynal: "This contains the following changes for MTD: MTD core changes: - New Hyperbus framework - New _is_locked (concat) implementation - Various cleanups NAND core changes: - use longest matching pattern in ->exec_op() default parser - export NAND operation tracer - add flag to indicate panic_write in MTD - use kzalloc() instead of kmalloc() and memset() Raw NAND controller drivers changes: - brcmnand: - fix BCH ECC layout for large page NAND parts - fallback to detected ecc-strength, ecc-step-size - when oops in progress use pio and interrupt polling - code refactor code to introduce helper functions - add support for v7.3 controller - FSMC: - use nand_op_trace for operation tracing - GPMI: - move all driver code into single file - various cleanups (including dmaengine changes) - use runtime PM to manage clocks - implement exec_op - MTK: - correct low level time calculation of r/w cycle - improve data sampling timing for read cycle - add validity check for CE# pin setting - fix wrongly assigned OOB buffer pointer issue - re-license MTK NAND driver as Dual MIT/GPL - STM32: - manage the get_irq error case - increase DMA completion timeouts Raw NAND chips drivers changes: - Macronix: add read-retry support Onenand driver changes: - add support for 8Gb datasize chips - avoid fall-through warnings SPI-NAND changes: - define macros for page-read ops with three-byte addresses - add support for two-byte device IDs and then for GigaDevice GD5F1GQ4UFxxG - add initial support for Paragon PN26G0xA - handle the case where the last page read has bitflips SPI-NOR core changes: - add support for the mt25ql02g and w25q16jv flashes - print error in case of jedec read id fails - is25lp256: add post BFPT fix to correct the addr_width SPI NOR controller drivers changes: - intel-spi: Add support for Intel Elkhart Lake SPI serial flash - smt32: remove the driver as the driver was replaced by spi-stm32-qspi.c - cadence-quadspi: add reset control" * tag 'mtd/for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: (60 commits) mtd: concat: implement _is_locked mtd operation mtd: concat: refactor concat_lock/concat_unlock mtd: abi: do not use C++ style comments in uapi header mtd: afs: remove unneeded NULL check mtd: rawnand: stm32_fmc2: increase DMA completion timeouts mtd: rawnand: Use kzalloc() instead of kmalloc() and memset() mtd: hyperbus: Add driver for TI's HyperBus memory controller mtd: spinand: read returns badly if the last page has bitflips mtd: spinand: Add initial support for Paragon PN26G0xA mtd: rawnand: mtk: Re-license MTK NAND driver as Dual MIT/GPL mtd: rawnand: gpmi: remove double assignment to block_size dt-bindings: mtd: brcmnand: Add brcmnand, brcmnand-v7.3 support mtd: rawnand: brcmnand: Add support for v7.3 controller mtd: rawnand: brcmnand: Refactored code to introduce helper functions mtd: rawnand: brcmnand: When oops in progress use pio and interrupt polling mtd: Add flag to indicate panic_write mtd: rawnand: Add Macronix NAND read retry support mtd: onenand: Avoid fall-through warnings mtd: spinand: Add support for GigaDevice GD5F1GQ4UFxxG mtd: spinand: Add support for two-byte device IDs ... commit 2260840592fbed5be98ca03c97eb8172941f27ac Merge: 92adeb616c91 bd293d071ffe Author: Linus Torvalds Date: Sat Jul 13 15:24:31 2019 -0700 Merge tag 'for-5.3/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper updates from Mike Snitzer: - Add encrypted byte-offset initialization vector (eboiv) to DM crypt. - Add optional discard features to DM snapshot which allow freeing space from a DM device whose free space was exhausted. - Various small improvements to use struct_size() and kzalloc(). - Fix to check if DM thin metadata is in fail_io mode before attempting to update the superblock to set the needs_check flag. Otherwise the DM thin-pool can hang. - Fix DM bufio shrinker's potential for ABBA recursion deadlock with DM thin provisioning on loop usecase. * tag 'for-5.3/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm bufio: fix deadlock with loop device dm snapshot: add optional discard support features dm crypt: implement eboiv - encrypted byte-offset initialization vector dm crypt: remove obsolete comment about plumb IV dm crypt: wipe private IV struct after key invalid flag is set dm integrity: use kzalloc() instead of kmalloc() + memset() dm: update stale comment in end_clone_bio() dm log writes: fix incorrect comment about the logged sequence example dm log writes: use struct_size() to calculate size of pending_block dm crypt: use struct_size() when allocating encryption context dm integrity: always set version on superblock update dm thin metadata: check if in fail_io mode when setting needs_check commit 92adeb616c9172dea9678f53ea6e5501fc4f4338 Merge: 43c95d3694cc ac499fba98c3 Author: Linus Torvalds Date: Sat Jul 13 15:07:02 2019 -0700 Merge tag 'for-linus-5.3' of git://github.com/cminyard/linux-ipmi Pull IPMI updates from Corey Minyard: "Some small fixes for various things, nothing huge, mostly found by automated tools. Plus add a driver that allows Linux to act as an IPMB slave device, so it can be a satellite MC in an IPMI network" * tag 'for-linus-5.3' of git://github.com/cminyard/linux-ipmi: docs: ipmb: place it at driver-api and convert to ReST fix platform_no_drv_owner.cocci warnings ipmi: ipmb: don't allocate i2c_client on stack ipmi: ipmb: Fix build error while CONFIG_I2C is set to m Add support for IPMB driver drivers: ipmi: Drop device reference ipmi_ssif: fix unexpected driver unregister warning ipmi_si: use bool type for initialized variable ipmi_si: fix unexpected driver unregister warning commit 43c95d3694cc448fdf50bd53b7ff3a5bb4655883 Merge: 073c916bc005 4c105769bf6d Author: Linus Torvalds Date: Sat Jul 13 15:02:27 2019 -0700 Merge tag 'pinctrl-v5.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control updates from Linus Walleij: "This is the bulk of pin control changes for the v5.3 kernel cycle: Core changes: - Device links can optionally be added between a pin control producer and its consumers. This will affect how the system power management is handled: a pin controller will not suspend before all of its consumers have been suspended. This was necessary for the ST Microelectronics STMFX expander and need to be tested on other systems as well: it makes sense to make this default in the long run. Right now it is opt-in per driver. - Drive strength can be specified in microamps. With decreases in silicon technology, milliamps isn't granular enough, let's make it possible to select drive strengths in microamps. Right now the Meson (AMlogic) driver needs this. New drivers: - New subdriver for the Tegra 194 SoC. - New subdriver for the Qualcomm SDM845. - New subdriver for the Qualcomm SM8150. - New subdriver for the Freescale i.MX8MN (Freescale is now a product line of NXP). - New subdriver for Marvell MV98DX1135. Driver improvements: - The Bitmain BM1880 driver now supports pin config in addition to muxing. - The Qualcomm drivers can now reserve some GPIOs as taken aside and not usable for users. This is used in ACPI systems to take out some GPIO lines used by the BIOS so that noone else (neither kernel nor userspace) will play with them by mistake and crash the machine. - A slew of refurbishing around the Aspeed drivers (board management controllers for servers) in preparation for the new Aspeed AST2600 SoC. - A slew of improvements over the SH PFC drivers as usual. - Misc cleanups and fixes" * tag 'pinctrl-v5.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (106 commits) pinctrl: aspeed: Strip moved macros and structs from private header pinctrl: aspeed: Fix missed include pinctrl: baytrail: Use GENMASK() consistently pinctrl: baytrail: Re-use data structures from pinctrl-intel.h pinctrl: baytrail: Use defined macro instead of magic in byt_get_gpio_mux() pinctrl: qcom: Add SM8150 pinctrl driver dt-bindings: pinctrl: qcom: Add SM8150 pinctrl binding dt-bindings: pinctrl: qcom: Document missing gpio nodes pinctrl: aspeed: Add implementation-related documentation pinctrl: aspeed: Split out pinmux from general pinctrl pinctrl: aspeed: Clarify comment about strapping W1C pinctrl: aspeed: Correct comment that is no longer true MAINTAINERS: Add entry for ASPEED pinctrl drivers dt-bindings: pinctrl: aspeed: Convert AST2500 bindings to json-schema dt-bindings: pinctrl: aspeed: Convert AST2400 bindings to json-schema dt-bindings: pinctrl: aspeed: Split bindings document in two pinctrl: qcom: Add irq_enable callback for msm gpio pinctrl: madera: Fixup SPDX headers pinctrl: qcom: sdm845: Fix CONFIG preprocessor guard pinctrl: tegra: Add bitmask support for parked bits ... commit 073c916bc00571d8662b89a294eba265481b6fbb Merge: a2d79c7174ae 597473720f4d Author: Linus Torvalds Date: Sat Jul 13 14:40:42 2019 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input updates from Dmitry Torokhov: - an update to Elan touchpad SMBus driver to fetch device parameters (size, resolution) while it is still in PS/2 mode, before switching over to SMBus, as in that mode some devices return garbage dimensions - update to iforce joystick driver - miscellaneous driver fixes * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (48 commits) Input: gpio_keys_polled - allow specifying name of input device Input: edt-ft5x06 - simplify event reporting code Input: max77650-onkey - add MODULE_ALIAS() Input: atmel_mxt_ts - fix leak in mxt_update_cfg() Input: synaptics - enable SMBUS on T480 thinkpad trackpad Input: atmel_mxt_ts - fix -Wunused-const-variable Input: joydev - extend absolute mouse detection HID: quirks: Refactor ELAN 400 and 401 handling Input: elan_i2c - export the device id whitelist Input: edt-ft5x06 - use get_unaligned_be16() Input: iforce - add the Saitek R440 Force Wheel Input: iforce - use unaligned accessors, where appropriate Input: iforce - drop couple of temps from transport code Input: iforce - drop bus type from iforce structure Input: iforce - use DMA-safe buffores for USB transfers Input: iforce - allow callers supply data buffer when fetching device IDs Input: iforce - only call iforce_process_packet() if initialized Input: iforce - signal command completion from transport code Input: iforce - do not combine arguments for iforce_process_packet() Input: iforce - factor out hat handling when parsing packets ... commit f0162d21cc8025c828fafe56ee25801f770f41da Author: Hariprasad Kelam Date: Thu Jul 11 23:26:15 2019 +0530 rtc: wm831x: Add IRQF_ONESHOT flag fix below issue reported by coccicheck drivers/rtc/rtc-wm831x.c:436:7-32: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT Signed-off-by: Hariprasad Kelam Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20190711175615.GA13651@hari-Inspiron-1545 Signed-off-by: Alexandre Belloni drivers/rtc/rtc-wm831x.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fe63604c630acfc51797d5896ff01cd59c684572 Author: Markus Elfring Date: Mon Jul 8 10:26:47 2019 +0200 rtc: stm32: remove one condition check in stm32_rtc_set_alarm() A condition check was repeated in this function implementation despite of a corresponding check in the stm32_rtc_alarm_irq_enable() function. Thus delete redundant source code here. This issue was detected by using the Coccinelle software. Suggested-by: Russell King Signed-off-by: Markus Elfring Reviewed-by: Amelie Delaunay Link: https://lore.kernel.org/r/4da614a4-83c6-548c-a112-033b846c561b@web.de Signed-off-by: Alexandre Belloni drivers/rtc/rtc-stm32.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit f2f5cb6a73b9f056ae3f8e6b4c61f57d6f3ab1ec Author: YueHaibing Date: Thu Jul 4 16:55:42 2019 +0800 rtc: pcf2123: Fix build error If REGMAP_SPI is m and RTC_DRV_PCF2123 is y, drivers/rtc/rtc-pcf2123.o: In function `pcf2123_probe': rtc-pcf2123.c:(.text+0xb2b): undefined reference to `__devm_regmap_init_spi' Select REGMAP_SPI as RTC_DRV_DS1347 driver does. Reported-by: Hulk Robot Fixes: 790d033933b8 ("rtc: pcf2123: port to regmap") Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20190704085542.48180-1-yuehaibing@huawei.com Signed-off-by: Alexandre Belloni drivers/rtc/Kconfig | 1 + 1 file changed, 1 insertion(+) commit a2d79c7174aeb43b13020dd53d85a7aefdd9f3e5 Merge: 964a4eacef67 a4c0b3decb33 Author: Linus Torvalds Date: Sat Jul 13 10:36:53 2019 -0700 Merge tag 'for-5.3/io_uring-20190711' of git://git.kernel.dk/linux-block Pull io_uring updates from Jens Axboe: "This contains: - Support for recvmsg/sendmsg as first class opcodes. I don't envision going much further down this path, as there are plans in progress to support potentially any system call in an async fashion through io_uring. But I think it does make sense to have certain core ops available directly, especially those that can support a "try this non-blocking" flag/mode. (me) - Handle generic short reads automatically. This can happen fairly easily if parts of the buffered read is cached. Since the application needs to issue another request for the remainder, just do this internally and save kernel/user roundtrip while providing a nicer more robust API. (me) - Support for linked SQEs. This allows SQEs to depend on each other, enabling an application to eg queue a read-from-this-file,write-to-that-file pair. (me) - Fix race in stopping SQ thread (Jackie)" * tag 'for-5.3/io_uring-20190711' of git://git.kernel.dk/linux-block: io_uring: fix io_sq_thread_stop running in front of io_sq_thread io_uring: add support for recvmsg() io_uring: add support for sendmsg() io_uring: add support for sqe links io_uring: punt short reads to async context uio: make import_iovec()/compat_import_iovec() return bytes on success commit ce465bf94b70f03136171a62b607864f00093b19 Author: Ronnie Sahlberg Date: Thu Jul 11 13:46:58 2019 +1000 cifs: fix crash in cifs_dfs_do_automount RHBZ: 1649907 Fix a crash that happens while attempting to mount a DFS referral from the same server on the root of a filesystem. Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French fs/cifs/connect.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 5b596830d9710e3554354f717dc56f8640841c82 Author: Donald Buczek Date: Sun Jul 7 21:26:10 2019 +0200 nfs4.0: Refetch lease_time after clientid update RFC 7530 requires us to refetch the lease time attribute once a new clientID is established. This is already implemented for the nfs4.1(+) clients by nfs41_init_clientid, which calls nfs41_finish_session_reset, which calls nfs4_setup_state_renewal. To make nfs4_setup_state_renewal available for nfs4.0, move it further to the top of the source file to include it regardles of CONFIG_NFS_V4_1 and to save a forward declaration. Call nfs4_setup_state_renewal from nfs4_init_clientid. Signed-off-by: Donald Buczek Signed-off-by: Trond Myklebust fs/nfs/nfs4state.c | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) commit ea51efaa9617ee011f53bcd29752c51cda540e06 Author: Donald Buczek Date: Sun Jul 7 21:26:09 2019 +0200 nfs4: Rename nfs41_setup_state_renewal The function nfs41_setup_state_renewal is useful to the nfs 4.0 client as well, so rename the function to nfs4_setup_state_renewal. Signed-off-by: Donald Buczek Signed-off-by: Trond Myklebust fs/nfs/nfs4state.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0efb01b2ac07976b350b1899333a961fd51d1fdc Author: Donald Buczek Date: Sun Jul 7 21:26:08 2019 +0200 nfs4: Make nfs4_proc_get_lease_time available for nfs4.0 Compile nfs4_proc_get_lease_time, enc_get_lease_time and dec_get_lease_time for nfs4.0. Use nfs4_sequence_done instead of nfs41_sequence_done in nfs4_proc_get_lease_time, Signed-off-by: Donald Buczek Signed-off-by: Trond Myklebust fs/nfs/nfs4_fs.h | 4 ++-- fs/nfs/nfs4proc.c | 6 +++++- fs/nfs/nfs4xdr.c | 12 +++++++++++- 3 files changed, 18 insertions(+), 4 deletions(-) commit 2eaf426debdce566df9302b218307483903ac534 Author: Donald Buczek Date: Sun Jul 7 21:26:07 2019 +0200 nfs: Fix copy-and-paste error in debug message The debug message of decode_attr_lease_time incorrectly says "file size". Fix it to "lease time". Signed-off-by: Donald Buczek Signed-off-by: Trond Myklebust fs/nfs/nfs4xdr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c316e39a03af7b3e397f45d65fe00653996c467 Author: Markus Elfring Date: Wed Jul 3 15:50:37 2019 +0200 NFS: Replace 16 seq_printf() calls by seq_puts() Some strings should be put into a sequence. Thus use the corresponding function “seq_puts”. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Trond Myklebust fs/nfs/super.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 9bcaa35c686d65091e833f6c97a20baa31d0e870 Author: Markus Elfring Date: Wed Jul 3 15:33:09 2019 +0200 NFS: Use seq_putc() in nfs_show_stats() A single character (line break) should be put into a sequence. Thus use the corresponding function “seq_putc”. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Trond Myklebust fs/nfs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3126790d1fd3f0dff11240c1bdb04a6f020a5a03 Author: Puranjay Mohan Date: Tue Jun 18 09:53:51 2019 +0530 rtc: interface: Change type of 'count' from int to u64 Callers of hrtimer_forward_now() should save the return value in u64. function rtc_pie_update_irq() stores it in variable 'count' of type int change type of count from unsigned long to u64 to solve the issue. Signed-off-by: Puranjay Mohan Link: https://lore.kernel.org/r/20190618042351.9692-1-puranjay12@gmail.com Signed-off-by: Alexandre Belloni drivers/rtc/interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 68d41d8c94a31dfb8233ab90b9baf41a2ed2da68 Author: Yuyang Du Date: Tue Jul 9 18:15:22 2019 +0800 locking/lockdep: Fix lock used or unused stats error The stats variable nr_unused_locks is incremented every time a new lock class is register and decremented when the lock is first used in __lock_acquire(). And after all, it is shown and checked in lockdep_stats. However, under configurations that either CONFIG_TRACE_IRQFLAGS or CONFIG_PROVE_LOCKING is not defined: The commit: 091806515124b20 ("locking/lockdep: Consolidate lock usage bit initialization") missed marking the LOCK_USED flag at IRQ usage initialization because as mark_usage() is not called. And the commit: 886532aee3cd42d ("locking/lockdep: Move mark_lock() inside CONFIG_TRACE_IRQFLAGS && CONFIG_PROVE_LOCKING") further made mark_lock() not defined such that the LOCK_USED cannot be marked at all when the lock is first acquired. As a result, we fix this by not showing and checking the stats under such configurations for lockdep_stats. Reported-by: Qian Cai Signed-off-by: Yuyang Du Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Will Deacon Cc: arnd@arndb.de Cc: frederic@kernel.org Link: https://lkml.kernel.org/r/20190709101522.9117-1-duyuyang@gmail.com Signed-off-by: Ingo Molnar kernel/locking/lockdep_proc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit e3d85487fba42206024bc3ed32e4b581c7cb46db Author: Peter Zijlstra Date: Wed Jul 10 12:57:36 2019 +0200 sched/core: Fix preempt warning in ttwu John reported a DEBUG_PREEMPT warning caused by commit: aacedf26fb76 ("sched/core: Optimize try_to_wake_up() for local wakeups") I overlooked that ttwu_stat() requires preemption disabled. Reported-by: John Stultz Tested-by: John Stultz Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: aacedf26fb76 ("sched/core: Optimize try_to_wake_up() for local wakeups") Link: https://lkml.kernel.org/r/20190710105736.GK3402@hirez.programming.kicks-ass.net Signed-off-by: Ingo Molnar kernel/sched/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e4557c1a46b0d32746bd309e1941914b5a6912b4 Author: Kan Liang Date: Tue Jun 25 07:21:35 2019 -0700 perf/x86/intel: Fix spurious NMI on fixed counter If a user first sample a PEBS event on a fixed counter, then sample a non-PEBS event on the same fixed counter on Icelake, it will trigger spurious NMI. For example: perf record -e 'cycles:p' -a perf record -e 'cycles' -a The error message for spurious NMI: [June 21 15:38] Uhhuh. NMI received for unknown reason 30 on CPU 2. [ +0.000000] Do you have a strange power saving mode enabled? [ +0.000000] Dazed and confused, but trying to continue The bug was introduced by the following commit: commit 6f55967ad9d9 ("perf/x86/intel: Fix race in intel_pmu_disable_event()") The commit moves the intel_pmu_pebs_disable() after intel_pmu_disable_fixed(), which returns immediately. The related bit of PEBS_ENABLE MSR will never be cleared for the fixed counter. Then a non-PEBS event runs on the fixed counter, but the bit on PEBS_ENABLE is still set, which triggers spurious NMIs. Check and disable PEBS for fixed counters after intel_pmu_disable_fixed(). Reported-by: Yi, Ammy Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Acked-by: Jiri Olsa Cc: Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Fixes: 6f55967ad9d9 ("perf/x86/intel: Fix race in intel_pmu_disable_event()") Link: https://lkml.kernel.org/r/20190625142135.22112-1-kan.liang@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/core.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 8a58ddae23796c733c5dfbd717538d89d036c5bd Author: Alexander Shishkin Date: Mon Jul 1 14:07:55 2019 +0300 perf/core: Fix exclusive events' grouping So far, we tried to disallow grouping exclusive events for the fear of complications they would cause with moving between contexts. Specifically, moving a software group to a hardware context would violate the exclusivity rules if both groups contain matching exclusive events. This attempt was, however, unsuccessful: the check that we have in the perf_event_open() syscall is both wrong (looks at wrong PMU) and insufficient (group leader may still be exclusive), as can be illustrated by running: $ perf record -e '{intel_pt//,cycles}' uname $ perf record -e '{cycles,intel_pt//}' uname ultimately successfully. Furthermore, we are completely free to trigger the exclusivity violation by: perf -e '{cycles,intel_pt//}' -e '{intel_pt//,instructions}' even though the helpful perf record will not allow that, the ABI will. The warning later in the perf_event_open() path will also not trigger, because it's also wrong. Fix all this by validating the original group before moving, getting rid of broken safeguards and placing a useful one to perf_install_in_context(). Signed-off-by: Alexander Shishkin Signed-off-by: Peter Zijlstra (Intel) Cc: Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: mathieu.poirier@linaro.org Cc: will.deacon@arm.com Fixes: bed5b25ad9c8a ("perf: Add a pmu capability for "exclusive" events") Link: https://lkml.kernel.org/r/20190701110755.24646-1-alexander.shishkin@linux.intel.com Signed-off-by: Ingo Molnar include/linux/perf_event.h | 5 +++++ kernel/events/core.c | 34 ++++++++++++++++++++++------------ 2 files changed, 27 insertions(+), 12 deletions(-) commit 2f217d58a8a086d3399fecce39fb358848e799c4 Author: Kim Phillips Date: Fri Jun 28 21:59:33 2019 +0000 perf/x86/amd/uncore: Set the thread mask for F17h L3 PMCs Fill in the L3 performance event select register ThreadMask bitfield, to enable per hardware thread accounting. Signed-off-by: Kim Phillips Signed-off-by: Peter Zijlstra (Intel) Cc: Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Gary Hook Cc: H. Peter Anvin Cc: Janakarajan Natarajan Cc: Jiri Olsa Cc: Linus Torvalds Cc: Martin Liska Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Pu Wen Cc: Stephane Eranian Cc: Suravee Suthikulpanit Cc: Thomas Gleixner Cc: Vince Weaver Link: https://lkml.kernel.org/r/20190628215906.4276-2-kim.phillips@amd.com Signed-off-by: Ingo Molnar arch/x86/events/amd/uncore.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 16f4641166b10e199f0d7b68c2c5f004fef0bda3 Author: Kim Phillips Date: Fri Jun 28 21:59:20 2019 +0000 perf/x86/amd/uncore: Do not set 'ThreadMask' and 'SliceMask' for non-L3 PMCs The following commit: d7cbbe49a930 ("perf/x86/amd/uncore: Set ThreadMask and SliceMask for L3 Cache perf events") enables L3 PMC events for all threads and slices by writing 1's in 'ChL3PmcCfg' (L3 PMC PERF_CTL) register fields. Those bitfields overlap with high order event select bits in the Data Fabric PMC control register, however. So when a user requests raw Data Fabric events (-e amd_df/event=0xYYY/), the two highest order bits get inadvertently set, changing the counter select to events that don't exist, and for which no counts are read. This patch changes the logic to write the L3 masks only when dealing with L3 PMC counters. AMD Family 16h and below Northbridge (NB) counters were not affected. Signed-off-by: Kim Phillips Signed-off-by: Peter Zijlstra (Intel) Cc: Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Gary Hook Cc: H. Peter Anvin Cc: Janakarajan Natarajan Cc: Jiri Olsa Cc: Linus Torvalds Cc: Martin Liska Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Pu Wen Cc: Stephane Eranian Cc: Suravee Suthikulpanit Cc: Thomas Gleixner Cc: Vince Weaver Fixes: d7cbbe49a930 ("perf/x86/amd/uncore: Set ThreadMask and SliceMask for L3 Cache perf events") Link: https://lkml.kernel.org/r/20190628215906.4276-1-kim.phillips@amd.com Signed-off-by: Ingo Molnar arch/x86/events/amd/uncore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1cf8dfe8a661f0462925df943140e9f6d1ea5233 Author: Peter Zijlstra Date: Sat Jul 13 11:21:25 2019 +0200 perf/core: Fix race between close() and fork() Syzcaller reported the following Use-after-Free bug: close() clone() copy_process() perf_event_init_task() perf_event_init_context() mutex_lock(parent_ctx->mutex) inherit_task_group() inherit_group() inherit_event() mutex_lock(event->child_mutex) // expose event on child list list_add_tail() mutex_unlock(event->child_mutex) mutex_unlock(parent_ctx->mutex) ... goto bad_fork_* bad_fork_cleanup_perf: perf_event_free_task() perf_release() perf_event_release_kernel() list_for_each_entry() mutex_lock(ctx->mutex) mutex_lock(event->child_mutex) // event is from the failing inherit // on the other CPU perf_remove_from_context() list_move() mutex_unlock(event->child_mutex) mutex_unlock(ctx->mutex) mutex_lock(ctx->mutex) list_for_each_entry_safe() // event already stolen mutex_unlock(ctx->mutex) delayed_free_task() free_task() list_for_each_entry_safe() list_del() free_event() _free_event() // and so event->hw.target // is the already freed failed clone() if (event->hw.target) put_task_struct(event->hw.target) // WHOOPSIE, already quite dead Which puts the lie to the the comment on perf_event_free_task(): 'unexposed, unused context' not so much. Which is a 'fun' confluence of fail; copy_process() doing an unconditional free_task() and not respecting refcounts, and perf having creative locking. In particular: 82d94856fa22 ("perf/core: Fix lock inversion between perf,trace,cpuhp") seems to have overlooked this 'fun' parade. Solve it by using the fact that detached events still have a reference count on their (previous) context. With this perf_event_free_task() can detect when events have escaped and wait for their destruction. Debugged-by: Alexander Shishkin Reported-by: syzbot+a24c397a29ad22d86c98@syzkaller.appspotmail.com Signed-off-by: Peter Zijlstra (Intel) Acked-by: Mark Rutland Cc: Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Fixes: 82d94856fa22 ("perf/core: Fix lock inversion between perf,trace,cpuhp") Signed-off-by: Ingo Molnar kernel/events/core.c | 49 +++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 41 insertions(+), 8 deletions(-) commit e5eb08ac81d237e19fc68888bbba2cf88891bbe9 Merge: f632a8170a6b 323fd749821d Author: Ingo Molnar Date: Sat Jul 13 11:12:47 2019 +0200 Merge tag 'perf-core-for-mingo-5.3-20190709' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/core improvements and fixes: Intel PT: Adrian Hunter: - Fix DROP VIEW power_events_view in the postgresql and sqlite export-db python scripts. perf script: Song Liu: - Assume native_arch for pipe mode, fixing a segfault. perf inject: Arnaldo Carvalho de Melo: - The tool->read() call may pass a NULL evsel, handle it. core: Arnaldo Carvalho de Melo: - Move zalloc/zfree.c to tools/lib, further eroding tools/perf/util.[ch] - Use zfree() where applicable instead of open coded equivalent. - Add stdlib.h and some other headers to places where its needed and were getting via util.h, that doesn't need that anymore. - Use list_del_init() more thoroughly. Miscellaneous: Leo Yan: - Fix use after free and potential NULL pointer derefs detected by the smatch tool in various places. Luke Mujica: - Remove a couple unused variables in the parse-events code. Numfor Mbiziwo-Tiapo: - Initialize variable to suppress memory sanitizer warning in the mmap-thread-lookup 'perf test' entry. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit e2c063c8970044033dac9cedc686db27008e4bb1 Author: Fuqian Huang Date: Sat Jul 13 01:05:19 2019 -0700 Input: auo-pixcir-ts - switch to using devm_add_action_or_reset() devm_add_action_or_reset() is introduced as a helper function which internally calls devm_add_action(). If devm_add_action() fails then it will execute the action mentioned and return the error code. This reduce source code size (avoid writing the action twice) and reduce the likelyhood of bugs. Signed-off-by: Fuqian Huang Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/auo-pixcir-ts.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 2a017fd82c5402b3c8df5e3d6e5165d9e6147dc1 Author: Grant Hernandez Date: Sat Jul 13 01:00:12 2019 -0700 Input: gtco - bounds check collection indent level The GTCO tablet input driver configures itself from an HID report sent via USB during the initial enumeration process. Some debugging messages are generated during the parsing. A debugging message indentation counter is not bounds checked, leading to the ability for a specially crafted HID report to cause '-' and null bytes be written past the end of the indentation array. As long as the kernel has CONFIG_DYNAMIC_DEBUG enabled, this code will not be optimized out. This was discovered during code review after a previous syzkaller bug was found in this driver. Signed-off-by: Grant Hernandez Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/tablet/gtco.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) commit 25a09ce79639a8775244808c17282c491cff89cf Author: Eric Biggers Date: Fri Jul 12 16:39:31 2019 -0700 ppp: mppe: Revert "ppp: mppe: Add softdep to arc4" Commit 0e5a610b5ca5 ("ppp: mppe: switch to RC4 library interface"), which was merged through the crypto tree for v5.3, changed ppp_mppe.c to use the new arc4_crypt() library function rather than access RC4 through the dynamic crypto_skcipher API. Meanwhile commit aad1dcc4f011 ("ppp: mppe: Add softdep to arc4") was merged through the net tree and added a module soft-dependency on "arc4". The latter commit no longer makes sense because the code now uses the "libarc4" module rather than "arc4", and also due to the direct use of arc4_crypt(), no module soft-dependency is required. So revert the latter commit. Cc: Takashi Iwai Cc: Ard Biesheuvel Signed-off-by: Eric Biggers Signed-off-by: David S. Miller drivers/net/ppp/ppp_mppe.c | 1 - 1 file changed, 1 deletion(-) commit d5e5efa250cd644896f541551610fe7f0de35e0a Author: Eric Biggers Date: Mon Jul 1 13:26:30 2019 -0700 f2fs: remove redundant check from f2fs_setflags_common() Now that f2fs_ioc_setflags() and f2fs_ioc_fssetxattr() call the VFS helper functions which check for permission to change the immutable and append-only flags, it's no longer needed to do this check in f2fs_setflags_common() too. So remove it. This is based on a patch from Darrick Wong, but reworked to apply after commit 360985573b55 ("f2fs: separate f2fs i_flags from fs_flags and ext4 i_flags"). Originally-from: Darrick J. Wong Signed-off-by: Eric Biggers Reviewed-by: Chao Yu Reviewed-by: Darrick J. Wong Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 6fc93c4e0ad12e34475755315749143013c702ab Author: Eric Biggers Date: Mon Jul 1 13:26:29 2019 -0700 f2fs: use generic checking function for FS_IOC_FSSETXATTR Make the f2fs implementation of FS_IOC_FSSETXATTR use the new VFS helper function vfs_ioc_fssetxattr_check(), and remove the project quota check since it's now done by the helper function. This is based on a patch from Darrick Wong, but reworked to apply after commit 360985573b55 ("f2fs: separate f2fs i_flags from fs_flags and ext4 i_flags"). Originally-from: Darrick J. Wong Signed-off-by: Eric Biggers Reviewed-by: Chao Yu Reviewed-by: Darrick J. Wong Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 45 ++++++++++++++------------------------------- 1 file changed, 14 insertions(+), 31 deletions(-) commit a1f32eeca60e74f6f103ce74f586570deddaef7a Author: Eric Biggers Date: Mon Jul 1 13:26:28 2019 -0700 f2fs: use generic checking and prep function for FS_IOC_SETFLAGS Make the f2fs implementation of FS_IOC_SETFLAGS use the new VFS helper function vfs_ioc_setflags_prepare(). This is based on a patch from Darrick Wong, but reworked to apply after commit 360985573b55 ("f2fs: separate f2fs i_flags from fs_flags and ext4 i_flags"). Originally-from: Darrick J. Wong Signed-off-by: Eric Biggers Reviewed-by: Chao Yu Reviewed-by: Darrick J. Wong Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 964a4eacef67503a1154f7e0a75f52fbdce52022 Merge: 23bbbf5c1fb3 a48f9721e6db Author: Linus Torvalds Date: Fri Jul 12 17:37:53 2019 -0700 Merge tag 'dlm-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm Pull dlm updates from David Teigland: "This set removes some unnecessary debugfs error handling, and checks that lowcomms workqueues are not NULL before destroying" * tag 'dlm-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm: dlm: no need to check return value of debugfs_create functions dlm: check if workqueues are NULL before flushing/destroying commit 23bbbf5c1fb3ddf104c2ddbda4cc24ebe53a3453 Merge: a641a88e5d68 80a316ff1627 Author: Linus Torvalds Date: Fri Jul 12 17:31:19 2019 -0700 Merge tag '9p-for-5.3' of git://github.com/martinetd/linux Pull 9p updates from Dominique Martinet: "Two small fixes to properly cleanup the 9p transports list if virtio/xen module initialization fail. 9p might otherwise try to access memory from a module that failed to register got freed" * tag '9p-for-5.3' of git://github.com/martinetd/linux: 9p/xen: Add cleanup path in p9_trans_xen_init 9p/virtio: Add cleanup path in p9_virtio_init commit a641a88e5d6864f20b2608cb01165c756794e645 Merge: 4ce9d181ebe5 2d008835ec2f Author: Linus Torvalds Date: Fri Jul 12 17:28:24 2019 -0700 Merge tag 'f2fs-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs Pull f2fs updates from Jaegeuk Kim: "In this round, we've introduced native swap file support which can exploit DIO, enhanced existing checkpoint=disable feature with additional mount option to tune the triggering condition, and allowed user to preallocate physical blocks in a pinned file which will be useful to avoid f2fs fragmentation in append-only workloads. In addition, we've fixed subtle quota corruption issue. Enhancements: - add swap file support which uses DIO - allocate blocks for pinned file - allow SSR and mount option to enhance checkpoint=disable - enhance IPU IOs - add more sanity checks such as memory boundary access Bug fixes: - quota corruption in very corner case of error-injected SPO case - fix root_reserved on remount and some wrong counts - add missing fsck flag Some patches were also introduced to clean up ambiguous i_flags and debugging messages codes" * tag 'f2fs-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (33 commits) f2fs: improve print log in f2fs_sanity_check_ckpt() f2fs: avoid out-of-range memory access f2fs: fix to avoid long latency during umount f2fs: allow all the users to pin a file f2fs: support swap file w/ DIO f2fs: allocate blocks for pinned file f2fs: fix is_idle() check for discard type f2fs: add a rw_sem to cover quota flag changes f2fs: set SBI_NEED_FSCK for xattr corruption case f2fs: use generic EFSBADCRC/EFSCORRUPTED f2fs: Use DIV_ROUND_UP() instead of open-coding f2fs: print kernel message if filesystem is inconsistent f2fs: introduce f2fs_ macros to wrap f2fs_printk() f2fs: avoid get_valid_blocks() for cleanup f2fs: ioctl for removing a range from F2FS f2fs: only set project inherit bit for directory f2fs: separate f2fs i_flags from fs_flags and ext4 i_flags f2fs: replace ktype default_attrs with default_groups f2fs: Add option to limit required GC for checkpoint=disable f2fs: Fix accounting for unusable blocks ... commit 4ce9d181ebe53abbca5f450b8a2984b8c3a38f26 Merge: 5010fe9f0954 488ca3d8d088 Author: Linus Torvalds Date: Fri Jul 12 17:17:51 2019 -0700 Merge tag 'xfs-5.3-merge-12' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs updates from Darrick Wong: "In this release there are a significant amounts of consolidations and cleanups in the log code; restructuring of the log to issue struct bios directly; new bulkstat ioctls to return v5 fs inode information (and fix all the padding problems of the old ioctl); the beginnings of multithreaded inode walks (e.g. quotacheck); and a reduction in memory usage in the online scrub code leading to reduced runtimes. - Refactor inode geometry calculation into a single structure instead of open-coding pieces everywhere. - Add online repair to build options. - Remove unnecessary function call flags and functions. - Claim maintainership of various loose xfs documentation and header files. - Use struct bio directly for log buffer IOs instead of struct xfs_buf. - Reduce log item boilerplate code requirements. - Merge log item code spread across too many files. - Further distinguish between log item commits and cancellations. - Various small cleanups to the ag small allocator. - Support cgroup-aware writeback - libxfs refactoring for mkfs cleanup - Remove unneeded #includes - Fix a memory allocation miscalculation in the new log bio code - Fix bisection problems - Fix a crash in ioend processing caused by tripping over freeing of preallocated transactions - Split out a generic inode walk mechanism from the bulkstat code, hook up all the internal users to use the walking code, then clean up bulkstat to serve only the bulkstat ioctls. - Add a multithreaded iwalk implementation to speed up quotacheck on fast storage with many CPUs. - Remove unnecessary return values in logging teardown functions. - Supplement the bstat and inogrp structures with new bulkstat and inumbers structures that have all the fields we need for v5 filesystem features and none of the padding problems of their predecessors. - Wire up new ioctls that use the new structures with a much simpler bulk_ireq structure at the head instead of the pointerhappy mess we had before. - Enable userspace to constrain bulkstat returns to a single AG or a single special inode so that we can phase out a lot of geometry guesswork in userspace. - Reduce memory consumption and zeroing overhead in extended attribute scrub code. - Fix some behavioral regressions in the new bulkstat backend code. - Fix some behavioral regressions in the new log bio code" * tag 'xfs-5.3-merge-12' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: (100 commits) xfs: chain bios the right way around in xfs_rw_bdev xfs: bump INUMBERS cursor correctly in xfs_inumbers_walk xfs: don't update lastino for FSBULKSTAT_SINGLE xfs: online scrub needn't bother zeroing its temporary buffer xfs: only allocate memory for scrubbing attributes when we need it xfs: refactor attr scrub memory allocation function xfs: refactor extended attribute buffer pointer functions xfs: attribute scrub should use seen_enough to pass error values xfs: allow single bulkstat of special inodes xfs: specify AG in bulk req xfs: wire up the v5 inumbers ioctl xfs: wire up new v5 bulkstat ioctls xfs: introduce v5 inode group structure xfs: introduce new v5 bulkstat structure xfs: rename bulkstat functions xfs: remove various bulk request typedef usage fs: xfs: xfs_log: Change return type from int to void xfs: poll waiting for quotacheck xfs: multithreaded iwalk implementation xfs: refactor INUMBERS to use iwalk functions ... commit 5010fe9f095414b959fd6fda63986dc90fd0c419 Merge: 8487d8229990 dbc77f31e58b Author: Linus Torvalds Date: Fri Jul 12 16:54:37 2019 -0700 Merge tag 'vfs-fix-ioctl-checking-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull common SETFLAGS/FSSETXATTR parameter checking from Darrick Wong: "Here's a patch series that sets up common parameter checking functions for the FS_IOC_SETFLAGS and FS_IOC_FSSETXATTR ioctl implementations. The goal here is to reduce the amount of behaviorial variance between the filesystems where those ioctls originated (ext2 and XFS, respectively) and everybody else. - Standardize parameter checking for the SETFLAGS and FSSETXATTR ioctls (which were the file attribute setters for ext4 and xfs and have now been hoisted to the vfs) - Only allow the DAX flag to be set on files and directories" * tag 'vfs-fix-ioctl-checking-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: vfs: only allow FSSETXATTR to set DAX flag on files and dirs vfs: teach vfs_ioc_fssetxattr_check to check extent size hints vfs: teach vfs_ioc_fssetxattr_check to check project id info vfs: create a generic checking function for FS_IOC_FSSETXATTR vfs: create a generic checking and prep function for FS_IOC_SETFLAGS commit 8487d8229990e6eacaf1c854a113c9d16b7b596c Merge: 106f1466e7e7 ee8a84c60bcc Author: Linus Torvalds Date: Fri Jul 12 16:08:21 2019 -0700 Merge tag 'linux-kselftest-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull Kselftest updates from Shuah Khan: "This Kselftest update for Linux 5.3-rc1 consists of build failure fixes and minor code cleaning patch to remove duplicate headers" * tag 'linux-kselftest-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: rseq/selftests: Fix Thumb mode build failure on arm32 kselftests: cgroup: remove duplicated include from test_freezer.c selftests: timestamping: Fix SIOCGSTAMP undeclared build failure selftests: dma-buf: Adding kernel config fragment CONFIG_UDMABUF=y commit 106f1466e7e7057ec6f4dc9516c13ea8cb9dffa0 Merge: 39ceda5ce1b0 e3cd5136a4ec Author: Linus Torvalds Date: Fri Jul 12 16:06:27 2019 -0700 Merge tag 'kconfig-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kconfig updates from Masahiro Yamada: - always require argument for --defconfig and remove the hard-coded arch/$(ARCH)/defconfig path - make arch/$(SRCARCH)/configs/defconfig the new default of defconfig - some code cleanups * tag 'kconfig-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kconfig: remove meaningless if-conditional in conf_read() kconfig: Fix spelling of sym_is_changable unicore32: rename unicore32_defconfig to defconfig kconfig: make arch/*/configs/defconfig the default of KBUILD_DEFCONFIG kconfig: add static qualifier to expand_string() kconfig: require the argument of --defconfig kconfig: remove always false ifeq ($(KBUILD_DEFCONFIG,) conditional commit 39ceda5ce1b002e30563fcb8ad1bb5ac8e4d59ee Merge: 5f26f1143678 d4a74bbfee03 Author: Linus Torvalds Date: Fri Jul 12 16:03:16 2019 -0700 Merge tag 'kbuild-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild updates from Masahiro Yamada: - remove headers_{install,check}_all targets - remove unreasonable 'depends on !UML' from CONFIG_SAMPLES - re-implement 'make headers_install' more cleanly - add new header-test-y syntax to compile-test headers - compile-test exported headers to ensure they are compilable in user-space - compile-test headers under include/ to ensure they are self-contained - remove -Waggregate-return, -Wno-uninitialized, -Wno-unused-value flags - add -Werror=unknown-warning-option for Clang - add 128-bit built-in types support to genksyms - fix missed rebuild of modules.builtin - propagate 'No space left on device' error in fixdep to Make - allow Clang to use its integrated assembler - improve some coccinelle scripts - add a new flag KBUILD_ABS_SRCTREE to request Kbuild to use absolute path for $(srctree). - do not ignore errors when compression utility is missing - misc cleanups * tag 'kbuild-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (49 commits) kbuild: use -- separater intead of $(filter-out ...) for cc-cross-prefix kbuild: Inform user to pass ARCH= for make mrproper kbuild: fix compression errors getting ignored kbuild: add a flag to force absolute path for srctree kbuild: replace KBUILD_SRCTREE with boolean building_out_of_srctree kbuild: remove src and obj from the top Makefile scripts/tags.sh: remove unused environment variables from comments scripts/tags.sh: drop SUBARCH support for ARM kbuild: compile-test kernel headers to ensure they are self-contained kheaders: include only headers into kheaders_data.tar.xz kheaders: remove meaningless -R option of 'ls' kbuild: support header-test-pattern-y kbuild: do not create wrappers for header-test-y kbuild: compile-test exported headers to ensure they are self-contained init/Kconfig: add CONFIG_CC_CAN_LINK kallsyms: exclude kasan local symbols on s390 kbuild: add more hints about SUBDIRS replacement coccinelle: api/stream_open: treat all wait_.*() calls as blocking coccinelle: put_device: Add a cast to an expression for an assignment coccinelle: put_device: Adjust a message construction ... commit 5f26f1143678d0fed8115afdcc0de99ee7cc9675 Merge: aabfea8dc91c 7f3a8dff1219 Author: Linus Torvalds Date: Fri Jul 12 15:41:33 2019 -0700 Merge tag 'asm-generic-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic Pull asm-generic updates from Arnd Bergmann: "The asm-generic changes for 5.3 consist of a cleanup series to remove ptrace.h from Christoph Hellwig, who explains: 'asm-generic/ptrace.h is a little weird in that it doesn't actually implement any functionality, but it provided multiple layers of macros that just implement trivial inline functions. We implement those directly in the few architectures and be off with a much simpler design.' at https://lore.kernel.org/lkml/20190624054728.30966-1-hch@lst.de/" * tag 'asm-generic-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: asm-generic: remove ptrace.h x86: don't use asm-generic/ptrace.h sh: don't use asm-generic/ptrace.h powerpc: don't use asm-generic/ptrace.h arm64: don't use asm-generic/ptrace.h commit aabfea8dc91cf5b220d2ed85e8f6395a9b140371 Merge: 7181feb9b783 9a159190414d Author: Linus Torvalds Date: Fri Jul 12 15:39:22 2019 -0700 Merge tag 's390-5.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull more s390 updates from Vasily Gorbik: - Fix integer overflow during stack frame unwind with invalid backchain. - Cleanup unused symbol export in zcrypt code. - Fix MIO addressing control activation in PCI code and expose its usage via sysfs. - Fix kernel image signature verification report presence detection. - Fix irq registration in vfio-ap code. - Add CPU measurement counters for newer machines. - Add base DASD thin provisioning support and code cleanups. * tag 's390-5.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (21 commits) s390/unwind: avoid int overflow in outside_of_stack s390/zcrypt: remove the exporting of ap_query_configuration s390/pci: add mio_enabled attribute s390: fix setting of mio addressing control s390/ipl: Fix detection of has_secure attribute s390: vfio-ap: fix irq registration s390/cpumf: Add extended counter set definitions for model 8561 and 8562 s390/dasd: Handle out-of-space constraint s390/dasd: Add discard support for ESE volumes s390/dasd: Use ALIGN_DOWN macro s390/dasd: Make dasd_setup_queue() a discipline function s390/dasd: Add new ioctl to release space s390/dasd: Add dasd_sleep_on_queue_interruptible() s390/dasd: Add missing intensity definition s390/dasd: Fix whitespace s390/dasd: Add dynamic formatting support for ESE volumes s390/dasd: Recognise data for ESE volumes s390/dasd: Put sub-order definitions in a separate section s390/dasd: Make layout analysis ESE compatible s390/dasd: Remove old defines and function ... commit f32ae8a5f131a92cd8179adf55cd8405c60e0c20 Author: Christian Lamparter Date: Fri Jul 12 17:33:36 2019 +0200 net: dsa: qca8k: replace legacy gpio include This patch replaces the legacy bulk gpio.h include with the proper gpio/consumer.h variant. This was caught by the kbuild test robot that was running into an error because of this. For more information why linux/gpio.h is bad can be found in: commit 56a46b6144e7 ("gpio: Clarify that is legacy") Reported-by: kbuild test robot Link: https://www.spinics.net/lists/netdev/msg584447.html Fixes: a653f2f538f9 ("net: dsa: qca8k: introduce reset via gpio feature") Signed-off-by: Christian Lamparter Reviewed-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/qca8k.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7181feb9b7837a1e107123cc16552d42d922def6 Merge: 39d7530d7494 f017da5c7077 Author: Linus Torvalds Date: Fri Jul 12 15:38:05 2019 -0700 Merge tag 'nios2-v5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2 Pull arch/nios2 updates from Ley Foon Tan. * tag 'nios2-v5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2: nios2: configs: Remove useless UEVENT_HELPER_PATH nios2: remove pointless second entry for CONFIG_TRACE_IRQFLAGS_SUPPORT commit 56170ba3bd90986e44f96ada9573dfe583621fca Author: Jiangfeng Xiao Date: Fri Jul 12 21:16:24 2019 +0800 net: hisilicon: Use devm_platform_ioremap_resource Use devm_platform_ioremap_resource instead of devm_ioremap_resource. Make the code simpler. Signed-off-by: Jiangfeng Xiao Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hip04_eth.c | 7 ++----- drivers/net/ethernet/hisilicon/hisi_femac.c | 7 ++----- drivers/net/ethernet/hisilicon/hix5hd2_gmac.c | 7 ++----- drivers/net/ethernet/hisilicon/hns_mdio.c | 4 +--- 4 files changed, 7 insertions(+), 18 deletions(-) commit 752c2ea2d8e7c23b0f64e2e7d4337f3604d44c9f Author: Arnd Bergmann Date: Fri Jul 12 11:06:33 2019 +0200 cxgb4: reduce kernel stack usage in cudbg_collect_mem_region() The cudbg_collect_mem_region() and cudbg_read_fw_mem() both use several hundred kilobytes of kernel stack space. One gets inlined into the other, which causes the stack usage to be combined beyond the warning limit when building with clang: drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c:1057:12: error: stack frame size of 1244 bytes in function 'cudbg_collect_mem_region' [-Werror,-Wframe-larger-than=] Restructuring cudbg_collect_mem_region() lets clang do the same optimization that gcc does and reuse the stack slots as it can see that the large variables are never used together. A better fix might be to avoid using cudbg_meminfo on the stack altogether, but that requires a larger rewrite. Fixes: a1c69520f785 ("cxgb4: collect MC memory dump") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit 39d7530d7494b4e47ba1856e741f513dafd17e3d Merge: 16c97650a56a a45ff5994c9c Author: Linus Torvalds Date: Fri Jul 12 15:35:14 2019 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM updates from Paolo Bonzini: "ARM: - support for chained PMU counters in guests - improved SError handling - handle Neoverse N1 erratum #1349291 - allow side-channel mitigation status to be migrated - standardise most AArch64 system register accesses to msr_s/mrs_s - fix host MPIDR corruption on 32bit - selftests ckleanups x86: - PMU event {white,black}listing - ability for the guest to disable host-side interrupt polling - fixes for enlightened VMCS (Hyper-V pv nested virtualization), - new hypercall to yield to IPI target - support for passing cstate MSRs through to the guest - lots of cleanups and optimizations Generic: - Some txt->rST conversions for the documentation" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (128 commits) Documentation: virtual: Add toctree hooks Documentation: kvm: Convert cpuid.txt to .rst Documentation: virtual: Convert paravirt_ops.txt to .rst KVM: x86: Unconditionally enable irqs in guest context KVM: x86: PMU Event Filter kvm: x86: Fix -Wmissing-prototypes warnings KVM: Properly check if "page" is valid in kvm_vcpu_unmap KVM: arm/arm64: Initialise host's MPIDRs by reading the actual register KVM: LAPIC: Retry tune per-vCPU timer_advance_ns if adaptive tuning goes insane kvm: LAPIC: write down valid APIC registers KVM: arm64: Migrate _elx sysreg accessors to msr_s/mrs_s KVM: doc: Add API documentation on the KVM_REG_ARM_WORKAROUNDS register KVM: arm/arm64: Add save/restore support for firmware workaround state arm64: KVM: Propagate full Spectre v2 workaround state to KVM guests KVM: arm/arm64: Support chained PMU counters KVM: arm/arm64: Remove pmc->bitmask KVM: arm/arm64: Re-create event when setting counter value KVM: arm/arm64: Extract duplicated code to own function KVM: arm/arm64: Rename kvm_pmu_{enable/disable}_counter functions KVM: LAPIC: ARBPRI is a reserved register for x2APIC ... commit d12cffe9329fd278555d0f9bb89af1259a2fd933 Author: Chris Packham Date: Fri Jul 12 10:41:15 2019 +1200 tipc: ensure head->lock is initialised tipc_named_node_up() creates a skb list. It passes the list to tipc_node_xmit() which has some code paths that can call skb_queue_purge() which relies on the list->lock being initialised. The spin_lock is only needed if the messages end up on the receive path but when the list is created in tipc_named_node_up() we don't necessarily know if it is going to end up there. Once all the skb list users are updated in tipc it will then be possible to update them to use the unlocked variants of the skb list functions and initialise the lock when we know the message will follow the receive path. Signed-off-by: Chris Packham Acked-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/name_distr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 100c4043b808739d808bb5c9f6868d3808f062ea Author: Roman Mashak Date: Thu Jul 11 12:29:00 2019 -0400 tc-tests: updated skbedit tests - Added mask upper bound test case - Added mask validation test case - Added mask replacement case Signed-off-by: Roman Mashak Signed-off-by: David S. Miller .../tc-testing/tc-tests/actions/skbedit.json | 117 +++++++++++++++++++++ 1 file changed, 117 insertions(+) commit be4d2a5b07780428db42dbf860f16735e1aff23c Merge: 3929502b957e 103b7c25f5a2 Author: David S. Miller Date: Fri Jul 12 15:31:55 2019 -0700 Merge branch 'nfp-flower-bugs' John Hurley says: ==================== Fix bugs in NFP flower match offload This patchset contains bug fixes for corner cases in the match fields of flower offloads. The patches ensure that flows that should not be supported are not (incorrectly) offloaded. These include rules that match on layer 3 and/or 4 data without specified ethernet or ip protocol fields. ==================== Signed-off-by: David S. Miller commit 103b7c25f5a2509ddccec830df924a78354232c4 Author: John Hurley Date: Wed Jul 10 19:30:30 2019 +0100 nfp: flower: ensure ip protocol is specified for L4 matches Flower rules on the NFP firmware are able to match on an IP protocol field. When parsing rules in the driver, unknown IP protocols are only rejected when further matches are to be carried out on layer 4 fields, as the firmware will not be able to extract such fields from packets. L4 protocol dissectors such as FLOW_DISSECTOR_KEY_PORTS are only parsed if an IP protocol is specified. This leaves a loophole whereby a rule that attempts to match on transport layer information such as port numbers but does not explicitly give an IP protocol type can be incorrectly offloaded (in this case with wildcard port numbers matches). Fix this by rejecting the offload of flows that attempt to match on L4 information, not only when matching on an unknown IP protocol type, but also when the protocol is wildcarded. Fixes: 2a04784594f6 ("nfp: flower: check L4 matches on unknown IP protocols") Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/offload.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit fd262a6d8a5d8d504e6a0b0183a05deda6bef7a3 Author: John Hurley Date: Wed Jul 10 19:30:29 2019 +0100 nfp: flower: fix ethernet check on match fields NFP firmware does not explicitly match on an ethernet type field. Rather, each rule has a bitmask of match fields that can be used to infer the ethernet type. Currently, if a flower rule contains an unknown ethernet type, a check is carried out for matches on other fields of the packet. If matches on layer 3 or 4 are found, then the offload is rejected as firmware will not be able to extract these fields from a packet with an ethernet type it does not currently understand. However, if a rule contains an unknown ethernet type without any L3 (or above) matches then this will effectively be offloaded as a rule with a wildcarded ethertype. This can lead to misclassifications on the firmware. Fix this issue by rejecting all flower rules that specify a match on an unknown ethernet type. Further ensure correct offloads by moving the 'L3 and above' check to any rule that does not specify an ethernet type and rejecting rules with further matches. This means that we can still offload rules with a wildcarded ethertype if they only match on L2 fields but will prevent rules which match on further fields that we cannot be sure if the firmware will be able to extract. Fixes: af9d842c1354 ("nfp: extend flower add flow offload") Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/offload.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 16c97650a56abdd067f7da079007b7e00b307083 Merge: 9e3a25dc992d 765e33f5211a Author: Linus Torvalds Date: Fri Jul 12 15:28:38 2019 -0700 Merge tag 'hyperv-next-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux Pull hyper-v updates from Sasha Levin: - Add a module description to the Hyper-V vmbus module. - Rework some vmbus code to separate architecture specifics out to arch/x86/. This is part of the work of adding arm64 support to Hyper-V. * tag 'hyperv-next-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux: Drivers: hv: vmbus: Break out ISA independent parts of mshyperv.h drivers: hv: Add a module description line to the hv_vmbus driver commit 3929502b957ed05575e74134a817f26c42d13e2c Author: Vlad Buslov Date: Wed Jul 10 21:25:54 2019 +0300 net/mlx5e: Provide cb_list pointer when setting up tc block on rep Recent refactoring of tc block offloads infrastructure introduced new flow_block_cb_setup_simple() method intended to be used as unified way for all drivers to register offload callbacks. However, commit that actually extended all users (drivers) with block cb list and provided it to flow_block infra missed mlx5 en_rep. This leads to following NULL-pointer dereference when creating Qdisc: [ 278.385175] BUG: kernel NULL pointer dereference, address: 0000000000000000 [ 278.393233] #PF: supervisor read access in kernel mode [ 278.399446] #PF: error_code(0x0000) - not-present page [ 278.405847] PGD 8000000850e73067 P4D 8000000850e73067 PUD 8620cd067 PMD 0 [ 278.414141] Oops: 0000 [#1] SMP PTI [ 278.419019] CPU: 7 PID: 3369 Comm: tc Not tainted 5.2.0-rc6+ #492 [ 278.426580] Hardware name: Supermicro SYS-2028TP-DECR/X10DRT-P, BIOS 2.0b 03/30/2017 [ 278.435853] RIP: 0010:flow_block_cb_setup_simple+0xc4/0x190 [ 278.442953] Code: 10 48 89 42 08 48 89 10 48 b8 00 01 00 00 00 00 ad de 49 89 00 48 05 00 01 00 00 49 89 40 08 31 c0 c3 b8 a1 ff ff ff c3 f3 c3 <48> 8b 06 48 39 c6 75 0a eb 1a 48 8b 00 48 39 c6 74 12 48 3b 50 28 [ 278.464829] RSP: 0018:ffffaf07c3f97990 EFLAGS: 00010246 [ 278.471648] RAX: 0000000000000000 RBX: ffff9b43ed4c7680 RCX: ffff9b43d5f80840 [ 278.480408] RDX: ffffffffc0491650 RSI: 0000000000000000 RDI: ffffaf07c3f97998 [ 278.489110] RBP: ffff9b43ddff9000 R08: ffff9b43d5f80840 R09: 0000000000000001 [ 278.497838] R10: 0000000000000009 R11: 00000000000003ad R12: ffffaf07c3f97c08 [ 278.506595] R13: ffff9b43d5f80000 R14: ffff9b43ed4c7680 R15: ffff9b43dfa20b40 [ 278.515374] FS: 00007f796be1b400(0000) GS:ffff9b43ef840000(0000) knlGS:0000000000000000 [ 278.525099] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 278.532453] CR2: 0000000000000000 CR3: 0000000840398002 CR4: 00000000001606e0 [ 278.541197] Call Trace: [ 278.545252] tcf_block_offload_cmd.isra.52+0x7e/0xb0 [ 278.551871] tcf_block_get_ext+0x365/0x3e0 [ 278.557569] qdisc_create+0x15c/0x4e0 [ 278.562859] ? kmem_cache_alloc_trace+0x1a2/0x1c0 [ 278.569235] tc_modify_qdisc+0x1c8/0x780 [ 278.574761] rtnetlink_rcv_msg+0x291/0x340 [ 278.580518] ? _cond_resched+0x15/0x40 [ 278.585856] ? rtnl_calcit.isra.29+0x120/0x120 [ 278.591868] netlink_rcv_skb+0x4a/0x110 [ 278.597198] netlink_unicast+0x1a0/0x250 [ 278.602601] netlink_sendmsg+0x2c1/0x3c0 [ 278.608022] sock_sendmsg+0x5b/0x60 [ 278.612969] ___sys_sendmsg+0x289/0x310 [ 278.618231] ? do_wp_page+0x99/0x730 [ 278.623216] ? page_add_new_anon_rmap+0xbe/0x140 [ 278.629298] ? __handle_mm_fault+0xc84/0x1360 [ 278.635113] ? __sys_sendmsg+0x5e/0xa0 [ 278.640285] __sys_sendmsg+0x5e/0xa0 [ 278.645239] do_syscall_64+0x5b/0x1b0 [ 278.650274] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 278.656697] RIP: 0033:0x7f796abdeb87 [ 278.661628] Code: 64 89 02 48 c7 c0 ff ff ff ff eb b9 0f 1f 80 00 00 00 00 8b 05 6a 2b 2c 00 48 63 d2 48 63 ff 85 c0 75 18 b8 2e 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 59 f3 c3 0f 1f 80 00 00 00 00 53 48 89 f3 48 [ 278.683248] RSP: 002b:00007ffde213ba48 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 278.692245] RAX: ffffffffffffffda RBX: 000000005d261e6f RCX: 00007f796abdeb87 [ 278.700862] RDX: 0000000000000000 RSI: 00007ffde213bab0 RDI: 0000000000000003 [ 278.709527] RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000006 [ 278.718167] R10: 000000000000000c R11: 0000000000000246 R12: 0000000000000001 [ 278.726743] R13: 000000000067b580 R14: 0000000000000000 R15: 0000000000000000 [ 278.735302] Modules linked in: dummy vxlan ip6_udp_tunnel udp_tunnel sch_ingress nfsv3 nfs_acl nfs lockd grace fscache bridge stp llc sunrpc mlx5_ib ib_uverbs intel_rapl ib_core sb_edac x86_pkg_temp_ thermal intel_powerclamp coretemp kvm_intel kvm mlx5_core irqbypass crct10dif_pclmul crc32_pclmul crc32c_intel igb ghash_clmulni_intel ses mei_me enclosure mlxfw ipmi_ssif intel_cstate iTCO_wdt ptp mei pps_core iTCO_vendor_support pcspkr joydev intel_uncore i2c_i801 ipmi_si lpc_ich intel_rapl_perf ioatdma wmi dca pcc_cpufreq ipmi_devintf ipmi_msghandler acpi_power_meter acpi_pad ast i2c_algo_bit drm_k ms_helper ttm drm mpt3sas raid_class scsi_transport_sas [ 278.802263] CR2: 0000000000000000 [ 278.807170] ---[ end trace b1f0a442a279e66f ]--- Extend en_rep with new static mlx5e_rep_block_cb_list list and pass it to flow_block_cb_setup_simple() function instead of hardcoded NULL pointer. Fixes: 955bcb6ea0df ("drivers: net: use flow block API") Signed-off-by: Vlad Buslov Acked-by: Pablo Neira Ayuso Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 54638c6eaf445ecf901128599cfeb4620be47d2f Author: Denis Efremov Date: Wed Jul 10 21:03:24 2019 +0300 net: phy: make exported variables non-static The variables phy_basic_ports_array, phy_fibre_port_array and phy_all_ports_features_array are declared static and marked EXPORT_SYMBOL_GPL(), which is at best an odd combination. Because the variables were decided to be a part of API, this commit removes the static attributes and adds the declarations to the header. Fixes: 3c1bcc8614db ("net: ethernet: Convert phydev advertize and supported from u32 to link mode") Signed-off-by: Denis Efremov Signed-off-by: David S. Miller drivers/net/phy/phy_device.c | 6 +++--- include/linux/phy.h | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) commit c1a970d06f8cf390354a4a426976ed7f960b71f1 Author: Vlad Buslov Date: Wed Jul 10 20:12:29 2019 +0300 net: sched: Fix NULL-pointer dereference in tc_indr_block_ing_cmd() After recent refactoring of block offlads infrastructure, indr_dev->block pointer is dereferenced before it is verified to be non-NULL. Example stack trace where this behavior leads to NULL-pointer dereference error when creating vxlan dev on system with mlx5 NIC with offloads enabled: [ 1157.852938] ================================================================== [ 1157.866877] BUG: KASAN: null-ptr-deref in tc_indr_block_ing_cmd.isra.41+0x9c/0x160 [ 1157.880877] Read of size 4 at addr 0000000000000090 by task ip/3829 [ 1157.901637] CPU: 22 PID: 3829 Comm: ip Not tainted 5.2.0-rc6+ #488 [ 1157.914438] Hardware name: Supermicro SYS-2028TP-DECR/X10DRT-P, BIOS 2.0b 03/30/2017 [ 1157.929031] Call Trace: [ 1157.938318] dump_stack+0x9a/0xeb [ 1157.948362] ? tc_indr_block_ing_cmd.isra.41+0x9c/0x160 [ 1157.960262] ? tc_indr_block_ing_cmd.isra.41+0x9c/0x160 [ 1157.972082] __kasan_report+0x176/0x192 [ 1157.982513] ? tc_indr_block_ing_cmd.isra.41+0x9c/0x160 [ 1157.994348] kasan_report+0xe/0x20 [ 1158.004324] tc_indr_block_ing_cmd.isra.41+0x9c/0x160 [ 1158.015950] ? tcf_block_setup+0x430/0x430 [ 1158.026558] ? kasan_unpoison_shadow+0x30/0x40 [ 1158.037464] __tc_indr_block_cb_register+0x5f5/0xf20 [ 1158.049288] ? mlx5e_rep_indr_tc_block_unbind+0xa0/0xa0 [mlx5_core] [ 1158.062344] ? tc_indr_block_dev_put.part.47+0x5c0/0x5c0 [ 1158.074498] ? rdma_roce_rescan_device+0x20/0x20 [ib_core] [ 1158.086580] ? br_device_event+0x98/0x480 [bridge] [ 1158.097870] ? strcmp+0x30/0x50 [ 1158.107578] mlx5e_nic_rep_netdevice_event+0xdd/0x180 [mlx5_core] [ 1158.120212] notifier_call_chain+0x6d/0xa0 [ 1158.130753] register_netdevice+0x6fc/0x7e0 [ 1158.141322] ? netdev_change_features+0xa0/0xa0 [ 1158.152218] ? vxlan_config_apply+0x210/0x310 [vxlan] [ 1158.163593] __vxlan_dev_create+0x2ad/0x520 [vxlan] [ 1158.174770] ? vxlan_changelink+0x490/0x490 [vxlan] [ 1158.185870] ? rcu_read_unlock+0x60/0x60 [vxlan] [ 1158.196798] vxlan_newlink+0x99/0xf0 [vxlan] [ 1158.207303] ? __vxlan_dev_create+0x520/0x520 [vxlan] [ 1158.218601] ? rtnl_create_link+0x3d0/0x450 [ 1158.228900] __rtnl_newlink+0x8a7/0xb00 [ 1158.238701] ? stack_access_ok+0x35/0x80 [ 1158.248450] ? rtnl_link_unregister+0x1a0/0x1a0 [ 1158.258735] ? find_held_lock+0x6d/0xd0 [ 1158.268379] ? is_bpf_text_address+0x67/0xf0 [ 1158.278330] ? lock_acquire+0xc1/0x1f0 [ 1158.287686] ? is_bpf_text_address+0x5/0xf0 [ 1158.297449] ? is_bpf_text_address+0x86/0xf0 [ 1158.307310] ? kernel_text_address+0xec/0x100 [ 1158.317155] ? arch_stack_walk+0x92/0xe0 [ 1158.326497] ? __kernel_text_address+0xe/0x30 [ 1158.336213] ? unwind_get_return_address+0x2f/0x50 [ 1158.346267] ? create_prof_cpu_mask+0x20/0x20 [ 1158.355936] ? arch_stack_walk+0x92/0xe0 [ 1158.365117] ? stack_trace_save+0x8a/0xb0 [ 1158.374272] ? stack_trace_consume_entry+0x80/0x80 [ 1158.384226] ? match_held_lock+0x33/0x210 [ 1158.393216] ? kasan_unpoison_shadow+0x30/0x40 [ 1158.402593] rtnl_newlink+0x53/0x80 [ 1158.410925] rtnetlink_rcv_msg+0x3a5/0x600 [ 1158.419777] ? validate_linkmsg+0x400/0x400 [ 1158.428620] ? find_held_lock+0x6d/0xd0 [ 1158.437117] ? match_held_lock+0x1b/0x210 [ 1158.445760] ? validate_linkmsg+0x400/0x400 [ 1158.454642] netlink_rcv_skb+0xc7/0x1f0 [ 1158.463150] ? netlink_ack+0x470/0x470 [ 1158.471538] ? netlink_deliver_tap+0x1f3/0x5a0 [ 1158.480607] netlink_unicast+0x2ae/0x350 [ 1158.489099] ? netlink_attachskb+0x340/0x340 [ 1158.497935] ? _copy_from_iter_full+0xde/0x3b0 [ 1158.506945] ? __virt_addr_valid+0xb6/0xf0 [ 1158.515578] ? __check_object_size+0x159/0x240 [ 1158.524515] netlink_sendmsg+0x4d3/0x630 [ 1158.532879] ? netlink_unicast+0x350/0x350 [ 1158.541400] ? netlink_unicast+0x350/0x350 [ 1158.549805] sock_sendmsg+0x94/0xa0 [ 1158.557561] ___sys_sendmsg+0x49d/0x570 [ 1158.565625] ? copy_msghdr_from_user+0x210/0x210 [ 1158.574457] ? __fput+0x1e2/0x330 [ 1158.581948] ? __kasan_slab_free+0x130/0x180 [ 1158.590407] ? kmem_cache_free+0xb6/0x2d0 [ 1158.598574] ? mark_lock+0xc7/0x790 [ 1158.606177] ? task_work_run+0xcf/0x100 [ 1158.614165] ? exit_to_usermode_loop+0x102/0x110 [ 1158.622954] ? __lock_acquire+0x963/0x1ee0 [ 1158.631199] ? lockdep_hardirqs_on+0x260/0x260 [ 1158.639777] ? match_held_lock+0x1b/0x210 [ 1158.647918] ? lockdep_hardirqs_on+0x260/0x260 [ 1158.656501] ? match_held_lock+0x1b/0x210 [ 1158.664643] ? __fget_light+0xa6/0xe0 [ 1158.672423] ? __sys_sendmsg+0xd2/0x150 [ 1158.680334] __sys_sendmsg+0xd2/0x150 [ 1158.688063] ? __ia32_sys_shutdown+0x30/0x30 [ 1158.696435] ? lock_downgrade+0x2e0/0x2e0 [ 1158.704541] ? mark_held_locks+0x1a/0x90 [ 1158.712611] ? mark_held_locks+0x1a/0x90 [ 1158.720619] ? do_syscall_64+0x1e/0x2c0 [ 1158.728530] do_syscall_64+0x78/0x2c0 [ 1158.736254] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 1158.745414] RIP: 0033:0x7f62d505cb87 [ 1158.753070] Code: 64 89 02 48 c7 c0 ff ff ff ff eb b9 0f 1f 80 00 00 00 00 8b 05 6a 2b 2c 00 48 63 d2 48 63 ff 85 c0 75 18 b8 2e 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 59 f3 c3 0f 1f 80 00 00[87/1817] 48 89 f3 48 [ 1158.780924] RSP: 002b:00007fffd9832268 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 1158.793204] RAX: ffffffffffffffda RBX: 000000005d26048f RCX: 00007f62d505cb87 [ 1158.805111] RDX: 0000000000000000 RSI: 00007fffd98322d0 RDI: 0000000000000003 [ 1158.817055] RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000006 [ 1158.828987] R10: 00007f62d50ce260 R11: 0000000000000246 R12: 0000000000000001 [ 1158.840909] R13: 000000000067e540 R14: 0000000000000000 R15: 000000000067ed20 [ 1158.852873] ================================================================== Introduce new function tcf_block_non_null_shared() that verifies block pointer before dereferencing it to obtain index. Use the function in tc_indr_block_ing_cmd() to prevent NULL pointer dereference. Fixes: 955bcb6ea0df ("drivers: net: use flow block API") Signed-off-by: Vlad Buslov Signed-off-by: David S. Miller include/net/pkt_cls.h | 10 ++++++++++ net/sched/cls_api.c | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) commit c653f61a7f3ef05db173fe4132424db17edeee6b Author: Arnd Bergmann Date: Wed Jul 10 10:00:33 2019 +0200 davinci_cpdma: don't cast dma_addr_t to pointer dma_addr_t may be 64-bit wide on 32-bit architectures, so it is not valid to cast between it and a pointer: drivers/net/ethernet/ti/davinci_cpdma.c: In function 'cpdma_chan_submit_si': drivers/net/ethernet/ti/davinci_cpdma.c:1047:12: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] drivers/net/ethernet/ti/davinci_cpdma.c: In function 'cpdma_chan_idle_submit_mapped': drivers/net/ethernet/ti/davinci_cpdma.c:1114:12: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] drivers/net/ethernet/ti/davinci_cpdma.c: In function 'cpdma_chan_submit_mapped': drivers/net/ethernet/ti/davinci_cpdma.c:1164:12: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] Solve this by using two separate members in 'struct submit_info'. Since this avoids the use of the 'flag' member, the structure does not even grow in typical configurations. Fixes: 6670acacd59e ("net: ethernet: ti: davinci_cpdma: add dma mapped submit") Signed-off-by: Arnd Bergmann Reviewed-by: Ivan Khoronzhuk Signed-off-by: David S. Miller drivers/net/ethernet/ti/davinci_cpdma.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 6b660c4177aaebdc73df7a3378f0e8b110aa4b51 Author: Taehee Yoo Date: Sat Jul 6 01:08:09 2019 +0900 net: openvswitch: do not update max_headroom if new headroom is equal to old headroom When a vport is deleted, the maximum headroom size would be changed. If the vport which has the largest headroom is deleted, the new max_headroom would be set. But, if the new headroom size is equal to the old headroom size, updating routine is unnecessary. Signed-off-by: Taehee Yoo Tested-by: Greg Rose Reviewed-by: Greg Rose Signed-off-by: David S. Miller net/openvswitch/datapath.c | 39 ++++++++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 11 deletions(-) commit 9e3a25dc992dd9f3170fb643bdd95da5ca9c5576 Merge: 9787aed57dd3 15ffe5e1acf5 Author: Linus Torvalds Date: Fri Jul 12 15:13:55 2019 -0700 Merge tag 'dma-mapping-5.3' of git://git.infradead.org/users/hch/dma-mapping Pull dma-mapping updates from Christoph Hellwig: - move the USB special case that bounced DMA through a device bar into the USB code instead of handling it in the common DMA code (Laurentiu Tudor and Fredrik Noring) - don't dip into the global CMA pool for single page allocations (Nicolin Chen) - fix a crash when allocating memory for the atomic pool failed during boot (Florian Fainelli) - move support for MIPS-style uncached segments to the common code and use that for MIPS and nios2 (me) - make support for DMA_ATTR_NON_CONSISTENT and DMA_ATTR_NO_KERNEL_MAPPING generic (me) - convert nds32 to the generic remapping allocator (me) * tag 'dma-mapping-5.3' of git://git.infradead.org/users/hch/dma-mapping: (29 commits) dma-mapping: mark dma_alloc_need_uncached as __always_inline MIPS: only select ARCH_HAS_UNCACHED_SEGMENT for non-coherent platforms usb: host: Fix excessive alignment restriction for local memory allocations lib/genalloc.c: Add algorithm, align and zeroed family of DMA allocators nios2: use the generic uncached segment support in dma-direct nds32: use the generic remapping allocator for coherent DMA allocations arc: use the generic remapping allocator for coherent DMA allocations dma-direct: handle DMA_ATTR_NO_KERNEL_MAPPING in common code dma-direct: handle DMA_ATTR_NON_CONSISTENT in common code dma-mapping: add a dma_alloc_need_uncached helper openrisc: remove the partial DMA_ATTR_NON_CONSISTENT support arc: remove the partial DMA_ATTR_NON_CONSISTENT support arm-nommu: remove the partial DMA_ATTR_NON_CONSISTENT support ARM: dma-mapping: allow larger DMA mask than supported dma-mapping: truncate dma masks to what dma_addr_t can hold iommu/dma: Apply dma_{alloc,free}_contiguous functions dma-remap: Avoid de-referencing NULL atomic_pool MIPS: use the generic uncached segment support in dma-direct dma-direct: provide generic support for uncached kernel segments au1100fb: fix DMA API abuse ... commit 7b4b0f6b34d893be569da81ffad865a9d3a7d014 Merge: 31d5a608b13b f6b6aefee70a Author: Bjorn Helgaas Date: Fri Jul 12 17:08:41 2019 -0500 Merge branch 'pci/trivial' - Fix typos and whitespace errors (Bjorn Helgaas) * pci/trivial: PCI: Fix typos and whitespace errors commit 31d5a608b13b7251286699860630d36b0eb1def4 Merge: 950cfbf0a52b af3366308ea4 Author: Bjorn Helgaas Date: Fri Jul 12 17:08:40 2019 -0500 Merge branch 'remotes/lorenzo/pci/misc' - Fix pcitest build issues (Alan Mikhak) - Fix pcitest installation issue (Andy Shevchenko) * remotes/lorenzo/pci/misc: tools: PCI: Fix installation when `make tools/pci_install` tools: PCI: Fix compiler warning in pcitest tools: PCI: Fix broken pcitest compilation commit 950cfbf0a52bd5720a7aa95eae70d73d2ec5d489 Merge: 916f12e494d7 dbb7bbcc8ad2 Author: Bjorn Helgaas Date: Fri Jul 12 17:08:39 2019 -0500 Merge branch 'remotes/lorenzo/pci/endpoint' - Complete PCI endpoint removal so a subsequent add doesn't fail with -EBUSY (Alan Mikhak) - Pay attention to PCI endpoint fixed-size BARs (Alan Mikhak) - Fix PCI endpoint handling of 64bit BARs (Alan Mikhak) - Clear PCI endpoint BARs before freeing space (Alan Mikhak) * remotes/lorenzo/pci/endpoint: PCI: endpoint: Clear BAR before freeing its space PCI: endpoint: Skip odd BAR when skipping 64bit BAR PCI: endpoint: Allocate enough space for fixed size BAR PCI: endpoint: Set endpoint controller pointer to NULL commit 916f12e494d7ff7c786144ac62807bd37755efb3 Merge: 6bfc0c07cdb7 181fa434d051 Author: Bjorn Helgaas Date: Fri Jul 12 17:08:38 2019 -0500 Merge branch 'remotes/lorenzo/pci/xilinx' - Fix Xilinx NWL multi-MSI vector aliasing issue (Bharat Kumar Gogada) * remotes/lorenzo/pci/xilinx: PCI: xilinx-nwl: Fix Multi MSI data programming commit 6bfc0c07cdb775ff5648df4afbe3ac7ce1c766ab Merge: e3a9d5696682 7be142caabc4 Author: Bjorn Helgaas Date: Fri Jul 12 17:08:37 2019 -0500 Merge branch 'remotes/lorenzo/pci/tegra' - Reorganize Tegra AFI/PHY/REFCLK/etc functions (Manikanta Maddireddy) - Mask Tegra AFI_INTR in runtime suspend (Manikanta Maddireddy) - Fix Tegra AFI/PCIe powerup sequence (Manikanta Maddireddy) - Add Tegra124, Tegra132, Tegra210, and Tegra186 support for Gen2 link speed (Manikanta Maddireddy) - Advertise Tegra AER support (Manikanta Maddireddy) - Program Tegra210 UPHY settings (Manikanta Maddireddy) - Enable Tegra opportunistic UpdateFC and ACK (Manikanta Maddireddy) - Disable Tegra AFI dynamic clock gating (Manikanta Maddireddy) - Process Tegra pending DLL transactions before entering L1 or L2 to prevent receiver errors (Manikanta Maddireddy) - Enable Tegra xclk clock clamping in L1 (Manikanta Maddireddy) - Increase Tegra deskew retry time (Manikanta Maddireddy) - Work around Tegra hardware RAW erratum (Manikanta Maddireddy) - Update Tegra210 flow control timer frequency (Manikanta Maddireddy) - Work around Tegra Gen1/Gen2 link number negotiation issue (Manikanta Maddireddy) - Work around Tegra PLLE power down issue (Manikanta Maddireddy) - Program Tegra20 to support cacheable upstream transactions (Manikanta Maddireddy) - Log Tegra PRSNT_SENSE_IRQ as debug, not err (Manikanta Maddireddy) - Add register offset for third Root Port on Tegra186 and Tegra30 (Manikanta Maddireddy) - Document Tegra PCIe DPD pinctrl property (Manikanta Maddireddy) - Put Tegra PEX CLK & BIAS pads in DPD mode to reduce power usage when powergated (Manikanta Maddireddy) - Add generic DT binding for "reset-gpios" property (Manikanta Maddireddy) - Add Tegra support for GPIO-based PERST# (Manikanta Maddireddy) - Enable Relaxed Ordering only for Tegra20 & Tegra30 (Vidya Sagar) * remotes/lorenzo/pci/tegra: PCI: tegra: Enable Relaxed Ordering only for Tegra20 & Tegra30 PCI: tegra: Change link retry log level to debug PCI: tegra: Add support for GPIO based PERST# PCI: Add DT binding for "reset-gpios" property PCI: tegra: Put PEX CLK & BIAS pads in DPD mode dt-bindings: pci: tegra: Document PCIe DPD pinctrl optional prop PCI: tegra: Add AFI_PEX2_CTRL reg offset as part of SoC struct PCI: tegra: Change PRSNT_SENSE IRQ log to debug PCI: tegra: Program AFI_CACHE_BAR_{0,1}_{ST,SZ} registers only for Tegra20 PCI: tegra: Fix PLLE power down issue due to CLKREQ# signal PCI: tegra: Set target speed as Gen1 before starting LTSSM PCI: tegra: Update flow control timer frequency in Tegra210 PCI: tegra: Add SW fixup for RAW violations PCI: tegra: Increase the deskew retry time PCI: tegra: Enable PCIe xclk clock clamping PCI: tegra: Process pending DLL transactions before entering L1 or L2 PCI: tegra: Disable AFI dynamic clock gating PCI: tegra: Enable opportunistic UpdateFC and ACK PCI: tegra: Program UPHY electrical settings for Tegra210 PCI: tegra: Advertise PCIe Advanced Error Reporting (AER) capability PCI: tegra: Add PCIe Gen2 link speed support PCI: tegra: Fix PCIe host power up sequence PCI: tegra: Mask AFI_INTR in runtime suspend PCI: tegra: Rearrange Tegra PCIe driver functions PCI: tegra: Handle failure cases in tegra_pcie_power_on() soc/tegra: pmc: Export tegra_powergate_power_on() commit e3a9d5696682971d52080111453ed23b4e5841f2 Merge: 757410bd97ca 69bc586518e0 Author: Bjorn Helgaas Date: Fri Jul 12 17:08:36 2019 -0500 Merge branch 'remotes/lorenzo/pci/rcar' - Add R-Car device tree support for r8a774a1 (Biju Das) * remotes/lorenzo/pci/rcar: dt-bindings: PCI: rcar: Add device tree support for r8a774a1 commit 757410bd97ca102cacf30ab9b686f3f5f0c58c6a Merge: 3d663fc0f2b0 64adde31c8e9 Author: Bjorn Helgaas Date: Fri Jul 12 17:08:35 2019 -0500 Merge branch 'remotes/lorenzo/pci/qcom' - Move qcom driver to bulk clock API (Bjorn Andersson) - Add Qualcomm QCS404 PCIe controller support (Bjorn Andersson) - Ensure Qualcomm PERST is asserted for at least 100ms (Niklas Cassel) * remotes/lorenzo/pci/qcom: PCI: qcom: Ensure that PERST is asserted for at least 100 ms PCI: qcom: Add QCS404 PCIe controller support dt-bindings: PCI: qcom: Add QCS404 to the binding PCI: qcom: Use clk bulk API for 2.4.0 controllers commit 3d663fc0f2b0edc2fb0967f36f035a5dcbcb03c5 Merge: caa98440ac53 8a4f9fea2697 Author: Bjorn Helgaas Date: Fri Jul 12 17:08:34 2019 -0500 Merge branch 'remotes/lorenzo/pci/mobiveil' - Unify mobiveil register accessors (Hou Zhiqiang) - Remove MSI_FLAG_MULTI_PCI_MSI since mobiveil hardware doesn't support Multiple MSI (Hou Zhiqiang) - Program outbound windows with base address from DT instead of assuming zero (Hou Zhiqiang) - Skip "safe" list traversal when it's unnecessary (Hou Zhiqiang) - Initialize WIN_NUM_0 explicitly for CFG outbound transactions (Hou Zhiqiang) - Use WIN_NUM_0 for MEM inbound transactions (Hou Zhiqiang) - Fix up mobiveil Class Code to PCI_CLASS_BRIDGE_PCI (Hou Zhiqiang) - Wait for link-up before enumerating devices, not while initializing host (Hou Zhiqiang) - Move IRQ chained handler setup out of DT code (Hou Zhiqiang) - Set primary/secondary/subordinate bus numbers (Hou Zhiqiang) - Fix "valid device" check to allow root bus device 0 to be multi-function (Hou Zhiqiang) - Make DT "gpio_slave" and "apb_csr" properties optional (Hou Zhiqiang) - Refactor MEM/IO outbound window initialization (Hou Zhiqiang) - Fix validity check for inbound/outbound window programming (Hou Zhiqiang) - Initialize and preserve window control bits (Hou Zhiqiang) - Fix 64-bit outbound window setup (both CPU and PCI addresses) (Hou Zhiqiang) - Move IO port setup to host init (Hou Zhiqiang) - Fix infinite loop in INTx ISR (Hou Zhiqiang) - Fix INTx interrupt clearing to avoid missed interrupts (Hou Zhiqiang) * remotes/lorenzo/pci/mobiveil: PCI: mobiveil: Fix INTx interrupt clearing in mobiveil_pcie_isr() PCI: mobiveil: Fix infinite-loop in the INTx handling function PCI: mobiveil: Move PCIe PIO enablement out of inbound window routine PCI: mobiveil: Add upper 32-bit PCI base address setup in inbound window PCI: mobiveil: Add upper 32-bit CPU base address setup in outbound window PCI: mobiveil: Mask out hardcoded bits in inbound/outbound windows setup PCI: mobiveil: Clear the control fields before updating it PCI: mobiveil: Add configured inbound windows counter PCI: mobiveil: Fix the valid check for inbound and outbound windows PCI: mobiveil: Clean-up program_{ib/ob}_windows() PCI: mobiveil: Remove an unnecessary return value check PCI: mobiveil: Fix error return values PCI: mobiveil: Refactor the MEM/IO outbound window initialization PCI: mobiveil: Make some register updates more readable PCI: mobiveil: Reformat the code for readability dt-bindings: PCI: mobiveil: Change gpio_slave and apb_csr to optional PCI: mobiveil: Fix devfn check in mobiveil_pcie_valid_device() PCI: mobiveil: Initialize Primary/Secondary/Subordinate bus numbers PCI: mobiveil: Move IRQ chained handler setup out of DT parse PCI: mobiveil: Move the link up waiting out of mobiveil_host_init() PCI: mobiveil: Fix the Class Code field PCI: mobiveil: Use the 1st inbound window for MEM inbound transactions PCI: mobiveil: Use WIN_NUM_0 explicitly for CFG outbound window PCI: mobiveil: Update the resource list traversal function PCI: mobiveil: Fix PCI base address in MEM/IO outbound windows PCI: mobiveil: Remove the flag MSI_FLAG_MULTI_PCI_MSI PCI: mobiveil: Unify register accessors commit caa98440ac537872f26792598471c658b5a2f599 Merge: 6c90132f0e5f 4df591b20b80 Author: Bjorn Helgaas Date: Fri Jul 12 17:08:33 2019 -0500 Merge branch 'remotes/lorenzo/pci/hv' - Fix Hyper-V use-after-free in eject path (Dexuan Cui) * remotes/lorenzo/pci/hv: PCI: hv: Fix a use-after-free bug in hv_eject_device_work() commit 6c90132f0e5f6c522ac3f6bd1f91961cb77fb9b6 Merge: 8e7bc41cdcfe 381ed79c8655 Author: Bjorn Helgaas Date: Fri Jul 12 17:08:32 2019 -0500 Merge branch 'remotes/lorenzo/pci/dwc' - Add dwc API support to de-initialize host (Vidya Sagar) - Clean up dwc DBI,ATU read and write APIs (Vidya Sagar) - Export dwc APIs to support .remove() so drivers can be modular (Vidya Sagar) - Simplify imx6 Kconfig dependencies (Leonard Crestez) - Fix dra7xx build error when !CONFIG_GPIOLIB (YueHaibing) * remotes/lorenzo/pci/dwc: PCI: dwc: pci-dra7xx: Fix compilation when !CONFIG_GPIOLIB PCI: imx6: Simplify Kconfig depends on PCI: dwc: Export APIs to support .remove() implementation PCI: dwc: Cleanup DBI,ATU read and write APIs PCI: dwc: Add API support to de-initialize host commit 8e7bc41cdcfe64f891a3e1b4913e1a4c107a3465 Merge: b32fb024027c c369b536f8e3 Author: Bjorn Helgaas Date: Fri Jul 12 17:08:31 2019 -0500 Merge branch 'remotes/lorenzo/pci/armada' - Add Armada8k PHYs support (Miquel Raynal) * remotes/lorenzo/pci/armada: PCI: armada8k: Add PHYs support commit b32fb024027c7952ab42b0f5467e8c43a16b75ad Merge: 55ab3ecb81d5 7a28db0a251e Author: Bjorn Helgaas Date: Fri Jul 12 17:08:30 2019 -0500 Merge branch 'remotes/lorenzo/pci/altera' - Allow building Altera host bridge driver as a module (Ley Foon Tan) - Fix Altera Stratix 10 Type 1 to Type 0 config access conversion (Ley Foon Tan) * remotes/lorenzo/pci/altera: PCI: altera: Fix configuration type based on secondary number PCI: altera-msi: Allow building as module PCI: altera: Allow building as module commit 55ab3ecb81d5c071287a17567f7573f16934a9e9 Merge: 8c6af6f04252 06013b647c70 Author: Bjorn Helgaas Date: Fri Jul 12 17:08:29 2019 -0500 Merge branch 'pci/virtualization' - Fix problem with caching VF config space size (Alex Williamson) * pci/virtualization: PCI/IOV: Assume SR-IOV VFs support extended config space. Revert "PCI/IOV: Use VF0 cached config space size for other VFs" commit 8c6af6f04252110b3e4c2ff1614a4518d5208383 Merge: 3306e99edf70 6a381ea694c9 Author: Bjorn Helgaas Date: Fri Jul 12 17:08:28 2019 -0500 Merge branch 'pci/resource' - Evaluate ACPI "PCI Boot Configuration"_DSM (Benjamin Herrenschmidt) - Don't auto-realloc if we're preserving firmware config (Benjamin Herrenschmidt) - Allow arm64 to reallocate resources if necessary (Benjamin Herrenschmidt) - Preserve firmware config on arm64 when desired (Benjamin Herrenschmidt) - Simplify resource distribution to hotplug bridges (Nicholas Johnson) * pci/resource: PCI: Skip resource distribution when no hotplug bridges PCI: Simplify pci_bus_distribute_available_resources() arm64: PCI: Preserve firmware configuration when desired arm64: PCI: Allow resource reallocation if necessary PCI: Don't auto-realloc if we're preserving firmware config PCI/ACPI: Evaluate PCI Boot Configuration _DSM commit 3306e99edf70e9f7f9839c0c680136f098ebb1ed Merge: e09977285c19 9c002bb66f5b Author: Bjorn Helgaas Date: Fri Jul 12 17:08:27 2019 -0500 Merge branch 'pci/peer-to-peer' - Prevent drivers that use dma_virt_ops from using peer-to-peer DMA (Logan Gunthorpe) * pci/peer-to-peer: PCI/P2PDMA: Fix missing check for dma_virt_ops commit e09977285c1929867c9f251d28bda9aed78fe331 Merge: 8cf80c5c14b4 b516ea586d71 Author: Bjorn Helgaas Date: Fri Jul 12 17:08:26 2019 -0500 Merge branch 'pci/misc' - Generalize multi-function power dependency device links (Abhishek Sahu) - Add NVIDIA GPU multi-function power dependencies (Abhishek Sahu) - Optimize /proc/bus/pci/devices by using seq_puts() instead of seq_printf() (Markus Elfring) - Enable NVIDIA HDA controllers if BIOS didn't (Lukas Wunner) * pci/misc: PCI: Enable NVIDIA HDA controllers PCI: Use seq_puts() instead of seq_printf() in show_device() PCI: Add NVIDIA GPU multi-function power dependencies PCI: Generalize multi-function power dependency device links commit 8cf80c5c14b4914b0eb03d4bcafebd07180edfb9 Merge: b6a001c0cb2d dc6b698a86fe Author: Bjorn Helgaas Date: Fri Jul 12 17:08:24 2019 -0500 Merge branch 'pci/enumeration' - If user prevents VF probing, return error instead of pretending a driver has claimed the VF (Alex Williamson) - Always allow probing with driver_override (Alex Williamson) - Decode PCIe 32 GT/s link speed (Gustavo Pimentel) - Ignore lockdep for sysfs remove to avoid lockdep false positive (Marek Vasut) * pci/enumeration: PCI: sysfs: Ignore lockdep for remove attribute PCI: Decode PCIe 32 GT/s link speed PCI: Always allow probing with driver_override PCI: Return error if cannot probe VF commit b6a001c0cb2d29b77596a142aad5249044a6c119 Merge: a188339ca5a3 151f4e2bdc7a Author: Bjorn Helgaas Date: Fri Jul 12 17:08:23 2019 -0500 Merge branch 'pci/docs' - Convert docs to reST (Changbin Du) - Convert PM docs to reST (Mauro Carvalho Chehab) * pci/docs: docs: power: convert docs to ReST and rename to *.rst Documentation: PCI: convert endpoint/pci-test-howto.txt to reST Documentation: PCI: convert endpoint/pci-test-function.txt to reST Documentation: PCI: convert endpoint/pci-endpoint-cfs.txt to reST Documentation: PCI: convert endpoint/pci-endpoint.txt to reST Documentation: PCI: convert pcieaer-howto.txt to reST Documentation: PCI: convert pci-error-recovery.txt to reST Documentation: PCI: convert acpi-info.txt to reST Documentation: PCI: convert MSI-HOWTO.txt to reST Documentation: PCI: convert pci-iov-howto.txt to reST Documentation: PCI: convert PCIEBUS-HOWTO.txt to reST Documentation: PCI: convert pci.txt to reST Documentation: add Linux PCI to Sphinx TOC tree commit 9787aed57dd33ba5c15a713c2c50e78baeb5052d Author: Nathan Chancellor Date: Mon Jul 1 11:28:08 2019 -0700 coresight: Make the coresight_device_fwnode_match declaration's fwnode parameter const Fix Linus' merge error in the parent commit, causing: drivers/hwtracing/coresight/coresight.c:1051:11: error: incompatible pointer types passing 'int (struct device *, void *)' to parameter of type 'int (*)(struct device *, const void *)' [-Werror,-Wincompatible-pointer-types] coresight_device_fwnode_match); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/device.h:173:17: note: passing argument to parameter 'match' here int (*match)(struct device *dev, const void *data)); ^ due to missed header file fixup. Fixes: f632a8170a6b ("Merge tag 'driver-core-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core") Signed-off-by: Nathan Chancellor [ Greg even sent this patch with his pull request, but I stupidly thought it was the merge resolution fix I had already done as part of the merge. But no, this was the extra fix for the header file that goes with the definition I _had_ caught - Linus ] Signed-off-by: Linus Torvalds drivers/hwtracing/coresight/coresight-priv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 224d5fd43d250f850d64fb6d668114aff29d7022 Author: Marcus Folkesson Date: Tue Jul 9 09:54:36 2019 +0200 docs: driver-api: generic-counter: fix file path to ABI doc Fixes: 09e7d4ed8991 ("docs: Add Generic Counter interface documentation") Signed-off-by: Marcus Folkesson Acked-by: William Breathitt Gray Signed-off-by: Jonathan Corbet Documentation/driver-api/generic-counter.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit db531db951f950b86d274cc8ed7b21b9e2240036 Author: Max Kellermann Date: Fri Jul 12 16:18:06 2019 +0200 Revert "NFS: readdirplus optimization by cache mechanism" (memleak) This reverts commit be4c2d4723a4a637f0d1b4f7c66447141a4b3564. That commit caused a severe memory leak in nfs_readdir_make_qstr(). When listing a directory with more than 100 files (this is how many struct nfs_cache_array_entry elements fit in one 4kB page), all allocated file name strings past those 100 leak. The root of the leakage is that those string pointers are managed in pages which are never linked into the page cache. fs/nfs/dir.c puts pages into the page cache by calling read_cache_page(); the callback function nfs_readdir_filler() will then fill the given page struct which was passed to it, which is already linked in the page cache (by do_read_cache_page() calling add_to_page_cache_lru()). Commit be4c2d4723a4 added another (local) array of allocated pages, to be filled with more data, instead of discarding excess items received from the NFS server. Those additional pages can be used by the next nfs_readdir_filler() call (from within the same nfs_readdir() call). The leak happens when some of those additional pages are never used (copied to the page cache using copy_highpage()). The pages will be freed by nfs_readdir_free_pages(), but their contents will not. The commit did not invoke nfs_readdir_clear_array() (and doing so would have been dangerous, because it did not track which of those pages were already copied to the page cache, risking double free bugs). How to reproduce the leak: - Use a kernel with CONFIG_SLUB_DEBUG_ON. - Create a directory on a NFS mount with more than 100 files with names long enough to use the "kmalloc-32" slab (so we can easily look up the allocation counts): for i in `seq 110`; do touch ${i}_0123456789abcdef; done - Drop all caches: echo 3 >/proc/sys/vm/drop_caches - Check the allocation counter: grep nfs_readdir /sys/kernel/slab/kmalloc-32/alloc_calls 30564391 nfs_readdir_add_to_array+0x73/0xd0 age=534558/4791307/6540952 pid=370-1048386 cpus=0-47 nodes=0-1 - Request a directory listing and check the allocation counters again: ls [...] grep nfs_readdir /sys/kernel/slab/kmalloc-32/alloc_calls 30564511 nfs_readdir_add_to_array+0x73/0xd0 age=207/4792999/6542663 pid=370-1048386 cpus=0-47 nodes=0-1 There are now 120 new allocations. - Drop all caches and check the counters again: echo 3 >/proc/sys/vm/drop_caches grep nfs_readdir /sys/kernel/slab/kmalloc-32/alloc_calls 30564401 nfs_readdir_add_to_array+0x73/0xd0 age=735/4793524/6543176 pid=370-1048386 cpus=0-47 nodes=0-1 110 allocations are gone, but 10 have leaked and will never be freed. Unhelpfully, those allocations are explicitly excluded from KMEMLEAK, that's why my initial attempts with KMEMLEAK were not successful: /* * Avoid a kmemleak false positive. The pointer to the name is stored * in a page cache page which kmemleak does not scan. */ kmemleak_not_leak(string->name); It would be possible to solve this bug without reverting the whole commit: - keep track of which pages were not used, and call nfs_readdir_clear_array() on them, or - manually link those pages into the page cache But for now I have decided to just revert the commit, because the real fix would require complex considerations, risking more dangerous (crash) bugs, which may seem unsuitable for the stable branches. Signed-off-by: Max Kellermann Cc: stable@vger.kernel.org # v5.1+ Signed-off-by: Trond Myklebust fs/nfs/dir.c | 90 ++++--------------------------------------------------- fs/nfs/internal.h | 3 +- 2 files changed, 7 insertions(+), 86 deletions(-) commit f632a8170a6b667ee4e3f552087588f0fe13c4bb Merge: ef8f3d48afd6 c33d442328f5 Author: Linus Torvalds Date: Fri Jul 12 12:24:03 2019 -0700 Merge tag 'driver-core-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core and debugfs updates from Greg KH: "Here is the "big" driver core and debugfs changes for 5.3-rc1 It's a lot of different patches, all across the tree due to some api changes and lots of debugfs cleanups. Other than the debugfs cleanups, in this set of changes we have: - bus iteration function cleanups - scripts/get_abi.pl tool to display and parse Documentation/ABI entries in a simple way - cleanups to Documenatation/ABI/ entries to make them parse easier due to typos and other minor things - default_attrs use for some ktype users - driver model documentation file conversions to .rst - compressed firmware file loading - deferred probe fixes All of these have been in linux-next for a while, with a bunch of merge issues that Stephen has been patient with me for" * tag 'driver-core-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (102 commits) debugfs: make error message a bit more verbose orangefs: fix build warning from debugfs cleanup patch ubifs: fix build warning after debugfs cleanup patch driver: core: Allow subsystems to continue deferring probe drivers: base: cacheinfo: Ensure cpu hotplug work is done before Intel RDT arch_topology: Remove error messages on out-of-memory conditions lib: notifier-error-inject: no need to check return value of debugfs_create functions swiotlb: no need to check return value of debugfs_create functions ceph: no need to check return value of debugfs_create functions sunrpc: no need to check return value of debugfs_create functions ubifs: no need to check return value of debugfs_create functions orangefs: no need to check return value of debugfs_create functions nfsd: no need to check return value of debugfs_create functions lib: 842: no need to check return value of debugfs_create functions debugfs: provide pr_fmt() macro debugfs: log errors when something goes wrong drivers: s390/cio: Fix compilation warning about const qualifiers drivers: Add generic helper to match by of_node driver_find_device: Unify the match function with class_find_device() bus_find_device: Unify the match callback with class_find_device ... commit ef8f3d48afd6a17a0dae8c277c2f539c2f19fd16 Merge: d7d170a8e357 2c207985f354 Author: Linus Torvalds Date: Fri Jul 12 11:40:28 2019 -0700 Merge branch 'akpm' (patches from Andrew) Merge updates from Andrew Morton: "Am experimenting with splitting MM up into identifiable subsystems perhaps with a view to gitifying it in complex ways. Also with more verbose "incoming" emails. Most of MM is here and a few other trees. Subsystems affected by this patch series: - hotfixes - iommu - scripts - arch/sh - ocfs2 - mm:slab-generic - mm:slub - mm:kmemleak - mm:kasan - mm:cleanups - mm:debug - mm:pagecache - mm:swap - mm:memcg - mm:gup - mm:pagemap - mm:infrastructure - mm:vmalloc - mm:initialization - mm:pagealloc - mm:vmscan - mm:tools - mm:proc - mm:ras - mm:oom-kill hotfixes: mm: vmscan: scan anonymous pages on file refaults mm/nvdimm: add is_ioremap_addr and use that to check ioremap address mm/memcontrol: fix wrong statistics in memory.stat mm/z3fold.c: lock z3fold page before __SetPageMovable() nilfs2: do not use unexported cpu_to_le32()/le32_to_cpu() in uapi header MAINTAINERS: nilfs2: update email address iommu: include/linux/dmar.h: replace single-char identifiers in macros scripts: scripts/decode_stacktrace: match basepath using shell prefix operator, not regex scripts/decode_stacktrace: look for modules with .ko.debug extension scripts/spelling.txt: drop "sepc" from the misspelling list scripts/spelling.txt: add spelling fix for prohibited scripts/decode_stacktrace: Accept dash/underscore in modules scripts/spelling.txt: add more spellings to spelling.txt arch/sh: arch/sh/configs/sdk7786_defconfig: remove CONFIG_LOGFS sh: config: remove left-over BACKLIGHT_LCD_SUPPORT sh: prevent warnings when using iounmap ocfs2: fs: ocfs: fix spelling mistake "hearbeating" -> "heartbeat" ocfs2/dlm: use struct_size() helper ocfs2: add last unlock times in locking_state ocfs2: add locking filter debugfs file ocfs2: add first lock wait time in locking_state ocfs: no need to check return value of debugfs_create functions fs/ocfs2/dlmglue.c: unneeded variable: "status" ocfs2: use kmemdup rather than duplicating its implementation mm:slab-generic: Patch series "mm/slab: Improved sanity checking": mm/slab: validate cache membership under freelist hardening mm/slab: sanity-check page type when looking up cache lkdtm/heap: add tests for freelist hardening mm:slub: mm/slub.c: avoid double string traverse in kmem_cache_flags() slub: don't panic for memcg kmem cache creation failure mm:kmemleak: mm/kmemleak.c: fix check for softirq context mm/kmemleak.c: change error at _write when kmemleak is disabled docs: kmemleak: add more documentation details mm:kasan: mm/kasan: print frame description for stack bugs Patch series "Bitops instrumentation for KASAN", v5: lib/test_kasan: add bitops tests x86: use static_cpu_has in uaccess region to avoid instrumentation asm-generic, x86: add bitops instrumentation for KASAN Patch series "mm/kasan: Add object validation in ksize()", v3: mm/kasan: introduce __kasan_check_{read,write} mm/kasan: change kasan_check_{read,write} to return boolean lib/test_kasan: Add test for double-kzfree detection mm/slab: refactor common ksize KASAN logic into slab_common.c mm/kasan: add object validation in ksize() mm:cleanups: include/linux/pfn_t.h: remove pfn_t_to_virt() Patch series "remove ARCH_SELECT_MEMORY_MODEL where it has no effect": arm: remove ARCH_SELECT_MEMORY_MODEL s390: remove ARCH_SELECT_MEMORY_MODEL sparc: remove ARCH_SELECT_MEMORY_MODEL mm/gup.c: make follow_page_mask() static mm/memory.c: trivial clean up in insert_page() mm: make !CONFIG_HUGE_PAGE wrappers into static inlines include/linux/mm_types.h: ifdef struct vm_area_struct::swap_readahead_info mm: remove the account_page_dirtied export mm/page_isolation.c: change the prototype of undo_isolate_page_range() include/linux/vmpressure.h: use spinlock_t instead of struct spinlock mm: remove the exporting of totalram_pages include/linux/pagemap.h: document trylock_page() return value mm:debug: mm/failslab.c: by default, do not fail allocations with direct reclaim only Patch series "debug_pagealloc improvements": mm, debug_pagelloc: use static keys to enable debugging mm, page_alloc: more extensive free page checking with debug_pagealloc mm, debug_pagealloc: use a page type instead of page_ext flag mm:pagecache: Patch series "fix filler_t callback type mismatches", v2: mm/filemap.c: fix an overly long line in read_cache_page mm/filemap: don't cast ->readpage to filler_t for do_read_cache_page jffs2: pass the correct prototype to read_cache_page 9p: pass the correct prototype to read_cache_page mm/filemap.c: correct the comment about VM_FAULT_RETRY mm:swap: mm, swap: fix race between swapoff and some swap operations mm/swap_state.c: simplify total_swapcache_pages() with get_swap_device() mm, swap: use rbtree for swap_extent mm/mincore.c: fix race between swapoff and mincore mm:memcg: memcg, oom: no oom-kill for __GFP_RETRY_MAYFAIL memcg, fsnotify: no oom-kill for remote memcg charging mm, memcg: introduce memory.events.local mm: memcontrol: dump memory.stat during cgroup OOM Patch series "mm: reparent slab memory on cgroup removal", v7: mm: memcg/slab: postpone kmem_cache memcg pointer initialization to memcg_link_cache() mm: memcg/slab: rename slab delayed deactivation functions and fields mm: memcg/slab: generalize postponed non-root kmem_cache deactivation mm: memcg/slab: introduce __memcg_kmem_uncharge_memcg() mm: memcg/slab: unify SLAB and SLUB page accounting mm: memcg/slab: don't check the dying flag on kmem_cache creation mm: memcg/slab: synchronize access to kmem_cache dying flag using a spinlock mm: memcg/slab: rework non-root kmem_cache lifecycle management mm: memcg/slab: stop setting page->mem_cgroup pointer for slab pages mm: memcg/slab: reparent memcg kmem_caches on cgroup removal mm, memcg: add a memcg_slabinfo debugfs file mm:gup: Patch series "switch the remaining architectures to use generic GUP", v4: mm: use untagged_addr() for get_user_pages_fast addresses mm: simplify gup_fast_permitted mm: lift the x86_32 PAE version of gup_get_pte to common code MIPS: use the generic get_user_pages_fast code sh: add the missing pud_page definition sh: use the generic get_user_pages_fast code sparc64: add the missing pgd_page definition sparc64: define untagged_addr() sparc64: use the generic get_user_pages_fast code mm: rename CONFIG_HAVE_GENERIC_GUP to CONFIG_HAVE_FAST_GUP mm: reorder code blocks in gup.c mm: consolidate the get_user_pages* implementations mm: validate get_user_pages_fast flags mm: move the powerpc hugepd code to mm/gup.c mm: switch gup_hugepte to use try_get_compound_head mm: mark the page referenced in gup_hugepte mm/gup: speed up check_and_migrate_cma_pages() on huge page mm/gup.c: remove some BUG_ONs from get_gate_page() mm/gup.c: mark undo_dev_pagemap as __maybe_unused mm:pagemap: asm-generic, x86: introduce generic pte_{alloc,free}_one[_kernel] alpha: switch to generic version of pte allocation arm: switch to generic version of pte allocation arm64: switch to generic version of pte allocation csky: switch to generic version of pte allocation m68k: sun3: switch to generic version of pte allocation mips: switch to generic version of pte allocation nds32: switch to generic version of pte allocation nios2: switch to generic version of pte allocation parisc: switch to generic version of pte allocation riscv: switch to generic version of pte allocation um: switch to generic version of pte allocation unicore32: switch to generic version of pte allocation mm/pgtable: drop pgtable_t variable from pte_fn_t functions mm/memory.c: fail when offset == num in first check of __vm_map_pages() mm:infrastructure: mm/mmu_notifier: use hlist_add_head_rcu() mm:vmalloc: Patch series "Some cleanups for the KVA/vmalloc", v5: mm/vmalloc.c: remove "node" argument mm/vmalloc.c: preload a CPU with one object for split purpose mm/vmalloc.c: get rid of one single unlink_va() when merge mm/vmalloc.c: switch to WARN_ON() and move it under unlink_va() mm/vmalloc.c: spelling> s/informaion/information/ mm:initialization: mm/large system hash: use vmalloc for size > MAX_ORDER when !hashdist mm/large system hash: clear hashdist when only one node with memory is booted mm:pagealloc: arm64: move jump_label_init() before parse_early_param() Patch series "add init_on_alloc/init_on_free boot options", v10: mm: security: introduce init_on_alloc=1 and init_on_free=1 boot options mm: init: report memory auto-initialization features at boot time mm:vmscan: mm: vmscan: remove double slab pressure by inc'ing sc->nr_scanned mm: vmscan: correct some vmscan counters for THP swapout mm:tools: tools/vm/slabinfo: order command line options tools/vm/slabinfo: add partial slab listing to -X tools/vm/slabinfo: add option to sort by partial slabs tools/vm/slabinfo: add sorting info to help menu mm:proc: proc: use down_read_killable mmap_sem for /proc/pid/maps proc: use down_read_killable mmap_sem for /proc/pid/smaps_rollup proc: use down_read_killable mmap_sem for /proc/pid/pagemap proc: use down_read_killable mmap_sem for /proc/pid/clear_refs proc: use down_read_killable mmap_sem for /proc/pid/map_files mm: use down_read_killable for locking mmap_sem in access_remote_vm mm: smaps: split PSS into components mm: vmalloc: show number of vmalloc pages in /proc/meminfo mm:ras: mm/memory-failure.c: clarify error message mm:oom-kill: mm: memcontrol: use CSS_TASK_ITER_PROCS at mem_cgroup_scan_tasks() mm, oom: refactor dump_tasks for memcg OOMs mm, oom: remove redundant task_in_mem_cgroup() check oom: decouple mems_allowed from oom_unkillable_task mm/oom_kill.c: remove redundant OOM score normalization in select_bad_process()" * akpm: (147 commits) mm/oom_kill.c: remove redundant OOM score normalization in select_bad_process() oom: decouple mems_allowed from oom_unkillable_task mm, oom: remove redundant task_in_mem_cgroup() check mm, oom: refactor dump_tasks for memcg OOMs mm: memcontrol: use CSS_TASK_ITER_PROCS at mem_cgroup_scan_tasks() mm/memory-failure.c: clarify error message mm: vmalloc: show number of vmalloc pages in /proc/meminfo mm: smaps: split PSS into components mm: use down_read_killable for locking mmap_sem in access_remote_vm proc: use down_read_killable mmap_sem for /proc/pid/map_files proc: use down_read_killable mmap_sem for /proc/pid/clear_refs proc: use down_read_killable mmap_sem for /proc/pid/pagemap proc: use down_read_killable mmap_sem for /proc/pid/smaps_rollup proc: use down_read_killable mmap_sem for /proc/pid/maps tools/vm/slabinfo: add sorting info to help menu tools/vm/slabinfo: add option to sort by partial slabs tools/vm/slabinfo: add partial slab listing to -X tools/vm/slabinfo: order command line options mm: vmscan: correct some vmscan counters for THP swapout mm: vmscan: remove double slab pressure by inc'ing sc->nr_scanned ... commit 9db7e618fca34d0a7d61c149d726fd90644ecb1e Author: Nathan Chancellor Date: Tue Jul 9 23:06:15 2019 -0700 net/mlx5e: Convert single case statement switch statements into if statements During the review of commit 1ff2f0fa450e ("net/mlx5e: Return in default case statement in tx_post_resync_params"), Leon and Nick pointed out that the switch statements can be converted to single if statements that return early so that the code is easier to follow. Suggested-by: Leon Romanovsky Suggested-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Reviewed-by: Leon Romanovsky Signed-off-by: David S. Miller .../ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c | 34 +++++++--------------- 1 file changed, 11 insertions(+), 23 deletions(-) commit b1511f7a48c3ab28ae10b7ea1e9eae1481525bbe Merge: 47c9e0cef014 1c099779c1e2 3044a860fd09 f9d3fb22ab27 55692cedf3af Author: Stephen Boyd Date: Fri Jul 12 11:11:51 2019 -0700 Merge branches 'clk-bcm63xx', 'clk-silabs', 'clk-lochnagar' and 'clk-rockchip' into clk-next - Support gated clk controller on MIPS based BCM63XX SoCs - Small frequency support for SiLabs Si544 chips - Support SiLabs Si5341 and Si5340 chips * clk-bcm63xx: clk: add BCM63XX gated clock controller driver devicetree: document the BCM63XX gated clock bindings * clk-silabs: clk: Add Si5341/Si5340 driver dt-bindings: clock: Add silabs,si5341 clk: clk-si544: Implement small frequency change support * clk-lochnagar: clk: lochnagar: Update DT binding doc to include the primary SPDIF MCLK clk: lochnagar: Use new parent_data approach to register clock parents * clk-rockchip: clk: rockchip: export HDMIPHY clock on rk3228 clk: rockchip: add watchdog pclk on rk3328 clk: rockchip: add clock id for hdmi_phy special clock on rk3228 clk: rockchip: add clock id for watchdog pclk on rk3328 clk: rockchip: convert pclk_wdt boilerplat to new SGRF_GATE macro clk: rockchip: add a type from SGRF-controlled gate clocks clk: rockchip: Remove 48 MHz PLL rate from rk3288 clk: rockchip: add 1.464GHz cpu-clock rate to rk3228 clk: rockchip: Slightly more accurate math in rockchip_mmc_get_phase() clk: rockchip: Don't yell about bad mmc phases when getting clk: rockchip: Use clk_hw_get_rate() in MMC phase calculation commit 47c9e0cef01494aa512e924b100160206295f45e Merge: a993be3724d0 e2bb18347c8e e3527dca15c8 1df379924304 c974c48deeb9 ecbcc2aa6557 Author: Stephen Boyd Date: Fri Jul 12 11:11:30 2019 -0700 Merge branches 'clk-rpi-cpufreq', 'clk-tegra', 'clk-simplify-provider.h', 'clk-sprd' and 'clk-at91' into clk-next - Support for CPU clks on Raspberry Pi devices - Slow clk support for AT91 SAM9X60 SoCs * clk-rpi-cpufreq: clk: raspberrypi: register platform device for raspberrypi-cpufreq firmware: raspberrypi: register clk device clk: bcm283x: add driver interfacing with Raspberry Pi's firmware clk: bcm2835: remove pllb * clk-tegra: clk: tegra: Do not enable PLL_RE_VCO on Tegra210 clk: tegra: Warn if an enabled PLL is in IDDQ clk: tegra: Do not warn unnecessarily clk: tegra210: fix PLLU and PLLU_OUT1 * clk-simplify-provider.h: clk: consoldiate the __clk_get_hw() declarations clk: Unexport __clk_of_table clk: Remove ifdef for COMMON_CLK in clk-provider.h * clk-sprd: clk: sprd: Add check for return value of sprd_clk_regmap_init() clk: sprd: Check error only for devm_regmap_init_mmio() clk: sprd: Switch from of_iomap() to devm_ioremap_resource() * clk-at91: clk: at91: sckc: use dedicated functions to unregister clock clk: at91: sckc: improve error path for sama5d4 sck registration clk: at91: sckc: remove unnecessary line clk: at91: sckc: improve error path for sam9x5 sck register clk: at91: sckc: add support to free slow clock osclillator clk: at91: sckc: add support to free slow rc oscillator clk: at91: sckc: add support to free slow oscillator clk: at91: sckc: add support for SAM9X60 dt-bindings: clk: at91: add bindings for SAM9X60's slow clock controller clk: at91: sckc: add support to specify registers bit offsets clk: at91: sckc: sama5d4 has no bypass support commit a993be3724d0eb25a905db2eefc77fab4c355f53 Merge: dfe1d3a2830d e5e89247a74b da642427bd77 df095f996b8f 78a5ba8f9126 Author: Stephen Boyd Date: Fri Jul 12 11:11:16 2019 -0700 Merge branches 'clk-debugfs', 'clk-unused', 'clk-refactor' and 'clk-qoriq' into clk-next - Add a 'clk_parent' file in clk debugfs - Remove dead code in various clk drivers * clk-debugfs: clk: Add clk_parent entry in debugfs * clk-unused: clk: qcom: Fix -Wunused-const-variable clk: mmp: frac: Remove set but not used variable 'prev_rate' clk: ti: Remove unused functions clk: mediatek: mt8516: Remove unused variable * clk-refactor: clk: clk-cdce706: simplify getting the adapter of a client clk: Simplify clk_core_can_round() * clk-qoriq: clk: qoriq: add support for lx2160a commit dfe1d3a2830d607bbd66bae8bb86ae7ffde04f38 Merge: e02cb1f59340 179175d389c7 88aa7af9c180 16e3c572cdc9 65e2218d1006 Author: Stephen Boyd Date: Fri Jul 12 11:11:06 2019 -0700 Merge branches 'clk-bulk-optional', 'clk-kirkwood', 'clk-socfpga' and 'clk-docs' into clk-next - Add a clk_bulk_get_optional() API (with devm too) - Support for Marvell 98DX1135 SoCs * clk-bulk-optional: clk: Document some devm_clk_bulk*() APIs clk: Add devm_clk_bulk_get_optional() function clk: Add clk_bulk_get_optional() function * clk-kirkwood: clk: kirkwood: Add support for MV98DX1135 dt-bindings: clock: mvebu: Add compatible string for 98dx1135 core clock * clk-socfpga: clk: socfpga: stratix10: fix divider entry for the emac clocks clk: socfpga: stratix10: add additional clocks needed for the NAND IP * clk-docs: clk: Grammar missing "and", Spelling s/statisfied/satisfied/ commit e02cb1f5934053acfa72b7def8bef9b20e7ab818 Merge: 1f5d580cabc6 0b88bc929251 c0bc660c9068 76b77f1dbb16 11f6c2307cae Author: Stephen Boyd Date: Fri Jul 12 11:10:59 2019 -0700 Merge branches 'clk-ti', 'clk-samsung', 'clk-imx' and 'clk-allwinner' into clk-next * clk-ti: clk: ti: Use int to check return value from of_property_count_elems_of_size() firmware: ti_sci: extend clock identifiers from u8 to u32 clk: keystone: sci-clk: extend clock IDs to 32 bits clk: keystone: sci-clk: probe clocks from DT instead of firmware clk: keystone: sci-clk: split out the fw clock parsing to own function clk: keystone: sci-clk: cut down the clock name length * clk-samsung: clk: samsung: Add bus clock for GPU/G3D on Exynos4412 clk: samsung: add new clocks for DMC for Exynos5422 SoC clk: samsung: add BPLL rate table for Exynos 5422 SoC clk: samsung: add needed IDs for DMC clocks in Exynos5420 clk: samsung: exynos5433: Use of_clk_get_parent_count() * clk-imx: (38 commits) clk: imx8mq: Keep uart clocks on during system boot clk: imx: Remove __init for imx_register_uart_clocks() API clk: imx6q: fix section mismatch warning clk: imx8mq: Use devm_platform_ioremap_resource() instead of of_iomap() clk: imx8mq: Use imx_check_clocks() API directly clk: imx: Remove __init for imx_check_clocks() API clk: imx6sll: Switch to clk_hw based API clk: imx7d: Switch to clk_hw based API clk: imx6ul: Switch to clk_hw based API clk: imx6sx: Switch to clk_hw based API clk: imx6q: Switch to clk_hw based API clk: imx6sl: Switch to clk_hw based API clk: imx: Switch wrappers to clk_hw based API clk: imx: clk-fixup-mux: Switch to clk_hw based API clk: imx: clk-fixup-div: Switch to clk_hw based API clk: imx: clk-gate-exclusive: Switch to clk_hw based API clk: imx: clk-pfd: Switch to clk_hw based API clk: imx: clk-pllv3: Switch to clk_hw based API clk: imx: clk-gate2: Switch to clk_hw based API clk: imx: clk-cpu: Switch to clk_hw based API ... * clk-allwinner: (29 commits) clk: Simplify debugfs printing and add a newline clk: sunxi-ng: sun8i-r: Use local parent references for SUNXI_CCU_GATE clk: sunxi-ng: a80-usb: Use local parent references for SUNXI_CCU_GATE clk: sunxi-ng: gate: Add macros for referencing local clock parents clk: sunxi-ng: h6-r: Use local parent references for CLK_FIXED_FACTOR clk: sunxi-ng: h6: Use local parent references for CLK_FIXED_FACTOR clk: sunxi-ng: a64: Use local parent references for CLK_FIXED_FACTOR clk: sunxi-ng: f1c100s: Use local parent references for CLK_FIXED_FACTOR clk: sunxi-ng: sun8i-r: Use local parent references for CLK_FIXED_FACTOR clk: sunxi-ng: v3s: Use local parent references for CLK_FIXED_FACTOR clk: sunxi-ng: r40: Use local parent references for CLK_FIXED_FACTOR clk: sunxi-ng: h3: Use local parent references for CLK_FIXED_FACTOR clk: sunxi-ng: a33: Use local parent references for CLK_FIXED_FACTOR clk: sunxi-ng: a23: Use local parent references for CLK_FIXED_FACTOR clk: sunxi-ng: a31: Use local parent references for CLK_FIXED_FACTOR clk: sunxi-ng: sun5i: Use local parent references for CLK_FIXED_FACTOR clk: sunxi-ng: a10: Use local parent references for CLK_FIXED_FACTOR clk: sunxi-ng: sun8i-r: Use local parent references for CLK_HW_INIT_* clk: sunxi-ng: switch to of_clk_hw_register() for registering clks clk: fixed-factor: Add CLK_FIXED_FACTOR_FW_NAME for DT clock-names parent ... commit 1f5d580cabc6bdc595116f4ca16cfb226f2b8b5c Merge: b6bb2bc2fd15 f02fba3aa8fe 4abf9adc12c6 e5bbbff5b7d7 ce9a1046434c afa88bdbf193 Author: Stephen Boyd Date: Fri Jul 12 11:10:52 2019 -0700 Merge branches 'clk-qcom-gdsc-warn', 'clk-ingenic', 'clk-qcom-qcs404-reset', 'clk-xgene-limit' and 'clk-meson' into clk-next * clk-qcom-gdsc-warn: clk: qcom: gdsc: WARN when failing to toggle * clk-ingenic: MIPS: Remove dead code clk: ingenic: Remove unused functions MIPS: jz4740: PM: Let CGU driver suspend clocks and set sleep mode clk: ingenic: Handle setting the Low-Power Mode bit clk: ingenic: Add missing header in cgu.h clk: ingenic/jz4725b: Fix "pll half" divider not read/written properly clk: ingenic/jz4725b: Fix incorrect dividers for main clocks clk: ingenic/jz4770: Fix incorrect dividers for main clocks clk: ingenic/jz4740: Fix incorrect dividers for main clocks clk: ingenic: Add support for divider tables * clk-qcom-qcs404-reset: clk: gcc-qcs404: Add PCIe resets * clk-xgene-limit: clk: xgene: Don't build COMMON_CLK_XGENE by default * clk-meson: clk: meson: g12a: mark fclk_div3 as critical clk: meson: g12a: Add support for G12B CPUB clocks dt-bindings: clk: meson: add g12b periph clock controller bindings clk: meson-g12a: add temperature sensor clocks dt-bindings: clk: g12a-clkc: add Temperature Sensor clock IDs clk: meson: meson8b: add the cts_i958 clock clk: meson: meson8b: add the cts_mclk_i958 clocks clk: meson: meson8b: add the cts_amclk clocks dt-bindings: clock: meson8b: add the audio clocks clk: meson: g12a: add controller register init clk: meson: eeclk: add init regs clk: meson: g12a: add mpll register init sequences clk: meson: mpll: add init callback and regs clk: meson: axg: spread spectrum is on mpll2 clk: meson: gxbb: no spread spectrum on mpll0 clk: meson: mpll: properly handle spread spectrum clk: meson: meson8b: fix a typo in the VPU parent names array variable clk: meson: fix MPLL 50M binding id typo commit b6bb2bc2fd15fefabc7c82d3542e6537a5d9e7db Merge: 4c34282fb7d7 789bc177f828 860690a93ef2 072a551fd5cf 5b68f22c3e13 Author: Stephen Boyd Date: Fri Jul 12 11:10:43 2019 -0700 Merge branches 'clk-pwm-duty', 'clk-bcm', 'clk-mtk', 'clk-qcom-msm8998-gpu' and 'clk-renesas' into clk-next - Add support to get duty cycle of generic pwm clks * clk-pwm-duty: clk: pwm: implement the .get_duty_cycle callback * clk-bcm: clk: bcm: Allow CLK_BCM2835 for ARCH_BRCMSTB clk: bcm: Make BCM2835 clock drivers selectable * clk-mtk: clk: mediatek: Remove MT8183 unused clock clk: mediatek: add audsys clock driver for MT8516 dt-bindings: mediatek: audsys: add support for MT8516 * clk-qcom-msm8998-gpu: dt-bindings: clock: Document gpucc for msm8998 * clk-renesas: clk: renesas: cpg-mssr: Use [] to denote a flexible array member clk: renesas: cpg-mssr: Combine driver-private and clock array allocation clk: renesas: mstp: Combine group-private and clock array allocation clk: renesas: div6: Combine clock-private and parent array allocation clk: renesas: cpg-mssr: Update kerneldoc for struct cpg_mssr_priv clk: renesas: r8a774a1: Add TMU clock clk: renesas: r8a77995: Add CMM clocks clk: renesas: r8a77990: Add CMM clocks clk: renesas: r8a77965: Add CMM clocks clk: renesas: r8a7795: Add CMM clocks clk: renesas: r9a06g032: Add clock domain support dt-bindings: clock: renesas: r9a06g032-sysctrl: Document power Domains clk: renesas: mstp: Remove error messages on out-of-memory conditions clk: renesas: cpg-mssr: Remove error messages on out-of-memory conditions clk: renesas: cpg-mssr: Use genpd of_node instead of local copy clk: renesas: r8a7796: Add CMM clocks clk: renesas: r8a779{5|6|65}: Add TPU clock commit 55692cedf3af29039381e3dbf1b598ab21709d1e Merge: a188339ca5a3 794e94ca8345 Author: Stephen Boyd Date: Fri Jul 12 11:07:23 2019 -0700 Merge tag 'v5.3-rockchip-clk1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into clk-rockchip Pull Rockchip clk driver updates from Heiko Stuebner: - New clock-ids+exports for two clocks - Cleanup for some boilerplate code for clocks we cannot really control from the kernel, but want to define separately to match the hardware-description (watchdog in secure-grf) - Improvement in mmc phase calculation and cleanup of some rate defintions * tag 'v5.3-rockchip-clk1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: clk: rockchip: export HDMIPHY clock on rk3228 clk: rockchip: add watchdog pclk on rk3328 clk: rockchip: add clock id for hdmi_phy special clock on rk3228 clk: rockchip: add clock id for watchdog pclk on rk3328 clk: rockchip: convert pclk_wdt boilerplat to new SGRF_GATE macro clk: rockchip: add a type from SGRF-controlled gate clocks clk: rockchip: Remove 48 MHz PLL rate from rk3288 clk: rockchip: add 1.464GHz cpu-clock rate to rk3228 clk: rockchip: Slightly more accurate math in rockchip_mmc_get_phase() clk: rockchip: Don't yell about bad mmc phases when getting clk: rockchip: Use clk_hw_get_rate() in MMC phase calculation commit 2c207985f354dfb549e5a543102a3e084eea81f6 Author: Tetsuo Handa Date: Thu Jul 11 21:00:34 2019 -0700 mm/oom_kill.c: remove redundant OOM score normalization in select_bad_process() Since commit bbbe48029720 ("mm, oom: remove 'prefer children over parent' heuristic") removed the "%s: Kill process %d (%s) score %u or sacrifice child\n" line, oc->chosen_points is no longer used after select_bad_process(). Link: http://lkml.kernel.org/r/1560853435-15575-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp Signed-off-by: Tetsuo Handa Acked-by: Michal Hocko Cc: Shakeel Butt Cc: Roman Gushchin Cc: Johannes Weiner Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/oom_kill.c | 2 -- 1 file changed, 2 deletions(-) commit ac311a14c682dcd8a120a6244d0542ec654e3d93 Author: Shakeel Butt Date: Thu Jul 11 21:00:31 2019 -0700 oom: decouple mems_allowed from oom_unkillable_task Commit ef08e3b4981a ("[PATCH] cpusets: confine oom_killer to mem_exclusive cpuset") introduces a heuristic where a potential oom-killer victim is skipped if the intersection of the potential victim and the current (the process triggered the oom) is empty based on the reason that killing such victim most probably will not help the current allocating process. However the commit 7887a3da753e ("[PATCH] oom: cpuset hint") changed the heuristic to just decrease the oom_badness scores of such potential victim based on the reason that the cpuset of such processes might have changed and previously they may have allocated memory on mems where the current allocating process can allocate from. Unintentionally 7887a3da753e ("[PATCH] oom: cpuset hint") introduced a side effect as the oom_badness is also exposed to the user space through /proc/[pid]/oom_score, so, readers with different cpusets can read different oom_score of the same process. Later, commit 6cf86ac6f36b ("oom: filter tasks not sharing the same cpuset") fixed the side effect introduced by 7887a3da753e by moving the cpuset intersection back to only oom-killer context and out of oom_badness. However the combination of ab290adbaf8f ("oom: make oom_unkillable_task() helper function") and 26ebc984913b ("oom: /proc//oom_score treat kernel thread honestly") unintentionally brought back the cpuset intersection check into the oom_badness calculation function. Other than doing cpuset/mempolicy intersection from oom_badness, the memcg oom context is also doing cpuset/mempolicy intersection which is quite wrong and is caught by syzcaller with the following report: kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 28426 Comm: syz-executor.5 Not tainted 5.2.0-rc3-next-20190607 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:__read_once_size include/linux/compiler.h:194 [inline] RIP: 0010:has_intersects_mems_allowed mm/oom_kill.c:84 [inline] RIP: 0010:oom_unkillable_task mm/oom_kill.c:168 [inline] RIP: 0010:oom_unkillable_task+0x180/0x400 mm/oom_kill.c:155 Code: c1 ea 03 80 3c 02 00 0f 85 80 02 00 00 4c 8b a3 10 07 00 00 48 b8 00 00 00 00 00 fc ff df 4d 8d 74 24 10 4c 89 f2 48 c1 ea 03 <80> 3c 02 00 0f 85 67 02 00 00 49 8b 44 24 10 4c 8d a0 68 fa ff ff RSP: 0018:ffff888000127490 EFLAGS: 00010a03 RAX: dffffc0000000000 RBX: ffff8880a4cd5438 RCX: ffffffff818dae9c RDX: 100000000c3cc602 RSI: ffffffff818dac8d RDI: 0000000000000001 RBP: ffff8880001274d0 R08: ffff888000086180 R09: ffffed1015d26be0 R10: ffffed1015d26bdf R11: ffff8880ae935efb R12: 8000000061e63007 R13: 0000000000000000 R14: 8000000061e63017 R15: 1ffff11000024ea6 FS: 00005555561f5940(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000607304 CR3: 000000009237e000 CR4: 00000000001426f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000600 Call Trace: oom_evaluate_task+0x49/0x520 mm/oom_kill.c:321 mem_cgroup_scan_tasks+0xcc/0x180 mm/memcontrol.c:1169 select_bad_process mm/oom_kill.c:374 [inline] out_of_memory mm/oom_kill.c:1088 [inline] out_of_memory+0x6b2/0x1280 mm/oom_kill.c:1035 mem_cgroup_out_of_memory+0x1ca/0x230 mm/memcontrol.c:1573 mem_cgroup_oom mm/memcontrol.c:1905 [inline] try_charge+0xfbe/0x1480 mm/memcontrol.c:2468 mem_cgroup_try_charge+0x24d/0x5e0 mm/memcontrol.c:6073 mem_cgroup_try_charge_delay+0x1f/0xa0 mm/memcontrol.c:6088 do_huge_pmd_wp_page_fallback+0x24f/0x1680 mm/huge_memory.c:1201 do_huge_pmd_wp_page+0x7fc/0x2160 mm/huge_memory.c:1359 wp_huge_pmd mm/memory.c:3793 [inline] __handle_mm_fault+0x164c/0x3eb0 mm/memory.c:4006 handle_mm_fault+0x3b7/0xa90 mm/memory.c:4053 do_user_addr_fault arch/x86/mm/fault.c:1455 [inline] __do_page_fault+0x5ef/0xda0 arch/x86/mm/fault.c:1521 do_page_fault+0x71/0x57d arch/x86/mm/fault.c:1552 page_fault+0x1e/0x30 arch/x86/entry/entry_64.S:1156 RIP: 0033:0x400590 Code: 06 e9 49 01 00 00 48 8b 44 24 10 48 0b 44 24 28 75 1f 48 8b 14 24 48 8b 7c 24 20 be 04 00 00 00 e8 f5 56 00 00 48 8b 74 24 08 <89> 06 e9 1e 01 00 00 48 8b 44 24 08 48 8b 14 24 be 04 00 00 00 8b RSP: 002b:00007fff7bc49780 EFLAGS: 00010206 RAX: 0000000000000001 RBX: 0000000000760000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 000000002000cffc RDI: 0000000000000001 RBP: fffffffffffffffe R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000075 R11: 0000000000000246 R12: 0000000000760008 R13: 00000000004c55f2 R14: 0000000000000000 R15: 00007fff7bc499b0 Modules linked in: ---[ end trace a65689219582ffff ]--- RIP: 0010:__read_once_size include/linux/compiler.h:194 [inline] RIP: 0010:has_intersects_mems_allowed mm/oom_kill.c:84 [inline] RIP: 0010:oom_unkillable_task mm/oom_kill.c:168 [inline] RIP: 0010:oom_unkillable_task+0x180/0x400 mm/oom_kill.c:155 Code: c1 ea 03 80 3c 02 00 0f 85 80 02 00 00 4c 8b a3 10 07 00 00 48 b8 00 00 00 00 00 fc ff df 4d 8d 74 24 10 4c 89 f2 48 c1 ea 03 <80> 3c 02 00 0f 85 67 02 00 00 49 8b 44 24 10 4c 8d a0 68 fa ff ff RSP: 0018:ffff888000127490 EFLAGS: 00010a03 RAX: dffffc0000000000 RBX: ffff8880a4cd5438 RCX: ffffffff818dae9c RDX: 100000000c3cc602 RSI: ffffffff818dac8d RDI: 0000000000000001 RBP: ffff8880001274d0 R08: ffff888000086180 R09: ffffed1015d26be0 R10: ffffed1015d26bdf R11: ffff8880ae935efb R12: 8000000061e63007 R13: 0000000000000000 R14: 8000000061e63017 R15: 1ffff11000024ea6 FS: 00005555561f5940(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b2f823000 CR3: 000000009237e000 CR4: 00000000001426f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000600 The fix is to decouple the cpuset/mempolicy intersection check from oom_unkillable_task() and make sure cpuset/mempolicy intersection check is only done in the global oom context. [shakeelb@google.com: change function name and update comment] Link: http://lkml.kernel.org/r/20190628152421.198994-3-shakeelb@google.com Link: http://lkml.kernel.org/r/20190624212631.87212-3-shakeelb@google.com Signed-off-by: Shakeel Butt Reported-by: syzbot+d0fc9d3c166bc5e4a94b@syzkaller.appspotmail.com Acked-by: Roman Gushchin Acked-by: Michal Hocko Cc: David Rientjes Cc: Johannes Weiner Cc: KOSAKI Motohiro Cc: Nick Piggin Cc: Paul Jackson Cc: Tetsuo Handa Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/base.c | 3 +-- include/linux/oom.h | 1 - mm/oom_kill.c | 57 ++++++++++++++++++++++++++++++----------------------- 3 files changed, 33 insertions(+), 28 deletions(-) commit 6ba749ee78ef42ffdf4b95c042fc574a37d229d9 Author: Shakeel Butt Date: Thu Jul 11 21:00:26 2019 -0700 mm, oom: remove redundant task_in_mem_cgroup() check oom_unkillable_task() can be called from three different contexts i.e. global OOM, memcg OOM and oom_score procfs interface. At the moment oom_unkillable_task() does a task_in_mem_cgroup() check on the given process. Since there is no reason to perform task_in_mem_cgroup() check for global OOM and oom_score procfs interface, those contexts provide NULL memcg and skips the task_in_mem_cgroup() check. However for memcg OOM context, the oom_unkillable_task() is always called from mem_cgroup_scan_tasks() and thus task_in_mem_cgroup() check becomes redundant and effectively dead code. So, just remove the task_in_mem_cgroup() check altogether. Link: http://lkml.kernel.org/r/20190624212631.87212-2-shakeelb@google.com Signed-off-by: Shakeel Butt Signed-off-by: Tetsuo Handa Acked-by: Roman Gushchin Acked-by: Michal Hocko Cc: David Rientjes Cc: Johannes Weiner Cc: KOSAKI Motohiro Cc: Nick Piggin Cc: Paul Jackson Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/base.c | 2 +- include/linux/memcontrol.h | 7 ------- include/linux/oom.h | 2 +- mm/memcontrol.c | 26 -------------------------- mm/oom_kill.c | 19 +++++++------------ 5 files changed, 9 insertions(+), 47 deletions(-) commit 5eee7e1cdb97123bb55ac14ccd3af8b6edc31537 Author: Shakeel Butt Date: Thu Jul 11 21:00:23 2019 -0700 mm, oom: refactor dump_tasks for memcg OOMs dump_tasks() traverses all the existing processes even for the memcg OOM context which is not only unnecessary but also wasteful. This imposes a long RCU critical section even from a contained context which can be quite disruptive. Change dump_tasks() to be aligned with select_bad_process and use mem_cgroup_scan_tasks to selectively traverse only processes of the target memcg hierarchy during memcg OOM. Link: http://lkml.kernel.org/r/20190617231207.160865-1-shakeelb@google.com Signed-off-by: Shakeel Butt Acked-by: Michal Hocko Acked-by: Roman Gushchin Cc: Johannes Weiner Cc: Tetsuo Handa Cc: Vladimir Davydov Cc: David Rientjes Cc: KOSAKI Motohiro Cc: Paul Jackson Cc: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/oom_kill.c | 68 +++++++++++++++++++++++++++++++++++------------------------ 1 file changed, 40 insertions(+), 28 deletions(-) commit f168a9a54ec39b3f832c353733898b713b6b5c1f Author: Tetsuo Handa Date: Thu Jul 11 21:00:20 2019 -0700 mm: memcontrol: use CSS_TASK_ITER_PROCS at mem_cgroup_scan_tasks() Since commit c03cd7738a83 ("cgroup: Include dying leaders with live threads in PROCS iterations") corrected how CSS_TASK_ITER_PROCS works, mem_cgroup_scan_tasks() can use CSS_TASK_ITER_PROCS in order to check only one thread from each thread group. [penguin-kernel@I-love.SAKURA.ne.jp: remove thread group leader check in oom_evaluate_task()] Link: http://lkml.kernel.org/r/1560853257-14934-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp Link: http://lkml.kernel.org/r/c763afc8-f0ae-756a-56a7-395f625b95fc@i-love.sakura.ne.jp Signed-off-by: Tetsuo Handa Acked-by: Michal Hocko Reviewed-by: Shakeel Butt Cc: Johannes Weiner Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memcontrol.c | 2 +- mm/oom_kill.c | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) commit 135e53514ef2cb200b616bf3fa4272cfa6c39291 Author: Jane Chu Date: Thu Jul 11 21:00:17 2019 -0700 mm/memory-failure.c: clarify error message Some user who install SIGBUS handler that does longjmp out therefore keeping the process alive is confused by the error message "[188988.765862] Memory failure: 0x1840200: Killing cellsrv:33395 due to hardware memory corruption" Slightly modify the error message to improve clarity. Link: http://lkml.kernel.org/r/1558403523-22079-1-git-send-email-jane.chu@oracle.com Signed-off-by: Jane Chu Acked-by: Naoya Horiguchi Acked-by: Pankaj Gupta Reviewed-by: Anshuman Khandual Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory-failure.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 97105f0ab7b877a8ece2005e214894e93793950c Author: Roman Gushchin Date: Thu Jul 11 21:00:13 2019 -0700 mm: vmalloc: show number of vmalloc pages in /proc/meminfo Vmalloc() is getting more and more used these days (kernel stacks, bpf and percpu allocator are new top users), and the total % of memory consumed by vmalloc() can be pretty significant and changes dynamically. /proc/meminfo is the best place to display this information: its top goal is to show top consumers of the memory. Since the VmallocUsed field in /proc/meminfo is not in use for quite a long time (it has been defined to 0 by a5ad88ce8c7f ("mm: get rid of 'vmalloc_info' from /proc/meminfo")), let's reuse it for showing the actual physical memory consumption of vmalloc(). Link: http://lkml.kernel.org/r/20190417194002.12369-3-guro@fb.com Signed-off-by: Roman Gushchin Acked-by: Johannes Weiner Acked-by: Vlastimil Babka Reviewed-by: Andrew Morton Cc: Matthew Wilcox Cc: Minchan Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/meminfo.c | 2 +- include/linux/vmalloc.h | 2 ++ mm/vmalloc.c | 10 ++++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) commit ee2ad71b0756e995fa4f6d922463e9bccd71b198 Author: Luigi Semenzato Date: Thu Jul 11 21:00:10 2019 -0700 mm: smaps: split PSS into components Report separate components (anon, file, and shmem) for PSS in smaps_rollup. This helps understand and tune the memory manager behavior in consumer devices, particularly mobile devices. Many of them (e.g. chromebooks and Android-based devices) use zram for anon memory, and perform disk reads for discarded file pages. The difference in latency is large (e.g. reading a single page from SSD is 30 times slower than decompressing a zram page on one popular device), thus it is useful to know how much of the PSS is anon vs. file. All the information is already present in /proc/pid/smaps, but much more expensive to obtain because of the large size of that procfs entry. This patch also removes a small code duplication in smaps_account, which would have gotten worse otherwise. Also updated Documentation/filesystems/proc.txt (the smaps section was a bit stale, and I added a smaps_rollup section) and Documentation/ABI/testing/procfs-smaps_rollup. [semenzato@chromium.org: v5] Link: http://lkml.kernel.org/r/20190626234333.44608-1-semenzato@chromium.org Link: http://lkml.kernel.org/r/20190626180429.174569-1-semenzato@chromium.org Signed-off-by: Luigi Semenzato Acked-by: Yu Zhao Cc: Sonny Rao Cc: Yu Zhao Cc: Brian Geffon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/ABI/testing/procfs-smaps_rollup | 14 +++- Documentation/filesystems/proc.txt | 41 +++++++++--- fs/proc/task_mmu.c | 92 ++++++++++++++++++--------- 3 files changed, 105 insertions(+), 42 deletions(-) commit 1e426fe28261b03f297992e89da3320b42816f4e Author: Konstantin Khlebnikov Date: Thu Jul 11 21:00:07 2019 -0700 mm: use down_read_killable for locking mmap_sem in access_remote_vm This function is used by ptrace and proc files like /proc/pid/cmdline and /proc/pid/environ. Access_remote_vm never returns error codes, all errors are ignored and only size of successfully read data is returned. So, if current task was killed we'll simply return 0 (bytes read). Mmap_sem could be locked for a long time or forever if something goes wrong. Using a killable lock permits cleanup of stuck tasks and simplifies investigation. Link: http://lkml.kernel.org/r/156007494202.3335.16782303099589302087.stgit@buzz Signed-off-by: Konstantin Khlebnikov Reviewed-by: Michal Koutný Acked-by: Oleg Nesterov Acked-by: Michal Hocko Cc: Alexey Dobriyan Cc: Matthew Wilcox Cc: Cyrill Gorcunov Cc: Kirill Tkhai Cc: Al Viro Cc: Roman Gushchin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory.c | 4 +++- mm/nommu.c | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) commit cd9e2bb8271c971d9f37c722be2616c7f8ba0664 Author: Konstantin Khlebnikov Date: Thu Jul 11 21:00:03 2019 -0700 proc: use down_read_killable mmap_sem for /proc/pid/map_files Do not remain stuck forever if something goes wrong. Using a killable lock permits cleanup of stuck tasks and simplifies investigation. It seems ->d_revalidate() could return any error (except ECHILD) to abort validation and pass error as result of lookup sequence. [akpm@linux-foundation.org: fix proc_map_files_lookup() return value, per Andrei] Link: http://lkml.kernel.org/r/156007493995.3335.9595044802115356911.stgit@buzz Signed-off-by: Konstantin Khlebnikov Reviewed-by: Roman Gushchin Reviewed-by: Cyrill Gorcunov Reviewed-by: Kirill Tkhai Acked-by: Michal Hocko Cc: Alexey Dobriyan Cc: Al Viro Cc: Matthew Wilcox Cc: Michal Koutný Cc: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/base.c | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) commit c46038017fbdcac627b670c9d4176f1d0c2f5fa3 Author: Konstantin Khlebnikov Date: Thu Jul 11 21:00:00 2019 -0700 proc: use down_read_killable mmap_sem for /proc/pid/clear_refs Do not remain stuck forever if something goes wrong. Using a killable lock permits cleanup of stuck tasks and simplifies investigation. Replace the only unkillable mmap_sem lock in clear_refs_write(). Link: http://lkml.kernel.org/r/156007493826.3335.5424884725467456239.stgit@buzz Signed-off-by: Konstantin Khlebnikov Reviewed-by: Roman Gushchin Reviewed-by: Cyrill Gorcunov Reviewed-by: Kirill Tkhai Acked-by: Michal Hocko Cc: Alexey Dobriyan Cc: Al Viro Cc: Matthew Wilcox Cc: Michal Koutný Cc: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/task_mmu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit ad80b932c57d85fd6377f97f359b025baf179a87 Author: Konstantin Khlebnikov Date: Thu Jul 11 20:59:56 2019 -0700 proc: use down_read_killable mmap_sem for /proc/pid/pagemap Do not remain stuck forever if something goes wrong. Using a killable lock permits cleanup of stuck tasks and simplifies investigation. Link: http://lkml.kernel.org/r/156007493638.3335.4872164955523928492.stgit@buzz Signed-off-by: Konstantin Khlebnikov Reviewed-by: Roman Gushchin Reviewed-by: Cyrill Gorcunov Reviewed-by: Kirill Tkhai Acked-by: Michal Hocko Cc: Alexey Dobriyan Cc: Al Viro Cc: Matthew Wilcox Cc: Michal Koutný Cc: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/task_mmu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit a26a97815548574213fd37f29b4b78ccc6d9ed20 Author: Konstantin Khlebnikov Date: Thu Jul 11 20:59:53 2019 -0700 proc: use down_read_killable mmap_sem for /proc/pid/smaps_rollup Do not remain stuck forever if something goes wrong. Using a killable lock permits cleanup of stuck tasks and simplifies investigation. Link: http://lkml.kernel.org/r/156007493429.3335.14666825072272692455.stgit@buzz Signed-off-by: Konstantin Khlebnikov Reviewed-by: Roman Gushchin Reviewed-by: Cyrill Gorcunov Reviewed-by: Kirill Tkhai Acked-by: Michal Hocko Cc: Alexey Dobriyan Cc: Al Viro Cc: Matthew Wilcox Cc: Michal Koutný Cc: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/task_mmu.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 8a713e7df3352b8d9392476e9cf29e4e185dac32 Author: Konstantin Khlebnikov Date: Thu Jul 11 20:59:50 2019 -0700 proc: use down_read_killable mmap_sem for /proc/pid/maps Do not remain stuck forever if something goes wrong. Using a killable lock permits cleanup of stuck tasks and simplifies investigation. This function is also used for /proc/pid/smaps. Link: http://lkml.kernel.org/r/156007493160.3335.14447544314127417266.stgit@buzz Signed-off-by: Konstantin Khlebnikov Reviewed-by: Roman Gushchin Reviewed-by: Cyrill Gorcunov Reviewed-by: Kirill Tkhai Acked-by: Michal Hocko Cc: Alexey Dobriyan Cc: Al Viro Cc: Matthew Wilcox Cc: Michal Koutný Cc: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/task_mmu.c | 6 +++++- fs/proc/task_nommu.c | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) commit cbf800d9c7fb38d953ba8ae1bd27a6382114c32e Author: Tobin C. Harding Date: Thu Jul 11 20:59:46 2019 -0700 tools/vm/slabinfo: add sorting info to help menu Passing more than one sorting option has undefined behaviour. Add an explicit statement as such to the help menu, this also has the advantage of highlighting all the sorting options. Link: http://lkml.kernel.org/r/20190426022622.4089-5-tobin@kernel.org Signed-off-by: Tobin C. Harding Cc: Alexander Duyck Cc: Brendan Gregg , Cc: Christoph Lameter Cc: David Rientjes Cc: Jesper Dangaard Brouer Cc: Joonsoo Kim Cc: Mel Gorman Cc: Michal Hocko Cc: Pekka Enberg Cc: Qian Cai Cc: Tejun Heo Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/vm/slabinfo.c | 2 ++ 1 file changed, 2 insertions(+) commit 53a83f9766e33d6bf4e14d5592c1939777fb98db Author: Tobin C. Harding Date: Thu Jul 11 20:59:42 2019 -0700 tools/vm/slabinfo: add option to sort by partial slabs We would like to get a better view of the level of fragmentation within the SLUB allocator. Total number of partial slabs is an indicator of fragmentation. Add a command line option (-P | --partial) to sort the slab list by total number of partial slabs. Link: http://lkml.kernel.org/r/20190426022622.4089-4-tobin@kernel.org Signed-off-by: Tobin C. Harding Cc: Alexander Duyck Cc: Brendan Gregg , Cc: Christoph Lameter Cc: David Rientjes Cc: Jesper Dangaard Brouer Cc: Joonsoo Kim Cc: Mel Gorman Cc: Michal Hocko Cc: Pekka Enberg Cc: Qian Cai Cc: Tejun Heo Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/vm/slabinfo.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 1106b205a3fe034beafad24045b7c00a7eb89669 Author: Tobin C. Harding Date: Thu Jul 11 20:59:38 2019 -0700 tools/vm/slabinfo: add partial slab listing to -X We would like to see how fragmented the SLUB allocator is, one window into fragmentation is the total number of partial slabs. Currently `slabinfo -X` shows slabs sorted by loss and by size. We can use this option to also show slabs sorted by number of partial slabs. Option '-X' can be used in conjunction with '-N' to control the number of slabs shown e.g. list of top 5 slabs: slabinfo -X -N5 Add list of slabs ordered by number of partial slabs to output of `slabinfo -X`. Link: http://lkml.kernel.org/r/20190426022622.4089-3-tobin@kernel.org Signed-off-by: Tobin C. Harding Cc: Alexander Duyck Cc: Brendan Gregg , Cc: Christoph Lameter Cc: David Rientjes Cc: Jesper Dangaard Brouer Cc: Joonsoo Kim Cc: Mel Gorman Cc: Michal Hocko Cc: Pekka Enberg Cc: Qian Cai Cc: Tejun Heo Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/vm/slabinfo.c | 41 ++++++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 13 deletions(-) commit d914999689609d45b36db2b0fabb05cf7fc1fa1f Author: Tobin C. Harding Date: Thu Jul 11 20:59:34 2019 -0700 tools/vm/slabinfo: order command line options During recent discussion on LKML over SLAB vs SLUB it was suggested by Jesper that it would be nice to have a tool to view the current fragmentation of the slab allocators. CC list for this set is taken from that thread. For SLUB we have all the information for this already exposed by the kernel and also we have a userspace tool for displaying this info: tools/vm/slabinfo.c Extend slabinfo to improve the fragmentation information by enabling sorting of caches by number of partial slabs. Also add cache list sorted in this manner to the output of `slabinfo -X`. This patch (of 4): get_opt() has a spurious character within the option string. Remove it and reorder the options in alphabetic order so that it is easier to keep the options correct. Use the same ordering for command help output and long option handling code. Link: http://lkml.kernel.org/r/20190426022622.4089-2-tobin@kernel.org Signed-off-by: Tobin C. Harding Cc: Jesper Dangaard Brouer Cc: Pekka Enberg Cc: Vlastimil Babka Cc: Christoph Lameter Cc: David Rientjes Cc: Joonsoo Kim Cc: Tejun Heo Cc: Qian Cai Cc: Mel Gorman Cc: Alexander Duyck Cc: Michal Hocko Cc: Brendan Gregg , Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/vm/slabinfo.c | 70 ++++++++++++++++++++++++++--------------------------- 1 file changed, 35 insertions(+), 35 deletions(-) commit 98879b3b9edc1604f2d1a6686576ef4d08ed3310 Author: Yang Shi Date: Thu Jul 11 20:59:30 2019 -0700 mm: vmscan: correct some vmscan counters for THP swapout Commit bd4c82c22c36 ("mm, THP, swap: delay splitting THP after swapped out"), THP can be swapped out in a whole. But, nr_reclaimed and some other vm counters still get inc'ed by one even though a whole THP (512 pages) gets swapped out. This doesn't make too much sense to memory reclaim. For example, direct reclaim may just need reclaim SWAP_CLUSTER_MAX pages, reclaiming one THP could fulfill it. But, if nr_reclaimed is not increased correctly, direct reclaim may just waste time to reclaim more pages, SWAP_CLUSTER_MAX * 512 pages in worst case. And, it may cause pgsteal_{kswapd|direct} is greater than pgscan_{kswapd|direct}, like the below: pgsteal_kswapd 122933 pgsteal_direct 26600225 pgscan_kswapd 174153 pgscan_direct 14678312 nr_reclaimed and nr_scanned must be fixed in parallel otherwise it would break some page reclaim logic, e.g. vmpressure: this looks at the scanned/reclaimed ratio so it won't change semantics as long as scanned & reclaimed are fixed in parallel. compaction/reclaim: compaction wants a certain number of physical pages freed up before going back to compacting. kswapd priority raising: kswapd raises priority if we scan fewer pages than the reclaim target (which itself is obviously expressed in order-0 pages). As a result, kswapd can falsely raise its aggressiveness even when it's making great progress. Other than nr_scanned and nr_reclaimed, some other counters, e.g. pgactivate, nr_skipped, nr_ref_keep and nr_unmap_fail need to be fixed too since they are user visible via cgroup, /proc/vmstat or trace points, otherwise they would be underreported. When isolating pages from LRUs, nr_taken has been accounted in base page, but nr_scanned and nr_skipped are still accounted in THP. It doesn't make too much sense too since this may cause trace point underreport the numbers as well. So accounting those counters in base page instead of accounting THP as one page. nr_dirty, nr_unqueued_dirty, nr_congested and nr_writeback are used by file cache, so they are not impacted by THP swap. This change may result in lower steal/scan ratio in some cases since THP may get split during page reclaim, then a part of tail pages get reclaimed instead of the whole 512 pages, but nr_scanned is accounted by 512, particularly for direct reclaim. But, this should be not a significant issue. Link: http://lkml.kernel.org/r/1559025859-72759-2-git-send-email-yang.shi@linux.alibaba.com Signed-off-by: Yang Shi Reviewed-by: "Huang, Ying" Cc: Johannes Weiner Cc: Michal Hocko Cc: Mel Gorman Cc: "Kirill A . Shutemov" Cc: Hugh Dickins Cc: Shakeel Butt Cc: Hillf Danton Cc: Josef Bacik Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmscan.c | 63 +++++++++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 49 insertions(+), 14 deletions(-) commit af5d440365894b5ca51f29866c1a01496dce52c4 Author: Yang Shi Date: Thu Jul 11 20:59:27 2019 -0700 mm: vmscan: remove double slab pressure by inc'ing sc->nr_scanned Commit 9092c71bb724 ("mm: use sc->priority for slab shrink targets") has broken up the relationship between sc->nr_scanned and slab pressure. The sc->nr_scanned can't double slab pressure anymore. So, it sounds no sense to still keep sc->nr_scanned inc'ed. Actually, it would prevent from adding pressure on slab shrink since excessive sc->nr_scanned would prevent from scan->priority raise. The bonnie test doesn't show this would change the behavior of slab shrinkers. w/ w/o /sec %CP /sec %CP Sequential delete: 3960.6 94.6 3997.6 96.2 Random delete: 2518 63.8 2561.6 64.6 The slight increase of "/sec" without the patch would be caused by the slight increase of CPU usage. Link: http://lkml.kernel.org/r/1559025859-72759-1-git-send-email-yang.shi@linux.alibaba.com Signed-off-by: Yang Shi Acked-by: Johannes Weiner Cc: Josef Bacik Cc: Michal Hocko Cc: Mel Gorman Cc: "Kirill A . Shutemov" Cc: Hugh Dickins Cc: Shakeel Butt Cc: Hillf Danton Cc: "Huang, Ying" Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmscan.c | 5 ----- 1 file changed, 5 deletions(-) commit 23a5c8cb7a91939cb08bc2dc880a7aa882bc6241 Author: Alexander Potapenko Date: Thu Jul 11 20:59:23 2019 -0700 mm: init: report memory auto-initialization features at boot time Print the currently enabled stack and heap initialization modes. Stack initialization is enabled by a config flag, while heap initialization is configured at boot time with defaults being set in the config. It's more convenient for the user to have all information about these hardening measures in one place at boot, so the user can reason about the expected behavior of the running system. The possible options for stack are: - "all" for CONFIG_INIT_STACK_ALL; - "byref_all" for CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL; - "byref" for CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF; - "__user" for CONFIG_GCC_PLUGIN_STRUCTLEAK_USER; - "off" otherwise. Depending on the values of init_on_alloc and init_on_free boottime options we also report "heap alloc" and "heap free" as "on"/"off". In the init_on_free mode initializing pages at boot time may take a while, so print a notice about that as well. This depends on how much memory is installed, the memory bandwidth, etc. On a relatively modern x86 system, it takes about 0.75s/GB to wipe all memory: [ 0.418722] mem auto-init: stack:byref_all, heap alloc:off, heap free:on [ 0.419765] mem auto-init: clearing system memory may take some time... [ 12.376605] Memory: 16408564K/16776672K available (14339K kernel code, 1397K rwdata, 3756K rodata, 1636K init, 11460K bss, 368108K reserved, 0K cma-reserved) Link: http://lkml.kernel.org/r/20190617151050.92663-3-glider@google.com Signed-off-by: Alexander Potapenko Suggested-by: Kees Cook Acked-by: Kees Cook Cc: Christoph Lameter Cc: Dmitry Vyukov Cc: James Morris Cc: Jann Horn Cc: Kostya Serebryany Cc: Laura Abbott Cc: Mark Rutland Cc: Masahiro Yamada Cc: Matthew Wilcox Cc: Nick Desaulniers Cc: Randy Dunlap Cc: Sandeep Patil Cc: "Serge E. Hallyn" Cc: Souptick Joarder Cc: Marco Elver Cc: Kaiwan N Billimoria Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds init/main.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 6471384af2a6530696fc0203bafe4de41a23c9ef Author: Alexander Potapenko Date: Thu Jul 11 20:59:19 2019 -0700 mm: security: introduce init_on_alloc=1 and init_on_free=1 boot options Patch series "add init_on_alloc/init_on_free boot options", v10. Provide init_on_alloc and init_on_free boot options. These are aimed at preventing possible information leaks and making the control-flow bugs that depend on uninitialized values more deterministic. Enabling either of the options guarantees that the memory returned by the page allocator and SL[AU]B is initialized with zeroes. SLOB allocator isn't supported at the moment, as its emulation of kmem caches complicates handling of SLAB_TYPESAFE_BY_RCU caches correctly. Enabling init_on_free also guarantees that pages and heap objects are initialized right after they're freed, so it won't be possible to access stale data by using a dangling pointer. As suggested by Michal Hocko, right now we don't let the heap users to disable initialization for certain allocations. There's not enough evidence that doing so can speed up real-life cases, and introducing ways to opt-out may result in things going out of control. This patch (of 2): The new options are needed to prevent possible information leaks and make control-flow bugs that depend on uninitialized values more deterministic. This is expected to be on-by-default on Android and Chrome OS. And it gives the opportunity for anyone else to use it under distros too via the boot args. (The init_on_free feature is regularly requested by folks where memory forensics is included in their threat models.) init_on_alloc=1 makes the kernel initialize newly allocated pages and heap objects with zeroes. Initialization is done at allocation time at the places where checks for __GFP_ZERO are performed. init_on_free=1 makes the kernel initialize freed pages and heap objects with zeroes upon their deletion. This helps to ensure sensitive data doesn't leak via use-after-free accesses. Both init_on_alloc=1 and init_on_free=1 guarantee that the allocator returns zeroed memory. The two exceptions are slab caches with constructors and SLAB_TYPESAFE_BY_RCU flag. Those are never zero-initialized to preserve their semantics. Both init_on_alloc and init_on_free default to zero, but those defaults can be overridden with CONFIG_INIT_ON_ALLOC_DEFAULT_ON and CONFIG_INIT_ON_FREE_DEFAULT_ON. If either SLUB poisoning or page poisoning is enabled, those options take precedence over init_on_alloc and init_on_free: initialization is only applied to unpoisoned allocations. Slowdown for the new features compared to init_on_free=0, init_on_alloc=0: hackbench, init_on_free=1: +7.62% sys time (st.err 0.74%) hackbench, init_on_alloc=1: +7.75% sys time (st.err 2.14%) Linux build with -j12, init_on_free=1: +8.38% wall time (st.err 0.39%) Linux build with -j12, init_on_free=1: +24.42% sys time (st.err 0.52%) Linux build with -j12, init_on_alloc=1: -0.13% wall time (st.err 0.42%) Linux build with -j12, init_on_alloc=1: +0.57% sys time (st.err 0.40%) The slowdown for init_on_free=0, init_on_alloc=0 compared to the baseline is within the standard error. The new features are also going to pave the way for hardware memory tagging (e.g. arm64's MTE), which will require both on_alloc and on_free hooks to set the tags for heap objects. With MTE, tagging will have the same cost as memory initialization. Although init_on_free is rather costly, there are paranoid use-cases where in-memory data lifetime is desired to be minimized. There are various arguments for/against the realism of the associated threat models, but given that we'll need the infrastructure for MTE anyway, and there are people who want wipe-on-free behavior no matter what the performance cost, it seems reasonable to include it in this series. [glider@google.com: v8] Link: http://lkml.kernel.org/r/20190626121943.131390-2-glider@google.com [glider@google.com: v9] Link: http://lkml.kernel.org/r/20190627130316.254309-2-glider@google.com [glider@google.com: v10] Link: http://lkml.kernel.org/r/20190628093131.199499-2-glider@google.com Link: http://lkml.kernel.org/r/20190617151050.92663-2-glider@google.com Signed-off-by: Alexander Potapenko Acked-by: Kees Cook Acked-by: Michal Hocko [page and dmapool parts Acked-by: James Morris ] Cc: Christoph Lameter Cc: Masahiro Yamada Cc: "Serge E. Hallyn" Cc: Nick Desaulniers Cc: Kostya Serebryany Cc: Dmitry Vyukov Cc: Sandeep Patil Cc: Laura Abbott Cc: Randy Dunlap Cc: Jann Horn Cc: Mark Rutland Cc: Marco Elver Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/admin-guide/kernel-parameters.txt | 9 ++++ drivers/infiniband/core/uverbs_ioctl.c | 2 +- include/linux/mm.h | 24 +++++++++ mm/dmapool.c | 4 +- mm/page_alloc.c | 71 ++++++++++++++++++++++--- mm/slab.c | 16 ++++-- mm/slab.h | 20 +++++++ mm/slub.c | 40 ++++++++++++-- net/core/sock.c | 2 +- security/Kconfig.hardening | 29 ++++++++++ 10 files changed, 199 insertions(+), 18 deletions(-) commit ba5c5e4a5da443e80a3722e67515de5e37375b18 Author: Kees Cook Date: Thu Jul 11 20:59:15 2019 -0700 arm64: move jump_label_init() before parse_early_param() While jump_label_init() was moved earlier in the boot process in efd9e03facd0 ("arm64: Use static keys for CPU features"), it wasn't early enough for early params to use it. The old state of things was as described here... init/main.c calls out to arch-specific things before general jump label and early param handling: asmlinkage __visible void __init start_kernel(void) { ... setup_arch(&command_line); ... smp_prepare_boot_cpu(); ... /* parameters may set static keys */ jump_label_init(); parse_early_param(); ... } x86 setup_arch() wants those earlier, so it handles jump label and early param: void __init setup_arch(char **cmdline_p) { ... jump_label_init(); ... parse_early_param(); ... } arm64 setup_arch() only had early param: void __init setup_arch(char **cmdline_p) { ... parse_early_param(); ... } with jump label later in smp_prepare_boot_cpu(): void __init smp_prepare_boot_cpu(void) { ... jump_label_init(); ... } This moves arm64 jump_label_init() from smp_prepare_boot_cpu() to setup_arch(), as done already on x86, in preparation from early param usage in the init_on_alloc/free() series: https://lkml.kernel.org/r/1561572949.5154.81.camel@lca.pw Link: http://lkml.kernel.org/r/201906271003.005303B52@keescook Signed-off-by: Kees Cook Acked-by: Ard Biesheuvel Acked-by: Catalin Marinas Cc: Alexander Potapenko Cc: Qian Cai Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm64/kernel/setup.c | 5 +++++ arch/arm64/kernel/smp.c | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) commit e03a5125ec7bd1d4e8b062816a8813436876dc7c Author: Nicholas Piggin Date: Thu Jul 11 20:59:12 2019 -0700 mm/large system hash: clear hashdist when only one node with memory is booted CONFIG_NUMA on 64-bit CPUs currently enables hashdist unconditionally even when booting on single node machines. This causes the large system hashes to be allocated with vmalloc, and mapped with small pages. This change clears hashdist if only one node has come up with memory. This results in the important large inode and dentry hashes using memblock allocations. All others are within 4MB size up to about 128GB of RAM, which allows them to be allocated from the linear map on most non-NUMA images. Other big hashes like futex and TCP should eventually be moved over to the same style of allocation as those vfs caches that use HASH_EARLY if !hashdist, so they don't exceed MAX_ORDER on very large non-NUMA images. This brings dTLB misses for linux kernel tree `git diff` from ~45,000 to ~8,000 on a Kaby Lake KVM guest with 8MB dentry hash and mitigations=off (performance is in the noise, under 1% difference, page tables are likely to be well cached for this workload). Link: http://lkml.kernel.org/r/20190605144814.29319-2-npiggin@gmail.com Signed-off-by: Nicholas Piggin Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) commit ec11408a1630eed2cb03db55b8b372267f5f1032 Author: Nicholas Piggin Date: Thu Jul 11 20:59:09 2019 -0700 mm/large system hash: use vmalloc for size > MAX_ORDER when !hashdist The kernel currently clamps large system hashes to MAX_ORDER when hashdist is not set, which is rather arbitrary. vmalloc space is limited on 32-bit machines, but this shouldn't result in much more used because of small physical memory limiting system hash sizes. Include "vmalloc" or "linear" in the kernel log message. Link: http://lkml.kernel.org/r/20190605144814.29319-1-npiggin@gmail.com Signed-off-by: Nicholas Piggin Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit d9009d67f42e59760aae5471ba2f62b3d5d531d1 Author: Geert Uytterhoeven Date: Thu Jul 11 20:59:06 2019 -0700 mm/vmalloc.c: spelling> s/informaion/information/ Link: http://lkml.kernel.org/r/20190607113509.15032-1-geert+renesas@glider.be Signed-off-by: Geert Uytterhoeven Reviewed-by: Andrew Morton Acked-by: Souptick Joarder Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmalloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 460e42d19a13d49455c5b269e8e0a1b1d522a895 Author: Uladzislau Rezki (Sony) Date: Thu Jul 11 20:59:03 2019 -0700 mm/vmalloc.c: switch to WARN_ON() and move it under unlink_va() Trigger a warning if an object that is about to be freed is detached. We used to have a BUG_ON(), but even though it is considered as faulty behaviour that is not a good reason to break a system. Link: http://lkml.kernel.org/r/20190606120411.8298-5-urezki@gmail.com Signed-off-by: Uladzislau Rezki (Sony) Cc: Roman Gushchin Cc: Hillf Danton Cc: Michal Hocko Cc: Matthew Wilcox Cc: Oleksiy Avramchenko Cc: Steven Rostedt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmalloc.c | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) commit 54f63d9d8a39118486eb8a7168cda5845240c3d2 Author: Uladzislau Rezki (Sony) Date: Thu Jul 11 20:59:00 2019 -0700 mm/vmalloc.c: get rid of one single unlink_va() when merge It does not make sense to try to "unlink" the node that is definitely not linked with a list nor tree. On the first merge step VA just points to the previously disconnected busy area. On the second step, check if the node has been merged and do "unlink" if so, because now it points to an object that must be linked. Link: http://lkml.kernel.org/r/20190606120411.8298-4-urezki@gmail.com Signed-off-by: Uladzislau Rezki (Sony) Acked-by: Hillf Danton Reviewed-by: Roman Gushchin Cc: Matthew Wilcox Cc: Michal Hocko Cc: Oleksiy Avramchenko Cc: Steven Rostedt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmalloc.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 82dd23e84be3ead53b6d584d836f51852d1096e6 Author: Uladzislau Rezki (Sony) Date: Thu Jul 11 20:58:57 2019 -0700 mm/vmalloc.c: preload a CPU with one object for split purpose Refactor the NE_FIT_TYPE split case when it comes to an allocation of one extra object. We need it in order to build a remaining space. The preload is done per CPU in non-atomic context with GFP_KERNEL flags. More permissive parameters can be beneficial for systems which are suffer from high memory pressure or low memory condition. For example on my KVM system(4xCPUs, no swap, 256MB RAM) i can simulate the failure of page allocation with GFP_NOWAIT flags. Using "stress-ng" tool and starting N workers spinning on fork() and exit(), i can trigger below trace: [ 179.815161] stress-ng-fork: page allocation failure: order:0, mode:0x40800(GFP_NOWAIT|__GFP_COMP), nodemask=(null),cpuset=/,mems_allowed=0 [ 179.815168] CPU: 0 PID: 12612 Comm: stress-ng-fork Not tainted 5.2.0-rc3+ #1003 [ 179.815170] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014 [ 179.815171] Call Trace: [ 179.815178] dump_stack+0x5c/0x7b [ 179.815182] warn_alloc+0x108/0x190 [ 179.815187] __alloc_pages_slowpath+0xdc7/0xdf0 [ 179.815191] __alloc_pages_nodemask+0x2de/0x330 [ 179.815194] cache_grow_begin+0x77/0x420 [ 179.815197] fallback_alloc+0x161/0x200 [ 179.815200] kmem_cache_alloc+0x1c9/0x570 [ 179.815202] alloc_vmap_area+0x32c/0x990 [ 179.815206] __get_vm_area_node+0xb0/0x170 [ 179.815208] __vmalloc_node_range+0x6d/0x230 [ 179.815211] ? _do_fork+0xce/0x3d0 [ 179.815213] copy_process.part.46+0x850/0x1b90 [ 179.815215] ? _do_fork+0xce/0x3d0 [ 179.815219] _do_fork+0xce/0x3d0 [ 179.815226] ? __do_page_fault+0x2bf/0x4e0 [ 179.815229] do_syscall_64+0x55/0x130 [ 179.815231] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 179.815234] RIP: 0033:0x7fedec4c738b ... [ 179.815237] RSP: 002b:00007ffda469d730 EFLAGS: 00000246 ORIG_RAX: 0000000000000038 [ 179.815239] RAX: ffffffffffffffda RBX: 00007ffda469d730 RCX: 00007fedec4c738b [ 179.815240] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000001200011 [ 179.815241] RBP: 00007ffda469d780 R08: 00007fededd6e300 R09: 00007ffda47f50a0 [ 179.815242] R10: 00007fededd6e5d0 R11: 0000000000000246 R12: 0000000000000000 [ 179.815243] R13: 0000000000000020 R14: 0000000000000000 R15: 0000000000000000 [ 179.815245] Mem-Info: [ 179.815249] active_anon:12686 inactive_anon:14760 isolated_anon:0 active_file:502 inactive_file:61 isolated_file:70 unevictable:2 dirty:0 writeback:0 unstable:0 slab_reclaimable:2380 slab_unreclaimable:7520 mapped:15069 shmem:14813 pagetables:10833 bounce:0 free:1922 free_pcp:229 free_cma:0 Link: http://lkml.kernel.org/r/20190606120411.8298-3-urezki@gmail.com Signed-off-by: Uladzislau Rezki (Sony) Cc: Hillf Danton Cc: Matthew Wilcox Cc: Michal Hocko Cc: Oleksiy Avramchenko Cc: Roman Gushchin Cc: Steven Rostedt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmalloc.c | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 51 insertions(+), 4 deletions(-) commit cacca6baf0b0a2dfe8eb3430b5f81916f35284cc Author: Uladzislau Rezki (Sony) Date: Thu Jul 11 20:58:53 2019 -0700 mm/vmalloc.c: remove "node" argument Patch series "Some cleanups for the KVA/vmalloc", v5. This patch (of 4): Remove unused argument from the __alloc_vmap_area() function. Link: http://lkml.kernel.org/r/20190606120411.8298-2-urezki@gmail.com Signed-off-by: Uladzislau Rezki (Sony) Reviewed-by: Andrew Morton Reviewed-by: Roman Gushchin Cc: Hillf Danton Cc: Matthew Wilcox Cc: Michal Hocko Cc: Oleksiy Avramchenko Cc: Steven Rostedt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmalloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 543bdb2d825fe2400d6e951f1786d92139a16931 Author: Jean-Philippe Brucker Date: Thu Jul 11 20:58:50 2019 -0700 mm/mmu_notifier: use hlist_add_head_rcu() Make mmu_notifier_register() safer by issuing a memory barrier before registering a new notifier. This fixes a theoretical bug on weakly ordered CPUs. For example, take this simplified use of notifiers by a driver: my_struct->mn.ops = &my_ops; /* (1) */ mmu_notifier_register(&my_struct->mn, mm) ... hlist_add_head(&mn->hlist, &mm->mmu_notifiers); /* (2) */ ... Once mmu_notifier_register() releases the mm locks, another thread can invalidate a range: mmu_notifier_invalidate_range() ... hlist_for_each_entry_rcu(mn, &mm->mmu_notifiers, hlist) { if (mn->ops->invalidate_range) The read side relies on the data dependency between mn and ops to ensure that the pointer is properly initialized. But the write side doesn't have any dependency between (1) and (2), so they could be reordered and the readers could dereference an invalid mn->ops. mmu_notifier_register() does take all the mm locks before adding to the hlist, but those have acquire semantics which isn't sufficient. By calling hlist_add_head_rcu() instead of hlist_add_head() we update the hlist using a store-release, ensuring that readers see prior initialization of my_struct. This situation is better illustated by litmus test MP+onceassign+derefonce. Link: http://lkml.kernel.org/r/20190502133532.24981-1-jean-philippe.brucker@arm.com Fixes: cddb8a5c14aa ("mmu-notifiers: core") Signed-off-by: Jean-Philippe Brucker Cc: Jérôme Glisse Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mmu_notifier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 96756fcb831ddec3ad15f3a107b6e2749084aafb Author: Miguel Ojeda Date: Thu Jul 11 20:58:47 2019 -0700 mm/memory.c: fail when offset == num in first check of __vm_map_pages() If the caller asks us for offset == num, we should already fail in the first check, i.e. the one testing for offsets beyond the object. At the moment, we are failing on the second test anyway, since count cannot be 0. Still, to agree with the comment of the first test, we should first test it there. Link: http://lkml.kernel.org/r/20190528193004.GA7744@gmail.com Signed-off-by: Miguel Ojeda Reviewed-by: Andrew Morton Cc: Souptick Joarder Cc: Matthew Wilcox Cc: Peter Zijlstra Cc: "Aneesh Kumar K.V" Cc: Huang Ying Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8b1e0f81fb6fcf3109465a168b2e2da3f711fa86 Author: Anshuman Khandual Date: Thu Jul 11 20:58:43 2019 -0700 mm/pgtable: drop pgtable_t variable from pte_fn_t functions Drop the pgtable_t variable from all implementation for pte_fn_t as none of them use it. apply_to_pte_range() should stop computing it as well. Should help us save some cycles. Link: http://lkml.kernel.org/r/1556803126-26596-1-git-send-email-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Acked-by: Matthew Wilcox Cc: Ard Biesheuvel Cc: Russell King Cc: Catalin Marinas Cc: Will Deacon Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Michal Hocko Cc: Logan Gunthorpe Cc: "Kirill A. Shutemov" Cc: Dan Williams Cc: Cc: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm/kernel/efi.c | 3 +-- arch/arm/mm/dma-mapping.c | 3 +-- arch/arm/mm/pageattr.c | 3 +-- arch/arm64/kernel/efi.c | 3 +-- arch/arm64/mm/pageattr.c | 3 +-- arch/x86/xen/mmu_pv.c | 3 +-- drivers/gpu/drm/i915/i915_mm.c | 3 +-- drivers/xen/gntdev.c | 6 ++---- drivers/xen/privcmd.c | 6 ++---- drivers/xen/xlate_mmu.c | 3 +-- include/linux/mm.h | 3 +-- mm/memory.c | 5 +---- mm/vmalloc.c | 2 +- 13 files changed, 15 insertions(+), 31 deletions(-) commit c2471e79a7ea0f48e3ae9253e1f3688a44cc944d Author: Mike Rapoport Date: Thu Jul 11 20:58:39 2019 -0700 unicore32: switch to generic version of pte allocation Replace __get_free_page() and alloc_pages() calls with the generic __pte_alloc_one_kernel() and __pte_alloc_one(). There is no functional change for the kernel PTE allocation. The difference for the user PTEs, is that the clear_pte_table() is now called after pgtable_page_ctor() and the addition of __GFP_ACCOUNT to the GFP flags. The pte_free() and pte_free_kernel() versions are identical to the generic ones and can be simply dropped. Link: http://lkml.kernel.org/r/1557296232-15361-15-git-send-email-rppt@linux.ibm.com Signed-off-by: Mike Rapoport Cc: Arnd Bergmann Cc: Anshuman Khandual Cc: Catalin Marinas Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Guan Xuetao Cc: Guo Ren Cc: Helge Deller Cc: Ley Foon Tan Cc: Matthew Wilcox Cc: Matt Turner Cc: Michael Ellerman Cc: Michal Hocko Cc: Palmer Dabbelt Cc: Paul Burton Cc: Richard Kuo Cc: Richard Weinberger Cc: Russell King Cc: Sam Creasey Cc: Ralf Baechle Cc: Vincent Chen Cc: Albert Ou Cc: Anton Ivanov Cc: Guo Ren Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/unicore32/include/asm/pgalloc.h | 36 ++++++++---------------------------- 1 file changed, 8 insertions(+), 28 deletions(-) commit f32848e16939e1407ad3413f7faa3e0a8ad802eb Author: Mike Rapoport Date: Thu Jul 11 20:58:35 2019 -0700 um: switch to generic version of pte allocation um allocates PTE pages with __get_free_page() and uses GFP_KERNEL | __GFP_ZERO for the allocations. Switch it to the generic version that does exactly the same thing for the kernel page tables and adds __GFP_ACCOUNT for the user PTEs. The pte_free() and pte_free_kernel() versions are identical to the generic ones and can be simply dropped. Link: http://lkml.kernel.org/r/1557296232-15361-14-git-send-email-rppt@linux.ibm.com Signed-off-by: Mike Rapoport Reviewed-by: Anton Ivanov Acked-by: Anton Ivanov Cc: Albert Ou Cc: Anshuman Khandual Cc: Arnd Bergmann Cc: Catalin Marinas Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Guan Xuetao Cc: Guo Ren Cc: Guo Ren Cc: Helge Deller Cc: Ley Foon Tan Cc: Matthew Wilcox Cc: Matt Turner Cc: Michael Ellerman Cc: Michal Hocko Cc: Palmer Dabbelt Cc: Paul Burton Cc: Ralf Baechle Cc: Richard Kuo Cc: Richard Weinberger Cc: Russell King Cc: Sam Creasey Cc: Vincent Chen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/um/include/asm/pgalloc.h | 16 ++-------------- arch/um/kernel/mem.c | 22 ---------------------- 2 files changed, 2 insertions(+), 36 deletions(-) commit d1b46fe50c8b0e0b4035c48ccd5f655aa7ceea16 Author: Mike Rapoport Date: Thu Jul 11 20:58:31 2019 -0700 riscv: switch to generic version of pte allocation The only difference between the generic and RISC-V implementation of PTE allocation is the usage of __GFP_RETRY_MAYFAIL for both kernel and user PTEs and the absence of __GFP_ACCOUNT for the user PTEs. The conversion to the generic version removes the __GFP_RETRY_MAYFAIL and ensures that GFP_ACCOUNT is used for the user PTE allocations. The pte_free() and pte_free_kernel() versions are identical to the generic ones and can be simply dropped. Link: http://lkml.kernel.org/r/1557296232-15361-13-git-send-email-rppt@linux.ibm.com Signed-off-by: Mike Rapoport Reviewed-by: Palmer Dabbelt Cc: Albert Ou Cc: Anshuman Khandual Cc: Anton Ivanov Cc: Arnd Bergmann Cc: Catalin Marinas Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Guan Xuetao Cc: Guo Ren Cc: Guo Ren Cc: Helge Deller Cc: Ley Foon Tan Cc: Matthew Wilcox Cc: Matt Turner Cc: Michael Ellerman Cc: Michal Hocko Cc: Paul Burton Cc: Ralf Baechle Cc: Richard Kuo Cc: Richard Weinberger Cc: Russell King Cc: Sam Creasey Cc: Vincent Chen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/riscv/include/asm/pgalloc.h | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) commit 3f4a13085dd88cb806a2c64fb1286e9cf3a98cd0 Author: Mike Rapoport Date: Thu Jul 11 20:58:27 2019 -0700 parisc: switch to generic version of pte allocation parisc allocates PTE pages with __get_free_page() and uses GFP_KERNEL | __GFP_ZERO for the allocations. Switch it to the generic version that does exactly the same thing for the kernel page tables and adds __GFP_ACCOUNT for the user PTEs. The pte_free_kernel() and pte_free() versions on are identical to the generic ones and can be simply dropped. Link: http://lkml.kernel.org/r/1557296232-15361-12-git-send-email-rppt@linux.ibm.com Signed-off-by: Mike Rapoport Cc: Albert Ou Cc: Anshuman Khandual Cc: Anton Ivanov Cc: Arnd Bergmann Cc: Catalin Marinas Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Guan Xuetao Cc: Guo Ren Cc: Guo Ren Cc: Helge Deller Cc: Ley Foon Tan Cc: Matthew Wilcox Cc: Matt Turner Cc: Michael Ellerman Cc: Michal Hocko Cc: Palmer Dabbelt Cc: Paul Burton Cc: Ralf Baechle Cc: Richard Kuo Cc: Richard Weinberger Cc: Russell King Cc: Sam Creasey Cc: Vincent Chen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/parisc/include/asm/pgalloc.h | 33 ++------------------------------- 1 file changed, 2 insertions(+), 31 deletions(-) commit fc7835c2f8ea800ded22f68bd782cd17a6dd83cd Author: Mike Rapoport Date: Thu Jul 11 20:58:22 2019 -0700 nios2: switch to generic version of pte allocation nios2 allocates kernel PTE pages with __get_free_pages(GFP_KERNEL | __GFP_ZERO, PTE_ORDER); and user page tables with pte = alloc_pages(GFP_KERNEL, PTE_ORDER); if (pte) clear_highpage(); The PTE_ORDER is hardwired to zero, which makes nios2 implementation almost identical to the generic one. Switch nios2 to the generic version that does exactly the same thing for the kernel page tables and adds __GFP_ACCOUNT for the user PTEs. The pte_free_kernel() and pte_free() versions on nios2 are identical to the generic ones and can be simply dropped. Link: http://lkml.kernel.org/r/1557296232-15361-11-git-send-email-rppt@linux.ibm.com Signed-off-by: Mike Rapoport Cc: Albert Ou Cc: Anshuman Khandual Cc: Anton Ivanov Cc: Arnd Bergmann Cc: Catalin Marinas Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Guan Xuetao Cc: Guo Ren Cc: Guo Ren Cc: Helge Deller Cc: Ley Foon Tan Cc: Matthew Wilcox Cc: Matt Turner Cc: Michael Ellerman Cc: Michal Hocko Cc: Palmer Dabbelt Cc: Paul Burton Cc: Ralf Baechle Cc: Richard Kuo Cc: Richard Weinberger Cc: Russell King Cc: Sam Creasey Cc: Vincent Chen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/nios2/include/asm/pgalloc.h | 37 ++----------------------------------- 1 file changed, 2 insertions(+), 35 deletions(-) commit f52a8e1a67cde67c33d5c2eabd6494dcab956677 Author: Mike Rapoport Date: Thu Jul 11 20:58:18 2019 -0700 nds32: switch to generic version of pte allocation The nds32 implementation of pte_alloc_one_kernel() differs from the generic in the use of __GFP_RETRY_MAYFAIL flag, which is removed after the conversion. The nds32 version of pte_alloc_one() missed the call to pgtable_page_ctor() and also used __GFP_RETRY_MAYFAIL. Switching it to use generic __pte_alloc_one() for the PTE page allocation ensures that page table constructor is run and the user page tables are allocated with __GFP_ACCOUNT. The conversion to the generic version of pte_free_kernel() removes the NULL check for pte. The pte_free() version on nds32 is identical to the generic one and can be simply dropped. Link: http://lkml.kernel.org/r/1557296232-15361-10-git-send-email-rppt@linux.ibm.com Signed-off-by: Mike Rapoport Cc: Albert Ou Cc: Anshuman Khandual Cc: Anton Ivanov Cc: Arnd Bergmann Cc: Catalin Marinas Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Guan Xuetao Cc: Guo Ren Cc: Guo Ren Cc: Helge Deller Cc: Ley Foon Tan Cc: Matthew Wilcox Cc: Matt Turner Cc: Michael Ellerman Cc: Michal Hocko Cc: Palmer Dabbelt Cc: Paul Burton Cc: Ralf Baechle Cc: Richard Kuo Cc: Richard Weinberger Cc: Russell King Cc: Sam Creasey Cc: Vincent Chen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/nds32/include/asm/pgalloc.h | 31 ++++--------------------------- 1 file changed, 4 insertions(+), 27 deletions(-) commit b7902ce175476b767e6c614fded293faf906deee Author: Mike Rapoport Date: Thu Jul 11 20:58:14 2019 -0700 mips: switch to generic version of pte allocation MIPS allocates kernel PTE pages with __get_free_pages(GFP_KERNEL | __GFP_ZERO, PTE_ORDER) and user PTE pages with pte = alloc_pages(GFP_KERNEL, PTE_ORDER) and then uses clear_highpage(pte) to zero out the allocated page for the user page tables. The PTE_ORDER is hardwired to zero, which makes MIPS implementation almost identical to the generic one. Switch MIPS to the generic version that does exactly the same thing for the kernel page tables and adds __GFP_ACCOUNT for the user PTEs. The pte_free_kernel() and pte_free() versions on mips are identical to the generic ones and can be simply dropped. Link: http://lkml.kernel.org/r/1557296232-15361-9-git-send-email-rppt@linux.ibm.com Signed-off-by: Mike Rapoport Acked-by: Paul Burton Cc: Albert Ou Cc: Anshuman Khandual Cc: Anton Ivanov Cc: Arnd Bergmann Cc: Catalin Marinas Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Guan Xuetao Cc: Guo Ren Cc: Guo Ren Cc: Helge Deller Cc: Ley Foon Tan Cc: Matthew Wilcox Cc: Matt Turner Cc: Michael Ellerman Cc: Michal Hocko Cc: Palmer Dabbelt Cc: Ralf Baechle Cc: Richard Kuo Cc: Richard Weinberger Cc: Russell King Cc: Sam Creasey Cc: Vincent Chen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/mips/include/asm/pgalloc.h | 33 ++------------------------------- 1 file changed, 2 insertions(+), 31 deletions(-) commit 14c0a39c9af9a25e0f94f9be89431c2debb34f2c Author: Mike Rapoport Date: Thu Jul 11 20:58:10 2019 -0700 m68k: sun3: switch to generic version of pte allocation The sun3 MMU variant of m68k uses GFP_KERNEL to allocate a PTE page and then memset(0) or clear_highpage() to clear it. This is equivalent to allocating the page with GFP_KERNEL | __GFP_ZERO, which allows replacing sun3 implementation of pte_alloc_one() and pte_alloc_one_kernel() with the generic ones. The pte_free() and pte_free_kernel() versions are identical to the generic ones and can be simply dropped. Link: http://lkml.kernel.org/r/1557296232-15361-8-git-send-email-rppt@linux.ibm.com Signed-off-by: Mike Rapoport Cc: Albert Ou Cc: Anshuman Khandual Cc: Anton Ivanov Cc: Arnd Bergmann Cc: Catalin Marinas Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Guan Xuetao Cc: Guo Ren Cc: Guo Ren Cc: Helge Deller Cc: Ley Foon Tan Cc: Matthew Wilcox Cc: Matt Turner Cc: Michael Ellerman Cc: Michal Hocko Cc: Palmer Dabbelt Cc: Paul Burton Cc: Ralf Baechle Cc: Richard Kuo Cc: Richard Weinberger Cc: Russell King Cc: Sam Creasey Cc: Vincent Chen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/m68k/include/asm/sun3_pgalloc.h | 41 ++---------------------------------- 1 file changed, 2 insertions(+), 39 deletions(-) commit bd5ff066514c2dcffd443cfaa55580db0f19caf8 Author: Mike Rapoport Date: Thu Jul 11 20:58:06 2019 -0700 csky: switch to generic version of pte allocation The csky implementation pte_alloc_one(), pte_free_kernel() and pte_free() is identical to the generic except of lack of __GFP_ACCOUNT for the user PTEs allocation. Switch csky to use generic version of these functions. The csky implementation of pte_alloc_one_kernel() is not replaced because it does not clear the allocated page but rather sets each PTE in it to a non-zero value. The pte_free_kernel() and pte_free() versions on csky are identical to the generic ones and can be simply dropped. Link: http://lkml.kernel.org/r/1557296232-15361-6-git-send-email-rppt@linux.ibm.com Signed-off-by: Mike Rapoport Acked-by: Guo Ren Cc: Albert Ou Cc: Anshuman Khandual Cc: Anton Ivanov Cc: Arnd Bergmann Cc: Catalin Marinas Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Guan Xuetao Cc: Guo Ren Cc: Helge Deller Cc: Ley Foon Tan Cc: Matthew Wilcox Cc: Matt Turner Cc: Michael Ellerman Cc: Michal Hocko Cc: Palmer Dabbelt Cc: Paul Burton Cc: Ralf Baechle Cc: Richard Kuo Cc: Richard Weinberger Cc: Russell King Cc: Sam Creasey Cc: Vincent Chen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/csky/include/asm/pgalloc.h | 30 +++--------------------------- 1 file changed, 3 insertions(+), 27 deletions(-) commit 50f11a8a4620eee6b6831e69ab5d42456546d7d8 Author: Mike Rapoport Date: Thu Jul 11 20:58:02 2019 -0700 arm64: switch to generic version of pte allocation The PTE allocations in arm64 are identical to the generic ones modulo the GFP flags. Using the generic pte_alloc_one() functions ensures that the user page tables are allocated with __GFP_ACCOUNT set. The arm64 definition of PGALLOC_GFP is removed and replaced with GFP_PGTABLE_USER for p[gum]d_alloc_one() for the user page tables and GFP_PGTABLE_KERNEL for the kernel page tables. The KVM memory cache is now using GFP_PGTABLE_USER. The mappings created with create_pgd_mapping() are now using GFP_PGTABLE_KERNEL. The conversion to the generic version of pte_free_kernel() removes the NULL check for pte. The pte_free() version on arm64 is identical to the generic one and can be simply dropped. [cai@lca.pw: fix a bogus GFP flag in pgd_alloc()] Link: https://lore.kernel.org/r/1559656836-24940-1-git-send-email-cai@lca.pw/ [and fix it more] Link: https://lore.kernel.org/linux-mm/20190617151252.GF16810@rapoport-lnx/ Link: http://lkml.kernel.org/r/1557296232-15361-5-git-send-email-rppt@linux.ibm.com Signed-off-by: Mike Rapoport Cc: Albert Ou Cc: Anshuman Khandual Cc: Anton Ivanov Cc: Arnd Bergmann Cc: Catalin Marinas Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Guan Xuetao Cc: Guo Ren Cc: Guo Ren Cc: Helge Deller Cc: Ley Foon Tan Cc: Matthew Wilcox Cc: Matt Turner Cc: Michael Ellerman Cc: Michal Hocko Cc: Palmer Dabbelt Cc: Paul Burton Cc: Ralf Baechle Cc: Richard Kuo Cc: Richard Weinberger Cc: Russell King Cc: Sam Creasey Cc: Vincent Chen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm64/include/asm/pgalloc.h | 47 +++++++--------------------------------- arch/arm64/mm/mmu.c | 2 +- arch/arm64/mm/pgd.c | 6 +++-- virt/kvm/arm/mmu.c | 2 +- 4 files changed, 14 insertions(+), 43 deletions(-) commit 28bcf5937536062d96ee0b581a76a0b1b652eec6 Author: Mike Rapoport Date: Thu Jul 11 20:57:57 2019 -0700 arm: switch to generic version of pte allocation Replace __get_free_page() and alloc_pages() calls with the generic __pte_alloc_one_kernel() and __pte_alloc_one(). There is no functional change for the kernel PTE allocation. The difference for the user PTEs, is that the clear_pte_table() is now called after pgtable_page_ctor() and the addition of __GFP_ACCOUNT to the GFP flags. The conversion to the generic version of pte_free_kernel() removes the NULL check for pte. The pte_free() version on arm is identical to the generic one and can be simply dropped. Link: http://lkml.kernel.org/r/1557296232-15361-4-git-send-email-rppt@linux.ibm.com Signed-off-by: Mike Rapoport Cc: Albert Ou Cc: Anshuman Khandual Cc: Anton Ivanov Cc: Arnd Bergmann Cc: Catalin Marinas Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Guan Xuetao Cc: Guo Ren Cc: Guo Ren Cc: Helge Deller Cc: Ley Foon Tan Cc: Matthew Wilcox Cc: Matt Turner Cc: Michael Ellerman Cc: Michal Hocko Cc: Palmer Dabbelt Cc: Paul Burton Cc: Ralf Baechle Cc: Richard Kuo Cc: Richard Weinberger Cc: Russell King Cc: Sam Creasey Cc: Vincent Chen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm/include/asm/pgalloc.h | 41 +++++++++++++---------------------------- arch/arm/mm/mmu.c | 2 +- 2 files changed, 14 insertions(+), 29 deletions(-) commit bc3ace9b520f97d5650d096a5f95cac3fa64e204 Author: Mike Rapoport Date: Thu Jul 11 20:57:53 2019 -0700 alpha: switch to generic version of pte allocation alpha allocates PTE pages with __get_free_page() and uses GFP_KERNEL | __GFP_ZERO for the allocations. Switch it to the generic version that does exactly the same thing for the kernel page tables and adds __GFP_ACCOUNT for the user PTEs. The alpha pte_free() and pte_free_kernel() versions are identical to the generic ones and can be simply dropped. Link: http://lkml.kernel.org/r/1557296232-15361-3-git-send-email-rppt@linux.ibm.com Signed-off-by: Mike Rapoport Cc: Albert Ou Cc: Anshuman Khandual Cc: Anton Ivanov Cc: Arnd Bergmann Cc: Catalin Marinas Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Guan Xuetao Cc: Guo Ren Cc: Guo Ren Cc: Helge Deller Cc: Ley Foon Tan Cc: Matthew Wilcox Cc: Matt Turner Cc: Michael Ellerman Cc: Michal Hocko Cc: Palmer Dabbelt Cc: Paul Burton Cc: Ralf Baechle Cc: Richard Kuo Cc: Richard Weinberger Cc: Russell King Cc: Sam Creasey Cc: Vincent Chen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/alpha/include/asm/pgalloc.h | 40 +++------------------------------------- 1 file changed, 3 insertions(+), 37 deletions(-) commit 5fba4af4456b5d3f982d4ac1c879d16b36aaa0fb Author: Mike Rapoport Date: Thu Jul 11 20:57:49 2019 -0700 asm-generic, x86: introduce generic pte_{alloc,free}_one[_kernel] Most architectures have identical or very similar implementation of pte_alloc_one_kernel(), pte_alloc_one(), pte_free_kernel() and pte_free(). Add a generic implementation that can be reused across architectures and enable its use on x86. The generic implementation uses GFP_KERNEL | __GFP_ZERO for the kernel page tables and GFP_KERNEL | __GFP_ZERO | __GFP_ACCOUNT for the user page tables. The "base" functions for PTE allocation, namely __pte_alloc_one_kernel() and __pte_alloc_one() are intended for the architectures that require additional actions after actual memory allocation or must use non-default GFP flags. x86 is switched to use generic pte_alloc_one_kernel(), pte_free_kernel() and pte_free(). x86 still implements pte_alloc_one() to allow run-time control of GFP flags required for "userpte" command line option. Link: http://lkml.kernel.org/r/1557296232-15361-2-git-send-email-rppt@linux.ibm.com Signed-off-by: Mike Rapoport Cc: Albert Ou Cc: Anshuman Khandual Cc: Anton Ivanov Cc: Arnd Bergmann Cc: Catalin Marinas Cc: Geert Uytterhoeven Cc: Greentime Hu Cc: Guan Xuetao Cc: Guo Ren Cc: Guo Ren Cc: Helge Deller Cc: Ley Foon Tan Cc: Matthew Wilcox Cc: Matt Turner Cc: Michael Ellerman Cc: Michal Hocko Cc: Palmer Dabbelt Cc: Paul Burton Cc: Ralf Baechle Cc: Richard Kuo Cc: Richard Weinberger Cc: Russell King Cc: Sam Creasey Cc: Vincent Chen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/include/asm/pgalloc.h | 19 ++------ arch/x86/mm/pgtable.c | 33 ++++--------- include/asm-generic/pgalloc.h | 107 +++++++++++++++++++++++++++++++++++++++-- 3 files changed, 115 insertions(+), 44 deletions(-) commit 790c73690c2bbecb3f6f8becbdb11ddc9bcff8cc Author: Guenter Roeck Date: Thu Jul 11 20:57:46 2019 -0700 mm/gup.c: mark undo_dev_pagemap as __maybe_unused Several mips builds generate the following build warning. mm/gup.c:1788:13: warning: 'undo_dev_pagemap' defined but not used The function is declared unconditionally but only called from behind various ifdefs. Mark it __maybe_unused. Link: http://lkml.kernel.org/r/1562072523-22311-1-git-send-email-linux@roeck-us.net Signed-off-by: Guenter Roeck Reviewed-by: Andrew Morton Cc: Stephen Rothwell Cc: Robin Murphy Cc: Kirill A. Shutemov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/gup.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b5d1c39f34d1c9bca0c4b9ae2e339fbbe264a9c7 Author: Andy Lutomirski Date: Thu Jul 11 20:57:43 2019 -0700 mm/gup.c: remove some BUG_ONs from get_gate_page() If we end up without a PGD or PUD entry backing the gate area, don't BUG -- just fail gracefully. It's not entirely implausible that this could happen some day on x86. It doesn't right now even with an execute-only emulated vsyscall page because the fixmap shares the PUD, but the core mm code shouldn't rely on that particular detail to avoid OOPSing. Link: http://lkml.kernel.org/r/a1d9f4efb75b9d464e59fd6af00104b21c58f6f7.1561610798.git.luto@kernel.org Signed-off-by: Andy Lutomirski Reviewed-by: Kees Cook Reviewed-by: Andrew Morton Cc: Florian Weimer Cc: Jann Horn Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/gup.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit aa712399c1e8245c375a5c44760de684ec2ebefb Author: Pingfan Liu Date: Thu Jul 11 20:57:39 2019 -0700 mm/gup: speed up check_and_migrate_cma_pages() on huge page Both hugetlb and thp locate on the same migration type of pageblock, since they are allocated from a free_list[]. Based on this fact, it is enough to check on a single subpage to decide the migration type of the whole huge page. By this way, it saves (2M/4K - 1) times loop for pmd_huge on x86, similar on other archs. Furthermore, when executing isolate_huge_page(), it avoid taking global hugetlb_lock many times, and meanless remove/add to the local link list cma_page_list. [akpm@linux-foundation.org: make `i' and `step' unsigned] Link: http://lkml.kernel.org/r/1561612545-28997-1-git-send-email-kernelfans@gmail.com Signed-off-by: Pingfan Liu Reviewed-by: Andrew Morton Reviewed-by: Ira Weiny Cc: Mike Rapoport Cc: "Kirill A. Shutemov" Cc: Thomas Gleixner Cc: John Hubbard Cc: "Aneesh Kumar K.V" Cc: Christoph Hellwig Cc: Keith Busch Cc: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/gup.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit 520b4a4496f12b117b94f3ac7c493651881c5fe3 Author: Christoph Hellwig Date: Thu Jul 11 20:57:36 2019 -0700 mm: mark the page referenced in gup_hugepte All other get_user_page_fast cases mark the page referenced, so do this here as well. Link: http://lkml.kernel.org/r/20190625143715.1689-17-hch@lst.de Signed-off-by: Christoph Hellwig Cc: Andrey Konovalov Cc: Benjamin Herrenschmidt Cc: David Miller Cc: James Hogan Cc: Jason Gunthorpe Cc: Khalid Aziz Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Paul Burton Cc: Paul Mackerras Cc: Ralf Baechle Cc: Rich Felker Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/gup.c | 1 + 1 file changed, 1 insertion(+) commit 01a369160bbea43727aa2b99877f86ebddba9acc Author: Christoph Hellwig Date: Thu Jul 11 20:57:32 2019 -0700 mm: switch gup_hugepte to use try_get_compound_head This applies the overflow fixes from 8fde12ca79aff ("mm: prevent get_user_pages() from overflowing page refcount") to the powerpc hugepd code and brings it back in sync with the other GUP cases. Link: http://lkml.kernel.org/r/20190625143715.1689-16-hch@lst.de Signed-off-by: Christoph Hellwig Cc: Andrey Konovalov Cc: Benjamin Herrenschmidt Cc: David Miller Cc: James Hogan Cc: Jason Gunthorpe Cc: Khalid Aziz Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Paul Burton Cc: Paul Mackerras Cc: Ralf Baechle Cc: Rich Felker Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/gup.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit cbd34da7dc9afd521e0bea5e7d12701f4a9da7c7 Author: Christoph Hellwig Date: Thu Jul 11 20:57:28 2019 -0700 mm: move the powerpc hugepd code to mm/gup.c While only powerpc supports the hugepd case, the code is pretty generic and I'd like to keep all GUP internals in one place. Link: http://lkml.kernel.org/r/20190625143715.1689-15-hch@lst.de Signed-off-by: Christoph Hellwig Cc: Andrey Konovalov Cc: Benjamin Herrenschmidt Cc: David Miller Cc: James Hogan Cc: Jason Gunthorpe Cc: Khalid Aziz Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Paul Burton Cc: Paul Mackerras Cc: Ralf Baechle Cc: Rich Felker Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/Kconfig | 1 + arch/powerpc/mm/hugetlbpage.c | 72 ------------------------------------- include/linux/hugetlb.h | 18 ---------- mm/Kconfig | 10 ++++++ mm/gup.c | 82 +++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 93 insertions(+), 90 deletions(-) commit 817be129e6f254e5bd8c17b1da834c8f612dca28 Author: Christoph Hellwig Date: Thu Jul 11 20:57:25 2019 -0700 mm: validate get_user_pages_fast flags We can only deal with FOLL_WRITE and/or FOLL_LONGTERM in get_user_pages_fast, so reject all other flags. Link: http://lkml.kernel.org/r/20190625143715.1689-14-hch@lst.de Signed-off-by: Christoph Hellwig Cc: Andrey Konovalov Cc: Benjamin Herrenschmidt Cc: David Miller Cc: James Hogan Cc: Jason Gunthorpe Cc: Khalid Aziz Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Paul Burton Cc: Paul Mackerras Cc: Ralf Baechle Cc: Rich Felker Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/gup.c | 3 +++ 1 file changed, 3 insertions(+) commit 050a9adc64383aed3429a31432b4f5a7b0cdc8ac Author: Christoph Hellwig Date: Thu Jul 11 20:57:21 2019 -0700 mm: consolidate the get_user_pages* implementations Always build mm/gup.c so that we don't have to provide separate nommu stubs. Also merge the get_user_pages_fast and __get_user_pages_fast stubs when HAVE_FAST_GUP into the main implementations, which will never call the fast path if HAVE_FAST_GUP is not set. This also ensures the new put_user_pages* helpers are available for nommu, as those are currently missing, which would create a problem as soon as we actually grew users for it. Link: http://lkml.kernel.org/r/20190625143715.1689-13-hch@lst.de Signed-off-by: Christoph Hellwig Cc: Andrey Konovalov Cc: Benjamin Herrenschmidt Cc: David Miller Cc: James Hogan Cc: Jason Gunthorpe Cc: Khalid Aziz Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Paul Burton Cc: Paul Mackerras Cc: Ralf Baechle Cc: Rich Felker Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/Kconfig | 1 + mm/Makefile | 4 +-- mm/gup.c | 67 ++++++++++++++++++++++++++++++++++++++++++---- mm/nommu.c | 88 ------------------------------------------------------------- mm/util.c | 47 --------------------------------- 5 files changed, 65 insertions(+), 142 deletions(-) commit d3649f68b4336e7ef7aa264cf05ba1265feb0968 Author: Christoph Hellwig Date: Thu Jul 11 20:57:18 2019 -0700 mm: reorder code blocks in gup.c This moves the actually exported functions towards the end of the file, and reorders some functions to be in more logical blocks as a preparation for moving various stubs inline into the main functionality using IS_ENABLED(). Link: http://lkml.kernel.org/r/20190625143715.1689-12-hch@lst.de Signed-off-by: Christoph Hellwig Cc: Andrey Konovalov Cc: Benjamin Herrenschmidt Cc: David Miller Cc: James Hogan Cc: Jason Gunthorpe Cc: Khalid Aziz Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Paul Burton Cc: Paul Mackerras Cc: Ralf Baechle Cc: Rich Felker Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/gup.c | 410 +++++++++++++++++++++++++++++++-------------------------------- 1 file changed, 205 insertions(+), 205 deletions(-) commit 67a929e097b774c69253c8b61ef9eb8a42b463a3 Author: Christoph Hellwig Date: Thu Jul 11 20:57:14 2019 -0700 mm: rename CONFIG_HAVE_GENERIC_GUP to CONFIG_HAVE_FAST_GUP We only support the generic GUP now, so rename the config option to be more clear, and always use the mm/Kconfig definition of the symbol and select it from the arch Kconfigs. Link: http://lkml.kernel.org/r/20190625143715.1689-11-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Khalid Aziz Reviewed-by: Jason Gunthorpe Cc: Andrey Konovalov Cc: Benjamin Herrenschmidt Cc: David Miller Cc: James Hogan Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Paul Burton Cc: Paul Mackerras Cc: Ralf Baechle Cc: Rich Felker Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm/Kconfig | 5 +---- arch/arm64/Kconfig | 4 +--- arch/mips/Kconfig | 2 +- arch/powerpc/Kconfig | 2 +- arch/s390/Kconfig | 2 +- arch/sh/Kconfig | 2 +- arch/sparc/Kconfig | 2 +- arch/x86/Kconfig | 4 +--- mm/Kconfig | 2 +- mm/gup.c | 4 ++-- 10 files changed, 11 insertions(+), 18 deletions(-) commit 7b9afb86b6328f10dc2cad9223d7def12d60e505 Author: Christoph Hellwig Date: Thu Jul 11 20:57:11 2019 -0700 sparc64: use the generic get_user_pages_fast code The sparc64 code is mostly equivalent to the generic one, minus various bugfixes and two arch overrides that this patch adds to pgtable.h. Link: http://lkml.kernel.org/r/20190625143715.1689-10-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Khalid Aziz Cc: David Miller Cc: Andrey Konovalov Cc: Benjamin Herrenschmidt Cc: James Hogan Cc: Jason Gunthorpe Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Paul Burton Cc: Paul Mackerras Cc: Ralf Baechle Cc: Rich Felker Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/sparc/Kconfig | 1 + arch/sparc/include/asm/pgtable_64.h | 18 ++ arch/sparc/mm/Makefile | 2 +- arch/sparc/mm/gup.c | 340 ------------------------------------ 4 files changed, 20 insertions(+), 341 deletions(-) commit 5875509d2f30eb8963163f255ded98095989142f Author: Christoph Hellwig Date: Thu Jul 11 20:57:07 2019 -0700 sparc64: define untagged_addr() Add a helper to untag a user pointer. This is needed for ADI support in get_user_pages_fast. Link: http://lkml.kernel.org/r/20190625143715.1689-9-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Khalid Aziz Cc: David Miller Cc: Andrey Konovalov Cc: Benjamin Herrenschmidt Cc: James Hogan Cc: Jason Gunthorpe Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Paul Burton Cc: Paul Mackerras Cc: Ralf Baechle Cc: Rich Felker Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/sparc/include/asm/pgtable_64.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit d85507901f6a0a4fbd04cbdd567f4798a695b6d3 Author: Christoph Hellwig Date: Thu Jul 11 20:57:03 2019 -0700 sparc64: add the missing pgd_page definition sparc64 only had pgd_page_vaddr, but not pgd_page. [hch@lst.de: fix sparc64 build] Link: http://lkml.kernel.org/r/20190626131318.GA5101@lst.de Link: http://lkml.kernel.org/r/20190625143715.1689-8-hch@lst.de Signed-off-by: Christoph Hellwig Cc: David Miller Cc: Andrey Konovalov Cc: Benjamin Herrenschmidt Cc: James Hogan Cc: Jason Gunthorpe Cc: Khalid Aziz Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Paul Burton Cc: Paul Mackerras Cc: Ralf Baechle Cc: Rich Felker Cc: Yoshinori Sato Cc: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/sparc/include/asm/pgtable_64.h | 3 +++ 1 file changed, 3 insertions(+) commit 3c9b9accad9f25a52438c790f76b08d79051d383 Author: Christoph Hellwig Date: Thu Jul 11 20:57:00 2019 -0700 sh: use the generic get_user_pages_fast code The sh code is mostly equivalent to the generic one, minus various bugfixes and two arch overrides that this patch adds to pgtable.h. Link: http://lkml.kernel.org/r/20190625143715.1689-7-hch@lst.de Signed-off-by: Christoph Hellwig Cc: Andrey Konovalov Cc: Benjamin Herrenschmidt Cc: David Miller Cc: James Hogan Cc: Jason Gunthorpe Cc: Khalid Aziz Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Paul Burton Cc: Paul Mackerras Cc: Ralf Baechle Cc: Rich Felker Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/sh/Kconfig | 2 + arch/sh/include/asm/pgtable.h | 37 ++++++ arch/sh/mm/Makefile | 2 +- arch/sh/mm/gup.c | 277 ------------------------------------------ 4 files changed, 40 insertions(+), 278 deletions(-) commit 2f85e7f948a2c9f7e1524397d1818191ff5abb03 Author: Christoph Hellwig Date: Thu Jul 11 20:56:56 2019 -0700 sh: add the missing pud_page definition sh only had pud_page_vaddr, but not pud_page. [hch@lst.de: sh: stub out pud_page] Link: http://lkml.kernel.org/r/20190701151818.32227-2-hch@lst.de Link: http://lkml.kernel.org/r/20190625143715.1689-6-hch@lst.de Signed-off-by: Christoph Hellwig Tested-by: Guenter Roeck Cc: Andrey Konovalov Cc: Benjamin Herrenschmidt Cc: David Miller Cc: James Hogan Cc: Jason Gunthorpe Cc: Khalid Aziz Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Paul Burton Cc: Paul Mackerras Cc: Ralf Baechle Cc: Rich Felker Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/sh/include/asm/pgtable-3level.h | 3 +++ 1 file changed, 3 insertions(+) commit 446f062bf06c81de85edd279ee179715c83a4270 Author: Christoph Hellwig Date: Thu Jul 11 20:56:52 2019 -0700 MIPS: use the generic get_user_pages_fast code The mips code is mostly equivalent to the generic one, minus various bugfixes and an arch override for gup_fast_permitted. Note that this defines ARCH_HAS_PTE_SPECIAL for mips as mips has pte_special and pte_mkspecial implemented and used in the existing gup code. They are no-op stubs, though which makes me a little unsure if this is really right thing to do. Note that this also adds back a missing cpu_has_dc_aliases check for __get_user_pages_fast, which the old code was only doing for get_user_pages_fast. This clearly looks like an oversight, as any condition that makes get_user_pages_fast unsafe also applies to __get_user_pages_fast. [hch@lst.de: MIPS: don't select ARCH_HAS_PTE_SPECIAL] Link: http://lkml.kernel.org/r/20190701151818.32227-3-hch@lst.de Link: http://lkml.kernel.org/r/20190625143715.1689-5-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Jason Gunthorpe Tested-by: Guenter Roeck Cc: Ralf Baechle Cc: Andrey Konovalov Cc: Benjamin Herrenschmidt Cc: David Miller Cc: James Hogan Cc: Khalid Aziz Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Paul Burton Cc: Paul Mackerras Cc: Rich Felker Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/mips/Kconfig | 2 + arch/mips/include/asm/pgtable.h | 3 + arch/mips/mm/Makefile | 1 - arch/mips/mm/gup.c | 303 ---------------------------------------- 4 files changed, 5 insertions(+), 304 deletions(-) commit 39656e83dab918861931ef96e5c41731b0899e56 Author: Christoph Hellwig Date: Thu Jul 11 20:56:49 2019 -0700 mm: lift the x86_32 PAE version of gup_get_pte to common code The split low/high access is the only non-READ_ONCE version of gup_get_pte that did show up in the various arch implemenations. Lift it to common code and drop the ifdef based arch override. Link: http://lkml.kernel.org/r/20190625143715.1689-4-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Jason Gunthorpe Cc: Andrey Konovalov Cc: Benjamin Herrenschmidt Cc: David Miller Cc: James Hogan Cc: Khalid Aziz Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Paul Burton Cc: Paul Mackerras Cc: Ralf Baechle Cc: Rich Felker Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/Kconfig | 1 + arch/x86/include/asm/pgtable-3level.h | 47 -------------------------------- arch/x86/kvm/mmu.c | 2 +- mm/Kconfig | 3 +++ mm/gup.c | 51 ++++++++++++++++++++++++++++++++--- 5 files changed, 52 insertions(+), 52 deletions(-) commit 26f4c328079d78d6cd0462c53c14ec0b69f4748e Author: Christoph Hellwig Date: Thu Jul 11 20:56:45 2019 -0700 mm: simplify gup_fast_permitted Pass in the already calculated end value instead of recomputing it, and leave the end > start check in the callers instead of duplicating them in the arch code. Link: http://lkml.kernel.org/r/20190625143715.1689-3-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Jason Gunthorpe Cc: Andrey Konovalov Cc: Benjamin Herrenschmidt Cc: David Miller Cc: James Hogan Cc: Khalid Aziz Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Paul Burton Cc: Paul Mackerras Cc: Ralf Baechle Cc: Rich Felker Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/s390/include/asm/pgtable.h | 8 +------- arch/x86/include/asm/pgtable_64.h | 8 +------- mm/gup.c | 17 +++++++---------- 3 files changed, 9 insertions(+), 24 deletions(-) commit f455c854877dcce5d714b00203ea804bf601fb02 Author: Christoph Hellwig Date: Thu Jul 11 20:56:41 2019 -0700 mm: use untagged_addr() for get_user_pages_fast addresses Patch series "switch the remaining architectures to use generic GUP", v4. A series to switch mips, sh and sparc64 to use the generic GUP code so that we only have one codebase to touch for further improvements to this code. This patch (of 16): This will allow sparc64, or any future architecture with memory tagging to override its tags for get_user_pages and get_user_pages_fast. Link: http://lkml.kernel.org/r/20190625143715.1689-2-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Khalid Aziz Reviewed-by: Jason Gunthorpe Cc: Paul Burton Cc: James Hogan Cc: Yoshinori Sato Cc: Rich Felker Cc: David Miller Cc: Nicholas Piggin Cc: Khalid Aziz Cc: Andrey Konovalov Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Ralf Baechle Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/gup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fcf8a1e483490cd249df4e02d5425636c3f43c86 Author: Waiman Long Date: Thu Jul 11 20:56:38 2019 -0700 mm, memcg: add a memcg_slabinfo debugfs file There are concerns about memory leaks from extensive use of memory cgroups as each memory cgroup creates its own set of kmem caches. There is a possiblity that the memcg kmem caches may remain even after the memory cgroups have been offlined. Therefore, it will be useful to show the status of each of memcg kmem caches. This patch introduces a new /memcg_slabinfo file which is somewhat similar to /proc/slabinfo in format, but lists only information about kmem caches that have child memcg kmem caches. Information available in /proc/slabinfo are not repeated in memcg_slabinfo. A portion of a sample output of the file was: # rpc_inode_cache root 13 51 1 1 rpc_inode_cache 48 0 0 0 0 fat_inode_cache root 1 45 1 1 fat_inode_cache 41 2 45 1 1 xfs_inode root 770 816 24 24 xfs_inode 92 22 34 1 1 xfs_inode 88:dead 1 34 1 1 xfs_inode 89:dead 23 34 1 1 xfs_inode 85 4 34 1 1 xfs_inode 84 9 34 1 1 The css id of the memcg is also listed. If a memcg is not online, the tag ":dead" will be attached as shown above. [longman@redhat.com: memcg: add ":deact" tag for reparented kmem caches in memcg_slabinfo] Link: http://lkml.kernel.org/r/20190621173005.31514-1-longman@redhat.com [longman@redhat.com: set the flag in the common code as suggested by Roman] Link: http://lkml.kernel.org/r/20190627184324.5875-1-longman@redhat.com Link: http://lkml.kernel.org/r/20190619171621.26209-1-longman@redhat.com Signed-off-by: Waiman Long Suggested-by: Shakeel Butt Reviewed-by: Shakeel Butt Acked-by: Roman Gushchin Acked-by: David Rientjes Cc: Christoph Lameter Cc: Pekka Enberg Cc: Joonsoo Kim Cc: Michal Hocko Cc: Johannes Weiner Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/slab.h | 4 ++++ mm/slab_common.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) commit fb2f2b0adb98bbbbbb51c5a5327f3f90f5dc417e Author: Roman Gushchin Date: Thu Jul 11 20:56:34 2019 -0700 mm: memcg/slab: reparent memcg kmem_caches on cgroup removal Let's reparent non-root kmem_caches on memcg offlining. This allows us to release the memory cgroup without waiting for the last outstanding kernel object (e.g. dentry used by another application). Since the parent cgroup is already charged, everything we need to do is to splice the list of kmem_caches to the parent's kmem_caches list, swap the memcg pointer, drop the css refcounter for each kmem_cache and adjust the parent's css refcounter. Please, note that kmem_cache->memcg_params.memcg isn't a stable pointer anymore. It's safe to read it under rcu_read_lock(), cgroup_mutex held, or any other way that protects the memory cgroup from being released. We can race with the slab allocation and deallocation paths. It's not a big problem: parent's charge and slab global stats are always correct, and we don't care anymore about the child usage and global stats. The child cgroup is already offline, so we don't use or show it anywhere. Local slab stats (NR_SLAB_RECLAIMABLE and NR_SLAB_UNRECLAIMABLE) aren't used anywhere except count_shadow_nodes(). But even there it won't break anything: after reparenting "nodes" will be 0 on child level (because we're already reparenting shrinker lists), and on parent level page stats always were 0, and this patch won't change anything. [guro@fb.com: properly handle kmem_caches reparented to root_mem_cgroup] Link: http://lkml.kernel.org/r/20190620213427.1691847-1-guro@fb.com Link: http://lkml.kernel.org/r/20190611231813.3148843-11-guro@fb.com Signed-off-by: Roman Gushchin Acked-by: Vladimir Davydov Reviewed-by: Shakeel Butt Acked-by: David Rientjes Cc: Christoph Lameter Cc: Johannes Weiner Cc: Michal Hocko Cc: Waiman Long Cc: David Rientjes Cc: Joonsoo Kim Cc: Pekka Enberg Cc: Andrei Vagin Cc: Qian Cai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/slab.h | 2 +- mm/memcontrol.c | 14 ++++++++------ mm/slab.h | 41 ++++++++++++++++++++++++++++++++--------- mm/slab_common.c | 19 +++++++++++++++++-- 4 files changed, 58 insertions(+), 18 deletions(-) commit 4d96ba3530750fae3f3f01150adfecde96157815 Author: Roman Gushchin Date: Thu Jul 11 20:56:31 2019 -0700 mm: memcg/slab: stop setting page->mem_cgroup pointer for slab pages Every slab page charged to a non-root memory cgroup has a pointer to the memory cgroup and holds a reference to it, which protects a non-empty memory cgroup from being released. At the same time the page has a pointer to the corresponding kmem_cache, and also hold a reference to the kmem_cache. And kmem_cache by itself holds a reference to the cgroup. So there is clearly some redundancy, which allows to stop setting the page->mem_cgroup pointer and rely on getting memcg pointer indirectly via kmem_cache. Further it will allow to change this pointer easier, without a need to go over all charged pages. So let's stop setting page->mem_cgroup pointer for slab pages, and stop using the css refcounter directly for protecting the memory cgroup from going away. Instead rely on kmem_cache as an intermediate object. Make sure that vmstats and shrinker lists are working as previously, as well as /proc/kpagecgroup interface. Link: http://lkml.kernel.org/r/20190611231813.3148843-10-guro@fb.com Signed-off-by: Roman Gushchin Acked-by: Vladimir Davydov Reviewed-by: Shakeel Butt Cc: Christoph Lameter Cc: Johannes Weiner Cc: Michal Hocko Cc: Waiman Long Cc: David Rientjes Cc: Joonsoo Kim Cc: Pekka Enberg Cc: Andrei Vagin Cc: Qian Cai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/list_lru.c | 3 ++- mm/memcontrol.c | 12 ++++++---- mm/slab.h | 74 +++++++++++++++++++++++++++++++++++++++++++++++---------- 3 files changed, 70 insertions(+), 19 deletions(-) commit f0a3a24b532d9a7e56a33c5112b2a212ed6ec580 Author: Roman Gushchin Date: Thu Jul 11 20:56:27 2019 -0700 mm: memcg/slab: rework non-root kmem_cache lifecycle management Currently each charged slab page holds a reference to the cgroup to which it's charged. Kmem_caches are held by the memcg and are released all together with the memory cgroup. It means that none of kmem_caches are released unless at least one reference to the memcg exists, which is very far from optimal. Let's rework it in a way that allows releasing individual kmem_caches as soon as the cgroup is offline, the kmem_cache is empty and there are no pending allocations. To make it possible, let's introduce a new percpu refcounter for non-root kmem caches. The counter is initialized to the percpu mode, and is switched to the atomic mode during kmem_cache deactivation. The counter is bumped for every charged page and also for every running allocation. So the kmem_cache can't be released unless all allocations complete. To shutdown non-active empty kmem_caches, let's reuse the work queue, previously used for the kmem_cache deactivation. Once the reference counter reaches 0, let's schedule an asynchronous kmem_cache release. * I used the following simple approach to test the performance (stolen from another patchset by T. Harding): time find / -name fname-no-exist echo 2 > /proc/sys/vm/drop_caches repeat 10 times Results: orig patched real 0m1.455s real 0m1.355s user 0m0.206s user 0m0.219s sys 0m0.855s sys 0m0.807s real 0m1.487s real 0m1.699s user 0m0.221s user 0m0.256s sys 0m0.806s sys 0m0.948s real 0m1.515s real 0m1.505s user 0m0.183s user 0m0.215s sys 0m0.876s sys 0m0.858s real 0m1.291s real 0m1.380s user 0m0.193s user 0m0.198s sys 0m0.843s sys 0m0.786s real 0m1.364s real 0m1.374s user 0m0.180s user 0m0.182s sys 0m0.868s sys 0m0.806s real 0m1.352s real 0m1.312s user 0m0.201s user 0m0.212s sys 0m0.820s sys 0m0.761s real 0m1.302s real 0m1.349s user 0m0.205s user 0m0.203s sys 0m0.803s sys 0m0.792s real 0m1.334s real 0m1.301s user 0m0.194s user 0m0.201s sys 0m0.806s sys 0m0.779s real 0m1.426s real 0m1.434s user 0m0.216s user 0m0.181s sys 0m0.824s sys 0m0.864s real 0m1.350s real 0m1.295s user 0m0.200s user 0m0.190s sys 0m0.842s sys 0m0.811s So it looks like the difference is not noticeable in this test. [cai@lca.pw: fix an use-after-free in kmemcg_workfn()] Link: http://lkml.kernel.org/r/1560977573-10715-1-git-send-email-cai@lca.pw Link: http://lkml.kernel.org/r/20190611231813.3148843-9-guro@fb.com Signed-off-by: Roman Gushchin Signed-off-by: Qian Cai Acked-by: Vladimir Davydov Cc: Christoph Lameter Cc: Johannes Weiner Cc: Michal Hocko Cc: Shakeel Butt Cc: Waiman Long Cc: David Rientjes Cc: Joonsoo Kim Cc: Pekka Enberg Cc: Andrei Vagin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/slab.h | 3 +- mm/memcontrol.c | 50 +++++++++++++++++++++++++-------- mm/slab.h | 44 ++++++++--------------------- mm/slab_common.c | 78 +++++++++++++++++++++++++++++----------------------- 4 files changed, 96 insertions(+), 79 deletions(-) commit 63b02ef7dc4ec239df45c018ac0adbd02ba30a0c Author: Roman Gushchin Date: Thu Jul 11 20:56:24 2019 -0700 mm: memcg/slab: synchronize access to kmem_cache dying flag using a spinlock Currently the memcg_params.dying flag and the corresponding workqueue used for the asynchronous deactivation of kmem_caches is synchronized using the slab_mutex. It makes impossible to check this flag from the irq context, which will be required in order to implement asynchronous release of kmem_caches. So let's switch over to the irq-save flavor of the spinlock-based synchronization. Link: http://lkml.kernel.org/r/20190611231813.3148843-8-guro@fb.com Signed-off-by: Roman Gushchin Acked-by: Vladimir Davydov Reviewed-by: Shakeel Butt Cc: Christoph Lameter Cc: Johannes Weiner Cc: Michal Hocko Cc: Waiman Long Cc: David Rientjes Cc: Joonsoo Kim Cc: Pekka Enberg Cc: Andrei Vagin Cc: Qian Cai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab_common.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 570332978ea7fdbec86a07086a584d796a87da2c Author: Roman Gushchin Date: Thu Jul 11 20:56:20 2019 -0700 mm: memcg/slab: don't check the dying flag on kmem_cache creation There is no point in checking the root_cache->memcg_params.dying flag on kmem_cache creation path. New allocations shouldn't be performed using a dead root kmem_cache, so no new memcg kmem_cache creation can be scheduled after the flag is set. And if it was scheduled before, flush_memcg_workqueue() will wait for it anyway. So let's drop this check to simplify the code. Link: http://lkml.kernel.org/r/20190611231813.3148843-7-guro@fb.com Signed-off-by: Roman Gushchin Acked-by: Vladimir Davydov Reviewed-by: Shakeel Butt Cc: Christoph Lameter Cc: Johannes Weiner Cc: Michal Hocko Cc: Waiman Long Cc: David Rientjes Cc: Joonsoo Kim Cc: Pekka Enberg Cc: Andrei Vagin Cc: Qian Cai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6cea1d569d24af6f9e95f70cb301807440ae2981 Author: Roman Gushchin Date: Thu Jul 11 20:56:16 2019 -0700 mm: memcg/slab: unify SLAB and SLUB page accounting Currently the page accounting code is duplicated in SLAB and SLUB internals. Let's move it into new (un)charge_slab_page helpers in the slab_common.c file. These helpers will be responsible for statistics (global and memcg-aware) and memcg charging. So they are replacing direct memcg_(un)charge_slab() calls. Link: http://lkml.kernel.org/r/20190611231813.3148843-6-guro@fb.com Signed-off-by: Roman Gushchin Reviewed-by: Shakeel Butt Acked-by: Christoph Lameter Acked-by: Vladimir Davydov Acked-by: Johannes Weiner Cc: Michal Hocko Cc: Waiman Long Cc: David Rientjes Cc: Joonsoo Kim Cc: Pekka Enberg Cc: Andrei Vagin Cc: Qian Cai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab.c | 19 +++---------------- mm/slab.h | 25 +++++++++++++++++++++++++ mm/slub.c | 14 ++------------ 3 files changed, 30 insertions(+), 28 deletions(-) commit 49a18eae2e98a794477b5af5d85938e430c0be72 Author: Roman Gushchin Date: Thu Jul 11 20:56:13 2019 -0700 mm: memcg/slab: introduce __memcg_kmem_uncharge_memcg() Let's separate the page counter modification code out of __memcg_kmem_uncharge() in a way similar to what __memcg_kmem_charge() and __memcg_kmem_charge_memcg() work. This will allow to reuse this code later using a new memcg_kmem_uncharge_memcg() wrapper, which calls __memcg_kmem_uncharge_memcg() if memcg_kmem_enabled() check is passed. Link: http://lkml.kernel.org/r/20190611231813.3148843-5-guro@fb.com Signed-off-by: Roman Gushchin Reviewed-by: Shakeel Butt Acked-by: Vladimir Davydov Cc: Christoph Lameter Cc: Johannes Weiner Cc: Michal Hocko Cc: Waiman Long Cc: David Rientjes Cc: Joonsoo Kim Cc: Pekka Enberg Cc: Andrei Vagin Cc: Qian Cai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memcontrol.h | 10 ++++++++++ mm/memcontrol.c | 25 +++++++++++++++++-------- 2 files changed, 27 insertions(+), 8 deletions(-) commit 434866947564b954409c2fe561605e22f7b49f64 Author: Roman Gushchin Date: Thu Jul 11 20:56:09 2019 -0700 mm: memcg/slab: generalize postponed non-root kmem_cache deactivation Currently SLUB uses a work scheduled after an RCU grace period to deactivate a non-root kmem_cache. This mechanism can be reused for kmem_caches release, but requires generalization for SLAB case. Introduce kmemcg_cache_deactivate() function, which calls allocator-specific __kmem_cache_deactivate() and schedules execution of __kmem_cache_deactivate_after_rcu() with all necessary locks in a worker context after an rcu grace period. Here is the new calling scheme: kmemcg_cache_deactivate() __kmemcg_cache_deactivate() SLAB/SLUB-specific kmemcg_rcufn() rcu kmemcg_workfn() work __kmemcg_cache_deactivate_after_rcu() SLAB/SLUB-specific instead of: __kmemcg_cache_deactivate() SLAB/SLUB-specific slab_deactivate_memcg_cache_rcu_sched() SLUB-only kmemcg_rcufn() rcu kmemcg_workfn() work kmemcg_cache_deact_after_rcu() SLUB-only For consistency, all allocator-specific functions start with "__". Link: http://lkml.kernel.org/r/20190611231813.3148843-4-guro@fb.com Signed-off-by: Roman Gushchin Acked-by: Vladimir Davydov Reviewed-by: Shakeel Butt Cc: Christoph Lameter Cc: Johannes Weiner Cc: Michal Hocko Cc: Waiman Long Cc: David Rientjes Cc: Joonsoo Kim Cc: Pekka Enberg Cc: Andrei Vagin Cc: Qian Cai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab.c | 4 ++++ mm/slab.h | 3 +-- mm/slab_common.c | 27 ++++++++------------------- mm/slub.c | 8 +------- 4 files changed, 14 insertions(+), 28 deletions(-) commit 0b14e8aa68223c2c124d408aa4b110b364d13c53 Author: Roman Gushchin Date: Thu Jul 11 20:56:06 2019 -0700 mm: memcg/slab: rename slab delayed deactivation functions and fields The delayed work/rcu deactivation infrastructure of non-root kmem_caches can be also used for asynchronous release of these objects. Let's get rid of the word "deactivation" in corresponding names to make the code look better after generalization. It's easier to make the renaming first, so that the generalized code will look consistent from scratch. Let's rename struct memcg_cache_params fields: deact_fn -> work_fn deact_rcu_head -> rcu_head deact_work -> work And RCU/delayed work callbacks in slab common code: kmemcg_deactivate_rcufn -> kmemcg_rcufn kmemcg_deactivate_workfn -> kmemcg_workfn This patch contains no functional changes, only renamings. Link: http://lkml.kernel.org/r/20190611231813.3148843-3-guro@fb.com Signed-off-by: Roman Gushchin Acked-by: Vladimir Davydov Reviewed-by: Shakeel Butt Cc: Christoph Lameter Cc: Johannes Weiner Cc: Michal Hocko Cc: Waiman Long Cc: David Rientjes Cc: Joonsoo Kim Cc: Pekka Enberg Cc: Andrei Vagin Cc: Qian Cai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/slab.h | 6 +++--- mm/slab.h | 2 +- mm/slab_common.c | 30 +++++++++++++++--------------- 3 files changed, 19 insertions(+), 19 deletions(-) commit c03914b7aa319fb2b6701a6427c13752c7418b9b Author: Roman Gushchin Date: Thu Jul 11 20:56:02 2019 -0700 mm: memcg/slab: postpone kmem_cache memcg pointer initialization to memcg_link_cache() Patch series "mm: reparent slab memory on cgroup removal", v7. # Why do we need this? We've noticed that the number of dying cgroups is steadily growing on most of our hosts in production. The following investigation revealed an issue in the userspace memory reclaim code [1], accounting of kernel stacks [2], and also the main reason: slab objects. The underlying problem is quite simple: any page charged to a cgroup holds a reference to it, so the cgroup can't be reclaimed unless all charged pages are gone. If a slab object is actively used by other cgroups, it won't be reclaimed, and will prevent the origin cgroup from being reclaimed. Slab objects, and first of all vfs cache, is shared between cgroups, which are using the same underlying fs, and what's even more important, it's shared between multiple generations of the same workload. So if something is running periodically every time in a new cgroup (like how systemd works), we do accumulate multiple dying cgroups. Strictly speaking pagecache isn't different here, but there is a key difference: we disable protection and apply some extra pressure on LRUs of dying cgroups, and these LRUs contain all charged pages. My experiments show that with the disabled kernel memory accounting the number of dying cgroups stabilizes at a relatively small number (~100, depends on memory pressure and cgroup creation rate), and with kernel memory accounting it grows pretty steadily up to several thousands. Memory cgroups are quite complex and big objects (mostly due to percpu stats), so it leads to noticeable memory losses. Memory occupied by dying cgroups is measured in hundreds of megabytes. I've even seen a host with more than 100Gb of memory wasted for dying cgroups. It leads to a degradation of performance with the uptime, and generally limits the usage of cgroups. My previous attempt [3] to fix the problem by applying extra pressure on slab shrinker lists caused a regressions with xfs and ext4, and has been reverted [4]. The following attempts to find the right balance [5, 6] were not successful. So instead of trying to find a maybe non-existing balance, let's do reparent accounted slab caches to the parent cgroup on cgroup removal. # Implementation approach There is however a significant problem with reparenting of slab memory: there is no list of charged pages. Some of them are in shrinker lists, but not all. Introducing of a new list is really not an option. But fortunately there is a way forward: every slab page has a stable pointer to the corresponding kmem_cache. So the idea is to reparent kmem_caches instead of slab pages. It's actually simpler and cheaper, but requires some underlying changes: 1) Make kmem_caches to hold a single reference to the memory cgroup, instead of a separate reference per every slab page. 2) Stop setting page->mem_cgroup pointer for memcg slab pages and use page->kmem_cache->memcg indirection instead. It's used only on slab page release, so performance overhead shouldn't be a big issue. 3) Introduce a refcounter for non-root slab caches. It's required to be able to destroy kmem_caches when they become empty and release the associated memory cgroup. There is a bonus: currently we release all memcg kmem_caches all together with the memory cgroup itself. This patchset allows individual kmem_caches to be released as soon as they become inactive and free. Some additional implementation details are provided in corresponding commit messages. # Results Below is the average number of dying cgroups on two groups of our production hosts. They do run some sort of web frontend workload, the memory pressure is moderate. As we can see, with the kernel memory reparenting the number stabilizes in 60s range; however with the original version it grows almost linearly and doesn't show any signs of plateauing. The difference in slab and percpu usage between patched and unpatched versions also grows linearly. In 7 days it exceeded 200Mb. day 0 1 2 3 4 5 6 7 original 56 362 628 752 1070 1250 1490 1560 patched 23 46 51 55 60 57 67 69 mem diff(Mb) 22 74 123 152 164 182 214 241 # Links [1]: commit 68600f623d69 ("mm: don't miss the last page because of round-off error") [2]: commit 9b6f7e163cd0 ("mm: rework memcg kernel stack accounting") [3]: commit 172b06c32b94 ("mm: slowly shrink slabs with a relatively small number of objects") [4]: commit a9a238e83fbb ("Revert "mm: slowly shrink slabs with a relatively small number of objects") [5]: https://lkml.org/lkml/2019/1/28/1865 [6]: https://marc.info/?l=linux-mm&m=155064763626437&w=2 This patch (of 10): Initialize kmem_cache->memcg_params.memcg pointer in memcg_link_cache() rather than in init_memcg_params(). Once kmem_cache will hold a reference to the memory cgroup, it will simplify the refcounting. For non-root kmem_caches memcg_link_cache() is always called before the kmem_cache becomes visible to a user, so it's safe. Link: http://lkml.kernel.org/r/20190611231813.3148843-2-guro@fb.com Signed-off-by: Roman Gushchin Reviewed-by: Shakeel Butt Acked-by: Vladimir Davydov Acked-by: Johannes Weiner Cc: Waiman Long Cc: Michal Hocko Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Andrei Vagin Cc: Qian Cai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab.c | 2 +- mm/slab.h | 5 +++-- mm/slab_common.c | 14 +++++++------- mm/slub.c | 2 +- 4 files changed, 12 insertions(+), 11 deletions(-) commit c8713d0b23123759c9d86b0421243c2c309505d7 Author: Johannes Weiner Date: Thu Jul 11 20:55:59 2019 -0700 mm: memcontrol: dump memory.stat during cgroup OOM The current cgroup OOM memory info dump doesn't include all the memory we are tracking, nor does it give insight into what the VM tried to do leading up to the OOM. All that useful info is in memory.stat. Furthermore, the recursive printing for every child cgroup can generate absurd amounts of data on the console for larger cgroup trees, and it's not like we provide a per-cgroup breakdown during global OOM kills. When an OOM kill is triggered, print one set of recursive memory.stat items at the level whose limit triggered the OOM condition. Example output: stress invoked oom-killer: gfp_mask=0x100cca(GFP_HIGHUSER_MOVABLE), order=0, oom_score_adj=0 CPU: 2 PID: 210 Comm: stress Not tainted 5.2.0-rc2-mm1-00247-g47d49835983c #135 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-20181126_142135-anatol 04/01/2014 Call Trace: dump_stack+0x46/0x60 dump_header+0x4c/0x2d0 oom_kill_process.cold.10+0xb/0x10 out_of_memory+0x200/0x270 ? try_to_free_mem_cgroup_pages+0xdf/0x130 mem_cgroup_out_of_memory+0xb7/0xc0 try_charge+0x680/0x6f0 mem_cgroup_try_charge+0xb5/0x160 __add_to_page_cache_locked+0xc6/0x300 ? list_lru_destroy+0x80/0x80 add_to_page_cache_lru+0x45/0xc0 pagecache_get_page+0x11b/0x290 filemap_fault+0x458/0x6d0 ext4_filemap_fault+0x27/0x36 __do_fault+0x2f/0xb0 __handle_mm_fault+0x9c5/0x1140 ? apic_timer_interrupt+0xa/0x20 handle_mm_fault+0xc5/0x180 __do_page_fault+0x1ab/0x440 ? page_fault+0x8/0x30 page_fault+0x1e/0x30 RIP: 0033:0x55c32167fc10 Code: Bad RIP value. RSP: 002b:00007fff1d031c50 EFLAGS: 00010206 RAX: 000000000dc00000 RBX: 00007fd2db000010 RCX: 00007fd2db000010 RDX: 0000000000000000 RSI: 0000000010001000 RDI: 0000000000000000 RBP: 000055c321680a54 R08: 00000000ffffffff R09: 0000000000000000 R10: 0000000000000022 R11: 0000000000000246 R12: ffffffffffffffff R13: 0000000000000002 R14: 0000000000001000 R15: 0000000010000000 memory: usage 1024kB, limit 1024kB, failcnt 75131 swap: usage 0kB, limit 9007199254740988kB, failcnt 0 Memory cgroup stats for /foo: anon 0 file 0 kernel_stack 36864 slab 274432 sock 0 shmem 0 file_mapped 0 file_dirty 0 file_writeback 0 anon_thp 0 inactive_anon 126976 active_anon 0 inactive_file 0 active_file 0 unevictable 0 slab_reclaimable 0 slab_unreclaimable 274432 pgfault 59466 pgmajfault 1617 workingset_refault 2145 workingset_activate 0 workingset_nodereclaim 0 pgrefill 98952 pgscan 200060 pgsteal 59340 pgactivate 40095 pgdeactivate 96787 pglazyfree 0 pglazyfreed 0 thp_fault_alloc 0 thp_collapse_alloc 0 Tasks state (memory values in pages): [ pid ] uid tgid total_vm rss pgtables_bytes swapents oom_score_adj name [ 200] 0 200 1121 884 53248 29 0 bash [ 209] 0 209 905 246 45056 19 0 stress [ 210] 0 210 66442 56 499712 56349 0 stress oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),oom_memcg=/foo,task_memcg=/foo,task=stress,pid=210,uid=0 Memory cgroup out of memory: Killed process 210 (stress) total-vm:265768kB, anon-rss:0kB, file-rss:224kB, shmem-rss:0kB oom_reaper: reaped process 210 (stress), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB [hannes@cmpxchg.org: s/kvmalloc/kmalloc/ per Michal] Link: http://lkml.kernel.org/r/20190605161133.GA12453@cmpxchg.org Link: http://lkml.kernel.org/r/20190604210509.9744-1-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Acked-by: Michal Hocko Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memcontrol.c | 289 ++++++++++++++++++++++++++++++-------------------------- 1 file changed, 157 insertions(+), 132 deletions(-) commit 1e577f970f66a53d429cbee37b36177c9712f488 Author: Shakeel Butt Date: Thu Jul 11 20:55:55 2019 -0700 mm, memcg: introduce memory.events.local The memory controller in cgroup v2 exposes memory.events file for each memcg which shows the number of times events like low, high, max, oom and oom_kill have happened for the whole tree rooted at that memcg. Users can also poll or register notification to monitor the changes in that file. Any event at any level of the tree rooted at memcg will notify all the listeners along the path till root_mem_cgroup. There are existing users which depend on this behavior. However there are users which are only interested in the events happening at a specific level of the memcg tree and not in the events in the underlying tree rooted at that memcg. One such use-case is a centralized resource monitor which can dynamically adjust the limits of the jobs running on a system. The jobs can create their sub-hierarchy for their own sub-tasks. The centralized monitor is only interested in the events at the top level memcgs of the jobs as it can then act and adjust the limits of the jobs. Using the current memory.events for such centralized monitor is very inconvenient. The monitor will keep receiving events which it is not interested and to find if the received event is interesting, it has to read memory.event files of the next level and compare it with the top level one. So, let's introduce memory.events.local to the memcg which shows and notify for the events at the memcg level. Now, does memory.stat and memory.pressure need their local versions. IMHO no due to the no internal process contraint of the cgroup v2. The memory.stat file of the top level memcg of a job shows the stats and vmevents of the whole tree. The local stats or vmevents of the top level memcg will only change if there is a process running in that memcg but v2 does not allow that. Similarly for memory.pressure there will not be any process in the internal nodes and thus no chance of local pressure. Link: http://lkml.kernel.org/r/20190527174643.209172-1-shakeelb@google.com Signed-off-by: Shakeel Butt Reviewed-by: Roman Gushchin Acked-by: Johannes Weiner Acked-by: Michal Hocko Cc: Vladimir Davydov Cc: Chris Down Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/admin-guide/cgroup-v2.rst | 10 ++++++++++ include/linux/memcontrol.h | 7 ++++++- mm/memcontrol.c | 34 +++++++++++++++++++++++---------- 3 files changed, 40 insertions(+), 11 deletions(-) commit ec165450968b26298bd1c373de37b0ab6d826b33 Author: Shakeel Butt Date: Thu Jul 11 20:55:52 2019 -0700 memcg, fsnotify: no oom-kill for remote memcg charging Commit d46eb14b735b ("fs: fsnotify: account fsnotify metadata to kmemcg") added remote memcg charging for fanotify and inotify event objects. The aim was to charge the memory to the listener who is interested in the events but without triggering the OOM killer. Otherwise there would be security concerns for the listener. At the time, oom-kill trigger was not in the charging path. A parallel work added the oom-kill back to charging path i.e. commit 29ef680ae7c2 ("memcg, oom: move out_of_memory back to the charge path"). So to not trigger oom-killer in the remote memcg, explicitly add __GFP_RETRY_MAYFAIL to the fanotigy and inotify event allocations. Link: http://lkml.kernel.org/r/20190514212259.156585-2-shakeelb@google.com Signed-off-by: Shakeel Butt Reviewed-by: Roman Gushchin Acked-by: Jan Kara Cc: Johannes Weiner Cc: Vladimir Davydov Cc: Michal Hocko Cc: Amir Goldstein Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/notify/fanotify/fanotify.c | 5 ++++- fs/notify/inotify/inotify_fsnotify.c | 8 ++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) commit 38d384932ed1b58f0ed8dd17c66e0cd89acb354a Author: Shakeel Butt Date: Thu Jul 11 20:55:48 2019 -0700 memcg, oom: no oom-kill for __GFP_RETRY_MAYFAIL The documentation of __GFP_RETRY_MAYFAIL clearly mentioned that the OOM killer will not be triggered and indeed the page alloc does not invoke OOM killer for such allocations. However we do trigger memcg OOM killer for __GFP_RETRY_MAYFAIL. Fix that. This flag will used later to not trigger oom-killer in the charging path for fanotify and inotify event allocations. Link: http://lkml.kernel.org/r/20190514212259.156585-1-shakeelb@google.com Signed-off-by: Shakeel Butt Acked-by: Michal Hocko Cc: Amir Goldstein Cc: Jan Kara Cc: Johannes Weiner Cc: Roman Gushchin Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memcontrol.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit aeb309b81c6bada783c3695528a3e10748e97285 Author: Huang Ying Date: Thu Jul 11 20:55:44 2019 -0700 mm/mincore.c: fix race between swapoff and mincore Via commit 4b3ef9daa4fc ("mm/swap: split swap cache into 64MB trunks"), after swapoff, the address_space associated with the swap device will be freed. So swap_address_space() users which touch the address_space need some kind of mechanism to prevent the address_space from being freed during accessing. When mincore processes an unmapped range for swapped shmem pages, it doesn't hold the lock to prevent swap device from being swapped off. So the following race is possible: CPU1 CPU2 do_mincore() swapoff() walk_page_range() mincore_unmapped_range() __mincore_unmapped_range mincore_page as = swap_address_space() ... exit_swap_address_space() ... kvfree(spaces) find_get_page(as) The address space may be accessed after being freed. To fix the race, get_swap_device()/put_swap_device() is used to enclose find_get_page() to check whether the swap entry is valid and prevent the swap device from being swapoff during accessing. Link: http://lkml.kernel.org/r/20190611020510.28251-1-ying.huang@intel.com Fixes: 4b3ef9daa4fc ("mm/swap: split swap cache into 64MB trunks") Signed-off-by: "Huang, Ying" Reviewed-by: Andrew Morton Acked-by: Michal Hocko Cc: Hugh Dickins Cc: Paul E. McKenney Cc: Minchan Kim Cc: Johannes Weiner Cc: Tim Chen Cc: Mel Gorman Cc: Jérôme Glisse Cc: Andrea Arcangeli Cc: Yang Shi Cc: David Rientjes Cc: Rik van Riel Cc: Jan Kara Cc: Dave Jiang Cc: Daniel Jordan Cc: Andrea Parri Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mincore.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 4efaceb1c5f8136d5fec3f26549d294b8e898bd7 Author: Aaron Lu Date: Thu Jul 11 20:55:41 2019 -0700 mm, swap: use rbtree for swap_extent swap_extent is used to map swap page offset to backing device's block offset. For a continuous block range, one swap_extent is used and all these swap_extents are managed in a linked list. These swap_extents are used by map_swap_entry() during swap's read and write path. To find out the backing device's block offset for a page offset, the swap_extent list will be traversed linearly, with curr_swap_extent being used as a cache to speed up the search. This works well as long as swap_extents are not huge or when the number of processes that access swap device are few, but when the swap device has many extents and there are a number of processes accessing the swap device concurrently, it can be a problem. On one of our servers, the disk's remaining size is tight: $df -h Filesystem Size Used Avail Use% Mounted on ... ... /dev/nvme0n1p1 1.8T 1.3T 504G 72% /home/t4 When creating a 80G swapfile there, there are as many as 84656 swap extents. The end result is, kernel spends abou 30% time in map_swap_entry() and swap throughput is only 70MB/s. As a comparison, when I used smaller sized swapfile, like 4G whose swap_extent dropped to 2000, swap throughput is back to 400-500MB/s and map_swap_entry() is about 3%. One downside of using rbtree for swap_extent is, 'struct rbtree' takes 24 bytes while 'struct list_head' takes 16 bytes, that's 8 bytes more for each swap_extent. For a swapfile that has 80k swap_extents, that means 625KiB more memory consumed. Test: Since it's not possible to reboot that server, I can not test this patch diretly there. Instead, I tested it on another server with NVMe disk. I created a 20G swapfile on an NVMe backed XFS fs. By default, the filesystem is quite clean and the created swapfile has only 2 extents. Testing vanilla and this patch shows no obvious performance difference when swapfile is not fragmented. To see the patch's effects, I used some tweaks to manually fragment the swapfile by breaking the extent at 1M boundary. This made the swapfile have 20K extents. nr_task=4 kernel swapout(KB/s) map_swap_entry(perf) swapin(KB/s) map_swap_entry(perf) vanilla 165191 90.77% 171798 90.21% patched 858993 +420% 2.16% 715827 +317% 0.77% nr_task=8 kernel swapout(KB/s) map_swap_entry(perf) swapin(KB/s) map_swap_entry(perf) vanilla 306783 92.19% 318145 87.76% patched 954437 +211% 2.35% 1073741 +237% 1.57% swapout: the throughput of swap out, in KB/s, higher is better 1st map_swap_entry: cpu cycles percent sampled by perf swapin: the throughput of swap in, in KB/s, higher is better. 2nd map_swap_entry: cpu cycles percent sampled by perf nr_task=1 doesn't show any difference, this is due to the curr_swap_extent can be effectively used to cache the correct swap extent for single task workload. [akpm@linux-foundation.org: s/BUG_ON(1)/BUG()/] Link: http://lkml.kernel.org/r/20190523142404.GA181@aaronlu Signed-off-by: Aaron Lu Cc: Huang Ying Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/swap.h | 5 +- mm/page_io.c | 2 +- mm/swapfile.c | 137 ++++++++++++++++++++++++++++----------------------- 3 files changed, 78 insertions(+), 66 deletions(-) commit 054f1d1faaed6a7930b77286d607ae45c01d0443 Author: Huang Ying Date: Thu Jul 11 20:55:37 2019 -0700 mm/swap_state.c: simplify total_swapcache_pages() with get_swap_device() total_swapcache_pages() may race with swapper_spaces[] allocation and freeing. Previously, this is protected with a swapper_spaces[] specific RCU mechanism. To simplify the logic/code complexity, it is replaced with get/put_swap_device(). The code line number is reduced too. Although not so important, the swapoff() performance improves too because one synchronize_rcu() call during swapoff() is deleted. [ying.huang@intel.com: fix bad swap file entry warning] Link: http://lkml.kernel.org/r/20190531024102.21723-1-ying.huang@intel.com Link: http://lkml.kernel.org/r/20190527082714.12151-1-ying.huang@intel.com Signed-off-by: "Huang, Ying" Reviewed-by: Andrew Morton Tested-by: Mike Kravetz Cc: Hugh Dickins Cc: Paul E. McKenney Cc: Minchan Kim Cc: Johannes Weiner Cc: Tim Chen Cc: Mel Gorman Cc: Jérôme Glisse Cc: Michal Hocko Cc: Andrea Arcangeli Cc: Yang Shi Cc: David Rientjes Cc: Rik van Riel Cc: Jan Kara Cc: Dave Jiang Cc: Daniel Jordan Cc: Andrea Parri Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/swap_state.c | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) commit eb085574a7526c4375965c5fbf7e5b0c19cdd336 Author: Huang Ying Date: Thu Jul 11 20:55:33 2019 -0700 mm, swap: fix race between swapoff and some swap operations When swapin is performed, after getting the swap entry information from the page table, system will swap in the swap entry, without any lock held to prevent the swap device from being swapoff. This may cause the race like below, CPU 1 CPU 2 ----- ----- do_swap_page swapin_readahead __read_swap_cache_async swapoff swapcache_prepare p->swap_map = NULL __swap_duplicate p->swap_map[?] /* !!! NULL pointer access */ Because swapoff is usually done when system shutdown only, the race may not hit many people in practice. But it is still a race need to be fixed. To fix the race, get_swap_device() is added to check whether the specified swap entry is valid in its swap device. If so, it will keep the swap entry valid via preventing the swap device from being swapoff, until put_swap_device() is called. Because swapoff() is very rare code path, to make the normal path runs as fast as possible, rcu_read_lock/unlock() and synchronize_rcu() instead of reference count is used to implement get/put_swap_device(). >From get_swap_device() to put_swap_device(), RCU reader side is locked, so synchronize_rcu() in swapoff() will wait until put_swap_device() is called. In addition to swap_map, cluster_info, etc. data structure in the struct swap_info_struct, the swap cache radix tree will be freed after swapoff, so this patch fixes the race between swap cache looking up and swapoff too. Races between some other swap cache usages and swapoff are fixed too via calling synchronize_rcu() between clearing PageSwapCache() and freeing swap cache data structure. Another possible method to fix this is to use preempt_off() + stop_machine() to prevent the swap device from being swapoff when its data structure is being accessed. The overhead in hot-path of both methods is similar. The advantages of RCU based method are, 1. stop_machine() may disturb the normal execution code path on other CPUs. 2. File cache uses RCU to protect its radix tree. If the similar mechanism is used for swap cache too, it is easier to share code between them. 3. RCU is used to protect swap cache in total_swapcache_pages() and exit_swap_address_space() already. The two mechanisms can be merged to simplify the logic. Link: http://lkml.kernel.org/r/20190522015423.14418-1-ying.huang@intel.com Fixes: 235b62176712 ("mm/swap: add cluster lock") Signed-off-by: "Huang, Ying" Reviewed-by: Andrea Parri Not-nacked-by: Hugh Dickins Cc: Andrea Arcangeli Cc: Paul E. McKenney Cc: Daniel Jordan Cc: Michal Hocko Cc: Minchan Kim Cc: Johannes Weiner Cc: Tim Chen Cc: Mel Gorman Cc: Jérôme Glisse Cc: Yang Shi Cc: David Rientjes Cc: Rik van Riel Cc: Jan Kara Cc: Dave Jiang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/swap.h | 13 ++++- mm/memory.c | 2 +- mm/swap_state.c | 16 +++++- mm/swapfile.c | 154 ++++++++++++++++++++++++++++++++++++++++----------- 4 files changed, 146 insertions(+), 39 deletions(-) commit a4985833885b8f568bab90d5dc1886ae68dc82cf Author: Yang Shi Date: Thu Jul 11 20:55:29 2019 -0700 mm/filemap.c: correct the comment about VM_FAULT_RETRY Commit 6b4c9f446981 ("filemap: drop the mmap_sem for all blocking operations") changed when mmap_sem is dropped during filemap page fault and when returning VM_FAULT_RETRY. Correct the comment to reflect the change. Link: http://lkml.kernel.org/r/1556234531-108228-1-git-send-email-yang.shi@linux.alibaba.com Signed-off-by: Yang Shi Reviewed-by: Josef Bacik Acked-by: Song Liu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/filemap.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit f053cbd4366051d7eb6ba1b8d529d20f719c2963 Author: Christoph Hellwig Date: Thu Jul 11 20:55:26 2019 -0700 9p: pass the correct prototype to read_cache_page Fix the callback 9p passes to read_cache_page to actually have the proper type expected. Casting around function pointers can easily hide typing bugs, and defeats control flow protection. Link: http://lkml.kernel.org/r/20190520055731.24538-5-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Kees Cook Cc: Sami Tolvanen Cc: Nick Desaulniers Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/9p/vfs_addr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 265de8ce3d5b3c70644a1a45457580bb07548b56 Author: Christoph Hellwig Date: Thu Jul 11 20:55:23 2019 -0700 jffs2: pass the correct prototype to read_cache_page Fix the callback jffs2 passes to read_cache_page to actually have the proper type expected. Casting around function pointers can easily hide typing bugs, and defeats control flow protection. Link: http://lkml.kernel.org/r/20190520055731.24538-4-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Kees Cook Cc: Nick Desaulniers Cc: Sami Tolvanen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/jffs2/file.c | 4 ++-- fs/jffs2/fs.c | 2 +- fs/jffs2/os-linux.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 6c45b454191b330c8bc21d1ed3cf39bb6da1a4eb Author: Christoph Hellwig Date: Thu Jul 11 20:55:20 2019 -0700 mm/filemap: don't cast ->readpage to filler_t for do_read_cache_page We can just pass a NULL filler and do the right thing inside of do_read_cache_page based on the NULL parameter. Link: http://lkml.kernel.org/r/20190520055731.24538-3-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Kees Cook Cc: Nick Desaulniers Cc: Sami Tolvanen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/pagemap.h | 3 +-- mm/filemap.c | 10 ++++++---- 2 files changed, 7 insertions(+), 6 deletions(-) commit d322a8e5e3e9742fa6b76a207e5df57e03f318f9 Author: Christoph Hellwig Date: Thu Jul 11 20:55:17 2019 -0700 mm/filemap.c: fix an overly long line in read_cache_page Patch series "fix filler_t callback type mismatches", v2. Casting mapping->a_ops->readpage to filler_t causes an indirect call type mismatch with Control-Flow Integrity checking. This change fixes the mismatch in read_cache_page_gfp and read_mapping_page by adding using a NULL filler argument as an indication to call ->readpage directly, and by passing the right parameter callbacks in nfs and jffs2. This patch (of 4): Code cleanup. Link: http://lkml.kernel.org/r/20190520055731.24538-2-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Kees Cook Cc: Nick Desaulniers Cc: Sami Tolvanen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/filemap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3972f6bb1c6ae1d32dcf2e4ff635d24b77f26dcb Author: Vlastimil Babka Date: Thu Jul 11 20:55:13 2019 -0700 mm, debug_pagealloc: use a page type instead of page_ext flag When debug_pagealloc is enabled, we currently allocate the page_ext array to mark guard pages with the PAGE_EXT_DEBUG_GUARD flag. Now that we have the page_type field in struct page, we can use that instead, as guard pages are neither PageSlab nor mapped to userspace. This reduces memory overhead when debug_pagealloc is enabled and there are no other features requiring the page_ext array. Link: http://lkml.kernel.org/r/20190603143451.27353-4-vbabka@suse.cz Signed-off-by: Vlastimil Babka Cc: Joonsoo Kim Cc: Matthew Wilcox Cc: "Kirill A. Shutemov" Cc: Mel Gorman Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/admin-guide/kernel-parameters.txt | 10 +++---- include/linux/mm.h | 10 +------ include/linux/page-flags.h | 6 ++++ include/linux/page_ext.h | 1 - mm/Kconfig.debug | 1 - mm/page_alloc.c | 40 ++++--------------------- mm/page_ext.c | 3 -- 7 files changed, 17 insertions(+), 54 deletions(-) commit 4462b32c9285b521ef378907aa66a5ca485aae41 Author: Vlastimil Babka Date: Thu Jul 11 20:55:09 2019 -0700 mm, page_alloc: more extensive free page checking with debug_pagealloc The page allocator checks struct pages for expected state (mapcount, flags etc) as pages are being allocated (check_new_page()) and freed (free_pages_check()) to provide some defense against errors in page allocator users. Prior commits 479f854a207c ("mm, page_alloc: defer debugging checks of pages allocated from the PCP") and 4db7548ccbd9 ("mm, page_alloc: defer debugging checks of freed pages until a PCP drain") this has happened for order-0 pages as they were allocated from or freed to the per-cpu caches (pcplists). Since those are fast paths, the checks are now performed only when pages are moved between pcplists and global free lists. This however lowers the chances of catching errors soon enough. In order to increase the chances of the checks to catch errors, the kernel has to be rebuilt with CONFIG_DEBUG_VM, which also enables multiple other internal debug checks (VM_BUG_ON() etc), which is suboptimal when the goal is to catch errors in mm users, not in mm code itself. To catch some wrong users of the page allocator we have CONFIG_DEBUG_PAGEALLOC, which is designed to have virtually no overhead unless enabled at boot time. Memory corruptions when writing to freed pages have often the same underlying errors (use-after-free, double free) as corrupting the corresponding struct pages, so this existing debugging functionality is a good fit to extend by also perform struct page checks at least as often as if CONFIG_DEBUG_VM was enabled. Specifically, after this patch, when debug_pagealloc is enabled on boot, and CONFIG_DEBUG_VM disabled, pages are checked when allocated from or freed to the pcplists *in addition* to being moved between pcplists and free lists. When both debug_pagealloc and CONFIG_DEBUG_VM are enabled, pages are checked when being moved between pcplists and free lists *in addition* to when allocated from or freed to the pcplists. When debug_pagealloc is not enabled on boot, the overhead in fast paths should be virtually none thanks to the use of static key. Link: http://lkml.kernel.org/r/20190603143451.27353-3-vbabka@suse.cz Signed-off-by: Vlastimil Babka Reviewed-by: Andrew Morton Cc: Mel Gorman Cc: Joonsoo Kim Cc: "Kirill A. Shutemov" Cc: Matthew Wilcox Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/Kconfig.debug | 13 +++++++++---- mm/page_alloc.c | 53 +++++++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 52 insertions(+), 14 deletions(-) commit 96a2b03f281d3a3b29c27028164f43090d6495b9 Author: Vlastimil Babka Date: Thu Jul 11 20:55:06 2019 -0700 mm, debug_pagelloc: use static keys to enable debugging Patch series "debug_pagealloc improvements". I have been recently debugging some pcplist corruptions, where it would be useful to perform struct page checks immediately as pages are allocated from and freed to pcplists, which is now only possible by rebuilding the kernel with CONFIG_DEBUG_VM (details in Patch 2 changelog). To make this kind of debugging simpler in future on a distro kernel, I have improved CONFIG_DEBUG_PAGEALLOC so that it has even smaller overhead when not enabled at boot time (Patch 1) and also when enabled (Patch 3), and extended it to perform the struct page checks more often when enabled (Patch 2). Now it can be configured in when building a distro kernel without extra overhead, and debugging page use after free or double free can be enabled simply by rebooting with debug_pagealloc=on. This patch (of 3): CONFIG_DEBUG_PAGEALLOC has been redesigned by 031bc5743f15 ("mm/debug-pagealloc: make debug-pagealloc boottime configurable") to allow being always enabled in a distro kernel, but only perform its expensive functionality when booted with debug_pagelloc=on. We can further reduce the overhead when not boot-enabled (including page allocator fast paths) using static keys. This patch introduces one for debug_pagealloc core functionality, and another for the optional guard page functionality (enabled by booting with debug_guardpage_minorder=X). Link: http://lkml.kernel.org/r/20190603143451.27353-2-vbabka@suse.cz Signed-off-by: Vlastimil Babka Reviewed-by: Andrew Morton Cc: Joonsoo Kim Cc: "Kirill A. Shutemov" Cc: Michal Hocko Cc: Vlastimil Babka Cc: Matthew Wilcox Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm.h | 15 +++++++++++---- mm/page_alloc.c | 23 +++++++++++++++++------ 2 files changed, 28 insertions(+), 10 deletions(-) commit a9659476d4b391aec3f5357f176b63b9f8c46231 Author: Nicolas Boichat Date: Thu Jul 11 20:55:03 2019 -0700 mm/failslab.c: by default, do not fail allocations with direct reclaim only When failslab was originally written, the intention of the "ignore-gfp-wait" flag default value ("N") was to fail GFP_ATOMIC allocations. Those were defined as (__GFP_HIGH), and the code would test for __GFP_WAIT (0x10u). However, since then, __GFP_WAIT was replaced by __GFP_RECLAIM (___GFP_DIRECT_RECLAIM|___GFP_KSWAPD_RECLAIM), and GFP_ATOMIC is now defined as (__GFP_HIGH|__GFP_ATOMIC|__GFP_KSWAPD_RECLAIM). This means that when the flag is false, almost no allocation ever fails (as even GFP_ATOMIC allocations contain ___GFP_KSWAPD_RECLAIM). Restore the original intent of the code, by ignoring calls that directly reclaim only (__GFP_DIRECT_RECLAIM), and thus, failing GFP_ATOMIC calls again by default. Link: http://lkml.kernel.org/r/20190520214514.81360-1-drinkcat@chromium.org Fixes: 71baba4b92dc1fa1 ("mm, page_alloc: rename __GFP_WAIT to __GFP_RECLAIM") Signed-off-by: Nicolas Boichat Reviewed-by: Akinobu Mita Acked-by: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/failslab.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f445884562dd8bc51eb4136bd21f014403d1813d Author: Andrew Morton Date: Thu Jul 11 20:54:59 2019 -0700 include/linux/pagemap.h: document trylock_page() return value Cc: Henry Burns Cc: Jonathan Adams Cc: David Rientjes Cc: Mike Rapoport Cc: Vitaly Wool Cc: Xidong Wang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/pagemap.h | 3 +++ 1 file changed, 3 insertions(+) commit 98ef2046f28b642ad35935972a173194ea58a21d Author: Denis Efremov Date: Thu Jul 11 20:54:56 2019 -0700 mm: remove the exporting of totalram_pages Previously totalram_pages was the global variable. Currently, totalram_pages is the static inline function from the include/linux/mm.h However, the function is also marked as EXPORT_SYMBOL, which is at best an odd combination. Because there is no point for the static inline function from a public header to be exported, this commit removes the EXPORT_SYMBOL() marking. It will be still possible to use the function in modules because all the symbols it depends on are exported. Link: http://lkml.kernel.org/r/20190710141031.15642-1-efremov@linux.com Fixes: ca79b0c211af6 ("mm: convert totalram_pages and totalhigh_pages variables to atomic") Signed-off-by: Denis Efremov Acked-by: Michal Hocko Cc: Vlastimil Babka Cc: Oscar Salvador Cc: Pavel Tatashin Cc: Mel Gorman Cc: Mike Rapoport Cc: Alexander Duyck Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 2 -- 1 file changed, 2 deletions(-) commit 51b176290496518d6701bc40e63f70e4b6870198 Author: Sebastian Andrzej Siewior Date: Thu Jul 11 20:54:52 2019 -0700 include/linux/vmpressure.h: use spinlock_t instead of struct spinlock For spinlocks the type spinlock_t should be used instead of "struct spinlock". Use spinlock_t for spinlock's definition. Link: http://lkml.kernel.org/r/20190704153803.12739-3-bigeasy@linutronix.de Signed-off-by: Sebastian Andrzej Siewior Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/vmpressure.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1fcf0a561cd09d7fb7f7afa2ddfe05f72f32050e Author: Pingfan Liu Date: Thu Jul 11 20:54:49 2019 -0700 mm/page_isolation.c: change the prototype of undo_isolate_page_range() undo_isolate_page_range() never fails, so no need to return value. Link: http://lkml.kernel.org/r/1562075604-8979-1-git-send-email-kernelfans@gmail.com Signed-off-by: Pingfan Liu Acked-by: Michal Hocko Reviewed-by: Oscar Salvador Reviewed-by: Anshuman Khandual Cc: Qian Cai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/page-isolation.h | 2 +- mm/page_isolation.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) commit ac1c3e49a9a734150b33297eeca5b43d92fd5be8 Author: Christoph Hellwig Date: Thu Jul 11 20:54:46 2019 -0700 mm: remove the account_page_dirtied export account_page_dirtied() is only used by our set_page_dirty() helpers and should not be used anywhere else. Link: http://lkml.kernel.org/r/20190605183702.30572-1-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page-writeback.c | 1 - 1 file changed, 1 deletion(-) commit 219f8a2e25f0abbe222b170a0de2fd38c22d43ad Author: Alexey Dobriyan Date: Thu Jul 11 20:54:43 2019 -0700 include/linux/mm_types.h: ifdef struct vm_area_struct::swap_readahead_info The field is only used in swap code. Link: http://lkml.kernel.org/r/20190503190500.GA30589@avx2 Signed-off-by: Alexey Dobriyan Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm_types.h | 2 ++ 1 file changed, 2 insertions(+) commit 442a5a9a9295bfd9b0cffd0691ef8a6ce81db7c4 Author: Jason Gunthorpe Date: Thu Jul 11 20:54:40 2019 -0700 mm: make !CONFIG_HUGE_PAGE wrappers into static inlines Instead of using defines, which loses type safety and provokes unused variable warnings from gcc, put the constants into static inlines. Link: http://lkml.kernel.org/r/20190522235102.GA15370@mellanox.com Signed-off-by: Jason Gunthorpe Suggested-by: Andrew Morton Reviewed-by: Mike Kravetz Cc: Jerome Glisse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/hugetlb.h | 102 ++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 86 insertions(+), 16 deletions(-) commit 465fc3a9b3129722b0df395529b3894b0b90d2de Author: Miklos Szeredi Date: Thu Jul 11 20:54:37 2019 -0700 mm/memory.c: trivial clean up in insert_page() Make the success case use the same cleanup path as the failure case. Link: http://lkml.kernel.org/r/20190523134024.GC24093@localhost.localdomain Signed-off-by: Miklos Szeredi Reviewed-by: Andrew Morton Reviewed-by: Anshuman Khandual Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory.c | 2 -- 1 file changed, 2 deletions(-) commit a7030aea20d9191c271607aa1478f72a41948b0a Author: Bharath Vedartham Date: Thu Jul 11 20:54:34 2019 -0700 mm/gup.c: make follow_page_mask() static follow_page_mask() is only used in gup.c, make it static. Link: http://lkml.kernel.org/r/20190510190831.GA4061@bharath12345-Inspiron-5559 Signed-off-by: Bharath Vedartham Reviewed-by: Ira Weiny Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/gup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 445676071776de492624a063923736637f9eb3e8 Author: Mike Rapoport Date: Thu Jul 11 20:54:31 2019 -0700 sparc: remove ARCH_SELECT_MEMORY_MODEL The ARCH_SELECT_MEMORY_MODEL option is enabled only for 64-bit. However, 64-bit configuration also enables ARCH_SPARSEMEM_DEFAULT and there is no ARCH_FLATMEM_ENABLE in arch/sparc/Kconfig. With such settings, the dependencies in mm/Kconfig are always evaluated to SPARSEMEM=y for 64-bit and to FLATMEM=y for 32-bit. The ARCH_SELECT_MEMORY_MODEL option in arch/sparc/Kconfig does not affect anything and can be removed. Link: http://lkml.kernel.org/r/1556740577-4140-4-git-send-email-rppt@linux.ibm.com Signed-off-by: Mike Rapoport Cc: Arnd Bergmann Cc: Christoph Hellwig Cc: "David S. Miller" Cc: Heiko Carstens Cc: Russell King Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/sparc/Kconfig | 3 --- 1 file changed, 3 deletions(-) commit a9d8777e397e3d1630377fa1d0f0dea0329057c3 Author: Mike Rapoport Date: Thu Jul 11 20:54:27 2019 -0700 s390: remove ARCH_SELECT_MEMORY_MODEL The only reason s390 has ARCH_SELECT_MEMORY_MODEL option in arch/s390/Kconfig is an ancient compile error with allnoconfig which was fixed by commit 97195d6b411f ("[S390] fix sparsemem related compile error with allnoconfig on s390") by adding the ARCH_SELECT_MEMORY_MODEL option. Since then a lot have changed and now allnoconfig builds just fine without ARCH_SELECT_MEMORY_MODEL, so it can be removed. Link: http://lkml.kernel.org/r/1556740577-4140-3-git-send-email-rppt@linux.ibm.com Signed-off-by: Mike Rapoport Acked-by: Heiko Carstens Cc: Arnd Bergmann Cc: Christoph Hellwig Cc: "David S. Miller" Cc: Russell King Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/s390/Kconfig | 3 --- 1 file changed, 3 deletions(-) commit 03069bb0b19f8c3b6e079099dd8ac5e974756381 Author: Mike Rapoport Date: Thu Jul 11 20:54:24 2019 -0700 arm: remove ARCH_SELECT_MEMORY_MODEL Patch series "remove ARCH_SELECT_MEMORY_MODEL where it has no effect". For several architectures the ARCH_SELECT_MEMORY_MODEL has no real effect because the dependencies for the memory model are always evaluated to a single value. Remove the ARCH_SELECT_MEMORY_MODEL from the Kconfigs for these architectures. This patch (of 3): The ARCH_SELECT_MEMORY_MODEL in arch/arm/Kconfig is enabled only when ARCH_SPARSEMEM_ENABLE=y. But in this case, ARCH_SPARSEMEM_DEFAULT is also enabled and this in turn enables SPARSEMEM_MANUAL. Since there is no definition of ARCH_FLATMEM_ENABLE in arch/arm/Kconfig, SPARSEMEM_MANUAL is the only enabled memory model, hence the final selection will evaluate to SPARSEMEM=y. Since ARCH_SPARSEMEM_ENABLE is set to 'y' only by several sub-arch configurations, the default for must sub-arches would be the falback to FLATMEM regardless of ARCH_SELECT_MEMORY_MODEL. Link: http://lkml.kernel.org/r/1556740577-4140-2-git-send-email-rppt@linux.ibm.com Signed-off-by: Mike Rapoport Cc: Arnd Bergmann Cc: Christoph Hellwig Cc: "David S. Miller" Cc: Heiko Carstens Cc: Russell King Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm/Kconfig | 3 --- 1 file changed, 3 deletions(-) commit 2236b99d6a33df72befa7205c2d8381aca7ae701 Author: Andrew Morton Date: Thu Jul 11 20:54:21 2019 -0700 include/linux/pfn_t.h: remove pfn_t_to_virt() It has no callers and there is no virt_to_pfn_t(). Reported-by: Anshuman Khandual Cc: Dan Williams Cc: Jérôme Glisse Cc: Laurent Dufour Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/pfn_t.h | 7 ------- 1 file changed, 7 deletions(-) commit 0d4ca4c9bab397b525c9a4f875d31410ce4bc738 Author: Marco Elver Date: Thu Jul 11 20:54:18 2019 -0700 mm/kasan: add object validation in ksize() ksize() has been unconditionally unpoisoning the whole shadow memory region associated with an allocation. This can lead to various undetected bugs, for example, double-kzfree(). Specifically, kzfree() uses ksize() to determine the actual allocation size, and subsequently zeroes the memory. Since ksize() used to just unpoison the whole shadow memory region, no invalid free was detected. This patch addresses this as follows: 1. Add a check in ksize(), and only then unpoison the memory region. 2. Preserve kasan_unpoison_slab() semantics by explicitly unpoisoning the shadow memory region using the size obtained from __ksize(). Tested: 1. With SLAB allocator: a) normal boot without warnings; b) verified the added double-kzfree() is detected. 2. With SLUB allocator: a) normal boot without warnings; b) verified the added double-kzfree() is detected. [elver@google.com: s/BUG_ON/WARN_ON_ONCE/, per Kees] Link: http://lkml.kernel.org/r/20190627094445.216365-6-elver@google.com Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=199359 Link: http://lkml.kernel.org/r/20190626142014.141844-6-elver@google.com Signed-off-by: Marco Elver Acked-by: Kees Cook Reviewed-by: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Alexander Potapenko Cc: Andrey Konovalov Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Mark Rutland Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/kasan.h | 7 +++++-- mm/slab_common.c | 22 +++++++++++++++++++++- 2 files changed, 26 insertions(+), 3 deletions(-) commit 10d1f8cb3965a6f633bf23eb984cda552927e3a5 Author: Marco Elver Date: Thu Jul 11 20:54:14 2019 -0700 mm/slab: refactor common ksize KASAN logic into slab_common.c This refactors common code of ksize() between the various allocators into slab_common.c: __ksize() is the allocator-specific implementation without instrumentation, whereas ksize() includes the required KASAN logic. Link: http://lkml.kernel.org/r/20190626142014.141844-5-elver@google.com Signed-off-by: Marco Elver Acked-by: Christoph Lameter Reviewed-by: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Alexander Potapenko Cc: Andrey Konovalov Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Mark Rutland Cc: Kees Cook Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/slab.h | 1 + mm/slab.c | 22 +++++----------------- mm/slab_common.c | 26 ++++++++++++++++++++++++++ mm/slob.c | 4 ++-- mm/slub.c | 14 ++------------ 5 files changed, 36 insertions(+), 31 deletions(-) commit bb104ed78552147bed3a981fdada622afd2084b6 Author: Marco Elver Date: Thu Jul 11 20:54:11 2019 -0700 lib/test_kasan: Add test for double-kzfree detection Add a simple test that checks if double-kzfree is being detected correctly. Link: http://lkml.kernel.org/r/20190626142014.141844-4-elver@google.com Signed-off-by: Marco Elver Reviewed-by: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Alexander Potapenko Cc: Andrey Konovalov Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Mark Rutland Cc: Kees Cook Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/test_kasan.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit b5f6e0fc7d60e0234dac82498e90dfe9027bad1f Author: Marco Elver Date: Thu Jul 11 20:54:07 2019 -0700 mm/kasan: change kasan_check_{read,write} to return boolean This changes {,__}kasan_check_{read,write} functions to return a boolean denoting if the access was valid or not. [sfr@canb.auug.org.au: include types.h for "bool"] Link: http://lkml.kernel.org/r/20190705184949.13cdd021@canb.auug.org.au Link: http://lkml.kernel.org/r/20190626142014.141844-3-elver@google.com Signed-off-by: Marco Elver Signed-off-by: Stephen Rothwell Reviewed-by: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Alexander Potapenko Cc: Andrey Konovalov Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Mark Rutland Cc: Kees Cook Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/kasan-checks.h | 30 ++++++++++++++++++++---------- mm/kasan/common.c | 8 ++++---- mm/kasan/generic.c | 13 +++++++------ mm/kasan/kasan.h | 10 +++++++++- mm/kasan/tags.c | 12 +++++++----- 5 files changed, 47 insertions(+), 26 deletions(-) commit 7d8ad890dad00f6cd64bfb44d9be4fceb10cf819 Author: Marco Elver Date: Thu Jul 11 20:54:03 2019 -0700 mm/kasan: introduce __kasan_check_{read,write} Patch series "mm/kasan: Add object validation in ksize()", v3. This patch (of 5): This introduces __kasan_check_{read,write}. __kasan_check functions may be used from anywhere, even compilation units that disable instrumentation selectively. This change eliminates the need for the __KASAN_INTERNAL definition. [elver@google.com: v5] Link: http://lkml.kernel.org/r/20190708170706.174189-2-elver@google.com Link: http://lkml.kernel.org/r/20190626142014.141844-2-elver@google.com Signed-off-by: Marco Elver Acked-by: Mark Rutland Reviewed-by: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Alexander Potapenko Cc: Andrey Konovalov Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Kees Cook Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/kasan-checks.h | 25 ++++++++++++++++++++++--- mm/kasan/common.c | 10 ++++------ 2 files changed, 26 insertions(+), 9 deletions(-) commit 751ad98d5f881df91ba47e013b82422912381e8e Author: Marco Elver Date: Thu Jul 11 20:54:00 2019 -0700 asm-generic, x86: add bitops instrumentation for KASAN This adds a new header to asm-generic to allow optionally instrumenting architecture-specific asm implementations of bitops. This change includes the required change for x86 as reference and changes the kernel API doc to point to bitops-instrumented.h instead. Rationale: the functions in x86's bitops.h are no longer the kernel API functions, but instead the arch_ prefixed functions, which are then instrumented via bitops-instrumented.h. Other architectures can similarly add support for asm implementations of bitops. The documentation text was derived from x86 and existing bitops asm-generic versions: 1) references to x86 have been removed; 2) as a result, some of the text had to be reworded for clarity and consistency. Tested using lib/test_kasan with bitops tests (pre-requisite patch). Bugzilla ref: https://bugzilla.kernel.org/show_bug.cgi?id=198439 Link: http://lkml.kernel.org/r/20190613125950.197667-4-elver@google.com Signed-off-by: Marco Elver Acked-by: Mark Rutland Reviewed-by: Andrey Ryabinin Cc: Alexander Potapenko Cc: Andrey Konovalov Cc: Arnd Bergmann Cc: Borislav Petkov Cc: Dmitry Vyukov Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jonathan Corbet Cc: Josh Poimboeuf Cc: Peter Zijlstra (Intel) Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/core-api/kernel-api.rst | 2 +- arch/x86/include/asm/bitops.h | 189 +++++---------------- include/asm-generic/bitops-instrumented.h | 263 ++++++++++++++++++++++++++++++ 3 files changed, 302 insertions(+), 152 deletions(-) commit ff66135015726696568e998720d9b6afe2d04642 Author: Marco Elver Date: Thu Jul 11 20:53:56 2019 -0700 x86: use static_cpu_has in uaccess region to avoid instrumentation This patch is a pre-requisite for enabling KASAN bitops instrumentation; using static_cpu_has instead of boot_cpu_has avoids instrumentation of test_bit inside the uaccess region. With instrumentation, the KASAN check would otherwise be flagged by objtool. For consistency, kernel/signal.c was changed to mirror this change, however, is never instrumented with KASAN (currently unsupported under x86 32bit). Link: http://lkml.kernel.org/r/20190613125950.197667-3-elver@google.com Signed-off-by: Marco Elver Suggested-by: H. Peter Anvin Acked-by: Peter Zijlstra (Intel) Reviewed-by: Andrey Ryabinin Cc: Alexander Potapenko Cc: Andrey Konovalov Cc: Arnd Bergmann Cc: Borislav Petkov Cc: Dmitry Vyukov Cc: Ingo Molnar Cc: Jonathan Corbet Cc: Josh Poimboeuf Cc: Mark Rutland Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/ia32/ia32_signal.c | 2 +- arch/x86/kernel/signal.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 19a33ca6c209f5e22c73b6beb4b1974153e93050 Author: Marco Elver Date: Thu Jul 11 20:53:52 2019 -0700 lib/test_kasan: add bitops tests Patch series "Bitops instrumentation for KASAN", v5. This patch (of 3): This adds bitops tests to the test_kasan module. In a follow-up patch, support for bitops instrumentation will be added. Link: http://lkml.kernel.org/r/20190613125950.197667-2-elver@google.com Signed-off-by: Marco Elver Acked-by: Mark Rutland Reviewed-by: Andrey Ryabinin Cc: Peter Zijlstra (Intel) Cc: Dmitry Vyukov Cc: Alexander Potapenko Cc: Andrey Konovalov Cc: "H. Peter Anvin" Cc: Jonathan Corbet Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Arnd Bergmann Cc: Josh Poimboeuf Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/test_kasan.c | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 78 insertions(+), 3 deletions(-) commit e89692190065c12386bd37272ae8b7d142dd079f Author: Marco Elver Date: Thu Jul 11 20:53:49 2019 -0700 mm/kasan: print frame description for stack bugs This adds support for printing stack frame description on invalid stack accesses. The frame description is embedded by the compiler, which is parsed and then pretty-printed. Currently, we can only print the stack frame info for accesses to the task's own stack, but not accesses to other tasks' stacks. Example of what it looks like: page dumped because: kasan: bad access detected addr ffff8880673ef98a is located in stack of task insmod/2008 at offset 106 in frame: kasan_stack_oob+0x0/0xf5 [test_kasan] this frame has 2 objects: [32, 36) 'i' [96, 106) 'stack_array' Memory state around the buggy address: Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=198435 Link: http://lkml.kernel.org/r/20190522100048.146841-1-elver@google.com Signed-off-by: Marco Elver Reviewed-by: Andrey Ryabinin Cc: Alexander Potapenko Cc: Dmitry Vyukov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/kasan/kasan.h | 5 ++ mm/kasan/report.c | 165 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 170 insertions(+) commit b7c3613e685076bad6e5540501d84cc31bb30377 Author: André Almeida Date: Thu Jul 11 20:53:46 2019 -0700 docs: kmemleak: add more documentation details Wikipedia now has a main article to "tracing garbage collector" topic. Change the URL and use the reStructuredText syntax for hyperlinks and add more details about the use of the tool. Add a section about how to use the kmemleak-test module to test the memory leak scanning. Link: http://lkml.kernel.org/r/20190612155231.19448-2-andrealmeid@collabora.com Signed-off-by: André Almeida Acked-by: Catalin Marinas Cc: Jonathan Corbet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/dev-tools/kmemleak.rst | 48 +++++++++++++++++++++++++++++++++--- 1 file changed, 44 insertions(+), 4 deletions(-) commit 4e4dfce2278929de4379cdcfa2335dad7a6c4aa0 Author: André Almeida Date: Thu Jul 11 20:53:43 2019 -0700 mm/kmemleak.c: change error at _write when kmemleak is disabled According to POSIX, EBUSY means that the "device or resource is busy", and this can lead to people thinking that the file `/sys/kernel/debug/kmemleak/` is somehow locked or being used by other process. Change this error code to a more appropriate one. Link: http://lkml.kernel.org/r/20190612155231.19448-1-andrealmeid@collabora.com Signed-off-by: André Almeida Reviewed-by: Andrew Morton Acked-by: Catalin Marinas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/kmemleak.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ef9056952532c3b746de46aa10d45b4d7797bd8 Author: Dmitry Vyukov Date: Thu Jul 11 20:53:39 2019 -0700 mm/kmemleak.c: fix check for softirq context in_softirq() is a wrong predicate to check if we are in a softirq context. It also returns true if we have BH disabled, so objects are falsely stamped with "softirq" comm. The correct predicate is in_serving_softirq(). If user does cat from /sys/kernel/debug/kmemleak previously they would see this, which is clearly wrong, this is system call context (see the comm): unreferenced object 0xffff88805bd661c0 (size 64): comm "softirq", pid 0, jiffies 4294942959 (age 12.400s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 ff ff ff ff 00 00 00 00 ................ 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ................ backtrace: [<0000000007dcb30c>] kmemleak_alloc_recursive include/linux/kmemleak.h:55 [inline] [<0000000007dcb30c>] slab_post_alloc_hook mm/slab.h:439 [inline] [<0000000007dcb30c>] slab_alloc mm/slab.c:3326 [inline] [<0000000007dcb30c>] kmem_cache_alloc_trace+0x13d/0x280 mm/slab.c:3553 [<00000000969722b7>] kmalloc include/linux/slab.h:547 [inline] [<00000000969722b7>] kzalloc include/linux/slab.h:742 [inline] [<00000000969722b7>] ip_mc_add1_src net/ipv4/igmp.c:1961 [inline] [<00000000969722b7>] ip_mc_add_src+0x36b/0x400 net/ipv4/igmp.c:2085 [<00000000a4134b5f>] ip_mc_msfilter+0x22d/0x310 net/ipv4/igmp.c:2475 [<00000000d20248ad>] do_ip_setsockopt.isra.0+0x19fe/0x1c00 net/ipv4/ip_sockglue.c:957 [<000000003d367be7>] ip_setsockopt+0x3b/0xb0 net/ipv4/ip_sockglue.c:1246 [<000000003c7c76af>] udp_setsockopt+0x4e/0x90 net/ipv4/udp.c:2616 [<000000000c1aeb23>] sock_common_setsockopt+0x3e/0x50 net/core/sock.c:3130 [<000000000157b92b>] __sys_setsockopt+0x9e/0x120 net/socket.c:2078 [<00000000a9f3d058>] __do_sys_setsockopt net/socket.c:2089 [inline] [<00000000a9f3d058>] __se_sys_setsockopt net/socket.c:2086 [inline] [<00000000a9f3d058>] __x64_sys_setsockopt+0x26/0x30 net/socket.c:2086 [<000000001b8da885>] do_syscall_64+0x7c/0x1a0 arch/x86/entry/common.c:301 [<00000000ba770c62>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 now they will see this: unreferenced object 0xffff88805413c800 (size 64): comm "syz-executor.4", pid 8960, jiffies 4294994003 (age 14.350s) hex dump (first 32 bytes): 00 7a 8a 57 80 88 ff ff e0 00 00 01 00 00 00 00 .z.W............ 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ................ backtrace: [<00000000c5d3be64>] kmemleak_alloc_recursive include/linux/kmemleak.h:55 [inline] [<00000000c5d3be64>] slab_post_alloc_hook mm/slab.h:439 [inline] [<00000000c5d3be64>] slab_alloc mm/slab.c:3326 [inline] [<00000000c5d3be64>] kmem_cache_alloc_trace+0x13d/0x280 mm/slab.c:3553 [<0000000023865be2>] kmalloc include/linux/slab.h:547 [inline] [<0000000023865be2>] kzalloc include/linux/slab.h:742 [inline] [<0000000023865be2>] ip_mc_add1_src net/ipv4/igmp.c:1961 [inline] [<0000000023865be2>] ip_mc_add_src+0x36b/0x400 net/ipv4/igmp.c:2085 [<000000003029a9d4>] ip_mc_msfilter+0x22d/0x310 net/ipv4/igmp.c:2475 [<00000000ccd0a87c>] do_ip_setsockopt.isra.0+0x19fe/0x1c00 net/ipv4/ip_sockglue.c:957 [<00000000a85a3785>] ip_setsockopt+0x3b/0xb0 net/ipv4/ip_sockglue.c:1246 [<00000000ec13c18d>] udp_setsockopt+0x4e/0x90 net/ipv4/udp.c:2616 [<0000000052d748e3>] sock_common_setsockopt+0x3e/0x50 net/core/sock.c:3130 [<00000000512f1014>] __sys_setsockopt+0x9e/0x120 net/socket.c:2078 [<00000000181758bc>] __do_sys_setsockopt net/socket.c:2089 [inline] [<00000000181758bc>] __se_sys_setsockopt net/socket.c:2086 [inline] [<00000000181758bc>] __x64_sys_setsockopt+0x26/0x30 net/socket.c:2086 [<00000000d4b73623>] do_syscall_64+0x7c/0x1a0 arch/x86/entry/common.c:301 [<00000000c1098bec>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 Link: http://lkml.kernel.org/r/20190517171507.96046-1-dvyukov@gmail.com Signed-off-by: Dmitry Vyukov Acked-by: Catalin Marinas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/kmemleak.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cb097cd48313575b03a5de092a04f6af8aa0739e Author: Shakeel Butt Date: Thu Jul 11 20:53:36 2019 -0700 slub: don't panic for memcg kmem cache creation failure Currently for CONFIG_SLUB, if a memcg kmem cache creation is failed and the corresponding root kmem cache has SLAB_PANIC flag, the kernel will be crashed. This is unnecessary as the kernel can handle the creation failures of memcg kmem caches. Additionally CONFIG_SLAB does not implement this behavior. So, to keep the behavior consistent between SLAB and SLUB, removing the panic for memcg kmem cache creation failures. The root kmem cache creation failure for SLAB_PANIC correctly panics for both SLAB and SLUB. Link: http://lkml.kernel.org/r/20190619232514.58994-1-shakeelb@google.com Reported-by: Dave Hansen Signed-off-by: Shakeel Butt Acked-by: David Rientjes Acked-by: Michal Hocko Cc: Alexey Dobriyan Cc: Johannes Weiner Cc: Christoph Lameter Cc: Roman Gushchin Cc: Pekka Enberg Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slub.c | 4 ---- 1 file changed, 4 deletions(-) commit 9cf3a8d847bd08977dc168ed243ffbef3c456d88 Author: Yury Norov Date: Thu Jul 11 20:53:33 2019 -0700 mm/slub.c: avoid double string traverse in kmem_cache_flags() If ',' is not found, kmem_cache_flags() calls strlen() to find the end of line. We can do it in a single pass using strchrnul(). Link: http://lkml.kernel.org/r/20190501053111.7950-1-ynorov@marvell.com Signed-off-by: Yury Norov Acked-by: Aaron Tomlin Reviewed-by: Andrew Morton Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slub.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 966fede8e4be15bcc08e3c390080d3f9072a5367 Author: Kees Cook Date: Thu Jul 11 20:53:29 2019 -0700 lkdtm/heap: add tests for freelist hardening This adds tests for double free and cross-cache freeing, which should both be caught by CONFIG_SLAB_FREELIST_HARDENED. Link: http://lkml.kernel.org/r/20190530045017.15252-4-keescook@chromium.org Signed-off-by: Kees Cook Cc: Alexander Popov Cc: Alexander Potapenko Cc: Christoph Lameter Cc: David Rientjes Cc: Greg Kroah-Hartman Cc: Joonsoo Kim Cc: Matthew Wilcox Cc: Pekka Enberg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/misc/lkdtm/core.c | 5 ++++ drivers/misc/lkdtm/heap.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++ drivers/misc/lkdtm/lkdtm.h | 5 ++++ 3 files changed, 82 insertions(+) commit a64b53780ec35b77daf817210c88aa42d172c98f Author: Kees Cook Date: Thu Jul 11 20:53:26 2019 -0700 mm/slab: sanity-check page type when looking up cache This avoids any possible type confusion when looking up an object. For example, if a non-slab were to be passed to kfree(), the invalid slab_cache pointer (i.e. overlapped with some other value from the struct page union) would be used for subsequent slab manipulations that could lead to further memory corruption. Since the page is already in cache, adding the PageSlab() check will have nearly zero cost, so add a check and WARN() to virt_to_cache(). Additionally replaces an open-coded virt_to_cache(). To support the failure mode this also updates all callers of virt_to_cache() and cache_from_obj() to handle a NULL cache pointer return value (though note that several already handle this case gracefully). [dan.carpenter@oracle.com: restore IRQs in kfree()] Link: http://lkml.kernel.org/r/20190613065637.GE16334@mwanda Link: http://lkml.kernel.org/r/20190530045017.15252-3-keescook@chromium.org Signed-off-by: Kees Cook Signed-off-by: Dan Carpenter Cc: Alexander Popov Cc: Alexander Potapenko Cc: Christoph Lameter Cc: David Rientjes Cc: Greg Kroah-Hartman Cc: Joonsoo Kim Cc: Matthew Wilcox Cc: Pekka Enberg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab.c | 16 +++++++++------- mm/slab.h | 17 +++++++++++++---- 2 files changed, 22 insertions(+), 11 deletions(-) commit 598a0717a816abc8f5d3c4598628338b9190d127 Author: Kees Cook Date: Thu Jul 11 20:53:23 2019 -0700 mm/slab: validate cache membership under freelist hardening Patch series "mm/slab: Improved sanity checking". This adds defenses against slab cache confusion (as seen in real-world exploits[1]) and gracefully handles type confusions when trying to look up slab caches from an arbitrary page. (Also is patch 3: new LKDTM tests for these defenses as well as for the existing double-free detection. This patch (of 3): When building under CONFIG_SLAB_FREELIST_HARDENING, it makes sense to perform sanity-checking on the assumed slab cache during kmem_cache_free() to make sure the kernel doesn't mix freelists across slab caches and corrupt memory (as seen in the exploitation of flaws like CVE-2018-9568[1]). Note that the prior code might WARN() but still corrupt memory (i.e. return the assumed cache instead of the owned cache). There is no noticeable performance impact (changes are within noise). Measuring parallel kernel builds, I saw the following with CONFIG_SLAB_FREELIST_HARDENED, before and after this patch: before: Run times: 288.85 286.53 287.09 287.07 287.21 Min: 286.53 Max: 288.85 Mean: 287.35 Std Dev: 0.79 after: Run times: 289.58 287.40 286.97 287.20 287.01 Min: 286.97 Max: 289.58 Mean: 287.63 Std Dev: 0.99 Delta: 0.1% which is well below the standard deviation [1] https://github.com/ThomasKing2014/slides/raw/master/Building%20universal%20Android%20rooting%20with%20a%20type%20confusion%20vulnerability.pdf Link: http://lkml.kernel.org/r/20190530045017.15252-2-keescook@chromium.org Signed-off-by: Kees Cook Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Matthew Wilcox Cc: Alexander Popov Cc: Alexander Potapenko Cc: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit d8b2fa657deaa73ff70d40aea9a54997fc0c7fc9 Author: Fuqian Huang Date: Thu Jul 11 20:53:19 2019 -0700 ocfs2: use kmemdup rather than duplicating its implementation kmemdup is introduced to duplicate a region of memory in a neat way. Rather than kmalloc/kzalloc + memcpy, which the programmer needs to write the size twice (sometimes lead to mistakes), kmemdup improves readability, leads to smaller code and also reduce the chances of mistakes. Suggestion to use kmemdup rather than using kmalloc/kzalloc + memcpy. [akpm@linux-foundation.org: coding style fixes] Link: http://lkml.kernel.org/r/20190703163147.881-1-huangfq.daxian@gmail.com Signed-off-by: Fuqian Huang Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Gang He Cc: Jun Piao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/alloc.c | 10 +++++----- fs/ocfs2/localalloc.c | 6 ++---- 2 files changed, 7 insertions(+), 9 deletions(-) commit 4658d87cb38cb3ab3a234d1b8d63f65df4cce62b Author: Hariprasad Kelam Date: Thu Jul 11 20:53:16 2019 -0700 fs/ocfs2/dlmglue.c: unneeded variable: "status" fix below issue reported by coccicheck fs/ocfs2/dlmglue.c:4410:5-11: Unneeded variable: "status". Return "0" on line 4428 We can not change return type of ocfs2_downconvert_thread as its registered as callback of kthread_create. Link: http://lkml.kernel.org/r/20190702183237.GA13975@hari-Inspiron-1545 Signed-off-by: Hariprasad Kelam Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Gang He Cc: Jun Piao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/dlmglue.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e581595ea29c737587bcc349420bfdacb9a6b02b Author: Greg Kroah-Hartman Date: Thu Jul 11 20:53:12 2019 -0700 ocfs: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Also, because there is no need to save the file dentry, remove all of the variables that were being saved, and just recursively delete the whole directory when shutting down, saving a lot of logic and local variables. [gregkh@linuxfoundation.org: v2] Link: http://lkml.kernel.org/r/20190613055455.GE19717@kroah.com Link: http://lkml.kernel.org/r/20190612152912.GA19151@kroah.com Signed-off-by: Greg Kroah-Hartman Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Joseph Qi Cc: Jia Guo Cc: Junxiao Bi Cc: Changwei Ge Cc: Gang He Cc: Jun Piao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/blockcheck.c | 56 ++++++----------------- fs/ocfs2/blockcheck.h | 7 +-- fs/ocfs2/cluster/heartbeat.c | 100 +++++++++++------------------------------ fs/ocfs2/cluster/heartbeat.h | 2 +- fs/ocfs2/cluster/netdebug.c | 39 +++++----------- fs/ocfs2/cluster/nodemanager.c | 4 +- fs/ocfs2/cluster/tcp.c | 3 +- fs/ocfs2/cluster/tcp.h | 5 +-- fs/ocfs2/dlm/dlmdebug.c | 44 +++--------------- fs/ocfs2/dlm/dlmdebug.h | 10 ++--- fs/ocfs2/dlm/dlmdomain.c | 10 +---- fs/ocfs2/dlmglue.c | 25 +---------- fs/ocfs2/super.c | 29 ++---------- 13 files changed, 73 insertions(+), 261 deletions(-) commit 5da844a2c7df642de2618fc3efe9a92eec40899d Author: Gang He Date: Thu Jul 11 20:53:09 2019 -0700 ocfs2: add first lock wait time in locking_state ocfs2 file system uses locking_state file under debugfs to dump each ocfs2 file system's dlm lock resources, but the users ever encountered some hang(deadlock) problems in ocfs2 file system. I'd like to add first lock wait time in locking_state file, which can help the upper scripts detect these deadlock problems via comparing the first lock wait time with the current time. Link: http://lkml.kernel.org/r/20190611015414.27754-3-ghe@suse.com Signed-off-by: Gang He Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Gang He Cc: Jun Piao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/dlmglue.c | 32 +++++++++++++++++++++++++++++--- fs/ocfs2/ocfs2.h | 1 + 2 files changed, 30 insertions(+), 3 deletions(-) commit 8056773ac4b42f36bae6406030218a5f12749c64 Author: Gang He Date: Thu Jul 11 20:53:05 2019 -0700 ocfs2: add locking filter debugfs file Add locking filter debugfs file, which is used to filter lock resources dump from locking_state debugfs file. We use d_filter_secs field to filter lock resources dump, the default d_filter_secs(0) value filters nothing, otherwise, only dump the last N seconds active lock resources. This enhancement can avoid dumping lots of old records. The d_filter_secs value can be changed via locking_filter file. [akpm@linux-foundation.org: fix undefined reference to `__udivdi3'] Link: http://lkml.kernel.org/r/20190611015414.27754-2-ghe@suse.com Signed-off-by: Gang He Reviewed-by: Joseph Qi Acked-by: Randy Dunlap [build-tested] Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Gang He Cc: Jun Piao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/dlmglue.c | 38 ++++++++++++++++++++++++++++++++++++++ fs/ocfs2/ocfs2.h | 2 ++ 2 files changed, 40 insertions(+) commit 8a7f5f4c26dd4e969b5f3b30d06c54dc6a520eda Author: Gang He Date: Thu Jul 11 20:53:02 2019 -0700 ocfs2: add last unlock times in locking_state ocfs2 file system uses locking_state file under debugfs to dump each ocfs2 file system's dlm lock resources, but the dlm lock resources in memory are becoming more and more after the files were touched by the user. it will become a bit difficult to analyze these dlm lock resource records in locking_state file by the upper scripts, though some files are not active for now, which were accessed long time ago. Then, I'd like to add last pr/ex unlock times in locking_state file for each dlm lock resource record, the the upper scripts can use last unlock time to filter inactive dlm lock resource record. Link: http://lkml.kernel.org/r/20190611015414.27754-1-ghe@suse.com Signed-off-by: Gang He Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Gang He Cc: Jun Piao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/dlmglue.c | 18 +++++++++++++++--- fs/ocfs2/ocfs2.h | 1 + 2 files changed, 16 insertions(+), 3 deletions(-) commit 0e71666b8b9e21e4cb5d805219eb5ed7c5617ca3 Author: Gustavo A. R. Silva Date: Thu Jul 11 20:52:58 2019 -0700 ocfs2/dlm: use struct_size() helper One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct dlm_migratable_lockres { ... struct dlm_migratable_lock ml[0]; // 16 bytes each, begins at byte 112 }; Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. So, replace the following form: sizeof(struct dlm_migratable_lockres) + (mres->num_locks * sizeof(struct dlm_migratable_lock)) with: struct_size(mres, ml, mres->num_locks) Notice that, in this case, variable sz is not necessary, hence it is removed. This code was detected with the help of Coccinelle. Link: http://lkml.kernel.org/r/20190605204926.GA24467@embeddedor Signed-off-by: Gustavo A. R. Silva Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Gang He Cc: Jun Piao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/dlm/dlmrecovery.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit e926d8a1e8675422e53104855a7bedec82fb570f Author: ChenGang Date: Thu Jul 11 20:52:55 2019 -0700 fs: ocfs: fix spelling mistake "hearbeating" -> "heartbeat" There are some spelling mistakes in ocfs, fix it. Link: http://lkml.kernel.org/r/1558964623-106628-1-git-send-email-cg.chen@huawei.com Signed-off-by: ChenGang Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Joseph Qi Cc: Changwei Ge Cc: Gang He Cc: Jun Piao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/cluster/heartbeat.c | 2 +- fs/ocfs2/cluster/quorum.c | 2 +- fs/ocfs2/cluster/tcp.c | 2 +- fs/ocfs2/dlm/dlmmaster.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 733f0025f0fb43e382b84db0930ae502099b7e62 Author: Sam Ravnborg Date: Thu Jul 11 20:52:52 2019 -0700 sh: prevent warnings when using iounmap When building drm/exynos for sh, as part of an allmodconfig build, the following warning triggered: exynos7_drm_decon.c: In function `decon_remove': exynos7_drm_decon.c:769:24: warning: unused variable `ctx' struct decon_context *ctx = dev_get_drvdata(&pdev->dev); The ctx variable is only used as argument to iounmap(). In sh - allmodconfig CONFIG_MMU is not defined so it ended up in: \#define __iounmap(addr) do { } while (0) \#define iounmap __iounmap Fix the warning by introducing a static inline function for iounmap. This is similar to several other architectures. Link: http://lkml.kernel.org/r/20190622114208.24427-1-sam@ravnborg.org Signed-off-by: Sam Ravnborg Reviewed-by: Geert Uytterhoeven Cc: Yoshinori Sato Cc: Rich Felker Cc: Will Deacon Cc: Mark Brown Cc: Inki Dae Cc: Krzysztof Kozlowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/sh/include/asm/io.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 410615478667e5ed374755cafea60917ec322b64 Author: Krzysztof Kozlowski Date: Thu Jul 11 20:52:48 2019 -0700 sh: config: remove left-over BACKLIGHT_LCD_SUPPORT CONFIG_BACKLIGHT_LCD_SUPPORT was removed in 8c5dc8d9f19c ("video: backlight: Remove useless BACKLIGHT_LCD_SUPPORT kernel symbol"). Options protected by CONFIG_BACKLIGHT_LCD_SUPPORT are now available directly. Link: http://lkml.kernel.org/r/20190603191925.20659-1-krzk@kernel.org Signed-off-by: Krzysztof Kozlowski Cc: Yoshinori Sato Cc: Rich Felker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/sh/configs/hp6xx_defconfig | 1 - arch/sh/configs/sh2007_defconfig | 1 - 2 files changed, 2 deletions(-) commit 38ce85f028fe4ea7350f448260845bc3cb030ad1 Author: Kefeng Wang Date: Thu Jul 11 20:52:45 2019 -0700 arch/sh/configs/sdk7786_defconfig: remove CONFIG_LOGFS After commit 1d0fd57a50aa ("logfs: remove from tree"), logfs was removed, drop CONFIG_LOGFS from all defconfigs. Link: http://lkml.kernel.org/r/20190530021032.190639-1-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/sh/configs/sdk7786_defconfig | 1 - 1 file changed, 1 deletion(-) commit 6e22fd003e28d4414d2a84eb51f1491f49a70ab9 Author: Colin Ian King Date: Thu Jul 11 20:52:42 2019 -0700 scripts/spelling.txt: add more spellings to spelling.txt Here are some of the more common spelling mistakes and typos that I've found while fixing up spelling mistakes in the kernel over the past few months. Developers keep on coming up with more inventive ways to spell words. Link: http://lkml.kernel.org/r/20190618134807.9729-1-colin.king@canonical.com Signed-off-by: Colin Ian King Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/spelling.txt | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit ca90bbd410a1dc4b607210a5483786726043e9ec Author: Evan Green Date: Thu Jul 11 20:52:39 2019 -0700 scripts/decode_stacktrace: Accept dash/underscore in modules The manpage for modprobe mentions that dashes and underscores are treated interchangeably in module names. The stack trace dumps seem to print module names with underscores. Use bash to replace _ with the pattern [-_] so that file names with dashes or underscores can be found. For example, this line: [ 27.919759] hda_widget_sysfs_init+0x2b8/0x3a5 [snd_hda_core] should find a module named snd-hda-core.ko. Link: http://lkml.kernel.org/r/20190531205926.42474-1-evgreen@chromium.org Signed-off-by: Evan Green Reviewed-by: Douglas Anderson Acked-by: Konstantin Khlebnikov Cc: Stephen Rothwell Cc: Douglas Anderson Cc: Evan Green Cc: Nicolas Boichat Cc: Marc Zyngier Cc: Manuel Traut Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/decode_stacktrace.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 85f946ffd3b61ffccefd41a52f267437d878dd3e Author: Chris Paterson Date: Thu Jul 11 20:52:36 2019 -0700 scripts/spelling.txt: add spelling fix for prohibited Misspelling 'prohibited' is quite common in the real world, although surprisingly not so much in the Linux Kernel. In addition to fixing the typo we may as well add it to the spelling checker. Also adding the present participle (prohibiting). Link: http://lkml.kernel.org/r/20190514153341.22540-1-chris.paterson2@renesas.com Fixes: 5bf2fbbef50c ("clk: renesas: cpg-mssr: Add r8a77470 support") Signed-off-by: Chris Paterson Acked-by: Stephen Boyd Acked-by: Geert Uytterhoeven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/clk/renesas/r8a77470-cpg-mssr.c | 2 +- scripts/spelling.txt | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) commit cc0e5f1ce0a8017c68983eb6b41a1dbd0d24aa98 Author: Paul Walmsley Date: Thu Jul 11 20:52:33 2019 -0700 scripts/spelling.txt: drop "sepc" from the misspelling list The RISC-V architecture has a register named the "Supervisor Exception Program Counter", or "sepc". This abbreviation triggers checkpatch.pl's misspelling detector, resulting in noise in the checkpatch output. The risk that this noise could cause more useful warnings to be missed seems to outweigh the harm of an occasional misspelling of "spec". Thus drop the "sepc" entry from the misspelling list. [akpm@linux-foundation.org: fix existing "sepc" instances, per Joe] Link: http://lkml.kernel.org/r/20190518210037.13674-1-paul.walmsley@sifive.com Signed-off-by: Paul Walmsley Cc: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/kvm/book3s_xics.c | 2 +- arch/unicore32/include/mach/regs-gpio.h | 2 +- drivers/net/wireless/realtek/rtlwifi/wifi.h | 2 +- drivers/scsi/lpfc/lpfc_init.c | 2 +- drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c | 2 +- scripts/spelling.txt | 1 - 6 files changed, 5 insertions(+), 6 deletions(-) commit fe7d14f174f18745d8dc141377e5f85ae7757d66 Author: Nicolas Boichat Date: Thu Jul 11 20:52:30 2019 -0700 scripts/decode_stacktrace: look for modules with .ko.debug extension In Chromium OS kernel builds, we split the debug information as .ko.debug files, and that's what decode_stacktrace.sh needs to use. Relax objfile matching rule to allow any .ko* file to be matched. [drinkcat@chromium.org: add quotes around name pattern] Link: http://lkml.kernel.org/r/20190528103346.42720-1-drinkcat@chromium.org Link: http://lkml.kernel.org/r/20190521234148.64060-1-drinkcat@chromium.org Signed-off-by: Nicolas Boichat Cc: Marc Zyngier Cc: Konstantin Khlebnikov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/decode_stacktrace.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 31013836a71e07751a6827f9d2ad41ef502ddaff Author: Nicolas Boichat Date: Thu Jul 11 20:52:27 2019 -0700 scripts/decode_stacktrace: match basepath using shell prefix operator, not regex The basepath may contain special characters, which would confuse the regex matcher. ${var#prefix} does the right thing. Link: http://lkml.kernel.org/r/20190518055946.181563-1-drinkcat@chromium.org Fixes: 67a28de47faa8358 ("scripts/decode_stacktrace: only strip base path when a prefix of the path") Signed-off-by: Nicolas Boichat Reviewed-by: Stephen Boyd Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/decode_stacktrace.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a760f8a67cb38d19fd52f2a28c65c967e469367e Author: Qian Cai Date: Thu Jul 11 20:52:24 2019 -0700 include/linux/dmar.h: replace single-char identifiers in macros There are a few macros in IOMMU have single-char identifiers make the code hard to read and debug. Replace them with meaningful names. Link: http://lkml.kernel.org/r/1559566783-13627-1-git-send-email-cai@lca.pw Signed-off-by: Qian Cai Suggested-by: Andrew Morton Cc: Joerg Roedel Cc: Robin Murphy Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/dmar.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit ae2c8880482977a8b6772657b7c400462695be46 Author: Ryusuke Konishi Date: Thu Jul 11 20:52:21 2019 -0700 MAINTAINERS: nilfs2: update email address Change my email since lab.ntt.co.jp email domain has been deprecated due to company policy. Link: http://lkml.kernel.org/r/1562495153-8166-1-git-send-email-konishi.ryusuke@gmail.com Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c32cc30c0544f13982ee0185d55f4910319b1a79 Author: Masahiro Yamada Date: Thu Jul 11 20:52:18 2019 -0700 nilfs2: do not use unexported cpu_to_le32()/le32_to_cpu() in uapi header cpu_to_le32/le32_to_cpu is defined in include/linux/byteorder/generic.h, which is not exported to user-space. UAPI headers must use the ones prefixed with double-underscore. Detected by compile-testing exported headers: include/linux/nilfs2_ondisk.h: In function `nilfs_checkpoint_set_snapshot': include/linux/nilfs2_ondisk.h:536:17: error: implicit declaration of function `cpu_to_le32' [-Werror=implicit-function-declaration] cp->cp_flags = cpu_to_le32(le32_to_cpu(cp->cp_flags) | \ ^ include/linux/nilfs2_ondisk.h:552:1: note: in expansion of macro `NILFS_CHECKPOINT_FNS' NILFS_CHECKPOINT_FNS(SNAPSHOT, snapshot) ^~~~~~~~~~~~~~~~~~~~ include/linux/nilfs2_ondisk.h:536:29: error: implicit declaration of function `le32_to_cpu' [-Werror=implicit-function-declaration] cp->cp_flags = cpu_to_le32(le32_to_cpu(cp->cp_flags) | \ ^ include/linux/nilfs2_ondisk.h:552:1: note: in expansion of macro `NILFS_CHECKPOINT_FNS' NILFS_CHECKPOINT_FNS(SNAPSHOT, snapshot) ^~~~~~~~~~~~~~~~~~~~ include/linux/nilfs2_ondisk.h: In function `nilfs_segment_usage_set_clean': include/linux/nilfs2_ondisk.h:622:19: error: implicit declaration of function `cpu_to_le64' [-Werror=implicit-function-declaration] su->su_lastmod = cpu_to_le64(0); ^~~~~~~~~~~ Link: http://lkml.kernel.org/r/20190605053006.14332-1-yamada.masahiro@socionext.com Fixes: e63e88bc53ba ("nilfs2: move ioctl interface and disk layout to uapi separately") Signed-off-by: Masahiro Yamada Acked-by: Ryusuke Konishi Cc: Arnd Bergmann Cc: Greg KH Cc: Joe Perches Cc: [4.9+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/uapi/linux/nilfs2_ondisk.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 810481a246089117d98e3373a3cb735c3efc1f90 Author: Henry Burns Date: Thu Jul 11 20:52:14 2019 -0700 mm/z3fold.c: lock z3fold page before __SetPageMovable() Following zsmalloc.c's example we call trylock_page() and unlock_page(). Also make z3fold_page_migrate() assert that newpage is passed in locked, as per the documentation. [akpm@linux-foundation.org: fix trylock_page return value test, per Shakeel] Link: http://lkml.kernel.org/r/20190702005122.41036-1-henryburns@google.com Link: http://lkml.kernel.org/r/20190702233538.52793-1-henryburns@google.com Signed-off-by: Henry Burns Suggested-by: Vitaly Wool Acked-by: Vitaly Wool Acked-by: David Rientjes Reviewed-by: Shakeel Butt Cc: Vitaly Vul Cc: Mike Rapoport Cc: Xidong Wang Cc: Jonathan Adams Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/z3fold.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit dd9239900e12db84c198855b262ae7796db1123b Author: Yafang Shao Date: Thu Jul 11 20:52:11 2019 -0700 mm/memcontrol: fix wrong statistics in memory.stat When we calculate total statistics for memcg1_stats and memcg1_events, we use the the index 'i' in the for loop as the events index. Actually we should use memcg1_stats[i] and memcg1_events[i] as the events index. Link: http://lkml.kernel.org/r/1562116978-19539-1-git-send-email-laoar.shao@gmail.com Fixes: 42a300353577 ("mm: memcontrol: fix recursive statistics correctness & scalabilty"). Signed-off-by: Yafang Shao Cc: Michal Hocko Cc: Johannes Weiner Cc: Yafang Shao Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memcontrol.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 9bd3bb6703d8c0a5fb8aec8e3287bd55b7341dcd Author: Aneesh Kumar K.V Date: Thu Jul 11 20:52:08 2019 -0700 mm/nvdimm: add is_ioremap_addr and use that to check ioremap address Architectures like powerpc use different address range to map ioremap and vmalloc range. The memunmap() check used by the nvdimm layer was wrongly using is_vmalloc_addr() to check for ioremap range which fails for ppc64. This result in ppc64 not freeing the ioremap mapping. The side effect of this is an unbind failure during module unload with papr_scm nvdimm driver Link: http://lkml.kernel.org/r/20190701134038.14165-1-aneesh.kumar@linux.ibm.com Signed-off-by: Aneesh Kumar K.V Fixes: b5beae5e224f ("powerpc/pseries: Add driver for PAPR SCM regions") Cc: Dan Williams Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/include/asm/pgtable.h | 14 ++++++++++++++ include/linux/mm.h | 5 +++++ kernel/iomem.c | 2 +- 3 files changed, 20 insertions(+), 1 deletion(-) commit 2c012a4ad1a2cd3fb5a0f9307b9d219f84eda1fa Author: Kuo-Hsin Yang Date: Thu Jul 11 20:52:04 2019 -0700 mm: vmscan: scan anonymous pages on file refaults When file refaults are detected and there are many inactive file pages, the system never reclaim anonymous pages, the file pages are dropped aggressively when there are still a lot of cold anonymous pages and system thrashes. This issue impacts the performance of applications with large executable, e.g. chrome. With this patch, when file refault is detected, inactive_list_is_low() always returns true for file pages in get_scan_count() to enable scanning anonymous pages. The problem can be reproduced by the following test program. ---8<--- void fallocate_file(const char *filename, off_t size) { struct stat st; int fd; if (!stat(filename, &st) && st.st_size >= size) return; fd = open(filename, O_WRONLY | O_CREAT, 0600); if (fd < 0) { perror("create file"); exit(1); } if (posix_fallocate(fd, 0, size)) { perror("fallocate"); exit(1); } close(fd); } long *alloc_anon(long size) { long *start = malloc(size); memset(start, 1, size); return start; } long access_file(const char *filename, long size, long rounds) { int fd, i; volatile char *start1, *end1, *start2; const int page_size = getpagesize(); long sum = 0; fd = open(filename, O_RDONLY); if (fd == -1) { perror("open"); exit(1); } /* * Some applications, e.g. chrome, use a lot of executable file * pages, map some of the pages with PROT_EXEC flag to simulate * the behavior. */ start1 = mmap(NULL, size / 2, PROT_READ | PROT_EXEC, MAP_SHARED, fd, 0); if (start1 == MAP_FAILED) { perror("mmap"); exit(1); } end1 = start1 + size / 2; start2 = mmap(NULL, size / 2, PROT_READ, MAP_SHARED, fd, size / 2); if (start2 == MAP_FAILED) { perror("mmap"); exit(1); } for (i = 0; i < rounds; ++i) { struct timeval before, after; volatile char *ptr1 = start1, *ptr2 = start2; gettimeofday(&before, NULL); for (; ptr1 < end1; ptr1 += page_size, ptr2 += page_size) sum += *ptr1 + *ptr2; gettimeofday(&after, NULL); printf("File access time, round %d: %f (sec) ", i, (after.tv_sec - before.tv_sec) + (after.tv_usec - before.tv_usec) / 1000000.0); } return sum; } int main(int argc, char *argv[]) { const long MB = 1024 * 1024; long anon_mb, file_mb, file_rounds; const char filename[] = "large"; long *ret1; long ret2; if (argc != 4) { printf("usage: thrash ANON_MB FILE_MB FILE_ROUNDS "); exit(0); } anon_mb = atoi(argv[1]); file_mb = atoi(argv[2]); file_rounds = atoi(argv[3]); fallocate_file(filename, file_mb * MB); printf("Allocate %ld MB anonymous pages ", anon_mb); ret1 = alloc_anon(anon_mb * MB); printf("Access %ld MB file pages ", file_mb); ret2 = access_file(filename, file_mb * MB, file_rounds); printf("Print result to prevent optimization: %ld ", *ret1 + ret2); return 0; } ---8<--- Running the test program on 2GB RAM VM with kernel 5.2.0-rc5, the program fills ram with 2048 MB memory, access a 200 MB file for 10 times. Without this patch, the file cache is dropped aggresively and every access to the file is from disk. $ ./thrash 2048 200 10 Allocate 2048 MB anonymous pages Access 200 MB file pages File access time, round 0: 2.489316 (sec) File access time, round 1: 2.581277 (sec) File access time, round 2: 2.487624 (sec) File access time, round 3: 2.449100 (sec) File access time, round 4: 2.420423 (sec) File access time, round 5: 2.343411 (sec) File access time, round 6: 2.454833 (sec) File access time, round 7: 2.483398 (sec) File access time, round 8: 2.572701 (sec) File access time, round 9: 2.493014 (sec) With this patch, these file pages can be cached. $ ./thrash 2048 200 10 Allocate 2048 MB anonymous pages Access 200 MB file pages File access time, round 0: 2.475189 (sec) File access time, round 1: 2.440777 (sec) File access time, round 2: 2.411671 (sec) File access time, round 3: 1.955267 (sec) File access time, round 4: 0.029924 (sec) File access time, round 5: 0.000808 (sec) File access time, round 6: 0.000771 (sec) File access time, round 7: 0.000746 (sec) File access time, round 8: 0.000738 (sec) File access time, round 9: 0.000747 (sec) Checked the swap out stats during the test [1], 19006 pages swapped out with this patch, 3418 pages swapped out without this patch. There are more swap out, but I think it's within reasonable range when file backed data set doesn't fit into the memory. $ ./thrash 2000 100 2100 5 1 # ANON_MB FILE_EXEC FILE_NOEXEC ROUNDS PROCESSES Allocate 2000 MB anonymous pages active_anon: 1613644, inactive_anon: 348656, active_file: 892, inactive_file: 1384 (kB) pswpout: 7972443, pgpgin: 478615246 Access 100 MB executable file pages Access 2100 MB regular file pages File access time, round 0: 12.165, (sec) active_anon: 1433788, inactive_anon: 478116, active_file: 17896, inactive_file: 24328 (kB) File access time, round 1: 11.493, (sec) active_anon: 1430576, inactive_anon: 477144, active_file: 25440, inactive_file: 26172 (kB) File access time, round 2: 11.455, (sec) active_anon: 1427436, inactive_anon: 476060, active_file: 21112, inactive_file: 28808 (kB) File access time, round 3: 11.454, (sec) active_anon: 1420444, inactive_anon: 473632, active_file: 23216, inactive_file: 35036 (kB) File access time, round 4: 11.479, (sec) active_anon: 1413964, inactive_anon: 471460, active_file: 31728, inactive_file: 32224 (kB) pswpout: 7991449 (+ 19006), pgpgin: 489924366 (+ 11309120) With 4 processes accessing non-overlapping parts of a large file, 30316 pages swapped out with this patch, 5152 pages swapped out without this patch. The swapout number is small comparing to pgpgin. [1]: https://github.com/vovo/testing/blob/master/mem_thrash.c Link: http://lkml.kernel.org/r/20190701081038.GA83398@google.com Fixes: e9868505987a ("mm,vmscan: only evict file pages when we have plenty") Fixes: 7c5bd705d8f9 ("mm: memcg: only evict file pages when we have plenty") Signed-off-by: Kuo-Hsin Yang Acked-by: Johannes Weiner Cc: Michal Hocko Cc: Sonny Rao Cc: Mel Gorman Cc: Rik van Riel Cc: Vladimir Davydov Cc: Minchan Kim Cc: [4.12+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/vmscan.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1df379924304b687263942452836db1d725155df Author: Stephen Rothwell Date: Tue Jul 2 12:03:50 2019 +1000 clk: consoldiate the __clk_get_hw() declarations Without this we were getting errors like: In file included from drivers/clk/clkdev.c:22:0: drivers/clk/clk.h:36:23: error: static declaration of '__clk_get_hw' follows non-static declaration include/linux/clk-provider.h:808:16: note: previous declaration of '__clk_get_hw' was here Fixes: 59fcdce425b7 ("clk: Remove ifdef for COMMON_CLK in clk-provider.h") fixes: 73e0e496afda ("clkdev: Always allocate a struct clk and call __clk_get() w/ CCF") Signed-off-by: Stephen Rothwell Signed-off-by: Stephen Boyd drivers/clk/clk.h | 4 ---- drivers/clk/imx/clk-imx6q.c | 1 + drivers/clk/imx/clk-imx6sll.c | 1 + drivers/clk/imx/clk-imx6sx.c | 1 + drivers/clk/imx/clk-imx6ul.c | 1 + drivers/clk/imx/clk-imx7d.c | 1 + drivers/clk/imx/clk.c | 1 + include/linux/clk-provider.h | 7 +++++++ 8 files changed, 13 insertions(+), 4 deletions(-) commit a101b043c44dfcb63bed7f29a675e9fa0259005e Author: Trond Myklebust Date: Thu Jul 11 16:33:12 2019 -0400 SUNRPC: Fix transport accounting when caller specifies an rpc_xprt Ensure that we do the required accounting for the round robin queue when the caller to rpc_init_task() has passed in a transport to be used. Reported-by: Olga Kornievskaia Reported-by: Neil Brown Signed-off-by: Trond Myklebust include/linux/sunrpc/clnt.h | 2 ++ net/sunrpc/clnt.c | 42 ++++++++++++++++++++---------------------- net/sunrpc/sched.c | 3 ++- 3 files changed, 24 insertions(+), 23 deletions(-) commit 6e67d77d673d785631b0c52314b60d3c68ebe809 Author: Thomas Richter Date: Fri Jul 12 14:31:13 2019 +0200 perf vendor events s390: Add JSON files for machine type 8561 Add CPU measurement counter facility event description files (JSON) for IBM machine types 8561 and 8562. Signed-off-by: Thomas Richter Reviewed-by: Vasily Gorbik Cc: Heiko Carstens Cc: Hendrik Brueckner Link: http://lkml.kernel.org/r/20190712123113.100882-1-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo .../perf/pmu-events/arch/s390/cf_m8561/basic.json | 58 ++++ .../perf/pmu-events/arch/s390/cf_m8561/crypto.json | 114 +++++++ .../pmu-events/arch/s390/cf_m8561/crypto6.json | 30 ++ .../pmu-events/arch/s390/cf_m8561/extended.json | 373 +++++++++++++++++++++ tools/perf/pmu-events/arch/s390/mapfile.csv | 1 + 5 files changed, 576 insertions(+) commit 347543e64082782379627cb21162cb859590f3c7 Merge: 80d3c45fd765 62a92ba97a31 Author: Trond Myklebust Date: Thu Jul 11 16:52:47 2019 -0400 Merge tag 'nfs-rdma-for-5.3-1' of git://git.linux-nfs.org/projects/anna/linux-nfs NFSoRDMA client updates for 5.3 New features: - Add a way to place MRs back on the free list - Reduce context switching - Add new trace events Bugfixes and cleanups: - Fix a BUG when tracing is enabled with NFSv4.1 - Fix a use-after-free in rpcrdma_post_recvs - Replace use of xdr_stream_pos in rpcrdma_marshal_req - Fix occasional transport deadlock - Fix show_nfs_errors macros, other tracing improvements - Remove RPCRDMA_REQ_F_PENDING and fr_state - Various simplifications and refactors commit e9a1379f9219be439f47a0f063431a92dc529eda Author: Naohiro Aota Date: Fri Jul 12 19:15:55 2019 +0900 x86/vdso: Fix flip/flop vdso build bug Two consecutive "make" on an already compiled kernel tree will show different behavior: $ make CALL scripts/checksyscalls.sh CALL scripts/atomic/check-atomics.sh DESCEND objtool CHK include/generated/compile.h VDSOCHK arch/x86/entry/vdso/vdso64.so.dbg VDSOCHK arch/x86/entry/vdso/vdso32.so.dbg Kernel: arch/x86/boot/bzImage is ready (#3) Building modules, stage 2. MODPOST 12 modules $ make make CALL scripts/checksyscalls.sh CALL scripts/atomic/check-atomics.sh DESCEND objtool CHK include/generated/compile.h VDSO arch/x86/entry/vdso/vdso64.so.dbg OBJCOPY arch/x86/entry/vdso/vdso64.so VDSO2C arch/x86/entry/vdso/vdso-image-64.c CC arch/x86/entry/vdso/vdso-image-64.o VDSO arch/x86/entry/vdso/vdso32.so.dbg OBJCOPY arch/x86/entry/vdso/vdso32.so VDSO2C arch/x86/entry/vdso/vdso-image-32.c CC arch/x86/entry/vdso/vdso-image-32.o AR arch/x86/entry/vdso/built-in.a AR arch/x86/entry/built-in.a AR arch/x86/built-in.a GEN .version CHK include/generated/compile.h UPD include/generated/compile.h CC init/version.o AR init/built-in.a LD vmlinux.o This is causing "LD vmlinux" once every two times even without any modifications. This is the same bug fixed in commit 92a4728608a8 ("x86/boot: Fix if_changed build flip/flop bug"). Two "if_changed" cannot be used in one target. Fix this merging two commands into one function. Fixes: 7ac870747988 ("x86/vdso: Switch to generic vDSO implementation") Signed-off-by: Naohiro Aota Signed-off-by: Thomas Gleixner Tested-by: Vincenzo Frascino Reviewed-by: Vincenzo Frascino Reviewed-by: Masahiro Yamada Link: https://lkml.kernel.org/r/20190712101556.17833-1-naohiro.aota@wdc.com arch/x86/entry/vdso/Makefile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 787c79d6393fc028887cc1b6066915f0b094e92f Author: Konstantin Khlebnikov Date: Thu Jul 11 13:19:47 2019 +0300 MAINTAINERS: add entry for block io cgroup This links mailing list cgroups@vger.kernel.org with related files. $ ./scripts/get_maintainer.pl -f block/blk-cgroup.c Jens Axboe (maintainer:BLOCK LAYER) cgroups@vger.kernel.org (open list:CONTROL GROUP - BLOCK IO CONTROLLER (BLKIO)) linux-block@vger.kernel.org (open list:BLOCK LAYER) linux-kernel@vger.kernel.org (open list) Signed-off-by: Konstantin Khlebnikov Added git tree/maintainer entries from Tejun. Signed-off-by: Jens Axboe MAINTAINERS | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 0b043644c0ca601cb19943a81aa1f1455dbe9461 Author: Jason Gunthorpe Date: Fri Jul 12 12:12:06 2019 -0300 RMDA/siw: Require a 64 bit arch The new siw driver fails to build on i386 with drivers/infiniband/sw/siw/siw_qp.c:1025:3: error: invalid output size for constraint '+q' smp_store_mb(*cq->notify, SIW_NOTIFY_NOT); As it is using 64 bit values with the smp_store_mb. Since the entire scheme here seems questionable, and we are in the merge window, fix the compile failures by disabling 32 bit support on this driver. A proper fix will be reviewed post merge window. Fixes: c0cf5bdde46c ("rdma/siw: addition to kernel build environment") Reported-by: Arnd Bergmann Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/siw/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e347946439ed70e3af0d0c330b36d5648e71727b Author: Jens Axboe Date: Fri Jul 12 09:09:57 2019 -0600 null_blk: fixup ->report_zones() for !CONFIG_BLK_DEV_ZONED A previous commit changed the prototype, but didn't adjust the function for when zoned device support is disabled. Fix it up. Fixes: bd976e527259 ("block: Kill gfp_t argument of blkdev_report_zones()") Signed-off-by: Jens Axboe drivers/block/null_blk.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bd293d071ffe65e645b4d8104f9d8fe15ea13862 Author: Junxiao Bi Date: Tue Jul 9 17:17:19 2019 -0700 dm bufio: fix deadlock with loop device When thin-volume is built on loop device, if available memory is low, the following deadlock can be triggered: One process P1 allocates memory with GFP_FS flag, direct alloc fails, memory reclaim invokes memory shrinker in dm_bufio, dm_bufio_shrink_scan() runs, mutex dm_bufio_client->lock is acquired, then P1 waits for dm_buffer IO to complete in __try_evict_buffer(). But this IO may never complete if issued to an underlying loop device that forwards it using direct-IO, which allocates memory using GFP_KERNEL (see: do_blockdev_direct_IO()). If allocation fails, memory reclaim will invoke memory shrinker in dm_bufio, dm_bufio_shrink_scan() will be invoked, and since the mutex is already held by P1 the loop thread will hang, and IO will never complete. Resulting in ABBA deadlock. Cc: stable@vger.kernel.org Signed-off-by: Junxiao Bi Signed-off-by: Mike Snitzer drivers/md/dm-bufio.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 2e6023850e177dbaca21498ada04c5a5ac93f812 Author: Mike Snitzer Date: Wed Jun 19 17:05:54 2019 -0400 dm snapshot: add optional discard support features discard_zeroes_cow - a discard issued to the snapshot device that maps to entire chunks to will zero the corresponding exception(s) in the snapshot's exception store. discard_passdown_origin - a discard to the snapshot device is passed down to the snapshot-origin's underlying device. This doesn't cause copy-out to the snapshot exception store because the snapshot-origin target is bypassed. The discard_passdown_origin feature depends on the discard_zeroes_cow feature being enabled. When these 2 features are enabled they allow a temporarily read-only device that has completely exhausted its free space to recover space. To do so dm-snapshot provides temporary buffer to accommodate writes that the temporarily read-only device cannot handle yet. Once the upper layer frees space (e.g. fstrim to XFS) the discards issued to the dm-snapshot target will be issued to underlying read-only device whose free space was exhausted. In addition those discards will also cause zeroes to be written to the snapshot exception store if corresponding exceptions exist. If the underlying origin device provides deduplication for zero blocks then if/when the snapshot is merged backed to the origin those blocks will become unused. Once the origin has gained adequate space, merging the snapshot back to the thinly provisioned device will permit continued use of that device without the temporary space provided by the snapshot. Requested-by: John Dorminy Signed-off-by: Mike Snitzer Documentation/device-mapper/snapshot.txt | 16 +++ drivers/md/dm-snap.c | 186 +++++++++++++++++++++++++++---- 2 files changed, 181 insertions(+), 21 deletions(-) commit af3c24e0e2ed25177b03b60ada9117bb596e8d95 Author: Ilya Leoshkevich Date: Thu Jul 11 16:29:30 2019 +0200 selftests/bpf: fix compiling loop{1, 2, 3}.c on s390 Use PT_REGS_RC(ctx) instead of ctx->rax, which is not present on s390. Signed-off-by: Ilya Leoshkevich Reviewed-by: Stanislav Fomichev Tested-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/progs/loop1.c | 2 +- tools/testing/selftests/bpf/progs/loop2.c | 2 +- tools/testing/selftests/bpf/progs/loop3.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 7cd04535abc95c50ba9bfa48efc76274b63c70f5 Author: Ilya Leoshkevich Date: Thu Jul 11 16:29:29 2019 +0200 selftests/bpf: make PT_REGS_* work in userspace Right now, on certain architectures, these macros are usable only with kernel headers. This patch makes it possible to use them with userspace headers and, as a consequence, not only in BPF samples, but also in BPF selftests. On s390, provide the forward declaration of struct pt_regs and cast it to user_pt_regs in PT_REGS_* macros. This is necessary, because instead of the full struct pt_regs, s390 exposes only its first member user_pt_regs to userspace, and bpf_helpers.h is used with both userspace (in selftests) and kernel (in samples) headers. It was added in commit 466698e654e8 ("s390/bpf: correct broken uapi for BPF_PROG_TYPE_PERF_EVENT program type"). Ditto on arm64. On x86, provide userspace versions of PT_REGS_* macros. Unlike s390 and arm64, x86 provides struct pt_regs to both userspace and kernel, however, with different member names. Signed-off-by: Ilya Leoshkevich Acked-by: Andrii Nakryiko Reviewed-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/bpf_helpers.h | 75 ++++++++++++++++++++++--------- 1 file changed, 55 insertions(+), 20 deletions(-) commit 05c2dc17dae310f92a0c5979e227133b0e85f2fa Author: Ilya Leoshkevich Date: Thu Jul 11 16:29:28 2019 +0200 selftests/bpf: fix s930 -> s390 typo Also check for __s390__ instead of __s390x__, just in case bpf_helpers.h is ever used by 32-bit userspace. Signed-off-by: Ilya Leoshkevich Acked-by: Andrii Nakryiko Reviewed-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/bpf_helpers.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 748e50c1c13d33dffcdca66f0b1cb3d96d17fe31 Author: Ilya Leoshkevich Date: Thu Jul 11 16:29:27 2019 +0200 selftests/bpf: compile progs with -D__TARGET_ARCH_$(SRCARCH) This opens up the possibility of accessing registers in an arch-independent way. Signed-off-by: Ilya Leoshkevich Reviewed-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 9cae4ace80ef39005da106fbb89c952b27d7b89e Author: Ilya Leoshkevich Date: Thu Jul 11 11:12:49 2019 +0200 selftests/bpf: do not ignore clang failures When compiling an eBPF prog fails, make still returns 0, because failing clang command's output is piped to llc and therefore its exit status is ignored. When clang fails, pipe the string "clang failed" to llc. This will make llc fail with an informative error message. This solution was chosen over using pipefail, having separate targets or getting rid of llc invocation due to its simplicity. In addition, pull Kbuild.include in order to get .DELETE_ON_ERROR target, which would cause partial .o files to be removed. Signed-off-by: Ilya Leoshkevich Acked-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/Makefile | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 216b65fb706e34128a5317d71b300daac9c428c4 Author: Daniel T. Lee Date: Fri Jul 12 10:35:39 2019 +0900 tools: bpftool: add raw_tracepoint_writable prog type to header From commit 9df1c28bb752 ("bpf: add writable context for raw tracepoints"), a new type of BPF_PROG, RAW_TRACEPOINT_WRITABLE has been added. Since this BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE is not listed at bpftool's header, it causes a segfault when executing 'bpftool feature'. This commit adds BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE entry to prog_type_name enum, and will eventually fixes the segfault issue. Fixes: 9df1c28bb752 ("bpf: add writable context for raw tracepoints") Signed-off-by: Daniel T. Lee Signed-off-by: Daniel Borkmann tools/bpf/bpftool/main.h | 1 + 1 file changed, 1 insertion(+) commit ed4ed4043a127c5ca9a35339bb614693be9037a3 Author: Gustavo A. R. Silva Date: Thu Jul 11 11:22:33 2019 -0500 bpf: verifier: avoid fall-through warnings In preparation to enabling -Wimplicit-fallthrough, this patch silences the following warning: kernel/bpf/verifier.c: In function ‘check_return_code’: kernel/bpf/verifier.c:6106:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (env->prog->expected_attach_type == BPF_CGROUP_UDP4_RECVMSG || ^ kernel/bpf/verifier.c:6109:2: note: here case BPF_PROG_TYPE_CGROUP_SKB: ^~~~ Warning level 3 was used: -Wimplicit-fallthrough=3 Notice that is much clearer to explicitly add breaks in each case statement (that actually contains some code), rather than letting the code to fall through. This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough. Signed-off-by: Gustavo A. R. Silva Acked-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann kernel/bpf/verifier.c | 2 ++ 1 file changed, 2 insertions(+) commit 59d82657a08d4a9e6e2d99acc525ef748d36016b Author: Ilya Leoshkevich Date: Wed Jul 10 13:56:54 2019 +0200 selftests/bpf: fix bpf_target_sparc check bpf_helpers.h fails to compile on sparc: the code should be checking for defined(bpf_target_sparc), but checks simply for bpf_target_sparc. Also change #ifdef bpf_target_powerpc to #if defined() for consistency. Signed-off-by: Ilya Leoshkevich Acked-by: Andrii Nakryiko Acked-by: David S. Miller Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/bpf_helpers.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5464c3a0e9a037b63d5229cdea08dddc01a98aac Author: Ilya Maximets Date: Mon Jul 8 14:03:44 2019 +0300 xdp: fix potential deadlock on socket mutex There are 2 call chains: a) xsk_bind --> xdp_umem_assign_dev b) unregister_netdevice_queue --> xsk_notifier with the following locking order: a) xs->mutex --> rtnl_lock b) rtnl_lock --> xdp.lock --> xs->mutex Different order of taking 'xs->mutex' and 'rtnl_lock' could produce a deadlock here. Fix that by moving the 'rtnl_lock' before 'xs->lock' in the bind call chain (a). Reported-by: syzbot+bf64ec93de836d7f4c2c@syzkaller.appspotmail.com Fixes: 455302d1c9ae ("xdp: fix hang while unregistering device bound to xdp socket") Signed-off-by: Ilya Maximets Acked-by: Jonathan Lemon Signed-off-by: Daniel Borkmann net/xdp/xdp_umem.c | 16 ++++++---------- net/xdp/xsk.c | 2 ++ 2 files changed, 8 insertions(+), 10 deletions(-) commit 7d67c8ac25fbc66ee254aa3e33329d1c9bc152ce Author: YueHaibing Date: Thu Jul 4 14:27:25 2019 +0800 platform/x86: Fix PCENGINES_APU2 Kconfig warning Fix Kconfig warning for PCENGINES_APU2 symbol: WARNING: unmet direct dependencies detected for GPIO_AMD_FCH Depends on [n]: GPIOLIB [=n] && HAS_IOMEM [=y] Selected by [y]: - PCENGINES_APU2 [=y] && X86 [=y] && X86_PLATFORM_DEVICES [=y] && INPUT [=y] && INPUT_KEYBOARD [=y] && LEDS_CLASS [=y] WARNING: unmet direct dependencies detected for KEYBOARD_GPIO_POLLED Depends on [n]: !UML && INPUT [=y] && INPUT_KEYBOARD [=y] && GPIOLIB [=n] Selected by [y]: - PCENGINES_APU2 [=y] && X86 [=y] && X86_PLATFORM_DEVICES [=y] && INPUT [=y] && INPUT_KEYBOARD [=y] && LEDS_CLASS [=y] Add GPIOLIB dependency to fix it. Reported-by: Hulk Robot Fixes: f8eb0235f659 ("x86: pcengines apuv2 gpio/leds/keys platform driver") Signed-off-by: YueHaibing Signed-off-by: Andy Shevchenko drivers/platform/x86/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2b4f3dab09b3a2853c49c866a383ffda8ee54a6f Author: Prarit Bhargava Date: Wed Jul 10 10:23:00 2019 -0700 tools/power/x86/intel-speed-select: Add .gitignore file Add a .gitignore file for build include/ and final binary. Signed-off-by: Prarit Bhargava Acked-by: Rafael J. Wysocki Acked-by: Srinivas Pandruvada Cc: Srinivas Pandruvada Cc: Andy Shevchenko Cc: David Arcari Signed-off-by: Andy Shevchenko tools/power/x86/intel-speed-select/.gitignore | 2 ++ 1 file changed, 2 insertions(+) commit e6fbb97da5212ceab7149896832d35fa1ab02f34 Author: Wei Yongjun Date: Tue Jul 9 01:38:42 2019 +0000 platform/x86: mlx-platform: Fix error handling in mlxplat_init() Add the missing platform_device_unregister() before return from mlxplat_init() in the error handling case. Fixes: 6b266e91a071 ("platform/x86: mlx-platform: Move regmap initialization before all drivers activation") Signed-off-by: Wei Yongjun Signed-off-by: Andy Shevchenko drivers/platform/x86/mlx-platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 64974ab24908a92b5dfe52e1ace3d67c47d657cb Author: Kevin Wang Date: Fri Jul 12 11:27:50 2019 +0800 drm/amd/powerplay: add pstate mclk(uclk) support for navi10 add pstate mclk(uclk) support. Signed-off-by: Kevin Wang Reviewed-by: Evan Quan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 1 + drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) commit d36893362d22ff46fdb105ebab12df00bbf23397 Author: Kevin Wang Date: Thu Jul 11 21:33:17 2019 +0800 drm/amd/powerplay: fix smu clock type change miss error in the smu module, use the smu_xxxclk type to identify the CLK type use SMU_SCLK, SMU_MCLK to replace PP_SCLK, PP_MCLK. Signed-off-by: Kevin Wang Reviewed-by: Feifei Xu Reviewed-by: Evan Quan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4298935924a9057f2424636d1d29ae7caef4764a Author: Hawking Zhang Date: Thu Jul 11 00:13:54 2019 +0800 drm/amdgpu: support key database loading for navi10 Starting from navi10, driver should send Key Database Load command to bootloader before loading sys_drv and sos Signed-off-by: John Clements Signed-off-by: Hawking Zhang Reviewed-by: Xiaojie Yuan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 9 ++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 5 ++++ drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 6 ++++ drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 3 ++ drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 48 ++++++++++++++++++++++++++++++- 5 files changed, 70 insertions(+), 1 deletion(-) commit 3840fe256ae431d79e93988757a6f89db8192237 Author: Hawking Zhang Date: Thu Jul 11 22:02:02 2019 +0800 drm/amdgpu: switch to macro for psp bootloader command The command will be sent to psp bootloader from driver to ask psp bootloader to exerise tOS, sys_drv and kdb loading Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Reviewed-by: Xiaojie Yuan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 6 ++++++ drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) commit 675716400da6f15b9d3db04ef74ee74ca9a00af3 Author: Ilya Maximets Date: Thu Jul 4 17:25:03 2019 +0300 xdp: fix possible cq entry leak Completion queue address reservation could not be undone. In case of bad 'queue_id' or skb allocation failure, reserved entry will be leaked reducing the total capacity of completion queue. Fix that by moving reservation to the point where failure is not possible. Additionally, 'queue_id' checking moved out from the loop since there is no point to check it there. Fixes: 35fcde7f8deb ("xsk: support for Tx") Signed-off-by: Ilya Maximets Acked-by: Björn Töpel Tested-by: William Tu Signed-off-by: Daniel Borkmann net/xdp/xsk.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 36db2a94f19ae1fcf1e6d8253df0c32f90f92860 Author: Andrii Nakryiko Date: Mon Jul 8 21:00:07 2019 -0700 libbpf: fix ptr to u64 conversion warning on 32-bit platforms On 32-bit platforms compiler complains about conversion: libbpf.c: In function ‘perf_event_open_probe’: libbpf.c:4112:17: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] attr.config1 = (uint64_t)(void *)name; /* kprobe_func or uprobe_path */ ^ Reported-by: Matt Hart Fixes: b26500274767 ("libbpf: add kprobe/uprobe attach API") Tested-by: Matt Hart Signed-off-by: Andrii Nakryiko Acked-by: Yonghong Song Signed-off-by: Daniel Borkmann tools/lib/bpf/libbpf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b3b50f05dc501cc2cd90349a7bbfd932af0ceb31 Author: Andrii Nakryiko Date: Mon Jul 8 20:32:44 2019 -0700 bpf: fix precision bit propagation for BPF_ST instructions When backtracking instructions to propagate precision bit for registers and stack slots, one class of instructions (BPF_ST) weren't handled causing extra stack slots to be propagated into parent state. Parent state might not have that much stack allocated, though, which causes warning on invalid stack slot usage. This patch adds handling of BPF_ST instructions: BPF_MEM | | BPF_ST: *(size *) (dst_reg + off) = imm32 Reported-by: syzbot+4da3ff23081bafe74fc2@syzkaller.appspotmail.com Fixes: b5dc0163d8fd ("bpf: precise scalar_value tracking") Cc: Alexei Starovoitov Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann kernel/bpf/verifier.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit f5a9e488d62360c91c5770bd55a0b40e419a71ce Author: Athira Rajeev Date: Tue Jul 2 16:28:36 2019 +0530 powerpc/powernv/idle: Fix restore of SPRN_LDBAR for POWER9 stop state. commit 10d91611f426 ("powerpc/64s: Reimplement book3s idle code in C") reimplemented book3S code to pltform/powernv/idle.c. But when doing so missed to add the per-thread LDBAR update in the core_woken path of the power9_idle_stop(). Patch fixes the same. Fixes: 10d91611f426 ("powerpc/64s: Reimplement book3s idle code in C") Cc: stable@vger.kernel.org # v5.2+ Signed-off-by: Athira Rajeev Signed-off-by: Madhavan Srinivasan Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190702105836.26695-1-maddy@linux.vnet.ibm.com arch/powerpc/platforms/powernv/idle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 327835fb1e838c7098731899ec76aba912edddf1 Author: Vasily Gorbik Date: Wed Jul 10 12:43:45 2019 +0200 MAINTAINERS: update BPF JIT S390 maintainers Ilya Leoshkevich is joining as s390 bpf maintainer. With his background as gcc developer he would be valuable for the team and community as a whole. Ilya, have fun! Since there is now enough eyes on s390 bpf, relieve Christian Borntraeger, so that he could focus on his maintainer tasks for other components. Signed-off-by: Vasily Gorbik Acked-by: Christian Borntraeger Acked-by: Ilya Leoshkevich Signed-off-by: Daniel Borkmann MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 20e833dc36355ed642d00067641a679c618303fa Author: Hook, Gary Date: Wed Jul 10 00:09:22 2019 +0000 crypto: ccp - memset structure fields to zero before reuse The AES GCM function reuses an 'op' data structure, which members contain values that must be cleared for each (re)use. This fix resolves a crypto self-test failure: alg: aead: gcm-aes-ccp encryption test failed (wrong result) on test vector 2, cfg="two even aligned splits" Fixes: 36cf515b9bbe ("crypto: ccp - Enable support for AES GCM on v5 CCPs") Cc: Signed-off-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-ops.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 95566aa75cd6b3b404502c06f66956b5481194b3 Author: Wen Yang Date: Mon Jul 8 14:19:03 2019 +0800 crypto: crypto4xx - fix a potential double free in ppc4xx_trng_probe There is a possible double free issue in ppc4xx_trng_probe(): 85: dev->trng_base = of_iomap(trng, 0); 86: of_node_put(trng); ---> released here 87: if (!dev->trng_base) 88: goto err_out; ... 110: ierr_out: 111: of_node_put(trng); ---> double released here ... This issue was detected by using the Coccinelle software. We fix it by removing the unnecessary of_node_put(). Fixes: 5343e674f32f ("crypto4xx: integrate ppc4xx-rng into crypto4xx") Signed-off-by: Wen Yang Cc: Cc: "David S. Miller" Cc: Thomas Gleixner Cc: Greg Kroah-Hartman Cc: Allison Randal Cc: Armijn Hemel Cc: Julia Lawall Cc: linux-crypto@vger.kernel.org Cc: linux-kernel@vger.kernel.org Acked-by: Julia Lawall Signed-off-by: Herbert Xu drivers/crypto/amcc/crypto4xx_trng.c | 1 - 1 file changed, 1 deletion(-) commit 049ce1505b3a6504f4cb59148baaacc36d5c75e3 Author: Herbert Xu Date: Wed Jul 3 22:26:53 2019 +0800 crypto: stm32/hash - Fix incorrect printk modifier for size_t This patch fixes a warning when compiling stm32 because %d is being used on a size_t argument instead of %zd. Signed-off-by: Herbert Xu drivers/crypto/stm32/stm32-hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cc95527cceb3d1aaadd5cc1cf601d466af2e53f2 Author: Nishka Dasgupta Date: Thu Jul 11 23:49:47 2019 -0700 Input: mtk-pmic-keys - add of_node_put() before return Each iteration of for_each_child_of_node puts the previous node, but in the case of a return from the middle of the loop, there is no put, thus causing a memory leak. Hence add an of_node_put before the return in three places. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Dmitry Torokhov drivers/input/keyboard/mtk-pmic-keys.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 071cfc43c875ee2e6ac2ae6929c2c153e1d13fe7 Author: Nishka Dasgupta Date: Thu Jul 11 23:49:16 2019 -0700 Input: sun4i-lradc-keys - add of_node_put() before return Each iteration of for_each_child_of_node puts the previous node, but in the case of a return from the middle of the loop, there is no put, thus causing a memory leak. Hence add an of_node_put before the return in three places. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Dmitry Torokhov drivers/input/keyboard/sun4i-lradc-keys.c | 3 +++ 1 file changed, 3 insertions(+) commit 1976d7d200c5a32e72293a2ada36b7b7c9d6dd6e Author: Nick Black Date: Thu Jul 11 23:42:03 2019 -0700 Input: synaptics - whitelist Lenovo T580 SMBus intertouch Adds the Lenovo T580 to the SMBus intertouch list for Synaptics touchpads. I've tested with this for a week now, and it seems a great improvement. It's also nice to have the complaint gone from dmesg. Signed-off-by: Nick Black Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/mouse/synaptics.c | 1 + 1 file changed, 1 insertion(+) commit 5f0f531c4f8a97258dd3133db74926574e6373ab Author: Paul Menzel Date: Mon Jul 8 13:50:05 2019 +0200 drm/amdgpu: Print out voltage in DM_PPLIB As the clock is already logged, also log the voltage. Signed-off-by: Paul Menzel Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 26202928fafad8bda8b478edb7e62c885be623d7 Author: Damien Le Moal Date: Mon Jul 1 14:09:18 2019 +0900 block: Limit zone array allocation size Limit the size of the struct blk_zone array used in blk_revalidate_disk_zones() to avoid memory allocation failures leading to disk revalidation failure. Also further reduce the likelyhood of such failures by using kvcalloc() (that is vmalloc()) instead of allocating contiguous pages with alloc_pages(). Fixes: 515ce6061312 ("scsi: sd_zbc: Fix sd_zbc_report_zones() buffer allocation") Fixes: e76239a3748c ("block: add a report_zones method") Cc: stable@vger.kernel.org Reviewed-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Signed-off-by: Damien Le Moal Signed-off-by: Jens Axboe block/blk-zoned.c | 36 ++++++++++++++++++++---------------- include/linux/blkdev.h | 5 +++++ 2 files changed, 25 insertions(+), 16 deletions(-) commit b091ac616846a1da75b1f2566b41255ce7f0e0a6 Author: Damien Le Moal Date: Mon Jul 1 14:09:17 2019 +0900 sd_zbc: Fix report zones buffer allocation During disk scan and revalidation done with sd_revalidate(), the zones of a zoned disk are checked using the helper function blk_revalidate_disk_zones() if a configuration change is detected (change in the number of zones or zone size). The function blk_revalidate_disk_zones() issues report_zones calls that are very large, that is, to obtain zone information for all zones of the disk with a single command. The size of the report zones command buffer necessary for such large request generally is lower than the disk max_hw_sectors and KMALLOC_MAX_SIZE (4MB) and succeeds on boot (no memory fragmentation), but often fail at run time (e.g. hot-plug event). This causes the disk revalidation to fail and the disk capacity to be changed to 0. This problem can be avoided by using vmalloc() instead of kmalloc() for the buffer allocation. To limit the amount of memory to be allocated, this patch also introduces the arbitrary SD_ZBC_REPORT_MAX_ZONES maximum number of zones to report with a single report zones command. This limit may be lowered further to satisfy the disk max_hw_sectors limit. Finally, to ensure that the vmalloc-ed buffer can always be mapped in a request, the buffer size is further limited to at most queue_max_segments() pages, allowing successful mapping of the buffer even in the worst case scenario where none of the buffer pages are contiguous. Fixes: 515ce6061312 ("scsi: sd_zbc: Fix sd_zbc_report_zones() buffer allocation") Fixes: e76239a3748c ("block: add a report_zones method") Cc: stable@vger.kernel.org Reviewed-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Signed-off-by: Damien Le Moal Signed-off-by: Jens Axboe drivers/scsi/sd_zbc.c | 104 ++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 75 insertions(+), 29 deletions(-) commit bd976e52725965ddcceb9abecbcc7ca46863665c Author: Damien Le Moal Date: Mon Jul 1 14:09:16 2019 +0900 block: Kill gfp_t argument of blkdev_report_zones() Only GFP_KERNEL and GFP_NOIO are used with blkdev_report_zones(). In preparation of using vmalloc() for large report buffer and zone array allocations used by this function, remove its "gfp_t gfp_mask" argument and rely on the caller context to use memalloc_noio_save/restore() where necessary (block layer zone revalidation and dm-zoned I/O error path). Reviewed-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Signed-off-by: Damien Le Moal Signed-off-by: Jens Axboe block/blk-zoned.c | 31 +++++++++++++++++++------------ drivers/block/null_blk.h | 3 +-- drivers/block/null_blk_zoned.c | 3 +-- drivers/md/dm-flakey.c | 5 ++--- drivers/md/dm-linear.c | 5 ++--- drivers/md/dm-zoned-metadata.c | 16 ++++++++++++---- drivers/md/dm.c | 6 ++---- drivers/scsi/sd.h | 3 +-- drivers/scsi/sd_zbc.c | 6 ++---- fs/f2fs/super.c | 4 +--- include/linux/blkdev.h | 5 ++--- include/linux/device-mapper.h | 3 +-- 12 files changed, 46 insertions(+), 44 deletions(-) commit b4c5875d36178e8df409bdce232f270cac89fafe Author: Damien Le Moal Date: Mon Jul 1 14:09:15 2019 +0900 block: Allow mapping of vmalloc-ed buffers To allow the SCSI subsystem scsi_execute_req() function to issue requests using large buffers that are better allocated with vmalloc() rather than kmalloc(), modify bio_map_kern() to allow passing a buffer allocated with vmalloc(). To do so, detect vmalloc-ed buffers using is_vmalloc_addr(). For vmalloc-ed buffers, flush the buffer using flush_kernel_vmap_range(), use vmalloc_to_page() instead of virt_to_page() to obtain the pages of the buffer, and invalidate the buffer addresses with invalidate_kernel_vmap_range() on completion of read BIOs. This last point is executed using the function bio_invalidate_vmalloc_pages() which is defined only if the architecture defines ARCH_HAS_FLUSH_KERNEL_DCACHE_PAGE, that is, if the architecture actually needs the invalidation done. Fixes: 515ce6061312 ("scsi: sd_zbc: Fix sd_zbc_report_zones() buffer allocation") Fixes: e76239a3748c ("block: add a report_zones method") Cc: stable@vger.kernel.org Reviewed-by: Martin K. Petersen Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Reviewed-by: Ming Lei Signed-off-by: Jens Axboe block/bio.c | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) commit e7bf90e5afe3aa1d1282c1635a49e17a32c4ecec Author: Wenwen Wang Date: Thu Jul 11 14:22:02 2019 -0500 block/bio-integrity: fix a memory leak bug In bio_integrity_prep(), a kernel buffer is allocated through kmalloc() to hold integrity metadata. Later on, the buffer will be attached to the bio structure through bio_integrity_add_page(), which returns the number of bytes of integrity metadata attached. Due to unexpected situations, bio_integrity_add_page() may return 0. As a result, bio_integrity_prep() needs to be terminated with 'false' returned to indicate this error. However, the allocated kernel buffer is not freed on this execution path, leading to a memory leak. To fix this issue, free the allocated buffer before returning from bio_integrity_prep(). Reviewed-by: Ming Lei Acked-by: Martin K. Petersen Signed-off-by: Wenwen Wang Signed-off-by: Jens Axboe block/bio-integrity.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit d7d170a8e357bd9926cc6bfea5c2385c2eac65b2 Merge: d06e4156430e 8c3166e17cf1 Author: Linus Torvalds Date: Thu Jul 11 18:45:29 2019 -0700 Merge tag 'tag-chrome-platform-for-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux Pull chrome platform updates from Benson Leung "CrOS EC: - Add new CrOS ISHTP transport protocol - Add proper documentation for debugfs entries and expose resume and uptime files - Select LPC transport protocol variant at runtime. - Add lid angle sensor driver - Fix oops on suspend/resume for lightbar driver - Set CrOS SPI transport protol in realtime Wilco EC: - Add telemetry char device interface - Add support for event handling - Add new sysfs attributes Misc: - Contains ib-mfd-cros-v5.3 immutable branch from mfd, with cros_ec_commands.h header freshly synced with Chrome OS's EC project" * tag 'tag-chrome-platform-for-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux: (54 commits) mfd / platform: cros_ec_debugfs: Expose resume result via debugfs platform/chrome: lightbar: Get drvdata from parent in suspend/resume iio: cros_ec: Add lid angle driver platform/chrome: wilco_ec: Add circular buffer as event queue platform/chrome: cros_ec_lpc_mec: Fix kernel-doc comment first line platform/chrome: cros_ec_lpc: Choose Microchip EC at runtime platform/chrome: cros_ec_lpc: Merge cros_ec_lpc and cros_ec_lpc_reg Input: cros_ec_keyb: mask out extra flags in event_type platform/chrome: wilco_ec: Fix unreleased lock in event_read() platform/chrome: cros_ec_debugfs: cros_ec_uptime_fops can be static platform/chrome: cros_ec_debugfs: Add debugfs ABI documentation platform/chrome: cros_ec_debugfs: Fix kernel-doc comment first line platform/chrome: cros_ec_debugfs: Add debugfs entry to retrieve EC uptime mfd: cros_ec: Update I2S API mfd: cros_ec: Add Management API entry points mfd: cros_ec: Add SKU ID and Secure storage API mfd: cros_ec: Add API for rwsig mfd: cros_ec: Add API for Fingerprint support mfd: cros_ec: Add API for Touchpad support mfd: cros_ec: Add API for EC-EC communication ... commit d06e4156430e7c5eb4f04dabcaa0d9e2fba335e3 Merge: 8931084c0d01 f59d261180f3 Author: Linus Torvalds Date: Thu Jul 11 18:35:30 2019 -0700 Merge tag 'devicetree-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull Devicetree updates from Rob Herring: - DT binding schema examples are now validated against the schemas. Various examples are fixed due to that. - Sync dtc with upstream version v1.5.0-30-g702c1b6c0e73 - Initial schemas for networking bindings. This includes ethernet, phy and mdio common bindings with several Allwinner and stmmac converted to the schema. - Conversion of more Arm top-level SoC/board bindings to DT schema - Conversion of PSCI binding to DT schema - Rework Arm CPU schema to coexist with other CPU schemas - Add a bunch of missing vendor prefixes and new ones for SoChip, Sipeed, Kontron, B&R Industrial Automation GmbH, and Espressif - Add Mediatek UART RX wakeup support to binding - Add reset to ST UART binding - Remove some Linuxisms from the endianness common-properties.txt binding - Make the flattened DT read-only after init - Ignore disabled reserved memory nodes - Clean-up some dead code in FDT functions * tag 'devicetree-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (56 commits) dt-bindings: vendor-prefixes: add Sipeed dt-bindings: vendor-prefixes: add SoChip dt-bindings: 83xx-512x-pci: Drop cell-index property dt-bindings: serial: add documentation for Rx in-band wakeup support dt-bindings: arm: Convert RDA Micro board/soc bindings to json-schema of: unittest: simplify getting the adapter of a client of/fdt: pass early_init_dt_reserve_memory_arch() with bool type nomap of/platform: Drop superfluous cast in of_device_make_bus_id() dt-bindings: usb: ehci: Fix example warnings dt-bindings: net: Use phy-mode instead of phy-connection-type dt-bindings: simple-framebuffer: Add requirement for pipelines dt-bindings: display: Fix simple-framebuffer example dt-bindings: net: mdio: Add child nodes dt-bindings: net: mdio: Add address and size cells dt-bindings: net: mdio: Add a nodename pattern dt-bindings: mtd: sunxi-nand: Drop 'maxItems' from child 'reg' property dt-bindings: arm: Limit cpus schema to only check Arm 'cpu' nodes dt-bindings: backlight: lm3630a: correct schema validation dt-bindings: net: dwmac: Deprecate the PHY reset properties dt-bindings: net: sun8i-emac: Convert the binding to a schemas ... commit 8931084c0d017314ad025f19353f7c5c1d3782d8 Merge: 17a20acaf171 59592cc1f593 Author: Linus Torvalds Date: Thu Jul 11 18:11:21 2019 -0700 Merge tag 'mmc-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC updates from Ulf Hansson: "MMC core: - Let the dma map ops deal with bouncing and drop dma_max_pfn() from the dma-mapping interface for ARM - Convert the generic MMC DT doc to YAML schemas - Drop questionable support for powered-on re-init of SDIO cards at runtime resume and for SDIO HW reset - Prevent questionable re-init of powered-on removable SDIO cards at system resume - Cleanup and clarify some SDIO core code MMC host: - tmio: Make runtime PM enablement more flexible for variants - tmio/renesas_sdhi: Rename DT doc tmio_mmc.txt to renesas,sdhi.txt to clarify - sdhci-pci: Add support for Intel EHL - sdhci-pci-o2micro: Enable support for 8-bit bus - sdhci-msm: Prevent acquiring a mutex while holding a spin_lock - sdhci-of-esdhc: Improve clock management and tuning - sdhci_am654: Enable support for 4 and 8-bit bus on J721E - sdhci-sprd: Use pinctrl for a proper signal voltage switch - sdhci-sprd: Add support for HS400 enhanced strobe mode - sdhci-sprd: Enable PHY DLL and allow delay config to stabilize the clock - sdhci-sprd: Add support for optional gate clock - sunxi-mmc: Convert DT doc to YAML schemas - meson-gx: Add support for broken DRAM access for DMA MEMSTICK core: - Fixup error path of memstick_init()" * tag 'mmc-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (52 commits) mmc: sdhci_am654: Add dependency on MMC_SDHCI_AM654 mmc: alcor: remove a redundant greater or equal to zero comparison mmc: sdhci-msm: fix mutex while in spinlock mmc: sdhci_am654: Make some symbols static dma-mapping: remove dma_max_pfn mmc: core: let the dma map ops handle bouncing dt-binding: mmc: rename tmio_mmc.txt to renesas,sdhi.txt mmc: sdhci-sprd: Add pin control support for voltage switch dt-bindings: mmc: sprd: Add pinctrl support mmc: sdhci-sprd: Add start_signal_voltage_switch ops mmc: sdhci-pci: Add support for Intel EHL mmc: tmio: Use dma_max_mapping_size() instead of a workaround mmc: sdio: Drop unused in-parameter from mmc_sdio_init_card() mmc: sdio: Drop unused in-parameter to mmc_sdio_reinit_card() mmc: sdio: Don't re-initialize powered-on removable SDIO cards at resume mmc: sdio: Drop powered-on re-init at runtime resume and HW reset mmc: sdio: Move comment about re-initialization to mmc_sdio_reinit_card() mmc: sdio: Drop mmc_claim|release_host() in mmc_sdio_power_restore() mmc: sdio: Turn sdio_run_irqs() into static mmc: sdhci: Fix indenting on SDHCI_CTRL_8BITBUS ... commit 484647088826f2f651acbda6bcf9536b8a466703 Author: Benjamin Block Date: Tue Jul 2 23:02:02 2019 +0200 scsi: zfcp: fix GCC compiler warning emitted with -Wmaybe-uninitialized GCC v9 emits this warning: CC drivers/s390/scsi/zfcp_erp.o drivers/s390/scsi/zfcp_erp.c: In function 'zfcp_erp_action_enqueue': drivers/s390/scsi/zfcp_erp.c:217:26: warning: 'erp_action' may be used uninitialized in this function [-Wmaybe-uninitialized] 217 | struct zfcp_erp_action *erp_action; | ^~~~~~~~~~ This is a possible false positive case, as also documented in the GCC documentations: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wmaybe-uninitialized The actual code-sequence is like this: Various callers can invoke the function below with the argument "want" being one of: ZFCP_ERP_ACTION_REOPEN_ADAPTER, ZFCP_ERP_ACTION_REOPEN_PORT_FORCED, ZFCP_ERP_ACTION_REOPEN_PORT, or ZFCP_ERP_ACTION_REOPEN_LUN. zfcp_erp_action_enqueue(want, ...) ... need = zfcp_erp_required_act(want, ...) need = want ... maybe: need = ZFCP_ERP_ACTION_REOPEN_PORT maybe: need = ZFCP_ERP_ACTION_REOPEN_ADAPTER ... return need ... zfcp_erp_setup_act(need, ...) struct zfcp_erp_action *erp_action; // <== line 217 ... switch(need) { case ZFCP_ERP_ACTION_REOPEN_LUN: ... erp_action = &zfcp_sdev->erp_action; WARN_ON_ONCE(erp_action->port != port); // <== access ... break; case ZFCP_ERP_ACTION_REOPEN_PORT: case ZFCP_ERP_ACTION_REOPEN_PORT_FORCED: ... erp_action = &port->erp_action; WARN_ON_ONCE(erp_action->port != port); // <== access ... break; case ZFCP_ERP_ACTION_REOPEN_ADAPTER: ... erp_action = &adapter->erp_action; WARN_ON_ONCE(erp_action->port != NULL); // <== access ... break; } ... WARN_ON_ONCE(erp_action->adapter != adapter); // <== access When zfcp_erp_setup_act() is called, 'need' will never be anything else than one of the 4 possible enumeration-names that are used in the switch-case, and 'erp_action' is initialized for every one of them, before it is used. Thus the warning is a false positive, as documented. We introduce the extra if{} in the beginning to create an extra code-flow, so the compiler can be convinced that the switch-case will never see any other value. BUG_ON()/BUG() is intentionally not used to not crash anything, should this ever happen anyway - right now it's impossible, as argued above; and it doesn't introduce a 'default:' switch-case to retain warnings should 'enum zfcp_erp_act_type' ever be extended and no explicit case be introduced. See also v5.0 commit 399b6c8bc9f7 ("scsi: zfcp: drop old default switch case which might paper over missing case"). Signed-off-by: Benjamin Block Reviewed-by: Jens Remus Reviewed-by: Steffen Maier Signed-off-by: Martin K. Petersen drivers/s390/scsi/zfcp_erp.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 106d45f350c7cac876844dc685845cba4ffdb70b Author: Benjamin Block Date: Tue Jul 2 23:02:01 2019 +0200 scsi: zfcp: fix request object use-after-free in send path causing wrong traces When tracing instances where we open and close WKA ports, we also pass the request-ID of the respective FSF command. But after successfully sending the FSF command we must not use the request-object anymore, as this might result in an use-after-free (see "zfcp: fix request object use-after-free in send path causing seqno errors" ). To fix this add a new variable that caches the request-ID before sending the request. This won't change during the hand-off to the FCP channel, and so it's safe to trace this cached request-ID later, instead of using the request object. Signed-off-by: Benjamin Block Fixes: d27a7cb91960 ("zfcp: trace on request for open and close of WKA port") Cc: #2.6.38+ Reviewed-by: Steffen Maier Reviewed-by: Jens Remus Signed-off-by: Martin K. Petersen drivers/s390/scsi/zfcp_fsf.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit b76becde2b84137faa29bbc9a3b20953b5980e48 Author: Benjamin Block Date: Tue Jul 2 23:02:00 2019 +0200 scsi: zfcp: fix request object use-after-free in send path causing seqno errors With a recent change to our send path for FSF commands we introduced a possible use-after-free of request-objects, that might further lead to zfcp crafting bad requests, which the FCP channel correctly complains about with an error (FSF_PROT_SEQ_NUMB_ERROR). This error is then handled by an adapter-wide recovery. The following sequence illustrates the possible use-after-free: Send Path: int zfcp_fsf_open_port(struct zfcp_erp_action *erp_action) { struct zfcp_fsf_req *req; ... spin_lock_irq(&qdio->req_q_lock); // ^^^^^^^^^^^^^^^^ // protects QDIO queue during sending ... req = zfcp_fsf_req_create(qdio, FSF_QTCB_OPEN_PORT_WITH_DID, SBAL_SFLAGS0_TYPE_READ, qdio->adapter->pool.erp_req); // ^^^^^^^^^^^^^^^^^^^ // allocation of the request-object ... retval = zfcp_fsf_req_send(req); ... spin_unlock_irq(&qdio->req_q_lock); return retval; } static int zfcp_fsf_req_send(struct zfcp_fsf_req *req) { struct zfcp_adapter *adapter = req->adapter; struct zfcp_qdio *qdio = adapter->qdio; ... zfcp_reqlist_add(adapter->req_list, req); // ^^^^^^^^^^^^^^^^ // add request to our driver-internal hash-table for tracking // (protected by separate lock req_list->lock) ... if (zfcp_qdio_send(qdio, &req->qdio_req)) { // ^^^^^^^^^^^^^^ // hand-off the request to FCP channel; // the request can complete at any point now ... } /* Don't increase for unsolicited status */ if (!zfcp_fsf_req_is_status_read_buffer(req)) // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // possible use-after-free adapter->fsf_req_seq_no++; // ^^^^^^^^^^^^^^^^ // because of the use-after-free we might // miss this accounting, and as follow-up // this results in the FCP channel error // FSF_PROT_SEQ_NUMB_ERROR adapter->req_no++; return 0; } static inline bool zfcp_fsf_req_is_status_read_buffer(struct zfcp_fsf_req *req) { return req->qtcb == NULL; // ^^^^^^^^^ // possible use-after-free } Response Path: void zfcp_fsf_reqid_check(struct zfcp_qdio *qdio, int sbal_idx) { ... struct zfcp_fsf_req *fsf_req; ... for (idx = 0; idx < QDIO_MAX_ELEMENTS_PER_BUFFER; idx++) { ... fsf_req = zfcp_reqlist_find_rm(adapter->req_list, req_id); // ^^^^^^^^^^^^^^^^^^^^ // remove request from our driver-internal // hash-table (lock req_list->lock) ... zfcp_fsf_req_complete(fsf_req); } } static void zfcp_fsf_req_complete(struct zfcp_fsf_req *req) { ... if (likely(req->status & ZFCP_STATUS_FSFREQ_CLEANUP)) zfcp_fsf_req_free(req); // ^^^^^^^^^^^^^^^^^ // free memory for request-object else complete(&req->completion); // ^^^^^^^^ // completion notification for code-paths that wait // synchronous for the completion of the request; in // those the memory is freed separately } The result of the use-after-free only affects the send path, and can not lead to any data corruption. In case we miss the sequence-number accounting, because the memory was already re-purposed, the next FSF command will fail with said FCP channel error, and we will recover the whole adapter. This causes no additional errors, but it slows down traffic. There is a slight chance of the same thing happen again recursively after the adapter recovery, but so far this has not been seen. This was seen under z/VM, where the send path might run on a virtual CPU that gets scheduled away by z/VM, while the return path might still run, and so create the necessary timing. Running with KASAN can also slow down the kernel sufficiently to run into this user-after-free, and then see the report by KASAN. To fix this, simply pull the test for the sequence-number accounting in front of the hand-off to the FCP channel (this information doesn't change during hand-off), but leave the sequence-number accounting itself where it is. To make future regressions of the same kind less likely, add comments to all closely related code-paths. Signed-off-by: Benjamin Block Fixes: f9eca0227600 ("scsi: zfcp: drop duplicate fsf_command from zfcp_fsf_req which is also in QTCB header") Cc: #5.0+ Reviewed-by: Steffen Maier Reviewed-by: Jens Remus Signed-off-by: Martin K. Petersen drivers/s390/scsi/zfcp_fsf.c | 45 +++++++++++++++++++++++++++++++++++++++----- 1 file changed, 40 insertions(+), 5 deletions(-) commit 705d3b088af9c1aac8a388456f5b9c38f04f97a1 Author: Shivasharan S Date: Fri Jun 28 02:50:41 2019 -0700 scsi: megaraid_sas: Update driver version to 07.710.50.00 Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d956a116c96cfa651b5ed5c783984a33d5222268 Author: Shivasharan S Date: Fri Jun 28 02:50:40 2019 -0700 scsi: megaraid_sas: Add module parameter for FW Async event logging Add module parameter to control logging levels of async event notifications from firmware that get logged to system log. Also, allow changing the value from sysfs after driver load. Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit 1175b88452cad208894412b955ee698934968aed Author: Shivasharan S Date: Fri Jun 28 02:50:39 2019 -0700 scsi: megaraid_sas: Enable msix_load_balance for Invader and later controllers Load balancing IO completions across all available MSI-X vectors should be enabled for Invader and later generation controllers only. This needs to be disabled for older controllers. Add an adapter type check before setting msix_load_balance flag. Fixes: 1d15d9098ad1 ("scsi: megaraid_sas: Load balance completions across all MSI-X") Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c8f96df5b8e633056b7ebf5d52a9d6fb1b156ce3 Author: Shivasharan S Date: Fri Jun 28 18:02:12 2019 -0700 scsi: megaraid_sas: Fix calculation of target ID In megasas_get_target_prop(), driver is incorrectly calculating the target ID for devices with channel 1 and 3. Due to this, firmware will either fail the command (if there is no device with the target id sent from driver) or could return the properties for a target which was not intended. Devices could end up with the wrong queue depth due to this. Fix target id calculation for channel 1 and 3. Fixes: 96188a89cc6d ("scsi: megaraid_sas: NVME interface target prop added") Cc: stable@vger.kernel.org Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 057959c6e36e4e6e5303a39c4df79c4af9d40923 Author: Arnd Bergmann Date: Fri Jun 28 14:37:47 2019 +0200 scsi: lpfc: reduce stack size with CONFIG_GCC_PLUGIN_STRUCTLEAK_VERBOSE The lpfc_debug_dump_all_queues() function repeatedly calls into lpfc_debug_dump_qe() which has a temporary 128 byte buffer. This was fine before the introduction of CONFIG_GCC_PLUGIN_STRUCTLEAK_VERBOSE because each instance could occupy the same stack slot. However, now they each get their own copy, which leads to a huge increase in stack usage as seen from the compiler warning: drivers/scsi/lpfc/lpfc_debugfs.c: In function 'lpfc_debug_dump_all_queues': drivers/scsi/lpfc/lpfc_debugfs.c:6474:1: error: the frame size of 1712 bytes is larger than 100 bytes [-Werror=frame-larger-than=] Avoid this by not marking lpfc_debug_dump_qe() as inline so the compiler can choose to emit a static version of this function when it's needed or otherwise silently drop it. As an added benefit, not inlining multiple copies of this function means we save several kilobytes of .text section, reducing the file size from 47kb to 43. It is somewhat unusual to have a function that is static but not inline in a header file, but this does not cause problems here because it is only used by other inline functions. It would however seem reasonable to move all the lpfc_debug_dump_* functions into lpfc_debugfs.c and not mark them inline as a later cleanup. Fixes: 81a56f6dcd20 ("gcc-plugins: structleak: Generalize to all variable types") Signed-off-by: Arnd Bergmann Acked-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_debugfs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4bc022145c939dd3938771535a8074a884aec0f9 Author: Marcos Paulo de Souza Date: Mon Jun 17 22:31:45 2019 -0300 scsi: devinfo: BLIST_TRY_VPD_PAGES for SanDisk Cruzer Blade Currently, all USB devices skip VPD pages, even when the device supports them (SPC-3 and later), but some of them support VPD, like Cruzer Blade. Signed-off-by: Marcos Paulo de Souza Signed-off-by: Martin K. Petersen drivers/scsi/scsi_devinfo.c | 2 ++ 1 file changed, 2 insertions(+) commit 196ba6629cf95e51403337235d09742fcdc3febd Author: Deepak Ukey Date: Tue Jul 9 15:30:48 2019 +0530 scsi: pm80xx: Fixed kernel panic during error recovery for SATA drive Disabling the SATA drive interface cause kernel panic. When the drive Interface is disabled, device should be deregistered after aborting all pending I/Os. Also changed the port recovery timeout to 10000 ms for PM8006 controller. Signed-off-by: Deepak Ukey Signed-off-by: Viswas G Reviewed-by: Jack Wang Signed-off-by: Martin K. Petersen drivers/scsi/pm8001/pm8001_sas.c | 6 +++++- drivers/scsi/pm8001/pm80xx_hwi.c | 2 +- drivers/scsi/pm8001/pm80xx_hwi.h | 2 ++ 3 files changed, 8 insertions(+), 2 deletions(-) commit 9b79ee9773a8c11772b2d0ed0cec831c7a68dc4f Author: Denis Efremov Date: Mon Jul 8 19:43:39 2019 +0300 scsi: libsas: remove the exporting of sas_wait_eh The function sas_wait_eh is declared static and marked EXPORT_SYMBOL, which is at best an odd combination. Because the function is not used outside of the drivers/scsi/libsas/sas_scsi_host.c file it is defined in, this commit removes the EXPORT_SYMBOL() marking. Signed-off-by: Denis Efremov Reviewed-by: Jason Yan Signed-off-by: Martin K. Petersen drivers/scsi/libsas/sas_scsi_host.c | 1 - 1 file changed, 1 deletion(-) commit 6764f519bcb007bf09f328133311d6cdc2bbc72f Author: YueHaibing Date: Tue Jul 2 21:01:14 2019 +0800 scsi: megaraid_sas: Make some symbols static Fix sparse warnings: drivers/scsi/megaraid/megaraid_sas_base.c:271:1: warning: symbol 'megasas_issue_dcmd' was not declared. Should it be static? drivers/scsi/megaraid/megaraid_sas_base.c:2227:6: warning: symbol 'megasas_do_ocr' was not declared. Should it be static? drivers/scsi/megaraid/megaraid_sas_base.c:3194:25: warning: symbol 'megaraid_host_attrs' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: YueHaibing Acked-by: Sumit Saxena Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 463cdad83823830dd59572fb81ac243f6a44b589 Author: Maurizio Lombardi Date: Tue Jul 2 13:27:05 2019 +0200 scsi: core: use scmd_printk() to print which command timed out With a possibly faulty disk the following messages may appear in the logs: kernel: sd 0:0:9:0: timing out command, waited 180s kernel: sd 0:0:9:0: timing out command, waited 20s kernel: sd 0:0:9:0: timing out command, waited 20s kernel: sd 0:0:9:0: timing out command, waited 60s kernel: sd 0:0:9:0: timing out command, waited 20s This is not very informative because it's not possible to identify the command that timed out. This patch replaces sdev_printk() with scmd_printk(). Signed-off-by: Maurizio Lombardi Reviewed-by: Ewan D. Milne Reviewed-by: Ming Lei Signed-off-by: Martin K. Petersen drivers/scsi/scsi_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 17a20acaf171124017f43bc70bb4d7ca88070659 Merge: d72619706abc 2bc8bb813cba Author: Linus Torvalds Date: Thu Jul 11 15:40:06 2019 -0700 Merge tag 'usb-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB / PHY updates from Greg KH: "Here is the big USB and PHY driver pull request for 5.3-rc1. Lots of stuff here, all of which has been in linux-next for a while with no reported issues. Nothing is earth-shattering, just constant forward progress for more devices supported and cleanups and small fixes: - USB gadget driver updates and fixes - new USB gadget driver for some hardware, followed by a quick revert of those patches as they were not ready to be merged... - PHY driver updates - Lots of new driver additions and cleanups with a few fixes mixed in" * tag 'usb-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (145 commits) Revert "usb: gadget: storage: Remove warning message" Revert "dt-bindings: add binding for USBSS-DRD controller." Revert "usb:gadget Separated decoding functions from dwc3 driver." Revert "usb:gadget Patch simplify usb_decode_set_clear_feature function." Revert "usb:gadget Simplify usb_decode_get_set_descriptor function." Revert "usb:cdns3 Add Cadence USB3 DRD Driver" Revert "usb:cdns3 Fix for stuck packets in on-chip OUT buffer." usb :fsl: Change string format for errata property usb: host: Stops USB controller init if PLL fails to lock usb: linux/fsl_device: Add platform member has_fsl_erratum_a006918 usb: phy: Workaround for USB erratum-A005728 usb: fsl: Set USB_EN bit to select ULPI phy usb: Handle USB3 remote wakeup for LPM enabled devices correctly drivers/usb/typec/tps6598x.c: fix 4CC cmd write drivers/usb/typec/tps6598x.c: fix portinfo width usb: storage: scsiglue: Do not skip VPD if try_vpd_pages is set usb: renesas_usbhs: add a workaround for a race condition of workqueue usb: gadget: udc: renesas_usb3: remove redundant assignment to ret usb: dwc2: use a longer AHB idle timeout in dwc2_core_reset() USB: gadget: function: fix issue Unneeded variable: "value" ... commit d72619706abc4aa7e540ea882dae883cee7cc3b3 Merge: e786741ff1b5 35a4ed0164e9 Author: Linus Torvalds Date: Thu Jul 11 15:38:21 2019 -0700 Merge tag 'tty-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty / serial driver updates from Greg KH: "Here is the "large" TTY and Serial driver update for 5.3-rc1. It's in the negative number of lines overall as we removed an obsolete serial driver that was causing problems for some people who were trying to clean up some apis (the mpsc.c driver, which only worked for some pre-production hardware that no one has anymore.) Other than that, lots of tiny changes, cleaning up small things along with some platform-specific serial driver updates. All of these have been in linux-next for a while now with no reported issues" * tag 'tty-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (68 commits) tty: serial: fsl_lpuart: add imx8qxp support serial: imx: set_termios(): preserve RTS state serial: imx: set_termios(): clarify RTS/CTS bits calculation serial: imx: set_termios(): factor-out 'ucr2' initial value serial: sh-sci: Terminate TX DMA during buffer flushing serial: sh-sci: Fix TX DMA buffer flushing and workqueue races serial: mpsc: Remove obsolete MPSC driver serial: 8250: 8250_core: Fix missing unlock on error in serial8250_register_8250_port() serial: stm32: add RX and TX FIFO flush serial: stm32: add support of RX FIFO threshold serial: stm32: add support of TX FIFO threshold serial: stm32: update PIO transmission serial: stm32: add support of timeout interrupt for RX Revert "serial: 8250: Don't service RX FIFO if interrupts are disabled" tty/serial/8250: use mctrl_gpio helpers serial: mctrl_gpio: Check if GPIO property exisits before requesting it serial: 8250: pericom_do_set_divisor can be static tty: serial_core: Set port active bit in uart_port_activate serial: 8250: Add MSR/MCR TIOCM conversion wrapper functions serial: 8250: factor out serial8250_{set,clear}_THRI() helpers ... commit e786741ff1b52769b044b7f4407f39cd13ee5d2d Merge: 97ff4ca46d32 5d1532482943 Author: Linus Torvalds Date: Thu Jul 11 15:36:02 2019 -0700 Merge tag 'staging-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging and IIO driver updates from Greg KH: "Here is the big Staging and IIO driver update for 5.3-rc1. Lots of new IIO drivers are in here, along with loads of tiny staging driver cleanups and fixes. Overall we almost break even with the same lines added as removed. Full details are in the shortlog, they are too large to list here. All of these changes have been in linux-next for a while with no reported issues" * tag 'staging-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (608 commits) staging: kpc2000: simplify comparison to NULL in fileops.c staging: kpc2000: simplify comparison to NULL in dma.c staging: kpc2000: simplify comparison to NULL in kpc2000_spi.c staging: rtl8723bs: hal: remove redundant assignment to packetType staging: rtl8723bs: Change return type of hal_btcoex_IsBtDisabled() staging: rtl8723bs: Remove rtw_btcoex_DisplayBtCoexInfo() staging: rtl8723bs: Remove function rtw_btcoex_GetDBG() staging: rtl8723bs: Remove function rtw_btcoex_SetDBG() staging: rtl8723bs: Remove rtw_btcoex_IsBTCoexCtrlAMPDUSize() staging: rtl8723bs: Remove rtw_btcoex_BtInfoNotify() staging: rtl8723bs: Remove rtw_btcoex_ScanNotify() staging: rtl8723bs: Remove rtw_btcoex_SetSingleAntPath() staging: rtl8723bs: Remove rtw_btcoex_SetPGAntNum() staging: rtl8192e: remove redundant initialization of rtstatus staging: rtl8723bs: Remove rtw_btcoex_GetRaMask() staging: rtl8723bs: Remove rtw_btcoex_SetChipType() staging: rtl8723bs: Remove rtw_btcoex_ConnectNotify() staging: rtl8723bs: Remove rtw_btcoex_SetBTCoexist() staging: rtl8723bs: Remove rtw_btcoex_IsBtDisabled() staging: rtl8723bs: Remove rtw_btcoex_IsBtControlLps() ... commit 97ff4ca46d3279134cec49752de8c5a62dc68460 Merge: 4832a4dada1a 2f4281f4dce1 Author: Linus Torvalds Date: Thu Jul 11 15:34:05 2019 -0700 Merge tag 'char-misc-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char / misc driver updates from Greg KH: "Here is the "large" pull request for char and misc and other assorted smaller driver subsystems for 5.3-rc1. It seems that this tree is becoming the funnel point of lots of smaller driver subsystems, which is fine for me, but that's why it is getting larger over time and does not just contain stuff under drivers/char/ and drivers/misc. Lots of small updates all over the place here from different driver subsystems: - habana driver updates - coresight driver updates - documentation file movements and updates - Android binder fixes and updates - extcon driver updates - google firmware driver updates - fsi driver updates - smaller misc and char driver updates - soundwire driver updates - nvmem driver updates - w1 driver fixes All of these have been in linux-next for a while with no reported issues" * tag 'char-misc-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (188 commits) coresight: Do not default to CPU0 for missing CPU phandle dt-bindings: coresight: Change CPU phandle to required property ocxl: Allow contexts to be attached with a NULL mm fsi: sbefifo: Don't fail operations when in SBE IPL state coresight: tmc: Smatch: Fix potential NULL pointer dereference coresight: etm3x: Smatch: Fix potential NULL pointer dereference coresight: Potential uninitialized variable in probe() coresight: etb10: Do not call smp_processor_id from preemptible coresight: tmc-etf: Do not call smp_processor_id from preemptible coresight: tmc-etr: alloc_perf_buf: Do not call smp_processor_id from preemptible coresight: tmc-etr: Do not call smp_processor_id() from preemptible docs: misc-devices: convert files without extension to ReST fpga: dfl: fme: align PR buffer size per PR datawidth fpga: dfl: fme: remove copy_to_user() in ioctl for PR fpga: dfl-fme-mgr: fix FME_PR_INTFC_ID register address. intel_th: msu: Start read iterator from a non-empty window intel_th: msu: Split sgt array and pointer in multiwindow mode intel_th: msu: Support multipage blocks intel_th: pci: Add Ice Lake NNPI support intel_th: msu: Fix single mode with disabled IOMMU ... commit 4832a4dada1a2baefac76b70e4f3a78e71a7c35c Merge: db0457338ece 86766756ac2b Author: Linus Torvalds Date: Thu Jul 11 15:32:11 2019 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID updates from Jiri Kosina: - Documentation conversion to ReST, from Mauro Carvalho Chehab - Wacom MobileStudio Pro support, from Ping Cheng - Wacom 2nd Gen Intuos Pro Small support, from Aaron Armstrong Skomra - assorted small fixes and device ID additions * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: HID: Add another Primax PIXART OEM mouse quirk HID: wacom: generic: add touchring adjustment for 2nd Gen Pro Small docs: hid: convert to ReST HID: remove NO_D3 flag when remove driver HID: wacom: add new MobileStudio Pro support HID: wacom: generic: read the number of expected touches on a per collection basis HID: wacom: generic: support the 'report valid' usage for touch HID: wacom: generic: read HID_DG_CONTACTMAX from any feature report HID: wacom: Add 2nd gen Intuos Pro Small support HID: uclogic: Add support for Ugee Rainbow CV720 HID: logitech-dj: fix return value of logi_dj_recv_query_hidpp_devices HID: logitech-hidpp: HID: make const array consumer_rdesc_start static HID: logitech-dj: make const array template static HID: wacom: correct touch resolution x/y typo HID: wacom: generic: Correct pad syncing HID: wacom: generic: only switch the mode on devices with LEDs HID: logitech-dj: Add usb-id for the 27MHz MX3000 receiver commit db0457338ece7482378d88e50ad298191c3e6947 Merge: 1f7563f743d7 38195dd5e916 Author: Linus Torvalds Date: Thu Jul 11 15:30:05 2019 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching Pull livepatching updates from Jiri Kosina: - stacktrace handling improvements from Miroslav benes - debug output improvements from Petr Mladek * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching: livepatch: Remove duplicate warning about missing reliable stacktrace support Revert "livepatch: Remove reliable stacktrace check in klp_try_switch_task()" stacktrace: Remove weak version of save_stack_trace_tsk_reliable() livepatch: Use static buffer for debugging messages under rq lock livepatch: Remove stale kobj_added entries from kernel-doc descriptions commit 3194d6adfe8e4da74e04b8eacef2bd7eea3f8992 Merge: 114a5c324015 dc205a8d3422 Author: David S. Miller Date: Thu Jul 11 15:27:20 2019 -0700 Merge branch 'net/rds-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux Santosh Shilimkar says: ==================== rds fixes Few rds fixes which makes rds rdma transport reliably working on mainline First two fixes are applicable to v4.11+ stable versions and last three patches applies to only v5.1 stable and current mainline. Patchset is re-based against 'net' and also available on below tree ==================== Signed-off-by: David S. Miller commit 1f7563f743d7081710a9d186a8b203997d09f383 Merge: ba6d10ab8014 3e99b3b13a1f Author: Linus Torvalds Date: Thu Jul 11 15:17:41 2019 -0700 Merge tag 'scsi-sg' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI scatter-gather list updates from James Bottomley: "This topic branch covers a fundamental change in how our sg lists are allocated to make mq more efficient by reducing the size of the preallocated sg list. This necessitates a large number of driver changes because the previous guarantee that if a driver specified SG_ALL as the size of its scatter list, it would get a non-chained list and didn't need to bother with scatterlist iterators is now broken and every driver *must* use scatterlist iterators. This was broken out as a separate topic because we need to convert all the drivers before pulling the trigger and unconverted drivers kept being found, necessitating a rebase" * tag 'scsi-sg' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (21 commits) scsi: core: don't preallocate small SGL in case of NO_SG_CHAIN scsi: lib/sg_pool.c: clear 'first_chunk' in case of no preallocation scsi: core: avoid preallocating big SGL for data scsi: core: avoid preallocating big SGL for protection information scsi: lib/sg_pool.c: improve APIs for allocating sg pool scsi: esp: use sg helper to iterate over scatterlist scsi: NCR5380: use sg helper to iterate over scatterlist scsi: wd33c93: use sg helper to iterate over scatterlist scsi: ppa: use sg helper to iterate over scatterlist scsi: pcmcia: nsp_cs: use sg helper to iterate over scatterlist scsi: imm: use sg helper to iterate over scatterlist scsi: aha152x: use sg helper to iterate over scatterlist scsi: s390: zfcp_fc: use sg helper to iterate over scatterlist scsi: staging: unisys: visorhba: use sg helper to iterate over scatterlist scsi: usb: image: microtek: use sg helper to iterate over scatterlist scsi: pmcraid: use sg helper to iterate over scatterlist scsi: ipr: use sg helper to iterate over scatterlist scsi: mvumi: use sg helper to iterate over scatterlist scsi: lpfc: use sg helper to iterate over scatterlist scsi: advansys: use sg helper to iterate over scatterlist ... commit ba6d10ab8014ac10d25ca513352b6665e73b5785 Merge: 64b08df460cf baf23eddbf2a Author: Linus Torvalds Date: Thu Jul 11 15:14:01 2019 -0700 Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI updates from James Bottomley: "This is mostly update of the usual drivers: qla2xxx, hpsa, lpfc, ufs, mpt3sas, ibmvscsi, megaraid_sas, bnx2fc and hisi_sas as well as the removal of the osst driver (I heard from Willem privately that he would like the driver removed because all his test hardware has failed). Plus number of minor changes, spelling fixes and other trivia. The big merge conflict this time around is the SPDX licence tags. Following discussion on linux-next, we believe our version to be more accurate than the one in the tree, so the resolution is to take our version for all the SPDX conflicts" Note on the SPDX license tag conversion conflicts: the SCSI tree had done its own SPDX conversion, which in some cases conflicted with the treewide ones done by Thomas & co. In almost all cases, the conflicts were purely syntactic: the SCSI tree used the old-style SPDX tags ("GPL-2.0" and "GPL-2.0+") while the treewide conversion had used the new-style ones ("GPL-2.0-only" and "GPL-2.0-or-later"). In these cases I picked the new-style one. In a few cases, the SPDX conversion was actually different, though. As explained by James above, and in more detail in a pre-pull-request thread: "The other problem is actually substantive: In the libsas code Luben Tuikov originally specified gpl 2.0 only by dint of stating: * This file is licensed under GPLv2. In all the libsas files, but then muddied the water by quoting GPLv2 verbatim (which includes the or later than language). So for these files Christoph did the conversion to v2 only SPDX tags and Thomas converted to v2 or later tags" So in those cases, where the spdx tag substantially mattered, I took the SCSI tree conversion of it, but then also took the opportunity to turn the old-style "GPL-2.0" into a new-style "GPL-2.0-only" tag. Similarly, when there were whitespace differences or other differences to the comments around the copyright notices, I took the version from the SCSI tree as being the more specific conversion. Finally, in the spdx conversions that had no conflicts (because the treewide ones hadn't been done for those files), I just took the SCSI tree version as-is, even if it was old-style. The old-style conversions are perfectly valid, even if the "-only" and "-or-later" versions are perhaps more descriptive. * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (185 commits) scsi: qla2xxx: move IO flush to the front of NVME rport unregistration scsi: qla2xxx: Fix NVME cmd and LS cmd timeout race condition scsi: qla2xxx: on session delete, return nvme cmd scsi: qla2xxx: Fix kernel crash after disconnecting NVMe devices scsi: megaraid_sas: Update driver version to 07.710.06.00-rc1 scsi: megaraid_sas: Introduce various Aero performance modes scsi: megaraid_sas: Use high IOPS queues based on IO workload scsi: megaraid_sas: Set affinity for high IOPS reply queues scsi: megaraid_sas: Enable coalescing for high IOPS queues scsi: megaraid_sas: Add support for High IOPS queues scsi: megaraid_sas: Add support for MPI toolbox commands scsi: megaraid_sas: Offload Aero RAID5/6 division calculations to driver scsi: megaraid_sas: RAID1 PCI bandwidth limit algorithm is applicable for only Ventura scsi: megaraid_sas: megaraid_sas: Add check for count returned by HOST_DEVICE_LIST DCMD scsi: megaraid_sas: Handle sequence JBOD map failure at driver level scsi: megaraid_sas: Don't send FPIO to RL Bypass queue scsi: megaraid_sas: In probe context, retry IOC INIT once if firmware is in fault scsi: megaraid_sas: Release Mutex lock before OCR in case of DCMD timeout scsi: megaraid_sas: Call disable_irq from process IRQ poll scsi: megaraid_sas: Remove few debug counters from IO path ... commit 114a5c3240155fdb01bf821c9d326d7bb05bd464 Merge: 08d14c49ac94 ef1ce7d7b67b Author: David S. Miller Date: Thu Jul 11 15:06:37 2019 -0700 Merge tag 'mlx5-fixes-2019-07-11' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== Mellanox, mlx5 fixes 2019-07-11 This series introduces some fixes to mlx5 driver. Please pull and let me know if there is any problem. For -stable v4.15 ('net/mlx5e: IPoIB, Add error path in mlx5_rdma_setup_rn') For -stable v5.1 ('net/mlx5e: Fix port tunnel GRE entropy control') ('net/mlx5e: Rx, Fix checksum calculation for new hardware') ('net/mlx5e: Fix return value from timeout recover function') ('net/mlx5e: Fix error flow in tx reporter diagnose') For -stable v5.2 ('net/mlx5: E-Switch, Fix default encap mode') Conflict note: This pull request will produce a small conflict when merged with net-next. In drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c Take the hunk from net and replace: esw_offloads_steering_init(esw, vf_nvports, total_nvports); with: esw_offloads_steering_init(esw); ==================== Signed-off-by: David S. Miller commit 08d14c49ac949b0e42f2aa36fb8d5c860cfe130d Merge: d44e3fa5d7e6 9446d17e0e21 Author: David S. Miller Date: Thu Jul 11 15:04:39 2019 -0700 Merge branch 'mlx5-build-fixes' Saeed Mahameed says: ==================== Mellanox, mlx5 build fixes I know net-next is closed but these patches are fixing some compiler build and warnings issues people have been complaining about. I hope it is not too late, but in case it is a lot of trouble for you, I guess they can wait. ==================== Signed-off-by: David S. Miller commit 9446d17e0e21889046568e5f970e9c706acb01f5 Author: Saeed Mahameed Date: Thu Jul 11 19:39:59 2019 +0000 net/mlx5: E-Switch, Reduce ingress acl modify metadata stack usage Fix the following compiler warning: In function ‘esw_vport_add_ingress_acl_modify_metadata’: the frame size of 1084 bytes is larger than 1024 bytes [-Wframe-larger-than=] Since the structure is never written to, we can statically allocate it to avoid the stack usage. Fixes: 7445cfb1169c ("net/mlx5: E-Switch, Tag packet with vport number in VF vports and uplink ingress ACLs") Signed-off-by: Saeed Mahameed Reviewed-by: Jianbo Liu Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2f1f5a7731df239a0d1965bc6b75ac37dcb803f3 Author: Saeed Mahameed Date: Thu Jul 11 19:39:57 2019 +0000 net/mlx5e: Fix unused variable warning when CONFIG_MLX5_ESWITCH is off In mlx5e_setup_tc "priv" variable is not being used if CONFIG_MLX5_ESWITCH is off, one way to fix this is to actually use it. mlx5e_setup_tc_mqprio also needs the "priv" variable and it extracts it on its own. We can simply pass priv to mlx5e_setup_tc_mqprio instead of netdev and avoid extracting the priv var, which will also resolve the compiler warning. Fixes: 4e95bc268b91 ("net: flow_offload: add flow_block_cb_setup_simple()") Signed-off-by: Saeed Mahameed Reviewed-by: Mark Bloch Reviewed-by: Tariq Toukan CC: Nathan Chancellor Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit c93dfec10f1d693a897bfd0d6e3a58a5ea7edc91 Author: Tariq Toukan Date: Thu Jul 11 19:39:55 2019 +0000 net/mlx5e: Fix compilation error in TLS code In the cited patch below, the Kconfig flags combination of: CONFIG_MLX5_FPGA is not set CONFIG_MLX5_TLS=y CONFIG_MLX5_EN_TLS=y leads to the compilation error: ./include/linux/mlx5/device.h:61:39: error: invalid application of sizeof to incomplete type struct mlx5_ifc_tls_flow_bits. Fix it. Fixes: 90687e1a9a50 ("net/mlx5: Kconfig, Better organize compilation flags") Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed CC: Mao Wenan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/accel/tls.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7d30c81b80ea9b0812d27030a46a5bf4c4e328f5 Author: Minwoo Im Date: Fri Jul 12 02:04:47 2019 +0900 nvme: fix NULL deref for fabrics options git://git.infradead.org/nvme.git nvme-5.3 branch now causes the following NULL deref oops. Check the ctrl->opts first before the deref. [ 16.337581] BUG: kernel NULL pointer dereference, address: 0000000000000056 [ 16.338551] #PF: supervisor read access in kernel mode [ 16.338551] #PF: error_code(0x0000) - not-present page [ 16.338551] PGD 0 P4D 0 [ 16.338551] Oops: 0000 [#1] SMP PTI [ 16.338551] CPU: 2 PID: 1035 Comm: kworker/u16:5 Not tainted 5.2.0-rc6+ #1 [ 16.338551] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.11.2-0-gf9626ccb91-prebuilt.qemu-project.org 04/01/2014 [ 16.338551] Workqueue: nvme-wq nvme_scan_work [nvme_core] [ 16.338551] RIP: 0010:nvme_validate_ns+0xc9/0x7e0 [nvme_core] [ 16.338551] Code: c0 49 89 c5 0f 84 00 07 00 00 48 8b 7b 58 e8 be 48 39 c1 48 3d 00 f0 ff ff 49 89 45 18 0f 87 a4 06 00 00 48 8b 93 70 0a 00 00 <80> 7a 56 00 74 0c 48 8b 40 68 83 48 3c 08 49 8b 45 18 48 89 c6 bf [ 16.338551] RSP: 0018:ffffc900024c7d10 EFLAGS: 00010283 [ 16.338551] RAX: ffff888135a30720 RBX: ffff88813a4fd1f8 RCX: 0000000000000007 [ 16.338551] RDX: 0000000000000000 RSI: ffffffff8256dd38 RDI: ffff888135a30720 [ 16.338551] RBP: 0000000000000001 R08: 0000000000000007 R09: ffff88813aa6a840 [ 16.338551] R10: 0000000000000001 R11: 000000000002d060 R12: ffff88813a4fd1f8 [ 16.338551] R13: ffff88813a77f800 R14: ffff88813aa35180 R15: 0000000000000001 [ 16.338551] FS: 0000000000000000(0000) GS:ffff88813ba80000(0000) knlGS:0000000000000000 [ 16.338551] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 16.338551] CR2: 0000000000000056 CR3: 000000000240a002 CR4: 0000000000360ee0 [ 16.338551] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 16.338551] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 16.338551] Call Trace: [ 16.338551] nvme_scan_work+0x2c0/0x340 [nvme_core] [ 16.338551] ? __switch_to_asm+0x40/0x70 [ 16.338551] ? _raw_spin_unlock_irqrestore+0x18/0x30 [ 16.338551] ? try_to_wake_up+0x408/0x450 [ 16.338551] process_one_work+0x20b/0x3e0 [ 16.338551] worker_thread+0x1f9/0x3d0 [ 16.338551] ? cancel_delayed_work+0xa0/0xa0 [ 16.338551] kthread+0x117/0x120 [ 16.338551] ? kthread_stop+0xf0/0xf0 [ 16.338551] ret_from_fork+0x3a/0x50 [ 16.338551] Modules linked in: nvme nvme_core [ 16.338551] CR2: 0000000000000056 [ 16.338551] ---[ end trace b9bf761a93e62d84 ]--- [ 16.338551] RIP: 0010:nvme_validate_ns+0xc9/0x7e0 [nvme_core] [ 16.338551] Code: c0 49 89 c5 0f 84 00 07 00 00 48 8b 7b 58 e8 be 48 39 c1 48 3d 00 f0 ff ff 49 89 45 18 0f 87 a4 06 00 00 48 8b 93 70 0a 00 00 <80> 7a 56 00 74 0c 48 8b 40 68 83 48 3c 08 49 8b 45 18 48 89 c6 bf [ 16.338551] RSP: 0018:ffffc900024c7d10 EFLAGS: 00010283 [ 16.338551] RAX: ffff888135a30720 RBX: ffff88813a4fd1f8 RCX: 0000000000000007 [ 16.338551] RDX: 0000000000000000 RSI: ffffffff8256dd38 RDI: ffff888135a30720 [ 16.338551] RBP: 0000000000000001 R08: 0000000000000007 R09: ffff88813aa6a840 [ 16.338551] R10: 0000000000000001 R11: 000000000002d060 R12: ffff88813a4fd1f8 [ 16.338551] R13: ffff88813a77f800 R14: ffff88813aa35180 R15: 0000000000000001 [ 16.338551] FS: 0000000000000000(0000) GS:ffff88813ba80000(0000) knlGS:0000000000000000 [ 16.338551] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 16.338551] CR2: 0000000000000056 CR3: 000000000240a002 CR4: 0000000000360ee0 [ 16.338551] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 16.338551] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Fixes: 958f2a0f8121 ("nvme-tcp: set the STABLE_WRITES flag when data digests are enabled") Cc: Christoph Hellwig Cc: Keith Busch Reviewed-by: Sagi Grimberg Signed-off-by: Minwoo Im Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 64b08df460cfdfc2b010263043a057cdd33500ed Merge: c079512aad97 9f7546570bcb Author: Linus Torvalds Date: Thu Jul 11 14:44:13 2019 -0700 Merge tag 'hwmon-for-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon updates from Guenter Roeck: - New drivers for Infineon PXE1610 and IRPS5401 - Minor improvements, cleanup, and fixes in several drivers * tag 'hwmon-for-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (33 commits) hwmon: (ina3221) Add of_node_put() before return hwmon: (gpio-fan) fix sysfs notifications and udev events for gpio-fan alarms hwmon: (gpio-fan) move fan_alarm_init after devm_hwmon_device_register_with_groups hwmon: (lm90) Introduce function to update configuration register hwmon: (lm90) Cache configuration register value hwmon: (lm90) Fix max6658 sporadic wrong temperature reading hwmon: (nct7904) Changes comments in probe function. hwmon: (nct7904) Add error handling in probe function. hwmon: Convert remaining drivers to use SPDX identifier hwmon: (max6650) Fix unused variable warning hwmon: (pmbus/adm1275) Fix power sampling support hwmon: (lm90) simplify getting the adapter of a client hwmon: (asus_atk0110) no need to check return value of debugfs_create functions hwmon: (max6650) Fix minor formatting issues hwmon: (max6650) Improve error handling in max6650_update_device hwmon: (max6650) Read non-volatile registers only once hwmon: (max6650) Convert to use devm_hwmon_device_register_with_info hwmon: (max6650) Simplify alarm handling hwmon: (max6650) Cache alarm_en register hwmon: (max6650) Declare valid as boolean ... commit d44e3fa5d7e6e9573c69f6f9f4f7f3200b0c9eee Author: Eric Dumazet Date: Wed Jul 10 06:40:11 2019 -0700 ipv6: fix static key imbalance in fl_create() fl_create() should call static_branch_deferred_inc() only in case of success. Also we should not call fl_free() in error path, as this could cause a static key imbalance. jump label: negative count! WARNING: CPU: 0 PID: 15907 at kernel/jump_label.c:221 static_key_slow_try_dec kernel/jump_label.c:221 [inline] WARNING: CPU: 0 PID: 15907 at kernel/jump_label.c:221 static_key_slow_try_dec+0x1ab/0x1d0 kernel/jump_label.c:206 Kernel panic - not syncing: panic_on_warn set ... CPU: 0 PID: 15907 Comm: syz-executor.2 Not tainted 5.2.0-rc6+ #62 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x172/0x1f0 lib/dump_stack.c:113 panic+0x2cb/0x744 kernel/panic.c:219 __warn.cold+0x20/0x4d kernel/panic.c:576 report_bug+0x263/0x2b0 lib/bug.c:186 fixup_bug arch/x86/kernel/traps.c:179 [inline] fixup_bug arch/x86/kernel/traps.c:174 [inline] do_error_trap+0x11b/0x200 arch/x86/kernel/traps.c:272 do_invalid_op+0x37/0x50 arch/x86/kernel/traps.c:291 invalid_op+0x14/0x20 arch/x86/entry/entry_64.S:986 RIP: 0010:static_key_slow_try_dec kernel/jump_label.c:221 [inline] RIP: 0010:static_key_slow_try_dec+0x1ab/0x1d0 kernel/jump_label.c:206 Code: c0 e8 e9 3e e5 ff 83 fb 01 0f 85 32 ff ff ff e8 5b 3d e5 ff 45 31 ff eb a0 e8 51 3d e5 ff 48 c7 c7 40 99 92 87 e8 13 75 b7 ff <0f> 0b eb 8b 4c 89 e7 e8 a9 c0 1e 00 e9 de fe ff ff e8 bf 6d b7 ff RSP: 0018:ffff88805f9c7450 EFLAGS: 00010286 RAX: 0000000000000000 RBX: 00000000ffffffff RCX: 0000000000000000 RDX: 000000000000e3e1 RSI: ffffffff815adb06 RDI: ffffed100bf38e7c RBP: ffff88805f9c74e0 R08: ffff88806acf0700 R09: ffffed1015d060a9 R10: ffffed1015d060a8 R11: ffff8880ae830547 R12: ffffffff89832ce0 R13: ffff88805f9c74b8 R14: 1ffff1100bf38e8b R15: 00000000ffffff01 __static_key_slow_dec_deferred+0x65/0x110 kernel/jump_label.c:272 fl_free+0xa9/0xe0 net/ipv6/ip6_flowlabel.c:121 fl_create+0x6af/0x9f0 net/ipv6/ip6_flowlabel.c:457 ipv6_flowlabel_opt+0x80e/0x2730 net/ipv6/ip6_flowlabel.c:624 do_ipv6_setsockopt.isra.0+0x2119/0x4100 net/ipv6/ipv6_sockglue.c:825 ipv6_setsockopt+0xf6/0x170 net/ipv6/ipv6_sockglue.c:944 tcp_setsockopt net/ipv4/tcp.c:3131 [inline] tcp_setsockopt+0x8f/0xe0 net/ipv4/tcp.c:3125 sock_common_setsockopt+0x94/0xd0 net/core/sock.c:3130 __sys_setsockopt+0x253/0x4b0 net/socket.c:2080 __do_sys_setsockopt net/socket.c:2096 [inline] __se_sys_setsockopt net/socket.c:2093 [inline] __x64_sys_setsockopt+0xbe/0x150 net/socket.c:2093 do_syscall_64+0xfd/0x680 arch/x86/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4597c9 Code: fd b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 cb b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f2670556c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 0000000000000005 RCX: 00000000004597c9 RDX: 0000000000000020 RSI: 0000000000000029 RDI: 0000000000000003 RBP: 000000000075bfc8 R08: 000000000000fdf7 R09: 0000000000000000 R10: 0000000020000000 R11: 0000000000000246 R12: 00007f26705576d4 R13: 00000000004cec00 R14: 00000000004dd520 R15: 00000000ffffffff Kernel Offset: disabled Rebooting in 86400 seconds.. Fixes: 59c820b2317f ("ipv6: elide flowlabel check if no exclusive leases exist") Signed-off-by: Eric Dumazet Acked-by: Willem de Bruijn Reported-by: syzbot Signed-off-by: David S. Miller net/ipv6/ip6_flowlabel.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 8975a3abc3030bc8cdc3c94b988bcf819a14ed41 Author: Eric Dumazet Date: Wed Jul 10 06:40:10 2019 -0700 ipv6: fix potential crash in ip6_datagram_dst_update() Willem forgot to change one of the calls to fl6_sock_lookup(), which can now return an error or NULL. syzbot reported : kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] PREEMPT SMP KASAN CPU: 1 PID: 31763 Comm: syz-executor.0 Not tainted 5.2.0-rc6+ #63 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:ip6_datagram_dst_update+0x559/0xc30 net/ipv6/datagram.c:83 Code: 00 00 e8 ea 29 3f fb 4d 85 f6 0f 84 96 04 00 00 e8 dc 29 3f fb 49 8d 7e 20 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 16 06 00 00 4d 8b 6e 20 e8 b4 29 3f fb 4c 89 ee RSP: 0018:ffff88809ba97ae0 EFLAGS: 00010207 RAX: dffffc0000000000 RBX: ffff8880a81254b0 RCX: ffffc90008118000 RDX: 0000000000000003 RSI: ffffffff86319a84 RDI: 000000000000001e RBP: ffff88809ba97c10 R08: ffff888065e9e700 R09: ffffed1015d26c80 R10: ffffed1015d26c7f R11: ffff8880ae9363fb R12: ffff8880a8124f40 R13: 0000000000000001 R14: fffffffffffffffe R15: ffff88809ba97b40 FS: 00007f38e606a700(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000202c0140 CR3: 00000000a026a000 CR4: 00000000001406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __ip6_datagram_connect+0x5e9/0x1390 net/ipv6/datagram.c:246 ip6_datagram_connect+0x30/0x50 net/ipv6/datagram.c:269 ip6_datagram_connect_v6_only+0x69/0x90 net/ipv6/datagram.c:281 inet_dgram_connect+0x14a/0x2d0 net/ipv4/af_inet.c:571 __sys_connect+0x264/0x330 net/socket.c:1824 __do_sys_connect net/socket.c:1835 [inline] __se_sys_connect net/socket.c:1832 [inline] __x64_sys_connect+0x73/0xb0 net/socket.c:1832 do_syscall_64+0xfd/0x680 arch/x86/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4597c9 Code: fd b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 cb b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f38e6069c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002a RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00000000004597c9 RDX: 000000000000001c RSI: 0000000020000040 RDI: 0000000000000003 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f38e606a6d4 R13: 00000000004bfd07 R14: 00000000004d1838 R15: 00000000ffffffff Modules linked in: RIP: 0010:ip6_datagram_dst_update+0x559/0xc30 net/ipv6/datagram.c:83 Code: 00 00 e8 ea 29 3f fb 4d 85 f6 0f 84 96 04 00 00 e8 dc 29 3f fb 49 8d 7e 20 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 16 06 00 00 4d 8b 6e 20 e8 b4 29 3f fb 4c 89 ee Fixes: 59c820b2317f ("ipv6: elide flowlabel check if no exclusive leases exist") Signed-off-by: Eric Dumazet Acked-by: Willem de Bruijn Reported-by: syzbot Signed-off-by: David S. Miller net/ipv6/datagram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 052e0690f1f62f76493ba996d73847c7ca9fd132 Author: Eric Dumazet Date: Wed Jul 10 06:40:09 2019 -0700 ipv6: tcp: fix flowlabels reflection for RST packets In 323a53c41292 ("ipv6: tcp: enable flowlabel reflection in some RST packets") and 50a8accf1062 ("ipv6: tcp: send consistent flowlabel in TIME_WAIT state") we took care of IPv6 flowlabel reflections for two cases. This patch takes care of the remaining case, when the RST packet is sent on behalf of a 'full' socket. In Marek use case, this was a socket in TCP_CLOSE state. Signed-off-by: Eric Dumazet Reported-by: Marek Majkowski Tested-by: Marek Majkowski Signed-off-by: David S. Miller net/ipv6/tcp_ipv6.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 416e8126a2672f6e91e9e81c6f5c07cf46808b13 Author: yangxingwu Date: Wed Jul 10 21:14:10 2019 +0800 ipv6: Use ipv6_authlen for len The length of AH header is computed manually as (hp->hdrlen+2)<<2. However, in include/linux/ipv6.h, a macro named ipv6_authlen is already defined for exactly the same job. This commit replaces the manual computation code with the macro. Signed-off-by: yangxingwu Signed-off-by: David S. Miller net/ipv6/ah6.c | 4 ++-- net/ipv6/exthdrs_core.c | 2 +- net/ipv6/ip6_tunnel.c | 2 +- net/ipv6/netfilter/ip6t_ah.c | 2 +- net/ipv6/netfilter/ip6t_ipv6header.c | 2 +- net/ipv6/netfilter/nf_conntrack_reasm.c | 2 +- net/ipv6/netfilter/nf_log_ipv6.c | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) commit c079512aad9718c12c6bb1b661880b15a73dfd69 Merge: 6b44fccdb8cd 0ff9848067b7 Author: Linus Torvalds Date: Thu Jul 11 14:42:44 2019 -0700 Merge tag 'loadpin-v5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull security/loadpin updates from Kees Cook: - Allow exclusion of specific file types (Ke Wu) * tag 'loadpin-v5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: security/loadpin: Allow to exclude specific file types commit 6b44fccdb8cdcc7c1df522529307566aa89a4ab1 Merge: 753c8d9b7d81 4c6d80e1144b Author: Linus Torvalds Date: Thu Jul 11 14:40:32 2019 -0700 Merge tag 'pstore-v5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull pstore updates from Kees Cook: - Improve backward compatibility with older Chromebooks (Douglas Anderson) - Refactor debugfs initialization (Greg KH) - Fix double-free in pstore_mkfile() failure path (Norbert Manthey) * tag 'pstore-v5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: pstore: Fix double-free in pstore_mkfile() failure path pstore: no need to check return value of debugfs_create functions pstore/ram: Improve backward compatibility with older Chromebooks commit 311633b604063a8a5d3fbc74d0565b42df721f68 Author: Cong Wang Date: Tue Jul 9 23:24:54 2019 -0700 hsr: switch ->dellink() to ->ndo_uninit() Switching from ->priv_destructor to dellink() has an unexpected consequence: existing RCU readers, that is, hsr_port_get_hsr() callers, may still be able to read the port list. Instead of checking the return value of each hsr_port_get_hsr(), we can just move it to ->ndo_uninit() which is called after device unregister and synchronize_net(), and we still have RTNL lock there. Fixes: b9a1e627405d ("hsr: implement dellink to clean up resources") Fixes: edf070a0fb45 ("hsr: fix a NULL pointer deref in hsr_dev_xmit()") Reported-by: syzbot+097ef84cdc95843fbaa8@syzkaller.appspotmail.com Cc: Arvid Brodin Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/hsr/hsr_device.c | 18 ++++++++---------- net/hsr/hsr_device.h | 1 - net/hsr/hsr_netlink.c | 7 ------- 3 files changed, 8 insertions(+), 18 deletions(-) commit f27b99a1cea7ce3a2a24b907c5a998f0ad5a0268 Merge: b784d6bff971 fee77829083a Author: Dave Airlie Date: Fri Jul 12 07:29:57 2019 +1000 Merge tag 'imx-drm-next-2019-07-05' of git://git.pengutronix.de/git/pza/linux into drm-next drm/imx: IPUv3 image converter improvements, enable scanout FIFO watermark - Fix a saturation bit position in the colorspace converter configuration memory. - Fully describe colorspace conversions in the API to the imx-media driver. - Add support for limited range and Rec.709 YUV encoding. - Enable colorimetry configuration via the media-controller API. - Enable the double write reduction feature for memory bandwidth savings when the image converter writes YUV 4:2:0 output. - Enable a scanout FIFO watermark feature that can increase priority of scanout read transfers at the memory controller whenever the FIFO runs low. Signed-off-by: Dave Airlie From: Philipp Zabel Link: https://patchwork.freedesktop.org/patch/msgid/1562326831.4291.8.camel@pengutronix.de commit aa4c0c9091b0bb4cb261bbe0718d17c2834c4690 Author: Joe Perches Date: Tue Jul 9 22:04:21 2019 -0700 net: stmmac: Fix misuses of GENMASK macro Arguments are supposed to be ordered high then low. Fixes: 293e4365a1ad ("stmmac: change descriptor layout") Fixes: 9f93ac8d4085 ("net-next: stmmac: Add dwmac-sun8i") Signed-off-by: Joe Perches Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/descs.h | 2 +- drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 937a944090cca2f19458fd037a8aff61c546f0cd Author: Joe Perches Date: Tue Jul 9 22:04:20 2019 -0700 net: ethernet: mediatek: Fix misuses of GENMASK macro Arguments are supposed to be ordered high then low. Signed-off-by: Joe Perches Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.h | 2 +- drivers/net/ethernet/mediatek/mtk_sgmii.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 63f9ba1bf8b6550365dc17a65d544cd75e68bf48 Author: Petar Penkov Date: Fri Jul 5 11:46:43 2019 -0700 net: fib_rules: do not flow dissect local packets Rules matching on loopback iif do not need early flow dissection as the packet originates from the host. Stop counting such rules in fib_rule_requires_fldissect Signed-off-by: Petar Penkov Signed-off-by: David S. Miller include/net/fib_rules.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b784d6bff97154af829e46271dbb16967106a493 Merge: 4cf643a39221 7f963d9f69bf Author: Dave Airlie Date: Fri Jul 12 06:57:16 2019 +1000 Merge tag 'drm-next-5.3-2019-07-09' of git://people.freedesktop.org/~agd5f/linux into drm-next drm-next-5.3-2019-07-09: amdgpu: - GPU reset for navi10 - Powerplay fixes for navi10 - GFX fixes for navi10 - Prepare for hmm_range_register API change - XGMI fixes - clang warning fixes - Fixes for various kconfig scenarios - Misc fixes and cleanups amdkfd: - Add workaround for soft hangs with oversubscribed runlists - Remove duplicated pcie atomics request Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20190710035017.3407-1-alexander.deucher@amd.com commit 753c8d9b7d81206bb5d011b28abe829d364b028e Merge: d7fe42a64a19 cbf5b73d162b Author: Linus Torvalds Date: Thu Jul 11 13:54:00 2019 -0700 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Thomas Gleixner: "A collection of assorted fixes: - Fix for the pinned cr0/4 fallout which escaped all testing efforts because the kvm-intel module was never loaded when the kernel was compiled with CONFIG_PARAVIRT=n. The cr0/4 accessors are moved out of line and static key is now solely used in the core code and therefore can stay in the RO after init section. So the kvm-intel and other modules do not longer reference the (read only) static key which the module loader tried to update. - Prevent an infinite loop in arch_stack_walk_user() by breaking out of the loop once the return address is detected to be 0. - Prevent the int3_emulate_call() selftest from corrupting the stack when KASAN is enabled. KASASN clobbers more registers than covered by the emulated call implementation. Convert the int3_magic() selftest to a ASM function so the compiler cannot KASANify it. - Unbreak the build with old GCC versions and with the Gold linker by reverting the 'Move of _etext to the actual end of .text'. In both cases the build fails with 'Invalid absolute R_X86_64_32S relocation: _etext' - Initialize the context lock for init_mm, which was never an issue until the alternatives code started to use a temporary mm for patching. - Fix a build warning vs. the LOWMEM_PAGES constant where clang complains rightfully about a signed integer overflow in the shift operation by converting the operand to an ULL. - Adjust the misnamed ENDPROC() of common_spurious in the 32bit entry code" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/stacktrace: Prevent infinite loop in arch_stack_walk_user() x86/asm: Move native_write_cr0/4() out of line x86/pgtable/32: Fix LOWMEM_PAGES constant x86/alternatives: Fix int3_emulate_call() selftest stack corruption x86/entry/32: Fix ENDPROC of common_spurious Revert "x86/build: Move _etext to actual end of .text" x86/ldt: Initialize the context lock for init_mm commit d7fe42a64a19a4140fb94bcf996035319cd3e6b9 Merge: 02150fab6ae9 0df1c9868c3a Author: Linus Torvalds Date: Thu Jul 11 13:52:23 2019 -0700 Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fixes from Thomas Gleixner: "Two small fixes from the timer departement: - Prevent the compiler from converting the nanoseconds adjustment loop in the VDSO update function to a division (__udivdi3) by using the __iter_div_u64_rem() inline function which exists to prevent exactly that problem. - Fix the wrong argument order of the GENMASK macro in the NPCM timer driver" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: timekeeping/vsyscall: Use __iter_div_u64_rem() clocksource/drivers/npcm: Fix misuse of GENMASK macro commit 02150fab6ae9924ef03e21a15f2d5f7415a9cdf7 Merge: 3a83f575a33b 7e8e6816c649 Author: Linus Torvalds Date: Thu Jul 11 13:50:44 2019 -0700 Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull stacktrace fix from Thomas Gleixner: "Fix yet another instance of kernel thread check which ignores that kernel threads can call use_mm()" * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: stacktrace: Use PF_KTHREAD to check for kernel threads commit 3a83f575a33b960b7b1d582dc17f154d887c9b8d Merge: a131c2bf1656 20faba848752 Author: Linus Torvalds Date: Thu Jul 11 13:48:36 2019 -0700 Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fixes from Thomas Gleixner: "Two small fixes for interrupt chip drivers: - Prevent UAF in the new RZA1 chip driver - Fix the wrong argument order of the GENMASK macro in the GIC code" * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/gic-v3-its: Fix misuse of GENMASK macro irqchip/renesas-rza1: Prevent use-after-free in rza1_irqc_probe() commit b80d6a42bdc97bdb6139107d6034222e9843c6e2 Author: Arnd Bergmann Date: Wed Jul 10 15:05:43 2019 +0200 ACPI: blacklist: fix clang warning for unused DMI table When CONFIG_DMI is disabled, we only have a tentative declaration, which causes a warning from clang: drivers/acpi/blacklist.c:20:35: error: tentative array definition assumed to have one element [-Werror] static const struct dmi_system_id acpi_rev_dmi_table[] __initconst; As the variable is not actually used here, hide it entirely in an #ifdef to shut up the warning. Signed-off-by: Arnd Bergmann Reviewed-by: Nathan Chancellor Signed-off-by: Rafael J. Wysocki drivers/acpi/blacklist.c | 4 ++++ 1 file changed, 4 insertions(+) commit d1fb5b2f623b1af5a0d2a83d205df1b61f430dc6 Author: Erik Schmauss Date: Thu Jul 11 09:58:21 2019 -0700 ACPICA: Update table load object initialization ACPICA commit c7ef9f3526765bed8930825dda1eed1a274b9668 Use the common internal "initialize objects" interface Affects: Load() load_table() acpi_load_table Link: https://github.com/acpica/acpica/commit/c7ef9f35 Tested-by: Rong Chen Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/exconfig.c | 18 ++++++++---------- drivers/acpi/acpica/tbxfload.c | 10 +++------- 2 files changed, 11 insertions(+), 17 deletions(-) commit 5e663f0410fa2f355042209154029842ba1abd43 Author: Ihor Matushchak Date: Tue Jul 2 17:48:18 2019 +0300 virtio-mmio: add error check for platform_get_irq in vm_find_vqs() irq has a wrong type so, in case of no IRQ resource defined, wrong parameter will be passed to request_irq() Signed-off-by: Ihor Matushchak Signed-off-by: Michael S. Tsirkin Reviewed-by: Ivan T. Ivanov drivers/virtio/virtio_mmio.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 211f70ff1daa3b3bb877f0f6fa85a42ef50f8341 Author: Gustavo A. R. Silva Date: Wed Jun 19 14:28:33 2019 -0500 scsi: virtio_scsi: Use struct_size() helper One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct virtio_scsi { ... struct virtio_scsi_vq req_vqs[]; }; Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. So, replace the following form: sizeof(*vscsi) + sizeof(vscsi->req_vqs[0]) * num_queues with: struct_size(vscsi, req_vqs, num_queues) This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi drivers/scsi/virtio_scsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ce8f316673f61416738e6df7329ca508a607762 Author: Nicholas Kazlauskas Date: Thu Jul 11 14:31:46 2019 -0500 drm/amd/display: Add drm_audio_component support to amdgpu_dm [Why] The drm_audio_component can be used to give pin ELD notifications directly to the sound driver. This fixes audio endpoints disappearing due to missing unsolicited notifications. [How] Send the notification via the audio component whenever we enable or disable audio state on a stream. This matches what i915 does with their drm_audio_component and what Takashi Iwai's proposed hack for radeon/amdpgu did. This is a bit delayed in when the notification actually occurs, however. We wait until after all the programming is complete rather than sending the notification mid sequence. Particular care is needed for the get ELD callback since it can happen outside the locking and fencing DRM does for atomic commits. Cc: Leo Li Cc: Harry Wentland Signed-off-by: Nicholas Kazlauskas Reviewed-by: Alex Deucher Reviewed-by: Takashi Iwai Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/Kconfig | 1 + drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 222 ++++++++++++++++++++++ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 25 +++ 3 files changed, 248 insertions(+) commit 5fdb7c4c7f2691efd760b0b0dc00da4a3699f1a6 Author: Nicholas Kazlauskas Date: Fri Jun 28 13:39:41 2019 -0400 drm/amd/display: Expose audio inst from DC to DM [Why] In order to give pin notifications to the sound driver from DM we need to know whether audio is enabled on a stream and what pin it's using from DC. [How] Expose the instance via stream status if it's a mapped resource for the stream. It will be -1 if there's no audio mapped. Cc: Leo Li Cc: Harry Wentland Signed-off-by: Nicholas Kazlauskas Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 3 +++ drivers/gpu/drm/amd/display/dc/dc_stream.h | 1 + 2 files changed, 4 insertions(+) commit 70df8273ca0cebd2bba443a4444b4944a5929151 Author: Eric Huang Date: Tue Jul 9 15:33:53 2019 -0400 drm/amdkfd: fix cp hang in eviction The cp hang occurs in OCL conformance test only on supermicro platform which has 40 cores and the test generates 40 threads. The root cause is race condition in non-protected flags. The fix is to add flags of is_evicted and is_active(init_mqd()) into protected area. Signed-off-by: Eric Huang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 63e2fef631383b9a44a2b727b9507fe058cba9c1 Author: Alex Deucher Date: Mon Jul 8 13:47:12 2019 -0500 drm/amdgpu: enable IP discovery by default on navi Use the IP discovery table rather than hardcoding the settings in the driver. Reviewed-by: Xiaojie Yuan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a349b39253d597a83f3d5eb85e129da429652583 Author: tiancyin Date: Thu Jul 11 14:09:50 2019 +0800 drm/amdgpu/discovery: fix DCE_HWIP mapping error in hw_id_map array ID of DCE_HWIP from vbios is DMU_HWID, mismatch cause null pointer crash in navi10 modprobe. Reviewed-by: Feifei Xu Reviewed-by: Xiaojie Yuan Signed-off-by: tiancyin Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a54166d79a6b910182703c18379a26e414539501 Author: Kenneth Feng Date: Thu Jul 11 15:37:50 2019 +0800 drm/amd/powerplay: bug fix for sysfs when we set profile_peak to sysfs:power_dpm_force_performance_level, we gets the wrong socclk level and mclk level.this patch fix this issue. Signed-off-by: Kenneth Feng Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 617a64dc85f91c46ccf65aefbf7a4d194280a453 Author: Evan Quan Date: Wed Jul 3 09:21:37 2019 +0800 drm/amd/powerplay: increase the SMU msg response waiting time This is expected to fix some mode1 reset failures. And this affects SMU part only as the timeout setting for other parts is controlled by a different macro. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/amd_shared.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7e4dec58032deb75181ec56f31aa25184333f7d0 Author: Felix Kuehling Date: Tue Jul 9 19:31:21 2019 -0400 drm/amdgpu: Fix potential integer overflows With mm_nodes larger than 4GB, byte_count in amdgpu_fill_buffer would overflow. Signed-off-by: Felix Kuehling Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 1e4d09d2212d9e230b967f57bc8df463527dbd75 Author: Alex Williamson Date: Thu Jul 11 13:26:52 2019 -0600 mdev: Send uevents around parent device registration This allows udev to trigger rules when a parent device is registered or unregistered from mdev. Reviewed-by: Cornelia Huck Reviewed-by: Kirti Wankhede Signed-off-by: Alex Williamson drivers/vfio/mdev/mdev_core.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 0f327f2aaad6a87356cbccfa390d4d3b64d0d3b6 Author: Atish Patra Date: Thu Jun 6 16:08:00 2019 -0700 RISC-V: Add an Image header that boot loader can parse. Currently, the last stage boot loaders such as U-Boot can accept only uImage which is an unnecessary additional step in automating boot process. Add an image header that boot loader understands and boot Linux from flat Image directly. This header is based on ARM64 boot image header and provides an opportunity to combine both ARM64 & RISC-V image headers in future. Also make sure that PE/COFF header can co-exist in the same image so that EFI stub can be supported for RISC-V in future. EFI specification needs PE/COFF image header in the beginning of the kernel image in order to load it as an EFI application. In order to support EFI stub, code0 should be replaced with "MZ" magic string and res4(at offset 0x3c) should point to the rest of the PE/COFF header (which will be added during EFI support). Tested on both QEMU and HiFive Unleashed using OpenSBI + U-Boot + Linux. Signed-off-by: Atish Patra Reviewed-by: Karsten Merker Tested-by: Karsten Merker (QEMU+OpenSBI+U-Boot) Tested-by: Kevin Hilman (OpenSBI + U-Boot + Linux) [paul.walmsley@sifive.com: fixed whitespace in boot-image-header.txt; converted structure comment to kernel-doc format and added some detail] Signed-off-by: Paul Walmsley Documentation/riscv/boot-image-header.txt | 50 ++++++++++++++++++++++++ arch/riscv/include/asm/image.h | 65 +++++++++++++++++++++++++++++++ arch/riscv/kernel/head.S | 32 +++++++++++++++ 3 files changed, 147 insertions(+) commit ef1ce7d7b67b46661091c7ccc0396186b7a247ef Author: Aya Levin Date: Sun Jul 7 16:57:06 2019 +0300 net/mlx5e: IPoIB, Add error path in mlx5_rdma_setup_rn Check return value from mlx5e_attach_netdev, add error path on failure. Fixes: 48935bbb7ae8 ("net/mlx5e: IPoIB, Add netdevice profile skeleton") Signed-off-by: Aya Levin Reviewed-by: Feras Daoud Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 99d31cbd8953c6929da978bf049ab0f0b4e503d9 Author: Aya Levin Date: Sun Jun 30 11:11:26 2019 +0300 net/mlx5e: Fix error flow in tx reporter diagnose Fix tx reporter's diagnose callback. Propagate error when failing to gather diagnostics information or failing to print diagnostic data per queue. Fixes: de8650a82071 ("net/mlx5e: Add tx reporter support") Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Acked-by: Jiri Pirko Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 39825350ae2a52f8513741b36e42118bd80dd689 Author: Aya Levin Date: Mon Jun 17 12:01:45 2019 +0300 net/mlx5e: Fix return value from timeout recover function Fix timeout recover function to return a meaningful return value. When an interrupt was not sent by the FW, return IO error instead of 'true'. Fixes: c7981bea48fb ("net/mlx5e: Fix return status of TX reporter timeout recover") Signed-off-by: Aya Levin Acked-by: Jiri Pirko Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit db849faa9bef993a1379dc510623f750a72fa7ce Author: Saeed Mahameed Date: Fri May 3 13:14:59 2019 -0700 net/mlx5e: Rx, Fix checksum calculation for new hardware CQE checksum full mode in new HW, provides a full checksum of rx frame. Covering bytes starting from eth protocol up to last byte in the received frame (frame_size - ETH_HLEN), as expected by the stack. Fixing up skb->csum by the driver is not required in such case. This fix is to avoid wrong checksum calculation in drivers which already support the new hardware with the new checksum mode. Fixes: 85327a9c4150 ("net/mlx5: Update the list of the PCI supported devices") Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 + drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 3 +++ drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 7 ++++++- include/linux/mlx5/mlx5_ifc.h | 3 ++- 4 files changed, 12 insertions(+), 2 deletions(-) commit 914adbb1bcf89478ac138318d28b302704564d59 Author: Eli Britstein Date: Sun Jun 2 06:19:03 2019 +0000 net/mlx5e: Fix port tunnel GRE entropy control GRE entropy calculation is a single bit per card, and not per port. Force disable GRE entropy calculation upon the first GRE encap rule, and release the force at the last GRE encap rule removal. This is done per port. Fixes: 97417f6182f8 ("net/mlx5e: Fix GRE key by controlling port tunnel entropy calculation") Signed-off-by: Eli Britstein Signed-off-by: Saeed Mahameed .../net/ethernet/mellanox/mlx5/core/lib/port_tun.c | 23 ++++------------------ 1 file changed, 4 insertions(+), 19 deletions(-) commit 9a64144d683a4395f57562d90247c61a0bf5105f Author: Maor Gottlieb Date: Mon Jun 17 13:22:28 2019 +0300 net/mlx5: E-Switch, Fix default encap mode Encap mode is related to switchdev mode only. Move the init of the encap mode to eswitch_offloads. Before this change, we reported that eswitch supports encap, even tough the device was in non SRIOV mode. Fixes: 7768d1971de67 ('net/mlx5: E-Switch, Add control for encapsulation') Signed-off-by: Maor Gottlieb Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 5 ----- drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 7 +++++++ 2 files changed, 7 insertions(+), 5 deletions(-) commit 9a159190414d461fdac7ae5bb749c2d532b35419 Author: Vasily Gorbik Date: Mon Jul 8 14:24:38 2019 +0200 s390/unwind: avoid int overflow in outside_of_stack When current task is interrupted in-between stack frame allocation and backchain write instructions new stack frame backchain pointer is left uninitialized. That invalid backchain value is passed into outside_of_stack for sanity check. Make sure int overflow does not happen by subtracting stack_frame size from the stack "end" rather than adding it to "random" backchain value. Fixes: 41b0474c1b1c ("s390/unwind: introduce stack unwind API") Reviewed-by: Christian Borntraeger Signed-off-by: Vasily Gorbik arch/s390/kernel/unwind_bc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 73df167c819e49d65576e3015f2b1385034baafb Author: Denis Efremov Date: Tue Jul 9 15:25:07 2019 +0300 s390/zcrypt: remove the exporting of ap_query_configuration The function ap_query_configuration is declared static and marked EXPORT_SYMBOL, which is at best an odd combination. Because the function is not used outside of the drivers/s390/crypto/ap_bus.c file it is defined in, this commit removes the EXPORT_SYMBOL() marking. Link: http://lkml.kernel.org/r/20190709122507.11158-1-efremov@linux.com Fixes: f1b0a4343c41 ("s390/zcrypt: Integrate ap_asm.h into include/asm/ap.h.") Fixes: 050349b5b71d ("s390/zcrypt: externalize AP config info query") Signed-off-by: Denis Efremov Reviewed-by: Harald Freudenberger Signed-off-by: Vasily Gorbik drivers/s390/crypto/ap_bus.c | 1 - 1 file changed, 1 deletion(-) commit 8e4708b3f8d949a74499426614b9b8ea5bcad15a Author: Sebastian Ott Date: Wed Jul 10 14:06:47 2019 +0200 s390/pci: add mio_enabled attribute Provide an attribute to query the usage of mio instructions. Signed-off-by: Sebastian Ott Signed-off-by: Vasily Gorbik arch/s390/pci/pci_sysfs.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 9964f396f1d0eed72c50f7ae367119afd355ab9c Author: Sebastian Ott Date: Wed Jul 10 13:08:06 2019 +0200 s390: fix setting of mio addressing control Move enablement of mio addressing control from detect_machine_facilities to pci_base_init. detect_machine_facilities runs so early that the static branches have not been toggled yet, thus mio addressing control was always off. In pci_base_init we have to use the SMP aware ctl_set_bit though. Fixes: 833b441ec0f6 ("s390: enable processes for mio instructions") Signed-off-by: Sebastian Ott Signed-off-by: Vasily Gorbik arch/s390/include/asm/pci_insn.h | 10 ---------- arch/s390/kernel/early.c | 2 -- arch/s390/pci/pci.c | 4 +++- 3 files changed, 3 insertions(+), 13 deletions(-) commit 1b2be2071aca9aab22e3f902bcb0fca46a1d3b00 Author: Philipp Rudo Date: Fri Jun 28 17:38:05 2019 +0200 s390/ipl: Fix detection of has_secure attribute Use the correct bit for detection of the machine capability associated with the has_secure attribute. It is expected that the underlying platform (including hypervisors) unsets the bit when they don't provide secure ipl for their guests. Fixes: c9896acc7851 ("s390/ipl: Provide has_secure sysfs attribute") Cc: stable@vger.kernel.org # 5.2 Signed-off-by: Philipp Rudo Reviewed-by: Christian Borntraeger Reviewed-by: Peter Oberparleiter Signed-off-by: Vasily Gorbik arch/s390/include/asm/sclp.h | 1 - arch/s390/kernel/ipl.c | 7 +------ drivers/s390/char/sclp_early.c | 1 - 3 files changed, 1 insertion(+), 8 deletions(-) commit 5c4c2126fb69812e6e62a7d8bfaac308a3ddeec7 Author: Christian Borntraeger Date: Fri Jul 5 21:02:48 2019 +0200 s390: vfio-ap: fix irq registration vfio_ap_free_aqic_resources is called in two places: - during registration to have a "known state" - during interrupt disable We must not clear q->matrix_mdev in the registration phase as this will mess up the reference counting and can lead to some warning and other bugs. Fixes: ec89b55e3bce ("s390: ap: implement PAPQ AQIC interception in kernel") Reviewed-by: Halil Pasic Signed-off-by: Christian Borntraeger Signed-off-by: Vasily Gorbik drivers/s390/crypto/vfio_ap_ops.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 820bace734722715c643dcb5f74b502cb912d4eb Author: Thomas Richter Date: Fri Apr 12 11:32:28 2019 +0200 s390/cpumf: Add extended counter set definitions for model 8561 and 8562 Add the extended counter set definitions for s390 machine types 8561 and 8262. They are identical with machine types 3906 and 3907. Signed-off-by: Thomas Richter Signed-off-by: Vasily Gorbik arch/s390/kernel/perf_cpum_cf_events.c | 2 ++ 1 file changed, 2 insertions(+) commit 9e12e54c7a8f616190beffb0f7ce778a86aec175 Author: Jan Höppner Date: Tue Jul 3 10:56:51 2018 +0200 s390/dasd: Handle out-of-space constraint The storage server issues three different types of out-of-space messages whenever the Extent Pool or Extent Repository space runs short. When a configured warning watermark is reached, the physical space is completeley exhausted, or the capacity constraints have been relieved, a message is received. A log entry for the sysadmin to react to is generated in any case. In case the physical space is completely exhausted, sense data that reads "no space left on device" is received. In this case, currently running I/O will be blocked until space has either been released or added to the extent pool, and a relieve message was received via an attention interrupt. Signed-off-by: Jan Höppner Reviewed-by: Stefan Haberland Signed-off-by: Vasily Gorbik drivers/s390/block/dasd.c | 58 ++++++++++++++- drivers/s390/block/dasd_eckd.c | 159 ++++++++++++++++++++++++++++++++++++++++- drivers/s390/block/dasd_eckd.h | 23 ++++++ drivers/s390/block/dasd_eer.c | 1 + drivers/s390/block/dasd_int.h | 5 ++ 5 files changed, 243 insertions(+), 3 deletions(-) commit 7e64db1597fe114b83fe17d0ba96c6aa5fca419a Author: Jan Höppner Date: Fri Apr 27 16:57:44 2018 +0200 s390/dasd: Add discard support for ESE volumes ESE (Extent Space Efficient) volumes are thin-provisioned and therefore space is only occupied with real data. In order to make previously used space available for re-allocation again, discard support is enabled for ESE volumes allowing the DASD driver to release said space. Signed-off-by: Jan Höppner Reviewed-by: Stefan Haberland Signed-off-by: Vasily Gorbik drivers/s390/block/dasd_eckd.c | 57 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 54 insertions(+), 3 deletions(-) commit b54441534e9648f8df24b75a63bb00ed3aa123de Author: Jan Höppner Date: Tue May 29 14:11:25 2018 +0200 s390/dasd: Use ALIGN_DOWN macro There is now an ALIGN_DOWN macro available. Let's rather use kernel provided macros that do the things we want. Signed-off-by: Jan Höppner Reviewed-by: Stefan Haberland Signed-off-by: Vasily Gorbik drivers/s390/block/dasd_fba.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a0610a8ad80743ff916ebef0490418a298e5bd23 Author: Jan Höppner Date: Fri Apr 27 16:55:27 2018 +0200 s390/dasd: Make dasd_setup_queue() a discipline function ECKD, FBA, and the DIAG discipline use slightly different block layer settings. In preparation of even more diverse queue settings, make dasd_setup_queue() a discipline function. Signed-off-by: Jan Höppner Reviewed-by: Stefan Haberland Signed-off-by: Vasily Gorbik drivers/s390/block/dasd.c | 53 ++---------------------------------------- drivers/s390/block/dasd_diag.c | 22 +++++++++++++++++- drivers/s390/block/dasd_eckd.c | 47 ++++++++++++++++++++++++++----------- drivers/s390/block/dasd_eckd.h | 6 +++++ drivers/s390/block/dasd_fba.c | 45 ++++++++++++++++++++++++----------- drivers/s390/block/dasd_fba.h | 5 ++++ drivers/s390/block/dasd_int.h | 5 +++- 7 files changed, 103 insertions(+), 80 deletions(-) commit 91dc4a197569230683ca8bad551e655a4bf14c30 Author: Jan Höppner Date: Mon Jul 23 11:13:30 2018 +0200 s390/dasd: Add new ioctl to release space Userspace tools might have the need to release space for Extent Space Efficient (ESE) volumes when working with such a device. Provide the necessarry interface for such a task by implementing a new ioctl BIODASDRAS. The ioctl uses the format_data_t data structure for data input: typedef struct format_data_t { unsigned int start_unit; /* from track */ unsigned int stop_unit; /* to track */ unsigned int blksize; /* sectorsize */ unsigned int intensity; } format_data_t; If the intensity is set to 0x40, start_unit and stop_unit are ignored and space for the entire volume is released. Otherwise, if intensity is set to 0, the respective range is released (if possible). Signed-off-by: Jan Höppner Reviewed-by: Stefan Haberland Signed-off-by: Vasily Gorbik arch/s390/include/uapi/asm/dasd.h | 3 + drivers/s390/block/dasd_eckd.c | 264 ++++++++++++++++++++++++++++++++++++++ drivers/s390/block/dasd_eckd.h | 40 ++++++ drivers/s390/block/dasd_int.h | 1 + drivers/s390/block/dasd_ioctl.c | 56 ++++++++ 5 files changed, 364 insertions(+) commit bcf36768ea688e926b04639c88c77d8caea3b736 Author: Jan Höppner Date: Thu Jun 27 14:33:17 2019 +0200 s390/dasd: Add dasd_sleep_on_queue_interruptible() There is dasd_sleep_on() and dasd_sleep_on_interruptible() to start CCW requests uninterruptible and interruptible. However, there is only dasd_sleep_on_queue() to start requests from CCW queues uninterruptible. Add dasd_sleep_on_queue_interruptible() to provide a way to start requests from CCW queues interruptible. _dasd_sleep_on_queue() already provides this functionality. Signed-off-by: Jan Höppner Reviewed-by: Stefan Haberland Signed-off-by: Vasily Gorbik drivers/s390/block/dasd.c | 9 +++++++++ drivers/s390/block/dasd_int.h | 1 + 2 files changed, 10 insertions(+) commit d7a4434d6013c750f6c180f9678a870abc21993b Author: Jan Höppner Date: Fri Jun 7 16:58:38 2019 +0200 s390/dasd: Add missing intensity definition The definition for the bit that removes the write permission for record zero when formatting was missing. Add it to complete the list. Signed-off-by: Jan Höppner Reviewed-by: Stefan Haberland Signed-off-by: Vasily Gorbik arch/s390/include/uapi/asm/dasd.h | 1 + 1 file changed, 1 insertion(+) commit 2df4774cb4d1a9280c01bde0f729e56deb36141d Author: Jan Höppner Date: Fri Jun 7 16:54:22 2019 +0200 s390/dasd: Fix whitespace Signed-off-by: Jan Höppner Reviewed-by: Stefan Haberland Signed-off-by: Vasily Gorbik arch/s390/include/uapi/asm/dasd.h | 150 +++++++++++++++++++------------------- 1 file changed, 75 insertions(+), 75 deletions(-) commit 5e2b17e712cf10cc3cc98fde28a88e8f1a1267e9 Author: Jan Höppner Date: Fri Apr 27 16:51:22 2018 +0200 s390/dasd: Add dynamic formatting support for ESE volumes A dynamic formatting is issued whenever a write request returns with either a No Record Found error (Command Mode), Incorrect Length error (Transport Mode), or File Protected error (Transport Mode). All three cases mean that the tracks in question haven't been initialized in a desired format yet. The part of the volume that was tried to be written on is then formatted and the original request is re-queued. As the formatting will happen during normal I/O operations, it is quite likely that there won't be any memory available to build the respective request. Another two pages of memory are allocated per volume specifically for the dynamic formatting. The dasd_eckd_build_format() function is extended to make sure that the original startdev is reused. Also, all formatting and format check functions use the new memory pool exclusively now to reduce complexity. Read operations will always return zero data when unformatted areas are read. Signed-off-by: Jan Höppner Reviewed-by: Stefan Haberland Signed-off-by: Vasily Gorbik drivers/s390/block/dasd.c | 113 +++++++++++++++++++++++++++++++++- drivers/s390/block/dasd_eckd.c | 134 +++++++++++++++++++++++++++++++++++++---- drivers/s390/block/dasd_int.h | 6 ++ 3 files changed, 239 insertions(+), 14 deletions(-) commit c729696bcf8b23450043dd9c9972c15e53419ae4 Author: Jan Höppner Date: Tue May 29 16:58:03 2018 +0200 s390/dasd: Recognise data for ESE volumes In order to work with Extent Space Efficient (ESE) volumes, certain viable information about those volumes and the corresponding extent pool (such as extent size, configured space, allocated space, etc.) can be provided. Use the CCW commands Volume Storage Query and Logical Configuration Query to receive detailed information about ESE volumes and the extent pool respectively. These information are made accessible via internal functions for subsequent users, and via sysfs attributes for userpsace usage. The new sysfs attributes reside in separate directories called capacity and extent_pool. attributes: ese: 0/1 depending on whether the volume is an ESE volume Capacity related attributes: space_allocated: Space currently allocated by the volume (in cyl) space_configured: Remaining space in the extent pool (in cyl) logical_capacity: The entire addressable space for this volume (in cyl) Extent Pool related attributes: pool_id: ID of the extent pool the volume in question resides in pool_oos: Extent pool is out-of-space extent_size: Size of a single extent in this pool cap_at_warnlevel Extent pool capacity at warn level warn_threshold: Threshold at which percentage of remaining extent pool space a warning message is issued Signed-off-by: Jan Höppner Reviewed-by: Stefan Haberland Signed-off-by: Vasily Gorbik drivers/s390/block/dasd_devmap.c | 70 +++++++++- drivers/s390/block/dasd_eckd.c | 276 +++++++++++++++++++++++++++++++++++++++ drivers/s390/block/dasd_eckd.h | 73 +++++++++++ drivers/s390/block/dasd_int.h | 15 +++ 4 files changed, 430 insertions(+), 4 deletions(-) commit 461db0ea03755e0eeb7186f8613ba2291dff7833 Author: Jan Höppner Date: Tue May 29 17:03:10 2018 +0200 s390/dasd: Put sub-order definitions in a separate section There are orders and sub-orders. Put them in different sections for a better overview. Signed-off-by: Jan Höppner Reviewed-by: Stefan Haberland Signed-off-by: Vasily Gorbik drivers/s390/block/dasd_eckd.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit ce6915f5343f5f2a2a937b683d8ffbf12dab3ad4 Author: Jan Höppner Date: Thu Feb 21 16:22:46 2019 +0100 s390/dasd: Make layout analysis ESE compatible The disk layout and volume information of a DASD reside in the first two tracks of cylinder 0. When a DASD is set online, currently the first three tracks are read and analysed to confirm an expected layout. For CDL (Compatible Disk Layout) only count area data of the first track is evaluated and checked against expected key and data lengths. For LDL (Linux Disk Layout) the first and third track is evaluated. However, an LDL formatted volume is expected to be in the same format across all tracks. Checking the third track therefore doesn't have any more value than checking any other track at random. Now, an Extent Space Efficient (ESE) DASD is initialised by only formatting the first two tracks, as those tracks always contain all information necessarry. Checking the third track on an ESE volume will therefore most likely fail with a record not found error, as the third track will be empty. This in turn leads to the device being recognised with a volume size of 0. Attempts to write volume information on the first two tracks then fail with "no space left on device" errors. Initialising the first three tracks for an ESE volume is not a viable solution, because the third track is already a regular track and could contain user data. With that there is potential for data corruption. Instead, always only analyse the first two tracks, as it is sufficiant for both CDL and LDL, and allow ESE volumes to be recognised as well. Signed-off-by: Jan Höppner Reviewed-by: Stefan Haberland Signed-off-by: Vasily Gorbik drivers/s390/block/dasd_eckd.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 8a9f606fefadb903c323836fcd6e65a122dce66a Author: Jan Höppner Date: Thu Jun 7 14:52:57 2018 +0200 s390/dasd: Remove old defines and function Commit 4d284cac76d0 ("[S390] Avoid excessive inlining.") removed bytes_per_record() which was the only user of the defines ECKD_C0 and ECKD_F*, and round_up_multiple(). Let's get rid of those. Signed-off-by: Jan Höppner Reviewed-by: Stefan Haberland Signed-off-by: Vasily Gorbik drivers/s390/block/dasd_eckd.c | 21 --------------------- 1 file changed, 21 deletions(-) commit 72ddd535128e4acefaec00d52c75385fd4db40c0 Author: Jan Höppner Date: Tue May 29 17:28:24 2018 +0200 s390/dasd: Remove unused structs and function prototypes There are structs that have never been used. There are also two function prototypes which were forgotton in commit f9f8d02fae0d ("[S390] dasd: revert LCU optimization"). Clean up and keep the header file tidy. Signed-off-by: Jan Höppner Reviewed-by: Stefan Haberland Signed-off-by: Vasily Gorbik drivers/s390/block/dasd_eckd.h | 25 ------------------------- 1 file changed, 25 deletions(-) commit a131c2bf165684315f606fdd88cf80be22ba32f3 Merge: 237f83dfbe66 6cf7fb5a95de Author: Linus Torvalds Date: Thu Jul 11 11:17:09 2019 -0700 Merge tag 'acpi-5.3-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fix from Rafael Wysocki: "Revert a recent ACPICA commit causing systems to hang at boot time" * tag 'acpi-5.3-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: Revert "ACPICA: Update table load object initialization" commit cea743f2ea814d3d54dfab667b68271d4f4e5fdf Author: Gustavo A. R. Silva Date: Thu Jul 11 11:12:18 2019 -0500 RDMA/siw: Mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warnings: drivers/infiniband/sw/siw/siw_qp_rx.c: In function ‘siw_rdmap_complete’: drivers/infiniband/sw/siw/siw_qp_rx.c:1214:18: warning: this statement may fall through [-Wimplicit-fallthrough=] wqe->rqe.flags |= SIW_WQE_SOLICITED; ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ drivers/infiniband/sw/siw/siw_qp_rx.c:1215:2: note: here case RDMAP_SEND: ^~~~ drivers/infiniband/sw/siw/siw_qp_tx.c: In function ‘siw_qp_sq_process’: drivers/infiniband/sw/siw/siw_qp_tx.c:1044:4: warning: this statement may fall through [-Wimplicit-fallthrough=] siw_wqe_put_mem(wqe, tx_type); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/infiniband/sw/siw/siw_qp_tx.c:1045:3: note: here case SIW_OP_INVAL_STAG: ^~~~ drivers/infiniband/sw/siw/siw_qp_tx.c:1128:4: warning: this statement may fall through [-Wimplicit-fallthrough=] siw_wqe_put_mem(wqe, tx_type); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/infiniband/sw/siw/siw_qp_tx.c:1129:3: note: here case SIW_OP_INVAL_STAG: ^~~~ Warning level 3 was used: -Wimplicit-fallthrough=3 This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough. Signed-off-by: Gustavo A. R. Silva Reviewed-by: Bernard Metzler Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/siw/siw_qp_rx.c | 2 ++ drivers/infiniband/sw/siw/siw_qp_tx.c | 4 ++++ 2 files changed, 6 insertions(+) commit 237f83dfbe668443b5e31c3c7576125871cca674 Merge: 8f6ccf6159ae 1ff2f0fa450e Author: Linus Torvalds Date: Thu Jul 11 10:55:49 2019 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next Pull networking updates from David Miller: "Some highlights from this development cycle: 1) Big refactoring of ipv6 route and neigh handling to support nexthop objects configurable as units from userspace. From David Ahern. 2) Convert explored_states in BPF verifier into a hash table, significantly decreased state held for programs with bpf2bpf calls, from Alexei Starovoitov. 3) Implement bpf_send_signal() helper, from Yonghong Song. 4) Various classifier enhancements to mvpp2 driver, from Maxime Chevallier. 5) Add aRFS support to hns3 driver, from Jian Shen. 6) Fix use after free in inet frags by allocating fqdirs dynamically and reworking how rhashtable dismantle occurs, from Eric Dumazet. 7) Add act_ctinfo packet classifier action, from Kevin Darbyshire-Bryant. 8) Add TFO key backup infrastructure, from Jason Baron. 9) Remove several old and unused ISDN drivers, from Arnd Bergmann. 10) Add devlink notifications for flash update status to mlxsw driver, from Jiri Pirko. 11) Lots of kTLS offload infrastructure fixes, from Jakub Kicinski. 12) Add support for mv88e6250 DSA chips, from Rasmus Villemoes. 13) Various enhancements to ipv6 flow label handling, from Eric Dumazet and Willem de Bruijn. 14) Support TLS offload in nfp driver, from Jakub Kicinski, Dirk van der Merwe, and others. 15) Various improvements to axienet driver including converting it to phylink, from Robert Hancock. 16) Add PTP support to sja1105 DSA driver, from Vladimir Oltean. 17) Add mqprio qdisc offload support to dpaa2-eth, from Ioana Radulescu. 18) Add devlink health reporting to mlx5, from Moshe Shemesh. 19) Convert stmmac over to phylink, from Jose Abreu. 20) Add PTP PHC (Physical Hardware Clock) support to mlxsw, from Shalom Toledo. 21) Add nftables SYNPROXY support, from Fernando Fernandez Mancera. 22) Convert tcp_fastopen over to use SipHash, from Ard Biesheuvel. 23) Track spill/fill of constants in BPF verifier, from Alexei Starovoitov. 24) Support bounded loops in BPF, from Alexei Starovoitov. 25) Various page_pool API fixes and improvements, from Jesper Dangaard Brouer. 26) Just like ipv4, support ref-countless ipv6 route handling. From Wei Wang. 27) Support VLAN offloading in aquantia driver, from Igor Russkikh. 28) Add AF_XDP zero-copy support to mlx5, from Maxim Mikityanskiy. 29) Add flower GRE encap/decap support to nfp driver, from Pieter Jansen van Vuuren. 30) Protect against stack overflow when using act_mirred, from John Hurley. 31) Allow devmap map lookups from eBPF, from Toke Høiland-Jørgensen. 32) Use page_pool API in netsec driver, Ilias Apalodimas. 33) Add Google gve network driver, from Catherine Sullivan. 34) More indirect call avoidance, from Paolo Abeni. 35) Add kTLS TX HW offload support to mlx5, from Tariq Toukan. 36) Add XDP_REDIRECT support to bnxt_en, from Andy Gospodarek. 37) Add MPLS manipulation actions to TC, from John Hurley. 38) Add sending a packet to connection tracking from TC actions, and then allow flower classifier matching on conntrack state. From Paul Blakey. 39) Netfilter hw offload support, from Pablo Neira Ayuso" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (2080 commits) net/mlx5e: Return in default case statement in tx_post_resync_params mlx5: Return -EINVAL when WARN_ON_ONCE triggers in mlx5e_tls_resync(). net: dsa: add support for BRIDGE_MROUTER attribute pkt_sched: Include const.h net: netsec: remove static declaration for netsec_set_tx_de() net: netsec: remove superfluous if statement netfilter: nf_tables: add hardware offload support net: flow_offload: rename tc_cls_flower_offload to flow_cls_offload net: flow_offload: add flow_block_cb_is_busy() and use it net: sched: remove tcf block API drivers: net: use flow block API net: sched: use flow block API net: flow_offload: add flow_block_cb_{priv, incref, decref}() net: flow_offload: add list handling functions net: flow_offload: add flow_block_cb_alloc() and flow_block_cb_free() net: flow_offload: rename TCF_BLOCK_BINDER_TYPE_* to FLOW_BLOCK_BINDER_TYPE_* net: flow_offload: rename TC_BLOCK_{UN}BIND to FLOW_BLOCK_{UN}BIND net: flow_offload: add flow_block_cb_setup_simple() net: hisilicon: Add an tx_desc to adapt HI13X1_GMAC net: hisilicon: Add an rx_desc to adapt HI13X1_GMAC ... commit 8f6ccf6159aed1f04c6d179f61f6fb2691261e84 Merge: 5450e8a316a6 d68dbb0c9ac8 Author: Linus Torvalds Date: Thu Jul 11 10:09:44 2019 -0700 Merge tag 'clone3-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux Pull clone3 system call from Christian Brauner: "This adds the clone3 syscall which is an extensible successor to clone after we snagged the last flag with CLONE_PIDFD during the 5.2 merge window for clone(). It cleanly supports all of the flags from clone() and thus all legacy workloads. There are few user visible differences between clone3 and clone. First, CLONE_DETACHED will cause EINVAL with clone3 so we can reuse this flag. Second, the CSIGNAL flag is deprecated and will cause EINVAL to be reported. It is superseeded by a dedicated "exit_signal" argument in struct clone_args thus freeing up even more flags. And third, clone3 gives CLONE_PIDFD a dedicated return argument in struct clone_args instead of abusing CLONE_PARENT_SETTID's parent_tidptr argument. The clone3 uapi is designed to be easy to handle on 32- and 64 bit: /* uapi */ struct clone_args { __aligned_u64 flags; __aligned_u64 pidfd; __aligned_u64 child_tid; __aligned_u64 parent_tid; __aligned_u64 exit_signal; __aligned_u64 stack; __aligned_u64 stack_size; __aligned_u64 tls; }; and a separate kernel struct is used that uses proper kernel typing: /* kernel internal */ struct kernel_clone_args { u64 flags; int __user *pidfd; int __user *child_tid; int __user *parent_tid; int exit_signal; unsigned long stack; unsigned long stack_size; unsigned long tls; }; The system call comes with a size argument which enables the kernel to detect what version of clone_args userspace is passing in. clone3 validates that any additional bytes a given kernel does not know about are set to zero and that the size never exceeds a page. A nice feature is that this patchset allowed us to cleanup and simplify various core kernel codepaths in kernel/fork.c by making the internal _do_fork() function take struct kernel_clone_args even for legacy clone(). This patch also unblocks the time namespace patchset which wants to introduce a new CLONE_TIMENS flag. Note, that clone3 has only been wired up for x86{_32,64}, arm{64}, and xtensa. These were the architectures that did not require special massaging. Other architectures treat fork-like system calls individually and after some back and forth neither Arnd nor I felt confident that we dared to add clone3 unconditionally to all architectures. We agreed to leave this up to individual architecture maintainers. This is why there's an additional patch that introduces __ARCH_WANT_SYS_CLONE3 which any architecture can set once it has implemented support for clone3. The patch also adds a cond_syscall(clone3) for architectures such as nios2 or h8300 that generate their syscall table by simply including asm-generic/unistd.h. The hope is to get rid of __ARCH_WANT_SYS_CLONE3 and cond_syscall() rather soon" * tag 'clone3-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux: arch: handle arches who do not yet define clone3 arch: wire-up clone3() syscall fork: add clone3 commit e65682b55956e9fbf8a88f303a48e7c1430ffe15 Author: Mike Marshall Date: Wed Jul 3 21:26:44 2019 +0000 orangefs: eliminate needless variable assignments Signed-off-by: Mike Marshall fs/orangefs/file.c | 2 -- 1 file changed, 2 deletions(-) commit f10789e4f6d6e2d0592620e6e3f6b4ff35d3488d Author: Colin Ian King Date: Sat May 11 14:27:00 2019 +0100 orangefs: remove redundant assignment to variable buffer_index The variable buffer_index is being initialized however this is never read and later it is being reassigned to a new value. The initialization is redundant and hence can be removed. Addresses-Coverity: ("Unused Value") Signed-off-by: Colin Ian King Signed-off-by: Mike Marshall fs/orangefs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b516ea586d717472178e6ef1c152e85608b0ce32 Author: Lukas Wunner Date: Mon Jul 8 13:17:44 2019 +0800 PCI: Enable NVIDIA HDA controllers Many NVIDIA GPUs can be configured as either a single-function video device or a multi-function device with video at function 0 and an HDA audio controller at function 1. The HDA controller can be enabled or disabled by a bit in the function 0 config space. Some BIOSes leave the HDA disabled, which means the HDMI connector from the NVIDIA GPU may not work. Sometimes the BIOS enables the HDA if an HDMI cable is connected at boot time, but that doesn't handle hotplug cases. Enable the HDA controller on device enumeration and resume and re-read the header type, which tells us whether the GPU is a multi-function device. This quirk is limited to NVIDIA PCI devices with the VGA Controller device class. This is expected to correspond to product configurations where the NVIDIA GPU has connectors attached. Other products where the device class is 3D Controller are expected to correspond to configurations where the NVIDIA GPU is dedicated (dGPU) and has no connectors. See original post (URL below) for more details. This commit takes inspiration from an earlier patch by Daniel Drake. Link: https://lore.kernel.org/r/20190708051744.24039-1-drake@endlessm.com v2 Link: https://lore.kernel.org/r/20190613063514.15317-1-drake@endlessm.com v1 Link: https://devtalk.nvidia.com/default/topic/1024022 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75985 Signed-off-by: Lukas Wunner Signed-off-by: Daniel Drake [bhelgaas: commit log, log message, return early if already enabled] Signed-off-by: Bjorn Helgaas Cc: Aaron Plattner Cc: Peter Wu Cc: Ilia Mirkin Cc: Karol Herbst Cc: Maik Freudenberg drivers/pci/quirks.c | 30 ++++++++++++++++++++++++++++++ include/linux/pci_ids.h | 1 + 2 files changed, 31 insertions(+) commit a48f9721e6db74dfbeb8d4a2cd616b20017f4b78 Author: Greg Kroah-Hartman Date: Wed Jun 12 17:25:36 2019 +0200 dlm: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Signed-off-by: Greg Kroah-Hartman Signed-off-by: David Teigland fs/dlm/debug_fs.c | 21 ++------------------- fs/dlm/dlm_internal.h | 8 ++++---- fs/dlm/main.c | 5 +---- 3 files changed, 7 insertions(+), 27 deletions(-) commit b355516f450703c9015316e429b66a93dfff0e6f Author: David Windsor Date: Tue Apr 2 08:37:10 2019 -0400 dlm: check if workqueues are NULL before flushing/destroying If the DLM lowcomms stack is shut down before any DLM traffic can be generated, flush_workqueue() and destroy_workqueue() can be called on empty send and/or recv workqueues. Insert guard conditionals to only call flush_workqueue() and destroy_workqueue() on workqueues that are not NULL. Signed-off-by: David Windsor Signed-off-by: David Teigland fs/dlm/lowcomms.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit 6285bd151b95aa28d6de9b8b9249702681f059d2 Author: YueHaibing Date: Thu Mar 21 10:31:22 2019 +0800 perf cs-etm: Return errcode in cs_etm__process_auxtrace_info() The 'err' variable is set in the error path, but it's not returned to callers. Don't always return -EINVAL, return err. Signed-off-by: YueHaibing Reviewed-by: Mathieu Poirier Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: linux-arm-kernel@lists.infradead.org Fixes: cd8bfd8c973e ("perf tools: Add processing of coresight metadata") Link: http://lkml.kernel.org/r/20190321023122.21332-3-yuehaibing@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/cs-etm.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit edc82a99437a93c36b0ae18eb6daac0097fc6bd3 Author: YueHaibing Date: Thu Mar 21 10:31:21 2019 +0800 perf cs-etm: Remove errnoeous ERR_PTR() usage in cs_etm__process_auxtrace_info intlist__findnew() doesn't uses ERR_PTR() as a return mechanism so its callers shouldn't try to extract the error using PTR_ERR( ret) from intlist__findnew(), make cs_etm__process_auxtrace_info return -ENOMEM instead. Signed-off-by: YueHaibing Reviewed-by: Mathieu Poirier Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: linux-arm-kernel@lists.infradead.org Fixes: cd8bfd8c973e ("perf tools: Add processing of coresight metadata") Link: http://lkml.kernel.org/r/20190321023122.21332-2-yuehaibing@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/cs-etm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 25777e5784a7b417967460d4fcf9660d05a0c320 Author: morten petersen Date: Mon Jul 8 11:41:54 2019 +0000 mailbox: handle failed named mailbox channel request Previously, if mbox_request_channel_byname was used with a name which did not exist in the "mbox-names" property of a mailbox client, the mailbox corresponding to the last entry in the "mbox-names" list would be incorrectly selected. With this patch, -EINVAL is returned if the named mailbox is not found. Signed-off-by: Morten Borup Petersen Signed-off-by: Jassi Brar drivers/mailbox/mailbox.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 33439620680be5225c1b8806579a291e0d761ca0 Author: Oliver O'Halloran Date: Thu Jul 11 01:05:17 2019 +1000 powerpc/eeh: Handle hugepages in ioremap space In commit 4a7b06c157a2 ("powerpc/eeh: Handle hugepages in ioremap space") support for using hugepages in the vmalloc and ioremap areas was enabled for radix. Unfortunately this broke EEH MMIO error checking. Detection works by inserting a hook which checks the results of the ioreadXX() set of functions. When a read returns a 0xFFs response we need to check for an error which we do by mapping the (virtual) MMIO address back to a physical address, then mapping physical address to a PCI device via an interval tree. When translating virt -> phys we currently assume the ioremap space is only populated by PAGE_SIZE mappings. If a hugepage mapping is found we emit a WARN_ON(), but otherwise handles the check as though a normal page was found. In pathalogical cases such as copying a buffer containing a lot of 0xFFs from BAR memory this can result in the system not booting because it's too busy printing WARN_ON()s. There's no real reason to assume huge pages can't be present and we're prefectly capable of handling them, so do that. Fixes: 4a7b06c157a2 ("powerpc/eeh: Handle hugepages in ioremap space") Reported-by: Sachin Sant Signed-off-by: Oliver O'Halloran Tested-by: Sachin Sant Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190710150517.27114-1-oohall@gmail.com arch/powerpc/kernel/eeh.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit bedc0fd0f9b517698193d644f914b33951856fd2 Author: Qian Cai Date: Thu Jul 11 09:55:56 2019 -0400 RDMA/core: Fix -Wunused-const-variable warnings The commit below introduced a few compilation warnings. In file included from ./include/rdma/ib_verbs.h:64, from ./include/linux/mlx5/device.h:37, from ./include/linux/mlx5/driver.h:51, from drivers/net/ethernet/mellanox/mlx5/core/uar.c:36: ./include/linux/dim.h:378:1: warning: 'rdma_dim_prof' defined but not used [-Wunused-const-variable=] rdma_dim_prof[RDMA_DIM_PARAMS_NUM_PROFILES] = { ^~~~~~~~~~~~~ In file included from ./include/rdma/ib_verbs.h:64, from ./include/linux/mlx5/device.h:37, from ./include/linux/mlx5/driver.h:51, from drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c:37: ./include/linux/dim.h:378:1: warning: 'rdma_dim_prof' defined but not used [-Wunused-const-variable=] rdma_dim_prof[RDMA_DIM_PARAMS_NUM_PROFILES] = { ^~~~~~~~~~~~~ Since only ib_cq_rdma_dim_work() in drivers/infiniband/core/cq.c uses it, just move the definition over there. Fixes: f4915455dcf0 ("linux/dim: Implement RDMA adaptive moderation (DIM)") Signed-off-by: Qian Cai Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe drivers/infiniband/core/cq.c | 13 +++++++++++++ include/linux/dim.h | 13 ------------- 2 files changed, 13 insertions(+), 13 deletions(-) commit 855085d9686e107b77a1bdb935224a238a9fd8b9 Author: YueHaibing Date: Thu Jul 11 15:12:13 2019 +0800 rdma/siw: Remove set but not used variable 's' Fixes gcc '-Wunused-but-set-variable' warning: drivers/infiniband/sw/siw/siw_cm.c: In function siw_cm_llp_state_change: drivers/infiniband/sw/siw/siw_cm.c:1278:17: warning: variable s set but not used [-Wunused-but-set-variable] Fixes: 6c52fdc244b5 ("rdma/siw: connection management") Reported-by: Hulk Robot Signed-off-by: YueHaibing Reviewed-by: Bernard Metzler Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/siw/siw_cm.c | 3 --- 1 file changed, 3 deletions(-) commit b45305d777f2f9209dae5a3b8249ca03166a4df3 Author: Geert Uytterhoeven Date: Wed Jul 10 15:39:30 2019 +0200 rdma/siw: Add missing dependencies on LIBCRC32C and DMA_VIRT_OPS If LIBCRC32C and DMA_VIRT_OPS are not enabled: drivers/infiniband/sw/siw/siw_main.o: In function `siw_newlink': siw_main.c:(.text+0x35c): undefined reference to `dma_virt_ops' drivers/infiniband/sw/siw/siw_qp_rx.o: In function `siw_csum_update': siw_qp_rx.c:(.text+0x16): undefined reference to `crc32c' Fix the first issue by adding a select of DMA_VIRT_OPS. Fix the second issue by replacing the unneeded dependency on CRYPTO_CRC32 by a dependency on LIBCRC32C. Reported-by: noreply@ellerman.id.au (first issue) Fixes: c0cf5bdde46c ("rdma/siw: addition to kernel build environment") Signed-off-by: Geert Uytterhoeven Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/siw/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e3cd5136a4ecece6a7599a07add0dfb811a7f49d Author: Masahiro Yamada Date: Thu Jul 11 16:33:17 2019 +0900 kconfig: remove meaningless if-conditional in conf_read() sym_is_choice(sym) has already been checked by previous if-block: if (sym_is_choice(sym) || (sym->flags & SYMBOL_NO_WRITE)) continue; Hence, the following code is redundant, and the comment is misleading: if (!sym_is_choice(sym)) continue; /* fall through */ It always takes 'continue', never falls though. Clean up the dead code. Signed-off-by: Masahiro Yamada scripts/kconfig/confdata.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit d4a74bbfee03acf7bbddc77b9c9236462c744fc7 Author: Masahiro Yamada Date: Tue Jul 9 15:13:00 2019 +0900 kbuild: use -- separater intead of $(filter-out ...) for cc-cross-prefix arch/mips/Makefile passes prefixes that start with '-' to cc-cross-prefix when $(tool-archpref) evaluates to the empty string. They are filtered-out before the $(shell ...) invocation. Otherwise, 'command -v' would be confused. $ command -v -linux-gcc bash: command: -l: invalid option command: usage: command [-pVv] command [arg ...] Since commit 913ab9780fc0 ("kbuild: use more portable 'command -v' for cc-cross-prefix"), cc-cross-prefix throws away the stderr output, so the console is not polluted in any way. This is not a big deal in practice, but I see a slightly better taste in adding '--' to teach it that '-linux-gcc' is an argument instead of a command option. This will cause extra forking of subshell, but it will not be noticeable performance regression. Signed-off-by: Masahiro Yamada scripts/Kbuild.include | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c421651fa2295d1219c36674c7eb8c574542ceea Author: Jason Gunthorpe Date: Thu Jul 11 11:29:42 2019 -0300 RDMA/siw: Add missing rtnl_lock around access to ifa ifa is protected by rcu or rtnl, add the missing locking. In this case we have to use rtnl since siw_listen_address() is sleeping. Fixes: 6c52fdc244b5 ("rdma/siw: connection management") Reviewed-by: Bernard Metzler Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/siw/siw_cm.c | 2 ++ 1 file changed, 2 insertions(+) commit b7403066070d96fa3db23a4df6910f15c46ffc6d Merge: 4ddeaae8903d 420dc733f980 Author: Jens Axboe Date: Thu Jul 11 08:12:31 2019 -0600 Merge branch 'nvme-5.3' of git://git.infradead.org/nvme into for-linus Pull NVMe fixes from Christoph: "Lof of fixes all over the place, and two very minor features that were in the nvme tree by the end of the merge window, but hadn't made it out to Jens yet." * 'nvme-5.3' of git://git.infradead.org/nvme: nvme: fix regression upon hot device removal and insertion nvme-fc: fix module unloads while lports still pending nvme-tcp: don't use sendpage for SLAB pages nvme-tcp: set the STABLE_WRITES flag when data digests are enabled nvmet: print a hint while rejecting NSID 0 or 0xffffffff nvme-multipath: do not select namespaces which are about to be removed nvme-multipath: also check for a disabled path if there is a single sibling nvme-multipath: factor out a nvme_path_is_disabled helper nvme: set physical block size and optimal I/O size nvme: add I/O characteristics fields nvmet: export I/O characteristics attributes in Identify nvme-trace: add delete completion and submission queue to admin cmds tracer nvme-trace: fix spelling mistake "spcecific" -> "specific" nvme-pci: limit max_hw_sectors based on the DMA max mapping size nvme-pci: check for NULL return from pci_alloc_p2pmem() nvme-pci: don't create a read hctx mapping without read queues nvme-pci: don't fall back to a 32-bit DMA mask nvme-pci: make nvme_dev_pm_ops static nvme-fcloop: resolve warnings on RCU usage and sleep warnings nvme-fcloop: fix inconsistent lock state warnings commit a45ff5994c9cde41af627c46abb9f32beae68943 Merge: 429bb83af8bc 1e0cf16cdad1 Author: Paolo Bonzini Date: Thu Jul 11 15:14:16 2019 +0200 Merge tag 'kvm-arm-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm updates for 5.3 - Add support for chained PMU counters in guests - Improve SError handling - Handle Neoverse N1 erratum #1349291 - Allow side-channel mitigation status to be migrated - Standardise most AArch64 system register accesses to msr_s/mrs_s - Fix host MPIDR corruption on 32bit commit 429bb83af8bcea0115eb34fd7ed94a35166d8384 Author: Luke Nowakowski-Krijger Date: Wed Jul 10 08:30:54 2019 -0700 Documentation: virtual: Add toctree hooks Added toctree hooks for indexing. Hooks added only for newly added files. The hook for the top of the tree will be added in a later patch series when a few more substantial changes have been added. Signed-off-by: Luke Nowakowski-Krijger Signed-off-by: Paolo Bonzini Documentation/virtual/index.rst | 18 ++++++++++++++++++ Documentation/virtual/kvm/index.rst | 11 +++++++++++ 2 files changed, 29 insertions(+) commit e287d6de62f745e223d2f7d9b621c892d4b2b45a Author: Luke Nowakowski-Krijger Date: Wed Jul 10 08:30:53 2019 -0700 Documentation: kvm: Convert cpuid.txt to .rst Convert cpuid.txt to .rst format to be parsable by sphinx. Change format and spacing to make function definitions and return values much more clear. Also added a table that is parsable by sphinx and makes the information much more clean. Updated Author email to their new active email address. Added license identifier with the consent of the author. Signed-off-by: Luke Nowakowski-Krijger Signed-off-by: Paolo Bonzini Documentation/virtual/kvm/cpuid.rst | 107 ++++++++++++++++++++++++++++++++++++ Documentation/virtual/kvm/cpuid.txt | 91 ------------------------------ 2 files changed, 107 insertions(+), 91 deletions(-) commit 8373bc4f1b7072a020860896b404bff0a54c7583 Author: Luke Nowakowski-Krijger Date: Wed Jul 10 08:30:52 2019 -0700 Documentation: virtual: Convert paravirt_ops.txt to .rst Convert paravirt_opts.txt to .rst format to be able to be parsed by sphinx. Made some minor spacing and formatting corrections to make defintions much more clear and easy to read. Added default kernel license to the document. Signed-off-by: Luke Nowakowski-Krijger Signed-off-by: Paolo Bonzini .../virtual/{paravirt_ops.txt => paravirt_ops.rst} | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit d7a08882a0a4b4e176691331ee3f492996579534 Author: Sean Christopherson Date: Wed Jul 10 09:07:34 2019 -0700 KVM: x86: Unconditionally enable irqs in guest context On VMX, KVM currently does not re-enable irqs until after it has exited the guest context. As a result, a tick that fires in the window between VM-Exit and guest_exit_irqoff() will be accounted as system time. While said window is relatively small, it's large enough to be problematic in some configurations, e.g. if VM-Exits are consistently occurring a hair earlier than the tick irq. Intentionally toggle irqs back off so that guest_exit_irqoff() can be used in lieu of guest_exit() in order to avoid the save/restore of flags in guest_exit(). On my Haswell system, "nop; cli; sti" is ~6 cycles, versus ~28 cycles for "pushf; pop ; cli; push ; popf". Fixes: f2485b3e0c6c0 ("KVM: x86: use guest_exit_irqoff") Reported-by: Wei Yang Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/svm.c | 10 +--------- arch/x86/kvm/x86.c | 11 +++++++++++ 2 files changed, 12 insertions(+), 9 deletions(-) commit 2e3f45004715085ad53fb0098ae671194157eca4 Author: Rajneesh Bhardwaj Date: Wed Jul 10 21:44:38 2019 +0800 powercap/rapl: Add Ice Lake NNPI support to RAPL driver Enables support for ICL-NNPI, which is a neural network processor for deep learning inference. From RAPL point of view it is same as Ice Lake Mobile processor. Link: https://lkml.org/lkml/2019/6/5/1034 Signed-off-by: Rajneesh Bhardwaj Signed-off-by: Zhang Rui Signed-off-by: Rafael J. Wysocki drivers/powercap/intel_rapl_common.c | 1 + 1 file changed, 1 insertion(+) commit 3231a21d5ca6f6baea95588406775304f35a203e Author: Zhang Rui Date: Wed Jul 10 21:44:37 2019 +0800 powercap/intel_rapl: add support for ICX-D Add ICX-D support in intel_rapl driver Signed-off-by: Zhang Rui Signed-off-by: Rafael J. Wysocki drivers/powercap/intel_rapl_common.c | 1 + 1 file changed, 1 insertion(+) commit cceb1d9dfa680e8b0f5d70d87c2ee25903070b96 Author: Zhang Rui Date: Wed Jul 10 21:44:36 2019 +0800 powercap/intel_rapl: add support for ICX Add ICX support in intel_rapl driver Signed-off-by: Jacob Pan Signed-off-by: Rajneesh Bhardwaj Signed-off-by: Zhang Rui Signed-off-by: Rafael J. Wysocki drivers/powercap/intel_rapl_common.c | 1 + 1 file changed, 1 insertion(+) commit 0ab74bcd1b50821391b264150d26b7f03ba6740b Author: Zhang Rui Date: Wed Jul 10 21:44:35 2019 +0800 powercap/intel_rapl: add support for IceLake desktop Add IceLake desktop support in intel_rapl driver Signed-off-by: Gayatri Kammela Signed-off-by: Joe Konno Signed-off-by: Zhang Rui Signed-off-by: Rafael J. Wysocki drivers/powercap/intel_rapl_common.c | 1 + 1 file changed, 1 insertion(+) commit abcfaeb3f5dc8bded4ba446eb2fb017a7a41d9bc Author: Zhang Rui Date: Wed Jul 10 21:44:34 2019 +0800 intel_rapl: Fix module autoloading issue intel_rapl driver used to have a list of cpuids, which is used to 1. check if the processor support RAPL MSRs 2. do some cpu model specific setting 3. module autoloading Now, the cpu model specific setting are moved to intel_rapl_common.c as part of the common code, because the setup is also needed by RAPL MMIO interface on those platforms. But removing the cpuid list from intel_rapl MSR interface driver results in that the driver can not be loaded automatically. Maintaining another copy of the cpuid list in intel_rapl_msr.c does not make sense because it increases the complexity when enabling RAPL support on a new cpu model. Fix the problem by creating an "intel_rapl_msr" platform device in the common code, and make RAPL MSR interface driver (intel_rapl_msr.c) probe the platform device directly. Reviewed-by: Pandruvada, Srinivas Tested-by: Pandruvada, Srinivas Signed-off-by: Zhang Rui Signed-off-by: Rafael J. Wysocki drivers/powercap/intel_rapl_common.c | 45 ++++++++++++++++++++++-------------- drivers/powercap/intel_rapl_msr.c | 24 +++++++++++++++---- 2 files changed, 48 insertions(+), 21 deletions(-) commit 555c45fe0d04bd817e245a125d242b6a86af4593 Author: Zhang Rui Date: Wed Jul 10 21:44:33 2019 +0800 int340X/processor_thermal_device: add support for MMIO RAPL Introduce MMIO RAPL support as Intel processor_thermal device exposes the capability to do RAPL control via MMIO registers. Reviewed-by: Pandruvada, Srinivas Tested-by: Pandruvada, Srinivas Signed-off-by: Zhang Rui Signed-off-by: Rafael J. Wysocki drivers/thermal/intel/int340x_thermal/Kconfig | 6 + .../int340x_thermal/processor_thermal_device.c | 173 ++++++++++++++++++++- 2 files changed, 173 insertions(+), 6 deletions(-) commit 0c2ddedd8bcb88c4100acb9e0fc5ac8752d09501 Author: Zhang Rui Date: Wed Jul 10 21:44:32 2019 +0800 intel_rapl: support two power limits for every RAPL domain RAPL MSR interface supports 2 power limits for package domain, and 1 power limit for other domains, while RAPL MMIO interface supports 2 power limits for both package and dram domains. And when 2 power limits are supported, the FW_LOCK bit is in bit 63 of the register, instead of bit 31. Remove the assumption that only pakcage domain supports 2 power limits. And allow the RAPL interface driver to specify the number of power limits supported, for every single RAPL domain it owns.. Reviewed-by: Pandruvada, Srinivas Tested-by: Pandruvada, Srinivas Signed-off-by: Zhang Rui Signed-off-by: Rafael J. Wysocki drivers/powercap/intel_rapl_common.c | 72 +++++++++++++----------------------- drivers/powercap/intel_rapl_msr.c | 1 + include/linux/intel_rapl.h | 2 + 3 files changed, 28 insertions(+), 47 deletions(-) commit d978e755aabe215cb67bf713e103ed3916ec306d Author: Zhang Rui Date: Wed Jul 10 21:44:31 2019 +0800 intel_rapl: support 64 bit register RAPL MMIO interface uses 64 bit registers, thus force use 64 bit register for all the RAPL code. Reviewed-by: Pandruvada, Srinivas Tested-by: Pandruvada, Srinivas Signed-off-by: Zhang Rui Signed-off-by: Rafael J. Wysocki drivers/powercap/intel_rapl_common.c | 6 +++--- drivers/powercap/intel_rapl_msr.c | 11 +++++++---- include/linux/intel_rapl.h | 8 ++++---- 3 files changed, 14 insertions(+), 11 deletions(-) commit 3382388d714891fc0f575926189f33d22e7c960b Author: Zhang Rui Date: Wed Jul 10 21:44:30 2019 +0800 intel_rapl: abstract RAPL common code Split intel_rapl.c to intel_rapl_common.c and intel_rapl_msr.c, where intel_rapl_common.c contains the common code that can be used by both MSR and MMIO interface. intel_rapl_msr.c contains the implementation of RAPL MSR interface. Reviewed-by: Pandruvada, Srinivas Tested-by: Pandruvada, Srinivas Signed-off-by: Zhang Rui Signed-off-by: Rafael J. Wysocki drivers/powercap/Kconfig | 11 +- drivers/powercap/Makefile | 3 +- .../powercap/{intel_rapl.c => intel_rapl_common.c} | 537 +++++++++------------ drivers/powercap/intel_rapl_msr.c | 163 +++++++ include/linux/intel_rapl.h | 7 + 5 files changed, 395 insertions(+), 326 deletions(-) commit 1193b1658d16f03cdb2edbac5f2a796ccca225af Author: Zhang Rui Date: Wed Jul 10 21:44:29 2019 +0800 intel_rapl: cleanup hardcoded MSR access There are still some places in the common code that have hardcoded MSR access, convert them to follow the abstracted register access. Reviewed-by: Pandruvada, Srinivas Tested-by: Pandruvada, Srinivas Signed-off-by: Zhang Rui Signed-off-by: Rafael J. Wysocki drivers/powercap/intel_rapl.c | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) commit 8a00676cd690941c9a18bd390c3b2cade631c516 Author: Zhang Rui Date: Wed Jul 10 21:44:28 2019 +0800 intel_rapl: cleanup some functions Previously, there are three functions: rapl_register_psys(), which registers platform rapl domain. rapl_register_powercap(), which registers powercap control type. rapl_unregsiter_powercap(), which unregisters platform rapl domain and powercap control type. This is confusing as the function name does not describe what it does clearly. With this patch, the three functions are removed, and two new functions rapl_register_platform_domain()/rapl_unregister_platform_domain() are introduced instead, and they do exactly what their function name describes. Plus, as part of the common code, hardcoded MSR accesses in these functions are converted to follow the abstracted register access. Reviewed-by: Pandruvada, Srinivas Tested-by: Pandruvada, Srinivas Signed-off-by: Zhang Rui Signed-off-by: Rafael J. Wysocki drivers/powercap/intel_rapl.c | 62 +++++++++++++++++++++---------------------- 1 file changed, 31 insertions(+), 31 deletions(-) commit beea8df821d928e7755917da6c1e45d6afde5148 Author: Zhang Rui Date: Wed Jul 10 21:44:27 2019 +0800 intel_rapl: abstract register access operations MSR and MMIO RAPL interfaces have different ways to access the registers, thus in order to abstract the register access operations, two callbacks, .read_raw()/.write_raw() are introduced, and they should be implemented by MSR RAPL and MMIO RAPL interface driver respectly. This patch implements them for the MSR I/F only. Reviewed-by: Pandruvada, Srinivas Tested-by: Pandruvada, Srinivas Signed-off-by: Zhang Rui Signed-off-by: Rafael J. Wysocki drivers/powercap/intel_rapl.c | 110 ++++++++++++++++++++++-------------------- include/linux/intel_rapl.h | 13 +++++ 2 files changed, 70 insertions(+), 53 deletions(-) commit 7fde2712a7adab721eaabafbd8ff93dff3262d35 Author: Zhang Rui Date: Wed Jul 10 21:44:26 2019 +0800 intel_rapl: abstract register address MSR and MMIO RAPL interface have different sets of registers, thus the RAPL register address should be obtained from interface specific structure, i.e. struct rapl_if_private, instead. Reviewed-by: Pandruvada, Srinivas Tested-by: Pandruvada, Srinivas Signed-off-by: Zhang Rui Signed-off-by: Rafael J. Wysocki drivers/powercap/intel_rapl.c | 73 +++++++++++++++++++------------------------ include/linux/intel_rapl.h | 4 +++ 2 files changed, 37 insertions(+), 40 deletions(-) commit 7ebf8eff63b4f349e7b2ded6aa5036d94bdf94b9 Author: Zhang Rui Date: Wed Jul 10 21:44:25 2019 +0800 intel_rapl: introduce struct rapl_if_private Introduce a new structure, rapl_if_private, to save the private data for different RAPL Interface. Reviewed-by: Pandruvada, Srinivas Tested-by: Pandruvada, Srinivas Signed-off-by: Zhang Rui Signed-off-by: Rafael J. Wysocki drivers/powercap/intel_rapl.c | 59 +++++++++++++++++++++---------------------- include/linux/intel_rapl.h | 15 +++++++++++ 2 files changed, 44 insertions(+), 30 deletions(-) commit ff956826a403f5cf189978d5ff6b3eb53aa11610 Author: Zhang Rui Date: Wed Jul 10 21:44:24 2019 +0800 intel_rapl: introduce intel_rapl.h Create a new header file for the common definitions that might be used by different RAPL Interface. Reviewed-by: Pandruvada, Srinivas Tested-by: Pandruvada, Srinivas Signed-off-by: Zhang Rui Signed-off-by: Rafael J. Wysocki MAINTAINERS | 1 + drivers/powercap/intel_rapl.c | 101 +------------------------------------ include/linux/intel_rapl.h | 113 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 116 insertions(+), 99 deletions(-) commit 8310e8202f24d674b6b2bd341af15d72299f696d Author: Zhang Rui Date: Wed Jul 10 21:44:23 2019 +0800 intel_rapl: remove hardcoded register index enum rapl_domain_reg_id is defined for the RAPL registers for each RAPL domain, thus use it whenever possible. Reviewed-by: Pandruvada, Srinivas Tested-by: Pandruvada, Srinivas Signed-off-by: Zhang Rui Signed-off-by: Rafael J. Wysocki drivers/powercap/intel_rapl.c | 44 +++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) commit f7c4e0c89bbd0f008b33d9dce02e207d9dea9f54 Author: Zhang Rui Date: Wed Jul 10 21:44:22 2019 +0800 intel_rapl: use reg instead of msr To support both MSR and MMIO Interface, use 'reg' to discribe RAPL registers instead of 'msr'. Reviewed-by: Pandruvada, Srinivas Tested-by: Pandruvada, Srinivas Signed-off-by: Zhang Rui Signed-off-by: Rafael J. Wysocki drivers/powercap/intel_rapl.c | 98 +++++++++++++++++++++---------------------- 1 file changed, 49 insertions(+), 49 deletions(-) commit 66bb8a065f5aedd4551d8d3fbce582972f65c2e1 Author: Eric Hankland Date: Wed Jul 10 18:25:15 2019 -0700 KVM: x86: PMU Event Filter Some events can provide a guest with information about other guests or the host (e.g. L3 cache stats); providing the capability to restrict access to a "safe" set of events would limit the potential for the PMU to be used in any side channel attacks. This change introduces a new VM ioctl that sets an event filter. If the guest attempts to program a counter for any blacklisted or non-whitelisted event, the kernel counter won't be created, so any RDPMC/RDMSR will show 0 instances of that event. Signed-off-by: Eric Hankland [Lots of changes. All remaining bugs are probably mine. - Paolo] Signed-off-by: Paolo Bonzini Documentation/virtual/kvm/api.txt | 26 ++++++++++++++++ arch/x86/include/asm/kvm_host.h | 2 ++ arch/x86/include/uapi/asm/kvm.h | 10 +++++++ arch/x86/kvm/pmu.c | 63 +++++++++++++++++++++++++++++++++++++++ arch/x86/kvm/pmu.h | 1 + arch/x86/kvm/x86.c | 5 ++++ include/uapi/linux/kvm.h | 3 ++ 7 files changed, 110 insertions(+) commit 22be8233b34f4f468934c5fefcbe6151766fb8f2 Author: Hans Verkuil Date: Thu Jul 11 04:53:25 2019 -0400 media: videodev2.h: change V4L2_PIX_FMT_BGRA444 define: fourcc was already in use The V4L2_PIX_FMT_BGRA444 define clashed with the pre-existing V4L2_PIX_FMT_SGRBG12 which strangely enough used the same fourcc, even though that fourcc made no sense for a Bayer format. In any case, you can't have duplicates, so change the fourcc of V4L2_PIX_FMT_BGRA444. Signed-off-by: Hans Verkuil Cc: # for v5.2 and up Fixes: 6c84f9b1d2900 ("media: v4l: Add definitions for missing 16-bit RGB4444 formats") Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham Signed-off-by: Mauro Carvalho Chehab include/uapi/linux/videodev2.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 6bda7073f335db261345d403123d9a8c0bc1e36b Author: Hans Verkuil Date: Sat Jun 29 09:00:10 2019 -0400 media: v4l2-subdev: fix regression in check_pad() sd->entity.graph_obj.mdev can be NULL when this function is called, and that breaks existing drivers (rcar-vin, but probably others as well). Check if sd->entity.num_pads is non-zero instead since that doesn't depend on mdev. Signed-off-by: Hans Verkuil Reported-by: Niklas Söderlund Fixes: a8fa55078a77 ("media: v4l2-subdev: Verify arguments in v4l2_subdev_call()") Tested-by: Niklas Söderlund Tested-by: Geert Uytterhoeven Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-subdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ec3042ad39d4e2ddbc3a3344f90bb10d8feb53bc Author: Kuninori Morimoto Date: Thu Jul 11 13:10:45 2019 +0900 ASoC: audio-graph-card: add missing const at graph_get_dai_id() commit c152f8491a8d9 ("ASoC: audio-graph-card: fix an use-after-free in graph_get_dai_id()") fixups use-after-free issue, but, it need to use "const" for reg. This patch adds it. We will have below without this patch LINUX/sound/soc/generic/audio-graph-card.c: In function 'graph_get_dai_id': LINUX/sound/soc/generic/audio-graph-card.c:87:7: warning: assignment discards\ 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] reg = of_get_property(node, "reg", NULL); Fixes: c152f8491a8d9 ("ASoC: audio-graph-card: fix an use-after-free in graph_get_dai_id()") Signed-off-by: Kuninori Morimoto Acked-by: Wen Yang Link: https://lore.kernel.org/r/87sgrd43ja.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown sound/soc/generic/audio-graph-card.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 09297c2f7a5428776369ba3b9904718a358e5559 Author: Shuming Fan Date: Thu Jul 11 16:22:14 2019 +0800 ASoC: rt1011: fix DC calibration offset not applying There are two issues to fix: - DC offset calibration data will be reset after stopping playback. - DC offset calibration data should be applied in the initial setting. Signed-off-by: Shuming Fan Link: https://lore.kernel.org/r/20190711082214.8142-1-shumingf@realtek.com Signed-off-by: Mark Brown sound/soc/codecs/rt1011.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 597473720f4dc69749542bfcfed4a927a43d935e Merge: f0dd687815f9 593fdd4fb44e Author: Dmitry Torokhov Date: Wed Jul 10 23:24:10 2019 -0700 Merge branch 'next' into for-linus Prepare input updates for 5.3 merge window. commit cbf5b73d162b22e044fe0b7d51dcaa33be065253 Author: Eiichi Tsukata Date: Thu Jul 11 11:35:01 2019 +0900 x86/stacktrace: Prevent infinite loop in arch_stack_walk_user() arch_stack_walk_user() checks `if (fp == frame.next_fp)` to prevent a infinite loop by self reference but it's not enogh for circular reference. Once a lack of return address is found, there is no point to continue the loop, so break out. Fixes: 02b67518e2b1 ("tracing: add support for userspace stacktraces in tracing/iter_ctrl") Signed-off-by: Eiichi Tsukata Signed-off-by: Thomas Gleixner Acked-by: Linus Torvalds Link: https://lkml.kernel.org/r/20190711023501.963-1-devel@etsukata.com arch/x86/kernel/stacktrace.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 5450e8a316a64cddcbc15f90733ebc78aa736545 Merge: 29cd581b5949 172bb24a4f48 Author: Linus Torvalds Date: Wed Jul 10 22:17:21 2019 -0700 Merge tag 'pidfd-updates-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux Pull pidfd updates from Christian Brauner: "This adds two main features. - First, it adds polling support for pidfds. This allows process managers to know when a (non-parent) process dies in a race-free way. The notification mechanism used follows the same logic that is currently used when the parent of a task is notified of a child's death. With this patchset it is possible to put pidfds in an {e}poll loop and get reliable notifications for process (i.e. thread-group) exit. - The second feature compliments the first one by making it possible to retrieve pollable pidfds for processes that were not created using CLONE_PIDFD. A lot of processes get created with traditional PID-based calls such as fork() or clone() (without CLONE_PIDFD). For these processes a caller can currently not create a pollable pidfd. This is a problem for Android's low memory killer (LMK) and service managers such as systemd. Both patchsets are accompanied by selftests. It's perhaps worth noting that the work done so far and the work done in this branch for pidfd_open() and polling support do already see some adoption: - Android is in the process of backporting this work to all their LTS kernels [1] - Service managers make use of pidfd_send_signal but will need to wait until we enable waiting on pidfds for full adoption. - And projects I maintain make use of both pidfd_send_signal and CLONE_PIDFD [2] and will use polling support and pidfd_open() too" [1] https://android-review.googlesource.com/q/topic:%22pidfd+polling+support+4.9+backport%22 https://android-review.googlesource.com/q/topic:%22pidfd+polling+support+4.14+backport%22 https://android-review.googlesource.com/q/topic:%22pidfd+polling+support+4.19+backport%22 [2] https://github.com/lxc/lxc/blob/aab6e3eb73c343231cdde775db938994fc6f2803/src/lxc/start.c#L1753 * tag 'pidfd-updates-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux: tests: add pidfd_open() tests arch: wire-up pidfd_open() pid: add pidfd_open() pidfd: add polling selftests pidfd: add polling support commit 29cd581b59496c26334c910a8b848baa81a6becd Merge: 398364a35dae f28a1f16135c Author: Linus Torvalds Date: Wed Jul 10 21:44:07 2019 -0700 Merge tag 'm68k-for-v5.3-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k Pull m68k fix from Geert Uytterhoeven: "Don't select ARCH_HAS_DMA_PREP_COHERENT for nommu or coldfire. This is a fix for an issue detected in next, to avoid introducing build failures when merging Christoph's dma-mapping tree later" * tag 'm68k-for-v5.3-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k: Don't select ARCH_HAS_DMA_PREP_COHERENT for nommu or coldfire commit 398364a35daed7361e76c3666fb9a97792edce09 Merge: d2b6b4c832f7 ad97f9df0fee Author: Linus Torvalds Date: Wed Jul 10 21:42:03 2019 -0700 Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu Pull m68nommu updates from Greg Ungerer: "A series of cleanups for the FLAT format binary loader, binfmt_flat, from Christoph. The end goal is to support no-MMU on RISC-V, and the last patch enables that" * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: riscv: add binfmt_flat support binfmt_flat: don't offset the data start binfmt_flat: move the MAX_SHARED_LIBS definition to binfmt_flat.c binfmt_flat: remove the persistent argument from flat_get_addr_from_rp binfmt_flat: provide an asm-generic/flat.h binfmt_flat: make support for old format binaries optional binfmt_flat: add a ARCH_HAS_BINFMT_FLAT option binfmt_flat: add endianess annotations binfmt_flat: use fixed size type for the on-disk format binfmt_flat: consolidate two version of flat_v2_reloc_t binfmt_flat: remove the unused OLD_FLAT_FLAG_RAM definition binfmt_flat: remove the uapi header binfmt_flat: replace flat_argvp_envp_on_stack with a Kconfig variable binfmt_flat: remove flat_old_ram_flag binfmt_flat: provide a default version of flat_get_relocate_addr binfmt_flat: remove flat_set_persistent binfmt_flat: remove flat_reloc_valid commit d2b6b4c832f7e3067709e8d4970b7b82b44419ac Merge: 0248a8be6d21 b78fa45d4edb Author: Linus Torvalds Date: Wed Jul 10 21:22:43 2019 -0700 Merge tag 'nfsd-5.3' of git://linux-nfs.org/~bfields/linux Pull nfsd updates from Bruce Fields: "Highlights: - Add a new /proc/fs/nfsd/clients/ directory which exposes some long-requested information about NFSv4 clients (like open files) and allows forced revocation of client state. - Replace the global duplicate reply cache by a cache per network namespace; previously, a request in one network namespace could incorrectly match an entry from another, though we haven't seen this in production. This is the last remaining container bug that I'm aware of; at this point you should be able to run separate nfsd's in each network namespace, each with their own set of exports, and everything should work. - Cleanup and modify lock code to show the pid of lockd as the owner of NLM locks. This is the correct version of the bugfix originally attempted in b8eee0e90f97 ("lockd: Show pid of lockd for remote locks")" * tag 'nfsd-5.3' of git://linux-nfs.org/~bfields/linux: (34 commits) nfsd: Make __get_nfsdfs_client() static nfsd: Make two functions static nfsd: Fix misuse of strlcpy sunrpc/cache: remove the exporting of cache_seq_next nfsd: decode implementation id nfsd: create xdr_netobj_dup helper nfsd: allow forced expiration of NFSv4 clients nfsd: create get_nfsdfs_clp helper nfsd4: show layout stateids nfsd: show lock and deleg stateids nfsd4: add file to display list of client's opens nfsd: add more information to client info file nfsd: escape high characters in binary data nfsd: copy client's address including port number to cl_addr nfsd4: add a client info file nfsd: make client/ directory names small ints nfsd: add nfsd/clients directory nfsd4: use reference count to free client nfsd: rename cl_refcount nfsd: persist nfsd filesystem across mounts ... commit 0248a8be6d21dad72b9ce80a7565cf13c11509d8 Merge: 2e756758e5cb bb4cb25dd319 Author: Linus Torvalds Date: Wed Jul 10 21:20:05 2019 -0700 Merge tag 'gfs2-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull gfs2 updates from Andreas Gruenbacher: "Some relatively minor changes for gfs2: - An initial batch of obvious cleanups and fixes from Bob's recovery patch queue. - Two iomap conversion patches and some cleanups from Christoph Hellwig. - A cosmetic cleanup from Kefeng Wang (Huawei). - Another minor fix and cleanup by me" * tag 'gfs2-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: gfs2: Remove unused gfs2_iomap_alloc argument gfs2: don't use buffer_heads in gfs2_allocate_page_backing gfs2: use iomap_bmap instead of generic_block_bmap gfs2: mark stuffed_readpage static gfs2: merge gfs2_writepage_common into gfs2_writepage gfs2: merge gfs2_writeback_aops and gfs2_ordered_aops gfs2: remove the unused gfs2_stuffed_write_end function gfs2: use page_offset in gfs2_page_mkwrite gfs2: replace more printk with calls to fs_info and friends gfs2: dump fsid when dumping glock problems gfs2: simplify gfs2_freeze by removing case gfs2: Rename SDF_SHUTDOWN to SDF_WITHDRAWN gfs2: Warn when a journal replay overwrites a rgrp with buffers gfs2: log which portion of the journal is replayed gfs2: eliminate tr_num_revoke_rm gfs2: kthread and remount improvements gfs2: Use IS_ERR_OR_NULL gfs2: Clean up freeing struct gfs2_sbd commit 20b5d24c7669813ec73589146f7dcefbf259a26a Author: Bitan Biswas Date: Fri Jun 14 09:31:01 2019 -0700 mailbox: tegra: avoid resume NULL mailboxes If Tegra HSP device tree does not have 'shared irqs', mailboxes pointer is NULL. Add non-NULL HSP mailboxes check in resume callback before tegra_hsp_mailbox_startup() call and prevent NULL pointer exception. Signed-off-by: Bitan Biswas Signed-off-by: Jassi Brar drivers/mailbox/tegra-hsp.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit b1a399530ca9bc958ac48fe85837c791f89a3be2 Author: Bitan Biswas Date: Fri Jun 14 09:31:00 2019 -0700 mailbox: tegra: hsp: add noirq resume Add noirq resume instead of resume callback for Tegra HSP. Tegra HSP resume needs tegra_hsp_doorbell_startup() call to fix timeout error for tegra_bpmp_transfer() during genpd resume noirq on Jetson TX2. Signed-off-by: Bitan Biswas Signed-off-by: Jassi Brar drivers/mailbox/tegra-hsp.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 7836922d87175dbc9bc972a1aca08d2c8b6f5045 Author: Fuqian Huang Date: Thu Jul 4 10:36:27 2019 +0800 mailbox: bcm-flexrm-mailbox: using dev_get_drvdata directly Several drivers cast a struct device pointer to a struct platform_device pointer only to then call platform_get_drvdata(). To improve readability, these constructs can be simplified by using dev_get_drvdata() directly. Signed-off-by: Fuqian Huang Signed-off-by: Jassi Brar drivers/mailbox/bcm-flexrm-mailbox.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 11108f4671bda6bf93bea5455210346a0ccbaa10 Author: Daniel Baluta Date: Thu Jun 27 15:29:27 2019 +0300 mailbox: imx: Clear GIEn bit at shutdown GIEn is enabled at startup for RX doorbell mailboxes so we need to clear the bit at shutdown in order to avoid leaving the interrupt line enabled. Signed-off-by: Daniel Baluta Reviewed-by: Oleksij Rempel Signed-off-by: Jassi Brar drivers/mailbox/imx-mailbox.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9c1f2a5dc2948b9f1170d4202c84745f0b0ff0c9 Author: Suman Anna Date: Tue Jun 4 12:01:46 2019 -0500 mailbox: omap: Add support for TI K3 SoCs The TI K3 AM65x and J721E family of SoCs have a new Mailbox IP that is based on the existing Mailbox IP present in OMAP architecture based SoCs. Each instance of the legacy OMAP Mailbox IP is now a single cluster within the newer Mailbox IP instance on K3 architecture based SoCs. A single K3 Mailbox IP instance has multiple clusters with each cluster providing the same functionality as the existing OMAP Mailbox IP. Reuse the existing OMAP Mailbox driver to extend the support for this newer IP present within the Main NavSS block on K3 SoCs. The K3 family of SoCs use 64-bit ARMv8 processors for running Linux, so the driver is also enhanced to deal with the differences between the 32-bit message payloads and the 64-bit pointers used by the client drivers. Signed-off-by: Suman Anna Signed-off-by: Jassi Brar drivers/mailbox/Kconfig | 2 +- drivers/mailbox/omap-mailbox.c | 43 +++++++++++++++++++++++++----------------- include/linux/omap-mailbox.h | 4 +++- 3 files changed, 30 insertions(+), 19 deletions(-) commit 8c665292ec1263c627df60d10619e6f96deea788 Author: Suman Anna Date: Tue Jun 4 12:01:45 2019 -0500 dt-bindings: mailbox: omap: Update bindings for TI K3 SoCs The TI K3 AM65x and J721E family of SoCs have a new Mailbox IP that is based on the existing Mailbox IP present in OMAP architecture based SoCs. Update the existing OMAP Mailbox bindings for this new IP present on TI K3 AM65x and J721E SoCs. The same compatible from AM65x SoCs is reused for J721E SoCs. Signed-off-by: Suman Anna Reviewed-by: Rob Herring Signed-off-by: Jassi Brar .../devicetree/bindings/mailbox/omap-mailbox.txt | 59 ++++++++++++++++++---- 1 file changed, 50 insertions(+), 9 deletions(-) commit 06c182c3bc4eebd6038999a611e4c963d4c87a93 Author: Sudeep Holla Date: Fri May 31 15:33:16 2019 +0100 mailbox: arm_mhu: reorder header inclusion and drop unneeded ones This patch just re-orders some of the headers includes and also drop the ones that are unnecessary. Signed-off-by: Sudeep Holla Signed-off-by: Jassi Brar drivers/mailbox/arm_mhu.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit dba9a3dfe912dc47c9dbc9ba1f5f65adbf9aea0f Author: Arnaud Pouliquen Date: Wed May 22 10:25:35 2019 +0200 mailbox: stm32_ipcc: add spinlock to fix channels concurrent access Add spinlock protection on IPCC register update to avoid race condition. Without this fix, stm32_ipcc_set_bits and stm32_ipcc_clr_bits can be called in parallel for different channels. This results in register corruptions. Signed-off-by: Arnaud Pouliquen Reviewed-by: Fabien Dessenne Signed-off-by: Jassi Brar drivers/mailbox/stm32-ipcc.c | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) commit 2e756758e5cb4ea29cba5865d00fad476ce94a93 Merge: 8dda9957e3a1 96fcaf86c3cb Author: Linus Torvalds Date: Wed Jul 10 21:06:01 2019 -0700 Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 updates from Ted Ts'o: "Many bug fixes and cleanups, and an optimization for case-insensitive lookups" * tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: fix coverity warning on error path of filename setup ext4: replace ktype default_attrs with default_groups ext4: rename htree_inline_dir_to_tree() to ext4_inlinedir_to_tree() ext4: refactor initialize_dirent_tail() ext4: rename "dirent_csum" functions to use "dirblock" ext4: allow directory holes jbd2: drop declaration of journal_sync_buffer() ext4: use jbd2_inode dirty range scoping jbd2: introduce jbd2_inode dirty range scoping mm: add filemap_fdatawait_range_keep_errors() ext4: remove redundant assignment to node ext4: optimize case-insensitive lookups ext4: make __ext4_get_inode_loc plug ext4: clean up kerneldoc warnigns when building with W=1 ext4: only set project inherit bit for directory ext4: enforce the immutable flag on open files ext4: don't allow any modifications to an immutable file jbd2: fix typo in comment of journal_submit_inode_data_buffers jbd2: fix some print format mistakes ext4: gracefully handle ext4_break_layouts() failure during truncate commit 8dda9957e3a1c871dfbabf84c4760f9b26032442 Merge: 25cd6f355dab 1eda8bab70ca Author: Linus Torvalds Date: Wed Jul 10 20:55:33 2019 -0700 Merge tag 'afs-next-20190628' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs Pull afs updates from David Howells: "A set of minor changes for AFS: - Remove an unnecessary check in afs_unlink() - Add a tracepoint for tracking callback management - Add a tracepoint for afs_server object usage - Use struct_size() - Add mappings for AFS UAE abort codes to Linux error codes, using symbolic names rather than hex numbers in the .c file" * tag 'afs-next-20190628' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: afs: Add support for the UAE error table fs/afs: use struct_size() in kzalloc() afs: Trace afs_server usage afs: Add some callback management tracepoints afs: afs_unlink() doesn't need to check dentry->d_inode commit 25cd6f355dab9d11b7c8a4005867d5a30b8b14ee Merge: 40f06c799539 0564336329f0 Author: Linus Torvalds Date: Wed Jul 10 20:51:03 2019 -0700 Merge tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt Pull fscrypt updates from Eric Biggers: - Preparations for supporting encryption on ext4 filesystems where the filesystem block size is smaller than PAGE_SIZE. - Don't allow setting encryption policies on dead directories. - Various cleanups. * tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt: fscrypt: document testing with xfstests fscrypt: remove selection of CONFIG_CRYPTO_SHA256 fscrypt: remove unnecessary includes of ratelimit.h fscrypt: don't set policy for a dead directory ext4: encrypt only up to last block in ext4_bio_write_page() ext4: decrypt only the needed block in __ext4_block_zero_page_range() ext4: decrypt only the needed blocks in ext4_block_write_begin() ext4: clear BH_Uptodate flag on decryption error fscrypt: decrypt only the needed blocks in __fscrypt_decrypt_bio() fscrypt: support decrypting multiple filesystem blocks per page fscrypt: introduce fscrypt_decrypt_block_inplace() fscrypt: handle blocksize < PAGE_SIZE in fscrypt_zeroout_range() fscrypt: support encrypting multiple filesystem blocks per page fscrypt: introduce fscrypt_encrypt_block_inplace() fscrypt: clean up some BUG_ON()s in block encryption/decryption fscrypt: rename fscrypt_do_page_crypto() to fscrypt_crypt_block() fscrypt: remove the "write" part of struct fscrypt_ctx fscrypt: simplify bounce page handling commit 40f06c799539739a08a56be8a096f56aeed05731 Merge: a47f5c56b2eb fe0da9c09b2d Author: Linus Torvalds Date: Wed Jul 10 20:32:37 2019 -0700 Merge tag 'copy-file-range-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull copy_file_range updates from Darrick Wong: "This fixes numerous parameter checking problems and inconsistent behaviors in the new(ish) copy_file_range system call. Now the system call will actually check its range parameters correctly; refuse to copy into files for which the caller does not have sufficient privileges; update mtime and strip setuid like file writes are supposed to do; and allows copying up to the EOF of the source file instead of failing the call like we used to. Summary: - Create a generic copy_file_range handler and make individual filesystems responsible for calling it (i.e. no more assuming that do_splice_direct will work or is appropriate) - Refactor copy_file_range and remap_range parameter checking where they are the same - Install missing copy_file_range parameter checking(!) - Remove suid/sgid and update mtime like any other file write - Change the behavior so that a copy range crossing the source file's eof will result in a short copy to the source file's eof instead of EINVAL - Permit filesystems to decide if they want to handle cross-superblock copy_file_range in their local handlers" * tag 'copy-file-range-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: fuse: copy_file_range needs to strip setuid bits and update timestamps vfs: allow copy_file_range to copy across devices xfs: use file_modified() helper vfs: introduce file_modified() helper vfs: add missing checks to copy_file_range vfs: remove redundant checks from generic_remap_checks() vfs: introduce generic_file_rw_checks() vfs: no fallback for ->copy_file_range vfs: introduce generic_copy_file_range() commit a47f5c56b2eb55290e2a8668e9ca9c029990dbf6 Merge: 682f7c5c465d 36a7347de097 Author: Linus Torvalds Date: Wed Jul 10 20:29:45 2019 -0700 Merge tag 'iomap-5.3-merge-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull iomap updates from Darrick Wong: "There are a few fixes for gfs2 but otherwise it's pretty quiet so far. - Only mark inode dirty at the end of writing to a file (instead of once for every page written). - Fix for an accounting error in the page_done callback" * tag 'iomap-5.3-merge-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: iomap: fix page_done callback for short writes fs: fold __generic_write_end back into generic_write_end iomap: don't mark the inode dirty in iomap_write_end commit 682f7c5c465d7ac4107e51dbf2a847a026b384e8 Merge: e6983afd9254 fa33cdbf3ece Author: Linus Torvalds Date: Wed Jul 10 20:27:07 2019 -0700 Merge tag 'for_v5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull ext2, udf and quota updates from Jan Kara: - some ext2 fixes and cleanups - a fix of udf bug when extending files - a fix of quota Q_XGETQSTAT[V] handling * tag 'for_v5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: udf: Fix incorrect final NOT_ALLOCATED (hole) extent length ext2: Use kmemdup rather than duplicating its implementation quota: honor quota type in Q_XGETQSTAT[V] calls ext2: Always brelse bh on failure in ext2_iget() ext2: add missing brelse() in ext2_iget() ext2: Fix a typo in ext2_getattr argument ext2: fix a typo in comment ext2: add missing brelse() in ext2_new_inode() ext2: optimize ext2_xattr_get() ext2: introduce new helper for xattr entry comparison ext2: merge xattr next entry check to ext2_xattr_entry_valid() ext2: code cleanup for ext2_preread_inode() ext2: code cleanup by using test_opt() and clear_opt() doc: ext2: update description of quota options for ext2 ext2: Strengthen xattr block checks ext2: Merge loops in ext2_xattr_set() ext2: introduce helper for xattr entry validation ext2: introduce helper for xattr header validation quota: add dqi_dirty_list description to comment of Dquot List Management commit 4ddeaae8903d703201e493e2d19dc9ac9acf2c76 Author: Mike Christie Date: Wed May 29 15:16:06 2019 -0500 nbd: add netlink reconfigure resize support If the device is setup with ioctl we can resize the device after the initial setup, but if the device is setup with netlink we cannot use the resize related ioctls and there is no netlink reconfigure size ATTR handling code. This patch adds netlink reconfigure resize support to match the ioctl interface. Reviewed-by: Josef Bacik Signed-off-by: Mike Christie Signed-off-by: Jens Axboe drivers/block/nbd.c | 48 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 32 insertions(+), 16 deletions(-) commit 553768d1169a48c0cd87c4eb4ab57534ee663415 Author: Xiubo Li Date: Wed May 29 15:16:05 2019 -0500 nbd: fix crash when the blksize is zero This will allow the blksize to be set zero and then use 1024 as default. Reviewed-by: Josef Bacik Signed-off-by: Xiubo Li [fix to use goto out instead of return in genl_connect] Signed-off-by: Mike Christie Signed-off-by: Jens Axboe drivers/block/nbd.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) commit e6983afd9254c559acf67dd5f62df824d19851eb Merge: 988052f47adc 7377f5bec133 Author: Linus Torvalds Date: Wed Jul 10 20:09:17 2019 -0700 Merge tag 'fsnotify_for_v5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull fsnotify updates from Jan Kara: "This contains cleanups of the fsnotify name removal hook and also a patch to disable fanotify permission events for 'proc' filesystem" * tag 'fsnotify_for_v5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: fsnotify: get rid of fsnotify_nameremove() fsnotify: move fsnotify_nameremove() hook out of d_delete() configfs: call fsnotify_rmdir() hook debugfs: call fsnotify_{unlink,rmdir}() hooks debugfs: simplify __debugfs_remove_file() devpts: call fsnotify_unlink() hook tracefs: call fsnotify_{unlink,rmdir}() hooks rpc_pipefs: call fsnotify_{unlink,rmdir}() hooks btrfs: call fsnotify_rmdir() hook fsnotify: add empty fsnotify_{unlink,rmdir}() hooks fanotify: Disallow permission events for proc filesystem commit 988052f47adc5c3b0b004180b59bb3761d91b752 Merge: 028db3e290f1 387e3746d01c Author: Linus Torvalds Date: Wed Jul 10 19:21:38 2019 -0700 Merge tag 'locks-v5.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux Pull file locking updates from Jeff Layton: "Just a couple of small lease-related patches this cycle. One from Ira to add a new tracepoint that fires during lease conflict checks, and another patch from Amir to reduce false positives when checking for lease conflicts" * tag 'locks-v5.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux: locks: eliminate false positive conflicts for write lease locks: Add trace_leases_conflict commit 2d008835ec2fcf6eef3285e41e62a5eabd1fe76b Author: Chao Yu Date: Thu Jul 11 09:29:15 2019 +0800 f2fs: improve print log in f2fs_sanity_check_ckpt() As Park Ju Hyung suggested: "I'd like to suggest to write down an actual version of f2fs-tools here as we've seen older versions of fsck doing even more damage and the users might not have the latest f2fs-tools installed." This patch give a more detailed info of how we fix such corruption to user to avoid damageable repair with low version fsck. Signed-off-by: Park Ju Hyung Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/super.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 028db3e290f15ac509084c0fc3b9d021f668f877 Author: Linus Torvalds Date: Wed Jul 10 18:43:43 2019 -0700 Revert "Merge tag 'keys-acl-20190703' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs" This reverts merge 0f75ef6a9cff49ff612f7ce0578bced9d0b38325 (and thus effectively commits 7a1ade847596 ("keys: Provide KEYCTL_GRANT_PERMISSION") 2e12256b9a76 ("keys: Replace uid/gid/perm permissions checking with an ACL") that the merge brought in). It turns out that it breaks booting with an encrypted volume, and Eric biggers reports that it also breaks the fscrypt tests [1] and loading of in-kernel X.509 certificates [2]. The root cause of all the breakage is likely the same, but David Howells is off email so rather than try to work it out it's getting reverted in order to not impact the rest of the merge window. [1] https://lore.kernel.org/lkml/20190710011559.GA7973@sol.localdomain/ [2] https://lore.kernel.org/lkml/20190710013225.GB7973@sol.localdomain/ Link: https://lore.kernel.org/lkml/CAHk-=wjxoeMJfeBahnWH=9zShKp2bsVy527vo3_y8HfOdhwAAw@mail.gmail.com/ Reported-by: Eric Biggers Cc: David Howells Cc: James Morris Signed-off-by: Linus Torvalds Documentation/security/keys/core.rst | 128 ++------ Documentation/security/keys/request-key.rst | 9 +- certs/blacklist.c | 7 +- certs/system_keyring.c | 12 +- drivers/md/dm-crypt.c | 2 +- drivers/nvdimm/security.c | 2 +- fs/afs/security.c | 2 +- fs/cifs/cifs_spnego.c | 25 +- fs/cifs/cifsacl.c | 28 +- fs/cifs/connect.c | 4 +- fs/crypto/keyinfo.c | 2 +- fs/ecryptfs/ecryptfs_kernel.h | 2 +- fs/ecryptfs/keystore.c | 2 +- fs/fscache/object-list.c | 2 +- fs/nfs/nfs4idmap.c | 30 +- fs/ubifs/auth.c | 2 +- include/linux/key.h | 121 ++++--- include/uapi/linux/keyctl.h | 65 ---- lib/digsig.c | 2 +- net/ceph/ceph_common.c | 2 +- net/dns_resolver/dns_key.c | 12 +- net/dns_resolver/dns_query.c | 15 +- net/rxrpc/key.c | 19 +- net/wireless/reg.c | 6 +- security/integrity/digsig.c | 31 +- security/integrity/digsig_asymmetric.c | 2 +- security/integrity/evm/evm_crypto.c | 2 +- security/integrity/ima/ima_mok.c | 13 +- security/integrity/integrity.h | 6 +- .../integrity/platform_certs/platform_keyring.c | 14 +- security/keys/compat.c | 2 - security/keys/encrypted-keys/encrypted.c | 2 +- security/keys/encrypted-keys/masterkey_trusted.c | 2 +- security/keys/gc.c | 2 +- security/keys/internal.h | 16 +- security/keys/key.c | 29 +- security/keys/keyctl.c | 104 ++---- security/keys/keyring.c | 27 +- security/keys/permission.c | 361 ++------------------- security/keys/persistent.c | 27 +- security/keys/proc.c | 22 +- security/keys/process_keys.c | 86 ++--- security/keys/request_key.c | 34 +- security/keys/request_key_auth.c | 15 +- security/selinux/hooks.c | 16 +- security/smack/smack_lsm.c | 3 +- 46 files changed, 325 insertions(+), 992 deletions(-) commit 56f3ce675103e3fb9e631cfb4131fc768bc23e9a Author: Ocean Chen Date: Mon Jul 8 12:34:56 2019 +0800 f2fs: avoid out-of-range memory access blkoff_off might over 512 due to fs corrupt or security vulnerability. That should be checked before being using. Use ENTRIES_IN_SUM to protect invalid value in cur_data_blkoff. Signed-off-by: Ocean Chen Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 5 +++++ 1 file changed, 5 insertions(+) commit 6e0cd4a9dd4df1a0afcb454f1e654b5c80685913 Author: Heng Xiao Date: Wed Jul 3 10:29:57 2019 +0800 f2fs: fix to avoid long latency during umount In umount, we give an constand time to handle pending discard, previously, in __issue_discard_cmd() we missed to check timeout condition in loop, result in delaying long time, fix it. Signed-off-by: Heng Xiao [Chao Yu: add commit message] Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 4 ++++ 1 file changed, 4 insertions(+) commit b13bdf03bb8007279bb0efdf127bafb2d84e8b0a Author: Jaegeuk Kim Date: Thu Jul 4 23:03:08 2019 -0700 f2fs: allow all the users to pin a file This patch allows users to pin files. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 3 --- 1 file changed, 3 deletions(-) commit df070afd9b8c952eacf49db54cae7138eb9deaeb Author: Ronnie Sahlberg Date: Tue Jul 9 18:41:11 2019 +1000 cifs: fix parsing of symbolic link error response RHBZ: 1672539 In smb2_query_symlink(), if we are parsing the error buffer but it is not something we recognize as a symlink we should return -EINVAL and not -ENOENT. I.e. the entry does exist, it is just not something we recognize. Additionally, add check to verify that that the errortag and the reparsetag all make sense. Signed-off-by: Ronnie Sahlberg Acked-by: Paulo Alcantara Signed-off-by: Steve French fs/cifs/smb2ops.c | 14 ++++++++++---- fs/cifs/smb2pdu.h | 2 ++ 2 files changed, 12 insertions(+), 4 deletions(-) commit b49773e7bcf316f238f6709ad9e1999dcc3ed433 Author: Damien Le Moal Date: Thu Jul 11 01:18:31 2019 +0900 block: Disable write plugging for zoned block devices Simultaneously writing to a sequential zone of a zoned block device from multiple contexts requires mutual exclusion for BIO issuing to ensure that writes happen sequentially. However, even for a well behaved user correctly implementing such synchronization, BIO plugging may interfere and result in BIOs from the different contextx to be reordered if plugging is done outside of the mutual exclusion section, e.g. the plug was started by a function higher in the call chain than the function issuing BIOs. Context A Context B | blk_start_plug() | ... | seq_write_zone() | mutex_lock(zone) | bio-0->bi_iter.bi_sector = zone->wp | zone->wp += bio_sectors(bio-0) | submit_bio(bio-0) | bio-1->bi_iter.bi_sector = zone->wp | zone->wp += bio_sectors(bio-1) | submit_bio(bio-1) | mutex_unlock(zone) | return | -----------------------> | seq_write_zone() | mutex_lock(zone) | bio-2->bi_iter.bi_sector = zone->wp | zone->wp += bio_sectors(bio-2) | submit_bio(bio-2) | mutex_unlock(zone) | <------------------------- | | blk_finish_plug() In the above example, despite the mutex synchronization ensuring the correct BIO issuing order 0, 1, 2, context A BIOs 0 and 1 end up being issued after BIO 2 of context B, when the plug is released with blk_finish_plug(). While this problem can be addressed using the blk_flush_plug_list() function (in the above example, the call must be inserted before the zone mutex lock is released), a simple generic solution in the block layer avoid this additional code in all zoned block device user code. The simple generic solution implemented with this patch is to introduce the internal helper function blk_mq_plug() to access the current context plug on BIO submission. This helper returns the current plug only if the target device is not a zoned block device or if the BIO to be plugged is not a write operation. Otherwise, the caller context plug is ignored and NULL returned, resulting is all writes to zoned block device to never be plugged. Signed-off-by: Damien Le Moal Signed-off-by: Jens Axboe block/blk-core.c | 2 +- block/blk-mq.c | 2 +- block/blk-mq.h | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 2 deletions(-) commit 9305d5d721f2bd5e2eeb670035159b560ca211ca Author: Damien Le Moal Date: Thu Jul 11 00:57:41 2019 +0900 block: Fix elevator name declaration The elevator_name field in struct elevator_type is declared as an array of characters (ELV_NAME_MAX size) but in practice used as a string pointer with its initialization done statically within each elevator elevator_type structure declaration. Change the declaration of elevator_name to the more appropriate "const char *" type. Acked-by: Marcos Paulo de Souza Signed-off-by: Damien Le Moal Signed-off-by: Jens Axboe include/linux/elevator.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 36847a005489cfb74dc6388952da73346f867dca Author: Damien Le Moal Date: Thu Jul 11 00:56:08 2019 +0900 block: Remove unused definitions The ELV_MQUEUE_XXX definitions in include/linux/elevator.h are unused since the removal of elevator_may_queue_fn in kernel 5.0. Remove these definitions and also remove the documentation of elevator_may_queue_fn in Documentiation/block/biodoc.txt. Acked-by: Marcos Paulo de Souza Signed-off-by: Damien Le Moal Signed-off-by: Jens Axboe Documentation/block/biodoc.txt | 5 ----- include/linux/elevator.h | 9 --------- 2 files changed, 14 deletions(-) commit 7652ac92018536eb807b6c2130100c85f1ba7e3b Author: Thomas Gleixner Date: Wed Jul 10 21:42:46 2019 +0200 x86/asm: Move native_write_cr0/4() out of line The pinning of sensitive CR0 and CR4 bits caused a boot crash when loading the kvm_intel module on a kernel compiled with CONFIG_PARAVIRT=n. The reason is that the static key which controls the pinning is marked RO after init. The kvm_intel module contains a CR4 write which requires to update the static key entry list. That obviously does not work when the key is in a RO section. With CONFIG_PARAVIRT enabled this does not happen because the CR4 write uses the paravirt indirection and the actual write function is built in. As the key is intended to be immutable after init, move native_write_cr0/4() out of line. While at it consolidate the update of the cr4 shadow variable and store the value right away when the pinning is initialized on a booting CPU. No point in reading it back 20 instructions later. This allows to confine the static key and the pinning variable to cpu/common and allows to mark them static. Fixes: 8dbec27a242c ("x86/asm: Pin sensitive CR0 bits") Fixes: 873d50d58f67 ("x86/asm: Pin sensitive CR4 bits") Reported-by: Linus Torvalds Reported-by: Xi Ruoyao Signed-off-by: Thomas Gleixner Tested-by: Xi Ruoyao Acked-by: Kees Cook Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/alpine.DEB.2.21.1907102140340.1758@nanos.tec.linutronix.de arch/x86/include/asm/processor.h | 1 + arch/x86/include/asm/special_insns.h | 41 +------------------- arch/x86/kernel/cpu/common.c | 72 ++++++++++++++++++++++++++++-------- arch/x86/kernel/smpboot.c | 14 +------ arch/x86/xen/smp_pv.c | 1 + 5 files changed, 61 insertions(+), 68 deletions(-) commit 0df1c9868c3a1916198ee09c323ca5932a0b8a11 Author: Arnd Bergmann Date: Wed Jul 10 15:01:53 2019 +0200 timekeeping/vsyscall: Use __iter_div_u64_rem() On 32-bit x86 when building with clang-9, the 'division' loop gets turned back into an inefficient division that causes a link error: kernel/time/vsyscall.o: In function `update_vsyscall': vsyscall.c:(.text+0xe3): undefined reference to `__udivdi3' Use the existing __iter_div_u64_rem() function which is used to address the same issue in other places. Fixes: 44f57d788e7d ("timekeeping: Provide a generic update_vsyscall() implementation") Signed-off-by: Arnd Bergmann Signed-off-by: Thomas Gleixner Reviewed-by: Nathan Chancellor Tested-by: Nathan Chancellor Link: https://lkml.kernel.org/r/20190710130206.1670830-1-arnd@arndb.de kernel/time/vsyscall.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 775a41e281cf08b1d9e0f2dd89c062430b289a10 Author: Nathan Chancellor Date: Wed Jul 10 10:48:00 2019 -0700 rdma/siw: Use proper enumerated type in map_cqe_status clang warns several times: drivers/infiniband/sw/siw/siw_cq.c:31:4: warning: implicit conversion from enumeration type 'enum siw_wc_status' to different enumeration type 'enum siw_opcode' [-Wenum-conversion] { SIW_WC_SUCCESS, IB_WC_SUCCESS }, ~ ^~~~~~~~~~~~~~ Fixes: b0fff7317bb4 ("rdma/siw: completion queue methods") Link: https://github.com/ClangBuiltLinux/linux/issues/596 Signed-off-by: Nathan Chancellor Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/siw/siw_cq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 85de5d53366f02dd0f81c9be8f435b27fb82b1f7 Author: Bernard Metzler Date: Wed Jul 10 08:38:00 2019 +0000 RDMA/siw: Remove unnecessary kthread create/destroy printouts There is already a warning if we cannot start any thread, and stopping those threads is not worth spamming the console. This also corrects a warning from gcc: drivers/infiniband/sw/siw/siw_main.c: In function 'siw_create_tx_threads': drivers/infiniband/sw/siw/siw_main.c:91:11: warning: variable 'rv' set but not used [-Wunused-but-set-variable] Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Bernard Metzler Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/siw/siw_main.c | 4 +--- drivers/infiniband/sw/siw/siw_qp_tx.c | 4 ---- 2 files changed, 1 insertion(+), 7 deletions(-) commit 488ca3d8d088ec4658c87aaec6a91e98acccdd54 Author: Christoph Hellwig Date: Tue Jul 9 08:58:28 2019 -0700 xfs: chain bios the right way around in xfs_rw_bdev We need to chain the earlier bios to the later ones, so that submit_bio_wait waits on the bio that all the completions are dispatched to. Fixes: 6ad5b3255b9e ("xfs: use bios directly to read and write the log recovery buffers") Reported-by: Dave Chinner Tested-by: Dave Chinner Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_bio_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4d2b8517ba1f3aba9a952ebf153ec972a127c80c Author: Nathan Chancellor Date: Tue Jul 9 16:05:53 2019 -0700 IB/rdmavt: Fix variable shadowing issue in rvt_create_cq clang warns: drivers/infiniband/sw/rdmavt/cq.c:260:7: warning: variable 'err' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] if (err) ^~~ drivers/infiniband/sw/rdmavt/cq.c:310:9: note: uninitialized use occurs here return err; ^~~ drivers/infiniband/sw/rdmavt/cq.c:260:3: note: remove the 'if' if its condition is always false if (err) ^~~~~~~~ drivers/infiniband/sw/rdmavt/cq.c:253:7: warning: variable 'err' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] if (!cq->ip) { ^~~~~~~ drivers/infiniband/sw/rdmavt/cq.c:310:9: note: uninitialized use occurs here return err; ^~~ drivers/infiniband/sw/rdmavt/cq.c:253:3: note: remove the 'if' if its condition is always false if (!cq->ip) { ^~~~~~~~~~~~~~ drivers/infiniband/sw/rdmavt/cq.c:211:9: note: initialize the variable 'err' to silence this warning int err; ^ = 0 2 warnings generated. The function scoped err variable is uninitialized when the flow jumps into the if statement. The if scoped err variable shadows the function scoped err variable, preventing the err assignments within the if statement to be reflected at the function level, which will cause uninitialized use when the goto statements are taken. Just remove the if scoped err declaration so that there is only one copy of the err variable for this function. Fixes: 239b0e52d8aa ("IB/hfi1: Move rvt_cq_wc struct into uapi directory") Link: https://github.com/ClangBuiltLinux/linux/issues/594 Reviewed-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Acked-by: Mike Marciniszyn Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rdmavt/cq.c | 2 -- 1 file changed, 2 deletions(-) commit 420dc733f980246f2179e0144f9cedab9ad4a91e Author: Sagi Grimberg Date: Wed Jul 10 09:31:31 2019 -0700 nvme: fix regression upon hot device removal and insertion When we validate the new controller id, we want to skip controllers that are either deleting or dead. Fix the check to do that and not on the newly added controller. Fixes: 1b1031ca63b2 ("nvme: validate cntlid during controller initialisation") Reported-by: Jon Derrick Tested-by: Jon Derrick Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 56789f3dc127d4f8c07ce2bb48629ba75e8ef16c Author: Adrian Hunter Date: Wed Jul 10 11:58:10 2019 +0300 perf scripts python: export-to-postgresql.py: Export switch events Export switch events to a new table 'context_switches' and create a view 'context_switches_view'. The table and view will show automatically in the exported-sql-viewer.py script. If the table ends up empty, then it and the view are dropped. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190710085810.1650-22-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/scripts/python/export-to-postgresql.py | 51 +++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit 37c1f991b1bcdbe268b99b22e265738f4209f4f4 Author: Adrian Hunter Date: Wed Jul 10 11:58:09 2019 +0300 perf scripts python: export-to-sqlite.py: Export switch events Export switch events to a new table 'context_switches' and create a view 'context_switches_view'. The table and view will show automatically in the exported-sql-viewer.py script. If the table ends up empty, then it and the view are dropped. Committer testing: Use the exported-sql-viewer.py and look at "Tables" -> "context_switches": id machine_id time cpu thread_out_id comm_out_id thread_in_id comm_in_id flags 1 1 187836111885918 7 1 1 2 2 3 2 1 187836111889369 7 1 1 2 2 0 3 1 187836112464618 7 2 3 1 1 1 4 1 187836112465511 7 2 3 1 1 0 Signed-off-by: Adrian Hunter Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190710085810.1650-21-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/scripts/python/export-to-sqlite.py | 41 +++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit abde8722d9b0a317935506d9824e26f1aef6c24a Author: Adrian Hunter Date: Wed Jul 10 11:58:08 2019 +0300 perf db-export: Export switch events Export details of switch events including the threads and their current comms. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190710085810.1650-20-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/db-export.c | 89 ++++++++++++++++++++++ tools/perf/util/db-export.h | 8 ++ .../util/scripting-engines/trace-event-python.c | 41 ++++++++++ 3 files changed, 138 insertions(+) commit b3694e6c0a05383891546c6e3cdef8659d50b653 Author: Adrian Hunter Date: Wed Jul 10 11:58:07 2019 +0300 perf db-export: Factor out db_export__threads() In preparation for exporting switch events, factor out db_export__threads(). Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190710085810.1650-19-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/db-export.c | 82 ++++++++++++++++++++++++++------------------- 1 file changed, 48 insertions(+), 34 deletions(-) commit 5bf83c29a0ad2e78683c318b607539dbadbf7a3b Author: Adrian Hunter Date: Wed Jul 10 11:58:06 2019 +0300 perf script: Add scripting operation process_switch() Add scripting operation process_switch() to process switch events. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190710085810.1650-18-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-script.c | 8 +++++++- tools/perf/util/trace-event.h | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) commit c152f8491a8d9a4b25afd65a86eb5e55e2a8c380 Author: Wen Yang Date: Wed Jul 10 15:25:09 2019 +0800 ASoC: audio-graph-card: fix an use-after-free in graph_get_dai_id() After calling of_node_put() on the node variable, it is still being used, which may result in use-after-free. Fix this issue by calling of_node_put() after the last usage. Fixes: a0c426fe1433 ("ASoC: simple-card-utils: check "reg" property on asoc_simple_card_get_dai_id()") Link: https://lore.kernel.org/r/1562743509-30496-5-git-send-email-wen.yang99@zte.com.cn Signed-off-by: Wen Yang Acked-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/audio-graph-card.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit aa2e362cb6b3f5ca88093ada01e1a0ace8a517b2 Author: Wen Yang Date: Wed Jul 10 15:25:08 2019 +0800 ASoC: audio-graph-card: fix use-after-free in graph_dai_link_of_dpcm() After calling of_node_put() on the ports, port, and node variables, they are still being used, which may result in use-after-free. Fix this issue by calling of_node_put() after the last usage. Fixes: dd98fbc558a0 ("ASoC: audio-graph-card: cleanup DAI link loop method - step1") Link: https://lore.kernel.org/r/1562743509-30496-4-git-send-email-wen.yang99@zte.com.cn Signed-off-by: Wen Yang Acked-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/audio-graph-card.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 27862d5a3325bc531ec15e3c607e44aa0fd57f6f Author: Wen Yang Date: Wed Jul 10 15:25:07 2019 +0800 ASoC: simple-card: fix an use-after-free in simple_for_each_link() The codec variable is still being used after the of_node_put() call, which may result in use-after-free. Fixes: d947cdfd4be2 ("ASoC: simple-card: cleanup DAI link loop method - step1") Link: https://lore.kernel.org/r/1562743509-30496-3-git-send-email-wen.yang99@zte.com.cn Signed-off-by: Wen Yang Acked-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/simple-card.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 724808ad556c15e9473418d082f8aae81dd267f6 Author: Wen Yang Date: Wed Jul 10 15:25:06 2019 +0800 ASoC: simple-card: fix an use-after-free in simple_dai_link_of_dpcm() The node variable is still being used after the of_node_put() call, which may result in use-after-free. Fixes: cfc652a73331 ("ASoC: simple-card: tidyup prefix for snd_soc_codec_conf") Link: https://lore.kernel.org/r/1562743509-30496-2-git-send-email-wen.yang99@zte.com.cn Signed-off-by: Wen Yang Acked-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/simple-card.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit d6b197a14863818a7ed7890e91f043fab49e8c60 Author: Han Xu Date: Wed Jul 10 10:31:27 2019 +0800 spi: spi-fsl-qspi: change i.MX7D RX FIFO size The RX FIFO should be 128 byte rather than 512 byte. It's a typo on reference manual. Signed-off-by: Han Xu Link: https://lore.kernel.org/r/20190710023128.13115-3-han.xu@nxp.com Signed-off-by: Mark Brown drivers/spi/spi-fsl-qspi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 43167bb1f6bb7efa73adc40d2dd700bb6546cc2c Author: Rob Herring Date: Tue Jul 9 13:26:31 2019 -0600 spi: dt-bindings: spi-controller: remove unnecessary 'maxItems: 1' from reg Mixing array constraints like 'maxItems' and string or integer value constraints like 'minimum' don't make sense. Also, with only value constraints, it is implied we have a single value. So lets remove 'maxItems: 1'. Cc: Mark Brown Cc: linux-spi@vger.kernel.org Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20190709192631.16394-1-robh@kernel.org Signed-off-by: Mark Brown Documentation/devicetree/bindings/spi/spi-controller.yaml | 1 - 1 file changed, 1 deletion(-) commit 26c11206f433ea507a7541f48cb472b85870577e Author: Adrian Hunter Date: Wed Jul 10 11:58:05 2019 +0300 perf scripts python: exported-sql-viewer.py: Use new 'has_calls' column If the new 'has_calls' column is present, use it with the call graph and call tree to select only comms that have calls. Committer testing: Just started the exported-sql-view.py and accessed all the reports, no backtraces. Signed-off-by: Adrian Hunter Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190710085810.1650-17-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/scripts/python/exported-sql-viewer.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 266887291cac7f4020b5c83d2af9a13aece44a74 Author: Adrian Hunter Date: Wed Jul 10 11:58:04 2019 +0300 perf scripts python: exported-sql-viewer.py: Remove redundant semi-colons Remove redundant semi-colons added inadvertently. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190710085810.1650-16-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/scripts/python/exported-sql-viewer.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 794fcee8da3c0c8a01b08ecad1c181cb0a622868 Author: Kuninori Morimoto Date: Wed Jul 10 17:01:12 2019 +0900 ASoC: simple-card-utils: care no Platform for DPCM commit 34614739988ad ("ASoC: soc-core: support dai_link with platforms_num != 1") supports multi Platform, and commit 9f3eb91753451 ("ASoC: simple-card-utils: consider CPU-Platform possibility") removed no Platform from simple-card. Multi Platform is now checking both Platform name/of_node are NULL case. But in normal case, DPCM be doesn't have Platform. asoc_simple_canonicalize_platform() try to use CPU of_node to Platform (This is needed for DMAEngine platform case), but it still might be NULL at DPCM be. This patch try to use no Platform after that if Platform of_node is still NULL. It can't probe without this patch. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87muhmgw2o.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown sound/soc/generic/simple-card-utils.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 52db6685932e326ed607644ab7ebdae8c194adda Author: Kuninori Morimoto Date: Wed Jul 10 16:59:55 2019 +0900 ASoC: simple_card_utils.h: care NULL dai at asoc_simple_debug_dai() props->xxx_dai might be NULL when DPCM. This patch cares it for debug. Fixes: commit 0580dde59438 ("ASoC: simple-card-utils: add asoc_simple_debug_info()") Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87o922gw4u.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown include/sound/simple_card_utils.h | 4 ++++ 1 file changed, 4 insertions(+) commit 9e944c9be2456159fb8c36b0ba3170b2f01c3887 Author: Kirill Marinushkin Date: Wed Jul 10 07:51:35 2019 +0200 ASoC: Relocate my e-mail to .com domain zone Signed-off-by: Kirill Marinushkin Link: https://lore.kernel.org/r/20190710055135.21377-1-kmarinushkin@birdec.com Signed-off-by: Mark Brown MAINTAINERS | 2 +- sound/soc/codecs/pcm3060-i2c.c | 4 ++-- sound/soc/codecs/pcm3060-spi.c | 4 ++-- sound/soc/codecs/pcm3060.c | 4 ++-- sound/soc/codecs/pcm3060.h | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) commit d9efc1d25214da500d6592095b542b32c15459df Author: Adrian Hunter Date: Wed Jul 10 11:58:03 2019 +0300 perf scripts python: export-to-postgresql.py: Add has_calls column to comms table Now that a thread's current comm is exported, it shows up in the call graph and call tree even if it has no calls. That can happen because the calls are recorded against the main thread's initial comm. Add a table column to make it easy for the exported-sql-viewer.py script to select only comms with calls. Committer testing: $ rm -f simple-retpoline.db $ sudo ~acme/bin/perf script -i simple-retpoline.perf.data --itrace=be -s ~/libexec/perf-core/scripts/python/export-to-sqlite.py simple-retpoline.db branches calls 2019-07-10 12:25:33.200529 Creating database ... 2019-07-10 12:25:33.211548 Writing records... 2019-07-10 12:25:33.549630 Adding indexes 2019-07-10 12:25:33.560715 Dropping unused tables 2019-07-10 12:25:33.580201 Done $ sha256sum tools/perf/scripts/python/export-to-sqlite.py ~/libexec/perf-core/scripts/python/export-to-sqlite.py 2922b642c392004dffa1d8789296478c85904623f5895bcb9b6cbf33e3ca999f tools/perf/scripts/python/export-to-sqlite.py 2922b642c392004dffa1d8789296478c85904623f5895bcb9b6cbf33e3ca999f /home/acme/libexec/perf-core/scripts/python/export-to-sqlite.py $ $ sqlite3 simple-retpoline.db SQLite version 3.26.0 2018-12-01 12:34:55 Enter ".help" for usage hints. sqlite> .schema comms CREATE TABLE comms (id integer NOT NULL PRIMARY KEY,comm varchar(16),c_thread_id bigint,c_time bigint,exec_flag boolean, has_calls boolean); sqlite> select id,has_calls from comms; 0|1 1|1 sqlite> select distinct comm_id from calls; 0 1 sqlite> Signed-off-by: Adrian Hunter Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190710085810.1650-15-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/scripts/python/export-to-postgresql.py | 2 ++ 1 file changed, 2 insertions(+) commit 72365164cbefe3afa7a146d27d502ed688bf7323 Author: Joe Perches Date: Tue Jul 9 10:22:16 2019 -0700 ASoC: rt1308: Remove executable attribute from source files These are source files not executable. Signed-off-by: Joe Perches Link: https://lore.kernel.org/r/d198a3e6ed3a0e9070afeb6aca69903c3e985149.camel@perches.com Signed-off-by: Mark Brown sound/soc/codecs/rt1308.c | 0 sound/soc/codecs/rt1308.h | 0 2 files changed, 0 insertions(+), 0 deletions(-) commit 6cd249cfad68a231336983e2216d75b3ddfde1d6 Author: Tzung-Bi Shih Date: Mon Jul 8 22:19:01 2019 +0800 ASoC: max98357a: use mdelay for sdmode-delay max98357a_daiops_trigger() is possible to be called in atomic context if the .nonatomic flag is equal to 0 in the DAI links. When cancel_delayed_work_sync() in max98357a_daiops_trigger() is called in atomic context, kernel emits the following message: "BUG: sleeping function called from invalid context". According to the DT binding document, value less than or equal to 5ms of sdmod-delay should be sufficient to avoid the pop noise. Use mdelay (i.e. busy loop) for such low delay should be acceptable. Fixes: cec5b01f8f1c ("ASoC: max98357a: avoid speaker pop when playback startup") Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20190708141901.68797-1-tzungbi@google.com Signed-off-by: Mark Brown sound/soc/codecs/max98357a.c | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) commit ecc8c9984dae9812a10936cb9c74957b68075e07 Author: Adrian Hunter Date: Wed Jul 10 11:58:02 2019 +0300 perf scripts python: export-to-sqlite.py: Add has_calls column to comms table Now that a thread's current comm is exported, it shows up in the call graph and call tree even if it has no calls. That can happen because the calls are recorded against the main thread's initial comm. Add a table column to make it easy for the exported-sql-viewer.py script to select only comms with calls. Committer notes: Running the export-to-sqlite.py worked without warnings and using the exported-sql-viewer.py worked as before. Signed-off-by: Adrian Hunter Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190710085810.1650-14-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/scripts/python/export-to-sqlite.py | 2 ++ 1 file changed, 2 insertions(+) commit 26515699863d68058e290e18e83f444925920be5 Author: Arnd Bergmann Date: Wed Jul 10 15:04:55 2019 +0200 x86/pgtable/32: Fix LOWMEM_PAGES constant clang points out that the computation of LOWMEM_PAGES causes a signed integer overflow on 32-bit x86: arch/x86/kernel/head32.c:83:20: error: signed shift result (0x100000000) requires 34 bits to represent, but 'int' only has 32 bits [-Werror,-Wshift-overflow] (PAGE_TABLE_SIZE(LOWMEM_PAGES) << PAGE_SHIFT); ^~~~~~~~~~~~ arch/x86/include/asm/pgtable_32.h:109:27: note: expanded from macro 'LOWMEM_PAGES' #define LOWMEM_PAGES ((((2<<31) - __PAGE_OFFSET) >> PAGE_SHIFT)) ~^ ~~ arch/x86/include/asm/pgtable_32.h:98:34: note: expanded from macro 'PAGE_TABLE_SIZE' #define PAGE_TABLE_SIZE(pages) ((pages) / PTRS_PER_PGD) Use the _ULL() macro to make it a 64-bit constant. Fixes: 1e620f9b23e5 ("x86/boot/32: Convert the 32-bit pgtable setup code from assembly to C") Signed-off-by: Arnd Bergmann Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20190710130522.1802800-1-arnd@arndb.de arch/x86/include/asm/pgtable_32.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4650c7bed79582c74452d284e45d5b76987c0ef3 Author: Adrian Hunter Date: Wed Jul 10 11:58:01 2019 +0300 perf db-export: Also export thread's current comm Currently, the initial comm of the main thread is exported. Export also a thread's current comm. That better supports the tracing of multi-threaded applications that set different comms for different threads to make it easier to distinguish them. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190710085810.1650-13-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/db-export.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 80859c947a1eb170927d03e713abf7550a3d8766 Author: Adrian Hunter Date: Wed Jul 10 11:58:00 2019 +0300 perf db-export: Factor out db_export__comm() In preparation for exporting the current comm for a thread, factor out db_export__comm(). Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190710085810.1650-12-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/db-export.c | 30 +++++++++++++++++++++++------- tools/perf/util/db-export.h | 2 ++ 2 files changed, 25 insertions(+), 7 deletions(-) commit 8534b5de81802a82b13fe05acc3e749e3baf980e Author: Adrian Hunter Date: Wed Jul 10 11:57:59 2019 +0300 perf scripts python: export-to-postgresql.py: Export comm details Add table columns for thread id, comm start time and exec flag. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190710085810.1650-11-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/scripts/python/export-to-postgresql.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 41085f2bdd5882632e7dd88d1e5b59b7eac2a2a9 Author: Adrian Hunter Date: Wed Jul 10 11:57:58 2019 +0300 perf scripts python: export-to-sqlite.py: Export comm details Add table columns for thread id, comm start time and exec flag. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190710085810.1650-10-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/scripts/python/export-to-sqlite.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 8ebf5cc0f6ce469d65ba2e8ce519dae34f0b3f50 Author: Adrian Hunter Date: Wed Jul 10 11:57:57 2019 +0300 perf db-export: Export comm details In preparation for exporting the current comm for a thread, export comm thread id, start time and exec flag. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190710085810.1650-9-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/db-export.c | 2 +- tools/perf/util/db-export.h | 3 ++- tools/perf/util/scripting-engines/trace-event-python.c | 8 ++++++-- 3 files changed, 9 insertions(+), 4 deletions(-) commit a5defb2f3984e0f056e4113b54c461782796c7be Author: Adrian Hunter Date: Wed Jul 10 11:57:56 2019 +0300 perf db-export: Fix a white space issue in db_export__sample() Fix a white space issue in db_export__sample() Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190710085810.1650-8-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/db-export.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1ed119589834e25c130fdaa911ca8b0e3fd1cddf Author: Adrian Hunter Date: Wed Jul 10 11:57:55 2019 +0300 perf db-export: Move export__comm_thread into db_export__sample() Move call to db_export__comm_thread() from db_export__thread() into db_export__sample() because it makes the code easier to understand, and add explanatory comments. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190710085810.1650-7-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/db-export.c | 35 +++++++++++++++++++++-------------- tools/perf/util/db-export.h | 3 +-- 2 files changed, 22 insertions(+), 16 deletions(-) commit 6319790bcf825bcc4cd9bf01f01ae404a2fb7da8 Author: Adrian Hunter Date: Wed Jul 10 11:57:54 2019 +0300 perf db-export: Export comm before exporting thread Export comm before exporting the non-main thread because db_export__thread() also exports the comm_thread. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190710085810.1650-6-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/db-export.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 19207d86940db9dad5f2e0a270a2490f7da451e3 Author: Adrian Hunter Date: Wed Jul 10 11:57:53 2019 +0300 perf db-export: Export main_thread in db_export__sample() Export main_thread in db_export__sample() because it makes the code easier to understand, and prepares db_export__thread() for further simplification. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190710085810.1650-5-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/db-export.c | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) commit ed5c0a16feb9f1a4347f109d5e9607f6f38688a0 Author: Adrian Hunter Date: Wed Jul 10 11:57:52 2019 +0300 perf db-export: Pass main_thread to db_export__thread() Calls to db_export__thread() already have main_thread so there is no reason to get it again, instead pass it as a parameter. Note that one difference in this approach is that the main thread is not created if it does not exist. It is better if it is not created because: - If main_thread is being traced it will have been created already. - If it is not being traced, there will be no other information about it, and it will never get deleted because there will be no EXIT event. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190710085810.1650-4-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/db-export.c | 29 ++++++++--------------------- tools/perf/util/db-export.h | 3 ++- 2 files changed, 10 insertions(+), 22 deletions(-) commit 208032fef13b68cf1eefc945dafb82efc88c6b8f Author: Adrian Hunter Date: Wed Jul 10 11:57:51 2019 +0300 perf db-export: Rename db_export__comm() to db_export__exec_comm() Rename db_export__comm() to db_export__exec_comm() to better reflect what it does and add explanatory comments. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190710085810.1650-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/db-export.c | 22 +++++++++++++++++++--- tools/perf/util/db-export.h | 4 ++-- 2 files changed, 21 insertions(+), 5 deletions(-) commit fead24e52383c3f8eb25b5426d52b430b84a8194 Author: Adrian Hunter Date: Wed Jul 10 11:57:50 2019 +0300 perf db-export: Get rid of db_export__deferred() db_export__deferred() deferred the export of comms if the comm string had not been "set" (changed from :) however that problem was fixed a long time ago by commit e803cf97a4f9 ("perf record: Synthesize COMM event for a command line workload"), so get rid of db_export__deferred(). Signed-off-by: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lkml.kernel.org/r/20190710085810.1650-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/db-export.c | 61 +--------------------- tools/perf/util/db-export.h | 2 - .../util/scripting-engines/trace-event-python.c | 4 +- 3 files changed, 2 insertions(+), 65 deletions(-) commit 3a475b2166fd6aa5ac76e8c605dffdf7a2a457ee Author: Geert Uytterhoeven Date: Tue Jul 9 15:26:39 2019 +0200 kbuild: Inform user to pass ARCH= for make mrproper When cross-compiling an out-of-tree build with an unclean source tree directory, the build fails with: /path/to/kernel/source/tree is not clean, please run 'make mrproper' in the '/path/to/kernel/source/tree' directory. However, doing so does not fix the problem, as "make mrproper" now requires passing the target architecture to the make command, else it won't remove $(srctree)/arch/$(SRCARCH)/include/generated. "git ls-files -o" doesn't give a clue, as it doesn't list (empty) directories, only files. Improve usability by including the ARCH= option in the error output. Fixes: a788b2ed81ab ("kbuild: check arch/$(SRCARCH)/include/generated before out-of-tree build") Signed-off-by: Geert Uytterhoeven Signed-off-by: Masahiro Yamada Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b956c7a6df3aa01f357f8ac5bc3e44bc3ab7befb Author: Harald Seiler Date: Tue Jul 9 12:50:50 2019 +0200 kbuild: fix compression errors getting ignored A missing compression utility or other errors were not picked up by make and an empty kernel image was produced. By removing the &&, errors will no longer be ignored. Signed-off-by: Harald Seiler Signed-off-by: Masahiro Yamada scripts/Makefile.lib | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 95fd3f87bfbe8edaa5e955e0f858a0a573c09ab6 Author: Masahiro Yamada Date: Sat Jul 6 12:07:13 2019 +0900 kbuild: add a flag to force absolute path for srctree In old days, Kbuild always used an absolute path for $(srctree). Since commit 890676c65d69 ("kbuild: Use relative path when building in the source tree"), $(srctree) is '.' when O= was not passed from the command line. Yet, using absolute paths is useful in some cases even without O=, for instance, to create a cscope file with absolute path tags. 'O=.' was known to work as a workaround to force Kbuild to use absolute paths even when you are building in the source tree. Since commit 25b146c5b8ce ("kbuild: allow Kbuild to start from any directory"), Kbuild is too clever to be tricked. Even if you pass 'O=.' Kbuild notices you are building in the source tree, then use '.' for $(srctree). So, 'make O=. cscope' is no help to create absolute path tags. We cannot force one or the other according to commit e93bc1a0cab3 ("Revert "kbuild: specify absolute paths for cscope""). Both of relative path and absolute path have pros and cons. This commit adds a new flag KBUILD_ABS_SRCTREE to allow users to choose the absolute path for $(srctree). 'make KBUILD_ABS_SRCTREE=1 cscope' will work as a replacement of 'make O=. cscope'. Reported-by: Pawan Gupta Signed-off-by: Masahiro Yamada Documentation/kbuild/kbuild.txt | 9 +++++++++ Makefile | 4 ++++ scripts/tags.sh | 3 +-- 3 files changed, 14 insertions(+), 2 deletions(-) commit 051f278e9d81bed253bf89c66c80b8b921aafa8a Author: Masahiro Yamada Date: Sat Jul 6 12:07:12 2019 +0900 kbuild: replace KBUILD_SRCTREE with boolean building_out_of_srctree Commit 25b146c5b8ce ("kbuild: allow Kbuild to start from any directory") deprecated KBUILD_SRCTREE. It is only used in tools/testing/selftest/ to distinguish out-of-tree build. Replace it with a new boolean flag, building_out_of_srctree. I also replaced the conditional ($(srctree),.) because the next commit will allow an absolute path to be used for $(srctree) even when building in the source tree. Signed-off-by: Masahiro Yamada Makefile | 19 ++++++++----------- scripts/Makefile.build | 2 +- scripts/Makefile.host | 2 +- scripts/Makefile.lib | 2 +- scripts/Makefile.modbuiltin | 2 +- scripts/gdb/linux/Makefile | 2 +- tools/testing/selftests/Makefile | 2 +- tools/testing/selftests/lib.mk | 4 ++-- 8 files changed, 16 insertions(+), 19 deletions(-) commit 75dd47472b92c320304436c9e38638bc04ae7a4a Author: Masahiro Yamada Date: Sat Jul 6 12:07:11 2019 +0900 kbuild: remove src and obj from the top Makefile Replace $(src) and $(obj) with $(srctree) and $(objtree), respectively. Signed-off-by: Masahiro Yamada Makefile | 9 +++------ arch/arc/Makefile | 2 +- arch/parisc/Makefile | 12 ++++++------ arch/um/Makefile | 2 +- 4 files changed, 11 insertions(+), 14 deletions(-) commit 3a10f999ffd464d01c5a05592a15470a3c4bbc36 Author: Konstantin Khlebnikov Date: Mon Jul 8 18:29:57 2019 +0300 blk-throttle: fix zero wait time for iops throttled group After commit 991f61fe7e1d ("Blk-throttle: reduce tail io latency when iops limit is enforced") wait time could be zero even if group is throttled and cannot issue requests right now. As a result throtl_select_dispatch() turns into busy-loop under irq-safe queue spinlock. Fix is simple: always round up target time to the next throttle slice. Fixes: 991f61fe7e1d ("Blk-throttle: reduce tail io latency when iops limit is enforced") Signed-off-by: Konstantin Khlebnikov Cc: stable@vger.kernel.org # v4.19+ Signed-off-by: Jens Axboe block/blk-throttle.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 113ab72ed4794c193509a97d7c6d32a6886e1682 Author: Damien Le Moal Date: Wed Jul 10 13:53:10 2019 +0900 block: Fix potential overflow in blk_report_zones() For large values of the number of zones reported and/or large zone sizes, the sector increment calculated with blk_queue_zone_sectors(q) * n in blk_report_zones() loop can overflow the unsigned int type used for the calculation as both "n" and blk_queue_zone_sectors() value are unsigned int. E.g. for a device with 256 MB zones (524288 sectors), overflow happens with 8192 or more zones reported. Changing the return type of blk_queue_zone_sectors() to sector_t, fixes this problem and avoids overflow problem for all other callers of this helper too. The same change is also applied to the bdev_zone_sectors() helper. Fixes: e76239a3748c ("block: add a report_zones method") Cc: stable@vger.kernel.org Signed-off-by: Damien Le Moal Signed-off-by: Jens Axboe block/blk-zoned.c | 2 +- include/linux/blkdev.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit d3f77dfdc71835f8db71ca57d272b1fbec9dfc18 Author: Tejun Heo Date: Thu Jun 27 13:39:52 2019 -0700 blkcg: implement REQ_CGROUP_PUNT When a shared kthread needs to issue a bio for a cgroup, doing so synchronously can lead to priority inversions as the kthread can be trapped waiting for that cgroup. This patch implements REQ_CGROUP_PUNT flag which makes submit_bio() punt the actual issuing to a dedicated per-blkcg work item to avoid such priority inversions. This will be used to fix priority inversions in btrfs compression and should be generally useful as we grow filesystem support for comprehensive IO control. Cc: Chris Mason Reviewed-by: Josef Bacik Reviewed-by: Jan Kara Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe block/blk-cgroup.c | 53 +++++++++++++++++++++++++++++++++++++++++++++ block/blk-core.c | 3 +++ include/linux/backing-dev.h | 1 + include/linux/blk-cgroup.h | 16 +++++++++++++- include/linux/blk_types.h | 10 +++++++++ include/linux/writeback.h | 13 ++++++++--- 6 files changed, 92 insertions(+), 4 deletions(-) commit 653c45c6b90c9659facbef10546d1f3a8e37d0cf Author: Tejun Heo Date: Thu Jun 27 13:39:51 2019 -0700 blkcg, writeback: Implement wbc_blkcg_css() Add a helper to determine the target blkcg from wbc. Reviewed-by: Josef Bacik Reviewed-by: Jan Kara Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe include/linux/writeback.h | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 27b36d8fa81fa8274fb72f4eb1484026f6b6daa8 Author: Tejun Heo Date: Thu Jun 27 13:39:50 2019 -0700 blkcg, writeback: Add wbc->no_cgroup_owner When writeback IOs are bounced through async layers, the IOs should only be accounted against the wbc from the original bdi writeback to avoid confusing cgroup inode ownership arbitration. Add wbc->no_cgroup_owner to allow disabling wbc cgroup owner accounting. This will be used make btrfs compression work well with cgroup IO control. v2: Renamed from no_wbc_acct to no_cgroup_owner and added comment as per Jan. Reviewed-by: Josef Bacik Reviewed-by: Jan Kara Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe fs/fs-writeback.c | 2 +- include/linux/writeback.h | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) commit 34e51a5e1a6e939ed7d99c38173821ab86d577f4 Author: Tejun Heo Date: Thu Jun 27 13:39:49 2019 -0700 blkcg, writeback: Rename wbc_account_io() to wbc_account_cgroup_owner() wbc_account_io() does a very specific job - try to see which cgroup is actually dirtying an inode and transfer its ownership to the majority dirtier if needed. The name is too generic and confusing. Let's rename it to something more specific. Reviewed-by: Jan Kara Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe Documentation/admin-guide/cgroup-v2.rst | 2 +- fs/btrfs/extent_io.c | 4 ++-- fs/buffer.c | 2 +- fs/ext4/page-io.c | 2 +- fs/f2fs/data.c | 4 ++-- fs/fs-writeback.c | 8 ++++---- fs/mpage.c | 2 +- include/linux/writeback.h | 8 ++++---- 8 files changed, 16 insertions(+), 16 deletions(-) commit 9b0eb69b75bccada2d341d7e7ca342f0cb1c9a6a Author: Tejun Heo Date: Thu Jun 27 13:39:48 2019 -0700 cgroup, blkcg: Prepare some symbols for module and !CONFIG_CGROUP usages btrfs is going to use css_put() and wbc helpers to improve cgroup writeback support. Add dummy css_get() definition and export wbc helpers to prepare for module and !CONFIG_CGROUP builds. Reported-by: kbuild test robot Reviewed-by: Jan Kara Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe block/blk-cgroup.c | 1 + fs/fs-writeback.c | 3 +++ include/linux/cgroup.h | 1 + 3 files changed, 5 insertions(+) commit fd112c74652371a023f85d87b70bee7169e8f4d0 Author: Josef Bacik Date: Tue Jul 9 14:41:29 2019 -0700 blk-cgroup: turn on psi memstall stuff With the psi stuff in place we can use the memstall flag to indicate pressure that happens from throttling. Signed-off-by: Josef Bacik Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe block/blk-cgroup.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit b554db147feea39617b533ab6bca247c91c6198a Author: Josef Bacik Date: Thu Mar 7 21:37:18 2019 +0000 block: init flush rq ref count to 1 We discovered a problem in newer kernels where a disconnect of a NBD device while the flush request was pending would result in a hang. This is because the blk mq timeout handler does if (!refcount_inc_not_zero(&rq->ref)) return true; to determine if it's ok to run the timeout handler for the request. Flush_rq's don't have a ref count set, so we'd skip running the timeout handler for this request and it would just sit there in limbo forever. Fix this by always setting the refcount of any request going through blk_init_rq() to 1. I tested this with a nbd-server that dropped flush requests to verify that it hung, and then tested with this patch to verify I got the timeout as expected and the error handling kicked in. Thanks, Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe block/blk-core.c | 1 + 1 file changed, 1 insertion(+) commit cdc238eb72f6b94b6c33b98c07b9fc3ac5e57b18 Author: Yi Wang Date: Wed Jul 10 08:24:03 2019 +0800 kvm: x86: Fix -Wmissing-prototypes warnings We get a warning when build kernel W=1: arch/x86/kvm/../../../virt/kvm/eventfd.c:48:1: warning: no previous prototype for ‘kvm_arch_irqfd_allowed’ [-Wmissing-prototypes] kvm_arch_irqfd_allowed(struct kvm *kvm, struct kvm_irqfd *args) ^ The reason is kvm_arch_irqfd_allowed() is declared in arch/x86/kvm/irq.h, which is not included by eventfd.c. Considering kvm_arch_irqfd_allowed() is a weakly defined function in eventfd.c, remove the declaration to kvm_host.h can fix this. Signed-off-by: Yi Wang Reviewed-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/irq.h | 1 - include/linux/kvm_host.h | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) commit b614c6027896ff9ad6757122e84760d938cab15e Author: KarimAllah Ahmed Date: Wed Jul 10 11:13:13 2019 +0200 KVM: Properly check if "page" is valid in kvm_vcpu_unmap The field "page" is initialized to KVM_UNMAPPED_PAGE when it is not used (i.e. when the memory lives outside kernel control). So this check will always end up using kunmap even for memremap regions. Fixes: e45adf665a53 ("KVM: Introduce a new guest mapping API") Cc: stable@vger.kernel.org Signed-off-by: KarimAllah Ahmed Signed-off-by: Paolo Bonzini virt/kvm/kvm_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9bdebc2bd1c4abfbf44dc154cc152ec333e004de Author: Al Viro Date: Sat Jun 29 18:31:24 2019 -0400 Teach shrink_dcache_parent() to cope with mixed-filesystem shrink lists Currently, running into a shrink list that contains dentries from different filesystems can cause several unpleasant things for shrink_dcache_parent() and for umount(2). The first problem is that there's a window during shrink_dentry_list() between __dentry_kill() takes a victim out and dropping reference to its parent. During that window the parent looks like a genuine busy dentry. shrink_dcache_parent() (or, worse yet, shrink_dcache_for_umount()) coming at that time will see no eviction candidates and no indication that it needs to wait for some shrink_dentry_list() to proceed further. That applies for any shrink list that might intersect with the subtree we are trying to shrink; the only reason it does not blow on umount(2) in the mainline is that we unregister the memory shrinker before hitting shrink_dcache_for_umount(). Another problem happens if something in a mixed-filesystem shrink list gets be stuck in e.g. iput(), getting umount of unrelated fs to spin waiting for the stuck shrinker to get around to our dentries. Solution: 1) have shrink_dentry_list() decrement the parent's refcount and make sure it's on a shrink list (ours unless it already had been on some other) before calling __dentry_kill(). That eliminates the window when shrink_dcache_parent() would've blown past the entire subtree without noticing anything with zero refcount not on shrink lists. 2) when shrink_dcache_parent() has found no eviction candidates, but some dentries are still sitting on shrink lists, rather than repeating the scan in hope that shrinkers have progressed, scan looking for something on shrink lists with zero refcount. If such a thing is found, grab rcu_read_lock() and stop the scan, with caller locking it for eviction, dropping out of RCU and doing __dentry_kill(), with the same treatment for parent as shrink_dentry_list() would do. Note that right now mixed-filesystem shrink lists do not occur, so this is not a mainline bug. Howevere, there's a bunch of uses for such beasts (e.g. the "try and evict everything we can out of given page" patches; there are potential uses in mount-related code, considerably simplifying the life in fs/namespace.c, etc.) Signed-off-by: Al Viro fs/dcache.c | 100 ++++++++++++++++++++++++++++++++++++++++++++++++---------- fs/internal.h | 2 ++ 2 files changed, 85 insertions(+), 17 deletions(-) commit 59592cc1f5937ced72e11e681c3e358a0375f7ae Author: YueHaibing Date: Tue Jul 2 21:36:31 2019 +0800 mmc: sdhci_am654: Add dependency on MMC_SDHCI_AM654 Fix build error: drivers/mmc/host/sdhci_am654.o: In function `sdhci_am654_probe': drivers/mmc/host/sdhci_am654.c:464: undefined reference to `__devm_regmap_init_mmio_clk' drivers/mmc/host/sdhci_am654.o:(.debug_addr+0x3f8): undefined reference to `__devm_regmap_init_mmio_clk' Reported-by: Hulk Robot Fixes: aff88ff23512 ("mmc: sdhci_am654: Add Initial Support for AM654 SDHCI driver") Signed-off-by: YueHaibing Signed-off-by: Ulf Hansson drivers/mmc/host/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 42248a918d7c18a535b08f05badb988b140298f6 Author: Colin Ian King Date: Mon Jul 1 18:52:46 2019 +0100 mmc: alcor: remove a redundant greater or equal to zero comparison A greater or equal comparison on the unsigned int variable tmp_diff is always true as unsigned ints are never negative. Hence the comparison is redundant and can be removed. Addresses-Coverity: ("Unsigned compared against 0") Signed-off-by: Colin Ian King Signed-off-by: Ulf Hansson drivers/mmc/host/alcor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5e6b6651d22de109ebf48ca00d0373bc2c0cc080 Author: Jorge Ramirez-Ortiz Date: Mon Jul 1 17:01:25 2019 +0200 mmc: sdhci-msm: fix mutex while in spinlock mutexes can sleep and therefore should not be taken while holding a spinlock. move clk_get_rate (can sleep) outside the spinlock protected region. Fixes: 83736352e0ca ("mmc: sdhci-msm: Update DLL reset sequence") Cc: stable@vger.kernel.org Signed-off-by: Jorge Ramirez-Ortiz Reviewed-by: Bjorn Andersson Reviewed-by: Vinod Koul Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-msm.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 8751c8bd8b91abb0887ab971651a1ac72d3b9398 Author: YueHaibing Date: Fri Jun 28 12:07:51 2019 +0800 mmc: sdhci_am654: Make some symbols static Fix sparse warnings: drivers/mmc/host/sdhci_am654.c:192:6: warning: symbol 'sdhci_j721e_4bit_set_clock' was not declared. Should it be static? drivers/mmc/host/sdhci_am654.c:261:18: warning: symbol 'sdhci_j721e_8bit_ops' was not declared. Should it be static? drivers/mmc/host/sdhci_am654.c:284:18: warning: symbol 'sdhci_j721e_4bit_ops' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci_am654.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 79a986721decf428ba539e6e2c941c987acce655 Author: Christoph Hellwig Date: Tue Jun 25 11:20:42 2019 +0200 dma-mapping: remove dma_max_pfn These days, the DMA mapping code must bounce buffers for any unsupported address. If the driver needs to optimize for natively supported ranges, then it should use dma_get_required_mask. Signed-off-by: Christoph Hellwig Acked-by: Marc Gonzalez Signed-off-by: Ulf Hansson arch/arm/include/asm/dma-mapping.h | 7 ------- include/linux/dma-mapping.h | 7 ------- 2 files changed, 14 deletions(-) commit 7559d612dff0389aba5b49664e3bc94a150e45f2 Author: Christoph Hellwig Date: Tue Jun 25 11:20:41 2019 +0200 mmc: core: let the dma map ops handle bouncing Just like we do for all other block drivers. Especially as the limit imposed at the moment might be way to pessimistic for iommus. This also means we are not going to set a bounce limit for the queue, in case we have a dma mask. On most architectures it was never needed, the major hold out was x86-32 with PAE, but that has been fixed by now. Signed-off-by: Christoph Hellwig Signed-off-by: Ulf Hansson drivers/mmc/core/queue.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 1cdca16c043abd4803c3979e5faefaa623703e66 Author: Masahiro Yamada Date: Mon Jun 24 16:03:45 2019 +0900 dt-binding: mmc: rename tmio_mmc.txt to renesas,sdhi.txt As commit b6147490e6aa ("mmc: tmio: split core functionality, DMA and MFD glue") said, these MMC controllers use the IP from Panasonic. TMIO (Toshiba Mobile IO) MMC was the first upstreamed user of this IP. The common driver code was split and expanded as 'tmio-mmc-core', then it became historical misnomer since 'tmio' is not the name of this IP. In the discussion [1], we decide to keep this name as-is at least in Linux driver level because renaming everything is a big churn. However, DT should not be oriented to a particular project even though it is mainly developed in Linux communities. This is the misfortune only in Linux. Let's stop exporting it to other projects, where there is no good reason to call this hardware "TMIO". Rename the file to renesas,sdhi.txt. In fact, all the information in this file is specific to the Renesas platform. This commit also removes the first paragraph entirely. The DT-binding should describe the hardware. It is strange to talk about Linux driver internals such as how the drivers are probed, how platform data are handed off, etc. [1] https://www.spinics.net/lists/linux-mmc/msg46952.html Signed-off-by: Masahiro Yamada Reviewed-by: Simon Horman Signed-off-by: Ulf Hansson .../bindings/mmc/{tmio_mmc.txt => renesas,sdhi.txt} | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit 29ca763fc26f382444887951b3443da0fa47e5fc Author: Baolin Wang Date: Fri Jun 21 14:12:33 2019 +0800 mmc: sdhci-sprd: Add pin control support for voltage switch For Spreadtrum SD card voltage switching, besides regulator setting, it also need switch related pin's state to output corresponding voltage. This patch adds pin control operation to support voltage switch. Signed-off-by: Baolin Wang Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-sprd.c | 54 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) commit f97ee8f5d9cdd03933517a6336836b8e4415e668 Author: Baolin Wang Date: Fri Jun 21 14:12:32 2019 +0800 dt-bindings: mmc: sprd: Add pinctrl support When changing SD card voltage signal for Spreadtrum SD host controller, it also need to switch related pin's state. Thus add pinctrl properties' description in documentation. Signed-off-by: Baolin Wang Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/sdhci-sprd.txt | 7 +++++++ 1 file changed, 7 insertions(+) commit eef9e0a60e78be6873b515e85466cac2f25581ed Author: Baolin Wang Date: Fri Jun 21 14:12:31 2019 +0800 mmc: sdhci-sprd: Add start_signal_voltage_switch ops For Spreadtrum SD host controller, we can not use standard SD registers to change and detect the I/O voltage signals, since our voltage regulator for I/O is fixed in hardware, and no signals were connected to the SD controller. Thus add Spreadtrum specific voltage switch ops to change voltage instead of using standard SD host registers. Signed-off-by: Baolin Wang Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-sprd.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit cb3a7d4a0aec4e56043d6433724e0606d6b6efba Author: Adrian Hunter Date: Thu Jun 20 12:49:01 2019 +0300 mmc: sdhci-pci: Add support for Intel EHL Add PCI Ids for Intel EHL. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-pci-core.c | 2 ++ drivers/mmc/host/sdhci-pci.h | 2 ++ 2 files changed, 4 insertions(+) commit 63624d13b24d00fa3783181efdfdb9d5afaa7363 Author: Yoshihiro Shimoda Date: Wed Jun 19 13:55:30 2019 +0900 mmc: tmio: Use dma_max_mapping_size() instead of a workaround Since the commit 133d624b1cee ("dma: Introduce dma_max_mapping_size()") provides a helper function to get the max mapping size, we can use the function instead of the workaround code for swiotlb. Signed-off-by: Yoshihiro Shimoda Acked-by: Wolfram Sang Reviewed-by: Christoph Hellwig Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Ulf Hansson drivers/mmc/host/tmio_mmc_core.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) commit 4aaaf3ab150947557345aedc178dac4f5c10cc87 Author: Ulf Hansson Date: Tue Jun 18 01:20:50 2019 +0200 mmc: sdio: Drop unused in-parameter from mmc_sdio_init_card() The "powered_resume" in-parameter to mmc_sdio_init_card() has now become redundant as all callers set it to 0. Therefore let's just drop it. Signed-off-by: Ulf Hansson Reviewed-by: Douglas Anderson Tested-by: Douglas Anderson drivers/mmc/core/sdio.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit 3c30e73977e5d1a14a2969cfebcca2655a29b40a Author: Ulf Hansson Date: Tue Jun 18 01:13:02 2019 +0200 mmc: sdio: Drop unused in-parameter to mmc_sdio_reinit_card() The "powered_resume" in-parameter to mmc_sdio_reinit_card() has now become redundant as all callers set it to 0. Therefore let's just drop it. Signed-off-by: Ulf Hansson Reviewed-by: Douglas Anderson Tested-by: Douglas Anderson drivers/mmc/core/sdio.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit 6ebc581c3f9e6fd11a1c9da492a5e05bbe96885a Author: Ulf Hansson Date: Tue Jun 18 00:52:59 2019 +0200 mmc: sdio: Don't re-initialize powered-on removable SDIO cards at resume It looks like the original idea behind always doing a re-initialization of a removable SDIO card during system resume in mmc_sdio_resume(), is to try to play safe to detect whether the card has been removed. However, this seems like a really a bad idea as it will most likely screw things up, especially when the card is expected to remain powered on during system suspend by the SDIO func driver. Let's fix this, simply by trusting that the detect work checks if the card is alive and inserted, which is being scheduled at the PM_POST_SUSPEND notification anyway. Signed-off-by: Ulf Hansson Tested-by: Douglas Anderson Reviewed-by: Douglas Anderson drivers/mmc/core/sdio.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 7fbbe725378d62c30a076742a60a7e1812a2515a Author: Ulf Hansson Date: Mon Jun 17 23:51:31 2019 +0200 mmc: sdio: Drop powered-on re-init at runtime resume and HW reset To use the so called powered-on re-initialization of an SDIO card, the power to the card must obviously have stayed on. If not, the initialization will simply fail. In the runtime suspend case, the card is always powered off. Hence, let's drop the support for powered-on re-initialization during runtime resume, as it doesn't make sense. Moreover, during a HW reset, the point is to cut the power to the card and then do fresh re-initialization. Therefore drop the support for powered-on re-initialization during HW reset. Signed-off-by: Ulf Hansson Fixes: ca8971ca5753 ("mmc: dw_mmc: Prevent runtime PM suspend when SDIO IRQs are enabled") Tested-by: Douglas Anderson drivers/mmc/core/sdio.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit ee550947a0d696f7ddfe88b204d4eae7f879b583 Author: Ulf Hansson Date: Mon Jun 17 23:41:15 2019 +0200 mmc: sdio: Move comment about re-initialization to mmc_sdio_reinit_card() The comment in mmc_sdio_power_restore() belongs in mmc_sdio_reinit_card(), which was created during a previous commit that re-factored some code. Fix this by moving the comment into mmc_sdio_reinit_card(). Signed-off-by: Ulf Hansson Reviewed-by: Douglas Anderson drivers/mmc/core/sdio.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) commit cd23042d05468ab2e66e0298b46ee90a5f8d9a74 Author: Ulf Hansson Date: Tue Jun 11 17:44:32 2019 +0200 mmc: sdio: Drop mmc_claim|release_host() in mmc_sdio_power_restore() The function mmc_sdio_power_restore() is called either from mmc_sdio_runtime_resume() or from mmc_sdio_hw_reset(). Both callers either claims/releases the host or require its callers to do so. Therefore let's drop the redundant calls to mmc_claim|release_host() in mmc_sdio_power_restore(). Signed-off-by: Ulf Hansson Reviewed-by: Douglas Anderson Tested-by: Douglas Anderson drivers/mmc/core/sdio.c | 4 ---- 1 file changed, 4 deletions(-) commit 7f3bbc0b817b51206948b743331c7441bf918c7f Author: Dmitry Osipenko Date: Tue Jul 9 17:51:51 2019 +0300 drm/modes: Skip invalid cmdline mode The named mode could be invalid and then cmdline parser misses to validate mode's dimensions, happily adding 0x0 mode as a valid mode. One case where this happens is NVIDIA Tegra devices that are using downstream bootloader which adds "video=tegrafb" to the kernel's cmdline and thus upstream Tegra DRM driver fails to probe because of the invalid mode. Fixes: 3aeeb13d8996 ("drm/modes: Support modes names on the command line") Reviewed-by: Ville Syrjälä Signed-off-by: Dmitry Osipenko Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20190709145151.23086-1-digetx@gmail.com drivers/gpu/drm/drm_client_modeset.c | 3 ++- drivers/gpu/drm/drm_modes.c | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) commit 73948ca0571325aafd925497c1c37f6b09ed1724 Author: Hariprasad Kelam Date: Wed Jul 10 08:09:46 2019 +0530 ALSA: ps3: Remove Unneeded variable: "ret" This patch fixes below issue reported by coccicheck sound/ppc/snd_ps3.c:631:5-8: Unneeded variable: "ret". Return "0" on line 668 Signed-off-by: Hariprasad Kelam Signed-off-by: Takashi Iwai sound/ppc/snd_ps3.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7a3c2b69386102de9e78fa9ea679898f5502f77d Author: Hariprasad Kelam Date: Wed Jul 10 08:00:59 2019 +0530 ALSA: lx6464es: Remove unneeded variable err This patch fixes below issue reported by coccicheck sound/pci/lx6464es/lx6464es.c:256:5-8: Unneeded variable: "err". Return "0" on line 258 Signed-off-by: Hariprasad Kelam Signed-off-by: Takashi Iwai sound/pci/lx6464es/lx6464es.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 6cf7fb5a95dec9743f4bfd96f9ece580a355cdd1 Author: Rafael J. Wysocki Date: Wed Jul 10 11:52:50 2019 +0200 Revert "ACPICA: Update table load object initialization" Revert commit c522ad0637ca ("ACPICA: Update table load object initialization") as it causes systems to hang on attempts to load OEM ACPI tables. Reported-by: Thomas Gleixner Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/exconfig.c | 16 ++++++++++------ drivers/acpi/acpica/tbxfload.c | 10 +++++++--- 2 files changed, 17 insertions(+), 9 deletions(-) commit 4c105769bf6de29856bf80a4045e6725301c58ce Author: Andrew Jeffery Date: Wed Jul 10 12:52:16 2019 +0930 pinctrl: aspeed: Strip moved macros and structs from private header Further cleanup from the SPDX fixup fallout for the recent ASPEED series. aspeed_g4_defconfig, aspeed_g5_defconfig and multi_v5_defconfig now compile. Smoke tested the g4 and g5 kernels under QEMU's palmetto-bmc and romulus-bmc machines respectively. Fixes: 35d8510ea3ad ("pinctrl: aspeed: Fix missed include") Signed-off-by: Andrew Jeffery Link: https://lore.kernel.org/r/20190710032216.4088-1-andrew@aj.id.au Signed-off-by: Linus Walleij drivers/pinctrl/aspeed/pinctrl-aspeed.h | 498 -------------------------------- 1 file changed, 498 deletions(-) commit a1cd6c8b8f03930faf110234fa8366c4ff25085d Author: Linus Walleij Date: Tue Jul 9 13:41:53 2019 +0200 pinctrl: aspeed: Fix missed include Some SPDX churn made my fixes drop an important include from the Aspeed pinctrl header. Fix it up. Cc: Andrew Jeffery Reported-by: Andrew Jeffery Signed-off-by: Linus Walleij drivers/pinctrl/aspeed/pinctrl-aspeed.h | 2 ++ 1 file changed, 2 insertions(+) commit 9bdd7bb3a8447fe841cd37ddd9e0a6974b06a0bb Author: Joe Perches Date: Tue Jul 9 22:04:15 2019 -0700 clocksource/drivers/npcm: Fix misuse of GENMASK macro Arguments are supposed to be ordered high then low. Signed-off-by: Joe Perches Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/d6a9d49c9837d38816b71d783f5aed7235e8ca94.1562734889.git.joe@perches.com drivers/clocksource/timer-npcm7xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 20faba848752901de23a4d45a1174d64d2069dde Author: Joe Perches Date: Tue Jul 9 22:04:18 2019 -0700 irqchip/gic-v3-its: Fix misuse of GENMASK macro Arguments are supposed to be ordered high then low. Signed-off-by: Joe Perches Signed-off-by: Thomas Gleixner Acked-by: Marc Zyngier Link: https://lkml.kernel.org/r/ab5deb4fc3cd604cb620054770b7d00016d736bc.1562734889.git.joe@perches.com drivers/irqchip/irq-gic-v3-its.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fa33cdbf3eceb0206a4f844fe91aeebcf6ff2b7a Author: Steven J. Magnani Date: Sun Jun 30 21:39:35 2019 -0500 udf: Fix incorrect final NOT_ALLOCATED (hole) extent length In some cases, using the 'truncate' command to extend a UDF file results in a mismatch between the length of the file's extents (specifically, due to incorrect length of the final NOT_ALLOCATED extent) and the information (file) length. The discrepancy can prevent other operating systems (i.e., Windows 10) from opening the file. Two particular errors have been observed when extending a file: 1. The final extent is larger than it should be, having been rounded up to a multiple of the block size. B. The final extent is not shorter than it should be, due to not having been updated when the file's information length was increased. [JK: simplified udf_do_extend_final_block(), fixed up some types] Fixes: 2c948b3f86e5 ("udf: Avoid IO in udf_clear_inode") CC: stable@vger.kernel.org Signed-off-by: Steven J. Magnani Link: https://lore.kernel.org/r/1561948775-5878-1-git-send-email-steve@digidescorp.com Signed-off-by: Jan Kara fs/udf/inode.c | 93 +++++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 60 insertions(+), 33 deletions(-) commit dc205a8d34228809dedab94a85a866cbb255248f Author: Santosh Shilimkar Date: Fri Jun 28 15:38:58 2019 -0700 rds: avoid version downgrade to legitimate newer peer connections Connections with legitimate tos values can get into usual connection race. It can result in consumer reject. We don't want tos value or protocol version to be demoted for such connections otherwise piers would end up different tos values which can results in no connection. Example a peer initiated connection with say tos 8 while usual connection racing can get downgraded to tos 0 which is not desirable. Patch fixes above issue introduced by commit commit d021fabf525f ("rds: rdma: add consumer reject") Reported-by: Yanjun Zhu Tested-by: Yanjun Zhu Signed-off-by: Santosh Shilimkar net/rds/rdma_transport.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit fc640d4cbe268479ba448542e2b17045c908b2b3 Author: Gerd Rausch Date: Fri Jun 28 17:41:16 2019 -0700 rds: Return proper "tos" value to user-space The proper "tos" value needs to be returned to user-space (sockopt RDS_INFO_CONNECTIONS). Fixes: 3eb450367d08 ("rds: add type of service(tos) infrastructure") Signed-off-by: Gerd Rausch Reviewed-by: Zhu Yanjun Signed-off-by: Santosh Shilimkar net/rds/connection.c | 1 + 1 file changed, 1 insertion(+) commit 8c6166cfc9cd48e93d9176561e50b63cef4330d5 Author: Gerd Rausch Date: Thu Jun 27 09:21:44 2019 -0700 rds: Accept peer connection reject messages due to incompatible version Prior to commit d021fabf525ff ("rds: rdma: add consumer reject") function "rds_rdma_cm_event_handler_cmn" would always honor a rejected connection attempt by issuing a "rds_conn_drop". The commit mentioned above added a "break", eliminating the "fallthrough" case and made the "rds_conn_drop" rather conditional: Now it only happens if a "consumer defined" reject (i.e. "rdma_reject") carries an integer-value of "1" inside "private_data": if (!conn) break; err = (int *)rdma_consumer_reject_data(cm_id, event, &len); if (!err || (err && ((*err) == RDS_RDMA_REJ_INCOMPAT))) { pr_warn("RDS/RDMA: conn <%pI6c, %pI6c> rejected, dropping connection\n", &conn->c_laddr, &conn->c_faddr); conn->c_proposed_version = RDS_PROTOCOL_COMPAT_VERSION; rds_conn_drop(conn); } rdsdebug("Connection rejected: %s\n", rdma_reject_msg(cm_id, event->status)); break; /* FALLTHROUGH */ A number of issues are worth mentioning here: #1) Previous versions of the RDS code simply rejected a connection by calling "rdma_reject(cm_id, NULL, 0);" So the value of the payload in "private_data" will not be "1", but "0". #2) Now the code has become dependent on host byte order and sizing. If one peer is big-endian, the other is little-endian, or there's a difference in sizeof(int) (e.g. ILP64 vs LP64), the *err check does not work as intended. #3) There is no check for "len" to see if the data behind *err is even valid. Luckily, it appears that the "rdma_reject(cm_id, NULL, 0)" will always carry 148 bytes of zeroized payload. But that should probably not be relied upon here. #4) With the added "break;", we might as well drop the misleading "/* FALLTHROUGH */" comment. This commit does _not_ address issue #2, as the sender would have to agree on a byte order as well. Here is the sequence of messages in this observed error-scenario: Host-A is pre-QoS changes (excluding the commit mentioned above) Host-B is post-QoS changes (including the commit mentioned above) #1 Host-B issues a connection request via function "rds_conn_path_transition" connection state transitions to "RDS_CONN_CONNECTING" #2 Host-A rejects the incompatible connection request (from #1) It does so by calling "rdma_reject(cm_id, NULL, 0);" #3 Host-B receives an "RDMA_CM_EVENT_REJECTED" event (from #2) But since the code is changed in the way described above, it won't drop the connection here, simply because "*err == 0". #4 Host-A issues a connection request #5 Host-B receives an "RDMA_CM_EVENT_CONNECT_REQUEST" event and ends up calling "rds_ib_cm_handle_connect". But since the state is already in "RDS_CONN_CONNECTING" (as of #1) it will end up issuing a "rdma_reject" without dropping the connection: if (rds_conn_state(conn) == RDS_CONN_CONNECTING) { /* Wait and see - our connect may still be succeeding */ rds_ib_stats_inc(s_ib_connect_raced); } goto out; #6 Host-A receives an "RDMA_CM_EVENT_REJECTED" event (from #5), drops the connection and tries again (goto #4) until it gives up. Tested-by: Zhu Yanjun Signed-off-by: Gerd Rausch Signed-off-by: Santosh Shilimkar net/rds/rdma_transport.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit a55207884708bf1d5b8c87a3c504502de77a5416 Author: Gerd Rausch Date: Fri Jun 28 17:31:19 2019 -0700 Revert "RDS: IB: split the mr registration and invalidation path" This reverts commit 56012459310a1dbcc55c2dbf5500a9f7571402cb. RDS kept spinning inside function "rds_ib_post_reg_frmr", waiting for "i_fastreg_wrs" to become incremented: while (atomic_dec_return(&ibmr->ic->i_fastreg_wrs) <= 0) { atomic_inc(&ibmr->ic->i_fastreg_wrs); cpu_relax(); } Looking at the original commit: commit 56012459310a ("RDS: IB: split the mr registration and invalidation path") In there, the "rds_ib_mr_cqe_handler" was changed in the following way: void rds_ib_mr_cqe_handler(struct rds_ib_connection *ic, struct ib_wc *wc) if (frmr->fr_inv) { frmr->fr_state = FRMR_IS_FREE; frmr->fr_inv = false; atomic_inc(&ic->i_fastreg_wrs); } else { atomic_inc(&ic->i_fastunreg_wrs); } It looks like it's got it exactly backwards: Function "rds_ib_post_reg_frmr" keeps track of the outstanding requests via "i_fastreg_wrs". Function "rds_ib_post_inv" keeps track of the outstanding requests via "i_fastunreg_wrs" (post original commit). It also sets: frmr->fr_inv = true; However the completion handler "rds_ib_mr_cqe_handler" adjusts "i_fastreg_wrs" when "fr_inv" had been true, and adjusts "i_fastunreg_wrs" otherwise. The original commit was done in the name of performance: to remove the performance bottleneck No performance benefit could be observed with a fixed-up version of the original commit measured between two Oracle X7 servers, both equipped with Mellanox Connect-X5 HCAs. The prudent course of action is to revert this commit. Signed-off-by: Gerd Rausch Signed-off-by: Santosh Shilimkar net/rds/ib.h | 4 +--- net/rds/ib_cm.c | 9 ++------- net/rds/ib_frmr.c | 11 +++++------ 3 files changed, 8 insertions(+), 16 deletions(-) commit 616d37a070bb33ea387d0e93343acd8336a30886 Author: Santosh Shilimkar Date: Tue Jun 18 22:12:05 2019 -0700 rds: fix reordering with composite message notification RDS composite message(rdma + control) user notification needs to be triggered once the full message is delivered and such a fix was added as part of commit 941f8d55f6d61 ("RDS: RDMA: Fix the composite message user notification"). But rds_send_remove_from_sock is missing data part notify check and hence at times the user don't get notification which isn't desirable. One way is to fix the rds_send_remove_from_sock to check of that case but considering the ordering complexity with completion handler and rdma + control messages are always dispatched back to back in same send context, just delaying the signaled completion on rmda work request also gets the desired behaviour. i.e Notifying application only after RDMA + control message send completes. So patch updates the earlier fix with this approach. The delay signaling completions of rdma op till the control message send completes fix was done by Venkat Venkatsubra in downstream kernel. Reviewed-and-tested-by: Zhu Yanjun Reviewed-by: Gerd Rausch Signed-off-by: Santosh Shilimkar net/rds/ib_send.c | 29 +++++++++++++---------------- net/rds/rdma.c | 10 ---------- net/rds/rds.h | 1 - net/rds/send.c | 4 +--- 4 files changed, 14 insertions(+), 30 deletions(-) commit 1ff2f0fa450ea4e4f87793d9ed513098ec6e12be Author: Nathan Chancellor Date: Mon Jul 8 16:11:55 2019 -0700 net/mlx5e: Return in default case statement in tx_post_resync_params clang warns: drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c:251:2: warning: variable 'rec_seq_sz' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized] default: ^~~~~~~ drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c:255:46: note: uninitialized use occurs here skip_static_post = !memcmp(rec_seq, &rn_be, rec_seq_sz); ^~~~~~~~~~ drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c:239:16: note: initialize the variable 'rec_seq_sz' to silence this warning u16 rec_seq_sz; ^ = 0 1 warning generated. This case statement was clearly designed to be one that should not be hit during runtime because of the WARN_ON statement so just return early to prevent copying uninitialized memory up into rn_be. Fixes: d2ead1f360e8 ("net/mlx5e: Add kTLS TX HW offload support") Link: https://github.com/ClangBuiltLinux/linux/issues/590 Signed-off-by: Nathan Chancellor Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c | 1 + 1 file changed, 1 insertion(+) commit cacf32e99788e91a3eaefafb0976deadf84f37d5 Author: David S. Miller Date: Tue Jul 9 21:35:08 2019 -0700 mlx5: Return -EINVAL when WARN_ON_ONCE triggers in mlx5e_tls_resync(). Return value was changes to 'int' from void but this return statement was not updated, or it slipped in via a merge. Fixes: b5d9a834f4fd ("net/tls: don't clear TX resync flag on error") Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 73a2b047c81046a7f734a5759ab5fdedbb6968fd Author: Alastair D'Silva Date: Wed Jun 5 13:15:45 2019 +0200 ocxl: Update for AFU descriptor template version 1.1 The OpenCAPI discovery and configuration specification has been updated and introduces version 1.1 of the AFU descriptor template, with new fields to better define the memory layout of an OpenCAPI adapter. The ocxl driver doesn't do much yet to support LPC memory but as we start seeing (non-LPC) AFU images using the new template, this patch updates the config space parsing code to avoid spitting a warning. Signed-off-by: Alastair D'Silva Signed-off-by: Frederic Barrat Reviewed-by: Christophe Lombard Acked-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190605111545.19762-1-fbarrat@linux.ibm.com drivers/misc/ocxl/config.c | 181 ++++++++++++++++++++++++++++++++++++++++----- include/misc/ocxl.h | 5 +- 2 files changed, 165 insertions(+), 21 deletions(-) commit 4ba7f80f42563903b0e26d30175808db7d07e664 Author: Masahiro Yamada Date: Fri Jul 5 19:01:44 2019 +0900 powerpc/boot: pass CONFIG options in a simpler and more robust way Commit 5e9dcb6188a4 ("powerpc/boot: Expose Kconfig symbols to wrapper") was wrong, but commit e41b93a6be57 ("powerpc/boot: Fix build failures with -j 1") was also wrong. The correct dependency is: $(obj)/serial.o: $(obj)/autoconf.h However, I do not see the reason why we need to copy autoconf.h to arch/power/boot/. Nor do I see consistency in the way of passing CONFIG options. decompress.c references CONFIG_KERNEL_GZIP and CONFIG_KERNEL_XZ, which are passed via the command line. serial.c includes autoconf.h to reference a couple of CONFIG options, but this is fragile because we often forget to include "autoconf.h" from source files. In fact, it is already broken. ppc_asm.h references CONFIG_PPC_8xx, but utils.S is not given any way to access CONFIG options. So, CONFIG_PPC_8xx is never defined here. Pass $(LINUXINCLUDE) to make sure CONFIG options are accessible from all .c and .S files in arch/powerpc/boot/. I also removed the -traditional flag to make include/linux/kconfig.h work. This flag makes the preprocessor imitate the behavior of the pre-standard C compiler, but I do not understand why it is necessary. Signed-off-by: Masahiro Yamada Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190705100144.28785-2-yamada.masahiro@socionext.com arch/powerpc/boot/.gitignore | 2 -- arch/powerpc/boot/Makefile | 16 +++------------- arch/powerpc/boot/serial.c | 1 - 3 files changed, 3 insertions(+), 16 deletions(-) commit 9e005b761e7ad153dcf40a6cba1d681fe0830ac6 Author: Masahiro Yamada Date: Fri Jul 5 19:01:43 2019 +0900 powerpc/boot: add {get, put}_unaligned_be32 to xz_config.h The next commit will make the way of passing CONFIG options more robust. Unfortunately, it would uncover another hidden issue; without this commit, skiroot_defconfig would be broken like this: | WRAP arch/powerpc/boot/zImage.pseries | arch/powerpc/boot/wrapper.a(decompress.o): In function `bcj_powerpc.isra.10': | decompress.c:(.text+0x720): undefined reference to `get_unaligned_be32' | decompress.c:(.text+0x7a8): undefined reference to `put_unaligned_be32' | make[1]: *** [arch/powerpc/boot/Makefile;383: arch/powerpc/boot/zImage.pseries] Error 1 | make: *** [arch/powerpc/Makefile;295: zImage] Error 2 skiroot_defconfig is the only defconfig that enables CONFIG_KERNEL_XZ for ppc, which has never been correctly built before. I figured out the root cause in lib/decompress_unxz.c: | #ifdef CONFIG_PPC | # define XZ_DEC_POWERPC | #endif CONFIG_PPC is undefined here in the ppc bootwrapper because autoconf.h is not included except by arch/powerpc/boot/serial.c XZ_DEC_POWERPC is not defined, therefore, bcj_powerpc() is not compiled for the bootwrapper. With the next commit passing CONFIG_PPC correctly, we would realize that {get,put}_unaligned_be32 was missing. Unlike the other decompressors, the ppc bootwrapper duplicates all the necessary helpers in arch/powerpc/boot/. The other architectures define __KERNEL__ and pull in helpers for building the decompressors. If ppc bootwrapper had defined __KERNEL__, lib/xz/xz_private.h would have included : | #ifdef __KERNEL__ | # include | # include | # include However, doing so would cause tons of definition conflicts since the bootwrapper has duplicated everything. I just added copies of {get,put}_unaligned_be32, following the bootwrapper coding convention. Signed-off-by: Masahiro Yamada Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190705100144.28785-1-yamada.masahiro@socionext.com arch/powerpc/boot/xz_config.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 0fc12c022ad25532b66bf6f6c818ee1c1d63e702 Author: Michael Ellerman Date: Mon Jul 8 16:02:19 2019 +1000 powerpc/irq: Don't WARN continuously in arch_local_irq_restore() When CONFIG_PPC_IRQ_SOFT_MASK_DEBUG is enabled (uncommon), we have a series of WARN_ON's in arch_local_irq_restore(). These are "should never happen" conditions, but if they do happen they can flood the console and render the system unusable. So switch them to WARN_ON_ONCE(). Fixes: e2b36d591720 ("powerpc/64: Don't trace code that runs with the soft irq mask unreconciled") Fixes: 9b81c0211c24 ("powerpc/64s: make PACA_IRQ_HARD_DIS track MSR[EE] closely") Fixes: 7c0482e3d055 ("powerpc/irq: Fix another case of lazy IRQ state getting out of sync") Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190708061046.7075-1-mpe@ellerman.id.au arch/powerpc/kernel/irq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 86766756ac2b10ad23849becdc245ea903466616 Merge: 74acee309fb2 88bb346dd63b Author: Jiri Kosina Date: Wed Jul 10 01:40:23 2019 +0200 Merge branch 'for-5.3/uclogic' into for-linus commit 74acee309fb2a434dce215d44014e6f8e06975ae Merge: 4c12954965fd cca478617465 eca0f0a6c3fb dbcbabf7da92 6e2abc68585b Author: Jiri Kosina Date: Wed Jul 10 01:39:57 2019 +0200 Merge branches 'for-5.2/fixes', 'for-5.3/doc', 'for-5.3/ish', 'for-5.3/logitech' and 'for-5.3/wacom' into for-linus commit b78fa45d4edb92fd7b882b2ec25b936cad412670 Author: YueHaibing Date: Mon Jul 8 20:54:08 2019 +0800 nfsd: Make __get_nfsdfs_client() static Fix sparse warning: fs/nfsd/nfsctl.c:1221:22: warning: symbol '__get_nfsdfs_client' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: J. Bruce Fields fs/nfsd/nfsctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 297e57a24f6e2d5a041822003816124e48164eef Author: YueHaibing Date: Mon Jul 8 15:29:33 2019 +0800 nfsd: Make two functions static Fix sparse warnings: fs/nfsd/nfs4state.c:1908:6: warning: symbol 'drop_client' was not declared. Should it be static? fs/nfsd/nfs4state.c:2518:6: warning: symbol 'force_expire_client' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: J. Bruce Fields fs/nfsd/nfs4state.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 38195dd5e916f3e55aec585703f2432562c2db02 Merge: aec71d794731 ac59a471e937 Author: Jiri Kosina Date: Wed Jul 10 01:20:26 2019 +0200 Merge branch 'for-5.3/core' into for-linus commit f59d261180f3b66367962f1974090815ce710056 Author: Icenowy Zheng Date: Sun Jun 23 12:37:59 2019 +0800 dt-bindings: vendor-prefixes: add Sipeed Shenzhen Sipeed Technology Co., Ltd. is a company focused on development kits, which also contains rebranded Lichee Pi series. Add its vendor prefix binding. Signed-off-by: Icenowy Zheng Signed-off-by: Rob Herring Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 09d9ea4014d1c7715c072403a9e2d4e97f6084ec Author: Icenowy Zheng Date: Sun Jun 23 12:37:57 2019 +0800 dt-bindings: vendor-prefixes: add SoChip Shenzhen SoChip Technology Co., Ltd. is a hardware vendor that produces EVBs with Allwinner chips. There's also a SoC named S3 that is developed by Allwinner (based on Allwinner V3/V3s) but branded SoChip. Add the vendor prefix for SoChip. Signed-off-by: Icenowy Zheng Reviewed-by: Rob Herring Signed-off-by: Rob Herring Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) commit f15d6358425af7976e146a07a47b75e4fe8ccd41 Author: Kefeng Wang Date: Sat Jun 22 11:45:57 2019 +0800 dt-bindings: 83xx-512x-pci: Drop cell-index property 28eac2b74cc7 ("powerpc/fsl: Remove cell-index from PCI nodes"), and for now it is still not used, drop it from doc. Cc: Kumar Gala Signed-off-by: Kefeng Wang Signed-off-by: Rob Herring Documentation/devicetree/bindings/pci/83xx-512x-pci.txt | 1 - 1 file changed, 1 deletion(-) commit 32eaeae0ef193b64a67177006bdf5d9130d83fd3 Author: Alex Deucher Date: Mon Jul 8 13:33:22 2019 -0500 drm/amdgpu/psp: add a mutex to protect access to the psp ring We need to serialize access to the psp ring if there are multiple callers at runtime. Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 16 ++++++++++++++-- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 1 + 3 files changed, 16 insertions(+), 2 deletions(-) commit 7f963d9f69bf28d639013630da30d7a4c95edd5d Author: Alex Deucher Date: Wed Jul 3 21:39:10 2019 -0500 drm/amdgpu/navi10: add uclk activity sensor Query the metrics table for the current uclk activity. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit f54eeab4e7e066c6fd2f409f599f043c4ef98a6e Author: Alex Deucher Date: Mon Jul 8 13:44:59 2019 -0500 drm/amdgpu: properly guard the generic discovery code It's only available on navi and newer. Reviewed-by: Xiaojie Yuan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 405627871480a086fd81af189d48ae47d0639fe7 Author: Alex Deucher Date: Wed Jul 3 08:50:12 2019 -0500 drm/amdgpu: add missing documentation on new module parameters New parameters added for navi lack documentation. Reviewed-by: Xiaojie Yuan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 83145f110eb2ada9d54fcbcf416c02de126381c1 Author: Marek Olšák Date: Fri Jun 28 18:31:26 2019 -0400 drm/amdgpu: don't invalidate caches in RELEASE_MEM, only do the writeback This RELEASE_MEM use has the Release semantic, which means we should write back but not invalidate. Invalidations only make sense with the Acquire semantic (ACQUIRE_MEM), or when RELEASE_MEM is used to do the combined Acquire-Release semantic, which is a barrier, not a fence. The undesirable side effect of doing invalidations for the Release semantic is that it invalidates caches while shaders are running, because the Release can execute in the middle of the next IB. UMDs should use ACQUIRE_MEM at the beginning of IBs. Doing cache invalidations for a fence (like in this case) doesn't do anything for correctness. Signed-off-by: Marek Olšák Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 61daf52c4ddd433924687850fa04ed85c0d806dd Author: Geert Uytterhoeven Date: Mon Jun 17 16:36:12 2019 +0200 sparc64: Add missing newline at end of file "git diff" says: \ No newline at end of file after modifying the file. Signed-off-by: Geert Uytterhoeven Signed-off-by: David S. Miller arch/sparc/lib/NG4clear_page.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 13990cf8a180cc070f0b1266140e799db8754289 Author: Amol Surati Date: Sun Jul 7 14:27:29 2019 +0530 ide: use BIT() macro for defining bit-flags The BIT() macro is available for defining the required bit-flags. Since it operates on an unsigned value and expands to an unsigned result, using it, instead of an expression like (1 << x), also fixes the problem of shifting a signed 32-bit value by 31 bits (e.g. 1 << 31). Signed-off-by: Amol Surati Signed-off-by: David S. Miller include/linux/ide.h | 272 ++++++++++++++++++++++++++-------------------------- 1 file changed, 136 insertions(+), 136 deletions(-) commit 08cc83cc7fd8e6c3670ff545ef2bbfbc01a02d87 Author: Vivien Didelot Date: Mon Jul 8 23:31:13 2019 -0400 net: dsa: add support for BRIDGE_MROUTER attribute This patch adds support for enabling or disabling the flooding of unknown multicast traffic on the CPU ports, depending on the value of the switchdev SWITCHDEV_ATTR_ID_BRIDGE_MROUTER attribute. The current behavior is kept unchanged but a user can now prevent the CPU conduit to be flooded with a lot of unregistered traffic that the network stack needs to filter in software with e.g.: echo 0 > /sys/class/net/br0/multicast_router Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller net/dsa/dsa_priv.h | 2 ++ net/dsa/port.c | 12 ++++++++++++ net/dsa/slave.c | 3 +++ 3 files changed, 17 insertions(+) commit fbc697796e358d1ed8ed25758b19bdb3a1f8e9f9 Author: David Ahern Date: Tue Jul 9 14:45:17 2019 -0700 pkt_sched: Include const.h Commit 9903c8dc7342 changed TC_ETF defines to use _BITUL instead of BIT but did not add the dependecy on linux/const.h. As a consequence, importing the uapi headers into iproute2 causes builds to fail. Add the dependency. Fixes: 9903c8dc7342 ("etf: Don't use BIT() in UAPI headers.") Cc: Vedang Patel Signed-off-by: David Ahern Signed-off-by: David S. Miller include/uapi/linux/pkt_sched.h | 1 + 1 file changed, 1 insertion(+) commit a22502a37599f813686e443ccfc21c9ea8167c41 Author: Ilias Apalodimas Date: Wed Jul 10 00:14:49 2019 +0300 net: netsec: remove static declaration for netsec_set_tx_de() On commit ba2b232108d3 ("net: netsec: add XDP support") a static declaration for netsec_set_tx_de() was added to make the diff easier to read. Now that the patch is merged let's move the functions around and get rid of that Signed-off-by: Ilias Apalodimas Signed-off-by: David S. Miller drivers/net/ethernet/socionext/netsec.c | 86 ++++++++++++++++----------------- 1 file changed, 41 insertions(+), 45 deletions(-) commit 4831539dce552b7d47a7a3f3cbc440669a3917e2 Author: Ilias Apalodimas Date: Wed Jul 10 00:14:48 2019 +0300 net: netsec: remove superfluous if statement While freeing tx buffers the memory has to be unmapped if the packet was an skb or was used for .ndo_xdp_xmit using the same arguments. Get rid of the unneeded extra 'else if' statement Signed-off-by: Ilias Apalodimas Signed-off-by: David S. Miller drivers/net/ethernet/socionext/netsec.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c099a408949c443cc7c83679af314ebfc805cd1f Merge: 2bb295f3a5e6 c9626a2cbdb2 Author: David S. Miller Date: Tue Jul 9 14:38:51 2019 -0700 Merge branch 'nf-hw-offload' Pablo Neira Ayuso says: ==================== netfilter: add hardware offload infrastructure This patchset adds support for Netfilter hardware offloads. This patchset reuses the existing block infrastructure, the netdev_ops->ndo_setup_tc() interface, TC_SETUP_CLSFLOWER classifier and the flow rule API. Patch #1 adds flow_block_cb_setup_simple(), most drivers do the same thing to set up flow blocks, to reduce the number of changes, consolidate codebase. Use _simple() postfix as requested by Jakub Kicinski. This new function resides in net/core/flow_offload.c Patch #2 renames TC_BLOCK_{UN}BIND to FLOW_BLOCK_{UN}BIND. Patch #3 renames TCF_BLOCK_BINDER_TYPE_* to FLOW_BLOCK_BINDER_TYPE_*. Patch #4 adds flow_block_cb_alloc() and flow_block_cb_free() helper functions, this is the first patch of the flow block API. Patch #5 adds the helper to deal with list operations in the flow block API. This includes flow_block_cb_lookup(), flow_block_cb_add() and flow_block_cb_remove(). Patch #6 adds flow_block_cb_priv(), flow_block_cb_incref() and flow_block_cb_decref() which completes the flow block API. Patch #7 updates the cls_api to use the flow block API from the new tcf_block_setup(). This infrastructure transports these objects via list (through the tc_block_offload object) back to the core for registration. CLS_API DRIVER TC_SETUP_BLOCK ----------> setup flow_block_cb object & it adds object to flow_block_offload->cb_list | CLS_API <-----------------------' registers list with flow blocks flow_block_cb & travels back to calls ->reoffload the core for registration drivers allocate and sets up (configure the blocks), then registration happens from the core (cls_api and netfilter). Patch #8 updates drivers to use the flow block API. Patch #9 removes the tcf block callback API, which is replaced by the flow block API. Patch #10 adds the flow_block_cb_is_busy() helper to check if the block is already used by a subsystem. This helper is invoked from drivers. Once drivers are updated to support for multiple subsystems, they can remove this check. Patch #11 rename tc structure and definitions for the block bind/unbind path. Patch #12 introduces basic netfilter hardware offload infrastructure for the ingress chain. This includes 5-tuple exact matching and accept / drop rule actions. Only basechains are supported at this stage, no .reoffload callback is implemented either. Default policy to "accept" is only supported for now. table netdev filter { chain ingress { type filter hook ingress device eth0 priority 0; flags offload; ip daddr 192.168.0.10 tcp dport 22 drop } } This patchset reuses the existing tcf block callback API and it places it in the flow block callback API in net/core/flow_offload.c. This series aims to address Jakub and Jiri's feedback, please see specific patches in this batch for changelog in this v4. ==================== Signed-off-by: David S. Miller commit c9626a2cbdb20e26587b3fad99960520a023432b Author: Pablo Neira Ayuso Date: Tue Jul 9 23:00:43 2019 +0200 netfilter: nf_tables: add hardware offload support This patch adds hardware offload support for nftables through the existing netdev_ops->ndo_setup_tc() interface, the TC_SETUP_CLSFLOWER classifier and the flow rule API. This hardware offload support is available for the NFPROTO_NETDEV family and the ingress hook. Each nftables expression has a new ->offload interface, that is used to populate the flow rule object that is attached to the transaction object. There is a new per-table NFT_TABLE_F_HW flag, that is set on to offload an entire table, including all of its chains. This patch supports for basic metadata (layer 3 and 4 protocol numbers), 5-tuple payload matching and the accept/drop actions; this also includes basechain hardware offload only. Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller include/net/netfilter/nf_tables.h | 14 ++ include/net/netfilter/nf_tables_offload.h | 76 +++++++++ include/uapi/linux/netfilter/nf_tables.h | 2 + net/netfilter/Makefile | 2 +- net/netfilter/nf_tables_api.c | 39 ++++- net/netfilter/nf_tables_offload.c | 267 ++++++++++++++++++++++++++++++ net/netfilter/nft_cmp.c | 53 ++++++ net/netfilter/nft_immediate.c | 31 ++++ net/netfilter/nft_meta.c | 27 +++ net/netfilter/nft_payload.c | 187 +++++++++++++++++++++ 10 files changed, 691 insertions(+), 7 deletions(-) commit f9e30088d20016a224d8110d45356da253eaa26a Author: Pablo Neira Ayuso Date: Tue Jul 9 22:55:49 2019 +0200 net: flow_offload: rename tc_cls_flower_offload to flow_cls_offload And any other existing fields in this structure that refer to tc. Specifically: * tc_cls_flower_offload_flow_rule() to flow_cls_offload_flow_rule(). * TC_CLSFLOWER_* to FLOW_CLS_*. * tc_cls_common_offload to tc_cls_common_offload. Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | 18 ++++----- drivers/net/ethernet/broadcom/bnxt/bnxt_tc.h | 4 +- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 8 ++-- .../net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c | 22 +++++------ .../net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.h | 6 +-- drivers/net/ethernet/intel/i40e/i40e_main.c | 22 +++++------ drivers/net/ethernet/intel/iavf/iavf_main.c | 22 +++++------ drivers/net/ethernet/intel/igb/igb_main.c | 16 ++++---- .../net/ethernet/mellanox/mlx5/core/en/tc_tun.c | 6 +-- .../net/ethernet/mellanox/mlx5/core/en/tc_tun.h | 8 ++-- .../ethernet/mellanox/mlx5/core/en/tc_tun_geneve.c | 18 ++++----- .../ethernet/mellanox/mlx5/core/en/tc_tun_gre.c | 4 +- .../ethernet/mellanox/mlx5/core/en/tc_tun_vxlan.c | 10 ++--- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 8 ++-- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 16 ++++---- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 34 ++++++++--------- drivers/net/ethernet/mellanox/mlx5/core/en_tc.h | 6 +-- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 12 +++--- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 10 ++--- .../net/ethernet/mellanox/mlxsw/spectrum_flower.c | 34 ++++++++--------- drivers/net/ethernet/mscc/ocelot_flower.c | 22 +++++------ drivers/net/ethernet/netronome/nfp/flower/action.c | 14 +++---- drivers/net/ethernet/netronome/nfp/flower/main.h | 6 +-- drivers/net/ethernet/netronome/nfp/flower/match.c | 44 +++++++++++----------- .../net/ethernet/netronome/nfp/flower/metadata.c | 2 +- .../net/ethernet/netronome/nfp/flower/offload.c | 30 +++++++-------- drivers/net/ethernet/qlogic/qede/qede.h | 2 +- drivers/net/ethernet/qlogic/qede/qede_filter.c | 2 +- drivers/net/ethernet/qlogic/qede/qede_main.c | 8 ++-- include/net/flow_offload.h | 30 +++++++++++++++ include/net/pkt_cls.h | 40 +++----------------- net/sched/cls_flower.c | 24 ++++++------ 32 files changed, 254 insertions(+), 254 deletions(-) commit 0d4fd02e7199fbf57c0d175dd1890c82cd4a6f4f Author: Pablo Neira Ayuso Date: Tue Jul 9 22:55:48 2019 +0200 net: flow_offload: add flow_block_cb_is_busy() and use it This patch adds a function to check if flow block callback is already in use. Call this new function from flow_block_cb_setup_simple() and from drivers. Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 4 ++++ drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 4 ++++ drivers/net/ethernet/mscc/ocelot_tc.c | 3 +++ drivers/net/ethernet/netronome/nfp/flower/offload.c | 4 ++++ include/net/flow_offload.h | 3 +++ net/core/flow_offload.c | 18 ++++++++++++++++++ net/dsa/slave.c | 3 +++ 7 files changed, 39 insertions(+) commit 722d36e6e29e50c640c9f5ce186b8d8709cae1a6 Author: Pablo Neira Ayuso Date: Tue Jul 9 22:55:47 2019 +0200 net: sched: remove tcf block API Unused, now replaced by flow block API. Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller include/net/pkt_cls.h | 69 ------------------------------------ net/sched/cls_api.c | 98 --------------------------------------------------- 2 files changed, 167 deletions(-) commit 955bcb6ea0df0d9ace89ac475405f1295ced5962 Author: Pablo Neira Ayuso Date: Tue Jul 9 22:55:46 2019 +0200 drivers: net: use flow block API This patch updates flow_block_cb_setup_simple() to use the flow block API. Several drivers are also adjusted to use it. This patch introduces the per-driver list of flow blocks to account for blocks that are already in use. Remove tc_block_offload alias. Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 5 +- drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c | 5 +- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 5 +- drivers/net/ethernet/intel/i40e/i40e_main.c | 5 +- drivers/net/ethernet/intel/iavf/iavf_main.c | 5 +- drivers/net/ethernet/intel/igb/igb_main.c | 5 +- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 5 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 5 +- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 42 +++++++--- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 92 ++++++++++++++-------- drivers/net/ethernet/mscc/ocelot_ace.h | 4 +- drivers/net/ethernet/mscc/ocelot_flower.c | 46 ++++++----- drivers/net/ethernet/mscc/ocelot_tc.c | 34 +++++--- drivers/net/ethernet/netronome/nfp/abm/cls.c | 7 +- drivers/net/ethernet/netronome/nfp/abm/main.h | 2 +- drivers/net/ethernet/netronome/nfp/bpf/main.c | 5 +- .../net/ethernet/netronome/nfp/flower/offload.c | 68 +++++++++++----- drivers/net/ethernet/qlogic/qede/qede_main.c | 5 +- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 5 +- drivers/net/netdevsim/netdev.c | 5 +- include/net/flow_offload.h | 3 +- include/net/pkt_cls.h | 2 - net/core/flow_offload.c | 20 ++++- net/dsa/slave.c | 22 +++++- net/sched/cls_api.c | 14 ++-- 25 files changed, 286 insertions(+), 130 deletions(-) commit 59094b1e5094c7e50a3d2912202fd30b6a1dadf8 Author: Pablo Neira Ayuso Date: Tue Jul 9 22:55:45 2019 +0200 net: sched: use flow block API This patch adds tcf_block_setup() which uses the flow block API. This infrastructure takes the flow block callbacks coming from the driver and register/unregister to/from the cls_api core. Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller net/sched/cls_api.c | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 87 insertions(+), 1 deletion(-) commit 67bd0d5ea7974d9dc9c502c7b4096e16a80a553d Author: Pablo Neira Ayuso Date: Tue Jul 9 22:55:44 2019 +0200 net: flow_offload: add flow_block_cb_{priv, incref, decref}() This patch completes the flow block API to introduce: * flow_block_cb_priv() to access callback private data. * flow_block_cb_incref() to bump reference counter on this flow block. * flow_block_cb_decref() to decrement the reference counter. These functions are taken from the existing tcf_block_cb_priv(), tcf_block_cb_incref() and tcf_block_cb_decref(). Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller include/net/flow_offload.h | 4 ++++ net/core/flow_offload.c | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+) commit da3eeb904ff432ec22cf7b4db17a47647428873a Author: Pablo Neira Ayuso Date: Tue Jul 9 22:55:43 2019 +0200 net: flow_offload: add list handling functions This patch adds the list handling functions for the flow block API: * flow_block_cb_lookup() allows drivers to look up for existing flow blocks. * flow_block_cb_add() adds a flow block to the per driver list to be registered by the core. * flow_block_cb_remove() to remove a flow block from the list of existing flow blocks per driver and to request the core to unregister this. The flow block API also annotates the netns this flow block belongs to. Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller include/net/flow_offload.h | 19 +++++++++++++++++++ net/core/flow_offload.c | 17 +++++++++++++++++ net/sched/cls_api.c | 3 +++ 3 files changed, 39 insertions(+) commit d63db30c8537ba45208c156d71125db73d0fe522 Author: Pablo Neira Ayuso Date: Tue Jul 9 22:55:42 2019 +0200 net: flow_offload: add flow_block_cb_alloc() and flow_block_cb_free() Add a new helper function to allocate flow_block_cb objects. Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller include/net/flow_offload.h | 14 ++++++++++++++ net/core/flow_offload.c | 28 ++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) commit 32f8c4093ac353a5f1b36cfed0ce0138faf8e15f Author: Pablo Neira Ayuso Date: Tue Jul 9 22:55:41 2019 +0200 net: flow_offload: rename TCF_BLOCK_BINDER_TYPE_* to FLOW_BLOCK_BINDER_TYPE_* Rename from TCF_BLOCK_BINDER_TYPE_* to FLOW_BLOCK_BINDER_TYPE_* and remove temporary tcf_block_binder_type alias. Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 2 +- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 4 ++-- drivers/net/ethernet/mscc/ocelot_flower.c | 2 +- drivers/net/ethernet/mscc/ocelot_tc.c | 4 ++-- drivers/net/ethernet/netronome/nfp/flower/offload.c | 6 +++--- include/net/flow_offload.h | 6 +++--- include/net/pkt_cls.h | 3 +-- net/core/flow_offload.c | 2 +- net/dsa/slave.c | 4 ++-- net/sched/cls_api.c | 14 +++++++------- net/sched/sch_ingress.c | 6 +++--- 11 files changed, 26 insertions(+), 27 deletions(-) commit 9c0e189ec988f306331036bc3f71085582b24fdc Author: Pablo Neira Ayuso Date: Tue Jul 9 22:55:40 2019 +0200 net: flow_offload: rename TC_BLOCK_{UN}BIND to FLOW_BLOCK_{UN}BIND Rename from TC_BLOCK_{UN}BIND to FLOW_BLOCK_{UN}BIND and remove temporary tc_block_command alias. Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 4 ++-- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 4 ++-- drivers/net/ethernet/mscc/ocelot_tc.c | 4 ++-- .../net/ethernet/netronome/nfp/flower/offload.c | 8 ++++---- include/net/flow_offload.h | 4 ++-- include/net/pkt_cls.h | 1 - net/core/flow_offload.c | 4 ++-- net/dsa/slave.c | 4 ++-- net/sched/cls_api.c | 22 +++++++++++----------- 9 files changed, 27 insertions(+), 28 deletions(-) commit 4e95bc268b915c3a19ec8b9110f61e4ea41a1ed0 Author: Pablo Neira Ayuso Date: Tue Jul 9 22:55:39 2019 +0200 net: flow_offload: add flow_block_cb_setup_simple() Most drivers do the same thing to set up the flow block callbacks, this patch adds a helper function to do this. This preparation patch reduces the number of changes to adapt the existing drivers to use the flow block callback API. This new helper function takes a flow block list per-driver, which is set to NULL until this driver list is used. This patch also introduces the flow_block_command and flow_block_binder_type enumerations, which are renamed to use FLOW_BLOCK_* in follow up patches. There are three definitions (aliases) in order to reduce the number of updates in this patch, which go away once drivers are fully adapted to use this flow block API. Signed-off-by: Pablo Neira Ayuso Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 26 ++++------------- drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c | 28 ++++-------------- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 26 ++++------------- drivers/net/ethernet/intel/i40e/i40e_main.c | 26 ++++------------- drivers/net/ethernet/intel/iavf/iavf_main.c | 35 ++++------------------- drivers/net/ethernet/intel/igb/igb_main.c | 24 +++------------- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 27 ++++------------- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 27 ++++------------- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 26 ++++------------- drivers/net/ethernet/netronome/nfp/abm/cls.c | 17 ++--------- drivers/net/ethernet/netronome/nfp/bpf/main.c | 29 ++++--------------- drivers/net/ethernet/qlogic/qede/qede_main.c | 23 ++------------- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 22 ++------------ drivers/net/netdevsim/netdev.c | 26 ++++------------- include/net/flow_offload.h | 27 +++++++++++++++++ include/net/pkt_cls.h | 20 ++----------- net/core/flow_offload.c | 25 ++++++++++++++++ 17 files changed, 117 insertions(+), 317 deletions(-) commit 4c73cbdff1119d088ed16d63def59ad32b11b18f Author: James Smart Date: Fri Jun 28 17:26:08 2019 -0700 nvme-fc: fix module unloads while lports still pending Current code allows the module to be unloaded even if there are pending data structures, such as localports and controllers on the localports, that have yet to hit their reference counting to remove them. Fix by having exit entrypoint explicitly delete every controller, which in turn will remove references on the remoteports and localports causing them to be deleted as well. The exit entrypoint, after initiating the deletes, will wait for the last localport to be deleted before continuing. Signed-off-by: James Smart Signed-off-by: Christoph Hellwig drivers/nvme/host/fc.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 48 insertions(+), 3 deletions(-) commit 2bb295f3a5e612b36ccf5986b529a8d4b426cf4f Merge: 03a49a14a78d d413779cdd93 Author: David S. Miller Date: Tue Jul 9 14:29:27 2019 -0700 Merge branch 'net-hisilicon-Add-support-for-HI13X1-to-hip04_eth' Jiangfeng Xiao says: ==================== net: hisilicon: Add support for HI13X1 to hip04_eth The main purpose of this patch series is to extend the hip04_eth driver to support HI13X1_GMAC. The offset and bitmap of some registers of HI13X1_GMAC are different from hip04_eth common soc. In addition, the definition of send descriptor and parsing descriptor are different from hip04_eth common soc. So the macro of the register offset is redefined to adapt the HI13X1_GMAC. Clean up the sparse warning by the way. Change since v1: * Add a cover letter. ==================== Signed-off-by: David S. Miller commit d413779cdd934cc3bd281a90df865f5d9bd958a8 Author: Jiangfeng Xiao Date: Tue Jul 9 11:31:11 2019 +0800 net: hisilicon: Add an tx_desc to adapt HI13X1_GMAC HI13X1 changed the offsets and bitmaps for tx_desc registers in the same peripheral device on different models of the hip04_eth. Signed-off-by: Jiangfeng Xiao Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hip04_eth.c | 34 +++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) commit 58f34098cf37cbd88e83a4ad8461fad37212559a Author: Jiangfeng Xiao Date: Tue Jul 9 11:31:10 2019 +0800 net: hisilicon: Add an rx_desc to adapt HI13X1_GMAC HI13X1 changed the offsets and bitmaps for rx_desc registers in the same peripheral device on different models of the hip04_eth. Signed-off-by: Jiangfeng Xiao Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hip04_eth.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit b9162d20ed493bc0d5ea3016647d636628e1f9d5 Author: Jiangfeng Xiao Date: Tue Jul 9 11:31:09 2019 +0800 net: hisilicon: Offset buf address to adapt HI13X1_GMAC The buf unit size of HI13X1_GMAC is cache_line_size, which is 64, so the address we write to the buf register needs to be shifted right by 6 bits. The 31st bit of the PPE_CFG_CPU_ADD_ADDR register of HI13X1_GMAC indicates whether to release the buffer of the message, and the low indicates that it is valid. Signed-off-by: Jiangfeng Xiao Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hip04_eth.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) commit 06ddc0d8d7fc43d872c3d1c9399050e40ddbec4d Author: Jiangfeng Xiao Date: Tue Jul 9 11:31:08 2019 +0800 net: hisilicon: Add group field to adapt HI13X1_GMAC In general, group is the same as the port, but some boards specify a special group for better load balancing of each processing unit. Signed-off-by: Jiangfeng Xiao Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hip04_eth.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit bf96244074d9d0dc1b9ab0c9a6d95ae7b6ad628d Author: Jiangfeng Xiao Date: Tue Jul 9 11:31:07 2019 +0800 net: hisilicon: dt-bindings: Add an field of port-handle In general, group is the same as the port, but some boards specify a special group for better load balancing of each processing unit. Signed-off-by: Jiangfeng Xiao Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/hisilicon-hip04-net.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 24eca4b4c0052b5dda9cb8efc804b8c4c044cfd4 Author: Jiangfeng Xiao Date: Tue Jul 9 11:31:06 2019 +0800 net: hisilicon: HI13X1_GMAX need dreq reset at first HI13X1_GMAC delete request for soft reset at first, otherwise, the subsequent initialization will not take effect. Signed-off-by: Jiangfeng Xiao Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hip04_eth.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 0331f8550c504aea34c3ab9198f7324ee8b567b8 Author: Jiangfeng Xiao Date: Tue Jul 9 11:31:05 2019 +0800 net: hisilicon: HI13X1_GMAX skip write LOCAL_PAGE_REG HI13X1_GMAC changed the offsets and bitmaps for GE_TX_LOCAL_PAGE_REG registers in the same peripheral device on different models of the hip04_eth. With the default configuration, HI13X1_GMAC can also work without any writes to the GE_TX_LOCAL_PAGE_REG register. Signed-off-by: Jiangfeng Xiao Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hip04_eth.c | 2 ++ 1 file changed, 2 insertions(+) commit a8edf5257449468de328f4f5d9c03be65b9828c9 Author: Jiangfeng Xiao Date: Tue Jul 9 11:31:04 2019 +0800 net: hisilicon: Cleanup for cast to restricted __be32 This patch fixes the following warning from sparse: hip04_eth.c:533:23: warning: cast to restricted __be16 hip04_eth.c:533:23: warning: cast to restricted __be16 hip04_eth.c:533:23: warning: cast to restricted __be16 hip04_eth.c:533:23: warning: cast to restricted __be16 hip04_eth.c:534:23: warning: cast to restricted __be32 hip04_eth.c:534:23: warning: cast to restricted __be32 hip04_eth.c:534:23: warning: cast to restricted __be32 hip04_eth.c:534:23: warning: cast to restricted __be32 hip04_eth.c:534:23: warning: cast to restricted __be32 hip04_eth.c:534:23: warning: cast to restricted __be32 Signed-off-by: Jiangfeng Xiao Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hip04_eth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 148233ec83e42a8f5298bec43c15819db01076a7 Author: Jiangfeng Xiao Date: Tue Jul 9 11:31:03 2019 +0800 net: hisilicon: Cleanup for got restricted __be32 This patch fixes the following warning from sparse: hip04_eth.c:468:25: warning: incorrect type in assignment hip04_eth.c:468:25: expected unsigned int [usertype] send_addr hip04_eth.c:468:25: got restricted __be32 [usertype] hip04_eth.c:469:25: warning: incorrect type in assignment hip04_eth.c:469:25: expected unsigned int [usertype] send_size hip04_eth.c:469:25: got restricted __be32 [usertype] hip04_eth.c:470:19: warning: incorrect type in assignment hip04_eth.c:470:19: expected unsigned int [usertype] cfg hip04_eth.c:470:19: got restricted __be32 [usertype] hip04_eth.c:472:23: warning: incorrect type in assignment hip04_eth.c:472:23: expected unsigned int [usertype] wb_addr hip04_eth.c:472:23: got restricted __be32 [usertype] Signed-off-by: Jiangfeng Xiao Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hip04_eth.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 2ede8489c1a9a29f7849cd8810b533009b6fd198 Author: Jiangfeng Xiao Date: Tue Jul 9 11:31:02 2019 +0800 net: hisilicon: Add support for HI13X1 to hip04_eth Extend the hip04_eth driver to support HI13X1_GMAC. Enable it with CONFIG_HI13X1_GMAC option. Signed-off-by: Jiangfeng Xiao Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/Kconfig | 10 ++++++++ drivers/net/ethernet/hisilicon/hip04_eth.c | 37 ++++++++++++++++++++++++------ 2 files changed, 40 insertions(+), 7 deletions(-) commit 37c15219599f7a4baa73f6e3432afc69ba7cc530 Author: Mikhail Skorzhinskii Date: Mon Jul 8 12:31:29 2019 +0200 nvme-tcp: don't use sendpage for SLAB pages According to commit a10674bf2406 ("tcp: detecting the misuse of .sendpage for Slab objects") and previous discussion, tcp_sendpage should not be used for pages that is managed by SLAB, as SLAB is not taking page reference counters into consideration. Signed-off-by: Mikhail Skorzhinskii Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/tcp.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 958f2a0f8121ae36a5cbff383ab94fadf1fba5eb Author: Mikhail Skorzhinskii Date: Thu Jul 4 09:59:18 2019 +0200 nvme-tcp: set the STABLE_WRITES flag when data digests are enabled There was a few false alarms sighted on target side about wrong data digest while performing high throughput load to XFS filesystem shared through NVMoF TCP. This flag tells the rest of the kernel to ensure that the data buffer does not change while the write is in flight. It incurs a performance penalty, so only enable it when it is actually needed, i.e. when we are calculating data digests. Although even with this change in place, ext2 users can steel experience false positives, as ext2 is not respecting this flag. This may be apply to vfat as well. Signed-off-by: Mikhail Skorzhinskii Signed-off-by: Mike Playle Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 5 +++++ 1 file changed, 5 insertions(+) commit 5ba895033b8e8257451e6f85e6e516c3b3ce1a68 Author: Mikhail Skorzhinskii Date: Thu Jul 4 10:01:48 2019 +0200 nvmet: print a hint while rejecting NSID 0 or 0xffffffff Adding this hint for the sake of convenience. It was spotted that a few times people spent some time before understanding what is exactly wrong in configuration process. This should save a few time in such situations, especially for people who is not very confident with NVMe requirements. Signed-off-by: Mikhail Skorzhinskii Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/target/configfs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 04e70bd4a0264a3d488a9eff6e116d7dc9a77967 Author: Hannes Reinecke Date: Thu Jul 4 08:10:47 2019 +0200 nvme-multipath: do not select namespaces which are about to be removed nvme_ns_remove() will first set the NVME_NS_REMOVING flag before removing it from the list at the very last step. So to avoid selecting a namespace in nvme_find_path() which is about to be removed check the NVME_NS_REMOVING flag, too, when selecting a new path. Signed-off-by: Hannes Reinecke Signed-off-by: Christoph Hellwig drivers/nvme/host/multipath.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 03a49a14a78da6f782fa14c7149a32da0259cd1c Merge: 6ec3d4d2257e b8ef7020d6e5 Author: David S. Miller Date: Tue Jul 9 14:17:59 2019 -0700 Merge branch 'stmmac-hash-table' Biao Huang says: ==================== stmmac: fix out-of-boundary issue and add taller hash table support Fix mac address out-of-boundary issue in net-next tree. and resend the patch which was discussed in https://lore.kernel.org/patchwork/patch/1082117 but with no further progress. ==================== Signed-off-by: David S. Miller commit b8ef7020d6e552cfa5a29e7a411667f636d73185 Author: Biao Huang Date: Tue Jul 9 10:36:23 2019 +0800 net: stmmac: add support for hash table size 128/256 in dwmac4 1. get hash table size in hw feature reigster, and add support for taller hash table(128/256) in dwmac4. 2. only clear GMAC_PACKET_FILTER bits used in this function, to avoid side effect to functions of other bits. stmmac selftests output log with flow control on: ethtool -t eth0 The test result is PASS The test extra info: 1. MAC Loopback 0 2. PHY Loopback -95 3. MMC Counters 0 4. EEE -95 5. Hash Filter MC 0 6. Perfect Filter UC 0 7. MC Filter 0 8. UC Filter 0 9. Flow Control 0 Signed-off-by: Biao Huang Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/common.h | 7 ++-- drivers/net/ethernet/stmicro/stmmac/dwmac4.h | 4 +- drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 49 ++++++++++++++--------- drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c | 1 + drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 +++ 5 files changed, 42 insertions(+), 25 deletions(-) commit efd58adf8f1fc8e9bd2b822d23eb3b603f3aec90 Author: Biao Huang Date: Tue Jul 9 10:36:22 2019 +0800 net: stmmac: dwmac4: mac address array boudary violation issue The mac address array size is GMAC_MAX_PERFECT_ADDRESSES, so the 'reg' should be less than it, or will affect other registers. Signed-off-by: Biao Huang Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2032d074716a811440aa9cd2e971a0716646d6af Author: Hannes Reinecke Date: Thu Jul 4 08:10:46 2019 +0200 nvme-multipath: also check for a disabled path if there is a single sibling When we have a singular list in nvme_round_robin_path() we still need to check its validity. Signed-off-by: Hannes Reinecke Signed-off-by: Christoph Hellwig drivers/nvme/host/multipath.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit ca7ae5c966bd4c00626d6ba05d68219f3c1fba36 Author: Hannes Reinecke Date: Thu Jul 4 08:10:46 2019 +0200 nvme-multipath: factor out a nvme_path_is_disabled helper Factor our a common helper to check if a path has been disabled by something other than the per-namespace ANA state. Signed-off-by: Hannes Reinecke [hch: split from a bigger patch] Signed-off-by: Christoph Hellwig drivers/nvme/host/multipath.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 81adb863349157c67ccec871e5ae5574600c50be Author: Bart Van Assche Date: Fri Jun 28 09:53:31 2019 -0700 nvme: set physical block size and optimal I/O size >From the NVMe 1.4 spec: NSFEAT bit 4 if set to 1: indicates that the fields NPWG, NPWA, NPDG, NPDA, and NOWS are defined for this namespace and should be used by the host for I/O optimization; [ ... ] Namespace Preferred Write Granularity (NPWG): This field indicates the smallest recommended write granularity in logical blocks for this namespace. This is a 0's based value. The size indicated should be less than or equal to Maximum Data Transfer Size (MDTS) that is specified in units of minimum memory page size. The value of this field may change if the namespace is reformatted. The size should be a multiple of Namespace Preferred Write Alignment (NPWA). Refer to section 8.25 for how this field is utilized to improve performance and endurance. [ ... ] Each Write, Write Uncorrectable, or Write Zeroes commands should address a multiple of Namespace Preferred Write Granularity (NPWG) (refer to Figure 245) and Stream Write Size (SWS) (refer to Figure 515) logical blocks (as expressed in the NLB field), and the SLBA field of the command should be aligned to Namespace Preferred Write Alignment (NPWA) (refer to Figure 245) for best performance. Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 34 ++++++++++++++++++++++++++++++++-- drivers/nvme/host/nvme.h | 1 + 2 files changed, 33 insertions(+), 2 deletions(-) commit 6605bdd59c21bb34c8f14ac4d6f2d419185f3528 Author: Bart Van Assche Date: Fri Jun 28 09:53:29 2019 -0700 nvme: add I/O characteristics fields Several new fields have been introduced in version 1.4 of the NVMe spec at offsets that were defined as reserved in version 1.3d of the NVMe spec. Update the definition of the nvme_id_ns data structure such that it is in sync with version 1.4 of the NVMe spec. This change preserves backwards compatibility. Signed-off-by: Bart Van Assche Reviewed-by: Keith Busch Reviewed-by: Chaitanya Kulkarni Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig include/linux/nvme.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 9d05a96e298aadb36e3ec971fab8d416e6fb7331 Author: Bart Van Assche Date: Fri Jun 28 09:53:30 2019 -0700 nvmet: export I/O characteristics attributes in Identify Make the NVMe NAWUN, NAWUPF, NACWU, NPWG, NPWA, NPDG and NOWS attributes available to initator systems for the block backend. Signed-off-by: Bart Van Assche Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig drivers/nvme/target/admin-cmd.c | 3 +++ drivers/nvme/target/io-cmd-bdev.c | 39 +++++++++++++++++++++++++++++++++++++++ drivers/nvme/target/nvmet.h | 8 ++++++++ 3 files changed, 50 insertions(+) commit 4c0181bf6cc81716102308dc47779ad1f5aeded2 Author: Tom Wu Date: Thu Jul 4 10:19:54 2019 +0000 nvme-trace: add delete completion and submission queue to admin cmds tracer The trace log for 'delete I/O submission queue' and 'delete I/O completion queue' command will look like as below: kworker/u49:1-3438 [003] .... 6693.070865: nvme_setup_cmd: nvme0: qid=0, cmdid=11, nsid=0, flags=0x0, meta=0x0, cmd=(nvme_admin_delete_sq sqid=1) kworker/u49:1-3438 [003] .... 6693.071171: nvme_setup_cmd: nvme0: qid=0, cmdid=8, nsid=0, flags=0x0, meta=0x0, cmd=(nvme_admin_delete_cq cqid=24) Signed-off-by: Tom Wu Reviewed-by: Max Gurtovoy Reviewed-by: Minwoo Im Reviewed-by: Israel Rukshin Signed-off-by: Christoph Hellwig drivers/nvme/host/trace.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 6ec3d4d2257e4101a8bbd809158093ef9a759144 Merge: a1cd4e4324af 14e5175e9e04 Author: David S. Miller Date: Tue Jul 9 14:07:20 2019 -0700 Merge branch 'tc-testing-Add-plugin-for-simple-traffic-generation' Lucas Bates says: ==================== tc-testing: Add plugin for simple traffic generation This series supersedes the previous submission that included a patch for test case verification using JSON output. It adds a new tdc plugin, scapyPlugin, as a way to send traffic to test tc filters and actions. The first patch makes a change to the TdcPlugin module that will allow tdc plugins to examine the test case currently being executed, so plugins can play a more active role in testing by accepting information or commands from the test case. This is required for scapyPlugin to work. The second patch adds scapyPlugin itself, and an example test case file to demonstrate how the scapy block works in the test cases. ==================== Signed-off-by: David S. Miller commit 14e5175e9e04a982ef044a0dcdf1484643df1d3a Author: Lucas Bates Date: Mon Jul 8 21:34:27 2019 -0400 tc-testing: introduce scapyPlugin for basic traffic The scapyPlugin allows for simple traffic generation in tdc to test various tc features. It was tested with scapy v2.4.2, but should work with any successive version. In order to use the plugin's functionality, scapy must be installed. This can be done with: pip3 install scapy or to install 2.4.2: pip3 install scapy==2.4.2 If the plugin is unable to import the scapy module, it will terminate the tdc run. The plugin makes use of a new key in the test case data, 'scapy'. This block contains three other elements: 'iface', 'count', and 'packet': "scapy": { "iface": "$DEV0", "count": 1, "packet": "Ether(type=0x800)/IP(src='16.61.16.61')/ICMP()" }, * iface is the name of the device on the host machine from which the packet(s) will be sent. Values contained within tdc_config.py's NAMES dict can be used here - this is useful if paired with nsPlugin * count is the number of copies of this packet to be sent * packet is a string detailing the different layers of the packet to be sent. If a property isn't explicitly set, scapy will set default values for you. Layers in the packet info are separated by slashes. For info about common TCP and IP properties, see: https://blogs.sans.org/pen-testing/files/2016/04/ScapyCheatSheet_v0.2.pdf Caution is advised when running tests using the scapy functionality, since the plugin blindly sends the packet as defined in the test case data. See creating-testcases/scapy-example.json for sample test cases; the first test is intended to pass while the second is intended to fail. Signed-off-by: Lucas Bates Signed-off-by: David S. Miller .../creating-testcases/scapy-example.json | 98 ++++++++++++++++++++++ .../selftests/tc-testing/plugin-lib/scapyPlugin.py | 50 +++++++++++ 2 files changed, 148 insertions(+) commit a7d50a0dd81b09dc13fa9e4b55765e8684bc8226 Author: Lucas Bates Date: Mon Jul 8 21:34:26 2019 -0400 tc-testing: Allow tdc plugins to see test case data Instead of only passing the test case name and ID, pass the entire current test case down to the plugins. This change allows plugins to start accepting commands and directives from the test cases themselves, for greater flexibility in testing. Signed-off-by: Lucas Bates Signed-off-by: David S. Miller tools/testing/selftests/tc-testing/TdcPlugin.py | 5 ++--- tools/testing/selftests/tc-testing/tdc.py | 10 +++++----- 2 files changed, 7 insertions(+), 8 deletions(-) commit 91f6d7985310a5dc420066004142c54da2c627d8 Author: Colin Ian King Date: Wed Jun 26 13:43:23 2019 +0100 nvme-trace: fix spelling mistake "spcecific" -> "specific" There are two spelling mistakes in trace_seq_printf messages, fix these. Signed-off-by: Colin Ian King Reviewed-by: Minwoo Im Signed-off-by: Christoph Hellwig drivers/nvme/host/trace.c | 2 +- drivers/nvme/target/trace.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 7637de311bd2124b298a072852448b940d8a34b9 Author: Christoph Hellwig Date: Wed Jul 3 09:54:44 2019 -0700 nvme-pci: limit max_hw_sectors based on the DMA max mapping size When running a NVMe device that is attached to a addressing challenged PCIe root port that requires bounce buffering, our request sizes can easily overflow the swiotlb bounce buffer size. Limit the maximum I/O size to the limit exposed by the DMA mapping subsystem. Signed-off-by: Christoph Hellwig Reported-by: Atish Patra Tested-by: Atish Patra Reviewed-by: Sagi Grimberg drivers/nvme/host/pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit bfac8e9f55cf62a000b643a0081488badbe92d96 Author: Alan Mikhak Date: Mon Jul 8 10:05:11 2019 -0700 nvme-pci: check for NULL return from pci_alloc_p2pmem() Modify nvme_alloc_sq_cmds() to call pci_free_p2pmem() to free the memory it allocated using pci_alloc_p2pmem() in case pci_p2pmem_virt_to_bus() returns null. Makes sure not to call pci_free_p2pmem() if pci_alloc_p2pmem() returned NULL, which can happen if CONFIG_PCI_P2PDMA is not configured. The current implementation is not expected to leak since pci_p2pmem_virt_to_bus() is expected to fail only if pci_alloc_p2pmem() returns null. However, checking the return value of pci_alloc_p2pmem() is more explicit. Signed-off-by: Alan Mikhak Signed-off-by: Christoph Hellwig drivers/nvme/host/pci.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 0298d5435276e7795b0b939d74827f6e775e7009 Author: Alan Mikhak Date: Mon Jul 8 10:24:12 2019 -0700 nvme-pci: don't create a read hctx mapping without read queues Only request an IRQ mapping for read queues if at least one read queue is being allocted, as nvme_pci_map_queues() will later on ignore the unnecessary mapping request should nvme_dev_add() request such an IRQ mapping even though no read queues are being allocated. However, nvme_dev_add() can avoid making the request by checking the number of read queues without assuming. This would bring it more in line with nvme_setup_irqs() and nvme_calc_irq_sets(). Signed-off-by: Alan Mikhak Signed-off-by: Christoph Hellwig drivers/nvme/host/pci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 4fe06923f5181d57178e01add4ba54e269c59e9e Author: Christoph Hellwig Date: Fri Jun 28 09:17:48 2019 +0200 nvme-pci: don't fall back to a 32-bit DMA mask Since Linux 5.0 drivers can safely set the largest DMA mask supported by the device, and don't need fallbacks to work around the dma mapping implementations. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg drivers/nvme/host/pci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ecc606103837b98a2b665e8f14e533a6c72bbdc0 Author: Peter Zijlstra Date: Mon Jul 8 15:55:30 2019 -0500 x86/alternatives: Fix int3_emulate_call() selftest stack corruption KASAN shows the following splat during boot: BUG: KASAN: unknown-crash in unwind_next_frame+0x3f6/0x490 Read of size 8 at addr ffffffff84007db0 by task swapper/0 CPU: 0 PID: 0 Comm: swapper Tainted: G T 5.2.0-rc6-00013-g7457c0d #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014 Call Trace: dump_stack+0x19/0x1b print_address_description+0x1b0/0x2b2 __kasan_report+0x10f/0x171 kasan_report+0x12/0x1c __asan_load8+0x54/0x81 unwind_next_frame+0x3f6/0x490 unwind_next_frame+0x1b/0x23 arch_stack_walk+0x68/0xa5 stack_trace_save+0x7b/0xa0 save_trace+0x3c/0x93 mark_lock+0x1ef/0x9b1 lock_acquire+0x122/0x221 __mutex_lock+0xb6/0x731 mutex_lock_nested+0x16/0x18 _vm_unmap_aliases+0x141/0x183 vm_unmap_aliases+0x14/0x16 change_page_attr_set_clr+0x15e/0x2f2 set_memory_4k+0x2a/0x2c check_bugs+0x11fd/0x1298 start_kernel+0x793/0x7eb x86_64_start_reservations+0x55/0x76 x86_64_start_kernel+0x87/0xaa secondary_startup_64+0xa4/0xb0 Memory state around the buggy address: ffffffff84007c80: 00 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 ffffffff84007d00: f1 00 00 00 00 00 00 00 00 00 f2 f2 f2 f3 f3 f3 >ffffffff84007d80: f3 79 be 52 49 79 be 00 00 00 00 00 00 00 00 f1 It turns out that int3_selftest() is corrupting the stack. The problem is that the KASAN-ified version of int3_magic() is much less trivial than the C code appears. It clobbers several unexpected registers. So when the selftest's INT3 is converted to an emulated call to int3_magic(), the registers are clobbered and Bad Things happen when the function returns. Fix this by converting int3_magic() to the trivial ASM function it should be, avoiding all calling convention issues. Also add ASM_CALL_CONSTRAINT to the INT3 ASM, since it contains a 'CALL'. [peterz: cribbed changelog from josh] Fixes: 7457c0da024b ("x86/alternatives: Add int3_emulate_call() selftest") Reported-by: kernel test robot Debugged-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Reviewed-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Andy Lutomirski Link: https://lkml.kernel.org/r/20190709125744.GB3402@hirez.programming.kicks-ass.net arch/x86/kernel/alternative.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) commit a4c0b3decb33fb4a2b5ecc6234a50680f0b21e7d Author: Jackie Liu Date: Mon Jul 8 13:41:12 2019 +0800 io_uring: fix io_sq_thread_stop running in front of io_sq_thread INFO: task syz-executor.5:8634 blocked for more than 143 seconds. Not tainted 5.2.0-rc5+ #3 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor.5 D25632 8634 8224 0x00004004 Call Trace: context_switch kernel/sched/core.c:2818 [inline] __schedule+0x658/0x9e0 kernel/sched/core.c:3445 schedule+0x131/0x1d0 kernel/sched/core.c:3509 schedule_timeout+0x9a/0x2b0 kernel/time/timer.c:1783 do_wait_for_common+0x35e/0x5a0 kernel/sched/completion.c:83 __wait_for_common kernel/sched/completion.c:104 [inline] wait_for_common kernel/sched/completion.c:115 [inline] wait_for_completion+0x47/0x60 kernel/sched/completion.c:136 kthread_stop+0xb4/0x150 kernel/kthread.c:559 io_sq_thread_stop fs/io_uring.c:2252 [inline] io_finish_async fs/io_uring.c:2259 [inline] io_ring_ctx_free fs/io_uring.c:2770 [inline] io_ring_ctx_wait_and_kill+0x268/0x880 fs/io_uring.c:2834 io_uring_release+0x5d/0x70 fs/io_uring.c:2842 __fput+0x2e4/0x740 fs/file_table.c:280 ____fput+0x15/0x20 fs/file_table.c:313 task_work_run+0x17e/0x1b0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:185 [inline] exit_to_usermode_loop arch/x86/entry/common.c:168 [inline] prepare_exit_to_usermode+0x402/0x4f0 arch/x86/entry/common.c:199 syscall_return_slowpath+0x110/0x440 arch/x86/entry/common.c:279 do_syscall_64+0x126/0x140 arch/x86/entry/common.c:304 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x412fb1 Code: 80 3b 7c 0f 84 c7 02 00 00 c7 85 d0 00 00 00 00 00 00 00 48 8b 05 cf a6 24 00 49 8b 14 24 41 b9 cb 2a 44 00 48 89 ee 48 89 df <48> 85 c0 4c 0f 45 c8 45 31 c0 31 c9 e8 0e 5b 00 00 85 c0 41 89 c7 RSP: 002b:00007ffe7ee6a180 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000004 RCX: 0000000000412fb1 RDX: 0000001b2d920000 RSI: 0000000000000000 RDI: 0000000000000003 RBP: 0000000000000001 R08: 00000000f3a3e1f8 R09: 00000000f3a3e1fc R10: 00007ffe7ee6a260 R11: 0000000000000293 R12: 000000000075c9a0 R13: 000000000075c9a0 R14: 0000000000024c00 R15: 000000000075bf2c ============================================= There is an wrong logic, when kthread_park running in front of io_sq_thread. CPU#0 CPU#1 io_sq_thread_stop: int kthread(void *_create): kthread_park() __kthread_parkme(self); <<< Wrong kthread_stop() << wait for self->exited << clear_bit KTHREAD_SHOULD_PARK ret = threadfn(data); | |- io_sq_thread |- kthread_should_park() << false |- schedule() <<< nobody wake up stuck CPU#0 stuck CPU#1 So, use a new variable sqo_thread_started to ensure that io_sq_thread run first, then io_sq_thread_stop. Reported-by: syzbot+94324416c485d422fe15@syzkaller.appspotmail.com Suggested-by: Jens Axboe Signed-off-by: Jackie Liu Signed-off-by: Jens Axboe fs/io_uring.c | 5 +++++ 1 file changed, 5 insertions(+) commit aa1fa28fc73ea6b740ee7b62bf3b07141883dbb8 Author: Jens Axboe Date: Fri Apr 19 13:38:09 2019 -0600 io_uring: add support for recvmsg() This is done through IORING_OP_RECVMSG. This opcode uses the same sqe->msg_flags that IORING_OP_SENDMSG added, and we pass in the msghdr struct in the sqe->addr field as well. We use MSG_DONTWAIT to force an inline fast path if recvmsg() doesn't block, and punt to async execution if it would have. Acked-by: David S. Miller Signed-off-by: Jens Axboe fs/io_uring.c | 31 +++++++++++++++++++++++++++---- include/linux/socket.h | 3 +++ include/uapi/linux/io_uring.h | 1 + net/socket.c | 8 ++++++++ 4 files changed, 39 insertions(+), 4 deletions(-) commit 0fa03c624d8fc9932d0f27c39a9deca6a37e0e17 Author: Jens Axboe Date: Fri Apr 19 13:34:07 2019 -0600 io_uring: add support for sendmsg() This is done through IORING_OP_SENDMSG. There's a new sqe->msg_flags for the flags argument, and the msghdr struct is passed in the sqe->addr field. We use MSG_DONTWAIT to force an inline fast path if sendmsg() doesn't block, and punt to async execution if it would have. Acked-by: David S. Miller Signed-off-by: Jens Axboe fs/io_uring.c | 40 ++++++++++++++++++++++++++++++++++++++++ include/linux/socket.h | 4 ++++ include/uapi/linux/io_uring.h | 2 ++ net/socket.c | 7 +++++++ 4 files changed, 53 insertions(+) commit a1cd4e4324afa4d8a2d6d0ce16bc689d6bab02cc Author: Arnd Bergmann Date: Tue Jul 9 20:55:55 2019 +0200 net: dsa: vsc73xx: fix NET_DSA and OF dependencies The restructuring of the driver got the dependencies wrong: without CONFIG_NET_DSA we get this build failure: WARNING: unmet direct dependencies detected for NET_DSA_VITESSE_VSC73XX Depends on [n]: NETDEVICES [=y] && HAVE_NET_DSA [=y] && OF [=y] && NET_DSA [=n] Selected by [m]: - NET_DSA_VITESSE_VSC73XX_PLATFORM [=m] && NETDEVICES [=y] && HAVE_NET_DSA [=y] && HAS_IOMEM [=y] ERROR: "dsa_unregister_switch" [drivers/net/dsa/vitesse-vsc73xx-core.ko] undefined! ERROR: "dsa_switch_alloc" [drivers/net/dsa/vitesse-vsc73xx-core.ko] undefined! ERROR: "dsa_register_switch" [drivers/net/dsa/vitesse-vsc73xx-core.ko] undefined! Add the appropriate dependencies. Fixes: 95711cd5f0b4 ("net: dsa: vsc73xx: Split vsc73xx driver") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/dsa/Kconfig | 4 ++++ 1 file changed, 4 insertions(+) commit 21774222324e018f064d4fbb661e3c09c2bcaad0 Author: YueHaibing Date: Wed Jun 26 10:09:02 2019 +0800 nvme-pci: make nvme_dev_pm_ops static Fix sparse warning: drivers/nvme/host/pci.c:2926:25: warning: symbol 'nvme_dev_pm_ops' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: YueHaibing Reviewed-by: Minwoo Im Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig drivers/nvme/host/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e0620bf858d3f5e7121d9e429cf7a8f04ab29bf7 Author: James Smart Date: Thu Jun 20 13:17:01 2019 -0700 nvme-fcloop: resolve warnings on RCU usage and sleep warnings With additional debugging enabled, seeing warnings for suspicious RCU usage or Sleeping function called from invalid context. These both map to allocation of a work structure which is currently GFP_KERNEL, meaning it can sleep. For the RCU warning, the sequence was sleeping while holding the RCU lock. Convert the allocation to GFP_ATOMIC. Signed-off-by: James Smart Reviewed-by: Minwoo Im Signed-off-by: Christoph Hellwig drivers/nvme/target/fcloop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c38dbbfab1bc47b0f3a1eceea0fa45e44c477092 Author: James Smart Date: Thu Jun 20 13:07:00 2019 -0700 nvme-fcloop: fix inconsistent lock state warnings With extra debug on, inconsistent lock state warnings are being called out as the tfcp_req->reqlock is being taken out without irq, while some calling sequences have the sequence in a softirq state. Change the lock taking/release to raise/drop irq. Signed-off-by: James Smart Reviewed-by: Minwoo Im Signed-off-by: Christoph Hellwig drivers/nvme/target/fcloop.c | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) commit 1cadfc5877f15a14a77f4161f3ce9f436a39116d Author: Claire Chang Date: Wed Jun 19 16:41:10 2019 +0800 dt-bindings: serial: add documentation for Rx in-band wakeup support To support Rx in-band wakeup, one must create an interrupt specifier with edge sensitivity on Rx pin and an addtional pinctrl to reconfigure Rx pin to normal GPIO in sleep state. Driver will switch to sleep mode pinctrl and enable irq wake before suspend and restore to default settings when resuming. Signed-off-by: Claire Chang Signed-off-by: Rob Herring Documentation/devicetree/bindings/serial/mtk-uart.txt | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 0488e2723babf8f09086fa3ce091984febe5fb28 Merge: 7715ff164713 433a06d7d74e Author: David S. Miller Date: Tue Jul 9 13:03:04 2019 -0700 Merge branch 'Armada-8040-SoC-in-orion-mdio-hang' Josua Mayer says: ==================== Fix hang of Armada 8040 SoC in orion-mdio With a modular kernel as configured by Debian a hang was observed with the Armada 8040 SoC in the Clearfog GT and Macchiatobin boards. The 8040 SoC actually requires four clocks to be enabled for the mdio interface to function. All 4 clocks are already specified in armada-cp110.dtsi. It has however been missed that the orion-mdio driver only supports enabling up to three clocks. This patch-set allows the orion-mdio driver to handle four clocks and adds a warning when more clocks are specified to prevent this particular oversight in the future. Changes since v1: - fixed condition for priting the warning (Andrew Lunn) - rephrased commit description for deferred probing (Andrew Lunn) - fixed compiler warnings (kbuild test robot) ==================== Signed-off-by: David S. Miller commit 433a06d7d74e677c40b1148c70c48677ff62fb6b Author: Josua Mayer Date: Tue Jul 9 15:01:01 2019 +0200 net: mvmdio: defer probe of orion-mdio if a clock is not ready Defer probing of the orion-mdio interface when getting a clock returns EPROBE_DEFER. This avoids locking up the Armada 8k SoC when mdio is used before all clocks have been enabled. Signed-off-by: Josua Mayer Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvmdio.c | 5 +++++ 1 file changed, 5 insertions(+) commit ea664b1bdc19f3884f9d2966b106b3ca8d253426 Author: Josua Mayer Date: Tue Jul 9 15:01:00 2019 +0200 net: mvmdio: print warning when orion-mdio has too many clocks Print a warning when device tree specifies more than the maximum of four clocks supported by orion-mdio. Because reading from mdio can lock up the Armada 8k when a required clock is not initialized, it is important to notify the user when a specified clock is ignored. Signed-off-by: Josua Mayer Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvmdio.c | 4 ++++ 1 file changed, 4 insertions(+) commit 4aabed699c400810981d3dda170f05fa4d782905 Author: Josua Mayer Date: Tue Jul 9 15:00:59 2019 +0200 net: mvmdio: allow up to four clocks to be specified for orion-mdio Allow up to four clocks to be specified and enabled for the orion-mdio interface, which are required by the Armada 8k and defined in armada-cp110.dtsi. Fixes a hang in probing the mvmdio driver that was encountered on the Clearfog GT 8K with all drivers built as modules, but also affects other boards such as the MacchiatoBIN. Cc: stable@vger.kernel.org Fixes: 96cb43423822 ("net: mvmdio: allow up to three clocks to be specified for orion-mdio") Reviewed-by: Andrew Lunn Signed-off-by: Josua Mayer Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvmdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 80785f5a22e9073e2ded5958feb7f220e066d17b Author: Josua Mayer Date: Tue Jul 9 15:00:58 2019 +0200 dt-bindings: allow up to four clocks for orion-mdio Armada 8040 needs four clocks to be enabled for MDIO accesses to work. Update the binding to allow the extra clock to be specified. Cc: stable@vger.kernel.org Fixes: 6d6a331f44a1 ("dt-bindings: allow up to three clocks for orion-mdio") Reviewed-by: Andrew Lunn Signed-off-by: Josua Mayer Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/marvell-orion-mdio.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7715ff1647139bc87aa20bd456ac4f143411b377 Author: Ilias Apalodimas Date: Tue Jul 9 15:35:53 2019 +0300 net: netsec: start using buffers if page_pool registration succeeded The current driver starts using page_pool buffers before calling xdp_rxq_info_reg_mem_model(). Start using the buffers after the registration succeeded, so we won't have to call page_pool_request_shutdown() in case of failure Fixes: 5c67bf0ec4d0 ("net: netsec: Use page_pool API") Signed-off-by: Ilias Apalodimas Signed-off-by: David S. Miller drivers/net/ethernet/socionext/netsec.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit c3e78a3403dabcb7115c2fb7b538a1095d168cd5 Author: Arnaldo Carvalho de Melo Date: Tue Jul 9 16:36:45 2019 -0300 perf trace: Auto bump rlimit(MEMLOCK) for eBPF maps sake Circa v5.2 this started to fail: # perf trace -e /wb/augmented_raw_syscalls.o event syntax error: '/wb/augmented_raw_syscalls.o' \___ Operation not permitted (add -v to see detail) Run 'perf list' for a list of valid events Usage: perf trace [] [] or: perf trace [] -- [] or: perf trace record [] [] or: perf trace record [] -- [] -e, --event event/syscall selector. use 'perf list' to list available events # In verbose mode we some -EPERM when creating a BPF map: # perf trace -v -e /wb/augmented_raw_syscalls.o libbpf: failed to create map (name: '__augmented_syscalls__'): Operation not permitted libbpf: failed to load object '/wb/augmented_raw_syscalls.o' bpf: load objects failed: err=-1: (Operation not permitted) event syntax error: '/wb/augmented_raw_syscalls.o' \___ Operation not permitted (add -v to see detail) Run 'perf list' for a list of valid events Usage: perf trace [] [] or: perf trace [] -- [] or: perf trace record [] [] or: perf trace record [] -- [] -e, --event event/syscall selector. use 'perf list' to list available events # If we bumped 'ulimit -l 128' to get it from the 64k default to double that, it worked, so use the recently added rlimit__bump_memlock() helper: # perf trace -e /wb/augmented_raw_syscalls.o -e open*,*sleep sleep 1 0.000 ( 0.007 ms): sleep/28042 openat(dfd: CWD, filename: "/etc/ld.so.cache", flags: RDONLY|CLOEXEC) = 3 0.022 ( 0.004 ms): sleep/28042 openat(dfd: CWD, filename: "/lib64/libc.so.6", flags: RDONLY|CLOEXEC) = 3 0.201 ( 0.007 ms): sleep/28042 openat(dfd: CWD, filename: "", flags: RDONLY|CLOEXEC) = 3 0.241 (1000.421 ms): sleep/28042 nanosleep(rqtp: 0x7ffd6c3e6ed0) = 0 # Cc: Adrian Hunter Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-j6f2ioa6hj9dinzpjvlhcjoc@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-trace.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit e9a83bd2322035ed9d7dcf35753d3f984d76c6a5 Merge: 7011b7e1b702 454f96f2b738 Author: Linus Torvalds Date: Tue Jul 9 12:34:26 2019 -0700 Merge tag 'docs-5.3' of git://git.lwn.net/linux Pull Documentation updates from Jonathan Corbet: "It's been a relatively busy cycle for docs: - A fair pile of RST conversions, many from Mauro. These create more than the usual number of simple but annoying merge conflicts with other trees, unfortunately. He has a lot more of these waiting on the wings that, I think, will go to you directly later on. - A new document on how to use merges and rebases in kernel repos, and one on Spectre vulnerabilities. - Various improvements to the build system, including automatic markup of function() references because some people, for reasons I will never understand, were of the opinion that :c:func:``function()`` is unattractive and not fun to type. - We now recommend using sphinx 1.7, but still support back to 1.4. - Lots of smaller improvements, warning fixes, typo fixes, etc" * tag 'docs-5.3' of git://git.lwn.net/linux: (129 commits) docs: automarkup.py: ignore exceptions when seeking for xrefs docs: Move binderfs to admin-guide Disable Sphinx SmartyPants in HTML output doc: RCU callback locks need only _bh, not necessarily _irq docs: format kernel-parameters -- as code Doc : doc-guide : Fix a typo platform: x86: get rid of a non-existent document Add the RCU docs to the core-api manual Documentation: RCU: Add TOC tree hooks Documentation: RCU: Rename txt files to rst Documentation: RCU: Convert RCU UP systems to reST Documentation: RCU: Convert RCU linked list to reST Documentation: RCU: Convert RCU basic concepts to reST docs: filesystems: Remove uneeded .rst extension on toctables scripts/sphinx-pre-install: fix out-of-tree build docs: zh_CN: submitting-drivers.rst: Remove a duplicated Documentation/ Documentation: PGP: update for newer HW devices Documentation: Add section about CPU vulnerabilities for Spectre Documentation: platform: Delete x86-laptop-drivers.txt docs: Note that :c:func: should no longer be used ... commit d8d9ec7dc5abbb3f11d866e983c4984f5c2de9d6 Author: Dag Moxnes Date: Tue Jul 9 13:50:26 2019 +0200 RDMA/core: Fix race when resolving IP address Use the neighbour lock when copying the MAC address from the neighbour data struct in dst_fetch_ha. When not using the lock, it is possible for the function to race with neigh_update(), causing it to copy an torn MAC address: rdma_resolve_addr() rdma_resolve_ip() addr_resolve() addr_resolve_neigh() fetch_ha() dst_fetch_ha() memcpy(dev_addr->dst_dev_addr, n->ha, MAX_ADDR_LEN) and net_ioctl() arp_ioctl() arp_rec_delete() arp_invalidate() neigh_update() __neigh_update() memcpy(&neigh->ha, lladdr, dev->addr_len) It is possible to provoke this error by calling rdma_resolve_addr() in a tight loop, while deleting the corresponding ARP entry in another tight loop. Fixes: 51d45974515c ("infiniband: addr: Consolidate code to fetch neighbour hardware address from dst.") Signed-off-by: Dag Moxnes Signed-off-by: Håkon Bugge Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe drivers/infiniband/core/addr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d3280ce01e21a827daa50b0e9bdc8588c6f855d8 Author: Arnaldo Carvalho de Melo Date: Tue Jul 9 16:27:01 2019 -0300 perf test: Auto bump rlimit(MEMLOCK) for BPF test sake I noticed that the 'perf test bpf' was failing: # perf test bpf 41: BPF filter : 41.1: Basic BPF filtering : Skip 41.2: BPF pinning : Skip 41.3: BPF prologue generation : Skip 41.4: BPF relocation checker : Skip # ulimit -l 64 # Using verbose mode we get just a line bout -EPERF being returned from libbpf's bpf_load_program_xattr(), that ends up being used in 'perf test bpf' initial program loading capability query: Missing basic BPF support, skip this test: Operation not permitted Not that informative, but on a separate problem when creating BPF maps bumping rlimit(MEMLOCK) helped, so I tried it here as well, works: # ulimit -l 128 # perf test bpf 41: BPF filter : 41.1: Basic BPF filtering : Ok 41.2: BPF pinning : Ok 41.3: BPF prologue generation : Ok 41.4: BPF relocation checker : Ok # So use the recently added rlimit__bump_memlock() helper: # ulimit -l 64 # perf test bpf 41: BPF filter : 41.1: Basic BPF filtering : Ok 41.2: BPF pinning : Ok 41.3: BPF prologue generation : Ok 41.4: BPF relocation checker : Ok # ulimit -l 64 # I.e. the bumping of memlock is restricted to the 'perf test' instance, not changing the global value. Cc: Adrian Hunter Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-b9fubkhr4jm192lu7y8hgjvo@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/builtin-test.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 7011b7e1b702cc76f9e969b41d9a95969f2aecaa Merge: 9d22167f3430 4ca96aa99f3e Author: Linus Torvalds Date: Tue Jul 9 12:25:58 2019 -0700 Merge tag 'printk-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk Pull printk updates from Petr Mladek: - distinguish different legacy clocks again - small clean up * tag 'printk-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk: lib/vsprintf: Reinstate printing of legacy clock IDs vsprintf: fix data type of variable in string_nocheck() commit 9d22167f34305280c5dd57a74c21651da3c23015 Merge: 593c75463ab6 c5eaab1d131d Author: Linus Torvalds Date: Tue Jul 9 12:24:21 2019 -0700 Merge branch 'next-lsm' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull capabilities update from James Morris: "Minor fixes for capabilities: - Update the commoncap.c code to utilize XATTR_SECURITY_PREFIX_LEN, from Carmeli tamir. - Make the capability hooks static, from Yue Haibing" * 'next-lsm' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: security/commoncap: Use xattr security prefix len security: Make capability_hooks static commit de90573e30948459a37e32f432e65529573ff757 Merge: 12479f627f7c 2af6106ae949 Author: David S. Miller Date: Tue Jul 9 12:20:08 2019 -0700 Merge branch 'net-stmmac-Some-improvements-and-a-fix' Jose Abreu says: ==================== net: stmmac: Some improvements and a fix Some performace improvements (01/03 and 03/03) and a fix (02/03), all for -next. ==================== Signed-off-by: David S. Miller commit 2af6106ae949651d529c8c3f0734c3a7babd0d4b Author: Jose Abreu Date: Tue Jul 9 10:03:00 2019 +0200 net: stmmac: Introducing support for Page Pool Mapping and unmapping DMA region is an high bottleneck in stmmac driver, specially in the RX path. This commit introduces support for Page Pool API and uses it in all RX queues. With this change, we get more stable troughput and some increase of banwidth with iperf: - MAC1000 - 950 Mbps - XGMAC: 9.22 Gbps Changes from v3: - Use page_pool_destroy() (Ilias) Changes from v2: - Uncoditionally call page_pool_free() (Jesper) Changes from v1: - Use page_pool_get_dma_addr() (Jesper) - Add a comment (Jesper) - Add page_pool_free() call (Jesper) - Reintroduce sync_single_for_device (Arnd / Ilias) Signed-off-by: Jose Abreu Acked-by: Ilias Apalodimas Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/Kconfig | 1 + drivers/net/ethernet/stmicro/stmmac/stmmac.h | 10 +- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 203 +++++++--------------- 3 files changed, 70 insertions(+), 144 deletions(-) commit 06a80a7d09cc3fbecbd44e225e825a37fb806836 Author: Jose Abreu Date: Tue Jul 9 10:02:59 2019 +0200 net: stmmac: Fix descriptors address being in > 32 bits address space Commit a993db88d17d ("net: stmmac: Enable support for > 32 Bits addressing in XGMAC"), introduced support for > 32 bits addressing in XGMAC but the conversion of descriptors to dma_addr_t was left out. As some devices assing coherent memory in regions > 32 bits we need to set lower and upper value of descriptors address when initializing DMA channels. Luckly, this was working for me because I was assigning CMA to < 4GB address space for performance reasons. Fixes: a993db88d17d ("net: stmmac: Enable support for > 32 Bits addressing in XGMAC") Signed-off-by: Jose Abreu Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 8 ++++---- drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c | 8 ++++---- drivers/net/ethernet/stmicro/stmmac/dwmac100_dma.c | 8 ++++---- drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c | 8 ++++---- drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h | 2 ++ drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c | 10 ++++++---- drivers/net/ethernet/stmicro/stmmac/hwif.h | 4 ++-- 7 files changed, 26 insertions(+), 22 deletions(-) commit d429b66e2ebcec7099e666bbf14395898f53370e Author: Jose Abreu Date: Tue Jul 9 10:02:58 2019 +0200 net: stmmac: Implement RX Coalesce Frames setting Add support for coalescing RX path by specifying number of frames which don't need to have interrupt on completion bit set. This is only available when RX Watchdog is enabled. Acked-by: Jakub Kicinski Signed-off-by: Jose Abreu Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/common.h | 1 + drivers/net/ethernet/stmicro/stmmac/stmmac.h | 2 ++ drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 7 +++++-- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 18 ++++++++++++------ 4 files changed, 20 insertions(+), 8 deletions(-) commit 12479f627f7c2017e6fcd50b56c2537592674c50 Author: Michael Chan Date: Tue Jul 9 03:50:07 2019 -0400 bnxt_en: Add page_pool_destroy() during RX ring cleanup. Add page_pool_destroy() in bnxt_free_rx_rings() during normal RX ring cleanup, as Ilias has informed us that the following commit has been merged: 1da4bbeffe41 ("net: core: page_pool: add user refcnt and reintroduce page_pool_destroy") The special error handling code to call page_pool_free() can now be removed. bnxt_free_rx_rings() will always be called during normal shutdown or any error paths. Fixes: 322b87ca55f2 ("bnxt_en: add page_pool support") Cc: Ilias Apalodimas Cc: Andy Gospodarek Signed-off-by: Michael Chan Acked-by: Andy Gospodarek Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 216dcb059b767ef526499f3ed287e98b37af03c3 Merge: f108c887d089 6e52fca36c67 Author: David S. Miller Date: Tue Jul 9 12:12:14 2019 -0700 Merge branch 'net-sched-Introduce-tc-connection-tracking' Paul Blakey says: ==================== net/sched: Introduce tc connection tracking This patch series add connection tracking capabilities in tc sw datapath. It does so via a new tc action, called act_ct, and new tc flower classifier matching on conntrack state, mark and label. Usage is as follows: $ tc qdisc add dev ens1f0_0 ingress $ tc qdisc add dev ens1f0_1 ingress $ tc filter add dev ens1f0_0 ingress \ prio 1 chain 0 proto ip \ flower ip_proto tcp ct_state -trk \ action ct zone 2 pipe \ action goto chain 2 $ tc filter add dev ens1f0_0 ingress \ prio 1 chain 2 proto ip \ flower ct_state +trk+new \ action ct zone 2 commit mark 0xbb nat src addr 5.5.5.7 pipe \ action mirred egress redirect dev ens1f0_1 $ tc filter add dev ens1f0_0 ingress \ prio 1 chain 2 proto ip \ flower ct_zone 2 ct_mark 0xbb ct_state +trk+est \ action ct nat pipe \ action mirred egress redirect dev ens1f0_1 $ tc filter add dev ens1f0_1 ingress \ prio 1 chain 0 proto ip \ flower ip_proto tcp ct_state -trk \ action ct zone 2 pipe \ action goto chain 1 $ tc filter add dev ens1f0_1 ingress \ prio 1 chain 1 proto ip \ flower ct_zone 2 ct_mark 0xbb ct_state +trk+est \ action ct nat pipe \ action mirred egress redirect dev ens1f0_0 The pattern used in the design here closely resembles OvS, as the plan is to also offload OvS conntrack rules to tc. OvS datapath rules uses it's recirculation mechanism to send specific packets to conntrack, and return with the new conntrack state (ct_state) on some other recirc_id to be matched again (we use goto chain for this). This results in the following OvS datapath rules: recirc_id(0),in_port(ens1f0_0),ct_state(-trk),... actions:ct(zone=2),recirc(2) recirc_id(2),in_port(ens1f0_0),ct_state(+new+trk),ct_mark(0xbb),... actions:ct(commit,zone=2,nat(src=5.5.5.7),mark=0xbb),ens1f0_1 recirc_id(2),in_port(ens1f0_0),ct_state(+est+trk),ct_mark(0xbb),... actions:ct(zone=2,nat),ens1f0_1 recirc_id(1),in_port(ens1f0_1),ct_state(-trk),... actions:ct(zone=2),recirc(1) recirc_id(1),in_port(ens1f0_1),ct_state(+est+trk),... actions:ct(zone=2,nat),ens1f0_0 Changelog: See individual patches. ==================== Signed-off-by: David S. Miller commit 6e52fca36c67c608fd8590826e946e1d0da83261 Author: Paul Blakey Date: Tue Jul 9 10:30:51 2019 +0300 tc-tests: Add tc action ct tests Add 13 tests ensuring the command line is doing what is supposed to do. Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller .../selftests/tc-testing/tc-tests/actions/ct.json | 314 +++++++++++++++++++++ 1 file changed, 314 insertions(+) commit e0ace68af2acfe474bc89a3d9a2e24d700bf245d Author: Paul Blakey Date: Tue Jul 9 10:30:50 2019 +0300 net/sched: cls_flower: Add matching on conntrack info New matches for conntrack mark, label, zone, and state. Signed-off-by: Paul Blakey Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: Yossi Kuperman Acked-by: Jiri Pirko Signed-off-by: David S. Miller include/uapi/linux/pkt_cls.h | 16 ++++++ net/sched/cls_flower.c | 127 +++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 138 insertions(+), 5 deletions(-) commit 75a56758d6390ea6db523ad26ce378f34b907b0c Author: Paul Blakey Date: Tue Jul 9 10:30:49 2019 +0300 net/flow_dissector: add connection tracking dissection Retreives connection tracking zone, mark, label, and state from a SKB. Signed-off-by: Paul Blakey Signed-off-by: Marcelo Ricardo Leitner Acked-by: Jiri Pirko Signed-off-by: David S. Miller include/linux/skbuff.h | 10 ++++++++++ include/net/flow_dissector.h | 15 +++++++++++++++ net/core/flow_dissector.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 69 insertions(+) commit b57dc7c13ea90e09ae15f821d2583fa0231b4935 Author: Paul Blakey Date: Tue Jul 9 10:30:48 2019 +0300 net/sched: Introduce action ct Allow sending a packet to conntrack module for connection tracking. The packet will be marked with conntrack connection's state, and any metadata such as conntrack mark and label. This state metadata can later be matched against with tc classifers, for example with the flower classifier as below. In addition to committing new connections the user can optionally specific a zone to track within, set a mark/label and configure nat with an address range and port range. Usage is as follows: $ tc qdisc add dev ens1f0_0 ingress $ tc qdisc add dev ens1f0_1 ingress $ tc filter add dev ens1f0_0 ingress \ prio 1 chain 0 proto ip \ flower ip_proto tcp ct_state -trk \ action ct zone 2 pipe \ action goto chain 2 $ tc filter add dev ens1f0_0 ingress \ prio 1 chain 2 proto ip \ flower ct_state +trk+new \ action ct zone 2 commit mark 0xbb nat src addr 5.5.5.7 pipe \ action mirred egress redirect dev ens1f0_1 $ tc filter add dev ens1f0_0 ingress \ prio 1 chain 2 proto ip \ flower ct_zone 2 ct_mark 0xbb ct_state +trk+est \ action ct nat pipe \ action mirred egress redirect dev ens1f0_1 $ tc filter add dev ens1f0_1 ingress \ prio 1 chain 0 proto ip \ flower ip_proto tcp ct_state -trk \ action ct zone 2 pipe \ action goto chain 1 $ tc filter add dev ens1f0_1 ingress \ prio 1 chain 1 proto ip \ flower ct_zone 2 ct_mark 0xbb ct_state +trk+est \ action ct nat pipe \ action mirred egress redirect dev ens1f0_0 Signed-off-by: Paul Blakey Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: Yossi Kuperman Acked-by: Jiri Pirko Changelog: V5->V6: Added CONFIG_NF_DEFRAG_IPV6 in handle fragments ipv6 case V4->V5: Reordered nf_conntrack_put() in tcf_ct_skb_nfct_cached() V3->V4: Added strict_start_type for act_ct policy V2->V3: Fixed david's comments: Removed extra newline after rcu in tcf_ct_params , and indent of break in act_ct.c V1->V2: Fixed parsing of ranges TCA_CT_NAT_IPV6_MAX as 'else' case overwritten ipv4 max Refactored NAT_PORT_MIN_MAX range handling as well Added ipv4/ipv6 defragmentation Removed extra skb pull push of nw offset in exectute nat Refactored tcf_ct_skb_network_trim after pull Removed TCA_ACT_CT define Signed-off-by: David S. Miller include/net/flow_offload.h | 5 + include/net/tc_act/tc_ct.h | 63 +++ include/uapi/linux/pkt_cls.h | 1 + include/uapi/linux/tc_act/tc_ct.h | 41 ++ net/sched/Kconfig | 11 + net/sched/Makefile | 1 + net/sched/act_ct.c | 984 ++++++++++++++++++++++++++++++++++++++ net/sched/cls_api.c | 5 + 8 files changed, 1111 insertions(+) commit 593c75463ab6d6985cdc9916f3d1c28b5f6340cd Merge: 565eb5f8c5d3 b3d5f311d3cf Author: Linus Torvalds Date: Tue Jul 9 12:08:15 2019 -0700 Merge branch 'parisc-5.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc updates from Helge Deller: "Dynamic ftrace support by Sven Schnelle and a header guard fix by Denis Efremov" * 'parisc-5.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: asm: psw.h: missing header guard parisc: add dynamic ftrace compiler.h: add CC_USING_PATCHABLE_FUNCTION_ENTRY parisc: use pr_debug() in kernel/module.c parisc: add WARN_ON() to clear_fixmap parisc: add spinlock to patch function parisc: add support for patching multiple words commit f108c887d08986ec86cf6ca299c8bdb9e631275c Merge: b14a260e33dd f60f315d339e Author: David S. Miller Date: Tue Jul 9 12:02:13 2019 -0700 Merge branch 'devlink-Introduce-PCI-PF-VF-ports-and-attributes' Parav Pandit says: ==================== devlink: Introduce PCI PF, VF ports and attributes This patchset carry forwards the work initiated in [1] and discussion futher concluded at [2]. To improve visibility of representor netdevice, its association with PF or VF, physical port, two new devlink port flavours are added as PCI PF and PCI VF ports. A sample eswitch view can be seen below, which will be futher extended to mdev subdevices of a PCI function in future. Patch-1 moves physical port's attribute to new structure Patch-2 enhances netlink response to consider port flavour Patch-3,4 extends devlink port attributes and port flavour Patch-5 extends mlx5 driver to register devlink ports for PF, VF and physical link. +---+ +---+ vf| | | | pf +-+-+ +-+-+ physical link <---------+ | | | | | | | | +-+-+ +-+-+ +-+-+ | 1 | | 2 | | 3 | +--+---+-----+---+------+---+--+ | physical vf pf | | port port port | | | | eswitch | | | +------------------------------+ [1] https://www.spinics.net/lists/netdev/msg555797.html [2] https://marc.info/?l=linux-netdev&m=155354609408485&w=2 Changelog: v5->v6: - Fixed port flavour check order for PCI PF vs other flavours in netlink response. - Changed 'physical' to 'phys'. v4->v5: - Split first patch to two patches to handle netlink response in separate patch. - Corrected typo 'otwerwise' to 'otherwise' in patches 3 and 4. v3->v4: - Addressed comments from Jiri. - Split first patch to two patches. - Renamed phys_port to physical to be consistent with pci_pf. - Removed port_number from __devlink_port_attrs_set and moved assignment to caller function. - Used capital letter while moving old comment to new structure. - Removed helper function is_devlink_phy_port_num_supported(). v2->v3: - Made port_number and split_port_number applicable only to physical port flavours. v1->v2: - Updated new APIs and mlx5 driver to drop port_number for PF, VF attributes - Updated port_number comment for its usage - Limited putting port_number to physical ports ==================== Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit f60f315d339e14633a51cd2d468500d08055b84b Author: Parav Pandit Date: Mon Jul 8 23:17:39 2019 -0500 net/mlx5e: Register devlink ports for physical link, PCI PF, VFs Register devlink port of physical port, PCI PF and PCI VF flavour for each PF, VF when a given devlink instance is in switchdev mode. Implement ndo_get_devlink_port callback API to make use of registered devlink ports. This eliminates ndo_get_phys_port_name() and ndo_get_port_parent_id() callbacks. Hence, remove them. An example output with 2 VFs, without a PF and single uplink port is below. $devlink port show pci/0000:06:00.0/65535: type eth netdev ens2f0 flavour physical pci/0000:05:00.0/1: type eth netdev eth1 flavour pcivf pfnum 0 vfnum 0 pci/0000:05:00.0/2: type eth netdev eth2 flavour pcivf pfnum 0 vfnum 1 Reviewed-by: Roi Dayan Acked-by: Jiri Pirko Signed-off-by: Parav Pandit Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 108 ++++++++++++++++------- drivers/net/ethernet/mellanox/mlx5/core/en_rep.h | 1 + 2 files changed, 78 insertions(+), 31 deletions(-) commit e41b6bf3cdd474dc9c587cb55906b0256835bf6d Author: Parav Pandit Date: Mon Jul 8 23:17:38 2019 -0500 devlink: Introduce PCI VF port flavour and port attribute In an eswitch, PCI VF may have port which is normally represented using a representor netdevice. To have better visibility of eswitch port, its association with VF, and its representor netdevice, introduce a PCI VF port flavour. When devlink port flavour is PCI VF, fill up PCI VF attributes of the port. Extend port name creation using PCI PF and VF number scheme on best effort basis, so that vendor drivers can skip defining their own scheme. $ devlink port show pci/0000:05:00.0/0: type eth netdev eth0 flavour pcipf pfnum 0 pci/0000:05:00.0/1: type eth netdev eth1 flavour pcivf pfnum 0 vfnum 0 pci/0000:05:00.0/2: type eth netdev eth2 flavour pcivf pfnum 0 vfnum 1 Acked-by: Jiri Pirko Signed-off-by: Parav Pandit Signed-off-by: David S. Miller include/net/devlink.h | 10 ++++++++++ include/uapi/linux/devlink.h | 6 ++++++ net/core/devlink.c | 38 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 54 insertions(+) commit 98fd2d6563fe4a799934a2a74d632601cd089beb Author: Parav Pandit Date: Mon Jul 8 23:17:37 2019 -0500 devlink: Introduce PCI PF port flavour and port attribute In an eswitch, PCI PF may have port which is normally represented using a representor netdevice. To have better visibility of eswitch port, its association with PF and a representor netdevice, introduce a PCI PF port flavour and port attriute. When devlink port flavour is PCI PF, fill up PCI PF attributes of the port. Extend port name creation using PCI PF number on best effort basis. So that vendor drivers can skip defining their own scheme. $ devlink port show pci/0000:05:00.0/0: type eth netdev eth0 flavour pcipf pfnum 0 Acked-by: Jiri Pirko Signed-off-by: Parav Pandit Signed-off-by: David S. Miller include/net/devlink.h | 8 ++++++++ include/uapi/linux/devlink.h | 5 +++++ net/core/devlink.c | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+) commit a2c6b87dd08cdfc2d065d4ae369e4e747b521a7f Author: Parav Pandit Date: Mon Jul 8 23:17:36 2019 -0500 devlink: Return physical port fields only for applicable port flavours Physical port number and split group fields are applicable only to physical port flavours such as PHYSICAL, CPU and DSA. Hence limit returning those values in netlink response to such port flavours. Acked-by: Jiri Pirko Signed-off-by: Parav Pandit Signed-off-by: David S. Miller net/core/devlink.c | 4 ++++ 1 file changed, 4 insertions(+) commit 378ef01b5f75e6c485b8f16b4f6a7842a312aa07 Author: Parav Pandit Date: Mon Jul 8 23:17:35 2019 -0500 devlink: Refactor physical port attributes To support additional devlink port flavours and to support few common and few different port attributes, move physical port attributes to a different structure. Acked-by: Jiri Pirko Signed-off-by: Parav Pandit Signed-off-by: David S. Miller include/net/devlink.h | 13 ++++++++++-- net/core/devlink.c | 58 +++++++++++++++++++++++++++++++++------------------ 2 files changed, 49 insertions(+), 22 deletions(-) commit f21ce913a82faa512b583640226d4ab39b38735e Author: Rob Herring Date: Tue Jun 18 14:06:49 2019 -0600 dt-bindings: arm: Convert RDA Micro board/soc bindings to json-schema Convert RDA Micro SoC bindings to DT schema format using json-schema. Cc: "Andreas Färber" Acked-by: Manivannan Sadhasivam Signed-off-by: Rob Herring Documentation/devicetree/bindings/arm/rda.txt | 17 ----------------- Documentation/devicetree/bindings/arm/rda.yaml | 20 ++++++++++++++++++++ MAINTAINERS | 2 +- 3 files changed, 21 insertions(+), 18 deletions(-) commit 565eb5f8c5d379b6a6a3134c76b2fcfecdd007d3 Merge: b7d5c9239855 4eb5fec31e61 Author: Linus Torvalds Date: Tue Jul 9 11:52:34 2019 -0700 Merge branch 'x86-kdump-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x865 kdump updates from Thomas Gleixner: "Yet more kexec/kdump updates: - Properly support kexec when AMD's memory encryption (SME) is enabled - Pass reserved e820 ranges to the kexec kernel so both PCI and SME can work" * 'x86-kdump-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: fs/proc/vmcore: Enable dumping of encrypted memory when SEV was active x86/kexec: Set the C-bit in the identity map page table when SEV is active x86/kexec: Do not map kexec area as decrypted when SEV is active x86/crash: Add e820 reserved ranges to kdump kernel's e820 table x86/mm: Rework ioremap resource mapping determination x86/e820, ioport: Add a new I/O resource descriptor IORES_DESC_RESERVED x86/mm: Create a workarea in the kernel for SME early encryption x86/mm: Identify the end of the kernel area to be reserved commit b7d5c9239855f99762e8a547bea03a436e8a12e8 Merge: 608745f12462 8ff80fbe7e98 Author: Linus Torvalds Date: Tue Jul 9 11:35:38 2019 -0700 Merge branch 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 boot updates from Thomas Gleixner: "Assorted updates to kexec/kdump: - Proper kexec support for 4/5-level paging and jumping from a 5-level to a 4-level paging kernel. - Make the EFI support for kexec/kdump more robust - Enforce that the GDT is properly aligned instead of getting the alignment by chance" * 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/kdump/64: Restrict kdump kernel reservation to <64TB x86/kexec/64: Prevent kexec from 5-level paging to a 4-level only kernel x86/boot: Add xloadflags bits to check for 5-level paging support x86/boot: Make the GDT 8-byte aligned x86/kexec: Add the ACPI NVS region to the ident map x86/boot: Call get_rsdp_addr() after console_init() Revert "x86/boot: Disable RSDP parsing temporarily" x86/boot: Use efi_setup_data for searching RSDP on kexec-ed kernels x86/kexec: Add the EFI system tables and ACPI tables to the ident map commit 608745f12462e2d8d94d5cc5dc94bf0960a881e3 Merge: cdc5ffc41005 d1d59b817939 Author: Linus Torvalds Date: Tue Jul 9 11:15:52 2019 -0700 Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf updates from Ingo Molnar: "The main changes in this cycle on the kernel side were: - CPU PMU and uncore driver updates to Intel Snow Ridge, IceLake, KabyLake, AmberLake and WhiskeyLake CPUs. - Rework the MSR probing infrastructure to make it more robust, make it work better on virtualized systems and to better expose it on sysfs. - Rework PMU attributes group support based on the feedback from Greg. The core sysfs patch that adds sysfs_update_groups() was acked by Greg. There's a lot of perf tooling changes as well, all around the place: - vendor updates to Intel, cs-etm (ARM), ARM64, s390, - various enhancements to Intel PT tooling support: - Improve CBR (Core to Bus Ratio) packets support. - Export power and ptwrite events to sqlite and postgresql. - Add support for decoding PEBS via PT packets. - Add support for samples to contain IPC ratio, collecting cycles information from CYC packets, showing the IPC info periodically - Allow using time ranges - lots of updates to perf pmu, perf stat, perf trace, eBPF support, perf record, perf diff, etc. - please see the shortlog and Git log for details" * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (252 commits) tools arch x86: Sync asm/cpufeatures.h with the with the kernel tools build: Check if gettid() is available before providing helper perf jvmti: Address gcc string overflow warning for strncpy() perf python: Remove -fstack-protector-strong if clang doesn't have it perf annotate TUI browser: Do not use member from variable within its own initialization perf tests: Fix record+probe_libc_inet_pton.sh for powerpc64 perf evsel: Do not rely on errno values for precise_ip fallback perf thread: Allow references to thread objects after machine__exit() perf header: Assign proper ff->ph in perf_event__synthesize_features() tools arch kvm: Sync kvm headers with the kernel sources perf script: Allow specifying the files to process guest samples perf tools metric: Don't include duration_time in group perf list: Avoid extra : for --raw metrics perf vendor events intel: Metric fixes for SKX/CLX perf tools: Fix typos / broken sentences perf jevents: Add support for Hisi hip08 L3C PMU aliasing perf jevents: Add support for Hisi hip08 HHA PMU aliasing perf jevents: Add support for Hisi hip08 DDRC PMU aliasing perf pmu: Support more complex PMU event aliasing perf diff: Documentation -c cycles option ... commit b9411d73bd3eb5773d0ce02b8008ec21b7c447ce Author: Milan Broz Date: Tue Jul 9 15:22:14 2019 +0200 dm crypt: implement eboiv - encrypted byte-offset initialization vector This IV is used in some BitLocker devices with CBC encryption mode. IV is encrypted little-endian byte-offset (with the same key and cipher as the volume). Signed-off-by: Milan Broz Signed-off-by: Mike Snitzer drivers/md/dm-crypt.c | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 81 insertions(+), 1 deletion(-) commit 6028a7a5a3d604855728fd8da8f4708892b13764 Author: Milan Broz Date: Tue Jul 9 15:22:13 2019 +0200 dm crypt: remove obsolete comment about plumb IV The URL is no longer valid and the comment is obsolete anyway (the plumb IV was never used). Signed-off-by: Milan Broz Signed-off-by: Mike Snitzer drivers/md/dm-crypt.c | 3 --- 1 file changed, 3 deletions(-) commit 4a52ffc7ca6f03005ce10c67412752dd068f79a3 Author: Milan Broz Date: Tue Jul 9 15:22:12 2019 +0200 dm crypt: wipe private IV struct after key invalid flag is set If a private IV wipe function fails, the code does not set the key invalid flag. To fix this, move code to after the flag is set to prevent the device from resuming in an inconsistent state. Also, this allows using of a randomized key in private wipe function (to be used in a following commit). Signed-off-by: Milan Broz Signed-off-by: Mike Snitzer drivers/md/dm-crypt.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 131670c2625307551c23970ebcc0f8bc0fc9b4ef Author: Fuqian Huang Date: Fri Jun 28 10:47:34 2019 +0800 dm integrity: use kzalloc() instead of kmalloc() + memset() Signed-off-by: Fuqian Huang Signed-off-by: Mike Snitzer drivers/md/dm-integrity.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d370ad23a5553f9128da24e029993f4091bc04d7 Author: Pavel Begunkov Date: Thu Jun 20 20:50:50 2019 +0300 dm: update stale comment in end_clone_bio() Since commit a1ce35fa49852db60fc6e268 ("block: remove dead elevator code") blk_end_request() has been replaced with blk_mq_end_request(). So update comment to reference blk_mq_end_request() accordingly. Signed-off-by: Pavel Begunkov Signed-off-by: Mike Snitzer drivers/md/dm-rq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7537dad791cdbaf856c05f9dd977556ccd830ef0 Author: Qu Wenruo Date: Tue Jun 18 13:39:38 2019 +0800 dm log writes: fix incorrect comment about the logged sequence example dm-log-writes records the sequence of completion, not submission, thus for the following sequence (W=write, C=complete): Wa,Wb,Wc,Cc,Ca,FLUSH,FUAd,Cb,CFLUSH,CFUAd The logged results in log device should be: c,a,b,flush,fua Fix the comment to give a better example. Signed-off-by: Qu Wenruo Signed-off-by: Mike Snitzer drivers/md/dm-log-writes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d4e6e83651777224c0259e01dde5eb078f9e6b1d Author: Zhengyuan Liu Date: Wed Jun 12 14:14:46 2019 +0800 dm log writes: use struct_size() to calculate size of pending_block Use struct_size() to avoid open-coded equivalent that is prone to a type mistake. Signed-off-by: Zhengyuan Liu Signed-off-by: Mike Snitzer drivers/md/dm-log-writes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c81c99b242f1241e18573d1ce29f7479c168e38 Author: Zhengyuan Liu Date: Wed Jun 12 14:14:45 2019 +0800 dm crypt: use struct_size() when allocating encryption context Use struct_size() to avoid open-coded equivalent that is prone to a type mistake. Signed-off-by: Zhengyuan Liu Signed-off-by: Mike Snitzer drivers/md/dm-crypt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cdc5ffc4100549654e19e6f068cf1fc0871a85c2 Merge: 3b99107f0e02 120357ea176e Author: Linus Torvalds Date: Tue Jul 9 10:59:26 2019 -0700 Merge tag 'for-5.3/libata-20190708' of git://git.kernel.dk/linux-block Pull libata updates from Jens Axboe: "These are the changes that are reviewed, tested, and queued up for this merge window. This contains: - Removal of redundant memset after dmam_alloc_coherent (Fuqian) - Expand blacklist check for ST1000LM024, making it independent of firmware version (Hans) - Request sense fix (Tejun) - ahci_sunxi FIFO fix (Uenal)" * tag 'for-5.3/libata-20190708' of git://git.kernel.dk/linux-block: drivers: ata: ahci_sunxi: Increased SATA/AHCI DMA TX/RX FIFOs libata: Drop firmware version check from the ST1000LM024 quirk ata: sata_sil24: Remove call to memset after dmam_alloc_coherent ata:sata_qstor: Remove call to memset after dmam_alloc_coherent ata: sata_nv: Remove call to memset after dmam_alloc_coherent ata: pdc_adma: Remove call to memset after dmam_alloc_coherent ata: libahci: Remove call to memset after dmam_alloc_coherent ata: acard-ahci: Remove call to memset after dmam_alloc_coherent libata: don't request sense data on !ZAC ATA devices commit 4975223b8156c14f0537dcde1554f050fb4d29bf Author: Arnaldo Carvalho de Melo Date: Tue Jul 9 14:49:26 2019 -0300 perf tools: Introduce rlimit__bump_memlock() helper Just like the BPF guys did when faced with failures with map creation, etc, i.e. their solution is: tools/testing/selftests/bpf/bpf_rlimit.h For perf use this function in 'perf test' and in 'perf trace'. Make it bump to 4 times the current value, if it fails twice the current value and if it still fails, warn that things like BPF map creation may fail, to help in diagnosing the problem. Cc: Adrian Hunter Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-muvqef2i7n6pzqbmu7tn2d2y@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/Build | 1 + tools/perf/util/rlimit.c | 29 +++++++++++++++++++++++++++++ tools/perf/util/rlimit.h | 6 ++++++ 3 files changed, 36 insertions(+) commit 5f1c56b34e81e2d63f345f7ad6c5c7971c3c314d Author: Milan Broz Date: Wed May 22 13:29:44 2019 +0200 dm integrity: always set version on superblock update The new integrity bitmap mode uses the dirty flag. The dirty flag should not be set in older superblock versions. The current code sets it unconditionally, even if the superblock was already formatted without bitmap in older system. Fix this by moving the version check to one common place and check version on every superblock write. Signed-off-by: Milan Broz Signed-off-by: Mike Snitzer drivers/md/dm-integrity.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 3b99107f0e0298e6fe0787f75b8f3d8306dfb230 Merge: 0415052db4f9 c9b3007feca0 Author: Linus Torvalds Date: Tue Jul 9 10:45:06 2019 -0700 Merge tag 'for-5.3/block-20190708' of git://git.kernel.dk/linux-block Pull block updates from Jens Axboe: "This is the main block updates for 5.3. Nothing earth shattering or major in here, just fixes, additions, and improvements all over the map. This contains: - Series of documentation fixes (Bart) - Optimization of the blk-mq ctx get/put (Bart) - null_blk removal race condition fix (Bob) - req/bio_op() cleanups (Chaitanya) - Series cleaning up the segment accounting, and request/bio mapping (Christoph) - Series cleaning up the page getting/putting for bios (Christoph) - block cgroup cleanups and moving it to where it is used (Christoph) - block cgroup fixes (Tejun) - Series of fixes and improvements to bcache, most notably a write deadlock fix (Coly) - blk-iolatency STS_AGAIN and accounting fixes (Dennis) - Series of improvements and fixes to BFQ (Douglas, Paolo) - debugfs_create() return value check removal for drbd (Greg) - Use struct_size(), where appropriate (Gustavo) - Two lighnvm fixes (Heiner, Geert) - MD fixes, including a read balance and corruption fix (Guoqing, Marcos, Xiao, Yufen) - block opal shadow mbr additions (Jonas, Revanth) - sbitmap compare-and-exhange improvemnts (Pavel) - Fix for potential bio->bi_size overflow (Ming) - NVMe pull requests: - improved PCIe suspent support (Keith Busch) - error injection support for the admin queue (Akinobu Mita) - Fibre Channel discovery improvements (James Smart) - tracing improvements including nvmetc tracing support (Minwoo Im) - misc fixes and cleanups (Anton Eidelman, Minwoo Im, Chaitanya Kulkarni)" - Various little fixes and improvements to drivers and core" * tag 'for-5.3/block-20190708' of git://git.kernel.dk/linux-block: (153 commits) blk-iolatency: fix STS_AGAIN handling block: nr_phys_segments needs to be zero for REQ_OP_WRITE_ZEROES blk-mq: simplify blk_mq_make_request() blk-mq: remove blk_mq_put_ctx() sbitmap: Replace cmpxchg with xchg block: fix .bi_size overflow block: sed-opal: check size of shadow mbr block: sed-opal: ioctl for writing to shadow mbr block: sed-opal: add ioctl for done-mark of shadow mbr block: never take page references for ITER_BVEC direct-io: use bio_release_pages in dio_bio_complete block_dev: use bio_release_pages in bio_unmap_user block_dev: use bio_release_pages in blkdev_bio_end_io iomap: use bio_release_pages in iomap_dio_bio_end_io block: use bio_release_pages in bio_map_user_iov block: use bio_release_pages in bio_unmap_user block: optionally mark pages dirty in bio_release_pages block: move the BIO_NO_PAGE_REF check into bio_release_pages block: skd_main.c: Remove call to memset after dma_alloc_coherent block: mtip32xx: Remove call to memset after dma_alloc_coherent ... commit 0415052db4f92b7e272fc15802ad8b8be672deea Merge: 4b4704520d97 33ee09cd59ce Author: Linus Torvalds Date: Tue Jul 9 10:28:47 2019 -0700 Merge tag 'devprop-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull device properties framework updates from Rafael Wysocki: "These add helpers for counting items in a property array and extend the "software nodes" support to be more convenient for representing device properties supplied by drivers and make the intel_cht_int33fe driver use that. Specifics: - Add helpers to count items in a property array (Andy Shevchenko). - Extend "software nodes" support to be more convenient for representing device properties supplied by drivers (Heikki Krogerus). - Add device_find_child_by_name() helper to the driver core (Heikki Krogerus). - Extend device connection code to also look for references provided via fwnode pointers (Heikki Krogerus). - Start to register proper struct device objects for USB Type-C muxes and orientation switches (Heikki Krogerus). - Update the intel_cht_int33fe driver to describe devices in a more general way with the help of "software nodes" (Heikki Krogerus)" * tag 'devprop-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: device property: Add helpers to count items in an array platform/x86: intel_cht_int33fe: Replacing the old connections with references platform/x86: intel_cht_int33fe: Supply fwnodes for the external dependencies platform/x86: intel_cht_int33fe: Provide fwnode for the USB connector platform/x86: intel_cht_int33fe: Provide software nodes for the devices platform/x86: intel_cht_int33fe: Remove unused fusb302 device property platform/x86: intel_cht_int33fe: Register max17047 in its own function usb: typec: Registering real device entries for the muxes device connection: Find connections also by checking the references device property: Introduce fwnode_find_reference() ACPI / property: Don't limit named child node matching to data nodes driver core: Add helper device_find_child_by_name() software node: Add software_node_get_reference_args() software node: Use kobject name when finding child nodes by name software node: Add support for static node descriptors software node: Simplify software_node_release() function software node: Allow node creation without properties commit 4b4704520d97b74e045154fc3b844b73ae4e7ebd Merge: cf2d213e49fd 64372c0b7dcb Author: Linus Torvalds Date: Tue Jul 9 10:21:39 2019 -0700 Merge tag 'acpi-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI updates from Rafael Wysocki: "These update the ACPICA code in the kernel to upstream revision 20190703, fix up the handling of GPEs in ACPICA, allow some more ACPI code to be built on ARM64 platforms, allow BGRT to be overridden, fix minor issues and clean up assorted pieces of ACPI code. Specifics: - Update the ACPICA code in the kernel to upstream revision 20190703 including: - Initial/default namespace creation simplification (Bob Moore). - Object initialization sequence update (Bob Moore). - Removal of legacy module-level (dead) code (Erik Schmauss). - Table load object initialization update (Erik Schmauss, Nikolaus Voss). - Fix GPE enabling issue in ACPICA causing premature wakeups from suspend-to-idle to occur (Rafael Wysocki). - Allow ACPI AC and battery drivers to be built on non-X86 (Ard Biesheuvel). - Fix address space handler removal in the ACPI PMIC driver for Intel platforms (Andy Shevchenko). - Allow BGRT to be overridden via initrd or configfs (Andrea Oliveri). - Fix object resolution on table loads via configfs (Nikolaus Voss). - Clean up assorted pieces of ACPI code and tools (Colin Ian King, Liguang Zhang, Masahiro Yamada). - Fix documentation build warning, convert the extcon document to ReST and add it to the ACPI documentation (Mauro Carvalho Chehab, Qian Cai)" * tag 'acpi-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI / APEI: Remove needless __ghes_check_estatus() calls ACPICA: Update version to 20190703 ACPICA: Update table load object initialization ACPICA: Update for object initialization sequence ACPICA: remove legacy module-level code due to deprecation ACPICA: Namespace: simplify creation of the initial/default namespace ACPI / PMIC: intel: Drop double removal of address space handler ACPI: APD: remove redundant assignment to pointer clk docs: extcon: convert it to ReST and move to ACPI dir ACPI: Make AC and battery drivers available on !X86 ACPICA: Clear status of GPEs on first direct enable ACPI: configfs: Resolve objects on host-directed table loads ACPI: tables: Allow BGRT to be overridden ACPI: OSL: Make a W=1 kernel-doc warning go away ACPI: tools: Exclude tools/* from .gitignore patterns commit cf2d213e49fdf47e4c10dc629a3659e0026a54b8 Merge: 4cdd5f9186bb 586a07dca8c5 Author: Linus Torvalds Date: Tue Jul 9 10:05:22 2019 -0700 Merge tag 'pm-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management updates from Rafael Wysocki: "These update PCI and ACPI power management (improved handling of ACPI power resources and PCIe link delays, fixes related to corner cases, hibernation handling rework), fix and extend the operating performance points (OPP) framework, add new cpufreq drivers for Raspberry Pi and imx8m chips, update some other cpufreq drivers, clean up assorted pieces of PM code and documentation and update tools. Specifics: - Improve the handling of shared ACPI power resources in the PCI bus type layer (Mika Westerberg). - Make the PCI layer take link delays required by the PCIe spec into account as appropriate and avoid polling devices in D3cold for PME (Mika Westerberg). - Fix some corner case issues in ACPI device power management and in the PCI bus type layer, optimiza and clean up the handling of runtime-suspended PCI devices during system-wide transitions to sleep states (Rafael Wysocki). - Rework hibernation handling in the ACPI core and the PCI bus type to resume runtime-suspended devices before hibernation (which allows some functional problems to be avoided) and fix some ACPI power management issues related to hiberation (Rafael Wysocki). - Extend the operating performance points (OPP) framework to support a wider range of devices (Rajendra Nayak, Stehpen Boyd). - Fix issues related to genpd_virt_devs and issues with platforms using the set_opp() callback in the OPP framework (Viresh Kumar, Dmitry Osipenko). - Add new cpufreq driver for Raspberry Pi (Nicolas Saenz Julienne). - Add new cpufreq driver for imx8m and imx7d chips (Leonard Crestez). - Fix and clean up the pcc-cpufreq, brcmstb-avs-cpufreq, s5pv210, and armada-37xx cpufreq drivers (David Arcari, Florian Fainelli, Paweł Chmiel, YueHaibing). - Clean up and fix the cpufreq core (Viresh Kumar, Daniel Lezcano). - Fix minor issue in the ACPI system sleep support code and export one function from it (Lenny Szubowicz, Dexuan Cui). - Clean up assorted pieces of PM code and documentation (Kefeng Wang, Andy Shevchenko, Bart Van Assche, Greg Kroah-Hartman, Fuqian Huang, Geert Uytterhoeven, Mathieu Malaterre, Rafael Wysocki). - Update the pm-graph utility to v5.4 (Todd Brandt). - Fix and clean up the cpupower utility (Abhishek Goel, Nick Black)" * tag 'pm-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (57 commits) ACPI: PM: Make acpi_sleep_state_supported() non-static PM: sleep: Drop dev_pm_skip_next_resume_phases() ACPI: PM: Unexport acpi_device_get_power() Documentation: ABI: power: Add missing newline at end of file ACPI: PM: Drop unused function and function header ACPI: PM: Introduce "poweroff" callbacks for ACPI PM domain and LPSS ACPI: PM: Simplify and fix PM domain hibernation callbacks PCI: PM: Simplify bus-level hibernation callbacks PM: ACPI/PCI: Resume all devices during hibernation cpufreq: Avoid calling cpufreq_verify_current_freq() from handle_update() cpufreq: Consolidate cpufreq_update_current_freq() and __cpufreq_get() kernel: power: swap: use kzalloc() instead of kmalloc() followed by memset() cpufreq: Don't skip frequency validation for has_target() drivers PCI: PM/ACPI: Refresh all stale power state data in pci_pm_complete() PCI / ACPI: Add _PR0 dependent devices ACPI / PM: Introduce concept of a _PR0 dependent device PCI / ACPI: Use cached ACPI device state to get PCI device power state ACPI: PM: Allow transitions to D0 to occur in special cases ACPI: PM: Avoid evaluating _PS3 on transitions from D3hot to D3cold cpufreq: Use has_target() instead of !setpolicy ... commit 4cdd5f9186bbe80306e76f11da7ecb0b9720433c Merge: 2d41ef5432b7 0dcb4efb1095 Author: Linus Torvalds Date: Tue Jul 9 09:59:43 2019 -0700 Merge tag 'sound-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "Many updates in this development cycle are found in ASoC where it got a wide range of changes for the continued refactoring. Some highlights are below. ASoC: - Continued refactoring work by Morimoto-san toward the full componentization; the changes are seen allover the places - Support for force disconnecting muxes in DAPM - Continued development of ASoC Intel SOF stuff - New drivers for Cirrus Logic CS47L35, CS47L85 and CS47L90, Conexant CX2072X, Realtek RT1011 and RT1308 HD-audio: - More fixes and adjustments for ASoC SOF HD-audio - Fix for resume problem on some Realtek codecs USB-audio: - A few fixes for the issues reported by syzbot USB fuzzer - Fix for UAC2 extension unit parser - Quirks for Line6 Helix, Emgaic Unitor 8 FireWire: - Lots of code refactoring and fixes in most of its components" * tag 'sound-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (626 commits) ALSA: firewire-lib: code refactoring for local variables ALSA: firewire-lib: code refactoring for post operation to data block counter ALSA: firewire-lib: code refactoring for error path of parser for CIP header ALSA: firewire-lib: fix different data block counter between probed event and transferred isochronous packet ALSA: firewire-lib: fix initial value of data block count for IR context without CIP_DBC_IS_END_EVENT ALSA: firewire-lib/fireface: fix initial value of data block counter for IR context with CIP_NO_HEADER ALSA: firewire-lib: fix invalid length of rx packet payload for tracepoint events ALSA: usb-audio: fix Line6 Helix audio format rates firewire-motu: fix wrong reference count for stream functionality at error path of rawmidi interface ALSA: firewire-digi00x: fix wrong reference count for stream functionality at error path of rawmidi interface ALSA: dice: fix wrong reference count for stream functionality at error path of rawmidi interface ALSA: oxfw: fix wrong reference count for stream functionality at error path of rawmidi interface ALSA: fireworks: fix wrong reference count for stream functionality at error path of rawmidi interface ALSA: bebob: fix wrong reference count for stream functionality at error path of rawmidi interface ASoC: SOF: Intel: implement runtime idle for CNL/APL ASoC: SOF: add runtime idle callback ASoC: hdac_hdmi: report codec link up/down status to bus ASoC: SOF: debug: fix possible memory leak in sof_dfsentry_write() ASoC: sunxi: sun50i-codec-analog: Add earpiece ASoC: rt5665: remove redundant assignment to variable idx ... commit 2d41ef5432b76ae90dc0db93026f1d981f874ec4 Merge: ed63b9c87360 732146a3f1dc Author: Linus Torvalds Date: Tue Jul 9 09:55:45 2019 -0700 Merge tag 'fbdev-v5.3' of git://github.com/bzolnier/linux Pull fbdev updates from Bartlomiej Zolnierkiewicz: - remove fbdev notifier usage for fbcon (as prep work to clean up the fbcon locking), add locking checks in vt/console code and make assorted cleanups in fbdev and backlight code (Daniel Vetter) - add COMPILE_TEST support to atmel_lcdfb, da8xx-fb, gbefb, imxfb, pvr2fb and pxa168fb drivers (me) - fix DMA API abuse in au1200fb and jz4740_fb drivers (Christoph Hellwig) - add check for new BGRT status field rotation bits in efifb driver (Hans de Goede) - mark expected switch fall-throughs in s3c-fb driver (Gustavo A. R. Silva) - remove fbdev mxsfb driver in favour of the drm version (Fabio Estevam) - remove broken rfbi code from omap2fb driver (me) - misc fixes (Arnd Bergmann, Shobhit Kukreti, Wei Yongjun, me) - misc cleanups (Gustavo A. R. Silva, Colin Ian King, me) * tag 'fbdev-v5.3' of git://github.com/bzolnier/linux: (62 commits) video: fbdev: imxfb: fix a typo in imxfb_probe() video: fbdev: s3c-fb: Mark expected switch fall-throughs video: fbdev: s3c-fb: fix sparse warnings about using incorrect types video: fbdev: don't print error message on framebuffer_alloc() failure video: fbdev: intelfb: return -ENOMEM on framebuffer_alloc() failure video: fbdev: s3c-fb: return -ENOMEM on framebuffer_alloc() failure vga_switcheroo: Depend upon fbcon being built-in, if enabled video: fbdev: omap2: remove rfbi video: fbdev: atmel_lcdfb: remove redundant initialization to variable ret video: fbdev-MMP: Use struct_size() in devm_kzalloc() video: fbdev: controlfb: fix warnings about comparing pointer to 0 efifb: BGRT: Add check for new BGRT status field rotation bits jz4740_fb: fix DMA API abuse video: fbdev: pvr2fb: fix link error for pvr2fb_pci_exit video: fbdev: s3c-fb: add COMPILE_TEST support video: fbdev: imxfb: fix sparse warnings about using incorrect types video: fbdev: pvr2fb: fix build warning when compiling as module fbcon: Export fbcon_update_vcs backlight: simplify lcd notifier staging/olpc_dcon: Add drm conversion to TODO ... commit ed63b9c873601ca113da5c7b1745e3946493e9f3 Merge: 947fbd4ca9fb f81cbfc4f82a Author: Linus Torvalds Date: Tue Jul 9 09:47:22 2019 -0700 Merge tag 'media/v5.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: - new Atmel microship ISC driver - coda has gained support for mpeg2 and mpeg4 - cxusb gained support for analog TV - rockchip staging driver was split into two separate staging drivers - added a new staging driver for Allegro DVT video IP core - added a new staging driver for Amlogic Meson video decoder - lots of improvements and cleanups * tag 'media/v5.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (398 commits) media: allegro: use new v4l2_m2m_ioctl_try_encoder_cmd funcs media: doc-rst: Fix typos media: radio-raremono: change devm_k*alloc to k*alloc media: stv0297: fix frequency range limit media: rc: Prefer KEY_NUMERIC_* for number buttons on remotes media: dvb_frontend: split dvb_frontend_handle_ioctl function media: mceusb: disable "nonsensical irdata" messages media: rc: remove redundant dev_err message media: cec-notifier: add new notifier functions media: cec: add struct cec_connector_info support media: cec-notifier: rename variables, check kstrdup and n->conn_name media: MAINTAINERS: Add maintainers for Media Controller media: staging: media: tegra-vde: Defer dmabuf's unmapping media: staging: media: tegra-vde: Add IOMMU support media: hdpvr: fix locking and a missing msleep media: v4l2: Test type instead of cfg->type in v4l2_ctrl_new_custom() media: atmel: atmel-isc: fix i386 build error media: v4l2-ctrl: Move compound control initialization media: hantro: Use vb2_get_buffer media: pci: cx88: Change the type of 'missed' to u64 ... commit 947fbd4ca9fb38f320b076e68cfccab977c5ea01 Merge: 6b04014f3f15 d8655e7630da Author: Linus Torvalds Date: Tue Jul 9 09:43:20 2019 -0700 Merge tag 'please-pull-for_5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras Pull EDAC updates from Tony Luck: "All the bits that Boris had queued in his tree plus four patches to add support for Intel Icelake Xeon and then fix a few corner cases" * tag 'please-pull-for_5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras: EDAC: Fix global-out-of-bounds write when setting edac_mc_poll_msec EDAC, skx, i10nm: Fix source ID register offset EDAC, i10nm: Check ECC enabling status per channel EDAC, i10nm: Add Intel additional Ice-Lake support EDAC: Make edac_debugfs_create_x*() return void EDAC/aspeed: Remove set but not used variable 'np' EDAC/ie31200: Reformat PCI device table EDAC/ie31200: Add Intel Coffee Lake CPU support EDAC/sifive: Add EDAC platform driver for SiFive SoCs EDAC/sb_edac: Remove redundant update of tad_base arm64: dts: stratix10: Add SDMMC EDAC node EDAC/altera: Add Stratix10 SDMMC support arm64: dts: stratix10: Add OCRAM EDAC node EDAC/altera: Add Stratix10 OCRAM ECC support EDAC/sysfs: Drop device references properly EDAC/sysfs: Fix memory leak when creating a csrow object commit af3366308ea4c5473dfa5d2ace66b45cd3b1aec0 Author: Andy Shevchenko Date: Tue Jul 9 19:13:59 2019 +0300 tools: PCI: Fix installation when `make tools/pci_install` The commit c9a707875053 ("tools pci: Do not delete pcitest.sh in 'make clean'") fixed a `make tools clean` issue and simultaneously brought a regression to the installation process: for script in .../tools/pci/pcitest.sh; do \ install $script .../usr/usr/bin; \ done install: cannot stat '.../tools/pci/pcitest.sh': No such file or directory Update the install commands to fix the remaining issue. Signed-off-by: Andy Shevchenko Signed-off-by: Lorenzo Pieralisi Acked-by: Kishon Vijay Abraham I Cc: Jean-Jacques Hiblot Cc: Kishon Vijay Abraham I Cc: Lorenzo Pieralisi Cc: Arnaldo Carvalho de Melo tools/pci/Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 381ed79c8655a40268ee7391f716edd90c5c3a97 Author: YueHaibing Date: Fri Jun 14 23:40:44 2019 +0800 PCI: dwc: pci-dra7xx: Fix compilation when !CONFIG_GPIOLIB If CONFIG_GPIOLIB is not selected the compilation results in the following build errors: drivers/pci/controller/dwc/pci-dra7xx.c: In function dra7xx_pcie_probe: drivers/pci/controller/dwc/pci-dra7xx.c:777:10: error: implicit declaration of function devm_gpiod_get_optional; did you mean devm_regulator_get_optional? [-Werror=implicit-function-declaration] reset = devm_gpiod_get_optional(dev, NULL, GPIOD_OUT_HIGH); drivers/pci/controller/dwc/pci-dra7xx.c:778:45: error: ‘GPIOD_OUT_HIGH’ undeclared (first use in this function); did you mean ‘GPIOF_INIT_HIGH’? reset = devm_gpiod_get_optional(dev, NULL, GPIOD_OUT_HIGH); ^~~~~~~~~~~~~~ GPIOF_INIT_HIGH Fix them by including the appropriate header file. Reported-by: Hulk Robot Signed-off-by: YueHaibing [lorenzo.pieralisi@arm.com: commit log] Signed-off-by: Lorenzo Pieralisi Acked-by: Kishon Vijay Abraham I drivers/pci/controller/dwc/pci-dra7xx.c | 1 + 1 file changed, 1 insertion(+) commit 6b04014f3f151ed62878327813859e76e8e23d78 Merge: c6b6cebbc597 d95c3885865b Author: Linus Torvalds Date: Tue Jul 9 09:21:02 2019 -0700 Merge tag 'iommu-updates-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull iommu updates from Joerg Roedel: - Make the dma-iommu code more generic so that it can be used outside of the ARM context with other IOMMU drivers. Goal is to make use of it on x86 too. - Generic IOMMU domain support for the Intel VT-d driver. This driver now makes more use of common IOMMU code to allocate default domains for the devices it handles. - An IOMMU fault reporting API to userspace. With that the IOMMU fault handling can be done in user-space, for example to forward the faults to a VM. - Better handling for reserved regions requested by the firmware. These can be 'relaxed' now, meaning that those don't prevent a device being attached to a VM. - Suspend/Resume support for the Renesas IOMMU driver. - Added support for dumping SVA related fields of the DMAR table in the Intel VT-d driver via debugfs. - A pile of smaller fixes and cleanups. * tag 'iommu-updates-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (90 commits) iommu/omap: No need to check return value of debugfs_create functions iommu/arm-smmu-v3: Invalidate ATC when detaching a device iommu/arm-smmu-v3: Fix compilation when CONFIG_CMA=n iommu/vt-d: Cleanup unused variable iommu/amd: Flush not present cache in iommu_map_page iommu/amd: Only free resources once on init error iommu/amd: Move gart fallback to amd_iommu_init iommu/amd: Make iommu_disable safer iommu/io-pgtable: Support non-coherent page tables iommu/io-pgtable: Replace IO_PGTABLE_QUIRK_NO_DMA with specific flag iommu/io-pgtable-arm: Add support to use system cache iommu/arm-smmu-v3: Increase maximum size of queues iommu/vt-d: Silence a variable set but not used iommu/vt-d: Remove an unused variable "length" iommu: Fix integer truncation iommu: Add padding to struct iommu_fault iommu/vt-d: Consolidate domain_init() to avoid duplication iommu/vt-d: Cleanup after delegating DMA domain to generic iommu iommu/vt-d: Fix suspicious RCU usage in probe_acpi_namespace_devices() iommu/vt-d: Allow DMA domain attaching to rmrr locked device ... commit c6b6cebbc597aaf7d941f781b5fc114c58cc3352 Merge: 98537ee92fb1 26ac56506b0e Author: Linus Torvalds Date: Tue Jul 9 09:17:59 2019 -0700 Merge tag 'spi-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi updates from Mark Brown: "For the most part this is a quiet release for SPI, though there's several of the more widely used drivers that have had some fairly substantial development done on them, mainly improving performance and adding support for some more obscure use cases. Summary: - Support for configuring a minimum time for chip select to be deasserted between transfers from Martin Sperl. - A rework of the ACPI device instantiation code from Ard Biesheuvel. - Fairly substantial development on the AT91 USART, BCM2835 and Tegra114 drivers. - New driver for Socionext SynQuacer" * tag 'spi-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (58 commits) spi: pxa2xx: Add support for Intel Elkhart Lake spi: atmel-quadspi: fix resume call spi: atmel-quadspi: void return type for atmel_qspi_init() spi: pxa2xx: Set minimum transfer speed spi: stm32-qspi: remove signal sensitive on completion dt-bindings: spi: stm32-qspi: add dma properties spi: uniphier: fix zero-length transfer spi: uniphier: fix timeout error spi/acpi: avoid spurious matches during slave enumeration spi: spi-stm32-qspi: Remove CR_FTHRES_MASK usage spi: fix ctrl->num_chipselect constraint spi: spi-synquacer: Fixed build on architectures missing readsl/writesl series spi/acpi: fix incorrect ACPI parent check spi: don't open code list_for_each_entry_safe_reverse() spi: No need to assign dummy value in spi_unregister_controller() spi: Add a prototype for exported spi_set_cs_timing() spi/acpi: enumerate all SPI slaves in the namespace spi: qup: fix PIO/DMA transfers. spi: Use struct_size() helper spi: mediatek: add SPI_LSB_FIRST support ... commit 98537ee92fb1b17a7f36dcbc8d2e4087af300da6 Merge: 12a5146bda2f 0ed4513c9a32 Author: Linus Torvalds Date: Tue Jul 9 09:15:03 2019 -0700 Merge tag 'regulator-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator updates from Mark Brown: "A couple of new features in the core, the most interesting one being support for complex regulator coupling configurations initially targeted at nVidia Tegra SoCs, and some new drivers but otherwise quite a quiet release. Summary: - Core support for gradual ramping of voltages for devices that can't manage large changes in hardware from Bartosz Golaszewski. - Core support for systems that have complex coupling requirements best described via code, contributed by Dmitry Osipenko. - New drivers for Dialog SLG51000, Qualcomm PM8005 and ST Microelectronics STM32-Booster" * tag 'regulator-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (52 commits) regulator: max77650: use vsel_step regulator: implement selector stepping regulator: max77650: add MODULE_ALIAS() regulator: max77620: remove redundant assignment to variable ret dt-bindings: regulator: add support for the stm32-booster regulator: add support for the stm32-booster regulator: s2mps11: Adjust supported buck voltages to real values regulator: s2mps11: Fix buck7 and buck8 wrong voltages gpio: Fix return value mismatch of function gpiod_get_from_of_node() regulator: core: Expose some of core functions needed by couplers regulator: core: Introduce API for regulators coupling customization regulator: s2mps11: Add support for disabling S2MPS11 regulators in suspend regulator: s2mps11: Reduce number of rdev_get_id() calls regulator: qcom_spmi: Do NULL check for lvs regulator: qcom_spmi: Fix math of spmi_regulator_set_voltage_time_sel regulator: da9061/62: Adjust LDO voltage selection minimum value regulator: s2mps11: Fix ERR_PTR dereference on GPIO lookup failure regulator: qcom_spmi: add PMS405 SPMI regulator dt-bindings: qcom_spmi: Document pms405 support arm64: dts: msm8998-mtp: Add pm8005_s1 regulator ... commit 12a5146bda2f21728bdd475f10e5785fc62c9c29 Merge: 2ec98f567888 aaccf3863ce2 Author: Linus Torvalds Date: Tue Jul 9 09:11:22 2019 -0700 Merge tag 'regmap-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap Pull regmap updates from Mark Brown: "This is a relatively busy release for regmap, though not busy in the grand scheme of things, with the addition of support for I3C from Vitor Soares and a few small fixes and cleanups" * tag 'regmap-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap: select CONFIG_REGMAP while REGMAP_SCCB is set regmap: lzo: Switch to bitmap_zalloc() regmap: fix bulk writes on paged registers regmap: add i3c bus support regmap: debugfs: Fix memory leak in regmap_debugfs_init commit 671f9a3e2e24cdeb2d2856abee7422f093e23e29 Author: Anup Patel Date: Fri Jun 28 13:36:21 2019 -0700 RISC-V: Setup initial page tables in two stages Currently, the setup_vm() does initial page table setup in one-shot very early before enabling MMU. Due to this, the setup_vm() has to map all possible kernel virtual addresses since it does not know size and location of RAM. This means we have kernel mappings for non-existent RAM and any buggy driver (or kernel) code doing out-of-bound access to RAM will not fault and cause underterministic behaviour. Further, the setup_vm() creates PMD mappings (i.e. 2M mappings) for RV64 systems. This means for PAGE_OFFSET=0xffffffe000000000 (i.e. MAXPHYSMEM_128GB=y), the setup_vm() will require 129 pages (i.e. 516 KB) of memory for initial page tables which is never freed. The memory required for initial page tables will further increase if we chose a lower value of PAGE_OFFSET (e.g. 0xffffff0000000000) This patch implements two-staged initial page table setup, as follows: 1. Early (i.e. setup_vm()): This stage maps kernel image and DTB in a early page table (i.e. early_pg_dir). The early_pg_dir will be used only by boot HART so it can be freed as-part of init memory free-up. 2. Final (i.e. setup_vm_final()): This stage maps all possible RAM banks in the final page table (i.e. swapper_pg_dir). The boot HART will start using swapper_pg_dir at the end of setup_vm_final(). All non-boot HARTs directly use the swapper_pg_dir created by boot HART. We have following advantages with this new approach: 1. Kernel mappings for non-existent RAM don't exists anymore. 2. Memory consumed by initial page tables is now indpendent of the chosen PAGE_OFFSET. 3. Memory consumed by initial page tables on RV64 system is 2 pages (i.e. 8 KB) which has significantly reduced and these pages will be freed as-part of the init memory free-up. The patch also provides a foundation for implementing strict kernel mappings where we protect kernel text and rodata using PTE permissions. Suggested-by: Mike Rapoport Signed-off-by: Anup Patel [paul.walmsley@sifive.com: updated to apply; fixed a checkpatch warning] Signed-off-by: Paul Walmsley arch/riscv/include/asm/fixmap.h | 5 + arch/riscv/include/asm/pgtable-64.h | 5 + arch/riscv/include/asm/pgtable.h | 8 + arch/riscv/kernel/head.S | 17 +- arch/riscv/kernel/setup.c | 6 +- arch/riscv/mm/init.c | 307 ++++++++++++++++++++++++++++++------ 6 files changed, 284 insertions(+), 64 deletions(-) commit 2ec98f567888501df0140c858af5f5ea10216a6f Merge: 96407298ff6e 9b3b623804a6 Author: Linus Torvalds Date: Tue Jul 9 09:07:00 2019 -0700 Merge tag 'gpio-v5.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO updates from Linus Walleij: "This is the big slew of GPIO changes for the v5.3 kernel cycle. This is mostly incremental work this time. Three important things: - The FMC subsystem is deleted through my tree. This happens through GPIO as its demise was discussed in relation to a patch decoupling its GPIO implementation from the standard way of handling GPIO. As it turns out, that is not the only subsystem it reimplements and the authors think it is better do scratch it and start over using the proper kernel subsystems than try to polish the rust shiny. See the commit (ACKed by the maintainers) for details. - Arnd made a small devres patch that was ACKed by Greg and goes into the device core. - SPDX header change colissions may happen, because at times I've seen that quite a lot changed during the -rc:s in regards to SPDX. (It is good stuff, tglx has me convinced, and it is worth the occasional pain.) Apart from this is is nothing controversial or problematic. Summary: Core: - When a gpio_chip request GPIOs from itself, it can now fully control the line characteristics, both machine and consumer flags. This makes a lot of sense, but took some time before I figured out that this is how it has to work. - Several smallish documentation fixes. New drivers: - The PCA953x driver now supports the TI TCA9539. - The DaVinci driver now supports the K3 AM654 SoCs. Driver improvements: - Major overhaul and hardening of the OMAP driver by Russell King. - Starting to move some drivers to the new API passing irq_chip along with the gpio_chip when adding the gpio_chip instead of adding it separately. Unrelated: - Delete the FMC subsystem" * tag 'gpio-v5.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (87 commits) Revert "gpio: tegra: Clean-up debugfs initialisation" gpiolib: Use spinlock_t instead of struct spinlock gpio: stp-xway: allow compile-testing gpio: stp-xway: get rid of the #include dependency gpio: stp-xway: improve module clock error handling gpio: stp-xway: simplify error handling in xway_stp_probe() gpiolib: Clarify use of non-sleeping functions gpiolib: Fix references to gpiod_[gs]et_*value_cansleep() variants gpiolib: Document new gpio_chip.init_valid_mask field Documentation: gpio: Fix reference to gpiod_get_array() gpio: pl061: drop duplicate printing of device name gpio: altera: Pass irqchip when adding gpiochip gpio: siox: Use devm_ managed gpiochip gpio: siox: Add struct device *dev helper variable gpio: siox: Pass irqchip when adding gpiochip drivers: gpio: amd-fch: make resource struct const devres: allow const resource arguments gpio: ath79: Pass irqchip when adding gpiochip gpio: tegra: Clean-up debugfs initialisation gpio: siox: Switch to IRQ_TYPE_NONE ... commit 96407298ff6ef59c4554833d47d29c775d1e7652 Merge: 8a3367cc8005 ede2001569c3 Author: Linus Torvalds Date: Tue Jul 9 09:04:31 2019 -0700 Merge tag 'i3c/for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux Pull ic3 updates from Boris Brezillon: - Drop support for 10-bit I2C addresses - Add support for limited bus mode - Fix the Cadence DT binding doc - Use struct_size() to allocate a DEFSLVS packet * tag 'i3c/for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux: i3c: master: Use struct_size() helper dt-bindings: i3c: cdns: Use correct cells for I2C device i3c: dw: add limited bus mode support i3c: add mixed limited bus mode i3c: fix i2c and i3c scl rate by bus mode dt-bindings: i3c: Document dropped support for I2C 10 bit devices i3c: Drop support for I2C 10 bit addresing commit 8a3367cc8005842efcefc0cb5c29780370818572 Merge: 6e2bbb688aa6 2605085fba22 Author: Linus Torvalds Date: Tue Jul 9 08:59:39 2019 -0700 Merge tag 'leds-for-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds Pull LED updates from Jacek Anaszewski: - Add a new LED common module for ti-lmu driver family - Modify MFD ti-lmu bindings - add ti,brightness-resolution - add the ramp up/down property - Add regulator support for LM36274 driver to lm363x-regulator.c - New LED class drivers with DT bindings: - leds-spi-byte - leds-lm36274 - leds-lm3697 (move the support from MFD to LED subsystem) - Simplify getting the I2C adapter of a client: - leds-tca6507 - leds-pca955x - Convert LED documentation to ReST * tag 'leds-for-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds: dt: leds-lm36274.txt: fix a broken reference to ti-lmu.txt docs: leds: convert to ReST leds: leds-tca6507: simplify getting the adapter of a client leds: leds-pca955x: simplify getting the adapter of a client leds: lm36274: Introduce the TI LM36274 LED driver dt-bindings: leds: Add LED bindings for the LM36274 regulator: lm363x: Add support for LM36274 mfd: ti-lmu: Add LM36274 support to the ti-lmu dt-bindings: mfd: Add lm36274 bindings to ti-lmu leds: max77650: Remove set but not used variable 'parent' leds: avoid flush_work in atomic context leds: lm3697: Introduce the lm3697 driver mfd: ti-lmu: Remove support for LM3697 dt-bindings: ti-lmu: Modify dt bindings for the LM3697 leds: TI LMU: Add common code for TI LMU devices leds: spi-byte: add single byte SPI LED driver dt-bindings: leds: Add binding for spi-byte LED. dt-bindings: mfd: LMU: Add ti,brightness-resolution dt-bindings: mfd: LMU: Add the ramp up/down property commit 6e2bbb688aa6d05073dd1dd0b836d9becec195c1 Merge: 5ad18b2e60b7 3d25025ce9c2 Author: Linus Torvalds Date: Tue Jul 9 08:57:45 2019 -0700 Merge tag 'pwm/for-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm Pull pwm updates from Thierry Reding: "This set of changes contains a new driver for SiFive SoCs as well as enhancements to the core (device links are used to track dependencies between PWM providers and consumers, support for PWM controllers via ACPI, sysfs will now suspend/resume PWMs that it has claimed) and various existing drivers" * tag 'pwm/for-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: (37 commits) pwm: fsl-ftm: Make sure to unlock mutex on failure pwm: fsl-ftm: Use write protection for prescaler & polarity pwm: fsl-ftm: More relaxed permissions for updating period pwm: atmel-hlcdc: Add compatible for SAM9X60 HLCDC's PWM pwm: bcm2835: Improve precision of PWM leds: pwm: Support ACPI via firmware-node framework pwm: Add support referencing PWMs from ACPI pwm: rcar: Remove suspend/resume support pwm: sysfs: Add suspend/resume support pwm: Add power management descriptions pwm: meson: Add documentation to the driver pwm: meson: Add support PWM_POLARITY_INVERSED when disabling pwm: meson: Don't cache struct pwm_state internally pwm: meson: Read the full hardware state in meson_pwm_get_state() pwm: meson: Simplify the calculation of the pre-divider and count pwm: meson: Move pwm_set_chip_data() to meson_pwm_request() pwm: meson: Add the per-channel register offsets and bits in a struct pwm: meson: Add the meson_pwm_channel data to struct meson_pwm pwm: meson: Pass struct pwm_device to meson_pwm_calc() pwm: meson: Don't duplicate the polarity internally ... commit 0df5c39b3e4204b3ed0079d0fa14f3001c6285fe Author: Darrick J. Wong Date: Mon Jul 8 19:36:17 2019 -0700 xfs: bump INUMBERS cursor correctly in xfs_inumbers_walk There's a subtle unit conversion error when we increment the INUMBERS cursor at the end of xfs_inumbers_walk. If there's an inode chunk at the very end of the AG /and/ the AG size is a perfect power of two, the startino of that last chunk (which is in units of AG inodes) will be 63 less than (1 << agino_log). If we add XFS_INODES_PER_CHUNK to the startino, we end up with a startino that's larger than (1 << agino_log) and when we convert that back to fs inode units we'll rip off that upper bit and wind up back at the start of the AG. Fix this by converting to units of fs inodes before adding XFS_INODES_PER_CHUNK so that we'll harmlessly end up pointing to the next AG. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/xfs_itable.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 62a92ba97a31c544802bbf13d3a998e86796d548 Author: Chuck Lever Date: Wed Jun 19 10:34:09 2019 -0400 NFS: Record task, client ID, and XID in xdr_status trace points When triggering an nfs_xdr_status trace point, record the task ID and XID of the failing RPC to better pinpoint the problem. This feels like a bit of a layering violation. Suggested-by: Trond Myklebust Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker fs/nfs/nfs2xdr.c | 2 +- fs/nfs/nfs3xdr.c | 2 +- fs/nfs/nfs4trace.h | 15 +++++++++++++-- fs/nfs/nfs4xdr.c | 2 +- fs/nfs/nfstrace.h | 15 +++++++++++++-- 5 files changed, 29 insertions(+), 7 deletions(-) commit 7d4006c161ad8cded95f80f43b5fecc36e781497 Author: Chuck Lever Date: Wed Jun 19 10:34:03 2019 -0400 NFS: Update symbolic flags displayed by trace events Add missing symbolic flag names and display flags variables in hexadecimal to improve observability. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker fs/nfs/nfstrace.h | 150 ++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 124 insertions(+), 26 deletions(-) commit 38a638a72a349c6afb48ca1612b4e58bbe168ff8 Author: Chuck Lever Date: Wed Jun 19 10:33:58 2019 -0400 NFS: Display symbolic status code names in trace log For improved readability, add nfs_show_status() call-sites in the generic NFS trace points so that the symbolic status code name is displayed. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker fs/nfs/nfstrace.h | 76 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 41 insertions(+), 35 deletions(-) commit 96650e2effa2dbc9d5002fed0c2f8a72de082918 Author: Chuck Lever Date: Wed Jun 19 10:33:53 2019 -0400 NFS: Fix show_nfs_errors macros again I noticed that NFS status values stopped working again. trace_print_symbols_seq() takes an unsigned long. Passing a negative errno or negative NFSERR value just confuses it, and since we're using C macros here and not static inline functions, all bets are off due to implicit type conversion. Straight-line the calling conventions so that error codes are stored in the trace record as positive values in an unsigned long field, mapped to symbolic as an unsigned long, and displayed as a negative value, to continue to enable grepping on "error=-". It's often the case that an error value that is positive is a byte count but when it's negative, it's an error (e.g. nfs4_write). Fix those cases so that the value that is eventually stored in the error field is a positive NFS status or errno, or zero. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker fs/nfs/nfs4trace.h | 164 ++++++++++++++++++++++++++--------------------------- 1 file changed, 82 insertions(+), 82 deletions(-) commit c5833f0dc4cef778a718ad7d00df38e199045997 Author: Chuck Lever Date: Wed Jun 19 10:33:47 2019 -0400 NFS4: Add a trace event to record invalid CB sequence IDs Help debug NFSv4 callback failures. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker fs/nfs/callback_proc.c | 28 ++++++++++++++++++++-------- fs/nfs/nfs4trace.h | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 8 deletions(-) commit 675dd90ad0932f2c03912a5252458d792bd7033a Author: Chuck Lever Date: Wed Jun 19 10:33:42 2019 -0400 xprtrdma: Modernize ops->connect Adapt and apply changes that were made to the TCP socket connect code. See the following commits for details on the purpose of these changes: Commit 7196dbb02ea0 ("SUNRPC: Allow changing of the TCP timeout parameters on the fly") Commit 3851f1cdb2b8 ("SUNRPC: Limit the reconnect backoff timer to the max RPC message timeout") Commit 02910177aede ("SUNRPC: Fix reconnection timeouts") Some common transport code is moved to xprt.c to satisfy the code duplication police. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker include/linux/sunrpc/xprt.h | 3 ++ include/trace/events/rpcrdma.h | 31 +++++++++++++++++++ net/sunrpc/sched.c | 1 + net/sunrpc/xprt.c | 32 ++++++++++++++++++++ net/sunrpc/xprtrdma/transport.c | 66 +++++++++++++++++++++++++++++++---------- net/sunrpc/xprtrdma/xprt_rdma.h | 1 + net/sunrpc/xprtsock.c | 23 ++------------ 7 files changed, 121 insertions(+), 36 deletions(-) commit 5828cebad1c8d535f3c194439e394e92a2273fb2 Author: Chuck Lever Date: Wed Jun 19 10:33:36 2019 -0400 xprtrdma: Remove rpcrdma_req::rl_buffer Clean up. There is only one remaining function, rpcrdma_buffer_put(), that uses this field. Its caller can supply a pointer to the correct rpcrdma_buffer, enabling the removal of an 8-byte pointer field from a frequently-allocated shared data structure. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/transport.c | 5 ++++- net/sunrpc/xprtrdma/verbs.c | 6 ++---- net/sunrpc/xprtrdma/xprt_rdma.h | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) commit 6a6c6def42469ce08023458ba439a8207fe87ae4 Author: Chuck Lever Date: Wed Jun 19 10:33:31 2019 -0400 xprtrdma: Refactor chunk encoding Clean up. Move the "not present" case into the individual chunk encoders. This improves code organization and readability. The reason for the original organization was to optimize for the case where there there are no chunks. The optimization turned out to be inconsequential, so let's err on the side of code readability. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/rpc_rdma.c | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) commit 9ef33ef5b628037b694a433f8af014a04bb38126 Author: Chuck Lever Date: Wed Jun 19 10:33:26 2019 -0400 xprtrdma: Streamline rpcrdma_post_recvs rb_lock is contended between rpcrdma_buffer_create, rpcrdma_buffer_put, and rpcrdma_post_recvs. Commit e340c2d6ef2a ("xprtrdma: Reduce the doorbell rate (Receive)") causes rpcrdma_post_recvs to take the rb_lock repeatedly when it determines more Receives are needed. Streamline this code path so it takes the lock just once in most cases to build the Receive chain that is about to be posted. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/verbs.c | 59 +++++++++++++++++++++++++++++---------------- 1 file changed, 38 insertions(+), 21 deletions(-) commit 379d1bc5be373c920bcda16b9894ae99505ea127 Author: Chuck Lever Date: Wed Jun 19 10:33:20 2019 -0400 xprtrdma: Simplify rpcrdma_rep_create Clean up. Commit 7c8d9e7c8863 ("xprtrdma: Move Receive posting to Receive handler") reduced the number of rpcrdma_rep_create call sites to one. After that commit, the backchannel code no longer invokes it. Therefore the free list logic added by commit d698c4a02ee0 ("xprtrdma: Fix backchannel allocation of extra rpcrdma_reps") is no longer necessary, and in fact adds some extra overhead that we can do without. Simply post any newly created reps. They will get added back to the rb_recv_bufs list when they subsequently complete. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/verbs.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) commit 0ab115237025f5e379620bbcd56a02697d07b002 Author: Chuck Lever Date: Wed Jun 19 10:33:15 2019 -0400 xprtrdma: Wake RPCs directly in rpcrdma_wc_send path Eliminate a context switch in the path that handles RPC wake-ups when a Receive completion has to wait for a Send completion. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/rpc_rdma.c | 61 ++++++++++++++++------------------------- net/sunrpc/xprtrdma/transport.c | 10 ++++++- net/sunrpc/xprtrdma/verbs.c | 3 +- net/sunrpc/xprtrdma/xprt_rdma.h | 12 ++------ 4 files changed, 36 insertions(+), 50 deletions(-) commit d8099feda4833bab96b1bf312e9e6aad6b771570 Author: Chuck Lever Date: Wed Jun 19 10:33:10 2019 -0400 xprtrdma: Reduce context switching due to Local Invalidation Since commit ba69cd122ece ("xprtrdma: Remove support for FMR memory registration"), FRWR is the only supported memory registration mode. We can take advantage of the asynchronous nature of FRWR's LOCAL_INV Work Requests to get rid of the completion wait by having the LOCAL_INV completion handler take care of DMA unmapping MRs and waking the upper layer RPC waiter. This eliminates two context switches when local invalidation is necessary. As a side benefit, we will no longer need the per-xprt deferred completion work queue. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker include/trace/events/rpcrdma.h | 1 + net/sunrpc/xprtrdma/frwr_ops.c | 103 +++++++++++++++++++++++++++++++++++++++- net/sunrpc/xprtrdma/rpc_rdma.c | 61 ++++++++++++------------ net/sunrpc/xprtrdma/verbs.c | 17 ------- net/sunrpc/xprtrdma/xprt_rdma.h | 8 ++-- 5 files changed, 137 insertions(+), 53 deletions(-) commit 40088f0e9b62d7fa033918b54ef45f8bf7d1ad1c Author: Chuck Lever Date: Wed Jun 19 10:33:04 2019 -0400 xprtrdma: Add mechanism to place MRs back on the free list When a marshal operation fails, any MRs that were already set up for that request are recycled. Recycling releases MRs and creates new ones, which is expensive. Since commit f2877623082b ("xprtrdma: Chain Send to FastReg WRs") was merged, recycling FRWRs is unnecessary. This is because before that commit, frwr_map had already posted FAST_REG Work Requests, so ownership of the MRs had already been passed to the NIC and thus dealing with them had to be delayed until they completed. Since that commit, however, FAST_REG WRs are posted at the same time as the Send WR. This means that if marshaling fails, we are certain the MRs are safe to simply unmap and place back on the free list because neither the Send nor the FAST_REG WRs have been posted yet. The kernel still has ownership of the MRs at this point. This reduces the total number of MRs that the xprt has to create under heavy workloads and makes the marshaling logic less brittle. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/frwr_ops.c | 20 ++++++++++++++++++++ net/sunrpc/xprtrdma/rpc_rdma.c | 1 + net/sunrpc/xprtrdma/xprt_rdma.h | 1 + 3 files changed, 22 insertions(+) commit 847568942f93e0af77e4bb8a098899f310cb3a88 Author: Chuck Lever Date: Wed Jun 19 10:32:59 2019 -0400 xprtrdma: Remove fr_state Now that both the Send and Receive completions are handled in process context, it is safe to DMA unmap and return MRs to the free or recycle lists directly in the completion handlers. Doing this means rpcrdma_frwr no longer needs to track the state of each MR, meaning that a VALID or FLUSHED MR can no longer appear on an xprt's MR free list. Thus there is no longer a need to track the MR's registration state in rpcrdma_frwr. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker include/trace/events/rpcrdma.h | 19 +--- net/sunrpc/xprtrdma/frwr_ops.c | 204 ++++++++++++++++++---------------------- net/sunrpc/xprtrdma/rpc_rdma.c | 2 +- net/sunrpc/xprtrdma/xprt_rdma.h | 11 +-- 4 files changed, 96 insertions(+), 140 deletions(-) commit 5809ea4f7c39bf38e3f85ec185b776da9d81717c Author: Chuck Lever Date: Wed Jun 19 10:32:54 2019 -0400 xprtrdma: Remove the RPCRDMA_REQ_F_PENDING flag Commit 9590d083c1bb ("xprtrdma: Use xprt_pin_rqst in rpcrdma_reply_handler") pins incoming RPC/RDMA replies so they can be left in the pending requests queue while they are being processed without introducing a race between ->buf_free and the transport's reply handler. Therefore RPCRDMA_REQ_F_PENDING is no longer necessary. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/rpc_rdma.c | 1 - net/sunrpc/xprtrdma/transport.c | 4 +--- net/sunrpc/xprtrdma/xprt_rdma.h | 1 - 3 files changed, 1 insertion(+), 5 deletions(-) commit 05eb06d86685e7d9dac60e6bbb46d7f4c30b056e Author: Chuck Lever Date: Wed Jun 19 10:32:48 2019 -0400 xprtrdma: Fix occasional transport deadlock Under high I/O workloads, I've noticed that an RPC/RDMA transport occasionally deadlocks (IOPS goes to zero, and doesn't recover). Diagnosis shows that the sendctx queue is empty, but when sendctxs are returned to the queue, the xprt_write_space wake-up never occurs. The wake-up logic in rpcrdma_sendctx_put_locked is racy. I noticed that both EMPTY_SCQ and XPRT_WRITE_SPACE are implemented via an atomic bit. Just one of those is sufficient. Removing EMPTY_SCQ in favor of the generic bit mechanism makes the deadlock un-reproducible. Without EMPTY_SCQ, rpcrdma_buffer::rb_flags is no longer used and is therefore removed. Unfortunately this patch does not apply cleanly to stable. If needed, someone will have to port it and test it. Fixes: 2fad659209d5 ("xprtrdma: Wait on empty sendctx queue") Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker include/trace/events/rpcrdma.h | 27 +++++++++++++++++++++++++++ net/sunrpc/xprtrdma/frwr_ops.c | 6 +++++- net/sunrpc/xprtrdma/rpc_rdma.c | 26 ++++++++++++-------------- net/sunrpc/xprtrdma/verbs.c | 11 +++-------- net/sunrpc/xprtrdma/xprt_rdma.h | 6 ------ 5 files changed, 47 insertions(+), 29 deletions(-) commit 1310051c720a83c5717658bcbff710b260f2bff9 Author: Chuck Lever Date: Wed Jun 19 10:32:43 2019 -0400 xprtrdma: Replace use of xdr_stream_pos in rpcrdma_marshal_req This is a latent bug. xdr_stream_pos works by subtracting xdr_stream::nwords from xdr_buf::len. But xdr_stream::nwords is not initialized by xdr_init_encode(). It works today only because all fields in rpcrdma_req::rl_stream are initialized to zero by rpcrdma_req_create, making the subtraction in xdr_stream_pos always a no-op. I found this issue via code inspection. It was introduced by commit 39f4cd9e9982 ("xprtrdma: Harden chunk list encoding against send buffer overflow"), but the code has changed enough since then that this fix can't be automatically applied to stable. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker include/trace/events/rpcrdma.h | 9 +++++---- net/sunrpc/xprtrdma/rpc_rdma.c | 6 +++--- 2 files changed, 8 insertions(+), 7 deletions(-) commit 6c395f66e98c895cf3ebf87c0b2fc63b6a57a196 Author: Zhang Rui Date: Tue Jul 9 21:19:12 2019 +0800 drivers: thermal: processor_thermal_device: Fix build warning As a system sleep callback, proc_thermal_resume() should be defined only if CONFIG_PM_SLEEP is defined. This fixes a build warning when CONFIG_PM_SLEEP is not set, drivers/thermal/intel/int340x_thermal/processor_thermal_device.c:446:12: error: 'proc_thermal_resume' defined but not used [-Werror=unused-function] static int proc_thermal_resume(struct device *dev) Fixes: aaba9791fbb4 ("drivers: thermal: processor_thermal: Read PPCC on resume") Reported-by: Arnd Bergmann Signed-off-by: Zhang Rui drivers/thermal/intel/int340x_thermal/processor_thermal_device.c | 4 ++++ 1 file changed, 4 insertions(+) commit 323fd749821daab0f327ec86d707c4542963cdb0 Author: Leo Yan Date: Mon Jul 8 22:39:36 2019 +0800 perf intel-pt: Fix potential NULL pointer dereference found by the smatch tool Based on the following report from Smatch, fix the potential NULL pointer dereference check. tools/perf/util/intel-pt.c:3200 intel_pt_process_auxtrace_info() error: we previously assumed 'session->itrace_synth_opts' could be null (see line 3196) tools/perf/util/intel-pt.c:3206 intel_pt_process_auxtrace_info() warn: variable dereferenced before check 'session->itrace_synth_opts' (see line 3200) tools/perf/util/intel-pt.c 3196 if (session->itrace_synth_opts && session->itrace_synth_opts->set) { 3197 pt->synth_opts = *session->itrace_synth_opts; 3198 } else { 3199 itrace_synth_opts__set_default(&pt->synth_opts, 3200 session->itrace_synth_opts->default_no_sample); ^^^^^^^^^^^^^^^^^^^^^^^^^^ 3201 if (!session->itrace_synth_opts->default_no_sample && 3202 !session->itrace_synth_opts->inject) { 3203 pt->synth_opts.branches = false; 3204 pt->synth_opts.callchain = true; 3205 } 3206 if (session->itrace_synth_opts) ^^^^^^^^^^^^^^^^^^^^^^^^^^ 3207 pt->synth_opts.thread_stack = 3208 session->itrace_synth_opts->thread_stack; 3209 } 'session->itrace_synth_opts' is impossible to be a NULL pointer in intel_pt_process_auxtrace_info(), thus this patch removes the NULL test for 'session->itrace_synth_opts'. Signed-off-by: Leo Yan Acked-by: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jiri Olsa Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Suzuki Poulouse Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20190708143937.7722-4-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 1d481458816d9424c8a05833ce0ebe72194a350e Author: Leo Yan Date: Mon Jul 8 22:39:35 2019 +0800 perf intel-bts: Fix potential NULL pointer dereference found by the smatch tool Based on the following report from Smatch, fix the potential NULL pointer dereference check. tools/perf/util/intel-bts.c:898 intel_bts_process_auxtrace_info() error: we previously assumed 'session->itrace_synth_opts' could be null (see line 894) tools/perf/util/intel-bts.c:899 intel_bts_process_auxtrace_info() warn: variable dereferenced before check 'session->itrace_synth_opts' (see line 898) tools/perf/util/intel-bts.c 894 if (session->itrace_synth_opts && session->itrace_synth_opts->set) { 895 bts->synth_opts = *session->itrace_synth_opts; 896 } else { 897 itrace_synth_opts__set_default(&bts->synth_opts, 898 session->itrace_synth_opts->default_no_sample); ^^^^^^^^^^^^^^^^^^^^^^^^^^ 899 if (session->itrace_synth_opts) ^^^^^^^^^^^^^^^^^^^^^^^^^^ 900 bts->synth_opts.thread_stack = 901 session->itrace_synth_opts->thread_stack; 902 } 'session->itrace_synth_opts' is impossible to be a NULL pointer in intel_bts_process_auxtrace_info(), thus this patch removes the NULL test for 'session->itrace_synth_opts'. Signed-off-by: Leo Yan Acked-by: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jiri Olsa Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Suzuki Poulouse Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20190708143937.7722-3-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-bts.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 9d49169c5958e429ffa6874fbef734ae7502ad65 Author: Song Liu Date: Thu Jun 20 18:44:38 2019 -0700 perf script: Assume native_arch for pipe mode In pipe mode, session->header.env.arch is not populated until the events are processed. Therefore, the following command crashes: perf record -o - | perf script (gdb) bt It fails when we try to compare env.arch against uts.machine: if (!strcmp(uts.machine, session->header.env.arch) || (!strcmp(uts.machine, "x86_64") && !strcmp(session->header.env.arch, "i386"))) native_arch = true; In pipe mode, it is tricky to find env.arch at this stage. To keep it simple, let's just assume native_arch is always true for pipe mode. Reported-by: David Carrillo Cisneros Signed-off-by: Song Liu Tested-by: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: kernel-team@fb.com Cc: stable@vger.kernel.org #v5.1+ Fixes: 3ab481a1cfe1 ("perf script: Support insn output for normal samples") Link: http://lkml.kernel.org/r/20190621014438.810342-1-songliubraving@fb.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-script.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1334bb94cd8a21217cb0c186925f9bc9d47adafc Author: Adrian Hunter Date: Mon Jul 8 08:52:32 2019 +0300 perf scripts python: export-to-sqlite.py: Fix DROP VIEW power_events_view Drop power_events_view before its dependent tables. SQLite does not seem to mind but the fix was needed for PostgreSQL (export-to-postgresql.py script), so do the same fix for the SQLite. It is more logical and keeps the 2 scripts following the same approach. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Fixes: 5130c6e55531 ("perf scripts python: export-to-sqlite.py: Export Intel PT power and ptwrite events") Link: http://lkml.kernel.org/r/20190708055232.5032-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/scripts/python/export-to-sqlite.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d8d051df9f906232715282cc0570c94273b197bc Author: Adrian Hunter Date: Mon Jul 8 08:52:31 2019 +0300 perf scripts python: export-to-postgresql.py: Fix DROP VIEW power_events_view PostgreSQL can error if power_events_view is not dropped before its dependent tables e.g. Exception: Query failed: ERROR: cannot drop table mwait because other objects depend on it DETAIL: view power_events_view depends on table mwait Signed-off-by: Adrian Hunter Cc: Jiri Olsa Fixes: aba44287a224 ("perf scripts python: export-to-postgresql.py: Export Intel PT power and ptwrite events") Link: http://lkml.kernel.org/r/20190708055232.5032-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/scripts/python/export-to-postgresql.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ceb75476db1617a88cc29b09839acacb69aa076e Author: Leo Yan Date: Mon Jul 8 22:39:34 2019 +0800 perf hists browser: Fix potential NULL pointer dereference found by the smatch tool Based on the following report from Smatch, fix the potential NULL pointer dereference check. tools/perf/ui/browsers/hists.c:641 hist_browser__run() error: we previously assumed 'hbt' could be null (see line 625) tools/perf/ui/browsers/hists.c:3088 perf_evsel__hists_browse() error: we previously assumed 'browser->he_selection' could be null (see line 2902) tools/perf/ui/browsers/hists.c:3272 perf_evsel_menu__run() error: we previously assumed 'hbt' could be null (see line 3260) This patch firstly validating the pointers before access them, so can fix potential NULL pointer dereference. Signed-off-by: Leo Yan Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Suzuki Poulouse Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20190708143937.7722-2-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/hists.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 0702f23c983b8a921853c33a9f59b9cf0975d36e Author: Leo Yan Date: Mon Jul 8 22:39:37 2019 +0800 perf cs-etm: Fix potential NULL pointer dereference found by the smatch tool Based on the following report from Smatch, fix the potential NULL pointer dereference check. tools/perf/util/cs-etm.c:2545 cs_etm__process_auxtrace_info() error: we previously assumed 'session->itrace_synth_opts' could be null (see line 2541) tools/perf/util/cs-etm.c 2541 if (session->itrace_synth_opts && session->itrace_synth_opts->set) { 2542 etm->synth_opts = *session->itrace_synth_opts; 2543 } else { 2544 itrace_synth_opts__set_default(&etm->synth_opts, 2545 session->itrace_synth_opts->default_no_sample); ^^^^^^^^^^^^^^^^^^^^^^^^^^ 2546 etm->synth_opts.callchain = false; 2547 } 'session->itrace_synth_opts' is impossible to be a NULL pointer in cs_etm__process_auxtrace_info(), thus this patch removes the NULL test for 'session->itrace_synth_opts'. Signed-off-by: Leo Yan Reviewed-by: Mathieu Poirier Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: Suzuki Poulouse Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20190708143937.7722-5-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/cs-etm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 72de3fd97f15d75657dd5389e26801cbf8af0f9a Author: Luke Mujica Date: Wed Jul 3 15:25:09 2019 -0700 perf parse-events: Remove unused variable: error Remove the 'error' variable because it is declared but not used in parse-events.y or in the generated parse-events.c. Signed-off-by: Luke Mujica Cc: Alexander Shishkin Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/r/20190703222509.109616-2-lukemujica@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/parse-events.y | 1 - 1 file changed, 1 deletion(-) commit 34c9af571e51466fbcc423fb955277c82f03ce92 Author: Luke Mujica Date: Wed Jul 3 15:25:08 2019 -0700 perf parse-events: Remove unused variable 'i' Remove the 'int i' because it is declared but not used in parse-events.y or in the generated parse-events.c. Signed-off-by: Luke Mujica Cc: Alexander Shishkin Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/r/20190703222509.109616-1-lukemujica@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/parse-events.y | 1 - 1 file changed, 1 deletion(-) commit acc7bfb3db9744c4a18c96fd6536069e8647cb11 Author: Arnaldo Carvalho de Melo Date: Thu Jul 4 12:20:21 2019 -0300 perf metricgroup: Add missing list_del_init() when flushing egroups list So that at the end each of the entries have its list node struct cleared and the egroup list head ends emptied. Cc: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-dxzj1ah350fy9ec0xbhb15b6@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/metricgroup.c | 1 + 1 file changed, 1 insertion(+) commit e56fbc9dc79ce0fdc49ffadd062214ddd02f65b6 Author: Arnaldo Carvalho de Melo Date: Thu Jul 4 12:13:46 2019 -0300 perf tools: Use list_del_init() more thorougly To allow for destructors to check if they're operating on a object still in a list, and to avoid going from use after free list entries into still valid, or even also other already removed from list entries. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-deh17ub44atyox3j90e6rksu@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-ftrace.c | 2 +- tools/perf/builtin-lock.c | 8 ++++---- tools/perf/pmu-events/jevents.c | 2 +- tools/perf/tests/switch-tracking.c | 2 +- tools/perf/ui/gtk/annotate.c | 2 +- tools/perf/util/annotate.c | 4 ++-- tools/perf/util/auxtrace.c | 4 ++-- tools/perf/util/bpf-loader.c | 2 +- tools/perf/util/call-path.c | 2 +- tools/perf/util/callchain.c | 10 +++++----- tools/perf/util/db-export.c | 4 ++-- tools/perf/util/dso.c | 2 +- tools/perf/util/evsel.c | 2 +- tools/perf/util/hist.c | 4 ++-- tools/perf/util/ordered-events.c | 6 +++--- tools/perf/util/parse-events.c | 2 +- tools/perf/util/pmu.c | 2 +- tools/perf/util/probe-event.c | 2 +- tools/perf/util/s390-cpumsf.c | 2 +- tools/perf/util/srccode.c | 2 +- tools/perf/util/symbol-elf.c | 6 +++--- tools/perf/util/thread.c | 4 ++-- 22 files changed, 38 insertions(+), 38 deletions(-) commit d8f9da240495b50766239410f9b0c715ca506a67 Author: Arnaldo Carvalho de Melo Date: Thu Jul 4 12:06:20 2019 -0300 perf tools: Use zfree() where applicable In places where the equivalent was already being done, i.e.: free(a); a = NULL; And in placs where struct members are being freed so that if we have some erroneous reference to its struct, then accesses to freed members will result in segfaults, which we can detect faster than use after free to areas that may still have something seemingly valid. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-jatyoofo5boc1bsvoig6bb6i@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/bench/futex-hash.c | 3 +- tools/perf/bench/futex-lock-pi.c | 3 +- tools/perf/builtin-record.c | 4 +-- tools/perf/builtin-stat.c | 4 +-- tools/perf/tests/dwarf-unwind.c | 5 ++-- tools/perf/tests/expr.c | 3 +- tools/perf/tests/mem2node.c | 3 +- tools/perf/tests/thread-map.c | 3 +- tools/perf/ui/browsers/res_sample.c | 6 ++-- tools/perf/ui/browsers/scripts.c | 4 +-- tools/perf/util/annotate.c | 3 +- tools/perf/util/auxtrace.c | 5 ++-- tools/perf/util/cgroup.c | 2 +- tools/perf/util/cputopo.c | 2 +- tools/perf/util/cs-etm.c | 5 ++-- tools/perf/util/data-convert-bt.c | 2 +- tools/perf/util/data.c | 2 +- tools/perf/util/env.c | 8 ++--- tools/perf/util/event.c | 2 +- tools/perf/util/header.c | 6 ++-- tools/perf/util/hist.c | 14 ++++----- tools/perf/util/jitdump.c | 7 ++--- tools/perf/util/llvm-utils.c | 3 +- tools/perf/util/machine.c | 4 +-- tools/perf/util/metricgroup.c | 9 +++--- tools/perf/util/probe-event.c | 51 +++++++++++++++----------------- tools/perf/util/s390-cpumsf.c | 7 ++--- tools/perf/util/srccode.c | 9 +++--- tools/perf/util/stat-shadow.c | 3 +- tools/perf/util/stat.c | 2 +- tools/perf/util/symbol-elf.c | 10 +++---- tools/perf/util/thread_map.c | 2 +- tools/perf/util/unwind-libunwind-local.c | 3 +- 33 files changed, 100 insertions(+), 99 deletions(-) commit 7f7c536f23e6afaa5d5d4b0e0958b0be8922491f Author: Arnaldo Carvalho de Melo Date: Thu Jul 4 11:32:27 2019 -0300 tools lib: Adopt zalloc()/zfree() from tools/perf Eroding a bit more the tools/perf/util/util.h hodpodge header. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-natazosyn9rwjka25tvcnyi0@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/linux/zalloc.h | 12 ++++++++++++ tools/lib/zalloc.c | 15 +++++++++++++++ tools/perf/MANIFEST | 1 + tools/perf/arch/arm/annotate/instructions.c | 1 + tools/perf/arch/arm/util/auxtrace.c | 1 + tools/perf/arch/arm/util/cs-etm.c | 1 + tools/perf/arch/arm64/util/arm-spe.c | 1 + tools/perf/arch/common.c | 2 +- tools/perf/arch/powerpc/util/perf_regs.c | 2 +- tools/perf/arch/s390/util/auxtrace.c | 1 + tools/perf/arch/s390/util/header.c | 2 +- tools/perf/arch/x86/util/event.c | 2 +- tools/perf/arch/x86/util/intel-bts.c | 2 +- tools/perf/arch/x86/util/intel-pt.c | 2 +- tools/perf/arch/x86/util/perf_regs.c | 2 +- tools/perf/bench/mem-functions.c | 2 +- tools/perf/bench/numa.c | 2 +- tools/perf/builtin-annotate.c | 2 +- tools/perf/builtin-bench.c | 2 +- tools/perf/builtin-c2c.c | 2 +- tools/perf/builtin-diff.c | 2 +- tools/perf/builtin-help.c | 1 + tools/perf/builtin-kmem.c | 2 +- tools/perf/builtin-kvm.c | 2 +- tools/perf/builtin-lock.c | 2 +- tools/perf/builtin-probe.c | 2 +- tools/perf/builtin-report.c | 2 +- tools/perf/builtin-sched.c | 2 +- tools/perf/builtin-script.c | 2 +- tools/perf/builtin-stat.c | 2 +- tools/perf/builtin-timechart.c | 4 +--- tools/perf/builtin-trace.c | 1 + tools/perf/perf.c | 2 +- tools/perf/tests/switch-tracking.c | 1 + tools/perf/ui/browser.c | 2 +- tools/perf/ui/browsers/annotate.c | 2 +- tools/perf/ui/browsers/hists.c | 2 +- tools/perf/ui/gtk/util.c | 3 +-- tools/perf/ui/stdio/hist.c | 2 +- tools/perf/util/Build | 5 +++++ tools/perf/util/arm-spe.c | 2 +- tools/perf/util/auxtrace.c | 2 +- tools/perf/util/bpf-loader.c | 1 + tools/perf/util/build-id.c | 1 + tools/perf/util/call-path.c | 3 ++- tools/perf/util/callchain.c | 2 +- tools/perf/util/cgroup.c | 2 +- tools/perf/util/comm.c | 2 +- tools/perf/util/config.c | 3 +-- tools/perf/util/counts.c | 2 +- tools/perf/util/cpumap.c | 2 +- tools/perf/util/cputopo.c | 2 +- tools/perf/util/cs-etm-decoder/cs-etm-decoder.c | 1 + tools/perf/util/cs-etm.c | 1 + tools/perf/util/data-convert-bt.c | 2 +- tools/perf/util/data.c | 1 + tools/perf/util/db-export.c | 2 +- tools/perf/util/dso.c | 3 ++- tools/perf/util/env.c | 2 +- tools/perf/util/event.c | 1 + tools/perf/util/evlist.c | 2 +- tools/perf/util/evsel.c | 2 +- tools/perf/util/header.c | 2 +- tools/perf/util/help-unknown-cmd.c | 2 ++ tools/perf/util/hist.c | 2 +- tools/perf/util/intel-bts.c | 2 +- tools/perf/util/intel-pt-decoder/intel-pt-decoder.c | 2 +- tools/perf/util/intel-pt.c | 2 +- tools/perf/util/llvm-utils.c | 1 + tools/perf/util/machine.c | 2 +- tools/perf/util/map.c | 2 +- tools/perf/util/mem2node.c | 2 +- tools/perf/util/mmap.c | 1 + tools/perf/util/namespaces.c | 2 +- tools/perf/util/parse-events.c | 1 + tools/perf/util/pmu.c | 2 +- tools/perf/util/probe-event.c | 2 +- tools/perf/util/probe-file.c | 2 +- tools/perf/util/probe-finder.c | 2 +- tools/perf/util/pstack.c | 2 +- tools/perf/util/python-ext-sources | 1 + tools/perf/util/s390-cpumsf.c | 2 +- tools/perf/util/session.c | 2 +- tools/perf/util/srcline.c | 2 +- tools/perf/util/stat.c | 1 + tools/perf/util/strbuf.c | 2 +- tools/perf/util/strfilter.c | 3 ++- tools/perf/util/strlist.c | 2 +- tools/perf/util/svghelper.c | 2 +- tools/perf/util/symbol-elf.c | 1 + tools/perf/util/symbol-minimal.c | 2 +- tools/perf/util/symbol.c | 1 + tools/perf/util/syscalltbl.c | 2 +- tools/perf/util/thread-stack.c | 2 +- tools/perf/util/thread.c | 2 +- tools/perf/util/thread_map.c | 2 +- tools/perf/util/trace-event-info.c | 1 + tools/perf/util/trace-event-scripting.c | 2 +- tools/perf/util/unwind-libdw.c | 1 + tools/perf/util/util.h | 9 --------- tools/perf/util/values.c | 2 +- tools/perf/util/vdso.c | 1 + tools/perf/util/xyarray.c | 2 +- 103 files changed, 135 insertions(+), 86 deletions(-) commit e5653eb82ddc71ad8ffcbb3c74dd6f0c0230ab4c Author: Arnaldo Carvalho de Melo Date: Fri Jul 5 14:16:15 2019 -0300 perf tools: Move get_current_dir_name() cond prototype out of util.h And in a separate header, so that we erode util.h a bit more. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-xpzvuu9d0gei9jl9bkzgobln@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/get_current_dir_name.c | 6 +++--- tools/perf/util/get_current_dir_name.h | 8 ++++++++ tools/perf/util/namespaces.c | 1 + tools/perf/util/util.h | 4 ---- 4 files changed, 12 insertions(+), 7 deletions(-) commit 245aec7f7f4ca95b924f005d604bab9d838b5eb1 Author: Arnaldo Carvalho de Melo Date: Fri Jul 5 13:59:06 2019 -0300 perf namespaces: Move the conditional setns() prototype to namespaces.h Out of util.h, to reduce its scope, and since we have a namespaces.h header, much better to have it there, where it is related to. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-zlu81bbtccuzygh7m8nmgybc@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/namespaces.h | 4 ++++ tools/perf/util/setns.c | 4 +++- tools/perf/util/util.h | 4 ---- 3 files changed, 7 insertions(+), 5 deletions(-) commit 215a0d305c5651928eb67c96bcedd0a6c297dfce Author: Arnaldo Carvalho de Melo Date: Thu Jul 4 11:21:24 2019 -0300 perf tools: Add missing headers, mostly stdlib.h Part of the erosion of util/util.h, that will lose its include stdlib.h, we need to add it to places where it is needed but was getting it indirectly. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-1imnqezw99ahc07fjeb51qby@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/common.c | 1 + tools/perf/arch/powerpc/util/perf_regs.c | 2 ++ tools/perf/arch/s390/util/header.c | 1 + tools/perf/builtin-config.c | 1 + tools/perf/builtin-help.c | 1 + tools/perf/tests/llvm.c | 1 + tools/perf/tests/sample-parsing.c | 1 + tools/perf/tests/vmlinux-kallsyms.c | 1 + tools/perf/ui/browser.h | 1 + tools/perf/ui/browsers/map.c | 1 + tools/perf/ui/tui/setup.c | 1 + tools/perf/ui/tui/util.c | 2 +- tools/perf/util/cputopo.c | 1 + tools/perf/util/db-export.c | 1 + tools/perf/util/debug.c | 1 + tools/perf/util/demangle-java.c | 3 ++- tools/perf/util/dwarf-aux.c | 2 +- tools/perf/util/env.c | 1 + tools/perf/util/parse-branch-options.c | 2 +- tools/perf/util/parse-regs-options.c | 8 ++++++-- tools/perf/util/strbuf.c | 1 + tools/perf/util/symbol-elf.c | 1 + tools/perf/util/symbol-minimal.c | 1 + tools/perf/util/target.c | 2 +- tools/perf/util/thread-stack.c | 1 + tools/perf/util/usage.c | 3 +++ 26 files changed, 35 insertions(+), 7 deletions(-) commit b3b3eb9dadfcb6c706f5fa97bc841d4e069af3de Author: Masahiro Yamada Date: Sat Jul 6 00:14:31 2019 +0900 scripts/tags.sh: remove unused environment variables from comments This script has no reference to ${ARCH}, ${src}, ${obj}. Signed-off-by: Masahiro Yamada scripts/tags.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d1db881d9bf16f2c51bdef8f0dfc2e4088a76bbf Author: Masahiro Yamada Date: Sat Jul 6 00:14:30 2019 +0900 scripts/tags.sh: drop SUBARCH support for ARM Our goal is to have more and more sub-architectures to join the ARM multi-platform, and support them in a single configuration. Remove the ARM SUBARCH support because it is ugly. Signed-off-by: Masahiro Yamada scripts/tags.sh | 36 ++---------------------------------- 1 file changed, 2 insertions(+), 34 deletions(-) commit 7c8e90ddf02f139a90bc29c04302e9914818f0c8 Author: Wen Yang Date: Mon Jul 8 14:19:04 2019 +0800 irqchip/renesas-rza1: Prevent use-after-free in rza1_irqc_probe() The gic_node is still being used in the rza1_irqc_parse_map() call after the of_node_put() call, which may result in use-after-free. Fixes: a644ccb819bc ("irqchip: Add Renesas RZ/A1 Interrupt Controller driver") Signed-off-by: Wen Yang Signed-off-by: Thomas Gleixner Reviewed-by: Geert Uytterhoeven Link: https://lkml.kernel.org/r/1562566745-7447-3-git-send-email-wen.yang99@zte.com.cn drivers/irqchip/irq-renesas-rza1.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 390d57728d8e6f7283030cb20d3b5459771a32f1 Author: Jason Gunthorpe Date: Tue Jul 9 09:44:47 2019 -0300 RDMA/core: Make rdma_counter.h compile stand alone 5.4-rc1 will have new compile time debugging to test that headers can be compiled stand alone. Many rdma headers are already broken and excluded from the mechanism, however to avoid compile failures during the merge window fix enough so that the newly added header compiles clean. Fixes: 413d3347503b ("RDMA/counter: Add set/clear per-port auto mode support") Reported-by: Stephen Rothwell Signed-off-by: Jason Gunthorpe Signed-off-by: Mark Zhang include/rdma/rdma_counter.h | 2 +- include/rdma/restrack.h | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) commit 43c78d88036e47949a5af2fac0067e7ebaaf7dd0 Author: Masahiro Yamada Date: Mon Jul 1 09:58:45 2019 +0900 kbuild: compile-test kernel headers to ensure they are self-contained The headers in include/ are globally used in the kernel source tree to provide common APIs. They are included from external modules, too. It will be useful to make as many headers self-contained as possible so that we do not have to rely on a specific include order. There are more than 4000 headers in include/. In my rough analysis, 70% of them are already self-contained. With efforts, most of them can be self-contained. For now, we must exclude more than 1000 headers just because they cannot be compiled as standalone units. I added them to header-test-. The blacklist was mostly generated by a script, so the reason of the breakage should be checked later. Signed-off-by: Masahiro Yamada Tested-by: Jani Nikula Reviewed-by: Joel Fernandes (Google) Makefile | 1 + include/Kbuild | 1270 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ init/Kconfig | 11 + 3 files changed, 1282 insertions(+) commit 1cbec37b3f9cff074a67bef4fc34b30a09958a0a Author: Jiri Slaby Date: Tue Jul 9 08:34:02 2019 +0200 x86/entry/32: Fix ENDPROC of common_spurious common_spurious is currently ENDed erroneously. common_interrupt is used in its ENDPROC. So fix this mistake. Found by my asm macros rewrite patchset. Fixes: f8a8fe61fec8 ("x86/irq: Seperate unused system vectors from spurious entry again") Signed-off-by: Jiri Slaby Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20190709063402.19847-1-jslaby@suse.cz arch/x86/entry/entry_32.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fc50e0ba9bcac92ff177ff3ac64644108b6d8dd8 Author: Arnaldo Carvalho de Melo Date: Wed Jul 3 16:12:51 2019 -0300 perf evsel: perf_evsel__name(NULL) is valid, no need to check evsel It'll return "unknown", no need to open code it. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Leo Yan Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-4okvjmm18arjrcyfhuahgfxm@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-report.c | 2 +- tools/perf/util/session.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit f3c8d90757724982e5f07cd77d315eb64ca145ac Author: Leo Yan Date: Tue Jul 2 18:34:17 2019 +0800 perf session: Fix potential NULL pointer dereference found by the smatch tool Based on the following report from Smatch, fix the potential NULL pointer dereference check. tools/perf/util/session.c:1252 dump_read() error: we previously assumed 'evsel' could be null (see line 1249) tools/perf/util/session.c 1240 static void dump_read(struct perf_evsel *evsel, union perf_event *event) 1241 { 1242 struct read_event *read_event = &event->read; 1243 u64 read_format; 1244 1245 if (!dump_trace) 1246 return; 1247 1248 printf(": %d %d %s %" PRIu64 "\n", event->read.pid, event->read.tid, 1249 evsel ? perf_evsel__name(evsel) : "FAIL", 1250 event->read.value); 1251 1252 read_format = evsel->attr.read_format; ^^^^^^^ 'evsel' could be NULL pointer, for this case this patch directly bails out without dumping read_event. Signed-off-by: Leo Yan Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Alexios Zavras Cc: Andi Kleen Cc: Changbin Du Cc: David S. Miller Cc: Davidlohr Bueso Cc: Eric Saint-Etienne Cc: Jin Yao Cc: Konstantin Khlebnikov Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Rasmus Villemoes Cc: Song Liu Cc: Suzuki Poulouse Cc: Thomas Gleixner Cc: Thomas Richter Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20190702103420.27540-9-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/session.c | 3 +++ 1 file changed, 3 insertions(+) commit 40978e9bf2137223993e70921de2731201788049 Author: Arnaldo Carvalho de Melo Date: Wed Jul 3 16:02:09 2019 -0300 perf inject: The tool->read() call may pass a NULL evsel, handle it Check first, as machines__deliver_event() may have perf_evlist__id2evsel() returning NULL. This was found while checking a report from Leo Yan that used the smatch tool to find places where a pointer is checked before use and then, later in the same function gets used without checking. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Leo Yan Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-muvb8xqyh0gysgfjfq35w642@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-inject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 363bbaef63ffebcc745239fe80a953ebb5ac9ec9 Author: Leo Yan Date: Tue Jul 2 18:34:16 2019 +0800 perf map: Fix potential NULL pointer dereference found by smatch tool Based on the following report from Smatch, fix the potential NULL pointer dereference check. tools/perf/util/map.c:479 map__fprintf_srccode() error: we previously assumed 'state' could be null (see line 466) tools/perf/util/map.c 465 /* Avoid redundant printing */ 466 if (state && 467 state->srcfile && 468 !strcmp(state->srcfile, srcfile) && 469 state->line == line) { 470 free(srcfile); 471 return 0; 472 } 473 474 srccode = find_sourceline(srcfile, line, &len); 475 if (!srccode) 476 goto out_free_line; 477 478 ret = fprintf(fp, "|%-8d %.*s", line, len, srccode); 479 state->srcfile = srcfile; ^^^^^^^ 480 state->line = line; ^^^^^^^ This patch validates 'state' pointer before access its elements. Signed-off-by: Leo Yan Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Alexios Zavras Cc: Andi Kleen Cc: Changbin Du Cc: David S. Miller Cc: Davidlohr Bueso Cc: Eric Saint-Etienne Cc: Jin Yao Cc: Konstantin Khlebnikov Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Rasmus Villemoes Cc: Song Liu Cc: Suzuki Poulouse Cc: Thomas Gleixner Cc: Thomas Richter Cc: linux-arm-kernel@lists.infradead.org Fixes: dd2e18e9ac20 ("perf tools: Support 'srccode' output") Link: http://lkml.kernel.org/r/20190702103420.27540-8-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/map.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 7a6d49dc8cad8fa1f3d63994102af8f9ae9c859f Author: Leo Yan Date: Tue Jul 2 18:34:14 2019 +0800 perf trace: Fix potential NULL pointer dereference found by the smatch tool Based on the following report from Smatch, fix the potential NULL pointer dereference check. tools/perf/builtin-trace.c:1044 thread_trace__new() error: we previously assumed 'ttrace' could be null (see line 1041). tools/perf/builtin-trace.c 1037 static struct thread_trace *thread_trace__new(void) 1038 { 1039 struct thread_trace *ttrace = zalloc(sizeof(struct thread_trace)); 1040 1041 if (ttrace) 1042 ttrace->files.max = -1; 1043 1044 ttrace->syscall_stats = intlist__new(NULL); ^^^^^^^^ 1045 1046 return ttrace; 1047 } Signed-off-by: Leo Yan Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Alexios Zavras Cc: Andi Kleen Cc: Changbin Du Cc: David S. Miller Cc: Davidlohr Bueso Cc: Eric Saint-Etienne Cc: Jin Yao Cc: Konstantin Khlebnikov Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Rasmus Villemoes Cc: Song Liu Cc: Suzuki Poulouse Cc: Thomas Gleixner Cc: Thomas Richter Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20190702103420.27540-6-leo.yan@linaro.org [ Just made it look like other tools/perf constructors, same end result ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-trace.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 600c787dbf6521d8d07ee717ab7606d5070103ea Author: Leo Yan Date: Tue Jul 2 18:34:13 2019 +0800 perf annotate: Fix dereferencing freed memory found by the smatch tool Based on the following report from Smatch, fix the potential dereferencing freed memory check. tools/perf/util/annotate.c:1125 disasm_line__parse() error: dereferencing freed memory 'namep' tools/perf/util/annotate.c 1100 static int disasm_line__parse(char *line, const char **namep, char **rawp) 1101 { 1102 char tmp, *name = ltrim(line); [...] 1114 *namep = strdup(name); 1115 1116 if (*namep == NULL) 1117 goto out_free_name; [...] 1124 out_free_name: 1125 free((void *)namep); ^^^^^ 1126 *namep = NULL; ^^^^^^ 1127 return -1; 1128 } If strdup() fails to allocate memory space for *namep, we don't need to free memory with pointer 'namep', which is resident in data structure disasm_line::ins::name; and *namep is NULL pointer for this failure, so it's pointless to assign NULL to *namep again. Committer note: Freeing namep, which is the address of the first entry of the 'struct ins' that is the first member of struct disasm_line would in fact free that disasm_line instance, if it was allocated via malloc/calloc, which, later, would a dereference of freed memory. Signed-off-by: Leo Yan Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Alexios Zavras Cc: Andi Kleen Cc: Changbin Du Cc: David S. Miller Cc: Davidlohr Bueso Cc: Eric Saint-Etienne Cc: Jin Yao Cc: Konstantin Khlebnikov Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Rasmus Villemoes Cc: Song Liu Cc: Suzuki Poulouse Cc: Thomas Gleixner Cc: Thomas Richter Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20190702103420.27540-5-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/annotate.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 111442cfc8abdeaa7ec1407f07ef7b3e5f76654e Author: Leo Yan Date: Tue Jul 2 18:34:12 2019 +0800 perf top: Fix potential NULL pointer dereference detected by the smatch tool Based on the following report from Smatch, fix the potential NULL pointer dereference check. tools/perf/builtin-top.c:109 perf_top__parse_source() warn: variable dereferenced before check 'he' (see line 103) tools/perf/builtin-top.c:233 perf_top__show_details() warn: variable dereferenced before check 'he' (see line 228) tools/perf/builtin-top.c 101 static int perf_top__parse_source(struct perf_top *top, struct hist_entry *he) 102 { 103 struct perf_evsel *evsel = hists_to_evsel(he->hists); ^^^^ 104 struct symbol *sym; 105 struct annotation *notes; 106 struct map *map; 107 int err = -1; 108 109 if (!he || !he->ms.sym) 110 return -1; This patch moves the values assignment after validating pointer 'he'. Signed-off-by: Leo Yan Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Alexios Zavras Cc: Andi Kleen Cc: Changbin Du Cc: David S. Miller Cc: Davidlohr Bueso Cc: Eric Saint-Etienne Cc: Jin Yao Cc: Konstantin Khlebnikov Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Rasmus Villemoes Cc: Song Liu Cc: Suzuki Poulouse Cc: Thomas Gleixner Cc: Thomas Richter Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20190702103420.27540-4-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-top.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit c74b05030edb3b52f4208d8415b8c933bc509a29 Author: Leo Yan Date: Tue Jul 2 18:34:11 2019 +0800 perf stat: Fix use-after-freed pointer detected by the smatch tool Based on the following report from Smatch, fix the use-after-freed pointer. tools/perf/builtin-stat.c:1353 add_default_attributes() warn: passing freed memory 'str'. The pointer 'str' has been freed but later it is still passed into the function parse_events_print_error(). This patch fixes this use-after-freed issue. Signed-off-by: Leo Yan Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Alexios Zavras Cc: Andi Kleen Cc: Changbin Du Cc: Davidlohr Bueso Cc: David S. Miller Cc: Eric Saint-Etienne Cc: Jin Yao Cc: Konstantin Khlebnikov Cc: linux-arm-kernel@lists.infradead.org Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Rasmus Villemoes Cc: Song Liu Cc: Suzuki Poulouse Cc: Thomas Gleixner Cc: Thomas Richter Link: http://lkml.kernel.org/r/20190702103420.27540-3-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4e4cf62b37da5ff45c904a3acf242ab29ed5881d Author: Numfor Mbiziwo-Tiapo Date: Tue Jul 2 10:37:15 2019 -0700 perf test mmap-thread-lookup: Initialize variable to suppress memory sanitizer warning Running the 'perf test' command after building perf with a memory sanitizer causes a warning that says: WARNING: MemorySanitizer: use-of-uninitialized-value... in mmap-thread-lookup.c Initializing the go variable to 0 silences this harmless warning. Committer warning: This was harmless, just a simple test writing whatever was at that sizeof(int) memory area just to signal another thread blocked reading that file created with pipe(). Initialize it tho so that we don't get this warning. Signed-off-by: Numfor Mbiziwo-Tiapo Cc: Alexander Shishkin Cc: Ian Rogers Cc: Jiri Olsa Cc: Mark Drayton Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Cc: Stephane Eranian Link: http://lkml.kernel.org/r/20190702173716.181223-1-nums@google.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/mmap-thread-lookup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f6b6aefee70aa5261deec7feab80c249bf58397f Author: Bjorn Helgaas Date: Thu May 30 08:05:58 2019 -0500 PCI: Fix typos and whitespace errors Fix typos in drivers/pci. Comment and whitespace changes only. Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki Reviewed-by: Randy Dunlap drivers/pci/ats.c | 2 +- drivers/pci/controller/dwc/pcie-armada8k.c | 2 +- drivers/pci/controller/dwc/pcie-kirin.c | 2 +- drivers/pci/controller/pci-aardvark.c | 2 +- drivers/pci/controller/pcie-iproc-platform.c | 2 +- drivers/pci/controller/pcie-iproc.c | 2 +- drivers/pci/controller/vmd.c | 2 +- drivers/pci/mmap.c | 2 +- drivers/pci/msi.c | 43 ++++++++++++++-------------- drivers/pci/p2pdma.c | 6 ++-- drivers/pci/pci-bridge-emul.c | 2 +- drivers/pci/pci-pf-stub.c | 2 +- drivers/pci/pci.c | 2 +- drivers/pci/pcie/aer_inject.c | 2 +- include/linux/pci.h | 2 +- include/linux/pci_ids.h | 6 ++-- 16 files changed, 41 insertions(+), 40 deletions(-) commit a2059825986a1c8143fd6698774fa9d83733bb11 Author: Josh Poimboeuf Date: Mon Jul 8 11:52:26 2019 -0500 x86/speculation: Enable Spectre v1 swapgs mitigations The previous commit added macro calls in the entry code which mitigate the Spectre v1 swapgs issue if the X86_FEATURE_FENCE_SWAPGS_* features are enabled. Enable those features where applicable. The mitigations may be disabled with "nospectre_v1" or "mitigations=off". There are different features which can affect the risk of attack: - When FSGSBASE is enabled, unprivileged users are able to place any value in GS, using the wrgsbase instruction. This means they can write a GS value which points to any value in kernel space, which can be useful with the following gadget in an interrupt/exception/NMI handler: if (coming from user space) swapgs mov %gs:, %reg1 // dependent load or store based on the value of %reg // for example: mov %(reg1), %reg2 If an interrupt is coming from user space, and the entry code speculatively skips the swapgs (due to user branch mistraining), it may speculatively execute the GS-based load and a subsequent dependent load or store, exposing the kernel data to an L1 side channel leak. Note that, on Intel, a similar attack exists in the above gadget when coming from kernel space, if the swapgs gets speculatively executed to switch back to the user GS. On AMD, this variant isn't possible because swapgs is serializing with respect to future GS-based accesses. NOTE: The FSGSBASE patch set hasn't been merged yet, so the above case doesn't exist quite yet. - When FSGSBASE is disabled, the issue is mitigated somewhat because unprivileged users must use prctl(ARCH_SET_GS) to set GS, which restricts GS values to user space addresses only. That means the gadget would need an additional step, since the target kernel address needs to be read from user space first. Something like: if (coming from user space) swapgs mov %gs:, %reg1 mov (%reg1), %reg2 // dependent load or store based on the value of %reg2 // for example: mov %(reg2), %reg3 It's difficult to audit for this gadget in all the handlers, so while there are no known instances of it, it's entirely possible that it exists somewhere (or could be introduced in the future). Without tooling to analyze all such code paths, consider it vulnerable. Effects of SMAP on the !FSGSBASE case: - If SMAP is enabled, and the CPU reports RDCL_NO (i.e., not susceptible to Meltdown), the kernel is prevented from speculatively reading user space memory, even L1 cached values. This effectively disables the !FSGSBASE attack vector. - If SMAP is enabled, but the CPU *is* susceptible to Meltdown, SMAP still prevents the kernel from speculatively reading user space memory. But it does *not* prevent the kernel from reading the user value from L1, if it has already been cached. This is probably only a small hurdle for an attacker to overcome. Thanks to Dave Hansen for contributing the speculative_smap() function. Thanks to Andrew Cooper for providing the inside scoop on whether swapgs is serializing on AMD. [ tglx: Fixed the USER fence decision and polished the comment as suggested by Dave Hansen ] Signed-off-by: Josh Poimboeuf Signed-off-by: Thomas Gleixner Reviewed-by: Dave Hansen Documentation/admin-guide/kernel-parameters.txt | 8 +- arch/x86/kernel/cpu/bugs.c | 115 ++++++++++++++++++++++-- 2 files changed, 110 insertions(+), 13 deletions(-) commit 18ec54fdd6d18d92025af097cd042a75cf0ea24c Author: Josh Poimboeuf Date: Mon Jul 8 11:52:25 2019 -0500 x86/speculation: Prepare entry code for Spectre v1 swapgs mitigations Spectre v1 isn't only about array bounds checks. It can affect any conditional checks. The kernel entry code interrupt, exception, and NMI handlers all have conditional swapgs checks. Those may be problematic in the context of Spectre v1, as kernel code can speculatively run with a user GS. For example: if (coming from user space) swapgs mov %gs:, %reg mov (%reg), %reg1 When coming from user space, the CPU can speculatively skip the swapgs, and then do a speculative percpu load using the user GS value. So the user can speculatively force a read of any kernel value. If a gadget exists which uses the percpu value as an address in another load/store, then the contents of the kernel value may become visible via an L1 side channel attack. A similar attack exists when coming from kernel space. The CPU can speculatively do the swapgs, causing the user GS to get used for the rest of the speculative window. The mitigation is similar to a traditional Spectre v1 mitigation, except: a) index masking isn't possible; because the index (percpu offset) isn't user-controlled; and b) an lfence is needed in both the "from user" swapgs path and the "from kernel" non-swapgs path (because of the two attacks described above). The user entry swapgs paths already have SWITCH_TO_KERNEL_CR3, which has a CR3 write when PTI is enabled. Since CR3 writes are serializing, the lfences can be skipped in those cases. On the other hand, the kernel entry swapgs paths don't depend on PTI. To avoid unnecessary lfences for the user entry case, create two separate features for alternative patching: X86_FEATURE_FENCE_SWAPGS_USER X86_FEATURE_FENCE_SWAPGS_KERNEL Use these features in entry code to patch in lfences where needed. The features aren't enabled yet, so there's no functional change. Signed-off-by: Josh Poimboeuf Signed-off-by: Thomas Gleixner Reviewed-by: Dave Hansen arch/x86/entry/calling.h | 17 +++++++++++++++++ arch/x86/entry/entry_64.S | 21 ++++++++++++++++++--- arch/x86/include/asm/cpufeatures.h | 2 ++ 3 files changed, 37 insertions(+), 3 deletions(-) commit 013c66edf207ddb78422b8b636f56c87939c9e34 Author: Ross Zwisler Date: Mon Jul 1 09:52:08 2019 -0600 Revert "x86/build: Move _etext to actual end of .text" This reverts commit 392bef709659abea614abfe53cf228e7a59876a4. Per the discussion here: https://lkml.kernel.org/r/201906201042.3BF5CD6@keescook the above referenced commit breaks kernel compilation with old GCC toolchains as well as current versions of the Gold linker. Revert it to fix the regression and to keep the ability to compile the kernel with these tools. Signed-off-by: Ross Zwisler Signed-off-by: Thomas Gleixner Reviewed-by: Guenter Roeck Cc: Cc: "H. Peter Anvin" Cc: Borislav Petkov Cc: Kees Cook Cc: Johannes Hirte Cc: Klaus Kusche Cc: samitolvanen@google.com Cc: Guenter Roeck Link: https://lkml.kernel.org/r/20190701155208.211815-1-zwisler@google.com Signed-off-by: Ingo Molnar arch/x86/kernel/vmlinux.lds.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 39ca5fb4920a96eeab478be2cfa6a2369fef6b02 Author: Sebastian Andrzej Siewior Date: Mon Jul 1 19:33:54 2019 +0200 x86/ldt: Initialize the context lock for init_mm The mutex mm->context->lock for init_mm is not initialized for init_mm. This wasn't a problem because it remained unused. This changed however since commit 4fc19708b165c ("x86/alternatives: Initialize temporary mm for patching") Initialize the mutex for init_mm. Fixes: 4fc19708b165c ("x86/alternatives: Initialize temporary mm for patching") Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Reviewed-by: Nadav Amit Cc: Peter Zijlstra Cc: Andy Lutomirski Link: https://lkml.kernel.org/r/20190701173354.2pe62hhliok2afea@linutronix.de Signed-off-by: Ingo Molnar arch/x86/include/asm/mmu.h | 1 + 1 file changed, 1 insertion(+) commit e55a73251da335873a6e87d68fb17e5aabb8978e Author: Josh Poimboeuf Date: Thu Jun 27 20:50:47 2019 -0500 bpf: Fix ORC unwinding in non-JIT BPF code Objtool previously ignored ___bpf_prog_run() because it didn't understand the jump table. This resulted in the ORC unwinder not being able to unwind through non-JIT BPF code. Now that objtool knows how to read jump tables, remove the whitelist and annotate the jump table so objtool can recognize it. Also add an additional "const" to the jump table definition to clarify that the text pointers are constant. Otherwise GCC sets the section writable flag and the assembler spits out warnings. Fixes: d15d356887e7 ("perf/x86: Make perf callchains work without CONFIG_FRAME_POINTER") Reported-by: Song Liu Signed-off-by: Josh Poimboeuf Signed-off-by: Thomas Gleixner Acked-by: Alexei Starovoitov Cc: Peter Zijlstra Cc: Kairui Song Cc: Steven Rostedt Cc: Borislav Petkov Cc: Daniel Borkmann Link: https://lkml.kernel.org/r/881939122b88f32be4c374d248c09d7527a87e35.1561685471.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar kernel/bpf/core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 87b512def792579641499d9bef1d640994ea9c18 Author: Josh Poimboeuf Date: Thu Jun 27 20:50:46 2019 -0500 objtool: Add support for C jump tables Objtool doesn't know how to read C jump tables, so it has to whitelist functions which use them, causing missing ORC unwinder data for such functions, e.g. ___bpf_prog_run(). C jump tables are very similar to GCC switch jump tables, which objtool already knows how to read. So adding support for C jump tables is easy. It just needs to be able to find the tables and distinguish them from other data. To allow the jump tables to be found, create an __annotate_jump_table macro which can be used to annotate them. The annotation is done by placing the jump table in an .rodata..c_jump_table section. The '.rodata' prefix ensures that the data will be placed in the rodata section by the vmlinux linker script. The double periods are part of an existing convention which distinguishes kernel sections from GCC sections. Signed-off-by: Josh Poimboeuf Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: Song Liu Cc: Kairui Song Cc: Steven Rostedt Cc: Borislav Petkov Cc: Alexei Starovoitov Cc: Daniel Borkmann Link: https://lkml.kernel.org/r/0ba2ca30442b16b97165992381ce643dc27b3d1a.1561685471.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar include/linux/compiler.h | 5 +++++ tools/objtool/check.c | 27 ++++++++++++++++++++------- 2 files changed, 25 insertions(+), 7 deletions(-) commit d1d59b817939821bee149e870ce7723f61ffb512 Merge: 552a031ba12a 686cbe9e5d88 Author: Ingo Molnar Date: Tue Jul 9 13:22:03 2019 +0200 Merge tag 'perf-urgent-for-mingo-5.3-20190708-2' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core Pull perf/urgent fixes from Arnaldo Carvalho de Melo: core: Arnaldo Carvalho de Melo: - Allow references to thread objects after__machine_exit(), fixing a bug with 'perf sched lat' where that happens, i.e. after perf_session__delete() we still have references to threads that were in a linked list whose head was freed in perf_session__delete(), causing a segfault, fix it. Jiri Olsa: - Do not rely on errno values for precise_ip fallback, fixing the default use case for 'perf record' on some AMD servers, when no events are specified and we try to use "cycles:P", i.e. with the maximum precision level. BPF: Song Liu: - Assign proper ff->ph in perf_event__synthesize_features(), fixing a bug when using pipe mode, i.e. 'perf record -o -'. tools headers: Arnaldo Carvalho de Melo: - Sync kvm headers with the kernel sources perf tests: Seeteena Thoufeek: - Fix record+probe_libc_inet_pton.sh for powerpc64, where without the debuginfo package for the 'ping' utility we can't resolve its symbols, so admit getting "[unknown]" for that backtrace line. perf python: Arnaldo Carvalho de Melo: - Remove -fstack-protector-strong if clang doesn't have it, fixing the build with clang on fedora:30, oracleline:7, centos:7. perf jvmti: Jiri Olsa: - Address gcc string overflow warning for strncpy() build: Arnaldo Carvalho de Melo: - Check if gettid() is available before providing helper, as recent versions of glibc started to provide gettid(). Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit f28a1f16135c9c6366f3d3f20f2e58aefc99afa0 Author: Christoph Hellwig Date: Mon Jul 8 10:51:01 2019 -0700 m68k: Don't select ARCH_HAS_DMA_PREP_COHERENT for nommu or coldfire M68k only provides the arch_dma_prep_coherent symbol when an mmu is enabled and not on the coldfire platform. Fix the Kconfig symbol selection up to match this. Fixes: 69878ef47562 ("m68k: Implement arch_dma_prep_coherent()") Reported-by: Guenter Roeck Signed-off-by: Christoph Hellwig Signed-off-by: Geert Uytterhoeven arch/m68k/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5ad18b2e60b75c7297a998dea702451d33a052ed Merge: 92c1d6522135 318759b4737c Author: Linus Torvalds Date: Mon Jul 8 21:48:15 2019 -0700 Merge branch 'siginfo-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace Pull force_sig() argument change from Eric Biederman: "A source of error over the years has been that force_sig has taken a task parameter when it is only safe to use force_sig with the current task. The force_sig function is built for delivering synchronous signals such as SIGSEGV where the userspace application caused a synchronous fault (such as a page fault) and the kernel responded with a signal. Because the name force_sig does not make this clear, and because the force_sig takes a task parameter the function force_sig has been abused for sending other kinds of signals over the years. Slowly those have been fixed when the oopses have been tracked down. This set of changes fixes the remaining abusers of force_sig and carefully rips out the task parameter from force_sig and friends making this kind of error almost impossible in the future" * 'siginfo-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: (27 commits) signal/x86: Move tsk inside of CONFIG_MEMORY_FAILURE in do_sigbus signal: Remove the signal number and task parameters from force_sig_info signal: Factor force_sig_info_to_task out of force_sig_info signal: Generate the siginfo in force_sig signal: Move the computation of force into send_signal and correct it. signal: Properly set TRACE_SIGNAL_LOSE_INFO in __send_signal signal: Remove the task parameter from force_sig_fault signal: Use force_sig_fault_to_task for the two calls that don't deliver to current signal: Explicitly call force_sig_fault on current signal/unicore32: Remove tsk parameter from __do_user_fault signal/arm: Remove tsk parameter from __do_user_fault signal/arm: Remove tsk parameter from ptrace_break signal/nds32: Remove tsk parameter from send_sigtrap signal/riscv: Remove tsk parameter from do_trap signal/sh: Remove tsk parameter from force_sig_info_fault signal/um: Remove task parameter from send_sigtrap signal/x86: Remove task parameter from send_sigtrap signal: Remove task parameter from force_sig_mceerr signal: Remove task parameter from force_sig signal: Remove task parameter from force_sigsegv ... commit 92c1d6522135050cb377a18cc6e30d08dfb87efb Merge: df2a40f549e6 99c8b231ae6c Author: Linus Torvalds Date: Mon Jul 8 21:35:12 2019 -0700 Merge branch 'for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup updates from Tejun Heo: "Documentation updates and the addition of cgroup_parse_float() which will be used by new controllers including blk-iocost" * 'for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: docs: cgroup-v1: convert docs to ReST and rename to *.rst cgroup: Move cgroup_parse_float() implementation out of CONFIG_SYSFS cgroup: add cgroup_parse_float() commit df2a40f549e6b73aad98b0c03f400c00d284816b Merge: 2b49350b16fa be69d00d9769 Author: Linus Torvalds Date: Mon Jul 8 21:10:01 2019 -0700 Merge branch 'for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq Pull workqueue updates from Tejun Heo: "Just a couple cleanup patches. No functional changes." * 'for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: workqueue: Remove GPF argument from alloc_workqueue_attrs() workqueue: Make alloc/apply/free_workqueue_attrs() static commit 2b49350b16fa3171136d7cf351ac7e9e6673b8f2 Merge: 4d2fa8b44b89 5ccd3bd992cf Author: Linus Torvalds Date: Mon Jul 8 21:08:34 2019 -0700 Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM updates from Russell King: - Add a "cut here" to make it clearer where oops dumps should be cut from - we already have a marker for the end of the dumps. - Add logging severity to show_pte() - Drop unnecessary common-page-size linker flag - Errata workarounds for Cortex A12 857271, Cortex A17 857272 and Cortex A7 814220. - Remove some unused variables that had started to provoke a compiler warning. * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: 8863/1: stm32: select ARM errata 814220 ARM: 8862/1: errata: 814220-B-Cache maintenance by set/way operations can execute out of order ARM: 8865/1: mm: remove unused variables ARM: 8864/1: Add workaround for I-Cache line size mismatch between CPU cores ARM: 8861/1: errata: Workaround errata A12 857271 / A17 857272 ARM: 8860/1: VDSO: Drop implicit common-page-size linker flag ARM: arrange show_pte() to issue severity-based messages ARM: add "8<--- cut here ---" to kernel dumps commit 4c6d80e1144bdf48cae6b602ae30d41f3e5c76a9 Author: Norbert Manthey Date: Fri Jul 5 15:06:00 2019 +0200 pstore: Fix double-free in pstore_mkfile() failure path The pstore_mkfile() function is passed a pointer to a struct pstore_record. On success it consumes this 'record' pointer and references it from the created inode. On failure, however, it may or may not free the record. There are even two different code paths which return -ENOMEM -- one of which does and the other doesn't free the record. Make the behaviour deterministic by never consuming and freeing the record when returning failure, allowing the caller to do the cleanup consistently. Signed-off-by: Norbert Manthey Link: https://lore.kernel.org/r/1562331960-26198-1-git-send-email-nmanthey@amazon.de Fixes: 83f70f0769ddd ("pstore: Do not duplicate record metadata") Fixes: 1dfff7dd67d1a ("pstore: Pass record contents instead of copying") Cc: stable@vger.kernel.org [kees: also move "private" allocation location, rename inode cleanup label] Signed-off-by: Kees Cook fs/pstore/inode.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit fa1af7583e8012c471ee45d5b1703123fe45a9f3 Author: Greg Kroah-Hartman Date: Wed Jun 12 17:20:33 2019 +0200 pstore: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Kees Cook Cc: Anton Vorontsov Cc: Colin Cross Cc: Tony Luck Cc: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Kees Cook fs/pstore/ftrace.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) commit 1614e92179abe91283fc397c37f6244fe0019072 Author: Douglas Anderson Date: Wed May 8 08:48:31 2019 -0700 pstore/ram: Improve backward compatibility with older Chromebooks When you try to run an upstream kernel on an old ARM-based Chromebook you'll find that console-ramoops doesn't work. Old ARM-based Chromebooks, before ("ramoops: support upstream {console,pmsg,ftrace}-size properties") used to create a "ramoops" node at the top level that looked like: / { ramoops { compatible = "ramoops"; reg = <...>; record-size = <...>; dump-oops; }; }; ...and these Chromebooks assumed that the downstream kernel would make console_size / pmsg_size match the record size. The above ramoops node was added by the firmware so it's not easy to make any changes. Let's match the expected behavior, but only for those using the old backward-compatible way of working where ramoops is right under the root node. NOTE: if there are some out-of-tree devices that had ramoops at the top level, left everything but the record size as 0, and somehow doesn't want this behavior, we can try to add more conditions here. Signed-off-by: Douglas Anderson Signed-off-by: Kees Cook fs/pstore/ram.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 4d2fa8b44b891f0da5ceda3e5a1402ccf0ab6f26 Merge: 8b68150883ca f3880a23564e Author: Linus Torvalds Date: Mon Jul 8 20:57:08 2019 -0700 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto updates from Herbert Xu: "Here is the crypto update for 5.3: API: - Test shash interface directly in testmgr - cra_driver_name is now mandatory Algorithms: - Replace arc4 crypto_cipher with library helper - Implement 5 way interleave for ECB, CBC and CTR on arm64 - Add xxhash - Add continuous self-test on noise source to drbg - Update jitter RNG Drivers: - Add support for SHA204A random number generator - Add support for 7211 in iproc-rng200 - Fix fuzz test failures in inside-secure - Fix fuzz test failures in talitos - Fix fuzz test failures in qat" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (143 commits) crypto: stm32/hash - remove interruptible condition for dma crypto: stm32/hash - Fix hmac issue more than 256 bytes crypto: stm32/crc32 - rename driver file crypto: amcc - remove memset after dma_alloc_coherent crypto: ccp - Switch to SPDX license identifiers crypto: ccp - Validate the the error value used to index error messages crypto: doc - Fix formatting of new crypto engine content crypto: doc - Add parameter documentation crypto: arm64/aes-ce - implement 5 way interleave for ECB, CBC and CTR crypto: arm64/aes-ce - add 5 way interleave routines crypto: talitos - drop icv_ool crypto: talitos - fix hash on SEC1. crypto: talitos - move struct talitos_edesc into talitos.h lib/scatterlist: Fix mapping iterator when sg->offset is greater than PAGE_SIZE crypto/NX: Set receive window credits to max number of CRBs in RxFIFO crypto: asymmetric_keys - select CRYPTO_HASH where needed crypto: serpent - mark __serpent_setkey_sbox noinline crypto: testmgr - dynamically allocate crypto_shash crypto: testmgr - dynamically allocate testvec_config crypto: talitos - eliminate unneeded 'done' functions at build time ... commit 8b68150883ca466a23e90902dd4113b22e692f04 Merge: 0f75ef6a9cff 650b29dbdf2c Author: Linus Torvalds Date: Mon Jul 8 20:28:59 2019 -0700 Merge branch 'next-integrity' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity Pull integrity updates from Mimi Zohar: "Bug fixes, code clean up, and new features: - IMA policy rules can be defined in terms of LSM labels, making the IMA policy dependent on LSM policy label changes, in particular LSM label deletions. The new environment, in which IMA-appraisal is being used, frequently updates the LSM policy and permits LSM label deletions. - Prevent an mmap'ed shared file opened for write from also being mmap'ed execute. In the long term, making this and other similar changes at the VFS layer would be preferable. - The IMA per policy rule template format support is needed for a couple of new/proposed features (eg. kexec boot command line measurement, appended signatures, and VFS provided file hashes). - Other than the "boot-aggregate" record in the IMA measuremeent list, all other measurements are of file data. Measuring and storing the kexec boot command line in the IMA measurement list is the first buffer based measurement included in the measurement list" * 'next-integrity' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity: integrity: Introduce struct evm_xattr ima: Update MAX_TEMPLATE_NAME_LEN to fit largest reasonable definition KEXEC: Call ima_kexec_cmdline to measure the boot command line args IMA: Define a new template field buf IMA: Define a new hook to measure the kexec boot command line arguments IMA: support for per policy rule template formats integrity: Fix __integrity_init_keyring() section mismatch ima: Use designated initializers for struct ima_event_data ima: use the lsm policy update notifier LSM: switch to blocking policy update notifiers x86/ima: fix the Kconfig dependency for IMA_ARCH_POLICY ima: Make arch_policy_entry static ima: prevent a file already mmap'ed write to be mmap'ed execute x86/ima: check EFI SetupMode too commit b14a260e33ddb4536088a799f24f321593201a64 Merge: 3cab2afb149c 5c4b4608fe10 Author: David S. Miller Date: Mon Jul 8 20:21:10 2019 -0700 Merge branch 'nfp-tls-fixes-for-initial-TLS-support' Jakub Kicinski says: ==================== nfp: tls: fixes for initial TLS support This series brings various fixes to nfp tls offload recently added to net-next. First 4 patches revolve around device mailbox communication, trying to make it more reliable. Next patch fixes statistical counter. Patch 6 improves the TX resync if device communication failed. Patch 7 makes sure we remove keys from memory after talking to FW. Patch 8 adds missing tls context initialization, we fill in the context information from various places based on the configuration and looks like we missed the init in the case of where TX is offloaded, but RX wasn't initialized yet. Patches 9 and 10 make the nfp driver undo TLS state changes if we need to drop the frame (e.g. due to DMA mapping error). Last but not least TLS fallback should not adjust socket memory after skb_orphan_partial(). This code will go away once we forbid orphaning of skbs in need of crypto, but that's "real" -next material, so lets do a quick fix. ==================== Signed-off-by: David S. Miller commit 5c4b4608fe100838c62591877101128467e56c00 Author: Jakub Kicinski Date: Mon Jul 8 19:53:18 2019 -0700 net/tls: fix socket wmem accounting on fallback with netem netem runs skb_orphan_partial() which "disconnects" the skb from normal TCP write memory accounting. We should not adjust sk->sk_wmem_alloc on the fallback path for such skbs. Fixes: e8f69799810c ("net/tls: Add generic NIC offload infrastructure") Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller net/tls/tls_device_fallback.c | 4 ++++ 1 file changed, 4 insertions(+) commit 5a4cea280c01ba0ef3deda85c14fd1321eff3270 Author: Jakub Kicinski Date: Mon Jul 8 19:53:17 2019 -0700 nfp: tls: undo TLS sequence tracking when dropping the frame If driver has to drop the TLS frame it needs to undo the TCP sequence tracking changes, otherwise device will receive segments out of order and drop them. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller .../net/ethernet/netronome/nfp/nfp_net_common.c | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit c8d3928ea7e7e536e2b3d79742d0018ac587b776 Author: Jakub Kicinski Date: Mon Jul 8 19:53:16 2019 -0700 nfp: tls: avoid one of the ifdefs for TLS Move the #ifdef CONFIG_TLS_DEVICE a little so we can eliminate the other one. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit ab232e61e728a08a2cb4ebb439d7d2aa75df89c9 Author: Jakub Kicinski Date: Mon Jul 8 19:53:15 2019 -0700 net/tls: add missing prot info init Turns out TLS_TX in HW offload mode does not initialize tls_prot_info. Since commit 9cd81988cce1 ("net/tls: use version from prot") we actually use this field on the datapath. Luckily we always compare it to TLS 1.3, and assume 1.2 otherwise. So since zero is not equal to 1.3, everything worked fine. Fixes: 9cd81988cce1 ("net/tls: use version from prot") Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller net/tls/tls_device.c | 2 ++ 1 file changed, 2 insertions(+) commit c3b64911331219a3ff6bb6aeb844d92612a8e821 Author: Jakub Kicinski Date: Mon Jul 8 19:53:14 2019 -0700 nfp: tls: don't leave key material in freed FW cmsg skbs Make sure the contents of the skb which carried key material to the FW is cleared. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/crypto/tls.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit b5d9a834f4fd1b6abfa527ec351c871084dd23a3 Author: Dirk van der Merwe Date: Mon Jul 8 19:53:13 2019 -0700 net/tls: don't clear TX resync flag on error Introduce a return code for the tls_dev_resync callback. When the driver TX resync fails, kernel can retry the resync again until it succeeds. This prevents drivers from attempting to offload TLS packets if the connection is known to be out of sync. We don't worry about the RX resync since they will be retried naturally as more encrypted records get received. Signed-off-by: Dirk van der Merwe Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.c | 8 +++++--- drivers/net/ethernet/netronome/nfp/crypto/tls.c | 13 +++++++++---- include/net/tls.h | 6 +++--- net/tls/tls_device.c | 8 ++++++-- 4 files changed, 23 insertions(+), 12 deletions(-) commit 427545b3046326cd7b4dbbd7869f08737df2ad2b Author: Jakub Kicinski Date: Mon Jul 8 19:53:12 2019 -0700 nfp: tls: count TSO segments separately for the TLS offload Count the number of successfully submitted TLS segments, not skbs. This will make it easier to compare the TLS encryption count against other counters. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit f6dfa31509a03817fa7830b7fd4214f7f48df938 Author: Dirk van der Merwe Date: Mon Jul 8 19:53:11 2019 -0700 nfp: ccm: increase message limits Increase the batch limit to consume small message bursts more effectively. Practically, the effect on the 'add' messages is not significant since the mailbox is sized such that the 'add' messages are still limited to the same order of magnitude that it was originally set for. Furthermore, increase the queue size limit to 1024 entries. This further improves the handling of bursts of small control messages. Signed-off-by: Dirk van der Merwe Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/ccm_mbox.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 53601c68b8541672e026c0596a9dd8a86d96d7ab Author: Jakub Kicinski Date: Mon Jul 8 19:53:10 2019 -0700 nfp: tls: use unique connection ids instead of 4-tuple for TX Connection 4 tuple reuse is slightly problematic - TLS socket and context do not get destroyed until all the associated skbs left the system and all references are released. This leads to stale connection entry in the device preventing addition of new one if the 4 tuple is reused quickly enough. Instead of using read 4 tuple as the key use a unique ID. Set the protocol to TCP and port to 0 to ensure no collisions with real connections. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/crypto/fw.h | 2 ++ drivers/net/ethernet/netronome/nfp/crypto/tls.c | 43 +++++++++++++++++-------- drivers/net/ethernet/netronome/nfp/nfp_net.h | 3 ++ 3 files changed, 34 insertions(+), 14 deletions(-) commit ff8869d5ed4e798c6dad89809689cb9d2e2ab2f8 Author: Jakub Kicinski Date: Mon Jul 8 19:53:09 2019 -0700 nfp: tls: move setting ipver_vlan to a helper Long lines are ugly. No functional changes. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/crypto/tls.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 0f93242d96ff5a04fe02c4978e8dddb014235971 Author: Jakub Kicinski Date: Mon Jul 8 19:53:08 2019 -0700 nfp: tls: ignore queue limits for delete commands We need to do our best not to drop delete commands, otherwise we will have stale entries in the connection table. Ignore the control message queue limits for delete commands. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/ccm.h | 4 ++++ drivers/net/ethernet/netronome/nfp/ccm_mbox.c | 25 +++++++++++++++++-------- drivers/net/ethernet/netronome/nfp/crypto/tls.c | 5 +++-- 3 files changed, 24 insertions(+), 10 deletions(-) commit 3cab2afb149ceedd324d14c6562224fb925252a6 Author: Xin Long Date: Tue Jul 9 00:59:40 2019 +0800 sctp: remove rcu_read_lock from sctp_bind_addr_state sctp_bind_addr_state() is called either in packet rcv path or by sctp_copy_local_addr_list(), which are under rcu_read_lock. So there's no need to call it again in sctp_bind_addr_state(). Signed-off-by: Xin Long Signed-off-by: David S. Miller net/sctp/bind_addr.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit 6c6fbad6576fb19f93770feabcf2d0a30b4ae0e2 Merge: ccf355e52a32 e55f4b8bf462 Author: David S. Miller Date: Mon Jul 8 20:16:25 2019 -0700 Merge branch 'sctp-tidyup' Xin Long says: ==================== sctp: tidy up some ep and asoc feature flags This patchset is to remove some unnecessary feature flags from sctp_assocation and move some others to the right places. ==================== Signed-off-by: David S. Miller commit e55f4b8bf4622103badac8694cdabceec06f9b38 Author: Xin Long Date: Tue Jul 9 00:57:07 2019 +0800 sctp: rename sp strm_interleave to ep intl_enable Like other endpoint features, strm_interleave should be moved to sctp_endpoint and renamed to intl_enable. Signed-off-by: Xin Long Signed-off-by: David S. Miller include/net/sctp/structs.h | 2 +- net/sctp/sm_make_chunk.c | 4 ++-- net/sctp/socket.c | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) commit da1f6d4de7b743c86cb49015ea05b184fea1388c Author: Xin Long Date: Tue Jul 9 00:57:06 2019 +0800 sctp: rename asoc intl_enable to asoc peer.intl_capable To keep consistent with other asoc features, we move intl_enable to peer.intl_capable in asoc. Signed-off-by: Xin Long Signed-off-by: David S. Miller include/net/sctp/structs.h | 33 +++++++++++++++++---------------- net/sctp/sm_make_chunk.c | 4 ++-- net/sctp/socket.c | 2 +- net/sctp/stream_interleave.c | 4 ++-- net/sctp/stream_sched.c | 2 +- 5 files changed, 23 insertions(+), 22 deletions(-) commit 1c13475368b697d4fc9c0630b5d4ee51d5ca0790 Author: Xin Long Date: Tue Jul 9 00:57:05 2019 +0800 sctp: remove prsctp_enable from asoc Like reconf_enable, prsctp_enable should also be removed from asoc, as asoc->peer.prsctp_capable has taken its job. Signed-off-by: Xin Long Signed-off-by: David S. Miller include/net/sctp/structs.h | 3 +-- net/sctp/associola.c | 1 - net/sctp/sm_make_chunk.c | 8 ++++---- net/sctp/socket.c | 2 +- 4 files changed, 6 insertions(+), 8 deletions(-) commit a96701fb3534c45bd6fe5e6f6d3a91e3acc19b59 Author: Xin Long Date: Tue Jul 9 00:57:04 2019 +0800 sctp: remove reconf_enable from asoc asoc's reconf support is actually decided by the 4-shakehand negotiation, not something that users can set by sockopt. asoc->peer.reconf_capable is working for this. So remove it from asoc. Signed-off-by: Xin Long Signed-off-by: David S. Miller include/net/sctp/structs.h | 3 +-- net/sctp/associola.c | 1 - net/sctp/sm_make_chunk.c | 5 ++--- net/sctp/socket.c | 7 ++----- 4 files changed, 5 insertions(+), 11 deletions(-) commit c8320ccdd47ebf31e516286b594d1cc36cbaf551 Author: Joe Perches Date: Thu Jul 4 16:57:48 2019 -0700 nfsd: Fix misuse of strlcpy Probable cut&paste typo - use the correct field size. (Not currently a practical problem since these two fields have the same size, but we should fix it anyway.) Signed-off-by: Joe Perches Signed-off-by: J. Bruce Fields fs/nfsd/nfs4idmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ccf355e52a3265624b7acadd693c849d599e9b9f Author: Fuqian Huang Date: Mon Jul 8 20:34:17 2019 +0800 net: phy: Make use of linkmode_mod_bit helper linkmode_mod_bit is introduced as a helper function to set/clear bits in a linkmode. Replace the if else code structure with a call to the helper linkmode_mod_bit. Signed-off-by: Fuqian Huang Signed-off-by: David S. Miller drivers/net/phy/phy.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit 0f75ef6a9cff49ff612f7ce0578bced9d0b38325 Merge: c84ca912b079 7a1ade847596 Author: Linus Torvalds Date: Mon Jul 8 19:56:57 2019 -0700 Merge tag 'keys-acl-20190703' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs Pull keyring ACL support from David Howells: "This changes the permissions model used by keys and keyrings to be based on an internal ACL by the following means: - Replace the permissions mask internally with an ACL that contains a list of ACEs, each with a specific subject with a permissions mask. Potted default ACLs are available for new keys and keyrings. ACE subjects can be macroised to indicate the UID and GID specified on the key (which remain). Future commits will be able to add additional subject types, such as specific UIDs or domain tags/namespaces. Also split a number of permissions to give finer control. Examples include splitting the revocation permit from the change-attributes permit, thereby allowing someone to be granted permission to revoke a key without allowing them to change the owner; also the ability to join a keyring is split from the ability to link to it, thereby stopping a process accessing a keyring by joining it and thus acquiring use of possessor permits. - Provide a keyctl to allow the granting or denial of one or more permits to a specific subject. Direct access to the ACL is not granted, and the ACL cannot be viewed" * tag 'keys-acl-20190703' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: keys: Provide KEYCTL_GRANT_PERMISSION keys: Replace uid/gid/perm permissions checking with an ACL commit 88e2f2846d901e1d61e99ac1d06544d41f478430 Merge: af144a983402 6fb8dbca8e9e Author: David S. Miller Date: Mon Jul 8 19:50:13 2019 -0700 Merge branch 'Add-MPLS-actions-to-TC' John Hurley says: ==================== Add MPLS actions to TC This patchset introduces a new TC action module that allows the manipulation of the MPLS headers of packets. The code impliments functionality including push, pop, and modify. Also included are tests for the new funtionality. Note that these will require iproute2 changes to be submitted soon. NOTE: these patches are applied to net-next along with the patch: [PATCH net 1/1] net: openvswitch: fix csum updates for MPLS actions This patch has been accepted into net but, at time of posting, is not yet in net-next. v6-v7: - add extra tests for setting max/min and exceeding range of fields - patch 5 (Roman Mashak) v5-v6: - add CONFIG_NET_ACT_MPLS to tc-testing config file - patch 5 (Davide Caratti) v4-v5: - move mpls_hdr() call to after skb_ensure_writable - patch 3 (Willem de Bruijn) - move mpls_dec_ttl to helper - patch 4 (Willem de Bruijn) - add iproute2 usage example to commit msg - patch 4 (David Ahern) - align label validation with mpls core code - patch 4 (David Ahern) - improve extack message for no proto in mpls pop - patch 4 (David Ahern) v3-v4: - refactor and reuse OvS code (Cong Wang) - use csum API rather than skb_post*rscum to update skb->csum (Cong Wang) - remove unnecessary warning (Cong Wang) - add comments to uapi attributes (David Ahern) - set strict type policy check for TCA_MPLS_UNSPEC (David Ahern) - expand/improve extack messages (David Ahern) - add option to manually set BOS v2-v3: - remove a few unnecessary line breaks (Jiri Pirko) - retract hw offload patch from set (resubmit with driver changes) (Jiri) v1->v2: - ensure TCA_ID_MPLS does not conflict with TCA_ID_CTINFO (Davide Caratti) ==================== Signed-off-by: David S. Miller commit 6fb8dbca8e9e6de79ce25272eadd9cd96e05debf Author: John Hurley Date: Sun Jul 7 15:01:58 2019 +0100 tc-tests: actions: add MPLS tests Add a new series of selftests to verify the functionality of act_mpls in TC. Signed-off-by: John Hurley Reviewed-by: Simon Horman Acked-by: Jakub Kicinski Signed-off-by: David S. Miller tools/testing/selftests/tc-testing/config | 1 + .../tc-testing/tc-tests/actions/mpls.json | 1088 ++++++++++++++++++++ 2 files changed, 1089 insertions(+) commit 2a2ea50870baa3fb4de0872c5b60828138654ca7 Author: John Hurley Date: Sun Jul 7 15:01:57 2019 +0100 net: sched: add mpls manipulation actions to TC Currently, TC offers the ability to match on the MPLS fields of a packet through the use of the flow_dissector_key_mpls struct. However, as yet, TC actions do not allow the modification or manipulation of such fields. Add a new module that registers TC action ops to allow manipulation of MPLS. This includes the ability to push and pop headers as well as modify the contents of new or existing headers. A further action to decrement the TTL field of an MPLS header is also provided with a new helper added to support this. Examples of the usage of the new action with flower rules to push and pop MPLS labels are: tc filter add dev eth0 protocol ip parent ffff: flower \ action mpls push protocol mpls_uc label 123 \ action mirred egress redirect dev eth1 tc filter add dev eth0 protocol mpls_uc parent ffff: flower \ action mpls pop protocol ipv4 \ action mirred egress redirect dev eth1 Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski Reviewed-by: Simon Horman Reviewed-by: Willem de Bruijn Acked-by: Cong Wang Signed-off-by: David S. Miller include/linux/skbuff.h | 1 + include/net/tc_act/tc_mpls.h | 30 +++ include/uapi/linux/pkt_cls.h | 3 +- include/uapi/linux/tc_act/tc_mpls.h | 33 +++ net/core/skbuff.c | 30 +++ net/sched/Kconfig | 11 + net/sched/Makefile | 1 + net/sched/act_mpls.c | 406 ++++++++++++++++++++++++++++++++++++ 8 files changed, 514 insertions(+), 1 deletion(-) commit d27cf5c59a12f66425df29cd81f61aa73ef14ac1 Author: John Hurley Date: Sun Jul 7 15:01:56 2019 +0100 net: core: add MPLS update core helper and use in OvS Open vSwitch allows the updating of an existing MPLS header on a packet. In preparation for supporting similar functionality in TC, move this to a common skb helper function. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski Reviewed-by: Simon Horman Reviewed-by: Willem de Bruijn Acked-by: Cong Wang Signed-off-by: David S. Miller include/linux/skbuff.h | 1 + net/core/skbuff.c | 33 +++++++++++++++++++++++++++++++++ net/openvswitch/actions.c | 13 +++---------- 3 files changed, 37 insertions(+), 10 deletions(-) commit ed246cee09b9865145a2e1e34f63ec0e31dd83a5 Author: John Hurley Date: Sun Jul 7 15:01:55 2019 +0100 net: core: move pop MPLS functionality from OvS to core helper Open vSwitch provides code to pop an MPLS header to a packet. In preparation for supporting this in TC, move the pop code to an skb helper that can be reused. Remove the, now unused, update_ethertype static function from OvS. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski Reviewed-by: Simon Horman Reviewed-by: Willem de Bruijn Acked-by: Cong Wang Signed-off-by: David S. Miller include/linux/skbuff.h | 1 + net/core/skbuff.c | 42 ++++++++++++++++++++++++++++++++++++++++++ net/openvswitch/actions.c | 37 ++----------------------------------- 3 files changed, 45 insertions(+), 35 deletions(-) commit 8822e270d697010e6a4fd42a319dbefc33db91e1 Author: John Hurley Date: Sun Jul 7 15:01:54 2019 +0100 net: core: move push MPLS functionality from OvS to core helper Open vSwitch provides code to push an MPLS header to a packet. In preparation for supporting this in TC, move the push code to an skb helper that can be reused. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski Reviewed-by: Simon Horman Reviewed-by: Willem de Bruijn Acked-by: Cong Wang Signed-off-by: David S. Miller include/linux/skbuff.h | 1 + net/core/skbuff.c | 64 +++++++++++++++++++++++++++++++++++++++++++++++ net/openvswitch/actions.c | 31 +++-------------------- 3 files changed, 69 insertions(+), 27 deletions(-) commit af144a983402f7fd324ce556d9f9011a8b3e01fe Merge: 6413139dfc64 e858faf556d4 Author: David S. Miller Date: Mon Jul 8 19:48:57 2019 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Two cases of overlapping changes, nothing fancy. Signed-off-by: David S. Miller commit 6413139dfc641aaaa30580b59696a5f7ea274194 Author: Willem de Bruijn Date: Sun Jul 7 05:51:55 2019 -0400 skbuff: increase verbosity when dumping skb data skb_warn_bad_offload and netdev_rx_csum_fault trigger on hard to debug issues. Dump more state and the header. Optionally dump the entire packet and linear segment. This is required to debug checksum bugs that may include bytes past skb_tail_pointer(). Both call sites call this function inside a net_ratelimit() block. Limit full packet log further to a hard limit of can_dump_full (5). Based on an earlier patch by Cong Wang, see link below. Changes v1 -> v2 - dump frag_list only on full_pkt Link: https://patchwork.ozlabs.org/patch/1000841/ Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller include/linux/skbuff.h | 1 + net/core/dev.c | 16 ++------ net/core/skbuff.c | 99 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 104 insertions(+), 12 deletions(-) commit 59c820b2317f0ffe1ab9b5d2c0515cdbfe714e6e Author: Willem de Bruijn Date: Sun Jul 7 05:34:45 2019 -0400 ipv6: elide flowlabel check if no exclusive leases exist Processes can request ipv6 flowlabels with cmsg IPV6_FLOWINFO. If not set, by default an autogenerated flowlabel is selected. Explicit flowlabels require a control operation per label plus a datapath check on every connection (every datagram if unconnected). This is particularly expensive on unconnected sockets multiplexing many flows, such as QUIC. In the common case, where no lease is exclusive, the check can be safely elided, as both lease request and check trivially succeed. Indeed, autoflowlabel does the same even with exclusive leases. Elide the check if no process has requested an exclusive lease. fl6_sock_lookup previously returns either a reference to a lease or NULL to denote failure. Modify to return a real error and update all callers. On return NULL, they can use the label and will elide the atomic_dec in fl6_sock_release. This is an optimization. Robust applications still have to revert to requesting leases if the fast path fails due to an exclusive lease. Changes RFC->v1: - use static_key_false_deferred to rate limit jump label operations - call static_key_deferred_flush to stop timers on exit - move decrement out of RCU context - defer optimization also if opt data is associated with a lease - updated all fp6_sock_lookup callers, not just udp Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller include/net/ipv6.h | 14 +++++++++++++- net/dccp/ipv6.c | 2 +- net/ipv6/ip6_flowlabel.c | 27 +++++++++++++++++++++++---- net/ipv6/raw.c | 4 ++-- net/ipv6/tcp_ipv6.c | 2 +- net/ipv6/udp.c | 4 ++-- net/l2tp/l2tp_ip6.c | 4 ++-- net/sctp/ipv6.c | 2 +- 8 files changed, 45 insertions(+), 14 deletions(-) commit c84ca912b07901be528e5184fd254fca1dddf2ac Merge: c236b6dd48dc a58946c158a0 Author: Linus Torvalds Date: Mon Jul 8 19:36:47 2019 -0700 Merge tag 'keys-namespace-20190627' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs Pull keyring namespacing from David Howells: "These patches help make keys and keyrings more namespace aware. Firstly some miscellaneous patches to make the process easier: - Simplify key index_key handling so that the word-sized chunks assoc_array requires don't have to be shifted about, making it easier to add more bits into the key. - Cache the hash value in the key so that we don't have to calculate on every key we examine during a search (it involves a bunch of multiplications). - Allow keying_search() to search non-recursively. Then the main patches: - Make it so that keyring names are per-user_namespace from the point of view of KEYCTL_JOIN_SESSION_KEYRING so that they're not accessible cross-user_namespace. keyctl_capabilities() shows KEYCTL_CAPS1_NS_KEYRING_NAME for this. - Move the user and user-session keyrings to the user_namespace rather than the user_struct. This prevents them propagating directly across user_namespaces boundaries (ie. the KEY_SPEC_* flags will only pick from the current user_namespace). - Make it possible to include the target namespace in which the key shall operate in the index_key. This will allow the possibility of multiple keys with the same description, but different target domains to be held in the same keyring. keyctl_capabilities() shows KEYCTL_CAPS1_NS_KEY_TAG for this. - Make it so that keys are implicitly invalidated by removal of a domain tag, causing them to be garbage collected. - Institute a network namespace domain tag that allows keys to be differentiated by the network namespace in which they operate. New keys that are of a type marked 'KEY_TYPE_NET_DOMAIN' are assigned the network domain in force when they are created. - Make it so that the desired network namespace can be handed down into the request_key() mechanism. This allows AFS, NFS, etc. to request keys specific to the network namespace of the superblock. This also means that the keys in the DNS record cache are thenceforth namespaced, provided network filesystems pass the appropriate network namespace down into dns_query(). For DNS, AFS and NFS are good, whilst CIFS and Ceph are not. Other cache keyrings, such as idmapper keyrings, also need to set the domain tag - for which they need access to the network namespace of the superblock" * tag 'keys-namespace-20190627' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: keys: Pass the network namespace into request_key mechanism keys: Network namespace domain tag keys: Garbage collect keys for which the domain has been removed keys: Include target namespace in match criteria keys: Move the user and user-session keyrings to the user_namespace keys: Namespace keyring names keys: Add a 'recurse' flag for keyring searches keys: Cache the hash value to avoid lots of recalculation keys: Simplify key description management commit e858faf556d4e14c750ba1e8852783c6f9520a0e Author: Christoph Paasch Date: Sat Jul 6 16:13:07 2019 -0700 tcp: Reset bytes_acked and bytes_received when disconnecting If an app is playing tricks to reuse a socket via tcp_disconnect(), bytes_acked/received needs to be reset to 0. Otherwise tcp_info will report the sum of the current and the old connection.. Cc: Eric Dumazet Fixes: 0df48c26d841 ("tcp: add tcpi_bytes_acked to tcp_info") Fixes: bdd1f9edacb5 ("tcp: add tcpi_bytes_received to tcp_info") Signed-off-by: Christoph Paasch Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp.c | 2 ++ 1 file changed, 2 insertions(+) commit ee4f56f46ab7a795dc8f7ecdfa11b616a5754b50 Author: Vincent Bernat Date: Sat Jul 6 23:01:08 2019 +0200 bonding: fix value exported by Netlink for peer_notif_delay IFLA_BOND_PEER_NOTIF_DELAY was set to the value of downdelay instead of peer_notif_delay. After this change, the correct value is exported. Fixes: 07a4ddec3ce9 ("bonding: add an option to specify a delay between peer notifications") Signed-off-by: Vincent Bernat Signed-off-by: David S. Miller drivers/net/bonding/bond_netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 333f7909a8573145811c4ab7d8c9092301707721 Author: Al Viro Date: Fri Jul 5 20:14:16 2019 +0100 coallocate socket_wq with socket itself socket->wq is assign-once, set when we are initializing both struct socket it's in and struct socket_wq it points to. As the matter of fact, the only reason for separate allocation was the ability to RCU-delay freeing of socket_wq. RCU-delaying the freeing of socket itself gets rid of that need, so we can just fold struct socket_wq into the end of struct socket and simplify the life both for sock_alloc_inode() (one allocation instead of two) and for tun/tap oddballs, where we used to embed struct socket and struct socket_wq into the same structure (now - embedding just the struct socket). Note that reference to struct socket_wq in struct sock does remain a reference - that's unchanged. Signed-off-by: Al Viro Signed-off-by: David S. Miller drivers/net/tap.c | 5 ++--- drivers/net/tun.c | 8 +++----- include/linux/if_tap.h | 1 - include/linux/net.h | 4 ++-- include/net/sock.h | 4 ++-- net/core/sock.c | 2 +- net/socket.c | 19 +++++-------------- 7 files changed, 15 insertions(+), 28 deletions(-) commit 6d7855c54e1e269275d7c504f8f62a0b7a5b3f18 Author: Al Viro Date: Fri Jul 5 20:13:22 2019 +0100 sockfs: switch to ->free_inode() we do have an RCU-delayed part there already (freeing the wq), so it's not like the pipe situation; moreover, it might be worth considering coallocating wq with the rest of struct sock_alloc. ->sk_wq in struct sock would remain a pointer as it is, but the object it normally points to would be coallocated with struct socket... Signed-off-by: Al Viro Signed-off-by: David S. Miller net/socket.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 272d28bdae1189791df4d118432bfae3feb53fe3 Author: Wolfram Sang Date: Mon Jun 10 11:51:56 2019 +0200 of: unittest: simplify getting the adapter of a client We have a dedicated pointer for that, so use it. Much easier to read and less computation involved. Reported-by: Peter Rosin Signed-off-by: Wolfram Sang Signed-off-by: Rob Herring drivers/of/unittest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c236b6dd48dcf2ae6ed14b9068830eccc3e181e6 Merge: d44a62742dec 3b8c4a08a471 Author: Linus Torvalds Date: Mon Jul 8 19:19:37 2019 -0700 Merge tag 'keys-request-20190626' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs Pull request_key improvements from David Howells: "These are all request_key()-related, including a fix and some improvements: - Fix the lack of a Link permission check on a key found by request_key(), thereby enabling request_key() to link keys that don't grant this permission to the target keyring (which must still grant Write permission). Note that the key must be in the caller's keyrings already to be found. - Invalidate used request_key authentication keys rather than revoking them, so that they get cleaned up immediately rather than hanging around till the expiry time is passed. - Move the RCU locks outwards from the keyring search functions so that a request_key_rcu() can be provided. This can be called in RCU mode, so it can't sleep and can't upcall - but it can be called from LOOKUP_RCU pathwalk mode. - Cache the latest positive result of request_key*() temporarily in task_struct so that filesystems that make a lot of request_key() calls during pathwalk can take advantage of it to avoid having to redo the searching. This requires CONFIG_KEYS_REQUEST_CACHE=y. It is assumed that the key just found is likely to be used multiple times in each step in an RCU pathwalk, and is likely to be reused for the next step too. Note that the cleanup of the cache is done on TIF_NOTIFY_RESUME, just before userspace resumes, and on exit" * tag 'keys-request-20190626' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: keys: Kill off request_key_async{,_with_auxdata} keys: Cache result of request_key*() temporarily in task_struct keys: Provide request_key_rcu() keys: Move the RCU locks outwards from the keyring search functions keys: Invalidate used request_key authentication keys keys: Fix request_key() lack of Link perm check on found key commit 17ccf9e31e0d650b36fdc06eb7b09757523111c7 Merge: 7650b1a9bd69 bf0bdd1343ef Author: David S. Miller Date: Mon Jul 8 19:14:38 2019 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Daniel Borkmann says: ==================== pull-request: bpf-next 2019-07-09 The following pull-request contains BPF updates for your *net-next* tree. The main changes are: 1) Lots of libbpf improvements: i) addition of new APIs to attach BPF programs to tracing entities such as {k,u}probes or tracepoints, ii) improve specification of BTF-defined maps by eliminating the need for data initialization for some of the members, iii) addition of a high-level API for setting up and polling perf buffers for BPF event output helpers, all from Andrii. 2) Add "prog run" subcommand to bpftool in order to test-run programs through the kernel testing infrastructure of BPF, from Quentin. 3) Improve verifier for BPF sockaddr programs to support 8-byte stores for user_ip6 and msg_src_ip6 members given clang tends to generate such stores, from Stanislav. 4) Enable the new BPF JIT zero-extension optimization for further riscv64 ALU ops, from Luke. 5) Fix a bpftool json JIT dump crash on powerpc, from Jiri. 6) Fix an AF_XDP race in generic XDP's receive path, from Ilya. 7) Various smaller fixes from Ilya, Yue and Arnd. ==================== Signed-off-by: David S. Miller commit d44a62742decca5ae5688a562584dc0fe9fc63f6 Merge: 7c0f89634892 45e0f30c30bb Author: Linus Torvalds Date: Mon Jul 8 19:02:11 2019 -0700 Merge tag 'keys-misc-20190619' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs Pull misc keyring updates from David Howells: "These are some miscellaneous keyrings fixes and improvements: - Fix a bunch of warnings from sparse, including missing RCU bits and kdoc-function argument mismatches - Implement a keyctl to allow a key to be moved from one keyring to another, with the option of prohibiting key replacement in the destination keyring. - Grant Link permission to possessors of request_key_auth tokens so that upcall servicing daemons can more easily arrange things such that only the necessary auth key is passed to the actual service program, and not all the auth keys a daemon might possesss. - Improvement in lookup_user_key(). - Implement a keyctl to allow keyrings subsystem capabilities to be queried. The keyutils next branch has commits to make available, document and test the move-key and capabilities code: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/keyutils.git/log They're currently on the 'next' branch" * tag 'keys-misc-20190619' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: keys: Add capability-checking keyctl function keys: Reuse keyring_index_key::desc_len in lookup_user_key() keys: Grant Link permission to possessers of request_key auth keys keys: Add a keyctl to move a key between keyrings keys: Hoist locking out of __key_link_begin() keys: Break bits out of key_unlink() keys: Change keyring_serialise_link_sem to a mutex keys: sparse: Fix kdoc mismatches keys: sparse: Fix incorrect RCU accesses keys: sparse: Fix key_fs[ug]id_changed() commit 7c0f89634892693fc0b46f25e0a6d57bd6dd5698 Merge: 61fc5771f5e7 ea74a685ad81 Author: Linus Torvalds Date: Mon Jul 8 18:59:56 2019 -0700 Merge tag 'selinux-pr-20190702' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux Pull selinux updates from Paul Moore: "Like the audit pull request this is a little early due to some upcoming vacation plans and uncertain network access while I'm away. Also like the audit PR, the list of patches here is pretty minor, the highlights include: - Explicitly use __le variables to make sure "sparse" can verify proper byte endian handling. - Remove some BUG_ON()s that are no longer needed. - Allow zero-byte writes to the "keycreate" procfs attribute without requiring key:create to make it easier for userspace to reset the keycreate label. - Consistently log the "invalid_context" field as an untrusted string in the AUDIT_SELINUX_ERR audit records" * tag 'selinux-pr-20190702' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux: selinux: format all invalid context as untrusted selinux: fix empty write to keycreate file selinux: remove some no-op BUG_ONs selinux: provide __le variables explicitly commit 61fc5771f5e729a2ce235af42f69c8506725e84a Merge: 884922591e2b 839d05e41385 Author: Linus Torvalds Date: Mon Jul 8 18:55:42 2019 -0700 Merge tag 'audit-pr-20190702' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit Pull audit updates from Paul Moore: "This pull request is a bit early, but with some vacation time coming up I wanted to send this out now just in case the remote Internet Gods decide not to smile on me once the merge window opens. The patchset for v5.3 is pretty minor this time, the highlights include: - When the audit daemon is sent a signal, ensure we deliver information about the sender even when syscall auditing is not enabled/supported. - Add the ability to filter audit records based on network address family. - Tighten the audit field filtering restrictions on string based fields. - Cleanup the audit field filtering verification code. - Remove a few BUG() calls from the audit code" * tag 'audit-pr-20190702' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit: audit: remove the BUG() calls in the audit rule comparison functions audit: enforce op for string fields audit: add saddr_fam filter field audit: re-structure audit field valid checks audit: deliver signal_info regarless of syscall commit 884922591e2b58fd7f1018701f957446d1ffac4d Merge: 222a21d29521 166a2809d65b Author: Linus Torvalds Date: Mon Jul 8 18:47:42 2019 -0700 Merge tag 'tpmdd-next-20190625' of git://git.infradead.org/users/jjs/linux-tpmdd Pull tpm updates from Jarkko Sakkinen: "This contains two critical bug fixes and support for obtaining TPM events triggered by ExitBootServices(). For the latter I have to give a quite verbose explanation not least because I had to revisit all the details myself to remember what was going on in Matthew's patches. The preboot software stack maintains an event log that gets entries every time something gets hashed to any of the PCR registers. What gets hashed could be a component to be run or perhaps log of some actions taken just to give couple of coarse examples. In general, anything relevant for the boot process that the preboot software does gets hashed and a log entry with a specific event type [1]. The main application for this is remote attestation and the reason why it is useful is nicely put in the very first section of [1]: "Attestation is used to provide information about the platform’s state to a challenger. However, PCR contents are difficult to interpret; therefore, attestation is typically more useful when the PCR contents are accompanied by a measurement log. While not trusted on their own, the measurement log contains a richer set of information than do the PCR contents. The PCR contents are used to provide the validation of the measurement log." Because EFI_TCG2_PROTOCOL.GetEventLog() is not available after calling ExitBootServices(), Linux EFI stub copies the event log to a custom configuration table. Unfortunately, ExitBootServices() also generates events and obviously these events do not get copied to that table. Luckily firmware does this for us by providing a configuration table identified by EFI_TCG2_FINAL_EVENTS_TABLE_GUID. This essentially contains necessary changes to provide the full event log for the use the user space that is concatenated from these two partial event logs [2]" [1] https://trustedcomputinggroup.org/resource/pc-client-specific-platform-firmware-profile-specification/ [2] The final concatenation is done in drivers/char/tpm/eventlog/efi.c * tag 'tpmdd-next-20190625' of git://git.infradead.org/users/jjs/linux-tpmdd: tpm: Don't duplicate events from the final event log in the TCG2 log Abstract out support for locating an EFI config table tpm: Fix TPM 1.2 Shutdown sequence to prevent future TPM operations efi: Attempt to get the TCG2 event log in the boot stub tpm: Append the final event log to the TPM event log tpm: Reserve the TPM final events table tpm: Abstract crypto agile event size calculations tpm: Actually fail on TPM errors during "get random" commit 222a21d29521d144f3dd7a0bc4d4020e448f0126 Merge: 8faef7125d02 eb876fbc248e Author: Linus Torvalds Date: Mon Jul 8 18:28:44 2019 -0700 Merge branch 'x86-topology-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 topology updates from Ingo Molnar: "Implement multi-die topology support on Intel CPUs and expose the die topology to user-space tooling, by Len Brown, Kan Liang and Zhang Rui. These changes should have no effect on the kernel's existing understanding of topologies, i.e. there should be no behavioral impact on cache, NUMA, scheduler, perf and other topologies and overall system performance" * 'x86-topology-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86/intel/rapl: Cosmetic rename internal variables in response to multi-die/pkg support perf/x86/intel/uncore: Cosmetic renames in response to multi-die/pkg support hwmon/coretemp: Cosmetic: Rename internal variables to zones from packages thermal/x86_pkg_temp_thermal: Cosmetic: Rename internal variables to zones from packages perf/x86/intel/cstate: Support multi-die/package perf/x86/intel/rapl: Support multi-die/package perf/x86/intel/uncore: Support multi-die/package topology: Create core_cpus and die_cpus sysfs attributes topology: Create package_cpus sysfs attribute hwmon/coretemp: Support multi-die/package powercap/intel_rapl: Update RAPL domain name and debug messages thermal/x86_pkg_temp_thermal: Support multi-die/package powercap/intel_rapl: Support multi-die/package powercap/intel_rapl: Simplify rapl_find_package() x86/topology: Define topology_logical_die_id() x86/topology: Define topology_die_id() cpu/topology: Export die_id x86/topology: Create topology_max_die_per_package() x86/topology: Add CPUID.1F multi-die/package support commit 9f7546570bcb20debfaa97bcf720fa0fcb8fc05a Author: Nishka Dasgupta Date: Sat Jul 6 18:51:30 2019 +0530 hwmon: (ina3221) Add of_node_put() before return Each iteration of for_each_child_of_node puts the previous node, but in the case of a return from the middle of the loop, there is no put, thus causing a memory leak. Hence add an of_node_put before the return. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Link: https://lore.kernel.org/r/20190706132130.3129-1-nishkadg.linux@gmail.com Signed-off-by: Guenter Roeck drivers/hwmon/ina3221.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 277c628fa5acf363b73cdd3793700dc575a988c0 Author: Christian Schneider Date: Tue Jul 2 15:23:38 2019 +0200 hwmon: (gpio-fan) fix sysfs notifications and udev events for gpio-fan alarms sysfs_notify() and kobject_uevent() are passed the wrong device. fan_data->hwmon_dev needs to be passed, so that sysfs notification goes to right place and generated uevent has the right information Signed-off-by: Christian Schneider Signed-off-by: Guenter Roeck drivers/hwmon/gpio-fan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f2173fa2246e906602c6286c7dade68109d68976 Author: Christian Schneider Date: Tue Jul 2 15:23:37 2019 +0200 hwmon: (gpio-fan) move fan_alarm_init after devm_hwmon_device_register_with_groups This makes it possible to use the hwmon_dev in fan_alarm_notify(). Otherwise it would be possible, that a interupt arrives and fan_alarm_notify() is executed, before hwmon_dev is initialized. Signed-off-by: Christian Schneider Signed-off-by: Guenter Roeck drivers/hwmon/gpio-fan.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 7a1d220ccb0cc2b808eb176fb05bf55a38179f3f Author: Guenter Roeck Date: Sun Jun 30 15:40:34 2019 -0700 hwmon: (lm90) Introduce function to update configuration register The code to update the configuration register is repeated several times. Move it into a separate function. At the same time, un-inline lm90_select_remote_channel() and leave it up to the compiler to decide what to do with it. Also remove the 'client' argument from lm90_select_remote_channel() and from lm90_write_convrate() and take it from struct lm90_data instead where needed. This patch reduces code size by more than 800 bytes on x86_64. Cc: Boyang Yu Signed-off-by: Guenter Roeck drivers/hwmon/lm90.c | 89 +++++++++++++++++++++++----------------------------- 1 file changed, 40 insertions(+), 49 deletions(-) commit b849e5d18c366eae8185837bd7c4adbd27213fe2 Author: Guenter Roeck Date: Sun Jun 30 15:14:19 2019 -0700 hwmon: (lm90) Cache configuration register value The configuration register does not change on its own. Yet, it is read in various locations, modified, and written back. Simplify and optimize the code by caching its value and by only writing it back when needed. Cc: Boyang Yu Signed-off-by: Guenter Roeck drivers/hwmon/lm90.c | 59 +++++++++++++++++++++++++--------------------------- 1 file changed, 28 insertions(+), 31 deletions(-) commit 62456189f3292c62f87aef363f204886dc1d4b48 Author: Boyang Yu Date: Fri Jun 28 19:06:36 2019 +0000 hwmon: (lm90) Fix max6658 sporadic wrong temperature reading max6658 may report unrealistically high temperature during the driver initialization, for which, its overtemp alarm pin also gets asserted. For certain devices implementing overtemp protection based on that pin, it may further trigger a reset to the device. By reproducing the problem, the wrong reading is found to be coincident with changing the conversion rate. To mitigate this issue, set the stop bit before changing the conversion rate and unset it thereafter. After such change, the wrong reading is not reproduced. Apply this change only to the max6657 kind for now, controlled by flag LM90_PAUSE_ON_CONFIG. Signed-off-by: Boyang Yu Signed-off-by: Guenter Roeck drivers/hwmon/lm90.c | 42 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 4 deletions(-) commit a653acf00d07430bbb0af06a4f5cc2073bbefde7 Author: amy.shih Date: Mon Jun 17 08:10:00 2019 +0000 hwmon: (nct7904) Changes comments in probe function. Linux style for comments is the C89 "/* ... */" style, changes the comments to Linux style. Signed-off-by: amy.shih Signed-off-by: Guenter Roeck drivers/hwmon/nct7904.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b3e26067874700fb38aeddf2da9844afb36f1a94 Author: amy.shih Date: Mon Jun 17 08:08:50 2019 +0000 hwmon: (nct7904) Add error handling in probe function. When register read and write operations return errors, needs to add error handling. Signed-off-by: amy.shih Signed-off-by: Guenter Roeck drivers/hwmon/nct7904.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) commit 7199ff7d74003b5aad1e6328bf6128cd8ceea735 Author: Masahiro Yamada Date: Mon Jul 1 09:58:44 2019 +0900 kheaders: include only headers into kheaders_data.tar.xz Currently, kheaders_data.tar.xz contains some build scripts as well as headers. None of them is needed in the header archive. For ARCH=x86, this commit excludes the following from the archive: arch/x86/include/asm/Kbuild arch/x86/include/uapi/asm/Kbuild include/asm-generic/Kbuild include/config/auto.conf include/config/kernel.release include/config/tristate.conf include/uapi/asm-generic/Kbuild include/uapi/Kbuild kernel/gen_kheaders.sh This change is actually motivated for the planned header compile-testing because it will generate more build artifacts, which should not be included in the archive. Signed-off-by: Masahiro Yamada Reviewed-by: Joel Fernandes (Google) kernel/gen_kheaders.sh | 47 ++++++++++++++++------------------------------- 1 file changed, 16 insertions(+), 31 deletions(-) commit b60b7c2ea9b7f854d457fefd592c77f621a86580 Author: Masahiro Yamada Date: Mon Jul 1 09:58:43 2019 +0900 kheaders: remove meaningless -R option of 'ls' The -R option of 'ls' is supposed to be used for directories. -R, --recursive list subdirectories recursively Since 'find ... -type f' only matches to regular files, we do not expect directories passed to the 'ls' command here. Giving -R is harmless at least, but unneeded. Signed-off-by: Masahiro Yamada Reviewed-by: Joel Fernandes (Google) kernel/gen_kheaders.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 1e21cbfada87f697a2a7c450542a7d28925abee6 Author: Masahiro Yamada Date: Mon Jul 1 09:58:42 2019 +0900 kbuild: support header-test-pattern-y In my view, most of headers can be self-contained. So, it would be tedious to add every header to header-test-y explicitly. We usually end up with "all headers with some exceptions". There are two types in exceptions: [1] headers that are never compiled as standalone units For examples, include/linux/compiler-gcc.h is not intended for direct inclusion. We should always exclude such ones. [2] headers that are conditionally compiled as standalone units Some headers can be compiled only for particular architectures. For example, include/linux/arm-cci.h can be compiled only for arm/arm64 because it requires to exist. Clang can compile include/soc/nps/mtm.h only for arc because it contains an arch-specific register in inline assembler. So, you can write Makefile like this: header-test- += linux/compiler-gcc.h header-test-$(CONFIG_ARM) += linux/arm-cci.h header-test-$(CONFIG_ARM64) += linux/arm-cci.h header-test-$(CONFIG_ARC) += soc/nps/mtm.h The new syntax header-test-pattern-y will be useful to specify "the rest". The typical usage is like this: header-test-pattern-y += */*.h This will add all the headers in sub-directories to the test coverage, excluding $(header-test-). In this regards, header-test-pattern-y behaves like a weaker variant of header-test-y. Caveat: The patterns in header-test-pattern-y are prefixed with $(srctree)/$(src)/ but not $(objtree)/$(obj)/. Stale generated headers are often left over when you traverse the git history without cleaning. Wildcard patterns for $(objtree) may match to stale headers, which could fail to compile. One pitfall is $(srctree)/$(src)/ and $(objtree)/$(obj)/ point to the same directory for in-tree building. So, header-test-pattern-y should be used with care since it can potentially match to stale headers. Caveat2: You could use wildcard for header-test-. For example, header-test- += asm-generic/% ... will exclude headers in asm-generic directory. Unfortunately, the wildcard character is '%' instead of '*' here because this is evaluated by $(filter-out ...) whereas header-test-pattern-y is evaluated by $(wildcard ...). This is a kludge, but seems useful in some places... Signed-off-by: Masahiro Yamada Tested-by: Jani Nikula Documentation/kbuild/makefiles.txt | 10 ++++++++++ scripts/Makefile.lib | 11 +++++++++++ 2 files changed, 21 insertions(+) commit c93a0368aaa2962e6c89da20f79b8789b42e3387 Author: Masahiro Yamada Date: Mon Jul 1 09:58:41 2019 +0900 kbuild: do not create wrappers for header-test-y header-test-y does not work with headers in sub-directories. For example, you may want to write a Makefile, like this: include/linux/Kbuild: header-test-y += mtd/nand.h This entry will create a wrapper include/linux/mtd/nand.hdrtest.c with the following content: #include "mtd/nand.h" To make this work, we need to add $(srctree)/include/linux to the header search path. It would be tedious to add ccflags-y. Instead, we could change the *.hdrtest.c rule to wrap: #include "nand.h" This works for in-tree build since #include "..." searches in the relative path from the header with this directive. For O=... build, we need to add $(srctree)/include/linux/mtd to the header search path, which will be even more tedious. After all, I thought it would be handier to compile headers directly without creating wrappers. I added a new build rule to compile %.h into %.h.s The target is %.h.s instead of %.h.o because it is slightly faster. Also, as for GCC, an empty assembly is smaller than an empty object. I wrote the build rule: $(CC) $(c_flags) -S -o $@ -x c /dev/null -include $< instead of: $(CC) $(c_flags) -S -o $@ -x c $< Both work fine with GCC, but the latter is bad for Clang. This comes down to the difference in the -Wunused-function policy. GCC does not warn about unused 'static inline' functions at all. Clang does not warn about the ones in included headers, but does about the ones in the source. So, we should handle headers as headers, not as source files. In fact, this has been hidden since commit abb2ea7dfd82 ("compiler, clang: suppress warning for unused static inline functions"), but we should not rely on that. Signed-off-by: Masahiro Yamada Acked-by: Jani Nikula Tested-by: Jani Nikula .gitignore | 1 - Documentation/dontdiff | 1 - Documentation/kbuild/makefiles.txt | 3 +-- Makefile | 1 - scripts/Makefile.build | 10 +++++----- scripts/Makefile.lib | 2 +- scripts/package/mkspec | 2 +- 7 files changed, 8 insertions(+), 12 deletions(-) commit 8faef7125d02c0bbd7a1ceb4e3b599a9b8c42e58 Merge: da1770238597 d97ee99bf225 Author: Linus Torvalds Date: Mon Jul 8 17:49:45 2019 -0700 Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 platform updayes from Ingo Molnar: "Most of the commits add ACRN hypervisor guest support, plus two cleanups" * 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/jailhouse: Mark jailhouse_x2apic_available() as __init x86/platform/geode: Drop includes x86/acrn: Use HYPERVISOR_CALLBACK_VECTOR for ACRN guest upcall vector x86: Add support for Linux guests on an ACRN hypervisor x86/Kconfig: Add new X86_HV_CALLBACK_VECTOR config symbol commit da1770238597a4619b7845583881543ca81270cd Merge: 3431a940bb6c 46938cc8ab91 Author: Linus Torvalds Date: Mon Jul 8 17:34:44 2019 -0700 Merge branch 'x86-paravirt-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 paravirt updates from Ingo Molnar: "A handful of paravirt patching code enhancements to make it more robust against patching failures, and related cleanups and not so related cleanups - by Thomas Gleixner and myself" * 'x86-paravirt-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/paravirt: Rename paravirt_patch_site::instrtype to paravirt_patch_site::type x86/paravirt: Standardize 'insn_buff' variable names x86/paravirt: Match paravirt patchlet field definition ordering to initialization ordering x86/paravirt: Replace the paravirt patch asm magic x86/paravirt: Unify the 32/64 bit paravirt patching code x86/paravirt: Detect over-sized patching bugs in paravirt_patch_call() x86/paravirt: Detect over-sized patching bugs in paravirt_patch_insns() x86/paravirt: Remove bogus extern declarations commit 3431a940bb6c3969240d91314d654ebac7e12b09 Merge: 5b7a2095232d 711486fd1859 Author: Linus Torvalds Date: Mon Jul 8 17:28:57 2019 -0700 Merge branch 'x86-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 AVX512 status update from Ingo Molnar: "This adds a new ABI that the main scheduler probably doesn't want to deal with but HPC job schedulers might want to use: the AVX512_elapsed_ms field in the new /proc//arch_status task status file, which allows the user-space job scheduler to cluster such tasks, to avoid turbo frequency drops" * 'x86-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: Documentation/filesystems/proc.txt: Add arch_status file x86/process: Add AVX-512 usage elapsed time to /proc/pid/arch_status proc: Add /proc//arch_status commit 5b7a2095232d026d4537c4be54040c0f10525b5b Merge: 6cfcdad7630d 53b7607382b0 Author: Linus Torvalds Date: Mon Jul 8 17:27:24 2019 -0700 Merge branch 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 cleanups from Ingo Molnar: "Misc small cleanups: removal of superfluous code and coding style cleanups mostly" * 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/kexec: Make variable static and config dependent x86/defconfigs: Remove useless UEVENT_HELPER_PATH x86/amd_nb: Make hygon_nb_misc_ids static x86/tsc: Move inline keyword to the beginning of function declarations x86/io_delay: Define IO_DELAY macros in C instead of Kconfig x86/io_delay: Break instead of fallthrough in switch statement commit 6cfcdad7630de2b2eb09740bdc6ee921de8c785e Merge: c83b5d321b58 2ef085bd110c Author: Linus Torvalds Date: Mon Jul 8 17:25:53 2019 -0700 Merge branch 'x86-cache-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 cache resource control update from Ingo Molnar: "Two cleanup patches" * 'x86-cache-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/resctrl: Cleanup cbm_ensure_valid() x86/resctrl: Use _ASM_BX to avoid ifdeffery commit c83b5d321b58794b8469d57990dc3884cbcd289e Merge: a1aab6f3d295 87b61864d7ab Author: Linus Torvalds Date: Mon Jul 8 17:24:44 2019 -0700 Merge branch 'x86-build-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 build updates from Ingo Molnar: "Two kbuild enhancements by Masahiro Yamada" * 'x86-build-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/build: Remove redundant 'clean-files += capflags.c' x86/build: Add 'set -e' to mkcapflags.sh to delete broken capflags.c commit a1aab6f3d295f078c008893ee7fa2c011626c46f Merge: dad1c12ed831 7457c0da024b Author: Linus Torvalds Date: Mon Jul 8 16:59:34 2019 -0700 Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 asm updates from Ingo Molnar: "Most of the changes relate to Peter Zijlstra's cleanup of ptregs handling, in particular the i386 part is now much simplified and standardized - no more partial ptregs stack frames via the esp/ss oddity. This simplifies ftrace, kprobes, the unwinder, ptrace, kdump and kgdb. There's also a CR4 hardening enhancements by Kees Cook, to make the generic platform functions such as native_write_cr4() less useful as ROP gadgets that disable SMEP/SMAP. Also protect the WP bit of CR0 against similar attacks. The rest is smaller cleanups/fixes" * 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/alternatives: Add int3_emulate_call() selftest x86/stackframe/32: Allow int3_emulate_push() x86/stackframe/32: Provide consistent pt_regs x86/stackframe, x86/ftrace: Add pt_regs frame annotations x86/stackframe, x86/kprobes: Fix frame pointer annotations x86/stackframe: Move ENCODE_FRAME_POINTER to asm/frame.h x86/entry/32: Clean up return from interrupt preemption path x86/asm: Pin sensitive CR0 bits x86/asm: Pin sensitive CR4 bits Documentation/x86: Fix path to entry_32.S x86/asm: Remove unused TASK_TI_flags from asm-offsets.c commit bf0bdd1343efbbf65b4d53aef1fce14acbd79d50 Author: Ilya Maximets Date: Wed Jul 3 15:09:16 2019 +0300 xdp: fix race on generic receive path Unlike driver mode, generic xdp receive could be triggered by different threads on different CPU cores at the same time leading to the fill and rx queue breakage. For example, this could happen while sending packets from two processes to the first interface of veth pair while the second part of it is open with AF_XDP socket. Need to take a lock for each generic receive to avoid race. Fixes: c497176cb2e4 ("xsk: add Rx receive functions and poll support") Signed-off-by: Ilya Maximets Acked-by: Magnus Karlsson Tested-by: William Tu Signed-off-by: Daniel Borkmann include/net/xdp_sock.h | 2 ++ net/xdp/xsk.c | 31 ++++++++++++++++++++++--------- 2 files changed, 24 insertions(+), 9 deletions(-) commit dad1c12ed831a7a89cc01e5582cd0b81a4be7f19 Merge: 090bc5a2a914 af24bde8df20 Author: Linus Torvalds Date: Mon Jul 8 16:39:53 2019 -0700 Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler updates from Ingo Molnar: - Remove the unused per rq load array and all its infrastructure, by Dietmar Eggemann. - Add utilization clamping support by Patrick Bellasi. This is a refinement of the energy aware scheduling framework with support for boosting of interactive and capping of background workloads: to make sure critical GUI threads get maximum frequency ASAP, and to make sure background processing doesn't unnecessarily move to cpufreq governor to higher frequencies and less energy efficient CPU modes. - Add the bare minimum of tracepoints required for LISA EAS regression testing, by Qais Yousef - which allows automated testing of various power management features, including energy aware scheduling. - Restructure the former tsk_nr_cpus_allowed() facility that the -rt kernel used to modify the scheduler's CPU affinity logic such as migrate_disable() - introduce the task->cpus_ptr value instead of taking the address of &task->cpus_allowed directly - by Sebastian Andrzej Siewior. - Misc optimizations, fixes, cleanups and small enhancements - see the Git log for details. * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (33 commits) sched/uclamp: Add uclamp support to energy_compute() sched/uclamp: Add uclamp_util_with() sched/cpufreq, sched/uclamp: Add clamps for FAIR and RT tasks sched/uclamp: Set default clamps for RT tasks sched/uclamp: Reset uclamp values on RESET_ON_FORK sched/uclamp: Extend sched_setattr() to support utilization clamping sched/core: Allow sched_setattr() to use the current policy sched/uclamp: Add system default clamps sched/uclamp: Enforce last task's UCLAMP_MAX sched/uclamp: Add bucket local max tracking sched/uclamp: Add CPU's clamp buckets refcounting sched/fair: Rename weighted_cpuload() to cpu_runnable_load() sched/debug: Export the newly added tracepoints sched/debug: Add sched_overutilized tracepoint sched/debug: Add new tracepoint to track PELT at se level sched/debug: Add new tracepoints to track PELT at rq level sched/debug: Add a new sched_trace_*() helper functions sched/autogroup: Make autogroup_path() always available sched/wait: Deduplicate code with do-while sched/topology: Remove unused 'sd' parameter from arch_scale_cpu_capacity() ... commit 7650b1a9bd693d133a3ec0548ba63e828f34e3ec Merge: faf5577f2498 2800f2485417 Author: David S. Miller Date: Mon Jul 8 16:37:30 2019 -0700 Merge branch 'mp-inner-L3' Stephen Suryaputra says: ==================== net: Multipath hashing on inner L3 This series extends commit 363887a2cdfe ("ipv4: Support multipath hashing on inner IP pkts for GRE tunnel") to include support when the outer L3 is IPv6 and to consider the case where the inner L3 is different version from the outer L3, such as IPv6 tunneled by IPv4 GRE or vice versa. It also includes kselftest scripts to test the use cases. v2: Clarify the commit messages in the commits in this series to use the term tunneled by IPv4 GRE or by IPv6 GRE so that it's clear which one is the inner and which one is the outer (per David Miller). ==================== Signed-off-by: David S. Miller commit 2800f2485417a80633285503c782dd9416df85e4 Author: Stephen Suryaputra Date: Sat Jul 6 10:55:19 2019 -0400 selftests: forwarding: Test multipath hashing on inner IP pkts for GRE tunnel Add selftest scripts for multipath hashing on inner IP pkts when there is a single GRE tunnel but there are multiple underlay routes to reach the other end of the tunnel. Four cases are covered in these scripts: - IPv4 inner, IPv4 outer - IPv6 inner, IPv4 outer - IPv4 inner, IPv6 outer - IPv6 inner, IPv6 outer Reviewed-by: Ido Schimmel Signed-off-by: Stephen Suryaputra Signed-off-by: David S. Miller .../net/forwarding/gre_inner_v4_multipath.sh | 305 ++++++++++++++++++++ .../net/forwarding/gre_inner_v6_multipath.sh | 306 +++++++++++++++++++++ .../net/forwarding/ip6gre_inner_v4_multipath.sh | 304 ++++++++++++++++++++ .../net/forwarding/ip6gre_inner_v6_multipath.sh | 305 ++++++++++++++++++++ 4 files changed, 1220 insertions(+) commit d8f74f0975d8360ab15312697585837c989c406b Author: Stephen Suryaputra Date: Sat Jul 6 10:55:18 2019 -0400 ipv6: Support multipath hashing on inner IP pkts Make the same support as commit 363887a2cdfe ("ipv4: Support multipath hashing on inner IP pkts for GRE tunnel") for outer IPv6. The hashing considers both IPv4 and IPv6 pkts when they are tunneled by IPv6 GRE. Signed-off-by: Stephen Suryaputra Signed-off-by: David S. Miller Documentation/networking/ip-sysctl.txt | 1 + net/ipv6/route.c | 36 ++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) commit 828b2b442145cbe94fe3ca0e34a47f64b0f322ef Author: Stephen Suryaputra Date: Sat Jul 6 10:55:17 2019 -0400 ipv4: Multipath hashing on inner L3 needs to consider inner IPv6 pkts Commit 363887a2cdfe ("ipv4: Support multipath hashing on inner IP pkts for GRE tunnel") supports multipath policy value of 2, Layer 3 or inner Layer 3 if present, but it only considers inner IPv4. There is a use case of IPv6 is tunneled by IPv4 GRE, thus add the ability to hash on inner IPv6 addresses. Fixes: 363887a2cdfe ("ipv4: Support multipath hashing on inner IP pkts for GRE tunnel") Signed-off-by: Stephen Suryaputra Signed-off-by: David S. Miller net/ipv4/route.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit faf5577f2498cea23011b5c785ef853ded22700b Author: Wen Yang Date: Sat Jul 6 12:23:41 2019 +0800 net: pasemi: fix an use-after-free in pasemi_mac_phy_init() The phy_dn variable is still being used in of_phy_connect() after the of_node_put() call, which may result in use-after-free. Fixes: 1dd2d06c0459 ("net: Rework pasemi_mac driver to use of_mdio infrastructure") Signed-off-by: Wen Yang Cc: "David S. Miller" Cc: Thomas Gleixner Cc: Luis Chamberlain Cc: Michael Ellerman Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: David S. Miller drivers/net/ethernet/pasemi/pasemi_mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 090bc5a2a91499c1fd64b78d125daa6ca5531d38 Merge: e1928328699a 6e4f929ea8b2 Author: Linus Torvalds Date: Mon Jul 8 16:31:06 2019 -0700 Merge branch 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull RAS updates from Ingo Molnar: "Boris is on vacation so I'm sending the RAS bits this time. The main changes were: - Various RAS/CEC improvements and fixes by Borislav Petkov: - error insertion fixes - offlining latency fix - memory leak fix - additional sanity checks - cleanups - debug output improvements - More SMCA enhancements by Yazen Ghannam: - make banks truly per-CPU which they are in the hardware - don't over-cache certain registers - make the number of MCA banks per-CPU variable The long term goal with these changes is to support future heterogenous SMCA extensions. - Misc fixes and improvements" * 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mce: Do not check return value of debugfs_create functions x86/MCE: Determine MCA banks' init state properly x86/MCE: Make the number of MCA banks a per-CPU variable x86/MCE/AMD: Don't cache block addresses on SMCA systems x86/MCE: Make mce_banks a per-CPU array x86/MCE: Make struct mce_banks[] static RAS/CEC: Add copyright RAS/CEC: Add CONFIG_RAS_CEC_DEBUG and move CEC debug features there RAS/CEC: Dump the different array element sections RAS/CEC: Rename count_threshold to action_threshold RAS/CEC: Sanity-check array on every insertion RAS/CEC: Fix potential memory leak RAS/CEC: Do not set decay value on error RAS/CEC: Check count_threshold unconditionally RAS/CEC: Fix pfn insertion commit ef86ea982bb5a31cda1f2989b6e477bb53a1031b Author: Wen Yang Date: Sat Jul 6 11:38:41 2019 +0800 net: axienet: fix a potential double free in axienet_probe() There is a possible use-after-free issue in the axienet_probe(): 1701: np = of_parse_phandle(pdev->dev.of_node, "axistream-connected", 0); 1702: if (np) { ... 1787: of_node_put(np); ---> released here 1788: lp->eth_irq = platform_get_irq(pdev, 0); 1789: } else { ... 1801: } 1802: if (IS_ERR(lp->dma_regs)) { ... 1805: of_node_put(np); ---> double released here 1806: goto free_netdev; 1807: } We solve this problem by removing the unnecessary of_node_put(). Fixes: 28ef9ebdb64c ("net: axienet: make use of axistream-connected attribute optional") Signed-off-by: Wen Yang Cc: Anirudha Sarangi Cc: John Linn Cc: "David S. Miller" Cc: Michal Simek Cc: Robert Hancock Cc: netdev@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Robert Hancock Signed-off-by: David S. Miller drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 1 - 1 file changed, 1 deletion(-) commit a57caf8c527f63459c1c70eb3cf55ac373adb88e Author: Denis Efremov Date: Mon Jul 8 19:14:23 2019 +0300 sunrpc/cache: remove the exporting of cache_seq_next The function cache_seq_next is declared static and marked EXPORT_SYMBOL_GPL, which is at best an odd combination. Because the function is not used outside of the net/sunrpc/cache.c file it is defined in, this commit removes the EXPORT_SYMBOL_GPL() marking. Fixes: d48cf356a130 ("SUNRPC: Remove non-RCU protected lookup") Signed-off-by: Denis Efremov Signed-off-by: J. Bruce Fields net/sunrpc/cache.c | 1 - 1 file changed, 1 deletion(-) commit e1928328699a582a540b105e5f4c160832a7fdcb Merge: 46f1ec23a469 9156e545765e Author: Linus Torvalds Date: Mon Jul 8 16:12:03 2019 -0700 Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking updates from Ingo Molnar: "The main changes in this cycle are: - rwsem scalability improvements, phase #2, by Waiman Long, which are rather impressive: "On a 2-socket 40-core 80-thread Skylake system with 40 reader and writer locking threads, the min/mean/max locking operations done in a 5-second testing window before the patchset were: 40 readers, Iterations Min/Mean/Max = 1,807/1,808/1,810 40 writers, Iterations Min/Mean/Max = 1,807/50,344/151,255 After the patchset, they became: 40 readers, Iterations Min/Mean/Max = 30,057/31,359/32,741 40 writers, Iterations Min/Mean/Max = 94,466/95,845/97,098" There's a lot of changes to the locking implementation that makes it similar to qrwlock, including owner handoff for more fair locking. Another microbenchmark shows how across the spectrum the improvements are: "With a locking microbenchmark running on 5.1 based kernel, the total locking rates (in kops/s) on a 2-socket Skylake system with equal numbers of readers and writers (mixed) before and after this patchset were: # of Threads Before Patch After Patch ------------ ------------ ----------- 2 2,618 4,193 4 1,202 3,726 8 802 3,622 16 729 3,359 32 319 2,826 64 102 2,744" The changes are extensive and the patch-set has been through several iterations addressing various locking workloads. There might be more regressions, but unless they are pathological I believe we want to use this new implementation as the baseline going forward. - jump-label optimizations by Daniel Bristot de Oliveira: the primary motivation was to remove IPI disturbance of isolated RT-workload CPUs, which resulted in the implementation of batched jump-label updates. Beyond the improvement of the real-time characteristics kernel, in one test this patchset improved static key update overhead from 57 msecs to just 1.4 msecs - which is a nice speedup as well. - atomic64_t cross-arch type cleanups by Mark Rutland: over the last ~10 years of atomic64_t existence the various types used by the APIs only had to be self-consistent within each architecture - which means they became wildly inconsistent across architectures. Mark puts and end to this by reworking all the atomic64 implementations to use 's64' as the base type for atomic64_t, and to ensure that this type is consistently used for parameters and return values in the API, avoiding further problems in this area. - A large set of small improvements to lockdep by Yuyang Du: type cleanups, output cleanups, function return type and othr cleanups all around the place. - A set of percpu ops cleanups and fixes by Peter Zijlstra. - Misc other changes - please see the Git log for more details" * 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (82 commits) locking/lockdep: increase size of counters for lockdep statistics locking/atomics: Use sed(1) instead of non-standard head(1) option locking/lockdep: Move mark_lock() inside CONFIG_TRACE_IRQFLAGS && CONFIG_PROVE_LOCKING x86/jump_label: Make tp_vec_nr static x86/percpu: Optimize raw_cpu_xchg() x86/percpu, sched/fair: Avoid local_clock() x86/percpu, x86/irq: Relax {set,get}_irq_regs() x86/percpu: Relax smp_processor_id() x86/percpu: Differentiate this_cpu_{}() and __this_cpu_{}() locking/rwsem: Guard against making count negative locking/rwsem: Adaptive disabling of reader optimistic spinning locking/rwsem: Enable time-based spinning on reader-owned rwsem locking/rwsem: Make rwsem->owner an atomic_long_t locking/rwsem: Enable readers spinning on writer locking/rwsem: Clarify usage of owner's nonspinaable bit locking/rwsem: Wake up almost all readers in wait queue locking/rwsem: More optimal RT task handling of null owner locking/rwsem: Always release wait_lock before waking up tasks locking/rwsem: Implement lock handoff to prevent lock starvation locking/rwsem: Make rwsem_spin_on_owner() return owner state ... commit bc2d8afecbec33bd4549ce1ef904383fde21d385 Author: Ilya Leoshkevich Date: Wed Jul 3 13:50:34 2019 +0200 selftests/bpf: fix test_reuseport_array on s390 Fix endianness issue: passing a pointer to 64-bit fd as a 32-bit key does not work on big-endian architectures. So cast fd to 32-bits when necessary. Signed-off-by: Ilya Leoshkevich Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/test_maps.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) commit d4117d63a30876a3654f587c3a419db63d8b529d Author: Kweh Hock Leong Date: Sat Jul 6 01:33:27 2019 +0800 net: stmmac: enable clause 45 mdio support DWMAC4 is capable to support clause 45 mdio communication. This patch enable the feature on stmmac_mdio_write() and stmmac_mdio_read() by following phy_write_mmd() and phy_read_mmd() mdiobus read write implementation format. Reviewed-by: Li, Yifan Signed-off-by: Kweh Hock Leong Signed-off-by: Ong Boon Leong Signed-off-by: Voon Weifeng Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 43 ++++++++++++++++++----- include/linux/phy.h | 2 ++ 2 files changed, 37 insertions(+), 8 deletions(-) commit 765e33f5211ab620c117ff1ee0c4f38c10f7a973 Author: Michael Kelley Date: Thu May 30 00:14:00 2019 +0000 Drivers: hv: vmbus: Break out ISA independent parts of mshyperv.h Break out parts of mshyperv.h that are ISA independent into a separate file in include/asm-generic. This move facilitates ARM64 code reusing these definitions and avoids code duplication. No functionality or behavior is changed. Signed-off-by: Michael Kelley Reviewed-by: Vitaly Kuznetsov Signed-off-by: Sasha Levin MAINTAINERS | 1 + arch/x86/include/asm/mshyperv.h | 148 ++------------------------------- include/asm-generic/mshyperv.h | 180 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 186 insertions(+), 143 deletions(-) commit 44e3725943b706d3625ad91b1a1069a18fd0775c Author: Taehee Yoo Date: Sat Jul 6 01:05:46 2019 +0900 net: openvswitch: use netif_ovs_is_port() instead of opencode Use netif_ovs_is_port() function instead of open code. This patch doesn't change logic. Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller net/openvswitch/dp_notify.c | 2 +- net/openvswitch/vport-netdev.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit f714ecc9cf16a63066badbc85bfbfff9af85a8b7 Author: Jesper Dangaard Brouer Date: Fri Jul 5 14:57:55 2019 +0200 MAINTAINERS: Add page_pool maintainer entry In this release cycle the number of NIC drivers using page_pool will likely reach 4 drivers. It is about time to add a maintainer entry. Add myself and Ilias. Signed-off-by: Jesper Dangaard Brouer Acked-by: Ilias Apalodimas Signed-off-by: David S. Miller MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) commit 11aef3c6da1712fa3847599196f78f406814d2f1 Merge: 3f4957eb6cfb f406324e500e Author: David S. Miller Date: Mon Jul 8 15:50:06 2019 -0700 Merge branch 'mvpp2-cls-ether' Maxime Chevallier says: ==================== net: mvpp2: Add classification based on the ETHER flow This series adds support for classification of the ETHER flow in the mvpp2 driver. The first patch allows detecting when a user specifies a flow_type that isn't supported by the driver, while the second adds support for this flow_type by adding the mapping between the ETHER_FLOW enum value and the relevant classifier flow entries. ==================== Signed-off-by: David S. Miller commit f406324e500eea5078a78df376e9496d4001b942 Author: Maxime Chevallier Date: Fri Jul 5 14:09:13 2019 +0200 net: mvpp2: cls: Add support for ETHER_FLOW Users can specify classification actions based on the 'ether' flow type. In that case, this will apply to all ethernet traffic, superseeding flows such as 'udp4' or 'tcp6'. Add support for this flow type in the PPv2 classifier, by mapping the ETHER_FLOW value to the corresponding entries in the classifier. Signed-off-by: Maxime Chevallier Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c | 2 ++ 1 file changed, 2 insertions(+) commit f4f1ba18195dfb10838b4a221a942a2a7d218ca9 Author: Maxime Chevallier Date: Fri Jul 5 14:09:12 2019 +0200 net: mvpp2: cls: Report an error for unsupported flow types Add a missing check to detect flow types that we don't support, so that user can be informed of this. Signed-off-by: Maxime Chevallier Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c | 4 ++++ 1 file changed, 4 insertions(+) commit 46f1ec23a46940846f86a91c46f7119d8a8b5de1 Merge: 223cea6a4f05 83086d654dd0 Author: Linus Torvalds Date: Mon Jul 8 15:45:14 2019 -0700 Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull RCU updates from Ingo Molnar: "The changes in this cycle are: - RCU flavor consolidation cleanups and optmizations - Documentation updates - Miscellaneous fixes - SRCU updates - RCU-sync flavor consolidation - Torture-test updates - Linux-kernel memory-consistency-model updates, most notably the addition of plain C-language accesses" * 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (61 commits) tools/memory-model: Improve data-race detection tools/memory-model: Change definition of rcu-fence tools/memory-model: Expand definition of barrier tools/memory-model: Do not use "herd" to refer to "herd7" tools/memory-model: Fix comment in MP+poonceonces.litmus Documentation: atomic_t.txt: Explain ordering provided by smp_mb__{before,after}_atomic() rcu: Don't return a value from rcu_assign_pointer() rcu: Force inlining of rcu_read_lock() rcu: Fix irritating whitespace error in rcu_assign_pointer() rcu: Upgrade sync_exp_work_done() to smp_mb() rcutorture: Upper case solves the case of the vanishing NULL pointer torture: Suppress propagating trace_printk() warning rcutorture: Dump trace buffer for callback pipe drain failures torture: Add --trust-make to suppress "make clean" torture: Make --cpus override idleness calculations torture: Run kernel build in source directory torture: Add function graph-tracing cheat sheet torture: Capture qemu output rcutorture: Tweak kvm options rcutorture: Add trivial RCU implementation ... commit cecaa76b2919aac2aa584ce476e9fcd5b084add5 Author: Frank de Brabander Date: Fri Jul 5 13:43:14 2019 +0200 selftests: txring_overwrite: fix incorrect test of mmap() return value If mmap() fails it returns MAP_FAILED, which is defined as ((void *) -1). The current if-statement incorrectly tests if *ring is NULL. Fixes: 358be656406d ("selftests/net: add txring_overwrite") Signed-off-by: Frank de Brabander Acked-by: Willem de Bruijn Signed-off-by: David S. Miller tools/testing/selftests/net/txring_overwrite.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3f4957eb6cfbdb16b77df4e11691912dcfc7aca7 Merge: 1a2d405c0081 e226121fcc26 Author: David S. Miller Date: Mon Jul 8 15:35:17 2019 -0700 Merge branch 'vsock-virtio-fixes' Stefano Garzarella says: ==================== vsock/virtio: several fixes in the .probe() and .remove() During the review of "[PATCH] vsock/virtio: Initialize core virtio vsock before registering the driver", Stefan pointed out some possible issues in the .probe() and .remove() callbacks of the virtio-vsock driver. This series tries to solve these issues: - Patch 1 adds RCU critical sections to avoid use-after-free of 'the_virtio_vsock' pointer. - Patch 2 stops workers before to call vdev->config->reset(vdev) to be sure that no one is accessing the device. - Patch 3 moves the works flush at the end of the .remove() to avoid use-after-free of 'vsock' object. v3: - Patch 1: use rcu_dereference_protected() to get the_virtio_vosck value in the virtio_vsock_probe() [Jason] v2: https://patchwork.kernel.org/cover/11022343/ v1: https://patchwork.kernel.org/cover/10964733/ Before this series the guest crashes in a few second. After this series the test runs (~12h) without issues. Tested on an SMP guest (-smp 4 -monitor tcp:127.0.0.1:1234,server,nowait) with these scripts to stress the .probe()/.remove() path: - guest while true; do cat /dev/urandom | nc-vsock -l 4321 > /dev/null & cat /dev/urandom | nc-vsock -l 5321 > /dev/null & cat /dev/urandom | nc-vsock -l 6321 > /dev/null & cat /dev/urandom | nc-vsock -l 7321 > /dev/null & wait done - host while true; do cat /dev/urandom | nc-vsock 3 4321 > /dev/null & cat /dev/urandom | nc-vsock 3 5321 > /dev/null & cat /dev/urandom | nc-vsock 3 6321 > /dev/null & cat /dev/urandom | nc-vsock 3 7321 > /dev/null & sleep 2 echo "device_del v1" | nc 127.0.0.1 1234 sleep 1 echo "device_add vhost-vsock-pci,id=v1,guest-cid=3" | nc 127.0.0.1 1234 sleep 1 done ==================== Signed-off-by: David S. Miller commit e226121fcc26e69c721a435aa9348a2f452e4d3e Author: Stefano Garzarella Date: Fri Jul 5 13:04:54 2019 +0200 vsock/virtio: fix flush of works during the .remove() This patch moves the flush of works after vdev->config->del_vqs(vdev), because we need to be sure that no workers run before to free the 'vsock' object. Since we stopped the workers using the [tx|rx|event]_run flags, we are sure no one is accessing the device while we are calling vdev->config->reset(vdev), so we can safely move the workers' flush. Before the vdev->config->del_vqs(vdev), workers can be scheduled by VQ callbacks, so we must flush them after del_vqs(), to avoid use-after-free of 'vsock' object. Suggested-by: Michael S. Tsirkin Signed-off-by: Stefano Garzarella Signed-off-by: David S. Miller net/vmw_vsock/virtio_transport.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit b917507e5ad983085d29069369778b16aa03a0a8 Author: Stefano Garzarella Date: Fri Jul 5 13:04:53 2019 +0200 vsock/virtio: stop workers during the .remove() Before to call vdev->config->reset(vdev) we need to be sure that no one is accessing the device, for this reason, we add new variables in the struct virtio_vsock to stop the workers during the .remove(). This patch also add few comments before vdev->config->reset(vdev) and vdev->config->del_vqs(vdev). Suggested-by: Stefan Hajnoczi Suggested-by: Michael S. Tsirkin Signed-off-by: Stefano Garzarella Signed-off-by: David S. Miller net/vmw_vsock/virtio_transport.c | 51 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) commit 0deab087b16abb755dca6da5d3685375f8ff8c85 Author: Stefano Garzarella Date: Fri Jul 5 13:04:52 2019 +0200 vsock/virtio: use RCU to avoid use-after-free on the_virtio_vsock Some callbacks used by the upper layers can run while we are in the .remove(). A potential use-after-free can happen, because we free the_virtio_vsock without knowing if the callbacks are over or not. To solve this issue we move the assignment of the_virtio_vsock at the end of .probe(), when we finished all the initialization, and at the beginning of .remove(), before to release resources. For the same reason, we do the same also for the vdev->priv. We use RCU to be sure that all callbacks that use the_virtio_vsock ended before freeing it. This is not required for callbacks that use vdev->priv, because after the vdev->config->del_vqs() we are sure that they are ended and will no longer be invoked. We also take the mutex during the .remove() to avoid that .probe() can run while we are resetting the device. Signed-off-by: Stefano Garzarella Signed-off-by: David S. Miller net/vmw_vsock/virtio_transport.c | 70 ++++++++++++++++++++++++++-------------- 1 file changed, 46 insertions(+), 24 deletions(-) commit 1a2d405c0081e466cc56309652de3ce8467b3812 Merge: 31d166642c7c ff2d339375d0 Author: David S. Miller Date: Mon Jul 8 15:30:13 2019 -0700 Merge branch 'b53-docs' Benedikt Spranger says: ==================== Document the configuration of b53 this is the third round to document the configuration of a b53 supported switch. v3..v2: - fix a typo - improve b53 configuration in DSA_TAG_PROTO_NONE showcase. - grade up from RFC to patch for mainline inclusion. v1..v2: - split out generic parts of the configuration. - target comments by Andrew Lunn and Florian Fainelli. - make changes visible to build system ==================== Signed-off-by: David S. Miller commit ff2d339375d0162e322d96cfacba0ac8467a15c9 Author: Benedikt Spranger Date: Fri Jul 5 11:57:19 2019 +0200 Documentation: net: dsa: b53: Describe b53 configuration Document the different needs of documentation for the b53 driver. Signed-off-by: Benedikt Spranger Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller Documentation/networking/dsa/b53.rst | 183 +++++++++++++++++++++++++++++++++ Documentation/networking/dsa/index.rst | 1 + 2 files changed, 184 insertions(+) commit 58dd7a8d9d02ee07d7aee450c5515cfe3ef8db21 Author: Benedikt Spranger Date: Fri Jul 5 11:57:18 2019 +0200 Documentation: net: dsa: Describe DSA switch configuration Document DSA tagged and VLAN based switch configuration by showcases. Signed-off-by: Benedikt Spranger Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller Documentation/networking/dsa/configuration.rst | 292 +++++++++++++++++++++++++ Documentation/networking/dsa/index.rst | 1 + 2 files changed, 293 insertions(+) commit caa2b557841c8cedc1d4862cd31cf76ee940d105 Author: Arnd Bergmann Date: Mon Jul 8 14:52:39 2019 +0200 power: reset: nvmem-reboot-mode: add CONFIG_OF dependency Without CONFIG_OF, we get a build failure in the reboot-mode implementation: drivers/power/reset/reboot-mode.c: In function 'reboot_mode_register': drivers/power/reset/reboot-mode.c:72:2: error: implicit declaration of function 'for_each_property_of_node'; did you mean 'for_each_child_of_node'? [-Werror=implicit-function-declaration] for_each_property_of_node(np, prop) { Add a Kconfig dependency like we have for the other users of CONFIG_REBOOT_MODE. Fixes: 7a78a7f7695b ("power: reset: nvmem-reboot-mode: use NVMEM as reboot mode write interface") Signed-off-by: Arnd Bergmann Signed-off-by: Sebastian Reichel drivers/power/reset/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 31d166642c7c601c65eccf0ff2e0afe9a0538be2 Author: Wei Yongjun Date: Fri Jul 5 08:26:25 2019 +0000 nfp: tls: fix error return code in nfp_net_tls_add() Fix to return negative error code -EINVAL from the error handling case instead of 0, as done elsewhere in this function. Fixes: 1f35a56cf586 ("nfp: tls: add/delete TLS TX connections") Signed-off-by: Wei Yongjun Acked-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/crypto/tls.c | 1 + 1 file changed, 1 insertion(+) commit 107d3ce60119fe1c03f07841795f54cc729a5441 Merge: aa6be2b95d4e 322b87ca55f2 Author: David S. Miller Date: Mon Jul 8 15:15:25 2019 -0700 Merge branch 'bnxt_en-XDP_REDIRECT' Michael Chan says: ==================== bnxt_en: Add XDP_REDIRECT support. This patch series adds XDP_REDIRECT support by Andy Gospodarek. ==================== Signed-off-by: David S. Miller commit 322b87ca55f2f3936ec9f9de438ef9b2115b5c9b Author: Andy Gospodarek Date: Mon Jul 8 17:53:04 2019 -0400 bnxt_en: add page_pool support This removes contention over page allocation for XDP_REDIRECT actions by adding page_pool support per queue for the driver. The performance for XDP_REDIRECT actions scales linearly with the number of cores performing redirect actions when using the page pools instead of the standard page allocator. v2: Fix up the error path from XDP registration, noted by Ilias Apalodimas. Signed-off-by: Andy Gospodarek Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/Kconfig | 1 + drivers/net/ethernet/broadcom/bnxt/bnxt.c | 47 +++++++++++++++++++++++---- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 3 ++ drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 3 +- 4 files changed, 47 insertions(+), 7 deletions(-) commit f18c2b77b2e4eec2313d519ba125bd6a069513cf Author: Andy Gospodarek Date: Mon Jul 8 17:53:03 2019 -0400 bnxt_en: optimized XDP_REDIRECT support This adds basic support for XDP_REDIRECT in the bnxt_en driver. Next patch adds the more optimized page pool support. Signed-off-by: Andy Gospodarek Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 27 ++++++- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 13 +++- drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 108 ++++++++++++++++++++++++-- drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.h | 2 + 4 files changed, 140 insertions(+), 10 deletions(-) commit c1ba92a86db24dc9ca2648473d4820979a0d8a4c Author: Michael Chan Date: Mon Jul 8 17:53:02 2019 -0400 bnxt_en: Refactor __bnxt_xmit_xdp(). __bnxt_xmit_xdp() is used by XDP_TX and ethtool loopback packet transmit. Refactor it so that it can be re-used by the XDP_REDIRECT logic. Restructure the TX interrupt handler logic to cleanly separate XDP_TX logic in preparation for XDP_REDIRECT. Acked-by: Andy Gospodarek Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.h | 1 + drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 2 +- drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 33 ++++++++++++++++------- drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.h | 5 ++-- 4 files changed, 28 insertions(+), 13 deletions(-) commit 52c0609258658ff35b85c654c568a50abd602ac6 Author: Andy Gospodarek Date: Mon Jul 8 17:53:01 2019 -0400 bnxt_en: rename some xdp functions Renaming bnxt_xmit_xdp to __bnxt_xmit_xdp to get ready for XDP_REDIRECT support and reduce confusion/namespace collision. Signed-off-by: Andy Gospodarek Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 2 +- drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 8 ++++---- drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.h | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) commit aa6be2b95d4ecfd0e3a433fc3270da98fffab115 Merge: 49db9228b8d8 9ed4050c0d75 Author: David S. Miller Date: Mon Jul 8 14:58:04 2019 -0700 Merge branch 'cpsw-Add-XDP-support' Ivan Khoronzhuk says: ==================== net: ethernet: ti: cpsw: Add XDP support This patchset adds XDP support for TI cpsw driver and base it on page_pool allocator. It was verified on af_xdp socket drop, af_xdp l2f, ebpf XDP_DROP, XDP_REDIRECT, XDP_PASS, XDP_TX. It was verified with following configs enabled: CONFIG_JIT=y CONFIG_BPFILTER=y CONFIG_BPF_SYSCALL=y CONFIG_XDP_SOCKETS=y CONFIG_BPF_EVENTS=y CONFIG_HAVE_EBPF_JIT=y CONFIG_BPF_JIT=y CONFIG_CGROUP_BPF=y Link on previous v7: https://lkml.org/lkml/2019/7/4/715 Also regular tests with iperf2 were done in order to verify impact on regular netstack performance, compared with base commit: https://pastebin.com/JSMT0iZ4 v8..v9: - fix warnings on arm64 caused by typos in type casting v7..v8: - corrected dma calculation based on headroom instead of hard start - minor comment changes v6..v7: - rolled back to v4 solution but with small modification - picked up patch: https://www.spinics.net/lists/netdev/msg583145.html - added changes related to netsec fix and cpsw v5..v6: - do changes that is rx_dev while redirect/flush cycle is kept the same - dropped net: ethernet: ti: davinci_cpdma: return handler status - other changes desc in patches v4..v5: - added two plreliminary patches: net: ethernet: ti: davinci_cpdma: allow desc split while down net: ethernet: ti: cpsw_ethtool: allow res split while down - added xdp alocator refcnt on xdp level, avoiding page pool refcnt - moved flush status as separate argument for cpdma_chan_process - reworked cpsw code according to last changes to allocator - added missed statistic counter v3..v4: - added page pool user counter - use same pool for ndevs in dual mac - restructured page pool create/destroy according to the last changes in API v2..v3: - each rxq and ndev has its own page pool v1..v2: - combined xdp_xmit functions - used page allocation w/o refcnt juggle - unmapped page for skb netstack - moved rxq/page pool allocation to open/close pair - added several preliminary patches: net: page_pool: add helper function to retrieve dma addresses net: page_pool: add helper function to unmap dma addresses net: ethernet: ti: cpsw: use cpsw as drv data net: ethernet: ti: cpsw_ethtool: simplify slave loops ==================== Signed-off-by: David S. Miller commit 9ed4050c0d75768066a07cf66eef4f8dc9d79b52 Author: Ivan Khoronzhuk Date: Tue Jul 9 00:34:32 2019 +0300 net: ethernet: ti: cpsw: add XDP support Add XDP support based on rx page_pool allocator, one frame per page. Page pool allocator is used with assumption that only one rx_handler is running simultaneously. DMA map/unmap is reused from page pool despite there is no need to map whole page. Due to specific of cpsw, the same TX/RX handler can be used by 2 network devices, so special fields in buffer are added to identify an interface the frame is destined to. Thus XDP works for both interfaces, that allows to test xdp redirect between two interfaces easily. Also, each rx queue have own page pools, but common for both netdevs. XDP prog is common for all channels till appropriate changes are added in XDP infrastructure. Also, once page_pool recycling becomes part of skb netstack some simplifications can be added, like removing page_pool_release_page() before skb receive. In order to keep rx_dev while redirect, that can be somehow used in future, do flush in rx_handler, that allows to keep rx dev the same while redirect. It allows to conform with tracing rx_dev pointed by Jesper. Also, there is probability, that XDP generic code can be extended to support multi ndev drivers like this one, using same rx queue for several ndevs, based on switchdev for instance or else. In this case, driver can be modified like exposed here: https://lkml.org/lkml/2019/7/3/243 Acked-by: Jesper Dangaard Brouer Signed-off-by: Ivan Khoronzhuk Signed-off-by: David S. Miller drivers/net/ethernet/ti/Kconfig | 1 + drivers/net/ethernet/ti/cpsw.c | 502 +++++++++++++++++++++++++++++---- drivers/net/ethernet/ti/cpsw_ethtool.c | 37 ++- drivers/net/ethernet/ti/cpsw_priv.h | 7 + 4 files changed, 488 insertions(+), 59 deletions(-) commit 608ef6202fb56520877ed56c1783c213ae6d1b8c Author: Ivan Khoronzhuk Date: Tue Jul 9 00:34:31 2019 +0300 net: ethernet: ti: cpsw_ethtool: allow res split while down That's possible to set channel num while interfaces are down. When interface gets up it should resplit budget. This resplit can happen after phy is up but only if speed is changed, so should be set before this, for this allow it to happen while changing number of channels, when interfaces are down. Signed-off-by: Ivan Khoronzhuk Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw_ethtool.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 962fb618909ef64e0c89af5b79ba0fed910b78e3 Author: Ivan Khoronzhuk Date: Tue Jul 9 00:34:30 2019 +0300 net: ethernet: ti: davinci_cpdma: allow desc split while down That's possible to set ring params while interfaces are down. When interface gets up it uses number of descs to fill rx queue and on later on changes to create rx pools. Usually, this resplit can happen after phy is up, but it can be needed before this, so allow it to happen while setting number of rx descs, when interfaces are down. Also, if no dependency on intf state, move it to cpdma layer, where it should be. Signed-off-by: Ivan Khoronzhuk Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw_ethtool.c | 17 +++++++++++------ drivers/net/ethernet/ti/davinci_cpdma.c | 17 ++++++++++++++++- drivers/net/ethernet/ti/davinci_cpdma.h | 3 +-- 3 files changed, 28 insertions(+), 9 deletions(-) commit 6670acacd59eb72acfe5d69c966b5d2724cc521b Author: Ivan Khoronzhuk Date: Tue Jul 9 00:34:29 2019 +0300 net: ethernet: ti: davinci_cpdma: add dma mapped submit In case if dma mapped packet needs to be sent, like with XDP page pool, the "mapped" submit can be used. This patch adds dma mapped submit based on regular one. Signed-off-by: Ivan Khoronzhuk Signed-off-by: David S. Miller drivers/net/ethernet/ti/davinci_cpdma.c | 89 +++++++++++++++++++++++++++++---- drivers/net/ethernet/ti/davinci_cpdma.h | 4 ++ 2 files changed, 83 insertions(+), 10 deletions(-) commit 1da4bbeffe41ba318812d7590955faee8636668b Author: Ivan Khoronzhuk Date: Tue Jul 9 00:34:28 2019 +0300 net: core: page_pool: add user refcnt and reintroduce page_pool_destroy Jesper recently removed page_pool_destroy() (from driver invocation) and moved shutdown and free of page_pool into xdp_rxq_info_unreg(), in-order to handle in-flight packets/pages. This created an asymmetry in drivers create/destroy pairs. This patch reintroduce page_pool_destroy and add page_pool user refcnt. This serves the purpose to simplify drivers error handling as driver now drivers always calls page_pool_destroy() and don't need to track if xdp_rxq_info_reg_mem_model() was unsuccessful. This could be used for a special cases where a single RX-queue (with a single page_pool) provides packets for two net_device'es, and thus needs to register the same page_pool twice with two xdp_rxq_info structures. This patch is primarily to ease API usage for drivers. The recently merged netsec driver, actually have a bug in this area, which is solved by this API change. This patch is a modified version of Ivan Khoronzhuk's original patch. Link: https://lore.kernel.org/netdev/20190625175948.24771-2-ivan.khoronzhuk@linaro.org/ Fixes: 5c67bf0ec4d0 ("net: netsec: Use page_pool API") Signed-off-by: Jesper Dangaard Brouer Reviewed-by: Ilias Apalodimas Acked-by: Jesper Dangaard Brouer Reviewed-by: Saeed Mahameed Signed-off-by: Ivan Khoronzhuk Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 4 ++-- drivers/net/ethernet/socionext/netsec.c | 8 ++------ include/net/page_pool.h | 25 +++++++++++++++++++++++ net/core/page_pool.c | 8 ++++++++ net/core/xdp.c | 3 +++ 5 files changed, 40 insertions(+), 8 deletions(-) commit 5b8010ba70d5aa5b321d3e69b5b31cc3db857d5e Author: Anson Huang Date: Mon Jul 8 11:03:08 2019 +0800 cpufreq: imx-cpufreq-dt: Add i.MX8MN support i.MX8MN is a new SoC of i.MX8M series, it also uses speed grading and market segment fuses for OPP definitions, add support for this SoC. Signed-off-by: Anson Huang Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/imx-cpufreq-dt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 18c49926c4bf4915e5194d1de3299c0537229f9f Author: Viresh Kumar Date: Fri Jul 5 16:21:24 2019 +0530 cpufreq: Add QoS requests for userspace constraints This implements QoS requests to manage userspace configuration of min and max frequency. Reviewed-by: Matthias Kaehlcke Reviewed-by: Ulf Hansson Signed-off-by: Viresh Kumar Tested-by: syzbot Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq.c | 98 ++++++++++++++++++++++++++--------------------- include/linux/cpufreq.h | 8 +--- 2 files changed, 57 insertions(+), 49 deletions(-) commit c57b25bdf7cd374af106992356536bf5df7c255b Author: Viresh Kumar Date: Thu Jul 4 13:06:22 2019 +0530 cpufreq: intel_pstate: Reuse refresh_frequency_limits() The implementation of intel_pstate_update_max_freq() is quite similar to refresh_frequency_limits(), lets reuse it. Finding minimum of policy->user_policy.max and policy->cpuinfo.max_freq in intel_pstate_update_max_freq() is redundant as cpufreq_set_policy() will call the ->verify() callback of intel-pstate driver, which will do this comparison anyway and so dropping it from intel_pstate_update_max_freq() doesn't harm. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq.c | 3 ++- drivers/cpufreq/intel_pstate.c | 7 +------ include/linux/cpufreq.h | 1 + 3 files changed, 4 insertions(+), 7 deletions(-) commit 67d874c3b2c69d65274fa5ce44ba939788d5729d Author: Viresh Kumar Date: Mon Jul 8 16:27:52 2019 +0530 cpufreq: Register notifiers with the PM QoS framework Register notifiers for min/max frequency constraints with the PM QoS framework. The constraints are also taken into consideration in cpufreq_set_policy(). This also relocates cpufreq_policy_put_kobj() as it is required to be called from cpufreq_policy_alloc() now. refresh_frequency_limits() is updated to avoid calling cpufreq_set_policy() for inactive policies and handle_update() is updated to have proper locking in place. No constraints are added until now though. Reviewed-by: Matthias Kaehlcke Reviewed-by: Ulf Hansson Signed-off-by: Viresh Kumar Tested-by: Pavel Machek Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq.c | 135 +++++++++++++++++++++++++++++++++++----------- include/linux/cpufreq.h | 3 ++ 2 files changed, 108 insertions(+), 30 deletions(-) commit 775f1f7eacede583ec25ed56e58c4483f2b29265 Author: Max Filippov Date: Mon Nov 5 17:16:21 2018 -0800 xtensa: virt: add defconfig and DTS Add defconfig and DTS for a virt board. Defconfig enables PCIe host and a number of virtio devices. DTS routes legacy PCI IRQs to the first four level-triggered external IRQ lines. CPU core with edge-triggered IRQs among the first four may need a custom DTS to work correctly. Signed-off-by: Max Filippov arch/xtensa/boot/dts/virt.dts | 72 +++++++++++++++++++++++ arch/xtensa/configs/virt_defconfig | 113 +++++++++++++++++++++++++++++++++++++ 2 files changed, 185 insertions(+) commit 5c68b8231e9c361fc3dc96997ea377b31c4dbd3e Author: Masahiro Yamada Date: Thu May 30 19:39:27 2019 +0900 of/fdt: pass early_init_dt_reserve_memory_arch() with bool type nomap The third argument 'nomap' of early_init_dt_reserve_memory_arch() is bool. It is preferred to pass it with a bool type parameter. Signed-off-by: Masahiro Yamada Reviewed-by: Frank Rowand Signed-off-by: Rob Herring drivers/of/fdt.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 15ffe5e1acf5fe1512e98b20702e46ce9f25e2f7 Author: Christoph Hellwig Date: Mon Jul 8 12:55:27 2019 -0700 dma-mapping: mark dma_alloc_need_uncached as __always_inline Without the __always_inline at least i386 configs that have CONFIG_OPTIMIZE_INLINING set seem fail to inline dma_alloc_need_uncached, leading to a linker error because of undefined symbols. Reported-by: Randy Dunlap Signed-off-by: Christoph Hellwig Acked-by: Randy Dunlap # build-tested include/linux/dma-noncoherent.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 454f96f2b738374da4b0a703b1e2e7aed82c4486 Author: Mauro Carvalho Chehab Date: Sat Jul 6 13:28:42 2019 -0300 docs: automarkup.py: ignore exceptions when seeking for xrefs When using the automarkup extension with: make pdfdocs without passing an specific book, the code will raise an exception: File "/devel/v4l/docs/Documentation/sphinx/automarkup.py", line 86, in auto_markup node.parent.replace(node, markup_funcs(name, app, node)) File "/devel/v4l/docs/Documentation/sphinx/automarkup.py", line 59, in markup_funcs 'function', target, pxref, lit_text) File "/devel/v4l/docs/sphinx_2.0/lib/python3.7/site-packages/sphinx/domains/c.py", line 308, in resolve_xref contnode, target) File "/devel/v4l/docs/sphinx_2.0/lib/python3.7/site-packages/sphinx/util/nodes.py", line 450, in make_refnode '#' + targetid) File "/devel/v4l/docs/sphinx_2.0/lib/python3.7/site-packages/sphinx/builders/latex/__init__.py", line 159, in get_relative_uri return self.get_target_uri(to, typ) File "/devel/v4l/docs/sphinx_2.0/lib/python3.7/site-packages/sphinx/builders/latex/__init__.py", line 152, in get_target_uri raise NoUri sphinx.environment.NoUri This happens because not all references will belong to a single PDF/LaTeX document. Better to just ignore those than breaking Sphinx build. Fixes: d74b0d31ddde ("Docs: An initial automarkup extension for sphinx") Signed-off-by: Mauro Carvalho Chehab [jc: Narrowed the "except" and tweaked the comment] Signed-off-by: Jonathan Corbet Documentation/sphinx/automarkup.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 66f2a122c68d8f13e5db978b6b7571aaf0e53a19 Author: Matthew Wilcox (Oracle) Date: Tue Jul 2 13:54:38 2019 -0400 docs: Move binderfs to admin-guide The documentation is more appropriate for the administrator than for the internal kernel API section it is currently in. Signed-off-by: Matthew Wilcox (Oracle) Acked-by: Christian Brauner Signed-off-by: Jonathan Corbet Documentation/{filesystems => admin-guide}/binderfs.rst | 0 Documentation/admin-guide/index.rst | 1 + Documentation/filesystems/index.rst | 10 ---------- 3 files changed, 1 insertion(+), 10 deletions(-) commit d88590dc262f90d260e97b85ca50c992931457d4 Author: Geert Uytterhoeven Date: Mon Jun 24 14:46:20 2019 +0200 of/platform: Drop superfluous cast in of_device_make_bus_id() There is no need to cast "u64" to "unsigned long long" before printing it, as both types have been made identical on all architectures many years ago. Signed-off-by: Geert Uytterhoeven Signed-off-by: Rob Herring drivers/of/platform.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7a54f78d9387b75d8e64bac18e84cd65f639121f Author: Parav Pandit Date: Thu Jul 4 16:04:01 2019 +0300 IB/core: Work on the caller socket net namespace in nldev_newlink() While creating new RDMA devices based on netdevice name, consider the net namespace of the caller skb's socket similar to rest of the doit() callbacks and nldev_dellink() which deletes the RDMA device created using nldev_newlink(). Fixes: 3856ec4b93c94 ("RDMA/core: Add RDMA_NLDEV_CMD_NEWLINK/DELLINK support") Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe drivers/infiniband/core/nldev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dd006fc434e107ef90f7de0db9907cbc1c521645 Author: Yang Wei Date: Mon Jul 8 22:57:39 2019 +0800 nfc: fix potential illegal memory access The frags_q is not properly initialized, it may result in illegal memory access when conn_info is NULL. The "goto free_exit" should be replaced by "goto exit". Signed-off-by: Yang Wei Signed-off-by: David S. Miller net/nfc/nci/data.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 49db9228b8d83cbdef44b4757a393990f48b6d85 Author: Arnd Bergmann Date: Mon Jul 8 14:48:23 2019 +0200 macb: fix build warning for !CONFIG_OF When CONFIG_OF is disabled, we get a harmless warning about the newly added variable: drivers/net/ethernet/cadence/macb_main.c:48:39: error: 'mgmt' defined but not used [-Werror=unused-variable] static struct sifive_fu540_macb_mgmt *mgmt; Move the variable closer to its use inside of the #ifdef. Fixes: c218ad559020 ("macb: Add support for SiFive FU540-C000") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/cadence/macb_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0287f9ed1693fff26a2d568a9d3f74c2b198540c Author: Arnd Bergmann Date: Mon Jul 8 14:43:39 2019 +0200 gve: fix unused variable/label warnings On unusual page sizes, we get harmless warnings: drivers/net/ethernet/google/gve/gve_rx.c:283:6: error: unused variable 'pagecount' [-Werror,-Wunused-variable] drivers/net/ethernet/google/gve/gve_rx.c:336:1: error: unused label 'have_skb' [-Werror,-Wunused-label] Change the preprocessor #if to regular if() to avoid this. Fixes: f5cedc84a30d ("gve: Add transmit and receive support") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/google/gve/gve_rx.c | 66 ++++++++++++++++---------------- 1 file changed, 33 insertions(+), 33 deletions(-) commit bdce1290493caa3f8119f24b5dacc3fb7ca27389 Author: Konstantin Taranov Date: Thu Jun 27 16:06:43 2019 +0200 RDMA/rxe: Fill in wc byte_len with IB_WC_RECV_RDMA_WITH_IMM Calculate the correct byte_len on the receiving side when a work completion is generated with IB_WC_RECV_RDMA_WITH_IMM opcode. According to the IBA byte_len must indicate the number of written bytes, whereas it was always equal to zero for the IB_WC_RECV_RDMA_WITH_IMM opcode, even though data was transferred. Fixes: 8700e3e7c485 ("Soft RoCE driver") Signed-off-by: Konstantin Taranov Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_resp.c | 5 ++++- drivers/infiniband/sw/rxe/rxe_verbs.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) commit 96e2fd733b9af304edcf30ef922dcaa4d3e1bfa6 Author: Leon Romanovsky Date: Mon Jul 8 13:59:05 2019 +0300 RDMA/mlx5: Set RDMA DIM to be enabled by default Enable RDMA DIM by default for better user experience. Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/main.c | 2 ++ 1 file changed, 2 insertions(+) commit f8fc8cd9c612c31f92b19b72f619fa043ec76e5e Author: Yamin Friedman Date: Mon Jul 8 13:59:04 2019 +0300 RDMA/nldev: Added configuration of RDMA dynamic interrupt moderation to netlink Added parameter in ib_device for enabling dynamic interrupt moderation so that it can be configured in userspace using rdma tool. In order to set adaptive-moderation for an ib device the command is: rdma dev set [DEV] adaptive-moderation [on|off] Please set on/off. rdma dev show 0: mlx5_0: node_type ca fw 16.26.0055 node_guid 248a:0703:00a5:29d0 sys_image_guid 248a:0703:00a5:29d0 adaptive-moderation on rdma resource show cq dev mlx5_0 cqn 0 cqe 1023 users 4 poll-ctx UNBOUND_WORKQUEUE adaptive-moderation off comm [ib_core] Signed-off-by: Yamin Friedman Reviewed-by: Sagi Grimberg Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/Kconfig | 1 + drivers/infiniband/core/core_priv.h | 1 + drivers/infiniband/core/device.c | 9 +++++++++ drivers/infiniband/core/nldev.c | 14 ++++++++++++++ include/uapi/rdma/rdma_netlink.h | 5 +++++ 5 files changed, 30 insertions(+) commit da6629793aa6944db6c8a908ca1a52d87f1489aa Author: Yamin Friedman Date: Mon Jul 8 13:59:03 2019 +0300 RDMA/core: Provide RDMA DIM support for ULPs Added the interface in the infiniband driver that applies the rdma_dim adaptive moderation. There is now a special function for allocating an ib_cq that uses rdma_dim. Performance improvement (ConnectX-5 100GbE, x86) running FIO benchmark over NVMf between two equal end-hosts with 56 cores across a Mellanox switch using null_blk device: READS without DIM: blk size | BW | IOPS | 99th percentile latency | 99.99th latency 512B | 3.8GiB/s | 7.7M | 1401 usec | 2442 usec 4k | 7.0GiB/s | 1.8M | 4817 usec | 6587 usec 64k | 10.7GiB/s| 175k | 9896 usec | 10028 usec IO WRITES without DIM: blk size | BW | IOPS | 99th percentile latency | 99.99th latency 512B | 3.6GiB/s | 7.5M | 1434 usec | 2474 usec 4k | 6.3GiB/s | 1.6M | 938 usec | 1221 usec 64k | 10.7GiB/s| 175k | 8979 usec | 12780 usec IO READS with DIM: blk size | BW | IOPS | 99th percentile latency | 99.99th latency 512B | 4GiB/s | 8.2M | 816 usec | 889 usec 4k | 10.1GiB/s| 2.65M| 3359 usec | 5080 usec 64k | 10.7GiB/s| 175k | 9896 usec | 10028 usec IO WRITES with DIM: blk size | BW | IOPS | 99th percentile latency | 99.99th latency 512B | 3.9GiB/s | 8.1M | 799 usec | 922 usec 4k | 9.6GiB/s | 2.5M | 717 usec | 1004 usec 64k | 10.7GiB/s| 176k | 8586 usec | 12256 usec The rdma_dim algorithm was designed to measure the effectiveness of moderation on the flow in a general way and thus should be appropriate for all RDMA storage protocols. rdma_dim is configured to be the default option based on performance improvement seen after extensive tests. Signed-off-by: Yamin Friedman Reviewed-by: Max Gurtovoy Reviewed-by: Sagi Grimberg Signed-off-by: Saeed Mahameed Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/cq.c | 45 ++++++++++++++++++++++++++++++++++++++++++++ include/rdma/ib_verbs.h | 4 ++++ 2 files changed, 49 insertions(+) commit f4915455dcf07c4f237d6160a4b6adb0575d2909 Author: Yamin Friedman Date: Mon Jul 8 13:59:02 2019 +0300 linux/dim: Implement RDMA adaptive moderation (DIM) RDMA DIM implements a different algorithm from net DIM and is based on completions which is how we can implement interrupt moderation in RDMA. The algorithm optimizes for number of completions and ratio between completions and events. In order to avoid long latencies, the implementation performs fast reduction of moderation level when the traffic changes. Signed-off-by: Yamin Friedman Reviewed-by: Max Gurtovoy Reviewed-by: Sagi Grimberg Signed-off-by: Saeed Mahameed Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe include/linux/dim.h | 36 ++++++++++++++++++ lib/dim/Makefile | 6 +-- lib/dim/rdma_dim.c | 108 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 146 insertions(+), 4 deletions(-) commit 2ef38e380ea6a80fed5be21e9f7af31c02dea09e Merge: 89705e927001 398c2b05bbee Author: Jason Gunthorpe Date: Mon Jul 8 14:58:59 2019 -0300 Merge tag 'blk-dim-v2' into rdma.git for-next Generic DIM From: Tal Gilboa and Yamin Fridman Implement net DIM over a generic DIM library, add RDMA DIM dim.h lib exposes an implementation of the DIM algorithm for dynamically-tuned interrupt moderation for networking interfaces. We want a similar functionality for other protocols, which might need to optimize interrupts differently. Main motivation here is DIM for NVMf storage protocol. Current DIM implementation prioritizes reducing interrupt overhead over latency. Also, in order to reduce DIM's own overhead, the algorithm might take some time to identify it needs to change profiles. While this is acceptable for networking, it might not work well on other scenarios. Here we propose a new structure to DIM. The idea is to allow a slightly modified functionality without the risk of breaking Net DIM behavior for netdev. We verified there are no degradations in current DIM behavior with the modified solution. Suggested solution: - Common logic is implemented in lib/dim/dim.c - Net DIM (existing) logic is implemented in lib/dim/net_dim.c, which uses the common logic in dim.c - Any new DIM logic will be implemented in "lib/dim/new_dim.c". This new implementation will expose modified versions of profiles, dim_step() and dim_decision(). - DIM API is declared in include/linux/dim.h for all implementations. Pros for this solution are: - Zero impact on existing net_dim implementation and usage - Relatively more code reuse (compared to two separate solutions) - Increased extensibility Required for dependencies in the next series. Signed-off-by: Jason Gunthorpe commit 4993e5b37e8bcb55ac90f76eb6d2432647273747 Author: Jose Abreu Date: Mon Jul 8 14:26:28 2019 +0200 net: stmmac: Re-work the queue selection for TSO packets Ben Hutchings says: "This is the wrong place to change the queue mapping. stmmac_xmit() is called with a specific TX queue locked, and accessing a different TX queue results in a data race for all of that queue's state. I think this commit should be reverted upstream and in all stable branches. Instead, the driver should implement the ndo_select_queue operation and override the queue mapping there." Fixes: c5acdbee22a1 ("net: stmmac: Send TSO packets always from Queue 0") Suggested-by: Ben Hutchings Signed-off-by: Jose Abreu Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 28 +++++++++++++++-------- 1 file changed, 18 insertions(+), 10 deletions(-) commit 5f65ae344f1493c9c6f0a1748da4ce3af71ab541 Author: Arnd Bergmann Date: Mon Jul 8 15:52:08 2019 +0200 drm/amd/display: avoid 64-bit division On 32-bit architectures, dividing a 64-bit integer in the kernel leads to a link error: ERROR: "__udivdi3" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! ERROR: "__divdi3" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! Change the two recently introduced instances to a multiply+shift operation that is also much cheaper on 32-bit architectures. We can do that here, since both of them are really 32-bit numbers that change a few percent. Fixes: bedbbe6af4be ("drm/amd/display: Move link functions from dc to dc_link") Fixes: f18bc4e53ad6 ("drm/amd/display: update calculated bounding box logic for NV") Acked-by: Slava Abramov Tested-by: Slava Abramov Signed-off-by: Arnd Bergmann Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 4 ++-- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 223cea6a4f0552b86fb25e3b8bbd00469816cd7a Merge: 2f0f6503e375 993773d11d45 Author: Linus Torvalds Date: Mon Jul 8 12:23:00 2019 -0700 Merge branch 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 pti updates from Thomas Gleixner: "The speculative paranoia departement delivers a few more plugs for possible (probably theoretical) spectre/mds leaks" * 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/tls: Fix possible spectre-v1 in do_get_thread_area() x86/ptrace: Fix possible spectre-v1 in ptrace_get_debugreg() x86/speculation/mds: Eliminate leaks by trace_hardirqs_on() commit 05cfee98c8a5187c41978967d34ab5ef0353c0f8 Author: Martin Habets Date: Mon Jul 8 12:07:11 2019 +0100 sfc: Remove 'PCIE error reporting unavailable' This is only at notice level but it was pointed out that no other driver does this. Also there is no action the user can take as it is really a property of the server. Signed-off-by: Martin Habets Signed-off-by: David S. Miller drivers/net/ethernet/sfc/efx.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 2f0f6503e37551eb8d8d5e4d27c78d28a30fed5a Merge: 13324c42c140 e44252f4fe79 Author: Linus Torvalds Date: Mon Jul 8 12:16:40 2019 -0700 Merge branch 'x86-timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 timer updates from Thomas Gleixner: "A rather large series consolidating the HPET code, which was triggered by the attempt to bolt HPET NMI watchdog support on to the existing maze with the usual duct tape and super glue approach. This mainly removes two separate partially redundant storage layers and consolidates them into a single one which provides a consistent view of the different HPET channels and their usage and allows to integrate HPET NMI watchdog support (if it turns out to be feasible) in a non intrusive way" * 'x86-timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (29 commits) x86/hpet: Use channel for legacy clockevent storage x86/hpet: Use common init for legacy clockevent x86/hpet: Carve out shareable parts of init_one_hpet_msi_clockevent() x86/hpet: Consolidate clockevent functions x86/hpet: Wrap legacy clockevent in hpet_channel x86/hpet: Use cached info instead of extra flags x86/hpet: Move clockevents into channels x86/hpet: Rename variables to prepare for switching to channels x86/hpet: Add function to select a /dev/hpet channel x86/hpet: Add mode information to struct hpet_channel x86/hpet: Use cached channel data x86/hpet: Introduce struct hpet_base and struct hpet_channel x86/hpet: Coding style cleanup x86/hpet: Clean up comments x86/hpet: Make naming consistent x86/hpet: Remove not required includes x86/hpet: Decapitalize and rename EVT_TO_HPET_DEV x86/hpet: Simplify counter validation x86/hpet: Separate counter check out of clocksource register code x86/hpet: Shuffle code around for readability sake ... commit 47cfb90406e1d8de4007e781155884ff10bb40d3 Merge: bfb204129a5a 0ef1efd1354d Author: David S. Miller Date: Mon Jul 8 12:13:38 2019 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next Pablo Neira Ayuso says: ==================== Netfilter/IPVS updates for net-next The following patchset contains Netfilter/IPVS updates for net-next: 1) Move bridge keys in nft_meta to nft_meta_bridge, from wenxu. 2) Support for bridge pvid matching, from wenxu. 3) Support for bridge vlan protocol matching, also from wenxu. 4) Add br_vlan_get_pvid_rcu(), to fetch the bridge port pvid from packet path. 5) Prefer specific family extension in nf_tables. 6) Autoload specific family extension in case it is missing. 7) Add synproxy support to nf_tables, from Fernando Fernandez Mancera. 8) Support for GRE encapsulation in IPVS, from Vadim Fedorenko. 9) ICMP handling for GRE encapsulation, from Julian Anastasov. 10) Remove unused parameter in nf_queue, from Florian Westphal. 11) Replace seq_printf() by seq_puts() in nf_log, from Markus Elfring. 12) Rename nf_SYNPROXY.h => nf_synproxy.h before this header becomes public. ==================== Signed-off-by: David S. Miller commit 173da95d936fe3121d201565ff754988f72b6f56 Author: Alex Deucher Date: Mon Jul 8 14:01:30 2019 -0500 drm/amdgpu/psp11: simplify the ucode register logic Split it between navi10 and newer and everything before navi10. Reviewed-by: Xiaojie Yuan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ee8a84c60bcc1f1615bd9cb3edfe501e26cdc85b Author: Mathieu Desnoyers Date: Sun Jun 30 09:56:13 2019 -0400 rseq/selftests: Fix Thumb mode build failure on arm32 Using ".arm .inst" for the arm signature introduces build issues for programs compiled in Thumb mode because the assembler stays in the arm mode for the rest of the inline assembly. Revert to using a ".word" to express the signature as data instead. The choice of signature is a valid trap instruction on arm32 little endian, where both code and data are little endian. ARMv6+ big endian (BE8) generates mixed endianness code vs data: little-endian code and big-endian data. The data value of the signature needs to have its byte order reversed to generate the trap instruction. Prior to ARMv6, -mbig-endian generates big-endian code and data (which match), so the endianness of the data representation of the signature should not be reversed. However, the choice between BE32 and BE8 is done by the linker, so we cannot know whether code and data endianness will be mixed before the linker is invoked. So rather than try to play tricks with the linker, the rseq signature is simply data (not a trap instruction) prior to ARMv6 on big endian. This is why the signature is expressed as data (.word) rather than as instruction (.inst) in assembler. Because a ".word" is used to emit the signature, it will be interpreted as a literal pool by a disassembler, not as an actual instruction. Considering that the signature is not meant to be executed except in scenarios where the program execution is completely bogus, this should not be an issue. Signed-off-by: Mathieu Desnoyers Acked-by: Will Deacon CC: Peter Zijlstra CC: Thomas Gleixner CC: Joel Fernandes CC: Catalin Marinas CC: Dave Watson CC: Will Deacon CC: Shuah Khan CC: Andi Kleen CC: linux-kselftest@vger.kernel.org CC: "H . Peter Anvin" CC: Chris Lameter CC: Russell King CC: Michael Kerrisk CC: "Paul E . McKenney" CC: Paul Turner CC: Boqun Feng CC: Josh Triplett CC: Steven Rostedt CC: Ben Maurer CC: linux-api@vger.kernel.org CC: Andy Lutomirski CC: Andrew Morton CC: Linus Torvalds CC: Carlos O'Donell CC: Florian Weimer Signed-off-by: Shuah Khan tools/testing/selftests/rseq/rseq-arm.h | 61 ++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 28 deletions(-) commit 13324c42c1401ad838208ee1e98f3821fce1cd86 Merge: ab2486a9ee32 049331f277fe Author: Linus Torvalds Date: Mon Jul 8 11:59:59 2019 -0700 Merge branch 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 CPU feature updates from Thomas Gleixner: "Updates for x86 CPU features: - Support for UMWAIT/UMONITOR, which allows to use MWAIT and MONITOR instructions in user space to save power e.g. in HPC workloads which spin wait on synchronization points. The maximum time a MWAIT can halt in userspace is controlled by the kernel and can be adjusted by the sysadmin. - Speed up the MTRR handling code on CPUs which support cache self-snooping correctly. On those CPUs the wbinvd() invocations can be omitted which speeds up the MTRR setup by a factor of 50. - Support for the new x86 vendor Zhaoxin who develops processors based on the VIA Centaur technology. - Prevent 'cat /proc/cpuinfo' from affecting isolated NOHZ_FULL CPUs by sending IPIs to retrieve the CPU frequency and use the cached values instead. - The addition and late revert of the FSGSBASE support. The revert was required as it turned out that the code still has hard to diagnose issues. Yet another engineering trainwreck... - Small fixes, cleanups, improvements and the usual new Intel CPU family/model addons" * 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (41 commits) x86/fsgsbase: Revert FSGSBASE support selftests/x86/fsgsbase: Fix some test case bugs x86/entry/64: Fix and clean up paranoid_exit x86/entry/64: Don't compile ignore_sysret if 32-bit emulation is enabled selftests/x86: Test SYSCALL and SYSENTER manually with TF set x86/mtrr: Skip cache flushes on CPUs with cache self-snooping x86/cpu/intel: Clear cache self-snoop capability in CPUs with known errata Documentation/ABI: Document umwait control sysfs interfaces x86/umwait: Add sysfs interface to control umwait maximum time x86/umwait: Add sysfs interface to control umwait C0.2 state x86/umwait: Initialize umwait control values x86/cpufeatures: Enumerate user wait instructions x86/cpu: Disable frequency requests via aperfmperf IPI for nohz_full CPUs x86/acpi/cstate: Add Zhaoxin processors support for cache flush policy in C3 ACPI, x86: Add Zhaoxin processors support for NONSTOP TSC x86/cpu: Create Zhaoxin processors architecture support file x86/cpu: Split Tremont based Atoms from the rest Documentation/x86/64: Add documentation for GS/FS addressing mode x86/elf: Enumerate kernel FSGSBASE capability in AT_HWCAP2 x86/cpu: Enable FSGSBASE on 64bit by default and add a chicken bit ... commit f8a7976b75f608687bf01b59518777642ff7c4e2 Author: Alex Deucher Date: Fri Jul 5 15:39:39 2019 -0500 drm/amdgpu: properly guard DC support in navi code Need to add appropriate ifdef. Acked-by: Leo Li Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/nv.c | 4 ++++ 1 file changed, 4 insertions(+) commit de48ebdd5b0a582f870778271ad9dbfa663d65cc Author: Arnd Bergmann Date: Mon Jul 8 16:07:59 2019 +0200 drm/amd/powerplay: vega20: fix uninitialized variable use If smu_get_current_rpm() fails, we can't use the output, as that may be uninitialized: drivers/gpu/drm/amd/amdgpu/../powerplay/vega20_ppt.c:3023:8: error: variable 'current_rpm' is used uninitialized whenever '?:' condition is false [-Werror,-Wsometimes-uninitialized] ret = smu_get_current_rpm(smu, ¤t_rpm); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../powerplay/inc/amdgpu_smu.h:735:3: note: expanded from macro 'smu_get_current_rpm' ((smu)->funcs->get_current_rpm ? (smu)->funcs->get_current_rpm((smu), (speed)) : 0) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../powerplay/vega20_ppt.c:3024:12: note: uninitialized use occurs here percent = current_rpm * 100 / pptable->FanMaximumRpm; ^~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../powerplay/vega20_ppt.c:3023:8: note: remove the '?:' if its condition is always true ret = smu_get_current_rpm(smu, ¤t_rpm); ^ drivers/gpu/drm/amd/amdgpu/../powerplay/inc/amdgpu_smu.h:735:3: note: expanded from macro 'smu_get_current_rpm' ((smu)->funcs->get_current_rpm ? (smu)->funcs->get_current_rpm((smu), (speed)) : 0) ^ drivers/gpu/drm/amd/amdgpu/../powerplay/vega20_ppt.c:3020:22: note: initialize the variable 'current_rpm' to silence this warning uint32_t current_rpm; Propagate the error code in that case. Fixes: ee0db82027ee ("drm/amd/powerplay: move PPTable_t uses into asic level") Signed-off-by: Arnd Bergmann Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit c602b36fe245f2114153f6690d1222ce1a51e942 Author: Arnd Bergmann Date: Mon Jul 8 15:53:18 2019 +0200 drm/amd/display: dcn20: include linux/delay.h Without this header, we get a compiler error in some configurations: .../dc/dcn20/dcn20_hwseq.c: In function 'dcn20_hwss_wait_for_blank_complete': .../dc/dcn20/dcn20_hwseq.c:1493:3: error: implicit declaration of function 'udelay' [-Werror=implicit-function-declaration] Note: the use of udelay itself may be problematic, as can occupy the CPU for 200ms in a busy-loop here. Fixes: 7ed4e6352c16 ("drm/amd/display: Add DCN2 HW Sequencer and Resource") Signed-off-by: Arnd Bergmann Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 1 + 1 file changed, 1 insertion(+) commit d155bef0636e019418ef5a69cafce129cc202b78 Author: Arnd Bergmann Date: Mon Jul 8 16:41:43 2019 +0200 amdgpu: make pmu support optional When CONFIG_PERF_EVENTS is disabled, we cannot compile the pmu portion of the amdgpu driver: drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c:48:38: error: no member named 'hw' in 'struct perf_event' struct hw_perf_event *hwc = &event->hw; ~~~~~ ^ drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c:51:13: error: no member named 'attr' in 'struct perf_event' if (event->attr.type != event->pmu->type) ~~~~~ ^ ... Use conditional compilation for this file. Fixes: 9c7c85f7ea1f ("drm/amdgpu: add pmu counters") Signed-off-by: Arnd Bergmann Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Makefile | 4 +++- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) commit 985863d00a8feb597a38df38f8fc2f70e980156f Author: Nathan Chancellor Date: Wed Jul 3 22:52:18 2019 -0700 drm/amd/powerplay: Zero initialize current_rpm in vega20_get_fan_speed_percent clang warns (trimmed for brevity): drivers/gpu/drm/amd/amdgpu/../powerplay/vega20_ppt.c:3023:8: warning: variable 'current_rpm' is used uninitialized whenever '?:' condition is false [-Wsometimes-uninitialized] ret = smu_get_current_rpm(smu, ¤t_rpm); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ smu_get_current_rpm expands to a ternary operator conditional on smu->funcs->get_current_rpm being not NULL. When this is false, current_rpm will be uninitialized. Zero initialize current_rpm to avoid using random stack values if that ever happens. Fixes: ee0db82027ee ("drm/amd/powerplay: move PPTable_t uses into asic level") Link: https://github.com/ClangBuiltLinux/linux/issues/588 Signed-off-by: Nathan Chancellor Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 68c3bd95018130d1cb34e77f6ba283b19cbb61ea Author: Nathan Chancellor Date: Wed Jul 3 22:52:15 2019 -0700 drm/amd/powerplay: Zero initialize freq in smu_v11_0_get_current_clk_freq clang warns (trimmed for brevity): drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:1098:10: warning: variable 'freq' is used uninitialized whenever '?:' condition is false [-Wsometimes-uninitialized] ret = smu_get_current_clk_freq_by_table(smu, clk_id, &freq); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If get_current_clk_freq_by_table is ever NULL, freq will fail to be properly initialized. Zero initialize it to avoid using uninitialized stack values. smu_get_current_clk_freq_by_table expands to a ternary operator conditional on smu->funcs->get_current_clk_freq_by_table being not NULL. When this is false, freq will be uninitialized. Zero initialize freq to avoid using random stack values if that ever happens. Fixes: e36182490dec ("drm/amd/powerplay: fix dpm freq unit error (10KHz -> Mhz)") Link: https://github.com/ClangBuiltLinux/linux/issues/585 Signed-off-by: Nathan Chancellor Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d693e8e349a8fca2539b22af47cfbc37c4fb1528 Author: Nathan Chancellor Date: Wed Jul 3 22:52:13 2019 -0700 drm/amd/powerplay: Use memset to initialize metrics structs clang warns: drivers/gpu/drm/amd/amdgpu/../powerplay/navi10_ppt.c:601:33: warning: suggest braces around initialization of subobject [-Wmissing-braces] static SmuMetrics_t metrics = {0}; ^ {} drivers/gpu/drm/amd/amdgpu/../powerplay/navi10_ppt.c:905:26: warning: suggest braces around initialization of subobject [-Wmissing-braces] SmuMetrics_t metrics = {0}; ^ {} 2 warnings generated. One way to fix these warnings is to add additional braces like clang suggests; however, there has been a bit of push back from some maintainers[1][2], who just prefer memset as it is unambiguous, doesn't depend on a particular compiler version[3], and properly initializes all subobjects. Do that here so there are no more warnings. [1]: https://lore.kernel.org/lkml/022e41c0-8465-dc7a-a45c-64187ecd9684@amd.com/ [2]: https://lore.kernel.org/lkml/20181128.215241.702406654469517539.davem@davemloft.net/ [3]: https://lore.kernel.org/lkml/20181116150432.2408a075@redhat.com/ Fixes: 98e1a543c7b1 ("drm/amd/powerplay: add function get current clock freq interface for navi10") Fixes: ab43c4bf1cc8 ("drm/amd/powerplay: fix fan speed show error (for hwmon pwm)") Link: https://github.com/ClangBuiltLinux/linux/issues/583 Signed-off-by: Nathan Chancellor Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit f19367da96077ceaeeb5cebb97c4b6cf58b60802 Author: Nathan Chancellor Date: Wed Jul 3 22:52:12 2019 -0700 drm/amdgpu/mes10.1: Fix header guard clang warns: In file included from drivers/gpu/drm/amd/amdgpu/nv.c:53: drivers/gpu/drm/amd/amdgpu/../amdgpu/mes_v10_1.h:24:9: warning: '__MES_V10_1_H__' is used as a header guard here, followed by #define of a different macro [-Wheader-guard] #ifndef __MES_V10_1_H__ ^~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../amdgpu/mes_v10_1.h:25:9: note: '__MES_v10_1_H__' is defined here; did you mean '__MES_V10_1_H__'? #define __MES_v10_1_H__ ^~~~~~~~~~~~~~~ __MES_V10_1_H__ 1 warning generated. Capitalize the V. Fixes: 886f82aa7a1d ("drm/amdgpu/mes10.1: add ip block mes10.1 (v2)") Link: https://github.com/ClangBuiltLinux/linux/issues/582 Signed-off-by: Nathan Chancellor Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/mes_v10_1.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e5aa29ce23ba7a3dc0cb534cb71de444c223188d Author: Kevin Wang Date: Thu Jul 4 10:56:18 2019 +0800 drm/amd/powerplay: add temperature sensor support for navi10 the hwmon interface need temperature sensor type support. 1. SENSOR_HOTSPOT_TEMP 2. SENSOR_EDGE_TEMP(SENSOR_GPU_TEMP) 3. SENSOR_MEM_TEMP Signed-off-by: Kevin Wang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 41 ++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit 71cc9ef3f694ccd70ae929ad827da8b630b269c9 Author: Flora Cui Date: Mon Jun 24 16:48:33 2019 +0800 drm/amdgpu: fix scheduler timeout calc scheduler timeout is in jiffies v2: move timeout check to amdgpu_device_get_job_timeout_settings after parsing the value v3: add lockup_timeout param check. 0: keep default value. negative: infinity timeout. v4: refactor codes. Signed-off-by: Flora Cui Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit e5eaa7cc0c0359cfe17b0027a6ac5eda7a9635db Author: Philip Yang Date: Tue Jul 2 18:39:45 2019 -0400 drm/amdgpu: Prepare for hmm_range_register API change (v2) An upcoming change in the hmm_range_register API requires passing in a pointer to an hmm_mirror instead of mm_struct. To access the hmm_mirror we need pass bo instead of ttm to amdgpu_ttm_tt_get_user_pages because mirror is part of amdgpu_mn structure, which is accessible from bo. v2: fix building without CONFIG_HMM_MIRROR (Arnd) Signed-off-by: Philip Yang Signed-off-by: Felix Kuehling Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 5 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c | 37 ------------------- drivers/gpu/drm/amd/amdgpu/amdgpu_mn.h | 46 +++++++++++++++++++++--- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 10 +++++- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 5 +-- 7 files changed, 57 insertions(+), 51 deletions(-) commit bfb204129a5adeb8eb62d693e97047ae6c8f37fd Author: Ilias Apalodimas Date: Mon Jul 8 10:25:41 2019 +0300 net: netsec: Sync dma for device on buffer allocation cd1973a9215a ("net: netsec: Sync dma for device on buffer allocation") was merged on it's v1 instead of the v3. Merge the proper patch version Signed-off-by: Ilias Apalodimas Signed-off-by: David S. Miller drivers/net/ethernet/socionext/netsec.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 053bc5764bb0a84ef0b26a8e4ddd3e2f4b4f8215 Author: Sebastian Andrzej Siewior Date: Thu Jul 4 17:38:01 2019 +0200 watchdog: ie6xx_wdt: Use spinlock_t instead of struct spinlock For spinlocks the type spinlock_t should be used instead of "struct spinlock". Use spinlock_t for spinlock's definition. Cc: Wim Van Sebroeck Cc: Guenter Roeck Cc: linux-watchdog@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/ie6xx_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ab2486a9ee3243c8342549f58a13cdfa9abb497a Merge: 0d37dde70655 7891bc0ab739 Author: Linus Torvalds Date: Mon Jul 8 11:45:26 2019 -0700 Merge branch 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 FPU updates from Thomas Gleixner: "A small set of updates for the FPU code: - Make the no387/nofxsr command line options useful by restricting them to 32bit and actually clearing all dependencies to prevent random crashes and malfunction. - Simplify and cleanup the kernel_fpu_*() helpers" * 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/fpu: Inline fpu__xstate_clear_all_cpu_caps() x86/fpu: Make 'no387' and 'nofxsr' command line options useful x86/fpu: Remove the fpu__save() export x86/fpu: Simplify kernel_fpu_begin() x86/fpu: Simplify kernel_fpu_end() commit 0d37dde70655be73575d011be1bffaf0e3b16ea9 Merge: 0902d5011cfa 7f0a5e075583 Author: Linus Torvalds Date: Mon Jul 8 11:42:09 2019 -0700 Merge branch 'x86-entry-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 vsyscall updates from Thomas Gleixner: "Further hardening of the legacy vsyscall by providing support for execute only mode and switching the default to it. This prevents a certain class of attacks which rely on the vsyscall page being accessible at a fixed address in the canonical kernel address space" * 'x86-entry-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: selftests/x86: Add a test for process_vm_readv() on the vsyscall page x86/vsyscall: Add __ro_after_init to global variables x86/vsyscall: Change the default vsyscall mode to xonly selftests/x86/vsyscall: Verify that vsyscall=none blocks execution x86/vsyscall: Document odd SIGSEGV error code for vsyscalls x86/vsyscall: Show something useful on a read fault x86/vsyscall: Add a new vsyscall=xonly mode Documentation/admin: Remove the vsyscall=native documentation commit 8d209eb0b167ac6998ef330150a3960032a31c50 Author: Ken Sloat Date: Fri Jun 14 12:53:22 2019 +0000 watchdog: atmel: atmel-sama5d4-wdt: Disable watchdog on system suspend Currently, the atmel-sama5d4-wdt continues to run after system suspend. Unless the system resumes within the watchdog timeout period so the userspace can kick it, the system will be reset. This change disables the watchdog on suspend if it is active and re-enables on resume. These actions occur during the late and early phases of suspend and resume respectively to minimize chances where a lock could occur while the watchdog is disabled. Signed-off-by: Ken Sloat Acked-by: Alexandre Belloni Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/sama5d4_wdt.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) commit d0173278935a9c7ea268cc8baa8b669ecb57c0e3 Author: Guenter Roeck Date: Thu Jun 20 09:28:46 2019 -0700 watchdog: convert remaining drivers to use SPDX license identifier This gets rid of the unnecessary license boilerplate, and avoids having to deal with individual patches one by one. No functional changes. Reviewed-by: Jerry Hoemann Acked-by: Sylvain Lemieux Reviewed-by: Matthias Brugger Acked-by: William Breathitt Gray Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/acquirewdt.c | 6 +----- drivers/watchdog/advantechwdt.c | 6 +----- drivers/watchdog/davinci_wdt.c | 6 ++---- drivers/watchdog/ebc-c384_wdt.c | 9 --------- drivers/watchdog/eurotechwdt.c | 6 +----- drivers/watchdog/iTCO_vendor_support.c | 7 +------ drivers/watchdog/iTCO_wdt.c | 6 +----- drivers/watchdog/ib700wdt.c | 6 +----- drivers/watchdog/mv64x60_wdt.c | 6 ++---- drivers/watchdog/nv_tco.h | 6 +----- drivers/watchdog/octeon-wdt-main.c | 11 +---------- drivers/watchdog/omap_wdt.c | 6 ++---- drivers/watchdog/omap_wdt.h | 21 +-------------------- drivers/watchdog/pc87413_wdt.c | 6 +----- drivers/watchdog/pcwd_pci.c | 6 +----- drivers/watchdog/pcwd_usb.c | 6 +----- drivers/watchdog/pnx4008_wdt.c | 5 +---- drivers/watchdog/retu_wdt.c | 10 +--------- drivers/watchdog/sa1100_wdt.c | 6 +----- drivers/watchdog/sbc7240_wdt.c | 11 +---------- drivers/watchdog/sbc8360.c | 6 +----- drivers/watchdog/sch311x_wdt.c | 6 +----- drivers/watchdog/softdog.c | 6 +----- drivers/watchdog/w83627hf_wdt.c | 6 +----- drivers/watchdog/wafer5823wdt.c | 6 +----- drivers/watchdog/watchdog_core.c | 6 +----- drivers/watchdog/watchdog_core.h | 6 +----- drivers/watchdog/watchdog_dev.c | 6 +----- drivers/watchdog/wd501p.h | 6 +----- drivers/watchdog/wdt.c | 6 +----- drivers/watchdog/wdt_pci.c | 6 +----- 31 files changed, 33 insertions(+), 185 deletions(-) commit 3265c3d8f70f0cb98dc7a7a3865200a7b19f654b Author: Simon Horman Date: Mon Jun 17 11:09:53 2019 +0200 dt-bindings: watchdog: Rename bindings documentation file For consistency with the naming of (most) other documentation files for DT bindings for Renesas IP blocks rename the Renesas WDT documentation file from renesas-wdt.txt to renesas,wdt.txt. Signed-off-by: Simon Horman Reviewed-by: Niklas Söderlund Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck .../devicetree/bindings/watchdog/{renesas-wdt.txt => renesas,wdt.txt} | 0 1 file changed, 0 insertions(+), 0 deletions(-) commit 64079cf9f2b2f93779c1d9772d0e1f5c04bd4d22 Author: Greg Kroah-Hartman Date: Tue Jun 18 17:58:30 2019 +0200 watchdog: mei_wdt: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Tomas Winkler Cc: Wim Van Sebroeck Cc: Guenter Roeck Cc: linux-watchdog@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/mei_wdt.c | 30 +++++++----------------------- 1 file changed, 7 insertions(+), 23 deletions(-) commit 1dbb3bb8de88dbca78556684e79a0f10f7da3d00 Author: Greg Kroah-Hartman Date: Tue Jun 18 17:58:09 2019 +0200 watchdog: bcm_kona_wdt: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Wim Van Sebroeck Cc: Guenter Roeck Cc: Florian Fainelli Cc: Ray Jui Cc: Scott Branden Cc: bcm-kernel-feedback-list@broadcom.com Cc: linux-watchdog@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/bcm_kona_wdt.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 3bd41e595b09ecce472432bbdaf7544d2a94a417 Author: Jerry Hoemann Date: Wed Jun 12 18:02:37 2019 -0600 docs: watchdog: Fix build error. make htmldocs fails due to missing blank line following header. Signed-off-by: Jerry Hoemann Reviewed-by: Mauro Carvalho Chehab Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck Documentation/watchdog/watchdog-parameters.rst | 2 ++ 1 file changed, 2 insertions(+) commit 74665686f0e27496ea8aa47221282707f57dc178 Author: Mauro Carvalho Chehab Date: Wed Jun 12 14:53:01 2019 -0300 docs: watchdog: convert docs to ReST and rename to *.rst Convert those documents and prepare them to be part of the kernel API book, as most of the stuff there are related to the Kernel interfaces. Still, in the future, it would make sense to split the docs, as some of the stuff is clearly focused on sysadmin tasks. The conversion is actually: - add blank lines and identation in order to identify paragraphs; - fix tables markups; - add some lists markups; - mark literal blocks; - adjust title markups. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck Documentation/admin-guide/kernel-parameters.txt | 2 +- Documentation/kernel-per-CPU-kthreads.txt | 2 +- ...l_api.txt => convert_drivers_to_kernel_api.rst} | 109 +-- Documentation/watchdog/{hpwdt.txt => hpwdt.rst} | 25 +- Documentation/watchdog/index.rst | 25 + .../watchdog/{mlx-wdt.txt => mlx-wdt.rst} | 24 +- .../{pcwd-watchdog.txt => pcwd-watchdog.rst} | 13 +- .../{watchdog-api.txt => watchdog-api.rst} | 76 ++- ...hdog-kernel-api.txt => watchdog-kernel-api.rst} | 91 ++- Documentation/watchdog/watchdog-parameters.rst | 745 +++++++++++++++++++++ Documentation/watchdog/watchdog-parameters.txt | 418 ------------ .../watchdog/{watchdog-pm.txt => watchdog-pm.rst} | 3 + Documentation/watchdog/{wdt.txt => wdt.rst} | 31 +- MAINTAINERS | 2 +- drivers/watchdog/Kconfig | 6 +- drivers/watchdog/smsc37b787_wdt.c | 2 +- 16 files changed, 1013 insertions(+), 561 deletions(-) commit 0902d5011cfaabd6a09326299ef77e1c8735fb89 Merge: 927ba67a63c7 f8a8fe61fec8 Author: Linus Torvalds Date: Mon Jul 8 11:22:57 2019 -0700 Merge branch 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x96 apic updates from Thomas Gleixner: "Updates for the x86 APIC interrupt handling and APIC timer: - Fix a long standing issue with spurious interrupts which was caused by the big vector management rework a few years ago. Robert Hodaszi provided finally enough debug data and an excellent initial failure analysis which allowed to understand the underlying issues. This contains a change to the core interrupt management code which is required to handle this correctly for the APIC/IO_APIC. The core changes are NOOPs for most architectures except ARM64. ARM64 is not impacted by the change as confirmed by Marc Zyngier. - Newer systems allow to disable the PIT clock for power saving causing panic in the timer interrupt delivery check of the IO/APIC when the HPET timer is not enabled either. While the clock could be turned on this would cause an endless whack a mole game to chase the proper register in each affected chipset. These systems provide the relevant frequencies for TSC, CPU and the local APIC timer via CPUID and/or MSRs, which allows to avoid the PIT/HPET based calibration. As the calibration code is the only usage of the legacy timers on modern systems and is skipped anyway when the frequencies are known already, there is no point in setting up the PIT and actually checking for the interrupt delivery via IO/APIC. To achieve this on a wide variety of platforms, the CPUID/MSR based frequency readout has been made more robust, which also allowed to remove quite some workarounds which turned out to be not longer required. Thanks to Daniel Drake for analysis, patches and verification" * 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/irq: Seperate unused system vectors from spurious entry again x86/irq: Handle spurious interrupt after shutdown gracefully x86/ioapic: Implement irq_get_irqchip_state() callback genirq: Add optional hardware synchronization for shutdown genirq: Fix misleading synchronize_irq() documentation genirq: Delay deactivation in free_irq() x86/timer: Skip PIT initialization on modern chipsets x86/apic: Use non-atomic operations when possible x86/apic: Make apic_bsp_setup() static x86/tsc: Set LAPIC timer period to crystal clock frequency x86/apic: Rename 'lapic_timer_frequency' to 'lapic_timer_period' x86/tsc: Use CPUID.0x16 to calculate missing crystal frequency commit 927ba67a63c72ee87d655e30183d1576c3717d3e Merge: 2a1ccd31420a 9176ab1b8480 Author: Linus Torvalds Date: Mon Jul 8 11:06:29 2019 -0700 Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer updates from Thomas Gleixner: "The timer and timekeeping departement delivers: Core: - The consolidation of the VDSO code into a generic library including the conversion of x86 and ARM64. Conversion of ARM and MIPS are en route through the relevant maintainer trees and should end up in 5.4. This gets rid of the unnecessary different copies of the same code and brings all architectures on the same level of VDSO functionality. - Make the NTP user space interface more robust by restricting the TAI offset to prevent undefined behaviour. Includes a selftest. - Validate user input in the compat settimeofday() syscall to catch invalid values which would be turned into valid values by a multiplication overflow - Consolidate the time accessors - Small fixes, improvements and cleanups all over the place Drivers: - Support for the NXP system counter, TI davinci timer - Move the Microsoft HyperV clocksource/events code into the drivers/clocksource directory so it can be shared between x86 and ARM64. - Overhaul of the Tegra driver - Delay timer support for IXP4xx - Small fixes, improvements and cleanups as usual" * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (71 commits) time: Validate user input in compat_settimeofday() timer: Document TIMER_PINNED clocksource/drivers: Continue making Hyper-V clocksource ISA agnostic clocksource/drivers: Make Hyper-V clocksource ISA agnostic MAINTAINERS: Fix Andy's surname and the directory entries of VDSO hrtimer: Use a bullet for the returns bullet list arm64: vdso: Fix compilation with clang older than 8 arm64: compat: Fix __arch_get_hw_counter() implementation arm64: Fix __arch_get_hw_counter() implementation lib/vdso: Make delta calculation work correctly MAINTAINERS: Add entry for the generic VDSO library arm64: compat: No need for pre-ARMv7 barriers on an ARMv8 system arm64: vdso: Remove unnecessary asm-offsets.c definitions vdso: Remove superfluous #ifdef __KERNEL__ in vdso/datapage.h clocksource/drivers/davinci: Add support for clocksource clocksource/drivers/davinci: Add support for clockevents clocksource/drivers/tegra: Set up maximum-ticks limit properly clocksource/drivers/tegra: Cycles can't be 0 clocksource/drivers/tegra: Restore base address before cleanup clocksource/drivers/tegra: Add verbose definition for 1MHz constant ... commit c2eac35bc2717abd585a3eede879d75461685bc7 Author: Rasmus Villemoes Date: Wed Jun 5 14:06:44 2019 +0000 watchdog: make the device time out at open_deadline when open_timeout is used When the watchdog device is not open by userspace, the kernel takes care of pinging it. When the open_timeout feature is in use, we should ensure that the hardware fires close to open_timeout seconds after the kernel has assumed responsibility for the device. To do this, simply reuse the logic that is already in place for ensuring the same thing when userspace is responsible for regularly pinging the device: - When watchdog_active(wdd), this patch doesn't change anything. - When !watchdog_active(wdd), the "virtual timeout" should be taken to be ->open_deadline". When the open_timeout feature is not used or the device has been opened at least once, ->open_deadline is KTIME_MAX, and the arithmetic ends up returning keepalive_interval as we used to. This has been tested on a Wandboard with various combinations of open_timeout and timeout-sec properties for the on-board watchdog by booting with 'init=/bin/sh', timestamping the lines on the serial console, and comparing the timestamp of the 'imx2-wdt 20bc000.wdog: timeout nnn sec' line with the timestamp of the 'U-Boot SPL ...' line (which appears just after reset). Suggested-by: Guenter Roeck Signed-off-by: Rasmus Villemoes Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/watchdog_dev.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 487e4e08221debb1ccf9cb2c249fac379b74cbb2 Author: Rasmus Villemoes Date: Wed Jun 5 14:06:43 2019 +0000 watchdog: introduce CONFIG_WATCHDOG_OPEN_TIMEOUT This allows setting a default value for the watchdog.open_timeout commandline parameter via Kconfig. Some BSPs allow remote updating of the kernel image and root file system, but updating the bootloader requires physical access. Hence, if one has a firmware update that requires relaxing the watchdog.open_timeout a little, the value used must be baked into the kernel image itself and cannot come from the u-boot environment via the kernel command line. Being able to set the initial value in .config doesn't change the fact that the value on the command line, if present, takes precedence, and is of course immensely useful for development purposes while one has console acccess, as well as usable in the cases where one can make a permanent update of the kernel command line. Signed-off-by: Rasmus Villemoes Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck Documentation/watchdog/watchdog-parameters.txt | 8 ++++---- drivers/watchdog/Kconfig | 9 +++++++++ drivers/watchdog/watchdog_dev.c | 5 +++-- 3 files changed, 16 insertions(+), 6 deletions(-) commit 4d1c6a0ec2d98e51f950127bf9299531caac53e1 Author: Rasmus Villemoes Date: Wed Jun 5 14:06:41 2019 +0000 watchdog: introduce watchdog.open_timeout commandline parameter The watchdog framework takes care of feeding a hardware watchdog until userspace opens /dev/watchdogN. If that never happens for some reason (buggy init script, corrupt root filesystem or whatnot) but the kernel itself is fine, the machine stays up indefinitely. This patch allows setting an upper limit for how long the kernel will take care of the watchdog, thus ensuring that the watchdog will eventually reset the machine. A value of 0 (the default) means infinite timeout, preserving the current behaviour. This is particularly useful for embedded devices where some fallback logic is implemented in the bootloader (e.g., use a different root partition, boot from network, ...). There is already handle_boot_enabled serving a similar purpose. However, such a binary choice is unsuitable if the hardware watchdog cannot be programmed by the bootloader to provide a timeout long enough for userspace to get up and running. Many of the embedded devices we see use external (gpio-triggered) watchdogs with a fixed timeout of the order of 1-2 seconds. The open timeout only applies for the first open from userspace. Should userspace need to close the watchdog device, with the intention of re-opening it shortly, the application can emulate the open timeout feature by combining the nowayout feature with an appropriate WDIOC_SETTIMEOUT immediately prior to closing the device. Signed-off-by: Rasmus Villemoes Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck Documentation/watchdog/watchdog-parameters.txt | 8 ++++++ drivers/watchdog/watchdog_dev.c | 36 +++++++++++++++++++++++++- 2 files changed, 43 insertions(+), 1 deletion(-) commit 8c21ead3ea5d896946fb5d85b52b0be757e9bef4 Author: Anson Huang Date: Mon May 27 15:03:15 2019 +0800 dt-bindings: watchdog: move i.MX system controller watchdog binding to SCU i.MX system controller watchdog depends on SCU driver to support interrupt function, so it needs to be subnode of SCU node in DT, binding doc should be moved to fsl,scu.txt as well. Signed-off-by: Anson Huang Reviewed-by: Rob Herring Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck .../devicetree/bindings/arm/freescale/fsl,scu.txt | 15 ++++++++++++++ .../bindings/watchdog/fsl-imx-sc-wdt.txt | 24 ---------------------- 2 files changed, 15 insertions(+), 24 deletions(-) commit 8009ce956c3d28022af6b122e50213ad830fc902 Author: Richard Weinberger Date: Wed May 15 21:52:34 2019 +0200 ubifs: Don't leak orphans on memory during commit If an orphan has child orphans (xattrs), and due to a commit the parent orpahn cannot get free()'ed immediately, put also all child orphans on the erase list. Otherwise UBIFS will free() them only upon unmount and we waste memory. Fixes: 988bec41318f ("ubifs: orphan: Handle xattrs like files") Signed-off-by: Richard Weinberger fs/ubifs/orphan.c | 50 ++++++++++++++++++++++++-------------------------- 1 file changed, 24 insertions(+), 26 deletions(-) commit ee1438ce5dc4d67dd8dd1ff51583122a61f5bd9e Author: Richard Weinberger Date: Wed May 15 22:31:13 2019 +0200 ubifs: Check link count of inodes when killing orphans. O_TMPFILE files can change their link count back to non-zero. This corner case needs to get addressed in the orphans subsystem too. Fixes: 474b93704f32 ("ubifs: Implement O_TMPFILE") Reported-by: Lars Persson Signed-off-by: Richard Weinberger fs/ubifs/orphan.c | 44 +++++++++++++++++++++++++++++++++++--------- 1 file changed, 35 insertions(+), 9 deletions(-) commit 2a1ccd31420a7b1acd6ca37b2bec2d723aa093e4 Merge: e0e86b111bca 3a1d24ca9573 Author: Linus Torvalds Date: Mon Jul 8 11:01:13 2019 -0700 Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq updates from Thomas Gleixner: "The irq departement provides the usual mixed bag: Core: - Further improvements to the irq timings code which aims to predict the next interrupt for power state selection to achieve better latency/power balance - Add interrupt statistics to the core NMI handlers - The usual small fixes and cleanups Drivers: - Support for Renesas RZ/A1, Annapurna Labs FIC, Meson-G12A SoC and Amazon Gravition AMR/GIC interrupt controllers. - Rework of the Renesas INTC controller driver - ACPI support for Socionext SoCs - Enhancements to the CSKY interrupt controller - The usual small fixes and cleanups" * 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (39 commits) irq/irqdomain: Fix comment typo genirq: Update irq stats from NMI handlers irqchip/gic-pm: Remove PM_CLK dependency irqchip/al-fic: Introduce Amazon's Annapurna Labs Fabric Interrupt Controller Driver dt-bindings: interrupt-controller: Add Amazon's Annapurna Labs FIC softirq: Use __this_cpu_write() in takeover_tasklets() irqchip/mbigen: Stop printing kernel addresses irqchip/gic: Add dependency for ARM_GIC_MAX_NR genirq/affinity: Remove unused argument from [__]irq_build_affinity_masks() genirq/timings: Add selftest for next event computation genirq/timings: Add selftest for irqs circular buffer genirq/timings: Add selftest for circular array genirq/timings: Encapsulate storing function genirq/timings: Encapsulate timings push genirq/timings: Optimize the period detection speed genirq/timings: Fix timings buffer inspection genirq/timings: Fix next event index function irqchip/qcom: Use struct_size() in devm_kzalloc() irqchip/irq-csky-mpintc: Remove unnecessary loop in interrupt handler dt-bindings: interrupt-controller: Update csky mpintc ... commit 15f7d7fc5542f6cb429a069dd77b57ddccbe11e3 Author: Anson Huang Date: Mon May 27 15:03:17 2019 +0800 watchdog: imx_sc: Add pretimeout support i.MX system controller watchdog can support pretimeout IRQ via general SCU MU IRQ, it depends on IMX_SCU and driver MUST be probed after SCU IPC ready, then enable corresponding SCU IRQ group and register SCU IRQ notifier, when watchdog pretimeout IRQ fires, SCU MU IRQ will be handled and watchdog pretimeout notifier will be called to handle the event. Signed-off-by: Anson Huang Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/Kconfig | 1 + drivers/watchdog/imx_sc_wdt.c | 125 +++++++++++++++++++++++++++++++++++------- 2 files changed, 106 insertions(+), 20 deletions(-) commit eeabb9866e4ccce55d875cad140f9bf7c7ba1d66 Author: Michele Dionisio Date: Wed May 15 23:02:02 2019 +0200 ubifs: Add support for zstd compression. zstd shows a good compression rate and is faster than lzo, also on slow ARM cores. Cc: Sebastian Andrzej Siewior Signed-off-by: Michele Dionisio [rw: rewrote commit message] Signed-off-by: Richard Weinberger fs/ubifs/Kconfig | 10 ++++++++++ fs/ubifs/compress.c | 27 ++++++++++++++++++++++++++- fs/ubifs/super.c | 2 ++ fs/ubifs/ubifs-media.h | 2 ++ 4 files changed, 40 insertions(+), 1 deletion(-) commit 817aa094842dfc3a6b98c9582d4a647827f66201 Author: Sascha Hauer Date: Tue May 14 10:33:22 2019 +0200 ubifs: support offline signed images HMACs can only be generated on the system the UBIFS image is running on. To support offline signed images we add a PKCS#7 signature to the UBIFS image which can be created by mkfs.ubifs. Both the master node and the superblock need to be authenticated, during normal runtime both are protected with HMACs. For offline signature support however only a single signature is desired. We add a signature covering the superblock node directly behind it. To protect the master node a hash of the master node is added to the superblock which is used when the master node doesn't contain a HMAC. Transition to a read/write filesystem is also supported. During transition first the master node is rewritten with a HMAC (implicitly, it is written anyway as the FS is marked dirty). Afterwards the superblock is rewritten with a HMAC. Once after the image has been mounted read/write it is HMAC only, the signature is no longer required or even present on the filesystem. In an offline signed image the master node is authenticated by the superblock. In a transition to r/w we have to make sure that the master node is rewritten before the superblock node. In this case the master node gets a HMAC and its authenticity no longer depends on the superblock node. There are some cases in which the current code first writes the superblock node though, so with this patch writing of the superblock node is delayed until the master node is written. Signed-off-by: Sascha Hauer Signed-off-by: Richard Weinberger fs/ubifs/Kconfig | 3 +- fs/ubifs/auth.c | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++ fs/ubifs/master.c | 53 +++++++++++++++++++++++++++---- fs/ubifs/sb.c | 52 +++++++++++++++--------------- fs/ubifs/super.c | 41 ++++++++++++++++++------ fs/ubifs/ubifs-media.h | 28 +++++++++++++++- fs/ubifs/ubifs.h | 6 ++-- 7 files changed, 225 insertions(+), 44 deletions(-) commit 8ba0a2ab84b23b541a5d2ef25d759c94880e7457 Author: Liu Song Date: Fri Aug 24 09:15:45 2018 +0800 ubifs: remove unnecessary check in ubifs_log_start_commit In ubifs_log_start_commit, the value of c->lhead_offs is zero or set to zero by code bellow. /* Switch to the next log LEB */ if (c->lhead_offs) { c->lhead_lnum = ubifs_next_log_lnum(c, c->lhead_lnum); ubifs_assert(c->lhead_lnum != c->ltail_lnum); c->lhead_offs = 0; } The value of 'len' can not exceed 'max_len' which assigned value by code bellow. max_len = UBIFS_CS_NODE_SZ + c->jhead_cnt * UBIFS_REF_NODE_SZ; The value of c->lhead_offs changed by code bellow and cannot exceed 'max_len'. c->lhead_offs += len; if (c->lhead_offs == c->leb_size) { c->lhead_lnum = ubifs_next_log_lnum(c, c->lhead_lnum); c->lhead_offs = 0; } Usually, the size of PEB is between 64KB and 256KB. So the value of c->lhead_offs is far less than c->leb_size. The check 'if (c->lhead_offs == c->leb_size)' could never to be true. Signed-off-by: Liu Song Reviewed-by: Jiang Biao Signed-off-by: Richard Weinberger fs/ubifs/log.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 7d8c811bf9ed513a586b18a28b788dd10fbe1128 Author: Liu Song Date: Mon Aug 20 11:54:30 2018 +0800 ubifs: Fix typo of output in get_cs_sqnum "Not a CS node" makes more sense than "Node a CS node". Signed-off-by: Liu Song Reviewed-by: Jiang Biao Signed-off-by: Richard Weinberger fs/ubifs/recovery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d5cf9473a3f3b2bdd09c4a70ac9da037cdfc1f47 Author: Liu Song Date: Mon Aug 6 10:49:06 2018 +0800 ubifs: Simplify redundant code cbuf's size can be simply assigned. Signed-off-by: Liu Song Reviewed-by: Jiang Biao Signed-off-by: Richard Weinberger fs/ubifs/super.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e0e86b111bca6bbf746c03ec5cf3e6a61fa3f8e9 Merge: 568521d058aa caa759323c73 Author: Linus Torvalds Date: Mon Jul 8 10:39:56 2019 -0700 Merge branch 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull SMP/hotplug updates from Thomas Gleixner: "A small set of updates for SMP and CPU hotplug: - Abort disabling secondary CPUs in the freezer when a wakeup is pending instead of evaluating it only after all CPUs have been offlined. - Remove the shared annotation for the strict per CPU cfd_data in the smp function call core code. - Remove the return values of smp_call_function() and on_each_cpu() as they are unconditionally 0. Fixup the few callers which actually bothered to check the return value" * 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: smp: Remove smp_call_function() and on_each_cpu() return values smp: Do not mark call_function_data as shared cpu/hotplug: Abort disabling secondary CPUs if wakeup is pending cpu/hotplug: Fix notify_cpu_starting() reference in bringup_wait_for_ap() commit b836005b4f95cccdc1f53849a31cac2dc375f4b7 Author: Yoshihiro Shimoda Date: Wed Jun 5 14:04:00 2019 +0900 watchdog: renesas_wdt: Add a few cycles delay According to the hardware manual of R-Car Gen2 and Gen3, software should wait a few RLCK cycles as following: - Delay 2 cycles before setting watchdog counter. - Delay 3 cycles before disabling module clock. So, this patch adds such delays. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Reviewed-by: Niklas Söderlund Reviewed-by: Simon Horman Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/renesas_wdt.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 1a4aaf9f11f9937e93fe9907e6c2320a10a9f269 Author: Mans Rullgard Date: Tue May 28 10:09:47 2019 +0100 watchdog: gpio: add support for nowayout option Add support for the nowayout option in the gpio watchdog driver. Signed-off-by: Mans Rullgard Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/gpio_wdt.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 568521d058aaab18f01ac39d7a6ef00b75e5cc79 Merge: 6b3775479006 ede7c247abfa Author: Linus Torvalds Date: Mon Jul 8 10:36:07 2019 -0700 Merge branch 'core-rslib-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull Reed-Solomon library updates from Thomas Gleixner: "A cleanup and fixes series from Ferdinand Blomqvist who analyzed the original Reed-Solomon library from Phil Karn on which the kernel implementation is based on. This comes with a test module which verifies all the various corner cases for correctness" * 'core-rslib-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: rslib: Make some functions static rslib: Fix remaining decoder flaws rslib: Update documentation rslib: Fix handling of of caller provided syndrome rslib: decode_rs: Code cleanup rslib: decode_rs: Fix length parameter check rslib: Fix decoding of shortened codes rslib: Add tests for the encoder and decoder commit 6b37754790067c9b25cf75fbf72b69edd6d7fffd Merge: 1758feddb0f9 d5f34153e526 Author: Linus Torvalds Date: Mon Jul 8 10:34:39 2019 -0700 Merge branch 'core-debugobjects-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull debugobjects updates from Thomas Gleixner: "A set of updates for debugobjects: - A series of changes to make debugobjects more scalable by introducing per cpu pools and reducing the number of lock acquisitions - debugfs cleanup" * 'core-debugobjects-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: debugobjects: Move printk out of db->lock critical sections debugobjects: Less aggressive freeing of excess debug objects debugobjects: Reduce number of pool_lock acquisitions in fill_pool() debugobjects: Percpu pool lookahead freeing/allocation debugobjects: Add percpu free pools debugobjects: No need to check return value of debugfs_create() commit 89705e92700170888236555fe91b45e4c1bb0985 Author: Danit Goldberg Date: Fri Jul 5 19:21:57 2019 +0300 IB/mlx5: Report correctly tag matching rendezvous capability Userspace expects the IB_TM_CAP_RC bit to indicate that the device supports RC transport tag matching with rendezvous offload. However the firmware splits this into two capabilities for eager and rendezvous tag matching. Only if the FW supports both modes should userspace be told the tag matching capability is available. Cc: # 4.13 Fixes: eb761894351d ("IB/mlx5: Fill XRQ capabilities") Signed-off-by: Danit Goldberg Reviewed-by: Yishai Hadas Reviewed-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/main.c | 8 ++++++-- include/rdma/ib_verbs.h | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) commit a3a400da206bd0cf426571633da51547d44f4f42 Author: Mauro Carvalho Chehab Date: Fri Jun 28 09:30:28 2019 -0300 docs: infiniband: add it to the driver-api bookset While this contains some uAPI stuff, it was intended to be read by a kernel doc. So, let's not move it to a different dir, but, instead, just add it to the driver-api bookset. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jason Gunthorpe Documentation/index.rst | 1 + Documentation/infiniband/index.rst | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit bacfa94b08027b9f66ede7044972e3b066766b3e Author: Richard Weinberger Date: Tue May 14 22:31:08 2019 +0200 ubifs: Correctly use tnc_next() in search_dh_cookie() Commit c877154d307f fixed an uninitialized variable and optimized the function to not call tnc_next() in the first iteration of the loop. While this seemed perfectly legit and wise, it turned out to be illegal. If the lookup function does not find an exact match it will rewind the cursor by 1. The rewinded cursor will not match the name hash we are looking for and this results in a spurious -ENOENT. So we need to move to the next entry in case of an non-exact match, but not if the match was exact. While we are here, update the documentation to avoid further confusion. Cc: Hyunchul Lee Cc: Geert Uytterhoeven Fixes: c877154d307f ("ubifs: Fix uninitialized variable in search_dh_cookie()") Fixes: 781f675e2d7e ("ubifs: Fix unlink code wrt. double hash lookups") Signed-off-by: Richard Weinberger fs/ubifs/tnc.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 1758feddb0f9751debdc865fefde94b45907c948 Merge: 278ecbf027c3 499723d12063 Author: Linus Torvalds Date: Mon Jul 8 10:06:12 2019 -0700 Merge tag 's390-5.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 updates from Vasily Gorbik: - Improve stop_machine wait logic: replace cpu_relax_yield call in generic stop_machine function with a weak stop_machine_yield function. This is overridden on s390, which yields the current cpu to the neighbouring cpu after a couple of retries, instead of blindly giving up the cpu to the hipervisor. This significantly improves stop_machine performance on s390 in overcommitted scenarios. This includes common code changes which have been Acked by Peter Zijlstra and Thomas Gleixner. - Improve jump label transformation speed: transform jump labels without using stop_machine. - Refactoring of the vfio-ccw cp handling, simplifying the code and avoiding unneeded allocating/copying. - Various vfio-ccw fixes (ccw translation, state machine). - Add support for vfio-ap queue interrupt control in the guest. This includes s390 kvm changes which have been Acked by Christian Borntraeger. - Add protected virtualization support for virtio-ccw. - Enforce both CONFIG_SMP and CONFIG_HOTPLUG_CPU, which allows to remove some code which most likely isn't working at all, besides that s390 didn't even compile for !CONFIG_SMP. - Support for special flagged EP11 CPRBs for zcrypt. - Handle PCI devices with no support for new MIO instructions. - Avoid KASAN false positives in reworked stack unwinder. - Couple of fixes for the QDIO layer. - Convert s390 specific documentation to ReST format. - Let s390 crypto modules return -ENODEV instead of -EOPNOTSUPP if hardware is missing. This way our modules behave like most other modules and which is also what systemd's systemd-modules-load.service expects. - Replace defconfig with performance_defconfig, so there is one config file less to maintain. - Remove the SCLP call home device driver, which was never useful. - Cleanups all over the place. * tag 's390-5.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (83 commits) docs: s390: s390dbf: typos and formatting, update crash command docs: s390: unify and update s390dbf kdocs at debug.c docs: s390: restore important non-kdoc parts of s390dbf.rst vfio-ccw: Fix the conversion of Format-0 CCWs to Format-1 s390/pci: correctly handle MIO opt-out s390/pci: deal with devices that have no support for MIO instructions s390: ap: kvm: Enable PQAP/AQIC facility for the guest s390: ap: implement PAPQ AQIC interception in kernel vfio: ap: register IOMMU VFIO notifier s390: ap: kvm: add PQAP interception for AQIC s390/unwind: cleanup unused READ_ONCE_TASK_STACK s390/kasan: avoid false positives during stack unwind s390/qdio: don't touch the dsci in tiqdio_add_input_queues() s390/qdio: (re-)initialize tiqdio list entries s390/dasd: Fix a precision vs width bug in dasd_feature_list() s390/cio: introduce driver_override on the css bus vfio-ccw: make convert_ccw0_to_ccw1 static vfio-ccw: Remove copy_ccw_from_iova() vfio-ccw: Factor out the ccw0-to-ccw1 transition vfio-ccw: Copy CCW data outside length calculation ... commit d6d5f19e21d98c0607ff029e4e2e508d4cdd1d5a Author: Max Filippov Date: Sun May 12 20:28:25 2019 -0700 xtensa: abstract 'entry' and 'retw' in assembly code Provide abi_entry, abi_entry_default, abi_ret and abi_ret_default macros that allocate aligned stack frame in windowed and call0 ABIs. Provide XTENSA_SPILL_STACK_RESERVE macro that specifies required stack frame size when register spilling is involved. Replace all uses of 'entry' and 'retw' with the above macros. This makes most of the xtensa assembly code ready for XEA3 and call0 ABI. Signed-off-by: Max Filippov arch/xtensa/include/asm/asmmacro.h | 46 ++++++++++++++++++++++ arch/xtensa/kernel/coprocessor.S | 7 +++- arch/xtensa/kernel/entry.S | 11 +++--- arch/xtensa/kernel/mcount.S | 11 +++--- arch/xtensa/lib/checksum.S | 12 +++--- arch/xtensa/lib/memcopy.S | 38 +++++++++---------- arch/xtensa/lib/memset.S | 10 ++--- arch/xtensa/lib/strncpy_user.S | 16 ++++---- arch/xtensa/lib/strnlen_user.S | 14 +++---- arch/xtensa/lib/usercopy.S | 12 +++--- arch/xtensa/mm/misc.S | 78 +++++++++++++++++++------------------- 11 files changed, 153 insertions(+), 102 deletions(-) commit 278ecbf027c3c559deb225f0cf53a23b7672dacf Merge: dfd437a25792 69878ef47562 Author: Linus Torvalds Date: Mon Jul 8 10:00:58 2019 -0700 Merge tag 'm68k-for-v5.3-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k Pull m68k updates from Geert Uytterhoeven: - switch to using the generic remapping DMA allocator - defconfig updates * tag 'm68k-for-v5.3-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k: Implement arch_dma_prep_coherent() m68k: Use the generic dma coherent remap allocator m68k: defconfig: Update defconfigs for v5.2-rc1 commit dfd437a257924484b144ee750e60affc95562c6d Merge: 0ecfebd2b524 0c61efd322b7 Author: Linus Torvalds Date: Mon Jul 8 09:54:55 2019 -0700 Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 updates from Catalin Marinas: - arm64 support for syscall emulation via PTRACE_SYSEMU{,_SINGLESTEP} - Wire up VM_FLUSH_RESET_PERMS for arm64, allowing the core code to manage the permissions of executable vmalloc regions more strictly - Slight performance improvement by keeping softirqs enabled while touching the FPSIMD/SVE state (kernel_neon_begin/end) - Expose a couple of ARMv8.5 features to user (HWCAP): CondM (new XAFLAG and AXFLAG instructions for floating point comparison flags manipulation) and FRINT (rounding floating point numbers to integers) - Re-instate ARM64_PSEUDO_NMI support which was previously marked as BROKEN due to some bugs (now fixed) - Improve parking of stopped CPUs and implement an arm64-specific panic_smp_self_stop() to avoid warning on not being able to stop secondary CPUs during panic - perf: enable the ARM Statistical Profiling Extensions (SPE) on ACPI platforms - perf: DDR performance monitor support for iMX8QXP - cache_line_size() can now be set from DT or ACPI/PPTT if provided to cope with a system cache info not exposed via the CPUID registers - Avoid warning on hardware cache line size greater than ARCH_DMA_MINALIGN if the system is fully coherent - arm64 do_page_fault() and hugetlb cleanups - Refactor set_pte_at() to avoid redundant READ_ONCE(*ptep) - Ignore ACPI 5.1 FADTs reported as 5.0 (infer from the 'arm_boot_flags' introduced in 5.1) - CONFIG_RANDOMIZE_BASE now enabled in defconfig - Allow the selection of ARM64_MODULE_PLTS, currently only done via RANDOMIZE_BASE (and an erratum workaround), allowing modules to spill over into the vmalloc area - Make ZONE_DMA32 configurable * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (54 commits) perf: arm_spe: Enable ACPI/Platform automatic module loading arm_pmu: acpi: spe: Add initial MADT/SPE probing ACPI/PPTT: Add function to return ACPI 6.3 Identical tokens ACPI/PPTT: Modify node flag detection to find last IDENTICAL x86/entry: Simplify _TIF_SYSCALL_EMU handling arm64: rename dump_instr as dump_kernel_instr arm64/mm: Drop [PTE|PMD]_TYPE_FAULT arm64: Implement panic_smp_self_stop() arm64: Improve parking of stopped CPUs arm64: Expose FRINT capabilities to userspace arm64: Expose ARMv8.5 CondM capability to userspace arm64: defconfig: enable CONFIG_RANDOMIZE_BASE arm64: ARM64_MODULES_PLTS must depend on MODULES arm64: bpf: do not allocate executable memory arm64/kprobes: set VM_FLUSH_RESET_PERMS on kprobe instruction pages arm64/mm: wire up CONFIG_ARCH_HAS_SET_DIRECT_MAP arm64: module: create module allocations without exec permissions arm64: Allow user selection of ARM64_MODULE_PLTS acpi/arm64: ignore 5.1 FADTs that are reported as 5.0 arm64: Allow selecting Pseudo-NMI again ... commit 20893d9da7af01f9202fa78782a178004eab420d Merge: f10ff380fd7d b6142608e806 Author: Jason Gunthorpe Date: Mon Jul 8 13:48:55 2019 -0300 Merge branch 'vhca-tunnel' into rdma.git for-next Max Gurtovoy says: ==================== Those two patches introduce VHCA tunnel mechanism to DEVX interface needed for Bluefield SOC. See extensive commit messages for more information. ==================== Based on the mlx5-next branch from git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux for dependencies * branch 'vcha-tunnel': IB/mlx5: Implement VHCA tunnel mechanism in DEVX net/mlx5: Introduce VHCA tunnel device capability commit 686cbe9e5d88ad639bbe26d963e7d5dafa1c1c28 Author: Arnaldo Carvalho de Melo Date: Mon Jul 8 13:47:14 2019 -0300 tools arch x86: Sync asm/cpufeatures.h with the with the kernel To pick up the changes in: 6dbbf5ec9e1e ("x86/cpufeatures: Enumerate user wait instructions") b302e4b176d0 ("x86/cpufeatures: Enumerate the new AVX512 BFLOAT16 instructions") acec0ce081de ("x86/cpufeatures: Combine word 11 and 12 into a new scattered features word") cbb99c0f5887 ("x86/cpufeatures: Add FDP_EXCPTN_ONLY and ZERO_FCS_FDS") That don't affect anything in tools/. This silences this perf build warning: Warning: Kernel ABI header at 'tools/arch/x86/include/asm/cpufeatures.h' differs from latest version at 'arch/x86/include/asm/cpufeatures.h' diff -u tools/arch/x86/include/asm/cpufeatures.h arch/x86/include/asm/cpufeatures.h Cc: Aaron Lewis Cc: Adrian Hunter Cc: Borislav Petkov Cc: Fenghua Yu Cc: Jiri Olsa Cc: Namhyung Kim Cc: Thomas Gleixner Link: https://lkml.kernel.org/n/tip-y60wnyg2fuxi0hx7icruo9po@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/arch/x86/include/asm/cpufeatures.h | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) commit b6142608e8069dda26398e65b0a14eda6ca4282d Author: Max Gurtovoy Date: Mon Jul 1 21:14:02 2019 +0300 IB/mlx5: Implement VHCA tunnel mechanism in DEVX This mechanism will allow function-A to perform operations "on behalf" of function-B via tunnel object. Function-A will have privileges for creating and using this tunnel object. For example, in the device emulation feature presented in Bluefield-1 SoC, using device emulation capability, one can present NVMe function to the host OS. Since the NVMe function doesn't have a normal command interface to the HCA HW, here is a need to create a channel that will be able to issue commands "on behalf" of this function. This channel is the VHCA_TUNNEL general object. The emulation software will create this tunnel for every managed function and issue commands via devx general cmd interface using the appropriate tunnel ID. When devX context will receive a command with non-zero vhca_tunnel_id, it will pass the command as-is down to the HCA. All the validation, security and resource tracking of the commands and the created tunneled objects is in the responsibility of the HCA FW. When a VHCA_TUNNEL object destroyed, the device will issue an internal FLR (function level reset) to the emulated function associated with this tunnel. This will destroy all the created resources using the tunnel mechanism. Signed-off-by: Max Gurtovoy Reviewed-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/devx.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) commit e3b22a65348ab54261a98b6bc90ecf8977ff8ebf Merge: 05c78468a60f 552a031ba12a Author: Arnaldo Carvalho de Melo Date: Mon Jul 8 13:06:57 2019 -0300 Merge remote-tracking branch 'tip/perf/core' into perf/urgent To pick up fixes. Signed-off-by: Arnaldo Carvalho de Melo commit 552a031ba12a4236be107a5b082a399237758a5d Merge: f584dd32edc5 0ecfebd2b524 Author: Ingo Molnar Date: Mon Jul 8 18:04:41 2019 +0200 Merge tag 'v5.2' into perf/core, to pick up fixes Signed-off-by: Ingo Molnar commit f10ff380fd7dfba4a36d40f8dd00fe17da8a1a10 Author: Jason Gunthorpe Date: Mon Jul 8 12:17:48 2019 -0300 RDMA/rvt: Do not use a kernel header in the ABI rvt was using ib_sge as part of it's ABI, which is not allowed. Introduce a new struct with the same layout and use it instead. Fixes: dabac6e460ce ("IB/hfi1: Move receive work queue struct into uapi directory") Reported-by: Stephen Rothwell Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rdmavt/qp.c | 32 +++++++++++++++++++++++++++----- include/uapi/rdma/rvt-abi.h | 9 +++++++-- 2 files changed, 34 insertions(+), 7 deletions(-) commit 1e0cf16cdad1ba53e9eeee8746fe57de42f20c97 Author: Marc Zyngier Date: Fri Jul 5 23:35:56 2019 +0100 KVM: arm/arm64: Initialise host's MPIDRs by reading the actual register As part of setting up the host context, we populate its MPIDR by using cpu_logical_map(). It turns out that contrary to arm64, cpu_logical_map() on 32bit ARM doesn't return the *full* MPIDR, but a truncated version. This leaves the host MPIDR slightly corrupted after the first run of a VM, since we won't correctly restore the MPIDR on exit. Oops. Since we cannot trust cpu_logical_map(), let's adopt a different strategy. We move the initialization of the host CPU context as part of the per-CPU initialization (which, in retrospect, makes a lot of sense), and directly read the MPIDR from the HW. This is guaranteed to work on both arm and arm64. Reported-by: Andre Przywara Tested-by: Andre Przywara Fixes: 32f139551954 ("arm/arm64: KVM: Statically configure the host's view of MPIDR") Signed-off-by: Marc Zyngier arch/arm/include/asm/kvm_host.h | 6 ++---- arch/arm64/include/asm/kvm_host.h | 7 +++---- virt/kvm/arm/arm.c | 3 ++- 3 files changed, 7 insertions(+), 9 deletions(-) commit 8fc9f8bedf1bdaea48382ae2e3dd558e2b939cee Author: Quentin Monnet Date: Mon Jul 8 14:05:46 2019 +0100 tools: bpftool: add completion for bpftool prog "loadall" Bash completion for proposing the "loadall" subcommand is missing. Let's add it to the completion script. Add a specific case to propose "load" and "loadall" for completing: $ bpftool prog load ^ cursor is here Otherwise, completion considers that $command is in load|loadall and starts making related completions (file or directory names, as the number of words on the command line is below 6), when the only suggested keywords should be "load" and "loadall" until one has been picked and a space entered after that to move to the next word. Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski Signed-off-by: Daniel Borkmann tools/bpf/bpftool/bash-completion/bpftool | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit bef8e2639242e7f7214f1ab3b37ace1415a4f750 Author: Arnd Bergmann Date: Mon Jul 8 14:57:21 2019 +0200 bpf: avoid unused variable warning in tcp_bpf_rtt() When CONFIG_BPF is disabled, we get a warning for an unused variable: In file included from drivers/target/target_core_device.c:26: include/net/tcp.h:2226:19: error: unused variable 'tp' [-Werror,-Wunused-variable] struct tcp_sock *tp = tcp_sk(sk); The variable is only used in one place, so it can be replaced with its value there to avoid the warning. Fixes: 23729ff23186 ("bpf: add BPF_CGROUP_SOCK_OPS callback that is executed on every RTT") Signed-off-by: Arnd Bergmann Acked-by: Soheil Hassas Yeganeh Signed-off-by: Daniel Borkmann include/net/tcp.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 6705fea0c799a4efb9a9ce2968a2f7a570e33dc2 Author: YueHaibing Date: Wed Jul 3 16:26:30 2019 +0800 bpf: cgroup: Fix build error without CONFIG_NET If CONFIG_NET is not set and CONFIG_CGROUP_BPF=y, gcc building fails: kernel/bpf/cgroup.o: In function `cg_sockopt_func_proto': cgroup.c:(.text+0x237e): undefined reference to `bpf_sk_storage_get_proto' cgroup.c:(.text+0x2394): undefined reference to `bpf_sk_storage_delete_proto' kernel/bpf/cgroup.o: In function `__cgroup_bpf_run_filter_getsockopt': (.text+0x2a1f): undefined reference to `lock_sock_nested' (.text+0x2ca2): undefined reference to `release_sock' kernel/bpf/cgroup.o: In function `__cgroup_bpf_run_filter_setsockopt': (.text+0x3006): undefined reference to `lock_sock_nested' (.text+0x32bb): undefined reference to `release_sock' Reported-by: Hulk Robot Suggested-by: Stanislav Fomichev Fixes: 0d01da6afc54 ("bpf: implement getsockopt and setsockopt hooks") Signed-off-by: YueHaibing Acked-by: Yonghong Song Signed-off-by: Daniel Borkmann kernel/bpf/cgroup.c | 4 ++++ 1 file changed, 4 insertions(+) commit 4c7d6dcd364843e408a60952ba914bb72bafc6cc Author: Jason Gunthorpe Date: Mon Jul 8 11:36:32 2019 -0300 RDMA/siw: Fix DEFINE_PER_CPU compilation when ARCH_NEEDS_WEAK_PER_CPU The initializer for the variable cannot be inside the macro (and zero initialization isn't needed anyhow). include/linux/percpu-defs.h:92:33: warning: '__pcpu_unique_use_cnt' initialized and declared 'extern' extern __PCPU_DUMMY_ATTRS char __pcpu_unique_##name; \ ^~~~~~~~~~~~~~ include/linux/percpu-defs.h:115:2: note: in expansion of macro 'DEFINE_PER_CPU_SECTION' DEFINE_PER_CPU_SECTION(type, name, "") ^~~~~~~~~~~~~~~~~~~~~~ drivers/infiniband/sw/siw/siw_main.c:129:8: note: in expansion of macro 'DEFINE_PER_CPU' static DEFINE_PER_CPU(atomic_t, use_cnt = ATOMIC_INIT(0)); ^~~~~~~~~~~~~~ Also the rules for PER_CPU require the variable names to be globally unique, so prefix them with siw_ Fixes: b9be6f18cf9e ("rdma/siw: transmit path") Fixes: bdcf26bf9b3a ("rdma/siw: network and RDMA core interface") Reported-by: Stephen Rothwell Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/siw/siw_main.c | 8 ++++---- drivers/infiniband/sw/siw/siw_qp_tx.c | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) commit 06ec0e2c490afd2f870d89c59200540fd9acde95 Author: Andrii Nakryiko Date: Fri Jul 5 21:44:20 2019 -0700 selftests/bpf: fix test_attach_probe map definition ef99b02b23ef ("libbpf: capture value in BTF type info for BTF-defined map defs") changed BTF-defined maps syntax, while independently merged 1e8611bbdfc9 ("selftests/bpf: add kprobe/uprobe selftests") added new test using outdated syntax of maps. This patch fixes this test after corresponding patch sets were merged. Fixes: ef99b02b23ef ("libbpf: capture value in BTF type info for BTF-defined map defs") Fixes: 1e8611bbdfc9 ("selftests/bpf: add kprobe/uprobe selftests") Signed-off-by: Andrii Nakryiko Acked-by: Yonghong Song Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/progs/test_attach_probe.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 8bfec4f325e12eec79b4477909ee48db83ae6b7e Merge: d2850ce0bdd7 76d950773cd2 Author: Daniel Borkmann Date: Mon Jul 8 16:22:56 2019 +0200 Merge branch 'bpf-sockaddr-wide-store' Stanislav Fomichev says: ==================== Clang can generate 8-byte stores for user_ip6 & msg_src_ip6, let's support that on the verifier side. v3: * fix comments spelling an -> and (Andrii Nakryiko) v2: * Add simple cover letter (Yonghong Song) * Update comments (Yonghong Song) * Remove [4] selftests (Yonghong Song) ==================== Signed-off-by: Daniel Borkmann commit 76d950773cd2a365f492ce973429ae629d58131c Author: Stanislav Fomichev Date: Mon Jul 1 10:38:41 2019 -0700 selftests/bpf: add verifier tests for wide stores Make sure that wide stores are allowed at proper (aligned) addresses. Note that user_ip6 is naturally aligned on 8-byte boundary, so correct addresses are user_ip6[0] and user_ip6[2]. msg_src_ip6 is, however, aligned on a 4-byte bondary, so only msg_src_ip6[1] can be wide-stored. Cc: Andrii Nakryiko Cc: Yonghong Song Acked-by: Andrii Nakryiko Signed-off-by: Stanislav Fomichev Acked-by: Yonghong Song Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/test_verifier.c | 17 +++++++++-- tools/testing/selftests/bpf/verifier/wide_store.c | 36 +++++++++++++++++++++++ 2 files changed, 50 insertions(+), 3 deletions(-) commit 4cfacbe6df972db4081dd76feb7871fce996118d Author: Stanislav Fomichev Date: Mon Jul 1 10:38:40 2019 -0700 bpf: sync bpf.h to tools/ Sync user_ip6 & msg_src_ip6 comments. Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann tools/include/uapi/linux/bpf.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 600c70bad6594cb124c641ed05355ca134650ea4 Author: Stanislav Fomichev Date: Mon Jul 1 10:38:39 2019 -0700 bpf: allow wide (u64) aligned stores for some fields of bpf_sock_addr Since commit cd17d7770578 ("bpf/tools: sync bpf.h") clang decided that it can do a single u64 store into user_ip6[2] instead of two separate u32 ones: # 17: (18) r2 = 0x100000000000000 # ; ctx->user_ip6[2] = bpf_htonl(DST_REWRITE_IP6_2); # 19: (7b) *(u64 *)(r1 +16) = r2 # invalid bpf_context access off=16 size=8 >From the compiler point of view it does look like a correct thing to do, so let's support it on the kernel side. Credit to Andrii Nakryiko for a proper implementation of bpf_ctx_wide_store_ok. Cc: Andrii Nakryiko Cc: Yonghong Song Fixes: cd17d7770578 ("bpf/tools: sync bpf.h") Reported-by: kernel test robot Acked-by: Yonghong Song Acked-by: Andrii Nakryiko Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann include/linux/filter.h | 6 ++++++ include/uapi/linux/bpf.h | 6 +++--- net/core/filter.c | 22 ++++++++++++++-------- 3 files changed, 23 insertions(+), 11 deletions(-) commit d6fc9fcbaa655cff2d2be05e16867d1918f78b85 Author: Masahiro Yamada Date: Mon Jul 1 09:58:40 2019 +0900 kbuild: compile-test exported headers to ensure they are self-contained Multiple people have suggested compile-testing UAPI headers to ensure they can be really included from user-space. "make headers_check" is obviously not enough to catch bugs, and we often leak unresolved references to user-space. Use the new header-test-y syntax to implement it. Please note exported headers are compile-tested with a completely different set of compiler flags. The header search path is set to $(objtree)/usr/include since exported headers should not include unexported ones. We use -std=gnu89 for the kernel space since the kernel code highly depends on GNU extensions. On the other hand, UAPI headers should be written in more standardized C, so they are compiled with -std=c90. This will emit errors if C++ style comments, the keyword 'inline', etc. are used. Please use C style comments (/* ... */), '__inline__', etc. in UAPI headers. There is additional compiler requirement to enable this test because many of UAPI headers include , , , etc. directly or indirectly. You cannot use kernel.org pre-built toolchains [1] since they lack . I reused CONFIG_CC_CAN_LINK to check the system header availability. The intention is slightly different, but a compiler that can link userspace programs provide system headers. For now, a lot of headers need to be excluded because they cannot be compiled standalone, but this is a good start point. [1] https://mirrors.edge.kernel.org/pub/tools/crosstool/index.html Signed-off-by: Masahiro Yamada Reviewed-by: Sam Ravnborg Makefile | 2 +- init/Kconfig | 10 ++++ usr/.gitignore | 1 - usr/Makefile | 2 + usr/include/.gitignore | 3 ++ usr/include/Makefile | 132 +++++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 148 insertions(+), 2 deletions(-) commit b7fbd3e55c0f842551445d6dbe3dd92ab155b2e8 Author: Hoan Nguyen An Date: Thu May 23 18:29:38 2019 +0900 watchdog: renesas_wdt: Use 'dev' instead of dereferencing it repeatedly Add helper variable dev = &pdev->dev Signed-off-by: Hoan Nguyen An Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/renesas_wdt.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit dfc01e2c83776f4bcadf4ec0a5cd8407904cd9b3 Author: Clément Péron Date: Thu May 23 17:10:47 2019 +0200 dt-bindings: watchdog: add Allwinner H6 watchdog Allwinner H6 has a similar watchdog as the A64 which is already a compatible of the A31. This commit add the H6 compatible. Signed-off-by: Clément Péron Reviewed-by: Rob Herring Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt | 1 + 1 file changed, 1 insertion(+) commit 9b3461188e86f19113f57a71c8873fab6ca95f36 Author: Paul Cercueil Date: Fri Jun 7 18:24:27 2019 +0200 watchdog: jz4740: Avoid starting watchdog in set_timeout Previously the jz4740_wdt_set_timeout() function was starting the timer unconditionally, even if it was stopped when that function was entered. Now, the timer will be restarted only if it was already running before this function is called. Signed-off-by: Paul Cercueil Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/jz4740_wdt.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit df04cce3b8f9124fbb201edde84b591fd38d2169 Author: Paul Cercueil Date: Fri Jun 7 18:24:26 2019 +0200 watchdog: jz4740: Use register names from Use the macros from instead of declaring our own. Signed-off-by: Paul Cercueil Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/jz4740_wdt.c | 39 ++++++++++++++++----------------------- 1 file changed, 16 insertions(+), 23 deletions(-) commit f1bb45b93345ac7e1eb237e54093520c42aa237d Author: Jerry Hoemann Date: Fri May 17 14:59:43 2019 -0600 watchdog/hpwdt: Reflect changes Bump driver number to reflect recent changes. Signed-off-by: Jerry Hoemann Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/hpwdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f213fcf078c19d2b1b0876eb935cab20e311743e Author: Jerry Hoemann Date: Fri May 17 14:59:42 2019 -0600 watchdog/hpwdt: Update documentation Update documentation to explain new module parameter kdumptimeout. Signed-off-by: Jerry Hoemann Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck Documentation/watchdog/hpwdt.txt | 4 ++++ 1 file changed, 4 insertions(+) commit be3d7f7cb3ac2dd0b4dcb686d5a69519c35ef3a5 Author: Jerry Hoemann Date: Fri May 17 14:59:41 2019 -0600 watchdog/hpwdt: Add module parameter kdumptimeout. Instead of unconditionally stopping the watchdog timer after receipt of a pretimeout NMI, reprogram the timeout based upon module parameter kdumptimeout. The provides a more flexible override than the depricated allow_kdump. Signed-off-by: Jerry Hoemann Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/hpwdt.c | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) commit bb721d6b9eed631eed5d22bb8dfbb0c0717a67aa Author: Jerry Hoemann Date: Fri May 17 14:59:40 2019 -0600 watchdog/hpwdt: Have core ping watchdog. Instead of stopping the hw timer during probe, have the core update the timer if the timer is already running. Signed-off-by: Jerry Hoemann Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/hpwdt.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit c22d8e38e475c3a9fcc5923f98ac8cfdee8b1ad7 Author: Jerry Hoemann Date: Fri May 17 14:59:39 2019 -0600 watchdog/hpwdt: Advertize max_hw_heartbeat_ms Set max_hw_heartbeat_ms instead of max_timeout so that user client can set timeout range in excess of what the underlying hardware supports. Signed-off-by: Jerry Hoemann Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/hpwdt.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 48b32199f97ad2ac23ef4a5b64f2d1bc0aec444f Author: Jerry Hoemann Date: Fri May 17 14:59:38 2019 -0600 watchdog/hpwdt: Stop hpwdt on unregister. Have the WD core stop the watchdog on unregister instead of explicitly calling hpwdt_stop() in hpwdt_exit(). Signed-off-by: Jerry Hoemann Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/hpwdt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 215e06f0d18d5d653d6ea269e4dfc684854d48bf Author: Stefan Wahren Date: Wed May 15 19:14:18 2019 +0200 watchdog: bcm2835_wdt: Fix module autoload The commit 5e6acc3e678e ("bcm2835-pm: Move bcm2835-watchdog's DT probe to an MFD.") broke module autoloading on Raspberry Pi. So add a module alias this fix this. Signed-off-by: Stefan Wahren Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/bcm2835_wdt.c | 1 + 1 file changed, 1 insertion(+) commit 8632944841d41a36d77dd1fa88d4201b5291100f Author: Eugen Hristev Date: Wed May 8 14:15:03 2019 +0000 watchdog: sama5d4: fix WDD value to be always set to max WDD value must be always set to max (0xFFF) otherwise the hardware block will reset the board on the first ping of the watchdog. Signed-off-by: Eugen Hristev Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/sama5d4_wdt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 93f1d3e4b59cf2e7ef31eaf1131480897b040e97 Author: Arnd Bergmann Date: Mon Jul 8 14:42:51 2019 +0200 remoteproc: stm32: fix building without ARM SMCC When compile testing this driver without SMCC support enabled, we get a link error: drivers/remoteproc/stm32_rproc.o: In function `stm32_rproc_start': stm32_rproc.c:(.text+0x776): undefined reference to `__arm_smccc_smc' drivers/remoteproc/stm32_rproc.o: In function `stm32_rproc_stop': stm32_rproc.c:(.text+0x92c): undefined reference to `__arm_smccc_smc' Make the actual call to arm_smccc_smc conditional on the Kconfig symbol controlling its implementation. Fixes: 13140de09cc2 ("remoteproc: stm32: add an ST stm32_rproc driver") Signed-off-by: Arnd Bergmann Signed-off-by: Bjorn Andersson drivers/remoteproc/stm32_rproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 990dee3aa45690217e8d83e7704cf07b2f3d9821 Author: james qian wang (Arm Technology China) Date: Mon Jul 8 08:00:22 2019 +0100 drm/komeda: Computing image enhancer internally Enable image enhancer when the input data flow is 2x+ upscaling. Signed-off-by: james qian wang (Arm Technology China) Signed-off-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20190708070000.4945-1-james.qian.wang@arm.com drivers/gpu/drm/arm/display/komeda/komeda_kms.h | 7 ++----- drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c | 4 ++++ drivers/gpu/drm/arm/display/komeda/komeda_plane.c | 5 ----- 3 files changed, 6 insertions(+), 10 deletions(-) commit 1930c11204b1d83549a6f5f32500b35a4b909dbb Author: james qian wang (Arm Technology China) Date: Mon Jul 8 07:59:45 2019 +0100 drm/komeda: Computing layer_split internally For layer_split no need user to enable/disable it, but compute it in komeda internally, komeda will enable it if the scaling exceed the acceptable range of scaler. Signed-off-by: james qian wang (Arm Technology China) Signed-off-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20190708065923.4887-1-james.qian.wang@arm.com drivers/gpu/drm/arm/display/komeda/komeda_pipeline.h | 3 ++- drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c | 11 ++++++++++- drivers/gpu/drm/arm/display/komeda/komeda_plane.c | 3 +-- drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c | 10 +--------- 4 files changed, 14 insertions(+), 13 deletions(-) commit b02f6a2ef0a14af5c19780521370673f55c1476d Author: Rajat Jain Date: Thu Jun 27 20:34:13 2019 -0700 platform/x86: intel_pmc_core: Attach using APCI HID "INT33A1" Most modern platforms already have the ACPI device "INT33A1" that could be used to attach to the driver. Switch the driver to using that and thus make the intel_pmc_core.c a pure platform_driver. Some of the legacy platforms though, may still not have this ACPI device in their ACPI tables. Thus for such platforms, move the code to manually instantiate a platform_device into a new file of its own. This would instantiate the intel_pmc_core platform device and thus attach to the driver, if the ACPI device for the same ("INT33A1") is not present in a system where it should be. This was discussed here: https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1966991.html Signed-off-by: Rajat Jain [andy: renamed to intel_pmc_core_pltdrv.c to be in align with other drivers] Signed-off-by: Andy Shevchenko drivers/platform/x86/Makefile | 2 +- drivers/platform/x86/intel_pmc_core.c | 40 ++++-------------- drivers/platform/x86/intel_pmc_core_pltdrv.c | 62 ++++++++++++++++++++++++++++ 3 files changed, 71 insertions(+), 33 deletions(-) commit 75c5bf97ed2fec43f64c91b9e33a6cbd20c23cf9 Author: Daniel Vetter Date: Fri Jul 5 14:10:06 2019 +0200 MAINTAINERS: maintain drm/arm drivers in drm-misc for now From discussions with Liviu it sounded like the komeda team would benefit a bit from more cross-review with other drivers. To make sure komeda is aligned with how similar problems are solved in other drivers (in the end everyone ends up with similar ideas on how to solve various display engine design issues). An option would be to use drm-misc as an incubator for a few kernel releases, at least until the big design items have been tackled: Aside from the four kms properties already landed that we need to take out again there's also a pile of new ones proposed already for komeda. drm-misc seems to work fairly well at encouraging these kind of cross-driver reviews and working on cross-driver infrastructure in drm core. Later on we can move all the drivers out to a dedicated arm tree again (if that's desired). Of coures that would mean Lowry and James need drm-misc commit rights (all other arm contributors have it already I think). Cc: Lowry Li (Arm Technology China) Cc: James Qian Wang (Arm Technology China) Cc: Liviu Dudau Cc: Mali DP Maintainers Cc: Brian Starkey Cc: Dave Airlie Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Signed-off-by: Daniel Vetter Signed-off-by: Daniel Vetter Acked-by: Maxime Ripard Acked-by: James Qian Wang (Arm Technology China) Signed-off-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20190705121006.26085-5-daniel.vetter@ffwll.ch MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c945623c05c34814c655a0c87155dca81d7e7146 Author: Daniel Vetter Date: Fri Jul 5 14:10:05 2019 +0200 drm/komeda: Remove layer_split property Properties are uapi like anything else, with all the usual rules regarding review, testcases, open source userspace ... Furthermore driver-private kms properties are highly discouraged, over the past few years we've realized we need to make a serious effort at better standardizing this stuff. Again this probably needs multiple pieces to solve this properly: - Instead of expecting userspace to compute this (and duplicating modeset code), the kernel driver should compute when it's necessary to enable layer_split mode to make a configuration possible. I.e. in komeda_plane_atomic_check() first try komeda_build_layer_data_flow() and if that fails, try komeda_build_layer_split_data_flow(), and set dflow.en_split accordingly. Assuming I understand somewhat correctly what this does. - If this is needed for validation then you want a debugfs file to force this one way or the other, or alternatively use ->atomic_print_state to dump such hidden driver-private state. Depends upon how you do your validation ofc. Fixes: a407a6509393 ("drm/komeda: Add layer split support") Cc: Lowry Li (Arm Technology China) Cc: James Qian Wang (Arm Technology China) Cc: Liviu Dudau Cc: Mali DP Maintainers Cc: Brian Starkey Signed-off-by: Daniel Vetter Signed-off-by: Daniel Vetter Signed-off-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20190705121006.26085-4-daniel.vetter@ffwll.ch drivers/gpu/drm/arm/display/komeda/komeda_kms.h | 3 -- drivers/gpu/drm/arm/display/komeda/komeda_plane.c | 61 ----------------------- 2 files changed, 64 deletions(-) commit a76f612c1de8f82b1712e78e73d223f677f8254e Author: Daniel Vetter Date: Fri Jul 5 14:10:04 2019 +0200 drm/komeda: remove img_enhancement property Properties are uapi like anything else, with all the usual rules regarding review, testcases, open source userspace ... Furthermore driver-private kms properties are highly discouraged, over the past few years we've realized we need to make a serious effort at better standardizing this stuff. Again this probably needs multiple pieces to solve this properly: - Instead of expecting userspace to compute this (and duplicating modeset code), the kernel driver should compute when it's possible to enable this better up/downscale mode (assuming I understood Liviu correctly on what this does) automatically. - If this is needed for validation then you want a debugfs file to force this one way or the other, or alternatively use ->atomic_print_state to dump such hidden driver-private state. Depends upon how you do your validation ofc. Fixes: 42b6f118f6d1 ("drm/komeda: Add image enhancement support") Cc: Lowry Li (Arm Technology China) Cc: James Qian Wang (Arm Technology China) Cc: Liviu Dudau Cc: Mali DP Maintainers Cc: Brian Starkey Signed-off-by: Daniel Vetter Signed-off-by: Daniel Vetter Signed-off-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20190705121006.26085-3-daniel.vetter@ffwll.ch drivers/gpu/drm/arm/display/komeda/komeda_kms.h | 2 -- drivers/gpu/drm/arm/display/komeda/komeda_plane.c | 19 ++----------------- 2 files changed, 2 insertions(+), 19 deletions(-) commit 8aa0625f48559861b17606cf73fb24bd9f479303 Author: Daniel Vetter Date: Fri Jul 5 14:10:03 2019 +0200 drm/komeda: remove slave_planes property Properties are uapi like anything else, with all the usual rules regarding review, testcases, open source userspace ... Furthermore driver-private kms properties are highly discouraged, over the past few years we've realized we need to make a serious effort at better standardizing this stuff. Again this probably needs multiple pieces to solve this properly: - To make plane configuration less surprising to userspace you propably need to virtualize planes, and reorder which logical plane you map to which physical one dynamically. Instead of exposing a komeda-specific limitation to userspace and expecting them to dtrt. I think msm and rcar-du do that already (and others), if you need people to chat with or example code. - If this is needed for validation, again ->atomic_print_state and the infrastructure around that is your friend. Fixes: 3b9dfa4ef28c ("drm/komeda: Add slave pipeline support") Cc: Lowry Li (Arm Technology China) Cc: James Qian Wang (Arm Technology China) Cc: Liviu Dudau Cc: Mali DP Maintainers Cc: Brian Starkey Signed-off-by: Daniel Vetter Signed-off-by: Daniel Vetter Signed-off-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20190705121006.26085-2-daniel.vetter@ffwll.ch drivers/gpu/drm/arm/display/komeda/komeda_crtc.c | 24 ------------------------ drivers/gpu/drm/arm/display/komeda/komeda_kms.h | 3 --- 2 files changed, 27 deletions(-) commit 505f6cff880e33a9725bc8337bcb2941c6dd43a6 Author: Daniel Vetter Date: Fri Jul 5 14:10:02 2019 +0200 drm/komeda: Remove clock ratio property Properties are uapi like anything else, with all the usual rules regarding review, testcases, open source userspace ... Furthermore driver-private kms properties are highly discouraged, over the past few years we've realized we need to make a serious effort at better standardizing this stuff. From the discussion with Liviu the solution for these here needs multiple pieces: - For being able to reliably read the memory clock we need a DT property, plus maybe DT override snippets to fix it if it's wrong. - For exposing plane limitations to userspace there's TEST_ONLY. There is a bit a gap in telling userspace better that scaling doesn't work due to limits (atm a good strategy is to retry again without scaling when adding a plane didn't work the first time around). But that needs a more generic solution, not exposing something extremely komeda specific. - If this is needed by validation tools, you can still expose it in debugfs. We have an entire nice infrastructure for debug printing of kms objects already, see the various atomic_print_state callbacks and infrastructure around them. Fixes: 1f7f9ab7900e ("drm/komeda: Add engine clock requirement check for the downscaling") Cc: Lowry Li (Arm Technology China) Cc: James Qian Wang (Arm Technology China) Cc: Liviu Dudau Cc: Mali DP Maintainers Cc: Brian Starkey Signed-off-by: Daniel Vetter Signed-off-by: Daniel Vetter Signed-off-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20190705121006.26085-1-daniel.vetter@ffwll.ch drivers/gpu/drm/arm/display/komeda/komeda_crtc.c | 39 ------------------------ drivers/gpu/drm/arm/display/komeda/komeda_kms.h | 3 -- 2 files changed, 42 deletions(-) commit d2850ce0bdd772a85043b1f07af99205b96e6e2a Merge: c3ec002e633e cd07a95f9b4d Author: Daniel Borkmann Date: Mon Jul 8 15:35:44 2019 +0200 Merge branch 'bpf-libbpf-perf-rb-api' Andrii Nakryiko says: ==================== This patchset adds a high-level API for setting up and polling perf buffers associated with BPF_MAP_TYPE_PERF_EVENT_ARRAY map. Details of APIs are described in corresponding commit. Patch #1 adds a set of APIs to set up and work with perf buffer. Patch #2 enhances libbpf to support auto-setting PERF_EVENT_ARRAY map size. Patch #3 adds test. Patch #4 converts bpftool map event_pipe to new API. Patch #5 updates README to mention perf_buffer_ prefix. v6->v7: - __x64_ syscall prefix (Yonghong); v5->v6: - fix C99 for loop variable initialization usage (Yonghong); v4->v5: - initialize perf_buffer_raw_opts in bpftool map event_pipe (Jakub); - add perf_buffer_ to README; v3->v4: - fixed bpftool event_pipe cmd error handling (Jakub); v2->v3: - added perf_buffer__new_raw for more low-level control; - converted bpftool map event_pipe to new API (Daniel); - fixed bug with error handling in create_maps (Song); v1->v2: - add auto-sizing of PERF_EVENT_ARRAY maps; ==================== Signed-off-by: Daniel Borkmann commit cd07a95f9b4df63ac130b4ee0cf87beca12412ca Author: Andrii Nakryiko Date: Sat Jul 6 11:06:28 2019 -0700 libbpf: add perf_buffer_ prefix to README perf_buffer "object" is part of libbpf API now, add it to the list of libbpf function prefixes. Suggested-by: Daniel Borkman Signed-off-by: Andrii Nakryiko Acked-by: Yonghong Song Signed-off-by: Daniel Borkmann tools/lib/bpf/README.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9b190f185d2f6d65b4c16074db0c4eafa32c7ae1 Author: Andrii Nakryiko Date: Sat Jul 6 11:06:27 2019 -0700 tools/bpftool: switch map event_pipe to libbpf's perf_buffer Switch event_pipe implementation to rely on new libbpf perf buffer API (it's raw low-level variant). Signed-off-by: Andrii Nakryiko Acked-by: Jakub Kicinski Acked-by: Yonghong Song Signed-off-by: Daniel Borkmann tools/bpf/bpftool/map_perf_ring.c | 201 ++++++++++++-------------------------- 1 file changed, 64 insertions(+), 137 deletions(-) commit ee5cf82ce04a60d71b0dc219804f6cf1e6ba6d14 Author: Andrii Nakryiko Date: Sat Jul 6 11:06:26 2019 -0700 selftests/bpf: test perf buffer API Add test verifying perf buffer API functionality. Signed-off-by: Andrii Nakryiko Acked-by: Song Liu Acked-by: Yonghong Song Signed-off-by: Daniel Borkmann .../testing/selftests/bpf/prog_tests/perf_buffer.c | 100 +++++++++++++++++++++ .../testing/selftests/bpf/progs/test_perf_buffer.c | 25 ++++++ 2 files changed, 125 insertions(+) commit d7ff34d5fb5a2f6722786863c4afa79c51f8edf2 Author: Andrii Nakryiko Date: Sat Jul 6 11:06:25 2019 -0700 libbpf: auto-set PERF_EVENT_ARRAY size to number of CPUs For BPF_MAP_TYPE_PERF_EVENT_ARRAY typically correct size is number of possible CPUs. This is impossible to specify at compilation time. This change adds automatic setting of PERF_EVENT_ARRAY size to number of system CPUs, unless non-zero size is specified explicitly. This allows to adjust size for advanced specific cases, while providing convenient and logical defaults. Signed-off-by: Andrii Nakryiko Acked-by: Song Liu Acked-by: Yonghong Song Signed-off-by: Daniel Borkmann tools/lib/bpf/libbpf.c | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) commit fb84b8224655309e7d38f989e426b82a4543f115 Author: Andrii Nakryiko Date: Sat Jul 6 11:06:24 2019 -0700 libbpf: add perf buffer API BPF_MAP_TYPE_PERF_EVENT_ARRAY map is often used to send data from BPF program to user space for additional processing. libbpf already has very low-level API to read single CPU perf buffer, bpf_perf_event_read_simple(), but it's hard to use and requires a lot of code to set everything up. This patch adds perf_buffer abstraction on top of it, abstracting setting up and polling per-CPU logic into simple and convenient API, similar to what BCC provides. perf_buffer__new() sets up per-CPU ring buffers and updates corresponding BPF map entries. It accepts two user-provided callbacks: one for handling raw samples and one for get notifications of lost samples due to buffer overflow. perf_buffer__new_raw() is similar, but provides more control over how perf events are set up (by accepting user-provided perf_event_attr), how they are handled (perf_event_header pointer is passed directly to user-provided callback), and on which CPUs ring buffers are created (it's possible to provide a list of CPUs and corresponding map keys to update). This API allows advanced users fuller control. perf_buffer__poll() is used to fetch ring buffer data across all CPUs, utilizing epoll instance. perf_buffer__free() does corresponding clean up and unsets FDs from BPF map. All APIs are not thread-safe. User should ensure proper locking/coordination if used in multi-threaded set up. Signed-off-by: Andrii Nakryiko Acked-by: Yonghong Song Signed-off-by: Daniel Borkmann tools/lib/bpf/libbpf.c | 366 +++++++++++++++++++++++++++++++++++++++++++++++ tools/lib/bpf/libbpf.h | 49 +++++++ tools/lib/bpf/libbpf.map | 4 + 3 files changed, 419 insertions(+) commit e14651352a8e9158b58e9ac0c16f8db106b52158 Author: Wolfram Sang Date: Sat May 18 23:28:01 2019 +0200 watchdog: xen_wdt: drop warning after registering device The core will print out details now. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/xen_wdt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit f848a15347d9707b38430976e801dd442480b42a Author: Wolfram Sang Date: Sat May 18 23:28:00 2019 +0200 watchdog: wm831x_wdt: drop warning after registering device The core will print out details now. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/wm831x_wdt.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit c8c844f28b68d1b09be3993007b599b01886e6eb Author: Wolfram Sang Date: Sat May 18 23:27:59 2019 +0200 watchdog: ts4800_wdt: drop warning after registering device The core will print out details now. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/ts4800_wdt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit e290eb8c233923b099aa9e6ea717bf0b30871a78 Author: Wolfram Sang Date: Sat May 18 23:27:58 2019 +0200 watchdog: tegra_wdt: drop warning after registering device The core will print out details now. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/tegra_wdt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 913b187d12962fe8d9fa93c959f2f71ac16597ec Author: Wolfram Sang Date: Sat May 18 23:27:57 2019 +0200 watchdog: stmp3xxx_rtc_wdt: drop warning after registering device The core will print out details now. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/stmp3xxx_rtc_wdt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 71777442df8f63954d6f2029998afb565d307bc2 Author: Wolfram Sang Date: Sat May 18 23:27:56 2019 +0200 watchdog: stm32_iwdg: drop warning after registering device The core will print out details now. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/stm32_iwdg.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 7283b217aebda61d4ecfad799e2353fa5ce91e2e Author: Wolfram Sang Date: Sat May 18 23:27:55 2019 +0200 watchdog: st_lpc_wdt: drop warning after registering device The core will print out details now. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/st_lpc_wdt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit d311048eb0d211627dd8aab682e8412a1c0b7a02 Author: Wolfram Sang Date: Sat May 18 23:27:54 2019 +0200 watchdog: sprd_wdt: drop warning after registering device The core will print out details now. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/sprd_wdt.c | 1 - 1 file changed, 1 deletion(-) commit 199801cd7a50b14b15c5b87528fd5e86dc81404f Author: Wolfram Sang Date: Sat May 18 23:27:53 2019 +0200 watchdog: sp805_wdt: drop warning after registering device The core will print out details now. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/sp805_wdt.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit d41e3f4ee5849c2d4f2467863d08e276b7a8e70b Author: Wolfram Sang Date: Sat May 18 23:27:52 2019 +0200 watchdog: sp5100_tco: drop warning after registering device The core will print out details now. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/sp5100_tco.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 24b8eb74082de101852b1d570145fa2206ff74a1 Author: Wolfram Sang Date: Sat May 18 23:27:51 2019 +0200 watchdog: sama5d4_wdt: drop warning after registering device The core will print out details now. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/sama5d4_wdt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 386f465ae6dfd82aade41670461c151bb0a7131c Author: Wolfram Sang Date: Sat May 18 23:27:50 2019 +0200 watchdog: s3c2410_wdt: drop warning after registering device The core will print out details now. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/s3c2410_wdt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 2df87cfd8ea10f1c2d22b85ea9c39c355516ed76 Author: Wolfram Sang Date: Sat May 18 23:27:49 2019 +0200 watchdog: rave-sp-wdt: drop warning after registering device The core will print out details now. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/rave-sp-wdt.c | 1 - 1 file changed, 1 deletion(-) commit ccbf872a3ee7071a09c3a3c22a4cb4a2ee162611 Author: Wolfram Sang Date: Sat May 18 23:27:48 2019 +0200 watchdog: qcom-wdt: drop warning after registering device The core will print out details now. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/qcom-wdt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 375611e561b13f3be01e9b7be79f54de4bfd7711 Author: Wolfram Sang Date: Sat May 18 23:27:47 2019 +0200 watchdog: pnx4008_wdt: drop warning after registering device The core will print out details now. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/pnx4008_wdt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 90984aa137a1f1eb5c52eb8aaa63c0203ff12572 Author: Wolfram Sang Date: Sat May 18 23:27:46 2019 +0200 watchdog: pic32-wdt: drop warning after registering device The core will print out details now. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/pic32-wdt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 888ca35d74cef6e66cd3c651eba3fca6d66147e5 Author: Wolfram Sang Date: Sat May 18 23:27:45 2019 +0200 watchdog: pic32-dmt: drop warning after registering device The core will print out details now. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/pic32-dmt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 0fa6cf71cdec0eaebd69cf25de3f14a9152106e5 Author: Wolfram Sang Date: Sat May 18 23:27:44 2019 +0200 watchdog: of_xilinx_wdt: drop warning after registering device The core will print out details now. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/of_xilinx_wdt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit ab9113d0460f06bff8c22271b77a05a5f6cadbac Author: Wolfram Sang Date: Sat May 18 23:27:43 2019 +0200 watchdog: npcm_wdt: drop warning after registering device The core will print out details now. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/npcm_wdt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 0a33dce48fbd418aeb3a4259b5f71e3f6bb9d7b9 Author: Wolfram Sang Date: Sat May 18 23:27:42 2019 +0200 watchdog: nic7018_wdt: drop warning after registering device The core will print out details now. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/nic7018_wdt.c | 1 - 1 file changed, 1 deletion(-) commit 9076eb5dff9351c2178f76bb2ce63c2c0c98472a Author: Wolfram Sang Date: Sat May 18 23:27:41 2019 +0200 watchdog: ni903x_wdt: drop warning after registering device The core will print out details now. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/ni903x_wdt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit a239027325d0ea6722d9ce04b920b894d93b5fed Author: Wolfram Sang Date: Sat May 18 23:27:40 2019 +0200 watchdog: mpc8xxx_wdt: drop warning after registering device The core will print out details now. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/mpc8xxx_wdt.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 86fc18657899c76a998da288056b128d9da5c244 Author: Wolfram Sang Date: Sat May 18 23:27:39 2019 +0200 watchdog: menf21bmc_wdt: drop warning after registering device The core will print out details now. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/menf21bmc_wdt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit eddeb07bd6445139b99ec88b5a23877f57620802 Author: Wolfram Sang Date: Sat May 18 23:27:38 2019 +0200 watchdog: mena21_wdt: drop warning after registering device The core will print out details now. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/mena21_wdt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 2b7ebd34895964174c6384ce1dade78fd82ca313 Author: Wolfram Sang Date: Sat May 18 23:27:37 2019 +0200 watchdog: mei_wdt: drop warning after registering device The core will print out details now. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/mei_wdt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 9daa2e1436f307309663b176abd5d1d443c5e080 Author: Wolfram Sang Date: Sat May 18 23:27:36 2019 +0200 watchdog: max77620_wdt: drop warning after registering device The core will print out details now. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/max77620_wdt.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 7da547350f5067c94d935f9b1fbef8dbc2c202ab Author: Wolfram Sang Date: Sat May 18 23:27:35 2019 +0200 watchdog: loongson1_wdt: drop warning after registering device The core will print out details now. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/loongson1_wdt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 9ee644c9326cd5ad5080408820075465b51c9c16 Author: Wolfram Sang Date: Sat May 18 23:27:34 2019 +0200 watchdog: jz4740_wdt: drop warning after registering device The core will print out details now. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/jz4740_wdt.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit ca2d4490705f2f6d48292b171510a4230f56c7da Author: Wolfram Sang Date: Sat May 18 23:27:33 2019 +0200 watchdog: intel-mid_wdt: drop warning after registering device The core will print out details now. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/intel-mid_wdt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 31f4a2cf8fc1e9d52f00e824480ef807904edbca Author: Wolfram Sang Date: Sat May 18 23:27:32 2019 +0200 watchdog: imx_sc_wdt: drop warning after registering device The core will print out details now. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/imx_sc_wdt.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 63c1cd53451527d1bfda6ae7e4a8d84661919ce3 Author: Wolfram Sang Date: Sat May 18 23:27:31 2019 +0200 watchdog: imx2_wdt: drop warning after registering device The core will print out details now. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/imx2_wdt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 8f952c015f456d0acc0a5e31415f657ccf85824c Author: Wolfram Sang Date: Sat May 18 23:27:30 2019 +0200 watchdog: ie6xx_wdt: drop warning after registering device The core will print out details now. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/ie6xx_wdt.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 34b8580fe34d53226b83b2fd099317d7f4f9fd6f Author: Wolfram Sang Date: Sat May 18 23:27:29 2019 +0200 watchdog: i6300esb: drop warning after registering device The core will print out details now. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/i6300esb.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit f51540b83faa1a575772b4a38d00aa9b2f263023 Author: Wolfram Sang Date: Sat May 18 23:27:28 2019 +0200 watchdog: hpwdt: drop warning after registering device The core will print out details now. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/hpwdt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 2d065d2e9b15c3bb2f00b7fa466c75425d8b9983 Author: Wolfram Sang Date: Sat May 18 23:27:27 2019 +0200 watchdog: ftwdt010_wdt: drop warning after registering device The core will print out details now. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/ftwdt010_wdt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit cdad26977e3fc0621a9378ef286e243b5ec4b7c0 Author: Wolfram Sang Date: Sat May 18 23:27:26 2019 +0200 watchdog: digicolor_wdt: drop warning after registering device The core will print out details now. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/digicolor_wdt.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 6ab6d33ee002e68d607d77bab0612705995ffbe6 Author: Wolfram Sang Date: Sat May 18 23:27:25 2019 +0200 watchdog: davinci_wdt: drop warning after registering device The core will print out details now. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/davinci_wdt.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 04892d893b1901503820897cc46839660bf1a6b0 Author: Wolfram Sang Date: Sat May 18 23:27:24 2019 +0200 watchdog: da9062_wdt: drop warning after registering device The core will print out details now. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/da9062_wdt.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 60415f701fce001746f4cf37beb4d6c713cb44f7 Author: Wolfram Sang Date: Sat May 18 23:27:23 2019 +0200 watchdog: da9052_wdt: drop warning after registering device The core will print out details now. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/da9052_wdt.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 76ed828b811e9c4f282179ec04ea8e65b591c844 Author: Wolfram Sang Date: Sat May 18 23:27:22 2019 +0200 watchdog: cadence_wdt: drop warning after registering device The core will print out details now. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/cadence_wdt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit ae07bdbe7f318ea6d543a68d8dc2457f81cd7ed0 Author: Wolfram Sang Date: Sat May 18 23:27:21 2019 +0200 watchdog: bcm_kona_wdt: drop warning after registering device The core will print out details now. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/bcm_kona_wdt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit f54298950eab8d4b931eb4871bd37bc274f85d98 Author: Wolfram Sang Date: Sat May 18 23:27:20 2019 +0200 watchdog: bcm7038_wdt: drop warning after registering device The core will print out details now. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/bcm7038_wdt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit d5f3e24f22231991615421610d72d037423bba27 Author: Wolfram Sang Date: Sat May 18 23:27:19 2019 +0200 watchdog: bcm2835_wdt: drop warning after registering device The core will print out details now. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/bcm2835_wdt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 4ab054336109b743d851fe57fe51b8d61f1ff3e9 Author: Wolfram Sang Date: Sat May 18 23:27:18 2019 +0200 watchdog: aspeed_wdt: drop warning after registering device The core will print out details now. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/aspeed_wdt.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit b608075e4bd6ad21968e8bfddd396c43b625e2b1 Author: Wolfram Sang Date: Sat May 18 23:27:17 2019 +0200 watchdog: let core print error message when registering device fails So we can remove boilerplate code from drivers. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/watchdog_core.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 80030425e0207172cd68a8952c5054db85ffa85f Author: Wolfram Sang Date: Sat May 18 23:27:16 2019 +0200 watchdog: make watchdog_deferred_registration_add() void It cannot fail, so no return value needed. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck drivers/watchdog/watchdog_core.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 0dcb4efb1095d0a1f5f681c2b94e98b009cc5d77 Author: Takashi Sakamoto Date: Sun Jul 7 21:07:59 2019 +0900 ALSA: firewire-lib: code refactoring for local variables It's better to use int type for loop index. For consistency, the name of local variable for the number of data block should be plural. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/amdtp-stream.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 02394af3e00df73c3674de0783d3a31c8162c840 Author: Takashi Sakamoto Date: Sun Jul 7 21:07:58 2019 +0900 ALSA: firewire-lib: code refactoring for post operation to data block counter As a result of former commits, post operation to data block count for cases without CIP_DBC_IS_END_EVENT can be done just with data_block_counter member of amdtp_stream structure. This commit adds code refactoring to obsolete local variable for data block counter. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/amdtp-stream.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit b8b0e24c226e4434821f437070935218fdd39741 Author: Takashi Sakamoto Date: Sun Jul 7 21:07:57 2019 +0900 ALSA: firewire-lib: code refactoring for error path of parser for CIP header When a parser for CIP header returns -EAGAIN, no extra care is needed to probe tracepoints event. This commit adds code refactoring for the error path. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/amdtp-stream.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit 213fa98981588887c1a2ed817e6a48e2428e97a1 Author: Takashi Sakamoto Date: Sun Jul 7 21:07:56 2019 +0900 ALSA: firewire-lib: fix different data block counter between probed event and transferred isochronous packet For IT context, tracepoints event is probed after calculating next data block counter. This brings difference of data block counter between the probed event and actual isochronous packet. This commit fixes it. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/amdtp-stream.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4ece7f6fd830d71bbb185434bf081b1f47701a67 Author: Takashi Sakamoto Date: Sun Jul 7 21:07:55 2019 +0900 ALSA: firewire-lib: fix initial value of data block count for IR context without CIP_DBC_IS_END_EVENT For IR context, ALSA IEC 61883-1/6 engine uses initial value of data block counter as UINT_MAX, to detect first isochronous packet in the middle of packet streaming. At present, when CIP_DBC_IS_END_EVENT is not used (i.e. for drivers except for ALSA fireworks driver), the initial value is used as is for tracepoints event. However, the engine can detect the value of dbc field in the payload of first isochronous packet and the value should be assigned to the event. This commit fixes the bug. Fixes: 76864868dbab ("ALSA: firewire-lib: cache next data_block_counter after probing tracepoints event for IR context") Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/amdtp-stream.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 7fbf909668d69d7ab4428f6f55cb53fe4451b9b1 Author: Takashi Sakamoto Date: Sun Jul 7 21:07:54 2019 +0900 ALSA: firewire-lib/fireface: fix initial value of data block counter for IR context with CIP_NO_HEADER For IR context, ALSA IEC 61883-1/6 engine uses initial value of data block counter as UINT_MAX, to detect first isochronous packet in the middle of packet streaming. At present, when CIP_NO_HEADER is used (i.e. for ALSA fireface driver), the initial value is used for tracepoints event. 0x00 should be for the event when the initial value is UINT_MAX because isochronous packets with CIP_NO_HEADER option has no field for data block count. This commit fixes the bug. Fixes: 76864868dbab ("ALSA: firewire-lib: cache next data_block_counter after probing tracepoints event for IR context") Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/amdtp-stream.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 0ebf3ceb83648f9d149220bf0c6986ddce11361a Author: Takashi Sakamoto Date: Sun Jul 7 21:07:53 2019 +0900 ALSA: firewire-lib: fix invalid length of rx packet payload for tracepoint events Although CIP header is handled as context header, the length of isochronous packet includes two quadlets for its payload. In tracepoints event the value of payload_quadlets should includes the two quadlets. But at present it doesn't. This commit fixes the bug. Fixes: b18f0cfaf16b ("ALSA: firewire-lib: use 8 byte packet header for IT context to separate CIP header from CIP payload") Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/amdtp-stream.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 3c53c6255d598db7084c5c3d7553d7200e857818 Merge: b89b889a326a a98429acadef Author: Takashi Iwai Date: Mon Jul 8 14:45:20 2019 +0200 Merge tag 'asoc-v5.3' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Updates for v5.3 This is a very big update, mainly thanks to Morimoto-san's refactoring work and some fairly large new drivers. - Lots more work on moving towards a component based framework from Morimoto-san. - Support for force disconnecting muxes from Jerome Brunet. - New drivers for Cirrus Logic CS47L35, CS47L85 and CS47L90, Conexant CX2072X, Realtek RT1011 and RT1308. Signed-off-by: Takashi Iwai commit d31d07b97a5e76f41e00eb81dcca740e84aa7782 Author: Luis Henriques Date: Mon Jul 1 18:16:34 2019 +0100 ceph: fix end offset in truncate_inode_pages_range call Commit e450f4d1a5d6 ("ceph: pass inclusive lend parameter to filemap_write_and_wait_range()") fixed the end offset parameter used to call filemap_write_and_wait_range and invalidate_inode_pages2_range. Unfortunately it missed truncate_inode_pages_range, introducing a regression that is easily detected by xfstest generic/130. The problem is that when doing direct IO it is possible that an extra page is truncated from the page cache when the end offset is page aligned. This can cause data loss if that page hasn't been sync'ed to the OSDs. While there, change code to use PAGE_ALIGN macro instead. Cc: stable@vger.kernel.org Fixes: e450f4d1a5d6 ("ceph: pass inclusive lend parameter to filemap_write_and_wait_range()") Signed-off-by: Luis Henriques Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov fs/ceph/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 52dd0f1b3f94e600901ad785226e597743401245 Author: Luis Henriques Date: Fri Jul 5 17:14:56 2019 +0100 ceph: use generic_delete_inode() for ->drop_inode ceph_drop_inode() implementation is not any different from the generic function, thus there's no point in keeping it around. Signed-off-by: Luis Henriques Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov fs/ceph/inode.c | 10 ---------- fs/ceph/super.c | 2 +- fs/ceph/super.h | 1 - 3 files changed, 1 insertion(+), 12 deletions(-) commit 87bc5b895d94a0f40fe170d4cf5771c8e8f85d15 Author: Yan, Zheng Date: Sun Jun 2 09:45:38 2019 +0800 ceph: use ceph_evict_inode to cleanup inode's resource remove_session_caps() relies on __wait_on_freeing_inode(), to wait for freeing inode to remove its caps. But VFS wakes freeing inode waiters before calling destroy_inode(). Cc: stable@vger.kernel.org Link: https://tracker.ceph.com/issues/40102 Signed-off-by: "Yan, Zheng" Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov fs/ceph/inode.c | 7 +++++-- fs/ceph/super.c | 2 +- fs/ceph/super.h | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) commit 0f7cf80ae96c2a585a00b2cd8b6d24699db47f35 Author: Luis Henriques Date: Thu Jun 27 14:51:22 2019 +0100 ceph: initialize superblock s_time_gran to 1 Having granularity set to 1us results in having inode timestamps with a accurancy different from the fuse client (i.e. atime, ctime and mtime will always end with '000'). This patch normalizes this behaviour and sets the granularity to 1. Signed-off-by: Luis Henriques Reviewed-by: Jeff Layton Reviewed-by: Sage Weil Signed-off-by: Ilya Dryomov fs/ceph/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1edd1fecae5e7ab23c64c02aa52c4690d6a0b32f Author: Jeff Layton Date: Wed Jun 26 06:56:17 2019 -0400 MAINTAINERS: take over for Zheng as CephFS kernel client maintainer Zheng wants to be able to spend more time working on the MDS, so I've volunteered to take over for him as the CephFS kernel client maintainer. Signed-off-by: Jeff Layton Acked-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8b5bec5c83e8e319d5ecb4efcbf04bdef85409e6 Author: Ilya Dryomov Date: Wed Jun 19 15:45:27 2019 +0200 rbd: setallochint only if object doesn't exist setallochint is really only useful on object creation. Continue hinting unconditionally if object map cannot be used. Signed-off-by: Ilya Dryomov Reviewed-by: Dongsheng Yang drivers/block/rbd.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit 22e8bd51bb0469d1a524130a057f894ff632376a Author: Ilya Dryomov Date: Wed Jun 5 19:25:11 2019 +0200 rbd: support for object-map and fast-diff Speed up reads, discards and zeroouts through RBD_OBJ_FLAG_MAY_EXIST and RBD_OBJ_FLAG_NOOP_FOR_NONEXISTENT based on object map. Invalid object maps are not trusted, but still updated. Note that we never iterate, resize or invalidate object maps. If object-map feature is enabled but object map fails to load, we just fail the requester (either "rbd map" or I/O, by way of post-acquire action). Signed-off-by: Ilya Dryomov drivers/block/rbd.c | 720 ++++++++++++++++++++++++++++++++++- drivers/block/rbd_types.h | 10 + include/linux/ceph/cls_lock_client.h | 3 + include/linux/ceph/striper.h | 2 + net/ceph/cls_lock_client.c | 45 +++ net/ceph/striper.c | 17 + 6 files changed, 794 insertions(+), 3 deletions(-) commit da5ef6be3467eb2d293790dea69b5b562490715a Author: Ilya Dryomov Date: Mon Jun 17 15:29:49 2019 +0200 rbd: call rbd_dev_mapping_set() from rbd_dev_image_probe() Snapshot object map will be loaded in rbd_dev_image_probe(), so we need to know snapshot's size (as opposed to HEAD's size) sooner. Signed-off-by: Ilya Dryomov Reviewed-by: Dongsheng Yang drivers/block/rbd.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 4cf3e6dff7ea517544e1da7810a0b3ebba380d2c Author: Ilya Dryomov Date: Fri Jun 14 18:00:19 2019 +0200 libceph: export osd_req_op_data() macro We already have one exported wrapper around it for extent.osd_data and rbd_object_map_update_finish() needs another one for cls.request_data. Signed-off-by: Ilya Dryomov Reviewed-by: Dongsheng Yang Reviewed-by: Jeff Layton include/linux/ceph/osd_client.h | 8 ++++++++ net/ceph/osd_client.c | 8 -------- 2 files changed, 8 insertions(+), 8 deletions(-) commit 68ada915eea10f36760ffe414810390a104df093 Author: Ilya Dryomov Date: Fri Jun 14 18:16:51 2019 +0200 libceph: change ceph_osdc_call() to take page vector for response This will be used for loading object map. rbd_obj_read_sync() isn't suitable because object map must be accessed through class methods. Signed-off-by: Ilya Dryomov Reviewed-by: Dongsheng Yang Reviewed-by: Jeff Layton drivers/block/rbd.c | 8 ++++---- include/linux/ceph/osd_client.h | 2 +- net/ceph/cls_lock_client.c | 2 +- net/ceph/osd_client.c | 10 +++++----- 4 files changed, 11 insertions(+), 11 deletions(-) commit ef83171b49c66d851a1a0dc6da5b4a4d8ee6ce9a Author: Ilya Dryomov Date: Mon Apr 8 14:16:05 2019 +0200 libceph: bump CEPH_MSG_MAX_DATA_LEN (again) This time for rbd object map. Object maps are limited in size to 256000000 objects, two bits per object. Signed-off-by: Ilya Dryomov Reviewed-by: Dongsheng Yang include/linux/ceph/libceph.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 637cd060537d0c40bcf4f164b8a2c6e9b747e1ad Author: Ilya Dryomov Date: Thu Jun 6 17:14:49 2019 +0200 rbd: new exclusive lock wait/wake code rbd_wait_state_locked() is built around rbd_dev->lock_waitq and blocks rbd worker threads while waiting for the lock, potentially impacting other rbd devices. There is no good way to pass an error code into image request state machines when acquisition fails, hence the use of RBD_DEV_FLAG_BLACKLISTED for everything and various other issues. Introduce rbd_dev->acquiring_list and move acquisition into image request state machine. Use rbd_img_schedule() for kicking and passing error codes. No blocking occurs while waiting for the lock, but rbd_dev->lock_rwsem is still held across lock, unlock and set_cookie calls. Always acquire the lock on "rbd map" to avoid associating the latency of acquiring the lock with the first I/O request. A slight regression is that lock_timeout is now respected only if lock acquisition is triggered by "rbd map" and not by I/O. This is somewhat compensated by the fact that we no longer block if the peer refuses to release lock -- I/O is failed with EROFS right away. Signed-off-by: Ilya Dryomov Reviewed-by: Dongsheng Yang drivers/block/rbd.c | 329 +++++++++++++++++++++++++++++----------------------- 1 file changed, 186 insertions(+), 143 deletions(-) commit e1fddc8fdd22ed5a55fc7e7a81437c4663c7ba8c Author: Ilya Dryomov Date: Thu May 30 16:07:48 2019 +0200 rbd: quiescing lock should wait for image requests Syncing OSD requests doesn't really work. A single image request may be comprised of multiple object requests, each of which can go through a series of OSD requests (original, copyups, etc). On top of that, the OSD cliest may be shared with other rbd devices. What we want is to ensure that all in-flight image requests complete. Introduce rbd_dev->running_list and block in RBD_LOCK_STATE_RELEASING until that happens. New OSD requests may be started during this time. Note that __rbd_img_handle_request() acquires rbd_dev->lock_rwsem only if need_exclusive_lock() returns true. This avoids a deadlock similar to the one outlined in the previous commit between unlock and I/O that doesn't require lock, such as a read with object-map feature disabled. Signed-off-by: Ilya Dryomov Reviewed-by: Dongsheng Yang drivers/block/rbd.c | 104 +++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 90 insertions(+), 14 deletions(-) commit a2b1da09793d003410b57f96eaf7e83e43b7a50a Author: Ilya Dryomov Date: Thu May 30 11:15:23 2019 +0200 rbd: lock should be quiesced on reacquire Quiesce exclusive lock at the top of rbd_reacquire_lock() instead of only when ceph_cls_set_cookie() fails. This avoids a deadlock on rbd_dev->lock_rwsem. If rbd_dev->lock_rwsem is needed for I/O completion, set_cookie can hang ceph-msgr worker thread if set_cookie reply ends up behind an I/O reply, because, like lock and unlock requests, set_cookie is sent and waited upon with rbd_dev->lock_rwsem held for write. Signed-off-by: Ilya Dryomov Reviewed-by: Dongsheng Yang drivers/block/rbd.c | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) commit 793333a303c90174c317e3fa12e898bbc02daee4 Author: Ilya Dryomov Date: Thu Jun 13 17:44:08 2019 +0200 rbd: introduce copyup state machine Both write and copyup paths will get more complex with object map. Factor copyup code out into a separate state machine. While at it, take advantage of obj_req->osd_reqs list and issue empty and current snapc OSD requests together, one after another. Signed-off-by: Ilya Dryomov Reviewed-by: Dongsheng Yang drivers/block/rbd.c | 187 ++++++++++++++++++++++++++++++++++------------------ 1 file changed, 123 insertions(+), 64 deletions(-) commit ea9b743c97dc52c74b97d968bccbb51f6e5c92b6 Author: Ilya Dryomov Date: Fri May 31 15:11:26 2019 +0200 rbd: rename rbd_obj_setup_*() to rbd_obj_init_*() These functions don't allocate and set up OSD requests anymore. Signed-off-by: Ilya Dryomov Reviewed-by: Dongsheng Yang drivers/block/rbd.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit a086a1b8bdbd14a59b8a4cd979d5c7894e3af59e Author: Ilya Dryomov Date: Wed Jun 12 18:33:31 2019 +0200 rbd: move OSD request allocation into object request state machines Following submission, move initial OSD request allocation into object request state machines. Everything that has to do with OSD requests is now handled inside the state machine, all __rbd_img_fill_request() has left is initialization. Signed-off-by: Ilya Dryomov Reviewed-by: Dongsheng Yang drivers/block/rbd.c | 214 +++++++++++++++++++++++----------------------------- 1 file changed, 96 insertions(+), 118 deletions(-) commit 27bbd911624891ccb17980ff784d68e6f470b92b Author: Ilya Dryomov Date: Wed May 29 17:31:37 2019 +0200 rbd: factor out __rbd_osd_setup_discard_ops() With obj_req->xferred removed, obj_req->ex.oe_off and obj_req->ex.oe_len can be updated if required for alignment. Previously the new offset and length weren't stored anywhere beyond rbd_obj_setup_discard(). Signed-off-by: Ilya Dryomov Reviewed-by: Dongsheng Yang drivers/block/rbd.c | 43 +++++++++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 16 deletions(-) commit b5ae8cbc6e3746c05a5ffe59cb4c03fee1730764 Author: Ilya Dryomov Date: Wed May 29 16:53:14 2019 +0200 rbd: factor out rbd_osd_setup_copyup() Signed-off-by: Ilya Dryomov Reviewed-by: Dongsheng Yang drivers/block/rbd.c | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) commit bcbab1db6c95a9abe7793c186f87fd41f1b8d4ea Author: Ilya Dryomov Date: Mon May 27 11:41:36 2019 +0200 rbd: introduce obj_req->osd_reqs list Since the dawn of time it had been assumed that a single object request spawns a single OSD request. This is already impacting copyup: instead of sending empty and current snapc copyups together, we wait for empty snapc OSD request to complete in order to reassign obj_req->osd_req with current snapc OSD request. Looking further, updating potentially hundreds of snapshot object maps serially is a non-starter. Replace obj_req->osd_req pointer with obj_req->osd_reqs list. Use osd_req->r_private_item for linkage. Signed-off-by: Ilya Dryomov Reviewed-by: Dongsheng Yang drivers/block/rbd.c | 191 +++++++++++++++++++++++++++------------------------- 1 file changed, 100 insertions(+), 91 deletions(-) commit 94e85771881027e62afdddadd31e3eec73025990 Author: Ilya Dryomov Date: Mon Jul 8 12:50:09 2019 +0200 libceph: rename r_unsafe_item to r_private_item This list item remained from when we had safe and unsafe replies (commit vs ack). It has since become a private list item for use by clients. Signed-off-by: Ilya Dryomov fs/ceph/file.c | 6 +++--- include/linux/ceph/osd_client.h | 2 +- net/ceph/osd_client.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) commit 0192ce2ee68b54394ba62e5668067bf01f7bc609 Author: Ilya Dryomov Date: Thu May 16 15:06:56 2019 +0200 rbd: introduce image request state machine Make it possible to schedule image requests on a workqueue. This fixes parent chain recursion added in the previous commit and lays the ground for exclusive lock wait/wake improvements. The "wait for pending subrequests and report first nonzero result" code is generalized to be used by object request state machine. Signed-off-by: Ilya Dryomov Reviewed-by: Dongsheng Yang drivers/block/rbd.c | 194 +++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 137 insertions(+), 57 deletions(-) commit 85b5e6d11898fddfcb2832024f73454d448f76e0 Author: Ilya Dryomov Date: Tue May 14 21:06:07 2019 +0200 rbd: move OSD request submission into object request state machines Start eliminating asymmetry where the initial OSD request is allocated and submitted from outside the state machine, making error handling and restarts harder than they could be. This commit deals with submission, a commit that deals with allocation will follow. Note that this commit adds parent chain recursion on the submission side: rbd_img_request_submit rbd_obj_handle_request __rbd_obj_handle_request rbd_obj_handle_read rbd_obj_handle_write_guard rbd_obj_read_from_parent rbd_img_request_submit This will be fixed in the next commit. Signed-off-by: Ilya Dryomov Reviewed-by: Dongsheng Yang drivers/block/rbd.c | 60 +++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 49 insertions(+), 11 deletions(-) commit 0ad5d953548fe336134026b039ad4fd9e6594f16 Author: Ilya Dryomov Date: Tue May 14 20:45:38 2019 +0200 rbd: get rid of RBD_OBJ_WRITE_{FLAT,GUARD} In preparation for moving OSD request allocation and submission into object request state machines, get rid of RBD_OBJ_WRITE_{FLAT,GUARD}. We would need to start in a new state, whether the request is guarded or not. Unify them into RBD_OBJ_WRITE_OBJECT and pass guard info through obj_req->flags. While at it, make our ENOENT handling a little more precise: only hide ENOENT when it is actually expected, that is on delete. Signed-off-by: Ilya Dryomov Reviewed-by: Dongsheng Yang drivers/block/rbd.c | 112 ++++++++++++++++++++++++++++------------------------ 1 file changed, 60 insertions(+), 52 deletions(-) commit a9b67e69949d20dcb38ea6aaed5500318c7c91f6 Author: Ilya Dryomov Date: Wed May 8 13:35:57 2019 +0200 rbd: replace obj_req->tried_parent with obj_req->read_state Make rbd_obj_handle_read() look like a state machine and get rid of the necessity to patch result in rbd_obj_handle_request(), completing the removal of obj_req->xferred and img_req->xferred. Signed-off-by: Ilya Dryomov Reviewed-by: Dongsheng Yang drivers/block/rbd.c | 82 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 46 insertions(+), 36 deletions(-) commit 54ab3b24c536bc9b45ab444830974c6bea57778e Author: Ilya Dryomov Date: Sat May 11 16:21:49 2019 +0200 rbd: get rid of obj_req->xferred, obj_req->result and img_req->xferred obj_req->xferred and img_req->xferred don't bring any value. The former is used for short reads and has to be set to obj_req->ex.oe_len after that and elsewhere. The latter is just an aggregate. Use result for short reads (>=0 - number of bytes read, <0 - error) and pass it around explicitly. No need to store it in obj_req. Signed-off-by: Ilya Dryomov Reviewed-by: Dongsheng Yang drivers/block/rbd.c | 149 ++++++++++++++++++++-------------------------------- 1 file changed, 58 insertions(+), 91 deletions(-) commit 26350535c2cef4bcf5de597c301b0560650cec19 Author: Jeff Layton Date: Mon Jun 24 07:32:21 2019 -0400 ceph: don't NULL terminate virtual xattrs The convention with xattrs is to not store the termination with string data, given that it returns the length. This is how setfattr/getfattr operate. Most of ceph's virtual xattr routines use snprintf to plop the string directly into the destination buffer, but snprintf always NULL terminates the string. This means that if we send the kernel a buffer that is the exact length needed to hold the string, it'll end up truncated. Add a ceph_fmt_xattr helper function to format the string into an on-stack buffer that should always be large enough to hold the whole thing and then memcpy the result into the destination buffer. If it does turn out that the formatted string won't fit in the on-stack buffer, then return -E2BIG and do a WARN_ONCE(). Change over most of the virtual xattr routines to use the new helper. A couple of the xattrs are sourced from strings however, and it's difficult to know how long they'll be. Just have those memcpy the result in place after verifying the length. Signed-off-by: Jeff Layton Reviewed-by: "Yan, Zheng" Acked-by: Ilya Dryomov Signed-off-by: Ilya Dryomov fs/ceph/xattr.c | 84 ++++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 59 insertions(+), 25 deletions(-) commit 3b421018f48c482bdc9650f894aa1747cf90e51d Author: Jeff Layton Date: Thu Jun 13 15:17:00 2019 -0400 ceph: return -ERANGE if virtual xattr value didn't fit in buffer The getxattr manpage states that we should return ERANGE if the destination buffer size is too small to hold the value. ceph_vxattrcb_layout does this internally, but we should be doing this for all vxattrs. Fix the only caller of getxattr_cb to check the returned size against the buffer length and return -ERANGE if it doesn't fit. Drop the same check in ceph_vxattrcb_layout and just rely on the caller to handle it. Signed-off-by: Jeff Layton Reviewed-by: "Yan, Zheng" Acked-by: Ilya Dryomov Signed-off-by: Ilya Dryomov fs/ceph/xattr.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit f1d1b51deabbd1e7b8c24883145fbf784784d250 Author: Jeff Layton Date: Mon Jun 24 07:39:18 2019 -0400 ceph: make getxattr_cb return ssize_t The getxattr_cb functions return size_t, which is unsigned and then cast that value to int and then ssize_t before returning it. While all of this works, it relies on implicit casting rules for signed/unsigned conversions. Change getxattr_cb to return ssize_t to better conform with what the caller actually wants. Also, remove some suspicious casts. Signed-off-by: Jeff Layton Reviewed-by: "Yan, Zheng" Acked-by: Ilya Dryomov Signed-off-by: Ilya Dryomov fs/ceph/xattr.c | 90 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 45 insertions(+), 45 deletions(-) commit 49ada6e8dc9f64ad1e8dd6f7b453c9e584e9f897 Author: Yan, Zheng Date: Thu Jun 20 12:09:08 2019 +0800 ceph: more precise CEPH_CLIENT_CAPS_PENDING_CAPSNAP Client uses this flag to tell mds if there is more cap snap need to flush. It's mainly for the case that client needs to re-send cap/snap flushes after mds failover, but CEPH_CAP_ANY_FILE_WR on corresponding inodes are all released before mds failover. Signed-off-by: "Yan, Zheng" Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov fs/ceph/caps.c | 41 ++++++++++++++++++++++++++++++----------- include/linux/ceph/ceph_fs.h | 2 +- 2 files changed, 31 insertions(+), 12 deletions(-) commit d6cee9dbd8c841795cd672b98069866789916648 Author: Yan, Zheng Date: Thu Jun 20 16:09:37 2019 +0800 ceph: kick flushing and flush snaps before sending normal cap message Otherwise client may send cap flush messages in wrong order. Signed-off-by: "Yan, Zheng" Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov fs/ceph/caps.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit 054f8d41affbaeddca15ac39366a1f2f4b4f4488 Author: Yan, Zheng Date: Thu Jun 20 16:00:31 2019 +0800 ceph: clear CEPH_I_KICK_FLUSH flag inside __kick_flushing_caps() Signed-off-by: "Yan, Zheng" Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov fs/ceph/caps.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit 5c30835690f12e14f88dd2e90c8cbb0ea8eb975f Author: Jeff Layton Date: Thu Jun 6 08:57:27 2019 -0400 ceph: increment change_attribute on local changes We don't set SB_I_VERSION on ceph since we need to manage it ourselves, so we must increment it whenever we update the file times. Signed-off-by: Jeff Layton Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/addr.c | 2 ++ fs/ceph/file.c | 5 +++++ 2 files changed, 7 insertions(+) commit 176c77c9c9b1f843332496a28f4545eb96d5dab9 Author: Jeff Layton Date: Thu Jun 6 08:06:40 2019 -0400 ceph: handle change_attr in cap messages Signed-off-by: Jeff Layton Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/caps.c | 19 ++++++++++--------- fs/ceph/snap.c | 2 ++ fs/ceph/super.h | 1 + 3 files changed, 13 insertions(+), 9 deletions(-) commit a35ead314e0b9252a92a5e179a00b242d1af7bff Author: Jeff Layton Date: Thu Jun 6 07:29:23 2019 -0400 ceph: add change_attr field to ceph_inode_info Signed-off-by: Jeff Layton Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/inode.c | 5 +++++ fs/ceph/mds_client.c | 4 ++-- fs/ceph/mds_client.h | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) commit 441d367644e2f60b37f36bfc656deee551acba5b Author: Jeff Layton Date: Wed Jun 5 17:24:22 2019 -0400 iversion: add a routine to update a raw value with a larger one Under ceph, clients can be independently updating iversion themselves, while working under comprehensive sets of caps on an inode. In that situation we always want to prefer the largest value of a change attribute. Add a new function that will update a raw value with a larger one, but otherwise leave it alone. Signed-off-by: Jeff Layton Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov include/linux/iversion.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 58981784a6926e14964bb0e41dca38d75976b946 Author: Jeff Layton Date: Wed Jun 5 12:08:32 2019 -0400 ceph: allow querying of STATX_BTIME in ceph_getattr Signed-off-by: Jeff Layton Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/inode.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit 6adaaafdd81d5c01875fe233ab73deb81b34caa1 Author: Jeff Layton Date: Fri May 31 12:24:22 2019 -0400 libceph: turn on CEPH_FEATURE_MSG_ADDR2 Now that the client can handle either address formatting, advertise to the peer that we can support it. Signed-off-by: Jeff Layton Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov include/linux/ceph/ceph_features.h | 1 + 1 file changed, 1 insertion(+) commit ec62b894df1ae69eb8e66d69317dfff517f6d1f3 Author: Jeff Layton Date: Wed May 29 12:23:14 2019 -0400 ceph: handle btime in cap messages Signed-off-by: Jeff Layton Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/caps.c | 18 ++++++++++++------ fs/ceph/snap.c | 1 + fs/ceph/super.h | 2 +- 3 files changed, 14 insertions(+), 7 deletions(-) commit 245ce991cca55eb16cfc43d1655574121b8ed85f Author: Jeff Layton Date: Wed May 29 11:19:42 2019 -0400 ceph: add btime field to ceph_inode_info Signed-off-by: Jeff Layton Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/inode.c | 2 ++ fs/ceph/mds_client.c | 21 +++++++++++++-------- fs/ceph/mds_client.h | 1 + fs/ceph/super.h | 1 + 4 files changed, 17 insertions(+), 8 deletions(-) commit 2c66de560fa2dda0a600e908897116914db8f500 Author: Jeff Layton Date: Mon Jun 17 09:24:31 2019 -0400 libceph: rename ceph_encode_addr to ceph_encode_banner_addr ...ditto for the decode function. We only use these functions to fix up banner addresses now, so let's name them more appropriately. Signed-off-by: Jeff Layton Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov include/linux/ceph/decode.h | 4 ++-- net/ceph/messenger.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) commit d3c3c0a841d5dafc5395be363996d619255a732f Author: Jeff Layton Date: Mon Jun 17 06:57:25 2019 -0400 libceph: use TYPE_LEGACY for entity addrs instead of TYPE_NONE Going forward, we'll have different address types so let's use the addr2 TYPE_LEGACY for internal tracking rather than TYPE_NONE. Also, make ceph_pr_addr print the address type value as well. Signed-off-by: Jeff Layton Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov include/linux/ceph/decode.h | 7 +++++++ net/ceph/decode.c | 18 ++++++------------ net/ceph/messenger.c | 7 +++++-- 3 files changed, 18 insertions(+), 14 deletions(-) commit 2f9800c899dc1f4ad0ca32105069bfa83e80a05b Author: Jeff Layton Date: Tue Jun 4 15:17:32 2019 -0400 ceph: fix decode_locker to use ceph_decode_entity_addr Signed-off-by: Jeff Layton Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov net/ceph/cls_lock_client.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit f3848af1bf545575d7a98084f82f67e96ffdf4d5 Author: Jeff Layton Date: Tue Jun 4 11:26:36 2019 -0400 ceph: have MDS map decoding use entity_addr_t decoder Signed-off-by: Jeff Layton Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/mdsmap.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 8cb5f2b4fcf4b8a4043e26c232b435e83e2abe87 Author: Jeff Layton Date: Tue Jun 4 15:10:44 2019 -0400 libceph: correctly decode ADDR2 addresses in incremental OSD maps Given the new format, we have to decode the addresses twice. Once to skip past the new_up_client field, and a second time to collect the addresses. Signed-off-by: Jeff Layton Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov net/ceph/osdmap.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 51fc7ab44519adc6684ac6575826f8b1a16ee4b3 Author: Jeff Layton Date: Tue Jun 4 14:35:18 2019 -0400 libceph: fix watch_item_t decoding to use ceph_decode_entity_addr While we're in there, let's also fix up the decoder to do proper bounds checking. Signed-off-by: Jeff Layton Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov net/ceph/osd_client.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit dcbc919a5dc8c2629684a113a90c0b6fe10c3462 Author: Jeff Layton Date: Mon Jun 3 15:08:13 2019 -0400 libceph: switch osdmap decoding to use ceph_decode_entity_addr Signed-off-by: Jeff Layton Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov net/ceph/osdmap.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 0bfb0f288992adbf8d1f0d5f22f0fd398b146316 Author: Jeff Layton Date: Fri May 31 15:32:28 2019 -0400 libceph: ADDR2 support for monmap Switch the MonMap decoder to use the new decoding routine for entity_addr_t's. Signed-off-by: Jeff Layton Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov include/linux/ceph/mon_client.h | 1 - net/ceph/mon_client.c | 21 +++++++++++++-------- 2 files changed, 13 insertions(+), 9 deletions(-) commit 6c37f0e64173571914a443f74d36e5a22dabfc05 Author: Jeff Layton Date: Mon Jun 3 14:45:16 2019 -0400 libceph: add ceph_decode_entity_addr Add a function for decoding an entity_addr_t. Once CEPH_FEATURE_MSG_ADDR2 is enabled, the server daemons will start encoding entity_addr_t differently. Add a new helper function that can handle either format. Signed-off-by: Jeff Layton Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov include/linux/ceph/decode.h | 2 + net/ceph/Makefile | 2 +- net/ceph/decode.c | 90 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 93 insertions(+), 1 deletion(-) commit bc07532cc51f4c33cb6136405c9807c5961e468b Author: Jeff Layton Date: Tue Jun 4 13:13:48 2019 -0400 libceph: fix sa_family just after reading address It doesn't make sense to leave it undecoded until later. Signed-off-by: Jeff Layton Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov net/ceph/messenger.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 428138c9892fac19a682973bbb6d8c2a904b6639 Author: Yan, Zheng Date: Fri Jun 14 10:55:05 2019 +0800 ceph: remove request from waiting list before unregister Link: https://tracker.ceph.com/issues/40339 Signed-off-by: "Yan, Zheng" Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov fs/ceph/mds_client.c | 2 ++ 1 file changed, 2 insertions(+) commit 6f0f597b5debc7c2356fa6a17e2f179066e340d0 Author: Yan, Zheng Date: Mon Jun 10 15:45:09 2019 +0800 ceph: don't blindly unregister session that is in opening state handle_cap_export() may add placeholder caps to session that is in opening state. These caps' session pointer become wild after session get unregistered. The fix is not to unregister session in opening state during mds failovers, just let client to reconnect later when mds is recovered. Link: https://tracker.ceph.com/issues/40190 Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/mds_client.c | 59 +++++++++++++++++++++++----------------------------- 1 file changed, 26 insertions(+), 33 deletions(-) commit 2ef5df1abe6777b463cdfec20211d9846b116d24 Author: Yan, Zheng Date: Fri May 31 20:19:18 2019 +0800 ceph: fix infinite loop in get_quota_realm() get_quota_realm() enters infinite loop if quota inode has no caps. This can happen after client gets evicted. Signed-off-by: "Yan, Zheng" Reviewed-by: Luis Henriques Signed-off-by: Ilya Dryomov fs/ceph/quota.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit ac6713ccb5a6d13b59a2e3fda4fb049a2c4e0af2 Author: Yan, Zheng Date: Sun May 26 16:27:56 2019 +0800 ceph: add selinux support When creating new file/directory, use security_dentry_init_security() to prepare selinux context for the new inode, then send openc/mkdir request to MDS, together with selinux xattr. security_dentry_init_security() only supports single security module and only selinux has dentry_init_security hook. So only selinux is supported for now. We can add support for other security modules once kernel has a generic version of dentry_init_security() Signed-off-by: "Yan, Zheng" Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov fs/ceph/Kconfig | 12 +++++ fs/ceph/caps.c | 1 + fs/ceph/dir.c | 12 +++++ fs/ceph/file.c | 3 ++ fs/ceph/inode.c | 1 + fs/ceph/super.h | 19 ++++++++ fs/ceph/xattr.c | 142 +++++++++++++++++++++++++++++++++++++++++++++++++------- 7 files changed, 173 insertions(+), 17 deletions(-) commit 5c31e92dffb94c955fff2867a56aac68e63c286d Author: Yan, Zheng Date: Sun May 26 15:35:39 2019 +0800 ceph: rename struct ceph_acls_info to ceph_acl_sec_ctx Also rename ceph_release_acls_info() to ceph_release_acl_sec_ctx(). And move their definitions to different files. This is preparation for security label support. Signed-off-by: "Yan, Zheng" Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov fs/ceph/acl.c | 22 +++++++--------------- fs/ceph/dir.c | 28 ++++++++++++++-------------- fs/ceph/file.c | 18 +++++++++--------- fs/ceph/super.h | 29 +++++++++++++++-------------- fs/ceph/xattr.c | 10 ++++++++++ 5 files changed, 55 insertions(+), 52 deletions(-) commit 057297812d1aa0163665532a3e80bf718d6a69d0 Author: Yan, Zheng Date: Mon May 27 16:15:41 2019 +0800 ceph: fix debug print format in __set_xattr() name is not '\0' terminated. Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/xattr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 03af439ad9408c28e53b880daa56590dda1c8472 Author: Hariprasad Kelam Date: Sat May 25 14:45:59 2019 +0530 ceph: fix warning PTR_ERR_OR_ZERO can be used change1: fix below warning reported by coccicheck /fs/ceph/export.c:371:33-39: WARNING: PTR_ERR_OR_ZERO can be used change2: typecasted PTR_ERR_OR_ZERO to long as dout expecting long Signed-off-by: Hariprasad Kelam Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/export.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d6e47819721ae2d9d090058ad5570a66f3c42e39 Author: Yan, Zheng Date: Thu May 23 11:01:37 2019 +0800 ceph: hold i_ceph_lock when removing caps for freeing inode ceph_d_revalidate(, LOOKUP_RCU) may call __ceph_caps_issued_mask() on a freeing inode. Signed-off-by: "Yan, Zheng" Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov fs/ceph/caps.c | 10 ++++++---- fs/ceph/inode.c | 2 +- fs/ceph/super.h | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) commit 8f2a98ef3c1adf815ce38d5cc2f4e2a8759e98c5 Author: Yan, Zheng Date: Thu May 23 10:45:24 2019 +0800 ceph: ensure d_name/d_parent stability in ceph_mdsc_lease_send_msg() Signed-off-by: "Yan, Zheng" Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov fs/ceph/dir.c | 7 +++---- fs/ceph/mds_client.c | 24 +++++++++++++----------- fs/ceph/mds_client.h | 1 - 3 files changed, 16 insertions(+), 16 deletions(-) commit 41883ba8ee91af979f4a02b5b0c78647ae82a80b Author: Yan, Zheng Date: Thu May 23 10:22:55 2019 +0800 ceph: use READ_ONCE to access d_parent in RCU critical section Signed-off-by: "Yan, Zheng" Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov fs/ceph/mds_client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit feab6ac25dbfe3ab96299cb741925dc8d2da0caf Author: Yan, Zheng Date: Wed May 22 17:26:27 2019 +0800 ceph: fix dir_lease_is_valid() It should call __ceph_dentry_dir_lease_touch() under dentry->d_lock. Besides, ceph_dentry(dentry) can be NULL when called by LOOKUP_RCU d_revalidate() Signed-off-by: "Yan, Zheng" Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov fs/ceph/dir.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) commit 543212b3a4a4abe0cbc610c704cc3cb85315c367 Author: Yan, Zheng Date: Wed May 22 21:49:44 2019 +0800 ceph: close race between d_name_cmp() and update_dentry_lease() d_name_cmp() and update_dentry_lease() lock and unlock dentry->d_lock respectively. Dentry may get renamed between them. The fix is moving the dentry name compare into update_dentry_lease(). This patch introduce two version of update_dentry_lease(). One version is for the case that parent inode is locked. It does not need to check parent/target inode and dentry name. Another version is for the case that parent inode is not locked. It checks parent/target inode and dentry name after locking dentry->d_lock. Signed-off-by: "Yan, Zheng" Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov fs/ceph/inode.c | 164 ++++++++++++++++++++++++++++++-------------------------- 1 file changed, 88 insertions(+), 76 deletions(-) commit 749607731e26dfb2558118038c40e9c0c80d23b5 Author: Andrea Parri Date: Mon May 20 19:23:58 2019 +0200 ceph: fix improper use of smp_mb__before_atomic() This barrier only applies to the read-modify-write operations; in particular, it does not apply to the atomic64_set() primitive. Replace the barrier with an smp_mb(). Fixes: fdd4e15838e59 ("ceph: rework dcache readdir") Reported-by: "Paul E. McKenney" Reported-by: Peter Zijlstra Signed-off-by: Andrea Parri Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/super.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 718807289d4130be1fe13f24f018733116958070 Author: David Disseldorp Date: Wed May 15 16:56:39 2019 +0200 ceph: fix "ceph.dir.rctime" vxattr value The vxattr value incorrectly places a "09" prefix to the nanoseconds field, instead of providing it as a zero-pad width specifier after '%'. Fixes: 3489b42a72a4 ("ceph: fix three bugs, two in ceph_vxattrcb_file_layout()") Link: https://tracker.ceph.com/issues/39943 Signed-off-by: David Disseldorp Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov fs/ceph/xattr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d0f191d20c1ce22ccfd7c8e2327f19fbba7f7521 Author: David Disseldorp Date: Thu Apr 18 14:15:49 2019 +0200 ceph: remove unused vxattr length helpers ceph_listxattr() now calculates the length of vxattrs dynamically, so these helpers, which incorrectly ignore vxattr.exists_cb(), can be removed. Signed-off-by: David Disseldorp Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/super.c | 7 ++----- fs/ceph/super.h | 2 -- fs/ceph/xattr.c | 43 ------------------------------------------- 3 files changed, 2 insertions(+), 50 deletions(-) commit 2b2abcac8c251d1c77a4cc9d9f248daefae0fb4e Author: David Disseldorp Date: Thu Apr 18 14:15:48 2019 +0200 ceph: fix listxattr vxattr buffer length calculation ceph_listxattr() incorrectly returns a length based on the static ceph_vxattrs_name_size() value, which only takes into account whether vxattrs are hidden, ignoring vxattr.exists_cb(). When filling the xattr buffer ceph_listxattr() checks VXATTR_FLAG_HIDDEN and vxattr.exists_cb(). If both are false, we return an incorrect (oversize) length. Fix this behaviour by always calculating the vxattrs length at runtime, taking both vxattr.hidden and vxattr.exists_cb() into account. This bug is only exposed with the new "ceph.snap.btime" vxattr, as all other vxattrs with a non-null exists_cb also carry VXATTR_FLAG_HIDDEN. Signed-off-by: David Disseldorp Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/xattr.c | 54 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 24 deletions(-) commit 100cc610a550affcbef13d74855f736b92caa947 Author: David Disseldorp Date: Thu Apr 18 14:15:47 2019 +0200 ceph: add ceph.snap.btime vxattr The ceph.snap.btime virtual xattr provides the snapshot creation (birth) time in $secs.$nsecs format. Link: https://tracker.ceph.com/issues/38838 Signed-off-by: David Disseldorp Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/xattr.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 193e7b37628e97c6e66ec26a2c062dace68b4acd Author: David Disseldorp Date: Thu Apr 18 14:15:46 2019 +0200 ceph: carry snapshot creation time with inodes MDS InodeStat v3 wire structures include a trailing snapshot creation time member. Unmarshall this and retain it for a future vxattr. Signed-off-by: David Disseldorp Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/inode.c | 1 + fs/ceph/mds_client.c | 10 ++++++++++ fs/ceph/mds_client.h | 1 + fs/ceph/super.h | 1 + 4 files changed, 13 insertions(+) commit e1b814391440b65df0836cef8c7b641fb83f4bf6 Author: David Disseldorp Date: Thu Apr 18 14:15:45 2019 +0200 ceph: clean up ceph.dir.pin vxattr name sizeof() .name_size should use the same string as .name. Signed-off-by: David Disseldorp Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/xattr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 13c41737b912a6f6354369c9b20a02c3868ab304 Author: Dan Carpenter Date: Thu May 9 13:11:25 2019 +0300 ceph: silence a checker warning in mdsc_show() The problem is that if ceph_mdsc_build_path() fails then we set "path" to NULL and the "pathlen" variable is uninitialized. Then we call ceph_mdsc_free_path(path, pathlen) to clean up. Since "path" is NULL, the function is a no-op but Smatch and UBSan still complain that "pathlen" is uninitialized. This patch doesn't change run time, it just silence the warnings. Signed-off-by: Dan Carpenter Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov fs/ceph/debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 97a385e558292ba0851906783642239865670a5f Author: Christoph Hellwig Date: Wed May 1 16:40:32 2019 -0400 libceph: remove ceph_get_direct_page_vector() This function is entirely unused. Signed-off-by: Christoph Hellwig Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov include/linux/ceph/libceph.h | 4 ---- net/ceph/pagevec.c | 33 --------------------------------- 2 files changed, 37 deletions(-) commit 8a4f9fea2697ae11a0f542f158636f00d10b800f Author: Hou Zhiqiang Date: Fri Jul 5 17:56:56 2019 +0800 PCI: mobiveil: Fix INTx interrupt clearing in mobiveil_pcie_isr() The current INTx handling function clears all interrupts after handling the first pending; this can potentially cause missing INTx detection. Fix the code to clear only the handled INTx IRQ. Fixes: 9af6bcb11e12 ("PCI: mobiveil: Add Mobiveil PCIe Host Bridge IP driver") Signed-off-by: Hou Zhiqiang Signed-off-by: Lorenzo Pieralisi Reviewed-by: Minghuan Lian Reviewed-by: Subrahmanya Lingappa Acked-by: Karthikeyan Mitran Tested-by: Karthikeyan Mitran drivers/pci/controller/pcie-mobiveil.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 526c101dde6453e45ff5b25fbda8c3ff736f9788 Author: Hou Zhiqiang Date: Fri Jul 5 17:56:55 2019 +0800 PCI: mobiveil: Fix infinite-loop in the INTx handling function In the loop handling INTx interrupts in mobiveil_pcie_isr(), there is no code to update the loop control variable, which is causing an infinite loop. Fix the code by reading the interrupt status registers inside the loop. Fixes: 9af6bcb11e12 ("PCI: mobiveil: Add Mobiveil PCIe Host Bridge IP driver") Signed-off-by: Hou Zhiqiang Signed-off-by: Lorenzo Pieralisi Reviewed-by: Minghuan Lian Reviewed-by: Subrahmanya Lingappa Acked-by: Karthikeyan Mitran Tested-by: Karthikeyan Mitran drivers/pci/controller/pcie-mobiveil.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit fe83fa7e7eac505c40b269eeb892240d83c6b279 Author: Hou Zhiqiang Date: Fri Jul 5 17:56:54 2019 +0800 PCI: mobiveil: Move PCIe PIO enablement out of inbound window routine Move the PCIe PIO master enablement to function mobiveil_host_init(). Signed-off-by: Hou Zhiqiang Signed-off-by: Lorenzo Pieralisi Reviewed-by: Minghuan Lian Reviewed-by: Subrahmanya Lingappa drivers/pci/controller/pcie-mobiveil.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 4e00aca3ba0b54d496c224888b468207c601463c Author: Hou Zhiqiang Date: Fri Jul 5 17:56:52 2019 +0800 PCI: mobiveil: Add upper 32-bit PCI base address setup in inbound window Current code erroneously sets-up the lower 32-bit PCI base address in the inbound window, which results in inbound transactions not working in 64-bit platforms. Fixes: 9af6bcb11e12 ("PCI: mobiveil: Add Mobiveil PCIe Host Bridge IP driver") Signed-off-by: Hou Zhiqiang Signed-off-by: Lorenzo Pieralisi Reviewed-by: Minghuan Lian Reviewed-by: Subrahmanya Lingappa drivers/pci/controller/pcie-mobiveil.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 6f7374b871d5e55e772b532fe1c571da0fcc7164 Author: Hou Zhiqiang Date: Fri Jul 5 17:56:51 2019 +0800 PCI: mobiveil: Add upper 32-bit CPU base address setup in outbound window Current code erroneously sets-up only the lower 32-bit CPU base address in the outbound window, which results in outbound transactions not working in 64-bit platforms. Fix it. Fixes: 9af6bcb11e12 ("PCI: mobiveil: Add Mobiveil PCIe Host Bridge IP driver") Signed-off-by: Hou Zhiqiang Signed-off-by: Lorenzo Pieralisi Reviewed-by: Minghuan Lian Reviewed-by: Subrahmanya Lingappa drivers/pci/controller/pcie-mobiveil.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 7717c7d7da31befa025c4402ac1179356b00012a Author: Hou Zhiqiang Date: Fri Jul 5 17:56:50 2019 +0800 PCI: mobiveil: Mask out hardcoded bits in inbound/outbound windows setup The lower 10 bits of window size field are hardcoded to zero in HW so they can't really be changed but the lower 10-bit of PAB_AXI_AMAP_CTRL register are used for control fields, so while programming inbound and outbout windows decoding we should mask out the lower 10-bit of window size to prevent overriding the control bits. Signed-off-by: Hou Zhiqiang Signed-off-by: Lorenzo Pieralisi Reviewed-by: Minghuan Lian Reviewed-by: Subrahmanya Lingappa drivers/pci/controller/pcie-mobiveil.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cf22c591f93dbc92f9a1ec69343a17c74aac9743 Author: Hou Zhiqiang Date: Fri Jul 5 17:56:49 2019 +0800 PCI: mobiveil: Clear the control fields before updating it While programming the inbound and outbound windows in program_{ib/ob}_windows() we shoud clear the control fields in the registers before programming it with a new value to prevent stale bits from older configuration. Signed-off-by: Hou Zhiqiang Signed-off-by: Lorenzo Pieralisi Reviewed-by: Minghuan Lian Reviewed-by: Subrahmanya Lingappa drivers/pci/controller/pcie-mobiveil.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 4b7e2e59f0e50f13d6498190da41e758e01e6489 Author: Hou Zhiqiang Date: Fri Jul 5 17:56:48 2019 +0800 PCI: mobiveil: Add configured inbound windows counter Current code only keeps track of the number of outbound windows configured but it does not for inbound windows. Add a counter to keep track of initialized inbound windows. Signed-off-by: Hou Zhiqiang Signed-off-by: Lorenzo Pieralisi Reviewed-by: Minghuan Lian Reviewed-by: Subrahmanya Lingappa drivers/pci/controller/pcie-mobiveil.c | 1 + 1 file changed, 1 insertion(+) commit ccd34dac2ed596b1f26079912bdf638e002a3979 Author: Hou Zhiqiang Date: Fri Jul 5 17:56:47 2019 +0800 PCI: mobiveil: Fix the valid check for inbound and outbound windows In program_ib/ob_windows() check the window index from the function parameter instead of the total number of initialized windows to determine if the specified window is valid. Fixes: 9af6bcb11e12 ("PCI: mobiveil: Add Mobiveil PCIe Host Bridge IP driver") Signed-off-by: Hou Zhiqiang Signed-off-by: Lorenzo Pieralisi Reviewed-by: Minghuan Lian Reviewed-by: Subrahmanya Lingappa drivers/pci/controller/pcie-mobiveil.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ea0f1c959fb71dca26d30bbb9e3dccfb9da07a41 Author: Hou Zhiqiang Date: Fri Jul 5 17:56:46 2019 +0800 PCI: mobiveil: Clean-up program_{ib/ob}_windows() In function program_ob_windows(), remove the redundant read operations to registers PAB_AXI_AMAP_AXI_WIN and PAB_AXI_AMAP_PEX_WIN_H, and remove the useless definition of 'value'. Rename the parameter 'config_io_bit' to 'type' and then remove the definition of 'type'. In function program_ib_windows(), remove the definitions of 'pio_ctrl_val' and 'amap_ctrl_dw' and reduce to only one variable 'value' to keep the temporary value read from registers. Signed-off-by: Hou Zhiqiang Signed-off-by: Lorenzo Pieralisi Reviewed-by: Minghuan Lian Reviewed-by: Subrahmanya Lingappa drivers/pci/controller/pcie-mobiveil.c | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) commit afd899d3c8549cc82c8b329c0145e213c0755e60 Author: Hou Zhiqiang Date: Fri Jul 5 17:56:45 2019 +0800 PCI: mobiveil: Remove an unnecessary return value check The memory for the host controller private structure (struct mobiveil_pcie) is allocated together with the pci_host_bridge structure in function devm_pci_alloc_host_bridge(), so it is unnecessary to check the return value when get the private structure pointer. Remove the useless check. Signed-off-by: Hou Zhiqiang Signed-off-by: Lorenzo Pieralisi Reviewed-by: Minghuan Lian Reviewed-by: Subrahmanya Lingappa drivers/pci/controller/pcie-mobiveil.c | 2 -- 1 file changed, 2 deletions(-) commit e0a7e56368a4a58488c80693f0b630a0a05f6c8d Author: Hou Zhiqiang Date: Fri Jul 5 17:56:44 2019 +0800 PCI: mobiveil: Fix error return values Some error return values in the host controller driver are either unconventional or plain wrong. Update them all with the expected return values. Signed-off-by: Hou Zhiqiang Signed-off-by: Lorenzo Pieralisi Reviewed-by: Minghuan Lian Reviewed-by: Subrahmanya Lingappa drivers/pci/controller/pcie-mobiveil.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f97441f4c398b4ae29a4eb8439f9a09fcf26225a Author: Hou Zhiqiang Date: Fri Jul 5 17:56:43 2019 +0800 PCI: mobiveil: Refactor the MEM/IO outbound window initialization Move the resource type check into an if/else block and only set-up the outbound window for MEM and IO resource. No functional change intended. Signed-off-by: Hou Zhiqiang Signed-off-by: Lorenzo Pieralisi Reviewed-by: Minghuan Lian drivers/pci/controller/pcie-mobiveil.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 91347af1c5c32e1fe9a8294a526e1cfdfa7b6ac2 Author: Hou Zhiqiang Date: Fri Jul 5 17:56:42 2019 +0800 PCI: mobiveil: Make some register updates more readable To make some register updates more readable use a temporary value to hold the register value and carry out the update. Change the register update sequence to: - Read out the original value from the target register - Update the value - Program the updated value back to the register Signed-off-by: Hou Zhiqiang Signed-off-by: Lorenzo Pieralisi Reviewed-by: Minghuan Lian drivers/pci/controller/pcie-mobiveil.c | 43 ++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 18 deletions(-) commit e369faf6255df555644b33a22931dddff5e24755 Author: Hou Zhiqiang Date: Fri Jul 5 17:56:41 2019 +0800 PCI: mobiveil: Reformat the code for readability Reformat the code to make it more readable. No functional change intended. Signed-off-by: Hou Zhiqiang Signed-off-by: Lorenzo Pieralisi Reviewed-by: Minghuan Lian drivers/pci/controller/pcie-mobiveil.c | 208 +++++++++++++++++---------------- 1 file changed, 107 insertions(+), 101 deletions(-) commit 93bad0f5d15f3acd6d2ab0aee4a81ce1fcc6300d Author: Hou Zhiqiang Date: Fri Jul 5 17:56:40 2019 +0800 dt-bindings: PCI: mobiveil: Change gpio_slave and apb_csr to optional Change the "gpio_slave" and "apb_csr" to optional, the "gpio_slave" is not used in current code, and "apb_csr" is not used by some platforms. Signed-off-by: Hou Zhiqiang Signed-off-by: Lorenzo Pieralisi Acked-by: Subrahmanya Lingappa Acked-by: Rob Herring Reviewed-by: Minghuan Lian Reviewed-by: Subrahmanya Lingappa Documentation/devicetree/bindings/pci/mobiveil-pcie.txt | 2 ++ 1 file changed, 2 insertions(+) commit cbd50b3ca3964c79dac65fda277637577e029e8c Author: Hou Zhiqiang Date: Fri Jul 5 17:56:39 2019 +0800 PCI: mobiveil: Fix devfn check in mobiveil_pcie_valid_device() Current check for devfn number in mobiveil_pci_valid_device() is wrong in that it flags as invalid functions present in PCI device 0 in the root bus while it is perfectly valid to access all functions in PCI device 0 in the root bus. Update the check in mobiveil_pci_valid_device() to fix the issue. Fixes: 9af6bcb11e12 ("PCI: mobiveil: Add Mobiveil PCIe Host Bridge IP driver") Signed-off-by: Hou Zhiqiang Signed-off-by: Lorenzo Pieralisi Reviewed-by: Minghuan Lian drivers/pci/controller/pcie-mobiveil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6f3ab451aa5c2cbff33197d82fe8489cbd55ad91 Author: Hou Zhiqiang Date: Fri Jul 5 17:56:38 2019 +0800 PCI: mobiveil: Initialize Primary/Secondary/Subordinate bus numbers The reset value of Primary, Secondary and Subordinate bus numbers is zero which is a broken setup. Program a sensible default value for Primary/Secondary/Subordinate bus numbers. Signed-off-by: Hou Zhiqiang Signed-off-by: Lorenzo Pieralisi Reviewed-by: Minghuan Lian Reviewed-by: Subrahmanya Lingappa drivers/pci/controller/pcie-mobiveil.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 284441a9662cd3352396cf7d74edd9270f641916 Author: Hou Zhiqiang Date: Fri Jul 5 17:56:37 2019 +0800 PCI: mobiveil: Move IRQ chained handler setup out of DT parse The irq_set_chained_handler_and_data() call is not dependent on device tree firmware so it should be moved out of the DT parsing function for clarity. Signed-off-by: Hou Zhiqiang [lorenzo.pieralisi@arm.com: rewritten commit log] Signed-off-by: Lorenzo Pieralisi Reviewed-by: Minghuan Lian Reviewed-by: Subrahmanya Lingappa drivers/pci/controller/pcie-mobiveil.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 40af900c5f12ea3e4eda2688050a22dc1fee42d1 Author: Hou Zhiqiang Date: Fri Jul 5 17:56:36 2019 +0800 PCI: mobiveil: Move the link up waiting out of mobiveil_host_init() The host initializing sequence does not depend on the PCIe link being up, so move the link up check right before the code scanning the root bus for enumeration. Signed-off-by: Hou Zhiqiang Signed-off-by: Lorenzo Pieralisi Reviewed-by: Minghuan Lian Reviewed-by: Subrahmanya Lingappa drivers/pci/controller/pcie-mobiveil.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 0122af0a08243f344a438f924e5c2486486555b3 Author: Hou Zhiqiang Date: Fri Jul 5 17:56:35 2019 +0800 PCI: mobiveil: Fix the Class Code field Fix up the Class Code field in PCI configuration space and set it to PCI_CLASS_BRIDGE_PCI. Move the Class Code fixup to function mobiveil_host_init() where it belongs. Fixes: 9af6bcb11e12 ("PCI: mobiveil: Add Mobiveil PCIe Host Bridge IP driver") Signed-off-by: Hou Zhiqiang Signed-off-by: Lorenzo Pieralisi Reviewed-by: Minghuan Lian Reviewed-by: Subrahmanya Lingappa drivers/pci/controller/pcie-mobiveil.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 5ccd3bd992cf668b5a6fa1713da7b443a35e2930 Merge: c5d0e49e8d8f f785b42f4cb5 Author: Russell King Date: Wed Jul 3 10:30:58 2019 +0100 Merge branches 'fixes' and 'misc' Fix up the conflict between "VDSO: Drop implicit common-page-size linker flag" and "vdso: pass --be8 to linker if necessary" Signed-off-by: Russell King commit f7fee1b42fe4f8171a4b1cad05c61907c33c53f6 Author: Hou Zhiqiang Date: Fri Jul 5 17:56:34 2019 +0800 PCI: mobiveil: Use the 1st inbound window for MEM inbound transactions The inbound and outbound windows have completely separate control registers sets in the host controller MMIO space. Windows control register are accessed through an MMIO base address and an offset that depends on the window index. Since inbound and outbound windows control registers are completely separate there is no real need to use different window indexes in the inbound/outbound windows initialization routines to prevent clashing. To fix this inconsistency, change the MEM inbound window index to 0, mirroring the outbound window set-up. Signed-off-by: Hou Zhiqiang [lorenzo.pieralisi@arm.com: update commit log] Signed-off-by: Lorenzo Pieralisi Reviewed-by: Minghuan Lian Reviewed-by: Subrahmanya Lingappa drivers/pci/controller/pcie-mobiveil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f39ed3d09b34f733bb12178712019050bd8bd38d Author: Hou Zhiqiang Date: Fri Jul 5 17:56:33 2019 +0800 PCI: mobiveil: Use WIN_NUM_0 explicitly for CFG outbound window As the .map_bus() use the WIN_NUM_0 for CFG transactions, it is appropriate to pass WIN_NUM_0 explicitly when initializing the CFG outbound window rather than implicitly relying on the ob_wins_configure counter. Signed-off-by: Hou Zhiqiang Signed-off-by: Lorenzo Pieralisi Reviewed-by: Minghuan Lian Reviewed-by: Subrahmanya Lingappa drivers/pci/controller/pcie-mobiveil.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 9815d3288ed0540efc5f261ea1736f4327c4c9b5 Author: Hou Zhiqiang Date: Fri Jul 5 17:56:32 2019 +0800 PCI: mobiveil: Update the resource list traversal function Code that executes the resource list traversal does not need to delete any node therefore using the *_safe() API version is useless. Replace function resource_list_for_each_entry_safe() with the resource_list_for_each_entry() counterpart. Signed-off-by: Hou Zhiqiang Signed-off-by: Lorenzo Pieralisi Reviewed-by: Minghuan Lian Reviewed-by: Subrahmanya Lingappa drivers/pci/controller/pcie-mobiveil.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f99536e9d2f55996038158a6559d4254a7cc1693 Author: Hou Zhiqiang Date: Fri Jul 5 17:56:31 2019 +0800 PCI: mobiveil: Fix PCI base address in MEM/IO outbound windows The outbound memory windows PCI base addresses should be taken from the 'ranges' property of DT node to setup MEM/IO outbound windows decoding correctly instead of being hardcoded to zero. Update the code to retrieve the PCI base address for each range and use it to program the outbound windows address decoders Fixes: 9af6bcb11e12 ("PCI: mobiveil: Add Mobiveil PCIe Host Bridge IP driver") Signed-off-by: Hou Zhiqiang Signed-off-by: Lorenzo Pieralisi Reviewed-by: Minghuan Lian Reviewed-by: Subrahmanya Lingappa drivers/pci/controller/pcie-mobiveil.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit a131fb6364c1be0924dcb969ecf6b988c556a5d5 Author: Hou Zhiqiang Date: Fri Jul 5 17:56:30 2019 +0800 PCI: mobiveil: Remove the flag MSI_FLAG_MULTI_PCI_MSI The Mobiveil internal MSI controller requires separate target addresses, one per MSI vector; this is clearly incompatible with the Multiple MSI feature, which requires the same target address for all vectors requested by an endpoint (ie the Message Address field in the MSI Capability structure), so the multi MSI feature is clearly not supported by the host controller driver. Remove the flag MSI_FLAG_MULTI_PCI_MSI and with it multi MSI support, fixing the misconfiguration. Fixes: 1e913e58335f ("PCI: mobiveil: Add MSI support") Signed-off-by: Hou Zhiqiang [lorenzo.pieralisi@arm.com: commit log] Signed-off-by: Lorenzo Pieralisi Reviewed-by: Minghuan Lian drivers/pci/controller/pcie-mobiveil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bcbe0d9a8d931597202859d13506611dd9736da9 Author: Hou Zhiqiang Date: Fri Jul 5 17:56:29 2019 +0800 PCI: mobiveil: Unify register accessors It is confusing to have two sets of functions to read/write registers, some with csr_readl()/csr_writel(), while others with read_paged_register()/write_paged_register(). In the register space the lower 3KB of 4KB PCIe configure space can be accessed directly and higher 1KB through a simple paging mechanism. Unify the register accessors in csr_readl() and csr_writel() by comparing the register offset with page access boundary 3KB in the accessor internal so that the paging mechanism is hidden behind the csr_read()/write() common function calls. Signed-off-by: Hou Zhiqiang Signed-off-by: Lorenzo Pieralisi Reviewed-by: Minghuan Lian Reviewed-by: Subrahmanya Lingappa drivers/pci/controller/pcie-mobiveil.c | 179 +++++++++++++++++++++++---------- 1 file changed, 124 insertions(+), 55 deletions(-) commit 64372c0b7dcbc9ad08b1bad877ae8d8cddb62e45 Merge: 62fd33d3f519 371b86897d01 5d8cbf7176a4 b244883ca89c Author: Rafael J. Wysocki Date: Mon Jul 8 11:04:14 2019 +0200 Merge branches 'acpi-apei', 'acpi-doc' and 'acpi-soc' * acpi-apei: ACPI / APEI: Remove needless __ghes_check_estatus() calls * acpi-doc: docs: extcon: convert it to ReST and move to ACPI dir * acpi-soc: ACPI: APD: remove redundant assignment to pointer clk commit 62fd33d3f519ef84e17fde4d7b4f1e3b62e7156d Merge: 8ca572ec3c9c 02a93f35f57f Author: Rafael J. Wysocki Date: Mon Jul 8 11:04:00 2019 +0200 Merge branch 'acpica' * acpica: ACPICA: Update version to 20190703 ACPICA: Update table load object initialization ACPICA: Update for object initialization sequence ACPICA: remove legacy module-level code due to deprecation ACPICA: Namespace: simplify creation of the initial/default namespace ACPICA: Clear status of GPEs on first direct enable commit 8ca572ec3c9c0ad372550d3fd2535ad7b943f474 Merge: 417a564c6588 d06c47e3dd07 9fe51603d953 fb683f47a9fb b1954bbf1272 Author: Rafael J. Wysocki Date: Mon Jul 8 11:02:22 2019 +0200 Merge branches 'acpi-tables', 'acpi-osl', 'acpi-misc' and 'acpi-tools' * acpi-tables: ACPI: configfs: Resolve objects on host-directed table loads ACPI: tables: Allow BGRT to be overridden * acpi-osl: ACPI: OSL: Make a W=1 kernel-doc warning go away * acpi-misc: ACPI: Make AC and battery drivers available on !X86 * acpi-tools: ACPI: tools: Exclude tools/* from .gitignore patterns commit 586a07dca8c51b966960d1f0d8be9c27d7e0a95c Merge: 13b06b78c772 70a59fde6e69 Author: Rafael J. Wysocki Date: Mon Jul 8 11:00:02 2019 +0200 Merge branch 'pm-cpufreq' * pm-cpufreq: cpufreq: Avoid calling cpufreq_verify_current_freq() from handle_update() cpufreq: Consolidate cpufreq_update_current_freq() and __cpufreq_get() cpufreq: Don't skip frequency validation for has_target() drivers cpufreq: Use has_target() instead of !setpolicy cpufreq: Remove redundant !setpolicy check cpufreq: Move the IS_ENABLED(CPU_THERMAL) macro into a stub cpufreq: s5pv210: Don't flood kernel log after cpufreq change cpufreq: pcc-cpufreq: Fail initialization if driver cannot be registered cpufreq: add driver for Raspberry Pi cpufreq: Switch imx7d to imx-cpufreq-dt for speed grading cpufreq: imx-cpufreq-dt: Remove global platform match list cpufreq: brcmstb-avs-cpufreq: Fix types for voltage/frequency cpufreq: brcmstb-avs-cpufreq: Fix initial command check cpufreq: armada-37xx: Remove set but not used variable 'freq' cpufreq: imx-cpufreq-dt: Fix no OPPs available on unfused parts dt-bindings: imx-cpufreq-dt: Document opp-supported-hw usage cpufreq: Add imx-cpufreq-dt driver commit 13b06b78c772d64e2207e4a5a5329856fe2bf241 Merge: 3dbeb448543e 41de256b6fd4 338c993f9aa2 8eb835e4789a d382084f77b0 Author: Rafael J. Wysocki Date: Mon Jul 8 10:59:38 2019 +0200 Merge branches 'pm-opp', 'pm-misc', 'pm-avs' and 'pm-tools' * pm-opp: opp: Don't use IS_ERR on invalid supplies opp: Make dev_pm_opp_set_rate() handle freq = 0 to drop performance votes opp: Don't overwrite rounded clk rate opp: Allocate genpd_virt_devs from dev_pm_opp_attach_genpd() opp: Attach genpds to devices from within OPP core * pm-misc: PM / clk: Remove error message on out-of-memory condition drivers: base: power: clock_ops: Use of_clk_get_parent_count() * pm-avs: power: avs: smartreflex: no need to check return value of debugfs_create functions * pm-tools: cpupower : frequency-set -r option misses the last cpu in related cpu list cpupower: correct spelling of interval Add README and update pm-graph and sleepgraph docs Update to pm-graph 5.4 Update to pm-graph 5.3 commit 3dbeb448543efc01f04cadd6d358b9f33dd20d31 Merge: 50e163d43ab1 02bd45a28bf3 Author: Rafael J. Wysocki Date: Mon Jul 8 10:51:25 2019 +0200 Merge branch 'pm-sleep' * pm-sleep: PM: sleep: Drop dev_pm_skip_next_resume_phases() ACPI: PM: Drop unused function and function header ACPI: PM: Introduce "poweroff" callbacks for ACPI PM domain and LPSS ACPI: PM: Simplify and fix PM domain hibernation callbacks PCI: PM: Simplify bus-level hibernation callbacks PM: ACPI/PCI: Resume all devices during hibernation kernel: power: swap: use kzalloc() instead of kmalloc() followed by memset() PM: sleep: Update struct wakeup_source documentation drivers: base: power: remove wakeup_sources_stats_dentry variable PM: suspend: Rename pm_suspend_via_s2idle() PM: sleep: Show how long dpm_suspend_start() and dpm_suspend_end() take PM: hibernate: powerpc: Expose pfn_is_nosave() prototype commit 50e163d43ab123193a7f381528a7485881f730e9 Merge: 5004efbb3611 ad5a449b707b 9ed411c06dd1 Author: Rafael J. Wysocki Date: Mon Jul 8 10:49:36 2019 +0200 Merge branches 'acpi-pm' and 'pm-pci' * acpi-pm: ACPI: PM: Make acpi_sleep_state_supported() non-static ACPI: PM: Allow transitions to D0 to occur in special cases ACPI: PM: Avoid evaluating _PS3 on transitions from D3hot to D3cold ACPI / sleep: Switch to use acpi_dev_get_first_match_dev() ACPI / LPIT: Correct LPIT end address for lpit_process() * pm-pci: ACPI: PM: Unexport acpi_device_get_power() PCI: PM/ACPI: Refresh all stale power state data in pci_pm_complete() PCI / ACPI: Add _PR0 dependent devices ACPI / PM: Introduce concept of a _PR0 dependent device PCI / ACPI: Use cached ACPI device state to get PCI device power state PCI: Do not poll for PME if the device is in D3cold PCI: Add missing link delays required by the PCIe spec PCI: PM: Replace pci_dev_keep_suspended() with two functions PCI: PM: Avoid resuming devices in D3hot during system suspend commit c33d442328f556460b79aba6058adb37bb555389 Author: Greg Kroah-Hartman Date: Sat Jul 6 17:42:56 2019 +0200 debugfs: make error message a bit more verbose When a file/directory is already present in debugfs, and it is attempted to be created again, be more specific about what file/directory is being created and where it is trying to be created to give a bit more help to developers to figure out the problem. Cc: Stephen Rothwell Cc: Rafael J. Wysocki Cc: Mark Brown Cc: Takashi Iwai Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20190706154256.GA2683@kroah.com Signed-off-by: Greg Kroah-Hartman fs/debugfs/inode.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 24a20b0a443fd485852d51d08e98bbd9d212e0ec Author: Eugeniy Paltsev Date: Fri Jul 5 19:24:09 2019 +0300 ARC: [plat-hsdk]: Enable AXI DW DMAC in defconfig For some reasons my previous patch "Enable AXI DW DMAC support" was applied only partially (only device tree part). So enable AXI DW DMAC in HSDK defconfig to be able to use it in verification flow. Signed-off-by: Eugeniy Paltsev Signed-off-by: Vineet Gupta arch/arc/configs/hsdk_defconfig | 2 ++ 1 file changed, 2 insertions(+) commit aab128d006e709954f2a67b5e27a4c587a0584bd Author: Eugeniy Paltsev Date: Fri Jun 7 17:48:00 2019 +0300 ARC: [plat-hsdk]: enable DW SPI controller HSDK SoC has DW SPI controller. Enable it in preparation of enabling on-board SPI peripherals. Acked-by: Alexey Brodkin Signed-off-by: Eugeniy Paltsev Signed-off-by: Vineet Gupta arch/arc/boot/dts/hsdk.dts | 14 ++++++++++++++ arch/arc/configs/hsdk_defconfig | 3 +++ 2 files changed, 17 insertions(+) commit fd5de2721ea7d16e2b16c4049ac49f229551b290 Author: Arnd Bergmann Date: Wed Jul 3 15:39:25 2019 +0200 ARC: hide unused function unw_hdr_alloc As kernelci.org reports, this function is not used in vdk_hs38_defconfig: arch/arc/kernel/unwind.c:188:14: warning: 'unw_hdr_alloc' defined but not used [-Wunused-function] Fixes: bc79c9a72165 ("ARC: dw2 unwind: Reinstante unwinding out of modules") Link: https://kernelci.org/build/id/5d1cae3f59b514300340c132/logs/ Cc: stable@vger.kernel.org Signed-off-by: Arnd Bergmann Signed-off-by: Vineet Gupta arch/arc/kernel/unwind.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 94b8beb972c524f42078281c9950ed3a946455fa Author: Alexey Brodkin Date: Tue Jul 2 19:40:33 2019 +0300 ARC: [haps] Add Virtio support As a preparation for QEMU usage for ARC let's add basic Virtio-MMIO peripherals support for the platform we're going to use. For now we add 5 Virtio slots in .dts and enable block and network devices via Virtio-MMIO. Note even though typically Virtio register set fits in 0x200 bytes we "allocate" here 0x2000 so that it matches ARC's default 8KiB page size and so remapping of that area is done clearly. We also enable DEVTMPFS automount for more convenient use of external root file-stystem. Before that we used to use built-in Initramfs which didn't automount DEVTMPFS anyways so we didn't need that option, while now it starts making sense. Signed-off-by: Alexey Brodkin Cc: Rob Herring Signed-off-by: Vineet Gupta arch/arc/boot/dts/haps_hs.dts | 30 ++++++++++++++++++++++++++++++ arch/arc/configs/haps_hs_defconfig | 5 ++++- 2 files changed, 34 insertions(+), 1 deletion(-) commit 75370ad44075e832966a6dd1f6a649b8aee2325b Author: Vineet Gupta Date: Wed May 22 08:47:13 2019 -0700 ARCv2: entry: simplify return to Delay Slot via interrupt Commit 4255b07f2c9c43540 ("ARCv2: STAR 9000793984: Handle return from intr to Delay Slot") involved a complex 2 staged trampoline. Apparently this can be greatly simplified by returning from pure kernel mode (iso interrupt) so drop to pure kernel mdoe and execute the normal exception return path. Testing this was a bit of challenge as return from interrupt is rarely executed now after commit 4de0e52867d83105767 ("ARCv2: STAR 9000814690: Really Re-enable interrupts to avoid deadlocks"). That fix is necessary evil and pct interrupts etc do exercise intr return path. Anyhow after a revert of above in my local test setup I was able to hit this case and verify the patch works. Signed-off-by: Vineet Gupta arch/arc/kernel/entry-arcv2.S | 58 ++++++++----------------------------------- 1 file changed, 10 insertions(+), 48 deletions(-) commit 68e5c6f073bcf70da5f8eef88eb2d98f7c560bb6 Author: Vineet Gupta Date: Wed May 15 16:08:10 2019 -0700 ARC: entry: EV_Trap expects r10 (vs. r9) to have exception cause avoids 1 MOV instruction in light of double load/store code Signed-off-by: Vineet Gupta arch/arc/include/asm/entry-arcv2.h | 3 +-- arch/arc/include/asm/entry-compact.h | 4 ++-- arch/arc/kernel/entry-compact.S | 2 +- arch/arc/kernel/entry.S | 4 ++-- 4 files changed, 6 insertions(+), 7 deletions(-) commit 36c4357c63f382becfe1d9775ea0872135c8a8ab Author: Gary Lin Date: Fri Jul 5 03:54:58 2019 +0000 net: bpfilter: print umh messages to /dev/kmsg bpfilter_umh currently printed all messages to /dev/console and this might interfere the user activity(*). This commit changes the output device to /dev/kmsg so that the messages from bpfilter_umh won't show on the console directly. (*) https://bugzilla.suse.com/show_bug.cgi?id=1140221 Signed-off-by: Gary Lin Signed-off-by: David S. Miller net/bpfilter/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 61a582be1a668a0c1407a46f779965bfeff88784 Author: Xue Chaojing Date: Fri Jul 5 02:40:28 2019 +0000 hinic: add fw version query This patch adds firmware version query in ethtool -i. Signed-off-by: Xue Chaojing Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/huawei/hinic/hinic_ethtool.c | 8 ++++++ drivers/net/ethernet/huawei/hinic/hinic_hw_dev.h | 2 ++ drivers/net/ethernet/huawei/hinic/hinic_port.c | 30 +++++++++++++++++++++++ drivers/net/ethernet/huawei/hinic/hinic_port.h | 14 +++++++++++ 4 files changed, 54 insertions(+) commit 5c274ca4cfb22a455e880f61536b1894fa29fd17 Author: Vinod Koul Date: Mon Jul 8 09:42:55 2019 +0530 dmaengine: Revert "dmaengine: fsl-edma: add i.mx7ulp edma2 version support" This reverts commit 7144afd025b2 ("dmaengine: fsl-edma: add i.mx7ulp edma2 version support") as this fails to build with module option due to usage of of_irq_count() which is not an exported symbol as kernel drivers are *not* expected to use it (rightly so). Signed-off-by: Vinod Koul drivers/dma/fsl-edma-common.c | 18 +----------- drivers/dma/fsl-edma-common.h | 4 --- drivers/dma/fsl-edma.c | 66 ------------------------------------------- 3 files changed, 1 insertion(+), 87 deletions(-) commit f5f111c231f56e56e186c9a61a9d22fb8bf05faa Author: Ronnie Sahlberg Date: Sun Jul 7 07:45:42 2019 +1000 cifs: refactor and clean up arguments in the reparse point parsing Will be helpful as we improve handling of special file types. Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French fs/cifs/smb2ops.c | 66 ++++++++++++++++++++++++++----------------------------- 1 file changed, 31 insertions(+), 35 deletions(-) commit ff2a09e9196e2f9d5edc60d1a68bc3d3649d035b Author: Steve French Date: Sat Jul 6 14:41:38 2019 -0500 SMB3: query inode number on open via create context We can cut the number of roundtrips on open (may also help some rename cases as well) by returning the inode number in the SMB2 open request itself instead of querying it afterwards via a query FILE_INTERNAL_INFO. This should significantly improve the performance of posix open. Add SMB2_CREATE_QUERY_ON_DISK_ID create context request on open calls so that when server supports this we can save a roundtrip for QUERY_INFO on every open. Follow on patch will add the response processing for SMB2_CREATE_QUERY_ON_DISK_ID context and optimize smb2_open_file to avoid the extra network roundtrip on every posix open. This patch adds the context on SMB2/SMB3 open requests. Signed-off-by: Steve French fs/cifs/smb2pdu.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ fs/cifs/smb2pdu.h | 17 ++++++++++++----- 2 files changed, 60 insertions(+), 5 deletions(-) commit 96d3cca1241d6e56910b74435301e095705e1ebc Author: Steve French Date: Tue Jun 25 04:39:51 2019 -0500 smb3: Send netname context during negotiate protocol See MS-SMB2 2.2.3.1.4 Allows hostname to be used by load balancers Signed-off-by: Steve French fs/cifs/smb2pdu.c | 25 +++++++++++++++++++++++-- fs/cifs/smb2pdu.h | 6 ++++++ 2 files changed, 29 insertions(+), 2 deletions(-) commit 9fe5ff1c5d6a2a6c4ed4ba051a858571fdb7834c Author: Steve French Date: Mon Jun 24 20:39:04 2019 -0500 smb3: do not send compression info by default Since in theory a server could respond with compressed read responses even if not requested on read request (assuming that a compression negcontext is sent in negotiate protocol) - do not send compression information during negotiate protocol unless the user asks for compression explicitly (compression is experimental), and add a mount warning that compression is experimental. Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg fs/cifs/cifsglob.h | 1 + fs/cifs/connect.c | 8 ++++++++ fs/cifs/smb2pdu.c | 22 ++++++++++++---------- 3 files changed, 21 insertions(+), 10 deletions(-) commit 412094a8fb0711e9f332bed6723aa59706a4ff7e Author: Steve French Date: Mon Jun 24 02:01:42 2019 -0500 smb3: add new mount option to retrieve mode from special ACE There is a special ACE used by some servers to allow the mode bits to be stored. This can be especially helpful in scenarios in which the client is trusted, and access checking on the client vs the POSIX mode bits is sufficient. Add mount option to allow enabling this behavior. Follow on patch will add support for chmod and queryinfo (stat) by retrieving the POSIX mode bits from the special ACE, SID: S-1-5-88-3 See e.g. https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/hh509017(v=ws.10) Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg fs/cifs/cifs_fs_sb.h | 1 + fs/cifs/cifsfs.c | 2 ++ fs/cifs/cifsglob.h | 3 ++- fs/cifs/connect.c | 8 +++++++- 4 files changed, 12 insertions(+), 2 deletions(-) commit d5ecebc4900df7f6e8dff0717574668885110553 Author: Steve French Date: Fri Jun 28 02:04:18 2019 -0500 smb3: Allow query of symlinks stored as reparse points The 'NFS' style symlinks (see MS-FSCC 2.1.2.4) were not being queried properly in query_symlink. Fix this. Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg fs/cifs/smb2ops.c | 60 +++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 54 insertions(+), 6 deletions(-) commit f2caf901c1b7ce65f9e6aef4217e3241039db768 Author: Ronnie Sahlberg Date: Sat Jul 6 06:52:46 2019 +1000 cifs: Fix a race condition with cifs_echo_request There is a race condition with how we send (or supress and don't send) smb echos that will cause the client to incorrectly think the server is unresponsive and thus needs to be reconnected. Summary of the race condition: 1) Daisy chaining scheduling creates a gap. 2) If traffic comes unfortunate shortly after the last echo, the planned echo is suppressed. 3) Due to the gap, the next echo transmission is delayed until after the timeout, which is set hard to twice the echo interval. This is fixed by changing the timeouts from 2 to three times the echo interval. Detailed description of the bug: https://lutz.donnerhacke.de/eng/Blog/Groundhog-Day-with-SMB-remount Signed-off-by: Ronnie Sahlberg Reviewed-by: Pavel Shilovsky Signed-off-by: Steve French fs/cifs/connect.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 3e2725796cbdfe4efc7eb7b27cacaeac2ddad1a5 Author: Ronnie Sahlberg Date: Sat Jul 6 06:43:08 2019 +1000 cifs: always add credits back for unsolicited PDUs not just if CONFIG_CIFS_DEBUG2 is enabled. Signed-off-by: Ronnie Sahlberg Reviewed-by: Pavel Shilovsky CC: Stable Signed-off-by: Steve French fs/cifs/connect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0aa3a24be011676b7231fde9a5b39ae6cd3092b4 Author: Hariprasad Kelam Date: Tue Jul 2 23:50:02 2019 +0530 fs: cifs: cifsssmb: Change return type of convert_ace_to_cifs_ace Change return from int to void of convert_ace_to_cifs_ace as it never fails. fixes below issue reported by coccicheck fs/cifs/cifssmb.c:3606:7-9: Unneeded variable: "rc". Return "0" on line 3620 Signed-off-by: Hariprasad Kelam Signed-off-by: Steve French fs/cifs/cifssmb.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) commit e7348e35a34dc61d161f44b0e42e6a041337595c Author: Steve French Date: Fri Jun 28 02:35:10 2019 -0500 add some missing definitions query on disk id structure definition was missing Signed-off-by: Steve French fs/cifs/smb2pdu.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit 63d614a608fcfcd891b0713d818530c93ef1b69b Author: Colin Ian King Date: Mon Jun 24 17:39:43 2019 +0100 cifs: fix typo in debug message with struct field ia_valid Field ia_valid is being debugged with the field name iavalid, fix this. Signed-off-by: Colin Ian King Signed-off-by: Steve French fs/cifs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3190b59a050ecdbdc86602af506b35f40fd2332e Author: Aurelien Aptel Date: Mon Jun 24 13:00:12 2019 -0500 smb3: minor cleanup of compound_send_recv Trivial cleanup. Will make future multichannel code smaller as well. Signed-off-by: Aurelien Aptel Reviewed-by: Ronnie Sahlberg Signed-off-by: Steve French fs/cifs/transport.c | 46 ++++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 22 deletions(-) commit e7a1a2df4dfdae0cb9bfff6edaa6a159cbe33932 Author: Steve French Date: Sun Jun 30 18:00:41 2019 -0500 CIFS: Fix module dependency KEYS is required not that CONFIG_CIFS_ACL is always on and the ifdef for it removed. Signed-off-by: Steve French fs/cifs/Kconfig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 73cf8085dc09442f17f32972d3cdec7232f1be55 Author: Steve French Date: Mon Jun 24 01:44:11 2019 -0500 cifs: simplify code by removing CONFIG_CIFS_ACL ifdef SMB3 ACL support is needed for many use cases now and should not be ifdeffed out, even for SMB1 (CIFS). Remove the CONFIG_CIFS_ACL ifdef so ACL support is always built into cifs.ko Signed-off-by: Steve French fs/cifs/Kconfig | 8 -------- fs/cifs/Makefile | 3 +-- fs/cifs/cifs_debug.c | 2 -- fs/cifs/cifsfs.c | 6 ------ fs/cifs/cifsglob.h | 2 -- fs/cifs/cifssmb.c | 2 -- fs/cifs/inode.c | 6 ------ fs/cifs/smb1ops.c | 2 -- fs/cifs/smb2ops.c | 12 ------------ fs/cifs/xattr.c | 4 ---- 10 files changed, 1 insertion(+), 46 deletions(-) commit 6552d6a0264de505d3bb1445aecf757b1ec3873a Author: Steve French Date: Mon Jun 24 01:19:52 2019 -0500 cifs: Fix check for matching with existing mount If we mount the same share twice, we check the flags to see if the second mount matches the earlier mount, but we left some flags out. Signed-off-by: Steve French fs/cifs/cifsglob.h | 1 + 1 file changed, 1 insertion(+) commit 29fbeb7a908a60a5ae8c50fbe171cb8fdcef1980 Author: Paulo Alcantara (SUSE) Date: Tue Jun 18 16:16:02 2019 -0300 cifs: Properly handle auto disabling of serverino option Fix mount options comparison when serverino option is turned off later in cifs_autodisable_serverino() and thus avoiding mismatch of new cifs mounts. Cc: stable@vger.kernel.org Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French Reviewed-by: Pavel Shilovsky fs/cifs/cifs_fs_sb.h | 5 +++++ fs/cifs/connect.c | 8 ++++++-- fs/cifs/misc.c | 1 + 3 files changed, 12 insertions(+), 2 deletions(-) commit dc179268cde43e0fb17e03507f09a3485625e52f Author: Steve French Date: Mon Jun 17 17:34:57 2019 -0500 smb3: if max_credits is specified then display it in /proc/mounts If "max_credits" is overridden from its default by specifying it on the smb3 mount then display it in /proc/mounts Signed-off-by: Steve French fs/cifs/cifsfs.c | 5 +++++ 1 file changed, 5 insertions(+) commit 43cdae88de2e8ec101961708ef7e51ba96776035 Author: Steve French Date: Thu Jun 13 14:26:49 2019 -0500 Fix match_server check to allow for auto dialect negotiate When using multidialect negotiate (default or specifying vers=3.0 which allows any smb3 dialect), fix how we check for an existing server session. Before this fix if you mounted a second time to the same server (e.g. a different share on the same server) we would only reuse the existing smb session if a single dialect were requested (e.g. specifying vers=2.1 or vers=3.0 or vers=3.1.1 on the mount command). If a default mount (e.g. not specifying vers=) is done then would always create a new socket connection and SMB3 (or SMB3.1.1) session each time we connect to a different share on the same server rather than reusing the existing one. Signed-off-by: Steve French Reviewed-by: Pavel Shilovsky fs/cifs/connect.c | 11 +++++++++-- fs/cifs/smb1ops.c | 1 + fs/cifs/smb2pdu.h | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) commit 5fc3681fa5ed5cbbe70592967dcfa8f0848f75c0 Author: Aurelien Aptel Date: Fri Jun 14 21:46:35 2019 +0200 cifs: add missing GCM module dependency Signed-off-by: Aurelien Aptel Signed-off-by: Steve French fs/cifs/Kconfig | 1 + fs/cifs/cifsfs.c | 1 + 2 files changed, 2 insertions(+) commit 2b2f7548076200b69ee377b4bb4f426696502b04 Author: Steve French Date: Fri Jun 7 15:16:10 2019 -0500 SMB3.1.1: Add GCM crypto to the encrypt and decrypt functions SMB3.1.1 GCM performs much better than the older CCM default: more than twice as fast in the write patch (copy to the Samba server on localhost for example) and 80% faster on the read patch (copy from the server). Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg Reviewed-by: Pavel Shilovsky fs/cifs/smb2ops.c | 18 +++++++++++++----- fs/cifs/smb2transport.c | 10 ++++++++-- 2 files changed, 21 insertions(+), 7 deletions(-) commit 9ac63ec7760957658700890038d804ec6c26ed34 Author: Steve French Date: Fri Jun 7 08:59:40 2019 -0500 SMB3: Add SMB3.1.1 GCM to negotiated crypto algorigthms GCM is faster. Request it during negotiate protocol. Followon patch will add callouts to GCM crypto Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg Reviewed-by: Pavel Shilovsky fs/cifs/smb2ops.c | 4 ++-- fs/cifs/smb2pdu.c | 8 ++++---- fs/cifs/smb2pdu.h | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) commit 06f2fca7ff51d87c82fc911759373be5e1d0f7b6 Author: Kefeng Wang Date: Wed Jun 5 22:24:25 2019 +0800 fs: cifs: Drop unlikely before IS_ERR(_OR_NULL) IS_ERR(_OR_NULL) already contain an 'unlikely' compiler flag, so no need to do that again from its callers. Drop it. Cc: linux-cifs@vger.kernel.org Signed-off-by: Kefeng Wang Signed-off-by: Steve French Reviewed-by: Paulo Alcantara fs/cifs/dfs_cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d81f09748dd705c4480c804146e5ee48a13f0c74 Author: YueHaibing Date: Sat Jun 1 03:31:10 2019 +0000 cifs: Use kmemdup in SMB2_ioctl_init() Use kmemdup rather than duplicating its implementation This was reported by coccinelle. Signed-off-by: YueHaibing Signed-off-by: Steve French fs/cifs/smb2pdu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 877cb240f6a000078aabcd57f8ef7765d9fdf134 Author: Wei Yongjun Date: Fri Jul 5 01:16:42 2019 +0000 gve: Fix error return code in gve_alloc_qpls() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: f5cedc84a30d ("gve: Add transmit and receive support") Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller drivers/net/ethernet/google/gve/gve_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 6b4ddf9950c38969f666dea1509955bd99120c4f Author: Joe Perches Date: Thu Jul 4 16:57:46 2019 -0700 net: nixge: Fix misuse of strlcpy Probable cut&paste typo - use the correct field size. Signed-off-by: Joe Perches Signed-off-by: David S. Miller drivers/net/ethernet/ni/nixge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7391324ba485f1579afe1e1baa0a44309612b894 Author: Joe Perches Date: Thu Jul 4 16:57:45 2019 -0700 net: ethernet: sun4i-emac: Fix misuse of strlcpy Probable cut&paste typo - use the correct field size. Signed-off-by: Joe Perches Signed-off-by: David S. Miller drivers/net/ethernet/allwinner/sun4i-emac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 07996783491f94d55ef3bfffaadf6cb8412d5f2a Merge: ccd1479e4839 e30155fd23c9 Author: David S. Miller Date: Sun Jul 7 18:42:48 2019 -0700 Merge branch 'gtp-fix-several-bugs' Taehee Yoo says: ==================== gtp: fix several bugs This patch series fixes several bugs in the gtp module. First patch fixes suspicious RCU usage. The problem is to use rcu_dereference_sk_user_data() outside of RCU read critical section. Second patch fixes use-after-free. gtp_encap_destroy() is called twice. gtp_encap_destroy() use both gtp->sk0 and gtp->sk1u. these pointers can be freed in gtp_encap_destroy(). So, gtp_encap_destroy() should avoid using freed sk pointer. Third patch removes duplicate code in gtp_dellink(). gtp_dellink() calls gtp_encap_disable() twice. So, remove one of them. Fourth patch fixes usage of GFP_KERNEL. GFP_KERNEL can not be used in RCU read critical section. This patch make ipv4_pdp_add() to use GFP_ATOMIC instead of GFP_KERNEL. Fifth patch fixes use-after-free in gtp_newlink(). gtp_newlink() uses gtp_net which would be destroyed by the __exit_net routine. So, gtp_newlink should not be called after the __exit_net routine. Sixth patch adds missing error handling routine in gtp_encap_enable(). gtp_encap_enable() will fail, if invalid role value is sent from user-space. if so, gtp_encap_enable() should execute error handling routine. ==================== Signed-off-by: David S. Miller commit e30155fd23c9c141cbe7d99b786e10a83a328837 Author: Taehee Yoo Date: Wed Jul 3 00:24:04 2019 +0900 gtp: add missing gtp_encap_disable_sock() in gtp_encap_enable() If an invalid role is sent from user space, gtp_encap_enable() will fail. Then, it should call gtp_encap_disable_sock() but current code doesn't. It makes memory leak. Fixes: 91ed81f9abc7 ("gtp: support SGSN-side tunnels") Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller drivers/net/gtp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit a2bed90704c68d3763bf24decb1b781a45395de8 Author: Taehee Yoo Date: Wed Jul 3 00:23:42 2019 +0900 gtp: fix use-after-free in gtp_newlink() Current gtp_newlink() could be called after unregister_pernet_subsys(). gtp_newlink() uses gtp_net but it can be destroyed by unregister_pernet_subsys(). So unregister_pernet_subsys() should be called after rtnl_link_unregister(). Test commands: #SHELL 1 while : do for i in {1..5} do ./gtp-link add gtp$i & done killall gtp-link done #SHELL 2 while : do modprobe -rv gtp done Splat looks like: [ 753.176631] BUG: KASAN: use-after-free in gtp_newlink+0x9b4/0xa5c [gtp] [ 753.177722] Read of size 8 at addr ffff8880d48f2458 by task gtp-link/7126 [ 753.179082] CPU: 0 PID: 7126 Comm: gtp-link Tainted: G W 5.2.0-rc6+ #50 [ 753.185801] Call Trace: [ 753.186264] dump_stack+0x7c/0xbb [ 753.186863] ? gtp_newlink+0x9b4/0xa5c [gtp] [ 753.187583] print_address_description+0xc7/0x240 [ 753.188382] ? gtp_newlink+0x9b4/0xa5c [gtp] [ 753.189097] ? gtp_newlink+0x9b4/0xa5c [gtp] [ 753.189846] __kasan_report+0x12a/0x16f [ 753.190542] ? gtp_newlink+0x9b4/0xa5c [gtp] [ 753.191298] kasan_report+0xe/0x20 [ 753.191893] gtp_newlink+0x9b4/0xa5c [gtp] [ 753.192580] ? __netlink_ns_capable+0xc3/0xf0 [ 753.193370] __rtnl_newlink+0xb9f/0x11b0 [ ... ] [ 753.241201] Allocated by task 7186: [ 753.241844] save_stack+0x19/0x80 [ 753.242399] __kasan_kmalloc.constprop.3+0xa0/0xd0 [ 753.243192] __kmalloc+0x13e/0x300 [ 753.243764] ops_init+0xd6/0x350 [ 753.244314] register_pernet_operations+0x249/0x6f0 [ ... ] [ 753.251770] Freed by task 7178: [ 753.252288] save_stack+0x19/0x80 [ 753.252833] __kasan_slab_free+0x111/0x150 [ 753.253962] kfree+0xc7/0x280 [ 753.254509] ops_free_list.part.11+0x1c4/0x2d0 [ 753.255241] unregister_pernet_operations+0x262/0x390 [ ... ] [ 753.285883] list_add corruption. next->prev should be prev (ffff8880d48f2458), but was ffff8880d497d878. (next. [ 753.287241] ------------[ cut here ]------------ [ 753.287794] kernel BUG at lib/list_debug.c:25! [ 753.288364] invalid opcode: 0000 [#1] SMP DEBUG_PAGEALLOC KASAN PTI [ 753.289099] CPU: 0 PID: 7126 Comm: gtp-link Tainted: G B W 5.2.0-rc6+ #50 [ 753.291036] RIP: 0010:__list_add_valid+0x74/0xd0 [ 753.291589] Code: 48 39 da 75 27 48 39 f5 74 36 48 39 dd 74 31 48 83 c4 08 b8 01 00 00 00 5b 5d c3 48 89 d9 48b [ 753.293779] RSP: 0018:ffff8880cae8f398 EFLAGS: 00010286 [ 753.294401] RAX: 0000000000000075 RBX: ffff8880d497d878 RCX: 0000000000000000 [ 753.296260] RDX: 0000000000000075 RSI: 0000000000000008 RDI: ffffed10195d1e69 [ 753.297070] RBP: ffff8880cd250ae0 R08: ffffed101b4bff21 R09: ffffed101b4bff21 [ 753.297899] R10: 0000000000000001 R11: ffffed101b4bff20 R12: ffff8880d497d878 [ 753.298703] R13: 0000000000000000 R14: ffff8880cd250ae0 R15: ffff8880d48f2458 [ 753.299564] FS: 00007f5f79805740(0000) GS:ffff8880da400000(0000) knlGS:0000000000000000 [ 753.300533] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 753.301231] CR2: 00007fe8c7ef4f10 CR3: 00000000b71a6006 CR4: 00000000000606f0 [ 753.302183] Call Trace: [ 753.302530] gtp_newlink+0x5f6/0xa5c [gtp] [ 753.303037] ? __netlink_ns_capable+0xc3/0xf0 [ 753.303576] __rtnl_newlink+0xb9f/0x11b0 [ 753.304092] ? rtnl_link_unregister+0x230/0x230 Fixes: 459aa660eb1d ("gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U)") Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller drivers/net/gtp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3f167e1921865b379a9becf03828e7202c7b4917 Author: Taehee Yoo Date: Wed Jul 3 00:23:13 2019 +0900 gtp: fix Illegal context switch in RCU read-side critical section. ipv4_pdp_add() is called in RCU read-side critical section. So GFP_KERNEL should not be used in the function. This patch make ipv4_pdp_add() to use GFP_ATOMIC instead of GFP_KERNEL. Test commands: gtp-link add gtp1 & gtp-tunnel add gtp1 v1 100 200 1.1.1.1 2.2.2.2 Splat looks like: [ 130.618881] ============================= [ 130.626382] WARNING: suspicious RCU usage [ 130.626994] 5.2.0-rc6+ #50 Not tainted [ 130.627622] ----------------------------- [ 130.628223] ./include/linux/rcupdate.h:266 Illegal context switch in RCU read-side critical section! [ 130.629684] [ 130.629684] other info that might help us debug this: [ 130.629684] [ 130.631022] [ 130.631022] rcu_scheduler_active = 2, debug_locks = 1 [ 130.632136] 4 locks held by gtp-tunnel/1025: [ 130.632925] #0: 000000002b93c8b7 (cb_lock){++++}, at: genl_rcv+0x15/0x40 [ 130.634159] #1: 00000000f17bc999 (genl_mutex){+.+.}, at: genl_rcv_msg+0xfb/0x130 [ 130.635487] #2: 00000000c644ed8e (rtnl_mutex){+.+.}, at: gtp_genl_new_pdp+0x18c/0x1150 [gtp] [ 130.636936] #3: 0000000007a1cde7 (rcu_read_lock){....}, at: gtp_genl_new_pdp+0x187/0x1150 [gtp] [ 130.638348] [ 130.638348] stack backtrace: [ 130.639062] CPU: 1 PID: 1025 Comm: gtp-tunnel Not tainted 5.2.0-rc6+ #50 [ 130.641318] Call Trace: [ 130.641707] dump_stack+0x7c/0xbb [ 130.642252] ___might_sleep+0x2c0/0x3b0 [ 130.642862] kmem_cache_alloc_trace+0x1cd/0x2b0 [ 130.643591] gtp_genl_new_pdp+0x6c5/0x1150 [gtp] [ 130.644371] genl_family_rcv_msg+0x63a/0x1030 [ 130.645074] ? mutex_lock_io_nested+0x1090/0x1090 [ 130.645845] ? genl_unregister_family+0x630/0x630 [ 130.646592] ? debug_show_all_locks+0x2d0/0x2d0 [ 130.647293] ? check_flags.part.40+0x440/0x440 [ 130.648099] genl_rcv_msg+0xa3/0x130 [ ... ] Fixes: 459aa660eb1d ("gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U)") Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller drivers/net/gtp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a635037ac1106202118a6cccc83c877caa6e1c9a Author: Taehee Yoo Date: Wed Jul 3 00:22:56 2019 +0900 gtp: remove duplicate code in gtp_dellink() gtp_encap_disable() in gtp_dellink() is unnecessary because it will be called by unregister_netdevice(). unregister_netdevice() internally calls gtp_dev_uninit() by ->ndo_uninit(). And gtp_dev_uninit() calls gtp_encap_disable(). Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller drivers/net/gtp.c | 1 - 1 file changed, 1 deletion(-) commit 1788b8569f5de27da09087fa3f6580d2aa04cc75 Author: Taehee Yoo Date: Wed Jul 3 00:22:25 2019 +0900 gtp: fix use-after-free in gtp_encap_destroy() gtp_encap_destroy() is called twice. 1. When interface is deleted. 2. When udp socket is destroyed. either gtp->sk0 or gtp->sk1u could be freed by sock_put() in gtp_encap_destroy(). so, when gtp_encap_destroy() is called again, it would uses freed sk pointer. patch makes gtp_encap_destroy() to set either gtp->sk0 or gtp->sk1u to null. in addition, both gtp->sk0 and gtp->sk1u pointer are protected by rtnl_lock. so, rtnl_lock() is added. Test command: gtp-link add gtp1 & killall gtp-link ip link del gtp1 Splat looks like: [ 83.182767] BUG: KASAN: use-after-free in __lock_acquire+0x3a20/0x46a0 [ 83.184128] Read of size 8 at addr ffff8880cc7d5360 by task ip/1008 [ 83.185567] CPU: 1 PID: 1008 Comm: ip Not tainted 5.2.0-rc6+ #50 [ 83.188469] Call Trace: [ ... ] [ 83.200126] lock_acquire+0x141/0x380 [ 83.200575] ? lock_sock_nested+0x3a/0xf0 [ 83.201069] _raw_spin_lock_bh+0x38/0x70 [ 83.201551] ? lock_sock_nested+0x3a/0xf0 [ 83.202044] lock_sock_nested+0x3a/0xf0 [ 83.202520] gtp_encap_destroy+0x18/0xe0 [gtp] [ 83.203065] gtp_encap_disable.isra.14+0x13/0x50 [gtp] [ 83.203687] gtp_dellink+0x56/0x170 [gtp] [ 83.204190] rtnl_delete_link+0xb4/0x100 [ ... ] [ 83.236513] Allocated by task 976: [ 83.236925] save_stack+0x19/0x80 [ 83.237332] __kasan_kmalloc.constprop.3+0xa0/0xd0 [ 83.237894] kmem_cache_alloc+0xd8/0x280 [ 83.238360] sk_prot_alloc.isra.42+0x50/0x200 [ 83.238874] sk_alloc+0x32/0x940 [ 83.239264] inet_create+0x283/0xc20 [ 83.239684] __sock_create+0x2dd/0x540 [ 83.240136] __sys_socket+0xca/0x1a0 [ 83.240550] __x64_sys_socket+0x6f/0xb0 [ 83.240998] do_syscall_64+0x9c/0x450 [ 83.241466] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 83.242061] [ 83.242249] Freed by task 0: [ 83.242616] save_stack+0x19/0x80 [ 83.243013] __kasan_slab_free+0x111/0x150 [ 83.243498] kmem_cache_free+0x89/0x250 [ 83.244444] __sk_destruct+0x38f/0x5a0 [ 83.245366] rcu_core+0x7e9/0x1c20 [ 83.245766] __do_softirq+0x213/0x8fa Fixes: 1e3a3abd8b28 ("gtp: make GTP sockets in gtp_newlink optional") Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller drivers/net/gtp.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit e198987e7dd7d3645a53875151cd6f8fc425b706 Author: Taehee Yoo Date: Wed Jul 3 00:20:51 2019 +0900 gtp: fix suspicious RCU usage gtp_encap_enable_socket() and gtp_encap_destroy() are not protected by rcu_read_lock(). and it's not safe to write sk->sk_user_data. This patch make these functions to use lock_sock() instead of rcu_dereference_sk_user_data(). Test commands: gtp-link add gtp1 Splat looks like: [ 83.238315] ============================= [ 83.239127] WARNING: suspicious RCU usage [ 83.239702] 5.2.0-rc6+ #49 Not tainted [ 83.240268] ----------------------------- [ 83.241205] drivers/net/gtp.c:799 suspicious rcu_dereference_check() usage! [ 83.243828] [ 83.243828] other info that might help us debug this: [ 83.243828] [ 83.246325] [ 83.246325] rcu_scheduler_active = 2, debug_locks = 1 [ 83.247314] 1 lock held by gtp-link/1008: [ 83.248523] #0: 0000000017772c7f (rtnl_mutex){+.+.}, at: __rtnl_newlink+0x5f5/0x11b0 [ 83.251503] [ 83.251503] stack backtrace: [ 83.252173] CPU: 0 PID: 1008 Comm: gtp-link Not tainted 5.2.0-rc6+ #49 [ 83.253271] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 [ 83.254562] Call Trace: [ 83.254995] dump_stack+0x7c/0xbb [ 83.255567] gtp_encap_enable_socket+0x2df/0x360 [gtp] [ 83.256415] ? gtp_find_dev+0x1a0/0x1a0 [gtp] [ 83.257161] ? memset+0x1f/0x40 [ 83.257843] gtp_newlink+0x90/0xa21 [gtp] [ 83.258497] ? __netlink_ns_capable+0xc3/0xf0 [ 83.259260] __rtnl_newlink+0xb9f/0x11b0 [ 83.260022] ? rtnl_link_unregister+0x230/0x230 [ ... ] Fixes: 1e3a3abd8b28 ("gtp: make GTP sockets in gtp_newlink optional") Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller drivers/net/gtp.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit ad7b134f65385627ebe9b3162a652267c8d991ee Merge: 30a4616c1bfd 1da39ff09e56 Author: David S. Miller Date: Sun Jul 7 14:16:32 2019 -0700 Merge branch 'net-dsa-Add-Vitesse-VSC73xx-parallel-mode' Pawel Dembicki says: ==================== net: dsa: Add Vitesse VSC73xx parallel mode Main goal of this patch series is to add support for CPU attached parallel bus in Vitesse VSC73xx switches. Existing driver supports only SPI mode. Second change is needed for devices in unmanaged state. V3: - fix commit messages and descriptions about memory-mapped I/O mode V2: - drop changes in compatible strings - make changes less invasive - drop mutex in platform part and move mutex from core to spi part - fix indentation - fix devm_ioremap_resource result check - add cover letter ==================== Signed-off-by: David S. Miller commit 1da39ff09e561df9062342563ce8db9b9181a3de Author: Pawel Dembicki Date: Fri Jul 5 00:29:07 2019 +0200 net: dsa: vsc73xx: Assert reset if iCPU is enabled Driver allow to use devices with disabled iCPU only. Some devices have pre-initialised iCPU by bootloader. That state make switch unmanaged. This patch force reset if device is in unmanaged state. In the result chip lost internal firmware from RAM and it can be managed. Signed-off-by: Pawel Dembicki Reviewed-by: Linus Walleij Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/vitesse-vsc73xx-core.c | 36 ++++++++++++++++------------------ 1 file changed, 17 insertions(+), 19 deletions(-) commit 631e83bf7c0e801f0ab960a97a3228b2dbf9ebeb Author: Pawel Dembicki Date: Fri Jul 5 00:29:06 2019 +0200 net: dsa: vsc73xx: add support for parallel mode This patch add platform part of vsc73xx driver. It allows to use chip connected to a parallel memory bus and work in memory-mapped I/O mode. (aka PI bus in chip manual) By default device is working in big endian mode. Signed-off-by: Pawel Dembicki Reviewed-by: Linus Walleij Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/Kconfig | 9 ++ drivers/net/dsa/Makefile | 1 + drivers/net/dsa/vitesse-vsc73xx-platform.c | 164 +++++++++++++++++++++++++++++ 3 files changed, 174 insertions(+) commit 95711cd5f0b4b0394f2e0c30fdd99b853317ed49 Author: Pawel Dembicki Date: Fri Jul 5 00:29:05 2019 +0200 net: dsa: vsc73xx: Split vsc73xx driver This driver (currently) only takes control of the switch chip over SPI and configures it to route packages around when connected to a CPU port. But Vitesse chip support also parallel interface. This patch split driver into two parts: core and spi. It is required for add support to another managing interface. Tested-by: Linus Walleij Signed-off-by: Pawel Dembicki Reviewed-by: Linus Walleij Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/Kconfig | 11 +- drivers/net/dsa/Makefile | 3 +- .../{vitesse-vsc73xx.c => vitesse-vsc73xx-core.c} | 170 ++--------------- drivers/net/dsa/vitesse-vsc73xx-spi.c | 203 +++++++++++++++++++++ drivers/net/dsa/vitesse-vsc73xx.h | 29 +++ 5 files changed, 254 insertions(+), 162 deletions(-) commit 86116f4d649bec311bbf3ee50a1eb582e3fcfd9c Author: Pawel Dembicki Date: Fri Jul 5 00:29:04 2019 +0200 net: dsa: Change DT bindings for Vitesse VSC73xx switches This commit introduce how to use vsc73xx platform driver. Signed-off-by: Pawel Dembicki Reviewed-by: Linus Walleij Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller .../bindings/net/dsa/vitesse,vsc73xx.txt | 58 ++++++++++++++++++++-- 1 file changed, 54 insertions(+), 4 deletions(-) commit ccd1479e48391674ff76002a92b75defc3c78257 Merge: 537de0c8ca2b 81a89ef6be5b Author: David S. Miller Date: Sun Jul 7 14:11:45 2019 -0700 Merge branch 'net-tls-fix-poll-wake-up' Jakub Kicinski says: ==================== net/tls: fix poll() wake up This small fix + selftest series is very similar to the previous commit 04b25a5411f9 ("net/tls: fix no wakeup on partial reads"). This time instead of recvmsg we're fixing poll wake up. ==================== Signed-off-by: David S. Miller commit 81a89ef6be5befcc5a168af1aca377670bbf4997 Author: Jakub Kicinski Date: Thu Jul 4 14:50:37 2019 -0700 selftests/tls: add test for poll() with data in TLS ULP Add a test which checks if leftover record data in TLS layer correctly wakes up poll(). Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller tools/testing/selftests/net/tls.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 13aecb17acabc2a92187d08f7ca93bb8aad62c6f Author: Jakub Kicinski Date: Thu Jul 4 14:50:36 2019 -0700 net/tls: fix poll ignoring partially copied records David reports that RPC applications which use epoll() occasionally get stuck, and that TLS ULP causes the kernel to not wake applications, even though read() will return data. This is indeed true. The ctx->rx_list which holds partially copied records is not consulted when deciding whether socket is readable. Note that SO_RCVLOWAT with epoll() is and has always been broken for kernel TLS. We'd need to parse all records from the TCP layer, instead of just the first one. Fixes: 692d7b5d1f91 ("tls: Fix recvmsg() to be able to peek across multiple records") Reported-by: David Beckett Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller net/tls/tls_sw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 46ce10df799fb0647a9c0e3f793e66463a8d6773 Merge: 3bb4bba79254 8d1336c241bd Author: Miquel Raynal Date: Sun Jul 7 22:53:15 2019 +0200 Merge tag 'spi-nor/for-5.3-v2' of gitolite.kernel.org:pub/scm/linux/kernel/git/mtd/linux into mtd/next SPI-NOR core changes: - add support for the mt25ql02g and w25q16jv flashes - print error in case of jedec read id fails - is25lp256: add post BFPT fix to correct the addr_width SPI NOR controller drivers changes: - intel-spi: Add support for Intel Elkhart Lake SPI serial flash - smt32: remove the driver as the driver was replaced by spi-stm32-qspi.c - cadence-quadspi: add reset control commit 05c78468a60f2fd961cd0a0c01c27f288bf81204 Author: Arnaldo Carvalho de Melo Date: Thu Jun 13 12:04:19 2019 -0300 tools build: Check if gettid() is available before providing helper Laura reported that the perf build failed in fedora when we got a glibc that provides gettid(), which I reproduced using fedora rawhide with the glibc-devel-2.29.9000-26.fc31.x86_64 package. Add a feature check to avoid providing a gettid() helper in such systems. On a fedora rawhide system with this patch applied we now get: [root@7a5f55352234 perf]# grep gettid /tmp/build/perf/FEATURE-DUMP feature-gettid=1 [root@7a5f55352234 perf]# cat /tmp/build/perf/feature/test-gettid.make.output [root@7a5f55352234 perf]# ldd /tmp/build/perf/feature/test-gettid.bin linux-vdso.so.1 (0x00007ffc6b1f6000) libc.so.6 => /lib64/libc.so.6 (0x00007f04e0a74000) /lib64/ld-linux-x86-64.so.2 (0x00007f04e0c47000) [root@7a5f55352234 perf]# nm /tmp/build/perf/feature/test-gettid.bin | grep -w gettid U gettid@@GLIBC_2.30 [root@7a5f55352234 perf]# While on a fedora:29 system: [acme@quaco perf]$ grep gettid /tmp/build/perf/FEATURE-DUMP feature-gettid=0 [acme@quaco perf]$ cat /tmp/build/perf/feature/test-gettid.make.output test-gettid.c: In function ‘main’: test-gettid.c:8:9: error: implicit declaration of function ‘gettid’; did you mean ‘getgid’? [-Werror=implicit-function-declaration] return gettid(); ^~~~~~ getgid cc1: all warnings being treated as errors [acme@quaco perf]$ Reported-by: Laura Abbott Tested-by: Laura Abbott Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Florian Weimer Cc: Namhyung Kim Cc: Stephane Eranian Link: https://lkml.kernel.org/n/tip-yfy3ch53agmklwu9o7rlgf9c@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/build/Makefile.feature | 1 + tools/build/feature/Makefile | 4 ++++ tools/build/feature/test-all.c | 5 +++++ tools/build/feature/test-gettid.c | 11 +++++++++++ tools/perf/Makefile.config | 4 ++++ tools/perf/jvmti/jvmti_agent.c | 2 ++ 6 files changed, 27 insertions(+) commit 35051f84344bcbd40ba76e943183f0e9a1be9fa5 Merge: 4471e44f972f 841ed60264b3 Author: Olof Johansson Date: Sun Jul 7 13:33:01 2019 -0700 Merge tag 'samsung-dt-5.3-3' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/dt Samsung DTS ARM changes for v5.3, third round 1. Fix imprecise abort on Exynos4210 caused by newly added Mali nodes, 2. Reorganize Mali nodes under /soc, 3. Adjust buck regulators voltages on Arndale Octa and Odroid XU3/XU4 family to sane values. * tag 'samsung-dt-5.3-3' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: dts: exynos: Adjust buck[78] regulators to supported values on Arndale Octa ARM: dts: exynos: Adjust buck[78] regulators to supported values on Odroid XU3 family ARM: dts: exynos: Move Mali400 GPU node to "/soc" ARM: dts: exynos: Fix imprecise abort on Mali GPU probe on Exynos4210 Link: https://lore.kernel.org/r/20190707180115.5562-1-krzk@kernel.org Signed-off-by: Olof Johansson commit 30a4616c1bfd121ecd7e4325aebd6621e0af719f Author: Xin Long Date: Tue Jul 2 00:54:55 2019 +0800 tipc: use rcu dereference functions properly For these places are protected by rcu_read_lock, we change from rcu_dereference_rtnl to rcu_dereference, as there is no need to check if rtnl lock is held. For these places are protected by rtnl_lock, we change from rcu_dereference_rtnl to rtnl_dereference/rcu_dereference_protected, as no extra memory barriers are needed under rtnl_lock() which also protects tn->bearer_list[] and dev->tipc_ptr/b->media_ptr updating. rcu_dereference_rtnl will be only used in the places where it could be under rcu_read_lock or rtnl_lock. Signed-off-by: Xin Long Signed-off-by: David S. Miller net/tipc/bearer.c | 14 +++++++------- net/tipc/udp_media.c | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-) commit 9e0773c3873e8b4d2ae77f6bf19de11e08a9f1ef Author: Heiner Kallweit Date: Sun Jul 7 13:59:54 2019 +0200 r8169: sync few chip names with vendor driver This patch syncs the name of few chip versions with the latest vendor driver version. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f7623d340794620ac8d933477cc265be77c78fe5 Merge: 437fde6cda74 9ce67c3235be Author: David S. Miller Date: Sun Jul 7 12:54:36 2019 -0700 Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next Johan Hedberg says: ==================== pull request: bluetooth-next 2019-07-07 Here's the main bluetooth-next pull request for 5.3: - Added support for new devices from Qualcomm, Realtek and Broadcom and MediaTek - Various fixes to 6LoWPAN - Fix L2CAP PSM namespace separation for LE & BR/EDR - Fix behavior with Microsoft Surface Precision Mouse - Added support for LE Ping feature - Fix L2CAP Disconnect response handling if received in wrong state Please let me know if there are any issues pulling. Thanks. ==================== Signed-off-by: David S. Miller commit 3bb4bba79254be87c86ef416d6b7f69882e6a02c Author: Chris Packham Date: Thu May 23 11:19:48 2019 +1200 mtd: concat: implement _is_locked mtd operation Add an implementation of the _is_locked operation for concatenated mtd devices. This doesn't handle getting the lock status of a range that spans chips, which is consistent with cfi_ppb_is_locked and cfi_intelext_is_locked which only look at the first block in the range. Signed-off-by: Chris Packham Signed-off-by: Richard Weinberger drivers/mtd/mtdconcat.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 6a08a2f12781ca788759ff73acf1f36f6ae3f9b7 Author: Chris Packham Date: Thu May 23 11:19:47 2019 +1200 mtd: concat: refactor concat_lock/concat_unlock concat_lock() and concat_unlock() only differed in terms of the mtd_xx operation they called. Refactor them to use a common helper function and pass a boolean flag to indicate whether lock or unlock is needed. Signed-off-by: Chris Packham Signed-off-by: Richard Weinberger drivers/mtd/mtdconcat.c | 44 ++++++++++++-------------------------------- 1 file changed, 12 insertions(+), 32 deletions(-) commit df616d7a442b90798d63fbf4447154bbbb9040b1 Author: Masahiro Yamada Date: Thu Jun 27 16:07:45 2019 +0900 mtd: abi: do not use C++ style comments in uapi header Linux kernel tolerates C++ style comments these days. Actually, the SPDX License tags for .c files start with //. On the other hand, uapi headers are written in more strict C, where the C++ comment style is forbidden. Signed-off-by: Masahiro Yamada Acked-by: Richard Weinberger Signed-off-by: Richard Weinberger include/uapi/mtd/mtd-abi.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 63898ab5159f6349f58b23cbf9cd06a824d88527 Author: Ding Xiang Date: Wed May 29 15:18:22 2019 +0800 mtd: afs: remove unneeded NULL check NULL check before kfree is unneeded, so remove it. Signed-off-by: Ding Xiang Signed-off-by: Richard Weinberger drivers/mtd/parsers/afs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 1a927fd347ebb3c02046150ee489d4fe4e6b9e81 Author: Masahiro Yamada Date: Mon Jul 1 09:58:39 2019 +0900 init/Kconfig: add CONFIG_CC_CAN_LINK Currently, scripts/cc-can-link.sh is run just for BPFILTER_UMH, but defining CC_CAN_LINK will be useful in other places. Signed-off-by: Masahiro Yamada init/Kconfig | 3 +++ net/bpfilter/Kconfig | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) commit 33177f01ca3fe550146bb9001bec2fd806b2f40c Author: Vasily Gorbik Date: Fri Jun 28 19:22:47 2019 +0200 kallsyms: exclude kasan local symbols on s390 gcc asan instrumentation emits the following sequence to store frame pc when the kernel is built with CONFIG_RELOCATABLE: debug/vsprintf.s: .section .data.rel.ro.local,"aw" .align 8 .LC3: .quad .LASANPC4826@GOTOFF .text .align 8 .type number, @function number: .LASANPC4826: and in case reloc is issued for LASANPC label it also gets into .symtab with the same address as actual function symbol: $ nm -n vmlinux | grep 0000000001397150 0000000001397150 t .LASANPC4826 0000000001397150 t number In the end kernel backtraces are almost unreadable: [ 143.748476] Call Trace: [ 143.748484] ([<000000002da3e62c>] .LASANPC2671+0x114/0x190) [ 143.748492] [<000000002eca1a58>] .LASANPC2612+0x110/0x160 [ 143.748502] [<000000002de9d830>] print_address_description+0x80/0x3b0 [ 143.748511] [<000000002de9dd64>] __kasan_report+0x15c/0x1c8 [ 143.748521] [<000000002ecb56d4>] strrchr+0x34/0x60 [ 143.748534] [<000003ff800a9a40>] kasan_strings+0xb0/0x148 [test_kasan] [ 143.748547] [<000003ff800a9bba>] kmalloc_tests_init+0xe2/0x528 [test_kasan] [ 143.748555] [<000000002da2117c>] .LASANPC4069+0x354/0x748 [ 143.748563] [<000000002dbfbb16>] do_init_module+0x136/0x3b0 [ 143.748571] [<000000002dbff3f4>] .LASANPC3191+0x2164/0x25d0 [ 143.748580] [<000000002dbffc4c>] .LASANPC3196+0x184/0x1b8 [ 143.748587] [<000000002ecdf2ec>] system_call+0xd8/0x2d8 Since LASANPC labels are not even unique and get into .symtab only due to relocs filter them out in kallsyms. Signed-off-by: Vasily Gorbik Signed-off-by: Masahiro Yamada scripts/kallsyms.c | 3 +++ 1 file changed, 3 insertions(+) commit 4e8fc3f55a38996a56106d6adfac72885ddd97ef Author: Masahiro Yamada Date: Tue Jun 25 17:51:27 2019 +0900 kbuild: add more hints about SUBDIRS replacement Commit 0126be38d988 ("kbuild: announce removal of SUBDIRS if used") added a hint about the 'SUBDIRS' replacement, but it was not clear enough. Multiple people sent me similar questions, patches. For instance, https://lkml.org/lkml/2019/1/17/456 I did not mean to use M= for building a subdirectory in the kernel tree. From commit 669efc76b317 ("net: hns3: fix compile error"), people already (ab)use M=... to do that because it seems to work to some extent. Documentation/kbuild/kbuild.txt says M= and KBUILD_EXTMOD are used for building external modules. In fact, Kbuild supports the single target '%/' for this purpose, but this may not be noticed much. Kindly add more hints. Makefile:213: ================= WARNING ================ Makefile:214: 'SUBDIRS' will be removed after Linux 5.3 Makefile:215: Makefile:216: If you are building an individual subdirectory Makefile:217: in the kernel tree, you can do like this: Makefile:218: $ make path/to/dir/you/want/to/build/ Makefile:219: (Do not forget the trailing slash) Makefile:220: Makefile:221: If you are building an external module, Makefile:222: Please use 'M=' or 'KBUILD_EXTMOD' instead Makefile:223: ========================================== Suggested-by: Christoph Hellwig Signed-off-by: Masahiro Yamada Acked-by: Sam Ravnborg Makefile | 7 +++++++ 1 file changed, 7 insertions(+) commit 0c4ab18fc33bba70299f51fac83e32397cf9a04b Author: Kirill Smelkov Date: Sun Jun 23 07:28:53 2019 +0000 coccinelle: api/stream_open: treat all wait_.*() calls as blocking Previously steam_open.cocci was treating only wait_event_.* - e.g. wait_event_interruptible - as a blocking operation. However e.g. wait_for_completion_interruptible is also blocking, and so from this point of view it would be more logical to treat all wait_.* as a blocking point. The logic of this change actually came up for real when drivers/pci/switch/switchtec.c changed from using wait_event_interruptible to wait_for_completion_interruptible: https://lore.kernel.org/linux-pci/20190413170056.GA11293@deco.navytux.spb.ru/ https://lore.kernel.org/linux-pci/20190415145456.GA15280@deco.navytux.spb.ru/ https://lore.kernel.org/linux-pci/20190415154102.GB17661@deco.navytux.spb.ru/ For a driver that uses nonseekable_open with read/write having stream semantic and read also calling e.g. wait_for_completion_interruptible, running stream_open.cocci before this patch would produce: WARNING: _fops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open. while after this patch it will report: ERROR: _fops: .read() can deadlock .write(); change nonseekable_open -> stream_open to fix. Signed-off-by: Kirill Smelkov Acked-by: Julia Lawall Signed-off-by: Masahiro Yamada scripts/coccinelle/api/stream_open.cocci | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f58c17c202e7aec9623754a7ec0b0669e043b838 Author: Markus Elfring Date: Wed May 8 13:50:49 2019 +0200 coccinelle: put_device: Add a cast to an expression for an assignment Extend a when constraint in a SmPL rule so that an additional cast is optionally excluded from source code searches for an expression in assignments. Signed-off-by: Markus Elfring Suggested-by: Julia Lawall Link: https://lore.kernel.org/lkml/alpine.DEB.2.21.1902160934400.3212@hadrien/ Link: https://systeme.lip6.fr/pipermail/cocci/2019-February/005592.html Acked-by: Julia Lawall Signed-off-by: Masahiro Yamada scripts/coccinelle/free/put_device.cocci | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 30a70e806d938ed9fd9bfd2074c4458e63efc3ed Author: Markus Elfring Date: Tue May 7 11:20:48 2019 +0200 coccinelle: put_device: Adjust a message construction The Linux coding style tolerates long string literals so that the provided information can be easier found also by search tools like grep. Thus simplify a message construction in a SmPL rule by concatenating text with two plus operators less. Signed-off-by: Markus Elfring Signed-off-by: Masahiro Yamada scripts/coccinelle/free/put_device.cocci | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit a3b0b6f953ecd51c98bc84efd043a4aad786801b Author: Rikard Falkeborn Date: Mon Apr 8 21:14:32 2019 +0200 coccinelle: kstrdup: Fix typo in warning messages Replace 'kstrdep' with 'kstrdup' in warning messages. Signed-off-by: Rikard Falkeborn Acked-by: Julia Lawall Signed-off-by: Masahiro Yamada scripts/coccinelle/api/kstrdup.cocci | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b7f5b656ffe19e3c65f04e3adeae21ac17227126 Author: Raag Jadav Date: Sat Jun 29 13:50:48 2019 +0530 dmaengine: at_xdmac: check for non-empty xfers_list before invoking callback tx descriptor retrieved from an empty xfers_list may not have valid pointers to the callback functions. Avoid calling dmaengine_desc_get_callback_invoke if xfers_list is empty. Signed-off-by: Raag Jadav Acked-by: Ludovic Desroches Signed-off-by: Vinod Koul drivers/dma/at_xdmac.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit dab0f4ebb22ee6d16051011d624cff79a99baa8a Author: Jiri Olsa Date: Fri May 31 15:13:21 2019 +0200 perf jvmti: Address gcc string overflow warning for strncpy() We are getting false positive gcc warning when we compile with gcc9 (9.1.1): CC jvmti/libjvmti.o In file included from /usr/include/string.h:494, from jvmti/libjvmti.c:5: In function ‘strncpy’, inlined from ‘copy_class_filename.constprop’ at jvmti/libjvmti.c:166:3: /usr/include/bits/string_fortified.h:106:10: error: ‘__builtin_strncpy’ specified bound depends on the length of the source argument [-Werror=stringop-overflow=] 106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ jvmti/libjvmti.c: In function ‘copy_class_filename.constprop’: jvmti/libjvmti.c:165:26: note: length computed here 165 | size_t file_name_len = strlen(file_name); | ^~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors As per Arnaldo's suggestion use strlcpy(), which does the same thing and keeps gcc silent. Suggested-by: Arnaldo Carvalho de Melo Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Ben Gainey Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/r/20190531131321.GB1281@krava Signed-off-by: Arnaldo Carvalho de Melo tools/perf/jvmti/libjvmti.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c18ae6327a13a6d707f6139c31597057103aa85b Author: Arnaldo Carvalho de Melo Date: Tue May 28 17:36:46 2019 -0300 perf python: Remove -fstack-protector-strong if clang doesn't have it Some distros put -fstack-protector-strong in the compiler flags to be used to build python extensions, but then, the clang version in that distro doesn't know about that, only gcc does. Check if that is the case and remove it from the set of options used to build the python binding with clang. Case at hand: oraclelinux:7 $ head -2 /etc/os-release NAME="Oracle Linux Server" VERSION="7.6" $ grep stack-protector /usr/lib64/python2.7/_sysconfigdata.py | head -1 | cut -c-120 'CFLAGS': '-fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --para $ gcc version 4.8.5 20150623 (Red Hat 4.8.5-36.0.1) (GCC) clang version 3.4.2 (tags/RELEASE_34/dot2-final) clang: error: unknown argument: '-fstack-protector-strong' clang: error: unknown argument: '-fstack-protector-strong' error: command 'clang' failed with exit status 1 cp: cannot stat '/tmp/build/perf/python_ext_build/lib/perf*.so': No such file or directory make[2]: *** [/tmp/build/perf/python/perf.so] Error 1 Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-brmp2415zxpbhz45etkgjoma@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/setup.py | 2 ++ 1 file changed, 2 insertions(+) commit d3e5397169175628696e92191dfc0e86d8e48db9 Author: Maksym Planeta Date: Tue Jul 2 15:49:28 2019 +0200 ibverbs/rxe: Remove variable self-initialization In some cases (not in this particular one) variable self-initialization can lead to undefined behavior. In this case, it is just obscure code. Signed-off-by: Maksym Planeta Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rxe/rxe_comp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 617cf24f9f9efcd5e2f0258e7da10b8a2447662b Author: Lang Cheng Date: Mon Jun 24 19:47:52 2019 +0800 RDMA/hns: Clean up unnecessary variable initialization Here Clean up unnecessary initial value for some variable. Signed-off-by: Lang Cheng Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hns/hns_roce_cmd.c | 2 +- drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 4 ++-- drivers/infiniband/hw/hns/hns_roce_main.c | 2 +- drivers/infiniband/hw/hns/hns_roce_pd.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) commit ec5bc2cc69b4fc494e04d10fc5226f6f9cf67c56 Author: Xi Wang Date: Mon Jun 24 19:47:51 2019 +0800 RDMA/hns: Fixs hw access invalid dma memory error When smmu is enable, if execute the perftest command and then use 'kill -9' to exit, follow this operation repeatedly, the kernel will have a high probability to print the following smmu event: arm-smmu-v3 arm-smmu-v3.1.auto: event 0x10 received: arm-smmu-v3 arm-smmu-v3.1.auto: 0x00007d0000000010 arm-smmu-v3 arm-smmu-v3.1.auto: 0x0000020900000080 arm-smmu-v3 arm-smmu-v3.1.auto: 0x00000000f47cf000 arm-smmu-v3 arm-smmu-v3.1.auto: 0x00000000f47cf000 This is because the hw will periodically refresh the qpc cache until the next reset. This patch fixed it by removing the action that release qpc memory in the 'hns_roce_qp_free' function. Fixes: 9a4435375cd1 ("IB/hns: Add driver files for hns RoCE driver") Signed-off-by: Xi Wang Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hns/hns_roce_qp.c | 1 - 1 file changed, 1 deletion(-) commit fd7dd8bc8784bc96213781f1bfb454ae1c13e79f Author: Lang Cheng Date: Mon Jun 24 19:47:50 2019 +0800 RDMA/hns: Use %pK format pointer print The format specifier \"%p\" can leak kernel addresses. Use \"%pK\" instead. Signed-off-by: Lang Cheng Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e0222d18d628ce96f0def790ea26b6b7b3c18f78 Author: Lijun Ou Date: Mon Jun 24 19:47:49 2019 +0800 RDMA/hns: Bugfix for calculating qp buffer size The buffer size of qp which used to allocate qp buffer space for storing sqwqe and rqwqe will be the length of buffer space. The kernel driver will use the buffer address and the same size to get the user memory. The same size named buff_size of qp. According the algorithm of calculating, The size of the two is not equal when users set the max sge of sq. Fixes: b28ca7cceff8 ("RDMA/hns: Limit extend sq sge num") Signed-off-by: Lijun Ou Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hns/hns_roce_qp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9176ab1b848059a0cd9caf39f0cebaa1b7ec5ec2 Author: zhengbin Date: Sun Jul 7 08:51:41 2019 +0800 time: Validate user input in compat_settimeofday() The user value is validated after converting the timeval to a timespec, but for a wide range of negative tv_usec values the multiplication overflow turns them in positive numbers. So the 'validated later' is not catching the invalid input. Signed-off-by: zhengbin Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/1562460701-113301-1-git-send-email-zhengbin13@huawei.com kernel/time/time.c | 4 ++++ 1 file changed, 4 insertions(+) commit 7891bc0ab739a31538b5f879a523232b8b07a0d3 Author: Sebastian Andrzej Siewior Date: Thu Jul 4 08:07:43 2019 +0200 x86/fpu: Inline fpu__xstate_clear_all_cpu_caps() All fpu__xstate_clear_all_cpu_caps() does is to invoke one simple function since commit 73e3a7d2a7c3b ("x86/fpu: Remove the explicit clearing of XSAVE dependent features") so invoke that function directly and remove the wrapper. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20190704060743.rvew4yrjd6n33uzx@linutronix.de arch/x86/include/asm/fpu/xstate.h | 1 - arch/x86/kernel/fpu/init.c | 2 +- arch/x86/kernel/fpu/xstate.c | 11 +---------- 3 files changed, 2 insertions(+), 12 deletions(-) commit 9838e3bff0f92f23fcd50fe1ff1d4b3e91b8a448 Author: Sebastian Andrzej Siewior Date: Wed Jul 3 10:32:47 2019 +0200 x86/fpu: Make 'no387' and 'nofxsr' command line options useful The command line option `no387' is designed to disable the FPU entirely. This only 'works' with CONFIG_MATH_EMULATION enabled. But on 64bit this cannot work because user space expects SSE to work which required basic FPU support. MATH_EMULATION does not help because SSE is not emulated. The command line option `nofxsr' should also be limited to 32bit because FXSR is part of the required flags on 64bit so turning it off is not possible. Clearing X86_FEATURE_FPU without emulation enabled will not work anyway and hang in fpu__init_system_early_generic() before the console is enabled. Setting additioal dependencies, ensures that the CPU still boots on a modern CPU. Otherwise, dropping FPU will leave FXSR enabled causing the kernel to crash early in fpu__init_system_mxcsr(). With XSAVE support it will crash in fpu__init_cpu_xstate(). The problem is that xsetbv() with XMM set and SSE cleared is not allowed. That means XSAVE has to be disabled. The XSAVE support is disabled in fpu__init_system_xstate_size_legacy() but it is too late. It can be removed, it has been added in commit 1f999ab5a1360 ("x86, xsave: Disable xsave in i387 emulation mode") to use `no387' on a CPU with XSAVE support. All this happens before console output. After hat, the next possible crash is in RAID6 detect code because MMX remained enabled. With a 3DNOW enabled config it will explode in memcpy() for instance due to kernel_fpu_begin() but this is unconditionally enabled. This is enough to boot a Debian Wheezy on a 32bit qemu "host" CPU which supports everything up to XSAVES, AVX2 without 3DNOW. Later, Debian increased the minimum requirements to i686 which means it does not boot userland atleast due to CMOV. After masking the additional features it still keeps SSE4A and 3DNOW* enabled (if present on the host) but those are unused in the kernel. Restrict `no387' and `nofxsr' otions to 32bit only. Add dependencies for FPU, FXSR to additionaly mask CMOV, MMX, XSAVE if FXSR or FPU is cleared. Reported-by: Vegard Nossum Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20190703083247.57kjrmlxkai3vpw3@linutronix.de arch/x86/kernel/cpu/cpuid-deps.c | 5 +++++ arch/x86/kernel/fpu/init.c | 17 +++++++---------- 2 files changed, 12 insertions(+), 10 deletions(-) commit 28ef2db8866495150e4260773fead8313f1a5625 Author: Peter Xu Date: Fri Jun 28 18:59:42 2019 +0800 timer: Document TIMER_PINNED The flag hints the user that the pinned timers will always be run on a static CPU (because that should be what "pinned" means...) but that's not the truth, at least with the current implementation. For example, currently if a pinned timer is set up but later mod_timer() upon the pinned timer is invoked, mod_timer() will still try to queue the timer on the current processor and migrate the timer if necessary. Document it a bit with the definition of TIMER_PINNED so that all future users will use it correctly. Signed-off-by: Peter Xu Signed-off-by: Thomas Gleixner Cc: Marcelo Tosatti Cc: Luiz Capitulino Link: https://lkml.kernel.org/r/20190628105942.14131-1-peterx@redhat.com include/linux/timer.h | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) commit b89b889a326a7abf1c9ceef7ddbe06dbaf8c2520 Merge: d4bd30532688 774a075ab514 Author: Takashi Iwai Date: Sun Jul 7 11:29:03 2019 +0200 Merge branch 'topic/hda-refresh-cleanup' into for-next Merge a cleanup for HD-audio widget refresh code Signed-off-by: Takashi Iwai commit d4bd30532688558a7de70f0c8edd2a7a25c3963f Author: Nicola Lunghi Date: Sun Jul 7 09:27:34 2019 +0100 ALSA: usb-audio: fix Line6 Helix audio format rates Line6 Helix and HX stomp devices don't support retrieving the number of clock sample rate. Add a quirk to set it to 48Khz by default. [ fixed wrong variable initialization changes by tiwai ] Signed-off-by: Nicola Lunghi Signed-off-by: Takashi Iwai sound/usb/format.c | 46 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 43 insertions(+), 3 deletions(-) commit ba18ca2b8e18146228ff36b50f0c9a3f5c5bd1b5 Author: Takashi Sakamoto Date: Sun Jul 7 14:20:11 2019 +0900 firewire-motu: fix wrong reference count for stream functionality at error path of rawmidi interface In IEC 61883-6, several types of sampling data can be multiplexed into payload of common isochronous packet (CIP). For typical audio and music units, PCM samples and MIDI messages are multiplexed into one packet streaming. ALSA firewire-motu driver allows applications of rawmidi interface to start packet streaming for transmission of MIDI messages. However at error path, the reference count of stream functionality is not operated correctly. This can brings a bug that packet streaming is not stopped when all referrers release the count. This commit fixes the bug. Fixes: 8edc56ec8f14 ("ALSA: firewire-motu: reserve/release isochronous resources in pcm.hw_params/hw_free callbacks") Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/motu/motu-midi.c | 2 ++ 1 file changed, 2 insertions(+) commit 64582c56a9156ce88297a89a3b8ba03754e7149a Author: Takashi Sakamoto Date: Sun Jul 7 14:20:10 2019 +0900 ALSA: firewire-digi00x: fix wrong reference count for stream functionality at error path of rawmidi interface In IEC 61883-6, several types of sampling data can be multiplexed into payload of common isochronous packet (CIP). For typical audio and music units, PCM samples and MIDI messages are multiplexed into one packet streaming. ALSA firewire-digi00x driver allows applications of rawmidi interface to start packet streaming for transmission of MIDI messages. However at error path, the reference count of stream functionality is not operated correctly. This can brings a bug that packet streaming is not stopped when all referrers release the count. This commit fixes the bug. Fixes: ae8ffbb26512 ("ALSA: firewire-digi00x: reserve/release isochronous resources in pcm.hw_params/hw_free callbacks") Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/digi00x/digi00x-midi.c | 2 ++ 1 file changed, 2 insertions(+) commit e79c3f0c006ec26d0de5ba9747f65b81c16f83f1 Author: Takashi Sakamoto Date: Sun Jul 7 14:20:09 2019 +0900 ALSA: dice: fix wrong reference count for stream functionality at error path of rawmidi interface In IEC 61883-6, several types of sampling data can be multiplexed into payload of common isochronous packet (CIP). For typical audio and music units, PCM samples and MIDI messages are multiplexed into one packet streaming. ALSA dice driver allows applications of rawmidi interface to start packet streaming for transmission of MIDI messages. However at error path, the reference count of stream functionality is not operated correctly. This can brings a bug that packet streaming is not stopped when all referrers release the count. This commit fixes the bug. Fixes: 3cd2c2d780a2 ("ALSA: dice: reserve/release isochronous resources in pcm.hw_params/hw_free callbacks") Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/dice/dice-midi.c | 2 ++ 1 file changed, 2 insertions(+) commit 03a954aef70e10003b3f1cf7066ab7c955eb27f1 Author: Takashi Sakamoto Date: Sun Jul 7 14:20:08 2019 +0900 ALSA: oxfw: fix wrong reference count for stream functionality at error path of rawmidi interface In IEC 61883-6, several types of sampling data can be multiplexed into payload of common isochronous packet (CIP). For typical audio and music units, PCM samples and MIDI messages are multiplexed into one packet streaming. ALSA oxfw driver allows applications of rawmidi interface to start packet streaming for transmission of MIDI messages. However at error path, the reference count of stream functionality is not operated correctly. This can brings a bug that packet streaming is not stopped when all referrers release the count. This commit fixes the bug. Fixes: 4f380d007052 ("ALSA: oxfw: configure packet format in pcm.hw_params callback") Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/oxfw/oxfw-midi.c | 2 ++ 1 file changed, 2 insertions(+) commit 2e9f17e34eb7b728d4cd9ec474c3c5a9a6685298 Author: Takashi Sakamoto Date: Sun Jul 7 14:20:07 2019 +0900 ALSA: fireworks: fix wrong reference count for stream functionality at error path of rawmidi interface In IEC 61883-6, several types of sampling data can be multiplexed into payload of common isochronous packet (CIP). For typical audio and music units, PCM samples and MIDI messages are multiplexed into one packet streaming. ALSA fireworks driver allows applications of rawmidi interface to start packet streaming for transmission of MIDI messages. However at error path, the reference count of stream functionality is not operated correctly. This can brings a bug that packet streaming is not stopped when all referrers release the count. This commit fixes the bug. Fixes: 3d7250667ea9 ("ALSA: fireworks: configure sampling transfer frequency in pcm.hw_params callback") Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/fireworks/fireworks_midi.c | 2 ++ 1 file changed, 2 insertions(+) commit 097f8ba3873dcbd2f55c627ed2fe0b13845e53cd Author: Takashi Sakamoto Date: Sun Jul 7 14:20:06 2019 +0900 ALSA: bebob: fix wrong reference count for stream functionality at error path of rawmidi interface In IEC 61883-6, several types of sampling data can be multiplexed into payload of common isochronous packet (CIP). For typical audio and music units, PCM samples and MIDI messages are multiplexed into one packet streaming. ALSA bebob driver allows applications of rawmidi interface to start packet streaming for transmission of MIDI messages. However at error path, the reference count of stream functionality is not operated correctly. This can brings a bug that packet streaming is not stopped when all referrers release the count. This commit fixes the bug. Fixes: ac2888b958f2 ("ALSA: bebob: configure sampling transfer frequency in pcm.hw_params callback") Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/bebob/bebob_midi.c | 2 ++ 1 file changed, 2 insertions(+) commit 1dd7382b1bb608e7ccae3672621eaceca355ae8b Author: Max Gurtovoy Date: Mon Jul 1 21:14:01 2019 +0300 net/mlx5: Introduce VHCA tunnel device capability When using the device emulation feature (introduced in Bluefield-1 SOC), a privileged function (the device emulation manager) will be able to create a channel to execute commands on behalf of the emulated function. This channel will be a general object of type VHCA_TUNNEL that will have a unique ID for each emulated function. This ID will be passed in each cmd that will be issued by the emulation SW in a well known offset in the command header. This channel is needed since the emulated function doesn't have a normal command interface to the HCA HW, but some basic configuration for that function is needed (e.g. initialize and enable the HCA). For that matter, a specific command-set was defined and only those commands will be issued by the HCA. Signed-off-by: Max Gurtovoy Reviewed-by: Yishai Hadas Signed-off-by: Leon Romanovsky include/linux/mlx5/mlx5_ifc.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 593fdd4fb44ef2cbf4ec53ec2c6eb60eb079bb4c Author: Enrico Weigelt, metux IT consult Date: Sat Jul 6 22:55:46 2019 -0700 Input: gpio_keys_polled - allow specifying name of input device Instead of hardcoding the input name to the driver name ('gpio-keys-polled'), allow specifying the name of the device via "label" property. If the property is not present (nor name is set in board-supplied platform data), we'll default to the old name. Signed-off-by: Enrico Weigelt, metux IT consult Signed-off-by: Dmitry Torokhov drivers/input/keyboard/gpio_keys_polled.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 211bbf3c38ed90f43a3ec905e246014f96bceed7 Author: Darrick J. Wong Date: Sat Jul 6 09:29:01 2019 -0700 xfs: don't update lastino for FSBULKSTAT_SINGLE The kernel test robot found a regression of xfs/054 in the conversion of bulkstat to use the new iwalk infrastructure -- if a caller set *lastip = 128 and invoked FSBULKSTAT_SINGLE, the bstat info would be for inode 128, but *lastip would be increased by the kernel to 129. FSBULKSTAT_SINGLE never incremented lastip before, so it's incorrect to make such an update to the internal lastino value now. Fixes: 2810bd6840e463 ("xfs: convert bulkstat to new iwalk infrastructure") Reported-by: kernel test robot Signed-off-by: Darrick J. Wong Reviewed-by: Allison Collins Reviewed-by: Brian Foster fs/xfs/xfs_ioctl.c | 1 - 1 file changed, 1 deletion(-) commit c5eaab1d131d0a6272df7d55a971a67400d63f56 Author: Carmeli Tamir Date: Sat Jul 6 11:07:38 2019 -0400 security/commoncap: Use xattr security prefix len Using the existing defined XATTR_SECURITY_PREFIX_LEN instead of sizeof(XATTR_SECURITY_PREFIX) - 1. Pretty simple cleanup. Signed-off-by: Carmeli Tamir Signed-off-by: James Morris security/commoncap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 437fde6cda74bb31705a9f37f14d481cdd431ad8 Merge: 23f30c41c732 5adcdab6ae1b Author: David S. Miller Date: Sat Jul 6 15:19:01 2019 -0700 Merge tag 'wireless-drivers-next-for-davem-2019-07-06' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for 5.3 Second, and last, set of patches for 5.3. Major changes: mt76 * use NAPI polling for tx cleanup on mt7603/mt7615 * add support for toggling edcca on mt7603 * fix rate control / tx status reporting issues on mt76x02/mt7603 * add support for eeprom calibration data from mtd on mt7615 * support configuring tx power on mt7615 * per-chain signal reporting on mt7615 iwlwifi * Update the FW API for Channel State Information (CSI) * Special Specific Absorption Rate (SAR) implementation for South Korea ath10k * fixes for SDIO support * add support for firmware logging via WMI ==================== Signed-off-by: David S. Miller commit 1d2af80d581d1bae81594e497cd57e345235b940 Merge: b07079f1642c bce9437a0a48 Author: Richard Weinberger Date: Sat Jul 6 22:51:56 2019 +0200 Merge tag 'nand/for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux into mtd/next NAND core changes: - use longest matching pattern in ->exec_op() default parser - export NAND operation tracer - add flag to indicate panic_write in MTD - use kzalloc() instead of kmalloc() and memset() Raw NAND controller drivers changes: - brcmnand: * fix BCH ECC layout for large page NAND parts * fallback to detected ecc-strength, ecc-step-size * when oops in progress use pio and interrupt polling * code refactor code to introduce helper functions * add support for v7.3 controller - FSMC: * use nand_op_trace for operation tracing - GPMI: * move all driver code into single file * various cleanups (including dmaengine changes) * use runtime PM to manage clocks * implement exec_op - MTK: * correct low level time calculation of r/w cycle * improve data sampling timing for read cycle * add validity check for CE# pin setting * fix wrongly assigned OOB buffer pointer issue * re-license MTK NAND driver as Dual MIT/GPL - STM32: * manage the get_irq error case * increase DMA completion timeouts Raw NAND chips drivers changes: - Macronix: add read-retry support Onenand driver changes: - add support for 8Gb datasize chips - avoid fall-through warnings SPI-NAND changes: - define macros for page-read ops with three-byte addresses - add support for two-byte device IDs and then for GigaDevice GD5F1GQ4UFxxG - add initial support for Paragon PN26G0xA - handle the case where the last page read has bitflips commit d5b2179d6a675ee8cdbd3250d42f1e32d5a45fb1 Author: Arnaldo Carvalho de Melo Date: Tue May 28 16:02:56 2019 -0300 perf annotate TUI browser: Do not use member from variable within its own initialization Some compilers will complain when using a member of a struct to initialize another member, in the same struct initialization. For instance: debian:8 Debian clang version 3.5.0-10 (tags/RELEASE_350/final) (based on LLVM 3.5.0) oraclelinux:7 clang version 3.4.2 (tags/RELEASE_34/dot2-final) Produce: ui/browsers/annotate.c:104:12: error: variable 'ops' is uninitialized when used within its own initialization [-Werror,-Wuninitialized] (!ops.current_entry || ^~~ 1 error generated. So use an extra variable, initialized just before that struct, to have the value used in the expressions used to init two of the struct members. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Fixes: c298304bd747 ("perf annotate: Use a ops table for annotation_line__write()") Link: https://lkml.kernel.org/n/tip-f9nexro58q62l3o9hez8hr0i@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/annotate.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 9ce67c3235be71e8cf922a9b3d0b7359ed3f4ce5 Author: Sean Wang Date: Sun Jun 2 08:02:49 2019 +0800 Bluetooth: btusb: Add protocol support for MediaTek MT7663U USB devices This adds the support of enabling MT7663U Bluetooth function running on the top of btusb driver. The information in /sys/kernel/debug/usb/devices about the Bluetooth device is listed as the below. T: Bus=04 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 5 Spd=5000 MxCh= 0 D: Ver= 3.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS= 9 #Cfgs= 1 P: Vendor=0e8d ProdID=7663 Rev= 1.00 S: Manufacturer=MediaTek Inc. S: Product=Wireless_Device S: SerialNumber=000000000 C:* #Ifs= 3 Cfg#= 1 Atr=a0 MxPwr=160mA A: FirstIf#= 0 IfCount= 2 Cls=e0(wlcon) Sub=01 Prot=01 I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=125us E: Ad=82(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms I: If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms I: If#= 1 Alt= 6 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 63 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 63 Ivl=1ms Signed-off-by: Sean Wang Signed-off-by: Marcel Holtmann drivers/bluetooth/btusb.c | 5 +++++ 1 file changed, 5 insertions(+) commit a1c49c434e15050b5dafe3b6f5cc732d4f02d657 Author: Sean Wang Date: Sun Jun 2 08:02:48 2019 +0800 Bluetooth: btusb: Add protocol support for MediaTek MT7668U USB devices This adds the support of enabling MT7668U Bluetooth function running on the top of btusb driver. The information in /sys/kernel/debug/usb/devices about the Bluetooth device is listed as the below. T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=5000 MxCh= 0 D: Ver= 3.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS= 9 #Cfgs= 1 P: Vendor=0e8d ProdID=7668 Rev= 1.00 S: Manufacturer=MediaTek Inc. S: Product=Wireless_Device S: SerialNumber=000000000 C:* #Ifs= 3 Cfg#= 1 Atr=a0 MxPwr=160mA A: FirstIf#= 0 IfCount= 2 Cls=e0(wlcon) Sub=01 Prot=01 I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=125us E: Ad=82(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms I: If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms I: If#= 1 Alt= 6 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 63 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 63 Ivl=1ms Signed-off-by: Sean Wang Signed-off-by: Marcel Holtmann drivers/bluetooth/Kconfig | 11 + drivers/bluetooth/btusb.c | 576 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 587 insertions(+) commit 688d94fd0d10d9ebe611a445d85811894f8cf6c4 Author: Josua Mayer Date: Sat Jul 6 17:54:48 2019 +0200 Bluetooth: 6lowpan: always check destination address BLE based 6LoWPAN networks are highly constrained in bandwidth. Do not take a short-cut, always check if the destination address is known to belong to a peer. As a side-effect this also removes any behavioral differences between one, and two or more connected peers. Acked-by: Jukka Rissanen Tested-by: Michael Scott Signed-off-by: Josua Mayer Signed-off-by: Marcel Holtmann net/bluetooth/6lowpan.c | 12 ------------ 1 file changed, 12 deletions(-) commit 5636376c26502c39260853e529e9467f79f95931 Author: Josua Mayer Date: Sat Jul 6 17:54:47 2019 +0200 Bluetooth: 6lowpan: check neighbour table for SLAAC Like any IPv6 capable device, 6LNs can have multiple addresses assigned using SLAAC and made known through neighbour advertisements. After checking the destination address against all peers link-local addresses, consult the neighbour cache for additional known addresses. RFC7668 defines the scope of Neighbor Advertisements in Section 3.2.3: 1. "A Bluetooth LE 6LN MUST NOT register its link-local address" 2. "A Bluetooth LE 6LN MUST register its non-link-local addresses with the 6LBR by sending Neighbor Solicitation (NS) messages ..." Due to these constranits both the link-local addresses tracked in the list of 6lowpan peers, and the neighbour cache have to be used when identifying the 6lowpan peer for a destination address. Acked-by: Jukka Rissanen Tested-by: Michael Scott Signed-off-by: Josua Mayer Signed-off-by: Marcel Holtmann net/bluetooth/6lowpan.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit b188b03270b7f8568fc714101ce82fbf5e811c5a Author: Josua Mayer Date: Sat Jul 6 17:54:46 2019 +0200 Bluetooth: 6lowpan: search for destination address in all peers Handle overlooked case where the target address is assigned to a peer and neither route nor gateway exist. For one peer, no checks are performed to see if it is meant to receive packets for a given address. As soon as there is a second peer however, checks are performed to deal with routes and gateways for handling complex setups with multiple hops to a target address. This logic assumed that no route and no gateway imply that the destination address can not be reached, which is false in case of a direct peer. Acked-by: Jukka Rissanen Tested-by: Michael Scott Signed-off-by: Josua Mayer Signed-off-by: Marcel Holtmann net/bluetooth/6lowpan.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 80d3c45fd765fbf4f10981b60ff6b1384bdbc706 Author: Dave Wysochanski Date: Wed Jun 26 16:30:24 2019 -0400 SUNRPC: Fix possible autodisconnect during connect due to old last_used Ensure last_used is updated before calling mod_timer inside xprt_schedule_autodisconnect. This avoids a possible xprt_autoclose firing immediately after a successful connect when xprt_unlock_connect calls xprt_schedule_autodisconnect with an old value of last_used. Signed-off-by: Dave Wysochanski Signed-off-by: Trond Myklebust net/sunrpc/xprt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4368d77a4d985758303a4257c07991c079db7a75 Author: Anna Schumaker Date: Wed Jun 19 17:24:10 2019 -0400 SUNRPC: Drop redundant CONFIG_ from CONFIG_SUNRPC_DISABLE_INSECURE_ENCTYPES The "CONFIG_" portion is added automatically, so this was being expanded into "CONFIG_CONFIG_SUNRPC_DISABLE_INSECURE_ENCTYPES" Signed-off-by: Anna Schumaker Signed-off-by: Trond Myklebust net/sunrpc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9f7761cf0409465075dadb875d5d4b8ef2f890c8 Author: Benjamin Coddington Date: Tue Jun 11 12:57:52 2019 -0400 NFS: Cleanup if nfs_match_client is interrupted Don't bail out before cleaning up a new allocation if the wait for searching for a matching nfs client is interrupted. Memory leaks. Reported-by: syzbot+7fe11b49c1cc30e3fce2@syzkaller.appspotmail.com Fixes: 950a578c6128 ("NFS: make nfs_match_client killable") Signed-off-by: Benjamin Coddington Signed-off-by: Trond Myklebust fs/nfs/client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9026b3a973b0b0b73c15ba40aff87cd0959fd0f3 Author: Darrick J. Wong Date: Fri May 31 14:06:05 2019 -0700 nfs: disable client side deduplication The NFS protocol doesn't support deduplication, so turn it off again. Fixes: ce96e888fe48e ("Fix nfs4.2 return -EINVAL when do dedupe operation") Signed-off-by: Darrick J. Wong Signed-off-by: Trond Myklebust fs/nfs/nfs4file.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 1a7441b282cef3bb94acaba9f474ebc6d22277ba Author: Dave Wysochanski Date: Fri May 17 17:06:41 2019 -0400 NFSv4: Add lease_time and lease_expired to 'nfs4:' line of mountstats On the NFS client there is no low-impact way to determine the nfs4 lease time or whether the lease is expired, so add these to mountstats with times displayed in seconds. If the lease is not expired, display lease_expired=0. Otherwise, display lease_expired=seconds_since_expired, similar to 'age:' line in mountstats. Signed-off-by: Dave Wysochanski Signed-off-by: Trond Myklebust fs/nfs/super.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 2b17d725f9be59a1bfa0583af690c463fca1f385 Author: Trond Myklebust Date: Tue Jun 11 16:49:52 2019 -0400 NFS: Clean up writeback code Now that the VM promises never to recurse back into the filesystem layer on writeback, remove all the GFP_NOFS references etc from the generic writeback code. Signed-off-by: Trond Myklebust fs/nfs/pagelist.c | 6 ++---- fs/nfs/pnfs.c | 2 +- fs/nfs/write.c | 7 ++----- 3 files changed, 5 insertions(+), 10 deletions(-) commit c98ebe2937404d8e6e028ac9cadcf870a6faccc2 Merge: 28ade856c0f7 b6580ab39b09 Author: Trond Myklebust Date: Tue Jun 11 16:53:33 2019 -0400 Merge branch 'multipath_tcp' commit 28ade856c0f724b1d74d7d683ec2dc0e98de60ae Merge: 02a2779f223e bf11fbdb20b3 Author: Trond Myklebust Date: Fri Jun 28 11:10:39 2019 -0400 Merge branch 'containers' commit 02a2779f223e9f77c114b0c64ca246b01c1dc563 Merge: 41adafa02eeb 1c341b777501 Author: Trond Myklebust Date: Tue Jun 11 14:29:47 2019 -0400 Merge branch 'cache_consistency' commit b6580ab39b092aac40871fed11faa410c44b1da0 Author: Trond Myklebust Date: Thu May 30 11:24:26 2019 -0400 SUNRPC: Remove warning in debugfs.c when compiling with W=1 Remove the following warning: net/sunrpc/debugfs.c:13: warning: cannot understand function prototype: 'struct dentry *topdir; Signed-off-by: Trond Myklebust net/sunrpc/debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 41adafa02eeb622ffc1f085c9a862a6554ed667e Merge: a332518fda47 c049f8ea9a0d Author: Trond Myklebust Date: Tue Jun 11 14:19:07 2019 -0400 Merge branch 'bh-remove' commit 2f34b8bfae19a244993e2b6cd0a8514f3ffd3fa8 Author: NeilBrown Date: Thu May 30 10:41:28 2019 +1000 SUNRPC: add links for all client xprts to debugfs Now that a client can have multiple xprts, we need to add them all to debugs. The first one is still "xprt" Subsequent xprts are "xprt1", "xprt2", etc. Signed-off-by: NeilBrown Signed-off-by: Trond Myklebust net/sunrpc/debugfs.c | 46 +++++++++++++++++++++++++++++----------------- 1 file changed, 29 insertions(+), 17 deletions(-) commit a332518fda4731c07394164b3edcbb6efaf4c4d7 Author: Dave Wysochanski Date: Thu May 23 16:13:50 2019 -0400 SUNRPC: Count ops completing with tk_status < 0 We often see various error conditions with NFS4.x that show up with a very high operation count all completing with tk_status < 0 in a short period of time. Add a count to rpc_iostats to record on a per-op basis the ops that complete in this manner, which will enable lower overhead diagnostics. Signed-off-by: Dave Wysochanski Signed-off-by: Trond Myklebust include/linux/sunrpc/metrics.h | 7 ++++++- net/sunrpc/stats.c | 8 ++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) commit 10db56917bcb80e70bbcd443d78bbfcb0b1e0652 Author: NeilBrown Date: Thu May 30 10:41:28 2019 +1000 SUNRPC: enhance rpc_clnt_show_stats() to report on all xprts. Now that a client can have multiple xprts, we need to report the statistics for all of them. Reported-by: Chuck Lever Signed-off-by: NeilBrown Signed-off-by: Trond Myklebust net/sunrpc/stats.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 93ba048e1b9f95ac7e1584fa33ed4d985bf1133d Author: Dave Wysochanski Date: Thu May 23 16:13:49 2019 -0400 SUNRPC: Use proper printk specifiers for unsigned long long Update the printk specifiers inside _print_rpc_iostats to avoid a checkpatch warning. Signed-off-by: Dave Wysochanski Signed-off-by: Trond Myklebust net/sunrpc/stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9dfe52a95a60096fc12234383a19b0f436304418 Author: Dave Wysochanski Date: Thu May 23 16:13:48 2019 -0400 SUNRPC: Move call to rpc_count_iostats before rpc_call_done For diagnostic purposes, it would be useful to have an rpc_iostats metric of RPCs completing with tk_status < 0. Unfortunately, tk_status is reset inside the rpc_call_done functions for each operation, and the call to tally the per-op metrics comes after rpc_call_done. Refactor the call to rpc_count_iostat earlier in rpc_exit_task so we can count these RPCs completing in error. Signed-off-by: Dave Wysochanski Signed-off-by: Trond Myklebust net/sunrpc/sched.c | 5 +++++ net/sunrpc/xprt.c | 4 ---- 2 files changed, 5 insertions(+), 4 deletions(-) commit 5a0c257f8e0f4c4b3c33dff545317c21a921303e Author: NeilBrown Date: Thu May 30 10:41:28 2019 +1000 NFS: send state management on a single connection. With NFSv4.1, different network connections need to be explicitly bound to a session. During session startup, this is not possible so only a single connection must be used for session startup. So add a task flag to disable the default round-robin choice of connections (when nconnect > 1) and force the use of a single connection. Then use that flag on all requests for session management - for consistence, include NFSv4.0 management (SETCLIENTID) and session destruction Reported-by: Chuck Lever Signed-off-by: NeilBrown Signed-off-by: Trond Myklebust fs/nfs/nfs4proc.c | 22 +++++++++++++--------- include/linux/sunrpc/sched.h | 1 + net/sunrpc/clnt.c | 24 +++++++++++++++++++++++- 3 files changed, 37 insertions(+), 10 deletions(-) commit 53c326307156249253be36b33cd6c32f4a24f9b2 Author: Trond Myklebust Date: Mon Sep 17 13:32:02 2018 -0400 NFS: Allow multiple connections to a NFSv2 or NFSv3 server Signed-off-by: Trond Myklebust fs/nfs/client.c | 1 + 1 file changed, 1 insertion(+) commit fd87c8b73a0c7689cf3112b35c8c173e8326a5fb Author: Trond Myklebust Date: Thu Apr 27 11:40:04 2017 -0400 NFS: Display the "nconnect" mount option if it is set. Signed-off-by: Trond Myklebust fs/nfs/super.c | 2 ++ 1 file changed, 2 insertions(+) commit bb71e4a5d7eb151aa8d4e98c628b744f78af7c57 Author: Trond Myklebust Date: Thu Apr 27 11:22:07 2017 -0400 pNFS: Allow multiple connections to the DS If the user specifies -onconnect= mount option, and the transport protocol is TCP, then set up connections to the pNFS data server as well. The connections will all go to the same IP address. Signed-off-by: Trond Myklebust fs/nfs/nfs3client.c | 3 +++ fs/nfs/nfs4client.c | 3 +++ 2 files changed, 6 insertions(+) commit 6619079d05404cb32be29af329b87ac3b0ad4f96 Author: Trond Myklebust Date: Thu Apr 27 11:13:40 2017 -0400 NFSv4: Allow multiple connections to NFSv4.x (x>0) servers If the user specifies the -onconn= mount option, and the transport protocol is TCP, then set up connections to the server. The connections will all go to the same IP address. Signed-off-by: Trond Myklebust fs/nfs/client.c | 2 ++ fs/nfs/internal.h | 1 + fs/nfs/nfs4client.c | 11 +++++++++-- include/linux/nfs_fs_sb.h | 1 + 4 files changed, 13 insertions(+), 2 deletions(-) commit 28cc5cd8c68f1cd2146d88c7a54cc3234ed4dabe Author: Trond Myklebust Date: Wed Apr 26 23:30:48 2017 -0400 NFS: Add a mount option to specify number of TCP connections to use Allow the user to specify that the client should use multiple connections to the server. For the moment, this functionality will be limited to TCP and to NFSv4.x (x>0). Signed-off-by: Trond Myklebust fs/nfs/internal.h | 1 + fs/nfs/super.c | 10 ++++++++++ 2 files changed, 11 insertions(+) commit 612b41f808a98a124b23d72229693c3181733291 Author: Trond Myklebust Date: Thu Apr 27 08:50:51 2017 -0400 SUNRPC: Allow creation of RPC clients with multiple connections Add an argument to struct rpc_create_args that allows the specification of how many transport connections you want to set up to the server. Signed-off-by: Trond Myklebust include/linux/sunrpc/clnt.h | 1 + net/sunrpc/clnt.c | 17 ++++++++++++++++- net/sunrpc/xprtmultipath.c | 3 +-- 3 files changed, 18 insertions(+), 3 deletions(-) commit bf11fbdb20b385157b046ea7781f04d0c62554a3 Author: Trond Myklebust Date: Tue Jan 29 21:40:10 2019 -0500 NFS: Add sysfs support for per-container identifier In order to identify containers to the NFS client, we add a per-net sysfs attribute that udev can fill with the appropriate identifier. The identifier could be a unique hostname, but in most cases it will probably be a persisted uuid. Signed-off-by: Trond Myklebust fs/nfs/client.c | 4 ++ fs/nfs/netns.h | 3 ++ fs/nfs/sysfs.c | 118 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ fs/nfs/sysfs.h | 10 +++++ 4 files changed, 135 insertions(+) commit 1c341b777501613aad83f9c233a3fe5701cff083 Author: Trond Myklebust Date: Wed May 22 08:38:57 2019 -0400 NFS: Add deferred cache invalidation for close-to-open consistency violations If the client detects that close-to-open cache consistency has been violated, and that the file or directory has been changed on the server, then do a cache invalidation when we're done working with the file. The reason we don't do an immediate cache invalidation is that we want to avoid performance problems due to false positives. Also, note that we cannot guarantee cache consistency in this situation even if we do invalidate the cache. Signed-off-by: Trond Myklebust fs/nfs/dir.c | 4 ++++ fs/nfs/inode.c | 15 +++++++++++---- include/linux/nfs_fs.h | 2 ++ 3 files changed, 17 insertions(+), 4 deletions(-) commit c049f8ea9a0db11d87bc8cb4c106be65fe06b70b Author: Trond Myklebust Date: Thu May 2 11:23:12 2019 -0400 SUNRPC: Remove the bh-safe lock requirement on the rpc_wait_queue->lock Signed-off-by: Trond Myklebust net/sunrpc/sched.c | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) commit 21f0ffaff510b0530bfdf77da7133c0b99dee2fe Author: Trond Myklebust Date: Fri Apr 28 10:52:42 2017 -0400 SUNRPC: Add basic load balancing to the transport switch For now, just count the queue length. It is less accurate than counting number of bytes queued, but easier to implement. Signed-off-by: Trond Myklebust include/linux/sunrpc/xprt.h | 1 + include/linux/sunrpc/xprtmultipath.h | 2 ++ net/sunrpc/clnt.c | 40 +++++++++++++++++++++++++++++++++--- net/sunrpc/xprtmultipath.c | 20 +++++++++++++++++- 4 files changed, 59 insertions(+), 4 deletions(-) commit 10b7a70cbb81a62353f763c3343ac0c48410696f Author: Trond Myklebust Date: Wed Feb 6 09:32:50 2019 -0500 NFS: Cleanup - add nfs_clients_exit to mirror nfs_clients_init Add a helper to clean up the struct nfs_net when it is being destroyed. Signed-off-by: Trond Myklebust fs/nfs/client.c | 13 +++++++++++-- fs/nfs/inode.c | 6 +----- fs/nfs/internal.h | 2 +- 3 files changed, 13 insertions(+), 8 deletions(-) commit 996bc4f405d37ffd88c9b830202ee47fc7a6c449 Author: Trond Myklebust Date: Thu Jan 24 16:10:46 2019 -0500 NFS: Create a root NFS directory in /sys/fs/nfs Signed-off-by: Trond Myklebust fs/nfs/Makefile | 3 ++- fs/nfs/inode.c | 8 +++++++ fs/nfs/sysfs.c | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ fs/nfs/sysfs.h | 15 +++++++++++++ 4 files changed, 94 insertions(+), 1 deletion(-) commit b5e924191f87239e555f3ef3b8d8e697bb95e7dc Author: Trond Myklebust Date: Thu May 2 11:21:08 2019 -0400 SUNRPC: Remove the bh-safe lock requirement on xprt->transport_lock Signed-off-by: Trond Myklebust net/sunrpc/xprt.c | 61 ++++++++++++++---------------- net/sunrpc/xprtrdma/rpc_rdma.c | 4 +- net/sunrpc/xprtrdma/svc_rdma_backchannel.c | 4 +- net/sunrpc/xprtrdma/svc_rdma_transport.c | 8 ++-- net/sunrpc/xprtsock.c | 23 ++++++----- 5 files changed, 47 insertions(+), 53 deletions(-) commit 4f8943f8088348ec01456b075d44ad19dce3d698 Author: Trond Myklebust Date: Wed May 1 16:28:29 2019 -0400 SUNRPC: Replace direct task wakeups from softirq context Replace the direct task wakeups from inside a softirq context with wakeups from a process context. Signed-off-by: Trond Myklebust include/linux/sunrpc/xprtsock.h | 5 +++ net/sunrpc/xprtsock.c | 78 +++++++++++++++++++++++++++++++++++++---- 2 files changed, 77 insertions(+), 6 deletions(-) commit 7e0a0e38fcfea47e74b0ff6da6266f00bcd2af43 Author: Trond Myklebust Date: Wed May 1 10:49:27 2019 -0400 SUNRPC: Replace the queue timer with a delayed work function The queue timer function, which walks the RPC queue in order to locate candidates for waking up is one of the current constraints against removing the bh-safe queue spin locks. Replace it with a delayed work queue, so that we can do the actual rpc task wake ups from an ordinary process context. Signed-off-by: Trond Myklebust include/linux/sunrpc/sched.h | 3 ++- net/sunrpc/sched.c | 30 ++++++++++++++++++++---------- 2 files changed, 22 insertions(+), 11 deletions(-) commit 44942b4e457beda00981f616402a1a791e8c616e Author: Trond Myklebust Date: Thu Jun 27 06:41:45 2019 -0400 NFSv4: Handle the special Linux file open access mode According to the open() manpage, Linux reserves the access mode 3 to mean "check for read and write permission on the file and return a file descriptor that can't be used for reading or writing." Currently, the NFSv4 code will ask the server to open the file, and will use an incorrect share access mode of 0. Since it has an incorrect share access mode, the client later forgets to send a corresponding close, meaning it can leak stateids on the server. Fixes: ce4ef7c0a8a05 ("NFS: Split out NFS v4 file operations") Cc: stable@vger.kernel.org # 3.6+ Signed-off-by: Trond Myklebust fs/nfs/inode.c | 1 + fs/nfs/nfs4file.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit 1bf85d8c98756421e29b9990469ee63bb0bc87cc Author: Trond Myklebust Date: Thu Jun 27 06:30:48 2019 -0400 NFSv4: Handle open for execute correctly When mapping the NFSv4 context to an open mode and access mode, we need to treat the FMODE_EXEC flag differently. For the open mode, FMODE_EXEC means we need read share access. For the access mode checking, we need to verify that the user actually has execute access. Signed-off-by: Trond Myklebust fs/nfs/nfs4proc.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) commit 9b3b623804a67d2274ee372c1587926ab0275833 Author: Linus Walleij Date: Sat Jul 6 20:15:54 2019 +0200 Revert "gpio: tegra: Clean-up debugfs initialisation" This reverts commit a4de43049a1d0e2ed2a1d95e18e74b82cd9ca058. The commit creates build errors. Signed-off-by: Linus Walleij drivers/gpio/gpio-tegra.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit f0b40863bee4e5f689f6c839b4d0b512b8f0fdbe Author: Sebastian Andrzej Siewior Date: Thu Jul 4 17:38:03 2019 +0200 gpiolib: Use spinlock_t instead of struct spinlock For spinlocks the type spinlock_t should be used instead of "struct spinlock". Use spinlock_t for spinlock's definition. Cc: linux-gpio@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior Link: https://lore.kernel.org/r/20190704153803.12739-8-bigeasy@linutronix.de Reviewed-by: Bartosz Golaszewski Signed-off-by: Linus Walleij drivers/gpio/gpiolib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bff5a556c149804de29347a88a884d25e4e4e3a2 Author: Seeteena Thoufeek Date: Thu Jun 27 15:46:54 2019 +0530 perf tests: Fix record+probe_libc_inet_pton.sh for powerpc64 'probe libc's inet_pton & backtrace it with ping' testcase sometimes fails on powerpc because distro ping binary does not have symbol information and thus it prints "[unknown]" function name in the backtrace. Accept "[unknown]" as valid function name for powerpc as well. # perf test -v "probe libc's inet_pton & backtrace it with ping" Before: 59: probe libc's inet_pton & backtrace it with ping : --- start --- test child forked, pid 79695 ping 79718 [077] 96483.787025: probe_libc:inet_pton: (7fff83a754c8) 7fff83a754c8 __GI___inet_pton+0x8 (/usr/lib64/power9/libc-2.28.so) 7fff83a2b7a0 gaih_inet.constprop.7+0x1020 (/usr/lib64/power9/libc-2.28.so) 7fff83a2c170 getaddrinfo+0x160 (/usr/lib64/power9/libc-2.28.so) 1171830f4 [unknown] (/usr/bin/ping) FAIL: expected backtrace entry ".*\+0x[[:xdigit:]]+[[:space:]]\(.*/bin/ping.*\)$" got "1171830f4 [unknown] (/usr/bin/ping)" test child finished with -1 ---- end ---- probe libc's inet_pton & backtrace it with ping: FAILED! After: 59: probe libc's inet_pton & backtrace it with ping : --- start --- test child forked, pid 79085 ping 79108 [045] 96400.214177: probe_libc:inet_pton: (7fffbb9654c8) 7fffbb9654c8 __GI___inet_pton+0x8 (/usr/lib64/power9/libc-2.28.so) 7fffbb91b7a0 gaih_inet.constprop.7+0x1020 (/usr/lib64/power9/libc-2.28.so) 7fffbb91c170 getaddrinfo+0x160 (/usr/lib64/power9/libc-2.28.so) 132e830f4 [unknown] (/usr/bin/ping) test child finished with 0 ---- end ---- probe libc's inet_pton & backtrace it with ping: Ok Signed-off-by: Seeteena Thoufeek Reviewed-by: Kim Phillips Cc: Alexander Shishkin Cc: Hendrik Brueckner Cc: Jiri Olsa Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Sandipan Das Fixes: 1632936480a5 ("perf tests: Fix record+probe_libc_inet_pton.sh without ping's debuginfo") Link: http://lkml.kernel.org/r/1561630614-3216-1-git-send-email-s1seetee@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/shell/record+probe_libc_inet_pton.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cd136189370cc8a5aec0ea4b4ec517e5ee38d8a0 Author: Jiri Olsa Date: Wed Jul 3 10:09:49 2019 +0200 perf evsel: Do not rely on errno values for precise_ip fallback Konstantin reported problem with default perf record command, which fails on some AMD servers, because of the default maximum precise config. The current fallback mechanism counts on getting ENOTSUP errno for precise_ip fails, but that's not the case on some AMD servers. We can fix this by removing the errno check completely, because the precise_ip fallback is separated. We can just try (if requested by evsel->precise_max) all possible precise_ip, and if one succeeds we win, if not, we continue with standard fallback. Reported-by: Konstantin Kharlamov Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Quentin Monnet Cc: Kim Phillips Link: http://lkml.kernel.org/r/20190703080949.10356-1-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/evsel.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 4c00af0e94cd01b8c5a5e6b3323d34677b04e192 Author: Arnaldo Carvalho de Melo Date: Fri Jul 5 12:11:35 2019 -0300 perf thread: Allow references to thread objects after machine__exit() Threads are created when we either synthesize PERF_RECORD_FORK events for pre-existing threads or when we receive PERF_RECORD_FORK events from the kernel as new threads get created. We then keep them in machine->threads[].entries rb trees till when we receive a PERF_RECORD_EXIT, i.e. that thread terminated. The thread object has a reference count that is grabbed when, for instance, we keep that thread referenced in struct hist_entry, in 'perf report' and 'perf top'. When we receive a PERF_RECORD_EXIT we remove the thread object from the rb tree and move it to the corresponding machine->threads[].dead list, then we do a thread__put(), dropping the reference we had for keeping it in the rb tree. In thread__put() we were assuming that when the reference count hit zero we should remove it from the dead list by simply doing a list_del_init(&thread->node). That works well when all the thread lifetime is during the machine that has the list heads lifetime, since we know that we can do the list_del_init() and it will update the 'dead' list_head. But in 'perf sched lat' we were doing: machine__new() (via perf_session__new) process events, grabbing refcounts to keep those thread objects in 'perf sched' local data structures. machine__exit() (via perf_session__delete) which would delete the 'dead' list heads. And then doing the final thread__put() for the refcounts 'perf sched' rightfully obtained for keeping those thread object references. b00m, since thread__put() would do the list_del_init() touching a dead dead list head. Fix it by removing all the dead threads from machine->threads[].dead at machine__exit(), since whatever is there should have refcounts taken by things like 'perf sched lat', and make thread__put() check if the thread is in a linked list before removing it from that list. Reported-by: Wei Li Link: https://lkml.kernel.org/r/20190508143648.8153-1-liwei391@huawei.com Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Zhipeng Xie Link: https://lkml.kernel.org/r/20190704194355.GI10740@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/machine.c | 25 +++++++++++++++++++++++-- tools/perf/util/thread.c | 23 ++++++++++++++++++++--- 2 files changed, 43 insertions(+), 5 deletions(-) commit c952b35f4b15dd1b83e952718dec3307256383ef Author: Song Liu Date: Wed Jun 19 18:04:53 2019 -0700 perf header: Assign proper ff->ph in perf_event__synthesize_features() bpf/btf write_* functions need ff->ph->env. With this missing, pipe-mode (perf record -o -) would crash like: Program terminated with signal SIGSEGV, Segmentation fault. This patch assign proper ph value to ff. Committer testing: (gdb) run record -o - Starting program: /root/bin/perf record -o - PERFILE2 Thread 1 "perf" received signal SIGSEGV, Segmentation fault. __do_write_buf (size=4, buf=0x160, ff=0x7fffffff8f80) at util/header.c:126 126 memcpy(ff->buf + ff->offset, buf, size); (gdb) bt #0 __do_write_buf (size=4, buf=0x160, ff=0x7fffffff8f80) at util/header.c:126 #1 do_write (ff=ff@entry=0x7fffffff8f80, buf=buf@entry=0x160, size=4) at util/header.c:137 #2 0x00000000004eddba in write_bpf_prog_info (ff=0x7fffffff8f80, evlist=) at util/header.c:912 #3 0x00000000004f69d7 in perf_event__synthesize_features (tool=tool@entry=0x97cc00 , session=session@entry=0x7fffe9c6d010, evlist=0x7fffe9cae010, process=process@entry=0x4435d0 ) at util/header.c:3695 #4 0x0000000000443c79 in record__synthesize (tail=tail@entry=false, rec=0x97cc00 ) at builtin-record.c:1214 #5 0x0000000000444ec9 in __cmd_record (rec=0x97cc00 , argv=, argc=0) at builtin-record.c:1435 #6 cmd_record (argc=0, argv=) at builtin-record.c:2450 #7 0x00000000004ae3e9 in run_builtin (p=p@entry=0x98e058 , argc=argc@entry=3, argv=0x7fffffffd670) at perf.c:304 #8 0x000000000042eded in handle_internal_command (argv=, argc=) at perf.c:356 #9 run_argv (argcp=, argv=) at perf.c:400 #10 main (argc=3, argv=) at perf.c:522 (gdb) After the patch the SEGSEGV is gone. Reported-by: David Carrillo Cisneros Signed-off-by: Song Liu Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Namhyung Kim Cc: kernel-team@fb.com Cc: stable@vger.kernel.org # v5.1+ Fixes: 606f972b1361 ("perf bpf: Save bpf_prog_info information as headers to perf.data") Link: http://lkml.kernel.org/r/20190620010453.4118689-1-songliubraving@fb.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/header.c | 1 + 1 file changed, 1 insertion(+) commit c499d1f483a99e86a5f712277de7c8fa33a9ec0a Author: Arnaldo Carvalho de Melo Date: Sat Jul 6 14:26:40 2019 -0300 tools arch kvm: Sync kvm headers with the kernel sources To pick up the changes from: 41040cf7c5f0 ("arm64/sve: Fix missing SVE/FPSIMD endianness conversions") 6ca00dfafda7 ("KVM: x86: Modify struct kvm_nested_state to have explicit fields for data") None entail changes in tooling. This silences these tools/perf build warnings: Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/kvm.h' differs from latest version at 'arch/x86/include/uapi/asm/kvm.h' diff -u tools/arch/x86/include/uapi/asm/kvm.h arch/x86/include/uapi/asm/kvm.h Warning: Kernel ABI header at 'tools/arch/arm64/include/uapi/asm/kvm.h' differs from latest version at 'arch/arm64/include/uapi/asm/kvm.h' diff -u tools/arch/arm64/include/uapi/asm/kvm.h arch/arm64/include/uapi/asm/kvm.h Cc: Adrian Hunter Cc: Dave Martin Cc: Jiri Olsa Cc: Liran Alon Cc: Namhyung Kim Cc: Paolo Bonzini Cc: Will Deacon Link: https://lkml.kernel.org/n/tip-1cdbq5ulr4d6cx3iv2ye5wdv@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/arch/arm64/include/uapi/asm/kvm.h | 7 +++++++ tools/arch/x86/include/uapi/asm/kvm.h | 31 +++++++++++++++++++++---------- 2 files changed, 28 insertions(+), 10 deletions(-) commit cc6b9dfb2c5769afeb3335048173c730bdf8dbe1 Author: YueHaibing Date: Sat Jun 29 02:44:21 2019 +0000 i2c: mt7621: Fix platform_no_drv_owner.cocci warnings Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: YueHaibing Reviewed-by: Stefan Roese Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-mt7621.c | 1 - 1 file changed, 1 deletion(-) commit 1d87b88ba26eabd4745e158ecfd87c93a9b51dc2 Author: Szymon Janc Date: Wed Jun 19 00:47:47 2019 +0200 Bluetooth: Add SMP workaround Microsoft Surface Precision Mouse bug Microsoft Surface Precision Mouse provides bogus identity address when pairing. It connects with Static Random address but provides Public Address in SMP Identity Address Information PDU. Address has same value but type is different. Workaround this by dropping IRK if ID address discrepancy is detected. > HCI Event: LE Meta Event (0x3e) plen 19 LE Connection Complete (0x01) Status: Success (0x00) Handle: 75 Role: Master (0x00) Peer address type: Random (0x01) Peer address: E0:52:33:93:3B:21 (Static) Connection interval: 50.00 msec (0x0028) Connection latency: 0 (0x0000) Supervision timeout: 420 msec (0x002a) Master clock accuracy: 0x00 .... > ACL Data RX: Handle 75 flags 0x02 dlen 12 SMP: Identity Address Information (0x09) len 7 Address type: Public (0x00) Address: E0:52:33:93:3B:21 Signed-off-by: Szymon Janc Tested-by: Maarten Fonville Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=199461 Cc: stable@vger.kernel.org Signed-off-by: Marcel Holtmann net/bluetooth/smp.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 00f62726dd8bb4554e219e38c51104c49bd31bef Author: Luiz Augusto von Dentz Date: Mon Jun 3 13:48:43 2019 +0300 Bluetooth: L2CAP: Check bearer type on __l2cap_global_chan_by_addr The spec defines PSM and LE_PSM as different domains so a listen on the same PSM is valid if the address type points to a different bearer. Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Marcel Holtmann net/bluetooth/l2cap_core.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 1d0fac2c38edb25067e8f69195e2f76b67a2717d Author: Luiz Augusto von Dentz Date: Mon Jun 3 13:48:42 2019 +0300 Bluetooth: Use controller sets when available This makes use of controller sets when using Extended Advertising feature thus offloading the scheduling to the controller. Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Marcel Holtmann net/bluetooth/hci_conn.c | 2 +- net/bluetooth/hci_core.c | 3 ++- net/bluetooth/hci_request.c | 40 +++++++++++++++++++++++++++++++++------- net/bluetooth/hci_request.h | 2 +- 4 files changed, 37 insertions(+), 10 deletions(-) commit c49a8682fc5d298d44e8d911f4fa14690ea9485e Author: csonsino Date: Wed Jun 12 15:00:52 2019 -0600 Bluetooth: validate BLE connection interval updates Problem: The Linux Bluetooth stack yields complete control over the BLE connection interval to the remote device. The Linux Bluetooth stack provides access to the BLE connection interval min and max values through /sys/kernel/debug/bluetooth/hci0/ conn_min_interval and /sys/kernel/debug/bluetooth/hci0/conn_max_interval. These values are used for initial BLE connections, but the remote device has the ability to request a connection parameter update. In the event that the remote side requests to change the connection interval, the Linux kernel currently only validates that the desired value is within the acceptable range in the Bluetooth specification (6 - 3200, corresponding to 7.5ms - 4000ms). There is currently no validation that the desired value requested by the remote device is within the min/max limits specified in the conn_min_interval/conn_max_interval configurations. This essentially leads to Linux yielding complete control over the connection interval to the remote device. The proposed patch adds a verification step to the connection parameter update mechanism, ensuring that the desired value is within the min/max bounds of the current connection. If the desired value is outside of the current connection min/max values, then the connection parameter update request is rejected and the negative response is returned to the remote device. Recall that the initial connection is established using the local conn_min_interval/conn_max_interval values, so this allows the Linux administrator to retain control over the BLE connection interval. The one downside that I see is that the current default Linux values for conn_min_interval and conn_max_interval typically correspond to 30ms and 50ms respectively. If this change were accepted, then it is feasible that some devices would no longer be able to negotiate to their desired connection interval values. This might be remedied by setting the default Linux conn_min_interval and conn_max_interval values to the widest supported range (6 - 3200 / 7.5ms - 4000ms). This could lead to the same behavior as the current implementation, where the remote device could request to change the connection interval value to any value that is permitted by the Bluetooth specification, and Linux would accept the desired value. Signed-off-by: Carey Sonsino Signed-off-by: Marcel Holtmann net/bluetooth/hci_event.c | 5 +++++ net/bluetooth/l2cap_core.c | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) commit 302975cba1a4244d84e645773c82edbcfae1875f Author: Spoorthi Ravishankar Koppad Date: Fri Jun 21 14:51:56 2019 +0530 Bluetooth: Add support for LE ping feature Changes made to add HCI Write Authenticated Payload timeout command for LE Ping feature. As per the Core Specification 5.0 Volume 2 Part E Section 7.3.94, the following code changes implements HCI Write Authenticated Payload timeout command for LE Ping feature. Signed-off-by: Spoorthi Ravishankar Koppad Signed-off-by: Marcel Holtmann include/net/bluetooth/hci.h | 20 +++++++++++ include/net/bluetooth/hci_core.h | 4 +++ net/bluetooth/hci_conn.c | 3 ++ net/bluetooth/hci_core.c | 1 + net/bluetooth/hci_debugfs.c | 31 +++++++++++++++++ net/bluetooth/hci_event.c | 72 ++++++++++++++++++++++++++++++++++++++++ 6 files changed, 131 insertions(+) commit 28261da8a26f4915aa257d12d506c6ba179d961f Author: Matias Karhumaa Date: Tue May 21 13:07:22 2019 +0300 Bluetooth: Check state in l2cap_disconnect_rsp Because of both sides doing L2CAP disconnection at the same time, it was possible to receive L2CAP Disconnection Response with CID that was already freed. That caused problems if CID was already reused and L2CAP Connection Request with same CID was sent out. Before this patch kernel deleted channel context regardless of the state of the channel. Example where leftover Disconnection Response (frame #402) causes local device to delete L2CAP channel which was not yet connected. This in turn confuses remote device's stack because same CID is re-used without properly disconnecting. Btmon capture before patch: ** snip ** > ACL Data RX: Handle 43 flags 0x02 dlen 8 #394 [hci1] 10.748949 Channel: 65 len 4 [PSM 3 mode 0] {chan 2} RFCOMM: Disconnect (DISC) (0x43) Address: 0x03 cr 1 dlci 0x00 Control: 0x53 poll/final 1 Length: 0 FCS: 0xfd < ACL Data TX: Handle 43 flags 0x00 dlen 8 #395 [hci1] 10.749062 Channel: 65 len 4 [PSM 3 mode 0] {chan 2} RFCOMM: Unnumbered Ack (UA) (0x63) Address: 0x03 cr 1 dlci 0x00 Control: 0x73 poll/final 1 Length: 0 FCS: 0xd7 < ACL Data TX: Handle 43 flags 0x00 dlen 12 #396 [hci1] 10.749073 L2CAP: Disconnection Request (0x06) ident 17 len 4 Destination CID: 65 Source CID: 65 > HCI Event: Number of Completed Packets (0x13) plen 5 #397 [hci1] 10.752391 Num handles: 1 Handle: 43 Count: 1 > HCI Event: Number of Completed Packets (0x13) plen 5 #398 [hci1] 10.753394 Num handles: 1 Handle: 43 Count: 1 > ACL Data RX: Handle 43 flags 0x02 dlen 12 #399 [hci1] 10.756499 L2CAP: Disconnection Request (0x06) ident 26 len 4 Destination CID: 65 Source CID: 65 < ACL Data TX: Handle 43 flags 0x00 dlen 12 #400 [hci1] 10.756548 L2CAP: Disconnection Response (0x07) ident 26 len 4 Destination CID: 65 Source CID: 65 < ACL Data TX: Handle 43 flags 0x00 dlen 12 #401 [hci1] 10.757459 L2CAP: Connection Request (0x02) ident 18 len 4 PSM: 1 (0x0001) Source CID: 65 > ACL Data RX: Handle 43 flags 0x02 dlen 12 #402 [hci1] 10.759148 L2CAP: Disconnection Response (0x07) ident 17 len 4 Destination CID: 65 Source CID: 65 = bluetoothd: 00:1E:AB:4C:56:54: error updating services: Input/o.. 10.759447 > HCI Event: Number of Completed Packets (0x13) plen 5 #403 [hci1] 10.759386 Num handles: 1 Handle: 43 Count: 1 > ACL Data RX: Handle 43 flags 0x02 dlen 12 #404 [hci1] 10.760397 L2CAP: Connection Request (0x02) ident 27 len 4 PSM: 3 (0x0003) Source CID: 65 < ACL Data TX: Handle 43 flags 0x00 dlen 16 #405 [hci1] 10.760441 L2CAP: Connection Response (0x03) ident 27 len 8 Destination CID: 65 Source CID: 65 Result: Connection successful (0x0000) Status: No further information available (0x0000) < ACL Data TX: Handle 43 flags 0x00 dlen 27 #406 [hci1] 10.760449 L2CAP: Configure Request (0x04) ident 19 len 19 Destination CID: 65 Flags: 0x0000 Option: Maximum Transmission Unit (0x01) [mandatory] MTU: 1013 Option: Retransmission and Flow Control (0x04) [mandatory] Mode: Basic (0x00) TX window size: 0 Max transmit: 0 Retransmission timeout: 0 Monitor timeout: 0 Maximum PDU size: 0 > HCI Event: Number of Completed Packets (0x13) plen 5 #407 [hci1] 10.761399 Num handles: 1 Handle: 43 Count: 1 > ACL Data RX: Handle 43 flags 0x02 dlen 16 #408 [hci1] 10.762942 L2CAP: Connection Response (0x03) ident 18 len 8 Destination CID: 66 Source CID: 65 Result: Connection successful (0x0000) Status: No further information available (0x0000) *snip* Similar case after the patch: *snip* > ACL Data RX: Handle 43 flags 0x02 dlen 8 #22702 [hci0] 1664.411056 Channel: 65 len 4 [PSM 3 mode 0] {chan 3} RFCOMM: Disconnect (DISC) (0x43) Address: 0x03 cr 1 dlci 0x00 Control: 0x53 poll/final 1 Length: 0 FCS: 0xfd < ACL Data TX: Handle 43 flags 0x00 dlen 8 #22703 [hci0] 1664.411136 Channel: 65 len 4 [PSM 3 mode 0] {chan 3} RFCOMM: Unnumbered Ack (UA) (0x63) Address: 0x03 cr 1 dlci 0x00 Control: 0x73 poll/final 1 Length: 0 FCS: 0xd7 < ACL Data TX: Handle 43 flags 0x00 dlen 12 #22704 [hci0] 1664.411143 L2CAP: Disconnection Request (0x06) ident 11 len 4 Destination CID: 65 Source CID: 65 > HCI Event: Number of Completed Pac.. (0x13) plen 5 #22705 [hci0] 1664.414009 Num handles: 1 Handle: 43 Count: 1 > HCI Event: Number of Completed Pac.. (0x13) plen 5 #22706 [hci0] 1664.415007 Num handles: 1 Handle: 43 Count: 1 > ACL Data RX: Handle 43 flags 0x02 dlen 12 #22707 [hci0] 1664.418674 L2CAP: Disconnection Request (0x06) ident 17 len 4 Destination CID: 65 Source CID: 65 < ACL Data TX: Handle 43 flags 0x00 dlen 12 #22708 [hci0] 1664.418762 L2CAP: Disconnection Response (0x07) ident 17 len 4 Destination CID: 65 Source CID: 65 < ACL Data TX: Handle 43 flags 0x00 dlen 12 #22709 [hci0] 1664.421073 L2CAP: Connection Request (0x02) ident 12 len 4 PSM: 1 (0x0001) Source CID: 65 > ACL Data RX: Handle 43 flags 0x02 dlen 12 #22710 [hci0] 1664.421371 L2CAP: Disconnection Response (0x07) ident 11 len 4 Destination CID: 65 Source CID: 65 > HCI Event: Number of Completed Pac.. (0x13) plen 5 #22711 [hci0] 1664.424082 Num handles: 1 Handle: 43 Count: 1 > HCI Event: Number of Completed Pac.. (0x13) plen 5 #22712 [hci0] 1664.425040 Num handles: 1 Handle: 43 Count: 1 > ACL Data RX: Handle 43 flags 0x02 dlen 12 #22713 [hci0] 1664.426103 L2CAP: Connection Request (0x02) ident 18 len 4 PSM: 3 (0x0003) Source CID: 65 < ACL Data TX: Handle 43 flags 0x00 dlen 16 #22714 [hci0] 1664.426186 L2CAP: Connection Response (0x03) ident 18 len 8 Destination CID: 66 Source CID: 65 Result: Connection successful (0x0000) Status: No further information available (0x0000) < ACL Data TX: Handle 43 flags 0x00 dlen 27 #22715 [hci0] 1664.426196 L2CAP: Configure Request (0x04) ident 13 len 19 Destination CID: 65 Flags: 0x0000 Option: Maximum Transmission Unit (0x01) [mandatory] MTU: 1013 Option: Retransmission and Flow Control (0x04) [mandatory] Mode: Basic (0x00) TX window size: 0 Max transmit: 0 Retransmission timeout: 0 Monitor timeout: 0 Maximum PDU size: 0 > ACL Data RX: Handle 43 flags 0x02 dlen 16 #22716 [hci0] 1664.428804 L2CAP: Connection Response (0x03) ident 12 len 8 Destination CID: 66 Source CID: 65 Result: Connection successful (0x0000) Status: No further information available (0x0000) *snip* Fix is to check that channel is in state BT_DISCONN before deleting the channel. This bug was found while fuzzing Bluez's OBEX implementation using Synopsys Defensics. Reported-by: Matti Kamunen Reported-by: Ari Timonen Signed-off-by: Matias Karhumaa Signed-off-by: Marcel Holtmann net/bluetooth/l2cap_core.c | 6 ++++++ 1 file changed, 6 insertions(+) commit baa23ec860920ebf3e897c4bbb3420a88ea80ec1 Author: Marco Ammon Date: Thu Jul 4 12:50:41 2019 +0200 kconfig: Fix spelling of sym_is_changable There is a spelling mistake in "changable", it is corrected to "changeable" and all call sites are updated accordingly. Signed-off-by: Marco Ammon Signed-off-by: Masahiro Yamada scripts/kconfig/conf.c | 6 +++--- scripts/kconfig/confdata.c | 2 +- scripts/kconfig/lkc_proto.h | 2 +- scripts/kconfig/mconf.c | 10 +++++----- scripts/kconfig/nconf.c | 10 +++++----- scripts/kconfig/qconf.cc | 2 +- scripts/kconfig/symbol.c | 2 +- 7 files changed, 17 insertions(+), 17 deletions(-) commit a98429acadefc2b36611220f51659ecb3c1f35d2 Merge: 043b35f281f5 abdcfc25641c Author: Mark Brown Date: Sat Jul 6 12:25:28 2019 +0100 Merge remote-tracking branch 'asoc/topic/meson' into asoc-next commit 043b35f281f5f141e7a928d27492133ef33b8119 Merge: 0dceaf7c798d 87a6fe80d56b Author: Mark Brown Date: Sat Jul 6 12:25:26 2019 +0100 Merge branch 'asoc-5.3' into asoc-next commit 0dceaf7c798de953c74073cc77be40b7be49abbc Merge: 6fbc7275c7a9 1bcc1fd64e4d Author: Mark Brown Date: Sat Jul 6 12:25:24 2019 +0100 Merge branch 'asoc-5.2' into asoc-linus commit 87a6fe80d56be85bda093c4dd8a3e6535bda7e4a Author: Kai Vehmanen Date: Tue Jul 2 16:24:28 2019 +0300 ASoC: SOF: Intel: implement runtime idle for CNL/APL Implement runtime idle for CNL/APL devices using similar runtime PM idle logic as the Intel AZX HDA driver. If any HDA codecs are powered when runtime suspend request comes, return -EBUSY. By doing this, strict ordering is enforced between HDA codec and the HDA controller. Signed-off-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20190702132428.13129-4-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/apl.c | 1 + sound/soc/sof/intel/cnl.c | 1 + sound/soc/sof/intel/hda-dsp.c | 13 +++++++++++++ 3 files changed, 15 insertions(+) commit 62fde9772dd8400bc407de8822ede56b5f2f67f1 Author: Kai Vehmanen Date: Tue Jul 2 16:24:27 2019 +0300 ASoC: SOF: add runtime idle callback Add ability to implement a SOF device level runtime idle callback. Signed-off-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20190702132428.13129-3-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown sound/soc/sof/intel/hda.h | 1 + sound/soc/sof/ops.h | 8 ++++++++ sound/soc/sof/pm.c | 8 ++++++++ sound/soc/sof/sof-acpi-dev.c | 2 +- sound/soc/sof/sof-pci-dev.c | 2 +- sound/soc/sof/sof-priv.h | 2 ++ 6 files changed, 21 insertions(+), 2 deletions(-) commit e62bccf8a5ec47768ae2600dc880b148cce19f1b Author: Kai Vehmanen Date: Tue Jul 2 16:24:26 2019 +0300 ASoC: hdac_hdmi: report codec link up/down status to bus Report codec power status to the HDA codec bus from runtime pm suspend and resume callbacks. This is required to implement runtime idle logic that relies on 'codec_powered' field of hdac_bus to be maintained for all codecs. Signed-off-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20190702132428.13129-2-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown sound/soc/codecs/hdac_hdmi.c | 2 ++ 1 file changed, 2 insertions(+) commit dcae9052ebb0c5b2614de620323d615fcbfda7f8 Author: Dan Carpenter Date: Thu May 16 21:24:00 2019 +0300 Bluetooth: hidp: NUL terminate a string in the compat ioctl This change is similar to commit a1616a5ac99e ("Bluetooth: hidp: fix buffer overflow") but for the compat ioctl. We take a string from the user and forgot to ensure that it's NUL terminated. I have also changed the strncpy() in to strscpy() in hidp_setup_hid(). The difference is the strncpy() doesn't necessarily NUL terminate the destination string. Either change would fix the problem but it's nice to take a belt and suspenders approach and do both. Signed-off-by: Dan Carpenter Signed-off-by: Marcel Holtmann net/bluetooth/hidp/core.c | 2 +- net/bluetooth/hidp/sock.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit 44d34af2e4cfd0c5357182f8b43f3e0a1fe30a2e Author: João Paulo Rechi Vita Date: Thu May 23 13:32:01 2019 -0700 Bluetooth: Add new 13d3:3491 QCA_ROME device Without the QCA ROME setup routine this adapter fails to establish a SCO connection. T: Bus=01 Lev=01 Prnt=01 Port=08 Cnt=01 Dev#= 2 Spd=12 MxCh= 0 D: Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=13d3 ProdID=3491 Rev=00.01 C: #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA I: If#=0x0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb I: If#=0x1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb Signed-off-by: João Paulo Rechi Vita Signed-off-by: Marcel Holtmann drivers/bluetooth/btusb.c | 1 + 1 file changed, 1 insertion(+) commit 881cec4f6b4da78e54b73c046a60f39315964c7d Author: João Paulo Rechi Vita Date: Thu May 23 13:32:02 2019 -0700 Bluetooth: Add new 13d3:3501 QCA_ROME device Without the QCA ROME setup routine this adapter fails to establish a SCO connection. T: Bus=01 Lev=01 Prnt=01 Port=04 Cnt=01 Dev#= 2 Spd=12 MxCh= 0 D: Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=13d3 ProdID=3501 Rev=00.01 C: #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA I: If#=0x0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb I: If#=0x1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb Signed-off-by: João Paulo Rechi Vita Signed-off-by: Marcel Holtmann drivers/bluetooth/btusb.c | 1 + 1 file changed, 1 insertion(+) commit 4ce9146e0370fcd573f0372d9b4e5a211112567c Author: Tomas Bortoli Date: Tue May 28 15:42:58 2019 +0200 Bluetooth: hci_bcsp: Fix memory leak in rx_skb Syzkaller found that it is possible to provoke a memory leak by never freeing rx_skb in struct bcsp_struct. Fix by freeing in bcsp_close() Signed-off-by: Tomas Bortoli Reported-by: syzbot+98162c885993b72f19c4@syzkaller.appspotmail.com Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_bcsp.c | 5 +++++ 1 file changed, 5 insertions(+) commit 6c595ea8b7b9d4048760c28cbccd8956acbc0762 Author: Larry Finger Date: Wed May 29 13:12:34 2019 -0500 Bluetooth:: btrtl: Add support for RTL8723DU This device is functionally equivalent to the BT part of the RTL8723DE, uses the same firmware, but the LMP subversion and HCI revision are unique. Signed-off-by: Larry Finger Signed-off-by: Marcel Holtmann drivers/bluetooth/btrtl.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 055825614c6b4da8c931fe1dea2f2920553f7a67 Author: Sean Wang Date: Sun Jun 2 09:04:17 2019 +0800 Bluetooth: btmtkuart: add an implementation for clock osc property Some board requires explicitily control external osscilator via GPIO. So, add an implementation of a clock property for an external oscillator to the device. Signed-off-by: Sean Wang Signed-off-by: Marcel Holtmann drivers/bluetooth/btmtkuart.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) commit a3cb6d602a7a948f0b4ff77b6a087f9c25038d52 Author: Sean Wang Date: Sun Jun 2 09:04:16 2019 +0800 Bluetooth: btmtkuart: add an implementation for boot-gpios property Not every platform has the pinctrl device integrates the GPIO the function such as MT7621 whose pinctrl and GPIO are separate hardware so the driver adds additional boot-gpios to let the MT766[3,8]U can enter the proper boot mode by gpiod for such platform. Signed-off-by: Sean Wang Signed-off-by: Marcel Holtmann drivers/bluetooth/btmtkuart.c | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) commit 14e3ed84d77e78fbf386006d3e5a0c20150681f5 Author: Sean Wang Date: Sun Jun 2 09:04:15 2019 +0800 dt-bindings: net: bluetooth: add clock property to UART-based device Some board requires explicitily control external osscilator via GPIO. So, add a clock property for an external oscillator for the device. Signed-off-by: Sean Wang Signed-off-by: Marcel Holtmann Documentation/devicetree/bindings/net/mediatek-bluetooth.txt | 4 ++++ 1 file changed, 4 insertions(+) commit 1c576f385a440cd8790516d6227235b4161c6668 Author: Sean Wang Date: Sun Jun 2 09:04:14 2019 +0800 dt-bindings: net: bluetooth: add boot-gpios property to UART-based device Not every platform has the pinctrl device integrates the GPIO the function such as MT7621 whose pinctrl and GPIO are separate hardware so adding an additional boot-gpios property for such platform allows them to bring up the device. Signed-off-by: Sean Wang Signed-off-by: Marcel Holtmann .../devicetree/bindings/net/mediatek-bluetooth.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit f4d297eec673097ad5c1a971db7ea8f9b6e5fa2e Author: Neil Armstrong Date: Mon May 20 15:41:04 2019 +0200 Bluetooth: btbcm: Add entry for BCM4359C0 UART bluetooth The BCM4359C0 BT/Wi-Fi compo chip needs an entry to be discovered by the btbcm driver. Tested using an AP6398S module from Ampak. Signed-off-by: Neil Armstrong Signed-off-by: Marcel Holtmann drivers/bluetooth/btbcm.c | 1 + 1 file changed, 1 insertion(+) commit 956f664635ecca59d027d57c6eb5a5cf4b711c9b Author: Rocky Liao Date: Thu Jun 6 17:40:55 2019 +0800 dt-bindings: net: bluetooth: Add device property firmware-name for QCA6174 This patch adds an optional device property "firmware-name" to allow the driver to load customized nvm firmware file based on this property. Signed-off-by: Rocky Liao Reviewed-by: Rob Herring Signed-off-by: Marcel Holtmann Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt | 4 ++++ 1 file changed, 4 insertions(+) commit 99c905c6a165a590780a961988892bfec41566dd Author: Rocky Liao Date: Thu Jun 6 17:40:30 2019 +0800 Bluetooth: hci_qca: Load customized NVM based on the device property QCA BTSOC NVM is a customized firmware file and different vendors may want to have different BTSOC configuration (e.g. Configure SCO over PCM or I2S, Setting Tx power, etc.) via this file. This patch will allow vendors to download different NVM firmware file by reading a device property "firmware-name". Signed-off-by: Rocky Liao Tested-by: Harish Bandi Signed-off-by: Marcel Holtmann drivers/bluetooth/btqca.c | 8 ++++++-- drivers/bluetooth/btqca.h | 6 ++++-- drivers/bluetooth/hci_qca.c | 18 +++++++++++++++++- 3 files changed, 27 insertions(+), 5 deletions(-) commit be70e5e774a616ad43e63c0b42c2f6e2709dbf3b Author: Sascha Hauer Date: Fri Jun 14 09:23:51 2019 +0200 Bluetooth: hci_mrvl: Add serdev support This adds serdev support to the Marvell hci uart driver. Only basic serdev support, none of the fancier features like regulator or enable GPIO support is added for now. Signed-off-by: Sascha Hauer Signed-off-by: Marcel Holtmann .../devicetree/bindings/net/marvell-bluetooth.txt | 25 ++++++++ drivers/bluetooth/Kconfig | 1 + drivers/bluetooth/hci_mrvl.c | 69 +++++++++++++++++++++- 3 files changed, 94 insertions(+), 1 deletion(-) commit a55b896455f558075197d89e026c91fcea263627 Author: Sascha Hauer Date: Fri Jun 14 09:23:50 2019 +0200 Bluetooth: hci_mrvl: Wait for final ack before switching baudrate For the Marvell HCI UART we have to upload two firmware files. The first one is only for switching the baudrate of the device to a higher baudrate. After the baudrate switching firmware has been uploaded the device waits for a final ack (0x5a) before actually switching the baudrate. To send this final ack with the old baudrate give the hci ldisc workqueue a chance to run before switching the baudrate. Without this the final ack will never be received by the device and firmware upload fails. Signed-off-by: Sascha Hauer Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_mrvl.c | 3 +++ 1 file changed, 3 insertions(+) commit 40fbb915fd0f4b088f5c9b07061b7d665287d26f Author: Sascha Hauer Date: Fri Jun 14 09:23:49 2019 +0200 Bluetooth: hci_ldisc: Add function to wait for characters to be sent The hci UART line discipline sends its characters in a workqueue. Some devices like the Marvell Bluetooth chips need to make sure that all queued characters are sent before switching the baudrate. This adds a function to synchronize with the workqueue. Signed-off-by: Sascha Hauer Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_ldisc.c | 8 ++++++++ drivers/bluetooth/hci_uart.h | 1 + 2 files changed, 9 insertions(+) commit db50450d096a452ae36dc265575cbff50f0f9f01 Author: Greg Kroah-Hartman Date: Fri Jun 14 09:14:23 2019 +0200 6lowpan: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Because we don't care if debugfs works or not, this trickles back a bit so we can clean things up by making some functions return void instead of an error value that is never going to fail. Signed-off-by: Greg Kroah-Hartman Acked-by: Jukka Rissanen Signed-off-by: Marcel Holtmann net/6lowpan/6lowpan_i.h | 16 ++------ net/6lowpan/core.c | 8 +--- net/6lowpan/debugfs.c | 97 +++++++++++++------------------------------------ 3 files changed, 32 insertions(+), 89 deletions(-) commit 2faa3f15fa2fc13ad1e12a61fc3dbb14b326ba7a Author: Matthias Kaehlcke Date: Tue May 21 12:53:07 2019 -0700 Bluetooth: hci_qca: wcn3990: Drop baudrate change vendor event Firmware download to the WCN3990 often fails with a 'TLV response size mismatch' error: [ 133.064659] Bluetooth: hci0: setting up wcn3990 [ 133.489150] Bluetooth: hci0: QCA controller version 0x02140201 [ 133.495245] Bluetooth: hci0: QCA Downloading qca/crbtfw21.tlv [ 133.507214] Bluetooth: hci0: QCA TLV response size mismatch [ 133.513265] Bluetooth: hci0: QCA Failed to download patch (-84) This is caused by a vendor event that corresponds to an earlier command to change the baudrate. The event is not processed in the context of the baudrate change and is later interpreted as response to the firmware download command (which is also a vendor command), but the driver detects that the event doesn't have the expected amount of associated data. More details: For the WCN3990 the vendor command for a baudrate change isn't sent as synchronous HCI command, because the controller sends the corresponding vendor event with the new baudrate. The event is received and decoded after the baudrate change of the host port. Identify the 'unused' event when it is received and don't add it to the queue of RX frames. Signed-off-by: Matthias Kaehlcke Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_qca.c | 55 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) commit 32646db8cc2862a14788de1bb4c365d0a27fb532 Author: Balakrishna Godavarthi Date: Tue May 28 14:43:22 2019 -0700 Bluetooth: btqca: inject command complete event during fw download Latest qualcomm chips are not sending an command complete event for every firmware packet sent to chip. They only respond with a vendor specific event for the last firmware packet. This optimization will decrease the BT ON time. Due to this we are seeing a timeout error message logs on the console during firmware download. Now we are injecting a command complete event once we receive an vendor specific event for the last RAM firmware packet. Signed-off-by: Balakrishna Godavarthi Tested-by: Matthias Kaehlcke Reviewed-by: Matthias Kaehlcke Signed-off-by: Matthias Kaehlcke Signed-off-by: Marcel Holtmann drivers/bluetooth/btqca.c | 39 ++++++++++++++++++++++++++++++++++++++- drivers/bluetooth/btqca.h | 4 ++++ 2 files changed, 42 insertions(+), 1 deletion(-) commit 82b7d856649988b5ddaad5f17abb787f6909107f Author: Fabian Schindlatz Date: Sun Jun 23 23:15:48 2019 +0200 Bluetooth: Cleanup formatting and coding style Fix some warnings and one error reported by checkpatch.pl: - lines longer than 80 characters are wrapped - empty lines inserted to separate variable declarations from the actual code - line break inserted after if (...) Co-developed-by: Thomas Röthenbacher Signed-off-by: Thomas Röthenbacher Signed-off-by: Fabian Schindlatz Cc: linux-kernel@i4.cs.fau.de Signed-off-by: Marcel Holtmann drivers/bluetooth/bpa10x.c | 3 ++- drivers/bluetooth/hci_ll.c | 25 ++++++++++++++++++------- 2 files changed, 20 insertions(+), 8 deletions(-) commit 7af3f558aca74f2ee47b173f1c27f6bb9a5b5561 Author: Jian-Hong Pan Date: Tue Jun 25 16:30:51 2019 +0800 Bluetooth: btrtl: HCI reset on close for Realtek BT chip Realtek RTL8822BE BT chip on ASUS X420FA cannot be turned on correctly after on-off several times. Bluetooth daemon sets BT mode failed when this issue happens. Scanning must be active while turning off for this bug to be hit. bluetoothd[1576]: Failed to set mode: Failed (0x03) If BT is turned off, then turned on again, it works correctly again. According to the vendor driver, the HCI_QUIRK_RESET_ON_CLOSE flag is set during probing. So, this patch makes Realtek's BT reset on close to fix this issue. Link: https://bugzilla.kernel.org/show_bug.cgi?id=203429 Signed-off-by: Jian-Hong Pan Reviewed-by: Daniel Drake Signed-off-by: Marcel Holtmann drivers/bluetooth/btrtl.c | 20 ++++++++++++++++++++ drivers/bluetooth/btrtl.h | 6 ++++++ drivers/bluetooth/btusb.c | 1 + 3 files changed, 27 insertions(+) commit 6322f377bc4a0e3dac040c1c6d01761514f42187 Author: Fabian Schindlatz Date: Mon Jul 1 22:57:13 2019 +0200 Bluetooth: hci_ll: Refactor download_firmware Extract the new function send_command_from_firmware from download_firmware, which helps with the readability of the switch statement. This way the code is less deeply nested and also no longer exceeds the 80 character limit. Co-developed-by: Thomas Röthenbacher Signed-off-by: Thomas Röthenbacher Signed-off-by: Fabian Schindlatz Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_ll.c | 45 ++++++++++++++++++++++++++++----------------- 1 file changed, 28 insertions(+), 17 deletions(-) commit a2e02f38eff84f199c8e32359eb213f81f270047 Author: Philipp Puschmann Date: Tue Jul 2 16:13:37 2019 +0200 Bluetooth: hci_ll: set operational frequency earlier Uploading the firmware needs quite a few seconds if done at 115200 kbps. So set the operational frequency, usually 3 MHz, before uploading the firmware. I have successfully tested this with a wl1837mod. Signed-off-by: Philipp Puschmann Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_ll.c | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) commit 98d9856a759f5cc8032efeb5c87badc1c652d430 Author: Peter Robinson Date: Sun Jun 30 23:14:08 2019 +0100 Bluetooth: btsdio: Do not bind to non-removable BCM4356 BCM4356 devices soldered onto the PCB (non-removable) use an UART connection for bluetooth, such as the Rock960, but it also advertise btsdio support as a sdio function. Signed-off-by: Peter Robinson CC: Manivannan Sadhasivam Signed-off-by: Marcel Holtmann drivers/bluetooth/btsdio.c | 1 + 1 file changed, 1 insertion(+) commit 3a1d24ca9573fbc74a3d32c972c333b161e0e9dc Author: Zenghui Yu Date: Sat Jul 6 04:41:12 2019 +0000 irq/irqdomain: Fix comment typo Fix typo in the comment on top of __irq_domain_add(). Signed-off-by: Zenghui Yu Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/1562388072-23492-1-git-send-email-yuzenghui@huawei.com kernel/irq/irqdomain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c09cb1293523dd786ae54a12fd88001542cba2f6 Author: Shijith Thotton Date: Fri Jul 5 07:56:20 2019 +0000 genirq: Update irq stats from NMI handlers The NMI handlers handle_percpu_devid_fasteoi_nmi() and handle_fasteoi_nmi() do not update the interrupt counts. Due to that the NMI interrupt count does not show up correctly in /proc/interrupts. Add the statistics and treat the NMI handlers in the same way as per cpu interrupts and prevent them from updating irq_desc::tot_count as this might be corrupted due to concurrency. [ tglx: Massaged changelog ] Fixes: 2dcf1fbcad35 ("genirq: Provide NMI handlers") Signed-off-by: Shijith Thotton Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/1562313336-11888-1-git-send-email-sthotton@marvell.com kernel/irq/chip.c | 4 ++++ kernel/irq/irqdesc.c | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) commit ad5a449b707b909a91ed59109f421a1b965c6004 Author: Dexuan Cui Date: Thu Jul 4 02:43:32 2019 +0000 ACPI: PM: Make acpi_sleep_state_supported() non-static With some upcoming patches to save/restore the Hyper-V drivers related states, a Linux VM running on Hyper-V will be able to hibernate. When a Linux VM hibernates, unluckily we must disable the memory hot-add/remove and balloon up/down capabilities in the hv_balloon driver (drivers/hv/hv_balloon.c), because these can not really work according to the design of the related back-end driver on the host. By default, Hyper-V does not enable the virtual ACPI S4 state for a VM; on recent Hyper-V hosts, the administrator is able to enable the virtual ACPI S4 state for a VM, so we hope to use the presence of the virtual ACPI S4 state as a hint for hv_balloon to disable the aforementioned capabilities. In this way, hibernation will work more reliably, from the user's perspective. By marking acpi_sleep_state_supported() non-static, we'll be able to implement a hv_is_hibernation_supported() API in the always-built-in module arch/x86/hyperv/hv_init.c, and the API will be called by hv_balloon. Signed-off-by: Dexuan Cui Signed-off-by: Rafael J. Wysocki drivers/acpi/sleep.c | 2 +- include/acpi/acpi_bus.h | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) commit 0ef1efd1354d732d040f29b2005420f83fcdd8f4 Author: Pablo Neira Ayuso Date: Fri Jul 5 23:38:54 2019 +0200 netfilter: nf_tables: force module load in case select_ops() returns -EAGAIN nft_meta needs to pull in the nft_meta_bridge module in case that this is a bridge family rule from the select_ops() path. Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 6 ++++++ net/netfilter/nft_meta.c | 4 ++++ 2 files changed, 10 insertions(+) commit 23f30c41c732fe9800f4a2d545b37c9515d35ad6 Merge: 61c2491db779 d2ead1f360e8 Author: David S. Miller Date: Fri Jul 5 16:29:20 2019 -0700 Merge branch 'mlx5-TLS-TX-HW-offload-support' Tariq Toukan says: ==================== mlx5 TLS TX HW offload support This series from Eran and me, adds TLS TX HW offload support to the mlx5 driver. This offloads the kTLS encryption process from kernel to the Mellanox NIC, saving CPU cycles and improving utilization. Upon a new TLS connection request, driver is responsible to create a dedicated HW context and configure it according to the crypto info, so HW can do the encryption itself. When the HW context gets out-of-sync (i.e. due to packets retransmission), driver is responsible for the re-sync process. This is done by posting special resync descriptors to the HW. Feature is supported on Mellanox Connect-X 6DX, and newer. Series was tested on SimX simulator. Series generated against net-next commit [1], with Saeed's request pulled [2]: [1] c4cde5804d51 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next [2] git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux.git tags/mlx5-updates-2019-07-04-v2 Changes from last pull request: Fixed comments from Jakub: Patch 4: - Replace zero memset with a call to memzero_explicit(). Patch 11: - Fix stats counters names. - Drop TLS SKB with non-matching netdev. ==================== Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit d2ead1f360e8abd9817dea4f7290ffaf00078ac1 Author: Tariq Toukan Date: Fri Jul 5 18:30:22 2019 +0300 net/mlx5e: Add kTLS TX HW offload support Add support for transmit side kernel-TLS acceleration. Offload the crypto encryption to HW. Per TLS connection: - Use a separate TIS to maintain the HW context. - Use a separate encryption key. - Maintain static and progress HW contexts by posting the proper WQEs at creation time, or upon resync. - Use a special DUMP opcode to replay the previous frags and sync the HW context. To make sure the SQ is able to serve an xmit request, increase SQ stop room to cover: - static params WQE, - progress params WQE, and - resync DUMP per frag. Currently supporting TLS 1.2, and key size 128bit. Tested over SimX simulator. Signed-off-by: Tariq Toukan Signed-off-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/Makefile | 3 +- drivers/net/ethernet/mellanox/mlx5/core/en.h | 8 +- drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h | 8 +- .../ethernet/mellanox/mlx5/core/en_accel/ktls.c | 93 +++++ .../ethernet/mellanox/mlx5/core/en_accel/ktls.h | 97 +++++ .../ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c | 459 +++++++++++++++++++++ .../net/ethernet/mellanox/mlx5/core/en_accel/tls.c | 5 + .../net/ethernet/mellanox/mlx5/core/en_accel/tls.h | 11 +- .../mellanox/mlx5/core/en_accel/tls_rxtx.c | 5 + drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 3 + drivers/net/ethernet/mellanox/mlx5/core/en_stats.c | 28 +- drivers/net/ethernet/mellanox/mlx5/core/en_stats.h | 14 + drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 15 + drivers/net/ethernet/mellanox/mlx5/core/fw.c | 6 + 14 files changed, 748 insertions(+), 7 deletions(-) commit 37badd159c52768e31aab2c978b9f837e4dd66bc Author: Tariq Toukan Date: Fri Jul 5 18:30:21 2019 +0300 net/mlx5e: Introduce a fenced NOP WQE posting function Similar to the existing mlx5e_post_nop(), but marks a fence in the WQE control segment. Added as a separate new function to not hurt the performance of the common case. To be used in a downstream patch of the series. Signed-off-by: Tariq Toukan Reviewed-by: Boris Pismenny Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 2b257a6e736f5af17c796087b628cb320cdec062 Author: Tariq Toukan Date: Fri Jul 5 18:30:20 2019 +0300 net/mlx5e: Re-work TIS creation functions Let the EN TIS creation function (mlx5e_create_tis) be responsible for applying common mdev related fields. Other specific fields must be set by the caller and passed within the inbox. Signed-off-by: Tariq Toukan Reviewed-by: Boris Pismenny Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en.h | 3 +-- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 17 ++++++++++------- drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 14 +++++++++++++- drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.h | 2 ++ .../net/ethernet/mellanox/mlx5/core/ipoib/ipoib_vlan.c | 2 +- 5 files changed, 27 insertions(+), 11 deletions(-) commit 01614d4f603ed651098b7741f4742e7caf6d0155 Author: Tariq Toukan Date: Fri Jul 5 18:30:19 2019 +0300 net/mlx5e: Tx, Unconstify SQ stop room Use an SQ field for stop_room, and use the larger value only if TLS is supported. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 + drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h | 14 ++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 5 ++++- drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 18 ++---------------- 4 files changed, 21 insertions(+), 17 deletions(-) commit 9ab0233728cab92575eee90a86cda639ef34ba57 Author: Eran Ben Elisha Date: Fri Jul 5 18:30:18 2019 +0300 net/mlx5e: Tx, Don't implicitly assume SKB-less wqe has one WQEBB When polling a CQE of an SKB-less WQE, don't assume it consumed only one WQEBB. Use wi->num_wqebbs directly instead. In the downstream patch, SKB-less WQEs might have more the one WQEBB, thus this change is needed. Signed-off-by: Eran Ben Elisha Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fd1b225963189f2f16d44649496a8246c5cfdbc2 Author: Tariq Toukan Date: Fri Jul 5 18:30:17 2019 +0300 net/mlx5e: Tx, Make SQ WQE fetch function type generic Change mlx5e_sq_fetch_wqe to be agnostic to the Work Queue Element (WQE) type. Before this patch, it was specific for struct mlx5e_tx_wqe. In order to allow the change, the function now returns the generic void pointer, and gets the WQE size to do the zero memset. Signed-off-by: Tariq Toukan Signed-off-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h | 12 +++++++----- drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls_rxtx.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 4 ++-- 3 files changed, 10 insertions(+), 8 deletions(-) commit 740114a87e43a4ceb9ff5ff3a4a704bcef1f60be Author: Tariq Toukan Date: Fri Jul 5 18:30:16 2019 +0300 net/mlx5e: Tx, Enforce L4 inline copy when needed When ctrl->tisn field exists, this indicates an operation (HW offload) on the TCP payload. For such WQEs, inline the headers up to L4. This is in preparation for kTLS HW offload support, added in a downstream patch. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h | 5 +++++ drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) commit 542578c6793698a98cd0b7c77a96b8c6bfdfcb88 Author: Tariq Toukan Date: Fri Jul 5 18:30:15 2019 +0300 net/mlx5e: Move helper functions to a new txrx datapath header Take datapath helper functions to a new header file en/txrx.h. Signed-off-by: Tariq Toukan Signed-off-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en.h | 102 ------------- drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h | 163 +++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/en/xdp.h | 1 + .../mellanox/mlx5/core/en_accel/en_accel.h | 1 + .../mellanox/mlx5/core/en_accel/ipsec_rxtx.h | 1 + .../mellanox/mlx5/core/en_accel/tls_rxtx.h | 1 + drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 + drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 52 +------ 8 files changed, 170 insertions(+), 153 deletions(-) commit fc707e59c9dda2b3675b137757907e41d658da7e Author: Tariq Toukan Date: Fri Jul 5 18:30:14 2019 +0300 net/mlx5: Accel, Add core TLS support for the Connect-X family Add support for the new TLS implementation of the Connect-X family. Introduce a new compilation flag MLX5_TLS for it. Signed-off-by: Tariq Toukan Signed-off-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/Kconfig | 13 +++++- .../net/ethernet/mellanox/mlx5/core/accel/tls.c | 42 ++++++++++++++++++- .../net/ethernet/mellanox/mlx5/core/accel/tls.h | 49 +++++++++++++++++++++- 3 files changed, 101 insertions(+), 3 deletions(-) commit 45d3b55dc665670f87373744e30fa0e8eaced495 Author: Tariq Toukan Date: Fri Jul 5 18:30:13 2019 +0300 net/mlx5: Add crypto library to support create/destroy encryption key Encryption key create / destroy is done via CREATE_GENERAL_OBJECT / DESTROY_GENERAL_OBJECT commands. To be used in downstream patches by TLS API wrappers, to configure the TIS context with the encryption key. Signed-off-by: Tariq Toukan Signed-off-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/Makefile | 2 +- .../net/ethernet/mellanox/mlx5/core/lib/crypto.c | 72 ++++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/lib/mlx5.h | 5 ++ 3 files changed, 78 insertions(+), 1 deletion(-) commit e2869fb2068be603b46cd62bc980b4765948c6ed Author: Tariq Toukan Date: Fri Jul 5 18:30:12 2019 +0300 net/mlx5: Kconfig, Better organize compilation flags Always contain all acceleration functions declarations in 'accel' files, independent to the flags setting. For this, introduce new flags CONFIG_FPGA_{IPSEC/TLS} and use stubs where needed. This obsoletes the need for stubs in 'fpga' files. Remove them. Also use the new flags in Makefile, to decide whether to compile TLS-specific or IPSEC-specific objects, or not. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/Kconfig | 43 ++++++++++--- drivers/net/ethernet/mellanox/mlx5/core/Makefile | 7 +- .../net/ethernet/mellanox/mlx5/core/accel/ipsec.c | 4 ++ .../net/ethernet/mellanox/mlx5/core/accel/ipsec.h | 2 +- .../net/ethernet/mellanox/mlx5/core/accel/tls.c | 3 + .../net/ethernet/mellanox/mlx5/core/accel/tls.h | 4 +- .../net/ethernet/mellanox/mlx5/core/fpga/ipsec.h | 75 ---------------------- include/linux/mlx5/accel.h | 2 +- 8 files changed, 47 insertions(+), 93 deletions(-) commit c778dd31ac22f9027b7c8dfd62f421e245b49639 Author: Tariq Toukan Date: Fri Jul 5 18:30:11 2019 +0300 net/mlx5: Accel, Expose accel wrapper for IPsec FPGA function Do not directly call fpga version of IPsec function from main.c. Wrap it by an accel version, and call the wrapper. This will allow deprecating the FPGA IPsec stubs in downstream patch. Signed-off-by: Tariq Toukan Reviewed-by: Boris Pismenny Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/accel/ipsec.c | 5 +++++ drivers/net/ethernet/mellanox/mlx5/core/accel/ipsec.h | 5 +++++ drivers/net/ethernet/mellanox/mlx5/core/main.c | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) commit 61c2491db779c94d29446cea38b95d0c72bc1a9e Merge: f654e676702e 8338d9378895 Author: David S. Miller Date: Fri Jul 5 16:24:27 2019 -0700 Merge tag 'mlx5-updates-2019-07-04-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-update-2019-07-04 This series adds mlx5 support for devlink fw versions query. 1) Implement the required low level firmware commands 2) Implement the devlink knobs and callbacks for fw versions query. ==================== Signed-off-by: David S. Miller commit 537de0c8ca2b2fd49046e06194425f56e6246148 Author: Ido Schimmel Date: Thu Jul 4 19:26:38 2019 +0300 ipv4: Fix NULL pointer dereference in ipv4_neigh_lookup() Both ip_neigh_gw4() and ip_neigh_gw6() can return either a valid pointer or an error pointer, but the code currently checks that the pointer is not NULL. Fix this by checking that the pointer is not an error pointer, as this can result in a NULL pointer dereference [1]. Specifically, I believe that what happened is that ip_neigh_gw4() returned '-EINVAL' (0xffffffffffffffea) to which the offset of 'refcnt' (0x70) was added, which resulted in the address 0x000000000000005a. [1] BUG: KASAN: null-ptr-deref in refcount_inc_not_zero_checked+0x6e/0x180 Read of size 4 at addr 000000000000005a by task swapper/2/0 CPU: 2 PID: 0 Comm: swapper/2 Not tainted 5.2.0-rc6-custom-reg-179657-gaa32d89 #396 Hardware name: Mellanox Technologies Ltd. MSN2010/SA002610, BIOS 5.6.5 08/24/2017 Call Trace: dump_stack+0x73/0xbb __kasan_report+0x188/0x1ea kasan_report+0xe/0x20 refcount_inc_not_zero_checked+0x6e/0x180 ipv4_neigh_lookup+0x365/0x12c0 __neigh_update+0x1467/0x22f0 arp_process.constprop.6+0x82e/0x1f00 __netif_receive_skb_one_core+0xee/0x170 process_backlog+0xe3/0x640 net_rx_action+0x755/0xd90 __do_softirq+0x29b/0xae7 irq_exit+0x177/0x1c0 smp_apic_timer_interrupt+0x164/0x5e0 apic_timer_interrupt+0xf/0x20 Fixes: 5c9f7c1dfc2e ("ipv4: Add helpers for neigh lookup for nexthop") Signed-off-by: Ido Schimmel Reported-by: Shalom Toledo Reviewed-by: Jiri Pirko Reviewed-by: David Ahern Signed-off-by: David S. Miller net/ipv4/route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f654e676702e88650e78ed8ea1b118662f80b28a Author: Sebastian Andrzej Siewior Date: Thu Jul 4 17:38:02 2019 +0200 nfp: Use spinlock_t instead of struct spinlock For spinlocks the type spinlock_t should be used instead of "struct spinlock". Use spinlock_t for spinlock's definition. Cc: Jakub Kicinski Cc: "David S. Miller" Cc: oss-drivers@netronome.com Cc: netdev@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior Acked-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cd1973a9215ade41d99c3a7c34c127cf0d21774b Author: Ilias Apalodimas Date: Thu Jul 4 17:11:09 2019 +0300 net: netsec: Sync dma for device on buffer allocation Quoting Arnd, We have to do a sync_single_for_device /somewhere/ before the buffer is given to the device. On a non-cache-coherent machine with a write-back cache, there may be dirty cache lines that get written back after the device DMA's data into it (e.g. from a previous memset from before the buffer got freed), so you absolutely need to flush any dirty cache lines on it first. Since the coherency is configurable in this device make sure we cover all configurations by explicitly syncing the allocated buffer for the device before refilling it's descriptors Signed-off-by: Ilias Apalodimas Signed-off-by: David S. Miller drivers/net/ethernet/socionext/netsec.c | 5 +++++ 1 file changed, 5 insertions(+) commit 2bf8001e5387537f2d9acfecf3d724e0d6044b23 Merge: e4aa33ad5959 892951524647 Author: David S. Miller Date: Fri Jul 5 15:39:39 2019 -0700 Merge branch 'hns3-next' Huazhong Tan says: ==================== net: hns3: some cleanups & bugfixes This patch-set includes cleanups and bugfixes for the HNS3 ethernet controller driver. [patch 1/9] fixes VF's broadcast promisc mode not enabled after initializing. [patch 2/9] adds hints for fibre port not support flow control. [patch 3/9] fixes a port capbility updating issue. [patch 4/9 - 9/9] adds some cleanups for HNS3 driver. ==================== Signed-off-by: David S. Miller commit 892951524647d593d9f5e540a56fef4e52b95c03 Author: Peng Li Date: Thu Jul 4 22:04:28 2019 +0800 net: hns3: set maximum length to resp_data_len for exceptional case If HCLGE_MBX_MAX_RESP_DATA_SIZE > HCLGE_MBX_MAX_RESP_DATA_SIZE, the memcpy will cause out of memory. So this patch just set resp_data_len to the maximum length for this case. Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c | 4 ++++ 1 file changed, 4 insertions(+) commit b9a8f88373c586e357c8c203b657407437040e40 Author: Yonglong Liu Date: Thu Jul 4 22:04:27 2019 +0800 net: hns3: bitwise operator should use unsigned type There are some bitwise operator used signed type, this patch fixes them with unsigned type. Signed-off-by: Yonglong Liu Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 9 +++-- drivers/net/ethernet/hisilicon/hns3/hns3_enet.h | 2 +- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 43 ++++++++++++---------- 3 files changed, 29 insertions(+), 25 deletions(-) commit 354d0fab649d47045517cf7cae03d653a4dcb3b8 Author: Peng Li Date: Thu Jul 4 22:04:26 2019 +0800 net: hns3: add default value for tc_size and tc_offset This patch adds default value for tc_size and tc_offset, or it may get random value and used later. Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 0bae5cf25d66156ae3eb9ca20a1ad9bc4aa35a6d Author: Weihang Li Date: Thu Jul 4 22:04:25 2019 +0800 net: hns3: check msg_data before memcpy in hclgevf_send_mbx_msg The value of msg_data may be NULL in some cases, which will cause errors reported by some compiler. So this patch adds a check to fix it. Signed-off-by: Weihang Li Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_mbx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c09ba484563c17f90ec91b46322c31d3440acc42 Author: Peng Li Date: Thu Jul 4 22:04:24 2019 +0800 net: hns3: set default value for param "type" in hclgevf_bind_ring_to_vector The value of param type is always not changed in hclgevf_bind_ring_to_vector, move the assignment to front of "for {}" can reduce the redundant assignment. Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 9e1511fb8091e3f5b23bb21f32e9394bedc6c34e Author: Peng Li Date: Thu Jul 4 22:04:23 2019 +0800 net: hns3: add all IMP return code Currently, the HNS3 driver just defines part of IMP return code, This patch supplements all the remaining IMP return code, and adds a function to convert this code to the error number. Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c | 43 +++++++++++++++++----- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 8 ++++ .../ethernet/hisilicon/hns3/hns3vf/hclgevf_cmd.c | 38 ++++++++++++++++--- .../ethernet/hisilicon/hns3/hns3vf/hclgevf_cmd.h | 14 +++++-- 4 files changed, 85 insertions(+), 18 deletions(-) commit 49b1255603de5183c5e377200be3b3afe0dcdb86 Author: Jian Shen Date: Thu Jul 4 22:04:22 2019 +0800 net: hns3: fix port capbility updating issue Currently, the driver queries the media port information, and updates the port capability periodically. But it sets an error mac->speed_type value, which stops update port capability. Fixes: 88d10bd6f730 ("net: hns3: add support for multiple media type") Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 1 + 1 file changed, 1 insertion(+) commit fb89629f2ecfa0feb07f9981c1bd66a4b4407f44 Author: Jian Shen Date: Thu Jul 4 22:04:21 2019 +0800 net: hns3: fix flow control configure issue for fibre port Flow control autoneg is unsupported for fibre port. It takes no effect for flow control when restart autoneg. This patch fixes it, return -EOPNOTSUPP when user tries to enable flow control autoneg. Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 2d5066fc175ea77a733d84df9ef414b34f311641 Author: Jian Shen Date: Thu Jul 4 22:04:20 2019 +0800 net: hns3: enable broadcast promisc mode when initializing VF For revision 0x20, the broadcast promisc is enabled by firmware, it's unnecessary to enable it when initializing VF. For revision 0x21, it's necessary to enable broadcast promisc mode when initializing or re-initializing VF, otherwise, it will be unable to send and receive promisc packets. Fixes: f01f5559cac8 ("net: hns3: don't allow vf to enable promisc mode") Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit ffa9fec30ca0ceb7d5156a1649b9576058756616 Author: Hayes Wang Date: Thu Jul 4 17:36:32 2019 +0800 r8152: set RTL8152_UNPLUG only for real disconnection Set the flag of RTL8152_UNPLUG if and only if the device is unplugged. Some error codes sometimes don't mean the real disconnection of usb device. For those situations, set the flag of RTL8152_UNPLUG causes the driver skips some flows of disabling the device, and it let the device stay at incorrect state. Signed-off-by: Hayes Wang Signed-off-by: David S. Miller drivers/net/usb/r8152.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) commit e4aa33ad595936391f7356f25c0c839011f14ead Author: Li RongQing Date: Thu Jul 4 17:03:26 2019 +0800 net: remove unused parameter from skb_checksum_try_convert the check parameter is never used Signed-off-by: Li RongQing Signed-off-by: David S. Miller include/linux/skbuff.h | 8 +++----- net/ipv4/gre_demux.c | 2 +- net/ipv4/udp.c | 3 +-- net/ipv6/udp.c | 3 +-- 4 files changed, 6 insertions(+), 10 deletions(-) commit 60a6127c5e4888aa701744d9b9dbd8a94cec35c7 Merge: cfe261c24e55 72458e279488 Author: David S. Miller Date: Fri Jul 5 15:28:57 2019 -0700 Merge branch 'mlxsw-Enable-disable-PTP-shapers' Ido Schimmel says: ==================== mlxsw: Enable/disable PTP shapers Shalom says: In order to get more accurate hardware time stamping in Spectrum-1, the driver needs to apply a shaper on the port for speeds lower than 40Gbps. This shaper is called a PTP shaper and it is applied on hierarchy 0, which is the port hierarchy. This shaper may affect the shaper rates of all hierarchies. This patchset adds the ability to enable or disable the PTP shaper on the port in two scenarios: 1. When the user wants to enable/disable the hardware time stamping 2. When the port is brought up or down (including port speed change) Patch #1 adds the QEEC.ptps field that is used for enabling or disabling the PTP shaper on a port. Patch #2 adds a note about disabling the PTP shaper when calling to mlxsw_sp_port_ets_maxrate_set(). Patch #3 adds the QPSC register that is responsible for configuring the PTP shaper parameters per speed. Patch #4 sets the PTP shaper parameters during the ptp_init(). Patch #5 adds new operation for getting the port's speed. Patch #6 enables/disables the PTP shaper when turning on or off the hardware time stamping. Patch #7 enables/disables the PTP shaper when the port's status has changed (including port speed change). Patch #8 applies the PTP shaper enable/disable logic by filling the PTP shaper parameters array. ==================== Signed-off-by: David S. Miller commit 72458e2794884a75808b646fd6f085385046f681 Author: Shalom Toledo Date: Thu Jul 4 10:07:40 2019 +0300 mlxsw: spectrum_ptp: Apply the PTP shaper enable/disable logic Apply by filling the PTP shaper parameters array. Signed-off-by: Shalom Toledo Reviewed-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit 5fc1733897bff10b2a9d1fb1eae775c96cefa333 Author: Shalom Toledo Date: Thu Jul 4 10:07:39 2019 +0300 mlxsw: spectrum: Set up PTP shaper when port status has changed When getting port up down event (PUDE), change the PTP shaper configuration based on hardware time stamping on/off and the port's speed. Signed-off-by: Shalom Toledo Reviewed-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 8 ++++++++ drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 1 + drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c | 17 +++++++++++++++++ drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.h | 10 ++++++++++ 4 files changed, 36 insertions(+) commit eceed3b1453d4115b4256ea1d24fab7b6eb7ba1f Author: Shalom Toledo Date: Thu Jul 4 10:07:38 2019 +0300 mlxsw: spectrum_ptp: Enable/disable PTP shaper on a port when getting HWTSTAMP on/off In order to get more accurate hardware time stamping, the driver needs to enable PTP shaper on the port, for speeds lower than 40 Gbps. Enable the PTP shaper on the port when the user turns on the hardware time stamping, and disable it when the user turns off the hardware time stamping. Signed-off-by: Shalom Toledo Reviewed-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) commit 4ae5cc42d347ff349ab3dd7c1981c93803788956 Author: Shalom Toledo Date: Thu Jul 4 10:07:37 2019 +0300 mlxsw: spectrum: Add new operation for getting the port's speed New operation for getting the port's speed as part of port-type-speed operations. Signed-off-by: Shalom Toledo Acked-by: Jiri Pirko Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 68 +++++++++++++++----------- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 1 + 2 files changed, 41 insertions(+), 28 deletions(-) commit 399569cb0a2afaf6ad3a961f85513c8a4395f65b Author: Shalom Toledo Date: Thu Jul 4 10:07:36 2019 +0300 mlxsw: spectrum_ptp: Set the PTP shaper parameters Set the PTP shaper parameters during the ptp_init(). For different speeds, there are different parameters. When the port's speed changes and PTP shaper is enabled, the firmware changes the ETS shaper values according to the PTP shaper parameters for this new speed. The PTP shaper parameters array is left empty for now, will be filled in a follow-up patch. Signed-off-by: Shalom Toledo Reviewed-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit 71147506a95dd2ed5c0befcbc9caa03d7348df63 Author: Shalom Toledo Date: Thu Jul 4 10:07:35 2019 +0300 mlxsw: reg: Add QoS PTP Shaper Configuration Register The QPSC allows advanced configuration of the PTP shapers. Signed-off-by: Shalom Toledo Acked-by: Jiri Pirko Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 107 ++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) commit ea7bb579fc3d1d6426c34e1af0158dd1826613b2 Author: Shalom Toledo Date: Thu Jul 4 10:07:34 2019 +0300 mlxsw: spectrum: Add note about the PTP shaper Add note about disabling the PTP shaper when calling to mlxsw_sp_port_ets_maxrate_set(). Signed-off-by: Shalom Toledo Acked-by: Jiri Pirko Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 12f0e2e9adee687e921332527769064903772498 Author: Shalom Toledo Date: Thu Jul 4 10:07:33 2019 +0300 mlxsw: reg: Add ptps field in QoS ETS Element Configuration Register The PTP Shaper field is used for enabling and disabling of port-rate based shaper which is slightly lower than port rate. Signed-off-by: Shalom Toledo Acked-by: Jiri Pirko Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit cfe261c24e553d322ef3fc5ae96667767d80142a Author: YueHaibing Date: Thu Jul 4 03:37:45 2019 +0000 net: socionext: remove set but not used variable 'pkts' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/socionext/netsec.c: In function 'netsec_clean_tx_dring': drivers/net/ethernet/socionext/netsec.c:637:15: warning: variable 'pkts' set but not used [-Wunused-but-set-variable] It is not used since commit ba2b232108d3 ("net: netsec: add XDP support") Signed-off-by: YueHaibing Acked-by: Ilias Apalodimas Signed-off-by: David S. Miller drivers/net/ethernet/socionext/netsec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 04fc71435fdebff3f4fcde09a208316af502f5c6 Author: Hariprasad Kelam Date: Thu Jul 4 08:29:06 2019 +0530 net: ethernet: allwinner: Remove unneeded memset Remove unneeded memset as alloc_etherdev is using kvzalloc which uses __GFP_ZERO flag Signed-off-by: Hariprasad Kelam Signed-off-by: David S. Miller drivers/net/ethernet/allwinner/sun4i-emac.c | 1 - 1 file changed, 1 deletion(-) commit b82b21391092c87d257467762eacf496f43c6874 Author: Fuqian Huang Date: Thu Jul 4 10:36:40 2019 +0800 net/ethernet: using dev_get_drvdata directly Several drivers cast a struct device pointer to a struct platform_device pointer only to then call platform_get_drvdata(). To improve readability, these constructs can be simplified by using dev_get_drvdata() directly. Signed-off-by: Fuqian Huang Signed-off-by: David S. Miller drivers/net/ethernet/calxeda/xgmac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 233cc605a2ef2ec051086b360e0e47c54bba7c32 Author: Fuqian Huang Date: Thu Jul 4 10:36:33 2019 +0800 net/can: using dev_get_drvdata directly Several drivers cast a struct device pointer to a struct platform_device pointer only to then call platform_get_drvdata(). To improve readability, these constructs can be simplified by using dev_get_drvdata() directly. Signed-off-by: Fuqian Huang Signed-off-by: David S. Miller drivers/net/can/softing/softing_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fa8043017cf83427c7e3d7d8defe2c2133edffea Merge: 114b5b355ec0 edf070a0fb45 Author: David S. Miller Date: Fri Jul 5 15:22:28 2019 -0700 Merge branch 'hsr-bug-fixes' Cong Wang says: ==================== hsr: a few bug fixes This patchset contains 3 bug fixes for hsr triggered by a syzbot reproducer, please check each patch for details. ==================== Signed-off-by: Cong Wang commit edf070a0fb45ac845f534baf172fbadbeb5048c6 Author: Cong Wang Date: Wed Jul 3 17:21:14 2019 -0700 hsr: fix a NULL pointer deref in hsr_dev_xmit() hsr_port_get_hsr() could return NULL and kernel could crash: BUG: kernel NULL pointer dereference, address: 0000000000000010 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 8000000074b84067 P4D 8000000074b84067 PUD 7057d067 PMD 0 Oops: 0000 [#1] SMP PTI CPU: 0 PID: 754 Comm: a.out Not tainted 5.2.0-rc6+ #718 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-2.fc30 04/01/2014 RIP: 0010:hsr_dev_xmit+0x20/0x31 Code: 48 8b 1b eb e0 5b 5d 41 5c c3 66 66 66 66 90 55 48 89 fd 48 8d be 40 0b 00 00 be 04 00 00 00 e8 ee f2 ff ff 48 89 ef 48 89 c6 <48> 8b 40 10 48 89 45 10 e8 6c 1b 00 00 31 c0 5d c3 66 66 66 66 90 RSP: 0018:ffffb5b400003c48 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffff9821b4509a88 RCX: 0000000000000000 RDX: ffff9821b4509a88 RSI: 0000000000000000 RDI: ffff9821bc3fc7c0 RBP: ffff9821bc3fc7c0 R08: 0000000000000000 R09: 00000000000c2019 R10: 0000000000000000 R11: 0000000000000002 R12: ffff9821bc3fc7c0 R13: ffff9821b4509a88 R14: 0000000000000000 R15: 000000000000006e FS: 00007fee112a1800(0000) GS:ffff9821bd800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000010 CR3: 000000006e9ce000 CR4: 00000000000406f0 Call Trace: netdev_start_xmit+0x1b/0x38 dev_hard_start_xmit+0x121/0x21e ? validate_xmit_skb.isra.0+0x19/0x1e3 __dev_queue_xmit+0x74c/0x823 ? lockdep_hardirqs_on+0x12b/0x17d ip6_finish_output2+0x3d3/0x42c ? ip6_mtu+0x55/0x5c ? mld_sendpack+0x191/0x229 mld_sendpack+0x191/0x229 mld_ifc_timer_expire+0x1f7/0x230 ? mld_dad_timer_expire+0x58/0x58 call_timer_fn+0x12e/0x273 __run_timers.part.0+0x174/0x1b5 ? mld_dad_timer_expire+0x58/0x58 ? sched_clock_cpu+0x10/0xad ? mark_lock+0x26/0x1f2 ? __lock_is_held+0x40/0x71 run_timer_softirq+0x26/0x48 __do_softirq+0x1af/0x392 irq_exit+0x53/0xa2 smp_apic_timer_interrupt+0x1c4/0x1d9 apic_timer_interrupt+0xf/0x20 Cc: Arvid Brodin Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/hsr/hsr_device.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit b9a1e627405d68d475a3c1f35e685ccfb5bbe668 Author: Cong Wang Date: Wed Jul 3 17:21:13 2019 -0700 hsr: implement dellink to clean up resources hsr_link_ops implements ->newlink() but not ->dellink(), which leads that resources not released after removing the device, particularly the entries in self_node_db and node_db. So add ->dellink() implementation to replace the priv_destructor. This also makes the code slightly easier to understand. Reported-by: syzbot+c6167ec3de7def23d1e8@syzkaller.appspotmail.com Cc: Arvid Brodin Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/hsr/hsr_device.c | 13 +++++-------- net/hsr/hsr_device.h | 1 + net/hsr/hsr_framereg.c | 11 ++++++++++- net/hsr/hsr_framereg.h | 3 ++- net/hsr/hsr_netlink.c | 7 +++++++ 5 files changed, 25 insertions(+), 10 deletions(-) commit 619afef01f74f3572b5e9a266c1230dc83761eec Author: Cong Wang Date: Wed Jul 3 17:21:12 2019 -0700 hsr: fix a memory leak in hsr_del_port() hsr_del_port() should release all the resources allocated in hsr_add_port(). As a consequence of this change, hsr_for_each_port() is no longer safe to work with hsr_del_port(), switch to list_for_each_entry_safe() as we always hold RTNL lock. Cc: Arvid Brodin Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/hsr/hsr_device.c | 6 ++++-- net/hsr/hsr_slave.c | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) commit b21fec414095d966789581c1466fb2f55de33bfe Author: Pankaj Gupta Date: Fri Jul 5 19:33:28 2019 +0530 xfs: disable map_sync for async flush Dont support 'MAP_SYNC' with non-DAX files and DAX files with asynchronous dax_device. Virtio pmem provides asynchronous host page cache flush mechanism. We don't support 'MAP_SYNC' with virtio pmem and xfs. Signed-off-by: Pankaj Gupta Reviewed-by: Darrick J. Wong Signed-off-by: Dan Williams fs/xfs/xfs_file.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit e46bfc3f03d7894c0eb47c7d754c38bafe39e197 Author: Pankaj Gupta Date: Fri Jul 5 19:33:27 2019 +0530 ext4: disable map_sync for async flush Dont support 'MAP_SYNC' with non-DAX files and DAX files with asynchronous dax_device. Virtio pmem provides asynchronous host page cache flush mechanism. We don't support 'MAP_SYNC' with virtio pmem and ext4. Signed-off-by: Pankaj Gupta Reviewed-by: Jan Kara Signed-off-by: Dan Williams fs/ext4/file.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 32de1484648a837db5dea0a7007fe7136804e392 Author: Pankaj Gupta Date: Fri Jul 5 19:33:26 2019 +0530 dax: check synchronous mapping is supported This patch introduces 'daxdev_mapping_supported' helper which checks if 'MAP_SYNC' is supported with filesystem mapping. It also checks if corresponding dax_device is synchronous. Virtio pmem device is asynchronous and does not not support VM_SYNC. Suggested-by: Jan Kara Signed-off-by: Pankaj Gupta Reviewed-by: Jan Kara Signed-off-by: Dan Williams include/linux/dax.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 2e9ee0955d3c2d3db56aa02ba6f948ba35d5e9c1 Author: Pankaj Gupta Date: Fri Jul 5 19:33:25 2019 +0530 dm: enable synchronous dax This patch sets dax device 'DAXDEV_SYNC' flag if all the target devices of device mapper support synchrononous DAX. If device mapper consists of both synchronous and asynchronous dax devices, we don't set 'DAXDEV_SYNC' flag. 'dm_table_supports_dax' is refactored to pass 'iterate_devices_fn' as argument so that the callers can pass the appropriate functions. Suggested-by: Mike Snitzer Signed-off-by: Pankaj Gupta Reviewed-by: Mike Snitzer Signed-off-by: Dan Williams drivers/md/dm-table.c | 24 ++++++++++++++++++------ drivers/md/dm.c | 2 +- drivers/md/dm.h | 5 ++++- 3 files changed, 23 insertions(+), 8 deletions(-) commit fefc1d97fa4b5e016bbe15447dc3edcd9e1bcb9f Author: Pankaj Gupta Date: Fri Jul 5 19:33:24 2019 +0530 libnvdimm: add dax_dev sync flag This patch adds 'DAXDEV_SYNC' flag which is set for nd_region doing synchronous flush. This later is used to disable MAP_SYNC functionality for ext4 & xfs filesystem for devices don't support synchronous flush. Signed-off-by: Pankaj Gupta Signed-off-by: Dan Williams drivers/dax/bus.c | 2 +- drivers/dax/super.c | 19 ++++++++++++++++++- drivers/md/dm.c | 3 ++- drivers/nvdimm/pmem.c | 5 ++++- drivers/nvdimm/region_devs.c | 7 +++++++ drivers/s390/block/dcssblk.c | 2 +- include/linux/dax.h | 24 ++++++++++++++++++++++-- include/linux/libnvdimm.h | 1 + 8 files changed, 56 insertions(+), 7 deletions(-) commit 6e84200c0a2994b991259d19450eee561029bf70 Author: Pankaj Gupta Date: Fri Jul 5 19:33:23 2019 +0530 virtio-pmem: Add virtio pmem driver This patch adds virtio-pmem driver for KVM guest. Guest reads the persistent memory range information from Qemu over VIRTIO and registers it on nvdimm_bus. It also creates a nd_region object with the persistent memory range information so that existing 'nvdimm/pmem' driver can reserve this into system memory map. This way 'virtio-pmem' driver uses existing functionality of pmem driver to register persistent memory compatible for DAX capable filesystems. This also provides function to perform guest flush over VIRTIO from 'pmem' driver when userspace performs flush on DAX memory range. Signed-off-by: Pankaj Gupta Reviewed-by: Yuval Shaia Acked-by: Michael S. Tsirkin Acked-by: Jakub Staron Tested-by: Jakub Staron Reviewed-by: Cornelia Huck Signed-off-by: Dan Williams drivers/nvdimm/Makefile | 1 + drivers/nvdimm/nd_virtio.c | 125 +++++++++++++++++++++++++++++++++++++++ drivers/nvdimm/virtio_pmem.c | 122 ++++++++++++++++++++++++++++++++++++++ drivers/nvdimm/virtio_pmem.h | 55 +++++++++++++++++ drivers/virtio/Kconfig | 11 ++++ include/uapi/linux/virtio_ids.h | 1 + include/uapi/linux/virtio_pmem.h | 34 +++++++++++ 7 files changed, 349 insertions(+) commit c5d4355d10d414a96ca870b731756b89d068d57a Author: Pankaj Gupta Date: Fri Jul 5 19:33:22 2019 +0530 libnvdimm: nd_region flush callback support This patch adds functionality to perform flush from guest to host over VIRTIO. We are registering a callback based on 'nd_region' type. virtio_pmem driver requires this special flush function. For rest of the region types we are registering existing flush function. Report error returned by host fsync failure to userspace. Signed-off-by: Pankaj Gupta Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 4 ++-- drivers/nvdimm/claim.c | 6 ++++-- drivers/nvdimm/nd.h | 1 + drivers/nvdimm/pmem.c | 13 ++++++++----- drivers/nvdimm/region_devs.c | 26 ++++++++++++++++++++++++-- include/linux/libnvdimm.h | 9 ++++++++- 6 files changed, 47 insertions(+), 12 deletions(-) commit db5d00c93edc0afba1027e51ff3b38dc0e5f7728 Author: Andy Shevchenko Date: Fri Jun 21 14:45:18 2019 +0300 libnvdimm, namespace: Drop uuid_t implementation detail There is no need for caller to know how uuid_t type is constructed. Thus, whenever we use it the implementation details are not needed. Drop it for good. Signed-off-by: Andy Shevchenko Signed-off-by: Dan Williams drivers/nvdimm/namespace_devs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c3ec002e633e25f6e0ce6f97346dd6f38afcbd6a Author: Stanislav Fomichev Date: Wed Jul 3 13:09:52 2019 -0700 selftests/bpf: add test_tcp_rtt to .gitignore Forgot to add it in the original patch. Fixes: b55873984dab ("selftests/bpf: test BPF_SOCK_OPS_RTT_CB") Reported-by: Andrii Nakryiko Signed-off-by: Stanislav Fomichev Acked-by: Andrii Nakryiko Acked-by: Yonghong Song Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/.gitignore | 1 + 1 file changed, 1 insertion(+) commit d6dbce8fdd2b71a7aafc50b2dc5a67cc449428de Author: Stanislav Fomichev Date: Wed Jul 3 14:29:07 2019 -0700 selftests/bpf: fix test_align liveliness expectations Commit 2589726d12a1 ("bpf: introduce bounded loops") caused a change in the way some registers liveliness is reported in the test_align. Add missing "_w" to a couple of tests. Note, there are no offset changes! Fixes: 2589726d12a1 ("bpf: introduce bounded loops") Signed-off-by: Stanislav Fomichev Acked-by: Yonghong Song Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/test_align.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit e3b60ffbc16feeb007d07b2b7d1da4304e98c1a3 Merge: c4cde5804d51 c7b37c769d2a Author: David S. Miller Date: Fri Jul 5 15:01:15 2019 -0700 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next Steffen Klassert says: ==================== pull request (net-next): ipsec-next 2019-07-05 1) A lot of work to remove indirections from the xfrm code. From Florian Westphal. 2) Fix a WARN_ON with ipv6 that triggered because of a forgotten break statement. From Florian Westphal. 3) Remove xfrmi_init_net, it is not needed. From Li RongQing. Please pull or let me know if there are problems. ==================== Signed-off-by: David S. Miller commit 114b5b355ec0b6e83a6628a5ab5d03e50fd40a31 Merge: 9d1bc24b52fb 56c5ee1a5823 Author: David S. Miller Date: Fri Jul 5 14:58:22 2019 -0700 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec Steffen Klassert says: ==================== pull request (net): ipsec 2019-07-05 1) Fix xfrm selector prefix length validation for inter address family tunneling. From Anirudh Gupta. 2) Fix a memleak in pfkey. From Jeremy Sowden. 3) Fix SA selector validation to allow empty selectors again. From Nicolas Dichtel. 4) Select crypto ciphers for xfrm_algo, this fixes some randconfig builds. From Arnd Bergmann. 5) Remove a duplicated assignment in xfrm_bydst_resize. From Cong Wang. 6) Fix a hlist corruption on hash rebuild. From Florian Westphal. 7) Fix a memory leak when creating xfrm interfaces. From Nicolas Dichtel. Please pull or let me know if there are problems. ==================== Signed-off-by: David S. Miller commit 46dd3d7d287b4f1850a4fe02d74587b5375ec4ab Author: Luke Nelson Date: Thu Jul 4 17:18:02 2019 -0700 bpf, riscv: Enable zext optimization for more RV64G ALU ops Commit 66d0d5a854a6 ("riscv: bpf: eliminate zero extension code-gen") added the new zero-extension optimization for some BPF ALU operations. Since then, bugs in the JIT that have been fixed in the bpf tree require this optimization to be added to other operations: commit 1e692f09e091 ("bpf, riscv: clear high 32 bits for ALU32 add/sub/neg/lsh/rsh/arsh"), and commit fe121ee531d1 ("bpf, riscv: clear target register high 32-bits for and/or/xor on ALU32"). Now that these have been merged to bpf-next, the zext optimization can be enabled for the fixed operations. Signed-off-by: Luke Nelson Cc: Song Liu Cc: Jiong Wang Cc: Xi Wang Acked-by: Björn Töpel Acked-by: Jiong Wang Signed-off-by: Daniel Borkmann arch/riscv/net/bpf_jit_comp.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 9cff126f73a7025bcb0883189b2bed90010a57d4 Author: Pablo Neira Ayuso Date: Fri Jul 5 22:59:05 2019 +0200 netfilter: nf_tables: __nft_expr_type_get() selects specific family type In case that there are two types, prefer the family specify extension. Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit aa52bcbe0e72fac36b1862db08b9c09c4caefae3 Author: Jiri Olsa Date: Fri Jul 5 14:10:31 2019 +0200 tools: bpftool: Fix json dump crash on powerpc Michael reported crash with by bpf program in json mode on powerpc: # bpftool prog -p dump jited id 14 [{ "name": "0xd00000000a9aa760", "insns": [{ "pc": "0x0", "operation": "nop", "operands": [null ] },{ "pc": "0x4", "operation": "nop", "operands": [null ] },{ "pc": "0x8", "operation": "mflr", Segmentation fault (core dumped) The code is assuming char pointers in format, which is not always true at least for powerpc. Fixing this by dumping the whole string into buffer based on its format. Please note that libopcodes code does not check return values from fprintf callback, but as per Jakub suggestion returning -1 on allocation failure so we do the best effort to propagate the error. Fixes: 107f041212c1 ("tools: bpftool: add JSON output for `bpftool prog dump jited *` command") Reported-by: Michael Petlan Signed-off-by: Jiri Olsa Reviewed-by: Quentin Monnet Reviewed-by: Jakub Kicinski Signed-off-by: Daniel Borkmann tools/bpf/bpftool/jit_disasm.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit b9c04ae7907f09c5e873e7c9a8feea2ce41e15b3 Author: Pablo Neira Ayuso Date: Fri Jul 5 23:38:46 2019 +0200 netfilter: nf_tables: add nft_expr_type_request_module() This helper function makes sure the family specific extension is loaded. Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit ba95c7452439756d4f6dceb5a188b7c31dbbe5b6 Author: Quentin Monnet Date: Fri Jul 5 18:54:33 2019 +0100 tools: bpftool: add "prog run" subcommand to test-run programs Add a new "bpftool prog run" subcommand to run a loaded program on input data (and possibly with input context) passed by the user. Print output data (and output context if relevant) into a file or into the console. Print return value and duration for the test run into the console. A "repeat" argument can be passed to run the program several times in a row. The command does not perform any kind of verification based on program type (Is this program type allowed to use an input context?) or on data consistency (Can I work with empty input data?), this is left to the kernel. Example invocation: # perl -e 'print "\x0" x 14' | ./bpftool prog run \ pinned /sys/fs/bpf/sample_ret0 \ data_in - data_out - repeat 5 0000000 0000 0000 0000 0000 0000 0000 0000 | ........ ...... Return value: 0, duration (average): 260ns When one of data_in or ctx_in is "-", bpftool reads from standard input, in binary format. Other formats (JSON, hexdump) might be supported (via an optional command line keyword like "data_fmt_in") in the future if relevant, but this would require doing more parsing in bpftool. v2: - Fix argument names for function check_single_stdin(). (Yonghong) Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski Acked-by: Yonghong Song Signed-off-by: Daniel Borkmann tools/bpf/bpftool/Documentation/bpftool-prog.rst | 34 +++ tools/bpf/bpftool/bash-completion/bpftool | 28 +- tools/bpf/bpftool/main.c | 29 ++ tools/bpf/bpftool/main.h | 1 + tools/bpf/bpftool/prog.c | 348 ++++++++++++++++++++++- tools/include/linux/sizes.h | 48 ++++ 6 files changed, 485 insertions(+), 3 deletions(-) commit c9b3007feca018d3f7061f5d5a14cb00766ffe9b Author: Dennis Zhou Date: Fri Jul 5 17:09:09 2019 -0400 blk-iolatency: fix STS_AGAIN handling The iolatency controller is based on rq_qos. It increments on rq_qos_throttle() and decrements on either rq_qos_cleanup() or rq_qos_done_bio(). a3fb01ba5af0 fixes the double accounting issue where blk_mq_make_request() may call both rq_qos_cleanup() and rq_qos_done_bio() on REQ_NO_WAIT. So checking STS_AGAIN prevents the double decrement. The above works upstream as the only way we can get STS_AGAIN is from blk_mq_get_request() failing. The STS_AGAIN handling isn't a real problem as bio_endio() skipping only happens on reserved tag allocation failures which can only be caused by driver bugs and already triggers WARN. However, the fix creates a not so great dependency on how STS_AGAIN can be propagated. Internally, we (Facebook) carry a patch that kills read ahead if a cgroup is io congested or a fatal signal is pending. This combined with chained bios progagate their bi_status to the parent is not already set can can cause the parent bio to not clean up properly even though it was successful. This consequently leaks the inflight counter and can hang all IOs under that blkg. To nip the adverse interaction early, this removes the rq_qos_cleanup() callback in iolatency in favor of cleaning up always on the rq_qos_done_bio() path. Fixes: a3fb01ba5af0 ("blk-iolatency: only account submitted bios") Debugged-by: Tejun Heo Debugged-by: Josef Bacik Signed-off-by: Dennis Zhou Signed-off-by: Jens Axboe block/blk-iolatency.c | 51 ++++++++++++++------------------------------------- 1 file changed, 14 insertions(+), 37 deletions(-) commit 3e2bb60ab2b1d9371008d4a3d0b01cd28f505cb7 Author: Kevin Wang Date: Fri Jul 5 12:51:45 2019 +0800 drm/amdgpu: add mode1 (psp) reset for navi asic add mode1 (by psp) reset for navi asic. Signed-off-by: Kevin Wang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/nv.c | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) commit f1c1314be4297183937fc2eab994be688425e328 Author: xinhui pan Date: Thu Jul 4 10:54:58 2019 +0800 drm/amdgpu: Disable ras features on all IPs before gpu reset Perform a ras_suspend to disable ras on all IPs to workaround some ROCm stability issue. Signed-off-by: xinhui pan Acked-by: Andrey Grodzovsky Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++++ 1 file changed, 4 insertions(+) commit 767acabdac81ded97e8f6930bc2dabff8db1638c Author: Kevin Wang Date: Fri Jul 5 15:58:46 2019 -0500 drm/amd/powerplay: add baco smu reset function for smu11 add baco reset support for smu11. it can help gpu do asic reset when gpu recovery. Signed-off-by: Kevin Wang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 5 +- drivers/gpu/drm/amd/amdgpu/nv.c | 9 ++- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 14 ++++ drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 26 ++++++++ drivers/gpu/drm/amd/powerplay/inc/smu_v11_0.h | 8 +++ drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 8 +++ drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 91 ++++++++++++++++++++++++++ 7 files changed, 158 insertions(+), 3 deletions(-) commit e3000669a7b4b26383fad06af8f736ad3b5d161e Author: Jack Xiao Date: Wed Jul 3 11:56:07 2019 +0800 drm/amd/powerplay: increase waiting time for smu response We observed some SMU commands take more time for execution, so increase waiting time for response. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 69064bbe7ecbe6e6147069368efaa869cff4eace Author: Yrjan Skrimstad Date: Thu May 30 02:08:21 2019 +0200 drm/amd/powerplay/smu7_hwmgr: replace blocking delay with non-blocking This driver currently contains a repeated 500ms blocking delay call which causes frequent major buffer underruns in PulseAudio. This patch fixes this issue by replacing the blocking delay with a non-blocking sleep call. Signed-off-by: Yrjan Skrimstad Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d12c202289b07037da285299b4122fa2072eca96 Author: Fuqian Huang Date: Thu Jul 4 00:27:18 2019 +0800 drm/amdgpu: Use kmemdup rather than duplicating its implementation kmemdup is introduced to duplicate a region of memory in a neat way. Rather than kmalloc/kzalloc + memcpy, which the programmer needs to write the size twice (sometimes lead to mistakes), kmemdup improves readability, leads to smaller code and also reduce the chances of mistakes. Suggestion to use kmemdup rather than using kmalloc/kzalloc + memcpy. Reviewed-by: Christian König Reviewed-by: Emil Velikov Signed-off-by: Fuqian Huang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 5 ++--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 5 ++--- drivers/gpu/drm/amd/display/dc/core/dc.c | 6 ++---- drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 4 +--- 4 files changed, 7 insertions(+), 13 deletions(-) commit e232cb6ff75bbfdae86e01ada24ead7528dbebe4 Merge: c5f48c927601 1639b17c72fa Author: Daniel Borkmann Date: Fri Jul 5 22:52:26 2019 +0200 Merge branch 'bpf-libbpf-int-btf-map' Andrii Nakryiko says: ==================== This patch set implements an update to how BTF-defined maps are specified. The change is in how integer attributes, e.g., type, max_entries, map_flags, are specified: now they are captured as part of map definition struct's BTF type information (using array dimension), eliminating the need for compile-time data initialization and keeping all the metadata in one place. All existing selftests that were using BTF-defined maps are updated, along with some other selftests, that were switched to new syntax. v4->v5: - revert sample_map_ret0.c, which is loaded with iproute2 (kernel test robot); v3->v4: - add acks; - fix int -> uint type in commit message; v2->v3: - rename __int into __uint (Yonghong); v1->v2: - split bpf_helpers.h change from libbpf change (Song). ==================== Signed-off-by: Daniel Borkmann commit 1639b17c72fa7ad977ccd0ad6c673e3f7048723b Author: Andrii Nakryiko Date: Fri Jul 5 08:50:12 2019 -0700 selftests/bpf: convert legacy BPF maps to BTF-defined ones Convert selftests that were originally left out and new ones added recently to consistently use BTF-defined maps. Reported-by: kernel test robot Signed-off-by: Andrii Nakryiko Acked-by: Song Liu Acked-by: Yonghong Song Signed-off-by: Daniel Borkmann .../selftests/bpf/progs/get_cgroup_id_kern.c | 26 ++--- tools/testing/selftests/bpf/progs/pyperf.h | 90 ++++++++--------- .../selftests/bpf/progs/sockmap_verdict_prog.c | 48 ++++----- tools/testing/selftests/bpf/progs/strobemeta.h | 68 ++++++------- .../testing/selftests/bpf/progs/test_map_in_map.c | 30 +++--- tools/testing/selftests/bpf/progs/test_obj_id.c | 12 +-- tools/testing/selftests/bpf/progs/test_xdp_loop.c | 26 ++--- .../testing/selftests/bpf/progs/xdp_redirect_map.c | 12 +-- tools/testing/selftests/bpf/progs/xdping_kern.c | 12 +-- tools/testing/selftests/bpf/test_queue_stack_map.h | 30 +++--- tools/testing/selftests/bpf/test_sockmap_kern.h | 110 ++++++++++----------- 11 files changed, 228 insertions(+), 236 deletions(-) commit bc7430cc8bfb51577e466a8ca02ad87375a70bde Author: Andrii Nakryiko Date: Fri Jul 5 08:50:11 2019 -0700 selftests/bpf: convert selftests using BTF-defined maps to new syntax Convert all the existing selftests that are already using BTF-defined maps to use new syntax (with no static data initialization). Signed-off-by: Andrii Nakryiko Acked-by: Song Liu Acked-by: Yonghong Song Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/progs/bpf_flow.c | 28 +++----- tools/testing/selftests/bpf/progs/netcnt_prog.c | 20 +++--- .../selftests/bpf/progs/socket_cookie_prog.c | 13 ++-- tools/testing/selftests/bpf/progs/test_btf_newkv.c | 13 ++-- .../selftests/bpf/progs/test_get_stack_rawtp.c | 39 ++++------- .../testing/selftests/bpf/progs/test_global_data.c | 37 ++++------ tools/testing/selftests/bpf/progs/test_l4lb.c | 65 +++++++---------- .../selftests/bpf/progs/test_l4lb_noinline.c | 65 +++++++---------- tools/testing/selftests/bpf/progs/test_map_lock.c | 26 +++---- .../bpf/progs/test_select_reuseport_kern.c | 67 +++++++----------- .../selftests/bpf/progs/test_send_signal_kern.c | 26 +++---- .../selftests/bpf/progs/test_sock_fields_kern.c | 78 ++++++++------------- tools/testing/selftests/bpf/progs/test_spin_lock.c | 36 ++++------ .../selftests/bpf/progs/test_stacktrace_build_id.c | 55 ++++++--------- .../selftests/bpf/progs/test_stacktrace_map.c | 52 +++++--------- .../testing/selftests/bpf/progs/test_tcp_estats.c | 13 ++-- .../testing/selftests/bpf/progs/test_tcpbpf_kern.c | 26 +++---- .../selftests/bpf/progs/test_tcpnotify_kern.c | 28 +++----- tools/testing/selftests/bpf/progs/test_xdp.c | 26 +++---- .../selftests/bpf/progs/test_xdp_noinline.c | 81 +++++++++------------- 20 files changed, 300 insertions(+), 494 deletions(-) commit 00acd00814527a1856c92beda17475205bddaba6 Author: Andrii Nakryiko Date: Fri Jul 5 08:50:10 2019 -0700 selftests/bpf: add __uint and __type macro for BTF-defined maps Add simple __uint and __type macro that hide details of how type and integer values are captured in BTF-defined maps. Signed-off-by: Andrii Nakryiko Acked-by: Song Liu Acked-by: Yonghong Song Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/bpf_helpers.h | 3 +++ 1 file changed, 3 insertions(+) commit ef99b02b23ef4308057573f76750e661b5aea3e1 Author: Andrii Nakryiko Date: Fri Jul 5 08:50:09 2019 -0700 libbpf: capture value in BTF type info for BTF-defined map defs Change BTF-defined map definitions to capture compile-time integer values as part of BTF type definition, to avoid split of key/value type information and actual type/size/flags initialization for maps. Signed-off-by: Andrii Nakryiko Acked-by: Song Liu Acked-by: Yonghong Song Signed-off-by: Daniel Borkmann tools/lib/bpf/libbpf.c | 58 ++++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 30 deletions(-) commit c5f48c92760115282c80136839eabdbf3183f0b9 Merge: c4cde5804d51 1bdb34274acd Author: Daniel Borkmann Date: Fri Jul 5 22:37:31 2019 +0200 Merge branch 'bpf-libbpf-link-trace' Andrii Nakryiko says: ==================== This patchset adds the following APIs to allow attaching BPF programs to tracing entities: - bpf_program__attach_perf_event for attaching to any opened perf event FD, allowing users full control; - bpf_program__attach_kprobe for attaching to kernel probes (both entry and return probes); - bpf_program__attach_uprobe for attaching to user probes (both entry/return); - bpf_program__attach_tracepoint for attaching to kernel tracepoints; - bpf_program__attach_raw_tracepoint for attaching to raw kernel tracepoint (wrapper around bpf_raw_tracepoint_open); This set of APIs makes libbpf more useful for tracing applications. All attach APIs return abstract struct bpf_link that encapsulates logic of detaching BPF program. See patch #2 for details. bpf_assoc was considered as an alternative name for this opaque "handle", but bpf_link seems to be appropriate semantically and is nice and short. Pre-patch #1 makes internal libbpf_strerror_r helper function work w/ negative error codes, lifting the burder off callers to keep track of error sign. Patch #2 adds bpf_link abstraction. Patch #3 adds attach_perf_event, which is the base for all other APIs. Patch #4 adds kprobe/uprobe APIs. Patch #5 adds tracepoint API. Patch #6 adds raw_tracepoint API. Patch #7 converts one existing test to use attach_perf_event. Patch #8 adds new kprobe/uprobe tests. Patch #9 converts some selftests currently using tracepoint to new APIs. v4->v5: - typo and small nits (Yonghong); - validate pfd in attach_perf_event (Yonghong); - parse_uint_from_file fixes (Yonghong); - check for malloc failure in attach_raw_tracepoint (Yonghong); - attach_probes selftests clean up fixes (Yonghong); v3->v4: - proper errno handling (Stanislav); - bpf_fd -> prog_fd (Stanislav); - switch to fprintf (Song); v2->v3: - added bpf_link concept (Daniel); - didn't add generic bpf_link__attach_program for reasons described in [0]; - dropped Stanislav's Reviewed-by from patches #2-#6, in case he doesn't like the change; v1->v2: - preserve errno before close() call (Stanislav); - use libbpf_perf_event_disable_and_close in selftest (Stanislav); - remove unnecessary memset (Stanislav); [0] https://lore.kernel.org/bpf/CAEf4BzZ7EM5eP2eaZn7T2Yb5QgVRiwAs+epeLR1g01TTx-6m6Q@mail.gmail.com/ ==================== Acked-by: Yonghong Song Signed-off-by: Daniel Borkmann commit 1bdb34274acd4a772865289aeaa41696acb60110 Author: Andrii Nakryiko Date: Mon Jul 1 16:59:03 2019 -0700 selftests/bpf: convert existing tracepoint tests to new APIs Convert some existing tests that attach to tracepoints to use bpf_program__attach_tracepoint API instead. Signed-off-by: Andrii Nakryiko Reviewed-by: Stanislav Fomichev Acked-by: Song Liu Signed-off-by: Daniel Borkmann .../selftests/bpf/prog_tests/stacktrace_build_id.c | 55 +++++----------------- .../selftests/bpf/prog_tests/stacktrace_map.c | 43 ++++------------- .../bpf/prog_tests/stacktrace_map_raw_tp.c | 15 ++++-- 3 files changed, 32 insertions(+), 81 deletions(-) commit 1e8611bbdfc99faf8c9670dbbe582129a9a29973 Author: Andrii Nakryiko Date: Mon Jul 1 16:59:02 2019 -0700 selftests/bpf: add kprobe/uprobe selftests Add tests verifying kprobe/kretprobe/uprobe/uretprobe APIs work as expected. Signed-off-by: Andrii Nakryiko Reviewed-by: Stanislav Fomichev Acked-by: Song Liu Signed-off-by: Daniel Borkmann .../selftests/bpf/prog_tests/attach_probe.c | 166 +++++++++++++++++++++ .../selftests/bpf/progs/test_attach_probe.c | 55 +++++++ 2 files changed, 221 insertions(+) commit 8c51b314d2eeae687bf8c28491c9f5e4f05f30f5 Author: Andrii Nakryiko Date: Mon Jul 1 16:59:01 2019 -0700 selftests/bpf: switch test to new attach_perf_event API Use new bpf_program__attach_perf_event() in test previously relying on direct ioctl manipulations. Signed-off-by: Andrii Nakryiko Reviewed-by: Stanislav Fomichev Acked-by: Song Liu Signed-off-by: Daniel Borkmann .../bpf/prog_tests/stacktrace_build_id_nmi.c | 31 +++++++++++----------- 1 file changed, 15 insertions(+), 16 deletions(-) commit 84bf5e1f4f174fc4f06bc747dafa1a7cfa4e9a67 Author: Andrii Nakryiko Date: Mon Jul 1 16:59:00 2019 -0700 libbpf: add raw tracepoint attach API Add a wrapper utilizing bpf_link "infrastructure" to allow attaching BPF programs to raw tracepoints. Signed-off-by: Andrii Nakryiko Acked-by: Song Liu Reviewed-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann tools/lib/bpf/libbpf.c | 39 +++++++++++++++++++++++++++++++++++++++ tools/lib/bpf/libbpf.h | 3 +++ tools/lib/bpf/libbpf.map | 1 + 3 files changed, 43 insertions(+) commit f6de59c17f111b3efc701c95b438e46245c4aeb1 Author: Andrii Nakryiko Date: Mon Jul 1 16:58:59 2019 -0700 libbpf: add tracepoint attach API Allow attaching BPF programs to kernel tracepoint BPF hooks specified by category and name. Signed-off-by: Andrii Nakryiko Acked-by: Song Liu Reviewed-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann tools/lib/bpf/libbpf.c | 79 ++++++++++++++++++++++++++++++++++++++++++++++++ tools/lib/bpf/libbpf.h | 4 +++ tools/lib/bpf/libbpf.map | 1 + 3 files changed, 84 insertions(+) commit b26500274767bacbe571c75926fee2489f91ba28 Author: Andrii Nakryiko Date: Mon Jul 1 16:58:58 2019 -0700 libbpf: add kprobe/uprobe attach API Add ability to attach to kernel and user probes and retprobes. Implementation depends on perf event support for kprobes/uprobes. Signed-off-by: Andrii Nakryiko Reviewed-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann tools/lib/bpf/libbpf.c | 169 +++++++++++++++++++++++++++++++++++++++++++++++ tools/lib/bpf/libbpf.h | 7 ++ tools/lib/bpf/libbpf.map | 2 + 3 files changed, 178 insertions(+) commit 63f2f5ee856ba9db751123bc5519be099a3849a7 Author: Andrii Nakryiko Date: Mon Jul 1 16:58:57 2019 -0700 libbpf: add ability to attach/detach BPF program to perf event bpf_program__attach_perf_event allows to attach BPF program to existing perf event hook, providing most generic and most low-level way to attach BPF programs. It returns struct bpf_link, which should be passed to bpf_link__destroy to detach and free resources, associated with a link. Signed-off-by: Andrii Nakryiko Reviewed-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann tools/lib/bpf/libbpf.c | 63 ++++++++++++++++++++++++++++++++++++++++++++++++ tools/lib/bpf/libbpf.h | 3 +++ tools/lib/bpf/libbpf.map | 1 + 3 files changed, 67 insertions(+) commit 1c2e9efc26f389effc86e9b4d41f85d101f17629 Author: Andrii Nakryiko Date: Mon Jul 1 16:58:56 2019 -0700 libbpf: introduce concept of bpf_link bpf_link is an abstraction of an association of a BPF program and one of many possible BPF attachment points (hooks). This allows to have uniform interface for detaching BPF programs regardless of the nature of link and how it was created. Details of creation and setting up of a specific bpf_link is handled by corresponding attachment methods (bpf_program__attach_xxx) added in subsequent commits. Once successfully created, bpf_link has to be eventually destroyed with bpf_link__destroy(), at which point BPF program is disassociated from a hook and all the relevant resources are freed. Signed-off-by: Andrii Nakryiko Acked-by: Song Liu Reviewed-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann tools/lib/bpf/libbpf.c | 17 +++++++++++++++++ tools/lib/bpf/libbpf.h | 4 ++++ tools/lib/bpf/libbpf.map | 3 ++- 3 files changed, 23 insertions(+), 1 deletion(-) commit d66f43666a6811bcc3e529d5a088e1bdde94ca1b Author: Andrii Nakryiko Date: Mon Jul 1 16:58:55 2019 -0700 libbpf: make libbpf_strerror_r agnostic to sign of error It's often inconvenient to switch sign of error when passing it into libbpf_strerror_r. It's better for it to handle that automatically. Signed-off-by: Andrii Nakryiko Reviewed-by: Stanislav Fomichev Acked-by: Song Liu Signed-off-by: Daniel Borkmann tools/lib/bpf/str_error.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 548f7fb22234c6fe13c64459059fbd42058953c4 Author: Wanpeng Li Date: Fri Jul 5 23:23:42 2019 +0800 KVM: LAPIC: Retry tune per-vCPU timer_advance_ns if adaptive tuning goes insane Retry tune per-vCPU timer_advance_ns if adaptive tuning goes insane which can happen sporadically in product environment. Cc: Paolo Bonzini Cc: Radim Krčmář Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 2a3a93ef0ba5166e8b5766bb232f216fd412d40b Author: wenxu Date: Fri Jul 5 21:16:37 2019 +0800 netfilter: nft_meta_bridge: Add NFT_META_BRI_IIFVPROTO support This patch allows you to match on bridge vlan protocol, eg. nft add rule bridge firewall zones counter meta ibrvproto 0x8100 Signed-off-by: wenxu Reviewed-by: Nikolay Aleksandrov Signed-off-by: Pablo Neira Ayuso include/uapi/linux/netfilter/nf_tables.h | 2 ++ net/bridge/netfilter/nft_meta_bridge.c | 12 ++++++++++++ 2 files changed, 14 insertions(+) commit 31aed46fedbba65abece57e14d24f00b52389c4f Author: wenxu Date: Fri Jul 5 21:16:36 2019 +0800 bridge: add br_vlan_get_proto() This new function allows you to fetch the bridge port vlan protocol. Signed-off-by: wenxu Acked-by: Nikolay Aleksandrov Signed-off-by: Pablo Neira Ayuso include/linux/if_bridge.h | 6 ++++++ net/bridge/br_vlan.c | 10 ++++++++++ 2 files changed, 16 insertions(+) commit c54c7c685494fc0f1662091d4d0c4fc26e810471 Author: wenxu Date: Fri Jul 5 21:16:35 2019 +0800 netfilter: nft_meta_bridge: add NFT_META_BRI_IIFPVID support This patch allows you to match on the bridge port pvid, eg. nft add rule bridge firewall zones counter meta ibrpvid 10 Signed-off-by: wenxu Reviewed-by: Nikolay Aleksandrov Signed-off-by: Pablo Neira Ayuso include/uapi/linux/netfilter/nf_tables.h | 2 ++ net/bridge/netfilter/nft_meta_bridge.c | 15 +++++++++++++++ 2 files changed, 17 insertions(+) commit 7582f5b70f9a2335f3713edb9a2614a50f1f1a90 Author: Pablo Neira Ayuso Date: Fri Jul 5 21:16:34 2019 +0800 bridge: add br_vlan_get_pvid_rcu() This new function allows you to fetch bridge pvid from packet path. Signed-off-by: Pablo Neira Ayuso Acked-by: Nikolay Aleksandrov include/linux/if_bridge.h | 6 ++++++ net/bridge/br_vlan.c | 19 +++++++++++++++---- 2 files changed, 21 insertions(+), 4 deletions(-) commit 9d6a1ecdc99717051a4831ea9b6554dc42830dee Author: wenxu Date: Fri Jul 5 21:16:33 2019 +0800 netfilter: nft_meta_bridge: Remove the br_private.h header nft_bridge_meta should not access the bridge internal API. Signed-off-by: wenxu Reviewed-by: Nikolay Aleksandrov Signed-off-by: Pablo Neira Ayuso net/bridge/netfilter/nft_meta_bridge.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit 30e103fe24debce6f35f2e53cc763ed7be292df3 Author: wenxu Date: Fri Jul 5 21:16:32 2019 +0800 netfilter: nft_meta: move bridge meta keys into nft_meta_bridge Separate bridge meta key from nft_meta to meta_bridge to avoid a dependency between the bridge module and nft_meta when using the bridge API available through include/linux/if_bridge.h Signed-off-by: wenxu Reviewed-by: Nikolay Aleksandrov Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nft_meta.h | 44 ++++++++++++ net/bridge/netfilter/Kconfig | 6 ++ net/bridge/netfilter/Makefile | 1 + net/bridge/netfilter/nft_meta_bridge.c | 127 +++++++++++++++++++++++++++++++++ net/netfilter/nf_tables_core.c | 1 + net/netfilter/nft_meta.c | 81 ++++++++------------- 6 files changed, 207 insertions(+), 53 deletions(-) commit 6aedd14b25dbcf6cfdf2da8569153d45b3e5d9fd Author: Julian Anastasov Date: Wed Jul 3 21:38:09 2019 +0300 ipvs: strip gre tunnel headers from icmp errors Recognize GRE tunnels in received ICMP errors and properly strip the tunnel headers. Signed-off-by: Julian Anastasov Signed-off-by: Pablo Neira Ayuso net/netfilter/ipvs/ip_vs_core.c | 46 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 42 insertions(+), 4 deletions(-) commit ad49d86e07a497e834cb06f2b151dccd75f8e148 Author: Fernando Fernandez Mancera Date: Wed Jun 26 12:59:19 2019 +0200 netfilter: nf_tables: Add synproxy support Add synproxy support for nf_tables. This behaves like the iptables synproxy target but it is structured in a way that allows us to propose improvements in the future. Signed-off-by: Fernando Fernandez Mancera Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack_synproxy.h | 1 + include/net/netfilter/nf_synproxy.h | 5 + include/uapi/linux/netfilter/nf_synproxy.h | 4 + include/uapi/linux/netfilter/nf_tables.h | 16 ++ net/netfilter/Kconfig | 11 + net/netfilter/Makefile | 1 + net/netfilter/nft_synproxy.c | 287 ++++++++++++++++++++++++++ 7 files changed, 325 insertions(+) commit 831c4f3da83e260df943dfb982d77cef5cba2c49 Author: Markus Elfring Date: Fri Jul 5 18:33:58 2019 +0200 xtensa: One function call less in bootmem_init() Avoid an extra function call by using a ternary operator instead of a conditional statement for a setting selection. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Message-Id: <495c9f2e-7880-ee9a-5c61-eee598bb24c2@web.de> Signed-off-by: Max Filippov arch/xtensa/mm/init.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 998bcae4d6267f9737d758dc648851318a29ddde Author: Vasyl Gomonovych Date: Sun Jun 23 23:13:53 2019 +0200 i2c: cpm: remove casting dma_alloc Generated by: alloc_cast.cocci Signed-off-by: Vasyl Gomonovych Acked-by: Jochen Friedrich Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-cpm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 0038617132dea5c0516b6208a6d005ec9293ab94 Author: Maxime Ripard Date: Wed Jul 3 11:53:38 2019 +0200 dt-bindings: i2c: sun6i-p2wi: Fix the binding example Even though the binding claims that the frequency can go up to 6MHz, the common i2c binding sets a limit at 3MHz, which then triggers a warning. Since the only SoC that uses that bus uses a frequency of 100kHz, and that this bus hasn't been found in an SoC for something like 5 years, let's just fix the example to have a frequency within the acceptable range for i2c. Signed-off-by: Maxime Ripard Acked-by: Gregory CLEMENT Reviewed-by: Rob Herring Signed-off-by: Wolfram Sang Documentation/devicetree/bindings/i2c/allwinner,sun6i-a31-p2wi.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 166f28c3eed269190d310ec611476b78101c309b Author: Maxime Ripard Date: Wed Jul 3 11:53:37 2019 +0200 dt-bindings: i2c: mv64xxx: Fix the example compatible One example has a compatible that isn't a valid combination according to the binding, and now that the examples are validated as well, this generates a warning. Let's fix this. Signed-off-by: Maxime Ripard Acked-by: Gregory CLEMENT Reviewed-by: Rob Herring Signed-off-by: Wolfram Sang Documentation/devicetree/bindings/i2c/marvell,mv64xxx-i2c.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ed6182a83924c2385679afd5a3b9cd3d41e2ef44 Author: Jean Delvare Date: Thu Jul 4 11:34:02 2019 +0200 i2c: i801: Documentation update The i2c-i801 driver documentation needs some dusting: * Mention disable_features flag 0x20. * The i2c_ec driver has been removed from the kernel long ago. Driver i2c-scmi serves the same purpose for more recent hardware. * Replace obsolete /proc paths with equivalent /sys paths. Signed-off-by: Jean Delvare Reviewed-by: Jarkko Nikula Signed-off-by: Wolfram Sang Documentation/i2c/busses/i2c-i801 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 051d769f0a36b4642897d909cef980f944ae20ab Author: Jarkko Nikula Date: Mon Jul 1 16:15:34 2019 +0300 i2c: i801: Add support for Intel Tiger Lake Add SMBUS PCI ID for Intel Tiger Lake -LP. Signed-off-by: Jarkko Nikula Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang Documentation/i2c/busses/i2c-i801 | 1 + drivers/i2c/busses/Kconfig | 1 + drivers/i2c/busses/i2c-i801.c | 4 ++++ 3 files changed, 6 insertions(+) commit 856078bf642b985cbe856886d7f396b81c169ec2 Author: Jarkko Nikula Date: Mon Jul 1 16:15:33 2019 +0300 i2c: i801: Fix PCI ID sorting I managed to break sorting in PCI ID defines in my last two patches: commit 5cd1c56c42be ("i2c: i801: Add support for Intel Comet Lake") commit 9be1485accd4 ("i2c: i801: Add support for Intel Elkhart Lake") Fix them up. Signed-off-by: Jarkko Nikula Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-i801.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 036f463fe15db26c2d90724203e4a7ea8f9b8580 Author: Darrick J. Wong Date: Fri Jul 5 10:29:56 2019 -0700 xfs: online scrub needn't bother zeroing its temporary buffer The xattr scrubber functions use the temporary memory buffer either for storing bitmaps or for testing if attribute value extraction works. The bitmap code always zeroes what it needs and the value extraction sets the buffer contents, so it's not necessary to waste CPU time zeroing on allocation. Note that while we never read the contents that the attr value extraction function sets, we do need to call it to check the remote attribute header and CRCs to check for corruption. A flame graph analysis showed that we were spending 7% of a xfs_scrub run (the whole program, not just the attr scrubber itself) allocating and zeroing 64k segments needlessly. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/scrub/attr.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 6d6ccedd76823c28115bd6925342ceb73bab6cd4 Author: Darrick J. Wong Date: Fri Jul 5 10:29:56 2019 -0700 xfs: only allocate memory for scrubbing attributes when we need it In examining a flame graph of time spent running xfs_scrub on various filesystems, I noticed that we spent nearly 7% of the total runtime on allocating a zeroed 65k buffer for every SCRUB_TYPE_XATTR invocation. We do this even if none of the attribute values were anywhere near 64k in size, even if there were no attribute blocks to check space on, and even if it just turns out there are no attributes at all. Therefore, rearrange the xattr buffer setup code to support reallocating with a bigger buffer and redistribute the callers of that function so that we only allocate memory just prior to needing it, and only allocate as much as we need. If we can't get memory with the ILOCK held we'll bail out with EDEADLOCK which will allocate the maximum memory. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/scrub/attr.c | 67 ++++++++++++++++++++++++++++++++++++++++++++++------- fs/xfs/scrub/attr.h | 6 ++++- 2 files changed, 63 insertions(+), 10 deletions(-) commit 00816759337cd28bc5290a24dcb527fd9d30680e Author: Darrick J. Wong Date: Fri Jul 5 10:29:55 2019 -0700 xfs: refactor attr scrub memory allocation function Move the code that allocates memory buffers for the extended attribute scrub code into a separate function so we can reduce memory allocations in the next patch. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/scrub/attr.c | 33 ++++++++++++++++++++++++--------- fs/xfs/scrub/attr.h | 2 ++ 2 files changed, 26 insertions(+), 9 deletions(-) commit 3addd248800c0d278900c064e54e611ae505c622 Author: Darrick J. Wong Date: Fri Jul 5 10:29:55 2019 -0700 xfs: refactor extended attribute buffer pointer functions Replace the open-coded attribute buffer pointer calculations with helper functions to make it more obvious what we're doing with our freeform memory allocation w.r.t. either storing xattr values or computing btree block free space. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/scrub/attr.c | 16 ++++++------- fs/xfs/scrub/attr.h | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+), 9 deletions(-) commit 2c3b83d7ca6d73b9478afc86c89377c15a90b9ed Author: Darrick J. Wong Date: Fri Jul 5 10:29:54 2019 -0700 xfs: attribute scrub should use seen_enough to pass error values When we're iterating all the attributes using the built-in xattr iterator, we can use the seen_enough variable to pass error codes back to the main scrub function instead of flattening them into 0/1. This will be used in a more exciting fashion in upcoming patches. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/libxfs/xfs_attr.h | 8 +++++++- fs/xfs/scrub/attr.c | 8 ++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) commit 17b92927f8531d1ceb7e4f10b75fc4b066ac77fc Author: Dmitry Torokhov Date: Sat Jun 22 23:21:24 2019 -0700 Input: edt-ft5x06 - simplify event reporting code Now that input_mt_report_slot_state() returns true if slot is active we no longer need a temporary for the slot state. Tested-by: Benoit Parrot Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/edt-ft5x06.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit 904e782b07df1c685fdc8c4fc8d62e1d61f9ee32 Author: Bartosz Golaszewski Date: Thu Jul 4 16:12:54 2019 -0700 Input: max77650-onkey - add MODULE_ALIAS() Define a MODULE_ALIAS() in the input sub-driver for max77650 so that the appropriate module gets loaded together with the core mfd driver. Signed-off-by: Bartosz Golaszewski Signed-off-by: Dmitry Torokhov drivers/input/misc/max77650-onkey.c | 1 + 1 file changed, 1 insertion(+) commit f0dd687815f9546860fc3ac4379d55da045942c9 Author: Ian Ray Date: Thu Jul 4 16:13:25 2019 -0700 Input: atmel_mxt_ts - fix leak in mxt_update_cfg() Fix leak (whose magnitude is the configuration file size) when the CRCs match in mxt_update_cfg(). Signed-off-by: Ian Ray Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/atmel_mxt_ts.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b90bab3b1b1b6c56dd6f9d5c960932239f36f6d3 Author: Wei Yongjun Date: Fri Jul 5 08:16:37 2019 +0000 ASoC: SOF: debug: fix possible memory leak in sof_dfsentry_write() 'string' is malloced in sof_dfsentry_write() and should be freed before leaving from the error handling cases, otherwise it will cause memory leak. Fixes: 091c12e1f50c ("ASoC: SOF: debug: add new debugfs entries for IPC flood test") Signed-off-by: Wei Yongjun Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20190705081637.157169-1-weiyongjun1@huawei.com Signed-off-by: Mark Brown sound/soc/sof/debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1fe08602d1179e7bfb2e805b22e8f57f4916c51e Author: Luca Weiss Date: Wed Jul 3 20:48:11 2019 +0200 ASoC: sunxi: sun50i-codec-analog: Add earpiece This adds the necessary registers and audio routes to play audio using the Earpiece, that's supported on the A64. Signed-off-by: Luca Weiss Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20190703184814.27191-1-luca@z3ntu.xyz Signed-off-by: Mark Brown sound/soc/sunxi/sun50i-codec-analog.c | 50 +++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) commit 590eb2f4ef94cb3f3e73345c6db4de97c9cd539e Author: Colin Ian King Date: Fri Jul 5 08:53:03 2019 +0100 ASoC: rt5665: remove redundant assignment to variable idx The variable idx is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20190705075303.14692-1-colin.king@canonical.com Signed-off-by: Mark Brown sound/soc/codecs/rt5665.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c150266f592bc0baf1de515ca793ef839f645fc8 Author: Srinivas Kandagatla Date: Thu Jul 4 17:54:10 2019 +0100 ASoC: wcd9335: remove multiple defines. Found during review that there are multiple defines of same constants. This patch removes them! Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20190704165410.7173-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown sound/soc/codecs/wcd9335.c | 5 ----- 1 file changed, 5 deletions(-) commit e02d48eaaed77f6c36916a7aa65c451e1f9d9aab Author: Colin Ian King Date: Fri Jul 5 08:26:24 2019 +0100 btrfs: fix memory leak of path on error return path Currently if the allocation of roots or tmp_ulist fails the error handling does not free up the allocation of path causing a memory leak. Fix this and other similar leaks by moving the call of btrfs_free_path from label out to label out_free_ulist. Kudos to David Sterba for spotting the issue in my original fix and suggesting the correct way to fix the leak and Anand Jain for spotting a double free issue. Addresses-Coverity: ("Resource leak") Fixes: 5911c8fe05c5 ("btrfs: fiemap: preallocate ulists for btrfs_check_shared") Reviewed-by: Nikolay Borisov Signed-off-by: Colin Ian King Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent_io.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 120357ea176e420d313cf8cf2ff35fbe233d3bab Author: Uenal Mutlu Date: Mon May 13 16:24:10 2019 +0200 drivers: ata: ahci_sunxi: Increased SATA/AHCI DMA TX/RX FIFOs Increasing the SATA/AHCI DMA TX/RX FIFOs (P0DMACR.TXTS and .RXTS, ie. TX_TRANSACTION_SIZE and RX_TRANSACTION_SIZE) from default 0x0 each to 0x3 each, gives a write performance boost of 120 MiB/s to 132 MiB/s from lame 36 MiB/s to 45 MiB/s previously. Read performance is above 200 MiB/s. [tested on SSD using dd bs=4K/8K/12K/16K/20K/24K/32K: peak-perf at 12K] Tested on the SBCs Banana Pi R1 (aka Lamobo R1) and Banana Pi M1 which are based on the Allwinner A20 32bit-SoC (ARMv7-a / arm-linux-gnueabihf). These devices are RaspberryPi-like small devices. This problem of slow SATA write-speed with these small devices lasts for about 7 years now (beginning with the A10 SoC). Many commentators throughout the years wrongly assumed the slow write speed was a hardware limitation. This patch finally solves the problem, which in fact was just a hard-to-find software problem due to lack of SATA/AHCI documentation by the SoC-maker Allwinner Technology. Lists of the affected sunxi and other boards and SoCs with SATA using the ahci_sunxi driver: $ grep -i -e "^&ahci" arch/arm/boot/dts/sun*dts and http://linux-sunxi.org/SATA#Devices_with_SATA_ports See also http://linux-sunxi.org/Category:Devices_with_SATA_port Tested-by: Chen-Yu Tsai Acked-by: Maxime Ripard Reviewed-by: Hans de Goede Signed-off-by: Uenal Mutlu Signed-off-by: Jens Axboe drivers/ata/ahci_sunxi.c | 47 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 2 deletions(-) commit 7e8ab1b268b1ab2d2956823f93c7f3c62b9c2b26 Author: Leonard Crestez Date: Mon Mar 11 18:59:28 2019 +0000 PCI: imx6: Simplify Kconfig depends on The imx6 driver can be used on imx6sx without enabling support for imx6q or imx7d but the "depends on" condition doesn't allow that. Instead of making the condition even longer just make it depend on "ARCH_MXC || COMPILE_TEST" instead. Signed-off-by: Leonard Crestez Signed-off-by: Lorenzo Pieralisi Acked-by: Lucas Stach drivers/pci/controller/dwc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 732146a3f1dc78ebb0d3c4b1f4dc6ea33cc2c58f Author: Wei Yongjun Date: Fri Jul 5 17:42:13 2019 +0200 video: fbdev: imxfb: fix a typo in imxfb_probe() Fix the return value check which testing the wrong variable in imxfb_probe(). b.zolnierkie: please note that ->screen_base and ->screen_buffer are equivalent (they are part of unnamed union in struct fb_info) Fixes: 739a6439c2bf ("video: fbdev: imxfb: fix sparse warnings about using incorrect types") Signed-off-by: Wei Yongjun Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Shawn Guo Cc: Fabio Estevam Cc: NXP Linux Team Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/imxfb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6eaa79ff688ceb0a5e3ca2e95e8a9a133066829b Author: Gustavo A. R. Silva Date: Fri Jul 5 17:42:13 2019 +0200 video: fbdev: s3c-fb: Mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warnings: drivers/video/fbdev/s3c-fb.c: In function ‘s3c_fb_blank’: drivers/video/fbdev/s3c-fb.c:811:16: warning: this statement may fall through [-Wimplicit-fallthrough=] sfb->enabled &= ~(1 << index); ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~ drivers/video/fbdev/s3c-fb.c:814:2: note: here case FB_BLANK_NORMAL: ^~~~ LD [M] drivers/staging/greybus/gb-light.o CC [M] drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gp10b.o drivers/video/fbdev/s3c-fb.c: In function ‘s3c_fb_check_var’: drivers/video/fbdev/s3c-fb.c:286:22: warning: this statement may fall through [-Wimplicit-fallthrough=] var->transp.length = 1; ~~~~~~~~~~~~~~~~~~~^~~ drivers/video/fbdev/s3c-fb.c:288:2: note: here case 18: ^~~~ drivers/video/fbdev/s3c-fb.c:314:22: warning: this statement may fall through [-Wimplicit-fallthrough=] var->transp.offset = 24; ~~~~~~~~~~~~~~~~~~~^~~~ drivers/video/fbdev/s3c-fb.c:316:2: note: here case 24: ^~~~ Warning level 3 was used: -Wimplicit-fallthrough=3 Notice that, in this particular case, the code comments are modified in accordance with what GCC is expecting to find. This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough. Signed-off-by: Gustavo A. R. Silva Cc: Jingoo Han Cc: Kees Cook Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/s3c-fb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 726be12f5ca0a9b464e7d91add512071e4c224f6 Author: Lang Cheng Date: Mon Jun 24 19:47:48 2019 +0800 RDMA/hns: Set reset flag when hw resetting When hw resetting, there is no response from hw when driver sending cmdq. If driver still send cmdq to hw, the reset process may be blocked. So reset flag should be set to intercept the cmdq command when driver receiving "notify down" signal. Signed-off-by: Lang Cheng Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 1 + 1 file changed, 1 insertion(+) commit f5662b4ddc9db20033f310694edbd3fc7041f6f2 Author: Yangyang Li Date: Mon Jun 24 19:47:47 2019 +0800 RDMA/hns: Modify ba page size for cqe Currently, the depth of cq only supports 64K. According to the UM, the depth of cq is up to 4M, Therefore the ba page size of cqe was modified to support the maximum specification of cq depth. Signed-off-by: Yangyang Li Signed-off-by: Lijun Ou Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 21b97f538765996ac76b3a99adf371d0da5450f9 Author: chenglang Date: Mon Jun 24 19:47:46 2019 +0800 RDMA/hns: Fixup qp release bug Hip06 reserve 12 qps, Hip08 reserve 8 qps. When the QP is released, the chip model is not judged, and the Hip08 cannot release the qpn 8~12 Signed-off-by: Lang Cheng Signed-off-by: Lijun Ou Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 1 + drivers/infiniband/hw/hns/hns_roce_qp.c | 8 ++------ 2 files changed, 3 insertions(+), 6 deletions(-) commit 6fafe560ee4ddb79b1c9d6c168d4f2e7eef2a037 Author: Lijun Ou Date: Mon Jun 24 19:47:45 2019 +0800 RDMA/hns: Bugfix for cleaning mtr It uses hns_roce_mtr_init in hns_roce_create_qp_common function. As a result, it should use hns_roce_mtr_cleanup function for cleaning mtr when destroying qp. Fixes: 8d18ad83f19b ("RDMA/hns: Fix bug when wqe num is larger than 16K") Signed-off-by: Xi Wang Signed-off-by: Lijun Ou Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a2b6f26c264e510f1d76ce347e34a21fbda9d8b2 Author: Christophe Leroy Date: Fri May 3 06:40:17 2019 +0000 powerpc/module64: Use symbolic instructions names. To increase readability/maintainability, replace hard coded instructions values by symbolic names. Signed-off-by: Christophe Leroy [mpe: Fix R_PPC64_ENTRY case, the addi reads from r2 not r12] Signed-off-by: Michael Ellerman arch/powerpc/kernel/module_64.c | 53 +++++++++++++++++++++++++++-------------- 1 file changed, 35 insertions(+), 18 deletions(-) commit 4eb4516eada3ae469cd9d97c6dbe730ad3cdf2b6 Author: Christophe Leroy Date: Fri May 3 06:40:16 2019 +0000 powerpc/module32: Use symbolic instructions names. To increase readability/maintainability, replace hard coded instructions values by symbolic names. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman arch/powerpc/kernel/module_32.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit 7f9c929a7ff203eae60b4225bb6824c3eb31796c Author: Christophe Leroy Date: Fri May 3 06:40:15 2019 +0000 powerpc: Move PPC_HA() PPC_HI() and PPC_LO() to ppc-opcode.h PPC_HA() PPC_HI() and PPC_LO() macros are nice macros. Move them from module64.c to ppc-opcode.h in order to use them in other places. Signed-off-by: Christophe Leroy [mpe: Clean up formatting in new code, drop duplicates in ftrace.c] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/ppc-opcode.h | 9 +++++++++ arch/powerpc/kernel/module_64.c | 7 ------- arch/powerpc/kernel/trace/ftrace.c | 4 ---- 3 files changed, 9 insertions(+), 11 deletions(-) commit 2fb0a2c989837c976b68233496bbaefb47cd3d6f Author: Michael Ellerman Date: Sat Jul 6 00:18:53 2019 +1000 powerpc/module64: Fix comment in R_PPC64_ENTRY handling The comment here is wrong, the addi reads from r2 not r12. The code is correct, 0x38420000 = addi r2,r2,0. Fixes: a61674bdfc7c ("powerpc/module: Handle R_PPC64_ENTRY relocations") Signed-off-by: Michael Ellerman arch/powerpc/kernel/module_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4df591b20b80cb77920953812d894db259d85bd7 Author: Dexuan Cui Date: Fri Jun 21 23:45:23 2019 +0000 PCI: hv: Fix a use-after-free bug in hv_eject_device_work() Fix a use-after-free in hv_eject_device_work(). Fixes: 05f151a73ec2 ("PCI: hv: Fix a memory leak in hv_eject_device_work()") Signed-off-by: Dexuan Cui Signed-off-by: Lorenzo Pieralisi Reviewed-by: Michael Kelley Cc: stable@vger.kernel.org drivers/pci/controller/pci-hyperv.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 01402cf81051f796dac7c60ca11d6147153ca46a Author: Paolo Bonzini Date: Fri Jul 5 14:57:58 2019 +0200 kvm: LAPIC: write down valid APIC registers Replace a magic 64-bit mask with a list of valid registers, computing the same mask in the end. Suggested-by: Liran Alon Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 44 ++++++++++++++++++++++++++++++++------------ 1 file changed, 32 insertions(+), 12 deletions(-) commit 6e7be47a53459ba3d288c3240ccd948fc699c377 Author: Mark Zhang Date: Tue Jul 2 13:02:46 2019 +0300 RDMA/nldev: Allow get default counter statistics through RDMA netlink This patch adds the ability to return the hwstats of per-port default counters (which can also be queried through sysfs nodes). Signed-off-by: Mark Zhang Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/nldev.c | 98 ++++++++++++++++++++++++++++++++++++++++- drivers/infiniband/core/sysfs.c | 6 +++ include/rdma/ib_verbs.h | 1 + 3 files changed, 104 insertions(+), 1 deletion(-) commit 83c2c1fcbd08ec3eb69a7f381c4e453d1a45ade3 Author: Mark Zhang Date: Tue Jul 2 13:02:45 2019 +0300 RDMA/nldev: Allow get counter mode through RDMA netlink Provide an option to get current counter mode through RDMA netlink. Signed-off-by: Mark Zhang Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/counters.c | 13 ++++++++ drivers/infiniband/core/nldev.c | 66 +++++++++++++++++++++++++++++++++++++- 2 files changed, 78 insertions(+), 1 deletion(-) commit b389327df90530d47931d0f5616b5cd6abb96c96 Author: Mark Zhang Date: Tue Jul 2 13:02:44 2019 +0300 RDMA/nldev: Allow counter manual mode configration through RDMA netlink Provide an option to allow users to manually bind a qp with a counter through RDMA netlink. Limit it to users with ADMIN capability only. Signed-off-by: Mark Zhang Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/nldev.c | 111 ++++++++++++++++++++++++++++++++++----- include/rdma/rdma_counter.h | 3 ++ include/uapi/rdma/rdma_netlink.h | 2 + 3 files changed, 103 insertions(+), 13 deletions(-) commit 1bd8e0a9d0fd1be03d2833a0c15ac676bdf275d8 Author: Mark Zhang Date: Tue Jul 2 13:02:43 2019 +0300 RDMA/counter: Allow manual mode configuration support In manual mode a QP is bound to a counter manually. If counter is not specified then a new one will be allocated. Manual mode is enabled when user binds a QP, and disabled when the last manually bound QP is unbound. When auto-mode is turned off and there are counters left, manual mode is enabled so that the user is able to access these counters. Signed-off-by: Mark Zhang Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/counters.c | 219 ++++++++++++++++++++++++++++++++++++- include/rdma/rdma_counter.h | 7 ++ include/uapi/rdma/rdma_netlink.h | 6 + 3 files changed, 229 insertions(+), 3 deletions(-) commit f34a55e497e81347ffbdc6e828f123520d33ce5d Author: Mark Zhang Date: Tue Jul 2 13:02:42 2019 +0300 RDMA/core: Get sum value of all counters when perform a sysfs stat read Since a QP can only be bound to one counter, then if it is bound to a separate counter, for backward compatibility purpose, the statistic value must be: * stat of default counter + stat of all running allocated counters + stat of all deallocated counters (history stats) Signed-off-by: Mark Zhang Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/counters.c | 89 ++++++++++++++++++++++++++++++++++++++ drivers/infiniband/core/sysfs.c | 10 +++-- include/rdma/rdma_counter.h | 2 + 3 files changed, 98 insertions(+), 3 deletions(-) commit 18d422ce8ccf47c65b98c2ce9e1758d84c8434eb Author: Mark Zhang Date: Tue Jul 2 13:02:41 2019 +0300 IB/mlx5: Add counter_alloc_stats() and counter_update_stats() support Add support for ib callback counter_alloc_stats() and counter_update_stats(). Signed-off-by: Mark Zhang Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/main.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit c4ffee7c9bdba7b189df3251e375c4c7e93a91ac Author: Mark Zhang Date: Tue Jul 2 13:02:40 2019 +0300 RDMA/netlink: Implement counter dumpit calback This patch adds the ability to return all available counters together with their properties and hwstats. Signed-off-by: Mark Zhang Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/counters.c | 26 ++++- drivers/infiniband/core/device.c | 2 + drivers/infiniband/core/nldev.c | 213 +++++++++++++++++++++++++++++++++++++ include/rdma/ib_verbs.h | 10 ++ include/rdma/rdma_counter.h | 3 + include/uapi/rdma/rdma_netlink.h | 22 ++-- 6 files changed, 268 insertions(+), 8 deletions(-) commit b47ae6f803b727952dfb37afd83e51c465147b85 Author: Mark Zhang Date: Tue Jul 2 13:02:39 2019 +0300 RDMA/nldev: Allow counter auto mode configration through RDMA netlink Provide an option to enable/disable per-port counter auto mode through RDMA netlink. Limit it to users with ADMIN capability only. Signed-off-by: Mark Zhang Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/nldev.c | 78 ++++++++++++++++++++++++++++++++++++++++ include/uapi/rdma/rdma_netlink.h | 8 +++++ 2 files changed, 86 insertions(+) commit 45842fc627c7f0e55ad41613b64055266c710ac7 Author: Mark Zhang Date: Tue Jul 2 13:02:38 2019 +0300 IB/mlx5: Support statistic q counter configuration Add support for ib callbacks counter_bind_qp(), counter_unbind_qp() and counter_dealloc(). Signed-off-by: Mark Zhang Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/main.c | 44 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit 318d535cefecf2227ab20ec6e2961f9830c96e9b Author: Mark Zhang Date: Tue Jul 2 13:02:37 2019 +0300 IB/mlx5: Add counter set id as a parameter for mlx5_ib_query_q_counters() Add counter set id as a parameter so that this API can be used for querying any q counter. Signed-off-by: Mark Zhang Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit d14133dd41614aaaac1fa0505c7dab01f4211d2c Author: Mark Zhang Date: Tue Jul 2 13:02:36 2019 +0300 IB/mlx5: Support set qp counter Support bind a qp with counter. If counter is null then bind the qp to the default counter. Different QP state has different operation: - RESET: Set the counter field so that it will take effective during RST2INIT change; - RTS: Issue an RTS2RTS change to update the QP counter; - Other: Set the counter field and mark the counter_pending flag, when QP is moved to RTS state and this flag is set, then issue an RTS2RTS modification to update the counter. Signed-off-by: Mark Zhang Reviewed-by: Majd Dibbiny Acked-by: Saeed Mahameed Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/mlx5_ib.h | 6 +++ drivers/infiniband/hw/mlx5/qp.c | 76 +++++++++++++++++++++++++++++++++++- include/linux/mlx5/qp.h | 1 + 3 files changed, 81 insertions(+), 2 deletions(-) commit 99fa331dc8629be55ac7a0cca0dc56492070ddac Author: Mark Zhang Date: Tue Jul 2 13:02:35 2019 +0300 RDMA/counter: Add "auto" configuration mode support In auto mode all QPs belong to one category are bind automatically to a single counter set. Currently only "qp type" is supported. In this mode the qp counter is set in RST2INIT modification, and when a qp is destroyed the counter is unbound. Signed-off-by: Mark Zhang Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/counters.c | 221 +++++++++++++++++++++++++++++++++++++ drivers/infiniband/core/device.c | 3 + drivers/infiniband/core/verbs.c | 9 ++ include/rdma/ib_verbs.h | 18 +++ include/rdma/rdma_counter.h | 8 ++ 5 files changed, 259 insertions(+) commit 413d3347503bc39e17577eaf16451fd492a68558 Author: Mark Zhang Date: Tue Jul 2 13:02:34 2019 +0300 RDMA/counter: Add set/clear per-port auto mode support Add an API to support set/clear per-port auto mode. Signed-off-by: Mark Zhang Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/Makefile | 2 +- drivers/infiniband/core/counters.c | 74 ++++++++++++++++++++++++++++++++++++++ drivers/infiniband/core/device.c | 5 +++ include/rdma/ib_verbs.h | 2 ++ include/rdma/rdma_counter.h | 24 +++++++++++++ include/uapi/rdma/rdma_netlink.h | 26 ++++++++++++++ 6 files changed, 132 insertions(+), 1 deletion(-) commit 6a6c306a09b5227d51fcc1643c888e316935dfa8 Author: Mark Zhang Date: Tue Jul 2 13:02:33 2019 +0300 RDMA/restrack: Make is_visible_in_pid_ns() as an API Remove is_visible_in_pid_ns() from nldev.c and make it as a restrack API, so that it can be taken advantage by other parts like counter. Signed-off-by: Mark Zhang Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/nldev.c | 15 ++------------- drivers/infiniband/core/restrack.c | 13 +++++++++++++ drivers/infiniband/core/restrack.h | 1 + 3 files changed, 16 insertions(+), 13 deletions(-) commit 699a9c540a04d05aa342cd84606bc8b1e8c05b7b Author: Mark Zhang Date: Tue Jul 2 13:02:32 2019 +0300 RDMA/restrack: Add an API to attach a task to a resource Add rdma_restrack_attach_task() which is able to attach a task other then "current" to a resource. Signed-off-by: Mark Zhang Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/restrack.c | 14 ++++++++++++++ drivers/infiniband/core/restrack.h | 2 ++ 2 files changed, 16 insertions(+) commit 7ade1ff96c7aa7e10445688a433d7ae39a13c6c9 Author: Mark Zhang Date: Tue Jul 2 13:02:31 2019 +0300 RDMA/restrack: Introduce statistic counter Introduce statistic counter as a new resource. It allows a user to monitor specific objects (e.g., QPs) by binding to a counter. In some cases a user counter resource is created with task other then "current", because its creation is done as part of rdmatool call. Signed-off-by: Mark Zhang Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/restrack.c | 22 +++++++++++++++++----- include/rdma/rdma_counter.h | 18 ++++++++++++++++++ include/rdma/restrack.h | 4 ++++ 3 files changed, 39 insertions(+), 5 deletions(-) commit 5600a410ea24cb8467abdd4b8530961ff4f14907 Merge: bcde9a83b13e f8efee08dd9d Author: Jason Gunthorpe Date: Fri Jul 5 10:16:19 2019 -0300 Merge mlx5-next into rdma for-next From git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux Required for dependencies in the next patches. * mlx5-next: net/mlx5: Add rts2rts_qp_counters_set_id field in hca cap net/mlx5: Properly name the generic WQE control field net/mlx5: Introduce TLS TX offload hardware bits and structures net/mlx5: Refactor mlx5_esw_query_functions for modularity net/mlx5: E-Switch prepare functions change handler to be modular net/mlx5: Introduce and use mlx5_eswitch_get_total_vports() commit 7be142caabc4780b13a522c485abc806de5c4114 Author: Vidya Sagar Date: Thu Jul 4 20:34:28 2019 +0530 PCI: tegra: Enable Relaxed Ordering only for Tegra20 & Tegra30 The PCI Tegra controller conversion to a device tree configurable driver in commit d1523b52bff3 ("PCI: tegra: Move PCIe driver to drivers/pci/host") implied that code for the driver can be compiled in for a kernel supporting multiple platforms. Unfortunately, a blind move of the code did not check that some of the quirks that were applied in arch/arm (eg enabling Relaxed Ordering on all PCI devices - since the quirk hook erroneously matches PCI_ANY_ID for both Vendor-ID and Device-ID) are now applied in all kernels that compile the PCI Tegra controlled driver, DT and ACPI alike. This is completely wrong, in that enablement of Relaxed Ordering is only required by default in Tegra20 platforms as described in the Tegra20 Technical Reference Manual (available at https://developer.nvidia.com/embedded/downloads#?search=tegra%202 in Section 34.1, where it is mentioned that Relaxed Ordering bit needs to be enabled in its root ports to avoid deadlock in hardware) and in the Tegra30 platforms for the same reasons (unfortunately not documented in the TRM). There is no other strict requirement on PCI devices Relaxed Ordering enablement on any other Tegra platforms or PCI host bridge driver. Fix this quite upsetting situation by limiting the vendor and device IDs to which the Relaxed Ordering quirk applies to the root ports in question, reported above. Signed-off-by: Vidya Sagar [lorenzo.pieralisi@arm.com: completely rewrote the commit log/fixes tag] Signed-off-by: Lorenzo Pieralisi Acked-by: Thierry Reding drivers/pci/controller/pci-tegra.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 4b16a8227907118e011fb396022da671a52b2272 Author: Manikanta Maddireddy Date: Tue Jun 18 23:32:06 2019 +0530 PCI: tegra: Change link retry log level to debug Driver checks for link up three times before giving up, each retry attempt is printed as an error. Letting users know that PCIe link is down and in the process of being brought up again is for debug, not an error condition. Signed-off-by: Manikanta Maddireddy Signed-off-by: Lorenzo Pieralisi Acked-by: Thierry Reding drivers/pci/controller/pci-tegra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dbdcc22c845be72d0b930a82ca20df8c92c677b9 Author: Manikanta Maddireddy Date: Tue Jun 18 23:32:05 2019 +0530 PCI: tegra: Add support for GPIO based PERST# Tegra PCIe has fixed per port SFIO line to signal PERST#, which can be controlled by AFI port register. However, if a platform routes a different GPIO to the PCIe slot, then port register cannot control it. Add support for GPIO based PERST# signal for such platforms. GPIO number comes from per port PCIe device tree node. PCIe driver probe doesn't fail if per port "reset-gpios" property is not populated, so platforms that require this workaround must make sure that the DT property is not missed in the corresponding device tree. Link: https://lore.kernel.org/linux-pci/20190705084850.30777-1-jonathanh@nvidia.com/ Signed-off-by: Manikanta Maddireddy [lorenzo.pieralisi@arm.com: squashed in fix in Link] Signed-off-by: Lorenzo Pieralisi Acked-by: Thierry Reding drivers/pci/controller/pci-tegra.c | 49 +++++++++++++++++++++++++++++++++----- 1 file changed, 43 insertions(+), 6 deletions(-) commit fdec2a9ef853172529baaa192673b4cdb9a44fac Author: Dave Martin Date: Sat Apr 6 11:29:40 2019 +0100 KVM: arm64: Migrate _elx sysreg accessors to msr_s/mrs_s Currently, the {read,write}_sysreg_el*() accessors for accessing particular ELs' sysregs in the presence of VHE rely on some local hacks and define their system register encodings in a way that is inconsistent with the core definitions in . As a result, it is necessary to add duplicate definitions for any system register that already needs a definition in sysreg.h for other reasons. This is a bit of a maintenance headache, and the reasons for the _el*() accessors working the way they do is a bit historical. This patch gets rid of the shadow sysreg definitions in , converts the _el*() accessors to use the core __msr_s/__mrs_s interface, and converts all call sites to use the standard sysreg #define names (i.e., upper case, with SYS_ prefix). This patch will conflict heavily anyway, so the opportunity to clean up some bad whitespace in the context of the changes is taken. The change exposes a few system registers that have no sysreg.h definition, due to msr_s/mrs_s being used in place of msr/mrs: additions are made in order to fill in the gaps. Signed-off-by: Dave Martin Cc: Catalin Marinas Cc: Christoffer Dall Cc: Mark Rutland Cc: Will Deacon Link: https://www.spinics.net/lists/kvm-arm/msg31717.html [Rebased to v4.21-rc1] Signed-off-by: Sudeep Holla [Rebased to v5.2-rc5, changelog updates] Signed-off-by: Marc Zyngier arch/arm/include/asm/kvm_hyp.h | 13 +++--- arch/arm64/include/asm/kvm_emulate.h | 16 +++---- arch/arm64/include/asm/kvm_hyp.h | 50 ++------------------ arch/arm64/include/asm/sysreg.h | 35 +++++++++++++- arch/arm64/kvm/hyp/switch.c | 14 +++--- arch/arm64/kvm/hyp/sysreg-sr.c | 78 ++++++++++++++++---------------- arch/arm64/kvm/hyp/tlb.c | 12 ++--- arch/arm64/kvm/hyp/vgic-v2-cpuif-proxy.c | 2 +- arch/arm64/kvm/regmap.c | 4 +- arch/arm64/kvm/sys_regs.c | 56 +++++++++++------------ virt/kvm/arm/arch_timer.c | 24 +++++----- 11 files changed, 148 insertions(+), 156 deletions(-) commit 49caebe9b3e2a83161f4374ac347eb14e11c3b54 Author: Andre Przywara Date: Fri May 3 15:27:50 2019 +0100 KVM: doc: Add API documentation on the KVM_REG_ARM_WORKAROUNDS register Add documentation for the newly defined firmware registers to save and restore any vulnerability mitigation status. Signed-off-by: Andre Przywara Reviewed-by: Steven Price Signed-off-by: Marc Zyngier Documentation/virtual/kvm/arm/psci.txt | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit 99adb567632b656a4a54a90adb2172cc725b6896 Author: Andre Przywara Date: Fri May 3 15:27:49 2019 +0100 KVM: arm/arm64: Add save/restore support for firmware workaround state KVM implements the firmware interface for mitigating cache speculation vulnerabilities. Guests may use this interface to ensure mitigation is active. If we want to migrate such a guest to a host with a different support level for those workarounds, migration might need to fail, to ensure that critical guests don't loose their protection. Introduce a way for userland to save and restore the workarounds state. On restoring we do checks that make sure we don't downgrade our mitigation level. Signed-off-by: Andre Przywara Reviewed-by: Eric Auger Reviewed-by: Steven Price Signed-off-by: Marc Zyngier arch/arm/include/asm/kvm_emulate.h | 10 +++ arch/arm/include/uapi/asm/kvm.h | 12 +++ arch/arm64/include/asm/kvm_emulate.h | 14 ++++ arch/arm64/include/uapi/asm/kvm.h | 10 +++ virt/kvm/arm/psci.c | 139 +++++++++++++++++++++++++++++++---- 5 files changed, 170 insertions(+), 15 deletions(-) commit c118bbb52743df70e6297671606c1c08edc659fe Author: Andre Przywara Date: Fri May 3 15:27:48 2019 +0100 arm64: KVM: Propagate full Spectre v2 workaround state to KVM guests Recent commits added the explicit notion of "workaround not required" to the state of the Spectre v2 (aka. BP_HARDENING) workaround, where we just had "needed" and "unknown" before. Export this knowledge to the rest of the kernel and enhance the existing kvm_arm_harden_branch_predictor() to report this new state as well. Export this new state to guests when they use KVM's firmware interface emulation. Signed-off-by: Andre Przywara Reviewed-by: Steven Price Signed-off-by: Marc Zyngier arch/arm/include/asm/kvm_host.h | 12 +++++++++--- arch/arm64/include/asm/cpufeature.h | 6 ++++++ arch/arm64/include/asm/kvm_host.h | 16 ++++++++++++++-- arch/arm64/kernel/cpu_errata.c | 23 ++++++++++++++++++----- virt/kvm/arm/psci.c | 10 +++++++++- 5 files changed, 56 insertions(+), 11 deletions(-) commit 80f393a23be68e2f8a0f74258d6155438c200bbd Author: Andrew Murray Date: Mon Jun 17 20:01:05 2019 +0100 KVM: arm/arm64: Support chained PMU counters ARMv8 provides support for chained PMU counters, where an event type of 0x001E is set for odd-numbered counters, the event counter will increment by one for each overflow of the preceding even-numbered counter. Let's emulate this in KVM by creating a 64 bit perf counter when a user chains two emulated counters together. For chained events we only support generating an overflow interrupt on the high counter. We use the attributes of the low counter to determine the attributes of the perf event. Suggested-by: Marc Zyngier Signed-off-by: Andrew Murray Reviewed-by: Julien Thierry Reviewed-by: Suzuki K Poulose Signed-off-by: Marc Zyngier include/kvm/arm_pmu.h | 2 + virt/kvm/arm/pmu.c | 252 ++++++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 217 insertions(+), 37 deletions(-) commit 218907cbc2b82419c70180610163c987d4764b27 Author: Andrew Murray Date: Mon Jun 17 20:01:04 2019 +0100 KVM: arm/arm64: Remove pmc->bitmask We currently use pmc->bitmask to determine the width of the pmc - however it's superfluous as the pmc index already describes if the pmc is a cycle counter or event counter. The architecture clearly describes the widths of these counters. Let's remove the bitmask to simplify the code. Signed-off-by: Andrew Murray Signed-off-by: Marc Zyngier include/kvm/arm_pmu.h | 1 - virt/kvm/arm/pmu.c | 30 ++++++++++++++++++++---------- 2 files changed, 20 insertions(+), 11 deletions(-) commit 30d97754b2d1bc4fd20f27c25fed92fc7ce39ce3 Author: Andrew Murray Date: Mon Jun 17 20:01:03 2019 +0100 KVM: arm/arm64: Re-create event when setting counter value The perf event sample_period is currently set based upon the current counter value, when PMXEVTYPER is written to and the perf event is created. However the user may choose to write the type before the counter value in which case sample_period will be set incorrectly. Let's instead decouple event creation from PMXEVTYPER and (re)create the event in either suitation. Signed-off-by: Andrew Murray Reviewed-by: Julien Thierry Reviewed-by: Suzuki K Poulose Signed-off-by: Marc Zyngier virt/kvm/arm/pmu.c | 42 +++++++++++++++++++++++++++++++++--------- 1 file changed, 33 insertions(+), 9 deletions(-) commit 6f4d2a0b0b1e9a1f7594e666eebad98372901818 Author: Andrew Murray Date: Mon Jun 17 20:01:02 2019 +0100 KVM: arm/arm64: Extract duplicated code to own function Let's reduce code duplication by extracting common code to its own function. Signed-off-by: Andrew Murray Reviewed-by: Suzuki K Poulose Signed-off-by: Marc Zyngier virt/kvm/arm/pmu.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) commit 418e5ca88cc18b7e9eaafa40eac26397ccd66a71 Author: Andrew Murray Date: Mon Jun 17 20:01:01 2019 +0100 KVM: arm/arm64: Rename kvm_pmu_{enable/disable}_counter functions The kvm_pmu_{enable/disable}_counter functions can enable/disable multiple counters at once as they operate on a bitmask. Let's make this clearer by renaming the function. Suggested-by: Suzuki K Poulose Signed-off-by: Andrew Murray Reviewed-by: Julien Thierry Reviewed-by: Suzuki K Poulose Signed-off-by: Marc Zyngier arch/arm64/kvm/sys_regs.c | 4 ++-- include/kvm/arm_pmu.h | 8 ++++---- virt/kvm/arm/pmu.c | 12 ++++++------ 3 files changed, 12 insertions(+), 12 deletions(-) commit 101628ded5d990f7f364bd4d371ada9b2beaae64 Author: Paolo Bonzini Date: Fri Jul 5 14:14:15 2019 +0200 KVM: LAPIC: ARBPRI is a reserved register for x2APIC kvm-unit-tests were adjusted to match bare metal behavior, but KVM itself was not doing what bare metal does; fix that. Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 11b41626bd5327332f5805ad8f8580365a363067 Author: James Morse Date: Tue Jun 18 16:18:09 2019 +0100 KVM: arm64: Skip more of the SError vaxorcism During __guest_exit() we need to consume any SError left pending by the guest so it doesn't contaminate the host. With v8.2 we use the ESB-instruction. For systems without v8.2, we use dsb+isb and unmask SError. We do this on every guest exit. Use the same dsb+isr_el1 trick, this lets us know if an SError is pending after the dsb, allowing us to skip the isb and self-synchronising PSTATE write if its not. This means SError remains masked during KVM's world-switch, so any SError that occurs during this time is reported by the host, instead of causing a hyp-panic. As we're benchmarking this code lets polish the layout. If you give gcc likely()/unlikely() hints in an if() condition, it shuffles the generated assembly so that the likely case is immediately after the branch. Lets do the same here. Signed-off-by: James Morse Changes since v2: * Added isb after the dsb to prevent an early read Signed-off-by: Marc Zyngier arch/arm64/kvm/hyp/entry.S | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit dad6321ffacadbd1235faaf84897b63050b81a5f Author: James Morse Date: Tue Jun 18 16:18:08 2019 +0100 KVM: arm64: Re-mask SError after the one instruction window KVM consumes any SError that were pending during guest exit with a dsb/isb and unmasking SError. It currently leaves SError unmasked for the rest of world-switch. This means any SError that occurs during this part of world-switch will cause a hyp-panic. We'd much prefer it to remain pending until we return to the host. Signed-off-by: James Morse Signed-off-by: Marc Zyngier arch/arm64/kvm/hyp/entry.S | 2 ++ 1 file changed, 2 insertions(+) commit 3276cc2489641f7f37e9558f5fe9d6ae17a25528 Author: James Morse Date: Tue Jun 18 16:17:38 2019 +0100 arm64: Update silicon-errata.txt for Neoverse-N1 #1349291 Neoverse-N1 affected by #1349291 may report an Uncontained RAS Error as Unrecoverable. The kernel's architecture code already considers Unrecoverable errors as fatal as without kernel-first support no further error-handling is possible. Now that KVM attributes SError to the host/guest more precisely the host's architecture code will always handle host errors that become pending during world-switch. Errors misclassified by this errata that affected the guest will be re-injected to the guest as an implementation-defined SError, which can be uncontained. Until kernel-first support is implemented, no workaround is needed for this issue. Signed-off-by: James Morse Signed-off-by: Marc Zyngier Documentation/arm64/silicon-errata.txt | 1 + arch/arm64/kernel/traps.c | 4 ++++ 2 files changed, 5 insertions(+) commit 5dcd0fdbb492d49dac6bf21c436dfcb5ded0a895 Author: James Morse Date: Tue Jun 18 16:17:37 2019 +0100 KVM: arm64: Defer guest entry when an asynchronous exception is pending SError that occur during world-switch's entry to the guest will be accounted to the guest, as the exception is masked until we enter the guest... but we want to attribute the SError as precisely as possible. Reading DISR_EL1 before guest entry requires free registers, and using ESB+DISR_EL1 to consume and read back the ESR would leave KVM holding a host SError... We would rather leave the SError pending and let the host take it once we exit world-switch. To do this, we need to defer guest-entry if an SError is pending. Read the ISR to see if SError (or an IRQ) is pending. If so fake an exit. Place this check between __guest_enter()'s save of the host registers, and restore of the guest's. SError that occur between here and the eret into the guest must have affected the guest's registers, which we can naturally attribute to the guest. The dsb is needed to ensure any previous writes have been done before we read ISR_EL1. On systems without the v8.2 RAS extensions this doesn't give us anything as we can't contain errors, and the ESR bits to describe the severity are all implementation-defined. Replace this with a nop for these systems. Signed-off-by: James Morse Signed-off-by: Marc Zyngier arch/arm64/kvm/hyp/entry.S | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 0e5b9c085dcef61163f3f277964c1a1623043f67 Author: James Morse Date: Tue Jun 18 16:17:36 2019 +0100 KVM: arm64: Consume pending SError as early as possible On systems with v8.2 we switch the 'vaxorcism' of guest SError with an alternative sequence that uses the ESB-instruction, then reads DISR_EL1. This saves the unmasking and remasking of asynchronous exceptions. We do this after we've saved the guest registers and restored the host's. Any SError that becomes pending due to this will be accounted to the guest, when it actually occurred during host-execution. Move the ESB-instruction as early as possible. Any guest SError will become pending due to this ESB-instruction and then consumed to DISR_EL1 before the host touches anything. This lets us account for host/guest SError precisely on the guest exit exception boundary. Because the ESB-instruction now lands in the preamble section of the vectors, we need to add it to the unpatched indirect vectors too, and to any sequence that may be patched in over the top. The ESB-instruction always lives in the head of the vectors, to be before any memory write. Whereas the register-store always lives in the tail. Signed-off-by: James Morse Signed-off-by: Marc Zyngier arch/arm64/include/asm/kvm_asm.h | 2 +- arch/arm64/kvm/hyp/entry.S | 5 ++--- arch/arm64/kvm/hyp/hyp-entry.S | 6 +++++- 3 files changed, 8 insertions(+), 5 deletions(-) commit 5d994374e872bef1bba25c80950af6a77ea470e1 Author: James Morse Date: Tue Jun 18 16:17:35 2019 +0100 KVM: arm64: Make indirect vectors preamble behaviour symmetric The KVM indirect vectors support is a little complicated. Different CPUs may use different exception vectors for KVM that are generated at boot. Adding new instructions involves checking all the possible combinations do the right thing. To make changes here easier to review lets state what we expect of the preamble: 1. The first vector run, must always run the preamble. 2. Patching the head or tail of the vector shouldn't remove preamble instructions. Today, this is easy as we only have one instruction in the preamble. Change the unpatched tail of the indirect vector so that it always runs this, regardless of patching. Signed-off-by: James Morse Signed-off-by: Marc Zyngier arch/arm64/kvm/hyp/hyp-entry.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3dbf100b0b10e91d65bd83b91cee3ef61f1b96c4 Author: James Morse Date: Tue Jun 18 16:17:34 2019 +0100 KVM: arm64: Abstract the size of the HYP vectors pre-amble The EL2 vector hardening feature causes KVM to generate vectors for each type of CPU present in the system. The generated sequences already do some of the early guest-exit work (i.e. saving registers). To avoid duplication the generated vectors branch to the original vector just after the preamble. This size is hard coded. Adding new instructions to the HYP vector causes strange side effects, which are difficult to debug as the affected code is patched in at runtime. Add KVM_VECTOR_PREAMBLE to tell kvm_patch_vector_branch() how big the preamble is. The valid_vect macro can then validate this at build time. Reviewed-by: Julien Thierry Signed-off-by: James Morse Signed-off-by: Marc Zyngier arch/arm64/include/asm/kvm_asm.h | 6 ++++++ arch/arm64/kvm/hyp/hyp-entry.S | 18 +++++++++++++++++- arch/arm64/kvm/va_layout.c | 7 +++---- 3 files changed, 26 insertions(+), 5 deletions(-) commit 2b68a2a963a157f024c67c0697b16f5f792c8a35 Author: James Morse Date: Tue Jun 18 16:17:33 2019 +0100 arm64: assembler: Switch ESB-instruction with a vanilla nop if !ARM64_HAS_RAS The ESB-instruction is a nop on CPUs that don't implement the RAS extensions. This lets us use it in places like the vectors without having to use alternatives. If someone disables CONFIG_ARM64_RAS_EXTN, this instruction still has its RAS extensions behaviour, but we no longer read DISR_EL1 as this register does depend on alternatives. This could go wrong if we want to synchronize an SError from a KVM guest. On a CPU that has the RAS extensions, but the KConfig option was disabled, we consume the pending SError with no chance of ever reading it. Hide the ESB-instruction behind the CONFIG_ARM64_RAS_EXTN option, outputting a regular nop if the feature has been disabled. Reported-by: Julien Thierry Signed-off-by: James Morse Signed-off-by: Marc Zyngier arch/arm64/include/asm/assembler.h | 4 ++++ 1 file changed, 4 insertions(+) commit 1ef23e1f16088f5a91b25bb17585c2d532a097f7 Author: Krish Sadhukhan Date: Wed Jul 3 19:54:35 2019 -0400 KVM nVMX: Check Host Segment Registers and Descriptor Tables on vmentry of nested guests According to section "Checks on Host Segment and Descriptor-Table Registers" in Intel SDM vol 3C, the following checks are performed on vmentry of nested guests: - In the selector field for each of CS, SS, DS, ES, FS, GS and TR, the RPL (bits 1:0) and the TI flag (bit 2) must be 0. - The selector fields for CS and TR cannot be 0000H. - The selector field for SS cannot be 0000H if the "host address-space size" VM-exit control is 0. - On processors that support Intel 64 architecture, the base-address fields for FS, GS and TR must contain canonical addresses. Signed-off-by: Krish Sadhukhan Reviewed-by: Karl Heubaum Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) commit f087a02941feacf7d6f097522bc67c602fda18e6 Author: Sean Christopherson Date: Fri Jun 7 11:55:34 2019 -0700 KVM: nVMX: Stash L1's CR3 in vmcs01.GUEST_CR3 on nested entry w/o EPT KVM does not have 100% coverage of VMX consistency checks, i.e. some checks that cause VM-Fail may only be detected by hardware during a nested VM-Entry. In such a case, KVM must restore L1's state to the pre-VM-Enter state as L2's state has already been loaded into KVM's software model. L1's CR3 and PDPTRs in particular are loaded from vmcs01.GUEST_*. But when EPT is disabled, the associated fields hold KVM's shadow values, not L1's "real" values. Fortunately, when EPT is disabled the PDPTRs come from memory, i.e. are not cached in the VMCS. Which leaves CR3 as the sole anomaly. A previously applied workaround to handle CR3 was to force nested early checks if EPT is disabled: commit 2b27924bb1d48 ("KVM: nVMX: always use early vmcs check when EPT is disabled") Forcing nested early checks is undesirable as doing so adds hundreds of cycles to every nested VM-Entry. Rather than take this performance hit, handle CR3 by overwriting vmcs01.GUEST_CR3 with L1's CR3 during nested VM-Entry when EPT is disabled *and* nested early checks are disabled. By stuffing vmcs01.GUEST_CR3, nested_vmx_restore_host_state() will naturally restore the correct vcpu->arch.cr3 from vmcs01.GUEST_CR3. These shenanigans work because nested_vmx_restore_host_state() does a full kvm_mmu_reset_context(), i.e. unloads the current MMU, which guarantees vmcs01.GUEST_CR3 will be rewritten with a new shadow CR3 prior to re-entering L1. vcpu->arch.root_mmu.root_hpa is set to INVALID_PAGE via: nested_vmx_restore_host_state() -> kvm_mmu_reset_context() -> kvm_mmu_unload() -> kvm_mmu_free_roots() kvm_mmu_unload() has WARN_ON(root_hpa != INVALID_PAGE), i.e. we can bank on 'root_hpa == INVALID_PAGE' unless the implementation of kvm_mmu_reset_context() is changed. On the way into L1, VMCS.GUEST_CR3 is guaranteed to be written (on a successful entry) via: vcpu_enter_guest() -> kvm_mmu_reload() -> kvm_mmu_load() -> kvm_mmu_load_cr3() -> vmx_set_cr3() Stuff vmcs01.GUEST_CR3 if and only if nested early checks are disabled as a "late" VM-Fail should never happen win that case (KVM WARNs), and the conditional write avoids the need to restore the correct GUEST_CR3 when nested_vmx_check_vmentry_hw() fails. Signed-off-by: Sean Christopherson Message-Id: <20190607185534.24368-1-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini arch/x86/include/uapi/asm/vmx.h | 1 - arch/x86/kvm/vmx/nested.c | 44 +++++++++++++++++++++-------------------- 2 files changed, 23 insertions(+), 22 deletions(-) commit 335e192a3fa415e1202c8b9ecdaaecd643f823cc Author: Paolo Bonzini Date: Mon Jul 1 06:22:57 2019 -0400 KVM: x86: add tracepoints around __direct_map and FNAME(fetch) These are useful in debugging shadow paging. Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 13 +++++----- arch/x86/kvm/mmutrace.h | 59 ++++++++++++++++++++++++++++++++++++++++++++++ arch/x86/kvm/paging_tmpl.h | 2 ++ 3 files changed, 67 insertions(+), 7 deletions(-) commit e9f2a760b158551bfbef6db31d2cae45ab8072e5 Author: Paolo Bonzini Date: Sun Jun 30 08:36:21 2019 -0400 KVM: x86: change kvm_mmu_page_get_gfn BUG_ON to WARN_ON Note that in such a case it is quite likely that KVM will BUG_ON in __pte_list_remove when the VM is closed. However, there is no immediate risk of memory corruption in the host so a WARN_ON is enough and it lets you gather traces for debugging. Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit d679b32611c0102ce33b9e1a4e4b94854ed1812a Author: Paolo Bonzini Date: Sun Jun 23 19:15:49 2019 +0200 KVM: x86: remove now unneeded hugepage gfn adjustment After the previous patch, the low bits of the gfn are masked in both FNAME(fetch) and __direct_map, so we do not need to clear them in transparent_hugepage_adjust. Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 9 +++------ arch/x86/kvm/paging_tmpl.h | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) commit 3fcf2d1bdeb6a513523cb2c77012a6b047aa859c Author: Paolo Bonzini Date: Mon Jun 24 13:06:21 2019 +0200 KVM: x86: make FNAME(fetch) and __direct_map more similar These two functions are basically doing the same thing through kvm_mmu_get_page, link_shadow_page and mmu_set_spte; yet, for historical reasons, their code looks very different. This patch tries to take the best of each and make them very similar, so that it is easy to understand changes that apply to both of them. Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 53 ++++++++++++++++++++++------------------------ arch/x86/kvm/paging_tmpl.h | 30 ++++++++++++-------------- 2 files changed, 39 insertions(+), 44 deletions(-) commit 43fdcda96e2550c6d1c46fb8a78801aa2f7276ed Author: Junaid Shahid Date: Thu Jan 3 16:22:21 2019 -0800 kvm: x86: Do not release the page inside mmu_set_spte() Release the page at the call-site where it was originally acquired. This makes the exit code cleaner for most call sites, since they do not need to duplicate code between success and the failure label. Signed-off-by: Junaid Shahid Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 18 +++++++----------- arch/x86/kvm/paging_tmpl.h | 8 +++----- 2 files changed, 10 insertions(+), 16 deletions(-) commit 60cec433c485564bd7caac38a9df5c1ed79ee560 Author: Paolo Bonzini Date: Mon Jun 24 10:32:57 2019 +0200 KVM: cpuid: remove has_leaf_count from struct kvm_cpuid_param The has_leaf_count member was originally added for KVM's paravirtualization CPUID leaves. However, since then the leaf count _has_ been added to those leaves as well, so we can drop that special case. Signed-off-by: Paolo Bonzini arch/x86/kvm/cpuid.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 50a9e1a4b1dece60fd79ecdee25db01274a7f291 Author: Paolo Bonzini Date: Mon Jun 24 10:29:25 2019 +0200 KVM: cpuid: rename do_cpuid_1_ent do_cpuid_1_ent does not do the entire processing for a CPUID entry, it only retrieves the host's values. Rename it to match reality. Signed-off-by: Paolo Bonzini arch/x86/kvm/cpuid.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit d9aadaf689928ba896529cb684729923b21c2de5 Author: Paolo Bonzini Date: Thu Jul 4 12:20:48 2019 +0200 KVM: cpuid: set struct kvm_cpuid_entry2 flags in do_cpuid_1_ent do_cpuid_1_ent is typically called in two places by __do_cpuid_func for CPUID functions that have subleafs. Both places have to set the KVM_CPUID_FLAG_SIGNIFCANT_INDEX. Set that flag, and KVM_CPUID_FLAG_STATEFUL_FUNC as well, directly in do_cpuid_1_ent. Signed-off-by: Paolo Bonzini arch/x86/kvm/cpuid.c | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) commit 54d360d41211006437bebf97513394693bd32623 Author: Paolo Bonzini Date: Thu Jul 4 12:18:13 2019 +0200 KVM: cpuid: extract do_cpuid_7_mask and support multiple subleafs CPUID function 7 has multiple subleafs. Instead of having nested switch statements, move the logic to filter supported features to a separate function, and call it for each subleaf. Signed-off-by: Paolo Bonzini arch/x86/kvm/cpuid.c | 128 ++++++++++++++++++++++++++++++++------------------- 1 file changed, 81 insertions(+), 47 deletions(-) commit ab8bcf64971180e1344ce2c7e70c49b0f24f6b0d Author: Paolo Bonzini Date: Mon Jun 24 10:23:33 2019 +0200 KVM: cpuid: do_cpuid_ent works on a whole CPUID function Rename it as well as __do_cpuid_ent and __do_cpuid_ent_emulated to have "func" in its name, and drop the index parameter which is always 0. Signed-off-by: Paolo Bonzini arch/x86/kvm/cpuid.c | 89 +++++++++++++++++++++++++--------------------------- 1 file changed, 42 insertions(+), 47 deletions(-) commit 499723d12063aab97dfe6b41c822e9c1c74eff3e Author: Steffen Maier Date: Wed Jul 3 12:19:49 2019 +0200 docs: s390: s390dbf: typos and formatting, update crash command Signed-off-by: Steffen Maier Acked-by: Christian Borntraeger Message-Id: <1562149189-1417-4-git-send-email-maier@linux.ibm.com> Signed-off-by: Vasily Gorbik Documentation/s390/s390dbf.rst | 122 +++++++++++++++++++++++------------------ 1 file changed, 68 insertions(+), 54 deletions(-) commit 0328e519a726ff6e4abacba838eb00415171c34b Author: Steffen Maier Date: Wed Jul 3 12:19:48 2019 +0200 docs: s390: unify and update s390dbf kdocs at debug.c For non-static-inlines, debug.c already had non-compliant function header docs. So move the pure prototype kdocs of ("s390: include/asm/debug.h add kerneldoc markups") from debug.h to debug.c and merge them with the old function docs. Also, I had the impression that kdoc typically is at the implementation in the compile unit rather than at the prototype in the header file. While at it, update the short kdoc description to distinguish the different functions. And a few more consistency cleanups. Added a new kdoc for debug_set_critical() since debug.h comments it as part of the API. Signed-off-by: Steffen Maier Acked-by: Christian Borntraeger Message-Id: <1562149189-1417-3-git-send-email-maier@linux.ibm.com> Signed-off-by: Vasily Gorbik Documentation/s390/s390dbf.rst | 1 + arch/s390/include/asm/debug.h | 112 ++++++----------------------------------- arch/s390/kernel/debug.c | 105 +++++++++++++++++++++++++++++++------- 3 files changed, 102 insertions(+), 116 deletions(-) commit f11977be1af94c6d42350fe85fa073d24ba75fac Author: Steffen Maier Date: Wed Jul 3 12:19:47 2019 +0200 docs: s390: restore important non-kdoc parts of s390dbf.rst Complements previous ("s390: include/asm/debug.h add kerneldoc markups") which seemed to have dropped important non-kdoc parts such as user space interface (level, size, flush) as well as views and caution regarding strings in the sprintf view. Signed-off-by: Steffen Maier Acked-by: Christian Borntraeger Message-Id: <1562149189-1417-2-git-send-email-maier@linux.ibm.com> Signed-off-by: Vasily Gorbik Documentation/s390/s390dbf.rst | 339 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 339 insertions(+) commit 555827c28a3eaf7c4b020e076eb727b9f2a96b3c Merge: 6ae3483d4116 c382cbc6dbf5 Author: Vasily Gorbik Date: Fri Jul 5 13:39:22 2019 +0200 Merge tag 'vfio-ccw-20190705' of https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/vfio-ccw into features Fix a bug introduced in the refactoring. * tag 'vfio-ccw-20190705' of https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/vfio-ccw: vfio-ccw: Fix the conversion of Format-0 CCWs to Format-1 Signed-off-by: Vasily Gorbik commit 388b00f045180179fedff4b108d40a0192684cda Author: Colin Ian King Date: Fri Jul 5 10:57:04 2019 +0100 ALSA: cs4281: remove redundant assignment to variable val and remove a goto The variable val is being assigned with a value that is never read and it is being updated later with a new value. The assignment is redundant and can be removed. Also remove a goto statement and a label and replace with a break statement. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Takashi Iwai sound/pci/cs4281.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 774a075ab5140bb4504e6026bf327021926c3e65 Author: Takashi Iwai Date: Wed Jul 3 14:35:12 2019 +0200 ALSA: hda: Simplify snd_hdac_refresh_widgets() Along with the recent fix for the races of snd_hdac_refresh_widgets() it turned out that the instantiation of widgets sysfs at snd_hdac_sysfs_reinit() could cause a race. The race itself was already covered later by extending the mutex protection range, the commit 98482377dc72 ("ALSA: hda: Fix widget_mutex incomplete protection"), but this also indicated that the call of *_reinit() is basically superfluous, as the widgets shall be created sooner or later from snd_hdac_device_register(). This patch removes the redundant call of snd_hdac_sysfs_reinit() at first. By this removal, the sysfs argument itself in snd_hdac_refresh_widgets() becomes superfluous, too, because the only case sysfs=false is always with codec->widgets=NULL. So, we drop this redundant argument as well. Signed-off-by: Takashi Iwai include/sound/hdaudio.h | 2 +- sound/hda/hdac_device.c | 13 +++++-------- sound/hda/hdac_sysfs.c | 2 +- sound/pci/hda/hda_codec.c | 2 +- sound/soc/codecs/hdac_hdmi.c | 2 +- 5 files changed, 9 insertions(+), 12 deletions(-) commit 9dcb98a29b6e81394fa33ca984f3aaad4d0d1393 Author: Hook, Gary Date: Mon Jun 24 18:35:01 2019 +0000 Documentation: dmaengine: clean up description of dmatest usage Fix the formatting of the multi-channel test usage example. Call out the note about parameter ordering and add detail on the settings of parameters for the new version of dmatest. Fixes: f80f9988a26d7 ("dmaengine: Documentation: Add documentation for multi chan testing") Signed-off-by: Gary R Hook Signed-off-by: Vinod Koul Documentation/driver-api/dmaengine/dmatest.rst | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit 3145d73e69ba0ab58cb302d3e6a80232bf373b7e Author: Sameer Pujar Date: Thu Jun 20 21:24:19 2019 +0530 dmaengine: tegra210-adma: remove PM_CLK dependency Tegra ADMA does not use pm-clk interface now and hence the dependency is removed from Kconfig. Signed-off-by: Sameer Pujar Acked-by: Jon Hunter Signed-off-by: Vinod Koul drivers/dma/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bb26e0c636d42f9eda81b1cd863e59e42669dce7 Author: Hariprasad Kelam Date: Fri Jul 5 08:27:33 2019 +0530 ALSA: asihpi: Remove unneeded variable change this patch fixes below issue reported by coccicheck sound/pci/asihpi/asihpi.c:1558:5-11: Unneeded variable: "change". Return "1" on line 1564 Signed-off-by: Hariprasad Kelam Signed-off-by: Takashi Iwai sound/pci/asihpi/asihpi.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 2f4281f4dce12440727ab770683cfb83eab62a26 Merge: 996cdfaf538f 2aeac95d1a4c Author: Greg Kroah-Hartman Date: Fri Jul 5 08:15:08 2019 +0200 Merge tag 'soundwire-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire into char-misc-next Vinod writes: soundwire updates for v5.3-rc1 Updates for 5.3 include: - module_sdw_driver macro for drivers - Documentation updates for code-blocks - Improvement from Pierre on intel and cadence driver - Clarification of DisCo properties and updates * tag 'soundwire-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire: soundwire: add module_sdw_driver helper macro docs: soundwire: locking: fix tags for a code-block soundwire: intel_init: add checks on link numbers soundwire: fix typo in comments soundwire: Intel: add log for number of PCM and PDM PDIs soundwire: cadence_master: check the number of bidir PDIs soundwire: cadence_master: log Slave status mask on errors soundwire: cadence_master: use rate_limited dynamic debug soundwire: rename/clarify MIPI DisCo properties soundwire: clarify comment soundwire: mipi-disco: fix clock stop modes soundwire: rename 'freq' fields soundwire: mipi-disco: remove master_count property for masters soundwire: remove master data port properties soundwire: add port-related definitions soundwire: mipi_disco: fix master/link error soundwire: intel: filter SoundWire controller device search soundwire: cdns: Fix compilation error on arm64 commit ca95c7bf3d29716916baccdc77c3c2284b703069 Author: Takashi Iwai Date: Thu Jul 4 16:31:12 2019 +0200 ALSA: usb-audio: Fix parse of UAC2 Extension Units Extension Unit (XU) is used to have a compatible layout with Processing Unit (PU) on UAC1, and the usb-audio driver code assumed it for parsing the descriptors. Meanwhile, on UAC2, XU became slightly incompatible with PU; namely, XU has a one-byte bmControls bitmap while PU has two bytes bmControls bitmap. This incompatibility results in the read of a wrong address for the last iExtension field, which ended up with an incorrect string for the mixer element name, as recently reported for Focusrite Scarlett 18i20 device. This patch corrects this misalignment by introducing a couple of new macros and calling them depending on the descriptor type. Fixes: 23caaf19b11e ("ALSA: usb-mixer: Add support for Audio Class v2.0") Reported-by: Stefan Sauer Cc: Signed-off-by: Takashi Iwai include/uapi/linux/usb/audio.h | 37 +++++++++++++++++++++++++++++++++++++ sound/usb/mixer.c | 16 ++++++++++------ 2 files changed, 47 insertions(+), 6 deletions(-) commit c382cbc6dbf513d73cf896ad43a3789ad42c2e2f Author: Eric Farman Date: Tue Jul 2 20:09:28 2019 +0200 vfio-ccw: Fix the conversion of Format-0 CCWs to Format-1 When processing Format-0 CCWs, we use the "len" variable as the number of CCWs to convert to Format-1. But that variable contains zero here, and is not a meaningful CCW count until ccwchain_calc_length() returns. Since that routine requires and expects Format-1 CCWs to identify the chaining behavior, the format conversion must be done first. Convert the 2KB we copied even if it's more than we need. Fixes: 7f8e89a8f2fd ("vfio-ccw: Factor out the ccw0-to-ccw1 transition") Reported-by: Farhan Ali Signed-off-by: Eric Farman Reviewed-by: Cornelia Huck Message-Id: <20190702180928.18113-1-farman@linux.ibm.com> Signed-off-by: Cornelia Huck drivers/s390/cio/vfio_ccw_cp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2bc8bb813cba6e699b29fd0b30720288866a5e5d Merge: 214cc39d175c 034252e37b31 Author: Greg Kroah-Hartman Date: Fri Jul 5 07:19:28 2019 +0200 Merge tag 'usb-ci-v5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-next - Add imx7ulp support. - Some tiny improvements, no function change. * tag 'usb-ci-v5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb: usb: chipidea: msm: Use devm_platform_ioremap_resource() usb: chipidea: imx: Use devm_platform_ioremap_resource() usb: chipidea: Use dev_err() instead of pr_err() usb: chipidea: imx: "fsl,usbphy" phandle is not mandatory now usb: chipidea: imx: add imx7ulp support commit 037f11b4752f717201143a1dc5d6acf3cb71ddfa Author: Al Viro Date: Sat Jun 1 18:09:44 2019 -0400 mnt_init(): call shmem_init() unconditionally No point having two call sites (earlier in init_rootfs() from mnt_init() in case we are going to use shmem-style rootfs, later from do_basic_setup() unconditionally), along with the logics in shmem_init() itself to make the second call a no-op... Signed-off-by: Al Viro fs/namespace.c | 2 ++ include/linux/init.h | 2 +- init/do_mounts.c | 9 ++------- init/main.c | 1 - mm/shmem.c | 4 ---- 5 files changed, 5 insertions(+), 13 deletions(-) commit 33488845f211afcdb7e5c00a3152890e06cdc78e Author: Al Viro Date: Fri May 31 20:09:15 2019 -0400 constify ksys_mount() string arguments Signed-off-by: Al Viro drivers/base/devtmpfs.c | 3 +-- fs/namespace.c | 4 ++-- include/linux/syscalls.h | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) commit fd3e007f6c6a0f677e4ee8aca4b9bab8ad6cab9a Author: Al Viro Date: Thu May 30 17:48:35 2019 -0400 don't bother with registering rootfs init_mount_tree() can get to rootfs_fs_type directly and that simplifies a lot of things. We don't need to register it, we don't need to look it up *and* we don't need to bother with preventing subsequent userland mounts. That's the way we should've done that from the very beginning. There is a user-visible change, namely the disappearance of "rootfs" from /proc/filesystems. Note that it's been unmountable all along and it didn't show up in /proc/mounts; however, it *is* a user-visible change and theoretically some script might've been using its presence in /proc/filesystems to tell 2.4.11+ from earlier kernels. *IF* any complaints about behaviour change do show up, we could fake it in /proc/filesystems. I very much doubt we'll have to, though. Signed-off-by: Al Viro fs/namespace.c | 7 +------ include/linux/init.h | 3 +++ init/do_mounts.c | 15 ++------------- 3 files changed, 6 insertions(+), 19 deletions(-) commit 14a253ce4210cd2ef133b392062477e9d656db4a Author: Al Viro Date: Thu May 30 15:59:57 2019 -0400 init_rootfs(): don't bother with init_ramfs_fs() the only thing done by the latter is making ramfs visible to mount(2); we don't need it there - rootfs is separate and, in fact, made visible to mount(2) in the same init_rootfs(). Signed-off-by: Al Viro fs/ramfs/inode.c | 6 +----- include/linux/ramfs.h | 1 - init/do_mounts.c | 2 -- 3 files changed, 1 insertion(+), 8 deletions(-) commit 5afdd0f1e6a7e56264fd933065884a7903375106 Author: David Howells Date: Mon Mar 25 16:38:31 2019 +0000 vfs: Convert smackfs to use the new mount API Convert the smackfs filesystem to the new internal mount API as the old one will be obsoleted and removed. This allows greater flexibility in communication of mount parameters between userspace, the VFS and the filesystem. See Documentation/filesystems/mount_api.txt for more information. Signed-off-by: David Howells cc: Casey Schaufler cc: linux-security-module@vger.kernel.org Signed-off-by: Al Viro security/smack/smackfs.c | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) commit 920f50b2a44bbc5e332a3f84f7ad4040ee62fcc6 Author: David Howells Date: Mon Mar 25 16:38:30 2019 +0000 vfs: Convert selinuxfs to use the new mount API Convert the selinuxfs filesystem to the new internal mount API as the old one will be obsoleted and removed. This allows greater flexibility in communication of mount parameters between userspace, the VFS and the filesystem. See Documentation/filesystems/mount_api.txt for more information. Signed-off-by: David Howells cc: Paul Moore cc: Stephen Smalley cc: Eric Paris cc: selinux@vger.kernel.org cc: linux-security-module@vger.kernel.org Signed-off-by: Al Viro security/selinux/selinuxfs.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit 5c86d7e0433acb6f5d5f3cc2adf8ea3f6bc6bbda Author: David Howells Date: Mon Mar 25 16:38:30 2019 +0000 vfs: Convert securityfs to use the new mount API Convert the securityfs filesystem to the new internal mount API as the old one will be obsoleted and removed. This allows greater flexibility in communication of mount parameters between userspace, the VFS and the filesystem. See Documentation/filesystems/mount_api.txt for more information. Signed-off-by: David Howells cc: linux-security-module@vger.kernel.org Signed-off-by: Al Viro security/inode.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) commit b0ecc9da5ff64b59c810d1e9c82d06488805da77 Author: David Howells Date: Mon Mar 25 16:38:30 2019 +0000 vfs: Convert apparmorfs to use the new mount API Convert the apparmorfs filesystem to the new internal mount API as the old one will be obsoleted and removed. This allows greater flexibility in communication of mount parameters between userspace, the VFS and the filesystem. See Documentation/filesystems/mount_api.txt for more information. Signed-off-by: David Howells cc: John Johansen cc: apparmor@lists.ubuntu.com cc: linux-security-module@vger.kernel.org Signed-off-by: Al Viro security/apparmor/apparmorfs.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit 7ab2fa7693c3f0ce8445fd4e9e4e58e34e6a2213 Author: David Howells Date: Mon Mar 25 16:38:30 2019 +0000 vfs: Convert openpromfs to use the new mount API Convert the openpromfs filesystem to the new internal mount API as the old one will be obsoleted and removed. This allows greater flexibility in communication of mount parameters between userspace, the VFS and the filesystem. See Documentation/filesystems/mount_api.txt for more information. Signed-off-by: David Howells Signed-off-by: Al Viro fs/openpromfs/inode.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit 2345771f87dfd53c1c38a64be1638658ef31f460 Author: David Howells Date: Mon Mar 25 16:38:30 2019 +0000 vfs: Convert xenfs to use the new mount API Convert the xenfs filesystem to the new internal mount API as the old one will be obsoleted and removed. This allows greater flexibility in communication of mount parameters between userspace, the VFS and the filesystem. See Documentation/filesystems/mount_api.txt for more information. Signed-off-by: David Howells Reviewed-by: Juergen Gross cc: Boris Ostrovsky cc: Stefano Stabellini cc: xen-devel@lists.xenproject.org Signed-off-by: Al Viro drivers/xen/xenfs/super.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) commit e5d82a7360d124ae1a38c2a5eac92ba49b125191 Author: David Howells Date: Mon Mar 25 16:38:30 2019 +0000 vfs: Convert gadgetfs to use the new mount API Convert the gadgetfs filesystem to the new internal mount API as the old one will be obsoleted and removed. This allows greater flexibility in communication of mount parameters between userspace, the VFS and the filesystem. See Documentation/filesystems/mount_api.txt for more information. Signed-off-by: David Howells Acked-by: Felipe Balbi cc: linux-usb@vger.kernel.org Signed-off-by: Al Viro drivers/usb/gadget/legacy/inode.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) commit c6a2c720d206d37e67e533af898c45d62fb07505 Author: David Howells Date: Mon Mar 25 16:38:30 2019 +0000 vfs: Convert oprofilefs to use the new mount API Convert the oprofilefs filesystem to the new internal mount API as the old one will be obsoleted and removed. This allows greater flexibility in communication of mount parameters between userspace, the VFS and the filesystem. See Documentation/filesystems/mount_api.txt for more information. Signed-off-by: David Howells cc: Robert Richter cc: oprofile-list@lists.sf.net Signed-off-by: Al Viro drivers/oprofile/oprofilefs.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit 129f809d2aa9c02cd1ab9714b265d828db3691ec Author: David Howells Date: Mon Mar 25 16:38:29 2019 +0000 vfs: Convert ibmasmfs to use the new mount API Convert the ibmasmfs filesystem to the new internal mount API as the old one will be obsoleted and removed. This allows greater flexibility in communication of mount parameters between userspace, the VFS and the filesystem. See Documentation/filesystems/mount_api.txt for more information. Signed-off-by: David Howells cc: Arnd Bergmann cc: Greg Kroah-Hartman Signed-off-by: Al Viro drivers/misc/ibmasm/ibmasmfs.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) commit 7515c22cc8c80b241b7317fb17d853691dab0221 Author: David Howells Date: Mon Mar 25 16:38:29 2019 +0000 vfs: Convert qib_fs/ipathfs to use the new mount API Convert the qib_fs/ipathfs filesystem to the new internal mount API as the old one will be obsoleted and removed. This allows greater flexibility in communication of mount parameters between userspace, the VFS and the filesystem. See Documentation/filesystems/mount_api.txt for more information. [Q] Can qib_remove() race with qibfs_kill_super()? Should qib_super accesses be serialised with some sort of lock? [A] yes, it can and no, that's not the right solution. See vfs.git #qibfs for an old attempt to handle that cleanly. Infiniband folks were not interested... Signed-off-by: David Howells Reviewed-by: Dennis Dalessandro cc: Mike Marciniszyn cc: linux-rdma@vger.kernel.org Signed-off-by: Al Viro drivers/infiniband/hw/qib/qib_fs.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) commit 4799974555de565df0d0aca86c15bbea70105a19 Author: David Howells Date: Mon Mar 25 16:38:29 2019 +0000 vfs: Convert efivarfs to use the new mount API Convert the efivarfs filesystem to the new internal mount API as the old one will be obsoleted and removed. This allows greater flexibility in communication of mount parameters between userspace, the VFS and the filesystem. [AV: get rid of efivarfs_sb nonsense - it has never been used] See Documentation/filesystems/mount_api.txt for more information. Signed-off-by: David Howells cc: Matthew Garrett cc: Jeremy Kerr cc: Ard Biesheuvel cc: linux-efi@vger.kernel.org Signed-off-by: Al Viro fs/efivarfs/super.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) commit 6bc62f2067d30f90621c42a2794c2515eff7bf11 Author: David Howells Date: Mon Mar 25 16:38:29 2019 +0000 vfs: Convert configfs to use the new mount API Convert the configfs filesystem to the new internal mount API as the old one will be obsoleted and removed. This allows greater flexibility in communication of mount parameters between userspace, the VFS and the filesystem. See Documentation/filesystems/mount_api.txt for more information. Signed-off-by: David Howells cc: Joel Becker cc: Christoph Hellwig Signed-off-by: Al Viro fs/configfs/mount.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit bc99a664e9be24e49e09da1250ede0c598d958d1 Author: David Howells Date: Mon Mar 25 16:38:28 2019 +0000 vfs: Convert binfmt_misc to use the new mount API Convert the binfmt_misc filesystem to the new internal mount API as the old one will be obsoleted and removed. This allows greater flexibility in communication of mount parameters between userspace, the VFS and the filesystem. See Documentation/filesystems/mount_api.txt for more information. Signed-off-by: David Howells cc: Alexander Viro cc: linux-fsdevel@vger.kernel.org Signed-off-by: Al Viro fs/binfmt_misc.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit c23a0bbab30cc1714b6b1d6a1c153a5ccab3f0d8 Author: Al Viro Date: Wed May 22 21:23:39 2019 -0400 convenience helper: get_tree_single() counterpart of mount_single(); switch fusectl to it Signed-off-by: Al Viro fs/fuse/control.c | 2 +- fs/super.c | 8 ++++++++ include/linux/fs_context.h | 3 +++ 3 files changed, 12 insertions(+), 1 deletion(-) commit 2ac295d4f0c095310addbcb03d91d2a4c9f7d435 Author: Al Viro Date: Sat Jun 1 20:48:55 2019 -0400 convenience helper get_tree_nodev() counterpart of mount_nodev(). Switch hugetlb and pseudo to it. Signed-off-by: Al Viro fs/hugetlbfs/inode.c | 2 +- fs/libfs.c | 2 +- fs/super.c | 8 ++++++++ include/linux/fs_context.h | 3 +++ 4 files changed, 13 insertions(+), 2 deletions(-) commit 371b86897d0125738cdb9dc76d16f12bcabdef9d Author: Liguang Zhang Date: Tue Jun 25 13:15:28 2019 +0800 ACPI / APEI: Remove needless __ghes_check_estatus() calls Function __ghes_check_estatus() is always called after __ghes_peek_estatus(), but it is already called in __ghes_peek_estatus(). So we should remove some needless __ghes_check_estatus() calls. Signed-off-by: Liguang Zhang Reviewed-by: James Morse Signed-off-by: Rafael J. Wysocki drivers/acpi/apei/ghes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e4e59906cfe4e215a4360962bedb3d6e5cca5158 Author: Al Viro Date: Sat Jun 29 12:58:42 2019 -0400 fs/namespace.c: shift put_mountpoint() to callers of unhash_mnt() make unhash_mnt() return the mountpoint to be dropped, let callers deal with it. Signed-off-by: Al Viro fs/namespace.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit adc9b5c09129fd8df17d83ca9a5b0532632a1b77 Author: Al Viro Date: Sat Jun 29 12:06:51 2019 -0400 __detach_mounts(): lookup_mountpoint() can't return ERR_PTR() anymore ... not since 1e9c75fb9c47 ("mnt: fix __detach_mounts infinite loop") Signed-off-by: Al Viro fs/namespace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1cfb7072c1cc07d3000d3185b8ae8219d520a9b0 Author: Al Viro Date: Fri Jun 28 00:44:02 2019 -0400 nfs: dget_parent() never returns NULL Signed-off-by: Al Viro fs/nfs/super.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 516162b92d1b72995ce796b98bb8c7992d9f5b5f Author: Al Viro Date: Thu Jun 27 22:25:23 2019 -0400 ceph: don't open-code the check for dead lockref Signed-off-by: Al Viro fs/ceph/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3f57fe28f84d636ca6238f33afe8b88d27c34d1b Author: Nick Crews Date: Wed May 8 14:38:25 2019 -0600 power_supply: wilco_ec: Add charging config driver Add a driver to control the charging algorithm used on Wilco devices. See Documentation/ABI/testing/sysfs-class-power-wilco for the userspace interface and other info. Signed-off-by: Nick Crews Reviewed-by: Enric Balletbo i Serra Signed-off-by: Sebastian Reichel Documentation/ABI/testing/sysfs-class-power-wilco | 30 ++++ drivers/power/supply/Kconfig | 9 ++ drivers/power/supply/Makefile | 1 + drivers/power/supply/wilco-charger.c | 187 ++++++++++++++++++++++ 4 files changed, 227 insertions(+) commit 1e10694d535fd1158c4ff16a841c23400af4d01e Merge: 2ffb500d824b 0c0b7ea23aed Author: Sebastian Reichel Date: Fri Jul 5 00:54:27 2019 +0200 Merge tag 'tags/ib-chrome-psy-5.3' into psy-next Immutable branch between Power Supply and Chrome Platform due for the v5.3 merge window Signed-off-by: Sebastian Reichel commit 8338d93788950e63d12bd1d5eb09e239550e80e9 Author: Shay Agroskin Date: Tue Jul 2 23:55:11 2019 +0000 net/mlx5: Added devlink info callback The callback is invoked using 'devlink dev info ' command and returns the running and pending firmware version of the HCA and the name of the kernel driver. If there is a pending firmware version (a new version is burned but the HCA still runs with the previous) it is returned as the stored firmware version. Otherwise, the running version is returned for this field. Output example: $ devlink dev info pci/0000:00:06.0 pci/0000:00:06.0: driver mlx5_core versions: fixed: fw.psid MT_0000000009 running: fw.version 16.26.0100 stored: fw.version 16.26.0100 Signed-off-by: Shay Agroskin Reviewed-by: Jakub Kicinski Signed-off-by: Saeed Mahameed .../networking/device_drivers/mellanox/mlx5.rst | 19 +++++++ drivers/net/ethernet/mellanox/mlx5/core/devlink.c | 60 ++++++++++++++++++++++ 2 files changed, 79 insertions(+) commit 9c86b07e306979de852423dd11135173caeab138 Author: Shay Agroskin Date: Tue Jul 2 23:55:09 2019 +0000 net/mlx5: Added fw version query command Using the MCQI and MCQS registers, we query the running and pending fw version of the HCA. The MCQS is queried with sequentially increasing component index, until a component of type BOOT_IMG is found. Querying this component's version using the MCQI register yields the running and pending fw version of the HCA. Querying MCQI for the pending fw version should be done only after validating that such fw version exists. This is done my checking 'component update state' field in MCQS output. Signed-off-by: Shay Agroskin Reviewed-by: Jakub Kicinski Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/fw.c | 219 +++++++++++++++++++-- .../net/ethernet/mellanox/mlx5/core/mlx5_core.h | 2 + 2 files changed, 201 insertions(+), 20 deletions(-) commit e08a976a16cafc20931db1d17aed9183202bfa8d Merge: e2c746944e26 f8efee08dd9d Author: Saeed Mahameed Date: Thu Jul 4 16:40:32 2019 -0400 Merge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux Misc updates from mlx5-next branch: 1) Add the required HW definitions and structures for upcoming TLS support. 2) Add support for MCQI and MCQS hardware registers for fw version query. 3) Added hardware bits and structures definitions for sub-functions 4) Small code cleanup and improvement for PF pci driver. 5) Bluefield (ECPF) updates and refactoring for better E-Switch management on ECPF embedded CPU NIC: 5.1) Consolidate querying eswitch number of VFs 5.2) Register event handler at the correct E-Switch init stage 5.3) Setup PF's inline mode and vlan pop when the ECPF is the E-Swtich manager ( the host PF is basically a VF ). 5.4) Handle Vport UC address changes in switchdev mode. 6) Cleanup the rep and netdev reference when unloading IB rep. Signed-off-by: Saeed Mahameed i# All conflicts fixed but you are still merging. commit c4cde5804d512a2f8934017dbf7df642dfbdf2ad Merge: e2c746944e26 e5a3e259ef23 Author: David S. Miller Date: Thu Jul 4 12:48:21 2019 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Daniel Borkmann says: ==================== pull-request: bpf-next 2019-07-03 The following pull-request contains BPF updates for your *net-next* tree. There is a minor merge conflict in mlx5 due to 8960b38932be ("linux/dim: Rename externally used net_dim members") which has been pulled into your tree in the meantime, but resolution seems not that bad ... getting current bpf-next out now before there's coming more on mlx5. ;) I'm Cc'ing Saeed just so he's aware of the resolution below: ** First conflict in drivers/net/ethernet/mellanox/mlx5/core/en_main.c: <<<<<<< HEAD static int mlx5e_open_cq(struct mlx5e_channel *c, struct dim_cq_moder moder, struct mlx5e_cq_param *param, struct mlx5e_cq *cq) ======= int mlx5e_open_cq(struct mlx5e_channel *c, struct net_dim_cq_moder moder, struct mlx5e_cq_param *param, struct mlx5e_cq *cq) >>>>>>> e5a3e259ef239f443951d401db10db7d426c9497 Resolution is to take the second chunk and rename net_dim_cq_moder into dim_cq_moder. Also the signature for mlx5e_open_cq() in ... drivers/net/ethernet/mellanox/mlx5/core/en.h +977 ... and in mlx5e_open_xsk() ... drivers/net/ethernet/mellanox/mlx5/core/en/xsk/setup.c +64 ... needs the same rename from net_dim_cq_moder into dim_cq_moder. ** Second conflict in drivers/net/ethernet/mellanox/mlx5/core/en_main.c: <<<<<<< HEAD int cpu = cpumask_first(mlx5_comp_irq_get_affinity_mask(priv->mdev, ix)); struct dim_cq_moder icocq_moder = {0, 0}; struct net_device *netdev = priv->netdev; struct mlx5e_channel *c; unsigned int irq; ======= struct net_dim_cq_moder icocq_moder = {0, 0}; >>>>>>> e5a3e259ef239f443951d401db10db7d426c9497 Take the second chunk and rename net_dim_cq_moder into dim_cq_moder as well. Let me know if you run into any issues. Anyway, the main changes are: 1) Long-awaited AF_XDP support for mlx5e driver, from Maxim. 2) Addition of two new per-cgroup BPF hooks for getsockopt and setsockopt along with a new sockopt program type which allows more fine-grained pass/reject settings for containers. Also add a sock_ops callback that can be selectively enabled on a per-socket basis and is executed for every RTT to help tracking TCP statistics, both features from Stanislav. 3) Follow-up fix from loops in precision tracking which was not propagating precision marks and as a result verifier assumed that some branches were not taken and therefore wrongly removed as dead code, from Alexei. 4) Fix BPF cgroup release synchronization race which could lead to a double-free if a leaf's cgroup_bpf object is released and a new BPF program is attached to the one of ancestor cgroups in parallel, from Roman. 5) Support for bulking XDP_TX on veth devices which improves performance in some cases by around 9%, from Toshiaki. 6) Allow for lookups into BPF devmap and improve feedback when calling into bpf_redirect_map() as lookup is now performed right away in the helper itself, from Toke. 7) Add support for fq's Earliest Departure Time to the Host Bandwidth Manager (HBM) sample BPF program, from Lawrence. 8) Various cleanups and minor fixes all over the place from many others. ==================== Signed-off-by: David S. Miller commit e2c746944e26609f63661cedb7c7c31f0578c58f Author: René van Dorst Date: Wed Jul 3 20:42:04 2019 +0200 net: ethernet: mediatek: Fix overlapping capability bits. Both MTK_TRGMII_MT7621_CLK and MTK_PATH_BIT are defined as bit 10. This can causes issues on non-MT7621 devices which has the MTK_PATH_BIT(MTK_ETH_PATH_GMAC1_RGMII) and MTK_TRGMII capability set. The wrong TRGMII setup code can be executed. The current wrongly executed code doesn’t do any harm on MT7623 and the TRGMII setup for the MT7623 SOC side is done in MT7530 driver So it wasn’t noticed in the test. Move all capability bits in one enum so that they are all unique and easy to expand in the future. Because mtk_eth_path enum is merged in to mkt_eth_capabilities, the variable path value is no longer between 0 to number of paths, mtk_eth_path_name can’t be used anymore in this form. Convert the mtk_eth_path_name array to a function to lookup the pathname. The old code walked thru the mtk_eth_path enum, which is also merged with mkt_eth_capabilities. Expand array mtk_eth_muxc so it can store the name and capability bit of the mux. Convert the code so it can walk thru the mtk_eth_muxc array. Fixes: 8efaa653a8a5 ("net: ethernet: mediatek: Add MT7621 TRGMII mode support") Signed-off-by: René van Dorst v1->v2: - Move all capability bits in one enum, suggested by Willem de Bruijn - Convert the mtk_eth_path_name array to a function to lookup the pathname - Expand array mtk_eth_muxc so it can also store the name and capability bit of the mux - Updated commit message Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_path.c | 81 +++++++++++------ drivers/net/ethernet/mediatek/mtk_eth_soc.h | 129 +++++++++++++++------------ 2 files changed, 125 insertions(+), 85 deletions(-) commit c3efed5ad1b05cf825aa9d5a9068d9f41cb17139 Author: Weifeng Voon Date: Thu Jul 4 00:59:10 2019 +0800 net: stmmac: Enable dwmac4 jumbo frame more than 8KiB Enable GMAC v4.xx and beyond to support 16KiB buffer. Signed-off-by: Weifeng Voon Signed-off-by: Ong Boon Leong Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 07a4ddec3ce9b0a533b5f90f582f1057390d5e63 Author: Vincent Bernat Date: Tue Jul 2 19:43:54 2019 +0200 bonding: add an option to specify a delay between peer notifications Currently, gratuitous ARP/ND packets are sent every `miimon' milliseconds. This commit allows a user to specify a custom delay through a new option, `peer_notif_delay'. Like for `updelay' and `downdelay', this delay should be a multiple of `miimon' to avoid managing an additional work queue. The configuration logic is copied from `updelay' and `downdelay'. However, the default value cannot be set using a module parameter: Netlink or sysfs should be used to configure this feature. When setting `miimon' to 100 and `peer_notif_delay' to 500, we can observe the 500 ms delay is respected: 20:30:19.354693 ARP, Request who-has 203.0.113.10 tell 203.0.113.10, length 28 20:30:19.874892 ARP, Request who-has 203.0.113.10 tell 203.0.113.10, length 28 20:30:20.394919 ARP, Request who-has 203.0.113.10 tell 203.0.113.10, length 28 20:30:20.914963 ARP, Request who-has 203.0.113.10 tell 203.0.113.10, length 28 In bond_mii_monitor(), I have tried to keep the lock logic readable. The change is due to the fact we cannot rely on a notification to lower the value of `bond->send_peer_notif' as `NETDEV_NOTIFY_PEERS' is only triggered once every N times, while we need to decrement the counter each time. iproute2 also needs to be updated to be able to specify this new attribute through `ip link'. Signed-off-by: Vincent Bernat Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 31 +++++++++++------ drivers/net/bonding/bond_netlink.c | 14 ++++++++ drivers/net/bonding/bond_options.c | 71 ++++++++++++++++++++++++-------------- drivers/net/bonding/bond_procfs.c | 2 ++ drivers/net/bonding/bond_sysfs.c | 13 +++++++ include/net/bond_options.h | 1 + include/net/bonding.h | 1 + include/uapi/linux/if_link.h | 1 + tools/include/uapi/linux/if_link.h | 1 + 9 files changed, 98 insertions(+), 37 deletions(-) commit 2368a870d6408d8a834ebb2b9f1576144c96a78f Author: Colin Ian King Date: Thu Jul 4 13:36:51 2019 +0100 net: ethernet: sun: remove redundant assignment to variable err The variable err is being assigned with a value that is never read and it is being updated in the next statement with a new value. The assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/sun/niu.c | 2 -- 1 file changed, 2 deletions(-) commit f8efee08dd9d41ab71010e9b16c9ead51753b7d6 Author: Mark Zhang Date: Tue Jul 2 13:02:30 2019 +0300 net/mlx5: Add rts2rts_qp_counters_set_id field in hca cap Add rts2rts_qp_counters_set_id field in hca cap so that RTS2RTS qp modification can be used to change the counter of a QP. Signed-off-by: Mark Zhang Reviewed-by: Majd Dibbiny Acked-by: Saeed Mahameed Signed-off-by: Leon Romanovsky include/linux/mlx5/mlx5_ifc.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit f1d72c55d94e6ae2f612043f2117b6ad1c82e137 Author: YueHaibing Date: Thu Jul 4 14:46:49 2019 +0800 remoteproc: qcom: q6v5-mss: Fix build error without QCOM_MDT_LOADER If QCOM_Q6V5_MSS is set but QCOM_MDT_LOADER is not, building will fails: drivers/remoteproc/qcom_q6v5_mss.o: In function `q6v5_start': qcom_q6v5_mss.c:(.text+0x3260): undefined reference to `qcom_mdt_read_metadata' Add QCOM_MDT_LOADER dependency for QCOM_Q6V5_MSS. Reported-by: Hulk Robot Fixes: f04b91383456 ("remoteproc: qcom: q6v5-mss: Support loading non-split images") Signed-off-by: YueHaibing Signed-off-by: Bjorn Andersson drivers/remoteproc/Kconfig | 1 + 1 file changed, 1 insertion(+) commit bcde9a83b13ede042fd76e4cf0b759b6d6c0abe9 Author: Daniel Kranzdorf Date: Sun Jun 30 17:53:02 2019 +0300 RDMA/efa: Entropy in admin commands id Make admin commands id easier to distinguish by using relevant bits from the producer counter. This allows us to differentiate admin commands with the same producer index (happens after admin queue overlap), which is helpful when debugging. Signed-off-by: Daniel Kranzdorf Reviewed-by: Firas JahJah Reviewed-by: Yossi Leybovich Signed-off-by: Gal Pressman Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/efa/efa_com.c | 44 +++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 21 deletions(-) commit 91b01061fef9c57d2f5b712a6322ef51061f4efd Author: Valentine Fatiev Date: Sun Jun 30 16:48:41 2019 +0300 IB/ipoib: Add child to parent list only if device initialized Despite failure in ipoib_dev_init() we continue with initialization flow and creation of child device. It causes to the situation where this child device is added too early to parent device list. Change the logic, so in case of failure we properly return error from ipoib_dev_init() and add child only in success path. Fixes: eaeb39842508 ("IB/ipoib: Move init code to ndo_init") Signed-off-by: Valentine Fatiev Reviewed-by: Feras Daoud Signed-off-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe drivers/infiniband/ulp/ipoib/ipoib_main.c | 34 ++++++++++++++++++------------- 1 file changed, 20 insertions(+), 14 deletions(-) commit 50ba3c18a4e549ba6a5a4672dfb3eb30fcb7d570 Author: Leon Romanovsky Date: Sun Jun 30 18:48:32 2019 +0300 RDMA/mlx5: Use proper allocation API to get zeroed memory There is no need in custom memory zeroing, because it can be done by using kzalloc from the beginning. Signed-off-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 0bddcff628db5f516b046019b31f2430e7a8eaba Author: Colin Ian King Date: Thu Jul 4 13:50:27 2019 +0100 RDMA/uverbs: remove redundant assignment to variable ret The variable ret is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe drivers/infiniband/core/uverbs_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9a601fc43ee0157a2575fe81beffe653c25edcd6 Author: Lijun Ou Date: Thu Jul 4 14:22:58 2019 +0800 RDMA/hns: Fix building modular hns The patch below wasn't fully tested for all combinations of module and configs, and causes a compile failure: WARNING: modpost: missing MODULE_LICENSE() in drivers/infiniband/hw/hns/hns_roce_ah.o see include/linux/module.h for more information WARNING: modpost: missing MODULE_LICENSE() in drivers/infiniband/hw/hns/hns_roce_alloc.o see include/linux/module.h for more information WARNING: modpost: missing MODULE_LICENSE() in drivers/infiniband/hw/hns/hns_roce_cmd.o see include/linux/module.h for more information WARNING: modpost: missing MODULE_LICENSE() in drivers/infiniband/hw/hns/hns_roce_cq.o see include/linux/module.h for more information WARNING: modpost: missing MODULE_LICENSE() in drivers/infiniband/hw/hns/hns_roce_db.o see include/linux/module.h for more information WARNING: modpost: missing MODULE_LICENSE() in drivers/infiniband/hw/hns/hns_roce_hem.o see include/linux/module.h for more information WARNING: modpost: missing MODULE_LICENSE() in drivers/infiniband/hw/hns/hns_roce_mr.o see include/linux/module.h for more information WARNING: modpost: missing MODULE_LICENSE() in drivers/infiniband/hw/hns/hns_roce_pd.o see include/linux/module.h for more information WARNING: modpost: missing MODULE_LICENSE() in drivers/infiniband/hw/hns/hns_roce_qp.o see include/linux/module.h for more information WARNING: modpost: missing MODULE_LICENSE() in drivers/infiniband/hw/hns/hns_roce_restrack.o see include/linux/module.h for more information WARNING: modpost: missing MODULE_LICENSE() in drivers/infiniband/hw/hns/hns_roce_srq.o see include/linux/module.h for more information ERROR: "hns_roce_bitmap_cleanup" [drivers/infiniband/hw/hns/hns_roce_srq.ko] undefined! ERROR: "hns_roce_bitmap_init" [drivers/infiniband/hw/hns/hns_roce_srq.ko] undefined! ERROR: "hns_roce_free_cmd_mailbox" [drivers/infiniband/hw/hns/hns_roce_srq.ko] undefined! ERROR: "hns_roce_alloc_cmd_mailbox" [drivers/infiniband/hw/hns/hns_roce_srq.ko] undefined! ERROR: "hns_roce_table_get" [drivers/infiniband/hw/hns/hns_roce_srq.ko] undefined! ERROR: "hns_roce_bitmap_alloc" [drivers/infiniband/hw/hns/hns_roce_srq.ko] undefined! ERROR: "hns_roce_table_find" [drivers/infiniband/hw/hns/hns_roce_srq.ko] undefined! The fix is to put the module sub components in the right line. Fixes: e9816ddf2a33 ("RDMA/hns: Cleanup unnecessary exported symbols") Reported-by: Stephen Rothwell Signed-off-by: Xi Wang Signed-off-by: Lijun Ou Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hns/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 26ac56506b0ea598bd0b52dcbd2d697282af98ed Merge: 106dbe24d414 924b5867e7bd Author: Mark Brown Date: Thu Jul 4 17:35:11 2019 +0100 Merge remote-tracking branch 'spi/topic/pump-rt' into spi-next commit 106dbe24d4146c0804cb025e450ac7af42d72356 Merge: 2337ff45293f 8cc7720470a1 Author: Mark Brown Date: Thu Jul 4 17:35:07 2019 +0100 Merge branch 'spi-5.3' into spi-next commit 2337ff45293f36efa79247b3680223b9c9154392 Merge: 6fbc7275c7a9 2b947137f2b8 Author: Mark Brown Date: Thu Jul 4 17:35:03 2019 +0100 Merge branch 'spi-5.2' into spi-linus commit 0ed4513c9a32a479b4dc41685be68edf1e99c139 Merge: 65244e5b1f4f d22b85a1b97d Author: Mark Brown Date: Thu Jul 4 17:34:34 2019 +0100 Merge remote-tracking branch 'regulator/topic/coupled' into regulator-next commit 65244e5b1f4fade54b490b47b871cefe1d7d07f0 Merge: f0386617dca6 3c7577d442a7 Author: Mark Brown Date: Thu Jul 4 17:34:32 2019 +0100 Merge branch 'regulator-5.3' into regulator-next commit f0386617dca6deaca241a01efb9a579d0d727e7f Merge: 6fbc7275c7a9 9d83dcb3e455 Author: Mark Brown Date: Thu Jul 4 17:34:30 2019 +0100 Merge branch 'regulator-5.2' into regulator-linus commit aaccf3863ce22108ae1d3bac82604eec9d8ae44c Merge: ea09b3e21f18 eff5a8500171 Author: Mark Brown Date: Thu Jul 4 17:33:59 2019 +0100 Merge branch 'regmap-5.3' into regmap-next commit ea09b3e21f18a5e190b26388c6c5f51e174d845f Merge: 6fbc7275c7a9 db057679de3e Author: Mark Brown Date: Thu Jul 4 17:33:56 2019 +0100 Merge branch 'regmap-5.2' into regmap-linus commit 3c7577d442a76c2015dd765497395fb394b78051 Author: Bartosz Golaszewski Date: Wed Jul 3 18:10:35 2019 +0200 regulator: max77650: use vsel_step Use the new vsel_step field in the regulator description to instruct the regulator API on the required voltage ramping. Switch to using the generic regmap helpers for voltage setting and remove the old set_voltage callback that handcoded the selector stepping. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20190703161035.31808-3-brgl@bgdev.pl Signed-off-by: Mark Brown drivers/regulator/max77650-regulator.c | 73 +++++----------------------------- 1 file changed, 9 insertions(+), 64 deletions(-) commit 2da8d9473e20a2f6645dcb0cea4848a2c1e83af9 Author: Bartosz Golaszewski Date: Wed Jul 3 18:10:34 2019 +0200 regulator: implement selector stepping Some regulators require that the requested voltage be reached gradually by setting all or some of the intermediate values. Implement a new field in the regulator description struct that allows users to specify the number of selectors by which the regulator API should step when ramping the voltage up/down. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20190703161035.31808-2-brgl@bgdev.pl Signed-off-by: Mark Brown drivers/regulator/core.c | 63 ++++++++++++++++++++++++++++++++++++++++ include/linux/regulator/driver.h | 6 ++++ 2 files changed, 69 insertions(+) commit 264bffad4d08f967ab3d6690bb15757a526b186a Author: Christophe Leroy Date: Fri Jun 14 10:16:25 2019 +0000 powerpc/boot: Add lzo support for uImage This patch allows to generate lzo compressed uImage Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman arch/powerpc/Kconfig | 1 + arch/powerpc/boot/Makefile | 2 ++ arch/powerpc/boot/wrapper | 5 ++++- 3 files changed, 7 insertions(+), 1 deletion(-) commit 1cc9a21b0bb36debdf96dbcc4b139d6639373018 Author: Christophe Leroy Date: Fri Jun 14 10:16:24 2019 +0000 powerpc/boot: Add lzma support for uImage This patch allows to generate lzma compressed uImage Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman arch/powerpc/Kconfig | 1 + arch/powerpc/boot/Makefile | 2 ++ arch/powerpc/boot/wrapper | 5 ++++- 3 files changed, 7 insertions(+), 1 deletion(-) commit fbded57c962e7c42c932e1a46c8d801441726662 Author: Christophe Leroy Date: Fri Jun 14 10:16:23 2019 +0000 powerpc/boot: don't force gzipped uImage This patch modifies the generation of uImage by handing over the selected compression type instead of forcing gzip Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman arch/powerpc/boot/wrapper | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 43db76f41824aea0a31f817e69ad304a95cf068a Author: Christophe Leroy Date: Fri Jun 14 06:41:47 2019 +0000 powerpc/8xx: Add microcode patch to move SMC parameter RAM. Some SCC functions like the QMC requires an extended parameter RAM. On modern 8xx (ie 866 and 885), SPI area can already be relocated, allowing the use of those functions on SCC2. But SCC3 and SCC4 parameter RAM collide with SMC1 and SMC2 parameter RAMs. This patch adds microcode to allow the relocation of both SMC1 and SMC2, and relocate them at offsets 0x1ec0 and 0x1fc0. Those offsets are by default for the CPM1 DSP1 and DSP2, but there is no kernel driver using them at the moment so this area can be reused. This microcode is provided by Freescale/NXP in Engineering Bulletin EB662 ("MPC8xx I2C/SPI and SMC Relocation Microcode Packages") dated 2006. The binary code is public. The source is not available. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman arch/powerpc/platforms/8xx/Kconfig | 7 +++ arch/powerpc/platforms/8xx/micropatch.c | 97 +++++++++++++++++++++++++++++++++ 2 files changed, 104 insertions(+) commit c3eec5d7da3f77c6e505b44241205ca0aff1df24 Author: Christophe Leroy Date: Fri Jun 14 06:41:46 2019 +0000 powerpc/8xx: Use IO accessors in microcode programming. Change microcode functions to use IO accessors and get rid of volatile attributes. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman arch/powerpc/platforms/8xx/micropatch.c | 34 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 18 deletions(-) commit 647d5ed0ae8a9942de8615f33790be7ac940056c Author: Christophe Leroy Date: Fri Jun 14 06:41:45 2019 +0000 powerpc/8xx: replace #ifdefs by IS_ENABLED() in microcode.c Reduce #ifdef mess by using IS_ENABLED() instead. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman arch/powerpc/platforms/8xx/micropatch.c | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) commit f5348c080e07bc7ce8f6a6c110bd2672f915c6b1 Author: Christophe Leroy Date: Fri Jun 14 06:41:44 2019 +0000 powerpc/8xx: refactor programming of microcode CPM params. The CPM registers RCCR and CPMCR1..4 registers has to be set in accordance with the microcode patch beeing programmed. Lets define them as part of the patch set and refactor their programming from that definition. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman arch/powerpc/platforms/8xx/micropatch.c | 45 ++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 18 deletions(-) commit 5cfd5d8943fc9eb48030a7904e82c6e7d2056027 Author: Christophe Leroy Date: Fri Jun 14 06:41:43 2019 +0000 powerpc/8xx: refactor printing of microcode patch name. Define patch name together with the patch code, and refactor the associated printk() while replacing it by a pr_info() Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman arch/powerpc/platforms/8xx/micropatch.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 11597ff20b6b3cf039577e46e53bf1a94dda3098 Author: Christophe Leroy Date: Fri Jun 14 06:41:42 2019 +0000 powerpc/8xx: Refactor microcode write Add empty microcode tables so that all tables are defined all the time. Regroup the writing of the 3 tables regardless of the selected microcode. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman arch/powerpc/platforms/8xx/micropatch.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 372fba9c76af11f1c7d162d22cff94e46f467bfb Author: Christophe Leroy Date: Fri Jun 14 06:41:41 2019 +0000 powerpc/8xx: refactor writing of CPM microcode arrays Create a function to refactor the writing of CPM microcode arrays. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman arch/powerpc/platforms/8xx/micropatch.c | 35 ++++++++++++--------------------- 1 file changed, 13 insertions(+), 22 deletions(-) commit 9fb7e639f6ad4a67296c897bf22110b0d38e42a4 Author: Christophe Leroy Date: Fri Jun 14 06:41:40 2019 +0000 powerpc/8xx: compact microcode arrays Compact obscure microcode arrays by putting 4 values per line in order to reduce number of lines in the file to increase readability. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman arch/powerpc/platforms/8xx/micropatch.c | 699 +++++++------------------------- 1 file changed, 140 insertions(+), 559 deletions(-) commit 4d6d9c6db51275cba0f447ee04218bdf03d41453 Author: Christophe Leroy Date: Fri Jun 14 06:41:39 2019 +0000 powerpc/8xx: drop verify_patch() verify_patch() has been opted out since many years, and the comment suggests it doesn't work. So drop it. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman arch/powerpc/platforms/8xx/micropatch.c | 40 --------------------------------- 1 file changed, 40 deletions(-) commit 4128a89ac80d3714babde5b2811ffd058b09c229 Author: Christophe Leroy Date: Fri Jun 14 06:41:38 2019 +0000 powerpc/8xx: move CPM1 related files from sysdev/ to platforms/8xx Only 8xx selects CPM1 and related CONFIG options are already in platforms/8xx/Kconfig Move the related C files to platforms/8xx/. Signed-off-by: Christophe Leroy [mpe: Minor formatting fixes] Signed-off-by: Michael Ellerman arch/powerpc/platforms/8xx/Makefile | 2 ++ arch/powerpc/{sysdev => platforms/8xx}/cpm1.c | 24 ++++++++++++---------- .../powerpc/{sysdev => platforms/8xx}/micropatch.c | 3 ++- arch/powerpc/sysdev/Makefile | 2 -- 4 files changed, 17 insertions(+), 14 deletions(-) commit 22e9c88d486a0536d337d6e0973968be0a4cd4b2 Author: Christophe Leroy Date: Tue May 14 09:05:16 2019 +0000 powerpc/64: reuse PPC32 static inline flush_dcache_range() This patch drops the assembly PPC64 version of flush_dcache_range() and re-uses the PPC32 static inline version. With GCC 8.1, the following code is generated: void flush_test(unsigned long start, unsigned long stop) { flush_dcache_range(start, stop); } 0000000000000130 <.flush_test>: 130: 3d 22 00 00 addis r9,r2,0 132: R_PPC64_TOC16_HA .data+0x8 134: 81 09 00 00 lwz r8,0(r9) 136: R_PPC64_TOC16_LO .data+0x8 138: 3d 22 00 00 addis r9,r2,0 13a: R_PPC64_TOC16_HA .data+0xc 13c: 80 e9 00 00 lwz r7,0(r9) 13e: R_PPC64_TOC16_LO .data+0xc 140: 7d 48 00 d0 neg r10,r8 144: 7d 43 18 38 and r3,r10,r3 148: 7c 00 04 ac hwsync 14c: 4c 00 01 2c isync 150: 39 28 ff ff addi r9,r8,-1 154: 7c 89 22 14 add r4,r9,r4 158: 7c 83 20 50 subf r4,r3,r4 15c: 7c 89 3c 37 srd. r9,r4,r7 160: 41 82 00 1c beq 17c <.flush_test+0x4c> 164: 7d 29 03 a6 mtctr r9 168: 60 00 00 00 nop 16c: 60 00 00 00 nop 170: 7c 00 18 ac dcbf 0,r3 174: 7c 63 42 14 add r3,r3,r8 178: 42 00 ff f8 bdnz 170 <.flush_test+0x40> 17c: 7c 00 04 ac hwsync 180: 4c 00 01 2c isync 184: 4e 80 00 20 blr 188: 60 00 00 00 nop 18c: 60 00 00 00 nop Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman arch/powerpc/include/asm/cache.h | 10 ++++++++++ arch/powerpc/include/asm/cacheflush.h | 14 ++++++++------ arch/powerpc/kernel/misc_64.S | 29 ----------------------------- 3 files changed, 18 insertions(+), 35 deletions(-) commit d98fc70fc139b72ae098d24fde42ad70c8ff2f81 Author: Christophe Leroy Date: Tue May 14 09:05:15 2019 +0000 powerpc/32: define helpers to get L1 cache sizes. This patch defines C helpers to retrieve the size of cache blocks and uses them in the cacheflush functions. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman arch/powerpc/include/asm/cache.h | 16 ++++++++++++++-- arch/powerpc/include/asm/cacheflush.h | 24 +++++++++++++++--------- 2 files changed, 29 insertions(+), 11 deletions(-) commit 1cfb725fb1899dc6fdc88f8b5354a65e8ad260c6 Author: Christophe Leroy Date: Tue May 14 09:05:13 2019 +0000 powerpc/64: flush_inval_dcache_range() becomes flush_dcache_range() On most arches having function flush_dcache_range(), including PPC32, this function does a writeback and invalidation of the cache bloc. On PPC64, flush_dcache_range() only does a writeback while flush_inval_dcache_range() does the invalidation in addition. In addition it looks like within arch/powerpc/, there are no PPC64 platforms using flush_dcache_range() This patch drops the existing 64 bits version of flush_dcache_range() and renames flush_inval_dcache_range() into flush_dcache_range(). Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman arch/powerpc/include/asm/cacheflush.h | 1 - arch/powerpc/kernel/misc_64.S | 27 ++------------------------- arch/powerpc/lib/pmem.c | 8 ++++---- arch/powerpc/mm/mem.c | 4 ++-- arch/powerpc/sysdev/dart_iommu.c | 2 +- drivers/macintosh/smu.c | 4 ++-- 6 files changed, 11 insertions(+), 35 deletions(-) commit 6c5875843b87c3adea2beade9d1b8b3d4523900a Author: Christophe Leroy Date: Fri May 10 09:24:48 2019 +0000 powerpc: slightly improve cache helpers Cache instructions (dcbz, dcbi, dcbf and dcbst) take two registers that are summed to obtain the target address. Using 'Z' constraint and '%y0' argument gives GCC the opportunity to use both registers instead of only one with the second being forced to 0. Suggested-by: Segher Boessenkool Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman arch/powerpc/include/asm/cache.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit d95c3885865b71e56d8d60c8617f2ce1f0fa079d Merge: 0bcfa628f8a3 5cd3f2e98cca 8dd8f005bdd4 9378bfeaafcb ceedd5f74d8c 29fcea8ce7f3 Author: Joerg Roedel Date: Thu Jul 4 17:26:48 2019 +0200 Merge branches 'x86/vt-d', 'x86/amd', 'arm/smmu', 'arm/omap', 'generic-dma-ops' and 'core' into next commit 28a32d2b1a6d7860e0b364c34a6b4205dce85537 Author: Josef Bacik Date: Wed Jun 19 15:12:01 2019 -0400 btrfs: move the subvolume reservation stuff out of extent-tree.c This is just two functions, put it in root-tree.c since it involves root items. Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 54 ------------------------------------------------ fs/btrfs/root-tree.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 54 deletions(-) commit 9378bfeaafcbbdf234daeee93db31a3f2c815513 Author: Greg Kroah-Hartman Date: Thu Jul 4 16:36:49 2019 +0200 iommu/omap: No need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Joerg Roedel Cc: iommu@lists.linux-foundation.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Joerg Roedel drivers/iommu/omap-iommu-debug.c | 35 ++++++----------------------------- 1 file changed, 6 insertions(+), 29 deletions(-) commit 867363429d706984915cb4b1f299ce05f8413e23 Author: Josef Bacik Date: Wed Jun 19 15:12:00 2019 -0400 btrfs: migrate the delalloc space stuff to it's own home We have code for data and metadata reservations for delalloc. There's quite a bit of code here, and it's used in a lot of places so I've separated it out to it's own file. inode.c and file.c are already pretty large, and this code is complicated enough to live in its own space. Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/Makefile | 2 +- fs/btrfs/ctree.h | 14 -- fs/btrfs/delalloc-space.c | 494 ++++++++++++++++++++++++++++++++++++++++++++ fs/btrfs/delalloc-space.h | 23 +++ fs/btrfs/extent-tree.c | 485 +------------------------------------------ fs/btrfs/file.c | 1 + fs/btrfs/free-space-cache.c | 1 + fs/btrfs/inode-map.c | 1 + fs/btrfs/inode.c | 1 + fs/btrfs/ioctl.c | 1 + fs/btrfs/ordered-data.c | 1 + fs/btrfs/relocation.c | 1 + 12 files changed, 526 insertions(+), 499 deletions(-) commit fb6dea26601b60e41d70c310537dd1e2617b25b6 Author: Josef Bacik Date: Wed Jun 19 15:11:59 2019 -0400 btrfs: migrate btrfs_trans_release_chunk_metadata Move this into transaction.c with the rest of the transaction related code. Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/ctree.h | 1 - fs/btrfs/extent-tree.c | 18 ------------------ fs/btrfs/transaction.c | 18 ++++++++++++++++++ fs/btrfs/transaction.h | 1 + 4 files changed, 19 insertions(+), 19 deletions(-) commit 6ef03debdb3d82d7deec65f96e143b9adcfb2cd4 Author: Josef Bacik Date: Wed Jun 19 15:11:58 2019 -0400 btrfs: migrate the delayed refs rsv code These belong with the delayed refs related code, not in extent-tree.c. Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/ctree.h | 9 --- fs/btrfs/delayed-ref.c | 174 +++++++++++++++++++++++++++++++++++++++++++++++++ fs/btrfs/delayed-ref.h | 10 +++ fs/btrfs/extent-tree.c | 174 ------------------------------------------------- 4 files changed, 184 insertions(+), 183 deletions(-) commit 9978059be8a1afd68bc0f7ab4c1883633ddd0312 Author: Goldwyn Rodrigues Date: Fri Jun 21 10:02:54 2019 -0500 btrfs: Evaluate io_tree in find_lock_delalloc_range() Simplification. No point passing the tree variable when it can be evaluated from inode. The tests now use the io_tree from btrfs_inode as opposed to creating one. Signed-off-by: Goldwyn Rodrigues Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent_io.c | 6 ++---- fs/btrfs/extent_io.h | 2 +- fs/btrfs/tests/extent-io-tests.c | 30 ++++++++++++++++-------------- 3 files changed, 19 insertions(+), 19 deletions(-) commit bb4cb25dd319fa5630cc304c5bfa926266736935 Author: Andreas Gruenbacher Date: Wed Jul 3 22:12:13 2019 +0200 gfs2: Remove unused gfs2_iomap_alloc argument Remove the unused flags argument of gfs2_iomap_alloc. Signed-off-by: Andreas Gruenbacher fs/gfs2/bmap.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit bf3cb394479210a9ebcf8fef7a7f8fcabc7b9928 Author: Darrick J. Wong Date: Wed Jul 3 20:36:29 2019 -0700 xfs: allow single bulkstat of special inodes Create a new bulk ireq flag that enables userspace to ask us for a special inode number instead of interpreting @ino as a literal inode number. This enables us to query the root inode easily. The reason for adding the ability to query specifically the root directory inode is that certain programs (xfsdump and xfsrestore) want to confirm when they've been pointed to the root directory. The userspace code assumes the root directory is always the first result from calling bulkstat with lastino == 0, but this isn't true if the (initial btree roots + initial AGFL + inode alignment padding) is itself long enough to be allocated to new inodes if all of those blocks should happen to be free at the same time. Rather than make userspace guess at internal filesystem state, we provide a direct query. Signed-off-by: Darrick J. Wong Reviewed-by: Allison Collins Reviewed-by: Brian Foster fs/xfs/libxfs/xfs_fs.h | 13 ++++++++++++- fs/xfs/xfs_ioctl.c | 19 +++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) commit 13d59a2a61cbbb4cda13a0cba6d4d1fc537f5dd4 Author: Darrick J. Wong Date: Wed Jul 3 20:36:28 2019 -0700 xfs: specify AG in bulk req Add a new xfs_bulk_ireq flag to constrain the iteration to a single AG. If the passed-in startino value is zero then we start with the first inode in the AG that the user passes in; otherwise, we iterate only within the same AG as the passed-in inode. Signed-off-by: Darrick J. Wong Reviewed-by: Allison Collins Reviewed-by: Brian Foster fs/xfs/libxfs/xfs_fs.h | 10 ++++++++-- fs/xfs/xfs_ioctl.c | 24 +++++++++++++++++++++++- fs/xfs/xfs_itable.c | 6 +++--- fs/xfs/xfs_itable.h | 4 ++++ fs/xfs/xfs_iwalk.c | 12 ++++++++++++ fs/xfs/xfs_iwalk.h | 22 +++++++++++++++++----- fs/xfs/xfs_qm.c | 3 ++- 7 files changed, 69 insertions(+), 12 deletions(-) commit ac25ba68fa4001c85395f0488b1c7a2421c5aada Author: Aneesh Kumar K.V Date: Tue May 28 11:06:26 2019 +0530 powerpc/mm/hugetlb: Don't enable HugeTLB if we don't have a page table cache This makes sure we don't enable HugeTLB if the cache is not configured. I am still not sure about this. IMHO hugetlb support should be a hardware support derivative and any cache allocation failure should be handled as I did in the earlier patch. But then if we were not able to create hugetlb page table cache, we can as well declare hugetlb support disabled thereby avoiding calling into allocation routines. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/mm/hugetlbpage.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 5d49275a27310233964fc3edc8dd097a094ce338 Author: Aneesh Kumar K.V Date: Tue May 28 11:06:25 2019 +0530 powerpc/mm/hugetlb: Fix kernel crash if we fail to allocate page table caches We only check for hugetlb allocations, because with hugetlb we do conditional registration. For PGD/PUD/PMD levels we register them always in pgtable_cache_init. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/mm/hugetlbpage.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 2230ebf6e6dd0b7751e2921b40f6cfe34f09bb16 Author: Aneesh Kumar K.V Date: Tue May 28 11:06:24 2019 +0530 powerpc/mm: Handle page table allocation failures This fixes kernel crash that arises due to not handling page table allocation failures while allocating hugetlb page table. Fixes: e2b3d202d1db ("powerpc: Switch 16GB and 16MB explicit hugepages to a different page table format") Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/mm/hugetlbpage.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 57caddae6ef43531a9f09a7f123c670db0789dad Author: Aneesh Kumar K.V Date: Tue May 14 11:33:02 2019 +0530 powerpc/mm: Remove radix dependency on HugeTLB page Now that we have switched the page table walk to use pmd_is_leaf we can now revert commit 8adddf349fda ("powerpc/mm/radix: Make Radix require HUGETLB_PAGE") Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/platforms/Kconfig.cputype | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1ecf2cdc74fc7f79b4b45dd34f89c4a8e6ada96f Author: Aneesh Kumar K.V Date: Tue May 14 11:33:01 2019 +0530 powerpc/mm: pmd_devmap implies pmd_large(). large devmap usage is dependent on THP. Hence once check is sufficient. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/mm/book3s64/pgtable.c | 2 +- arch/powerpc/mm/pgtable_64.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit d6eacedd1f0ebf00bdf1c77715d194f7c1036fd4 Author: Aneesh Kumar K.V Date: Tue May 14 11:33:00 2019 +0530 powerpc/book3s: Use config independent helpers for page table walk Even when we have HugeTLB and THP disabled, kernel linear map can still be mapped with hugepages. This is only an issue with radix translation because hash MMU doesn't map kernel linear range in linux page table and other kernel map areas are not mapped using hugepage. Add config independent helpers and put WARN_ON() when we don't expect things to be mapped via hugepages. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/pgtable.h | 21 +++++++++++++++++++++ arch/powerpc/include/asm/pgtable.h | 24 ++++++++++++++++++++++++ arch/powerpc/include/asm/pte-walk.h | 28 ++++++++++++++++++++++++++-- arch/powerpc/kvm/book3s_64_mmu_radix.c | 12 +++--------- arch/powerpc/mm/book3s64/radix_pgtable.c | 10 +++++----- arch/powerpc/mm/pgtable.c | 16 ++++++++-------- arch/powerpc/mm/pgtable_64.c | 12 +++++++++--- arch/powerpc/mm/ptdump/ptdump.c | 6 +++--- arch/powerpc/xmon/xmon.c | 6 +++--- 9 files changed, 102 insertions(+), 33 deletions(-) commit 259a948c4ba1829ae4a3c31bb6e40ad458a21254 Author: Aneesh Kumar K.V Date: Fri Jun 7 12:17:05 2019 +0530 powerpc/pseries/scm: Use a specific endian format for storing uuid from the device tree We used uuid_parse to convert uuid string from device tree to two u64 components. We want to make sure we look at the uuid read from device tree in an endian-neutral fashion. For now, I am picking little-endian to be format so that we don't end up doing an additional conversion. The reason to store in a specific endian format is to enable reading the namespace created with a little-endian kernel config on a big-endian kernel. We do store the device tree uuid string as a 64-bit little-endian cookie in the label area. When booting the kernel we also compare this cookie against what is read from the device tree. For this, to work we have to store and compare these values in a CPU endian config independent fashion. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/platforms/pseries/papr_scm.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 53e80bd042773c8ddeed856bd1b68ca74c3b8b46 Author: Aneesh Kumar K.V Date: Fri Jun 7 12:15:11 2019 +0530 powerpc/nvdimm: Add support for multibyte read/write for metadata SCM_READ/WRITE_MEATADATA hcall supports multibyte read/write. This patch updates the metadata read/write to use 1, 2, 4 or 8 byte read/write as mentioned in PAPR document. READ/WRITE_METADATA hcall supports the 1, 2, 4, or 8 bytes read/write. For other values hcall results H_P3. Hypervisor stores the metadata contents in big-endian format and in-order to enable read/write in different granularity, we need to switch the contents to big-endian before calling HCALL. Based on an patch from Oliver O'Halloran Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/platforms/pseries/papr_scm.c | 104 +++++++++++++++++++++++------- 1 file changed, 82 insertions(+), 22 deletions(-) commit 2a0ffbd4789b25cd5a80bfd8f3d28fb629eae1a7 Author: Aneesh Kumar K.V Date: Fri Jun 7 12:14:07 2019 +0530 powerpc/pseries/scm: Mark the region volatile if cache flush not required The device tree node is documented as below: “ibm,cache-flush-required”: property name indicates Cache Flush Required for this Persistent Memory Segment to persist memory prop-encoded-array: None, this is a name only property. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/platforms/pseries/papr_scm.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit c0b1b23b9c87569d5f90d06e86f26b31b544fa1e Author: Aneesh Kumar K.V Date: Mon Jul 1 20:03:38 2019 +0530 powerpc/mm/nvdimm: Add an informative message if we fail to allocate altmap block Allocation from altmap area can fail based on vmemmap page size used. Add kernel info message to indicate the failure. That allows the user to identify whether they are really using persistent memory reserved space for per-page metadata. The message looks like: [ 136.587212] altmap block allocation failed, falling back to system memory Signed-off-by: Aneesh Kumar K.V Reviewed-by: Oliver O'Halloran Signed-off-by: Michael Ellerman arch/powerpc/mm/init_64.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 495c2ff4c88108d1f7730dd0966d4f8b03f0046e Author: Aneesh Kumar K.V Date: Mon Jul 1 20:06:26 2019 +0530 powerpc/mm: Consolidate numa_enable check and min_common_depth check If we fail to parse min_common_depth from device tree we boot with numa disabled. Reflect the same by updating numa_enabled variable to false. Also, switch all min_common_depth failure check to if (!numa_enabled) check. This helps us to avoid checking for both in different code paths. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/mm/numa.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit f52741c410cfb76582df21f02e4c062ee732b882 Author: Aneesh Kumar K.V Date: Mon Jul 1 20:06:25 2019 +0530 powerpc/mm: Fix node look up with numa=off boot If we boot with numa=off, we need to make sure we return NUMA_NO_NODE when looking up associativity details of resources. Without this, we hit crash like below BUG: Unable to handle kernel data access at 0x40000000008 Faulting instruction address: 0xc000000008f31704 cpu 0x1b: Vector: 380 (Data SLB Access) at [c00000000b9bb320] pc: c000000008f31704: _raw_spin_lock+0x14/0x100 lr: c0000000083f41fc: ____cache_alloc_node+0x5c/0x290 sp: c00000000b9bb5b0 msr: 800000010280b033 dar: 40000000008 current = 0xc00000000b9a2700 paca = 0xc00000000a740c00 irqmask: 0x03 irq_happened: 0x01 pid = 1, comm = swapper/27 Linux version 5.2.0-rc4-00925-g74e188c620b1 (root@linux-d8ip) (gcc version 7.4.1 20190424 [gcc-7-branch revision 270538] (SUSE Linux)) #34 SMP Sat Jun 29 00:41:02 EDT 2019 enter ? for help [link register ] c0000000083f41fc ____cache_alloc_node+0x5c/0x290 [c00000000b9bb5b0] 0000000000000dc0 (unreliable) [c00000000b9bb5f0] c0000000083f48c8 kmem_cache_alloc_node_trace+0x138/0x360 [c00000000b9bb670] c000000008aa789c devres_alloc_node+0x4c/0xa0 [c00000000b9bb6a0] c000000008337218 devm_memremap+0x58/0x130 [c00000000b9bb6f0] c000000008aed00c devm_nsio_enable+0xdc/0x170 [c00000000b9bb780] c000000008af3b6c nd_pmem_probe+0x4c/0x180 [c00000000b9bb7b0] c000000008ad84cc nvdimm_bus_probe+0xac/0x260 [c00000000b9bb840] c000000008aa0628 really_probe+0x148/0x500 [c00000000b9bb8d0] c000000008aa0d7c driver_probe_device+0x19c/0x1d0 [c00000000b9bb950] c000000008aa11bc device_driver_attach+0xcc/0x100 [c00000000b9bb990] c000000008aa12ec __driver_attach+0xfc/0x1e0 [c00000000b9bba10] c000000008a9d0a4 bus_for_each_dev+0xb4/0x130 [c00000000b9bba70] c000000008a9fc04 driver_attach+0x34/0x50 [c00000000b9bba90] c000000008a9f118 bus_add_driver+0x1d8/0x300 [c00000000b9bbb20] c000000008aa2358 driver_register+0x98/0x1a0 [c00000000b9bbb90] c000000008ad7e6c __nd_driver_register+0x5c/0x100 [c00000000b9bbbf0] c0000000093efbac nd_pmem_driver_init+0x34/0x48 [c00000000b9bbc10] c0000000080106c0 do_one_initcall+0x60/0x2d0 [c00000000b9bbce0] c00000000938463c kernel_init_freeable+0x384/0x48c [c00000000b9bbdb0] c000000008010a5c kernel_init+0x2c/0x160 [c00000000b9bbe20] c00000000800ba54 ret_from_kernel_thread+0x5c/0x68 Reported-and-debugged-by: Vaibhav Jain Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/mm/numa.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ea9f5b702fe0215188fba2eda117419e4ae90a67 Author: Aneesh Kumar K.V Date: Mon Jul 1 20:06:24 2019 +0530 powerpc/mm/drconf: Use NUMA_NO_NODE on failures instead of node 0 If we fail to parse the associativity array we should default to NUMA_NO_NODE instead of NODE 0. Rest of the code fallback to the right default if we find the numa node value NUMA_NO_NODE. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/mm/numa.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 89a3496e0664577043666791ec07fb731d57c950 Author: Aneesh Kumar K.V Date: Mon Jul 1 20:04:42 2019 +0530 powerpc/mm/radix: Use the right page size for vmemmap mapping We use mmu_vmemmap_psize to find the page size for mapping the vmmemap area. With radix translation, we are suboptimally setting this value to PAGE_SIZE. We do check for 2M page size support and update mmu_vmemap_psize to use hugepage size but we suboptimally reset the value to PAGE_SIZE in radix__early_init_mmu(). This resulted in always mapping vmemmap area with 64K page size. Fixes: 2bfd65e45e87 ("powerpc/mm/radix: Add radix callbacks for early init routines") Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/mm/book3s64/radix_pgtable.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 78c949888549a6318ae420802703408caae999f5 Author: Aneesh Kumar K.V Date: Mon Jul 1 20:04:41 2019 +0530 powerpc/mm/hash/4k: Don't use 64K page size for vmemmap with 4K pagesize With hash translation and 4K PAGE_SIZE config, we need to make sure we don't use 64K page size for vmemmap. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/mm/book3s64/hash_utils.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit b8c8a524ccad1244916a203ae40292e2786e1b26 Author: Aneesh Kumar K.V Date: Mon Jul 1 20:07:00 2019 +0530 powerpc/mm: Remove unused variable declaration Since commit 0034d395f89d ("powerpc/mm/hash64: Map all the kernel regions in the same 0xc range") __kernel_virt_size is not used anymore. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/pgtable.h | 1 - 1 file changed, 1 deletion(-) commit 8c0993621c3e5fa52e5425ef2a0f67a0cde07092 Merge: d9deea28a896 b108ad53bb65 Author: Olof Johansson Date: Thu Jul 4 07:05:21 2019 -0700 Merge tag 'reset-for-v5.3' of git://git.pengutronix.de/git/pza/linux into arm/drivers Reset controller changes for v5.3 This tag adds support for the Bitmain BM1880 reset controller to the reset-simple driver and fixes a spelling mistake in the i.MX7 reset controller binding document. * tag 'reset-for-v5.3' of git://git.pengutronix.de/git/pza/linux: dt-bindings: reset: imx7: Fix the spelling of 'indices' reset: Add reset controller support for BM1880 SoC dt-bindings: reset: Add devicetree binding for BM1880 reset controller Link: https://lore.kernel.org/r/1562236632.6641.14.camel@pengutronix.de Signed-off-by: Olof Johansson commit d9deea28a896e01f6593b8a5c18ccff530620cb2 Merge: b27aca2e555f a71dcd3757e2 Author: Olof Johansson Date: Thu Jul 4 07:04:13 2019 -0700 Merge tag 'reset-fixes-for-v5.2' of git://git.pengutronix.de/git/pza/linux into arm/drivers Reset controller fix for v5.2 This tag removes a redundant device pointer NULL check from __reset_control_get_from_lookup to fix a static code checker warning. * tag 'reset-fixes-for-v5.2' of git://git.pengutronix.de/git/pza/linux: reset: remove redundant null check on pointer dev Link: https://lore.kernel.org/r/1562236626.6641.13.camel@pengutronix.de Signed-off-by: Olof Johansson commit 4471e44f972fb240601dcb1e1ae050faf316f46d Merge: 5ded680cf12f 0bb9d1876c06 Author: Olof Johansson Date: Thu Jul 4 07:02:29 2019 -0700 Merge tag 'sunxi-dt64-for-5.3-round-2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/dt Allwinner DT64 Changes for 5.3 - Round 2 One extra change wiring up the interrupt line for the external RTC chip on the Pine H64. * tag 'sunxi-dt64-for-5.3-round-2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: arm64: dts: allwinner: h6: Pine H64: Add interrupt line for RTC Link: https://lore.kernel.org/r/20190704065326.GA19010@wens.csie.org Signed-off-by: Olof Johansson commit 35a4ed0164e992c9c7b82eb1370081a292131904 Author: Fugang Duan Date: Thu Jul 4 21:40:07 2019 +0800 tty: serial: fsl_lpuart: add imx8qxp support The lpuart of imx8ulp is basically the same as imx7ulp, but it has new feature support based on imx7ulp, like it can assert a DMA request on EOP(end-of-packet). imx8ulp lpuart use two clocks, one is ipg bus clock that is used to access registers, the other is baud clock that is used to transmit-receive data. Signed-off-by: Fugang Duan Link: https://lore.kernel.org/r/20190704134007.2316-1-fugang.duan@nxp.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/fsl_lpuart.c | 106 ++++++++++++++++++++++++++++++++-------- 1 file changed, 86 insertions(+), 20 deletions(-) commit 335399362a6edeec5a365ed0fbb0b6902cacc4e4 Author: Colin Ian King Date: Thu Jul 4 13:44:25 2019 +0100 ALSA: hda/ca0132 - remove redundant assignment to variable 'changed' The variable 'changed' is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Takashi Iwai sound/pci/hda/patch_ca0132.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d07a9a4f66e944fcc900812cbc2f6817bde6a43d Author: Kailang Yang Date: Thu Jul 4 16:02:10 2019 +0800 ALSA: hda/realtek - Headphone Mic can't record after S3 Dell headset mode platform with ALC236. It doesn't recording after system resume from S3. S3 mode was deep. s2idle was not has this issue. S3 deep will cut of codec power. So, the register will back to default after resume back. This patch will solve this issue. Signed-off-by: Kailang Yang Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2438ac954bf506d4d7ad398f733103d7c9adbbfd Author: Naveen N. Rao Date: Wed Jul 3 22:34:02 2019 +0530 powerpc/pseries: Add documentation for vcpudispatch_stats Add a document describing the fields provided by /proc/powerpc/vcpudispatch_stats. Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman Documentation/powerpc/vcpudispatch_stats.txt | 68 ++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) commit 18a593c8b5426f6a08bcb353636d761a83f78d9e Author: Naveen N. Rao Date: Wed Jul 3 22:34:01 2019 +0530 powerpc/pseries: Protect against hogging the cpu while setting up the stats When enabling or disabling the vcpu dispatch statistics, we do a lot of work including allocating/deallocating memory across all possible cpus for the DTL buffer. In order to guard against hogging the cpu for too long, track the time we're taking and yield the processor if necessary. Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/include/asm/lppaca.h | 2 +- arch/powerpc/platforms/pseries/lpar.c | 29 ++++++++++++++++++++--------- arch/powerpc/platforms/pseries/setup.c | 2 +- 3 files changed, 22 insertions(+), 11 deletions(-) commit d62c8deeb6e69cd7815c21171a218301822e4a06 Author: Naveen N. Rao Date: Wed Jul 3 22:34:00 2019 +0530 powerpc/pseries: Provide vcpu dispatch statistics For Shared Processor LPARs, the POWER Hypervisor maintains a relatively static mapping of the LPAR processors (vcpus) to physical processor chips (representing the "home" node) and tries to always dispatch vcpus on their associated physical processor chip. However, under certain scenarios, vcpus may be dispatched on a different processor chip (away from its home node). The actual physical processor number on which a certain vcpu is dispatched is available to the guest in the 'processor_id' field of each DTL entry. The guest can discover the home node of each vcpu through the H_HOME_NODE_ASSOCIATIVITY(flags=1) hcall. The guest can also discover the associativity of physical processors, as represented in the DTL entry, through the H_HOME_NODE_ASSOCIATIVITY(flags=2) hcall. These can then be compared to determine if the vcpu was dispatched on its home node or not. If the vcpu was not dispatched on the home node, it is possible to determine if the vcpu was dispatched in a different chip, socket or drawer. Introduce a procfs file /proc/powerpc/vcpudispatch_stats that can be used to obtain these statistics. Writing '1' to this file enables collecting the statistics, while writing '0' disables the statistics. The statistics themselves are available by reading the procfs file. By default, the DTLB log for each vcpu is processed 50 times a second so as not to miss any entries. This processing frequency can be changed through /proc/powerpc/vcpudispatch_stats_freq. Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/include/asm/topology.h | 6 + arch/powerpc/mm/numa.c | 16 ++ arch/powerpc/platforms/pseries/lpar.c | 525 +++++++++++++++++++++++++++++++++- 3 files changed, 545 insertions(+), 2 deletions(-) commit 5a1ea4774ddc2c6bc3ba1415880091eccf1a901e Author: Naveen N. Rao Date: Wed Jul 3 22:33:59 2019 +0530 powerpc/pseries: Move mm/book3s64/vphn.c under platforms/pseries/ hcall_vphn() is specific to pseries and will be used in a subsequent patch. So, move it to a more appropriate place under arch/powerpc/platforms/pseries. Also merge vphn.h into lppaca.h and update vphn selftest to use the new files. Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/include/asm/lppaca.h | 24 ++++++++++++++++++++++ arch/powerpc/mm/book3s64/Makefile | 1 - arch/powerpc/mm/book3s64/vphn.h | 24 ---------------------- arch/powerpc/mm/numa.c | 14 ------------- arch/powerpc/platforms/pseries/Makefile | 1 + .../{mm/book3s64 => platforms/pseries}/vphn.c | 20 ++++++++++++++++-- tools/testing/selftests/powerpc/vphn/Makefile | 2 +- tools/testing/selftests/powerpc/vphn/asm/lppaca.h | 1 + tools/testing/selftests/powerpc/vphn/vphn.c | 2 +- tools/testing/selftests/powerpc/vphn/vphn.h | 1 - 10 files changed, 46 insertions(+), 44 deletions(-) commit ef34e0efa22a867f8db16feb79fba9964cfbe253 Author: Naveen N. Rao Date: Wed Jul 3 22:33:58 2019 +0530 powerpc/pseries: Generalize hcall_vphn() H_HOME_NODE_ASSOCIATIVITY hcall can take two different flags and return different associativity information in each case. Generalize the existing hcall_vphn() function to take flags as an argument and to return the result. Update the only existing user to pass the proper arguments. Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/mm/book3s64/vphn.h | 8 ++++++++ arch/powerpc/mm/numa.c | 27 +++++++++++++-------------- 2 files changed, 21 insertions(+), 14 deletions(-) commit 06220d78f24a20549757be1014e57c382406cc92 Author: Naveen N. Rao Date: Wed Jul 3 22:33:57 2019 +0530 powerpc/pseries: Introduce rwlock to gatekeep DTLB usage Since we would be introducing a new user of the DTL buffer in a subsequent patch, we need a way to gatekeep use of the DTL buffer. The current debugfs interface for DTL allows registering and opening cpu-specific DTL buffers. Cpu specific files are exposed under debugfs 'powerpc/dtl/' node, and changing 'dtl_event_mask' in the same directory enables controlling the event mask used when registering DTL buffer for a particular cpu. Subsequently, we will be introducing a user of the DTL buffers that registers access to the DTL buffers across all cpus with the same event mask. To ensure these two users do not step on each other, we introduce a rwlock to gatekeep DTL buffer access. This fits the requirement of the current debugfs interface wanting to allow multiple independent cpu-specific users (read lock), and the subsequent user wanting exclusive access (write lock). Suggested-by: Michael Ellerman Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/include/asm/lppaca.h | 2 ++ arch/powerpc/platforms/pseries/dtl.c | 11 ++++++++++- arch/powerpc/platforms/pseries/lpar.c | 4 ++++ 3 files changed, 16 insertions(+), 1 deletion(-) commit 1c85a2a1945cbafcd2e7cebc6e23d0e206aeda3d Author: Naveen N. Rao Date: Wed Jul 3 22:33:56 2019 +0530 powerpc/pseries: Factor out DTL buffer allocation and registration routines Introduce new helpers for DTL buffer allocation and registration and have the existing code use those. Signed-off-by: Naveen N. Rao [mpe: Don't split error messages across lines, for grepability] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/lppaca.h | 3 ++ arch/powerpc/platforms/pseries/lpar.c | 67 +++++++++++++++++++++++++--------- arch/powerpc/platforms/pseries/setup.c | 34 +---------------- 3 files changed, 54 insertions(+), 50 deletions(-) commit 5b3306f084590b298c1fe1b02aca5bac1abbbc34 Author: Naveen N. Rao Date: Wed Jul 3 22:33:55 2019 +0530 powerpc/pseries: Do not save the previous DTL mask value When CONFIG_VIRT_CPU_ACCOUNTING_NATIVE is enabled, we always initialize DTL enable mask to DTL_LOG_PREEMPT (0x2). There are no other places where the mask is changed. As such, when reading the DTL log buffer through debugfs, there is no need to save and restore the previous mask value. We don't need to save and restore the earlier mask value if CONFIG_VIRT_CPU_ACCOUNTING_NATIVE is not enabled. So, remove the field from the structure as well. Acked-by: Nathan Lynch Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/platforms/pseries/dtl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 515bbc8ab488e4bc16fe26df097502c04d3649d4 Author: Naveen N. Rao Date: Wed Jul 3 22:33:54 2019 +0530 powerpc/pseries: Use macros for referring to the DTL enable mask Introduce macros to encode the DTL enable mask fields and use those instead of hardcoding numbers. Acked-by: Nathan Lynch Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/include/asm/lppaca.h | 11 +++++++++++ arch/powerpc/platforms/pseries/dtl.c | 8 +------- arch/powerpc/platforms/pseries/lpar.c | 2 +- arch/powerpc/platforms/pseries/setup.c | 2 +- 4 files changed, 14 insertions(+), 9 deletions(-) commit eff5a850017193ae879948944be05cc814c29621 Author: YueHaibing Date: Thu Jul 4 17:35:53 2019 +0800 regmap: select CONFIG_REGMAP while REGMAP_SCCB is set REGMAP_SCCB is selected by ov772x and ov9650 drivers, but CONFIG_REGMAP may not, so building will fails: rivers/media/i2c/ov772x.c: In function ov772x_probe: drivers/media/i2c/ov772x.c:1360:22: error: variable ov772x_regmap_config has initializer but incomplete type static const struct regmap_config ov772x_regmap_config = { ^~~~~~~~~~~~~ drivers/media/i2c/ov772x.c:1361:4: error: const struct regmap_config has no member named reg_bits Reported-by: Hulk Robot Fixes: 5bbf32217bf9 ("media: ov772x: use SCCB regmap") Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20190704093553.49904-1-yuehaibing@huawei.com Signed-off-by: Mark Brown drivers/base/regmap/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1bcc1fd64e4dd903f4d868a9e053986e3b102713 Author: Wen Yang Date: Thu Jul 4 16:38:50 2019 +0800 ASoC: audio-graph-card: fix use-after-free in graph_for_each_link After calling of_node_put() on the codec_ep and codec_port variables, they are still being used, which may result in use-after-free. We fix this issue by calling of_node_put() after the last usage. Fixes: fce9b90c1ab7 ("ASoC: audio-graph-card: cleanup DAI link loop method - step2") Signed-off-by: Wen Yang Cc: Liam Girdwood Cc: Mark Brown Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: Kuninori Morimoto Cc: alsa-devel@alsa-project.org Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/1562229530-8121-1-git-send-email-wen.yang99@zte.com.cn Signed-off-by: Mark Brown sound/soc/generic/audio-graph-card.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6ae3483d411638e471ca0498629b17939f1c20f4 Author: Sebastian Ott Date: Thu Jun 27 15:47:13 2019 +0200 s390/pci: correctly handle MIO opt-out Do not issue CLP_SET_ENABLE_MIO after opting out of MIO instruction usage. This should not fix a bug but reduce overhead within firmware. Signed-off-by: Sebastian Ott Signed-off-by: Vasily Gorbik arch/s390/pci/pci_clp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c7ff0e918a7cb39f6bfb2a7bdc30199986ff1571 Author: Sebastian Ott Date: Thu Jun 27 15:13:05 2019 +0200 s390/pci: deal with devices that have no support for MIO instructions Unfortunately we have to handle a class of devices that don't support the new MIO instructions. Adjust resource assignment and mapping accordingly. Signed-off-by: Sebastian Ott Signed-off-by: Vasily Gorbik arch/s390/include/asm/pci.h | 5 +++++ arch/s390/pci/pci.c | 15 ++++++++------- 2 files changed, 13 insertions(+), 7 deletions(-) commit 214cc39d175c89cafa5acfe4df22502e8d86c506 Author: Greg Kroah-Hartman Date: Thu Jul 4 13:05:59 2019 +0200 Revert "usb: gadget: storage: Remove warning message" This reverts commit e70b3f5da00119e057b7faa557753fee7f786f17. EJ writes: Thinh found this patch might cause a failure in USB CV TD 9.13 Set Configuration Test. We are trying to fix it. Could you please defer the merging of this patch until we fix it? So am now dropping it. Reported-by: EJ Hsu Cc: Alan Stern Cc: Felipe Balbi Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/function/f_mass_storage.c | 21 ++++++--------------- drivers/usb/gadget/function/storage_common.h | 1 - 2 files changed, 6 insertions(+), 16 deletions(-) commit 31afa05bf90ea5561307be83893c670555bd736d Author: Satheesh Rajendran Date: Tue Jul 2 21:17:45 2019 +0530 powerpc: Enable CONFIG_IPV6 in ppc64_defconfig Enable CONFIG_IPV6 in ppc64_defconfig to enable certain network functionalities required for tests. Signed-off-by: Michael Ellerman Signed-off-by: Satheesh Rajendran Signed-off-by: Michael Ellerman arch/powerpc/configs/ppc64_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 65d71f0095f611eb090bb9c1cca086a8967936e5 Author: Greg Kroah-Hartman Date: Thu Jul 4 13:02:18 2019 +0200 Revert "dt-bindings: add binding for USBSS-DRD controller." This reverts commit e8a8b40cc8922b38f91c6562d525f21f312f235c. It's broken. Reported-by: Stephen Rothwell Cc: Felipe Balbi Cc: Pawel Laszczak Signed-off-by: Greg Kroah-Hartman .../devicetree/bindings/usb/cdns-usb3.txt | 45 ---------------------- 1 file changed, 45 deletions(-) commit 332694f8a4f7e49b8b7278734d0ce331f954b20e Author: Greg Kroah-Hartman Date: Thu Jul 4 13:02:09 2019 +0200 Revert "usb:gadget Separated decoding functions from dwc3 driver." This reverts commit 3db1b636c07e15ff7410db782832dc2e7ffd2bce. It's broken. Reported-by: Stephen Rothwell Cc: Felipe Balbi Cc: Pawel Laszczak Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc3/debug.h | 252 +++++++++++++++++++++++++++++++++++++++++ drivers/usb/dwc3/trace.h | 2 +- drivers/usb/gadget/Makefile | 1 - drivers/usb/gadget/debug.c | 268 -------------------------------------------- include/linux/usb/gadget.h | 26 ----- 5 files changed, 253 insertions(+), 296 deletions(-) commit 8265fb7c2559a4d245fed095b6af97bd8629d233 Author: Greg Kroah-Hartman Date: Thu Jul 4 13:02:00 2019 +0200 Revert "usb:gadget Patch simplify usb_decode_set_clear_feature function." This reverts commit ca888ce7495e4e1578c86c37b0c82f6709da477c. It's broken. Reported-by: Stephen Rothwell Cc: Felipe Balbi Cc: Pawel Laszczak Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/debug.c | 89 ++++++++++++++++++++++++---------------------- 1 file changed, 46 insertions(+), 43 deletions(-) commit 40abbef1c9af849fcdd23a7061b3f9a29067067b Author: Greg Kroah-Hartman Date: Thu Jul 4 13:01:48 2019 +0200 Revert "usb:gadget Simplify usb_decode_get_set_descriptor function." This reverts commit c2af6b07803ebd099950cd608f404a7bff9037b2. It's broken. Reported-by: Stephen Rothwell Cc: Felipe Balbi Cc: Pawel Laszczak Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/debug.c | 113 ++++++++++++++++++++++----------------------- 1 file changed, 55 insertions(+), 58 deletions(-) commit de4ad1b157eb4b72aada89a18ec9864e8f711754 Author: Greg Kroah-Hartman Date: Thu Jul 4 13:01:33 2019 +0200 Revert "usb:cdns3 Add Cadence USB3 DRD Driver" This reverts commit 8bc1901ca7b07d864fca11461b3875b31f949765. It's broken. Reported-by: Stephen Rothwell Cc: Felipe Balbi Cc: Pawel Laszczak Signed-off-by: Greg Kroah-Hartman drivers/usb/Kconfig | 2 - drivers/usb/Makefile | 2 - drivers/usb/cdns3/Kconfig | 44 - drivers/usb/cdns3/Makefile | 14 - drivers/usb/cdns3/cdns3-pci-wrap.c | 157 --- drivers/usb/cdns3/core.c | 543 --------- drivers/usb/cdns3/core.h | 121 -- drivers/usb/cdns3/debug.h | 173 --- drivers/usb/cdns3/debugfs.c | 153 --- drivers/usb/cdns3/drd.c | 379 ------ drivers/usb/cdns3/drd.h | 166 --- drivers/usb/cdns3/ep0.c | 920 -------------- drivers/usb/cdns3/gadget-export.h | 28 - drivers/usb/cdns3/gadget.c | 2319 ------------------------------------ drivers/usb/cdns3/gadget.h | 1321 -------------------- drivers/usb/cdns3/host-export.h | 28 - drivers/usb/cdns3/host.c | 76 -- drivers/usb/cdns3/trace.c | 23 - drivers/usb/cdns3/trace.h | 447 ------- 19 files changed, 6916 deletions(-) commit bff2a75bd77f668e538fbdf0558b1114933fbf87 Author: Greg Kroah-Hartman Date: Thu Jul 4 13:00:50 2019 +0200 Revert "usb:cdns3 Fix for stuck packets in on-chip OUT buffer." This reverts commit 573aff747ee350a0541c3a24cacd92a286fb9522. It's broken. Reported-by: Stephen Rothwell Cc: Felipe Balbi Cc: Pawel Laszczak Signed-off-by: Greg Kroah-Hartman drivers/usb/cdns3/gadget.c | 330 +-------------------------------------------- drivers/usb/cdns3/gadget.h | 13 -- 2 files changed, 2 insertions(+), 341 deletions(-) commit 4ca96aa99f3e1e530f63559c0cc63ae186ecd677 Author: Geert Uytterhoeven Date: Mon Jul 1 16:00:09 2019 +0200 lib/vsprintf: Reinstate printing of legacy clock IDs When using the legacy clock framework, clock pointers are no longer printed as IDs, as the !CONFIG_COMMON_CLK case was accidentally considered an error case. Fix this by reverting to the old behavior, which allows to distinguish clocks by ID, as the legacy clock framework does not store names with clocks. Fixes: 0b74d4d763fd4ee9 ("vsprintf: Consolidate handling of unknown pointer specifiers") Link: http://lkml.kernel.org/r/20190701140009.23683-1-geert+renesas@glider.be Cc: Sergey Senozhatsky Cc: Andy Shevchenko Cc: linux-kernel@vger.kernel.org Signed-off-by: Geert Uytterhoeven Signed-off-by: Petr Mladek lib/vsprintf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 996cdfaf538f159f822f2619d55449c587b86cb6 Author: Sai Prakash Ranjan Date: Thu Jul 4 15:23:05 2019 +0530 coresight: Do not default to CPU0 for missing CPU phandle Coresight platform support assumes that a missing "cpu" phandle defaults to CPU0. This could be problematic and unnecessarily binds components to CPU0, where they may not be. In coresight etm and cpu-debug drivers, abort the probe for such cases. Signed-off-by: Sai Prakash Ranjan Reviewed-by: Suzuki K Poulose Tested-by: Mathieu Poirier Reviewed-by: Mathieu Poirier Link: https://lore.kernel.org/r/f1955ea19c714cf64ea54ec356a9aa85f3cd17b8.1562229018.git.saiprakash.ranjan@codeaurora.org Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-cpu-debug.c | 3 +++ drivers/hwtracing/coresight/coresight-etm3x.c | 3 +++ drivers/hwtracing/coresight/coresight-etm4x.c | 3 +++ drivers/hwtracing/coresight/coresight-platform.c | 20 ++++++++++---------- 4 files changed, 19 insertions(+), 10 deletions(-) commit 1141301c20706acd444637d7c5c6b201ad878c6e Author: Sai Prakash Ranjan Date: Thu Jul 4 15:23:04 2019 +0530 dt-bindings: coresight: Change CPU phandle to required property Do not assume the affinity to CPU0 if cpu phandle is omitted. Update the DT binding rules to reflect the same by changing it to a required property. Signed-off-by: Sai Prakash Ranjan Reviewed-by: Suzuki K Poulose Tested-by: Mathieu Poirier Reviewed-by: Mathieu Poirier Link: https://lore.kernel.org/r/0f7f4105d5ffea6ca4313271f3b3fee69da2106a.1562229018.git.saiprakash.ranjan@codeaurora.org Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/arm/coresight-cpu-debug.txt | 4 ++-- Documentation/devicetree/bindings/arm/coresight.txt | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) commit 2ebca1cbb4a5a31f8d89f22d9d410b432a97f7a7 Author: Christoph Hellwig Date: Mon May 20 08:33:26 2019 +0200 riscv: remove free_initrd_mem The RISC-V free_initrd_mem is identical to the default one, except that it doesn't poison the freed memory. Remove it so that the default implementations gets used instead. Signed-off-by: Christoph Hellwig Reviewed-by: Anup Patel Reviewed-by: Palmer Dabbelt Signed-off-by: Paul Walmsley arch/riscv/mm/init.c | 5 ----- 1 file changed, 5 deletions(-) commit df7e9059cf6bdf4a8c11edeee30231f49815b071 Author: Yash Shah Date: Mon Jul 1 16:10:30 2019 +0530 riscv: ccache: Remove unused variable Reading the count register clears the interrupt signal. Currently, the count registers are read into 'regval' variable but the variable is never used. Therefore remove it. V2 of this patch add comments to justify the readl calls without checking the return value. Signed-off-by: Yash Shah Signed-off-by: Paul Walmsley arch/riscv/mm/sifive_l2_cache.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit a71dcd3757e29cc8b43383ff18595d707cf08345 Author: Colin Ian King Date: Fri May 10 10:58:32 2019 +0100 reset: remove redundant null check on pointer dev Pointer dev is being dereferenced when passed to the inlined functon dev_name, however, dev is later being null checked so at first this seems like a potential null pointer dereference. In fact, _reset_control_get_from_lookup is only ever called from __reset_control_get, right after checking dev->of_node hence dev can never be null. Clean this up by removing the redundant null check. Thanks to Philipp Zabel for spotting that dev can never be null. Addresses-Coverity: ("Dereference before null check") Fixes: 6691dffab0ab ("reset: add support for non-DT systems") Signed-off-by: Colin Ian King Reviewed-by: Bartosz Golaszewski Signed-off-by: Philipp Zabel drivers/reset/core.c | 3 --- 1 file changed, 3 deletions(-) commit ede2001569c32e5bafd2203c7272bbd3249e942e Author: Gustavo A. R. Silva Date: Fri May 31 12:35:32 2019 -0500 i3c: master: Use struct_size() helper Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes, in particular in the context in which this code is being used. So, replace the following form: sizeof(*defslvs) + ((ndevs - 1) * sizeof(struct i3c_ccc_dev_desc)) with: struct_size(defslvs, slaves, ndevs - 1) This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Boris Brezillon drivers/i3c/master.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit ea3bfeec6bf77033608b81a5e9a7cd6d686ab054 Author: Qii Wang Date: Mon Jul 1 14:42:02 2019 +0800 dt-bindings: i3c: cdns: Use correct cells for I2C device I2C device reg should be "reg = <0x52 0x0 0x10>;" Fixes: e29d0d9c90c9 ("dt-bindings: i3c: Document Cadence I3C master bindings") Signed-off-by: Qii Wang Signed-off-by: Boris Brezillon Documentation/devicetree/bindings/i3c/cdns,i3c-master.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 02bd45a28bf32993e396fdcfd7d7c7cdc0847ed1 Author: Rafael J. Wysocki Date: Thu Jul 4 01:05:38 2019 +0200 PM: sleep: Drop dev_pm_skip_next_resume_phases() After recent hibernation-related changes, there are no more callers of dev_pm_skip_next_resume_phases() except for the PM core itself in which it is more straightforward to run the statements from that function directly, so do that and drop it. Signed-off-by: Rafael J. Wysocki Reviewed-by: Mika Westerberg drivers/base/power/main.c | 19 +++---------------- include/linux/pm.h | 1 - 2 files changed, 3 insertions(+), 17 deletions(-) commit 9ed411c06dd1cdf6171b992f68c37bc2d66054f9 Author: Rafael J. Wysocki Date: Thu Jul 4 01:02:49 2019 +0200 ACPI: PM: Unexport acpi_device_get_power() Using acpi_device_get_power() outside of ACPI device initialization and ACPI sysfs is problematic due to the way in which power resources are handled by it, so unexport it and add a paragraph explaining the pitfalls to its kerneldoc comment. Signed-off-by: Rafael J. Wysocki Reviewed-by: Mika Westerberg drivers/acpi/device_pm.c | 6 +++++- drivers/acpi/internal.h | 7 +++++++ include/acpi/acpi_bus.h | 1 - 3 files changed, 12 insertions(+), 2 deletions(-) commit 208637b37824c8956fe28d277835a403ee35fa84 Author: Viresh Kumar Date: Thu Jul 4 13:06:20 2019 +0530 PM / QoS: Add support for MIN/MAX frequency constraints This patch introduces the min-frequency and max-frequency device constraints, which will be used by the cpufreq core to begin with. Reviewed-by: Matthias Kaehlcke Reviewed-by: Ulf Hansson Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/base/power/qos.c | 111 +++++++++++++++++++++++++++++++++++++++++------ include/linux/pm_qos.h | 12 +++++ 2 files changed, 109 insertions(+), 14 deletions(-) commit 2a79ea5ec53973c8711b54d33ace5c77659dc8f8 Author: Viresh Kumar Date: Thu Jul 4 13:06:19 2019 +0530 PM / QOS: Pass request type to dev_pm_qos_read_value() In order to allow dev_pm_qos_read_value() to read values for different QoS requests, pass request type as a parameter to these routines. For now, it only supports resume-latency request type but will be extended to frequency limit (min/max) constraints later on. Reviewed-by: Matthias Kaehlcke Reviewed-by: Ulf Hansson Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki Documentation/power/pm_qos_interface.txt | 2 +- drivers/base/power/domain_governor.c | 2 +- drivers/base/power/qos.c | 17 ++++++++++++----- include/linux/pm_qos.h | 16 +++++++++++++--- 4 files changed, 27 insertions(+), 10 deletions(-) commit 8262331eaaf751076fb2c781f492bafd8344591d Author: Viresh Kumar Date: Thu Jul 4 13:06:18 2019 +0530 PM / QOS: Rename __dev_pm_qos_read_value() and dev_pm_qos_raw_read_value() dev_pm_qos_read_value() will soon need to support more constraint types (min/max frequency) and will have another argument to it, i.e. type of the constraint. While that is fine for the existing users of dev_pm_qos_read_value(), but not that optimal for the callers of __dev_pm_qos_read_value() and dev_pm_qos_raw_read_value() as all the callers of these two routines are only looking for resume latency constraint. Lets make these two routines care only about the resume latency constraint and rename them to __dev_pm_qos_resume_latency() and dev_pm_qos_raw_resume_latency(). Suggested-by: Rafael J. Wysocki Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/base/power/domain_governor.c | 2 +- drivers/base/power/qos.c | 13 +++++++++---- drivers/base/power/runtime.c | 2 +- drivers/cpuidle/governor.c | 2 +- include/linux/pm_qos.h | 8 ++++---- 5 files changed, 16 insertions(+), 11 deletions(-) commit 0b07ee944701dabcddc294d903b5e8e21c2c5d95 Author: Viresh Kumar Date: Thu Jul 4 13:06:17 2019 +0530 PM / QOS: Pass request type to dev_pm_qos_{add|remove}_notifier() In order to use the same set of routines to register notifiers for different request types, update the existing dev_pm_qos_{add|remove}_notifier() routines with an additional parameter: request-type. For now, it only supports resume-latency request type but will be extended to frequency limit (min/max) constraints later on. Reviewed-by: Matthias Kaehlcke Reviewed-by: Ulf Hansson Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki Documentation/power/pm_qos_interface.txt | 10 ++++++---- drivers/base/power/domain.c | 8 +++++--- drivers/base/power/qos.c | 14 ++++++++++++-- include/linux/pm_qos.h | 12 ++++++++---- 4 files changed, 31 insertions(+), 13 deletions(-) commit 5d1532482943403eb11911898565628fa45863d7 Author: Simon Sandström Date: Thu Jul 4 08:08:11 2019 +0200 staging: kpc2000: simplify comparison to NULL in fileops.c Fixes checkpatch warning "Comparison to NULL could be written [...]". Signed-off-by: Simon Sandström Link: https://lore.kernel.org/r/20190704060811.10330-4-simon@nikanor.nu Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc_dma/fileops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a50d99d40199db24e0c321457bd3da2df107dd71 Author: Simon Sandström Date: Thu Jul 4 08:08:10 2019 +0200 staging: kpc2000: simplify comparison to NULL in dma.c Fixes checkpatch warning "Comparison to NULL could be written [...]". Signed-off-by: Simon Sandström Link: https://lore.kernel.org/r/20190704060811.10330-3-simon@nikanor.nu Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc_dma/dma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 209ff937b0d4d70bb054890a8c1722cec3fc70fe Author: Simon Sandström Date: Thu Jul 4 08:08:09 2019 +0200 staging: kpc2000: simplify comparison to NULL in kpc2000_spi.c Fixes checkpatch warning "Comparison to NULL could be written [...]". Signed-off-by: Simon Sandström Link: https://lore.kernel.org/r/20190704060811.10330-2-simon@nikanor.nu Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000_spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f584dd32edc5d4400d7ceb92111a89f0c1f6651f Merge: a328a259ced0 049331f277fe Author: Ingo Molnar Date: Thu Jul 4 10:36:20 2019 +0200 Merge branch 'x86/cpu' into perf/core, to pick up revert perf/core has an earlier version of the x86/cpu tree merged, to avoid conflicts, and due to this we want to pick up this ABI impacting revert as well: 049331f277fe: ("x86/fsgsbase: Revert FSGSBASE support") Signed-off-by: Ingo Molnar commit 0979cf95d201f7e9c7c060b96795f39733d2ed6e Author: Greg Kroah-Hartman Date: Thu Jul 4 10:28:36 2019 +0200 orangefs: fix build warning from debugfs cleanup patch Stephen writes: After merging the driver-core tree, today's linux-next build (x86_64 allmodconfig) produced this warning: fs/orangefs/orangefs-debugfs.c: In function 'orangefs_debugfs_init': fs/orangefs/orangefs-debugfs.c:193:1: warning: label 'out' defined but not used [-Wunused-label] out: ^~~ fs/orangefs/orangefs-debugfs.c: In function 'orangefs_kernel_debug_init': fs/orangefs/orangefs-debugfs.c:204:17: warning: unused variable 'ret' [-Wunused-variable] struct dentry *ret; ^~~ Fix this up and change the return type of the function to void as it can not fail, which cleans up some more code and variables as well. Cc: Mike Marshall Cc: Martin Brandenburg Cc: devel@lists.orangefs.org Reported-by: Stephen Rothwell Fixes: f095adba36bb ("orangefs: no need to check return value of debugfs_create functions") Signed-off-by: Greg Kroah-Hartman fs/orangefs/orangefs-debugfs.c | 19 ++++--------------- fs/orangefs/orangefs-debugfs.h | 2 +- fs/orangefs/orangefs-mod.c | 6 +----- 3 files changed, 6 insertions(+), 21 deletions(-) commit a94de2e7a380064a6e8a4c3e5e10d97e8aa711f4 Merge: 60e8523e2ea1 e8960ca06bb2 Author: Greg Kroah-Hartman Date: Thu Jul 4 10:20:48 2019 +0200 Merge tag 'misc-habanalabs-next-2019-07-04' of git://people.freedesktop.org/~gabbayo/linux into char-misc-next Oded writes: This tag contains the following changes for kernel 5.3: - Change the way the device's CPU access the host memory. This allows the driver to use the kernel API of setting DMA mask in a standard way (call it once). - Add a new debugfs entry to show the status of the internal DMA and compute engines. This is very helpful for debugging in case a command submission get stuck. - Return to the user a mask of the internal engines indicating their busy state. - Make sure to restore registers that can be modified by the user to their default values. Only applies to registers that are initialized by the driver. - Elimination of redundant and dead-code. - Support memset of the device's memory with size larger then 4GB - Force the user to set the device to debug mode before configuring the device's coresight infrastructure - Improve error printing in case of interrupts from the device * tag 'misc-habanalabs-next-2019-07-04' of git://people.freedesktop.org/~gabbayo/linux: (31 commits) habanalabs: Add busy engines bitmask to HW idle IOCTL habanalabs: Add debugfs node for engines status habanalabs: Update the device idle check habanalabs: Allow accessing host mapped addresses via debugfs habanalabs: add WARN in case of bad MMU mapping habanalabs: remove DMA mask hack for Goya habanalabs: set Goya CPU to use ASIC MMU habanalabs: add MMU mappings for Goya CPU habanalabs: initialize MMU context for driver habanalabs: de-couple MMU and VM module initialization habanalabs: initialize device CPU queues after MMU init docs/habanalabs: update text for some entries in sysfs habanalabs: add rate-limit to an error message habanalabs: remove simulator dedicated code habanalabs: restore unsecured registers default values habanalabs: clear sobs and monitors in context switch habanalabs: make tpc registers secured habanalabs: don't limit packet size for device CPU habanalabs: support device memory memset > 4GB habanalabs: print event name for fatal and non-RAZWI events ... commit 658829dfe75c49e879e0c4c9cbcd3bd1e4fbdcf5 Author: Geliang Tang Date: Sat May 6 23:37:20 2017 +0800 powerpc/cell: set no_llseek in spufs_cntl_fops In spufs_cntl_fops, since we use nonseekable_open() to open, we should use no_llseek() to seek, not generic_file_llseek(). Signed-off-by: Geliang Tang Signed-off-by: Michael Ellerman arch/powerpc/platforms/cell/spufs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8dd8f005bdd45823fc153ef490239558caf6ff20 Author: Jean-Philippe Brucker Date: Wed Jul 3 12:19:20 2019 +0100 iommu/arm-smmu-v3: Invalidate ATC when detaching a device We make the invalid assumption in arm_smmu_detach_dev() that the ATC is clear after calling pci_disable_ats(). For one thing, only enabling the PCIe ATS capability constitutes an implicit invalidation event, so the comment was wrong. More importantly, the ATS capability isn't necessarily disabled by pci_disable_ats() in a PF, if the associated VFs have ATS enabled. Explicitly invalidate all ATC entries in arm_smmu_detach_dev(). The endpoint cannot form new ATC entries because STE.EATS is clear. Fixes: 9ce27afc0830 ("iommu/arm-smmu-v3: Add support for PCI ATS") Reported-by: Manoj Kumar Reported-by: Robin Murphy Signed-off-by: Jean-Philippe Brucker Acked-by: Will Deacon Signed-off-by: Joerg Roedel drivers/iommu/arm-smmu-v3.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit eb0a2daa45b83d67b69a620243ed844e9dfa671b Author: Andy Shevchenko Date: Wed Jul 3 18:15:54 2019 +0300 pinctrl: baytrail: Use GENMASK() consistently Use GENMASK() macro for all definitions where it's appropriate. No functional change intended. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20190703151554.30454-1-andriy.shevchenko@linux.intel.com Acked-by: Mika Westerberg Signed-off-by: Linus Walleij drivers/pinctrl/intel/pinctrl-baytrail.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit b482e48d29f1461fd0d059a17f32bcfa274127b3 Author: Johannes Berg Date: Wed Jul 3 10:52:01 2019 +0200 um: fix build without CONFIG_UML_TIME_TRAVEL_SUPPORT When CONFIG_UML_TIME_TRAVEL_SUPPORT isn't set, the build was broken. Fix this. Fixes: 065038706f77 ("um: Support time travel mode") Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger arch/um/include/shared/timer-internal.h | 2 ++ arch/um/kernel/process.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) commit 4f010b936b2ba3cb426e94284a3d57c2605bea88 Author: Andy Shevchenko Date: Wed Jul 3 03:30:18 2019 +0300 pinctrl: baytrail: Re-use data structures from pinctrl-intel.h We have some data structures duplicated across the drivers. Let's deduplicate them by using ones that being provided by pinctrl-intel.h. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20190703003018.75186-2-andriy.shevchenko@linux.intel.com Acked-by: Mika Westerberg Signed-off-by: Linus Walleij drivers/pinctrl/intel/pinctrl-baytrail.c | 299 +++++++------------------------ 1 file changed, 60 insertions(+), 239 deletions(-) commit a705f9c1798d1da0f4b67956371ef539c273b31c Author: Andy Shevchenko Date: Wed Jul 3 03:30:17 2019 +0300 pinctrl: baytrail: Use defined macro instead of magic in byt_get_gpio_mux() By the fact byt_get_gpio_mux() returns a value of mux settings as it is represented in hardware. Use defined macro instead of magic numbers to clarify this. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20190703003018.75186-1-andriy.shevchenko@linux.intel.com Reviewed-By: Enrico Weigelt Acked-by: Mika Westerberg Signed-off-by: Linus Walleij drivers/pinctrl/intel/pinctrl-baytrail.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 57218371d5ed1a6790675aad3a17c453baf2d1f2 Author: Prasad Sodagudi Date: Tue Jul 2 16:20:45 2019 +0530 pinctrl: qcom: Add SM8150 pinctrl driver Add initial pinctrl driver to support pin configuration with pinctrl framework for SM8150 Signed-off-by: Prasad Sodagudi Signed-off-by: Isaac J. Manjarres [vkoul: modify to use upstream tile support use upstream code style order the functions and squash functions] Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20190702105045.27646-4-vkoul@kernel.org Reviewed-by: Bjorn Andersson Signed-off-by: Linus Walleij drivers/pinctrl/qcom/Kconfig | 9 + drivers/pinctrl/qcom/Makefile | 1 + drivers/pinctrl/qcom/pinctrl-sm8150.c | 1548 +++++++++++++++++++++++++++++++++ 3 files changed, 1558 insertions(+) commit 7f1fee22a2bb4073ddd2f4b06b6710a561ef3815 Author: Prasad Sodagudi Date: Tue Jul 2 16:20:44 2019 +0530 dt-bindings: pinctrl: qcom: Add SM8150 pinctrl binding Add the binding for the TLMM pinctrl block found in the SM8150 platform. Signed-off-by: Prasad Sodagudi Signed-off-by: Isaac J. Manjarres [vkoul: add missing nodes of gpio range and reserved rewrote function names and order them] Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20190702105045.27646-3-vkoul@kernel.org Reviewed-by: Bjorn Andersson Signed-off-by: Linus Walleij .../bindings/pinctrl/qcom,sm8150-pinctrl.txt | 190 +++++++++++++++++++++ 1 file changed, 190 insertions(+) commit 80327437e377bd4d3f696ccec94b78895e6359f9 Author: Vinod Koul Date: Tue Jul 2 16:20:43 2019 +0530 dt-bindings: pinctrl: qcom: Document missing gpio nodes The bindings for msm8998-pinctrl was missing gpio-ranges and gpio-reserved-ranges, so document them as well Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20190702105045.27646-2-vkoul@kernel.org Reviewed-by: Bjorn Andersson Signed-off-by: Linus Walleij .../devicetree/bindings/pinctrl/qcom,msm8998-pinctrl.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 5099837d2f809c75d45efa32595c712ca245a432 Author: Martin Blumenstingl Date: Wed Jul 3 00:32:48 2019 +0200 gpio: stp-xway: allow compile-testing Enable compile-testing of the stp-xway GPIO driver now that it does not depend on any architecture specific includes anymore. Signed-off-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20190702223248.31934-5-martin.blumenstingl@googlemail.com Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c0ec7012385939d0c885c976c8849084d7aeb2fb Author: Martin Blumenstingl Date: Wed Jul 3 00:32:47 2019 +0200 gpio: stp-xway: get rid of the #include dependency Use the xway_stp_{r,w}32 helpers in xway_stp_w32_mask instead of relying on ltq_{r,w}32 from the architecture specific . This will allow the driver to be compile-tested on all architectures that support MMIO. Signed-off-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20190702223248.31934-4-martin.blumenstingl@googlemail.com Signed-off-by: Linus Walleij drivers/gpio/gpio-stp-xway.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit bd791c48808a1f39a768a0096940d71e05bb0889 Author: Martin Blumenstingl Date: Wed Jul 3 00:32:46 2019 +0200 gpio: stp-xway: improve module clock error handling Three module clock error handling improvements: - use devm_clk_get() so the clock instance can be freed if devm_gpiochip_add_data() fails later on - switch to clk_prepare_enable() so the driver is ready whenever the lantiq target switches to the common clock framework - disable the clock again (using clk_disable_unprepare()) if devm_gpiochip_add_data() All of these are virtually no-ops with the current lantiq target. However, these will be relevant if we switch to the common clock framework. Signed-off-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20190702223248.31934-3-martin.blumenstingl@googlemail.com Signed-off-by: Linus Walleij drivers/gpio/gpio-stp-xway.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 8a7b179781e865ca2c7fe4ce9a7976f45c070f53 Author: Martin Blumenstingl Date: Wed Jul 3 00:32:45 2019 +0200 gpio: stp-xway: simplify error handling in xway_stp_probe() Return early if devm_gpiochip_add_data() returns an error instead of having two consecutive "if (!ret) ..." statements. Also make xway_stp_hw_init() return void because it unconditionally returns 0. While here also update the kerneldoc comment for xway_stp_hw_init(). These changes makes the error handling within the driver consistent. No functional changes intended. Signed-off-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20190702223248.31934-2-martin.blumenstingl@googlemail.com Signed-off-by: Linus Walleij drivers/gpio/gpio-stp-xway.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit 827a9b8bbfdc976775eb0dc650d8485081271e27 Author: Geert Uytterhoeven Date: Mon Jul 1 16:28:09 2019 +0200 gpiolib: Clarify use of non-sleeping functions Obviously functions that are safe to be called from atomic contexts, can be called from non-atomic contexts, too. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20190701142809.25308-1-geert+renesas@glider.be Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 3285170f28a850638794cdfe712eb6d93e51e706 Author: Geert Uytterhoeven Date: Mon Jul 1 16:27:38 2019 +0200 gpiolib: Fix references to gpiod_[gs]et_*value_cansleep() variants Commit 372e722ea4dd4ca1 ("gpiolib: use descriptors internally") renamed the functions to use a "gpiod" prefix, and commit 79a9becda8940deb ("gpiolib: export descriptor-based GPIO interface") introduced the "raw" variants, but both changes forgot to update the comments. Readd a similar reference to gpiod_set_value(), which was accidentally removed by commit 1e77fc82110ac36f ("gpio: Add missing open drain/source handling to gpiod_set_value_cansleep()"). Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20190701142738.25219-1-geert+renesas@glider.be Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit f99d479bcb78ecc0243f1fcc53d7081fa150d7eb Author: Geert Uytterhoeven Date: Mon Jul 1 16:26:50 2019 +0200 gpiolib: Document new gpio_chip.init_valid_mask field A new field init_valid_mask was added to struct gpio_chip, but it was not documented. Fixes: f8ec92a9f63b3b11 ("gpiolib: Add init_valid_mask exported function") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20190701142650.25122-1-geert+renesas@glider.be Signed-off-by: Linus Walleij include/linux/gpio/driver.h | 2 ++ 1 file changed, 2 insertions(+) commit 01f14c52591dd9028b93d0641136a34b388b773d Author: Geert Uytterhoeven Date: Mon Jul 1 16:10:05 2019 +0200 Documentation: gpio: Fix reference to gpiod_get_array() The function is called gpiod_get_array(), not gpiod_array_get(). Fixes: 77588c14ac868cae ("gpiolib: Pass array info to get/set array functions") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20190701141005.24631-1-geert+renesas@glider.be Signed-off-by: Linus Walleij Documentation/driver-api/gpio/consumer.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c197922f0a8072d286dff8001f8ad0d4b95ec1dd Author: Geliang Tang Date: Tue Dec 20 22:02:17 2016 +0800 powerpc/perf/24x7: use rb_entry To make the code clearer, use rb_entry() instead of container_of() to deal with rbtree. Signed-off-by: Geliang Tang Signed-off-by: Michael Ellerman arch/powerpc/perf/hv-24x7.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7505a13f85bdcb8713551a067dfc92ac3c7ba902 Author: Anton Blanchard Date: Tue Jun 4 15:42:57 2019 +1000 powerpc/configs: Disable latencytop latencytop adds almost 4kB to each and every task struct and as such it doesn't deserve to be in our defconfigs. Signed-off-by: Anton Blanchard Signed-off-by: Michael Ellerman arch/powerpc/configs/g5_defconfig | 1 - arch/powerpc/configs/gamecube_defconfig | 1 - arch/powerpc/configs/maple_defconfig | 1 - arch/powerpc/configs/pmac32_defconfig | 1 - arch/powerpc/configs/powernv_defconfig | 1 - arch/powerpc/configs/ppc64_defconfig | 1 - arch/powerpc/configs/ppc64e_defconfig | 1 - arch/powerpc/configs/ppc6xx_defconfig | 1 - arch/powerpc/configs/pseries_defconfig | 1 - arch/powerpc/configs/wii_defconfig | 1 - 10 files changed, 10 deletions(-) commit 4f44e8aeaf1937d9148dfcc4c028cd8aff27902e Author: Enrico Weigelt, metux IT consult Date: Wed Jul 3 18:04:13 2019 +0200 powerpc/Kconfig: Clean up formatting Formatting of Kconfig files doesn't look so pretty, so let the Great White Handkerchief come around and clean it up. Also convert "---help---" as requested. Signed-off-by: Enrico Weigelt, metux IT consult Signed-off-by: Michael Ellerman arch/powerpc/Kconfig | 40 +++++++++++++++++----------------- arch/powerpc/kvm/Kconfig | 6 ++--- arch/powerpc/platforms/40x/Kconfig | 7 +++--- arch/powerpc/platforms/44x/Kconfig | 10 ++++----- arch/powerpc/platforms/85xx/Kconfig | 8 +++---- arch/powerpc/platforms/86xx/Kconfig | 6 ++--- arch/powerpc/platforms/maple/Kconfig | 2 +- arch/powerpc/platforms/pseries/Kconfig | 18 +++++++-------- arch/powerpc/sysdev/xics/Kconfig | 13 +++++------ 9 files changed, 54 insertions(+), 56 deletions(-) commit d71cac5971192049a3a375a2e68b63f4092bd6a1 Author: Greg Kroah-Hartman Date: Thu Jul 4 08:32:10 2019 +0200 ubifs: fix build warning after debugfs cleanup patch Stephen writes: After merging the driver-core tree, today's linux-next build (arm multi_v7_defconfig) produced this warning: fs/ubifs/debug.c: In function 'dbg_debugfs_init_fs': fs/ubifs/debug.c:2812:6: warning: unused variable 'err' [-Wunused-variable] int err, n; ^~~ So fix this up properly. Reported-by: Stephen Rothwell Cc: Richard Weinberger Cc: Artem Bityutskiy Cc: Adrian Hunter Cc: linux-mtd@lists.infradead.org Signed-off-by: Greg Kroah-Hartman fs/ubifs/debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f017da5c7077bddbe0c351cd32b7c7dc18ed2175 Author: Krzysztof Kozlowski Date: Thu Jul 4 13:33:52 2019 +0800 nios2: configs: Remove useless UEVENT_HELPER_PATH Remove the CONFIG_UEVENT_HELPER_PATH because: 1. It is disabled since commit 1be01d4a5714 ("driver: base: Disable CONFIG_UEVENT_HELPER by default") as its dependency (UEVENT_HELPER) was made default to 'n', 2. It is not recommended (help message: "This should not be used today [...] creates a high system load") and was kept only for ancient userland, 3. Certain userland specifically requests it to be disabled (systemd README: "Legacy hotplug slows down the system and confuses udev"). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Ley Foon Tan arch/nios2/configs/10m50_defconfig | 1 - arch/nios2/configs/3c120_defconfig | 1 - 2 files changed, 2 deletions(-) commit 4cf643a39221af24a151ad2cff4e3f95f12f368e Merge: 44c153671296 440e80ce02cd Author: Dave Airlie Date: Thu Jul 4 14:52:50 2019 +1000 Merge tag 'drm-next-5.3-2019-06-27' of git://people.freedesktop.org/~agd5f/linux into drm-next drm-next-5.3-2019-06-27: amdgpu: - Fix warning on 32 bit ARM - Fix compilation on big endian - Misc bug fixes ttm: - Live lock fix Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20190628015555.3384-1-alexander.deucher@amd.com commit 44c153671296ecdee7c75aaf778f054ffaf1ee00 Merge: f07b56e7d0b2 daed277e4d5a Author: Dave Airlie Date: Thu Jul 4 14:19:40 2019 +1000 Merge tag 'drm-misc-next-fixes-2019-06-27' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next-fixes for v5.3: - Fixes to the tfp410 bridge. - Small build fix for vga_switcheroo to prevent building against modular fbcon. Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20a62234-bc27-00eb-e0e2-22b55eec1cb2@linux.intel.com commit f07b56e7d0b21b49d809b301837c6ba39c27309a Merge: a22719cce54b 837567c1e9d5 Author: Dave Airlie Date: Thu Jul 4 14:08:07 2019 +1000 Merge tag 'for-airlie-armada' of git://git.armlinux.org.uk/~rmk/linux-arm into drm-next Armada DRM updates: - Fix interlace support. - use __drm_atomic_helper_plane_reset in overlay reset. - since the overlay and video planes use essentially the same format registers, precompute their values while validating. - fix a long-standing deficiency with overlay planes and interlace modes - calculate plane starting address at atomic_check stage rather than when we're programming the registers. - add gamma support. - ensure mode adjustments made by other components are properly handled in the driver and applied to the CRTC-programmed mode. - add and use register definitions for the "REG4F" register. - use drm_atomic_helper_shutdown() when tearing down to ensure that the hardware is properly shutdown. - add CRTC-level mode validation to ensure that we don't allow a mode that the CRTC-level hardware can not support. - improve the clocking selection for Armada 510 support. - move CRTC debugfs files into the crtc-specific directory, using the DRM helper to create these files. - patch from Lubomir Rintel to replace a simple framebuffer. - use the OF graph walker rather than open-coding this. - eliminate a useless check for the availability of the remote's parent which isn't required. Signed-off-by: Dave Airlie From: Russell King Link: https://patchwork.freedesktop.org/patch/msgid/20190702091313.GA23442@rmk-PC.armlinux.org.uk commit fba9760a433634067ec01e7d4cdd581d17b149e0 Author: Darrick J. Wong Date: Wed Jul 3 20:36:28 2019 -0700 xfs: wire up the v5 inumbers ioctl Wire up the v5 INUMBERS ioctl. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/libxfs/xfs_fs.h | 8 ++++++++ fs/xfs/xfs_ioctl.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/xfs_ioctl32.c | 1 + fs/xfs/xfs_ondisk.h | 1 + 4 files changed, 62 insertions(+) commit 0448b6f488fa66e353a9e00022441cd4aca7f2cf Author: Darrick J. Wong Date: Wed Jul 3 20:36:27 2019 -0700 xfs: wire up new v5 bulkstat ioctls Wire up the new v5 BULKSTAT ioctl. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/libxfs/xfs_fs.h | 24 ++++++++++++- fs/xfs/xfs_ioctl.c | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/xfs_ioctl32.c | 1 + fs/xfs/xfs_ondisk.h | 1 + 4 files changed, 123 insertions(+), 1 deletion(-) commit 5f19c7fc6873351a3d81bbbb98c928343902d8d6 Author: Darrick J. Wong Date: Wed Jul 3 20:36:27 2019 -0700 xfs: introduce v5 inode group structure Introduce a new "v5" inode group structure that fixes the alignment and padding problems of the existing structure. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/libxfs/xfs_fs.h | 11 +++++++++++ fs/xfs/xfs_ioctl.c | 9 ++++++--- fs/xfs/xfs_ioctl.h | 2 +- fs/xfs/xfs_ioctl32.c | 10 +++++++--- fs/xfs/xfs_itable.c | 14 +++++++++++++- fs/xfs/xfs_itable.h | 4 +++- fs/xfs/xfs_ondisk.h | 1 + 7 files changed, 42 insertions(+), 9 deletions(-) commit 7035f9724f8497c709077c08df2073bfcde9c2f5 Author: Darrick J. Wong Date: Wed Jul 3 20:36:26 2019 -0700 xfs: introduce new v5 bulkstat structure Introduce a new version of the in-core bulkstat structure that supports our new v5 format features. This structure also fills the gaps in the previous structure. We leave wiring up the ioctls for the next patch. Signed-off-by: Darrick J. Wong Reviewed-by: Allison Collins Reviewed-by: Brian Foster fs/xfs/libxfs/xfs_fs.h | 48 ++++++++++++++++++++++++++++- fs/xfs/libxfs/xfs_health.h | 2 +- fs/xfs/xfs_health.c | 2 +- fs/xfs/xfs_ioctl.c | 9 ++++-- fs/xfs/xfs_ioctl.h | 2 +- fs/xfs/xfs_ioctl32.c | 10 ++++-- fs/xfs/xfs_itable.c | 76 ++++++++++++++++++++++++++++++++++------------ fs/xfs/xfs_itable.h | 4 ++- fs/xfs/xfs_ondisk.h | 2 ++ 9 files changed, 125 insertions(+), 30 deletions(-) commit 8bfe9d1810e657aaa1b4137f43fae83560e6d71d Author: Darrick J. Wong Date: Wed Jul 3 20:36:26 2019 -0700 xfs: rename bulkstat functions Rename the bulkstat functions to 'fsbulkstat' so that they match the ioctl names. We will be introducing a new set of bulkstat/inumbers ioctls soon, and it will be important to keep the names straight. Signed-off-by: Darrick J. Wong Reviewed-by: Allison Collins Reviewed-by: Brian Foster fs/xfs/xfs_ioctl.c | 14 +++++++------- fs/xfs/xfs_ioctl.h | 5 +++-- fs/xfs/xfs_ioctl32.c | 18 +++++++++--------- 3 files changed, 19 insertions(+), 18 deletions(-) commit 6f71fb683879c78ba356ca78f2972289443f26eb Author: Darrick J. Wong Date: Wed Jul 3 20:36:25 2019 -0700 xfs: remove various bulk request typedef usage Remove xfs_bstat_t, xfs_fsop_bulkreq_t, xfs_inogrp_t, and similarly named compat typedefs. Signed-off-by: Darrick J. Wong Reviewed-by: Allison Collins Reviewed-by: Brian Foster fs/xfs/libxfs/xfs_fs.h | 16 ++++++++-------- fs/xfs/xfs_ioctl.c | 2 +- fs/xfs/xfs_ioctl32.c | 11 +++++++---- fs/xfs/xfs_ioctl32.h | 14 +++++++------- 4 files changed, 23 insertions(+), 20 deletions(-) commit 029f162ab09d254e03050908c8554f6328d3908a Author: Masahiro Yamada Date: Fri Jun 14 14:04:23 2019 +0800 nios2: remove pointless second entry for CONFIG_TRACE_IRQFLAGS_SUPPORT Strangely enough, NIOS2 defines TRACE_IRQFLAGS_SUPPORT twice with different values, which is pointless and confusing. [1] arch/nios2/Kconfig config TRACE_IRQFLAGS_SUPPORT def_bool n [2] arch/nios2/Kconfig.debug config TRACE_IRQFLAGS_SUPPORT def_bool y [1] is included before [2]. In the Kconfig syntax, the first one is effective. So, TRACE_IRQFLAGS_SUPPORT is always 'n'. The second define in arch/nios2/Kconfig.debug is dead code. Signed-off-by: Masahiro Yamada Signed-off-by: Ley Foon Tan arch/nios2/Kconfig.debug | 3 --- 1 file changed, 3 deletions(-) commit b27aca2e555f87d384cdf60059dd1a1b61c215ef Author: Arnd Bergmann Date: Wed Jul 3 17:30:59 2019 +0200 soc: rockchip: work around clang warning clang emits a warning about a negative shift count for an unused part of a conditional constant expression: drivers/soc/rockchip/pm_domains.c:795:21: error: shift count is negative [-Werror,-Wshift-count-negative] [RK3328_PD_VIO] = DOMAIN_RK3328(-1, 8, 8, false), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/soc/rockchip/pm_domains.c:129:2: note: expanded from macro 'DOMAIN_RK3328' DOMAIN_M(pwr, pwr, req, (req) + 10, req, wakeup) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/soc/rockchip/pm_domains.c:105:33: note: expanded from macro 'DOMAIN_M' .status_mask = (status >= 0) ? BIT(status) : 0, \ ^~~~~~~~~~~ include/linux/bits.h:6:24: note: expanded from macro 'BIT' This is a bug in clang that will be fixed in the future, but in order to build cleanly with clang-8, it would be helpful to shut up this warning. This file is the only instance reported by kernelci at the moment. The best solution I could come up with is to move the BIT() usage out of the macro into the instantiation, so we can avoid using BIT(-1). Link: https://lore.kernel.org/r/20190703153112.2767411-1-arnd@arndb.de Link: https://bugs.llvm.org/show_bug.cgi?id=38789 Signed-off-by: Arnd Bergmann Reviewed-by: Nathan Chancellor Signed-off-by: Olof Johansson drivers/soc/rockchip/pm_domains.c | 230 +++++++++++++++++++------------------- 1 file changed, 115 insertions(+), 115 deletions(-) commit a22719cce54bc18001a7c8be9c713ba629f5801c Merge: 53e155f2bbd4 156bdac99061 Author: Dave Airlie Date: Thu Jul 4 11:46:02 2019 +1000 Merge tag 'exynos-drm-next-for-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next - Drop the use of drmP.h header file drmP.h header file has been deprecated so this patch drops the use of this header, and instead includes appropriate header files required. - Add COMPILE_TEST flag This patch adds COMPILE_TEST dependency to exynos drm driver to increase build test coverage. And also, it includes vmalloc.h header file to fix one build warning which is introduced when building the Linux kernel using sh. Signed-off-by: Dave Airlie From: Inki Dae Link: https://patchwork.freedesktop.org/patch/msgid/CAAQKjZMdBdD8oEa0cNv78FjrpOqu20ozTTvuPEm_XnVo2gRhCQ@mail.gmail.com commit 791234448d4798f589110c17d2baaf1bbcc56cb8 Author: J. Bruce Fields Date: Wed Jun 5 12:42:05 2019 -0400 nfsd: decode implementation id Decode the implementation ID and display in nfsd/clients/#/info. It may be help identify the client. It won't be used otherwise. (When this went into the protocol, I thought the implementation ID would be a slippery slope towards implementation-specific workarounds as with the http user-agent. But I guess I was wrong, the risk seems pretty low now.) Signed-off-by: J. Bruce Fields fs/nfsd/nfs4state.c | 30 ++++++++++++++++++++++++++++++ fs/nfsd/nfs4xdr.c | 21 +++++++++------------ fs/nfsd/state.h | 4 ++++ fs/nfsd/xdr4.h | 3 +++ 4 files changed, 46 insertions(+), 12 deletions(-) commit 6f7b841bc939e7c811ad32427b58d54edbcfa6ed Author: Vadim Fedorenko Date: Mon Jul 1 19:49:34 2019 +0300 ipvs: allow tunneling with gre encapsulation windows real servers can handle gre tunnels, this patch allows gre encapsulation with the tunneling method, thereby letting ipvs be load balancer for windows-based services Signed-off-by: Vadim Fedorenko Acked-by: Julian Anastasov Signed-off-by: Simon Horman Signed-off-by: Pablo Neira Ayuso include/uapi/linux/ip_vs.h | 1 + net/netfilter/ipvs/ip_vs_ctl.c | 1 + net/netfilter/ipvs/ip_vs_xmit.c | 66 +++++++++++++++++++++++++++++++++++++++-- 3 files changed, 65 insertions(+), 3 deletions(-) commit 0d9cb300acad29f25ea23d2592e69970bc61f14c Author: Florian Westphal Date: Tue Jul 2 20:41:14 2019 +0200 netfilter: nf_queue: remove unused hook entries pointer Its not used anywhere, so remove this. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_queue.h | 3 +-- net/bridge/br_input.c | 2 +- net/netfilter/core.c | 2 +- net/netfilter/nf_queue.c | 8 +++----- 4 files changed, 6 insertions(+), 9 deletions(-) commit eca27f14b1168a8962023571b29d2ec593788b61 Author: Markus Elfring Date: Tue Jul 2 20:06:30 2019 +0200 netfilter: nf_log: Replace a seq_printf() call by seq_puts() in seq_show() A string which did not contain a data format specification should be put into a sequence. Thus use the corresponding function “seq_puts”. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f0c1aab2bd1ad131d9d7528b9dcbf9253a74e5da Author: Pablo Neira Ayuso Date: Fri Jun 21 17:37:48 2019 +0200 netfilter: rename nf_SYNPROXY.h to nf_synproxy.h Uppercase is a reminiscence from the iptables infrastructure, rename this header before this is included in stable kernels. Signed-off-by: Pablo Neira Ayuso include/uapi/linux/netfilter/{nf_SYNPROXY.h => nf_synproxy.h} | 0 include/uapi/linux/netfilter/xt_SYNPROXY.h | 2 +- net/netfilter/nf_synproxy_core.c | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) commit 876a0600896c1857c79cb58625ff012b27fea9fd Author: Nathan Chancellor Date: Thu Jun 27 12:14:48 2019 -0700 kbuild: Add ability to test Clang's integrated assembler There are some people interested in experimenting with Clang's integrated assembler. To make it easy to do so without source modification, allow the user to specify 'AS=clang' as part of the make command to avoid adding '-no-integrated-as' to the {A,C}FLAGS. Link: https://github.com/ClangBuiltLinux/linux/issues/577 Suggested-by: Dmitry Golovin Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Tested-by: Nick Desaulniers Signed-off-by: Masahiro Yamada Makefile | 2 ++ 1 file changed, 2 insertions(+) commit 9aa0cf79568e7078c32710034b0df8946db6cdad Author: Srinivas Kandagatla Date: Wed Jul 3 13:31:02 2019 +0100 ASoC: qdsp6: q6afe-dai: Add missing Slimbus0 audio route For some reason SLIMBus RX0 playback is not added to audio routes. This patch adds the missing route. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20190703123102.12626-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown sound/soc/qcom/qdsp6/q6afe-dai.c | 1 + 1 file changed, 1 insertion(+) commit 74b35a74f80e02bdd69db9cf96d3f4fe78b67064 Author: Srinivas Kandagatla Date: Wed Jul 3 13:30:02 2019 +0100 ASoC: core: Return -ENOTSUPP from set_channel_map() if no operation provided It makes it easier for common code to work with snd_soc_dai_set_channel_map() by distinguishing between operation not being supported and an error. This is done inline with others snd_soc_dai.* apis. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20190703123002.12427-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown sound/soc/soc-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 02a93f35f57fe5d4d1bac0ac8496884235e2fd2e Author: Bob Moore Date: Wed Jul 3 13:15:40 2019 -0700 ACPICA: Update version to 20190703 ACPICA commit 450ffd8b9c100db561ecf23063620cb107d68c30 Version 20190703. Link: https://github.com/acpica/acpica/commit/450ffd8b Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki include/acpi/acpixf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c522ad0637cacca1775a3849c2b554f46577b98d Author: Erik Schmauss Date: Wed Jul 3 13:15:39 2019 -0700 ACPICA: Update table load object initialization ACPICA commit c7ef9f3526765bed8930825dda1eed1a274b9668 Use the common internal "initialize objects" interface Affects: Load() load_table() acpi_load_table Link: https://github.com/acpica/acpica/commit/c7ef9f35 Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/exconfig.c | 16 ++++++---------- drivers/acpi/acpica/tbxfload.c | 10 +++------- 2 files changed, 9 insertions(+), 17 deletions(-) commit 86a33cf3b6dc8733295bc7b54d090833f4d7109c Author: Bob Moore Date: Wed Jul 3 13:15:38 2019 -0700 ACPICA: Update for object initialization sequence ACPICA commit 106c72a97f5ca972f29956e5e9a0429b8c4a2723 1) Do not allow the objects to be initialized twice 2) Only package objects require a deferred initialization 3) Cleanup initialization output Link: https://github.com/acpica/acpica/commit/106c72a9 Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/dsinit.c | 2 +- drivers/acpi/acpica/nsinit.c | 49 ++++++++++++++++-------------------------- drivers/acpi/acpica/utxfinit.c | 11 ++++++++-- 3 files changed, 29 insertions(+), 33 deletions(-) commit 8894f52a14277701caab1827d21173101518e140 Author: Erik Schmauss Date: Wed Jul 3 13:15:37 2019 -0700 ACPICA: remove legacy module-level code due to deprecation ACPICA commit 1ca34b1a7b960ef321eae5dcddfff77707c88aef There have been several places that have been calling functions regarding module level code blocks. This change removes all old vestiges in the codebase. This is dead code. Link: https://github.com/acpica/acpica/commit/1ca34b1a Signed-off-by: Erik Schmauss Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/acglobal.h | 1 - drivers/acpi/acpica/acnamesp.h | 2 - drivers/acpi/acpica/nseval.c | 190 ----------------------------------------- drivers/acpi/acpica/nsload.c | 12 --- drivers/acpi/acpica/nsutils.c | 12 --- drivers/acpi/acpica/tbdata.c | 13 --- drivers/acpi/acpica/utinit.c | 1 - drivers/acpi/acpica/utxfinit.c | 13 --- 8 files changed, 244 deletions(-) commit f79c8e4136eac37255ead8875593ae33a2c16d20 Author: Bob Moore Date: Wed Jul 3 13:15:36 2019 -0700 ACPICA: Namespace: simplify creation of the initial/default namespace ACPICA commit 76658f55d8cc498a763bdb92f8e0d934822a129c For the objects that are created by default (_GPE, _SB_, etc) there is no need to use the heavyweight ns_lookup function. Instead, simply create each object and link it in as the namespace is built. Link: https://github.com/acpica/acpica/commit/76658f55 Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/nsaccess.c | 54 +++++++++++++++++++++++++++++++++--------- 1 file changed, 43 insertions(+), 11 deletions(-) commit d4ca763eed3bcc227f220beb11ff4eb2fa548755 Merge: 44758bafa536 d06c47e3dd07 Author: Rafael J. Wysocki Date: Thu Jul 4 00:59:15 2019 +0200 Merge ACPI tables handling changes for v5.3. commit 2ee7a4ef98e309a1f496be2b0bf9307b5a7a31e5 Author: Christoph Hellwig Date: Sun Jun 30 18:43:47 2019 +0200 MIPS: only select ARCH_HAS_UNCACHED_SEGMENT for non-coherent platforms While mips might architecturally have the uncached segment all the time, the infrastructure to use it is only need on platforms where DMA is at least partially incoherent. Only select it for those configuration to fix a build failure as the arch_dma_prep_coherent symbol is also only provided for non-coherent platforms. Fixes: 2e96e04d25ca ("MIPS: use the generic uncached segment support in dma-direct") Reported-by: Guenter Roeck Signed-off-by: Christoph Hellwig Acked-by: Paul Burton Tested-by: Guenter Roeck arch/mips/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9e953cda5cdf1c230a3c9b7fc4d5e94f15885a9b Author: Alexandre Ghiti Date: Sun May 26 08:50:38 2019 -0400 riscv: Introduce huge page support for 32/64bit kernel This patch implements both 4MB huge page support for 32bit kernel and 2MB/1GB huge pages support for 64bit kernel. Signed-off-by: Alexandre Ghiti Reviewed-by: Christoph Hellwig Signed-off-by: Paul Walmsley arch/riscv/Kconfig | 8 ++++++++ arch/riscv/include/asm/hugetlb.h | 18 ++++++++++++++++ arch/riscv/include/asm/page.h | 10 +++++++++ arch/riscv/include/asm/pgtable.h | 8 ++++++-- arch/riscv/mm/Makefile | 2 ++ arch/riscv/mm/hugetlbpage.c | 44 ++++++++++++++++++++++++++++++++++++++++ 6 files changed, 88 insertions(+), 2 deletions(-) commit 3876d4a38ae22bb56311abf5ea418eac46090c00 Author: Alexandre Ghiti Date: Thu Jun 27 15:00:11 2019 -0700 x86, arm64: Move ARCH_WANT_HUGE_PMD_SHARE config in arch/Kconfig ARCH_WANT_HUGE_PMD_SHARE config was declared in both architectures: move this declaration in arch/Kconfig and make those architectures select it. Signed-off-by: Alexandre Ghiti Reviewed-by: Palmer Dabbelt Acked-by: Ingo Molnar Acked-by: Catalin Marinas # for arm64 Reviewed-by: Hanjun Guo Reviewed-by: Christoph Hellwig Signed-off-by: Paul Walmsley arch/Kconfig | 3 +++ arch/arm64/Kconfig | 2 +- arch/x86/Kconfig | 4 +--- 3 files changed, 5 insertions(+), 4 deletions(-) commit 6f4859b8a72638f60c7051247aac63a761f01933 Author: J. Bruce Fields Date: Wed Jun 19 14:30:33 2019 -0400 nfsd: create xdr_netobj_dup helper Move some repeated code to a common helper. No change in behavior. Signed-off-by: J. Bruce Fields fs/nfsd/nfs4state.c | 11 ++++------- include/linux/sunrpc/xdr.h | 7 +++++++ 2 files changed, 11 insertions(+), 7 deletions(-) commit 89c905beccbbafa88490c8c4c35eaec5ce4c1329 Author: J. Bruce Fields Date: Wed Jun 19 12:43:11 2019 -0400 nfsd: allow forced expiration of NFSv4 clients NFSv4 clients are automatically expired and all their locks removed if they don't contact the server for a certain amount of time (the lease period, 90 seconds by default). There can still be situations where that's not enough, so allow userspace to force expiry by writing "expire\n" to the new nfsd/client/#/ctl file. (The generic "ctl" name is because I expect we may want to allow other operations on clients in the future.) The write will not return until the client is expired and all of its locks and other state removed. The fault injection code also provides a way of expiring clients, but it fails if there are any in-progress RPC's referencing the client. Also, its method of selecting a client to expire is a little more primitive--it uses an IP address, which can't always uniquely specify an NFSv4 client. Signed-off-by: J. Bruce Fields fs/nfsd/nfs4state.c | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 69 insertions(+), 1 deletion(-) commit a204f25e372d942245dc0fdccd12f5c16483bbc1 Author: J. Bruce Fields Date: Wed Jun 19 12:54:45 2019 -0400 nfsd: create get_nfsdfs_clp helper Factor our some common code. No change in behavior. Signed-off-by: J. Bruce Fields fs/nfsd/nfs4state.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit 0c4b62b042fe3a4a0b18449eae26989611955db1 Author: J. Bruce Fields Date: Tue May 14 15:52:57 2019 -0400 nfsd4: show layout stateids These are also minimal for now, I'm not sure what information would be useful. Signed-off-by: J. Bruce Fields fs/nfsd/nfs4state.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 16d36e099980d825feb5b851f06d714a6519b85b Author: J. Bruce Fields Date: Fri May 10 15:27:50 2019 -0400 nfsd: show lock and deleg stateids These entries are pretty minimal for now. Signed-off-by: J. Bruce Fields fs/nfsd/nfs4state.c | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) commit 78599c42ae3c70300a38b0d1271a85bc9f2d704a Author: J. Bruce Fields Date: Mon Apr 22 15:26:23 2019 -0400 nfsd4: add file to display list of client's opens Add a nfsd/clients/#/opens file to list some information about all the opens held by the given client, including open modes, device numbers, inode numbers, and open owners. Open owners are totally opaque but seem to sometimes have some useful ascii strings included, so passing through printable ascii characters and escaping the rest seems useful while still being machine-readable. Signed-off-by: J. Bruce Fields fs/nfsd/nfs4state.c | 149 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 147 insertions(+), 2 deletions(-) commit 169319f13cb874e90471463ba4a8d5689c23de2d Author: J. Bruce Fields Date: Wed Jun 19 12:39:46 2019 -0400 nfsd: add more information to client info file Add ip address, full client-provided identifier, and minor version. There's much more that could possibly be useful but this is a start. Signed-off-by: J. Bruce Fields fs/nfsd/nfs4state.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit ea053e164cc812f0c00a58cbbf8c65e27ceb6148 Author: J. Bruce Fields Date: Wed Jun 19 12:30:13 2019 -0400 nfsd: escape high characters in binary data I'm exposing some information about NFS clients in pseudofiles. I expect to eventually have simple tools to help read those pseudofiles. But it's also helpful if the raw files are human-readable to the extent possible. It aids debugging and makes them usable on systems that don't have the latest nfs-utils. A minor challenge there is opaque client-generated protocol objects like state owners and client identifiers. Some clients generate those to include handy information in plain ascii. But they may also include arbitrary byte sequences. I think the simplest approach is to limit to isprint(c) && isascii(c) and escape everything else. That means you can just cat the file and get something that looks OK. Also, I'm trying to keep these files legal YAML, which requires them to UTF-8, and this is a simple way to guarantee that. Acked-by: Kees Cook Signed-off-by: J. Bruce Fields fs/seq_file.c | 11 +++++++++++ include/linux/seq_file.h | 1 + include/linux/string_helpers.h | 3 +++ lib/string_helpers.c | 19 +++++++++++++++++++ 4 files changed, 34 insertions(+) commit 3bade247fcb18c9f31e59b46fb2d67ed6b2f7cef Author: J. Bruce Fields Date: Tue May 14 21:38:11 2019 -0400 nfsd: copy client's address including port number to cl_addr rpc_copy_addr() copies only the IP address and misses any port numbers. It seems potentially useful to keep the port number around too. Signed-off-by: J. Bruce Fields fs/nfsd/nfs4state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 97ad4031e29521894fc28765f14247e79b0ef263 Author: J. Bruce Fields Date: Tue Apr 9 15:56:57 2019 -0400 nfsd4: add a client info file Add a new nfsd/clients/#/info file with some basic information about each NFSv4 client. Signed-off-by: J. Bruce Fields fs/nfsd/nfs4state.c | 38 +++++++++++++++++- fs/nfsd/nfsctl.c | 114 +++++++++++++++++++++++++++++++++++++++++++++++++--- fs/nfsd/nfsd.h | 4 +- 3 files changed, 148 insertions(+), 8 deletions(-) commit bf5ed3e3bb84c39d70ad10b2f8e47ec62f4c63b1 Author: J. Bruce Fields Date: Thu Mar 14 16:20:19 2019 -0400 nfsd: make client/ directory names small ints We want clientid's on the wire to be randomized for reasons explained in ebd7c72c63ac "nfsd: randomize SETCLIENTID reply to help distinguish servers". But I'd rather have mostly small integers for the clients/ directory. Signed-off-by: J. Bruce Fields fs/nfsd/netns.h | 1 + fs/nfsd/nfs4state.c | 2 +- fs/nfsd/nfsctl.c | 5 +++-- 3 files changed, 5 insertions(+), 3 deletions(-) commit e8a79fb14f6b76b502218fce10696f4df9ff19b1 Author: J. Bruce Fields Date: Fri Mar 22 11:11:06 2019 -0400 nfsd: add nfsd/clients directory I plan to expose some information about nfsv4 clients here. Signed-off-by: J. Bruce Fields fs/nfsd/netns.h | 2 + fs/nfsd/nfs4state.c | 23 ++++++++---- fs/nfsd/nfsctl.c | 103 +++++++++++++++++++++++++++++++++++++++++++++++++++- fs/nfsd/nfsd.h | 9 +++++ fs/nfsd/state.h | 6 ++- 5 files changed, 133 insertions(+), 10 deletions(-) commit 59f8e91b75ecf16f22d62eca0659c13901eff5f3 Author: J. Bruce Fields Date: Wed Mar 20 20:03:02 2019 -0400 nfsd4: use reference count to free client Keep a second reference count which is what is really used to decide when to free the client's memory. Next I'm going to add an nfsd/clients/ directory with a subdirectory for each NFSv4 client. File objects under nfsd/clients/ will hold these references. Signed-off-by: J. Bruce Fields fs/nfsd/nfs4state.c | 26 +++++++++++++++++++++----- fs/nfsd/state.h | 1 + 2 files changed, 22 insertions(+), 5 deletions(-) commit 14ed14cc7c062bbed7821be0a93938dc78a49803 Author: J. Bruce Fields Date: Wed Mar 20 11:54:11 2019 -0400 nfsd: rename cl_refcount Rename this to a more descriptive name: it counts the number of in-progress rpc's referencing this client. Next I'm going to add a second refcount with a slightly different use. Signed-off-by: J. Bruce Fields fs/nfsd/nfs4state.c | 26 +++++++++++++------------- fs/nfsd/state.h | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) commit 2c830dd7209bf67863ae0b83c7dde847967ea43c Author: J. Bruce Fields Date: Fri Dec 14 09:40:56 2018 -0500 nfsd: persist nfsd filesystem across mounts Keep around one internal mount of the nfsd filesystem so that we can add stuff to it when clients come and go, regardless of whether anyone has it mounted. Signed-off-by: J. Bruce Fields fs/nfsd/netns.h | 3 +++ fs/nfsd/nfsctl.c | 11 +++++++++++ 2 files changed, 14 insertions(+) commit 855c9e766a358b72c7acd4a43fd524d0942a4278 Author: J. Bruce Fields Date: Tue Jun 18 16:43:11 2019 -0400 nfs: fix out-of-date connectathon talk URL Reported-by: David Wysochanski Signed-off-by: J. Bruce Fields net/sunrpc/svc_xprt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 689d7ba4895b803244f596e56ffa3d9e4f24acdc Author: J. Bruce Fields Date: Wed Jun 5 18:03:52 2019 -0400 nfsd: fix cleanup of nfsd_reply_cache_init on failure The failure to unregister the shrinker results will result in corruption when the nfsd_net is freed. Also clean up the drc_slab while we're here. Reported-by: syzbot+83a43746cebef3508b49@syzkaller.appspotmail.com Fixes: db17b61765c2 ("nfsd4: drc containerization") Signed-off-by: J. Bruce Fields fs/nfsd/nfscache.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 30498dcc12e5fd0aa7395ef80da8466854ff6a41 Author: J. Bruce Fields Date: Wed Jun 5 12:50:02 2019 -0400 nfsd4: remove outdated nfsd4_decode_time comment Commit bf8d909705e "nfsd: Decode and send 64bit time values" fixed the code without updating the comment. Signed-off-by: J. Bruce Fields fs/nfsd/nfs4xdr.c | 4 ---- 1 file changed, 4 deletions(-) commit bdba53687e450dcbae614ba06d0bc8be5e4e34c5 Author: J. Bruce Fields Date: Wed Jun 5 14:17:42 2019 -0400 nfsd: use 64-bit seconds fields in nfsd v4 code After commit 95582b008388 "vfs: change inode times to use struct timespec64" there are spots in the NFSv4 decoding where we decode the protocol into a struct timeval and then convert that into a timeval64. That's unnecesary in the NFSv4 case since the on-the-wire protocol also uses 64-bit values. So just fix up our code to use timeval64 everywhere. Signed-off-by: J. Bruce Fields fs/nfsd/blocklayout.c | 8 +++----- fs/nfsd/nfs4xdr.c | 13 ++++--------- fs/nfsd/xdr4.h | 2 +- 3 files changed, 8 insertions(+), 15 deletions(-) commit e977cc8308620c4839a8bd4069625f93c458a586 Author: Geert Uytterhoeven Date: Mon May 27 14:21:32 2019 +0200 nfsd: Spelling s/EACCESS/EACCES/ The correct spelling is EACCES: include/uapi/asm-generic/errno-base.h:#define EACCES 13 /* Permission denied */ Signed-off-by: Geert Uytterhoeven Signed-off-by: J. Bruce Fields fs/nfsd/vfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 291adeb25481d6d515d1bafbcbddbf2cf5f74574 Author: YueHaibing Date: Tue May 28 17:06:52 2019 +0800 lockd: Make two symbols static Fix sparse warnings: fs/lockd/clntproc.c:57:6: warning: symbol 'nlmclnt_put_lockowner' was not declared. Should it be static? fs/lockd/svclock.c:409:35: warning: symbol 'nlmsvc_lock_ops' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: J. Bruce Fields fs/lockd/clntproc.c | 2 +- fs/lockd/svclock.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit f85d93385e9fe6886a751f647f6812a89bf6bee3 Author: Benjamin Coddington Date: Thu May 23 10:45:48 2019 -0400 locks: Cleanup lm_compare_owner and lm_owner_key After the update to use nlm_lockowners for the NLM server, there are no more users of lm_compare_owner and lm_owner_key. Signed-off-by: Benjamin Coddington Signed-off-by: J. Bruce Fields Documentation/filesystems/Locking | 14 -------------- fs/locks.c | 5 ----- include/linux/fs.h | 2 -- 3 files changed, 21 deletions(-) commit 646d73e91b4222ea972953bad4374a5ca903e79d Author: Benjamin Coddington Date: Thu May 23 10:45:47 2019 -0400 lockd: Show pid of lockd for remote locks Use the pid of lockd instead of the remote lock's svid for the fl_pid for local POSIX locks. This allows proper enumeration of which local process owns which lock. The svid is meaningless to local lock readers. Signed-off-by: Benjamin Coddington Signed-off-by: J. Bruce Fields fs/lockd/svc4proc.c | 1 + fs/lockd/svclock.c | 4 ++-- fs/lockd/svcproc.c | 1 + fs/lockd/xdr.c | 2 -- fs/lockd/xdr4.c | 2 -- 5 files changed, 4 insertions(+), 6 deletions(-) commit 9adfac6d730db5e9c4c294798f5f191b621f8bc3 Author: Benjamin Coddington Date: Thu May 23 10:45:46 2019 -0400 lockd: Remove lm_compare_owner and lm_owner_key Now that the NLM server allocates an nlm_lockowner for fl_owner, there's no need for special hashing or comparison. Signed-off-by: Benjamin Coddington Signed-off-by: J. Bruce Fields fs/lockd/svclock.c | 18 ------------------ 1 file changed, 18 deletions(-) commit 89e0edfbea103d9b274efa10a8fc7a88bdac8f76 Author: Benjamin Coddington Date: Thu May 23 10:45:45 2019 -0400 lockd: Convert NLM service fl_owner to nlm_lockowner Do as the NLM client: allocate and track a struct nlm_lockowner for use as the fl_owner for locks created by the NLM sever. This allows us to keep the svid within this structure for matching locks, and will allow us to track the pid of lockd in a future patch. It should also allow easier reference of the nlm_host in conflicting locks, and simplify lock hashing and comparison. Signed-off-by: Benjamin Coddington [bfields@redhat.com: fix type of some error returns] Signed-off-by: J. Bruce Fields fs/lockd/svc4proc.c | 13 +++++- fs/lockd/svclock.c | 96 +++++++++++++++++++++++++++++++++++++++++++++ fs/lockd/svcproc.c | 13 +++++- fs/lockd/svcsubs.c | 2 +- fs/lockd/xdr.c | 1 - fs/lockd/xdr4.c | 1 - include/linux/lockd/lockd.h | 2 + 7 files changed, 123 insertions(+), 5 deletions(-) commit 9de3ec1d57113e270638254868675d9c048b071e Author: Benjamin Coddington Date: Thu May 23 10:45:44 2019 -0400 lockd: prepare nlm_lockowner for use by the server The nlm_lockowner structure that the client uses to track locks is generally useful to the server as well. Very similar functions to handle allocation and tracking of the nlm_lockowner will follow. Rename the client functions for clarity. Signed-off-by: Benjamin Coddington Signed-off-by: J. Bruce Fields fs/lockd/clntproc.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 22a46eb44016eec3384da3731a2d47a5d3c91955 Author: J. Bruce Fields Date: Fri May 17 16:22:18 2019 -0400 nfsd: note inadequate stats locking After 89a26b3d295d "nfsd: split DRC global spinlock into per-bucket locks", there is no longer a single global spinlock to protect these stats. So, really we need to fix that. For now, at least fix the comment. Signed-off-by: J. Bruce Fields fs/nfsd/netns.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 3ba75830ce175550ef45c6524ec62faab8f62c1b Author: J. Bruce Fields Date: Fri May 17 09:03:38 2019 -0400 nfsd4: drc containerization The nfsd duplicate reply cache should not be shared between network namespaces. The most straightforward way to fix this is just to move every global in the code to per-net-namespace memory, so that's what we do. Still todo: sort out which members of nfsd_stats should be global and which per-net-namespace. Signed-off-by: J. Bruce Fields fs/nfsd/cache.h | 5 +- fs/nfsd/netns.h | 35 +++++++++ fs/nfsd/nfscache.c | 225 +++++++++++++++++++++++++---------------------------- fs/nfsd/nfsctl.c | 14 ++-- 4 files changed, 154 insertions(+), 125 deletions(-) commit b401170f6d9cd4270e0159d9b016f4ccb06caa85 Author: J. Bruce Fields Date: Thu May 16 14:24:40 2019 -0400 nfsd: don't call nfsd_reply_cache_shutdown twice The caller is cleaning up on ENOMEM, don't try to do it here too. Signed-off-by: J. Bruce Fields fs/nfsd/nfscache.c | 1 - 1 file changed, 1 deletion(-) commit a51df9f8da43e8bf9e508143630849b7d696e053 Author: Colin Ian King Date: Wed Jul 3 17:50:37 2019 +0100 gve: fix -ENOMEM null check on a page allocation Currently the check to see if a page is allocated is incorrect and is checking if the pointer page is null, not *page as intended. Fix this. Addresses-Coverity: ("Dereference before null check") Fixes: f5cedc84a30d ("gve: Add transmit and receive support") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/google/gve/gve_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e227701c4583f0408cac33eca0fa96ac4b8ff7d9 Merge: 2559d7c4dd0e 6f24080e8a1e Author: David S. Miller Date: Wed Jul 3 13:51:54 2019 -0700 Merge branch 'net-ICW-sendmsg-recvmsg' Paolo Abeni says: ==================== net: use ICW for sk_proto->{send,recv}msg This series extends ICW usage to one of the few remaining spots in fast-path still hitting per packet retpoline overhead, namely the sk_proto->{send,recv}msg calls. The first 3 patches in this series refactor the existing code so that applying the ICW macros is straight-forward: we demux inet_{recv,send}msg in ipv4 and ipv6 variants so that each of them can easily select the appropriate TCP or UDP direct call. While at it, a new helper is created to avoid excessive code duplication, and the current ICWs for inet_{recv,send}msg are adjusted accordingly. The last 2 patches really introduce the new ICW use-case, respectively for the ipv6 and the ipv4 code path. This gives up to 5% performance improvement under UDP flood, and smaller but measurable gains for TCP RR workloads. v1 -> v2: - drop inet6_{recv,send}msg declaration from header file, prefer ICW macro instead - avoid unneeded reclaration for udp_sendmsg, as suggested by Willem ==================== Acked-by: Willem de Bruijn Signed-off-by: David S. Miller commit 6f24080e8a1e5572045067507c7905cbe6bc64cc Author: Paolo Abeni Date: Wed Jul 3 16:06:56 2019 +0200 ipv4: use indirect call wrappers for {tcp, udp}_{recv, send}msg() This avoids an indirect call per syscall for common ipv4 transports v1 -> v2: - avoid unneeded reclaration for udp_sendmsg, as suggested by Willem Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller net/ipv4/af_inet.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 164c51fe82de2265bd6b2aac3aaa45cc92fa28f4 Author: Paolo Abeni Date: Wed Jul 3 16:06:55 2019 +0200 ipv6: use indirect call wrappers for {tcp, udpv6}_{recv, send}msg() This avoids an indirect call per syscall for common ipv6 transports Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller net/ipv6/af_inet6.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit a648a592dc7c20873eb0aee78fa93e869714f42a Author: Paolo Abeni Date: Wed Jul 3 16:06:54 2019 +0200 net: adjust socket level ICW to cope with ipv6 variant of {recv, send}msg After the previous patch we have ipv{6,4} variants for {recv,send}msg, we should use the generic _INET ICW variant to call into the proper build-in. This also allows dropping the now unused and rather ugly _INET4 ICW macro v1 -> v2: - use ICW macro to declare inet6_{recv,send}msg - fix a couple of checkpatch offender in the code context Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller net/socket.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) commit 68ab5d1496a35f3a76b68fed57719bfc46a51e07 Author: Paolo Abeni Date: Wed Jul 3 16:06:53 2019 +0200 ipv6: provide and use ipv6 specific version for {recv, send}msg This will simplify indirect call wrapper invocation in the following patch. No functional change intended, any - out-of-tree - IPv6 user of inet_{recv,send}msg can keep using the existing functions. SCTP code still uses the existing version even for ipv6: as this series will not add ICW for SCTP, moving to the new helper would not give any benefit. The only other in-kernel user of inet_{recv,send}msg is pvcalls_conn_back_read(), but psvcalls explicitly creates only IPv4 socket, so no need to update that code path, too. v1 -> v2: drop inet6_{recv,send}msg declaration from header file, prefer ICW macro instead Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller net/ipv6/af_inet6.c | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) commit e473093639945cb0a07ad4d51d5fd3fc3c3708cf Author: Paolo Abeni Date: Wed Jul 3 16:06:52 2019 +0200 inet: factor out inet_send_prepare() The same code is replicated verbatim in multiple places, and the next patches will introduce an additional user for it. Factor out a helper and use it where appropriate. No functional change intended. Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller include/net/inet_common.h | 1 + net/ipv4/af_inet.c | 21 +++++++++++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) commit 9d1bc24b52fb8c5d859f9a47084bf1179470e04c Author: Cong Wang Date: Mon Jul 1 20:40:24 2019 -0700 bonding: validate ip header before check IPPROTO_IGMP bond_xmit_roundrobin() checks for IGMP packets but it parses the IP header even before checking skb->protocol. We should validate the IP header with pskb_may_pull() before using iph->protocol. Reported-and-tested-by: syzbot+e5be16aa39ad6e755391@syzkaller.appspotmail.com Fixes: a2fd940f4cff ("bonding: fix broken multicast with round-robin mode") Cc: Jay Vosburgh Cc: Veaceslav Falico Cc: Andy Gospodarek Signed-off-by: Cong Wang Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) commit 5832fdd35e61bf4793da0f0480fb873af645a7b4 Author: Yishai Hadas Date: Sun Jun 30 19:23:34 2019 +0300 IB/mlx5: DEVX cleanup mdev No need any more to hold mlx5_core_dev on the devx_object, it can be accessed from ib_dev. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/devx.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit ef1659ade3590e4a29a999c6f0cb2272857638a6 Author: Yishai Hadas Date: Sun Jun 30 19:23:33 2019 +0300 IB/mlx5: Add DEVX support for CQ events Add DEVX support for CQ events by creating and destroying the CQ via mlx5_core and set an handler to manage its completions. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/devx.c | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit 5ec9d8ee87c627a2c981d871e41f6e2a942f53fd Author: Yishai Hadas Date: Sun Jun 30 19:23:32 2019 +0300 IB/mlx5: Implement DEVX dispatching event Implement DEVX dispatching event by looking up for the applicable subscriptions for the reported event and using their target fd to signal/set the event. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/devx.c | 303 +++++++++++++++++++++++++++++- include/uapi/rdma/mlx5_user_ioctl_verbs.h | 5 + 2 files changed, 305 insertions(+), 3 deletions(-) commit 7597385371425febdaa8c6a1da3625d4ffff16f5 Author: Yishai Hadas Date: Sun Jun 30 19:23:31 2019 +0300 IB/mlx5: Enable subscription for device events over DEVX Enable subscription for device events over DEVX. Each subscription is added to the two level xarray data structure according to its event number and the DEVX object information in case was given with the given target fd. Those events will be reported over the given fd once will occur. Downstream patches will mange the dispatching to any subscription. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/devx.c | 560 ++++++++++++++++++++++++++++++- include/uapi/rdma/mlx5_user_ioctl_cmds.h | 9 + 2 files changed, 562 insertions(+), 7 deletions(-) commit e337dd53ce4cc3db79e52704e554f648c46d5e91 Author: Yishai Hadas Date: Sun Jun 30 19:23:30 2019 +0300 IB/mlx5: Register DEVX with mlx5_core to get async events Register DEVX with with mlx5_core to get async events. This will enable to dispatch the applicable events to its consumers in down stream patches. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/devx.c | 30 ++++++++++++++++++++++++++++++ drivers/infiniband/hw/mlx5/main.c | 8 ++++++-- drivers/infiniband/hw/mlx5/mlx5_ib.h | 12 ++++++++++++ 3 files changed, 48 insertions(+), 2 deletions(-) commit 2afc5e1b9c340ff20848c8dd8fb60342617bce52 Author: Yishai Hadas Date: Sun Jun 30 19:23:29 2019 +0300 IB/mlx5: Introduce MLX5_IB_OBJECT_DEVX_ASYNC_EVENT_FD Introduce MLX5_IB_OBJECT_DEVX_ASYNC_EVENT_FD and its initial implementation. This object is from type class FD and will be used to read DEVX async events. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/devx.c | 95 +++++++++++++++++++++++++++++++ include/uapi/rdma/mlx5_user_ioctl_cmds.h | 10 ++++ include/uapi/rdma/mlx5_user_ioctl_verbs.h | 4 ++ 3 files changed, 109 insertions(+) commit 0718edf528c552c66a5dc3525ffb145971efa766 Author: Tariq Toukan Date: Tue Jul 2 17:12:09 2019 +0300 net/mlx5: Properly name the generic WQE control field A generic WQE control field is used for different purposes in different cases. Use union to allow using the proper name in each case. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed include/linux/mlx5/qp.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit a12ff35e0fb770b4d060298be147189313ec002c Author: Eran Ben Elisha Date: Wed Apr 3 13:05:50 2019 +0300 net/mlx5: Introduce TLS TX offload hardware bits and structures Add TLS offload related IFC structs, layouts and enumerations. Signed-off-by: Eran Ben Elisha Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed include/linux/mlx5/device.h | 14 ++++++ include/linux/mlx5/mlx5_ifc.h | 104 ++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 114 insertions(+), 4 deletions(-) commit dd28087c14777a7f2571260d44394eb709a59368 Author: Parav Pandit Date: Fri Jun 7 07:16:58 2019 -0500 net/mlx5: Refactor mlx5_esw_query_functions for modularity Functions change event output data size changes when functions other than VFs will be enabled in HCA CAP. With current API, multiple callers needs to align, calculate accurate size of the output data depending on number on non VF functions enabled in the device. Instead of duplicating such math at multiple places, refactor mlx5_esw_query_functions() to return raw output allocated by itself. Caller must free the allocated memory using kvfree() as described in the function comment section. This hides calcuation within mlx5_esw_query_functions() and provides simpler API. Signed-off-by: Parav Pandit Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 38 +++++++++++++++++----- drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 7 ++-- .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 8 ++--- drivers/net/ethernet/mellanox/mlx5/core/sriov.c | 15 +++++---- 4 files changed, 46 insertions(+), 22 deletions(-) commit 7e736f9ae3d12272fec5a2b24e41b78ed58525a4 Author: Parav Pandit Date: Fri Jun 7 06:44:17 2019 -0500 net/mlx5: E-Switch prepare functions change handler to be modular Eswitch function change handler will service multiple type of events for VFs and non VF functions update. Hence, introduce and use the helper function esw_vfs_changed_event_handler() for handling change in num VFs to improve the code readability. Signed-off-by: Parav Pandit Signed-off-by: Saeed Mahameed .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 44 +++++++++++++--------- 1 file changed, 27 insertions(+), 17 deletions(-) commit 2752b823169b216db142c4466b43269281962dcf Author: Parav Pandit Date: Wed May 15 00:04:27 2019 -0500 net/mlx5: Introduce and use mlx5_eswitch_get_total_vports() Instead MLX5_TOTAL_VPORTS, use mlx5_eswitch_get_total_vports(). mlx5_eswitch_get_total_vports() in subsequent patch accounts for SF vports as well. Expanding MLX5_TOTAL_VPORTS macro would require exposing SF internals to more generic vport.h header file. Such exposure is not desired. Hence a mlx5_eswitch_get_total_vports() is introduced. Given that mlx5_eswitch_get_total_vports() API wants to work on const mlx5_core_dev*, change its helper functions also to accept const *dev. Signed-off-by: Parav Pandit Signed-off-by: Saeed Mahameed drivers/infiniband/hw/mlx5/ib_rep.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 4 +++- .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 26 +++++++++++++--------- drivers/net/ethernet/mellanox/mlx5/core/vport.c | 15 +++++++++++++ include/linux/mlx5/driver.h | 9 ++++---- include/linux/mlx5/eswitch.h | 3 +++ include/linux/mlx5/vport.h | 3 --- 8 files changed, 43 insertions(+), 21 deletions(-) commit 69ea0582f3ce7a72d312da7305e455801a8dc5a4 Merge: 2f40cf30c864 e4075c442876 Author: Jason Gunthorpe Date: Wed Jul 3 16:43:45 2019 -0300 Merge mlx5-next into rdma for-next From git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux Required for dependencies in the next patches. Resolved the conflicts: - esw_destroy_offloads_acl_tables() use the newer mlx5_esw_for_all_vports() version - esw_offloads_steering_init() drop the cap test - esw_offloads_init() drop the extra function arguments * branch 'mlx5-next': (39 commits) net/mlx5: Expose device definitions for object events net/mlx5: Report EQE data upon CQ completion net/mlx5: Report a CQ error event only when a handler was set net/mlx5: mlx5_core_create_cq() enhancements net/mlx5: Expose the API to register for ANY event net/mlx5: Use event mask based on device capabilities net/mlx5: Fix mlx5_core_destroy_cq() error flow net/mlx5: E-Switch, Handle UC address change in switchdev mode net/mlx5: E-Switch, Consider host PF for inline mode and vlan pop net/mlx5: E-Switch, Use iterator for vlan and min-inline setups net/mlx5: E-Switch, Reg/unreg function changed event at correct stage net/mlx5: E-Switch, Consolidate eswitch function number of VFs net/mlx5: E-Switch, Refactor eswitch SR-IOV interface net/mlx5: Handle host PF vport mac/guid for ECPF net/mlx5: E-Switch, Use correct flags when configuring vlan net/mlx5: Reduce dependency on enabled_vfs counter and num_vfs net/mlx5: Don't handle VF func change if host PF is disabled net/mlx5: Limit scope of mlx5_get_next_phys_dev() to PCI PF devices net/mlx5: Move pci status reg access mutex to mlx5_pci_init net/mlx5: Rename mlx5_pci_dev_type to mlx5_coredev_type ... Signed-off-by: Jason Gunthorpe commit a5b1615529ae088200e6990f3776ff019df672b4 Author: Felix Kuehling Date: Thu Jun 20 14:54:35 2019 -0400 drm/amdkfd: Disable idle optimization for chained runlist This works around difficult-to-reproduce soft hangs on oversubscribed runlists. Signed-off-by: Felix Kuehling Reviewed-by: Oak Zeng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue_v9.c | 1 + 1 file changed, 1 insertion(+) commit 7a049244a000c4b597e66c77b0e89aa35e88f6ea Author: Felix Kuehling Date: Thu Jun 20 14:50:52 2019 -0400 drm/amdkfd: Add chained_runlist_idle_disable flag to pm4_mes_runlist New flag to disable an idle runlist optimization that is causing soft hangs with some diffult-to-reproduce customer workloads. This will serve as a workaround until the problem can be reproduced and the root-cause determined. Signed-off-by: Felix Kuehling Reviewed-by: Oak Zeng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_pm4_headers_ai.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f4fd28b6c78cef054daf8d8b8dff8ef614ddfc00 Author: Felix Kuehling Date: Sat Jun 29 01:50:35 2019 -0400 drm/amdgpu: Fix tracking of invalid userptrs Restore the code that resets mem->invalid. Othewise so mapping userptrs after they got an MMU notifiers would always be skipped. This also avoids unnecessarily calling get_user_pages on BOs that have not been invalidated since the last try. Signed-off-by: Felix Kuehling Reviewed-by: Philip Yang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 6 ++++++ 1 file changed, 6 insertions(+) commit e7e2505326496c140db26c797fafea48a492b8c2 Author: Felix Kuehling Date: Fri Jun 7 11:33:21 2019 -0400 drm/amdgpu: Use FENCE_OWNER_KFD in process_sync_pds_resv We don't want eviction fences to trigger when waiting for page table updates to complete during restore. In theory there shouldn't be any unsignaled eviction fences in the PD reservation object, but I'm seeing them in instrumented code for reasons not fully understood. Signed-off-by: Felix Kuehling Reviewed-by: Philip Yang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 819ec5acf7593bfb84063d1b3890e80b30e1c6fa Author: Felix Kuehling Date: Thu Jun 20 15:37:37 2019 -0400 drm/amdkfd: Print a warning when the runlist becomes oversubscribed Oversubscription of queues or processes results in poor performance mostly because HWS blinbly schedules busy and idle queues, resulting in poor occupancy if many queues are idle. Let users know with a warning message when transitioning from a non-oversubscribed to an oversubscribed runlist. Signed-off-by: Felix Kuehling Reviewed-by: Oak Zeng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c | 6 +++++- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) commit 60e8523e2ea18dc0c0cea69d6c1d69a065019062 Author: Alastair D'Silva Date: Thu Jun 20 14:12:01 2019 +1000 ocxl: Allow contexts to be attached with a NULL mm If an OpenCAPI context is to be used directly by a kernel driver, there may not be a suitable mm to use. The patch makes the mm parameter to ocxl_context_attach optional. Signed-off-by: Alastair D'Silva Acked-by: Andrew Donnellan Acked-by: Frederic Barrat Acked-by: Nicholas Piggin Link: https://lore.kernel.org/r/20190620041203.12274-1-alastair@au1.ibm.com Signed-off-by: Greg Kroah-Hartman arch/powerpc/mm/book3s64/radix_tlb.c | 5 +++++ drivers/misc/ocxl/context.c | 9 ++++++--- drivers/misc/ocxl/link.c | 28 ++++++++++++++++++++++++---- 3 files changed, 35 insertions(+), 7 deletions(-) commit 62a6bc3a1e4f4ee9ae0076fa295f9af1c3725ce3 Author: Thierry Reding Date: Fri Jun 21 17:17:25 2019 +0200 driver: core: Allow subsystems to continue deferring probe Some subsystems, such as pinctrl, allow continuing to defer probe indefinitely. This is useful for devices that depend on resources provided by devices that are only probed after the init stage. One example of this can be seen on Tegra, where the DPAUX hardware contains pinmuxing controls for pins that it shares with an I2C controller. The I2C controller is typically used for communication with a monitor over HDMI (DDC). However, other instances of the I2C controller are used to access system critical components, such as a PMIC. The I2C controller driver will therefore usually be a builtin driver, whereas the DPAUX driver is part of the display driver that is loaded from a module to avoid bloating the kernel image with all of the DRM/KMS subsystem. In this particular case the pins used by this I2C/DDC controller become accessible very late in the boot process. However, since the controller is only used in conjunction with display, that's not an issue. Unfortunately the driver core currently outputs a warning message when a device fails to get the pinctrl before the end of the init stage. That can be confusing for the user because it may sound like an unwanted error occurred, whereas it's really an expected and harmless situation. In order to eliminate this warning, this patch allows callers of the driver_deferred_probe_check_state() helper to specify that they want to continue deferring probe, regardless of whether we're past the init stage or not. All of the callers of that function are updated for the new signature, but only the pinctrl subsystem passes a true value in the new persist parameter if appropriate. Signed-off-by: Thierry Reding Reviewed-by: Rafael J. Wysocki Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20190621151725.20414-1-thierry.reding@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/base/dd.c | 55 +++++++++++++++++++++++++++++++++++++------- drivers/pinctrl/devicetree.c | 7 +++--- include/linux/device.h | 1 + 3 files changed, 51 insertions(+), 12 deletions(-) commit 83b44fe343b5abfcb1b2261289bd0cfcfcfd60a8 Author: James Morse Date: Mon Jun 24 18:36:56 2019 +0100 drivers: base: cacheinfo: Ensure cpu hotplug work is done before Intel RDT The cacheinfo structures are alloced/freed by cpu online/offline callbacks. Originally these were only used by sysfs to expose the cache topology to user space. Without any in-kernel dependencies CPUHP_AP_ONLINE_DYN was an appropriate choice. resctrl has started using these structures to identify CPUs that share a cache. It updates its 'domain' structures from cpu online/offline callbacks. These depend on the cacheinfo structures (resctrl_online_cpu()->domain_add_cpu()->get_cache_id()-> get_cpu_cacheinfo()). These also run as CPUHP_AP_ONLINE_DYN. Now that there is an in-kernel dependency, move the cacheinfo work earlier so we know its done before resctrl's CPUHP_AP_ONLINE_DYN work runs. Fixes: 2264d9c74dda1 ("x86/intel_rdt: Build structures for each resource based on cache topology") Cc: Cc: Fenghua Yu Cc: Reinette Chatre Signed-off-by: James Morse Link: https://lore.kernel.org/r/20190624173656.202407-1-james.morse@arm.com Signed-off-by: Greg Kroah-Hartman drivers/base/cacheinfo.c | 3 ++- include/linux/cpuhotplug.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) commit 5ff88144f5880f7fafcb6a8e913eadca4cb233c8 Author: Maxime Ripard Date: Wed Jul 3 11:55:13 2019 +0200 dt-bindings: usb: ehci: Fix example warnings The example of the EHCI binding generates a bunch of warnings now that the examples are validated too. Most notably, phy-names isn't used at all, and the node name should be USB. Signed-off-by: Maxime Ripard Signed-off-by: Rob Herring Documentation/devicetree/bindings/usb/generic-ehci.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 67d0da99163f99eb39a931e79b128cbf0647dfdb Author: Maxime Ripard Date: Wed Jul 3 11:55:12 2019 +0200 dt-bindings: net: Use phy-mode instead of phy-connection-type When adding support for the DWMAC (and derivatives) bindings, phy-connection-type was required, even though the previous binding required the equivalent phy-mode. Let's fix this by using phy-mode as we should have. Signed-off-by: Maxime Ripard Signed-off-by: Rob Herring .../devicetree/bindings/net/allwinner,sun7i-a20-gmac.yaml | 4 ++-- .../devicetree/bindings/net/allwinner,sun8i-a83t-emac.yaml | 8 ++++---- Documentation/devicetree/bindings/net/snps,dwmac.yaml | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) commit ed8e3f51b6b7c0565840683328ce6e4b830cea9f Author: Maxime Ripard Date: Wed Jul 3 11:55:11 2019 +0200 dt-bindings: simple-framebuffer: Add requirement for pipelines Both the allwinner and amlogic compatibles require that either the allwinner,pipeline or the amlogic,pipeline property is set. This was dropped during the conversion since we didn't have conditionals back then, but we can express this properly now. Signed-off-by: Maxime Ripard Signed-off-by: Rob Herring .../bindings/display/simple-framebuffer.yaml | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit f4913aeed73fd917782043db36b362c8f5686128 Author: Maxime Ripard Date: Wed Jul 3 11:55:10 2019 +0200 dt-bindings: display: Fix simple-framebuffer example The simple-framebuffer binding has a compatible that isn't one of the valid options. Since an Allwinner pipeline is being described, let's add the matching compatible. Signed-off-by: Maxime Ripard Signed-off-by: Rob Herring Documentation/devicetree/bindings/display/simple-framebuffer.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5b19b6c31c21d33fde74f3bf3c2a3ae3d010f114 Author: Maxime Ripard Date: Wed Jul 3 11:55:09 2019 +0200 dt-bindings: net: mdio: Add child nodes The child nodes of a mdio bus are supposed to be ethernet PHYs, with a reg property. Make sure that's validated as well. Signed-off-by: Maxime Ripard Signed-off-by: Rob Herring Documentation/devicetree/bindings/net/mdio.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 960ebc8ac65e9eb9605f5cbee9fc189fed7c052f Author: Maxime Ripard Date: Wed Jul 3 11:55:08 2019 +0200 dt-bindings: net: mdio: Add address and size cells MDIO controllers should have child nodes with a singe value in their reg properties being the ID of the PHY in the bus. Let's add the proper constraints on #address-cells and #size-cells. Signed-off-by: Maxime Ripard Signed-off-by: Rob Herring Documentation/devicetree/bindings/net/mdio.yaml | 6 ++++++ 1 file changed, 6 insertions(+) commit 4c2c04c27df9d2e48153e0bf8a59aec97101fb8c Author: Maxime Ripard Date: Wed Jul 3 11:55:07 2019 +0200 dt-bindings: net: mdio: Add a nodename pattern The node name of an MDIO controller should be MDIO. Let's add a rule for this. Signed-off-by: Maxime Ripard Signed-off-by: Rob Herring Documentation/devicetree/bindings/net/mdio.yaml | 3 +++ 1 file changed, 3 insertions(+) commit 7ce98fb6c53d2311b3e9faae90b1a9c1a96534db Author: Eddie James Date: Wed Jun 26 13:56:55 2019 -0500 fsi: sbefifo: Don't fail operations when in SBE IPL state SBE fifo operations should be allowed while the SBE is in any of the "IPL" states. Operations should succeed in this state. Fixes: 9f4a8a2d7f9d fsi/sbefifo: Add driver for the SBE FIFO Reviewed-by: Joel Stanley Tested-by: Alistair Popple Signed-off-by: Eddie James Link: https://lore.kernel.org/r/1561575415-3282-1-git-send-email-eajames@linux.ibm.com Signed-off-by: Greg Kroah-Hartman drivers/fsi/fsi-sbefifo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 17c20f329a139e90e4b049b811ca6d1a2ae967e0 Author: Suzuki K Poulose Date: Fri Jun 21 11:52:05 2019 -0600 coresight: tmc: Smatch: Fix potential NULL pointer dereference Based on the following report from Smatch, fix the potential NULL pointer dereference check. The patch 743256e214e8: "coresight: tmc: Clean up device specific data" from May 22, 2019, leads to the following Smatch complaint: drivers/hwtracing/coresight/coresight-tmc-etr.c:625 tmc_etr_free_flat_buf() warn: variable dereferenced before check 'flat_buf' (see line 623) drivers/hwtracing/coresight/coresight-tmc-etr.c 622 struct etr_flat_buf *flat_buf = etr_buf->private; 623 struct device *real_dev = flat_buf->dev->parent; ^^^^^^^^^^ The patch introduces a new NULL check 624 625 if (flat_buf && flat_buf->daddr) ^^^^^^^^ but the existing code assumed it can be NULL. 626 dma_free_coherent(real_dev, flat_buf->size, 627 flat_buf->vaddr, flat_buf->daddr); Cc: Dan Carpenter Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20190621175205.24551-3-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-tmc-etr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 020601622323d02e09cebe05e7976b3d4b44e05d Author: Suzuki K Poulose Date: Fri Jun 21 11:52:04 2019 -0600 coresight: etm3x: Smatch: Fix potential NULL pointer dereference Based on the following report from Smatch tool, make sure we have a valid drvdata before we dereference it to find the real dev. The patch 21d26b905c05: "coresight: etm: Clean up device specific data" from May 22, 2019, leads to the following Smatch complaint: ./drivers/hwtracing/coresight/coresight-etm3x.c:460 etm_get_trace_id() warn: variable dereferenced before check 'drvdata' (see line 458) ./drivers/hwtracing/coresight/coresight-etm3x.c 457 int trace_id = -1; 458 struct device *etm_dev = drvdata->csdev->dev.parent; ^^^^^^^^^ New dereference 459 460 if (!drvdata) ^^^^^^^^ Checked too late. Delete the check? 461 goto out; 462 Cc: Mathieu Poirier Cc: Dan Carpenter Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20190621175205.24551-2-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-etm3x.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0530ef6b41e80c5cc979e0e50682302161edb6b7 Author: Dan Carpenter Date: Thu Jun 20 16:12:37 2019 -0600 coresight: Potential uninitialized variable in probe() The "drvdata->atclk" clock is optional, but if it gets set to an error pointer then we're accidentally return an uninitialized variable instead of success. Fixes: 78e6427b4e7b ("coresight: funnel: Support static funnel") Signed-off-by: Dan Carpenter Signed-off-by: Mathieu Poirier Cc: stable Link: https://lore.kernel.org/r/20190620221237.3536-6-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-funnel.c | 1 + 1 file changed, 1 insertion(+) commit 730766bae3280a25d40ea76a53dc6342e84e6513 Author: Suzuki K Poulose Date: Thu Jun 20 16:12:36 2019 -0600 coresight: etb10: Do not call smp_processor_id from preemptible During a perf session we try to allocate buffers on the "node" associated with the CPU the event is bound to. If it is not bound to a CPU, we use the current CPU node, using smp_processor_id(). However this is unsafe in a pre-emptible context and could generate the splats as below : BUG: using smp_processor_id() in preemptible [00000000] code: perf/2544 Use NUMA_NO_NODE hint instead of using the current node for events not bound to CPUs. Fixes: 2997aa4063d97fdb39 ("coresight: etb10: implementing AUX API") Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Cc: stable # 4.6+ Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20190620221237.3536-5-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-etb10.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 024c1fd9dbcc1d8a847f1311f999d35783921b7f Author: Suzuki K Poulose Date: Thu Jun 20 16:12:35 2019 -0600 coresight: tmc-etf: Do not call smp_processor_id from preemptible During a perf session we try to allocate buffers on the "node" associated with the CPU the event is bound to. If it is not bound to a CPU, we use the current CPU node, using smp_processor_id(). However this is unsafe in a pre-emptible context and could generate the splats as below : BUG: using smp_processor_id() in preemptible [00000000] code: perf/2544 caller is tmc_alloc_etf_buffer+0x5c/0x60 CPU: 2 PID: 2544 Comm: perf Not tainted 5.1.0-rc6-147786-g116841e #344 Hardware name: ARM LTD ARM Juno Development Platform/ARM Juno Development Platform, BIOS EDK II Feb 1 2019 Call trace: dump_backtrace+0x0/0x150 show_stack+0x14/0x20 dump_stack+0x9c/0xc4 debug_smp_processor_id+0x10c/0x110 tmc_alloc_etf_buffer+0x5c/0x60 etm_setup_aux+0x1c4/0x230 rb_alloc_aux+0x1b8/0x2b8 perf_mmap+0x35c/0x478 mmap_region+0x34c/0x4f0 do_mmap+0x2d8/0x418 vm_mmap_pgoff+0xd0/0xf8 ksys_mmap_pgoff+0x88/0xf8 __arm64_sys_mmap+0x28/0x38 el0_svc_handler+0xd8/0x138 el0_svc+0x8/0xc Use NUMA_NO_NODE hint instead of using the current node for events not bound to CPUs. Fixes: 2e499bbc1a929ac ("coresight: tmc: implementing TMC-ETF AUX space API") Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Cc: stable # 4.7+ Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20190620221237.3536-4-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-tmc-etf.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 3a8710392db2c70f74aed6f06b16e8bec0f05a35 Author: Suzuki K Poulose Date: Thu Jun 20 16:12:34 2019 -0600 coresight: tmc-etr: alloc_perf_buf: Do not call smp_processor_id from preemptible During a perf session we try to allocate buffers on the "node" associated with the CPU the event is bound to. If it is not bound to a CPU, we use the current CPU node, using smp_processor_id(). However this is unsafe in a pre-emptible context and could generate the splats as below : BUG: using smp_processor_id() in preemptible [00000000] code: perf/1743 caller is tmc_alloc_etr_buffer+0x1bc/0x1f0 CPU: 1 PID: 1743 Comm: perf Not tainted 5.1.0-rc6-147786-g116841e #344 Hardware name: ARM LTD ARM Juno Development Platform/ARM Juno Development Platform, BIOS EDK II Feb 1 2019 Call trace: dump_backtrace+0x0/0x150 show_stack+0x14/0x20 dump_stack+0x9c/0xc4 debug_smp_processor_id+0x10c/0x110 tmc_alloc_etr_buffer+0x1bc/0x1f0 etm_setup_aux+0x1c4/0x230 rb_alloc_aux+0x1b8/0x2b8 perf_mmap+0x35c/0x478 mmap_region+0x34c/0x4f0 do_mmap+0x2d8/0x418 vm_mmap_pgoff+0xd0/0xf8 ksys_mmap_pgoff+0x88/0xf8 __arm64_sys_mmap+0x28/0x38 el0_svc_handler+0xd8/0x138 el0_svc+0x8/0xc Use NUMA_NO_NODE hint instead of using the current node for events not bound to CPUs. Fixes: 22f429f19c4135d51e9 ("coresight: etm-perf: Add support for ETR backend") Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Cc: stable # 4.20+ Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20190620221237.3536-3-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-tmc-etr.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 3ff44563dbb02456a33f2a42000f04db4ef19a8f Author: Suzuki K Poulose Date: Thu Jun 20 16:12:33 2019 -0600 coresight: tmc-etr: Do not call smp_processor_id() from preemptible During a perf session we try to allocate buffers on the "node" associated with the CPU the event is bound to. If it's not bound to a CPU, we use the current CPU node, using smp_processor_id(). However this is unsafe in a pre-emptible context and could generate the splats as below : BUG: using smp_processor_id() in preemptible [00000000] code: perf/1743 caller is alloc_etr_buf.isra.6+0x80/0xa0 CPU: 1 PID: 1743 Comm: perf Not tainted 5.1.0-rc6-147786-g116841e #344 Hardware name: ARM LTD ARM Juno Development Platform/ARM Juno Development Platform, BIOS EDK II Feb 1 2019 Call trace: dump_backtrace+0x0/0x150 show_stack+0x14/0x20 dump_stack+0x9c/0xc4 debug_smp_processor_id+0x10c/0x110 alloc_etr_buf.isra.6+0x80/0xa0 tmc_alloc_etr_buffer+0x12c/0x1f0 etm_setup_aux+0x1c4/0x230 rb_alloc_aux+0x1b8/0x2b8 perf_mmap+0x35c/0x478 mmap_region+0x34c/0x4f0 do_mmap+0x2d8/0x418 vm_mmap_pgoff+0xd0/0xf8 ksys_mmap_pgoff+0x88/0xf8 __arm64_sys_mmap+0x28/0x38 el0_svc_handler+0xd8/0x138 el0_svc+0x8/0xc Use NUMA_NO_NODE hint instead of using the current node for events not bound to CPUs. Fixes: 855ab61c16bf70b646 ("coresight: tmc-etr: Refactor function tmc_etr_setup_perf_buf()") Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Cc: stable Link: https://lore.kernel.org/r/20190620221237.3536-2-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-tmc-etr.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 9b5db89ea4bfdbb23d4f85f3a7fbf2cd36d20146 Author: Mauro Carvalho Chehab Date: Fri Jun 28 18:23:13 2019 -0300 docs: misc-devices: convert files without extension to ReST Those files are also text files. Convert them to ReST and add to the misc-files index.rst. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/b7dc829809673bd8cffe0e7bbe9c9308681c6fe2.1561756511.git.mchehab+samsung@kernel.org Signed-off-by: Greg Kroah-Hartman Documentation/misc-devices/{eeprom => eeprom.rst} | 43 +++++++++++------- .../misc-devices/{ics932s401 => ics932s401.rst} | 7 ++- Documentation/misc-devices/index.rst | 5 +++ .../misc-devices/{isl29003 => isl29003.rst} | 15 ++++++- .../misc-devices/{lis3lv02d => lis3lv02d.rst} | 20 ++++++--- .../misc-devices/{max6875 => max6875.rst} | 52 ++++++++++++++++------ MAINTAINERS | 4 +- drivers/misc/isl29003.c | 2 +- drivers/platform/x86/Kconfig | 2 +- 9 files changed, 108 insertions(+), 42 deletions(-) commit c3ead2df9776ab22490d78a7f68a8ec58700e07f Merge: 0d581ba311a2 455302d1c9ae Author: David S. Miller Date: Wed Jul 3 12:09:00 2019 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2019-07-03 The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) Fix the interpreter to properly handle BPF_ALU32 | BPF_ARSH on BE architectures, from Jiong. 2) Fix several bugs in the x32 BPF JIT for handling shifts by 0, from Luke and Xi. 3) Fix NULL pointer deref in btf_type_is_resolve_source_only(), from Stanislav. 4) Properly handle the check that forwarding is enabled on the device in bpf_ipv6_fib_lookup() helper code, from Anton. 5) Fix UAPI bpf_prog_info fields alignment for archs that have 16 bit alignment such as m68k, from Baruch. 6) Fix kernel hanging in unregister_netdevice loop while unregistering device bound to XDP socket, from Ilya. 7) Properly terminate tail update in xskq_produce_flush_desc(), from Nathan. 8) Fix broken always_inline handling in test_lwt_seg6local, from Jiri. 9) Fix bpftool to use correct argument in cgroup errors, from Jakub. 10) Fix detaching dummy prog in XDP redirect sample code, from Prashant. 11) Add Jonathan to AF_XDP reviewers, from Björn. ==================== Signed-off-by: David S. Miller commit 0d581ba311a27762fe1a14e5db5f65d225b3d844 Author: Yonglong Liu Date: Wed Jul 3 19:12:30 2019 +0800 net: hns: add support for vlan TSO The hip07 chip support vlan TSO, this patch adds NETIF_F_TSO and NETIF_F_TSO6 flags to vlan_features to improve the performance after adding vlan to the net ports. Signed-off-by: Yonglong Liu Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_enet.c | 1 + 1 file changed, 1 insertion(+) commit 7af033010214f2c7cff31147d8970484d46cc14c Author: Xin Long Date: Wed Jul 3 18:20:20 2019 +0800 sctp: count data bundling sack chunk for outctrlchunks Now all ctrl chunks are counted for asoc stats.octrlchunks and net SCTP_MIB_OUTCTRLCHUNKS either after queuing up or bundling, other than the chunk maked and bundled in sctp_packet_bundle_sack, which caused 'outctrlchunks' not consistent with 'inctrlchunks' in peer. This issue exists since very beginning, here to fix it by increasing both net SCTP_MIB_OUTCTRLCHUNKS and asoc stats.octrlchunks when sack chunk is maked and bundled in sctp_packet_bundle_sack. Reported-by: Ja Ram Jeon Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Acked-by: Neil Horman Signed-off-by: David S. Miller net/sctp/output.c | 3 +++ 1 file changed, 3 insertions(+) commit 2559d7c4dd0eb17e6454fc7f52f9c5ea63a272df Author: Colin Ian King Date: Wed Jul 3 09:32:14 2019 +0100 qlcnic: remove redundant assignment to variable err The variable err is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b70d846cf446f71eda352be46a94e330e3255406 Author: Colin Ian King Date: Wed Jul 3 08:53:58 2019 +0100 atl1c: remove redundant assignment to variable tpd_req The variable tpd_req is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/atheros/atl1c/atl1c_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9fae54186c64db6faec85c194812fb2e5e970f77 Author: Hayes Wang Date: Wed Jul 3 15:11:56 2019 +0800 r8152: move calling r8153b_rx_agg_chg_indicate() r8153b_rx_agg_chg_indicate() needs to be called after enabling TX/RX and before calling rxdy_gated_en(tp, false). Otherwise, the change of the settings of RX aggregation wouldn't work. Besides, adjust rtl8152_set_coalesce() for the same reason. If rx_coalesce_usecs is changed, restart TX/RX to let the setting work. Signed-off-by: Hayes Wang Signed-off-by: David S. Miller drivers/net/usb/r8152.c | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) commit cedeac9df4b8386bc96b589d91e4f40e0b4b441b Author: Sudarsana Reddy Kalluru Date: Tue Jul 2 23:01:59 2019 -0700 qed: Add support for Timestamping the unicast PTP packets. This patch adds driver changes to detect/timestamp the unicast PTP packets. Changes from previous version: ------------------------------- v2: Defined a macro for unicast ptp param mask. Please consider applying this to "net-next". Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Ariel Elior Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_ptp.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 3c13ce74b6f885c2dcb2537b7f61a8e5afab002e Author: Catherine Sullivan Date: Tue Jul 2 15:46:57 2019 -0700 gve: Fix u64_stats_sync to initialize start u64_stats_fetch_begin needs to initialize start. Signed-off-by: Catherine Sullivan Reported-by: kbuild test robot Signed-off-by: David S. Miller drivers/net/ethernet/google/gve/gve_ethtool.c | 6 ++++-- drivers/net/ethernet/google/gve/gve_main.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) commit 1e64d7cbfdce4887008314d5b367209582223f27 Author: Stephen Hemminger Date: Tue Jul 2 15:20:21 2019 -0700 net: don't warn in inet diag when IPV6 is disabled If IPV6 was disabled, then ss command would cause a kernel warning because the command was attempting to dump IPV6 socket information. The fix is to just remove the warning. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=202249 Fixes: 432490f9d455 ("net: ip, diag -- Add diag interface for raw sockets") Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller net/ipv4/raw_diag.c | 3 --- 1 file changed, 3 deletions(-) commit d62962b37cebdc936e2bfcd69ea685da2c433727 Author: Mahesh Bandewar Date: Tue Jul 2 23:16:31 2019 -0700 loopback: fix lockdep splat dev_init_scheduler() and dev_activate() expect the caller to hold RTNL. Since we don't want blackhole device to be initialized per ns, we are initializing at init. [ 3.855027] Call Trace: [ 3.855034] dump_stack+0x67/0x95 [ 3.855037] lockdep_rcu_suspicious+0xd5/0x110 [ 3.855044] dev_init_scheduler+0xe3/0x120 [ 3.855048] ? net_olddevs_init+0x60/0x60 [ 3.855050] blackhole_netdev_init+0x45/0x6e [ 3.855052] do_one_initcall+0x6c/0x2fa [ 3.855058] ? rcu_read_lock_sched_held+0x8c/0xa0 [ 3.855066] kernel_init_freeable+0x1e5/0x288 [ 3.855071] ? rest_init+0x260/0x260 [ 3.855074] kernel_init+0xf/0x180 [ 3.855076] ? rest_init+0x260/0x260 [ 3.855078] ret_from_fork+0x24/0x30 Fixes: 4de83b88c66 ("loopback: create blackhole net device similar to loopack.") Reported-by: Geert Uytterhoeven Cc: Eric Dumazet Signed-off-by: Mahesh Bandewar Tested-by: Geert Uytterhoeven Signed-off-by: David S. Miller drivers/net/loopback.c | 2 ++ 1 file changed, 2 insertions(+) commit 0fd33116c1d8f8f9ff973c3d17280148068d77f4 Author: Geert Uytterhoeven Date: Mon May 27 14:27:03 2019 +0200 arch_topology: Remove error messages on out-of-memory conditions There is no need to print error messages if kcalloc() or alloc_cpumask_var() fail, as the memory allocation core already takes care of that. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20190527122703.6303-1-geert+renesas@glider.be Signed-off-by: Greg Kroah-Hartman drivers/base/arch_topology.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 2f40cf30c8644360d37287861d5288f00eab35e5 Author: Parav Pandit Date: Sun Jun 30 10:52:52 2019 +0300 IB/mlx5: Fixed reporting counters on 2nd port for Dual port RoCE Currently during dual port IB device registration in below code flow, ib_register_device() ib_device_register_sysfs() ib_setup_port_attrs() add_port() get_counter_table() get_perf_mad() process_mad() mlx5_ib_process_mad() mlx5_ib_process_mad() fails on 2nd port when both the ports are not fully setup at the device level (because 2nd port is unaffiliated). As a result, get_perf_mad() registers different PMA counter group for 1st and 2nd port, namely pma_counter_ext and pma_counter. However both ports have the same capability and counter offsets. Due to this when counters are read by the user via sysfs in below code flow, counters are queried from wrong location from the device mainly from PPCNT instead of VPORT counters. show_pma_counter() get_perf_mad() process_mad() mlx5_ib_process_mad() process_pma_cmd() This shows all zero counters for 2nd port. To overcome this, process_pma_cmd() is invoked, and when unaffiliated port is not yet setup during device registration phase, make the query on the first port. while at it, only process_pma_cmd() needs to work on the native port number and underlying mdev, so shift the get, put calls to where its needed inside process_pma_cmd(). Fixes: 212f2a87b74f ("IB/mlx5: Route MADs for dual port RoCE") Signed-off-by: Parav Pandit Reviewed-by: Daniel Jurgens Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/mad.c | 60 ++++++++++++++++++++++++---------------- 1 file changed, 36 insertions(+), 24 deletions(-) commit e4075c44287638b9a99430fea79a2d1468fbc27d Author: Yishai Hadas Date: Sun Jun 30 19:23:28 2019 +0300 net/mlx5: Expose device definitions for object events Expose an extra device definitions for objects events. It includes: object_type values for legacy objects and generic data header for any other object. Signed-off-by: Yishai Hadas Acked-by: Saeed Mahameed Signed-off-by: Leon Romanovsky include/linux/mlx5/mlx5_ifc.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 4e0e2ea1886afe8c001971ff767f6670312a9b04 Author: Yishai Hadas Date: Sun Jun 30 19:23:27 2019 +0300 net/mlx5: Report EQE data upon CQ completion Report EQE data upon CQ completion to let upper layers use this data. Signed-off-by: Yishai Hadas Acked-by: Saeed Mahameed Signed-off-by: Leon Romanovsky drivers/infiniband/hw/mlx5/cq.c | 2 +- drivers/infiniband/hw/mlx5/main.c | 2 +- drivers/infiniband/hw/mlx5/qp.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/cq.c | 5 +++-- drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/eq.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/fpga/conn.c | 3 ++- include/linux/mlx5/cq.h | 4 ++-- 9 files changed, 13 insertions(+), 11 deletions(-) commit 70a43d3fd4efba2de97152788df723c7812bb834 Author: Yishai Hadas Date: Sun Jun 30 19:23:26 2019 +0300 net/mlx5: Report a CQ error event only when a handler was set Report a CQ error event only when a handler was set. This enables mlx5_ib to not set a handler upon CQ creation and use some other mechanism to get this event as of other events by the mlx5_eq_notifier_register API. Signed-off-by: Yishai Hadas Acked-by: Saeed Mahameed Signed-off-by: Leon Romanovsky drivers/net/ethernet/mellanox/mlx5/core/eq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 38164b771947be9baf06e78ffdfb650f8f3e908e Author: Yishai Hadas Date: Sun Jun 30 19:23:25 2019 +0300 net/mlx5: mlx5_core_create_cq() enhancements Enhance mlx5_core_create_cq() to get the command out buffer from the callers to let them use the output. Signed-off-by: Yishai Hadas Acked-by: Saeed Mahameed Signed-off-by: Leon Romanovsky drivers/infiniband/hw/mlx5/cq.c | 3 ++- drivers/net/ethernet/mellanox/mlx5/core/cq.c | 7 +++---- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 3 ++- drivers/net/ethernet/mellanox/mlx5/core/fpga/conn.c | 3 ++- include/linux/mlx5/cq.h | 2 +- 5 files changed, 10 insertions(+), 8 deletions(-) commit 69416739ee3692f4ba890f153d9000e865b73c2d Author: Wu Hao Date: Thu Jun 27 17:49:39 2019 -0700 fpga: dfl: fme: align PR buffer size per PR datawidth Current driver checks if input bitstream file size is aligned or not per PR data width (default 32bits). It requires one additional step for end user when they generate the bitstream file, padding extra zeros to bitstream file to align its size per PR data width, but they don't have to as hardware will drop extra padding bytes automatically. In order to simplify the user steps, this patch aligns PR buffer size per PR data width in driver, to allow user to pass unaligned size bitstream files to driver. Signed-off-by: Xu Yilun Signed-off-by: Wu Hao Acked-by: Alan Tull Acked-by: Moritz Fischer Signed-off-by: Moritz Fischer Link: https://lore.kernel.org/r/20190628004951.6202-4-mdf@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/fpga/dfl-fme-pr.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 49ec630cd5e497c97c6a8a0fc4df5b2c88ca11c6 Author: Wu Hao Date: Thu Jun 27 17:49:38 2019 -0700 fpga: dfl: fme: remove copy_to_user() in ioctl for PR This patch removes copy_to_user() code in partial reconfiguration ioctl, as it's useless as user never needs to read the data structure after ioctl. Signed-off-by: Xu Yilun Signed-off-by: Wu Hao Acked-by: Moritz Fischer Acked-by: Alan Tull Signed-off-by: Moritz Fischer Link: https://lore.kernel.org/r/20190628004951.6202-3-mdf@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/fpga/dfl-fme-pr.c | 3 --- 1 file changed, 3 deletions(-) commit e150e3f4ad9aeda7610dee09f98ea69e0bc701b7 Author: Wu Hao Date: Thu Jun 27 17:49:37 2019 -0700 fpga: dfl-fme-mgr: fix FME_PR_INTFC_ID register address. FME_PR_INTFC_ID is used as compat_id for fpga manager and region, but high 64 bits and low 64 bits of the compat_id are swapped by mistake. This patch fixes this problem by fixing register address. Signed-off-by: Wu Hao Acked-by: Alan Tull Acked-by: Moritz Fischer Signed-off-by: Moritz Fischer Link: https://lore.kernel.org/r/20190628004951.6202-2-mdf@kernel.org Signed-off-by: Greg Kroah-Hartman drivers/fpga/dfl-fme-mgr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c0670781f54839fb9d0b2c0eaee58862601981bf Author: Yishai Hadas Date: Sun Jun 30 19:23:24 2019 +0300 net/mlx5: Expose the API to register for ANY event Expose the API to register for ANY event, mlx5_ib will be able to use this functionality for its needs. Signed-off-by: Yishai Hadas Acked-by: Saeed Mahameed Signed-off-by: Leon Romanovsky drivers/net/ethernet/mellanox/mlx5/core/eq.c | 2 ++ drivers/net/ethernet/mellanox/mlx5/core/lib/eq.h | 3 --- include/linux/mlx5/driver.h | 2 ++ 3 files changed, 4 insertions(+), 3 deletions(-) commit b9a7ba5562074855e8a3f92ea7e1174b61a3e87d Author: Yishai Hadas Date: Sun Jun 30 19:23:23 2019 +0300 net/mlx5: Use event mask based on device capabilities Use the reported device capabilities for the supported user events (i.e. affiliated and un-affiliated) to set the EQ mask. As the event mask can be up to 256 defined by 4 entries of u64 change the applicable code to work accordingly. Signed-off-by: Yishai Hadas Acked-by: Saeed Mahameed Signed-off-by: Leon Romanovsky drivers/infiniband/hw/mlx5/odp.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/eq.c | 40 ++++++++++++++++++++++------ drivers/net/ethernet/mellanox/mlx5/core/fw.c | 6 +++++ include/linux/mlx5/device.h | 6 ++++- include/linux/mlx5/eq.h | 2 +- include/linux/mlx5/mlx5_ifc.h | 13 ++++++--- 6 files changed, 55 insertions(+), 14 deletions(-) commit 1d49ce1e05f804d9238eda66d6010eb492668a37 Author: Yishai Hadas Date: Sun Jun 30 19:23:22 2019 +0300 net/mlx5: Fix mlx5_core_destroy_cq() error flow The firmware command to destroy a CQ might fail when the object is referenced by other object and the ref count is managed by the firmware. To enable a second successful destruction post the first failure need to change mlx5_eq_del_cq() to be a void function. As an error in mlx5_eq_del_cq() is quite fatal from the option to recover, a debug message inside it should be good enougth and it was changed to be void. Signed-off-by: Yishai Hadas Acked-by: Saeed Mahameed Signed-off-by: Leon Romanovsky drivers/net/ethernet/mellanox/mlx5/core/cq.c | 9 ++------- drivers/net/ethernet/mellanox/mlx5/core/eq.c | 16 +++++++--------- drivers/net/ethernet/mellanox/mlx5/core/lib/eq.h | 2 +- 3 files changed, 10 insertions(+), 17 deletions(-) commit 6044414fa849e14fa0de60a75e3f85ea048c89db Author: YueHaibing Date: Wed Jul 3 03:10:21 2019 +0000 RDMA/hns: Remove set but not used variable 'fclr_write_fail_flag' Fixes gcc '-Wunused-but-set-variable' warning: drivers/infiniband/hw/hns/hns_roce_hw_v2.c: In function 'hns_roce_function_clear': drivers/infiniband/hw/hns/hns_roce_hw_v2.c:1135:7: warning: variable 'fclr_write_fail_flag' set but not used [-Wunused-but-set-variable] It is never used, so can be removed. Signed-off-by: YueHaibing Reviewed-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 2 -- 1 file changed, 2 deletions(-) commit 2e67e775845373905d2c2aecb9062c2c4352a535 Author: Liu, Changcheng Date: Fri Jun 28 14:16:13 2019 +0800 RDMA/i40iw: Set queue pair state when being queried The API for ib_query_qp requires the driver to set qp_state and cur_qp_state on return, add the missing sets. Fixes: d37498417947 ("i40iw: add files for iwarp interface") Signed-off-by: Changcheng Liu Acked-by: Shiraz Saleem Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/i40iw/i40iw_verbs.c | 2 ++ 1 file changed, 2 insertions(+) commit 011bd05d1f5d99eeb91e8a6f81f00654a2b8d3d1 Author: Sergey Organov Date: Wed Jun 26 17:11:30 2019 +0300 serial: imx: set_termios(): preserve RTS state imx_set_termios() cleared RTS on every call, now fixed. Reviewed-by: Sascha Hauer Tested-by: Sascha Hauer Signed-off-by: Sergey Organov Link: https://lore.kernel.org/r/1561558293-7683-5-git-send-email-sorganov@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit ddf89e7503deb931403add648b67545ec196c3fe Author: Sergey Organov Date: Wed Jun 26 17:11:29 2019 +0300 serial: imx: set_termios(): clarify RTS/CTS bits calculation Avoid repeating the same code for rs485 twice. Make it obvious we clear CRTSCTS bit in termios->c_cflag whenever sport->have_rtscts is false. Make it obvious we clear UCR2_IRTS whenever CRTSCTS is set. Reviewed-by: Sascha Hauer Tested-by: Sascha Hauer Signed-off-by: Sergey Organov Link: https://lore.kernel.org/r/1561558293-7683-4-git-send-email-sorganov@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 38 ++++++++++++++------------------------ 1 file changed, 14 insertions(+), 24 deletions(-) commit 41ffa48ea7b21330d2e7d87558bb710700da4609 Author: Sergey Organov Date: Wed Jun 26 17:11:28 2019 +0300 serial: imx: set_termios(): factor-out 'ucr2' initial value Set common bits in a separate statement to make initialization explicit and not repeat the common part. Reviewed-by: Sascha Hauer Tested-by: Sascha Hauer Signed-off-by: Sergey Organov Reviewed-by: Uwe Kleine-Knig Link: https://lore.kernel.org/r/1561558293-7683-3-git-send-email-sorganov@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit cda8cf56d8e29c70dc8a3d989846c66ed1638e74 Author: Fuqian Huang Date: Thu Jul 4 00:27:42 2019 +0800 IB/i40iw: Use kmemdup rather than open coding Use kmemdump instead of kzmalloc + memcpy. Signed-off-by: Fuqian Huang Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/i40iw/i40iw_cm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 775b7ffd7d6d5db320d99b0a485c51e04dfcf9f1 Author: Geert Uytterhoeven Date: Mon Jun 24 14:35:40 2019 +0200 serial: sh-sci: Terminate TX DMA during buffer flushing While the .flush_buffer() callback clears sci_port.tx_dma_len since commit 1cf4a7efdc71cab8 ("serial: sh-sci: Fix race condition causing garbage during shutdown"), it does not terminate a transmit DMA operation that may be in progress. Fix this by terminating any pending DMA operations, and resetting the corresponding cookie. Signed-off-by: Geert Uytterhoeven Reviewed-by: Eugeniu Rosca Tested-by: Eugeniu Rosca Link: https://lore.kernel.org/r/20190624123540.20629-3-geert+renesas@glider.be Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sh-sci.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 8493eab02608b0e82f67b892aa72882e510c31d0 Author: Geert Uytterhoeven Date: Mon Jun 24 14:35:39 2019 +0200 serial: sh-sci: Fix TX DMA buffer flushing and workqueue races When uart_flush_buffer() is called, the .flush_buffer() callback zeroes the tx_dma_len field. This may race with the work queue function handling transmit DMA requests: 1. If the buffer is flushed before the first DMA API call, dmaengine_prep_slave_single() may be called with a zero length, causing the DMA request to never complete, leading to messages like: rcar-dmac e7300000.dma-controller: Channel Address Error happen and, with debug enabled: sh-sci e6e88000.serial: sci_dma_tx_work_fn: ffff800639b55000: 0...0, cookie 126 and DMA timeouts. 2. If the buffer is flushed after the first DMA API call, but before the second, dma_sync_single_for_device() may be called with a zero length, causing the transmit data not to be flushed to RAM, and leading to stale data being output. Fix this by: 1. Letting sci_dma_tx_work_fn() return immediately if the transmit buffer is empty, 2. Extending the critical section to cover all DMA preparational work, so tx_dma_len stays consistent for all of it, 3. Using local copies of circ_buf.head and circ_buf.tail, to make sure they match the actual operation above. Reported-by: Eugeniu Rosca Suggested-by: Yoshihiro Shimoda Signed-off-by: Geert Uytterhoeven Reviewed-by: Eugeniu Rosca Tested-by: Eugeniu Rosca Link: https://lore.kernel.org/r/20190624123540.20629-2-geert+renesas@glider.be Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sh-sci.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) commit ecd6bf67da3126e8ec731c2dd8cb6c2f17d9563a Author: Mark Greer Date: Wed Jun 26 09:05:53 2019 -0700 serial: mpsc: Remove obsolete MPSC driver Support for the Marvell MV64x60 line of bridge chips that contained MPSC controllers has been removed and there are no other components that have that controller so remove its driver. Signed-off-by: Mark Greer Link: https://lore.kernel.org/r/20190626160553.28518-1-mgreer@animalcreek.com Signed-off-by: Greg Kroah-Hartman Documentation/admin-guide/devices.txt | 4 +- drivers/tty/serial/Kconfig | 14 - drivers/tty/serial/Makefile | 1 - drivers/tty/serial/mpsc.c | 2138 --------------------------------- include/linux/mv643xx.h | 46 - include/uapi/linux/serial_core.h | 2 +- 6 files changed, 3 insertions(+), 2202 deletions(-) commit b7a8f766482fa5893ca95cbf83195e60e96e389e Author: Wei Yongjun Date: Wed Jul 3 05:59:08 2019 +0000 serial: 8250: 8250_core: Fix missing unlock on error in serial8250_register_8250_port() Add the missing unlock before return from function serial8250_register_8250_port() in the error handling case. Signed-off-by: Wei Yongjun Link: https://lore.kernel.org/r/20190703055908.141294-1-weiyongjun1@huawei.com Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_core.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 5d7d78eaecc5c91c9b2001e544a0ae2788d40d1c Author: Fuqian Huang Date: Fri Jun 28 01:38:04 2019 +0800 IB/ipoib: Remove memset after vzalloc in ipoib_cm.c vzalloc has already zeroed the memory. So a memset is unneeded. Signed-off-by: Fuqian Huang Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe drivers/infiniband/ulp/ipoib/ipoib_cm.c | 1 - 1 file changed, 1 deletion(-) commit 4c44d4634b5c90993fccca9f155347221df6f877 Author: Fuqian Huang Date: Fri Jun 28 10:47:19 2019 +0800 IB: Remove unneeded memset In commit af7ddd8a627c ("Merge tag 'dma-mapping-4.21' of git://git.infradead.org/users/hch/dma-mapping"), dma_alloc_coherent/dmam_alloc_coherent always zeroed the returned memory. So the memset after a coherent allocation function is not needed. Signed-off-by: Fuqian Huang Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/cxgb3/cxio_hal.c | 3 --- drivers/infiniband/hw/cxgb4/cq.c | 1 - drivers/infiniband/hw/cxgb4/qp.c | 1 - drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 1 - drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 3 --- drivers/infiniband/hw/mthca/mthca_allocator.c | 2 -- drivers/infiniband/hw/ocrdma/ocrdma_hw.c | 3 --- 7 files changed, 14 deletions(-) commit a387fd90d4685b97352f1f6b2773b9402d26ec54 Author: Nikhil Badola Date: Mon Jun 24 15:22:19 2019 +0800 usb :fsl: Change string format for errata property Remove USB errata checking code from driver. Applicability of erratum is retrieved by reading corresponding property in device tree. This property is written during device tree fixup. Signed-off-by: Ramneek Mehresh Signed-off-by: Nikhil Badola Signed-off-by: Yinbo Zhu Link: https://lore.kernel.org/r/20190624072219.15258-5-yinbo.zhu@nxp.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/fsl-mph-dr-of.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit c1f9d2e4110cbcbbba844406e58ed41120166a73 Author: Ramneek Mehresh Date: Mon Jun 24 15:22:18 2019 +0800 usb: host: Stops USB controller init if PLL fails to lock USB erratum-A006918 workaround tries to start internal PHY inside uboot (when PLL fails to lock). However, if the workaround also fails, then USB initialization is also stopped inside Linux. Erratum-A006918 workaround failure creates "fsl,erratum_a006918" node in device-tree. Presence of this node in device-tree is used to stop USB controller initialization in Linux Signed-off-by: Ramneek Mehresh Signed-off-by: Suresh Gupta Signed-off-by: Yinbo Zhu Link: https://lore.kernel.org/r/20190624072219.15258-4-yinbo.zhu@nxp.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ehci-fsl.c | 9 +++++++++ drivers/usb/host/fsl-mph-dr-of.c | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) commit 1a4dcb8aed681c426954b1cf7e4b78aab465690e Author: Yinbo Zhu Date: Mon Jun 24 15:22:17 2019 +0800 usb: linux/fsl_device: Add platform member has_fsl_erratum_a006918 This patch is to add member has_fsl_erratum_a006918 in platform data Signed-off-by: Yinbo Zhu Link: https://lore.kernel.org/r/20190624072219.15258-3-yinbo.zhu@nxp.com Signed-off-by: Greg Kroah-Hartman include/linux/fsl_devices.h | 1 + 1 file changed, 1 insertion(+) commit 5dfff995f9cb21c2910e40f5d4da53473356a792 Author: Suresh Gupta Date: Mon Jun 24 15:22:16 2019 +0800 usb: phy: Workaround for USB erratum-A005728 PHY_CLK_VALID bit for UTMI PHY in USBDR does not set even if PHY is providing valid clock. Workaround for this involves resetting of PHY and check PHY_CLK_VALID bit multiple times. If PHY_CLK_VALID bit is still not set even after 5 retries, it would be safe to deaclare that PHY clock is not available. This erratum is applicable for USBDR less then ver 2.4. Signed-off-by: Suresh Gupta Signed-off-by: Yinbo Zhu Link: https://lore.kernel.org/r/20190624072219.15258-2-yinbo.zhu@nxp.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ehci-fsl.c | 37 ++++++++++++++++++++++++++----------- drivers/usb/host/ehci-fsl.h | 3 +++ 2 files changed, 29 insertions(+), 11 deletions(-) commit 4f182835508c2d3dc6f5cc0e56b65b4c1ca325f8 Author: Nikhil Badola Date: Mon Jun 24 15:22:15 2019 +0800 usb: fsl: Set USB_EN bit to select ULPI phy Set USB_EN bit to select ULPI phy for USB controller version 2.5 Signed-off-by: Nikhil Badola Signed-off-by: Yinbo Zhu Link: https://lore.kernel.org/r/20190624072219.15258-1-yinbo.zhu@nxp.com Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ehci-fsl.c | 6 ++++++ 1 file changed, 6 insertions(+) commit e244c4699f859cf7149b0781b1894c7996a8a1df Author: Lee, Chiasheng Date: Thu Jun 20 10:56:04 2019 +0300 usb: Handle USB3 remote wakeup for LPM enabled devices correctly With Link Power Management (LPM) enabled USB3 links transition to low power U1/U2 link states from U0 state automatically. Current hub code detects USB3 remote wakeups by checking if the software state still shows suspended, but the link has transitioned from suspended U3 to enabled U0 state. As it takes some time before the hub thread reads the port link state after a USB3 wake notification, the link may have transitioned from U0 to U1/U2, and wake is not detected by hub code. Fix this by handling U1/U2 states in the same way as U0 in USB3 wakeup handling This patch should be added to stable kernels since 4.13 where LPM was kept enabled during suspend/resume Cc: # v4.13+ Signed-off-by: Lee, Chiasheng Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hub.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 2681795b5e7a5bf336537661010072f4c22cea31 Author: Nikolaus Voss Date: Fri Jun 28 11:01:09 2019 +0200 drivers/usb/typec/tps6598x.c: fix 4CC cmd write Writing 4CC commands with tps6598x_write_4cc() already has a pointer arg, don't reference it when using as arg to tps6598x_block_write(). Correcting this enforces the constness of the pointer to propagate to tps6598x_block_write(), so add the const qualifier there to avoid the warning. Fixes: 0a4c005bd171 ("usb: typec: driver for TI TPS6598x USB Power Delivery controllers") Signed-off-by: Nikolaus Voss Acked-by: Heikki Krogerus Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/tps6598x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 05da75fc651138e51ff74ace97174349910463f5 Author: Nikolaus Voss Date: Fri Jun 28 11:01:08 2019 +0200 drivers/usb/typec/tps6598x.c: fix portinfo width Portinfo bit field is 3 bits wide, not 2 bits. This led to a wrong driver configuration for some tps6598x configurations. Fixes: 0a4c005bd171 ("usb: typec: driver for TI TPS6598x USB Power Delivery controllers") Signed-off-by: Nikolaus Voss Acked-by: Heikki Krogerus Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/tps6598x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 349148785b8cea9781af520fd53c29ee8087ee74 Author: Marcos Paulo de Souza Date: Tue Jun 18 19:44:54 2019 -0300 usb: storage: scsiglue: Do not skip VPD if try_vpd_pages is set If BLIST_TRY_VPD_PAGES is set for a device, even for an USB, it should be honored, so only set skip_vpd_pages is try_vpd_pages is not set. Signed-off-by: Marcos Paulo de Souza Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/storage/scsiglue.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 5b2736ce361989882636d4b105d1146ca3382f47 Author: Colin Ian King Date: Wed Jul 3 09:14:34 2019 +0100 staging: rtl8723bs: hal: remove redundant assignment to packetType Local variable packetType is being assigned a value that is never read just before a return statement. The assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20190703081434.17489-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/hal_btcoex.c | 1 - 1 file changed, 1 deletion(-) commit 14c77a18375db381426d3a0e6e7aaf87af9a8143 Author: Nishka Dasgupta Date: Tue Jul 2 12:31:32 2019 +0530 staging: rtl8723bs: Change return type of hal_btcoex_IsBtDisabled() Change return type of hal_btcoex_IsBtDisabled from u8 to bool as the only possible return values are true and false. Where needed, modify accordingly the type of the variables used to store this return value. Signed-off-by: Nishka Dasgupta Link: https://lore.kernel.org/r/20190702070132.6997-9-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/hal_btcoex.c | 2 +- drivers/staging/rtl8723bs/hal/rtl8723b_dm.c | 2 +- drivers/staging/rtl8723bs/include/hal_btcoex.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 66e8fafb70c206e2c5953ad8df6277fb2b0516da Author: Nishka Dasgupta Date: Tue Jul 2 12:31:31 2019 +0530 staging: rtl8723bs: Remove rtw_btcoex_DisplayBtCoexInfo() Remove function rtw_btcoex_DisplayBtCoexInfo as all it does is call hal_btcoex_DisplayBtCoexInfo. Modify call site accordingly. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Link: https://lore.kernel.org/r/20190702070132.6997-8-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_btcoex.c | 5 ----- drivers/staging/rtl8723bs/core/rtw_debug.c | 2 +- drivers/staging/rtl8723bs/include/rtw_btcoex.h | 1 - 3 files changed, 1 insertion(+), 7 deletions(-) commit eb408965f0e1846631cf82cfcbb3320bca79b456 Author: Nishka Dasgupta Date: Tue Jul 2 12:31:30 2019 +0530 staging: rtl8723bs: Remove function rtw_btcoex_GetDBG() Remove function rtw_btcoex_GetDBG as all it does is call hal_btcoex_GetDBG. Modify call site accordingly. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Link: https://lore.kernel.org/r/20190702070132.6997-7-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_btcoex.c | 5 ----- drivers/staging/rtl8723bs/core/rtw_debug.c | 2 +- drivers/staging/rtl8723bs/include/rtw_btcoex.h | 1 - 3 files changed, 1 insertion(+), 7 deletions(-) commit 24c4326e342d55f5a87d0da13bdcaa1335216d8b Author: Nishka Dasgupta Date: Tue Jul 2 12:31:29 2019 +0530 staging: rtl8723bs: Remove function rtw_btcoex_SetDBG() Remove function rtw_btcoex_SetDBG as all it does is call hal_btcoex_setDBG. Modify call sites accordingly. Include the header file for hal_btcoex in the file that now calls hal_btcoex_SetDBG instead of rtw_btcoex_SetDBG. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Link: https://lore.kernel.org/r/20190702070132.6997-6-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_btcoex.c | 5 ----- drivers/staging/rtl8723bs/core/rtw_debug.c | 3 ++- drivers/staging/rtl8723bs/include/rtw_btcoex.h | 1 - 3 files changed, 2 insertions(+), 7 deletions(-) commit d312a47f35f71af0a3da9be7783d4c91b91fedce Author: Nishka Dasgupta Date: Tue Jul 2 12:31:28 2019 +0530 staging: rtl8723bs: Remove rtw_btcoex_IsBTCoexCtrlAMPDUSize() Remove function rtw_btcoex_IsBTCoexCtrlAMPDUSize as it does nothing except call hal_btcoex_IsBTCoexCtrlAMPDUSize. Modify call site accordingly. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Link: https://lore.kernel.org/r/20190702070132.6997-5-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_btcoex.c | 9 --------- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 5 +++-- drivers/staging/rtl8723bs/include/rtw_btcoex.h | 1 - 3 files changed, 3 insertions(+), 12 deletions(-) commit aa0963a11669f0d10f8e263885e253d7ced4937a Author: Nishka Dasgupta Date: Tue Jul 2 12:31:27 2019 +0530 staging: rtl8723bs: Remove rtw_btcoex_BtInfoNotify() Remove function rtw_btcoex_BtInfoNotify as it does nothing except call hal_btcoex_BtInfoNotify. Modify call sites accordingly. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Link: https://lore.kernel.org/r/20190702070132.6997-4-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_btcoex.c | 5 ----- drivers/staging/rtl8723bs/core/rtw_cmd.c | 2 +- drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 4 ++-- drivers/staging/rtl8723bs/include/rtw_btcoex.h | 1 - 4 files changed, 3 insertions(+), 9 deletions(-) commit a47a70c25777ac06c9d2e09030377cfee851edee Author: Nishka Dasgupta Date: Tue Jul 2 12:31:26 2019 +0530 staging: rtl8723bs: Remove rtw_btcoex_ScanNotify() Remove function rtw_btcoex_ScanNotify as all it does is call hal_btcoex_ScanNotify. Modify call sites accordingly. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Link: https://lore.kernel.org/r/20190702070132.6997-3-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_btcoex.c | 5 ----- drivers/staging/rtl8723bs/core/rtw_cmd.c | 2 +- drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 2 +- drivers/staging/rtl8723bs/include/rtw_btcoex.h | 1 - 4 files changed, 2 insertions(+), 8 deletions(-) commit b3a74e04f1c890bceba0737da27f000d2805333f Author: Nishka Dasgupta Date: Tue Jul 2 12:31:25 2019 +0530 staging: rtl8723bs: Remove rtw_btcoex_SetSingleAntPath() Remove function rtw_btcoex_SetSingleAntPath as all it does is call hal_btcoex_SetSingleAntPath. Modify call site. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Link: https://lore.kernel.org/r/20190702070132.6997-2-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_btcoex.c | 5 ----- drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 2 +- drivers/staging/rtl8723bs/include/rtw_btcoex.h | 1 - 3 files changed, 1 insertion(+), 7 deletions(-) commit db3592d9852aaaf9205f7aea8b52a5195ee53e50 Author: Nishka Dasgupta Date: Tue Jul 2 12:31:24 2019 +0530 staging: rtl8723bs: Remove rtw_btcoex_SetPGAntNum() Remove function rtw_btcoex_SetPGAntNum as it does nothing except call hal_btcoex_SetPgAntNum. Modify call site accordingly. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Link: https://lore.kernel.org/r/20190702070132.6997-1-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_btcoex.c | 5 ----- drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 2 +- drivers/staging/rtl8723bs/include/rtw_btcoex.h | 1 - 3 files changed, 1 insertion(+), 7 deletions(-) commit 2d9164321b6c9710326c12c9db19af6e2ce3dc85 Author: Colin Ian King Date: Tue Jul 2 10:56:47 2019 +0100 staging: rtl8192e: remove redundant initialization of rtstatus Variable rtstatus is being initialized with a value that is never read as it is being overwritten inside a do-while loop. Clean up the code by removing the redundant initialization. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20190702095647.26378-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 69fa65f92d930a82c51352b071089f5316fbdc32 Author: Nishka Dasgupta Date: Mon Jul 1 14:48:17 2019 +0530 staging: rtl8723bs: Remove rtw_btcoex_GetRaMask() Remove function rtw_btcoex_GetRaMask as all it does is call hal_btcoex_GetRaMask. Modify call site accordingly. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Link: https://lore.kernel.org/r/20190701091817.12759-10-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_btcoex.c | 5 ----- drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 2 +- drivers/staging/rtl8723bs/include/rtw_btcoex.h | 1 - 3 files changed, 1 insertion(+), 7 deletions(-) commit efa6b6c9c4c3d868db79753578a44da9742f6da1 Author: Nishka Dasgupta Date: Mon Jul 1 14:48:16 2019 +0530 staging: rtl8723bs: Remove rtw_btcoex_SetChipType() Remove function rtw_btcoex_SetChipType as it does nothing but call hal_btcoex_SetChipType. Modify call site accordingly. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Link: https://lore.kernel.org/r/20190701091817.12759-9-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_btcoex.c | 5 ----- drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 2 +- drivers/staging/rtl8723bs/include/rtw_btcoex.h | 1 - 3 files changed, 1 insertion(+), 7 deletions(-) commit 8739e064de6f1fc0369851510c5dccd8632c5d17 Author: Nishka Dasgupta Date: Mon Jul 1 14:48:15 2019 +0530 staging: rtl8723bs: Remove rtw_btcoex_ConnectNotify() Remove function rtw_btcoex_ConnectNotify as all it does is call hal_btcoex_ConnectNotify. Modify call sites accordingly. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Link: https://lore.kernel.org/r/20190701091817.12759-8-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_btcoex.c | 5 ----- drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 4 ++-- drivers/staging/rtl8723bs/include/rtw_btcoex.h | 1 - 3 files changed, 2 insertions(+), 8 deletions(-) commit 5355735196369c3aea955ce41eacd8fef7db4fda Author: Nishka Dasgupta Date: Mon Jul 1 14:48:14 2019 +0530 staging: rtl8723bs: Remove rtw_btcoex_SetBTCoexist() Remove function rtw_btcoex_SetBTCoexist as it does nothing except call hal_btcoex_SetBTCoexist. Modify call sites accordingly. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Link: https://lore.kernel.org/r/20190701091817.12759-7-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_btcoex.c | 5 ----- drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 2 +- drivers/staging/rtl8723bs/include/rtw_btcoex.h | 1 - 3 files changed, 1 insertion(+), 7 deletions(-) commit d1f4b78027202d8cb8a45c885038f5fd70e0eaf2 Author: Nishka Dasgupta Date: Mon Jul 1 14:48:13 2019 +0530 staging: rtl8723bs: Remove rtw_btcoex_IsBtDisabled() Remove function rtw_btcoex_IsBtDisabled as it does nothing except call hal_btcoex_IsBtDisabled. Modify call sites accordingly. Issue found wth Coccinelle. Signed-off-by: Nishka Dasgupta Link: https://lore.kernel.org/r/20190701091817.12759-6-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_btcoex.c | 5 ----- drivers/staging/rtl8723bs/core/rtw_mlme.c | 2 +- drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 8 ++++---- drivers/staging/rtl8723bs/hal/rtl8723b_dm.c | 2 +- drivers/staging/rtl8723bs/include/rtw_btcoex.h | 1 - 5 files changed, 6 insertions(+), 12 deletions(-) commit 606e33cead2a523ce2354821c5898697adad3235 Author: Nishka Dasgupta Date: Mon Jul 1 14:48:12 2019 +0530 staging: rtl8723bs: Remove rtw_btcoex_IsBtControlLps() Remove function rtw_btcoex_IsBtControlLps as it does nothing except call hal_btcoex_IsBtControlLps. Modify call sites accordingly. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Link: https://lore.kernel.org/r/20190701091817.12759-5-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_btcoex.c | 5 ----- drivers/staging/rtl8723bs/core/rtw_cmd.c | 2 +- drivers/staging/rtl8723bs/core/rtw_mlme.c | 5 +++-- drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 22 +++++++++++----------- drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c | 2 +- drivers/staging/rtl8723bs/include/rtw_btcoex.h | 1 - 6 files changed, 16 insertions(+), 21 deletions(-) commit a158111d54d4801f3507b10dcffe5701f3009cb3 Author: Nishka Dasgupta Date: Mon Jul 1 14:48:11 2019 +0530 staging: rtl8723bs: Remove rtw_btcoex_Handler() Remove function rtw_btcoex_Handler as it does nothing except call hal_btcoex_Handler. Modify call site accordingly. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Link: https://lore.kernel.org/r/20190701091817.12759-4-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_btcoex.c | 5 ----- drivers/staging/rtl8723bs/core/rtw_cmd.c | 2 +- drivers/staging/rtl8723bs/include/rtw_btcoex.h | 1 - 3 files changed, 1 insertion(+), 7 deletions(-) commit ee8e2ce55df0109af56b0a4278db8ebe52886634 Author: Nishka Dasgupta Date: Mon Jul 1 14:48:10 2019 +0530 staging: rtl8723bs: Remove rtw_btcoex_LpsVal() Remove function rtw_btcoex_LpsVal as all it does is call hal_btcoex_LpsVal. Modify call sites accordingly. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Link: https://lore.kernel.org/r/20190701091817.12759-3-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_btcoex.c | 7 +------ drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 8 ++++---- drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c | 2 +- drivers/staging/rtl8723bs/include/rtw_btcoex.h | 1 - 4 files changed, 6 insertions(+), 12 deletions(-) commit f0ef8d3e200db6b884be9240cef213ecf56197bd Author: Nishka Dasgupta Date: Mon Jul 1 14:48:09 2019 +0530 staging: rtl8723bs: Remove rtw_btcoex_RecordPwrMode() Remove function rtw_btcoex_RecordPwrMode as all it does is call hal_btcoex_RecordPwrMode. Modify call sites accordingly. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Link: https://lore.kernel.org/r/20190701091817.12759-2-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_btcoex.c | 5 ----- drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c | 2 +- drivers/staging/rtl8723bs/include/rtw_btcoex.h | 1 - 3 files changed, 1 insertion(+), 7 deletions(-) commit 78c5f096d7ea92276c0c3aca40b6dcdedcb9bb8f Author: Nishka Dasgupta Date: Mon Jul 1 14:48:08 2019 +0530 staging: rtl8723bs: Remove rtw_btcoex_RpwmVal() Remove function rtw_btcoex_RpwmVal as all it does is call hal_btcoex_RpwmVal. Modify call sites accordingly. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Link: https://lore.kernel.org/r/20190701091817.12759-1-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_btcoex.c | 5 ----- drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c | 2 +- drivers/staging/rtl8723bs/include/rtw_btcoex.h | 1 - 3 files changed, 1 insertion(+), 7 deletions(-) commit 6a2ac8d4bf91d56c6335db0fc0585b9788397a3b Author: Simon Sandström Date: Mon Jul 1 11:18:19 2019 +0200 staging: kpc2000: fix brace issues in kpc2000_spi.c Fixes issues found by checkpatch: - "WARNING: braces {} are not necessary for single statement blocks" - "WARNING: braces {} are not necessary for any arm of this statement" Signed-off-by: Simon Sandström Link: https://lore.kernel.org/r/20190701091819.18528-1-simon@nikanor.nu Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000_spi.c | 33 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 21 deletions(-) commit feb20855a32ae62315038bac59a92d6489ea9cbe Author: Nishka Dasgupta Date: Mon Jul 1 14:45:52 2019 +0530 staging: rtl8192u: Replace function rtl8192_rx_enable() Remove function rtl8192_rx_enable as all it does is call rtl8192_rx_initiate. Rename rtl8192_rx_initiate to rtl8192_rx_enable and change its type from static to non-static to maintain compatibility with call sites of rtl8192_rx_enable. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Link: https://lore.kernel.org/r/20190701091552.12696-1-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/r8192U_core.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 0dbc8368edf0f1b55c4835019450d4c54cc9f6fe Author: Christian Müller Date: Mon Jul 1 10:27:07 2019 +0200 drivers/staging/rtl8192u: style nonstyled comments The coding-styles.rst states, that multiline comments should allways contain a leading "*" in each line. For multiline comments in general they /* * should look * like this. */ For multiline comments in either net/ or drivers/net/ however, they should /* omit * the first * empty line. */ Since this file is part of a networking driver, the goal for it would be to reside in drivers/net/ one day. This patch changes comments, that were in neither form of the two listed above, to have the style that is specified for drivers/net/. Signed-off-by: Christian Müller Signed-off-by: Felix Trommer Link: https://lore.kernel.org/r/20190701082707.25198-2-muellerch-privat@web.de Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/r8192U_dm.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) commit d8718e45e2544251c11332655cce93ba9e080811 Author: Christian Müller Date: Mon Jul 1 10:27:06 2019 +0200 drivers/staging/rtl8192u: drop first comment line As stated in coding-styles.rst multiline comments should be structured in a way, that the actual comment starts on the second line of the commented portion. E.g: /* * Multiline comments * should look like * this. */ However, there is an exception to files in drivers/net/ and net/, where multiline comments are prefered to look like this: /* Mutliline comments for * drivers/net/ should look * like this. */ The comments in this file initially looked like the first example. But since this file is part of a networking driver and thus should be moved to drivers/net/ one day, this patch adjusts the comments such that they are fitting to the style imposed for drivers/net/. Signed-off-by: Christian Müller Signed-off-by: Felix Trommer Link: https://lore.kernel.org/r/20190701082707.25198-1-muellerch-privat@web.de Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/r8192U_dm.c | 69 ++++++++++++------------------------ 1 file changed, 23 insertions(+), 46 deletions(-) commit baa3477f06af2238bc88a74db22d7e8ea5782dda Author: NeilBrown Date: Mon Jul 1 10:43:07 2019 +1000 staging: mt7621-dts: add support for second network interface The mt7621 has two network interfaces, one that connects to an internal switch, and one that can connect to either that switch or an external phy, or possibly an internal phy. The Gnubee-PC2 has an external phy for use with the second interface. This patch add some support for the second interface to mt7621.dtsi and add a gbpc2.dts which makes use of this. This allows the second interface to be used. I don't fully understand how to configure this interface - the documentation is thin - so there could well be room for improvement here. Signed-off-by: NeilBrown Link: https://lore.kernel.org/r/156194178766.1430.12784163026696670896.stgit@noble.brown Signed-off-by: Greg Kroah-Hartman drivers/staging/mt7621-dts/Kconfig | 7 ++++++- drivers/staging/mt7621-dts/Makefile | 1 + drivers/staging/mt7621-dts/gbpc1.dts | 2 +- drivers/staging/mt7621-dts/gbpc2.dts | 21 +++++++++++++++++++++ drivers/staging/mt7621-dts/mt7621.dtsi | 12 ++++++++---- 5 files changed, 37 insertions(+), 6 deletions(-) commit cf8e49ae200baa05b8536e99fbee37faf9c2cebb Author: NeilBrown Date: Mon Jul 1 10:43:07 2019 +1000 staging: mt7621-dts: update sdhci config. The mtk-sd driver has been updated to support the IP in the mt7621, so update our configuration to work with it. Signed-off-by: NeilBrown Link: https://lore.kernel.org/r/156194178761.1430.1625105851941268306.stgit@noble.brown Signed-off-by: Greg Kroah-Hartman drivers/staging/mt7621-dts/mt7621.dtsi | 41 +++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) commit fd315da57dc37b7d9f3f145f88eb66085279d48a Author: Nishka Dasgupta Date: Mon Jul 1 12:30:25 2019 +0530 staging: comedi: mite: Replace function mite_request_channel_in_range() Remove function mite_request_channel_in_range as all it does is call __mite_request_channel. Rename __mite_request_channel to mite_request_channel_in_range and change its type from static to non-static to maintain compatibility with call sites. Change only remaining call site of __mite_request_channel to call mite_request_channel_in_range_instead. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Reviewed-by: Ian Abbott Link: https://lore.kernel.org/r/20190701070025.3838-3-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/mite.c | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) commit 931282a9c7a6ea366c5a8a3c5a0f021681d19d9d Author: Nishka Dasgupta Date: Mon Jul 1 12:30:24 2019 +0530 staging: comedi: amplc_dio200: Remove function gat_sce() Remove function gat_sce as all it does is call clk_gat_sce. Modify call sites of the former to call the latter directly. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Reviewed-by: Ian Abbott Link: https://lore.kernel.org/r/20190701070025.3838-2-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/amplc_dio200_common.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 18e75e3282f7fabcb0bbfc4223d3209e6b0f5083 Author: Nishka Dasgupta Date: Mon Jul 1 12:30:23 2019 +0530 staging: comedi: amplc_dio200: Remove function clk_sce() Remove function clk_sce as all it does is call clk_gat_sce. Modify call site of clk_sce to call clk_gat_sce instead. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Reviewed-by: Ian Abbott Link: https://lore.kernel.org/r/20190701070025.3838-1-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/amplc_dio200_common.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 8f9e3a519d56f420d2d4cee6521bae48b8273abf Author: Christian Gromm Date: Mon Jul 1 15:49:33 2019 +0200 staging: most: remove data sanity check This patch removes the data check in the set_cfg_* functions, because the modules infacing the hardware (usb, i2c, ...) already have it. Signed-off-by: Christian Gromm Link: https://lore.kernel.org/r/1561988973-301-1-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman drivers/staging/most/configfs.c | 14 -------------- 1 file changed, 14 deletions(-) commit 23a4388f24f5356fa0bef07911c7b4fbc97619ac Author: Nishka Dasgupta Date: Wed Jul 3 13:48:42 2019 +0530 staging: android: ion: Remove file ion_chunk_heap.c Remove file ion_chunk_heap.c as its functions and definitions are not used anywhere else. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Acked-by: Laura Abbott Link: https://lore.kernel.org/r/20190703081842.22872-2-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/Kconfig | 9 -- drivers/staging/android/ion/Makefile | 1 - drivers/staging/android/ion/ion_chunk_heap.c | 147 --------------------------- 3 files changed, 157 deletions(-) commit eadbf7a34e44e8fb2e63142b992bf264ffb72bf9 Author: Nishka Dasgupta Date: Wed Jul 3 13:48:41 2019 +0530 staging: android: ion: Remove file ion_carveout_heap.c Remove file ion_carveout_heap.c as its functions and definitions are not used anywhere. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Acked-by: Laura Abbott Link: https://lore.kernel.org/r/20190703081842.22872-1-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/Kconfig | 9 -- drivers/staging/android/ion/Makefile | 1 - drivers/staging/android/ion/ion_carveout_heap.c | 133 ------------------------ 3 files changed, 143 deletions(-) commit af89bcef55ff6d488d5f64d0068042b1a1092d33 Author: Gao Xiang Date: Wed Jul 3 14:52:09 2019 +0800 staging: erofs: fix LZ4 limited bounced page mis-reuse Like all lz77-based algrithms, lz4 has a dynamically populated ("sliding window") dictionary and the maximum lookback distance is 65535. Therefore the number of bounced pages could be limited by erofs based on this property. However, just now we observed some lz4 sequences in the extreme case cannot be decompressed correctly after this feature is enabled, the root causes after analysis are clear as follows: 1) max bounced pages should be 17 rather than 16 pages; 2) considering the following case, the broken implementation could reuse unsafely in advance (in other words, reuse it less than a safe distance), 0 1 2 ... 16 17 18 ... 33 34 b p b b note that the bounce page that we are concerned was allocated at 0, and it reused at 18 since page 17 exists, but it mis-reused at 34 in advance again, which causes decompress failure. This patch resolves the issue by introducing a bitmap to mark whether the page in the same position of last round is a bounced page or not, and a micro stack data structure to store all available bounced pages. Fixes: 7fc45dbc938a ("staging: erofs: introduce generic decompression backend") Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman drivers/staging/erofs/decompressor.c | 50 ++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 22 deletions(-) commit 4969c06a0d83c9c3dc50b8efcdc8eeedfce896f6 Author: Jaegeuk Kim Date: Mon Jul 1 19:15:29 2019 -0700 f2fs: support swap file w/ DIO Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 142 +++++++++++++++++++++++++++++++++++++++++--- fs/f2fs/f2fs.h | 5 +- include/trace/events/f2fs.h | 11 ++-- 3 files changed, 143 insertions(+), 15 deletions(-) commit f505e91ef511a20b2bc3d0eaca41faecdb715027 Author: Alexander Shishkin Date: Thu Jun 27 15:51:47 2019 +0300 intel_th: msu: Start read iterator from a non-empty window In multi-window mode, the read iterator is supposed to start from the window with the oldest data, which is, chronologically, the next window after the one with the newest data. This, however, fails to take into account the potentially empty windows, so in short trace sessions it's possible to have a lot of zeroes read from the character device first. Fix this by skipping over the empty windows in initialization of the read iterator. Signed-off-by: Alexander Shishkin Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20190627125152.54905-5-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/intel_th/msu.c | 42 +++++++++++++++++++++++++++++++--------- 1 file changed, 33 insertions(+), 9 deletions(-) commit bbbc08a154a1750371f8347a5353819551d11abb Author: Alexander Shishkin Date: Thu Jun 27 15:51:46 2019 +0300 intel_th: msu: Split sgt array and pointer in multiwindow mode To allow the use of externally allocated SG tables further down the line, change the code to reference the table via a pointer and make it point to the locally allocated table by default. Signed-off-by: Alexander Shishkin Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20190627125152.54905-4-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/intel_th/msu.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit fa52b3fe5e9383022f83382f5ffcb386b9b11b4f Author: Alexander Shishkin Date: Thu Jun 27 15:51:45 2019 +0300 intel_th: msu: Support multipage blocks Now that the MSU is using scatterlist, we can support multipage blocks. At the moment, the code assumes that all blocks are page-sized, but in larger buffers it may make sense to chunk together larger blocks of memory. One place where one-to-many relationship needs to be handled is the MSU buffer's mmap path. Get rid of the implicit assumption that all blocks are page-sized. Signed-off-by: Alexander Shishkin Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20190627125152.54905-3-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/intel_th/msu.c | 56 +++++++++++++++++++++++++++------------- 1 file changed, 38 insertions(+), 18 deletions(-) commit 4aa5aed2b6f267592705a526f57518a5d715b769 Author: Alexander Shishkin Date: Fri Jun 21 19:19:30 2019 +0300 intel_th: pci: Add Ice Lake NNPI support This adds Ice Lake NNPI support to the Intel(R) Trace Hub. Signed-off-by: Alexander Shishkin Reviewed-by: Andy Shevchenko Cc: stable Link: https://lore.kernel.org/r/20190621161930.60785-5-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/intel_th/pci.c | 5 +++++ 1 file changed, 5 insertions(+) commit 918b8646497b5dba6ae82d4a7325f01b258972b9 Author: Alexander Shishkin Date: Fri Jun 21 19:19:29 2019 +0300 intel_th: msu: Fix single mode with disabled IOMMU Commit 4e0eaf239fb3 ("intel_th: msu: Fix single mode with IOMMU") switched the single mode code to use dma mapping pages obtained from the page allocator, but with IOMMU disabled, that may lead to using SWIOTLB bounce buffers and without additional sync'ing, produces empty trace buffers. Fix this by using a DMA32 GFP flag to the page allocation in single mode, as the device supports full 32-bit DMA addressing. Signed-off-by: Alexander Shishkin Fixes: 4e0eaf239fb3 ("intel_th: msu: Fix single mode with IOMMU") Reviewed-by: Andy Shevchenko Reported-by: Ammy Yi Cc: stable Link: https://lore.kernel.org/r/20190621161930.60785-4-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/intel_th/msu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9800db282dff675dd700d5985d90b605c34b5ccd Author: YueHaibing Date: Fri Jun 21 19:19:28 2019 +0300 intel_th: msu: Remove set but not used variable 'last' Commit aad14ad3cf3a ("intel_th: msu: Add current window tracking") added the following gcc warning: > drivers/hwtracing/intel_th/msu.c: In function msc_win_switch: > drivers/hwtracing/intel_th/msu.c:1389:21: warning: variable last set but > not used [-Wunused-but-set-variable] Fix it by removing the variable. Signed-off-by: YueHaibing Fixes: aad14ad3cf3a ("intel_th: msu: Add current window tracking") Reviewed-by: Andy Shevchenko Signed-off-by: Alexander Shishkin Cc: stable Link: https://lore.kernel.org/r/20190621161930.60785-3-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/intel_th/msu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit b96fb368b08f1637cbf780a6b83e36c2c5ed4ff5 Author: Shaokun Zhang Date: Fri Jun 21 19:19:27 2019 +0300 intel_th: msu: Fix unused variable warning on arm64 platform Commit ba39bd8306057 ("intel_th: msu: Switch over to scatterlist") introduced the following warnings on non-x86 architectures, as a result of reordering the multi mode buffer allocation sequence: > drivers/hwtracing/intel_th/msu.c: In function ‘msc_buffer_win_alloc’: > drivers/hwtracing/intel_th/msu.c:783:21: warning: unused variable ‘i’ > [-Wunused-variable] > int ret = -ENOMEM, i; > ^ > drivers/hwtracing/intel_th/msu.c: In function ‘msc_buffer_win_free’: > drivers/hwtracing/intel_th/msu.c:863:6: warning: unused variable ‘i’ > [-Wunused-variable] > int i; > ^ Fix this compiler warning by factoring out set_memory sequences and making them x86-only. Suggested-by: Alexander Shishkin Signed-off-by: Shaokun Zhang Fixes: ba39bd8306057 ("intel_th: msu: Switch over to scatterlist") Reviewed-by: Andy Shevchenko Signed-off-by: Alexander Shishkin Cc: stable Link: https://lore.kernel.org/r/20190621161930.60785-2-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/intel_th/msu.c | 40 +++++++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 13 deletions(-) commit a7a9250e18b3a6f4243acae4e9be6f455a46effe Author: Hariprasad Kelam Date: Wed Jul 3 07:34:18 2019 -0700 fs: xfs: xfs_log: Change return type from int to void Change return types of below functions as they never fails xfs_log_mount_cancel xlog_recover_cancel xlog_recover_cancel_intents fix below issue reported by coccicheck fs/xfs/xfs_log_recover.c:4886:7-12: Unneeded variable: "error". Return "0" on line 4926 Signed-off-by: Hariprasad Kelam Reviewed-by: Eric Sandeen Reviewed-by: Carlos Maiolino Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_log.c | 8 ++------ fs/xfs/xfs_log.h | 2 +- fs/xfs/xfs_log_priv.h | 2 +- fs/xfs/xfs_log_recover.c | 12 +++--------- 4 files changed, 7 insertions(+), 17 deletions(-) commit 3e5a428b264eca8c7f1c261cffbe139538d7965f Author: Darrick J. Wong Date: Wed Jul 3 07:33:27 2019 -0700 xfs: poll waiting for quotacheck Create a pwork destroy function that uses polling instead of uninterruptible sleep to wait for work items to finish so that we can touch the softlockup watchdog. IOWs, gross hack. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/xfs_iwalk.c | 3 +++ fs/xfs/xfs_iwalk.h | 3 ++- fs/xfs/xfs_pwork.c | 19 +++++++++++++++++++ fs/xfs/xfs_pwork.h | 3 +++ fs/xfs/xfs_qm.c | 2 +- 5 files changed, 28 insertions(+), 2 deletions(-) commit 56f3364aba8866d0f7f8c965e7acf07f35679701 Author: Greg Kroah-Hartman Date: Wed Jun 12 17:36:13 2019 +0200 lib: notifier-error-inject: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20190612153613.GA21239@kroah.com Signed-off-by: Greg Kroah-Hartman lib/notifier-error-inject.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit 1be51474f99bcfdecef3f34b9a9a8cf4393fd8f9 Author: Greg Kroah-Hartman Date: Wed Jun 12 16:43:14 2019 +0200 swiotlb: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Konrad Rzeszutek Wilk Cc: Christoph Hellwig Cc: Marek Szyprowski Cc: Robin Murphy Cc: iommu@lists.linux-foundation.org Signed-off-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20190612144314.GA16803@kroah.com Signed-off-by: Greg Kroah-Hartman kernel/dma/swiotlb.c | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) commit 1a829ff2a6c37187ff8020488e84ec392cb94854 Author: Greg Kroah-Hartman Date: Wed Jun 12 16:55:38 2019 +0200 ceph: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. This cleanup allows the return value of the functions to be made void, as no logic should care if these files succeed or not. Cc: "Yan, Zheng" Cc: Sage Weil Cc: Ilya Dryomov Cc: "David S. Miller" Cc: ceph-devel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20190612145538.GA18772@kroah.com Signed-off-by: Greg Kroah-Hartman fs/ceph/debugfs.c | 24 ++---------------------- fs/ceph/super.c | 4 +--- fs/ceph/super.h | 2 +- include/linux/ceph/debugfs.h | 4 ++-- net/ceph/ceph_common.c | 5 +---- net/ceph/debugfs.c | 33 ++++----------------------------- 6 files changed, 11 insertions(+), 61 deletions(-) commit 0a0762c6c604bb0ce8afe4ee052514e0208152a0 Author: Greg Kroah-Hartman Date: Wed Jun 12 16:56:22 2019 +0200 sunrpc: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: "J. Bruce Fields" Cc: Jeff Layton Cc: Trond Myklebust Cc: Anna Schumaker Cc: linux-nfs@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20190612145622.GA18839@kroah.com Signed-off-by: Greg Kroah-Hartman net/sunrpc/debugfs.c | 66 +++++++++------------------------------------------- 1 file changed, 11 insertions(+), 55 deletions(-) commit 702d6a834b497a7c387722bd796e0dc18bb55360 Author: Greg Kroah-Hartman Date: Wed Jun 12 17:21:20 2019 +0200 ubifs: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Richard Weinberger Cc: Artem Bityutskiy Cc: Adrian Hunter Cc: linux-mtd@lists.infradead.org Signed-off-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20190612152120.GA17450@kroah.com Signed-off-by: Greg Kroah-Hartman fs/ubifs/debug.c | 167 ++++++++++++++----------------------------------------- fs/ubifs/debug.h | 4 +- fs/ubifs/super.c | 9 +-- 3 files changed, 45 insertions(+), 135 deletions(-) commit f095adba36bb7f6947135f6893b5837760961b3d Author: Greg Kroah-Hartman Date: Wed Jun 12 17:22:04 2019 +0200 orangefs: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Mike Marshall Cc: Martin Brandenburg Cc: devel@lists.orangefs.org Signed-off-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20190612152204.GA17511@kroah.com Signed-off-by: Greg Kroah-Hartman fs/orangefs/orangefs-debugfs.c | 35 ++++------------------------------- 1 file changed, 4 insertions(+), 31 deletions(-) commit 15b6ff951630eb5825936f98d940c2a4596ff224 Author: Greg Kroah-Hartman Date: Wed Jun 12 17:26:03 2019 +0200 nfsd: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: "J. Bruce Fields" Cc: Jeff Layton Cc: linux-nfs@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20190612152603.GB18440@kroah.com Signed-off-by: Greg Kroah-Hartman fs/nfsd/fault_inject.c | 12 ++---------- fs/nfsd/nfsctl.c | 5 +---- fs/nfsd/state.h | 4 ++-- 3 files changed, 5 insertions(+), 16 deletions(-) commit 352bce2ee19f9d479832c060548974da2ba51153 Author: Greg Kroah-Hartman Date: Wed Jun 12 17:34:40 2019 +0200 lib: 842: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Haren Myneni Cc: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20190612153440.GA21006@kroah.com Signed-off-by: Greg Kroah-Hartman lib/842/842_debugfs.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit d03ae4778b3b61fc329615c30972074ee3496b0a Author: Greg Kroah-Hartman Date: Wed Jul 3 09:16:52 2019 +0200 debugfs: provide pr_fmt() macro Use a common "debugfs: " prefix for all pr_* calls in a single place. Cc: Mark Brown Reviewed-by: Takashi Iwai Reviewed-by: Rafael J. Wysocki Signed-off-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20190703071653.2799-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman fs/debugfs/inode.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 43e23b6c0b0151e308acbd6530bb80e2d2e53161 Author: Greg Kroah-Hartman Date: Wed Jul 3 09:16:53 2019 +0200 debugfs: log errors when something goes wrong As it is not recommended that debugfs calls be checked, it was pointed out that major errors should still be logged somewhere so that developers and users have a chance to figure out what went wrong. To help with this, error logging has been added to the debugfs core so that it is not needed to be present in every individual file that calls debugfs. Reported-by: Mark Brown Reported-by: Takashi Iwai Reviewed-by: Mark Brown Reviewed-by: Takashi Iwai Reviewed-by: Rafael J. Wysocki Signed-off-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20190703071653.2799-2-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman fs/debugfs/inode.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) commit e5a3e259ef239f443951d401db10db7d426c9497 Merge: d2f5bbbc3500 d78e3f0614f8 Author: Daniel Borkmann Date: Wed Jul 3 16:52:03 2019 +0200 Merge branch 'bpf-tcp-rtt-hook' Stanislav Fomichev says: ==================== Congestion control team would like to have a periodic callback to track some TCP statistics. Let's add a sock_ops callback that can be selectively enabled on a socket by socket basis and is executed for every RTT. BPF program frequency can be further controlled by calling bpf_ktime_get_ns and bailing out early. I run neper tcp_stream and tcp_rr tests with the sample program from the last patch and didn't observe any noticeable performance difference. v2: * add a comment about second accept() in selftest (Yonghong Song) * refer to tcp_bpf.readme in sample program (Yonghong Song) ==================== Suggested-by: Eric Dumazet Cc: Eric Dumazet Cc: Priyaranjan Jha Cc: Yuchung Cheng Cc: Soheil Hassas Yeganeh Acked-by: Soheil Hassas Yeganeh Acked-by: Yuchung Cheng Acked-by: Yonghong Song Acked-by: Lawrence Brakmo Signed-off-by: Daniel Borkmann commit d78e3f0614f866d4456f860dc5773a6176eb9937 Author: Stanislav Fomichev Date: Tue Jul 2 09:14:03 2019 -0700 samples/bpf: fix tcp_bpf.readme detach command Copy-paste, should be detach, not attach. Signed-off-by: Stanislav Fomichev Acked-by: Soheil Hassas Yeganeh Acked-by: Yuchung Cheng Signed-off-by: Daniel Borkmann samples/bpf/tcp_bpf.readme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 395338843de1e47f6876e58adfe75b6483f96fff Author: Stanislav Fomichev Date: Tue Jul 2 09:14:02 2019 -0700 samples/bpf: add sample program that periodically dumps TCP stats Uses new RTT callback to dump stats every second. $ mkdir -p /tmp/cgroupv2 $ mount -t cgroup2 none /tmp/cgroupv2 $ mkdir -p /tmp/cgroupv2/foo $ echo $$ >> /tmp/cgroupv2/foo/cgroup.procs $ bpftool prog load ./tcp_dumpstats_kern.o /sys/fs/bpf/tcp_prog $ bpftool cgroup attach /tmp/cgroupv2/foo sock_ops pinned /sys/fs/bpf/tcp_prog $ bpftool prog tracelog $ # run neper/netperf/etc Used neper to compare performance with and without this program attached and didn't see any noticeable performance impact. Sample output: -0 [015] ..s. 2074.128800: 0: dsack_dups=0 delivered=242526 -0 [015] ..s. 2074.128808: 0: delivered_ce=0 icsk_retransmits=0 -0 [015] ..s. 2075.130133: 0: dsack_dups=0 delivered=323599 -0 [015] ..s. 2075.130138: 0: delivered_ce=0 icsk_retransmits=0 -0 [005] .Ns. 2076.131440: 0: dsack_dups=0 delivered=404648 -0 [005] .Ns. 2076.131447: 0: delivered_ce=0 icsk_retransmits=0 Cc: Eric Dumazet Cc: Priyaranjan Jha Cc: Yuchung Cheng Cc: Soheil Hassas Yeganeh Acked-by: Soheil Hassas Yeganeh Acked-by: Yuchung Cheng Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann samples/bpf/Makefile | 1 + samples/bpf/tcp_dumpstats_kern.c | 68 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) commit b55873984dab0eda6db00d19db4c43dce5c11d98 Author: Stanislav Fomichev Date: Tue Jul 2 09:14:01 2019 -0700 selftests/bpf: test BPF_SOCK_OPS_RTT_CB Make sure the callback is invoked for syn-ack and data packet. Cc: Eric Dumazet Cc: Priyaranjan Jha Cc: Yuchung Cheng Cc: Soheil Hassas Yeganeh Acked-by: Soheil Hassas Yeganeh Acked-by: Yuchung Cheng Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/Makefile | 3 +- tools/testing/selftests/bpf/progs/tcp_rtt.c | 61 +++++++ tools/testing/selftests/bpf/test_tcp_rtt.c | 254 ++++++++++++++++++++++++++++ 3 files changed, 317 insertions(+), 1 deletion(-) commit 692cbaa99fe446ed30bfb7e53fb2b4cc518331a1 Author: Stanislav Fomichev Date: Tue Jul 2 09:14:00 2019 -0700 bpf/tools: sync bpf.h Sync new bpf_tcp_sock fields and new BPF_PROG_TYPE_SOCK_OPS RTT callback. Cc: Eric Dumazet Cc: Priyaranjan Jha Cc: Yuchung Cheng Cc: Soheil Hassas Yeganeh Acked-by: Soheil Hassas Yeganeh Acked-by: Yuchung Cheng Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann tools/include/uapi/linux/bpf.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit c2cb5e82a720c05b707701c75dfeb356fe184787 Author: Stanislav Fomichev Date: Tue Jul 2 09:13:59 2019 -0700 bpf: add icsk_retransmits to bpf_tcp_sock Add some inet_connection_sock fields to bpf_tcp_sock that might be useful for debugging congestion control issues. Cc: Eric Dumazet Cc: Priyaranjan Jha Cc: Yuchung Cheng Cc: Soheil Hassas Yeganeh Acked-by: Soheil Hassas Yeganeh Acked-by: Yuchung Cheng Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann include/uapi/linux/bpf.h | 1 + net/core/filter.c | 20 +++++++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) commit 0357746d1e40a8226f68a42c8d7222a12d7c451f Author: Stanislav Fomichev Date: Tue Jul 2 09:13:58 2019 -0700 bpf: add dsack_dups/delivered{, _ce} to bpf_tcp_sock Add more fields to bpf_tcp_sock that might be useful for debugging congestion control issues. Cc: Eric Dumazet Cc: Priyaranjan Jha Cc: Yuchung Cheng Cc: Soheil Hassas Yeganeh Acked-by: Soheil Hassas Yeganeh Acked-by: Yuchung Cheng Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann include/uapi/linux/bpf.h | 5 +++++ net/core/filter.c | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) commit 2377b81de52750997726d6d43b4114e5842c4bf9 Author: Stanislav Fomichev Date: Tue Jul 2 09:13:57 2019 -0700 bpf: split shared bpf_tcp_sock and bpf_sock_ops implementation We've added bpf_tcp_sock member to bpf_sock_ops and don't expect any new tcp_sock fields in bpf_sock_ops. Let's remove CONVERT_COMMON_TCP_SOCK_FIELDS so bpf_tcp_sock can be independently extended. Cc: Eric Dumazet Cc: Priyaranjan Jha Cc: Yuchung Cheng Cc: Soheil Hassas Yeganeh Acked-by: Soheil Hassas Yeganeh Acked-by: Yuchung Cheng Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann net/core/filter.c | 180 ++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 126 insertions(+), 54 deletions(-) commit 23729ff23186424e54b4d6678fcd526cdacef4d3 Author: Stanislav Fomichev Date: Tue Jul 2 09:13:56 2019 -0700 bpf: add BPF_CGROUP_SOCK_OPS callback that is executed on every RTT Performance impact should be minimal because it's under a new BPF_SOCK_OPS_RTT_CB_FLAG flag that has to be explicitly enabled. Suggested-by: Eric Dumazet Cc: Eric Dumazet Cc: Priyaranjan Jha Cc: Yuchung Cheng Cc: Soheil Hassas Yeganeh Acked-by: Soheil Hassas Yeganeh Acked-by: Yuchung Cheng Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann include/net/tcp.h | 8 ++++++++ include/uapi/linux/bpf.h | 6 +++++- net/ipv4/tcp_input.c | 4 ++++ 3 files changed, 17 insertions(+), 1 deletion(-) commit 049331f277fef1c3f2527c2c9afa1d285e9a1247 Author: Thomas Gleixner Date: Wed Jul 3 14:19:36 2019 +0200 x86/fsgsbase: Revert FSGSBASE support The FSGSBASE series turned out to have serious bugs and there is still an open issue which is not fully understood yet. The confidence in those changes has become close to zero especially as the test cases which have been shipped with that series were obviously never run before sending the final series out to LKML. ./fsgsbase_64 >/dev/null Segmentation fault As the merge window is close, the only sane decision is to revert FSGSBASE support. The revert is necessary as this branch has been merged into perf/core already and rebasing all of that a few days before the merge window is not the most brilliant idea. I could definitely slap myself for not noticing the test case fail when merging that series, but TBH my expectations weren't that low back then. Won't happen again. Revert the following commits: 539bca535dec ("x86/entry/64: Fix and clean up paranoid_exit") 2c7b5ac5d5a9 ("Documentation/x86/64: Add documentation for GS/FS addressing mode") f987c955c745 ("x86/elf: Enumerate kernel FSGSBASE capability in AT_HWCAP2") 2032f1f96ee0 ("x86/cpu: Enable FSGSBASE on 64bit by default and add a chicken bit") 5bf0cab60ee2 ("x86/entry/64: Document GSBASE handling in the paranoid path") 708078f65721 ("x86/entry/64: Handle FSGSBASE enabled paranoid entry/exit") 79e1932fa3ce ("x86/entry/64: Introduce the FIND_PERCPU_BASE macro") 1d07316b1363 ("x86/entry/64: Switch CR3 before SWAPGS in paranoid entry") f60a83df4593 ("x86/process/64: Use FSGSBASE instructions on thread copy and ptrace") 1ab5f3f7fe3d ("x86/process/64: Use FSBSBASE in switch_to() if available") a86b4625138d ("x86/fsgsbase/64: Enable FSGSBASE instructions in helper functions") 8b71340d702e ("x86/fsgsbase/64: Add intrinsics for FSGSBASE instructions") b64ed19b93c3 ("x86/cpu: Add 'unsafe_fsgsbase' to enable CR4.FSGSBASE") Signed-off-by: Thomas Gleixner Acked-by: Ingo Molnar Cc: Chang S. Bae Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Peter Zijlstra Cc: Andi Kleen Cc: Ravi Shankar Cc: Dave Hansen Cc: H. Peter Anvin Documentation/admin-guide/kernel-parameters.txt | 2 - Documentation/x86/entry_64.rst | 9 -- Documentation/x86/x86_64/fsgs.rst | 199 ------------------------ Documentation/x86/x86_64/index.rst | 1 - arch/x86/entry/calling.h | 40 ----- arch/x86/entry/entry_64.S | 132 ++++------------ arch/x86/include/asm/fsgsbase.h | 45 ++---- arch/x86/include/asm/inst.h | 15 -- arch/x86/include/uapi/asm/hwcap2.h | 3 - arch/x86/kernel/cpu/common.c | 22 --- arch/x86/kernel/process_64.c | 119 ++------------ 11 files changed, 50 insertions(+), 537 deletions(-) commit 40786717c88c2d4cb426cc2eb99ac50000e5a910 Author: Darrick J. Wong Date: Wed Jul 3 07:33:26 2019 -0700 xfs: multithreaded iwalk implementation Create a parallel iwalk implementation and switch quotacheck to use it. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/Makefile | 1 + fs/xfs/xfs_globals.c | 3 ++ fs/xfs/xfs_iwalk.c | 82 ++++++++++++++++++++++++++++++++++++ fs/xfs/xfs_iwalk.h | 2 + fs/xfs/xfs_pwork.c | 117 +++++++++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/xfs_pwork.h | 58 +++++++++++++++++++++++++ fs/xfs/xfs_qm.c | 2 +- fs/xfs/xfs_sysctl.h | 3 ++ fs/xfs/xfs_sysfs.c | 40 ++++++++++++++++++ fs/xfs/xfs_trace.h | 18 ++++++++ 10 files changed, 325 insertions(+), 1 deletion(-) commit 697096b14444f458fb81212d1c82d7846e932455 Author: Andy Lutomirski Date: Tue Jul 2 20:43:04 2019 -0700 selftests/x86/fsgsbase: Fix some test case bugs This refactors do_unexpected_base() to clean up some code. It also fixes the following bugs in test_ptrace_write_gsbase(): - Incorrect printf() format string caused crashes. - Hardcoded 0x7 for the gs selector was not reliably correct. It also documents the fact that the test is expected to fail on old kernels. Fixes: a87730cc3acc ("selftests/x86/fsgsbase: Test ptracer-induced GSBASE write with FSGSBASE") Fixes: 1b6858d5a2eb ("selftests/x86/fsgsbase: Test ptracer-induced GSBASE write") Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Cc: "BaeChang Seok" Cc: Borislav Petkov Cc: Peter Zijlstra Cc: "H . Peter Anvin" Cc: Andi Kleen Cc: H. Peter Anvin Cc: "BaeChang Seok" Link: https://lkml.kernel.org/r/bab29c84f2475e2c30ddb00f1b877fcd7f4f96a8.1562125333.git.luto@kernel.org tools/testing/selftests/x86/fsgsbase.c | 74 ++++++++++++++++++---------------- 1 file changed, 40 insertions(+), 34 deletions(-) commit 90f15ac9fa7e7ff66e0980309d8184bff0611624 Author: Fuqian Huang Date: Wed Jul 3 21:17:27 2019 +0800 ext2: Use kmemdup rather than duplicating its implementation kmemdup is introduced to duplicate a region of memory in a neat way. Rather than kmalloc/kzalloc + memset, which the programmer needs to write the size twice (sometimes lead to mistakes), kmemdup improves readability, leads to smaller code and also reduce the chances of mistakes. Suggestion to use kmemdup rather than using kmalloc/kzalloc + memset. Signed-off-by: Fuqian Huang Link: https://lore.kernel.org/r/20190703131727.25735-1-huangfq.daxian@gmail.com Signed-off-by: Jan Kara fs/ext2/xattr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit f3880a23564e3172437285ebcb5b8a124539fdae Author: Lionel Debieve Date: Fri Jun 28 13:26:55 2019 +0200 crypto: stm32/hash - remove interruptible condition for dma When DMA is used, waiting for completion must not be interruptible as it can generate an error that is not handle by the driver. There is no need to put the completion interruptible in this driver. Signed-off-by: Lionel Debieve Signed-off-by: Herbert Xu drivers/crypto/stm32/stm32-hash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0acabecebc912b3ba06289e4ef40476acc499a37 Author: Lionel Debieve Date: Fri Jun 28 13:26:54 2019 +0200 crypto: stm32/hash - Fix hmac issue more than 256 bytes Correct condition for the second hmac loop. Key must be only set in the first loop. Initial condition was wrong, HMAC_KEY flag was not properly checked. Signed-off-by: Lionel Debieve Signed-off-by: Herbert Xu drivers/crypto/stm32/stm32-hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fdbd643a74efb353a20ecde94a2200e13a283b66 Author: Lionel Debieve Date: Fri Jun 28 13:26:41 2019 +0200 crypto: stm32/crc32 - rename driver file Use the same naming convention for all stm32 crypto drivers. Signed-off-by: Lionel Debieve Signed-off-by: Herbert Xu drivers/crypto/stm32/Makefile | 2 +- drivers/crypto/stm32/{stm32_crc32.c => stm32-crc32.c} | 0 2 files changed, 1 insertion(+), 1 deletion(-) commit 7be373b6de503cd1eed6be4f2780925a5af03230 Author: Wanpeng Li Date: Fri Jun 14 09:15:48 2019 +0800 KVM: LAPIC: remove the trailing newline used in the fmt parameter of TP_printk The trailing newlines will lead to extra newlines in the trace file which looks like the following output, so remove it. qemu-system-x86-15695 [002] ...1 15774.839240: kvm_hv_timer_state: vcpu_id 0 hv_timer 1 qemu-system-x86-15695 [002] ...1 15774.839309: kvm_hv_timer_state: vcpu_id 0 hv_timer 1 Cc: Paolo Bonzini Cc: Radim Krčmář Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini arch/x86/kvm/trace.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d647eb63e67156fae44d2b467b1f314fc676de7a Author: Paolo Bonzini Date: Thu Jun 20 14:13:33 2019 +0200 KVM: svm: add nrips module parameter Allow testing code for old processors that lack the next RIP save feature, by disabling usage of the next_rip field. Nested hypervisors however get the feature unconditionally. Signed-off-by: Paolo Bonzini arch/x86/kvm/svm.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 66d9c1cf9f95d96aa211d9f732cd42e93e2c1508 Author: Fuqian Huang Date: Fri Jun 28 10:46:31 2019 +0800 crypto: amcc - remove memset after dma_alloc_coherent In commit af7ddd8a627c ("Merge tag 'dma-mapping-4.21' of git://git.infradead.org/users/hch/dma-mapping"), dma_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang Signed-off-by: Herbert Xu drivers/crypto/amcc/crypto4xx_core.c | 1 - 1 file changed, 1 deletion(-) commit 600bac009ea9822d371aae03d33fc05991c5b5a2 Author: Hook, Gary Date: Thu Jun 27 16:23:29 2019 +0000 crypto: ccp - Switch to SPDX license identifiers Add an SPDX identifier and remove any specific statements. Signed-off-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-crypto-aes-cmac.c | 5 +---- drivers/crypto/ccp/ccp-crypto-aes-galois.c | 5 +---- drivers/crypto/ccp/ccp-crypto-aes-xts.c | 5 +---- drivers/crypto/ccp/ccp-crypto-aes.c | 4 ---- drivers/crypto/ccp/ccp-crypto-des3.c | 5 +---- drivers/crypto/ccp/ccp-crypto-main.c | 5 +---- drivers/crypto/ccp/ccp-crypto-rsa.c | 5 +---- drivers/crypto/ccp/ccp-crypto-sha.c | 5 +---- drivers/crypto/ccp/ccp-crypto.h | 5 +---- drivers/crypto/ccp/ccp-debugfs.c | 5 +---- drivers/crypto/ccp/ccp-dev-v3.c | 5 +---- drivers/crypto/ccp/ccp-dev-v5.c | 5 +---- drivers/crypto/ccp/ccp-dev.c | 5 +---- drivers/crypto/ccp/ccp-dev.h | 5 +---- drivers/crypto/ccp/ccp-dmaengine.c | 5 +---- drivers/crypto/ccp/ccp-ops.c | 4 ---- drivers/crypto/ccp/psp-dev.c | 5 +---- drivers/crypto/ccp/psp-dev.h | 5 +---- drivers/crypto/ccp/sp-dev.c | 5 +---- drivers/crypto/ccp/sp-dev.h | 5 +---- drivers/crypto/ccp/sp-pci.c | 5 +---- drivers/crypto/ccp/sp-platform.c | 5 +---- 22 files changed, 20 insertions(+), 88 deletions(-) commit 52393d617af7b554f03531e6756facf2ea687d2e Author: Hook, Gary Date: Thu Jun 27 16:16:23 2019 +0000 crypto: ccp - Validate the the error value used to index error messages The error code read from the queue status register is only 6 bits wide, but we need to verify its value is within range before indexing the error messages. Fixes: 81422badb3907 ("crypto: ccp - Make syslog errors human-readable") Cc: Reported-by: Cfir Cohen Signed-off-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-dev.c | 96 +++++++++++++++++++++++--------------------- drivers/crypto/ccp/ccp-dev.h | 2 +- 2 files changed, 52 insertions(+), 46 deletions(-) commit ae400be94b84206e8344e8f10d896aeb3ea2f505 Author: Hook, Gary Date: Tue Jun 25 23:43:50 2019 +0000 crypto: doc - Fix formatting of new crypto engine content Tidy up the formatting/grammar in crypto_engine.rst. Use bulleted lists where appropriate. Signed-off-by: Gary R Hook Signed-off-by: Herbert Xu Documentation/crypto/crypto_engine.rst | 111 ++++++++++++++++++++++----------- 1 file changed, 73 insertions(+), 38 deletions(-) commit 5a35316d97914d56d6be8b3748b2437785e74790 Author: Hook, Gary Date: Tue Jun 25 23:43:43 2019 +0000 crypto: doc - Add parameter documentation Fill in missing parameter descriptions for the compression algorithm, then pick them up to document for the compression_alg structure. Signed-off-by: Gary R Hook Signed-off-by: Herbert Xu Documentation/crypto/api-skcipher.rst | 2 +- include/linux/crypto.h | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) commit 7367bfeb2c141fb3ddff6b09bb5dfeb739b3d245 Author: Ard Biesheuvel Date: Mon Jun 24 19:38:31 2019 +0200 crypto: arm64/aes-ce - implement 5 way interleave for ECB, CBC and CTR This implements 5-way interleaving for ECB, CBC decryption and CTR, resulting in a speedup of ~11% on Marvell ThunderX2, which has a very deep pipeline and therefore a high issue latency for NEON instructions operating on the same registers. Note that XTS is left alone: implementing 5-way interleave there would either involve spilling of the calculated tweaks to the stack, or recalculating them after the encryption operation, and doing either of those would most likely penalize low end cores. For ECB, this is not a concern at all, given that we have plenty of spare registers. For CTR and CBC decryption, we take advantage of the fact that v16 is not used by the CE version of the code (which is the only one targeted by the optimization), and so we can reshuffle the code a bit and avoid having to spill to memory (with the exception of one extra reload in the CBC routine) Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm64/crypto/aes-ce.S | 2 + arch/arm64/crypto/aes-modes.S | 102 +++++++++++++++++++++++++++++------------- arch/arm64/crypto/aes-neon.S | 2 + 3 files changed, 75 insertions(+), 31 deletions(-) commit e217413964a453fc2eeb437c32deb00581cf899d Author: Ard Biesheuvel Date: Mon Jun 24 19:38:30 2019 +0200 crypto: arm64/aes-ce - add 5 way interleave routines In preparation of tweaking the accelerated AES chaining mode routines to be able to use a 5-way stride, implement the core routines to support processing 5 blocks of input at a time. While at it, drop the 2 way versions, which have been unused for a while now. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm64/crypto/aes-ce.S | 58 ++++++++++++++++++++++++++----------------- arch/arm64/crypto/aes-modes.S | 16 ++++++++++++ arch/arm64/crypto/aes-neon.S | 46 +--------------------------------- 3 files changed, 52 insertions(+), 68 deletions(-) commit d45b1714e25e39b94df3da10ba8e95e63865b278 Author: Christophe Leroy Date: Mon Jun 24 07:20:17 2019 +0000 crypto: talitos - drop icv_ool icv_ool is not used anymore, drop it. Fixes: e345177ded17 ("crypto: talitos - fix AEAD processing.") Signed-off-by: Christophe Leroy Signed-off-by: Herbert Xu drivers/crypto/talitos.c | 3 --- drivers/crypto/talitos.h | 2 -- 2 files changed, 5 deletions(-) commit 58cdbc6d2263beb36954408522762bbe73169306 Author: Christophe Leroy Date: Mon Jun 24 07:20:16 2019 +0000 crypto: talitos - fix hash on SEC1. On SEC1, hash provides wrong result when performing hashing in several steps with input data SG list has more than one element. This was detected with CONFIG_CRYPTO_MANAGER_EXTRA_TESTS: [ 44.185947] alg: hash: md5-talitos test failed (wrong result) on test vector 6, cfg="random: may_sleep use_finup src_divs=[25.88%@+8063, 24.19%@+9588, 28.63%@+16333, 4.60%@+6756, 16.70%@+16281] dst_divs=[71.61%@alignmask+16361, 14.36%@+7756, 14.3%@+" [ 44.325122] alg: hash: sha1-talitos test failed (wrong result) on test vector 3, cfg="random: inplace use_final src_divs=[16.56%@+16378, 52.0%@+16329, 21.42%@alignmask+16380, 10.2%@alignmask+16380] iv_offset=39" [ 44.493500] alg: hash: sha224-talitos test failed (wrong result) on test vector 4, cfg="random: use_final nosimd src_divs=[52.27%@+7401, 17.34%@+16285, 17.71%@+26, 12.68%@+10644] iv_offset=43" [ 44.673262] alg: hash: sha256-talitos test failed (wrong result) on test vector 4, cfg="random: may_sleep use_finup src_divs=[60.6%@+12790, 17.86%@+1329, 12.64%@alignmask+16300, 8.29%@+15, 0.40%@+13506, 0.51%@+16322, 0.24%@+16339] dst_divs" This is due to two issues: - We have an overlap between the buffer used for copying the input data (SEC1 doesn't do scatter/gather) and the chained descriptor. - Data copy is wrong when the previous hash left less than one blocksize of data to hash, implying a complement of the previous block with a few bytes from the new request. Fix it by: - Moving the second descriptor after the buffer, as moving the buffer after the descriptor would make it more complex for other cipher operations (AEAD, ABLKCIPHER) - Skip the bytes taken from the new request to complete the previous one by moving the SG list forward. Fixes: 37b5e8897eb5 ("crypto: talitos - chain in buffered data for ahash on SEC1") Cc: stable@vger.kernel.org Signed-off-by: Christophe Leroy Signed-off-by: Herbert Xu drivers/crypto/talitos.c | 69 ++++++++++++++++++++++++++++-------------------- 1 file changed, 41 insertions(+), 28 deletions(-) commit d44769e4ccb636e8238adbc151f25467a536711b Author: Christophe Leroy Date: Mon Jun 24 07:20:15 2019 +0000 crypto: talitos - move struct talitos_edesc into talitos.h Moves struct talitos_edesc into talitos.h so that it can be used from any place in talitos.c It will be required for next patch ("crypto: talitos - fix hash on SEC1") Signed-off-by: Christophe Leroy Cc: stable@vger.kernel.org Signed-off-by: Herbert Xu drivers/crypto/talitos.c | 30 ------------------------------ drivers/crypto/talitos.h | 30 ++++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 30 deletions(-) commit aeb87246537a83c2aff482f3f34a2e0991e02cbc Author: Christophe Leroy Date: Mon Jun 24 07:20:14 2019 +0000 lib/scatterlist: Fix mapping iterator when sg->offset is greater than PAGE_SIZE All mapping iterator logic is based on the assumption that sg->offset is always lower than PAGE_SIZE. But there are situations where sg->offset is such that the SG item is on the second page. In that case sg_copy_to_buffer() fails properly copying the data into the buffer. One of the reason is that the data will be outside the kmapped area used to access that data. This patch fixes the issue by adjusting the mapping iterator offset and pgoffset fields such that offset is always lower than PAGE_SIZE. Signed-off-by: Christophe Leroy Fixes: 4225fc8555a9 ("lib/scatterlist: use page iterator in the mapping iterator") Cc: stable@vger.kernel.org Signed-off-by: Herbert Xu lib/scatterlist.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 06013b647c708e4f3179b7b0cf3adf28cb8cbfcf Author: Alex Williamson Date: Thu Jun 13 16:57:20 2019 -0600 PCI/IOV: Assume SR-IOV VFs support extended config space. The SR-IOV specification requires both PFs and VFs to implement a PCIe capability. Generally this is sufficient to assume extended config space is present, but we generally also perform additional tests to make sure the extended config space is reachable and not simply an alias of standard config space. For a VF to exist extended config space must be accessible on the PF, therefore we can also assume it to be accessible on the VF. This enables a micro performance optimization previously implemented in commit 975bb8b4dc93 ("PCI/IOV: Use VF0 cached config space size for other VFs") to speed up probing of VFs. Signed-off-by: Alex Williamson Signed-off-by: Bjorn Helgaas Reviewed-by: Kuppuswamy Sathyanarayanan Cc: KarimAllah Ahmed Cc: Hao Zheng drivers/pci/probe.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 76bf6a8634a1ac04d3075993c31a6d94a7f75580 Author: Alex Williamson Date: Thu Jun 13 16:57:12 2019 -0600 Revert "PCI/IOV: Use VF0 cached config space size for other VFs" Revert 975bb8b4dc93 ("PCI/IOV: Use VF0 cached config space size for other VFs"), which attempted to cache the config space size from the first VF to re-use for subsequent VFs. The cached value was determined prior to discovering the PCIe capability on the VF, which resulted in the first VF reporting the correct config space size (4K), as it has a special case through pci_cfg_space_size(), while all the other VFs only reported 256 bytes. As this was only a performance optimization, we're better off without it. Fixes: 975bb8b4dc93 ("PCI/IOV: Use VF0 cached config space size for other VFs") Link: https://lore.kernel.org/r/156046663197.29869.3633634445109057665.stgit@gimli.home Signed-off-by: Alex Williamson Signed-off-by: Bjorn Helgaas Cc: KarimAllah Ahmed Cc: Kuppuswamy Sathyanarayanan Cc: Hao Zheng drivers/pci/iov.c | 2 -- drivers/pci/pci.h | 1 - drivers/pci/probe.c | 17 ----------------- 3 files changed, 20 deletions(-) commit a328a259ced0c0fa5aabcd29238779a536335884 Merge: a041ede09011 15a108af1a18 Author: Ingo Molnar Date: Wed Jul 3 15:55:48 2019 +0200 Merge tag 'perf-core-for-mingo-5.3-20190703' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: perf metrics: Andi Kleen: - Fixes for SkylakeX and CascadeLakeX Intel vendor events. - Avoid extra ':' for --raw metrics. - Don't include duration_time in group. perf script: Arnaldo Carvalho de Melo/Jiri Olsa: - Fix processing guest samples. perf diff: Jin Yao: - Do diffs by basic blocks. objtool: Jiri Olsa: - Fix build by linking against tools/lib/ctype.o sources. perf pmu: John Garry: - Support more complex PMU event aliasing. - Add support for Hisi hip08 DDRC, HHA and L3C PMU aliasing. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit a041ede090119510bb56396dd0df0ee0b3173b47 Merge: fd7d55172d1e 06c642c0e9fc Author: Ingo Molnar Date: Wed Jul 3 15:54:24 2019 +0200 Merge tag 'perf-core-for-mingo-5.3-20190701' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: perf annotate: Mao Han: - Add support for the csky processor architecture. perf stat: Andi Kleen: - Fix metrics with --no-merge. - Don't merge events in the same PMU. - Fix group lookup for metric group. Intel PT: Adrian Hunter: - Improve CBR (Core to Bus Ratio) packets support. - Fix thread stack return from kernel for kernel only case. - Export power and ptwrite events to sqlite and postgresql. core libraries: Arnaldo Carvalho de Melo: - Find routines in tools/perf/util/ that have implementations in the kernel libraries (lib/*.c), such as strreplace(), strim(), skip_spaces() and reuse them after making a copy into tools/lib and tools/include/. This continues the effort of having tools/ code looking as much as possible like kernel source code, to help encourage people to work on both the kernel and in tools hosted in the kernel sources. That in turn will help moving stuff that uses those routines to tools/lib/perf/ where they will be made available for use in other tools. In the process ditch old cruft, remove unused variables and add missing include directives for headers providing things used in places that were building by sheer luck. Kyle Meyer: - Bump MAX_NR_CPUS and MAX_CACHES to get these tools to work on more machines. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit d665e12aa713e598a1100a320e5679c3f73823ed Author: Christoph Hellwig Date: Wed Jul 3 05:24:35 2019 -0700 block: nr_phys_segments needs to be zero for REQ_OP_WRITE_ZEROES Fix a regression introduced when removing bi_phys_segments for Write Zeroes requests, which need to have a segment count of zero, as they don't have a payload. Fixes: 14ccb66b3f58 ("block: remove the bi_phys_segments field in struct bio") Reported-by: Jens Axboe Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/blk-merge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c9093486f283c3447439f234eb0124129e8e7834 Author: Anshuman Khandual Date: Fri Jun 21 21:39:18 2019 +0530 mips/kprobes: Export kprobe_fault_handler() Generic kprobe_page_fault() calls into kprobe_fault_handler() which must be available with and without CONFIG_KPROBES. There is one stub implementation for !CONFIG_KPROBES. For CONFIG_KPROBES all subscribing archs must provide a kprobe_fault_handler() definition. Currently mips has an implementation which is defined as 'static inline'. Make it available for generic kprobes to comply with the above new requirement. Cc: Ralf Baechle Cc: Paul Burton Cc: James Hogan Cc: Andrew Morton Cc: linux-mips@vger.kernel.org Cc: linux-mm@kvack.org Reported-by: kbuild test robot Signed-off-by: Anshuman Khandual Signed-off-by: Paul Burton Fixes: 773734b44557 ("mm, kprobes: generalize and rename notify_page_fault() as kprobe_page_fault()") Cc: linux-kernel@vger.kernel.org arch/mips/include/asm/kprobes.h | 1 + arch/mips/kernel/kprobes.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit 455302d1c9ae9318660aaeb9748a01ff414c9741 Author: Ilya Maximets Date: Fri Jun 28 11:04:07 2019 +0300 xdp: fix hang while unregistering device bound to xdp socket Device that bound to XDP socket will not have zero refcount until the userspace application will not close it. This leads to hang inside 'netdev_wait_allrefs()' if device unregistering requested: # ip link del p1 < hang on recvmsg on netlink socket > # ps -x | grep ip 5126 pts/0 D+ 0:00 ip link del p1 # journalctl -b Jun 05 07:19:16 kernel: unregister_netdevice: waiting for p1 to become free. Usage count = 1 Jun 05 07:19:27 kernel: unregister_netdevice: waiting for p1 to become free. Usage count = 1 ... Fix that by implementing NETDEV_UNREGISTER event notification handler to properly clean up all the resources and unref device. This should also allow socket killing via ss(8) utility. Fixes: 965a99098443 ("xsk: add support for bind for Rx") Signed-off-by: Ilya Maximets Acked-by: Jonathan Lemon Signed-off-by: Daniel Borkmann include/net/xdp_sock.h | 5 +++ net/xdp/xdp_umem.c | 10 +++--- net/xdp/xdp_umem.h | 1 + net/xdp/xsk.c | 87 +++++++++++++++++++++++++++++++++++++++++++------- 4 files changed, 87 insertions(+), 16 deletions(-) commit 162c820ed8965bf94d2685f97388aea5aee9e258 Author: Ilya Maximets Date: Fri Jun 28 11:04:06 2019 +0300 xdp: hold device for umem regardless of zero-copy mode Device pointer stored in umem regardless of zero-copy mode, so we heed to hold the device in all cases. Fixes: c9b47cc1fabc ("xsk: fix bug when trying to use both copy and zero-copy on one queue id") Signed-off-by: Ilya Maximets Acked-by: Jonathan Lemon Signed-off-by: Daniel Borkmann net/xdp/xdp_umem.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 11aca65ec4db09527d3e9b6b41a0615b7da4386b Author: Jiri Benc Date: Tue Jul 2 19:40:31 2019 +0200 selftests: bpf: fix inlines in test_lwt_seg6local Selftests are reporting this failure in test_lwt_seg6local.sh: + ip netns exec ns2 ip -6 route add fb00::6 encap bpf in obj test_lwt_seg6local.o sec encap_srh dev veth2 Error fetching program/map! Failed to parse eBPF program: Operation not permitted The problem is __attribute__((always_inline)) alone is not enough to prevent clang from inserting those functions in .text. In that case, .text is not marked as relocateable. See the output of objdump -h test_lwt_seg6local.o: Idx Name Size VMA LMA File off Algn 0 .text 00003530 0000000000000000 0000000000000000 00000040 2**3 CONTENTS, ALLOC, LOAD, READONLY, CODE This causes the iproute bpf loader to fail in bpf_fetch_prog_sec: bpf_has_call_data returns true but bpf_fetch_prog_relo fails as there's no relocateable .text section in the file. To fix this, convert to 'static __always_inline'. v2: Use 'static __always_inline' instead of 'static inline __attribute__((always_inline))' Fixes: c99a84eac026 ("selftests/bpf: test for seg6local End.BPF action") Signed-off-by: Jiri Benc Acked-by: Yonghong Song Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/progs/test_lwt_seg6local.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit d2f5bbbc350050895d9f33c2744a61f9e0af1caa Author: Jiri Benc Date: Tue Jul 2 20:26:51 2019 +0200 selftests: bpf: standardize to static __always_inline The progs for bpf selftests use several different notations to force function inlining. Standardize to what most of them use, static __always_inline. Suggested-by: Song Liu Signed-off-by: Jiri Benc Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/progs/pyperf.h | 9 +++--- tools/testing/selftests/bpf/progs/strobemeta.h | 36 ++++++++++++---------- tools/testing/selftests/bpf/progs/test_jhash.h | 3 +- tools/testing/selftests/bpf/progs/test_seg6_loop.c | 23 +++++++------- .../selftests/bpf/progs/test_verif_scale2.c | 2 +- 5 files changed, 38 insertions(+), 35 deletions(-) commit 71634d7f92093062e7b8b2a9efffa5569edcca8b Author: brakmo Date: Tue Jul 2 15:09:52 2019 -0700 bpf: Add support for fq's EDT to HBM Adds support for fq's Earliest Departure Time to HBM (Host Bandwidth Manager). Includes a new BPF program supporting EDT, and also updates corresponding programs. It will drop packets with an EDT of more than 500us in the future unless the packet belongs to a flow with less than 2 packets in flight. This is done so each flow has at least 2 packets in flight, so they will not starve, and also to help prevent delayed ACK timeouts. It will also work with ECN enabled traffic, where the packets will be CE marked if their EDT is more than 50us in the future. The table below shows some performance numbers. The flows are back to back RPCS. One server sending to another, either 2 or 4 flows. One flow is a 10KB RPC, the rest are 1MB RPCs. When there are more than one flow of a given RPC size, the numbers represent averages. The rate limit applies to all flows (they are in the same cgroup). Tests ending with "-edt" ran with the new BPF program supporting EDT. Tests ending with "-hbt" ran on top HBT qdisc with the specified rate (i.e. no HBM). The other tests ran with the HBM BPF program included in the HBM patch-set. EDT has limited value when using DCTCP, but it helps in many cases when using Cubic. It usually achieves larger link utilization and lower 99% latencies for the 1MB RPCs. HBM ends up queueing a lot of packets with its default parameter values, reducing the goodput of the 10KB RPCs and increasing their latency. Also, the RTTs seen by the flows are quite large. Aggr 10K 10K 10K 1MB 1MB 1MB Limit rate drops RTT rate P90 P99 rate P90 P99 Test rate Flows Mbps % us Mbps us us Mbps ms ms -------- ---- ----- ---- ----- --- ---- ---- ---- ---- ---- ---- cubic 1G 2 904 0.02 108 257 511 539 647 13.4 24.5 cubic-edt 1G 2 982 0.01 156 239 656 967 743 14.0 17.2 dctcp 1G 2 977 0.00 105 324 408 744 653 14.5 15.9 dctcp-edt 1G 2 981 0.01 142 321 417 811 660 15.7 17.0 cubic-htb 1G 2 919 0.00 1825 40 2822 4140 879 9.7 9.9 cubic 200M 2 155 0.30 220 81 532 655 74 283 450 cubic-edt 200M 2 188 0.02 222 87 1035 1095 101 84 85 dctcp 200M 2 188 0.03 111 77 912 939 111 76 325 dctcp-edt 200M 2 188 0.03 217 74 1416 1738 114 76 79 cubic-htb 200M 2 188 0.00 5015 8 14ms 15ms 180 48 50 cubic 1G 4 952 0.03 110 165 516 546 262 38 154 cubic-edt 1G 4 973 0.01 190 111 1034 1314 287 65 79 dctcp 1G 4 951 0.00 103 180 617 905 257 37 38 dctcp-edt 1G 4 967 0.00 163 151 732 1126 272 43 55 cubic-htb 1G 4 914 0.00 3249 13 7ms 8ms 300 29 34 cubic 5G 4 4236 0.00 134 305 490 624 1310 10 17 cubic-edt 5G 4 4865 0.00 156 306 425 759 1520 10 16 dctcp 5G 4 4936 0.00 128 485 221 409 1484 7 9 dctcp-edt 5G 4 4924 0.00 148 390 392 623 1508 11 26 v1 -> v2: Incorporated Andrii's suggestions v2 -> v3: Incorporated Yonghong's suggestions v3 -> v4: Removed credit update that is not needed Signed-off-by: Lawrence Brakmo Acked-by: Yonghong Song Signed-off-by: Daniel Borkmann samples/bpf/Makefile | 2 + samples/bpf/do_hbm_test.sh | 22 +++--- samples/bpf/hbm.c | 18 ++++- samples/bpf/hbm_edt_kern.c | 168 +++++++++++++++++++++++++++++++++++++++++++++ samples/bpf/hbm_kern.h | 40 +++++++++-- 5 files changed, 231 insertions(+), 19 deletions(-) commit 35af80aef99b34993783c34029d2196717e693c8 Author: Christoph Hellwig Date: Mon Jul 1 23:54:38 2019 +0200 gfs2: don't use buffer_heads in gfs2_allocate_page_backing Rewrite gfs2_allocate_page_backing to call gfs2_iomap_get_alloc and operate on struct iomap directly. Signed-off-by: Christoph Hellwig Signed-off-by: Andreas Gruenbacher fs/gfs2/file.c | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) commit 7770c93a46e6d2dc6e7c2172d83f2f5aca947cf7 Author: Christoph Hellwig Date: Mon Jul 1 23:54:36 2019 +0200 gfs2: use iomap_bmap instead of generic_block_bmap No need to indirect through get_blocks and buffer_heads when we can just use the iomap version. Signed-off-by: Christoph Hellwig Signed-off-by: Andreas Gruenbacher fs/gfs2/aops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 378b6cbfb82f2a8bb47ae3b1dac0419b57d84a36 Author: Christoph Hellwig Date: Mon Jul 1 23:54:35 2019 +0200 gfs2: mark stuffed_readpage static Signed-off-by: Christoph Hellwig Signed-off-by: Andreas Gruenbacher fs/gfs2/aops.c | 3 +-- fs/gfs2/aops.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) commit 59c01c5046cc0cf567d58cc7b59a704a36a06899 Author: Christoph Hellwig Date: Mon Jul 1 23:54:34 2019 +0200 gfs2: merge gfs2_writepage_common into gfs2_writepage There is no need to keep these two functions separate. Signed-off-by: Christoph Hellwig Signed-off-by: Andreas Gruenbacher fs/gfs2/aops.c | 32 ++++++-------------------------- 1 file changed, 6 insertions(+), 26 deletions(-) commit eadd753580469f281912e28114a80e5822622cbe Author: Christoph Hellwig Date: Mon Jul 1 23:54:33 2019 +0200 gfs2: merge gfs2_writeback_aops and gfs2_ordered_aops The only difference between the two is that gfs2_ordered_aops sets the set_page_dirty method to __set_page_dirty_buffers, but given that __set_page_dirty_buffers is the default, if no method is set, there is no need to to do that. Merge the two sets of operations into one. Signed-off-by: Christoph Hellwig Signed-off-by: Andreas Gruenbacher fs/gfs2/aops.c | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) commit c09c6071310df430619df57d67e7ab59902f99ad Author: Harry Pan Date: Wed Jun 19 16:28:01 2019 +0800 platform/x86: intel_pmc_core: transform Pkg C-state residency from TSC ticks into microseconds Refer to the Intel SDM Vol.4, the package C-state residency counters of modern IA micro-architecture are all ticking in TSC frequency, hence we can apply simple math to transform the ticks into microseconds. i.e., residency (ms) = count / tsc_khz residency (us) = count / tsc_khz * 1000 This also aligns to other sysfs debug entries of residency counter in the same metric in microseconds, benefits reading and scripting. v2: restore the accidentally deleted newline, no function change. v3: apply kernel do_div() macro to calculate division Signed-off-by: Harry Pan Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_pmc_core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 8e8fe446a91caf4537f512572e4bf52f8f2154a9 Author: Fuqian Huang Date: Mon Jul 1 11:24:26 2019 +0800 platform/x86: asus-wmi: Use dev_get_drvdata() Using dev_get_drvdata directly. Signed-off-by: Fuqian Huang Signed-off-by: Andy Shevchenko drivers/platform/x86/asus-wmi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ba07e3aacc08de2e6f6cd199c3618fbbc2c45f0c Author: Vadim Pasternak Date: Sun Jun 23 12:16:29 2019 +0000 Documentation/ABI: Add new attribute for mlxreg-io sysfs interfaces Add documentation for the new attributes for exposing reset causes for the next type of resets: caused by different watchdog, BIOS reload, ASIC reset request. Signed-off-by: Vadim Pasternak Signed-off-by: Andy Shevchenko Documentation/ABI/stable/sysfs-driver-mlxreg-io | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 262d861bf7d6dfb80f720d09d8fc901c8b24f9f7 Author: Vadim Pasternak Date: Sun Jun 23 12:16:28 2019 +0000 platform/x86: mlx-platform: Add more reset cause attributes Add more attributes for reset cause indication for the cases when system reset has been caused by watchdog, BIOS reload and COMEX thermal shutdown. Signed-off-by: Vadim Pasternak Signed-off-by: Andy Shevchenko drivers/platform/x86/mlx-platform.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit cb636bb1dcfb514e85b70ff482b6c583f3eb7960 Author: Vadim Pasternak Date: Sun Jun 23 12:16:27 2019 +0000 platform/x86: mlx-platform: Modify DMI matching order Modify DMI matching order: perform matching based on DMI_BOARD_NAME before matching based on DMI_BOARD_VENDOR and DMI_PRODUCT_NAME in order to reduce the number of ‘dmi_table’ entries necessary for new systems support and keep matching order in logical way. For example, the existing check for DMI_PRODUCT_NAME with prefixes “MSN27", “MSN24”, "MSB” matches systems MSN2700-BXXXX, MSN2700-XXXX, MSN2410-BXXXX, MSB7800-XXXX, where ‘XXXX’ specifies some systems hardware flavors. At the same time these systems also matched by DMI_BOARD_NAME “VMOD0001”, because they all have the same platform configuration (LED, interrupt control, mux etcetera). New systems with different platform configuration, but with similar DMI_PRODUCT_NAME MSN2700-2XXXX, MSN2700-2XXXX, MSB7800-2XXXX are about to be added. These system have similar DMI_PRODUCT_NAME, since they have same ports configuration as their predecessors. All new systems will be matched by DMI_BOARD_NAME “VMOD0008”. With the change provided in the patch it is enough just to add “VMOD0008” match following natural after “VMOD0007”, otherwise “VMOD0008” or all “MSN2700-2XXXX”, “MSN2700-2XXXX”, “MSB7800-2XXXX” should be added on top of ‘mlxplat_dmi_table” in order to be matched before “MSN27", “MSN24”, "MSB”. Signed-off-by: Vadim Pasternak Signed-off-by: Andy Shevchenko drivers/platform/x86/mlx-platform.c | 72 ++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 36 deletions(-) commit a7ff2f99eb547867377f4db7eeae853804d78d96 Author: Vadim Pasternak Date: Sun Jun 23 12:16:26 2019 +0000 platform/x86: mlx-platform: Add regmap structure for the next generation systems Use separated regamp structures for old and next generation systems. Next generation systems don’t require write protection removing. Signed-off-by: Vadim Pasternak Signed-off-by: Andy Shevchenko drivers/platform/x86/mlx-platform.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit d66656262a23c20cb6d88b772b65ad26fa3fc38b Author: Vadim Pasternak Date: Sun Jun 23 12:16:25 2019 +0000 platform/x86: mlx-platform: Change API for i2c-mlxcpld driver activation Activate 'i2c-mlxcpld' driver with 'platform_device_register_resndata' instead off 'platform_device_register_simple' in order to pass platform specific info. Add platform i2c data for the next generation systems. Signed-off-by: Vadim Pasternak Signed-off-by: Andy Shevchenko drivers/platform/x86/mlx-platform.c | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) commit 6b266e91a0715dae9923a2791e0b98165163e91f Author: Vadim Pasternak Date: Sun Jun 23 12:16:24 2019 +0000 platform/x86: mlx-platform: Move regmap initialization before all drivers activation Initialize regmap prior drivers starting to allow passing regmap handle to 'i2c_mlxcpld' driver. Signed-off-by: Vadim Pasternak Signed-off-by: Andy Shevchenko drivers/platform/x86/mlx-platform.c | 58 +++++++++++++++++++++---------------- 1 file changed, 33 insertions(+), 25 deletions(-) commit 3dda617a14327fb5f7c796b0cda2d211e9a2169e Author: Srinivas Pandruvada Date: Tue Jul 2 18:53:31 2019 -0700 MAINTAINERS: Update for Intel Speed Select Technology Added myself as the maintainer. Signed-off-by: Srinivas Pandruvada Acked-by: Rafael J. Wysocki Signed-off-by: Andy Shevchenko MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) commit 3fb4f7cd472c7f5905c91508e988f6b28372210d Author: Srinivas Pandruvada Date: Sun Jun 30 10:14:08 2019 -0700 tools/power/x86: A tool to validate Intel Speed Select commands The Intel(R) Speed select technologies contains four features. Performance profile:An non architectural mechanism that allows multiple optimized performance profiles per system via static and/or dynamic adjustment of core count, workload, Tjmax, and TDP, etc. aka ISS in the documentation. Base Frequency: Enables users to increase guaranteed base frequency on certain cores (high priority cores) in exchange for lower base frequency on remaining cores (low priority cores). aka PBF in the documenation. Turbo frequency: Enables the ability to set different turbo ratio limits to cores based on priority. aka FACT in the documentation. Core power: An Interface that allows user to define per core/tile priority. There is a multi level help for commands and options. This can be used to check required arguments for each feature and commands for the feature. To start navigating the features start with $sudo intel-speed-select --help For help on a specific feature for example $sudo intel-speed-select perf-profile --help To get help for a command for a feature for example $sudo intel-speed-select perf-profile get-lock-status --help Signed-off-by: Srinivas Pandruvada Acked-by: Len Brown Acked-by: Rafael J. Wysocki Signed-off-by: Andy Shevchenko tools/Makefile | 12 +- tools/power/x86/intel-speed-select/Build | 1 + tools/power/x86/intel-speed-select/Makefile | 56 + tools/power/x86/intel-speed-select/isst-config.c | 1607 +++++++++++++++++++++ tools/power/x86/intel-speed-select/isst-core.c | 721 +++++++++ tools/power/x86/intel-speed-select/isst-display.c | 479 ++++++ tools/power/x86/intel-speed-select/isst.h | 231 +++ 7 files changed, 3102 insertions(+), 5 deletions(-) commit 4d19addd6b2fdf825978bc76c83356709c175611 Author: Enrico Weigelt Date: Wed Jul 3 11:42:24 2019 +0200 gpio: pl061: drop duplicate printing of device name The dev_info() call already prints the device name, so there's no need to explicitly include it in the message for second time. Signed-off-by: Enrico Weigelt Link: https://lore.kernel.org/r/1562146944-4162-1-git-send-email-info@metux.net Signed-off-by: Linus Walleij drivers/gpio/gpio-pl061.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 751bd5db52604f3f71d54dbad82707ef2475b707 Author: Jerome Brunet Date: Wed Jul 3 14:07:49 2019 +0200 ASoC: meson: axg-tdm-formatter: add reset Add the optional reset line handling which is present on the new SoC families, such as the g12a. Triggering this reset is not critical but it helps solve a channel shift issue on the g12a. Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20190703120749.32341-3-jbrunet@baylibre.com Signed-off-by: Mark Brown sound/soc/meson/axg-tdm-formatter.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 094380ea2bf9f0fa7d63e67bf500b8c77e8d1910 Author: Jerome Brunet Date: Wed Jul 3 14:07:48 2019 +0200 ASoC: meson: axg-tdm-formatter: add reset to the bindings documentation Add an optional reset property to the tdm formatter bindings. The dedicated reset line is present on some SoC families, such as the g12a. Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20190703120749.32341-2-jbrunet@baylibre.com Signed-off-by: Mark Brown .../devicetree/bindings/sound/amlogic,axg-tdm-formatters.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 7a1ade847596dadc94b37e49f8c03f167fd71748 Author: David Howells Date: Thu Jun 27 23:03:07 2019 +0100 keys: Provide KEYCTL_GRANT_PERMISSION Provide a keyctl() operation to grant/remove permissions. The grant operation, wrapped by libkeyutils, looks like: int ret = keyctl_grant_permission(key_serial_t key, enum key_ace_subject_type type, unsigned int subject, unsigned int perm); Where key is the key to be modified, type and subject represent the subject to which permission is to be granted (or removed) and perm is the set of permissions to be granted. 0 is returned on success. SET_SECURITY permission is required for this. The subject type currently must be KEY_ACE_SUBJ_STANDARD for the moment (other subject types will come along later). For subject type KEY_ACE_SUBJ_STANDARD, the following subject values are available: KEY_ACE_POSSESSOR The possessor of the key KEY_ACE_OWNER The owner of the key KEY_ACE_GROUP The key's group KEY_ACE_EVERYONE Everyone perm lists the permissions to be granted: KEY_ACE_VIEW Can view the key metadata KEY_ACE_READ Can read the key content KEY_ACE_WRITE Can update/modify the key content KEY_ACE_SEARCH Can find the key by searching/requesting KEY_ACE_LINK Can make a link to the key KEY_ACE_SET_SECURITY Can set security KEY_ACE_INVAL Can invalidate KEY_ACE_REVOKE Can revoke KEY_ACE_JOIN Can join this keyring KEY_ACE_CLEAR Can clear this keyring If an ACE already exists for the subject, then the permissions mask will be overwritten; if perm is 0, it will be deleted. Currently, the internal ACL is limited to a maximum of 16 entries. For example: int ret = keyctl_grant_permission(key, KEY_ACE_SUBJ_STANDARD, KEY_ACE_OWNER, KEY_ACE_VIEW | KEY_ACE_READ); Signed-off-by: David Howells include/uapi/linux/keyctl.h | 2 + security/keys/compat.c | 2 + security/keys/internal.h | 5 ++ security/keys/keyctl.c | 8 ++- security/keys/permission.c | 119 ++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 135 insertions(+), 1 deletion(-) commit 8cc7720470a17558bd6f8d67df63361600e46c55 Author: Jarkko Nikula Date: Wed Jul 3 14:46:03 2019 +0300 spi: pxa2xx: Add support for Intel Elkhart Lake Intel Elkhart Lake has the same LPSS than Intel Broxton. Add support for it. Signed-off-by: Jarkko Nikula Link: https://lore.kernel.org/r/20190703114603.22301-1-jarkko.nikula@linux.intel.com Signed-off-by: Mark Brown drivers/spi/spi-pxa2xx.c | 4 ++++ 1 file changed, 4 insertions(+) commit ba2bf340ade89e71c53273ea115c7872865782c1 Author: Bartosz Golaszewski Date: Wed Jul 3 10:48:49 2019 +0200 regulator: max77650: add MODULE_ALIAS() Define a MODULE_ALIAS() in the regulator sub-driver for max77650 so that the appropriate module gets loaded together with the core mfd driver. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20190703084849.9668-1-brgl@bgdev.pl Signed-off-by: Mark Brown drivers/regulator/max77650-regulator.c | 1 + 1 file changed, 1 insertion(+) commit a3c7c029c3da01645f2db1bf7737668d17c2c78a Author: Colin Ian King Date: Wed Jul 3 09:20:09 2019 +0100 regulator: max77620: remove redundant assignment to variable ret The variable ret is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20190703082009.18779-1-colin.king@canonical.com Signed-off-by: Mark Brown drivers/regulator/max77620-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 51785bddebf7a509dfa3fe7e80a63d39d2764bb9 Merge: 7f61abcdb1af b2357839c56a Author: Greg Kroah-Hartman Date: Wed Jul 3 13:48:54 2019 +0200 Merge tag 'usb-for-v5.3-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next Felipe writes: USB: more changes for v5.3 merge window Turns out a few more important changes came about. We have the new Cadence DRD Driver being added here and that's the biggest, most important part. Together with that we have suport for new imx7ulp phy. Support for TigerLake Devices on dwc3. Also a couple important fixes which weren't completed in time for the -rc cycle. Signed-off-by: Felipe Balbi * tag 'usb-for-v5.3-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb: usb: renesas_usbhs: add a workaround for a race condition of workqueue usb: gadget: udc: renesas_usb3: remove redundant assignment to ret usb: dwc2: use a longer AHB idle timeout in dwc2_core_reset() USB: gadget: function: fix issue Unneeded variable: "value" usb: phy: phy-mxs-usb: add imx7ulp support doc: dt-binding: mxs-usb-phy: add compatible for 7ulp usb:cdns3 Fix for stuck packets in on-chip OUT buffer. usb:cdns3 Add Cadence USB3 DRD Driver usb:gadget Simplify usb_decode_get_set_descriptor function. usb:gadget Patch simplify usb_decode_set_clear_feature function. usb:gadget Separated decoding functions from dwc3 driver. dt-bindings: add binding for USBSS-DRD controller. usb: dwc3: pci: add support for TigerLake Devices commit 5004efbb3611f0672af6c92823d17100603bcccd Author: Geert Uytterhoeven Date: Mon Jul 1 15:58:27 2019 +0200 Documentation: ABI: power: Add missing newline at end of file "git diff" says: \ No newline at end of file after modifying the files. Signed-off-by: Geert Uytterhoeven Signed-off-by: Rafael J. Wysocki Documentation/ABI/testing/sysfs-power | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 417a564c65881d26c7600c146e114a438a223ecf Author: Andy Shevchenko Date: Wed Jul 3 04:17:34 2019 +0300 ACPI / PMIC: intel: Drop double removal of address space handler There is no need to remove address space handler twice, because removal is idempotent. Signed-off-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki drivers/acpi/pmic/intel_pmic.c | 2 -- 1 file changed, 2 deletions(-) commit b244883ca89c88fc250ba440937a3f1b28b258ff Author: Colin Ian King Date: Tue Jul 2 14:10:29 2019 +0100 ACPI: APD: remove redundant assignment to pointer clk The pointer clk is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Rafael J. Wysocki drivers/acpi/acpi_apd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5d8cbf7176a427cd904eaa6efdaf6960d717b0de Author: Mauro Carvalho Chehab Date: Fri Jun 28 09:20:37 2019 -0300 docs: extcon: convert it to ReST and move to ACPI dir The intel-int3496.txt file is a documentation for an ACPI driver. There's no reason to keep it on a separate directory. So, instead of keeping it on some random location, move it to a sub-directory inside the ACPI documentation dir, renaming it to .rst. Signed-off-by: Mauro Carvalho Chehab Acked-by: Chanwoo Choi Signed-off-by: Rafael J. Wysocki .../acpi/extcon-intel-int3496.rst} | 14 ++++++++++---- Documentation/firmware-guide/acpi/index.rst | 1 + MAINTAINERS | 6 +++--- 3 files changed, 14 insertions(+), 7 deletions(-) commit 6d3ca7e73642ce17398f4cd5df1780da4a1ccdaf Author: Masahiro Yamada Date: Tue May 21 22:13:24 2019 +0900 powerpc/mm: mark more tlb functions as __always_inline With CONFIG_OPTIMIZE_INLINING enabled, Laura Abbott reported error with gcc 9.1.1: arch/powerpc/mm/book3s64/radix_tlb.c: In function '_tlbiel_pid': arch/powerpc/mm/book3s64/radix_tlb.c:104:2: warning: asm operand 3 probably doesn't match constraints 104 | asm volatile(PPC_TLBIEL(%0, %4, %3, %2, %1) | ^~~ arch/powerpc/mm/book3s64/radix_tlb.c:104:2: error: impossible constraint in 'asm' Fixing _tlbiel_pid() is enough to address the warning above, but I inlined more functions to fix all potential issues. To meet the "i" (immediate) constraint for the asm operands, functions propagating "ric" must be always inlined. Fixes: 9012d011660e ("compiler: allow all arches to enable CONFIG_OPTIMIZE_INLINING") Reported-by: Laura Abbott Signed-off-by: Masahiro Yamada Reviewed-by: Christophe Leroy Signed-off-by: Michael Ellerman arch/powerpc/mm/book3s64/hash_native.c | 2 +- arch/powerpc/mm/book3s64/radix_tlb.c | 32 ++++++++++++++++---------------- 2 files changed, 17 insertions(+), 17 deletions(-) commit 1f6db18fbd764ea3079eba289652b622f9c8c5ef Merge: d6c8204659eb 0b40deeef6d9 Author: Russell King Date: Wed Jul 3 11:44:46 2019 +0100 Merge branch 'sa1100-for-next'; commit 'riscpc^{/ARM: riscpc: enable chained scatterlist support}' into for-arm-soc commit d6c8204659eb1846c444997ee28fe9d7e5442f4e Author: Russell King Date: Wed Aug 31 08:49:53 2016 +0100 ARM: sa1100: convert to common clock framework Convert sa1100 to use the common clock framework. Signed-off-by: Russell King arch/arm/Kconfig | 1 + arch/arm/mach-sa1100/clock.c | 220 ++++++++++++++++++------------------------- 2 files changed, 95 insertions(+), 126 deletions(-) commit 33bae185f74d49a0d7b1bfaafb8e959efce0f243 Author: Leo Yan Date: Tue Jul 2 18:25:31 2019 +0800 bpf, libbpf, smatch: Fix potential NULL pointer dereference Based on the following report from Smatch, fix the potential NULL pointer dereference check: tools/lib/bpf/libbpf.c:3493 bpf_prog_load_xattr() warn: variable dereferenced before check 'attr' (see line 3483) 3479 int bpf_prog_load_xattr(const struct bpf_prog_load_attr *attr, 3480 struct bpf_object **pobj, int *prog_fd) 3481 { 3482 struct bpf_object_open_attr open_attr = { 3483 .file = attr->file, 3484 .prog_type = attr->prog_type, ^^^^^^ 3485 }; At the head of function, it directly access 'attr' without checking if it's NULL pointer. This patch moves the values assignment after validating 'attr' and 'attr->file'. Signed-off-by: Leo Yan Acked-by: Yonghong Song Signed-off-by: Daniel Borkmann tools/lib/bpf/libbpf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit cdfc7f888c2a355b01308e97c6df108f1c2b64e8 Author: Andrii Nakryiko Date: Tue Jul 2 08:16:20 2019 -0700 libbpf: fix GCC8 warning for strncpy GCC8 started emitting warning about using strncpy with number of bytes exactly equal destination size, which is generally unsafe, as can lead to non-zero terminated string being copied. Use IFNAMSIZ - 1 as number of bytes to ensure name is always zero-terminated. Signed-off-by: Andrii Nakryiko Cc: Magnus Karlsson Acked-by: Yonghong Song Acked-by: Magnus Karlsson Signed-off-by: Daniel Borkmann tools/lib/bpf/xsk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9b979ac3ce0b2a3e55cd1b866eaeaed4e1c38df9 Merge: 8afecaa68df1 3dae67ce600c Author: Thomas Gleixner Date: Wed Jul 3 11:18:55 2019 +0200 Merge tag 'irqchip-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/core Pull irqchip updates for Linux 5.3 from Marc Zyngier: - ACPI support for the exiu and mb86s7x drivers - New Renesas RZ/A1, Amazon al-fic drivers - Add quirk for Amazon Graviton GICv2m widget - Large Renesas driver cleanup - CSky mpintc trigger type fixes - Meson G12A driver support - Various minor cleanups commit ac8786c72eba67dfc8ae751a75c586289a1b9b1b Author: Luke Nelson Date: Fri Jun 28 22:57:51 2019 -0700 selftests: bpf: add tests for shifts by zero There are currently no tests for ALU64 shift operations when the shift amount is 0. This adds 6 new tests to make sure they are equivalent to a no-op. The x32 JIT had such bugs that could have been caught by these tests. Cc: Xi Wang Signed-off-by: Luke Nelson Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/verifier/basic_instr.c | 85 ++++++++++++++++++++++ 1 file changed, 85 insertions(+) commit 6fa632e719eec4d1b1ebf3ddc0b2d667997b057b Author: Luke Nelson Date: Fri Jun 28 22:57:50 2019 -0700 bpf, x32: Fix bug with ALU64 {LSH, RSH, ARSH} BPF_K shift by 0 The current x32 BPF JIT does not correctly compile shift operations when the immediate shift amount is 0. The expected behavior is for this to be a no-op. The following program demonstrates the bug. The expexceted result is 1, but the current JITed code returns 2. r0 = 1 r1 = 1 r1 <<= 0 if r1 == 1 goto end r0 = 2 end: exit This patch simplifies the code and fixes the bug. Fixes: 03f5781be2c7 ("bpf, x86_32: add eBPF JIT compiler for ia32") Co-developed-by: Xi Wang Signed-off-by: Xi Wang Signed-off-by: Luke Nelson Signed-off-by: Daniel Borkmann arch/x86/net/bpf_jit_comp32.c | 63 +++++-------------------------------------- 1 file changed, 6 insertions(+), 57 deletions(-) commit 68a8357ec15bdce55266e9fba8b8b3b8143fa7d2 Author: Luke Nelson Date: Fri Jun 28 22:57:49 2019 -0700 bpf, x32: Fix bug with ALU64 {LSH, RSH, ARSH} BPF_X shift by 0 The current x32 BPF JIT for shift operations is not correct when the shift amount in a register is 0. The expected behavior is a no-op, whereas the current implementation changes bits in the destination register. The following example demonstrates the bug. The expected result of this program is 1, but the current JITed code returns 2. r0 = 1 r1 = 1 r2 = 0 r1 <<= r2 if r1 == 1 goto end r0 = 2 end: exit The bug is caused by an incorrect assumption by the JIT that a shift by 32 clear the register. On x32 however, shifts use the lower 5 bits of the source, making a shift by 32 equivalent to a shift by 0. This patch fixes the bug using double-precision shifts, which also simplifies the code. Fixes: 03f5781be2c7 ("bpf, x86_32: add eBPF JIT compiler for ia32") Co-developed-by: Xi Wang Signed-off-by: Xi Wang Signed-off-by: Luke Nelson Signed-off-by: Daniel Borkmann arch/x86/net/bpf_jit_comp32.c | 221 +++++------------------------------------- 1 file changed, 23 insertions(+), 198 deletions(-) commit a3ce685dd01a786fa5bc388e47d0066a4f842591 Author: Alexei Starovoitov Date: Fri Jun 28 09:24:09 2019 -0700 bpf: fix precision tracking When equivalent state is found the current state needs to propagate precision marks. Otherwise the verifier will prune the search incorrectly. There is a price for correctness: before before broken fixed cnst spill precise precise bpf_lb-DLB_L3.o 1923 8128 1863 1898 bpf_lb-DLB_L4.o 3077 6707 2468 2666 bpf_lb-DUNKNOWN.o 1062 1062 544 544 bpf_lxc-DDROP_ALL.o 166729 380712 22629 36823 bpf_lxc-DUNKNOWN.o 174607 440652 28805 45325 bpf_netdev.o 8407 31904 6801 7002 bpf_overlay.o 5420 23569 4754 4858 bpf_lxc_jit.o 39389 359445 50925 69631 Overall precision tracking is still very effective. Fixes: b5dc0163d8fd ("bpf: precise scalar_value tracking") Reported-by: Lawrence Brakmo Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Tested-by: Lawrence Brakmo Signed-off-by: Daniel Borkmann kernel/bpf/verifier.c | 121 ++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 107 insertions(+), 14 deletions(-) commit dd2cb348613b44f9d948b068775e159aad298599 Author: Michael Kelley Date: Mon Jul 1 04:26:06 2019 +0000 clocksource/drivers: Continue making Hyper-V clocksource ISA agnostic Continue consolidating Hyper-V clock and timer code into an ISA independent Hyper-V clocksource driver. Move the existing clocksource code under drivers/hv and arch/x86 to the new clocksource driver while separating out the ISA dependencies. Update Hyper-V initialization to call initialization and cleanup routines since the Hyper-V synthetic clock is not independently enumerated in ACPI. Update Hyper-V clocksource users in KVM and VDSO to get definitions from the new include file. No behavior is changed and no new functionality is added. Suggested-by: Marc Zyngier Signed-off-by: Michael Kelley Signed-off-by: Thomas Gleixner Reviewed-by: Vitaly Kuznetsov Cc: "bp@alien8.de" Cc: "will.deacon@arm.com" Cc: "catalin.marinas@arm.com" Cc: "mark.rutland@arm.com" Cc: "linux-arm-kernel@lists.infradead.org" Cc: "gregkh@linuxfoundation.org" Cc: "linux-hyperv@vger.kernel.org" Cc: "olaf@aepfle.de" Cc: "apw@canonical.com" Cc: "jasowang@redhat.com" Cc: "marcelo.cerri@canonical.com" Cc: Sunil Muthuswamy Cc: KY Srinivasan Cc: "sashal@kernel.org" Cc: "vincenzo.frascino@arm.com" Cc: "linux-arch@vger.kernel.org" Cc: "linux-mips@vger.kernel.org" Cc: "linux-kselftest@vger.kernel.org" Cc: "arnd@arndb.de" Cc: "linux@armlinux.org.uk" Cc: "ralf@linux-mips.org" Cc: "paul.burton@mips.com" Cc: "daniel.lezcano@linaro.org" Cc: "salyzyn@android.com" Cc: "pcc@google.com" Cc: "shuah@kernel.org" Cc: "0x7f454c46@gmail.com" <0x7f454c46@gmail.com> Cc: "linux@rasmusvillemoes.dk" Cc: "huw@codeweavers.com" Cc: "sfr@canb.auug.org.au" Cc: "pbonzini@redhat.com" Cc: "rkrcmar@redhat.com" Cc: "kvm@vger.kernel.org" Link: https://lkml.kernel.org/r/1561955054-1838-3-git-send-email-mikelley@microsoft.com arch/x86/entry/vdso/vma.c | 2 +- arch/x86/hyperv/hv_init.c | 91 +------------------- arch/x86/include/asm/mshyperv.h | 81 +++--------------- arch/x86/include/asm/vdso/gettimeofday.h | 2 +- arch/x86/kvm/x86.c | 1 + drivers/clocksource/hyperv_timer.c | 139 +++++++++++++++++++++++++++++++ drivers/hv/hv_util.c | 1 + include/clocksource/hyperv_timer.h | 80 ++++++++++++++++++ 8 files changed, 237 insertions(+), 160 deletions(-) commit fd1fea6834d0f9f93062ae6685862908a9baed39 Author: Michael Kelley Date: Mon Jul 1 04:25:56 2019 +0000 clocksource/drivers: Make Hyper-V clocksource ISA agnostic Hyper-V clock/timer code and data structures are currently mixed in with other code in the ISA independent drivers/hv directory as well as the ISA dependent Hyper-V code under arch/x86. Consolidate this code and data structures into a Hyper-V clocksource driver to better follow the Linux model. In doing so, separate out the ISA dependent portions so the new clocksource driver works for x86 and for the in-process Hyper-V on ARM64 code. To start, move the existing clockevents code to create the new clocksource driver. Update the VMbus driver to call initialization and cleanup routines since the Hyper-V synthetic timers are not independently enumerated in ACPI. No behavior is changed and no new functionality is added. Suggested-by: Marc Zyngier Signed-off-by: Michael Kelley Signed-off-by: Thomas Gleixner Reviewed-by: Vitaly Kuznetsov Cc: "bp@alien8.de" Cc: "will.deacon@arm.com" Cc: "catalin.marinas@arm.com" Cc: "mark.rutland@arm.com" Cc: "linux-arm-kernel@lists.infradead.org" Cc: "gregkh@linuxfoundation.org" Cc: "linux-hyperv@vger.kernel.org" Cc: "olaf@aepfle.de" Cc: "apw@canonical.com" Cc: "jasowang@redhat.com" Cc: "marcelo.cerri@canonical.com" Cc: Sunil Muthuswamy Cc: KY Srinivasan Cc: "sashal@kernel.org" Cc: "vincenzo.frascino@arm.com" Cc: "linux-arch@vger.kernel.org" Cc: "linux-mips@vger.kernel.org" Cc: "linux-kselftest@vger.kernel.org" Cc: "arnd@arndb.de" Cc: "linux@armlinux.org.uk" Cc: "ralf@linux-mips.org" Cc: "paul.burton@mips.com" Cc: "daniel.lezcano@linaro.org" Cc: "salyzyn@android.com" Cc: "pcc@google.com" Cc: "shuah@kernel.org" Cc: "0x7f454c46@gmail.com" <0x7f454c46@gmail.com> Cc: "linux@rasmusvillemoes.dk" Cc: "huw@codeweavers.com" Cc: "sfr@canb.auug.org.au" Cc: "pbonzini@redhat.com" Cc: "rkrcmar@redhat.com" Cc: "kvm@vger.kernel.org" Link: https://lkml.kernel.org/r/1561955054-1838-2-git-send-email-mikelley@microsoft.com MAINTAINERS | 2 + arch/x86/include/asm/hyperv-tlfs.h | 6 ++ arch/x86/kernel/cpu/mshyperv.c | 4 +- drivers/clocksource/Makefile | 1 + drivers/clocksource/hyperv_timer.c | 200 +++++++++++++++++++++++++++++++++++++ drivers/hv/Kconfig | 3 + drivers/hv/hv.c | 156 +---------------------------- drivers/hv/hyperv_vmbus.h | 3 - drivers/hv/vmbus_drv.c | 42 ++++---- include/clocksource/hyperv_timer.h | 27 +++++ 10 files changed, 268 insertions(+), 176 deletions(-) commit 56c5ee1a5823e9cf5288b84ae6364cb4112f8225 Author: Nicolas Dichtel Date: Tue Jul 2 17:51:39 2019 +0200 xfrm interface: fix memory leak on creation The following commands produce a backtrace and return an error but the xfrm interface is created (in the wrong netns): $ ip netns add foo $ ip netns add bar $ ip -n foo netns set bar 0 $ ip -n foo link add xfrmi0 link-netnsid 0 type xfrm dev lo if_id 23 RTNETLINK answers: Invalid argument $ ip -n bar link ls xfrmi0 2: xfrmi0@lo: mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/none 00:00:00:00:00:00 brd 00:00:00:00:00:00 Here is the backtrace: [ 79.879174] WARNING: CPU: 0 PID: 1178 at net/core/dev.c:8172 rollback_registered_many+0x86/0x3c1 [ 79.880260] Modules linked in: xfrm_interface nfsv3 nfs_acl auth_rpcgss nfsv4 nfs lockd grace sunrpc fscache button parport_pc parport serio_raw evdev pcspkr loop ext4 crc16 mbcache jbd2 crc32c_generic ide_cd_mod ide_gd_mod cdrom ata_$ eneric ata_piix libata scsi_mod 8139too piix psmouse i2c_piix4 ide_core 8139cp mii i2c_core floppy [ 79.883698] CPU: 0 PID: 1178 Comm: ip Not tainted 5.2.0-rc6+ #106 [ 79.884462] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014 [ 79.885447] RIP: 0010:rollback_registered_many+0x86/0x3c1 [ 79.886120] Code: 01 e8 d7 7d c6 ff 0f 0b 48 8b 45 00 4c 8b 20 48 8d 58 90 49 83 ec 70 48 8d 7b 70 48 39 ef 74 44 8a 83 d0 04 00 00 84 c0 75 1f <0f> 0b e8 61 cd ff ff 48 b8 00 01 00 00 00 00 ad de 48 89 43 70 66 [ 79.888667] RSP: 0018:ffffc900015ab740 EFLAGS: 00010246 [ 79.889339] RAX: ffff8882353e5700 RBX: ffff8882353e56a0 RCX: ffff8882353e5710 [ 79.890174] RDX: ffffc900015ab7e0 RSI: ffffc900015ab7e0 RDI: ffff8882353e5710 [ 79.891029] RBP: ffffc900015ab7e0 R08: ffffc900015ab7e0 R09: ffffc900015ab7e0 [ 79.891866] R10: ffffc900015ab7a0 R11: ffffffff82233fec R12: ffffc900015ab770 [ 79.892728] R13: ffffffff81eb7ec0 R14: ffff88822ed6cf00 R15: 00000000ffffffea [ 79.893557] FS: 00007ff350f31740(0000) GS:ffff888237a00000(0000) knlGS:0000000000000000 [ 79.894581] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 79.895317] CR2: 00000000006c8580 CR3: 000000022c272000 CR4: 00000000000006f0 [ 79.896137] Call Trace: [ 79.896464] unregister_netdevice_many+0x12/0x6c [ 79.896998] __rtnl_newlink+0x6e2/0x73b [ 79.897446] ? __kmalloc_node_track_caller+0x15e/0x185 [ 79.898039] ? pskb_expand_head+0x5f/0x1fe [ 79.898556] ? stack_access_ok+0xd/0x2c [ 79.899009] ? deref_stack_reg+0x12/0x20 [ 79.899462] ? stack_access_ok+0xd/0x2c [ 79.899927] ? stack_access_ok+0xd/0x2c [ 79.900404] ? __module_text_address+0x9/0x4f [ 79.900910] ? is_bpf_text_address+0x5/0xc [ 79.901390] ? kernel_text_address+0x67/0x7b [ 79.901884] ? __kernel_text_address+0x1a/0x25 [ 79.902397] ? unwind_get_return_address+0x12/0x23 [ 79.903122] ? __cmpxchg_double_slab.isra.37+0x46/0x77 [ 79.903772] rtnl_newlink+0x43/0x56 [ 79.904217] rtnetlink_rcv_msg+0x200/0x24c In fact, each time a xfrm interface was created, a netdev was allocated by __rtnl_newlink()/rtnl_create_link() and then another one by xfrmi_newlink()/xfrmi_create(). Only the second one was registered, it's why the previous commands produce a backtrace: dev_change_net_namespace() was called on a netdev with reg_state set to NETREG_UNINITIALIZED (the first one). CC: Lorenzo Colitti CC: Benedict Wong CC: Steffen Klassert CC: Shannon Nelson CC: Antony Antony CC: Eyal Birger Fixes: f203b76d7809 ("xfrm: Add virtual xfrm interfaces") Reported-by: Julien Floret Signed-off-by: Nicolas Dichtel Signed-off-by: Steffen Klassert net/xfrm/xfrm_interface.c | 98 ++++++++++++++--------------------------------- 1 file changed, 28 insertions(+), 70 deletions(-) commit fd709721352dd5239056eacaded00f2244e6ef58 Author: Florian Westphal Date: Tue Jul 2 12:46:00 2019 +0200 xfrm: policy: fix bydst hlist corruption on hash rebuild syzbot reported following spat: BUG: KASAN: use-after-free in __write_once_size include/linux/compiler.h:221 BUG: KASAN: use-after-free in hlist_del_rcu include/linux/rculist.h:455 BUG: KASAN: use-after-free in xfrm_hash_rebuild+0xa0d/0x1000 net/xfrm/xfrm_policy.c:1318 Write of size 8 at addr ffff888095e79c00 by task kworker/1:3/8066 Workqueue: events xfrm_hash_rebuild Call Trace: __write_once_size include/linux/compiler.h:221 [inline] hlist_del_rcu include/linux/rculist.h:455 [inline] xfrm_hash_rebuild+0xa0d/0x1000 net/xfrm/xfrm_policy.c:1318 process_one_work+0x814/0x1130 kernel/workqueue.c:2269 Allocated by task 8064: __kmalloc+0x23c/0x310 mm/slab.c:3669 kzalloc include/linux/slab.h:742 [inline] xfrm_hash_alloc+0x38/0xe0 net/xfrm/xfrm_hash.c:21 xfrm_policy_init net/xfrm/xfrm_policy.c:4036 [inline] xfrm_net_init+0x269/0xd60 net/xfrm/xfrm_policy.c:4120 ops_init+0x336/0x420 net/core/net_namespace.c:130 setup_net+0x212/0x690 net/core/net_namespace.c:316 The faulting address is the address of the old chain head, free'd by xfrm_hash_resize(). In xfrm_hash_rehash(), chain heads get re-initialized without any hlist_del_rcu: for (i = hmask; i >= 0; i--) INIT_HLIST_HEAD(odst + i); Then, hlist_del_rcu() gets called on the about to-be-reinserted policy when iterating the per-net list of policies. hlist_del_rcu() will then make chain->first be nonzero again: static inline void __hlist_del(struct hlist_node *n) { struct hlist_node *next = n->next; // address of next element in list struct hlist_node **pprev = n->pprev;// location of previous elem, this // can point at chain->first WRITE_ONCE(*pprev, next); // chain->first points to next elem if (next) next->pprev = pprev; Then, when we walk chainlist to find insertion point, we may find a non-empty list even though we're supposedly reinserting the first policy to an empty chain. To fix this first unlink all exact and inexact policies instead of zeroing the list heads. Add the commands equivalent to the syzbot reproducer to xfrm_policy.sh, without fix KASAN catches the corruption as it happens, SLUB poisoning detects it a bit later. Reported-by: syzbot+0165480d4ef07360eeda@syzkaller.appspotmail.com Fixes: 1548bc4e0512 ("xfrm: policy: delete inexact policies from inexact list on hash rebuild") Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert net/xfrm/xfrm_policy.c | 12 +++++++----- tools/testing/selftests/net/xfrm_policy.sh | 27 ++++++++++++++++++++++++++- 2 files changed, 33 insertions(+), 6 deletions(-) commit 341924049558e5f7c1a148a2c461a417933d35d9 Merge: 516337048fa4 4a8f81b8c053 Author: Thomas Gleixner Date: Wed Jul 3 10:50:21 2019 +0200 Merge branch 'timers/vdso' into timers/core so the hyper-v clocksource update can be applied. commit 1bbe61d892fb63ba8d793d4418606a092a7b71cf Author: Andrew Jeffery Date: Fri Jun 28 12:08:38 2019 +0930 pinctrl: aspeed: Add implementation-related documentation The ASPEED pinctrl driver implementations make heavy use of macros to minimise tedium of implementation and maximise the chance that the compiler will catch errors in defining signal and pin configurations. While the goal of minimising errors is achieved, it is at the cost of the complexity of the macros. Document examples of the expanded form of pin declarations to demonstrate the operation of the macros. Cc: Johnny Huang Signed-off-by: Andrew Jeffery Link: https://lore.kernel.org/r/20190628023838.15426-9-andrew@aj.id.au Signed-off-by: Linus Walleij drivers/pinctrl/aspeed/pinmux-aspeed.h | 204 ++++++++++++++++++++++++++++++++- 1 file changed, 200 insertions(+), 4 deletions(-) commit efa5623981b72f6b5f95933d1c36ed2518c2ee4e Author: Andrew Jeffery Date: Fri Jun 28 12:08:37 2019 +0930 pinctrl: aspeed: Split out pinmux from general pinctrl ASPEED have completely rearranged the System Control Unit register layout with the AST2600. The existing code took advantage of the fact that the AST2400 and AST2500 had layouts that were similar enough to have little impact on the pinmux infrastructure (though there is a wart with read-modify-write vs write-1-clear semantics of the hardware strapping registers between the two). Given that any similarity has been thrown out with the AST2600, separate out the function applying an expression state to be driver-specific. With it, extract out the pinmux macro jungle to its own header and implementation so the pieces can be composed without dependency cycles. Cc: Johnny Huang Signed-off-by: Andrew Jeffery Link: https://lore.kernel.org/r/20190628023838.15426-8-andrew@aj.id.au Signed-off-by: Linus Walleij drivers/pinctrl/aspeed/Makefile | 2 +- drivers/pinctrl/aspeed/pinctrl-aspeed-g4.c | 94 ++++- drivers/pinctrl/aspeed/pinctrl-aspeed-g5.c | 123 ++++++- drivers/pinctrl/aspeed/pinctrl-aspeed.c | 246 ++----------- drivers/pinctrl/aspeed/pinctrl-aspeed.h | 43 +-- drivers/pinctrl/aspeed/pinmux-aspeed.c | 96 +++++ drivers/pinctrl/aspeed/pinmux-aspeed.h | 539 +++++++++++++++++++++++++++++ 7 files changed, 888 insertions(+), 255 deletions(-) commit d0d88b5c9ed7cdc8f7d49b153d4ddc1bf1d8eb99 Author: Andrew Jeffery Date: Fri Jun 28 12:08:36 2019 +0930 pinctrl: aspeed: Clarify comment about strapping W1C Writes of 1 to SCU7C clear set bits in SCU70, the hardware strapping register. The information was correct if you squinted while reading, but hopefully switching the order of the registers as listed conveys it better. Cc: Johnny Huang Signed-off-by: Andrew Jeffery Acked-by: Joel Stanley Link: https://lore.kernel.org/r/20190628023838.15426-7-andrew@aj.id.au Signed-off-by: Linus Walleij drivers/pinctrl/aspeed/pinctrl-aspeed.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0290eba96be4325ad567b7e4e682ce3c937c9b7c Author: Andrew Jeffery Date: Fri Jun 28 12:08:35 2019 +0930 pinctrl: aspeed: Correct comment that is no longer true We have handled the GFX register case for quite some time now. Cc: Johnny Huang Signed-off-by: Andrew Jeffery Acked-by: Joel Stanley Link: https://lore.kernel.org/r/20190628023838.15426-6-andrew@aj.id.au Signed-off-by: Linus Walleij drivers/pinctrl/aspeed/pinctrl-aspeed.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 053d8b24678fc35743ec02fc6e986d4ee55117bb Author: Andrew Jeffery Date: Fri Jun 28 12:08:34 2019 +0930 MAINTAINERS: Add entry for ASPEED pinctrl drivers Add myself as maintainer to avoid burdening others with the madness. Cc: Johnny Huang Signed-off-by: Andrew Jeffery Link: https://lore.kernel.org/r/20190628023838.15426-5-andrew@aj.id.au Signed-off-by: Linus Walleij MAINTAINERS | 9 +++++++++ 1 file changed, 9 insertions(+) commit 0a617de167306231bdbf894aa2b93f4b2cd2a781 Author: Andrew Jeffery Date: Fri Jun 28 12:08:33 2019 +0930 dt-bindings: pinctrl: aspeed: Convert AST2500 bindings to json-schema Convert ASPEED pinctrl bindings to DT schema format using json-schema. Cc: Johnny Huang Signed-off-by: Andrew Jeffery Link: https://lore.kernel.org/r/20190628023838.15426-4-andrew@aj.id.au Signed-off-by: Linus Walleij .../bindings/pinctrl/aspeed,ast2500-pinctrl.txt | 119 ------------------ .../bindings/pinctrl/aspeed,ast2500-pinctrl.yaml | 134 +++++++++++++++++++++ 2 files changed, 134 insertions(+), 119 deletions(-) commit 3dae67ce600caaa92c9af6e0cb6cad2db2632a0a Author: Sameer Pujar Date: Thu Jun 20 21:27:48 2019 +0530 irqchip/gic-pm: Remove PM_CLK dependency gic-pm driver does not use pm-clk interface now and hence the dependency is removed from Kconfig. Signed-off-by: Sameer Pujar Acked-by: Jon Hunter Signed-off-by: Marc Zyngier drivers/irqchip/Kconfig | 1 - 1 file changed, 1 deletion(-) commit 07457937bb5cef8ce797b29d2b0da1bb25509f54 Author: Andrew Jeffery Date: Fri Jun 28 12:08:32 2019 +0930 dt-bindings: pinctrl: aspeed: Convert AST2400 bindings to json-schema Convert ASPEED pinctrl bindings to DT schema format using json-schema Cc: Johnny Huang Signed-off-by: Andrew Jeffery Link: https://lore.kernel.org/r/20190628023838.15426-3-andrew@aj.id.au Reviewed-by: Rob Herring Signed-off-by: Linus Walleij .../bindings/pinctrl/aspeed,ast2400-pinctrl.txt | 80 --------------------- .../bindings/pinctrl/aspeed,ast2400-pinctrl.yaml | 81 ++++++++++++++++++++++ 2 files changed, 81 insertions(+), 80 deletions(-) commit 34ae69998b665073bf27085e60b52329cf169e0d Author: Andrew Jeffery Date: Fri Jun 28 12:08:31 2019 +0930 dt-bindings: pinctrl: aspeed: Split bindings document in two Have one for each of the AST2400 and AST2500. The only thing that was common was the fact that both support ASPEED BMC SoCs. Cc: Johnny Huang Signed-off-by: Andrew Jeffery Acked-by: Joel Stanley Link: https://lore.kernel.org/r/20190628023838.15426-2-andrew@aj.id.au Signed-off-by: Linus Walleij .../bindings/pinctrl/aspeed,ast2400-pinctrl.txt | 80 ++++++++++++++++++++++ ...nctrl-aspeed.txt => aspeed,ast2500-pinctrl.txt} | 63 ++--------------- 2 files changed, 85 insertions(+), 58 deletions(-) commit 4b7618fdc7e6ac2832842df0cb512ebb067db977 Author: Srinivas Ramana Date: Tue Jun 25 19:44:46 2019 +0530 pinctrl: qcom: Add irq_enable callback for msm gpio Introduce the irq_enable callback which will be same as irq_unmask except that it will also clear the status bit before unmask. This will help in clearing any erroneous interrupts that would have got latched when the interrupt is not in use. There may be devices like UART which can use the same gpio line for data rx as well as a wakeup gpio when in suspend. The data that was flowing on the line may latch the interrupt and when we enable the interrupt before going to suspend, this would trigger the unexpected interrupt. This change helps clearing the interrupt so that these unexpected interrupts gets cleared. Signed-off-by: Srinivas Ramana Signed-off-by: Neeraj Upadhyay Link: https://lore.kernel.org/r/1561472086-23360-1-git-send-email-neeraju@codeaurora.org Signed-off-by: Linus Walleij drivers/pinctrl/qcom/pinctrl-msm.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) commit 2617790f0f94422d9773a3f34c694bc3be09ce8b Author: Linus Walleij Date: Tue Jun 25 13:35:32 2019 +0200 gpio: altera: Pass irqchip when adding gpiochip We need to convert all old gpio irqchips to pass the irqchip setup along when adding the gpio_chip. For chained irqchips this is a pretty straight-forward conversion. Cc: Ley Foon Tan Cc: Tien Hock Loh Signed-off-by: Linus Walleij drivers/gpio/gpio-altera.c | 48 ++++++++++++++++++++-------------------------- 1 file changed, 21 insertions(+), 27 deletions(-) commit 8b29450437d7e3a507d8421621b02fcaa2368637 Author: Linus Walleij Date: Wed Jun 26 10:23:28 2019 +0200 gpio: siox: Use devm_ managed gpiochip By using devm_gpiochip_add_data() we can get rid of the remove() callback. As this driver doesn't use the gpiochip data pointer we simply pass in NULL. Acked-by: Uwe Kleine-König Signed-off-by: Linus Walleij drivers/gpio/gpio-siox.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit acc141374df40abd24ed5e128c8a3eb43805a688 Author: Linus Walleij Date: Wed Jun 26 10:21:27 2019 +0200 gpio: siox: Add struct device *dev helper variable This makes the code easier to read. Acked-by: Uwe Kleine-König Signed-off-by: Linus Walleij drivers/gpio/gpio-siox.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit b25e10f8f9bcec3396d2f4348844cc28f06d772f Author: Linus Walleij Date: Tue Jun 25 12:36:12 2019 +0200 gpio: siox: Pass irqchip when adding gpiochip We need to convert all old gpio irqchips to pass the irqchip setup along when adding the gpio_chip. For chained irqchips this is a pretty straight-forward conversion. Cc: Uwe Kleine-König Cc: Thierry Reding Signed-off-by: Linus Walleij drivers/gpio/gpio-siox.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 1eb77c3bcdb70f2501f419b3da45b19acaf01072 Author: Talel Shenhar Date: Mon Jun 10 11:34:43 2019 +0300 irqchip/al-fic: Introduce Amazon's Annapurna Labs Fabric Interrupt Controller Driver The Amazon's Annapurna Labs Fabric Interrupt Controller has 32 inputs. A FIC (Fabric Interrupt Controller) may be cascaded into another FIC or directly to the main CPU Interrupt Controller (e.g. GIC). Signed-off-by: Talel Shenhar Signed-off-by: Marc Zyngier MAINTAINERS | 6 + drivers/irqchip/Kconfig | 8 ++ drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-al-fic.c | 278 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 293 insertions(+) commit 74b5150cde45ab29ee332a3d1e770c00431f7993 Author: Talel Shenhar Date: Mon Jun 10 11:34:42 2019 +0300 dt-bindings: interrupt-controller: Add Amazon's Annapurna Labs FIC Document Amazon's Annapurna Labs Fabric Interrupt Controller SoC binding. Signed-off-by: Talel Shenhar Signed-off-by: Marc Zyngier .../interrupt-controller/amazon,al-fic.txt | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit f8a8fe61fec8006575699559ead88b0b833d5cad Author: Thomas Gleixner Date: Fri Jun 28 13:11:54 2019 +0200 x86/irq: Seperate unused system vectors from spurious entry again Quite some time ago the interrupt entry stubs for unused vectors in the system vector range got removed and directly mapped to the spurious interrupt vector entry point. Sounds reasonable, but it's subtly broken. The spurious interrupt vector entry point pushes vector number 0xFF on the stack which makes the whole logic in __smp_spurious_interrupt() pointless. As a consequence any spurious interrupt which comes from a vector != 0xFF is treated as a real spurious interrupt (vector 0xFF) and not acknowledged. That subsequently stalls all interrupt vectors of equal and lower priority, which brings the system to a grinding halt. This can happen because even on 64-bit the system vector space is not guaranteed to be fully populated. A full compile time handling of the unused vectors is not possible because quite some of them are conditonally populated at runtime. Bring the entry stubs back, which wastes 160 bytes if all stubs are unused, but gains the proper handling back. There is no point to selectively spare some of the stubs which are known at compile time as the required code in the IDT management would be way larger and convoluted. Do not route the spurious entries through common_interrupt and do_IRQ() as the original code did. Route it to smp_spurious_interrupt() which evaluates the vector number and acts accordingly now that the real vector numbers are handed in. Fixup the pr_warn so the actual spurious vector (0xff) is clearly distiguished from the other vectors and also note for the vectored case whether it was pending in the ISR or not. "Spurious APIC interrupt (vector 0xFF) on CPU#0, should never happen." "Spurious interrupt vector 0xed on CPU#1. Acked." "Spurious interrupt vector 0xee on CPU#1. Not pending!." Fixes: 2414e021ac8d ("x86: Avoid building unused IRQ entry stubs") Reported-by: Jan Kiszka Signed-off-by: Thomas Gleixner Cc: Marc Zyngier Cc: Jan Beulich Link: https://lkml.kernel.org/r/20190628111440.550568228@linutronix.de arch/x86/entry/entry_32.S | 24 ++++++++++++++++++++++++ arch/x86/entry/entry_64.S | 30 ++++++++++++++++++++++++++---- arch/x86/include/asm/hw_irq.h | 2 ++ arch/x86/kernel/apic/apic.c | 33 ++++++++++++++++++++++----------- arch/x86/kernel/idt.c | 3 ++- 5 files changed, 76 insertions(+), 16 deletions(-) commit b7107a67f0d125459fe41f86e8079afd1a5e0b15 Author: Thomas Gleixner Date: Fri Jun 28 13:11:53 2019 +0200 x86/irq: Handle spurious interrupt after shutdown gracefully Since the rework of the vector management, warnings about spurious interrupts have been reported. Robert provided some more information and did an initial analysis. The following situation leads to these warnings: CPU 0 CPU 1 IO_APIC interrupt is raised sent to CPU1 Unable to handle immediately (interrupts off, deep idle delay) mask() ... free() shutdown() synchronize_irq() clear_vector() do_IRQ() -> vector is clear Before the rework the vector entries of legacy interrupts were statically assigned and occupied precious vector space while most of them were unused. Due to that the above situation was handled silently because the vector was handled and the core handler of the assigned interrupt descriptor noticed that it is shut down and returned. While this has been usually observed with legacy interrupts, this situation is not limited to them. Any other interrupt source, e.g. MSI, can cause the same issue. After adding proper synchronization for level triggered interrupts, this can only happen for edge triggered interrupts where the IO-APIC obviously cannot provide information about interrupts in flight. While the spurious warning is actually harmless in this case it worries users and driver developers. Handle it gracefully by marking the vector entry as VECTOR_SHUTDOWN instead of VECTOR_UNUSED when the vector is freed up. If that above late handling happens the spurious detector will not complain and switch the entry to VECTOR_UNUSED. Any subsequent spurious interrupt on that line will trigger the spurious warning as before. Fixes: 464d12309e1b ("x86/vector: Switch IOAPIC to global reservation mode") Reported-by: Robert Hodaszi Signed-off-by: Thomas Gleixner - Tested-by: Robert Hodaszi Cc: Marc Zyngier Link: https://lkml.kernel.org/r/20190628111440.459647741@linutronix.de arch/x86/include/asm/hw_irq.h | 3 ++- arch/x86/kernel/apic/vector.c | 4 ++-- arch/x86/kernel/irq.c | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) commit dfe0cf8b51b07e56ded571e3de0a4a9382517231 Author: Thomas Gleixner Date: Fri Jun 28 13:11:52 2019 +0200 x86/ioapic: Implement irq_get_irqchip_state() callback When an interrupt is shut down in free_irq() there might be an inflight interrupt pending in the IO-APIC remote IRR which is not yet serviced. That means the interrupt has been sent to the target CPUs local APIC, but the target CPU is in a state which delays the servicing. So free_irq() would proceed to free resources and to clear the vector because synchronize_hardirq() does not see an interrupt handler in progress. That can trigger a spurious interrupt warning, which is harmless and just confuses users, but it also can leave the remote IRR in a stale state because once the handler is invoked the interrupt resources might be freed already and therefore acknowledgement is not possible anymore. Implement the irq_get_irqchip_state() callback for the IO-APIC irq chip. The callback is invoked from free_irq() via __synchronize_hardirq(). Check the remote IRR bit of the interrupt and return 'in flight' if it is set and the interrupt is configured in level mode. For edge mode the remote IRR has no meaning. As this is only meaningful for level triggered interrupts this won't cure the potential spurious interrupt warning for edge triggered interrupts, but the edge trigger case does not result in stale hardware state. This has to be addressed at the vector/interrupt entry level seperately. Fixes: 464d12309e1b ("x86/vector: Switch IOAPIC to global reservation mode") Reported-by: Robert Hodaszi Signed-off-by: Thomas Gleixner Cc: Marc Zyngier Link: https://lkml.kernel.org/r/20190628111440.370295517@linutronix.de arch/x86/kernel/apic/io_apic.c | 46 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) commit 62e0468650c30f0298822c580f382b16328119f6 Author: Thomas Gleixner Date: Fri Jun 28 13:11:51 2019 +0200 genirq: Add optional hardware synchronization for shutdown free_irq() ensures that no hardware interrupt handler is executing on a different CPU before actually releasing resources and deactivating the interrupt completely in a domain hierarchy. But that does not catch the case where the interrupt is on flight at the hardware level but not yet serviced by the target CPU. That creates an interesing race condition: CPU 0 CPU 1 IRQ CHIP interrupt is raised sent to CPU1 Unable to handle immediately (interrupts off, deep idle delay) mask() ... free() shutdown() synchronize_irq() release_resources() do_IRQ() -> resources are not available That might be harmless and just trigger a spurious interrupt warning, but some interrupt chips might get into a wedged state. Utilize the existing irq_get_irqchip_state() callback for the synchronization in free_irq(). synchronize_hardirq() is not using this mechanism as it might actually deadlock unter certain conditions, e.g. when called with interrupts disabled and the target CPU is the one on which the synchronization is invoked. synchronize_irq() uses it because that function cannot be called from non preemtible contexts as it might sleep. No functional change intended and according to Marc the existing GIC implementations where the driver supports the callback should be able to cope with that core change. Famous last words. Fixes: 464d12309e1b ("x86/vector: Switch IOAPIC to global reservation mode") Reported-by: Robert Hodaszi Signed-off-by: Thomas Gleixner Reviewed-by: Marc Zyngier Tested-by: Marc Zyngier Link: https://lkml.kernel.org/r/20190628111440.279463375@linutronix.de kernel/irq/internals.h | 4 +++ kernel/irq/manage.c | 75 +++++++++++++++++++++++++++++++++++++------------- 2 files changed, 60 insertions(+), 19 deletions(-) commit 1d21f2af8571c6a6a44e7c1911780614847b0253 Author: Thomas Gleixner Date: Fri Jun 28 13:11:50 2019 +0200 genirq: Fix misleading synchronize_irq() documentation The function might sleep, so it cannot be called from interrupt context. Not even with care. Signed-off-by: Thomas Gleixner Cc: Marc Zyngier Link: https://lkml.kernel.org/r/20190628111440.189241552@linutronix.de kernel/irq/manage.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4001d8e8762f57d418b66e4e668601791900a1dd Author: Thomas Gleixner Date: Fri Jun 28 13:11:49 2019 +0200 genirq: Delay deactivation in free_irq() When interrupts are shutdown, they are immediately deactivated in the irqdomain hierarchy. While this looks obviously correct there is a subtle issue: There might be an interrupt in flight when free_irq() is invoking the shutdown. This is properly handled at the irq descriptor / primary handler level, but the deactivation might completely disable resources which are required to acknowledge the interrupt. Split the shutdown code and deactivate the interrupt after synchronization in free_irq(). Fixup all other usage sites where this is not an issue to invoke the combined shutdown_and_deactivate() function instead. This still might be an issue if the interrupt in flight servicing is delayed on a remote CPU beyond the invocation of synchronize_irq(), but that cannot be handled at that level and needs to be handled in the synchronize_irq() context. Fixes: f8264e34965a ("irqdomain: Introduce new interfaces to support hierarchy irqdomains") Reported-by: Robert Hodaszi Signed-off-by: Thomas Gleixner Reviewed-by: Marc Zyngier Link: https://lkml.kernel.org/r/20190628111440.098196390@linutronix.de kernel/irq/autoprobe.c | 6 +++--- kernel/irq/chip.c | 6 ++++++ kernel/irq/cpuhotplug.c | 2 +- kernel/irq/internals.h | 1 + kernel/irq/manage.c | 12 +++++++++++- 5 files changed, 22 insertions(+), 5 deletions(-) commit 87b70378f424df65465d5bfba2b8f233ee8b36e7 Author: Enrico Weigelt Date: Mon Jun 17 18:00:10 2019 +0200 drivers: gpio: amd-fch: make resource struct const The struct resource field is statically initialized and may never change. Therefore make it const. Signed-off-by: Enrico Weigelt Link: https://lore.kernel.org/r/1560787211-15443-1-git-send-email-info@metux.net Signed-off-by: Linus Walleij drivers/gpio/gpio-amd-fch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9dea44c91469512d346e638694c22c30a5273992 Author: Arnd Bergmann Date: Fri Jun 28 16:59:45 2019 +0200 devres: allow const resource arguments devm_ioremap_resource() does not currently take 'const' arguments, which results in a warning from the first driver trying to do it anyway: drivers/gpio/gpio-amd-fch.c: In function 'amd_fch_gpio_probe': drivers/gpio/gpio-amd-fch.c:171:49: error: passing argument 2 of 'devm_ioremap_resource' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers] priv->base = devm_ioremap_resource(&pdev->dev, &amd_fch_gpio_iores); ^~~~~~~~~~~~~~~~~~~ Change the prototype to allow it, as there is no real reason not to. Fixes: 9bb2e0452508 ("gpio: amd: Make resource struct const") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20190628150049.1108048-1-arnd@arndb.de Acked-by: Greg Kroah-Hartman Reviwed-By: Enrico Weigelt Signed-off-by: Linus Walleij include/linux/device.h | 3 ++- lib/devres.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit b2357839c56ab7d06bcd4e866ebc2d0e2b7997f3 Author: Yoshihiro Shimoda Date: Wed Jun 26 22:06:33 2019 +0900 usb: renesas_usbhs: add a workaround for a race condition of workqueue The old commit 6e4b74e4690d ("usb: renesas: fix scheduling in atomic context bug") fixed an atomic issue by using workqueue for the shdmac dmaengine driver. However, this has a potential race condition issue between the work pending and usbhsg_ep_free_request() in gadget mode. When usbhsg_ep_free_request() is called while pending the queue, since the work_struct will be freed and then the work handler is called, kernel panic happens on process_one_work(). To fix the issue, if we could call cancel_work_sync() at somewhere before the free request, it could be easy. However, the usbhsg_ep_free_request() is called on atomic (e.g. f_ncm driver calls free request via gether_disconnect()). For now, almost all users are having "USB-DMAC" and the DMAengine driver can be used on atomic. So, this patch adds a workaround for a race condition to call the DMAengine APIs without the workqueue. This means we still have TODO on shdmac environment (SH7724), but since it doesn't have SMP, the race condition might not happen. Fixes: ab330cf3888d ("usb: renesas_usbhs: add support for USB-DMAC") Cc: # v4.1+ Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi drivers/usb/renesas_usbhs/fifo.c | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) commit 4aef7966060439bb4f9d440feacd5ce7697bce37 Author: Colin Ian King Date: Wed Jun 26 17:35:17 2019 +0100 usb: gadget: udc: renesas_usb3: remove redundant assignment to ret Variable ret is being initialized with a value that is never read and ret is being re-assigned immediately after the initialization in both paths of an if statement. This is redundant and can be removed. Addresses-Coverity: ("Unused value") Reviewed-by: Yoshihiro Shimoda Signed-off-by: Colin Ian King Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/renesas_usb3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dfc4fdebc5d62ac4e2fe5428e59b273675515fb2 Author: Martin Blumenstingl Date: Thu Jun 20 19:50:22 2019 +0200 usb: dwc2: use a longer AHB idle timeout in dwc2_core_reset() Use a 10000us AHB idle timeout in dwc2_core_reset() and make it consistent with the other "wait for AHB master IDLE state" ocurrences. This fixes a problem for me where dwc2 would not want to initialize when updating to 4.19 on a MIPS Lantiq VRX200 SoC. dwc2 worked fine with 4.14. Testing on my board shows that it takes 180us until AHB master IDLE state is signalled. The very old vendor driver for this SoC (ifxhcd) used a 1 second timeout. Use the same timeout that is used everywhere when polling for GRSTCTL_AHBIDLE instead of using a timeout that "works for one board" (180us in my case) to have consistent behavior across the dwc2 driver. Cc: linux-stable # 4.19+ Acked-by: Minas Harutyunyan Signed-off-by: Martin Blumenstingl Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d2d06c18d78ed4aa969ceac33bcfdcc524668424 Author: Hariprasad Kelam Date: Tue Jul 2 00:02:41 2019 +0530 USB: gadget: function: fix issue Unneeded variable: "value" fix below issue reported by coccicheck drivers/usb/gadget/function/f_eem.c:169:7-12: Unneeded variable: "value". Return "- EOPNOTSUPP" on line 179 We can not change return type of eem_setup as its registered with callback function Signed-off-by: Hariprasad Kelam Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_eem.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7144afd025b23b042c158582160d7d2b10a754b7 Author: Robin Gong Date: Tue Jun 25 17:43:23 2019 +0800 dmaengine: fsl-edma: add i.mx7ulp edma2 version support Add edma2 for i.mx7ulp by version v3, since v2 has already been used by mcf-edma. The big changes based on v1 are belows: 1. only one dmamux. 2. another clock dma_clk except dmamux clk. 3. 16 independent interrupts instead of only one interrupt for all channels. Signed-off-by: Robin Gong Tested-by: Angelo Dureghello Signed-off-by: Vinod Koul drivers/dma/fsl-edma-common.c | 18 +++++++++++- drivers/dma/fsl-edma-common.h | 4 +++ drivers/dma/fsl-edma.c | 66 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 87 insertions(+), 1 deletion(-) commit a7c5c6f6bc295d6c158db4ef9d1ca6770032669d Author: Robin Gong Date: Tue Jun 25 17:43:22 2019 +0800 dt-bindings: dma: fsl-edma: add new i.mx7ulp-edma More channel interrupts, one more clock, and only one dmamux on i.mx7ulp-edma. Signed-off-by: Robin Gong Tested-by: Angelo Dureghello Signed-off-by: Vinod Koul Documentation/devicetree/bindings/dma/fsl-edma.txt | 44 +++++++++++++++++++--- 1 file changed, 39 insertions(+), 5 deletions(-) commit b12650cc5145fa9ccb44a0baea58aa848be92c61 Author: Robin Gong Date: Tue Jun 25 17:43:21 2019 +0800 dmaengine: fsl-edma-common: version check for v2 instead The next v3 i.mx7ulp edma is based on v1, so change version check logic for v2 instead. Signed-off-by: Robin Gong Tested-by: Angelo Dureghello Signed-off-by: Vinod Koul drivers/dma/fsl-edma-common.c | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) commit 78690bf3c4a4dea4c17f86c7ad385b5e9f5cf58b Author: Robin Gong Date: Tue Jun 25 17:43:20 2019 +0800 dmaengine: fsl-edma-common: move dmamux register to another single function Prepare for edmav2 on i.mx7ulp whose dmamux register is 32bit. No function impacted. Signed-off-by: Robin Gong Tested-by: Angelo Dureghello Signed-off-by: Vinod Koul drivers/dma/fsl-edma-common.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit af802728e4ab0764b2a26960a30f4cbe358a3b95 Author: Robin Gong Date: Tue Jun 25 17:43:19 2019 +0800 dmaengine: fsl-edma: add drvdata for fsl-edma There are some differences between vf610 and next i.mx7ulp. Put such differences into static driver data for distinguishing easily at driver level. Change mcf-edma accordingly. Signed-off-by: Robin Gong Tested-by: Angelo Dureghello Signed-off-by: Vinod Koul drivers/dma/fsl-edma-common.c | 29 +++++++++++++++-------------- drivers/dma/fsl-edma-common.h | 10 +++++++++- drivers/dma/fsl-edma.c | 43 ++++++++++++++++++++++++++++++------------- drivers/dma/mcf-edma.c | 11 ++++++++--- 4 files changed, 62 insertions(+), 31 deletions(-) commit 99e8232b5f3ae18208930775dc8c5821c6f9384a Author: Peter Chen Date: Mon Jun 24 10:02:52 2019 +0800 usb: phy: phy-mxs-usb: add imx7ulp support At imx7ulp, the USB related analog register is located in PHY register region too, so we need to control PLL at PHY driver directly. Signed-off-by: Peter Chen Signed-off-by: Felipe Balbi drivers/usb/phy/phy-mxs-usb.c | 67 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 66 insertions(+), 1 deletion(-) commit 8cf8bde284b7a25229cbf119cbf8be8149132a5c Author: Peter Chen Date: Mon Jun 24 10:02:51 2019 +0800 doc: dt-binding: mxs-usb-phy: add compatible for 7ulp Add compatible for 7ulp USB PHY. Reviewed-by: Rob Herring Signed-off-by: Peter Chen Signed-off-by: Felipe Balbi Documentation/devicetree/bindings/phy/mxs-usb-phy.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fc4a9030788548414ccdd9d04aa457d4e027ecaa Author: Fabio Estevam Date: Tue Jul 2 13:48:52 2019 -0300 dmaengine: Revert "dmaengine: fsl-edma: support little endian for edma driver" This reverts commit 002905eca5bedab08bafd9e325bbbb41670c7712. Commit 002905eca5be ("dmaengine: fsl-edma: support little endian for edma driver") incorrectly assumed that there was not little endian support in the driver. This causes hangs on Vybrid, so revert it so that Vybrid systems could boot again. Reported-by: Krzysztof Kozlowski Signed-off-by: Fabio Estevam Tested-by: Krzysztof Kozlowski Signed-off-by: Vinod Koul drivers/dma/fsl-edma-common.c | 5 ----- 1 file changed, 5 deletions(-) commit f50dfaf772db187deb562764e7aa3b988d6bc538 Author: Linus Walleij Date: Sun Jun 30 16:03:02 2019 +0200 misc: fsa9480: Delete this driver The FSA9480 has a new driver more appropriately located in the drivers/extcon subsystem. It is also more complete and includes device tree support. Delete the old misc driver. Cc: Arnd Bergmann Signed-off-by: Linus Walleij Reviewed-by: Chanwoo Choi Reviewed-by: Pawe Chmiel Link: https://lore.kernel.org/r/20190630140302.16245-1-linus.walleij@linaro.org Signed-off-by: Greg Kroah-Hartman drivers/misc/Kconfig | 9 - drivers/misc/Makefile | 1 - drivers/misc/fsa9480.c | 547 ---------------------------------- include/linux/platform_data/fsa9480.h | 24 -- 4 files changed, 581 deletions(-) commit 573aff747ee350a0541c3a24cacd92a286fb9522 Author: Pawel Laszczak Date: Tue Jul 2 14:38:02 2019 +0100 usb:cdns3 Fix for stuck packets in on-chip OUT buffer. Controller for OUT endpoints has shared on-chip buffers for all incoming packets, including ep0out. It's FIFO buffer, so packets must be handled by DMA in correct order. If the first packet in the buffer will not be handled, then the following packets directed for other endpoints and functions will be blocked. Additionally the packets directed to one endpoint can block entire on-chip buffers. In this case transfer to other endpoints also will blocked. To resolve this issue after raising the descriptor missing interrupt driver prepares internal usb_request object and use it to arm DMA transfer. The problematic situation was observed in case when endpoint has been enabled but no usb_request were queued. Driver try detects such endpoints and will use this workaround only for these endpoint. Driver use limited number of buffer. This number can be set by macro CDNS_WA2_NUM_BUFFERS. Such blocking situation was observed on ACM gadget. For this function host send OUT data packet but ACM function is not prepared for this packet. It's cause that buffer placed in on chip memory block transfer to other endpoints. Issue has been fixed for DEV_VER_V2 version of controller. Signed-off-by: Pawel Laszczak Signed-off-by: Felipe Balbi drivers/usb/cdns3/gadget.c | 330 ++++++++++++++++++++++++++++++++++++++++++++- drivers/usb/cdns3/gadget.h | 13 ++ 2 files changed, 341 insertions(+), 2 deletions(-) commit 8bc1901ca7b07d864fca11461b3875b31f949765 Author: Pawel Laszczak Date: Tue Jul 2 14:38:01 2019 +0100 usb:cdns3 Add Cadence USB3 DRD Driver This patch introduce new Cadence USBSS DRD driver to Linux kernel. The Cadence USBSS DRD Controller is a highly configurable IP Core which can be instantiated as Dual-Role Device (DRD), Peripheral Only and Host Only (XHCI)configurations. The current driver has been validated with FPGA platform. We have support for PCIe bus, which is used on FPGA prototyping. The host side of USBSS-DRD controller is compliant with XHCI specification, so it works with standard XHCI Linux driver. Signed-off-by: Pawel Laszczak Signed-off-by: Felipe Balbi drivers/usb/Kconfig | 2 + drivers/usb/Makefile | 2 + drivers/usb/cdns3/Kconfig | 44 + drivers/usb/cdns3/Makefile | 14 + drivers/usb/cdns3/cdns3-pci-wrap.c | 157 +++ drivers/usb/cdns3/core.c | 543 +++++++++ drivers/usb/cdns3/core.h | 121 ++ drivers/usb/cdns3/debug.h | 173 +++ drivers/usb/cdns3/debugfs.c | 153 +++ drivers/usb/cdns3/drd.c | 379 ++++++ drivers/usb/cdns3/drd.h | 166 +++ drivers/usb/cdns3/ep0.c | 920 ++++++++++++++ drivers/usb/cdns3/gadget-export.h | 28 + drivers/usb/cdns3/gadget.c | 2319 ++++++++++++++++++++++++++++++++++++ drivers/usb/cdns3/gadget.h | 1321 ++++++++++++++++++++ drivers/usb/cdns3/host-export.h | 28 + drivers/usb/cdns3/host.c | 76 ++ drivers/usb/cdns3/trace.c | 23 + drivers/usb/cdns3/trace.h | 447 +++++++ 19 files changed, 6916 insertions(+) commit c2af6b07803ebd099950cd608f404a7bff9037b2 Author: Pawel Laszczak Date: Tue Jul 2 14:38:00 2019 +0100 usb:gadget Simplify usb_decode_get_set_descriptor function. Patch moves switch responsible for decoding descriptor type outside snprintf. It improves code readability a little. Signed-off-by: Pawel Laszczak Signed-off-by: Felipe Balbi drivers/usb/gadget/debug.c | 113 +++++++++++++++++++++++---------------------- 1 file changed, 58 insertions(+), 55 deletions(-) commit ca888ce7495e4e1578c86c37b0c82f6709da477c Author: Pawel Laszczak Date: Tue Jul 2 14:37:59 2019 +0100 usb:gadget Patch simplify usb_decode_set_clear_feature function. Patch adds usb_decode_test_mode and usb_decode_device_feature functions, which allow to make more readable and simplify the usb_decode_set_clear_feature function. Signed-off-by: Pawel Laszczak Signed-off-by: Felipe Balbi drivers/usb/gadget/debug.c | 89 ++++++++++++++++++++++------------------------ 1 file changed, 43 insertions(+), 46 deletions(-) commit 3db1b636c07e15ff7410db782832dc2e7ffd2bce Author: Pawel Laszczak Date: Tue Jul 2 14:37:58 2019 +0100 usb:gadget Separated decoding functions from dwc3 driver. Patch moves some decoding functions from driver/usb/dwc3/debug.h driver to driver/usb/gadget/debug.c file. These moved functions include: dwc3_decode_get_status dwc3_decode_set_clear_feature dwc3_decode_set_address dwc3_decode_get_set_descriptor dwc3_decode_get_configuration dwc3_decode_set_configuration dwc3_decode_get_intf dwc3_decode_set_intf dwc3_decode_synch_frame dwc3_decode_set_sel dwc3_decode_set_isoch_delay dwc3_decode_ctrl These functions are used also in inroduced cdns3 driver. All functions prefixes were changed from dwc3 to usb. Also, function's parameters has been extended according to the name of fields in standard SETUP packet. Additionally, patch adds usb_decode_ctrl function to include/linux/usb/gadget.h file. Signed-off-by: Pawel Laszczak Signed-off-by: Felipe Balbi drivers/usb/dwc3/debug.h | 252 ----------------------------------------- drivers/usb/dwc3/trace.h | 2 +- drivers/usb/gadget/Makefile | 1 + drivers/usb/gadget/debug.c | 268 ++++++++++++++++++++++++++++++++++++++++++++ include/linux/usb/gadget.h | 26 +++++ 5 files changed, 296 insertions(+), 253 deletions(-) commit e8a8b40cc8922b38f91c6562d525f21f312f235c Author: Pawel Laszczak Date: Tue Jul 2 14:37:57 2019 +0100 dt-bindings: add binding for USBSS-DRD controller. This patch aim at documenting USB related dt-bindings for the Cadence USBSS-DRD controller. Signed-off-by: Pawel Laszczak Reviewed-by: Rob Herring Signed-off-by: Felipe Balbi .../devicetree/bindings/usb/cdns-usb3.txt | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit b3649dee5fbb0f6585010e6e9313dfcbb075b22b Author: Felipe Balbi Date: Wed Dec 13 16:03:22 2017 +0200 usb: dwc3: pci: add support for TigerLake Devices This patch adds the necessary PCI ID for TGP-LP devices. Signed-off-by: Felipe Balbi drivers/usb/dwc3/dwc3-pci.c | 4 ++++ 1 file changed, 4 insertions(+) commit b9b667a0c7596474f9eb30008e837aa88574ceb7 Merge: c1829acefc08 371975b0b075 Author: Greg Kroah-Hartman Date: Wed Jul 3 09:21:25 2019 +0200 Merge tag 'fsi-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/fsi into char-misc-next Joel writes: FSI changes for 5.3 - Add MAINTAINERS entry. There is now a git tree and a mailing list/patchwork for collecting FSI patches - Bug fix for error driver registration error paths - Correction for the OCC hwmon driver to meet the spec * tag 'fsi-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/fsi: fsi/core: Fix error paths on CFAM init OCC: FSI and hwmon: Add sequence numbering MAINTAINERS: Add FSI subsystem commit 7f61abcdb1afb5aea34258b78341aa972d38b8b9 Merge: aa9083faa10f f8377eff5481 Author: Greg Kroah-Hartman Date: Wed Jul 3 09:20:31 2019 +0200 Merge tag 'usb-serial-5.3-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-next Johan writes: USB-serial updates for 5.3-rc1 Here are the USB-serial updates for 5.3-rc1; just some new device ids this time. All have been in linux-next with no reported issues. Signed-off-by: Johan Hovold * tag 'usb-serial-5.3-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: ftdi_sio: add ID for isodebug v1 USB: serial: option: add support for GosunCn ME3630 RNDIS mode commit 7e8e6816c6495a1168f9a7a50125d82c23e59300 Author: Thomas Gleixner Date: Tue Jul 2 17:53:35 2019 +0200 stacktrace: Use PF_KTHREAD to check for kernel threads !current->mm is not a reliable indicator for kernel threads as they might temporarily use a user mm. Check for PF_KTHREAD instead. Signed-off-by: Thomas Gleixner Acked-by: Mark Rutland Cc: Josh Poimboeuf Cc: Peter Zijlstra Cc: Steven Rostedt Link: https://lkml.kernel.org/r/alpine.DEB.2.21.1907021750100.1802@nanos.tec.linutronix.de kernel/stacktrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e0ec0a6ba6574594f444383efbc09e621d1d8dee Author: Christoph Hellwig Date: Mon Jul 1 23:54:32 2019 +0200 gfs2: remove the unused gfs2_stuffed_write_end function This function was overlooked when the write_begin and write_end address space operations were removed as part of gfs2's iomap conversion. Signed-off-by: Christoph Hellwig Signed-off-by: Andreas Gruenbacher fs/gfs2/aops.c | 41 ----------------------------------------- fs/gfs2/aops.h | 3 --- 2 files changed, 44 deletions(-) commit f3915f83e84c1f14358aaa91e8785d6169092176 Author: Christoph Hellwig Date: Mon Jul 1 23:54:31 2019 +0200 gfs2: use page_offset in gfs2_page_mkwrite Without casting page->index to a guaranteed 64-bit type, the value might be treated as 32-bit on 32-bit platforms and thus get truncated. Signed-off-by: Christoph Hellwig Signed-off-by: Andreas Gruenbacher fs/gfs2/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2200bbec12c428d7b276fb450e5755cdfe435ae5 Author: Nishad Kamdar Date: Tue Apr 16 20:58:57 2019 +0530 powerpc: Use the correct style for SPDX License Identifier This patch corrects the SPDX License Identifier style in the powerpc Hardware Architecture related files. Suggested-by: Joe Perches Signed-off-by: Nishad Kamdar Acked-by: Andrew Donnellan Signed-off-by: Michael Ellerman arch/powerpc/include/asm/pnv-ocxl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 41732bdc9ccd26829cf647711c4b93384e03e529 Author: Stewart Smith Date: Tue May 28 13:29:25 2019 +1000 powerpc/powernv-eeh: Consisely desribe what this file does If the previous comment made sense, continue debugging or call your doctor immediately. Signed-off-by: Stewart Smith Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/eeh-powernv.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 14b2f7d908c374df57792410bc0100dd71be4e5c Author: Krzysztof Kozlowski Date: Tue Jun 4 10:00:33 2019 +0200 powerpc/configs: Remove useless UEVENT_HELPER_PATH Remove the CONFIG_UEVENT_HELPER_PATH because: 1. It is disabled since commit 1be01d4a5714 ("driver: base: Disable CONFIG_UEVENT_HELPER by default") as its dependency (UEVENT_HELPER) was made default to 'n', 2. It is not recommended (help message: "This should not be used today [...] creates a high system load") and was kept only for ancient userland, 3. Certain userland specifically requests it to be disabled (systemd README: "Legacy hotplug slows down the system and confuses udev"). Signed-off-by: Krzysztof Kozlowski Acked-by: Geert Uytterhoeven Signed-off-by: Michael Ellerman arch/powerpc/configs/40x/acadia_defconfig | 1 - arch/powerpc/configs/40x/ep405_defconfig | 1 - arch/powerpc/configs/40x/kilauea_defconfig | 1 - arch/powerpc/configs/40x/klondike_defconfig | 1 - arch/powerpc/configs/40x/makalu_defconfig | 1 - arch/powerpc/configs/40x/obs600_defconfig | 1 - arch/powerpc/configs/40x/virtex_defconfig | 1 - arch/powerpc/configs/40x/walnut_defconfig | 1 - arch/powerpc/configs/44x/akebono_defconfig | 1 - arch/powerpc/configs/44x/arches_defconfig | 1 - arch/powerpc/configs/44x/bamboo_defconfig | 1 - arch/powerpc/configs/44x/bluestone_defconfig | 1 - arch/powerpc/configs/44x/canyonlands_defconfig | 1 - arch/powerpc/configs/44x/currituck_defconfig | 1 - arch/powerpc/configs/44x/ebony_defconfig | 1 - arch/powerpc/configs/44x/eiger_defconfig | 1 - arch/powerpc/configs/44x/fsp2_defconfig | 1 - arch/powerpc/configs/44x/icon_defconfig | 1 - arch/powerpc/configs/44x/iss476-smp_defconfig | 1 - arch/powerpc/configs/44x/katmai_defconfig | 1 - arch/powerpc/configs/44x/rainier_defconfig | 1 - arch/powerpc/configs/44x/redwood_defconfig | 1 - arch/powerpc/configs/44x/sam440ep_defconfig | 1 - arch/powerpc/configs/44x/sequoia_defconfig | 1 - arch/powerpc/configs/44x/taishan_defconfig | 1 - arch/powerpc/configs/44x/virtex5_defconfig | 1 - arch/powerpc/configs/44x/warp_defconfig | 1 - arch/powerpc/configs/52xx/cm5200_defconfig | 1 - arch/powerpc/configs/52xx/lite5200b_defconfig | 1 - arch/powerpc/configs/52xx/motionpro_defconfig | 1 - arch/powerpc/configs/52xx/pcm030_defconfig | 1 - arch/powerpc/configs/52xx/tqm5200_defconfig | 1 - arch/powerpc/configs/83xx/asp8347_defconfig | 1 - arch/powerpc/configs/83xx/mpc8313_rdb_defconfig | 1 - arch/powerpc/configs/83xx/mpc8315_rdb_defconfig | 1 - arch/powerpc/configs/83xx/mpc832x_mds_defconfig | 1 - arch/powerpc/configs/83xx/mpc832x_rdb_defconfig | 1 - arch/powerpc/configs/83xx/mpc834x_itx_defconfig | 1 - arch/powerpc/configs/83xx/mpc834x_itxgp_defconfig | 1 - arch/powerpc/configs/83xx/mpc834x_mds_defconfig | 1 - arch/powerpc/configs/83xx/mpc836x_mds_defconfig | 1 - arch/powerpc/configs/83xx/mpc836x_rdk_defconfig | 1 - arch/powerpc/configs/83xx/mpc837x_mds_defconfig | 1 - arch/powerpc/configs/83xx/mpc837x_rdb_defconfig | 1 - arch/powerpc/configs/85xx/ge_imp3a_defconfig | 1 - arch/powerpc/configs/85xx/ksi8560_defconfig | 1 - arch/powerpc/configs/85xx/mpc8540_ads_defconfig | 1 - arch/powerpc/configs/85xx/mpc8560_ads_defconfig | 1 - arch/powerpc/configs/85xx/mpc85xx_cds_defconfig | 1 - arch/powerpc/configs/85xx/sbc8548_defconfig | 1 - arch/powerpc/configs/85xx/stx_gp3_defconfig | 1 - arch/powerpc/configs/85xx/tqm8548_defconfig | 1 - arch/powerpc/configs/85xx/xes_mpc85xx_defconfig | 1 - arch/powerpc/configs/adder875_defconfig | 1 - arch/powerpc/configs/amigaone_defconfig | 1 - arch/powerpc/configs/cell_defconfig | 1 - arch/powerpc/configs/chrp32_defconfig | 1 - arch/powerpc/configs/ep8248e_defconfig | 1 - arch/powerpc/configs/ep88xc_defconfig | 1 - arch/powerpc/configs/fsl-emb-nonhw.config | 1 - arch/powerpc/configs/g5_defconfig | 1 - arch/powerpc/configs/gamecube_defconfig | 1 - arch/powerpc/configs/holly_defconfig | 1 - arch/powerpc/configs/linkstation_defconfig | 1 - arch/powerpc/configs/maple_defconfig | 1 - arch/powerpc/configs/mgcoge_defconfig | 1 - arch/powerpc/configs/mpc512x_defconfig | 1 - arch/powerpc/configs/mpc5200_defconfig | 1 - arch/powerpc/configs/mpc7448_hpc2_defconfig | 1 - arch/powerpc/configs/mpc8272_ads_defconfig | 1 - arch/powerpc/configs/mpc83xx_defconfig | 1 - arch/powerpc/configs/mpc885_ads_defconfig | 1 - arch/powerpc/configs/mvme5100_defconfig | 1 - arch/powerpc/configs/pasemi_defconfig | 1 - arch/powerpc/configs/pmac32_defconfig | 1 - arch/powerpc/configs/powernv_defconfig | 1 - arch/powerpc/configs/ppc40x_defconfig | 1 - arch/powerpc/configs/ppc44x_defconfig | 1 - arch/powerpc/configs/ppc64_defconfig | 1 - arch/powerpc/configs/ppc64e_defconfig | 1 - arch/powerpc/configs/ppc6xx_defconfig | 1 - arch/powerpc/configs/pq2fads_defconfig | 1 - arch/powerpc/configs/ps3_defconfig | 1 - arch/powerpc/configs/pseries_defconfig | 1 - arch/powerpc/configs/skiroot_defconfig | 1 - arch/powerpc/configs/storcenter_defconfig | 1 - arch/powerpc/configs/tqm8xx_defconfig | 1 - arch/powerpc/configs/wii_defconfig | 1 - 88 files changed, 88 deletions(-) commit 3ab3a0689e74e6aa5b41360bc18861040ddef5b1 Author: Christian Lamparter Date: Sat Jun 15 17:23:13 2019 +0200 powerpc/4xx/uic: clear pending interrupt after irq type/pol change When testing out gpio-keys with a button, a spurious interrupt (and therefore a key press or release event) gets triggered as soon as the driver enables the irq line for the first time. This patch clears any potential bogus generated interrupt that was caused by the switching of the associated irq's type and polarity. Signed-off-by: Christian Lamparter Signed-off-by: Michael Ellerman arch/powerpc/platforms/4xx/uic.c | 1 + 1 file changed, 1 insertion(+) commit 7b570361f6f66c91443541b19121038c076e7d64 Author: Geert Uytterhoeven Date: Mon Jun 17 16:52:04 2019 +0200 selftests/powerpc: Add missing newline at end of file "git diff" says: \ No newline at end of file after modifying the file. Signed-off-by: Geert Uytterhoeven [mpe: Rebase since addition of another test] Signed-off-by: Michael Ellerman tools/testing/selftests/powerpc/mm/.gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6fbcdd59094ade30db63f32316e9502425d7b256 Author: Suraj Jitindar Singh Date: Wed Mar 6 12:10:38 2019 +1100 powerpc: Add barrier_nospec to raw_copy_in_user() Commit ddf35cf3764b ("powerpc: Use barrier_nospec in copy_from_user()") Added barrier_nospec before loading from user-controlled pointers. The intention was to order the load from the potentially user-controlled pointer vs a previous branch based on an access_ok() check or similar. In order to achieve the same result, add a barrier_nospec to the raw_copy_in_user() function before loading from such a user-controlled pointer. Fixes: ddf35cf3764b ("powerpc: Use barrier_nospec in copy_from_user()") Signed-off-by: Suraj Jitindar Singh Signed-off-by: Michael Ellerman arch/powerpc/include/asm/uaccess.h | 1 + 1 file changed, 1 insertion(+) commit 3fefd1cd95df04da67c83c1cb93b663f04b3324f Author: Michael Neuling Date: Thu Jun 20 16:00:40 2019 +1000 KVM: PPC: Book3S HV: Fix CR0 setting in TM emulation When emulating tsr, treclaim and trechkpt, we incorrectly set CR0. The code currently sets: CR0 <- 00 || MSR[TS] but according to the ISA it should be: CR0 <- 0 || MSR[TS] || 0 This fixes the bit shift to put the bits in the correct location. This is a data integrity issue as CR0 is corrupted. Fixes: 4bb3c7a0208f ("KVM: PPC: Book3S HV: Work around transactional memory bugs in POWER9") Cc: stable@vger.kernel.org # v4.17+ Tested-by: Suraj Jitindar Singh Signed-off-by: Michael Neuling Signed-off-by: Michael Ellerman arch/powerpc/kvm/book3s_hv_tm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5636427d087a55842c1a199dfb839e6545d30e5d Author: Alexey Kardashevskiy Date: Fri Jun 28 16:53:00 2019 +1000 powerpc/powernv: Fix stale iommu table base after VFIO The powernv platform uses @dma_iommu_ops for non-bypass DMA. These ops need an iommu_table pointer which is stored in dev->archdata.iommu_table_base. It is initialized during pcibios_setup_device() which handles boot time devices. However when a device is taken from the system in order to pass it through, the default IOMMU table is destroyed but the pointer in a device is not updated; also when a device is returned back to the system, a new table pointer is not stored in dev->archdata.iommu_table_base either. So when a just returned device tries using IOMMU, it crashes on accessing stale iommu_table or its members. This calls set_iommu_table_base() when the default window is created. Note it used to be there before but was wrongly removed (see "fixes"). It did not appear before as these days most devices simply use bypass. This adds set_iommu_table_base(NULL) when a device is taken from the system to make it clear that IOMMU DMA cannot be used past that point. Fixes: c4e9d3c1e65a ("powerpc/powernv/pseries: Rework device adding to IOMMU groups") Cc: stable@vger.kernel.org # v5.0+ Signed-off-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/pci-ioda.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit dead1c845dbe97e0061dae2017eaf3bd8f8f06ee Author: Alexey Kardashevskiy Date: Wed Jun 26 12:37:46 2019 +1000 powerpc/pci/of: Parse unassigned resources The pseries platform uses the PCI_PROBE_DEVTREE method of PCI probing which reads "assigned-addresses" of every PCI device and initializes the device resources. However if the property is missing or zero sized, then there is no fallback of any kind and the PCI resources remain undiscovered, i.e. pdev->resource[] array remains empty. This adds a fallback which parses the "reg" property in pretty much same way except it marks resources as "unset" which later make Linux assign those resources proper addresses. This has an effect when: 1. a hypervisor failed to assign any resource for a device; 2. /chosen/linux,pci-probe-only=0 is in the DT so the system may try assigning a resource. Neither is likely to happen under PowerVM. Signed-off-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman arch/powerpc/kernel/pci_of_scan.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 1a047cc7e53cb10e4706c09f6e92b2fa911a2bf2 Author: Alexey Kardashevskiy Date: Tue May 7 16:25:59 2019 +1000 powerpc/pseries/dma: Enable SWIOTLB So far the pseries platforms has always been using IOMMU making SWIOTLB unnecessary. Now we want secure guests which means devices can only access certain areas of guest physical memory; we are going to use SWIOTLB for this purpose. This allows SWIOTLB for pseries. By default there is no change in behavior. This enables SWIOTLB when the "swiotlb" kernel parameter is set to "force". With the SWIOTLB enabled, the kernel creates a directly mapped DMA window (using the usual DDW mechanism) and implements SWIOTLB on top of that. Signed-off-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman arch/powerpc/platforms/pseries/Kconfig | 1 + arch/powerpc/platforms/pseries/setup.c | 5 +++++ 2 files changed, 6 insertions(+) commit efd176a04bef41aab5b3087e977fea2b69915174 Author: Alexey Kardashevskiy Date: Tue May 7 16:25:58 2019 +1000 powerpc/pseries/dma: Allow SWIOTLB The commit 8617a5c5bc00 ("powerpc/dma: handle iommu bypass in dma_iommu_ops") merged direct DMA ops into the IOMMU DMA ops allowing SWIOTLB as well but only for mapping; the unmapping and bouncing parts were left unmodified. This adds missing direct unmapping calls to .unmap_page() and .unmap_sg(). This adds missing sync callbacks and directs them to the direct DMA hooks. Fixes: 8617a5c5bc00 ("powerpc/dma: handle iommu bypass in dma_iommu_ops") Signed-off-by: Alexey Kardashevskiy Signed-off-by: Thiago Jung Bauermann Signed-off-by: Michael Ellerman arch/powerpc/kernel/dma-iommu.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit 24911acd64cee411c9e626d3d0ca0733805b009b Author: Christoph Hellwig Date: Sat Jun 29 10:03:59 2019 +0200 powerpc: remove device_to_mask() Use the dma_get_mask() helper from dma-mapping.h instead, as they are functionally identical. Signed-off-by: Christoph Hellwig Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman arch/powerpc/include/asm/iommu.h | 8 -------- arch/powerpc/kernel/dma-iommu.c | 4 ++-- arch/powerpc/platforms/pseries/vio.c | 4 ++-- 3 files changed, 4 insertions(+), 12 deletions(-) commit a278e7ea608bea5fe6df9b6ae91fa134655c5d2c Author: Michael Neuling Date: Tue Jun 4 13:00:37 2019 +1000 powerpc: Fix compile issue with force DAWR If you compile with KVM but without CONFIG_HAVE_HW_BREAKPOINT you fail at linking with: arch/powerpc/kvm/book3s_hv_rmhandlers.o:(.text+0x708): undefined reference to `dawr_force_enable' This was caused by commit c1fe190c0672 ("powerpc: Add force enable of DAWR on P9 option"). This moves a bunch of code around to fix this. It moves a lot of the DAWR code in a new file and creates a new CONFIG_PPC_DAWR to enable compiling it. Fixes: c1fe190c0672 ("powerpc: Add force enable of DAWR on P9 option") Signed-off-by: Michael Neuling [mpe: Minor formatting in set_dawr()] Signed-off-by: Michael Ellerman arch/powerpc/Kconfig | 4 ++ arch/powerpc/include/asm/hw_breakpoint.h | 21 ++++--- arch/powerpc/kernel/Makefile | 1 + arch/powerpc/kernel/dawr.c | 101 +++++++++++++++++++++++++++++++ arch/powerpc/kernel/hw_breakpoint.c | 61 ------------------- arch/powerpc/kernel/process.c | 28 --------- arch/powerpc/kvm/Kconfig | 1 + 7 files changed, 121 insertions(+), 96 deletions(-) commit 548c54acba5bd1388d50727a9a126a42d0cd4ad0 Author: Mathieu Malaterre Date: Tue Jun 4 13:00:36 2019 +1000 powerpc: silence a -Wcast-function-type warning in dawr_write_file_bool In commit c1fe190c0672 ("powerpc: Add force enable of DAWR on P9 option") the following piece of code was added: smp_call_function((smp_call_func_t)set_dawr, &null_brk, 0); Since GCC 8 this triggers the following warning about incompatible function types: arch/powerpc/kernel/hw_breakpoint.c:408:21: error: cast between incompatible function types from 'int (*)(struct arch_hw_breakpoint *)' to 'void (*)(void *)' [-Werror=cast-function-type] Since the warning is there for a reason, and should not be hidden behind a cast, provide an intermediate callback function to avoid the warning. Fixes: c1fe190c0672 ("powerpc: Add force enable of DAWR on P9 option") Suggested-by: Christoph Hellwig Signed-off-by: Mathieu Malaterre Signed-off-by: Michael Neuling Signed-off-by: Michael Ellerman arch/powerpc/kernel/hw_breakpoint.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 6c46fcce39f0eb4830078c5f1db289dd7196f84a Author: Nicholas Piggin Date: Sun Jun 23 20:41:52 2019 +1000 powerpc/64s/radix: keep kernel ERAT over local process/guest invalidates ISA v3.0 radix modes provide SLBIA variants which can invalidate ERAT for effPID!=0 or for effLPID!=0, which allows user and guest invalidations to retain kernel/host ERAT entries. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/ppc-opcode.h | 9 +++++++++ arch/powerpc/kvm/book3s_hv_builtin.c | 6 ++++-- arch/powerpc/mm/book3s64/radix_tlb.c | 6 +++--- 3 files changed, 16 insertions(+), 5 deletions(-) commit fe7946ce0808eb0e43711f5db7d2d1599b362d02 Author: Nicholas Piggin Date: Sun Jun 23 20:41:51 2019 +1000 powerpc/64s: Rename PPC_INVALIDATE_ERAT to PPC_ISA_3_0_INVALIDATE_ERAT This makes it clear to the caller that it can only be used on POWER9 and later CPUs. Signed-off-by: Nicholas Piggin [mpe: Use "ISA_3_0" rather than "ARCH_300"] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/ppc-opcode.h | 2 +- arch/powerpc/kernel/mce_power.c | 3 +-- arch/powerpc/kvm/book3s_hv_builtin.c | 2 +- arch/powerpc/mm/book3s64/hash_native.c | 2 +- arch/powerpc/mm/book3s64/radix_tlb.c | 8 ++++---- arch/powerpc/platforms/powernv/idle.c | 2 +- 6 files changed, 9 insertions(+), 10 deletions(-) commit 293c2e27b999e431ad5f9df3386bea37b18fce53 Author: Nicholas Piggin Date: Fri Jun 28 16:33:22 2019 +1000 powerpc/64s/exception: simplify hmi control flow Branch to the relocated 0xc000 address early (still in real mode), to simplify subsequent branches. Have the virt mode handler avoid just 'windup' and redo the exception from scratch, rather than branching back to the trampoline. Rearrange the stack setup instruction location to match the system reset handler (e.g., right before EXCEPTION_PROLOG_COMMON). Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) commit f34c9675ca594bea6f813872a470e1b8b077d454 Author: Nicholas Piggin Date: Fri Jun 28 16:33:21 2019 +1000 powerpc/64s/exception: hmi remove special case macro No code change. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit acc8da4492ef9b9d60bbdf5f857ead9e84031b5c Author: Nicholas Piggin Date: Fri Jun 28 16:33:20 2019 +1000 powerpc/64s/exception: sreset move trampoline ahead of common code Follow convention and move tramp ahead of common. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 0e10be2bb9cf1f552f5d64bfe786926bba9d11d2 Author: Nicholas Piggin Date: Fri Jun 28 16:33:19 2019 +1000 powerpc/64s/exception: optimise system_reset for idle, clean up non-idle case The idle wake up code in the system reset interrupt is not very optimal. There are two requirements: perform idle wake up quickly; and save everything including CFAR for non-idle interrupts, with no performance requirement. The problem with placing the idle test in the middle of the handler and using the normal handler code to save CFAR, is that it's quite costly (e.g., mfcfar is serialising, speculative workarounds get applied, SRR1 has to be reloaded, etc). It also prevents the standard interrupt handler boilerplate being used. This pain can be avoided by using a dedicated idle interrupt handler at the start of the interrupt handler, which restores all registers back to the way they were in case it was not an idle wake up. CFAR is preserved without saving it before the non-idle case by making that the fall-through, and idle is a taken branch. Performance seems to be in the noise, but possibly around 0.5% faster, the executed instructions certainly look better. The bigger benefit is being able to drop in standard interrupt handlers after the idle code, which helps with subsequent cleanup and consolidation. Signed-off-by: Nicholas Piggin [mpe: Fixup BE by using DOTSYM for idle_return_gpr_loss call] Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 69 ++++++++++++++++++++---------------- 1 file changed, 38 insertions(+), 31 deletions(-) commit 15a108af1a18b597bfbd7f7b3c7b4823bfbaf8df Author: Arnaldo Carvalho de Melo Date: Fri Jun 28 17:16:58 2019 -0300 perf script: Allow specifying the files to process guest samples The 'perf kvm' command set up things so that we can record, report, top, etc, but not 'script', so make 'perf script' be able to process samples by allowing to pass guest kallsyms, vmlinux, modules, etc, and if at least one of those is provided, set perf_guest to true so that guest samples get properly resolved. Testing it: # perf kvm --guest --guestkallsyms /wb/rhel6.kallsyms --guestmodules /wb/rhel6.modules record -e cycles:Gk ^C[ perf record: Woken up 7 times to write data ] [ perf record: Captured and wrote 3.602 MB perf.data.guest (10492 samples) ] # # perf evlist -i perf.data.guest cycles:Gk # perf evlist -v -i perf.data.guest cycles:Gk: size: 112, { sample_period, sample_freq }: 4000, sample_type: IP|TID|TIME|CPU|PERIOD, read_format: ID, disabled: 1, inherit: 1, exclude_user: 1, exclude_hv: 1, mmap: 1, comm: 1, freq: 1, task: 1, sample_id_all: 1, exclude_host: 1, mmap2: 1, comm_exec: 1, ksymbol: 1, bpf_event: 1 # # perf kvm --guestkallsyms /wb/rhel6.kallsyms --guestmodules /wb/rhel6.modules report --stdio -s sym | head -30 # To display the perf.data header info, please use --header/--header-only options. # # # Total Lost Samples: 0 # # Samples: 10K of event 'cycles:Gk' # Event count (approx.): 2434201408 # # Overhead Symbol # ........ .............................................. # 11.93% [g] avtab_search_node 3.95% [g] sidtab_context_to_sid 2.41% [g] n_tty_write 2.20% [g] _spin_unlock_irqrestore 1.37% [g] _aesni_dec4 1.33% [g] kmem_cache_alloc 1.07% [g] native_write_cr0 0.99% [g] kfree 0.95% [g] _spin_lock 0.91% [g] __memset 0.87% [g] schedule 0.83% [g] _spin_lock_irqsave 0.76% [g] __kmalloc 0.67% [g] avc_has_perm_noaudit 0.66% [g] kmem_cache_free 0.65% [g] glue_xts_crypt_128bit 0.59% [g] __d_lookup 0.59% [g] __audit_syscall_exit 0.56% [g] __memcpy # Then, when trying to use perf script to generate a python script and then process the events after adding a python hook for non-tracepoint events: # perf script -i perf.data.guest -g python generated Python script: perf-script.py # vim perf-script.py # tail -2 perf-script.py def process_event(param_dict): print(param_dict["symbol"]) # # perf script -i perf.data.guest -s perf-script.py | head in trace_begin vmx_vmexit vmx_vmexit vmx_vmexit vmx_vmexit vmx_vmexit vmx_vmexit vmx_vmexit vmx_vmexit vmx_vmexit 231 # We'd see just the vmx_vmexit, i.e. the samples from the guest don't show up. After this patch: # perf script --guestkallsyms /wb/rhel6.kallsyms --guestmodules /wb/rhel6.modules -i perf.data.guest -s perf-script.py 2> /dev/null | head -30 in trace_begin apic_timer_interrupt apic_timer_interrupt apic_timer_interrupt apic_timer_interrupt apic_timer_interrupt save_args do_timer drain_array inode_permission avc_has_perm_noaudit run_timer_softirq apic_timer_interrupt apic_timer_interrupt apic_timer_interrupt apic_timer_interrupt apic_timer_interrupt kvm_guest_apic_eoi_write run_posix_cpu_timers _spin_lock handle_pte_fault rcu_irq_enter delay_tsc delay_tsc native_read_tsc apic_timer_interrupt sys_open internal_add_timer list_del rcu_exit_nohz # Jiri Olsa noticed we need to set 'perf_guest' to true if we want to process guest samples and I made it be set if one of the guest files settings get set via the command line options added in this patch, that match those present in the 'perf kvm' command. We probably want to have 'perf record', 'perf report' etc to notice that there are guest samples and do the right thing, which is to look for files with some suffix that make it be associated with the guest used to collect the samples, i.e. if a vmlinux file is passed, we can get the build-id from it, if not some other identifier or simply looking for "kallsyms.guest", for instance, in the current directory. Reported-by: Mariano Pache Tested-by: Mariano Pache Cc: Adrian Hunter Cc: Alexander Yarygin Cc: Ali Raza Cc: Christian Borntraeger Cc: Jiri Olsa Cc: Joe Mario Cc: Larry Woodman Cc: Namhyung Kim Cc: Orran Krieger Cc: Ramkumar Ramachandra Cc: Yunlong Song Link: https://lkml.kernel.org/n/tip-d54gj64rerlxcqsrod05biwn@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-script.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 970d168de636ddac8221cbd4a11d7678943e7379 Author: Bart Van Assche Date: Mon Jul 1 08:47:30 2019 -0700 blk-mq: simplify blk_mq_make_request() Move the blk_mq_bio_to_request() call in front of the if-statement. Cc: Hannes Reinecke Cc: Omar Sandoval Reviewed-by: Minwoo Im Reviewed-by: Christoph Hellwig Reviewed-by: Ming Lei Signed-off-by: Bart Van Assche Signed-off-by: Jens Axboe block/blk-mq.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit c05f42206f4de12b6807270fc669b45472f1bdb7 Author: Bart Van Assche Date: Mon Jul 1 08:47:29 2019 -0700 blk-mq: remove blk_mq_put_ctx() No code that occurs between blk_mq_get_ctx() and blk_mq_put_ctx() depends on preemption being disabled for its correctness. Since removing the CPU preemption calls does not measurably affect performance, simplify the blk-mq code by removing the blk_mq_put_ctx() function and also by not disabling preemption in blk_mq_get_ctx(). Cc: Hannes Reinecke Cc: Omar Sandoval Reviewed-by: Christoph Hellwig Reviewed-by: Ming Lei Signed-off-by: Bart Van Assche Signed-off-by: Jens Axboe block/blk-mq-sched.c | 5 +---- block/blk-mq-tag.c | 8 -------- block/blk-mq.c | 16 +++------------- block/blk-mq.h | 7 +------ block/kyber-iosched.c | 1 - 5 files changed, 5 insertions(+), 32 deletions(-) commit 371975b0b07520c85098652d561639837a60a905 Author: Jeremy Kerr Date: Fri Jun 28 16:07:37 2019 +0800 fsi/core: Fix error paths on CFAM init Change d1dcd67825 re-worked the struct fsi_slave initialisation in fsi_slave_init, but introduced a few inconsitencies: the slave->dev is now registered through cdev_device_add, but we may kfree() the device out from underneath the cdev registration. We may also leave an IDA allocated. This change fixes the error paths, so that we kfree() only before the device is registered with the core code. We also move the smode write to before we start creating proper devices, as it's the most likely to fail. We also remove the IDA-allocated minor on error, and properly clean up the of_node. Fixes: d1dcd6782576 ("fsi: Add cfam char devices") Reported-by: Lei YU Tested-by: John Wang Signed-off-by: Jeremy Kerr Signed-off-by: Joel Stanley drivers/fsi/fsi-core.c | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) commit afd26118f0dcf29db031a213f6f95c46ff3bdcbe Author: Eddie James Date: Tue Jul 2 10:47:42 2019 -0500 OCC: FSI and hwmon: Add sequence numbering Sequence numbering of the commands submitted to the OCC is required by the OCC interface specification. Add sequence numbering and check for the correct sequence number on the response. Signed-off-by: Eddie James Acked-by: Guenter Roeck Reviewed-by: Lei YU Signed-off-by: Joel Stanley drivers/fsi/fsi-occ.c | 15 ++++++++++++--- drivers/hwmon/occ/common.c | 4 ++-- drivers/hwmon/occ/common.h | 1 + 3 files changed, 15 insertions(+), 5 deletions(-) commit 60c87bc53178965aeb3dea798020e33900ab46f0 Author: Joel Stanley Date: Tue Jul 2 14:07:05 2019 +0930 MAINTAINERS: Add FSI subsystem The subsystem was merged some time ago but we did not have a maintainers entry. The mailing list exists to allow our patchwork to slurp up the patches. The tree will be co-maintained by myself and Jeremy. Acked-by: Jeremy Kerr Signed-off-by: Joel Stanley MAINTAINERS | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit ff95bf28c23490584b9d75913a520bb7bb1f2ecb Author: Po-Hsu Lin Date: Mon Jul 1 12:40:31 2019 +0800 selftests/net: skip psock_tpacket test if KALLSYMS was not enabled The psock_tpacket test will need to access /proc/kallsyms, this would require the kernel config CONFIG_KALLSYMS to be enabled first. Apart from adding CONFIG_KALLSYMS to the net/config file here, check the file existence to determine if we can run this test will be helpful to avoid a false-positive test result when testing it directly with the following commad against a kernel that have CONFIG_KALLSYMS disabled: make -C tools/testing/selftests TARGETS=net run_tests Signed-off-by: Po-Hsu Lin Acked-by: Shuah Khan Signed-off-by: David S. Miller tools/testing/selftests/net/config | 1 + tools/testing/selftests/net/run_afpackettests | 14 +++++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) commit 590a18e1711318a7e1756be48853223a1eb84316 Author: Markus Elfring Date: Tue Jul 2 13:21:33 2019 +0200 PCI: Use seq_puts() instead of seq_printf() in show_device() The driver name in /proc/bus/pci/devices can be printed without a printf format specification, so use seq_puts() instead of seq_printf(). This issue was detected by using the Coccinelle software. Link: https://lore.kernel.org/r/a6b110cb-0d0e-5dc3-9ca1-9041609cf74c@web.de Signed-off-by: Markus Elfring [bhelgaas: commit log] Signed-off-by: Bjorn Helgaas drivers/pci/proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c002bb66f5bd8b8f470926489a115b7f486f501 Author: Logan Gunthorpe Date: Tue Jul 2 11:35:44 2019 -0600 PCI/P2PDMA: Fix missing check for dma_virt_ops Drivers that use dma_virt_ops were meant to be rejected when testing compatibility for P2PDMA. This check got inadvertently dropped in one of the later versions of the original patchset, so add it back. Fixes: 52916982af48 ("PCI/P2PDMA: Support peer-to-peer memory") Link: https://lore.kernel.org/r/20190702173544.21950-1-logang@deltatee.com Signed-off-by: Logan Gunthorpe Signed-off-by: Bjorn Helgaas drivers/pci/p2pdma.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit cad3836f9eb292647c9e3e5c6c778e6fa6e6bf15 Author: Jaegeuk Kim Date: Wed Jun 26 18:23:05 2019 -0700 f2fs: allocate blocks for pinned file This patch allows fallocate to allocate physical blocks for pinned file. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim Documentation/filesystems/f2fs.txt | 25 +++++++++++++++++++++++++ fs/f2fs/file.c | 7 ++++++- 2 files changed, 31 insertions(+), 1 deletion(-) commit 56659ce838456c6f2315ce8a4bd686ac4b23e9d1 Author: Sahitya Tummala Date: Thu Jun 6 15:08:13 2019 +0530 f2fs: fix is_idle() check for discard type The discard thread should issue upto dpolicy->max_requests at once and wait for all those discard requests at once it reaches dpolicy->max_requests. It should then sleep for dpolicy->min_interval timeout before issuing the next batch of discard requests. But in the current code of is_idle(), it checks for dcc_info->queued_discard and aborts issuing the discard batch of max_requests. This dcc_info->queued_discard will be true always once one discard command is issued. It is thus resulting into this type of discard request pattern - - Issue discard request#1 - is_idle() returns false, discard thread waits for request#1 and then sleeps for min_interval 50ms. - Issue discard request#2 - is_idle() returns false, discard thread waits for request#2 and then sleeps for min_interval 50ms. - and so on for all other discard requests, assuming f2fs is idle w.r.t other conditions. With this fix, the pattern will look like this - - Issue discard request#1 - Issue discard request#2 and so on upto max_requests of 8 - Issue discard request#8 - wait for min_interval 50ms. Signed-off-by: Sahitya Tummala Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit db6ec53b7e0320c8fad27e9a816e50080154bd51 Author: Jaegeuk Kim Date: Wed May 29 10:58:45 2019 -0700 f2fs: add a rw_sem to cover quota flag changes Two paths to update quota and f2fs_lock_op: 1. - lock_op | - quota_update `- unlock_op 2. - quota_update - lock_op `- unlock_op But, we need to make a transaction on quota_update + lock_op in #2 case. So, this patch introduces: 1. lock_op 2. down_write 3. check __need_flush 4. up_write 5. if there is dirty quota entries, flush them 6. otherwise, good to go Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 41 +++++++++++++++++++---------------------- fs/f2fs/f2fs.h | 1 + fs/f2fs/super.c | 38 +++++++++++++++++++++++++++++++++----- 3 files changed, 53 insertions(+), 27 deletions(-) commit c83414aedf369a40b825b0e254d9b36dae17aa66 Author: Chao Yu Date: Thu Jun 20 11:36:15 2019 +0800 f2fs: set SBI_NEED_FSCK for xattr corruption case If xattr is corrupted, let's print kernel message and set SBI_NEED_FSCK for further repair. Reported-by: Pavel Machek Signed-off-by: Chao Yu Acked-by: Pavel Machek Signed-off-by: Jaegeuk Kim fs/f2fs/xattr.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 10f966bbf521bb9b2e497bbca496a5141f4071d0 Author: Chao Yu Date: Thu Jun 20 11:36:14 2019 +0800 f2fs: use generic EFSBADCRC/EFSCORRUPTED f2fs uses EFAULT as error number to indicate filesystem is corrupted all the time, but generic filesystems use EUCLEAN for such condition, we need to change to follow others. This patch adds two new macros as below to wrap more generic error code macros, and spread them in code. EFSBADCRC EBADMSG /* Bad CRC detected */ EFSCORRUPTED EUCLEAN /* Filesystem is corrupted */ Reported-by: Pavel Machek Signed-off-by: Chao Yu Acked-by: Pavel Machek Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 12 +++++++++--- fs/f2fs/data.c | 18 +++++++++--------- fs/f2fs/dir.c | 2 +- fs/f2fs/f2fs.h | 3 +++ fs/f2fs/file.c | 2 +- fs/f2fs/gc.c | 6 +++--- fs/f2fs/inline.c | 4 ++-- fs/f2fs/inode.c | 4 ++-- fs/f2fs/node.c | 6 +++--- fs/f2fs/recovery.c | 6 +++--- fs/f2fs/segment.c | 10 +++++----- fs/f2fs/segment.h | 4 ++-- fs/f2fs/super.c | 2 +- fs/f2fs/xattr.c | 4 ++-- 14 files changed, 46 insertions(+), 37 deletions(-) commit f91108b801ad7d7668c95841f4cb76494b2a9c8a Author: Geert Uytterhoeven Date: Thu Jun 20 16:42:08 2019 +0200 f2fs: Use DIV_ROUND_UP() instead of open-coding Replace the open-coded divisions with round-up by calls to the DIV_ROUND_UP() helper macro. Signed-off-by: Geert Uytterhoeven Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 4 ++-- fs/f2fs/file.c | 6 +++--- fs/f2fs/segment.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) commit 2d821c12176bc1184701d548c987b2e2a39429ed Author: Chao Yu Date: Tue Jun 18 17:59:03 2019 +0800 f2fs: print kernel message if filesystem is inconsistent As Pavel reported, once we detect filesystem inconsistency in f2fs_inplace_write_data(), it will be better to print kernel message as we did in other places. Reported-by: Pavel Machek Signed-off-by: Chao Yu Acked-by: Pavel Machek Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 2 ++ 1 file changed, 2 insertions(+) commit dcbb4c10e6d9693cc9d6fa493b4d130b66a60c7d Author: Joe Perches Date: Tue Jun 18 17:48:42 2019 +0800 f2fs: introduce f2fs_ macros to wrap f2fs_printk() - Add and use f2fs_ macros - Convert f2fs_msg to f2fs_printk - Remove level from f2fs_printk and embed the level in the format - Coalesce formats and align multi-line arguments - Remove unnecessary duplicate extern f2fs_msg f2fs.h Signed-off-by: Joe Perches Signed-off-by: Chao Yu Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 34 ++-- fs/f2fs/dir.c | 10 +- fs/f2fs/extent_cache.c | 7 +- fs/f2fs/f2fs.h | 38 ++-- fs/f2fs/file.c | 21 +-- fs/f2fs/gc.c | 23 +-- fs/f2fs/inline.c | 12 +- fs/f2fs/inode.c | 72 +++----- fs/f2fs/namei.c | 10 +- fs/f2fs/node.c | 30 ++- fs/f2fs/recovery.c | 37 ++-- fs/f2fs/segment.c | 61 +++--- fs/f2fs/segment.h | 10 +- fs/f2fs/super.c | 493 ++++++++++++++++++++----------------------------- 14 files changed, 351 insertions(+), 507 deletions(-) commit 8740edc3e5cca78e20ac3ba0127f61ab7cdb4d2f Author: Chao Yu Date: Tue Jun 18 18:00:09 2019 +0800 f2fs: avoid get_valid_blocks() for cleanup No logic change. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/sysfs.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 04f0b2eaa3b3ee243df6040617b4bfbbc0404854 Author: Qiuyang Sun Date: Wed Jun 5 11:33:25 2019 +0800 f2fs: ioctl for removing a range from F2FS This ioctl shrinks a given length (aligned to sections) from end of the main area. Any cursegs and valid blocks will be moved out before invalidating the range. This feature can be used for adjusting partition sizes online. History of the patch: Sahitya Tummala: - Add this ioctl for f2fs_compat_ioctl() as well. - Fix debugfs status to reflect the online resize changes. - Fix potential race between online resize path and allocate new data block path or gc path. Others: - Rename some identifiers. - Add some error handling branches. - Clear sbi->next_victim_seg[BG_GC/FG_GC] in shrinking range. - Implement this interface as ext4's, and change the parameter from shrunk bytes to new block count of F2FS. - During resizing, force to empty sit_journal and forbid adding new entries to it, in order to avoid invalid segno in journal after resize. - Reduce sbi->user_block_count before resize starts. - Commit the updated superblock first, and then update in-memory metadata only when the former succeeds. - Target block count must align to sections. - Write checkpoint before and after committing the new superblock, w/o CP_FSCK_FLAG respectively, so that the FS can be fixed by fsck even if resize fails after the new superblock is committed. - In free_segment_range(), reduce granularity of gc_mutex. - Add protection on curseg migration. - Add freeze_bdev() and thaw_bdev() for resize fs. - Remove CUR_MAIN_SECS and use MAIN_SECS directly for allocation. - Recover super_block and FS metadata when resize fails. - No need to clear CP_FSCK_FLAG in update_ckpt_flags(). - Clean up the sb and fs metadata update functions for resize_fs. Geert Uytterhoeven: - Use div_u64*() for 64-bit divisions Arnd Bergmann: - Not all architectures support get_user() with a 64-bit argument: ERROR: "__get_user_bad" [fs/f2fs/f2fs.ko] undefined! Use copy_from_user() here, this will always work. Signed-off-by: Qiuyang Sun Signed-off-by: Chao Yu Signed-off-by: Sahitya Tummala Signed-off-by: Geert Uytterhoeven Signed-off-by: Arnd Bergmann Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 3 +- fs/f2fs/debug.c | 7 ++ fs/f2fs/f2fs.h | 6 ++ fs/f2fs/file.c | 24 +++++++ fs/f2fs/gc.c | 182 ++++++++++++++++++++++++++++++++++++++++++++++++++- fs/f2fs/segment.c | 39 ++++++++++- fs/f2fs/super.c | 4 ++ 7 files changed, 260 insertions(+), 5 deletions(-) commit dbcdb61aaf1add3fb15f24f7fcbf30c17d5c11db Author: Petr Machata Date: Tue Jul 2 19:06:47 2019 +0000 mlxsw: spectrum_ptp: Fix validation in mlxsw_sp1_ptp_packet_finish() Before mlxsw_sp1_ptp_packet_finish() sends the packet back, it validates whether the corresponding port is still valid. However the condition is incorrect: when mlxsw_sp_port == NULL, the code dereferences the port to compare it to skb->dev. The condition needs to check whether the port is present and skb->dev still refers to that port (or else is NULL). If that does not hold, bail out. Add a pair of parentheses to fix the condition. Fixes: d92e4e6e33c8 ("mlxsw: spectrum: PTP: Support timestamping on Spectrum-1") Reported-by: Colin Ian King Signed-off-by: Petr Machata Signed-off-by: Colin Ian King Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 99f0eae653b2db64917d0b58099eb51e300b311d Author: David Howells Date: Tue Jul 2 16:04:19 2019 +0100 rxrpc: Fix oops in tracepoint If the rxrpc_eproto tracepoint is enabled, an oops will be cause by the trace line that rxrpc_extract_header() tries to emit when a protocol error occurs (typically because the packet is short) because the call argument is NULL. Fix this by using ?: to assume 0 as the debug_id if call is NULL. This can then be induced by: echo -e '\0\0\0\0\0\0\0\0' | ncat -4u --send-only 20001 where addr has the following program running on it: #include #include #include #include #include #include #include int main(void) { struct sockaddr_rxrpc srx; int fd; memset(&srx, 0, sizeof(srx)); srx.srx_family = AF_RXRPC; srx.srx_service = 0; srx.transport_type = AF_INET; srx.transport_len = sizeof(srx.transport.sin); srx.transport.sin.sin_family = AF_INET; srx.transport.sin.sin_port = htons(0x4e21); fd = socket(AF_RXRPC, SOCK_DGRAM, AF_INET6); bind(fd, (struct sockaddr *)&srx, sizeof(srx)); sleep(20); return 0; } It results in the following oops. BUG: kernel NULL pointer dereference, address: 0000000000000340 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page ... RIP: 0010:trace_event_raw_event_rxrpc_rx_eproto+0x47/0xac ... Call Trace: rxrpc_extract_header+0x86/0x171 ? rcu_read_lock_sched_held+0x5d/0x63 ? rxrpc_new_skb+0xd4/0x109 rxrpc_input_packet+0xef/0x14fc ? rxrpc_input_data+0x986/0x986 udp_queue_rcv_one_skb+0xbf/0x3d0 udp_unicast_rcv_skb.isra.8+0x64/0x71 ip_protocol_deliver_rcu+0xe4/0x1b4 ip_local_deliver+0xf0/0x154 __netif_receive_skb_one_core+0x50/0x6c netif_receive_skb_internal+0x26b/0x2e9 napi_gro_receive+0xf8/0x1da rtl8169_poll+0x303/0x4c4 net_rx_action+0x10e/0x333 __do_softirq+0x1a5/0x38f irq_exit+0x54/0xc4 do_IRQ+0xda/0xf8 common_interrupt+0xf/0xf ... ? cpuidle_enter_state+0x23c/0x34d cpuidle_enter+0x2a/0x36 do_idle+0x163/0x1ea cpu_startup_entry+0x1d/0x1f start_secondary+0x157/0x172 secondary_startup_64+0xa4/0xb0 Fixes: a25e21f0bcd2 ("rxrpc, afs: Use debug_ids rather than pointers in traces") Signed-off-by: David Howells Reviewed-by: Marc Dionne Signed-off-by: David S. Miller include/trace/events/rxrpc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c782e204f7343b6f4527e953a5ad265be4abd627 Author: Heiner Kallweit Date: Tue Jul 2 20:46:09 2019 +0200 r8169: add random MAC address fallback It was reported that the GPD MicroPC is broken in a way that no valid MAC address can be read from the network chip. The vendor driver deals with this by assigning a random MAC address as fallback. So let's do the same. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169_main.c | 40 +++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 13 deletions(-) commit 7424edbb559036ddf63eb7c655b3305d91b12dc9 Author: Heiner Kallweit Date: Tue Jul 2 07:59:17 2019 +0200 Revert "r8169: improve handling VLAN tag" This reverts commit 759d095741721888b6ee51afa74e0a66ce65e974. The patch was based on a misunderstanding. As Al Viro pointed out [0] it's simply wrong on big endian. So let's revert it. [0] https://marc.info/?t=156200975600004&r=1&w=2 Reported-by: Al Viro Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169_main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 78226f6eaac80bf30256a33a4926c194ceefdf36 Author: Phong Tran Date: Tue Jul 2 07:10:08 2019 +0700 net: usb: asix: init MAC address buffers This is for fixing bug KMSAN: uninit-value in ax88772_bind Tested by https://groups.google.com/d/msg/syzkaller-bugs/aFQurGotng4/eB_HlNhhCwAJ Reported-by: syzbot+8a3fc6674bbc3978ed4e@syzkaller.appspotmail.com syzbot found the following crash on: HEAD commit: f75e4cfe kmsan: use kmsan_handle_urb() in urb.c git tree: kmsan console output: https://syzkaller.appspot.com/x/log.txt?x=136d720ea00000 kernel config: https://syzkaller.appspot.com/x/.config?x=602468164ccdc30a dashboard link: https://syzkaller.appspot.com/bug?extid=8a3fc6674bbc3978ed4e compiler: clang version 9.0.0 (/home/glider/llvm/clang 06d00afa61eef8f7f501ebdb4e8612ea43ec2d78) syz repro: https://syzkaller.appspot.com/x/repro.syz?x=12788316a00000 C reproducer: https://syzkaller.appspot.com/x/repro.c?x=120359aaa00000 ================================================================== BUG: KMSAN: uninit-value in is_valid_ether_addr include/linux/etherdevice.h:200 [inline] BUG: KMSAN: uninit-value in asix_set_netdev_dev_addr drivers/net/usb/asix_devices.c:73 [inline] BUG: KMSAN: uninit-value in ax88772_bind+0x93d/0x11e0 drivers/net/usb/asix_devices.c:724 CPU: 0 PID: 3348 Comm: kworker/0:2 Not tainted 5.1.0+ #1 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: usb_hub_wq hub_event Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x191/0x1f0 lib/dump_stack.c:113 kmsan_report+0x130/0x2a0 mm/kmsan/kmsan.c:622 __msan_warning+0x75/0xe0 mm/kmsan/kmsan_instr.c:310 is_valid_ether_addr include/linux/etherdevice.h:200 [inline] asix_set_netdev_dev_addr drivers/net/usb/asix_devices.c:73 [inline] ax88772_bind+0x93d/0x11e0 drivers/net/usb/asix_devices.c:724 usbnet_probe+0x10f5/0x3940 drivers/net/usb/usbnet.c:1728 usb_probe_interface+0xd66/0x1320 drivers/usb/core/driver.c:361 really_probe+0xdae/0x1d80 drivers/base/dd.c:513 driver_probe_device+0x1b3/0x4f0 drivers/base/dd.c:671 __device_attach_driver+0x5b8/0x790 drivers/base/dd.c:778 bus_for_each_drv+0x28e/0x3b0 drivers/base/bus.c:454 __device_attach+0x454/0x730 drivers/base/dd.c:844 device_initial_probe+0x4a/0x60 drivers/base/dd.c:891 bus_probe_device+0x137/0x390 drivers/base/bus.c:514 device_add+0x288d/0x30e0 drivers/base/core.c:2106 usb_set_configuration+0x30dc/0x3750 drivers/usb/core/message.c:2027 generic_probe+0xe7/0x280 drivers/usb/core/generic.c:210 usb_probe_device+0x14c/0x200 drivers/usb/core/driver.c:266 really_probe+0xdae/0x1d80 drivers/base/dd.c:513 driver_probe_device+0x1b3/0x4f0 drivers/base/dd.c:671 __device_attach_driver+0x5b8/0x790 drivers/base/dd.c:778 bus_for_each_drv+0x28e/0x3b0 drivers/base/bus.c:454 __device_attach+0x454/0x730 drivers/base/dd.c:844 device_initial_probe+0x4a/0x60 drivers/base/dd.c:891 bus_probe_device+0x137/0x390 drivers/base/bus.c:514 device_add+0x288d/0x30e0 drivers/base/core.c:2106 usb_new_device+0x23e5/0x2ff0 drivers/usb/core/hub.c:2534 hub_port_connect drivers/usb/core/hub.c:5089 [inline] hub_port_connect_change drivers/usb/core/hub.c:5204 [inline] port_event drivers/usb/core/hub.c:5350 [inline] hub_event+0x48d1/0x7290 drivers/usb/core/hub.c:5432 process_one_work+0x1572/0x1f00 kernel/workqueue.c:2269 process_scheduled_works kernel/workqueue.c:2331 [inline] worker_thread+0x189c/0x2460 kernel/workqueue.c:2417 kthread+0x4b5/0x4f0 kernel/kthread.c:254 ret_from_fork+0x35/0x40 arch/x86/entry/entry_64.S:355 Signed-off-by: Phong Tran Signed-off-by: David S. Miller drivers/net/usb/asix_devices.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit cc5e92c22330aaf33b07c52db70ca80357b2cf4c Author: Martin Blumenstingl Date: Tue Jul 2 00:42:25 2019 +0200 net: stmmac: make "snps,reset-delays-us" optional again Commit 760f1dc2958022 ("net: stmmac: add sanity check to device_property_read_u32_array call") introduced error checking of the device_property_read_u32_array() call in stmmac_mdio_reset(). This results in the following error when the "snps,reset-delays-us" property is not defined in devicetree: invalid property snps,reset-delays-us This sanity check made sense until commit 84ce4d0f9f55b4 ("net: stmmac: initialize the reset delay array") ensured that there are fallback values for the reset delay if the "snps,reset-delays-us" property is absent. That was at the cost of making that property mandatory though. Drop the sanity check for device_property_read_u32_array() and thus make the "snps,reset-delays-us" property optional again (avoiding the error message while loading the stmmac driver with a .dtb where the property is absent). Fixes: 760f1dc2958022 ("net: stmmac: add sanity check to device_property_read_u32_array call") Signed-off-by: Martin Blumenstingl Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) commit b8bd72d3171b51bcc2c992f6f4c475949c21a2d0 Author: Eric Dumazet Date: Mon Jul 1 10:48:51 2019 -0700 bonding/main: fix NULL dereference in bond_select_active_slave() A bonding master can be up while best_slave is NULL. [12105.636318] BUG: unable to handle kernel NULL pointer dereference at 0000000000000000 [12105.638204] mlx4_en: eth1: Linkstate event 1 -> 1 [12105.648984] IP: bond_select_active_slave+0x125/0x250 [12105.653977] PGD 0 P4D 0 [12105.656572] Oops: 0000 [#1] SMP PTI [12105.660487] gsmi: Log Shutdown Reason 0x03 [12105.664620] Modules linked in: kvm_intel loop act_mirred uhaul vfat fat stg_standard_ftl stg_megablocks stg_idt stg_hdi stg elephant_dev_num stg_idt_eeprom w1_therm wire i2c_mux_pca954x i2c_mux mlx4_i2c i2c_usb cdc_acm ehci_pci ehci_hcd i2c_iimc mlx4_en mlx4_ib ib_uverbs ib_core mlx4_core [last unloaded: kvm_intel] [12105.685686] mlx4_core 0000:03:00.0: dispatching link up event for port 2 [12105.685700] mlx4_en: eth2: Linkstate event 2 -> 1 [12105.685700] mlx4_en: eth2: Link Up (linkstate) [12105.724452] Workqueue: bond0 bond_mii_monitor [12105.728854] RIP: 0010:bond_select_active_slave+0x125/0x250 [12105.734355] RSP: 0018:ffffaf146a81fd88 EFLAGS: 00010246 [12105.739637] RAX: 0000000000000003 RBX: ffff8c62b03c6900 RCX: 0000000000000000 [12105.746838] RDX: 0000000000000000 RSI: ffffaf146a81fd08 RDI: ffff8c62b03c6000 [12105.754054] RBP: ffffaf146a81fdb8 R08: 0000000000000001 R09: ffff8c517d387600 [12105.761299] R10: 00000000001075d9 R11: ffffffffaceba92f R12: 0000000000000000 [12105.768553] R13: ffff8c8240ae4800 R14: 0000000000000000 R15: 0000000000000000 [12105.775748] FS: 0000000000000000(0000) GS:ffff8c62bfa40000(0000) knlGS:0000000000000000 [12105.783892] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [12105.789716] CR2: 0000000000000000 CR3: 0000000d0520e001 CR4: 00000000001626f0 [12105.796976] Call Trace: [12105.799446] [] bond_mii_monitor+0x497/0x6f0 [12105.805317] [] process_one_work+0x143/0x370 [12105.811225] [] worker_thread+0x4a/0x360 [12105.816761] [] kthread+0x105/0x140 [12105.821865] [] ? rescuer_thread+0x380/0x380 [12105.827757] [] ? kthread_associate_blkcg+0xc0/0xc0 [12105.834266] [] ret_from_fork+0x51/0x60 Fixes: e2a7420df2e0 ("bonding/main: convert to using slave printk macros") Signed-off-by: Eric Dumazet Reported-by: John Sperbeck Cc: Jarod Wilson CC: Jay Vosburgh CC: Veaceslav Falico CC: Andy Gospodarek Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 99465f12babd4f3d5659b6c147bb5b9976dfe033 Author: Rafael J. Wysocki Date: Mon Jul 1 12:55:43 2019 +0200 ACPI: PM: Drop unused function and function header Remove a leftover function header and a static inline stub with no users from the ACPI header file. Signed-off-by: Rafael J. Wysocki Reviewed-by: Mika Westerberg Reviewed-by: Hans de Goede include/linux/acpi.h | 2 -- 1 file changed, 2 deletions(-) commit c95b7595f85c688d5c569ddbbd6ab6a4bdae2f36 Author: Rafael J. Wysocki Date: Mon Jul 1 12:54:29 2019 +0200 ACPI: PM: Introduce "poweroff" callbacks for ACPI PM domain and LPSS In general, it is not correct to call pm_generic_suspend(), pm_generic_suspend_late() and pm_generic_suspend_noirq() during the hibernation's "poweroff" transition, because device drivers may provide special callbacks to be invoked then and the wrappers in question cause system suspend callbacks to be run. Unfortunately, that happens in the ACPI PM domain and ACPI LPSS. To address this potential issue, introduce "poweroff" callbacks for the ACPI PM and LPSS that will use pm_generic_poweroff(), pm_generic_poweroff_late() and pm_generic_poweroff_noirq() as appropriate. Fixes: 05087360fd7a (ACPI / PM: Take SMART_SUSPEND driver flag into account) Signed-off-by: Rafael J. Wysocki Reviewed-by: Mika Westerberg Reviewed-by: Hans de Goede drivers/acpi/acpi_lpss.c | 50 ++++++++++++++++++++++++++++++++++++++--- drivers/acpi/device_pm.c | 58 +++++++++++++++++++++++++++++++++++++++++++++--- include/linux/acpi.h | 2 ++ 3 files changed, 104 insertions(+), 6 deletions(-) commit 3cd7957e85e67120bb9f6bfb75d81dcc19af282b Author: Rafael J. Wysocki Date: Mon Jul 1 12:54:10 2019 +0200 ACPI: PM: Simplify and fix PM domain hibernation callbacks First, after a previous change causing all runtime-suspended devices in the ACPI PM domain (and ACPI LPSS devices) to be resumed before creating a snapshot image of memory during hibernation, it is not necessary to worry about the case in which them might be left in runtime-suspend any more, so get rid of the code related to that from ACPI PM domain and ACPI LPSS hibernation callbacks. Second, it is not correct to use pm_generic_resume_early() and acpi_subsys_resume_noirq() in hibernation "restore" callbacks (which currently happens in the ACPI PM domain and ACPI LPSS), so introduce proper _restore_late and _restore_noirq callbacks for the ACPI PM domain and ACPI LPSS. Fixes: 05087360fd7a (ACPI / PM: Take SMART_SUSPEND driver flag into account) Signed-off-by: Rafael J. Wysocki Reviewed-by: Mika Westerberg Reviewed-by: Hans de Goede drivers/acpi/acpi_lpss.c | 61 +++++++++++++++++++++++++++++++++++++++++------- drivers/acpi/device_pm.c | 61 +++++++----------------------------------------- include/linux/acpi.h | 10 -------- 3 files changed, 61 insertions(+), 71 deletions(-) commit a78ae45a795aa579efa4094729073bbdab02da25 Author: Rafael J. Wysocki Date: Mon Jul 1 12:46:45 2019 +0200 PCI: PM: Simplify bus-level hibernation callbacks After a previous change causing all runtime-suspended PCI devices to be resumed before creating a snapshot image of memory during hibernation, it is not necessary to worry about the case in which them might be left in runtime-suspend any more, so get rid of the code related to that from bus-level PCI hibernation callbacks. Signed-off-by: Rafael J. Wysocki Reviewed-by: Mika Westerberg Reviewed-by: Hans de Goede drivers/pci/pci-driver.c | 27 --------------------------- 1 file changed, 27 deletions(-) commit 501debd4aa5edc755037c39ea5a8fba23b41e580 Author: Rafael J. Wysocki Date: Mon Jul 1 12:44:25 2019 +0200 PM: ACPI/PCI: Resume all devices during hibernation Both the PCI bus type and the ACPI PM domain avoid resuming runtime-suspended devices with DPM_FLAG_SMART_SUSPEND set during hibernation (before creating the snapshot image of system memory), but that turns out to be a mistake. It leads to functional issues and adds complexity that's hard to justify. For this reason, resume all runtime-suspended PCI devices and all devices in the ACPI PM domains before creating a snapshot image of system memory during hibernation. Fixes: 05087360fd7a (ACPI / PM: Take SMART_SUSPEND driver flag into account) Fixes: c4b65157aeef (PCI / PM: Take SMART_SUSPEND driver flag into account) Link: https://lore.kernel.org/linux-acpi/917d4399-2e22-67b1-9d54-808561f9083f@uwyo.edu/T/#maf065fe6e4974f2a9d79f332ab99dfaba635f64c Reported-by: Robert R. Howell Tested-by: Robert R. Howell Signed-off-by: Rafael J. Wysocki Reviewed-by: Mika Westerberg Reviewed-by: Hans de Goede drivers/acpi/device_pm.c | 13 +++++++------ drivers/pci/pci-driver.c | 16 ++++++++-------- 2 files changed, 15 insertions(+), 14 deletions(-) commit d2c3a4ba25fbfb6b2c7b5fe423be1b287954cd4c Author: Xin Long Date: Tue Jul 2 00:57:19 2019 +0800 tipc: remove ub->ubsock checks Both tipc_udp_enable and tipc_udp_disable are called under rtnl_lock, ub->ubsock could never be NULL in tipc_udp_disable and cleanup_bearer, so remove the check. Also remove the one in tipc_udp_enable by adding "free" label. Signed-off-by: Xin Long Signed-off-by: David S. Miller net/tipc/udp_media.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit 96fcaf86c3cb9340015fb475d79ef0a6fcf858ed Author: Gabriel Krisman Bertazi Date: Tue Jul 2 17:53:22 2019 -0400 ext4: fix coverity warning on error path of filename setup Fix the following coverity warning reported by Dan Carpenter: fs/ext4/namei.c:1311 ext4_fname_setup_ci_filename() warn: 'cf_name->len' unsigned <= 0 Fixes: 3ae72562ad91 ("ext4: optimize case-insensitive lookups") Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Theodore Ts'o Reported-by: Dan Carpenter fs/ext4/namei.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 8756a25b07e6fe878c1a3a40e71a322b18ba57af Author: Hans de Goede Date: Mon Jul 1 18:58:13 2019 +0200 libata: Drop firmware version check from the ST1000LM024 quirk There are several firmware versions between version 2AR10001 and 2BA30001, presumably these also have broken FPDMA_AA activation, so lets play it safe and apply the quirk to all firmware versions. Suggested-by: Martin K. Petersen Reviewed-by: Martin K. Petersen Signed-off-by: Hans de Goede Signed-off-by: Jens Axboe drivers/ata/libata-core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 78e9605d4fdde6d58b2e6db5b6b52dde7f92333e Author: Kimberly Brown Date: Tue Jul 2 17:38:55 2019 -0400 ext4: replace ktype default_attrs with default_groups The kobj_type default_attrs field is being replaced by the default_groups field. Replace the default_attrs field in ext4_sb_ktype and ext4_feat_ktype with default_groups. Use the ATTRIBUTE_GROUPS macro to create ext4_groups and ext4_feat_groups. Signed-off-by: Kimberly Brown Signed-off-by: Theodore Ts'o fs/ext4/sysfs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit c4683cd5fb243894a3de2d9ba2e0570ab339920c Author: Marek Majkowski Date: Tue Jun 4 13:20:50 2019 +0200 um: Fix kcov crash during startup Kcov fails to start when compiled with kcov. Disable KCOV on arch/uml/kernel/skas. $ gdb -q -ex r ./vmlinux Program received signal SIGSEGV, Segmentation fault. check_kcov_mode (t=<>, needed_mode=<>) at kernel/kcov.c:70 70 mode = READ_ONCE(t->kcov_mode); Signed-off-by: Marek Majkowski Signed-off-by: Richard Weinberger arch/um/kernel/skas/Makefile | 2 ++ 1 file changed, 2 insertions(+) commit 80b81cdc66eda3dbb3d83155e6454cfd42b4a5dd Author: Krzysztof Kozlowski Date: Tue Jun 4 09:59:53 2019 +0200 um: configs: Remove useless UEVENT_HELPER_PATH Remove the CONFIG_UEVENT_HELPER_PATH because: 1. It is disabled since commit 1be01d4a5714 ("driver: base: Disable CONFIG_UEVENT_HELPER by default") as its dependency (UEVENT_HELPER) was made default to 'n', 2. It is not recommended (help message: "This should not be used today [...] creates a high system load") and was kept only for ancient userland, 3. Certain userland specifically requests it to be disabled (systemd README: "Legacy hotplug slows down the system and confuses udev"). Signed-off-by: Krzysztof Kozlowski Acked-by: Geert Uytterhoeven Signed-off-by: Richard Weinberger arch/um/configs/i386_defconfig | 1 - arch/um/configs/x86_64_defconfig | 1 - 2 files changed, 2 deletions(-) commit 065038706f77a56754e8f0c2556dab7e22dfe577 Author: Johannes Berg Date: Mon May 27 10:34:27 2019 +0200 um: Support time travel mode Sometimes it can be useful to run with "time travel" inside the UML instance, for example for testing. For example, some tests for the wireless subsystem and userspace are based on hwsim, a virtual wireless adapter. Some tests can take a long time to run because they e.g. wait for 120 seconds to elapse for some regulatory checks. This obviously goes faster if it need not actually wait that long, but time inside the test environment just "bumps up" when there's nothing to do. Add CONFIG_UML_TIME_TRAVEL_SUPPORT to enable code to support such modes at runtime, selected on the command line: * just "time-travel", in which time inside the UML instance can move faster than real time, if there's nothing to do * "time-travel=inf-cpu" in which time also moves slower and any CPU processing takes no time at all, which allows to implement consistent behaviour regardless of host CPU load (or speed) or debug overhead. An additional "time-travel-start=" parameter is also supported in this case to start the wall clock at this time (in unix epoch). With this enabled, the test mentioned above goes from a runtime of about 140 seconds (with startup overhead and all) to being CPU bound and finishing in 15 seconds (on my slow laptop). Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger arch/um/Kconfig | 12 +++ arch/um/include/shared/timer-internal.h | 46 ++++++++++++ arch/um/kernel/process.c | 42 ++++++++++- arch/um/kernel/skas/syscall.c | 11 +++ arch/um/kernel/time.c | 129 ++++++++++++++++++++++++++++++-- 5 files changed, 233 insertions(+), 7 deletions(-) commit c7c6f3b95303c7de5d52af56c902fcb5abe827df Author: Johannes Berg Date: Mon May 27 10:34:26 2019 +0200 um: Pass nsecs to os timer functions This makes the code clearer and lets the time travel patch have the actual time used for these functions in just one place. Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger arch/um/include/shared/os.h | 4 ++-- arch/um/kernel/time.c | 4 ++-- arch/um/os-Linux/time.c | 20 ++++++++------------ 3 files changed, 12 insertions(+), 16 deletions(-) commit b00bdd3244005a3a911339b3f977e5fbb21d0879 Author: Johannes Berg Date: Fri May 24 23:41:15 2019 +0200 um: Remove drivers/ssl.h This file just contains two unused prototypes, remove it. Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger arch/um/drivers/ssl.c | 1 - arch/um/drivers/ssl.h | 13 ------------- 2 files changed, 14 deletions(-) commit c7f04e87e444a4bdeced1b43ce961d31257414ab Author: Johannes Berg Date: Fri May 24 22:02:44 2019 +0200 um: Don't garbage collect in deactivate_all_fds() My previous commit didn't actually address the whole issue with lockdep shutdown, I had another local modification that disabled lockdep but that wasn't sufficient alone, so had to do the other change. Another issue remained though - during kfree() we acquire locks and lockdep tries to annotate those with exactly the same issue in the other patch - we no longer have "current". So, just remove the garbage collection. There's no value in it anyway since we're going to shut down anyway and marking a slab object as free is now not very useful anymore. Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger arch/um/kernel/irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 80bf6ceaf9310b3f61934c69b382d4912deee049 Author: Johannes Berg Date: Fri May 24 21:54:14 2019 +0200 um: Silence lockdep complaint about mmap_sem When we get into activate_mm(), lockdep complains that we're doing something strange: WARNING: possible circular locking dependency detected 5.1.0-10252-gb00152307319-dirty #121 Not tainted ------------------------------------------------------ inside.sh/366 is trying to acquire lock: (____ptrval____) (&(&p->alloc_lock)->rlock){+.+.}, at: flush_old_exec+0x703/0x8d7 but task is already holding lock: (____ptrval____) (&mm->mmap_sem){++++}, at: flush_old_exec+0x6c5/0x8d7 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&mm->mmap_sem){++++}: [...] __lock_acquire+0x12ab/0x139f lock_acquire+0x155/0x18e down_write+0x3f/0x98 flush_old_exec+0x748/0x8d7 load_elf_binary+0x2ca/0xddb [...] -> #0 (&(&p->alloc_lock)->rlock){+.+.}: [...] __lock_acquire+0x12ab/0x139f lock_acquire+0x155/0x18e _raw_spin_lock+0x30/0x83 flush_old_exec+0x703/0x8d7 load_elf_binary+0x2ca/0xddb [...] other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&mm->mmap_sem); lock(&(&p->alloc_lock)->rlock); lock(&mm->mmap_sem); lock(&(&p->alloc_lock)->rlock); *** DEADLOCK *** 2 locks held by inside.sh/366: #0: (____ptrval____) (&sig->cred_guard_mutex){+.+.}, at: __do_execve_file+0x12d/0x869 #1: (____ptrval____) (&mm->mmap_sem){++++}, at: flush_old_exec+0x6c5/0x8d7 stack backtrace: CPU: 0 PID: 366 Comm: inside.sh Not tainted 5.1.0-10252-gb00152307319-dirty #121 Stack: [...] Call Trace: [<600420de>] show_stack+0x13b/0x155 [<6048906b>] dump_stack+0x2a/0x2c [<6009ae64>] print_circular_bug+0x332/0x343 [<6009c5c6>] check_prev_add+0x669/0xdad [<600a06b4>] __lock_acquire+0x12ab/0x139f [<6009f3d0>] lock_acquire+0x155/0x18e [<604a07e0>] _raw_spin_lock+0x30/0x83 [<60151e6a>] flush_old_exec+0x703/0x8d7 [<601a8eb8>] load_elf_binary+0x2ca/0xddb [...] I think it's because in exec_mmap() we have down_read(&old_mm->mmap_sem); ... task_lock(tsk); ... activate_mm(active_mm, mm); (which does down_write(&mm->mmap_sem)) I'm not really sure why lockdep throws in the whole knowledge about the task lock, but it seems that old_mm and mm shouldn't ever be the same (and it doesn't deadlock) so tell lockdep that they're different. Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger arch/um/include/asm/mmu_context.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8eacd6fca4044f470fc2eb0552ce6b8eab977e6c Author: Johannes Berg Date: Fri May 24 21:37:00 2019 +0200 um: Remove locking in deactivate_all_fds() Not only does the locking contradict the comment, and as the comment says is pointless and actually harmful (all the actual OS threads have exited already), but it also causes crashes when lockdep is enabled, because calling into the spinlock calls into lockdep, which then tries to determine the current task, which no longer exists. Remove the locking to let UML shut down cleanly in case lockdep is enabled. Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger arch/um/kernel/irq.c | 3 --- 1 file changed, 3 deletions(-) commit 56fc187065451ebca74edb30d50de5f10a88339b Author: Johannes Berg Date: Mon May 6 14:39:38 2019 +0200 um: Timer code cleanup There are some unused functions, and some others that have unused arguments; clean up the timer code a bit. Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger arch/um/include/shared/os.h | 8 ++- arch/um/kernel/time.c | 4 +- arch/um/os-Linux/time.c | 119 ++++++++++---------------------------------- 3 files changed, 31 insertions(+), 100 deletions(-) commit fcd242c6c835dff4b5334b4db870f9fc23a8e7b7 Author: Johannes Berg Date: Mon May 6 14:39:37 2019 +0200 um: fix os_timer_one_shot() os_timer_one_shot() gets passed a value "unsigned long delta", so must not have an "int ticks" as that actually ends up being -1, and thus triggering a timer over and over again. Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger arch/um/include/shared/os.h | 2 +- arch/um/os-Linux/time.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit bebe4681d0e7e1be2608282dc86645728bc7f623 Author: Jouni Malinen Date: Mon May 6 14:39:35 2019 +0200 um: Fix IRQ controller regression on console read The conversion of UML to use epoll based IRQ controller claimed that clone_one_chan() can safely call um_free_irq() while starting to ignore the delay_free_irq parameter that explicitly noted that the IRQ cannot be freed because this is being called from chan_interrupt(). This resulted in free_irq() getting called in interrupt context ("Trying to free IRQ 6 from IRQ context!"). Fix this by restoring previously used delay_free_irq processing. Fixes: ff6a17989c08 ("Epoll based IRQ controller") Signed-off-by: Jouni Malinen Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger arch/um/drivers/chan_kern.c | 52 ++++++++++++++++++++++++++++++++++++++------- arch/um/kernel/irq.c | 4 ++++ 2 files changed, 48 insertions(+), 8 deletions(-) commit ba9e93c5faed906f1d11240e9e9024388f13e84a Author: Jack Xiao Date: Tue Jul 2 06:58:22 2019 +0000 drm/amdkfd: remove an unused variable Just for cleanup. Reviewed-by: Prike Liang Reviewed-by: Hawking Zhang Signed-off-by: Jack Xiao Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_device.c | 1 - 1 file changed, 1 deletion(-) commit bc389fd101e57b36aacfaec2df8fe479eabb44ea Merge: e835ada07091 7d8b16b9facb Author: David S. Miller Date: Tue Jul 2 14:12:30 2019 -0700 Merge branch 'macsec-fix-some-bugs-in-the-receive-path' Andreas Steinmetz says: ==================== macsec: fix some bugs in the receive path This series fixes some bugs in the receive path of macsec. The first is a use after free when processing macsec frames with a SecTAG that has the TCI E bit set but the C bit clear. In the 2nd bug, the driver leaves an invalid checksumming state after decrypting the packet. This is a combined effort of Sabrina Dubroca and me. ==================== Signed-off-by: David S. Miller commit 7d8b16b9facb0dd81d1469808dd9a575fa1d525a Author: Andreas Steinmetz Date: Sun Jun 30 22:46:45 2019 +0200 macsec: fix checksumming after decryption Fix checksumming after decryption. Signed-off-by: Andreas Steinmetz Signed-off-by: David S. Miller drivers/net/macsec.c | 1 + 1 file changed, 1 insertion(+) commit 095c02da80a41cf6d311c504d8955d6d1c2add10 Author: Andreas Steinmetz Date: Sun Jun 30 22:46:42 2019 +0200 macsec: fix use-after-free of skb during RX Fix use-after-free of skb when rx_handler returns RX_HANDLER_PASS. Signed-off-by: Andreas Steinmetz Acked-by: Willem de Bruijn Signed-off-by: David S. Miller drivers/net/macsec.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 885b8b4dbba5ca6114db0fcd0737fe2512650745 Author: Stefano Brivio Date: Sat Jun 29 19:55:08 2019 +0200 ipv4: Fix off-by-one in route dump counter without netlink strict checking In commit ee28906fd7a1 ("ipv4: Dump route exceptions if requested") I added a counter of per-node dumped routes (including actual routes and exceptions), analogous to the existing counter for dumped nodes. Dumping exceptions means we need to also keep track of how many routes are dumped for each node: this would be just one route per node, without exceptions. When netlink strict checking is not enabled, we dump both routes and exceptions at the same time: the RTM_F_CLONED flag is not used as a filter. In this case, the per-node counter 'i_fa' is incremented by one to track the single dumped route, then also incremented by one for each exception dumped, and then stored as netlink callback argument as skip counter, 's_fa', to be used when a partial dump operation restarts. The per-node counter needs to be increased by one also when we skip a route (exception) due to a previous non-zero skip counter, because it needs to match the existing skip counter, if we are dumping both routes and exceptions. I missed this, and only incremented the counter, for regular routes, if the previous skip counter was zero. This means that, in case of a mixed dump, partial dump operations after the first one will start with a mismatching skip counter value, one less than expected. This means in turn that the first exception for a given node is skipped every time a partial dump operation restarts, if netlink strict checking is not enabled (iproute < 5.0). It turns out I didn't repeat the test in its final version, commit de755a85130e ("selftests: pmtu: Introduce list_flush_ipv4_exception test case"), which also counts the number of route exceptions returned, with iproute2 versions < 5.0 -- I was instead using the equivalent of the IPv6 test as it was before commit b964641e9925 ("selftests: pmtu: Make list_flush_ipv6_exception test more demanding"). Always increment the per-node counter by one if we previously dumped a regular route, so that it matches the current skip counter. Fixes: ee28906fd7a1 ("ipv4: Dump route exceptions if requested") Signed-off-by: Stefano Brivio Signed-off-by: David S. Miller net/ipv4/fib_trie.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) commit cce581a0c3bed56252996112cda5652d90d9c028 Author: René van Dorst Date: Sat Jun 29 14:24:51 2019 +0200 net: ethernet: mediatek: Allow non TRGMII mode with MT7621 DDR2 devices No reason to error out on a MT7621 device with DDR2 memory when non TRGMII mode is selected. Only MT7621 DDR2 clock setup is not supported for TRGMII mode. But non TRGMII mode doesn't need any special clock setup. Signed-off-by: René van Dorst Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 843747253b427a579b360850e133f700b8bb5e0c Author: Alex Deucher Date: Tue Jul 2 11:39:50 2019 -0500 drm/amdgpu/display: fix interrupt client id for navi All asics newer than vega10 use client ids, so simplify the check. Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 2d0abe36cf13fb7b577949fd1539326adddcc9bc Author: Chuck Lever Date: Wed Jun 19 10:32:38 2019 -0400 xprtrdma: Fix use-after-free in rpcrdma_post_recvs Dereference wr->next /before/ the memory backing wr has been released. This issue was found by code inspection. It is not expected to be a significant problem because it is in an error path that is almost never executed. Fixes: 7c8d9e7c8863 ("xprtrdma: Move Receive posting to ... ") Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/verbs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 10694ac92c063681246a360a45019f05855ab755 Author: Chuck Lever Date: Wed Jun 19 10:32:32 2019 -0400 xprtrdma: Fix a BUG when tracing is enabled with NFSv4.1 on RDMA A backchannel reply does not set task->tk_client. Fixes: 0c77668ddb4e ("SUNRPC: Introduce trace points in ... ") Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker include/trace/events/rpcrdma.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c5cfcfcb54e7ab4b7ea9a755afd7131649d11331 Merge: 09fbca8e6240 c0cf5bdde46c Author: Jason Gunthorpe Date: Tue Jul 2 16:57:54 2019 -0300 Merge branch 'siw' into rdma.git for-next Bernard Metzler says: ==================== This patch set contributes the SoftiWarp driver rebased for latest rdma-next. SoftiWarp (siw) implements the iWarp RDMA protocol over kernel TCP sockets. The driver integrates with the linux-rdma framework. A matching userlevel driver is available as PR at https://github.com/linux-rdma/rdma-core/pull/536 Many thanks for reviewing and testing the driver, especially to Leon, Jason, Steve, Doug, Olga, Dennis, Gal. You all helped to significantly improve the driver over the last year. Please find below a list of changes and comments, compared to older versions of the siw driver. Many thanks! Bernard. CHANGES: ======== v3 (this version) ----------------- - Rebased to rdma-next - Removed unneccessary initialization of enums in siw-abi.h - Added comment on sizing of all work queues to power of two. v2 ----------------- - Changed recieve path CRC calculation to compute CRC32c not on target buffer after placement, but on original skbuf. This change severely hurts performance, if CRC is switched on, since skb must now be walked twice. It is planned to work on an extension to skb_copy_bits() to fold in CRC computation. - Moved debugging to using ibdev_dbg(). - Dropped detailed packet debug printing. - Removed siw_debug.[ch] files. - Removed resource tracking, code now relies on restrack of RDMA midlayer. Only object counting to enforce reported device limits is left in place. - Removed all nested switch-case statements. - Cleaned up header file #include's - Moved CQ create/destroy to new semantics, where midlayer creates/destroys containing object. - Set siw's ABI version to 1 (was 0 before) - Removed all enum initialization where not needed. - Fixed MAINTANERS entry for siw driver - This version stays with the current siw specific management of user memory (siw_umem_get() vs. ib_umem_get(), etc.). This, since the current ib_umem implementation is less efficient for user page lookup on the fast path, where effciency is important for a SW RDMA driver. It is planned to contribute enhancements to the ib_umem framework, wich makes it suitable for SW drivers as well. v1 (first version after v9 of siw RFC) -------------------------------------- - Rebased to 5.2-rc1 - All IDR code got removed. - Both MR and QP deallocation verbs now synchronously free the resources referenced by the RDMA mid-layer. - IPv6 support was added. - For compatibility with Chelsio iWarp hardware, the RX path was slightly reworked. It now allows packet intersection between tagged and untagged RDMAP operations. While not a defined behavior as of IETF RFC 5040/5041, some RDMA hardware may intersect an ongoing outbound (large) tagged message, such as an multisegment RDMA Read Response with sending an untagged message, such as an RDMA Send frame. This behavior was only detected in an NVMeF setup, where siw was used at target side, and RDMA hardware at client side (during file write). siw now implements two input paths for tagged and untagged messages each, and allows the intersected placement of both messages. - The siw kernel abi file got renamed from siw_user.h to siw-abi.h. ==================== * branch 'siw': SIW addition to kernel build environment SIW completion queue methods SIW receive path SIW transmit path SIW queue pair methods SIW application buffer management SIW application interface SIW connection management SIW network and RDMA core interface SIW main include file iWarp wire packet format commit c0cf5bdde46c664d583518addc19d6dabb6a8ec9 Author: Bernard Metzler Date: Thu Jun 20 18:21:33 2019 +0200 rdma/siw: addition to kernel build environment Broken up commit to add the Soft iWarp RDMA driver. Signed-off-by: Bernard Metzler Signed-off-by: Jason Gunthorpe MAINTAINERS | 7 +++++++ drivers/infiniband/Kconfig | 1 + drivers/infiniband/sw/Makefile | 1 + drivers/infiniband/sw/siw/Kconfig | 17 +++++++++++++++++ drivers/infiniband/sw/siw/Makefile | 11 +++++++++++ 5 files changed, 37 insertions(+) commit b0fff7317bb4325ace221a24c4bfa274f0046ee4 Author: Bernard Metzler Date: Thu Jun 20 18:21:32 2019 +0200 rdma/siw: completion queue methods Broken up commit to add the Soft iWarp RDMA driver. Signed-off-by: Bernard Metzler Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/siw/siw_cq.c | 101 +++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) commit 8b6a361b8c482f22ac99c3273285ff16b23fba91 Author: Bernard Metzler Date: Thu Jun 20 18:21:31 2019 +0200 rdma/siw: receive path Broken up commit to add the Soft iWarp RDMA driver. Signed-off-by: Bernard Metzler Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/siw/siw_qp_rx.c | 1456 +++++++++++++++++++++++++++++++++ 1 file changed, 1456 insertions(+) commit b9be6f18cf9ed04dd8087cb9d69de6e90d8ceb08 Author: Bernard Metzler Date: Thu Jun 20 18:21:30 2019 +0200 rdma/siw: transmit path Broken up commit to add the Soft iWarp RDMA driver. Signed-off-by: Bernard Metzler Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/siw/siw_qp_tx.c | 1269 +++++++++++++++++++++++++++++++++ 1 file changed, 1269 insertions(+) commit f29dd55b0236f7a26a4b9dd69186e3c04266797b Author: Bernard Metzler Date: Thu Jun 20 18:21:29 2019 +0200 rdma/siw: queue pair methods Broken up commit to add the Soft iWarp RDMA driver. Signed-off-by: Bernard Metzler Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/siw/siw_qp.c | 1322 ++++++++++++++++++++++++++++++++++++ 1 file changed, 1322 insertions(+) commit 2251334dcac9eb337575d8767e2a6a7e81848f7f Author: Bernard Metzler Date: Thu Jun 20 18:21:28 2019 +0200 rdma/siw: application buffer management Broken up commit to add the Soft iWarp RDMA driver. Signed-off-by: Bernard Metzler Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/siw/siw_mem.c | 460 ++++++++++++++++++++++++++++++++++++ drivers/infiniband/sw/siw/siw_mem.h | 74 ++++++ 2 files changed, 534 insertions(+) commit 303ae1cdfdf7280ff4cfbbe65563b5ff15bb025b Author: Bernard Metzler Date: Thu Jun 20 18:21:27 2019 +0200 rdma/siw: application interface Broken up commit to add the Soft iWarp RDMA driver. Signed-off-by: Bernard Metzler Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/siw/siw_verbs.c | 1760 ++++++++++++++++++++++++++++++ drivers/infiniband/sw/siw/siw_verbs.h | 91 ++ include/uapi/rdma/rdma_user_ioctl_cmds.h | 1 + include/uapi/rdma/siw-abi.h | 185 ++++ 4 files changed, 2037 insertions(+) commit 6c52fdc244b5ccc468006fd65a504d4ee33743c7 Author: Bernard Metzler Date: Thu Jun 20 18:21:26 2019 +0200 rdma/siw: connection management Broken up commit to add the Soft iWarp RDMA driver. Signed-off-by: Bernard Metzler Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/siw/siw_cm.c | 2072 ++++++++++++++++++++++++++++++++++++ drivers/infiniband/sw/siw/siw_cm.h | 133 +++ 2 files changed, 2205 insertions(+) commit bdcf26bf9b3acb03c8f90387cfc6474fc8ac5521 Author: Bernard Metzler Date: Thu Jun 20 18:21:25 2019 +0200 rdma/siw: network and RDMA core interface Broken up commit to add the Soft iWarp RDMA driver. Signed-off-by: Bernard Metzler Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/siw/siw_main.c | 687 +++++++++++++++++++++++++++++++++++ 1 file changed, 687 insertions(+) commit a531975279f3e5dd7323da09077ec848067bb313 Author: Bernard Metzler Date: Thu Jun 20 18:21:24 2019 +0200 rdma/siw: main include file Broken up commit to add the Soft iWarp RDMA driver. Signed-off-by: Bernard Metzler Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/siw/siw.h | 745 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 745 insertions(+) commit 54fa16ee532705985e6c946da455856f18f63ee1 Author: Mike Snitzer Date: Tue Jul 2 15:50:08 2019 -0400 dm thin metadata: check if in fail_io mode when setting needs_check Check if in fail_io mode at start of dm_pool_metadata_set_needs_check(). Otherwise dm_pool_metadata_set_needs_check()'s superblock_lock() can crash in dm_bm_write_lock() while accessing the block manager object that was previously destroyed as part of a failed dm_pool_abort_metadata() that ultimately set fail_io to begin with. Also, update DMERR() message to more accurately describe superblock_lock() failure. Cc: stable@vger.kernel.org Reported-by: Zdenek Kabelac Signed-off-by: Mike Snitzer drivers/md/dm-thin-metadata.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 0e935ae6afcdbe6f0c0aa457ae57feccc63bb9be Author: Bernard Metzler Date: Thu Jun 20 18:21:23 2019 +0200 rdma/siw: iWarp wire packet format Broken up commit to add the Soft iWarp RDMA driver. Signed-off-by: Bernard Metzler Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/siw/iwarp.h | 380 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 380 insertions(+) commit f4fb8a97dc903cc278feb45cff55622e25360b89 Author: YueHaibing Date: Tue Jul 2 21:12:33 2019 +0800 kselftests: cgroup: remove duplicated include from test_freezer.c Remove duplicated include. Signed-off-by: YueHaibing Signed-off-by: Shuah Khan tools/testing/selftests/cgroup/test_freezer.c | 1 - 1 file changed, 1 deletion(-) commit 7451c54abc9139585492605d9e91dec2d26c6457 Author: Hariprasad Kelam Date: Tue Jul 2 23:17:24 2019 +0530 ecryptfs: Change return type of ecryptfs_process_flags Change return type of ecryptfs_process_flags from int to void as it never fails. fixes below issue reported by coccicheck s/ecryptfs/crypto.c:870:5-7: Unneeded variable: "rc". Return "0" on line 883 Signed-off-by: Hariprasad Kelam [tyhicks: Remove the return value line from the function documentation] Signed-off-by: Tyler Hicks fs/ecryptfs/crypto.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) commit e835ada07091f40dcfb1bc735082bd0a7c005e59 Author: David Howells Date: Tue Jul 2 15:59:12 2019 +0100 rxrpc: Fix send on a connected, but unbound socket If sendmsg() or sendmmsg() is called on a connected socket that hasn't had bind() called on it, then an oops will occur when the kernel tries to connect the call because no local endpoint has been allocated. Fix this by implicitly binding the socket if it is in the RXRPC_CLIENT_UNBOUND state, just like it does for the RXRPC_UNBOUND state. Further, the state should be transitioned to RXRPC_CLIENT_BOUND after this to prevent further attempts to bind it. This can be tested with: #include #include #include #include #include #include static const unsigned char inet6_addr[16] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, 0xac, 0x14, 0x14, 0xaa }; int main(void) { struct sockaddr_rxrpc srx; struct cmsghdr *cm; struct msghdr msg; unsigned char control[16]; int fd; memset(&srx, 0, sizeof(srx)); srx.srx_family = 0x21; srx.srx_service = 0; srx.transport_type = AF_INET; srx.transport_len = 0x1c; srx.transport.sin6.sin6_family = AF_INET6; srx.transport.sin6.sin6_port = htons(0x4e22); srx.transport.sin6.sin6_flowinfo = htons(0x4e22); srx.transport.sin6.sin6_scope_id = htons(0xaa3b); memcpy(&srx.transport.sin6.sin6_addr, inet6_addr, 16); cm = (struct cmsghdr *)control; cm->cmsg_len = CMSG_LEN(sizeof(unsigned long)); cm->cmsg_level = SOL_RXRPC; cm->cmsg_type = RXRPC_USER_CALL_ID; *(unsigned long *)CMSG_DATA(cm) = 0; msg.msg_name = NULL; msg.msg_namelen = 0; msg.msg_iov = NULL; msg.msg_iovlen = 0; msg.msg_control = control; msg.msg_controllen = cm->cmsg_len; msg.msg_flags = 0; fd = socket(AF_RXRPC, SOCK_DGRAM, AF_INET); connect(fd, (struct sockaddr *)&srx, sizeof(srx)); sendmsg(fd, &msg, 0); return 0; } Leading to the following oops: BUG: kernel NULL pointer dereference, address: 0000000000000018 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page ... RIP: 0010:rxrpc_connect_call+0x42/0xa01 ... Call Trace: ? mark_held_locks+0x47/0x59 ? __local_bh_enable_ip+0xb6/0xba rxrpc_new_client_call+0x3b1/0x762 ? rxrpc_do_sendmsg+0x3c0/0x92e rxrpc_do_sendmsg+0x3c0/0x92e rxrpc_sendmsg+0x16b/0x1b5 sock_sendmsg+0x2d/0x39 ___sys_sendmsg+0x1a4/0x22a ? release_sock+0x19/0x9e ? reacquire_held_locks+0x136/0x160 ? release_sock+0x19/0x9e ? find_held_lock+0x2b/0x6e ? __lock_acquire+0x268/0xf73 ? rxrpc_connect+0xdd/0xe4 ? __local_bh_enable_ip+0xb6/0xba __sys_sendmsg+0x5e/0x94 do_syscall_64+0x7d/0x1bf entry_SYSCALL_64_after_hwframe+0x49/0xbe Fixes: 2341e0775747 ("rxrpc: Simplify connect() implementation and simplify sendmsg() op") Reported-by: syzbot+7966f2a0b2c7da8939b4@syzkaller.appspotmail.com Signed-off-by: David Howells Reviewed-by: Marc Dionne Signed-off-by: David S. Miller net/rxrpc/af_rxrpc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3427beb6375d04e9627c67343872e79341a684ea Author: David Howells Date: Tue Jul 2 15:55:28 2019 +0100 rxrpc: Fix uninitialized error code in rxrpc_send_data_packet() With gcc 4.1: net/rxrpc/output.c: In function ‘rxrpc_send_data_packet’: net/rxrpc/output.c:338: warning: ‘ret’ may be used uninitialized in this function Indeed, if the first jump to the send_fragmentable label is made, and the address family is not handled in the switch() statement, ret will be used uninitialized. Fix this by BUG()'ing as is done in other places in rxrpc where internal support for future address families will need adding. It should not be possible to reach this normally as the address families are checked up-front. Fixes: 5a924b8951f835b5 ("rxrpc: Don't store the rxrpc header in the Tx queue sk_buffs") Reported-by: Geert Uytterhoeven Signed-off-by: David Howells Signed-off-by: David S. Miller net/rxrpc/output.c | 3 +++ 1 file changed, 3 insertions(+) commit 488c3bf7ece89e47887607863207021283e37828 Author: Andi Kleen Date: Fri Jun 28 15:07:37 2019 -0700 perf tools metric: Don't include duration_time in group The Memory_BW metric generates groups including duration_time, which maps to a software event. For some reason this makes the group always not count. Always put duration_time outside a group when generating metrics. It's always the same time, so no need to group it. Signed-off-by: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190628220737.13259-3-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/metricgroup.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) commit 9c344d15f5783260f57c711f3fce72dd744bebe2 Author: Andi Kleen Date: Fri Jun 28 15:07:36 2019 -0700 perf list: Avoid extra : for --raw metrics When printing the metrics raw, don't print : after the metricgroups. This helps the command line completion to complete those too. Signed-off-by: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190628220737.13259-2-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/metricgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4df79ba3eb1b82e2939fb984b36a0e71bbed611b Author: Andi Kleen Date: Fri Jun 28 15:07:35 2019 -0700 perf vendor events intel: Metric fixes for SKX/CLX - Add a missing filter for the DRAM_Latency / DRAM_Parallel_Reads metrics - Remove the useless PMM_* metrics from Skylake Signed-off-by: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190628220737.13259-1-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo .../arch/x86/cascadelakex/clx-metrics.json | 4 ++-- .../pmu-events/arch/x86/skylakex/skx-metrics.json | 22 ++-------------------- 2 files changed, 4 insertions(+), 22 deletions(-) commit 734ac47e23aee12e1c16a4dd52d7c1cb893eaf6c Author: Andi Kleen Date: Fri Jun 28 15:09:00 2019 -0700 perf tools: Fix typos / broken sentences - Fix a typo in the man page - Fix a tip that doesn't make any sense. Signed-off-by: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190628220900.13741-1-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-report.txt | 2 +- tools/perf/Documentation/tips.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit edd93a4076cf18ede423c167de6d6fb8e4211e7b Author: John Garry Date: Fri Jun 28 22:35:52 2019 +0800 perf jevents: Add support for Hisi hip08 L3C PMU aliasing Add support for Hisi hip08 L3C PMU aliasing. The kernel driver is in drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c Signed-off-by: John Garry Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ben Hutchings Cc: Hendrik Brueckner Cc: Kan Liang Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Shaokun Zhang Cc: Thomas Richter Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Cc: linuxarm@huawei.com Link: http://lkml.kernel.org/r/1561732552-143038-5-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo .../arch/arm64/hisilicon/hip08/uncore-l3c.json | 37 ++++++++++++++++++++++ tools/perf/pmu-events/jevents.c | 1 + 2 files changed, 38 insertions(+) commit 8f5b703add99473b59b4a38a6b66afbafc29d92e Author: John Garry Date: Fri Jun 28 22:35:51 2019 +0800 perf jevents: Add support for Hisi hip08 HHA PMU aliasing Add support for Hisi hip08 HHA PMU aliasing. The kernel driver is in drivers/perf/hisilicon/hisi_uncore_hha_pmu.c Signed-off-by: John Garry Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ben Hutchings Cc: Hendrik Brueckner Cc: Kan Liang Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Shaokun Zhang Cc: Thomas Richter Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Cc: linuxarm@huawei.com Link: http://lkml.kernel.org/r/1561732552-143038-4-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo .../arch/arm64/hisilicon/hip08/uncore-hha.json | 51 ++++++++++++++++++++++ tools/perf/pmu-events/jevents.c | 1 + 2 files changed, 52 insertions(+) commit 57cc732479bac2a3cbd759fb07188657c871d5c1 Author: John Garry Date: Fri Jun 28 22:35:50 2019 +0800 perf jevents: Add support for Hisi hip08 DDRC PMU aliasing Add support for Hisi hip08 DDRC PMU aliasing. We can now do something like this: $perf list [snip] uncore ddrc: uncore_hisi_ddrc.act_cmd [DDRC active commands. Unit: hisi_sccl,ddrc] uncore_hisi_ddrc.flux_rcmd [DDRC read commands. Unit: hisi_sccl,ddrc] uncore_hisi_ddrc.flux_wcmd [DDRC write commands. Unit: hisi_sccl,ddrc] uncore_hisi_ddrc.flux_wr [DDRC precharge commands. Unit: hisi_sccl,ddrc] uncore_hisi_ddrc.rnk_chg [DDRC rank commands. Unit: hisi_sccl,ddrc] uncore_hisi_ddrc.rw_chg [DDRC read and write changes. Unit: hisi_sccl,ddrc] Performance counter stats for 'system wide': 0 uncore_hisi_ddrc.flux_rcmd [hisi_sccl1_ddrc0] 0 uncore_hisi_ddrc.flux_rcmd [hisi_sccl3_ddrc1] 0 uncore_hisi_ddrc.flux_rcmd [hisi_sccl5_ddrc2] 0 uncore_hisi_ddrc.flux_rcmd [hisi_sccl7_ddrc3] 0 uncore_hisi_ddrc.flux_rcmd [hisi_sccl5_ddrc0] 0 uncore_hisi_ddrc.flux_rcmd [hisi_sccl7_ddrc1] 0 uncore_hisi_ddrc.flux_rcmd [hisi_sccl1_ddrc3] 0 uncore_hisi_ddrc.flux_rcmd [hisi_sccl1_ddrc1] 0 uncore_hisi_ddrc.flux_rcmd [hisi_sccl3_ddrc2] 0 uncore_hisi_ddrc.flux_rcmd [hisi_sccl5_ddrc3] 0 uncore_hisi_ddrc.flux_rcmd [hisi_sccl3_ddrc0] 0 uncore_hisi_ddrc.flux_rcmd [hisi_sccl5_ddrc1] 0 uncore_hisi_ddrc.flux_rcmd [hisi_sccl7_ddrc2] 0 uncore_hisi_ddrc.flux_rcmd [hisi_sccl7_ddrc0] 20,421 uncore_hisi_ddrc.flux_rcmd [hisi_sccl1_ddrc2] 0 uncore_hisi_ddrc.flux_rcmd [hisi_sccl3_ddrc3] 1.001559011 seconds time elapsed The kernel driver is in drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c Signed-off-by: John Garry Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ben Hutchings Cc: Hendrik Brueckner Cc: Kan Liang Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Shaokun Zhang Cc: Thomas Richter Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Cc: linuxarm@huawei.com Link: http://lkml.kernel.org/r/1561732552-143038-3-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo .../arch/arm64/hisilicon/hip08/uncore-ddrc.json | 44 ++++++++++++++++++++++ tools/perf/pmu-events/jevents.c | 1 + 2 files changed, 45 insertions(+) commit 730670b1d108c4a8aa1924762738ca38593ee44c Author: John Garry Date: Fri Jun 28 22:35:49 2019 +0800 perf pmu: Support more complex PMU event aliasing The jevent "Unit" field is used for uncore PMU alias definition. The form uncore_pmu_example_X is supported, where "X" is a wildcard, to support multiple instances of the same PMU in a system. Unfortunately this format not suitable for all uncore PMUs; take the Hisi DDRC uncore PMU for example, where the name is in the form hisi_scclX_ddrcY. For for current jevent parsing, we would be required to hardcode an uncore alias translation for each possible value of X. This is not scalable. Instead, add support for "Unit" field in the form "hisi_sccl,ddrc", where we can match by hisi_scclX and ddrcY. Tokens in Unit field are delimited by ','. Signed-off-by: John Garry Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ben Hutchings Cc: Hendrik Brueckner Cc: Kan Liang Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Shaokun Zhang Cc: Thomas Richter Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Cc: linuxarm@huawei.com Link: http://lkml.kernel.org/r/1561732552-143038-2-git-send-email-john.garry@huawei.com [ Shut up older gcc complianing about the last arg to strtok_r() being uninitialized, set that tmp to NULL ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/pmu.c | 46 +++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 41 insertions(+), 5 deletions(-) commit 23ec8eaf46e1472f26c5c7549205797d006efa13 Author: Colin Ian King Date: Tue Jul 2 14:16:42 2019 +0100 nfc: st-nci: remove redundant assignment to variable r The variable r is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/nfc/st-nci/i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6a381ea694c9da31ba8741c42a7f1b206c156841 Author: Nicholas Johnson Date: Sat Jun 22 12:13:50 2019 -0500 PCI: Skip resource distribution when no hotplug bridges If "hotplug_bridges == 0", "!dev->is_hotplug_bridge" is always true, so the loop that divides the remaining resources among hotplug-capable bridges does nothing. Check for "hotplug_bridges == 0" earlier, so we don't even have to compute the amount of remaining resources. No functional change intended. Link: https://lore.kernel.org/r/PS2P216MB0642C7A485649D2D787A1C6F80000@PS2P216MB0642.KORP216.PROD.OUTLOOK.COM Link: https://lore.kernel.org/r/20190622210310.180905-3-helgaas@kernel.org Signed-off-by: Nicholas Johnson Signed-off-by: Bjorn Helgaas Reviewed-by: Logan Gunthorpe Reviewed-by: Mika Westerberg drivers/pci/setup-bus.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 5c6bcc344b18dfb3b0ddcca6c26f6858879f73bf Author: Nicholas Johnson Date: Sat Jun 22 11:43:46 2019 -0500 PCI: Simplify pci_bus_distribute_available_resources() Reorder pci_bus_distribute_available_resources() to group related code together. No functional change intended. Link: https://lore.kernel.org/r/PS2P216MB0642C7A485649D2D787A1C6F80000@PS2P216MB0642.KORP216.PROD.OUTLOOK.COM Link: https://lore.kernel.org/r/20190622210310.180905-2-helgaas@kernel.org Signed-off-by: Nicholas Johnson Signed-off-by: Bjorn Helgaas Reviewed-by: Mika Westerberg Reviewed-by: Logan Gunthorpe drivers/pci/setup-bus.c | 50 ++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) commit f2f1717592d4790790bdcc73dbbe4958d2d33198 Merge: 13e04fbf0b97 2446a68ae6a8 Author: David S. Miller Date: Tue Jul 2 11:53:03 2019 -0700 Merge branch 'bridge-stale-ptrs' Nikolay Aleksandrov says: ==================== net: bridge: fix possible stale skb pointers In the bridge driver we have a couple of places which call pskb_may_pull but we've cached skb pointers before that and use them after which can lead to out-of-bounds/stale pointer use. I've had these in my "to fix" list for some time and now we got a report (patch 01) so here they are. Patches 02-04 are fixes based on code inspection. Also patch 01 was tested by Martin Weinelt, Martin if you don't mind please add your tested-by tag to it by replying with Tested-by: name . I've also briefly tested the set by trying to exercise those code paths. ==================== Signed-off-by: David S. Miller commit 2446a68ae6a8cee6d480e2f5b52f5007c7c41312 Author: Nikolay Aleksandrov Date: Tue Jul 2 15:00:21 2019 +0300 net: bridge: stp: don't cache eth dest pointer before skb pull Don't cache eth dest pointer before calling pskb_may_pull. Fixes: cf0f02d04a83 ("[BRIDGE]: use llc for receiving STP packets") Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/bridge/br_stp_bpdu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 3d26eb8ad1e9b906433903ce05f775cf038e747f Author: Nikolay Aleksandrov Date: Tue Jul 2 15:00:20 2019 +0300 net: bridge: don't cache ether dest pointer on input We would cache ether dst pointer on input in br_handle_frame_finish but after the neigh suppress code that could lead to a stale pointer since both ipv4 and ipv6 suppress code do pskb_may_pull. This means we have to always reload it after the suppress code so there's no point in having it cached just retrieve it directly. Fixes: 057658cb33fbf ("bridge: suppress arp pkts on BR_NEIGH_SUPPRESS ports") Fixes: ed842faeb2bd ("bridge: suppress nd pkts on BR_NEIGH_SUPPRESS ports") Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/bridge/br_input.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 3b26a5d03d35d8f732d75951218983c0f7f68dff Author: Nikolay Aleksandrov Date: Tue Jul 2 15:00:19 2019 +0300 net: bridge: mcast: fix stale ipv6 hdr pointer when handling v6 query We get a pointer to the ipv6 hdr in br_ip6_multicast_query but we may call pskb_may_pull afterwards and end up using a stale pointer. So use the header directly, it's just 1 place where it's needed. Fixes: 08b202b67264 ("bridge br_multicast: IPv6 MLD support.") Signed-off-by: Nikolay Aleksandrov Tested-by: Martin Weinelt Signed-off-by: David S. Miller net/bridge/br_multicast.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e57f61858b7cf478ed6fa23ed4b3876b1c9625c4 Author: Nikolay Aleksandrov Date: Tue Jul 2 15:00:18 2019 +0300 net: bridge: mcast: fix stale nsrcs pointer in igmp3/mld2 report handling We take a pointer to grec prior to calling pskb_may_pull and use it afterwards to get nsrcs so record nsrcs before the pull when handling igmp3 and we get a pointer to nsrcs and call pskb_may_pull when handling mld2 which again could lead to reading 2 bytes out-of-bounds. ================================================================== BUG: KASAN: use-after-free in br_multicast_rcv+0x480c/0x4ad0 [bridge] Read of size 2 at addr ffff8880421302b4 by task ksoftirqd/1/16 CPU: 1 PID: 16 Comm: ksoftirqd/1 Tainted: G OE 5.2.0-rc6+ #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014 Call Trace: dump_stack+0x71/0xab print_address_description+0x6a/0x280 ? br_multicast_rcv+0x480c/0x4ad0 [bridge] __kasan_report+0x152/0x1aa ? br_multicast_rcv+0x480c/0x4ad0 [bridge] ? br_multicast_rcv+0x480c/0x4ad0 [bridge] kasan_report+0xe/0x20 br_multicast_rcv+0x480c/0x4ad0 [bridge] ? br_multicast_disable_port+0x150/0x150 [bridge] ? ktime_get_with_offset+0xb4/0x150 ? __kasan_kmalloc.constprop.6+0xa6/0xf0 ? __netif_receive_skb+0x1b0/0x1b0 ? br_fdb_update+0x10e/0x6e0 [bridge] ? br_handle_frame_finish+0x3c6/0x11d0 [bridge] br_handle_frame_finish+0x3c6/0x11d0 [bridge] ? br_pass_frame_up+0x3a0/0x3a0 [bridge] ? virtnet_probe+0x1c80/0x1c80 [virtio_net] br_handle_frame+0x731/0xd90 [bridge] ? select_idle_sibling+0x25/0x7d0 ? br_handle_frame_finish+0x11d0/0x11d0 [bridge] __netif_receive_skb_core+0xced/0x2d70 ? virtqueue_get_buf_ctx+0x230/0x1130 [virtio_ring] ? do_xdp_generic+0x20/0x20 ? virtqueue_napi_complete+0x39/0x70 [virtio_net] ? virtnet_poll+0x94d/0xc78 [virtio_net] ? receive_buf+0x5120/0x5120 [virtio_net] ? __netif_receive_skb_one_core+0x97/0x1d0 __netif_receive_skb_one_core+0x97/0x1d0 ? __netif_receive_skb_core+0x2d70/0x2d70 ? _raw_write_trylock+0x100/0x100 ? __queue_work+0x41e/0xbe0 process_backlog+0x19c/0x650 ? _raw_read_lock_irq+0x40/0x40 net_rx_action+0x71e/0xbc0 ? __switch_to_asm+0x40/0x70 ? napi_complete_done+0x360/0x360 ? __switch_to_asm+0x34/0x70 ? __switch_to_asm+0x40/0x70 ? __schedule+0x85e/0x14d0 __do_softirq+0x1db/0x5f9 ? takeover_tasklets+0x5f0/0x5f0 run_ksoftirqd+0x26/0x40 smpboot_thread_fn+0x443/0x680 ? sort_range+0x20/0x20 ? schedule+0x94/0x210 ? __kthread_parkme+0x78/0xf0 ? sort_range+0x20/0x20 kthread+0x2ae/0x3a0 ? kthread_create_worker_on_cpu+0xc0/0xc0 ret_from_fork+0x35/0x40 The buggy address belongs to the page: page:ffffea0001084c00 refcount:0 mapcount:-128 mapping:0000000000000000 index:0x0 flags: 0xffffc000000000() raw: 00ffffc000000000 ffffea0000cfca08 ffffea0001098608 0000000000000000 raw: 0000000000000000 0000000000000003 00000000ffffff7f 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888042130180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888042130200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff > ffff888042130280: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888042130300: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888042130380: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== Disabling lock debugging due to kernel taint Fixes: bc8c20acaea1 ("bridge: multicast: treat igmpv3 report with INCLUDE and no sources as a leave") Reported-by: Martin Weinelt Signed-off-by: Nikolay Aleksandrov Tested-by: Martin Weinelt Signed-off-by: David S. Miller net/bridge/br_multicast.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 83b6a85bbbde81332ad329b9876f0afd5172c99a Author: Xue Chaojing Date: Mon Jul 1 23:40:00 2019 +0000 hinic: remove standard netdev stats This patch removes standard netdev stats in ethtool -S. Suggested-by: Jakub Kicinski Signed-off-by: Xue Chaojing Signed-off-by: David S. Miller drivers/net/ethernet/huawei/hinic/hinic_ethtool.c | 47 +---------------------- 1 file changed, 1 insertion(+), 46 deletions(-) commit cc5dfd59e375f4d0f2b64643723d16b38b2f2d78 Merge: 9ec3f4cb35bc b6b346a0665a Author: Jason Gunthorpe Date: Tue Jul 2 15:07:52 2019 -0300 Merge branch 'hmm-devmem-cleanup.4' into rdma.git hmm Christoph Hellwig says: ==================== Below is a series that cleans up the dev_pagemap interface so that it is more easily usable, which removes the need to wrap it in hmm and thus allowing to kill a lot of code Changes since v3: - pull in "mm/swap: Fix release_pages() when releasing devmap pages" and rebase the other patches on top of that - fold the hmm_devmem_add_resource into the DEVICE_PUBLIC memory removal patch - remove _vm_normal_page as it isn't needed without DEVICE_PUBLIC memory - pick up various ACKs Changes since v2: - fix nvdimm kunit build - add a new memory type for device dax - fix a few issues in intermediate patches that didn't show up in the end result - incorporate feedback from Michal Hocko, including killing of the DEVICE_PUBLIC memory type entirely Changes since v1: - rebase - also switch p2pdma to the internal refcount - add type checking for pgmap->type - rename the migrate method to migrate_to_ram - cleanup the altmap_valid flag - various tidbits from the reviews ==================== Conflicts resolved by: - Keeping Ira's version of the code in swap.c - Using the delete for the section in hmm.rst - Using the delete for the devmap code in hmm.c and .h * branch 'hmm-devmem-cleanup.4': (24 commits) mm: don't select MIGRATE_VMA_HELPER from HMM_MIRROR mm: remove the HMM config option mm: sort out the DEVICE_PRIVATE Kconfig mess mm: simplify ZONE_DEVICE page private data mm: remove hmm_devmem_add mm: remove hmm_vma_alloc_locked_page nouveau: use devm_memremap_pages directly nouveau: use alloc_page_vma directly PCI/P2PDMA: use the dev_pagemap internal refcount device-dax: use the dev_pagemap internal refcount memremap: provide an optional internal refcount in struct dev_pagemap memremap: replace the altmap_valid field with a PGMAP_ALTMAP_VALID flag memremap: remove the data field in struct dev_pagemap memremap: add a migrate_to_ram method to struct dev_pagemap_ops memremap: lift the devmap_enable manipulation into devm_memremap_pages memremap: pass a struct dev_pagemap to ->kill and ->cleanup memremap: move dev_pagemap callbacks into a separate structure memremap: validate the pagemap type passed to devm_memremap_pages mm: factor out a devm_request_free_mem_region helper mm: export alloc_pages_vma ... Signed-off-by: Jason Gunthorpe commit b432bdb6c6304d4c14ba9eff55c99884ccfc1aae Author: Jose Abreu Date: Tue Jul 2 11:12:10 2019 +0200 net: stmmac: Re-word Kconfig entry We support many speeds and it doesn't make much sense to list them all in the Kconfig. Let's just call it Multi-Gigabit. Suggested-by: David S. Miller Signed-off-by: Jose Abreu Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b46c820f8f5a03619f21fc4ed2e42848017aefcd Author: YueHaibing Date: Tue Jul 2 11:38:10 2019 -0600 sample/mdev/mbochs: remove set but not used variable 'mdev_state' Fixes gcc '-Wunused-but-set-variable' warning: samples/vfio-mdev/mbochs.c: In function mbochs_ioctl: samples/vfio-mdev/mbochs.c:1188:21: warning: variable mdev_state set but not used [-Wunused-but-set-variable] It's not used any more since commit 104c7405a64d ("vfio: add edid support to mbochs sample driver") Signed-off-by: YueHaibing Signed-off-by: Alex Williamson samples/vfio-mdev/mbochs.c | 3 --- 1 file changed, 3 deletions(-) commit e66e02c4d96d335eedabd9678416f2949d68ebc8 Author: Peng Hao Date: Tue Jul 2 11:38:09 2019 -0600 vfio: vfio_pci_nvlink2: use a vma helper function Use a vma helper function to simply code. Signed-off-by: Peng Hao Reviewed-by: Alexey Kardashevskiy Signed-off-by: Alex Williamson drivers/vfio/pci/vfio_pci_nvlink2.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 4b2dbd566c7b91740e32b30a68a7f2b38e3495b9 Author: Kefeng Wang Date: Tue Jul 2 11:38:08 2019 -0600 vfio-mdev/samples: make some symbols static Make some structs and functions static to fix build warning, parts of warning shown below, samples/vfio-mdev/mtty.c:730:5: warning: symbol 'mtty_create' was not declared. Should it be static? samples/vfio-mdev/mtty.c:780:5: warning: symbol 'mtty_remove' was not declared. Should it be static? samples/vfio-mdev/mtty.c:802:5: warning: symbol 'mtty_reset' was not declared. Should it be static? samples/vfio-mdev/mtty.c:818:9: warning: symbol 'mtty_read' was not declared. Should it be static? samples/vfio-mdev/mtty.c:877:9: warning: symbol 'mtty_write' was not declared. Should it be static? samples/vfio-mdev/mtty.c:1070:5: warning: symbol 'mtty_get_region_info' was not declared. Should it be static? samples/vfio-mdev/mtty.c:1119:5: warning: symbol 'mtty_get_irq_info' was not declared. Should it be static? samples/vfio-mdev/mtty.c:1143:5: warning: symbol 'mtty_get_device_info' was not declared. Should it be static? samples/vfio-mdev/mtty.c:1275:5: warning: symbol 'mtty_open' was not declared. Should it be static? samples/vfio-mdev/mtty.c:1281:6: warning: symbol 'mtty_close' was not declared. Should it be static? samples/vfio-mdev/mtty.c:1305:30: warning: symbol 'mtty_dev_groups' was not declared. Should it be static? Cc: Andy Shevchenko Cc: Alex Williamson Cc: Kirti Wankhede Reported-by: Hulk Robot Signed-off-by: Kefeng Wang Reviewed-by: Andy Shevchenko [aw: wrap long lines] Signed-off-by: Alex Williamson samples/vfio-mdev/mtty.c | 47 ++++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 23 deletions(-) commit 9ec3f4cb35bc8278f0582fed9f9229c9315c2ffb Merge: c5d6c45e90c4 6fbc7275c7a9 Author: Jason Gunthorpe Date: Tue Jul 2 14:34:43 2019 -0300 Merge tag 'v5.2-rc7' into rdma.git hmm Required for dependencies in the next patches. commit b6b346a0665a8bf8b28fd851217c435a3eec4af9 Author: Christoph Hellwig Date: Wed Jun 26 14:27:24 2019 +0200 mm: don't select MIGRATE_VMA_HELPER from HMM_MIRROR The migrate_vma helper is only used by noveau to migrate device private pages around. Other HMM_MIRROR users like amdgpu or infiniband don't need it. Signed-off-by: Christoph Hellwig Reviewed-by: Jason Gunthorpe Reviewed-by: Dan Williams Signed-off-by: Jason Gunthorpe drivers/gpu/drm/nouveau/Kconfig | 1 + mm/Kconfig | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) commit 43535b0aefab29ea6564e608de4c783ed2ab6c49 Author: Christoph Hellwig Date: Wed Jun 26 14:27:23 2019 +0200 mm: remove the HMM config option All the mm/hmm.c code is better keyed off HMM_MIRROR. Also let nouveau depend on it instead of the mix of a dummy dependency symbol plus the actually selected one. Drop various odd dependencies, as the code is pretty portable. Signed-off-by: Christoph Hellwig Reviewed-by: Ira Weiny Reviewed-by: Jason Gunthorpe Reviewed-by: Dan Williams Signed-off-by: Jason Gunthorpe drivers/gpu/drm/nouveau/Kconfig | 3 +-- include/linux/hmm.h | 5 +---- include/linux/mm_types.h | 2 +- mm/Kconfig | 27 ++++----------------------- mm/Makefile | 2 +- mm/hmm.c | 2 -- 6 files changed, 8 insertions(+), 33 deletions(-) commit 7328d9cc1b9fdc52105901072e9a4a1234e29b11 Author: Christoph Hellwig Date: Wed Jun 26 14:27:22 2019 +0200 mm: sort out the DEVICE_PRIVATE Kconfig mess The ZONE_DEVICE support doesn't depend on anything HMM related, just on various bits of arch support as indicated by the architecture. Also don't select the option from nouveau as it isn't present in many setups, and depend on it instead. Signed-off-by: Christoph Hellwig Reviewed-by: Ira Weiny Reviewed-by: Dan Williams Signed-off-by: Jason Gunthorpe drivers/gpu/drm/nouveau/Kconfig | 2 +- mm/Kconfig | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) commit 8a164fef9c4ccf6ff7757170397222860e40d192 Author: Christoph Hellwig Date: Wed Jun 26 14:27:21 2019 +0200 mm: simplify ZONE_DEVICE page private data Remove the clumsy hmm_devmem_page_{get,set}_drvdata helpers, and instead just access the page directly. Also make the page data a void pointer, and thus much easier to use. Signed-off-by: Christoph Hellwig Reviewed-by: Dan Williams Signed-off-by: Jason Gunthorpe drivers/gpu/drm/nouveau/nouveau_dmem.c | 18 +++++++----------- include/linux/hmm.h | 32 -------------------------------- include/linux/mm_types.h | 2 +- mm/page_alloc.c | 8 ++++---- 4 files changed, 12 insertions(+), 48 deletions(-) commit eee3ae41b153e55e25d6cf7bd5b5098ba0afe705 Author: Christoph Hellwig Date: Wed Jun 26 14:27:20 2019 +0200 mm: remove hmm_devmem_add There isn't really much value add in the hmm_devmem_add wrapper and more, as using devm_memremap_pages directly now is just as simple. Signed-off-by: Christoph Hellwig Reviewed-by: Jason Gunthorpe Reviewed-by: Dan Williams Signed-off-by: Jason Gunthorpe Documentation/vm/hmm.rst | 26 ---------- include/linux/hmm.h | 129 ----------------------------------------------- mm/hmm.c | 110 ---------------------------------------- 3 files changed, 265 deletions(-) commit 47e9d836a5e827acdaa5cb6175648fbef15b4e84 Author: Christoph Hellwig Date: Wed Jun 26 14:27:19 2019 +0200 mm: remove hmm_vma_alloc_locked_page The only user of it has just been removed, and there wasn't really any need to wrap a basic memory allocator to start with. Signed-off-by: Christoph Hellwig Reviewed-by: Jason Gunthorpe Reviewed-by: Dan Williams Signed-off-by: Jason Gunthorpe include/linux/hmm.h | 3 --- mm/hmm.c | 14 -------------- 2 files changed, 17 deletions(-) commit 4239f267e3cd31e6e592d26a9fa6834b5a11560b Author: Christoph Hellwig Date: Wed Jun 26 14:27:18 2019 +0200 nouveau: use devm_memremap_pages directly Just use devm_memremap_pages instead of hmm_devmem_add pages to allow killing that wrapper which doesn't provide a whole lot of benefits. Signed-off-by: Christoph Hellwig Reviewed-by: Dan Williams Signed-off-by: Jason Gunthorpe drivers/gpu/drm/nouveau/nouveau_dmem.c | 82 ++++++++++++++++------------------ 1 file changed, 38 insertions(+), 44 deletions(-) commit 721be868142cb95888847dfaaf3d1c5b8c65b943 Author: Christoph Hellwig Date: Wed Jun 26 14:27:17 2019 +0200 nouveau: use alloc_page_vma directly hmm_vma_alloc_locked_page is scheduled to go away, use the proper mm function directly. Signed-off-by: Christoph Hellwig Reviewed-by: Jason Gunthorpe Reviewed-by: Dan Williams Signed-off-by: Jason Gunthorpe drivers/gpu/drm/nouveau/nouveau_dmem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d0b3517dbcf3f632f7554d878f85943439aade64 Author: Christoph Hellwig Date: Wed Jun 26 14:27:16 2019 +0200 PCI/P2PDMA: use the dev_pagemap internal refcount The functionality is identical to the one currently open coded in p2pdma.c. Signed-off-by: Christoph Hellwig Reviewed-by: Ira Weiny Reviewed-by: Logan Gunthorpe Tested-by: Logan Gunthorpe Reviewed-by: Dan Williams Signed-off-by: Jason Gunthorpe drivers/pci/p2pdma.c | 57 ++++------------------------------------------------ 1 file changed, 4 insertions(+), 53 deletions(-) commit ea31d5859f5862fc915ccf3fa34f6c6c5f63f336 Author: Christoph Hellwig Date: Wed Jun 26 14:27:15 2019 +0200 device-dax: use the dev_pagemap internal refcount The functionality is identical to the one currently open coded in device-dax. Signed-off-by: Christoph Hellwig Reviewed-by: Ira Weiny Reviewed-by: Dan Williams Tested-by: Dan Williams Signed-off-by: Jason Gunthorpe drivers/dax/dax-private.h | 4 ---- drivers/dax/device.c | 43 ------------------------------------------- 2 files changed, 47 deletions(-) commit 24917f6b1041a73993178920656e13364f847995 Author: Christoph Hellwig Date: Wed Jun 26 14:27:14 2019 +0200 memremap: provide an optional internal refcount in struct dev_pagemap Provide an internal refcounting logic if no ->ref field is provided in the pagemap passed into devm_memremap_pages so that callers don't have to reinvent it poorly. Signed-off-by: Christoph Hellwig Reviewed-by: Ira Weiny Reviewed-by: Dan Williams Tested-by: Dan Williams Signed-off-by: Jason Gunthorpe include/linux/memremap.h | 4 +++ kernel/memremap.c | 64 +++++++++++++++++++++++++++++++-------- tools/testing/nvdimm/test/iomap.c | 58 +++++++++++++++++++++++++++-------- 3 files changed, 101 insertions(+), 25 deletions(-) commit 514caf23a70fd697fa2ece238b2cd8dcc73fb16f Author: Christoph Hellwig Date: Wed Jun 26 14:27:13 2019 +0200 memremap: replace the altmap_valid field with a PGMAP_ALTMAP_VALID flag Add a flags field to struct dev_pagemap to replace the altmap_valid boolean to be a little more extensible. Also add a pgmap_altmap() helper to find the optional altmap and clean up the code using the altmap using it. Signed-off-by: Christoph Hellwig Reviewed-by: Ira Weiny Reviewed-by: Dan Williams Tested-by: Dan Williams Signed-off-by: Jason Gunthorpe arch/powerpc/mm/mem.c | 10 +--------- arch/x86/mm/init_64.c | 8 ++------ drivers/nvdimm/pfn_devs.c | 3 +-- drivers/nvdimm/pmem.c | 1 - include/linux/memremap.h | 12 +++++++++++- kernel/memremap.c | 26 ++++++++++---------------- mm/hmm.c | 1 - mm/memory_hotplug.c | 6 ++---- mm/page_alloc.c | 5 ++--- 9 files changed, 29 insertions(+), 43 deletions(-) commit 80a72d0af05ae97a8b106c172e431072ba587492 Author: Christoph Hellwig Date: Wed Jun 26 14:27:12 2019 +0200 memremap: remove the data field in struct dev_pagemap struct dev_pagemap is always embedded into a containing structure, so there is no need to an additional private data field. Signed-off-by: Christoph Hellwig Reviewed-by: Jason Gunthorpe Reviewed-by: Dan Williams Tested-by: Dan Williams Signed-off-by: Jason Gunthorpe drivers/nvdimm/pmem.c | 2 +- include/linux/memremap.h | 3 +-- kernel/memremap.c | 2 +- mm/hmm.c | 9 +++++---- 4 files changed, 8 insertions(+), 8 deletions(-) commit 897e6365cda6ba6356e83a3aaa68dec82ef4c548 Author: Christoph Hellwig Date: Wed Jun 26 14:27:11 2019 +0200 memremap: add a migrate_to_ram method to struct dev_pagemap_ops This replaces the hacky ->fault callback, which is currently directly called from common code through a hmm specific data structure as an exercise in layering violations. Signed-off-by: Christoph Hellwig Reviewed-by: Ralph Campbell Reviewed-by: Jason Gunthorpe Reviewed-by: Dan Williams Tested-by: Dan Williams Signed-off-by: Jason Gunthorpe include/linux/hmm.h | 6 ------ include/linux/memremap.h | 6 ++++++ include/linux/swapops.h | 15 --------------- kernel/memremap.c | 35 ++++------------------------------- mm/hmm.c | 13 +++++-------- mm/memory.c | 9 ++------- 6 files changed, 17 insertions(+), 67 deletions(-) commit f6a55e1a3fe6b3bb294a80a05437fcf86488d819 Author: Christoph Hellwig Date: Wed Jun 26 14:27:10 2019 +0200 memremap: lift the devmap_enable manipulation into devm_memremap_pages Just check if there is a ->page_free operation set and take care of the static key enable, as well as the put using device managed resources. Also check that a ->page_free is provided for the pgmaps types that require it, and check for a valid type as well while we are at it. Note that this also fixes the fact that hmm never called dev_pagemap_put_ops and thus would leave the slow path enabled forever, even after a device driver unload or disable. Signed-off-by: Christoph Hellwig Reviewed-by: Ira Weiny Reviewed-by: Dan Williams Tested-by: Dan Williams Signed-off-by: Jason Gunthorpe drivers/nvdimm/pmem.c | 23 ++++---------------- include/linux/mm.h | 10 --------- kernel/memremap.c | 59 ++++++++++++++++++++++++++++++++------------------- mm/hmm.c | 2 -- 4 files changed, 41 insertions(+), 53 deletions(-) commit d8668bb0451c3c45b59dbcde2654e0539aad1d2a Author: Christoph Hellwig Date: Wed Jun 26 14:27:09 2019 +0200 memremap: pass a struct dev_pagemap to ->kill and ->cleanup Passing the actual typed structure leads to more understandable code vs just passing the ref member. Reported-by: Logan Gunthorpe Signed-off-by: Christoph Hellwig Reviewed-by: Logan Gunthorpe Reviewed-by: Jason Gunthorpe Reviewed-by: Dan Williams Tested-by: Dan Williams Signed-off-by: Jason Gunthorpe drivers/dax/device.c | 12 ++++++------ drivers/nvdimm/pmem.c | 18 +++++++++--------- drivers/pci/p2pdma.c | 9 +++++---- include/linux/memremap.h | 4 ++-- kernel/memremap.c | 8 ++++---- mm/hmm.c | 10 +++++----- tools/testing/nvdimm/test/iomap.c | 4 ++-- 7 files changed, 33 insertions(+), 32 deletions(-) commit 1e240e8d4a7d92232b6214e02a0a4197a53afd6c Author: Christoph Hellwig Date: Wed Jun 26 14:27:08 2019 +0200 memremap: move dev_pagemap callbacks into a separate structure The dev_pagemap is a growing too many callbacks. Move them into a separate ops structure so that they are not duplicated for multiple instances, and an attacker can't easily overwrite them. Signed-off-by: Christoph Hellwig Reviewed-by: Logan Gunthorpe Reviewed-by: Jason Gunthorpe Reviewed-by: Dan Williams Tested-by: Dan Williams Signed-off-by: Jason Gunthorpe drivers/dax/device.c | 11 +++++++---- drivers/dax/pmem/core.c | 2 +- drivers/nvdimm/pmem.c | 19 +++++++++++-------- drivers/pci/p2pdma.c | 8 ++++++-- include/linux/memremap.h | 36 ++++++++++++++++++++---------------- kernel/memremap.c | 18 +++++++++--------- mm/hmm.c | 10 +++++++--- tools/testing/nvdimm/test/iomap.c | 7 ++++--- 8 files changed, 65 insertions(+), 46 deletions(-) commit 3ed2dcdf54d5bf1f9823b5faf1a702e7cee53982 Author: Christoph Hellwig Date: Wed Jun 26 14:27:07 2019 +0200 memremap: validate the pagemap type passed to devm_memremap_pages Most pgmap types are only supported when certain config options are enabled. Check for a type that is valid for the current configuration before setting up the pagemap. For this the usage of the 0 type for device dax gets replaced with an explicit MEMORY_DEVICE_DEVDAX type. Signed-off-by: Christoph Hellwig Reviewed-by: Ira Weiny Reviewed-by: Dan Williams Tested-by: Dan Williams Signed-off-by: Jason Gunthorpe drivers/dax/device.c | 1 + include/linux/memremap.h | 8 ++++++++ kernel/memremap.c | 22 ++++++++++++++++++++++ 3 files changed, 31 insertions(+) commit 0092908d16c604b8207c2141ec64b0fa4473bb03 Author: Christoph Hellwig Date: Wed Jun 26 14:27:06 2019 +0200 mm: factor out a devm_request_free_mem_region helper Keep the physical address allocation that hmm_add_device does with the rest of the resource code, and allow future reuse of it without the hmm wrapper. Signed-off-by: Christoph Hellwig Reviewed-by: Jason Gunthorpe Reviewed-by: John Hubbard Reviewed-by: Dan Williams Signed-off-by: Jason Gunthorpe include/linux/ioport.h | 2 ++ kernel/resource.c | 39 +++++++++++++++++++++++++++++++++++++++ mm/hmm.c | 33 ++++----------------------------- 3 files changed, 45 insertions(+), 29 deletions(-) commit 692622157bd069526360d590150c4c302a443853 Author: Christoph Hellwig Date: Wed Jun 26 14:27:05 2019 +0200 mm: export alloc_pages_vma nouveau is currently using this through an odd hmm wrapper, and I plan to switch it to the real thing later in this series. Signed-off-by: Christoph Hellwig Reviewed-by: John Hubbard Acked-by: Michal Hocko Reviewed-by: Dan Williams Signed-off-by: Jason Gunthorpe mm/mempolicy.c | 1 + 1 file changed, 1 insertion(+) commit b7a523109fb5c9d2d6dd3ffc1fa38a4f48c6f842 Author: Christoph Hellwig Date: Wed Jun 26 14:27:04 2019 +0200 mm: don't clear ->mapping in hmm_devmem_free ->mapping isn't even used by HMM users, and the field at the same offset in the zone_device part of the union is declared as pad. (Which btw is rather confusing, as DAX uses ->pgmap and ->mapping from two different sides of the union, but DAX doesn't use hmm_devmem_free). Signed-off-by: Christoph Hellwig Reviewed-by: Jason Gunthorpe Reviewed-by: John Hubbard Reviewed-by: Dan Williams Signed-off-by: Jason Gunthorpe mm/hmm.c | 2 -- 1 file changed, 2 deletions(-) commit 25b2995a35b609119cf96f6b62eccd56c0234c7d Author: Christoph Hellwig Date: Thu Jun 13 22:50:49 2019 +0200 mm: remove MEMORY_DEVICE_PUBLIC support The code hasn't been used since it was added to the tree, and doesn't appear to actually be usable. Signed-off-by: Christoph Hellwig Reviewed-by: Jason Gunthorpe Acked-by: Michal Hocko Reviewed-by: Dan Williams Tested-by: Dan Williams Signed-off-by: Jason Gunthorpe fs/proc/task_mmu.c | 2 +- include/linux/hmm.h | 7 ++----- include/linux/ioport.h | 1 - include/linux/memremap.h | 8 ------- include/linux/mm.h | 18 ++-------------- mm/Kconfig | 11 ---------- mm/gup.c | 7 ------- mm/hmm.c | 54 ++---------------------------------------------- mm/madvise.c | 2 +- mm/memcontrol.c | 13 ++++++------ mm/memory-failure.c | 6 +----- mm/memory.c | 40 +++-------------------------------- mm/migrate.c | 28 ++++--------------------- mm/swap.c | 11 ---------- 14 files changed, 22 insertions(+), 186 deletions(-) commit c550505b57832936aebb5eb376375bc258f8a807 Author: Jim Mattson Date: Thu Jun 27 11:36:51 2019 -0700 kvm: x86: Pass through AMD_STIBP_ALWAYS_ON in GET_SUPPORTED_CPUID This bit is purely advisory. Passing it through to the guest indicates that the virtual processor, like the physical processor, prefers that STIBP is only set once during boot and not changed. Signed-off-by: Jim Mattson Signed-off-by: Paolo Bonzini arch/x86/kvm/cpuid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b119019847fbcac36ed1384f166c91f177d070e7 Author: Jim Mattson Date: Thu Jun 13 09:16:08 2019 -0700 kvm: nVMX: Remove unnecessary sync_roots from handle_invept When L0 is executing handle_invept(), the TDP MMU is active. Emulating an L1 INVEPT does require synchronizing the appropriate shadow EPT root(s), but a call to kvm_mmu_sync_roots in this context won't do that. Similarly, the hardware TLB and paging-structure-cache entries associated with the appropriate shadow EPT root(s) must be flushed, but requesting a TLB_FLUSH from this context won't do that either. How did this ever work? KVM always does a sync_roots and TLB flush (in the correct context) when transitioning from L1 to L2. That isn't the best choice for nested VM performance, but it effectively papers over the mistakes here. Remove the unnecessary operations and leave a comment to try to do better in the future. Reported-by: Junaid Shahid Fixes: bfd0a56b90005f ("nEPT: Nested INVEPT") Cc: Xiao Guangrong Cc: Nadav Har'El Cc: Jun Nakajima Cc: Xinhao Xu Cc: Yang Zhang Cc: Gleb Natapov Cc: Paolo Bonzini Reviewed-by Peter Shier Reviewed-by: Junaid Shahid Signed-off-by: Jim Mattson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 9824c83f92bc8351dfb5c387436cc2816616fb4a Author: Paolo Bonzini Date: Tue Jul 2 18:57:29 2019 +0200 Documentation: kvm: document CPUID bit for MSR_KVM_POLL_CONTROL Cc: Marcelo Tosatti Signed-off-by: Paolo Bonzini Documentation/virtual/kvm/cpuid.txt | 4 ++++ 1 file changed, 4 insertions(+) commit 32b72ecc83b651fb8633ac4bd44957c54367699d Author: Wanpeng Li Date: Tue Jun 11 20:23:50 2019 +0800 KVM: X86: Expose PV_SCHED_YIELD CPUID feature bit to guest Expose PV_SCHED_YIELD feature bit to guest, the guest can check this feature bit before using paravirtualized sched yield. Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Liran Alon Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini Documentation/virtual/kvm/cpuid.txt | 4 ++++ arch/x86/kvm/cpuid.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) commit 715062970f3748fbbf55c1a8cb495051760a65c1 Author: Wanpeng Li Date: Tue Jun 11 20:23:49 2019 +0800 KVM: X86: Implement PV sched yield hypercall The target vCPUs are in runnable state after vcpu_kick and suitable as a yield target. This patch implements the sched yield hypercall. 17% performance increasement of ebizzy benchmark can be observed in an over-subscribe environment. (w/ kvm-pv-tlb disabled, testing TLB flush call-function IPI-many since call-function is not easy to be trigged by userspace workload). Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Liran Alon Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit f85f6e7bc9682a6d8b342c010cd6aa58521fdeec Author: Wanpeng Li Date: Tue Jun 11 20:23:48 2019 +0800 KVM: X86: Yield to IPI target if necessary When sending a call-function IPI-many to vCPUs, yield if any of the IPI target vCPUs was preempted, we just select the first preempted target vCPU which we found since the state of target vCPUs can change underneath and to avoid race conditions. Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Liran Alon Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini Documentation/virtual/kvm/hypercalls.txt | 11 +++++++++++ arch/x86/include/uapi/asm/kvm_para.h | 1 + arch/x86/kernel/kvm.c | 21 +++++++++++++++++++++ include/uapi/linux/kvm_para.h | 1 + 4 files changed, 34 insertions(+) commit 11e349143e3289ab99f1b4858649f60703b7bf35 Author: Vitaly Kuznetsov Date: Fri Jun 28 13:23:33 2019 +0200 x86/kvm/nVMX: fix VMCLEAR when Enlightened VMCS is in use When Enlightened VMCS is in use, it is valid to do VMCLEAR and, according to TLFS, this should "transition an enlightened VMCS from the active to the non-active state". It is, however, wrong to assume that it is only valid to do VMCLEAR for the eVMCS which is currently active on the vCPU performing VMCLEAR. Currently, the logic in handle_vmclear() is broken: in case, there is no active eVMCS on the vCPU doing VMCLEAR we treat the argument as a 'normal' VMCS and kvm_vcpu_write_guest() to the 'launch_state' field irreversibly corrupts the memory area. So, in case the VMCLEAR argument is not the current active eVMCS on the vCPU, how can we know if the area it is pointing to is a normal or an enlightened VMCS? Thanks to the bug in Hyper-V (see commit 72aeb60c52bf7 ("KVM: nVMX: Verify eVMCS revision id match supported eVMCS version on eVMCS VMPTRLD")) we can not, the revision can't be used to distinguish between them. So let's assume it is always enlightened in case enlightened vmentry is enabled in the assist page. Also, check if vmx->nested.enlightened_vmcs_enabled to minimize the impact for 'unenlightened' workloads. Fixes: b8bbab928fb1 ("KVM: nVMX: implement enlightened VMPTRLD and VMCLEAR") Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/evmcs.c | 18 ++++++++++++++++++ arch/x86/kvm/vmx/evmcs.h | 1 + arch/x86/kvm/vmx/nested.c | 32 ++++++++++++++++++-------------- 3 files changed, 37 insertions(+), 14 deletions(-) commit a21a39c206f8a541ce9670666c0025d73383aa1a Author: Vitaly Kuznetsov Date: Fri Jun 28 13:23:32 2019 +0200 x86/KVM/nVMX: don't use clean fields data on enlightened VMLAUNCH Apparently, Windows doesn't maintain clean fields data after it does VMCLEAR for an enlightened VMCS so we can only use it on VMRESUME. The issue went unnoticed because currently we do nested_release_evmcs() in handle_vmclear() and the consecutive enlightened VMPTRLD invalidates clean fields when a new eVMCS is mapped but we're going to change the logic. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 677717fbd4b020404bf7cbaf4fd00c51f52abdaa Author: Darrick J. Wong Date: Tue Jul 2 09:39:43 2019 -0700 xfs: refactor INUMBERS to use iwalk functions Now that we have generic functions to walk inode records, refactor the INUMBERS implementation to use it. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/xfs_ioctl.c | 20 ++++--- fs/xfs/xfs_ioctl.h | 2 + fs/xfs/xfs_ioctl32.c | 35 ++++------- fs/xfs/xfs_itable.c | 164 +++++++++++++++++++-------------------------------- fs/xfs/xfs_itable.h | 22 +------ 5 files changed, 93 insertions(+), 150 deletions(-) commit 04b8fba2e1bf1d767af6579d5f9a25c480257d40 Author: Darrick J. Wong Date: Tue Jul 2 09:39:43 2019 -0700 xfs: refactor iwalk code to handle walking inobt records Refactor xfs_iwalk_ag_start and xfs_iwalk_ag so that the bits that are particular to bulkstat (trimming the start irec, starting inode readahead, and skipping empty groups) can be controlled via flags in the iwag structure. This enables us to add a new function to walk all inobt records which will be used for the new INUMBERS implementation in the next patch. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/xfs_iwalk.c | 112 +++++++++++++++++++++++++++++++++++++++++++++++++++-- fs/xfs/xfs_iwalk.h | 12 ++++++ 2 files changed, 121 insertions(+), 3 deletions(-) commit 2b5eb826011b48122a52085ab8f5ddb72749fc60 Author: Darrick J. Wong Date: Tue Jul 2 09:39:42 2019 -0700 xfs: refactor xfs_iwalk_grab_ichunk In preparation for reusing the iwalk code for the inogrp walking code (aka INUMBERS), move the initial inobt lookup and retrieval code out of xfs_iwalk_grab_ichunk so that we call the masking code only when we need to trim out the inodes that came before the cursor in the inobt record (aka BULKSTAT). Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/xfs_iwalk.c | 79 +++++++++++++++++++++++++++--------------------------- 1 file changed, 39 insertions(+), 40 deletions(-) commit 688f7c367877eaefc4fb130ae30f2e580c22015c Author: Darrick J. Wong Date: Tue Jul 2 09:39:42 2019 -0700 xfs: clean up long conditionals in xfs_iwalk_ichunk_ra Refactor xfs_iwalk_ichunk_ra to avoid long conditionals. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/xfs_iwalk.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 5e29f3b720834e8b5cdfbaf475f51ef55ca8b945 Author: Darrick J. Wong Date: Tue Jul 2 09:39:41 2019 -0700 xfs: change xfs_iwalk_grab_ichunk to use startino, not lastino Now that the inode chunk grabbing function is a static function in the iwalk code, change its behavior so that @agino is the inode where we want to /start/ the iteration. This reduces cognitive friction with the callers and simplifes the code. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/xfs_iwalk.c | 37 +++++++++++++++++-------------------- 1 file changed, 17 insertions(+), 20 deletions(-) commit da1d9e5912477c2f090202052ddd2a77cea6669c Author: Darrick J. Wong Date: Tue Jul 2 09:39:41 2019 -0700 xfs: move bulkstat ichunk helpers to iwalk code Now that we've reworked the bulkstat code to use iwalk, we can move the old bulkstat ichunk helpers to xfs_iwalk.c. No functional changes here. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/xfs_itable.c | 93 --------------------------------------------------- fs/xfs/xfs_itable.h | 8 ----- fs/xfs/xfs_iwalk.c | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 93 insertions(+), 104 deletions(-) commit 938c710d99a62eed93b6a2770f92f943762beca0 Author: Darrick J. Wong Date: Tue Jul 2 09:39:40 2019 -0700 xfs: calculate inode walk prefetch more carefully The existing inode walk prefetch is based on the old bulkstat code, which simply allocated 4 pages worth of memory and prefetched that many inobt records, regardless of however many inodes the caller requested. 65536 inodes is a lot to prefetch (~32M on x64, ~512M on arm64) so let's scale things down a little more intelligently based on the number of inodes requested, etc. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/xfs_iwalk.c | 48 +++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 45 insertions(+), 3 deletions(-) commit 2810bd6840e46306c110f4b76441a987756efe6c Author: Darrick J. Wong Date: Tue Jul 2 09:39:40 2019 -0700 xfs: convert bulkstat to new iwalk infrastructure Create a new ibulk structure incore to help us deal with bulk inode stat state tracking and then convert the bulkstat code to use the new iwalk iterator. This disentangles inode walking from bulk stat control for simpler code and enables us to isolate the formatter functions to the ioctl handling code. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/xfs_ioctl.c | 70 +++++++-- fs/xfs/xfs_ioctl.h | 5 + fs/xfs/xfs_ioctl32.c | 91 +++++------ fs/xfs/xfs_itable.c | 428 ++++++++++++++++----------------------------------- fs/xfs/xfs_itable.h | 76 ++++----- 5 files changed, 264 insertions(+), 406 deletions(-) commit f16fe3ecde6237256eeacb3cd582217ffe62c647 Author: Darrick J. Wong Date: Tue Jul 2 09:39:39 2019 -0700 xfs: bulkstat should copy lastip whenever userspace supplies one When userspace passes in a @lastip pointer we should copy the results back, even if the @ocount pointer is NULL. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/xfs_ioctl.c | 13 ++++++------- fs/xfs/xfs_ioctl32.c | 13 ++++++------- 2 files changed, 12 insertions(+), 14 deletions(-) commit ebd126a651f83ceb5157072dafb74a2a27a23b0f Author: Darrick J. Wong Date: Tue Jul 2 09:39:39 2019 -0700 xfs: convert quotacheck to use the new iwalk functions Convert quotacheck to use the new iwalk iterator to dig through the inodes. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Brian Foster fs/xfs/xfs_qm.c | 63 ++++++++++++++++++--------------------------------------- 1 file changed, 20 insertions(+), 43 deletions(-) commit a211432c27ffa32d9978f6c18f5af0c3f8ad2ad1 Author: Darrick J. Wong Date: Tue Jul 2 09:39:38 2019 -0700 xfs: create simplified inode walk function Create a new iterator function to simplify walking inodes in an XFS filesystem. This new iterator will replace the existing open-coded walking that goes on in various places. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/Makefile | 1 + fs/xfs/libxfs/xfs_ialloc_btree.c | 37 +++- fs/xfs/libxfs/xfs_ialloc_btree.h | 3 + fs/xfs/xfs_itable.c | 5 +- fs/xfs/xfs_itable.h | 8 + fs/xfs/xfs_iwalk.c | 389 +++++++++++++++++++++++++++++++++++++++ fs/xfs/xfs_iwalk.h | 19 ++ fs/xfs/xfs_trace.h | 40 ++++ 8 files changed, 496 insertions(+), 6 deletions(-) commit 5bb46e3e180d28c7ee6715f47c344be366a3fcc8 Author: Darrick J. Wong Date: Tue Jul 2 09:39:38 2019 -0700 xfs: create iterator error codes Currently, xfs doesn't have generic error codes defined for "stop iterating"; we just reuse the XFS_BTREE_QUERY_* return values. This looks a little weird if we're not actually iterating a btree index. Before we start adding more iterators, we should create general XFS_ITER_{CONTINUE,ABORT} return values and define the XFS_BTREE_QUERY_* ones from that. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/libxfs/xfs_alloc.c | 2 +- fs/xfs/libxfs/xfs_btree.h | 4 ++-- fs/xfs/libxfs/xfs_shared.h | 6 ++++++ fs/xfs/scrub/agheader.c | 4 ++-- fs/xfs/scrub/repair.c | 4 ++-- fs/xfs/xfs_dquot.c | 2 +- 6 files changed, 14 insertions(+), 8 deletions(-) commit c8f7bc1a080b081a178bff20356cb7575d385f84 Author: Jin Yao Date: Fri Jun 28 17:23:04 2019 +0800 perf diff: Documentation -c cycles option Documentation the new computation selection 'cycles'. v4: --- Change the column 'Block cycles diff [start:end]' to '[Program Block Range] Cycles Diff' Signed-off-by: Jin Yao Reviewed-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: Kan Liang Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1561713784-30533-8-git-send-email-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-diff.txt | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit b10c78c50964da952e6d4db78a3692ab051e6638 Author: Jin Yao Date: Fri Jun 28 17:23:03 2019 +0800 perf diff: Print the basic block cycles diff $ perf record -b ./div $ perf record -b ./div Following is the default perf diff output $ perf diff # Event 'cycles' # # Baseline Delta Abs Shared Object Symbol # ........ ......... ................ .................................. # 48.75% +0.33% div [.] main 8.21% -0.20% div [.] compute_flag 19.02% -0.12% libc-2.23.so [.] __random_r 16.17% -0.09% libc-2.23.so [.] __random 2.27% -0.03% div [.] rand@plt +0.02% [i915] [k] gen8_irq_handler 5.52% +0.02% libc-2.23.so [.] rand This patch creates a new computation selection 'cycles'. $ perf diff -c cycles # Event 'cycles' # # Baseline [Program Block Range] Cycles Diff Shared Object Symbol # ........ ....................................... ......................................... # 48.75% [div.c:42 -> div.c:45] 147 div [.] main 48.75% [div.c:31 -> div.c:40] 4 div [.] main 48.75% [div.c:40 -> div.c:40] 0 div [.] main 48.75% [div.c:42 -> div.c:42] 0 div [.] main 48.75% [div.c:42 -> div.c:44] 0 div [.] main 19.02% [random_r.c:357 -> random_r.c:360] 0 libc-2.23.so [.] __random_r 19.02% [random_r.c:357 -> random_r.c:373] 0 libc-2.23.so [.] __random_r 19.02% [random_r.c:357 -> random_r.c:376] 0 libc-2.23.so [.] __random_r 19.02% [random_r.c:357 -> random_r.c:380] 0 libc-2.23.so [.] __random_r 19.02% [random_r.c:357 -> random_r.c:392] 0 libc-2.23.so [.] __random_r 16.17% [random.c:288 -> random.c:291] 0 libc-2.23.so [.] __random 16.17% [random.c:288 -> random.c:291] 0 libc-2.23.so [.] __random 16.17% [random.c:288 -> random.c:295] 0 libc-2.23.so [.] __random 16.17% [random.c:288 -> random.c:297] 0 libc-2.23.so [.] __random 16.17% [random.c:291 -> random.c:291] 0 libc-2.23.so [.] __random 16.17% [random.c:293 -> random.c:293] 0 libc-2.23.so [.] __random 8.21% [div.c:22 -> div.c:22] 148 div [.] compute_flag 8.21% [div.c:22 -> div.c:25] 0 div [.] compute_flag 8.21% [div.c:27 -> div.c:28] 0 div [.] compute_flag 5.52% [rand.c:26 -> rand.c:27] 0 libc-2.23.so [.] rand 5.52% [rand.c:26 -> rand.c:28] 0 libc-2.23.so [.] rand 2.27% [rand@plt+0 -> rand@plt+0] 0 div [.] rand@plt 0.01% [entry_64.S:694 -> entry_64.S:694] 16 [vmlinux] [k] native_irq_return_iret 0.00% [fair.c:7676 -> fair.c:7665] 162 [vmlinux] [k] update_blocked_averages "[Program Block Range]" indicates the range of program basic block (start -> end). If we can find the source line it prints the source line otherwise it prints the symbol+offset instead. v4: --- Use source lines or symbol+offset to indicate the basic block. It should be easier to understand. v3: --- Cast 'struct hist_entry' to 'struct block_hist' in hist_entry__block_fprintf. Use symbol_conf.report_block to check if executing hist_entry__block_fprintf. v2: --- Keep standard perf diff format and display the 'Baseline' and 'Shared Object'. The output is sorted by "Baseline" and the basic blocks in the same function are sorted by cycles diff. Signed-off-by: Jin Yao Reviewed-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: Kan Liang Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1561713784-30533-7-git-send-email-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-diff.c | 80 ++++++++++++++++++++++++++++++++++++++++--- tools/perf/ui/stdio/hist.c | 27 +++++++++++++++ tools/perf/util/hist.c | 18 ++++++++++ tools/perf/util/hist.h | 3 ++ tools/perf/util/srcline.c | 4 ++- tools/perf/util/symbol_conf.h | 4 ++- 6 files changed, 130 insertions(+), 6 deletions(-) commit f3810817b20645ffae809feb30e9fe260fbd6c4d Author: Jin Yao Date: Fri Jun 28 17:23:02 2019 +0800 perf diff: Link same basic blocks among different data The target is to compare the performance difference (cycles diff) for the same basic blocks in different data files. The same basic block means same function, same start address and same end address. This patch finds the same basic blocks from different data files and link them together and resort by the cycles diff. v3: --- The block stuffs are maintained by new structure 'block_hist', so this patch is update accordingly. v2: --- Since now the basic block hists is changed to per symbol, the patch only links the basic block hists for the same symbol in different data files. Signed-off-by: Jin Yao Reviewed-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: Kan Liang Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1561713784-30533-6-git-send-email-yao.jin@linux.intel.com [ sym->name is an array, not a pointer, so no need to check it for NULL, fixes de build in some distros ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-diff.c | 87 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) commit 99150a1faab2963d3f5bf353354afe79bdddb75f Author: Jin Yao Date: Fri Jun 28 17:23:01 2019 +0800 perf diff: Use hists to manage basic blocks per symbol The hist__account_cycles() can account cycles per basic block. The basic block information is saved in cycles_hist structure. This patch processes each symbol, get basic blocks from cycles_hist and add the basic block entries to a new hists (in 'struct block_hist'). Using a hists is because we need to compare, sort and print the basic blocks later. v6: --- Since 'ops' argument is removed from hists__add_entry_block, update the code accordingly. No functional change. v5: --- Since now we still carry block_info in 'struct hist_entry' we don't need to use our own new/free ops for hist entries. And the block_info is released in hist_entry__delete. v3: --- 1. In v2, we put block stuffs in 'struct hist_entry', but it's not a good design. In v3, we create a new 'struct block_hist' and cast the 'struct hist_entry' to 'struct block_hist' in some places, which can avoid adding new stuffs in 'struct hist_entry'. 2. abs() -> labs(), in block_cycles_diff_cmp(). v2: --- v1 adds the basic block entries to per data-file hists but v2 adds the basic block entries to per symbol hists. That is to keep current perf-diff format. Will show the result in next patches. Signed-off-by: Jin Yao Reviewed-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: Kan Liang Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1561713784-30533-5-git-send-email-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-diff.c | 190 +++++++++++++++++++++++++++++++++++++++++++++- tools/perf/util/hist.c | 3 + tools/perf/util/sort.h | 12 +++ 3 files changed, 202 insertions(+), 3 deletions(-) commit 30d815534e63d737f8004414d12b1679c032e0dd Author: Jin Yao Date: Fri Jun 28 17:23:00 2019 +0800 perf diff: Check if all data files with branch stacks We will expand perf diff to support diff cycles of individual programs blocks, so it requires all data files having branch stacks. This patch checks HEADER_BRANCH_STACK in header, and only set the flag has_br_stack when HEADER_BRANCH_STACK are set in all data files. v2: --- Move check_file_brstack() from __cmd_diff() to cmd_diff(). Because later patch will check flag 'has_br_stack' before ui_init(). Signed-off-by: Jin Yao Reviewed-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: Kan Liang Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1561713784-30533-4-git-send-email-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-diff.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit fe96245c7f38c4ea92c1c599b43f176e27d9921e Author: Jin Yao Date: Fri Jun 28 17:22:59 2019 +0800 perf hists: Add block_info in hist_entry The block_info contains the program basic block information, i.e, contains the start address and the end address of this basic block and how much cycles it takes. We need to compare, sort and even print out the basic block by some orders, i.e. sort by cycles. For this purpose, we add block_info field to hist_entry. In order not to impact current interface, we creates a new function hists__add_entry_block. v6: --- Remove the 'ops' argument in hists__add_entry_block Signed-off-by: Jin Yao Reviewed-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: Kan Liang Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1561713784-30533-3-git-send-email-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/hist.c | 20 ++++++++++++++++++-- tools/perf/util/hist.h | 5 +++++ tools/perf/util/sort.h | 1 + 3 files changed, 24 insertions(+), 2 deletions(-) commit 0cec2447e7d209b77e52c6ec62169cc564df54e7 Author: Jin Yao Date: Fri Jun 28 17:22:58 2019 +0800 perf symbol: Create block_info structure 'perf diff' currently can only diff symbols(functions). We should expand it to diff cycles of individual programs blocks as reported by timed LBR. This would allow to identify changes in specific code accurately. We need a new structure to maintain the basic block information, such as, symbol(function), start/end address of this block, cycles. This patch creates this structure and with some ops. Signed-off-by: Jin Yao Reviewed-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: Kan Liang Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1561713784-30533-2-git-send-email-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/symbol.c | 22 ++++++++++++++++++++++ tools/perf/util/symbol.h | 23 +++++++++++++++++++++++ 2 files changed, 45 insertions(+) commit f607874f35cbd276a837d7147d4e1ec752dfef44 Author: Srinivas Pandruvada Date: Wed Jun 26 15:38:50 2019 -0700 platform/x86: ISST: Restore state on resume Commands which causes PUNIT writes, store them and restore them on system resume. The driver stores all such requests in a hash table and stores the the latest mailbox request parameters. On resume these commands mail box commands are executed again. There are only 5 such mail box commands which will trigger such processing so a very low overhead in store and execute on resume. Also there is no order requirement for mail box commands for these write/set commands. There is one MSR request for changing turbo ratio limits, this also stored and get restored on resume and cpu online. Signed-off-by: Srinivas Pandruvada Signed-off-by: Andy Shevchenko .../x86/intel_speed_select_if/isst_if_common.c | 154 +++++++++++++++++++++ .../x86/intel_speed_select_if/isst_if_common.h | 3 + .../x86/intel_speed_select_if/isst_if_mbox_msr.c | 38 ++++- .../x86/intel_speed_select_if/isst_if_mbox_pci.c | 15 ++ .../x86/intel_speed_select_if/isst_if_mmio.c | 49 +++++++ 5 files changed, 258 insertions(+), 1 deletion(-) commit e765f37b9b8b4fa65682e9a78a2ca2b11d3d9096 Author: Srinivas Pandruvada Date: Wed Jun 26 15:38:49 2019 -0700 platform/x86: ISST: Add Intel Speed Select PUNIT MSR interface While using new non arhitectural features using PUNIT Mailbox and MMIO read/write interface, still there is need to operate using MSRs to control PUNIT. User space could have used user user-space MSR interface for this, but when user space MSR access is disabled, then it can't. Here only limited number of MSRs are allowed using this new interface. Signed-off-by: Srinivas Pandruvada Signed-off-by: Andy Shevchenko .../x86/intel_speed_select_if/isst_if_common.c | 59 ++++++++++++++++++++++ include/uapi/linux/isst_if.h | 32 ++++++++++++ 2 files changed, 91 insertions(+) commit 71b21bd7f68a6ee59003f63d2e4f84fd9b0a8d07 Author: Srinivas Pandruvada Date: Wed Jun 26 15:38:48 2019 -0700 platform/x86: ISST: Add Intel Speed Select mailbox interface via MSRs Add an IOCTL to send mailbox commands to PUNIT using PUNIT MSRs for mailbox. Some CPU models don't have PCI device, so need to use MSRs. A limited set of mailbox commands can be sent to PUNIT. This MMIO interface is used by the intel-speed-select tool under tools/x86/power to enumerate and control Intel Speed Select features. The MBOX commands ids and semantics of the message can be checked from the source code of the tool. Signed-off-by: Srinivas Pandruvada Signed-off-by: Andy Shevchenko .../platform/x86/intel_speed_select_if/Makefile | 1 + .../x86/intel_speed_select_if/isst_if_mbox_msr.c | 180 +++++++++++++++++++++ 2 files changed, 181 insertions(+) commit 31a166fe9c269af17977e650846ee4ea50361c07 Author: Srinivas Pandruvada Date: Wed Jun 26 15:38:47 2019 -0700 platform/x86: ISST: Add Intel Speed Select mailbox interface via PCI Add an IOCTL to send mailbox commands to PUNIT using PUNIT PCI device. A limited set of mailbox commands can be sent to PUNIT. This MMIO interface is used by the intel-speed-select tool under tools/x86/power to enumerate and control Intel Speed Select features. The MBOX commands ids and semantics of the message can be checked from the source code of the tool. Signed-off-by: Srinivas Pandruvada Signed-off-by: Andy Shevchenko .../platform/x86/intel_speed_select_if/Makefile | 1 + .../x86/intel_speed_select_if/isst_if_common.c | 85 +++++++++ .../x86/intel_speed_select_if/isst_if_common.h | 3 + .../x86/intel_speed_select_if/isst_if_mbox_pci.c | 199 +++++++++++++++++++++ include/uapi/linux/isst_if.h | 38 ++++ 5 files changed, 326 insertions(+) commit d3a23584294c1f379239a3b52bac13e03fecd147 Author: Srinivas Pandruvada Date: Wed Jun 26 15:38:46 2019 -0700 platform/x86: ISST: Add Intel Speed Select mmio interface Added MMIO interface to read/write specific offsets in PUNIT PCI device which export core priortization. This MMIO interface can be used using ioctl interface on /dev/isst_interface using IOCTL ISST_IF_IO_CMD. This MMIO interface is used by the intel-speed-select tool under tools/x86/power to enumerate and set core priority. The MMIO offsets and semantics of the message can be checked from the source code of the tool. Signed-off-by: Srinivas Pandruvada Signed-off-by: Andy Shevchenko .../platform/x86/intel_speed_select_if/Makefile | 1 + .../x86/intel_speed_select_if/isst_if_common.c | 6 + .../x86/intel_speed_select_if/isst_if_common.h | 2 + .../x86/intel_speed_select_if/isst_if_mmio.c | 131 +++++++++++++++++++++ include/uapi/linux/isst_if.h | 33 ++++++ 5 files changed, 173 insertions(+) commit fb5b36a413b9f30fba573fc2a596ab7142dfaf12 Author: Srinivas Pandruvada Date: Wed Jun 26 15:38:45 2019 -0700 platform/x86: ISST: Add IOCTL to Translate Linux logical CPU to PUNIT CPU number Add processing for IOCTL command ISST_IF_GET_PHY_ID. This converts from the Linux logical CPU to PUNIT CPU numbering scheme. Signed-off-by: Srinivas Pandruvada Signed-off-by: Andy Shevchenko .../x86/intel_speed_select_if/isst_if_common.c | 74 ++++++++++++++++++++++ include/uapi/linux/isst_if.h | 28 ++++++++ 2 files changed, 102 insertions(+) commit 8fbfb6fc67819c1274584ff902f7d03aafe38dab Author: Srinivas Pandruvada Date: Wed Jun 26 15:38:44 2019 -0700 platform/x86: ISST: Store per CPU information There are two per CPU data needs to be stored and cached to avoid repeated MSR readings for accessing them later: - Physical to logical CPU conversion The PUNIT uses a different CPU numbering scheme which is not APIC id based. So we need to establish relationship between PUNIT CPU number and Linux logical CPU numbering which is based on APIC id. There is an MSR 0x53 (MSR_THREAD_ID), which gets physical CPU number for the local CPU where it is read. Also the CPU mask in some messages will inform which CPUs needs to be online/offline for a TDP level. During TDP switch if user offlined some CPUs, then the physical CPU mask can't be converted as we can't read MSR on an offlined CPU to go to a lower TDP level by onlining more CPUs. So the mapping needs to be established at the boot up time. - Bus number corresponding to a CPU A group of CPUs are in a control of a PUNIT. The PUNIT device is exported as PCI device. To do operation on a PUNIT for a CPU, we need to find out to which PCI device it is related to. This is done by reading MSR 0x128 (MSR_CPU_BUS_NUMBER). So during CPU online stages the above MSRs are read and stored. Later this stored information is used to process IOCTLs request from the user space. Signed-off-by: Srinivas Pandruvada Signed-off-by: Andy Shevchenko .../x86/intel_speed_select_if/isst_if_common.c | 114 ++++++++++++++++++++- .../x86/intel_speed_select_if/isst_if_common.h | 1 + 2 files changed, 114 insertions(+), 1 deletion(-) commit 35f2c14d2a076b063a76c5bf275c46c0743ba3a0 Author: Srinivas Pandruvada Date: Wed Jun 26 15:38:43 2019 -0700 platform/x86: ISST: Add common API to register and handle ioctls Encapsulate common functions which all Intel Speed Select Technology interface drivers can use. This creates API to register misc device for user kernel communication and handle all common IOCTLs. As part of the registry it allows a callback which is to handle domain specific ioctl processing. There can be multiple drivers register for services, which can be built as modules. So this driver handle contention during registry and as well as during removal. Once user space opened the misc device, the registered driver will be prevented from removal. Also once misc device is opened by the user space new client driver can't register, till the misc device is closed. There are two types of client drivers, one to handle mail box interface and the other is to allow direct read/write to some specific MMIO space. This common driver implements IOCTL ISST_IF_GET_PLATFORM_INFO. Signed-off-by: Srinivas Pandruvada Signed-off-by: Andy Shevchenko drivers/platform/x86/Kconfig | 2 + drivers/platform/x86/Makefile | 1 + drivers/platform/x86/intel_speed_select_if/Kconfig | 17 ++ .../platform/x86/intel_speed_select_if/Makefile | 7 + .../x86/intel_speed_select_if/isst_if_common.c | 182 +++++++++++++++++++++ .../x86/intel_speed_select_if/isst_if_common.h | 60 +++++++ include/uapi/linux/isst_if.h | 41 +++++ 7 files changed, 310 insertions(+) commit 2ee5bfc1efc81179c73abcd33098dd2c86019146 Author: Srinivas Pandruvada Date: Wed Jun 26 15:38:42 2019 -0700 platform/x86: ISST: Update ioctl-number.txt for Intel Speed Select interface Reserve ioctl numbers for intel Speed Select Technology interface drivers. Signed-off-by: Srinivas Pandruvada Signed-off-by: Andy Shevchenko Documentation/ioctl/ioctl-number.txt | 1 + 1 file changed, 1 insertion(+) commit 95c5c7c77c06c7037385b3d8d4d7592ab032c3cb Author: Paolo Bonzini Date: Tue Jul 2 14:45:24 2019 +0200 KVM: nVMX: list VMX MSRs in KVM_GET_MSR_INDEX_LIST This allows userspace to know which MSRs are supported by the hypervisor. Unfortunately userspace must resort to tricks for everything except MSR_IA32_VMX_VMFUNC (which was just added in the previous patch). One possibility is to use the feature control MSR, which is tied to nested VMX as well and is present on all KVM versions that support feature MSRs. Signed-off-by: Paolo Bonzini arch/x86/kvm/svm.c | 1 + arch/x86/kvm/vmx/vmx.c | 2 ++ arch/x86/kvm/x86.c | 20 ++++++++++++++++++++ 3 files changed, 23 insertions(+) commit e8a70bd4e92525de459acfa5668c8e1f24664331 Author: Paolo Bonzini Date: Tue Jul 2 14:40:40 2019 +0200 KVM: nVMX: allow setting the VMFUNC controls MSR Allow userspace to set a custom value for the VMFUNC controls MSR, as long as the capabilities it advertises do not exceed those of the host. Fixes: 27c42a1bb ("KVM: nVMX: Enable VMFUNC for the L1 hypervisor", 2017-08-03) Reviewed-by: Liran Alon Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 5 +++++ 1 file changed, 5 insertions(+) commit 6defc591846d0104d1a95f2fb450bdb05a9e738b Author: Paolo Bonzini Date: Tue Jul 2 14:39:29 2019 +0200 KVM: nVMX: include conditional controls in /dev/kvm KVM_GET_MSRS Some secondary controls are automatically enabled/disabled based on the CPUID values that are set for the guest. However, they are still available at a global level and therefore should be present when KVM_GET_MSRS is sent to /dev/kvm. Fixes: 1389309c811 ("KVM: nVMX: expose VMX capabilities for nested hypervisors to userspace", 2018-02-26) Reviewed-by: Liran Alon Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 900a85ca43f4ae88c325a468cb8827e4852b9141 Author: Will Deacon Date: Tue Jul 2 12:53:18 2019 +0100 iommu/arm-smmu-v3: Fix compilation when CONFIG_CMA=n When compiling a kernel without support for CMA, CONFIG_CMA_ALIGNMENT is not defined which results in the following build failure: In file included from ./include/linux/list.h:9:0 from ./include/linux/kobject.h:19, from ./include/linux/of.h:17 from ./include/linux/irqdomain.h:35, from ./include/linux/acpi.h:13, from drivers/iommu/arm-smmu-v3.c:12: drivers/iommu/arm-smmu-v3.c: In function ‘arm_smmu_device_hw_probe’: drivers/iommu/arm-smmu-v3.c:194:40: error: ‘CONFIG_CMA_ALIGNMENT’ undeclared (first use in this function) #define Q_MAX_SZ_SHIFT (PAGE_SHIFT + CONFIG_CMA_ALIGNMENT) Fix the breakage by capping the maximum queue size based on MAX_ORDER when CMA is not enabled. Reported-by: Zhangshaokun Signed-off-by: Will Deacon Tested-by: Shaokun Zhang Signed-off-by: Joerg Roedel drivers/iommu/arm-smmu-v3.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 07ec38917e68f0114b9c8aeeb1c584b5e73e4dd6 Author: Christoph Hellwig Date: Wed Jun 26 14:27:01 2019 +0200 mm: remove the struct hmm_device infrastructure This code is a trivial wrapper around device model helpers, which should have been integrated into the driver device model usage from the start. Assuming it actually had users, which it never had since the code was added more than 1 1/2 years ago. Signed-off-by: Christoph Hellwig Reviewed-by: Jason Gunthorpe Reviewed-by: John Hubbard Reviewed-by: Dan Williams Signed-off-by: Jason Gunthorpe include/linux/hmm.h | 20 -------------- mm/hmm.c | 80 ----------------------------------------------------- 2 files changed, 100 deletions(-) commit c2561e6587a7e57f2f10620efd5b2070d66a5cc5 Author: Christoph Hellwig Date: Wed Jun 26 14:27:00 2019 +0200 mm: remove the unused ARCH_HAS_HMM_DEVICE Kconfig option Signed-off-by: Christoph Hellwig Reviewed-by: Jason Gunthorpe Reviewed-by: Dan Williams Signed-off-by: Jason Gunthorpe mm/Kconfig | 10 ---------- 1 file changed, 10 deletions(-) commit cec5b01f8f1c6064037f3181e7690e3765ed995b Author: Mac Chiang Date: Wed Jun 19 18:18:33 2019 +0800 ASoC: max98357a: avoid speaker pop when playback startup Loud speaker pop happens during playback even when in slience playback. Specify Max98357a amp delay times to make sure clocks are always earlier than sdmode on. Signed-off-by: Mac Chiang Signed-off-by: Mark Brown .../devicetree/bindings/sound/max98357a.txt | 4 ++ sound/soc/codecs/max98357a.c | 55 ++++++++++++++++++---- 2 files changed, 50 insertions(+), 9 deletions(-) commit c5d6c45e90c49150670346967971e14576afd7f1 Author: Ira Weiny Date: Wed Jun 5 14:49:22 2019 -0700 mm/swap: fix release_pages() when releasing devmap pages release_pages() is an optimized version of a loop around put_page(). Unfortunately for devmap pages the logic is not entirely correct in release_pages(). This is because device pages can be more than type MEMORY_DEVICE_PUBLIC. There are in fact 4 types, private, public, FS DAX, and PCI P2PDMA. Some of these have specific needs to "put" the page while others do not. This logic to handle any special needs is contained in put_devmap_managed_page(). Therefore all devmap pages should be processed by this function where we can contain the correct logic for a page put. Handle all device type pages within release_pages() by calling put_devmap_managed_page() on all devmap pages. If put_devmap_managed_page() returns true the page has been put and we continue with the next page. A false return of put_devmap_managed_page() means the page did not require special processing and should fall to "normal" processing. This was found via code inspection while determining if release_pages() and the new put_user_pages() could be interchangeable.[1] [1] https://lkml.kernel.org/r/20190523172852.GA27175@iweiny-DESK2.sc.intel.com Link: https://lkml.kernel.org/r/20190605214922.17684-1-ira.weiny@intel.com Cc: Jérôme Glisse Cc: Michal Hocko Reviewed-by: Dan Williams Reviewed-by: John Hubbard Signed-off-by: Ira Weiny Signed-off-by: Jason Gunthorpe mm/swap.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 05f31e3bf6b34fe6e4922868d132f6455f81d5bf Author: Pierre Morel Date: Tue May 21 17:34:37 2019 +0200 s390: ap: kvm: Enable PQAP/AQIC facility for the guest AP Queue Interruption Control (AQIC) facility gives the guest the possibility to control interruption for the Cryptographic Adjunct Processor queues. Signed-off-by: Pierre Morel Reviewed-by: Tony Krowiak Acked-by: Harald Freudenberger Acked-by: Christian Borntraeger Signed-off-by: Halil Pasic [ Modified while picking: we may not expose STFLE facility 65 unconditionally because AIV is a pre-requirement.] Signed-off-by: Vasily Gorbik arch/s390/kvm/kvm-s390.c | 3 +++ 1 file changed, 3 insertions(+) commit ec89b55e3bce7c8a4bc6b1203280e81342d6745c Author: Pierre Morel Date: Tue May 21 17:34:36 2019 +0200 s390: ap: implement PAPQ AQIC interception in kernel We register a AP PQAP instruction hook during the open of the mediated device. And unregister it on release. During the probe of the AP device, we allocate a vfio_ap_queue structure to keep track of the information we need for the PQAP/AQIC instruction interception. In the AP PQAP instruction hook, if we receive a demand to enable IRQs, - we retrieve the vfio_ap_queue based on the APQN we receive in REG1, - we retrieve the page of the guest address, (NIB), from register REG2 - we retrieve the mediated device to use the VFIO pinning infrastructure to pin the page of the guest address, - we retrieve the pointer to KVM to register the guest ISC and retrieve the host ISC - finaly we activate GISA If we receive a demand to disable IRQs, - we deactivate GISA - unregister from the GIB - unpin the NIB When removing the AP device from the driver the device is reseted and this process unregisters the GISA from the GIB, and unpins the NIB address then we free the vfio_ap_queue structure. Signed-off-by: Pierre Morel Acked-by: Tony Krowiak Acked-by: Harald Freudenberger Signed-off-by: Halil Pasic Signed-off-by: Vasily Gorbik drivers/s390/crypto/vfio_ap_drv.c | 34 +++- drivers/s390/crypto/vfio_ap_ops.c | 337 +++++++++++++++++++++++++++++++++- drivers/s390/crypto/vfio_ap_private.h | 11 ++ 3 files changed, 375 insertions(+), 7 deletions(-) commit 62e358ce586b53562a5efcfdbaddc5bd285e6484 Author: Pierre Morel Date: Tue May 21 17:34:35 2019 +0200 vfio: ap: register IOMMU VFIO notifier To be able to use the VFIO interface to facilitate the mediated device memory pinning/unpinning we need to register a notifier for IOMMU. While we will start to pin one guest page for the interrupt indicator byte, this is still ok with ballooning as this page will never be used by the guest virtio-balloon driver. So the pinned page will never be freed. And even a broken guest does so, that would not impact the host as the original page is still in control by vfio. Signed-off-by: Pierre Morel Reviewed-by: Cornelia Huck Reviewed-by: Tony Krowiak Acked-by: Harald Freudenberger Signed-off-by: Halil Pasic Signed-off-by: Vasily Gorbik drivers/s390/crypto/vfio_ap_ops.c | 43 ++++++++++++++++++++++++++++++++++- drivers/s390/crypto/vfio_ap_private.h | 2 ++ 2 files changed, 44 insertions(+), 1 deletion(-) commit e5282de931057e2baa4bd73235a0773fde6e9649 Author: Pierre Morel Date: Tue May 21 17:34:34 2019 +0200 s390: ap: kvm: add PQAP interception for AQIC We prepare the interception of the PQAP/AQIC instruction for the case the AQIC facility is enabled in the guest. First of all we do not want to change existing behavior when intercepting AP instructions without the SIE allowing the guest to use AP instructions. In this patch we only handle the AQIC interception allowed by facility 65 which will be enabled when the complete interception infrastructure will be present. We add a callback inside the KVM arch structure for s390 for a VFIO driver to handle a specific response to the PQAP instruction with the AQIC command and only this command. But we want to be able to return a correct answer to the guest even there is no VFIO AP driver in the kernel. Therefor, we inject the correct exceptions from inside KVM for the case the callback is not initialized, which happens when the vfio_ap driver is not loaded. We do consider the responsibility of the driver to always initialize the PQAP callback if it defines queues by initializing the CRYCB for a guest. If the callback has been setup we call it. If not we setup an answer considering that no queue is available for the guest when no callback has been setup. Signed-off-by: Pierre Morel Reviewed-by: Tony Krowiak Acked-by: Harald Freudenberger Acked-by: Christian Borntraeger Signed-off-by: Halil Pasic Signed-off-by: Vasily Gorbik arch/s390/include/asm/kvm_host.h | 7 +++ arch/s390/kvm/priv.c | 86 +++++++++++++++++++++++++++++++++++ drivers/s390/crypto/vfio_ap_private.h | 2 + 3 files changed, 95 insertions(+) commit da1776733617c4a92319eddb4e765ce60426b20a Author: Vasily Gorbik Date: Thu Jun 20 10:18:35 2019 +0200 s390/unwind: cleanup unused READ_ONCE_TASK_STACK Kasan instrumentation of backchain unwinder stack reads is disabled completely and simply uses READ_ONCE_NOCHECK now. READ_ONCE_TASK_STACK macro is unused and could be removed. Signed-off-by: Vasily Gorbik arch/s390/include/asm/unwind.h | 19 ------------------- 1 file changed, 19 deletions(-) commit 20955746320e252b41c6b3505587766012e3e06d Author: Vasily Gorbik Date: Thu Jun 20 10:18:31 2019 +0200 s390/kasan: avoid false positives during stack unwind Avoid kasan false positive when current task is interrupted in-between stack frame allocation and backchain write instructions leaving new stack frame backchain invalid. In particular if backchain is 0 the unwinder tries to read pt_regs from the stack and might hit kasan poisoned bytes, leading to kasan "stack-out-of-bounds" report. Disable kasan instrumentation of unwinder stack reads, since this limitation couldn't be handled otherwise with current backchain unwinder implementation. Fixes: 78c98f907413 ("s390/unwind: introduce stack unwind API") Reported-by: Julian Wiedmann Tested-by: Benjamin Block Signed-off-by: Vasily Gorbik arch/s390/kernel/unwind_bc.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit ac6639cd3db607d386616487902b4cc1850a7be5 Author: Julian Wiedmann Date: Tue Jun 18 13:12:20 2019 +0200 s390/qdio: don't touch the dsci in tiqdio_add_input_queues() Current code sets the dsci to 0x00000080. Which doesn't make any sense, as the indicator area is located in the _left-most_ byte. Worse: if the dsci is the _shared_ indicator, this potentially clears the indication of activity for a _different_ device. tiqdio_thinint_handler() will then have no reason to call that device's IRQ handler, and the device ends up stalling. Fixes: d0c9d4a89fff ("[S390] qdio: set correct bit in dsci") Cc: Signed-off-by: Julian Wiedmann Signed-off-by: Vasily Gorbik drivers/s390/cio/qdio_thinint.c | 1 - 1 file changed, 1 deletion(-) commit e54e4785cb5cb4896cf4285964aeef2125612fb2 Author: Julian Wiedmann Date: Tue Jun 18 11:25:59 2019 +0200 s390/qdio: (re-)initialize tiqdio list entries When tiqdio_remove_input_queues() removes a queue from the tiq_list as part of qdio_shutdown(), it doesn't re-initialize the queue's list entry and the prev/next pointers go stale. If a subsequent qdio_establish() fails while sending the ESTABLISH cmd, it calls qdio_shutdown() again in QDIO_IRQ_STATE_ERR state and tiqdio_remove_input_queues() will attempt to remove the queue entry a second time. This dereferences the stale pointers, and bad things ensue. Fix this by re-initializing the list entry after removing it from the list. For good practice also initialize the list entry when the queue is first allocated, and remove the quirky checks that papered over this omission. Note that prior to commit e521813468f7 ("s390/qdio: fix access to uninitialized qdio_q fields"), these checks were bogus anyway. setup_queues_misc() clears the whole queue struct, and thus needs to re-init the prev/next pointers as well. Fixes: 779e6e1c724d ("[S390] qdio: new qdio driver.") Cc: Signed-off-by: Julian Wiedmann Signed-off-by: Vasily Gorbik drivers/s390/cio/qdio_setup.c | 2 ++ drivers/s390/cio/qdio_thinint.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) commit 83eb1a415023e6489bf5adb467f20156722172f0 Author: Dan Carpenter Date: Wed Jun 26 13:06:58 2019 +0300 s390/dasd: Fix a precision vs width bug in dasd_feature_list() The "len" variable is the length of the option up to the next option or to the end of the string which ever first. We want to print the invalid option so we want precision "%.*s" but the format is width "%*s" so it prints up to the end of the string. Signed-off-by: Dan Carpenter Tested-by: Stefan Haberland Signed-off-by: Stefan Haberland Signed-off-by: Vasily Gorbik drivers/s390/block/dasd_devmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ebc3d179150347f3b6d97d8f249378bb2218f95e Author: Cornelia Huck Date: Thu Jun 13 13:08:15 2019 +0200 s390/cio: introduce driver_override on the css bus Sometimes, we want to control which of the matching drivers binds to a subchannel device (e.g. for subchannels we want to handle via vfio-ccw). For pci devices, a mechanism to do so has been introduced in 782a985d7af2 ("PCI: Introduce new device binding path using pci_dev.driver_override"). It makes sense to introduce the driver_override attribute for subchannel devices as well, so that we can easily extend the 'driverctl' tool (which makes use of the driver_override attribute for pci). Note that unlike pci we still require a driver override to match the subchannel type; matching more than one subchannel type is probably not useful anyway. Signed-off-by: Cornelia Huck Reviewed-by: Halil Pasic Reviewed-by: Sebastian Ott Signed-off-by: Sebastian Ott Signed-off-by: Vasily Gorbik Documentation/ABI/testing/sysfs-bus-css | 23 ++++++++++++++ drivers/s390/cio/cio.h | 1 + drivers/s390/cio/css.c | 53 +++++++++++++++++++++++++++++++++ 3 files changed, 77 insertions(+) commit 0c69b93112428d43b8c103d032143ea89b895d43 Author: Jiri Olsa Date: Tue Jul 2 14:12:40 2019 +0200 objtool: Fix build by linking against tools/lib/ctype.o sources Fix objtool build, because it adds _ctype dependency via isspace call patch. Signed-off-by: Jiri Olsa Cc: Adrian Hunter Cc: André Goddard Rosa Cc: Clark Williams Cc: Jiri Olsa Cc: Namhyung Kim Cc: Thomas Gleixner Fixes: 7bd330de43fd ("tools lib: Adopt skip_spaces() from the kernel sources") Link: http://lkml.kernel.org/r/20190702121240.GB12694@krava Signed-off-by: Arnaldo Carvalho de Melo tools/objtool/Build | 5 +++++ 1 file changed, 5 insertions(+) commit e5704b3fe9d5ffa810abd8ce00215f52f3fd675b Author: Arnd Bergmann Date: Fri Jun 28 12:39:05 2019 +0200 drm: connector: remove bogus NULL check mode->name is a character array in a structure, checking it's address is pointless and causes a warning with some compilers: drivers/gpu/drm/drm_connector.c:144:15: error: address of array 'mode->name' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] mode->name ? mode->name : "", ~~~~~~^~~~ ~ include/drm/drm_print.h:366:29: note: expanded from macro 'DRM_DEBUG_KMS' drm_dbg(DRM_UT_KMS, fmt, ##__VA_ARGS__) ^~~~~~~~~~~ Remove the check here. Fixes: 3aeeb13d8996 ("drm/modes: Support modes names on the command line") Signed-off-by: Arnd Bergmann Reviewed-by: Ramalingam C Reviewed-by: Boris Brezillon Signed-off-by: Boris Brezillon Link: https://patchwork.freedesktop.org/patch/msgid/20190628103925.2686249-1-arnd@arndb.de drivers/gpu/drm/drm_connector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ab735611402f4278420068fc37cfb03dab626436 Author: Tudor Ambarus Date: Fri Jun 28 15:30:34 2019 +0000 spi: atmel-quadspi: fix resume call When waking up from the Suspend-to-RAM state, the following error was seen: m25p80 spi2.0: flash operation timed out The flash remained in an undefined state, returning 0xFFs. Fix it by setting the Serial Clock Baud Rate, as it was set before the conversion to SPIMEM. Tested with sama5d2_xplained and mx25l25673g spi-nor in Backup + Self-Refresh and Suspend modes. Fixes: 0e6aae08e9ae ("spi: Add QuadSPI driver for Atmel SAMA5D2") Reported-by: Mark Deneen Signed-off-by: Tudor Ambarus Signed-off-by: Mark Brown drivers/spi/atmel-quadspi.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 4b9b73b86571e8a03fb09232ff72177e66bf9ef9 Author: Kuninori Morimoto Date: Fri Jun 28 13:10:31 2019 +0900 ASoC: pxa: pxa2xx-ac97.c: use devm_snd_soc_register_component() We have devm_xxx version of snd_soc_register_component, let's use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/pxa/pxa2xx-ac97.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit dcbe6ed32e06b7811e082806a9c0f84d3a238d18 Author: Kuninori Morimoto Date: Fri Jun 28 13:09:50 2019 +0900 ASoC: cros_ec_codec: use devm_snd_soc_register_component() We have devm_xxx version of snd_soc_register_component, let's use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/cros_ec_codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 35407f9ffd84560501f72ee3954344f8e5b49264 Author: Kuninori Morimoto Date: Fri Jun 28 13:09:40 2019 +0900 ASoC: ak4118: use devm_snd_soc_register_component() We have devm_xxx version of snd_soc_register_component, let's use it. This patch also removes related empty functions Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/ak4118.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit 61c8a7d6ff11a31fc4ea47667c5f33119be7bcd3 Author: Kuninori Morimoto Date: Fri Jun 28 13:09:28 2019 +0900 ASoC: rt5682: use devm_snd_soc_register_component() We have devm_xxx version of snd_soc_register_component, let's use it. This patch also removes related empty functions Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/rt5682.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) commit cb9002a186329b35f32f74021551aecbfe9a696c Author: Kuninori Morimoto Date: Fri Jun 28 13:09:00 2019 +0900 ASoC: cirrus: ep93xx-i2s.c: use devm_snd_soc_register_component() We have devm_xxx version of snd_soc_register_component, let's use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/cirrus/ep93xx-i2s.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 7422104037773624d2a6cdb9becb68278befbd88 Author: Kuninori Morimoto Date: Fri Jun 28 13:08:48 2019 +0900 ASoC: au1x: psc-i2s.c: use devm_snd_soc_register_component() We have devm_xxx version of snd_soc_register_component, let's use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/au1x/psc-i2s.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 5b74e9a306267be3b371b309faef8626b18e6423 Author: Tudor Ambarus Date: Fri Jun 28 15:30:32 2019 +0000 spi: atmel-quadspi: void return type for atmel_qspi_init() commit 2d30ac5ed633 ("mtd: spi-nor: atmel-quadspi: Use spi-mem interface for atmel-quadspi driver") removed the error path from atmel_qspi_init(), but not changed the function's return type. Set void return type for atmel_qspi_init(). Signed-off-by: Tudor Ambarus Signed-off-by: Mark Brown drivers/spi/atmel-quadspi.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 23cdddb21f41e6092643fb8403f992f99ade33be Author: Jarkko Nikula Date: Fri Jun 28 17:07:17 2019 +0300 spi: pxa2xx: Set minimum transfer speed It is possible to request a transfer with a speed lower than supported by the HW. This causes silent divider calculation underflow in ssp_get_clk_div() which leads to a frequency higher than requested. Up to maximum speed of the controller. Set the minimum supported transfer speed and let the SPI core to validate no transfers have speed lower than supported. Signed-off-by: Jarkko Nikula Signed-off-by: Mark Brown drivers/spi/spi-pxa2xx.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit d6d02bc6e80453ca004e101eae28d741bde54426 Author: Fabrice Gasnier Date: Mon Jul 1 10:14:22 2019 +0200 dt-bindings: regulator: add support for the stm32-booster Document the 3.3V booster regulator embedded in stm32h7 and stm32mp1 devices, that can be used to supply ADC analog input switches. It's controlled by using system configuration registers (SYSCFG). Introduce two compatibles as the booster regulator is controlled by: - a unique register/bit in STM32H7 - a set/clear register pair in STM32MP1 Signed-off-by: Fabrice Gasnier Signed-off-by: Mark Brown .../devicetree/bindings/regulator/st,stm32-booster.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 4e210fbeee8e2f0eb04761c624fcccc8401eba4c Author: Fabrice Gasnier Date: Mon Jul 1 10:14:23 2019 +0200 regulator: add support for the stm32-booster Add support for the 3.3V booster regulator embedded in stm32h7 and stm32mp1 devices, that can be used to supply ADC analog input switches. This regulator is supplied by vdda. It's controlled by using SYSCFG: - STM32H7 has a unique register to set/clear the booster enable bit - STM32MP1 has separate set and clear registers to configure it. Signed-off-by: Fabrice Gasnier Signed-off-by: Mark Brown drivers/regulator/Kconfig | 11 ++++ drivers/regulator/Makefile | 1 + drivers/regulator/stm32-booster.c | 132 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 144 insertions(+) commit 9d83dcb3e4553f34ee1c4f09d65173159f9eb7a7 Author: Krzysztof Kozlowski Date: Sat Jun 29 13:44:46 2019 +0200 regulator: s2mps11: Adjust supported buck voltages to real values The driver was registering buck regulators with unsupported range of voltages for S2MPS11 devices. Basically it assumed that all 256 values are possible for a single 8-bit I2C register controlling buck's voltage. This is not true, as datasheet describes subset of these which can be used. For example for buck[12346] the minimum voltage is 650 mV which corresponds to register value of 0x8. The driver was however registering regulator starting at 600 mV, so for a step of 6.25 mV this gave the same result. However this allowed to try to configure regulators to unsupported values. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Mark Brown drivers/regulator/s2mps11.c | 27 +++++++++++++++++---------- include/linux/mfd/samsung/core.h | 1 + include/linux/mfd/samsung/s2mps11.h | 4 +++- 3 files changed, 21 insertions(+), 11 deletions(-) commit 16da0eb5ab6ef2dd1d33431199126e63db9997cc Author: Krzysztof Kozlowski Date: Sat Jun 29 13:44:45 2019 +0200 regulator: s2mps11: Fix buck7 and buck8 wrong voltages On S2MPS11 device, the buck7 and buck8 regulator voltages start at 750 mV, not 600 mV. Using wrong minimal value caused shifting of these regulator values by 150 mV (e.g. buck7 usually configured to v1.35 V was reported as 1.2 V). On most of the boards these regulators are left in default state so this was only affecting reported voltage. However if any driver wanted to change them, then effectively it would set voltage 150 mV higher than intended. Cc: Fixes: cb74685ecb39 ("regulator: s2mps11: Add samsung s2mps11 regulator driver") Signed-off-by: Krzysztof Kozlowski Signed-off-by: Mark Brown drivers/regulator/s2mps11.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2d2e331697bfba9dcc59217b1fcbfa2c144f0659 Author: YueHaibing Date: Tue Jul 2 06:17:38 2019 +0000 ASoC: rt1308: Fix platform_no_drv_owner.cocci warnings Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: YueHaibing Signed-off-by: Mark Brown sound/soc/codecs/rt1308.c | 1 - 1 file changed, 1 deletion(-) commit 559e92f78778a171adfb152f49a78e202f5b39df Author: YueHaibing Date: Sat Jun 29 02:43:33 2019 +0000 ASoC: madera: Remove duplicated include from cs47l35.c Remove duplicated include. Signed-off-by: YueHaibing Signed-off-by: Mark Brown sound/soc/codecs/cs47l35.c | 1 - 1 file changed, 1 deletion(-) commit 0a882e28468f48ab3d9a36dde0a5723ea29ed1ed Author: Nicholas Piggin Date: Fri Jun 28 16:33:18 2019 +1000 powerpc/64s/exception: remove bad stack branch The bad stack test in interrupt handlers has a few problems. For performance it is taken in the common case, which is a fetch bubble and a waste of i-cache. For code development and maintainence, it requires yet another stack frame setup routine, and that constrains all exception handlers to follow the same register save pattern which inhibits future optimisation. Remove the test/branch and replace it with a trap. Teach the program check handler to use the emergency stack for this case. This does not result in quite so nice a message, however the SRR0 and SRR1 of the crashed interrupt can be seen in r11 and r12, as is the original r1 (adjusted by INT_FRAME_SIZE). These are the most important parts to debugging the issue. The original r9-12 and cr0 is lost, which is the main downside. kernel BUG at linux/arch/powerpc/kernel/exceptions-64s.S:847! Oops: Exception in kernel mode, sig: 5 [#1] BE SMP NR_CPUS=2048 NUMA PowerNV Modules linked in: CPU: 0 PID: 1 Comm: swapper/0 Not tainted NIP: c000000000009108 LR: c000000000cadbcc CTR: c0000000000090f0 REGS: c0000000fffcbd70 TRAP: 0700 Not tainted MSR: 9000000000021032 CR: 28222448 XER: 20040000 CFAR: c000000000009100 IRQMASK: 0 GPR00: 000000000000003d fffffffffffffd00 c0000000018cfb00 c0000000f02b3166 GPR04: fffffffffffffffd 0000000000000007 fffffffffffffffb 0000000000000030 GPR08: 0000000000000037 0000000028222448 0000000000000000 c000000000ca8de0 GPR12: 9000000002009032 c000000001ae0000 c000000000010a00 0000000000000000 GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 GPR20: c0000000f00322c0 c000000000f85200 0000000000000004 ffffffffffffffff GPR24: fffffffffffffffe 0000000000000000 0000000000000000 000000000000000a GPR28: 0000000000000000 0000000000000000 c0000000f02b391c c0000000f02b3167 NIP [c000000000009108] decrementer_common+0x18/0x160 LR [c000000000cadbcc] .vsnprintf+0x3ec/0x4f0 Call Trace: Instruction dump: 996d098a 994d098b 38610070 480246ed 48005518 60000000 38200000 718a4000 7c2a0b78 3821fd00 41c20008 e82d0970 <0981fd00> f92101a0 f9610170 f9810178 Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/exception-64s.h | 7 --- arch/powerpc/include/asm/paca.h | 2 + arch/powerpc/kernel/asm-offsets.c | 2 + arch/powerpc/kernel/exceptions-64s.S | 96 ++++++-------------------------- arch/powerpc/xmon/xmon.c | 2 + 5 files changed, 22 insertions(+), 87 deletions(-) commit f30a5e68f026f3214a9392391537adaa79996b24 Author: Nicholas Piggin Date: Fri Jun 28 15:33:32 2019 +1000 powerpc/tm: update comment about interrupt re-entrancy Since the system reset interrupt began to use its own stack, and machine check interrupts have done so for some time, r1 can be changed without clearing MSR[RI], provided no other interrupts (including SLB misses) are taken. MSR[RI] does have to be cleared when using SCRATCH0, however. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/tm.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d7fb34c704719d3c91455297678aa75d9da95817 Author: Nicholas Piggin Date: Fri Jun 28 15:33:31 2019 +1000 powerpc/64s/exception: move SET_SCRATCH0 into EXCEPTION_PROLOG_0 No generated code change. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) commit 904f81f3f36d84a4d26c712a9c7741a397a4f348 Author: Nicholas Piggin Date: Fri Jun 28 15:33:30 2019 +1000 powerpc/64s/exception: denorm handler use standard scratch save macro Although the 0x1500 interrupt only applies to bare metal, it is better to just use the standard macro for scratch save. Runtime code path remains unchanged (due to instruction patching). Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 02a1258154eec78783bd7e90d4ee1361c853db66 Author: Nicholas Piggin Date: Fri Jun 28 15:33:29 2019 +1000 powerpc/64s/exception: machine check use standard macros to save dar/dsisr Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 5312c4941e0d0185bb2c95d666d607292b7e3e57 Author: Nicholas Piggin Date: Fri Jun 28 15:33:28 2019 +1000 powerpc/64s/exception: add dar and dsisr options to exception macro Some exception entry requires DAR and/or DSISR to be saved into the paca exception save area. Add options to the standard exception macros for these. Generated code changes slightly due to code structure. - 554: a6 02 72 7d mfdsisr r11 - 558: a8 00 4d f9 std r10,168(r13) - 55c: b0 00 6d 91 stw r11,176(r13) + 554: a8 00 4d f9 std r10,168(r13) + 558: a6 02 52 7d mfdsisr r10 + 55c: b0 00 4d 91 stw r10,176(r13) Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 101 ++++++++++++++++------------------- 1 file changed, 45 insertions(+), 56 deletions(-) commit 391e941b891543f5d79c6be2f8f678cc15f7da5a Author: Nicholas Piggin Date: Fri Jun 28 15:33:27 2019 +1000 powerpc/64s/exception: use common macro for windup No generated code change. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 112 +++++++++++------------------------ 1 file changed, 36 insertions(+), 76 deletions(-) commit b113c083414ed91c116483ebe74fb20c8b1ddcd3 Author: Nicholas Piggin Date: Fri Jun 28 15:33:26 2019 +1000 powerpc/64s/exception: shuffle windup code around Restore all SPRs and CR up-front, these are longer latency instructions. Move register restore around to maximise pairs of adjacent loads (e.g., restore r0 next to r1). Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 40 +++++++++++++++--------------------- 1 file changed, 16 insertions(+), 24 deletions(-) commit 67d4160a61a0dd63eef10392e4154433a0a64ac3 Author: Nicholas Piggin Date: Fri Jun 28 15:33:25 2019 +1000 powerpc/64s/exception: simplify hmi windup code Duplicate the hmi windup code for both cases, rather than to put a special case branch in the middle of it. Remove unused label. This helps with later code consolidation. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) commit ad73d8d4f4a7994b234020fc6484c87672b0c404 Author: Nicholas Piggin Date: Fri Jun 28 15:33:24 2019 +1000 powerpc/64s/exception: move machine check windup in_mce handling Move in_mce decrement earlier before registers are restored (but still after RI=0). This helps with later consolidation. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9592b29a9cf14db596c752349e7d5b7a29d3bf90 Author: Nicholas Piggin Date: Fri Jun 28 15:33:23 2019 +1000 powerpc/64s/exception: windup use r9 consistently to restore SPRs Trivial code change, r3->r9. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit fbc50063a2358f685deaa2f8370a55e3df5ef3ab Author: Nicholas Piggin Date: Fri Jun 28 15:33:22 2019 +1000 powerpc/64s/exception: mtmsrd L=1 cleanup All supported 64s CPUs support mtmsrd L=1 instruction, so a cleanup can be made in sreset and mce handlers. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 63d60d0c6946fd6874a099540e0ac9e26661f8dd Author: Nicholas Piggin Date: Fri Jun 28 15:33:21 2019 +1000 powerpc/64s/exception: avoid SPR RAW scoreboard stall in real mode entry Move SPR reads ahead of writes. Real mode entry that is not a KVM guest is rare these days, but bad practice propagates. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit b0b2a93da4c95ac808c4c43f24a1873ae3166a1a Author: Nicholas Piggin Date: Fri Jun 28 15:33:20 2019 +1000 powerpc/64s/exception: clean up system call entry syscall / hcall entry unnecessarily differs between KVM and non-KVM builds. Move the SMT priority instruction to the same location (after INTERRUPT_TO_KERNEL). Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) commit 1582009113bc1336d4e54de1d94014ca3569c483 Author: Nicholas Piggin Date: Sat Jun 22 23:15:35 2019 +1000 powerpc/64s/exception: move paca save area offsets into exception-64s.S No generated code change. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/exception-64s.h | 17 +++-------------- arch/powerpc/kernel/exceptions-64s.S | 22 ++++++++++++++++++++++ 2 files changed, 25 insertions(+), 14 deletions(-) commit d064151fd33b1b0ebeb732ae978cb3587e934ff9 Author: Nicholas Piggin Date: Sat Jun 22 23:15:34 2019 +1000 powerpc/64s/exception: remove pointless EXCEPTION_PROLOG macro indirection No generated code change. Final vmlinux is changed only due to change in bug table line numbers. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 108 +++++++++++++++++------------------ 1 file changed, 51 insertions(+), 57 deletions(-) commit 7efd105c27fd2323789b41b64763a0e33ed79c08 Author: Axel Lin Date: Wed Jun 26 21:30:07 2019 +0800 mfd: hi655x-pmic: Fix missing return value check for devm_regmap_init_mmio_clk Since devm_regmap_init_mmio_clk can fail, add return value checking. Signed-off-by: Axel Lin Acked-by: Chen Feng Signed-off-by: Lee Jones drivers/mfd/hi655x-pmic.c | 2 ++ 1 file changed, 2 insertions(+) commit d6871a73387d51dfdde6ad1479aea54d3eafcc89 Author: Charles Keepax Date: Wed Jun 26 14:33:36 2019 +0100 mfd: madera: Fixup SPDX headers GPL-2.0-only is the preferred way of expressing v2 of the GPL, so switch to that. Remove some redundant copyright notices and correct some instances where the wrong comment type has been used in header files. Signed-off-by: Charles Keepax Signed-off-by: Lee Jones drivers/mfd/cs47l15-tables.c | 2 +- drivers/mfd/cs47l35-tables.c | 6 +----- drivers/mfd/cs47l85-tables.c | 6 +----- drivers/mfd/cs47l90-tables.c | 6 +----- drivers/mfd/cs47l92-tables.c | 2 +- drivers/mfd/madera-core.c | 6 +----- drivers/mfd/madera-i2c.c | 6 +----- drivers/mfd/madera-spi.c | 6 +----- include/linux/mfd/madera/core.h | 6 +----- include/linux/mfd/madera/pdata.h | 6 +----- include/linux/mfd/madera/registers.h | 6 +----- 11 files changed, 11 insertions(+), 47 deletions(-) commit 0772a34bb8a12fcc245074e0f76e96cba2c9a434 Author: Charles Keepax Date: Wed Jun 26 14:33:35 2019 +0100 mfd: madera: Remove some unused registers and fix some defaults Signed-off-by: Charles Keepax Signed-off-by: Lee Jones drivers/mfd/cs47l15-tables.c | 2 - drivers/mfd/cs47l35-tables.c | 54 +--------------- drivers/mfd/cs47l85-tables.c | 122 ++--------------------------------- drivers/mfd/cs47l90-tables.c | 76 ---------------------- drivers/mfd/cs47l92-tables.c | 1 - include/linux/mfd/madera/registers.h | 80 ----------------------- 6 files changed, 6 insertions(+), 329 deletions(-) commit 02f36911c1b41fcd8779fa0c135aab0554333fa5 Author: Andy Shevchenko Date: Fri Jun 21 15:56:31 2019 +0300 mfd: intel-lpss: Release IDA resources ida instances allocate some internal memory for ->free_bitmap in addition to the base 'struct ida'. Use ida_destroy() to release that memory at module_exit(). Fixes: 4b45efe85263 ("mfd: Add support for Intel Sunrisepoint LPSS devices") Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones drivers/mfd/intel-lpss.c | 1 + 1 file changed, 1 insertion(+) commit 01e4ecee03aa81ec3565d70c80cd1282088fc5a6 Author: Andy Shevchenko Date: Fri Jun 21 15:58:07 2019 +0300 mfd: intel-lpss: Add Intel Elkhart Lake PCH PCI IDs Intel Elkhart Lake has the same LPSS than Intel Broxton. Add the new IDs to the list of supported devices. Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones drivers/mfd/intel-lpss-pci.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit fd54d65dd4578320d1c3505acffa3e0154a9fe5d Author: Lubomir Rintel Date: Thu Jun 20 13:19:57 2019 +0200 mfd: cs5535-mfd: Remove ifdef OLPC noise provides machine_is_olpc() stub for CONFIG_OLPC=n, compiler should just optimize the unneeded bits away. Signed-off-by: Lubomir Rintel Signed-off-by: Lee Jones drivers/mfd/cs5535-mfd.c | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) commit b1c83bd84618e5a3ec6395845d11803047a3ef9a Author: Nathan Chancellor Date: Fri May 10 18:23:01 2019 -0700 mfd: stmfx: Fix macro definition spelling Clang warns: In file included from drivers/mfd/stmfx.c:13: include/linux/mfd/stmfx.h:7:9: warning: 'MFD_STMFX_H' is used as a header guard here, followed by #define of a different macro [-Wheader-guard] Fixes: 06252ade9156 ("mfd: Add ST Multi-Function eXpander (STMFX) core driver") Link: https://github.com/ClangBuiltLinux/linux/issues/475 Signed-off-by: Nathan Chancellor Signed-off-by: Lee Jones include/linux/mfd/stmfx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 84bdde17c5d60dea93c1db60d87059c8ca772360 Author: Matti Vaittinen Date: Thu Jun 13 15:12:38 2019 +0300 dt-bindings: mfd: Add link to ROHM BD71847 Datasheet ROHM BD71847 PMIC datasheet was published. Add datasheet link for BD71847 as well. Signed-off-by: Matti Vaittinen Signed-off-by: Lee Jones Documentation/devicetree/bindings/mfd/rohm,bd71837-pmic.txt | 2 ++ 1 file changed, 2 insertions(+) commit 90dab47c968f8cad7703c545da9c1be1ca035e56 Author: Andy Shevchenko Date: Mon Feb 11 12:57:10 2019 +0200 MAINAINERS: Swap words in INTEL PMIC MULTIFUNCTION DEVICE DRIVERS Swap PMIC and MULTIFUNCTION words in the title to: - show that this is about Intel PMICs - keep MAINTAINERS properly sorted Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ecc2ca47f3cd5b5851496d8261b1b14463d4a726 Author: Gwendal Grignou Date: Tue Jun 11 00:12:36 2019 -0700 mfd: cros_ec_dev: Register cros_ec_accel_legacy driver as a subdevice With this patch, the cros_ec_ctl driver will register the legacy accelerometer driver (named cros_ec_accel_legacy) if it fails to register sensors through the usual path cros_ec_sensors_register(). This legacy device is present on Chromebook devices with older EC firmware only supporting deprecated EC commands: - Glimmer based devices [Intel SOC using LPC transport] - Veyron minnie devices [ARM SOC using SPI transport] Tested-by: Gwendal Grignou Signed-off-by: Enric Balletbo i Serra Reviewed-by: Andy Shevchenko Signed-off-by: Gwendal Grignou Signed-off-by: Lee Jones drivers/mfd/cros_ec_dev.c | 69 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) commit ac195d94280a783f030a01ee84998a198b779d99 Author: Stefan Mavrodiev Date: Fri Jun 7 15:42:26 2019 +0300 mfd: rk808: Prepare rk805 for poweroff RK805 has SLEEP signal, which can put the device into SLEEP or OFF mode. The default is SLEEP mode. However, when the kernel performs power-off (actually the ATF) the device will not go fully off and this will result in higher power consumption and inability to wake the device with RTC alarm. The solution is to enable pm_power_off_prepare function, which will configure SLEEP pin for OFF function. Signed-off-by: Stefan Mavrodiev Signed-off-by: Lee Jones drivers/mfd/rk808.c | 50 +++++++++++++++++++++++++++++++++-------------- include/linux/mfd/rk808.h | 1 + 2 files changed, 36 insertions(+), 15 deletions(-) commit 76304994645028accc0cfe287652344b696f4470 Author: Stefan Mavrodiev Date: Fri Jun 7 15:42:25 2019 +0300 mfd: rk808: Check pm_power_off pointer The function pointer pm_power_off may point to function from other module (PSCI for example). If rk808 is removed, pm_power_off is overwritten to NULL and the system cannot be powered off. This patch checks if pm_power_off points to a module function. Signed-off-by: Stefan Mavrodiev Signed-off-by: Lee Jones drivers/mfd/rk808.c | 17 +++++++++++------ include/linux/mfd/rk808.h | 1 + 2 files changed, 12 insertions(+), 6 deletions(-) commit 554e937ec8d75930bc711612208af27961e3dc61 Author: Pi-Hsun Shih Date: Mon Jun 3 11:45:11 2019 +0800 mfd: cros_ec: differentiate SCP from EC by feature bit System Companion Processor (SCP) is Cortex M4 co-processor on some MediaTek platform that can run EC-style firmware. Since a SCP and EC would both exist on a system, and use the cros_ec_dev driver, we need to differentiate between them for the userspace, or they would both be registered at /dev/cros_ec, causing a conflict. Signed-off-by: Pi-Hsun Shih Acked-by: Enric Balletbo i Serra Signed-off-by: Lee Jones drivers/mfd/cros_ec_dev.c | 10 ++++++++++ include/linux/mfd/cros_ec.h | 1 + 2 files changed, 11 insertions(+) commit c77cd342f9fd64a9f6ed3eb270fd527826ef92d3 Author: Pi-Hsun Shih Date: Mon Jun 3 11:45:10 2019 +0800 dt-bindings: Add binding for cros-ec-rpmsg Add a DT binding documentation for ChromeOS EC driver over rpmsg. Signed-off-by: Pi-Hsun Shih Acked-by: Rob Herring Signed-off-by: Lee Jones Documentation/devicetree/bindings/mfd/cros-ec.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 297939901f382f16ab78a8073cdfb2a6279bb654 Author: Richard Fitzgerald Date: Thu May 30 15:39:53 2019 +0100 mfd: madera: Add Madera core support for CS47L92 This patch adds all the core support and defines for the Cirrus Logic CS42L92, CS47L92 and CS47L93 smart audio CODECs. Registers or fields are named MADERA_* if it is part of the common hardware platform and does not conflict with any other Madera codecs. It is named CS47L15_* if it is unique to CS47L15 and conflicts with definitions on other codecs. Signed-off-by: Stuart Henderson Signed-off-by: Richard Fitzgerald Signed-off-by: Charles Keepax Signed-off-by: Lee Jones drivers/mfd/Kconfig | 7 + drivers/mfd/Makefile | 3 + drivers/mfd/cs47l92-tables.c | 1948 ++++++++++++++++++++++++++++++++++ drivers/mfd/madera-core.c | 58 + drivers/mfd/madera-i2c.c | 11 + drivers/mfd/madera-spi.c | 11 + drivers/mfd/madera.h | 7 + include/linux/mfd/madera/core.h | 4 + include/linux/mfd/madera/registers.h | 195 ++++ 9 files changed, 2244 insertions(+) commit 1ef921b6d1b68887be22f02dabc6ae73c112dce4 Author: Richard Fitzgerald Date: Thu May 30 15:39:52 2019 +0100 mfd: madera: Add Madera core support for CS47L15 This patch adds all the core support and defines for the Cirrus Logic CS47L15 smart audio CODEC. Registers or fields are named MADERA_* if it is part of the common hardware platform and does not conflict with any other Madera codecs. It is named CS47L15_* if it is unique to CS47L15 and conflicts with definitions on other codecs. Signed-off-by: Richard Fitzgerald Signed-off-by: Charles Keepax Signed-off-by: Lee Jones drivers/mfd/Kconfig | 7 + drivers/mfd/Makefile | 3 + drivers/mfd/cs47l15-tables.c | 1301 ++++++++++++++++++++++++++++++++++ drivers/mfd/madera-core.c | 44 ++ drivers/mfd/madera-i2c.c | 7 + drivers/mfd/madera-spi.c | 7 + drivers/mfd/madera.h | 6 + include/linux/mfd/madera/core.h | 2 + include/linux/mfd/madera/registers.h | 5 + 9 files changed, 1382 insertions(+) commit 8f759058e9f9616980aaf838a45cc545cbe6e447 Author: Richard Fitzgerald Date: Thu May 30 15:39:51 2019 +0100 mfd: madera: Update DT bindings to add additional CODECs This adds the cs47l15, cs42l92, cs47l92 and cs47l93 to the list of compatible strings and updates some properties that need to note the new CODECs. Signed-off-by: Richard Fitzgerald Signed-off-by: Charles Keepax Signed-off-by: Lee Jones Documentation/devicetree/bindings/mfd/madera.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit ee1856db5a886f6700206b9c900f1191ab5405ed Author: Charles Keepax Date: Mon May 20 10:06:28 2019 +0100 mfd: madera: Add supply mapping for MICVDD Currently we are relying on the exact match of the regulator name to find MICVDD, we should add an explicit supply mapping to allow this to be found more reliably. Signed-off-by: Charles Keepax Signed-off-by: Lee Jones drivers/mfd/madera-core.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit 323250166d4ebbb927a68a6387887f6f59d5da4d Author: Stuart Henderson Date: Mon May 20 10:06:27 2019 +0100 mfd: madera: Fix potential uninitialised use of variable regmap_read won't set val to anything if an ACKed bus fails. Signed-off-by: Stuart Henderson Signed-off-by: Charles Keepax Signed-off-by: Lee Jones drivers/mfd/madera-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6987fd42239ad43937166dace2ed8fb260b14d25 Author: Otto Sabart Date: Mon May 20 10:06:26 2019 +0100 mfd: madera: Fix bad reference to pinctrl.txt file The pinctrl.txt file was converted into reStructuredText and moved into driver-api folder. This patch updates the broken reference. Fixes: 5a9b73832e9e ("pinctrl.txt: move it to the driver-api book") Signed-off-by: Otto Sabart Signed-off-by: Charles Keepax Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Lee Jones include/linux/mfd/madera/pdata.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5da6cbcd2f395981aa9bfc571ace99f1c786c985 Author: Arnd Bergmann Date: Mon May 20 10:06:25 2019 +0100 mfd: arizona: Fix undefined behavior When the driver is used with a subdevice that is disabled in the kernel configuration, clang gets a little confused about the control flow and fails to notice that n_subdevs is only uninitialized when subdevs is NULL, and we check for that, leading to a false-positive warning: drivers/mfd/arizona-core.c:1423:19: error: variable 'n_subdevs' is uninitialized when used here [-Werror,-Wuninitialized] subdevs, n_subdevs, NULL, 0, NULL); ^~~~~~~~~ drivers/mfd/arizona-core.c:999:15: note: initialize the variable 'n_subdevs' to silence this warning int n_subdevs, ret, i; ^ = 0 Ideally, we would rearrange the code to avoid all those early initializations and have an explicit exit in each disabled case, but it's much easier to chicken out and add one more initialization here to shut up the warning. Signed-off-by: Arnd Bergmann Reviewed-by: Nathan Chancellor Signed-off-by: Charles Keepax Signed-off-by: Lee Jones drivers/mfd/arizona-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c176c6d7e932662668bcaec2d763657096589d85 Author: Robert Hancock Date: Tue Jun 4 16:35:43 2019 -0600 mfd: core: Set fwnode for created devices The logic for setting the of_node on devices created by mfd did not set the fwnode pointer to match, which caused fwnode-based APIs to malfunction on these devices since the fwnode pointer was null. Fix this. Signed-off-by: Robert Hancock Signed-off-by: Lee Jones drivers/mfd/mfd-core.c | 1 + 1 file changed, 1 insertion(+) commit f88314c1e911a74808059aead0350956f2072ae2 Author: Andy Shevchenko Date: Fri May 24 21:13:44 2019 +0300 mfd: intel-lpss: Keep device tables sorted by ID Easier to find and maintain if the device tables sorted by ID. Do it here for intel-lpss MFD driver. Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones drivers/mfd/intel-lpss-pci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 23e30b3c5f953e6650840c07cb8563909a72fc01 Author: Alexandre Belloni Date: Tue May 21 22:43:04 2019 +0200 mfd: menelaus: Remove superfluous error message The RTC core already has error messages in case of failure, there is no need to have another message in the driver. Signed-off-by: Alexandre Belloni Signed-off-by: Lee Jones drivers/mfd/menelaus.c | 2 -- 1 file changed, 2 deletions(-) commit e25547f899a531ecea1fcca975752872682ec564 Author: Leonard Crestez Date: Tue May 21 20:41:14 2019 +0000 mfd: bd718x7: Make power button press duration configurable Allow overwriting the values in BD718XX_REG_PWRONCONFIG0 and BD718XX_REG_PWRONCONFIG1 via devicetree. Read values in milliseconds and attempt to round them to something supported by the hardware. Keep existing values (from bootloader or OTP) if property is not present. Signed-off-by: Leonard Crestez Reviewed-By: Matti Vaittinen [Lee: Fixed-up merge/API conflict] Signed-off-by: Lee Jones drivers/mfd/rohm-bd718x7.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit 907bf9d65f2da9b7ea1b5aa0c1b8d5950f29356d Author: Leonard Crestez Date: Tue May 21 20:41:13 2019 +0000 dt-bindings: mfd: Document short/long press duration for BD718X7 These values can be overwritten at probe time. Signed-off-by: Leonard Crestez Acked-By: Matti Vaittinen Signed-off-by: Lee Jones Documentation/devicetree/bindings/mfd/rohm,bd71837-pmic.txt | 8 ++++++++ 1 file changed, 8 insertions(+) commit 2a87f09020c0d35193c803c20dfdae6522b36d5e Author: Leonard Crestez Date: Tue May 21 20:41:12 2019 +0000 mfd: bd718x7: Remove hardcoded config for button press duration The reset button on imx8mm-evk is tied to PWRON_B pin of bd71847 and the long press duration is set to zero from OTP. The linux driver overrides those values and breaks reset from button. Overwriting OTP or bootloader configuration with some hardcoded defaults is not desirable, keep already programmed values instead. Signed-off-by: Leonard Crestez Acked-By: Matti Vaittinen Signed-off-by: Lee Jones drivers/mfd/rohm-bd718x7.c | 23 ----------------------- 1 file changed, 23 deletions(-) commit 1bb407f17c5316888c3c446e26cb2bb78943f236 Author: Gwendal Grignou Date: Fri May 17 16:38:55 2019 -0700 mfd: cros_ec: Register cros_ec_lid_angle driver when presented Register driver when EC indicates has precise lid angle calculation code running. Fix incorrect extra resource allocation in cros_ec_sensors_register(). Signed-off-by: Gwendal Grignou Signed-off-by: Lee Jones drivers/mfd/cros_ec_dev.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 5aa3709c0a5c026735b0ddd4ec80810a23d65f5b Author: Daniel Gomez Date: Sat May 11 12:03:58 2019 +0200 mfd: madera: Add missing of table registration MODULE_DEVICE_TABLE(of, ) should be called to complete DT OF mathing mechanism and register it. Before this patch: modinfo ./drivers/mfd/madera.ko | grep alias After this patch: modinfo ./drivers/mfd/madera.ko | grep alias alias: of:N*T*Ccirrus,wm1840C* alias: of:N*T*Ccirrus,wm1840 alias: of:N*T*Ccirrus,cs47l91C* alias: of:N*T*Ccirrus,cs47l91 alias: of:N*T*Ccirrus,cs47l90C* alias: of:N*T*Ccirrus,cs47l90 alias: of:N*T*Ccirrus,cs47l85C* alias: of:N*T*Ccirrus,cs47l85 alias: of:N*T*Ccirrus,cs47l35C* alias: of:N*T*Ccirrus,cs47l35 Reported-by: Javier Martinez Canillas Signed-off-by: Daniel Gomez Signed-off-by: Lee Jones drivers/mfd/madera-core.c | 1 + 1 file changed, 1 insertion(+) commit 8e23cee84c9da85457c1aabd02bfece44b922b83 Merge: f8c7f7ddd8ef 8ed144019748 3aa6be30da89 f3f4363b1239 Author: Lee Jones Date: Tue Jul 2 12:10:53 2019 +0100 Merge branches 'ib-mfd-clk-gpio-power-regulator-rtc-5.3', 'ib-mfd-clk-regulator-rtc-5.3', 'ib-mfd-cros-5.3' and 'ib-mfd-regulator-5.3' into ibs-for-mfd-merged commit f3f4363b1239584efc1a22c5ca0f2308e5693c38 Author: Colin Ian King Date: Thu Jun 27 14:16:39 2019 +0100 regulator: lp87565: Fix missing break in switch statement Currently the LP87565_DEVICE_TYPE_LP87561_Q1 case does not have a break statement, causing it to fall through to a dev_err message. Fix this by adding in the missing break statement. Addresses-Coverity: ("Missing break in switch") Fixes: 7ee63bd74750 ("regulator: lp87565: Add 4-phase lp87561 regulator support") Signed-off-by: Colin Ian King Reviewed-by: Keerthy Signed-off-by: Lee Jones drivers/regulator/lp87565-regulator.c | 1 + 1 file changed, 1 insertion(+) commit 67f9c2209e885c8f97215655739155c94ca9cb9c Author: Josef Bacik Date: Wed Jun 19 13:47:23 2019 -0400 btrfs: migrate the global_block_rsv helpers to block-rsv.c These helpers belong in block-rsv.c Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/block-rsv.c | 172 ++++++++++++++++++++++++++++++++++++++++++++ fs/btrfs/block-rsv.h | 15 ++++ fs/btrfs/extent-tree.c | 189 ++----------------------------------------------- 3 files changed, 193 insertions(+), 183 deletions(-) commit 550fa228ee7ebea3c3499897a7aef6536de73fff Author: Josef Bacik Date: Wed Jun 19 13:47:22 2019 -0400 btrfs: migrate the block-rsv code to block-rsv.c This moves everything out of extent-tree.c to block-rsv.c. Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/Makefile | 3 +- fs/btrfs/block-rsv.c | 253 +++++++++++++++++++++++++++++++++++++++++++++++++ fs/btrfs/extent-tree.c | 246 ----------------------------------------------- 3 files changed, 255 insertions(+), 247 deletions(-) commit 424a47805a819ff59ada9549c4a21fe0ba95c446 Author: Josef Bacik Date: Wed Jun 19 13:47:21 2019 -0400 btrfs: stop using block_rsv_release_bytes everywhere block_rsv_release_bytes() is the internal to the block_rsv code, and shouldn't be called directly by anything else. Switch all users to the exported helpers. Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit fcec36224fc674953eadfca05c69225e6595641b Author: Josef Bacik Date: Wed Jun 19 13:47:20 2019 -0400 btrfs: cleanup the target logic in __btrfs_block_rsv_release This works for all callers already, but if we wanted to use the helper for the global_block_rsv it would end up trying to refill itself. Fix the logic to be able to be used no matter which block rsv is passed in to this helper. Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit fed14b323db868c3ac0071925763964a6ca58883 Author: Josef Bacik Date: Wed Jun 19 13:47:19 2019 -0400 btrfs: export __btrfs_block_rsv_release The delalloc reserve stuff calls this directly because it cares about the qgroup accounting stuff, so export it so we can move it around. Fix btrfs_block_rsv_release() to just be a static inline since it just calls __btrfs_block_rsv_release() with NULL for the qgroup stuff. Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/block-rsv.h | 13 ++++++++++--- fs/btrfs/extent-tree.c | 13 +++---------- 2 files changed, 13 insertions(+), 13 deletions(-) commit 0b50174ad5e9fb32abcfdb10b1a14e76a72b20e6 Author: Josef Bacik Date: Wed Jun 19 13:47:18 2019 -0400 btrfs: export btrfs_block_rsv_add_bytes This is used in a few places, we need to make sure it's exported so we can move it around. Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/block-rsv.h | 2 ++ fs/btrfs/extent-tree.c | 18 +++++++++--------- 2 files changed, 11 insertions(+), 9 deletions(-) commit d12ffdd1aa4c165774748265c67af3aa1edab1a0 Author: Josef Bacik Date: Wed Jun 19 13:47:17 2019 -0400 btrfs: move btrfs_block_rsv definitions into it's own header Prep work for separating out all of the block_rsv related code into its own file. Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/block-rsv.h | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++ fs/btrfs/ctree.h | 69 +------------------------------------------- fs/btrfs/extent-tree.c | 1 + 3 files changed, 79 insertions(+), 68 deletions(-) commit 9b4851bc48b9346a957a71ca355ecdb7f2759fb8 Author: Goldwyn Rodrigues Date: Tue Jun 25 20:11:31 2019 +0200 btrfs: Simplify update of space_info in __reserve_metadata_bytes() We don't need an if-else-if chain where we can use a simple OR since both conditions are performing the same action. The short-circuit for OR will ensure that if the first condition is true, can_overcommit() is not called. Reviewed-by: Nikolay Borisov Signed-off-by: Goldwyn Rodrigues Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/space-info.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) commit 83d731a5b228454d7c29ec64fdd93426698f97f6 Author: Josef Bacik Date: Tue Jun 18 16:09:26 2019 -0400 btrfs: unexport can_overcommit Now that we've moved all of the users to space-info.c, unexport it and name it back to can_overcommit. Reviewed-by: Nikolay Borisov Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/space-info.c | 23 +++++++++++------------ fs/btrfs/space-info.h | 4 ---- 2 files changed, 11 insertions(+), 16 deletions(-) commit 0d9764f6d0fb9dd4d4b773b481f259c0567870c2 Author: Josef Bacik Date: Tue Jun 18 16:09:25 2019 -0400 btrfs: move reserve_metadata_bytes and supporting code to space-info.c This moves all of the metadata reservation code into space-info.c. Reviewed-by: Nikolay Borisov Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 709 +------------------------------------------------ fs/btrfs/space-info.c | 698 ++++++++++++++++++++++++++++++++++++++++++++++++ fs/btrfs/space-info.h | 4 + 3 files changed, 709 insertions(+), 702 deletions(-) commit 5da6afeb32e97f956aa3d599b7f94ceb36fcf854 Author: Josef Bacik Date: Tue Jun 18 16:09:24 2019 -0400 btrfs: move dump_space_info to space-info.c We'll need this exported so we can use it in all the various was we need to use it. This is prep work to move reserve_metadata_bytes. Reviewed-by: Nikolay Borisov Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 70 +++++--------------------------------------------- fs/btrfs/space-info.c | 55 +++++++++++++++++++++++++++++++++++++++ fs/btrfs/space-info.h | 3 +++ 3 files changed, 65 insertions(+), 63 deletions(-) commit c2a67a76ec87579a46a16c49fc9997737b7fa844 Author: Josef Bacik Date: Tue Jun 18 16:09:23 2019 -0400 btrfs: export block_rsv_use_bytes We are going to need this to move the metadata reservation stuff to space_info.c. Reviewed-by: Nikolay Borisov Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/ctree.h | 1 + fs/btrfs/extent-tree.c | 13 +++++-------- 2 files changed, 6 insertions(+), 8 deletions(-) commit b338b013e18a28341aaf9e665ac1edc9fae518d1 Author: Josef Bacik Date: Tue Jun 18 16:09:22 2019 -0400 btrfs: move btrfs_space_info_add_*_bytes to space-info.c Now that we've moved all the pre-requisite stuff, move these two functions. Reviewed-by: Nikolay Borisov Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 111 ------------------------------------------------- fs/btrfs/space-info.c | 106 ++++++++++++++++++++++++++++++++++++++++++++++ fs/btrfs/space-info.h | 8 ++++ 3 files changed, 114 insertions(+), 111 deletions(-) commit bb96c4e5742022b79b5bda5f52218b3d2785accd Author: Josef Bacik Date: Tue Jun 18 16:09:21 2019 -0400 btrfs: move the space info update macro to space-info.h Also rename it to btrfs_space_info_update_* so it's clear what we're updating. Reviewed-by: Nikolay Borisov Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 63 +++++++++++++++++++++----------------------------- fs/btrfs/space-info.h | 23 ++++++++++++++++++ 2 files changed, 49 insertions(+), 37 deletions(-) commit 41783ef24d56ce45452db7c413df9a3bdcc8d651 Author: Josef Bacik Date: Tue Jun 18 16:09:20 2019 -0400 btrfs: move and export can_overcommit This is the first piece of moving the space reservation code to space-info.c Reviewed-by: Nikolay Borisov Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 82 +++++--------------------------------------------- fs/btrfs/space-info.c | 68 +++++++++++++++++++++++++++++++++++++++++ fs/btrfs/space-info.h | 4 +++ 3 files changed, 79 insertions(+), 75 deletions(-) commit 280c290881bc048bd5dbe02796173f55ca86e697 Author: Josef Bacik Date: Tue Jun 18 16:09:19 2019 -0400 btrfs: move the space_info handling code to space-info.c These are the basic init and lookup functions and some helper functions, fairly straightforward before the bad stuff starts. Reviewed-by: Nikolay Borisov Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/Makefile | 2 +- fs/btrfs/extent-tree.c | 205 +++++-------------------------------------------- fs/btrfs/space-info.c | 174 +++++++++++++++++++++++++++++++++++++++++ fs/btrfs/space-info.h | 10 +++ 4 files changed, 204 insertions(+), 187 deletions(-) commit d44b72aa12d0a74b67ffabdcab2f64653282dccd Author: Josef Bacik Date: Tue Jun 18 16:09:18 2019 -0400 btrfs: export space_info_add_*_bytes Prep work for consolidating all of the space_info code into one file. We need to export these so multiple files can use them. Reviewed-by: Nikolay Borisov Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 40 ++++++++++++++++++---------------------- fs/btrfs/space-info.h | 7 +++++++ 2 files changed, 25 insertions(+), 22 deletions(-) commit fc471cb0c8f0016ac7ec5cc3e329c5e23d83d593 Author: Josef Bacik Date: Tue Jun 18 16:09:17 2019 -0400 btrfs: rename do_chunk_alloc to btrfs_chunk_alloc Really we just need the enum, but as we break more things up it'll help to have this external to extent-tree.c. Reviewed-by: Nikolay Borisov Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/ctree.h | 22 ++++++++++++++++++++++ fs/btrfs/extent-tree.c | 49 +++++++++++++------------------------------------ 2 files changed, 35 insertions(+), 36 deletions(-) commit 8719aaae8d696bf0c73f74e6d6cc75451b50d5df Author: Josef Bacik Date: Tue Jun 18 16:09:16 2019 -0400 btrfs: move space_info to space-info.h Migrate the struct definition and the one helper that's in ctree.h into space-info.h Reviewed-by: Nikolay Borisov Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/ctree.h | 73 +----------------------------------------- fs/btrfs/extent-tree.c | 1 + fs/btrfs/free-space-cache.c | 1 + fs/btrfs/ioctl.c | 1 + fs/btrfs/space-info.h | 78 +++++++++++++++++++++++++++++++++++++++++++++ fs/btrfs/super.c | 1 + fs/btrfs/sysfs.c | 1 + fs/btrfs/volumes.c | 1 + 8 files changed, 85 insertions(+), 72 deletions(-) commit e749af443fa8dac67a896d38f5eca450a5b9026a Author: David Sterba Date: Tue Jun 18 20:00:16 2019 +0200 btrfs: lift bio_set_dev from bio allocation helpers The block device is passed around for the only purpose to set it in new bios. Move the assignment one level up. This is a preparatory patch for further bdev cleanups. Signed-off-by: David Sterba fs/btrfs/compression.c | 12 ++++++++---- fs/btrfs/extent_io.c | 6 +++--- fs/btrfs/extent_io.h | 2 +- 3 files changed, 12 insertions(+), 8 deletions(-) commit e1ea2beee284d8e434e51e60de9e157a18fe8b42 Author: David Sterba Date: Tue Jun 18 20:00:13 2019 +0200 btrfs: use raid_attr for minimum stripe count in btrfs_calc_avail_data_space Minimum stripe count matches the minimum devices required for a given profile. The open coded assignments match the raid_attr table. What's changed here is the meaning for RAID5/6. Previously their min_stripes would be 1, while newly it's devs_min. This however shold be the same as before because it's not possible to create filesystem on fewer devices than the raid_attr table allows. There's no adjustment regarding the parity stripes (like calc_data_stripes does), because we're interested in overall space that would fit on the devices. Missing devices make no difference for the whole calculation, we have the size stored in the structures. Signed-off-by: David Sterba fs/btrfs/super.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 4f080f571192b0347f45b5709a291af473824484 Author: David Sterba Date: Tue Jun 18 20:00:11 2019 +0200 btrfs: use raid_attr to adjust minimal stripe size in btrfs_calc_avail_data_space Special case for DUP can be replaced by lookup to the attribute table, where the dev_stripes is the right coefficient. Signed-off-by: David Sterba fs/btrfs/super.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit f262fa8de6a2510e13a59ad3ecdcb0f2d468bb98 Author: David Sterba Date: Tue Jun 18 20:00:08 2019 +0200 btrfs: drop default value assignments in enums A few more instances whre we don't need to specify the values as long as they are the same that enum assigns automatically. All of the enums are in-memory only and nothing relies on the exact values. Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 14 +++++++------- fs/btrfs/file.c | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) commit 2792237d0c4c226c6a6059fefe7f712aa0c94003 Author: David Sterba Date: Tue Jun 18 20:00:05 2019 +0200 btrfs: use common helpers for extent IO state insertion messages Print the error messages using the helpers that also print the filesystem identification. Signed-off-by: David Sterba fs/btrfs/extent_io.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 63611e738a62bfb186a61e4b16b9fb72657144e5 Author: Josef Bacik Date: Tue Jun 18 10:59:18 2019 -0400 btrfs: run delayed iput at unlink time We have been seeing issues in production where a cleaner script will end up unlinking a bunch of files that have pending iputs. This means they will get their final iput's run at btrfs-cleaner time and thus are not throttled, which impacts the workload. Since we are unlinking these files we can just drop the delayed iput at unlink time. We are already holding a reference to the inode so this will not be the final iput and thus is completely safe to do at this point. Doing this means we are more likely to be doing the final iput at unlink time, and thus will get the IO charged to the caller and get throttled appropriately without affecting the main workload. Reviewed-by: Nikolay Borisov Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/inode.c | 40 ++++++++++++++++++++++++++++++++++------ 1 file changed, 34 insertions(+), 6 deletions(-) commit 179006688a7e888cbff39577189f2e034786d06a Author: Filipe Manana Date: Wed Jun 19 13:05:50 2019 +0100 Btrfs: add missing inode version, ctime and mtime updates when punching hole If the range for which we are punching a hole covers only part of a page, we end up updating the inode item but we skip the update of the inode's iversion, mtime and ctime. Fix that by ensuring we update those properties of the inode. A patch for fstests test case generic/059 that tests this as been sent along with this fix. Fixes: 2aaa66558172b0 ("Btrfs: add hole punching") Fixes: e8c1c76e804b18 ("Btrfs: add missing inode update when punching hole") CC: stable@vger.kernel.org # 4.4+ Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/file.c | 5 +++++ 1 file changed, 5 insertions(+) commit 803f0f64d17769071d7287d9e3e3b79a3e1ae937 Author: Filipe Manana Date: Wed Jun 19 13:05:39 2019 +0100 Btrfs: fix fsync not persisting dentry deletions due to inode evictions In order to avoid searches on a log tree when unlinking an inode, we check if the inode being unlinked was logged in the current transaction, as well as the inode of its parent directory. When any of the inodes are logged, we proceed to delete directory items and inode reference items from the log, to ensure that if a subsequent fsync of only the inode being unlinked or only of the parent directory when the other is not fsync'ed as well, does not result in the entry still existing after a power failure. That check however is not reliable when one of the inodes involved (the one being unlinked or its parent directory's inode) is evicted, since the logged_trans field is transient, that is, it is not stored on disk, so it is lost when the inode is evicted and loaded into memory again (which is set to zero on load). As a consequence the checks currently being done by btrfs_del_dir_entries_in_log() and btrfs_del_inode_ref_in_log() always return true if the inode was evicted before, regardless of the inode having been logged or not before (and in the current transaction), this results in the dentry being unlinked still existing after a log replay if after the unlink operation only one of the inodes involved is fsync'ed. Example: $ mkfs.btrfs -f /dev/sdb $ mount /dev/sdb /mnt $ mkdir /mnt/dir $ touch /mnt/dir/foo $ xfs_io -c fsync /mnt/dir/foo # Keep an open file descriptor on our directory while we evict inodes. # We just want to evict the file's inode, the directory's inode must not # be evicted. $ ( cd /mnt/dir; while true; do :; done ) & $ pid=$! # Wait a bit to give time to background process to chdir to our test # directory. $ sleep 0.5 # Trigger eviction of the file's inode. $ echo 2 > /proc/sys/vm/drop_caches # Unlink our file and fsync the parent directory. After a power failure # we don't expect to see the file anymore, since we fsync'ed the parent # directory. $ rm -f $SCRATCH_MNT/dir/foo $ xfs_io -c fsync /mnt/dir $ mount /dev/sdb /mnt $ ls /mnt/dir foo $ --> file still there, unlink not persisted despite explicit fsync on dir Fix this by checking if the inode has the full_sync bit set in its runtime flags as well, since that bit is set everytime an inode is loaded from disk, or for other less common cases such as after a shrinking truncate or failure to allocate extent maps for holes, and gets cleared after the first fsync. Also consider the inode as possibly logged only if it was last modified in the current transaction (besides having the full_fsync flag set). Fixes: 3a5f1d458ad161 ("Btrfs: Optimize btree walking while logging inodes") CC: stable@vger.kernel.org # 4.4+ Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/tree-log.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) commit 89b798ad1b42b1de10d64feda241e35e90c7b102 Author: Nikolay Borisov Date: Mon Jun 3 12:05:05 2019 +0300 btrfs: Use btrfs_get_io_geometry appropriately Presently btrfs_map_block is used not only to do everything necessary to map a bio to the underlying allocation profile but it's also used to identify how much data could be written based on btrfs' stripe logic without actually submitting anything. This is achieved by passing NULL for 'bbio_ret' parameter. This patch refactors all callers that require just the mapping length by switching them to using btrfs_io_geometry instead of calling btrfs_map_block with a special NULL value for 'bbio_ret'. No functional change. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/inode.c | 28 ++++++++++---------- fs/btrfs/volumes.c | 78 +++++++++++------------------------------------------- fs/btrfs/volumes.h | 2 +- 3 files changed, 30 insertions(+), 78 deletions(-) commit 5f1411265e16b257a945a5c9044aecbc7bb99443 Author: Nikolay Borisov Date: Mon Jun 3 12:05:03 2019 +0300 btrfs: Introduce btrfs_io_geometry infrastructure Add a structure that holds various parameters for IO calculations and a helper that fills the values. This will help further refactoring and reduction of functions that in some way open-coded the calculations. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/volumes.c | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ fs/btrfs/volumes.h | 17 ++++++++++ 2 files changed, 113 insertions(+) commit c9d713d5b5e8c1fb97af8fa3e267300fe25b8921 Author: David Sterba Date: Thu Jun 13 17:55:03 2019 +0200 btrfs: improve messages when updating feature flags Currently the messages printed after setting an incompat feature are cryptis, we can easily make it better as the textual description is passed to the helpers. Old: setting 128 feature flag updated: setting incompat feature flag for RAID56 (0x80) Signed-off-by: David Sterba fs/btrfs/ctree.h | 40 ++++++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 16 deletions(-) commit 6c64460cdc8be5fa074aa8fe2ae8736d5792bdc5 Author: Arnd Bergmann Date: Mon Jun 17 13:07:28 2019 +0200 btrfs: shut up bogus -Wmaybe-uninitialized warning gcc sometimes can't determine whether a variable has been initialized when both the initialization and the use are conditional: fs/btrfs/props.c: In function 'inherit_props': fs/btrfs/props.c:389:4: error: 'num_bytes' may be used uninitialized in this function [-Werror=maybe-uninitialized] btrfs_block_rsv_release(fs_info, trans->block_rsv, This code is fine. Unfortunately, I cannot think of a good way to rephrase it in a way that makes gcc understand this, so I add a bogus initialization the way one should not. Signed-off-by: Arnd Bergmann Reviewed-by: David Sterba [ gcc 8 and 9 don't emit the warning ] Signed-off-by: David Sterba fs/btrfs/props.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9e967495e0e0ae8bb08f52aa71b29affc7075d31 Author: Filipe Manana Date: Mon Apr 22 16:44:09 2019 +0100 Btrfs: prevent send failures and crashes due to concurrent relocation Send always operates on read-only trees and always expected that while it is in progress, nothing changes in those trees. Due to that expectation and the fact that send is a read-only operation, it operates on commit roots and does not hold transaction handles. However relocation can COW nodes and leafs from read-only trees, which can cause unexpected failures and crashes (hitting BUG_ONs). while send using a node/leaf, it gets COWed, the transaction used to COW it is committed, a new transaction starts, the extent previously used for that node/leaf gets allocated, possibly for another tree, and the respective extent buffer' content changes while send is still using it. When this happens send normally fails with EIO being returned to user space and messages like the following are found in dmesg/syslog: [ 3408.699121] BTRFS error (device sdc): parent transid verify failed on 58703872 wanted 250 found 253 [ 3441.523123] BTRFS error (device sdc): did not find backref in send_root. inode=63211, offset=0, disk_byte=5222825984 found extent=5222825984 Other times, less often, we hit a BUG_ON() because an extent buffer that send is using used to be a node, and while send is still using it, it got COWed and got reused as a leaf while send is still using, producing the following trace: [ 3478.466280] ------------[ cut here ]------------ [ 3478.466282] kernel BUG at fs/btrfs/ctree.c:1806! [ 3478.466965] invalid opcode: 0000 [#1] SMP DEBUG_PAGEALLOC PTI [ 3478.467635] CPU: 0 PID: 2165 Comm: btrfs Not tainted 5.0.0-btrfs-next-46 #1 [ 3478.468311] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.11.2-0-gf9626ccb91-prebuilt.qemu-project.org 04/01/2014 [ 3478.469681] RIP: 0010:read_node_slot+0x122/0x130 [btrfs] (...) [ 3478.471758] RSP: 0018:ffffa437826bfaa0 EFLAGS: 00010246 [ 3478.472457] RAX: ffff961416ed7000 RBX: 000000000000003d RCX: 0000000000000002 [ 3478.473151] RDX: 000000000000003d RSI: ffff96141e387408 RDI: ffff961599b30000 [ 3478.473837] RBP: ffffa437826bfb8e R08: 0000000000000001 R09: ffffa437826bfb8e [ 3478.474515] R10: ffffa437826bfa70 R11: 0000000000000000 R12: ffff9614385c8708 [ 3478.475186] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 3478.475840] FS: 00007f8e0e9cc8c0(0000) GS:ffff9615b6a00000(0000) knlGS:0000000000000000 [ 3478.476489] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 3478.477127] CR2: 00007f98b67a056e CR3: 0000000005df6005 CR4: 00000000003606f0 [ 3478.477762] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 3478.478385] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 3478.479003] Call Trace: [ 3478.479600] ? do_raw_spin_unlock+0x49/0xc0 [ 3478.480202] tree_advance+0x173/0x1d0 [btrfs] [ 3478.480810] btrfs_compare_trees+0x30c/0x690 [btrfs] [ 3478.481388] ? process_extent+0x1280/0x1280 [btrfs] [ 3478.481954] btrfs_ioctl_send+0x1037/0x1270 [btrfs] [ 3478.482510] _btrfs_ioctl_send+0x80/0x110 [btrfs] [ 3478.483062] btrfs_ioctl+0x13fe/0x3120 [btrfs] [ 3478.483581] ? rq_clock_task+0x2e/0x60 [ 3478.484086] ? wake_up_new_task+0x1f3/0x370 [ 3478.484582] ? do_vfs_ioctl+0xa2/0x6f0 [ 3478.485075] ? btrfs_ioctl_get_supported_features+0x30/0x30 [btrfs] [ 3478.485552] do_vfs_ioctl+0xa2/0x6f0 [ 3478.486016] ? __fget+0x113/0x200 [ 3478.486467] ksys_ioctl+0x70/0x80 [ 3478.486911] __x64_sys_ioctl+0x16/0x20 [ 3478.487337] do_syscall_64+0x60/0x1b0 [ 3478.487751] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 3478.488159] RIP: 0033:0x7f8e0d7d4dd7 (...) [ 3478.489349] RSP: 002b:00007ffcf6fb4908 EFLAGS: 00000202 ORIG_RAX: 0000000000000010 [ 3478.489742] RAX: ffffffffffffffda RBX: 0000000000000105 RCX: 00007f8e0d7d4dd7 [ 3478.490142] RDX: 00007ffcf6fb4990 RSI: 0000000040489426 RDI: 0000000000000005 [ 3478.490548] RBP: 0000000000000005 R08: 00007f8e0d6f3700 R09: 00007f8e0d6f3700 [ 3478.490953] R10: 00007f8e0d6f39d0 R11: 0000000000000202 R12: 0000000000000005 [ 3478.491343] R13: 00005624e0780020 R14: 0000000000000000 R15: 0000000000000001 (...) [ 3478.493352] ---[ end trace d5f537302be4f8c8 ]--- Another possibility, much less likely to happen, is that send will not fail but the contents of the stream it produces may not be correct. To avoid this, do not allow send and relocation (balance) to run in parallel. In the long term the goal is to allow for both to be able to run concurrently without any problems, but that will take a significant effort in development and testing. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 7 +++++++ fs/btrfs/disk-io.c | 2 ++ fs/btrfs/send.c | 14 ++++++++++++++ fs/btrfs/volumes.c | 8 ++++++++ 4 files changed, 31 insertions(+) commit 71a9c4885e1dec0f8ec5e4b05ecd6fddd27fc6c1 Author: David Sterba Date: Fri May 31 17:22:59 2019 +0200 btrfs: document BTRFS_MAX_MIRRORS The real meaning of that constant is not clear from the context due to the target device inclusion. Signed-off-by: David Sterba fs/btrfs/ctree.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit a07e8a468e6a2f626b61078a4d1e63c181f099eb Author: David Sterba Date: Fri May 31 16:54:26 2019 +0200 btrfs: use mask for RAID56 profiles We don't need to enumerate the profiles, use the mask for consistency. Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit c7369b3faea230cf6009449147ed755c45e74afd Author: David Sterba Date: Fri May 31 15:39:31 2019 +0200 btrfs: add mask for all RAID1 types Preparatory patch for additional RAID1 profiles with more copies. The mask will contain 3-copy and 4-copy, most of the checks for plain RAID1 work the same for the other profiles. Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 8 ++++---- fs/btrfs/scrub.c | 2 +- fs/btrfs/volumes.c | 8 ++++---- include/uapi/linux/btrfs_tree.h | 2 ++ 4 files changed, 11 insertions(+), 9 deletions(-) commit e88439debd0a7f969b3ddba6f147152cd0732676 Author: Qu Wenruo Date: Thu Jun 13 17:31:24 2019 +0800 btrfs: qgroup: Don't hold qgroup_ioctl_lock in btrfs_qgroup_inherit() [BUG] Lockdep will report the following circular locking dependency: WARNING: possible circular locking dependency detected 5.2.0-rc2-custom #24 Tainted: G O ------------------------------------------------------ btrfs/8631 is trying to acquire lock: 000000002536438c (&fs_info->qgroup_ioctl_lock#2){+.+.}, at: btrfs_qgroup_inherit+0x40/0x620 [btrfs] but task is already holding lock: 000000003d52cc23 (&fs_info->tree_log_mutex){+.+.}, at: create_pending_snapshot+0x8b6/0xe60 [btrfs] which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&fs_info->tree_log_mutex){+.+.}: __mutex_lock+0x76/0x940 mutex_lock_nested+0x1b/0x20 btrfs_commit_transaction+0x475/0xa00 [btrfs] btrfs_commit_super+0x71/0x80 [btrfs] close_ctree+0x2bd/0x320 [btrfs] btrfs_put_super+0x15/0x20 [btrfs] generic_shutdown_super+0x72/0x110 kill_anon_super+0x18/0x30 btrfs_kill_super+0x16/0xa0 [btrfs] deactivate_locked_super+0x3a/0x80 deactivate_super+0x51/0x60 cleanup_mnt+0x3f/0x80 __cleanup_mnt+0x12/0x20 task_work_run+0x94/0xb0 exit_to_usermode_loop+0xd8/0xe0 do_syscall_64+0x210/0x240 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #1 (&fs_info->reloc_mutex){+.+.}: __mutex_lock+0x76/0x940 mutex_lock_nested+0x1b/0x20 btrfs_commit_transaction+0x40d/0xa00 [btrfs] btrfs_quota_enable+0x2da/0x730 [btrfs] btrfs_ioctl+0x2691/0x2b40 [btrfs] do_vfs_ioctl+0xa9/0x6d0 ksys_ioctl+0x67/0x90 __x64_sys_ioctl+0x1a/0x20 do_syscall_64+0x65/0x240 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #0 (&fs_info->qgroup_ioctl_lock#2){+.+.}: lock_acquire+0xa7/0x190 __mutex_lock+0x76/0x940 mutex_lock_nested+0x1b/0x20 btrfs_qgroup_inherit+0x40/0x620 [btrfs] create_pending_snapshot+0x9d7/0xe60 [btrfs] create_pending_snapshots+0x94/0xb0 [btrfs] btrfs_commit_transaction+0x415/0xa00 [btrfs] btrfs_mksubvol+0x496/0x4e0 [btrfs] btrfs_ioctl_snap_create_transid+0x174/0x180 [btrfs] btrfs_ioctl_snap_create_v2+0x11c/0x180 [btrfs] btrfs_ioctl+0xa90/0x2b40 [btrfs] do_vfs_ioctl+0xa9/0x6d0 ksys_ioctl+0x67/0x90 __x64_sys_ioctl+0x1a/0x20 do_syscall_64+0x65/0x240 entry_SYSCALL_64_after_hwframe+0x49/0xbe other info that might help us debug this: Chain exists of: &fs_info->qgroup_ioctl_lock#2 --> &fs_info->reloc_mutex --> &fs_info->tree_log_mutex Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&fs_info->tree_log_mutex); lock(&fs_info->reloc_mutex); lock(&fs_info->tree_log_mutex); lock(&fs_info->qgroup_ioctl_lock#2); *** DEADLOCK *** 6 locks held by btrfs/8631: #0: 00000000ed8f23f6 (sb_writers#12){.+.+}, at: mnt_want_write_file+0x28/0x60 #1: 000000009fb1597a (&type->i_mutex_dir_key#10/1){+.+.}, at: btrfs_mksubvol+0x70/0x4e0 [btrfs] #2: 0000000088c5ad88 (&fs_info->subvol_sem){++++}, at: btrfs_mksubvol+0x128/0x4e0 [btrfs] #3: 000000009606fc3e (sb_internal#2){.+.+}, at: start_transaction+0x37a/0x520 [btrfs] #4: 00000000f82bbdf5 (&fs_info->reloc_mutex){+.+.}, at: btrfs_commit_transaction+0x40d/0xa00 [btrfs] #5: 000000003d52cc23 (&fs_info->tree_log_mutex){+.+.}, at: create_pending_snapshot+0x8b6/0xe60 [btrfs] [CAUSE] Due to the delayed subvolume creation, we need to call btrfs_qgroup_inherit() inside commit transaction code, with a lot of other mutex hold. This hell of lock chain can lead to above problem. [FIX] On the other hand, we don't really need to hold qgroup_ioctl_lock if we're in the context of create_pending_snapshot(). As in that context, we're the only one being able to modify qgroup. All other qgroup functions which needs qgroup_ioctl_lock are either holding a transaction handle, or will start a new transaction: Functions will start a new transaction(): * btrfs_quota_enable() * btrfs_quota_disable() Functions hold a transaction handler: * btrfs_add_qgroup_relation() * btrfs_del_qgroup_relation() * btrfs_create_qgroup() * btrfs_remove_qgroup() * btrfs_limit_qgroup() * btrfs_qgroup_inherit() call inside create_subvol() So we have a higher level protection provided by transaction, thus we don't need to always hold qgroup_ioctl_lock in btrfs_qgroup_inherit(). Only the btrfs_qgroup_inherit() call in create_subvol() needs to hold qgroup_ioctl_lock, while the btrfs_qgroup_inherit() call in create_pending_snapshot() is already protected by transaction. So the fix is to detect the context by checking trans->transaction->state. If we're at TRANS_STATE_COMMIT_DOING, then we're in commit transaction context and no need to get the mutex. Reported-by: Nikolay Borisov Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/qgroup.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) commit aa53e3bfac7205fb3a8815ac1c937fd6ed01b41e Author: Johannes Thumshirn Date: Thu Jun 6 12:07:15 2019 +0200 btrfs: correctly validate compression type Nikolay reported the following KASAN splat when running btrfs/048: [ 1843.470920] ================================================================== [ 1843.471971] BUG: KASAN: slab-out-of-bounds in strncmp+0x66/0xb0 [ 1843.472775] Read of size 1 at addr ffff888111e369e2 by task btrfs/3979 [ 1843.473904] CPU: 3 PID: 3979 Comm: btrfs Not tainted 5.2.0-rc3-default #536 [ 1843.475009] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1ubuntu1 04/01/2014 [ 1843.476322] Call Trace: [ 1843.476674] dump_stack+0x7c/0xbb [ 1843.477132] ? strncmp+0x66/0xb0 [ 1843.477587] print_address_description+0x114/0x320 [ 1843.478256] ? strncmp+0x66/0xb0 [ 1843.478740] ? strncmp+0x66/0xb0 [ 1843.479185] __kasan_report+0x14e/0x192 [ 1843.479759] ? strncmp+0x66/0xb0 [ 1843.480209] kasan_report+0xe/0x20 [ 1843.480679] strncmp+0x66/0xb0 [ 1843.481105] prop_compression_validate+0x24/0x70 [ 1843.481798] btrfs_xattr_handler_set_prop+0x65/0x160 [ 1843.482509] __vfs_setxattr+0x71/0x90 [ 1843.483012] __vfs_setxattr_noperm+0x84/0x130 [ 1843.483606] vfs_setxattr+0xac/0xb0 [ 1843.484085] setxattr+0x18c/0x230 [ 1843.484546] ? vfs_setxattr+0xb0/0xb0 [ 1843.485048] ? __mod_node_page_state+0x1f/0xa0 [ 1843.485672] ? _raw_spin_unlock+0x24/0x40 [ 1843.486233] ? __handle_mm_fault+0x988/0x1290 [ 1843.486823] ? lock_acquire+0xb4/0x1e0 [ 1843.487330] ? lock_acquire+0xb4/0x1e0 [ 1843.487842] ? mnt_want_write_file+0x3c/0x80 [ 1843.488442] ? debug_lockdep_rcu_enabled+0x22/0x40 [ 1843.489089] ? rcu_sync_lockdep_assert+0xe/0x70 [ 1843.489707] ? __sb_start_write+0x158/0x200 [ 1843.490278] ? mnt_want_write_file+0x3c/0x80 [ 1843.490855] ? __mnt_want_write+0x98/0xe0 [ 1843.491397] __x64_sys_fsetxattr+0xba/0xe0 [ 1843.492201] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 1843.493201] do_syscall_64+0x6c/0x230 [ 1843.493988] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 1843.495041] RIP: 0033:0x7fa7a8a7707a [ 1843.495819] Code: 48 8b 0d 21 de 2b 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 49 89 ca b8 be 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d ee dd 2b 00 f7 d8 64 89 01 48 [ 1843.499203] RSP: 002b:00007ffcb73bca38 EFLAGS: 00000202 ORIG_RAX: 00000000000000be [ 1843.500210] RAX: ffffffffffffffda RBX: 00007ffcb73bda9d RCX: 00007fa7a8a7707a [ 1843.501170] RDX: 00007ffcb73bda9d RSI: 00000000006dc050 RDI: 0000000000000003 [ 1843.502152] RBP: 00000000006dc050 R08: 0000000000000000 R09: 0000000000000000 [ 1843.503109] R10: 0000000000000002 R11: 0000000000000202 R12: 00007ffcb73bda91 [ 1843.504055] R13: 0000000000000003 R14: 00007ffcb73bda82 R15: ffffffffffffffff [ 1843.505268] Allocated by task 3979: [ 1843.505771] save_stack+0x19/0x80 [ 1843.506211] __kasan_kmalloc.constprop.5+0xa0/0xd0 [ 1843.506836] setxattr+0xeb/0x230 [ 1843.507264] __x64_sys_fsetxattr+0xba/0xe0 [ 1843.507886] do_syscall_64+0x6c/0x230 [ 1843.508429] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 1843.509558] Freed by task 0: [ 1843.510188] (stack is not available) [ 1843.511309] The buggy address belongs to the object at ffff888111e369e0 which belongs to the cache kmalloc-8 of size 8 [ 1843.514095] The buggy address is located 2 bytes inside of 8-byte region [ffff888111e369e0, ffff888111e369e8) [ 1843.516524] The buggy address belongs to the page: [ 1843.517561] page:ffff88813f478d80 refcount:1 mapcount:0 mapping:ffff88811940c300 index:0xffff888111e373b8 compound_mapcount: 0 [ 1843.519993] flags: 0x4404000010200(slab|head) [ 1843.520951] raw: 0004404000010200 ffff88813f48b008 ffff888119403d50 ffff88811940c300 [ 1843.522616] raw: ffff888111e373b8 000000000016000f 00000001ffffffff 0000000000000000 [ 1843.524281] page dumped because: kasan: bad access detected [ 1843.525936] Memory state around the buggy address: [ 1843.526975] ffff888111e36880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 1843.528479] ffff888111e36900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 1843.530138] >ffff888111e36980: fc fc fc fc fc fc fc fc fc fc fc fc 02 fc fc fc [ 1843.531877] ^ [ 1843.533287] ffff888111e36a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 1843.534874] ffff888111e36a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 1843.536468] ================================================================== This is caused by supplying a too short compression value ('lz') in the test-case and comparing it to 'lzo' with strncmp() and a length of 3. strncmp() read past the 'lz' when looking for the 'o' and thus caused an out-of-bounds read. Introduce a new check 'btrfs_compress_is_valid_type()' which not only checks the user-supplied value against known compression types, but also employs checks for too short values. Reported-by: Nikolay Borisov Fixes: 272e5326c783 ("btrfs: prop: fix vanished compression property after failed set") CC: stable@vger.kernel.org # 5.1+ Reviewed-by: Nikolay Borisov Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/compression.c | 16 ++++++++++++++++ fs/btrfs/compression.h | 1 + fs/btrfs/props.c | 6 +----- 3 files changed, 18 insertions(+), 5 deletions(-) commit d1d832a0b51dd9570429bb4b81b2a6c1759e681a Author: Filipe Manana Date: Fri Jun 7 11:25:24 2019 +0100 Btrfs: fix data loss after inode eviction, renaming it, and fsync it When we log an inode, regardless of logging it completely or only that it exists, we always update it as logged (logged_trans and last_log_commit fields of the inode are updated). This is generally fine and avoids future attempts to log it from having to do repeated work that brings no value. However, if we write data to a file, then evict its inode after all the dealloc was flushed (and ordered extents completed), rename the file and fsync it, we end up not logging the new extents, since the rename may result in logging that the inode exists in case the parent directory was logged before. The following reproducer shows and explains how this can happen: $ mkfs.btrfs -f /dev/sdb $ mount /dev/sdb /mnt $ mkdir /mnt/dir $ touch /mnt/dir/foo $ touch /mnt/dir/bar # Do a direct IO write instead of a buffered write because with a # buffered write we would need to make sure dealloc gets flushed and # complete before we do the inode eviction later, and we can not do that # from user space with call to things such as sync(2) since that results # in a transaction commit as well. $ xfs_io -d -c "pwrite -S 0xd3 0 4K" /mnt/dir/bar # Keep the directory dir in use while we evict inodes. We want our file # bar's inode to be evicted but we don't want our directory's inode to # be evicted (if it were evicted too, we would not be able to reproduce # the issue since the first fsync below, of file foo, would result in a # transaction commit. $ ( cd /mnt/dir; while true; do :; done ) & $ pid=$! # Wait a bit to give time for the background process to chdir. $ sleep 0.1 # Evict all inodes, except the inode for the directory dir because it is # currently in use by our background process. $ echo 2 > /proc/sys/vm/drop_caches # fsync file foo, which ends up persisting information about the parent # directory because it is a new inode. $ xfs_io -c fsync /mnt/dir/foo # Rename bar, this results in logging that this inode exists (inode item, # names, xattrs) because the parent directory is in the log. $ mv /mnt/dir/bar /mnt/dir/baz # Now fsync baz, which ends up doing absolutely nothing because of the # rename operation which logged that the inode exists only. $ xfs_io -c fsync /mnt/dir/baz $ mount /dev/sdb /mnt $ od -t x1 -A d /mnt/dir/baz 0000000 --> Empty file, data we wrote is missing. Fix this by not updating last_sub_trans of an inode when we are logging only that it exists and the inode was not yet logged since it was loaded from disk (full_sync bit set), this is enough to make btrfs_inode_in_log() return false for this scenario and make us log the inode. The logged_trans of the inode is still always setsince that alone is used to track if names need to be deleted as part of unlink operations. Fixes: 257c62e1bce03e ("Btrfs: avoid tree log commit when there are no changes") CC: stable@vger.kernel.org # 4.4+ Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/tree-log.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 6d58a55a894e8632a6153e5b98792e7bdda13be8 Author: David Sterba Date: Tue Jun 11 14:31:01 2019 +0200 btrfs: raid56: clear incompat block group flags after removing the last one The incompat bit for RAID56 is set either at mount time or automatically when the profile is used by balance. The part where the bit is removed is missing and can be unexpected or undesired when an older kernel is needed. This patch will drop the incompat bit after this command, assuming that RAID5 profile is not used by system or metadata: $ btrfs balance start -dconvert=raid5 /mnt $ btrfs balance start -dconvert=raid1 /mnt This will print "clearing 128 feature flag" to the system log. The patch is safe for backporting to older kernels. Reported-by: Hugo Mills Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 00801ae4bb2be5f5af46502ef239ac5f4b536094 Author: David Sterba Date: Thu May 2 16:53:47 2019 +0200 btrfs: switch extent_buffer write_locks from atomic to int The write_locks is either 0 or 1 and always updated under the lock, so we don't need the atomic_t semantics. Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/extent_io.c | 2 +- fs/btrfs/extent_io.h | 2 +- fs/btrfs/locking.c | 6 +++--- fs/btrfs/print-tree.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) commit f3dc24c52a28c700e35757dce7b38456888071e1 Author: David Sterba Date: Thu May 2 16:51:53 2019 +0200 btrfs: switch extent_buffer spinning_writers from atomic to int The spinning_writers is either 0 or 1 and always updated under the lock, so we don't need the atomic_t semantics. Signed-off-by: David Sterba fs/btrfs/extent_io.c | 2 +- fs/btrfs/extent_io.h | 2 +- fs/btrfs/locking.c | 10 +++++----- fs/btrfs/print-tree.c | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) commit 06297d8cefcaa2029c4cb71b79285d2bfff06d4d Author: David Sterba Date: Thu May 2 16:47:23 2019 +0200 btrfs: switch extent_buffer blocking_writers from atomic to int The blocking_writers is either 0 or 1 and always updated under the lock, so we don't need the atomic_t semantics. Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/extent_io.c | 2 +- fs/btrfs/extent_io.h | 2 +- fs/btrfs/locking.c | 46 ++++++++++++++++++++-------------------------- fs/btrfs/print-tree.c | 2 +- 4 files changed, 23 insertions(+), 29 deletions(-) commit 38e9372e391deabf19c76c88b59b5e16f304627a Author: David Sterba Date: Wed Mar 27 16:19:55 2019 +0100 btrfs: assert delayed ref lock in btrfs_find_delayed_ref_head Turn the comment about required lock into an assertion. Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/delayed-ref.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit f3c8b6c63e816e4770abf073ee004e63593b5260 Author: Nicholas Piggin Date: Sat Jun 22 23:15:33 2019 +1000 powerpc/64s/exception: generate regs clear instructions using .rept No generated code change. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) commit bf66e3c4cf00bc00cdd2df90f63161eacf9c5714 Author: Nicholas Piggin Date: Sat Jun 22 23:15:32 2019 +1000 powerpc/64s/exception: fix indenting irregularities Generally, macros that result in instructions being expanded are indented by a tab, and those that don't have no indent. Fix the obvious cases that go contrary to style. No generated code change. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 92 ++++++++++++++++++------------------ 1 file changed, 46 insertions(+), 46 deletions(-) commit 1b4d4a7933a7afc6ea8e973b7aba84abdfb2fd0b Author: Nicholas Piggin Date: Sat Jun 22 23:15:31 2019 +1000 powerpc/64s/exception: use a gas macro for system call handler code No generated code change. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 127 +++++++++++++++-------------------- 1 file changed, 55 insertions(+), 72 deletions(-) commit f945478d5c689ccdab8bf3ee47f27085c2836690 Author: Nicholas Piggin Date: Sat Jun 22 23:15:30 2019 +1000 powerpc/64s/exception: remove unused BRANCH_TO_COMMON Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 8 -------- 1 file changed, 8 deletions(-) commit 64e413515ce1e731b87f704cf0d8d9768f0bd8c8 Author: Nicholas Piggin Date: Sat Jun 22 23:15:29 2019 +1000 powerpc/64s/exception: remove __BRANCH_TO_KVM No generated code change. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 43 +++++++++++++++--------------------- 1 file changed, 18 insertions(+), 25 deletions(-) commit a0502434bb02876d6c9b41d78a8db3a0b766f682 Author: Nicholas Piggin Date: Sat Jun 22 23:15:28 2019 +1000 powerpc/64s/exception: move head-64.h code to exception-64s.S where it is used No generated code change. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/exception-64s.h | 1 - arch/powerpc/include/asm/head-64.h | 252 ------------------------------- arch/powerpc/kernel/exceptions-64s.S | 251 ++++++++++++++++++++++++++++++ 3 files changed, 251 insertions(+), 253 deletions(-) commit 12a04809905913859106ffae93572cc312017dda Author: Nicholas Piggin Date: Sat Jun 22 23:15:27 2019 +1000 powerpc/64s/exception: move exception-64s.h code to exception-64s.S where it is used No generated code change. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/exception-64s.h | 431 ------------------------------- arch/powerpc/kernel/exceptions-64s.S | 431 +++++++++++++++++++++++++++++++ 2 files changed, 431 insertions(+), 431 deletions(-) commit f1ff37e8f2d5e03a8ad60f23856a1b97ce4c6c2e Author: Nicholas Piggin Date: Sat Jun 22 23:15:26 2019 +1000 powerpc/64s/exception: move KVM related code together No generated code change. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/exception-64s.h | 40 +++++++++++++++++--------------- 1 file changed, 21 insertions(+), 19 deletions(-) commit 6d18f29c33362bca2d28862d5b79f9b80e184ad3 Author: Nicholas Piggin Date: Sat Jun 22 23:15:25 2019 +1000 powerpc/64s/exception: remove STD_EXCEPTION_COMMON variants These are only called in one place each. No generated code change. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/exception-64s.h | 22 ---------------------- arch/powerpc/include/asm/head-64.h | 19 +++++++++++++++++-- 2 files changed, 17 insertions(+), 24 deletions(-) commit f0ac44788e658e8afbe75644cd6d0c2d5993c933 Author: Nicholas Piggin Date: Sat Jun 22 23:15:24 2019 +1000 powerpc/64s/exception: move EXCEPTION_PROLOG_2* to a more logical place No generated code change. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/exception-64s.h | 113 ++++++++++++++++--------------- 1 file changed, 57 insertions(+), 56 deletions(-) commit 80bd9177def1ab92637e8cd27c2534b1224b12b5 Author: Nicholas Piggin Date: Sat Jun 22 23:15:23 2019 +1000 powerpc/64s/exception: improve 0x500 handler code After the previous cleanup, it becomes possible to consolidate some common code outside the runtime alternate patching. Also remove unused labels. This results in some code change, but unchanged runtime instruction sequence. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit fc557537f2ad546e5c6f217143d8a95382f2e1b5 Author: Nicholas Piggin Date: Sat Jun 22 23:15:22 2019 +1000 powerpc/64s/exception: unwind exception-64s.h macros Many of these macros just specify 1-4 lines which are only called a few times each at most, and often just once. Remove this indirection. No generated code change. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/exception-64s.h | 101 ------------------------------- arch/powerpc/include/asm/head-64.h | 76 +++++++++++++++++------ arch/powerpc/kernel/exceptions-64s.S | 44 ++++++++------ 3 files changed, 82 insertions(+), 139 deletions(-) commit 47169fba3af465c995a936e6b9c67e0746f4c583 Author: Nicholas Piggin Date: Sat Jun 22 23:15:21 2019 +1000 powerpc/64s/exception: Move EXCEPTION_COMMON additions into callers More cases of code insertion via macros that does not add a great deal. All the additions have to be specified in the macro arguments, so they can just as well go after the macro. No generated code change. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/exception-64s.h | 42 +++++++++-------------------- arch/powerpc/include/asm/head-64.h | 4 +-- arch/powerpc/kernel/exceptions-64s.S | 45 +++++++++++++++++--------------- 3 files changed, 39 insertions(+), 52 deletions(-) commit c06075f3d3fc4d9be7f3f9d9832b4a387037cc26 Author: Nicholas Piggin Date: Sat Jun 22 23:15:20 2019 +1000 powerpc/64s/exception: Move EXCEPTION_COMMON handler and return branches into callers The aim is to reduce the amount of indirection it takes to get through the exception handler macros, particularly where it provides little code sharing. No generated code change. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/exception-64s.h | 26 +++++++++++++------------- arch/powerpc/kernel/exceptions-64s.S | 21 +++++++++++++-------- 2 files changed, 26 insertions(+), 21 deletions(-) commit 5dba1d50ba4f44a82e7228d6fb83ccdfd1bda0fb Author: Nicholas Piggin Date: Sat Jun 22 23:15:19 2019 +1000 powerpc/64s/exception: Make EXCEPTION_PROLOG_0 a gas macro for consistency with others No generated code change. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/exception-64s.h | 25 +++++++++++++------------ arch/powerpc/kernel/exceptions-64s.S | 24 ++++++++++++------------ 2 files changed, 25 insertions(+), 24 deletions(-) commit c0c6cd156c1239cd199a3bc083f1924518dd02a6 Author: Nicholas Piggin Date: Sat Jun 22 23:15:18 2019 +1000 powerpc/64s/exception: KVM handler can set the HSRR trap bit Move the KVM trap HSRR bit into the KVM handler, which can be conditionally applied when hsrr parameter is set. No generated code change. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/exception-64s.h | 5 +++++ arch/powerpc/include/asm/head-64.h | 7 ++----- 2 files changed, 7 insertions(+), 5 deletions(-) commit 17bdc064a1fe8638b526ec44e6593685dbfdc714 Author: Nicholas Piggin Date: Sat Jun 22 23:15:17 2019 +1000 powerpc/64s/exception: merge KVM handler and skip variants Conditionally expand the skip case if it is specified. No generated code change. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/exception-64s.h | 28 ++++++++++------------------ arch/powerpc/include/asm/head-64.h | 8 ++++---- arch/powerpc/kernel/exceptions-64s.S | 2 +- 3 files changed, 15 insertions(+), 23 deletions(-) commit fa4cf6b703f4d63b9a422e24332266ef7efae7b6 Author: Nicholas Piggin Date: Sat Jun 22 23:15:16 2019 +1000 powerpc/64s/exception: consolidate maskable and non-maskable prologs Conditionally expand the soft-masking test if a mask is passed in. No generated code change. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/exception-64s.h | 112 +++++++++++++------------------ arch/powerpc/kernel/exceptions-64s.S | 20 +++--- 2 files changed, 55 insertions(+), 77 deletions(-) commit a7c1ca19c295962eb8e1f714416a930daa582a90 Author: Nicholas Piggin Date: Sat Jun 22 23:15:15 2019 +1000 powerpc/64s/exception: remove the "extra" macro parameter Rather than pass in the soft-masking and KVM tests via macro that is passed to another macro to expand it, switch to usig gas macros and conditionally expand the soft-masking and KVM tests. The system reset with its idle test is open coded as it is a one-off. No generated code change. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/exception-64s.h | 158 ++++++++++++++----------------- arch/powerpc/kernel/exceptions-64s.S | 78 ++++++++------- 2 files changed, 114 insertions(+), 122 deletions(-) commit 8f528359efbbf05a7ce657ea31b3c80b7a742269 Author: Nicholas Piggin Date: Sat Jun 22 23:15:14 2019 +1000 powerpc/64s/exception: fix sreset KVM test code The sreset handler KVM test theoretically should not depend on P7. In practice KVM now only supports P7 and up so no real bug fix, but this change is made now so the quirk is not propagated through cleanup patches. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2d046308d0747848394a0c745d12af8122061792 Author: Nicholas Piggin Date: Sat Jun 22 23:15:13 2019 +1000 powerpc/64s/exception: move and tidy EXCEPTION_PROLOG_2 variants - Re-name the macros to _REAL and _VIRT suffixes rather than no and _RELON suffix. - Move the macro definitions together in the file. - Move RELOCATABLE ifdef inside the _VIRT macro. Further consolidation between variants does not buy much here. No generated code change. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/exception-64s.h | 87 +++++++++++++++----------------- arch/powerpc/kernel/exceptions-64s.S | 18 +++---- 2 files changed, 51 insertions(+), 54 deletions(-) commit bd7b6d1334c5fd92c1e1a9c8179154e115f427b0 Author: Nicholas Piggin Date: Sat Jun 22 23:15:12 2019 +1000 powerpc/64s/exception: consolidate EXCEPTION_PROLOG_2 with _NORI variant Switch to a gas macro that conditionally expands the RI clearing instruction. No generated code change. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/exception-64s.h | 43 ++++++++------------------------ arch/powerpc/kernel/exceptions-64s.S | 12 ++++----- 2 files changed, 17 insertions(+), 38 deletions(-) commit 4508a74a63154fea5c2d36d8ad064273c5ea9608 Author: Nicholas Piggin Date: Sat Jun 22 23:15:11 2019 +1000 powerpc/64s/exception: remove H concatenation for EXC_HV variants Replace all instances of this with gas macros that test the hsrr parameter and use the appropriate register names / labels. No generated code change. Signed-off-by: Nicholas Piggin [mpe: Remove extraneous 2nd check for 0xea0 in SOFTEN_TEST] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/exception-64s.h | 332 ++++++++++++++++++------------- arch/powerpc/include/asm/head-64.h | 8 +- arch/powerpc/kernel/exceptions-64s.S | 97 +++++---- 3 files changed, 253 insertions(+), 184 deletions(-) commit 52e63a4eabcf6ed9add47aefe86ada31e12e6d39 Author: Cong Wang Date: Sat Jun 29 12:17:14 2019 -0700 xfrm: remove a duplicated assignment Fixes: 30846090a746 ("xfrm: policy: add sequence count to sync with hash resize") Cc: Florian Westphal Cc: Steffen Klassert Signed-off-by: Cong Wang Signed-off-by: Steffen Klassert net/xfrm/xfrm_policy.c | 3 --- 1 file changed, 3 deletions(-) commit 4c12954965fdf33d8ae3883c1931fc29ca023cfb Author: Sebastian Parschauer Date: Mon Jul 1 07:48:17 2019 +0200 HID: Add another Primax PIXART OEM mouse quirk The PixArt OEM mice are known for disconnecting every minute in runlevel 1 or 3 if they are not always polled. So add quirk ALWAYS_POLL for this Alienware branded Primax mouse as well. Daniel Schepler (@dschepler) reported and tested the quirk. Reference: https://github.com/sriemer/fix-linux-mouse/issues/15 Signed-off-by: Sebastian Parschauer CC: stable@vger.kernel.org Signed-off-by: Jiri Kosina drivers/hid/hid-ids.h | 1 + drivers/hid/hid-quirks.c | 1 + 2 files changed, 2 insertions(+) commit 1efd8caa9a9192e6820d267c780c110a9f54336f Author: Michael Ellerman Date: Tue Jul 2 18:20:52 2019 +1000 powerpc/64s/exception: Remove unused SOFTEN_VALUE_0x980 Remove SOFTEN_VALUE_0x980, it's been unused since commit dabe859ec636 ("powerpc: Give hypervisor decrementer interrupts their own handler") (Sep 2012). Signed-off-by: Michael Ellerman arch/powerpc/include/asm/exception-64s.h | 1 - 1 file changed, 1 deletion(-) commit 6e2abc68585b0942257f6198944b8a0e24c67d8f Author: Aaron Armstrong Skomra Date: Wed Jun 26 15:48:48 2019 -0700 HID: wacom: generic: add touchring adjustment for 2nd Gen Pro Small Add the product ID for the 2nd Generation Intuos Pro Small to the touchring coordinate adjustment block. Signed-off-by: Aaron Armstrong Skomra Reviewed-by: Ping Cheng Signed-off-by: Benjamin Tissoires drivers/hid/wacom_wac.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit cca4786174656673f89684347e0028c88df57031 Author: Mauro Carvalho Chehab Date: Fri Jun 28 09:19:59 2019 -0300 docs: hid: convert to ReST Rename the HID documentation files to ReST, add an index for them and adjust in order to produce a nice html output via the Sphinx build system. While here, fix the sysfs example from hid-sensor.txt, that has a lot of "?" instead of the proper UTF-8 characters that are produced by the tree command. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Acked-by: Benjamin Tissoires Signed-off-by: Benjamin Tissoires Documentation/hid/{hid-alps.txt => hid-alps.rst} | 87 +++- .../hid/{hid-sensor.txt => hid-sensor.rst} | 194 +++++---- .../hid/{hid-transport.txt => hid-transport.rst} | 82 +++- Documentation/hid/{hiddev.txt => hiddev.rst} | 154 ++++--- Documentation/hid/{hidraw.txt => hidraw.rst} | 53 ++- Documentation/hid/index.rst | 18 + Documentation/hid/intel-ish-hid.rst | 485 +++++++++++++++++++++ Documentation/hid/intel-ish-hid.txt | 454 ------------------- Documentation/hid/{uhid.txt => uhid.rst} | 46 +- Documentation/input/input.rst | 2 +- MAINTAINERS | 2 +- 11 files changed, 899 insertions(+), 678 deletions(-) commit 539bca535decb11a0861b6205c6684b8e908589b Author: Andy Lutomirski Date: Mon Jul 1 20:43:21 2019 -0700 x86/entry/64: Fix and clean up paranoid_exit paranoid_exit needs to restore CR3 before GSBASE. Doing it in the opposite order crashes if the exception came from a context with user GSBASE and user CR3 -- RESTORE_CR3 cannot resture user CR3 if run with user GSBASE. This results in infinitely recursing exceptions if user code does SYSENTER with TF set if both FSGSBASE and PTI are enabled. The old code worked if user code just set TF without SYSENTER because #DB from user mode is special cased in idtentry and paranoid_exit doesn't run. Fix it by cleaning up the spaghetti code. All that paranoid_exit needs to do is to disable IRQs, handle IRQ tracing, then restore CR3, and restore GSBASE. Simply do those actions in that order. Fixes: 708078f65721 ("x86/entry/64: Handle FSGSBASE enabled paranoid entry/exit") Reported-by: Vegard Nossum Signed-off-by: Chang S. Bae Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Cc: Borislav Petkov Cc: Peter Zijlstra Cc: "H . Peter Anvin" Cc: Andi Kleen Cc: Ravi Shankar Cc: H. Peter Anvin Link: https://lkml.kernel.org/r/59725ceb08977359489fbed979716949ad45f616.1562035429.git.luto@kernel.org arch/x86/entry/entry_64.S | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) commit dffb3f9db6b593f3ed6ab4c8d8f10e0aa6aa7a88 Author: Andy Lutomirski Date: Mon Jul 1 20:43:20 2019 -0700 x86/entry/64: Don't compile ignore_sysret if 32-bit emulation is enabled It's only used if !CONFIG_IA32_EMULATION, so disable it in normal configs. This will save a few bytes of text and reduce confusion. Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Cc: "BaeChang Seok" Cc: Borislav Petkov Cc: Peter Zijlstra Cc: "Bae, Chang Seok" Link: https://lkml.kernel.org/r/0f7dafa72fe7194689de5ee8cfe5d83509fabcf5.1562035429.git.luto@kernel.org arch/x86/entry/entry_64.S | 6 ++++++ 1 file changed, 6 insertions(+) commit 9402eaf4c11f0b892eda7b2bcb4654ab34ce34f9 Author: Andy Lutomirski Date: Mon Jul 1 20:43:19 2019 -0700 selftests/x86: Test SYSCALL and SYSENTER manually with TF set Make sure that both variants of the nasty TF-in-compat-syscall are exercised regardless of what vendor's CPU is running the tests. Also change the intentional signal after SYSCALL to use ud2, which is a lot more comprehensible. This crashes the kernel due to an FSGSBASE bug right now. This test *also* detects a bug in KVM when run on an Intel host. KVM people, feel free to use it to help debug. There's a bunch of code in this test to warn instead of going into an infinite looping when the bug gets triggered. Reported-by: Vegard Nossum Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Cc: "BaeChang Seok" Cc: Borislav Petkov Cc: Peter Zijlstra Cc: Paolo Bonzini Cc: kvm@vger.kernel.org Cc: "Bae, Chang Seok" Link: https://lkml.kernel.org/r/5f5de10441ab2e3005538b4c33be9b1965d1bb63.1562035429.git.luto@kernel.org tools/testing/selftests/x86/Makefile | 5 +- tools/testing/selftests/x86/syscall_arg_fault.c | 112 ++++++++++++++++++++++-- 2 files changed, 110 insertions(+), 7 deletions(-) commit ede7c247abfaeef62484cfff320b072ec2b1dca0 Author: YueHaibing Date: Tue Jul 2 14:18:47 2019 +0800 rslib: Make some functions static Fix sparse warnings: lib/reed_solomon/test_rslib.c:313:5: warning: symbol 'ex_rs_helper' was not declared. Should it be static? lib/reed_solomon/test_rslib.c:349:5: warning: symbol 'exercise_rs' was not declared. Should it be static? lib/reed_solomon/test_rslib.c:407:5: warning: symbol 'exercise_rs_bc' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Thomas Gleixner Cc: Link: https://lkml.kernel.org/r/20190702061847.26060-1-yuehaibing@huawei.com lib/reed_solomon/test_rslib.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 337d1ccb3dc917c5801f40e71374a63f3e18678b Merge: 2a8d8e0feca2 e5b845dc7983 Author: David S. Miller Date: Mon Jul 1 19:36:35 2019 -0700 Merge branch 'Add-gve-driver' Catherine Sullivan says: ==================== Add gve driver This patch series adds the gve driver which will support the Compute Engine Virtual NIC that will be available in the future. v2: - Patch 1: - Remove gve_size_assert.h and use static_assert instead. - Loop forever instead of bugging if the device won't reset - Use module_pci_driver - Patch 2: - Use be16_to_cpu in the RX Seq No define - Remove unneeded ndo_change_mtu - Patch 3: - No Changes - Patch 4: - Instead of checking netif_carrier_ok in ethtool stats, just make sure v3: - Patch 1: - Remove X86 dep - Patch 2: - No changes - Patch 3: - No changes - Patch 4: - Remove unneeded memsets in ethtool stats v4: - Patch 1: - Use io[read|write]32be instead of [read|write]l(cpu_to_be32()) - Explicitly add padding to gve_adminq_set_driver_parameter - Use static where appropriate - Patch 2: - Use u64_stats_sync - Explicity add padding to gve_adminq_create_rx_queue - Fix some enianness typing issues found by kbuild - Use static where appropriate - Remove unused variables - Patch 3: - Use io[read|write]32be instead of [read|write]l(cpu_to_be32()) - Patch 4: - Use u64_stats_sync - Use static where appropriate Warnings reported by: Reported-by: kbuild test robot Reported-by: Julia Lawall ==================== Signed-off-by: David S. Miller commit e5b845dc79838e17ebeda63795337b5261a772eb Author: Catherine Sullivan Date: Mon Jul 1 15:57:55 2019 -0700 gve: Add ethtool support Add support for the following ethtool commands: ethtool -s|--change devname [msglvl N] [msglevel type on|off] ethtool -S|--statistics devname ethtool -i|--driver devname ethtool -l|--show-channels devname ethtool -L|--set-channels devname ethtool -g|--show-ring devname ethtool --reset devname Signed-off-by: Catherine Sullivan Signed-off-by: Sagi Shahar Signed-off-by: Jon Olson Acked-by: Willem de Bruijn Reviewed-by: Luigi Rizzo Signed-off-by: David S. Miller drivers/net/ethernet/google/gve/Makefile | 2 +- drivers/net/ethernet/google/gve/gve.h | 4 + drivers/net/ethernet/google/gve/gve_ethtool.c | 243 ++++++++++++++++++++++++++ drivers/net/ethernet/google/gve/gve_main.c | 41 ++++- 4 files changed, 288 insertions(+), 2 deletions(-) commit 9e5f7d26a4c087f34e540a5a6f853f8d93d51448 Author: Catherine Sullivan Date: Mon Jul 1 15:57:54 2019 -0700 gve: Add workqueue and reset support Add support for the workqueue to handle management interrupts and support for resets. Signed-off-by: Catherine Sullivan Signed-off-by: Sagi Shahar Signed-off-by: Jon Olson Acked-by: Willem de Bruijn Reviewed-by: Luigi Rizzo Signed-off-by: David S. Miller .../networking/device_drivers/google/gve.rst | 11 ++ drivers/net/ethernet/google/gve/gve.h | 62 +++++++ drivers/net/ethernet/google/gve/gve_main.c | 190 ++++++++++++++++++++- drivers/net/ethernet/google/gve/gve_rx.c | 5 +- 4 files changed, 260 insertions(+), 8 deletions(-) commit f5cedc84a30d2d3d0e0a7f3eb53fbd66d9bf5517 Author: Catherine Sullivan Date: Mon Jul 1 15:57:53 2019 -0700 gve: Add transmit and receive support Add support for passing traffic. Signed-off-by: Catherine Sullivan Signed-off-by: Sagi Shahar Signed-off-by: Jon Olson Acked-by: Willem de Bruijn Reviewed-by: Luigi Rizzo Signed-off-by: David S. Miller .../networking/device_drivers/google/gve.rst | 30 ++ drivers/net/ethernet/google/gve/Makefile | 2 +- drivers/net/ethernet/google/gve/gve.h | 260 ++++++++- drivers/net/ethernet/google/gve/gve_adminq.c | 138 +++++ drivers/net/ethernet/google/gve/gve_adminq.h | 83 +++ drivers/net/ethernet/google/gve/gve_desc.h | 113 ++++ drivers/net/ethernet/google/gve/gve_main.c | 573 +++++++++++++++++++- drivers/net/ethernet/google/gve/gve_rx.c | 443 ++++++++++++++++ drivers/net/ethernet/google/gve/gve_tx.c | 584 +++++++++++++++++++++ 9 files changed, 2221 insertions(+), 5 deletions(-) commit 893ce44df56580fb878ca5af9c4a5fd87567da50 Author: Catherine Sullivan Date: Mon Jul 1 15:57:52 2019 -0700 gve: Add basic driver framework for Compute Engine Virtual NIC Add a driver framework for the Compute Engine Virtual NIC that will be available in the future. At this point the only functionality is loading the driver. Signed-off-by: Catherine Sullivan Signed-off-by: Sagi Shahar Signed-off-by: Jon Olson Acked-by: Willem de Bruijn Reviewed-by: Luigi Rizzo Signed-off-by: David S. Miller .../networking/device_drivers/google/gve.rst | 82 ++++ Documentation/networking/device_drivers/index.rst | 1 + MAINTAINERS | 9 + drivers/net/ethernet/Kconfig | 1 + drivers/net/ethernet/Makefile | 1 + drivers/net/ethernet/google/Kconfig | 27 ++ drivers/net/ethernet/google/Makefile | 5 + drivers/net/ethernet/google/gve/Makefile | 4 + drivers/net/ethernet/google/gve/gve.h | 135 +++++++ drivers/net/ethernet/google/gve/gve_adminq.c | 249 ++++++++++++ drivers/net/ethernet/google/gve/gve_adminq.h | 134 +++++++ drivers/net/ethernet/google/gve/gve_main.c | 446 +++++++++++++++++++++ drivers/net/ethernet/google/gve/gve_register.h | 27 ++ 13 files changed, 1121 insertions(+) commit 2a8d8e0feca29f27570732807c6353151309e97c Merge: 8909783cb5b7 509e56b37cc3 Author: David S. Miller Date: Mon Jul 1 19:34:46 2019 -0700 Merge branch 'blackhole-device-to-invalidate-dst' Mahesh Bandewar says: ==================== blackhole device to invalidate dst When we invalidate dst or mark it "dead", we assign 'lo' to dst->dev. First of all this assignment is racy and more over, it has MTU implications. The standard dev MTU is 1500 while the Loopback MTU is 64k. TCP code when dereferencing the dst don't check if the dst is valid or not. TCP when dereferencing a dead-dst while negotiating a new connection, may use dst device which is 'lo' instead of using the correct device. Consider the following scenario: A SYN arrives on an interface and tcp-layer while processing SYNACK finds a dst and associates it with SYNACK skb. Now before skb gets passed to L3 for processing, if that dst gets "dead" (because of the virtual device getting disappeared & then reappeared), the 'lo' gets assigned to that dst (lo MTU = 64k). Let's assume the SYN has ADV_MSS set as 9k while the output device through which this SYNACK is going to go out has standard MTU of 1500. The MTU check during the route check passes since MIN(9K, 64K) is 9k and TCP successfully negotiates 9k MSS. The subsequent data packet; bigger in size gets passed to the device and it won't be marked as GSO since the assumed MTU of the device is 9k. This either crashes the NIC and we have seen fixes that went into drivers to handle this scenario. 8914a595110a ('bnx2x: disable GSO where gso_size is too big for hardware') and 2b16f048729b ('net: create skb_gso_validate_mac_len()') and with those fixes TCP eventually recovers but not before few dropped segments. Well, I'm not a TCP expert and though we have experienced these corner cases in our environment, I could not reproduce this case reliably in my test setup to try this fix myself. However, Michael Chan had a setup where these fixes helped him mitigate the issue and not cause the crash. The idea here is to not alter the data-path with additional locks or smb()/rmb() barriers to avoid racy assignments but to create a new device that has really low MTU that has .ndo_start_xmit essentially a kfree_skb(). Make use of this device instead of 'lo' when marking the dst dead. First patch implements the blackhole device and second patch uses it in IPv4 and IPv6 stack while the third patch is the self test that ensures the sanity of this device. v1->v2 fixed the self-test patch to handle the conflict v2 -> v3 fixed Kconfig text/string. ==================== Signed-off-by: David S. Miller commit 509e56b37cc32c9b5fc2be585c25d1e60d6a1d73 Author: Mahesh Bandewar Date: Mon Jul 1 14:39:01 2019 -0700 blackhole_dev: add a selftest Since this is not really a device with all capabilities, this test ensures that it has *enough* to make it through the data path without causing unwanted side-effects (read crash!). Signed-off-by: Mahesh Bandewar Signed-off-by: David S. Miller lib/Kconfig.debug | 9 ++ lib/Makefile | 1 + lib/test_blackhole_dev.c | 100 ++++++++++++++++++++++ tools/testing/selftests/net/Makefile | 2 +- tools/testing/selftests/net/config | 1 + tools/testing/selftests/net/test_blackhole_dev.sh | 11 +++ 6 files changed, 123 insertions(+), 1 deletion(-) commit 8d7017fd621d02ff0d47d19484350c2356828483 Author: Mahesh Bandewar Date: Mon Jul 1 14:38:57 2019 -0700 blackhole_netdev: use blackhole_netdev to invalidate dst entries Use blackhole_netdev instead of 'lo' device with lower MTU when marking dst "dead". Signed-off-by: Mahesh Bandewar Tested-by: Michael Chan Signed-off-by: David S. Miller net/core/dst.c | 2 +- net/ipv4/route.c | 3 +-- net/ipv6/route.c | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) commit 4de83b88c66a1e4dba426b29766fb68e61d93792 Author: Mahesh Bandewar Date: Mon Jul 1 14:38:49 2019 -0700 loopback: create blackhole net device similar to loopack. Create a blackhole net device that can be used for "dead" dst entries instead of loopback device. This blackhole device differs from loopback in few aspects: (a) It's not per-ns. (b) MTU on this device is ETH_MIN_MTU (c) The xmit function is essentially kfree_skb(). and (d) since it's not registered it won't have ifindex. Lower MTU effectively make the device not pass the MTU check during the route check when a dst associated with the skb is dead. Signed-off-by: Mahesh Bandewar Signed-off-by: David S. Miller drivers/net/loopback.c | 76 +++++++++++++++++++++++++++++++++++++++++------ include/linux/netdevice.h | 2 ++ 2 files changed, 69 insertions(+), 9 deletions(-) commit 13e04fbf0b974df6fbf646799fc49f373c9b52d0 Author: Hayes Wang Date: Mon Jul 1 15:53:19 2019 +0800 r8152: fix the setting of detecting the linking change for runtime suspend 1. Rename r8153b_queue_wake() to r8153_queue_wake(). 2. Correct the setting. The enable bit should be 0xd38c bit 0. Besides, the 0xd38a bit 0 and 0xd398 bit 8 have to be cleared for both enabled and disabled. Signed-off-by: Hayes Wang Signed-off-by: David S. Miller drivers/net/usb/r8152.c | 38 +++++++++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 11 deletions(-) commit 8909783cb5b719e05c17e62529efb97c564b2e26 Author: Hariprasad Kelam Date: Sun Jun 30 19:59:49 2019 +0530 net: ethernet: broadcom: bcm63xx_enet: Remove unneeded memset Remove unneeded memset as alloc_etherdev is using kvzalloc which uses __GFP_ZERO flag Signed-off-by: Hariprasad Kelam Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bcm63xx_enet.c | 1 - 1 file changed, 1 deletion(-) commit fec3b9ec47bdf1383806c947353ba8d1ddc137cf Merge: a8488b702648 ba2b232108d3 Author: David S. Miller Date: Mon Jul 1 19:27:08 2019 -0700 Merge branch 'net-netsec-Add-XDP-Support' Ilias Apalodimas says: ==================== net: netsec: Add XDP Support This is a respin of https://www.spinics.net/lists/netdev/msg526066.html Since page_pool API fixes are merged into net-next we can now safely use it's DMA mapping capabilities. First patch changes the buffer allocation from napi/netdev_alloc_frag() to page_pool API. Although this will lead to slightly reduced performance (on raw packet drops only) we can use the API for XDP buffer recycling. Another side effect is a slight increase in memory usage, due to using a single page per packet. The second patch adds XDP support on the driver. There's a bunch of interesting options that come up due to the single Tx queue. Locking is needed(to avoid messing up the Tx queues since ndo_xdp_xmit and the normal stack can co-exist). We also need to track down the 'buffer type' for TX and properly free or recycle the packet depending on it's nature. Changes since RFC: - Bug fixes from Jesper and Maciej - Added page pool API to retrieve the DMA direction Changes since v1: - Use page_pool_free correctly if xdp_rxq_info_reg() failed ==================== Signed-off-by: David S. Miller commit ba2b232108d3c2951bab02930a00f23b0cffd5af Author: Ilias Apalodimas Date: Sat Jun 29 08:23:25 2019 +0300 net: netsec: add XDP support The interface only supports 1 Tx queue so locking is introduced on the Tx queue if XDP is enabled to make sure .ndo_start_xmit and .ndo_xdp_xmit won't corrupt Tx ring - Performance (SMMU off) Benchmark XDP_SKB XDP_DRV xdp1 291kpps 344kpps rxdrop 282kpps 342kpps - Performance (SMMU on) Benchmark XDP_SKB XDP_DRV xdp1 167kpps 324kpps rxdrop 164kpps 323kpps Signed-off-by: Ilias Apalodimas Acked-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller drivers/net/ethernet/socionext/netsec.c | 361 +++++++++++++++++++++++++++++--- 1 file changed, 334 insertions(+), 27 deletions(-) commit bb005f2a70742d66f8fe44d57e217c696e805d97 Author: Ilias Apalodimas Date: Sat Jun 29 08:23:24 2019 +0300 net: page_pool: add helper function for retrieving dma direction Since the dma direction is stored in page pool params, offer an API helper for driver that choose not to keep track of it locally Signed-off-by: Ilias Apalodimas Acked-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller include/net/page_pool.h | 9 +++++++++ 1 file changed, 9 insertions(+) commit 5c67bf0ec4d0e6ff3c384ddc7846ed243b41251b Author: Ilias Apalodimas Date: Sat Jun 29 08:23:23 2019 +0300 net: netsec: Use page_pool API Use page_pool and it's DMA mapping capabilities for Rx buffers instead of netdev/napi_alloc_frag() Although this will result in a slight performance penalty on small sized packets (~10%) the use of the API will allow to easily add XDP support. The penalty won't be visible in network testing i.e ipef/netperf etc, it only happens during raw packet drops. Furthermore we intend to add recycling capabilities on the API in the future. Once the recycling is added the performance penalty will go away. The only 'real' penalty is the slightly increased memory usage, since we now allocate a page per packet instead of the amount of bytes we need + skb metadata (difference is roughly 2kb per packet). With a minimum of 4BG of RAM on the only SoC that has this NIC the extra memory usage is negligible (a bit more on 64K pages) Signed-off-by: Ilias Apalodimas Acked-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller drivers/net/ethernet/socionext/Kconfig | 1 + drivers/net/ethernet/socionext/netsec.c | 126 ++++++++++++++++++++------------ 2 files changed, 80 insertions(+), 47 deletions(-) commit acd3e96d53a24d219f720ed4012b62723ae05da1 Author: Jakub Kicinski Date: Fri Jun 28 16:11:39 2019 -0700 net/tls: make sure offload also gets the keys wiped Commit 86029d10af18 ("tls: zero the crypto information from tls_context before freeing") added memzero_explicit() calls to clear the key material before freeing struct tls_context, but it missed tls_device.c has its own way of freeing this structure. Replace the missing free. Fixes: 86029d10af18 ("tls: zero the crypto information from tls_context before freeing") Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller include/net/tls.h | 1 + net/tls/tls_device.c | 2 +- net/tls/tls_main.c | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) commit 618bac45937a3dc6126ac0652747481e97000f99 Author: Jakub Kicinski Date: Fri Jun 28 16:07:59 2019 -0700 net/tls: reject offload of TLS 1.3 Neither drivers nor the tls offload code currently supports TLS version 1.3. Check the TLS version when installing connection state. TLS 1.3 will just fallback to the kernel crypto for now. Fixes: 130b392c6cd6 ("net: tls: Add tls 1.3 support") Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller net/tls/tls_device.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit a8488b702648ee6a5f391e2127e98e69ccca5b45 Author: Roman Mashak Date: Fri Jun 28 17:32:01 2019 -0400 tc-testing: added tdc tests for prio qdisc Signed-off-by: Roman Mashak Signed-off-by: David S. Miller .../selftests/tc-testing/tc-tests/qdiscs/prio.json | 276 +++++++++++++++++++++ 1 file changed, 276 insertions(+) commit c8881faf6e984611699f56bba08693c6380e8acd Merge: 362b87f5b1c6 5d15a8ec2aeb Author: David S. Miller Date: Mon Jul 1 19:18:04 2019 -0700 Merge branch 'mirred-batch-fixes' Roman Mashak says: ==================== Fix batched event generation for mirred action When adding or deleting a batch of entries, the kernel sends upto TCA_ACT_MAX_PRIO entries in an event to user space. However it does not consider that the action sizes may vary and require different skb sizes. For example : % cat tc-batch.sh TC="sudo /mnt/iproute2.git/tc/tc" $TC actions flush action mirred for i in `seq 1 $1`; do cmd="action mirred egress redirect dev lo index $i " args=$args$cmd done $TC actions add $args % % ./tc-batch.sh 32 Error: Failed to fill netlink attributes while adding TC action. We have an error talking to the kernel % patch 1 adds callback in tc_action_ops of mirred action, which calculates the action size, and passes size to tcf_add_notify()/tcf_del_notify(). patch 2 updates the TDC test suite with relevant test cases. ==================== Signed-off-by: David S. Miller commit 5d15a8ec2aebbb86b9db98ee98d6f9765168d7a6 Author: Roman Mashak Date: Fri Jun 28 14:30:18 2019 -0400 tc-testing: updated mirred action tests with batch create/delete Signed-off-by: Roman Mashak Signed-off-by: David S. Miller .../tc-testing/tc-tests/actions/mirred.json | 94 ++++++++++++++++++++++ 1 file changed, 94 insertions(+) commit b84b2d4e388412a68019e257d76c0ea6fbd796eb Author: Roman Mashak Date: Fri Jun 28 14:30:17 2019 -0400 net sched: update mirred action for batched events operations Add get_fill_size() routine used to calculate the action size when building a batch of events. Signed-off-by: Roman Mashak Signed-off-by: David S. Miller net/sched/act_mirred.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 8a534f8fb0dc44694a437b575060499efd1c91de Merge: eb1f5c02ddf5 95b9395ba103 Author: David S. Miller Date: Mon Jul 1 19:15:46 2019 -0700 Merge branch 'idr-fix-overflow-cases-on-32-bit-CPU' Cong Wang says: ==================== idr: fix overflow cases on 32-bit CPU idr_get_next_ul() is problematic by design, it can't handle the following overflow case well on 32-bit CPU: u32 id = UINT_MAX; idr_alloc_u32(&id); while (idr_get_next_ul(&id) != NULL) id++; when 'id' overflows and becomes 0 after UINT_MAX, the loop goes infinite. Fix this by eliminating external users of idr_get_next_ul() and migrating them to idr_for_each_entry_continue_ul(). And add an additional parameter for these iteration macros to detect overflow properly. Please merge this through networking tree, as all the users are in networking subsystem. ==================== Signed-off-by: David S. Miller commit 95b9395ba103ec0cc40bebb71a08231b5e226a76 Author: Davide Caratti Date: Fri Jun 28 11:03:43 2019 -0700 selftests: add a test case for cls_lower handle overflow Reported-by: Li Shuang Signed-off-by: Davide Caratti Signed-off-by: Cong Wang Signed-off-by: David S. Miller .../selftests/tc-testing/tc-tests/filters/tests.json | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit d39d714969cda5cbda291402c8c6b1fb1047f42e Author: Cong Wang Date: Fri Jun 28 11:03:42 2019 -0700 idr: introduce idr_for_each_entry_continue_ul() Similarly, other callers of idr_get_next_ul() suffer the same overflow bug as they don't handle it properly either. Introduce idr_for_each_entry_continue_ul() to help these callers iterate from a given ID. cls_flower needs more care here because it still has overflow when does arg->cookie++, we have to fold its nested loops into one and remove the arg->cookie++. Fixes: 01683a146999 ("net: sched: refactor flower walk to iterate over idr") Fixes: 12d6066c3b29 ("net/mlx5: Add flow counters idr") Reported-by: Li Shuang Cc: Davide Caratti Cc: Vlad Buslov Cc: Chris Mi Cc: Matthew Wilcox Signed-off-by: Cong Wang Tested-by: Davide Caratti Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlx5/core/fs_counters.c | 10 ++++---- include/linux/idr.h | 14 +++++++++++ net/sched/cls_flower.c | 27 ++++++---------------- 3 files changed, 27 insertions(+), 24 deletions(-) commit e33d2b74d805af0e4c8060f41040595ba105a520 Author: Cong Wang Date: Fri Jun 28 11:03:41 2019 -0700 idr: fix overflow case for idr_for_each_entry_ul() idr_for_each_entry_ul() is buggy as it can't handle overflow case correctly. When we have an ID == UINT_MAX, it becomes an infinite loop. This happens when running on 32-bit CPU where unsigned long has the same size with unsigned int. There is no better way to fix this than casting it to a larger integer, but we can't just 64 bit integer on 32 bit CPU. Instead we could just use an additional integer to help us to detect this overflow case, that is, adding a new parameter to this macro. Fortunately tc action is its only user right now. Fixes: 65a206c01e8e ("net/sched: Change act_api and act_xxx modules to use IDR") Reported-by: Li Shuang Tested-by: Davide Caratti Cc: Matthew Wilcox Cc: Chris Mi Signed-off-by: Cong Wang Signed-off-by: David S. Miller include/linux/idr.h | 7 +++++-- net/sched/act_api.c | 9 ++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) commit 362b87f5b1c6603b72699e8bb18661ecc4efc0bb Author: Jason A. Donenfeld Date: Fri Jun 28 16:40:21 2019 +0200 netlink: use 48 byte ctx instead of 6 signed longs for callback People are inclined to stuff random things into cb->args[n] because it looks like an array of integers. Sometimes people even put u64s in there with comments noting that a certain member takes up two slots. The horror! Really this should mirror the usage of skb->cb, which are just 48 opaque bytes suitable for casting a struct. Then people can create their usual casting macros for accessing strongly typed members of a struct. As a plus, this also gives us the same amount of space on 32bit and 64bit. Signed-off-by: Jason A. Donenfeld Reviewed-by: Johannes Berg Signed-off-by: David S. Miller include/linux/netlink.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 53962bcea9975a33669ba03e06111df636048bb1 Author: Jon Maloy Date: Fri Jun 28 17:06:20 2019 +0200 tipc: embed jiffies in macro TIPC_BC_RETR_LIM The macro TIPC_BC_RETR_LIM is always used in combination with 'jiffies', so we can just as well perform the addition in the macro itself. This way, we get a few shorter code lines and one less line break. Signed-off-by: Jon Maloy Acked-by: Ying Xue Signed-off-by: David S. Miller net/tipc/link.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit eb1f5c02ddf5ef51fcd746f6ff55b93935fc981c Merge: 7c31e54aeee5 0d20e56ecca0 Author: David S. Miller Date: Mon Jul 1 19:09:07 2019 -0700 Merge branch 'vsock-virtio-fixes' Stefano Garzarella says: ==================== vsock/virtio: several fixes in the .probe() and .remove() During the review of "[PATCH] vsock/virtio: Initialize core virtio vsock before registering the driver", Stefan pointed out some possible issues in the .probe() and .remove() callbacks of the virtio-vsock driver. This series tries to solve these issues: - Patch 1 adds RCU critical sections to avoid use-after-free of 'the_virtio_vsock' pointer. - Patch 2 stops workers before to call vdev->config->reset(vdev) to be sure that no one is accessing the device. - Patch 3 moves the works flush at the end of the .remove() to avoid use-after-free of 'vsock' object. v2: - Patch 1: use RCU to protect 'the_virtio_vsock' pointer - Patch 2: no changes - Patch 3: flush works only at the end of .remove() - Removed patch 4 because virtqueue_detach_unused_buf() returns all the buffers allocated. v1: https://patchwork.kernel.org/cover/10964733/ ==================== Signed-off-by: David S. Miller commit 0d20e56ecca0f5025f9041d11ee247129b5e48ce Author: Stefano Garzarella Date: Fri Jun 28 14:36:59 2019 +0200 vsock/virtio: fix flush of works during the .remove() This patch moves the flush of works after vdev->config->del_vqs(vdev), because we need to be sure that no workers run before to free the 'vsock' object. Since we stopped the workers using the [tx|rx|event]_run flags, we are sure no one is accessing the device while we are calling vdev->config->reset(vdev), so we can safely move the workers' flush. Before the vdev->config->del_vqs(vdev), workers can be scheduled by VQ callbacks, so we must flush them after del_vqs(), to avoid use-after-free of 'vsock' object. Suggested-by: Michael S. Tsirkin Signed-off-by: Stefano Garzarella Signed-off-by: David S. Miller net/vmw_vsock/virtio_transport.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 17dd1367389cfe7f150790c83247b68e0c19d106 Author: Stefano Garzarella Date: Fri Jun 28 14:36:58 2019 +0200 vsock/virtio: stop workers during the .remove() Before to call vdev->config->reset(vdev) we need to be sure that no one is accessing the device, for this reason, we add new variables in the struct virtio_vsock to stop the workers during the .remove(). This patch also add few comments before vdev->config->reset(vdev) and vdev->config->del_vqs(vdev). Suggested-by: Stefan Hajnoczi Suggested-by: Michael S. Tsirkin Signed-off-by: Stefano Garzarella Signed-off-by: David S. Miller net/vmw_vsock/virtio_transport.c | 51 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) commit 9c7a5582f5d720dc35cfcc42ccaded69f0642e4a Author: Stefano Garzarella Date: Fri Jun 28 14:36:57 2019 +0200 vsock/virtio: use RCU to avoid use-after-free on the_virtio_vsock Some callbacks used by the upper layers can run while we are in the .remove(). A potential use-after-free can happen, because we free the_virtio_vsock without knowing if the callbacks are over or not. To solve this issue we move the assignment of the_virtio_vsock at the end of .probe(), when we finished all the initialization, and at the beginning of .remove(), before to release resources. For the same reason, we do the same also for the vdev->priv. We use RCU to be sure that all callbacks that use the_virtio_vsock ended before freeing it. This is not required for callbacks that use vdev->priv, because after the vdev->config->del_vqs() we are sure that they are ended and will no longer be invoked. We also take the mutex during the .remove() to avoid that .probe() can run while we are resetting the device. Signed-off-by: Stefano Garzarella Signed-off-by: David S. Miller net/vmw_vsock/virtio_transport.c | 67 ++++++++++++++++++++++++++-------------- 1 file changed, 44 insertions(+), 23 deletions(-) commit 72f64cabc4bd6985c7355f5547bd3637c82762ac Author: Clement Leger Date: Mon Jul 1 09:02:45 2019 +0200 remoteproc: copy parent dma_pfn_offset for vdev When preparing the subdevice for the vdev, also copy dma_pfn_offset since this is used for sub device dma allocations. Without that, there is incoherency between the parent dma settings and the childs one, potentially leading to dma_alloc_coherent failure (due to phys_to_dma using dma_pfn_offset for translation). Fixes: 086d08725d34 ("remoteproc: create vdev subdevice with specific dma memory pool") Signed-off-by: Clement Leger Acked-by: Loic Pallardy Signed-off-by: Bjorn Andersson drivers/remoteproc/remoteproc_core.c | 1 + 1 file changed, 1 insertion(+) commit 7c31e54aeee517d1318dfc0bde9fa7de75893dc6 Author: Taehee Yoo Date: Fri Jun 28 14:07:25 2019 +0900 vxlan: do not destroy fdb if register_netdevice() is failed __vxlan_dev_create() destroys FDB using specific pointer which indicates a fdb when error occurs. But that pointer should not be used when register_netdevice() fails because register_netdevice() internally destroys fdb when error occurs. This patch makes vxlan_fdb_create() to do not link fdb entry to vxlan dev internally. Instead, a new function vxlan_fdb_insert() is added to link fdb to vxlan dev. vxlan_fdb_insert() is called after calling register_netdevice(). This routine can avoid situation that ->ndo_uninit() destroys fdb entry in error path of register_netdevice(). Hence, error path of __vxlan_dev_create() routine can have an opportunity to destroy default fdb entry by hand. Test command ip link add bonding_masters type vxlan id 0 group 239.1.1.1 \ dev enp0s9 dstport 4789 Splat looks like: [ 213.392816] kasan: GPF could be caused by NULL-ptr deref or user memory access [ 213.401257] general protection fault: 0000 [#1] SMP DEBUG_PAGEALLOC KASAN PTI [ 213.402178] CPU: 0 PID: 1414 Comm: ip Not tainted 5.2.0-rc5+ #256 [ 213.402178] RIP: 0010:vxlan_fdb_destroy+0x120/0x220 [vxlan] [ 213.402178] Code: df 48 8b 2b 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 06 01 00 00 4c 8b 63 08 48 b8 00 00 00 00 00 fc d [ 213.402178] RSP: 0018:ffff88810cb9f0a0 EFLAGS: 00010202 [ 213.402178] RAX: dffffc0000000000 RBX: ffff888101d4a8c8 RCX: 0000000000000000 [ 213.402178] RDX: 1bd5a00000000040 RSI: ffff888101d4a8c8 RDI: ffff888101d4a8d0 [ 213.402178] RBP: 0000000000000000 R08: fffffbfff22b72d9 R09: 0000000000000000 [ 213.402178] R10: 00000000ffffffef R11: 0000000000000000 R12: dead000000000200 [ 213.402178] R13: ffff88810cb9f1f8 R14: ffff88810efccda0 R15: ffff88810efccda0 [ 213.402178] FS: 00007f7f6621a0c0(0000) GS:ffff88811b000000(0000) knlGS:0000000000000000 [ 213.402178] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 213.402178] CR2: 000055746f0807d0 CR3: 00000001123e0000 CR4: 00000000001006f0 [ 213.402178] Call Trace: [ 213.402178] __vxlan_dev_create+0x3a9/0x7d0 [vxlan] [ 213.402178] ? vxlan_changelink+0x740/0x740 [vxlan] [ 213.402178] ? rcu_read_unlock+0x60/0x60 [vxlan] [ 213.402178] ? __kasan_kmalloc.constprop.3+0xa0/0xd0 [ 213.402178] vxlan_newlink+0x8d/0xc0 [vxlan] [ 213.402178] ? __vxlan_dev_create+0x7d0/0x7d0 [vxlan] [ 213.554119] ? __netlink_ns_capable+0xc3/0xf0 [ 213.554119] __rtnl_newlink+0xb75/0x1180 [ 213.554119] ? rtnl_link_unregister+0x230/0x230 [ ... ] Fixes: 0241b836732f ("vxlan: fix default fdb entry netlink notify ordering during netdev create") Suggested-by: Roopa Prabhu Signed-off-by: Taehee Yoo Acked-by: Roopa Prabhu Signed-off-by: David S. Miller drivers/net/vxlan.c | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) commit 00dc3307c0f7a8bdc79409e0a00d86efea93e0ea Author: Eiichi Tsukata Date: Fri Jun 28 11:37:14 2019 +0900 net/ipv6: Fix misuse of proc_dointvec "flowlabel_reflect" /proc/sys/net/ipv6/flowlabel_reflect assumes written value to be in the range of 0 to 3. Use proc_dointvec_minmax instead of proc_dointvec. Fixes: 323a53c41292 ("ipv6: tcp: enable flowlabel reflection in some RST packets") Signed-off-by: Eiichi Tsukata Signed-off-by: David S. Miller net/ipv6/sysctl_net_ipv6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 27ba4059e06b3bbd38a7d944fd5a78cdf47534f4 Author: Yunsheng Lin Date: Fri Jun 28 09:13:19 2019 +0800 net: link_watch: prevent starvation when processing linkwatch wq When user has configured a large number of virtual netdev, such as 4K vlans, the carrier on/off operation of the real netdev will also cause it's virtual netdev's link state to be processed in linkwatch. Currently, the processing is done in a work queue, which may cause rtnl locking starvation problem and worker starvation problem for other work queue, such as irqfd_inject wq. This patch releases the cpu when link watch worker has processed a fixed number of netdev' link watch event, and schedule the work queue again when there is still link watch event remaining. Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller net/core/link_watch.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit f04b913834569efbbee442f2a3fb6199ce94dbbc Author: Bjorn Andersson Date: Fri Jun 21 18:21:46 2019 -0700 remoteproc: qcom: q6v5-mss: Support loading non-split images In some software releases the firmware images are not split up with each loadable segment in it's own file. Check the size of the loaded firmware to see if it still contains each segment to be loaded, before falling back to the split-out segments. Reviewed-by: Jeffrey Hugo Signed-off-by: Bjorn Andersson drivers/remoteproc/qcom_q6v5_mss.c | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) commit 498b98e939007f8bb65094dfa229e84b6bf30e62 Author: Bjorn Andersson Date: Fri Jun 21 18:21:45 2019 -0700 soc: qcom: mdt_loader: Support loading non-split images In some software releases the firmware images are not split up with each loadable segment in it's own file. Check the size of the loaded firmware to see if it still contains each segment to be loaded, before falling back to the split-out segments. Acked-by: Andy Gross Reviewed-by: Jeffrey Hugo Signed-off-by: Bjorn Andersson drivers/soc/qcom/mdt_loader.c | 88 +++++++++++++++++++++++++++++++++++-- include/linux/soc/qcom/mdt_loader.h | 2 + 2 files changed, 87 insertions(+), 3 deletions(-) commit 4d1415811e492d9a8238f8a92dd0d51612c788e9 Author: Marcelo Ricardo Leitner Date: Thu Jun 27 19:48:10 2019 -0300 sctp: fix error handling on stream scheduler initialization It allocates the extended area for outbound streams only on sendmsg calls, if they are not yet allocated. When using the priority stream scheduler, this initialization may imply into a subsequent allocation, which may fail. In this case, it was aborting the stream scheduler initialization but leaving the ->ext pointer (allocated) in there, thus in a partially initialized state. On a subsequent call to sendmsg, it would notice the ->ext pointer in there, and trip on uninitialized stuff when trying to schedule the data chunk. The fix is undo the ->ext initialization if the stream scheduler initialization fails and avoid the partially initialized state. Although syzkaller bisected this to commit 4ff40b86262b ("sctp: set chunk transport correctly when it's a new asoc"), this bug was actually introduced on the commit I marked below. Reported-by: syzbot+c1a380d42b190ad1e559@syzkaller.appspotmail.com Fixes: 5bbbbe32a431 ("sctp: introduce stream scheduler foundations") Tested-by: Xin Long Signed-off-by: Marcelo Ricardo Leitner Acked-by: Neil Horman Signed-off-by: David S. Miller net/sctp/stream.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit c8c8218ec5af5d2598381883acbefbf604e56b5e Author: Cong Wang Date: Thu Jun 27 14:30:58 2019 -0700 netrom: fix a memory leak in nr_rx_frame() When the skb is associated with a new sock, just assigning it to skb->sk is not sufficient, we have to set its destructor to free the sock properly too. Reported-by: syzbot+d6636a36d3c34bd88938@syzkaller.appspotmail.com Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/netrom/af_netrom.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0d0bcacc54e65540b8a3d680c130b741010e23a3 Merge: 6e32a74a6f15 87ee07f8e2ef Author: David S. Miller Date: Mon Jul 1 18:58:35 2019 -0700 Merge branch 'mlxsw-PTP-timestamping-support' Ido Schimmel says: ==================== mlxsw: PTP timestamping support This is the second patchset adding PTP support in mlxsw. Next patchset will add PTP shapers which are required to maintain accuracy under rates lower than 40Gb/s, while subsequent patchsets will add tracepoints and selftests. Petr says: This patch set introduces support for retrieving and processing hardware timestamps for PTP packets. The way PTP timestamping works on Spectrum-1 is that there are two queues associated with each front panel port. When a packet is timestamped, the timestamp is put to one of the queues: timestamps for transmitted packets to one and for received packets to the other. Activity on these queues is signaled through the events PTP_ING_FIFO and PTP_EGR_FIFO. Packets themselves arrive through two traps: PTP0 and PTP1. It is possible to configure which PTP messages should be trapped under which PTP trap. On Spectrum systems, mlxsw will use PTP0 for event messages (which need timestamping), and PTP1 for general messages (which do not). There are therefore four relevant traps: receive of PTP event resp. general message, and receive of timestamp for a transmitted resp. received PTP packet. The obvious point where to put the new logic is a custom listener to the mentioned traps. Besides handling ingress traffic (be in packets or timestamps), the driver also needs to handle timestamping of transmitted packets. One option would be to invoke the relevant logic from mlxsw_core_ptp_transmitted(). However on Spectrum-2, the timestamps are actually delivered through the completion queue, and for that reason this patchset opts to invoke the logic from the PCI code, via core and the driver, to a chip-specific operation. That way the invocation will be done in a place where a Spectrum-2 implementation will have an opportunity to extract the timestamp. As indicated above, the PTP FIFO signaling happens independently from packet delivery. A packet corresponding to any given timestamp could be delivered sooner or later than the timestamp itself. Additionally, the queues are only four elements deep, and it is therefore possible that the timestamp for a delivered packet never arrives at all. Similarly a PTP packet might be dropped due to CPU traffic pressure, and never be delivered even if the corresponding timestamp was. The driver thus needs to hold a cache of as-yet-unmatched SKBs and timestamps. The first piece to arrive (be it timestamp or SKB) is put to this cache. When the other piece arrives, the timestamp is attached to the SKB and that is passed on. A delayed work is run at regular intervals to prune the old unmatched entries. As mentioned above, the mechanism for timestamp delivery changes on Spectrum-2, where timestamps are part of completion queue elements, and all packets are timestamped. All this bookkeeping is therefore unnecessary on Spectrum-2. For this reason, this patchset spends some time introducing Spectrum-1 specific artifacts such as a possibility to register a given trap only on Spectrum-1. Patches #1-#4 describe new registers. Patches #5 and #6 introduce the possibility to register certain traps only on some systems. The list of Spectrum-1 specific traps is left empty at this point. Patch #7 hooks into packet receive path by registering PTP traps and appropriate handlers (that however do nothing of substance yet). Patch #8 adds a helper to allow storing custom data to SKB->cb. Patch #9 adds a call into the PCI completion queue handler that invokes, via core and spectrum code, a PTP transmit handler. (Which also does not do anything interesting yet.) Patch #10 introduces code to invoke PTP initialization and adds data types for the cache of unmatched entries. Patches #11 and #12 implement the timestamping itself. In #11, the PHC spin_locks are converted to _bh variants, because unlike normal PHC path, which runs in process context, timestamp processing runs as soft interrupt. Then #12 introduces the code for saving and retrieval of unmatched entries, invokes PTP classifier to identify packets of interest, registers timestamp FIFO events, and handles decoding and attaching timestamps to packets. Patch #13 introduces a garbage collector for left-behind entries that have not been matched for about a second. In patch #14, PTP message types are configured to arrive as PTP0 (events) or PTP1 (everything else) as appropriate. At this point, the PTP packets start arriving through the traps, but because PTP is disabled and there is no way to enable it yet, they are always just passed to the usual receive path right away. Finally patches #15 and #16 add the plumbing to actually make it possible to enable this code through SIOCSHWTSTAMP ioctl, and to advertise the hardware timestamping capabilities through ethtool. v2: - Patch #12: - In mlxsw_sp1_ptp_fifo_event_func(), post-increment when iterating over PTP FIFO records. - Patch #14: - Change namespace of message type enumerators from MLXSW_ to MLXSW_SP_. ==================== Signed-off-by: David S. Miller commit 87ee07f8e2efbaf473945f0aef41040212596676 Author: Petr Machata Date: Sun Jun 30 09:05:00 2019 +0300 mlxsw: spectrum: PTP: Support ethtool get_ts_info The get_ts_info callback is used for obtaining information about timestamping capabilities of a network device. On Spectrum-1, implement it to advertise the PHC and the capability to do HW timestamping, and the supported RX and TX filters. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 14 +++++++++++++ drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c | 18 +++++++++++++++++ drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.h | 23 ++++++++++++++++++++++ 3 files changed, 55 insertions(+) commit 8748642751ede505c3d6de1486fa0c1f8eb8be6b Author: Petr Machata Date: Sun Jun 30 09:04:59 2019 +0300 mlxsw: spectrum: PTP: Support SIOCGHWTSTAMP, SIOCSHWTSTAMP ioctls The SIOCSHWTSTAMP ioctl configures HW timestamping on a given port. Dispatch the ioctls to per-chip handler (which add to ptp_ops). Find which PTP messages need to be timestamped and configure MTPPPC accordingly. The SIOCGHWTSTAMP ioctl is getter for the current configuration. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 70 ++++++++++++ drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c | 123 +++++++++++++++++++++ drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.h | 34 ++++++ 3 files changed, 227 insertions(+) commit a773c76cb8491d1ae337b7073be7a263dff4b9b6 Author: Petr Machata Date: Sun Jun 30 09:04:58 2019 +0300 mlxsw: spectrum: PTP: Configure PTP traps and FIFO events Configure MTPTPT to set which message types should arrive under which PTP trap, and MOGCR to clear the timestamp queue after its contents are reported through PTP_ING_FIFO or PTP_EGR_FIFO. With this configuration, PTP packets start arriving through the PTP traps. However since timestamping is disabled by default and there is currently no way to enable it, they will not be timestamped. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c | 58 ++++++++++++++++++++++ drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.h | 7 +++ 2 files changed, 65 insertions(+) commit 5d23e415977222cbe5acbb85e5902893126c6e4a Author: Petr Machata Date: Sun Jun 30 09:04:57 2019 +0300 mlxsw: spectrum: PTP: Garbage-collect unmatched entries On Spectrum-1, timestamped PTP packets and the corresponding timestamps need to be kept in caches until both are available, at which point they are matched up and packets forwarded as appropriate. However, not all packets will ever see their timestamp, and not all timestamps will ever see their packet. It is therefore necessary to dispose of such abandoned entries. To that end, introduce a garbage collector to collect entries that have not had their counterpart turn up within about a second. The GC maintains a monotonously-increasing value of GC cycle. Every entry that is put to the hash table is annotated with the GC cycle at which it should be collected. When the GC runs, it walks the hash table, and collects the objects according to their GC cycle annotation. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c | 86 ++++++++++++++++++++++ 1 file changed, 86 insertions(+) commit d92e4e6e33c8b19635be70fb8935b627d2e4f8fe Author: Petr Machata Date: Sun Jun 30 09:04:56 2019 +0300 mlxsw: spectrum: PTP: Support timestamping on Spectrum-1 On Spectrum-1, timestamps arrive through a pair of dedicated events: MLXSW_TRAP_ID_PTP_ING_FIFO and _EGR_FIFO. The payload delivered with those traps is contents of the timestamp FIFO at a given port in a given direction. Add a Spectrum-1-specific handler for these two events which decodes the timestamps and forwards them to the PTP module. Add a function that parses a packet, dispatching to ptp_classify_raw(), and decodes PTP message type, domain number, and sequence ID. Add a new mlxsw dependency on the PTP classifier. Add helpers that can store and retrieve unmatched timestamps and SKBs to the hash table added in a preceding patch. Add the matching code itself: upon arrival of a timestamp or a packet, look up the corresponding unmatched entry, and match it up. If there is none, add a new unmatched entry. This logic is the same on ingress as on egress. Packets and timestamps that never matched need to be eventually disposed of. A garbage collector added in a follow-up patch will take care of that. Since currently all this code is turned off, no crud will accumulate in the hash table. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/Kconfig | 1 + drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 43 +++ drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 5 + drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c | 324 ++++++++++++++++++++- drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.h | 13 + drivers/net/ethernet/mellanox/mlxsw/trap.h | 4 + 6 files changed, 388 insertions(+), 2 deletions(-) commit 89e602ee6e82626cc74f6615950d3e5a26d7bdc9 Author: Petr Machata Date: Sun Jun 30 09:04:55 2019 +0300 mlxsw: spectrum: PTP: Disable BH when working with PHC Up until now, the PTP hardware clock code was only invoked in the process context (SYS_clock_adjtime -> do_clock_adjtime -> k_clock::clock_adj -> pc_clock_adjtime -> posix_clock_operations::clock_adjtime -> ptp_clock_info::adjtime -> mlxsw_spectrum). In order to enable HW timestamping, which is tied into trap handling, it will be necessary to take the clock lock from the PCI queue handler tasklets as well. Therefore use the _bh variants when handling the clock lock. Incidentally, Documentation/ptp/ptp.txt recommends _irqsave variants, but that's unnecessarily strong for our needs. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) commit 810256cec105b3b1ff977f0cd47dac1a1a9a184b Author: Petr Machata Date: Sun Jun 30 09:04:54 2019 +0300 mlxsw: spectrum: PTP: Add PTP initialization / finalization Add two ptp_ops: init and fini, to initialize and finalize the PTP subsystem. Call as appropriate from mlxsw_sp_init() and _fini(). Lay the groundwork for Spectrum-1 support. On Spectrum-1, the received timestamped packets and their corresponding timestamps arrive independently, and need to be matched up. Introduce the related data types and add to struct mlxsw_sp_ptp_state the hash table that will keep the unmatched entries. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 24 +++++++- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 2 + drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c | 70 ++++++++++++++++++++++ drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.h | 29 ++++++++- 4 files changed, 122 insertions(+), 3 deletions(-) commit 0714256c3d76793b6ce52e74b4fa207cfb502246 Author: Petr Machata Date: Sun Jun 30 09:04:53 2019 +0300 mlxsw: pci: PTP: Hook into packet transmit path On Spectrum-1, timestamps are delivered separately from the packets, and need to paired up. Therefore, at some point after mlxsw_sp_port_xmit() is invoked, it is necessary to involve the chip-specific driver code to allow it to do the necessary bookkeeping and matching. On Spectrum-2, timestamps are delivered in CQE. For that reason, position the point of driver involvement into mlxsw_pci_cqe_sdq_handle() to make it hopefully easier to extend for Spectrum-2 in the future. To tell the driver what port the packet was sent on, keep tx_info in SKB control buffer. Introduce a new driver core interface mlxsw_core_ptp_transmitted(), a driver callback ptp_transmitted, and a PTP op transmitted. The callee is responsible for taking care of releasing the SKB passed to the new interfaces, and correspondingly have the new stub callbacks just call dev_kfree_skb_any(). Follow-up patches will introduce the actual content into mlxsw_sp1_ptp_transmitted() in particular. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/core.c | 9 +++++++++ drivers/net/ethernet/mellanox/mlxsw/core.h | 10 ++++++++++ drivers/net/ethernet/mellanox/mlxsw/pci.c | 17 ++++++++++++++++- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 19 +++++++++++++++++++ drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c | 6 ++++++ drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.h | 15 +++++++++++++++ 6 files changed, 75 insertions(+), 1 deletion(-) commit d7cd206dbfb25efc5f06ea3c595074a51d48d00a Author: Petr Machata Date: Sun Jun 30 09:04:52 2019 +0300 mlxsw: core: Add support for using SKB control buffer The SKB control buffer is useful (and used) for bookkeeping of information related to that SKB. Add helpers so that the mlxsw driver(s) can safely use the buffer as well. The structure is currently empty, individual users will add members to it as necessary. Note that SKB allocation functions already clear the buffer, so the cleanup is only necessary when ndo_start_xmit is called. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/core.h | 9 +++++++++ drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 2 ++ drivers/net/ethernet/mellanox/mlxsw/switchx2.c | 2 ++ 3 files changed, 13 insertions(+) commit aed4b5721143506c8170d04b13c74edeafc1a70e Author: Petr Machata Date: Sun Jun 30 09:04:51 2019 +0300 mlxsw: spectrum: PTP: Hook into packet receive path When configured, the Spectrum hardware can recognize PTP packets and trap them to the CPU using dedicated traps, PTP0 and PTP1. One reason to get PTP packets under dedicated traps is to have a separate policer suitable for the amount of PTP traffic expected when switch is operated as a boundary clock. For this, add two new trap groups, MLXSW_REG_HTGT_TRAP_GROUP_SP_PTP0 and _PTP1, and associate the two PTP traps with these two groups. In the driver, specifically for Spectrum-1, event PTP packets will need to be paired up with their timestamps. Those arrive through a different set of traps, added later in the patch set. To support this future use, introduce a new PTP op, ptp_receive. It is possible to configure which PTP messages should be trapped under which PTP trap. On Spectrum systems, we will use PTP0 for event packets (which need timestamping), and PTP1 for control packets (which do not). Thus configure PTP0 trap with a custom callback that defers to the ptp_receive op. Additionally, L2 PTP packets are actually trapped through the LLDP trap, not through any of the PTP traps. So treat the LLDP trap the same way as the PTP0 trap. Unlike PTP traps, which are currently still disabled, LLDP trap is active. Correspondingly, have all the implementations of the ptp_receive op return true, which the handler treats as a signal to forward the packet immediately. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 2 + drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 49 ++++++++++++++++++---- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 2 + drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c | 6 +++ drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.h | 15 +++++++ drivers/net/ethernet/mellanox/mlxsw/trap.h | 2 + 6 files changed, 67 insertions(+), 9 deletions(-) commit dadbc6bc09e8deb886918012a45fb6b6d53ba29d Author: Petr Machata Date: Sun Jun 30 09:04:50 2019 +0300 mlxsw: spectrum: Add support for traps specific to Spectrum-1 On Spectrum-1, timestamps for PTP packets are delivered through queues of ingress and egress timestamps. There are two event traps corresponding to activity on each of those queues. This mechanism is absent on Spectrum-2, and therefore the traps should only be registered on Spectrum-1. Carry a chip-specific listener array in mlxsw_sp->listeners and listeners_count. Register listeners from that array in mlxsw_sp_traps_init(). Add a new listener array for Spectrum-1 traps and configure the newly-added mlxsw_sp->listeners with this array. The listener array is empty for now, the events will be added in a later patch. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 25 +++++++++++++++++++++++-- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 2 ++ 2 files changed, 25 insertions(+), 2 deletions(-) commit 4b6b91ed2d5c7433800b5a3048facc0a69fc1714 Author: Petr Machata Date: Sun Jun 30 09:04:49 2019 +0300 mlxsw: spectrum: Extract a helper for trap registration On Spectrum-1, timestamps for PTP packets are delivered through queues of ingress and egress timestamps. There are two event traps corresponding to activity on each of those queues. This mechanism is absent on Spectrum-2, and therefore the traps should only be registered on Spectrum-1. Extract out of mlxsw_sp_traps_init() a generic helper, mlxsw_sp_traps_register(), and likewise with _unregister(). The new helpers will later be called with Spectrum-1-specific traps. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 48 ++++++++++++++++++-------- 1 file changed, 33 insertions(+), 15 deletions(-) commit 41ce78b92eab99c87b75769ea4ea996e5f54cb58 Author: Petr Machata Date: Sun Jun 30 09:04:48 2019 +0300 mlxsw: reg: Add Monitoring Global Configuration Register This register serves to configure global parameters of certain monitoring operations. The following patches will use it to configure that when PTP timestamps are delivered through the PTP FIFO traps, the FIFO in question is cleared as well. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 98b9028ea5f6fa7e717b772488411acfeadb9d71 Author: Petr Machata Date: Sun Jun 30 09:04:47 2019 +0300 mlxsw: reg: Add Time Precision Packet Timestamping Reading The MTPPTR is used for reading the per port PTP timestamp FIFO. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 110 ++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) commit 4dfecb65702f7207f539a2520a9c41eb010311bd Author: Petr Machata Date: Sun Jun 30 09:04:46 2019 +0300 mlxsw: reg: Add Monitoring Precision Time Protocol Trap Register This register is used for configuring under which trap to deliver PTP packets depending on type of the packet. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 39 +++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit da28e87847134b85c277edf3f9d75222da57c9ca Author: Petr Machata Date: Sun Jun 30 09:04:45 2019 +0300 mlxsw: reg: Add Monitoring Time Precision Packet Port Configuration Register This register serves for configuration of which PTP messages should be timestamped. This is a global configuration, despite the register name. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 38 +++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit 06c642c0e9fceafd16b1a4c80d44b1c09e282215 Author: Luke Mujica Date: Tue Jun 25 10:31:22 2019 -0700 perf jevents: Use nonlocal include statements in pmu-events.c Change pmu-events.c to not use local include statements. The code that creates the include statements for pmu-events.c is in jevents.c. pmu-events.c is a generated file, and for build systems that put generated files in a separate directory, include statements with local pathing cannot find non-generated files. Signed-off-by: Luke Mujica Cc: Ian Rogers Cc: Jiri Olsa Cc: Numfor Mbiziwo-Tiapo Cc: Stephane Eranian Link: https://lkml.kernel.org/n/tip-prgnwmaoo1pv9zz4vnv1bjaj@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/jevents.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit aa23aa55166c2865ac430168c4b9d405cf8c6980 Author: Mao Han Date: Wed Jun 26 14:52:19 2019 +0800 perf annotate: Add csky support This patch add basic arch initialization and instruction associate support for the csky CPU architecture. E.g.: $ perf annotate --stdio2 Samples: 161 of event 'cpu-clock:pppH', 4000 Hz, Event count (approx.): 40250000, [percent: local period] test_4() /usr/lib/perf-test/callchain_test Percent Disassembly of section .text: 00008420 : test_4(): subi sp, sp, 4 st.w r8, (sp, 0x0) mov r8, sp subi sp, sp, 8 subi r3, r8, 4 movi r2, 0 st.w r2, (r3, 0x0) ↓ br 2e 100.00 14: subi r3, r8, 4 ld.w r2, (r3, 0x0) subi r3, r8, 8 st.w r2, (r3, 0x0) subi r3, r8, 4 ld.w r3, (r3, 0x0) addi r2, r3, 1 subi r3, r8, 4 st.w r2, (r3, 0x0) 2e: subi r3, r8, 4 ld.w r2, (r3, 0x0) lrw r3, 0x98967f // 8598 cmplt r3, r2 ↑ bf 14 mov r0, r0 mov r0, r0 mov sp, r8 ld.w r8, (sp, 0x0) addi sp, sp, 4 ← rts Signed-off-by: Mao Han Acked-by: Guo Ren Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: linux-csky@vger.kernel.org Link: http://lkml.kernel.org/r/d874d7782d9acdad5d98f2f5c4a6fb26fbe41c5d.1561531557.git.han_mao@c-sky.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/csky/annotate/instructions.c | 48 ++++++++++++++++++++++++++++ tools/perf/util/annotate.c | 5 +++ 2 files changed, 53 insertions(+) commit e3a9427323a53ceee540276a74af7706f350d052 Author: Andi Kleen Date: Mon Jun 24 12:37:11 2019 -0700 perf stat: Fix metrics with --no-merge Since Fixes: 8c5421c016a4 ("perf pmu: Display pmu name when printing unmerged events in stat") using --no-merge adds the PMU name to the evsel name. This breaks the metric value lookup because the parser doesn't know about this. Remove the extra postfixes for the metric evaluation. Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Cc: Agustin Vega-Frias Cc: Kan Liang Fixes: 8c5421c016a4 ("perf pmu: Display pmu name when printing unmerged events in stat") Link: http://lkml.kernel.org/r/20190624193711.35241-5-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-shadow.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit 2f87f33f4226523df9c9cc28f9874ea02fcc3d3f Author: Andi Kleen Date: Mon Jun 24 12:37:10 2019 -0700 perf stat: Fix group lookup for metric group The metric group code tries to find a group it added earlier in the evlist. Fix the lookup to handle groups with partially overlaps correctly. When a sub string match fails and we reset the match, we have to compare the first element again. I also renamed the find_evsel function to find_evsel_group to make its purpose clearer. With the earlier changes this fixes: Before: % perf stat -M UPI,IPC sleep 1 ... 1,032,922 uops_retired.retire_slots # 1.1 UPI 1,896,096 inst_retired.any 1,896,096 inst_retired.any 1,177,254 cpu_clk_unhalted.thread After: % perf stat -M UPI,IPC sleep 1 ... 1,013,193 uops_retired.retire_slots # 1.1 UPI 932,033 inst_retired.any 932,033 inst_retired.any # 0.9 IPC 1,091,245 cpu_clk_unhalted.thread Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Cc: Kan Liang Fixes: b18f3e365019 ("perf stat: Support JSON metrics in perf stat") Link: http://lkml.kernel.org/r/20190624193711.35241-4-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/metricgroup.c | 47 ++++++++++++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 12 deletions(-) commit 6c5f4e5cb35b4694dc035d91092d23f596ecd06a Author: Andi Kleen Date: Mon Jun 24 12:37:09 2019 -0700 perf stat: Don't merge events in the same PMU Event merging is mainly to collapse similar events in lots of different duplicated PMUs. It can break metric displaying. It's possible for two metrics to have the same event, and when the two events happen in a row the second wouldn't be displayed. This would also not show the second metric. To avoid this don't merge events in the same PMU. This makes sense, if we have multiple events in the same PMU there is likely some reason for it (e.g. using multiple groups) and we better not merge them. While in theory it would be possible to construct metrics that have events with the same name in different PMU no current metrics have this problem. This is the fix for perf stat -M UPI,IPC (needs also another bug fix to completely work) Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Cc: Kan Liang Fixes: 430daf2dc7af ("perf stat: Collapse identically named events") Link: http://lkml.kernel.org/r/20190624193711.35241-3-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-display.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 145c407c808352acd625be793396fd4f33c794f8 Author: Andi Kleen Date: Mon Jun 24 12:37:08 2019 -0700 perf stat: Make metric event lookup more robust After setting up metric groups through the event parser, the metricgroup code looks them up again in the event list. Make sure we only look up events that haven't been used by some other metric. The data structures currently cannot handle more than one metric per event. This avoids problems with multiple events partially overlapping. Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Cc: Kan Liang Link: http://lkml.kernel.org/r/20190624193711.35241-2-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-shadow.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 9c10548c42219e961279826c2763a0e32dc056b9 Author: Arnaldo Carvalho de Melo Date: Wed Jun 26 15:27:58 2019 -0300 tools lib: Move argv_{split,free} from tools/perf/util/ This came from the kernel lib/argv_split.c, so move it to tools/lib/argv_split.c, to get it closer to the kernel structure. We need to audit the usage of argv_split() to figure out if it is really necessary to do have one allocation per argv[] entry, looking at one of its users I guess that is not the case and we probably are even leaking those allocations by not using argv_free() judiciously, for later. With this we further remove stuff from tools/perf/util/, reducing the perf specific codebase and encouraging other tools/ code to use these routines so as to keep the style and constructs used with the kernel. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-j479s1ive9h75w5lfg16jroz@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/linux/string.h | 3 ++ tools/lib/argv_split.c | 100 +++++++++++++++++++++++++++++++++++++++++++ tools/perf/MANIFEST | 1 + tools/perf/util/Build | 5 +++ tools/perf/util/string.c | 91 --------------------------------------- tools/perf/util/string2.h | 2 - 6 files changed, 109 insertions(+), 93 deletions(-) commit af0de0c5f060b1d4eae6033043eb9eafd15aa738 Author: Arnaldo Carvalho de Melo Date: Wed Jun 26 12:45:09 2019 -0300 perf tools: Drop strxfrchar(), use strreplace() equivalent from kernel No change in behaviour intended, just reducing the codebase and using something available in tools/lib/. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-oyi6zif3810nwi4uu85odnhv@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/dso.c | 3 ++- tools/perf/util/string.c | 18 ------------------ tools/perf/util/string2.h | 1 - 3 files changed, 2 insertions(+), 20 deletions(-) commit 2a60689a33a61f000bd90596b1289babcb861cd9 Author: Arnaldo Carvalho de Melo Date: Wed Jun 26 12:24:03 2019 -0300 tools lib: Adopt strreplace() from the kernel We'll use it to further reduce the size of tools/perf/util/string.c, replacing the strxfrchar() equivalent function we have there. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-x3r61ikjrso1buygxwke8id3@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/linux/string.h | 2 ++ tools/lib/string.c | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) commit 13c230ab6e56c6ae3a968f01f4c6505b794cecad Author: Arnaldo Carvalho de Melo Date: Wed Jun 26 12:13:13 2019 -0300 perf tools: Ditch rtrim(), use strim() from tools/lib Cleaning up a bit more tools/perf/util/ by using things we got from the kernel and have in tools/lib/ Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-7hluuoveryoicvkclshzjf1k@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/hists.c | 3 ++- tools/perf/util/annotate.c | 3 ++- tools/perf/util/header.c | 6 +++--- tools/perf/util/pmu.c | 2 +- tools/perf/util/python-ext-sources | 1 + tools/perf/util/srcline.c | 3 ++- tools/perf/util/string.c | 23 ----------------------- tools/perf/util/string2.h | 2 -- tools/perf/util/thread_map.c | 3 ++- 9 files changed, 13 insertions(+), 33 deletions(-) commit 4a3929b223d0a13fc5920a849a2c303ccc1a1e03 Author: Bodong Wang Date: Fri Jun 28 22:36:23 2019 +0000 net/mlx5: E-Switch, Handle UC address change in switchdev mode When NVME device emulation mode is enabled, more than one PFs use the same physical port. In this case, MPFS is required to program L2 addresses. It used to rely on netdev set_rx_mode in switchdev mode, but driver later changed to not create netdev for eswitch manager once in switchdev mode. So, UC address event should be handled. Signed-off-by: Bodong Wang Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) commit 411ec9e0b45792e2ac7c55f94a635d5ce894910b Author: Bodong Wang Date: Fri Jun 28 22:36:22 2019 +0000 net/mlx5: E-Switch, Consider host PF for inline mode and vlan pop When ECPF is the eswitch manager, host PF is treated like other VFs. Driver should do the same for inline mode and vlan pop. Add new iterators to include host PF if ECPF is the eswitch manager. Signed-off-by: Bodong Wang Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 1 + drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 26 ++++++++++++++++++++++ .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 13 ++++++----- include/linux/mlx5/vport.h | 1 + 4 files changed, 35 insertions(+), 6 deletions(-) commit db68cc569eecff7dea5e346a217ce9ca5d2a0ede Author: Bodong Wang Date: Fri Jun 28 22:36:20 2019 +0000 net/mlx5: E-Switch, Use iterator for vlan and min-inline setups Use the defined iterators to traversal VF reps/vport. Also, rely on num of VFs rather than the counter of enabled vports as PF will also be enabled from ECPF side, and the counter will be different from num of VFs. Signed-off-by: Bodong Wang Reviewed-by: Parav Pandit Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 16fff98a7e827396eb68f9243636b7240f511f10 Author: Bodong Wang Date: Fri Jun 28 22:36:18 2019 +0000 net/mlx5: E-Switch, Reg/unreg function changed event at correct stage When driver is doing eswitch mode change, it's critical to keep number of enabled VFs unchanged. However, it can be changed on the fly once function changed event is registered. To remove this uncertainty, function changed event should not be registered before all setups, and first be unregistered before all cleanups. Wrap this functionality together with vport event handler. Fixes: 61fc880839e6 ("net/mlx5: E-Switch, Handle representors creation in handler context") Signed-off-by: Bodong Wang Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 31 +++++++++++++++++----- drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 1 + .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 25 +---------------- 3 files changed, 26 insertions(+), 31 deletions(-) commit 062f4bf4aab5c6bb62bea59cda59d5c64f23ba29 Author: Bodong Wang Date: Fri Jun 28 22:36:16 2019 +0000 net/mlx5: E-Switch, Consolidate eswitch function number of VFs Enabled number of VFs is key for eswich manager to do flow steering initialization and vport configurations. However, the number of enabled VFs may come from two sources as below. PF: num of VFs is provided by enabled SR-IOV of itself. ECPF: num of VFs is provided by enabled SR-IOV from its peer PF. And SR-IOV can't be enabled from ECPF itself. Current driver handles the two cases in different stages and passing the number of enabled VFs among a large scope of internal functions. It is usually hard to find out where is the real number of VFs from due to layers of argument pass-in. This patch consolidated that number from the entry point of doing eswitch setup, and maintained a copy so that eswitch functions can refer to it directly. Eswitch driver shall always use this number when referring to enabled number of VFs, don't use other numbers such as from SR-IOV. Signed-off-by: Bodong Wang Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 36 +++--- drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 13 ++- .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 126 ++++++++++----------- drivers/net/ethernet/mellanox/mlx5/core/sriov.c | 3 +- 4 files changed, 90 insertions(+), 88 deletions(-) commit f6455de0b0e52dcb11aeb503151b12ec87f9c5e4 Author: Bodong Wang Date: Fri Jun 28 22:36:15 2019 +0000 net/mlx5: E-Switch, Refactor eswitch SR-IOV interface Devlink eswitch mode is not necessarily related to SR-IOV, e.g, ECPF can be at offload mode when SR-IOV is not enabled. Rename the interface and eswitch mode names to decouple from SR-IOV, and cleanup eswitch messages accordingly. Signed-off-by: Bodong Wang Signed-off-by: Saeed Mahameed drivers/infiniband/hw/mlx5/ib_rep.h | 2 +- drivers/infiniband/hw/mlx5/main.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 6 +- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 85 +++++++++++----------- drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 8 +- .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 32 ++++---- drivers/net/ethernet/mellanox/mlx5/core/lag.c | 4 +- drivers/net/ethernet/mellanox/mlx5/core/sriov.c | 4 +- include/linux/mlx5/eswitch.h | 6 +- 11 files changed, 77 insertions(+), 76 deletions(-) commit e1d974d03e590cf8370d4820e8b467ee700925c3 Author: Bodong Wang Date: Fri Jun 28 22:36:13 2019 +0000 net/mlx5: Handle host PF vport mac/guid for ECPF When ECPF is eswitch manager, it has the privilege to query and configure the mac and node guid of host PF. While vport number of host PF is 0, the vport command should be issued with other_vport set in this case as the cmd is issued by ECPF vport(0xfffe). Add a specific function to query own vport mac. Low level functions are used by vport manager to query/modify any vport mac and node guid. Signed-off-by: Bodong Wang Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 2 +- .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 2 +- .../net/ethernet/mellanox/mlx5/core/fpga/conn.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/rdma.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/vport.c | 28 ++++++++++++++-------- include/linux/mlx5/vport.h | 3 ++- 9 files changed, 27 insertions(+), 18 deletions(-) commit 5f5d2536be8d5b5d3df925228ce7a6f4054d5956 Author: Bodong Wang Date: Fri Jun 28 22:36:11 2019 +0000 net/mlx5: E-Switch, Use correct flags when configuring vlan Before the offending commit, vlan will be configured if either vlan or qos is set. After the change with new set flags, function callers should provide flags accordingly. Fixes: e33dfe316cf3 ("net/mlx5: E-Switch, Allow fine tuning of eswitch vport push/pop vlan") Signed-off-by: Bodong Wang Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit d886aba677a0a75ad7fdb06e08418b481e09b036 Author: Parav Pandit Date: Fri Jun 28 22:36:06 2019 +0000 net/mlx5: Reduce dependency on enabled_vfs counter and num_vfs While enabling SR-IOV, PCI core already checks that if SR-IOV is already enabled, it returns failure error code. Hence, remove such duplicate check from mlx5_core driver. While at it, make mlx5_device_disable_sriov() to perform cleanup of VFs in reverse order of mlx5_device_enable_sriov(). Signed-off-by: Parav Pandit Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/sriov.c | 22 ++++------------------ include/linux/mlx5/driver.h | 1 - 2 files changed, 4 insertions(+), 19 deletions(-) commit 5ccf2770e83bf8739f0a7c8bed9186d7e5d2ecbc Author: Bodong Wang Date: Fri Jun 28 22:36:04 2019 +0000 net/mlx5: Don't handle VF func change if host PF is disabled When ECPF eswitch manager is at offloads mode, it monitors functions changed event from host PF side and acts according to the number of VFs enabled/disabled. As ECPF and host PF work in two independent hosts, it's possible that host PF OS reboots but ECPF system is still kept on and continues monitoring events from host PF. When kernel from host PF side is booting, PCI iov driver does sriov_init and compute_max_vf_buses by iterating over all valid num of VFs. This triggers FLR and generates functions changed events, even though host PF HCA is not enabled at this time. However, ECPF is not aware of this information, and still handles these events as usual. ECPF system will see massive number of reps are created, but destroyed immediately once creation finished. To eliminate this noise, a bit is added to host parameter context to indicate host PF is disabled. ECPF will not handle the VF changed event if this bit is set. Signed-off-by: Bodong Wang Reviewed-by: Daniel Jurgens Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 5 ++++- include/linux/mlx5/mlx5_ifc.h | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) commit 7e26dac28101ef1ae8fb500abc8acd1ba1ab4d17 Author: Parav Pandit Date: Fri Jun 28 22:36:02 2019 +0000 net/mlx5: Limit scope of mlx5_get_next_phys_dev() to PCI PF devices As mlx5_get_next_phys_dev is used only for PCI PF devices use case, limit it to search only for PCI devices. Signed-off-by: Parav Pandit Reviewed-by: Vu Pham Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/dev.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit d22663edacdfb292e7132989de93bf2828cac493 Author: Parav Pandit Date: Fri Jun 28 22:36:00 2019 +0000 net/mlx5: Move pci status reg access mutex to mlx5_pci_init mlx5_pci_init() performs pci specific initialization of the mlx5_core_dev struct. Hence move pci_status_mutex to pci initialization routine mlx5_pci_init(). This allows reusing mlx5_mdev_init() to non PCI devices. Signed-off-by: Parav Pandit Reviewed-by: Vu Pham Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 386e75af995c3aec475a2185b919bf46af396bfc Author: Huy Nguyen Date: Fri Jun 28 22:35:58 2019 +0000 net/mlx5: Rename mlx5_pci_dev_type to mlx5_coredev_type Rename mlx5_pci_dev_type to mlx5_coredev_type to distinguish different mlx5 device types. mlx5_coredev_type represents mlx5_core_dev instance type. Hence keep mlx5_coredev_type in mlx5_core_dev structure. Signed-off-by: Huy Nguyen Signed-off-by: Vu Pham Signed-off-by: Parav Pandit Reviewed-by: Parav Pandit Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/main.c | 5 +++-- include/linux/mlx5/driver.h | 11 ++++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) commit b8ca123860ee556a8d42ab8c5c2afa469817a813 Author: Bodong Wang Date: Fri Jun 28 22:35:55 2019 +0000 RDMA/mlx5: Cleanup rep when doing unload When an IB rep is loaded, netdev for the same vport is saved for later reference. However, it's not cleaned up when doing unload. For ECPF, kernel crashes when driver is referring to the already removed netdev. Following steps lead to a shown call trace: 1. Create n VFs from host PF 2. Distroy the VFs 3. Run "rdma link" from ARM Call trace: mlx5_ib_get_netdev+0x9c/0xe8 [mlx5_ib] mlx5_query_port_roce+0x268/0x558 [mlx5_ib] mlx5_ib_rep_query_port+0x14/0x34 [mlx5_ib] ib_query_port+0x9c/0xfc [ib_core] fill_port_info+0x74/0x28c [ib_core] nldev_port_get_doit+0x1a8/0x1e8 [ib_core] rdma_nl_rcv_msg+0x16c/0x1c0 [ib_core] rdma_nl_rcv+0xe8/0x144 [ib_core] netlink_unicast+0x184/0x214 netlink_sendmsg+0x288/0x354 sock_sendmsg+0x18/0x2c __sys_sendto+0xbc/0x138 __arm64_sys_sendto+0x28/0x34 el0_svc_common+0xb0/0x100 el0_svc_handler+0x6c/0x84 el0_svc+0x8/0xc Cleanup the rep and netdev reference when unloading IB rep. Fixes: 26628e2d58c9 ("RDMA/mlx5: Move to single device multiport ports in switchdev mode") Signed-off-by: Bodong Wang Reviewed-by: Mark Bloch Reviewed-by: Parav Pandit Signed-off-by: Saeed Mahameed drivers/infiniband/hw/mlx5/ib_rep.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 2f69e591e4531d3192841a4eb2bd9b512f5a8b66 Author: Bodong Wang Date: Fri Jun 28 22:35:53 2019 +0000 {IB, net}/mlx5: E-Switch, Use index of rep for vport to IB port mapping In the single IB device mode, the mapping between vport number and rep relies on a counter. However for dynamic vport allocation, it is desired to keep consistent map of eswitch vport and IB port. Hence, simplify code to remove the free running counter and instead use the available vport index during load/unload sequence from the eswitch. Signed-off-by: Bodong Wang Suggested-by: Parav Pandit Reviewed-by: Parav Pandit Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed drivers/infiniband/hw/mlx5/ib_rep.c | 4 ++-- drivers/infiniband/hw/mlx5/mlx5_ib.h | 1 - drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 1 + include/linux/mlx5/eswitch.h | 2 ++ 4 files changed, 5 insertions(+), 3 deletions(-) commit d6518db278ed64561aa58f74ef5f3ee2f9dbe546 Author: Bodong Wang Date: Fri Jun 28 22:35:51 2019 +0000 net/mlx5: E-Switch, Use vport index when init rep Driver is referring to the array index when doing rep initialization, using vport is confusing as it's normally interpreted as vport number. This patch doesn't change any functionality. Signed-off-by: Bodong Wang Reviewed-by: Parav Pandit Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a82e0b5bdac29d9719d3ca2df01494a7947351aa Author: Shay Agroskin Date: Fri Jun 28 22:35:50 2019 +0000 net/mlx5: Added MCQI and MCQS registers' description to ifc Given a fw component index, the MCQI register allows us to query this component's information (e.g. its version and capabilities). Given a fw component index, the MCQS register allows us to query the status of a fw component, including its type and state (e.g. PRESET/IN_USE). It can be used to find the index of a component of a specific type, by sequentially increasing the component index, and querying each time the type of the returned component. If max component index is reached, 'last_index_flag' is set by the HCA. These registers' description was added to query the running and pending fw version of the HCA. Signed-off-by: Shay Agroskin Signed-off-by: Saeed Mahameed include/linux/mlx5/driver.h | 1 + include/linux/mlx5/mlx5_ifc.h | 59 +++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 58 insertions(+), 2 deletions(-) commit 1759d322f4bad2f82c376856363b725cac12e61d Author: Parav Pandit Date: Fri Jun 28 22:35:48 2019 +0000 net/mlx5: Add hardware definitions for sub functions Update mlx5 device interface data structures for: 1. New command definitions for allocating, deallocating SF 2. Query SF partition 3. Eswitch SF fields 4. HCA CAP SF fields 5. Extend Eswitch functions command for SF Signed-off-by: Parav Pandit Signed-off-by: Vu Pham Signed-off-by: Saeed Mahameed include/linux/mlx5/mlx5_ifc.h | 99 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 96 insertions(+), 3 deletions(-) commit 5ded680cf12ffc90c52c9da152cdc589e938080f Merge: adfbb80d3832 e1d9149e8389 Author: Olof Johansson Date: Mon Jul 1 15:15:55 2019 -0700 Merge tag 'v5.3-rockchip-dts64-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/dt New boards the Khadas Edge family of sbcs and the Hugsun X99 TV box, both based on rk3399. Small improvements for RockPi, Sapphire and rk3328-roc-cc boards. Improvements for the thermal handling on rk3399 as well as the rock960 board. rk3399 dwc3 clock updates and a small start of the dtsi for the new rk3399pro (the one with the connected npu). * tag 'v5.3-rockchip-dts64-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: arm64: dts: rockchip: Fix USB3 Type-C on rk3399-sapphire arm64: dts: rockchip: Update DWC3 modules on RK3399 SoCs arm64: dts: rockchip: enable rk3328 watchdog clock arm64: dts: rockchip: Add support for Hugsun X99 TV Box arm64: dts: rockchip: Define values for the IPA governor for rock960 arm64: dts: rockchip: Fix multiple thermal zones conflict in rk3399.dtsi arm64: dts: rockchip: add core dtsi file for RK3399Pro SoCs arm64: dts: rockchip: improve rk3328-roc-cc rgmii performance. arm64: dts: rockchip: Add support for Khadas Edge/Edge-V/Captain boards arm64: dts: rockchip: Enable HDMI audio on Rock Pi Signed-off-by: Olof Johansson commit adfbb80d38327b04a9cfb1635177dfca90de4a58 Merge: 299a04586d75 519574e3259c Author: Olof Johansson Date: Mon Jul 1 15:15:22 2019 -0700 Merge tag 'v5.3-rockchip-dts32-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/dt Display support for rk3228/rk3229 (up to hdmi output) and more love for rk3288-veyron boards. * tag 'v5.3-rockchip-dts32-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: ARM: dts: rockchip: add display nodes for rk322x ARM: dts: rockchip: fix vop iommu-cells on rk322x clk: rockchip: add clock id for hdmi_phy special clock on rk3228 clk: rockchip: add clock id for watchdog pclk on rk3328 Revert "ARM: dts: rockchip: set PWM delay backlight settings for Minnie" ARM: dts: rockchip: Configure BT_DEV_WAKE in on rk3288-veyron ARM: dts: rockchip: Configure BT_HOST_WAKE as wake-up signal on veyron Signed-off-by: Olof Johansson commit 299a04586d75119d6a642fd0e0985f41c4d5d9f5 Merge: 61c615ac53e3 b04832ed1f70 Author: Olof Johansson Date: Mon Jul 1 15:14:52 2019 -0700 Merge tag 'sprd-dt-v5.3-rc1' of https://github.com/lyrazhang/linux into arm/dt Spreadtrum's devicetree for v5.3-rc1 This tag contains only two patches for updating coresight compatible string. * tag 'sprd-dt-v5.3-rc1' of https://github.com/lyrazhang/linux: arm64: dts: sc9860: Update coresight DT bindings arm64: dts: sc9836: Update coresight DT bindings Signed-off-by: Olof Johansson commit ea74a685ad819aeed316a9bae3d2a5bf762da82d Author: Richard Guy Briggs Date: Thu Jun 27 12:48:01 2019 -0400 selinux: format all invalid context as untrusted The userspace tools expect all fields of the same name to be logged consistently with the same encoding. Since the invalid_context fields contain untrusted strings in selinux_inode_setxattr() and selinux_setprocattr(), encode all instances of this field the same way as though they were untrusted even though compute_sid_handle_invalid_context() and security_sid_mls_copy() are trusted. Please see github issue https://github.com/linux-audit/audit-kernel/issues/57 Signed-off-by: Richard Guy Briggs Signed-off-by: Paul Moore security/selinux/ss/services.c | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) commit d90d45d7dcb732f0d4fbb3b99164ae54999612d5 Author: Anup Patel Date: Fri Jun 7 06:01:29 2019 +0000 RISC-V: Fix memory reservation in setup_bootmem() Currently, the setup_bootmem() reserves memory from RAM start to the kernel end. This prevents us from exploring ways to use the RAM below (or before) the kernel start hence this patch updates setup_bootmem() to only reserve memory from the kernel start to the kernel end. Suggested-by: Mike Rapoport Signed-off-by: Anup Patel Reviewed-by: Christoph Hellwig Signed-off-by: Paul Walmsley arch/riscv/mm/init.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit bbc5dc5155aad9ba50eeda955c591549d761c1db Author: Loys Ollivier Date: Thu Jun 27 16:27:57 2019 -0700 riscv: defconfig: enable SOC_SIFIVE Enable SOC_SIFIVE so the default upstream config is bootable on the SiFive Unleashed Board. And have basic support for future boards based on the same SoC. Signed-off-by: Loys Ollivier Reviewed-by: Palmer Dabbelt [paul.walmsley@sifive.com: updated to apply] Signed-off-by: Paul Walmsley arch/riscv/configs/defconfig | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit edb7f21c3aece6ef24f15ff4d22cceec4a339aac Author: Loys Ollivier Date: Mon Jun 17 21:29:49 2019 +0200 riscv: select SiFive platform drivers with SOC_SIFIVE On selection of SOC_SIFIVE select the corresponding platform drivers. Signed-off-by: Loys Ollivier Reviewed-by: Palmer Dabbelt Signed-off-by: Paul Walmsley arch/riscv/Kconfig.socs | 5 +++++ 1 file changed, 5 insertions(+) commit 0cbb8a32cb6db616cfe3d412a1c872f9776d1073 Author: Loys Ollivier Date: Mon Jun 17 21:29:48 2019 +0200 arch: riscv: add config option for building SiFive's SoC resource Create a config option for building SiFive SoC specific resources e.g. SiFive device tree, platform drivers... Signed-off-by: Loys Ollivier Cc: Paul Walmsley Cc: Palmer Dabbelt Reviewed-by: Palmer Dabbelt Signed-off-by: Paul Walmsley arch/riscv/Kconfig | 2 ++ arch/riscv/Kconfig.socs | 8 ++++++++ arch/riscv/boot/dts/sifive/Makefile | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) commit 556024d41f39ce23809178dd81e1f95802ae7d94 Author: Andy Lutomirski Date: Wed Jun 26 21:46:18 2019 -0700 riscv: Remove gate area stubs Since commit a6c19dfe3994 ("arm64,ia64,ppc,s390,sh,tile,um,x86,mm: remove default gate area"), which predates riscv's inclusion in Linux by almost three years, the default behavior wrt the gate area is sane. Remove riscv's gate area stubs. Cc: Palmer Dabbelt Cc: Albert Ou Cc: linux-riscv@lists.infradead.org Signed-off-by: Andy Lutomirski Reviewed-by: Christoph Hellwig Signed-off-by: Paul Walmsley arch/riscv/include/asm/page.h | 4 ---- arch/riscv/kernel/vdso.c | 19 ------------------- 2 files changed, 23 deletions(-) commit 71ec982fad75aea7ca409a55eefecff328597f62 Author: Paul Walmsley Date: Wed Jun 12 05:20:27 2019 -0700 MAINTAINERS: change the arch/riscv git tree to the new shared tree Palmer, with Konstantin's gracious help, set up a shared kernel.org git tree for arch/riscv patches going forward. Change the MAINTAINERS file accordingly. Signed-off-by: Paul Walmsley Cc: Palmer Dabbelt Reviewed-by: Palmer Dabbelt MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3e9d80a3b383495c6ff369aa8fc51433aff1e496 Author: Paul Walmsley Date: Wed Jun 12 05:33:45 2019 -0700 MAINTAINERS: don't automatically patches involving SiFive to the linux-riscv list The current K: entry in the "SIFIVE DRIVERS" section causes scripts/get_maintainer.pl to recommend that all patches that originate from, or are sent or copied to, anyone with a @sifive.com E-mail address to be copied to the linux-riscv@lists.infradead.org mailing list: https://lore.kernel.org/linux-riscv/CABEDWGxKCqCq2HBU8u1-=QgmMCdb69oXxN5rz65nxNODxdCAnw@mail.gmail.com/ This is undesirable, since not all of these patches may be relevant to the linux-riscv@ mailing list. Fix by excluding K: matches that look like a sifive.com E-mail address. Based on the following patch from Palmer Dabbelt : https://lore.kernel.org/linux-riscv/mhng-2a897a66-1f3d-4878-ba47-1ae36b555540@palmer-si-x1e/ Signed-off-by: Paul Walmsley Cc: Palmer Dabbelt Reviewed-by: Palmer Dabbelt MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6dd91e0eacff0a5c822ca37565d6b5740c4d2a80 Author: Anup Patel Date: Wed May 15 06:30:39 2019 +0000 RISC-V: defconfig: Enable NO_HZ_IDLE and HIGH_RES_TIMERS This patch enables NO_HZ_IDLE (idle dynamic ticks) and HIGH_RES_TIMERS (hrtimers) in RV32 and RV64 defconfigs. Both of the above options are enabled by default for architectures such as x86, ARM, and ARM64. The idle dynamic ticks helps use save power by stopping timer ticks when the system is idle whereas hrtimers is a much improved timer subsystem compared to the old "timer wheel" based system. This patch is tested on SiFive Unleashed board and QEMU Virt machine. Signed-off-by: Anup Patel Reviewed-by: Palmer Dabbelt Signed-off-by: Paul Walmsley arch/riscv/configs/defconfig | 2 ++ arch/riscv/configs/rv32_defconfig | 2 ++ 2 files changed, 4 insertions(+) commit aabf3a951c4e959a00e96e9ef11828149dfc81a8 Author: Jack Xiao Date: Wed May 29 13:52:17 2019 +0800 drm/amdkfd: remove duplicated PCIE atomics request Since amdgpu has always requested PCIE atomics, kfd don't need duplicated PCIE atomics enablement. Referring to amdgpu request result is enough. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 7 +++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 1 + drivers/gpu/drm/amd/amdkfd/kfd_device.c | 10 ++++------ 3 files changed, 12 insertions(+), 6 deletions(-) commit b2109d8ed6976569ba20da4db6eb64392ec7879d Author: Jack Xiao Date: Fri May 24 00:13:14 2019 +0800 drm/amdgpu: enable PCIE atomics ops support GPU atomics operation depends on PCIE atomics support. Always enable PCIE atomics ops support in case that it hasn't been enabled. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit bae17d2a1b6a2f1d539c77a581bb6b88ce622851 Author: Jack Xiao Date: Wed May 29 13:24:22 2019 +0800 drm/amdgpu: add field indicating if has PCIE atomics support The new field in amdgpu device is used to record whether the system has PCIE atomics support. The field can be exposed to UMD or kfd whether PCIE atomics have supported. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + 1 file changed, 1 insertion(+) commit 04796a3e44d4b09245706d04a79186957e9a951d Author: Evan Quan Date: Thu Jun 27 11:01:04 2019 +0800 drm/amd/powerplay: use hardware fan control if no powerplay fan table Otherwise, you may get divided-by-zero error or corrput the SMU fan control feature. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Tested-by: Slava Abramov Acked-by: Slava Abramov Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c | 4 +++- drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 1 + drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c | 4 ++++ 3 files changed, 8 insertions(+), 1 deletion(-) commit fdafb3597a2cc46217d67bc68253024744af59b9 Author: Evan Quan Date: Wed Jun 26 10:53:39 2019 +0800 drm/amdgpu: fix MGPU fan boost enablement for XGMI reset MGPU fan boost feature should not be enabled until all the devices from the same hive are all back from reset. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 ++++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 13 +++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 4 ++-- 3 files changed, 19 insertions(+), 2 deletions(-) commit 4b22e7e33f9666d902dc0f2dd8a24e27cedd1e64 Author: Marek Olšák Date: Wed Jun 19 19:26:59 2019 -0400 drm/amdgpu: handle AMDGPU_IB_FLAG_RESET_GDS_MAX_WAVE_ID on gfx10 Add the gfx10 equivalent of the gfx9 code. Signed-off-by: Marek Olšák Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) commit 9ed2c993d723129f85101e51b2ccc36ef5400a67 Author: Marek Olšák Date: Wed Jun 19 19:26:24 2019 -0400 drm/amdgpu: fix transform feedback GDS hang on gfx10 (v2) v2: update emit_ib_size (though it's still wrong because it was wrong before) Signed-off-by: Marek Olšák Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gds.h | 3 ++- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 14 +++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) commit 5adcdab6ae1b0a53456e8a269b1856094dc20a59 Merge: 1375da478712 d44c732cffe5 Author: Kalle Valo Date: Mon Jul 1 22:23:11 2019 +0300 Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git patches for 5.3. Major changes: ath10k * fixes for SDIO support * add support for firmware logging via WMI commit 2e60546368165c2449564d71f6005dda9205b5fb Author: Matteo Croce Date: Mon Jul 1 19:01:55 2019 +0200 ipv4: don't set IPv6 only flags to IPv4 addresses Avoid the situation where an IPV6 only flag is applied to an IPv4 address: # ip addr add 192.0.2.1/24 dev dummy0 nodad home mngtmpaddr noprefixroute # ip -4 addr show dev dummy0 2: dummy0: mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000 inet 192.0.2.1/24 scope global noprefixroute dummy0 valid_lft forever preferred_lft forever Or worse, by sending a malicious netlink command: # ip -4 addr show dev dummy0 2: dummy0: mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000 inet 192.0.2.1/24 scope global nodad optimistic dadfailed home tentative mngtmpaddr noprefixroute stable-privacy dummy0 valid_lft forever preferred_lft forever Signed-off-by: Matteo Croce Reviewed-by: David Ahern Signed-off-by: David S. Miller net/ipv4/devinet.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 841ed60264b3d37d5bf3e32cff168920e4923f88 Author: Krzysztof Kozlowski Date: Sat Jun 29 13:47:39 2019 +0200 ARM: dts: exynos: Adjust buck[78] regulators to supported values on Arndale Octa The datasheet of S2MPS11 PMIC is slightly non-consistent in buck[78] voltage regulators values. 1. The voltage tables for configuring their registers mention range of voltages: 0.750 V to 3.55 V, 2. The constrains in electrical specifications say output voltage range to be different (buck7: 1.2 V to 1.5 V, buck8: 1.8 V to 2.1 V). Adjust the ranges to match the electrical specifications to stay on the safe side. Anyway these regulators stay at default value so this should not have effect. Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos5420-arndale-octa.dts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a19a209ee420f95626451034ba287c33d0d64ce0 Author: Krzysztof Kozlowski Date: Sat Jun 29 13:47:38 2019 +0200 ARM: dts: exynos: Adjust buck[78] regulators to supported values on Odroid XU3 family The datasheet of S2MPS11 PMIC is slightly non-consistent in buck[78] voltage regulators values. 1. The voltage tables for configuring their registers mention range of voltages: 0.750 V to 3.55 V, 2. The constrains in electrical specifications say output voltage range to be different (buck7: 1.2 V to 1.5 V, buck8: 1.8 V to 2.1 V). Adjust the ranges to match the electrical specifications to stay on the safe side. Also change the name of regulators to match reality. Anyway these regulators stay at default value so this should not have effect. Reported-by: Anand Moon Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos5422-odroid-core.dtsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 8386e6a7b07c51b8b9e2d3c0bb08e551db5c5ae5 Author: Marek Szyprowski Date: Thu Jun 27 13:57:25 2019 +0200 ARM: dts: exynos: Move Mali400 GPU node to "/soc" Mali400 GPU hardware module is a standard hardware module integrated to Exynos3210/4210/4412 SoCs, so it should reside under the "/soc" node. The only SoC components which are placed in the DT root, are those, which are a part of CPUs: like ARM architected timers and ARM performance measurement units. Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos3250.dtsi | 66 +++++++++++++++++++-------------------- arch/arm/boot/dts/exynos4.dtsi | 28 ++++++++--------- 2 files changed, 47 insertions(+), 47 deletions(-) commit 47f28b41df6ba2efd05db705689617b969589168 Author: Marek Szyprowski Date: Thu Jun 27 13:55:53 2019 +0200 ARM: dts: exynos: Fix imprecise abort on Mali GPU probe on Exynos4210 The PMU module of Mali400 GPU is optional and it looks that it is not present on Exynos4210, because any access to its registers causes external abort. This patch removes "pmu" interrupt for Exynos4210 SoCs, so the driver will skip the PMU module. This fixes following fault during kernel boot: Unhandled fault: imprecise external abort (0x1406) at 0x00000000 (lima_pmu_init) from [] (lima_device_init+0x244/0x5a0) (lima_device_init) from [] (lima_pdev_probe+0x7c/0xd8) (lima_pdev_probe) from [] (platform_drv_probe+0x48/0x9c) (platform_drv_probe) from [] (really_probe+0x1c4/0x400) (really_probe) from [] (driver_probe_device+0x78/0x1b8) (driver_probe_device) from [] (device_driver_attach+0x58/0x60) (device_driver_attach) from [] (__driver_attach+0xfc/0x160) (__driver_attach) from [] (bus_for_each_dev+0x68/0xb4) (bus_for_each_dev) from [] (bus_add_driver+0x104/0x20c) (bus_add_driver) from [] (driver_register+0x78/0x10c) (driver_register) from [] (do_one_initcall+0x8c/0x430) (do_one_initcall) from [] (kernel_init_freeable+0x3c8/0x4d0) (kernel_init_freeable) from [] (kernel_init+0x8/0x10c) (kernel_init) from [] (ret_from_fork+0x14/0x20) The PMU module seems to work fine on Exynos4412 SoCs, so the patch also moves the interrupt definitions to exynos4210.dtsi and exynos4412.dtsi respectively, to keep only the common part in exynos4.dtsi. Fixes: 13efd80acaa4 ("ARM: dts: exynos: Add GPU/Mali 400 node to Exynos4") Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos4.dtsi | 22 ---------------------- arch/arm/boot/dts/exynos4210.dtsi | 20 ++++++++++++++++++++ arch/arm/boot/dts/exynos4412.dtsi | 22 ++++++++++++++++++++++ 3 files changed, 42 insertions(+), 22 deletions(-) commit a4880801a72ecc2dcdfa432f81a754f3e7438567 Author: Vineet Gupta Date: Wed May 15 15:36:46 2019 -0700 ARCv2: entry: rewrite to enable use of double load/stores LDD/STD - the motivation was to be remove blatent copy-paste due to hasty support of CONFIG_ARC_IRQ_NO_AUTOSAVE support - but with refactoring we could use LDD/STD to greatly optimize the code Signed-off-by: Vineet Gupta arch/arc/include/asm/entry-arcv2.h | 297 +++++++++++++++++-------------------- arch/arc/include/asm/linkage.h | 18 +++ arch/arc/kernel/asm-offsets.c | 7 + arch/arc/kernel/entry-arcv2.S | 4 +- 4 files changed, 167 insertions(+), 159 deletions(-) commit ab854bfcd310b5872fe12eb8d3f2c30fe427f8f7 Author: Vineet Gupta Date: Fri May 10 16:24:15 2019 -0700 ARCv2: entry: avoid a branch Signed-off-by: Vineet Gupta arch/arc/include/asm/entry-arcv2.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 23c0cbd0c75c3b564850294427fd2be2bc2a015b Author: Vineet Gupta Date: Tue Apr 9 19:16:37 2019 -0700 ARCv2: entry: push out the Z flag unclobber from common EXCEPTION_PROLOGUE Upon a taken interrupt/exception from User mode, HS hardware auto sets Z flag. This helps shave a few instructions from EXCEPTION_PROLOGUE by eliding re-reading ERSTATUS and some bit fiddling. However TLB Miss Exception handler can clobber the CPU flags and still end up in EXCEPTION_PROLOGUE in the slow path handling TLB handling case: EV_TLBMissD do_slow_path_pf EV_TLBProtV (aliased to call_do_page_fault) EXCEPTION_PROLOGUE As a result, EXCEPTION_PROLOGUE need to "unclobber" the Z flag which this patch changes. It is now pushed out to TLB Miss Exception handler. The reasons beings: - The flag restoration is only needed for slowpath TLB Miss Exception handling, but currently being in EXCEPTION_PROLOGUE penalizes all exceptions such as ProtV and syscall Trap, where Z flag is already as expected. - Pushing unclobber out to where it was clobbered is much cleaner and also serves to document the fact. - Makes EXCEPTION_PROLGUE similar to INTERRUPT_PROLOGUE so easier to refactor the common parts which is what this series aims to do Signed-off-by: Vineet Gupta arch/arc/include/asm/entry-arcv2.h | 8 -------- arch/arc/mm/tlbex.S | 11 +++++++++++ 2 files changed, 11 insertions(+), 8 deletions(-) commit 45869eb0c0afd72bd5ab2437d4b00915697c044a Author: Vineet Gupta Date: Tue Apr 9 16:55:15 2019 -0700 ARCv2: entry: comments about hardware auto-save on taken interrupts Signed-off-by: Vineet Gupta arch/arc/include/asm/entry-arcv2.h | 78 ++++++++++++++++++++++++++++++-------- 1 file changed, 62 insertions(+), 16 deletions(-) commit 926150db8558dca59617c8786c3f91c239290ee1 Author: Vineet Gupta Date: Tue May 14 16:28:30 2019 -0700 ARC: mm: do_page_fault refactor #8: release mmap_sem sooner In case of successful page fault handling, this patch releases mmap_sem before updating the perf stat event for major/minor faults. So even though the contention reduction is NOT super high, it is still an improvement. There's an additional code size improvement as we only have 2 up_read() calls now. Note to myself: -------------- 1. Given the way it is done, we are forced to move @bad_area label earlier causing the various "goto bad_area" cases to hit perf stat code. - PERF_COUNT_SW_PAGE_FAULTS is NOW updated for access errors which is what arm/arm64 seem to be doing as well (with slightly different code) - PERF_COUNT_SW_PAGE_FAULTS_{MAJ,MIN} must NOT be updated for the error case which is guarded by now setting @fault initial value to VM_FAULT_ERROR which serves both cases when handle_mm_fault() returns error or is not called at all. 2. arm/arm64 use two homebrew fault flags VM_FAULT_BAD{MAP,MAPACCESS} which I was inclined to add too but seems not needed for ARC - given that we have everything is 1 function we can still use goto - we setup si_code at the right place (arm* do that in the end) - we init fault already to error value which guards entry into perf stats event update Cc: Peter Zijlstra Signed-off-by: Vineet Gupta arch/arc/mm/fault.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 5e91bf5ce9b8740076f5283f1ec3a5b023950920 Author: Vineet Gupta Date: Tue May 14 15:55:31 2019 -0700 ARC: mm: do_page_fault refactor #7: fold the various error handling - single up_read() call vs. 4 - so much easier on eyes Technically it seems like @bad_area label moved up, but even in old regime, it was a special case of delivering SIGSEGV unconditionally which we now do as well, although with checks. Also note that @fault needs to be initialized since we can land in @bad_area (which reads it) without setting it up with return value of handle_mm_fault() - failing to do so did bite us although as a side effect of different patch: see [1] [1]: http://lists.infradead.org/pipermail/linux-snps-arc/2019-May/005803.html Signed-off-by: Vineet Gupta arch/arc/mm/fault.c | 48 ++++++++++++++---------------------------------- 1 file changed, 14 insertions(+), 34 deletions(-) commit 98cb57ad70fb7c8a9c030d3e83fe66b546906e28 Author: Vineet Gupta Date: Tue May 14 15:10:45 2019 -0700 ARC: mm: do_page_fault refactor #6: error handlers to use same pattern - up_read - if !user_mode - whatever error handling Signed-off-by: Vineet Gupta arch/arc/mm/fault.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit d0542c7eacd5b507fa53570b610706df122a2f37 Author: Vineet Gupta Date: Tue May 14 14:45:44 2019 -0700 ARC: mm: do_page_fault refactor #5: scoot no_context to end This is different than the rest of signal handling stuff No functional change Signed-off-by: Vineet Gupta arch/arc/mm/fault.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) commit 02c88d142ea6e64b0f81dcf3687a889d8a3556ba Author: Vineet Gupta Date: Tue May 14 14:35:45 2019 -0700 ARC: mm: do_page_fault refactor #4: consolidate retry related logic stats update code can now elide "retry" check and additional level of indentation since all retry handling is done ahead of it already Signed-off-by: Vineet Gupta arch/arc/mm/fault.c | 60 +++++++++++++++++++++++++++-------------------------- 1 file changed, 31 insertions(+), 29 deletions(-) commit 85c5e33763a731967ca59085ffe6e694f872d38e Author: Vineet Gupta Date: Tue May 14 14:25:54 2019 -0700 ARC: mm: do_page_fault refactor #3: tidyup vma access permission code The coding pattern to NOT intialize variables at declaration time but rather near code which makes us eof them makes it much easier to grok the overall logic, specially when the init is not simply 0 or 1 Signed-off-by: Vineet Gupta arch/arc/mm/fault.c | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) commit 13e2cc1240eb14d1a08b2c32f88b25bf20210ebc Author: Vineet Gupta Date: Tue May 14 16:07:24 2019 -0700 ARC: mm: do_page_fault refactor #2: remove short lived variable Compiler will do this anyways, still.. No functional change. Signed-off-by: Vineet Gupta arch/arc/mm/fault.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 450e5b6f654b52bd7495e84cd46dd37d7e184415 Author: Vineet Gupta Date: Tue May 14 14:22:47 2019 -0700 ARC: mm: do_page_fault refactor #1: remove label @good_area Invert the condition for stack expansion. No functional change Signed-off-by: Vineet Gupta arch/arc/mm/fault.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 6e32a74a6f151c3e64d7d79e54948b8938be2cdc Author: Daniel T. Lee Date: Sat Jun 29 22:33:58 2019 +0900 samples: pktgen: allow to specify destination port Currently, kernel pktgen has the feature to specify udp destination port for sending packet. (e.g. pgset "udp_dst_min 9") But on samples, each of the scripts doesn't have any option to achieve this. This commit adds the DST_PORT option to specify the target port(s) in the script. -p : ($DST_PORT) destination PORT range (e.g. 433-444) is also allowed Signed-off-by: Daniel T. Lee Acked-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller samples/pktgen/README.rst | 1 + samples/pktgen/parameters.sh | 7 ++++++- samples/pktgen/pktgen_bench_xmit_mode_netif_receive.sh | 11 +++++++++++ samples/pktgen/pktgen_bench_xmit_mode_queue_xmit.sh | 11 +++++++++++ samples/pktgen/pktgen_sample01_simple.sh | 11 +++++++++++ samples/pktgen/pktgen_sample02_multiqueue.sh | 11 +++++++++++ samples/pktgen/pktgen_sample03_burst_single_flow.sh | 11 +++++++++++ samples/pktgen/pktgen_sample04_many_flows.sh | 11 +++++++++++ samples/pktgen/pktgen_sample05_flow_per_thread.sh | 12 +++++++++++- .../pktgen/pktgen_sample06_numa_awared_queue_irq_affinity.sh | 11 +++++++++++ 10 files changed, 95 insertions(+), 2 deletions(-) commit 226b96c25d84ab32abeb6a000166a755db3ebfa9 Author: Daniel T. Lee Date: Sat Jun 29 22:33:57 2019 +0900 samples: pktgen: add some helper functions for port parsing This commit adds port parsing and port validate helper function to parse single or range of port(s) from a given string. (e.g. 1234, 443-444) Helpers will be used in prior to set target port(s) in samples/pktgen. Signed-off-by: Daniel T. Lee Acked-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller samples/pktgen/functions.sh | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit 88405680ec57c35f5886dbb81b3f6f638f74f40d Author: Vandana BN Date: Mon Jul 1 19:46:10 2019 +0530 net:gue.h:Fix shifting signed 32-bit value by 31 bits problem Fix GUE_PFLAG_REMCSUM to use "U" cast to avoid shifting signed 32-bit value by 31 bits problem. Signed-off-by: Vandana BN Signed-off-by: David S. Miller include/net/gue.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 417232880c8a646739dbf4666a231505a1917fcb Author: Pavel Begunkov Date: Thu May 23 18:39:16 2019 +0300 sbitmap: Replace cmpxchg with xchg cmpxchg() with an immediate value could be replaced with less expensive xchg(). The same true if new value don't _depend_ on the old one. In the second block, atomic_cmpxchg() return value isn't checked, so after atomic_cmpxchg() -> atomic_xchg() conversion it could be replaced with atomic_set(). Comparison with atomic_read() in the second chunk was left as an optimisation (if that was the initial intention). Reviewed-by: Omar Sandoval Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe lib/sbitmap.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit a346abe051bd2bd0d5d0140b2da9ec95639acad7 Author: Eric Dumazet Date: Mon Jul 1 06:39:36 2019 -0700 ipv6: icmp: allow flowlabel reflection in echo replies Extend flowlabel_reflect bitmask to allow conditional reflection of incoming flowlabels in echo replies. Note this has precedence against auto flowlabels. Add flowlabel_reflect enum to replace hard coded values. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller Documentation/networking/ip-sysctl.txt | 4 +++- include/net/ipv6.h | 7 +++++++ net/ipv6/af_inet6.c | 2 +- net/ipv6/icmp.c | 3 +++ net/ipv6/sysctl_net_ipv6.c | 4 ++-- net/ipv6/tcp_ipv6.c | 2 +- 6 files changed, 17 insertions(+), 5 deletions(-) commit 40f6a2cb9cfc5da713f745b23bcc2c6761e5eb5e Author: Vandana BN Date: Mon Jul 1 17:25:39 2019 +0530 net: dst.h: Fix shifting signed 32-bit value by 31 bits problem Fix DST_FEATURE_ECN_CA to use "U" cast to avoid shifting signed 32-bit value by 31 bits problem. Signed-off-by: Vandana BN Signed-off-by: David S. Miller include/net/dst.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dca895b65d634f9e6506d5385ed58a8b9abd4900 Author: Hangbin Liu Date: Mon Jul 1 16:45:28 2019 +0800 Documentation/networking: fix default_ttl typo in mpls-sysctl default_ttl should be integer instead of bool Reported-by: Ying Xu Fixes: a59166e47086 ("mpls: allow TTL propagation from IP packets to be configured") Signed-off-by: Hangbin Liu Reviewed-by: David Ahern Signed-off-by: David S. Miller Documentation/networking/mpls-sysctl.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 535cfa75a6457c9eb5d35cd11f4a07f684d33a0a Author: Alex Deucher Date: Mon Jul 1 08:39:19 2019 -0500 drm/amdgpu/gfx10: use reset default for PA_SC_FIFO_SIZE Recommended by the hw team. Reviewed-and-Tested-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 18 ------------------ 1 file changed, 18 deletions(-) commit 02d7a73b5048a82d4344ba598cbf19dcc9df913f Author: Alex Deucher Date: Mon Jul 1 08:38:12 2019 -0500 drm/amdgpu/gfx9: use reset default for PA_SC_FIFO_SIZE Recommended by the hw team. Reviewed-and-Tested-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 19 ------------------- 1 file changed, 19 deletions(-) commit 7f3a8dff1219fba3076fe207972d1d7893c099bb Author: Christoph Hellwig Date: Mon Jun 24 07:47:28 2019 +0200 asm-generic: remove ptrace.h No one is using this header anymore. Signed-off-by: Christoph Hellwig Acked-by: Arnd Bergmann Acked-by: Oleg Nesterov Acked-by: Paul Burton Signed-off-by: Arnd Bergmann MAINTAINERS | 1 - arch/mips/include/asm/ptrace.h | 5 --- include/asm-generic/ptrace.h | 73 ------------------------------------------ 3 files changed, 79 deletions(-) commit 79f2562c326e0731f9c9f089d47c89399ad732e2 Author: Christoph Hellwig Date: Mon Jun 24 07:47:27 2019 +0200 x86: don't use asm-generic/ptrace.h Doing the indirection through macros for the regs accessors just makes them harder to read, so implement the helpers directly. Note that only the helpers actually used are implemented now. Signed-off-by: Christoph Hellwig Acked-by: Ingo Molnar Acked-by: Oleg Nesterov Reviewed-by: Thomas Gleixner Signed-off-by: Arnd Bergmann arch/x86/include/asm/ptrace.h | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) commit 045bd00f3ef08e934af058bf41979061e2a05cf2 Author: Christoph Hellwig Date: Mon Jun 24 07:47:26 2019 +0200 sh: don't use asm-generic/ptrace.h Doing the indirection through macros for the regs accessors just makes them harder to read, so implement the helpers directly. Note that only the helpers actually used are implemented now. Signed-off-by: Christoph Hellwig Signed-off-by: Arnd Bergmann arch/sh/include/asm/ptrace.h | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) commit b42dfdea6052f7e8880f78e8e17881b30fefb840 Author: Christoph Hellwig Date: Mon Jun 24 07:47:25 2019 +0200 powerpc: don't use asm-generic/ptrace.h Doing the indirection through macros for the regs accessors just makes them harder to read, so implement the helpers directly. Note that only the helpers actually used are implemented now. Signed-off-by: Christoph Hellwig Acked-by: Michael Ellerman Signed-off-by: Arnd Bergmann arch/powerpc/include/asm/ptrace.h | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) commit 56a5d00328e1d859b743e14b6e2ca76d47ba6e5d Author: Christoph Hellwig Date: Mon Jun 24 07:47:24 2019 +0200 arm64: don't use asm-generic/ptrace.h Doing the indirection through macros for the regs accessors just makes them harder to read, so implement the helpers directly. Note that only the helpers actually used are implemented now. Signed-off-by: Christoph Hellwig Acked-by: Catalin Marinas Signed-off-by: Arnd Bergmann arch/arm64/include/asm/ptrace.h | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) commit 268d828144d214d085b07f1bdde74aed41052f13 Author: Jean Delvare Date: Mon Jul 1 17:06:38 2019 +0200 staging: kpc2000: drop useless softdep statement The i2c-dev module is for access to I2C buses from user-space. Kernel drivers do not care about its presence. Signed-off-by: Jean Delvare Cc: Matt Sickler Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000_i2c.c | 1 - 1 file changed, 1 deletion(-) commit dbc77f31e58b2902a5e7643761c04bf69f57a32a Author: Darrick J. Wong Date: Mon Jul 1 08:25:36 2019 -0700 vfs: only allow FSSETXATTR to set DAX flag on files and dirs The DAX flag only applies to files and directories, so don't let it get set for other types of files. Signed-off-by: Darrick J. Wong Reviewed-by: Jan Kara fs/inode.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit ca29be753445450799958e7d2e5d797d1153389e Author: Darrick J. Wong Date: Mon Jul 1 08:25:36 2019 -0700 vfs: teach vfs_ioc_fssetxattr_check to check extent size hints Move the extent size hint checks that aren't xfs-specific to the vfs. Signed-off-by: Darrick J. Wong Reviewed-by: Jan Kara fs/inode.c | 18 ++++++++++++++ fs/xfs/xfs_ioctl.c | 70 ++++++++++++++++++++++-------------------------------- 2 files changed, 47 insertions(+), 41 deletions(-) commit f991492ed11055934f1b35615cb1b435325939bf Author: Darrick J. Wong Date: Mon Jul 1 08:25:35 2019 -0700 vfs: teach vfs_ioc_fssetxattr_check to check project id info Standardize the project id checks for FSSETXATTR. Signed-off-by: Darrick J. Wong Reviewed-by: Jan Kara fs/ext4/ioctl.c | 27 --------------------------- fs/inode.c | 13 +++++++++++++ fs/xfs/xfs_ioctl.c | 15 --------------- 3 files changed, 13 insertions(+), 42 deletions(-) commit 7b0e492e6b80d51db4156996b248522c7b50d467 Author: Darrick J. Wong Date: Mon Jul 1 08:25:35 2019 -0700 vfs: create a generic checking function for FS_IOC_FSSETXATTR Create a generic checking function for the incoming FS_IOC_FSSETXATTR fsxattr values so that we can standardize some of the implementation behaviors. Signed-off-by: Darrick J. Wong Reviewed-by: Jan Kara fs/btrfs/ioctl.c | 17 +++++--------- fs/ext4/ioctl.c | 25 +++++++++++++------- fs/inode.c | 23 ++++++++++++++++++ fs/xfs/xfs_ioctl.c | 69 +++++++++++++++++++++++++++++++----------------------- include/linux/fs.h | 9 +++++++ 5 files changed, 95 insertions(+), 48 deletions(-) commit 5aca284210ce827f780ea2f4f9c6ab8d6e2d6648 Author: Darrick J. Wong Date: Mon Jul 1 08:25:34 2019 -0700 vfs: create a generic checking and prep function for FS_IOC_SETFLAGS Create a generic function to check incoming FS_IOC_SETFLAGS flag values and later prepare the inode for updates so that we can standardize the implementations that follow ext4's flag values. Note that the efivarfs implementation no longer fails a no-op SETFLAGS without CAP_LINUX_IMMUTABLE since that's the behavior in ext*. Signed-off-by: Darrick J. Wong Reviewed-by: Jan Kara Reviewed-by: Christoph Hellwig Acked-by: David Sterba Reviewed-by: Bob Peterson fs/btrfs/ioctl.c | 13 +++++-------- fs/efivarfs/file.c | 26 +++++++++++++++++--------- fs/ext2/ioctl.c | 16 ++++------------ fs/ext4/ioctl.c | 13 +++---------- fs/gfs2/file.c | 42 +++++++++++++++++++++++++++++------------- fs/hfsplus/ioctl.c | 21 ++++++++++++--------- fs/inode.c | 24 ++++++++++++++++++++++++ fs/jfs/ioctl.c | 22 +++++++--------------- fs/nilfs2/ioctl.c | 9 ++------- fs/ocfs2/ioctl.c | 13 +++---------- fs/orangefs/file.c | 37 ++++++++++++++++++++++++++++--------- fs/reiserfs/ioctl.c | 10 ++++------ fs/ubifs/ioctl.c | 13 +++---------- include/linux/fs.h | 3 +++ 14 files changed, 144 insertions(+), 118 deletions(-) commit b108ad53bb65c19ae8e2d9c7fc0d052b3d9c153b Author: Fabio Estevam Date: Fri May 24 08:06:25 2019 -0300 dt-bindings: reset: imx7: Fix the spelling of 'indices' The correct spelling is 'indices', so fix it accordingly. Signed-off-by: Fabio Estevam Signed-off-by: Philipp Zabel Documentation/devicetree/bindings/reset/fsl,imx7-src.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b5c21c84705dbd96a0fff930d33022a17910b4f4 Merge: 7c2b3629d09d 7fbd1753b64e Author: Takashi Iwai Date: Mon Jul 1 17:01:00 2019 +0200 Merge branch 'for-linus' into for-next This back-merge is necessary for adjusting the latest FireWire fix with the recent refactoring in 5.3 development branch. Signed-off-by: Takashi Iwai commit dae1ccee012ea7514af8e4a88429844157aca7dc Author: Hans de Goede Date: Mon Jun 24 17:40:14 2019 +0200 drm: panel-orientation-quirks: Add extra quirk table entry for GPD MicroPC Newer GPD MicroPC BIOS versions have proper DMI strings, add an extra quirk table entry for these new strings. This is good news, as this means that we no longer have to update the BIOS dates list with every BIOS update. Fixes: 652b8b086538("drm: panel-orientation-quirks: Add quirk for GPD MicroPC") Acked-by: Maxime Ripard Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20190624154014.8557-2-hdegoede@redhat.com drivers/gpu/drm/drm_panel_orientation_quirks.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 0c61efd322b75ed3143e3d130ebecbebf561adf5 Merge: b07d7d5c7b42 d482e575fbf0 Author: Catalin Marinas Date: Mon Jul 1 15:53:35 2019 +0100 Merge branch 'for-next/perf' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux * 'for-next/perf' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux: perf: arm_spe: Enable ACPI/Platform automatic module loading arm_pmu: acpi: spe: Add initial MADT/SPE probing ACPI/PPTT: Add function to return ACPI 6.3 Identical tokens ACPI/PPTT: Modify node flag detection to find last IDENTICAL MAINTAINERS: Add maintainer entry for the imx8 DDR PMU driver drivers/perf: imx_ddr: Add DDR performance counter support to perf dt-bindings: perf: imx8-ddr: add imx8qxp ddr performance monitor commit 7c2b3629d09ddec810dc4c1d3a6657c32def8f71 Author: Rander Wang Date: Mon Jul 1 15:46:30 2019 +0800 ALSA: hda: Fix a headphone detection issue when using SOF To save power, the hda hdmi driver in ASoC invokes snd_hdac_ext_bus_link_put to disable CORB/RIRB buffers DMA if there is no user of bus and invokes snd_hdac_ext_bus_link_get to set up CORB/RIRB buffers when it is used. Unsolicited responses is disabled in snd_hdac_bus_stop_cmd_io called by snd_hdac_ext_bus_link_put , but it is not enabled in snd_hdac_bus_init_cmd_io called by snd_hdac_ext_bus_link_get. So for put-get sequence, Unsolicited responses is disabled and headphone can't be detected by hda codecs. Now unsolicited responses is only enabled in snd_hdac_bus_reset_link which resets controller. The function is only called for setup of controller. This patch enables Unsolicited responses after RIRB is initialized in snd_hdac_bus_init_cmd_io which works together with snd_hdac_bus_reset_link to set up controller. Tested legacy hda driver and SOF driver on intel whiskeylake. Reviewed-by: Takashi Iwai Signed-off-by: Rander Wang Signed-off-by: Takashi Iwai sound/hda/hdac_controller.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 79d08f89bb1b5c2c1ff90d9bb95497ab9e8aa7e0 Author: Ming Lei Date: Mon Jul 1 15:14:46 2019 +0800 block: fix .bi_size overflow 'bio->bi_iter.bi_size' is 'unsigned int', which at most hold 4G - 1 bytes. Before 07173c3ec276 ("block: enable multipage bvecs"), one bio can include very limited pages, and usually at most 256, so the fs bio size won't be bigger than 1M bytes most of times. Since we support multi-page bvec, in theory one fs bio really can be added > 1M pages, especially in case of hugepage, or big writeback with too many dirty pages. Then there is chance in which .bi_size is overflowed. Fixes this issue by using bio_full() to check if the added segment may overflow .bi_size. Cc: Liu Yiding Cc: kernel test robot Cc: "Darrick J. Wong" Cc: linux-xfs@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org Cc: stable@vger.kernel.org Fixes: 07173c3ec276 ("block: enable multipage bvecs") Reviewed-by: Christoph Hellwig Signed-off-by: Ming Lei Signed-off-by: Jens Axboe block/bio.c | 10 +++++----- fs/iomap.c | 2 +- fs/xfs/xfs_aops.c | 2 +- include/linux/bio.h | 18 ++++++++++++++++-- 4 files changed, 23 insertions(+), 9 deletions(-) commit 5be1f9d82fa73c199ebeee2866dbac83e419c897 Merge: ff91064ea37c 4b972a01a7da Author: Jens Axboe Date: Mon Jul 1 08:16:08 2019 -0600 Merge tag 'v5.2-rc6' into for-5.3/block Merge 5.2-rc6 into for-5.3/block, so we get the same page merge leak fix. Otherwise we end up having conflicts with future patches between for-5.3/block and master that touch this area. In particular, it makes the bio_full() fix hard to backport to stable. * tag 'v5.2-rc6': (482 commits) Linux 5.2-rc6 Revert "iommu/vt-d: Fix lock inversion between iommu->lock and device_domain_lock" Bluetooth: Fix regression with minimum encryption key size alignment tcp: refine memory limit test in tcp_fragment() x86/vdso: Prevent segfaults due to hoisted vclock reads SUNRPC: Fix a credential refcount leak Revert "SUNRPC: Declare RPC timers as TIMER_DEFERRABLE" net :sunrpc :clnt :Fix xps refcount imbalance on the error path NFS4: Only set creation opendata if O_CREAT ARM: 8867/1: vdso: pass --be8 to linker if necessary KVM: nVMX: reorganize initial steps of vmx_set_nested_state KVM: PPC: Book3S HV: Invalidate ERAT when flushing guest TLB entries habanalabs: use u64_to_user_ptr() for reading user pointers nfsd: replace Jeff by Chuck as nfsd co-maintainer inet: clear num_timeout reqsk_alloc() PCI/P2PDMA: Ignore root complex whitelist when an IOMMU is present net: mvpp2: debugfs: Add pmap to fs dump ipv6: Default fib6_type to RTN_UNICAST when not set net: hns3: Fix inconsistent indenting net/af_iucv: always register net_device notifier ... commit e8960ca06bb22d0d84edf246b0bf395e8322e127 Author: Tomer Tayar Date: Mon Jul 1 13:59:45 2019 +0000 habanalabs: Add busy engines bitmask to HW idle IOCTL The information which is currently provided as a response to the "HL_INFO_HW_IDLE" IOCTL is merely a general boolean value. This patch extends it and provides also a bitmask that indicates which of the device engines are busy. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/debugfs.c | 2 +- drivers/misc/habanalabs/goya/goya.c | 11 +++++++++-- drivers/misc/habanalabs/habanalabs.h | 3 ++- drivers/misc/habanalabs/habanalabs_ioctl.c | 3 ++- include/uapi/misc/habanalabs.h | 30 +++++++++++++++++++++++++++++- 5 files changed, 43 insertions(+), 6 deletions(-) commit 06deb86a748a1667d906af996775603f2bc34d00 Author: Tomer Tayar Date: Mon Jul 1 13:59:45 2019 +0000 habanalabs: Add debugfs node for engines status Command submissions sent to the device are composed of command buffers which are targeted to different device engines, like DMA and compute entities. When a command submission gets stuck, knowing in which engine the stuck is, is crucial for debugging. This patch adds a debugfs node that exports this information, by displaying the engines' various registers that assemble their idle/busy status. The information retrieval is based on the is_device_idle ASIC function. The printout in this function, of the first detected busy engine, is removed because it becomes redundant in the presence of the more elaborated info of the new debugfs node. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay .../ABI/testing/debugfs-driver-habanalabs | 7 ++ drivers/misc/habanalabs/debugfs.c | 12 ++ drivers/misc/habanalabs/goya/goya.c | 129 ++++++++++++++------- drivers/misc/habanalabs/habanalabs.h | 8 +- drivers/misc/habanalabs/habanalabs_ioctl.c | 2 +- 5 files changed, 105 insertions(+), 53 deletions(-) commit ac6183ae4b4ef58d6ff8b2ad3c8b876c408020dc Author: Tomer Tayar Date: Mon Jul 1 13:59:44 2019 +0000 habanalabs: Update the device idle check The patch updates the device idle check: - Add reading the DMA core status register, because it is possible that a QMAN has finished its work but the DMA itself is still running. - Remove the MME shadow status check, as the MME ARCH status register includes the status of all MME shadows. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/goya/goya.c | 10 +- .../include/goya/asic_reg/dma_ch_0_masks.h | 418 +++++++++++++++++++++ .../habanalabs/include/goya/asic_reg/goya_regs.h | 1 + 3 files changed, 425 insertions(+), 4 deletions(-) commit 8c3166e17cf10161d2871dfb1d017287c7b79ff1 Author: Evan Green Date: Thu Jun 27 13:44:45 2019 -0700 mfd / platform: cros_ec_debugfs: Expose resume result via debugfs For ECs that support it, the EC returns the number of slp_s0 transitions and whether or not there was a timeout in the resume response. Expose the last resume result to usermode via debugfs so that usermode can detect and report S0ix timeouts. Signed-off-by: Evan Green Acked-by: Lee Jones Signed-off-by: Enric Balletbo i Serra Documentation/ABI/testing/debugfs-cros-ec | 22 ++++++++++++++++++++++ drivers/mfd/cros_ec.c | 6 +++++- drivers/platform/chrome/cros_ec_debugfs.c | 3 +++ include/linux/mfd/cros_ec.h | 1 + 4 files changed, 31 insertions(+), 1 deletion(-) commit aa9083faa10f6fa42235eb924ca2d45ba95ed45d Merge: 90fca074897a 520602640419 Author: Greg Kroah-Hartman Date: Mon Jul 1 15:04:59 2019 +0200 Merge tag 'phy-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy into usb-next phy: for 5.3 *) Add a new PHY driver for Qualcomm PCIe2 PHY *) Add a new PHY driver for Mixel DPHY present in i.MX8 *) Fix Qualcomm QMP UFS PHY driver from incorrectly reporting that PHY enable failed *) Fix _BUG_ on Amlogic G12A USB3 + PCIE Combo PHY Driver due to calling a sleeping function from invalid context *) Fix WARN_ON dump on rcar-gen3-usb2 PHY driver caused due to imbalance powered flag *) Fix .cocci and sparse warnings Signed-off-by: Kishon Vijay Abraham I * tag 'phy-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy: phy: qcom-qmp: Raise qcom_qmp_phy_enable() polling delay phy: meson-g12a-usb3-pcie: disable locking for cr_regmap phy: Add driver for mixel mipi dphy found on NXP's i.MX8 SoCs dt-bindings: phy: Add documentation for mixel dphy dt-bindings: phy-pxa-usb: add bindings phy: renesas: rcar-gen3-usb2: fix imbalance powered flag phy: qcom-qmp: Drop useless msm8998_pciephy_cfg setting phy: qcom-qmp: Correct READY_STATUS poll break condition phy: ti: am654-serdes: Make serdes_am654_xlate() static phy: usb: phy-brcm-usb: Fix platform_no_drv_owner.cocci warnings phy: samsung: Use struct_size() in devm_kzalloc() phy: qcom: Add Qualcomm PCIe2 PHY driver dt-bindings: phy: Add binding for Qualcomm PCIe2 PHY commit 3430abd6f403ce43375266798a8571646d15b5cd Merge: 39debdc1d7e6 da38e9ec9c2d Author: Joerg Roedel Date: Mon Jul 1 14:41:24 2019 +0200 Merge branch 'arm/renesas' into arm/smmu commit 0bcfa628f8a303f86876424475ba5390d229e736 Author: Jacob Pan Date: Mon Jun 24 13:17:42 2019 -0700 iommu/vt-d: Cleanup unused variable Linux IRQ number virq is not used in IRTE allocation. Remove it. Signed-off-by: Jacob Pan Signed-off-by: Joerg Roedel drivers/iommu/intel_irq_remapping.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5cd3f2e98ccaa668210ed2e3a1d6bde3189fe366 Author: Tom Murphy Date: Thu Jun 13 23:04:55 2019 +0100 iommu/amd: Flush not present cache in iommu_map_page check if there is a not-present cache present and flush it if there is. Signed-off-by: Tom Murphy Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit 5c90501a7290e8066a5530f491e764730791945a Author: Kevin Mitchell Date: Wed Jun 12 14:52:05 2019 -0700 iommu/amd: Only free resources once on init error When amd_iommu=off was specified on the command line, free_X_resources functions were called immediately after early_amd_iommu_init. They were then called again when amd_iommu_init also failed (as expected). Instead, call them only once: at the end of state_next() whenever there's an error. These functions should be safe to call any time and any number of times. However, since state_next is never called again in an error state, the cleanup will only ever be run once. This also ensures that cleanup code is run as soon as possible after an error is detected rather than waiting for amd_iommu_init() to be called. Signed-off-by: Kevin Mitchell Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu_init.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) commit bf4bff46eac151c3fd299741d71c4216e45b5d8b Author: Kevin Mitchell Date: Wed Jun 12 14:52:04 2019 -0700 iommu/amd: Move gart fallback to amd_iommu_init The fallback to the GART driver in the case amd_iommu doesn't work was executed in a function called free_iommu_resources, which didn't really make sense. This was even being called twice if amd_iommu=off was specified on the command line. The only complication is that it needs to be verified that amd_iommu has fully relinquished control by calling free_iommu_resources and emptying the amd_iommu_list. Signed-off-by: Kevin Mitchell Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu_init.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 3ddbe913e55516d3e2165d43d4d5570761769878 Author: Kevin Mitchell Date: Wed Jun 12 14:52:03 2019 -0700 iommu/amd: Make iommu_disable safer Make it safe to call iommu_disable during early init error conditions before mmio_base is set, but after the struct amd_iommu has been added to the amd_iommu_list. For example, this happens if firmware fails to fill in mmio_phys in the ACPI table leading to a NULL pointer dereference in iommu_feature_disable. Fixes: 2c0ae1720c09c ('iommu/amd: Convert iommu initialization to state machine') Signed-off-by: Kevin Mitchell Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu_init.c | 3 +++ 1 file changed, 3 insertions(+) commit 39debdc1d7e615863b66e5e8c612e4f0e78b1e1b Merge: 6fbc7275c7a9 9e6ea59f3ff3 Author: Joerg Roedel Date: Mon Jul 1 13:44:41 2019 +0200 Merge branch 'for-joerg/arm-smmu/updates' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux into arm/smmu commit 93ead46b038037cd717cf46c9170af2531a6eb58 Author: David Sterba Date: Wed Apr 3 19:32:56 2019 +0200 btrfs: tests: add locks around add_extent_mapping There are no concerns about locking during the selftests so the locks are not necessary, but following patches will add lockdep assertions to add_extent_mapping so this is needed in tests too. Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/tests/extent-map-tests.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 8666e638b07e2be143b91129d3499d2c25f26a5f Author: Nikolay Borisov Date: Wed Jun 5 14:50:04 2019 +0300 btrfs: Document __etree_search The function has a lot of return values and specific conventions making it cumbersome to understand what's returned. Have a go at documenting its parameters and return values. Reviewed-by: Johannes Thumshirn Reviewed-by: Qu Wenruo Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/extent_io.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 1eaebb341d2b4183d0112b76e31ccff3e1fe3092 Author: Nikolay Borisov Date: Mon Jun 3 13:06:02 2019 +0300 btrfs: Don't trim returned range based on input value in find_first_clear_extent_bit Currently find_first_clear_extent_bit always returns a range whose starting value is >= passed 'start'. This implicit trimming behavior is somewhat subtle and an implementation detail. Instead, this patch modifies the function such that now it always returns the range which contains passed 'start' and has the given bits unset. This range could either be due to presence of existing records which contains 'start' but have the bits unset or because there are no records that contain the given starting offset. This patch also adds test cases which cover find_first_clear_extent_bit since they were missing up until now. Reviewed-by: Qu Wenruo Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/extent_io.c | 52 +++++++++++++++++++++--- fs/btrfs/tests/extent-io-tests.c | 87 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 133 insertions(+), 6 deletions(-) commit 53460a4572585b508dc4cb6f09653ac50ba3fc49 Author: Nikolay Borisov Date: Mon Jun 3 13:06:01 2019 +0300 btrfs: trim: make reserved device area adjustments more explicit Currently the first megabyte on a device housing a btrfs filesystem is exempt from allocation and trimming. Currently this is not a problem since 'start' is set to 1M at the beginning of btrfs_trim_free_extents and find_first_clear_extent_bit always returns a range that is >= start. However, in a follow up patch find_first_clear_extent_bit will be changed such that it will return a range containing 'start' and this range may very well be 0...>=1M so 'start'. Future proof the sole user of find_first_clear_extent_bit by setting 'start' after the function is called. No functional changes. Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 5 +++++ 1 file changed, 5 insertions(+) commit 6f8e4fd43073406aa5e2d7f27ffc45510778ac3e Author: David Sterba Date: Thu May 30 18:43:53 2019 +0200 btrfs: use file:line format for assertion report The filename:line format is commonly understood by editors and can be copy&pasted more easily than the current format. Signed-off-by: David Sterba fs/btrfs/ctree.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ea41d6b2785f6aaeefffaaab62c3c4164b5628ce Author: Johannes Thumshirn Date: Mon Jun 3 16:58:58 2019 +0200 btrfs: remove assumption about csum type form btrfs_print_data_csum_error() btrfs_print_data_csum_error() still assumed checksums to be 32 bit in size. Make it size agnostic. Reviewed-by: Nikolay Borisov Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/btrfs_inode.h | 10 +++++----- fs/btrfs/compression.c | 3 +-- fs/btrfs/inode.c | 4 ++-- 3 files changed, 8 insertions(+), 9 deletions(-) commit d5178578bcd461cc79118c7a139882350fe505aa Author: Johannes Thumshirn Date: Mon Jun 3 16:58:57 2019 +0200 btrfs: directly call into crypto framework for checksumming Currently btrfs_csum_data() relied on the crc32c() wrapper around the crypto framework for calculating the CRCs. As we have our own crypto_shash structure in the fs_info now, we can directly call into the crypto framework without going trough the wrapper. This way we can even remove the btrfs_csum_data() and btrfs_csum_final() wrappers. The module dependency on crc32c is preserved via MODULE_SOFTDEP("pre: crc32c"), which was previously provided by LIBCRC32C config option doing the same. Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/Kconfig | 3 ++- fs/btrfs/check-integrity.c | 11 +++++++---- fs/btrfs/compression.c | 17 +++++++++++------ fs/btrfs/disk-io.c | 46 +++++++++++++++++++++++----------------------- fs/btrfs/disk-io.h | 2 -- fs/btrfs/file-item.c | 18 +++++++++--------- fs/btrfs/inode.c | 23 +++++++++++++++-------- fs/btrfs/scrub.c | 30 +++++++++++++++++++++--------- fs/btrfs/super.c | 1 + 9 files changed, 89 insertions(+), 62 deletions(-) commit 6d97c6e31b553bc9f58b83ac3c4c79c17affbda8 Author: Johannes Thumshirn Date: Mon Jun 3 16:58:56 2019 +0200 btrfs: add boilerplate code for directly including the crypto framework Add boilerplate code for directly including the crypto framework. This helps us flipping the switch for new algorithms. Reviewed-by: Nikolay Borisov Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 8 ++++++++ fs/btrfs/disk-io.c | 46 +++++++++++++++++++++++++++++++++++++++------- 2 files changed, 47 insertions(+), 7 deletions(-) commit 51bce6c9b97729835bb55ceb37febd5c8fa962dd Author: Johannes Thumshirn Date: Mon Jun 3 16:58:55 2019 +0200 btrfs: Simplify btrfs_check_super_csum() and get rid of size assumptions Now that we have already checked for a valid checksum type before calling btrfs_check_super_csum(), it can be simplified even further. While at it get rid of the implicit size assumption of the resulting checksum as well. This is a preparation for changing all checksum functionality to use the crypto layer later. Reviewed-by: Nikolay Borisov Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/disk-io.c | 42 ++++++++++++++++-------------------------- 1 file changed, 16 insertions(+), 26 deletions(-) commit 8dc3f22c8ba02c5a5b889406259c50b3eaa61c65 Author: Johannes Thumshirn Date: Mon Jun 3 16:58:54 2019 +0200 btrfs: check for supported superblock checksum type before checksum validation Now that we have factorerd out the superblock checksum type validation, we can check for supported superblock checksum types before doing the actual validation of the superblock read from disk. This leads the path to further simplifications of btrfs_check_super_csum() later on. Reviewed-by: Nikolay Borisov Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba [ add comment ] Signed-off-by: David Sterba fs/btrfs/disk-io.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit e7e16f4882edb5935ff0ba81a0df25ae0b80b549 Author: Johannes Thumshirn Date: Mon Jun 3 16:58:53 2019 +0200 btrfs: add common checksum type validation Currently btrfs is only supporting CRC32C as checksumming algorithm. As this is about to change provide a function to validate the checksum type in the superblock against all possible algorithms. This makes adding new algorithms easier as there are fewer places to adjust when adding new algorithms. Reviewed-by: Nikolay Borisov Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/disk-io.c | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) commit 7ebc7e5f2c81f658b1d2f95fcde15dfd1a84b370 Author: Johannes Thumshirn Date: Mon Jun 3 16:58:52 2019 +0200 btrfs: format checksums according to type for printing Add a small helper for btrfs_print_data_csum_error() which formats the checksum according to it's type for pretty printing. Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba [ shorten macro name ] Signed-off-by: David Sterba fs/btrfs/btrfs_inode.h | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit 10fe6ca80d9d25eca9fd6d98eccf6c795532fe96 Author: Johannes Thumshirn Date: Wed May 22 10:19:02 2019 +0200 btrfs: don't assume compressed_bio sums to be 4 bytes BTRFS has the implicit assumption that a checksum in compressed_bio is 4 bytes. While this is true for CRC32C, it is not for any other checksum. Change the data type to be a byte array and adjust loop index calculation accordingly. Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/compression.c | 27 +++++++++++++++++---------- fs/btrfs/compression.h | 2 +- fs/btrfs/file-item.c | 2 +- 3 files changed, 19 insertions(+), 12 deletions(-) commit 1e25a2e3ca0dab0ed1030570e95d98af47113eae Author: Johannes Thumshirn Date: Wed May 22 10:19:01 2019 +0200 btrfs: don't assume ordered sums to be 4 bytes BTRFS has the implicit assumption that a checksum in btrfs_orderd_sums is 4 bytes. While this is true for CRC32C, it is not for any other checksum. Change the data type to be a byte array and adjust loop index calculation accordingly. This includes moving the adjustment of 'index' by 'ins_size' in btrfs_csum_file_blocks() before dividing 'ins_size' by the checksum size, because before this patch the 'sums' member of 'struct btrfs_ordered_sum' was 4 Bytes in size and afterwards it is only one byte. Reviewed-by: Nikolay Borisov Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/compression.c | 4 ++-- fs/btrfs/ctree.h | 3 ++- fs/btrfs/file-item.c | 35 +++++++++++++++++++++-------------- fs/btrfs/ordered-data.c | 10 ++++++---- fs/btrfs/ordered-data.h | 4 ++-- fs/btrfs/scrub.c | 2 +- 6 files changed, 34 insertions(+), 24 deletions(-) commit 4bb3c2e2b5bb0d57f7d11f2da829357c5ca628a4 Author: Johannes Thumshirn Date: Wed May 22 10:19:00 2019 +0200 btrfs: use btrfs_crc32c{,_final}() in for free space cache The CRC checksum in the free space cache is not dependant on the super block's csum_type field but always a CRC32C. So use btrfs_crc32c() and btrfs_crc32c_final() instead of btrfs_csum_data() and btrfs_csum_final() for computing these checksums. Reviewed-by: Nikolay Borisov Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/free-space-cache.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 65019df8c3b0efa363c30ca4dd69a1a370a3ebe8 Author: Johannes Thumshirn Date: Wed May 22 10:18:59 2019 +0200 btrfs: resurrect btrfs_crc32c() Commit 9678c54388b6 ("btrfs: Remove custom crc32c init code") removed the btrfs_crc32c() function, because it was a duplicate of the crc32c() library function we already have in the kernel. Resurrect it as a shim wrapper over crc32c() to make following transformations of the checksumming code in btrfs easier. Also provide a btrfs_crc32_final() to ease following transformations. Reviewed-by: Nikolay Borisov Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.h | 11 +++++++++++ fs/btrfs/extent-tree.c | 6 +++--- fs/btrfs/send.c | 2 +- 3 files changed, 15 insertions(+), 4 deletions(-) commit 5852c8b961542f997aa5aeee9c80e745e7af2d63 Author: Johannes Thumshirn Date: Wed May 22 10:18:58 2019 +0200 btrfs: use btrfs_csum_data() instead of directly calling crc32c btrfsic_test_for_metadata() directly calls the crc32c() library function for calculating the CRC32C checksum, but then uses btrfs_csum_final() to invert the result. To ease further refactoring and development around checksumming in BTRFS convert to calling btrfs_csum_data(), which is a wrapper around crc32c(). Reviewed-by: Nikolay Borisov Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/check-integrity.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a94d1d0cb3bf1983fcdf05b59d914dbff4f1f52c Author: Qu Wenruo Date: Wed May 8 18:49:58 2019 +0800 btrfs: Flush before reflinking any extent to prevent NOCOW write falling back to COW without data reservation [BUG] The following script can cause unexpected fsync failure: #!/bin/bash dev=/dev/test/test mnt=/mnt/btrfs mkfs.btrfs -f $dev -b 512M > /dev/null mount $dev $mnt -o nospace_cache # Prealloc one extent xfs_io -f -c "falloc 8k 64m" $mnt/file1 # Fill the remaining data space xfs_io -f -c "pwrite 0 -b 4k 512M" $mnt/padding sync # Write into the prealloc extent xfs_io -c "pwrite 1m 16m" $mnt/file1 # Reflink then fsync, fsync would fail due to ENOSPC xfs_io -c "reflink $mnt/file1 8k 0 4k" -c "fsync" $mnt/file1 umount $dev The fsync fails with ENOSPC, and the last page of the buffered write is lost. [CAUSE] This is caused by: - Btrfs' back reference only has extent level granularity So write into shared extent must be COWed even only part of the extent is shared. So for above script we have: - fallocate Create a preallocated extent where we can do NOCOW write. - fill all the remaining data and unallocated space - buffered write into preallocated space As we have not enough space available for data and the extent is not shared (yet) we fall into NOCOW mode. - reflink Now part of the large preallocated extent is shared, later write into that extent must be COWed. - fsync triggers writeback But now the extent is shared and therefore we must fallback into COW mode, which fails with ENOSPC since there's not enough space to allocate data extents. [WORKAROUND] The workaround is to ensure any buffered write in the related extents (not just the reflink source range) get flushed before reflink/dedupe, so that NOCOW writes succeed that happened before reflinking succeed. The workaround is expensive, we could do it better by only flushing NOCOW range, but that needs extra accounting for NOCOW range. For now, fix the possible data loss first. Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/ioctl.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 5f791ec31f535f62a2dc06b37c3a69e5e268b5db Author: Nikolay Borisov Date: Tue May 7 10:23:46 2019 +0300 btrfs: Return EAGAIN if we can't start no snpashot write in check_can_nocow The first thing code does in check_can_nocow is trying to block concurrent snapshots. If this fails (due to snpashot already being in progress) the function returns ENOSPC which makes no sense. Instead return EAGAIN. Despite this return value not being propagated to callers it's good practice to return the closest in terms of semantics error code. No functional changes. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0b6f5d408bb5df3101eb1944b1f301dea50c7e7e Author: Nikolay Borisov Date: Thu May 9 18:11:11 2019 +0300 btrfs: Add comments on locking of several device-related fields Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/volumes.c | 4 +++- fs/btrfs/volumes.h | 11 ++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) commit bd80d94efb83acd67d48f9f3f07483c8306085aa Author: Nikolay Borisov Date: Tue May 7 10:19:24 2019 +0300 btrfs: Always use a cached extent_state in btrfs_lock_and_flush_ordered_range In case no cached_state argument is passed to btrfs_lock_and_flush_ordered_range use one locally in the function. This optimises the case when an ordered extent is found since the unlock function will be able to unlock that state directly without searching for it again. Reviewed-by: Josef Bacik Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ordered-data.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit 23d31bd476d1d096d0f073483547872ec155ab34 Author: Nikolay Borisov Date: Tue May 7 10:19:23 2019 +0300 btrfs: Use newly introduced btrfs_lock_and_flush_ordered_range There several functions which open code btrfs_lock_and_flush_ordered_range, just replace them with a call to the function. No functional changes. Reviewed-by: Josef Bacik Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent_io.c | 29 ++++------------------------- fs/btrfs/file.c | 14 ++------------ fs/btrfs/inode.c | 17 ++--------------- 3 files changed, 8 insertions(+), 52 deletions(-) commit ffa87214c1100c7ea38e85a3cf981d0d47b1c744 Author: Nikolay Borisov Date: Tue May 7 10:19:22 2019 +0300 btrfs: add new helper btrfs_lock_and_flush_ordered_range There is a certain idiom used in multiple places in btrfs' codebase, dealing with flushing an ordered range. Factor this in a separate function that can be reused. Future patches will replace the existing code with that function. Reviewed-by: Josef Bacik Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ordered-data.c | 33 +++++++++++++++++++++++++++++++++ fs/btrfs/ordered-data.h | 4 ++++ 2 files changed, 37 insertions(+) commit 1200b51f57dca934cfd78969f460d636ec0fb838 Author: Qu Wenruo Date: Thu May 9 15:31:50 2019 +0800 btrfs: remove the incorrect comment on RO fs when btrfs_run_delalloc_range() fails At the context of btrfs_run_delalloc_range(), we haven't started/joined a transaction, thus even something went wrong, we can't and won't abort transaction, thus no way to make the fs RO. Reviewed-by: Nikolay Borisov Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/extent_io.c | 1 - 1 file changed, 1 deletion(-) commit 480b9b4d847fe18f4a559f5cac718d9b2cbcdcaf Author: Qu Wenruo Date: Mon Apr 29 14:03:33 2019 +0800 btrfs: extent-tree: Add trace events for space info numbers update Add trace event for update_bytes_pinned() and update_bytes_may_use() to detect underflow better. The output would be something like (only showing data part): ## Buffered write start, 16K total ## 2255.954 xfs_io/860 btrfs:update_bytes_may_use:(nil)U: type=DATA old=0 diff=4096 2257.169 sudo/860 btrfs:update_bytes_may_use:(nil)U: type=DATA old=4096 diff=4096 2257.346 sudo/860 btrfs:update_bytes_may_use:(nil)U: type=DATA old=8192 diff=4096 2257.542 sudo/860 btrfs:update_bytes_may_use:(nil)U: type=DATA old=12288 diff=4096 ## Delalloc start ## 3727.853 kworker/u8:3-e/700 btrfs:update_bytes_may_use:(nil)U: type=DATA old=16384 diff=-16384 ## Space cache update ## 3733.132 sudo/862 btrfs:update_bytes_may_use:(nil)U: type=DATA old=0 diff=65536 3733.169 sudo/862 btrfs:update_bytes_may_use:(nil)U: type=DATA old=65536 diff=-65536 3739.868 sudo/862 btrfs:update_bytes_may_use:(nil)U: type=DATA old=0 diff=65536 3739.891 sudo/862 btrfs:update_bytes_may_use:(nil)U: type=DATA old=65536 diff=-65536 These two trace events will allow bcc tool to probe btrfs_space_info changes and detect underflow with more details (e.g. backtrace for each update). Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 36 ++++++++++++++++++++---------------- include/trace/events/btrfs.h | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 16 deletions(-) commit 0185f364cb65855cdf5dfd0de11f8f9622940250 Author: Qu Wenruo Date: Mon Apr 29 14:03:32 2019 +0800 btrfs: extent-tree: Add lockdep assert when updating space info Just add a safe net for btrfs_space_info member updating. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 1 + 1 file changed, 1 insertion(+) commit cff8267228c14e56ded8407787d4328603423b3e Author: David Sterba Date: Fri May 17 11:43:45 2019 +0200 btrfs: read number of data stripes from map only once There are several places that call nr_data_stripes, but this value does not change. Signed-off-by: David Sterba fs/btrfs/scrub.c | 8 ++++---- fs/btrfs/volumes.c | 17 +++++++++-------- 2 files changed, 13 insertions(+), 12 deletions(-) commit 72ad813157c58416c29fa554928e21b9bdae2582 Author: David Sterba Date: Fri May 17 11:43:43 2019 +0200 btrfs: constify map parameter for nr_parity_stripes and nr_data_stripes Signed-off-by: David Sterba fs/btrfs/raid56.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 158da513b13deb04b266e4ad171871d1a8531f26 Author: David Sterba Date: Fri May 17 11:43:41 2019 +0200 btrfs: refactor helper for bg flags to name conversion The helper lacks the btrfs_ prefix and the parameter is the raw blockgroup type, so none of the callers has to do the flags -> index conversion. Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 4 +--- fs/btrfs/volumes.c | 34 +++++++++++++--------------------- fs/btrfs/volumes.h | 3 +-- 3 files changed, 15 insertions(+), 26 deletions(-) commit e3ecdb3fdecf2d505bd742ffccf1b0a2854f2812 Author: David Sterba Date: Fri May 17 11:43:38 2019 +0200 btrfs: factor out devs_max setting in __btrfs_alloc_chunk Merge the repeated code before the if-else block. Signed-off-by: David Sterba fs/btrfs/volumes.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 8c3e3582a4f0dbdaea49cfd71640a626c8bb7134 Author: David Sterba Date: Fri May 17 11:43:36 2019 +0200 btrfs: use u8 for raid_array members The raid_attr table is now 7 * 56 = 392 bytes long, consisting of just small numbers so we don't have to use ints. New size is 7 * 32 = 224, saving 3 cachelines. Signed-off-by: David Sterba fs/btrfs/disk-io.c | 4 ++-- fs/btrfs/volumes.h | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) commit 946c9256c6fabe8d3fe8e076df1c4290dcd778f2 Author: David Sterba Date: Fri May 17 11:43:34 2019 +0200 btrfs: factor out helper for counting data stripes Factor the sequence of ifs to a helper, the 'data stripes' here means the number of stripes without redundancy and parity. Signed-off-by: David Sterba fs/btrfs/volumes.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) commit 44b28adafd1f814fbde8b53a99eee83f3b31b2d9 Author: David Sterba Date: Fri May 17 11:43:31 2019 +0200 btrfs: use raid_attr table for btrfs_bg_type_to_factor The factor is the number of copies. Signed-off-by: David Sterba fs/btrfs/volumes.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 6079e12cdb8f9afb02b9f4f3e4d13c076e1e99e9 Author: David Sterba Date: Fri May 17 11:43:29 2019 +0200 btrfs: use raid_attr table to find profiles for integrity lowering Replace open coded list of the profiles by selecting them from the raid_attr table. The criteria are now more explicit, we need profiles that have more than 1 copy of the data or can reconstruct the data with a missing device. Signed-off-by: David Sterba fs/btrfs/volumes.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 081db89b13cb26f9ef1f5b1752f7fcb775191cbe Author: David Sterba Date: Fri May 17 11:43:27 2019 +0200 btrfs: use raid_attr to get allowed profiles for balance conversion Iterate over the table and gather all allowed profiles for a given number of devices, instead of open coding. Signed-off-by: David Sterba fs/btrfs/volumes.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit fc9a2ac77c05ba060dcfb084a752aa3ee37f9e2a Author: David Sterba Date: Fri May 17 11:43:22 2019 +0200 btrfs: use raid_attr in btrfs_chunk_max_errors The number of tolerated failures is stored in the raid_attr table, use it. Signed-off-by: David Sterba fs/btrfs/volumes.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit 9fa02ac75ba14683b341ec7430202cccfc8c3fab Author: David Sterba Date: Fri May 17 11:43:20 2019 +0200 btrfs: use raid_attr table in get_profile_num_devs The dev_max constraints are defined in the raid_attr table, use it instead of open-coding it. Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit c8bf1b67039556884d0532f7b06acd524c90ed87 Author: David Sterba Date: Fri May 17 11:43:17 2019 +0200 btrfs: remove mapping tree structures indirection fs_info::mapping_tree is the physical<->logical mapping tree and uses the same underlying structure as extents, but is embedded to another structure. There are no other members and this indirection is useless. No functional change. Signed-off-by: David Sterba fs/btrfs/ctree.h | 6 +---- fs/btrfs/dev-replace.c | 2 +- fs/btrfs/disk-io.c | 2 +- fs/btrfs/extent-tree.c | 14 ++++++------ fs/btrfs/free-space-cache.c | 2 +- fs/btrfs/scrub.c | 8 +++---- fs/btrfs/volumes.c | 53 ++++++++++++++++++++------------------------- fs/btrfs/volumes.h | 3 +-- 8 files changed, 40 insertions(+), 50 deletions(-) commit 49cc180ca916cc3af9ab109a0497e86ccf20d641 Author: David Sterba Date: Fri May 17 11:43:15 2019 +0200 btrfs: raid56: allow the exact minimum number of devices for balance convert The minimum number of devices for RAID5 is 2, though this is only a bit expensive RAID1, and for RAID6 it's 3, which is a triple copy that works only 3 devices. mkfs.btrfs allows that and mounting such filesystem also works, so the conversion via balance filters is inconsistent with the others and we should not prevent it. Signed-off-by: David Sterba fs/btrfs/volumes.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 0ee5f8ae082e1f675a2fb6db601c31ac9958a134 Author: David Sterba Date: Fri May 17 11:43:13 2019 +0200 btrfs: fix minimum number of chunk errors for DUP The list of profiles in btrfs_chunk_max_errors lists DUP as a profile DUP able to tolerate 1 device missing. Though this profile is special with 2 copies, it still needs the device, unlike the others. Looking at the history of changes, thre's no clear reason why DUP is there, functions were refactored and blocks of code merged to one helper. d20983b40e828 Btrfs: fix writing data into the seed filesystem - factor code to a helper de11cc12df173 Btrfs: don't pre-allocate btrfs bio - unrelated change, DUP still in the list with max errors 1 a236aed14ccb0 Btrfs: Deal with failed writes in mirrored configurations - introduced the max errors, leaves DUP and RAID1 in the same group Reviewed-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/volumes.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit be9b8dfa9c478a5bef22aeaa69d3f12d1033bbe4 Author: Liu Bo Date: Wed Sep 12 06:06:25 2018 +0800 Btrfs: remove unused variables in __btrfs_unlink_inode This code was first introduced in 5f39d397dfbe ("Btrfs: Create extent_buffer interface for large blocksizes") and the function was named btrfs_unlink_trans. It later got renamed to __btrfs_unlink_inode and finally commit 16cdcec736cd ("btrfs: implement delayed inode items operation") changed the way inodes are deleted and obviated the need for those two members. Signed-off-by: Liu Bo Reviewed-by: David Sterba [ replace changelog by Nikolay's version ] Signed-off-by: David Sterba fs/btrfs/inode.c | 4 ---- 1 file changed, 4 deletions(-) commit cebf05ca65d68d0de869a74754e0a0be35056243 Author: Goldwyn Rodrigues Date: Fri Oct 5 07:26:15 2018 -0500 btrfs: Remove unused variable mode in btrfs_mount This is a leftover from 312c89fbca06 ("btrfs: cleanup btrfs_mount() using btrfs_mount_root()"), the mode was used for opening devices that's not done here anymore. Reviewed-by: Nikolay Borisov Signed-off-by: Goldwyn Rodrigues Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/super.c | 4 ---- 1 file changed, 4 deletions(-) commit 8f63a84051e8e42aa99291197e4adae67241a705 Author: Su Yue Date: Wed Nov 28 11:21:12 2018 +0800 btrfs: switch order of unlocks of space_info and bg in do_trimming() In function do_trimming(), block_group->lock should be unlocked first, as the locks should be released in the reverse order. This does not cause problems but should follow the best practices. Reviewed-by: Nikolay Borisov Signed-off-by: Su Yue Reviewed-by: David Sterba [ update changelog ] Signed-off-by: David Sterba fs/btrfs/free-space-cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4c094c33c9ed4b8d0d814bd1d7ff78e123d15d00 Author: Qu Wenruo Date: Fri May 3 08:30:54 2019 +0800 btrfs: tree-checker: Check if the file extent end overflows Under certain conditions, we could have strange file extent item in log tree like: item 18 key (69599 108 397312) itemoff 15208 itemsize 53 extent data disk bytenr 0 nr 0 extent data offset 0 nr 18446744073709547520 ram 18446744073709547520 The num_bytes + ram_bytes overflow 64 bit type. For num_bytes part, we can detect such overflow along with file offset (key->offset), as file_offset + num_bytes should never go beyond u64. For ram_bytes part, it's about the decompressed size of the extent, not directly related to the size. In theory it is OK to have a large value, and put extra limitation on RAM bytes may cause unexpected false alerts. So in tree-checker, we only check if the file offset and num bytes overflow. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/tree-checker.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 2ed95d2d59b065f4db2fd42752cbe9a00969f2bd Author: Nikolay Borisov Date: Tue May 14 13:54:45 2019 +0300 btrfs: Remove redundant assignment of tgt_device->commit_total_bytes This is already done in btrfs_init_dev_replace_tgtdev which is the first phase of device replace, called before doing scrub. During that time exclusive lock is held. Additionally btrfs_fs_device::commit_total_bytes is always set based on the size of the underlying block device which shouldn't change once set. This makes the 2nd assignment of the variable in the finishing phase redundant. Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/dev-replace.c | 1 - 1 file changed, 1 deletion(-) commit f232ab04f65bb757f2d992a074a46df85c8f1797 Author: Nikolay Borisov Date: Tue May 14 13:54:43 2019 +0300 btrfs: Explicitly reserve space for devreplace item Part of device replace involves writing an item to the device root containing information about pending replace operations. Currently space for this item is not being explicitly reserved so this works thanks to presence of global reserve. While not fatal it's not a good practice. Let's be explicit about space requirement of device replace and reserve space when starting the transaction. Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/dev-replace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fa19452a4039539a5846198b9aecb8be51ce61ca Author: Nikolay Borisov Date: Tue May 14 13:54:42 2019 +0300 btrfs: Streamline replace sem unlock in btrfs_dev_replace_start There are only 2 branches which goto leave label with need_unlock set to true. Essentially need_unlock is used as a substitute for directly calling up_write. Since the branches needing this are only 2 and their context is not that big it's more clear to just call up_write where required. No functional changes. Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/dev-replace.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit e1e0eb43ce1fd7bbdd9590715623cb3799896434 Author: Nikolay Borisov Date: Tue May 14 13:54:41 2019 +0300 btrfs: Ensure btrfs_init_dev_replace_tgtdev sees up to date values btrfs_init_dev_replace_tgtdev reads certain values from the source device (such as commit_total_bytes) which are updated during transaction commit. Currently this function is called before committing any pending transaction, leading to possibly reading outdated values. Fix this by moving the function below the transaction commit, at this point the EXCL_OP bit it set hence once transaction is complete the total size of the device cannot be changed (it's usually changed by resize/remove ops which are blocked). Fixes: 9e271ae27e44 ("Btrfs: kernel operation should come after user input has been verified") Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/dev-replace.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 419684b2c217d2eba6a4a4cf0548c346be7879d7 Author: Nikolay Borisov Date: Tue May 14 13:54:40 2019 +0300 btrfs: dev-replace: Remove impossible WARN_ON This WARN_ON can never trigger because src_device cannot be null. btrfs_find_device_by_devspec always returns either an error or a valid pointer to the device. Just remove it. Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/dev-replace.c | 1 - 1 file changed, 1 deletion(-) commit b0d9e1ea17fdd3c1a13e2f9dffe7d808d6c9641a Author: Nikolay Borisov Date: Tue May 14 13:54:39 2019 +0300 btrfs: Reduce critical section in btrfs_init_dev_replace_tgtdev There is no point in holding btrfs_fs_devices::device_list_mutex while initialising fields of the not-yet-published device. Instead, hold the mutex only when the newly initialised device is being published. I think holding device_list_mutex here is redundant altogether, because at this point BTRFS_FS_EXCL_OP is set which prevents device removal/addition/balance/resize to occur. Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/dev-replace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ddb93784692fd41d7f1e74cf8b441428b7e57a64 Author: Nikolay Borisov Date: Tue May 14 13:54:38 2019 +0300 btrfs: Don't opencode sync_blockdev in btrfs_init_dev_replace_tgtdev Using sync_blockdev makes it plain obvious what's happening. No functional changes. Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/dev-replace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5911c8fe05c54c9f74a6467650e6493e4808cd01 Author: David Sterba Date: Wed May 15 15:31:04 2019 +0200 btrfs: fiemap: preallocate ulists for btrfs_check_shared btrfs_check_shared looks up parents of a given extent and uses ulists for that. These are allocated and freed repeatedly. Preallocation in the caller will avoid the overhead and also allow us to use the GFP_KERNEL as it is happens before the extent locks are taken. Reviewed-by: Nikolay Borisov Reviewed-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/backref.c | 17 ++++++----------- fs/btrfs/backref.h | 3 ++- fs/btrfs/extent_io.c | 17 +++++++++++++++-- 3 files changed, 23 insertions(+), 14 deletions(-) commit 9b4e675a9978800995f83af0ed90e890ca501f31 Author: David Sterba Date: Thu May 16 13:39:59 2019 +0200 btrfs: detect fast implementation of crc32c on all architectures Currently, there's only check for fast crc32c implementation on X86, based on the CPU flags. This is used to decide if checksumming should be offloaded to worker threads or can be calculated by the caller. As there are more architectures that implement a faster version of crc32c (ARM, SPARC, s390, MIPS, PowerPC), also there are specialized hw cards. The detection is based on driver name, all generic C implementations contain 'generic', while the specialized versions do not. Alternatively the priority could be used, but this is not currently provided by the crypto API. The flag is set per-filesystem at mount time and used for the offloading decisions. Signed-off-by: David Sterba fs/btrfs/ctree.h | 6 ++++++ fs/btrfs/disk-io.c | 13 ++++--------- fs/btrfs/super.c | 2 ++ 3 files changed, 12 insertions(+), 9 deletions(-) commit 78192442d383fb47ff5fa066f23c1d1bd382e526 Author: Qu Wenruo Date: Wed May 15 07:33:48 2019 +0800 btrfs: extent-tree: Refactor add_pinned_bytes() to add|sub_pinned_bytes() Instead of using @sign to determine whether we're adding or subtracting. Even it only has 3 callers, it's still (and in fact already caused problem in the past) confusing to use. Refactor add_pinned_bytes() to add_pinned_bytes() and sub_pinned_bytes() to explicitly show what we're doing. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 43 +++++++++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 16 deletions(-) commit 90fca074897a6a069408ee99c23f6897095b6d02 Merge: f254e65ad694 e3888cda394c Author: Greg Kroah-Hartman Date: Mon Jul 1 12:11:43 2019 +0200 Merge tag 'phy-for-5.2-rc_v2' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy into usb-next Kishon writes: phy: for 5.2-rc *) Move Tegra124 PLL power supplies to be enabled by xusb-tegra124 *) Move Tegra210 PLL power supplies to be enabled by xusb-tegra210 *) Minor fixes: fix memory leaks at error path and addresses coverity. Signed-off-by: Kishon Vijay Abraham I * tag 'phy-for-5.2-rc_v2' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy: phy: tegra: xusb: Add Tegra210 PLL power supplies phy: tegra: xusb: Add Tegra124 PLL power supplies dt-bindings: phy: tegra-xusb: List PLL power supplies phy: usb: phy-brcm-usb: Remove sysfs attributes upon driver removal phy: renesas: rcar-gen2: Fix memory leak at error paths phy: qcom-qusb2: fix missing assignment of ret when calling clk_prepare_enable commit f254e65ad694a9189163f5a60707a06225f5db25 Merge: 426d3ff2f5ab aa23ce847dda Author: Greg Kroah-Hartman Date: Mon Jul 1 12:01:33 2019 +0200 Merge tag 'usb-for-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next Felipe writes: usb: changes for v5.3 merge window The biggest part here is a set of patches removing unnecesary variables from several drivers. Meson-g12a's dwc3 glue implemented IRQ-based OTG/DRD role swap. Qcom's dwc3 glue added support for ACPI, mainly for the AArch64-based SoCs. DWC3 also got support for Intel Elkhart Lake platforms. * tag 'usb-for-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb: (30 commits) usb: dwc3: remove unused @lock member of dwc3_ep struct usb: dwc3: pci: Add Support for Intel Elkhart Lake Devices usb: Replace snprintf with scnprintf in gether_get_ifname usb: gadget: ether: Fix race between gether_disconnect and rx_submit usb: gadget: storage: Remove warning message usb: dwc3: gadget: Add support for disabling U1 and U2 entries usb: gadget: send usb_gadget as an argument in get_config_params doc: dt: bindings: usb: dwc3: Update entries for disabling U1 and U2 usb: dwc3: qcom: Use of_clk_get_parent_count() usb: dwc3: Fix core validation in probe, move after clocks are enabled usb: dwc3: qcom: Improve error handling usb: dwc3: qcom: Start USB in 'host mode' on the SDM845 usb: dwc3: qcom: Add support for booting with ACPI soc: qcom: geni: Add support for ACPI Revert "usb: dwc2: host: Setting qtd to NULL after freeing it" usb: gadget: net2272: remove redundant assignments to pointer 's' usb: gadget: Zero ffs_io_data USB: omap_udc: Remove unneeded variable fotg210-udc: Remove unneeded variable usb: gadget: at91_udc: Remove unneeded variable ... commit 69878ef47562f32e02d0b7975c990e1c0339320d Author: Christoph Hellwig Date: Tue Jun 25 11:01:35 2019 +0200 m68k: Implement arch_dma_prep_coherent() When we remap memory as non-cached, to be used as a DMA coherent buffer, we should writeback all cache and invalidate the cache lines so that we make sure we have a clean slate. Implement this using the cache_push() helper. Signed-off-by: Christoph Hellwig Signed-off-by: Geert Uytterhoeven arch/m68k/Kconfig | 1 + arch/m68k/kernel/dma.c | 5 +++++ 2 files changed, 6 insertions(+) commit 34dc63a5fb9b7f5dcb49f61552226c6314f347f6 Author: Christoph Hellwig Date: Tue Jun 25 11:01:34 2019 +0200 m68k: Use the generic dma coherent remap allocator This switches m68k to using common code for the DMA allocations, including potential use of the CMA allocator if configured. Also add a comment where the existing behavior seems to be lacking. Switching to the generic code enables DMA allocations from atomic context, which is required by the DMA API documentation, and also adds various other minor features drivers start relying upon. It also makes sure we have a tested code base for all architectures that require uncached pte bits for coherent DMA allocations. Signed-off-by: Christoph Hellwig Signed-off-by: Geert Uytterhoeven arch/m68k/Kconfig | 2 ++ arch/m68k/kernel/dma.c | 56 ++++++++------------------------------------------ 2 files changed, 10 insertions(+), 48 deletions(-) commit c1829acefc08c2f9a11e769750ea875b0a663af3 Merge: bb4a2e48d510 0937fbb7abeb Author: Greg Kroah-Hartman Date: Mon Jul 1 10:58:54 2019 +0200 Merge tag 'extcon-next-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into char-misc-next Chanwoo writes: Update extcon for 5.3 Detailed description for this pull request: 1. Add new extcon-fsa9480 extcon provider driver - It is extcon provide driver for Fairchild Semiconductor FSA9480 microUSB switch and accessory detector chip which detects the kind of external connector like usb, charger, audio, video and so on. 2. - Add the exception handling code for extcon-arizona.c when using the regmap interface. * tag 'extcon-next-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon: extcon: fsa9480: Fix Kconfig warning and build errors extcon: Add fsa9480 extcon driver dt-bindings: extcon: Add support for fsa9480 switch extcon: arizona: Correct error handling on regmap_update_bits_check commit c55cc97a252488a8e2a9181c1c36713cad69ee18 Merge: 003e6cc3a22d 208a68c8393d Author: Greg Kroah-Hartman Date: Mon Jul 1 10:58:13 2019 +0200 Merge tag 'iio-for-5.3b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: Second set of IIO device support, features, cleanups and minor fixes for 5.3. A few bits for the counters subsystem mixed in here as well. There are some late breaking fixes as well, which aren't so urgent they can't wait for the merge window. New Device Support * adf4371 - New driver + bindings. - Support the adf4372 PLL. Mostly ID and bindings. * ad8366 (note includes rework of driver needed to allow support for these). - Support the ADL5240 variable gain amplifier (VGA). - Support the ADA4961 digital gain amplifier (DGA). * dps310 - New driver, in several parts from different authors for this temp and pressure sensor. - Includes errata workaround for a temperature reading issue. * stk3310 - Support the stk3335, mostly ID. Features and cleanups * core - drop error handling on debugfs registration. - harden by making sure we don't overrun iio_chan_info_postfix. * docs - convert remaining docs to rst. At somepoint we'll fit these few into the main IIO docs. - improve sampling_frequency_available docs but explaining the range form. * ad_sigma_delta - Drop a pointless goto. * ad2s1210 - Drop pointless platform data null check seeing as we don't actually use platform data anymore. * ad7124 - Relax limitation on channel numbers to allow pseudo different channels. - Support control of whether the input is buffered via DT. - Use dynamic allocation for channel configuration to make it easier to support new devices. - YAML binding conversion. * ad7150 - Comment tidy up. - Consistent and simple if (ret) handling of i2c errors. - FIELD_GET and GENMASK. - Ternary rather than !!(condition) for readability. - Use macros to avoid repetition of channel definitions. * ad7606 - Add software channel config (rather that pin controlled) - Refactor to simplify addition of new part in future. * ad7746 - of_deivce_id table. * ad7780 - MAINTAINERS entry - YAML DT bindings. * ad8366 - Stop using core mlock in favour of well scoped local lock. - SPDX + copyright date update. * ad9834 - of_device_id table * adf4371 - Add support for output stage muting before lock on has occured. * adis library - MAINTAINERS entry to reflect that this now Alexandru's problem ;) * adis162xx: - Fix a slightly incorrect set of comments and print statements on minimum supported voltage. * adis16203 - of_device_id table. * adis16240 - Add of_device_id table (in two parts as first patch only used it for MODULE_DEVICE_TABLE.) * adt7316-spi - of_device_id table * adxl372 - YAML DT binding conversion. - Cleanup use of buffer callback functions (precursor to core rework). * bh1710 - Simplify getting the i2c adapter from the client. * dht11 - Mote to newer GPIO consumer interface. * kxcjk-1013.c - Add binding for sensor in display of some ultrabooks after userspace tools updated for it not be a problem to report two similar sensors. * imx7d - drop unused variables. - white space - define instead of variable for clock frequency that is fixed. - drop pointless error message. * messon_saradc - SPDX * sps30 - MAINTAINERS entry - YAML binding conversion. * st_accel - Tidy up ordering in various buffer related callbacks. This is part of a long running effort to simplify the core code. * stm32-dfsdm: - Manage the resolution cleanly in triggerd modes. - Add fast mode support which allows more flexible filter choices. - Add a comment on the reason for a 16 bit record when technically not 'required'. * st_lsm6dsx - Embed device name in the sensor_settings struct as i3c doesn't have a convenient name field to use for this. * xilinx-adc - Relax constraints on supported platforms to reflect that this can used with FPGAs on PCIe cards and hence many architectures. * counters/ftm-quaddec - Fix some formatting io MODULE_AUTHOR - MAINTAINERS entry Fixes * tools - fix incorrect handling of 32 bit channels. * sca3000 - Potential endian bug that is unlikely to bite anyone (be64 host seems unlikely for this old part). * stm32-adc - Add vdda-supply. On some boards it needs to be turned on to supply the ADC. DT bindings included. * stm32-dfsdm - Fix output resolution to work with filter orders other than 3. - Fix output datatype as it's signed and previously claimed not to be. * tag 'iio-for-5.3b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (68 commits) iio: iio-utils: Fix possible incorrect mask calculation iio: frequency: adf4371: Add support for output stage mute dt-bindings: iio: frequency: Add ADF4372 PLL documentation iio: frequency: adf4371: Add support for ADF4372 PLL dt-bindings: iio: adc: Add buffered input property Convert AD7124 bindings documentation to YAML format. iio: adc: ad7124: Shift to dynamic allocation for channel configuration iio: adc: ad7124: Add buffered input support iio: adc: ad7124: Remove input number limitation MAINTAINERS: add ADIS IMU driver library entry iio: adis162xx: fix low-power docs & reports counter/ftm-quaddec: Add missing '>' in MODULE_AUTHOR iio: core: no need to check return value of debugfs_create functions docs: iio: convert to ReST iio: adc: stm32-adc: add missing vdda-supply dt-bindings: iio: adc: stm32: add missing vdda supply iio: adc: stm32-dfsdm: add comment for 16 bits record iio: adc: stm32-dfsdm: add fast mode support iio: adc: stm32-dfsdm: manage data resolution in trigger mode iio: adc: stm32-dfsdm: fix data type ... commit 003e6cc3a22daa8ba09ac3b878d89ad8ee7cd394 Author: Nishka Dasgupta Date: Mon Jul 1 11:53:04 2019 +0530 staging: rtl8723bs: Remove rtw_btcoex_IsLpsOn() Remove function rtw_btcoex_IsLpsOn as all it does is call hal_btcoex_IsLpsOn. Modify call sites accordingly. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_btcoex.c | 5 ----- drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 4 ++-- drivers/staging/rtl8723bs/include/rtw_btcoex.h | 1 - 3 files changed, 2 insertions(+), 8 deletions(-) commit b9c1def24bec59be2e157ef5f68de6e84fd3b306 Author: Nishka Dasgupta Date: Mon Jul 1 11:53:03 2019 +0530 staging: rtl8723bs: Remove rtw_btcoex_SuspendNotify() Remove function rtw_btcoex_SuspendNotify as all it does is call hal_btcoex_SuspendNotify. Modify call sites accordingly. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_btcoex.c | 5 ----- drivers/staging/rtl8723bs/include/rtw_btcoex.h | 1 - drivers/staging/rtl8723bs/os_dep/os_intfs.c | 6 +++--- 3 files changed, 3 insertions(+), 9 deletions(-) commit 7d6a6e7be638e9c161dcdaa29373e7cbeddef0fc Author: Nishka Dasgupta Date: Mon Jul 1 11:53:02 2019 +0530 staging: rtl8723bs: Remove rtw_btcoex_SetManualControl() Remove function rtw_btcoex_SetManualControl as all it does is call hal_btcoex_SetManualControl. Modify call sites accordingly. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_btcoex.c | 5 ----- drivers/staging/rtl8723bs/include/rtw_btcoex.h | 1 - drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 5 +++-- 3 files changed, 3 insertions(+), 8 deletions(-) commit 800132aa06c28fabb4462bdd4a6811565a101a4b Author: Nishka Dasgupta Date: Mon Jul 1 11:53:01 2019 +0530 staging: rtl8723bs: Remove rtw_btcoex_SpecialPacketNotify() Remove function rtw_btcoex_SpecialPacketNotify as all it does is call hal_btcoex_SpecialPacketNotify. Modify call site accordingly. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_btcoex.c | 5 ----- drivers/staging/rtl8723bs/core/rtw_cmd.c | 3 ++- drivers/staging/rtl8723bs/include/rtw_btcoex.h | 1 - 3 files changed, 2 insertions(+), 7 deletions(-) commit a618315401ab07f1ecbeccb4be53a09970847b64 Author: Nishka Dasgupta Date: Mon Jul 1 11:53:00 2019 +0530 staging: rtl8723bs: Remove rtw_btcoex_LpsNotify() Remove function rtw_btcoex_LpsNotify as all it does is call hal_btcoex_LpsNotify. Modify call sites accordingly. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_btcoex.c | 5 ----- drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 4 ++-- drivers/staging/rtl8723bs/include/rtw_btcoex.h | 1 - 3 files changed, 2 insertions(+), 8 deletions(-) commit 4c1bcb0ee7a345539998ae99d967ddb5894253bb Author: Nishka Dasgupta Date: Mon Jul 1 11:52:59 2019 +0530 staging: rtl8723bs: Remove rtw_btcoex_IpsNotify() Remove function rtw_btcoex_IpsNotify as all it does is call hal_btcoex_IpsNotify. Modify call sites accordingly. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_btcoex.c | 5 ----- drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 4 ++-- drivers/staging/rtl8723bs/include/rtw_btcoex.h | 1 - drivers/staging/rtl8723bs/os_dep/os_intfs.c | 2 +- 4 files changed, 3 insertions(+), 9 deletions(-) commit 6fc61d9f066f16d0fd40287db1afef3ff0c44702 Author: Nishka Dasgupta Date: Mon Jul 1 11:52:58 2019 +0530 staging: rtl8723bs: Remove rtw_btcoex_IQKNotify() Remove function rtw_btcoex_IQKNotify as all it does is call hal_btcoex_IQKNotify. Modify call sites accordingly. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_btcoex.c | 5 ----- drivers/staging/rtl8723bs/hal/sdio_halinit.c | 4 ++-- drivers/staging/rtl8723bs/include/rtw_btcoex.h | 1 - 3 files changed, 2 insertions(+), 8 deletions(-) commit bd9dfe93c27bc397ba0e6aa9e6dc5132eef17628 Author: Nishka Dasgupta Date: Mon Jul 1 11:52:57 2019 +0530 staging: rtl8723bs: Remove rtw_btcoex_HAL_Initialize() Remove function rtw_btcoex_HAL_Initialize as it does nothing except call hal_btcoex_InitHwConfig. Modify call sites accordingly. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_btcoex.c | 5 ----- drivers/staging/rtl8723bs/hal/sdio_halinit.c | 4 ++-- drivers/staging/rtl8723bs/include/rtw_btcoex.h | 1 - 3 files changed, 2 insertions(+), 8 deletions(-) commit b13aaa5f8386540a281274a331f064e08b15e67e Author: Nishka Dasgupta Date: Mon Jul 1 11:52:56 2019 +0530 staging: rtl8723bs: Remove rtw_btcoex_PowerOnSetting() Remove function rtw_btcoex_PowerOnSetting as all it does is call hal_btcoex_PowerOnSetting. Modify call sites accordingly. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_btcoex.c | 5 ----- drivers/staging/rtl8723bs/hal/sdio_halinit.c | 2 +- drivers/staging/rtl8723bs/include/rtw_btcoex.h | 1 - 3 files changed, 1 insertion(+), 7 deletions(-) commit 9b1fd9b00d6dcb657df2571a529d40b8235292aa Author: Nishka Dasgupta Date: Mon Jul 1 11:52:55 2019 +0530 staging: rtl8723bs: Remove function rtw_modular64() Remove function rtw_modular64 as all it does is call do_div. Modify call sites accordingly. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_wlan_util.c | 2 +- drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 2 +- drivers/staging/rtl8723bs/include/osdep_service.h | 2 -- drivers/staging/rtl8723bs/os_dep/osdep_service.c | 5 ----- 4 files changed, 2 insertions(+), 9 deletions(-) commit 7cda1f884d76a462b67581b3f63e16b2d34a3912 Author: Nishka Dasgupta Date: Fri Jun 28 16:28:35 2019 +0530 staging: rtl8723bs: Replace function odm_SignalScaleMapping() Remove function odm_SignalScaleMapping as all it does is call odm_SignalScaleMapping_92CSeries. Rename odm_SignalScaleMapping_92CSeries to odm_SignalScaleMapping and change its type from static to non-static to maintain compatibility with call sites of odm_SignalScaleMapping. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/odm_HWConfig.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 777a43348af3140c7a26116b2747fad41d7d425c Author: Nishka Dasgupta Date: Fri Jun 28 16:28:34 2019 +0530 staging: rtl8723bs: Remove rtw_hal_networktype_to_raid() Change call sites of rtw_hal_networktype_to_raid to instead call networktype_to_raid_ex as rtw_hal_networktype_to_raid does nothing except call networktype_to_raid_ex. Remove now-unused function rtw_hal_networktype_to_raid. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_ap.c | 4 ++-- drivers/staging/rtl8723bs/core/rtw_mlme.c | 2 +- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 2 +- drivers/staging/rtl8723bs/hal/hal_com.c | 6 ------ drivers/staging/rtl8723bs/include/hal_com.h | 1 - 5 files changed, 4 insertions(+), 11 deletions(-) commit 2e82900fdda856bdd27ebcd8920fc99e30ea6ba5 Author: Nishka Dasgupta Date: Fri Jun 28 16:28:33 2019 +0530 staging: rtl8723bs: Change return type of networktype_to_raid_ex() Change return type of header file prototype of networktype_to_raid_ex from unsigned char to u8 to match its actual definition and call site. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/include/rtw_mlme_ext.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 414faeb18111bf9549833ada9c53c472acf8040d Author: Nishka Dasgupta Date: Fri Jun 28 16:28:32 2019 +0530 staging: rtl8723bs: Remove rtw_hal_c2h_evt_read() Modify call sites of rtw_hal_c2h_evt_read to call c2h_evt_read_88xx instead, as rtw_hal_c2h_evt_read does nothing except call c2h_evt_read_88xx. Remove function rtw_hal_c2h_evt_read as it is now not necessary. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_cmd.c | 2 +- drivers/staging/rtl8723bs/hal/hal_intf.c | 5 ----- drivers/staging/rtl8723bs/hal/sdio_ops.c | 2 +- drivers/staging/rtl8723bs/include/hal_intf.h | 1 - 4 files changed, 2 insertions(+), 8 deletions(-) commit 7ebc8751982e34e7cdf9c87700a071cf7c32c08f Author: Nishka Dasgupta Date: Fri Jun 28 16:28:31 2019 +0530 staging: rtl8723bs: hal: Remove function clearinterrupt8723bsdio() Remove unused function clearinterrupt8723bsdio and associated ifdef. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/sdio_ops.c | 35 -------------------------------- 1 file changed, 35 deletions(-) commit 5c5f1c1d994c9fc872ef95c30f34329a6fbec4d1 Author: Nishka Dasgupta Date: Fri Jun 28 16:28:30 2019 +0530 staging: rtl8723bs: core: Remove function wait_eeprom_cmd_done() Remove unused function wait_eeprom_cmd_done. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_eeprom.c | 19 ------------------- 1 file changed, 19 deletions(-) commit 3a1555da57f2aef9f5d9a673833ad79cc8763832 Author: Nishka Dasgupta Date: Fri Jun 28 16:28:29 2019 +0530 staging: rtl8723bs: hal: Remove function PHY_CalculateBitShift() Remove unused function PHY_CalculateBitShift. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/hal_phy.c | 24 ------------------------ 1 file changed, 24 deletions(-) commit 98be8b33c10a1e7bcee3317dd3d3d55bcc9fb0e2 Author: Nishka Dasgupta Date: Fri Jun 28 16:28:28 2019 +0530 staging: rtl8723bs: hal: Remove PHY_RFShadowRecorverFlagSetAll() Remove unused function PHY_RFShadowRecorverFlagSetAll. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/hal_phy.c | 18 ------------------ 1 file changed, 18 deletions(-) commit c23beb6dc05227dd0f17be6fd75ec6f12aa491ea Author: Nishka Dasgupta Date: Fri Jun 28 16:28:27 2019 +0530 staging: rtl8723bs: hal: Remove PHY_RFShadowRefresh() Remove unused function PHY_RFShadowRefresh. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/hal_phy.c | 17 ----------------- 1 file changed, 17 deletions(-) commit 8fce9e2825497b540aa9bb37df240eb2b6a0d0a9 Author: Nishka Dasgupta Date: Fri Jun 28 16:28:26 2019 +0530 staging: rtl8723bs: hal: Replace function rtl8723b_set_rssi_cmd() Remove function rtl8723b_set_rssi_cmd as all it does is call rtl8723b_set_FwRssiSetting_cmd. Rename rtl8723b_set_FwRssiSetting_cmd to rtl8723b_set_rssi_cmd and change its type from static to non-static to maintain compatibility with call sites. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 3c21e62798012bbf6d5ff7b1455d2a6a70a9df7f Author: Hariprasad Kelam Date: Thu Jun 27 23:41:39 2019 +0530 staging: rtl8723bs: hal: sdio_halinit: Remove set but unused varilable pHalData Remove set but unsed variable pHalData in below functions _InitOperationMode, SetHwReg8723BS. Signed-off-by: Hariprasad Kelam Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/sdio_halinit.c | 5 ----- 1 file changed, 5 deletions(-) commit 4d6d73809133879f59642adc03953687229b01e7 Author: Hariprasad Kelam Date: Wed Jun 26 23:21:55 2019 +0530 staging: rtl8723bs: hal: rtl8723b_rf6052: collect return status directly Remove variable rtStatus and return phy_RF6052_Config_ParaFile function directly Signed-off-by: Hariprasad Kelam Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/rtl8723b_rf6052.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 526160d0db0a8e24edb024e7be8b569203209fa7 Author: Hariprasad Kelam Date: Wed Jun 26 22:59:51 2019 +0530 staging: rtl8723bs: hal: rtl8723b_hal_init: remove set but unused variable pHalData Remove set but unsed variable pHalData in hw_var_set_mlme_join function Signed-off-by: Hariprasad Kelam Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 2 -- 1 file changed, 2 deletions(-) commit 77504cf392c0b9653ac03609b45799d11e5c1403 Author: Hariprasad Kelam Date: Wed Jun 26 22:43:37 2019 +0530 staging: rtl8723bs: hal: rtl8723b_cmd: remove set but unused variable Remove set but unsed variable pHalData in rtl8723b_set_FwRsvdPagePkt function Signed-off-by: Hariprasad Kelam Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c | 2 -- 1 file changed, 2 deletions(-) commit 4bfec30c205cc307f19e860aef5e87a0627f4955 Author: Nishka Dasgupta Date: Wed Jun 26 11:39:41 2019 +0530 staging: rtl8712: Replace function r8712_dequeue_cmd() Remove function r8712_dequeue_cmd as all it does is call _dequeue_cmd. Rename _dequeue_cmd to r8712_dequeue_cmd and change its type from static to non-static to maintain compatibility with call sites. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_cmd.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 54ae9f0fdad161e0f52fedbb373c145594975768 Author: Nishka Dasgupta Date: Wed Jun 26 11:39:40 2019 +0530 staging: rtl8712: Replace function r8712_enqueue_cmd() Merge function _enqueue_cmd into function r8712_enqueue_cmd as _enqueue_cmd is only called by r8712_enqueue_cmd, and then only once. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_cmd.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit a4898e78c368fbb3a22d8a080a2befe28063b5d8 Author: Nishka Dasgupta Date: Wed Jun 26 11:39:39 2019 +0530 staging: rtl8712: r8712_xmit_resource_alloc(): Change return values Change call site of function r8712_xmit_resource_alloc to add a check for its return value. Change return values of r8712_xmit_resource_alloc from _SUCCESS/_FAIL to 0/-ENOMEM. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_xmit.c | 3 ++- drivers/staging/rtl8712/xmit_linux.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) commit e1b5fe7412b00e248dc948cadfdbfd9c008bc87c Author: Nishka Dasgupta Date: Wed Jun 26 11:39:38 2019 +0530 staging: rtl8712: _r8712_init_sta_priv(): Change return values Add check for the return value of function _r8712_init_sta_priv at call site. Change return values of the function from _SUCCESS/_FAIL to 0/-ENOMEM respectively. Change return type of the function from u32 to int to enable return of -ENOMEM. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/os_intfs.c | 3 ++- drivers/staging/rtl8712/rtl871x_sta_mgt.c | 6 +++--- drivers/staging/rtl8712/sta_info.h | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) commit a024c9dfefc0c882c6a908e0d83de3f413b59190 Author: Nishka Dasgupta Date: Wed Jun 26 11:39:37 2019 +0530 staging: rtl8712: _r8712_free_sta_priv(): Change return type Change return type of function _r8712_free_sta_priv from u32 to void as it always returns _SUCCESS and this return value is never used. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_sta_mgt.c | 3 +-- drivers/staging/rtl8712/sta_info.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) commit 7721483ca043c759cce0e316e15e942cba1f974c Author: Nishka Dasgupta Date: Wed Jun 26 11:39:36 2019 +0530 staging: rtl8712: mp_start_test(): Change return values Change return values of function mp_start_test() from _SUCCESS/_FAIL to 0/-ENOMEM and modify call sites accordingly. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_mp_ioctl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f5e5eaefa921550619b0f4fd82a758e31ccb065c Author: Nishka Dasgupta Date: Wed Jun 26 11:39:35 2019 +0530 staging: rtl8712: r8712_parse_wpa2_ie(): Change return values Change return values of function r8712_parse_wpa2_ie from _SUCCESS/_FAIL to 0/-EINVAL. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/ieee80211.c | 12 ++++++------ drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) commit 1ef20d57cc9cad18c90d2e2102c2963869528459 Author: Nishka Dasgupta Date: Wed Jun 26 11:39:34 2019 +0530 staging: rtl8712: r8712_parse_wpa_ie(): Change return values Change return values of function r8712_parse_wpa_ie from _SUCCESS/_FAIL to 0/-EINVAL. Modify call site accordingly. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/ieee80211.c | 12 ++++++------ drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) commit 9839208ea97f139cbf10dc40f88aca36285f6f2c Author: Nishka Dasgupta Date: Wed Jun 26 11:39:33 2019 +0530 staging: rtl8712: Change return values of r8712_getrfreg_cmd() Change return values of r8712_getrfreg_cmd from _SUCCESS/_FAIL to 0/-ENOMEM respectively. Modify call site accordingly. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_cmd.c | 8 ++++---- drivers/staging/rtl8712/rtl871x_cmd.h | 2 +- drivers/staging/rtl8712/rtl871x_ioctl_rtl.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) commit abbe3acd7d72ab4633ade6bd24e8306b67e0add3 Author: Cole Rogers Date: Mon Jul 1 00:47:48 2019 -0700 Input: synaptics - enable SMBUS on T480 thinkpad trackpad Thinkpad t480 laptops had some touchpad features disabled, resulting in the loss of pinch to activities in GNOME, on wayland, and other touch gestures being slower. This patch adds the touchpad of the t480 to the smbus_pnp_ids whitelist to enable the extra features. In my testing this does not break suspend (on fedora, with wayland, and GNOME, using the rc-6 kernel), while also fixing the feature on a T480. Signed-off-by: Cole Rogers Acked-by: Benjamin Tissoires Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/mouse/synaptics.c | 1 + 1 file changed, 1 insertion(+) commit 5cecc2bccc03f5f7b496b43a80fd5b768d44f13c Author: Nathan Huckleberry Date: Mon Jul 1 01:03:25 2019 -0700 Input: atmel_mxt_ts - fix -Wunused-const-variable Clang produces the following warning drivers/input/touchscreen/atmel_mxt_ts.c:259:42: warning: unused variable 'mxt_video_fops' [-Wunused-const-variable] static const struct v4l2_file_operations mxt_video_fops = { Since mxt_video_fops is only used inside an ifdef. It should be moved inside the ifdef. Link: https://github.com/ClangBuiltLinux/linux/issues/527 Signed-off-by: Nathan Huckleberry Reviewed-by: Nick Desaulniers Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/atmel_mxt_ts.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit c0898fca3fce00f824e7f5d48e1edd0900378a03 Author: Arnd Bergmann Date: Fri Jun 28 14:16:45 2019 +0200 drm/selftests: reduce stack usage Putting a large drm_connector object on the stack can lead to warnings in some configuration, such as: drivers/gpu/drm/selftests/test-drm_cmdline_parser.c:18:12: error: stack frame size of 1040 bytes in function 'drm_cmdline_test_res' [-Werror,-Wframe-larger-than=] static int drm_cmdline_test_res(void *ignored) Since the object is never modified, just declare it as 'static const' and allow this to be passed down. Fixes: b7ced38916a9 ("drm/selftests: Add command line parser selftests") Signed-off-by: Arnd Bergmann Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20190628121712.1928142-1-arnd@arndb.de drivers/gpu/drm/drm_modes.c | 8 +- .../gpu/drm/selftests/test-drm_cmdline_parser.c | 136 ++++++++------------- include/drm/drm_modes.h | 2 +- 3 files changed, 53 insertions(+), 93 deletions(-) commit d19b75b05178e1e1483ccd9bd38fce930a0204d2 Author: Fabian Krueger Date: Wed Jun 26 09:35:26 2019 +0200 staging: kpc2000: remove needless 'break' The unconditioned jump will prohibit to ever reach the break-statement. Deleting this needless statement, the code becomes more understandable. Signed-off-by: Fabian Krueger Signed-off-by: Michael Scheiderer Cc: Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000_spi.c | 1 - 1 file changed, 1 deletion(-) commit 39e828584b390e612958e20ca308957001fcf854 Author: Fabian Krueger Date: Wed Jun 26 09:35:25 2019 +0200 staging: kpc2000: introduce __func__ Instead of using the function name hard coded as string, using __func__ and the '%s'-placeholder will always give the current name of the function. When renaming a function, the debugging-messages won't have to be rewritten. Signed-off-by: Fabian Krueger Signed-off-by: Michael Scheiderer Cc: Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000_spi.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 69086fb80d09bf50a649cd74f28a44f60f420a42 Author: Fabian Krueger Date: Wed Jun 26 09:35:24 2019 +0200 staging: kpc2000: introduce 'unsigned int' Replaced 'unsigned' with it's equivalent 'unsigned int' to reduce confusion while reading the code. Signed-off-by: Fabian Krueger Signed-off-by: Michael Scheiderer Cc: Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000_spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ecb87018bb76f4b9ba9081aa8fdbaa908456e652 Author: Fabian Krueger Date: Wed Jun 26 09:35:21 2019 +0200 staging: kpc2000: introduce usage of __packed Replaced __attribute__((packed)) with __packed. Both ways of attributing are equivalent, but being shorter, __packed should be preferred. This refactoring makes the core more readable. Signed-off-by: Fabian Krueger Signed-off-by: Michael Scheiderer Cc: Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000_spi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c70c7284a058b0c1855d945027d0bb39acd21f5d Author: Fabian Krueger Date: Wed Jun 26 09:35:20 2019 +0200 staging: kpc2000: blank lines after declaration After the declarations in a function, there should be a blank line, so that the declaration part is visibly separated from the rest. This refactoring makes the code more readable. Signed-off-by: Fabian Krueger Signed-off-by: Michael Scheiderer Cc: Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000_spi.c | 4 ++++ 1 file changed, 4 insertions(+) commit 06ed6146d6c1f647c40f24c195f8959687e3876b Author: Fabian Krueger Date: Wed Jun 26 09:35:19 2019 +0200 staging: kpc2000: add line breaks To fix some checkpatch-warnings some lines of this module had to be shortened so that they do not exceed 80 characters per line. This refactoring makes the code more readable. Signed-off-by: Fabian Krueger Signed-off-by: Michael Scheiderer Cc: Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000_spi.c | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) commit 3ac7843e12df11fcdead4f5a18885473b92f970d Author: Nishka Dasgupta Date: Wed Jun 26 12:17:59 2019 +0530 staging: rtl8192u: Remove function dm_backup_dynamic_mechanism_state() Remove unused function dm_backup_dynamic_mechanism_state. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/r8192U_dm.c | 12 ------------ drivers/staging/rtl8192u/r8192U_dm.h | 1 - 2 files changed, 13 deletions(-) commit e6e70326d657a36dcd73d4bc152471b62d2a198f Author: Nishka Dasgupta Date: Wed Jun 26 12:17:58 2019 +0530 staging: rtl8192u: Change type of rtl8192_rx_initiate() Change type of function rtl8192_rx_initiate from int to void as it always returns 0 and this value is never used. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/r8192U_core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit c0b8646c7380523678608103cb4dcd65b41b9649 Author: Hariprasad Kelam Date: Wed Jun 26 08:12:20 2019 +0530 staging: rtl8723bs: hal: hal_btcoex: Remove unneeded variable PHalData pHalData is not being used in halbtcoutsrc_LeaveLowPower. So remove the same. Signed-off-by: Hariprasad Kelam Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/hal_btcoex.c | 2 -- 1 file changed, 2 deletions(-) commit 9f269b37eec595bd71f1158262b180ec5608f100 Author: Hariprasad Kelam Date: Wed Jun 26 08:11:51 2019 +0530 staging: rtl8723bs: hal: hal_btcoex: Using comparison to true is error prone fix below issues reported by checkpatch CHECK: Using comparison to true is error prone CHECK: Using comparison to false is error prone Signed-off-by: Hariprasad Kelam Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/hal_btcoex.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 78f2e83dad7bf1b1337f7e0fc5c6add7cab81d62 Author: Dave Stevenson Date: Sat Jun 29 21:31:43 2019 +0200 staging: bcm2835-camera: Correct ctrl min/max/step/def to 64bit The V4L2 control API was expanded to take 64 bit values in commit 0ba2aeb6dab (Apr 16 2014), but as this driver wasn't in the mainline kernel at that point this was overlooked. Update to use 64 bit values. This also fixes a couple of warnings in 64 bit builds. Signed-off-by: Dave Stevenson Signed-off-by: Stefan Wahren Acked-by: Hans Verkuil Acked-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-camera/controls.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 37b0bbab54467f46b45a80bd06f34d1acad8dc3f Author: Dave Stevenson Date: Sat Jun 29 21:31:42 2019 +0200 staging: bcm2835-camera: Set the field value within each buffer Fixes a v4l2-compliance failure v4l2-test-buffers.cpp(415): g_field() == V4L2_FIELD_ANY The driver only ever produces progresive frames, so field should always be set to V4L2_FIELD_NONE. Signed-off-by: Dave Stevenson Signed-off-by: Stefan Wahren Acked-by: Hans Verkuil Acked-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c | 1 + 1 file changed, 1 insertion(+) commit 1029e7a71e51ebd6bd01f973b427c95634401f15 Author: Dave Stevenson Date: Sat Jun 29 21:31:41 2019 +0200 staging: bcm2835-camera: Add sanity checks for queue_setup/CREATE_BUFS Fixes a v4l2-compliance failure when passed a buffer that is too small. queue_setup wasn't handling the case where *nplanes != 0, as used from CREATE_BUFS and requiring the driver to sanity check the provided buffer parameters. It was assuming that it was always being used in the REQBUFS case where it provides the buffer properties. Signed-off-by: Dave Stevenson Signed-off-by: Stefan Wahren Acked-by: Hans Verkuil Acked-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman .../vc04_services/bcm2835-camera/bcm2835-camera.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit eb3539767a358129c20e536774eb1fa67b46ac27 Author: Dave Stevenson Date: Sat Jun 29 21:31:40 2019 +0200 staging: bcm2835-camera: Fix stride on RGB3/BGR3 formats RGB3/BGR3 end up being 3 bytes per pixel, which meant that the alignment code ended up trying to align using bitmasking with a mask of 96. That doesn't work, so switch to an arithmetic alignment for those formats. Signed-off-by: Dave Stevenson Signed-off-by: Stefan Wahren Acked-by: Hans Verkuil Acked-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman .../vc04_services/bcm2835-camera/bcm2835-camera.c | 26 +++++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) commit 640e77466e69d9c28de227bc76881f5501f532ca Author: Dave Stevenson Date: Sat Jun 29 21:31:39 2019 +0200 staging: mmal-vchiq: Avoid use of bool in structures Fixes up a checkpatch error "Avoid using bool structure members because of possible alignment issues". Signed-off-by: Dave Stevenson Signed-off-by: Stefan Wahren Acked-by: Hans Verkuil Acked-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c | 12 ++++++------ drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.h | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) commit 66b5d073115bf77c11686e05738480de163a7d25 Author: Dave Stevenson Date: Sat Jun 29 14:48:31 2019 +0200 staging: bcm2835-camera: Remove/amend some obsolete comments Remove a todo which has been done. Remove a template line that was redundant. Make a comment clearer as to the non-obvious meaning of a field. Signed-off-by: Dave Stevenson Signed-off-by: Stefan Wahren Acked-by: Hans Verkuil Acked-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-camera/controls.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit fe8adc4123344b9bdc4ce728b290980526780f0a Author: Dave Stevenson Date: Sat Jun 29 14:48:30 2019 +0200 staging: bcm2835-camera: Correct V4L2_CID_COLORFX_CBCR behaviour With V4L2_CID_COLORFX_CBCR calling ctrl_set_colfx it was incorrectly assigning the colour values to the enable field of dev->colourfx instead of the u and v fields. Correct the assignments. Reported as a Coverity issue Detected by CoverityScan CID#1419711 ("Unused value") Reported-by: Colin Ian King Signed-off-by: Dave Stevenson Signed-off-by: Stefan Wahren Acked-by: Hans Verkuil Acked-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-camera/controls.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ed5fea7a786a9073e243952478d409e2f6ddcee1 Author: Dave Stevenson Date: Sat Jun 29 14:48:29 2019 +0200 staging: bcm2835-camera: Use enums for max value in controls Controls of type MMAL_CONTROL_TYPE_STD_MENU call v4l2_ctrl_new_std_menu with a max value and a mask. The max value is one of the defined values for the control, however in the config array there are several entries where raw numbers have been used instead. Replace these with the appropriate enum. Signed-off-by: Dave Stevenson Signed-off-by: Stefan Wahren Acked-by: Hans Verkuil Acked-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman .../vc04_services/bcm2835-camera/controls.c | 37 ++++++++-------------- 1 file changed, 13 insertions(+), 24 deletions(-) commit 3a41cf34c3e994a735a7a7d717001b8792a11a2a Author: Dave Stevenson Date: Sat Jun 29 14:48:28 2019 +0200 staging: bcm2835-camera: Fix up mmal-parameters.h Fixes up all the checkpatch error "line over 80 characters" in mmal-parameters.h Signed-off-by: Dave Stevenson Signed-off-by: Stefan Wahren Acked-by: Hans Verkuil Acked-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman .../vc04_services/bcm2835-camera/mmal-parameters.h | 261 +++++++++++++-------- 1 file changed, 159 insertions(+), 102 deletions(-) commit 33cc62fafceaa431e810d963b389904e894e2378 Author: Dave Stevenson Date: Sat Jun 29 14:48:27 2019 +0200 staging: bcm2835-camera: Fix multiple assignments should be avoided Clear checkpatch complaints of "multiple assignments should be avoided" Signed-off-by: Dave Stevenson Signed-off-by: Stefan Wahren Acked-by: Hans Verkuil Acked-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit c7b52b8035752fe81229d0d612ffcc8ba1cb8cde Author: Dave Stevenson Date: Sat Jun 29 14:48:26 2019 +0200 staging: bcm2835-camera: Unify header inclusion defines Most of the headers use ifndef FOO_H, whilst mmal-parameters.h used ifndef __FOO_H. Revise mmal-parameters.h to drop the underscores and make the headers all consistent. Signed-off-by: Dave Stevenson Signed-off-by: Stefan Wahren Acked-by: Hans Verkuil Acked-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-camera/mmal-parameters.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 807855cab7c8dec81aba3a9cdc1a9de740cad9e4 Author: Dave Stevenson Date: Sat Jun 29 14:48:25 2019 +0200 staging: bcm2835-camera: Add multiple inclusion protection to headers mmal-common.h and mmal-msg.h didn't have the normal ifndef FOO / define FOO / endif protection to stop it being included multiple times. Add it. Signed-off-by: Dave Stevenson Signed-off-by: Stefan Wahren Acked-by: Hans Verkuil Acked-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-camera/mmal-common.h | 3 +++ drivers/staging/vc04_services/bcm2835-camera/mmal-msg.h | 3 +++ 2 files changed, 6 insertions(+) commit abb4718cc6a192915ad752779ef94d8b103a7535 Author: Dave Stevenson Date: Sat Jun 29 14:48:24 2019 +0200 staging: bcm2835-camera: Set sequence number correctly Set the sequence number in vb2_v4l2_buffer mainly so the latest v4l2-ctl reports the frame rate correctly. Signed-off-by: Dave Stevenson Signed-off-by: Stefan Wahren Acked-by: Hans Verkuil Acked-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c | 4 ++++ drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.h | 2 ++ 2 files changed, 6 insertions(+) commit a26be06d6d96c10a9ab005e99d93fbb5d3babd98 Author: Dave Stevenson Date: Sat Jun 29 14:48:23 2019 +0200 staging: bcm2835-camera: Handle empty EOS buffers whilst streaming The change to mapping V4L2 to MMAL buffers 1:1 didn't handle the condition we get with raw pixel buffers (eg YUV and RGB) direct from the camera's stills port. That sends the pixel buffer and then an empty buffer with the EOS flag set. The EOS buffer wasn't handled and returned an error up the stack. Handle the condition correctly by returning it to the component if streaming, or returning with an error if stopping streaming. Fixes: 938416707071 ("staging: bcm2835-camera: Remove V4L2/MMAL buffer remapping") Signed-off-by: Dave Stevenson Signed-off-by: Stefan Wahren Acked-by: Hans Verkuil Acked-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman .../vc04_services/bcm2835-camera/bcm2835-camera.c | 21 ++++++++++++--------- .../vc04_services/bcm2835-camera/mmal-vchiq.c | 5 +++-- 2 files changed, 15 insertions(+), 11 deletions(-) commit bb8e97006d701ae725a177f8f322e5a75fa761b7 Author: Dave Stevenson Date: Sat Jun 29 14:13:30 2019 +0200 staging: bcm2835-camera: Remove check of the number of buffers supplied Before commit "staging: bcm2835-camera: Remove V4L2/MMAL buffer remapping" there was a need to ensure that there were sufficient buffers supplied from the user to cover those being sent to the VPU (always 1). Now the buffers are linked 1:1 between MMAL and V4L2, therefore there is no need for that check, and indeed it is wrong as there is no need to submit all the buffers before starting streaming. Fixes: 938416707071 ("staging: bcm2835-camera: Remove V4L2/MMAL buffer remapping") Signed-off-by: Dave Stevenson Signed-off-by: Stefan Wahren Acked-by: Hans Verkuil Acked-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c | 10 ---------- 1 file changed, 10 deletions(-) commit 70ec64ccdaac5d8f634338e33b016c1c99831499 Author: Dave Stevenson Date: Sat Jun 29 14:13:29 2019 +0200 staging: bcm2835-camera: Ensure all buffers are returned on disable With the recent change to match MMAL and V4L2 buffers there is a need to wait for all MMAL buffers to be returned during stop_streaming. Fixes: 938416707071 ("staging: bcm2835-camera: Remove V4L2/MMAL buffer remapping") Signed-off-by: Dave Stevenson Signed-off-by: Stefan Wahren Acked-by: Hans Verkuil Acked-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman .../vc04_services/bcm2835-camera/bcm2835-camera.c | 22 ++++++++++++++++------ .../vc04_services/bcm2835-camera/mmal-vchiq.c | 4 ++++ .../vc04_services/bcm2835-camera/mmal-vchiq.h | 3 +++ 3 files changed, 23 insertions(+), 6 deletions(-) commit fcdd047e8ae9b838c9f742ecdc237754bb9bfffd Author: Dave Stevenson Date: Sat Jun 29 14:13:28 2019 +0200 staging: bcm2835-camera: Fix open parenthesis alignment Fix checkpatch "Alignment should match open parenthesis" errors. Signed-off-by: Dave Stevenson Signed-off-by: Stefan Wahren Acked-by: Hans Verkuil Acked-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman .../vc04_services/bcm2835-camera/bcm2835-camera.c | 9 ++++---- .../vc04_services/bcm2835-camera/controls.c | 25 ++++++++++++++-------- .../vc04_services/bcm2835-camera/mmal-vchiq.c | 2 +- .../vc04_services/bcm2835-camera/mmal-vchiq.h | 6 +++--- 4 files changed, 24 insertions(+), 18 deletions(-) commit fe78fd7b18a329063012ae9023da4e4832582001 Author: Dave Stevenson Date: Sat Jun 29 14:13:27 2019 +0200 staging: bcm2835-camera: Fix missing lines between items Fix checkpatch errors for missing blank lines after variable or structure declarations. Signed-off-by: Dave Stevenson Signed-off-by: Stefan Wahren Acked-by: Hans Verkuil Acked-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.h | 1 + 1 file changed, 1 insertion(+) commit f439600f89c8ea392d69e3af5550b72f73b50e86 Author: Dave Stevenson Date: Sat Jun 29 14:13:26 2019 +0200 staging: bcm2835-camera: Fix brace style issues. Fix mismatched or missing brace issues flagged by checkpatch. Signed-off-by: Dave Stevenson Signed-off-by: Stefan Wahren Acked-by: Hans Verkuil Acked-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c | 3 ++- drivers/staging/vc04_services/bcm2835-camera/controls.c | 3 ++- drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) commit eb9e4f3c865a646a653ed374e15ccafdebc62ade Author: Dave Stevenson Date: Sat Jun 29 14:13:25 2019 +0200 staging: bcm2835-camera: Fix multiple line dereference errors Fix checkpatch errors "Avoid multiple line dereference" Signed-off-by: Dave Stevenson Signed-off-by: Stefan Wahren Acked-by: Hans Verkuil Acked-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 3485507fc2728cebdfdefd5646d4adb28c81a9cd Author: Dave Stevenson Date: Sat Jun 29 14:13:24 2019 +0200 staging: bcm2835-camera: Reduce length of enum names We have numerous lines over 80 chars, or oddly split. Many of these are due to using long enum names such as MMAL_COMPONENT_CAMERA. Reduce the length of these enum names. Signed-off-by: Dave Stevenson Signed-off-by: Stefan Wahren Acked-by: Hans Verkuil Acked-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman .../vc04_services/bcm2835-camera/bcm2835-camera.c | 156 +++++++++++---------- .../vc04_services/bcm2835-camera/bcm2835-camera.h | 20 +-- .../vc04_services/bcm2835-camera/controls.c | 47 +++---- 3 files changed, 111 insertions(+), 112 deletions(-) commit db9c9ee4c2423fd83150b8895e0a7f40a74cdbca Author: Dave Stevenson Date: Sat Jun 29 14:13:23 2019 +0200 staging: bcm2835-camera: Fix spacing around operators Fix checkpatch warnings over spaces around operators. Many were around operations that can be replaced with the BIT(x) macro, so replace with that where appropriate. Signed-off-by: Dave Stevenson Signed-off-by: Stefan Wahren Acked-by: Hans Verkuil Acked-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman .../vc04_services/bcm2835-camera/controls.c | 32 +++++++++++----------- .../vc04_services/bcm2835-camera/mmal-msg.h | 3 +- .../vc04_services/bcm2835-camera/mmal-parameters.h | 12 ++++---- 3 files changed, 24 insertions(+), 23 deletions(-) commit 98fbcbb1de9ae86855fb7a88c117a7bdd880e0a0 Author: Dave Stevenson Date: Sat Jun 29 14:13:22 2019 +0200 staging: bcm2835-camera: Fix comment style violations. Fix comment style violations in the header files. Signed-off-by: Dave Stevenson Signed-off-by: Stefan Wahren Acked-by: Hans Verkuil Acked-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman .../vc04_services/bcm2835-camera/mmal-msg-format.h | 95 ++++++++------- .../vc04_services/bcm2835-camera/mmal-msg-port.h | 124 +++++++++---------- .../vc04_services/bcm2835-camera/mmal-msg.h | 135 +++++++++++---------- 3 files changed, 185 insertions(+), 169 deletions(-) commit be2f87c30fd2fd5736d18cbeaed21228b630d3e6 Author: Dave Stevenson Date: Sat Jun 29 14:13:21 2019 +0200 staging: bcm2835-camera: Remove dead email addresses None of the listed author email addresses were valid. Keep list of authors and the companies they represented. Update my email address. Signed-off-by: Dave Stevenson Signed-off-by: Stefan Wahren Acked-by: Hans Verkuil Acked-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c | 9 +++++---- drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.h | 9 +++++---- drivers/staging/vc04_services/bcm2835-camera/controls.c | 9 +++++---- drivers/staging/vc04_services/bcm2835-camera/mmal-common.h | 9 +++++---- drivers/staging/vc04_services/bcm2835-camera/mmal-encodings.h | 9 +++++---- drivers/staging/vc04_services/bcm2835-camera/mmal-msg-common.h | 9 +++++---- drivers/staging/vc04_services/bcm2835-camera/mmal-msg-format.h | 9 +++++---- drivers/staging/vc04_services/bcm2835-camera/mmal-msg-port.h | 9 +++++---- drivers/staging/vc04_services/bcm2835-camera/mmal-msg.h | 9 +++++---- drivers/staging/vc04_services/bcm2835-camera/mmal-parameters.h | 9 +++++---- drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c | 9 +++++---- drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.h | 9 +++++---- 12 files changed, 60 insertions(+), 48 deletions(-) commit 35c586ffffbc44f2b83729f6a7e224eea0351e8b Author: Dave Stevenson Date: Sat Jun 29 14:13:20 2019 +0200 staging: bcm2835-camera: Return early on errors Fix several instances where it is easier to return early on error conditions than handle it as an else clause. As requested by Mauro. Signed-off-by: Dave Stevenson Signed-off-by: Stefan Wahren Acked-by: Hans Verkuil Acked-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman .../vc04_services/bcm2835-camera/bcm2835-camera.c | 94 +++++++++++----------- 1 file changed, 49 insertions(+), 45 deletions(-) commit c497916149230a88a0305493a2f7ddd5d24a7a00 Author: Dave Stevenson Date: Sat Jun 29 14:13:19 2019 +0200 staging: bcm2835-camera: Correctly denote key frames in encoded data Forward MMAL key frame flags to the V4L2 buffers. Signed-off-by: Dave Stevenson Signed-off-by: Stefan Wahren Acked-by: Hans Verkuil Acked-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c | 3 +++ 1 file changed, 3 insertions(+) commit a1120db35717ea78b977516a57b054cdbea60c45 Author: Dave Stevenson Date: Sat Jun 29 14:13:18 2019 +0200 staging: bcm2835-camera: Do not bulk receive from service thread vchi_bulk_queue_receive will queue up to a default of 4 bulk receives on a connection before blocking. If called from the VCHI service_callback thread, then that thread is unable to service the VCHI_CALLBACK_BULK_RECEIVED events that would enable the queue call to succeed. Add a workqueue to schedule the call vchi_bulk_queue_receive in an alternate context to avoid the lock up. Signed-off-by: Dave Stevenson Signed-off-by: Stefan Wahren Acked-by: Hans Verkuil Acked-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman .../vc04_services/bcm2835-camera/mmal-vchiq.c | 101 ++++++++++++--------- 1 file changed, 59 insertions(+), 42 deletions(-) commit 8dedab2903f152aa3cee9ae3d57c828dea0d356e Author: Dave Stevenson Date: Sat Jun 29 14:13:17 2019 +0200 staging: bcm2835-camera: Replace spinlock protecting context_map with mutex The commit "staging: bcm2835-camera: Replace open-coded idr with a struct idr." replaced an internal implementation of an idr with the standard functions and a spinlock. idr_alloc(GFP_KERNEL) can sleep whilst calling kmem_cache_alloc to allocate the new node, but this is not valid whilst in an atomic context due to the spinlock. There is no need for this to be a spinlock as a standard mutex is sufficient. Fixes: 950fd867c635 ("staging: bcm2835-camera: Replace open-coded idr with a struct idr.") Signed-off-by: Dave Stevenson Signed-off-by: Stefan Wahren Acked-by: Hans Verkuil Acked-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 557897fea0b13112b595afb6b559a08706c2320e Author: Dave Stevenson Date: Sat Jun 29 14:13:16 2019 +0200 staging: bcm2835-camera: Check the error for REPEAT_SEQ_HEADER When handling for V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER was added the firmware would reject the setting if H264 hadn't already been selected. This was fixed in the firmware at that point, but to enable backwards compatibility the returned error was ignored. That was Dec 2013, so the chances of having a firmware that still has that issue is so close to zero that the workaround can be removed. Link: https://github.com/raspberrypi/linux/pull/2782/ Signed-off-by: Dave Stevenson Signed-off-by: Stefan Wahren Acked-by: Hans Verkuil Acked-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-camera/controls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 690a993f100fa63e4d3af83e3b2334211738f181 Author: Hariprasad Kelam Date: Sat Jun 29 23:56:50 2019 +0530 staging/rtl8188eu/os_dep: Remove unneeded variable ret Below list of functions returns 0 in success and -EINVAL in failure. So directly return 0 on Success. Signed-off-by: Hariprasad Kelam Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit 01bc283e819895cca6d9b5c91062552db79cac26 Author: Nishka Dasgupta Date: Wed Jun 26 12:20:57 2019 +0530 staging: rtl8188eu: Remove declarations of unused functions Remove the declarations of the following unused functions from rtw_eeprom.h: - eeprom_write16 - eeprom_read16 - eeprom_read_sz - read_eeprom_content - read_eeprom_content_by_attrib. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/rtw_eeprom.h | 6 ------ 1 file changed, 6 deletions(-) commit c41ee96b3b894efb6e1b985f064a826de27264fa Author: Nishka Dasgupta Date: Wed Jun 26 12:20:56 2019 +0530 staging: rtl8188eu: hal: Replace function ODM_TXPowerTrackingCheck() Remove function ODM_TXPowerTrackingCheck as all it does is call odm_TXPowerTrackingCheckCE. Rename odm_TXPowerTrackingCheckCE to ODM_TXPowerTrackingCheck for compatibility with call sites. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/odm.c | 5 ----- drivers/staging/rtl8188eu/include/odm_precomp.h | 1 - 2 files changed, 6 deletions(-) commit 2995c182f85b57860451509422e0da12a6c5dcf3 Author: Nishka Dasgupta Date: Wed Jun 26 12:20:55 2019 +0530 staging: rtl8188eu: hal: Replace function odm_TXPowerTrackingInit() Remove function odm_TXPowerTrackingInit as all it does is call odm_TXPowerTrackingThermalMeterInit. Rename odm_TXPowerTrackingThermalMeterInit to odm_TXPowerTrackingInit for compatibility with call sites. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/odm.c | 5 ----- drivers/staging/rtl8188eu/include/odm_precomp.h | 1 - 2 files changed, 6 deletions(-) commit 1f22b8f1bd6d2de4d505e3e112b689ed41539786 Author: Nishka Dasgupta Date: Wed Jun 26 12:20:54 2019 +0530 staging: rtl8188eu: os_dep: Remove return variable Remove return variable as its value is not altered between initialisation and return. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5d32630f170c5e200381f3d26ffe179f58f61b66 Author: Hariprasad Kelam Date: Sun Jun 30 00:40:35 2019 +0530 staging: netlogic: Change GFP_ATOMIC to GFP_KERNEL Below is data path of xlr_config_spill xlr_net_probe -->xlr_config_fifo_spill_area --->xlr_config_spill We can use GFP_KERNEL as this function is getting called from xlr_net_probe and there are no locks. Signed-off-by: Hariprasad Kelam Signed-off-by: Greg Kroah-Hartman drivers/staging/netlogic/xlr_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 321cab4b5e56f2b5371da20de618c7c1a791ceb5 Author: Tobias Nießen Date: Wed Jun 26 16:28:57 2019 +0200 staging: rts5208: Simplify boolean expression to improve code style This bitwisen / boolean expression can be made more readable while reducing the line lengths at the same time. This commit uses the fact that a & (b | c) == (b | c) evaluates to true if and only if (a & b) && (a & c) is true. Since b and c are constants with relatively long names, using the second form makes the code much more readable and shorter. Signed-off-by: Tobias Nießen Signed-off-by: Sabrina Gaube Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/xd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 34a49d9edf3af971867e3876de7dc9935d467f67 Author: Tobias Nießen Date: Wed Jun 26 16:28:56 2019 +0200 staging: rts5208: Rewrite redundant if statement to improve code style This commit uses the fact that if (a) { if (b) { ... } } can instead be written as if (a && b) { ... } without any change in behavior, allowing to decrease the indentation of the contained code block and thus reducing the average line length. Signed-off-by: Tobias Nießen Signed-off-by: Sabrina Gaube Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/sd.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) commit 7ff9f78ea683229264d813949ae21b24234267c6 Author: Ajay Singh Date: Wed Jun 26 12:41:06 2019 +0000 staging: wilc1000: rename 'host_interface' source and header Rename 'host_interface' source and header file to include the 'wilc_' prefix in its name. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/Makefile | 2 +- drivers/staging/wilc1000/{host_interface.c => wilc_hif.c} | 0 drivers/staging/wilc1000/{host_interface.h => wilc_hif.h} | 0 drivers/staging/wilc1000/wilc_wfi_netdevice.h | 2 +- 4 files changed, 2 insertions(+), 2 deletions(-) commit 93592a65ad89c0dd618e9a1ce87994d7d164048e Author: Ajay Singh Date: Wed Jun 26 12:41:04 2019 +0000 staging: wilc1000: remove extra argument passing to wilc_send_config_pkt() Cleanup patch to remove the passing of driver handler, get the 'idx' value inside the called function. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 116 ++++++++++-------------------- drivers/staging/wilc1000/wilc_wlan.c | 3 +- drivers/staging/wilc1000/wilc_wlan.h | 2 +- 3 files changed, 40 insertions(+), 81 deletions(-) commit 39cf54fc6af3d573f2e9bb9526376f34f5126f3d Author: Ajay Singh Date: Wed Jun 26 12:41:01 2019 +0000 staging: wilc1000: remove use of 'src_addr' element in 'wilc_vif' struct Remove use of 'src_addr' element in wilc_vif, as the same information already copied to net_device->dev_addr. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_netdev.c | 3 +-- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 +- drivers/staging/wilc1000/wilc_wfi_netdevice.h | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) commit 264a472d29b8843c979a361abcf2f324bcb045cf Author: Ajay Singh Date: Wed Jun 26 12:40:58 2019 +0000 staging: wilc1000: remove unnecessary loop to traverse vif interfaces Cleanup patch to avoid loop to traverse the interfaces instead make use of vif received from net_device priv data. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 7 +------ drivers/staging/wilc1000/wilc_netdev.c | 16 +++++----------- 2 files changed, 6 insertions(+), 17 deletions(-) commit 2f5e568b28fb72f0e88c6876308072242d3f4d16 Author: Ajay Singh Date: Wed Jun 26 12:40:55 2019 +0000 staging: wilc1000: remove use of driver_handler_id & ifc_id Removed the 'driver_handler_id' & 'ifc_id' elements and used 'idx' to identify the handler. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 3 +-- drivers/staging/wilc1000/host_interface.h | 1 - drivers/staging/wilc1000/wilc_netdev.c | 3 +-- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 5 ++--- drivers/staging/wilc1000/wilc_wfi_netdevice.h | 1 - 5 files changed, 4 insertions(+), 9 deletions(-) commit 9bc061e880548710b5a09d7ae4e0195b2ed496d4 Author: Ajay Singh Date: Wed Jun 26 12:40:52 2019 +0000 staging: wilc1000: added support to dynamically add/remove interfaces Removed the use of two hardcoded interfaces and added support to add/remove the network interfaces dynamically. Now the driver will have single default interface with name 'wlan0' and later other interface can be added from user space application e.g using 'iw add' command. Also taken care to maintain 'wilc_vif' as part of 'net_device' private data and 'wilc' struct as 'wiphy' private data. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_mon.c | 9 +- drivers/staging/wilc1000/wilc_netdev.c | 269 ++++------- drivers/staging/wilc1000/wilc_sdio.c | 7 +- drivers/staging/wilc1000/wilc_spi.c | 3 +- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 535 ++++++++++++++-------- drivers/staging/wilc1000/wilc_wfi_cfgoperations.h | 13 +- drivers/staging/wilc1000/wilc_wfi_netdevice.h | 20 +- drivers/staging/wilc1000/wilc_wlan.c | 20 +- drivers/staging/wilc1000/wilc_wlan.h | 6 +- 9 files changed, 492 insertions(+), 390 deletions(-) commit 6419f818ababebc1116fb2d0e220bd4fe835d0e3 Author: Ajay Singh Date: Wed Jun 26 12:40:48 2019 +0000 staging: wilc1000: fix error path cleanup in wilc_wlan_initialize() For the error path in wilc_wlan_initialize(), the resources are not cleanup in the correct order. Reverted the previous changes and use the correct order to free during error condition. Fixes: b46d68825c2d ("staging: wilc1000: remove COMPLEMENT_BOOT") Cc: Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_netdev.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 424a61122c93f2493c318479646e8db86b3dca6a Author: Ajay Singh Date: Wed Jun 26 12:40:45 2019 +0000 staging: wilc1000: handle p2p operations in caller context Moved the handling of p2p related operation in the caller context instead of using workqueue. Signed-off-by: Ajay Singh Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 46 ++++++++++++------------------- 1 file changed, 17 insertions(+), 29 deletions(-) commit 95392b0260bf8b432f990f3520280e4b110a8961 Author: Alexander Dahl Date: Sun Jun 30 10:05:40 2019 +0200 staging: rtl8188eu: Add 'rtl8188eufw.bin' to MODULE_FIRMWARE list This is the file loaded by the code anyway, but now you can use 'modinfo' to determine the needed firmware file for this module. Spotted when packaging firmware files for the fli4l Linux router distribution, where a script uses the information from 'modinfo' to collect all needed firmware files to package. Cc: Christoph Schulz Signed-off-by: Alexander Dahl Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/os_dep/os_intfs.c | 1 + 1 file changed, 1 insertion(+) commit 0ae0cf509d28d8539b88b5f7f24558f5bfe57cdf Author: Sergio Paracuellos Date: Wed Jun 26 14:43:18 2019 +0200 staging: mt7621-pci: fix PCIE_FTS_NUM_LO macro Add missing parenthesis to PCIE_FTS_NUM_LO macro to do the same it was being done in original code. Fixes: a4b2eb912bb1 ("staging: mt7621-pci: rewrite RC FTS configuration") Signed-off-by: Sergio Paracuellos Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/staging/mt7621-pci/pci-mt7621.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f816db1dc17b99b059325f41ed5a78f85d15368c Author: Stefan Wahren Date: Wed Jun 26 17:48:11 2019 +0200 staging: bcm2835-camera: Restore return behavior of ctrl_set_bitrate() The commit 52c4dfcead49 ("Staging: vc04_services: Cleanup in ctrl_set_bitrate()") changed the return behavior of ctrl_set_bitrate(). We cannot do this because of a bug in the firmware, which breaks probing of bcm2835-camera: bcm2835-v4l2: mmal_init: failed to set all camera controls: -3 Cleanup: Destroy video encoder Cleanup: Destroy image encoder Cleanup: Destroy video render Cleanup: Destroy camera bcm2835-v4l2: bcm2835_mmal_probe: mmal init failed: -3 bcm2835-camera: probe of bcm2835-camera failed with error -3 So restore the old behavior, add an explaining comment and a debug message to verify that the bug has been fixed in firmware. Fixes: 52c4dfcead49 ("Staging: vc04_services: Cleanup in ctrl_set_bitrate()") Signed-off-by: Stefan Wahren Cc: stable Acked-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman .../staging/vc04_services/bcm2835-camera/controls.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit 3c96993b1832c085f4e5905a3526c9523dd17357 Author: Nishka Dasgupta Date: Wed Jun 26 12:14:50 2019 +0530 staging: greybus: tools: Remove function log_csv_error() Remove unused function log_csv_error. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Reviewed-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/tools/loopback_test.c | 6 ------ 1 file changed, 6 deletions(-) commit b8336be66dec06bef518030a0df9847122053ec5 Author: Ian Abbott Date: Wed Jun 26 14:18:04 2019 +0100 staging: comedi: dt282x: fix a null pointer deref on interrupt The interrupt handler `dt282x_interrupt()` causes a null pointer dereference for those supported boards that have no analog output support. For these boards, `dev->write_subdev` will be `NULL` and therefore the `s_ao` subdevice pointer variable will be `NULL`. In that case, the following call near the end of the interrupt handler results in a null pointer dereference: comedi_handle_events(dev, s_ao); Fix it by only calling the above function if `s_ao` is valid. (There are other uses of `s_ao` by the interrupt handler that may or may not be reached depending on values of hardware registers. Trust that they are reliable for now.) Note: commit 4f6f009b204f ("staging: comedi: dt282x: use comedi_handle_events()") propagates an earlier error from commit f21c74fa4cfe ("staging: comedi: dt282x: use cfc_handle_events()"). Fixes: 4f6f009b204f ("staging: comedi: dt282x: use comedi_handle_events()") Cc: # v3.19+ Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/dt282x.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7379e6baeddf580d01feca650ec1ad508b6ea8ee Author: Ian Abbott Date: Wed Jun 26 14:17:39 2019 +0100 staging: comedi: amplc_pci230: fix null pointer deref on interrupt The interrupt handler `pci230_interrupt()` causes a null pointer dereference for a PCI260 card. There is no analog output subdevice for a PCI260. The `dev->write_subdev` subdevice pointer and therefore the `s_ao` subdevice pointer variable will be `NULL` for a PCI260. The following call near the end of the interrupt handler results in the null pointer dereference for a PCI260: comedi_handle_events(dev, s_ao); Fix it by only calling the above function if `s_ao` is valid. Note that the other uses of `s_ao` in the calls `pci230_handle_ao_nofifo(dev, s_ao);` and `pci230_handle_ao_fifo(dev, s_ao);` will never be reached for a PCI260, so they are safe. Fixes: 39064f23284c ("staging: comedi: amplc_pci230: use comedi_handle_events()") Cc: # v3.19+ Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/amplc_pci230.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 338d9637361c87730be5960585cc481cd144cf20 Author: Hans Verkuil Date: Wed Jun 26 10:30:17 2019 +0200 staging/most/video: set device_caps in struct video_device Instead of filling in the struct v4l2_capability device_caps field, fill in the struct video_device device_caps field. That way the V4L2 core knows what the capabilities of the video device are. Signed-off-by: Hans Verkuil Signed-off-by: Greg Kroah-Hartman drivers/staging/most/video/video.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit a9f69bd555ccfa64e3460ed7c5321e1f1c34536d Author: Shobhit Kukreti Date: Wed Jun 26 22:31:18 2019 -0700 staging: erofs: Replace kzalloc(struct ..) with kzalloc(*ptr) Resolve checkpatch warning: Prefer kzalloc(sizeof(*ptr)...) over kzalloc(sizeof(struct ..) Signed-off-by: Shobhit Kukreti Reviewed-by: Chao Yu Reviewed-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman drivers/staging/erofs/super.c | 2 +- drivers/staging/erofs/unzip_vle.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) commit de3728dcd3428620c108c7a23843c6ac15541585 Author: Yue Hu Date: Fri Jun 28 11:42:34 2019 +0800 staging: erofs: don't check special inode layout Currently, we will check if inode layout is compression or inline if the inode is special in fill_inode(). Also set ->i_mapping->a_ops for it. That is pointless since the both modes won't be set for special inode when creating EROFS filesystem image. So, let's avoid it. Signed-off-by: Yue Hu Reviewed-by: Chao Yu Signed-off-by: Greg Kroah-Hartman drivers/staging/erofs/inode.c | 1 + 1 file changed, 1 insertion(+) commit 5545745930ea42a04edff1d260d8084a26feae34 Author: Yue Hu Date: Thu Jun 27 17:46:15 2019 +0800 staging: erofs: return the error value if fill_inline_data() fails We should consider the error returned by fill_inline_data() when filling last page in fill_inode(). If not getting inode will be successful even though last page is bad. That is illogical. Also change -EAGAIN to 0 in fill_inline_data() to stand for successful filling. Signed-off-by: Yue Hu Reviewed-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Greg Kroah-Hartman drivers/staging/erofs/inode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bb4a2e48d5100ed3ff614df158a636bca3c6bf9f Author: Todd Kjos Date: Fri Jun 28 09:50:12 2019 -0700 binder: return errors from buffer copy functions The buffer copy functions assumed the caller would ensure correct alignment and that the memory to be copied was completely within the binder buffer. There have been a few cases discovered by syzkallar where a malformed transaction created by a user could violated the assumptions and resulted in a BUG_ON. The fix is to remove the BUG_ON and always return the error to be handled appropriately by the caller. Acked-by: Martijn Coenen Reported-by: syzbot+3ae18325f96190606754@syzkaller.appspotmail.com Fixes: bde4a19fc04f ("binder: use userspace pointer as base of buffer space") Suggested-by: Dan Carpenter Signed-off-by: Todd Kjos Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/android/binder.c | 153 +++++++++++++++++++++++++---------------- drivers/android/binder_alloc.c | 44 ++++++------ drivers/android/binder_alloc.h | 22 +++--- 3 files changed, 126 insertions(+), 93 deletions(-) commit 4b1f5ccc7cdc89fe208e017f9d40d69cb9e160f4 Author: Nicholas Piggin Date: Wed Jun 12 00:30:13 2019 +1000 powerpc/64s/exception: fix line wrap and semicolon inconsistencies in macros By convention, all lines should be separated by a semicolons. Last line should have neither semicolon or line wrap. No generated code change. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/exception-64s.h | 36 ++++++++--------- arch/powerpc/include/asm/head-64.h | 68 ++++++++++++++++---------------- 2 files changed, 52 insertions(+), 52 deletions(-) commit 452d23c0f6bd97f2fd8a9691fee79b76040a0feb Author: Christoph Hellwig Date: Tue Jun 25 16:52:39 2019 +0200 powerpc/powernv: remove the unused vas_win_paste_addr and vas_win_id functions These two function have never been used anywhere in the kernel tree since they were added to the kernel. Signed-off-by: Christoph Hellwig Signed-off-by: Michael Ellerman arch/powerpc/include/asm/vas.h | 10 ---------- arch/powerpc/platforms/powernv/vas-window.c | 19 ------------------- arch/powerpc/platforms/powernv/vas.h | 20 -------------------- 3 files changed, 49 deletions(-) commit 7eb3cf761927b2687164e182efa675e6c09cfe44 Author: Christoph Hellwig Date: Tue Jun 25 16:52:38 2019 +0200 powerpc/powernv: remove unused NPU DMA code None of these routines were ever used anywhere in the kernel tree since they were added to the kernel. Signed-off-by: Christoph Hellwig Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/mmu.h | 2 - arch/powerpc/include/asm/powernv.h | 22 -- arch/powerpc/mm/book3s64/mmu_context.c | 1 - arch/powerpc/platforms/powernv/npu-dma.c | 556 ------------------------------- 4 files changed, 581 deletions(-) commit c498a4f9a79187029ed748ca0a7cacc35b74d28d Author: Christoph Hellwig Date: Tue Jun 25 16:52:37 2019 +0200 powerpc/powernv: remove the unused tunneling exports These have been unused anywhere in the kernel tree ever since they've been added to the kernel. Signed-off-by: Christoph Hellwig Signed-off-by: Michael Ellerman arch/powerpc/include/asm/pnv-pci.h | 4 -- arch/powerpc/platforms/powernv/pci-ioda.c | 4 +- arch/powerpc/platforms/powernv/pci.c | 71 ------------------------------- arch/powerpc/platforms/powernv/pci.h | 1 - 4 files changed, 3 insertions(+), 77 deletions(-) commit 63982618662e2a05e5c5c3e4247456d1d3467f32 Author: Christoph Hellwig Date: Tue Jun 25 16:52:36 2019 +0200 powerpc/powernv: remove the unused pnv_pci_set_p2p function This function has never been used anywhere in the kernel tree since it was added to the tree. We also now have proper PCIe P2P APIs in the core kernel, and any new P2P support should be using those. Signed-off-by: Christoph Hellwig Signed-off-by: Michael Ellerman arch/powerpc/include/asm/opal.h | 2 - arch/powerpc/include/asm/pnv-pci.h | 2 - arch/powerpc/platforms/powernv/opal-call.c | 1 - arch/powerpc/platforms/powernv/pci.c | 74 ------------------------------ arch/powerpc/platforms/powernv/pci.h | 5 -- 5 files changed, 84 deletions(-) commit aaf06665f7ea3ee9f9754e16c1a507a89f1de5b1 Author: Naveen N. Rao Date: Thu Jun 27 15:29:40 2019 +0530 powerpc/xmon: Fix disabling tracing while in xmon Commit ed49f7fd6438d ("powerpc/xmon: Disable tracing when entering xmon") added code to disable recording trace entries while in xmon. The commit introduced a variable 'tracing_enabled' to record if tracing was enabled on xmon entry, and used this to conditionally enable tracing during exit from xmon. However, we are not checking the value of 'fromipi' variable in xmon_core() when setting 'tracing_enabled'. Due to this, when secondary cpus enter xmon, they will see tracing as being disabled already and tracing won't be re-enabled on exit. Fix the same. Fixes: ed49f7fd6438d ("powerpc/xmon: Disable tracing when entering xmon") Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/xmon/xmon.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 6820e565d35084bb9d3a167e990fcb780ccd716f Author: Denis Efremov Date: Sun Jun 23 18:52:00 2019 +0300 selftests/powerpc: ppc_asm.h: typo in the header guard The guard macro __PPC_ASM_H in the header ppc_asm.h doesn't match the #ifndef macro _PPC_ASM_H. The patch makes them the same. Signed-off-by: Denis Efremov Signed-off-by: Michael Ellerman tools/testing/selftests/powerpc/stringloops/asm/ppc_asm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 04db3ede40ae4fc23a5c4237254c4a53bbe4c1f2 Author: Qian Cai Date: Thu Jun 6 09:58:13 2019 -0400 powerpc/cacheflush: fix variable set but not used The powerpc's flush_cache_vmap() is defined as a macro and never use both of its arguments, so it will generate a compilation warning, lib/ioremap.c: In function 'ioremap_page_range': lib/ioremap.c:203:16: warning: variable 'start' set but not used [-Wunused-but-set-variable] Fix it by making it an inline function. Signed-off-by: Qian Cai Signed-off-by: Michael Ellerman arch/powerpc/include/asm/cacheflush.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 3becd11dffe5d4a7467ebd841172f3e091fbcbd0 Author: Qian Cai Date: Wed Jun 5 16:46:19 2019 -0400 powerpc/eeh_cache: fix a W=1 kernel-doc warning The opening comment mark "/**" is reserved for kernel-doc comments, so it will generate a warning with "make W=1". arch/powerpc/kernel/eeh_cache.c:37: warning: cannot understand function prototype: 'struct pci_io_addr_range Since this is not a kernel-doc for the struct below, but rather an overview of this source eeh_cache.c, just use the free-form comments kernel-doc syntax instead. Signed-off-by: Qian Cai Acked-by: Russell Currey Signed-off-by: Michael Ellerman arch/powerpc/kernel/eeh_cache.c | 3 +++ 1 file changed, 3 insertions(+) commit f079bb3c5f2978b2c1a13098ab2a8c32e5d1ee3d Author: Christophe Leroy Date: Tue May 7 13:31:38 2019 +0000 powerpc/ftrace: Enable C Version of recordmcount Selects HAVE_C_RECORDMCOUNT to use the C version of the recordmcount intead of the old Perl Version of recordmcount. This should improve build time. It also seems like the old Perl Version misses some calls to _mcount that the C version finds. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman arch/powerpc/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 80e5302e4bc85a6b685b7668c36c6487b5f90e9a Author: Naveen N. Rao Date: Thu Jun 27 00:08:01 2019 +0530 recordmcount: Fix spurious mcount entries on powerpc An impending change to enable HAVE_C_RECORDMCOUNT on powerpc leads to warnings such as the following: # modprobe kprobe_example ftrace-powerpc: Not expected bl: opcode is 3c4c0001 WARNING: CPU: 0 PID: 227 at kernel/trace/ftrace.c:2001 ftrace_bug+0x90/0x318 Modules linked in: CPU: 0 PID: 227 Comm: modprobe Not tainted 5.2.0-rc6-00678-g1c329100b942 #2 NIP: c000000000264318 LR: c00000000025d694 CTR: c000000000f5cd30 REGS: c000000001f2b7b0 TRAP: 0700 Not tainted (5.2.0-rc6-00678-g1c329100b942) MSR: 900000010282b033 CR: 28228222 XER: 00000000 CFAR: c0000000002642fc IRQMASK: 0 NIP [c000000000264318] ftrace_bug+0x90/0x318 LR [c00000000025d694] ftrace_process_locs+0x4f4/0x5e0 Call Trace: [c000000001f2ba40] [0000000000000004] 0x4 (unreliable) [c000000001f2bad0] [c00000000025d694] ftrace_process_locs+0x4f4/0x5e0 [c000000001f2bb90] [c00000000020ff10] load_module+0x25b0/0x30c0 [c000000001f2bd00] [c000000000210cb0] sys_finit_module+0xc0/0x130 [c000000001f2be20] [c00000000000bda4] system_call+0x5c/0x70 Instruction dump: 419e0018 2f83ffff 419e00bc 2f83ffea 409e00cc 4800001c 0fe00000 3c62ff96 39000001 39400000 386386d0 480000c4 <0fe00000> 3ce20003 39000001 3c62ff96 ---[ end trace 4c438d5cebf78381 ]--- ftrace failed to modify [] 0xc0080000012a0008 actual: 01:00:4c:3c Initializing ftrace call sites ftrace record flags: 2000000 (0) expected tramp: c00000000006af4c Looking at the relocation records in __mcount_loc shows a few spurious entries: RELOCATION RECORDS FOR [__mcount_loc]: OFFSET TYPE VALUE 0000000000000000 R_PPC64_ADDR64 .text.unlikely+0x0000000000000008 0000000000000008 R_PPC64_ADDR64 .text.unlikely+0x0000000000000014 0000000000000010 R_PPC64_ADDR64 .text.unlikely+0x0000000000000060 0000000000000018 R_PPC64_ADDR64 .text.unlikely+0x00000000000000b4 0000000000000020 R_PPC64_ADDR64 .init.text+0x0000000000000008 0000000000000028 R_PPC64_ADDR64 .init.text+0x0000000000000014 The first entry in each section is incorrect. Looking at the relocation records, the spurious entries correspond to the R_PPC64_ENTRY records: RELOCATION RECORDS FOR [.text.unlikely]: OFFSET TYPE VALUE 0000000000000000 R_PPC64_REL64 .TOC.-0x0000000000000008 0000000000000008 R_PPC64_ENTRY *ABS* 0000000000000014 R_PPC64_REL24 _mcount The problem is that we are not validating the return value from get_mcountsym() in sift_rel_mcount(). With this entry, mcountsym is 0, but Elf_r_sym(relp) also ends up being 0. Fix this by ensuring mcountsym is valid before processing the entry. Signed-off-by: Naveen N. Rao Acked-by: Steven Rostedt (VMware) Tested-by: Satheesh Rajendran Signed-off-by: Michael Ellerman scripts/recordmcount.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9fb603050ffd94f8127df99c699cca2f575eb6a0 Author: Nathan Lynch Date: Fri Jun 21 01:05:18 2019 -0500 powerpc/rtas: retry when cpu offline races with suspend/migration The protocol for suspending or migrating an LPAR requires all present processor threads to enter H_JOIN. So if we have threads offline, we have to temporarily bring them up. This can race with administrator actions such as SMT state changes. As of dfd718a2ed1f ("powerpc/rtas: Fix a potential race between CPU-Offline & Migration"), rtas_ibm_suspend_me() accounts for this, but errors out with -EBUSY for what almost certainly is a transient condition in any reasonable scenario. Callers of rtas_ibm_suspend_me() already retry when -EAGAIN is returned, and it is typical during a migration for that to happen repeatedly for several minutes polling the H_VASI_STATE hcall result before proceeding to the next stage. So return -EAGAIN instead of -EBUSY when this race is encountered. Additionally: logging this event is still appropriate but use pr_info instead of pr_err; and remove use of unlikely() while here as this is not a hot path at all. Fixes: dfd718a2ed1f ("powerpc/rtas: Fix a potential race between CPU-Offline & Migration") Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman arch/powerpc/kernel/rtas.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 2aeac95d1a4cc85aae57ab842d5c3340df0f817f Author: Srinivas Kandagatla Date: Tue Jun 11 11:40:41 2019 +0100 soundwire: add module_sdw_driver helper macro This Helper macro is for SoundWire drivers which do not do anything special in module init/exit. This eliminates a lot of boilerplate. Each module may only use this macro once, and calling it replaces module_init() and module_exit() Signed-off-by: Srinivas Kandagatla Signed-off-by: Vinod Koul include/linux/soundwire/sdw_type.h | 11 +++++++++++ 1 file changed, 11 insertions(+) commit c7b37c769d2a5e711106a3c793140a4f46768e04 Author: Florian Westphal Date: Mon Jun 24 22:04:48 2019 +0200 xfrm: remove get_mtu indirection from xfrm_type esp4_get_mtu and esp6_get_mtu are exactly the same, the only difference is a single sizeof() (ipv4 vs. ipv6 header). Merge both into xfrm_state_mtu() and remove the indirection. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert include/net/xfrm.h | 4 +--- net/ipv4/esp4.c | 27 +-------------------------- net/ipv6/esp6.c | 20 +------------------- net/xfrm/xfrm_device.c | 5 ++--- net/xfrm/xfrm_state.c | 34 +++++++++++++++++++++++++++++----- 5 files changed, 34 insertions(+), 56 deletions(-) commit ba45cff610a4223ce3ad98a700a820e3d60e3f7c Author: Michael Neuling Date: Mon May 13 15:39:10 2019 +1000 powerpc: Document xive=off option commit 243e25112d06 ("powerpc/xive: Native exploitation of the XIVE interrupt controller") added an option to turn off Linux native XIVE usage via the xive=off kernel command line option. This documents this option. Signed-off-by: Michael Neuling Reviewed-by: Cédric Le Goater Acked-by: Stewart Smith Signed-off-by: Michael Ellerman Documentation/admin-guide/kernel-parameters.txt | 9 +++++++++ 1 file changed, 9 insertions(+) commit 8b8dc695143642c6a8bee2242f2f7af4232298ab Merge: 3c25ab35fbc8 b7cbb5240130 Author: Michael Ellerman Date: Mon Jul 1 14:04:39 2019 +1000 Merge branch 'fixes' into next Merge our fixes branch into next, this brings in a number of commits that fix bugs we don't want to hit in next, in particular the fix for CVE-2019-12817. commit b7cbb5240130520ba572ab1146431ad01d1f5099 Merge: e13e7cd4c0c1 65565a68c582 Author: Michael Ellerman Date: Mon Jul 1 13:59:40 2019 +1000 Merge tag 'powerpc-5.2-6' into fixes This merges the commits that were the fix for CVE-2019-12817, which was developed under embargo. They have already been merged by Linus Merge them into fixes now so that this branch contains all the fixes for this release. commit 0e3183cd2a64843a95b62f8bd4a83605a4cf0615 Author: John Hurley Date: Thu Jun 27 14:37:30 2019 +0100 net: openvswitch: fix csum updates for MPLS actions Skbs may have their checksum value populated by HW. If this is a checksum calculated over the entire packet then the CHECKSUM_COMPLETE field is marked. Changes to the data pointer on the skb throughout the network stack still try to maintain this complete csum value if it is required through functions such as skb_postpush_rcsum. The MPLS actions in Open vSwitch modify a CHECKSUM_COMPLETE value when changes are made to packet data without a push or a pull. This occurs when the ethertype of the MAC header is changed or when MPLS lse fields are modified. The modification is carried out using the csum_partial function to get the csum of a buffer and add it into the larger checksum. The buffer is an inversion of the data to be removed followed by the new data. Because the csum is calculated over 16 bits and these values align with 16 bits, the effect is the removal of the old value from the CHECKSUM_COMPLETE and addition of the new value. However, the csum fed into the function and the outcome of the calculation are also inverted. This would only make sense if it was the new value rather than the old that was inverted in the input buffer. Fix the issue by removing the bit inverts in the csum_partial calculation. The bug was verified and the fix tested by comparing the folded value of the updated CHECKSUM_COMPLETE value with the folded value of a full software checksum calculation (reset skb->csum to 0 and run skb_checksum_complete(skb)). Prior to the fix the outcomes differed but after they produce the same result. Fixes: 25cd9ba0abc0 ("openvswitch: Add basic MPLS support to kernel") Fixes: bc7cc5999fd3 ("openvswitch: update checksum in {push,pop}_mpls") Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski Reviewed-by: Simon Horman Acked-by: Pravin B Shelar Signed-off-by: David S. Miller net/openvswitch/actions.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 954a5a029472568845a25cd1c59e02e09db3316c Merge: 11697cfc7108 f6dc1264f1c0 Author: David S. Miller Date: Sun Jun 30 18:41:13 2019 -0700 Merge tag 'mlx5e-updates-2019-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5e-updates-2019-06-28 This series adds some misc updates for mlx5e driver 1) Allow adding the same mac more than once in MPFS table 2) Move to HW checksumming advertising 3) Report netdevice MPLS features 4) Correct physical port name of the PF representor 5) Reduce stack usage in mlx5_eswitch_termtbl_create 6) Refresh TIR improvement for representors 7) Expose same physical switch_id for all representors ==================== Signed-off-by: David S. Miller commit 6f9ac9f4427ec0470ccffbf852cfaf326677cc21 Author: Masahiro Yamada Date: Tue Jun 25 15:54:19 2019 +0900 fixdep: check return value of printf() and putchar() When there is not enough space on your storage device, the build will fail with 'No space left on device' error message. The reason is obvious from the message, so you will free up some disk space, then you will resume the build. However, sometimes you may still see a mysterious error message: unterminated call to function 'wildcard': missing ')'. If you run out of the disk space, fixdep may end up with generating incomplete .*.cmd files. For example, if the disk-full error occurs while fixdep is running print_dep(), the .*.cmd might be truncated like this: $(wildcard include/config/ When you run 'make' next time, this broken .*.cmd will be included, then Make will terminate parsing since it is a wrong syntax. Once this happens, you need to run 'make clean' or delete the broken .*.cmd file manually. Even if you do not see any error message, the .*.cmd files after any error could be potentially incomplete, and unreliable. You may miss the re-compilation due to missing header dependency. If printf() cannot output the string for disk shortage or whatever reason, it returns a negative value, but currently fixdep does not check it at all. Consequently, fixdep *successfully* generates a broken .*.cmd file. Make never notices that since fixdep exits with 0, which means success. Given the intended usage of fixdep, it must respect the return value of not only malloc(), but also printf() and putchar(). This seems a long-standing issue since the introduction of fixdep. In old days, Kbuild tried to provide an extra safety by letting fixdep output to a temporary file and renaming it after everything is done: scripts/basic/fixdep $(depfile) $@ '$(make-cmd)' > $(dot-target).tmp;\ rm -f $(depfile); \ mv -f $(dot-target).tmp $(dot-target).cmd) It was no help to avoid the current issue; fixdep successfully created a truncated tmp file, which would be renamed to a .*.cmd file. This problem should be fixed by propagating the error status to the build system because: [1] Since commit 9c2af1c7377a ("kbuild: add .DELETE_ON_ERROR special target"), Make will delete the target automatically on any failure in the recipe. [2] Since commit 392885ee82d3 ("kbuild: let fixdep directly write to .*.cmd files"), .*.cmd file is included only when the corresponding target already exists. Signed-off-by: Masahiro Yamada scripts/basic/fixdep.c | 51 ++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 41 insertions(+), 10 deletions(-) commit 68980b4704d5d8c8cf2661f9d65a1a20ee455c1b Author: Masahiro Yamada Date: Mon Jun 24 01:13:28 2019 +0900 kbuild: split modules.order build rule out of 'modules' target modules.order is a real target. Split its build rule out like modules.builtin Signed-off-by: Masahiro Yamada Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 50ef0cdf58aea2f03f3d21390d68561ee7be215e Author: Masahiro Yamada Date: Mon Jun 24 01:13:27 2019 +0900 kbuild: fix missed rebuild of modules.builtin Unlike modules.order, modules.builtin is not rebuilt every time. Once modules.builtin is created, it will not be updated until auto.conf or tristate.conf is changed. So, it does not notice a change in Makefile, for example, the rename of modules. Kbuild must always descend into directories for modules.builtin too. Signed-off-by: Masahiro Yamada Makefile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit c2341e2a4f58d8e27d89c5edfefdaa52547f792d Author: Masahiro Yamada Date: Sun Jun 23 01:07:05 2019 +0900 kbuild: save $(strip ...) for calling if_changed and friends The string returned by $(filter-out ...) does not contain any leading or trailing spaces. With the previous commit, 'any-prereq' no longer contains any excessive spaces. Nor does 'cmd-check' since it expands to a $(filter-out ...) call. So, only the space that matters is the one between 'any-prereq' and 'cmd-check'. By removing it from the code, we can save $(strip ...) evaluation. This refactoring is possible because $(any-prereq)$(cmd-check) is only passed to the first argument of $(if ...), so we are only interested in whether or not it is empty. Signed-off-by: Masahiro Yamada scripts/Kbuild.include | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 93f31bbda43603da1e8af06667b45b410c6c897a Author: Masahiro Yamada Date: Sun Jun 23 01:07:04 2019 +0900 kbuild: save $(strip ...) for calling any-prepreq The string returned by $(filter-out ...) does not contain any leading or trailing spaces. So, only the space that matters is the one between $(filter-out $(PHONY),$?) and $(filter-out $(PHONY) $(wildcard $^),$^) By removing it from the code, we can save $(strip ...) evaluation. This refactoring is possible because $(any-prereq) is only passed to the first argument of $(if ...), so we are only interested in whether or not it is empty. This is also the prerequisite for the next commit. Signed-off-by: Masahiro Yamada scripts/Kbuild.include | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 50bcca6ac417bfd18fa84d45eeaa4a30155fe3c8 Author: Masahiro Yamada Date: Sun Jun 23 01:07:03 2019 +0900 kbuild: rename arg-check to cmd-check I prefer 'cmd-check' for consistency. We have 'echo-cmd', 'cmd', 'cmd_and_fixdep', etc. in this file. Signed-off-by: Masahiro Yamada scripts/Kbuild.include | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit ac499fba98c3c65078fd84fa0a62cd6f6d5837ed Author: Mauro Carvalho Chehab Date: Sat Jun 29 07:36:46 2019 -0300 docs: ipmb: place it at driver-api and convert to ReST No new doc should be added at the main Documentation/ directory. Instead, new docs should be added as ReST files, within the Kernel documentation body. Fixes: 51bd6f291583 ("Add support for IPMB driver") Signed-off-by: Mauro Carvalho Chehab Message-Id: Signed-off-by: Corey Minyard Documentation/driver-api/index.rst | 1 + Documentation/{IPMB.txt => driver-api/ipmb.rst} | 62 +++++++++++++------------ 2 files changed, 33 insertions(+), 30 deletions(-) commit 11697cfc7108dc0e8b677c2fc391289bfbc080ee Merge: f072218cca5b def4ec6dce39 Author: David S. Miller Date: Sun Jun 30 16:03:35 2019 -0700 Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2019-06-28 This series contains a smorgasbord of updates to many of the Intel drivers. Gustavo A. R. Silva updates the ice and iavf drivers to use the strcut_size() helper where possible. Miguel increases the pause and refresh time for flow control in the e1000e driver during reset for certain devices. Dann Frazier fixes a potential NULL pointer dereference in ixgbe driver when using non-IPSec enabled devices. Colin Ian King fixes a potential overflow during a shift in the ixgbe driver. Also fixes a potential NULL pointer dereference in the iavf driver by adding a check. Venkatesh Srinivas converts the e1000 driver to use dma_wmb() instead of wmb() for doorbell writes to avoid SFENCEs in the transmit and receive paths. Arjan updates the e1000e driver to improve boot time by over 100 msec by reducing the usleep ranges suring system startup. Artem updates the igb driver register dump in ethtool, first prepares the register dump for future additions of registers in the dump, then secondly, adds the RR2DCDELAY register to the dump. When dealing with time-sensitive networks, this register is helpful in determining your latency from the device to the ring. Alex fixes the ixgbevf driver to use the current cached link state, rather than trying to re-check the value from the PF. Harshitha adds support for MACVLAN offloads in i40e by using channels as MACVLAN interfaces. Detlev Casanova updates the e1000e driver to use delayed work instead of timers to run the watchdog. Vitaly fixes an issue in e1000e, where when disconnecting and reconnecting the physical cable connection, the NIC enters a DMoff state. This state causes a mismatch in link and duplexing, so check the PCIm function state and perform a PHY reset when in this state to resolve the issue. ==================== Signed-off-by: David S. Miller commit 22506f488e6b7adf14b008ed241c69e3918886e6 Merge: 7b75e49de424 4ca5fa39e1ae Author: David S. Miller Date: Sun Jun 30 16:00:26 2019 -0700 Merge branch 'bnxt_en-Bug-fixes' Michael Chan says: ==================== bnxt_en: Bug fixes. Miscellaneous bug fix patches, including two resource handling fixes for the RDMA driver, a PCI shutdown patch to add pci_disable_device(), a patch to fix ethtool selftest crash, and the last one suppresses an unnecessry error message. Please also queue patches 1, 2, and 3 for -stable. Thanks. ==================== Signed-off-by: David S. Miller commit 4ca5fa39e1aea2f85eb9c4257075c4077c6531da Author: Michael Chan Date: Sat Jun 29 11:16:48 2019 -0400 bnxt_en: Suppress error messages when querying DSCP DCB capabilities. Some firmware versions do not support this so use the silent variant to send the message to firmware to suppress the harmless error. This error message is unnecessarily alarming the user. Fixes: afdc8a84844a ("bnxt_en: Add DCBNL DSCP application protocol support.") Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1dbc59fa4bbaa108b641cd65a54f662b75e4ed36 Author: Michael Chan Date: Sat Jun 29 11:16:47 2019 -0400 bnxt_en: Cap the returned MSIX vectors to the RDMA driver. In an earlier commit to improve NQ reservations on 57500 chips, we set the resv_irqs on the 57500 VFs to the fixed value assigned by the PF regardless of how many are actually used. The current code assumes that resv_irqs minus the ones used by the network driver must be the ones for the RDMA driver. This is no longer true and we may return more MSIX vectors than requested, causing inconsistency. Fix it by capping the value. Fixes: 01989c6b69d9 ("bnxt_en: Improve NQ reservations.") Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d77b1ad8e87dc5a6cd0d9158b097a4817946ca3b Author: Michael Chan Date: Sat Jun 29 11:16:46 2019 -0400 bnxt_en: Fix statistics context reservation logic for RDMA driver. The current logic assumes that the RDMA driver uses one statistics context adjacent to the ones used by the network driver. This assumption is not true and the statistics context used by the RDMA driver is tied to its MSIX base vector. This wrong assumption can cause RDMA driver failure after changing ethtool rings on the network side. Fix the statistics reservation logic accordingly. Fixes: 780baad44f0f ("bnxt_en: Reserve 1 stat_ctx for RDMA driver.") Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit d27e2ca1166aefd54d9c48fb6647dee8115a5dfc Author: Michael Chan Date: Sat Jun 29 11:16:45 2019 -0400 bnxt_en: Fix ethtool selftest crash under error conditions. After ethtool loopback packet tests, we re-open the nic for the next IRQ test. If the open fails, we must not proceed with the IRQ test or we will crash with NULL pointer dereference. Fix it by checking the bnxt_open_nic() return code before proceeding. Reported-by: Somasundaram Krishnasamy Fixes: 67fea463fd87 ("bnxt_en: Add interrupt test to ethtool -t selftest.") Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c20dc142dd7b2884b8570eeab323bcd4a84294fa Author: Michael Chan Date: Sat Jun 29 11:16:44 2019 -0400 bnxt_en: Disable bus master during PCI shutdown and driver unload. Some chips with older firmware can continue to perform DMA read from context memory even after the memory has been freed. In the PCI shutdown method, we need to call pci_disable_device() to shutdown DMA to prevent this DMA before we put the device into D3hot. DMA memory request in D3hot state will generate PCI fatal error. Similarly, in the driver remove method, the context memory should only be freed after DMA has been shutdown for correctness. Fixes: 98f04cf0f1fc ("bnxt_en: Check context memory requirements from firmware.") Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 650b29dbdf2caf7db27cdc8bfa8fc009b28a6ce3 Author: Thiago Jung Bauermann Date: Tue Jun 11 03:28:08 2019 -0300 integrity: Introduce struct evm_xattr Even though struct evm_ima_xattr_data includes a fixed-size array to hold a SHA1 digest, most of the code ignores the array and uses the struct to mean "type indicator followed by data of unspecified size" and tracks the real size of what the struct represents in a separate length variable. The only exception to that is the EVM code, which correctly uses the definition of struct evm_ima_xattr_data. So make this explicit in the code by removing the length specification from the array in struct evm_ima_xattr_data. Also, change the name of the element from digest to data since in most places the array doesn't hold a digest. A separate struct evm_xattr is introduced, with the original definition of evm_ima_xattr_data to be used in the places that actually expect that definition, specifically the EVM HMAC code. Signed-off-by: Thiago Jung Bauermann Signed-off-by: Mimi Zohar security/integrity/evm/evm_main.c | 8 ++++---- security/integrity/ima/ima_appraise.c | 7 ++++--- security/integrity/integrity.h | 6 ++++++ 3 files changed, 14 insertions(+), 7 deletions(-) commit 337619eb44ef663d329c5c19efd18488ce7de492 Author: Thiago Jung Bauermann Date: Thu Jun 27 20:25:46 2019 -0300 ima: Update MAX_TEMPLATE_NAME_LEN to fit largest reasonable definition MAX_TEMPLATE_NAME_LEN is used when restoring measurements carried over from a kexec. It should be set to the length of a template containing all fields except for 'd' and 'n', which don't need to be accounted for since they shouldn't be defined in the same template description as 'd-ng' and 'n-ng'. That length is greater than the current 15, so update using a sizeof() to show where the number comes from and also can be visually shown to be correct. The sizeof() is calculated at compile time. Signed-off-by: Thiago Jung Bauermann Signed-off-by: Mimi Zohar security/integrity/ima/ima_template.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 6a31fcd4cff84490bf5ac11dbeedfdca5b38b39a Author: Prakhar Srivastava Date: Sun Jun 23 23:23:31 2019 -0700 KEXEC: Call ima_kexec_cmdline to measure the boot command line args During soft reboot(kexec_file_load) boot command line arguments are not measured. Call ima hook ima_kexec_cmdline to measure the boot command line arguments into IMA measurement list. - call ima_kexec_cmdline from kexec_file_load. - move the call ima_add_kexec_buffer after the cmdline args have been measured. Signed-off-by: Prakhar Srivastava Reviewed-by: James Morris Acked-by: Dave Young Signed-off-by: Mimi Zohar kernel/kexec_file.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 86b4da8c0e7fcb6c217c604efcd9438ad55dd055 Author: Prakhar Srivastava Date: Sun Jun 23 23:23:30 2019 -0700 IMA: Define a new template field buf A buffer(kexec boot command line arguments) measured into IMA measuremnt list cannot be appraised, without already being aware of the buffer contents. Since hashes are non-reversible, raw buffer is needed for validation or regenerating hash for appraisal/attestation. Add support to store/read the buffer contents in HEX. The kexec cmdline hash is stored in the "d-ng" field of the template data. It can be verified using sudo cat /sys/kernel/security/integrity/ima/ascii_runtime_measurements | grep kexec-cmdline | cut -d' ' -f 6 | xxd -r -p | sha256sum - Add two new fields to ima_event_data to hold the buf and buf_len - Add a new template field 'buf' to be used to store/read the buffer data. - Updated process_buffer_meaurement to add the buffer to ima_event_data. process_buffer_measurement added in "Define a new IMA hook to measure the boot command line arguments" - Add a new template policy name ima-buf to represent 'd-ng|n-ng|buf' Signed-off-by: Prakhar Srivastava Reviewed-by: Roberto Sassu Reviewed-by: James Morris Signed-off-by: Mimi Zohar Documentation/security/IMA-templates.rst | 7 ++++--- security/integrity/ima/ima.h | 2 ++ security/integrity/ima/ima_main.c | 4 +++- security/integrity/ima/ima_template.c | 3 +++ security/integrity/ima/ima_template_lib.c | 21 +++++++++++++++++++++ security/integrity/ima/ima_template_lib.h | 4 ++++ 6 files changed, 37 insertions(+), 4 deletions(-) commit 7282a93f4df586cac84a81c37f38cccec2e1d8bb Author: Stephen Kitt Date: Fri Jun 28 20:38:41 2019 +0200 Disable Sphinx SmartyPants in HTML output The handling of dashes in particular results in confusing documentation in a number of instances, since "--" becomes an en-dash. This disables SmartyPants wholesale, losing smart quotes along with smart dashes. With Sphinx 1.6 we could fine-tune the conversion, using the new smartquotes and smartquotes_action settings. Signed-off-by: Stephen Kitt Signed-off-by: Jonathan Corbet Documentation/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 73d30d48749f883fbaaf68ef5d774e99ffafda5d Author: Christoph Hellwig Date: Fri Jun 28 19:31:38 2019 -0700 xfs: remove XFS_TRANS_NOFS Instead of a magic flag for xfs_trans_alloc, just ensure all callers that can't relclaim through the file system use memalloc_nofs_save to set the per-task nofs flag. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_shared.h | 1 - fs/xfs/xfs_aops.c | 35 ++++++++++++++++++++++------------- fs/xfs/xfs_file.c | 18 +++++++++++++++--- fs/xfs/xfs_iomap.c | 2 +- fs/xfs/xfs_reflink.c | 4 ++-- fs/xfs/xfs_trans.c | 4 +--- 6 files changed, 41 insertions(+), 23 deletions(-) commit fe64e0d26b1c8096073661851edc99d6370f5e96 Author: Christoph Hellwig Date: Fri Jun 28 19:31:37 2019 -0700 xfs: simplify xfs_ioend_can_merge Compare the block layer status directly instead of converting it to an errno first. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_aops.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit 7dbae9fbde8a2d3accf4b89502d5557bf3905e73 Author: Christoph Hellwig Date: Fri Jun 28 19:31:37 2019 -0700 xfs: allow merging ioends over append boundaries There is no real problem merging ioends that go beyond i_size into an ioend that doesn't. We just need to move the append transaction to the base ioend. Also use the opportunity to use a real error code instead of the magic 1 to cancel the transactions, and write a comment explaining the scheme. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_aops.c | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) commit 0290d9c1e56fc9964c6a0fa42cce251aecee606a Author: Christoph Hellwig Date: Fri Jun 28 19:31:36 2019 -0700 xfs: fix a comment typo in xfs_submit_ioend The fail argument is long gone, update the comment. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_aops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1fdafce55c2c588205879bfd78e725728cb5c4cd Author: Christoph Hellwig Date: Fri Jun 28 19:31:36 2019 -0700 xfs: remove the unused xfs_count_page_state declaration Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_aops.h | 1 - 1 file changed, 1 deletion(-) commit 28ad4b4e3496871ade868c3d0ecf5c53e4a49041 Merge: 471a739a47aa b51033e06c2e Author: Rafael J. Wysocki Date: Sun Jun 30 13:41:52 2019 +0200 Merge back PCI power management material for v5.3. commit 1375da478712369d1af8586768cf476e4f42f0ce Merge: 9829a0bd664d 940225628652 Author: Kalle Valo Date: Sun Jun 30 12:31:11 2019 +0300 Merge tag 'iwlwifi-next-for-kalle-2019-06-29' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next Patches intended for v5.3 * Work on the new debugging framework continues; * Update the FW API for CSI; * Special SAR implementation for South Korea; * Fixes in the module init error paths; * Debugging infra work continues; * A bunch of RF-kill fixes by Emmanuel; * A fix for AP mode, also related to RF-kill, by Johannes. * A few clean-ups; * Other small fixes and improvements; commit 9829a0bd664da613c6b44b210d8f0ab8dba2400b Merge: b741422218ef 676fabd1d2f0 Author: Kalle Valo Date: Sun Jun 30 12:29:30 2019 +0300 Merge tag 'mt76-for-kvalo-2019-06-27' of https://github.com/nbd168/wireless mt76 patches for 5.3 * use NAPI polling for tx cleanup on mt7603/mt7615 * various fixes for mt7615 * unify some code between mt7603 and mt7615 * fix locking issues on mt76x02 * add support for toggling edcca on mt7603 * fix reading target tx power with ext PA on mt7603/mt7615 * fix initalizing channel maximum power * fix rate control / tx status reporting issues on mt76x02/mt7603 * add support for eeprom calibration data from mtd on mt7615 * support configuring tx power on mt7615 * fix external PA support on mt76x0 * per-chain signal reporting on mt7615 * rx/tx buffer fixes for USB devices commit 8d3c60c7688ec17c084417b7f6ac57a1d5f154e1 Author: Alexander Tsoy Date: Sun Jun 30 00:32:00 2019 -0700 Input: joydev - extend absolute mouse detection Extend event signature matching to catch more input devices emulated by BMC firmwares, QEMU and VMware. Signed-off-by: Alexander Tsoy Signed-off-by: Dmitry Torokhov drivers/input/joydev.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) commit d69f62bed792fc0564198f2406151b0ea008b299 Author: Jeffrey Hugo Date: Sun Jun 30 00:16:41 2019 -0700 HID: quirks: Refactor ELAN 400 and 401 handling There needs to be coordination between hid-quirks and the elan_i2c driver about which devices are handled by what drivers. Currently, both use whitelists, which results in valid devices being unhandled by default, when they should not be rejected by hid-quirks. This is quickly becoming an issue. Since elan_i2c has a maintained whitelist of what devices it will handle, which is now in a header file that hid-quirks can access, use that to implement a blacklist in hid-quirks so that only the devices that need to be handled by elan_i2c get rejected by hid-quirks, and everything else is handled by default. Suggested-by: Benjamin Tissoires Signed-off-by: Jeffrey Hugo Acked-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov drivers/hid/hid-quirks.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 0828c1001399d5c5fcab547ef7b0a29c78d4bdf6 Author: Jeffrey Hugo Date: Sun Jun 30 00:14:52 2019 -0700 Input: elan_i2c - export the device id whitelist Elan_i2c and hid-quirks work in conjunction to decide which devices each driver will handle. Elan_i2c has a whitelist of devices that should be consumed by hid-quirks so that there is one master list of devices to handoff between the drivers. Put the ids in a header file so that hid-quirks can consume it instead of duplicating the list. Signed-off-by: Jeffrey Hugo Acked-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov drivers/input/mouse/elan_i2c_core.c | 50 +----------------------- include/linux/input/elan-i2c-ids.h | 76 +++++++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+), 49 deletions(-) commit 1b9c698c41c947f8adf2febcbc1df122cb3d09da Author: Dmitry Torokhov Date: Sat Jun 22 23:11:51 2019 -0700 Input: edt-ft5x06 - use get_unaligned_be16() Instead of doing conversion by hand, let's use the proper accessors. Reviewed-by: Andy Shevchenko Tested-by: Benoit Parrot Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/edt-ft5x06.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 90b9b0d5b39557f0453cc3bd3c39fd8a5a54b996 Merge: 002cdb95dc39 11518370b332 Author: Dmitry Torokhov Date: Sat Jun 29 23:33:37 2019 -0700 Merge branch 'iforce' into next Bring in improvements to driver for I-Force devices. commit 360aa640a59f269b784848c0b2d6d462952750d9 Author: Fabien Dessenne Date: Thu Mar 7 16:58:23 2019 +0100 hwspinlock: add the 'in_atomic' API Add the 'in_atomic' mode which can be called from an atomic context. This mode relies on the existing 'raw' mode (no lock, no preemption/irq disabling) with the difference that the timeout is not based on jiffies (jiffies won't increase when irq are disabled) but handled with busy-waiting udelay() calls. Signed-off-by: Fabien Dessenne Signed-off-by: Bjorn Andersson Documentation/hwspinlock.txt | 39 +++++++++++++++++++++++ drivers/hwspinlock/hwspinlock_core.c | 43 +++++++++++++++++-------- include/linux/hwspinlock.h | 61 ++++++++++++++++++++++++++++++++++-- 3 files changed, 127 insertions(+), 16 deletions(-) commit bce6f5221374ba451a337d0a3773e6eb99dad3e8 Author: Fabien Dessenne Date: Thu Mar 7 16:58:22 2019 +0100 hwspinlock: document the hwspinlock 'raw' API Document the hwspin_lock_timeout_raw(), hwspin_trylock_raw() and hwspin_unlock_raw() API. Signed-off-by: Fabien Dessenne Signed-off-by: Bjorn Andersson Documentation/hwspinlock.txt | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit 5cd69f13deef804d113d31c5c744396b1a1b8a9a Author: Fabien Dessenne Date: Thu Mar 7 16:42:16 2019 +0100 hwspinlock: stm32: implement the relax() ops Implement this optional ops, called by hwspinlock core while spinning on a lock, between two successive invocations of trylock(). Reviewed-by: Benjamin Gaignard Signed-off-by: Fabien Dessenne Signed-off-by: Bjorn Andersson drivers/hwspinlock/stm32_hwspinlock.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 13140de09cc2dd5e5166ad42292bb82af4e23cef Author: Fabien Dessenne Date: Tue May 14 10:26:58 2019 +0200 remoteproc: stm32: add an ST stm32_rproc driver This patch introduces a new remoteproc driver to control Cortex-M4 co-processor of the STM32 family. It provides with the following features: - start and stop - dedicated co-processor memory regions registration - coredump and recovery Signed-off-by: Fabien Dessenne Signed-off-by: Ludovic Barre Signed-off-by: Loic Pallardy Signed-off-by: Arnaud Pouliquen [bjorn: Fixup of dev_dbg types and cast of int to pointer in mbox send] Signed-off-by: Bjorn Andersson drivers/remoteproc/Kconfig | 15 + drivers/remoteproc/Makefile | 1 + drivers/remoteproc/stm32_rproc.c | 628 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 644 insertions(+) commit 6f576b439017aa6faa8b82e908212691c1817e6e Author: Fabien Dessenne Date: Tue May 14 10:26:57 2019 +0200 dt-bindings: remoteproc: add bindings for stm32 remote processor driver Add the device tree bindings document for the stm32 remoteproc devices. Reviewed-by: Rob Herring Signed-off-by: Fabien Dessenne Signed-off-by: Bjorn Andersson .../devicetree/bindings/remoteproc/stm32-rproc.txt | 63 ++++++++++++++++++++++ 1 file changed, 63 insertions(+) commit f83c0510de8eba0bd6f71b0d4897ab3c2e7a24c0 Author: Fabien Dessenne Date: Tue May 14 10:26:56 2019 +0200 dt-bindings: stm32: add bindings for ML-AHB interconnect Document the ML-AHB interconnect for stm32 SoCs. Reviewed-by: Rob Herring Signed-off-by: Fabien Dessenne Signed-off-by: Bjorn Andersson .../devicetree/bindings/arm/stm32/mlahb.txt | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit f072218cca5b076dd99f3dfa3aaafedfd0023a51 Author: Heiner Kallweit Date: Thu Jun 27 23:19:09 2019 +0200 r8169: remove not needed call to dma_sync_single_for_device DMA_API_HOWTO.txt includes an example explaining when dma_sync_single_for_device() is not needed, and that example matches our use case. The buffer isn't changed by the CPU and direction is DMA_FROM_DEVICE, so we can remove the call to dma_sync_single_for_device(). Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169_main.c | 1 - 1 file changed, 1 deletion(-) commit 3c18cbe33711d7f46aa3787c79ff809011f54b40 Author: Heiner Kallweit Date: Thu Jun 27 23:12:39 2019 +0200 r8169: consider that 32 Bit DMA is the default Documentation/DMA-API-HOWTO.txt states: By default, the kernel assumes that your device can address 32-bits of DMA addressing. For a 64-bit capable device, this needs to be increased, and for a device with limitations, it needs to be decreased. Therefore we don't need the 32 Bit DMA fallback configuration and can remove it. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169_main.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 759d095741721888b6ee51afa74e0a66ce65e974 Author: Heiner Kallweit Date: Thu Jun 27 23:06:33 2019 +0200 r8169: improve handling VLAN tag The VLAN tag is stored in the descriptor in network byte order. Using swab16 works on little endian host systems only. Better play safe and use ntohs or htons respectively. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 7b75e49de424ceb53d13e60f35d0a73765626fda Author: Baruch Siach Date: Thu Jun 27 21:17:39 2019 +0300 net: dsa: mv88e6xxx: wait after reset deactivation Add a 1ms delay after reset deactivation. Otherwise the chip returns bogus ID value. This is observed with 88E6390 (Peridot) chip. Signed-off-by: Baruch Siach Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 2 ++ 1 file changed, 2 insertions(+) commit 3c91f25c2f72ba6001775a5932857c1d2131c531 Author: Guilherme G. Piccoli Date: Thu Jun 27 13:31:33 2019 -0300 bnx2x: Prevent ptp_task to be rescheduled indefinitely Currently bnx2x ptp worker tries to read a register with timestamp information in case of TX packet timestamping and in case it fails, the routine reschedules itself indefinitely. This was reported as a kworker always at 100% of CPU usage, which was narrowed down to be bnx2x ptp_task. By following the ioctl handler, we could narrow down the problem to an NTP tool (chrony) requesting HW timestamping from bnx2x NIC with RX filter zeroed; this isn't reproducible for example with ptp4l (from linuxptp) since this tool requests a supported RX filter. It seems NIC FW timestamp mechanism cannot work well with RX_FILTER_NONE - driver's PTP filter init routine skips a register write to the adapter if there's not a supported filter request. This patch addresses the problem of bnx2x ptp thread's everlasting reschedule by retrying the register read 10 times; between the read attempts the thread sleeps for an increasing amount of time starting in 1ms to give FW some time to perform the timestamping. If it still fails after all retries, we bail out in order to prevent an unbound resource consumption from bnx2x. The patch also adds an ethtool statistic for accounting the skipped TX timestamp packets and it reduces the priority of timestamping error messages to prevent log flooding. The code was tested using both linuxptp and chrony. Reported-and-tested-by: Przemyslaw Hausman Suggested-by: Sudarsana Reddy Kalluru Signed-off-by: Guilherme G. Piccoli Acked-by: Sudarsana Reddy Kalluru Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 5 +++- .../net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c | 4 ++- drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 33 ++++++++++++++++------ drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.h | 3 ++ 4 files changed, 34 insertions(+), 11 deletions(-) commit 3099c59db0f2d6b85389af5ac652569bac3f1ee8 Author: Florian Westphal Date: Thu Jun 27 17:12:42 2019 +0200 selftests: rtnetlink: skip ipsec offload tests if netdevsim isn't present running the script on systems without netdevsim now prints: SKIP: ipsec_offload can't load netdevsim instead of error message & failed status. Signed-off-by: Florian Westphal Signed-off-by: David S. Miller tools/testing/selftests/net/rtnetlink.sh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit fbd7330c9fd8ef00bf231ec7e57b0f05384f462d Author: Fabien Dessenne Date: Fri Mar 8 17:53:46 2019 +0100 hwspinlock: ignore disabled device Do not wait for hwspinlock device registration if it is not available for use. Acked-by: Suman Anna Signed-off-by: Fabien Dessenne Signed-off-by: Bjorn Andersson drivers/hwspinlock/hwspinlock_core.c | 5 +++++ 1 file changed, 5 insertions(+) commit 77e5a44879c95ae0d453c71f132e8aa7b7883916 Author: Gustavo A. R. Silva Date: Fri Jun 7 13:53:14 2019 -0500 remoteproc: Use struct_size() helper One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct resource_table { ... u32 offset[0]; } __packed; Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. So, replace the following form: table->num * sizeof(table->offset[0]) + sizeof(struct resource_table) with: struct_size(table, offset, table->num) This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Bjorn Andersson drivers/remoteproc/remoteproc_elf_loader.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit b1a17513a2d60f9e933016bed04d0eeb8651a915 Author: Clement Leger Date: Mon Jun 17 14:57:30 2019 +0200 remoteproc: add vendor resources handling In order to allow rproc backend to handle vendor resources such as in OpenAMP, add a handle_rsc hook. This hook allow the rproc backends to handle vendor resources as they like. The hook will be called only for vendor resources and should return RSC_HANDLED on successful resource handling, RSC_IGNORED if resource was ignored, or a negative value on error. Signed-off-by: Clement Leger Signed-off-by: Bjorn Andersson Documentation/remoteproc.txt | 14 +++++++++----- drivers/remoteproc/remoteproc_core.c | 14 ++++++++++++++ drivers/remoteproc/remoteproc_internal.h | 11 +++++++++++ include/linux/remoteproc.h | 32 ++++++++++++++++++++++++++------ 4 files changed, 60 insertions(+), 11 deletions(-) commit d4d98bba3ea58e80b9f500cbd98b38b98e8167f2 Author: Suman Anna Date: Thu May 30 21:13:21 2019 -0500 hwspinlock/omap: Add a trace during probe Add a debug level trace statement in the OMAP HwSpinlock driver probe function to print the number of hwlocks on a successful registration. Signed-off-by: Suman Anna Signed-off-by: Bjorn Andersson drivers/hwspinlock/omap_hwspinlock.c | 3 +++ 1 file changed, 3 insertions(+) commit 6fa154e282f9c86ff3e2f8df478f1df92881a6e2 Author: Suman Anna Date: Thu May 30 21:13:20 2019 -0500 hwspinlock/omap: Add support for TI K3 SoCs A HwSpinlock IP is also present on the newer TI K3 AM65x and J721E family of SoCs within the Main NavSS sub-module. Reuse the existing OMAP Hwspinlock driver to extend the support for this IP on K3 AM65x SoCs as well. The IP has slightly different bit-fields in the SYSCONFIG and SYSSTATUS registers. Signed-off-by: Suman Anna Signed-off-by: Bjorn Andersson drivers/hwspinlock/Kconfig | 2 +- drivers/hwspinlock/omap_hwspinlock.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit 7f40c260df86b9d145a4ddb13879787c266c5232 Author: Suman Anna Date: Thu May 30 21:13:19 2019 -0500 dt-bindings: hwlock: Update OMAP binding for TI K3 SoCs The TI K3 AM65x and J721E family of SoCs have a HwSpinlock IP that is similar to the existing HwSpinlock IP present in OMAP architecture based SoCs with minor differences. Update the existing OMAP HwSpinlock binding for this IP on TI K3 AM65x and J721E SoCs. The same compatible from AM65x SoCs is reused for J721E SoCs. Signed-off-by: Suman Anna Signed-off-by: Bjorn Andersson .../devicetree/bindings/hwlock/omap-hwspinlock.txt | 25 +++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) commit e5b1c6c6277d5a283290a8c033c72544746f9b5b Author: Eric Dumazet Date: Thu Jun 27 01:27:01 2019 -0700 igmp: fix memory leak in igmpv3_del_delrec() im->tomb and/or im->sources might not be NULL, but we currently overwrite their values blindly. Using swap() will make sure the following call to kfree_pmc(pmc) will properly free the psf structures. Tested with the C repro provided by syzbot, which basically does : socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3 setsockopt(3, SOL_IP, IP_ADD_MEMBERSHIP, "\340\0\0\2\177\0\0\1\0\0\0\0", 12) = 0 ioctl(3, SIOCSIFFLAGS, {ifr_name="lo", ifr_flags=0}) = 0 setsockopt(3, SOL_IP, IP_MSFILTER, "\340\0\0\2\177\0\0\1\1\0\0\0\1\0\0\0\377\377\377\377", 20) = 0 ioctl(3, SIOCSIFFLAGS, {ifr_name="lo", ifr_flags=IFF_UP}) = 0 exit_group(0) = ? BUG: memory leak unreferenced object 0xffff88811450f140 (size 64): comm "softirq", pid 0, jiffies 4294942448 (age 32.070s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 ff ff ff ff 00 00 00 00 ................ 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ................ backtrace: [<00000000c7bad083>] kmemleak_alloc_recursive include/linux/kmemleak.h:43 [inline] [<00000000c7bad083>] slab_post_alloc_hook mm/slab.h:439 [inline] [<00000000c7bad083>] slab_alloc mm/slab.c:3326 [inline] [<00000000c7bad083>] kmem_cache_alloc_trace+0x13d/0x280 mm/slab.c:3553 [<000000009acc4151>] kmalloc include/linux/slab.h:547 [inline] [<000000009acc4151>] kzalloc include/linux/slab.h:742 [inline] [<000000009acc4151>] ip_mc_add1_src net/ipv4/igmp.c:1976 [inline] [<000000009acc4151>] ip_mc_add_src+0x36b/0x400 net/ipv4/igmp.c:2100 [<000000004ac14566>] ip_mc_msfilter+0x22d/0x310 net/ipv4/igmp.c:2484 [<0000000052d8f995>] do_ip_setsockopt.isra.0+0x1795/0x1930 net/ipv4/ip_sockglue.c:959 [<000000004ee1e21f>] ip_setsockopt+0x3b/0xb0 net/ipv4/ip_sockglue.c:1248 [<0000000066cdfe74>] udp_setsockopt+0x4e/0x90 net/ipv4/udp.c:2618 [<000000009383a786>] sock_common_setsockopt+0x38/0x50 net/core/sock.c:3126 [<00000000d8ac0c94>] __sys_setsockopt+0x98/0x120 net/socket.c:2072 [<000000001b1e9666>] __do_sys_setsockopt net/socket.c:2083 [inline] [<000000001b1e9666>] __se_sys_setsockopt net/socket.c:2080 [inline] [<000000001b1e9666>] __x64_sys_setsockopt+0x26/0x30 net/socket.c:2080 [<00000000420d395e>] do_syscall_64+0x76/0x1a0 arch/x86/entry/common.c:301 [<000000007fd83a4b>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: 24803f38a5c0 ("igmp: do not remove igmp souce list info when set link down") Signed-off-by: Eric Dumazet Cc: Hangbin Liu Reported-by: syzbot+6ca1abd0db68b5173a4f@syzkaller.appspotmail.com Signed-off-by: David S. Miller net/ipv4/igmp.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit fc41388564ba3fcb8cf4b0ef24c3e220ab523085 Merge: aebd17b76854 0c4231c784b4 Author: David S. Miller Date: Sat Jun 29 11:15:12 2019 -0700 Merge branch 'em_ipt-add-support-for-addrtype' Nikolay Aleksandrov says: ==================== em_ipt: add support for addrtype We would like to be able to use the addrtype from tc for ACL rules and em_ipt seems the best place to add support for the already existing xt match. The biggest issue is that addrtype revision 1 (with ipv6 support) is NFPROTO_UNSPEC and currently em_ipt can't differentiate between v4/v6 if such xt match is used because it passes the match's family instead of the packet one. The first 3 patches make em_ipt match only on IP traffic (currently both policy and addrtype recognize such traffic only) and make it pass the actual packet's protocol instead of the xt match family when it's unspecified. They also add support for NFPROTO_UNSPEC xt matches. The last patch allows to add addrtype rules via em_ipt. We need to keep the user-specified nfproto for dumping in order to be compatible with libxtables, we cannot dump NFPROTO_UNSPEC as the nfproto or we'll get an error from libxtables, thus the nfproto is limited to ipv4/ipv6 in patch 03 and is recorded. v3: don't use the user nfproto for matching, only for dumping, more information is available in the commit message in patch 03 v2: change patch 02 to set the nfproto only when unspecified and drop patch 04 from v1 (Eyal Birger) ==================== Signed-off-by: David S. Miller commit 0c4231c784b4a0435a31f42451c66186c6e43170 Author: Nikolay Aleksandrov Date: Thu Jun 27 11:10:47 2019 +0300 net: sched: em_ipt: add support for addrtype matching Allow em_ipt to use addrtype for matching. Restrict the use only to revision 1 which has IPv6 support. Since it's a NFPROTO_UNSPEC xt match we use the user-specified nfproto for matching, in case it's unspecified both v4/v6 will be matched by the rule. v2: no changes, was patch 5 in v1 Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/sched/em_ipt.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit ba3d24d48ffd6c787a1c745784484dc3c2f16119 Author: Nikolay Aleksandrov Date: Thu Jun 27 11:10:46 2019 +0300 net: sched: em_ipt: keep the user-specified nfproto and dump it If we dump NFPROTO_UNSPEC as nfproto user-space libxtables can't handle it and would exit with an error like: "libxtables: unhandled NFPROTO in xtables_set_nfproto" In order to avoid the error return the user-specified nfproto. If we don't record it then the match family is used which can be NFPROTO_UNSPEC. Even if we add support to mask NFPROTO_UNSPEC in iproute2 we have to be compatible with older versions which would be also be allowed to add NFPROTO_UNSPEC matches (e.g. addrtype after the last patch). v3: don't use the user nfproto for matching, only for dumping the rule, also don't allow the nfproto to be unspecified (explained above) v2: adjust changes to missing patch, was patch 04 in v1 Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/sched/em_ipt.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit f4c1c40c353fe602e12192d522b2358947da83bb Author: Nikolay Aleksandrov Date: Thu Jun 27 11:10:45 2019 +0300 net: sched: em_ipt: set the family based on the packet if it's unspecified Set the family based on the packet if it's unspecified otherwise protocol-neutral matches will have wrong information (e.g. NFPROTO_UNSPEC). In preparation for using NFPROTO_UNSPEC xt matches. v2: set the nfproto only when unspecified Suggested-by: Eyal Birger Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/sched/em_ipt.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 9e10edd7dcd37ddf55d30d1f8f85ae9306306879 Author: Nikolay Aleksandrov Date: Thu Jun 27 11:10:44 2019 +0300 net: sched: em_ipt: match only on ip/ipv6 traffic Restrict matching only to ip/ipv6 traffic and make sure we can use the headers, otherwise matches will be attempted on any protocol which can be unexpected by the xt matches. Currently policy supports only ipv4/6. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/sched/em_ipt.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit c09fedd6ad3f55fd298d1acfae6fb14d77a3a4d8 Merge: 79293f49677e 7ad342bc58cc Author: David S. Miller Date: Sat Jun 29 11:09:18 2019 -0700 Merge branch 'Sub-ns-increment-fixes-in-Macb-PTP' Harini Katakam says: ==================== Sub ns increment fixes in Macb PTP The subns increment register fields are not captured correctly in the driver. Fix the same and also increase the subns incr resolution. Sub ns resolution was increased to 24 bits in r1p06f2 version. To my knowledge, this PTP driver, with its current BD time stamp implementation, is only useful to that version or above. So, I have increased the resolution unconditionally. Please let me know if there is any IP versions incompatible with this - there is no register to obtain this information from. Changes from RFC: None ==================== Signed-off-by: David S. Miller commit 7ad342bc58cc5197cd2f12a3c30b3949528c6d83 Author: Harini Katakam Date: Thu Jun 27 11:51:00 2019 +0530 net: macb: Fix SUBNS increment and increase resolution The subns increment register has 24 bits as follows: RegBit[15:0] = Subns[23:8]; RegBit[31:24] = Subns[7:0] Fix the same in the driver and increase sub ns resolution to the best capable, 24 bits. This should be the case on all GEM versions that this PTP driver supports. Signed-off-by: Harini Katakam Signed-off-by: David S. Miller drivers/net/ethernet/cadence/macb.h | 6 +++++- drivers/net/ethernet/cadence/macb_ptp.c | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) commit a8ee4dc1b5937ef60e04e11c6dd6039099d1069d Author: Harini Katakam Date: Thu Jun 27 11:50:59 2019 +0530 net: macb: Add separate definition for PPM fraction The scaled ppm parameter passed to _adjfine() contains a 16 bit fraction. This just happens to be the same as SUBNSINCR_SIZE now. Hence define this separately. Signed-off-by: Harini Katakam Signed-off-by: David S. Miller drivers/net/ethernet/cadence/macb.h | 3 +++ drivers/net/ethernet/cadence/macb_ptp.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) commit 79293f49677e2e703ef0d0efc9919319adacb3fb Author: Jiunn Chang Date: Wed Jun 26 22:25:30 2019 -0500 packet: Fix undefined behavior in bit shift Shifting signed 32-bit value by 31 bits is undefined. Changing most significant bit to unsigned. Changes included in v2: - use subsystem specific subject lines - CC required mailing lists Signed-off-by: Jiunn Chang Signed-off-by: David S. Miller include/uapi/linux/if_packet.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b60a77386b1d4868f72f6353d35dabe5fbe981f2 Author: Florian Westphal Date: Wed Jun 26 20:40:45 2019 +0200 net: make skb_dst_force return true when dst is refcounted netfilter did not expect that skb_dst_force() can cause skb to lose its dst entry. I got a bug report with a skb->dst NULL dereference in netfilter output path. The backtrace contains nf_reinject(), so the dst might have been cleared when skb got queued to userspace. Other users were fixed via if (skb_dst(skb)) { skb_dst_force(skb); if (!skb_dst(skb)) goto handle_err; } But I think its preferable to make the 'dst might be cleared' part of the function explicit. In netfilter case, skb with a null dst is expected when queueing in prerouting hook, so drop skb for the other hooks. v2: v1 of this patch returned true in case skb had no dst entry. Eric said: Say if we have two skb_dst_force() calls for some reason on the same skb, only the first one will return false. This now returns false even when skb had no dst, as per Erics suggestion, so callers might need to check skb_dst() first before skb_dst_force(). Signed-off-by: Florian Westphal Signed-off-by: David S. Miller include/net/dst.h | 5 ++++- net/netfilter/nf_queue.c | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) commit 9b6c08878e23adb7cc84bdca94d8a944b03f099e Author: Xin Long Date: Wed Jun 26 16:31:39 2019 +0800 sctp: not bind the socket in sctp_connect Now when sctp_connect() is called with a wrong sa_family, it binds to a port but doesn't set bp->port, then sctp_get_af_specific will return NULL and sctp_connect() returns -EINVAL. Then if sctp_bind() is called to bind to another port, the last port it has bound will leak due to bp->port is NULL by then. sctp_connect() doesn't need to bind ports, as later __sctp_connect will do it if bp->port is NULL. So remove it from sctp_connect(). While at it, remove the unnecessary sockaddr.sa_family len check as it's already done in sctp_inet_connect. Fixes: 644fbdeacf1d ("sctp: fix the issue that flags are ignored when using kernel_connect") Reported-by: syzbot+079bf326b38072f849d9@syzkaller.appspotmail.com Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/socket.c | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) commit aebd17b7685499156b8bc976c66a12396f76d0a7 Author: Xue Chaojing Date: Sat Jun 29 02:26:27 2019 +0000 hinic: add vlan offload support This patch adds vlan offload support for the HINIC driver. Signed-off-by: Xue Chaojing Signed-off-by: David S. Miller drivers/net/ethernet/huawei/hinic/hinic_hw_dev.h | 2 ++ drivers/net/ethernet/huawei/hinic/hinic_hw_wqe.h | 15 ++++++++++++ drivers/net/ethernet/huawei/hinic/hinic_main.c | 9 +++++-- drivers/net/ethernet/huawei/hinic/hinic_port.c | 30 ++++++++++++++++++++++++ drivers/net/ethernet/huawei/hinic/hinic_port.h | 13 ++++++++++ drivers/net/ethernet/huawei/hinic/hinic_rx.c | 13 ++++++++++ drivers/net/ethernet/huawei/hinic/hinic_tx.c | 17 ++++++++++++++ 7 files changed, 97 insertions(+), 2 deletions(-) commit ff91064ea37c8323eba31cc3d2e22464f107b50d Author: Jonas Rabenstein Date: Tue May 21 22:46:46 2019 +0200 block: sed-opal: check size of shadow mbr Check whether the shadow mbr does fit in the provided space on the target. Also a proper firmware should handle this case and return an error we may prevent problems or even damage with crappy firmwares. Signed-off-by: Jonas Rabenstein Signed-off-by: David Kozub Reviewed-by: Scott Bauer Reviewed-by: Jon Derrick Signed-off-by: Jens Axboe block/opal_proto.h | 16 ++++++++++++++++ block/sed-opal.c | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) commit a9b25b4cf2b76d320afc999f881ccb805fecdd84 Author: Jonas Rabenstein Date: Tue May 21 22:46:45 2019 +0200 block: sed-opal: ioctl for writing to shadow mbr Allow modification of the shadow mbr. If the shadow mbr is not marked as done, this data will be presented read only as the device content. Only after marking the shadow mbr as done and unlocking a locking range the actual content is accessible. Co-authored-by: David Kozub Signed-off-by: Jonas Rabenstein Signed-off-by: David Kozub Reviewed-by: Scott Bauer Reviewed-by: Jon Derrick Signed-off-by: Jens Axboe block/sed-opal.c | 91 ++++++++++++++++++++++++++++++++++++++++++- include/linux/sed-opal.h | 1 + include/uapi/linux/sed-opal.h | 8 ++++ 3 files changed, 98 insertions(+), 2 deletions(-) commit c9888443413e4e06013e482fc484dbb9c559c145 Author: Jonas Rabenstein Date: Tue May 21 22:46:44 2019 +0200 block: sed-opal: add ioctl for done-mark of shadow mbr Enable users to mark the shadow mbr as done without completely deactivating the shadow mbr feature. This may be useful on reboots, when the power to the disk is not disconnected in between and the shadow mbr stores the required boot files. Of course, this saves also the (few) commands required to enable the feature if it is already enabled and one only wants to mark the shadow mbr as done. Co-authored-by: David Kozub Signed-off-by: Jonas Rabenstein Signed-off-by: David Kozub Reviewed-by: Christoph Hellwig Reviewed by: Scott Bauer Reviewed-by: Jon Derrick Signed-off-by: Jens Axboe block/sed-opal.c | 27 +++++++++++++++++++++++++++ include/linux/sed-opal.h | 1 + include/uapi/linux/sed-opal.h | 12 ++++++++++++ 3 files changed, 40 insertions(+) commit b620743077e291ae7d0debd21f50413a8c266229 Author: Christoph Hellwig Date: Wed Jun 26 15:49:28 2019 +0200 block: never take page references for ITER_BVEC If we pass pages through an iov_iter we always already have a reference in the caller. Thus remove the ITER_BVEC_FLAG_NO_REF and don't take reference to pages by default for bvec backed iov_iters. Reviewed-by: Minwoo Im Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/bio.c | 14 +------------- drivers/block/loop.c | 16 ++++------------ fs/io_uring.c | 3 --- include/linux/uio.h | 10 +--------- 4 files changed, 6 insertions(+), 37 deletions(-) commit d7c8aa85ed204ccebf0c18f29b941d52b33deae3 Author: Christoph Hellwig Date: Wed Jun 26 15:49:27 2019 +0200 direct-io: use bio_release_pages in dio_bio_complete Use bio_release_pages instead of duplicating it. Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe fs/direct-io.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) commit 9fec4a21886e67c3337e1762eda9f71a1822cba8 Author: Christoph Hellwig Date: Wed Jun 26 15:49:26 2019 +0200 block_dev: use bio_release_pages in bio_unmap_user Use bio_release_pages instead of duplicating it. Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe fs/block_dev.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit 57dfe3ce10e5cecfb3d073e90c0454f432a86873 Author: Christoph Hellwig Date: Wed Jun 26 15:49:25 2019 +0200 block_dev: use bio_release_pages in blkdev_bio_end_io Use bio_release_pages instead of duplicating it. Reviewed-by: Minwoo Im Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe fs/block_dev.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 147a60538d91ddd431c970f83527b3365d72eefc Author: Christoph Hellwig Date: Wed Jun 26 15:49:24 2019 +0200 iomap: use bio_release_pages in iomap_dio_bio_end_io Use bio_release_pages instead of duplicating it. Reviewed-by: Minwoo Im Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe fs/iomap.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 506e0798479ed54d48f063547b1b62d33b18d54c Author: Christoph Hellwig Date: Wed Jun 26 15:49:23 2019 +0200 block: use bio_release_pages in bio_map_user_iov Use bio_release_pages instead of open coding it. Reviewed-by: Minwoo Im Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/bio.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 163cc2d3cd87af82b589bc2327285505eeac3842 Author: Christoph Hellwig Date: Wed Jun 26 15:49:22 2019 +0200 block: use bio_release_pages in bio_unmap_user Use bio_release_pages instead of open coding it. Reviewed-by: Chaitanya Kulkarni Reviewed-by: Minwoo Im Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/bio.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) commit d241a95f3514a5eb544dfd8d9d141ffd1c89b707 Author: Christoph Hellwig Date: Wed Jun 26 15:49:21 2019 +0200 block: optionally mark pages dirty in bio_release_pages A lot of callers of bio_release_pages also want to mark the released pages as dirty. Add a mark_dirty parameter to avoid a second relatively expensive bio_for_each_segment_all loop. Reviewed-by: Minwoo Im Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/bio.c | 12 +++++++----- include/linux/bio.h | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) commit b2d0d99135ad145667765cbd27f148c1a4cd50d1 Author: Christoph Hellwig Date: Wed Jun 26 15:49:20 2019 +0200 block: move the BIO_NO_PAGE_REF check into bio_release_pages Move the BIO_NO_PAGE_REF check into bio_release_pages instead of duplicating it in both callers. Also make the function available outside of bio.c so that we can reuse it in other direct I/O implementations. Reviewed-by: Minwoo Im Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/bio.c | 11 ++++++----- include/linux/bio.h | 1 + 2 files changed, 7 insertions(+), 5 deletions(-) commit 5f2ab0c1c896764ef3b2d01d9e40d138c2bfd791 Author: Fuqian Huang Date: Fri Jun 28 01:35:16 2019 +0800 block: skd_main.c: Remove call to memset after dma_alloc_coherent In commit af7ddd8a627c ("Merge tag 'dma-mapping-4.21' of git://git.infradead.org/users/hch/dma-mapping"), dma_alloc_coherent has already zeroed the memory. So memset is not needed. Reviewed-by: Chaitanya Kulkarni Signed-off-by: Fuqian Huang Signed-off-by: Jens Axboe drivers/block/skd_main.c | 1 - 1 file changed, 1 deletion(-) commit b71e8c13fa57811b64939ba7eb603775fb13c2eb Author: Fuqian Huang Date: Fri Jun 28 01:35:04 2019 +0800 block: mtip32xx: Remove call to memset after dma_alloc_coherent In commit af7ddd8a627c ("Merge tag 'dma-mapping-4.21' of git://git.infradead.org/users/hch/dma-mapping"), dma_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang Signed-off-by: Jens Axboe drivers/block/mtip32xx/mtip32xx.c | 5 ----- 1 file changed, 5 deletions(-) commit e675697eaca208edcebb42fd8c30a71bd5258c40 Author: Fuqian Huang Date: Fri Jun 28 01:34:34 2019 +0800 ata: sata_sil24: Remove call to memset after dmam_alloc_coherent In commit af7ddd8a627c ("Merge tag 'dma-mapping-4.21' of git://git.infradead.org/users/hch/dma-mapping"),, dmam_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang Signed-off-by: Jens Axboe drivers/ata/sata_sil24.c | 1 - 1 file changed, 1 deletion(-) commit b39f5da467188bdfdd17b5049cef54a4af27cd7f Author: Fuqian Huang Date: Fri Jun 28 01:34:26 2019 +0800 ata:sata_qstor: Remove call to memset after dmam_alloc_coherent In commit af7ddd8a627c ("Merge tag 'dma-mapping-4.21' of git://git.infradead.org/users/hch/dma-mapping"), dmam_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang Signed-off-by: Jens Axboe drivers/ata/sata_qstor.c | 1 - 1 file changed, 1 deletion(-) commit 523e099b69551961dc3f3070a960338328ac0774 Author: Fuqian Huang Date: Fri Jun 28 01:34:18 2019 +0800 ata: sata_nv: Remove call to memset after dmam_alloc_coherent In commit af7ddd8a627c ("Merge tag 'dma-mapping-4.21' of git://git.infradead.org/users/hch/dma-mapping"), dmam_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang Signed-off-by: Jens Axboe drivers/ata/sata_nv.c | 2 -- 1 file changed, 2 deletions(-) commit 65315bbbfd9fdb7863c0bfea5011b400e67bc38b Author: Fuqian Huang Date: Fri Jun 28 01:34:10 2019 +0800 ata: pdc_adma: Remove call to memset after dmam_alloc_coherent In commit af7ddd8a627c ("Merge tag 'dma-mapping-4.21' of git://git.infradead.org/users/hch/dma-mapping"), dmam_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang Signed-off-by: Jens Axboe drivers/ata/pdc_adma.c | 1 - 1 file changed, 1 deletion(-) commit 602e40a78567ffd7e5eaf235a116fd808cf85b75 Author: Fuqian Huang Date: Fri Jun 28 01:34:01 2019 +0800 ata: libahci: Remove call to memset after dmam_alloc_coherent In commit af7ddd8a627c ("Merge tag 'dma-mapping-4.21' of git://git.infradead.org/users/hch/dma-mapping"), dmam_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang Signed-off-by: Jens Axboe drivers/ata/libahci.c | 1 - 1 file changed, 1 deletion(-) commit fec36aae0de14e31c7cf3e8be172d10a966de2ea Author: Fuqian Huang Date: Fri Jun 28 01:33:46 2019 +0800 ata: acard-ahci: Remove call to memset after dmam_alloc_coherent In commit af7ddd8a627c ("Merge tag 'dma-mapping-4.21' of git://git.infradead.org/users/hch/dma-mapping"), dmam_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang Signed-off-by: Jens Axboe drivers/ata/acard-ahci.c | 1 - 1 file changed, 1 deletion(-) commit 15ddffcb341392ba56a28a0ff5d19d8f8cde1b80 Author: Revanth Rajashekar Date: Thu Jun 27 16:31:09 2019 -0600 block: sed-opal: "Never True" conditions 'who' an unsigned variable in stucture opal_session_info can never be lesser than zero. Hence, the condition "who < OPAL_ADMIN1" can never be true. Signed-off-by: Revanth Rajashekar Signed-off-by: Jens Axboe block/sed-opal.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 5e4c7cf60ec3cad59703c203de1dfb31ea608e6e Author: Revanth Rajashekar Date: Thu Jun 27 16:30:02 2019 -0600 block: sed-opal: PSID reverttper capability PSID is a 32 character password printed on the drive label, to prove its physical access. This PSID reverttper function is very useful to regain the control over the drive when it is locked and the user can no longer access it because of some failures. However, *all the data on the drive is completely erased*. This method is advisable only when the user is exhausted of all other recovery methods. PSID capabilities are described in: https://trustedcomputinggroup.org/wp-content/uploads/TCG_Storage-Opal_Feature_Set_PSID_v1.00_r1.00.pdf Signed-off-by: Revanth Rajashekar Signed-off-by: Jens Axboe block/sed-opal.c | 33 +++++++++++++++++++++++++++++---- include/linux/sed-opal.h | 1 + include/uapi/linux/sed-opal.h | 1 + 3 files changed, 31 insertions(+), 4 deletions(-) commit fbbe7c86b483878da4a2ec7b899e0814195942af Author: Bart Van Assche Date: Fri Jun 28 13:07:45 2019 -0700 block, documentation: Document discard_zeroes_data, fua, max_discard_segments and write_zeroes_max_bytes Reviewed-by: Martin K. Petersen Signed-off-by: Bart Van Assche Signed-off-by: Jens Axboe Documentation/block/queue-sysfs.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 0c766e78bda6d4edf40779fc0cd48d0867a04d84 Author: Bart Van Assche Date: Fri Jun 28 13:07:44 2019 -0700 block, documentation: Explain the word 'segments' Several block layer users who are not kernel developers do not know that the word 'segment' refers to an element in a DMA scatter/gather list. Make the block layer documentation easier to understand by stating explicitly what the word 'segment' stands for. Reviewed-by: Martin K. Petersen Signed-off-by: Bart Van Assche Signed-off-by: Jens Axboe Documentation/block/queue-sysfs.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 6728ac3396265184abe93f18b32aca329981e5ce Author: Bart Van Assche Date: Fri Jun 28 13:07:43 2019 -0700 block, documentation: Sort queue sysfs attribute names alphabetically Commit f9824952ee1c ("block: update sysfs documentation") # v5.0 broke the alphabetical order of the sysfs attribute names. List queue sysfs attribute names alphabetically. Cc: Damien Le Moal Reviewed-by: Martin K. Petersen Signed-off-by: Bart Van Assche Signed-off-by: Jens Axboe Documentation/block/queue-sysfs.txt | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit 152c7776b9442f2f094da7d81e5a8f345dedb397 Author: Bart Van Assche Date: Fri Jun 28 13:07:42 2019 -0700 block, documentation: Fix wbt_lat_usec documentation Fix the spelling of the wbt_lat_usec sysfs attribute. Fixes: 87760e5eef35 ("block: hook up writeback throttling") # v4.10. Reviewed-by: Martin K. Petersen Signed-off-by: Bart Van Assche Signed-off-by: Jens Axboe Documentation/block/queue-sysfs.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 152c762e92609965b542c31a7627ad05893f70d9 Author: Chaitanya Kulkarni Date: Fri Jun 28 16:29:04 2019 -0700 null_blk: fix type mismatch null_handle_cmd() In null_handle_cmd() when device is configured as zoned, variable op is decalred as an int, where it is used to hold values of type REQ_OP_XXX which is of type enum req_opf. Change the type from int to enum req_opf. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Jens Axboe drivers/block/null_blk_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 568aeeeb69e6af7784418e294b0c37723d03936d Author: Andy Shevchenko Date: Wed Jun 19 17:50:50 2019 +0300 platform/x86: intel_int0002_vgpio: Get rid of custom ICPU() macro Replace custom grown macro with generic INTEL_CPU_FAM6() one. No functional change intended. Signed-off-by: Andy Shevchenko Reviewed-by: Hans de Goede drivers/platform/x86/intel_int0002_vgpio.c | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) commit 9452fbf5c6cf5f470e0748fe7a14a683e7765f7a Author: Steffen Dirkwinkel Date: Tue Jun 18 15:31:02 2019 +0200 platform/x86: pmc_atom: Add CB4063 Beckhoff Automation board to critclk_systems DMI table The CB4063 board uses pmc_plt_clk* clocks for ethernet controllers. This adds it to the critclk_systems DMI table so the clocks are marked as CLK_CRITICAL and not turned off. Fixes: 648e921888ad ("clk: x86: Stop marking clocks as CLK_IS_CRITICAL") Signed-off-by: Steffen Dirkwinkel Signed-off-by: Andy Shevchenko drivers/platform/x86/pmc_atom.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 368bae87887877a95b19ecb395a8baa1be16e414 Author: Gustavo A. R. Silva Date: Wed May 8 11:49:34 2019 -0500 platform/x86: acer-wmi: Mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warnings: drivers/platform/x86/acer-wmi.c: In function ‘set_u32’: drivers/platform/x86/acer-wmi.c:1378:33: warning: this statement may fall through [-Wimplicit-fallthrough=] if (cap == ACER_CAP_WIRELESS || ^ drivers/platform/x86/acer-wmi.c:1386:3: note: here case ACER_WMID: ^~~~ drivers/platform/x86/acer-wmi.c:1393:12: warning: this statement may fall through [-Wimplicit-fallthrough=] else if (wmi_has_guid(WMID_GUID2)) ^ drivers/platform/x86/acer-wmi.c:1395:3: note: here default: ^~~~~~~ drivers/platform/x86/acer-wmi.c: In function ‘get_u32’: drivers/platform/x86/acer-wmi.c:1340:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (cap == ACER_CAP_MAILLED) { ^ drivers/platform/x86/acer-wmi.c:1344:2: note: here case ACER_WMID: ^~~~ drivers/platform/x86/acer-wmi.c: In function ‘WMID_get_u32’: drivers/platform/x86/acer-wmi.c:1013:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (quirks->mailled == 1) { ^ drivers/platform/x86/acer-wmi.c:1018:2: note: here default: ^~~~~~~ Warning level 3 was used: -Wimplicit-fallthrough=3 This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Andy Shevchenko drivers/platform/x86/acer-wmi.c | 4 ++++ 1 file changed, 4 insertions(+) commit 6d789e60c38f05d2b9bcba10bb69ce2a0e392343 Author: Christian Oder Date: Wed Jun 12 14:40:53 2019 +0200 platform/x86: touchscreen_dmi: Update Hi10 Air filter Turns out the Hi10 Air is built by multiple companies so using Hampoo as a filter is not enough to cover all variants. This has been verified as working on the Hampoo and Morshow version. Signed-off-by: Christian Oder Signed-off-by: Andy Shevchenko drivers/platform/x86/touchscreen_dmi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit edb73f4f02472b92dc2473c74211d22807d482e4 Author: Mattias Jacobsson <2pi@mok.nu> Date: Mon May 27 18:21:31 2019 +0200 platform/x86: wmi: add Xiaomi WMI key driver Some function keys on the built in keyboard on Xiaomi's notebooks does not produce any key events when pressed in combination with the function key. Some of these keys do report that they are being pressed via WMI events. This driver reports key events for Fn+F7 and double tap on Fn. Other WMI events that are reported by the hardware but not utilized by this driver are Caps Lock(which already work) and Fn lock/unlock. Signed-off-by: Mattias Jacobsson <2pi@mok.nu> Signed-off-by: Andy Shevchenko drivers/platform/x86/Kconfig | 10 +++++ drivers/platform/x86/Makefile | 1 + drivers/platform/x86/xiaomi-wmi.c | 92 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 103 insertions(+) commit 102a3375e6671e6ca85dbde245a5071f8c09b760 Author: Fabrice Gasnier Date: Tue Jun 4 15:34:13 2019 +0200 dt-bindings: i2c-stm32: document optional dmas Add missing documentation for "dmas" and "dma-names" properties that can be used on i2c-stm32. Signed-off-by: Fabrice Gasnier Reviewed-by: Pierre-Yves MORDRET Signed-off-by: Wolfram Sang Documentation/devicetree/bindings/i2c/i2c-stm32.txt | 2 ++ 1 file changed, 2 insertions(+) commit 473fbdf7d8d345f7e57618b769fbdff9da40424d Author: Fabrice Gasnier Date: Tue Jun 4 15:20:51 2019 +0200 i2c: i2c-stm32f7: Add I2C_SMBUS_I2C_BLOCK_DATA support This patch adds the support of I2C_SMBUS_I2C_BLOCK_DATA transaction type for the stm32f7 SMBUS Controller. Use emulated I2C_SMBUS_I2C_BLOCK_DATA transactions as there is no specific hardware in STM32 I2C to manage this (e.g. like no need for PEC here). Emulated transfer will fall back calling i2c transfer method where there's already support for DMAs for example. So, use the I2C_FUNC_SMBUS_I2C_BLOCK in stm32f7_i2c_func(), and rely on emulated transfer by returning -EOPNOTSUPP in the smbus_xfer() routine for such a case. Signed-off-by: Fabrice Gasnier Reviewed-by: Pierre-Yves MORDRET Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-stm32f7.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 6e76cb7dfd34a2e3a13a0290eca19c0060764964 Author: Charles Keepax Date: Thu Jun 27 10:24:11 2019 +0100 i2c: core: Tidy up handling of init_irq Only set init_irq during i2c_device_new and only handle client->irq on the probe/remove paths. Suggested-by: Benjamin Tissoires Reviewed-by: Mika Westerberg Reviewed-by: Andy Shevchenko Signed-off-by: Charles Keepax Signed-off-by: Wolfram Sang drivers/i2c/i2c-core-base.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 8466b616cbee91641a419c98d77027cef84066e5 Author: Charles Keepax Date: Thu Jun 27 10:24:10 2019 +0100 i2c: core: Move ACPI gpio IRQ handling into i2c_acpi_get_irq It makes sense to contain all the ACPI IRQ handling in a single helper function. Reviewed-by: Andy Shevchenko Signed-off-by: Charles Keepax Reviewed-by: Mika Westerberg Signed-off-by: Wolfram Sang drivers/i2c/i2c-core-acpi.c | 3 +++ drivers/i2c/i2c-core-base.c | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) commit 16c9db1dd84cef50c819733a19def842bdb3d5ef Author: Charles Keepax Date: Thu Jun 27 10:24:09 2019 +0100 i2c: core: Move ACPI IRQ handling to probe time Bring the ACPI path in sync with the device tree path and handle all the IRQ fetching at probe time. This leaves the only IRQ handling at device registration time being that which is passed directly through the board info as either a resource or an actual IRQ number. Reviewed-by: Andy Shevchenko Signed-off-by: Charles Keepax Reviewed-by: Mika Westerberg Signed-off-by: Wolfram Sang drivers/i2c/i2c-core-acpi.c | 16 ++++++++++------ drivers/i2c/i2c-core-base.c | 5 ++++- drivers/i2c/i2c-core.h | 7 +++++++ 3 files changed, 21 insertions(+), 7 deletions(-) commit a52e3b37ebc9dff9e5750ce9ef68cf78be5a9d77 Author: Charles Keepax Date: Thu Jun 27 10:24:08 2019 +0100 i2c: acpi: Factor out getting the IRQ from ACPI In preparation for future refactoring factor out the fetch of the IRQ into its own helper function. Whilst we are at it update the handling to return the actual error code returned from acpi_dev_get_resources as well. Reviewed-by: Andy Shevchenko Signed-off-by: Charles Keepax Reviewed-by: Mika Westerberg Signed-off-by: Wolfram Sang drivers/i2c/i2c-core-acpi.c | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) commit c2223ddcfe64864c9a6541c0ffe22d96255597e0 Author: Charles Keepax Date: Thu Jun 27 10:24:07 2019 +0100 i2c: acpi: Use available IRQ helper functions Use the available IRQ helper functions, most of the functions have additional helpful side affects like configuring the trigger type of the IRQ. Reviewed-by: Andy Shevchenko Signed-off-by: Charles Keepax Reviewed-by: Mika Westerberg Signed-off-by: Wolfram Sang drivers/i2c/i2c-core-acpi.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit 1d7534b6adcd3e4a9673c4e7fdc5bf4770f5ab81 Author: Charles Keepax Date: Thu Jun 27 10:24:06 2019 +0100 i2c: core: Allow whole core to use i2c_dev_irq_from_resources Remove the static from i2c_dev_irq_from _resources so that other parts of the core code can use this helper function. Reviewed-by: Mika Westerberg Reviewed-by: Andy Shevchenko Signed-off-by: Charles Keepax Signed-off-by: Wolfram Sang drivers/i2c/i2c-core-base.c | 4 ++-- drivers/i2c/i2c-core.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) commit 45c9cc681d8d9122fd64e1f2a4cc82e3dcc7f0a5 Merge: 504ee6b306a7 05af0765707f Author: Wolfram Sang Date: Sat Jun 29 13:02:48 2019 +0200 Merge branch 'i2c-mux/for-next' of https://github.com/peda-r/i2c-mux into i2c/for-5.3 I realize that there are changes in drivers/i2c/busses/i2c-i801.c that strictly speaking don't belong here, but I hope you don't mind. These changes are all about the interaction with the i2c-mux-gpio code, and I did a test-merge a few days ago w/o conflicts. Anyway, the GPIO-work from Linus Walleij (with help from Serge Semin) in the i2c-mux-gpio and i2c-arb-gpio-challenge drivers is the main feature. commit 504ee6b306a70a106c2e8858fd916ed8c43c5776 Merge: 4601db7ecf07 dce91ba39c76 Author: Wolfram Sang Date: Sat Jun 29 13:01:34 2019 +0200 Merge tag 'at24-v5.3-updates-for-wolfram' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into i2c/for-5.3 at24: updates for v5.3 - simplify the probing code by using devm_i2c_new_dummy_device() - simplify the code further by moving the code around a bit - use struct_size() instead of calculating the required structure size by hand - remove any references to now removed platform data from comments commit c8c4076723daca08bf35ccd68f22ea1c6219e207 Author: Thomas Gleixner Date: Fri Jun 28 15:23:07 2019 +0800 x86/timer: Skip PIT initialization on modern chipsets Recent Intel chipsets including Skylake and ApolloLake have a special ITSSPRC register which allows the 8254 PIT to be gated. When gated, the 8254 registers can still be programmed as normal, but there are no IRQ0 timer interrupts. Some products such as the Connex L1430 and exone go Rugged E11 use this register to ship with the PIT gated by default. This causes Linux to fail to boot: Kernel panic - not syncing: IO-APIC + timer doesn't work! Boot with apic=debug and send a report. The panic happens before the framebuffer is initialized, so to the user, it appears as an early boot hang on a black screen. Affected products typically have a BIOS option that can be used to enable the 8254 and make Linux work (Chipset -> South Cluster Configuration -> Miscellaneous Configuration -> 8254 Clock Gating), however it would be best to make Linux support the no-8254 case. Modern sytems allow to discover the TSC and local APIC timer frequencies, so the calibration against the PIT is not required. These systems have always running timers and the local APIC timer works also in deep power states. So the setup of the PIT including the IO-APIC timer interrupt delivery checks are a pointless exercise. Skip the PIT setup and the IO-APIC timer interrupt checks on these systems, which avoids the panic caused by non ticking PITs and also speeds up the boot process. Thanks to Daniel for providing the changelog, initial analysis of the problem and testing against a variety of machines. Reported-by: Daniel Drake Signed-off-by: Thomas Gleixner Tested-by: Daniel Drake Cc: bp@alien8.de Cc: hpa@zytor.com Cc: linux@endlessm.com Cc: rafael.j.wysocki@intel.com Cc: hdegoede@redhat.com Link: https://lkml.kernel.org/r/20190628072307.24678-1-drake@endlessm.com arch/x86/include/asm/apic.h | 2 ++ arch/x86/include/asm/time.h | 1 + arch/x86/kernel/apic/apic.c | 27 +++++++++++++++++++++++++++ arch/x86/kernel/apic/io_apic.c | 4 ++++ arch/x86/kernel/i8253.c | 25 ++++++++++++++++++++++++- arch/x86/kernel/time.c | 7 +++++-- 6 files changed, 63 insertions(+), 3 deletions(-) commit 940225628652b340b2bfe99f42f3d2db9fd9ce6c Author: Emmanuel Grumbach Date: Wed May 22 12:22:35 2019 +0300 iwlwifi: mvm: clear rfkill_safe_init_done when we start the firmware Otherwise it'll stay set forever which is clearly buggy. Cc: stable@vger.kernel.org Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 0d53cfd0cca3c729a089c39eef0e7d8ae7662974 Author: Emmanuel Grumbach Date: Wed May 22 12:17:09 2019 +0300 iwlwifi: don't WARN when calling iwl_get_shared_mem_conf with RF-Kill iwl_mvm_send_cmd returns 0 when the command won't be sent because RF-Kill is asserted. Do the same when we call iwl_get_shared_mem_conf since it is not sent through iwl_mvm_send_cmd but directly calls the transport layer. Cc: stable@vger.kernel.org Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/fw/smem.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 3b57a10ca14c619707398dc58fe5ece18c95b20b Author: Emmanuel Grumbach Date: Tue May 21 15:10:38 2019 +0300 iwlwifi: pcie: don't service an interrupt that was masked Sometimes the register status can include interrupts that were masked. We can, for example, get the RF-Kill bit set in the interrupt status register although this interrupt was masked. Then if we get the ALIVE interrupt (for example) that was not masked, we need to *not* service the RF-Kill interrupt. Fix this in the MSI-X interrupt handler. Cc: stable@vger.kernel.org Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) commit ed3e4c6d3cd8f093a3636cb05492429fe2af228d Author: Emmanuel Grumbach Date: Mon May 20 15:18:24 2019 +0300 iwlwifi: fix RF-Kill interrupt while FW load for gen2 devices Newest devices have a new firmware load mechanism. This mechanism is called the context info. It means that the driver doesn't need to load the sections of the firmware. The driver rather prepares a place in DRAM, with pointers to the relevant sections of the firmware, and the firmware loads itself. At the end of the process, the firmware sends the ALIVE interrupt. This is different from the previous scheme in which the driver expected the FH_TX interrupt after each section being transferred over the DMA. In order to support this new flow, we enabled all the interrupts. This broke the assumption that we have in the code that the RF-Kill interrupt can't interrupt the firmware load flow. Change the context info flow to enable only the ALIVE interrupt, and re-enable all the other interrupts only after the firmware is alive. Then, we won't see the RF-Kill interrupt until then. Getting the RF-Kill interrupt while loading the firmware made us kill the firmware while it is loading and we ended up dumping garbage instead of the firmware state. Re-enable the ALIVE | RX interrupts from the ISR when we get the ALIVE interrupt to be able to get the RX interrupt that comes immediately afterwards for the ALIVE notification. This is needed for non MSI-X only. Cc: stable@vger.kernel.org Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho .../wireless/intel/iwlwifi/pcie/ctxt-info-gen3.c | 2 +- .../net/wireless/intel/iwlwifi/pcie/ctxt-info.c | 2 +- drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 27 ++++++++++++++++++++++ drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 5 ++++ .../net/wireless/intel/iwlwifi/pcie/trans-gen2.c | 9 ++++++++ 5 files changed, 43 insertions(+), 2 deletions(-) commit ec46ae30245ecb41d73f8254613db07c653fb498 Author: Emmanuel Grumbach Date: Tue May 21 15:03:21 2019 +0300 iwlwifi: pcie: fix ALIVE interrupt handling for gen2 devices w/o MSI-X We added code to restock the buffer upon ALIVE interrupt when MSI-X is disabled. This was added as part of the context info code. This code was added only if the ISR debug level is set which is very unlikely to be related. Move this code to run even when the ISR debug level is not set. Note that gen2 devices work with MSI-X in most cases so that this path is seldom used. Cc: stable@vger.kernel.org Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 34 +++++++++++++--------------- 1 file changed, 16 insertions(+), 18 deletions(-) commit c56e00a3feaee2b46b7d33875fb7f52efd30241f Author: Johannes Berg Date: Mon May 20 14:49:56 2019 +0200 iwlwifi: mvm: delay GTK setting in FW in AP mode In AP (and IBSS) mode, we can only set GTKs to firmware after we have sent down the multicast station, but this we can only do after we've enabled beaconing, etc. However, during rfkill exit, hostapd will configure the keys before starting the AP, and cfg80211/mac80211 accept it happily. On earlier devices, this didn't bother us as GTK TX wasn't really handled in firmware, we just put the key material into the TX cmd and thus it only mattered when we actually transmitted a frame. On newer devices, however, the firmware needs to track all of this and that doesn't work if we add the key before the (multicast) sta it belongs to. To fix this, keep a list of keys to add during AP enable, and call the function there. Cc: stable@vger.kernel.org Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 53 ++++++++++++++++++++++- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 3 ++ 2 files changed, 54 insertions(+), 2 deletions(-) commit 5b7d67853832c78a4815dd5516d604d640c9d130 Author: Luca Coelho Date: Fri May 17 07:18:04 2019 +0300 iwlwifi: mvm: remove MAC_FILTER_IN_11AX for AP mode The FW API was clarified saying that this flag should only be set in BSS client mode. Remove it from the MAC_CTXT command we send in AP and GO modes. Signed-off-by: Luca Coelho Fixes: 3b5ee8dd8bb1 ("iwlwifi: mvm: set MAC_FILTER_IN_11AX in AP mode") Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 3 --- 1 file changed, 3 deletions(-) commit 6c7f70877872afa7574bdc147ea1c46c03ef9d71 Author: Shahar S Matityahu Date: Sun May 19 10:32:44 2019 +0300 iwlwifi: dbg: debug recording stop and restart command remove The 0xF6 command used to start and stop the recording from 22560 devices was removed. This is causing an assert when the driver tries to alter the recording state. Remove the use of the command. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 2 +- drivers/net/wireless/intel/iwlwifi/fw/dbg.h | 47 +++++++++------------- drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 2 +- .../net/wireless/intel/iwlwifi/pcie/trans-gen2.c | 2 +- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 2 +- 5 files changed, 22 insertions(+), 33 deletions(-) commit c040fe83423af70effda7112641fba84d541ce57 Author: Shahar S Matityahu Date: Sun May 19 10:16:13 2019 +0300 iwlwifi: dbg: don't stop dbg recording before entering D3 from 9000 devices From 9000 device family the FW automatically stops the debug recording and the driver should not stop it as well. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 029c25f36343fe72fe1a80dcfc03ba34b0354de2 Author: Shahar S Matityahu Date: Thu May 16 10:56:30 2019 +0300 iwlwifi: dbg_ini: fix debug monitor stop and restart in ini mode In ini debug mode the recording does not restart unless legacy monitor configuration is also given. Add dbg_ini_dest field to trans to indicate the debug monitor destination to solve this. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 19 ++++++++++++++----- drivers/net/wireless/intel/iwlwifi/fw/dbg.h | 20 +++++++++++++++++++- drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 2 ++ 3 files changed, 35 insertions(+), 6 deletions(-) commit d374f3157fa4b3ffd830b41ecf25457781b8526b Author: Emmanuel Grumbach Date: Sun May 19 09:57:31 2019 +0300 iwlwifi: mvm: make the usage of TWT configurable TWT is still very new and we expect issues. Make its usage configurable and disable it by default. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/constants.h | 1 + drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit 5cdb2044fe3e7c0053ae32ac332cb61d81d62c08 Author: Emmanuel Grumbach Date: Fri May 17 15:42:32 2019 +0300 iwlwifi: support FSEQ TLV even when FMAC is not compiled FSEQ TLV should be parsed and read even when FMAC is not compiled. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 91c28b83da21624dabd1ee9e9c35e2747d6a9563 Author: Shahar S Matityahu Date: Mon May 13 10:13:47 2019 +0300 iwlwifi: dbg: move trans debug fields to a separate struct Unite iwl_trans debug related fields under iwl_trans_debug struct to increase readability and keep iwl_trans clean. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 44 +++---- drivers/net/wireless/intel/iwlwifi/fw/dbg.h | 24 ++-- drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c | 32 ++--- drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 8 +- drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 73 ++++++----- drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 4 +- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 10 +- drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 8 +- .../wireless/intel/iwlwifi/pcie/ctxt-info-gen3.c | 8 +- drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 2 +- drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 2 +- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 135 +++++++++++---------- 13 files changed, 184 insertions(+), 168 deletions(-) commit 1d45a700dfb427626bec6829c0d8fe5a1f10435f Author: Shahar S Matityahu Date: Tue Feb 12 14:47:08 2019 +0200 iwlwifi: dbg_ini: remove redundant checking of ini mode There are several flows where the driver checks if it runs in ini mode. Some of these flows are no longer used in ini mode or there is another condition that check the ini mode in the same flow. Either way, those conditions are redundant. Remove the redundant conditions. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 5 +---- drivers/net/wireless/intel/iwlwifi/fw/dbg.h | 2 +- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 11 +++-------- 3 files changed, 5 insertions(+), 13 deletions(-) commit 427ab6385cf302b35ea1dc53ebca938e0a8328b9 Author: Shahar S Matityahu Date: Mon May 13 10:10:19 2019 +0300 iwlwifi: dbg_ini: enforce apply point early on buffer allocation tlv Apply buffer allocation TLV only if it is set to apply point IWL_FW_INI_APPLY_EARLY. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) commit fc838c775f35e272e5cc7ef43853f0b55babbe37 Author: Shahar S Matityahu Date: Thu May 16 10:31:17 2019 +0300 iwlwifi: dbg: fix debug monitor stop and restart delays The driver should delay only in recording stop flow between writing to DBGC_IN_SAMPLE register and DBGC_OUT_CTRL register. Any other delay is not needed. Change the following: 1. Remove any unnecessary delays in the flow 2. Increase the delay in the stop recording flow since 100 micro is not enough 3. Use usleep_range instead of delay since the driver is allowed to sleep in this flow. Signed-off-by: Shahar S Matityahu Fixes: 5cfe79c8d92a ("iwlwifi: fw: stop and start debugging using host command") Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 2 -- drivers/net/wireless/intel/iwlwifi/fw/dbg.h | 6 ++++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit c4d3f2ee66a8dd5e2f5876488a1fa876484617ca Author: Luca Coelho Date: Wed May 15 15:09:24 2019 +0300 iwlwifi: pcie: increase the size of PCI dumps Currently we dump only the first 64 bytes of the PCI config space, which leaves out some important things, such as the base address registers. Increase it to 352 for the PCI device and to 524 for the rootport to make sure we include everything we need. Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) commit ac70499ee97231a418dc1a4d6c9dc102e8f64631 Author: Andrei Otcheretianski Date: Mon Apr 15 16:45:04 2019 +0300 iwlwifi: mvm: Drop large non sta frames In some buggy scenarios we could possible attempt to transmit frames larger than maximum MSDU size. Since our devices don't know how to handle this, it may result in asserts, hangs etc. This can happen, for example, when we receive a large multicast frame and try to transmit it back to the air in AP mode. Since in a legal scenario this should never happen, drop such frames and warn about it. Signed-off-by: Andrei Otcheretianski Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 3 +++ 1 file changed, 3 insertions(+) commit 4fd445a2c855bbcab81fbe06d110e78dbd974a5b Author: Haim Dreyfuss Date: Thu May 2 11:45:02 2019 +0300 iwlwifi: mvm: Add log information about SAR status Inform users when SAR status is changing. Signed-off-by: Haim Dreyfuss Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 3 +++ drivers/net/wireless/intel/iwlwifi/mvm/nvm.c | 9 +++++++++ 2 files changed, 12 insertions(+) commit 0c3d7282233c7b02c74400b49981d6fff1d683a8 Author: Haim Dreyfuss Date: Wed Feb 27 16:43:45 2019 +0200 iwlwifi: Add support for SAR South Korea limitation South Korea is adding a more strict SAR limit called "Limb SAR". Currently, WGDS SAR offset group 3 is not used (not mapped to any country). In order to be able to comply with South Korea new restriction: - OEM will use WGDS SAR offset group 3 to South Korea limitation. - OEM will change WGDS revision to 1 (currently latest revision is 0) to notify that Korea Limb SAR applied. - Driver will read the WGDS table and pass the values to FW (as usual) - Driver will pass to FW an indication that Korea Limb SAR is applied in case table revision is 1. Signed-off-by: Haim Dreyfuss Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/fw/acpi.c | 28 +++++++----- drivers/net/wireless/intel/iwlwifi/fw/acpi.h | 5 ++- drivers/net/wireless/intel/iwlwifi/fw/api/power.h | 12 +++++ drivers/net/wireless/intel/iwlwifi/fw/file.h | 3 ++ drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 55 ++++++++++++++++------- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 1 + 6 files changed, 76 insertions(+), 28 deletions(-) commit ee3399e5230c5a22185aefb2cbfffdfe0f46dd7c Author: Johannes Berg Date: Fri May 10 12:35:17 2019 +0200 iwlwifi: fix module init error paths When the module fails to initialize for some reason, it doesn't clean up properly. Fix that. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 5cc74f65a92c27db07fa318e9cab67961111ebf0 Author: Shaul Triebitz Date: Tue May 1 13:28:23 2018 +0300 iwlwifi: mvm: convert to FW AC when configuring MU EDCA The AC numbers used by mac80211 differ from those used by the firmware. When setting MU EDCA params for each AC, use the correct FW AC numbers. Signed-off-by: Shaul Triebitz Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit b5e2fe356e09cd8576529dce832f2a6599fa88a4 Author: Naftali Goldstein Date: Mon May 13 16:36:30 2019 +0300 iwlwifi: mvm: correctly fill the ac array in the iwl_mac_ctx_cmd The indexes into the ac array in the iwl_mac_ctx_cmd are from the iwl_ac enum and not the txfs. The current code therefore puts the edca params in the wrong indexes of the array, causing wrong priority for data-streams of different ACs. Fix this. Note that this bug only occurs in NICs that use the new tx api, since in the old tx api the txf number is equal to the corresponding ac in the iwl_ac enum. Signed-off-by: Naftali Goldstein Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 11 ++++++----- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 1 + drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 12 ++++++++++++ 3 files changed, 19 insertions(+), 5 deletions(-) commit bd9c519785926c72ff66e1b7218a622ace1da0eb Author: Dan Carpenter Date: Mon May 6 15:54:09 2019 +0300 iwlwifi: remove some unnecessary NULL checks These pointers are an offset into the "sta" struct. They're assigned like this: const struct ieee80211_sta_vht_cap *vht_cap = &sta->vht_cap; They're not the first member of the struct (->supp_rates[] is first) so they can't be NULL. Signed-off-by: Dan Carpenter Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) commit e344896723562d1288ba76cc8f232718b9a435f7 Author: Gustavo A. R. Silva Date: Wed Apr 3 11:03:42 2019 -0500 iwlwifi: d3: Use struct_size() helper Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes, in particular in the context in which this code is being used. So, change the following form: sizeof(*pattern_cmd) + wowlan->n_patterns * sizeof(struct iwlagn_wowlan_pattern) to : struct_size(pattern_cmd, patterns, wowlan->n_patterns) This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8283f4f85c49129ca2c4e682848afc09c7dec949 Author: Gustavo A. R. Silva Date: Wed Apr 3 10:59:01 2019 -0500 iwlwifi: lib: Use struct_size() helper Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes, in particular in the context in which this code is being used. So, change the following form: sizeof(*pattern_cmd) + wowlan->n_patterns * sizeof(struct iwlagn_wowlan_pattern) to : struct_size(pattern_cmd, patterns, wowlan->n_patterns) This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/dvm/lib.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 3e832fd10f7f1e26f1fb34797c06a01abc37fa63 Author: Shahar S Matityahu Date: Wed May 1 17:13:02 2019 +0300 iwlwifi: fw api: support adwell HB default APs number api Support adaptive dwell high band default number of APs new api. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/fw/api/scan.h | 15 +++++++++++++++ drivers/net/wireless/intel/iwlwifi/fw/file.h | 1 + drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 6 ++++++ drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 12 +++++++++--- 4 files changed, 31 insertions(+), 3 deletions(-) commit d6882e586f94daa21d668b311fb0c88e34aa64b0 Author: Mordechay Goodstein Date: Wed May 1 20:48:12 2019 +0300 iwlwifi: mvm: remove multiple debugfs entries Now that we have per station control over amsdu size no need for multiple entries, especially that the old one is misleading due to not setting it for all protocols as a limit. Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c | 20 -------------------- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 1 - drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 9 +-------- 3 files changed, 1 insertion(+), 29 deletions(-) commit 0a3a3e9ec5aa43bca241ff10929761a0b6a9f917 Author: Shahar S Matityahu Date: Thu Apr 18 10:24:28 2019 +0300 iwlwifi: dbg_ini: implement dump info collection The info struct contains data about the FW, HW, RF and the debug configuration. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 67 ++++++++++++++++++++++ drivers/net/wireless/intel/iwlwifi/fw/dbg.h | 18 ++++++ drivers/net/wireless/intel/iwlwifi/fw/error-dump.h | 62 ++++++++++++++++++++ drivers/net/wireless/intel/iwlwifi/fw/runtime.h | 9 +++ drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 2 + 5 files changed, 158 insertions(+) commit af2984e9e6251fb51fa86a0f1e1cfa9ce7088a7c Author: Mordechay Goodstein Date: Sun Apr 21 16:37:38 2019 +0300 iwlwifi: mvm: add a debugfs entry to set a fixed size AMSDU for all TX packets The current debugfs entry only limits the max AMSDU for TCP. Add a new debugfs entry to allow setting a fixed AMSDU size for all TX packets, including UDP and ICMP Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c | 46 +++++++++++++++++++++++- drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/sta.h | 4 +++ 3 files changed, 50 insertions(+), 2 deletions(-) commit 57d88b116175cd6e9293bef5355094c7dab4b747 Author: Shahar S Matityahu Date: Thu Apr 18 10:15:19 2019 +0300 iwlwifi: dbg_ini: support debug info TLV Add support to debug info TLV. The TLV contains human readable naming of the FW image and the debug configuration. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho .../net/wireless/intel/iwlwifi/fw/api/dbg-tlv.h | 22 ++++++++ drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 65 +++++++++++++++++++--- drivers/net/wireless/intel/iwlwifi/fw/file.h | 13 +++-- drivers/net/wireless/intel/iwlwifi/fw/runtime.h | 4 ++ drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c | 1 + drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 1 + 6 files changed, 91 insertions(+), 15 deletions(-) commit dc14b800cdd3a5e9bedcc66c61d6fe72602e50fc Author: Shahar S Matityahu Date: Sun Apr 28 11:17:53 2019 +0300 iwlwifi: dbg_ini: use different barker for ini dump Use a different barker for ini dump to allow differentiation from legacy dump. Also it allows to remove INI_BIT from dump TLVs. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 4 ++-- drivers/net/wireless/intel/iwlwifi/fw/error-dump.h | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) commit c7ab138eb132e197c6f594b11ca8aa87755d2810 Author: Shahar S Matityahu Date: Tue Apr 2 15:28:46 2019 +0300 iwlwifi: dbg_ini: add consecutive trigger firing support When a dump trigger is fired, the driver sets IWL_FWRT_STATUS_DUMPING and aborts any consecutive dump collection. To allow consecutive triggers firing, use 5 dump workers and allocate them upon incoming dump collection requests. This functionality is needed since in ini debug mode each trigger may have entirely different memory regions to collect unlike the legacy mode in which all the triggers dump the same memory regions. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 76 ++++++++++++++--------- drivers/net/wireless/intel/iwlwifi/fw/dbg.h | 19 ++++-- drivers/net/wireless/intel/iwlwifi/fw/init.c | 7 ++- drivers/net/wireless/intel/iwlwifi/fw/runtime.h | 15 +++-- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 16 ++--- 6 files changed, 84 insertions(+), 51 deletions(-) commit e8704b81921684446984a1b81a1bcae8290ca98a Author: Shahar S Matityahu Date: Mon Apr 8 16:56:08 2019 +0300 iwlwifi: dbg_ini: abort region collection in case the size is 0 Allows to abort region collection in case the region size is 0. It is needed for future regions that their size might be 0. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 53 ++++++++++++++++++----------- 1 file changed, 33 insertions(+), 20 deletions(-) commit 6669e924a755d699cadce7ff36a8da38f040f989 Author: Johannes Berg Date: Thu Apr 4 15:51:43 2019 +0200 iwlwifi: update CSI API Update the CSI API to the new version supported by the firmware. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/fw/api/location.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 973193554cae6b055474964f995e36c42d195137 Author: Shahar S Matityahu Date: Mon Apr 8 10:57:09 2019 +0300 iwlwifi: dbg_ini: dump headers cleanup Unite dump memory ranges under a single struct and add a specific header for each type of memory. Also, maintain a single version to all dump structures. This cleanup is also needed for the future addition of FW notification regions and others. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 57 +++++++++------------ drivers/net/wireless/intel/iwlwifi/fw/dbg.h | 3 -- drivers/net/wireless/intel/iwlwifi/fw/error-dump.h | 59 ++++++++++------------ 3 files changed, 52 insertions(+), 67 deletions(-) commit e4eee9438860aa8ff7a42a579ab213ada244bf39 Author: Shahar S Matityahu Date: Tue Mar 26 09:55:37 2019 +0200 iwlwifi: dbg: allow dump collection in case of an early error Improve the robustness of the dump collection flow in case of an early error: 1. in iwl_trans_pcie_sync_nmi, disable and enable interrupts only if they were already enabled 2. attempt to initiate dump collection in iwl_fw_dbg_error_collect only if the device is enabled 3. check Tx command queue was already allocated before trying to collect it Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 7 +++++-- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 21 +++++++++++++++++---- 2 files changed, 22 insertions(+), 6 deletions(-) commit 9ae3b870a8ffa24b506d6683f61ddba9c51644a7 Author: Jiri Kosina Date: Mon Apr 15 14:07:09 2019 +0200 iwlwifi: iwl_mvm_tx_mpdu() must be called with BH disabled As iwl_mvm_tx_mpdu() is not disabling BH while obtaining iwl_mvm_sta->lock (which is being taken from BH context as well), it has to be always invoked with BH disabled. Make that clear in a comment. Signed-off-by: Jiri Kosina Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 89b171acb222dc5283c66a1e99f2ac835eab0a3c Author: Christoph Hellwig Date: Fri Jun 28 19:31:36 2019 -0700 xfs: fix iclog allocation size Properly allocate the space for the bio_vecs instead of just one byte per bio_vec. Fixes: 79b54d9bfcdcd0a ("xfs: use bios directly to write log buffers") Reported-by: syzbot+b75afdbe271a0d7ac4f6@syzkaller.appspotmail.com Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_log.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 250d4b4c409778bc44577dfc59909935c92fd006 Author: Eric Sandeen Date: Fri Jun 28 19:30:43 2019 -0700 xfs: remove unused header files There are many, many xfs header files which are included but unneeded (or included twice) in the xfs code, so remove them. nb: xfs_linux.h includes about 9 headers for everyone, so those explicit includes get removed by this. I'm not sure what the preference is, but if we wanted explicit includes everywhere, a followup patch could remove those xfs_*.h includes from xfs_linux.h and move them into the files that need them. Or it could be left as-is. Signed-off-by: Eric Sandeen Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/kmem.c | 5 ----- fs/xfs/libxfs/xfs_ag_resv.c | 8 -------- fs/xfs/libxfs/xfs_alloc.c | 2 -- fs/xfs/libxfs/xfs_alloc_btree.c | 1 - fs/xfs/libxfs/xfs_attr.c | 5 ----- fs/xfs/libxfs/xfs_attr_leaf.c | 3 --- fs/xfs/libxfs/xfs_attr_remote.c | 8 -------- fs/xfs/libxfs/xfs_bit.c | 1 - fs/xfs/libxfs/xfs_bmap.c | 5 ----- fs/xfs/libxfs/xfs_bmap_btree.c | 3 --- fs/xfs/libxfs/xfs_btree.c | 3 --- fs/xfs/libxfs/xfs_da_btree.c | 6 ------ fs/xfs/libxfs/xfs_da_format.c | 3 --- fs/xfs/libxfs/xfs_defer.c | 2 -- fs/xfs/libxfs/xfs_dir2.c | 5 ----- fs/xfs/libxfs/xfs_dir2_block.c | 4 ---- fs/xfs/libxfs/xfs_dir2_data.c | 4 ---- fs/xfs/libxfs/xfs_dir2_leaf.c | 4 ---- fs/xfs/libxfs/xfs_dir2_node.c | 3 --- fs/xfs/libxfs/xfs_dir2_sf.c | 4 ---- fs/xfs/libxfs/xfs_dquot_buf.c | 2 -- fs/xfs/libxfs/xfs_ialloc.c | 3 --- fs/xfs/libxfs/xfs_ialloc_btree.c | 2 -- fs/xfs/libxfs/xfs_iext_tree.c | 5 ----- fs/xfs/libxfs/xfs_inode_buf.c | 2 -- fs/xfs/libxfs/xfs_inode_fork.c | 3 --- fs/xfs/libxfs/xfs_log_rlimit.c | 2 -- fs/xfs/libxfs/xfs_refcount.c | 2 -- fs/xfs/libxfs/xfs_refcount_btree.c | 2 -- fs/xfs/libxfs/xfs_rmap.c | 7 ------- fs/xfs/libxfs/xfs_rmap_btree.c | 4 ---- fs/xfs/libxfs/xfs_rtbitmap.c | 8 -------- fs/xfs/libxfs/xfs_sb.c | 7 ------- fs/xfs/libxfs/xfs_symlink_remote.c | 4 ---- fs/xfs/libxfs/xfs_trans_resv.c | 2 -- fs/xfs/libxfs/xfs_types.c | 9 --------- fs/xfs/scrub/agheader.c | 7 ------- fs/xfs/scrub/agheader_repair.c | 5 ----- fs/xfs/scrub/alloc.c | 7 ------- fs/xfs/scrub/attr.c | 10 ---------- fs/xfs/scrub/bitmap.c | 5 ----- fs/xfs/scrub/bmap.c | 8 -------- fs/xfs/scrub/btree.c | 7 ------- fs/xfs/scrub/common.c | 8 -------- fs/xfs/scrub/dabtree.c | 8 -------- fs/xfs/scrub/dir.c | 10 ---------- fs/xfs/scrub/fscounters.c | 12 ------------ fs/xfs/scrub/health.c | 8 -------- fs/xfs/scrub/ialloc.c | 7 ------- fs/xfs/scrub/inode.c | 10 ---------- fs/xfs/scrub/parent.c | 8 -------- fs/xfs/scrub/quota.c | 11 ----------- fs/xfs/scrub/refcount.c | 10 ---------- fs/xfs/scrub/repair.c | 8 -------- fs/xfs/scrub/rmap.c | 9 --------- fs/xfs/scrub/rtbitmap.c | 7 ------- fs/xfs/scrub/scrub.c | 20 -------------------- fs/xfs/scrub/symlink.c | 8 -------- fs/xfs/scrub/trace.c | 6 ------ fs/xfs/xfs_acl.c | 3 --- fs/xfs/xfs_aops.c | 5 ----- fs/xfs/xfs_attr_inactive.c | 5 ----- fs/xfs/xfs_attr_list.c | 6 ------ fs/xfs/xfs_bmap_item.c | 2 -- fs/xfs/xfs_bmap_util.c | 5 ----- fs/xfs/xfs_buf.c | 16 ---------------- fs/xfs/xfs_buf_item.c | 3 --- fs/xfs/xfs_dir2_readdir.c | 4 ---- fs/xfs/xfs_discard.c | 3 --- fs/xfs/xfs_dquot.c | 4 ---- fs/xfs/xfs_dquot_item.c | 1 - fs/xfs/xfs_export.c | 3 --- fs/xfs/xfs_extfree_item.c | 1 - fs/xfs/xfs_file.c | 5 ----- fs/xfs/xfs_filestream.c | 4 ---- fs/xfs/xfs_fsmap.c | 4 ---- fs/xfs/xfs_fsops.c | 4 ---- fs/xfs/xfs_globals.c | 1 - fs/xfs/xfs_health.c | 4 ---- fs/xfs/xfs_icache.c | 3 --- fs/xfs/xfs_icreate_item.c | 5 ----- fs/xfs/xfs_inode.c | 6 ------ fs/xfs/xfs_inode_item.c | 1 - fs/xfs/xfs_ioctl.c | 9 --------- fs/xfs/xfs_ioctl32.c | 6 ------ fs/xfs/xfs_iomap.c | 3 --- fs/xfs/xfs_iops.c | 10 ---------- fs/xfs/xfs_itable.c | 1 - fs/xfs/xfs_log.c | 4 ---- fs/xfs/xfs_log_cil.c | 3 --- fs/xfs/xfs_log_recover.c | 3 --- fs/xfs/xfs_message.c | 1 - fs/xfs/xfs_mount.c | 4 ---- fs/xfs/xfs_pnfs.c | 8 -------- fs/xfs/xfs_qm.c | 4 ---- fs/xfs/xfs_qm_bhv.c | 1 - fs/xfs/xfs_qm_syscalls.c | 5 ----- fs/xfs/xfs_quotaops.c | 2 -- fs/xfs/xfs_refcount_item.c | 1 - fs/xfs/xfs_reflink.c | 11 ----------- fs/xfs/xfs_rmap_item.c | 1 - fs/xfs/xfs_rtalloc.c | 6 ------ fs/xfs/xfs_stats.c | 1 - fs/xfs/xfs_super.c | 13 ------------- fs/xfs/xfs_symlink.c | 9 --------- fs/xfs/xfs_sysctl.c | 3 --- fs/xfs/xfs_sysfs.c | 2 -- fs/xfs/xfs_trace.c | 8 -------- fs/xfs/xfs_trans.c | 1 - fs/xfs/xfs_trans_buf.c | 2 -- fs/xfs/xfs_trans_dquot.c | 1 - fs/xfs/xfs_trans_inode.c | 3 --- fs/xfs/xfs_xattr.c | 4 ---- 113 files changed, 570 deletions(-) commit adfb5fb46af059387eca0fce1d8cd8733f9ee3a0 Author: Christoph Hellwig Date: Fri Jun 28 19:30:22 2019 -0700 xfs: implement cgroup aware writeback Link every newly allocated writeback bio to cgroup pointed to by the writeback control structure, and charge every byte written back to it. Tested-by: Stefan Priebe - Profihost AG Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_aops.c | 4 +++- fs/xfs/xfs_super.c | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) commit a247373596677bd38a88fcaf1606be51a44c614d Author: Christoph Hellwig Date: Fri Jun 28 19:30:22 2019 -0700 xfs: simplify xfs_chain_bio Move setting up operation and write hint to xfs_alloc_ioend, and then just copy over all needed information from the previous bio in xfs_chain_bio and stop passing various parameters to it. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_aops.c | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) commit f327a00745fffd9159d54b442cb75c0266fb89d6 Author: Darrick J. Wong Date: Fri Jun 28 19:30:21 2019 -0700 xfs: account for log space when formatting new AGs When we're writing out a fresh new AG, make sure that we don't list an internal log as free and that we create the rmap for the region. growfs never does this, but we will need it when we hook up mkfs. Signed-off-by: Darrick J. Wong Reviewed-by: Allison Collins Reviewed-by: Christoph Hellwig fs/xfs/libxfs/xfs_ag.c | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) commit 8d90857cff445f176a591d01c0999e8d563217bf Author: Darrick J. Wong Date: Fri Jun 28 19:30:21 2019 -0700 xfs: refactor free space btree record initialization Refactor the code that populates the free space btrees of a new AG so that we can avoid code duplication once things start getting complicated. Signed-off-by: Darrick J. Wong Reviewed-by: Allison Collins Reviewed-by: Christoph Hellwig fs/xfs/libxfs/xfs_ag.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) commit 7e36a3a63d3e480e75b4991aa983d4059ca5d401 Author: Brian Foster Date: Fri Jun 28 19:30:20 2019 -0700 xfs: always update params on small allocation xfs_alloc_ag_vextent_small() doesn't update the output parameters in the event of an AGFL allocation. Instead, it updates the xfs_alloc_arg structure directly to complete the allocation. Update both args and the output params to provide consistent behavior for future callers. Signed-off-by: Brian Foster Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_alloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6691cd9267c1c588d1f8e097c175d7c9670c7fc1 Author: Brian Foster Date: Fri Jun 28 19:30:20 2019 -0700 xfs: skip small alloc cntbt logic on NULL cursor The small allocation helper is implemented in a way that is fairly tightly integrated to the existing allocation algorithms. It expects a cntbt cursor beyond the end of the tree, attempts to locate the last record in the tree and only attempts an AGFL allocation if the cntbt is empty. The upcoming generic algorithm doesn't rely on the cntbt processing of this function. It will only call this function when the cntbt doesn't have a big enough extent or is empty and thus AGFL allocation is the only remaining option. Tweak xfs_alloc_ag_vextent_small() to handle a NULL cntbt cursor and skip the cntbt logic. This facilitates use by the existing allocation code and new code that only requires an AGFL allocation attempt. Signed-off-by: Brian Foster Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_alloc.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit c63cdd4fc9cc6a22d6e0bd0dcba4a28d18eab723 Author: Brian Foster Date: Fri Jun 28 19:30:19 2019 -0700 xfs: move small allocation helper Move the small allocation helper further up in the file to avoid the need for a function declaration. The remaining declarations will be removed by followup patches. No functional changes. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_alloc.c | 190 +++++++++++++++++++++++----------------------- 1 file changed, 94 insertions(+), 96 deletions(-) commit 2a4f35f984f0be5b839be157b50f69ee73c67ef1 Author: Brian Foster Date: Fri Jun 28 19:30:19 2019 -0700 xfs: clean up small allocation helper xfs_alloc_ag_vextent_small() is kind of a mess. Clean it up in preparation for future changes. No functional changes. Signed-off-by: Brian Foster Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_alloc.c | 132 +++++++++++++++++++++------------------------- 1 file changed, 60 insertions(+), 72 deletions(-) commit caeaea98583230cd5c8ede3605b1195f48a79aed Author: Christoph Hellwig Date: Fri Jun 28 19:29:42 2019 -0700 xfs: merge xfs_trans_bmap.c into xfs_bmap_item.c Keep all bmap item related code together. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/Makefile | 1 - fs/xfs/xfs_bmap_item.c | 199 +++++++++++++++++++++++++++++++++++++++++++- fs/xfs/xfs_trans.h | 11 --- fs/xfs/xfs_trans_bmap.c | 216 ------------------------------------------------ 4 files changed, 198 insertions(+), 229 deletions(-) commit 3cfce1e3ce8eaedd14de91ddf473a588174e776c Author: Christoph Hellwig Date: Fri Jun 28 19:29:41 2019 -0700 xfs: merge xfs_trans_rmap.c into xfs_rmap_item.c Keep all rmap item related code together in one file. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/Makefile | 3 +- fs/xfs/xfs_rmap_item.c | 229 +++++++++++++++++++++++++++++++++++++++++++- fs/xfs/xfs_trans.h | 11 --- fs/xfs/xfs_trans_rmap.c | 245 ------------------------------------------------ 4 files changed, 229 insertions(+), 259 deletions(-) commit effd5e96e7d576135fed303c0fe49af331f57030 Author: Christoph Hellwig Date: Fri Jun 28 19:29:41 2019 -0700 xfs: merge xfs_trans_refcount.c into xfs_refcount_item.c Keep all the refcount item related code together in one file. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/Makefile | 1 - fs/xfs/xfs_refcount_item.c | 208 +++++++++++++++++++++++++++++++++++++++- fs/xfs/xfs_trans.h | 11 --- fs/xfs/xfs_trans_refcount.c | 224 -------------------------------------------- 4 files changed, 207 insertions(+), 237 deletions(-) commit 81f40041735180e80a131b0062b339deb8f9e319 Author: Christoph Hellwig Date: Fri Jun 28 19:28:17 2019 -0700 xfs: merge xfs_trans_extfree.c into xfs_extfree_item.c Keep all the extree item related code together in one file. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/Makefile | 1 - fs/xfs/xfs_extfree_item.c | 245 +++++++++++++++++++++++++++++++++++++++++- fs/xfs/xfs_trans.h | 8 -- fs/xfs/xfs_trans_extfree.c | 260 --------------------------------------------- 4 files changed, 244 insertions(+), 270 deletions(-) commit 73f0d23633c10d311a14a0cadb75fff2faa73688 Author: Christoph Hellwig Date: Fri Jun 28 19:27:36 2019 -0700 xfs: merge xfs_bud_init into xfs_trans_get_bud There is no good reason to keep these two functions separate. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_bmap_item.c | 14 ++++++-------- fs/xfs/xfs_bmap_item.h | 2 -- fs/xfs/xfs_trans_bmap.c | 16 ---------------- 3 files changed, 6 insertions(+), 26 deletions(-) commit 60883447f45226d95be3b213c32d255db23ab4e6 Author: Christoph Hellwig Date: Fri Jun 28 19:27:36 2019 -0700 xfs: merge xfs_rud_init into xfs_trans_get_rud There is no good reason to keep these two functions separate. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_rmap_item.c | 14 ++++++-------- fs/xfs/xfs_rmap_item.h | 2 -- fs/xfs/xfs_trans_rmap.c | 12 ------------ 3 files changed, 6 insertions(+), 22 deletions(-) commit ebeb8e062906e1f715908e3e339eb197b7121ad0 Author: Christoph Hellwig Date: Fri Jun 28 19:27:35 2019 -0700 xfs: merge xfs_cud_init into xfs_trans_get_cud There is no good reason to keep these two functions separate. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_refcount_item.c | 14 ++++++-------- fs/xfs/xfs_refcount_item.h | 2 -- fs/xfs/xfs_trans_refcount.c | 16 ---------------- 3 files changed, 6 insertions(+), 26 deletions(-) commit 9c5e7c2ae34bc8c261daf4dc536f2c7c64ed40ca Author: Christoph Hellwig Date: Fri Jun 28 19:27:35 2019 -0700 xfs: merge xfs_efd_init into xfs_trans_get_efd There is no good reason to keep these two functions separate. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_extfree_item.c | 27 +++++++++++++++------------ fs/xfs/xfs_extfree_item.h | 2 -- fs/xfs/xfs_trans_extfree.c | 26 -------------------------- 3 files changed, 15 insertions(+), 40 deletions(-) commit 95cf0e4a0ddc59f17eacfb4d06e0950ea5f624ca Author: Christoph Hellwig Date: Fri Jun 28 19:27:34 2019 -0700 xfs: remove a pointless comment duplicated above all xfs_item_ops instances Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_bmap_item.c | 6 ------ fs/xfs/xfs_buf_item.c | 3 --- fs/xfs/xfs_dquot_item.c | 6 ------ fs/xfs/xfs_extfree_item.c | 6 ------ fs/xfs/xfs_icreate_item.c | 3 --- fs/xfs/xfs_inode_item.c | 3 --- fs/xfs/xfs_refcount_item.c | 6 ------ fs/xfs/xfs_rmap_item.c | 6 ------ 8 files changed, 39 deletions(-) commit 89ae379d564c5d8ed7fcf95ac21c7276811749eb Author: Christoph Hellwig Date: Fri Jun 28 19:27:34 2019 -0700 xfs: use a list_head for iclog callbacks Replace the hand grown linked list handling and cil context attachment with the standard list_head structure. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_log.c | 51 +++++++++------------------------------------------ fs/xfs/xfs_log.h | 15 +++------------ fs/xfs/xfs_log_cil.c | 32 ++++++++++++++++++++++++-------- fs/xfs/xfs_log_priv.h | 10 +++------- 4 files changed, 39 insertions(+), 69 deletions(-) commit efe2330fdc246a29b36f94f3c8bd8896b88dca6d Author: Christoph Hellwig Date: Fri Jun 28 19:27:33 2019 -0700 xfs: remove the xfs_log_item_t typedef Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_buf_item.c | 6 +++--- fs/xfs/xfs_buf_item.h | 6 +++--- fs/xfs/xfs_dquot_item.h | 4 ++-- fs/xfs/xfs_extfree_item.h | 4 ++-- fs/xfs/xfs_inode.c | 12 ++++++------ fs/xfs/xfs_inode_item.h | 2 +- fs/xfs/xfs_log_recover.c | 2 +- fs/xfs/xfs_trans.h | 16 ++++++++-------- fs/xfs/xfs_trans_ail.c | 44 ++++++++++++++++++++++---------------------- 9 files changed, 48 insertions(+), 48 deletions(-) commit b3b14aacc6765eb908f13d0422d9b2d0cd822e14 Author: Christoph Hellwig Date: Fri Jun 28 19:27:33 2019 -0700 xfs: don't cast inode_log_items to get the log_item The cast is not type safe, and we can just dereference the first member instead to start with. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_inode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9ce632a28a41bd9aeeaa3913d95b23648a82c2ee Author: Christoph Hellwig Date: Fri Jun 28 19:27:32 2019 -0700 xfs: add a flag to release log items on commit We have various items that are released from ->iop_comitting. Add a flag to just call ->iop_release from the commit path to avoid tons of boilerplate code. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_bmap_item.c | 27 +-------------------------- fs/xfs/xfs_extfree_item.c | 27 +-------------------------- fs/xfs/xfs_icreate_item.c | 18 +----------------- fs/xfs/xfs_refcount_item.c | 27 +-------------------------- fs/xfs/xfs_rmap_item.c | 27 +-------------------------- fs/xfs/xfs_trans.c | 6 ++++++ fs/xfs/xfs_trans.h | 7 +++++++ 7 files changed, 18 insertions(+), 121 deletions(-) commit ddf92053e45c0e07dcb031b56512d52f98cde517 Author: Christoph Hellwig Date: Fri Jun 28 19:27:32 2019 -0700 xfs: split iop_unlock The iop_unlock method is called when comitting or cancelling a transaction. In the latter case, the transaction may or may not be aborted. While there is no known problem with the current code in practice, this implementation is limited in that any log item implementation that might want to differentiate between a commit and a cancellation must rely on the aborted state. The aborted bit is only set when the cancelled transaction is dirty, however. This means that there is no way to distinguish between a commit and a clean transaction cancellation. For example, intent log items currently rely on this distinction. The log item is either transferred to the CIL on commit or released on transaction cancel. There is currently no possibility for a clean intent log item in a transaction, but if that state is ever introduced a cancel of such a transaction will immediately result in memory leaks of the associated log item(s). This is an interface deficiency and landmine. To clean this up, replace the iop_unlock method with an iop_release method that is specific to transaction cancel. The existing iop_committing method occurs at the same time as iop_unlock in the commit path and there is no need for two separate callbacks here. Overload the iop_committing method with the current commit time iop_unlock implementations to eliminate the need for the latter and further simplify the interface. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_bmap_item.c | 17 +++++++---------- fs/xfs/xfs_buf_item.c | 15 ++++++++++++--- fs/xfs/xfs_dquot_item.c | 19 +++++++++++-------- fs/xfs/xfs_extfree_item.c | 17 +++++++---------- fs/xfs/xfs_icreate_item.c | 10 +++------- fs/xfs/xfs_inode_item.c | 11 ++++++----- fs/xfs/xfs_log_cil.c | 2 -- fs/xfs/xfs_refcount_item.c | 17 +++++++---------- fs/xfs/xfs_rmap_item.c | 17 +++++++---------- fs/xfs/xfs_trace.h | 2 +- fs/xfs/xfs_trans.c | 7 +++---- fs/xfs/xfs_trans.h | 4 ++-- fs/xfs/xfs_trans_buf.c | 2 +- 13 files changed, 67 insertions(+), 73 deletions(-) commit 195cd83d1b8835a2f344ed411b46bba48ddfcc49 Author: Christoph Hellwig Date: Fri Jun 28 19:27:31 2019 -0700 xfs: don't use xfs_trans_free_items in the commit path While commiting items looks very similar to freeing them on error it is a different operation, and they will diverge a bit soon. Split out the commit case from xfs_trans_free_items, inline it into xfs_log_commit_cil and give it a separate trace point. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_log_cil.c | 13 ++++++++++--- fs/xfs/xfs_trace.h | 1 + fs/xfs/xfs_trans.c | 10 +++------- fs/xfs/xfs_trans_priv.h | 2 -- 4 files changed, 14 insertions(+), 12 deletions(-) commit 8e4b20ea83c27501352316757ccf08e897018a26 Author: Christoph Hellwig Date: Fri Jun 28 19:27:31 2019 -0700 xfs: remove the dummy iop_push implementation for inode creation items This method should never be called, so don't waste code on it. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_icreate_item.c | 11 ----------- 1 file changed, 11 deletions(-) commit e8b78db77d48fddd13fd249e88ab7bfffa0661fe Author: Christoph Hellwig Date: Fri Jun 28 19:27:30 2019 -0700 xfs: don't require log items to implement optional methods Just check if they are present first. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_bmap_item.c | 104 --------------------------------------------- fs/xfs/xfs_buf_item.c | 8 ---- fs/xfs/xfs_dquot_item.c | 98 ------------------------------------------ fs/xfs/xfs_extfree_item.c | 104 --------------------------------------------- fs/xfs/xfs_icreate_item.c | 28 ------------ fs/xfs/xfs_log_cil.c | 3 +- fs/xfs/xfs_refcount_item.c | 104 --------------------------------------------- fs/xfs/xfs_rmap_item.c | 104 --------------------------------------------- fs/xfs/xfs_trans.c | 21 ++++++--- fs/xfs/xfs_trans_ail.c | 8 ++++ 10 files changed, 25 insertions(+), 557 deletions(-) commit d15cbf2f38b2fbc78512561052953c94cc82a9f5 Author: Christoph Hellwig Date: Fri Jun 28 19:27:30 2019 -0700 xfs: stop using XFS_LI_ABORTED as a parameter flag Just pass a straight bool aborted instead of abusing XFS_LI_ABORTED as a flag in function parameters. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_log.c | 25 +++++++++++-------------- fs/xfs/xfs_log.h | 2 +- fs/xfs/xfs_log_cil.c | 4 ++-- fs/xfs/xfs_trans.c | 2 +- fs/xfs/xfs_trans_priv.h | 2 +- 5 files changed, 16 insertions(+), 19 deletions(-) commit 086252c34bc2c984e6be5f939efcc4c9616c22e1 Author: Christoph Hellwig Date: Fri Jun 28 19:27:29 2019 -0700 xfs: fix a trivial comment typo in xfs_trans_committed_bulk Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_trans.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dbd329f1e44ed48de8a1c19da5eb1218f5e1b4a5 Author: Christoph Hellwig Date: Fri Jun 28 19:27:29 2019 -0700 xfs: add struct xfs_mount pointer to struct xfs_buf We need to derive the mount pointer from a buffer in a lot of place. Add a direct pointer to short cut the pointer chasing. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong .../filesystems/xfs-self-describing-metadata.txt | 8 +++--- fs/xfs/libxfs/xfs_alloc.c | 12 ++++---- fs/xfs/libxfs/xfs_alloc_btree.c | 2 +- fs/xfs/libxfs/xfs_attr_leaf.c | 12 ++++---- fs/xfs/libxfs/xfs_attr_remote.c | 4 +-- fs/xfs/libxfs/xfs_bmap_btree.c | 2 +- fs/xfs/libxfs/xfs_btree.c | 16 +++++------ fs/xfs/libxfs/xfs_da_btree.c | 6 ++-- fs/xfs/libxfs/xfs_dir2_block.c | 6 ++-- fs/xfs/libxfs/xfs_dir2_data.c | 9 +++--- fs/xfs/libxfs/xfs_dir2_leaf.c | 6 ++-- fs/xfs/libxfs/xfs_dir2_node.c | 6 ++-- fs/xfs/libxfs/xfs_dquot_buf.c | 8 +++--- fs/xfs/libxfs/xfs_ialloc.c | 6 ++-- fs/xfs/libxfs/xfs_ialloc_btree.c | 2 +- fs/xfs/libxfs/xfs_inode_buf.c | 2 +- fs/xfs/libxfs/xfs_refcount_btree.c | 2 +- fs/xfs/libxfs/xfs_rmap_btree.c | 2 +- fs/xfs/libxfs/xfs_sb.c | 4 +-- fs/xfs/libxfs/xfs_symlink_remote.c | 6 ++-- fs/xfs/xfs_attr_inactive.c | 2 +- fs/xfs/xfs_buf.c | 32 ++++++++++------------ fs/xfs/xfs_buf.h | 1 + fs/xfs/xfs_buf_item.c | 4 +-- fs/xfs/xfs_error.c | 2 +- fs/xfs/xfs_log_recover.c | 11 ++++---- 26 files changed, 85 insertions(+), 88 deletions(-) commit 8124b9b6011d0c9c0021e827861168291bbebb55 Author: Christoph Hellwig Date: Fri Jun 28 19:27:28 2019 -0700 xfs: remove the b_io_length field in struct xfs_buf This field is now always idential to b_length. Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_buf.c | 5 ++--- fs/xfs/xfs_buf.h | 1 - fs/xfs/xfs_log_recover.c | 9 ++++----- 3 files changed, 6 insertions(+), 9 deletions(-) commit e99b4bd0cb04947066027edb2780346061b2b661 Author: Christoph Hellwig Date: Fri Jun 28 19:27:28 2019 -0700 xfs: properly type the b_log_item field in struct xfs_buf Now that the log code doesn't abuse this field any more we can declare it as a struct xfs_buf_log_item pointer. Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_buf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0564501ff5e7744b23598f84e93c5230c82e59d6 Author: Christoph Hellwig Date: Fri Jun 28 19:27:27 2019 -0700 xfs: remove unused buffer cache APIs Now that the log code uses bios directly we can drop various special cases in the buffer cache code. Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_buf.c | 83 ++------------------------------------------------------ fs/xfs/xfs_buf.h | 27 ------------------ 2 files changed, 2 insertions(+), 108 deletions(-) commit 6e9b3dd80f9c84a476ac6a760b6bbe69918d0016 Author: Christoph Hellwig Date: Fri Jun 28 19:27:27 2019 -0700 xfs: stop using bp naming for log recovery buffers Now that we don't use struct xfs_buf to hold log recovery buffer rename the related functions and variables to just talk of a buffer instead of using the bp name that we usually use for xfs_buf related functionality. Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_log_recover.c | 201 ++++++++++++++++++++++++----------------------- 1 file changed, 102 insertions(+), 99 deletions(-) commit 6ad5b3255b9e3d6d94154738aacd5119bf9c8f6e Author: Christoph Hellwig Date: Fri Jun 28 19:27:26 2019 -0700 xfs: use bios directly to read and write the log recovery buffers The xfs_buf structure is basically used as a glorified container for a memory allocation in the log recovery code. Replace it with a call to kmem_alloc_large and a simple abstraction to read into or write from it synchronously using chained bios. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/Makefile | 1 + fs/xfs/xfs_bio_io.c | 61 ++++++++++++ fs/xfs/xfs_linux.h | 3 + fs/xfs/xfs_log_recover.c | 241 +++++++++++++++++------------------------------ 4 files changed, 149 insertions(+), 157 deletions(-) commit 18ffb8c3f0bfd2a0b92026eb43651591288c3a39 Author: Christoph Hellwig Date: Fri Jun 28 19:27:26 2019 -0700 xfs: return an offset instead of a pointer from xlog_align This simplifies both the helper and the callers. We lost a bit of size sanity checking, but that is already covered by KASAN if needed. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_log_recover.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) commit 1058d0f5eeb422325e2574dbd88927dc821dee57 Author: Christoph Hellwig Date: Fri Jun 28 19:27:25 2019 -0700 xfs: move the log ioend workqueue to struct xlog Move the workqueue used for log I/O completions from struct xfs_mount to struct xlog to keep it self contained in the log code. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong [darrick: destroy the log workqueue after ensuring log ios are done] Signed-off-by: Darrick J. Wong fs/xfs/xfs_log.c | 13 +++++++++++-- fs/xfs/xfs_log_priv.h | 1 + fs/xfs/xfs_mount.h | 1 - fs/xfs/xfs_super.c | 11 +---------- 4 files changed, 13 insertions(+), 13 deletions(-) commit 79b54d9bfcdcd0a431bb3501013885f8f00cdb43 Author: Christoph Hellwig Date: Fri Jun 28 19:27:25 2019 -0700 xfs: use bios directly to write log buffers Currently the XFS logging code uses the xfs_buf structure and associated APIs to write the log buffers to disk. This requires various special cases in the log code and is generally not very optimal. Instead of using a buffer just allocate a kmem_alloc_larger region for each log buffer, and use a bio and bio_vec array embedded in the iclog structure to write the buffer to disk. This also allows for using the bio split and chaining case to deal with the case of a log buffer wrapping around the end of the log. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong [darrick: don't split if/else with an #endif] Signed-off-by: Darrick J. Wong fs/xfs/xfs_log.c | 230 ++++++++++++++++++++++++-------------------------- fs/xfs/xfs_log_priv.h | 18 ++-- 2 files changed, 118 insertions(+), 130 deletions(-) commit 2d15d2c0e0f7ecd60bb9fa3b807b7f04314ffe82 Author: Christoph Hellwig Date: Fri Jun 28 19:27:24 2019 -0700 xfs: make use of the l_targ field in struct xlog Use the slightly shorter way to get at the buftarg for the log device wherever we can in the log and log recovery code. Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_log.c | 6 +++--- fs/xfs/xfs_log_recover.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) commit abca1f33f869d84ebfb41c4040cfc91a9af11baf Author: Christoph Hellwig Date: Fri Jun 28 19:27:24 2019 -0700 xfs: remove the syncing argument from xlog_verify_iclog The only caller unconditionally passes true here. Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_log.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 9b0489c1d1918338ef32fe8a0e94989210d7c745 Author: Christoph Hellwig Date: Fri Jun 28 19:27:23 2019 -0700 xfs: update both stat counters together in xlog_sync Just a small bit of code tidying up. Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit db0a6faf938e9c6060d5ebabf239606b4f79b33c Author: Christoph Hellwig Date: Fri Jun 28 19:27:23 2019 -0700 xfs: factor out iclog size calculation from xlog_sync Split out another self-contained bit of code from xlog_sync. Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_log.c | 67 ++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 41 insertions(+), 26 deletions(-) commit 5693384805ab2a3d474efccb968e32f9e2edbaf7 Author: Christoph Hellwig Date: Fri Jun 28 19:27:22 2019 -0700 xfs: factor out splitting of an iclog from xlog_sync Split out a self-contained chunk of code from xlog_sync that calculates the split offset for an iclog that wraps the log end and bumps the cycles for the second half. Use the chance to bring some sanity to the variables used to track the split in xlog_sync by not changing the count variable, and instead use split as the offset for the split and use those to calculate the sizes and offsets for the two write buffers. Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_log.c | 63 +++++++++++++++++++++++++++++--------------------------- 1 file changed, 33 insertions(+), 30 deletions(-) commit 94860a301b759ade6bbcf89ea7f5d19b3e2bf6d1 Author: Christoph Hellwig Date: Fri Jun 28 19:27:22 2019 -0700 xfs: factor out log buffer writing from xlog_sync Replace the not very useful xlog_bdstrat wrapper with a new version that that takes care of all the common logic for writing log buffers. Use the opportunity to avoid overloading the buffer address with the log relative address, and to shed the unused return value. Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_log.c | 125 ++++++++++++++++++++----------------------------------- 1 file changed, 45 insertions(+), 80 deletions(-) commit 1f9489be025732fa210de4e6cfd9bd4440741f74 Author: Christoph Hellwig Date: Fri Jun 28 19:27:21 2019 -0700 xfs: don't use REQ_PREFLUSH for split log writes If we have to split a log write because it wraps the end of the log we can't just use REQ_PREFLUSH to flush before the first log write, as the writes might get reordered somewhere in the I/O stack. Issue a manual flush in that case so that the ordering of the two log I/Os doesn't matter. Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 366fc4b898b3ca999b26d7c9fab92cb31ce4ad2b Author: Christoph Hellwig Date: Fri Jun 28 19:27:21 2019 -0700 xfs: remove XLOG_STATE_IOABORT This value is the only flag in ic_state, which we otherwise use as a state. Switch it to a new debug-only field and also report and actual error in the buffer in the I/O completion path. Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_log.c | 20 +++++++++++--------- fs/xfs/xfs_log_priv.h | 4 +++- 2 files changed, 14 insertions(+), 10 deletions(-) commit 9bff313253ebfbf93537988ce0937a337c9fcf42 Author: Christoph Hellwig Date: Fri Jun 28 19:27:20 2019 -0700 xfs: reformat xlog_get_lowest_lsn Reformat xlog_get_lowest_lsn to our usual style. Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_log.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) commit 4f62282a369642b992771e78273a023769bf0d9a Author: Christoph Hellwig Date: Fri Jun 28 19:27:20 2019 -0700 xfs: cleanup xlog_get_iclog_buffer_size We don't really need all the messy branches in the function, as it really does three things, out of which 2 are common for all branches: 1) set up mount point log buffer size and count values if not already done from mount options 2) calculate the number of log headers 3) set up all the values in struct xlog based on the above Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_log.c | 52 +++++++++++----------------------------------------- 1 file changed, 11 insertions(+), 41 deletions(-) commit 76ce9823acf32ce446d1244a6cc01d4796492e31 Author: Christoph Hellwig Date: Fri Jun 28 19:27:19 2019 -0700 xfs: remove the l_iclog_size_log field from struct xlog This field is never used, so we can simply kill it. Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_log.c | 9 --------- fs/xfs/xfs_log_priv.h | 1 - 2 files changed, 10 deletions(-) commit 72945d86ddec143ee5064f36eae4b48b03ea1a3f Author: Christoph Hellwig Date: Fri Jun 28 19:27:19 2019 -0700 xfs: make mem_to_page available outside of xfs_buf.c Rename the function to kmem_to_page and move it to kmem.h together with our kmem_large allocator that may either return kmalloced or vmalloc pages. Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/kmem.h | 8 ++++++++ fs/xfs/xfs_buf.c | 13 +------------ 2 files changed, 9 insertions(+), 12 deletions(-) commit ce89755cdfeaa0073341f8b5d07caff4fa9fc316 Author: Christoph Hellwig Date: Fri Jun 28 19:27:18 2019 -0700 xfs: renumber XBF_WRITE_FAIL Assining a numerical value that is not close to the flags defined near by is just asking for conflicts later on. Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_buf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 153fd7b57ca9944985eaea3d9e8f4dd5931a475a Author: Christoph Hellwig Date: Fri Jun 28 19:27:18 2019 -0700 xfs: remove the never used _XBF_COMPOUND flag Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_buf.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 1e85a3670db2f6125e01fed521dae00e9340f048 Author: Christoph Hellwig Date: Fri Jun 28 19:27:17 2019 -0700 xfs: remove the no-op spinlock_destroy stub Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_linux.h | 2 -- fs/xfs/xfs_log.c | 2 -- 2 files changed, 4 deletions(-) commit 5467b34bd1e81c8e719ae968ba6561723fdc15b8 Author: Darrick J. Wong Date: Fri Jun 28 19:25:35 2019 -0700 xfs: move xfs_ino_geometry to xfs_shared.h The inode geometry structure isn't related to ondisk format; it's support for the mount structure. Move it to xfs_shared.h. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Christoph Hellwig fs/xfs/libxfs/xfs_dir2.c | 1 + fs/xfs/libxfs/xfs_dir2_block.c | 1 + fs/xfs/libxfs/xfs_dir2_data.c | 1 + fs/xfs/libxfs/xfs_dir2_leaf.c | 1 + fs/xfs/libxfs/xfs_dir2_node.c | 1 + fs/xfs/libxfs/xfs_dir2_sf.c | 1 + fs/xfs/libxfs/xfs_format.h | 41 ----------------------------------------- fs/xfs/libxfs/xfs_iext_tree.c | 1 + fs/xfs/libxfs/xfs_inode_fork.c | 1 + fs/xfs/libxfs/xfs_shared.h | 42 ++++++++++++++++++++++++++++++++++++++++++ fs/xfs/xfs_acl.c | 1 + fs/xfs/xfs_attr_list.c | 1 + fs/xfs/xfs_bmap_item.c | 1 + fs/xfs/xfs_buf.c | 1 + fs/xfs/xfs_buf_item.c | 1 + fs/xfs/xfs_dir2_readdir.c | 1 + fs/xfs/xfs_discard.c | 1 + fs/xfs/xfs_dquot_item.c | 1 + fs/xfs/xfs_error.c | 1 + fs/xfs/xfs_export.c | 1 + fs/xfs/xfs_extfree_item.c | 1 + fs/xfs/xfs_filestream.c | 1 + fs/xfs/xfs_icache.c | 1 + fs/xfs/xfs_inode_item.c | 1 + fs/xfs/xfs_ioctl32.c | 1 + fs/xfs/xfs_message.c | 1 + fs/xfs/xfs_pnfs.c | 1 + fs/xfs/xfs_qm_bhv.c | 1 + fs/xfs/xfs_quotaops.c | 1 + fs/xfs/xfs_trans_ail.c | 1 + fs/xfs/xfs_xattr.c | 1 + 31 files changed, 71 insertions(+), 41 deletions(-) commit 6dba88870c2315b77713291189015b56d63e60fe Author: Darrick J. Wong Date: Fri Jun 28 19:25:35 2019 -0700 xfs: claim maintainership of loose files Claim maintainership over the miscellaneous files outside of fs/xfs/ that came from xfs. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner MAINTAINERS | 6 ++++++ 1 file changed, 6 insertions(+) commit 09fbca8e6240e945c663af1ac2c5d5ef1456bad7 Author: Dennis Dalessandro Date: Fri Jun 28 14:22:46 2019 -0400 IB/hfi1: No need to use try_module_get for debugfs The call in debugfs.c for try_module_get() is not needed. A reference to the module will be taken by the VFS layer as long as the owner field is set in the file ops struct. So set this as well as remove the call. Suggested-by: Jason Gunthorpe Reviewed-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hfi1/debugfs.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 8bd516bd0d53f71594340dc644f6fbc4278a8ab1 Author: Mike Marciniszyn Date: Fri Jun 28 14:22:39 2019 -0400 IB/rdmavt: Add trace for map_mr_sg Add trace to debug map_mr_sg handling. Reviewed-by: Kaike Wan Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rdmavt/mr.c | 1 + drivers/infiniband/sw/rdmavt/trace_mr.h | 36 +++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) commit 315aed110c16ac806f25fd85eff8b34579ed101d Author: Mike Marciniszyn Date: Fri Jun 28 14:22:33 2019 -0400 IB/rdmavt: Enhance trace information for FRWR debug This patch enhances the MR trace information to enable more focused debug of MR issues. Reviewed-by: Kaike Wan Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rdmavt/mr.c | 2 +- drivers/infiniband/sw/rdmavt/trace_mr.h | 20 +++++++++++++++++--- 2 files changed, 18 insertions(+), 4 deletions(-) commit aa9b79ec37789d7cc1ca1339369b75dc5fec02dd Author: Mike Marciniszyn Date: Fri Jun 28 14:22:23 2019 -0400 IB/hfi1: Add missing INVALIDATE opcodes for trace This was missed in the original implementation of the memory management extensions. Fixes: 0db3dfa03c08 ("IB/hfi1: Work request processing for fast register mr and invalidate") Reviewed-by: Michael J. Ruhl Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hfi1/trace_ibhdrs.h | 2 ++ 1 file changed, 2 insertions(+) commit bf3b1e0ce093ce31d4d91d613f9b09d80a4021cc Author: Michael J. Ruhl Date: Fri Jun 28 14:22:17 2019 -0400 IB/hfi1: Reduce excessive aspm inlines Uninline the aspm API since it increases code space for no reason. Move the aspm module param to the new aspm C file. Reviewed-by: Mike Marciniszyn Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hfi1/Makefile | 1 + drivers/infiniband/hw/hfi1/aspm.c | 270 ++++++++++++++++++++++++++++++++++++ drivers/infiniband/hw/hfi1/aspm.h | 262 ++-------------------------------- drivers/infiniband/hw/hfi1/pcie.c | 6 +- 4 files changed, 280 insertions(+), 259 deletions(-) commit 2b0ad2da8fd4c32f63d9142f2de43a4d34fdd679 Author: Michael J. Ruhl Date: Fri Jun 28 14:22:11 2019 -0400 IB/{rdmavt, hfi1, qib}: Add helpers to hide SWQE WR details Add some helper functions to hide struct rvt_swqe details. Reviewed-by: Mike Marciniszyn Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hfi1/qp.c | 2 +- drivers/infiniband/hw/hfi1/ud.c | 29 +++++++++++----------- drivers/infiniband/hw/qib/qib_qp.c | 2 +- drivers/infiniband/hw/qib/qib_ud.c | 21 ++++++++-------- drivers/infiniband/sw/rdmavt/qp.c | 2 +- include/rdma/rdmavt_qp.h | 50 ++++++++++++++++++++++++++++++++++++++ 6 files changed, 79 insertions(+), 27 deletions(-) commit d310c4bf8aeacc0256091feb6a0337b8fef763ac Author: Michael J. Ruhl Date: Fri Jun 28 14:22:04 2019 -0400 IB/{rdmavt, hfi1, qib}: Remove AH refcount for UD QPs Historically rdmavt destroy_ah() has returned an -EBUSY when the AH has a non-zero reference count. IBTA 11.2.2 notes no such return value or error case: Output Modifiers: - Verb results: - Operation completed successfully. - Invalid HCA handle. - Invalid address handle. ULPs never test for this error and this will leak memory. The reference count exists to allow for driver independent progress mechanisms to process UD SWQEs in parallel with post sends. The SWQE will hold a reference count until the UD SWQE completes and then drops the reference. Fix by removing need to reference count the AH. Add a UD specific allocation to each SWQE entry to cache the necessary information for independent progress. Copy the information during the post send processing. Reviewed-by: Mike Marciniszyn Signed-off-by: Mike Marciniszyn Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hfi1/qp.c | 4 +-- drivers/infiniband/hw/hfi1/ud.c | 30 ++++++++++---------- drivers/infiniband/hw/qib/qib_qp.c | 4 +-- drivers/infiniband/hw/qib/qib_ud.c | 21 +++++++------- drivers/infiniband/sw/rdmavt/ah.c | 6 +--- drivers/infiniband/sw/rdmavt/qp.c | 58 ++++++++++++++++++++++++++++++++++++-- include/rdma/rdma_vt.h | 3 +- include/rdma/rdmavt_qp.h | 22 +++++++++++++-- 8 files changed, 106 insertions(+), 42 deletions(-) commit fe2ac04712cdc6e93d32e9c82c73bfb225554309 Author: Michael J. Ruhl Date: Fri Jun 28 14:21:58 2019 -0400 IB/rdmavt: Set QP allowed opcodes after QP allocation Currently QP allowed_ops is set after the QP is completely initialized. This curtails the use of this optimization for any initialization before allowed_ops is set. Fix by adding a helper to determine the correct allowed_ops and moving the setting of the allowed_ops to just after QP allocation. Reviewed-by: Mike Marciniszyn Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rdmavt/qp.c | 35 ++++++++++++----------------------- 1 file changed, 12 insertions(+), 23 deletions(-) commit 5136bfea7e79b333af77594fac5bc70282a95313 Author: Kamenee Arumugam Date: Fri Jun 28 14:21:52 2019 -0400 IB/{hfi1, qib, rdmavt}: Put qp in error state when cq is full When a completion queue is full, the associated queue pairs are not put into the error state. According to the IBTA specification, this is a violation. Quote from IBTA spec: C9-218: A Requester Class F error occurs when the CQ is inaccessible or full and an attempt is made to complete a WQE. The Affected QP shall be moved to the error state and affiliated asynchronous errors generated as described in 11.6.3.1 Affiliated Asynchronous Events on page 678. The current WQE and any subsequent WQEs are left in an unknown state. C11-37: The CI shall generate a CQ Error when a CQ overrun is detected. This condition will result in an Affiliated Asynchronous Error for any associated Work Queues when they attempt to use that CQ. Completions can no longer be added to the CQ. It is not guaranteed that completions present in the CQ at the time the error occurred can be retrieved. Possible causes include a CQ overrun or a CQ protection error. Put the qp in error state when cq is full. Implement a state called full to continue to put other associated QPs in error state. Reviewed-by: Mike Marciniszyn Reviewed-by: Michael J. Ruhl Signed-off-by: Kamenee Arumugam Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hfi1/rc.c | 3 +-- drivers/infiniband/hw/hfi1/uc.c | 3 +-- drivers/infiniband/hw/hfi1/ud.c | 5 ++-- drivers/infiniband/hw/qib/qib_rc.c | 3 +-- drivers/infiniband/hw/qib/qib_uc.c | 3 +-- drivers/infiniband/hw/qib/qib_ud.c | 6 ++--- drivers/infiniband/sw/rdmavt/cq.c | 15 +++++++++--- drivers/infiniband/sw/rdmavt/qp.c | 3 +-- drivers/infiniband/sw/rdmavt/vt.h | 9 ++++++++ include/rdma/rdmavt_cq.h | 3 ++- include/rdma/rdmavt_qp.h | 47 ++++++++++++++++++++++++++++++++++---- 11 files changed, 75 insertions(+), 25 deletions(-) commit f592ae3c999fbe4faeeb90dfde8ff7da49ee4ae6 Author: Kamenee Arumugam Date: Fri Jun 28 14:04:30 2019 -0400 IB/rdmavt: Fracture single lock used for posting and processing RWQEs Usage of single lock prevents fetching posted and processing receive work queue entries from progressing simultaneously and impacts overall performance. Fracture the single lock used for posting and processing Receive Work Queue Entries (RWQEs) to allow the circular buffer to be filled and emptied at the same time. Two new spinlocks - one for the producers and one for the consumers used for posting and processing RWQEs simultaneously and the two indices are define on two different cache lines. The threshold count is used to avoid reading other index in different cache line every time. Signed-off-by: Harish Chegondi Signed-off-by: Kamenee Arumugam Reviewed-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rdmavt/qp.c | 97 ++++++++++++++++++++++++-------------- drivers/infiniband/sw/rdmavt/rc.c | 43 +++++++++-------- drivers/infiniband/sw/rdmavt/srq.c | 10 ++-- include/rdma/rdmavt_qp.h | 7 +++ 4 files changed, 97 insertions(+), 60 deletions(-) commit dabac6e460ce8473f1e685432a8ab7818d81a1f1 Author: Kamenee Arumugam Date: Fri Jun 28 14:04:24 2019 -0400 IB/hfi1: Move receive work queue struct into uapi directory The rvt_rwqe and rvt_rwq struct elements are shared between rdmavt and the providers but are not in uapi directory. As per the comment in https://marc.info/?l=linux-rdma&m=152296522708522&w=2, The hfi1 driver and the rdma core driver are not using shared structures in the uapi directory. Move rvt_rwqe and rvt_rwq struct into rvt-abi.h header in uapi directory. Reviewed-by: Mike Marciniszyn Reviewed-by: Michael J. Ruhl Signed-off-by: Kamenee Arumugam Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rdmavt/qp.c | 152 +++++++++++++++++++++++++++---------- drivers/infiniband/sw/rdmavt/qp.h | 2 + drivers/infiniband/sw/rdmavt/rc.c | 10 ++- drivers/infiniband/sw/rdmavt/srq.c | 59 +++++++------- include/rdma/rdmavt_qp.h | 52 ++++++++----- include/uapi/rdma/rvt-abi.h | 29 +++++++ 6 files changed, 212 insertions(+), 92 deletions(-) commit 239b0e52d8aa64d2559c672fd8c29cf1fffc3ec7 Author: Kamenee Arumugam Date: Fri Jun 28 14:04:17 2019 -0400 IB/hfi1: Move rvt_cq_wc struct into uapi directory The rvt_cq_wc struct elements are shared between rdmavt and the providers but not in uapi directory. As per the comment in https://marc.info/?l=linux-rdma&m=152296522708522&w=2 The hfi1 driver and the rdma core driver are not using shared structures in the uapi directory. In that case, move rvt_cq_wc struct into the rvt-abi.h header file and create a rvt_k_cq_w for the kernel completion queue. Signed-off-by: Kamenee Arumugam Reviewed-by: Mike Marciniszyn Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hfi1/qp.c | 4 +- drivers/infiniband/sw/rdmavt/cq.c | 192 ++++++++++++++++++++++++-------------- include/rdma/rdmavt_cq.h | 22 +++-- include/rdma/rdmavt_qp.h | 32 +++++++ include/uapi/rdma/rvt-abi.h | 32 +++++++ 5 files changed, 205 insertions(+), 77 deletions(-) commit 371bb62158d53c1fc33e2fb9b6aeb9522caf6cf4 Merge: 10dcc7448e9e 4b972a01a7da Author: Jason Gunthorpe Date: Fri Jun 28 21:18:23 2019 -0300 Merge tag 'v5.2-rc6' into rdma.git for-next For dependencies in next patches. Resolve conflicts: - Use uverbs_get_cleared_udata() with new cq allocation flow - Continue to delete nes despite SPDX conflict - Resolve list appends in mlx5_command_str() - Use u16 for vport_rule stuff - Resolve list appends in struct ib_client Signed-off-by: Jason Gunthorpe commit 0472301a28f6cf53a6bc5783e48a2d0bbff4682f Author: Baruch Siach Date: Fri Jun 28 07:08:45 2019 +0300 bpf: fix uapi bpf_prog_info fields alignment Merge commit 1c8c5a9d38f60 ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next") undid the fix from commit 36f9814a494 ("bpf: fix uapi hole for 32 bit compat applications") by taking the gpl_compatible 1-bit field definition from commit b85fab0e67b162 ("bpf: Add gpl_compatible flag to struct bpf_prog_info") as is. That breaks architectures with 16-bit alignment like m68k. Add 31-bit pad after gpl_compatible to restore alignment of following fields. Thanks to Dmitry V. Levin his analysis of this bug history. Signed-off-by: Baruch Siach Acked-by: Song Liu Cc: Jiri Olsa Cc: Daniel Borkmann Cc: Geert Uytterhoeven Cc: Linus Torvalds Signed-off-by: Daniel Borkmann include/uapi/linux/bpf.h | 1 + tools/include/uapi/linux/bpf.h | 1 + 2 files changed, 2 insertions(+) commit 8daed7677a1da676332e0294db8a09cad030e693 Merge: 2d6dbb9a65f4 0cdbb4b09a06 Author: Daniel Borkmann Date: Sat Jun 29 01:31:10 2019 +0200 Merge branch 'bpf-lookup-devmap' Toke Høiland-Jørgensen says: ==================== When using the bpf_redirect_map() helper to redirect packets from XDP, the eBPF program cannot currently know whether the redirect will succeed, which makes it impossible to gracefully handle errors. To properly fix this will probably require deeper changes to the way TX resources are allocated, but one thing that is fairly straight forward to fix is to allow lookups into devmaps, so programs can at least know when a redirect is *guaranteed* to fail because there is no entry in the map. Currently, programs work around this by keeping a shadow map of another type which indicates whether a map index is valid. This series contains two changes that are complementary ways to fix this issue: - Moving the map lookup into the bpf_redirect_map() helper (and caching the result), so the helper can return an error if no value is found in the map. This includes a refactoring of the devmap and cpumap code to not care about the index on enqueue. - Allowing regular lookups into devmaps from eBPF programs, using the read-only flag to make sure they don't change the values. The performance impact of the series is negligible, in the sense that I cannot measure it because the variance between test runs is higher than the difference pre/post series. Changelog: v6: - Factor out list handling in maps to a helper in list.h (new patch 1) - Rename variables in struct bpf_redirect_info (new patch 3 + patch 4) - Explain why we are clearing out the map in the info struct on lookup failure - Remove unneeded check for forwarding target in tracepoint macro v5: - Rebase on latest bpf-next. - Update documentation for bpf_redirect_map() with the new meaning of flags. v4: - Fix a few nits from Andrii - Lose the #defines in bpf.h and just compare the flags argument directly to XDP_TX in bpf_xdp_redirect_map(). v3: - Adopt Jonathan's idea of using the lower two bits of the flag value as the return code. - Always do the lookup, and cache the result for use in xdp_do_redirect(); to achieve this, refactor the devmap and cpumap code to get rid the bitmap for selecting which devices to flush. v2: - For patch 1, make it clear that the change works for any map type. - For patch 2, just use the new BPF_F_RDONLY_PROG flag to make the return value read-only. ==================== Signed-off-by: Daniel Borkmann commit 0cdbb4b09a0658b72c563638d476113aadd91afb Author: Toke Høiland-Jørgensen Date: Fri Jun 28 11:12:35 2019 +0200 devmap: Allow map lookups from eBPF We don't currently allow lookups into a devmap from eBPF, because the map lookup returns a pointer directly to the dev->ifindex, which shouldn't be modifiable from eBPF. However, being able to do lookups in devmaps is useful to know (e.g.) whether forwarding to a specific interface is enabled. Currently, programs work around this by keeping a shadow map of another type which indicates whether a map index is valid. Since we now have a flag to make maps read-only from the eBPF side, we can simply lift the lookup restriction if we make sure this flag is always set. Signed-off-by: Toke Høiland-Jørgensen Acked-by: Jonathan Lemon Acked-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann kernel/bpf/devmap.c | 5 +++++ kernel/bpf/verifier.c | 7 ++----- 2 files changed, 7 insertions(+), 5 deletions(-) commit 43e74c0267a35d6f5127218054b2d80c7fe801f5 Author: Toke Høiland-Jørgensen Date: Fri Jun 28 11:12:34 2019 +0200 bpf_xdp_redirect_map: Perform map lookup in eBPF helper The bpf_redirect_map() helper used by XDP programs doesn't return any indication of whether it can successfully redirect to the map index it was given. Instead, BPF programs have to track this themselves, leading to programs using duplicate maps to track which entries are populated in the devmap. This patch fixes this by moving the map lookup into the bpf_redirect_map() helper, which makes it possible to return failure to the eBPF program. The lower bits of the flags argument is used as the return code, which means that existing users who pass a '0' flag argument will get XDP_ABORTED. With this, a BPF program can check the return code from the helper call and react by, for instance, substituting a different redirect. This works for any type of map used for redirect. Signed-off-by: Toke Høiland-Jørgensen Acked-by: Jonathan Lemon Acked-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann include/linux/filter.h | 1 + include/trace/events/xdp.h | 5 ++--- include/uapi/linux/bpf.h | 7 +++++-- net/core/filter.c | 32 ++++++++++++++++++-------------- 4 files changed, 26 insertions(+), 19 deletions(-) commit 4b55cf290dc6bd3a9e5da26d1ad60e77aa88c8cf Author: Toke Høiland-Jørgensen Date: Fri Jun 28 11:12:34 2019 +0200 devmap: Rename ifindex member in bpf_redirect_info The bpf_redirect_info struct has an 'ifindex' member which was named back when the redirects could only target egress interfaces. Now that we can also redirect to sockets and CPUs, this is a bit misleading, so rename the member to tgt_index. Reorder the struct members so we can have 'tgt_index' and 'tgt_value' next to each other in a subsequent patch. Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Daniel Borkmann include/linux/filter.h | 2 +- net/core/filter.c | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 14 deletions(-) commit d5df2830ca9922d03a33940ea424c9a5f39f1162 Author: Toke Høiland-Jørgensen Date: Fri Jun 28 11:12:34 2019 +0200 devmap/cpumap: Use flush list instead of bitmap The socket map uses a linked list instead of a bitmap to keep track of which entries to flush. Do the same for devmap and cpumap, as this means we don't have to care about the map index when enqueueing things into the map (and so we can cache the map lookup). Signed-off-by: Toke Høiland-Jørgensen Acked-by: Jonathan Lemon Acked-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann kernel/bpf/cpumap.c | 105 +++++++++++++++++++++++---------------------------- kernel/bpf/devmap.c | 107 +++++++++++++++++++++++----------------------------- net/core/filter.c | 2 - 3 files changed, 95 insertions(+), 119 deletions(-) commit c8af5cd75e2411d5a5aacf115f59a5ff6b87f3fa Author: Toke Høiland-Jørgensen Date: Fri Jun 28 11:12:34 2019 +0200 xskmap: Move non-standard list manipulation to helper Add a helper in list.h for the non-standard way of clearing a list that is used in xskmap. This makes it easier to reuse it in the other map types, and also makes sure this usage is not forgotten in any list refactorings in the future. Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Daniel Borkmann include/linux/list.h | 14 ++++++++++++++ kernel/bpf/xskmap.c | 3 +-- 2 files changed, 15 insertions(+), 2 deletions(-) commit 2d6dbb9a65f4001f2878512078394c11301994f3 Author: Stanislav Fomichev Date: Thu Jun 27 18:12:33 2019 -0700 selftests/bpf: fix -Wstrict-aliasing in test_sockopt_sk.c Let's use union with u8[4] and u32 members for sockopt buffer, that should fix any possible aliasing issues. test_sockopt_sk.c: In function ‘getsetsockopt’: test_sockopt_sk.c:115:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] if (*(__u32 *)buf != 0x55AA*2) { ^~ test_sockopt_sk.c:116:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] log_err("Unexpected getsockopt(SO_SNDBUF) 0x%x != 0x55AA*2", ^~~~~~~ Fixes: 8a027dc0d8f5 ("selftests/bpf: add sockopt test that exercises sk helpers") Reported-by: Alexei Starovoitov Signed-off-by: Stanislav Fomichev Acked-by: Song Liu Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/test_sockopt_sk.c | 51 +++++++++++++-------------- 1 file changed, 24 insertions(+), 27 deletions(-) commit f6dc1264f1c01976a84239d1038359604ee42001 Author: Paul Blakey Date: Mon Jun 24 15:04:58 2019 +0300 net/mlx5e: Disallow tc redirect offload cases we don't support After changing the parent_id to be the same for both NICs of same the hardware device, netdev_port_same_parent_id now returns true for more cases (all the lower devices in the hierarchy are on the same hardware device). If merged eswitch isn't enabled, these cases aren't supported, so disallow them. Signed-off-by: Paul Blakey Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed .../net/ethernet/mellanox/mlx5/core/en/tc_tun.c | 4 +++- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 22 ++++++++++++++++++---- drivers/net/ethernet/mellanox/mlx5/core/en_tc.h | 3 +++ 3 files changed, 24 insertions(+), 5 deletions(-) commit 7ff40a46dd188b83311203e72cedf42eb264fdf1 Author: Paul Blakey Date: Thu May 16 15:27:17 2019 +0300 net/mlx5e: Expose same physical switch_id for all representors Report system_image_guid as the E-Switch switch_id, this ensures that when a NIC contains multiple PCI functions and which has merged eswitch capability, all representors from multiple PFs publish same switch_id. Signed-off-by: Paul Blakey Reviewed-by: Parav Pandit Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 29 ++++++++---------------- 1 file changed, 9 insertions(+), 20 deletions(-) commit a90f88fe557d7f2318b724a93875dcaac45b5f05 Author: Gavi Teitz Date: Thu May 23 09:58:56 2019 +0300 net/mlx5e: Don't refresh TIRs when updating representor SQs Refreshing TIRs is done in order to update the TIRs with the current state of SQs in the transport domain, so that the TIRs can filter out undesired self-loopback packets based on the source SQ of the packet. Representor TIRs will only receive packets that originate from their associated vport, due to dedicated steering, and therefore will never receive self-loopback packets, whose source vport will be the vport of the E-Switch manager, and therefore not the vport associated with the representor. As such, it is not necessary to refresh the representors' TIRs, since self-loopback packets can't reach them. Since representors only exist in switchdev mode, and there is no scenario in which a representor will exist in the transport domain alongside a non-representor, it is not necessary to refresh the transport domain's TIRs upon changing the state of a representor's queues. Therefore, do not refresh TIRs upon such a change. Achieve this by adding an update_rx callback to the mlx5e_profile, which refreshes TIRs for non-representors and does nothing for representors, and replace instances of mlx5e_refresh_tirs() upon changing the state of the queues with update_rx(). Signed-off-by: Gavi Teitz Reviewed-by: Roi Dayan Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 ++ drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 10 ++++++++-- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 7 +++++++ drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 3 ++- drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib_vlan.c | 3 ++- 5 files changed, 21 insertions(+), 4 deletions(-) commit 5233794b179136d597b84188c1285148f07012e6 Author: Arnd Bergmann Date: Tue Jun 18 13:15:06 2019 +0200 net/mlx5e: reduce stack usage in mlx5_eswitch_termtbl_create Putting an empty 'mlx5_flow_spec' structure on the stack is a bit wasteful and causes a warning on 32-bit architectures when building with clang -fsanitize-coverage: drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads_termtbl.c: In function 'mlx5_eswitch_termtbl_create': drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads_termtbl.c:90:1: error: the frame size of 1032 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] Since the structure is never written to, we can statically allocate it to avoid the stack usage. To be on the safe side, mark all subsequent function arguments that we pass it into as 'const' as well. Fixes: 10caabdaad5a ("net/mlx5e: Use termination table for VLAN push actions") Signed-off-by: Arnd Bergmann Acked-by: Saeed Mahameed Acked-by: Mark Bloch Signed-off-by: Saeed Mahameed .../mellanox/mlx5/core/eswitch_offloads_termtbl.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 20 ++++++++++---------- include/linux/mlx5/fs.h | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) commit f72e6c3e17be568138d8e4855ac2734d251a6913 Author: Parav Pandit Date: Mon May 27 04:47:10 2019 -0500 net/mlx5e: Set drvinfo in generic manner Consider PCI and non PCI device types while setting device name in get_drvinfo() callback using existing generic device. Signed-off-by: Parav Pandit Reviewed-by: Vu Pham Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 087067368a8a4910e169694a3552f210fd1a446e Author: Parav Pandit Date: Wed Jun 5 01:29:05 2019 -0500 net/mlx5e: Correct phys_port_name for PF port Currently PF phys_port_name is named as pfNvf-1 as vport number for PF vport is 65535. Correct PF's phys_port name as agreed upon name as pfN. Signed-off-by: Parav Pandit Reviewed-by: Vu Pham Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 2 ++ 1 file changed, 2 insertions(+) commit 5dc9520bf04a6b95660a307d7654460d1463d91a Author: Ariel Levkovich Date: Wed Jun 5 20:01:08 2019 +0300 net/mlx5e: Report netdevice MPLS features Set supported device features in the netdevice MPLS features mask. This will enable HW checksumming and TSO for MPLS tagged traffic. Signed-off-by: Ariel Levkovich Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 5 +++++ 1 file changed, 5 insertions(+) commit e4683f35f8e5ef43fb75e306113814a563ed1f18 Author: Ariel Levkovich Date: Wed Jun 5 19:40:09 2019 +0300 net/mlx5e: Move to HW checksumming advertising This patch changes the way the driver advertises its checksum offload capabilities within the net device features bit mask. Instead of advertising protocol specific checksumming capabilities which are limited today to IPv4 and IPv6, we move to reporing generic HW checksumming capabilities. This will allow the network stack to let mlx5 device offload checksum for cases where the IP header is encapsulated within another protocol and the skb->protocol doesn't indicate one of the IP versions protocol, specifically in the case of MPLS label encapsulating the IP header and the skb->protocol indiciates MPLS ethertype rather than IP. Moving the HW_CSUM reporting is required in the basic net device hw features mask and also in the extensions (vlan and encpasulation features) since the extensions are always multiplied by the basic features set during the packet's traversal through the stack's tx flow. Signed-off-by: Ariel Levkovich Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit e7e0bee8c5e8aefa03bdcf782b80b42c60353edb Author: Gavi Teitz Date: Tue Jun 11 12:29:41 2019 +0300 net/mlx5: MPFS, Allow adding the same MAC more than once Remove the limitation preventing adding a vport's MAC address to the Multi-Physical Function Switch (MPFS) more than once per E-switch, as there is no difference in the MPFS if an address is being used by an E-switch more than once. This allows the E-switch to have multiple vports with the same MAC address, allowing vports to be classified by VLAN id instead of by MAC if desired. Signed-off-by: Gavi Teitz Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/lib/mpfs.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 6311f308849e9dfc0ff058fcc332246541030c24 Author: Gavi Teitz Date: Tue Jun 11 11:54:36 2019 +0300 net/mlx5: MPFS, Cleanup add MAC flow Unify and isolate the error handling flow in mlx5_mpfs_add_mac(), removing code duplication. Signed-off-by: Gavi Teitz Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/lib/mpfs.c | 26 +++++++++++++--------- 1 file changed, 15 insertions(+), 11 deletions(-) commit 4f5d1beadc10b62e141338570b9c32d857814bb0 Merge: 5cdda5f1d6ad 92ab1eb392c6 Author: Saeed Mahameed Date: Fri Jun 28 15:49:59 2019 -0700 Merge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux Misc updates from mlx5-next branch: 1) E-Switch vport metadata support for source vport matching 2) Convert mkey_table to XArray 3) Shared IRQs and to use single IRQ for all async EQs Signed-off-by: Saeed Mahameed commit def4ec6dce393e2136b62a05712f35a7fa5f5e56 Author: Vitaly Lifshits Date: Tue Jun 25 17:39:11 2019 +0300 e1000e: PCIm function state support Due to commit: 5d8682588605 ("[misc] mei: me: allow runtime pm for platform with D0i3") When disconnecting the cable and reconnecting it the NIC enters DMoff state. This caused wrong link indication and duplex mismatch. This bug is described in: https://bugzilla.redhat.com/show_bug.cgi?id=1689436 Checking PCIm function state and performing PHY reset after a timeout in watchdog task solves this issue. Signed-off-by: Vitaly Lifshits Acked-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/e1000e/defines.h | 3 +++ drivers/net/ethernet/intel/e1000e/netdev.c | 18 +++++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) commit 59653e6497d16f7ac1d9db088f3959f57ee8c3db Author: Detlev Casanova Date: Sat Jun 22 23:14:37 2019 -0400 e1000e: Make watchdog use delayed work Use delayed work instead of timers to run the watchdog of the e1000e driver. Simplify the code with one less middle function. Signed-off-by: Detlev Casanova Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/e1000e/e1000.h | 5 +-- drivers/net/ethernet/intel/e1000e/netdev.c | 54 ++++++++++++++++-------------- 2 files changed, 32 insertions(+), 27 deletions(-) commit 1d8d80b4e4ff641eefa5250cba324dfa5861a9f1 Author: Harshitha Ramamurthy Date: Wed Jun 19 14:45:40 2019 -0400 i40e: Add macvlan support on i40e This patch enables macvlan offloads for i40e. The idea is to use channels as macvlan interfaces. The channels are VSIs of type VMDQ. When the first macvlan is created, the maximum number of channels possible are created. From then on, as a macvlan interface is created, a macvlan filter is added to these already created channels (VSIs). This patch utilizes subordinate device traffic classes to make queue groups(channels) available for an upper device like a macvlan. Steps to configure macvlan offloads: 1. ethtool -K ethx l2-fwd-offload on 2. ip link add link ethx name macvlan1 type macvlan 3. ip addr add
dev macvlan1 4. ip link set macvlan1 up Signed-off-by: Harshitha Ramamurthy Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 27 ++ drivers/net/ethernet/intel/i40e/i40e_main.c | 497 +++++++++++++++++++++++++++- 2 files changed, 522 insertions(+), 2 deletions(-) commit 1e1b0c658d9bb364b4a2a4b08a760d3e4c239bdc Author: Alexander Duyck Date: Wed Jun 19 09:58:53 2019 -0700 ixgbevf: Use cached link state instead of re-reading the value for ethtool Change the ethtool link settings call to just read the cached state out of the adapter structure instead of trying to recheck the value from the PF. Doing this should prevent excessive reading of the mailbox. Signed-off-by: Alexander Duyck Reviewed-by: "Guilherme G. Piccoli" Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbevf/ethtool.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 9fe06a51287b2d41baef7ece94df34b5abf19b90 Author: Colin Ian King Date: Wed Jun 19 15:30:44 2019 +0100 iavf: fix dereference of null rx_buffer pointer A recent commit efa14c3985828d ("iavf: allow null RX descriptors") added a null pointer sanity check on rx_buffer, however, rx_buffer is being dereferenced before that check, which implies a null pointer dereference bug can potentially occur. Fix this by only dereferencing rx_buffer until after the null pointer check. Addresses-Coverity: ("Dereference before null check") Signed-off-by: Colin Ian King Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/iavf/iavf_txrx.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit cd502a7f7c9c03b5b9a01fe8b59ba7c11efee3ad Author: Artem Bityutskiy Date: Tue Jun 18 14:55:13 2019 +0300 igb: add RR2DCDELAY to ethtool registers dump This patch adds the RR2DCDELAY register to the ethtool registers dump. RR2DCDELAY exists on I210 and I211 Intel Gigabit Ethernet chips and it stands for "Read Request To Data Completion Delay". Here is how this register is described in the I210 datasheet: "This field captures the maximum PCIe split time in 16 ns units, which is the maximum delay between the read request to the first data completion. This is giving an estimation of the PCIe round trip time." In other words, whenever I210 reads from the host memory (e.g., fetches a descriptor from the ring), the chip measures every PCI DMA read transaction and captures the maximum value. So it ends up containing the longest DMA transaction time. This register is very useful for troubleshooting and research purposes. If you are dealing with time-sensitive networks, this register can help you get an idea of your "I210-to-ring" latency. This helps answering questions like "should I have PCIe ASPM enabled?" or "should I enable deep C-states?" on my system. It is safe to read this register at any point, reading it has no effect on the I210 chip functionality. Signed-off-by: Artem Bityutskiy Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/e1000_regs.h | 2 ++ drivers/net/ethernet/intel/igb/igb_ethtool.c | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) commit 9379b39945ac543d76ce5a83403b8f1531b8862a Author: Artem Bityutskiy Date: Tue Jun 18 14:55:12 2019 +0300 igb: minor ethool regdump amendment This patch has no functional impact and it is just a preparation for the following patch. It removes an early return from the 'igb_get_regs()' function by moving the 82576-only registers dump into an "if" block. With this preparation, we can dump more non-82576 registers at the end of this function. Signed-off-by: Artem Bityutskiy Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/igb_ethtool.c | 70 ++++++++++++++-------------- 1 file changed, 35 insertions(+), 35 deletions(-) commit 75051ce4c5d8e9ef3d74364803540355cd35e05b Author: Jeff Kirsher Date: Mon Jun 17 16:10:58 2019 -0700 iavf: Fix up debug print macro This aligns the iavf_debug() macro with the other Intel drivers. Add the bus number, bus_id field to i40e_bus_info so output shows each physical port(i.e func) in following format: [[[[]:]]:][][.[]] domains are numbered from 0 to ffff), bus (0-ff), slot (0-1f) and function (0-7). Signed-off-by: Jeff Kirsher Tested-by: Andrew Bowers drivers/net/ethernet/intel/iavf/iavf_osdep.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit ab6973aed6200510662856afce5e3d1e386b7b64 Author: Arjan van de Ven Date: Fri Jun 14 17:29:35 2019 -0700 e1000e: Reduce boot time by tightening sleep ranges The e1000e driver is a great user of the usleep_range() API, and has nice ranges that in principle help power management. However the ranges that are used only during system startup are very long (and can add easily 100 msec to the boot time) while the power savings of such long ranges is irrelevant due to the one-off, boot only, nature of these functions. This patch shrinks some of the longest ranges to be shorter (while still using a power friendly 1 msec range); this saves 100msec+ of boot time on my BDW NUCs Signed-off-by: Arjan van de Ven Signed-off-by: Paul Menzel Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/e1000e/80003es2lan.c | 2 +- drivers/net/ethernet/intel/e1000e/82571.c | 2 +- drivers/net/ethernet/intel/e1000e/ethtool.c | 14 +++++++------- drivers/net/ethernet/intel/e1000e/ich8lan.c | 20 ++++++++++---------- drivers/net/ethernet/intel/e1000e/mac.c | 2 +- drivers/net/ethernet/intel/e1000e/netdev.c | 14 +++++++------- drivers/net/ethernet/intel/e1000e/nvm.c | 2 +- 7 files changed, 28 insertions(+), 28 deletions(-) commit af07adbb1cfc207b9ad2bacd40332723a7833f4a Author: Gustavo A. R. Silva Date: Fri Jun 14 16:23:20 2019 -0700 iavf: use struct_size() helper Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes, in particular in the context in which this code is being used. So, replace code of the following form: sizeof(struct virtchnl_ether_addr_list) + (count * sizeof(struct virtchnl_ether_addr)) with: struct_size(veal, list, count) and so on... This code was detected with the help of Coccinelle. Signed-off-by: "Gustavo A. R. Silva" Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/iavf/iavf_virtchnl.c | 37 +++++++++++-------------- 1 file changed, 16 insertions(+), 21 deletions(-) commit 583cf7be751987005c70f4614e148eb5611f8060 Author: Venkatesh Srinivas Date: Mon Jun 10 14:27:50 2019 -0700 e1000: Use dma_wmb() instead of wmb() before doorbell writes e1000 writes to doorbells to post transmit descriptors and fill the receive ring. After writing descriptors to memory but before writing to doorbells, use dma_wmb() rather than wmb(). wmb() is more heavyweight than necessary for a device to see descriptor writes. On x86, this avoids SFENCEs before doorbell writes in both the Tx and Rx paths. On ARM, this converts DSB ST -> DMB OSHST. Tested: 82576EB / x86; QEMU (qemu emulates an 8257x) Signed-off-by: Venkatesh Srinivas Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/e1000/e1000_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b97c0b521ae05d40e6541858600088a30f6dbe3a Author: Colin Ian King Date: Fri Jun 7 19:19:20 2019 +0100 ixgbe: fix potential u32 overflow on shift The u32 variable rem is being shifted using u32 arithmetic however it is being passed to div_u64 that expects the expression to be a u64. The 32 bit shift may potentially overflow, so cast rem to a u64 before shifting to avoid this. Also remove comment about overflow. Addresses-Coverity: ("Unintentional integer overflow") Fixes: cd4583206990 ("ixgbe: implement support for SDP/PPS output on X550 hardware") Fixes: 68d9676fc04e ("ixgbe: fix PTP SDP pin setup on X540 hardware") Signed-off-by: Colin Ian King Acked-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 92924064106e410cdc015f1dbfc0499309f9f5b1 Author: Dann Frazier Date: Wed May 22 17:22:58 2019 -0600 ixgbe: Avoid NULL pointer dereference with VF on non-IPsec hw An ipsec structure will not be allocated if the hardware does not support offload. Fixes the following Oops: [ 191.045452] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 [ 191.054232] Mem abort info: [ 191.057014] ESR = 0x96000004 [ 191.060057] Exception class = DABT (current EL), IL = 32 bits [ 191.065963] SET = 0, FnV = 0 [ 191.069004] EA = 0, S1PTW = 0 [ 191.072132] Data abort info: [ 191.074999] ISV = 0, ISS = 0x00000004 [ 191.078822] CM = 0, WnR = 0 [ 191.081780] user pgtable: 4k pages, 48-bit VAs, pgdp = 0000000043d9e467 [ 191.088382] [0000000000000000] pgd=0000000000000000 [ 191.093252] Internal error: Oops: 96000004 [#1] SMP [ 191.098119] Modules linked in: vhost_net vhost tap vfio_pci vfio_virqfd vfio_iommu_type1 vfio xt_CHECKSUM iptable_mangle ipt_MASQUERADE iptable_nat nf_nat_ipv4 nf_nat xt_conntrack nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 ipt_REJECT nf_reject_ipv4 xt_tcpudp bridge stp llc ebtable_filter devlink ebtables ip6table_filter ip6_tables iptable_filter bpfilter ipmi_ssif nls_iso8859_1 input_leds joydev ipmi_si hns_roce_hw_v2 ipmi_devintf hns_roce ipmi_msghandler cppc_cpufreq sch_fq_codel ib_iser rdma_cm iw_cm ib_cm ib_core iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi ip_tables x_tables autofs4 ses enclosure btrfs zstd_compress raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor hid_generic usbhid hid raid6_pq libcrc32c raid1 raid0 multipath linear ixgbevf hibmc_drm ttm [ 191.168607] drm_kms_helper aes_ce_blk aes_ce_cipher syscopyarea crct10dif_ce sysfillrect ghash_ce qla2xxx sysimgblt sha2_ce sha256_arm64 hisi_sas_v3_hw fb_sys_fops sha1_ce uas nvme_fc mpt3sas ixgbe drm hisi_sas_main nvme_fabrics usb_storage hclge scsi_transport_fc ahci libsas hnae3 raid_class libahci xfrm_algo scsi_transport_sas mdio aes_neon_bs aes_neon_blk crypto_simd cryptd aes_arm64 [ 191.202952] CPU: 94 PID: 0 Comm: swapper/94 Not tainted 4.19.0-rc1+ #11 [ 191.209553] Hardware name: Huawei D06 /D06, BIOS Hisilicon D06 UEFI RC0 - V1.20.01 04/26/2019 [ 191.218064] pstate: 20400089 (nzCv daIf +PAN -UAO) [ 191.222873] pc : ixgbe_ipsec_vf_clear+0x60/0xd0 [ixgbe] [ 191.228093] lr : ixgbe_msg_task+0x2d0/0x1088 [ixgbe] [ 191.233044] sp : ffff000009b3bcd0 [ 191.236346] x29: ffff000009b3bcd0 x28: 0000000000000000 [ 191.241647] x27: ffff000009628000 x26: 0000000000000000 [ 191.246946] x25: ffff803f652d7600 x24: 0000000000000004 [ 191.252246] x23: ffff803f6a718900 x22: 0000000000000000 [ 191.257546] x21: 0000000000000000 x20: 0000000000000000 [ 191.262845] x19: 0000000000000000 x18: 0000000000000000 [ 191.268144] x17: 0000000000000000 x16: 0000000000000000 [ 191.273443] x15: 0000000000000000 x14: 0000000100000026 [ 191.278742] x13: 0000000100000025 x12: ffff8a5f7fbe0df0 [ 191.284042] x11: 000000010000000b x10: 0000000000000040 [ 191.289341] x9 : 0000000000001100 x8 : ffff803f6a824fd8 [ 191.294640] x7 : ffff803f6a825098 x6 : 0000000000000001 [ 191.299939] x5 : ffff000000f0ffc0 x4 : 0000000000000000 [ 191.305238] x3 : ffff000028c00000 x2 : ffff803f652d7600 [ 191.310538] x1 : 0000000000000000 x0 : ffff000000f205f0 [ 191.315838] Process swapper/94 (pid: 0, stack limit = 0x00000000addfed5a) [ 191.322613] Call trace: [ 191.325055] ixgbe_ipsec_vf_clear+0x60/0xd0 [ixgbe] [ 191.329927] ixgbe_msg_task+0x2d0/0x1088 [ixgbe] [ 191.334536] ixgbe_msix_other+0x274/0x330 [ixgbe] [ 191.339233] __handle_irq_event_percpu+0x78/0x270 [ 191.343924] handle_irq_event_percpu+0x40/0x98 [ 191.348355] handle_irq_event+0x50/0xa8 [ 191.352180] handle_fasteoi_irq+0xbc/0x148 [ 191.356263] generic_handle_irq+0x34/0x50 [ 191.360259] __handle_domain_irq+0x68/0xc0 [ 191.364343] gic_handle_irq+0x84/0x180 [ 191.368079] el1_irq+0xe8/0x180 [ 191.371208] arch_cpu_idle+0x30/0x1a8 [ 191.374860] do_idle+0x1dc/0x2a0 [ 191.378077] cpu_startup_entry+0x2c/0x30 [ 191.381988] secondary_start_kernel+0x150/0x1e0 [ 191.386506] Code: 6b15003f 54000320 f1404a9f 54000060 (79400260) Fixes: eda0333ac2930 ("ixgbe: add VF IPsec management") Signed-off-by: Dann Frazier Acked-by: Shannon Nelson Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c | 3 +++ 1 file changed, 3 insertions(+) commit f74dc880098b4a29f76d756b888fb31d81ad9a0c Author: Miguel Bernal Marin Date: Mon Mar 27 16:01:56 2017 -0600 e1000e: Increase pause and refresh time Suggested-by: Tim Pepper Signed-off-by: Miguel Bernal Marin Signed-off-by: Paul Menzel Acked-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/e1000e/netdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 89f6a3051ee586c4960d4fe513640d77b2496925 Author: Gustavo A. R. Silva Date: Fri Mar 29 16:38:47 2019 -0700 ice: Use struct_size() helper One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct foo { int stuff; struct boo entry[]; }; size = sizeof(struct foo) + count * sizeof(struct boo); instance = alloc(size, GFP_KERNEL); Instead of leaving these open-coded and prone to type mistakes, we can now use the new struct_size() helper: size = struct_size(instance, entry, count); This code was detected with the help of Coccinelle. Signed-off-by: "Gustavo A. R. Silva" Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice_sched.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0a7960c7922228ca975ca4c5595e5539fc8f8b79 Merge: 8747d82d3c32 54002066100b Author: David S. Miller Date: Fri Jun 28 14:45:34 2019 -0700 Merge branch 'net-sched-Add-txtime-assist-support-for-taprio' Vedang Patel says: ==================== net/sched: Add txtime-assist support for taprio. Changes in v6: - Use _BITUL() instead of BIT() in UAPI for etf. (patch #1) - Fix a bug reported by kbuild test bot in length_to_duration(). (patch #6) - Remove an unused function (get_cycle_start()). (Patch #6) Changes in v5: - Commit message improved for the igb patch (patch #1). - Fixed typo in commit message for etf patch (patch #2). Changes in v4: - Remove inline directive from functions in foo.c. - Fix spacing in pkt_sched.h (for etf patch). Changes in v3: - Simplify implementation for taprio flags. - txtime_delay can only be set if txtime-assist mode is enabled. - txtime_delay and flags will only be visible in tc output if set by user. - Minor changes in error reporting. Changes in v2: - Txtime-offload has now been renamed to txtime-assist mode. - Renamed the offload parameter to flags. - Removed the code which introduced the hardware offloading functionality. Original Cover letter (with above changes included) -------------------------------------------------- Currently, we are seeing packets being transmitted outside their timeslices. We can confirm that the packets are being dequeued at the right time. So, the delay is induced after the packet is dequeued, because taprio, without any offloading, has no control of when a packet is actually transmitted. In order to solve this, we are making use of the txtime feature provided by ETF qdisc. Hardware offloading needs to be supported by the ETF qdisc in order to take advantage of this feature. The taprio qdisc will assign txtime (in skb->tstamp) for all the packets which do not have the txtime allocated via the SO_TXTIME socket option. For the packets which already have SO_TXTIME set, taprio will validate whether the packet will be transmitted in the correct interval. In order to support this, the following parameters have been added: - flags (taprio): This is added in order to support different offloading modes which will be added in the future. - txtime-delay (taprio): This indicates the minimum time it will take for the packet to hit the wire after it reaches taprio_enqueue(). This is useful in determining whether we can transmit the packet in the remaining time if the gate corresponding to the packet is currently open. - skip_skb_check (ETF): ETF currently drops any packet which does not have the SO_TXTIME socket option set. This check can be skipped by specifying this option. Following is an example configuration: tc qdisc replace dev $IFACE parent root handle 100 taprio \\ num_tc 3 \\ map 2 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2 \\ queues 1@0 1@0 1@0 \\ base-time $BASE_TIME \\ sched-entry S 01 300000 \\ sched-entry S 02 300000 \\ sched-entry S 04 400000 \\ flags 0x1 \\ txtime-delay 200000 \\ clockid CLOCK_TAI tc qdisc replace dev $IFACE parent 100:1 etf \\ offload delta 200000 clockid CLOCK_TAI skip_skb_check Here, the "flags" parameter is indicating that the txtime-assist mode is enabled. Also, all the traffic classes have been assigned the same queue. This is to prevent the traffic classes in the lower priority queues from getting starved. Note that this configuration is specific to the i210 ethernet card. Other network cards where the hardware queues are given the same priority, might be able to utilize more than one queue. Following are some of the other highlights of the series: - Fix a bug where hardware timestamping and SO_TXTIME options cannot be used together. (Patch 1) - Introduces the skip_skb_check option. (Patch 2) - Make TxTime assist mode work with TCP packets (Patch 7). The following changes are recommended to be done in order to get the best performance from taprio in this mode: ip link set dev enp1s0 mtu 1514 ethtool -K eth0 gso off ethtool -K eth0 tso off ethtool --set-eee eth0 eee off ==================== Signed-off-by: David S. Miller commit 54002066100b6d2f731157156c41d853e0c9137e Author: Vedang Patel Date: Tue Jun 25 15:07:19 2019 -0700 taprio: Adjust timestamps for TCP packets When the taprio qdisc is running in "txtime offload" mode, it will set the launchtime value (in skb->tstamp) for all the packets which do not have the SO_TXTIME socket option. But, the TCP packets already have this value set and it indicates the earliest departure time represented in CLOCK_MONOTONIC clock. We need to respect the timestamp set by the TCP subsystem. So, convert this time to the clock which taprio is using and ensure that the packet is not transmitted before the deadline set by TCP. Signed-off-by: Vedang Patel Signed-off-by: David S. Miller net/sched/sch_taprio.c | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) commit 7ede7b03484bbb035aa5be98c45a40cfabdc0738 Author: Vedang Patel Date: Tue Jun 25 15:07:18 2019 -0700 taprio: make clock reference conversions easier Later in this series we will need to transform from CLOCK_MONOTONIC (used in TCP) to the clock reference used in TAPRIO. Signed-off-by: Vinicius Costa Gomes Signed-off-by: Vedang Patel Signed-off-by: David S. Miller net/sched/sch_taprio.c | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) commit 4cfd5779bd6efe8c76b4494aec63a063be0d2ff2 Author: Vedang Patel Date: Tue Jun 25 15:07:17 2019 -0700 taprio: Add support for txtime-assist mode Currently, we are seeing non-critical packets being transmitted outside of their timeslice. We can confirm that the packets are being dequeued at the right time. So, the delay is induced in the hardware side. The most likely reason is the hardware queues are starving the lower priority queues. In order to improve the performance of taprio, we will be making use of the txtime feature provided by the ETF qdisc. For all the packets which do not have the SO_TXTIME option set, taprio will set the transmit timestamp (set in skb->tstamp) in this mode. TAPrio Qdisc will ensure that the transmit time for the packet is set to when the gate is open. If SO_TXTIME is set, the TAPrio qdisc will validate whether the timestamp (in skb->tstamp) occurs when the gate corresponding to skb's traffic class is open. Following two parameters added to support this mode: - flags: used to enable txtime-assist mode. Will also be used to enable other modes (like hardware offloading) later. - txtime-delay: This indicates the minimum time it will take for the packet to hit the wire. This is useful in determining whether we can transmit the packet in the remaining time if the gate corresponding to the packet is currently open. An example configuration for enabling txtime-assist: tc qdisc replace dev eth0 parent root handle 100 taprio \\ num_tc 3 \\ map 2 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2 \\ queues 1@0 1@0 1@0 \\ base-time 1558653424279842568 \\ sched-entry S 01 300000 \\ sched-entry S 02 300000 \\ sched-entry S 04 400000 \\ flags 0x1 \\ txtime-delay 40000 \\ clockid CLOCK_TAI tc qdisc replace dev $IFACE parent 100:1 etf skip_sock_check \\ offload delta 200000 clockid CLOCK_TAI Note that all the traffic classes are mapped to the same queue. This is only possible in taprio when txtime-assist is enabled. Also, note that the ETF Qdisc is enabled with offload mode set. In this mode, if the packet's traffic class is open and the complete packet can be transmitted, taprio will try to transmit the packet immediately. This will be done by setting skb->tstamp to current_time + the time delta indicated in the txtime-delay parameter. This parameter indicates the time taken (in software) for packet to reach the network adapter. If the packet cannot be transmitted in the current interval or if the packet's traffic is not currently transmitting, the skb->tstamp is set to the next available timestamp value. This is tracked in the next_launchtime parameter in the struct sched_entry. The behaviour w.r.t admin and oper schedules is not changed from what is present in software mode. The transmit time is already known in advance. So, we do not need the HR timers to advance the schedule and wakeup the dequeue side of taprio. So, HR timer won't be run when this mode is enabled. Signed-off-by: Vedang Patel Signed-off-by: David S. Miller include/uapi/linux/pkt_sched.h | 4 + net/sched/sch_taprio.c | 341 +++++++++++++++++++++++++++++++++++++++-- 2 files changed, 328 insertions(+), 17 deletions(-) commit 566af331b5a6ae3969cf212c2077457d4963b0d1 Author: Vedang Patel Date: Tue Jun 25 15:07:16 2019 -0700 taprio: Remove inline directive Remove inline directive from length_to_duration(). We will let the compiler make the decisions. Signed-off-by: Vedang Patel Signed-off-by: David S. Miller net/sched/sch_taprio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 037be0374078e205ca802ca8716dabb6064f940e Author: Vedang Patel Date: Tue Jun 25 15:07:15 2019 -0700 taprio: calculate cycle_time when schedule is installed cycle time for a particular schedule is calculated only when it is first installed. So, it makes sense to just calculate it once right after the 'cycle_time' parameter has been parsed and store it in cycle_time. Signed-off-by: Vedang Patel Signed-off-by: David S. Miller net/sched/sch_taprio.c | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) commit d14d2b20680f02fa739c2cbbb59e3629e487f359 Author: Vedang Patel Date: Tue Jun 25 15:07:14 2019 -0700 etf: Add skip_sock_check Currently, etf expects a socket with SO_TXTIME option set for each packet it encounters. So, it will drop all other packets. But, in the future commits we are planning to add functionality where tstamp value will be set by another qdisc. Also, some packets which are generated from within the kernel (e.g. ICMP packets) do not have any socket associated with them. So, this commit adds support for skip_sock_check. When this option is set, etf will skip checking for a socket and other associated options for all skbs. Signed-off-by: Vedang Patel Signed-off-by: David S. Miller include/uapi/linux/pkt_sched.h | 1 + net/sched/sch_etf.c | 10 ++++++++++ 2 files changed, 11 insertions(+) commit 9903c8dc734265689d5770ff28c84a7228fe5890 Author: Vedang Patel Date: Tue Jun 25 15:07:13 2019 -0700 etf: Don't use BIT() in UAPI headers. The BIT() macro isn't exported as part of the UAPI interface. So, the compile-test to ensure they are self contained fails. So, use _BITUL() instead. Signed-off-by: Vedang Patel Signed-off-by: David S. Miller include/uapi/linux/pkt_sched.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1e08511d5d01884a3c9070afd52a47799312074a Author: Vedang Patel Date: Tue Jun 25 15:07:12 2019 -0700 igb: clear out skb->tstamp after reading the txtime If a packet which is utilizing the launchtime feature (via SO_TXTIME socket option) also requests the hardware transmit timestamp, the hardware timestamp is not delivered to the userspace. This is because the value in skb->tstamp is mistaken as the software timestamp. Applications, like ptp4l, request a hardware timestamp by setting the SOF_TIMESTAMPING_TX_HARDWARE socket option. Whenever a new timestamp is detected by the driver (this work is done in igb_ptp_tx_work() which calls igb_ptp_tx_hwtstamps() in igb_ptp.c[1]), it will queue the timestamp in the ERR_QUEUE for the userspace to read. When the userspace is ready, it will issue a recvmsg() call to collect this timestamp. The problem is in this recvmsg() call. If the skb->tstamp is not cleared out, it will be interpreted as a software timestamp and the hardware tx timestamp will not be successfully sent to the userspace. Look at skb_is_swtx_tstamp() and the callee function __sock_recv_timestamp() in net/socket.c for more details. Signed-off-by: Vedang Patel Tested-by: Aaron Brown Signed-off-by: David S. Miller drivers/net/ethernet/intel/igb/igb_main.c | 1 + 1 file changed, 1 insertion(+) commit 8ec3ede559956f8ad58db7b57d25ac724bab69e9 Author: Maxime Chevallier Date: Thu Jun 20 11:42:45 2019 +0200 net: mvpp2: prs: Don't override the sign bit in SRAM parser shift The Header Parser allows identifying various fields in the packet headers, used for various kind of filtering and classification steps. This is a re-entrant process, where the offset in the packet header depends on the previous lookup results. This offset is represented in the SRAM results of the TCAM, as a shift to be operated. This shift can be negative in some cases, such as in IPv6 parsing. This commit prevents overriding the sign bit when setting the shift value, which could cause instabilities when parsing IPv6 flows. Fixes: 3f518509dedc ("ethernet: Add new driver for Marvell Armada 375 network unit") Suggested-by: Alan Winkowski Signed-off-by: Maxime Chevallier Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 32e454efbb2279b0fa5874abb0944a9d42080ad1 Author: Russell King Date: Tue Jun 25 10:44:33 2019 +0100 net: phylink: further documentation clarifications Clarify the validate() behaviour in a few cases which weren't mentioned in the documentation, but which are necessary for users to get the correct behaviour. Signed-off-by: Russell King Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller include/linux/phylink.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 8747d82d3c32df488ea0fe9b86bdb53a8a04a7b8 Merge: 5cdda5f1d6ad e2ca070f89ec Author: David S. Miller Date: Fri Jun 28 14:36:25 2019 -0700 Merge branch 'mirred-recurse' John Hurley says: ==================== Track recursive calls in TC act_mirred These patches aim to prevent act_mirred causing stack overflow events from recursively calling packet xmit or receive functions. Such events can occur with poor TC configuration that causes packets to travel in loops within the system. Florian Westphal advises that a recursion crash and packets looping are separate issues and should be treated as such. David Miller futher points out that pcpu counters cannot track the precise skb context required to detect loops. Hence these patches are not aimed at detecting packet loops, rather, preventing stack flows arising from such loops. ==================== Signed-off-by: David S. Miller commit e2ca070f89ecd983bd98e05d936a678a4151f2fd Author: John Hurley Date: Mon Jun 24 23:13:36 2019 +0100 net: sched: protect against stack overflow in TC act_mirred TC hooks allow the application of filters and actions to packets at both ingress and egress of the network stack. It is possible, with poor configuration, that this can produce loops whereby an ingress hook calls a mirred egress action that has an egress hook that redirects back to the first ingress etc. The TC core classifier protects against loops when doing reclassifies but there is no protection against a packet looping between multiple hooks and recursively calling act_mirred. This can lead to stack overflow panics. Add a per CPU counter to act_mirred that is incremented for each recursive call of the action function when processing a packet. If a limit is passed then the packet is dropped and CPU counter reset. Note that this patch does not protect against loops in TC datapaths. Its aim is to prevent stack overflow kernel panics that can be a consequence of such loops. Signed-off-by: John Hurley Reviewed-by: Simon Horman Signed-off-by: David S. Miller net/sched/act_mirred.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 720f22fed81bc6fd1765db7014651b6718887bea Author: John Hurley Date: Mon Jun 24 23:13:35 2019 +0100 net: sched: refactor reinsert action The TC_ACT_REINSERT return type was added as an in-kernel only option to allow a packet ingress or egress redirect. This is used to avoid unnecessary skb clones in situations where they are not required. If a TC hook returns this code then the packet is 'reinserted' and no skb consume is carried out as no clone took place. This return type is only used in act_mirred. Rather than have the reinsert called from the main datapath, call it directly in act_mirred. Instead of returning TC_ACT_REINSERT, change the type to the new TC_ACT_CONSUMED which tells the caller that the packet has been stolen by another process and that no consume call is required. Moving all redirect calls to the act_mirred code is in preparation for tracking recursion created by act_mirred. Signed-off-by: John Hurley Reviewed-by: Simon Horman Signed-off-by: David S. Miller include/net/pkt_cls.h | 2 +- include/net/sch_generic.h | 2 +- net/core/dev.c | 4 +--- net/sched/act_mirred.c | 3 ++- 4 files changed, 5 insertions(+), 6 deletions(-) commit 5cdda5f1d6adde02da591ca2196f20289977dc56 Author: Christian Brauner Date: Mon Jun 24 15:29:23 2019 +0200 ipv4: enable route flushing in network namespaces Tools such as vpnc try to flush routes when run inside network namespaces by writing 1 into /proc/sys/net/ipv4/route/flush. This currently does not work because flush is not enabled in non-initial network namespaces. Since routes are per network namespace it is safe to enable /proc/sys/net/ipv4/route/flush in there. Link: https://github.com/lxc/lxd/issues/4257 Signed-off-by: Christian Brauner Signed-off-by: David S. Miller net/ipv4/route.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 337d1727a3895775b5e5ef67d3ca0fea2e2ae768 Author: Marek Vasut Date: Sun Jun 23 14:11:43 2019 +0200 net: ethernet: ti: cpsw: Assign OF node to slave devices Assign OF node to CPSW slave devices, otherwise it is not possible to bind e.g. DSA switch to them. Without this patch, the DSA code tries to find the ethernet device by OF match, but fails to do so because the slave device has NULL OF node. Signed-off-by: Marek Vasut Cc: David S. Miller Cc: Ivan Khoronzhuk Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 3 +++ drivers/net/ethernet/ti/cpsw_priv.h | 1 + 2 files changed, 4 insertions(+) commit 7c3d310d8fc44e549f0ac77b2cc4bc796419e38b Merge: 75dad2520fc3 5d1549847c76 Author: David S. Miller Date: Fri Jun 28 13:36:43 2019 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter/IPVS fixes for net The following patchset contains Netfilter fixes for net: 1) Fix memleak reported by syzkaller when registering IPVS hooks, patch from Julian Anastasov. 2) Fix memory leak in start_sync_thread, also from Julian. 3) Fix conntrack deletion via ctnetlink, from Felix Kaechele. 4) Fix reject for ICMP due to incorrect checksum handling, from He Zhe. ==================== Signed-off-by: David S. Miller commit 75dad2520fc37345075498e9c5aa1355b4993dbc Author: Benedikt Spranger Date: Fri Jun 28 18:58:11 2019 +0200 net: dsa: b53: Disable all ports on setup A b53 device may configured through an external EEPROM like the switch device on the Lamobo R1 router board. The configuration of a port may therefore differ from the reset configuration of the switch. The switch configuration reported by the DSA subsystem is different until the port is configured by DSA i.e. a port can be active, while the DSA subsystem reports the port is inactive. Disable all ports and not only the unused ones to put all ports into a well defined state. Signed-off-by: Benedikt Spranger Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/b53/b53_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 877d53c295498c16a1977e591b7fc2838f8d8daf Author: Shuah Khan Date: Thu Jun 27 16:39:35 2019 -0600 selftests: timestamping: Fix SIOCGSTAMP undeclared build failure Add missing linux/sockios.h include to fix the following SIOCGSTAMP undeclared build error. In addition, remove the local defines for SIOCGSTAMPNS and SIOCSHWTSTAMP and pick them up from linux/sockios.h. timestamping.c:249:19: error: SIOCGSTAMP undeclared if (ioctl(sock, SIOCGSTAMP, &tv)) Signed-off-by: Shuah Khan tools/testing/selftests/networking/timestamping/timestamping.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 88fe057d0000a694edd219d994d6aafe96190b46 Author: Naresh Kamboju Date: Fri Jun 28 11:41:48 2019 +0100 selftests: dma-buf: Adding kernel config fragment CONFIG_UDMABUF=y The test case drivers/dma-buf/udmabuf need this kernel config enabled CONFIG_UDMABUF=y Signed-off-by: Naresh Kamboju Reviewed-by: Gerd Hoffmann Signed-off-by: Shuah Khan tools/testing/selftests/drivers/dma-buf/config | 1 + 1 file changed, 1 insertion(+) commit e6ed6467117e7d7cabafb95c392b4e0b91bedd2e Author: Rob Herring Date: Fri Jun 28 13:29:54 2019 -0600 dt-bindings: mtd: sunxi-nand: Drop 'maxItems' from child 'reg' property Mixing 'maxItems' and scalar properties doesn't make much sense, so drop 'maxItems' as a single item is implied. Cc: David Woodhouse Cc: Brian Norris Cc: Marek Vasut Cc: Miquel Raynal Cc: Richard Weinberger Cc: Vignesh Raghavendra Cc: Maxime Ripard Cc: Chen-Yu Tsai Cc: linux-mtd@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Rob Herring Documentation/devicetree/bindings/mtd/allwinner,sun4i-a10-nand.yaml | 1 - 1 file changed, 1 deletion(-) commit 9ea6b821cef405a915bb5904627005fca8f01462 Author: Rob Herring Date: Wed Jun 26 16:27:21 2019 -0600 dt-bindings: arm: Limit cpus schema to only check Arm 'cpu' nodes Matching on the 'cpus' node was a bad choice because the schema is incorrectly applied to non-Arm cpus nodes. As we now have a common cpus schema which checks the general structure, it is also redundant to do so in the Arm CPU schema. The downside is one could conceivably mix different architecture's cpu nodes or have typos in the compatible string. The latter problem pretty much exists for every schema. Signed-off-by: Rob Herring Documentation/devicetree/bindings/arm/cpus.yaml | 487 +++++++++++------------- 1 file changed, 224 insertions(+), 263 deletions(-) commit ef4db28c1f45cda6989bc8a8e45294894786d947 Author: Brian Masney Date: Mon May 20 04:58:46 2019 -0400 dt-bindings: backlight: lm3630a: correct schema validation The '#address-cells' and '#size-cells' properties were not defined in the lm3630a bindings and would cause the following error when attempting to validate the examples against the schema: Documentation/devicetree/bindings/leds/backlight/lm3630a-backlight.example.dt.yaml: '#address-cells', '#size-cells' do not match any of the regexes: '^led@[01]$', 'pinctrl-[0-9]+' Correct this by adding those two properties. While we're here, move the ti,linear-mapping-mode property to the led@[01] child nodes to correct the following validation error: Documentation/devicetree/bindings/leds/backlight/lm3630a-backlight.example.dt.yaml: led@0: 'ti,linear-mapping-mode' does not match any of the regexes: 'pinctrl-[0-9]+' Fixes: 32fcb75c66a0 ("dt-bindings: backlight: Add lm3630a bindings") Signed-off-by: Brian Masney Reported-by: Rob Herring Acked-by: Daniel Thompson Acked-by: Dan Murphy [robh: also drop maxItems from child reg] Signed-off-by: Rob Herring .../bindings/leds/backlight/lm3630a-backlight.yaml | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit f80b1dfc5680f3044b07b6dee8c198dde8aa313f Author: Maxime Ripard Date: Thu Jun 27 17:31:53 2019 +0200 dt-bindings: net: dwmac: Deprecate the PHY reset properties Even though the DWMAC driver uses some driver specific properties, the PHY core has a bunch of generic properties and can deal with them nicely. Let's deprecate our specific properties. Reviewed-by: Martin Blumenstingl Reviewed-by: Rob Herring Signed-off-by: Maxime Ripard Reviewed-by: Andrew Lunn Signed-off-by: Rob Herring Documentation/devicetree/bindings/net/snps,dwmac.yaml | 3 +++ 1 file changed, 3 insertions(+) commit 0569929d97997eea7126de180380dfcf2b45c9d1 Author: Maxime Ripard Date: Thu Jun 27 17:31:52 2019 +0200 dt-bindings: net: sun8i-emac: Convert the binding to a schemas Switch our Allwinner H3 EMAC controller binding to a YAML schema to enable the DT validation. Since that controller is based on a Synopsys IP, let's add the validation to that schemas with a bunch of conditionals. Reviewed-by: Rob Herring Signed-off-by: Maxime Ripard Signed-off-by: Rob Herring .../bindings/net/allwinner,sun8i-a83t-emac.yaml | 321 +++++++++++++++++++++ .../devicetree/bindings/net/dwmac-sun8i.txt | 201 ------------- .../devicetree/bindings/net/snps,dwmac.yaml | 15 + 3 files changed, 336 insertions(+), 201 deletions(-) commit 4b859450faa02aa48c0baf915b3faa090f2efb8e Author: Maxime Ripard Date: Thu Jun 27 17:31:51 2019 +0200 dt-bindings: net: sun7i-gmac: Convert the binding to a schemas Switch our Allwinner A20 GMAC controller binding to a YAML schema to enable the DT validation. Since that controller is based on a Synopsys IP, let's add the validation to that schemas with a bunch of conditionals. Reviewed-by: Rob Herring Signed-off-by: Maxime Ripard Signed-off-by: Rob Herring .../bindings/net/allwinner,sun7i-a20-gmac.txt | 27 --------- .../bindings/net/allwinner,sun7i-a20-gmac.yaml | 65 ++++++++++++++++++++++ .../devicetree/bindings/net/snps,dwmac.yaml | 3 + 3 files changed, 68 insertions(+), 27 deletions(-) commit 7db3545aef5fae02a9ccb4b1e37e72900d7101bb Author: Maxime Ripard Date: Thu Jun 27 17:31:50 2019 +0200 dt-bindings: net: stmmac: Convert the binding to a schemas Switch the STMMAC / Synopsys DesignWare MAC controller binding to a YAML schema to enable the DT validation. Reviewed-by: Rob Herring Signed-off-by: Maxime Ripard Signed-off-by: Rob Herring .../devicetree/bindings/net/snps,dwmac.yaml | 390 +++++++++++++++++++++ Documentation/devicetree/bindings/net/stmmac.txt | 179 +--------- 2 files changed, 391 insertions(+), 178 deletions(-) commit 7a47b908156c94c2bd3ab8dc412d1983d92cca40 Author: Maxime Ripard Date: Thu Jun 27 17:31:49 2019 +0200 dt-bindings: net: sun4i-mdio: Convert the binding to a schemas Switch our Allwinner A10 MDIO controller binding to a YAML schema to enable the DT validation. Reviewed-by: Rob Herring Signed-off-by: Maxime Ripard Signed-off-by: Rob Herring .../bindings/net/allwinner,sun4i-a10-mdio.yaml | 70 ++++++++++++++++++++++ .../bindings/net/allwinner,sun4i-mdio.txt | 27 --------- 2 files changed, 70 insertions(+), 27 deletions(-) commit 8c5b094476256f641b3fd790cdb86c9bdb2c9fec Author: Maxime Ripard Date: Thu Jun 27 17:31:48 2019 +0200 dt-bindings: net: sun4i-emac: Convert the binding to a schemas Switch our Allwinner A10 EMAC controller binding to a YAML schema to enable the DT validation. Reviewed-by: Rob Herring Signed-off-by: Maxime Ripard Signed-off-by: Rob Herring .../bindings/net/allwinner,sun4i-a10-emac.yaml | 56 ++++++++++++++++++++++ .../bindings/net/allwinner,sun4i-emac.txt | 19 -------- 2 files changed, 56 insertions(+), 19 deletions(-) commit 4abe7a3a096b47fb3f645fd40dcd42f6ac566b31 Author: Maxime Ripard Date: Thu Jun 27 17:31:47 2019 +0200 dt-bindings: net: phy: The interrupt property is not mandatory Unlike what was initially claimed in the PHY binding, the interrupt property of a PHY can be omitted, and the OS will turn to polling instead. Document that. Reviewed-by: Andrew Lunn Reviewed-by: Rob Herring Signed-off-by: Maxime Ripard Signed-off-by: Rob Herring Documentation/devicetree/bindings/net/ethernet-phy.yaml | 1 - 1 file changed, 1 deletion(-) commit b0b50b610f3569085e6cc0f6868d48d7a15211dc Author: Maxime Ripard Date: Thu Jun 27 17:31:46 2019 +0200 MAINTAINERS: Add Ethernet PHY YAML file While the Ethernet PHY framework was marked as maintained, the device tree bindings associated to that framework was not listed under the maintained files. Fix that. Reviewed-by: Andrew Lunn Signed-off-by: Maxime Ripard Signed-off-by: Rob Herring MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 62d77ff7ecbff1377d5a167f18156bc69cdbaf25 Author: Maxime Ripard Date: Thu Jun 27 17:31:45 2019 +0200 dt-bindings: net: Add a YAML schemas for the generic MDIO options The MDIO buses have a number of available device tree properties that can be used in their device tree node. Add a YAML schemas for those. Suggested-by: Andrew Lunn Signed-off-by: Maxime Ripard Reviewed-by: Andrew Lunn Reviewed-by: Rob Herring Signed-off-by: Rob Herring Documentation/devicetree/bindings/net/mdio.txt | 38 +----------------- Documentation/devicetree/bindings/net/mdio.yaml | 51 +++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 37 deletions(-) commit d8704342c10990c961600b6293eed5e38ad6bc9e Author: Maxime Ripard Date: Thu Jun 27 17:31:44 2019 +0200 dt-bindings: net: Add a YAML schemas for the generic PHY options The networking PHYs have a number of available device tree properties that can be used in their device tree node. Add a YAML schemas for those. Reviewed-by: Andrew Lunn Reviewed-by: Rob Herring Signed-off-by: Maxime Ripard [robh: drop maxItems from reg] Signed-off-by: Rob Herring .../devicetree/bindings/net/ethernet-phy.yaml | 178 +++++++++++++++++++++ Documentation/devicetree/bindings/net/phy.txt | 80 +-------- 2 files changed, 179 insertions(+), 79 deletions(-) commit 9d3de3c58347623b5e71d554628a1571cd3142ad Author: Maxime Ripard Date: Thu Jun 27 17:31:43 2019 +0200 dt-bindings: net: Add YAML schemas for the generic Ethernet options The Ethernet controllers have a good number of generic options that can be needed in a device tree. Add a YAML schemas for those. Reviewed-by: Rob Herring Signed-off-by: Maxime Ripard Reviewed-by: Andrew Lunn Signed-off-by: Rob Herring .../bindings/net/ethernet-controller.yaml | 206 +++++++++++++++++++++ Documentation/devicetree/bindings/net/ethernet.txt | 68 +------ .../devicetree/bindings/net/fixed-link.txt | 55 +----- 3 files changed, 208 insertions(+), 121 deletions(-) commit d44c732cffe544d38641065a12e416e0ce4217c1 Author: Kalle Valo Date: Thu Jun 27 21:47:30 2019 +0300 ath10k: pci: remove unnecessary casts Fixes checkpatch warnings: drivers/net/wireless/ath/ath10k/pci.c:926: unnecessary cast may hide bugs, see http://c-faq.com/malloc/mallocnocast.html drivers/net/wireless/ath/ath10k/pci.c:1072: unnecessary cast may hide bugs, see http://c-faq.com/malloc/mallocnocast.html While at it, also remove unnecessary initialisation of data_buf variable in both cases. Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/pci.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit 2189135437d017bef86aafdee9f50d38d5525f03 Author: Kalle Valo Date: Thu Jun 27 21:47:29 2019 +0300 ath10k: remove unnecessary 'out of memory' message Fixes checkpatch warning: drivers/net/wireless/ath/ath10k/swap.c:110: Possible unnecessary 'out of memory' message Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/swap.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 3ed39f8e747a7aafeec07bb244f2c3a1bdca5730 Author: Wen Gong Date: Thu Jun 27 21:21:51 2019 +0300 ath10k: destroy sdio workqueue while remove sdio module The workqueue need to flush and destory while remove sdio module, otherwise it will have thread which is not destory after remove sdio modules. Tested with QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00007-QCARMSWP-1. Signed-off-by: Wen Gong Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/sdio.c | 3 +++ 1 file changed, 3 insertions(+) commit bd1a4ac556dfbcd57c6091cc06aaf68684393bae Author: Wen Gong Date: Wed Jun 26 10:29:35 2019 +0800 ath10k: Move non-fatal warn logs to dbg level for SDIO chip ath10k will receive some message with invalid peer id from firmware. reason is: There are incoming frames to MAC hardware that NOT find relative address search table, then peer id is invalid set by MAC hardware, it is hardware's logic, so fix it in ath10k will be more convenient. log: ath10k_sdio mmc1:0001:1: Got RX ind from invalid peer: 65535 Tested with QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00007-QCARMSWP-1. Signed-off-by: Wen Gong Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/htt_rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c709df58832c5f575f0255bea4b09ad477fc62ea Author: Dundi Raviteja Date: Tue Jun 25 19:55:48 2019 +0530 ath10k: Fix memory leak in qmi Currently the memory allocated for qmi handle is not being freed during de-init which leads to memory leak. Free the allocated qmi memory in qmi deinit to avoid memory leak. Tested HW: WCN3990 Tested FW: WLAN.HL.3.1-01040-QCAHLSWMTPLZ-1 Fixes: fda6fee0001e ("ath10k: add QMI message handshake for wcn3990 client") Signed-off-by: Dundi Raviteja Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/qmi.c | 1 + 1 file changed, 1 insertion(+) commit 2605085fba22792f3d4a6b856c7c5a05492d1fde Author: Mauro Carvalho Chehab Date: Fri Jun 28 09:12:26 2019 -0300 dt: leds-lm36274.txt: fix a broken reference to ti-lmu.txt There's a typo there: ti_lmu.txt -> ti-lmu.txt Signed-off-by: Mauro Carvalho Chehab Acked-by: Pavel Machek Acked-by: Dan Murphy Signed-off-by: Jacek Anaszewski Documentation/devicetree/bindings/leds/leds-lm36274.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8dab91970a8c01ffc7816bf8a4c4cd587b481f34 Author: Mauro Carvalho Chehab Date: Fri Jun 28 09:20:20 2019 -0300 docs: leds: convert to ReST Rename the leds documentation files to ReST, add an index for them and adjust in order to produce a nice html output via the Sphinx build system. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Acked-by: Pavel Machek Signed-off-by: Jacek Anaszewski Documentation/laptops/thinkpad-acpi.txt | 4 +- Documentation/leds/index.rst | 25 +++ .../leds/{leds-blinkm.txt => leds-blinkm.rst} | 64 +++--- .../{leds-class-flash.txt => leds-class-flash.rst} | 49 +++-- .../leds/{leds-class.txt => leds-class.rst} | 15 +- .../leds/{leds-lm3556.txt => leds-lm3556.rst} | 100 ++++++--- .../leds/{leds-lp3944.txt => leds-lp3944.rst} | 23 ++- Documentation/leds/leds-lp5521.rst | 115 +++++++++++ Documentation/leds/leds-lp5521.txt | 101 ---------- Documentation/leds/leds-lp5523.rst | 147 ++++++++++++++ Documentation/leds/leds-lp5523.txt | 130 ------------ Documentation/leds/leds-lp5562.rst | 137 +++++++++++++ Documentation/leds/leds-lp5562.txt | 120 ----------- Documentation/leds/leds-lp55xx.rst | 224 +++++++++++++++++++++ Documentation/leds/leds-lp55xx.txt | 194 ------------------ Documentation/leds/leds-mlxcpld.rst | 118 +++++++++++ Documentation/leds/leds-mlxcpld.txt | 110 ---------- .../{ledtrig-oneshot.txt => ledtrig-oneshot.rst} | 11 +- ...ledtrig-transient.txt => ledtrig-transient.rst} | 65 +++--- .../{ledtrig-usbport.txt => ledtrig-usbport.rst} | 11 +- Documentation/leds/{uleds.txt => uleds.rst} | 5 +- MAINTAINERS | 2 +- drivers/leds/trigger/Kconfig | 2 +- drivers/leds/trigger/ledtrig-transient.c | 2 +- net/netfilter/Kconfig | 2 +- 25 files changed, 997 insertions(+), 779 deletions(-) commit 83086d654dd08c0f57381522e6819f421677706e Merge: 556e2f6020bf b989ff070574 Author: Ingo Molnar Date: Fri Jun 28 19:46:47 2019 +0200 Merge branch 'for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into core/rcu Pull rcu/next + tools/memory-model changes from Paul E. McKenney: - RCU flavor consolidation cleanups and optmizations - Documentation updates - Miscellaneous fixes - SRCU updates - RCU-sync flavor consolidation - Torture-test updates - Linux-kernel memory-consistency-model updates, most notably the addition of plain C-language accesses Signed-off-by: Ingo Molnar commit 1eda8bab70ca7d353b4e865140eaec06fedbf871 Author: David Howells Date: Fri Jun 28 18:00:05 2019 +0100 afs: Add support for the UAE error table Add support for mapping AFS UAE abort codes to Linux errno values. Signed-off-by: David Howells fs/afs/misc.c | 48 ++++++++---------- fs/afs/protocol_uae.h | 132 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 152 insertions(+), 28 deletions(-) commit 5d1549847c76b1ffcf8e388ef4d0f229bdd1d7e8 Author: He Zhe Date: Mon Jun 24 11:17:38 2019 +0800 netfilter: Fix remainder of pseudo-header protocol 0 Since v5.1-rc1, some types of packets do not get unreachable reply with the following iptables setting. Fox example, $ iptables -A INPUT -p icmp --icmp-type 8 -j REJECT $ ping 127.0.0.1 -c 1 PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data. — 127.0.0.1 ping statistics — 1 packets transmitted, 0 received, 100% packet loss, time 0ms We should have got the following reply from command line, but we did not. From 127.0.0.1 icmp_seq=1 Destination Port Unreachable Yi Zhao reported it and narrowed it down to: 7fc38225363d ("netfilter: reject: skip csum verification for protocols that don't support it"), This is because nf_ip_checksum still expects pseudo-header protocol type 0 for packets that are of neither TCP or UDP, and thus ICMP packets are mistakenly treated as TCP/UDP. This patch corrects the conditions in nf_ip_checksum and all other places that still call it with protocol 0. Fixes: 7fc38225363d ("netfilter: reject: skip csum verification for protocols that don't support it") Reported-by: Yi Zhao Signed-off-by: He Zhe Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_proto_icmp.c | 2 +- net/netfilter/nf_nat_proto.c | 2 +- net/netfilter/utils.c | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) commit e7792df831f5d6c183099a9dde224c9f4f763ebe Merge: 2c377b5abcfc d2ce8d6bfcfe Author: David S. Miller Date: Fri Jun 28 09:49:56 2019 -0700 Merge tag 'mac80211-for-davem-2019-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== Just a single patch: * 1<<31 is undefined, use 1U<<31 in nl80211.h UAPI ==================== Signed-off-by: David S. Miller commit 65dc5416d4e02d80ce140078c7c1f4e6c8400396 Merge: fcd71efd5e81 11d458c1cb9b Author: David S. Miller Date: Fri Jun 28 09:48:24 2019 -0700 Merge tag 'batadv-next-for-davem-20190627v2' of git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== This feature/cleanup patchset includes the following patches: - bump version strings, by Simon Wunderlich - fix includes for _MAX constants, atomic functions and fwdecls, by Sven Eckelmann (3 patches) - shorten multicast tt/tvlv worker spinlock section, by Linus Luessing - routeable multicast preparations: implement MAC multicast filtering, by Linus Luessing (2 patches, David Millers comments integrated) - remove return value checks for debugfs_create, by Greg Kroah-Hartman - add routable multicast optimizations, by Linus Luessing (2 patches) ==================== Signed-off-by: David S. Miller commit 2c377b5abcfca647046a79feb31ff921bf684858 Merge: e78557baa6d2 9e6b5648bbc4 Author: David S. Miller Date: Fri Jun 28 09:45:27 2019 -0700 Merge tag 'batadv-net-for-davem-20190627' of git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== Here are some batman-adv bugfixes: - fix a leaked TVLV handler which wasn't unregistered, by Jeremy Sowden - fix duplicated OGMs when interfaces are set UP, by Sven Eckelmann ==================== Signed-off-by: David S. Miller commit fcd71efd5e810d82d03b1b9b3004c2992f8fc406 Merge: 5b18c705a565 82c8ae6e8390 Author: David S. Miller Date: Fri Jun 28 09:39:50 2019 -0700 Merge branch 'hns3-next' Huazhong Tan says: ==================== net: hns3: some code optimizations & cleanups & bugfixes [patch 01/12] fixes a TX timeout issue. [patch 02/12 - 04/12] adds some patch related to TM module. [patch 05/12] fixes a compile warning. [patch 06/12] adds Asym Pause support for autoneg [patch 07/12] optimizes the error handler for VF reset. [patch 08/12] deals with the empty interrupt case. [patch 09/12 - 12/12] adds some cleanups & optimizations. ==================== Signed-off-by: David S. Miller commit 82c8ae6e8390f09c3c2b1d0a567c993dd88a281c Author: Peng Li Date: Fri Jun 28 19:50:18 2019 +0800 net: hns3: optimize the CSQ cmd error handling If CMDQ ring is full, hclge_cmd_send may return directly, but IMP still working and HW pointer changed, SW ring pointer do not match the HW pointer. This patch update the SW pointer every time when the space is full, so it can work normally next time if IMP and HW still working. Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c | 15 ++++++++++++--- .../net/ethernet/hisilicon/hns3/hns3vf/hclgevf_cmd.c | 19 ++++++++++++++----- 2 files changed, 26 insertions(+), 8 deletions(-) commit 289f81258e03067d032f9c157c91cd1fad7b31c5 Author: Yunsheng Lin Date: Fri Jun 28 19:50:17 2019 +0800 net: hns3: remove RXD_VLD check in hns3_handle_bdinfo The HNS3_RXD_VLD_B bit has already been checked in hns3_add_frag or hns3_handle_rx_bd before calling hns3_handle_bdinfo, so when hns3_handle_bdinfo is called, the HNS3_RXD_VLD_B bit is always set, which makes the checking in hns3_handle_bdinfo unnecessary. This patch removes the RXD_VLD_B checking in hns3_handle_bdinfo. Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 10 ---------- drivers/net/ethernet/hisilicon/hns3/hns3_enet.h | 1 - drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 1 - 3 files changed, 12 deletions(-) commit 53eb60c734346e00130c5516acbe17e6ce0cc4d3 Author: Jian Shen Date: Fri Jun 28 19:50:16 2019 +0800 net: hns3: remove unused linkmode definition This patch removes unused linkmode definition. Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3_enet.h | 19 ------------------- 1 file changed, 19 deletions(-) commit 8b552079325df9a832d95711ec4c26f0bf1b10c4 Author: Yufeng Mo Date: Fri Jun 28 19:50:15 2019 +0800 net: hns3: fix a statistics issue about l3l4 checksum error The frame column is based on rx_crc_errors and rx_frame_errors. So l3l4 checksum error should not be counted by rx_crc_errors. Instead, l3l4 checksum error should be counted in ifconfig error column. Fixes: d3ec4ef66937 ("net: hns3: refactor the statistics updating for netdev") Signed-off-by: Yufeng Mo Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9bc6ac918c7176fcc306f3e57a34e7bc51ae470c Author: Huazhong Tan Date: Fri Jun 28 19:50:14 2019 +0800 net: hns3: handle empty unknown interrupt Since some MSI-X interrupt's status may be cleared by hardware, so when the driver receives the interrupt, reading HCLGE_VECTOR0_PF_OTHER_INT_STS_REG register will get an empty unknown interrupt. For this case, the irq handler should enable vector0 interrupt. This patch also use dev_info() instead of dev_dbg() in the hclge_check_event_cause(), since this information will be useful for normal usage. Signed-off-by: Huazhong Tan Signed-off-by: Peng Li Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit bbe6540e7d70cda8ee311e0f14b197a20b6bf3e3 Author: Huazhong Tan Date: Fri Jun 28 19:50:13 2019 +0800 net: hns3: re-schedule reset task while VF reset fail The VF reset may fail for some probabilistic reasons, such as wait for hardware reset timeout, wait for mailbox response timeout, so this patch tries to re-schedule the reset task when the number of reset failing is under HCLGEVF_RESET_MAX_FAIL_CNT. This patch also add a function hclgevf_reset_err_handle() to handle the reset failing. Signed-off-by: Huazhong Tan Signed-off-by: Peng Li Signed-off-by: David S. Miller .../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 30 ++++++++++++++++------ .../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h | 1 + 2 files changed, 23 insertions(+), 8 deletions(-) commit bc3781edcea017aa1a29abd953b776cdba298ce2 Author: Yonglong Liu Date: Fri Jun 28 19:50:12 2019 +0800 net: hns3: add Asym Pause support to fix autoneg problem Local device and link partner config auto-negotiation on both, local device config pause frame use as: rx on/tx off, link partner config pause frame use as: rx off/tx on. We except the result is: Local device: Autonegotiate: on RX: on TX: off RX negotiated: on TX negotiated: off Link partner: Autonegotiate: on RX: off TX: on RX negotiated: off TX negotiated: on But actually, the result of Local device and link partner is both: Autonegotiate: on RX: off TX: off RX negotiated: off TX negotiated: off The root cause is that the supported flag is has only Pause, reference to the function genphy_config_advert(): static int genphy_config_advert(struct phy_device *phydev) { ... linkmode_and(phydev->advertising, phydev->advertising, phydev->supported); ... } The pause frame use of link partner is rx off/tx on, so its advertising only set the bit Asym_Pause, and the supported is only set the bit Pause, so the result of linkmode_and(), is rx off/tx off. This patch adds Asym_Pause to the supported flag to fix it. Signed-off-by: Yonglong Liu Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 1 + drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c | 7 +++++++ 2 files changed, 8 insertions(+) commit 18d219b783da61a6cc77581f55fc4af2fa16bc36 Author: Yonglong Liu Date: Fri Jun 28 19:50:11 2019 +0800 net: hns3: fix a -Wformat-nonliteral compile warning When setting -Wformat=2, there is a compiler warning like this: hclge_main.c:xxx:x: warning: format not a string literal and no format arguments [-Wformat-nonliteral] strs[i].desc); ^~~~ This patch adds missing format parameter "%s" to snprintf() to fix it. Fixes: 46a3df9f9718 ("Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Yonglong Liu Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 04f25edb48c441fc278ecc154c270f16966cbb90 Author: Yunsheng Lin Date: Fri Jun 28 19:50:10 2019 +0800 net: hns3: add some error checking in hclge_tm module When hdev->tx_sch_mode is HCLGE_FLAG_VNET_BASE_SCH_MODE, the hclge_tm_schd_mode_vnet_base_cfg calls hclge_tm_pri_schd_mode_cfg with vport->vport_id as pri_id, which is used as index for hdev->tm_info.tc_info, it will cause out of bound access issue if vport_id is equal to or larger than HNAE3_MAX_TC. Also hardware only support maximum speed of HCLGE_ETHER_MAX_RATE. So this patch adds two checks for above cases. Fixes: 848440544b41 ("net: hns3: Add support of TX Scheduler & Shaper to HNS3 driver") Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 9e15be90b85a793815cae92aef80a2907a58bcfc Author: Yunsheng Lin Date: Fri Jun 28 19:50:09 2019 +0800 net: hns3: change SSU's buffer allocation according to UM Currently when there is share buffer in the SSU(storage switching unit), the low waterline for RX private buffer is too low to keep the hardware running. Hardware may have processed all the packet stored in the private buffer of the low waterline before the new packet comes, because hardware only tell the peer send packet again when the private buffer is under the low waterline. So this patch only allocate RX private buffer if there is enough buffer according to hardware user manual. This patch also reserve some buffer for reusing when TC num is less than or equal to 2, and change PAUSE_TRANS_GAP & HCLGE_NON_DCB_ADDITIONAL_BUF according to hardware user manual. Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 2 +- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 65 +++++++++++++++++++++- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.h | 2 +- 3 files changed, 64 insertions(+), 5 deletions(-) commit ae179b2f05189844616ce629ec1e644ad52f35fd Author: Yunsheng Lin Date: Fri Jun 28 19:50:08 2019 +0800 net: hns3: enable DCB when TC num is one and pfc_en is non-zero Currently when TC num is one, the DCB will be disabled no matter if pfc_en is non-zero or not. This patch enables the DCB if pfc_en is non-zero, even when TC num is one. Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller .../net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.c | 2 ++ drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 19 +++++++++++++++++-- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.h | 1 + 3 files changed, 20 insertions(+), 2 deletions(-) commit f96315f2f17e7b2580d2fec7c4d6a706a131d904 Author: Huazhong Tan Date: Fri Jun 28 19:50:07 2019 +0800 net: hns3: fix __QUEUE_STATE_STACK_XOFF not cleared issue When change MTU or other operations, which just calling .reset_notify to do HNAE3_DOWN_CLIENT and HNAE3_UP_CLIENT, then the netdev_tx_reset_queue() in the hns3_clear_all_ring() will be ignored. So the dev_watchdog() may misdiagnose a TX timeout. This patch separates netdev_tx_reset_queue() from hns3_clear_all_ring(), and unifies hns3_clear_all_ring() and hns3_force_clear_all_ring into one, since they are doing similar things. Fixes: 3a30964a2eef ("net: hns3: delay ring buffer clearing during reset") Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 54 ++++++++++++------------- 1 file changed, 26 insertions(+), 28 deletions(-) commit 5b18c705a565d476c1c8396f33c1ab8ea84fe768 Merge: f7110b753b77 9f971573d96f Author: David S. Miller Date: Fri Jun 28 09:31:31 2019 -0700 Merge branch 'Better-PHYLINK-compliance-for-SJA1105-DSA' Vladimir Oltean says: ==================== Better PHYLINK compliance for SJA1105 DSA After discussing with Russell King, it appears this driver is making a few confusions and not performing some checks for consistent operation. Changes in v2: - Removed redundant print in the phylink_validate callback (in 2/3). ==================== Acked-by: Russell King Signed-off-by: David S. Miller commit 9f971573d96fc55efe9d48ff2ca160c9b95fbe37 Author: Vladimir Oltean Date: Fri Jun 28 00:46:37 2019 +0300 net: dsa: sja1105: Mark in-band AN modes not supported for PHYLINK We need a better way to signal this, perhaps in phylink_validate, but for now just print this error message as guidance for other people looking at this driver's code while trying to rework PHYLINK. Cc: Russell King Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller drivers/net/dsa/sja1105/sja1105_main.c | 5 +++++ 1 file changed, 5 insertions(+) commit 39710229af9b6b69b858b36fe97d9239af0afe78 Author: Vladimir Oltean Date: Fri Jun 28 00:46:36 2019 +0300 net: dsa: sja1105: Check for PHY mode mismatches with what PHYLINK reports PHYLINK being designed with PHYs in mind that can change MII protocol, for correct operation it is necessary to ensure that the PHY interface mode stays the same (otherwise clear the supported bit mask, as required). Because this is just a hypothetical situation for now, we don't bother to check whether we could actually support the new PHY interface mode. Actually we could modify the xMII table, reset the switch and send an updated static configuration, but adding that would just be dead code. Cc: Russell King Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller drivers/net/dsa/sja1105/sja1105_main.c | 44 ++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit a979a0ab3687f701ef3a8223cbb56ce993a767fb Author: Vladimir Oltean Date: Fri Jun 28 00:46:35 2019 +0300 net: dsa: sja1105: Don't check state->link in phylink_mac_config It has been pointed out that PHYLINK can call mac_config only to update the phy_interface_type and without knowing what the AN results are. Experimentally, when this was observed to happen, state->link was also unset, and therefore was used as a proxy to ignore this call. However it is also suggested that state->link is undefined for this callback and should not be relied upon. So let the previously-dead codepath for SPEED_UNKNOWN be called, and update the comment to make sure the MAC's behavior is sane. Cc: Russell King Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller drivers/net/dsa/sja1105/sja1105_main.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit f7110b753b77b0639d831ad822aad557b2cf000e Author: Arnd Bergmann Date: Fri Jun 28 12:31:44 2019 +0200 hinic: reduce rss_init stack usage On 32-bit architectures, putting an array of 256 u32 values on the stack uses more space than the warning limit: drivers/net/ethernet/huawei/hinic/hinic_main.c: In function 'hinic_rss_init': drivers/net/ethernet/huawei/hinic/hinic_main.c:286:1: error: the frame size of 1068 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] I considered changing the code to use u8 values here, since that's all the hardware supports, but dynamically allocating the array is a more isolated fix here. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/huawei/hinic/hinic_main.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit 8792e82ddb61098e7642911ad400cfc58795e362 Merge: 42e87024f727 41a4a5a259b2 Author: David S. Miller Date: Fri Jun 28 09:23:39 2019 -0700 Merge branch 'stmmac-10GbE-using-XGMAC' Jose Abreu says: ==================== net: stmmac: 10GbE using XGMAC Support for 10Gb Link using XGMAC core plus some performance tweaks. Tested in a PCI based setup. iperf3 TCP results: TSO ON, MTU=1500, TX Queues = 1, RX Queues = 1, Flow Control ON Pinned CPU (-A), Zero-Copy (-Z) [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-600.00 sec 643 GBytes 9.21 Gbits/sec 1 sender [ 5] 0.00-600.00 sec 643 GBytes 9.21 Gbits/sec receiver ==================== Signed-off-by: David S. Miller commit 41a4a5a259b219a4eddf2682f67186fc5acb7182 Author: Jose Abreu Date: Fri Jun 28 09:29:21 2019 +0200 net: stmmac: Update Kconfig entry We support more speeds now. Update the Kconfig entry. Signed-off-by: Jose Abreu Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3ba07debfc8d7d76bd48577536b5382490b21c10 Author: Jose Abreu Date: Fri Jun 28 09:29:20 2019 +0200 net: stmmac: Only disable interrupts if NAPI is scheduled Only disable the interrupts if RX NAPI gets to be scheduled. Also, schedule the TX NAPI only when the interrupts are disabled. Signed-off-by: Jose Abreu Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 858a31ffc3d97a133e0f4fb2b5726b5ef80cb549 Author: Jose Abreu Date: Fri Jun 28 09:29:19 2019 +0200 net: stmmac: Update RX Tail Pointer to last free entry Update the RX Tail Pointer to the last available SKB entry. Signed-off-by: Jose Abreu Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 ++ 1 file changed, 2 insertions(+) commit a993db88d17d20ccf77f7e609935f28bb9bca1c2 Author: Jose Abreu Date: Fri Jun 28 09:29:18 2019 +0200 net: stmmac: Enable support for > 32 Bits addressing in XGMAC Currently, stmmac only supports 32 bits addressing for SKB. Enable the support for upto 48 bits addressing in XGMAC core. This avoids the use of bounce buffers and increases performance. Changes from v1: - Fallback to 32 bits in failure (Andrew) Signed-off-by: Jose Abreu Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Cc: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/common.h | 1 + drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h | 2 + .../net/ethernet/stmicro/stmmac/dwxgmac2_descs.c | 4 +- drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c | 19 +++++++- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 55 +++++++++++++++++----- 5 files changed, 66 insertions(+), 15 deletions(-) commit a66b58849ffe611402e6c144db010e3bf05863ed Author: Jose Abreu Date: Fri Jun 28 09:29:17 2019 +0200 net: stmmac: Do not disable interrupts when cleaning TX This is a performance killer and anyways the interrupts are being disabled by RX NAPI so no need to disable them again. Signed-off-by: Jose Abreu Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 5b0d7d7da64b42175a41b9c39de0a512216621cd Author: Jose Abreu Date: Fri Jun 28 09:29:16 2019 +0200 net: stmmac: Add the missing speeds that XGMAC supports XGMAC supports following speeds: - 10G XGMII - 5G XGMII - 2.5G XGMII - 2.5G GMII - 1G GMII - 100M MII - 10M MII Add them to the stmmac driver. Signed-off-by: Jose Abreu Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/common.h | 6 +- drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h | 10 ++- .../net/ethernet/stmicro/stmmac/dwxgmac2_core.c | 14 ++-- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 79 ++++++++++++++++++---- 4 files changed, 86 insertions(+), 23 deletions(-) commit 900a81cc119b89c1525197a6d7f714ef6af38c5e Author: Jose Abreu Date: Fri Jun 28 09:29:15 2019 +0200 net: stmmac: dwxgmac: Fix the undefined burst setting Undefined burst shall only be set if pdata asks to. Signed-off-by: Jose Abreu Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 01d1689d6d70de3428bd8e15aebd2da1fcddcaaa Author: Jose Abreu Date: Fri Jun 28 09:29:14 2019 +0200 net: stmmac: Decrease default RX Watchdog value For performance reasons decrease the default RX Watchdog value for the minimum allowed. Signed-off-by: Jose Abreu Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/common.h | 2 +- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 5b1117704d4c59f5dc8df033e418f02838d4a130 Author: Jose Abreu Date: Fri Jun 28 09:29:13 2019 +0200 net: stmmac: Do not try to enable PHY EEE if MAC does not support it Do not enable EEE feature in the PHY if MAC does not support it. Signed-off-by: Jose Abreu Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8fe82bd460312728165f6472bd58be2e5d5ea527 Author: Jose Abreu Date: Fri Jun 28 09:29:12 2019 +0200 net: stmmac: dwxgmac: Enable EDMA by default Enable the EDMA feature by default which gives higher performance. Changes from v1: - Do not use magic values (David) Signed-off-by: Jose Abreu Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h | 4 ++++ drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c | 2 ++ 2 files changed, 6 insertions(+) commit 42e87024f72708291e2b79d3365ba6a50827d0a4 Author: Jose Abreu Date: Fri Jun 28 09:25:07 2019 +0200 net: stmmac: Fix case when PHY handle is not present Some DT bindings do not have the PHY handle. Let's fallback to manually discovery in case phylink_of_phy_connect() fails. Changes from v1: - Fixup comment style (Sergei) Fixes: 74371272f97f ("net: stmmac: Convert to phylink and remove phylib logic") Reported-by: Katsuhiro Suzuki Tested-by: Katsuhiro Suzuki Signed-off-by: Jose Abreu Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Cc: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit e78557baa6d258b68f8fac56bb15d1d5c4be33f5 Merge: 556e2f6020bf 2a92b08b1855 Author: David S. Miller Date: Fri Jun 28 09:15:02 2019 -0700 Merge tag 'wireless-drivers-for-davem-2019-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for 5.2 Hopefully the last set of fixes for 5.2. Nothing special this around, only small fixes and support for new cards. iwlwifi * add new cards for 22000 series and smaller fixes wl18xx * fix a clang warning about unused variables mwifiex * properly handle small vendor IEs (a regression from the recent security fix) ath * fix few SPDX tags mt76 * fix A-MSDU aggregation which got broken in v5.2-rc1 ==================== Signed-off-by: David S. Miller commit 2ffb500d824bbe6535c64d3e7e9971cca0db0a3e Author: Enric Balletbo i Serra Date: Tue May 7 11:52:48 2019 +0200 power: supply: cros: allow to set input voltage and current limit This patch allows reading and writing the input voltage and current limit through the POWER_SUPPLY_PROP_INPUT_VOLTAGE_LIMIT and POWER_SUPPLY_PROP_INPUT_CURRENT_LIMIT sysfs properties. This allows userspace to see current values and to re-configure these values at runtime based on system-level knowledge or user input. By default there is no limit, this is reported as a -1 when reading from userspace. Writing a value will set the current or voltage limit in uA or uV, and writing any negative value will remove that limit. Signed-off-by: Enric Balletbo i Serra Reviewed-by: Guenter Roeck Signed-off-by: Sebastian Reichel drivers/power/supply/cros_usbpd-charger.c | 116 ++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) commit a4496d52b3430cb3c4c16d03cdd5f4ee97ad1241 Author: Enric Balletbo i Serra Date: Tue May 7 11:52:47 2019 +0200 power: supply: add input power and voltage limit properties For thermal management strategy you might be interested on limit the input power for a power supply. We already have current limit but basically what we probably want is to limit power. So, introduce the input_power_limit property. Although the common use case is limit the input power, in some specific cases it is the voltage that is problematic (i.e some regulators have different efficiencies at higher voltage resulting in more heat). So introduce also the input_voltage_limit property. This happens in one Chromebook and is used on the Pixel C's thermal management strategy to effectively limit the input power to 5V 3A when the screen is on. When the screen is on, the display, the CPU, and the GPU all contribute more heat to the system than while the screen is off, and we made a tradeoff to throttle the charger in order to give more of the thermal budget to those other components. So there's nothing fundamentally broken about the hardware that would cause the Pixel C to malfunction if we were charging at 9V or 12V instead of 5V when the screen is on, i.e. if userspace doesn't change this. What would happen is that you wouldn't meet Google's skin temperature targets on the system if the charger was allowed to run at 9V or 12V with the screen on. For folks hacking on Pixel Cs (which is now outside of Google's official support window for Android) and customizing their own kernel and userspace this would be acceptable, but we wanted to expose this feature in the power supply properties because the feature does exist in the Emedded Controller firmware of the Pixel C and all of Google's Chromebooks with USB-C made since 2015 in case someone running an up to date kernel wanted to limit the charging power for thermal or other reasons. This patch exposes a new property, similar to input current limit, to re-configure the maximum voltage from the external supply at runtime based on system-level knowledge or user input. Signed-off-by: Enric Balletbo i Serra Reviewed-by: Guenter Roeck Acked-by: Adam Thomson Reviewed-by: Benson Leung Signed-off-by: Sebastian Reichel Documentation/ABI/testing/sysfs-class-power | 32 +++++++++++++++++++++++++++++ Documentation/power/power_supply_class.txt | 4 ++++ drivers/power/supply/power_supply_sysfs.c | 2 ++ include/linux/power_supply.h | 2 ++ 4 files changed, 40 insertions(+) commit f8377eff548170e8ea8022c067a1fbdf9e1c46a8 Author: Andreas Fritiofson Date: Fri Jun 28 15:08:34 2019 +0200 USB: serial: ftdi_sio: add ID for isodebug v1 This adds the vid:pid of the isodebug v1 isolated JTAG/SWD+UART. Only the second channel is available for use as a serial port. Signed-off-by: Andreas Fritiofson Cc: stable Signed-off-by: Johan Hovold drivers/usb/serial/ftdi_sio.c | 1 + drivers/usb/serial/ftdi_sio_ids.h | 6 ++++++ 2 files changed, 7 insertions(+) commit acb6258acc4fbb76449eec6d0c7ca25254671e31 Author: Jiunn Chang Date: Thu Jun 27 16:01:47 2019 -0500 doc: RCU callback locks need only _bh, not necessarily _irq The UP.rst file calls for locks acquired within RCU callback functions to use _irq variants (spin_lock_irqsave() or similar), which does work, but can be overkill. This commit therefore instead calls for _bh variants (spin_lock_bh() or similar), while noting that _irq does work. Signed-off-by: Paul E. McKenney Signed-off-by: Jiunn Chang Signed-off-by: Jonathan Corbet Documentation/RCU/UP.rst | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 62ee81b5681daa781f5e800346ae8654b3e5a864 Author: Stephen Kitt Date: Thu Jun 27 15:59:38 2019 +0200 docs: format kernel-parameters -- as code The current ReStructuredText formatting results in "--", used to indicate the end of the kernel command-line parameters, appearing as an en-dash instead of two hyphens; this patch formats them as code, "``--``", as done elsewhere in the documentation. Signed-off-by: Stephen Kitt Signed-off-by: Jonathan Corbet Documentation/admin-guide/kernel-parameters.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9159ba14285c5432063a0ad83e50afb95674d9b1 Author: Sheriff Esseson Date: Fri Jun 28 07:20:01 2019 +0100 Doc : doc-guide : Fix a typo fix the disjunction by replacing "of" with "or". Signed-off-by: Sheriff Esseson Signed-off-by: Jonathan Corbet Documentation/doc-guide/kernel-doc.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8abc2a12c83b42cba6e7ac38cf6178585ae1783e Merge: 49872a1cfcea d9d7c0c497b8 Author: Jonathan Corbet Date: Fri Jun 28 09:02:55 2019 -0600 Merge branch 'automarkup' into docs-next Bring in (finally) automatic markup of function() so we need not load up our docs with ugly c:func: annotations. commit 49872a1cfceae38a98ee690e6c860d1cf628364e Author: Mauro Carvalho Chehab Date: Fri Jun 28 09:12:31 2019 -0300 platform: x86: get rid of a non-existent document Changeset 163ede97a9a2 ("Documentation: platform: Delete x86-laptop-drivers.txt") removed the x86-laptop-drivers.txt file, but forgot to update its Kconfig. Fixes: 163ede97a9a2 ("Documentation: platform: Delete x86-laptop-drivers.txt") Signed-off-by: Mauro Carvalho Chehab Acked-by: Andy Shevchenko Signed-off-by: Jonathan Corbet drivers/platform/x86/Kconfig | 3 --- 1 file changed, 3 deletions(-) commit 2b9def8c0d92769eef3ef70d0a7c3646ab185d39 Author: Derek Fang Date: Fri Jun 28 20:51:43 2019 +0800 ASoC: rt1308: Add RT1308 amplifier driver This is the initial amplifier driver for rt1308. Signed-off-by: Derek Fang Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/rt1308.txt | 17 + sound/soc/codecs/Kconfig | 6 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/rt1308.c | 899 +++++++++++++++++++++ sound/soc/codecs/rt1308.h | 291 +++++++ 5 files changed, 1215 insertions(+) commit 775c4c0032c408b8a57a3fc2695eeda101da003a Author: Ludovic Barre Date: Thu Jun 27 09:43:59 2019 +0200 spi: stm32-qspi: remove signal sensitive on completion On umount step a sigkill signal is set (without user specific action), due to sigkill signal the completion will be interrupted and the data transfer can't be finished if a sync is needed. Signed-off-by: Ludovic Barre Signed-off-by: Mark Brown drivers/spi/spi-stm32-qspi.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit cae86eac98cd90934f94072028c362550338e084 Author: Ludovic Barre Date: Thu Jun 27 09:43:58 2019 +0200 dt-bindings: spi: stm32-qspi: add dma properties This patch adds description of dma properties (optional). Signed-off-by: Ludovic Barre Signed-off-by: Mark Brown Documentation/devicetree/bindings/spi/spi-stm32-qspi.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit aff50895269f567d1b30c688ce8d610542991b30 Author: Kuninori Morimoto Date: Fri Jun 28 10:50:04 2019 +0900 ASoC: soc-utils: respawn dummy Platform commit 64ee5067cf64 ("ASoC: soc-utils: remove dummy Platform") removed dummy Platform from ALSA SoC, but it is over-kill. This patch respawn it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/soc-utils.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 6c10da54f3714afe26a2a205d0713d4841762d12 Author: Kuninori Morimoto Date: Fri Jun 28 10:49:52 2019 +0900 ASoC: rockchip: rk3399_gru_sound: consider CPU-Platform possibility commit 961fb3c206dc ("ASoC: rockchip: rk3399_gru_sound: don't select unnecessary Platform") Current ALSA SoC avoid to add duplicate component to rtd, and this driver was selecting CPU component as Platform component. Thus, above patch removed Platform settings from this driver, because it assumed these are same component. But, some CPU driver is using generic DMAEngine, in such case, both CPU component and Platform component will have same of_node/name. In other words, there are some components which are different but have same of_node/name. In such case, Card driver definitely need to select Platform even though it is same as CPU. It is depends on CPU driver, but is difficult to know it from Card driver. This patch reverts above patch. Fixes: commit 961fb3c206dc ("ASoC: rockchip: rk3399_gru_sound: don't select unnecessary Platform") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/rockchip/rk3399_gru_sound.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit 0751154fda401d76d7ff025a9ca63678bf4ca021 Author: Kuninori Morimoto Date: Fri Jun 28 10:49:48 2019 +0900 ASoC: qcom: consider CPU-Platform possibility commit 0814c6412967 ("ASoC: qcom: don't select unnecessary Platform") Current ALSA SoC avoid to add duplicate component to rtd, and this driver was selecting CPU component as Platform component. Thus, above patch removed Platform settings from this driver, because it assumed these are same component. But, some CPU driver is using generic DMAEngine, in such case, both CPU component and Platform component will have same of_node/name. In other words, there are some components which are different but have same of_node/name. In such case, Card driver definitely need to select Platform even though it is same as CPU. It is depends on CPU driver, but is difficult to know it from Card driver. This patch reverts above patch. Fixes: commit 0814c6412967 ("ASoC: qcom: don't select unnecessary Platform") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/qcom/common.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 9f3eb917534511f2e275b7cf63ed76374ade77bc Author: Kuninori Morimoto Date: Fri Jun 28 10:49:44 2019 +0900 ASoC: simple-card-utils: consider CPU-Platform possibility commit 6f0437445735 ("ASoC: simple-card-utils: don't select unnecessary Platform") Current ALSA SoC avoid to add duplicate component to rtd, and this driver was selecting CPU component as Platform component. Thus, above patch removed Platform settings from this driver, because it assumed these are same component. But, some CPU driver is using generic DMAEngine, in such case, both CPU component and Platform component will have same of_node/name. In other words, there are some components which are different but have same of_node/name. In such case, Card driver definitely need to select Platform even though it is same as CPU. It is depends on CPU driver, but is difficult to know it from Card driver. This patch reverts above patch. Fixes: commit 6f0437445735 ("ASoC: simple-card-utils: don't select unnecessary Platform") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/simple-card-utils.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) commit 0296de83a6ca002c6ded44baed914ffdb66f709c Author: Kuninori Morimoto Date: Fri Jun 28 10:49:40 2019 +0900 ASoC: ux500: mop500: consider CPU-Platform possibility commit 9ae6cdb184b6 ("ASoC: ux500: mop500: don't select unnecessary Platform") Current ALSA SoC avoid to add duplicate component to rtd, and this driver was selecting CPU component as Platform component. Thus, above patch removed Platform settings from this driver, because it assumed these are same component. But, some CPU driver is using generic DMAEngine, in such case, both CPU component and Platform component will have same of_node/name. In other words, there are some components which are different but have same of_node/name. In such case, Card driver definitely need to select Platform even though it is same as CPU. It is depends on CPU driver, but is difficult to know it from Card driver. This patch reverts above patch. Fixes: commit 9ae6cdb184b6 ("ASoC: ux500: mop500: don't select unnecessary Platform") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/ux500/mop500.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 569440b46baab1f9f696a688de7860a915cebc26 Author: Kuninori Morimoto Date: Fri Jun 28 10:49:34 2019 +0900 ASoC: ti: rx51: consider CPU-Platform possibility commit f0edc6c1ee48 ("ASoC: ti: rx51: don't select unnecessary Platform") Current ALSA SoC avoid to add duplicate component to rtd, and this driver was selecting CPU component as Platform component. Thus, above patch removed Platform settings from this driver, because it assumed these are same component. But, some CPU driver is using generic DMAEngine, in such case, both CPU component and Platform component will have same of_node/name. In other words, there are some components which are different but have same of_node/name. In such case, Card driver definitely need to select Platform even though it is same as CPU. It is depends on CPU driver, but is difficult to know it from Card driver. This patch reverts above patch. Fixes: commit f0edc6c1ee48 ("ASoC: ti: rx51: don't select unnecessary Platform") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/ti/rx51.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit eb313e23da8da79cf18dff5ee1dbba3580df83b5 Author: Kuninori Morimoto Date: Fri Jun 28 10:49:30 2019 +0900 ASoC: ti: omap-twl4030: consider CPU-Platform possibility commit bfe1273c65e1 ("ASoC: ti: omap-twl4030: don't select unnecessary Platform") Current ALSA SoC avoid to add duplicate component to rtd, and this driver was selecting CPU component as Platform component. Thus, above patch removed Platform settings from this driver, because it assumed these are same component. But, some CPU driver is using generic DMAEngine, in such case, both CPU component and Platform component will have same of_node/name. In other words, there are some components which are different but have same of_node/name. In such case, Card driver definitely need to select Platform even though it is same as CPU. It is depends on CPU driver, but is difficult to know it from Card driver. This patch reverts above patch. Fixes: commit bfe1273c65e1 ("ASoC: ti: omap-twl4030: don't select unnecessary Platform") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/ti/omap-twl4030.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit c5e8c53630a677a347a04e56df2e8c9f43f65c2e Author: Kuninori Morimoto Date: Fri Jun 28 10:49:26 2019 +0900 ASoC: ti: omap-hdmi: consider CPU-Platform possibility commit edba13aeae88 ("ASoC: ti: omap-hdmi: don't select unnecessary Platform") Current ALSA SoC avoid to add duplicate component to rtd, and this driver was selecting CPU component as Platform component. Thus, above patch removed Platform settings from this driver, because it assumed these are same component. But, some CPU driver is using generic DMAEngine, in such case, both CPU component and Platform component will have same of_node/name. In other words, there are some components which are different but have same of_node/name. In such case, Card driver definitely need to select Platform even though it is same as CPU. It is depends on CPU driver, but is difficult to know it from Card driver. This patch reverts above patch. Fixes: commit edba13aeae88 ("ASoC: ti: omap-hdmi: don't select unnecessary Platform") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/ti/omap-hdmi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit b407a17a14475eea74e66ae6b531390ac0ea011c Author: Kuninori Morimoto Date: Fri Jun 28 10:49:22 2019 +0900 ASoC: ti: omap-abe-twl6040: consider CPU-Platform possibility commit 1306ab2eddd1 ("ASoC: ti: omap-abe-twl6040: don't select unnecessary Platform") Current ALSA SoC avoid to add duplicate component to rtd, and this driver was selecting CPU component as Platform component. Thus, above patch removed Platform settings from this driver, because it assumed these are same component. But, some CPU driver is using generic DMAEngine, in such case, both CPU component and Platform component will have same of_node/name. In other words, there are some components which are different but have same of_node/name. In such case, Card driver definitely need to select Platform even though it is same as CPU. It is depends on CPU driver, but is difficult to know it from Card driver. This patch reverts above patch. Fixes: commit 1306ab2eddd1 ("ASoC: ti: omap-abe-twl6040: don't select unnecessary Platform") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/ti/omap-abe-twl6040.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) commit 44e578150f48e9e2517b41cdcababde0b0d0bfa4 Author: Kuninori Morimoto Date: Fri Jun 28 10:49:18 2019 +0900 ASoC: ti: davinci-evm: consider CPU-Platform possibility commit f46da1b9046e ("ASoC: ti: davinci-evm: don't select unnecessary Platform") Current ALSA SoC avoid to add duplicate component to rtd, and this driver was selecting CPU component as Platform component. Thus, above patch removed Platform settings from this driver, because it assumed these are same component. But, some CPU driver is using generic DMAEngine, in such case, both CPU component and Platform component will have same of_node/name. In other words, there are some components which are different but have same of_node/name. In such case, Card driver definitely need to select Platform even though it is same as CPU. It is depends on CPU driver, but is difficult to know it from Card driver. This patch reverts above patch. Fixes: commit f46da1b9046e ("ASoC: ti: davinci-evm: don't select unnecessary Platform") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/ti/davinci-evm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit db1572d43ffbbe2d161d3e7a8fd5295667e42107 Author: Kuninori Morimoto Date: Fri Jun 28 10:49:14 2019 +0900 ASoC: tegra: trimslice: consider CPU-Platform possibility commit 567b374d9973 ("ASoC: tegra: trimslice: don't select unnecessary Platform") Current ALSA SoC avoid to add duplicate component to rtd, and this driver was selecting CPU component as Platform component. Thus, above patch removed Platform settings from this driver, because it assumed these are same component. But, some CPU driver is using generic DMAEngine, in such case, both CPU component and Platform component will have same of_node/name. In other words, there are some components which are different but have same of_node/name. In such case, Card driver definitely need to select Platform even though it is same as CPU. It is depends on CPU driver, but is difficult to know it from Card driver. This patch reverts above patch. Fixes: commit 567b374d9973 ("ASoC: tegra: trimslice: don't select unnecessary Platform") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/tegra/trimslice.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit e0aad4b74fba62893a28ce860a99531d05e1d5ef Author: Kuninori Morimoto Date: Fri Jun 28 10:49:10 2019 +0900 ASoC: tegra: tegra_wm9712: consider CPU-Platform possibility commit 5d62677238e9 ("ASoC: tegra: tegra_wm9712: don't select unnecessary Platform") Current ALSA SoC avoid to add duplicate component to rtd, and this driver was selecting CPU component as Platform component. Thus, above patch removed Platform settings from this driver, because it assumed these are same component. But, some CPU driver is using generic DMAEngine, in such case, both CPU component and Platform component will have same of_node/name. In other words, there are some components which are different but have same of_node/name. In such case, Card driver definitely need to select Platform even though it is same as CPU. It is depends on CPU driver, but is difficult to know it from Card driver. This patch reverts above patch. Fixes: commit 5d62677238e9 ("ASoC: tegra: tegra_wm9712: don't select unnecessary Platform") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/tegra/tegra_wm9712.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e8efc3ff9f839e4d3275a491554b24f17d14aa53 Author: Kuninori Morimoto Date: Fri Jun 28 10:49:06 2019 +0900 ASoC: tegra: tegra_wm8903: consider CPU-Platform possibility commit b28d98527157 ("ASoC: tegra: tegra_wm8903: don't select unnecessary Platform") Current ALSA SoC avoid to add duplicate component to rtd, and this driver was selecting CPU component as Platform component. Thus, above patch removed Platform settings from this driver, because it assumed these are same component. But, some CPU driver is using generic DMAEngine, in such case, both CPU component and Platform component will have same of_node/name. In other words, there are some components which are different but have same of_node/name. In such case, Card driver definitely need to select Platform even though it is same as CPU. It is depends on CPU driver, but is difficult to know it from Card driver. This patch reverts above patch. Fixes: commit b28d98527157 ("ASoC: tegra: tegra_wm8903: don't select unnecessary Platform") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/tegra/tegra_wm8903.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 9e4e02eae46cad3430b8f4c0a7a96a366c562e21 Author: Kuninori Morimoto Date: Fri Jun 28 10:49:02 2019 +0900 ASoC: tegra: tegra_wm8753: consider CPU-Platform possibility commit 404b229b84af ("ASoC: tegra: tegra_wm8753: don't select unnecessary Platform") Current ALSA SoC avoid to add duplicate component to rtd, and this driver was selecting CPU component as Platform component. Thus, above patch removed Platform settings from this driver, because it assumed these are same component. But, some CPU driver is using generic DMAEngine, in such case, both CPU component and Platform component will have same of_node/name. In other words, there are some components which are different but have same of_node/name. In such case, Card driver definitely need to select Platform even though it is same as CPU. It is depends on CPU driver, but is difficult to know it from Card driver. This patch reverts above patch. Fixes: commit 404b229b84af ("ASoC: tegra: tegra_wm8753: don't select unnecessary Platform") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/tegra/tegra_wm8753.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit be2428f3219c4eb32655a3e0db3f28d46e9d7986 Author: Kuninori Morimoto Date: Fri Jun 28 10:48:58 2019 +0900 ASoC: tegra: tegra_sgtl5000: consider CPU-Platform possibility commit cee1cf3f9f9e ("ASoC: tegra: tegra_sgtl5000: don't select unnecessary Platform") Current ALSA SoC avoid to add duplicate component to rtd, and this driver was selecting CPU component as Platform component. Thus, above patch removed Platform settings from this driver, because it assumed these are same component. But, some CPU driver is using generic DMAEngine, in such case, both CPU component and Platform component will have same of_node/name. In other words, there are some components which are different but have same of_node/name. In such case, Card driver definitely need to select Platform even though it is same as CPU. It is depends on CPU driver, but is difficult to know it from Card driver. This patch reverts above patch. Fixes: commit cee1cf3f9f9e ("ASoC: tegra: tegra_sgtl5000: don't select unnecessary Platform") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/tegra/tegra_sgtl5000.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 1dd2e91b08d52eced666e1c1343960ac6374c6a7 Author: Kuninori Morimoto Date: Fri Jun 28 10:48:53 2019 +0900 ASoC: tegra: tegra_rt5677: consider CPU-Platform possibility commit d035d13b2277 ("ASoC: tegra: tegra_rt5677: don't select unnecessary Platform") Current ALSA SoC avoid to add duplicate component to rtd, and this driver was selecting CPU component as Platform component. Thus, above patch removed Platform settings from this driver, because it assumed these are same component. But, some CPU driver is using generic DMAEngine, in such case, both CPU component and Platform component will have same of_node/name. In other words, there are some components which are different but have same of_node/name. In such case, Card driver definitely need to select Platform even though it is same as CPU. It is depends on CPU driver, but is difficult to know it from Card driver. This patch reverts above patch. Fixes: commit d035d13b2277 ("ASoC: tegra: tegra_rt5677: don't select unnecessary Platform") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/tegra/tegra_rt5677.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit ff9194baa91b854ffcec538d4565ecdde40eaf3d Author: Kuninori Morimoto Date: Fri Jun 28 10:48:49 2019 +0900 ASoC: tegra: tegra_rt5640: consider CPU-Platform possibility commit 1d641e1523ca ("ASoC: tegra: tegra_rt5640: don't select unnecessary Platform") Current ALSA SoC avoid to add duplicate component to rtd, and this driver was selecting CPU component as Platform component. Thus, above patch removed Platform settings from this driver, because it assumed these are same component. But, some CPU driver is using generic DMAEngine, in such case, both CPU component and Platform component will have same of_node/name. In other words, there are some components which are different but have same of_node/name. In such case, Card driver definitely need to select Platform even though it is same as CPU. It is depends on CPU driver, but is difficult to know it from Card driver. This patch reverts above patch. Fixes: commit 1d641e1523ca ("ASoC: tegra: tegra_rt5640: don't select unnecessary Platform") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/tegra/tegra_rt5640.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit abe4918b94b372a9cfe8863b77a48b7ab83d9dd6 Author: Kuninori Morimoto Date: Fri Jun 28 10:48:45 2019 +0900 ASoC: tegra: tegra_max98090: consider CPU-Platform possibility commit 4bfd08540b44 ("ASoC: tegra: tegra_max98090: don't select unnecessary Platform") Current ALSA SoC avoid to add duplicate component to rtd, and this driver was selecting CPU component as Platform component. Thus, above patch removed Platform settings from this driver, because it assumed these are same component. But, some CPU driver is using generic DMAEngine, in such case, both CPU component and Platform component will have same of_node/name. In other words, there are some components which are different but have same of_node/name. In such case, Card driver definitely need to select Platform even though it is same as CPU. It is depends on CPU driver, but is difficult to know it from Card driver. This patch reverts above patch. Fixes: commit 4bfd08540b44 ("ASoC: tegra: tegra_max98090: don't select unnecessary Platform") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/tegra/tegra_max98090.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit bae05f2cbf9a8aeaed3408f35759cf1afae3c391 Author: Kuninori Morimoto Date: Fri Jun 28 10:48:40 2019 +0900 ASoC: tegra: tegra_alc5632: consider CPU-Platform possibility commit e7fc99e641da ("ASoC: tegra: tegra_alc5632: don't select unnecessary Platform") Current ALSA SoC avoid to add duplicate component to rtd, and this driver was selecting CPU component as Platform component. Thus, above patch removed Platform settings from this driver, because it assumed these are same component. But, some CPU driver is using generic DMAEngine, in such case, both CPU component and Platform component will have same of_node/name. In other words, there are some components which are different but have same of_node/name. In such case, Card driver definitely need to select Platform even though it is same as CPU. It is depends on CPU driver, but is difficult to know it from Card driver. This patch reverts above patch. Fixes: commit e7fc99e641da ("ASoC: tegra: tegra_alc5632: don't select unnecessary Platform") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/tegra/tegra_alc5632.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit d3569a47663b6feaa2788e885e84afa1c48741e6 Author: Kuninori Morimoto Date: Fri Jun 28 10:48:35 2019 +0900 ASoC: sunxi: sun4i-codec: consider CPU-Platform possibility commit 3f780533bac9 ("ASoC: sunxi: sun4i-codec: don't select unnecessary Platform") Current ALSA SoC avoid to add duplicate component to rtd, and this driver was selecting CPU component as Platform component. Thus, above patch removed Platform settings from this driver, because it assumed these are same component. But, some CPU driver is using generic DMAEngine, in such case, both CPU component and Platform component will have same of_node/name. In other words, there are some components which are different but have same of_node/name. In such case, Card driver definitely need to select Platform even though it is same as CPU. It is depends on CPU driver, but is difficult to know it from Card driver. This patch reverts above patch. Fixes: commit 3f780533bac9 ("ASoC: sunxi: sun4i-codec: don't select unnecessary Platform") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sunxi/sun4i-codec.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e22c32e1d41b69501ab04c1ec865eea606f7ebe2 Author: Kuninori Morimoto Date: Fri Jun 28 10:48:31 2019 +0900 ASoC: sirf: sirf-audio: consider CPU-Platform possibility commit e562a5f13c94 ("ASoC: sirf: sirf-audio: don't select unnecessary Platform") Current ALSA SoC avoid to add duplicate component to rtd, and this driver was selecting CPU component as Platform component. Thus, above patch removed Platform settings from this driver, because it assumed these are same component. But, some CPU driver is using generic DMAEngine, in such case, both CPU component and Platform component will have same of_node/name. In other words, there are some components which are different but have same of_node/name. In such case, Card driver definitely need to select Platform even though it is same as CPU. It is depends on CPU driver, but is difficult to know it from Card driver. This patch reverts above patch. Fixes: commit e562a5f13c94 ("ASoC: sirf: sirf-audio: don't select unnecessary Platform") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sirf/sirf-audio.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 74a25f36ba7af991c1133a5ce75d8f0a65ed3c7c Author: Kuninori Morimoto Date: Fri Jun 28 10:48:27 2019 +0900 ASoC: samsung: tm2_wm5110: consider CPU-Platform possibility commit ae7cbcc43b8c ("ASoC: samsung: tm2_wm5110: don't select unnecessary Platform") Current ALSA SoC avoid to add duplicate component to rtd, and this driver was selecting CPU component as Platform component. Thus, above patch removed Platform settings from this driver, because it assumed these are same component. But, some CPU driver is using generic DMAEngine, in such case, both CPU component and Platform component will have same of_node/name. In other words, there are some components which are different but have same of_node/name. In such case, Card driver definitely need to select Platform even though it is same as CPU. It is depends on CPU driver, but is difficult to know it from Card driver. This patch reverts above patch. Fixes: commit ae7cbcc43b8c ("ASoC: samsung: tm2_wm5110: don't select unnecessary Platform") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/samsung/tm2_wm5110.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 3dfc3e9c24b742067bbcbf849caba294bdb938f6 Author: Kuninori Morimoto Date: Fri Jun 28 10:48:23 2019 +0900 ASoC: samsung: snow: consider CPU-Platform possibility commit a555b6a959e6 ("ASoC: samsung: snow: don't select unnecessary Platform") Current ALSA SoC avoid to add duplicate component to rtd, and this driver was selecting CPU component as Platform component. Thus, above patch removed Platform settings from this driver, because it assumed these are same component. But, some CPU driver is using generic DMAEngine, in such case, both CPU component and Platform component will have same of_node/name. In other words, there are some components which are different but have same of_node/name. In such case, Card driver definitely need to select Platform even though it is same as CPU. It is depends on CPU driver, but is difficult to know it from Card driver. This patch reverts above patch. Fixes: commit a555b6a959e6 ("ASoC: samsung: snow: don't select unnecessary Platform") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/samsung/snow.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 806bfc27ea84e7d934f513b6f4948138c782fb4a Author: Kuninori Morimoto Date: Fri Jun 28 10:48:19 2019 +0900 ASoC: samsung: smdk_wm8994: consider CPU-Platform possibility commit d815e0f08fdd ("ASoC: samsung: smdk_wm8994: don't select unnecessary Platform") Current ALSA SoC avoid to add duplicate component to rtd, and this driver was selecting CPU component as Platform component. Thus, above patch removed Platform settings from this driver, because it assumed these are same component. But, some CPU driver is using generic DMAEngine, in such case, both CPU component and Platform component will have same of_node/name. In other words, there are some components which are different but have same of_node/name. In such case, Card driver definitely need to select Platform even though it is same as CPU. It is depends on CPU driver, but is difficult to know it from Card driver. This patch reverts above patch. Fixes: commit d815e0f08fdd ("ASoC: samsung: smdk_wm8994: don't select unnecessary Platform") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/samsung/smdk_wm8994.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit a0e95c4d376d30e50b2b1f4769a6dcc5c7604505 Author: Kuninori Morimoto Date: Fri Jun 28 10:48:15 2019 +0900 ASoC: samsung: arndale_rt5631: consider CPU-Platform possibility commit 33949eb5019d ("ASoC: samsung: arndale_rt5631: don't select unnecessary Platform") Current ALSA SoC avoid to add duplicate component to rtd, and this driver was selecting CPU component as Platform component. Thus, above patch removed Platform settings from this driver, because it assumed these are same component. But, some CPU driver is using generic DMAEngine, in such case, both CPU component and Platform component will have same of_node/name. In other words, there are some components which are different but have same of_node/name. In such case, Card driver definitely need to select Platform even though it is same as CPU. It is depends on CPU driver, but is difficult to know it from Card driver. This patch reverts above patch. Fixes: commit 33949eb5019d ("ASoC: samsung: arndale_rt5631: don't select unnecessary Platform") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/samsung/arndale_rt5631.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit f94d7b6e63b7323e89e9797dbdf6e56a3ec5d490 Author: Kuninori Morimoto Date: Fri Jun 28 10:48:01 2019 +0900 ASoC: rockchip: rockchip_rt5645: consider CPU-Platform possibility commit 27a37973a6f1 ("ASoC: rockchip: rockchip_rt5645: don't select unnecessary Platform") Current ALSA SoC avoid to add duplicate component to rtd, and this driver was selecting CPU component as Platform component. Thus, above patch removed Platform settings from this driver, because it assumed these are same component. But, some CPU driver is using generic DMAEngine, in such case, both CPU component and Platform component will have same of_node/name. In other words, there are some components which are different but have same of_node/name. In such case, Card driver definitely need to select Platform even though it is same as CPU. It is depends on CPU driver, but is difficult to know it from Card driver. This patch reverts above patch. Fixes: commit 27a37973a6f1 ("ASoC: rockchip: rockchip_rt5645: don't select unnecessary Platform") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/rockchip/rockchip_rt5645.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 5554af40e8d41ed30a619e730ca86e7e98aabe45 Author: Kuninori Morimoto Date: Fri Jun 28 10:47:57 2019 +0900 ASoC: rockchip: rockchip_max98090: consider CPU-Platform possibility commit 7df405ae5895 ("ASoC: rockchip: rockchip_max98090: don't select unnecessary Platform") Current ALSA SoC avoid to add duplicate component to rtd, and this driver was selecting CPU component as Platform component. Thus, above patch removed Platform settings from this driver, because it assumed these are same component. But, some CPU driver is using generic DMAEngine, in such case, both CPU component and Platform component will have same of_node/name. In other words, there are some components which are different but have same of_node/name. In such case, Card driver definitely need to select Platform even though it is same as CPU. It is depends on CPU driver, but is difficult to know it from Card driver. This patch reverts above patch. Fixes: commit 7df405ae5895 ("ASoC: rockchip: rockchip_max98090: don't select unnecessary Platform") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/rockchip/rockchip_max98090.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 418e12fcaa53532aeeaf502dc787eb2a26b11f17 Author: Kuninori Morimoto Date: Fri Jun 28 10:47:54 2019 +0900 ASoC: rockchip: rk3288_hdmi_analog: consider CPU-Platform possibility commit 9c21e82c165c ("ASoC: rockchip: rk3288_hdmi_analog: don't select unnecessary Platform") Current ALSA SoC avoid to add duplicate component to rtd, and this driver was selecting CPU component as Platform component. Thus, above patch removed Platform settings from this driver, because it assumed these are same component. But, some CPU driver is using generic DMAEngine, in such case, both CPU component and Platform component will have same of_node/name. In other words, there are some components which are different but have same of_node/name. In such case, Card driver definitely need to select Platform even though it is same as CPU. It is depends on CPU driver, but is difficult to know it from Card driver. This patch reverts above patch. Fixes: commit 9c21e82c165c ("ASoC: rockchip: rk3288_hdmi_analog: don't select unnecessary Platform") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/rockchip/rk3288_hdmi_analog.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 9522e94749d1eb2e88ca4fb1ed20dbbf6ac381d1 Author: Kuninori Morimoto Date: Fri Jun 28 10:47:50 2019 +0900 ASoC: qcom: storm: consider CPU-Platform possibility commit 3caf11fa88a9 ("ASoC: qcom: storm: don't select unnecessary Platform") Current ALSA SoC avoid to add duplicate component to rtd, and this driver was selecting CPU component as Platform component. Thus, above patch removed Platform settings from this driver, because it assumed these are same component. But, some CPU driver is using generic DMAEngine, in such case, both CPU component and Platform component will have same of_node/name. In other words, there are some components which are different but have same of_node/name. In such case, Card driver definitely need to select Platform even though it is same as CPU. It is depends on CPU driver, but is difficult to know it from Card driver. This patch reverts above patch. Fixes: commit 3caf11fa88a9 ("ASoC: qcom: storm: don't select unnecessary Platform") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/qcom/storm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 291728a523231f22155610fd595a83bdc91f147b Author: Kuninori Morimoto Date: Fri Jun 28 10:47:46 2019 +0900 ASoC: qcom: apq8016_sbc: consider CPU-Platform possibility commit 564684387969 ("ASoC: qcom: apq8016_sbc: don't select unnecessary Platform") Current ALSA SoC avoid to add duplicate component to rtd, and this driver was selecting CPU component as Platform component. Thus, above patch removed Platform settings from this driver, because it assumed these are same component. But, some CPU driver is using generic DMAEngine, in such case, both CPU component and Platform component will have same of_node/name. In other words, there are some components which are different but have same of_node/name. In such case, Card driver definitely need to select Platform even though it is same as CPU. It is depends on CPU driver, but is difficult to know it from Card driver. This patch reverts above patch. Fixes: commit 564684387969 ("ASoC: qcom: apq8016_sbc: don't select unnecessary Platform") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/qcom/apq8016_sbc.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 802e8ed9e912281cbfe4432cf015c82b81e87faa Author: Kuninori Morimoto Date: Fri Jun 28 10:47:42 2019 +0900 ASoC: mxs: mxs-sgtl5000: consider CPU-Platform possibility commit 5f92229d184b ("ASoC: mxs: mxs-sgtl5000: don't select unnecessary Platform") Current ALSA SoC avoid to add duplicate component to rtd, and this driver was selecting CPU component as Platform component. Thus, above patch removed Platform settings from this driver, because it assumed these are same component. But, some CPU driver is using generic DMAEngine, in such case, both CPU component and Platform component will have same of_node/name. In other words, there are some components which are different but have same of_node/name. In such case, Card driver definitely need to select Platform even though it is same as CPU. It is depends on CPU driver, but is difficult to know it from Card driver. This patch reverts above patch. Fixes: commit 5f92229d184b ("ASoC: mxs: mxs-sgtl5000: don't select unnecessary Platform") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/mxs/mxs-sgtl5000.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit bb6630d153a16e0cde1e849fcf298d8fec0e77bb Author: Kuninori Morimoto Date: Fri Jun 28 10:47:38 2019 +0900 ASoC: kirkwood: armada-370-db: consider CPU-Platform possibility commit 717f16331712 ("ASoC: kirkwood: armada-370-db: don't select unnecessary Platform") Current ALSA SoC avoid to add duplicate component to rtd, and this driver was selecting CPU component as Platform component. Thus, above patch removed Platform settings from this driver, because it assumed these are same component. But, some CPU driver is using generic DMAEngine, in such case, both CPU component and Platform component will have same of_node/name. In other words, there are some components which are different but have same of_node/name. In such case, Card driver definitely need to select Platform even though it is same as CPU. It is depends on CPU driver, but is difficult to know it from Card driver. This patch reverts above patch. Fixes: commit 717f16331712 ("ASoC: kirkwood: armada-370-db: don't select unnecessary Platform") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/kirkwood/armada-370-db.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 9213866ac48fbe1f76211b5e539ef4e0011ddd0d Author: Kuninori Morimoto Date: Fri Jun 28 10:47:35 2019 +0900 ASoC: fsl: imx-audmix: consider CPU-Platform possibility commit d8893261a7d32 ("ASoC: fsl: imx-audmix: don't select unnecessary Platform") Current ALSA SoC avoid to add duplicate component to rtd, and this driver was selecting CPU component as Platform component. Thus, above patch removed Platform settings from this driver, because it assumed these are same component. But, some CPU driver is using generic DMAEngine, in such case, both CPU component and Platform component will have same of_node/name. In other words, there are some components which are different but have same of_node/name. In such case, Card driver definitely need to select Platform even though it is same as CPU. It is depends on CPU driver, but is difficult to know it from Card driver. This patch reverts above patch. Fixes: commit d8893261a7d32 ("ASoC: fsl: imx-audmix: don't select unnecessary Platform") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/fsl/imx-audmix.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 9e8f5299c99518e10cb864c2ad62683507d71c21 Author: Kuninori Morimoto Date: Fri Jun 28 10:47:30 2019 +0900 ASoC: fsl: imx-spdif: consider CPU-Platform possibility commit 014f07ca1cb12 ("ASoC: fsl: imx-spdif: don't select unnecessary Platform") Current ALSA SoC avoid to add duplicate component to rtd, and this driver was selecting CPU component as Platform component. Thus, above patch removed Platform settings from this driver, because it assumed these are same component. But, some CPU driver is using generic DMAEngine, in such case, both CPU component and Platform component will have same of_node/name. In other words, there are some components which are different but have same of_node/name. In such case, Card driver definitely need to select Platform even though it is same as CPU. It is depends on CPU driver, but is difficult to know it from Card driver. This patch reverts above patch. Fixes: commit 014f07ca1cb12 ("ASoC: fsl: imx-spdif: don't select unnecessary Platform") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/fsl/imx-spdif.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 2b1407c989ec2083fd6aa6d9ae3fa2929e42d471 Author: Kuninori Morimoto Date: Fri Jun 28 10:47:26 2019 +0900 ASoC: fsl: imx-sgtl5000: consider CPU-Platform possibility commit 82bf78ca49a3 ("ASoC: fsl: imx-sgtl5000: don't select unnecessary Platform") Current ALSA SoC avoid to add duplicate component to rtd, and this driver was selecting CPU component as Platform component. Thus, above patch removed Platform settings from this driver, because it assumed these are same component. But, some CPU driver is using generic DMAEngine, in such case, both CPU component and Platform component will have same of_node/name. In other words, there are some components which are different but have same of_node/name. In such case, Card driver definitely need to select Platform even though it is same as CPU. It is depends on CPU driver, but is difficult to know it from Card driver. This patch reverts above patch. Fixes: commit 82bf78ca49a3 ("ASoC: fsl: imx-sgtl5000: don't select unnecessary Platform") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/fsl/imx-sgtl5000.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 8bebc822a50a9b5ae3dd88ebec7a3f4872da219c Author: Kuninori Morimoto Date: Fri Jun 28 10:47:22 2019 +0900 ASoC: fsl: imx-es8328: consider CPU-Platform possibility commit 577cf50d4dc8 ("ASoC: fsl: imx-es8328: don't select unnecessary Platform") Current ALSA SoC avoid to add duplicate component to rtd, and this driver was selecting CPU component as Platform component. Thus, above patch removed Platform settings from this driver, because it assumed these are same component. But, some CPU driver is using generic DMAEngine, in such case, both CPU component and Platform component will have same of_node/name. In other words, there are some components which are different but have same of_node/name. In such case, Card driver definitely need to select Platform even though it is same as CPU. It is depends on CPU driver, but is difficult to know it from Card driver. This patch reverts above patch. Fixes: commit 577cf50d4dc8 ("ASoC: fsl: imx-es8328: don't select unnecessary Platform") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/fsl/imx-es8328.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 9998d3e2add865723a4dffabaa0a8c12c7ee589b Author: Kuninori Morimoto Date: Fri Jun 28 10:47:18 2019 +0900 ASoC: fsl: fsl-asoc-card: consider CPU-Platform possibility commit e57a4c2f15df27 ("ASoC: fsl: fsl-asoc-card: don't select unnecessary Platform") Current ALSA SoC avoid to add duplicate component to rtd, and this driver was selecting CPU component as Platform component. Thus, above patch removed Platform settings from this driver, because it assumed these are same component. But, some CPU driver is using generic DMAEngine, in such case, both CPU component and Platform component will have same of_node/name. In other words, there are some components which are different but have same of_node/name. In such case, Card driver definitely need to select Platform even though it is same as CPU. It is depends on CPU driver, but is difficult to know it from Card driver. This patch reverts above patch. Fixes: commit e57a4c2f15df27 ("ASoC: fsl: fsl-asoc-card: don't select unnecessary Platform") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/fsl/fsl-asoc-card.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 68707c37017086c51b319098afb2cf6d6853ef57 Author: Kuninori Morimoto Date: Fri Jun 28 10:47:14 2019 +0900 ASoC: fsl: eukrea-tlv320: consider CPU-Platform possibility commit 2058ea1c4f514a ("ASoC: fsl: eukrea-tlv320: don't select unnecessary Platform") Current ALSA SoC avoid to add duplicate component to rtd, and this driver was selecting CPU component as Platform component. Thus, above patch removed Platform settings from this driver, because it assumed these are same component. But, some CPU driver is using generic DMAEngine, in such case, both CPU component and Platform component will have same of_node/name. In other words, there are some components which are different but have same of_node/name. In such case, Card driver definitely need to select Platform even though it is same as CPU. It is depends on CPU driver, but is difficult to know it from Card driver. This patch reverts above patch. Fixes: commit 2058ea1c4f514a ("ASoC: fsl: eukrea-tlv320: don't select unnecessary Platform") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/fsl/eukrea-tlv320.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 6910bb935a448f3af64bf4ab7754cc0870590146 Author: Kuninori Morimoto Date: Fri Jun 28 10:47:10 2019 +0900 ASoC: atmel: tse850-pcm5142: consider CPU-Platform possibility commit 655368dfc75e8 ("ASoC: atmel: tse850-pcm5142: don't select unnecessary Platform") Current ALSA SoC avoid to add duplicate component to rtd, and this driver was selecting CPU component as Platform component. Thus, above patch removed Platform settings from this driver, because it assumed these are same component. But, some CPU driver is using generic DMAEngine, in such case, both CPU component and Platform component will have same of_node/name. In other words, there are some components which are different but have same of_node/name. In such case, Card driver definitely need to select Platform even though it is same as CPU. It is depends on CPU driver, but is difficult to know it from Card driver. This patch reverts above patch. Fixes: commit 655368dfc75e8 ("ASoC: atmel: tse850-pcm5142: don't select unnecessary Platform") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/atmel/tse850-pcm5142.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e1be6aa0984e8b3d1aeccda527360f9c7c9ff54f Author: Kuninori Morimoto Date: Fri Jun 28 10:47:06 2019 +0900 ASoC: atmel: sam9x5_wm8731: consider CPU-Platform possibility commit ced5b08020cd ("ASoC: atmel: sam9x5_wm8731: don't select unnecessary Platform") Current ALSA SoC avoid to add duplicate component to rtd, and this driver was selecting CPU component as Platform component. Thus, above patch removed Platform settings from this driver, because it assumed these are same component. But, some CPU driver is using generic DMAEngine, in such case, both CPU component and Platform component will have same of_node/name. In other words, there are some components which are different but have same of_node/name. In such case, Card driver definitely need to select Platform even though it is same as CPU. It is depends on CPU driver, but is difficult to know it from Card driver. This patch reverts above patch. Fixes: commit ced5b08020cd ("ASoC: atmel: sam9x5_wm8731: don't select unnecessary Platform") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/atmel/sam9x5_wm8731.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 0efd1d7cbcc5f5be4025fc6cd2809e50c3030f09 Author: Kuninori Morimoto Date: Fri Jun 28 10:47:02 2019 +0900 ASoC: atmel: sam9g20_wm8731: consider CPU-Platform possibility commit bfc7938e58142a5 ("ASoC: atmel: sam9g20_wm8731: don't select unnecessary Platform") Current ALSA SoC avoid to add duplicate component to rtd, and this driver was selecting CPU component as Platform component. Thus, above patch removed Platform settings from this driver, because it assumed these are same component. But, some CPU driver is using generic DMAEngine, in such case, both CPU component and Platform component will have same of_node/name. In other words, there are some components which are different but have same of_node/name. In such case, Card driver definitely need to select Platform even though it is same as CPU. It is depends on CPU driver, but is difficult to know it from Card driver. This patch reverts above patch. Fixes: commit bfc7938e58142a5 ("ASoC: atmel: sam9g20_wm8731: don't select unnecessary Platform") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/atmel/sam9g20_wm8731.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 716407ea57fa38fc1b04c699f1b83847cf669872 Author: Kuninori Morimoto Date: Fri Jun 28 10:46:49 2019 +0900 ASoC: amtel: mikroe-proto: consider CPU-Platform possibility commit 318ebbe8060d96 ("ASoC: atmel: mikroe-proto: don't select unnecessary Platform") Current ALSA SoC avoid to add duplicate component to rtd, and this driver was selecting CPU component as Platform component. Thus, above patch removed Platform settings from this driver, because it assumed these are same component. But, some CPU driver is using generic DMAEngine, in such case, both CPU component and Platform component will have same of_node/name. In other words, there are some components which are different but have same of_node/name. In such case, Card driver definitely need to select Platform even though it is same as CPU. It is depends on CPU driver, but is difficult to know it from Card driver. This patch reverts above patch. Fixes: commit 318ebbe8060d96 ("ASoC: atmel: mikroe-proto: don't select unnecessary Platform") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/atmel/mikroe-proto.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 16589b77a95668b0046658188ea55684709768c2 Author: Kuninori Morimoto Date: Fri Jun 28 10:46:37 2019 +0900 ASoC: atmel: atmel_wm8904: consider CPU-Platform possibility unnecessary Platform" commit 3609750e9d4ba9db ("ASoC: atmel: atmel_wm8904: don't select unnecessary Platform") Current ALSA SoC avoid to add duplicate component to rtd, and this driver was selecting CPU component as Platform component. Thus, above patch removed Platform settings from this driver, because it assumed these are same component. But, some CPU driver is using generic DMAEngine, in such case, both CPU component and Platform component will have same of_node/name. In other words, there are some components which are different but have same of_node/name. In such case, Card driver definitely need to select Platform even though it is same as CPU. It is depends on CPU driver, but is difficult to know it from Card driver. This patch reverts above patch. Fixes: commit 3609750e9d4ba9db ("ASoC: atmel: atmel_wm8904: don't select unnecessary Platform") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/atmel/atmel_wm8904.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ea2d1868c4841423e0eb658f3f5747c7513c9187 Author: Kuninori Morimoto Date: Fri Jun 28 10:46:24 2019 +0900 ASoC: atmel: atmel-pdmic: consider CPU-Platform possibility commit 7baf32e164da5d4 ("ASoC: atmel: atmel-pdmic: don't select unnecessary Platform") Current ALSA SoC avoid to add duplicate component to rtd, and this driver was selecting CPU component as Platform component. Thus, above patch removed Platform settings from this driver, because it assumed these are same component. But, some CPU driver is using generic DMAEngine, in such case, both CPU component and Platform component will have same of_node/name. In other words, there are some components which are different but have same of_node/name. In such case, Card driver definitely need to select Platform even though it is same as CPU. It is depends on CPU driver, but is difficult to know it from Card driver. This patch reverts above patch. Fixes: commit 7baf32e164da5d4 ("ASoC: atmel: atmel-pdmic: don't select unnecessary Platform") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/atmel/atmel-pdmic.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit ca1c67d1603a8702792c8bf984b169ccb1a72718 Author: Kuninori Morimoto Date: Fri Jun 28 10:46:19 2019 +0900 ASoC: atmel: atmel-classd: consider CPU-Platform possibility commit 02602401e5316 ("ASoC: atmel: atmel-classd: don't select unnecessary Platform") Current ALSA SoC avoid to add duplicate component to rtd, and this driver was selecting CPU component as Platform component. Thus, above patch removed Platform settings from this driver, because it assumed these are same component. But, some CPU driver is using generic DMAEngine, in such case, both CPU component and Platform component will have same of_node/name. In other words, there are some components which are different but have same of_node/name. In such case, Card driver definitely need to select Platform even though it is same as CPU. It is depends on CPU driver, but is difficult to know it from Card driver. This patch reverts above patch. Fixes: commit 02602401e5316 ("ASoC: atmel: atmel-classd: don't select unnecessary Platform") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/atmel/atmel-classd.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 8a90efd15ef6472809374aea963927dcba2bfc03 Author: Kuninori Morimoto Date: Fri Jun 28 10:46:14 2019 +0900 ASoC: vc4: vc4_htmi: consider CPU-Platform possibility commit 6c6de1c9e2bf2 ("ASoC: vc4: vc4_hdmi: don't select unnecessary Platform") Current ALSA SoC avoid to add duplicate component to rtd, and this driver was selecting CPU component as Platform component. Thus, above patch removed Platform settings from this driver, because it assumed these are same component. But, some CPU driver is using generic DMAEngine, in such case, both CPU component and Platform component will have same of_node/name. In other words, there are some components which are different but have same of_node/name. In such case, Card driver definitely need to select Platform even though it is same as CPU. It is depends on CPU driver, but is difficult to know it from Card driver. This patch reverts above patch. Fixes: commit 6c6de1c9e2bf2 ("ASoC: vc4: vc4_hdmi: don't select unnecessary Platform") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown drivers/gpu/drm/vc4/vc4_hdmi.c | 4 ++++ 1 file changed, 4 insertions(+) commit 1ad741d0e8e8ecccc16aa9ccb8362575197d91bf Author: Colin Ian King Date: Thu Jun 27 14:32:08 2019 +0100 ASoC: topology: fix memory leaks on sm, se and sbe Currently when a kstrdup fails the error exit paths don't free the allocations for sm, se and sbe. This can be fixed by assigning kc[i].private_value to these before doing the ksrtdup so that the error exit path will be able to free these objects. Addresses-Coverity: ("Resource leak") Fixes: 9f90af3a9952 ("ASoC: topology: Consolidate and fix asoc_tplg_dapm_widget_*_create flow") Signed-off-by: Colin Ian King Signed-off-by: Mark Brown sound/soc/soc-topology.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ee006eb00a00198d21dad60696318fd443a59f88 Author: Lyude Paul Date: Thu Jun 20 19:21:26 2019 -0400 drm/amdgpu: Don't skip display settings in hwmgr_resume() I'm not entirely sure why this is, but for some reason: 921935dc6404 ("drm/amd/powerplay: enforce display related settings only on needed") Breaks runtime PM resume on the Radeon PRO WX 3100 (Lexa) in one the pre-production laptops I have. The issue manifests as the following messages in dmesg: [drm] UVD and UVD ENC initialized successfully. amdgpu 0000:3b:00.0: [drm:amdgpu_ring_test_helper [amdgpu]] *ERROR* ring vce1 test failed (-110) [drm:amdgpu_device_ip_resume_phase2 [amdgpu]] *ERROR* resume of IP block failed -110 [drm:amdgpu_device_resume [amdgpu]] *ERROR* amdgpu_device_ip_resume failed (-110). And happens after about 6-10 runtime PM suspend/resume cycles (sometimes sooner, if you're lucky!). Unfortunately I can't seem to pin down precisely which part in psm_adjust_power_state_dynamic that is causing the issue, but not skipping the display setting setup seems to fix it. Hopefully if there is a better fix for this, this patch will spark discussion around it. Fixes: 921935dc6404 ("drm/amd/powerplay: enforce display related settings only on needed") Cc: Evan Quan Cc: Alex Deucher Cc: Huang Rui Cc: Rex Zhu Cc: Likun Gao Cc: # v5.1+ Signed-off-by: Lyude Paul Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8af26493c03581ad476a77630502de6152cf013d Author: Kuninori Morimoto Date: Fri Jun 28 13:07:05 2019 +0900 ASoC: atmel: atmel-pcm-dma.c: use devm_snd_dmaengine_pcm_register() We have devm_xxx version of snd_dmaengine_pcm_register, let's use it. This patch also removes related empty functions Signed-off-by: Kuninori Morimoto Reviewed-by: Codrin Ciubotariu Signed-off-by: Mark Brown sound/soc/atmel/atmel-pcm-dma.c | 9 ++------- sound/soc/atmel/atmel-pcm-pdc.c | 5 ----- sound/soc/atmel/atmel-pcm.h | 8 -------- sound/soc/atmel/atmel_ssc_dai.c | 11 ----------- 4 files changed, 2 insertions(+), 31 deletions(-) commit 39b27ffef7516adf8a1265c34b04407b21c1406c Author: tiancyin Date: Thu Jun 27 14:19:37 2019 +0800 drm/amd/powerplay: update smu11_driver_if_navi10.h update the smu11_driver_if_navi10.h since navi10 smu fw update to 42.28 Acked-by: Alex Deucher Signed-off-by: tiancyin Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/smu11_driver_if_navi10.h | 6 +++--- drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit d2ce8d6bfcfed014fd281e06c9b1d4638ddf3f1e Author: Jiunn Chang Date: Thu Jun 27 00:04:26 2019 -0500 nl80211: Fix undefined behavior in bit shift Shifting signed 32-bit value by 31 bits is undefined. Changing most significant bit to unsigned. Signed-off-by: Jiunn Chang Signed-off-by: Johannes Berg include/uapi/linux/nl80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 837567c1e9d587c0b438263c9cfd32de46640e16 Author: Russell King Date: Thu Jan 24 14:18:17 2019 +0000 drm/armada: no need to check parent of remote There's no need to check the parent of the remote device to check whether it is available or not, the remote is the device itself. Signed-off-by: Russell King drivers/gpu/drm/armada/armada_drv.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) commit 989b9a7dd4ab40eb63026754b10527bf1d03bf86 Author: Russell King Date: Thu Jan 24 09:56:46 2019 +0000 drm/armada: use for_each_endpoint_of_node() to walk crtc endpoints Rather than having a nested set of for_each_child_of_node() walkers, use the graph walker to iterate through the endpoints for CRTCs. Signed-off-by: Russell King drivers/gpu/drm/armada/armada_drv.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit f54a5990c32978dcb84ef1d38d22457bf3129797 Author: Lubomir Rintel Date: Mon Jan 21 07:01:57 2019 +0100 drm/armada: replace the simple-framebuffer If there's a simple-framebuffer carried over from boot firmware, it's going to stop working once we setup the LCDC for use via DRM. Kick it off from the hardware. Signed-off-by: Lubomir Rintel Signed-off-by: Russell King drivers/gpu/drm/armada/armada_drv.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 06734cb0ab007d0b6810b98458688c3acdd9c962 Author: Russell King Date: Sat Jul 7 16:53:39 2018 +0100 drm/armada: redo CRTC debugfs files Move the CRTC debugfs files into the CRTC specific directory. Signed-off-by: Russell King drivers/gpu/drm/armada/armada_crtc.c | 9 +++ drivers/gpu/drm/armada/armada_debugfs.c | 98 +++++++++++++-------------------- drivers/gpu/drm/armada/armada_drm.h | 1 + 3 files changed, 48 insertions(+), 60 deletions(-) commit dbc3117d4ca9e17819ac73501e914b8422686750 Author: Douglas Anderson Date: Thu Jun 27 21:44:09 2019 -0700 block, bfq: NULL out the bic when it's no longer valid In reboot tests on several devices we were seeing a "use after free" when slub_debug or KASAN was enabled. The kernel complained about: Unable to handle kernel paging request at virtual address 6b6b6c2b ...which is a classic sign of use after free under slub_debug. The stack crawl in kgdb looked like: 0 test_bit (addr=, nr=) 1 bfq_bfqq_busy (bfqq=) 2 bfq_select_queue (bfqd=) 3 __bfq_dispatch_request (hctx=) 4 bfq_dispatch_request (hctx=) 5 0xc056ef00 in blk_mq_do_dispatch_sched (hctx=0xed249440) 6 0xc056f728 in blk_mq_sched_dispatch_requests (hctx=0xed249440) 7 0xc0568d24 in __blk_mq_run_hw_queue (hctx=0xed249440) 8 0xc0568d94 in blk_mq_run_work_fn (work=) 9 0xc024c5c4 in process_one_work (worker=0xec6d4640, work=0xed249480) 10 0xc024cff4 in worker_thread (__worker=0xec6d4640) Digging in kgdb, it could be found that, though bfqq looked fine, bfqq->bic had been freed. Through further digging, I postulated that perhaps it is illegal to access a "bic" (AKA an "icq") after bfq_exit_icq() had been called because the "bic" can be freed at some point in time after this call is made. I confirmed that there certainly were cases where the exact crashing code path would access the "bic" after bfq_exit_icq() had been called. Sspecifically I set the "bfqq->bic" to (void *)0x7 and saw that the bic was 0x7 at the time of the crash. To understand a bit more about why this crash was fairly uncommon (I saw it only once in a few hundred reboots), you can see that much of the time bfq_exit_icq_fbqq() fully frees the bfqq and thus it can't access the ->bic anymore. The only case it doesn't is if bfq_put_queue() sees a reference still held. However, even in the case when bfqq isn't freed, the crash is still rare. Why? I tracked what happened to the "bic" after the exit routine. It doesn't get freed right away. Rather, put_io_context_active() eventually called put_io_context() which queued up freeing on a workqueue. The freeing then actually happened later than that through call_rcu(). Despite all these delays, some extra debugging showed that all the hoops could be jumped through in time and the memory could be freed causing the original crash. Phew! To make a long story short, assuming it truly is illegal to access an icq after the "exit_icq" callback is finished, this patch is needed. Cc: stable@vger.kernel.org Reviewed-by: Paolo Valente Signed-off-by: Douglas Anderson Signed-off-by: Jens Axboe block/bfq-iosched.c | 1 + 1 file changed, 1 insertion(+) commit dff90d58a1c815b87b2603295382c97e78064349 Author: Coly Li Date: Fri Jun 28 20:00:00 2019 +0800 bcache: add reclaimed_journal_buckets to struct cache_set Now we have counters for how many times jouranl is reclaimed, how many times cached dirty btree nodes are flushed, but we don't know how many jouranl buckets are really reclaimed. This patch adds reclaimed_journal_buckets into struct cache_set, this is an increasing only counter, to tell how many journal buckets are reclaimed since cache set runs. From all these three counters (reclaim, reclaimed_journal_buckets, flush_write), we can have idea how well current journal space reclaim code works. Signed-off-by: Coly Li Signed-off-by: Jens Axboe drivers/md/bcache/bcache.h | 1 + drivers/md/bcache/journal.c | 1 + drivers/md/bcache/sysfs.c | 5 +++++ 3 files changed, 7 insertions(+) commit 91be66e1318f67ed5888ca10e10cc8ffdc24f661 Author: Coly Li Date: Fri Jun 28 19:59:59 2019 +0800 bcache: performance improvement for btree_flush_write() This patch improves performance for btree_flush_write() in following ways, - Use another spinlock journal.flush_write_lock to replace the very hot journal.lock. We don't have to use journal.lock here, selecting candidate btree nodes takes a lot of time, hold journal.lock here will block other jouranling threads and drop the overall I/O performance. - Only select flushing btree node from c->btree_cache list. When the machine has a large system memory, mca cache may have a huge number of cached btree nodes. Iterating all the cached nodes will take a lot of CPU time, and most of the nodes on c->btree_cache_freeable and c->btree_cache_freed lists are cleared and have need to flush. So only travel mca list c->btree_cache to select flushing btree node should be enough for most of the cases. - Don't iterate whole c->btree_cache list, only reversely select first BTREE_FLUSH_NR btree nodes to flush. Iterate all btree nodes from c->btree_cache and select the oldest journal pin btree nodes consumes huge number of CPU cycles if the list is huge (push and pop a node into/out of a heap is expensive). The last several dirty btree nodes on the tail of c->btree_cache list are earlest allocated and cached btree nodes, they are relative to the oldest journal pin btree nodes. Therefore only flushing BTREE_FLUSH_NR btree nodes from tail of c->btree_cache probably includes the oldest journal pin btree nodes. In my testing, the above change decreases 50%+ CPU consumption when journal space is full. Some times IOPS drops to 0 for 5-8 seconds, comparing blocking I/O for 120+ seconds in previous code, this is much better. Maybe there is room to improve in future, but at this momment the fix looks fine and performs well in my testing. Signed-off-by: Coly Li Signed-off-by: Jens Axboe drivers/md/bcache/journal.c | 85 +++++++++++++++++++++++++++++++++------------ drivers/md/bcache/journal.h | 4 +++ 2 files changed, 67 insertions(+), 22 deletions(-) commit 50a260e859964002dab162513a10f91ae9d3bcd3 Author: Coly Li Date: Fri Jun 28 19:59:58 2019 +0800 bcache: fix race in btree_flush_write() There is a race between mca_reap(), btree_node_free() and journal code btree_flush_write(), which results very rare and strange deadlock or panic and are very hard to reproduce. Let me explain how the race happens. In btree_flush_write() one btree node with oldest journal pin is selected, then it is flushed to cache device, the select-and-flush is a two steps operation. Between these two steps, there are something may happen inside the race window, - The selected btree node was reaped by mca_reap() and allocated to other requesters for other btree node. - The slected btree node was selected, flushed and released by mca shrink callback bch_mca_scan(). When btree_flush_write() tries to flush the selected btree node, firstly b->write_lock is held by mutex_lock(). If the race happens and the memory of selected btree node is allocated to other btree node, if that btree node's write_lock is held already, a deadlock very probably happens here. A worse case is the memory of the selected btree node is released, then all references to this btree node (e.g. b->write_lock) will trigger NULL pointer deference panic. This race was introduced in commit cafe56359144 ("bcache: A block layer cache"), and enlarged by commit c4dc2497d50d ("bcache: fix high CPU occupancy during journal"), which selected 128 btree nodes and flushed them one-by-one in a quite long time period. Such race is not easy to reproduce before. On a Lenovo SR650 server with 48 Xeon cores, and configure 1 NVMe SSD as cache device, a MD raid0 device assembled by 3 NVMe SSDs as backing device, this race can be observed around every 10,000 times btree_flush_write() gets called. Both deadlock and kernel panic all happened as aftermath of the race. The idea of the fix is to add a btree flag BTREE_NODE_journal_flush. It is set when selecting btree nodes, and cleared after btree nodes flushed. Then when mca_reap() selects a btree node with this bit set, this btree node will be skipped. Since mca_reap() only reaps btree node without BTREE_NODE_journal_flush flag, such race is avoided. Once corner case should be noticed, that is btree_node_free(). It might be called in some error handling code path. For example the following code piece from btree_split(), 2149 err_free2: 2150 bkey_put(b->c, &n2->key); 2151 btree_node_free(n2); 2152 rw_unlock(true, n2); 2153 err_free1: 2154 bkey_put(b->c, &n1->key); 2155 btree_node_free(n1); 2156 rw_unlock(true, n1); At line 2151 and 2155, the btree node n2 and n1 are released without mac_reap(), so BTREE_NODE_journal_flush also needs to be checked here. If btree_node_free() is called directly in such error handling path, and the selected btree node has BTREE_NODE_journal_flush bit set, just delay for 1 us and retry again. In this case this btree node won't be skipped, just retry until the BTREE_NODE_journal_flush bit cleared, and free the btree node memory. Fixes: cafe56359144 ("bcache: A block layer cache") Signed-off-by: Coly Li Reported-and-tested-by: kbuild test robot Cc: stable@vger.kernel.org Signed-off-by: Jens Axboe drivers/md/bcache/btree.c | 28 +++++++++++++++++++++++++++- drivers/md/bcache/btree.h | 2 ++ drivers/md/bcache/journal.c | 7 +++++++ 3 files changed, 36 insertions(+), 1 deletion(-) commit d91ce7574daf48a4567ba62733d43284f5d2a3f4 Author: Coly Li Date: Fri Jun 28 19:59:57 2019 +0800 bcache: remove retry_flush_write from struct cache_set In struct cache_set, retry_flush_write is added for commit c4dc2497d50d ("bcache: fix high CPU occupancy during journal") which is reverted in previous patch. Now it is useless anymore, and this patch removes it from bcache code. Signed-off-by: Coly Li Signed-off-by: Jens Axboe drivers/md/bcache/bcache.h | 1 - drivers/md/bcache/journal.c | 1 - drivers/md/bcache/sysfs.c | 5 ----- 3 files changed, 7 deletions(-) commit 41508bb7d46b74dba631017e5a702a86caf1db8c Author: Coly Li Date: Fri Jun 28 19:59:56 2019 +0800 bcache: add comments for mutex_lock(&b->write_lock) When accessing or modifying BTREE_NODE_dirty bit, it is not always necessary to acquire b->write_lock. In bch_btree_cache_free() and mca_reap() acquiring b->write_lock is necessary, and this patch adds comments to explain why mutex_lock(&b->write_lock) is necessary for checking or clearing BTREE_NODE_dirty bit there. Signed-off-by: Coly Li Signed-off-by: Jens Axboe drivers/md/bcache/btree.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit e5ec5f4765ada9c75fb3eee93a6e72f0e50599d5 Author: Coly Li Date: Fri Jun 28 19:59:55 2019 +0800 bcache: only clear BTREE_NODE_dirty bit when it is set In bch_btree_cache_free() and btree_node_free(), BTREE_NODE_dirty is always set no matter btree node is dirty or not. The code looks like this, if (btree_node_dirty(b)) btree_complete_write(b, btree_current_write(b)); clear_bit(BTREE_NODE_dirty, &b->flags); Indeed if btree_node_dirty(b) returns false, it means BTREE_NODE_dirty bit is cleared, then it is unnecessary to clear the bit again. This patch only clears BTREE_NODE_dirty when btree_node_dirty(b) is true (the bit is set), to save a few CPU cycles. Signed-off-by: Coly Li Signed-off-by: Jens Axboe drivers/md/bcache/btree.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 249a5f6da57c28a903c75d81505d58ec8c10030d Author: Coly Li Date: Fri Jun 28 19:59:54 2019 +0800 bcache: Revert "bcache: fix high CPU occupancy during journal" This reverts commit c4dc2497d50d9c6fb16aa0d07b6a14f3b2adb1e0. This patch enlarges a race between normal btree flush code path and flush_btree_write(), which causes deadlock when journal space is exhausted. Reverts this patch makes the race window from 128 btree nodes to only 1 btree nodes. Fixes: c4dc2497d50d ("bcache: fix high CPU occupancy during journal") Signed-off-by: Coly Li Cc: stable@vger.kernel.org Cc: Tang Junhui Signed-off-by: Jens Axboe drivers/md/bcache/bcache.h | 2 -- drivers/md/bcache/journal.c | 47 +++++++++++++++------------------------------ drivers/md/bcache/util.h | 2 -- 3 files changed, 15 insertions(+), 36 deletions(-) commit ba82c1ac1667d6efb91a268edb13fc9cdaecec9b Author: Coly Li Date: Fri Jun 28 19:59:53 2019 +0800 bcache: Revert "bcache: free heap cache_set->flush_btree in bch_journal_free" This reverts commit 6268dc2c4703aabfb0b35681be709acf4c2826c6. This patch depends on commit c4dc2497d50d ("bcache: fix high CPU occupancy during journal") which is reverted in previous patch. So revert this one too. Fixes: 6268dc2c4703 ("bcache: free heap cache_set->flush_btree in bch_journal_free") Signed-off-by: Coly Li Cc: stable@vger.kernel.org Cc: Shenghui Wang Signed-off-by: Jens Axboe drivers/md/bcache/journal.c | 1 - 1 file changed, 1 deletion(-) commit 1df3877ff6a4810054237c3259d900ded4468969 Author: Coly Li Date: Fri Jun 28 19:59:52 2019 +0800 bcache: shrink btree node cache after bch_btree_check() When cache set starts, bch_btree_check() will check all bkeys on cache device by calculating the checksum. This operation will consume a huge number of system memory if there are a lot of data cached. Since bcache uses its own mca cache to maintain all its read-in btree nodes, and only releases the cache space when system memory manage code starts to shrink caches. Then before memory manager code to call the mca cache shrinker callback, bcache mca cache will compete memory resource with user space application, which may have nagive effect to performance of user space workloads (e.g. data base, or I/O service of distributed storage node). This patch tries to call bcache mca shrinker routine to proactively release mca cache memory, to decrease the memory pressure of system and avoid negative effort of the overall system I/O performance. Signed-off-by: Coly Li Signed-off-by: Jens Axboe drivers/md/bcache/super.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit a231f07a5fe30a522b402011c5190cb936641a66 Author: Coly Li Date: Fri Jun 28 19:59:51 2019 +0800 bcache: set largest seq to ja->seq[bucket_index] in journal_read_bucket() In journal_read_bucket() when setting ja->seq[bucket_index], there might be potential case that a later non-maximum overwrites a better sequence number to ja->seq[bucket_index]. This patch adds a check to make sure that ja->seq[bucket_index] will be only set a new value if it is bigger then current value. Signed-off-by: Coly Li Signed-off-by: Jens Axboe drivers/md/bcache/journal.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2464b693148e5d5ca42b6064bb40c1a275ea61cd Author: Coly Li Date: Fri Jun 28 19:59:50 2019 +0800 bcache: add code comments for journal_read_bucket() This patch adds more code comments in journal_read_bucket(), this is an effort to make the code to be more understandable. Signed-off-by: Coly Li Signed-off-by: Jens Axboe drivers/md/bcache/journal.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 7e865eba00a3df2dc8c4746173a8ca1c1c7f042e Author: Coly Li Date: Fri Jun 28 19:59:49 2019 +0800 bcache: fix potential deadlock in cached_def_free() When enable lockdep and reboot system with a writeback mode bcache device, the following potential deadlock warning is reported by lockdep engine. [ 101.536569][ T401] kworker/2:2/401 is trying to acquire lock: [ 101.538575][ T401] 00000000bbf6e6c7 ((wq_completion)bcache_writeback_wq){+.+.}, at: flush_workqueue+0x87/0x4c0 [ 101.542054][ T401] [ 101.542054][ T401] but task is already holding lock: [ 101.544587][ T401] 00000000f5f305b3 ((work_completion)(&cl->work)#2){+.+.}, at: process_one_work+0x21e/0x640 [ 101.548386][ T401] [ 101.548386][ T401] which lock already depends on the new lock. [ 101.548386][ T401] [ 101.551874][ T401] [ 101.551874][ T401] the existing dependency chain (in reverse order) is: [ 101.555000][ T401] [ 101.555000][ T401] -> #1 ((work_completion)(&cl->work)#2){+.+.}: [ 101.557860][ T401] process_one_work+0x277/0x640 [ 101.559661][ T401] worker_thread+0x39/0x3f0 [ 101.561340][ T401] kthread+0x125/0x140 [ 101.562963][ T401] ret_from_fork+0x3a/0x50 [ 101.564718][ T401] [ 101.564718][ T401] -> #0 ((wq_completion)bcache_writeback_wq){+.+.}: [ 101.567701][ T401] lock_acquire+0xb4/0x1c0 [ 101.569651][ T401] flush_workqueue+0xae/0x4c0 [ 101.571494][ T401] drain_workqueue+0xa9/0x180 [ 101.573234][ T401] destroy_workqueue+0x17/0x250 [ 101.575109][ T401] cached_dev_free+0x44/0x120 [bcache] [ 101.577304][ T401] process_one_work+0x2a4/0x640 [ 101.579357][ T401] worker_thread+0x39/0x3f0 [ 101.581055][ T401] kthread+0x125/0x140 [ 101.582709][ T401] ret_from_fork+0x3a/0x50 [ 101.584592][ T401] [ 101.584592][ T401] other info that might help us debug this: [ 101.584592][ T401] [ 101.588355][ T401] Possible unsafe locking scenario: [ 101.588355][ T401] [ 101.590974][ T401] CPU0 CPU1 [ 101.592889][ T401] ---- ---- [ 101.594743][ T401] lock((work_completion)(&cl->work)#2); [ 101.596785][ T401] lock((wq_completion)bcache_writeback_wq); [ 101.600072][ T401] lock((work_completion)(&cl->work)#2); [ 101.602971][ T401] lock((wq_completion)bcache_writeback_wq); [ 101.605255][ T401] [ 101.605255][ T401] *** DEADLOCK *** [ 101.605255][ T401] [ 101.608310][ T401] 2 locks held by kworker/2:2/401: [ 101.610208][ T401] #0: 00000000cf2c7d17 ((wq_completion)events){+.+.}, at: process_one_work+0x21e/0x640 [ 101.613709][ T401] #1: 00000000f5f305b3 ((work_completion)(&cl->work)#2){+.+.}, at: process_one_work+0x21e/0x640 [ 101.617480][ T401] [ 101.617480][ T401] stack backtrace: [ 101.619539][ T401] CPU: 2 PID: 401 Comm: kworker/2:2 Tainted: G W 5.2.0-rc4-lp151.20-default+ #1 [ 101.623225][ T401] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 04/13/2018 [ 101.627210][ T401] Workqueue: events cached_dev_free [bcache] [ 101.629239][ T401] Call Trace: [ 101.630360][ T401] dump_stack+0x85/0xcb [ 101.631777][ T401] print_circular_bug+0x19a/0x1f0 [ 101.633485][ T401] __lock_acquire+0x16cd/0x1850 [ 101.635184][ T401] ? __lock_acquire+0x6a8/0x1850 [ 101.636863][ T401] ? lock_acquire+0xb4/0x1c0 [ 101.638421][ T401] ? find_held_lock+0x34/0xa0 [ 101.640015][ T401] lock_acquire+0xb4/0x1c0 [ 101.641513][ T401] ? flush_workqueue+0x87/0x4c0 [ 101.643248][ T401] flush_workqueue+0xae/0x4c0 [ 101.644832][ T401] ? flush_workqueue+0x87/0x4c0 [ 101.646476][ T401] ? drain_workqueue+0xa9/0x180 [ 101.648303][ T401] drain_workqueue+0xa9/0x180 [ 101.649867][ T401] destroy_workqueue+0x17/0x250 [ 101.651503][ T401] cached_dev_free+0x44/0x120 [bcache] [ 101.653328][ T401] process_one_work+0x2a4/0x640 [ 101.655029][ T401] worker_thread+0x39/0x3f0 [ 101.656693][ T401] ? process_one_work+0x640/0x640 [ 101.658501][ T401] kthread+0x125/0x140 [ 101.660012][ T401] ? kthread_create_worker_on_cpu+0x70/0x70 [ 101.661985][ T401] ret_from_fork+0x3a/0x50 [ 101.691318][ T401] bcache: bcache_device_free() bcache0 stopped Here is how the above potential deadlock may happen in reboot/shutdown code path, 1) bcache_reboot() is called firstly in the reboot/shutdown code path, then in bcache_reboot(), bcache_device_stop() is called. 2) bcache_device_stop() sets BCACHE_DEV_CLOSING on d->falgs, then call closure_queue(&d->cl) to invoke cached_dev_flush(). And in turn cached_dev_flush() calls cached_dev_free() via closure_at() 3) In cached_dev_free(), after stopped writebach kthread dc->writeback_thread, the kwork dc->writeback_write_wq is stopping by destroy_workqueue(). 4) Inside destroy_workqueue(), drain_workqueue() is called. Inside drain_workqueue(), flush_workqueue() is called. Then wq->lockdep_map is acquired by lock_map_acquire() in flush_workqueue(). After the lock acquired the rest part of flush_workqueue() just wait for the workqueue to complete. 5) Now we look back at writeback thread routine bch_writeback_thread(), in the main while-loop, write_dirty() is called via continue_at() in read_dirty_submit(), which is called via continue_at() in while-loop level called function read_dirty(). Inside write_dirty() it may be re-called on workqueeu dc->writeback_write_wq via continue_at(). It means when the writeback kthread is stopped in cached_dev_free() there might be still one kworker queued on dc->writeback_write_wq to execute write_dirty() again. 6) Now this kworker is scheduled on dc->writeback_write_wq to run by process_one_work() (which is called by worker_thread()). Before calling the kwork routine, wq->lockdep_map is acquired. 7) But wq->lockdep_map is acquired already in step 4), so a A-A lock (lockdep terminology) scenario happens. Indeed on multiple cores syatem, the above deadlock is very rare to happen, just as the code comments in process_one_work() says, 2263 * AFAICT there is no possible deadlock scenario between the 2264 * flush_work() and complete() primitives (except for single-threaded 2265 * workqueues), so hiding them isn't a problem. But it is still good to fix such lockdep warning, even no one running bcache on single core system. The fix is simple. This patch solves the above potential deadlock by, - Do not destroy workqueue dc->writeback_write_wq in cached_dev_free(). - Flush and destroy dc->writeback_write_wq in writebach kthread routine bch_writeback_thread(), where after quit the thread main while-loop and before cached_dev_put() is called. By this fix, dc->writeback_write_wq will be stopped and destroy before the writeback kthread stopped, so the chance for a A-A locking on wq->lockdep_map is disappeared, such A-A deadlock won't happen any more. Signed-off-by: Coly Li Signed-off-by: Jens Axboe drivers/md/bcache/super.c | 2 -- drivers/md/bcache/writeback.c | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) commit 80265d8dfd77792e133793cef44a21323aac2908 Author: Coly Li Date: Fri Jun 28 19:59:48 2019 +0800 bcache: acquire bch_register_lock later in cached_dev_free() When enable lockdep engine, a lockdep warning can be observed when reboot or shutdown system, [ 3142.764557][ T1] bcache: bcache_reboot() Stopping all devices: [ 3142.776265][ T2649] [ 3142.777159][ T2649] ====================================================== [ 3142.780039][ T2649] WARNING: possible circular locking dependency detected [ 3142.782869][ T2649] 5.2.0-rc4-lp151.20-default+ #1 Tainted: G W [ 3142.785684][ T2649] ------------------------------------------------------ [ 3142.788479][ T2649] kworker/3:67/2649 is trying to acquire lock: [ 3142.790738][ T2649] 00000000aaf02291 ((wq_completion)bcache_writeback_wq){+.+.}, at: flush_workqueue+0x87/0x4c0 [ 3142.794678][ T2649] [ 3142.794678][ T2649] but task is already holding lock: [ 3142.797402][ T2649] 000000004fcf89c5 (&bch_register_lock){+.+.}, at: cached_dev_free+0x17/0x120 [bcache] [ 3142.801462][ T2649] [ 3142.801462][ T2649] which lock already depends on the new lock. [ 3142.801462][ T2649] [ 3142.805277][ T2649] [ 3142.805277][ T2649] the existing dependency chain (in reverse order) is: [ 3142.808902][ T2649] [ 3142.808902][ T2649] -> #2 (&bch_register_lock){+.+.}: [ 3142.812396][ T2649] __mutex_lock+0x7a/0x9d0 [ 3142.814184][ T2649] cached_dev_free+0x17/0x120 [bcache] [ 3142.816415][ T2649] process_one_work+0x2a4/0x640 [ 3142.818413][ T2649] worker_thread+0x39/0x3f0 [ 3142.820276][ T2649] kthread+0x125/0x140 [ 3142.822061][ T2649] ret_from_fork+0x3a/0x50 [ 3142.823965][ T2649] [ 3142.823965][ T2649] -> #1 ((work_completion)(&cl->work)#2){+.+.}: [ 3142.827244][ T2649] process_one_work+0x277/0x640 [ 3142.829160][ T2649] worker_thread+0x39/0x3f0 [ 3142.830958][ T2649] kthread+0x125/0x140 [ 3142.832674][ T2649] ret_from_fork+0x3a/0x50 [ 3142.834915][ T2649] [ 3142.834915][ T2649] -> #0 ((wq_completion)bcache_writeback_wq){+.+.}: [ 3142.838121][ T2649] lock_acquire+0xb4/0x1c0 [ 3142.840025][ T2649] flush_workqueue+0xae/0x4c0 [ 3142.842035][ T2649] drain_workqueue+0xa9/0x180 [ 3142.844042][ T2649] destroy_workqueue+0x17/0x250 [ 3142.846142][ T2649] cached_dev_free+0x52/0x120 [bcache] [ 3142.848530][ T2649] process_one_work+0x2a4/0x640 [ 3142.850663][ T2649] worker_thread+0x39/0x3f0 [ 3142.852464][ T2649] kthread+0x125/0x140 [ 3142.854106][ T2649] ret_from_fork+0x3a/0x50 [ 3142.855880][ T2649] [ 3142.855880][ T2649] other info that might help us debug this: [ 3142.855880][ T2649] [ 3142.859663][ T2649] Chain exists of: [ 3142.859663][ T2649] (wq_completion)bcache_writeback_wq --> (work_completion)(&cl->work)#2 --> &bch_register_lock [ 3142.859663][ T2649] [ 3142.865424][ T2649] Possible unsafe locking scenario: [ 3142.865424][ T2649] [ 3142.868022][ T2649] CPU0 CPU1 [ 3142.869885][ T2649] ---- ---- [ 3142.871751][ T2649] lock(&bch_register_lock); [ 3142.873379][ T2649] lock((work_completion)(&cl->work)#2); [ 3142.876399][ T2649] lock(&bch_register_lock); [ 3142.879727][ T2649] lock((wq_completion)bcache_writeback_wq); [ 3142.882064][ T2649] [ 3142.882064][ T2649] *** DEADLOCK *** [ 3142.882064][ T2649] [ 3142.885060][ T2649] 3 locks held by kworker/3:67/2649: [ 3142.887245][ T2649] #0: 00000000e774cdd0 ((wq_completion)events){+.+.}, at: process_one_work+0x21e/0x640 [ 3142.890815][ T2649] #1: 00000000f7df89da ((work_completion)(&cl->work)#2){+.+.}, at: process_one_work+0x21e/0x640 [ 3142.894884][ T2649] #2: 000000004fcf89c5 (&bch_register_lock){+.+.}, at: cached_dev_free+0x17/0x120 [bcache] [ 3142.898797][ T2649] [ 3142.898797][ T2649] stack backtrace: [ 3142.900961][ T2649] CPU: 3 PID: 2649 Comm: kworker/3:67 Tainted: G W 5.2.0-rc4-lp151.20-default+ #1 [ 3142.904789][ T2649] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 04/13/2018 [ 3142.909168][ T2649] Workqueue: events cached_dev_free [bcache] [ 3142.911422][ T2649] Call Trace: [ 3142.912656][ T2649] dump_stack+0x85/0xcb [ 3142.914181][ T2649] print_circular_bug+0x19a/0x1f0 [ 3142.916193][ T2649] __lock_acquire+0x16cd/0x1850 [ 3142.917936][ T2649] ? __lock_acquire+0x6a8/0x1850 [ 3142.919704][ T2649] ? lock_acquire+0xb4/0x1c0 [ 3142.921335][ T2649] ? find_held_lock+0x34/0xa0 [ 3142.923052][ T2649] lock_acquire+0xb4/0x1c0 [ 3142.924635][ T2649] ? flush_workqueue+0x87/0x4c0 [ 3142.926375][ T2649] flush_workqueue+0xae/0x4c0 [ 3142.928047][ T2649] ? flush_workqueue+0x87/0x4c0 [ 3142.929824][ T2649] ? drain_workqueue+0xa9/0x180 [ 3142.931686][ T2649] drain_workqueue+0xa9/0x180 [ 3142.933534][ T2649] destroy_workqueue+0x17/0x250 [ 3142.935787][ T2649] cached_dev_free+0x52/0x120 [bcache] [ 3142.937795][ T2649] process_one_work+0x2a4/0x640 [ 3142.939803][ T2649] worker_thread+0x39/0x3f0 [ 3142.941487][ T2649] ? process_one_work+0x640/0x640 [ 3142.943389][ T2649] kthread+0x125/0x140 [ 3142.944894][ T2649] ? kthread_create_worker_on_cpu+0x70/0x70 [ 3142.947744][ T2649] ret_from_fork+0x3a/0x50 [ 3142.970358][ T2649] bcache: bcache_device_free() bcache0 stopped Here is how the deadlock happens. 1) bcache_reboot() calls bcache_device_stop(), then inside bcache_device_stop() BCACHE_DEV_CLOSING bit is set on d->flags. Then closure_queue(&d->cl) is called to invoke cached_dev_flush(). 2) In cached_dev_flush(), cached_dev_free() is called by continu_at(). 3) In cached_dev_free(), when stopping the writeback kthread of the cached device by kthread_stop(), dc->writeback_thread will be waken up to quite the kthread while-loop, then cached_dev_put() is called in bch_writeback_thread(). 4) Calling cached_dev_put() in writeback kthread may drop dc->count to 0, then dc->detach kworker is scheduled, which is initialized as cached_dev_detach_finish(). 5) Inside cached_dev_detach_finish(), the last line of code is to call closure_put(&dc->disk.cl), which drops the last reference counter of closrure dc->disk.cl, then the callback cached_dev_flush() gets called. Now cached_dev_flush() is called for second time in the code path, the first time is in step 2). And again bch_register_lock will be acquired again, and a A-A lock (lockdep terminology) is happening. The root cause of the above A-A lock is in cached_dev_free(), mutex bch_register_lock is held before stopping writeback kthread and other kworkers. Fortunately now we have variable 'bcache_is_reboot', which may prevent device registration or unregistration during reboot/shutdown time, so it is unncessary to hold bch_register_lock such early now. This is how this patch fixes the reboot/shutdown time A-A lock issue: After moving mutex_lock(&bch_register_lock) to a later location where before atomic_read(&dc->running) in cached_dev_free(), such A-A lock problem can be solved without any reboot time registration race. Signed-off-by: Coly Li Signed-off-by: Jens Axboe drivers/md/bcache/super.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 97ba3b816e2cdea798398bc8486125f79f2453c1 Author: Coly Li Date: Fri Jun 28 19:59:47 2019 +0800 bcache: acquire bch_register_lock later in cached_dev_detach_finish() Now there is variable bcache_is_reboot to prevent device register or unregister during reboot, it is unncessary to still hold mutex lock bch_register_lock before stopping writeback_rate_update kworker and writeback kthread. And if the stopping kworker or kthread holding bch_register_lock inside their routine (we used to have such problem in writeback thread, thanks to Junhui Wang fixed it), it is very easy to introduce deadlock during reboot/shutdown procedure. Therefore in this patch, the location to acquire bch_register_lock is moved to the location before calling calc_cached_dev_sectors(). Which is later then original location in cached_dev_detach_finish(). Signed-off-by: Coly Li Signed-off-by: Jens Axboe drivers/md/bcache/super.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a59ff6ccc2bf2e2934b31bbf734f0bc04b5ec78a Author: Coly Li Date: Fri Jun 28 19:59:46 2019 +0800 bcache: avoid a deadlock in bcache_reboot() It is quite frequently to observe deadlock in bcache_reboot() happens and hang the system reboot process. The reason is, in bcache_reboot() when calling bch_cache_set_stop() and bcache_device_stop() the mutex bch_register_lock is held. But in the process to stop cache set and bcache device, bch_register_lock will be acquired again. If this mutex is held here, deadlock will happen inside the stopping process. The aftermath of the deadlock is, whole system reboot gets hung. The fix is to avoid holding bch_register_lock for the following loops in bcache_reboot(), list_for_each_entry_safe(c, tc, &bch_cache_sets, list) bch_cache_set_stop(c); list_for_each_entry_safe(dc, tdc, &uncached_devices, list) bcache_device_stop(&dc->disk); A module range variable 'bcache_is_reboot' is added, it sets to true in bcache_reboot(). In register_bcache(), if bcache_is_reboot is checked to be true, reject the registration by returning -EBUSY immediately. Signed-off-by: Coly Li Signed-off-by: Jens Axboe drivers/md/bcache/super.c | 40 +++++++++++++++++++++++++++++++++++++++- drivers/md/bcache/sysfs.c | 26 ++++++++++++++++++++++++++ 2 files changed, 65 insertions(+), 1 deletion(-) commit 5c2a634cbfaf1971cb6453fe5f86d83585257790 Author: Coly Li Date: Fri Jun 28 19:59:45 2019 +0800 bcache: stop writeback kthread and kworker when bch_cached_dev_run() failed In bch_cached_dev_attach() after bch_cached_dev_writeback_start() called, the wrireback kthread and writeback rate update kworker of the cached device are created, if the following bch_cached_dev_run() failed, bch_cached_dev_attach() will return with -ENOMEM without stopping the writeback related kthread and kworker. This patch stops writeback kthread and writeback rate update kworker before returning -ENOMEM if bch_cached_dev_run() returns error. Signed-off-by: Coly Li Signed-off-by: Jens Axboe drivers/md/bcache/super.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit f54d801dda14942dbefa00541d10603015b7859c Author: Coly Li Date: Fri Jun 28 19:59:44 2019 +0800 bcache: destroy dc->writeback_write_wq if failed to create dc->writeback_thread Commit 9baf30972b55 ("bcache: fix for gc and write-back race") added a new work queue dc->writeback_write_wq, but forgot to destroy it in the error condition when creating dc->writeback_thread failed. This patch destroys dc->writeback_write_wq if kthread_create() returns error pointer to dc->writeback_thread, then a memory leak is avoided. Fixes: 9baf30972b55 ("bcache: fix for gc and write-back race") Signed-off-by: Coly Li Cc: stable@vger.kernel.org Signed-off-by: Jens Axboe drivers/md/bcache/writeback.c | 1 + 1 file changed, 1 insertion(+) commit 5461999848e0462c14f306a62923d22de820a59c Author: Coly Li Date: Fri Jun 28 19:59:43 2019 +0800 bcache: fix mistaken sysfs entry for io_error counter In bch_cached_dev_files[] from driver/md/bcache/sysfs.c, sysfs_errors is incorrectly inserted in. The correct entry should be sysfs_io_errors. This patch fixes the problem and now I/O errors of cached device can be read from /sys/block/bcache/bcache/io_errors. Fixes: c7b7bd07404c5 ("bcache: add io_disable to struct cached_dev") Signed-off-by: Coly Li Cc: stable@vger.kernel.org Signed-off-by: Jens Axboe drivers/md/bcache/sysfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0c277e211aae056b26513358fc060291d8523747 Author: Coly Li Date: Fri Jun 28 19:59:42 2019 +0800 bcache: add pendings_cleanup to stop pending bcache device If a bcache device is in dirty state and its cache set is not registered, this bcache device will not appear in /dev/bcache, and there is no way to stop it or remove the bcache kernel module. This is an as-designed behavior, but sometimes people has to reboot whole system to release or stop the pending backing device. This sysfs interface may remove such pending bcache devices when write anything into the sysfs file manually. Signed-off-by: Coly Li Signed-off-by: Jens Axboe drivers/md/bcache/super.c | 55 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) commit 944a4f340a65c21ee311d2d3e617034bef9d0b25 Author: Coly Li Date: Fri Jun 28 19:59:41 2019 +0800 bcache: make bset_search_tree() be more understandable The purpose of following code in bset_search_tree() is to avoid a branch instruction, 994 if (likely(f->exponent != 127)) 995 n = j * 2 + (((unsigned int) 996 (f->mantissa - 997 bfloat_mantissa(search, f))) >> 31); 998 else 999 n = (bkey_cmp(tree_to_bkey(t, j), search) > 0) 1000 ? j * 2 1001 : j * 2 + 1; This piece of code is not very clear to understand, even when I tried to add code comment for it, I made mistake. This patch removes the implict bit operation and uses explicit branch to calculate next location in binary tree search. Signed-off-by: Coly Li Signed-off-by: Jens Axboe drivers/md/bcache/bset.c | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) commit 68a53c95a0fce541321fbca74a7f72c71361f496 Author: Coly Li Date: Fri Jun 28 19:59:40 2019 +0800 bcache: remove "XXX:" comment line from run_cache_set() In previous bcache patches for Linux v5.2, the failure code path of run_cache_set() is tested and fixed. So now the following comment line can be removed from run_cache_set(), /* XXX: test this, it's broken */ Signed-off-by: Coly Li Signed-off-by: Jens Axboe drivers/md/bcache/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e0faa3d7f79f7e1abb43de168e88c76061518ea4 Author: Coly Li Date: Fri Jun 28 19:59:39 2019 +0800 bcache: improve error message in bch_cached_dev_run() This patch adds more error message in bch_cached_dev_run() to indicate the exact reason why an error value is returned. Please notice when printing out the "is running already" message, pr_info() is used here, because in this case also -EBUSY is returned, the bcache device can continue to attach to the cache devince and run, so it won't be an error level message in kernel message. Signed-off-by: Coly Li Signed-off-by: Jens Axboe drivers/md/bcache/super.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 633bb2ce60b949e2990c15324be162c54788c027 Author: Coly Li Date: Fri Jun 28 19:59:38 2019 +0800 bcache: add more error message in bch_cached_dev_attach() This patch adds more error message for attaching cached device, this is helpful to debug code failure during bache device start up. Signed-off-by: Coly Li Signed-off-by: Jens Axboe drivers/md/bcache/super.c | 4 ++++ 1 file changed, 4 insertions(+) commit 4b6efb4bdbce25097f1a6329e18c2b77c4f27722 Author: Coly Li Date: Fri Jun 28 19:59:37 2019 +0800 bcache: more detailed error message to bcache_device_link() This patch adds more accurate error message for specific ssyfs_create_link() call, to help debugging failure during bcache device start tup. Signed-off-by: Coly Li Signed-off-by: Jens Axboe drivers/md/bcache/super.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 383ff2183ad16a8842d1fbd9dd3e1cbd66813e64 Author: Coly Li Date: Fri Jun 28 19:59:36 2019 +0800 bcache: check CACHE_SET_IO_DISABLE bit in bch_journal() When too many I/O errors happen on cache set and CACHE_SET_IO_DISABLE bit is set, bch_journal() may continue to work because the journaling bkey might be still in write set yet. The caller of bch_journal() may believe the journal still work but the truth is in-memory journal write set won't be written into cache device any more. This behavior may introduce potential inconsistent metadata status. This patch checks CACHE_SET_IO_DISABLE bit at the head of bch_journal(), if the bit is set, bch_journal() returns NULL immediately to notice caller to know journal does not work. Signed-off-by: Coly Li Signed-off-by: Jens Axboe drivers/md/bcache/journal.c | 4 ++++ 1 file changed, 4 insertions(+) commit e775339e1ae1205b47d94881db124c11385e597c Author: Coly Li Date: Fri Jun 28 19:59:35 2019 +0800 bcache: check CACHE_SET_IO_DISABLE in allocator code If CACHE_SET_IO_DISABLE of a cache set flag is set by too many I/O errors, currently allocator routines can still continue allocate space which may introduce inconsistent metadata state. This patch checkes CACHE_SET_IO_DISABLE bit in following allocator routines, - bch_bucket_alloc() - __bch_bucket_alloc_set() Once CACHE_SET_IO_DISABLE is set on cache set, the allocator routines may reject allocation request earlier to avoid potential inconsistent metadata. Signed-off-by: Coly Li Signed-off-by: Jens Axboe drivers/md/bcache/alloc.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit bd9026c8a7f33ebe25543b7b7e6276b49db60f7e Author: Coly Li Date: Fri Jun 28 19:59:34 2019 +0800 bcache: remove unncessary code in bch_btree_keys_init() Function bch_btree_keys_init() initializes b->set[].size and b->set[].data to zero. As the code comments indicates, these code indeed is unncessary, because both struct btree_keys and struct bset_tree are nested embedded into struct btree, when struct btree is filled with 0 bits by kzalloc() in mca_bucket_alloc(), b->set[].size and b->set[].data are initialized to 0 (a.k.a NULL) already. This patch removes the redundant code, and add comments in bch_btree_keys_init() and mca_bucket_alloc() to explain why it's safe. Signed-off-by: Coly Li Signed-off-by: Jens Axboe drivers/md/bcache/bset.c | 15 ++++++--------- drivers/md/bcache/btree.c | 4 ++++ 2 files changed, 10 insertions(+), 9 deletions(-) commit 0b13efecf5f25ce5e31f2ab3930335015cb65a7d Author: Coly Li Date: Fri Jun 28 19:59:33 2019 +0800 bcache: add return value check to bch_cached_dev_run() This patch adds return value check to bch_cached_dev_run(), now if there is error happens inside bch_cached_dev_run(), it can be catched. Signed-off-by: Coly Li Signed-off-by: Jens Axboe drivers/md/bcache/bcache.h | 2 +- drivers/md/bcache/super.c | 33 ++++++++++++++++++++++++++------- drivers/md/bcache/sysfs.c | 7 +++++-- 3 files changed, 32 insertions(+), 10 deletions(-) commit 89e0341af082dbc170019f908846f4a424efc86b Author: Alexandru Ardelean Date: Fri Jun 28 19:59:32 2019 +0800 bcache: use sysfs_match_string() instead of __sysfs_match_string() The arrays (of strings) that are passed to __sysfs_match_string() are static, so use sysfs_match_string() which does an implicit ARRAY_SIZE() over these arrays. Functionally, this doesn't change anything. The change is more cosmetic. It only shrinks the static arrays by 1 byte each. Signed-off-by: Alexandru Ardelean Signed-off-by: Coly Li Signed-off-by: Jens Axboe drivers/md/bcache/sysfs.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) commit f960facb399ece6ff88a7a2d4b4a5515e3a467a0 Author: Coly Li Date: Fri Jun 28 19:59:31 2019 +0800 bcache: remove unnecessary prefetch() in bset_search_tree() In function bset_search_tree(), when p >= t->size, t->tree[0] will be prefetched by the following code piece, 974 unsigned int p = n << 4; 975 976 p &= ((int) (p - t->size)) >> 31; 977 978 prefetch(&t->tree[p]); The purpose of the above code is to avoid a branch instruction, but when p >= t->size, prefetch(&t->tree[0]) has no positive performance contribution at all. This patch avoids the unncessary prefetch by only calling prefetch() when p < t->size. Signed-off-by: Coly Li Signed-off-by: Jens Axboe drivers/md/bcache/bset.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) commit 08ec1e6282f271698f0053983fab89de6e1a8217 Author: Coly Li Date: Fri Jun 28 19:59:30 2019 +0800 bcache: add io error counting in write_bdev_super_endio() When backing device super block is written by bch_write_bdev_super(), the bio complete callback write_bdev_super_endio() simply ignores I/O status. Indeed such write request also contribute to backing device health status if the request failed. This patch checkes bio->bi_status in write_bdev_super_endio(), if there is error, bch_count_backing_io_errors() will be called to count an I/O error to dc->io_errors. Signed-off-by: Coly Li Signed-off-by: Jens Axboe drivers/md/bcache/super.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 578df99b1b0531d19af956530fe4da63d01a1604 Author: Coly Li Date: Fri Jun 28 19:59:29 2019 +0800 bcache: ignore read-ahead request failure on backing device When md raid device (e.g. raid456) is used as backing device, read-ahead requests on a degrading and recovering md raid device might be failured immediately by md raid code, but indeed this md raid array can still be read or write for normal I/O requests. Therefore such failed read-ahead request are not real hardware failure. Further more, after degrading and recovering accomplished, read-ahead requests will be handled by md raid array again. For such condition, I/O failures of read-ahead requests don't indicate real health status (because normal I/O still be served), they should not be counted into I/O error counter dc->io_errors. Since there is no simple way to detect whether the backing divice is a md raid device, this patch simply ignores I/O failures for read-ahead bios on backing device, to avoid bogus backing device failure on a degrading md raid array. Suggested-and-tested-by: Thorsten Knabe Signed-off-by: Coly Li Cc: stable@vger.kernel.org Signed-off-by: Jens Axboe drivers/md/bcache/io.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit e6dcbd3e6c91b7828cb305ec324eb7fd9bdea8a0 Author: Coly Li Date: Fri Jun 28 19:59:28 2019 +0800 bcache: avoid flushing btree node in cache_set_flush() if io disabled When cache_set_flush() is called for too many I/O errors detected on cache device and the cache set is retiring, inside the function it doesn't make sense to flushing cached btree nodes from c->btree_cache because CACHE_SET_IO_DISABLE is set on c->flags already and all I/Os onto cache device will be rejected. This patch checks in cache_set_flush() that whether CACHE_SET_IO_DISABLE is set. If yes, then avoids to flush the cached btree nodes to reduce more time and make cache set retiring more faster. Signed-off-by: Coly Li Signed-off-by: Jens Axboe drivers/md/bcache/super.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 695277f16b3a102fcc22c97fdf2de77c7b19f0b3 Author: Coly Li Date: Fri Jun 28 19:59:27 2019 +0800 Revert "bcache: set CACHE_SET_IO_DISABLE in bch_cached_dev_error()" This reverts commit 6147305c73e4511ca1a975b766b97a779d442567. Although this patch helps the failed bcache device to stop faster when too many I/O errors detected on corresponding cached device, setting CACHE_SET_IO_DISABLE bit to cache set c->flags was not a good idea. This operation will disable all I/Os on cache set, which means other attached bcache devices won't work neither. Without this patch, the failed bcache device can also be stopped eventually if internal I/O accomplished (e.g. writeback). Therefore here I revert it. Fixes: 6147305c73e4 ("bcache: set CACHE_SET_IO_DISABLE in bch_cached_dev_error()") Reported-by: Yong Li Signed-off-by: Coly Li Cc: stable@vger.kernel.org Signed-off-by: Jens Axboe drivers/md/bcache/super.c | 17 ----------------- 1 file changed, 17 deletions(-) commit 0ae49cb7aa005ed18fe8f4d6ccf73019b78ac7b2 Author: Coly Li Date: Fri Jun 28 19:59:26 2019 +0800 bcache: fix return value error in bch_journal_read() When everything is OK in bch_journal_read(), finally the return value is returned by, return ret; which assumes ret will be 0 here. This assumption is wrong when all journal buckets as are full and filled with valid journal entries. In such cache the last location referencess read_bucket() sets 'ret' to 1, which means new jset added into jset list. The jset list is list 'journal' in caller run_cache_set(). Return 1 to run_cache_set() means something wrong and the cache set won't start, but indeed everything is OK. This patch changes the line at end of bch_journal_read() to directly return 0 since everything if verything is good. Then a bogus error is fixed. Signed-off-by: Coly Li Signed-off-by: Jens Axboe drivers/md/bcache/journal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b387e9b58679c60f5b1e4313939bd4878204fc37 Author: Coly Li Date: Fri Jun 28 19:59:25 2019 +0800 bcache: check c->gc_thread by IS_ERR_OR_NULL in cache_set_flush() When system memory is in heavy pressure, bch_gc_thread_start() from run_cache_set() may fail due to out of memory. In such condition, c->gc_thread is assigned to -ENOMEM, not NULL pointer. Then in following failure code path bch_cache_set_error(), when cache_set_flush() gets called, the code piece to stop c->gc_thread is broken, if (!IS_ERR_OR_NULL(c->gc_thread)) kthread_stop(c->gc_thread); And KASAN catches such NULL pointer deference problem, with the warning information: [ 561.207881] ================================================================== [ 561.207900] BUG: KASAN: null-ptr-deref in kthread_stop+0x3b/0x440 [ 561.207904] Write of size 4 at addr 000000000000001c by task kworker/15:1/313 [ 561.207913] CPU: 15 PID: 313 Comm: kworker/15:1 Tainted: G W 5.0.0-vanilla+ #3 [ 561.207916] Hardware name: Lenovo ThinkSystem SR650 -[7X05CTO1WW]-/-[7X05CTO1WW]-, BIOS -[IVE136T-2.10]- 03/22/2019 [ 561.207935] Workqueue: events cache_set_flush [bcache] [ 561.207940] Call Trace: [ 561.207948] dump_stack+0x9a/0xeb [ 561.207955] ? kthread_stop+0x3b/0x440 [ 561.207960] ? kthread_stop+0x3b/0x440 [ 561.207965] kasan_report+0x176/0x192 [ 561.207973] ? kthread_stop+0x3b/0x440 [ 561.207981] kthread_stop+0x3b/0x440 [ 561.207995] cache_set_flush+0xd4/0x6d0 [bcache] [ 561.208008] process_one_work+0x856/0x1620 [ 561.208015] ? find_held_lock+0x39/0x1d0 [ 561.208028] ? drain_workqueue+0x380/0x380 [ 561.208048] worker_thread+0x87/0xb80 [ 561.208058] ? __kthread_parkme+0xb6/0x180 [ 561.208067] ? process_one_work+0x1620/0x1620 [ 561.208072] kthread+0x326/0x3e0 [ 561.208079] ? kthread_create_worker_on_cpu+0xc0/0xc0 [ 561.208090] ret_from_fork+0x3a/0x50 [ 561.208110] ================================================================== [ 561.208113] Disabling lock debugging due to kernel taint [ 561.208115] irq event stamp: 11800231 [ 561.208126] hardirqs last enabled at (11800231): [] do_syscall_64+0x18/0x410 [ 561.208127] BUG: unable to handle kernel NULL pointer dereference at 000000000000001c [ 561.208129] #PF error: [WRITE] [ 561.312253] hardirqs last disabled at (11800230): [] trace_hardirqs_off_thunk+0x1a/0x1c [ 561.312259] softirqs last enabled at (11799832): [] __do_softirq+0x5c7/0x8c3 [ 561.405975] PGD 0 P4D 0 [ 561.442494] softirqs last disabled at (11799821): [] irq_exit+0x1ac/0x1e0 [ 561.791359] Oops: 0002 [#1] SMP KASAN NOPTI [ 561.791362] CPU: 15 PID: 313 Comm: kworker/15:1 Tainted: G B W 5.0.0-vanilla+ #3 [ 561.791363] Hardware name: Lenovo ThinkSystem SR650 -[7X05CTO1WW]-/-[7X05CTO1WW]-, BIOS -[IVE136T-2.10]- 03/22/2019 [ 561.791371] Workqueue: events cache_set_flush [bcache] [ 561.791374] RIP: 0010:kthread_stop+0x3b/0x440 [ 561.791376] Code: 00 00 65 8b 05 26 d5 e0 7c 89 c0 48 0f a3 05 ec aa df 02 0f 82 dc 02 00 00 4c 8d 63 20 be 04 00 00 00 4c 89 e7 e8 65 c5 53 00 ff 43 20 48 8d 7b 24 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 [ 561.791377] RSP: 0018:ffff88872fc8fd10 EFLAGS: 00010286 [ 561.838895] bcache: bch_count_io_errors() nvme0n1: IO error on writing btree. [ 561.838916] bcache: bch_count_io_errors() nvme0n1: IO error on writing btree. [ 561.838934] bcache: bch_count_io_errors() nvme0n1: IO error on writing btree. [ 561.838948] bcache: bch_count_io_errors() nvme0n1: IO error on writing btree. [ 561.838966] bcache: bch_count_io_errors() nvme0n1: IO error on writing btree. [ 561.838979] bcache: bch_count_io_errors() nvme0n1: IO error on writing btree. [ 561.838996] bcache: bch_count_io_errors() nvme0n1: IO error on writing btree. [ 563.067028] RAX: 0000000000000000 RBX: fffffffffffffffc RCX: ffffffff832dd314 [ 563.067030] RDX: 0000000000000000 RSI: 0000000000000004 RDI: 0000000000000297 [ 563.067032] RBP: ffff88872fc8fe88 R08: fffffbfff0b8213d R09: fffffbfff0b8213d [ 563.067034] R10: 0000000000000001 R11: fffffbfff0b8213c R12: 000000000000001c [ 563.408618] R13: ffff88dc61cc0f68 R14: ffff888102b94900 R15: ffff88dc61cc0f68 [ 563.408620] FS: 0000000000000000(0000) GS:ffff888f7dc00000(0000) knlGS:0000000000000000 [ 563.408622] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 563.408623] CR2: 000000000000001c CR3: 0000000f48a1a004 CR4: 00000000007606e0 [ 563.408625] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 563.408627] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 563.904795] bcache: bch_count_io_errors() nvme0n1: IO error on writing btree. [ 563.915796] PKRU: 55555554 [ 563.915797] Call Trace: [ 563.915807] cache_set_flush+0xd4/0x6d0 [bcache] [ 563.915812] process_one_work+0x856/0x1620 [ 564.001226] bcache: bch_count_io_errors() nvme0n1: IO error on writing btree. [ 564.033563] ? find_held_lock+0x39/0x1d0 [ 564.033567] ? drain_workqueue+0x380/0x380 [ 564.033574] worker_thread+0x87/0xb80 [ 564.062823] bcache: bch_count_io_errors() nvme0n1: IO error on writing btree. [ 564.118042] ? __kthread_parkme+0xb6/0x180 [ 564.118046] ? process_one_work+0x1620/0x1620 [ 564.118048] kthread+0x326/0x3e0 [ 564.118050] ? kthread_create_worker_on_cpu+0xc0/0xc0 [ 564.167066] bcache: bch_count_io_errors() nvme0n1: IO error on writing btree. [ 564.252441] ret_from_fork+0x3a/0x50 [ 564.252447] Modules linked in: msr rpcrdma sunrpc rdma_ucm ib_iser ib_umad rdma_cm ib_ipoib i40iw configfs iw_cm ib_cm libiscsi scsi_transport_iscsi mlx4_ib ib_uverbs mlx4_en ib_core nls_iso8859_1 nls_cp437 vfat fat intel_rapl skx_edac x86_pkg_temp_thermal coretemp iTCO_wdt iTCO_vendor_support crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel ses raid0 aesni_intel cdc_ether enclosure usbnet ipmi_ssif joydev aes_x86_64 i40e scsi_transport_sas mii bcache md_mod crypto_simd mei_me ioatdma crc64 ptp cryptd pcspkr i2c_i801 mlx4_core glue_helper pps_core mei lpc_ich dca wmi ipmi_si ipmi_devintf nd_pmem dax_pmem nd_btt ipmi_msghandler device_dax pcc_cpufreq button hid_generic usbhid mgag200 i2c_algo_bit drm_kms_helper syscopyarea sysfillrect xhci_pci sysimgblt fb_sys_fops xhci_hcd ttm megaraid_sas drm usbcore nfit libnvdimm sg dm_multipath dm_mod scsi_dh_rdac scsi_dh_emc scsi_dh_alua efivarfs [ 564.299390] bcache: bch_count_io_errors() nvme0n1: IO error on writing btree. [ 564.348360] CR2: 000000000000001c [ 564.348362] ---[ end trace b7f0e5cc7b2103b0 ]--- Therefore, it is not enough to only check whether c->gc_thread is NULL, we should use IS_ERR_OR_NULL() to check both NULL pointer and error value. This patch changes the above buggy code piece in this way, if (!IS_ERR_OR_NULL(c->gc_thread)) kthread_stop(c->gc_thread); Signed-off-by: Coly Li Signed-off-by: Jens Axboe drivers/md/bcache/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 141df8bb5dc052f605de8f48a7aa10290e1384ae Author: Coly Li Date: Fri Jun 28 19:59:24 2019 +0800 bcache: don't set max writeback rate if gc is running When gc is running, user space I/O processes may wait inside bcache code, so no new I/O coming. Indeed this is not a real idle time, maximum writeback rate should not be set in such situation. Otherwise a faster writeback thread may compete locks with gc thread and makes garbage collection slower, which results a longer I/O freeze period. This patch checks c->gc_mark_valid in set_at_max_writeback_rate(). If c->gc_mark_valid is 0 (gc running), set_at_max_writeback_rate() returns false, then update_writeback_rate() will not set writeback rate to maximum value even c->idle_counter reaches an idle threshold. Now writeback thread won't interfere gc thread performance. Signed-off-by: Coly Li Signed-off-by: Jens Axboe drivers/md/bcache/writeback.c | 3 +++ 1 file changed, 3 insertions(+) commit fbd6b25009ac76b2034168cd21d5e01f8c2d83d1 Author: Arnd Bergmann Date: Fri Jun 28 14:37:48 2019 +0200 staging: rtl8712: reduce stack usage, again An earlier patch I sent reduced the stack usage enough to get below the warning limit, and I could show this was safe, but with GCC_PLUGIN_STRUCTLEAK_BYREF_ALL, it gets worse again because large stack variables in the same function no longer overlap: drivers/staging/rtl8712/rtl871x_ioctl_linux.c: In function 'translate_scan.isra.2': drivers/staging/rtl8712/rtl871x_ioctl_linux.c:322:1: error: the frame size of 1200 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] Split out the largest two blocks in the affected function into two separate functions and mark those noinline_for_stack. Fixes: 8c5af16f7953 ("staging: rtl8712: reduce stack usage") Fixes: 81a56f6dcd20 ("gcc-plugins: structleak: Generalize to all variable types") Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 157 +++++++++++++++----------- 1 file changed, 88 insertions(+), 69 deletions(-) commit 8fc22fa4b2cd983e4c542d1841b3d2212ad18ed4 Author: Jerome Brunet Date: Fri Jun 28 10:17:08 2019 +0200 ASoC: meson: axg-card: remove useless check on codec While checking cpus before dereferencing the pointer is required, it is not necessary for codecs. 'codec' can't possibly be NULL in the loop Reported-by: Dan Carpenter Signed-off-by: Jerome Brunet Signed-off-by: Mark Brown sound/soc/meson/axg-card.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 34614739988ad60c3493da66dd856002ee93edf9 Author: Jerome Brunet Date: Thu Jun 27 14:13:50 2019 +0200 ASoC: soc-core: support dai_link with platforms_num != 1 Add support platforms_num != 1 in dai_link. Initially, the main purpose of this change was to make the platform optional in the dai_link, instead of inserting the dummy platform driver. This particular case had just been solved by Kuninori Morimoto with commit 1d7689892878 ("ASoC: soc-core: allow no Platform on dai_link"). However, this change may still be useful for those who need multiple platform components on a single dai_link (it solves one of the FIXME note in soc-core) Acked-by: Kuninori Morimoto Signed-off-by: Jerome Brunet Signed-off-by: Mark Brown include/sound/soc.h | 6 ++++++ sound/soc/soc-core.c | 59 +++++++++++++++++++++------------------------------- 2 files changed, 30 insertions(+), 35 deletions(-) commit af18b13fedae4637b439d1265038b30929ca5a4c Author: Jerome Brunet Date: Thu Jun 27 14:13:49 2019 +0200 ASoC: soc-core: defer card registration if codec component is missing Like cpus and platforms, defer sound card initialization if the codec component is missing when initializing the dai_link Signed-off-by: Jerome Brunet Signed-off-by: Mark Brown sound/soc/soc-core.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 8af6b2291e054773e2e58b2e5dbc06e981d14296 Author: Codrin Ciubotariu Date: Thu Jun 27 15:02:08 2019 +0300 ASoC: codecs: ad193x: Reset used registers at probe Since the ad193x codecs have no software reset, we have to reinitialize the registers after a hardware reset to assure no previous values are kept. Signed-off-by: Codrin Ciubotariu Signed-off-by: Mark Brown sound/soc/codecs/ad193x.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit bc0a5f43d7d6ba5258a65cf00fa692845f128d3c Author: Codrin Ciubotariu Date: Thu Jun 27 15:02:07 2019 +0300 ASoC: codecs: ad193x: Group register initialization at probe Create a structure with the register initialization values at probe and use it to initialize all the registers at once. Signed-off-by: Codrin Ciubotariu Signed-off-by: Mark Brown sound/soc/codecs/ad193x.c | 52 ++++++++++++++++++++++++++++++----------------- 1 file changed, 33 insertions(+), 19 deletions(-) commit dd2b5959785c75c23ab2295a4095700e47dabff3 Author: Gerd Hoffmann Date: Thu Jun 27 10:12:06 2019 +0200 drm/bochs: fix framebuffer setup. The driver doesn't consider framebuffer pitch and offset, leading to a wrong display in case offset != 0 or pitch != width * bpp. Fix it. Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Acked-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20190627081206.23135-1-kraxel@redhat.com drivers/gpu/drm/bochs/bochs.h | 2 +- drivers/gpu/drm/bochs/bochs_hw.c | 14 ++++++++++---- drivers/gpu/drm/bochs/bochs_kms.c | 3 ++- 3 files changed, 13 insertions(+), 6 deletions(-) commit c18e6ea1014ca1ade0030aca5e80af33c8873e1e Author: Rajat Jain Date: Thu Jun 27 14:47:38 2019 -0700 platform/chrome: lightbar: Get drvdata from parent in suspend/resume The lightbar driver never assigned the drvdata in probe method, and thus there is nothing there. Need to get the ec_dev from the parent's drvdata. Signed-off-by: Rajat Jain Reviewed-by: Gwendal Grignou Signed-off-by: Enric Balletbo i Serra drivers/platform/chrome/cros_ec_lightbar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 796e2f417ea5df072ce80b05431e9722112234c0 Author: Bartlomiej Zolnierkiewicz Date: Fri Jun 28 12:36:22 2019 +0200 video: fbdev: s3c-fb: fix sparse warnings about using incorrect types Use ->screen_buffer instead of ->screen_base to fix sparse warnings. [ Please see commit 17a7b0b4d974 ("fb.h: Provide alternate screen_base pointer") for details. ] Reported-by: kbuild test robot Acked-by: Jingoo Han Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/s3c-fb.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 0adcdbcb179624d7b3677264f2cd228e7d89eea9 Author: Bartlomiej Zolnierkiewicz Date: Fri Jun 28 12:30:08 2019 +0200 video: fbdev: don't print error message on framebuffer_alloc() failure framebuffer_alloc() can fail only on kzalloc() memory allocation failure and since kzalloc() will print error message in such case we can omit printing extra error message in drivers (which BTW is what the majority of framebuffer_alloc() users is doing already). Cc: "Bruno Prémont" Cc: Jiri Kosina Cc: Benjamin Tissoires Signed-off-by: Bartlomiej Zolnierkiewicz drivers/hid/hid-picolcd_fb.c | 4 +--- drivers/video/fbdev/amifb.c | 4 +--- drivers/video/fbdev/arkfb.c | 4 +--- drivers/video/fbdev/atmel_lcdfb.c | 4 +--- drivers/video/fbdev/aty/aty128fb.c | 5 ++--- drivers/video/fbdev/aty/atyfb_base.c | 10 ++++------ drivers/video/fbdev/aty/radeon_base.c | 2 -- drivers/video/fbdev/chipsfb.c | 1 - drivers/video/fbdev/cirrusfb.c | 5 +---- drivers/video/fbdev/da8xx-fb.c | 1 - drivers/video/fbdev/efifb.c | 1 - drivers/video/fbdev/grvga.c | 4 +--- drivers/video/fbdev/gxt4500.c | 5 ++--- drivers/video/fbdev/hyperv_fb.c | 4 +--- drivers/video/fbdev/i740fb.c | 4 +--- drivers/video/fbdev/imsttfb.c | 5 +---- drivers/video/fbdev/intelfb/intelfbdrv.c | 5 ++--- drivers/video/fbdev/jz4740_fb.c | 4 +--- drivers/video/fbdev/mb862xx/mb862xxfbdrv.c | 5 +---- drivers/video/fbdev/mbx/mbxfb.c | 4 +--- drivers/video/fbdev/omap/omapfb_main.c | 2 -- drivers/video/fbdev/omap2/omapfb/omapfb-main.c | 6 +----- drivers/video/fbdev/platinumfb.c | 5 ++--- drivers/video/fbdev/pmag-aa-fb.c | 4 +--- drivers/video/fbdev/pmag-ba-fb.c | 4 +--- drivers/video/fbdev/pmagb-b-fb.c | 4 +--- drivers/video/fbdev/pvr2fb.c | 6 +----- drivers/video/fbdev/riva/fbdev.c | 1 - drivers/video/fbdev/s3c-fb.c | 4 +--- drivers/video/fbdev/s3fb.c | 4 +--- drivers/video/fbdev/sh_mobile_lcdcfb.c | 8 ++------ drivers/video/fbdev/sm501fb.c | 4 +--- drivers/video/fbdev/sm712fb.c | 1 - drivers/video/fbdev/smscufx.c | 4 +--- drivers/video/fbdev/ssd1307fb.c | 4 +--- drivers/video/fbdev/sunxvr1000.c | 1 - drivers/video/fbdev/sunxvr2500.c | 1 - drivers/video/fbdev/sunxvr500.c | 1 - drivers/video/fbdev/tgafb.c | 4 +--- drivers/video/fbdev/udlfb.c | 4 +--- drivers/video/fbdev/via/viafbdev.c | 6 +----- drivers/video/fbdev/vt8623fb.c | 4 +--- 42 files changed, 40 insertions(+), 123 deletions(-) commit 5f0e6ce18e65c463c52d00997397967ea809688b Author: Bartlomiej Zolnierkiewicz Date: Fri Jun 28 12:30:06 2019 +0200 video: fbdev: intelfb: return -ENOMEM on framebuffer_alloc() failure Fix error code from -ENODEV to -ENOMEM. Cc: Maik Broemme Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/intelfb/intelfbdrv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 602ecfbc04562802bdf9fd443ce96b836b7ecc9e Author: Bartlomiej Zolnierkiewicz Date: Fri Jun 28 12:30:05 2019 +0200 video: fbdev: s3c-fb: return -ENOMEM on framebuffer_alloc() failure Fix error code from -ENOENT to -ENOMEM. Acked-by: Jingoo Han Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/s3c-fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 172bb24a4f480c180bee646f6616f714ac4bcab2 Author: Christian Brauner Date: Sat Mar 23 12:24:21 2019 +0100 tests: add pidfd_open() tests This adds testing for the new pidfd_open() syscalls. Specifically, we test: - that no invalid flags can be passed to pidfd_open() - that no invalid pid can be passed to pidfd_open() - that a pidfd can be retrieved with pidfd_open() - that the retrieved pidfd references the correct pid Signed-off-by: Christian Brauner Cc: Arnd Bergmann Cc: "Eric W. Biederman" Cc: Kees Cook Cc: Joel Fernandes (Google) Cc: Thomas Gleixner Cc: Jann Horn Cc: David Howells Cc: "Michael Kerrisk (man-pages)" Cc: Andy Lutomirsky Cc: Andrew Morton Cc: Oleg Nesterov Cc: Aleksa Sarai Cc: Linus Torvalds Cc: Al Viro Cc: linux-api@vger.kernel.org tools/testing/selftests/pidfd/.gitignore | 1 + tools/testing/selftests/pidfd/Makefile | 3 +- tools/testing/selftests/pidfd/pidfd.h | 57 ++++++++ tools/testing/selftests/pidfd/pidfd_open_test.c | 169 ++++++++++++++++++++++++ tools/testing/selftests/pidfd/pidfd_test.c | 48 +------ 5 files changed, 234 insertions(+), 44 deletions(-) commit 7615d9e1780e26e0178c93c55b73309a5dc093d7 Author: Christian Brauner Date: Fri May 24 12:44:59 2019 +0200 arch: wire-up pidfd_open() This wires up the pidfd_open() syscall into all arches at once. Signed-off-by: Christian Brauner Reviewed-by: David Howells Reviewed-by: Oleg Nesterov Acked-by: Arnd Bergmann Cc: "Eric W. Biederman" Cc: Kees Cook Cc: Joel Fernandes (Google) Cc: Thomas Gleixner Cc: Jann Horn Cc: Andy Lutomirsky Cc: Andrew Morton Cc: Aleksa Sarai Cc: Linus Torvalds Cc: Al Viro Cc: linux-api@vger.kernel.org Cc: linux-alpha@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-ia64@vger.kernel.org Cc: linux-m68k@lists.linux-m68k.org Cc: linux-mips@vger.kernel.org Cc: linux-parisc@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-s390@vger.kernel.org Cc: linux-sh@vger.kernel.org Cc: sparclinux@vger.kernel.org Cc: linux-xtensa@linux-xtensa.org Cc: linux-arch@vger.kernel.org Cc: x86@kernel.org arch/alpha/kernel/syscalls/syscall.tbl | 1 + arch/arm/tools/syscall.tbl | 1 + arch/arm64/include/asm/unistd.h | 2 +- arch/arm64/include/asm/unistd32.h | 2 ++ arch/ia64/kernel/syscalls/syscall.tbl | 1 + arch/m68k/kernel/syscalls/syscall.tbl | 1 + arch/microblaze/kernel/syscalls/syscall.tbl | 1 + arch/mips/kernel/syscalls/syscall_n32.tbl | 1 + arch/mips/kernel/syscalls/syscall_n64.tbl | 1 + arch/mips/kernel/syscalls/syscall_o32.tbl | 1 + arch/parisc/kernel/syscalls/syscall.tbl | 1 + arch/powerpc/kernel/syscalls/syscall.tbl | 1 + arch/s390/kernel/syscalls/syscall.tbl | 1 + arch/sh/kernel/syscalls/syscall.tbl | 1 + arch/sparc/kernel/syscalls/syscall.tbl | 1 + arch/x86/entry/syscalls/syscall_32.tbl | 1 + arch/x86/entry/syscalls/syscall_64.tbl | 1 + arch/xtensa/kernel/syscalls/syscall.tbl | 1 + include/uapi/asm-generic/unistd.h | 4 +++- 19 files changed, 22 insertions(+), 2 deletions(-) commit 32fcb426ec001cb6d5a4a195091a8486ea77e2df Author: Christian Brauner Date: Fri May 24 12:43:51 2019 +0200 pid: add pidfd_open() This adds the pidfd_open() syscall. It allows a caller to retrieve pollable pidfds for a process which did not get created via CLONE_PIDFD, i.e. for a process that is created via traditional fork()/clone() calls that is only referenced by a PID: int pidfd = pidfd_open(1234, 0); ret = pidfd_send_signal(pidfd, SIGSTOP, NULL, 0); With the introduction of pidfds through CLONE_PIDFD it is possible to created pidfds at process creation time. However, a lot of processes get created with traditional PID-based calls such as fork() or clone() (without CLONE_PIDFD). For these processes a caller can currently not create a pollable pidfd. This is a problem for Android's low memory killer (LMK) and service managers such as systemd. Both are examples of tools that want to make use of pidfds to get reliable notification of process exit for non-parents (pidfd polling) and race-free signal sending (pidfd_send_signal()). They intend to switch to this API for process supervision/management as soon as possible. Having no way to get pollable pidfds from PID-only processes is one of the biggest blockers for them in adopting this api. With pidfd_open() making it possible to retrieve pidfds for PID-based processes we enable them to adopt this api. In line with Arnd's recent changes to consolidate syscall numbers across architectures, I have added the pidfd_open() syscall to all architectures at the same time. Signed-off-by: Christian Brauner Reviewed-by: David Howells Reviewed-by: Oleg Nesterov Acked-by: Arnd Bergmann Cc: "Eric W. Biederman" Cc: Kees Cook Cc: Joel Fernandes (Google) Cc: Thomas Gleixner Cc: Jann Horn Cc: Andy Lutomirsky Cc: Andrew Morton Cc: Aleksa Sarai Cc: Linus Torvalds Cc: Al Viro Cc: linux-api@vger.kernel.org include/linux/syscalls.h | 1 + kernel/pid.c | 69 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) commit 740378dc7834bc511ac1ecb2157696681d2a1d32 Author: Joel Fernandes (Google) Date: Tue Apr 30 12:21:54 2019 -0400 pidfd: add polling selftests Other than verifying pidfd based polling, the tests make sure that wait semantics are preserved with the pidfd poll. Notably the 2 cases: 1. If a thread group leader exits while threads still there, then no pidfd poll notifcation should happen. 2. If a non-thread group leader does an execve, then the thread group leader is signaled to exit and is replaced with the execing thread as the new leader, however the parent is not notified in this case. Signed-off-by: Joel Fernandes (Google) Signed-off-by: Christian Brauner tools/testing/selftests/pidfd/Makefile | 2 +- tools/testing/selftests/pidfd/pidfd_test.c | 210 +++++++++++++++++++++++++++++ 2 files changed, 211 insertions(+), 1 deletion(-) commit b53b0b9d9a613c418057f6cb921c2f40a6f78c24 Author: Joel Fernandes (Google) Date: Tue Apr 30 12:21:53 2019 -0400 pidfd: add polling support This patch adds polling support to pidfd. Android low memory killer (LMK) needs to know when a process dies once it is sent the kill signal. It does so by checking for the existence of /proc/pid which is both racy and slow. For example, if a PID is reused between when LMK sends a kill signal and checks for existence of the PID, since the wrong PID is now possibly checked for existence. Using the polling support, LMK will be able to get notified when a process exists in race-free and fast way, and allows the LMK to do other things (such as by polling on other fds) while awaiting the process being killed to die. For notification to polling processes, we follow the same existing mechanism in the kernel used when the parent of the task group is to be notified of a child's death (do_notify_parent). This is precisely when the tasks waiting on a poll of pidfd are also awakened in this patch. We have decided to include the waitqueue in struct pid for the following reasons: 1. The wait queue has to survive for the lifetime of the poll. Including it in task_struct would not be option in this case because the task can be reaped and destroyed before the poll returns. 2. By including the struct pid for the waitqueue means that during de_thread(), the new thread group leader automatically gets the new waitqueue/pid even though its task_struct is different. Appropriate test cases are added in the second patch to provide coverage of all the cases the patch is handling. Cc: Andy Lutomirski Cc: Steven Rostedt Cc: Daniel Colascione Cc: Jann Horn Cc: Tim Murray Cc: Jonathan Kowalski Cc: Linus Torvalds Cc: Al Viro Cc: Kees Cook Cc: David Howells Cc: Oleg Nesterov Cc: kernel-team@android.com Reviewed-by: Oleg Nesterov Co-developed-by: Daniel Colascione Signed-off-by: Daniel Colascione Signed-off-by: Joel Fernandes (Google) Signed-off-by: Christian Brauner include/linux/pid.h | 3 +++ kernel/fork.c | 26 ++++++++++++++++++++++++++ kernel/pid.c | 2 ++ kernel/signal.c | 11 +++++++++++ 4 files changed, 42 insertions(+) commit bce9437a0a48dd5e19490f56e1cdc39a9be5563c Author: Amelie Delaunay Date: Fri Jun 28 11:18:06 2019 +0200 mtd: rawnand: stm32_fmc2: increase DMA completion timeouts When the system is overloaded, DMA data transfer completion occurs after 100ms. Increase the timeouts to let it the time to complete. Signed-off-by: Amelie Delaunay Signed-off-by: Christophe Kerello Signed-off-by: Miquel Raynal drivers/mtd/nand/raw/stm32_fmc2_nand.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 17c929e1334ee0647ce9f3aba1d6bc645c1e5206 Author: Fuqian Huang Date: Fri Jun 28 10:48:13 2019 +0800 mtd: rawnand: Use kzalloc() instead of kmalloc() and memset() Replace kmalloc() by a memset() followed with a kzalloc(). There is a recommendation to use zeroing allocator rather than allocator followed by memset(0) in ./scripts/coccinelle/api/alloc/zalloc-simple.cocci Signed-off-by: Fuqian Huang Signed-off-by: Miquel Raynal drivers/mtd/nand/raw/nand_bch.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 70a59fde6e69d1d8579f84bf4555bfffb3ce452d Author: Viresh Kumar Date: Thu Jun 20 08:35:50 2019 +0530 cpufreq: Avoid calling cpufreq_verify_current_freq() from handle_update() On some occasions cpufreq_verify_current_freq() schedules a work whose callback is handle_update(), which further calls cpufreq_update_policy() which may end up calling cpufreq_verify_current_freq() again. On the other hand, when cpufreq_update_policy() is called from handle_update(), the pointer to the cpufreq policy is already available, but cpufreq_cpu_acquire() is still called to get it in cpufreq_update_policy(), which should be avoided as well. To fix these issues, create a new helper, refresh_frequency_limits(), and make both handle_update() call it cpufreq_update_policy(). Signed-off-by: Viresh Kumar [ rjw: Rename reeval_frequency_limits() as refresh_frequency_limits() ] [ rjw: Changelog ] Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) commit 5980752e6ef7079c0839576df10f8062d8a48883 Author: Viresh Kumar Date: Thu Jun 20 08:35:49 2019 +0530 cpufreq: Consolidate cpufreq_update_current_freq() and __cpufreq_get() Their implementations are quite similar, so modify cpufreq_update_current_freq() somewhat and call it from __cpufreq_get(). Also rename cpufreq_update_current_freq() to cpufreq_verify_current_freq(), as that's what it is doing. Signed-off-by: Viresh Kumar [ rjw: Subject & changelog ] Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq.c | 70 +++++++++++++++++++---------------------------- 1 file changed, 28 insertions(+), 42 deletions(-) commit 973b059ca98054f9400562ae90bea5069b9b9274 Author: Takashi Sakamoto Date: Fri Jun 28 14:53:31 2019 +0900 ALSA: firewire-lib: fix to process MIDI conformant data channel for AM824 format In IEC 61883-6, 8 MIDI data streams are multiplexed into single MIDI conformant data channel. The index of stream is calculated by modulo 8 of the value of data block counter. Therefore data block processing layer requires valid value of data block counter. In recent changes of ALSA IEC 61883-1/6 engine, the value of data block counter is changed before calling data block processing layer. This brings miss detection of MIDI messages in non-blocking transmission method is used. This commit fixes the bug by changing chached data block counter after calling data block processing layer. Fixes: e335425b6596 ("ALSA: firewire-lib: split helper function to check incoming CIP header") Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/amdtp-stream.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) commit 76864868dbab0bfd9aadaa9155acfe396f8069e4 Author: Takashi Sakamoto Date: Fri Jun 28 14:53:30 2019 +0900 ALSA: firewire-lib: cache next data_block_counter after probing tracepoints event for IR context For debugging purpose, ALSA IEC 61883-1/6 engine has tracepoints event. In current implementation, next data block counter is stored as current data block counter before probing the event for IR isoc context. It's not good to check current packet parameter. This commit changes to assign the next data block counter after probing the event. Besides, Fireworks devices has a quirk to transfer isoc packet with data block counter for the last data block. For this quirk, the assignment is done before calling data block processing layer. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/amdtp-stream.c | 48 +++++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 22 deletions(-) commit 3fc4147653130c5d49d07e06186628e29ba9f39d Author: Colin Ian King Date: Thu Jun 27 17:58:53 2019 +0100 ALSA: xen-front: fix unintention integer overflow on left shifts Shifting the integer value 1 is evaluated using 32-bit arithmetic and then used in an expression that expects a 64-bit value, so there is potentially an integer overflow. Fix this by using the BIT_ULL macro to perform the shift. [ Note: as of the time being, no actual integer overflow hits because all values are less than 32bit, not including the extended 3-byte or DSD formats. But this is the right fix for future usage, of course. -- tiwai ] Addresses-Coverity: ("Unintentional integer overflow") Signed-off-by: Colin Ian King Signed-off-by: Takashi Iwai sound/xen/xen_snd_front_alsa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2f02a7ecd512288c40bd72bdd4d87ab4f01c1615 Author: Fuqian Huang Date: Fri Jun 28 10:50:35 2019 +0800 kernel: power: swap: use kzalloc() instead of kmalloc() followed by memset() Use zeroing allocator instead of using allocator followed with memset with 0 Signed-off-by: Fuqian Huang Acked-by: Pavel Machek [ rjw: Subject ] Signed-off-by: Rafael J. Wysocki kernel/power/swap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 9801522840cc1073f8064b4c979b7b6995c74bca Author: Viresh Kumar Date: Fri Jun 28 10:46:55 2019 +0530 cpufreq: Don't skip frequency validation for has_target() drivers CPUFREQ_CONST_LOOPS was introduced in a very old commit from pre-2.6 kernel release by commit 6a4a93f9c0d5 ("[CPUFREQ] Fix 'out of sync' issue"). Basically, that commit does two things: - It adds the frequency verification code (which is quite similar to what we have today as well). - And it sets the CPUFREQ_CONST_LOOPS flag only for setpolicy drivers, rightly so based on the code we had then. The idea was to avoid frequency validation for setpolicy drivers as the cpufreq core doesn't know what frequency the hardware is running at and so no point in doing frequency verification. The problem happened when we started to use the same CPUFREQ_CONST_LOOPS flag for constant loops-per-jiffy thing as well and many has_target() drivers started using the same flag and unknowingly skipped the verification of frequency. There is no logical reason behind skipping frequency validation because of the presence of CPUFREQ_CONST_LOOPS flag otherwise. Fix this issue by skipping frequency validation only for setpolicy drivers and always doing it for has_target() drivers irrespective of the presence or absence of CPUFREQ_CONST_LOOPS flag. cpufreq_notify_transition() is only called for has_target() type driver and not for set_policy type, and the check is simply redundant. Remove it as well. Also remove () around freq comparison statement as they aren't required and checkpatch also warns for them. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit b07079f1642c28dac4f6f339d5aca66203519734 Author: Vignesh Raghavendra Date: Tue Jun 25 13:27:46 2019 +0530 mtd: hyperbus: Add driver for TI's HyperBus memory controller Add driver for HyperBus memory controller on TI's AM654 SoC. Programming IP is pretty simple and provides direct memory mapped access to connected Flash devices. Add basic support for the IP without DMA. Second chip-select is not supported for now. Signed-off-by: Vignesh Raghavendra Signed-off-by: Miquel Raynal drivers/mtd/hyperbus/Kconfig | 12 ++++ drivers/mtd/hyperbus/Makefile | 1 + drivers/mtd/hyperbus/hbmc-am654.c | 147 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 160 insertions(+) commit b83408b580eccf8d2797cd6cb9ae42c2a28656a7 Author: liaoweixiong Date: Fri Jun 28 12:14:46 2019 +0800 mtd: spinand: read returns badly if the last page has bitflips In case of the last page containing bitflips (ret > 0), spinand_mtd_read() will return that number of bitflips for the last page while it should instead return max_bitflips like it does when the last page read returns with 0. Signed-off-by: Weixiong Liao Reviewed-by: Boris Brezillon Reviewed-by: Frieder Schrempf Cc: stable@vger.kernel.org Fixes: 7529df465248 ("mtd: nand: Add core infrastructure to support SPI NANDs") Signed-off-by: Miquel Raynal drivers/mtd/nand/spi/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 61c615ac53e3d540a98954c9c864c8c8a6ebdcae Merge: 72ce9b7cab96 e9146339515e Author: Olof Johansson Date: Thu Jun 27 23:29:06 2019 -0700 Merge tag 'qcom-dts-for-5.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/dt Qualcomm Device Tree Changes for v5.3 * Add vibrator motor for MSM8974 based Fairphone 2 * tag 'qcom-dts-for-5.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: ARM: dts: msm8974-FP2: Add vibration motor Signed-off-by: Olof Johansson commit 72ce9b7cab96d2b08d13b4f018c3625ae74a5d9d Merge: ff3b86096c49 8291e15108cd Author: Olof Johansson Date: Thu Jun 27 23:26:40 2019 -0700 Merge tag 'qcom-arm64-for-5.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/dt Qualcomm ARM64 Updates for v5.3 Part 2 * Add SDM845 Cheza support * Add TSENS controller and thermal zones for QCS404 * tag 'qcom-arm64-for-5.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: arm64: dts: qcom: qcs404: Add missing space for cooling-cells property arm64: dts: qcom: sdm845-cheza: add initial cheza dt arm64: dts: qcom: qcs404: Add thermal zones for each sensor arm64: dts: qcom: qcs404: Add tsens controller Signed-off-by: Olof Johansson commit ff2437befd8fe52046e0db949347b5bcfab6b097 Author: Fredrik Noring Date: Tue Jun 25 17:08:23 2019 +0200 usb: host: Fix excessive alignment restriction for local memory allocations The PAGE_SHIFT alignment restriction to devm_gen_pool_create() quickly exhaust local memory because most allocations are much smaller than PAGE_SIZE. This causes USB device failures such as usb 1-2.1: reset full-speed USB device number 4 using sm501-usb sd 1:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x03 driverbyte=0x00 sd 1:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 00 00 08 7c 00 00 f0 00 print_req_error: I/O error, dev sda, sector 2172 flags 80700 when trying to boot from the SM501 USB controller on SH4 with QEMU. Align allocations as required but not necessarily much more than that. The HCCA, TD and ED structures align with 256, 32 and 16 byte memory boundaries, as specified by the Open HCI[1]. The min_alloc_order argument to devm_gen_pool_create is now somewhat arbitrarily set to 4 (16 bytes). Perhaps it could be somewhat lower for general buffer allocations. Reference: [1] "Open Host Controller Interface Specification for USB", release 1.0a, Compaq, Microsoft, National Semiconductor, 1999, pp. 16, 19, 33. Reported-by: Guenter Roeck Signed-off-by: Fredrik Noring Tested-by: Guenter Roeck Signed-off-by: Christoph Hellwig drivers/usb/core/hcd.c | 2 +- drivers/usb/host/ohci-hcd.c | 4 ++-- drivers/usb/host/ohci-mem.c | 6 ++++-- 3 files changed, 7 insertions(+), 5 deletions(-) commit cf394fc5f7155c24efb584979e81427575ab3539 Author: Fredrik Noring Date: Tue Jun 25 17:05:58 2019 +0200 lib/genalloc.c: Add algorithm, align and zeroed family of DMA allocators Provide the algorithm option to DMA allocators as well, along with convenience variants for zeroed and aligned memory. The following four functions are added: - gen_pool_dma_alloc_algo() - gen_pool_dma_alloc_align() - gen_pool_dma_zalloc_algo() - gen_pool_dma_zalloc_align() Signed-off-by: Fredrik Noring Tested-by: Guenter Roeck Signed-off-by: Christoph Hellwig include/linux/genalloc.h | 10 ++++- lib/genalloc.c | 100 +++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 105 insertions(+), 5 deletions(-) commit ee7dd7733b201c6201174f384a92dbadc9f3129c Author: Sergej Benilov Date: Mon Jun 24 23:21:02 2019 +0200 sis900: remove TxIDLE Before "sis900: fix TX completion" patch, TX completion was done on TxIDLE interrupt. TX completion also was the only thing done on TxIDLE interrupt. Since "sis900: fix TX completion", TX completion is done on TxDESC interrupt. So it is not necessary any more to set and to check for TxIDLE. Eliminate TxIDLE from sis900. Correct some typos, too. Signed-off-by: Sergej Benilov Signed-off-by: David S. Miller drivers/net/ethernet/sis/sis900.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit e9c1a793210f29f32ee4cf048e04d7d9bb3221cc Author: Xin Long Date: Thu Jun 20 19:03:41 2019 +0800 tipc: add dst_cache support for udp media As other udp/ip tunnels do, tipc udp media should also have a lockless dst_cache supported on its tx path. Here we add dst_cache into udp_replicast to support dst cache for both rmcast and rcast, and rmcast uses ub->rcast and each rcast uses its own node in ub->rcast.list. Signed-off-by: Xin Long Acked-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/udp_media.c | 72 ++++++++++++++++++++++++++++++++++------------------ 1 file changed, 47 insertions(+), 25 deletions(-) commit fd329f276ecaad7a371d6f91b9bbea031d0c3440 Author: Ricardo Neri Date: Thu Jun 27 19:35:37 2019 -0700 x86/mtrr: Skip cache flushes on CPUs with cache self-snooping Programming MTRR registers in multi-processor systems is a rather lengthy process. Furthermore, all processors must program these registers in lock step and with interrupts disabled; the process also involves flushing caches and TLBs twice. As a result, the process may take a considerable amount of time. On some platforms, this can lead to a large skew of the refined-jiffies clock source. Early when booting, if no other clock is available (e.g., booting with hpet=disabled), the refined-jiffies clock source is used to monitor the TSC clock source. If the skew of refined-jiffies is too large, Linux wrongly assumes that the TSC is unstable: clocksource: timekeeping watchdog on CPU1: Marking clocksource 'tsc-early' as unstable because the skew is too large: clocksource: 'refined-jiffies' wd_now: fffedc10 wd_last: fffedb90 mask: ffffffff clocksource: 'tsc-early' cs_now: 5eccfddebc cs_last: 5e7e3303d4 mask: ffffffffffffffff tsc: Marking TSC unstable due to clocksource watchdog As per measurements, around 98% of the time needed by the procedure to program MTRRs in multi-processor systems is spent flushing caches with wbinvd(). As per the Section 11.11.8 of the Intel 64 and IA 32 Architectures Software Developer's Manual, it is not necessary to flush caches if the CPU supports cache self-snooping. Thus, skipping the cache flushes can reduce by several tens of milliseconds the time needed to complete the programming of the MTRR registers: Platform Before After 104-core (208 Threads) Skylake 1437ms 28ms 2-core ( 4 Threads) Haswell 114ms 2ms Reported-by: Mohammad Etemadi Signed-off-by: Ricardo Neri Signed-off-by: Thomas Gleixner Cc: Borislav Petkov Cc: Alan Cox Cc: Tony Luck Cc: "H. Peter Anvin" Cc: Andy Shevchenko Cc: Andi Kleen Cc: Hans de Goede Cc: Greg Kroah-Hartman Cc: Jordan Borgner Cc: "Ravi V. Shankar" Cc: Ricardo Neri Cc: Andy Shevchenko Cc: Andi Kleen Cc: Peter Feiner Cc: "Rafael J. Wysocki" Link: https://lkml.kernel.org/r/1561689337-19390-3-git-send-email-ricardo.neri-calderon@linux.intel.com arch/x86/kernel/cpu/mtrr/generic.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 1e03bff3600101bd9158d005e4313132e55bdec8 Author: Ricardo Neri Date: Thu Jun 27 19:35:36 2019 -0700 x86/cpu/intel: Clear cache self-snoop capability in CPUs with known errata Processors which have self-snooping capability can handle conflicting memory type across CPUs by snooping its own cache. However, there exists CPU models in which having conflicting memory types still leads to unpredictable behavior, machine check errors, or hangs. Clear this feature on affected CPUs to prevent its use. Suggested-by: Alan Cox Signed-off-by: Ricardo Neri Signed-off-by: Thomas Gleixner Cc: Borislav Petkov Cc: Tony Luck Cc: "H. Peter Anvin" Cc: Andy Shevchenko Cc: Andi Kleen Cc: Hans de Goede Cc: Greg Kroah-Hartman Cc: Jordan Borgner Cc: "Ravi V. Shankar" Cc: Mohammad Etemadi Cc: Ricardo Neri Cc: Andy Shevchenko Cc: Andi Kleen Cc: Peter Feiner Cc: "Rafael J. Wysocki" Link: https://lkml.kernel.org/r/1561689337-19390-2-git-send-email-ricardo.neri-calderon@linux.intel.com arch/x86/kernel/cpu/intel.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 8291e15108cde33c3e086a34af5381c95cc7aa87 Author: Niklas Cassel Date: Thu Jun 27 16:02:15 2019 +0200 arm64: dts: qcom: qcs404: Add missing space for cooling-cells property There should be a space both before and after the equal sign. Add a missing space for the cooling cells property. Fixes: f48cee3239a1 ("arm64: dts: qcom: qcs404: Add thermal zones for each sensor") Signed-off-by: Niklas Cassel Acked-by: Amit Kucheria Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/qcs404.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8ff80fbe7e9870078b1cc3c2cdd8f3f223b333a9 Author: Baoquan He Date: Fri May 24 15:38:10 2019 +0800 x86/kdump/64: Restrict kdump kernel reservation to <64TB Restrict kdump to only reserve crashkernel below 64TB. The reaons is that the kdump may jump from a 5-level paging mode to a 4-level paging mode kernel. If a 4-level paging mode kdump kernel is put above 64TB, then the kdump kernel cannot start. The 1st kernel reserves the kdump kernel region during bootup. At that point it is not known whether the kdump kernel has 5-level or 4-level paging support. To support both restrict the kdump kernel reservation to the lower 64TB address space to ensure that a 4-level paging mode kdump kernel can be loaded and successfully started. [ tglx: Massaged changelog ] Signed-off-by: Baoquan He Signed-off-by: Thomas Gleixner Acked-by: Kirill A. Shutemov Acked-by: Dave Young Cc: bp@alien8.de Cc: hpa@zytor.com Link: https://lkml.kernel.org/r/20190524073810.24298-4-bhe@redhat.com arch/x86/kernel/setup.c | 15 ++++++++++++--- include/linux/sizes.h | 1 + 2 files changed, 13 insertions(+), 3 deletions(-) commit ee338b9ee2822e65a85750da6129946c14962410 Author: Baoquan He Date: Fri May 24 15:38:09 2019 +0800 x86/kexec/64: Prevent kexec from 5-level paging to a 4-level only kernel If the running kernel has 5-level paging activated, the 5-level paging mode is preserved across kexec. If the kexec'ed kernel does not contain support for handling active 5-level paging mode in the decompressor, the decompressor will crash with #GP. Prevent this situation at load time. If 5-level paging is active, check the xloadflags whether the kexec kernel can handle 5-level paging at least in the decompressor. If not, reject the load attempt and print out an error message. Signed-off-by: Baoquan He Signed-off-by: Thomas Gleixner Acked-by: Kirill A. Shutemov Cc: bp@alien8.de Cc: hpa@zytor.com Cc: dyoung@redhat.com Link: https://lkml.kernel.org/r/20190524073810.24298-3-bhe@redhat.com arch/x86/kernel/kexec-bzimage64.c | 5 +++++ 1 file changed, 5 insertions(+) commit f2d08c5d3bcf3f7ef788af122b57a919efa1e9d0 Author: Baoquan He Date: Fri May 24 15:38:08 2019 +0800 x86/boot: Add xloadflags bits to check for 5-level paging support The current kernel supports 5-level paging mode, and supports dynamically choosing the paging mode during bootup depending on the kernel image, hardware and kernel parameter settings. This flexibility brings several issues to kexec/kdump: 1) Dynamic switching between paging modes requires support in the target kernel. This means kexec from a 5-level paging kernel into a kernel which does not support mode switching is not possible. So the loader needs to be able to analyze the supported paging modes of the kexec target kernel. 2) If running on a 5-level paging kernel and the kexec target kernel is a 4-level paging kernel, the target immage cannot be loaded above the 64TB address space limit. But the kexec loader searches for a load area from top to bottom which would eventually put the target kernel above 64TB when the machine has large enough RAM size. So the loader needs to be able to analyze the paging mode of the target kernel to load it at a suitable spot in the address space. Solution: Add two bits XLF_5LEVEL and XLF_5LEVEL_ENABLED: - Bit XLF_5LEVEL indicates whether 5-level paging mode switching support is available. (Issue #1) - Bit XLF_5LEVEL_ENABLED indicates whether the kernel was compiled with full 5-level paging support (CONFIG_X86_5LEVEL=y). (Issue #2) The loader will use these bits to verify whether the target kernel is suitable to be kexec'ed to from a 5-level paging kernel and to determine the constraints of the target kernel load address. The flags will be used by the kernel kexec subsystem and the userspace kexec tools. [ tglx: Massaged changelog ] Signed-off-by: Baoquan He Signed-off-by: Thomas Gleixner Acked-by: Kirill A. Shutemov Cc: bp@alien8.de Cc: hpa@zytor.com Cc: dyoung@redhat.com Link: https://lkml.kernel.org/r/20190524073810.24298-2-bhe@redhat.com arch/x86/boot/header.S | 12 +++++++++++- arch/x86/include/uapi/asm/bootparam.h | 2 ++ 2 files changed, 13 insertions(+), 1 deletion(-) commit d96ff269a04be286989ead13bf8b4be55bdee8ee Merge: 3a49584477ff 556e2f6020bf Author: David S. Miller Date: Thu Jun 27 21:06:39 2019 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net The new route handling in ip_mc_finish_output() from 'net' overlapped with the new support for returning congestion notifications from BPF programs. In order to handle this I had to take the dev_loopback_xmit() calls out of the switch statement. The aquantia driver conflicts were simple overlapping changes. Signed-off-by: David S. Miller commit 3a49584477ff4c8838833be9f3b7cc13f0f7c0d3 Merge: 702999ea377f fccac5802da2 Author: David S. Miller Date: Thu Jun 27 19:47:36 2019 -0700 Merge branch 'nfp-extend-flower-capabilities-for-GRE-tunnel-offload' Jakub Kicinski says: ==================== nfp: extend flower capabilities for GRE tunnel offload Pieter says: This set extends the flower match and action components to offload GRE decapsulation with classification and encapsulation actions. The first 3 patches are refactor and cleanup patches for improving readability and reusability. Patch 4 and 5 implement GRE decap and encap functionality respectively. ==================== Signed-off-by: David S. Miller commit fccac5802da25840379986177ed1b653f30713ed Author: Pieter Jansen van Vuuren Date: Thu Jun 27 16:12:43 2019 -0700 nfp: flower: add GRE encap action support Add new GRE encapsulation support, which allows offload of filters using tunnel_key set action in combination with actions that egress to GRE type ports. Signed-off-by: Pieter Jansen van Vuuren Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/action.c | 33 ++++++++++++++++++---- 1 file changed, 28 insertions(+), 5 deletions(-) commit e3a6aba081f45882069af28d73157e01c22d8092 Author: Pieter Jansen van Vuuren Date: Thu Jun 27 16:12:42 2019 -0700 nfp: flower: add GRE decap classification support Extend the existing tunnel matching support to include GRE decap classification. Specifically matching existing tunnel fields for NVGRE (GRE with protocol field set to TEB). Signed-off-by: Pieter Jansen van Vuuren Reviewed-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/cmsg.h | 39 ++++++++++++++ drivers/net/ethernet/netronome/nfp/flower/match.c | 44 ++++++++++++++++ .../net/ethernet/netronome/nfp/flower/offload.c | 59 +++++++++++++++------- 3 files changed, 124 insertions(+), 18 deletions(-) commit 104dce5be9f97bb8c5a36b5e04f4fc6b6dd9b9c2 Author: Pieter Jansen van Vuuren Date: Thu Jun 27 16:12:41 2019 -0700 nfp: flower: rename tunnel related functions in action offload Previously tunnel related functions in action offload only applied to UDP tunnels. Rename these functions in preparation for new tunnel types. Signed-off-by: Pieter Jansen van Vuuren Reviewed-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/action.c | 30 ++++++++++------------ drivers/net/ethernet/netronome/nfp/flower/cmsg.h | 2 +- 2 files changed, 15 insertions(+), 17 deletions(-) commit 4bf8758a89f5f587454d6aad613e11b7d4618c37 Author: Pieter Jansen van Vuuren Date: Thu Jun 27 16:12:40 2019 -0700 nfp: flower: add helper functions for tunnel classification Adds IPv4 address and TTL/TOS helper functions, which is done in preparation for compiling new tunnel types. Signed-off-by: Pieter Jansen van Vuuren Reviewed-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/cmsg.h | 16 ++++-- drivers/net/ethernet/netronome/nfp/flower/match.c | 59 +++++++++++++++-------- 2 files changed, 51 insertions(+), 24 deletions(-) commit 986643de5356b4ea6ca32ce0bfdae3e02e507a9f Author: Pieter Jansen van Vuuren Date: Thu Jun 27 16:12:39 2019 -0700 nfp: flower: refactor tunnel key layer calculation Refactor the key layer calculation function, in particular the tunnel key layer calculation by introducing helper functions. This is done in preparation for supporting GRE tunnel offloads. Signed-off-by: Pieter Jansen van Vuuren Reviewed-by: Jakub Kicinski Reviewed-by: John Hurley Signed-off-by: David S. Miller .../net/ethernet/netronome/nfp/flower/offload.c | 100 ++++++++++++--------- 1 file changed, 60 insertions(+), 40 deletions(-) commit 702999ea377f622c5a1d877f8dafc17ce214e2d8 Merge: d7ee287827ef ee353e453443 Author: David S. Miller Date: Thu Jun 27 19:25:02 2019 -0700 Merge branch 'net-dsa-microchip-Further-regmap-cleanups' Marek Vasut says: ==================== net: dsa: microchip: Further regmap cleanups This patchset cleans up KSZ9477 switch driver by replacing various ad-hoc polling implementations and register RMW with regmap functions. Each polling function is replaced separately to make it easier to review and possibly bisect, but maybe the patches can be squashed. ==================== Signed-off-by: Marek Vasut Signed-off-by: David S. Miller commit ee353e4534435372f297c9f3e661f76d1e1f7b2b Author: Marek Vasut Date: Thu Jun 27 23:55:56 2019 +0200 net: dsa: microchip: Replace bit RMW with regmap Regmap provides read-modify-write function to update bitfields in registers. Replace ad-hoc read-modify-write with regmap_update_bits() where applicable. Signed-off-by: Marek Vasut Cc: Andrew Lunn Cc: Florian Fainelli Cc: Tristram Ha Cc: Woojung Huh Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz9477.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) commit 3371efbcd4af6531f73c13368349604d1488721e Author: Marek Vasut Date: Thu Jun 27 23:55:55 2019 +0200 net: dsa: microchip: Replace ksz9477_wait_alu_sta_ready polling with regmap Regmap provides polling function to poll for bits in a register. This function is another reimplementation of polling for bit being clear in a register. Replace this with regmap polling function. Moreover, inline the function parameters, as the function is never called with any other parameter values than this one. Signed-off-by: Marek Vasut Cc: Andrew Lunn Cc: Florian Fainelli Cc: Tristram Ha Cc: Woojung Huh Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz9477.c | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) commit ef534195e185edd2247cc0a23a6024bb5a090146 Author: Marek Vasut Date: Thu Jun 27 23:55:54 2019 +0200 net: dsa: microchip: Replace ksz9477_wait_alu_ready polling with regmap Regmap provides polling function to poll for bits in a register. This function is another reimplementation of polling for bit being clear in a register. Replace this with regmap polling function. Moreover, inline the function parameters, as the function is never called with any other parameter values than this one. Signed-off-by: Marek Vasut Cc: Andrew Lunn Cc: Florian Fainelli Cc: Tristram Ha Cc: Woojung Huh Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz9477.c | 34 ++++++++++++---------------------- 1 file changed, 12 insertions(+), 22 deletions(-) commit 0f9c36e36bf0a5a12c19eed4e9bca5d8282b7454 Author: Marek Vasut Date: Thu Jun 27 23:55:53 2019 +0200 net: dsa: microchip: Replace ksz9477_wait_vlan_ctrl_ready polling with regmap Regmap provides polling function to poll for bits in a register. This function is another reimplementation of polling for bit being clear in a register. Replace this with regmap polling function. Moreover, inline the function parameters, as the function is never called with any other parameter values than this one. Signed-off-by: Marek Vasut Cc: Andrew Lunn Cc: Florian Fainelli Cc: Tristram Ha Cc: Woojung Huh Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz9477.c | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) commit 1c1eb5806a1128b186f6a272e468563b05c752c5 Author: Marek Vasut Date: Thu Jun 27 23:55:52 2019 +0200 net: dsa: microchip: Replace ad-hoc polling with regmap Regmap provides polling function to poll for bits in a register, use in instead of reimplementing it. Signed-off-by: Marek Vasut Cc: Andrew Lunn Cc: Florian Fainelli Cc: Tristram Ha Cc: Woojung Huh Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz9477.c | 14 +++++--------- drivers/net/dsa/microchip/ksz_common.h | 14 -------------- 2 files changed, 5 insertions(+), 23 deletions(-) commit e52d484d9869eb291140545746ccbe5ffc7c9306 Author: Haren Myneni Date: Tue Jun 18 12:09:22 2019 -0700 crypto/NX: Set receive window credits to max number of CRBs in RxFIFO System gets checkstop if RxFIFO overruns with more requests than the maximum possible number of CRBs in FIFO at the same time. The max number of requests per window is controlled by window credits. So find max CRBs from FIFO size and set it to receive window credits. Fixes: b0d6c9bab5e4 ("crypto/nx: Add P9 NX support for 842 compression engine") CC: stable@vger.kernel.org # v4.14+ Signed-off-by:Haren Myneni Signed-off-by: Herbert Xu drivers/crypto/nx/nx-842-powernv.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit ff9b011ad14319a3189efd033796410a48b23cde Merge: 6bbe6f5732fa aaba9791fbb4 Author: Zhang Rui Date: Fri Jun 28 09:15:17 2019 +0800 Merge branches 'thermal-core' and 'thermal-intel' into next commit 7d5bdc0cf24f423b37dd4e5591924d088d0f34a9 Author: Max Filippov Date: Thu Jun 27 18:12:27 2019 -0700 xtensa: remove arch/xtensa/include/asm/types.h Xtensa does not define CONFIG_64BIT. The generic definition of BITS_PER_LONG in include/asm-generic/bitsperlong.h should work. With that definition removed from arch/xtensa/include/asm/types.h it does nothing but including arch/xtensa/include/uapi/asm/types.h Remove the arch/xtensa/include/asm/types.h header. Signed-off-by: Max Filippov arch/xtensa/include/asm/types.h | 23 ----------------------- 1 file changed, 23 deletions(-) commit 36a7347de097edf9c4d7203d09fa223c86479674 Author: Andreas Gruenbacher Date: Thu Jun 27 17:28:41 2019 -0700 iomap: fix page_done callback for short writes When we truncate a short write to have it retried, pass the truncated length to the page_done callback instead of the full length. Signed-off-by: Andreas Gruenbacher Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/iomap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8af54f291e5cfdb215e0b3045cc365954c55855d Author: Christoph Hellwig Date: Thu Jun 27 17:28:40 2019 -0700 fs: fold __generic_write_end back into generic_write_end This effectively reverts a6d639da63ae ("fs: factor out a __generic_write_end helper") as we now open code what is left of that helper in iomap. Signed-off-by: Christoph Hellwig Signed-off-by: Andreas Gruenbacher Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/buffer.c | 62 ++++++++++++++++++++++++++++------------------------------- fs/internal.h | 2 -- 2 files changed, 29 insertions(+), 35 deletions(-) commit 8d3e72a180b42c01ec00045e1bb8eb91175adafe Author: Andreas Gruenbacher Date: Thu Jun 27 17:28:40 2019 -0700 iomap: don't mark the inode dirty in iomap_write_end Marking the inode dirty for each page copied into the page cache can be very inefficient for file systems that use the VFS dirty inode tracking, and is completely pointless for those that don't use the VFS dirty inode tracking. So instead, only set an iomap flag when changing the in-core inode size, and open code the rest of __generic_write_end. Partially based on code from Christoph Hellwig. Signed-off-by: Andreas Gruenbacher Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/gfs2/bmap.c | 2 ++ fs/iomap.c | 15 ++++++++++++++- include/linux/iomap.h | 1 + 3 files changed, 17 insertions(+), 1 deletion(-) commit 53e155f2bbd42df7e8bea87be78f0d60fe9fa122 Merge: 14808a12bdbd 648fdc3f6475 Author: Dave Airlie Date: Fri Jun 28 09:34:25 2019 +1000 Merge tag 'drm-msm-next-2019-06-25' of https://gitlab.freedesktop.org/drm/msm into drm-next + usual progress on cleanups + dsi vs EPROBE_DEFER fixes + msm8998 (snapdragon 835 support) + a540 gpu support (mesa support already landed) + dsi, dsi-phy support + mdp5 and dpu interconnect (bus/memory scaling) support + initial prep work for per-context pagetables (at least the parts that don't have external dependencies like iommu/arm-smmu) There is one more patch for fixing DSI cmd mode panels (part of a set of patches to get things working on nexus5), but it would be conflicty with 1cff7440a86e04a613665803b42034 in drm-next without rebasing or back-merge, and since it doesn't conflict with anything in msm-next, I think it best if Sean merges that through drm-mix-fixes instead. (In other news, I've been making some progress w/ getting efifb working properly on sdm850 laptop without horrible hacks, and drm/msm + clk stuff not totally falling over when bootloader enables display and things are already running when driver probes.. but not quite ready yet, hopefully we can post some of that for 5.4.. should help for both the sdm835 and sdm850 laptops.) Signed-off-by: Dave Airlie From: Rob Clark Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGsj3N4XzDLSDoa+4RHZ9wXObYmhcep0M3LjnRg48BeLvg@mail.gmail.com commit 4a8f81b8c053aad250ee247b219904ada72df9a4 Author: Thomas Gleixner Date: Fri Jun 28 01:12:26 2019 +0200 MAINTAINERS: Fix Andy's surname and the directory entries of VDSO Fixes: e70980312a94 ("MAINTAINERS: Add entry for the generic VDSO library") Reported-by: Joe Perches/ Reported-by: Andy Lutomirks^H^Hski Signed-off-by: Thomas Gleixner MAINTAINERS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e44252f4fe79dd9ca93bcf4e8f74389a5b8452f5 Author: Thomas Gleixner Date: Sun Jun 23 15:24:09 2019 +0200 x86/hpet: Use channel for legacy clockevent storage All preparations are done. Use the channel storage for the legacy clockevent and remove the static variable. Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Ricardo Neri Cc: Ashok Raj Cc: Andi Kleen Cc: Suravee Suthikulpanit Cc: Stephane Eranian Cc: Ravi Shankar Link: https://lkml.kernel.org/r/20190623132436.737689919@linutronix.de arch/x86/kernel/hpet.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 49adaa60fa75a04457d30f38321378cdc3547212 Author: Thomas Gleixner Date: Sun Jun 23 15:24:08 2019 +0200 x86/hpet: Use common init for legacy clockevent Replace the static initialization of the legacy clockevent with runtime initialization utilizing the common init function as the last preparatory step to switch the legacy clockevent over to the channel 0 storage in hpet_base. This comes with a twist. The static clockevent initializer has selected support for periodic and oneshot mode unconditionally whether the HPET config advertised periodic mode or not. Even the pre clockevents code did this. But.... Using the conditional in hpet_init_clockevent() makes at least Qemu and one hardware machine fail to boot. There are two issues which cause the boot failure: #1 After the timer delivery test in IOAPIC and the IOAPIC setup the next interrupt is not delivered despite the HPET channel being programmed correctly. Reprogramming the HPET after switching to IOAPIC makes it work again. After fixing this, the next issue surfaces: #2 Due to the unconditional periodic mode 'availability' the Local APIC timer calibration can hijack the global clockevents event handler without causing damage. Using oneshot at this stage makes if hang because the HPET does not get reprogrammed due to the handler hijacking. Duh, stupid me! Both issues require major surgery and especially the kick HPET again after enabling IOAPIC results in really nasty hackery. This 'assume periodic works' magic has survived since HPET support got added, so it's questionable whether this should be fixed. Both Qemu and the failing hardware machine support periodic mode despite the fact that both don't advertise it in the configuration register and both need that extra kick after switching to IOAPIC. Seems to be a feature... Keep the 'assume periodic works' magic around and add a big fat comment. Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Ricardo Neri Cc: Ashok Raj Cc: Andi Kleen Cc: Suravee Suthikulpanit Cc: Stephane Eranian Cc: Ravi Shankar Link: https://lkml.kernel.org/r/20190623132436.646565913@linutronix.de arch/x86/kernel/hpet.c | 87 +++++++++++++++++++++++++++++++------------------- 1 file changed, 54 insertions(+), 33 deletions(-) commit ea99110dd024d2f31bde19dda049f3fbf3816a70 Author: Thomas Gleixner Date: Sun Jun 23 15:24:07 2019 +0200 x86/hpet: Carve out shareable parts of init_one_hpet_msi_clockevent() To finally remove the static channel0/clockevent storage and to utilize the channel 0 storage in hpet_base, it's required to run time initialize the clockevent. The MSI clockevents already have a run time init function. Carve out the parts which can be shared between the legacy and the MSI implementation. Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Ricardo Neri Cc: Ashok Raj Cc: Andi Kleen Cc: Suravee Suthikulpanit Cc: Stephane Eranian Cc: Ravi Shankar Link: https://lkml.kernel.org/r/20190623132436.552451082@linutronix.de arch/x86/kernel/hpet.c | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) commit 310b5b3eb6ba5d3a92d783b9fa1c5a3ffb5932e9 Author: Thomas Gleixner Date: Sun Jun 23 15:24:06 2019 +0200 x86/hpet: Consolidate clockevent functions Now that the legacy clockevent is wrapped in a hpet_channel struct most clockevent functions can be shared between the legacy and the MSI based clockevents. Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Ricardo Neri Cc: Ashok Raj Cc: Andi Kleen Cc: Suravee Suthikulpanit Cc: Stephane Eranian Cc: Ravi Shankar Link: https://lkml.kernel.org/r/20190623132436.461437795@linutronix.de arch/x86/kernel/hpet.c | 92 ++++++++++++++------------------------------------ 1 file changed, 25 insertions(+), 67 deletions(-) commit 18e84a2dff00c3c817161a105332cd3fc7592648 Author: Thomas Gleixner Date: Sun Jun 23 15:24:05 2019 +0200 x86/hpet: Wrap legacy clockevent in hpet_channel For HPET channel 0 there exist two clockevent structures right now: - the static hpet_clockevent - the clockevent in channel 0 storage The goal is to use the clockevent in the channel storage, remove the static variable and share code with the MSI implementation. As a first step wrap the legacy clockevent into a hpet_channel struct and convert the users. Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Ricardo Neri Cc: Ashok Raj Cc: Andi Kleen Cc: Suravee Suthikulpanit Cc: Stephane Eranian Cc: Ravi Shankar Link: https://lkml.kernel.org/r/20190623132436.368141247@linutronix.de arch/x86/kernel/hpet.c | 49 +++++++++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 22 deletions(-) commit 45e0a415634600e608188480bc355b20344f9e3f Author: Thomas Gleixner Date: Sun Jun 23 15:24:04 2019 +0200 x86/hpet: Use cached info instead of extra flags Now that HPET clockevent support is integrated into the channel data, reuse the cached boot configuration instead of copying the same information into a flags field. This also allows to consolidate the reservation code into one place, which can now solely depend on the mode information. Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Ricardo Neri Cc: Ashok Raj Cc: Andi Kleen Cc: Suravee Suthikulpanit Cc: Stephane Eranian Cc: Ravi Shankar Link: https://lkml.kernel.org/r/20190623132436.277510163@linutronix.de arch/x86/kernel/hpet.c | 76 +++++++++++++++----------------------------------- 1 file changed, 23 insertions(+), 53 deletions(-) commit 4d5e68330df4e79633bcde2bebcbfed1ba0421d5 Author: Thomas Gleixner Date: Sun Jun 23 15:24:03 2019 +0200 x86/hpet: Move clockevents into channels Instead of allocating yet another data structure, move the clock event data into the channel structure. This allows further consolidation of the reservation code and the reuse of the cached boot config to replace the extra flags in the clockevent data. Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Ricardo Neri Cc: Ashok Raj Cc: Andi Kleen Cc: Suravee Suthikulpanit Cc: Stephane Eranian Cc: Ravi Shankar Link: https://lkml.kernel.org/r/20190623132436.185851116@linutronix.de arch/x86/include/asm/hpet.h | 6 +- arch/x86/kernel/apic/msi.c | 4 +- arch/x86/kernel/hpet.c | 139 +++++++++++++++++++------------------------- 3 files changed, 64 insertions(+), 85 deletions(-) commit d415c7543140f77fe1d2d9d3942cbf51a9737993 Author: Ingo Molnar Date: Sun Jun 23 15:24:02 2019 +0200 x86/hpet: Rename variables to prepare for switching to channels struct hpet_dev is gone with the next change as the clockevent storage moves into struct hpet_channel. So the variable name hdev will not make sense anymore. Ditto for timer vs. channel and similar details. Doing the rename in the change makes the patch harder to review. Doing it afterward is problematic vs. tracking down issues. Doing it upfront is the easiest solution as it does not change functionality. Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Ricardo Neri Cc: Ashok Raj Cc: Andi Kleen Cc: Suravee Suthikulpanit Cc: Stephane Eranian Cc: Ravi Shankar Link: https://lkml.kernel.org/r/20190623132436.093113681@linutronix.de arch/x86/kernel/hpet.c | 124 ++++++++++++++++++++++++------------------------- 1 file changed, 62 insertions(+), 62 deletions(-) commit af5a1dadf3fcf673906af1a1129b2b7528494ee5 Author: Thomas Gleixner Date: Sun Jun 23 15:24:01 2019 +0200 x86/hpet: Add function to select a /dev/hpet channel If CONFIG_HPET=y is enabled the x86 specific HPET code should reserve at least one channel for the /dev/hpet character device, so that not all channels are absorbed for per CPU clockevent devices. Create a function to assign HPET_MODE_DEVICE so the rework of the clockevents allocation code can utilize the mode information instead of reducing the number of evaluated channels by #ifdef hackery. The function is not yet used, but provided as a separate patch for ease of review. It will be used when the rework of the clockevent selection takes place. Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Ricardo Neri Cc: Ashok Raj Cc: Andi Kleen Cc: Suravee Suthikulpanit Cc: Stephane Eranian Cc: Ravi Shankar Link: https://lkml.kernel.org/r/20190623132436.002758910@linutronix.de arch/x86/kernel/hpet.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 9e16e4933e48819a259b8967e72e5765349953b1 Author: Thomas Gleixner Date: Sun Jun 23 15:24:00 2019 +0200 x86/hpet: Add mode information to struct hpet_channel The usage of the individual HPET channels is not tracked in a central place. The information is scattered in different data structures. Also the HPET reservation in the HPET character device is split out into several places which makes the code hard to follow. Assigning a mode to the channel allows to consolidate the reservation code and paves the way for further simplifications. As a first step set the mode of the legacy channels when the HPET is in legacy mode. Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Ricardo Neri Cc: Ashok Raj Cc: Andi Kleen Cc: Suravee Suthikulpanit Cc: Stephane Eranian Cc: Ravi Shankar Link: https://lkml.kernel.org/r/20190623132435.911652981@linutronix.de arch/x86/kernel/hpet.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 2460d5878ad69c178f9ff1cc3eee9f09b017e15f Author: Thomas Gleixner Date: Sun Jun 23 15:23:59 2019 +0200 x86/hpet: Use cached channel data Instead of rereading the HPET registers over and over use the information which was cached in hpet_enable(). Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Ricardo Neri Cc: Ashok Raj Cc: Andi Kleen Cc: Suravee Suthikulpanit Cc: Stephane Eranian Cc: Ravi Shankar Link: https://lkml.kernel.org/r/20190623132435.821728550@linutronix.de arch/x86/kernel/hpet.c | 41 ++++++++++++++++------------------------- 1 file changed, 16 insertions(+), 25 deletions(-) commit e37f0881e9d9ec8b12f242cc2b78d93259aa7f0f Author: Thomas Gleixner Date: Sun Jun 23 15:23:58 2019 +0200 x86/hpet: Introduce struct hpet_base and struct hpet_channel Introduce new data structures to replace the ad hoc collection of separate variables and pointers. Replace the boot configuration store and restore as a first step. Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Ricardo Neri Cc: Ashok Raj Cc: Andi Kleen Cc: Suravee Suthikulpanit Cc: Stephane Eranian Cc: Ravi Shankar Link: https://lkml.kernel.org/r/20190623132435.728456320@linutronix.de arch/x86/kernel/hpet.c | 82 +++++++++++++++++++++++++++++--------------------- 1 file changed, 48 insertions(+), 34 deletions(-) commit 0b5c597de6aa30000480d6add2f37ef7de3f9312 Author: Ingo Molnar Date: Sun Jun 23 15:23:57 2019 +0200 x86/hpet: Coding style cleanup Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Ricardo Neri Cc: Ashok Raj Cc: Andi Kleen Cc: Suravee Suthikulpanit Cc: Stephane Eranian Cc: Ravi Shankar Link: https://lkml.kernel.org/r/20190623132435.637420368@linutronix.de arch/x86/kernel/hpet.c | 43 ++++++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 17 deletions(-) commit dfe36b573ed320ce311b2cb9251d2543be9e52ac Author: Ingo Molnar Date: Sun Jun 23 15:23:56 2019 +0200 x86/hpet: Clean up comments Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Ricardo Neri Cc: Ashok Raj Cc: Andi Kleen Cc: Suravee Suthikulpanit Cc: Stephane Eranian Cc: Ravi Shankar Link: https://lkml.kernel.org/r/20190623132435.545653922@linutronix.de arch/x86/kernel/hpet.c | 41 +++++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 18 deletions(-) commit 3fe50c34dc1fa8ae2c24ec202b9decbbef72921d Author: Ingo Molnar Date: Sun Jun 23 15:23:55 2019 +0200 x86/hpet: Make naming consistent Use 'evt' for clockevents pointers and capitalize HPET in comments. Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Ricardo Neri Cc: Ashok Raj Cc: Andi Kleen Cc: Suravee Suthikulpanit Cc: Stephane Eranian Cc: Ravi Shankar Link: https://lkml.kernel.org/r/20190623132435.454138339@linutronix.de arch/x86/kernel/hpet.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 9bc9e1d4c139497553599a73839ea846dce63f72 Author: Ingo Molnar Date: Sun Jun 23 15:23:54 2019 +0200 x86/hpet: Remove not required includes Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Ricardo Neri Cc: Ashok Raj Cc: Andi Kleen Cc: Suravee Suthikulpanit Cc: Stephane Eranian Cc: Ravi Shankar Link: https://lkml.kernel.org/r/20190623132435.348089155@linutronix.de arch/x86/kernel/hpet.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit 3535aa12f7f26fc755514b13aee8fac15741267e Author: Thomas Gleixner Date: Sun Jun 23 15:23:53 2019 +0200 x86/hpet: Decapitalize and rename EVT_TO_HPET_DEV It's a function not a macro and the upcoming changes use channel for the individual hpet timer units to allow a step by step refactoring approach. Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Ricardo Neri Cc: Ashok Raj Cc: Andi Kleen Cc: Suravee Suthikulpanit Cc: Stephane Eranian Cc: Ravi Shankar Link: https://lkml.kernel.org/r/20190623132435.241032433@linutronix.de arch/x86/kernel/hpet.c | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) commit 44b5be5733e119300115b98409cbcf9a45b8d3f1 Author: Thomas Gleixner Date: Sun Jun 23 15:23:52 2019 +0200 x86/hpet: Simplify counter validation There is no point to loop for 200k TSC cycles to check afterwards whether the HPET counter is working. Read the counter inside of the loop and break out when the counter value changed. Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Ricardo Neri Cc: Ashok Raj Cc: Andi Kleen Cc: Suravee Suthikulpanit Cc: Stephane Eranian Cc: Ravi Shankar Link: https://lkml.kernel.org/r/20190623132435.149535103@linutronix.de arch/x86/kernel/hpet.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 3222daf970f30133cc4c639cbecdc29c4ae91b2b Author: Thomas Gleixner Date: Sun Jun 23 15:23:51 2019 +0200 x86/hpet: Separate counter check out of clocksource register code The init code checks whether the HPET counter works late in the init function when the clocksource is registered. That should happen right with the other sanity checks. Split it into a separate validation function and move it to the other sanity checks. Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Ricardo Neri Cc: Ashok Raj Cc: Andi Kleen Cc: Suravee Suthikulpanit Cc: Stephane Eranian Cc: Ravi Shankar Link: https://lkml.kernel.org/r/20190623132435.058540608@linutronix.de arch/x86/kernel/hpet.c | 65 ++++++++++++++++++++++++-------------------------- 1 file changed, 31 insertions(+), 34 deletions(-) commit 6bdec41a0cbcbda35c9044915fc8f45503a595a0 Author: Thomas Gleixner Date: Sun Jun 23 15:23:50 2019 +0200 x86/hpet: Shuffle code around for readability sake It doesn't make sense to have init functions in the middle of other code. Aside of that, further changes in that area create horrible diffs if the code stays where it is. No functional change Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Ricardo Neri Cc: Ashok Raj Cc: Andi Kleen Cc: Suravee Suthikulpanit Cc: Stephane Eranian Cc: Ravi Shankar Link: https://lkml.kernel.org/r/20190623132434.951733064@linutronix.de arch/x86/kernel/hpet.c | 81 +++++++++++++++++++++++++------------------------- 1 file changed, 41 insertions(+), 40 deletions(-) commit 8c273f2c81f0756f65b24771196c0eff7ac90e7b Author: Thomas Gleixner Date: Sun Jun 23 15:23:49 2019 +0200 x86/hpet: Move static and global variables to one place Having static and global variables sprinkled all over the code is just annoying to read. Move them all to the top of the file. Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Ricardo Neri Cc: Ashok Raj Cc: Andi Kleen Cc: Suravee Suthikulpanit Cc: Stephane Eranian Cc: Ravi Shankar Link: https://lkml.kernel.org/r/20190623132434.860549134@linutronix.de arch/x86/kernel/hpet.c | 50 ++++++++++++++++++++++---------------------------- 1 file changed, 22 insertions(+), 28 deletions(-) commit 4ce78e2094fc2736f8ecd04ec85e5566acaed516 Author: Thomas Gleixner Date: Sun Jun 23 15:23:48 2019 +0200 x86/hpet: Sanitize stub functions Mark them inline and remove the pointless 'return;' statement. Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Ricardo Neri Cc: Ashok Raj Cc: Andi Kleen Cc: Suravee Suthikulpanit Cc: Stephane Eranian Cc: Ravi Shankar Link: https://lkml.kernel.org/r/20190623132434.754768274@linutronix.de arch/x86/kernel/hpet.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit 433526cc0502ff13d9b2fd63ba546a202dac0463 Author: Thomas Gleixner Date: Sun Jun 23 15:23:47 2019 +0200 x86/hpet: Mark init functions __init They are only called from init code. Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Ricardo Neri Cc: Ashok Raj Cc: Andi Kleen Cc: Suravee Suthikulpanit Cc: Stephane Eranian Cc: Ravi Shankar Link: https://lkml.kernel.org/r/20190623132434.645357869@linutronix.de arch/x86/kernel/hpet.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit eb8ec32c45a87efbc6683b771597084c4d904a17 Author: Thomas Gleixner Date: Sun Jun 23 15:23:46 2019 +0200 x86/hpet: Remove the unused hpet_msi_read() function No users. Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Ricardo Neri Cc: Ashok Raj Cc: Andi Kleen Cc: Suravee Suthikulpanit Cc: Stephane Eranian Cc: Ravi Shankar Link: https://lkml.kernel.org/r/20190623132434.553729327@linutronix.de arch/x86/include/asm/hpet.h | 1 - arch/x86/kernel/hpet.c | 7 ------- 2 files changed, 8 deletions(-) commit 853acaf064acf3aad6189b36de814bd381d35133 Author: Thomas Gleixner Date: Sun Jun 23 15:23:45 2019 +0200 x86/hpet: Remove unused parameter from hpet_next_event() The clockevent device pointer is not used in this function. While at it, rename the misnamed 'timer' parameter to 'channel', which makes it clear what this parameter means. No functional change. Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Ricardo Neri Cc: Ashok Raj Cc: Andi Kleen Cc: Suravee Suthikulpanit Cc: Stephane Eranian Cc: Ravi Shankar Link: https://lkml.kernel.org/r/20190623132434.447880978@linutronix.de arch/x86/kernel/hpet.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 7c4b0e0898ebff4d4821d5dd7a564903a1e88821 Author: Thomas Gleixner Date: Sun Jun 23 15:23:44 2019 +0200 x86/hpet: Remove pointless x86-64 specific #include Nothing requires asm/pgtable.h here anymore. Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Ricardo Neri Cc: Ashok Raj Cc: Andi Kleen Cc: Suravee Suthikulpanit Cc: Stephane Eranian Cc: Ravi Shankar Link: https://lkml.kernel.org/r/20190623132434.339011567@linutronix.de arch/x86/kernel/hpet.c | 4 ---- 1 file changed, 4 deletions(-) commit 9b0b28de837a3a59b409613d15e90d5569938945 Author: Thomas Gleixner Date: Sun Jun 23 15:23:43 2019 +0200 x86/hpet: Restructure init code As a preparatory change for further consolidation, restructure the HPET init code so it becomes more readable. Fix up misleading and stale comments and rename variables so they actually make sense. No intended functional change. Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Ricardo Neri Cc: Ashok Raj Cc: Andi Kleen Cc: Suravee Suthikulpanit Cc: Stephane Eranian Cc: Ravi Shankar Link: https://lkml.kernel.org/r/20190623132434.247842972@linutronix.de arch/x86/kernel/hpet.c | 81 +++++++++++++++++++++++++++----------------------- 1 file changed, 43 insertions(+), 38 deletions(-) commit 46e5b64fdeb49e6f95b875fa4702cedf6c37188d Author: Thomas Gleixner Date: Sun Jun 23 15:23:42 2019 +0200 x86/hpet: Replace printk(KERN...) with pr_...() And sanitize the format strings while at it. Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Ricardo Neri Cc: Ashok Raj Cc: Andi Kleen Cc: Suravee Suthikulpanit Cc: Stephane Eranian Cc: Ravi Shankar Link: https://lkml.kernel.org/r/20190623132434.140411339@linutronix.de arch/x86/kernel/hpet.c | 45 +++++++++++++++++++-------------------------- 1 file changed, 19 insertions(+), 26 deletions(-) commit 36b9017f0250a5299bb715b3b8c41b5e2b05b320 Author: Thomas Gleixner Date: Sun Jun 23 15:23:41 2019 +0200 x86/hpet: Simplify CPU online code The indirection via work scheduled on the upcoming CPU was necessary with the old hotplug code because the online callback was invoked on the control CPU not on the upcoming CPU. The rework of the CPU hotplug core guarantees that the online callbacks are invoked on the upcoming CPU. Remove the now pointless work redirection. Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Cc: Peter Zijlstra Cc: Ricardo Neri Cc: Ashok Raj Cc: Andi Kleen Cc: Suravee Suthikulpanit Cc: Stephane Eranian Cc: Ravi Shankar Link: https://lkml.kernel.org/r/20190623132434.047254075@linutronix.de arch/x86/kernel/hpet.c | 31 ++----------------------------- 1 file changed, 2 insertions(+), 29 deletions(-) commit 2ec1899e99b4959bd2a46fd3993220e4f1a5397f Merge: 3b1c667e47e4 f6d08d9d8543 Author: Alexei Starovoitov Date: Thu Jun 27 15:25:17 2019 -0700 Merge branch 'bpf-sockopt-hooks' Stanislav Fomichev says: ==================== This series implements two new per-cgroup hooks: getsockopt and setsockopt along with a new sockopt program type. The idea is pretty similar to recently introduced cgroup sysctl hooks, but implementation is simpler (no need to convert to/from strings). What this can be applied to: * move business logic of what tos/priority/etc can be set by containers (either pass or reject) * handle existing options (or introduce new ones) differently by propagating some information in cgroup/socket local storage Compared to a simple syscall/{g,s}etsockopt tracepoint, those hooks are context aware. Meaning, they can access underlying socket and use cgroup and socket local storage. v9: * allow overwriting setsocktop arguments (Alexei Starovoitov) (see individual changes for more changelog details) ==================== Signed-off-by: Alexei Starovoitov commit f6d08d9d8543c8ee494b307804b28e2750ffedb9 Author: Stanislav Fomichev Date: Thu Jun 27 13:38:55 2019 -0700 bpftool: support cgroup sockopt Support sockopt prog type and cgroup hooks in the bpftool. Cc: Andrii Nakryiko Cc: Martin Lau Acked-by: Jakub Kicinski Signed-off-by: Stanislav Fomichev Signed-off-by: Alexei Starovoitov tools/bpf/bpftool/Documentation/bpftool-cgroup.rst | 7 +++++-- tools/bpf/bpftool/Documentation/bpftool-prog.rst | 3 ++- tools/bpf/bpftool/bash-completion/bpftool | 9 ++++++--- tools/bpf/bpftool/cgroup.c | 5 ++++- tools/bpf/bpftool/main.h | 1 + tools/bpf/bpftool/prog.c | 3 ++- 6 files changed, 20 insertions(+), 8 deletions(-) commit 0c51b3697a446e904e9e9fb70bbd7d08606a329a Author: Stanislav Fomichev Date: Thu Jun 27 13:38:54 2019 -0700 bpf: add sockopt documentation Provide user documentation about sockopt prog type and cgroup hooks. v9: * add details about setsockopt context and inheritance v7: * add description for retval=0 and optlen=-1 v6: * describe cgroup chaining, add example v2: * use return code 2 for kernel bypass Cc: Andrii Nakryiko Cc: Martin Lau Signed-off-by: Stanislav Fomichev Signed-off-by: Alexei Starovoitov Documentation/bpf/index.rst | 1 + Documentation/bpf/prog_cgroup_sockopt.rst | 93 +++++++++++++++++++++++++++++++ 2 files changed, 94 insertions(+) commit 65b4414a05ebf51966c4a28a2a1b156ab5a01b0f Author: Stanislav Fomichev Date: Thu Jun 27 13:38:53 2019 -0700 selftests/bpf: add sockopt test that exercises BPF_F_ALLOW_MULTI sockopt test that verifies chaining behavior. v9: * setsockopt chaining example v7: * rework the test to verify cgroup getsockopt chaining Cc: Andrii Nakryiko Cc: Martin Lau Signed-off-by: Stanislav Fomichev Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/.gitignore | 1 + tools/testing/selftests/bpf/Makefile | 4 +- tools/testing/selftests/bpf/progs/sockopt_multi.c | 71 ++++ tools/testing/selftests/bpf/test_sockopt_multi.c | 374 ++++++++++++++++++++++ 4 files changed, 449 insertions(+), 1 deletion(-) commit 8a027dc0d8f5d421eba953a7116aea991459b202 Author: Stanislav Fomichev Date: Thu Jun 27 13:38:52 2019 -0700 selftests/bpf: add sockopt test that exercises sk helpers socktop test that introduces new SOL_CUSTOM sockopt level and stores whatever users sets in sk storage. Whenever getsockopt is called, the original value is retrieved. v9: * SO_SNDBUF example to override user-supplied buffer v7: * use retval=0 and optlen-1 v6: * test 'ret=1' use-case as well (Alexei Starovoitov) v4: * don't call bpf_sk_fullsock helper v3: * drop (__u8 *)(long) casts for optval{,_end} v2: * new test Cc: Andrii Nakryiko Cc: Martin Lau Signed-off-by: Stanislav Fomichev Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/.gitignore | 1 + tools/testing/selftests/bpf/Makefile | 3 +- tools/testing/selftests/bpf/progs/sockopt_sk.c | 111 +++++++++++++ tools/testing/selftests/bpf/test_sockopt_sk.c | 214 +++++++++++++++++++++++++ 4 files changed, 328 insertions(+), 1 deletion(-) commit 9ec8a4c9489dc6fac324f8adb76fc182be119389 Author: Stanislav Fomichev Date: Thu Jun 27 13:38:51 2019 -0700 selftests/bpf: add sockopt test Add sockopt selftests: * require proper expected_attach_type * enforce context field read/write access * test bpf_sockopt_handled handler * test EPERM * test limiting optlen from getsockopt * test out-of-bounds access v9: * add tests for setsockopt argument mangling v7: * remove return 2; test retval=0 and optlen=-1 v3: * use DW for optval{,_end} loads v2: * use return code 2 for kernel bypass Cc: Andrii Nakryiko Cc: Martin Lau Signed-off-by: Stanislav Fomichev Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/.gitignore | 1 + tools/testing/selftests/bpf/Makefile | 3 +- tools/testing/selftests/bpf/test_sockopt.c | 1021 ++++++++++++++++++++++++++++ 3 files changed, 1024 insertions(+), 1 deletion(-) commit 47ac90bbce5b9f7c1c600a4c81fcfd78cb674798 Author: Stanislav Fomichev Date: Thu Jun 27 13:38:50 2019 -0700 selftests/bpf: test sockopt section name Add tests that make sure libbpf section detection works. Cc: Andrii Nakryiko Cc: Martin Lau Signed-off-by: Stanislav Fomichev Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/test_section_names.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 4cdbfb59c44a0df58ab321e4ddd9710cd0823584 Author: Stanislav Fomichev Date: Thu Jun 27 13:38:49 2019 -0700 libbpf: support sockopt hooks Make libbpf aware of new sockopt hooks so it can derive prog type and hook point from the section names. Cc: Andrii Nakryiko Cc: Martin Lau Signed-off-by: Stanislav Fomichev Signed-off-by: Alexei Starovoitov tools/lib/bpf/libbpf.c | 5 +++++ tools/lib/bpf/libbpf_probes.c | 1 + 2 files changed, 6 insertions(+) commit aa6ab6471e525ce6842e95a565f10b56fd6b4d5c Author: Stanislav Fomichev Date: Thu Jun 27 13:38:48 2019 -0700 bpf: sync bpf.h to tools/ Export new prog type and hook points to the libbpf. Cc: Andrii Nakryiko Cc: Martin Lau Signed-off-by: Stanislav Fomichev Signed-off-by: Alexei Starovoitov tools/include/uapi/linux/bpf.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 0d01da6afc5402f60325c5da31b22f7d56689b49 Author: Stanislav Fomichev Date: Thu Jun 27 13:38:47 2019 -0700 bpf: implement getsockopt and setsockopt hooks Implement new BPF_PROG_TYPE_CGROUP_SOCKOPT program type and BPF_CGROUP_{G,S}ETSOCKOPT cgroup hooks. BPF_CGROUP_SETSOCKOPT can modify user setsockopt arguments before passing them down to the kernel or bypass kernel completely. BPF_CGROUP_GETSOCKOPT can can inspect/modify getsockopt arguments that kernel returns. Both hooks reuse existing PTR_TO_PACKET{,_END} infrastructure. The buffer memory is pre-allocated (because I don't think there is a precedent for working with __user memory from bpf). This might be slow to do for each {s,g}etsockopt call, that's why I've added __cgroup_bpf_prog_array_is_empty that exits early if there is nothing attached to a cgroup. Note, however, that there is a race between __cgroup_bpf_prog_array_is_empty and BPF_PROG_RUN_ARRAY where cgroup program layout might have changed; this should not be a problem because in general there is a race between multiple calls to {s,g}etsocktop and user adding/removing bpf progs from a cgroup. The return code of the BPF program is handled as follows: * 0: EPERM * 1: success, continue with next BPF program in the cgroup chain v9: * allow overwriting setsockopt arguments (Alexei Starovoitov): * use set_fs (same as kernel_setsockopt) * buffer is always kzalloc'd (no small on-stack buffer) v8: * use s32 for optlen (Andrii Nakryiko) v7: * return only 0 or 1 (Alexei Starovoitov) * always run all progs (Alexei Starovoitov) * use optval=0 as kernel bypass in setsockopt (Alexei Starovoitov) (decided to use optval=-1 instead, optval=0 might be a valid input) * call getsockopt hook after kernel handlers (Alexei Starovoitov) v6: * rework cgroup chaining; stop as soon as bpf program returns 0 or 2; see patch with the documentation for the details * drop Andrii's and Martin's Acked-by (not sure they are comfortable with the new state of things) v5: * skip copy_to_user() and put_user() when ret == 0 (Martin Lau) v4: * don't export bpf_sk_fullsock helper (Martin Lau) * size != sizeof(__u64) for uapi pointers (Martin Lau) * offsetof instead of bpf_ctx_range when checking ctx access (Martin Lau) v3: * typos in BPF_PROG_CGROUP_SOCKOPT_RUN_ARRAY comments (Andrii Nakryiko) * reverse christmas tree in BPF_PROG_CGROUP_SOCKOPT_RUN_ARRAY (Andrii Nakryiko) * use __bpf_md_ptr instead of __u32 for optval{,_end} (Martin Lau) * use BPF_FIELD_SIZEOF() for consistency (Martin Lau) * new CG_SOCKOPT_ACCESS macro to wrap repeated parts v2: * moved bpf_sockopt_kern fields around to remove a hole (Martin Lau) * aligned bpf_sockopt_kern->buf to 8 bytes (Martin Lau) * bpf_prog_array_is_empty instead of bpf_prog_array_length (Martin Lau) * added [0,2] return code check to verifier (Martin Lau) * dropped unused buf[64] from the stack (Martin Lau) * use PTR_TO_SOCKET for bpf_sockopt->sk (Martin Lau) * dropped bpf_target_off from ctx rewrites (Martin Lau) * use return code for kernel bypass (Martin Lau & Andrii Nakryiko) Cc: Andrii Nakryiko Cc: Martin Lau Signed-off-by: Stanislav Fomichev Signed-off-by: Alexei Starovoitov include/linux/bpf-cgroup.h | 45 ++++++ include/linux/bpf.h | 2 + include/linux/bpf_types.h | 1 + include/linux/filter.h | 10 ++ include/uapi/linux/bpf.h | 14 ++ kernel/bpf/cgroup.c | 333 +++++++++++++++++++++++++++++++++++++++++++++ kernel/bpf/core.c | 9 ++ kernel/bpf/syscall.c | 19 +++ kernel/bpf/verifier.c | 8 ++ net/core/filter.c | 2 +- net/socket.c | 30 ++++ 11 files changed, 472 insertions(+), 1 deletion(-) commit c974c48deeb969c5e4250e4f06af91edd84b1f10 Author: Chunyan Zhang Date: Wed May 22 09:15:03 2019 +0800 clk: sprd: Add check for return value of sprd_clk_regmap_init() sprd_clk_regmap_init() doesn't always return success, adding check for its return value should make the code more strong. Signed-off-by: Chunyan Zhang Reviewed-by: Baolin Wang [sboyd@kernel.org: Add a missing int ret] Signed-off-by: Stephen Boyd drivers/clk/sprd/sc9860-clk.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 7f0a5e0755832301e7b010eab46fb715c483ba60 Author: Andy Lutomirski Date: Wed Jun 26 21:45:09 2019 -0700 selftests/x86: Add a test for process_vm_readv() on the vsyscall page get_gate_page() is a piece of somewhat alarming code to make get_user_pages() work on the vsyscall page. Test it via process_vm_readv(). Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Reviewed-by: Kees Cook Cc: Florian Weimer Cc: Jann Horn Cc: Borislav Petkov Cc: Kernel Hardening Cc: Peter Zijlstra Link: https://lkml.kernel.org/r/0fe34229a9330e8f9de9765967939cc4f1cf26b1.1561610354.git.luto@kernel.org tools/testing/selftests/x86/test_vsyscall.c | 35 +++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit 441cedab2dfca18fe4983cbc795de04536ed421e Author: Andy Lutomirski Date: Wed Jun 26 21:45:08 2019 -0700 x86/vsyscall: Add __ro_after_init to global variables The vDSO is only configurable by command-line options, so make its global variables __ro_after_init. This seems highly unlikely to ever stop an exploit, but it's nicer anyway. Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Reviewed-by: Kees Cook Cc: Florian Weimer Cc: Jann Horn Cc: Borislav Petkov Cc: Kernel Hardening Cc: Peter Zijlstra Link: https://lkml.kernel.org/r/a386925835e49d319e70c4d7404b1f6c3c2e3702.1561610354.git.luto@kernel.org arch/x86/entry/vsyscall/vsyscall_64.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 625b7b7f79c66626fb2b7687fc1a58309a57edd5 Author: Andy Lutomirski Date: Wed Jun 26 21:45:07 2019 -0700 x86/vsyscall: Change the default vsyscall mode to xonly The use case for full emulation over xonly is very esoteric, e.g. magic instrumentation tools. Change the default to the safer xonly mode. Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Reviewed-by: Kees Cook Cc: Florian Weimer Cc: Jann Horn Cc: Borislav Petkov Cc: Kernel Hardening Cc: Peter Zijlstra Link: https://lkml.kernel.org/r/30539f8072d2376b9c9efcc07e6ed0d6bf20e882.1561610354.git.luto@kernel.org arch/x86/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b0386979867168575118501104f3d135067eab4f Author: Andy Lutomirski Date: Wed Jun 26 21:45:06 2019 -0700 selftests/x86/vsyscall: Verify that vsyscall=none blocks execution If vsyscall=none accidentally still allowed vsyscalls, the test wouldn't fail. Fix it. Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Reviewed-by: Kees Cook Cc: Florian Weimer Cc: Jann Horn Cc: Borislav Petkov Cc: Kernel Hardening Cc: Peter Zijlstra Link: https://lkml.kernel.org/r/b413397c804265f8865f3e70b14b09485ea7c314.1561610354.git.luto@kernel.org tools/testing/selftests/x86/test_vsyscall.c | 76 ++++++++++++++++++++--------- 1 file changed, 52 insertions(+), 24 deletions(-) commit e0a446ce394a7915f2ffc03f9bb610c5ac4dbbf1 Author: Andy Lutomirski Date: Wed Jun 26 21:45:05 2019 -0700 x86/vsyscall: Document odd SIGSEGV error code for vsyscalls Even if vsyscall=none, user page faults on the vsyscall page are reported as though the PROT bit in the error code was set. Add a comment explaining why this is probably okay and display the value in the test case. While at it, explain why the behavior is correct with respect to PKRU. Modify also the selftest to print the odd error code so that there is a way to demonstrate the odd behaviour. If anyone really cares about more accurate emulation, the behaviour could be changed. But that needs a real good justification. Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Reviewed-by: Kees Cook Cc: Florian Weimer Cc: Jann Horn Cc: Borislav Petkov Cc: Kernel Hardening Cc: Peter Zijlstra Link: https://lkml.kernel.org/r/75c91855fd850649ace162eec5495a1354221aaa.1561610354.git.luto@kernel.org arch/x86/mm/fault.c | 7 +++++++ tools/testing/selftests/x86/test_vsyscall.c | 9 ++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) commit 918ce325098a4eef99daad7b6796da33cebaf03a Author: Andy Lutomirski Date: Wed Jun 26 21:45:04 2019 -0700 x86/vsyscall: Show something useful on a read fault Just segfaulting the application when it tries to read the vsyscall page in xonly mode is not helpful for those who need to debug it. Emit a hint. Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Reviewed-by: Kees Cook Cc: Florian Weimer Cc: Jann Horn Link: https://lkml.kernel.org/r/8016afffe0eab497be32017ad7f6f7030dc3ba66.1561610354.git.luto@kernel.org arch/x86/entry/vsyscall/vsyscall_64.c | 19 ++++++++++++++++++- arch/x86/include/asm/vsyscall.h | 6 ++++-- arch/x86/mm/fault.c | 11 +++++------ 3 files changed, 27 insertions(+), 9 deletions(-) commit bd49e16e3339f052fae05fb3e955c5db0c9c6445 Author: Andy Lutomirski Date: Wed Jun 26 21:45:03 2019 -0700 x86/vsyscall: Add a new vsyscall=xonly mode With vsyscall emulation on, a readable vsyscall page is still exposed that contains syscall instructions that validly implement the vsyscalls. This is required because certain dynamic binary instrumentation tools attempt to read the call targets of call instructions in the instrumented code. If the instrumented code uses vsyscalls, then the vsyscall page needs to contain readable code. Unfortunately, leaving readable memory at a deterministic address can be used to help various ASLR bypasses, so some hardening value can be gained by disallowing vsyscall reads. Given how rarely the vsyscall page needs to be readable, add a mechanism to make the vsyscall page be execute only. Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Reviewed-by: Kees Cook Cc: Florian Weimer Cc: Jann Horn Cc: Borislav Petkov Cc: Kernel Hardening Cc: Peter Zijlstra Link: https://lkml.kernel.org/r/d17655777c21bc09a7af1bbcf74e6f2b69a51152.1561610354.git.luto@kernel.org Documentation/admin-guide/kernel-parameters.txt | 7 +++++- arch/x86/Kconfig | 33 ++++++++++++++++++------- arch/x86/entry/vsyscall/vsyscall_64.c | 16 ++++++++++-- 3 files changed, 44 insertions(+), 12 deletions(-) commit d974ffcfb7447db5f29a4b662a3eaf99a4e1109e Author: Andy Lutomirski Date: Wed Jun 26 21:45:02 2019 -0700 Documentation/admin: Remove the vsyscall=native documentation The vsyscall=native feature is gone -- remove the docs. Fixes: 076ca272a14c ("x86/vsyscall/64: Drop "native" vsyscalls") Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Acked-by: Kees Cook Cc: Florian Weimer Cc: Jann Horn Cc: stable@vger.kernel.org Cc: Borislav Petkov Cc: Kernel Hardening Cc: Peter Zijlstra Link: https://lkml.kernel.org/r/d77c7105eb4c57c1a95a95b6a5b8ba194a18e764.1561610354.git.luto@kernel.org Documentation/admin-guide/kernel-parameters.txt | 6 ------ 1 file changed, 6 deletions(-) commit 2e12256b9a76584fa3a6da19210509d4775aee36 Author: David Howells Date: Thu Jun 27 23:03:07 2019 +0100 keys: Replace uid/gid/perm permissions checking with an ACL Replace the uid/gid/perm permissions checking on a key with an ACL to allow the SETATTR and SEARCH permissions to be split. This will also allow a greater range of subjects to represented. ============ WHY DO THIS? ============ The problem is that SETATTR and SEARCH cover a slew of actions, not all of which should be grouped together. For SETATTR, this includes actions that are about controlling access to a key: (1) Changing a key's ownership. (2) Changing a key's security information. (3) Setting a keyring's restriction. And actions that are about managing a key's lifetime: (4) Setting an expiry time. (5) Revoking a key. and (proposed) managing a key as part of a cache: (6) Invalidating a key. Managing a key's lifetime doesn't really have anything to do with controlling access to that key. Expiry time is awkward since it's more about the lifetime of the content and so, in some ways goes better with WRITE permission. It can, however, be set unconditionally by a process with an appropriate authorisation token for instantiating a key, and can also be set by the key type driver when a key is instantiated, so lumping it with the access-controlling actions is probably okay. As for SEARCH permission, that currently covers: (1) Finding keys in a keyring tree during a search. (2) Permitting keyrings to be joined. (3) Invalidation. But these don't really belong together either, since these actions really need to be controlled separately. Finally, there are number of special cases to do with granting the administrator special rights to invalidate or clear keys that I would like to handle with the ACL rather than key flags and special checks. =============== WHAT IS CHANGED =============== The SETATTR permission is split to create two new permissions: (1) SET_SECURITY - which allows the key's owner, group and ACL to be changed and a restriction to be placed on a keyring. (2) REVOKE - which allows a key to be revoked. The SEARCH permission is split to create: (1) SEARCH - which allows a keyring to be search and a key to be found. (2) JOIN - which allows a keyring to be joined as a session keyring. (3) INVAL - which allows a key to be invalidated. The WRITE permission is also split to create: (1) WRITE - which allows a key's content to be altered and links to be added, removed and replaced in a keyring. (2) CLEAR - which allows a keyring to be cleared completely. This is split out to make it possible to give just this to an administrator. (3) REVOKE - see above. Keys acquire ACLs which consist of a series of ACEs, and all that apply are unioned together. An ACE specifies a subject, such as: (*) Possessor - permitted to anyone who 'possesses' a key (*) Owner - permitted to the key owner (*) Group - permitted to the key group (*) Everyone - permitted to everyone Note that 'Other' has been replaced with 'Everyone' on the assumption that you wouldn't grant a permit to 'Other' that you wouldn't also grant to everyone else. Further subjects may be made available by later patches. The ACE also specifies a permissions mask. The set of permissions is now: VIEW Can view the key metadata READ Can read the key content WRITE Can update/modify the key content SEARCH Can find the key by searching/requesting LINK Can make a link to the key SET_SECURITY Can change owner, ACL, expiry INVAL Can invalidate REVOKE Can revoke JOIN Can join this keyring CLEAR Can clear this keyring The KEYCTL_SETPERM function is then deprecated. The KEYCTL_SET_TIMEOUT function then is permitted if SET_SECURITY is set, or if the caller has a valid instantiation auth token. The KEYCTL_INVALIDATE function then requires INVAL. The KEYCTL_REVOKE function then requires REVOKE. The KEYCTL_JOIN_SESSION_KEYRING function then requires JOIN to join an existing keyring. The JOIN permission is enabled by default for session keyrings and manually created keyrings only. ====================== BACKWARD COMPATIBILITY ====================== To maintain backward compatibility, KEYCTL_SETPERM will translate the permissions mask it is given into a new ACL for a key - unless KEYCTL_SET_ACL has been called on that key, in which case an error will be returned. It will convert possessor, owner, group and other permissions into separate ACEs, if each portion of the mask is non-zero. SETATTR permission turns on all of INVAL, REVOKE and SET_SECURITY. WRITE permission turns on WRITE, REVOKE and, if a keyring, CLEAR. JOIN is turned on if a keyring is being altered. The KEYCTL_DESCRIBE function translates the ACL back into a permissions mask to return depending on possessor, owner, group and everyone ACEs. It will make the following mappings: (1) INVAL, JOIN -> SEARCH (2) SET_SECURITY -> SETATTR (3) REVOKE -> WRITE if SETATTR isn't already set (4) CLEAR -> WRITE Note that the value subsequently returned by KEYCTL_DESCRIBE may not match the value set with KEYCTL_SETATTR. ======= TESTING ======= This passes the keyutils testsuite for all but a couple of tests: (1) tests/keyctl/dh_compute/badargs: The first wrong-key-type test now returns EOPNOTSUPP rather than ENOKEY as READ permission isn't removed if the type doesn't have ->read(). You still can't actually read the key. (2) tests/keyctl/permitting/valid: The view-other-permissions test doesn't work as Other has been replaced with Everyone in the ACL. Signed-off-by: David Howells Documentation/security/keys/core.rst | 128 ++++++++--- Documentation/security/keys/request-key.rst | 9 +- certs/blacklist.c | 7 +- certs/system_keyring.c | 12 +- drivers/md/dm-crypt.c | 2 +- drivers/nvdimm/security.c | 2 +- fs/afs/security.c | 2 +- fs/cifs/cifs_spnego.c | 25 ++- fs/cifs/cifsacl.c | 28 ++- fs/cifs/connect.c | 4 +- fs/crypto/keyinfo.c | 2 +- fs/ecryptfs/ecryptfs_kernel.h | 2 +- fs/ecryptfs/keystore.c | 2 +- fs/fscache/object-list.c | 2 +- fs/nfs/nfs4idmap.c | 30 ++- fs/ubifs/auth.c | 2 +- include/linux/key.h | 121 ++++++----- include/uapi/linux/keyctl.h | 63 ++++++ lib/digsig.c | 2 +- net/ceph/ceph_common.c | 2 +- net/dns_resolver/dns_key.c | 12 +- net/dns_resolver/dns_query.c | 15 +- net/rxrpc/key.c | 19 +- net/wireless/reg.c | 6 +- security/integrity/digsig.c | 31 ++- security/integrity/digsig_asymmetric.c | 2 +- security/integrity/evm/evm_crypto.c | 2 +- security/integrity/ima/ima_mok.c | 13 +- security/integrity/integrity.h | 6 +- .../integrity/platform_certs/platform_keyring.c | 14 +- security/keys/encrypted-keys/encrypted.c | 2 +- security/keys/encrypted-keys/masterkey_trusted.c | 2 +- security/keys/gc.c | 2 +- security/keys/internal.h | 11 +- security/keys/key.c | 29 +-- security/keys/keyctl.c | 96 +++++--- security/keys/keyring.c | 27 ++- security/keys/permission.c | 242 ++++++++++++++++++--- security/keys/persistent.c | 27 ++- security/keys/proc.c | 22 +- security/keys/process_keys.c | 86 ++++++-- security/keys/request_key.c | 34 ++- security/keys/request_key_auth.c | 15 +- security/selinux/hooks.c | 16 +- security/smack/smack_lsm.c | 3 +- 45 files changed, 857 insertions(+), 324 deletions(-) commit a58946c158a040068e7c94dc1d58bbd273258068 Author: David Howells Date: Wed Jun 26 21:02:33 2019 +0100 keys: Pass the network namespace into request_key mechanism Create a request_key_net() function and use it to pass the network namespace domain tag into DNS revolver keys and rxrpc/AFS keys so that keys for different domains can coexist in the same keyring. Signed-off-by: David Howells cc: netdev@vger.kernel.org cc: linux-nfs@vger.kernel.org cc: linux-cifs@vger.kernel.org cc: linux-afs@lists.infradead.org Documentation/security/keys/core.rst | 28 +++++++++++++---- Documentation/security/keys/request-key.rst | 29 +++++++++++++----- fs/afs/addr_list.c | 4 +-- fs/afs/dynroot.c | 8 +++-- fs/cifs/dns_resolve.c | 3 +- fs/nfs/dns_resolve.c | 3 +- fs/nfs/nfs4idmap.c | 2 +- include/linux/dns_resolver.h | 3 +- include/linux/key.h | 47 ++++++++++++++++++++++++++--- net/ceph/messenger.c | 3 +- net/dns_resolver/dns_query.c | 7 +++-- net/rxrpc/key.c | 4 +-- security/keys/internal.h | 1 + security/keys/keyctl.c | 2 +- security/keys/keyring.c | 11 ++++--- security/keys/request_key.c | 39 ++++++++++++++++-------- 16 files changed, 145 insertions(+), 49 deletions(-) commit 993773d11d45c90cb1c6481c2638c3d9f092ea5b Author: Dianzhang Chen Date: Wed Jun 26 12:50:30 2019 +0800 x86/tls: Fix possible spectre-v1 in do_get_thread_area() The index to access the threads tls array is controlled by userspace via syscall: sys_ptrace(), hence leading to a potential exploitation of the Spectre variant 1 vulnerability. The index can be controlled from: ptrace -> arch_ptrace -> do_get_thread_area. Fix this by sanitizing the user supplied index before using it to access the p->thread.tls_array. Signed-off-by: Dianzhang Chen Signed-off-by: Thomas Gleixner Cc: bp@alien8.de Cc: hpa@zytor.com Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/1561524630-3642-1-git-send-email-dianzhangchen0@gmail.com arch/x86/kernel/tls.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 31a2fbb390fee4231281b939e1979e810f945415 Author: Dianzhang Chen Date: Tue Jun 25 23:30:17 2019 +0800 x86/ptrace: Fix possible spectre-v1 in ptrace_get_debugreg() The index to access the threads ptrace_bps is controlled by userspace via syscall: sys_ptrace(), hence leading to a potential exploitation of the Spectre variant 1 vulnerability. The index can be controlled from: ptrace -> arch_ptrace -> ptrace_get_debugreg. Fix this by sanitizing the user supplied index before using it access thread->ptrace_bps. Signed-off-by: Dianzhang Chen Signed-off-by: Thomas Gleixner Cc: bp@alien8.de Cc: hpa@zytor.com Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/1561476617-3759-1-git-send-email-dianzhangchen0@gmail.com arch/x86/kernel/ptrace.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 516337048fa40496ae5ca9863c367ec991a44d9a Author: Mauro Carvalho Chehab Date: Mon Jun 24 07:33:26 2019 -0300 hrtimer: Use a bullet for the returns bullet list That gets rid of this warning: ./kernel/time/hrtimer.c:1119: WARNING: Block quote ends without a blank line; unexpected unindent. and displays nicely both at the source code and at the produced documentation. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Thomas Gleixner Cc: Linux Doc Mailing List Cc: Mauro Carvalho Chehab Cc: Jonathan Corbet Link: https://lkml.kernel.org/r/74ddad7dac331b4e5ce4a90e15c8a49e3a16d2ac.1561372382.git.mchehab+samsung@kernel.org kernel/time/hrtimer.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit f9d3fb22ab27aaee8748480fe3fa8cc17875ee30 Author: Charles Keepax Date: Thu Jun 27 09:55:17 2019 +0100 clk: lochnagar: Update DT binding doc to include the primary SPDIF MCLK This clock was missed when the binding was initially merged but is supported by the driver, so add it to the binding document. Signed-off-by: Charles Keepax Signed-off-by: Stephen Boyd Documentation/devicetree/bindings/clock/cirrus,lochnagar.txt | 1 + 1 file changed, 1 insertion(+) commit be69d00d9769575e35d83367f465a58dbf82748c Author: Thomas Gleixner Date: Wed Jun 26 16:52:38 2019 +0200 workqueue: Remove GPF argument from alloc_workqueue_attrs() All callers use GFP_KERNEL. No point in having that argument. Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Tejun Heo kernel/workqueue.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) commit 2c9858ecbeb1e68224290043445990e29337d4c0 Author: Thomas Gleixner Date: Wed Jun 26 16:52:37 2019 +0200 workqueue: Make alloc/apply/free_workqueue_attrs() static None of those functions have any users outside of workqueue.c. Confine them. Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Tejun Heo include/linux/workqueue.h | 4 ---- kernel/workqueue.c | 7 +++---- 2 files changed, 3 insertions(+), 8 deletions(-) commit 3044a860fd09f02f5609449d93d8ea6084215768 Author: Mike Looijmans Date: Fri May 17 15:23:52 2019 +0200 clk: Add Si5341/Si5340 driver Adds a driver for the Si5341 and Si5340 chips. The driver does not fully support all features of these chips, but allows the chip to be used without any support from the "clockbuilder pro" software. If the chip is preprogrammed, that is, you bought one with some defaults burned in, or you programmed the NVM in some way, the driver will just take over the current settings and only change them on demand. Otherwise the input must be a fixed XTAL in its most basic configuration (no predividers, no feedback, etc.). The driver supports dynamic changes of multisynth, output dividers and enabling or powering down outputs and multisynths. Signed-off-by: Mike Looijmans [sboyd@kernel.org: Mark some things static, use BIT_ULL for big bits and ULL for big constants] Signed-off-by: Stephen Boyd drivers/clk/Kconfig | 11 + drivers/clk/Makefile | 1 + drivers/clk/clk-si5341.c | 1346 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1358 insertions(+) commit d743ea67cb98f9cd727e7ff07a0da647b9544444 Author: Mike Looijmans Date: Fri May 17 15:20:20 2019 +0200 dt-bindings: clock: Add silabs,si5341 Adds the devicetree bindings for the Si5341 and Si5340 chips from Silicon Labs. These are multiple-input multiple-output clock synthesizers. Signed-off-by: Mike Looijmans Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd .../devicetree/bindings/clock/silabs,si5341.txt | 162 +++++++++++++++++++++ 1 file changed, 162 insertions(+) commit 3b1c667e47e4066cfe61610825ad50bc6b4a57e1 Merge: e5c891a349d7 db05815b36cb Author: Daniel Borkmann Date: Thu Jun 27 22:53:29 2019 +0200 Merge branch 'bpf-af-xdp-mlx5e' Tariq Toukan says: ==================== This series contains improvements to the AF_XDP kernel infrastructure and AF_XDP support in mlx5e. The infrastructure improvements are required for mlx5e, but also some of them benefit to all drivers, and some can be useful for other drivers that want to implement AF_XDP. The performance testing was performed on a machine with the following configuration: - 24 cores of Intel Xeon E5-2620 v3 @ 2.40 GHz - Mellanox ConnectX-5 Ex with 100 Gbit/s link The results with retpoline disabled, single stream: txonly: 33.3 Mpps (21.5 Mpps with queue and app pinned to the same CPU) rxdrop: 12.2 Mpps l2fwd: 9.4 Mpps The results with retpoline enabled, single stream: txonly: 21.3 Mpps (14.1 Mpps with queue and app pinned to the same CPU) rxdrop: 9.9 Mpps l2fwd: 6.8 Mpps v2 changes: Added patches for mlx5e and addressed the comments for v1. Rebased for bpf-next. v3 changes: Rebased for the newer bpf-next, resolved conflicts in libbpf. Addressed Björn's comments for coding style. Fixed a bug in error handling flow in mlx5e_open_xsk. v4 changes: UAPI is not changed, XSK RX queues are exposed to the kernel. The lower half of the available amount of RX queues are regular queues, and the upper half are XSK RX queues. The patch "xsk: Extend channels to support combined XSK/non-XSK traffic" was dropped. The final patch was reworked accordingly. Added "net/mlx5e: Attach/detach XDP program safely", as the changes introduced in the XSK patch base on the stuff from this one. Added "libbpf: Support drivers with non-combined channels", which aligns the condition in libbpf with the condition in the kernel. Rebased over the newer bpf-next. v5 changes: In v4, ethtool reports the number of channels as 'combined' and the number of XSK RX queues as 'rx' for mlx5e. It was changed, so that 'rx' is 0, and 'combined' reports the double amount of channels if there is an active UMEM - to make libbpf happy. The patch for libbpf was dropped. Although it's still useful and fixes things, it raises some disagreement, so I'm dropping it - it's no longer useful for mlx5e anymore after the change above. v6 changes: As Maxim is out of office, I rebased the series on behalf of him, solved some conflicts, and re-spinned. ==================== Acked-by: Björn Töpel Tested-by: Jonathan Lemon Signed-off-by: Daniel Borkmann commit db05815b36cbd486c86fd002dfa81c9af6245e25 Author: Maxim Mikityanskiy Date: Wed Jun 26 17:35:38 2019 +0300 net/mlx5e: Add XSK zero-copy support This commit adds support for AF_XDP zero-copy RX and TX. We create a dedicated XSK RQ inside the channel, it means that two RQs are running simultaneously: one for non-XSK traffic and the other for XSK traffic. The regular and XSK RQs use a single ID namespace split into two halves: the lower half is regular RQs, and the upper half is XSK RQs. When any zero-copy AF_XDP socket is active, changing the number of channels is not allowed, because it would break to mapping between XSK RQ IDs and channels. XSK requires different page allocation and release routines. Such functions as mlx5e_{alloc,free}_rx_mpwqe and mlx5e_{get,put}_rx_frag are generic enough to be used for both regular and XSK RQs, and they use the mlx5e_page_{alloc,release} wrappers around the real allocation functions. Function pointers are not used to avoid losing the performance with retpolines. Wherever it's certain that the regular (non-XSK) page release function should be used, it's called directly. Only the stats that could be meaningful for XSK are exposed to the userspace. Those that don't take part in the XSK flow are not considered. Note that we don't wait for WQEs on the XSK RQ (unlike the regular RQ), because the newer xdpsock sample doesn't provide any Fill Ring entries at the setup stage. We create a dedicated XSK SQ in the channel. This separation has its advantages: 1. When the UMEM is closed, the XSK SQ can also be closed and stop receiving completions. If an existing SQ was used for XSK, it would continue receiving completions for the packets of the closed socket. If a new UMEM was opened at that point, it would start getting completions that don't belong to it. 2. Calculating statistics separately. When the userspace kicks the TX, the driver triggers a hardware interrupt by posting a NOP to a dedicated XSK ICO (internal control operations) SQ, in order to trigger NAPI on the right CPU core. This XSK ICO SQ is protected by a spinlock, as the userspace application may kick the TX from any core. Store the pointers to the UMEMs in the net device private context, independently from the kernel. This way the driver can distinguish between the zero-copy and non-zero-copy UMEMs. The kernel function xdp_get_umem_from_qid does not care about this difference, but the driver is only interested in zero-copy UMEMs, particularly, on the cleanup it determines whether to close the XSK RQ and SQ or not by looking at the presence of the UMEM. Use state_lock to protect the access to this area of UMEM pointers. LRO isn't compatible with XDP, but there may be active UMEMs while XDP is off. If this is the case, don't allow LRO to ensure XDP can be reenabled at any time. The validation of XSK parameters typically happens when XSK queues open. However, when the interface is down or the XDP program isn't set, it's still possible to have active AF_XDP sockets and even to open new, but the XSK queues will be closed. To cover these cases, perform the validation also in these flows: 1. A new UMEM is registered, but the XSK queues aren't going to be created due to missing XDP program or interface being down. 2. MTU changes while there are UMEMs registered. Having this early check prevents mlx5e_open_channels from failing at a later stage, where recovery is impossible and the application has no chance to handle the error, because it got the successful return value for an MTU change or XSK open operation. The performance testing was performed on a machine with the following configuration: - 24 cores of Intel Xeon E5-2620 v3 @ 2.40 GHz - Mellanox ConnectX-5 Ex with 100 Gbit/s link The results with retpoline disabled, single stream: txonly: 33.3 Mpps (21.5 Mpps with queue and app pinned to the same CPU) rxdrop: 12.2 Mpps l2fwd: 9.4 Mpps The results with retpoline enabled, single stream: txonly: 21.3 Mpps (14.1 Mpps with queue and app pinned to the same CPU) rxdrop: 9.9 Mpps l2fwd: 6.8 Mpps Signed-off-by: Maxim Mikityanskiy Signed-off-by: Tariq Toukan Acked-by: Saeed Mahameed Signed-off-by: Daniel Borkmann drivers/net/ethernet/mellanox/mlx5/core/Makefile | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en.h | 98 +++- .../net/ethernet/mellanox/mlx5/core/en/params.c | 53 ++- .../net/ethernet/mellanox/mlx5/core/en/params.h | 77 ++- drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c | 103 +++- drivers/net/ethernet/mellanox/mlx5/core/en/xdp.h | 18 +- .../ethernet/mellanox/mlx5/core/en/xsk/Makefile | 1 + .../net/ethernet/mellanox/mlx5/core/en/xsk/rx.c | 192 ++++++++ .../net/ethernet/mellanox/mlx5/core/en/xsk/rx.h | 27 ++ .../net/ethernet/mellanox/mlx5/core/en/xsk/setup.c | 223 +++++++++ .../net/ethernet/mellanox/mlx5/core/en/xsk/setup.h | 25 + .../net/ethernet/mellanox/mlx5/core/en/xsk/tx.c | 111 +++++ .../net/ethernet/mellanox/mlx5/core/en/xsk/tx.h | 15 + .../net/ethernet/mellanox/mlx5/core/en/xsk/umem.c | 267 +++++++++++ .../net/ethernet/mellanox/mlx5/core/en/xsk/umem.h | 31 ++ .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 25 +- .../ethernet/mellanox/mlx5/core/en_fs_ethtool.c | 18 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 527 +++++++++++++++------ drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 12 +- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 77 ++- drivers/net/ethernet/mellanox/mlx5/core/en_stats.c | 115 ++++- drivers/net/ethernet/mellanox/mlx5/core/en_stats.h | 30 ++ drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c | 34 +- .../net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 14 +- 24 files changed, 1840 insertions(+), 255 deletions(-) commit 32a23653970ac2284e41258623448a5d0852f402 Author: Maxim Mikityanskiy Date: Wed Jun 26 17:35:37 2019 +0300 net/mlx5e: Move queue param structs to en/params.h structs mlx5e_{rq,sq,cq,channel}_param are going to be used in the upcoming XSK RX and TX patches. Move them to a header file to make them accessible from other C files. Signed-off-by: Maxim Mikityanskiy Signed-off-by: Tariq Toukan Acked-by: Saeed Mahameed Signed-off-by: Daniel Borkmann .../net/ethernet/mellanox/mlx5/core/en/params.h | 31 ++++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 29 -------------------- 2 files changed, 31 insertions(+), 29 deletions(-) commit 0a06382fa40601e750a9477e9cccffcb6cb4206c Author: Maxim Mikityanskiy Date: Wed Jun 26 17:35:36 2019 +0300 net/mlx5e: Encapsulate open/close queues into a function Create new functions mlx5e_{open,close}_queues to encapsulate opening and closing RQs and SQs, and call the new functions from mlx5e_{open,close}_channel. It simplifies the existing functions a bit and prepares them for the upcoming AF_XDP changes. Signed-off-by: Maxim Mikityanskiy Signed-off-by: Tariq Toukan Acked-by: Saeed Mahameed Signed-off-by: Daniel Borkmann drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 125 +++++++++++++--------- 1 file changed, 73 insertions(+), 52 deletions(-) commit a011b49f4ed7813777a15da12a426ab939c58f14 Author: Maxim Mikityanskiy Date: Wed Jun 26 17:35:35 2019 +0300 net/mlx5e: Consider XSK in XDP MTU limit calculation Use the existing mlx5e_get_linear_rq_headroom function to calculate the headroom for mlx5e_xdp_max_mtu. This function takes the XSK headroom into consideration, which will be used in the following patches. Signed-off-by: Maxim Mikityanskiy Signed-off-by: Tariq Toukan Acked-by: Saeed Mahameed Signed-off-by: Daniel Borkmann drivers/net/ethernet/mellanox/mlx5/core/en/params.c | 4 ++-- drivers/net/ethernet/mellanox/mlx5/core/en/params.h | 2 ++ drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c | 5 +++-- drivers/net/ethernet/mellanox/mlx5/core/en/xdp.h | 3 ++- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 4 ++-- 5 files changed, 11 insertions(+), 7 deletions(-) commit 84a0a2310d6de247335574649726cb000c7c0074 Author: Maxim Mikityanskiy Date: Wed Jun 26 17:35:34 2019 +0300 net/mlx5e: XDP_TX from UMEM support When an XDP program returns XDP_TX, and the RQ is XSK-enabled, it requires careful handling, because convert_to_xdp_frame creates a new page and copies the data there, while our driver expects the xdp_frame to point to the same memory as the xdp_buff. Handle this case separately: map the page, and in the end unmap it and call xdp_return_frame. Signed-off-by: Maxim Mikityanskiy Signed-off-by: Tariq Toukan Acked-by: Saeed Mahameed Signed-off-by: Daniel Borkmann drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c | 50 ++++++++++++++++++++---- 1 file changed, 42 insertions(+), 8 deletions(-) commit b9673cf5558c0ae1be787611884d4131633f31a8 Author: Maxim Mikityanskiy Date: Wed Jun 26 17:35:33 2019 +0300 net/mlx5e: Share the XDP SQ for XDP_TX between RQs Put the XDP SQ that is used for XDP_TX into the channel. It used to be a part of the RQ, but with introduction of AF_XDP there will be one more RQ that could share the same XDP SQ. This patch is a preparation for that change. Separate XDP_TX statistics per RQ were implemented in one of the previous patches. Signed-off-by: Maxim Mikityanskiy Signed-off-by: Tariq Toukan Acked-by: Saeed Mahameed Signed-off-by: Daniel Borkmann drivers/net/ethernet/mellanox/mlx5/core/en.h | 4 +++- drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c | 20 ++++++++--------- drivers/net/ethernet/mellanox/mlx5/core/en/xdp.h | 4 ++-- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 26 +++++++++++++---------- drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c | 4 ++-- 5 files changed, 32 insertions(+), 26 deletions(-) commit d963fa15113076f69d8a021de393ab4613620cd9 Author: Maxim Mikityanskiy Date: Wed Jun 26 17:35:32 2019 +0300 net/mlx5e: Refactor struct mlx5e_xdp_info Currently, struct mlx5e_xdp_info has some issues that have to be cleaned up before the upcoming AF_XDP support makes things too complicated and messy. This structure is used both when sending the packet and on completion. Moreover, the cleanup procedure on completion depends on the origin of the packet (XDP_REDIRECT, XDP_TX). Adding AF_XDP support will add new flows that use this structure even differently. To avoid overcomplicating the code, this commit refactors the usage of this structure in the following ways: 1. struct mlx5e_xdp_info is split into two different structures. One is struct mlx5e_xdp_xmit_data, a transient structure that doesn't need to be stored and is only used while sending the packet. The other is still struct mlx5e_xdp_info that is stored in a FIFO and contains the fields needed on completion. 2. The fields of struct mlx5e_xdp_info that are used in different flows are put into a union. A special enum indicates the cleanup mode and helps choose the right union member. This approach is clear and explicit. Although it could be possible to "guess" the mode by looking at the values of the fields and at the XDP SQ type, it wouldn't be that clear and extendable and would require looking through the whole chain to understand what's going on. For the reference, there are the fields of struct mlx5e_xdp_info that are used in different flows (including AF_XDP ones): Packet origin | Fields used on completion | Cleanup steps -----------------------+---------------------------+------------------ XDP_REDIRECT, | xdpf, dma_addr | DMA unmap and XDP_TX from XSK RQ | | xdp_return_frame. -----------------------+---------------------------+------------------ XDP_TX from regular RQ | di | Recycle page. -----------------------+---------------------------+------------------ AF_XDP TX | (none) | Increment the | | producer index in | | Completion Ring. On send, the same set of mlx5e_xdp_xmit_data fields is used in all flows: DMA and virtual addresses and length. Signed-off-by: Maxim Mikityanskiy Signed-off-by: Tariq Toukan Acked-by: Saeed Mahameed Signed-off-by: Daniel Borkmann drivers/net/ethernet/mellanox/mlx5/core/en.h | 46 ++++++++++++-- drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c | 81 +++++++++++++++--------- drivers/net/ethernet/mellanox/mlx5/core/en/xdp.h | 11 ++-- 3 files changed, 97 insertions(+), 41 deletions(-) commit ed084fb60429fe1d666402f31e17c394001eecbc Author: Maxim Mikityanskiy Date: Wed Jun 26 17:35:31 2019 +0300 net/mlx5e: Allow ICO SQ to be used by multiple RQs Prepare to creation of the XSK RQ, which will require posting UMRs, too. The same ICO SQ will be used for both RQs and also to trigger interrupts by posting NOPs. UMR WQEs can't be reused any more. Optimization introduced in commit ab966d7e4ff98 ("net/mlx5e: RX, Recycle buffer of UMR WQEs") is reverted. Signed-off-by: Maxim Mikityanskiy Signed-off-by: Tariq Toukan Acked-by: Saeed Mahameed Signed-off-by: Daniel Borkmann drivers/net/ethernet/mellanox/mlx5/core/en.h | 9 ++++++++ drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 27 +++++++++-------------- drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c | 4 +++- drivers/net/ethernet/mellanox/mlx5/core/wq.h | 5 ----- 4 files changed, 22 insertions(+), 23 deletions(-) commit a069e977d6d8f26c90a5d9374135729dc41c3a0d Author: Maxim Mikityanskiy Date: Wed Jun 26 17:35:30 2019 +0300 net/mlx5e: Calculate linear RX frag size considering XSK Additional conditions introduced: - XSK implies XDP. - Headroom includes the XSK headroom if it exists. - No space is reserved for struct shared_skb_info in XSK mode. - Fragment size smaller than the XSK chunk size is not allowed. A new auxiliary function mlx5e_get_linear_rq_headroom with the support for XSK is introduced. Use this function in the implementation of mlx5e_get_rq_headroom. Change headroom to u32 to match the headroom field in struct xdp_umem. Signed-off-by: Maxim Mikityanskiy Signed-off-by: Tariq Toukan Acked-by: Saeed Mahameed Signed-off-by: Daniel Borkmann .../net/ethernet/mellanox/mlx5/core/en/params.c | 65 +++++++++++++++------- .../net/ethernet/mellanox/mlx5/core/en/params.h | 8 ++- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 +- 3 files changed, 52 insertions(+), 23 deletions(-) commit 6ed9350fe0d5d1f14c25b6145b685bc7720fce6e Author: Maxim Mikityanskiy Date: Wed Jun 26 17:35:29 2019 +0300 net/mlx5e: Replace deprecated PCI_DMA_TODEVICE The PCI API for DMA is deprecated, and PCI_DMA_TODEVICE is just defined to DMA_TO_DEVICE for backward compatibility. Just use DMA_TO_DEVICE. Signed-off-by: Maxim Mikityanskiy Signed-off-by: Tariq Toukan Acked-by: Saeed Mahameed Signed-off-by: Daniel Borkmann drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4bce4e5cb65587f805655ec6808a20af2036627a Author: Maxim Mikityanskiy Date: Wed Jun 26 17:35:28 2019 +0300 xsk: Return the whole xdp_desc from xsk_umem_consume_tx Some drivers want to access the data transmitted in order to implement acceleration features of the NICs. It is also useful in AF_XDP TX flow. Change the xsk_umem_consume_tx API to return the whole xdp_desc, that contains the data pointer, length and DMA address, instead of only the latter two. Adapt the implementation of i40e and ixgbe to this change. Signed-off-by: Maxim Mikityanskiy Signed-off-by: Tariq Toukan Acked-by: Saeed Mahameed Cc: Björn Töpel Cc: Magnus Karlsson Acked-by: Björn Töpel Signed-off-by: Daniel Borkmann drivers/net/ethernet/intel/i40e/i40e_xsk.c | 12 +++++++----- drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 15 +++++++++------ include/net/xdp_sock.h | 6 +++--- net/xdp/xsk.c | 10 +++------- 4 files changed, 22 insertions(+), 21 deletions(-) commit 123e8da1d33042a83cedb530fb5efd64f32ce594 Author: Maxim Mikityanskiy Date: Wed Jun 26 17:35:27 2019 +0300 xsk: Change the default frame size to 4096 and allow controlling it The typical XDP memory scheme is one packet per page. Change the AF_XDP frame size in libbpf to 4096, which is the page size on x86, to allow libbpf to be used with the drivers with the packet-per-page scheme. Add a command line option -f to xdpsock to allow to specify a custom frame size. Signed-off-by: Maxim Mikityanskiy Signed-off-by: Tariq Toukan Acked-by: Saeed Mahameed Signed-off-by: Daniel Borkmann samples/bpf/xdpsock_user.c | 44 ++++++++++++++++++++++++++++---------------- tools/lib/bpf/xsk.h | 2 +- 2 files changed, 29 insertions(+), 17 deletions(-) commit 2761ed4b6e192820760d5ba913834b2ba05fd08c Author: Maxim Mikityanskiy Date: Wed Jun 26 17:35:26 2019 +0300 libbpf: Support getsockopt XDP_OPTIONS Query XDP_OPTIONS in libbpf to determine if the zero-copy mode is active or not. Signed-off-by: Maxim Mikityanskiy Signed-off-by: Tariq Toukan Acked-by: Saeed Mahameed Acked-by: Björn Töpel Signed-off-by: Daniel Borkmann tools/lib/bpf/xsk.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 2640d3c8123223e0a205b2a25a446df6f072b3ea Author: Maxim Mikityanskiy Date: Wed Jun 26 17:35:25 2019 +0300 xsk: Add getsockopt XDP_OPTIONS Make it possible for the application to determine whether the AF_XDP socket is running in zero-copy mode. To achieve this, add a new getsockopt option XDP_OPTIONS that returns flags. The only flag supported for now is the zero-copy mode indicator. Signed-off-by: Maxim Mikityanskiy Signed-off-by: Tariq Toukan Acked-by: Saeed Mahameed Acked-by: Björn Töpel Signed-off-by: Daniel Borkmann include/uapi/linux/if_xdp.h | 8 ++++++++ net/xdp/xsk.c | 20 ++++++++++++++++++++ tools/include/uapi/linux/if_xdp.h | 8 ++++++++ 3 files changed, 36 insertions(+) commit d57d76428ae9abca51fb89f9326da9d4b1cf8270 Author: Maxim Mikityanskiy Date: Wed Jun 26 17:35:24 2019 +0300 xsk: Add API to check for available entries in FQ Add a function that checks whether the Fill Ring has the specified amount of descriptors available. It will be useful for mlx5e that wants to check in advance, whether it can allocate a bulk of RX descriptors, to get the best performance. Signed-off-by: Maxim Mikityanskiy Signed-off-by: Tariq Toukan Acked-by: Saeed Mahameed Acked-by: Björn Töpel Signed-off-by: Daniel Borkmann include/net/xdp_sock.h | 21 +++++++++++++++++++++ net/xdp/xsk.c | 6 ++++++ net/xdp/xsk_queue.h | 14 ++++++++++++++ 3 files changed, 41 insertions(+) commit e18953240de8b46360a67090c87ee1ef8160b35d Author: Maxim Mikityanskiy Date: Wed Jun 26 17:35:23 2019 +0300 net/mlx5e: Attach/detach XDP program safely When an XDP program is set, a full reopen of all channels happens in two cases: 1. When there was no program set, and a new one is being set. 2. When there was a program set, but it's being unset. The full reopen is necessary, because the channel parameters may change if XDP is enabled or disabled. However, it's performed in an unsafe way: if the new channels fail to open, the old ones are already closed, and the interface goes down. Use the safe way to switch channels instead. The same way is already used for other configuration changes. Signed-off-by: Maxim Mikityanskiy Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed Signed-off-by: Daniel Borkmann drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 31 +++++++++++++++-------- 1 file changed, 20 insertions(+), 11 deletions(-) commit e5c891a349d7c556b7b9dc231d6dd78e88a29e5c Author: Roman Gushchin Date: Tue Jun 25 14:38:58 2019 -0700 bpf: fix cgroup bpf release synchronization Since commit 4bfc0bb2c60e ("bpf: decouple the lifetime of cgroup_bpf from cgroup itself"), cgroup_bpf release occurs asynchronously (from a worker context), and before the release of the cgroup itself. This introduced a previously non-existing race between the release and update paths. E.g. if a leaf's cgroup_bpf is released and a new bpf program is attached to the one of ancestor cgroups at the same time. The race may result in double-free and other memory corruptions. To fix the problem, let's protect the body of cgroup_bpf_release() with cgroup_mutex, as it was effectively previously, when all this code was called from the cgroup release path with cgroup mutex held. Also let's skip cgroups, which have no chances to invoke a bpf program, on the update path. If the cgroup bpf refcnt reached 0, it means that the cgroup is offline (no attached processes), and there are no associated sockets left. It means there is no point in updating effective progs array! And it can lead to a leak, if it happens after the release. So, let's skip such cgroups. Big thanks for Tejun Heo for discovering and debugging of this problem! Fixes: 4bfc0bb2c60e ("bpf: decouple the lifetime of cgroup_bpf from cgroup itself") Reported-by: Tejun Heo Signed-off-by: Roman Gushchin Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann kernel/bpf/cgroup.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit dc59c133751618726350b72b6baddebe2eac4733 Author: Mike Looijmans Date: Tue May 7 15:51:10 2019 +0200 clk: clk-si544: Implement small frequency change support The Si544 supports changing frequencies "on the fly" when the change is less than 950 ppm from the current center frequency. The driver now uses the small adjustment routine for implementing this. Signed-off-by: Mike Looijmans Signed-off-by: Stephen Boyd drivers/clk/clk-si544.c | 102 +++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 92 insertions(+), 10 deletions(-) commit 1c099779c1e2e8e0e10cdb2aecd4b35f428e9f00 Author: Jonas Gorski Date: Thu May 2 14:26:56 2019 +0200 clk: add BCM63XX gated clock controller driver Add a driver for the gated clock controller found on MIPS based BCM63XX SoCs. Signed-off-by: Jonas Gorski Reviewed-by: Florian Fainelli Reviewed-by: Philippe Mathieu-Daudé [sboyd@kernel.org: Remove module.h include and associated things for a non-modular driver, add static on data tables, drop of_match_ptr() usage, fix spdx tag to be a C++ style comment] Signed-off-by: Stephen Boyd drivers/clk/bcm/Kconfig | 8 ++ drivers/clk/bcm/Makefile | 1 + drivers/clk/bcm/clk-bcm63xx-gate.c | 238 +++++++++++++++++++++++++++++++++++++ 3 files changed, 247 insertions(+) commit dc1d9dac5ca2f3c3cf024f1e17857033ba1e080e Author: Jonas Gorski Date: Thu May 2 14:26:55 2019 +0200 devicetree: document the BCM63XX gated clock bindings Add binding documentation for the gated clock controller found on MIPS based BCM63XX SoCs. Signed-off-by: Jonas Gorski Reviewed-by: Florian Fainelli Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd .../bindings/clock/brcm,bcm63xx-clocks.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit d7ee287827ef107420871651963770f8705cb56e Merge: a653f2f538f9 398c2b05bbee Author: David S. Miller Date: Thu Jun 27 12:42:51 2019 -0700 Merge tag 'blk-dim-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mamameed says: ==================== Generic DIM From: Tal Gilboa and Yamin Fridman Implement net DIM over a generic DIM library, add RDMA DIM dim.h lib exposes an implementation of the DIM algorithm for dynamically-tuned interrupt moderation for networking interfaces. We want a similar functionality for other protocols, which might need to optimize interrupts differently. Main motivation here is DIM for NVMf storage protocol. Current DIM implementation prioritizes reducing interrupt overhead over latency. Also, in order to reduce DIM's own overhead, the algorithm might take some time to identify it needs to change profiles. While this is acceptable for networking, it might not work well on other scenarios. Here we propose a new structure to DIM. The idea is to allow a slightly modified functionality without the risk of breaking Net DIM behavior for netdev. We verified there are no degradations in current DIM behavior with the modified solution. Suggested solution: - Common logic is implemented in lib/dim/dim.c - Net DIM (existing) logic is implemented in lib/dim/net_dim.c, which uses the common logic in dim.c - Any new DIM logic will be implemented in "lib/dim/new_dim.c". This new implementation will expose modified versions of profiles, dim_step() and dim_decision(). - DIM API is declared in include/linux/dim.h for all implementations. Pros for this solution are: - Zero impact on existing net_dim implementation and usage - Relatively more code reuse (compared to two separate solutions) - Increased extensibility ==================== Signed-off-by: David S. Miller commit 208a68c8393d6041a90862992222f3d7943d44d6 Author: Bastien Nocera Date: Thu Jun 27 09:20:45 2019 +0200 iio: iio-utils: Fix possible incorrect mask calculation On some machines, iio-sensor-proxy was returning all 0's for IIO sensor values. It turns out that the bits_used for this sensor is 32, which makes the mask calculation: *mask = (1 << 32) - 1; If the compiler interprets the 1 literals as 32-bit ints, it generates undefined behavior depending on compiler version and optimization level. On my system, it optimizes out the shift, so the mask value becomes *mask = (1) - 1; With a mask value of 0, iio-sensor-proxy will always return 0 for every axis. Avoid incorrect 0 values caused by compiler optimization. See original fix by Brett Dutro in iio-sensor-proxy: https://github.com/hadess/iio-sensor-proxy/commit/9615ceac7c134d838660e209726cd86aa2064fd3 Signed-off-by: Bastien Nocera Signed-off-by: Jonathan Cameron tools/iio/iio_utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f29e62eed261f01431d348d8b22a6f275d553a51 Author: Bob Peterson Date: Mon May 13 09:42:18 2019 -0500 gfs2: replace more printk with calls to fs_info and friends This patch replaces a few leftover printk errors with calls to fs_info and similar, so that the file system having the error is properly logged. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher fs/gfs2/bmap.c | 5 ++--- fs/gfs2/glops.c | 3 ++- fs/gfs2/rgrp.c | 27 ++++++++++++++------------- fs/gfs2/super.c | 6 +++--- 4 files changed, 21 insertions(+), 20 deletions(-) commit 3792ce973f07a2644fd81424b9acacb12530a3cf Author: Bob Peterson Date: Thu May 9 09:21:48 2019 -0500 gfs2: dump fsid when dumping glock problems Before this patch, if a glock error was encountered, the glock with the problem was dumped. But sometimes you may have lots of file systems mounted, and that doesn't tell you which file system it was for. This patch adds a new boolean parameter fsid to the dump_glock family of functions. For non-error cases, such as dumping the glocks debugfs file, the fsid is not dumped in order to keep lock dumps and glocktop as clean as possible. For all error cases, such as GLOCK_BUG_ON, the file system id is now printed. This will make it easier to debug. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher fs/gfs2/glock.c | 34 +++++++++++++++++++++------------- fs/gfs2/glock.h | 11 +++++++---- fs/gfs2/glops.c | 7 +++++-- fs/gfs2/incore.h | 3 ++- fs/gfs2/lops.c | 2 +- fs/gfs2/rgrp.c | 21 ++++++++++++++------- fs/gfs2/rgrp.h | 3 ++- fs/gfs2/util.c | 4 +++- 8 files changed, 55 insertions(+), 30 deletions(-) commit 55317f5b00f0dc0c807979292362ddc568b5bcc9 Author: Bob Peterson Date: Mon Apr 29 09:36:23 2019 -0600 gfs2: simplify gfs2_freeze by removing case Function gfs2_freeze had a case statement that simply checked the error code, but the break statements just made the logic hard to read. This patch simplifies the logic in favor of a simple if. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher fs/gfs2/super.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 04aea0ca14f025828c22d8ef586ff59d0be2f98b Author: Bob Peterson Date: Tue May 7 13:27:44 2019 -0500 gfs2: Rename SDF_SHUTDOWN to SDF_WITHDRAWN Before this patch, the superblock flag indicating when a file system is withdrawn was called SDF_SHUTDOWN. This patch simply renames it to the more obvious SDF_WITHDRAWN. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher fs/gfs2/aops.c | 4 ++-- fs/gfs2/file.c | 2 +- fs/gfs2/glock.c | 6 +++--- fs/gfs2/glops.c | 2 +- fs/gfs2/incore.h | 2 +- fs/gfs2/meta_io.c | 6 +++--- fs/gfs2/ops_fstype.c | 2 +- fs/gfs2/quota.c | 2 +- fs/gfs2/super.c | 6 +++--- fs/gfs2/sys.c | 2 +- fs/gfs2/util.c | 4 ++-- 11 files changed, 19 insertions(+), 19 deletions(-) commit d14e1ca305fc27dbceabad64bf5158b35d8864c8 Author: Bob Peterson Date: Wed Feb 27 13:26:59 2019 -0700 gfs2: Warn when a journal replay overwrites a rgrp with buffers This patch adds some instrumentation in gfs2's journal replay that indicates when we're about to overwrite a rgrp for which we already have a valid buffer_head. When this problem occurs, it's a situation in which this node has been granted a rgrp glock and subsequently read in buffer_heads for it, and possibly even made changes to the rgrp bits and/or allocation values. But now another node has failed and forced us to replay its journal, but its journal contains a copy of the same rgrp, without a revoke, which means we're about to overwrite a rgrp that we now rightfully own, with an obsolete copy. That is always a problem. It means the other node (which failed and left its journal to be replayed) failed to flush out its rgrp buffers, write out the revoke, and invalidate its copy before it released the glock to our possession. No node should ever release a glock until its metadata has been written to the journal and revoked and invalidated.. We also kludge around the problem and refuse to replace our good copy with the journals bad copy by not marking the buffer dirty, but never do it silently. That's wallpapering over a larger problem that still exists. IOW, if this situation can happen to this node, it can also happen to a different node and we wouldn't even know it or be able to circumvent it: Suppose we have a 3-node cluster: Node 1 fails, leaving an obsolete rgrp block in its journal without a revoke. Node 2 grabs the rgrp as soon as the rgrp glock is released and starts making changes, allocating and freeing blocks from the rgrp, etc. Node 3 replays the journal from node 1, oblivious and unaware that it's about to overwrite node 2's changes. So we still need to be vocal and log the error to make it apparent that a corruption path still exists in gfs2. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher fs/gfs2/lops.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) commit 49eb776ed9d92a91d3b1a24d83755e051bce96ff Author: Bob Peterson Date: Wed Feb 27 13:32:36 2019 -0700 gfs2: log which portion of the journal is replayed When a journal is replayed, gfs2 logs a message similar to: jid=X: Replaying journal... This patch adds the tail and block number so that the range of the replayed block is also printed. These values will match the values shown if the journal is dumped with gfs2_edit -p journalX. The resulting output looks something like this: jid=1: Replaying journal...0x28b7 to 0x2beb This will allow us to better debug file system corruption problems. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher fs/gfs2/recovery.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e955537e3262de8e56f070b13817f525f472fa00 Author: Bob Peterson Date: Tue Mar 26 13:51:48 2019 -0600 gfs2: eliminate tr_num_revoke_rm For its journal processing, gfs2 kept track of the number of buffers added and removed on a per-transaction basis. These values are used to calculate space needed in the journal. But while these calculations make sense for the number of buffers, they make no sense for revokes. Revokes are managed in their own list, linked from the superblock. So it's entirely unnecessary to keep separate per-transaction counts for revokes added and removed. A single count will do the same job. Therefore, this patch combines the transaction revokes into a single count. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher fs/gfs2/incore.h | 1 - fs/gfs2/log.c | 3 +-- fs/gfs2/trans.c | 6 +++--- 3 files changed, 4 insertions(+), 6 deletions(-) commit 5b3a9f348bc58f0e13cebcf3e583c7d2f2499d6a Author: Bob Peterson Date: Fri Apr 26 08:11:27 2019 -0600 gfs2: kthread and remount improvements Before this patch, gfs2 saved the pointers to the two daemon threads (logd and quotad) in the superblock, but they were never cleared, even if the threads were stopped (e.g. on remount -o ro). That meant that certain error conditions (like a withdrawn file system) could race. For example, xfstests generic/361 caused an IO error during remount -o ro, which caused the kthreads to be stopped, then the error flagged. Later, when the test unmounted the file system, it would try to stop the threads a second time with kthread_stop. This patch does two things: First, every time it stops the threads it zeroes out the thread pointer, and also checks whether it's NULL before trying to stop it. Second, in function gfs2_remount_fs, it was returning if an error was logged by either of the two functions for gfs2_make_fs_ro and _rw, which caused it to bypass the online uevent at the bottom of the function. This removes that bypass in favor of just running the whole function, then returning the error. That way, unmounts and remounts won't hang forever. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher fs/gfs2/super.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit 15a798f7deb3931dd569f5734a04be47b97435cc Author: Kefeng Wang Date: Wed Jun 5 22:24:24 2019 +0800 gfs2: Use IS_ERR_OR_NULL Use IS_ERR_OR_NULL where appropriate. (Several more places converted by Andreas.) Signed-off-by: Kefeng Wang Signed-off-by: Andreas Gruenbacher fs/gfs2/dir.c | 4 ++-- fs/gfs2/glock.c | 2 +- fs/gfs2/inode.c | 2 +- fs/gfs2/ops_fstype.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) commit 2a27b755ed244527df845f07f4dd83988a90f2e4 Author: Andreas Gruenbacher Date: Thu May 16 22:46:30 2019 +0100 gfs2: Clean up freeing struct gfs2_sbd Add a free_sbd function for freeing a struct gfs2_sbd. Use that for freeing a super-block descriptor, either directly or via kobject_put. Free sd_lkstats inside the kobject release function: that way, gfs2_put_super will no longer leak sd_lkstats. Signed-off-by: Andreas Gruenbacher fs/gfs2/ops_fstype.c | 23 ++++++++++++++--------- fs/gfs2/super.h | 2 ++ fs/gfs2/sys.c | 3 +-- 3 files changed, 17 insertions(+), 11 deletions(-) commit ecbcc2aa655744363647b91dee09096918e41eaf Author: Claudiu Beznea Date: Thu Jun 27 18:53:45 2019 +0300 clk: at91: sckc: use dedicated functions to unregister clock Use at91 specific functions to free all resources in case of error. Signed-off-by: Claudiu Beznea Reviewed-by: Alexandre Belloni Signed-off-by: Stephen Boyd drivers/clk/at91/sckc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d09e6ca1381fee498f3fd0431800617daffb8fd4 Author: Claudiu Beznea Date: Thu Jun 27 18:53:44 2019 +0300 clk: at91: sckc: improve error path for sama5d4 sck registration Improve error path for sama5d4 sck registration. Signed-off-by: Claudiu Beznea Reviewed-by: Alexandre Belloni Signed-off-by: Stephen Boyd drivers/clk/at91/sckc.c | 43 ++++++++++++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 15 deletions(-) commit 8c938c2d00c14e6af0c3401d31443d2fd626b664 Author: Claudiu Beznea Date: Thu Jun 27 18:53:43 2019 +0300 clk: at91: sckc: remove unnecessary line Remove unnecessary line. Signed-off-by: Claudiu Beznea Reviewed-by: Alexandre Belloni Signed-off-by: Stephen Boyd drivers/clk/at91/sckc.c | 1 - 1 file changed, 1 deletion(-) commit 82e25dc8f6bef3e08d7b58720f8812c12f2e3a89 Author: Claudiu Beznea Date: Thu Jun 27 18:53:42 2019 +0300 clk: at91: sckc: improve error path for sam9x5 sck register Improve error path for sam9x5 slow clock registration. Signed-off-by: Claudiu Beznea Reviewed-by: Alexandre Belloni Signed-off-by: Stephen Boyd drivers/clk/at91/sckc.c | 50 +++++++++++++++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 18 deletions(-) commit 016d22dd10eac723815adb6befdbf265a76d2383 Author: Claudiu Beznea Date: Thu Jun 27 18:53:41 2019 +0300 clk: at91: sckc: add support to free slow clock osclillator Add support to free slow clock oscillator resources. Signed-off-by: Claudiu Beznea Reviewed-by: Alexandre Belloni Signed-off-by: Stephen Boyd drivers/clk/at91/sckc.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 036702468c9112f65abc58cce6770e01e41996a9 Author: Claudiu Beznea Date: Thu Jun 27 18:53:40 2019 +0300 clk: at91: sckc: add support to free slow rc oscillator Add support to free slow rc oscillator resources. Signed-off-by: Claudiu Beznea Reviewed-by: Alexandre Belloni Signed-off-by: Stephen Boyd drivers/clk/at91/sckc.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 7fb791d07954910ced6edbecc60c07b7191a39cf Author: Claudiu Beznea Date: Thu Jun 27 18:53:39 2019 +0300 clk: at91: sckc: add support to free slow oscillator Add support to free slow oscillator resources. Signed-off-by: Claudiu Beznea Reviewed-by: Alexandre Belloni Signed-off-by: Stephen Boyd drivers/clk/at91/sckc.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit a653f2f538f9d3e2d1f1445f74a47bfdace85c2e Author: Christian Lamparter Date: Tue Jun 25 10:41:51 2019 +0200 net: dsa: qca8k: introduce reset via gpio feature The QCA8337(N) has a RESETn signal on Pin B42 that triggers a chip reset if the line is pulled low. The datasheet says that: "The active low duration must be greater than 10 ms". This can hopefully fix some of the issues related to pin strapping in OpenWrt for the EA8500 which suffers from detection issues after a SoC reset. Please note that the qca8k_probe() function does currently require to read the chip's revision register for identification purposes. Signed-off-by: Christian Lamparter Signed-off-by: David S. Miller drivers/net/dsa/qca8k.c | 15 +++++++++++++++ drivers/net/dsa/qca8k.h | 2 ++ 2 files changed, 17 insertions(+) commit e7dd8a894830ca2d7b96d35dd5405993b0cfe32c Author: Christian Lamparter Date: Tue Jun 25 10:41:50 2019 +0200 dt-bindings: net: dsa: qca8k: document reset-gpios property This patch documents the qca8k's reset-gpios property that can be used if the QCA8337N ends up in a bad state during reset. Signed-off-by: Christian Lamparter Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/dsa/qca8k.txt | 6 ++++++ 1 file changed, 6 insertions(+) commit 3552691616c940a7c4125c2678ba816653cd725e Author: Jeff Kletsky Date: Tue Jun 18 10:08:05 2019 -0700 mtd: spinand: Add initial support for Paragon PN26G0xA Add initial support for Paragon Technology PN26G01Axxxxx and PN26G02Axxxxx SPI NAND Datasheets available at http://www.xtxtech.com/upfile/2016082517274590.pdf http://www.xtxtech.com/upfile/2016082517282329.pdf Signed-off-by: Jeff Kletsky Reviewed-by: Frieder Schrempf Signed-off-by: Miquel Raynal drivers/mtd/nand/spi/Makefile | 2 +- drivers/mtd/nand/spi/core.c | 1 + drivers/mtd/nand/spi/paragon.c | 147 +++++++++++++++++++++++++++++++++++++++++ include/linux/mtd/spinand.h | 1 + 4 files changed, 150 insertions(+), 1 deletion(-) commit b2c709cce6826b7f472edb1c91a943d0676e2742 Author: David Ahern Date: Mon Jun 24 13:44:51 2019 -0700 ipv6: Convert gateway validation to use fib6_info Gateway validation does not need a dst_entry, it only needs the fib entry to validate the gateway resolution and egress device. So, convert ip6_nh_lookup_table from ip6_pol_route to fib6_table_lookup and ip6_route_check_nh to use fib6_lookup over rt6_lookup. ip6_pol_route is a call to fib6_table_lookup and if successful a call to fib6_select_path. From there the exception cache is searched for an entry or a dst_entry is created to return to the caller. The exception entry is not relevant for gateway validation, so what matters are the calls to fib6_table_lookup and then fib6_select_path. Similarly, rt6_lookup can be replaced with a call to fib6_lookup with RT6_LOOKUP_F_IFACE set in flags. Again, the exception cache search is not relevant, only the lookup with path selection. The primary difference in the lookup paths is the use of rt6_select with fib6_lookup versus rt6_device_match with rt6_lookup. When you remove complexities in the rt6_select path, e.g., 1. saddr is not set for gateway validation, so RT6_LOOKUP_F_HAS_SADDR is not relevant 2. rt6_check_neigh is not called so that removes the RT6_NUD_FAIL_DO_RR return and round-robin logic. the code paths are believed to be equivalent for the given use case - validate the gateway and optionally given the device. Furthermore, it aligns the validation with onlink code path and the lookup path actually used for rx and tx. Adjust the users, ip6_route_check_nh_onlink and ip6_route_check_nh to handle a fib6_info vs a rt6_info when performing validation checks. Existing selftests fib-onlink-tests.sh and fib_tests.sh are used to verify the changes. Signed-off-by: David Ahern Reviewed-by: Wei Wang Signed-off-by: David S. Miller net/ipv6/route.c | 118 ++++++++++++++++++++++++++----------------------------- 1 file changed, 56 insertions(+), 62 deletions(-) commit b74e6985bfe81627b7b1adb8443220f98f89f9f4 Author: Xiaolei Li Date: Mon Jun 24 09:38:56 2019 +0800 mtd: rawnand: mtk: Re-license MTK NAND driver as Dual MIT/GPL It is wanted to use MTK NAND driver with GPL-2.0 or MIT license. But now it is only licensed as GPL-2.0, so re-license it as dual MIT/GPL. Signed-off-by: Xiaolei Li Acked-by: Jorge Ramirez-Ortiz Acked-by: Ryder Lee Acked-by: Rafał Miłecki Acked-by: Miquel Raynal Acked-by: Boris Brezillon Acked-by: Wen Yang Acked-by: Dan Carpenter Acked-by: Arnd Bergmann Acked-by: Masahiro Yamada Acked-by: RogerCC Lin Reviewed-by: Matthias Brugger Signed-off-by: Miquel Raynal drivers/mtd/nand/raw/mtk_ecc.c | 4 ++-- drivers/mtd/nand/raw/mtk_ecc.h | 4 +--- drivers/mtd/nand/raw/mtk_nand.c | 4 ++-- 3 files changed, 5 insertions(+), 7 deletions(-) commit 6bd2a42aa67a8aa20f62f1cabe6930ef1eaf389b Author: Colin Ian King Date: Tue Jun 4 11:58:59 2019 +0100 mtd: rawnand: gpmi: remove double assignment to block_size The variable block_size is being assigned to itself and to geo->ecc_chunk_size. Clean up the double assignment by removing the assignment to itself. Addresses-Coverity: ("Evaluation order violation") Signed-off-by: Colin Ian King Signed-off-by: Miquel Raynal drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3054354ffe096f748410107e6e2c00165e7a17e5 Author: Kamal Dasu Date: Tue Jun 4 10:36:31 2019 -0400 dt-bindings: mtd: brcmnand: Add brcmnand, brcmnand-v7.3 support Added brcm,brcmnand-v7.3 as possible compatible string to support brcmnand controller v7.3. Signed-off-by: Kamal Dasu Reviewed-by: Rob Herring Signed-off-by: Miquel Raynal Documentation/devicetree/bindings/mtd/brcm,brcmnand.txt | 1 + 1 file changed, 1 insertion(+) commit 0c06da5788be2304ea23d348fd59cd43df8db7f8 Author: Kamal Dasu Date: Tue Jun 4 10:36:30 2019 -0400 mtd: rawnand: brcmnand: Add support for v7.3 controller This change adds support for brcm NAND v7.3 controller. This controller uses a newer version of flash_dma engine and change mostly implements these differences. Signed-off-by: Kamal Dasu Signed-off-by: Miquel Raynal drivers/mtd/nand/raw/brcmnand/brcmnand.c | 102 ++++++++++++++++++++++++------- 1 file changed, 80 insertions(+), 22 deletions(-) commit 3c7c1e4594efd57b98ae6f7298f40cff4f4fb47b Author: Kamal Dasu Date: Tue Jun 4 10:36:29 2019 -0400 mtd: rawnand: brcmnand: Refactored code to introduce helper functions Refactored NAND ECC and CMD address configuration code to use helper functions. Signed-off-by: Kamal Dasu Signed-off-by: Miquel Raynal drivers/mtd/nand/raw/brcmnand/brcmnand.c | 100 +++++++++++++++++++------------ 1 file changed, 62 insertions(+), 38 deletions(-) commit c1ac2dc34b51a9d2191067bbf2aebc8e8ddada70 Author: Kamal Dasu Date: Thu May 16 12:41:47 2019 -0400 mtd: rawnand: brcmnand: When oops in progress use pio and interrupt polling If mtd_oops is in progress, switch to polling during NAND command completion instead of relying on DMA/interrupts so that the mtd_oops buffer can be completely written in the assigned NAND partition. Signed-off-by: Kamal Dasu Signed-off-by: Miquel Raynal drivers/mtd/nand/raw/brcmnand/brcmnand.c | 48 ++++++++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 3 deletions(-) commit 9f897bfdd89f5f08a12fa263a7f57fbf8ad9292f Author: Kamal Dasu Date: Thu May 16 12:41:46 2019 -0400 mtd: Add flag to indicate panic_write Added a flag to indicate a panic_write so that low level drivers can use it to take required action where applicable, to ensure oops data gets written to assigned mtd device. Signed-off-by: Kamal Dasu Signed-off-by: Miquel Raynal drivers/mtd/mtdcore.c | 3 +++ include/linux/mtd/mtd.h | 6 ++++++ 2 files changed, 9 insertions(+) commit 33535b85478d253a234a2779f28992a4d1766629 Author: Mason Yang Date: Mon Jun 3 10:42:04 2019 +0800 mtd: rawnand: Add Macronix NAND read retry support Add support for Macronix NAND read retry. Macronix NANDs support specific read operation for data recovery, which can be enabled with a SET_FEATURE. Driver checks byte 167 of Vendor Blocks in ONFI parameter page table to see if this high-reliability function is supported. Signed-off-by: Mason Yang Signed-off-by: Miquel Raynal drivers/mtd/nand/raw/nand_macronix.c | 45 ++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit db01077c5fffc73fc190d6ce3d68ae083044e4a2 Author: Gustavo A. R. Silva Date: Thu May 23 14:16:06 2019 -0500 mtd: onenand: Avoid fall-through warnings NOTICE THAT: "...we don't know whether we need fallthroughs or breaks here and this is just a change to avoid having new warnings when switching to -Wimplicit-fallthrough but this change might be entirely wrong."[1] See the original thread of discussion here: https://lore.kernel.org/patchwork/patch/1036251/ So, in preparation to enabling -Wimplicit-fallthrough, this patch silences the following warnings: drivers/mtd/nand/onenand/onenand_base.c: In function ‘onenand_check_features’: drivers/mtd/nand/onenand/onenand_base.c:3264:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (ONENAND_IS_DDP(this)) ^ drivers/mtd/nand/onenand/onenand_base.c:3284:2: note: here case ONENAND_DEVICE_DENSITY_2Gb: ^~~~ drivers/mtd/nand/onenand/onenand_base.c:3288:17: warning: this statement may fall through [-Wimplicit-fallthrough=] this->options |= ONENAND_HAS_UNLOCK_ALL; drivers/mtd/nand/onenand/onenand_base.c:3290:2: note: here case ONENAND_DEVICE_DENSITY_1Gb: ^~~~ Warning level 3 was used: -Wimplicit-fallthrough=3 Also, notice that this patch doesn't change any functionality. See the most recent thread of discussion here: https://lore.kernel.org/patchwork/patch/1077395/ This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough. [1] https://lore.kernel.org/lkml/20190509085318.34a9d4be@xps13/ Cc: Miquel Raynal Suggested-by: Boris Brezillon Suggested-by: Kees Cook Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook Signed-off-by: Miquel Raynal drivers/mtd/nand/onenand/onenand_base.c | 3 +++ 1 file changed, 3 insertions(+) commit cfd93d7c908e71d99996be93d2b031ad3fddc292 Author: Jeff Kletsky Date: Wed May 22 15:05:55 2019 -0700 mtd: spinand: Add support for GigaDevice GD5F1GQ4UFxxG The GigaDevice GD5F1GQ4UFxxG SPI NAND is in current production devices and, while it has the same logical layout as the E-series devices, it differs in the SPI interfacing in significant ways. This support is contingent on previous commits to: * Add support for two-byte device IDs * Define macros for page-read ops with three-byte addresses http://www.gigadevice.com/datasheet/gd5f1gq4xfxxg/ Signed-off-by: Jeff Kletsky Reviewed-by: Frieder Schrempf Signed-off-by: Miquel Raynal drivers/mtd/nand/spi/gigadevice.c | 79 +++++++++++++++++++++++++++++++-------- 1 file changed, 64 insertions(+), 15 deletions(-) commit 878844908e563a2f02b977bacd221c288e681c47 Author: Jeff Kletsky Date: Wed May 22 15:05:54 2019 -0700 mtd: spinand: Add support for two-byte device IDs The GigaDevice GD5F1GQ4UFxxG SPI NAND utilizes two-byte device IDs. http://www.gigadevice.com/datasheet/gd5f1gq4xfxxg/ Signed-off-by: Jeff Kletsky Reviewed-by: Frieder Schrempf Signed-off-by: Miquel Raynal drivers/mtd/nand/spi/core.c | 2 +- include/linux/mtd/spinand.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit bded033062396e67ffbb3111084cf7ea202473d5 Author: Jeff Kletsky Date: Wed May 22 15:05:53 2019 -0700 mtd: spinand: Define macros for page-read ops with three-byte addresses The GigaDevice GD5F1GQ4UFxxG SPI NAND utilizes three-byte addresses for its page-read ops. http://www.gigadevice.com/datasheet/gd5f1gq4xfxxg/ Signed-off-by: Jeff Kletsky Reviewed-by: Frieder Schrempf Signed-off-by: Miquel Raynal include/linux/mtd/spinand.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 78933218f5c658195124456904cc56e5b52988bd Author: Kamal Dasu Date: Tue May 21 10:44:22 2019 -0400 mtd: rawnand: brcmnand: fallback to detected ecc-strength, ecc-step-size This change supports nand-ecc-step-size and nand-ecc-strength fields in brcmnand DT node to be optional. see: Documentation/devicetree/bindings/mtd/brcm,brcmnand.txt If both nand-ecc-strength and nand-ecc-step-size are not specified in device tree node for NAND, raw NAND layer does detect ECC information by reading ONFI extended parameter page for parts using ONFI >= 2.1. In case of non-ONFI NAND parts there could be a nand_id table entry with ECC information. If there is valid device tree entry for nand-ecc-strength and nand-ecc-step-size fields it still shall override the detected values. Signed-off-by: Kamal Dasu Signed-off-by: Miquel Raynal drivers/mtd/nand/raw/brcmnand/brcmnand.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit edd3e620ab15e66b0d5477dc3bd4732a2b3baddb Author: Kamal Dasu Date: Tue May 21 10:44:21 2019 -0400 dt-bindings: mtd: brcmnand: Make nand-ecc-strength and nand-ecc-step-size optional nand-ecc-strength and nand-ecc-step-size can be made optional as brcmnand driver can support using raw NAND layer detected values. Signed-off-by: Kamal Dasu Reviewed-by: Rob Herring Signed-off-by: Miquel Raynal Documentation/devicetree/bindings/mtd/brcm,brcmnand.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ef347c0cfd619a9251e5a2f9ff72e33650a9bccb Author: Sascha Hauer Date: Tue May 21 09:06:43 2019 +0200 mtd: rawnand: gpmi: Implement exec_op The gpmi driver performance suffers from NAND operations being split in multiple small DMA transfers. This has been forced by the NAND layer in the former days, but now with exec_op we can use the controller as intended. With this patch gpmi_nfc_exec_op becomes the main entry point to NAND operations. Here all instructions are collected and chained as separate DMA transfers. In the end whole chain is fired and waited to be finished. gpmi_nfc_exec_op only does the hardware operations, bad block marker swapping and buffer scrambling is done by the callers. It's worth noting that the nand_*_op functions always take the buffer lengths for the data that the NAND chip actually transfers. When doing BCH we have to calculate the net data size from the raw data size in some places. This patch has been tested with 2048/64 and 2048/128 byte NAND on i.MX6q. mtd_oobtest, mtd_subpagetest and mtd_speedtest run without errors. nandbiterrs, nandpagetest and nandsubpagetest userspace tests from mtdutils run without errors and UBIFS can successfully be mounted. Signed-off-by: Sascha Hauer Signed-off-by: Miquel Raynal drivers/dma/mxs-dma.c | 3 + drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 1105 +++++++++++----------------- drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.h | 25 +- include/linux/dma/mxs-dma.h | 1 + 4 files changed, 444 insertions(+), 690 deletions(-) commit ceeeb99cd821a2f7493e1e0e1eca5afc7a205213 Author: Sascha Hauer Date: Tue May 21 09:06:42 2019 +0200 dmaengine: mxs: rename custom flag The mxs dma driver uses the flags parameter in dmaengine_prep_slave_sg() for custom flags, but still uses the dmaengine specific names of the flags. Do a little bit better and at least give the flag a custom name. Signed-off-by: Sascha Hauer Acked-by: Vinod Koul Signed-off-by: Miquel Raynal drivers/dma/mxs-dma.c | 4 ++-- drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 17 +++++++++++------ include/linux/dma/mxs-dma.h | 2 ++ 3 files changed, 15 insertions(+), 8 deletions(-) commit e0ddaab76802d3179013f4864535043e2aea6c69 Author: Sascha Hauer Date: Tue May 21 09:06:41 2019 +0200 dmaengine: mxs: Add header file to be shared with gpmi nand driver The mxs dma driver can do PIO transfers. A pointer to the PIO words to transfer is passed in the struct scatterlist * argument of dmaengine_prep_slave_sg(). It's quite ugly and non obvious to cast u32 * to struct scatterlist * each time when calling dmaengine_prep_slave_sg(), so add a static inline wrapper function to be called by the user along with a description what is going on. Signed-off-by: Sascha Hauer Acked-by: Vinod Koul Signed-off-by: Miquel Raynal drivers/dma/mxs-dma.c | 1 + drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 36 ++++++++++++------------------ include/linux/dma/mxs-dma.h | 21 +++++++++++++++++ 3 files changed, 36 insertions(+), 22 deletions(-) commit 475345e89ced298afbeefed6c86122bb8415593d Author: Sascha Hauer Date: Tue May 21 09:06:40 2019 +0200 mtd: rawnand: gpmi: drop unnecessary flag The DMA_PREP_INTERRUPT flag is no longer needed by the mxs DMA driver, drop it. Signed-off-by: Sascha Hauer Reviewed-by: Miquel Raynal Signed-off-by: Miquel Raynal drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit d443cb25c0482cf89b7178e94df5665496cab97b Author: Sascha Hauer Date: Tue May 21 09:06:39 2019 +0200 dmaengine: mxs: Drop unnecessary flag The mxs dma driver insists on having the DMA_PREP_INTERRUPT flag set on all but the first transfer. There's no need to let the user set this flag, the driver can do it internally whenever it needs it. Drop handling of this flag from the driver. Signed-off-by: Sascha Hauer Acked-by: Vinod Koul Signed-off-by: Miquel Raynal drivers/dma/mxs-dma.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit 041414682b0daa04c9ab40c87ffd86bc55abf592 Author: Sascha Hauer Date: Tue May 21 09:06:38 2019 +0200 mtd: rawnand: gpmi: use runtime PM to manage clocks The gpmi driver aggressively en/disables the clocks between operations which has significant performance cost. Use runtime PM to get rid of this bottleneck. Signed-off-by: Sascha Hauer Reviewed-by: Miquel Raynal Signed-off-by: Miquel Raynal drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 69 +++++++++++++++++++----------- 1 file changed, 44 insertions(+), 25 deletions(-) commit 1ee514d00d64678be30b6ce2d5daa49965b9ee2b Author: Sascha Hauer Date: Tue May 21 09:06:37 2019 +0200 mtd: rawnand: gpmi: Drop unnecessary restoring of previous chipselection The i.MX23 specific option read code is called right after nand_scan. We can rely on the NAND core having disabled the chipselect, so there's no point in restoring the original chip select after NAND operations. Drop it. Signed-off-by: Sascha Hauer Reviewed-by: Miquel Raynal Signed-off-by: Miquel Raynal drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) commit ad8b4f1454ad2c7509bc8bf8930bead59619d117 Author: Sascha Hauer Date: Tue May 21 09:06:36 2019 +0200 mtd: rawnand: gpmi: remove unused parameters gpmi_ecc_read_page_data uses the page parameter only for a debug printf, so we can drop the parameter and the debug printf. Moving the oob delivery from gpmi_ecc_read_page_data to gpmi_ecc_read_page makes the oob_required parameter unnecessary aswell. Signed-off-by: Sascha Hauer Reviewed-by: Miquel Raynal Signed-off-by: Miquel Raynal drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 34 +++++++++++++++++------------- 1 file changed, 19 insertions(+), 15 deletions(-) commit b05d73d2ceafe0d2f65f8223c2b4259e6aefcbe9 Author: Sascha Hauer Date: Tue May 21 09:06:35 2019 +0200 mtd: rawnand: gpmi: read buf in nand_read_page_op The driver calls nand_read_page_op without a buffer passed and then calls chip->legacy.read_buf to read the buffer afterwards which is the same as passing the buffer nand_read_page_op in the first place. Signed-off-by: Sascha Hauer Reviewed-by: Miquel Raynal Signed-off-by: Miquel Raynal drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) commit 41e2322b258d6d907a4b721ee39a191f3b1e8a6c Author: Sascha Hauer Date: Tue May 21 09:06:34 2019 +0200 mtd: rawnand: gpmi: Remove unnecessary variables this->page_buffer_virt and this->payload_virt are always set to the same value, so drop the former and just use the latter. Same for this->page_buffer_virt and this->payload_virt. Signed-off-by: Sascha Hauer Reviewed-by: Miquel Raynal Signed-off-by: Miquel Raynal drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 15 ++++++--------- drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.h | 2 -- 2 files changed, 6 insertions(+), 11 deletions(-) commit 727ab978e526bfbca8f8e3892178aed55b688e57 Author: Sascha Hauer Date: Tue May 21 09:06:33 2019 +0200 mtd: rawnand: gpmi: remove unused variable The "private" member of struct gpmi_nand_data isn't used anywhere. Remove it. Signed-off-by: Sascha Hauer Reviewed-by: Miquel Raynal Signed-off-by: Miquel Raynal drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.h | 3 --- 1 file changed, 3 deletions(-) commit 3045f8e369634152b5a9389fa11e766ae7696bdf Author: Sascha Hauer Date: Tue Apr 9 13:34:10 2019 +0200 mtd: rawnand: gpmi: move all driver code into single file This moves the whole driver into a single C file. The filename gpmi-lib implies that it implements library functions, but in fact there are several cases where functions in gpmi-lib.c call back into functions in gpmi-nand.c. With this one has to constantly jump between those two files, so moving it into a single file improves readability, even when the file gets quite large. Signed-off-by: Sascha Hauer Reviewed-by: Miquel Raynal Signed-off-by: Miquel Raynal drivers/mtd/nand/raw/gpmi-nand/Makefile | 1 - drivers/mtd/nand/raw/gpmi-nand/gpmi-lib.c | 934 -------------------- drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 1269 ++++++++++++++++++++++++---- drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.h | 34 - 4 files changed, 1095 insertions(+), 1143 deletions(-) commit bf828322282608a03060daba2760a4c00f43ed90 Author: Sascha Hauer Date: Tue May 21 09:06:31 2019 +0200 mtd: rawnand: fsmc: Use nand_op_trace for operation tracing Replace the different operation tracing functions with a call to nand_op_trace. Signed-off-by: Sascha Hauer Reviewed-by: Miquel Raynal Signed-off-by: Miquel Raynal drivers/mtd/nand/raw/fsmc_nand.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) commit 14a82ea7e1682645d942d9fb41fcb6126fd1645e Author: Sascha Hauer Date: Tue May 21 09:06:30 2019 +0200 mtd: rawnand: export NAND operation tracer The NAND core has a NAND operation tracing function, but it can only be used by drivers using the generic option parser from the NAND core. Export the tracing function as a static inline function in rawnand.h so that drivers implementing exec_op directly do not have to write their own operation tracing. Signed-off-by: Sascha Hauer Reviewed-by: Miquel Raynal Signed-off-by: Miquel Raynal drivers/mtd/nand/raw/nand_base.c | 30 +----------------------------- include/linux/mtd/rawnand.h | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 29 deletions(-) commit 336d4b138be2dad372b67a2388e42805c48aaa38 Author: Xiaolei Li Date: Tue May 7 18:25:41 2019 +0800 mtd: rawnand: mtk: Fix wrongly assigned OOB buffer pointer issue One main goal of the function mtk_nfc_update_ecc_stats is to check whether sectors are all empty. If they are empty, set these sectors's data buffer and OOB buffer as 0xff. But now, the sector OOB buffer pointer is wrongly assigned. We always do memset from sector 0. To fix this issue, pass start sector number to make OOB buffer pointer be properly assigned. Fixes: 1d6b1e464950 ("mtd: mediatek: driver for MTK Smart Device") Signed-off-by: Xiaolei Li Reviewed-by: Miquel Raynal Signed-off-by: Miquel Raynal drivers/mtd/nand/raw/mtk_nand.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit 8dbd7b103fc3eac53ab8a20b3cd1a5cb26c0dcbb Author: Xiaolei Li Date: Tue May 7 18:25:40 2019 +0800 mtd: rawnand: mtk: Add validity check for CE# pin setting Currently, we only check how many CE# pins are set in device tree. But it should be necessary to check whether CE# pin setting is duplicated or if CE# pin index exceeds the maximum CE# number that controller supports. So, add validity check to avoid these invalid settings. Signed-off-by: Xiaolei Li Reviewed-by: Miquel Raynal Signed-off-by: Miquel Raynal drivers/mtd/nand/raw/mtk_nand.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 42d13a09efa4f0ea33231f3b145356ee487987b3 Author: Xiaolei Li Date: Tue May 7 18:25:39 2019 +0800 mtd: rawnand: mtk: Improve data sampling timing for read cycle Currently, we expand RE# low level time by choosing the max value between RE# pulse width and RE# access time, and sample data at the rising edge of RE#. Then, if RE# access time is bigger than RE# pulse width, the real read cycle time may be more than NAND SPEC required. This makes read performance be worse than that expected. This patch improves data sampling timing by calculating RE# low level time according to RE# pulse width. If RE# access time is bigger than RE# pulse width, then delay sampling data timing. The result of contrast test base on MT2712 evaluat board is as follow. nand: Micron MT29F16G08ADBCAH4 nand: 2048 MiB, SLC, erase size: 256 KiB, page size: 4096, OOB size: 224 NFI 2x clock rate: 124800000 HZ. Read speed without this patch: mtd_speedtest: page read speed is 14012 KiB/s mtd_speedtest: 2 page read speed is 14860 KiB/s Read speed with this patch: mtd_speedtest: page read speed is 18724 KiB/s mtd_speedtest: 2 page read speed is 18713 KiB/s Signed-off-by: Xiaolei Li Reviewed-by: Miquel Raynal Signed-off-by: Miquel Raynal drivers/mtd/nand/raw/mtk_nand.c | 46 ++++++++++++++++++++++++++++++++--------- 1 file changed, 36 insertions(+), 10 deletions(-) commit e1884ffddacc0424d7e785e6f8087bd12f7196db Author: Xiaolei Li Date: Tue May 7 18:25:38 2019 +0800 mtd: rawnand: mtk: Correct low level time calculation of r/w cycle At present, the flow of calculating AC timing of read/write cycle in SDR mode is that: At first, calculate high hold time which is valid for both read and write cycle using the max value between tREH_min and tWH_min. Secondly, calculate WE# pulse width using tWP_min. Thridly, calculate RE# pulse width using the bigger one between tREA_max and tRP_min. But NAND SPEC shows that Controller should also meet write/read cycle time. That is write cycle time should be more than tWC_min and read cycle should be more than tRC_min. Obviously, we do not achieve that now. This patch corrects the low level time calculation to meet minimum read/write cycle time required. After getting the high hold time, WE# low level time will be promised to meet tWP_min and tWC_min requirement, and RE# low level time will be promised to meet tREA_max, tRP_min and tRC_min requirement. Fixes: edfee3619c49 ("mtd: nand: mtk: add ->setup_data_interface() hook") Cc: stable@vger.kernel.org # v4.17+ Signed-off-by: Xiaolei Li Reviewed-by: Miquel Raynal Signed-off-by: Miquel Raynal drivers/mtd/nand/raw/mtk_nand.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) commit 917cc5945f18fc9464d597b4c1bb50ac745d78b6 Author: Kamal Dasu Date: Wed May 1 15:22:14 2019 -0400 mtd: rawnand: brcmnand: Fix BCH ECC layout for large page NAND parts The way oobregion->offset is derived for large page NAND parts is wrong, fixes it. Fixes: ef5eeea6e911 ("mtd: nand: brcm: switch to mtd_ooblayout_ops") Signed-off-by: Kamal Dasu Reviewed-by: Florian Fainelli Signed-off-by: Miquel Raynal drivers/mtd/nand/raw/brcmnand/brcmnand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 855eff216a97afa4a2233b792cb3c812b5ebd876 Author: Jonathan Bakker Date: Fri Apr 26 17:06:34 2019 +0200 mtd: onenand: Add support for 8Gb datasize onenand Used in several S5PV210-based Galaxy S devices, among them SGH-T959V, SGH-T959P, SGH-T839, and SPH-D700. Signed-off-by: Jonathan Bakker Signed-off-by: Paweł Chmiel Signed-off-by: Miquel Raynal drivers/mtd/nand/onenand/onenand_base.c | 2 ++ include/linux/mtd/onenand_regs.h | 1 + 2 files changed, 3 insertions(+) commit e42039452bc73d8d80df19d3b60a43eac2ad3b8b Author: Fabien Dessenne Date: Wed Apr 24 16:49:06 2019 +0200 mtd: rawnand: stm32_fmc2: manage the get_irq error case During probe, check the "get_irq" error value. Signed-off-by: Fabien Dessenne Acked-by: Christophe Kerello Signed-off-by: Miquel Raynal drivers/mtd/nand/raw/stm32_fmc2_nand.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 2099920ebeca38584d645969cb3a8698ca6c3450 Author: Stefan Agner Date: Fri Apr 19 09:47:17 2019 +0200 mtd: rawnand: use longest matching pattern Sometimes the exec_op parser does not choose the optimal pattern if multiple patterns with optional elements are available. Since the stack automatically splits operations in multiple exec_op calls, a non-optimal pattern gets broken up into multiple calls. E.g. an OOB read using the vf610 driver: nand: executing subop: nand: ->CMD [0x00] nand: ->ADDR [5 cyc: 00 08 ea 94 02] nand: ->CMD [0x30] nand: ->WAITRDY [max 200000 ms] nand: DATA_IN [64 B] nand: executing subop: nand: CMD [0x00] nand: ADDR [5 cyc: 00 08 ea 94 02] nand: CMD [0x30] nand: WAITRDY [max 200000 ms] nand: ->DATA_IN [64 B] However, the vf610 driver has a pattern which can execute the complete command in a single go... This patch makes sure that the longest matching pattern is chosen instead of the first (potentially only partial) match. With this change the vf610 reads the OOB in a single exec_op call: nand: executing subop: nand: ->CMD [0x00] nand: ->ADDR [5 cyc: 00 08 c0 1d 00] nand: ->CMD [0x30] nand: ->WAITRDY [max 200000 ms] nand: ->DATA_IN [64 B] Reported-by: Sascha Hauer Suggested-by: Boris Brezillon Tested-by: Stefan Agner Signed-off-by: Stefan Agner Signed-off-by: Miquel Raynal drivers/mtd/nand/raw/nand_base.c | 50 +++++++++++++++++++++++++++++----------- 1 file changed, 37 insertions(+), 13 deletions(-) commit 5b1bf3f6440ec53c640e498673a50e3626b488b6 Merge: c881e10e3f47 d763778224ea Author: David S. Miller Date: Thu Jun 27 11:03:22 2019 -0700 Merge branch 'FDB-VLAN-and-PTP-fixes-for-SJA1105-DSA' Vladimir Oltean says: ==================== FDB, VLAN and PTP fixes for SJA1105 DSA This patchset is an assortment of fixes for the net-next version of the sja1105 DSA driver: - Avoid a kernel panic when the driver fails to probe or unregisters - Finish Arnd Bermann's idea of compiling PTP support as part of the main DSA driver and not separately - Better handling of initial port-based VLAN as well as VLANs for dsa_8021q FDB entries - Fix address learning for the SJA1105 P/Q/R/S family - Make static FDB entries persistent across switch resets - Fix reporting of statically-added FDB entries in 'bridge fdb show' ==================== Signed-off-by: David S. Miller commit d763778224ea8005b650e12d8f4cd470265fe0b9 Author: Vladimir Oltean Date: Wed Jun 26 02:39:42 2019 +0300 net: dsa: sja1105: Implement is_static for FDB entries on E/T The first generation switches don't tell us through the dynamic config interface whether the dumped FDB entries are static or not (the LOCKEDS bit from P/Q/R/S). However, now that we're keeping a mirror of all 'bridge fdb' commands in the static config, this is an opportunity to compare a dumped FDB entry to the driver's private database. After all, what makes an entry static is that *we* added it. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller drivers/net/dsa/sja1105/sja1105_main.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit b3ee526a88d36dec752179d8866954a4e83f15aa Author: Vladimir Oltean Date: Wed Jun 26 02:39:41 2019 +0300 net: dsa: sja1105: Use correct dsa_8021q VIDs for FDB commands A FDB entry means that "frames that match this VID and DMAC must be forwarded to this port". In the case of dsa_8021q however, the VID is not a single one (and neither two, as my previous patch assumed). The VID can be set either by the CPU port (1 tx_vid), or by any of the other front-panel port (n-1 rx_vid's). Fixes: 93647594d8f5 ("net: dsa: sja1105: Hide the dsa_8021q VLANs from the bridge fdb command") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller drivers/net/dsa/sja1105/sja1105_main.c | 82 +++++++++++++++++++++++----------- 1 file changed, 56 insertions(+), 26 deletions(-) commit 17ae6555406a345c7d4096c4c274447e869e9384 Author: Vladimir Oltean Date: Wed Jun 26 02:39:40 2019 +0300 net: dsa: sja1105: Populate is_static for FDB entries on P/Q/R/S The reason why this wasn't tackled earlier is that I had hoped I understood the user manual wrong. But unfortunately hacks are required in order to retrieve the static/dynamic nature of FDB entries on SJA1105 P/Q/R/S, since this info is stored in the writeback buffer of the dynamic config command. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller drivers/net/dsa/sja1105/sja1105_dynamic_config.c | 62 ++++++++++++++++++++++-- drivers/net/dsa/sja1105/sja1105_main.c | 3 +- drivers/net/dsa/sja1105/sja1105_static_config.h | 2 +- 3 files changed, 62 insertions(+), 5 deletions(-) commit 4a95078636402d425ad1c8411aff44be30e6a962 Author: Vladimir Oltean Date: Wed Jun 26 02:39:39 2019 +0300 net: dsa: sja1105: Add a high-level overview of the dynamic config interface When trying to add support for LOCKEDS (static FDB entries) on SJA1105 P/Q/R/S, at first I didn't remember how the abstraction I created worked, and actually thought it works by mistake. To avoid other people staring at the code and not making much sense out of it, add some comments at the top of the file. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller drivers/net/dsa/sja1105/sja1105_dynamic_config.c | 92 ++++++++++++++++++++++++ 1 file changed, 92 insertions(+) commit 60f6053ff142217488d3f0d7b692f6a4ef45b99f Author: Vladimir Oltean Date: Wed Jun 26 02:39:38 2019 +0300 net: dsa: sja1105: Back up static FDB entries in kernel memory After commit 8456721dd4ec ("net: dsa: sja1105: Add support for configuring address ageing time"), we started to reset the switch rather often (each time the bridge core changes the ageing time on a switch port). The unfortunate reality is that SJA1105 doesn't have any {cold, warm, whatever} reset mode in which it accepts a new configuration stream without flushing the FDB. Instead, in its world, the FDB *is* an optional part of the static configuration. So we play its game, and do what we also do for VLANs: for each 'bridge fdb' command, we add the FDB entry through the dynamic interface, and we append the in-kernel static config memory with info that we're going to use later, when the next reset command is going to be issued. The result is that 'bridge fdb' commands are now persistent (dynamically learned entries are lost, but that's ok). Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller drivers/net/dsa/sja1105/sja1105_main.c | 111 +++++++++++++++++++++++++++++---- 1 file changed, 99 insertions(+), 12 deletions(-) commit 6c56e167cc1b60f69a265ead1ef7f413f0e2ed64 Author: Vladimir Oltean Date: Wed Jun 26 02:39:37 2019 +0300 net: dsa: sja1105: Make P/Q/R/S learn MAC addresses At the end of the commit 1da73821343c ("net: dsa: sja1105: Add FDB operations for P/Q/R/S series") message, I said that: At the moment only FDB entries installed statically through 'bridge fdb' are visible in the dump callback - the dynamically learned ones are still under investigation. It looks like the reason why they were not visible in 'bridge fdb' was that they were never learned - always flooded. SJA1105 P/Q/R/S manual says about the MAXADDRP[port] field: Specify the maximum number of MAC address dynamically learned from the respective port. It is used to limit the number of learned MAC addresses per port. It looks like not providing a value in the static config (aka providing zeroes) is enough for it to not store the learned addresses in the FDB. For now we divide the 1024 entry FDB "equally" amongst the 5 ports. This may be revisited if the situation calls for that - for now I'm happy that learning works. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller drivers/net/dsa/sja1105/sja1105_main.c | 3 +++ drivers/net/dsa/sja1105/sja1105_static_config.c | 4 ++++ drivers/net/dsa/sja1105/sja1105_static_config.h | 1 + 3 files changed, 8 insertions(+) commit 0803948e23dac864374d981b06460b7350cca1b9 Author: Vladimir Oltean Date: Wed Jun 26 02:39:36 2019 +0300 net: dsa: sja1105: Actually implement the P/Q/R/S FDB bits In commit 1da73821343c ("net: dsa: sja1105: Add FDB operations for P/Q/R/S series"), these bits were set in the static config, but apparently they did not do anything. The reason is that the packing accessors for them were part of a patch I forgot to send. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller drivers/net/dsa/sja1105/sja1105_static_config.c | 5 +++++ 1 file changed, 5 insertions(+) commit e3502b8297878130a9375f6fe1367dc317f79453 Author: Vladimir Oltean Date: Wed Jun 26 02:39:35 2019 +0300 net: dsa: sja1105: Make vid 1 the default pvid In SJA1105 there is no concept of 'default values' per se, everything needs to be driver-supplied through the static configuration tables. The issue is that the hardware manual says that 'at least the default untagging VLAN' is mandatory to be provided through the static config. But VLAN 0 isn't a very good initial pvid - its use is reserved for priority-tagged frames, and the layers of the stack that care about those already make sure that this VLAN is installed, as can be seen in the message below: 8021q: adding VLAN 0 to HW filter on device swp2 So change the pvid provided through the static configuration to 1, which matches the bridge core's defaults. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller drivers/net/dsa/sja1105/sja1105_main.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit 29dd908d355f565bc2c1ab475f0322b29e9cf3eb Author: Vladimir Oltean Date: Wed Jun 26 02:39:34 2019 +0300 net: dsa: sja1105: Cancel PTP delayed work on unregister Currently when the driver unloads and PTP is enabled, the delayed work that prevents the timecounter from expiring becomes a ticking time bomb. The kernel will schedule the work thread within 60 seconds of driver removal, but the work handler is no longer there, leading to this strange and inconclusive stack trace: [ 64.473112] Unable to handle kernel paging request at virtual address 79746970 [ 64.480340] pgd = 008c4af9 [ 64.483042] [79746970] *pgd=00000000 [ 64.486620] Internal error: Oops: 80000005 [#1] SMP ARM [ 64.491820] Modules linked in: [ 64.494871] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.2.0-rc5-01634-ge3a2773ba9e5 #1246 [ 64.503007] Hardware name: Freescale LS1021A [ 64.507259] PC is at 0x79746970 [ 64.510393] LR is at call_timer_fn+0x3c/0x18c [ 64.514729] pc : [<79746970>] lr : [] psr: 60010113 [ 64.520965] sp : c1901de0 ip : 00000000 fp : c1903080 [ 64.526163] r10: c1901e38 r9 : ffffe000 r8 : c19064ac [ 64.531363] r7 : 79746972 r6 : e98dd260 r5 : 00000100 r4 : c1a9e4a0 [ 64.537859] r3 : c1900000 r2 : ffffa400 r1 : 79746972 r0 : e98dd260 [ 64.544359] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none [ 64.551460] Control: 10c5387d Table: a8a2806a DAC: 00000051 [ 64.557176] Process swapper/0 (pid: 0, stack limit = 0x1ddb27f0) [ 64.563147] Stack: (0xc1901de0 to 0xc1902000) [ 64.567481] 1de0: eb6a4918 3d60d7c3 c1a9e554 e98dd260 eb6a34c0 c1a9e4a0 ffffa400 c19064ac [ 64.575616] 1e00: ffffe000 c03bd95c c1901e34 c1901e34 eb6a34c0 c1901e30 c1903d00 c186f4c0 [ 64.583751] 1e20: c1906488 29e34000 c1903080 c03bdca4 00000000 eaa6f218 00000000 eb6a45c0 [ 64.591886] 1e40: eb6a45c0 20010193 00000003 c03c0a68 20010193 3f7231be c1903084 00000002 [ 64.600022] 1e60: 00000082 00000001 ffffe000 c1a9e0a4 00000100 c0302298 02b64722 0000000f [ 64.608157] 1e80: c186b3c8 c1877540 c19064ac 0000000a c186b350 ffffa401 c1903d00 c1107348 [ 64.616292] 1ea0: 00200102 c0d87a14 ea823c00 ffffe000 00000012 00000000 00000000 ea810800 [ 64.624427] 1ec0: f0803000 c1876ba8 00000000 c034c784 c18774b8 c039fb50 c1906c90 c1978aac [ 64.632562] 1ee0: f080200c f0802000 c1901f10 c0709ca8 c03091a0 60010013 ffffffff c1901f44 [ 64.640697] 1f00: 00000000 c1900000 c1876ba8 c0301a8c 00000000 000070a0 eb6ac1a0 c031da60 [ 64.648832] 1f20: ffffe000 c19064ac c19064f0 00000001 00000000 c1906488 c1876ba8 00000000 [ 64.656967] 1f40: ffffffff c1901f60 c030919c c03091a0 60010013 ffffffff 00000051 00000000 [ 64.665102] 1f60: ffffe000 c0376aa4 c1a9da37 ffffffff 00000037 3f7231be c1ab20c0 000000cc [ 64.673238] 1f80: c1906488 c1906480 ffffffff 00000037 c1ab20c0 c1ab20c0 00000001 c0376e1c [ 64.681373] 1fa0: c1ab2118 c1700ea8 ffffffff ffffffff 00000000 c1700754 c17dfa40 ebfffd80 [ 64.689509] 1fc0: 00000000 c17dfa40 3f7733be 00000000 00000000 c1700330 00000051 10c0387d [ 64.697644] 1fe0: 00000000 8f000000 410fc075 10c5387d 00000000 00000000 00000000 00000000 [ 64.705788] [] (call_timer_fn) from [] (expire_timers+0xd8/0x144) [ 64.713579] [] (expire_timers) from [] (run_timer_softirq+0xe4/0x1dc) [ 64.721716] [] (run_timer_softirq) from [] (__do_softirq+0x130/0x3c8) [ 64.729854] [] (__do_softirq) from [] (irq_exit+0xbc/0xd8) [ 64.737040] [] (irq_exit) from [] (__handle_domain_irq+0x60/0xb4) [ 64.744833] [] (__handle_domain_irq) from [] (gic_handle_irq+0x58/0x9c) [ 64.753143] [] (gic_handle_irq) from [] (__irq_svc+0x6c/0x90) [ 64.760583] Exception stack(0xc1901f10 to 0xc1901f58) [ 64.765605] 1f00: 00000000 000070a0 eb6ac1a0 c031da60 [ 64.773740] 1f20: ffffe000 c19064ac c19064f0 00000001 00000000 c1906488 c1876ba8 00000000 [ 64.781873] 1f40: ffffffff c1901f60 c030919c c03091a0 60010013 ffffffff [ 64.788456] [] (__irq_svc) from [] (arch_cpu_idle+0x38/0x3c) [ 64.795816] [] (arch_cpu_idle) from [] (do_idle+0x1bc/0x298) [ 64.803175] [] (do_idle) from [] (cpu_startup_entry+0x18/0x1c) [ 64.810707] [] (cpu_startup_entry) from [] (start_kernel+0x480/0x4ac) [ 64.818839] Code: bad PC value [ 64.821890] ---[ end trace e226ed97b1c584cd ]--- [ 64.826482] Kernel panic - not syncing: Fatal exception in interrupt [ 64.832807] CPU1: stopping [ 64.835501] CPU: 1 PID: 0 Comm: swapper/1 Tainted: G D 5.2.0-rc5-01634-ge3a2773ba9e5 #1246 [ 64.845013] Hardware name: Freescale LS1021A [ 64.849266] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 64.856972] [] (show_stack) from [] (dump_stack+0xb4/0xc8) [ 64.864159] [] (dump_stack) from [] (handle_IPI+0x3bc/0x3dc) [ 64.871519] [] (handle_IPI) from [] (gic_handle_irq+0x98/0x9c) [ 64.879050] [] (gic_handle_irq) from [] (__irq_svc+0x6c/0x90) [ 64.886489] Exception stack(0xea8cbf60 to 0xea8cbfa8) [ 64.891514] bf60: 00000000 0000307c eb6c11a0 c031da60 ffffe000 c19064ac c19064f0 00000002 [ 64.899649] bf80: 00000000 c1906488 c1876ba8 00000000 00000000 ea8cbfb0 c030919c c03091a0 [ 64.907780] bfa0: 600d0013 ffffffff [ 64.911250] [] (__irq_svc) from [] (arch_cpu_idle+0x38/0x3c) [ 64.918609] [] (arch_cpu_idle) from [] (do_idle+0x1bc/0x298) [ 64.925967] [] (do_idle) from [] (cpu_startup_entry+0x18/0x1c) [ 64.933496] [] (cpu_startup_entry) from [<803025cc>] (0x803025cc) [ 64.940422] Rebooting in 3 seconds.. In this case, what happened is that the DSA driver failed to probe at boot time due to a PHY issue during phylink_connect_phy: [ 2.245607] fsl-gianfar soc:ethernet@2d90000 eth2: error -19 setting up slave phy [ 2.258051] sja1105 spi0.1: failed to create slave for port 0.0 Fixes: bb77f36ac21d ("net: dsa: sja1105: Add support for the PTP clock") Signed-off-by: Vladimir Oltean Acked-by: Willem de Bruijn Signed-off-by: David S. Miller drivers/net/dsa/sja1105/sja1105_ptp.c | 1 + 1 file changed, 1 insertion(+) commit 3d64ea387cc3ba884f9d2b5c41a8625d48deb933 Author: Vladimir Oltean Date: Wed Jun 26 02:39:33 2019 +0300 net: dsa: sja1105: Build PTP support in main DSA driver As Arnd Bergmann pointed out in commit 78fe8a28fb96 ("net: dsa: sja1105: fix ptp link error"), there is no point in having PTP support as a separate loadable kernel module. So remove the exported symbols and make sja1105.ko contain PTP support or not based on CONFIG_NET_DSA_SJA1105_PTP. Signed-off-by: Vladimir Oltean Acked-by: Willem de Bruijn Signed-off-by: David S. Miller drivers/net/dsa/sja1105/Makefile | 2 +- drivers/net/dsa/sja1105/sja1105_ptp.c | 12 ------------ drivers/net/dsa/sja1105/sja1105_spi.c | 2 -- drivers/net/dsa/sja1105/sja1105_static_config.c | 3 --- 4 files changed, 1 insertion(+), 18 deletions(-) commit c881e10e3f47df8a403c23589f204816bfb2a41d Merge: 1c57de695142 d4bcd99cd9d6 Author: David S. Miller Date: Thu Jun 27 11:00:32 2019 -0700 Merge branch 'net-dsa-microchip-Convert-to-regmap' Marek Vasut says: ==================== net: dsa: microchip: Convert to regmap This patchset converts KSZ9477 switch driver to regmap. This was tested with extra patches on KSZ8795. This was also tested on KSZ9477 on Microchip KSZ9477EVB board, which I now have. ==================== Signed-off-by: Marek Vasut commit d4bcd99cd9d63db1813a23cbdeb2e03b86a86379 Author: Marek Vasut Date: Wed Jun 26 01:43:48 2019 +0200 net: dsa: microchip: Replace ad-hoc bit manipulation with regmap Regmap provides bit manipulation functions to set/clear bits, use those insted of reimplementing them. Signed-off-by: Marek Vasut Cc: Andrew Lunn Cc: Florian Fainelli Cc: Tristram Ha Cc: Woojung Huh Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz9477.c | 46 +++++-------------------------------- 1 file changed, 6 insertions(+), 40 deletions(-) commit 255b59ad0db213d693028e52a4b69a98f2381db7 Author: Marek Vasut Date: Wed Jun 26 01:43:47 2019 +0200 net: dsa: microchip: Factor out regmap config generation into common header The regmap config tables are rather similar for various generations of the KSZ8xxx/KSZ9xxx switches. Introduce a macro which allows generating those tables without duplication. Note that $regalign parameter is not used right now, but will be used in KSZ87xx series switches. Signed-off-by: Marek Vasut Cc: Andrew Lunn Cc: Florian Fainelli Cc: Tristram Ha Cc: Woojung Huh Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz9477_spi.c | 29 +++-------------------------- drivers/net/dsa/microchip/ksz_common.h | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 26 deletions(-) commit ee394fea6f0671fc2bb7e63161129a5d73d8d6e1 Author: Marek Vasut Date: Wed Jun 26 01:43:46 2019 +0200 net: dsa: microchip: Dispose of ksz_io_ops Since the driver now uses regmap , get rid of ad-hoc ksz_io_ops abstraction, which no longer has any meaning. Moreover, since regmap has it's own locking, get rid of the register access mutex. Signed-off-by: Marek Vasut Cc: Andrew Lunn Cc: Florian Fainelli Cc: Tristram Ha Cc: Woojung Huh Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz9477_spi.c | 57 +-------------------------------- drivers/net/dsa/microchip/ksz_common.c | 6 +--- drivers/net/dsa/microchip/ksz_common.h | 50 ++++++++--------------------- drivers/net/dsa/microchip/ksz_priv.h | 16 +-------- 4 files changed, 17 insertions(+), 112 deletions(-) commit 46558d601cb6e245d9427d5044106a30811959fb Author: Marek Vasut Date: Wed Jun 26 01:43:45 2019 +0200 net: dsa: microchip: Initial SPI regmap support Add basic SPI regmap support into the driver. Previous patches unconver that ksz_spi_write() is always ever called with len = 1, 2 or 4. We can thus drop the if (len > SPI_TX_BUF_LEN) check and we can also drop the allocation of the txbuf which is part of the driver data and wastes 256 bytes for no reason. Regmap covers the whole thing now. Signed-off-by: Marek Vasut Cc: Andrew Lunn Cc: Florian Fainelli Cc: Tristram Ha Cc: Woojung Huh Signed-off-by: David S. Miller drivers/net/dsa/microchip/Kconfig | 1 + drivers/net/dsa/microchip/ksz9477_spi.c | 114 ++++++++++++++------------------ drivers/net/dsa/microchip/ksz_priv.h | 3 +- 3 files changed, 52 insertions(+), 66 deletions(-) commit ff509dab43763899bff796c8ae5e57261ff18edc Author: Marek Vasut Date: Wed Jun 26 01:43:44 2019 +0200 net: dsa: microchip: Factor out register access opcode generation Factor out the code which sends out the register read/write opcodes to the switch, since the code differs in single bit between read and write. Signed-off-by: Marek Vasut Cc: Andrew Lunn Cc: Florian Fainelli Cc: Tristram Ha Cc: Woojung Huh Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz9477_spi.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit 5ce9676e8b42fbe8030972e5631990545b34e2f3 Author: Marek Vasut Date: Wed Jun 26 01:43:43 2019 +0200 net: dsa: microchip: Use PORT_CTRL_ADDR() instead of indirect function call The indirect function call to dev->dev_ops->get_port_addr() is expensive especially if called for every single register access, and only returns the value of PORT_CTRL_ADDR() macro. Use PORT_CTRL_ADDR() macro directly instead. Signed-off-by: Marek Vasut Cc: Andrew Lunn Cc: Florian Fainelli Cc: Tristram Ha Cc: Woojung Huh Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz9477.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bafea01f65877adc2778a3a58d3268a42a329eec Author: Marek Vasut Date: Wed Jun 26 01:43:42 2019 +0200 net: dsa: microchip: Move ksz_cfg and ksz_port_cfg to ksz9477.c These functions are only used by the KSZ9477 code, move them from the header into that code. Note that these functions will be soon replaced by regmap equivalents. Signed-off-by: Marek Vasut Cc: Andrew Lunn Cc: Florian Fainelli Cc: Tristram Ha Cc: Woojung Huh Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz9477.c | 29 +++++++++++++++++++++++++++++ drivers/net/dsa/microchip/ksz_common.h | 29 ----------------------------- 2 files changed, 29 insertions(+), 29 deletions(-) commit 860cbe92ff2168eff1b0a28ff61c3573900ac9d0 Author: Marek Vasut Date: Wed Jun 26 01:43:41 2019 +0200 net: dsa: microchip: Inline ksz_spi.h The functions in the header file are static, and the header file is included from single C file, just inline the code into the C file. The bonus is that it's easier to spot further content to clean up. Signed-off-by: Marek Vasut Cc: Andrew Lunn Cc: Florian Fainelli Cc: Tristram Ha Cc: Woojung Huh Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz9477_spi.c | 43 +++++++++++++++++++++++- drivers/net/dsa/microchip/ksz_spi.h | 59 --------------------------------- 2 files changed, 42 insertions(+), 60 deletions(-) commit 78e4e32fe3cae4c55c8d6bbe2599098a1f43f2cb Author: Marek Vasut Date: Wed Jun 26 01:43:40 2019 +0200 net: dsa: microchip: Remove ksz_{get,set}() These functions and callbacks are never used, remove them. Signed-off-by: Marek Vasut Cc: Andrew Lunn Cc: Florian Fainelli Cc: Tristram Ha Cc: Woojung Huh Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz9477_spi.c | 2 -- drivers/net/dsa/microchip/ksz_common.h | 24 ------------------------ drivers/net/dsa/microchip/ksz_priv.h | 2 -- drivers/net/dsa/microchip/ksz_spi.h | 10 ---------- 4 files changed, 38 deletions(-) commit 77972783fde317f10ad69f9cd2f6387c704f9581 Author: Marek Vasut Date: Wed Jun 26 01:43:39 2019 +0200 net: dsa: microchip: Remove ksz_{read,write}24() These functions and callbacks are never used, remove them. Signed-off-by: Marek Vasut Cc: Andrew Lunn Cc: Florian Fainelli Cc: Tristram Ha Cc: Woojung Huh Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz9477_spi.c | 25 ------------------------- drivers/net/dsa/microchip/ksz_common.h | 22 ---------------------- drivers/net/dsa/microchip/ksz_priv.h | 2 -- 3 files changed, 49 deletions(-) commit 6b4021deb03f579e59feb7c787846044433cabf8 Author: Wen Gong Date: Mon Jun 17 15:37:28 2019 +0800 ath10k: add new hw_ops for sdio chip It report error message while suspend/resume test. dmesg log: [ 150.749962] ath10k_sdio mmc1:0001:1: hif read32 not supported [ 150.755728] ath10k_sdio mmc1:0001:1: failed to set coverage class: expected integer microsecond value in register Reason is sdio chip does not support set_coverage_class as well as pcie chip, remove the set_coverage_class handler will avoid it. callstack of the error message: OUTLINED_FUNCTION_6+0xc/0x14 [ath10k_core] ath10k_mac_op_set_coverage_class+0x2c/0x40 [ath10k_core] ieee80211_reconfig+0x5d0/0x108c [mac80211] ieee80211_resume+0x34/0x6c [mac80211] wiphy_resume+0xbc/0x13c [cfg80211] dpm_run_callback+0xa4/0x168 device_resume+0x1d4/0x200 async_resume+0x1c/0x34 async_run_entry_fn+0x48/0xf8 process_one_work+0x178/0x2f8 worker_thread+0x1d8/0x2cc kthread+0x11c/0x12c ret_from_fork+0x10/0x18 the error log will not happen after this patch applied. Tested with QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00007-QCARMSWP-1. Signed-off-by: Wen Gong Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.c | 2 +- drivers/net/wireless/ath/ath10k/hw.c | 4 ++++ drivers/net/wireless/ath/ath10k/hw.h | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) commit 1c57de69514227216c8f043ac5550ba3c6cdbfc6 Merge: 0b58f64845f3 04f207fb0c2f Author: David S. Miller Date: Thu Jun 27 10:58:32 2019 -0700 Merge branch 'net-aquantia-implement-vlan-offloads' Igor Russkikh says: ==================== net: aquantia: implement vlan offloads This patchset introduces hardware VLAN offload support and also does some maintenance: we replace driver version with uts version string, add documentation file for atlantic driver, and update maintainers adding Igor as a maintainer. v3: shuffle doc sections, per Andrew's comments v2: updates in doc, gpl spdx tag cleanup ==================== Signed-off-by: David S. Miller commit 04f207fb0c2fa768da1fd30642bb83554c46847f Author: Igor Russkikh Date: Wed Jun 26 12:35:49 2019 +0000 net: aquantia: implement vlan offload configuration set_features should update flags and reinit hardware if vlan offload settings were changed. Signed-off-by: Igor Russkikh Tested-by: Nikita Danilov Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_main.c | 34 +++++++++++++++++++----- 1 file changed, 27 insertions(+), 7 deletions(-) commit 880b3ca5043d16c887cc8ad22eb6831cace048b9 Author: Igor Russkikh Date: Wed Jun 26 12:35:46 2019 +0000 net: aquantia: vlan offloads logic in datapath Update datapath by adding logic related to hardware assisted vlan strip/insert behaviour. Tested-by: Nikita Danilov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 23 +++++++--- drivers/net/ethernet/aquantia/atlantic/aq_ring.c | 4 ++ .../ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c | 52 ++++++++++++++++------ 3 files changed, 60 insertions(+), 19 deletions(-) commit d3ed7c5cf79bb9099c9a3fc5c1d90b51d13a4453 Author: Igor Russkikh Date: Wed Jun 26 12:35:44 2019 +0000 net: aquantia: adding fields and device features for vlan offload Updating features and vlan_features with vlan HW offload. Added vlan_tag fields to rx/tx ring_buff to track vlan related data. Tested-by: Nikita Danilov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 9 ++++++--- drivers/net/ethernet/aquantia/atlantic/aq_nic.h | 2 ++ drivers/net/ethernet/aquantia/atlantic/aq_ring.h | 9 ++++++--- drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c | 2 +- drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c | 10 +++++++--- 5 files changed, 22 insertions(+), 10 deletions(-) commit 161dea83f1c7304403ceb66645f3acda47f997da Author: Igor Russkikh Date: Wed Jun 26 12:35:42 2019 +0000 net: aquantia: added vlan offload related macros and functions Register declaration macros required to work with vlan offload mode. Tested-by: Nikita Danilov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller .../aquantia/atlantic/hw_atl/hw_atl_b0_internal.h | 7 +++++++ .../net/ethernet/aquantia/atlantic/hw_atl/hw_atl_llh.c | 16 ++++++++++++++++ .../net/ethernet/aquantia/atlantic/hw_atl/hw_atl_llh.h | 5 +++++ .../aquantia/atlantic/hw_atl/hw_atl_llh_internal.h | 18 ++++++++++++++++++ 4 files changed, 46 insertions(+) commit 17f54a3bf540690ac4b6f9e9e6d69fc9baf465d9 Author: Igor Russkikh Date: Wed Jun 26 12:35:40 2019 +0000 net: aquantia: make all files GPL-2.0-only It was noticed some files had -or-later, however overall driver has -only license. Clean this up. Signed-off-by: Igor Russkikh Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_drvinfo.c | 2 +- drivers/net/ethernet/aquantia/atlantic/aq_drvinfo.h | 2 +- drivers/net/ethernet/aquantia/atlantic/aq_filters.c | 2 +- drivers/net/ethernet/aquantia/atlantic/aq_filters.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit f94551c88d5656f4d39a958e73cc69cecb8f73d4 Author: Igor Russkikh Date: Wed Jun 26 12:35:37 2019 +0000 maintainers: declare aquantia atlantic driver maintenance Aquantia is resposible now for all new features and bugfixes. Reflect that in MAINTAINERS. Signed-off-by: Igor Russkikh Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller MAINTAINERS | 9 +++++++++ 1 file changed, 9 insertions(+) commit 5a5d7a4dd4373d2bea000eaf290b3d73710174f1 Author: Igor Russkikh Date: Wed Jun 26 12:35:35 2019 +0000 net: aquantia: add documentation for the atlantic driver Document contains configuration options description, details and examples of driver various settings. Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller .../device_drivers/aquantia/atlantic.txt | 439 +++++++++++++++++++++ 1 file changed, 439 insertions(+) commit 2d3910c4dc37813fedab8f056a62451eaf202c3a Author: Igor Russkikh Date: Wed Jun 26 12:35:33 2019 +0000 net: aquantia: replace internal driver version code with uts As it was discussed some time previously, driver is better to report kernel version string, as it in a best way identifies the codebase. Signed-off-by: Igor Russkikh Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_cfg.h | 7 +++---- drivers/net/ethernet/aquantia/atlantic/ver.h | 5 ----- 2 files changed, 3 insertions(+), 9 deletions(-) commit 1a276003111c0404f6bfeffe924c5a21f482428b Author: Ahmad Masri Date: Sun Jun 16 10:26:07 2019 +0300 wil6210: drop old event after wmi_call timeout This change fixes a rare race condition of handling WMI events after wmi_call expires. wmi_recv_cmd immediately handles an event when reply_buf is defined and a wmi_call is waiting for the event. However, in case the wmi_call has already timed-out, there will be no waiting/running wmi_call and the event will be queued in WMI queue and will be handled later in wmi_event_handle. Meanwhile, a new similar wmi_call for the same command and event may be issued. In this case, when handling the queued event we got WARN_ON printed. Fixing this case as a valid timeout and drop the unexpected event. Signed-off-by: Ahmad Masri Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/wmi.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 2a32c20b76af39185a5bf8fa617b94295660893f Author: Ahmad Masri Date: Sun Jun 16 10:26:06 2019 +0300 wil6210: set WIL_WMI_CALL_GENERAL_TO_MS as wmi_call timeout Replace all wmi_call timeouts that are less than 100 msec to use WIL_WMI_CALL_GENERAL_TO_MS (100 msec) as a default. Some of the current wmi_call timeouts are too short and fails to receive its waiting events. Signed-off-by: Ahmad Masri Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/cfg80211.c | 3 ++- drivers/net/wireless/ath/wil6210/debugfs.c | 2 +- drivers/net/wireless/ath/wil6210/txrx.c | 9 +++++--- drivers/net/wireless/ath/wil6210/wil6210.h | 1 + drivers/net/wireless/ath/wil6210/wmi.c | 32 +++++++++++++++++------------ 5 files changed, 29 insertions(+), 18 deletions(-) commit 9b586118730e1b86dc3c8d8523effc712c5a2bfc Author: Tzahi Sabo Date: Sun Jun 16 10:26:05 2019 +0300 wil6210: add support for reading multiple RFs temperature via debugfs Base-band chips support multi RFs chips. Add support for reading multiple RFs temperature via debugfs. Signed-off-by: Tzahi Sabo Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/debugfs.c | 42 ++++++++++++++++++++------ drivers/net/wireless/ath/wil6210/wil6210.h | 3 ++ drivers/net/wireless/ath/wil6210/wmi.c | 42 ++++++++++++++++++++++++++ drivers/net/wireless/ath/wil6210/wmi.h | 47 +++++++++++++++++++++++++----- 4 files changed, 117 insertions(+), 17 deletions(-) commit 3e7ee09d36a68a57721916899075396f7ed35a46 Author: Maya Erez Date: Sun Jun 16 10:26:04 2019 +0300 wil6210: publish max_msdu_size to FW on BCAST ring Set max_msdu_size in WMI_BCAST_DESC_RING_ADD_CMD to allow FW to optimize the buffers allocation for bcast packets. Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/wmi.c | 1 + 1 file changed, 1 insertion(+) commit c478ac9daae6f19621997250900bf4fef74d3b25 Author: Alexei Avshalom Lazar Date: Sun Jun 16 10:26:03 2019 +0300 wil6210: update cid boundary check of wil_find_cid/_by_idx() The return value of wil_find_cid()/wil_find_cid_by_idx() is validated with the lower boundary value. Check the upper boundary value as well. Signed-off-by: Alexei Avshalom Lazar Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/cfg80211.c | 6 +++--- drivers/net/wireless/ath/wil6210/main.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) commit f2b6b46e483b9a084088853ecc4123118791829e Author: Maya Erez Date: Sun Jun 16 10:26:02 2019 +0300 wil6210: clear FW and ucode log address Clear the FW and ucode log address on device initialization to allow user space app identify when the address was set by FW/ucode and it can start read. Signed-off-by: Tzahi Sabo Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/main.c | 15 +++++++++++++++ drivers/net/wireless/ath/wil6210/pcie_bus.c | 1 + drivers/net/wireless/ath/wil6210/wil6210.h | 1 + 3 files changed, 17 insertions(+) commit dedec35b40195f56d16386eea51c8255bf034dba Author: Dedy Lansky Date: Sun Jun 16 10:26:01 2019 +0300 wil6210: fix printout in wil_read_pmccfg Replace sprintf with snprintf which checks the destination buffer size. Signed-off-by: Dedy Lansky Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/debugfs.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit c5b3a6582b1e9fad0fb0b8658855387c0cbcc576 Author: Alexei Avshalom Lazar Date: Sun Jun 16 10:26:00 2019 +0300 wil6210: Add support for setting RBUFCAP configuration RBUFCAP support added in FW. The RBUFCAP feature is amendment to the block ack mechanism to prevent overloading of the recipient’s memory space, which may happen in case the link speed is higher than STA’s capability to process or consume incoming data. The block ack policy (ba_policy) is now controlled by FW so driver should ignore this field. Add new debugfs "rbufcap" to configure RBUFCAP. Signed-off-by: Alexei Avshalom Lazar Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/debugfs.c | 39 +++++++++++++++++++++++++++ drivers/net/wireless/ath/wil6210/rx_reorder.c | 31 ++++++++------------- drivers/net/wireless/ath/wil6210/wil6210.h | 1 + drivers/net/wireless/ath/wil6210/wmi.c | 39 +++++++++++++++++++++++++-- 4 files changed, 88 insertions(+), 22 deletions(-) commit 96b77bb044706317d4955129e3ce2580ffb97b82 Author: Ahmad Masri Date: Sun Jun 16 10:25:59 2019 +0300 wil6210: increase the frequency of status ring hw tail update The driver updates Tx status ring HW tail only after it finishes processing the whole status ring, while the HW is still transmitting from other transmit rings. This can cause back-pressure on HW if no status entries are available. Update HW tail of Tx status ring without waiting for the end of the processing to help feeding back the HW with status entries and to allow additional packet transmission. Signed-off-by: Ahmad Masri Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/txrx_edma.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit c903ece596cb80a51dc962925a88d2147b479c29 Author: Ahmad Masri Date: Sun Jun 16 10:25:58 2019 +0300 wil6210: enlarge Tx status ring size With multiple clients and in high throughput scenarios, Tx status ring can get full and become a bottleneck in Tx transmission. Set the default Tx status ring size order to 13, previous value was 12. This will double the status ring size from 4K entries to 8K entries. Signed-off-by: Ahmad Masri Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/txrx_edma.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b913e33076c81165a62ae164259a7915ffa53dc1 Author: Alexei Avshalom Lazar Date: Sun Jun 16 10:25:57 2019 +0300 wil6210: do not reset FW in STA to P2P client interface switch Currently the FW is reset on every interface type change, because of various FW bugs. FW reset is not required when switching from STA to P2P client, hence can be skipped. Signed-off-by: Alexei Avshalom Lazar Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/cfg80211.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 0b58f64845f3ff39edbd4b6f796350e1bb4da8b9 Merge: 096cc49c47a1 fae6cad17ce3 Author: David S. Miller Date: Thu Jun 27 10:49:06 2019 -0700 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2019-06-26 This series contains updates to ixgbe and i40e only. Mauro S. M. Rodrigues update the ixgbe driver to handle transceivers who comply with SFF-8472 but do not implement the Digital Diagnostic Monitoring (DOM) interface. Update the driver to check the necessary bits to see if DOM is implemented before trying to read the additional 256 bytes in the EEPROM for DOM data. Young Xiao fixes a potential divide by zero issue in ixgbe driver. Aleksandr fixes i40e to recognize 2.5 and 5.0 GbE link speeds so that it is not reported as "Unknown bps". Fixes the driver to read the firmware LLDP agent status during DCB initialization, and to properly log the LLDP agent status to help with debugging when DCB fails to initialize. Martyna fixes i40e for the missing supported and advertised link modes information in ethtool. Jake fixes a function header comment that was incorrect for a PTP function in i40e. Maciej fixes an issue for i40e when a XDP program is loaded the descriptor count gets reset to the default value, resolve the issue by making the current descriptor count persistent across resets. Alice corrects a copyright date which she found to be incorrect. Piotr adds a log entry when the traffic class 0 is added or deleted, which was not being logged previously. Gustavo A. R. Silva updates i40e to use struct_size() where possible. ==================== Signed-off-by: David S. Miller commit ce564170dfe5f7bcc5e198c37543d2d4fc80e1ee Author: Greg Kroah-Hartman Date: Tue Jun 11 21:10:24 2019 +0200 wil6210: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Maya Erez Cc: Kalle Valo Cc: "David S. Miller" Cc: linux-wireless@vger.kernel.org Cc: wil6210@qti.qualcomm.com Signed-off-by: Greg Kroah-Hartman Reviewed-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/debugfs.c | 80 ++++++++---------------------- 1 file changed, 22 insertions(+), 58 deletions(-) commit d7865933af9ed38f39cf085e1def44b637109999 Author: Vignesh Raghavendra Date: Tue Jun 25 13:27:45 2019 +0530 dt-bindings: mtd: Add bindings for TI's AM654 HyperBus memory controller Add binding documentation for TI's HyperBus memory controller present on AM654 SoC. Signed-off-by: Vignesh Raghavendra Signed-off-by: Miquel Raynal .../devicetree/bindings/mtd/ti,am654-hbmc.txt | 51 ++++++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 52 insertions(+) commit dcc7d3446a0fa19bd7e8074920b8f9ef3b7ec00c Author: Vignesh Raghavendra Date: Tue Jun 25 13:27:44 2019 +0530 mtd: Add support for HyperBus memory devices Cypress' HyperBus is Low Signal Count, High Performance Double Data Rate Bus interface between a host system master and one or more slave interfaces. HyperBus is used to connect microprocessor, microcontroller, or ASIC devices with random access NOR flash memory (called HyperFlash) or self refresh DRAM (called HyperRAM). Its a 8-bit data bus (DQ[7:0]) with Read-Write Data Strobe (RWDS) signal and either Single-ended clock(3.0V parts) or Differential clock (1.8V parts). It uses ChipSelect lines to select b/w multiple slaves. At bus level, it follows a separate protocol described in HyperBus specification[1]. HyperFlash follows CFI AMD/Fujitsu Extended Command Set (0x0002) similar to that of existing parallel NORs. Since HyperBus is x8 DDR bus, its equivalent to x16 parallel NOR flash with respect to bits per clock cycle. But HyperBus operates at >166MHz frequencies. HyperRAM provides direct random read/write access to flash memory array. But, HyperBus memory controllers seem to abstract implementation details and expose a simple MMIO interface to access connected flash. Add support for registering HyperFlash devices with MTD framework. MTD maps framework along with CFI chip support framework are used to support communicating with flash. Framework is modelled along the lines of spi-nor framework. HyperBus memory controller (HBMC) drivers calls hyperbus_register_device() to register a single HyperFlash device. HyperFlash core parses MMIO access information from DT, sets up the map_info struct, probes CFI flash and registers it with MTD framework. Some HBMC masters need calibration/training sequence[3] to be carried out, in order for DLL inside the controller to lock, by reading a known string/pattern. This is done by repeatedly reading CFI Query Identification String. Calibration needs to be done before trying to detect flash as part of CFI flash probe. HyperRAM is not supported at the moment. HyperBus specification can be found at[1] HyperFlash datasheet can be found at[2] [1] https://www.cypress.com/file/213356/download [2] https://www.cypress.com/file/213346/download [3] http://www.ti.com/lit/ug/spruid7b/spruid7b.pdf Table 12-5741. HyperFlash Access Sequence Signed-off-by: Vignesh Raghavendra Signed-off-by: Miquel Raynal MAINTAINERS | 7 ++ drivers/mtd/Kconfig | 2 + drivers/mtd/Makefile | 1 + drivers/mtd/hyperbus/Kconfig | 11 +++ drivers/mtd/hyperbus/Makefile | 3 + drivers/mtd/hyperbus/hyperbus-core.c | 153 +++++++++++++++++++++++++++++++++++ include/linux/mtd/hyperbus.h | 84 +++++++++++++++++++ 7 files changed, 261 insertions(+) commit 89ebf2b8501c41b16b093fbf8b617fb5630445d9 Author: Vignesh Raghavendra Date: Tue Jun 25 13:27:43 2019 +0530 dt-bindings: mtd: Add binding documentation for HyperFlash Add DT binding documentation for HyperFlash devices. Signed-off-by: Vignesh Raghavendra Reviewed-by: Rob Herring Signed-off-by: Miquel Raynal .../devicetree/bindings/mtd/cypress,hyperflash.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 4844ef80305d0180051d0787cd91c63573255dc2 Author: Vignesh Raghavendra Date: Tue Jun 25 13:27:42 2019 +0530 mtd: cfi_cmdset_0002: Add support for polling status register HyperFlash devices are compliant with CFI AMD/Fujitsu Extended Command Set (0x0002) for flash operations, therefore drivers/mtd/chips/cfi_cmdset_0002.c can be used as is. But these devices do not support DQ polling method of determining chip ready/good status. These flashes provide Status Register whose bits can be polled to know status of flash operation. Cypress HyperFlash datasheet here[1], talks about CFI Amd/Fujitsu Extended Query version 1.5. Bit 0 of "Software Features supported" field of CFI Primary Vendor-Specific Extended Query table indicates presence/absence of status register and Bit 1 indicates whether or not DQ polling is supported. Using these bits, its possible to determine whether flash supports DQ polling or need to use Status Register. Add support for polling Status Register to know device ready/status of erase/write operations when DQ polling is not supported. Print error messages on erase/program failure by looking at related Status Register bits. [1] https://www.cypress.com/file/213346/download Signed-off-by: Vignesh Raghavendra Reviewed-by: Tokunori Ikegami Signed-off-by: Miquel Raynal drivers/mtd/chips/cfi_cmdset_0002.c | 130 +++++++++++++++++++++++++++++++----- include/linux/mtd/cfi.h | 7 ++ 2 files changed, 120 insertions(+), 17 deletions(-) commit 4ba641262b91e4b360564b646ad0ff2166b07ade Author: Christian Lamparter Date: Sat Jun 15 12:00:08 2019 +0200 carl9170: remove dead branch in op_conf_tx callback This patch removes the error branch for (queue > ar->hw->queues). It is no longer needed anymore as the "queue" value is validated by cfg80211's parse_txq_params() before the driver code gets called. Some background: In the old days (linux 2.6 and early 3.x), the parse_txq_params() function did not verify the "queue" value. That's why these drivers had to do it. Signed-off-by: Christian Lamparter Signed-off-by: Kalle Valo drivers/net/wireless/ath/carl9170/main.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 99a125f8edec391e423962847c6fd1d6994f0ad8 Author: Chris Packham Date: Wed May 22 12:06:28 2019 +1200 mtd: cfi_cmdset_0002: dynamically determine the max sectors Because PPB unlocking unlocks the whole chip cfi_ppb_unlock() needs to remember the locked status for each sector so it can re-lock the unaddressed sectors. Dynamically calculate the maximum number of sectors rather than using a hardcoded value that is too small for larger chips. Tested with Spansion S29GL01GS11TFI flash device. Signed-off-by: Chris Packham Reviewed-by: Stefan Roese Acked-by: Vignesh Raghavendra Signed-off-by: Miquel Raynal drivers/mtd/chips/cfi_cmdset_0002.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit feb09b2933275a70917a869989ea2823e7356be8 Author: Christian Lamparter Date: Sat Jun 8 16:49:47 2019 +0200 carl9170: fix misuse of device driver API This patch follows Alan Stern's recent patch: "p54: Fix race between disconnect and firmware loading" that overhauled carl9170 buggy firmware loading and driver unbinding procedures. Since the carl9170 code was adapted from p54 it uses the same functions and is likely to have the same problem, but it's just that the syzbot hasn't reproduce them (yet). a summary from the changes (copied from the p54 patch): * Call usb_driver_release_interface() rather than device_release_driver(). * Lock udev (the interface's parent) before unbinding the driver instead of locking udev->parent. * During the firmware loading process, take a reference to the USB interface instead of the USB device. * Don't take an unnecessary reference to the device during probe (and then don't drop it during disconnect). and * Make sure to prevent use-after-free bugs by explicitly setting the driver context to NULL after signaling the completion. Cc: Cc: Alan Stern Signed-off-by: Christian Lamparter Acked-by: Alan Stern Signed-off-by: Kalle Valo drivers/net/wireless/ath/carl9170/usb.c | 39 ++++++++++++++------------------- 1 file changed, 17 insertions(+), 22 deletions(-) commit df5c4150501ee7e86383be88f6490d970adcf157 Author: Zefir Kurtisi Date: Tue Jun 11 15:36:56 2019 +0200 ath9k: correctly handle short radar pulses In commit 3c0efb745a17 ("ath9k: discard undersized packets") the lower bound of RX packets was set to 10 (min ACK size) to filter those that would otherwise be treated as invalid at mac80211. Alas, short radar pulses are reported as PHY_ERROR frames with length set to 3. Therefore their detection stopped working after that commit. NOTE: ath9k drivers built thereafter will not pass DFS certification. This extends the criteria for short packets to explicitly handle PHY_ERROR frames. Fixes: 3c0efb745a17 ("ath9k: discard undersized packets") Signed-off-by: Zefir Kurtisi Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/recv.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 5025ef8b7ad8f92699faa70f14fffaf309bb4276 Author: Rob Herring Date: Mon Jun 17 13:29:33 2019 -0600 dt-bindings: arm: Convert PSCI binding to json-schema Convert the PSCI binding to use DT schema format. Cc: Lorenzo Pieralisi Cc: Will Deacon Signed-off-by: Rob Herring Documentation/arm64/booting.txt | 2 +- Documentation/devicetree/bindings/arm/arm-boards | 2 +- .../devicetree/bindings/arm/idle-states.txt | 2 +- Documentation/devicetree/bindings/arm/psci.txt | 111 -------------- Documentation/devicetree/bindings/arm/psci.yaml | 163 +++++++++++++++++++++ Documentation/translations/zh_CN/arm64/booting.txt | 2 +- 6 files changed, 167 insertions(+), 115 deletions(-) commit 0564336329f0b03a78221ddf51e52af3665e5720 Author: Eric Biggers Date: Thu Jun 20 11:16:58 2019 -0700 fscrypt: document testing with xfstests Document how to test ext4, f2fs, and ubifs encryption with xfstests. Reviewed-by: Theodore Ts'o Signed-off-by: Eric Biggers Documentation/filesystems/fscrypt.rst | 39 +++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit adbd9b4dee70c36eaa30ce93ffcd968533044efc Author: Eric Biggers Date: Thu Jun 20 11:15:05 2019 -0700 fscrypt: remove selection of CONFIG_CRYPTO_SHA256 fscrypt only uses SHA-256 for AES-128-CBC-ESSIV, which isn't the default and is only recommended on platforms that have hardware accelerated AES-CBC but not AES-XTS. There's no link-time dependency, since SHA-256 is requested via the crypto API on first use. To reduce bloat, we should limit FS_ENCRYPTION to selecting the default algorithms only. SHA-256 by itself isn't that much bloat, but it's being discussed to move ESSIV into a crypto API template, which would incidentally bring in other things like "authenc" support, which would all end up being built-in since FS_ENCRYPTION is now a bool. For Adiantum encryption we already just document that users who want to use it have to enable CONFIG_CRYPTO_ADIANTUM themselves. So, let's do the same for AES-128-CBC-ESSIV and CONFIG_CRYPTO_SHA256. Acked-by: Ard Biesheuvel Reviewed-by: Theodore Ts'o Signed-off-by: Eric Biggers Documentation/filesystems/fscrypt.rst | 4 +++- fs/crypto/Kconfig | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) commit 11d458c1cb9b24ac899b1ec6284676f6b1914305 Author: Linus Lüssing Date: Tue Jun 11 22:58:41 2019 +0200 batman-adv: mcast: apply optimizations for routable packets, too Now that we not only track the presence of multicast listeners but also multicast routers we can safely apply group-aware multicast-to-unicast forwarding to packets with a destination address of scope greater than link-local as well. Signed-off-by: Linus Lüssing Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/multicast.c | 259 +++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 241 insertions(+), 18 deletions(-) commit 61caf3d109f5411a7f5b433f1eb73ead7e0789fa Author: Linus Lüssing Date: Tue Jun 11 22:58:40 2019 +0200 batman-adv: mcast: detect, distribute and maintain multicast router presence To be able to apply our group aware multicast optimizations to packets with a scope greater than link-local we need to not only keep track of multicast listeners but also multicast routers. With this patch a node detects the presence of multicast routers on its segment by checking if /proc/sys/net/ipv{4,6}/conf//mc_forwarding is set for one thing. This option is enabled by multicast routing daemons and needed for the kernel's multicast routing tables to receive and route packets. For another thing if a bridge is configured on top of bat0 then the presence of an IPv6 multicast router behind this bridge is currently detected by checking for an IPv6 multicast "All Routers Address" (ff02::2). This should later be replaced by querying the bridge, which performs proper, RFC4286 compliant Multicast Router Discovery (our simplified approach includes more hosts than necessary, most notably not just multicast routers but also unicast ones and is not applicable for IPv4). If no multicast router is detected then this is signalized via the new BATADV_MCAST_WANT_NO_RTR4 and BATADV_MCAST_WANT_NO_RTR6 multicast tvlv flags. Signed-off-by: Linus Lüssing Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich include/uapi/linux/batadv_packet.h | 8 + net/batman-adv/multicast.c | 412 ++++++++++++++++++++++++++++++++----- net/batman-adv/originator.c | 4 +- net/batman-adv/types.h | 29 +++ 4 files changed, 399 insertions(+), 54 deletions(-) commit 3bcacd1e067266173c35628df96be7819ab3d64a Author: Greg Kroah-Hartman Date: Fri Jun 14 09:11:23 2019 +0200 batman-adv: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Because we don't care if debugfs works or not, this trickles back a bit so we can clean things up by making some functions return void instead of an error value that is never going to fail. Cc: Marek Lindner Cc: Simon Wunderlich Cc: Antonio Quartulli Cc: "David S. Miller" Cc: b.a.t.m.a.n@lists.open-mesh.org Cc: netdev@vger.kernel.org Signed-off-by: Greg Kroah-Hartman [sven@narfation.org: drop unused variables] Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/debugfs.c | 99 +++++++++-------------------------------- net/batman-adv/debugfs.h | 5 +-- net/batman-adv/hard-interface.c | 6 +-- net/batman-adv/icmp_socket.c | 20 ++------- net/batman-adv/icmp_socket.h | 2 +- net/batman-adv/log.c | 17 ++----- net/batman-adv/network-coding.c | 29 +++--------- net/batman-adv/network-coding.h | 5 +-- 8 files changed, 39 insertions(+), 144 deletions(-) commit 390dcd48cd1a53a81b68a87d0188e6aacc54a199 Author: Linus Lüssing Date: Sun May 26 18:35:50 2019 +0200 batman-adv: mcast: avoid redundant multicast TT entries with bridges When a bridge is added on top of bat0 we set the WANT_ALL_UNSNOOPABLES flag. Which means we sign up for all traffic for ff02::1/128 and 224.0.0.0/24. When the node itself had IPv6 enabled or joined a group in 224.0.0.0/24 itself then so far this would result in a multicast TT entry which is redundant to the WANT_ALL_UNSNOOPABLES. With this patch such redundant TT entries are avoided. Signed-off-by: Linus Lüssing Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/multicast.c | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) commit 5c506802ca6e936a283d65110922c1a1415af1d4 Author: Linus Lüssing Date: Sun May 26 18:35:49 2019 +0200 batman-adv: mcast: collect softif listeners from IP lists instead Instead of collecting multicast MAC addresses from the netdev hw mc list collect a node's multicast listeners from the IP lists and convert those to MAC addresses. This allows to exclude addresses of specific scope later. On a multicast MAC address the IP destination scope is not visible anymore. Signed-off-by: Linus Lüssing Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/multicast.c | 192 +++++++++++++++++++++++++++++++++------------ 1 file changed, 143 insertions(+), 49 deletions(-) commit d8655e7630dafa88bc37f101640e39c736399771 Author: Eiichi Tsukata Date: Wed Jun 26 14:40:11 2019 +0900 EDAC: Fix global-out-of-bounds write when setting edac_mc_poll_msec Commit 9da21b1509d8 ("EDAC: Poll timeout cannot be zero, p2") assumes edac_mc_poll_msec to be unsigned long, but the type of the variable still remained as int. Setting edac_mc_poll_msec can trigger out-of-bounds write. Reproducer: # echo 1001 > /sys/module/edac_core/parameters/edac_mc_poll_msec KASAN report: BUG: KASAN: global-out-of-bounds in edac_set_poll_msec+0x140/0x150 Write of size 8 at addr ffffffffb91b2d00 by task bash/1996 CPU: 1 PID: 1996 Comm: bash Not tainted 5.2.0-rc6+ #23 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-2.fc30 04/01/2014 Call Trace: dump_stack+0xca/0x13e print_address_description.cold+0x5/0x246 __kasan_report.cold+0x75/0x9a ? edac_set_poll_msec+0x140/0x150 kasan_report+0xe/0x20 edac_set_poll_msec+0x140/0x150 ? dimmdev_location_show+0x30/0x30 ? vfs_lock_file+0xe0/0xe0 ? _raw_spin_lock+0x87/0xe0 param_attr_store+0x1b5/0x310 ? param_array_set+0x4f0/0x4f0 module_attr_store+0x58/0x80 ? module_attr_show+0x80/0x80 sysfs_kf_write+0x13d/0x1a0 kernfs_fop_write+0x2bc/0x460 ? sysfs_kf_bin_read+0x270/0x270 ? kernfs_notify+0x1f0/0x1f0 __vfs_write+0x81/0x100 vfs_write+0x1e1/0x560 ksys_write+0x126/0x250 ? __ia32_sys_read+0xb0/0xb0 ? do_syscall_64+0x1f/0x390 do_syscall_64+0xc1/0x390 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7fa7caa5e970 Code: 73 01 c3 48 8b 0d 28 d5 2b 00 f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 83 3d 99 2d 2c 00 00 75 10 b8 01 00 00 00 04 RSP: 002b:00007fff6acfdfe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000005 RCX: 00007fa7caa5e970 RDX: 0000000000000005 RSI: 0000000000e95c08 RDI: 0000000000000001 RBP: 0000000000e95c08 R08: 00007fa7cad1e760 R09: 00007fa7cb36a700 R10: 0000000000000073 R11: 0000000000000246 R12: 0000000000000005 R13: 0000000000000001 R14: 00007fa7cad1d600 R15: 0000000000000005 The buggy address belongs to the variable: edac_mc_poll_msec+0x0/0x40 Memory state around the buggy address: ffffffffb91b2c00: 00 00 00 00 fa fa fa fa 00 00 00 00 fa fa fa fa ffffffffb91b2c80: 00 00 00 00 fa fa fa fa 00 00 00 00 fa fa fa fa >ffffffffb91b2d00: 04 fa fa fa fa fa fa fa 04 fa fa fa fa fa fa fa ^ ffffffffb91b2d80: 04 fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00 ffffffffb91b2e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Fix it by changing the type of edac_mc_poll_msec to unsigned int. The reason why this patch adopts unsigned int rather than unsigned long is msecs_to_jiffies() assumes arg to be unsigned int. We can avoid integer conversion bugs and unsigned int will be large enough for edac_mc_poll_msec. Reviewed-by: James Morse Fixes: 9da21b1509d8 ("EDAC: Poll timeout cannot be zero, p2") Signed-off-by: Eiichi Tsukata Signed-off-by: Tony Luck drivers/edac/edac_mc_sysfs.c | 16 ++++++++-------- drivers/edac/edac_module.h | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) commit c875a3f847274d4def25d48439f11f6cfd445e80 Author: Rob Herring Date: Tue Jun 18 15:14:12 2019 -0600 dt-bindings: arm: Convert Conexant Digicolor board/soc bindings to json-schema Convert Conexant Digicolor SoC bindings to DT schema format using json-schema. Acked-by: Baruch Siach Signed-off-by: Rob Herring Documentation/devicetree/bindings/arm/digicolor.txt | 6 ------ Documentation/devicetree/bindings/arm/digicolor.yaml | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 6 deletions(-) commit 26fd07e2e78fae8162d6411ee24a0373912c3193 Author: Rob Herring Date: Tue Jun 18 13:57:13 2019 -0600 dt-bindings: arm: Convert NXP LPC32xx board/soc bindings to json-schema Convert NXP LPC32xx SoC bindings to DT schema format using json-schema. Cc: Roland Stigge Signed-off-by: Rob Herring .../devicetree/bindings/arm/nxp/lpc32xx.txt | 8 ------- .../devicetree/bindings/arm/nxp/lpc32xx.yaml | 25 ++++++++++++++++++++++ 2 files changed, 25 insertions(+), 8 deletions(-) commit 7eefa9047ea5f909761c6cec800be3be8d3f372f Author: Rob Herring Date: Tue Jun 18 13:45:19 2019 -0600 dt-bindings: arm: Convert MOXA ART board/soc bindings to json-schema Convert MOXA ART SoC bindings to DT schema format using json-schema. Cc: Jonas Jensen Signed-off-by: Rob Herring Documentation/devicetree/bindings/arm/moxart.txt | 12 ------------ Documentation/devicetree/bindings/arm/moxart.yaml | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 12 deletions(-) commit 2c73aea7da209f79bbe163644871bcbadeab4ec4 Author: Rob Herring Date: Tue Jun 18 13:37:14 2019 -0600 dt-bindings: arm: Convert Axxia board/soc bindings to json-schema Convert Axxia SoC bindings to DT schema format using json-schema. Cc: Anders Berg Signed-off-by: Rob Herring Documentation/devicetree/bindings/arm/axxia.txt | 12 ------------ Documentation/devicetree/bindings/arm/axxia.yaml | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 12 deletions(-) commit b741422218efeb76389a307b72ed3afe41671cf7 Author: Zong-Zhe Yang Date: Wed May 29 15:54:46 2019 +0800 rtw88: refine flow to get tx power index Add a structure for power parameters including base, offset, limit and a function to get tx power parameters. Then, refine flow to get tx power index through the function. Signed-off-by: Zong-Zhe Yang Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtw88/phy.c | 55 +++++++++++++++++++------------- drivers/net/wireless/realtek/rtw88/phy.h | 11 +++++++ 2 files changed, 44 insertions(+), 22 deletions(-) commit 0d350f0a91f225b6b2441d35a1d99592a23d7aca Author: Tzu-En Huang Date: Wed May 29 15:54:45 2019 +0800 rtw88: remove all RTW_MAX_POWER_INDEX macro Since this macro definition has different values in different chipset, the current defined macro value is for 8822b. This will cause the settings of 8822c be incorrect. Remove RTW_MAX_POWER_INDEX and use max_power_index in struct rtw_chip_info to make sure the value of different chipset is right. Signed-off-by: Tzu-En Huang Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtw88/main.c | 2 +- drivers/net/wireless/realtek/rtw88/phy.c | 28 +++++++++++++++++----------- drivers/net/wireless/realtek/rtw88/phy.h | 4 +--- 3 files changed, 19 insertions(+), 15 deletions(-) commit 191c4257ba1948ec2fe730a6b32337e5cf308259 Author: Zong-Zhe Yang Date: Wed May 29 15:54:44 2019 +0800 rtw88: update tx power limit table to RF v20 Support more regulatory domains including IC, KCC, ACMA, CHILE, UKRAINE, and MEXICO. Corresponding tx power limits for these regulatory domains are added in tx power limit table. Besides, tx power limits in some case are also updated to follow RF v20 for better tx power indexes. Channel plan mapping table are upgraded to consider more 2G and 5G channel plans combination cases. It allow us to identify different situations more accuratly by channel plan IDs. In addition, mapping table for country code and channel plan ID and mapping table for country code and tx power limit are also updated to follow RF v20. It allow the new enrties in tx power limit table to be applied correctly. Signed-off-by: Zong-Zhe Yang Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtw88/main.h | 14 +- drivers/net/wireless/realtek/rtw88/regd.c | 69 +- drivers/net/wireless/realtek/rtw88/regd.h | 4 + .../net/wireless/realtek/rtw88/rtw8822c_table.c | 799 +++++++++++++++++++-- 4 files changed, 793 insertions(+), 93 deletions(-) commit 93f68a865f119393accaf4e09139d2853edfb53e Author: Zong-Zhe Yang Date: Wed May 29 15:54:43 2019 +0800 rtw88: correct power limit selection If phy rate is decreased, sub bandwidth may be chosen by RA. We consider possible power limits and apply the min one; otherwise, the tx power index may be larger than spec. And we cross-reference power limits of vht and ht with 20/40M bandwidth in 5G to avoid values are not assigned. Signed-off-by: Zong-Zhe Yang Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtw88/main.c | 24 +++++++ drivers/net/wireless/realtek/rtw88/main.h | 13 ++++ drivers/net/wireless/realtek/rtw88/phy.c | 102 +++++++++++++++++++++++++++--- 3 files changed, 131 insertions(+), 8 deletions(-) commit adf3c676d1d2f7e9b09e0153c7f58b7f87ca1a6f Author: Yan-Hsuan Chuang Date: Wed May 29 15:54:42 2019 +0800 rtw88: choose the lowest as world-wide power limit When we are loading tx power limit from the power limit table, compare the world-wide limit with the current limit and choose the lowest power limit for the world-wide power settings. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtw88/phy.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 764038160aea385bdab06c24c52c047dc4d13e11 Author: Yan-Hsuan Chuang Date: Wed May 29 15:54:41 2019 +0800 rtw88: fix incorrect tx power limit at 5G Tx power limit is stored separately by 2G and 5G. But driver did not get tx power limit from 5G and causes incorrect tx power. Check if the channel is beyond 2G and get the corresponding tx power limit. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtw88/phy.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit 522801493e7bd9874745c128257308c2016abd62 Author: Yan-Hsuan Chuang Date: Wed May 29 15:54:40 2019 +0800 rtw88: remove unused variable The orig variable is taken but not used, remove it Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtw88/phy.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 43712199e05b51d53493d53e26f026a50bb2007f Author: Yan-Hsuan Chuang Date: Wed May 29 15:54:39 2019 +0800 rtw88: unify prefixes for tx power setting routine Rename the function names to make them have the same prefix "rtw_phy" for the tx power setting routines. Only the function names and corresponding identation are modified. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtw88/main.c | 2 +- drivers/net/wireless/realtek/rtw88/phy.c | 128 +++++++++++++++--------------- drivers/net/wireless/realtek/rtw88/phy.h | 2 +- 3 files changed, 66 insertions(+), 66 deletions(-) commit 226746fd12013b80ef16eceb9081012d2a6efcc0 Author: Yan-Hsuan Chuang Date: Wed May 29 15:54:38 2019 +0800 rtw88: do not use (void *) as argument The type change from (void *) to (struct rtw_dev *) is redundant. Just pass the right type and compiler can check that for us. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtw88/phy.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit fa6dfe6bff246ddd5be3cfe81637f137acd6c294 Author: Yan-Hsuan Chuang Date: Wed May 29 15:54:37 2019 +0800 rtw88: resolve order of tx power setting routines Some functions that should be static are unnecessarily exposed, remove their declaration in header file phy.h. After resolving their declaration order, they can be declared as static. So this commit changes nothing except the order and marking them static. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtw88/phy.c | 1287 +++++++++++++++--------------- drivers/net/wireless/realtek/rtw88/phy.h | 7 +- 2 files changed, 642 insertions(+), 652 deletions(-) commit 5732bea634dcb7e5ba974df0fdbfdfe092aae3b2 Author: Rob Herring Date: Tue Jun 18 10:10:10 2019 -0600 dt-bindings: arm: qcom: Add missing schema for IPQ4019 boards The board bindings for IPQ4019 are undocumented. Add the missing bindings to the schema. Cc: Andy Gross Cc: David Brown Cc: linux-arm-msm@vger.kernel.org Signed-off-by: Rob Herring Documentation/devicetree/bindings/arm/qcom.yaml | 5 +++++ 1 file changed, 5 insertions(+) commit e5dad30bc7e7d0ddeb4c14d1785df7899eee619a Author: Rob Herring Date: Tue Jun 18 10:07:18 2019 -0600 dt-bindings: arm: qcom: Add missing schema for MSM8974 The SoC/board bindings for MSM8974 are undocumented. Add the missing bindings to the schema. Cc: Andy Gross Cc: David Brown Cc: linux-arm-msm@vger.kernel.org Signed-off-by: Rob Herring Documentation/devicetree/bindings/arm/qcom.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) commit b061e4e8f0f43ba9a8ec1bde36ceeb2368b1928f Author: Rob Herring Date: Thu Apr 26 12:22:38 2018 -0500 dt-bindings: arm: Convert Alpine board/soc bindings to json-schema Convert Alpine SoC bindings to DT schema format using json-schema. Cc: Tsahee Zidenberg Cc: Antoine Tenart Cc: Mark Rutland Cc: devicetree@vger.kernel.org Signed-off-by: Rob Herring Documentation/devicetree/bindings/arm/al,alpine.txt | 16 ---------------- .../devicetree/bindings/arm/al,alpine.yaml | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 16 deletions(-) commit 096cc49c47a1382deecf8518ec0d96abc1ab900f Merge: 39f41f367b08 eca1d5c22da1 Author: David S. Miller Date: Thu Jun 27 10:18:24 2019 -0700 Merge branch 's390-qeth-next' Julian Wiedmann says: ==================== s390/qeth: updates 2019-06-27 please apply another round of qeth updates for net-next. This completes the conversion of the control path to use dynamically allocated cmd buffers, along with some fine-tuning for the route validation fix that recently went into -net. ==================== Signed-off-by: David S. Miller commit eca1d5c22da19abf14d27f599e787dc98b1702a3 Author: Julian Wiedmann Date: Thu Jun 27 17:01:33 2019 +0200 s390/qeth: move cast type selection into fill_header() The cast type currently gets selected in .ndo_start_xmit, and is then piped through several layers until it's stored into the HW header. Push the selection down into qeth_l?_fill_header() to (1) reduce the number of xmit-wide parameters, and (2) merge the two route validation checks into just one. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_core.h | 5 ++--- drivers/s390/net/qeth_core_main.c | 7 +++---- drivers/s390/net/qeth_l2_main.c | 4 ++-- drivers/s390/net/qeth_l3_main.c | 43 +++++++++++++++++---------------------- 4 files changed, 26 insertions(+), 33 deletions(-) commit 980f4568fa32736b1dec69db2cc7c947b767e52e Author: Julian Wiedmann Date: Thu Jun 27 17:01:32 2019 +0200 s390/qeth: extract helper for route validation As follow-up to commit 0cd6783d3c7d ("s390/qeth: check dst entry before use"), consolidate the dst_check() logic into a single helper and add a wrapper around the cast type selection. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_core.h | 13 +++++++++++ drivers/s390/net/qeth_l3_main.c | 49 ++++++++++++++++++----------------------- 2 files changed, 34 insertions(+), 28 deletions(-) commit c097cc9228193ac624633058737d2bfc32c8c3d3 Author: Julian Wiedmann Date: Thu Jun 27 17:01:31 2019 +0200 s390/qeth: consolidate skb RX processing in L3 driver Use napi_gro_receive() to pass up all types of packets that a L3 device may receive. 1) For proper L2 packets received by the IQD sniffer, this is the obvious thing to do. 2) For af_iucv (which doesn't provide a GRO assist), the GRO code will transparently fall back to netif_receive_skb(). So there's no need to special-case this traffic in our code. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_l3_main.c | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) commit c4733c32ca2272b8c11663fc1ad6264d2ee42384 Author: Julian Wiedmann Date: Thu Jun 27 17:01:30 2019 +0200 s390/qeth: consolidate pm code De-duplicate the pm callback implementations from the two sub-drivers, replacing them with core helpers that delegate to the .set_online and .set_offline callbacks. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_core.h | 3 --- drivers/s390/net/qeth_core_main.c | 36 +++++++++++++++++++----------------- drivers/s390/net/qeth_l2_main.c | 30 ------------------------------ drivers/s390/net/qeth_l3_main.c | 30 ------------------------------ 4 files changed, 19 insertions(+), 80 deletions(-) commit d4c08afafa0469a24771b14528ee179f72861ea3 Author: Julian Wiedmann Date: Thu Jun 27 17:01:29 2019 +0200 s390/qeth: streamline SNMP cmd code Apply some cleanups to qeth_snmp_command() and its callback: 1. when accessing the user data, use the proper struct instead of hard-coded offsets. Also copy the request data straight into the allocated cmd, skipping the extra memdup_user() to a tmp buffer. 2. capping the request length is no longer needed, the same check gets applied at a base level in qeth_alloc_cmd(). 3. clean up some duplicated (and misindented) trace statements. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_core_main.c | 49 ++++++++++++++------------------------- 1 file changed, 18 insertions(+), 31 deletions(-) commit c3b2218d3170178b2e5539bca3623f9519386d04 Author: Julian Wiedmann Date: Thu Jun 27 17:01:28 2019 +0200 s390/qeth: remove static cmd buffer infrastructure Now that all cmds are dynamically allocated, the code for static cmd buffers can go away entirely. Resulting in a nice reduction of code/data size & complexity, while removing the risk that qeth_clear_cmd_buffers() releases cmds that are still in-flight. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_core.h | 45 ++----- drivers/s390/net/qeth_core_main.c | 254 ++++++++------------------------------ drivers/s390/net/qeth_l2_main.c | 3 +- drivers/s390/net/qeth_l3_main.c | 1 - 4 files changed, 59 insertions(+), 244 deletions(-) commit f19f8fd2df7c5929313984a5d83e9fb280bfd75f Author: Julian Wiedmann Date: Thu Jun 27 17:01:27 2019 +0200 s390/qeth: dynamically allocate MPC cmds The base MPC cmds are the last remaining user of the static cmd buffers. Port them over to use dynamic allocation, and stop backing the write channel's cmd buffers with pages. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_core_main.c | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) commit 2cfb4810a3f2c7f9b20c6def45ef8a4dbb730387 Author: Julian Wiedmann Date: Thu Jun 27 17:01:26 2019 +0200 s390/qeth: dynamically allocate vnicc cmds The VNICC code is somewhat quirky in that it defers the whole cmd setup to a common helper qeth_l2_vnicc_request(). Some of the cmd specifics are then passed in via parameter, while others are simply hard-coded. Split the whole machinery up into the usual format: one helper that allocates the cmd & fills in the common fields, while all the cmd originators take care of their sub-cmd type specific work. This makes it much easier to calculate the cmd's precise length, and reduces code complexity. Signed-off-by: Julian Wiedmann Reviewed-by: Alexandra Winter Signed-off-by: David S. Miller drivers/s390/net/qeth_core_mpc.h | 13 ++--- drivers/s390/net/qeth_l2_main.c | 123 ++++++++++++++++++--------------------- 2 files changed, 62 insertions(+), 74 deletions(-) commit 5cfbe10a000aec92003d72061d250aa7a95bc02a Author: Julian Wiedmann Date: Thu Jun 27 17:01:25 2019 +0200 s390/qeth: dynamically allocate diag cmds Add a new wrapper that allocates DIAG cmds of the right size, and fills in the common fields. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_core.h | 3 +++ drivers/s390/net/qeth_core_main.c | 29 +++++++++++++++++++++-------- drivers/s390/net/qeth_core_mpc.h | 5 +++++ drivers/s390/net/qeth_l3_main.c | 4 +--- 4 files changed, 30 insertions(+), 11 deletions(-) commit b9150461e5a6f4a78d0ef8a4d4f2a41f5a12d979 Author: Julian Wiedmann Date: Thu Jun 27 17:01:24 2019 +0200 s390/qeth: dynamically allocate various cmds with sub-types This patch converts the adapter, assist and bridgeport cmd paths to dynamic allocation. Most of the work is about re-organizing the cmd headers, calculating the correct cmd length, and filling in the right value in the sub-cmd's length field. Since we now also set the correct length for cmds that are not reflected by a fixed struct (ie SNMP), we can remove the work-around from qeth_snmp_command(). Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_core.h | 9 ++-- drivers/s390/net/qeth_core_main.c | 86 ++++++++++++++++++++------------------- drivers/s390/net/qeth_core_mpc.h | 27 ++++-------- drivers/s390/net/qeth_l2_main.c | 29 ++++++------- drivers/s390/net/qeth_l3_main.c | 10 ++--- 5 files changed, 78 insertions(+), 83 deletions(-) commit 1c696c896f218b12d5f92d892fffee5abd0265c9 Author: Julian Wiedmann Date: Thu Jun 27 17:01:23 2019 +0200 s390/qeth: clarify parameter for simple assist cmds For code that uses qeth_send_simple_setassparms_prot(), we currently can't differentiate whether the cmd should contain (1) no parameter, or (2) a 4-byte parameter with value 0. At the moment this doesn't cause any trouble. But when using dynamically allocated cmds, we need to know whether to allocate & transmit an additional 4 bytes of zeroes. So instead of the raw parameter value, pass a parameter pointer (or NULL) to qeth_send_simple_setassparms_prot(). Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_core.h | 6 +++--- drivers/s390/net/qeth_core_main.c | 15 +++++++-------- drivers/s390/net/qeth_core_mpc.h | 2 ++ drivers/s390/net/qeth_l3_main.c | 26 ++++++++++++++------------ 4 files changed, 26 insertions(+), 23 deletions(-) commit a59d121da2394dcb84a42bf2fe436180ce2afe5c Author: Julian Wiedmann Date: Thu Jun 27 17:01:22 2019 +0200 s390/qeth: dynamically allocate simple IPA cmds This patch reduces the usage of the write channel's static cmd buffers, by dynamically allocating all simple IPA cmds (eg. STARTLAN, SETVMAC). It also converts the OSN path. Doing so requires some changes to how we calculate the cmd length. Currently when building IPA cmds, we're quite generous in how much data we send down to the device (basically the size of the biggest cmd we know). This is no real concern at the moment, since the static cmd buffers are backed with zeroed pages. But for dynamic allocations, the exact length matters. So this patch also adds the needed length calculations to each cmd path. Commands that have multiple subtypes (eg. SETADP) of differing length will be converted with follow-up patches. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_core.h | 10 +++++++++- drivers/s390/net/qeth_core_main.c | 33 ++++++++++++++++++++++++++------- drivers/s390/net/qeth_core_mpc.h | 2 ++ drivers/s390/net/qeth_l2_main.c | 12 +++++++++--- drivers/s390/net/qeth_l3_main.c | 17 ++++++++++------- 5 files changed, 56 insertions(+), 18 deletions(-) commit 39f41f367b08650e9aa314e3a13fb6dda1e9eec7 Author: Ursula Braun Date: Thu Jun 27 15:04:52 2019 +0200 net/smc: common release code for non-accepted sockets There are common steps when releasing an accepted or unaccepted socket. Move this code into a common routine. Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: David S. Miller net/smc/af_smc.c | 73 +++++++++++++++++++++++++------------------------------- 1 file changed, 32 insertions(+), 41 deletions(-) commit 582737f9904c6e84b7db2d417b2bf244374719e1 Merge: 5b9469a285eb bb2bd090854c Author: David S. Miller Date: Thu Jun 27 09:54:35 2019 -0700 Merge branch 'net-ipv4-fix-circular-list-infinite-loop' Florian Westphal says: ==================== net: ipv4: fix circular-list infinite loop Tariq and Ran reported a regression caused by net-next commit 2638eb8b50cf ("net: ipv4: provide __rcu annotation for ifa_list"). This happens when net.ipv4.conf.$dev.promote_secondaries sysctl is enabled -- we can arrange for ifa->next to point at ifa, so next process that tries to walk the list loops forever. Fix this and extend rtnetlink.sh with a small test case for this. ==================== Signed-off-by: David S. Miller commit bb2bd090854cc608d4d8a4d14955eb13dffa94ab Author: Florian Westphal Date: Thu Jun 27 14:03:33 2019 +0200 selftests: rtnetlink: add small test case with 'promote_secondaries' enabled This exercises the 'promote_secondaries' code path. Without previous fix, this triggers infinite loop/soft lockup: ifconfig process spinning at 100%, never to return. Signed-off-by: Florian Westphal Signed-off-by: David S. Miller tools/testing/selftests/net/rtnetlink.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 6a9e9cea4c51dd7137f381710bb42e2ad6e7e285 Author: Florian Westphal Date: Thu Jun 27 14:03:32 2019 +0200 net: ipv4: fix infinite loop on secondary addr promotion secondary address promotion causes infinite loop -- it arranges for ifa->ifa_next to point back to itself. Problem is that 'prev_prom' and 'last_prim' might point at the same entry, so 'last_sec' pointer must be obtained after prev_prom->next update. Fixes: 2638eb8b50cf ("net: ipv4: provide __rcu annotation for ifa_list") Reported-by: Ran Rozenstein Reported-by: Tariq Toukan Signed-off-by: Florian Westphal Signed-off-by: David S. Miller net/ipv4/devinet.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8a7f9fd8a3e09c829c9fc2a86fe2d370ebcafd95 Author: Brian Norris Date: Tue Jun 25 10:40:45 2019 -0700 mwifiex: don't disable hardirqs; just softirqs main_proc_lock and int_lock (in mwifiex_adapter) are the only spinlocks used in hardirq contexts. The rest are only in task or softirq contexts. Convert every other lock from *_irq{save,restore}() variants to _bh() variants. This is a mechanical transformation of all spinlock usage in mwifiex using the following: Step 1: I ran this nasty sed script: sed -i -E '/spin_lock_irqsave|spin_unlock_irqrestore/ { /main_proc_lock|int_lock/! { s:(spin_(un|)lock)_irq(save|restore):\1_bh: ; # Join broken lines. :a /;$/! { N; s/\s*\n\s*//; ba } /,.*\);$/ s:,.*\):\): } }' drivers/net/wireless/marvell/mwifiex/* Step 2: Manually delete the flags / ra_list_flags args from: mwifiex_send_single_packet() mwifiex_11n_aggregate_pkt() mwifiex_send_processed_packet() which are now unused. Step 3: Apply this semantic patch (coccinelle) to remove the unused 'flags' variables: // @@ type T; identifier i; @@ ( extern T i; | - T i; ... when != i ) // (Usage is something like this: make coccicheck COCCI=./patch.cocci MODE=patch M=drivers/net/wireless/marvell/mwifiex/ although this skips *.h files for some reasons, so I had to massage stuff.) Testing: I've played with a variety of stress tests, including download stress tests on the same APs which caught regressions with commit 5188d5453bc9 ("mwifiex: restructure rx_reorder_tbl_lock usage"). I've primarily tested on Marvell 8997 / PCIe, although I've given 8897 / SDIO a quick spin as well. Signed-off-by: Brian Norris Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/11n.c | 53 ++++------ drivers/net/wireless/marvell/mwifiex/11n.h | 5 +- drivers/net/wireless/marvell/mwifiex/11n_aggr.c | 26 ++--- drivers/net/wireless/marvell/mwifiex/11n_aggr.h | 2 +- .../net/wireless/marvell/mwifiex/11n_rxreorder.c | 86 +++++++--------- drivers/net/wireless/marvell/mwifiex/cfg80211.c | 35 +++---- drivers/net/wireless/marvell/mwifiex/cmdevt.c | 76 ++++++-------- drivers/net/wireless/marvell/mwifiex/init.c | 32 +++--- drivers/net/wireless/marvell/mwifiex/main.c | 29 +++--- drivers/net/wireless/marvell/mwifiex/scan.c | 58 +++++------ drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c | 5 +- drivers/net/wireless/marvell/mwifiex/sta_event.c | 10 +- drivers/net/wireless/marvell/mwifiex/tdls.c | 68 +++++-------- drivers/net/wireless/marvell/mwifiex/txrx.c | 5 +- drivers/net/wireless/marvell/mwifiex/uap_txrx.c | 10 +- drivers/net/wireless/marvell/mwifiex/usb.c | 10 +- drivers/net/wireless/marvell/mwifiex/util.c | 15 ++- drivers/net/wireless/marvell/mwifiex/wmm.c | 109 ++++++++------------- 18 files changed, 256 insertions(+), 378 deletions(-) commit ce2e942e32e851acdae05f9772f3b7a99f6a47cb Author: Brian Norris Date: Tue Jun 25 10:40:44 2019 -0700 mwifiex: dispatch/rotate from reorder table atomically mwifiex_11n_scan_and_dispatch() and mwifiex_11n_dispatch_pkt_until_start_win() share similar patterns, where they perform a few different actions on the same table, using the same lock, but non-atomically. There have been other attempts to clean up this sort of behavior, but they have had problems (incomplete; introducing new deadlocks). We can improve these functions' atomicity by queueing up our RX packets in a list, to dispatch at the end of the function. This avoids problems of another operation modifying the table in between our dispatch and rotation operations. This was inspired by investigations around this: http://lkml.kernel.org/linux-wireless/20181130175957.167031-1-briannorris@chromium.org Subject: [4.20 PATCH] Revert "mwifiex: restructure rx_reorder_tbl_lock usage" While the original (now-reverted) patch had good intentions in restructuring some of the locking patterns in this driver, it missed an important detail: we cannot defer to softirq contexts while already in an atomic context. We can help avoid this sort of problem by separating the two steps of: (1) iterating / clearing the mwifiex reordering table (2) dispatching received packets to upper layers This makes it much harder to make lock recursion mistakes, as these two steps no longer need to hold the same locks. Testing: I've played with a variety of stress tests, including download stress tests on the same APs which caught regressions with commit 5188d5453bc9 ("mwifiex: restructure rx_reorder_tbl_lock usage"). I've primarily tested on Marvell 8997 / PCIe, although I've given 8897 / SDIO a quick spin as well. Signed-off-by: Brian Norris Acked-by: Ganapathi Bhat Signed-off-by: Kalle Valo .../net/wireless/marvell/mwifiex/11n_rxreorder.c | 43 ++++++++++++---------- 1 file changed, 24 insertions(+), 19 deletions(-) commit 2a92b08b18553c101115423bd34963b1a59a45a3 Author: Lorenzo Bianconi Date: Sat Jun 15 16:03:32 2019 +0200 mt76: usb: fix rx A-MSDU support Commit f8f527b16db5 ("mt76: usb: use EP max packet aligned buffer sizes for rx") breaks A-MSDU support. When A-MSDU is enable the device can receive frames up to q->buf_size but they will be discarded in mt76u_process_rx_entry since there is no enough room for skb_shared_info. Fix the issue reallocating the skb and copying in the linear area the first 128B of the received frames and in the frag_list the remaining part Fixes: f8f527b16db5 ("mt76: usb: use EP max packet aligned buffer sizes for rx") Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo drivers/net/wireless/mediatek/mt76/mt76.h | 1 + drivers/net/wireless/mediatek/mt76/usb.c | 46 +++++++++++++++++++++++++------ 2 files changed, 38 insertions(+), 9 deletions(-) commit aee5cec5bb27d8d3c2c13f371d156e5879309d0e Author: Linus Walleij Date: Tue Jun 25 13:57:33 2019 +0200 gpio: ath79: Pass irqchip when adding gpiochip We need to convert all old gpio irqchips to pass the irqchip setup along when adding the gpio_chip. For chained irqchips this is a pretty straight-forward conversion. Take this opportunity to add a local dev pointer and use devm_gpiochip_add() so we can get rid of the remove() callback altogether. Cc: linux-mips@linux-mips.org Acked-by: Alban Bedel Signed-off-by: Linus Walleij drivers/gpio/gpio-ath79.c | 66 +++++++++++++++++++---------------------------- 1 file changed, 27 insertions(+), 39 deletions(-) commit 5b9469a285ebc85af29736a6d9fa995aea0dbf0b Author: Maxime Chevallier Date: Thu Jun 27 10:52:26 2019 +0200 net: ethtool: Allow parsing ETHER_FLOW types when using flow_rule When parsing an ethtool_rx_flow_spec, users can specify an ethernet flow which could contain matches based on the ethernet header, such as the MAC address, the VLAN tag or the ethertype. ETHER_FLOW uses the src and dst ethernet addresses, along with the ethertype as keys. Matches based on the vlan tag are also possible, but they are specified using the special FLOW_EXT flag. Signed-off-by: Maxime Chevallier Acked-by: Pablo Neira Ayuso Signed-off-by: David S. Miller net/core/ethtool.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit a4de43049a1d0e2ed2a1d95e18e74b82cd9ca058 Author: Jon Hunter Date: Wed Jun 26 14:42:58 2019 +0100 gpio: tegra: Clean-up debugfs initialisation The function tegra_gpio_debuginit() just calls debugfs_create_file() and given that there is already a stub function implemented for debugfs_create_file() when CONFIG_DEBUG_FS is not enabled, there is no need for the function tegra_gpio_debuginit() and so remove it. Finally, use a space and not a tab between the #ifdef and CONFIG_DEBUG_FS. Signed-off-by: Jon Hunter Reviewed-by: Bartosz Golaszewski Signed-off-by: Linus Walleij drivers/gpio/gpio-tegra.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) commit 440e80ce02cde7b810e4eb555768c2d77e7a27c8 Author: Colin Ian King Date: Wed Jun 26 14:24:27 2019 +0100 drm/amd/display: fix a couple of spelling mistakes There are a couple of spelling mistakes in dm_error messages and a comment. Fix these. Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dsc.c | 2 +- drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) commit 4130ff8027dd679a6f2e45c26fb95860e6d235a3 Author: Evan Quan Date: Fri Jun 21 09:46:14 2019 +0800 drm/amd/powerplay: no memory activity support on Vega10 Make mem_busy_percent sysfs interface invisible on Vega10. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit a864e29d94abac7f9756e07180c167f50fb00042 Author: shaoyunl Date: Wed Jun 26 13:42:24 2019 -0400 drm/amdkfd: remove unnecessary warning message on gpu reset In XGMI configuration, more than one asic can be reset at same time, kfd is able to handle this and no need to trigger the warning Signed-off-by: shaoyunl Reviewed-by: Andrey Grodzovsky Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_device.c | 1 - 1 file changed, 1 deletion(-) commit f51af4357c4a15fc1aa1d9250935100b63a91d1e Author: Oak Zeng Date: Wed Jun 26 10:16:56 2019 -0500 drm/amdgpu: Set queue_preemption_timeout_ms default value Set default value of this kernel parameter to 9000 Signed-off-by: Oak Zeng Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 309bce0ca8bd5804db27bc2d56fb1e272c1a5359 Author: Evan Quan Date: Tue Jun 25 23:03:00 2019 +0800 drm/amd/powerplay: add missing smu_get_clk_info_from_vbios() call This seems a merge error. Signed-off-by: Evan Quan Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 4 ++++ 1 file changed, 4 insertions(+) commit 505ac3039a184b53ddb16f25cd10cab67af633f5 Author: Evan Quan Date: Tue Jun 25 11:06:08 2019 +0800 drm/amd/powerplay: support runtime ppfeatures setting on Navi10 Implement Navi10 backend for runtime ppfeatures status retrieving and setting support. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 165 +++++++++++++++++++++++++++++ 1 file changed, 165 insertions(+) commit b213646519f4988ac1f40468e3fba81f7de7ccd7 Author: Evan Quan Date: Mon Jun 17 17:27:49 2019 +0800 drm/amd/powerplay: check prerequisite for VCN power gating VCN DPM is a necessary prerequisite for VCN power gating. Signed-off-by: Evan Quan Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit f6319596535f157ce95504b193e0bfc3da7119e6 Author: Felix Kuehling Date: Wed Jun 26 02:32:43 2019 -0400 drm/ttm: return -EBUSY if waiting for busy BO fails Returning -EAGAIN prevents ttm_bo_mem_space from trying alternate placements and can lead to live-locks in amdgpu_cs, retrying indefinitely and never succeeding. Fixes: d367bd2a5e2b12 ("drm/ttm: fix busy memory to fail other user v10") Signed-off-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_bo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5a136b4ae327e7f6be9c984a010df8d7ea5a4f83 Author: Jason Gunthorpe Date: Fri Jun 7 12:10:33 2019 -0300 mm/hmm: Fix error flows in hmm_invalidate_range_start If the trylock on the hmm->mirrors_sem fails the function will return without decrementing the notifiers that were previously incremented. Since the caller will not call invalidate_range_end() on EAGAIN this will result in notifiers becoming permanently incremented and deadlock. If the sync_cpu_device_pagetables() required blocking the function will not return EAGAIN even though the device continues to touch the pages. This is a violation of the mmu notifier contract. Switch, and rename, the ranges_lock to a spin lock so we can reliably obtain it without blocking during error unwind. The error unwind is necessary since the notifiers count must be held incremented across the call to sync_cpu_device_pagetables() as we cannot allow the range to become marked valid by a parallel invalidate_start/end() pair while doing sync_cpu_device_pagetables(). Signed-off-by: Jason Gunthorpe Reviewed-by: Ralph Campbell Reviewed-by: Christoph Hellwig Tested-by: Philip Yang include/linux/hmm.h | 2 +- mm/hmm.c | 69 +++++++++++++++++++++++++++++++---------------------- 2 files changed, 41 insertions(+), 30 deletions(-) commit d482e575fbf0f7ec9319bded951f21bbc84312bf Author: Jeremy Linton Date: Wed Jun 26 16:37:18 2019 -0500 perf: arm_spe: Enable ACPI/Platform automatic module loading Lets add the MODULE_TABLE and platform id_table entries so that the SPE driver can attach to the ACPI platform device created by the core pmu code. Tested-by: Hanjun Guo Reviewed-by: Sudeep Holla Signed-off-by: Jeremy Linton Signed-off-by: Will Deacon drivers/perf/arm_spe_pmu.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit d24a0c7099b32b6981d7f126c45348e381718350 Author: Jeremy Linton Date: Wed Jun 26 16:37:17 2019 -0500 arm_pmu: acpi: spe: Add initial MADT/SPE probing ACPI 6.3 adds additional fields to the MADT GICC structure to describe SPE PPI's. We pick these out of the cached reference to the madt_gicc structure similarly to the core PMU code. We then create a platform device referring to the IRQ and let the user/module loader decide whether to load the SPE driver. Tested-by: Hanjun Guo Reviewed-by: Sudeep Holla Reviewed-by: Lorenzo Pieralisi Signed-off-by: Jeremy Linton Signed-off-by: Will Deacon arch/arm64/include/asm/acpi.h | 3 ++ drivers/perf/arm_pmu_acpi.c | 72 +++++++++++++++++++++++++++++++++++++++++++ include/linux/perf/arm_pmu.h | 2 ++ 3 files changed, 77 insertions(+) commit 56855a99f3d0d1e9f1f4e24f5851f9bf14c83296 Author: Jeremy Linton Date: Wed Jun 26 16:37:16 2019 -0500 ACPI/PPTT: Add function to return ACPI 6.3 Identical tokens ACPI 6.3 adds a flag to indicate that child nodes are all identical cores. This is useful to authoritatively determine if a set of (possibly offline) cores are identical or not. Since the flag doesn't give us a unique id we can generate one and use it to create bitmaps of sibling nodes, or simply in a loop to determine if a subset of cores are identical. Acked-by: Rafael J. Wysocki Tested-by: Hanjun Guo Reviewed-by: Sudeep Holla Signed-off-by: Jeremy Linton Signed-off-by: Will Deacon drivers/acpi/pptt.c | 26 ++++++++++++++++++++++++++ include/linux/acpi.h | 5 +++++ 2 files changed, 31 insertions(+) commit ed2b664fcc8073c09394393756df3fc86977bbac Author: Jeremy Linton Date: Wed Jun 26 16:37:15 2019 -0500 ACPI/PPTT: Modify node flag detection to find last IDENTICAL The ACPI specification implies that the IDENTICAL flag should be set on all non leaf nodes where the children are identical. This means that we need to be searching for the last node with the identical flag set rather than the first one. Since this flag is also dependent on the table revision, we need to add a bit of extra code to verify the table revision, and the next node's state in the traversal. Since we want to avoid function pointers here, lets just special case the IDENTICAL flag. Acked-by: Rafael J. Wysocki Tested-by: Hanjun Guo Reviewed-by: Sudeep Holla Signed-off-by: Jeremy Linton Signed-off-by: Will Deacon drivers/acpi/pptt.c | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) commit d97ee99bf225d35a50ed8812c3d037b2ba7ad2ea Author: Zhenzhong Duan Date: Wed Jun 26 16:54:49 2019 +0800 x86/jailhouse: Mark jailhouse_x2apic_available() as __init .. as it is only called at early bootup stage. Signed-off-by: Zhenzhong Duan Signed-off-by: Thomas Gleixner Cc: Jan Kiszka Cc: Borislav Petkov Cc: jailhouse-dev@googlegroups.com Link: https://lkml.kernel.org/r/1561539289-29180-1-git-send-email-zhenzhong.duan@oracle.com arch/x86/kernel/jailhouse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit da6070fc558e3b5d7fe0cabcbec6487a1999c76d Merge: 8df9d7f70f87 f360dcd4ef7f Author: Linus Walleij Date: Thu Jun 27 15:59:16 2019 +0100 Merge tag 'gpio-v5.3-updates-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into devel gpio: updates for v5.3 - add include/linux/gpio.h to .gitignore in /tools - improve and simplify code in the em driver - simplify code in max732x by using devm helpers (including the new devm_i2c_new_dummy_device()) - fix SPDX header for madera - remove checking of return values of debugfs routines in gpio-mockup commit 8df9d7f70f87960b6ad2b4a90db755551d7ab7bd Author: Linus Walleij Date: Wed Jun 26 10:11:17 2019 +0200 gpio: siox: Switch to IRQ_TYPE_NONE The siox driver is hardcoding a default type of IRQ_TYPE_EDGE_RISING to the irq helper, but this should only be applicable to old boardfiles and odd device tree irqchips with just onecell irq (no flags). I doubt this is the case with the siox, I think all consumers specify the flags they use in the device tree. Acked-by: Uwe Kleine-König Signed-off-by: Linus Walleij drivers/gpio/gpio-siox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4c0a8899d9c215633ef79805c68b2566c775d43d Author: Linus Walleij Date: Wed Jun 26 10:09:00 2019 +0200 gpio: siox: Do not call gpiochip_remove() on errorpath gpiochip_remove() was called on the errorpath if gpiochip_add() failed: this is wrong, if the chip failed to add it is not there so it should not be removed. Fixes: be8c8facc707 ("gpio: new driver to work with a 8x12 siox") Acked-by: Uwe Kleine-König Signed-off-by: Linus Walleij drivers/gpio/gpio-siox.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 04ce935c6b2a8a802750e6b2beda802b61495b7c Author: Linus Walleij Date: Tue Jun 25 13:15:02 2019 +0200 gpio: pl061: Pass irqchip when adding gpiochip We need to convert all old gpio irqchips to pass the irqchip setup along when adding the gpio_chip. For chained irqchips this is a pretty straight-forward conversion. Cc: Manivannan Sadhasivam Reviewed-by: Sudeep Holla Tested-by: Sudeep Holla Signed-off-by: Linus Walleij drivers/gpio/gpio-pl061.c | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) commit d1d522d4f8b40016b7071dd0e0167927e58814e3 Author: Greg Kroah-Hartman Date: Tue Jun 18 17:50:46 2019 +0200 gpio: tegra: No need to cast away return value of debugfs_create_file() It is fine to ignore the return value (and encouraged), so no need to cast away the return value, you will not get a build warning at all. Cc: Bartosz Golaszewski Cc: linux-gpio@vger.kernel.org Cc: linux-tegra@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Acked-by: Jon Hunter Acked-by: Thierry Reding Signed-off-by: Linus Walleij drivers/gpio/gpio-tegra.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit acc68b0e70e8c9cb4355f9cafeaf51a441f64cc2 Author: Greg Kroah-Hartman Date: Tue Jun 18 17:50:45 2019 +0200 gpio: No need to cast away return value of debugfs_create_file() It is fine to ignore the return value (and encouraged), so need to cast away the return value, you will not get a build warning at all. Cc: Bartosz Golaszewski Cc: linux-gpio@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit db16bad6efd9ce362be3d67cb05c3f70eb5a0dd3 Author: Geert Uytterhoeven Date: Mon Jun 24 16:49:56 2019 +0200 gpio: Sort GPIO drivers in Makefile Sort the definitions for the individual GPIO drivers in the Makefile by object file name. Align all entries while we're at it. Signed-off-by: Geert Uytterhoeven Signed-off-by: Linus Walleij drivers/gpio/Makefile | 296 +++++++++++++++++++++++++------------------------- 1 file changed, 148 insertions(+), 148 deletions(-) commit f79047b109119b9cc411b079d1aee6820b6afeb6 Author: Enrico Weigelt Date: Mon Jun 24 07:40:34 2019 +0200 gpio: siox: Use module_siox_driver() Reduce driver init boilerplate by using the new module_siox_driver() macro. Signed-off-by: Enrico Weigelt Signed-off-by: Linus Walleij drivers/gpio/gpio-siox.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit 8f3fd89593377d15df88ad26dcf48318d8c9896f Author: Enrico Weigelt Date: Mon Jun 24 07:40:33 2019 +0200 siox: Add helper macro to simplify driver registration Add more helper macros for trivial driver init cases, similar to the already existing module_platform_driver() or module_i2c_driver(). This helps to reduce driver init boilerplate. Signed-off-by: Enrico Weigelt Acked-by: Uwe Kleine-König Signed-off-by: Linus Walleij include/linux/siox.h | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 0f5cb8cc27a266c81e6523b436479802e9aafc9e Author: Enrico Weigelt, metux IT consult Date: Mon Jun 17 18:49:16 2019 +0200 gpio: eic-sprd: Use devm_platform_ioremap_resource() Use the new helper that wraps the calls to platform_get_resource() and devm_ioremap_resource() together. Signed-off-by: Enrico Weigelt, metux IT consult Reviewed-by: Baolin Wang Signed-off-by: Linus Walleij drivers/gpio/gpio-eic-sprd.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit c7d0ca24fd978ac047db67dd961788e62c0e8ba2 Author: Enrico Weigelt, metux IT consult Date: Mon Jun 17 18:49:20 2019 +0200 gpio: vr41xx: Use devm_platform_ioremap_resource() Use the new helper that wraps the calls to platform_get_resource() and devm_ioremap_resource() together. this driver deserves a bit more cleanup, to get rid of the global variable giu_base, which makes it single-instance-only. Signed-off-by: Enrico Weigelt, metux IT consult Signed-off-by: Linus Walleij drivers/gpio/gpio-vr41xx.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) commit 5272856533776260d997c8280dad69b1eac40994 Author: Enrico Weigelt, metux IT consult Date: Mon Jun 17 18:49:19 2019 +0200 gpio: janz-ttl: Drop unneccessary temp variable dev don't need the temporary variable "dev", directly use &pdev->dev Signed-off-by: Enrico Weigelt, metux IT consult Signed-off-by: Linus Walleij drivers/gpio/gpio-janz-ttl.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 01d078aa9b90c17e4632a8244705d53c23e505bd Author: Enrico Weigelt, metux IT consult Date: Mon Jun 17 18:49:18 2019 +0200 gpio: grgpio: Use devm_platform_ioremap_resource() Use the new helper that wraps the calls to platform_get_resource() and devm_ioremap_resource() together. Signed-off-by: Enrico Weigelt, metux IT consult Signed-off-by: Linus Walleij drivers/gpio/gpio-grgpio.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 6bdec6c77d62f11545b5487b4649f167c98ab556 Author: Enrico Weigelt, metux IT consult Date: Mon Jun 17 18:49:17 2019 +0200 gpio: ep93xx: Use devm_platform_ioremap_resource() Use the new helper that wraps the calls to platform_get_resource() and devm_ioremap_resource() together. Signed-off-by: Enrico Weigelt, metux IT consult Signed-off-by: Linus Walleij drivers/gpio/gpio-ep93xx.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 2b3fee3622d0973970faf2f5790fbe74cde77e45 Author: Enrico Weigelt, metux IT consult Date: Mon Jun 17 18:49:15 2019 +0200 gpio: amdpt: Drop unneeded deref of &pdev->dev We already have the struct device* pointer in a local variable, so we can write this a bit shorter. Signed-off-by: Enrico Weigelt, metux IT consult Signed-off-by: Linus Walleij drivers/gpio/gpio-amdpt.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit b183cab7fdf79843f79398af139e02186692c6c7 Author: Enrico Weigelt, metux IT consult Date: Mon Jun 17 18:49:14 2019 +0200 gpio: rcar: Pedantic formatting A tab sneaked in, where it shouldn't be. Reviewed-by: Geert Uytterhoeven Signed-off-by: Enrico Weigelt, metux IT consult Signed-off-by: Linus Walleij drivers/gpio/gpio-rcar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f310f2eff794f96b4ea87be7f5938e57c34a64f1 Author: Enrico Weigelt Date: Mon Jun 17 18:45:05 2019 +0200 gpio: Add comments on #if/#else/#endif Improve readability a bit by commenting #if/#else/#endif statements with the checked preprocessor symbols. Signed-off-by: Enrico Weigelt Signed-off-by: Linus Walleij include/linux/gpio/driver.h | 16 ++++++++-------- include/linux/gpio/gpio-reg.h | 2 +- include/linux/gpio/machine.h | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) commit a1000673d288f3bb8bf936b043ef3ed3a4240b0a Author: Enrico Weigelt Date: Mon Jun 17 18:00:11 2019 +0200 gpio: amd: Drop unused pdev pointer in privata data The pointer to the struct platform_device in the driver's private data struct is never used and therefore can be dropped. Signed-off-by: Enrico Weigelt Signed-off-by: Linus Walleij drivers/gpio/gpio-amd-fch.c | 2 -- 1 file changed, 2 deletions(-) commit e1d9149e8389f1690cdd4e4056766dd26488a0fe Author: Vicente Bergas Date: Thu Jun 27 15:12:28 2019 +0200 arm64: dts: rockchip: Fix USB3 Type-C on rk3399-sapphire Before this patch, the Type-C port on the Sapphire board is dead. If setting the 'regulator-always-on' property to 'vcc5v0_typec0' then the port works for about 4 seconds at start-up. This is a sample trace with a memory stick plugged in: 1.- The memory stick LED lights on and kernel reports: [ 4.782999] scsi 0:0:0:0: Direct-Access USB DISK PMAP PQ: 0 ANSI: 4 [ 5.904580] sd 0:0:0:0: [sdb] 3913344 512-byte logical blocks: (2.00 GB/1.87 GiB) [ 5.906860] sd 0:0:0:0: [sdb] Write Protect is off [ 5.908973] sd 0:0:0:0: [sdb] Mode Sense: 23 00 00 00 [ 5.909122] sd 0:0:0:0: [sdb] No Caching mode page found [ 5.911214] sd 0:0:0:0: [sdb] Assuming drive cache: write through [ 5.951585] sdb: sdb1 [ 5.954816] sd 0:0:0:0: [sdb] Attached SCSI removable disk 2.- 4 seconds later the memory stick LED lights off and kernel reports: [ 9.082822] phy phy-ff770000.syscon:usb2-phy@e450.2: charger = USB_DCP_CHARGER 3.- After a minute the kernel reports: [ 71.666761] usb 5-1: USB disconnect, device number 2 It has been checked that, although the LED is off, VBUS is present. If, instead, the dr_mode is changed to host and the phy-supply changed accordingly, then it works. It has only been tested in host mode. Signed-off-by: Vicente Bergas Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 772626ecd2cd5b930fa03b4787ddf51ccf819229 Author: Jonathan Corbet Date: Thu Jun 27 08:35:26 2019 -0600 Add the RCU docs to the core-api manual We should really move the RCU directory there as well, but that can wait for another day. Signed-off-by: Jonathan Corbet Documentation/core-api/index.rst | 1 + 1 file changed, 1 insertion(+) commit 687ac4a702ea92873fb8c45acec0c30eae9acfa9 Author: Alex Deucher Date: Thu Jun 27 09:13:41 2019 -0500 drm/amdgpu: drop copy/paste leftover to fix big endian The buf swap field doesn't exist on RB1. Reviewed-by: Hawking Zhang Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 3 --- 1 file changed, 3 deletions(-) commit c0e679b4a180f7b9f2cee41c2781bb6af29f7755 Author: Jiunn Chang Date: Wed Jun 26 15:07:05 2019 -0500 Documentation: RCU: Add TOC tree hooks Add TOC tree hooks for: - rcu - listRCU - UP Signed-off-by: Jiunn Chang Signed-off-by: Jonathan Corbet Documentation/RCU/index.rst | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit f93a3e4e8705eb3ea17dcd68819b60875c834bad Author: Jiunn Chang Date: Wed Jun 26 15:07:04 2019 -0500 Documentation: RCU: Rename txt files to rst Rename the following files to reST: - rcu.txt - listRCU.txt - UP.txt Signed-off-by: Jiunn Chang Signed-off-by: Jonathan Corbet Documentation/RCU/{UP.txt => UP.rst} | 0 Documentation/RCU/{listRCU.txt => listRCU.rst} | 0 Documentation/RCU/{rcu.txt => rcu.rst} | 0 3 files changed, 0 insertions(+), 0 deletions(-) commit 2a5b0c841a9932e3562c9b0dfddeb54de255a595 Author: Jiunn Chang Date: Wed Jun 26 15:07:03 2019 -0500 Documentation: RCU: Convert RCU UP systems to reST RCU UP systems reST markup. Reviewed-by: Joel Fernandes (Google) Signed-off-by: Jiunn Chang Signed-off-by: Jonathan Corbet Documentation/RCU/UP.txt | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) commit 9422dc24df62ada59ead9e4a499f036b4ce670fc Author: Jiunn Chang Date: Wed Jun 26 15:07:02 2019 -0500 Documentation: RCU: Convert RCU linked list to reST RCU linked list reST markup. Signed-off-by: Jiunn Chang Signed-off-by: Jonathan Corbet Documentation/RCU/listRCU.txt | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) commit a9f0969cd7b3b3653a10ef4a5d62075aa4a5a27f Author: Jiunn Chang Date: Wed Jun 26 15:07:01 2019 -0500 Documentation: RCU: Convert RCU basic concepts to reST RCU basic concepts reST markup. Reviewed-by: Joel Fernandes (Google) Signed-off-by: Jiunn Chang Signed-off-by: Jonathan Corbet Documentation/RCU/rcu.txt | 119 ++++++++++++++++++++++++---------------------- 1 file changed, 61 insertions(+), 58 deletions(-) commit 8d1336c241bdadf61a56e398d82d1e512dbff5f8 Author: Dinh Nguyen Date: Thu Jun 13 06:31:38 2019 -0500 mtd: spi-nor: cadence-quadspi: add reset control Get the reset control properties for the QSPI controller and bring them out of reset. Most will have just one reset bit, but there is an additional OCP reset bit that is used ECC. The OCP reset bit will also need to get de-asserted as well. [1] The reason this patch is needed is in the case where a bootloader leaves the QSPI controller in a reset state, or a state where init cannot occur successfully, the patch will put the QSPI controller into a clean state. [1] https://www.intel.com/content/www/us/en/programmable/hps/arria-10/hps.html#reg_soc_top/sfo1429890575955.html Suggested-by: Tien-Fong Chee Signed-off-by: Dinh Nguyen Reviewed-by: Vignesh Raghavendra [tudor.ambarus@microchip.com: declare rstc and rstc_ocp on the same line] Signed-off-by: Tudor Ambarus drivers/mtd/spi-nor/cadence-quadspi.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 63d3cd297bc045536e4c3eaddc2cf6aa4a8cf0df Author: Dinh Nguyen Date: Thu Jun 13 06:31:37 2019 -0500 dt-bindings: cadence-quadspi: add options reset property The QSPI module can have an optional reset signals that will hold the module in a reset state. Signed-off-by: Dinh Nguyen Signed-off-by: Tudor Ambarus Documentation/devicetree/bindings/mtd/cadence-quadspi.txt | 5 +++++ 1 file changed, 5 insertions(+) commit cf580a92400584a48f59e07c372a635160340864 Author: Liu Xiang Date: Tue Jun 25 00:00:46 2019 +0800 mtd: spi-nor: fix nor->addr_width when its value configured from SFDP does not match the actual width IS25LP256 gets BFPT_DWORD1_ADDRESS_BYTES_3_ONLY from BFPT table for address width. But in actual fact the flash can support 4-byte address. Use a post bfpt fixup hook to overwrite the address width advertised by the BFPT. Signed-off-by: Liu Xiang Reviewed-by: Vignesh Raghavendra Signed-off-by: Tudor Ambarus drivers/mtd/spi-nor/spi-nor.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) commit 8ed14401974830f316a419b073e58ef75a473a63 Author: Tony Xie Date: Fri Jun 21 06:34:55 2019 -0400 clk: RK808: Add RK809 and RK817 support. RK809 and RK817 are power management IC chips for multimedia products. most of their functions and registers are same, including the clkout funciton. Signed-off-by: Tony Xie Acked-by: Stephen Boyd Signed-off-by: Lee Jones drivers/clk/Kconfig | 9 ++++--- drivers/clk/clk-rk808.c | 64 ++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 67 insertions(+), 6 deletions(-) commit dc79054a64b3dc403ff370f9d4a4cbe502f81d77 Author: Tony Xie Date: Fri Jun 21 06:34:38 2019 -0400 rtc: rk808: Add RK809 and RK817 support. RK809 and RK817 are power management IC chips for multimedia products. Most of their functions and registers are same, including the rtc. Signed-off-by: Tony Xie Acked-by: Alexandre Belloni Signed-off-by: Lee Jones drivers/rtc/Kconfig | 4 +-- drivers/rtc/rtc-rk808.c | 68 +++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 56 insertions(+), 16 deletions(-) commit 696d7349f70ece84e0b485291a28781f0ce11245 Author: Tony Xie Date: Fri Jun 21 06:32:56 2019 -0400 dt-bindings: mfd: rk808: Add binding information for RK809 and RK817. Add device tree bindings documentation for Rockchip's RK809 & RK817 PMIC. Signed-off-by: Tony Xie Reviewed-by: Rob Herring Signed-off-by: Lee Jones Documentation/devicetree/bindings/mfd/rk808.txt | 44 +++++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit e444f6d68c07bc01a3a3d5905409dbe1ca391d26 Author: Heiko Stuebner Date: Wed Jun 26 14:29:18 2019 +0200 regulator: rk808: Add RK809 and RK817 support. Add support for the rk809 and rk817 regulator driver. Their specifications are as follows: 1. The RK809 and RK809 consist of 5 DCDCs, 9 LDOs and have the same registers for these components except dcdc5. 2. The dcdc5 is a boost dcdc for RK817 and is a buck for RK809. 3. The RK817 has one switch but The Rk809 has two. The output voltages are configurable and are meant to supply power to the main processor and other components. Signed-off-by: Tony Xie Acked-by: Mark Brown [rebased on top of 5.2-rc1] Signed-off-by: Heiko Stuebner Signed-off-by: Lee Jones drivers/regulator/Kconfig | 4 +- drivers/regulator/rk808-regulator.c | 646 ++++++++++++++++++++++++++++++++++-- include/linux/mfd/rk808.h | 3 + 3 files changed, 625 insertions(+), 28 deletions(-) commit 586c1b4125b3c7bf5b482fcafab5d568b8a3c285 Author: Tony Xie Date: Fri Jun 21 06:32:54 2019 -0400 mfd: rk808: Add RK817 and RK809 support The RK809 and RK817 are a Power Management IC (PMIC) for multimedia and handheld devices. They contains the following components: - Regulators - RTC - Clocking Both RK809 and RK817 chips are using a similar register map, so we can reuse the RTC and Clocking functionality. Most of regulators have a some implementation also. Signed-off-by: Tony Xie Acked-by: Stephen Boyd Signed-off-by: Lee Jones drivers/mfd/Kconfig | 6 +- drivers/mfd/rk808.c | 192 +++++++++++++++++++++++++++++++++++++++++++++- include/linux/mfd/rk808.h | 172 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 364 insertions(+), 6 deletions(-) commit d8dfc3bd461def65fbd180acab7c49a8d8394d7b Author: Alex Deucher Date: Thu Jun 27 08:48:19 2019 -0500 drm/amdgpu: fix warning on 32 bit Properly cast pointer to int. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dce91ba39c765b2b90d07c717683abcdd9891592 Author: Bartosz Golaszewski Date: Tue Jun 25 09:55:44 2019 +0200 eeprom: at24: modify a comment referring to platform data We no longer have platform data in at24, so this comment is invalid. Make it refer to device tree & properties instead. Signed-off-by: Bartosz Golaszewski Acked-by: Wolfram Sang drivers/misc/eeprom/at24.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f360dcd4ef7fbaec774a64c54b402b4c8a4cffb2 Author: Greg Kroah-Hartman Date: Wed Jun 26 10:45:57 2019 +0200 gpio: mockup: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Bamvor Jian Zhang Cc: Linus Walleij Cc: Bartosz Golaszewski Cc: linux-gpio@vger.kernel.org Signed-off-by: Greg Kroah-Hartman [Bartosz: removed one more check for debugfs return value] Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij drivers/gpio/gpio-mockup.c | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) commit a5b47a40bed8b19e956872fb55097d676a68f59e Author: Damien Le Moal Date: Thu Jun 27 11:59:41 2019 +0900 block: Remove unused code bio_flush_dcache_pages() is unused. Remove it. Reviewed-by: Christoph Hellwig Signed-off-by: Damien Le Moal Signed-off-by: Jens Axboe block/bio.c | 12 ------------ include/linux/bio.h | 11 ----------- 2 files changed, 23 deletions(-) commit 156bdac99061b4013c8e47799c6e574f7f84e9f4 Author: Sam Ravnborg Date: Thu Jun 27 20:00:54 2019 +0900 drm/exynos: trigger build of all modules Add COMPILE_TEST dependency to force exynos driver to built for more than arm and to built modules that otherwise required other symbols to be de-selected. This will increase build coverage of the exynos driver thus allowing most trivial build errors to be detected/fixed early. This introduces one warning when built using sh: exynos7_drm_decon.c: In function ‘decon_remove’: exynos7_drm_decon.c:769:24: warning: unused variable ‘ctx’ struct decon_context *ctx = dev_get_drvdata(&pdev->dev); This is due to the definition of iounmap() in sh, and nothing that exynos driver can fix. Include fix of exynos build for alpha. Signed-off-by: Sam Ravnborg Cc: Inki Dae Cc: Joonyoung Shim Cc: Seung-Woo Kim Cc: Kyungmin Park Cc: David Airlie Cc: Daniel Vetter Cc: Kukjin Kim Cc: Krzysztof Kozlowski Cc: Jingoo Han Signed-off-by: Inki Dae drivers/gpu/drm/exynos/Kconfig | 6 +++--- drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) commit 6bbe6f5732faeabb4bb583726ec2d7f9739532bd Author: Mauro Carvalho Chehab Date: Tue Jun 18 18:05:28 2019 -0300 docs: thermal: convert to ReST Rename the thermal documentation files to ReST, add an index for them and adjust in order to produce a nice html output via the Sphinx build system. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Acked-by: Zhang Rui Signed-off-by: Zhang Rui .../{cpu-cooling-api.txt => cpu-cooling-api.rst} | 39 +- .../thermal/{exynos_thermal => exynos_thermal.rst} | 47 +- Documentation/thermal/exynos_thermal_emulation | 53 --- Documentation/thermal/exynos_thermal_emulation.rst | 61 +++ Documentation/thermal/index.rst | 18 + .../{intel_powerclamp.txt => intel_powerclamp.rst} | 183 ++++---- .../{nouveau_thermal => nouveau_thermal.rst} | 54 ++- .../{power_allocator.txt => power_allocator.rst} | 144 +++--- .../thermal/{sysfs-api.txt => sysfs-api.rst} | 488 ++++++++++++++------- ...ure_thermal => x86_pkg_temperature_thermal.rst} | 28 +- MAINTAINERS | 2 +- include/linux/thermal.h | 4 +- 12 files changed, 693 insertions(+), 428 deletions(-) commit 57c5b2ec905933da84fe77b2b54619567ac21297 Author: Daniel Lezcano Date: Wed Jun 12 22:13:25 2019 +0200 thermal/drivers/core: Use governor table to initialize Now that the governor table is in place and the macro allows to browse the table, declare the governor so the entry is added in the governor table in the init section. The [un]register_thermal_governors function does no longer need to use the exported [un]register thermal governor's specific function which in turn call the [un]register_thermal_governor. The governors are fully self-encapsulated. The cyclic dependency is no longer needed, remove it. Reviewed-by: Amit Kucheria Signed-off-by: Daniel Lezcano Signed-off-by: Zhang Rui drivers/thermal/fair_share.c | 12 +-------- drivers/thermal/gov_bang_bang.c | 11 +-------- drivers/thermal/power_allocator.c | 11 +-------- drivers/thermal/step_wise.c | 11 +-------- drivers/thermal/thermal_core.c | 52 ++++++++++++++++++++++----------------- drivers/thermal/thermal_core.h | 40 ------------------------------ drivers/thermal/user_space.c | 12 +-------- 7 files changed, 34 insertions(+), 115 deletions(-) commit 980af75ede4f36107b98aa5c247359b87c6afc30 Author: Daniel Lezcano Date: Wed Jun 12 22:13:24 2019 +0200 thermal/drivers/core: Add init section table for self-encapsulation Currently the governors are declared in their respective files but they export their [un]register functions which in turn call the [un]register governors core's functions. That implies a cyclic dependency which is not desirable. There is a way to self-encapsulate the governors by letting them to declare themselves in a __init section table. Define the table in the asm generic linker description like the other tables and provide the specific macros to deal with. Reviewed-by: Amit Kucheria Signed-off-by: Daniel Lezcano Signed-off-by: Zhang Rui drivers/thermal/thermal_core.h | 15 +++++++++++++++ include/asm-generic/vmlinux.lds.h | 11 +++++++++++ 2 files changed, 26 insertions(+) commit e6d237fdc13a790c1f73b74f7a9e85529b9ed44b Author: Enric Balletbo i Serra Date: Thu Jun 13 18:27:45 2019 +0200 arm64: dts: rockchip: Update DWC3 modules on RK3399 SoCs As per binding documentation [1], the DWC3 core should have the "ref", "bus_early" and "suspend" clocks. As explained in the binding, those clocks are required for new platforms but not for existing platforms before commit fe8abf332b8f ("usb: dwc3: support clocks and resets for DWC3 core"). However, as those clocks are really treated as required, this ends with having some annoying messages when the "rockchip,rk3399-dwc3" is used: [ 1.724107] dwc3 fe800000.dwc3: Failed to get clk 'ref': -2 [ 1.731893] dwc3 fe900000.dwc3: Failed to get clk 'ref': -2 [ 2.495937] dwc3 fe800000.dwc3: Failed to get clk 'ref': -2 [ 2.647239] dwc3 fe900000.dwc3: Failed to get clk 'ref': -2 In order to remove those annoying messages, update the DWC3 hardware module node and add all the required clocks. With this change, both, the glue node and the DWC3 core node, have the clocks defined, but that's not really a problem and there isn't a side effect on do this. So, we can get rid of the annoying get clk error messages. [1] Documentation/devicetree/bindings/usb/dwc3.txt Signed-off-by: Enric Balletbo i Serra Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit fb59ee37cfe20d10d19568899d1458a58361246c Author: Faiz Abbas Date: Wed Jun 19 15:54:54 2019 +0530 ARM: dts: am57xx: Disable voltage switching for SD card If UHS speed modes are enabled, a compatible SD card switches down to 1.8V during enumeration. If after this a software reboot/crash takes place and on-chip ROM tries to enumerate the SD card, the difference in IO voltages (host @ 3.3V and card @ 1.8V) may end up damaging the card. The fix for this is to have support for power cycling the card in hardware (with a PORz/soft-reset line causing a power cycle of the card). Because the beaglebone X15 (rev A,B and C), am57xx-idks and am57xx-evms don't have this capability, disable voltage switching for these boards. The major effect of this is that the maximum supported speed mode is now high speed(50 MHz) down from SDR104(200 MHz). commit 88a748419b84 ("ARM: dts: am57xx-idk: Remove support for voltage switching for SD card") did this only for idk boards. Do it for all affected boards. Signed-off-by: Faiz Abbas Signed-off-by: Tony Lindgren arch/arm/boot/dts/am571x-idk.dts | 7 +------ arch/arm/boot/dts/am572x-idk.dts | 7 +------ arch/arm/boot/dts/am574x-idk.dts | 7 +------ arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi | 1 + arch/arm/boot/dts/am57xx-beagle-x15-revb1.dts | 7 +------ arch/arm/boot/dts/am57xx-beagle-x15-revc.dts | 7 +------ 6 files changed, 6 insertions(+), 30 deletions(-) commit 288aa4ee7acfabc3913f63aa5815a265ded945a6 Author: Christoph Hellwig Date: Tue Jun 25 12:29:32 2019 +0200 b43: simplify engine type / DMA mask selection Return the engine type from the function looking at the registers, and just derive the DMA mask from that in the one place we care. Signed-off-by: Christoph Hellwig Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/b43/dma.c | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) commit c897523febae8cd7f5e40a38f5f4e62588cbb093 Author: Christoph Hellwig Date: Tue Jun 25 12:29:31 2019 +0200 b43: remove b43_dma_set_mask These days drivers are not required to fallback to smaller DMA masks, but can just set the largest mask they support, removing the need for this trial and error logic. Signed-off-by: Christoph Hellwig Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/b43/dma.c | 43 ++++----------------------------- 1 file changed, 5 insertions(+), 38 deletions(-) commit 80372782e4cb65f29b252ecec5a966355d773275 Author: Christoph Hellwig Date: Tue Jun 25 12:29:30 2019 +0200 b43legacy: simplify engine type / DMA mask selection Return the engine type from the function looking at the registers, and just derive the DMA mask from that in the one place we care. Signed-off-by: Christoph Hellwig Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/b43legacy/dma.c | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) commit 258989000849a48ff21400cf90c93be3f08d0582 Author: Christoph Hellwig Date: Tue Jun 25 12:29:29 2019 +0200 b43legacy: remove b43legacy_dma_set_mask These days drivers are not required to fallback to smaller DMA masks, but can just set the largest mask they support, removing the need for this trial and error logic. Signed-off-by: Christoph Hellwig Tested-by: Larry Finger Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/b43legacy/dma.c | 39 +-------------------------- 1 file changed, 1 insertion(+), 38 deletions(-) commit f81cbfc4f82a75ca0a2dc181a9c93b88f0e6509d Author: Michael Tretter Date: Tue Jun 25 10:13:20 2019 -0400 media: allegro: use new v4l2_m2m_ioctl_try_encoder_cmd funcs As the try_encoder_cmd is identical for many drivers, there are now helpers for this function in the mem2mem core. Use the helper in allegro. This fixes the v4l2-compliance test regarding V4L2_ENC_CMD_STOP, because the allegro-specific function rejected invalid flags. Signed-off-by: Michael Tretter Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/allegro-dvt/allegro-core.c | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) commit 46fb4749788159412622c5bb9d087a217cc00152 Author: Bastien Nocera Date: Tue Jun 25 08:03:48 2019 -0400 media: doc-rst: Fix typos Not sure how codespell thinks "sroweam" is a real word. Signed-off-by: Bastien Nocera Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/rc/rc-tables.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit c666355e60ddb4748ead3bdd983e3f7f2224aaf0 Author: Luke Nowakowski-Krijger Date: Fri Jun 21 21:04:38 2019 -0400 media: radio-raremono: change devm_k*alloc to k*alloc Change devm_k*alloc to k*alloc to manually allocate memory The manual allocation and freeing of memory is necessary because when the USB radio is disconnected, the memory associated with devm_k*alloc is freed. Meaning if we still have unresolved references to the radio device, then we get use-after-free errors. This patch fixes this by manually allocating memory, and freeing it in the v4l2.release callback that gets called when the last radio device exits. Reported-and-tested-by: syzbot+a4387f5b6b799f6becbf@syzkaller.appspotmail.com Signed-off-by: Luke Nowakowski-Krijger Signed-off-by: Hans Verkuil [hverkuil-cisco@xs4all.nl: cleaned up two small checkpatch.pl warnings] [hverkuil-cisco@xs4all.nl: prefix subject with driver name] Signed-off-by: Mauro Carvalho Chehab drivers/media/radio/radio-raremono.c | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) commit b09a2ab2baeb36bf7ef7780405ad172281741c7c Author: Mauro Carvalho Chehab Date: Tue Jun 25 06:45:20 2019 -0400 media: stv0297: fix frequency range limit There was a typo at the lower frequency limit for a DVB-C card, causing the driver to fail while tuning channels at the VHF range. https://bugzilla.kernel.org/show_bug.cgi?id=202083 Fixes: f1b1eabff0eb ("media: dvb: represent min/max/step/tolerance freqs in Hz") Reported-by: Ari Kohtamäki Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/stv0297.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1910ea428f28e5731a2cea32b86e71953829f15d Author: Bastien Nocera Date: Mon Jun 24 11:42:14 2019 -0400 media: rc: Prefer KEY_NUMERIC_* for number buttons on remotes Prefer KEY_NUMERIC_* for number buttons on remotes. Now all the remotes use KEY_NUMERIC_[0-9] for the number buttons rather than keys that could be affected by modifiers (Caps-Lock, or Num-Lock) or regional keymaps. Created using: sed -i 's/KEY_\([0-9]\) /KEY_NUMERIC_\1 /' *.c sed -i 's/KEY_\([0-9]\)}/KEY_NUMERIC_\1}/' *.c sed -i 's/``KEY_\([0-9]\)/``KEY_NUMERIC_\1/' Documentation/media/uapi/rc/rc-tables.rst Signed-off-by: Bastien Nocera Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/rc/rc-tables.rst | 20 ++--- drivers/media/rc/keymaps/rc-adstech-dvb-t-pci.c | 20 ++--- drivers/media/rc/keymaps/rc-alink-dtu-m.c | 20 ++--- drivers/media/rc/keymaps/rc-anysee.c | 20 ++--- drivers/media/rc/keymaps/rc-apac-viewcomp.c | 20 ++--- drivers/media/rc/keymaps/rc-astrometa-t2hybrid.c | 20 ++--- drivers/media/rc/keymaps/rc-asus-pc39.c | 20 ++--- drivers/media/rc/keymaps/rc-asus-ps3-100.c | 20 ++--- drivers/media/rc/keymaps/rc-ati-x10.c | 20 ++--- drivers/media/rc/keymaps/rc-avermedia-a16d.c | 20 ++--- drivers/media/rc/keymaps/rc-avermedia-cardbus.c | 20 ++--- drivers/media/rc/keymaps/rc-avermedia-dvbt.c | 20 ++--- drivers/media/rc/keymaps/rc-avermedia-m135a.c | 40 ++++----- .../media/rc/keymaps/rc-avermedia-m733a-rm-k6.c | 20 ++--- drivers/media/rc/keymaps/rc-avermedia-rm-ks.c | 20 ++--- drivers/media/rc/keymaps/rc-avermedia.c | 20 ++--- drivers/media/rc/keymaps/rc-avertv-303.c | 20 ++--- drivers/media/rc/keymaps/rc-azurewave-ad-tu700.c | 20 ++--- drivers/media/rc/keymaps/rc-behold-columbus.c | 20 ++--- drivers/media/rc/keymaps/rc-behold.c | 20 ++--- drivers/media/rc/keymaps/rc-budget-ci-old.c | 20 ++--- drivers/media/rc/keymaps/rc-cinergy-1400.c | 20 ++--- drivers/media/rc/keymaps/rc-cinergy.c | 20 ++--- drivers/media/rc/keymaps/rc-d680-dmb.c | 20 ++--- drivers/media/rc/keymaps/rc-delock-61959.c | 20 ++--- drivers/media/rc/keymaps/rc-dib0700-nec.c | 40 ++++----- drivers/media/rc/keymaps/rc-dib0700-rc5.c | 100 ++++++++++----------- drivers/media/rc/keymaps/rc-digitalnow-tinytwin.c | 20 ++--- drivers/media/rc/keymaps/rc-digittrade.c | 20 ++--- drivers/media/rc/keymaps/rc-dm1105-nec.c | 20 ++--- drivers/media/rc/keymaps/rc-dntv-live-dvb-t.c | 20 ++--- drivers/media/rc/keymaps/rc-dntv-live-dvbt-pro.c | 20 ++--- drivers/media/rc/keymaps/rc-dtt200u.c | 20 ++--- drivers/media/rc/keymaps/rc-dvbsky.c | 20 ++--- drivers/media/rc/keymaps/rc-dvico-mce.c | 20 ++--- drivers/media/rc/keymaps/rc-dvico-portable.c | 20 ++--- drivers/media/rc/keymaps/rc-em-terratec.c | 20 ++--- drivers/media/rc/keymaps/rc-encore-enltv-fm53.c | 20 ++--- drivers/media/rc/keymaps/rc-encore-enltv.c | 20 ++--- drivers/media/rc/keymaps/rc-encore-enltv2.c | 20 ++--- drivers/media/rc/keymaps/rc-eztv.c | 20 ++--- drivers/media/rc/keymaps/rc-flydvb.c | 20 ++--- drivers/media/rc/keymaps/rc-flyvideo.c | 20 ++--- drivers/media/rc/keymaps/rc-fusionhdtv-mce.c | 20 ++--- drivers/media/rc/keymaps/rc-gadmei-rm008z.c | 20 ++--- drivers/media/rc/keymaps/rc-genius-tvgo-a11mce.c | 20 ++--- drivers/media/rc/keymaps/rc-gotview7135.c | 20 ++--- drivers/media/rc/keymaps/rc-hauppauge.c | 100 ++++++++++----------- drivers/media/rc/keymaps/rc-hisi-poplar.c | 20 ++--- drivers/media/rc/keymaps/rc-hisi-tv-demo.c | 20 ++--- drivers/media/rc/keymaps/rc-iodata-bctv7e.c | 20 ++--- drivers/media/rc/keymaps/rc-it913x-v1.c | 40 ++++----- drivers/media/rc/keymaps/rc-it913x-v2.c | 40 ++++----- drivers/media/rc/keymaps/rc-kaiomy.c | 20 ++--- drivers/media/rc/keymaps/rc-kworld-315u.c | 20 ++--- drivers/media/rc/keymaps/rc-kworld-pc150u.c | 20 ++--- .../media/rc/keymaps/rc-kworld-plus-tv-analog.c | 24 ++--- drivers/media/rc/keymaps/rc-leadtek-y04g0051.c | 20 ++--- drivers/media/rc/keymaps/rc-lme2510.c | 60 ++++++------- drivers/media/rc/keymaps/rc-manli.c | 20 ++--- .../media/rc/keymaps/rc-medion-x10-digitainer.c | 20 ++--- drivers/media/rc/keymaps/rc-medion-x10-or2x.c | 20 ++--- drivers/media/rc/keymaps/rc-medion-x10.c | 20 ++--- drivers/media/rc/keymaps/rc-msi-digivox-ii.c | 20 ++--- drivers/media/rc/keymaps/rc-msi-digivox-iii.c | 20 ++--- drivers/media/rc/keymaps/rc-msi-tvanywhere-plus.c | 20 ++--- drivers/media/rc/keymaps/rc-msi-tvanywhere.c | 20 ++--- drivers/media/rc/keymaps/rc-nebula.c | 20 ++--- .../media/rc/keymaps/rc-nec-terratec-cinergy-xs.c | 40 ++++----- drivers/media/rc/keymaps/rc-norwood.c | 20 ++--- drivers/media/rc/keymaps/rc-npgtech.c | 20 ++--- drivers/media/rc/keymaps/rc-pctv-sedna.c | 20 ++--- drivers/media/rc/keymaps/rc-pinnacle-color.c | 20 ++--- drivers/media/rc/keymaps/rc-pinnacle-grey.c | 20 ++--- drivers/media/rc/keymaps/rc-pinnacle-pctv-hd.c | 20 ++--- drivers/media/rc/keymaps/rc-pixelview-002t.c | 20 ++--- drivers/media/rc/keymaps/rc-pixelview-mk12.c | 20 ++--- drivers/media/rc/keymaps/rc-pixelview-new.c | 20 ++--- drivers/media/rc/keymaps/rc-pixelview.c | 20 ++--- .../media/rc/keymaps/rc-powercolor-real-angel.c | 20 ++--- drivers/media/rc/keymaps/rc-proteus-2309.c | 20 ++--- drivers/media/rc/keymaps/rc-purpletv.c | 20 ++--- drivers/media/rc/keymaps/rc-pv951.c | 20 ++--- .../media/rc/keymaps/rc-real-audio-220-32-keys.c | 20 ++--- drivers/media/rc/keymaps/rc-reddo.c | 20 ++--- drivers/media/rc/keymaps/rc-snapstream-firefly.c | 20 ++--- drivers/media/rc/keymaps/rc-su3000.c | 20 ++--- drivers/media/rc/keymaps/rc-tango.c | 20 ++--- drivers/media/rc/keymaps/rc-tbs-nec.c | 20 ++--- drivers/media/rc/keymaps/rc-technisat-ts35.c | 20 ++--- drivers/media/rc/keymaps/rc-technisat-usb2.c | 20 ++--- .../media/rc/keymaps/rc-terratec-cinergy-c-pci.c | 20 ++--- .../media/rc/keymaps/rc-terratec-cinergy-s2-hd.c | 20 ++--- drivers/media/rc/keymaps/rc-terratec-cinergy-xs.c | 20 ++--- drivers/media/rc/keymaps/rc-terratec-slim-2.c | 20 ++--- drivers/media/rc/keymaps/rc-terratec-slim.c | 20 ++--- drivers/media/rc/keymaps/rc-tevii-nec.c | 20 ++--- .../media/rc/keymaps/rc-total-media-in-hand-02.c | 20 ++--- drivers/media/rc/keymaps/rc-total-media-in-hand.c | 20 ++--- drivers/media/rc/keymaps/rc-trekstor.c | 20 ++--- drivers/media/rc/keymaps/rc-tt-1500.c | 20 ++--- drivers/media/rc/keymaps/rc-twinhan-dtv-cab-ci.c | 20 ++--- drivers/media/rc/keymaps/rc-twinhan1027.c | 20 ++--- drivers/media/rc/keymaps/rc-videomate-m1f.c | 20 ++--- drivers/media/rc/keymaps/rc-videomate-s350.c | 20 ++--- drivers/media/rc/keymaps/rc-videomate-tv-pvr.c | 20 ++--- drivers/media/rc/keymaps/rc-winfast-usbii-deluxe.c | 20 ++--- drivers/media/rc/keymaps/rc-winfast.c | 20 ++--- drivers/media/rc/keymaps/rc-xbox-dvd.c | 20 ++--- drivers/media/rc/keymaps/rc-zx-irdec.c | 20 ++--- 110 files changed, 1254 insertions(+), 1250 deletions(-) commit 15a98fb2fc287bbfe430e854d56dcfc86eae21db Author: Arnd Bergmann Date: Mon Jun 17 07:16:52 2019 -0400 media: dvb_frontend: split dvb_frontend_handle_ioctl function Over time, dvb_frontend_handle_ioctl() has grown to the point where we now get a warning from the compiler about excessive stack usage: drivers/media/dvb-core/dvb_frontend.c: In function 'dvb_frontend_handle_ioctl': drivers/media/dvb-core/dvb_frontend.c:2692:1: error: the frame size of 1048 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] Almost all of this is used by the dtv_frontend_properties structure in the FE_GET_PROPERTY and FE_GET_FRONTEND commands. Splitting those into separate function reduces the stack usage of the main function to just 136 bytes, the others are under 500 each. Signed-off-by: Arnd Bergmann Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_frontend.c | 140 +++++++++++++++++++--------------- 1 file changed, 77 insertions(+), 63 deletions(-) commit a91418ac130d1abff38e86ba6f5cbf19a5daacec Author: A Sun Date: Wed Jun 19 03:53:53 2019 -0400 media: mceusb: disable "nonsensical irdata" messages mceusb device 2304:0225, and likely others, produces numerous [ 4231.111310] mceusb 1-1.1.2:1.0: nonsensical irdata 80 with duration 0 [ 4381.493597] mceusb 1-1.1.2:1.0: nonsensical irdata 80 with duration 0 [ 4410.247568] mceusb 1-1.1.2:1.0: nonsensical irdata 80 with duration 0 ... [60153.264064] mceusb 1-1.1.2:1.0: nonsensical irdata 00 with duration 0 ... due to reception of ambient IR noise. Change these warning messages to debug messages. Signed-off-by: A Sun Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/mceusb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9e2e4382ec72d9f3a288b4218f684faee7bb3c92 Author: Ding Xiang Date: Tue Jun 18 05:13:09 2019 -0400 media: rc: remove redundant dev_err message devm_ioremap_resource already contains error message, so remove the redundant dev_err message Signed-off-by: Ding Xiang Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/meson-ir.c | 4 +--- drivers/media/rc/mtk-cir.c | 4 +--- drivers/media/rc/sunxi-cir.c | 1 - 3 files changed, 2 insertions(+), 7 deletions(-) commit b48cb35c6a7babdc317edb4c752ecf3da0691228 Author: Hans Verkuil Date: Thu Jun 20 06:10:00 2019 -0400 media: cec-notifier: add new notifier functions In order to support multiple CEC devices for an HDMI connector, and to support cec_connector_info, drivers should use either a cec_notifier_conn_(un)register pair of functions (HDMI drivers) or a cec_notifier_cec_adap_(un)register pair (CEC adapter drivers). This replaces cec_notifier_get_conn/cec_notifier_put. For CEC adapters it is also no longer needed to call cec_notifier_register, cec_register_cec_notifier and cec_notifier_unregister. This is now all handled internally by the new functions. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/cec/cec-notifier.c | 85 ++++++++++++++++++++++++++++++++++++++++ include/media/cec-notifier.h | 78 ++++++++++++++++++++++++++++++++++++ 2 files changed, 163 insertions(+) commit 32a847f9fa40ec1b03ead2c514862764983ff9ca Author: Dariusz Marcinkiewicz Date: Thu Jun 20 05:17:18 2019 -0400 media: cec: add struct cec_connector_info support Define struct cec_connector_info in media/cec.h and define CEC_CAP_CONNECTOR_INFO. In a later patch this will be moved to uapi/linux/cec.h. The CEC_CAP_CONNECTOR_INFO capability can be set by drivers, but cec_allocate_adapter() will remove it again until the public API for this can be enabled once all drm drivers wire this up correctly. Also add the cec_fill_conn_info_from_drm and cec_s_conn_info functions, which are needed by drm drivers to fill in the cec_connector info based on a drm_connector. The cec_notifier_(un)register and cec_register_cec_notifier prototypes were moved from cec-notifier.h to cec.h since cec.h no longer includes cec-notifier.h. These headers included each other before, which caused various problems. Due to these changes the seco-cec driver was changed as well: it should include cec-notifier.h, not cec.h. Signed-off-by: Dariusz Marcinkiewicz Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/cec/cec-adap.c | 29 +++++++++ drivers/media/cec/cec-core.c | 5 ++ drivers/media/platform/seco-cec/seco-cec.c | 2 +- include/media/cec-notifier.h | 39 ------------ include/media/cec.h | 98 +++++++++++++++++++++++++++++- 5 files changed, 132 insertions(+), 41 deletions(-) commit 3d51dc03a4eeb78eac676a559ee984f4f1bb455c Author: Hans Verkuil Date: Thu Jun 20 04:39:00 2019 -0400 media: cec-notifier: rename variables, check kstrdup and n->conn_name dev -> hdmi_dev conn -> conn_name Check if n->conn_name is not NULL before calling strcmp. Check the result of kstrdup, and clean up on error. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/cec/cec-notifier.c | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) commit ca98329d3b58ef636b8f455b0b1b6ac9c89738b2 Author: Vidya Sagar Date: Tue Jun 25 14:52:38 2019 +0530 PCI: dwc: Export APIs to support .remove() implementation Export all configuration space access APIs and also other APIs to support host controller drivers of dwc core based implementations while adding support for .remove() hook to build their respective drivers as modules. Signed-off-by: Vidya Sagar Signed-off-by: Lorenzo Pieralisi Acked-by: Gustavo Pimentel drivers/pci/controller/dwc/pcie-designware-host.c | 4 ++++ drivers/pci/controller/dwc/pcie-designware.c | 4 ++++ 2 files changed, 8 insertions(+) commit 7bc082d7e97009f252bd432de5d476b0bcf3b266 Author: Vidya Sagar Date: Tue Jun 25 14:52:37 2019 +0530 PCI: dwc: Cleanup DBI,ATU read and write APIs Cleanup DBI read and write APIs by removing leading "__" (underscore) from their names as there is no reason to have leading underscores in the first place in the function definition. Remove dbi/dbi2 base address parameters as the same behaviour can be obtained through read and write APIs. Since dw_pcie_{readl/writel}_dbi() APIs can't be used for ATU read/write as ATU base address could be different from DBI base address, implement ATU read/write APIs using ATU base address without using dw_pcie_{readl/writel}_dbi() APIs. Signed-off-by: Vidya Sagar Signed-off-by: Lorenzo Pieralisi Acked-by: Jingoo Han drivers/pci/controller/dwc/pcie-designware.c | 57 ++++++++++++++++++++-------- drivers/pci/controller/dwc/pcie-designware.h | 34 ++++++++--------- 2 files changed, 57 insertions(+), 34 deletions(-) commit 9d071cade30a05b46e894885beeba9922dc4fd23 Author: Vidya Sagar Date: Tue Jun 25 14:52:36 2019 +0530 PCI: dwc: Add API support to de-initialize host Add an API to group all the tasks to be done to de-initialize host which can then be called by any dwc core based driver implementations while adding .remove() support in their respective drivers. Signed-off-by: Vidya Sagar Signed-off-by: Lorenzo Pieralisi Acked-by: Gustavo Pimentel drivers/pci/controller/dwc/pcie-designware-host.c | 8 ++++++++ drivers/pci/controller/dwc/pcie-designware.h | 5 +++++ 2 files changed, 13 insertions(+) commit 676fabd1d2f089f9fb8bece3476c2ab5584b4a1a Author: Lorenzo Bianconi Date: Thu Jun 27 12:13:16 2019 +0200 mt76: mt7603: fix sparse warnings: warning: incorrect type in assignment (different base types) Fix the following sparse warning in mt7603_mcu_set_eeprom: drivers/net/wireless/mediatek/mt76/mt7603/mcu.c:376:30: sparse: warning: incorrect type in assignment (different base types) drivers/net/wireless/mediatek/mt76/mt7603/mcu.c:376:30: sparse: expected unsigned short [usertype] addr drivers/net/wireless/mediatek/mt76/mt7603/mcu.c:376:30: sparse: got restricted __le16 [usertype] Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7603/mcu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d923cf6bc38a7b174e6b813d1bf72c926539858c Author: Lorenzo Bianconi Date: Thu Jun 27 11:50:25 2019 +0200 mt76: mt7615: fix sparse warnings: warning: cast from restricted __le16 Do not convert {tx,rx}_mcs_map to little-endian since it is already done by mac80211. This patch fix the following sparse warning: drivers/net/wireless/mediatek/mt76/mt7615/mcu.c:1497:25: sparse: warning: cast from restricted __le16 drivers/net/wireless/mediatek/mt76/mt7615/mcu.c:1499:25: sparse: warning: cast from restricted __le16 Fixes: 04b8e65922f6 ("mt76: add mac80211 driver for MT7615 PCIe-based chipsets") Fixes: 3ca0a6f6e9df ("mt7615: mcu: use standard signature for mt7615_mcu_msg_send") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit eda96044de274cbf7263834b5cecb51f1f7b0984 Author: Lorenzo Bianconi Date: Thu Jun 27 10:44:49 2019 +0200 mt76: mt7615: fix sparse warnings: incorrect type in assignment (different base types) Fix the following sparse warning in mt7615_mcu_bss_info_ext_header: drivers/net/wireless/mediatek/mt76/mt7615/mcu.c:728:30: sparse: sparse: incorrect type in assignment (different base types) drivers/net/wireless/mediatek/mt76/mt7615/mcu.c:728:30: sparse: expected restricted __le32 [usertype] mbss_tsf_offset Reported-by: kbuild test robot Fixes: 04b8e65922f6 ("mt76: add mac80211 driver for MT7615 PCIe-based chipsets") Fixes: 7339fbc0caa5 ("mt7615: mcu: do not use function pointers whenever possible") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 81ca02a17404755f4baed82be1fce4604a25848e Author: Lorenzo Bianconi Date: Sun Jun 23 22:25:39 2019 +0200 mt76: mt76u: get rid of {out,in}_max_packet Remove {out,in}_max_packet from mt76_usb data structure since they just track last usb endpoint and they are not actually used Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt76.h | 2 -- drivers/net/wireless/mediatek/mt76/usb.c | 2 -- 2 files changed, 4 deletions(-) commit d8b8890d5943ff68470c5a246fc500a830372812 Author: Lorenzo Bianconi Date: Fri Jun 21 22:31:28 2019 +0200 mt76: move nl80211_dfs_regions in mt76_dev data structure Move dfs region field in mt76_dev data structure since it is used by all drivers. This is a preliminary patch to add DFS support to mt7615 driver Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt76.h | 2 ++ drivers/net/wireless/mediatek/mt76/mt7603/debugfs.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7603/init.c | 4 ++-- drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h | 2 -- drivers/net/wireless/mediatek/mt76/mt76x02_debugfs.c | 2 +- drivers/net/wireless/mediatek/mt76/mt76x02_dfs.c | 16 ++++++++-------- drivers/net/wireless/mediatek/mt76/mt76x02_dfs.h | 2 -- 7 files changed, 14 insertions(+), 16 deletions(-) commit 07d557f640ced1935f693903a2f31d123d403998 Author: Lorenzo Bianconi Date: Fri Jun 21 19:15:26 2019 +0200 mt76: mt7615: remove cfg80211_chan_def from mt7615_set_channel signature Simplify mt7615_set_channel signature removing cfg80211_chan_def parameter since it is not actually used Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 14663f0c8d3df5119a3fc4a0e044836c6d3ab8d6 Author: Lorenzo Bianconi Date: Thu Jun 20 12:39:36 2019 +0200 mt76: mt76u: reduce rx memory footprint Reduce rx memory footprint allocating just one SG buffer since for the moment we support just 3839B as maximal size of an A-MSDU. Introduce different SG_MAX_SIZE definitions for TX and RX sides. Moreover set q->buf_size to PAGE_SIZE even for SG case. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt76.h | 3 ++- drivers/net/wireless/mediatek/mt76/mt76x0/usb.c | 2 +- drivers/net/wireless/mediatek/mt76/mt76x2/usb_init.c | 2 +- drivers/net/wireless/mediatek/mt76/usb.c | 18 +++++++++++------- 4 files changed, 15 insertions(+), 10 deletions(-) commit e991c4c2998353212adb1c2b7c3052d61fa6c307 Author: Ryder Lee Date: Thu Jun 13 15:13:31 2019 +0800 mt76: mt7615: update peer's bssid when state transition occurs This makes sure that the driver update peer's bssid when state transition occurs. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/main.c | 5 ++--- drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 27 ++++++++++++------------ 2 files changed, 16 insertions(+), 16 deletions(-) commit 1a09d9e0e5f0e65fa3b5fc4df4e97651f0b544ef Author: Ryder Lee Date: Thu Jun 13 15:13:30 2019 +0800 mt76: mt7615: fix incorrect settings in mesh mode Fix wrong settings that will drop packets due to hardware's RX table searching flow. Fixes: f072c7ba2150 ("mt76: mt7615: enable support for mesh") Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 18bb262787592d40c6c8d0ec4b505f19c69ea0e1 Author: Lorenzo Bianconi Date: Wed Jun 12 11:31:15 2019 +0200 mt76: mt76x02u: fix sparse warnings: should it be static? Fix following sparse warnings in mt76x02_usb_core.c drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c:29:6: warning: symbol 'mt76x02u_tx_complete_skb' was not declared. Should it be static? drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c:37:5: warning: symbol 'mt76x02u_skb_dma_info' was not declared. Should it be static? drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c:96:52: warning: restricted __le16 degrades to integer drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c:74:5: warning: symbol 'mt76x02u_tx_prepare_skb' was not declared. Should it be static? drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c:244:6: warning: symbol 'mt76x02u_init_beacon_config' was not declared. Should it be static? drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c:262:6: warning: symbol 'mt76x02u_exit_beacon_config' was not declared. Should it be static? Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 16a2f8e2cad50618f7c5ccf18e83263f940afdb0 Author: Lorenzo Bianconi Date: Tue Jun 11 08:38:53 2019 +0200 mt76: mt7615: take into account extPA when configuring tx power When TSSI calibration is disabled (which it means the device has been equipped with an external power amplifier) we need to refer to different eeprom fields in order to properly configure tx power Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c | 12 +++++++++++- drivers/net/wireless/mediatek/mt76/mt7615/eeprom.h | 17 +++++++++++++++++ drivers/net/wireless/mediatek/mt76/mt7615/init.c | 9 ++++++--- drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 10 ++++++---- drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h | 3 ++- 5 files changed, 42 insertions(+), 9 deletions(-) commit 391ff7ffd149da87019d652cd678d9e76103e415 Author: Lorenzo Bianconi Date: Tue Jun 11 08:38:52 2019 +0200 mt76: mt7615: init per-channel target power Set per-channel target power as the minimum between the regulatory tx power and the value configured in the eeprom Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/init.c | 43 ++++++++++++++++++++++++ 1 file changed, 43 insertions(+) commit bf92e76851009e6bf082db9e9de9b0ab9320cf26 Author: Ryder Lee Date: Thu Jun 13 15:13:29 2019 +0800 mt76: mt7615: add support for per-chain signal strength reporting Fill in RX status->chain_signal to avoid empty value. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 22 +++++++++++++++++++++- drivers/net/wireless/mediatek/mt76/mt7615/mac.h | 5 +++++ 2 files changed, 26 insertions(+), 1 deletion(-) commit 760556042acdd4f0c964fd6403f828b33fce3822 Author: Lorenzo Bianconi Date: Sat Jun 8 16:44:36 2019 +0200 mt76: mt7615: simplify mt7615_mcu_set_sta_rec routine Move conn_type configuration directly in mt7615_mcu_set_sta_rec and remove sta_rec_convert_vif_type since it is actually used just in mt7615_mcu_set_sta_rec Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 33 +++++++++---------------- 1 file changed, 12 insertions(+), 21 deletions(-) commit ac7ff57127cc5aec434b2220f6e80ab319646984 Author: Felix Fietkau Date: Tue Jun 25 00:16:20 2019 +0200 mt76: mt7603: improve hardware rate switching configuration Now that tx status reporting can figure out the first attempted rate, we can make switching from lower rates to higher rates more conservative. This reduces retries under bad link conditions and ensures that fallback rates get more test coverage Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7603/init.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit c5211e997eca0e3fc5c7c9e047ac6b073c3d74f4 Author: Felix Fietkau Date: Tue Jun 25 00:03:45 2019 +0200 mt76: mt7603: rework and fix tx status reporting Tx status reporting on mt7603 has a number of issues: - the hardware can alter the first rate index, but it is not reported to the driver - probing is very imprecise, because it alters the per-client rate set, but only considers info->status.rates for rate selection of a single probe packet - short/long GI selection has limitations, which are not accurately reported to mac80211 - if rates are changed while packets are in flight, tx status reports for the old rate set might be processed based on the new selection This led to very suboptimal rate selection with minstrel_ht. This patch completely reworks tx status reporting to get rid of these limitations: - Store the previous and current rate set in the driver + the TSF value at the time of the switch. - Use the tx status TSF value to determine which rate set needs to be used as reference. - Report only short or long GI rates for a single status event, not a mix. - The hardware reports the last used rate index. Use it along with the retry count to figure out what rate was used for the first attempt. - Use the same retry count value for all rate slots to make this calculation work. - Derive the probe rate from the current rateset instead of the skb cb - Do not wait for a status report for the probe frame before removing the probe rate from the rate table. Do it immediately after it was referenced in a tx status report. - Use the first half of the first rate retry budget for the probe rate in order to avoid using too many retries on that rate With this patch, throughput under bad link conditions is improved significantly, and there is a lot less rate fluctuation going on. Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7603/init.c | 5 +- drivers/net/wireless/mediatek/mt76/mt7603/mac.c | 127 +++++++++++++++------ drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h | 11 +- drivers/net/wireless/mediatek/mt76/mt7603/regs.h | 6 + 4 files changed, 108 insertions(+), 41 deletions(-) commit 10ece0086f33c3650df862869ab8ac015d6592b5 Author: Felix Fietkau Date: Tue Jun 25 12:25:25 2019 +0200 mt76: mt76x0: fix RF frontend initialization for external PA When loading EEPROM data from flash, the RF frontend settings need to be initialized from flash data. Without this, the chip loads the wrong values from its internal eFuse ROM. Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt76x0/phy.c | 13 +++++++------ drivers/net/wireless/mediatek/mt76/mt76x02_eeprom.h | 1 + drivers/net/wireless/mediatek/mt76/mt76x02_regs.h | 3 +++ 3 files changed, 11 insertions(+), 6 deletions(-) commit f57d8fa7fbcc26831b9aea8501aff9986089665f Author: Lorenzo Bianconi Date: Wed Jun 5 00:12:20 2019 +0200 mt76: mt7615: remove key check in mt7615_mcu_set_wtbl_key Do not check key pointer in mt7615_mcu_set_wtbl_key since if set_key_cmd is SET_KEY, key will be always not NULL. This patch will address a false positive reported by Coverity-Scan Addresses-Coverity-ID: 1445463 ("Dereference after null check") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 80d2cb4e9c438d59eb2ce8b0451274b5959d63c0 Author: Lorenzo Bianconi Date: Tue Jun 4 12:06:06 2019 +0200 mt76: mt7615: remove unused variable in mt7615_mcu_set_bcn Remove tim_len in mt7615_mcu_set_bcn since it is not actually used and ieee80211_beacon_get_tim checks if tim_length is NULL Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fe559aedef0fc679fd9962afddcb02a375392191 Author: Ryder Lee Date: Mon Jun 3 14:08:44 2019 +0800 mt76: mt7615: fix slow performance when enable encryption Fix wrong WCID assignment and add RKV (RX Key of this entry is valid) flag to check if peer uses the same configuration with previous handshaking. If the configuration is mismatch, WTBL indicates a “cipher mismatch” to stop SEC decryption to prevent the packet from damage. Suggested-by: YF Luo Suggested-by: Yiwei Chung Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/init.c | 16 ++++++++++------ drivers/net/wireless/mediatek/mt76/mt7615/main.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 1 + 3 files changed, 12 insertions(+), 7 deletions(-) commit f4ec7fdf7f83701dd980d6cd60c81f79dab85133 Author: Ryder Lee Date: Mon Jun 3 14:08:43 2019 +0800 mt76: mt7615: enable support for mesh Enable NL80211_IFTYPE_MESH_POINT and update its path. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/init.c | 6 ++++++ drivers/net/wireless/mediatek/mt76/mt7615/main.c | 1 + drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 4 +++- drivers/net/wireless/mediatek/mt76/mt7615/mcu.h | 6 ------ 4 files changed, 10 insertions(+), 7 deletions(-) commit d3edd108e54e95e70ea8fc95d60d95bcebb1267d Author: YueHaibing Date: Wed May 29 22:53:56 2019 +0800 mt76: Remove set but not used variables 'pid' and 'final_mpdu' Fixes gcc '-Wunused-but-set-variable' warnings: drivers/net/wireless/mediatek/mt76/mt7603/mac.c: In function mt7603_fill_txs: drivers/net/wireless/mediatek/mt76/mt7603/mac.c:969:5: warning: variable pid set but not used [-Wunused-but-set-variable] drivers/net/wireless/mediatek/mt76/mt7603/mac.c:961:7: warning: variable final_mpdu set but not used [-Wunused-but-set-variable] drivers/net/wireless/mediatek/mt76/mt7615/mac.c: In function mt7615_fill_txs: drivers/net/wireless/mediatek/mt76/mt7615/mac.c:555:5: warning: variable pid set but not used [-Wunused-but-set-variable] drivers/net/wireless/mediatek/mt76/mt7615/mac.c:552:19: warning: variable final_mpdu set but not used [-Wunused-but-set-variable] They are never used, so can be removed. Signed-off-by: YueHaibing Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7603/mac.c | 4 ---- drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 5 +---- 2 files changed, 1 insertion(+), 8 deletions(-) commit d2679d65fef6abb59f483166b4c9e3111da1d6e3 Author: Lorenzo Bianconi Date: Wed May 29 10:25:55 2019 +0200 mt76: move mt76_get_rate in mt76-module Move mt7603_get_rate in mac80211.c and rename it to mt76_get_rate since it is shared between mt7603 and mt7615 drivers Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mac80211.c | 24 ++++++++++++++++++++ drivers/net/wireless/mediatek/mt76/mt76.h | 3 +++ drivers/net/wireless/mediatek/mt76/mt7603/mac.c | 30 +++---------------------- drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 30 +++---------------------- 4 files changed, 33 insertions(+), 54 deletions(-) commit 892fe32b9c7a411eec68869aba428c19b1f4b9eb Author: Lorenzo Bianconi Date: Sun May 26 16:05:13 2019 +0200 mt76: mt7615: rearrange locking in mt7615_config Since all the routines in mt7615_config grub mt76.mutex moves mutex_lock/mutex_unlock at the beginning/end of mt7615_config Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/main.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 2fccf4f026ef2a97d9e1e487ff1c2c127fed7cdc Author: Lorenzo Bianconi Date: Sun May 26 16:05:12 2019 +0200 mt76: mt7615: init get_txpower mac80211 callback Initialize get_txpower mac80211 callback to mt76_get_txpower in order to report the configured tx power to mac80211 Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/main.c | 1 + 1 file changed, 1 insertion(+) commit 61d368247ec1ae1dee241a5bcf747591104ac67a Author: Lorenzo Bianconi Date: Sun May 26 16:05:11 2019 +0200 mt76: mt7615: add the capability to configure tx power Introduce mt7615_mcu_set_tx_power routine in order to cap tx power according to the value configured by the user Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c | 34 ++++++++++++ drivers/net/wireless/mediatek/mt76/mt7615/eeprom.h | 35 ++++++++++++ drivers/net/wireless/mediatek/mt76/mt7615/main.c | 3 + drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 64 ++++++++++++++++++++++ drivers/net/wireless/mediatek/mt76/mt7615/mcu.h | 1 + drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h | 3 + 6 files changed, 140 insertions(+) commit c19b0ca503a855f41358f98ac533d2a4e867fe34 Author: Lorenzo Bianconi Date: Sun May 26 16:05:10 2019 +0200 mt76: generalize mt76_get_txpower for 4x4:4 devices Genralize mt76_get_txpower routine for 4x4:4 capable devices in order to be reused in mt7615 driver Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mac80211.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit c988a77f1de523ed75a410d96a2e7a969b5e4a01 Author: Lorenzo Bianconi Date: Fri May 17 23:32:56 2019 +0200 mt76: mt7615: select wifi band according to eeprom Select supported band according to the value read from eeprom mtd/otp partition Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c | 24 +++++++++++++++++++--- drivers/net/wireless/mediatek/mt76/mt7615/eeprom.h | 9 ++++++++ 2 files changed, 30 insertions(+), 3 deletions(-) commit f9461a687928df2f749e99739d37da440efcf385 Author: Lorenzo Bianconi Date: Fri May 17 08:26:05 2019 +0200 mt76: mt7615: add support for mtd eeprom parsing Calibration data are often available on a specific mtd partition on embedded devices. Take into account eeprom calibration data if available. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c | 29 +++++++++++++++++----- 1 file changed, 23 insertions(+), 6 deletions(-) commit eadfd98f40255cca136853a3e81bf4dd9fd1d8af Author: Lorenzo Bianconi Date: Tue May 14 14:48:31 2019 +0200 mt76: move mt76_insert_ccmp_hdr in mt76-module Move mt7615_insert_ccmp_hdr in mac80211.c and rename it in mt76_insert_ccmp_hdr since it is shared between mt7603 and mt7615 drivers Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mac80211.c | 23 ++++++++++++++++++++++ drivers/net/wireless/mediatek/mt76/mt76.h | 1 + drivers/net/wireless/mediatek/mt76/mt7603/mac.c | 26 +------------------------ drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 25 +----------------------- 4 files changed, 26 insertions(+), 49 deletions(-) commit 5c280ae76795f0da5cb89e19101cb520374aad7f Author: Felix Fietkau Date: Thu Jun 6 09:22:15 2019 +0200 mt76: mt76x02: fix tx reordering on rate control probing without a-mpdu To avoid aggregating rate control probing packets with other traffic, and to ensure that the probing rate gets used, probing packets get assigned a different internal queueing priority. This causes packets to be transmitted in a different order, which is compensated by the receiver side reordering. However, if A-MPDU is disabled, this reordering can become visible to upper layers on the receiver side. Disable the priority change if A-MPDU is disabled. Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt76x02_txrx.c | 3 ++- drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 8548c6eb23d29078bba41e3477873e4ad340adee Author: Felix Fietkau Date: Wed Jun 5 20:50:52 2019 +0200 mt76: mt76x02: fix tx status reporting issues When the hardware falls back to lower rates for a transmit attempt, only the first status report will show the number of retries correctly. The frames that follow will report the correct final rate, but number of retries set to 0. This can cause the rate control module to vastly underestimate the number of retransmissions per rate. To fix this, we need to keep track of the initial requested tx rate per packet and pass it to the status information. For frames with tx status requested, this is simple: use the rate configured in info->control.rates[0] as reference. For no-skb tx status information, we have to encode the requested tx rate in the packet id (and make it possible to distinguish it from real packet ids). To do that, reduce the packet id field size by one bit, and use that bit to indicate packet id vs rate. This change also improves reporting by filling the status rate array with rates from first rate to final rate, taking the same steps as the hardware fallback table. This matters in corner cases like MCS8 on HT, where the fallback target is MCS0, not MCS7. Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt76.h | 11 ++- drivers/net/wireless/mediatek/mt76/mt76x02_mac.c | 102 +++++++++++++++++---- drivers/net/wireless/mediatek/mt76/mt76x02_txrx.c | 8 +- .../net/wireless/mediatek/mt76/mt76x02_usb_core.c | 8 +- 4 files changed, 109 insertions(+), 20 deletions(-) commit 0995257242ebe8439df09fc7c2ff312ccf183754 Author: Felix Fietkau Date: Fri May 31 22:03:11 2019 +0200 mt76: fix setting chan->max_power When setting chan->max_power after registering the wiphy, chan->max_reg_power needs to be used as a limit Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7603/init.c | 2 +- drivers/net/wireless/mediatek/mt76/mt76x0/init.c | 5 +++-- drivers/net/wireless/mediatek/mt76/mt76x2/init.c | 9 +++++---- 3 files changed, 9 insertions(+), 7 deletions(-) commit 2bda34d7d9102f1ffc030256daad5f14dbc623cd Author: Sam Ravnborg Date: Mon Jun 24 22:06:28 2019 +0900 drm/exynos: drop drmP.h usage Drop use of the deprecated drmP.h file. Replace with forwards / externals as appropriate. While touching the list of include files divide them up in blocks and sort them. v3: - fix build errors in exynos_drm_g2d.c (Inki Dae) The exynos_drm_g2d.c file is not built in the standard configurations and was therefore missed. Signed-off-by: Sam Ravnborg Cc: Inki Dae Cc: Joonyoung Shim Cc: Seung-Woo Kim Cc: Kyungmin Park Cc: David Airlie Cc: Daniel Vetter Cc: Kukjin Kim Cc: Krzysztof Kozlowski Cc: Jingoo Han Fixed merge conflict. Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 7 +++-- drivers/gpu/drm/exynos/exynos7_drm_decon.c | 8 ++++-- drivers/gpu/drm/exynos/exynos_dp.c | 13 ++++----- drivers/gpu/drm/exynos/exynos_drm_crtc.c | 2 +- drivers/gpu/drm/exynos/exynos_drm_dma.c | 6 ++-- drivers/gpu/drm/exynos/exynos_drm_dpi.c | 8 +++--- drivers/gpu/drm/exynos/exynos_drm_drv.c | 12 ++++---- drivers/gpu/drm/exynos/exynos_drm_drv.h | 8 +++++- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 21 +++++++------- drivers/gpu/drm/exynos/exynos_drm_fb.c | 6 ++-- drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 7 +++-- drivers/gpu/drm/exynos/exynos_drm_fimc.c | 15 +++++----- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 14 +++++---- drivers/gpu/drm/exynos/exynos_drm_g2d.c | 11 ++++--- drivers/gpu/drm/exynos/exynos_drm_gem.c | 7 +++-- drivers/gpu/drm/exynos/exynos_drm_gsc.c | 13 +++++---- drivers/gpu/drm/exynos/exynos_drm_ipp.c | 3 +- drivers/gpu/drm/exynos/exynos_drm_mic.c | 22 +++++++------- drivers/gpu/drm/exynos/exynos_drm_plane.c | 4 +-- drivers/gpu/drm/exynos/exynos_drm_rotator.c | 10 +++---- drivers/gpu/drm/exynos/exynos_drm_scaler.c | 12 ++++---- drivers/gpu/drm/exynos/exynos_drm_vidi.c | 9 +++--- drivers/gpu/drm/exynos/exynos_hdmi.c | 41 +++++++++++++-------------- drivers/gpu/drm/exynos/exynos_mixer.c | 31 ++++++++++---------- 24 files changed, 154 insertions(+), 136 deletions(-) commit b0297b6738b20d6e6e4dfa7d5f73d544ffba0f4d Author: Felix Fietkau Date: Fri May 31 22:02:17 2019 +0200 mt76: mt7603: fix reading target tx power from eeprom For the external PA (TSSI OFF) case, the target power needs to be read from a different location in EEPROM Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7603/eeprom.h | 2 ++ drivers/net/wireless/mediatek/mt76/mt7603/init.c | 4 ++++ 2 files changed, 6 insertions(+) commit b51033e06c2ebbad322370f4a35c84488e61b342 Author: Rafael J. Wysocki Date: Tue Jun 25 14:09:12 2019 +0200 PCI: PM/ACPI: Refresh all stale power state data in pci_pm_complete() In pci_pm_complete() there are checks to decide whether or not to resume devices that were left in runtime-suspend during the preceding system-wide transition into a sleep state. They involve checking the current power state of the device and comparing it with the power state of it set before the preceding system-wide transition, but the platform component of the device's power state is not handled correctly in there. Namely, on platforms with ACPI, the device power state information needs to be updated with care, so that the reference counters of power resources used by the device (if any) are set to ensure that the refreshed power state of it will be maintained going forward. To that end, introduce a new ->refresh_state() platform PM callback for PCI devices, for asking the platform to refresh the device power state data and ensure that the corresponding power state will be maintained going forward, make it invoke acpi_device_update_power() (for devices with ACPI PM) on platforms with ACPI and make pci_pm_complete() use it, through a new pci_refresh_power_state() wrapper function. Fixes: a0d2a959d3da (PCI: Avoid unnecessary resume after direct-complete) Signed-off-by: Rafael J. Wysocki Reviewed-by: Mika Westerberg drivers/pci/pci-acpi.c | 9 +++++++++ drivers/pci/pci-driver.c | 9 ++++++++- drivers/pci/pci.c | 21 +++++++++++++++++++++ drivers/pci/pci.h | 4 ++++ 4 files changed, 42 insertions(+), 1 deletion(-) commit 53b22f900c2d282bf6499712930188cc02306e4e Author: Mika Westerberg Date: Tue Jun 25 13:29:42 2019 +0300 PCI / ACPI: Add _PR0 dependent devices If otherwise unrelated PCI devices share ACPI power resources turning them on causes the devices to enter D0uninitialized power state which may cause problems. For example in Intel Ice Lake two root ports (RP0 and RP1), Thunderbolt controller (NHI) and xHCI controller all share power resources as can be ween in the topology below where power resources are marked with []: Host bridge | +- RP0 ---\ +- RP1 ---|--+--> [TBT] +- NHI --/ | | | | v +- xHCI --> [D3C] In a situation where all devices sharing the power resources are in D3cold (the power resources are turned off) and for example the Thunderbolt controller is runtime resumed resulting that the power resources are turned on. This means that the other devices sharing them (RP0, RP1 and xHCI) are transitioned into D0uninitialized state. If they were configured to trigger wake (PME) on a certain event that configuration gets lost after reset so we would need to re-initialize them to get the wakeup working as expected again. To do so we would need to runtime resume all of them to make sure their registers get restored properly before we can runtime suspend them again. Since we just added concept of "_PR0 dependent device" we can solve this by calling the relevant add/remove functions when the PCI device is bind to its ACPI representation. If it has power resources the PCI device will be added as dependent device to them and runtime resumed whenever they are physically turned on. This should make sure PCI core can reconfigure wakes after the device is transitioned into D0uninitialized. Signed-off-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki drivers/pci/pci-acpi.c | 2 ++ 1 file changed, 2 insertions(+) commit 4533771c1e53b921f66e580135ee64a76986a491 Author: Mika Westerberg Date: Tue Jun 25 13:29:41 2019 +0300 ACPI / PM: Introduce concept of a _PR0 dependent device If there are shared power resources between otherwise unrelated devices turning them on causes the other devices sharing them to be powered up as well. In case of PCI devices go into D0uninitialized state meaning that if they were configured to trigger wake that configuration is lost at this point. For this reason introduce a concept of "_PR0 dependent device" that can be added to any ACPI device that has power resources. The dependent device will be included in a list of dependent devices for all power resources returned by the ACPI device's _PR0 (assuming it has one). Whenever a power resource having dependent devices is turned physically on (its _ON method is called) we runtime resume all of them to allow their driver or in case of PCI the PCI core to re-initialize the device and its wake configuration. This adds two functions that can be used to add and remove these dependent devices. Note the dependent device does not necessary need share power resources so this functionality can be used to add "software dependencies" as well if needed. Signed-off-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki drivers/acpi/power.c | 135 ++++++++++++++++++++++++++++++++++++++++++++++++ include/acpi/acpi_bus.h | 4 ++ 2 files changed, 139 insertions(+) commit 83a16e3f6d70da99896c7a2639c0b60fff13afb8 Author: Mika Westerberg Date: Tue Jun 25 13:29:40 2019 +0300 PCI / ACPI: Use cached ACPI device state to get PCI device power state The ACPI power state returned by acpi_device_get_power() may depend on the configuration of ACPI power resources in the system which may change any time after acpi_device_get_power() has returned, unless the reference counters of the ACPI power resources in question are set to prevent that from happening. Thus it is invalid to use acpi_device_get_power() in acpi_pci_get_power_state() the way it is done now and the value of the ->power.state field in the corresponding struct acpi_device objects (which reflects the ACPI power resources reference counting, among other things) should be used instead. As an example where this becomes an issue is Intel Ice Lake where the Thunderbolt controller (NHI), two PCIe root ports (RP0 and RP1) and xHCI all share the same power resources. The following picture with power resources marked with [] shows the topology: Host bridge | +- RP0 ---\ +- RP1 ---|--+--> [TBT] +- NHI --/ | | | | v +- xHCI --> [D3C] Here TBT and D3C are the shared ACPI power resources. ACPI _PR3() method of the devices in question returns either TBT or D3C or both. Say we runtime suspend first the root ports RP0 and RP1, then NHI. Now since the TBT power resource is still on when the root ports are runtime suspended their dev->current_state is set to D3hot. When NHI is runtime suspended TBT is finally turned off but state of the root ports remain to be D3hot. Now when the xHCI is runtime suspended D3C gets also turned off. PCI core thus has power states of these devices cached in their dev->current_state as follows: RP0 -> D3hot RP1 -> D3hot NHI -> D3cold xHCI -> D3cold If the user now runs lspci for instance, the result is all 1's like in the below output (00:07.0 is the first root port, RP0): 00:07.0 PCI bridge: Intel Corporation Device 8a1d (rev ff) (prog-if ff) !!! Unknown header type 7f Kernel driver in use: pcieport In short the hardware state is not in sync with the software state anymore. The exact same thing happens with the PME polling thread which ends up bringing the root ports back into D0 after they are runtime suspended. For this reason, modify acpi_pci_get_power_state() so that it uses the ACPI device power state that was cached by the ACPI core. This makes the PCI device power state match the ACPI device power state regardless of state of the shared power resources which may still be on at this point. Link: https://lore.kernel.org/r/20190618161858.77834-2-mika.westerberg@linux.intel.com Signed-off-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki drivers/pci/pci-acpi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f850a48a07996bfd7bd1b2e52f57b5ee55125482 Author: Rafael J. Wysocki Date: Tue Jun 25 14:06:13 2019 +0200 ACPI: PM: Allow transitions to D0 to occur in special cases If a device with ACPI PM is left in D0 during a system-wide transition to the S3 (suspend-to-RAM) or S4 (hibernation) sleep state, the actual state of the device need not be D0 during resume from it, although its power.state value will still reflect D0 (that is, the power state from before the system-wide transition). In that case, the acpi_device_set_power() call made to ensure that the power state of the device will be D0 going forward has no effect, because the new state (D0) is equal to the one reflected by the device's power.state value. That does not affect power resources, which are taken care of by acpi_resume_power_resources() called from acpi_pm_finish() during resume from system-wide sleep states, but it still may be necessary to invoke _PS0 for the device on top of that in order to finalize its transition to D0. For this reason, modify acpi_device_set_power() to allow transitions to D0 to occur even if D0 is the current power state of the device according to its power.state value. That will not affect power resources, which are assumed to be in the right configuration already (as reflected by the current values of their reference counters), but it may cause _PS0 to be evaluated for the device. However, evaluating _PS0 for a device already in D0 may lead to confusion in general, so invoke _PSC (if present) to check the device's current power state upfront and only evaluate _PS0 for it if _PSC has returned a power state different from D0. [If _PSC is not present or the evaluation of it fails, the power state of the device is assumed to be D0 at this point.] Fixes: 20dacb71ad28 (ACPI / PM: Rework device power management to follow ACPI 6) Signed-off-by: Rafael J. Wysocki Reviewed-by: Mika Westerberg drivers/acpi/device_pm.c | 53 ++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 45 insertions(+), 8 deletions(-) commit 21ba237926227121dacccaf5d7863b0cb50f3eda Author: Rafael J. Wysocki Date: Tue Jun 25 14:04:45 2019 +0200 ACPI: PM: Avoid evaluating _PS3 on transitions from D3hot to D3cold If the power state of a device with ACPI PM is changed from D3hot to D3cold, it merely is a matter of dropping references to additional power resources (specifically, those in the list returned by _PR3), and the _PS3 method should not be invoked for the device then (as it has already been evaluated during the previous transition to D3hot). Fixes: 20dacb71ad28 (ACPI / PM: Rework device power management to follow ACPI 6) Signed-off-by: Rafael J. Wysocki Reviewed-by: Mika Westerberg drivers/acpi/device_pm.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit c9a8af804d4b6743c068975a25ec1d15ac7f9da0 Author: Leonidas P. Papadakos Date: Thu Jun 6 02:57:14 2019 +0300 arm64: dts: rockchip: enable rk3328 watchdog clock Add the missing clock property for the watchdog on rk3328. Signed-off-by: Leonidas P. Papadakos [set wdt node to always enabled, as it is not board-specific] Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3328.dtsi | 1 + 1 file changed, 1 insertion(+) commit df7918d3a36b2468c532b2a62cc7b48064dae7f6 Merge: 3222bcf5f115 dbc08f18ea49 Author: Heiko Stuebner Date: Thu Jun 27 12:17:28 2019 +0200 Merge branch 'v5.3-shared/clk-ids' into v5.3-armsoc/dts64 commit f8c7f7ddd8ef0855d06cff5d1cc7713b556006a7 Author: Matti Vaittinen Date: Mon Jun 3 10:28:20 2019 +0300 power: supply: Initial support for ROHM BD70528 PMIC charger block ROHM BD70528 PMIC includes battery charger block. Support charger staus queries and doing few basic settings like input current limit and charging current. Signed-off-by: Matti Vaittinen Acked-by: Sebastian Reichel Signed-off-by: Lee Jones drivers/power/supply/Kconfig | 9 + drivers/power/supply/Makefile | 1 + drivers/power/supply/bd70528-charger.c | 743 +++++++++++++++++++++++++++++++++ 3 files changed, 753 insertions(+) commit 32a4a4ebf76848828d67f519d07af9eadb6e8300 Author: Matti Vaittinen Date: Mon Jun 3 10:27:14 2019 +0300 rtc: bd70528: Initial support for ROHM bd70528 RTC Support RTC block in ROHM bd70528 power management IC. Support getting and setting the time and date as well as arming an alarm which can also be used to wake the PMIC from standby state. HW supports wake interrupt only for the next 24 hours (sec, minute and hour information only) so we limit also the alarm interrupt to this 24 hours for the sake of consistency. Signed-off-by: Matti Vaittinen Acked-by: Alexandre Belloni Signed-off-by: Lee Jones drivers/rtc/Kconfig | 8 + drivers/rtc/Makefile | 1 + drivers/rtc/rtc-bd70528.c | 500 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 509 insertions(+) commit 18bc64b3aebfa693f34463d2bcad9c82e21af9f6 Author: Matti Vaittinen Date: Mon Jun 3 10:26:45 2019 +0300 gpio: Initial support for ROHM bd70528 GPIO block ROHM BD70528 PMIC has 4 GPIO pins. Allow them to be controlled by GPIO framework. IRQs are handled by regmap-irq and GPIO driver is not aware of the irq usage. Signed-off-by: Matti Vaittinen Reviewed-by: Linus Walleij Signed-off-by: Lee Jones drivers/gpio/Kconfig | 11 +++ drivers/gpio/Makefile | 1 + drivers/gpio/gpio-bd70528.c | 232 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 244 insertions(+) commit 478bb8f32e26c2497c1c594f547ecbfec9c55b98 Author: Matti Vaittinen Date: Mon Jun 3 10:26:12 2019 +0300 dt-bindings: mfd: Document first ROHM BD70528 bindings Document bindings for regulators (3 bucks, 3 LDOs and 2 LED drivers) and 4 GPIO pins which can be configured for I/O or as interrupt sources withe configurable trigger levels. Signed-off-by: Matti Vaittinen Reviewed-by: Rob Herring Acked-by: Linus Walleij Signed-off-by: Lee Jones .../devicetree/bindings/mfd/rohm,bd70528-pmic.txt | 102 +++++++++++++++++++++ 1 file changed, 102 insertions(+) commit 0dae7f585704e4b2c32a738ed62aeecbfbb82c28 Author: Matti Vaittinen Date: Mon Jun 3 10:25:39 2019 +0300 clk: bd718x7: Support ROHM BD70528 clk block ROHM BD70528 is an ultra low power PMIC with similar 32K clk as bd718x7. Only difference (from clk perspective) is register address. Add support for controlling BD70528 clk using bd718x7 driver. Signed-off-by: Matti Vaittinen Acked-by: Stephen Boyd Signed-off-by: Lee Jones drivers/clk/Kconfig | 6 +++--- drivers/clk/clk-bd718x7.c | 20 ++++++++++++++++---- 2 files changed, 19 insertions(+), 7 deletions(-) commit 21b7c58fc1943f3aa8c18a994ab9bed4ae5aa72d Author: Matti Vaittinen Date: Mon Jun 3 10:25:08 2019 +0300 mfd: bd70528: Support ROHM bd70528 PMIC core ROHM BD70528MWV is an ultra-low quiescent current general purpose single-chip power management IC for battery-powered portable devices. Add MFD core which enables chip access for following subdevices: - regulators/LED drivers - battery-charger - gpios - 32.768kHz clk - RTC - watchdog Signed-off-by: Matti Vaittinen Signed-off-by: Lee Jones drivers/mfd/Kconfig | 17 ++ drivers/mfd/Makefile | 2 + drivers/mfd/rohm-bd70528.c | 316 ++++++++++++++++++++++++++++++ include/linux/mfd/rohm-bd70528.h | 408 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 743 insertions(+) commit 519574e3259c8d7e5d78366ef513cfaaf650784f Author: Justin Swartz Date: Thu Jun 13 10:13:04 2019 +0000 ARM: dts: rockchip: add display nodes for rk322x Add display_subsystem, hdmi_phy, vop, and hdmi device nodes plus a few hdmi pinctrl entries to allow for HDMI output. Signed-off-by: Justin Swartz [added assigned-clock settings for hdmiphy output] Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk322x.dtsi | 83 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) commit 65d9c3fb3e136dae28088edfd1cc3b3a0c8b9ef2 Merge: 836e2abff002 dbc08f18ea49 Author: Heiko Stuebner Date: Thu Jun 27 11:57:13 2019 +0200 Merge branch 'v5.3-shared/clk-ids' into v5.3-armsoc/dts32 commit 836e2abff0021b4c20ec31f743d95be2a3d5869f Author: Justin Swartz Date: Fri Jun 14 11:05:12 2019 +0200 ARM: dts: rockchip: fix vop iommu-cells on rk322x iommu-cells obviously needs to start with a "#". Signed-off-by: Justin Swartz Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk322x.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2a6a7aacd4e557a4c7007f8858bcc9654b098fea Author: Matti Vaittinen Date: Mon Jun 3 10:24:32 2019 +0300 mfd: regulator: clk: Split rohm-bd718x7.h Split the bd718x7.h to ROHM common and bd718x7 specific parts so that we do not need to add same things in every new ROHM PMIC header. Please note that this change requires changes also in bd718x7 sub-device drivers for regulators and clk. Signed-off-by: Matti Vaittinen Acked-by: Mark Brown Acked-by: Stephen Boyd Signed-off-by: Lee Jones drivers/clk/clk-bd718x7.c | 6 +++--- drivers/mfd/rohm-bd718x7.c | 23 ++++++++++++----------- drivers/regulator/bd718x7-regulator.c | 25 +++++++++++++------------ include/linux/mfd/rohm-bd718x7.h | 22 ++++++++-------------- include/linux/mfd/rohm-generic.h | 20 ++++++++++++++++++++ 5 files changed, 56 insertions(+), 40 deletions(-) commit b07d7d5c7b421462dc91f0b775e31aae49804050 Author: Sudeep Holla Date: Tue Jun 11 15:56:27 2019 +0100 x86/entry: Simplify _TIF_SYSCALL_EMU handling The usage of emulated and _TIF_SYSCALL_EMU flags in syscall_trace_enter is more complicated than required. Cc: Andy Lutomirski Cc: Ingo Molnar Cc: Borislav Petkov Acked-by: Oleg Nesterov Reviewed-by: Thomas Gleixner Signed-off-by: Sudeep Holla Signed-off-by: Catalin Marinas arch/x86/entry/common.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit 794e94ca83450c436313df18291e139cf5f9121f Author: Heiko Stuebner Date: Fri Jun 14 10:59:48 2019 +0200 clk: rockchip: export HDMIPHY clock on rk3228 Export the hdmiphy clock mux via the newly added clock-id. Signed-off-by: Heiko Stuebner Tested-by: Justin Swartz drivers/clk/rockchip/clk-rk3228.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d59fca075cf829bb972359f48b9b5b2cee863432 Author: Heiko Stuebner Date: Sat Jun 15 14:23:28 2019 +0200 clk: rockchip: add watchdog pclk on rk3328 The watchdog pclk is controlled from the secure GRF but we still want to mention it explicitly to not use arbitary parent clocks in the devicetree wdt node, so add a SGRF_GATE for it. Suggested-by: Leonidas P. Papadakos Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-rk3328.c | 3 +++ 1 file changed, 3 insertions(+) commit 2238246ff8d533a5f2327d1f953375876d8a013c Author: Xiaoyao Li Date: Thu Jun 27 12:55:25 2019 +0800 x86/boot: Make the GDT 8-byte aligned The segment descriptors are loaded with an implicitly LOCK-ed instruction, which could trigger the split lock #AC exception if the variable is not properly aligned and crosses a cache line. Align the GDT properly so the descriptors are all 8 byte aligned. Signed-off-by: Xiaoyao Li Signed-off-by: Thomas Gleixner Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: Fenghua Yu Link: https://lkml.kernel.org/r/20190627045525.105266-1-xiaoyao.li@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/boot/compressed/head_64.S | 1 + 1 file changed, 1 insertion(+) commit 92de4cecf7d1302682b04a0eb01b957830efd5bd Merge: e4488e45e240 dbc08f18ea49 Author: Heiko Stuebner Date: Thu Jun 27 10:46:35 2019 +0200 Merge branch 'v5.3-shared/clk-ids' into v5.3-clk/next commit dbc08f18ea49bd1952fb1158a56d400b77117403 Author: Heiko Stuebner Date: Fri Jun 14 10:58:04 2019 +0200 clk: rockchip: add clock id for hdmi_phy special clock on rk3228 Add the needed clock id to enable clock settings from devicetree. Signed-off-by: Heiko Stuebner Tested-by: Justin Swartz include/dt-bindings/clock/rk3228-cru.h | 1 + 1 file changed, 1 insertion(+) commit 0dc14b013f7982de6e81b5b2931a2131d20cbb6d Author: Heiko Stuebner Date: Sat Jun 15 14:18:17 2019 +0200 clk: rockchip: add clock id for watchdog pclk on rk3328 Needed to export that added clock. Signed-off-by: Heiko Stuebner include/dt-bindings/clock/rk3328-cru.h | 1 + 1 file changed, 1 insertion(+) commit 717261e1769d443515517f101b133b28370ffb7e Author: Oded Gabbay Date: Thu Jun 27 11:10:15 2019 +0300 habanalabs: don't reset device when getting VRHOT VRHOT event from the F/W indicates the device has reached a temperature of 100 Celsius degrees. In this case, the driver should only print this information to the kernel log. The device will shutdown itself automatically when reaching 125 degrees. Signed-off-by: Oded Gabbay drivers/misc/habanalabs/goya/goya.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f62fa0ced46afc541ca617d4ea9524095a4839d7 Author: Arnd Bergmann Date: Mon Jul 8 14:39:32 2019 +0200 habanalabs: use %pad for printing a dma_addr_t dma_addr_t might be different sizes depending on the configuration, so we cannot print it as %llx: drivers/misc/habanalabs/goya/goya.c: In function 'goya_sw_init': drivers/misc/habanalabs/goya/goya.c:698:21: error: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'dma_addr_t' {aka 'unsigned int'} [-Werror=format=] Use the special %pad format string. This requires passing the argument by reference. Fixes: 2a51558c8c7f ("habanalabs: remove DMA mask hack for Goya") Signed-off-by: Arnd Bergmann Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/goya/goya.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 90acc0653d2bee203174e66d519fbaaa513502de Author: Arnd Bergmann Date: Tue Jun 18 14:13:47 2019 +0200 crypto: asymmetric_keys - select CRYPTO_HASH where needed Build testing with some core crypto options disabled revealed a few modules that are missing CRYPTO_HASH: crypto/asymmetric_keys/x509_public_key.o: In function `x509_get_sig_params': x509_public_key.c:(.text+0x4c7): undefined reference to `crypto_alloc_shash' x509_public_key.c:(.text+0x5e5): undefined reference to `crypto_shash_digest' crypto/asymmetric_keys/pkcs7_verify.o: In function `pkcs7_digest.isra.0': pkcs7_verify.c:(.text+0xab): undefined reference to `crypto_alloc_shash' pkcs7_verify.c:(.text+0x1b2): undefined reference to `crypto_shash_digest' pkcs7_verify.c:(.text+0x3c1): undefined reference to `crypto_shash_update' pkcs7_verify.c:(.text+0x411): undefined reference to `crypto_shash_finup' This normally doesn't show up in randconfig tests because there is a large number of other options that select CRYPTO_HASH. Signed-off-by: Arnd Bergmann Signed-off-by: Herbert Xu crypto/asymmetric_keys/Kconfig | 3 +++ 1 file changed, 3 insertions(+) commit 473971187d6727609951858c63bf12b0307ef015 Author: Arnd Bergmann Date: Tue Jun 18 13:19:42 2019 +0200 crypto: serpent - mark __serpent_setkey_sbox noinline The same bug that gcc hit in the past is apparently now showing up with clang, which decides to inline __serpent_setkey_sbox: crypto/serpent_generic.c:268:5: error: stack frame size of 2112 bytes in function '__serpent_setkey' [-Werror,-Wframe-larger-than=] Marking it 'noinline' reduces the stack usage from 2112 bytes to 192 and 96 bytes, respectively, and seems to generate more useful object code. Fixes: c871c10e4ea7 ("crypto: serpent - improve __serpent_setkey with UBSAN") Signed-off-by: Arnd Bergmann Reviewed-by: Eric Biggers Signed-off-by: Herbert Xu crypto/serpent_generic.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 149c4e6ef7788d58b9c05eed9fb85e0f5a2c3456 Author: Arnd Bergmann Date: Tue Jun 18 11:21:53 2019 +0200 crypto: testmgr - dynamically allocate crypto_shash The largest stack object in this file is now the shash descriptor. Since there are many other stack variables, this can push it over the 1024 byte warning limit, in particular with clang and KASAN: crypto/testmgr.c:1693:12: error: stack frame size of 1312 bytes in function '__alg_test_hash' [-Werror,-Wframe-larger-than=] Make test_hash_vs_generic_impl() do the same thing as the corresponding eaed and skcipher functions by allocating the descriptor dynamically. We can still do better than this, but it brings us well below the 1024 byte limit. Suggested-by: Eric Biggers Fixes: 9a8a6b3f0950 ("crypto: testmgr - fuzz hashes against their generic implementation") Signed-off-by: Arnd Bergmann Reviewed-by: Eric Biggers Signed-off-by: Herbert Xu crypto/testmgr.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit 6b5ca646ca9d99611e30f3c8f6b4837b9890eb73 Author: Arnd Bergmann Date: Tue Jun 18 11:21:52 2019 +0200 crypto: testmgr - dynamically allocate testvec_config On arm32, we get warnings about high stack usage in some of the functions: crypto/testmgr.c:2269:12: error: stack frame size of 1032 bytes in function 'alg_test_aead' [-Werror,-Wframe-larger-than=] static int alg_test_aead(const struct alg_test_desc *desc, const char *driver, ^ crypto/testmgr.c:1693:12: error: stack frame size of 1312 bytes in function '__alg_test_hash' [-Werror,-Wframe-larger-than=] static int __alg_test_hash(const struct hash_testvec *vecs, ^ On of the larger objects on the stack here is struct testvec_config, so change that to dynamic allocation. Fixes: 40153b10d91c ("crypto: testmgr - fuzz AEADs against their generic implementation") Fixes: d435e10e67be ("crypto: testmgr - fuzz skciphers against their generic implementation") Fixes: 9a8a6b3f0950 ("crypto: testmgr - fuzz hashes against their generic implementation") Signed-off-by: Arnd Bergmann Reviewed-by: Eric Biggers Signed-off-by: Herbert Xu crypto/testmgr.c | 43 ++++++++++++++++++++++++++++++++----------- 1 file changed, 32 insertions(+), 11 deletions(-) commit c8c74647b2945e3522b77b659917766d7e1c6ed9 Author: Christophe Leroy Date: Mon Jun 17 21:14:45 2019 +0000 crypto: talitos - eliminate unneeded 'done' functions at build time When building for SEC1 only, talitos2_done functions are unneeded and should go away. For this, use has_ftr_sec1() which will always return true when only SEC1 support is being built, allowing GCC to drop TALITOS2 functions. Signed-off-by: Christophe Leroy Reviewed-by: Horia Geantă Signed-off-by: Herbert Xu drivers/crypto/talitos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8d3bcb9900ca5a193088c1f2d20c92865482368b Author: Arnd Bergmann Date: Mon Jun 17 15:25:17 2019 +0200 crypto: sun4i-ss - reduce stack usage After the latest addition, the stack usage of sun4i_ss_cipher_poll grew beyond the warning limit when KASAN is enabled: drivers/crypto/sunxi-ss/sun4i-ss-cipher.c:118:12: error: stack frame size of 1152 bytes in function 'sun4i_ss_cipher_poll' [-Werror,-Wframe-larger-than=] static int sun4i_ss_cipher_poll(struct skcipher_request *areq) Reduce it in three ways: - split out the new code into a separate function so its stack usage can overlap that of the sun4i_ss_opti_poll() code path - mark both special cases as noinline_for_stack, which should ideally result in a tail call that frees the rest of the stack - move the buf and obuf variables into the code blocks in which they are used. The three separate functions now use 144, 640 and 304 bytes of kernel stack, respectively. Fixes: 0ae1f46c55f8 ("crypto: sun4i-ss - fallback when length is not multiple of blocksize") Signed-off-by: Arnd Bergmann Tested-by: Corentin LABBE Signed-off-by: Herbert Xu drivers/crypto/sunxi-ss/sun4i-ss-cipher.c | 47 ++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 17 deletions(-) commit 303f99ac9470a92c06fec1dfb5f263fbc26eb8f4 Author: Gilad Ben-Yossef Date: Mon Jun 17 11:46:30 2019 +0300 crypto: ccree - add HW engine config check Add check to verify the stated device tree HW configuration matches the HW. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Herbert Xu drivers/crypto/ccree/cc_driver.c | 18 ++++++++++++++++++ drivers/crypto/ccree/cc_driver.h | 3 +++ drivers/crypto/ccree/cc_host_regs.h | 17 +++++++++++++++++ 3 files changed, 38 insertions(+) commit 3db617e77ae2f8051fd6f5d3fff0e15f086d5b4c Author: Ofir Drang Date: Mon Jun 17 11:46:29 2019 +0300 crypto: ccree - prevent isr handling in case driver is suspended ccree irq may be shared with other devices, in order to prevent ccree isr handling while device maybe suspended we added a check to verify that the device is not suspended. Signed-off-by: Ofir Drang Signed-off-by: Herbert Xu drivers/crypto/ccree/cc_driver.c | 3 +++ drivers/crypto/ccree/cc_pm.c | 6 ++++++ drivers/crypto/ccree/cc_pm.h | 7 +++++++ 3 files changed, 16 insertions(+) commit d84f6269ce24eb4c468e246b24fc0fdce34ab6f6 Author: Ofir Drang Date: Mon Jun 17 11:46:28 2019 +0300 crypto: ccree - check that cryptocell reset completed In case of driver probe and pm resume we need to check that the cryptocell hardware reset cycle is completed. during the reset cycle that Cryptocell provide read only access to the APB interface which allows to verify through the CC registers that the reset is completed. Until reset completion we assume that any write/crypto operation is blocked. Signed-off-by: Ofir Drang Signed-off-by: Herbert Xu drivers/crypto/ccree/cc_driver.c | 33 ++++++++++++++++++++++++++++++++- drivers/crypto/ccree/cc_driver.h | 3 +++ drivers/crypto/ccree/cc_host_regs.h | 3 +++ drivers/crypto/ccree/cc_pm.c | 5 +++++ 4 files changed, 43 insertions(+), 1 deletion(-) commit 0b970d54772f08f56326b89db74cba2ca3c7c278 Author: ofir.drang@arm.com Date: Mon Jun 17 11:46:27 2019 +0300 crypto: ccree - Relocate driver irq registration after clk init Signed-off-by: Ofir Drang Signed-off-by: Herbert Xu drivers/crypto/ccree/cc_driver.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 73fbfc499448455f1e1c77717040e09e25f1d976 Author: Matthias Kaehlcke Date: Wed Jun 12 11:00:03 2019 -0700 backlight: pwm_bl: Fix heuristic to determine number of brightness levels With commit 88ba95bedb79 ("backlight: pwm_bl: Compute brightness of LED linearly to human eye") the number of set bits (aka hweight()) in the PWM period is used in the heuristic to determine the number of brightness levels, when the brightness table isn't specified in the DT. The number of set bits doesn't provide a reliable clue about the length of the period, instead change the heuristic to: nlevels = period / fls(period) Also limit the maximum number of brightness levels to 4096 to avoid excessively large tables. With this the number of levels increases monotonically with the PWM period, until the maximum of 4096 levels is reached: period (ns) # levels 100 16 500 62 1000 111 5000 416 10000 769 50000 3333 100000 4096 Fixes: 88ba95bedb79 ("backlight: pwm_bl: Compute brightness of LED linearly to human eye") Signed-off-by: Matthias Kaehlcke Acked-by: Daniel Thompson Tested-by: Enric Balletbo i Serra Signed-off-by: Lee Jones drivers/video/backlight/pwm_bl.c | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) commit 98b7404eb7d64e55f8fdd419cb3965a8abf0e217 Author: Andy Shevchenko Date: Wed Jun 19 18:21:27 2019 +0300 backlight: gpio_backlight: Enable ACPI enumeration ACPI allows to enumerate specific devices by using compatible strings. Enable that enumeration for GPIO based backlight devices. Signed-off-by: Andy Shevchenko Acked-by: Daniel Thompson Signed-off-by: Lee Jones drivers/video/backlight/gpio_backlight.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) commit 5076fbed57f7f58c839e7ea5a2495c1d083417ae Author: Andy Shevchenko Date: Wed Jun 19 16:59:27 2019 +0300 backlight: pwm_bl: Convert to use SPDX identifier Reduce size of duplicated comments by switching to use SPDX identifier. No functional change. While here, correct MODULE_LICENSE() string to be aligned with license text. Signed-off-by: Andy Shevchenko Acked-by: Daniel Thompson Signed-off-by: Lee Jones drivers/video/backlight/pwm_bl.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 893ca250edfcd0489a49446048aa0d900d6862fc Merge: baf23eddbf2a 3e99b3b13a1f Author: Martin K. Petersen Date: Thu Jun 27 00:19:33 2019 -0400 Merge branch '5.3/scsi-sg' into scsi-next commit baf23eddbf2a4ba9bf2bdb342686c71a8042e39b Author: Quinn Tran Date: Sun Jun 16 08:05:53 2019 -0700 scsi: qla2xxx: move IO flush to the front of NVME rport unregistration On session deletion, current qla code would unregister an NVMe session before flushing IOs. This patch would move the unregistration of NVMe session after IO flush. This way FC-NVMe layer would not have to wait for stuck IOs. In addition, qla2xxx would stop accepting new IOs during session deletion. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_def.h | 1 - drivers/scsi/qla2xxx/qla_gbl.h | 2 ++ drivers/scsi/qla2xxx/qla_nvme.c | 14 ++------------ drivers/scsi/qla2xxx/qla_target.c | 16 ++++++++-------- 4 files changed, 12 insertions(+), 21 deletions(-) commit 4c2a2d0178d5d8006a6bc50c8dc0ed122e4e946e Author: Quinn Tran Date: Fri Jun 21 09:50:24 2019 -0700 scsi: qla2xxx: Fix NVME cmd and LS cmd timeout race condition This patch uses kref to protect access between fcp_abort path and nvme command and LS command completion path. Stack trace below shows the abort path is accessing stale memory (nvme_private->sp). When command kref reaches 0, nvme_private & srb resource will be disconnected from each other. Any subsequence nvme abort request will not be able to reference the original srb. [ 5631.003998] BUG: unable to handle kernel paging request at 00000010000005d8 [ 5631.004016] IP: [] qla_nvme_abort_work+0x22/0x100 [qla2xxx] [ 5631.004086] Workqueue: events qla_nvme_abort_work [qla2xxx] [ 5631.004097] RIP: 0010:[] [] qla_nvme_abort_work+0x22/0x100 [qla2xxx] [ 5631.004109] Call Trace: [ 5631.004115] [] ? pwq_dec_nr_in_flight+0x64/0xb0 [ 5631.004117] [] process_one_work+0x17f/0x440 [ 5631.004120] [] worker_thread+0x126/0x3c0 Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_def.h | 3 + drivers/scsi/qla2xxx/qla_nvme.c | 163 ++++++++++++++++++++++++++++------------ drivers/scsi/qla2xxx/qla_nvme.h | 1 + 3 files changed, 117 insertions(+), 50 deletions(-) commit 2eb9238affa72a5260b14388cf56598f7413109b Author: Quinn Tran Date: Fri Jun 21 09:50:23 2019 -0700 scsi: qla2xxx: on session delete, return nvme cmd - on session delete or chip reset, reject all NVME commands. - on NVME command submission error, free srb resource. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_nvme.c | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) commit 6a81533d616fe581b0d421ee6db3319eeac9486d Author: Arun Easi Date: Fri Jun 21 09:50:22 2019 -0700 scsi: qla2xxx: Fix kernel crash after disconnecting NVMe devices BUG: unable to handle kernel NULL pointer dereference at (null) IP: [] qla_nvme_unregister_remote_port+0x6c/0xf0 [qla2xxx] PGD 800000084cf41067 PUD 84d288067 PMD 0 Oops: 0000 [#1] SMP Call Trace: [] process_one_work+0x17f/0x440 [] worker_thread+0x126/0x3c0 [] ? manage_workers.isra.26+0x2a0/0x2a0 [] kthread+0xd1/0xe0 [] ? insert_kthread_work+0x40/0x40 [] ret_from_fork_nospec_begin+0x21/0x21 [] ? insert_kthread_work+0x40/0x40 RIP [] qla_nvme_unregister_remote_port+0x6c/0xf0 [qla2xxx] The crash is due to a bad entry in the nvme_rport_list. This list is not protected, and when a remoteport_delete callback is called, driver traverses the list and crashes. Actually, the list could be removed and driver could traverse the main fcport list instead. Fix does exactly that. Signed-off-by: Arun Easi Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_def.h | 1 - drivers/scsi/qla2xxx/qla_nvme.c | 37 ++++++++++--------------------------- drivers/scsi/qla2xxx/qla_nvme.h | 1 - drivers/scsi/qla2xxx/qla_os.c | 1 - 4 files changed, 10 insertions(+), 30 deletions(-) commit f5258d6e01f3c707d9ba70b2a14a158a6fadef11 Author: Chandrakanth Patil Date: Tue Jun 25 16:34:36 2019 +0530 scsi: megaraid_sas: Update driver version to 07.710.06.00-rc1 Signed-off-by: Chandrakanth Patil Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 299ee42615e3f5f10dc8604b995368bd05c6a687 Author: Chandrakanth Patil Date: Tue Jun 25 16:34:35 2019 +0530 scsi: megaraid_sas: Introduce various Aero performance modes For Aero adapters, driver provides three different performance modes controlled through module parameter named 'perf_mode'. Below are those performance modes: 0: Balanced - Additional high IOPS reply queues will be enabled along with low latency queues. Interrupt coalescing will be enabled only for these high IOPS reply queues. 1: IOPS - No additional high IOPS queues are enabled. Interrupt coalescing will be enabled on all reply queues. 2: Latency - No additional high IOPS queues are enabled. Interrupt coalescing will be disabled on all reply queues. This is a legacy behavior similar to Ventura & Invader Series. Default performance mode settings: - Performance mode set to 'Balanced', if Aero controller is working in 16GT/s PCIe speed. - Performance mode will be set to 'Latency' mode for all other cases. Through module parameter 'perf_mode', user can override default performance mode to desired one. Captured some performance numbers with these performance modes. 4k Random Read IO performance numbers on 24 SAS SSD drives for above three performance modes. Performance data is from Intel Skylake and HGST SS300 (drive model SDLL1DLR400GCCA1). IOPS: ----------------------------------------------------------------------- |perf_mode | qd = 1 | qd = 64 | note | |-------------|--------|---------|------------------------------------- |balanced | 259K | 3061k | Provides max performance numbers | | | | | both on lower QD workload & | | | | | also on higher QD workload | |-------------|--------|---------|------------------------------------- |iops | 220K | 3100k | Provides max performance numbers | | | | | only on higher QD workload. | |-------------|--------|---------|------------------------------------- |latency | 246k | 2226k | Provides good performance numbers | | | | | only on lower QD worklaod. | ----------------------------------------------------------------------- Average Latency: ----------------------------------------------------- |perf_mode | qd = 1 | qd = 64 | |-------------|--------------|----------------------| |balanced | 92.05 usec | 501.12 usec | |-------------|--------------|----------------------| |iops | 108.40 usec | 498.10 usec | |-------------|--------------|----------------------| |latency | 97.10 usec | 689.26 usec | ----------------------------------------------------- Signed-off-by: Sumit Saxena Signed-off-by: Chandrakanth Patil Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas.h | 14 ++++++- drivers/scsi/megaraid/megaraid_sas_base.c | 60 +++++++++++++++++++++++++---- drivers/scsi/megaraid/megaraid_sas_fusion.c | 22 +++++++---- 3 files changed, 81 insertions(+), 15 deletions(-) commit f39e5e52c5b5407173d87b03a6385fbe6ccf1026 Author: Chandrakanth Patil Date: Tue Jun 25 16:34:34 2019 +0530 scsi: megaraid_sas: Use high IOPS queues based on IO workload The driver will use round-robin method for IO submission in batches within the high IOPS queues when the number of in-flight ios on the target device is larger than 8. Otherwise the driver will use low latency reply queues. Signed-off-by: Kashyap Desai Signed-off-by: Chandrakanth Patil Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas.h | 3 +++ drivers/scsi/megaraid/megaraid_sas_fp.c | 1 + drivers/scsi/megaraid/megaraid_sas_fusion.c | 16 ++++++++++++++-- drivers/scsi/megaraid/megaraid_sas_fusion.h | 1 + 4 files changed, 19 insertions(+), 2 deletions(-) commit f0b9e7bdc309e8cc63a640009715626376e047c6 Author: Chandrakanth Patil Date: Tue Jun 25 16:34:33 2019 +0530 scsi: megaraid_sas: Set affinity for high IOPS reply queues High iops queues are mapped to non-managed IRQs. Set affinity of non-managed irqs to local numa node. Low latency queues are mapped to managed IRQs. Driver reserves some reply queues for high IOPS queues (through pci_alloc_irq_vectors_affinity and .pre_vectors interface). The rest of queues are for low latency. Based on IO workload, driver will decide which group of reply queues (either high IOPS queues or low latency queues) to be used. High IOPS queues will be mapped to local numa node of controller and low latency queues will be mapped to CPUs across numa nodes. In general, high IOPS and low latency queues should fit into 128 reply queues which is the max number of reply queues supported by Aero adapters. Signed-off-by: Kashyap Desai Signed-off-by: Chandrakanth Patil Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit ea836f40f8fdb47c7dda2e4aaaa28ae676c3fa41 Author: Chandrakanth Patil Date: Tue Jun 25 16:34:32 2019 +0530 scsi: megaraid_sas: Enable coalescing for high IOPS queues Driver should enable interrupt coalescing (during driver load and after Controller Reset) for High IOPS queues by masking appropriate bits in IOC INIT frame. Signed-off-by: Kashyap Desai Signed-off-by: Chandrakanth Patil Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas.h | 2 +- drivers/scsi/megaraid/megaraid_sas_fusion.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) commit 132147d7f620eed4a7bee815eba03561258fc21e Author: Chandrakanth Patil Date: Tue Jun 25 16:34:31 2019 +0530 scsi: megaraid_sas: Add support for High IOPS queues Aero controllers support balanced performance mode through the ability to configure queues with different properties. Reply queues with interrupt coalescing enabled are called "high iops reply queues" and reply queues with interrupt coalescing disabled are called "low latency reply queues". The driver configures a combination of high iops and low latency reply queues if: - HBA is an AERO controller; - MSI-X vectors supported by the HBA is 128; - Total CPU count in the system more than high iops queue count; - Driver is loaded with default max_msix_vectors module parameter; and - System booted in non-kdump mode. Signed-off-by: Kashyap Desai Signed-off-by: Chandrakanth Patil Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas.h | 6 ++ drivers/scsi/megaraid/megaraid_sas_base.c | 135 ++++++++++++++++++++++++---- drivers/scsi/megaraid/megaraid_sas_fusion.c | 11 +++ 3 files changed, 135 insertions(+), 17 deletions(-) commit 58136856167d10adc2a190aff88d13b33eafb9e2 Author: Chandrakanth Patil Date: Tue Jun 25 16:34:30 2019 +0530 scsi: megaraid_sas: Add support for MPI toolbox commands Added driver support to allow passthrough MPI toolbox type MFI commands to firmware based on firmware capability. Signed-off-by: Sumit Saxena Signed-off-by: Chandrakanth Patil Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas.h | 36 ++++++++++++++++++++++++++++- drivers/scsi/megaraid/megaraid_sas_base.c | 31 ++++++++++++++++++++++++- drivers/scsi/megaraid/megaraid_sas_fusion.c | 7 ++++++ 3 files changed, 72 insertions(+), 2 deletions(-) commit 7fc557005c454fa053153ac0bf7c7c96f58dab4f Author: Chandrakanth Patil Date: Tue Jun 25 16:34:29 2019 +0530 scsi: megaraid_sas: Offload Aero RAID5/6 division calculations to driver For RAID5/RAID6 volumes configured behind Aero, driver will be doing 64bit division operations on behalf of firmware as controller's ARM CPU is very slow in this division. Later, driver calculates Q-ARM, P-ARM and Log-ARM and passes those values to firmware by writing these values to RAID_CONTEXT. Signed-off-by: Sumit Saxena Signed-off-by: Chandrakanth Patil Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 10 +++- drivers/scsi/megaraid/megaraid_sas_fp.c | 78 +++++++++++++++++++++++++++++ drivers/scsi/megaraid/megaraid_sas_fusion.c | 6 +-- drivers/scsi/megaraid/megaraid_sas_fusion.h | 24 ++++++--- 4 files changed, 108 insertions(+), 10 deletions(-) commit 49f2bf1071f06a430920888ff2d1a89395a3b6b5 Author: Chandrakanth Patil Date: Tue Jun 25 16:34:28 2019 +0530 scsi: megaraid_sas: RAID1 PCI bandwidth limit algorithm is applicable for only Ventura RAID1 PCI bandwidth limit algorithm is not applicable to Aero as it's PCIe Gen4 adapter. Signed-off-by: Sumit Saxena Signed-off-by: Chandrakanth Patil Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 3 +++ drivers/scsi/megaraid/megaraid_sas_fusion.c | 24 +++++++++++++----------- drivers/scsi/megaraid/megaraid_sas_fusion.h | 2 +- 3 files changed, 17 insertions(+), 12 deletions(-) commit a4413a5859f8a36e9217e808d172e9458ece4ff0 Author: Chandrakanth Patil Date: Tue Jun 25 16:34:27 2019 +0530 scsi: megaraid_sas: megaraid_sas: Add check for count returned by HOST_DEVICE_LIST DCMD Signed-off-by: Shivasharan S Signed-off-by: Chandrakanth Patil Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 3 +++ 1 file changed, 3 insertions(+) commit 59db5a931bbe73f4d03dadb7365d0da2d425e769 Author: Chandrakanth Patil Date: Tue Jun 25 16:34:26 2019 +0530 scsi: megaraid_sas: Handle sequence JBOD map failure at driver level Issue: This issue is applicable to scenario when JBOD sequence map is unavailable (memory allocation for JBOD sequence map failed) to driver but feature is supported by firmware. If the driver sends a JBOD IO by not adding 255 (MAX_PHYSICAL_DEVICES - 1) to device ID when underlying firmware supports JBOD sequence map, it will lead to the IO failure. Fix: For JBOD IOs, driver will not use the RAID map to fetch the devhandle if JBOD sequence map is unavailable. Driver will set Devhandle to 0xffff and Target ID to 'device ID + 255 (MAX_PHYSICAL_DEVICES - 1)'. Signed-off-by: Sumit Saxena Signed-off-by: Chandrakanth Patil Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas.h | 2 + drivers/scsi/megaraid/megaraid_sas_base.c | 14 ++++-- drivers/scsi/megaraid/megaraid_sas_fusion.c | 77 ++++++++++++++++------------- 3 files changed, 55 insertions(+), 38 deletions(-) commit 798d44b04f48237b3415c1066fd8f4d8b8fbb53b Author: Chandrakanth Patil Date: Tue Jun 25 16:34:25 2019 +0530 scsi: megaraid_sas: Don't send FPIO to RL Bypass queue Firmware does not expect FastPath IO sent through Region Lock Bypass queue. Though firmware never exposes such settings when fastpath IO can be sent to RL bypass queue but it's safer to remove dead code which directs fastpath IO to RL Bypass queue. Signed-off-by: Sumit Saxena Signed-off-by: Chandrakanth Patil Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_fusion.c | 4 ---- 1 file changed, 4 deletions(-) commit ccf6c1f2e2d737e23124691b9a8eeb1b3fc74458 Author: Chandrakanth Patil Date: Tue Jun 25 16:34:24 2019 +0530 scsi: megaraid_sas: In probe context, retry IOC INIT once if firmware is in fault Issue: Under certain conditions, controller goes in FAULT state after IOC INIT fired to firmware. Such Fault can be recovered through controller reset. Fix: In driver probe context, if firmware fault is observed post IOC INIT, driver would do controller reset followed by retry logic for IOC INIT command. Signed-off-by: Shivasharan S Signed-off-by: Chandrakanth Patil Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_fusion.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) commit 7fa3174b3ef4e517ebb8a08078871ceab705a969 Author: Chandrakanth Patil Date: Tue Jun 25 16:34:23 2019 +0530 scsi: megaraid_sas: Release Mutex lock before OCR in case of DCMD timeout Issue: There is possibility of few DCMDs timing out with 'reset_mutex' lock held. As part of DCMD timeout handling, driver calls function megasas_reset_fusion which also tries to acquire same lock 'reset_mutex' and end up with deadlock. Fix: Upon timeout of DCMDs (which are fired with 'reset_mutex' lock held), driver will release 'reset_mutex' before calling OCR function and will acquire lock again after OCR function returns. Signed-off-by: Sumit Saxena Signed-off-by: Chandrakanth Patil Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit a6ffd5bf681905729a4926cb3006d0329dd5d857 Author: Chandrakanth Patil Date: Tue Jun 25 16:34:22 2019 +0530 scsi: megaraid_sas: Call disable_irq from process IRQ poll On PowerPC architecture, calling disable_irq_nosync from IRQ context is not providing the required effect. In current megaraid_sas driver, disable_irq_nosync is being called from IRQ context before enabling IRQ poll. But due to the issue seen on PPC, after IRQ poll disable and legacy ISR is enabled, we are not seeing our ISR getting called. Fix: Call disable_irq from IRQ poll thread context instead of IRQ context. Signed-off-by: Shivasharan S Signed-off-by: Chandrakanth Patil Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas.h | 1 + drivers/scsi/megaraid/megaraid_sas_fusion.c | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) commit 2181aacf46f35cfa1c2ad24f15a4eb1be860e324 Author: Chandrakanth Patil Date: Tue Jun 25 16:34:21 2019 +0530 scsi: megaraid_sas: Remove few debug counters from IO path Signed-off-by: Kashyap Desai Signed-off-by: Chandrakanth Patil Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas.h | 5 ----- drivers/scsi/megaraid/megaraid_sas_fusion.c | 5 ----- 2 files changed, 10 deletions(-) commit dd80769923ded673db82df5a557b4cce9c5358e7 Author: Chandrakanth Patil Date: Tue Jun 25 16:34:20 2019 +0530 scsi: megaraid_sas: Add support for Non-secure Aero PCI IDs This patch will add support for non-secure Aero adapter PCI IDs. Driver will throw an error message when a non-secure type controller is detected. Purpose of this interface is to avoid interacting with any firmware which is not secured/signed by Broadcom. Any tampering on Firmware component will be detected by hardware and it will be communicated to the driver to avoid any further interaction with that component. Signed-off-by: Sumit Saxena Signed-off-by: Chandrakanth Patil Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas.h | 4 ++++ drivers/scsi/megaraid/megaraid_sas_base.c | 25 +++++++++++++++++++++++++ 2 files changed, 29 insertions(+) commit 5885571df750d0ed3f8996e161cdcc56f4a94bfe Author: Chandrakanth Patil Date: Tue Jun 25 16:34:19 2019 +0530 scsi: megaraid_sas: Add 32 bit atomic descriptor support to AERO adapters Aero adapters provides Atomic Request Descriptor as an alternative method for posting an entry onto a request queue. The posting of an Atomic Request Descriptor is an atomic operation, providing a safe mechanism for multiple processors on the host to post requests without synchronization. This Atomic Request Descriptor format is identical to first 32 bits of Default Request Descriptor and uses only 32 bits. If Aero adapters support Atomic descriptor, driver should use it for posting IOs and DCMDs to firmware. Signed-off-by: Sumit Saxena Signed-off-by: Chandrakanth Patil Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas.h | 3 ++ drivers/scsi/megaraid/megaraid_sas_fusion.c | 45 +++++++++++++++++++++++------ 2 files changed, 39 insertions(+), 9 deletions(-) commit 5f0bd875c6dbc6245b4012b13bf6b81cc629cb4c Author: Deepak Ukey Date: Mon Jun 24 13:52:28 2019 +0530 scsi: pm80xx: Modified the logic to collect IOP event logs Added the logic for collecting IOP log respective to event log size. Signed-off-by: Deepak Ukey Signed-off-by: Viswas G Reviewed-by: Jack Wang Signed-off-by: Martin K. Petersen drivers/scsi/pm8001/pm8001_ctl.c | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) commit 2040a857e436e5e942d3d2d893891d088dba87f1 Author: Deepak Ukey Date: Mon Jun 24 13:52:27 2019 +0530 scsi: pm80xx: Event log size through sysfs Added support to read event log size from MPI configuration table and export through sysfs. Signed-off-by: Deepak Ukey Signed-off-by: Viswas G Reviewed-by: Jack Wang Signed-off-by: Martin K. Petersen drivers/scsi/pm8001/pm8001_ctl.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit eedc42a074de55a0164e722d5ca2ec4bd397b8bc Author: Sreekanth Reddy Date: Mon Jun 24 10:42:56 2019 -0400 scsi: mpt3sas: Fix msix load balance on and off settings Enable msix load balance only when combined reply queue mode is disabled on the SAS3 and above generation HBA devices. Earlier msix load balance used to enable if the number of online cpus is greater than the number of MSI-X vectors enabled on the HBA. Combined reply queue mode will be disabled only on those HBA which works in shared resources mode. I.e. on SAS3 HBAs it will be <= 8 and on SAS35 HBA devices it will be <= 16. - Before this patch if system has 256 logical CPUs and HBA exposes 128 MSI-X vectors, driver will enable msix load balance. - After this patch if system has 256 logical CPUs and HBA exposes 128 MSI-X vectors, driver will disable msix load balance. - After this patch if system has 256 logical CPUs and HBA exposes 16 MSI-X vectors (due to combined reply queue mode being off in HW), driver will enable msix load balance. Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) commit 610ef1e955cd262a5f72d8401a36c9cfca6072fe Author: Sreekanth Reddy Date: Mon Jun 24 10:42:55 2019 -0400 scsi: mpt3sas: Determine smp affinity on per HBA basis Even though 'smp_affinity_enable' module parameter is enabled, if the number of online CPUs is bigger than the number of msix vectors enabled on that HBA, then smp affinity settings should be disabled only for this HBA. But currently the smp affinity setting is disabled globally and hence smp affinity will be disabled for subsequent HBAs even though number of msix vectors enabled for this HBA matches the number of online CPU. To fix this, define a per HBA variable smp_affinity_enable. Initially this variable is initialized with smp_affinity_enable module parameter value. If this HBA has less number of msix vectors configured when compared to number of online cpus, then only this HBA's variable smp_affinity_enable is set to zero. Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.c | 10 ++++++---- drivers/scsi/mpt3sas/mpt3sas_base.h | 1 + 2 files changed, 7 insertions(+), 4 deletions(-) commit 48d6f0a6a5595abb38d899dbf8ca09f7dc858d2b Author: Sreekanth Reddy Date: Mon Jun 24 10:42:54 2019 -0400 scsi: mpt3sas: Use configured PCIe link speed, not max When enabling high iops queues, the driver should use the HBA's configured PCIe link speed instead of looking for the maximum link speed. I.e. enable high iops queues only if Aero/Sea HBA's configured PCIe link speed is set to 16GT/s. Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit 381abbd1f7f978471722784895d1ff184ef86929 Author: Sreekanth Reddy Date: Mon Jun 24 10:42:53 2019 -0400 scsi: mpt3sas: Remove CPU arch check to determine perf_mode Currently default perf_mode is set to 'balanced' on Intel architecture machines and on other machines default perf_mode is set to 'latency' mode. This CPU architecture check is removed and the default perf_mode mode is set to 'balanced' mode on all machines. User can choose the required performance mode using perf_mode module parameter. Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) commit 4e1c94b047715e12942536d8457e9aa692e8b5fc Author: Arthur Simchaev Date: Tue Jun 25 15:36:00 2019 +0300 scsi: ufs: Documentation: Announce ufs-tool v1.0 The ufs-tool stable release v1.0 is available at: https://github.com/westerndigitalcorporation/ufs-tool Feedback and bug reports, as always, are welcomed. Signed-off-by: Arthur Simchaev Signed-off-by: Martin K. Petersen Documentation/scsi/ufs.txt | 7 +++++++ 1 file changed, 7 insertions(+) commit 7bfe5ae57c803dd529aaf6feb32c3b49ebff66bd Author: Lin Yi Date: Tue Jun 25 10:35:29 2019 +0800 scsi: bnx2fc: fix bnx2fc_cmd refcount imbalance in send_srr If cb_arg alloc failed, we can't release the struct orig_io_req refcount before we take its refcount. As Saurav said, move the srr_err label down to avoid unnecessary refcount release and nullptr free. Signed-off-by: Lin Yi Acked-by: Saurav Kashyap Signed-off-by: Martin K. Petersen drivers/scsi/bnx2fc/bnx2fc_els.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 177709c0702e7351dae3b9b4f9de3140a9ee3a06 Author: Lin Yi Date: Tue Jun 25 10:34:16 2019 +0800 scsi: bnx2fc: fix bnx2fc_cmd refcount imbalance in send_rec If cb_arg alloc failed, we can't release the struct orig_io_req refcount before we take its refcount. As Saurav said, move the rec_err label down to avoid unnecessary refcount release and nullptr free. Signed-off-by: Lin Yi Acked-by: Saurav Kashyap Signed-off-by: Martin K. Petersen drivers/scsi/bnx2fc/bnx2fc_els.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 10b3ef2270189fee35ca21b70463481353f1e160 Author: Saurav Kashyap Date: Mon Jun 24 01:30:00 2019 -0700 scsi: bnx2fc: Update the driver version to 2.12.10 Update the driver version to 2.12.10. Signed-off-by: Saurav Kashyap Signed-off-by: Martin K. Petersen drivers/scsi/bnx2fc/bnx2fc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3c97b569505f0d467a7fd544b05f1e122c08db67 Author: Saurav Kashyap Date: Mon Jun 24 01:29:59 2019 -0700 scsi: bnx2fc: Limit the IO size according to the FW capability - Reduce the sg_tablesize to 255. - Reduce the MAX BDs firmware can handle to 255. - Return IO to ML if BD goes more then 255 after split. - Correct the size of each BD split to 0xffff. Signed-off-by: Saurav Kashyap Signed-off-by: Martin K. Petersen drivers/scsi/bnx2fc/bnx2fc.h | 5 +++-- drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 3 ++- drivers/scsi/bnx2fc/bnx2fc_io.c | 11 +++++++++++ 3 files changed, 16 insertions(+), 3 deletions(-) commit 25ad7394c7783a5bc73f7a930bda3a7a7f3195cb Author: Saurav Kashyap Date: Mon Jun 24 01:29:58 2019 -0700 scsi: bnx2fc: Do not allow both a cleanup completion and abort completion for the same request If firmware sends either cleanup or abort completion, it means other won't be sent. Clean out flags for other as well. Signed-off-by: Saurav Kashyap Signed-off-by: Martin K. Petersen drivers/scsi/bnx2fc/bnx2fc.h | 1 + drivers/scsi/bnx2fc/bnx2fc_io.c | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) commit 0e0fcef97201712894959568c24c08fd7542a2ec Author: Saurav Kashyap Date: Mon Jun 24 01:29:57 2019 -0700 scsi: bnx2fc: Separate out completion flags and variables for abort and cleanup Separate out abort and cleanup flag and completion, to have better understaning of what is getting processed. Signed-off-by: Saurav Kashyap Signed-off-by: Martin K. Petersen drivers/scsi/bnx2fc/bnx2fc.h | 6 ++-- drivers/scsi/bnx2fc/bnx2fc_io.c | 59 ++++++++++++++++++++++------------------ drivers/scsi/bnx2fc/bnx2fc_tgt.c | 10 +++---- 3 files changed, 41 insertions(+), 34 deletions(-) commit a92ac6ee7980f3c139910d0d0a079802363818cb Author: Chad Dupuis Date: Mon Jun 24 01:29:56 2019 -0700 scsi: bnx2fc: Only put reference to io_req in bnx2fc_abts_cleanup if cleanup times out In certain tests where the SCSI error handler issues an abort that is already outstanding, we will cleanup the command so that the SCSI error handler can proceed. In some of these cases we were seeing a command mismatch: kernel: scsi host2: bnx2fc: xid:0x42b eh_abort - refcnt = 2 kernel: bnx2fc: eh_abort: io_req (xid = 0x42b) already in abts processing kernel: scsi host2: bnx2fc: xid:0x42b Entered bnx2fc_initiate_cleanup kernel: scsi host2: bnx2fc: xid:0x42b CLEANUP io_req xid = 0x80b kernel: scsi host2: bnx2fc: xid:0x80b cq_compl- cleanup resp rcvd kernel: scsi host2: bnx2fc: xid:0x42b complete - rx_state = 9 kernel: scsi host2: bnx2fc: xid:0x42b Entered process_cleanup_compl refcnt = 2, cmd_type = 1 kernel: scsi host2: bnx2fc: xid:0x42b scsi_done. err_code = 0x7 kernel: scsi host2: bnx2fc: xid:0x42b sc=ffff8807f93dfb80, result=0x7, retries=0, allowed=5 kernel: ------------[ cut here ]------------ kernel: WARNING: at /root/rpmbuild/BUILD/netxtreme2-7.14.43/obj/default/bnx2fc-2.12.1/driver/bnx2fc_io.c:1347 bnx2fc_eh_abort+0x56f/0x680 [bnx2fc]() kernel: xid=0x42b refcount=-1 kernel: Modules linked in: kernel: nls_utf8 isofs sr_mod cdrom tcp_lp dm_round_robin xt_CHECKSUM iptable_mangle ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_nat_ipv4 nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack ipt_REJECT nf_reject_ipv4 tun bridge ebtable_filter ebtables fuse ip6table_filter ip6_tables iptable_filter bnx2fc(OE) cnic(OE) uio fcoe libfcoe 8021q libfc garp mrp scsi_transport_fc stp llc scsi_tgt vfat fat dm_service_time intel_powerclamp coretemp intel_rapl iosf_mbi kvm_intel kvm irqbypass crc32_pclmul ghash_clmulni_intel aesni_intel lrw gf128mul glue_helper ablk_helper cryptd ses enclosure ipmi_ssif i2c_core hpilo hpwdt wmi sg ipmi_devintf pcspkr ipmi_si ipmi_msghandler shpchp acpi_power_meter dm_multipath nfsd auth_rpcgss nfs_acl lockd grace sunrpc ip_tables xfs sd_mod crc_t10dif kernel: crct10dif_generic bnx2x(OE) crct10dif_pclmul crct10dif_common crc32c_intel mdio ptp pps_core libcrc32c smartpqi scsi_transport_sas fjes uas usb_storage dm_mirror dm_region_hash dm_log dm_mod kernel: CPU: 9 PID: 2012 Comm: scsi_eh_2 Tainted: G W OE ------------ 3.10.0-514.el7.x86_64 #1 kernel: Hardware name: HPE Synergy 480 Gen10/Synergy 480 Gen10 Compute Module, BIOS I42 03/21/2018 kernel: ffff8807f25a3d98 0000000015e7fa0c ffff8807f25a3d50 ffffffff81685eac kernel: ffff8807f25a3d88 ffffffff81085820 ffff8807f8e39000 ffff880801ff7468 kernel: ffff880801ff7610 0000000000002002 ffff8807f8e39014 ffff8807f25a3df0 kernel: Call Trace: kernel: [] dump_stack+0x19/0x1b kernel: [] warn_slowpath_common+0x70/0xb0 kernel: [] warn_slowpath_fmt+0x5c/0x80 kernel: [] ? _raw_spin_lock_bh+0x12/0x50 kernel: [] bnx2fc_eh_abort+0x56f/0x680 [bnx2fc] kernel: [] scsi_error_handler+0x59f/0x8b0 kernel: [] ? scsi_eh_get_sense+0x250/0x250 kernel: [] kthread+0xcf/0xe0 kernel: [] ? kthread_create_on_node+0x140/0x140 kernel: [] ret_from_fork+0x58/0x90 kernel: [] ? kthread_create_on_node+0x140/0x140 kernel: ---[ end trace 42deb88f2032b111 ]--- The reason that there was a mismatch is that the SCSI command is actual returned from the cleanup handler. In previous testing, the type of cleanup notification we'd get from the CQE did not trigger the code that returned the SCSI command. To overcome the previous behavior we would put a reference in bnx2fc_abts_cleanup() to account for the SCSI command. However, in cases where the SCSI command is actually off, we end up with an extra put. The fix for this is to only take the extra put in bnx2fc_abts_cleanup if the completion for the cleanup times out. Signed-off-by: Chad Dupuis Signed-off-by: Saurav Kashyap Signed-off-by: Martin K. Petersen drivers/scsi/bnx2fc/bnx2fc_io.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 4adb451c8d1656e28a9ec472ccbdc4463205424a Author: Chad Dupuis Date: Mon Jun 24 01:29:55 2019 -0700 scsi: bnx2fc: Redo setting source FCoE MAC For bnx2fc, the source FCoE MAC is stored in the fcoe_port struct in the data_src_mac field. Currently this is set in fcoe_ctlr_recv_flogi which ends up setting it by simply using fc_fcoe_set_mac() which only uses the default FCF-MAC. We still want to store the source FCoE MAC in port->data_src_mac but we want to snoop the FLOGI response payload so as to set it in the following method: 1. If a granted_mac is found, use that. 2. If not granted_mac is there but there is a FCF-MAP from the FCF then create the MAC from the FCF-MAP and the destination ID from the frame. 3. If there is no FCF-MAP the use the spec. default FCF-MAP and the destination ID from the frame. Signed-off-by: Chad Dupuis Signed-off-by: Saurav Kashyap Signed-off-by: Martin K. Petersen drivers/scsi/bnx2fc/bnx2fc_els.c | 56 ++++++++++++++++++++++++++++------------ 1 file changed, 40 insertions(+), 16 deletions(-) commit 8c09d75276971da6f98871a1bb4a336b96728bba Author: Adrian Hunter Date: Fri Jun 21 15:19:42 2019 +0300 scsi: ufshdc-pci: Add Intel PCI IDs for EHL Add more Intel PCI IDs. Signed-off-by: Adrian Hunter Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd-pci.c | 2 ++ 1 file changed, 2 insertions(+) commit b13a3539eb2affcb8833c189d68d6a4b99c41f6e Author: Bean Huo Date: Sun Jun 23 17:38:56 2019 +0000 scsi: ufs-bsg: complete ufs-bsg job only if no error In the case of UPIU/DME request execution failed in UFS device, ufs_bsg_request() will complete the failed bsg job by calling bsg_job_done(). Meanwhile, it returns this error status to blk-mq layer, then triggers blk-mq completing this request again, this will cause the following panic. Call trace: ll_sc___cmpxchg_case_acq_32+0x4/0x20 complete+0x28/0x70 blk_end_sync_rq+0x24/0x30 blk_mq_end_request+0xb8/0x118 bsg_job_put+0x4c/0x58 bsg_complete+0x20/0x30 blk_done_softirq+0xb4/0xe8 do_softirq+0x154/0x3f0 run_ksoftirqd+0x4c/0x68 smpboot_thread_fn+0x22c/0x268 kthread+0x130/0x138 ret_from_fork+0x10/0x1c Code: f84107fe d65f03c0 d503201f f9800011 (885ffc10) ---[ end trace d92825bff6326e66 ]--- Kernel panic - not syncing: Fatal exception in interrupt This patch is to fix this issue. The solution is to complete the ufs-bsg job only if no error happened. [mkp: commit description tweak] Fixes: df032bf27a41 (scsi: ufs: Add a bsg endpoint that supports UPIUs) Signed-off-by: Bean Huo Reviewed-by: Avri Altman Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufs_bsg.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit c870d65fe3084193113ec622049b6906b899366c Author: Bean Huo Date: Sun Jun 23 17:38:39 2019 +0000 scsi: ufs-bsg: fix typo in ufs_bsg_request Correct dev_dbg to dev_err, so as to print out the error information in case of DME command failed. Signed-off-by: Bean Huo Reviewed-by: Avri Altman Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufs_bsg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 14808a12bdbdc21143eba70ea07830197b3a04ff Merge: b22342ea07e6 a201b6ac20ff Author: Dave Airlie Date: Thu Jun 27 12:33:56 2019 +1000 Merge tag 'drm-next-5.3-2019-06-25' of git://people.freedesktop.org/~agd5f/linux into drm-next drm-next-5.3-2019-06-25: Merge drm-next amdgpu: - SR-IOV L1 policy fixes - Removed no longer needed vram_page_split module parameter - Add module parameter to override default ABM level - Gamma fixes - No need to check return values for debugfs - Improve HMM error handling - Avoid possible OOM situations when lots of thread are submitting with memory contention - Improve hw i2c access abritration - DSC (Display Stream Compression) support in DC - Initial navi10 support * DC support * GFX/Compute support * SDMA support * Power Management support * VCN support - Static checker fixes - Misc cleanups - fix long udelay on arm amdkfd: - Implement priority controls for gfx9 - Enable VEGAM - Rework mqd allocation and init - Circular locking fix - Fix SDMA queue allocation race condition - No need to check return values for debugfs - Add proc style process information - Initial navi10 support radeon: - No need to check return values for debugfs UAPI changes: - GDDR6 added to vram type query - New Navi10 details added gpu info query - Navi family added to asic family query Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20190625195520.3817-1-alexander.deucher@amd.com commit da4d0b289142208893f6e685b0bc279fb3173478 Merge: a7d881464194 a55e040c6f21 Author: Olof Johansson Date: Wed Jun 26 19:30:10 2019 -0700 Merge tag 'samsung-soc-5.3' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/soc Samsung mach/soc changes for v5.3 Only cleanups and minor fixes. * tag 'samsung-soc-5.3' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: exynos: Cleanup cppcheck shifting warning ARM: exynos: Only build MCPM support if used ARM: exynos: Make ARCH_EXYNOS3 a default option Signed-off-by: Olof Johansson commit a151f27537250cf869c8d1c2549ccbb77dcbec2f Merge: 01453179b8c1 dd50a69b5697 Author: Olof Johansson Date: Wed Jun 26 19:27:25 2019 -0700 Merge tag 'samsung-defconfig-5.3' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/defconfig Samsung defconfig changes for v5.3 1. Trim several configs with savedefconfig. 2. Enable Lima and Panfrost drivers for Mali GPU. * tag 'samsung-defconfig-5.3' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: exynos_defconfig: Enable Panfrost and Lima drivers ARM: multi_v7_defconfig: Enable Panfrost and Lima drivers ARM: defconfig: samsung: Cleanup with savedefconfig ARM: exynos_defconfig: Trim and reorganize with savedefconfig Signed-off-by: Olof Johansson commit ff3b86096c492ec4ba9f18ff3c6c33a4fbe9dcc1 Merge: 9aa7ae4330d2 4dc2a25d058d Author: Olof Johansson Date: Wed Jun 26 19:23:42 2019 -0700 Merge tag 'samsung-dt64-5.3' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/dt Samsung DTS ARM64 changes for v5.3 Add Mali nodes to Exynos5433 and Exynos7. * tag 'samsung-dt64-5.3' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: arm64: dts: exynos: Add GPU/Mali T760 node to Exynos7 arm64: dts: exynos: Add GPU/Mali T760 node to Exynos5433 Signed-off-by: Olof Johansson commit 9aa7ae4330d2e075ad811c3e6153ab2cb49ed081 Merge: 3395a968e590 13efd80acaa4 Author: Olof Johansson Date: Wed Jun 26 19:23:08 2019 -0700 Merge tag 'samsung-dt-5.3-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/dt Samsung DTS ARM changes for v5.3, second round 1. Add camera flash to Galaxy S3 boards, 2. Fix PMU affinity interrupt warning on Exynos4, 3. Improve regulator configuration on Odroid XU3/XU4/HC1 family and Arndale Octa by disabling unneeded regulators and adding suspend configuration. The suspend configuration brings significant reduce of energy usage in Suspend to RAM (e.g. 120 -> ~7 mA on Odroid HC1). 4. Add Mali nodes to Exynos3 and Exynos4. * tag 'samsung-dt-5.3-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: dts: exynos: Add GPU/Mali 400 node to Exynos4 ARM: dts: exynos: Add GPU/Mali 400 node to Exynos3250 dt-bindings: gpu: mali: Add Samsung compatibles for Midgard and Utgard ARM: dts: exynos: Use proper regulator for eMMC memory on Arndale Octa ARM: dts: exynos: Add regulator suspend configuration to Odroid XU3/XU4/HC1 family ARM: dts: exynos: Add regulator suspend configuration to Arndale Octa board ARM: dts: exynos: Disable unused buck10 regulator on Odroid HC1 board ARM: dts: exynos: Fix language typo and indentation ARM: dts: exynos: Add PMU interrupt affinity to Exynos4 boards ARM: dts: exynos: Add flash support to Galaxy S3 boards Signed-off-by: Olof Johansson commit 3395a968e5903f7852235cbc615ebc97f1615487 Merge: 2bfd84b3a548 aa38571246c6 Author: Olof Johansson Date: Wed Jun 26 19:22:19 2019 -0700 Merge tag 'uniphier-dt64-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier into arm/dt UniPhier ARM64 SoC DT updates for v5.3 - Migrate to the new binding for the Denali NAND controller - Use reserved-memory node instead of /memreserve/ for the secure memory area * tag 'uniphier-dt64-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier: arm64: dts: uniphier: add reserved-memory for secure memory arm64: dts: uniphier: update to new Denali NAND binding Signed-off-by: Olof Johansson commit 2bfd84b3a548a8eda8676a0b6bc4d471a6f6b812 Merge: 3a0317524b8a bc8841f0c1e6 Author: Olof Johansson Date: Wed Jun 26 19:20:30 2019 -0700 Merge tag 'uniphier-dt-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier into arm/dt UniPhier ARM SoC DT updates for v5.3 - Migrate to the new binding for the Denali NAND controller * tag 'uniphier-dt-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier: ARM: dts: uniphier: update to new Denali NAND binding Signed-off-by: Olof Johansson commit 3a0317524b8a43a000e4fa9b3eaf9ec1d3ee7dc2 Merge: d78cda5aa0a0 de1033881e93 Author: Olof Johansson Date: Wed Jun 26 19:19:58 2019 -0700 Merge tag 'v5.2-next-dts64' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into arm/dt - convert arm boads to json-schema mt8183: - add base SoC and evaluation board - add cpacity-dmips-mhz - add pinctrl, auxadc, spi, and efuse nodes * tag 'v5.2-next-dts64' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: arm64: dts: mt8183: add efuse and Mediatek Chip id node to read arm64: dts: mt8183: add spi node arm64: dts: mt8183: Add auxadc device node arm64: dts: mt8183: add pinctrl device node arm64: dts: mt8183: add capacity-dmips-mhz arm64: dts: Add Mediatek SoC MT8183 and evaluation board dts and Makefile dt-bindings: arm: Convert MediaTek board/soc bindings to json-schema Signed-off-by: Olof Johansson commit 01453179b8c1b85b473ecb9ecc2fba3e92d0f8b5 Merge: 8bb564b102bd b576576d6591 Author: Olof Johansson Date: Wed Jun 26 19:11:32 2019 -0700 Merge tag 'imx-defconfig-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/defconfig i.MX defconfig changes for 5.3: * imx_v6_v7_defconfig: - PCF857X GPIO expander - SIOX bus driver - thermal statistics - TPM PWM driver - OV2680 camera driver - SNVS LPGPR NVMEM driver - i.MX DT based cpufreq driver * arm64 defconfig built-in: - i.MX8MM pinctrl and clock - i.MX LPI2C driver - ROHM_BD718XX PMIC - OCOTP NVMEM support - i.MX SCU based SoC bus driver * arm64 defconfig modules: - i.MX SPI driver - i.MX system controller watchdog - SNVS RTC driver - ISL29018 light and proximity sensor driver - MPL3115 pressure sensor driver - i.MX8 DT based cpufreq support - QorIQ Thermal Monitoring Unit driver - SNVS power key driver * tag 'imx-defconfig-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: arm64: defconfig: Enable CONFIG_KEYBOARD_SNVS_PWRKEY as module ARM: imx_v6_v7_defconfig: Enable CONFIG_ARM_IMX_CPUFREQ_DT defconfig: arm64: enable i.MX8 SCU octop driver arm64: defconfig: Add i.MX SCU SoC info driver arm64: defconfig: Enable CONFIG_QORIQ_THERMAL ARM: imx_v6_v7_defconfig: Select CONFIG_NVMEM_SNVS_LPGPR arm64: defconfig: ARM_IMX_CPUFREQ_DT=m ARM: imx_v6_v7_defconfig: Add TPM PWM support by default ARM: imx_v6_v7_defconfig: Enable the OV2680 camera driver ARM: imx_v6_v7_defconfig: Enable CONFIG_THERMAL_STATISTICS arm64: defconfig: NVMEM_IMX_OCOTP=y for imx8m arm64: defconfig: Enable ROHM_BD718XX PMIC for imx8mm-evk arm64: defconfig: Enable lpi2c for imx8qxp and sensors arm64: defconfig: Enable imx8mm clk/pinctrl arm64: defconfig: Enable RTC_DRV_SNVS arm64: defconfig: add support for i.MX system controller watchdog ARM: imx_v6_v7_defconfig: Enable SIOX bus ARM: imx_v6_v7_defconfig: Add GPIO_PCF857X arm64: defconfig: Enable CONFIG_SPI_IMX Signed-off-by: Olof Johansson commit 8bb564b102bd0593e0d11f200b30756c8ca0fc0e Author: Joel Stanley Date: Wed Jun 26 11:33:56 2019 +0930 ARM: configs: multi_v5: Remove duplicate ASPEED options A recent change mistakenly added a second copy of these two options, which kbuild warns about: arch/arm/configs/multi_v5_defconfig:257:warning: override: reassigning to symbol ASPEED_LPC_CTRL arch/arm/configs/multi_v5_defconfig:258:warning: override: reassigning to symbol ASPEED_LPC_SNOOP Fixes: 2d8bf3404bb0 ("ARM: configs: multi_v5: Add more ASPEED devices") Signed-off-by: Joel Stanley Signed-off-by: Olof Johansson arch/arm/configs/multi_v5_defconfig | 2 -- 1 file changed, 2 deletions(-) commit e8ac278fc90ee1fd8fdaeb484985ae17224673db Merge: 29217a9eb0ed dae335bcae86 Author: Olof Johansson Date: Wed Jun 26 19:07:58 2019 -0700 Merge tag 'sunxi-config64-for-5.3-201906210813' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/defconfig Our usual bunch of arm64 defconfig changes, this time mostly to enable some missing drivers for the Allwinner A64. * tag 'sunxi-config64-for-5.3-201906210813' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: arm64: defconfig: enable Allwinner DMA drivers arm64: defconfig: enable sunxi watchdog arm64: defconfig: add allwinner sid support Signed-off-by: Olof Johansson commit b22342ea07e6b9d867c39c84d3d774add88079c1 Merge: 80d42db02b3a 45a19dd39788 Author: Dave Airlie Date: Thu Jun 27 11:48:02 2019 +1000 Merge tag 'for-airlie-tda998x' of git://git.armlinux.org.uk/~rmk/linux-arm into drm-next TDA998x updates: - improve the driver's approach to audio, adding support for more I2S based formats, particularly other justifications, and preparing the driver to support other bclk ratios. - add support for pixel repeated modes, tested with a Panasonic TV. - correct the quantisation range handling; in particular, do not send full range RGB to the sink when the sink does not support full range RGB. - Send the HDMI vendor info frame when required. Signed-off-by: Dave Airlie From: Russell King Link: https://patchwork.freedesktop.org/patch/msgid/20190625125005.GA31503@rmk-PC.armlinux.org.uk commit 02e5ad973883c36c0868b301b8357d9c455bb91c Author: Al Viro Date: Wed Jun 26 20:43:53 2019 -0400 perf_event_get(): don't bother with fget_raw() ... since we immediately follow that with check that it *is* an opened perf file, with O_PATH ones ending with with the same -EBADF we'd get for descriptor that isn't opened at all. Signed-off-by: Al Viro kernel/events/core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 8811249f0cfdd6552152173f881fddc7f20f427e Author: Ian Kent Date: Thu Apr 11 12:28:02 2019 +0800 vfs: update d_make_root() description Clearify d_make_root() usage, error handling and cleanup requirements. Signed-off-by: Ian Kent Signed-off-by: Al Viro Documentation/filesystems/porting | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit b4ed8f75c82876342b3399942427392ba5f3bbb5 Author: Russell King Date: Tue Jun 4 14:50:24 2019 +0100 fs/adfs: add time stamp and file type helpers Add some helpers to check whether the inode has a time stamp and file type, and to parse the file type from the load address. Signed-off-by: Russell King Signed-off-by: Al Viro fs/adfs/adfs.h | 29 +++++++++++++++++++---------- fs/adfs/dir.c | 16 +++++----------- fs/adfs/inode.c | 8 +++----- fs/adfs/super.c | 1 - 4 files changed, 27 insertions(+), 27 deletions(-) commit 8616108de152447f99570dd45b6e3b8c71615fe5 Author: Russell King Date: Tue Jun 4 14:50:19 2019 +0100 fs/adfs: super: limit idlen according to directory type Limit idlen according to the directory type, as idlen (the size of a fragment ID) can not be more than 16 with the "new directory" layout. Signed-off-by: Russell King Signed-off-by: Al Viro fs/adfs/super.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 5808b14a1f52554de612fee85ef517199855e310 Author: Russell King Date: Tue Jun 4 14:50:14 2019 +0100 fs/adfs: super: fix use-after-free bug Fix a use-after-free bug during filesystem initialisation, where we access the disc record (which is stored in a buffer) after we have released the buffer. Signed-off-by: Russell King Signed-off-by: Al Viro fs/adfs/super.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 4c5762f5f5e31d493678b0ee6f73585355dd3638 Author: Russell King Date: Tue Jun 4 14:50:09 2019 +0100 fs/adfs: super: safely update options on remount Only update the options on remount if we successfully parse all options, rather than updating those we've managed to parse. Signed-off-by: Russell King Signed-off-by: Al Viro fs/adfs/super.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit 421d3c0faa28890dbfb7d2a67f067f07c1123556 Author: Russell King Date: Tue Jun 4 14:50:03 2019 +0100 fs/adfs: super: correct superblock flags We don't support atime updates of any kind, and we ought to set the read-only bit if we are compiled without write support. Signed-off-by: Russell King Signed-off-by: Al Viro fs/adfs/super.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 5ed70bb47767d1f57a5e85e585a327917ded0373 Author: Russell King Date: Tue Jun 4 14:49:57 2019 +0100 fs/adfs: clean up indirect disc addresses and fragment IDs We use a variety of different names for the indirect disc address of the current object, use a variety of different types, and print it in a variety of different ways. Bring some consistency to this by naming it "indaddr", use u32 or __u32 as the type since it fits in 32-bits, and always print it with %06x (with no leading hex prefix.) When printing it was a directory identifer, use "dir %06x" otherwise use "object %06x". Do the same for fragment IDs and the parent indirect disc addresses. Signed-off-by: Russell King Signed-off-by: Al Viro fs/adfs/adfs.h | 22 +++++++++++----------- fs/adfs/dir.c | 9 +++++---- fs/adfs/dir_f.c | 37 ++++++++++++++++--------------------- fs/adfs/dir_fplus.c | 2 +- fs/adfs/inode.c | 4 ++-- fs/adfs/map.c | 14 +++++--------- fs/adfs/super.c | 2 +- 7 files changed, 41 insertions(+), 49 deletions(-) commit ceb3b10613eba86ddf043345338e32673a27f87a Author: Russell King Date: Tue Jun 4 14:49:52 2019 +0100 fs/adfs: clean up error message printing Overhaul our message printing: - provide a consistent way to print messages: - filesystem corruption should be reported via adfs_error() - everything else should use adfs_msg() - clean up the error message printing when mounting a filesystem - fix the messages printed by the big directory format code to only use adfs_error() when there is filesystem corruption, otherwise use adfs_msg(). Signed-off-by: Russell King Signed-off-by: Al Viro fs/adfs/adfs.h | 1 + fs/adfs/dir_fplus.c | 18 ++++++++---------- fs/adfs/super.c | 45 +++++++++++++++++++++++++++++---------------- 3 files changed, 38 insertions(+), 26 deletions(-) commit 2e67080d87087fdba88059b1f63e4301ea0fad3a Author: Russell King Date: Tue Jun 4 14:49:47 2019 +0100 fs/adfs: use %pV for error messages Rather than using vsnprintf() with a temporary buffer on the stack, use %pV to print error messages. Signed-off-by: Russell King Signed-off-by: Al Viro fs/adfs/super.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit cb88b5a387dd9ba9c36fd76c4cdc187cdce5974c Author: Russell King Date: Tue Jun 4 14:49:41 2019 +0100 fs/adfs: use format_version from disc_record We only use the format version in one place during filesystem mount, so it is pointless storing it in the superblock structure. Also, we should be using the version from the disc record in the map rather than the boot block. Signed-off-by: Russell King Signed-off-by: Al Viro fs/adfs/adfs.h | 1 - fs/adfs/super.c | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) commit 275f5b99d6d4e6fccb7cea6783460939856c1306 Author: Russell King Date: Tue Jun 4 14:49:36 2019 +0100 fs/adfs: add helper to get filesystem size Add a helper to get the filesystem size from the disc record and eliminate the "s_size" member of the adfs superblock structure. Signed-off-by: Russell King Signed-off-by: Al Viro fs/adfs/adfs.h | 7 ++++++- fs/adfs/super.c | 17 +++-------------- 2 files changed, 9 insertions(+), 15 deletions(-) commit 1dfdfc94730bde781c87b25fd606f6dfaffe9097 Author: Russell King Date: Tue Jun 4 14:49:30 2019 +0100 fs/adfs: add helper to get discrecord from map Add a helper to get the disc record from the map, rather than open coding this in adfs_fill_super(). Signed-off-by: Russell King Signed-off-by: Al Viro fs/adfs/adfs.h | 10 ++++++++-- fs/adfs/dir_f.c | 1 - fs/adfs/dir_fplus.c | 1 - fs/adfs/map.c | 1 - fs/adfs/super.c | 3 +-- 5 files changed, 9 insertions(+), 7 deletions(-) commit 3ae762a09cd72a08ef620c80fbb263693c3fb204 Author: Russell King Date: Tue Jun 4 14:49:25 2019 +0100 fs/adfs: correct disc record structure Fill in some padding in the disc record structure, and add GCC packed and aligned attributes to ensure that it is correctly laid out. Signed-off-by: Russell King Signed-off-by: Al Viro include/uapi/linux/adfs_fs.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3222bcf5f1155dde0ba6c596253439dece3f8262 Author: Vivek Unune Date: Fri Jun 21 16:53:08 2019 -0400 arm64: dts: rockchip: Add support for Hugsun X99 TV Box Add devicetree support for Hugsun X99 TV Box based on RK3399 SoC Tested with LibreElec running kernel v5.1.2. Following peripherals tested and work: Peripheral works: - UART2 debug - eMMC - USB 3.0 port - USB 2.0 port - sdio, sd-card - HDMI - Ethernet - WiFi/BT Not tested: - Type-C port - OPTICAL - IR Signed-off-by: Vivek Unune Signed-off-by: Heiko Stuebner .../devicetree/bindings/arm/rockchip.yaml | 5 + .../devicetree/bindings/vendor-prefixes.yaml | 2 + arch/arm64/boot/dts/rockchip/Makefile | 1 + arch/arm64/boot/dts/rockchip/rk3399-hugsun-x99.dts | 733 +++++++++++++++++++++ 4 files changed, 741 insertions(+) commit cd21c54ad9c4c838e96d4d6e1bc9694eac1aa798 Author: Daniel Lezcano Date: Tue Jun 4 18:57:58 2019 +0200 arm64: dts: rockchip: Define values for the IPA governor for rock960 Currently the default thermal values for the rk3399-rock960 board is inherited from the generic definition in rk3399.dtsi. In order to ensure the rock960 has more room for througput before being capped by the thermal framework and is correctly supported by the IPA governor, let's define the power values and the right trip points for better performances: - sustainable power is tested to be 1550mW - increase the first mitigation point to 75°C in order to get better performances - the first trip point is 65°C in order to let the IPA to collect enough data for the PID regulation when it reaches 75°C - restrict the cooling device to the big CPUs as the little CPUs contribution to the heating effect can be considered negligible The intelligent power allocator PID coefficient to be set in sysfs are: k_d: 0 k_po: 79 k_i: 10 k_pu: 50 Signed-off-by: Daniel Lezcano Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399-rock960.dts | 39 +++++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit 2b50f230f76f8ef954f12ac34a648e1978f6adf0 Author: Douglas Anderson Date: Wed Jun 26 12:59:19 2019 -0700 block, bfq: Init saved_wr_start_at_switch_to_srt in unlikely case Some debug code suggested by Paolo was tripping when I did reboot stress tests. Specifically in bfq_bfqq_resume_state() "bic->saved_wr_start_at_switch_to_srt" was later than the current value of "jiffies". A bit of debugging showed that "bic->saved_wr_start_at_switch_to_srt" was actually 0 and a bit more debugging showed that was because we had run through the "unlikely" case in the bfq_bfqq_save_state() function. Let's init "saved_wr_start_at_switch_to_srt" in the unlikely case to something sane. NOTE: this fixes no known real-world errors. Reviewed-by: Paolo Valente Reviewed-by: Guenter Roeck Signed-off-by: Douglas Anderson Signed-off-by: Jens Axboe block/bfq-iosched.c | 1 + 1 file changed, 1 insertion(+) commit 95f231f801ae1b1d630f03c3348873f7e1bd6f18 Author: Daniel Lezcano Date: Tue Jun 4 18:57:57 2019 +0200 arm64: dts: rockchip: Fix multiple thermal zones conflict in rk3399.dtsi Currently the common thermal zones definitions for the rk3399 assumes multiple thermal zones are supported by the governors. This is not the case and each thermal zone has its own governor instance acting individually without collaboration with other governors. As the cooling device for the CPU and the GPU thermal zones is the same, each governors take different decisions for the same cooling device leading to conflicting instructions and an erratic behavior. As the cooling-maps is about to become an optional property, let's remove the cpu cooling device map from the GPU thermal zone. Signed-off-by: Daniel Lezcano Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399.dtsi | 9 --------- 1 file changed, 9 deletions(-) commit 587b4ee24fc7200fea5c630c5d981b2cca35149f Author: Jianqun Xu Date: Thu May 30 08:08:48 2019 +0800 arm64: dts: rockchip: add core dtsi file for RK3399Pro SoCs This patch adds core dtsi file for Rockchip RK3399Pro SoCs, include rk3399.dtsi. Also enable pciei0/pcie_phy for AP to talk to NPU part inside SoC. Signed-off-by: Jianqun Xu Acked-by: Manivannan Sadhasivam Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399pro.dtsi | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 393f3875c385cc6ae3b6069c3a88fe8e24d681ae Author: Peter Geis Date: Wed Jun 26 13:04:43 2019 +0000 arm64: dts: rockchip: improve rk3328-roc-cc rgmii performance. Currently the rk3328-roc-cc ethernet is enabled using "snps,force_thresh_dma_mode". While this works, the performance leaves a lot to be desired. A previous attempt to improve performance used "snps,txpbl = <0x4>". This also allowed networking to function, but performance varied between boards. This patch takes that one step further. Set txpbl and rxpbl to 0x4. This can also be accomplished with "snps,pbl =<0x4>" which affects both. Also set "snps,aal" which forces address aligned DMA mode. Fixes: 4bc4d6013b7f (arm64: dts: rockchip: fix rk3328-roc-cc gmac2io stability issues) Signed-off-by: Peter Geis Tested-by: Leonidas P. Papadakos Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 7c116d22ad23809767c5ec06affa19b9bb163d97 Author: Mauro Carvalho Chehab Date: Wed Jun 26 10:35:11 2019 -0300 docs: filesystems: Remove uneeded .rst extension on toctables There's no need to use a .rst on Sphinx toc tables. As most of the Documentation don't use, remove the remaing occurrences. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/filesystems/ext4/index.rst | 8 ++++---- Documentation/filesystems/index.rst | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) commit 8c69b77a0175d6e14df9cdf386a8b69f6cfa2c6a Author: Mike Rapoport Date: Mon Jun 24 08:25:07 2019 +0300 scripts/sphinx-pre-install: fix out-of-tree build Build of htmldocs fails for out-of-tree builds: $ make V=1 O=~/build/kernel/ htmldocs make -C /home/rppt/build/kernel -f /home/rppt/git/linux-docs/Makefile htmldocs make[1]: Entering directory '/home/rppt/build/kernel' make -f /home/rppt/git/linux-docs/scripts/Makefile.build obj=scripts/basic rm -f .tmp_quiet_recordmcount make -f /home/rppt/git/linux-docs/scripts/Makefile.build obj=Documentation htmldocs Can't open Documentation/conf.py at /home/rppt/git/linux-docs/scripts/sphinx-pre-install line 230. /home/rppt/git/linux-docs/Documentation/Makefile:80: recipe for target 'htmldocs' failed make[2]: *** [htmldocs] Error 2 The scripts/sphinx-pre-install is trying to open files in the current directory which is $KBUILD_OUTPUT rather than in $srctree. Fix it. Signed-off-by: Mike Rapoport Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet scripts/sphinx-pre-install | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit b4f4174ae982dfc855c56e91776920e0166da1bf Author: Mauro Carvalho Chehab Date: Sat Jun 22 14:47:46 2019 -0300 docs: zh_CN: submitting-drivers.rst: Remove a duplicated Documentation/ Somehow, this file ended with Documentation/ twice. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/translations/zh_CN/process/submitting-drivers.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cca5e0b8a430c888c5de1b5d36b87c085354f2c8 Author: Konstantin Ryabitsev Date: Wed Jun 26 11:49:42 2019 -0600 Documentation: PGP: update for newer HW devices Newer devices like Yubikey 5 and Nitrokey Pro 2 have added support for NISTP's implementation of ECC cryptography, so update the guide accordingly and add a note on when to use nistp256 and when to use ed25519 for generating S keys. Signed-off-by: Konstantin Ryabitsev Signed-off-by: Jonathan Corbet Documentation/process/maintainer-pgp-guide.rst | 31 ++++++++++++++------------ 1 file changed, 17 insertions(+), 14 deletions(-) commit fe32553c8704fe15effd6945afd5de893d417a80 Author: Matthias Kaehlcke Date: Tue Jun 18 11:45:31 2019 -0700 Revert "ARM: dts: rockchip: set PWM delay backlight settings for Minnie" This reverts commit 288ceb85b505c19abe1895df068dda5ed20cf482. The commit assumes that the minnie panel is a AUO B101EAN01.1 (LVDS interface), however it is a AUO B101EAN01.8 (eDP interface). The eDP panel doesn't need the 200 ms delay. Signed-off-by: Matthias Kaehlcke Reviewed-by: Enric Balletbo i Serra Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288-veyron-minnie.dts | 2 -- 1 file changed, 2 deletions(-) commit 4db11c378ab1e170c3a197ea3719ffe54cd06637 Author: Douglas Anderson Date: Wed Jun 19 11:34:25 2019 -0700 ARM: dts: rockchip: Configure BT_DEV_WAKE in on rk3288-veyron This is the other half of the hacky solution from commit f497ab6b4bb8 ("ARM: dts: rockchip: Configure BT_HOST_WAKE as wake-up signal on veyron"). Specifically the LPM driver that the Broadcom Bluetooth expects to have (but is missing in mainline) has two halves of the equation: BT_HOST_WAKE and BT_DEV_WAKE. The BT_HOST_WAKE (which was handled in the previous commit) is the one that lets the Bluetooth wake the system up. The BT_DEV_WAKE (this patch) tells the Bluetooth that it's OK to go into a low power mode. That means we were burning a bit of extra power in S3 without this patch. Measurements are a bit noisy, but it appears to be a few mA worth of difference. NOTE: Though these pins don't do much on systems with Marvell Bluetooth, downstream kernels set it on all veyron boards so we'll do the same. Signed-off-by: Douglas Anderson Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288-veyron-chromebook.dtsi | 2 ++ arch/arm/boot/dts/rk3288-veyron.dtsi | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+) commit eca0f0a6c3fb2f88f123b4a8b57d53de77cdde77 Author: Song Hongyan Date: Sun Jun 2 08:17:21 2019 +0800 HID: remove NO_D3 flag when remove driver Remove the NO_D3 flag when remove the driver and let device enter into D3, it will save more power. Signed-off-by: Song Hongyan Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina drivers/hid/intel-ish-hid/ipc/pci-ish.c | 1 + 1 file changed, 1 insertion(+) commit 8b89d8dad5df177032e7e97ecfb18f01134e0e4b Merge: 96125bf9985a 302a7cad54b8 Author: David S. Miller Date: Wed Jun 26 14:09:33 2019 -0700 Merge branch 'macb-build-fixes' Palmer Dabbelt says: ==================== net: macb: Fix compilation on systems without COMMON_CLK, v2 Our patch to add support for the FU540-C000 broke compilation on at least powerpc allyesconfig, which was found as part of the linux-next build regression tests. This must have somehow slipped through the cracks, as the patch has been reverted in linux-next for a while now. This patch applies on top of the offending commit, which is the only one I've even tried it on as I'm not sure how this subsystem makes it to Linus. This patch set fixes the issue by adding a dependency of COMMON_CLK to the MACB Kconfig entry, which avoids the build failure by disabling MACB on systems where it wouldn't compile. All known users of MACB have COMMON_CLK, so this shouldn't cause any issues. This is a significantly simpler approach than disabling just the FU540-C000 support. I've also included a second patch to indicate this is a driver for a Cadence device that was originally written by an engineer at Atmel. The only relation is that I stumbled across it when writing the first patch. Changes since v1 <20190624061603.1704-1-palmer@sifive.com>: * Disable MACB on systems without COMMON_CLK, instead of just disabling the FU540-C000 support on these systems. * Update the commit message to reflect the driver was written by Atmel. ==================== Signed-off-by: David S. Miller commit 302a7cad54b855d9378f202a228ea0dd00d7fa27 Author: Palmer Dabbelt Date: Tue Jun 25 01:48:28 2019 -0700 net: macb: Kconfig: Rename Atmel to Cadence The help text makes it look like NET_VENDOR_CADENCE enables support for Atmel devices, when in reality it's a driver written by Atmel that supports Cadence devices. This may confuse users that have this device on a non-Atmel SoC. The fix is just s/Atmel/Cadence/, but I did go and re-wrap the Kconfig help text as that change caused it to go over 80 characters. Signed-off-by: Palmer Dabbelt Acked-by: Nicolas Ferre Signed-off-by: David S. Miller drivers/net/ethernet/cadence/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c536a9aa7c14d22a9ee9acb6311a32c9c477665f Author: Palmer Dabbelt Date: Tue Jun 25 01:48:27 2019 -0700 net: macb: Kconfig: Make MACB depend on COMMON_CLK commit c218ad559020 ("macb: Add support for SiFive FU540-C000") added a dependency on the common clock framework to the macb driver, but didn't express that dependency in Kconfig. As a result macb now fails to compile on systems without COMMON_CLK, which specifically causes a build failure on powerpc allyesconfig. This patch adds the dependency, which results in the macb driver no longer being selectable on systems without the common clock framework. All known systems that have this device already support the common clock framework, so this should not cause trouble for any uses. Supporting both the FU540-C000 and systems without COMMON_CLK is quite ugly. I've build tested this on powerpc allyesconfig and RISC-V defconfig (which selects MACB), but I have not even booted the resulting kernels. Fixes: c218ad559020 ("macb: Add support for SiFive FU540-C000") Signed-off-by: Palmer Dabbelt Acked-by: Nicolas Ferre Signed-off-by: David S. Miller drivers/net/ethernet/cadence/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit def914a4c3899b6b3705c8ea67d29972f5652a14 Author: Stefan Popa Date: Mon Jun 24 18:13:56 2019 +0300 iio: frequency: adf4371: Add support for output stage mute Another feature of the ADF4371/ADF4372 is that the supply current to the RF8P and RF8N output stage can shut down until the ADF4371 achieves lock as measured by the digital lock detect circuitry. The mute to lock detect bit (MUTE_LD) in REG25 enables this function. Signed-off-by: Stefan Popa Signed-off-by: Jonathan Cameron .../devicetree/bindings/iio/frequency/adf4371.yaml | 7 +++++++ drivers/iio/frequency/adf4371.c | 13 +++++++++++++ 2 files changed, 20 insertions(+) commit 84ed6482c6d889dcfa9c6b6e8b17c53748ab4f43 Author: Stefan Popa Date: Mon Jun 24 18:12:42 2019 +0300 dt-bindings: iio: frequency: Add ADF4372 PLL documentation Document support for ADF4372 SPI Wideband Synthesizer. Signed-off-by: Stefan Popa Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/frequency/adf4371.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 13a0af411a65c7cd452f03d86c7fe61e87109fa3 Author: Stefan Popa Date: Mon Jun 24 18:12:12 2019 +0300 iio: frequency: adf4371: Add support for ADF4372 PLL The ADF4372 is part of the same family with ADF4371, the main difference is that it has only 3 channels instead of 4, as the frequency quadrupler is missing. As a result, the ADF4372 allows frequencies from 62.5 MHz to 16 GHz to be generated. Datasheet: Link: https://www.analog.com/media/en/technical-documentation/data-sheets/adf4372.pdf Signed-off-by: Stefan Popa Signed-off-by: Jonathan Cameron drivers/iio/frequency/Kconfig | 6 +++--- drivers/iio/frequency/adf4371.c | 31 ++++++++++++++++++++++++++++--- 2 files changed, 31 insertions(+), 6 deletions(-) commit c444e956a26115e605b4a345a39da294576f8d69 Author: Mircea Caprioru Date: Tue Jun 25 11:11:28 2019 +0300 dt-bindings: iio: adc: Add buffered input property This patch adds the buffered mode device tree property for positive and negative inputs. Each option can be enabled independently. In buffered mode, the input channel feeds into a high impedance input stage of the buffer amplifier. Therefore, the input can tolerate significant source impedances and is tailored for direct connection to external resistive type sensors such as strain gages or RTDs. Signed-off-by: Mircea Caprioru Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/adc/adi,ad7124.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 26ae15e62d3c85cc6f221fa1830fc9350cb2152f Author: Mircea Caprioru Date: Wed Jun 26 20:31:05 2019 +0100 Convert AD7124 bindings documentation to YAML format. Signed-off-by: Mircea Caprioru Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron .../devicetree/bindings/iio/adc/adi,ad7124.txt | 75 ----------- .../devicetree/bindings/iio/adc/adi,ad7124.yaml | 144 +++++++++++++++++++++ 2 files changed, 144 insertions(+), 75 deletions(-) commit 1478a388f4baaa6da4767a0d7cf82a47826b9fc0 Author: Mircea Caprioru Date: Tue Jun 25 11:11:26 2019 +0300 iio: adc: ad7124: Shift to dynamic allocation for channel configuration This patch changes the channel configuration member of the device structure from a fixed size array to a dynamic allocated one with a size equal to the number of channels specified in the device tree. This will ensure a more flexibility for compatible devices. Ex. ad7124-4 - can have 4 differential or 8 pseudo-differential channels ad7124-8 - can have 8 differential or 16 pseudo-differential channels Also the device can suspport any other combination of differential and pseudo-differential channels base on the physical number of inputs available. Signed-off-by: Mircea Caprioru Signed-off-by: Jonathan Cameron drivers/iio/adc/ad7124.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 0eaecea6e4878abbf1d3e8de3e4eeabc856133d4 Author: Mircea Caprioru Date: Tue Jun 25 11:11:25 2019 +0300 iio: adc: ad7124: Add buffered input support This patch adds the option to enable the buffered mode for positive and negative inputs. Each option can be enabled independently. In buffered mode, the input channel feeds into a high impedance input stage of the buffer amplifier. Therefore, the input can tolerate significant source impedances and is tailored for direct connection to external resistive type sensors such as strain gages or RTDs. Signed-off-by: Mircea Caprioru Signed-off-by: Jonathan Cameron drivers/iio/adc/ad7124.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit f1794fd7bdf7981e21595d0162ab4f7305b3c7c1 Author: Mircea Caprioru Date: Tue Jun 25 11:11:24 2019 +0300 iio: adc: ad7124: Remove input number limitation The driver limits the user to use only 4/8 differential inputs, but this device has the option to use pseudo-differential channels. This will increase the number of channels to be equal with the number of inputs so 8 channels for ad7124-4 and 16 for ad7124-8. This patch removes the check between channel nodes and num_inputs value. Signed-off-by: Mircea Caprioru Signed-off-by: Jonathan Cameron drivers/iio/adc/ad7124.c | 7 ------- 1 file changed, 7 deletions(-) commit 6a8036862de0ab7dc012c08049dcf323b884e6f1 Author: Alexandru Ardelean Date: Tue Jun 25 16:13:24 2019 +0300 MAINTAINERS: add ADIS IMU driver library entry This change adds the ADIS driver library to the MAINTAINERS list, and adds myself as the current maintainer of this library. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) commit 10dd571c66a5bc5d3d5274829e00dea65ddc86cc Author: Alexandru Ardelean Date: Tue Jun 25 15:48:40 2019 +0300 iio: adis162xx: fix low-power docs & reports All current ADIS162XX drivers have incorrect values defined via comments. Also, when an error is reported the printed value is incorrect. The functionality itself isn't affected, so it's not a critical issue. And since the change is trivial, it was included in a single patch that fixes these in one go. All values were correlated with the ones specified in the data-sheets. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron drivers/iio/accel/adis16201.c | 4 ++-- drivers/iio/accel/adis16209.c | 4 ++-- drivers/staging/iio/accel/adis16203.c | 4 ++-- drivers/staging/iio/accel/adis16240.c | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) commit 96125bf9985a75db00496dd2bc9249b777d2b19b Author: Dave Taht Date: Sat Jun 22 10:07:34 2019 -0700 Allow 0.0.0.0/8 as a valid address range The longstanding prohibition against using 0.0.0.0/8 dates back to two issues with the early internet. There was an interoperability problem with BSD 4.2 in 1984, fixed in BSD 4.3 in 1986. BSD 4.2 has long since been retired. Secondly, addresses of the form 0.x.y.z were initially defined only as a source address in an ICMP datagram, indicating "node number x.y.z on this IPv4 network", by nodes that know their address on their local network, but do not yet know their network prefix, in RFC0792 (page 19). This usage of 0.x.y.z was later repealed in RFC1122 (section 3.2.2.7), because the original ICMP-based mechanism for learning the network prefix was unworkable on many networks such as Ethernet (which have longer addresses that would not fit into the 24 "node number" bits). Modern networks use reverse ARP (RFC0903) or BOOTP (RFC0951) or DHCP (RFC2131) to find their full 32-bit address and CIDR netmask (and other parameters such as default gateways). 0.x.y.z has had 16,777,215 addresses in 0.0.0.0/8 space left unused and reserved for future use, since 1989. This patch allows for these 16m new IPv4 addresses to appear within a box or on the wire. Layer 2 switches don't care. 0.0.0.0/32 is still prohibited, of course. Signed-off-by: Dave Taht Signed-off-by: John Gilmore Acked-by: Toke Høiland-Jørgensen Signed-off-by: David S. Miller include/linux/in.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c22a133a83ce64949dc35156eaefeda5a1e12bc3 Author: David Ahern Date: Fri Jun 21 16:27:16 2019 -0700 rtnetlink: skip metrics loop for dst_default_metrics dst_default_metrics has all of the metrics initialized to 0, so nothing will be added to the skb in rtnetlink_put_metrics. Avoid the loop if metrics is from dst_default_metrics. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/core/rtnetlink.c | 4 ++++ 1 file changed, 4 insertions(+) commit 4191faa25384afee063568437b0b255ef0c75237 Merge: a8b79105239d 3ce7ee2c09d3 Author: David S. Miller Date: Wed Jun 26 13:05:42 2019 -0700 Merge branch 'skfp-cleanups' Puranjay Mohan says: ==================== net: fddi: skfp: Use PCI generic definitions instead of private duplicates This patch series removes the private duplicates of PCI definitions in favour of generic definitions defined in pci_regs.h. This driver only uses some of the generic PCI definitons, which are included from pci_regs.h and thier private versions are removed from skfbi.h with all other private defines. The skfbi.h defines PCI_REV_ID and other private defines with different names, these are renamed to Generic PCI names to make them compatible with defines in pci_regs.h. All unused defines are removed from skfbi.h. Changes in v5: Removed unused PCI definitions which were left in v4 Changes in v4: Removed unused PCI definitions which were left in v3 Changes in v3: Renamed all local PCI definitions to Generic names. Corrected coding style mistakes. Changes in v2: Converted individual patches to a series. Made sure that individual patches build correctly ==================== Signed-off-by: David S. Miller commit 3ce7ee2c09d37c4e709aac667ec8067bc1e128eb Author: Puranjay Mohan Date: Fri Jun 21 21:10:37 2019 +0530 net: fddi: skfp: Remove unused private PCI definitions Remove unused private PCI definitions from skfbi.h because generic PCI symbols are already included from pci_regs.h. Signed-off-by: Puranjay Mohan Signed-off-by: David S. Miller drivers/net/fddi/skfp/h/skfbi.h | 225 +--------------------------------------- 1 file changed, 1 insertion(+), 224 deletions(-) commit a08f1c438bc49fafbc00d38acdfb0edde5de640b Author: Puranjay Mohan Date: Fri Jun 21 21:10:36 2019 +0530 net: fddi: skfp: Include generic PCI definitions Include the uapi/linux/pci_regs.h header file which contains the generic PCI defines. Signed-off-by: Puranjay Mohan Signed-off-by: David S. Miller drivers/net/fddi/skfp/drvfbi.c | 1 + 1 file changed, 1 insertion(+) commit f8da5dac7e5eebb8da93829eeb988cc37410c9e6 Author: Puranjay Mohan Date: Fri Jun 21 21:10:35 2019 +0530 net: fddi: skfp: Rename local PCI defines to match generic PCI defines Rename the PCI_REV_ID and other local defines to Generic PCI define names in skfbi.h and drvfbi.c to make it compatible with the pci_regs.h. Signed-off-by: Puranjay Mohan Signed-off-by: David S. Miller drivers/net/fddi/skfp/drvfbi.c | 2 +- drivers/net/fddi/skfp/h/skfbi.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 9b242610514fe387ef957bce05e1fdd3efd60359 Author: David Howells Date: Wed Jun 26 21:02:33 2019 +0100 keys: Network namespace domain tag Create key domain tags for network namespaces and make it possible to automatically tag keys that are used by networked services (e.g. AF_RXRPC, AFS, DNS) with the default network namespace if not set by the caller. This allows keys with the same description but in different namespaces to coexist within a keyring. Signed-off-by: David Howells cc: netdev@vger.kernel.org cc: linux-nfs@vger.kernel.org cc: linux-cifs@vger.kernel.org cc: linux-afs@lists.infradead.org include/linux/key-type.h | 3 +++ include/net/net_namespace.h | 3 +++ net/core/net_namespace.c | 20 ++++++++++++++++++++ net/dns_resolver/dns_key.c | 1 + net/rxrpc/key.c | 2 ++ security/keys/keyring.c | 7 ++++++- 6 files changed, 35 insertions(+), 1 deletion(-) commit 218e6424e711ceee31eeba93212fed8ee92d6a11 Author: David Howells Date: Wed Jun 26 21:02:32 2019 +0100 keys: Garbage collect keys for which the domain has been removed If a key operation domain (such as a network namespace) has been removed then attempt to garbage collect all the keys that use it. Signed-off-by: David Howells include/linux/key.h | 2 ++ security/keys/internal.h | 3 ++- security/keys/keyring.c | 15 +++++++++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) commit 3b6e4de05e9ee2e2f94e4a3fe14d945e2418d9a8 Author: David Howells Date: Wed Jun 26 21:02:32 2019 +0100 keys: Include target namespace in match criteria Currently a key has a standard matching criteria of { type, description } and this is used to only allow keys with unique criteria in a keyring. This means, however, that you cannot have keys with the same type and description but a different target namespace in the same keyring. This is a potential problem for a containerised environment where, say, a container is made up of some parts of its mount space involving netfs superblocks from two different network namespaces. This is also a problem for shared system management keyrings such as the DNS records keyring or the NFS idmapper keyring that might contain keys from different network namespaces. Fix this by including a namespace component in a key's matching criteria. Keyring types are marked to indicate which, if any, namespace is relevant to keys of that type, and that namespace is set when the key is created from the current task's namespace set. The capability bit KEYCTL_CAPS1_NS_KEY_TAG is set if the kernel is employing this feature. Signed-off-by: David Howells include/linux/key.h | 10 ++++++++++ include/uapi/linux/keyctl.h | 1 + security/keys/gc.c | 2 +- security/keys/key.c | 1 + security/keys/keyctl.c | 3 ++- security/keys/keyring.c | 36 ++++++++++++++++++++++++++++++++++-- security/keys/persistent.c | 1 + 7 files changed, 50 insertions(+), 4 deletions(-) commit 0f44e4d976f96c6439da0d6717238efa4b91196e Author: David Howells Date: Wed Jun 26 21:02:32 2019 +0100 keys: Move the user and user-session keyrings to the user_namespace Move the user and user-session keyrings to the user_namespace struct rather than pinning them from the user_struct struct. This prevents these keyrings from propagating across user-namespaces boundaries with regard to the KEY_SPEC_* flags, thereby making them more useful in a containerised environment. The issue is that a single user_struct may be represent UIDs in several different namespaces. The way the patch does this is by attaching a 'register keyring' in each user_namespace and then sticking the user and user-session keyrings into that. It can then be searched to retrieve them. Signed-off-by: David Howells cc: Jann Horn include/linux/sched/user.h | 14 --- include/linux/user_namespace.h | 9 +- kernel/user.c | 7 +- kernel/user_namespace.c | 4 +- security/keys/internal.h | 3 +- security/keys/keyring.c | 1 + security/keys/persistent.c | 8 +- security/keys/process_keys.c | 259 ++++++++++++++++++++++++++--------------- security/keys/request_key.c | 20 ++-- 9 files changed, 196 insertions(+), 129 deletions(-) commit b206f281d0ee14969878469816a69db22d5838e8 Author: David Howells Date: Wed Jun 26 21:02:32 2019 +0100 keys: Namespace keyring names Keyring names are held in a single global list that any process can pick from by means of keyctl_join_session_keyring (provided the keyring grants Search permission). This isn't very container friendly, however. Make the following changes: (1) Make default session, process and thread keyring names begin with a '.' instead of '_'. (2) Keyrings whose names begin with a '.' aren't added to the list. Such keyrings are system specials. (3) Replace the global list with per-user_namespace lists. A keyring adds its name to the list for the user_namespace that it is currently in. (4) When a user_namespace is deleted, it just removes itself from the keyring name list. The global keyring_name_lock is retained for accessing the name lists. This allows (4) to work. This can be tested by: # keyctl newring foo @s 995906392 # unshare -U $ keyctl show ... 995906392 --alswrv 65534 65534 \_ keyring: foo ... $ keyctl session foo Joined session keyring: 935622349 As can be seen, a new session keyring was created. The capability bit KEYCTL_CAPS1_NS_KEYRING_NAME is set if the kernel is employing this feature. Signed-off-by: David Howells cc: Eric W. Biederman include/linux/key.h | 2 + include/linux/user_namespace.h | 5 +++ include/uapi/linux/keyctl.h | 1 + kernel/user.c | 3 ++ kernel/user_namespace.c | 7 +-- security/keys/keyctl.c | 3 +- security/keys/keyring.c | 99 ++++++++++++++++++------------------------ 7 files changed, 60 insertions(+), 60 deletions(-) commit dcf49dbc8077e278ddd1bc7298abc781496e8a08 Author: David Howells Date: Wed Jun 26 21:02:32 2019 +0100 keys: Add a 'recurse' flag for keyring searches Add a 'recurse' flag for keyring searches so that the flag can be omitted and recursion disabled, thereby allowing just the nominated keyring to be searched and none of the children. Signed-off-by: David Howells Documentation/security/keys/core.rst | 10 ++++++---- certs/blacklist.c | 2 +- crypto/asymmetric_keys/asymmetric_type.c | 2 +- include/linux/key.h | 3 ++- lib/digsig.c | 2 +- net/rxrpc/security.c | 2 +- security/integrity/digsig_asymmetric.c | 4 ++-- security/keys/internal.h | 1 + security/keys/keyctl.c | 2 +- security/keys/keyring.c | 12 ++++++++++-- security/keys/proc.c | 3 ++- security/keys/process_keys.c | 3 ++- security/keys/request_key.c | 3 ++- security/keys/request_key_auth.c | 3 ++- 14 files changed, 34 insertions(+), 18 deletions(-) commit 355ef8e15885020da88f5ba2d85ce42b1d01f537 Author: David Howells Date: Wed Jun 26 21:02:32 2019 +0100 keys: Cache the hash value to avoid lots of recalculation Cache the hash of the key's type and description in the index key so that we're not recalculating it every time we look at a key during a search. The hash function does a bunch of multiplications, so evading those is probably worthwhile - especially as this is done for every key examined during a search. This also allows the methods used by assoc_array to get chunks of index-key to be simplified. Signed-off-by: David Howells include/linux/key.h | 3 +++ security/keys/internal.h | 8 +------- security/keys/key.c | 2 +- security/keys/keyring.c | 28 ++++++++++++++++++++-------- 4 files changed, 25 insertions(+), 16 deletions(-) commit f771fde82051976a6fc0fd570f8b86de4a92124b Author: David Howells Date: Wed Jun 26 21:02:31 2019 +0100 keys: Simplify key description management Simplify key description management by cramming the word containing the length with the first few chars of the description also. This simplifies the code that generates the index-key used by assoc_array. It should speed up key searching a bit too. Signed-off-by: David Howells include/linux/key.h | 14 +++++++++- security/keys/internal.h | 6 ++++ security/keys/key.c | 2 ++ security/keys/keyring.c | 70 ++++++++++++++-------------------------------- security/keys/persistent.c | 1 + 5 files changed, 43 insertions(+), 50 deletions(-) commit 3b8c4a08a471d56ecaaca939c972fdf5b8255629 Author: David Howells Date: Wed Jun 19 16:10:16 2019 +0100 keys: Kill off request_key_async{,_with_auxdata} Kill off request_key_async{,_with_auxdata}() as they're not currently used. Signed-off-by: David Howells Documentation/security/keys/core.rst | 32 ------------------ Documentation/security/keys/request-key.rst | 23 ++----------- include/linux/key.h | 11 ------- security/keys/request_key.c | 50 ----------------------------- 4 files changed, 2 insertions(+), 114 deletions(-) commit 89e7854fcd5a9d9030faf47cf0244ecc4d097628 Author: kbuild test robot Date: Sat May 11 02:03:47 2019 +0800 power: supply: fix semicolon.cocci warnings drivers/power/supply/ucs1002_power.c:339:2-3: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Fixes: 9a2688e42638 ("power: supply: Add driver for Microchip UCS1002") CC: Andrey Smirnov Signed-off-by: kbuild test robot Signed-off-by: Sebastian Reichel drivers/power/supply/ucs1002_power.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2ad7a0cc8f8ec37b2f65f6990faae7dec0058d55 Merge: 3726112ec731 16d4b74654ff Author: Jens Axboe Date: Wed Jun 26 13:49:01 2019 -0600 Merge branch 'md-next' of https://github.com/liu-song-6/linux into for-5.3/block Pull single MD warning fix from Song. * 'md-next' of https://github.com/liu-song-6/linux: md/raid1: Fix a warning message in remove_wb() commit 16d4b74654ff7c3c5d0b6446278ef51b1de41484 Author: Dan Carpenter Date: Wed Jun 26 12:42:51 2019 +0300 md/raid1: Fix a warning message in remove_wb() The WARN_ON() macro doesn't take an error message, it just takes a condition. I've changed this to use WARN(1, "...") instead. Fixes: 3e148a320979 ("md/raid1: fix potential data inconsistency issue with write behind device") Signed-off-by: Dan Carpenter Signed-off-by: Song Liu drivers/md/raid1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 92ab1eb392c6ac6f7fdeee4bfdfb39aa860a371f Author: Jianbo Liu Date: Tue Jun 25 17:48:14 2019 +0000 net/mlx5: E-Switch, Enable vport metadata matching if firmware supports it As the ingress ACL rules save vhca id and vport number to packet's metadata REG_C_0, and the metadata matching for the rules in both fast path and slow path are all added, enable this feature if supported. Signed-off-by: Jianbo Liu Reviewed-by: Roi Dayan Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 669ff1e32f334e6a09e523db94989b96da4a4710 Author: Jianbo Liu Date: Tue Jun 25 17:48:12 2019 +0000 RDMA/mlx5: Add vport metadata matching for IB representors If vport metadata matching is enabled in eswitch, the rule created must be changed to match on the metadata, instead of source port. Signed-off-by: Jianbo Liu Reviewed-by: Roi Dayan Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed drivers/infiniband/hw/mlx5/main.c | 45 +++++++++++++++++++++++++++++++-------- 1 file changed, 36 insertions(+), 9 deletions(-) commit a5641cb524cd023c5fafbe41891c8ec510b65f3b Author: Jianbo Liu Date: Tue Jun 25 17:48:09 2019 +0000 net/mlx5: E-Switch, Add match on vport metadata for rule in slow path In slow path, packet that not matched by any offloaded rule is forwarded to eswitch vport manager for further processing. Add matching on metadata for peer miss rules in FDB, and rules which forward packet to correct representor in esw manager NIC_RX table. Signed-off-by: Jianbo Liu Reviewed-by: Eli Britstein Reviewed-by: Roi Dayan Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 142 ++++++++++++++++----- 1 file changed, 107 insertions(+), 35 deletions(-) commit c1286050cf47170fbce7edc3787ab577a882863b Author: Jianbo Liu Date: Tue Jun 25 17:48:07 2019 +0000 net/mlx5: E-Switch, Pass metadata from FDB to eswitch manager In order to do matching on metadata in slow path when demuxing traffic to representors, explicitly enable the feature that allows HW to pass metadata REG_C_0 from FDB to eswitch manager NIC_RX table. Signed-off-by: Jianbo Liu Reviewed-by: Roi Dayan Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 64 ++++++++++++++++++++++ 1 file changed, 64 insertions(+) commit 57843868700162922963baa69fc049a0256aeed2 Author: Jianbo Liu Date: Tue Jun 25 17:48:05 2019 +0000 net/mlx5: E-Switch, Add query and modify esw vport context functions Add esw vport query and modify functions, and exposing them is needed for enabling or disabling registers passed as metatdata to vport NIC_RX table in slow path. Signed-off-by: Jianbo Liu Reviewed-by: Roi Dayan Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 24 +++++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 5 +++++ 2 files changed, 29 insertions(+) commit c01cfd0f111511f005ac9c2608556a02b012a2dc Author: Jianbo Liu Date: Tue Jun 25 17:48:04 2019 +0000 net/mlx5: E-Switch, Add match on vport metadata for rule in fast path If FW's capabilities and configurations meet the requirement of vport metadata matching, this feature will be used. As the information about vport number and vhca_id related to packet is already stored to its metadata register, which is used as an indicator for perticular vport, now we can change to match on this metadata for all the offloading rules in fast path. Signed-off-by: Jianbo Liu Reviewed-by: Eli Britstein Reviewed-by: Roi Dayan Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 85 +++++++++++++--------- 1 file changed, 51 insertions(+), 34 deletions(-) commit 8d212ff057f8b81ed6ed418874b54ded3bf97ad4 Author: Jianbo Liu Date: Tue Jun 25 17:48:02 2019 +0000 net/mlx5e: Specifying known origin of packets matching the flow In vport metadata matching, source port number is replaced by metadata. While FW has no idea about what it is in the metadata, a syndrome will happen. Specify a known origin to avoid the syndrome. However, there is no functional change because ANY_VPORT (0) is filled in flow_source, the same default value as before, as a pre-step towards metadata matching for fast path. There are two other values can be filled in flow_source. When setting 0x1, packet matching this rule is from uplink, while 0x2 is for packet from other local vports. Signed-off-by: Jianbo Liu Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/diag/fs_tracepoint.h | 2 ++ drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c | 3 +++ include/linux/mlx5/fs.h | 1 + 3 files changed, 6 insertions(+) commit 7445cfb1169cebf8f79763acf65f85d850850461 Author: Jianbo Liu Date: Tue Jun 25 17:48:00 2019 +0000 net/mlx5: E-Switch, Tag packet with vport number in VF vports and uplink ingress ACLs When a dual-port VHCA sends a RoCE packet on its non-native port, and the packet arrives to its affiliated vport FDB, a mismatch might occur on the rules that match the packet source vport as it is not represented by single VHCA only in this case. So we change to match on metadata instead of source vport. To do that, a rule is created in all vports and uplink ingress ACLs, to save the source vport number and vhca id in the packet's metadata in order to match on it later. The metadata register used is the first of the 32-bit type C registers. It can be used for matching and header modify operations. The higher 16 bits of this register are for vhca id, and the lower 16 ones is for vport number. This change is not for dual-port RoCE only. If HW and FW allow, the vport metadata matching is enabled by default. Signed-off-by: Jianbo Liu Reviewed-by: Eli Britstein Reviewed-by: Roi Dayan Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 2 + drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 9 ++ .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 180 ++++++++++++++++----- include/linux/mlx5/eswitch.h | 17 ++ 4 files changed, 172 insertions(+), 36 deletions(-) commit bb0ee7dcc4ecd6af39823b80ae3995ddc119c373 Author: Jianbo Liu Date: Tue Jun 25 17:47:58 2019 +0000 net/mlx5: Add flow context for flow tag Refactor the flow data structures, add new flow_context and move flow_tag into it, as flow_tag doesn't belong to the rule action. Signed-off-by: Jianbo Liu Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed drivers/infiniband/hw/mlx5/flow.c | 13 +++++---- drivers/infiniband/hw/mlx5/main.c | 30 ++++++++++++------- drivers/infiniband/hw/mlx5/mlx5_ib.h | 1 + .../mellanox/mlx5/core/diag/fs_tracepoint.h | 2 +- .../ethernet/mellanox/mlx5/core/en_fs_ethtool.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 7 +++-- .../net/ethernet/mellanox/mlx5/core/fpga/ipsec.c | 8 +++-- drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c | 3 +- drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 34 +++++++++++----------- drivers/net/ethernet/mellanox/mlx5/core/fs_core.h | 1 + include/linux/mlx5/fs.h | 15 +++++++--- 11 files changed, 71 insertions(+), 45 deletions(-) commit 91d6291c4e544408e90e606bbaace88923d84167 Author: Parav Pandit Date: Tue Jun 25 17:47:56 2019 +0000 net/mlx5: Introduce a helper API to check VF vport Introduce a helper API mlx5_eswitch_is_vf_vport() to check if a given vport_num belongs to VF or not. Signed-off-by: Parav Pandit Reviewed-by: Jianbo Liu Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 2 ++ drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 6 ++++++ 2 files changed, 8 insertions(+) commit 84b0d6a7a11ec976da347d50de9d5a556743de16 Author: Jianbo Liu Date: Tue Jun 25 17:47:54 2019 +0000 net/mlx5: Support allocating modify header context from ingress ACL That modify header action can be then attached to a steering rule in the ingress ACL. Signed-off-by: Jianbo Liu Reviewed-by: Eli Britstein Reviewed-by: Roi Dayan Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c | 4 ++++ 1 file changed, 4 insertions(+) commit f53297d67800feb5fafd94abd926c889aefee690 Author: Jianbo Liu Date: Tue Jun 25 17:47:52 2019 +0000 net/mlx5: Get vport ACL namespace by vport index The ingress and egress ACL root namespaces are created per vport and stored into arrays. However, the vport number is not the same as the index. Passing the array index, instead of vport number, to get the correct ingress and egress acl namespace. Fixes: 9b93ab981e3b ("net/mlx5: Separate ingress/egress namespaces for each vport") Signed-off-by: Jianbo Liu Reviewed-by: Oz Shlomo Reviewed-by: Eli Britstein Reviewed-by: Roi Dayan Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 65c0f2c1663649217455a73d48b1c303f133180a Author: Jianbo Liu Date: Tue Jun 25 17:47:50 2019 +0000 net/mlx5: Introduce vport metadata matching bits and enum constants When a dual-port VHCA sends a RoCE packet on its non-native port, and the packet arrives to its affiliated vport FDB, a mismatch might occur on the rules that match the packet source vport. So we replace the match on source port with the match on metadata that was configured in ingress ACL, and that metadata will be passed further also to the NIC RX table of the eswitch manager. Introduce vport metadata matching bits and enum constants as a pre-step towards metadata matching. o metadata type C registers in the misc parameters 2 fields. o esw_uplink_ingress_acl bit in esw cap. If it set, the device supports ingress ACL for the uplink vport. o fdb_to_vport_reg_* bits in flow table cap and esw vport context, to support propagating the metadata to the nic rx through the loopback path. o flow_source in flow context, to indicate the known origin of packets. o enum constants, to support the above bits. Signed-off-by: Jianbo Liu Reviewed-by: Eli Britstein Reviewed-by: Roi Dayan Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed include/linux/mlx5/mlx5_ifc.h | 56 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 49 insertions(+), 7 deletions(-) commit 04bcc4275e601d5928beaf21e888017d4b7ad3d1 Author: Claudiu Beznea Date: Tue May 21 10:11:33 2019 +0000 clk: at91: sckc: add support for SAM9X60 Add support for SAM9X60's slow clock. Signed-off-by: Claudiu Beznea Acked-by: Alexandre Belloni Signed-off-by: Stephen Boyd drivers/clk/at91/sckc.c | 74 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) commit b36d5cf75342e27bd1272971b69a3bbb42eae03b Author: Claudiu Beznea Date: Tue May 21 10:11:29 2019 +0000 dt-bindings: clk: at91: add bindings for SAM9X60's slow clock controller Add bindings for SAM9X60's slow clock controller. Signed-off-by: Claudiu Beznea Reviewed-by: Alexandre Belloni Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd Documentation/devicetree/bindings/clock/at91-clock.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit abaceffc88ebf510ffb95380985cb3da16d7aa9d Author: Claudiu Beznea Date: Tue May 21 10:11:26 2019 +0000 clk: at91: sckc: add support to specify registers bit offsets Different IPs uses different bit offsets in registers for the same functionality, thus adapt the driver to support this. Signed-off-by: Claudiu Beznea Acked-by: Alexandre Belloni Signed-off-by: Stephen Boyd drivers/clk/at91/sckc.c | 93 ++++++++++++++++++++++++++++++++----------------- 1 file changed, 61 insertions(+), 32 deletions(-) commit 5cf6d876a7d05fdd893c74b4c274bbe78fbe9698 Author: Claudiu Beznea Date: Tue May 21 10:11:22 2019 +0000 clk: at91: sckc: sama5d4 has no bypass support The slow clock of SAMA5D4 has no bypass support thus remove it. Signed-off-by: Claudiu Beznea Acked-by: Alexandre Belloni Signed-off-by: Stephen Boyd drivers/clk/at91/sckc.c | 6 ------ 1 file changed, 6 deletions(-) commit 78f529695182b980a5183b850fe2d87091e36874 Author: Chunyan Zhang Date: Wed May 22 09:15:02 2019 +0800 clk: sprd: Check error only for devm_regmap_init_mmio() The function devm_regmap_init_mmio() wouldn't return NULL pointer for now, so only need to ensure the return value is not an error code. Signed-off-by: Chunyan Zhang Reviewed-by: Baolin Wang Signed-off-by: Stephen Boyd drivers/clk/sprd/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 69b39d2503af55e3a2ac3130c95855ac185bb70d Author: Chunyan Zhang Date: Wed May 22 09:15:01 2019 +0800 clk: sprd: Switch from of_iomap() to devm_ioremap_resource() devm_ioremap_resources() automatically requests resources and devm_ wrappers do better error handling and unmapping of the I/O region when needed, that would make drivers more clean and simple. Signed-off-by: Chunyan Zhang Reviewed-by: Baolin Wang Signed-off-by: Stephen Boyd drivers/clk/sprd/common.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 6e88559470f581741bcd0f2794f9054814ac9740 Author: Tim Chen Date: Thu Jun 20 16:10:50 2019 -0700 Documentation: Add section about CPU vulnerabilities for Spectre Add documentation for Spectre vulnerability and the mitigation mechanisms: - Explain the problem and risks - Document the mitigation mechanisms - Document the command line controls - Document the sysfs files Co-developed-by: Andi Kleen Signed-off-by: Andi Kleen Co-developed-by: Tim Chen Signed-off-by: Tim Chen Reviewed-by: Randy Dunlap Reviewed-by: Thomas Gleixner Cc: stable@vger.kernel.org Signed-off-by: Jonathan Corbet Documentation/admin-guide/hw-vuln/index.rst | 1 + Documentation/admin-guide/hw-vuln/spectre.rst | 697 ++++++++++++++++++++++++++ Documentation/userspace-api/spec_ctrl.rst | 2 + 3 files changed, 700 insertions(+) commit 163ede97a9a29604c3a8afbf22ae0599f5148621 Author: Puranjay Mohan Date: Fri Jun 21 00:08:27 2019 +0530 Documentation: platform: Delete x86-laptop-drivers.txt The list of laptops supported by drivers in PDx86 subsystem is quite big and growing. x86-laptop-drivers.txt contains details of very few laptop models. Remove it because it does not serve any purpose. Signed-off-by: Puranjay Mohan Acked-by: Andy Shevchenko Signed-off-by: Jonathan Corbet Documentation/platform/x86-laptop-drivers.txt | 18 ------------------ 1 file changed, 18 deletions(-) commit 93651f80dcb616b8c9115cdafc8e57a781af22d0 Author: Yang Yingliang Date: Tue Jun 25 17:40:28 2019 +0800 modules: fix compile error if don't have strict module rwx If CONFIG_ARCH_HAS_STRICT_MODULE_RWX is not defined, we need stub for module_enable_nx() and module_enable_x(). If CONFIG_ARCH_HAS_STRICT_MODULE_RWX is defined, but CONFIG_STRICT_MODULE_RWX is disabled, we need stub for module_enable_nx. Move frob_text() outside of the CONFIG_STRICT_MODULE_RWX, because it is needed anyway. Fixes: 2eef1399a866 ("modules: fix BUG when load module with rodata=n") Signed-off-by: Yang Yingliang Signed-off-by: Jessica Yu kernel/module.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit d9d7c0c497b8e2ffd9fe26cc96a49ed2d69d8b75 Author: Jonathan Corbet Date: Wed Jun 26 11:20:21 2019 -0600 docs: Note that :c:func: should no longer be used Now that we can mark up function() automatically, there is no reason to use :c:func: and every reason to avoid it. Adjust the documentation to reflect that fact. Signed-off-by: Jonathan Corbet Documentation/doc-guide/sphinx.rst | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 344fdb28a0dfac2e42925f149029748b34d2effa Author: Jonathan Corbet Date: Fri Jun 21 17:34:30 2019 -0600 kernel-doc: Don't try to mark up function names We now have better automarkup in sphinx itself and, besides, this markup was incorrect and left :c:func: gunk in the processed docs. Sort of discouraging that nobody ever noticed...:) As a first step toward the removal of impenetrable regex magic from kernel-doc it's a tiny one, but you have to start somewhere. Signed-off-by: Jonathan Corbet scripts/kernel-doc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c79df7f0312e883f17a7b1c2352d1511362354c Author: Jonathan Corbet Date: Thu Apr 25 13:48:13 2019 -0600 docs: remove :c:func: annotations from xarray.rst Now that the build system automatically marks up function references, we don't have to clutter the source files, so take it out. [Some paragraphs could now benefit from refilling, but that was left out to avoid obscuring the real changes.] Acked-by: Matthew Wilcox Signed-off-by: Jonathan Corbet Documentation/core-api/xarray.rst | 270 +++++++++++++++++++------------------- 1 file changed, 135 insertions(+), 135 deletions(-) commit d74b0d31dddeac2b44c715588d53d9a1e5b1158e Author: Jonathan Corbet Date: Thu Apr 25 07:55:07 2019 -0600 Docs: An initial automarkup extension for sphinx Rather than fill our text files with :c:func:`function()` syntax, just do the markup via a hook into the sphinx build process. Signed-off-by: Jonathan Corbet Documentation/conf.py | 3 +- Documentation/sphinx/automarkup.py | 93 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 95 insertions(+), 1 deletion(-) commit a8b79105239d3aecdf4942f7e53a14e0842dd5d2 Merge: 177d935a1370 e5db0ad7563c Author: David S. Miller Date: Wed Jun 26 10:12:17 2019 -0700 Merge tag 'wireless-drivers-next-for-davem-2019-06-26' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valu says: ==================== wireless-drivers-next patches for 5.3 First set of patches for 5.3, but not that many patches this time. This pull request fails to compile with the tip tree due to ktime_get_boot_ns() API changes there. It should be easy for Linus to fix it in p54 driver once he pulls this, an example resolution here: https://lkml.kernel.org/r/20190625160432.533aa140@canb.auug.org.au Major changes: airo * switch to use skcipher interface p54 * support boottime in scan results rtw88 * add fast xmit support * add random mac address on scan support rt2x00 * add software watchdog to detect hangs, it's disabled by default ==================== Signed-off-by: David S. Miller commit 1dc78f1ffa3a386b986b659884952d816021f38f Author: Qiuxu Zhuo Date: Wed Jun 26 14:16:55 2019 +0800 EDAC, skx, i10nm: Fix source ID register offset The source ID register offset for Skylake server is 0xf0, while for Icelake server is 0xf8. Pass the correct offset to get the source ID. Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck drivers/edac/i10nm_base.c | 2 +- drivers/edac/skx_base.c | 2 +- drivers/edac/skx_common.c | 4 ++-- drivers/edac/skx_common.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) commit c4a1dd9e83ceceef6ffba82b8b274ab9b929ea14 Author: Qiuxu Zhuo Date: Wed Jun 26 14:16:38 2019 +0800 EDAC, i10nm: Check ECC enabling status per channel The i10nm_edac only checks the ECC enabling status for the first channel of the memory controller. If there aren't memory DIMMs populated on the first channel, but at least one DIMM populated on the second channel, it will wrongly report that the ECC for the memory controller is disabled that fails to load the i10nm_edac driver. Fix it by checking ECC enabling status per channel. [Tony: Also report which channel has ECC disabled] Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck drivers/edac/i10nm_base.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7b71665603bba0fa53e2cd63de9125a0bc3f6e17 Author: jinho lim Date: Wed Jun 26 20:50:13 2019 +0900 arm64: rename dump_instr as dump_kernel_instr In traps.c, only __die calls dump_instr. However, this function has sub-function as __dump_instr. dump_kernel_instr can replace those functions. By using aarch64_insn_read, it does not have to change fs to KERNEL_DS. Acked-by: Will Deacon Signed-off-by: jinho lim Signed-off-by: Catalin Marinas arch/arm64/kernel/traps.c | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) commit fae6cad17ce39b4c03e5c9f2315d2e511a1c8cb4 Author: Gustavo A. R. Silva Date: Wed Jun 5 10:40:52 2019 -0500 i40e/i40e_virtchnl_pf: Use struct_size() in kzalloc() One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct virtchnl_iwarp_qvlist_info { ... struct virtchnl_iwarp_qv_info qv_info[1]; }; size = sizeof(struct virtchnl_iwarp_qvlist_info) + (sizeof(struct virtchnl_iwarp_qv_info) * count; instance = kzalloc(size, GFP_KERNEL); and struct virtchnl_vf_resource { ... struct virtchnl_vsi_resource vsi_res[1]; }; size = sizeof(struct virtchnl_vf_resource) + sizeof(struct virtchnl_vsi_resource) * count; instance = kzalloc(size, GFP_KERNEL); Instead of leaving these open-coded and prone to type mistakes, we can now use the new struct_size() helper: instance = kzalloc(struct_size(instance, qv_info, count), GFP_KERNEL); and instance = kzalloc(struct_size(instance, vsi_res, count), GFP_KERNEL); Notice that, in the first case above, variable size is not necessary, hence it is removed. This code was detected with the help of Coccinelle. Signed-off-by: "Gustavo A. R. Silva" Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 559ac25c89adaaed4238c9909fa7f729c91b1f16 Author: Alice Michael Date: Tue May 28 10:59:21 2019 -0700 i40e: update copyright string It was found that the string that prints our copyright was not up to date. Updating to reflect our copyright. Signed-off-by: Alice Michael Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 15369ac3e397771e98cd9bef41ce749fa72022ea Author: Maciej Fijalkowski Date: Tue May 28 10:59:20 2019 -0700 i40e: Fix descriptor count manipulation Changing descriptor count via 'ethtool -G' is not persistent across resets. When PF reset occurs, we roll back to the default value of vsi->num_desc, which is used then in i40e_alloc_rings to set descriptor count. XDP does a PF reset so when user has changed the descriptor count and load XDP program, the default count will be back there. To fix this: * introduce new VSI members - num_tx_desc and num_rx_desc in favour of num_desc * set them in i40e_set_ringparam to user's values * set them to default values in i40e_set_num_rings_in_vsi only when they don't have previous values Signed-off-by: Maciej Fijalkowski Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 3 ++- drivers/net/ethernet/intel/i40e/i40e_debugfs.c | 5 ++-- drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 4 +++ drivers/net/ethernet/intel/i40e/i40e_main.c | 36 ++++++++++++++++++-------- 4 files changed, 34 insertions(+), 14 deletions(-) commit ee02865e4a45abf0651ba015aea455e690e0aec7 Author: Aleksandr Loktionov Date: Tue May 28 10:59:19 2019 -0700 i40e: missing priorities for any QoS traffic This patch fixes reading f/w LLDP agent status at DCB init time. It's done by removing direct NVM reading in i40e_update_dcb_config() and checking whether f/w LLDP agent is disabled via I40E_FLAG_DISABLE_FW_LLDP flag in i40e_init_pf_dcb(). The function i40e_update_dcb_config() in i40e_main.c is a temporary solution which will be later renamed to i40e_init_dcb() in the i40e_dcb module. Also logging was extended to make visible if f/w LLDP agent is running or not and always log a message when DCB was not initialized. Without this patch for new f/w versions f/w LLDP agent status was always read from NVM as disabled and DCB initialization failed without clear reason in logs. Signed-off-by: Aleksandr Loktionov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 57 +++++++++++++++++++++++++++-- 1 file changed, 54 insertions(+), 3 deletions(-) commit d47186e7ef9193eb95ce59290227eaf62e7c4f6d Author: Piotr Kwapulinski Date: Tue May 28 10:59:18 2019 -0700 i40e: Add log entry while creating or deleting TC0 Generate log entry when TC0 is created or deleted. Log entry is generated during main VSI setup. Before there was no log info about adding or deleting TC0. Signed-off-by: Piotr Kwapulinski Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 4 ++++ 1 file changed, 4 insertions(+) commit 4d607043fe60cf51e6c1aac50565b53202094a1a Author: Jacob Keller Date: Tue May 28 10:59:17 2019 -0700 i40e: fix incorrect function documentation comment Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_ptp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 6df9f13f4c2eef391491163c1a4c966aaee15205 Author: Martyna Szapar Date: Tue May 28 10:59:16 2019 -0700 i40e: Fix for missing "link modes" info in ethtool Fix for missing "Supported link modes" and "Advertised link modes" info in ethtool after changed speed on X722 devices with BASE-T PHY with FW API version >= 1.7. The same FW API version on X710 and X722 does not mean the same feature set so the change was needed as mac type of the device should also be checked instead of FW API version only. Signed-off-by: Martyna Szapar Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_common.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 4ae4916b56435d1d5066616120f9ff907bd96b86 Author: Aleksandr Loktionov Date: Tue May 28 10:59:15 2019 -0700 i40e: fix 'Unknown bps' in dmesg for 2.5Gb/5Gb speeds This patch fixes 'NIC Link is Up, Unknown bps' message in dmesg for 2.5Gb/5Gb speeds. This problem is fixed by adding constants for VIRTCHNL_LINK_SPEED_2_5GB and VIRTCHNL_LINK_SPEED_5GB cases in the i40e_virtchnl_link_speed() function. Signed-off-by: Aleksandr Loktionov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_prototype.h | 4 ++++ include/linux/avf/virtchnl.h | 4 ++++ 2 files changed, 8 insertions(+) commit e0f0be7dee97dfa01d5c90ab45c1302600604bda Author: Young Xiao <92siuyang@gmail.com> Date: Tue May 28 19:58:02 2019 +0800 ixgbevf: fix possible divide by zero in ixgbevf_update_itr The next call to ixgbevf_update_itr will continue to dynamically update ITR. Copy from commit bdbeefe8ea8c ("ixgbe: fix possible divide by zero in ixgbe_update_itr") Signed-off-by: Young Xiao <92siuyang@gmail.com> Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 3 +++ 1 file changed, 3 insertions(+) commit 655c91414579d7bb115a4f7898ee726fc18e0984 Author: Mauro S. M. Rodrigues Date: Thu May 23 16:11:12 2019 -0300 ixgbe: Check DDM existence in transceiver before access Some transceivers may comply with SFF-8472 but not implement the Digital Diagnostic Monitoring (DDM) interface described in it. The existence of such area is specified by bit 6 of byte 92, set to 1 if implemented. Currently, due to not checking this bit ixgbe fails trying to read SFP module's eeprom with the follow message: ethtool -m enP51p1s0f0 Cannot get Module EEPROM data: Input/output error Because it fails to read the additional 256 bytes in which it was assumed to exist the DDM data. This issue was noticed using a Mellanox Passive DAC PN 01FT738. The eeprom data was confirmed by Mellanox as correct and present in other Passive DACs in from other manufacturers. Signed-off-by: "Mauro S. M. Rodrigues" Reviewed-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 3 ++- drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) commit 177d935a13703eb809049c97c31a1e4d80b4cfbb Author: Jon Hunter Date: Wed Jun 26 11:23:22 2019 +0100 net: stmmac: Fix crash observed if PHY does not support EEE If the PHY does not support EEE mode, then a crash is observed when the ethernet interface is enabled. The crash occurs, because if the PHY does not support EEE, then although the EEE timer is never configured, it is still marked as enabled and so the stmmac ethernet driver is still trying to update the timer by calling mod_timer(). This triggers a BUG() in the mod_timer() because we are trying to update a timer when there is no callback function set because timer_setup() was never called for this timer. The problem is caused because we return true from the function stmmac_eee_init(), marking the EEE timer as enabled, even when we have not configured the EEE timer. Fix this by ensuring that we return false if the PHY does not support EEE and hence, 'eee_active' is not set. Fixes: 74371272f97f ("net: stmmac: Convert to phylink and remove phylib logic") Signed-off-by: Jon Hunter Tested-by: Thierry Reding Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 0867bb9768dedaae2c0e572ade5ccaa682a9298c Author: Jon Hunter Date: Wed Jun 26 11:23:21 2019 +0100 net: stmmac: Fix possible deadlock when disabling EEE support When stmmac_eee_init() is called to disable EEE support, then the timer for EEE support is stopped and we return from the function. Prior to stopping the timer, a mutex was acquired but in this case it is never released and so could cause a deadlock. Fix this by releasing the mutex prior to returning from stmmax_eee_init() when stopping the EEE timer. Fixes: 74371272f97f ("net: stmmac: Convert to phylink and remove phylib logic") Signed-off-by: Jon Hunter Tested-by: Thierry Reding Acked-by: Willem de Bruijn Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 1 + 1 file changed, 1 insertion(+) commit 3b525691529b01cbea03ce07e5df487da5e44a31 Author: Eric Dumazet Date: Wed Jun 26 03:05:28 2019 -0700 ipv6: fix suspicious RCU usage in rt6_dump_route() syzbot reminded us that rt6_nh_dump_exceptions() needs to be called with rcu_read_lock() net/ipv6/route.c:1593 suspicious rcu_dereference_check() usage! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 2 locks held by syz-executor609/8966: #0: 00000000b7dbe288 (rtnl_mutex){+.+.}, at: netlink_dump+0xe7/0xfb0 net/netlink/af_netlink.c:2199 #1: 00000000f2d87c21 (&(&tb->tb6_lock)->rlock){+...}, at: spin_lock_bh include/linux/spinlock.h:343 [inline] #1: 00000000f2d87c21 (&(&tb->tb6_lock)->rlock){+...}, at: fib6_dump_table.isra.0+0x37e/0x570 net/ipv6/ip6_fib.c:533 stack backtrace: CPU: 0 PID: 8966 Comm: syz-executor609 Not tainted 5.2.0-rc5+ #43 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x172/0x1f0 lib/dump_stack.c:113 lockdep_rcu_suspicious+0x153/0x15d kernel/locking/lockdep.c:5250 fib6_nh_get_excptn_bucket+0x18e/0x1b0 net/ipv6/route.c:1593 rt6_nh_dump_exceptions+0x45/0x4d0 net/ipv6/route.c:5541 rt6_dump_route+0x904/0xc50 net/ipv6/route.c:5640 fib6_dump_node+0x168/0x280 net/ipv6/ip6_fib.c:467 fib6_walk_continue+0x4a9/0x8e0 net/ipv6/ip6_fib.c:1986 fib6_walk+0x9d/0x100 net/ipv6/ip6_fib.c:2034 fib6_dump_table.isra.0+0x38a/0x570 net/ipv6/ip6_fib.c:534 inet6_dump_fib+0x93c/0xb00 net/ipv6/ip6_fib.c:624 rtnl_dump_all+0x295/0x490 net/core/rtnetlink.c:3445 netlink_dump+0x558/0xfb0 net/netlink/af_netlink.c:2244 __netlink_dump_start+0x5b1/0x7d0 net/netlink/af_netlink.c:2352 netlink_dump_start include/linux/netlink.h:226 [inline] rtnetlink_rcv_msg+0x73d/0xb00 net/core/rtnetlink.c:5182 netlink_rcv_skb+0x177/0x450 net/netlink/af_netlink.c:2477 rtnetlink_rcv+0x1d/0x30 net/core/rtnetlink.c:5237 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0x531/0x710 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x8ae/0xd70 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:665 sock_write_iter+0x27c/0x3e0 net/socket.c:994 call_write_iter include/linux/fs.h:1872 [inline] new_sync_write+0x4d3/0x770 fs/read_write.c:483 __vfs_write+0xe1/0x110 fs/read_write.c:496 vfs_write+0x20c/0x580 fs/read_write.c:558 ksys_write+0x14f/0x290 fs/read_write.c:611 __do_sys_write fs/read_write.c:623 [inline] __se_sys_write fs/read_write.c:620 [inline] __x64_sys_write+0x73/0xb0 fs/read_write.c:620 do_syscall_64+0xfd/0x680 arch/x86/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4401b9 Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 fb 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007ffc8e134978 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 00000000004401b9 RDX: 000000000000001c RSI: 0000000020000000 RDI: 00 Fixes: 1e47b4837f3b ("ipv6: Dump route exceptions if requested") Signed-off-by: Eric Dumazet Cc: Stefano Brivio Cc: David Ahern Reviewed-by: Stefano Brivio Signed-off-by: David S. Miller net/ipv6/route.c | 2 ++ 1 file changed, 2 insertions(+) commit 93ed54b15b2aae060c75ac00eb251ed02745eed1 Author: Eric Dumazet Date: Wed Jun 26 03:04:50 2019 -0700 ipv4: fix suspicious RCU usage in fib_dump_info_fnhe() sysbot reported that we lack appropriate rcu_read_lock() protection in fib_dump_info_fnhe() net/ipv4/route.c:2875 suspicious rcu_dereference_check() usage! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 1 lock held by syz-executor609/8966: #0: 00000000b7dbe288 (rtnl_mutex){+.+.}, at: netlink_dump+0xe7/0xfb0 net/netlink/af_netlink.c:2199 stack backtrace: CPU: 0 PID: 8966 Comm: syz-executor609 Not tainted 5.2.0-rc5+ #43 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x172/0x1f0 lib/dump_stack.c:113 lockdep_rcu_suspicious+0x153/0x15d kernel/locking/lockdep.c:5250 fib_dump_info_fnhe+0x9d9/0x1080 net/ipv4/route.c:2875 fn_trie_dump_leaf net/ipv4/fib_trie.c:2141 [inline] fib_table_dump+0x64a/0xd00 net/ipv4/fib_trie.c:2175 inet_dump_fib+0x83c/0xa90 net/ipv4/fib_frontend.c:1004 rtnl_dump_all+0x295/0x490 net/core/rtnetlink.c:3445 netlink_dump+0x558/0xfb0 net/netlink/af_netlink.c:2244 __netlink_dump_start+0x5b1/0x7d0 net/netlink/af_netlink.c:2352 netlink_dump_start include/linux/netlink.h:226 [inline] rtnetlink_rcv_msg+0x73d/0xb00 net/core/rtnetlink.c:5182 netlink_rcv_skb+0x177/0x450 net/netlink/af_netlink.c:2477 rtnetlink_rcv+0x1d/0x30 net/core/rtnetlink.c:5237 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0x531/0x710 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x8ae/0xd70 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:665 sock_write_iter+0x27c/0x3e0 net/socket.c:994 call_write_iter include/linux/fs.h:1872 [inline] new_sync_write+0x4d3/0x770 fs/read_write.c:483 __vfs_write+0xe1/0x110 fs/read_write.c:496 vfs_write+0x20c/0x580 fs/read_write.c:558 ksys_write+0x14f/0x290 fs/read_write.c:611 __do_sys_write fs/read_write.c:623 [inline] __se_sys_write fs/read_write.c:620 [inline] __x64_sys_write+0x73/0xb0 fs/read_write.c:620 do_syscall_64+0xfd/0x680 arch/x86/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4401b9 Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 fb 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007ffc8e134978 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 00000000004401b9 RDX: 000000000000001c RSI: 0000000020000000 RDI: 0000000000000003 RBP: 00000000006ca018 R08: 00000000004002c8 R09: 00000000004002c8 R10: 0000000000000010 R11: 0000000000000246 R12: 0000000000401a40 R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000 Fixes: ee28906fd7a1 ("ipv4: Dump route exceptions if requested") Signed-off-by: Eric Dumazet Cc: Stefano Brivio Cc: David Ahern Reported-by: syzbot Reviewed-by: Stefano Brivio Signed-off-by: David S. Miller net/ipv4/route.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit eb203bae834efc6aff05da49f61edda0f3bc3e01 Author: Jakub Kicinski Date: Tue Jun 25 09:59:56 2019 -0700 Revert "net: ena: ethtool: add extra properties retrieval via get_priv_flags" This reverts commit 315c28d2b714 ("net: ena: ethtool: add extra properties retrieval via get_priv_flags"). As discussed at netconf and on the mailing list we can't allow for the the abuse of private flags for exposing arbitrary device labels. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_admin_defs.h | 16 ----- drivers/net/ethernet/amazon/ena/ena_com.c | 56 ------------------ drivers/net/ethernet/amazon/ena/ena_com.h | 32 ---------- drivers/net/ethernet/amazon/ena/ena_ethtool.c | 75 ++++-------------------- drivers/net/ethernet/amazon/ena/ena_netdev.c | 14 ----- drivers/net/ethernet/amazon/ena/ena_netdev.h | 2 - 6 files changed, 11 insertions(+), 184 deletions(-) commit 1b2b01a779945f7371acabda1c73203e134dc16b Merge: 2f8776f0c5d3 bcf643c51434 Author: David S. Miller Date: Wed Jun 26 11:59:15 2019 -0400 Merge branch 'net-hns3-some-code-optimizations-bugfixes' Huazhong Tan says: ==================== net: hns3: some code optimizations & bugfixes This patch-set includes code optimizations and bugfixes for the HNS3 ethernet controller driver. [patch 1/11] fixes a selftest issue when doing autoneg. [patch 2/11 - 3-11] adds two code optimizations about VLAN issue. [patch 4/11] restores the MAC autoneg state after reset. [patch 5/11 - 8/11] adds some code optimizations and bugfixes about HW errors handling. [patch 9/11 - 11/11] fixes some issues related to driver loading and unloading. ==================== Signed-off-by: David S. Miller commit bcf643c51434e1f7930e3b951a406eb63c4c71f6 Author: Weihang Li Date: Thu Jun 20 16:52:45 2019 +0800 net: hns3: add exception handling when enable NIC HW error interrupts If we failed to enable NIC HW error interrupts during client initialization in some cases, we should do exception handling to clear flags and free the resources. Fixes: 00ea6e5fda9d ("net: hns3: delay and separate enabling of NIC and ROCE HW errors") Signed-off-by: Weihang Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 72fcd2bed719c6587dfea74e30bcdf6f9b64b18e Author: Huazhong Tan Date: Thu Jun 20 16:52:44 2019 +0800 net: hns3: fixes wrong place enabling ROCE HW error when loading The ROCE HW errors should only be enabled when initializing ROCE's client, the current code enable it no matter initializing NIC or ROCE client. So this patch fixes it. Fixes: 00ea6e5fda9d ("net: hns3: delay and separate enabling of NIC and ROCE HW errors") Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 7cf9c069430fce7142da7039cc453902df11259b Author: Huazhong Tan Date: Thu Jun 20 16:52:43 2019 +0800 net: hns3: fix race conditions between reset and module loading & unloading When loading or unloading module, it should wait for the reset task done before it un-initializes the client, otherwise the reset task may cause a NULL pointer reference. Signed-off-by: Huazhong Tan Signed-off-by: Peng Li Signed-off-by: David S. Miller .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 40 ++++++++++++++++++++++ .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h | 1 + 2 files changed, 41 insertions(+) commit 987b4ae78e4268d22b279f65d80cc541f9f0eb53 Author: Weihang Li Date: Thu Jun 20 16:52:42 2019 +0800 net: hns3: add check to number of buffer descriptors This patch adds check to number of bds before we allocate memory for them. If we get an invalid bd num in some cases, it will cause a memory overflow. Signed-off-by: Weihang Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller .../net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c | 86 +++++++++++++--------- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_err.h | 5 ++ 2 files changed, 58 insertions(+), 33 deletions(-) commit 9d5e67d1c191831da79f0a8bcff029151e3fe54b Author: Weihang Li Date: Thu Jun 20 16:52:41 2019 +0800 net: hns3: remove override_pci_need_reset We add override_pci_need_reset to prevent redundant and unwanted PF resets if a RAS error occurs in commit 69b51bbb03f7 ("net: hns3: fix to stop multiple HNS reset due to the AER changes"). Now in HNS3 driver, we use hw_err_reset_req to record reset level that we need to recover from a RAS error. This variable cans solve above issue as override_pci_need_reset, so this patch removes override_pci_need_reset. Signed-off-by: Weihang Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hnae3.h | 1 - drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 2 +- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c | 5 +---- 3 files changed, 2 insertions(+), 6 deletions(-) commit b4b9bd92fe3f1ad147f3fe753b4fe4d7726ec741 Author: Weihang Li Date: Thu Jun 20 16:52:40 2019 +0800 net: hns3: modify handling of out of memory in hclge_err.c Users should be informed if HNS driver failed to allocate memory for descriptor when handling hw errors. This patch solve above issues. Signed-off-by: Weihang Li Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 2253db16f8ec5710eccb540ac833995a6d1d7e19 Author: Weihang Li Date: Thu Jun 20 16:52:39 2019 +0800 net: hns3: code optimizaition of hclge_handle_hw_ras_error() This patch optimizes hclge_handle_hw_ras_error() to make the code logic clearer. 1. If there was no NIC or Roce RAS when we read HCLGE_RAS_PF_OTHER_INT_STS_REG, we return directly. 2. Because NIC and Roce RAS may occurs at the same time, so we should check value of revision at first before we handle Roce RAS instead of only checking it in branch of no NIC RAS is detected. 3. Check HCLGE_STATE_RST_HANDLING each time before we want to return PCI_ERS_RESULT_NEED_RESET. 4. Remove checking of HCLGE_RAS_REG_NFE_MASK and HCLGE_RAS_REG_ROCEE_ERR_MASK because if hw_err_reset_req is not zero, it proves that we have set it in handling of NIC or Roce RAS. Signed-off-by: Weihang Li Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller .../net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) commit d736fc6c68a5f76e89a6c2c4100e3678706003a3 Author: Jian Shen Date: Thu Jun 20 16:52:38 2019 +0800 net: hns3: restore the MAC autoneg state after reset When doing global reset, the MAC autoneg state of fibre port is set to default, which may cause user configuration lost. This patch fixes it by restore the MAC autoneg state after reset. Fixes: 22f48e24a23d ("net: hns3: add autoneg and change speed support for fibre port") Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit fe4144d47eef8453459c53a34e9d5940a3e6c219 Author: Jian Shen Date: Thu Jun 20 16:52:37 2019 +0800 net: hns3: sync VLAN filter entries when kill VLAN ID failed When HW is resetting, firmware is unable to handle commands from driver. So if remove VLAN device from stack at this time, it will fail to remove the VLAN ID from HW VLAN filter, then the VLAN filter status is unsynced with stack. This patch fixes it by recording the VLAN ID delete failed, and removes them again when reset complete. Fixes: 44e626f720c3 ("net: hns3: fix VLAN offload handle for VLAN inserted by port") Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 74 ++++++++++++++++++---- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h | 1 + .../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 50 ++++++++++++++- .../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h | 3 + 4 files changed, 112 insertions(+), 16 deletions(-) commit d0c31df22c5770a8cd7560d3c45ae936430e1ebf Author: Jian Shen Date: Thu Jun 20 16:52:36 2019 +0800 net: hns3: remove VF VLAN filter entry inexistent warning print For VF VLAN filter is disabled when VF VLAN table is full, then the new VLAN ID won't be added into VF VLAN table, it will always print fail log when remove these VLAN IDs. If user has added too many VLANs, it will cause massive verbose print logs. Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 7786a9969a1594d834ec55bc7ef8768909726170 Author: Jian Shen Date: Thu Jun 20 16:52:35 2019 +0800 net: hns3: fix selftest fail issue for fibre port with autoneg on When doing selftest for fibre port with autoneg on, the MAC speed may be incorrect, which may cause the selftest failed. This patch fixes it by halting autoneg during the selftest. Fixes: 22f48e24a23d ("net: hns3: add autoneg and change speed support for fibre port") Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hnae3.h | 3 +++ drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 10 ++++++++++ drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 12 ++++++++++++ 3 files changed, 25 insertions(+) commit 0766789b1edb23874fcafdf3be69160e61384bf3 Author: Kalle Valo Date: Tue Jun 25 17:52:25 2019 +0300 ath: fix SPDX tags Commit ec8f24b7faaf ("treewide: Add SPDX license identifier - Makefile/Kconfig") marked various Makefiles and Kconfig files within ath directories as GPL-2.0. But these modules and drivers are actually ISC: * ath * ar5523 * ath10k * ath5k * ath6kl * ath9k * wcn36xx * wil6210 Fix SPDX tags accordingly. Signed-off-by: Kalle Valo drivers/net/wireless/ath/Kconfig | 2 +- drivers/net/wireless/ath/Makefile | 2 +- drivers/net/wireless/ath/ar5523/Kconfig | 2 +- drivers/net/wireless/ath/ar5523/Makefile | 2 +- drivers/net/wireless/ath/ath10k/Kconfig | 2 +- drivers/net/wireless/ath/ath5k/Kconfig | 2 +- drivers/net/wireless/ath/ath5k/Makefile | 2 +- drivers/net/wireless/ath/ath6kl/Kconfig | 2 +- drivers/net/wireless/ath/ath6kl/trace.h | 2 +- drivers/net/wireless/ath/ath9k/Kconfig | 2 +- drivers/net/wireless/ath/ath9k/Makefile | 2 +- drivers/net/wireless/ath/wcn36xx/Kconfig | 2 +- drivers/net/wireless/ath/wcn36xx/Makefile | 2 +- drivers/net/wireless/ath/wil6210/Kconfig | 2 +- drivers/net/wireless/ath/wil6210/Makefile | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) commit 3ca43b6053c9a5dbbffb02aa010c1ccf8eb460a8 Author: Arnaldo Carvalho de Melo Date: Wed Jun 26 12:06:20 2019 -0300 perf tools: Remove trim() implementation, use tools/lib's strim() Moving more stuff out of tools/perf/util/ and using the kernel idiom. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-wpj8rktj62yse5dq6ckny6de@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/builtin-test.c | 3 ++- tools/perf/ui/browsers/hists.c | 3 ++- tools/perf/ui/gtk/hists.c | 5 +++-- tools/perf/ui/stdio/hist.c | 2 +- tools/perf/util/string2.h | 5 ----- 5 files changed, 8 insertions(+), 10 deletions(-) commit 45bfd0ac7bd2afa83600df9c1286a1642bb15c55 Author: Arnaldo Carvalho de Melo Date: Wed Jun 26 11:50:16 2019 -0300 tools lib: Adopt strim() from the kernel Since we're working on moving stuff out of tools/perf/util/ to tools/lib/, take the opportunity to adopt routines from the kernel that are equivalent, so that tools/ code look more like the kernel. Cc: Adrian Hunter Cc: André Goddard Rosa Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-zqy1zdu2ok17qvi0ytk8z13c@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/linux/string.h | 2 ++ tools/lib/string.c | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+) commit a57e8e1982cc0e4631772c52218548432974de58 Merge: d48e0cd8fcaf a2e1bb44a35d Author: Thomas Gleixner Date: Wed Jun 26 16:45:49 2019 +0200 Merge tag 'timers-v5.4' of https://git.linaro.org/people/daniel.lezcano/linux into timers/core Pull clocksource/events updates from Daniel Lezcano: - Rewrite of the davinci timer resulting to an immutable branch to be shared with davinci platform specific tree (Bartosz Golaszewski) - Cleanup and improvements of the tegra timer (Dmitry Osipenko) - Add new nxp system counter timer (Bai Ping) - Increase priority for exynos_mct to take over the initialization of the IP the arch ARM timer depends on (Marek Szyprowski) - Change macro use _BITUL() by BIT() on arc timer (Masahiro Yamada) - Implement the delay timer on ixp4xx (Linus Walleij) - Add the SPDX license identifier on the meson timer (Neil Armstrong) commit 328584804edc950fb4608c9a38e396ac71ef22b6 Author: Arnaldo Carvalho de Melo Date: Wed Jun 26 11:42:03 2019 -0300 perf tools: Ditch rtrim(), use skip_spaces() to get closer to the kernel No change in behaviour, just using the same kernel idiom for such operation. Cc: Adrian Hunter Cc: André Goddard Rosa Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-a85lkptkt0ru40irpga8yf54@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-script.c | 12 ++++++------ tools/perf/ui/browser.c | 2 +- tools/perf/ui/browsers/hists.c | 2 +- tools/perf/ui/gtk/hists.c | 4 ++-- tools/perf/ui/stdio/hist.c | 2 +- tools/perf/util/annotate.c | 10 +++++----- tools/perf/util/event.c | 4 +--- tools/perf/util/pmu.c | 3 ++- tools/perf/util/stat-display.c | 4 ++-- tools/perf/util/string.c | 14 -------------- tools/perf/util/string2.h | 4 ++-- 11 files changed, 23 insertions(+), 38 deletions(-) commit 526bbbdd442ce143b52cd6a8b4ee424f9930be0d Author: Arnaldo Carvalho de Melo Date: Wed Jun 26 11:24:37 2019 -0300 perf report: Use skip_spaces() No change in behaviour intended. Cc: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-lcywlfqbi37nhegmhl1ar6wg@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-report.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 80e9073f1f4473639d585b89ebc9130bb47920e8 Author: Arnaldo Carvalho de Melo Date: Wed Jun 26 11:21:47 2019 -0300 perf metricgroup: Use strsep() No change in behaviour intended, trivial optimization done by avoiding looking for spaces in 'g' right after setting it to "No_group". Cc: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-f2siadtp3hb5o0l1w7bvd8bk@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/metricgroup.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c1fc14cbdcc9455507e5f54109199bfea3af185f Author: Arnaldo Carvalho de Melo Date: Wed Jun 26 11:08:10 2019 -0300 perf strfilter: Use skip_spaces() No change in behaviour. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-p9rtamq7lvre9zhti70azfwe@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/strfilter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ee44b5b51f37727f57962b2cdccd548c62045252 Author: Arnaldo Carvalho de Melo Date: Tue Jun 25 21:46:39 2019 -0300 perf probe: Use skip_spaces() for argv handling The skip_sep() routine has the same implementation as skip_spaces(), recently adopted from the kernel, sources, switch to it. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-0ix211a81z2016dl5nmtdci4@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/string.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) commit a2e1bb44a35d84bc760a0553fb1e36fecc25a623 Merge: 6fde3894e26e b0c74b96d177 Author: Daniel Lezcano Date: Wed Jun 26 16:24:33 2019 +0200 Merge branch 'timers/drivers/davinci' into timers/drivers/next commit 53b7607382b0b99d6ae1ef5b1b0fa042b00ac7f4 Author: Tiezhu Yang Date: Mon Jun 24 12:41:18 2019 +0800 x86/kexec: Make variable static and config dependent The following sparse warning is emitted: arch/x86/kernel/crash.c:59:15: warning: symbol 'crash_zero_bytes' was not declared. Should it be static? The variable is only used in this compilation unit, but it is also only used when CONFIG_KEXEC_FILE is enabled. Just making it static would result in a 'defined but not used' warning for CONFIG_KEXEC_FILE=n. Make it static and move it into the existing CONFIG_KEXEC_FILE section. [ tglx: Massaged changelog and moved it into the existing ifdef ] Fixes: dd5f726076cc ("kexec: support for kexec on panic using new system call") Signed-off-by: Tiezhu Yang Signed-off-by: Thomas Gleixner Acked-by: Dave Young Cc: bp@alien8.de Cc: hpa@zytor.com Cc: kexec@lists.infradead.org Cc: vgoyal@redhat.com Cc: Vivek Goyal Link: https://lkml.kernel.org/r/117ef0c6.3d30.16b87c9cfbf.Coremail.kernelpatch@126.com arch/x86/kernel/crash.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 572a6928f9e3689ad2c2f94814e6215104eec1b7 Author: YueHaibing Date: Tue Jun 25 10:31:37 2019 +0800 xdp: Make __mem_id_disconnect static Fix sparse warning: net/core/xdp.c:88:6: warning: symbol '__mem_id_disconnect' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: YueHaibing Acked-by: Jesper Dangaard Brouer Acked-by: Song Liu Signed-off-by: Daniel Borkmann net/core/xdp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4601db7ecf078523cd49b4d8953969739ed36bf4 Author: Peter Ujfalusi Date: Wed Jun 5 14:15:04 2019 +0530 dt-bindings: i2c: omap: Add new compatible for J721E SoCs J721E SoCs have same I2C IP as OMAP SoCs. Add new compatible to handle J721E SoCs. Signed-off-by: Peter Ujfalusi Signed-off-by: Vignesh Raghavendra Signed-off-by: Wolfram Sang Documentation/devicetree/bindings/i2c/i2c-omap.txt | 1 + 1 file changed, 1 insertion(+) commit 9e859e8f199d4ab15ed418f7d17735c77619d14f Author: Daniel T. Lee Date: Tue Jun 25 09:55:36 2019 +0900 samples: bpf: make the use of xdp samples consistent Currently, each xdp samples are inconsistent in the use. Most of the samples fetch the interface with it's name. (ex. xdp1, xdp2skb, xdp_redirect_cpu, xdp_sample_pkts, etc.) But some of the xdp samples are fetching the interface with ifindex by command argument. This commit enables xdp samples to fetch interface with it's name without changing the original index interface fetching. ( fetching in the same way as xdp_sample_pkts_user.c does.) Signed-off-by: Daniel T. Lee Acked-by: Toke Høiland-Jørgensen Acked-by: Jesper Dangaard Brouer Acked-by: Song Liu Signed-off-by: Daniel Borkmann samples/bpf/xdp_adjust_tail_user.c | 12 ++++++++++-- samples/bpf/xdp_redirect_map_user.c | 15 +++++++++++---- samples/bpf/xdp_redirect_user.c | 15 +++++++++++---- samples/bpf/xdp_tx_iptunnel_user.c | 12 ++++++++++-- 4 files changed, 42 insertions(+), 12 deletions(-) commit f8bbde72ef44417e41d4731b05264dcbfb9f962a Author: Maxime Ripard Date: Tue Jun 11 11:03:09 2019 +0200 dt-bindings: i2c: mv64xxx: Add YAML schemas Switch the DT binding to a YAML schema to enable the DT validation. Signed-off-by: Maxime Ripard Reviewed-by: Rob Herring Acked-by: Gregory CLEMENT Signed-off-by: Wolfram Sang .../devicetree/bindings/i2c/i2c-mv64xxx.txt | 64 ----------- .../bindings/i2c/marvell,mv64xxx-i2c.yaml | 124 +++++++++++++++++++++ 2 files changed, 124 insertions(+), 64 deletions(-) commit bbddb0fc3bbf07dd0b2785c8581c97a2fd58a174 Author: Maxime Ripard Date: Tue Jun 11 11:03:08 2019 +0200 dt-bindings: i2c: sun6i-p2wi: Add YAML schemas Switch the DT binding to a YAML schema to enable the DT validation. Signed-off-by: Maxime Ripard Reviewed-by: Rob Herring Signed-off-by: Wolfram Sang .../bindings/i2c/allwinner,sun6i-a31-p2wi.yaml | 65 ++++++++++++++++++++++ .../devicetree/bindings/i2c/i2c-sun6i-p2wi.txt | 41 -------------- 2 files changed, 65 insertions(+), 41 deletions(-) commit d04913ec5f89f13760f8e8411c93cee542560d68 Author: Stefan Roese Date: Mon Jun 17 10:31:17 2019 +0200 i2c: mt7621: Add MediaTek MT7621/7628/7688 I2C driver This patch adds a driver for the I2C controller found on the MediaTek MT7621/7628/7688 SoC's. The base version of this driver was done by Steven Liu (according to the copyright and MODULE_AUTHOR lines). It can be found in the OpenWRT repositories (v4.14 at the time I looked). The base driver had many issues, which are disccussed here: https://en.forum.labs.mediatek.com/t/openwrt-15-05-loads-non-working-i2c-kernel-module-for-mt7688/1286/3 >From this link an enhanced driver version (complete rewrite, mayor changes: support clock stretching, repeated start, ACK handling and unlimited message length) from Jan Breuer can be found here: https://gist.github.com/j123b567/9b555b635c2b4069d716b24198546954 This patch now adds this enhanced I2C driver to mainline. Changes by Stefan Roese for upstreaming: - Add devicetree bindings - checkpatch clean - Use module_platform_driver() - Minor cosmetic enhancements - Removed IO warpped functions - Use readl_relaxed_poll_timeout() and drop poll_down_timeout() - Removed superfluous barrier() in mtk_i2c_reset() - Use i2c_8bit_addr_from_msg() - Added I2C_FUNC_PROTOCOL_MANGLING - Removed adap->class = I2C_CLASS_HWMON | I2C_CLASS_SPD; Signed-off-by: Stefan Roese Tested-by: René van Dorst Signed-off-by: Wolfram Sang MAINTAINERS | 7 + drivers/i2c/busses/Kconfig | 7 + drivers/i2c/busses/Makefile | 1 + drivers/i2c/busses/i2c-mt7621.c | 357 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 372 insertions(+) commit 71731e1b2da17f5d2a9ca654c66c393d89cba9e6 Author: Stefan Roese Date: Mon Jun 17 10:31:16 2019 +0200 dt-bindings: i2c: i2c-mt7621: Add bindings for MediaTek MT7621/28/88 I2C Add bindings for the I2C controller that can be found in the MediaTek MT7621/7628/7688 SoCs. Signed-off-by: Stefan Roese Signed-off-by: Wolfram Sang .../devicetree/bindings/i2c/i2c-mt7621.txt | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit a8023e66e871d9feddd7c976c2ffe852eb6dc377 Author: Wolfram Sang Date: Wed Jun 19 19:02:45 2019 +0200 i2c: core: add sysfs header We are using sysfs functions directly, so we should include the header. Signed-off-by: Wolfram Sang Signed-off-by: Wolfram Sang drivers/i2c/i2c-core-of.c | 1 + 1 file changed, 1 insertion(+) commit 9de93b04df16b055824e3f1f13fedb90fbcf2e4f Author: Annaliese McDermond Date: Fri Jun 21 03:52:50 2019 -0700 i2c: bcm2835: Ensure clock exists when probing Probe function fails to recognize that upstream clock actually doesn't yet exist because clock driver has not been initialized. Actually try to go get the clock and test for its existence before trying to set up a downstream clock based upon it. This fixes a bug that causes the i2c driver not to work with monolithic kernels. Fixes: bebff81fb8b9 ("i2c: bcm2835: Model Divider in CCF") Signed-off-by: Annaliese McDermond Acked-by: Stefan Wahren Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-bcm2835.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 4a5cfa39465cad25dd736d7ceba8a5d32eea4ecc Author: Annaliese McDermond Date: Fri Jun 21 03:52:49 2019 -0700 i2c: bcm2835: Move IRQ request after clock code in probe If any of the clock code in the probe fails and returns, the IRQ will not be freed. Moving the IRQ request to last allows it to be freed on any errors further up in the probe function. devm_ calls can apparently not be used because there are some potential race conditions that will arise. Fixes: bebff81fb8b9 ("i2c: bcm2835: Model Divider in CCF") Signed-off-by: Annaliese McDermond Acked-by: Stefan Wahren Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-bcm2835.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 550113d4e9f5c7b62be760fc01178c9e0139c1f4 Author: Wolfram Sang Date: Mon Jun 24 19:04:02 2019 +0200 i2c: add newly exported functions to the header, too Nobody (including me) noticed that these functions were exported but not added to the header :/ Fixes: 7159dbdae3c5 ("i2c: core: improve return value handling of i2c_new_device and i2c_new_dummy") Signed-off-by: Wolfram Sang Reviewed-by: Bartosz Golaszewski Reviewed-by: Kieran Bingham Signed-off-by: Wolfram Sang drivers/i2c/i2c-core-base.c | 5 ++--- include/linux/i2c.h | 6 ++++++ 2 files changed, 8 insertions(+), 3 deletions(-) commit ab3765a050f7bea942f114d07278e1775e38199b Author: Zhenzhong Duan Date: Sun Jun 23 11:35:04 2019 +0800 x86/speculation/mds: Eliminate leaks by trace_hardirqs_on() Move mds_idle_clear_cpu_buffers() after trace_hardirqs_on() to ensure all store buffer entries are flushed. Signed-off-by: Zhenzhong Duan Signed-off-by: Thomas Gleixner Cc: bp@alien8.de Cc: hpa@zytor.com Cc: jgross@suse.com Cc: ndesaulniers@google.com Cc: gregkh@linuxfoundation.org Link: https://lkml.kernel.org/r/1561260904-29669-2-git-send-email-zhenzhong.duan@oracle.com arch/x86/include/asm/mwait.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 670b004417e37b2d080ff6817703dc02e009dc94 Author: Linus Walleij Date: Wed Jun 26 11:21:19 2019 +0200 x86/platform/geode: Drop includes These board files only use gpio_keys not gpio in general. This include is just surplus, delete it. Signed-off-by: Linus Walleij Signed-off-by: Thomas Gleixner Cc: linux-gpio@vger.kernel.org Cc: Andres Salomon Cc: linux-geode@lists.infradead.org Cc: Andy Shevchenko Cc: Darren Hart Cc: platform-driver-x86@vger.kernel.org Link: https://lkml.kernel.org/r/20190626092119.3172-1-linus.walleij@linaro.org arch/x86/platform/geode/alix.c | 1 - arch/x86/platform/geode/geos.c | 1 - arch/x86/platform/geode/net5501.c | 1 - 3 files changed, 3 deletions(-) commit 25c7eabed5b219e975c8aee527ae202604d10911 Author: Bryan O'Donoghue Date: Wed Jun 26 11:27:32 2019 +0100 dt-bindings: imx-ocotp: Add i.MX8MM compatible Add compatible for i.MX8MM as per arch/arm64/boot/dts/freescale/imx8mm.dtsi Signed-off-by: Bryan O'Donoghue Cc: Rob Herring Reviewed-by: Leonard Crestez Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/nvmem/imx-ocotp.txt | 1 + 1 file changed, 1 insertion(+) commit 991305dee585dd9e3107b2e253778ed02ee3fbd1 Author: Ferdinand Blomqvist Date: Thu Jun 20 17:10:39 2019 +0300 rslib: Fix remaining decoder flaws The decoder is flawed in the following ways: - The decoder sometimes fails silently, i.e. it announces success but returns a word that is not a codeword. - The return value of the decoder is incoherent with respect to how fixed erasures are counted. If the word to be decoded is a codeword, then the decoder always returns zero even if some erasures are given. On the other hand, if the word to be decoded contains errors, then the number of erasures is always included in the count of corrected symbols. So the decoder handles erasures without symbol corruption inconsistently. This inconsistency probably doesn't affect anyone using the decoder, but it is inconsistent with the documentation. - The error positions returned in eras_pos include all erasures, but the corrections are only set in the correction buffer if there actually is a symbol error. So if there are erasures without symbol corruption, then the correction buffer will contain errors (unless initialized to zero before calling the decoder) or some values will be unset (if the correction buffer is uninitialized). - When correcting data in-place the decoder does not correct errors in the parity. On the other hand, when returning the errors in correction buffers, errors in the parity are included. The respective fixed are: - The syndrome of a codeword is always zero, and the syndrome is linear, .i.e, S(x+e) = S(x) + S(e). So compute the syndrome for the error and check whether it equals the syndrome of the received word. If it does, then we have decoded to a valid codeword, otherwise we know that we have an uncorrectable error. Fortunately, some unrecoverable error conditions can be detected earlier in the decoding, which saves some processing power. - Simply count and return the number of symbols actually corrected. - Make sure to only return positions where symbols were corrected. - Also fix errors in parity when correcting in-place. Another option would be to completely disregard errors in the parity, but then the interface makes it impossible to write tests that test for silent failures. Other changes: - Only fill the correction buffer and error position buffer if both of them are provided. Otherwise correct in place. Previously the error position buffer was always populated with the positions of the corrected errors, irrespective of whether a correction buffer was supplied or not. The rationale for this change is that there seems to be two use cases for the decoder; correct in-place or use the correction buffers. The caller does not need the positions of the corrected errors when in-place correction is used. If in-place correction is not used, then both the correction buffer and error position buffer need to be populated. Signed-off-by: Ferdinand Blomqvist Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20190620141039.9874-8-ferdinand.blomqvist@gmail.com lib/reed_solomon/decode_rs.c | 88 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 68 insertions(+), 20 deletions(-) commit 38cbae1434f8f7bbd8eaf24b29a385a4b88938fb Author: Ferdinand Blomqvist Date: Thu Jun 20 17:10:38 2019 +0300 rslib: Update documentation The decoder returns the number of corrected symbols, not bits. The caller provided syndrome must be in index form. Signed-off-by: Ferdinand Blomqvist Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20190620141039.9874-7-ferdinand.blomqvist@gmail.com lib/reed_solomon/reed_solomon.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit ef4d6a8556b637ad27c8c2a2cff1dda3da38e9a9 Author: Ferdinand Blomqvist Date: Thu Jun 20 17:10:37 2019 +0300 rslib: Fix handling of of caller provided syndrome Check if the syndrome provided by the caller is zero, and act accordingly. Signed-off-by: Ferdinand Blomqvist Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20190620141039.9874-6-ferdinand.blomqvist@gmail.com lib/reed_solomon/decode_rs.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 647cc9ece63fdba573a31bdafa54fb2d388c3c83 Author: Ferdinand Blomqvist Date: Thu Jun 20 17:10:36 2019 +0300 rslib: decode_rs: Code cleanup Nothing useful was done after the finish label when count is negative so return directly instead of jumping to finish. Signed-off-by: Ferdinand Blomqvist Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20190620141039.9874-5-ferdinand.blomqvist@gmail.com lib/reed_solomon/decode_rs.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit a343536f8f482be6932803a023f46d0fa723ae56 Author: Ferdinand Blomqvist Date: Thu Jun 20 17:10:35 2019 +0300 rslib: decode_rs: Fix length parameter check The length of the data load must be at least one. Or in other words, there must be room for at least 1 data and nroots parity symbols after shortening the RS code. Signed-off-by: Ferdinand Blomqvist Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20190620141039.9874-4-ferdinand.blomqvist@gmail.com lib/reed_solomon/decode_rs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2034a42d1747fc1e1eeef2c6f1789c4d0762cb9c Author: Ferdinand Blomqvist Date: Thu Jun 20 17:10:34 2019 +0300 rslib: Fix decoding of shortened codes The decoding of shortenend codes is broken. It only works as expected if there are no erasures. When decoding with erasures, Lambda (the error and erasure locator polynomial) is initialized from the given erasure positions. The pad parameter is not accounted for by the initialisation code, and hence Lambda is initialized from incorrect erasure positions. The fix is to adjust the erasure positions by the supplied pad. Signed-off-by: Ferdinand Blomqvist Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20190620141039.9874-3-ferdinand.blomqvist@gmail.com lib/reed_solomon/decode_rs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4b4f3accd80304781c648b26ce4d53df082a4087 Author: Ferdinand Blomqvist Date: Thu Jun 20 17:10:33 2019 +0300 rslib: Add tests for the encoder and decoder A Reed-Solomon code with minimum distance d can correct any error and erasure pattern that satisfies 2 * #error + #erasures < d. If the error correction capacity is exceeded, then correct decoding cannot be guaranteed. The decoder must, however, return a valid codeword or report failure. There are two main tests: - Check for correct behaviour up to the error correction capacity - Check for correct behaviour beyond error corrupted capacity Both tests are simple: 1. Generate random data 2. Encode data with the chosen code 3. Add errors and erasures to data 4. Decode the corrupted word 5. Check for correct behaviour When testing up to capacity we test for: - Correct decoding - Correct return value (i.e. the number of corrected symbols) - That the returned error positions are correct There are two kinds of erasures; the erased symbol can be corrupted or not. When counting the number of corrected symbols, erasures without symbol corruption should not be counted. Similarly, the returned error positions should only include positions where a correction is necessary. We run the up to capacity tests for three different interfaces of decode_rs: - Use the correction buffers - Use the correction buffers with syndromes provided by the caller - Error correction in place (does not check the error positions) When testing beyond capacity test for silent failures. A silent failure is when the decoder returns success but the returned word is not a valid codeword. There are a couple of options for the tests: - Verbosity. - Whether to test for correct behaviour beyond capacity. Default is to test beyond capacity. - Whether to allow erasures without symbol corruption. Defaults to yes. Note that the tests take a couple of minutes to complete. Signed-off-by: Ferdinand Blomqvist Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20190620141039.9874-2-ferdinand.blomqvist@gmail.com lib/Kconfig.debug | 12 + lib/reed_solomon/Makefile | 2 +- lib/reed_solomon/test_rslib.c | 518 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 531 insertions(+), 1 deletion(-) commit 75672dda27bd00109a84cd975c17949ad9c45663 Author: Jiong Wang Date: Tue Jun 25 17:41:50 2019 +0100 bpf: fix BPF_ALU32 | BPF_ARSH on BE arches Yauheni reported the following code do not work correctly on BE arches: ALU_ARSH_X: DST = (u64) (u32) ((*(s32 *) &DST) >> SRC); CONT; ALU_ARSH_K: DST = (u64) (u32) ((*(s32 *) &DST) >> IMM); CONT; and are causing failure of test_verifier test 'arsh32 on imm 2' on BE arches. The code is taking address and interpreting memory directly, so is not endianness neutral. We should instead perform standard C type casting on the variable. A u64 to s32 conversion will drop the high 32-bit and reserve the low 32-bit as signed integer, this is all we want. Fixes: 2dc6b100f928 ("bpf: interpreter support BPF_ALU | BPF_ARSH") Reported-by: Yauheni Kaliuta Reviewed-by: Jakub Kicinski Reviewed-by: Quentin Monnet Signed-off-by: Jiong Wang Acked-by: Song Liu Signed-off-by: Daniel Borkmann kernel/bpf/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6c6874f401e5a0caab3b6a0663169e1fb5e930bb Author: Jakub Kicinski Date: Tue Jun 25 09:56:31 2019 -0700 tools: bpftool: use correct argument in cgroup errors cgroup code tries to use argv[0] as the cgroup path, but if it fails uses argv[1] to report errors. Fixes: 5ccda64d38cc ("bpftool: implement cgroup bpf operations") Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Acked-by: Roman Gushchin Signed-off-by: Daniel Borkmann tools/bpf/bpftool/cgroup.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9db1ff0a415c7de8eb67df5b2c56ac409ccefc37 Author: Yonghong Song Date: Tue Jun 25 17:35:03 2019 -0700 bpf: fix compiler warning with CONFIG_MODULES=n With CONFIG_MODULES=n, the following compiler warning occurs: /data/users/yhs/work/net-next/kernel/trace/bpf_trace.c:605:13: warning: ‘do_bpf_send_signal’ defined but not used [-Wunused-function] static void do_bpf_send_signal(struct irq_work *entry) The __init function send_signal_irq_work_init(), which calls do_bpf_send_signal(), is defined under CONFIG_MODULES. Hence, when CONFIG_MODULES=n, nobody calls static function do_bpf_send_signal(), hence the warning. The init function send_signal_irq_work_init() should work without CONFIG_MODULES. Moving it out of CONFIG_MODULES code section fixed the compiler warning, and also make bpf_send_signal() helper work without CONFIG_MODULES. Fixes: 8b401f9ed244 ("bpf: implement bpf_send_signal() helper") Reported-By: Arnd Bergmann Signed-off-by: Yonghong Song Acked-by: Song Liu Signed-off-by: Daniel Borkmann kernel/trace/bpf_trace.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) commit 6bcc617f842cdb5f3d66b3a3f06614a62fab992b Author: Andrii Nakryiko Date: Tue Jun 25 15:56:28 2019 -0700 selftests/bpf: build tests with debug info Non-BPF (user land) part of selftests is built without debug info making occasional debugging with gdb terrible. Build with debug info always. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 950649791b8366a4b89f570053d37bba1eb21c02 Author: Ivan Khoronzhuk Date: Wed Jun 26 13:38:37 2019 +0300 libbpf: fix max() type mismatch for 32bit It fixes build error for 32bit caused by type mismatch size_t/unsigned long. Fixes: bf82927125dd ("libbpf: refactor map initialization") Acked-by: Song Liu Acked-by: Andrii Nakryiko Signed-off-by: Ivan Khoronzhuk Signed-off-by: Daniel Borkmann tools/lib/bpf/libbpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f7019b7b0ad14bde732b8953161994edfc384953 Author: Nathan Chancellor Date: Tue Jun 25 11:23:52 2019 -0700 xsk: Properly terminate assignment in xskq_produce_flush_desc Clang warns: In file included from net/xdp/xsk_queue.c:10: net/xdp/xsk_queue.h:292:2: warning: expression result unused [-Wunused-value] WRITE_ONCE(q->ring->producer, q->prod_tail); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler.h:284:6: note: expanded from macro 'WRITE_ONCE' __u.__val; \ ~~~ ^~~~~ 1 warning generated. The q->prod_tail assignment has a comma at the end, not a semi-colon. Fix that so clang no longer warns and everything works as expected. Fixes: c497176cb2e4 ("xsk: add Rx receive functions and poll support") Link: https://github.com/ClangBuiltLinux/linux/issues/544 Signed-off-by: Nathan Chancellor Acked-by: Nick Desaulniers Acked-by: Jonathan Lemon Acked-by: Björn Töpel Acked-by: Song Liu Signed-off-by: Daniel Borkmann net/xdp/xsk_queue.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3acf4be235280f14d838581a750532219d67facc Author: Vincenzo Frascino Date: Wed Jun 26 12:36:32 2019 +0100 arm64: vdso: Fix compilation with clang older than 8 clang versions older than 8 do not support -mcmodel=tiny. Add a check to the vDSO Makefile for arm64 to remove the flag when these versions of the compiler are detected. Reported-by: Qian Cai Signed-off-by: Vincenzo Frascino Signed-off-by: Thomas Gleixner Tested-by: Qian Cai Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mips@vger.kernel.org Cc: linux-kselftest@vger.kernel.org Cc: catalin.marinas@arm.com Cc: will.deacon@arm.com Cc: arnd@arndb.de Cc: linux@armlinux.org.uk Cc: ralf@linux-mips.org Cc: paul.burton@mips.com Cc: daniel.lezcano@linaro.org Cc: salyzyn@android.com Cc: pcc@google.com Cc: shuah@kernel.org Cc: 0x7f454c46@gmail.com Cc: linux@rasmusvillemoes.dk Cc: huw@codeweavers.com Cc: sthotton@marvell.com Cc: andre.przywara@arm.com Cc: luto@kernel.org Link: https://lkml.kernel.org/r/20190626113632.9295-1-vincenzo.frascino@arm.com arch/arm64/kernel/vdso/Makefile | 7 +++++++ 1 file changed, 7 insertions(+) commit 6241c4dc6ec56a7627b972959da8b492b765b209 Author: Vincenzo Frascino Date: Tue Jun 25 17:18:04 2019 +0100 arm64: compat: Fix __arch_get_hw_counter() implementation Provide the following fixes for the __arch_get_hw_counter() implementation on arm64: - Fallback on syscall when an unstable counter is detected. - Introduce isb()s before and after the counter read to avoid speculation of the counter value and of the seq lock respectively. The second isb() is a temporary solution that will be revisited in 5.3-rc1. These fixes restore the semantics that __arch_counter_get_cntvct() had on arm64. Signed-off-by: Vincenzo Frascino Signed-off-by: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mips@vger.kernel.org Cc: linux-kselftest@vger.kernel.org Cc: catalin.marinas@arm.com Cc: will.deacon@arm.com Cc: arnd@arndb.de Cc: linux@armlinux.org.uk Cc: ralf@linux-mips.org Cc: paul.burton@mips.com Cc: daniel.lezcano@linaro.org Cc: salyzyn@android.com Cc: pcc@google.com Cc: shuah@kernel.org Cc: 0x7f454c46@gmail.com Cc: linux@rasmusvillemoes.dk Cc: huw@codeweavers.com Cc: sthotton@marvell.com Cc: andre.przywara@arm.com Cc: Catalin Marinas Cc: Will Deacon Link: https://lkml.kernel.org/r/20190625161804.38713-3-vincenzo.frascino@arm.com arch/arm64/include/asm/vdso/compat_gettimeofday.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 27e11a9fe2e2e7e0d13f854e89a71e488678fb17 Author: Vincenzo Frascino Date: Tue Jun 25 17:18:03 2019 +0100 arm64: Fix __arch_get_hw_counter() implementation Provide the following fixes for the __arch_get_hw_counter() implementation on arm64: - Fallback on syscall when an unstable counter is detected. - Introduce isb()s before and after the counter read to avoid speculation of the counter value and of the seq lock respectively. The second isb() is a temporary solution that will be revisited in 5.3-rc1. These fixes restore the semantics that __arch_counter_get_cntvct() had on arm64. Signed-off-by: Vincenzo Frascino Signed-off-by: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mips@vger.kernel.org Cc: linux-kselftest@vger.kernel.org Cc: catalin.marinas@arm.com Cc: will.deacon@arm.com Cc: arnd@arndb.de Cc: linux@armlinux.org.uk Cc: ralf@linux-mips.org Cc: paul.burton@mips.com Cc: daniel.lezcano@linaro.org Cc: salyzyn@android.com Cc: pcc@google.com Cc: shuah@kernel.org Cc: 0x7f454c46@gmail.com Cc: linux@rasmusvillemoes.dk Cc: huw@codeweavers.com Cc: sthotton@marvell.com Cc: andre.przywara@arm.com Cc: Catalin Marinas Cc: Will Deacon Link: https://lkml.kernel.org/r/20190625161804.38713-2-vincenzo.frascino@arm.com arch/arm64/include/asm/vdso/gettimeofday.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 9d90b93bf325e015bbae31b83f16da5e4e17effa Author: Thomas Gleixner Date: Wed Jun 26 12:02:00 2019 +0200 lib/vdso: Make delta calculation work correctly The x86 vdso implementation on which the generic vdso library is based on has subtle (unfortunately undocumented) twists: 1) The code assumes that the clocksource mask is U64_MAX which means that no bits are masked. Which is true for any valid x86 VDSO clocksource. Stupidly it still did the mask operation for no reason and at the wrong place right after reading the clocksource. 2) It contains a sanity check to catch the case where slightly unsynchronized TSC values can be observed which would cause the delta calculation to make a huge jump. It therefore checks whether the current TSC value is larger than the value on which the current conversion is based on. If it's not larger the base value is used to prevent time jumps. #1 Is not only stupid for the X86 case because it does the masking for no reason it is also completely wrong for clocksources with a smaller mask which can legitimately wrap around during a conversion period. The core timekeeping code does it correct by applying the mask after the delta calculation: (now - base) & mask #2 is equally broken for clocksources which have smaller masks and can wrap around during a conversion period because there the now > base check is just wrong and causes stale time stamps and time going backwards issues. Unbreak it by: 1) Removing the mask operation from the clocksource read which makes the fallback detection work for all clocksources 2) Replacing the conditional delta calculation with a overrideable inline function. #2 could reuse clocksource_delta() from the timekeeping code but that results in a significant performance hit for the x86 VSDO. The timekeeping core code must have the non optimized version as it has to operate correctly with clocksources which have smaller masks as well to handle the case where TSC is discarded as timekeeper clocksource and replaced by HPET or pmtimer. For the VDSO there is no replacement clocksource. If TSC is unusable the syscall is enforced which does the right thing. To accommodate to the needs of various architectures provide an override-able inline function which defaults to the regular delta calculation with masking: (now - base) & mask Override it for x86 with the non-masking and checking version. This unbreaks the ARM64 syscall fallback operation, allows to use clocksources with arbitrary width and preserves the performance optimization for x86. Signed-off-by: Thomas Gleixner Reviewed-by: Vincenzo Frascino Cc: linux-arch@vger.kernel.org Cc: LAK Cc: linux-mips@vger.kernel.org Cc: linux-kselftest@vger.kernel.org Cc: catalin.marinas@arm.com Cc: Will Deacon Cc: Arnd Bergmann Cc: linux@armlinux.org.uk Cc: Ralf Baechle Cc: paul.burton@mips.com Cc: Daniel Lezcano Cc: salyzyn@android.com Cc: pcc@google.com Cc: shuah@kernel.org Cc: 0x7f454c46@gmail.com Cc: linux@rasmusvillemoes.dk Cc: huw@codeweavers.com Cc: sthotton@marvell.com Cc: andre.przywara@arm.com Cc: Andy Lutomirski Link: https://lkml.kernel.org/r/alpine.DEB.2.21.1906261159230.32342@nanos.tec.linutronix.de arch/x86/include/asm/vdso/gettimeofday.h | 27 +++++++++++++++++++++++++++ lib/vdso/gettimeofday.c | 19 +++++++++++++++---- 2 files changed, 42 insertions(+), 4 deletions(-) commit 5a1c17240bf1b8d2b262aaa1a4c26070d43d868f Author: Leonard Crestez Date: Wed Jun 26 11:27:33 2019 +0100 nvmem: imx-ocotp: imx8mq is compatible with imx6 not imx7 According to NXP Reference Manuals and uboot/atf sources the OCOTP block on imx8m behaves more like imx6 than imx7. - Fuses can be read/written 32bits at a time (no imx7-like banking) - The OCOTP_HW_OCOTP_TIMING register is like imx6 not imx7 Since nvmem doesn't support uboot-style "sense" and "override" this issue only affected "write" which is very rarely used. Fixes: 163c0dbd0cb1 ("nvmem: imx-ocotp: add support for imx8mq") Signed-off-by: Leonard Crestez Reviewed-by: Peng Fan Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/imx-ocotp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4112c8537f07aad84c00841a5a30f4acfbbc8242 Author: Bryan O'Donoghue Date: Wed Jun 26 11:27:31 2019 +0100 nvmem: imx-ocotp: Add i.MX8MM support This patch adds support to burn the fuses on the i.MX8MM. https://www.nxp.com/webapp/Download?colCode=IMX8MMRM The i.MX8MM is similar to i.MX6 processors in terms of addressing and clock setup. The documentation specifies 60 discreet OTP registers but, the fusemap address space encompasses up to 256 registers. We map the entire putative 256 OTP registers. Signed-off-by: Bryan O'Donoghue Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/imx-ocotp.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 159dbaf57b2f4f67ecb59b2c87d071e45ed41d7e Author: Bryan O'Donoghue Date: Wed Jun 26 11:27:30 2019 +0100 nvmem: imx-ocotp: Change TIMING calculation to u-boot algorithm The RELAX field of the OCOTP block is turning out as a zero on i.MX8MM. This messes up the subsequent re-load of the fuse shadow registers. After some discussion with people @ NXP its clear we have missed a trick here in Linux. The OCOTP fuse programming time has a physical minimum 'burn time' that is not related to the ipg_clk. We need to define the RELAX, STROBE_READ and STROBE_PROG fields in terms of desired timings to allow for the burn-in to safely complete. Right now only the RELAX field is calculated in terms of an absolute time and we are ending up with a value of zero. This patch inherits the u-boot timings for the OCOTP_TIMING calculation on the i.MX6 and i.MX8. Those timings are known to work and critically specify values such as STROBE_PROG as a minimum timing. Fixes: 0642bac7da42 ("nvmem: imx-ocotp: add write support") Signed-off-by: Bryan O'Donoghue Suggested-by: Leonard Crestez Reviewed-by: Leonard Crestez Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/imx-ocotp.c | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) commit 0493c4792b4eb260441e57f52cc11a9ded48b5a7 Author: Bryan O'Donoghue Date: Wed Jun 26 11:27:29 2019 +0100 nvmem: imx-ocotp: Ensure WAIT bits are preserved when setting timing The i.MX6 and i.MX8 both have a bit-field spanning bits 27:22 called the WAIT field. The WAIT field according to the documentation for both parts "specifies time interval between auto read and write access in one time program. It is given in number of ipg_clk periods." This patch ensures that the relevant field is read and written back to the timing register. Fixes: 0642bac7da42 ("nvmem: imx-ocotp: add write support") Signed-off-by: Bryan O'Donoghue Reviewed-by: Leonard Crestez Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/imx-ocotp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c03bb448f04f8195f04fe6fb3b0fb4699b311ece Author: Bryan O'Donoghue Date: Wed Jun 26 11:27:28 2019 +0100 nvmem: imx-ocotp: Elongate OCOTP_CTRL ADDR field to eight bits i.MX6 defines OCOTP_CTRLn:ADDR as seven bit address-field with a one bit RSVD0 field, i.MX7 defines OCOTP_CTRLn:ADDR as a four bit address-field with a four bit RSVD0 field. i.MX8 defines the OCOTP_CTRLn:ADDR bit-field as a full range eight bits. i.MX6 and i.MX7 should return zero for their respective RSVD0 bits and ignore a write-back of zero where i.MX8 will make use of the full range. This patch expands the bit-field definition for all users to eight bits, which is safe due to RSVD0 being a no-op for the i.MX6 and i.MX7. Signed-off-by: Bryan O'Donoghue Reviewed-by: Leonard Crestez Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/imx-ocotp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fb59b7824da884e042f44dad9c713f221ded93c9 Author: Suzuki K Poulose Date: Wed Jun 26 09:46:53 2019 +0100 drivers: s390/cio: Fix compilation warning about const qualifiers Update __ccwdev_check_busid() and __ccwgroupdev_check_busid() to use "const" qualifiers to fix the compiler warning. Reported-by: kbuild test robot Cc: gregkh@linuxfoundation.org Cc: devel@driverdev.osuosl.org Signed-off-by: Suzuki K Poulose Signed-off-by: Greg Kroah-Hartman drivers/s390/cio/ccwgroup.c | 2 +- drivers/s390/cio/device.c | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) commit 384225c2a7243d073495aa3a6ec07ad25d01bbfe Author: Ping Cheng Date: Sun Jun 23 16:52:43 2019 -0700 HID: wacom: add new MobileStudio Pro support Add product ID for new MobileStudio Pro. Signed-off-by: Ping Cheng Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 53c8b29abe42e5601cfa0ea5962532f0cfdec8a0 Merge: e3303268f9cf 4b972a01a7da Author: Mark Brown Date: Wed Jun 26 12:39:34 2019 +0100 Merge tag 'v5.2-rc6' into asoc-5.3 Linux 5.2-rc6 commit 2b947137f2b8f77474dfe77d68c52778bf6ae453 Author: Keiji Hayashibara Date: Wed Jun 26 09:41:48 2019 +0900 spi: uniphier: fix zero-length transfer The zero-length transfer results in timeout error because the transfer doesn't start. This commit modified to return success in this case. Signed-off-by: Keiji Hayashibara Signed-off-by: Mark Brown drivers/spi/spi-uniphier.c | 4 ++++ 1 file changed, 4 insertions(+) commit e4671df0bfd67d4864de014fa1751d5e2a56c7a6 Author: Keiji Hayashibara Date: Wed Jun 26 09:41:47 2019 +0900 spi: uniphier: fix timeout error Timeout error was silently ignored. This commit adds timeout error handling and modifies return type of wait_for_completion_timeout(). Signed-off-by: Keiji Hayashibara Signed-off-by: Mark Brown drivers/spi/spi-uniphier.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit e3303268f9cfa4eb7c2217df471417d4327109fd Author: Kuninori Morimoto Date: Wed Jun 26 10:40:59 2019 +0900 ASoC: soc-core: don't use soc_find_component() at snd_soc_find_dai() commit b9f2e25c599bb ("ASoC: soc-core: use soc_find_component() at snd_soc_find_dai()") used soc_find_component() at snd_soc_find_dai(), but, some CPU driver has CPU component for DAI and Platform component, for example generic DMAEngine component. In such case, CPU component and Platform component have same of_node / name. Here soc_find_component() returns *1st* found component. Thus, we shouldn't use soc_find_component() at snd_soc_find_dai(). This patch fixup this it, and add comment to indicate this limitation. Fixes: commit b9f2e25c599bb ("ASoC: soc-core: use soc_find_component() at snd_soc_find_dai()") Reported-by: Dmitry Osipenko Reported-by: Jon Hunter Signed-off-by: Kuninori Morimoto Tested-by: Jon Hunter Signed-off-by: Mark Brown sound/soc/soc-core.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 526a6d45b013d45fdddd420860c69fb29fed3d62 Author: Kuninori Morimoto Date: Wed Jun 26 11:00:05 2019 +0900 ASoC: rsnd: add missing pin sharing with SSI9 When SSI9 is sharing pin with SSI0, we need to care about it, but is missing. This patch fixup it. Reported-by: Hien Dang Signed-off-by: Kuninori Morimoto Tested-by: Chaoliang Qin Signed-off-by: Mark Brown sound/soc/sh/rcar/adg.c | 1 + sound/soc/sh/rcar/ssi.c | 1 + 2 files changed, 2 insertions(+) commit dfea7b2c5c7eaf657086bb95d61814d7e04d1409 Author: Kuninori Morimoto Date: Wed Jun 26 10:58:56 2019 +0900 ASoC: rsnd: ssiu: tidyup SSI_MODE1/2 settings R-Car Sound can use pin sharing and multi-SSI for SSI0/1/2/3/4/9. Because complex HW settings and spaghetti code, the settings for SSI9 pin sharing with SSI0 doesn't work. This patch tidyup settings for it. Reported-by: Hien Dang Signed-off-by: Kuninori Morimoto Tested-by: Chaoliang Qin Signed-off-by: Mark Brown sound/soc/sh/rcar/ssiu.c | 92 +++++++++++++++++++++++------------------------- 1 file changed, 44 insertions(+), 48 deletions(-) commit 472e5df0137e10fbaed0eef38c9bdf99e088ff13 Author: Charles Keepax Date: Tue Jun 25 16:37:27 2019 +0100 ASoC: madera: Update SPDX headers The madera driver was merged too late to catch Thomas Gleixner's cleanup of the SPDX headers tree wide. Update the headers to match what was done in that patch. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown include/dt-bindings/sound/madera.h | 6 +----- include/sound/madera-pdata.h | 6 +----- sound/soc/codecs/cs47l35.c | 6 +----- sound/soc/codecs/cs47l85.c | 6 +----- sound/soc/codecs/cs47l90.c | 6 +----- sound/soc/codecs/madera.c | 6 +----- sound/soc/codecs/madera.h | 6 +----- 7 files changed, 7 insertions(+), 35 deletions(-) commit da7260cc8d1dc3564eb4f33550b0525541d71a47 Author: Codrin Ciubotariu Date: Wed Jun 26 13:49:46 2019 +0300 ASoC: codecs: ad193x: Fix memory corruption on BE 64b systems Since change_bit() requires unsigned long*, making this cast on an unsigned int variable will change a wrong bit on BE platforms, causing memory corruption. Replace this function with a simple XOR. Fixes: 90f6e6803139 ("ASoC: codecs: ad193x: Fix frame polarity for DSP_A format") Reported-by: Dan Carpenter Signed-off-by: Codrin Ciubotariu Signed-off-by: Mark Brown sound/soc/codecs/ad193x.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit d9db691d3cb5abdae59545b6b2e50f7e1cc81609 Author: Anshuman Khandual Date: Wed Jun 26 14:06:10 2019 +0530 arm64/mm: Drop [PTE|PMD]_TYPE_FAULT This was added part of the original commit which added MMU definitions. commit 4f04d8f00545 ("arm64: MMU definitions"). These symbols never got used as confirmed from a git log search. git log -p arch/arm64/ | grep PTE_TYPE_FAULT git log -p arch/arm64/ | grep PMD_TYPE_FAULT These probably meant to identify non present entries which can now be achieved with PMD_SECT_VALID or PTE_VALID bits. Hence just drop these unused symbols which are not required anymore. Cc: Will Deacon Cc: Steve Capper Signed-off-by: Anshuman Khandual Signed-off-by: Catalin Marinas arch/arm64/include/asm/pgtable-hwdef.h | 2 -- 1 file changed, 2 deletions(-) commit daed277e4d5ace0883d30b9be245d35c46289f49 Merge: 355a47ae7ebc 6116b892bd4f Author: Maarten Lankhorst Date: Wed Jun 26 12:26:34 2019 +0200 Merge tag 'topic/remove-fbcon-notifiers-2019-06-26' into drm-misc-next-fixes topic/remove-fbcon-notifiers: - Export fbcon_update_vcs to fix sh_mobile_lcdcfb.c compilation. - Rely on fbcon being builtin when vgaswitcheroo is builtin. Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/7dd06ccb-7f8d-943b-bbc0-f4e58e041a23@linux.intel.com commit 355a47ae7ebcf9d605aa809b259d380422e81b8d Merge: b1622cb3be45 80d42db02b3a Author: Maarten Lankhorst Date: Wed Jun 26 12:22:54 2019 +0200 Merge remote-tracking branch 'drm/drm-next' into drm-misc-next-fixes Some fixes have been accidentally pushed to this, so I cannot fost-forward. Required to pull in the remove-fbcon-notifiers fixes. Signed-off-by: Maarten Lankhorst commit d3023897b4370bbf7f289806667a2380576d13dd Author: Michael Karcher Date: Wed Jun 12 15:08:37 2019 +0200 arch/sh: Check for kprobe trap number before trying to handle a kprobe trap The DIE_TRAP notifier chain is run both for kprobe traps and for BUG/WARN traps. The kprobe code assumes to be only called for BREAKPOINT_INSTRUCTION, and concludes to have hit a concurrently removed kprobe if it finds anything else at the faulting locations. This includes TRAPA_BUG_OPCODE used for BUG and WARN. The consequence is that kprobe_handler returns 1. This makes kprobe_exceptions_notify return NOTIFY_STOP, and prevents handling the BUG statement. This also prevents moving $pc away from the trap instruction, so the system locks up in an endless loop Signed-off-by: Michael Karcher Signed-off-by: Yoshinori Sato arch/sh/kernel/kprobes.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c2d3c8a424307af188d844005bc8dc7dc4a96bdf Merge: 76c47323c151 6116b892bd4f Author: Bartlomiej Zolnierkiewicz Date: Wed Jun 26 11:56:53 2019 +0200 Merge tag 'topic/remove-fbcon-notifiers-2019-06-26' of git://anongit.freedesktop.org/drm/drm-misc into fbdev-for-next topic/remove-fbcon-notifiers: - Export fbcon_update_vcs to fix sh_mobile_lcdcfb.c compilation. - Rely on fbcon being builtin when vgaswitcheroo is builtin. commit 181fa434d0514e40ebf6e9721f2b72700287b6e2 Author: Bharat Kumar Gogada Date: Wed Jun 12 15:47:59 2019 +0530 PCI: xilinx-nwl: Fix Multi MSI data programming According to the PCI Local Bus specification Revision 3.0, section 6.8.1.3 (Message Control for MSI), endpoints that are Multiple Message Capable as defined by bits [3:1] in the Message Control for MSI can request a number of vectors that is power of two aligned. As specified in section 6.8.1.6 "Message data for MSI", the Multiple Message Enable field (bits [6:4] of the Message Control register) defines the number of low order message data bits the function is permitted to modify to generate its system software allocated vectors. The MSI controller in the Xilinx NWL PCIe controller supports a number of MSI vectors specified through a bitmap and the hwirq number for an MSI, that is the value written in the MSI data TLP is determined by the bitmap allocation. For instance, in a situation where two endpoints sitting on the PCI bus request the following MSI configuration, with the current PCI Xilinx bitmap allocation code (that does not align MSI vector allocation on a power of two boundary): Endpoint #1: Requesting 1 MSI vector - allocated bitmap bits 0 Endpoint #2: Requesting 2 MSI vectors - allocated bitmap bits [1,2] The bitmap value(s) corresponds to the hwirq number that is programmed into the Message Data for MSI field in the endpoint MSI capability and is detected by the root complex to fire the corresponding MSI irqs. The value written in Message Data for MSI field corresponds to the first bit allocated in the bitmap for Multi MSI vectors. The current Xilinx NWL MSI allocation code allows a bitmap allocation that is not a power of two boundaries, so endpoint #2, is allowed to toggle Message Data bit[0] to differentiate between its two vectors (meaning that the MSI data will be respectively 0x0 and 0x1 for the two vectors allocated to endpoint #2). This clearly aliases with the Endpoint #1 vector allocation, resulting in a broken Multi MSI implementation. Update the code to allocate MSI bitmap ranges with a power of two alignment, fixing the bug. Fixes: ab597d35ef11 ("PCI: xilinx-nwl: Add support for Xilinx NWL PCIe Host Controller") Suggested-by: Marc Zyngier Signed-off-by: Bharat Kumar Gogada [lorenzo.pieralisi@arm.com: updated commit log] Signed-off-by: Lorenzo Pieralisi Acked-by: Marc Zyngier drivers/pci/controller/pcie-xilinx-nwl.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 5ddc6d4e30f4e8701af661601ca07abdfc237996 Author: Viresh Kumar Date: Thu Jun 20 08:35:48 2019 +0530 cpufreq: Use has_target() instead of !setpolicy For code consistency, use has_target() instead of !setpolicy everywhere, as it is already done at several places. Maybe we should also use "!has_target()" instead of "cpufreq_driver->setpolicy" where we need to check if the driver supports setpolicy, so to use only one expression for this kind of differentiation. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3d25025ce9c2f364ea4ee76f1461c8714b9c0b6d Author: Thierry Reding Date: Wed Jun 26 11:36:40 2019 +0200 pwm: fsl-ftm: Make sure to unlock mutex on failure Upon failure to enable clocks while trying to enable the PWM, make sure to unlock the mutex that was taken to avoid a deadlock during subsequent operations. Reported-by: kbuild test robot Reported-by: Julia Lawall Cc: Patrick Havelange Signed-off-by: Thierry Reding drivers/pwm/pwm-fsl-ftm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a2a28229cdce7bd4d95ecf57ea1306a9e2c10137 Author: Patrick Havelange Date: Wed Jun 12 16:12:46 2019 +0200 pwm: fsl-ftm: Use write protection for prescaler & polarity Modifying the prescaler or polarity value must be done with the write protection disabled. Currently this is working by chance as the write protection is in a disabled state by default. This patch makes sure that we enable/disable the write protection when needed. Signed-off-by: Patrick Havelange Signed-off-by: Thierry Reding drivers/pwm/pwm-fsl-ftm.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 3479bbd1e1f873704b11a65ab7efcfb5fd9353de Author: Patrick Havelange Date: Wed Jun 12 16:12:45 2019 +0200 pwm: fsl-ftm: More relaxed permissions for updating period The Flextimer has only one period for several channels. The PWM subsystem doesn't allow to model something like that. The current implementation simply disallows changing the period once it has been set, having as a side effect that you need to enable and disable the PWM if you want to change the period. The driver should allow as much freedom as possible for configuring the period and duty cycle. Therefore, this patch reworks the code to allow the following: - period and duty_cycle can be set at will when the PWM is disabled; - when enabling a PWM, verify that the period is either not set yet, or the same as the other already enabled PWM(s), and fail if not; - allow to change the period on the fly when the PWM is the only one enabled. It also allows to have different periods configured for different PWMs. Only one period can be used at a time, thus the first PWM to be enabled will set that period, only other PWMs with that same period can be enabled at the same time. To use another PWM with another period, the enabled PWMs must be disabled first. Example scenario : echo 5000000 > pwm0/period #OK echo 1000000 > pwm0/duty_cycle #OK echo 1000000 > pwm1/period #OK echo 1000000 > pwm1/duty_cycle #OK echo 1 > pwm0/enable #OK echo 1 > pwm1/enable #FAIL (pwm0/period != pwm1/period) echo 0 > pwm0/enable #OK echo 1 > pwm1/enable #OK echo 1000000 > pwm0/period #OK echo 2000000 > pwm0/period #OK echo 1 > pwm0/enable #FAIL (pwm0/period != pwm1/period) echo 2000000 > pwm1/period #OK (pwm1 still running, changed on the fly) echo 1 > pwm0/enable #OK (now pwm0/period == pwm1/period) echo 3000000 > pwm1/period #FAIL (other PWMs running) echo 0 > pwm0/enable #OK echo 3000000 > pwm1/period #OK (only this PWM running) Adapting the code to satisfy these constraints turned up a number of additional issues with the current implementation: - the prescaler value 0 was not used (when it could have been); - when setting the period was not possible, the internal state was inconsistent; - the maximal value for configuring the period was never used; Since all of these interact with each other, rather than trying to fix each individual issue, this patch reworks how the period and duty cycle are set entirely, with the following additional improvements: - implement the new apply() method instead of the individual methods; - return the exact used period/duty_cycle values; - more coherent argument types for period, duty_cycle; Signed-off-by: Patrick Havelange Signed-off-by: Thierry Reding drivers/pwm/pwm-fsl-ftm.c | 366 +++++++++++++++++++++++----------------------- 1 file changed, 186 insertions(+), 180 deletions(-) commit da9b386492f8ae81b5f544c467c336ef35d7a41e Author: Claudiu Beznea Date: Wed Jun 5 10:25:44 2019 +0000 pwm: atmel-hlcdc: Add compatible for SAM9X60 HLCDC's PWM Add compatible string for SAM9X60 HLCDC's PWM. Signed-off-by: Claudiu Beznea Signed-off-by: Thierry Reding drivers/pwm/pwm-atmel-hlcdc.c | 1 + 1 file changed, 1 insertion(+) commit 11fc4edc483bea8bf0efa0cc726886d2342f6fa6 Author: Sean Young Date: Mon Jun 3 10:00:58 2019 +0100 pwm: bcm2835: Improve precision of PWM If sending IR with carrier of 455kHz using the pwm-ir-tx driver, the carrier ends up being 476kHz. The clock is set to bcm2835-pwm with a rate of 10MHz. A carrier of 455kHz has a period of 2198ns, but the arithmetic truncates this to 2100ns rather than 2200ns. So, use DIV_ROUND_CLOSEST() to reduce rounding errors, and we have a much more accurate carrier of 454.5kHz. Reported-by: Andreas Christ Signed-off-by: Sean Young Acked-by: Stefan Wahren Signed-off-by: Thierry Reding drivers/pwm/pwm-bcm2835.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 3f467ebe9e898c6ceec5334d92bccac2bd9bc7d2 Author: Nikolaus Voss Date: Wed Jun 12 10:36:08 2019 +0200 leds: pwm: Support ACPI via firmware-node framework DT specific handling is replaced by firmware-node abstration to support ACPI specification of PWM LEDS. Example ASL: Device (PWML) { Name (_HID, "PRP0001") Name (_DSD, Package () { ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), Package () { Package () {"compatible", Package () {"pwm-leds"}}}}) Device (PWL0) { Name (_HID, "PRP0001") Name (_DSD, Package () { ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), Package () { Package () {"label", "alarm-led"}, Package () {"pwms", Package () {\_SB_.PCI0.PWM, 0, 600000, 0}}, Package () {"linux,default-state", "off"}}}) } } Signed-off-by: Nikolaus Voss Acked-by: Pavel Machek Signed-off-by: Thierry Reding drivers/leds/leds-pwm.c | 45 +++++++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 18 deletions(-) commit 4a6ef8e37c4d9a40f09438068da1734fd965bd75 Author: Nikolaus Voss Date: Wed Jun 12 10:36:07 2019 +0200 pwm: Add support referencing PWMs from ACPI In analogy to referencing a GPIO using the "gpios" property from ACPI, support referencing a PWM using the "pwms" property. ACPI entries must look like Package () {"pwms", Package () { , , [, ]}} In contrast to the DT implementation, only _one_ PWM entry in the "pwms" property is supported. As a consequence "pwm-names"-property and con_id lookup aren't supported. Support for ACPI is added via the firmware-node framework which is an abstraction layer on top of ACPI/DT. To keep this patch clean, DT and ACPI paths are kept separate. The firmware-node framework could be used to unify both paths in a future patch. To support leds-pwm driver, an additional method devm_fwnode_pwm_get() which supports both ACPI and DT configuration is exported. Signed-off-by: Nikolaus Voss [thierry.reding@gmail.com: fix build failures for !ACPI] Signed-off-by: Thierry Reding drivers/pwm/core.c | 122 ++++++++++++++++++++++++++++++++++++++++++++++++++++ include/linux/pwm.h | 10 +++++ 2 files changed, 132 insertions(+) commit 4a5fa56cc031274738ddc86b3ec0c5d1e21822b3 Author: Yoshihiro Shimoda Date: Fri May 31 18:55:01 2019 +0900 pwm: rcar: Remove suspend/resume support According to the Documentation/pwm.txt, all PWM consumers should implement power management instead of the PWM driver. So, this patch removes suspend/resume support. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Thierry Reding drivers/pwm/pwm-rcar.c | 39 --------------------------------------- 1 file changed, 39 deletions(-) commit 7fd4edc57bbae9bd62838ebf69d3abfaf8f01173 Author: Yoshihiro Shimoda Date: Fri May 31 18:55:00 2019 +0900 pwm: sysfs: Add suspend/resume support According to the Documentation/pwm.txt, all PWM consumers should have power management. Since this sysfs interface is one of consumers so that this patch adds suspend/resume support. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman [thierry.reding@gmail.com: fix build warnings for !PM] Signed-off-by: Thierry Reding drivers/pwm/sysfs.c | 102 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) commit 321a7cea973b4f63bb7e3baaea8428dfb8b424a9 Author: Yoshihiro Shimoda Date: Fri May 31 18:54:58 2019 +0900 pwm: Add power management descriptions This patch adds power management descriptions that consumers should implement it. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Thierry Reding Documentation/pwm.txt | 7 +++++++ 1 file changed, 7 insertions(+) commit 4ae42ce793a755decb2c5978623e56edfdf3ab39 Author: Martin Blumenstingl Date: Wed Jun 12 21:59:11 2019 +0200 pwm: meson: Add documentation to the driver Add links to the datasheet and a short summary how the hardware works. The goal is to make it easier for other developers to understand why the pwm-meson driver is implemented the way it is. Suggested-by: Uwe Kleine-König Co-authored-by: Neil Armstrong Reviewed-by: Neil Armstrong Signed-off-by: Martin Blumenstingl Signed-off-by: Thierry Reding drivers/pwm/pwm-meson.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 7341c785d81ebf5472462b7f8ee27a96a59d5cf4 Author: Martin Blumenstingl Date: Wed Jun 12 21:59:10 2019 +0200 pwm: meson: Add support PWM_POLARITY_INVERSED when disabling meson_pwm_apply() has to consider the PWM polarity when disabling the output. With enabled=false and polarity=PWM_POLARITY_NORMAL the output needs to be LOW. The driver already supports this. With enabled=false and polarity=PWM_POLARITY_INVERSED the output needs to be HIGH. Implement this in the driver by internally enabling the output with the same settings that we already use for "period == duty". This fixes a PWM API violation which expects that the driver honors the polarity also for enabled=false. Due to the IP block not supporting this natively we only get "an as close as possible" to 100% HIGH signal (in my test setup with input clock of 24MHz and measuring the output with a logic analyzer at 24MHz sampling rate I got a duty cycle of 99.998475% on a Khadas VIM). Reviewed-by: Neil Armstrong Signed-off-by: Martin Blumenstingl Signed-off-by: Thierry Reding drivers/pwm/pwm-meson.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) commit d6885b3e0a39ba7f93d4dc77ed9112e44a09b40d Author: Martin Blumenstingl Date: Wed Jun 12 21:59:09 2019 +0200 pwm: meson: Don't cache struct pwm_state internally The PWM core already caches the "current struct pwm_state" as the "current state of the hardware registers" inside struct pwm_device. Drop the struct pwm_state from struct meson_pwm_channel in favour of the struct pwm_state in struct pwm_device. While here also drop any checks based on the pwm_state because the PWM core already takes care of this. No functional changes intended. Reviewed-by: Neil Armstrong Signed-off-by: Martin Blumenstingl Signed-off-by: Thierry Reding drivers/pwm/pwm-meson.c | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) commit c375bcbaabdb92f0c007a044cda90450eef5ab43 Author: Martin Blumenstingl Date: Wed Jun 12 21:59:08 2019 +0200 pwm: meson: Read the full hardware state in meson_pwm_get_state() Update the meson_pwm_get_state() implementation to take care of all information in the registers instead of only reading the "enabled" state. The PWM output is only enabled if two conditions are met: 1. the per-channel clock is enabled 2. the PWM output is enabled Calculate the PWM period and duty cycle using the reverse formula which we already have in meson_pwm_calc() and update struct pwm_state with the results. As result of this /sys/kernel/debug/pwm now shows the PWM state set by the bootloader (or firmware) after booting Linux. Reviewed-by: Neil Armstrong Signed-off-by: Martin Blumenstingl Signed-off-by: Thierry Reding drivers/pwm/pwm-meson.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 49 insertions(+), 3 deletions(-) commit fb2081e870e9d59a0e6d076989e04c932c3ba23d Author: Martin Blumenstingl Date: Wed Jun 12 21:59:07 2019 +0200 pwm: meson: Simplify the calculation of the pre-divider and count Replace the loop to calculate the pre-divider and count with two separate div64_u64() calculations. This makes the code easier to read and improves the precision. Three example cases: 1) 32.768kHz LPO clock for the SDIO wifi chip on Khadas VIM clock input: 500MHz (FCLK_DIV4) period: 30518ns duty cycle: 15259ns old algorithm: pre_div=0, cnt=15259 new algorithm: pre_div=0, cnt=15259 (no difference in calculated values) 2) PWM LED on Khadas VIM clock input: 24MHz (XTAL) period: 7812500ns duty cycle: 7812500ns old algorithm: pre_div=2, cnt=62004 new algorithm: pre_div=2, cnt=62500 Using a scope (24MHz sampling rate) shows the actual difference: - old: 7753000ns, off by -59500ns (0.7616%) - new: 7815000ns, off by +2500ns (0.032%) 3) Theoretical case where pre_div is different clock input: 24MHz (XTAL) period: 2730624ns duty cycle: 1365312ns old algorithm: pre_div=1, cnt=32768 new algorithm: pre_div=0, cnt=65534 Using a scope (24MHz sampling rate) shows the actual difference: - old: 2731000ns - new: 2731000ns (my scope is not precise enough to measure the difference if there's any) Suggested-by: Uwe Kleine-König Acked-by: Uwe Kleine-König Reviewed-by: Neil Armstrong Signed-off-by: Martin Blumenstingl Signed-off-by: Thierry Reding drivers/pwm/pwm-meson.c | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) commit 1064c6bacedd70edfcea6b1b6af529f621e681ae Author: Martin Blumenstingl Date: Wed Jun 12 21:59:06 2019 +0200 pwm: meson: Move pwm_set_chip_data() to meson_pwm_request() All existing PWM drivers (except pwm-meson and two other ones) call pwm_set_chip_data() from their pwm_ops.request() callback. Now that we can access the struct meson_pwm_channel from struct meson_pwm we can do the same. Move the call to pwm_set_chip_data() to meson_pwm_request() and drop the custom meson_pwm_add_channels(). This makes the implementation consistent with other drivers and makes it slightly more obvious thatpwm_get_chip_data() cannot be used from pwm_ops.get_state() (because that's called by the PWM core before pwm_ops.request()). No functional changes intended. Reviewed-by: Neil Armstrong Signed-off-by: Martin Blumenstingl Signed-off-by: Thierry Reding drivers/pwm/pwm-meson.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) commit 8bbf316453818a47468702f26804e4ced3065c0f Author: Martin Blumenstingl Date: Wed Jun 12 21:59:05 2019 +0200 pwm: meson: Add the per-channel register offsets and bits in a struct Introduce struct meson_pwm_channel_data which contains the per-channel offsets for the PWM register and REG_MISC_AB bits. Replace the existing switch (pwm->hwpwm) statements with an access to the new struct. This simplifies the code and will make it easier to implement pwm_ops.get_state() because the switch-case which all per-channel registers and offsets (as previously implemented in meson_pwm_enable()) doesn't have to be duplicated. No functional changes intended. Reviewed-by: Neil Armstrong Signed-off-by: Martin Blumenstingl Signed-off-by: Thierry Reding drivers/pwm/pwm-meson.c | 90 +++++++++++++++++++------------------------------ 1 file changed, 34 insertions(+), 56 deletions(-) commit a50a49a45140a85e3cb8d02859e13b78fafd030b Author: Martin Blumenstingl Date: Wed Jun 12 21:59:04 2019 +0200 pwm: meson: Add the meson_pwm_channel data to struct meson_pwm Make struct meson_pwm_channel accessible from struct meson_pwm. PWM core has a limitation: per-channel data can only be set after pwmchip_add() is called. However, pwmchip_add() internally calls pwm_ops.get_state(). If pwm_ops.get_state() needs access to the per-channel data it has to obtain it from struct pwm_chip and struct pwm_device's hwpwm information. Add a struct meson_pwm_channel for each PWM channel to struct meson_pwm so the pwm_ops.get_state() callback can be implemented as it needs access to the clock from struct meson_pwm_channel. Reviewed-by: Neil Armstrong Signed-off-by: Martin Blumenstingl Signed-off-by: Thierry Reding drivers/pwm/pwm-meson.c | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) commit 7e0321629c2a7b0e67ce451e566e7d6ce8601d65 Author: Martin Blumenstingl Date: Wed Jun 12 21:59:03 2019 +0200 pwm: meson: Pass struct pwm_device to meson_pwm_calc() meson_pwm_calc() is the last function that accepts a struct meson_pwm_channel. meson_pwm_enable(), meson_pwm_disable() and meson_pwm_apply() for example are all taking a struct pwm_device as parameter. When they need the struct meson_pwm_channel these functions simply call pwm_get_chip_data() internally. Make meson_pwm_calc() consistent with the other functions in the meson-pwm driver by passing struct pwm_device to it as well. The value of the "id" parameter is actually pwm->hwpwm, but the driver never read the "id" parameter, which is why there's no replacement for it in the new code. No functional changes. Reviewed-by: Neil Armstrong Signed-off-by: Martin Blumenstingl Signed-off-by: Thierry Reding drivers/pwm/pwm-meson.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b79c3670e120c6c6aee313c56acd9bbb13db310f Author: Martin Blumenstingl Date: Wed Jun 12 21:59:02 2019 +0200 pwm: meson: Don't duplicate the polarity internally Let meson_pwm_calc() use the polarity from struct pwm_state directly. This removes a level of indirection where meson_pwm_apply() first had to set a driver-internal inverter mask which was then only used by meson_pwm_calc(). Instead of adding the polarity as parameter to meson_pwm_calc() switch to struct pwm_state directly to make it easier to see where the parameters are actually coming from. Reviewed-by: Neil Armstrong Signed-off-by: Martin Blumenstingl Signed-off-by: Thierry Reding drivers/pwm/pwm-meson.c | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) commit 33cefd84d26b59e071b3172b0e3ca979163f39eb Author: Martin Blumenstingl Date: Wed Jun 12 21:59:01 2019 +0200 pwm: meson: Change MISC_CLK_SEL_WIDTH to MISC_CLK_SEL_MASK MISC_CLK_SEL_WIDTH is only used in one place where it's converted into a bit-mask. Rename and change the macro to be a bit-mask so that conversion is not needed anymore. No functional changes intended. Reviewed-by: Neil Armstrong Signed-off-by: Martin Blumenstingl Signed-off-by: Thierry Reding drivers/pwm/pwm-meson.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 181164b669c91eccafa2d276ac32873310dec465 Author: Martin Blumenstingl Date: Wed Jun 12 21:59:00 2019 +0200 pwm: meson: Use GENMASK and FIELD_PREP for the lo and hi values meson_pwm_calc() ensures that "lo" is always less than 16 bits wide (otherwise it would overflow into the "hi" part of the REG_PWM_{A,B} register). Use GENMASK and FIELD_PREP for the lo and hi values to make it easier to spot how wide these are internally. Additionally this is a preparation step for the .get_state() implementation where the GENMASK() for lo and hi becomes handy because it can be used with FIELD_GET() to extract the values from the register REG_PWM_{A,B} register. No functional changes intended. Reviewed-by: Neil Armstrong Reviewed-by: Uwe Kleine-König Signed-off-by: Martin Blumenstingl Signed-off-by: Thierry Reding drivers/pwm/pwm-meson.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit ba4004c715c906474ae84f1f9a97f55d3259c6bd Author: Martin Blumenstingl Date: Wed Jun 12 21:58:59 2019 +0200 pwm: meson: Use devm_clk_get_optional() to get the input clock Simplify the code which fetches the input clock for a PWM channel by using devm_clk_get_optional(). This comes with a small functional change: previously all errors except EPROBE_DEFER were ignored. Now all other errors are also treated as errors. If no input clock is present devm_clk_get_optional() will return NULL instead of an error which matches the behavior of the old code. Reviewed-by: Neil Armstrong Reviewed-by: Uwe Kleine-König Signed-off-by: Martin Blumenstingl Signed-off-by: Thierry Reding drivers/pwm/pwm-meson.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 084f137600f436819323adc56da8cd8df87a68b9 Author: Martin Blumenstingl Date: Wed Jun 12 21:58:58 2019 +0200 pwm: meson: Unify the parameter list of meson_pwm_{enable, disable} This is a preparation for a future cleanup. Pass struct pwm_device instead of passing the individual values required by each function as these can be obtained for each struct pwm_device instance. As a nice side-effect the driver now uses "switch (pwm->hwpwm)" everywhere. Before some functions used "switch (id)" while others used "switch (pwm->hwpwm)". No functional changes. Reviewed-by: Neil Armstrong Reviewed-by: Uwe Kleine-König Signed-off-by: Martin Blumenstingl Signed-off-by: Thierry Reding drivers/pwm/pwm-meson.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 6580fd173070a3a494d94b40d7ca5e5a815fe29a Author: Paul Cercueil Date: Fri Jun 7 17:44:09 2019 +0200 pwm: jz4740: Force TCU2 channels to return to their init level When the PWM mode of TCU2 channels is disabled, their corresponding pin does not always return to its initial level. Force this by using a small trick: we set duty > period, which is an invalid configuration for the hardware, which then correctly resets the pin to the initial level. Signed-off-by: Paul Cercueil Signed-off-by: Thierry Reding drivers/pwm/pwm-jz4740.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 407d0fff22667598fe3602965f0e0bf78dabdca5 Author: Viresh Kumar Date: Thu Jun 20 08:35:46 2019 +0530 cpufreq: Remove redundant !setpolicy check cpufreq_start_governor() is only called for !setpolicy case, checking it again is not required. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e7600865db32b69deb0109b8254244dca592adcf Author: Felix Kaechele Date: Tue Jun 25 16:48:59 2019 -0400 netfilter: ctnetlink: Fix regression in conntrack entry deletion Commit f8e608982022 ("netfilter: ctnetlink: Resolve conntrack L3-protocol flush regression") introduced a regression in which deletion of conntrack entries would fail because the L3 protocol information is replaced by AF_UNSPEC. As a result the search for the entry to be deleted would turn up empty due to the tuple used to perform the search is now different from the tuple used to initially set up the entry. For flushing the conntrack table we do however want to keep the option for nfgenmsg->version to have a non-zero value to allow for newer user-space tools to request treatment under the new behavior. With that it is possible to independently flush tables for a defined L3 protocol. This was introduced with the enhancements in in commit 59c08c69c278 ("netfilter: ctnetlink: Support L3 protocol-filter on flush"). Older user-space tools will retain the behavior of flushing all tables regardless of defined L3 protocol. Fixes: f8e608982022 ("netfilter: ctnetlink: Resolve conntrack L3-protocol flush regression") Suggested-by: Pablo Neira Ayuso Signed-off-by: Felix Kaechele Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_netlink.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit bcc61569997b2188ba89db43b5b991da01ea2d18 Author: Daniel Lezcano Date: Tue Jun 25 13:32:41 2019 +0200 cpufreq: Move the IS_ENABLED(CPU_THERMAL) macro into a stub cpufreq_online() and cpufreq_offline() [un]register the driver as a cooling device. This is done if the driver is flagged as a cooling device in addition with an IS_ENABLED() check to compile out the branching code. Group this test in a stub function added in the cpufreq header instead of having the IS_ENABLED() in the code. Suggested-by: Rafael J. Wysocki Signed-off-by: Daniel Lezcano Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq.c | 6 ++---- include/linux/cpufreq.h | 6 ++++++ 2 files changed, 8 insertions(+), 4 deletions(-) commit 41de256b6fd44db5077bc0cbf673d75ae4bcc7d0 Merge: 4b972a01a7da 560d1bcad715 Author: Rafael J. Wysocki Date: Wed Jun 26 10:53:57 2019 +0200 Merge branch 'opp/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm Pull operating performance points (OPP) framework changes for v5.3 from Viresh Kumar: "This pull request contains: - OPP core changes to support a wider range of devices, like IO devices (Rajendra Nayak and Stehpen Boyd). - Fixes around genpd_virt_devs (Viresh Kumar). - Fix for platform with set_opp() callback (Dmitry Osipenko)." * 'opp/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: opp: Don't use IS_ERR on invalid supplies opp: Make dev_pm_opp_set_rate() handle freq = 0 to drop performance votes opp: Don't overwrite rounded clk rate opp: Allocate genpd_virt_devs from dev_pm_opp_attach_genpd() opp: Attach genpds to devices from within OPP core commit fba7402017f95c75281991c58d25f1836c04d9bd Merge: 2d4a79ae3404 f9020441dbc3 Author: Rafael J. Wysocki Date: Wed Jun 26 10:51:27 2019 +0200 Merge branch 'cpufreq/arm/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm Pull ARM cpufreq changes for v5.3 from Viresh Kumar: "This pull request contains: - Minor fixes for brcmstb driver (Florian). - New imx-cpufreq driver, its bindings and code around it (Leonard). - New Raspberry Pi driver (Nicolas). - Minor fix for s5pv210 driver (Pawel). - Minor cleanup for armada driver (YueHaibing)." * 'cpufreq/arm/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: cpufreq: s5pv210: Don't flood kernel log after cpufreq change cpufreq: add driver for Raspberry Pi cpufreq: Switch imx7d to imx-cpufreq-dt for speed grading cpufreq: imx-cpufreq-dt: Remove global platform match list cpufreq: brcmstb-avs-cpufreq: Fix types for voltage/frequency cpufreq: brcmstb-avs-cpufreq: Fix initial command check cpufreq: armada-37xx: Remove set but not used variable 'freq' cpufreq: imx-cpufreq-dt: Fix no OPPs available on unfused parts dt-bindings: imx-cpufreq-dt: Document opp-supported-hw usage cpufreq: Add imx-cpufreq-dt driver commit 6116b892bd4fd0ddc5f30566a556218bb2e1a9b6 Author: Daniel Vetter Date: Mon Jun 24 11:21:53 2019 +0200 vga_switcheroo: Depend upon fbcon being built-in, if enabled Fixes linking fail when fbcon/fbdev is modular and vgaswitcheroo is enabled: x86_64-linux-gnu-ld: drivers/gpu/vga/vga_switcheroo.o: in function `vga_switchto_stage2': vga_switcheroo.c:(.text+0x997): undefined reference to `fbcon_remap_all' Unfortunately this means that in a default allmodconfig we will disable vgaswitcheroo. v2: I first tried to fix this with an EXPORT_SYMBOL, but vga_switcheroo is never a module, so this doesn't work. Reported-by: Stephen Rothwell Reported-by: kbuild test robot Fixes: 1cd51b5d200d ("vgaswitcheroo: call fbcon_remap_all directly") Signed-off-by: Daniel Vetter Cc: Stephen Rothwell Cc: Lukas Wunner Cc: Daniel Vetter Cc: Sam Ravnborg Cc: Maarten Lankhorst Cc: David Airlie Cc: Daniel Vetter Cc: Maxime Ripard Cc: Sean Paul Cc: Bartlomiej Zolnierkiewicz Cc: Hans de Goede Cc: Yisheng Xie Cc: linux-fbdev@vger.kernel.org Cc: Daniel Thompson Cc: Lee Jones Cc: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20190624092153.23375-1-daniel.vetter@ffwll.ch drivers/gpu/vga/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 0937fbb7abeb165ef0ac6a56a3a6f041eca6dbde Author: Randy Dunlap Date: Tue Jun 25 18:10:40 2019 -0700 extcon: fsa9480: Fix Kconfig warning and build errors Fix Kconfig dependency warning and subsequent build errors caused by the Kconfig entry for EXTCON-FSA9480. It should not select REGMAP_I2C unless I2C is already set/enabled. WARNING: unmet direct dependencies detected for REGMAP_I2C Depends on [n]: I2C [=n] Selected by [y]: - EXTCON_FSA9480 [=y] && EXTCON [=y] && INPUT [=y] Signed-off-by: Randy Dunlap [cw00.choi: adjust the patch title and remove the long warning messages] Signed-off-by: Chanwoo Choi drivers/extcon/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4cb8df37a74102cfbd4ce4cb470b888f1fc6ae77 Author: Charles Keepax Date: Tue Jun 25 16:39:14 2019 +0100 pinctrl: madera: Fixup SPDX headers GPL-2.0-only is the preferred way of expressing v2 of the GPL, so switch to that. Remove some redundant copyright notices and correct some instances where the wrong comment type has been used in header files. Signed-off-by: Charles Keepax Signed-off-by: Linus Walleij drivers/pinctrl/cirrus/pinctrl-cs47l35.c | 6 +----- drivers/pinctrl/cirrus/pinctrl-cs47l85.c | 6 +----- drivers/pinctrl/cirrus/pinctrl-cs47l90.c | 6 +----- drivers/pinctrl/cirrus/pinctrl-madera-core.c | 6 +----- drivers/pinctrl/cirrus/pinctrl-madera.h | 6 +----- 5 files changed, 5 insertions(+), 25 deletions(-) commit 690499d969bc5054ed43a9ef0c96f26d478fff6e Author: Charles Keepax Date: Tue Jun 25 16:39:15 2019 +0100 gpio: madera: Fixup SPDX headers GPL-2.0-only is the preferred way of expressing v2 of the GPL, so switch to that and remove some redundant copyright notices. Signed-off-by: Charles Keepax Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-madera.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit e70980312a946a56173843cbc0104b3b0e57a0c7 Author: Thomas Gleixner Date: Mon Jun 24 02:34:24 2019 +0200 MAINTAINERS: Add entry for the generic VDSO library Assign the following folks in alphabetic order: - Andy for being the VDSO wizard of x86 and in general. He's also the performance monitor of choice and the code in the generic library is heavily influenced by his previous x86 VDSO work. - Thomas for being the dude who has to deal with any form of time(r) nonsense anyway - Vincenzo for being the poor sod who went through all the different architecture implementations in order to unify them. A lot of knowledge gained from VDSO implementation details to the intricacies of taming the build system. Signed-off-by: Thomas Gleixner Cc: Vincenzo Frascino Cc: linux-arch@vger.kernel.org Cc: LAK Cc: linux-mips@vger.kernel.org Cc: linux-kselftest@vger.kernel.org Cc: Catalin Marinas Cc: Will Deacon Cc: Arnd Bergmann Cc: Russell King Cc: Ralf Baechle Cc: Paul Burton Cc: Daniel Lezcano Cc: Mark Salyzyn Cc: Peter Collingbourne Cc: Shuah Khan Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Rasmus Villemoes Cc: Huw Davies Cc: Shijith Thotton Cc: Andre Przywara Cc: Dmitry Safonov Cc: Andrei Vagin Cc: Linus Torvalds Cc: Andy Lutomirski Cc: Michael Kelley Cc: Sasha Levin Link: https://lkml.kernel.org/r/alpine.DEB.2.21.1906240142000.32342@nanos.tec.linutronix.de MAINTAINERS | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 6a5b78b32d10cd7901f639870eca304b270769f9 Author: Catalin Marinas Date: Mon Jun 24 15:00:19 2019 +0100 arm64: compat: No need for pre-ARMv7 barriers on an ARMv8 system Remove the deprecated (pre-ARMv7) compat barriers as they would not be used on an ARMv8 system. Fixes: a7f71a2c8903 ("arm64: compat: Add vDSO") Signed-off-by: Catalin Marinas Signed-off-by: Thomas Gleixner Cc: Vincenzo Frascino Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mips@vger.kernel.org Cc: linux-kselftest@vger.kernel.org Cc: Will Deacon Cc: Arnd Bergmann Cc: Russell King Cc: Ralf Baechle Cc: Paul Burton Cc: Daniel Lezcano Cc: Mark Salyzyn Cc: Peter Collingbourne Cc: Shuah Khan Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Rasmus Villemoes Cc: Huw Davies Cc: Shijith Thotton Cc: Andre Przywara Link: https://lkml.kernel.org/r/20190624140018.GD29120@arrakis.emea.arm.com arch/arm64/include/asm/vdso/compat_barrier.h | 7 ------- 1 file changed, 7 deletions(-) commit 94fee4d43752b6022428d9de402632904968e15b Author: Catalin Marinas Date: Mon Jun 24 14:58:12 2019 +0100 arm64: vdso: Remove unnecessary asm-offsets.c definitions Since the VDSO code has moved to C from assembly, there is no need to define and maintain the corresponding asm offsets. Fixes: 28b1a824a4f4 ("arm64: vdso: Substitute gettimeofday() with C implementation") Signed-off-by: Catalin Marinas Signed-off-by: Thomas Gleixner Cc: Vincenzo Frascino Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mips@vger.kernel.org Cc: linux-kselftest@vger.kernel.org Cc: Will Deacon Cc: Arnd Bergmann Cc: Russell King Cc: Ralf Baechle Cc: Paul Burton Cc: Daniel Lezcano Cc: Mark Salyzyn Cc: Peter Collingbourne Cc: Shuah Khan Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Rasmus Villemoes Cc: Huw Davies Cc: Shijith Thotton Cc: Andre Przywara Link: https://lkml.kernel.org/r/20190624135812.GC29120@arrakis.emea.arm.com arch/arm64/kernel/asm-offsets.c | 39 --------------------------------------- 1 file changed, 39 deletions(-) commit ed75e8f60bb1d41d751ccad470e15bc2a57adee6 Author: Catalin Marinas Date: Mon Jun 24 14:56:24 2019 +0100 vdso: Remove superfluous #ifdef __KERNEL__ in vdso/datapage.h With the move to UAPI headers, such #ifdefs are no longer necessary. Fixes: 361f8aee9b09 ("vdso: Define standardized vdso_datapage") Signed-off-by: Catalin Marinas Signed-off-by: Thomas Gleixner Cc: Vincenzo Frascino Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mips@vger.kernel.org Cc: linux-kselftest@vger.kernel.org Cc: Will Deacon Cc: Arnd Bergmann Cc: Russell King Cc: Ralf Baechle Cc: Paul Burton Cc: Daniel Lezcano Cc: Mark Salyzyn Cc: Peter Collingbourne Cc: Shuah Khan Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Rasmus Villemoes Cc: Huw Davies Cc: Shijith Thotton Cc: Andre Przywara Link: https://lkml.kernel.org/r/20190624135624.GB29120@arrakis.emea.arm.com include/vdso/datapage.h | 4 ---- 1 file changed, 4 deletions(-) commit 426d3ff2f5ab7207aea0c1769d74b25a7b51b4dd Author: Yoshihiro Shimoda Date: Tue Jun 25 14:38:57 2019 +0900 usb: renesas_usbhs: Use struct platform_callback pointer Now the driver fixes the issue of the commit 482982062f1b ("usb: gadget: renesas_usbhs: bugfix: don't modify platform data") by using usbhs_mod_info.get_vbus, this patches uses the pointer instead of copied value to avoid redundancy. Note that struct renesas_usbhs_driver_param has to use copied value because the driver has to set some members (e.g. buswait_bwait). Signed-off-by: Yoshihiro Shimoda Signed-off-by: Greg Kroah-Hartman drivers/usb/renesas_usbhs/common.c | 8 ++++---- drivers/usb/renesas_usbhs/common.h | 2 +- drivers/usb/renesas_usbhs/mod.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) commit 76eff170bb05e59218008a21df670cb7177110e4 Author: Yoshihiro Shimoda Date: Tue Jun 25 14:38:56 2019 +0900 usb: renesas_usbhs: Use renesas_usbhs_platform_info on of_device_id.data In device tree environment, the previous code allocates renesas_usbhs_platform_info by using devm_kzalloc() and then copies usbhs_of_data to the allocated memory. This reason is some values (e.g. .platform_callback.get_vbus) are overwritten by the driver, but the of_device_id.data is "const". Now the driver doesn't have such a code, so this patch uses renesas_usbhs_platform_info on of_device_id.data. Note that the previous code set the pdev->dev.platform_data pointer even if device tree environment, but the value is not used. So, this patch also remove such a code. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Greg Kroah-Hartman drivers/usb/renesas_usbhs/common.c | 93 +++++++------------------------------- drivers/usb/renesas_usbhs/common.h | 5 -- drivers/usb/renesas_usbhs/rcar2.c | 16 +++++-- drivers/usb/renesas_usbhs/rcar2.h | 3 +- drivers/usb/renesas_usbhs/rcar3.c | 26 ++++++++--- drivers/usb/renesas_usbhs/rcar3.h | 5 +- drivers/usb/renesas_usbhs/rza.c | 11 +++-- drivers/usb/renesas_usbhs/rza.h | 4 +- drivers/usb/renesas_usbhs/rza2.c | 17 +++++-- 9 files changed, 73 insertions(+), 107 deletions(-) commit be0a42a7d62605cfcabd8cbba6c104a80471cd94 Author: Yoshihiro Shimoda Date: Tue Jun 25 14:38:55 2019 +0900 usb: renesas_usbhs: Add a common function for the .get_id All platform related codes (rcar[23].c and rza{2}.c) has its own .get_id function as "USBHS_GADGET". So, we can use a common function for it. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Greg Kroah-Hartman drivers/usb/renesas_usbhs/common.c | 5 +++++ drivers/usb/renesas_usbhs/common.h | 2 ++ drivers/usb/renesas_usbhs/rcar2.c | 8 ++------ drivers/usb/renesas_usbhs/rcar3.c | 11 +++-------- drivers/usb/renesas_usbhs/rza.c | 9 ++------- drivers/usb/renesas_usbhs/rza2.c | 7 +------ 6 files changed, 15 insertions(+), 27 deletions(-) commit b3103d0b022f8ce87d68994417bbf2765329da3a Author: Yoshihiro Shimoda Date: Tue Jun 25 14:38:54 2019 +0900 usb: renesas_usbhs: move device tree properties parsing In the future, each struct renesas_usbhs_driver_param is stored on the each platform related source code (e.g. rcar3.c) to remove usbhs_parse_dt(). So, this patch moves device tree properties parsing to usbhs_probe(). Signed-off-by: Yoshihiro Shimoda Signed-off-by: Greg Kroah-Hartman drivers/usb/renesas_usbhs/common.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit f08acaf0096380235e2657089d8a5e09f6d4213f Author: Yoshihiro Shimoda Date: Tue Jun 25 14:38:53 2019 +0900 usb: renesas_usbhs: Add struct device * declaration in usbhs_probe() Since this can remove over 80 charactors in a line, this patch adds struct device * declaration in usbhs_probe(). Signed-off-by: Yoshihiro Shimoda Signed-off-by: Greg Kroah-Hartman drivers/usb/renesas_usbhs/common.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit 98e86506c24932a30f50ffcfcbc98b04e3c9bc60 Author: Yoshihiro Shimoda Date: Tue Jun 25 14:38:52 2019 +0900 usb: renesas_usbhs: Add has_new_pipe_configs flag In the future, each struct renesas_usbhs_driver_param is stored on the each platform related source code (e.g. rcar3.c). So, to simplify the source code, this patch adds a new flag has_new_pipe_configs. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Greg Kroah-Hartman drivers/usb/renesas_usbhs/common.c | 20 +++++++++----------- include/linux/usb/renesas_usbhs.h | 1 + 2 files changed, 10 insertions(+), 11 deletions(-) commit 31e795c61d60f7044e5e39eb94f4c5cfcb94108f Author: Yoshihiro Shimoda Date: Tue Jun 25 14:38:51 2019 +0900 usb: renesas_usbhs: Use dev_of_node macro instead of open coded This patch uses the dev_of_node macro instead of open coded to be better. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Greg Kroah-Hartman drivers/usb/renesas_usbhs/common.c | 14 +++++++------- drivers/usb/renesas_usbhs/fifo.c | 3 ++- 2 files changed, 9 insertions(+), 8 deletions(-) commit a4027b409fa98dc47418dacd3dcb5c99c5a76e4d Author: Yoshihiro Shimoda Date: Tue Jun 25 14:38:50 2019 +0900 usb: renesas_usbhs: Remove type member from renesas_usbhs_driver_param Now no one uses the type member so that this patch removes it. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Greg Kroah-Hartman drivers/usb/renesas_usbhs/common.c | 5 ----- include/linux/usb/renesas_usbhs.h | 7 ------- 2 files changed, 12 deletions(-) commit df9f2c278b69fcd8b04c89612310f0036d21ec4c Author: Yoshihiro Shimoda Date: Tue Jun 25 14:38:49 2019 +0900 usb: renesas_usbhs: Use a specific flag instead of type for multi_clks To remove the type of renesas_usbhs_driver_param in the future, this patch uses a specific flag "multi_clks". Signed-off-by: Yoshihiro Shimoda Signed-off-by: Greg Kroah-Hartman drivers/usb/renesas_usbhs/common.c | 8 +++----- include/linux/usb/renesas_usbhs.h | 1 + 2 files changed, 4 insertions(+), 5 deletions(-) commit ccc3264c2481c9bcbacfe935dc024aaab4423204 Author: Yoshihiro Shimoda Date: Tue Jun 25 14:38:48 2019 +0900 usb: renesas_usbhs: Avoid to write platform_data's value The very old commit 482982062f1b ("usb: gadget: renesas_usbhs: bugfix: don't modify platform data") changed to use copied whole structures values to fix the "hung-up" issue. However, we also can fix the issue if the driver copies the get_vbus function pointer to the driver's value. So, this patch adds get_vbus member into struct usbhs_mod_info and use the pointer instead of struct renesas_usbhs_platform_callback. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Greg Kroah-Hartman drivers/usb/renesas_usbhs/common.c | 4 +++- drivers/usb/renesas_usbhs/mod.c | 11 +++++++++-- drivers/usb/renesas_usbhs/mod.h | 7 +++++++ drivers/usb/renesas_usbhs/mod_gadget.c | 4 ++-- 4 files changed, 21 insertions(+), 5 deletions(-) commit edcf2b2c6629feac147e1a0abdbb3408769ff7e7 Author: Yoshihiro Shimoda Date: Tue Jun 25 14:38:47 2019 +0900 usb: renesas_usbhs: move macros from mod.c to the mod.h In the future, since other source code of this driver will use these macros, this patch moves it to the header file. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Greg Kroah-Hartman drivers/usb/renesas_usbhs/mod.c | 9 --------- drivers/usb/renesas_usbhs/mod.h | 9 +++++++++ 2 files changed, 9 insertions(+), 9 deletions(-) commit 0966648dd5a5f4037d29d233866b7a4db39d07f7 Author: Yoshihiro Shimoda Date: Tue Jun 25 14:38:46 2019 +0900 usb: renesas_usbhs: remove notify_hotplug callback The notify_hotplug callback was supported in v3.10, but the last user (armadillo800eva) was removed by the commit 1fa59bda21c7 ("ARM: shmobile: Remove legacy board code for Armadillo-800 EVA"). So, this patch removes it. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Greg Kroah-Hartman drivers/usb/renesas_usbhs/common.c | 16 ++++------------ drivers/usb/renesas_usbhs/common.h | 2 ++ drivers/usb/renesas_usbhs/mod.c | 3 ++- drivers/usb/renesas_usbhs/mod_gadget.c | 3 ++- include/linux/usb/renesas_usbhs.h | 26 +------------------------- 5 files changed, 11 insertions(+), 39 deletions(-) commit 8fac4fee2014e8b186981177b2ac74d172001a0d Author: Yoshihiro Shimoda Date: Tue Jun 25 14:38:45 2019 +0900 usb: renesas_usbhs: revise the irq_vbus comments Since the irq_vbus comments doesn't match with the current implementation, this patch revises it. This patch also changes new lines to reduce the source code lines. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Greg Kroah-Hartman drivers/usb/renesas_usbhs/mod.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 257adc0fbe9f0a26695f4d68bdbf2886f5a3ecd0 Author: Alan Stern Date: Tue Jun 25 16:00:26 2019 -0400 USB: core: Fix compiler warnings in devio.c In the current kernel, devio.c generates a number of compiler warnings about taking the address of a member of a packed structure. The warnings all look like this one: drivers/usb/core/devio.c: In function ‘proc_do_submiturb’: drivers/usb/core/devio.c:1489:43: warning: taking address of packed member of ‘struct usb_ctrlrequest’ may result in an unaligned pointer value [-Waddress-of-packed-member] 1489 | if (uurb->buffer_length < (le16_to_cpup(&dr->wLength) + 8)) { | ^~~~~~~~~~~~ These warnings can easily be eliminated by changing various le16_to_cpup() calls to use le16_to_cpu() instead. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/core/devio.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit ffed60971f3d95923b99ea970862c6ab6a22c20f Author: Alan Stern Date: Tue Jun 25 16:03:58 2019 -0400 USB: core: Remove usbfs_mutex Commit 4a2a8a2cce86 ("usbfs: private mutex for open, release, and remove") is now obsolete. The commit was created back when we had to handle both usbfs device nodes and the old usbdevfs filesystem (/proc/bus/usb/), but usbdevfs no longer exists. This means there's no longer any need to hold a mutex during two separate removal operations (and thus during an entire notifier chain call). Furthermore, the one remaining remove/release pair doesn't race with open thanks to the synchronization provided by the device model core in bus_find_device(). Remove and release don't race with each other because they both run with the device lock held. The upshot is that usbfs_mutex isn't needed any more. This patch removes it entirely. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/core/devio.c | 9 --------- drivers/usb/core/notify.c | 3 --- drivers/usb/core/usb.h | 1 - 3 files changed, 13 deletions(-) commit b576576d6591f60f2f3ba0ac360309a431b69e55 Author: Anson Huang Date: Fri Jun 21 13:06:03 2019 +0800 arm64: defconfig: Enable CONFIG_KEYBOARD_SNVS_PWRKEY as module Enable CONFIG_KEYBOARD_SNVS_PWRKEY as module to support i.MX8M series SoCs' power key. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 0713820b9d582b1f843cd25aecabf27a5ceee1fb Author: Leonard Crestez Date: Wed Jun 5 13:37:09 2019 +0300 ARM: imx_v6_v7_defconfig: Enable CONFIG_ARM_IMX_CPUFREQ_DT This is used for imx7d speed grading. Signed-off-by: Leonard Crestez Signed-off-by: Shawn Guo arch/arm/configs/imx_v6_v7_defconfig | 1 + 1 file changed, 1 insertion(+) commit 7a2a373ef031d602e7e337a22d99a25c5497932c Author: Peng Fan Date: Fri May 24 14:39:12 2019 +0800 defconfig: arm64: enable i.MX8 SCU octop driver Build in CONFIG_NVMEM_IMX_OCOTP_SCU. Cc: Catalin Marinas Cc: Will Deacon Cc: Shawn Guo Cc: Andy Gross Cc: Maxime Ripard Cc: Olof Johansson Cc: Jagan Teki Cc: Bjorn Andersson Cc: Leonard Crestez Cc: Marc Gonzalez Cc: Enric Balletbo i Serra Cc: linux-arm-kernel@lists.infradead.org Reviewed-by: Dong Aisheng Signed-off-by: Peng Fan Signed-off-by: Shawn Guo arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit e64da43fba98688d0ae653698449960e90db0bc8 Author: Anson Huang Date: Fri May 24 01:52:43 2019 +0000 arm64: defconfig: Add i.MX SCU SoC info driver This patch selects CONFIG_IMX_SCU_SOC by default to support i.MX system controller unit SoC info driver. Signed-off-by: Anson Huang Reviewed-by: Abel Vesa Reviewed-by: Dong Aisheng Signed-off-by: Shawn Guo arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 6ec0c10b5aee72f5756cbcd0471cb51aa0622a29 Author: Anson Huang Date: Fri May 24 00:40:37 2019 +0000 arm64: defconfig: Enable CONFIG_QORIQ_THERMAL i.MX8MQ needs CONFIG_QORIQ_THERMAL for thermal support. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 3557c3669329aaebd66f70186cc4a2ab02277b50 Author: Fabio Estevam Date: Wed May 22 21:13:35 2019 -0300 ARM: imx_v6_v7_defconfig: Select CONFIG_NVMEM_SNVS_LPGPR The SNVS LPGPR hardware is present on several i.MX SoCs. Select its driver by default. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/configs/imx_v6_v7_defconfig | 1 + 1 file changed, 1 insertion(+) commit 2c3541c229f51b83ca74ece2e3353ad1b3cb54a2 Author: Leonard Crestez Date: Tue May 21 16:04:23 2019 +0800 arm64: defconfig: ARM_IMX_CPUFREQ_DT=m For imx8m we need a separate small driver to read "speed grading" information from fuses and determine which OPPs are supported. Signed-off-by: Leonard Crestez Signed-off-by: Shawn Guo arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 80b5962ed95de94910a8cebc9cb8063c2a9110d1 Author: Anson Huang Date: Sun May 12 08:51:15 2019 +0000 ARM: imx_v6_v7_defconfig: Add TPM PWM support by default Select CONFIG_PWM_IMX_TPM by default to support i.MX7ULP TPM PWM. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo arch/arm/configs/imx_v6_v7_defconfig | 1 + 1 file changed, 1 insertion(+) commit 2ec74ef83aece7f0f48186170a6046e3e3b63968 Author: Fabio Estevam Date: Sat May 4 11:46:45 2019 -0300 ARM: imx_v6_v7_defconfig: Enable the OV2680 camera driver Enable the OV2680 camera driver as it is used on the imx7s-warp board. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/configs/imx_v6_v7_defconfig | 1 + 1 file changed, 1 insertion(+) commit 6163c1ee5bd25927e94eea71cc2964badce350f3 Author: Anson Huang Date: Fri May 10 12:23:42 2019 +0000 ARM: imx_v6_v7_defconfig: Enable CONFIG_THERMAL_STATISTICS Enable CONFIG_THERMAL_STATISTICS to extend the sysfs interface for thermal cooling devices and expose some useful statistics. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo arch/arm/configs/imx_v6_v7_defconfig | 1 + 1 file changed, 1 insertion(+) commit 1e93acdcc7af1793d1ec70ec54bfc808320f7190 Author: Leonard Crestez Date: Mon Apr 22 10:33:53 2019 +0800 arm64: defconfig: NVMEM_IMX_OCOTP=y for imx8m Enable imx-ocotp nvmem driver for fuse access on imx8m family. The fuse block stores various system information which will be accessed by client device drivers, e.g. cpufreq driver needs to access fuse for CPU speed grading setting. So this nvmem driver gets enabled as built-in. Tested on imx8mm-evk. Signed-off-by: Leonard Crestez Signed-off-by: Shawn Guo arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit a5dedb5c98df60d931a05e711f60ad4fd94a2dc0 Author: Nishka Dasgupta Date: Mon Jun 24 11:19:03 2019 +0530 staging: rtl8712: Change return values of r8712_setrfreg_cmd() Change return values of function r8712_setrfreg_cmd from _SUCCESS/_FAIL to 0/-ENOMEM respectively. Modify call site accordingly. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_cmd.c | 8 ++++---- drivers/staging/rtl8712/rtl871x_cmd.h | 2 +- drivers/staging/rtl8712/rtl871x_ioctl_rtl.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) commit da8e81205e8f8eafebcffabbe10536371a0c4baa Author: Nishka Dasgupta Date: Mon Jun 24 11:19:02 2019 +0530 staging: rtl8712: Remove r8712_setassocsta_cmd() Remove function r8712_setassocsta_cmd as it is only called by mp_start_joinbss, which was removed in the previous patch. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_cmd.c | 29 ----------------------------- drivers/staging/rtl8712/rtl871x_cmd.h | 1 - 2 files changed, 30 deletions(-) commit a58cc341bbb81f1abf667b15de50b90c950d1ab6 Author: Nishka Dasgupta Date: Mon Jun 24 11:19:01 2019 +0530 staging: rtl8712: Remove mp_start_joinbss() Remove unused function mp_start_joinbss. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_mp_ioctl.c | 16 ---------------- drivers/staging/rtl8712/rtl871x_mp_ioctl.h | 2 -- 2 files changed, 18 deletions(-) commit 162c0dfac5803c382a7f13027491aff6426131b3 Author: Nishka Dasgupta Date: Mon Jun 24 11:19:00 2019 +0530 staging: rtl8712: Replace r8712_find_network() Remove function r8712_find_network as all it does is call _r8712_find_network. Rename _r8712_find_network to r8712_find_network for compatibility with call sites. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_mlme.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) commit d2179f3e9337ac0687ca2301e8db96aa381b0b46 Author: Nishka Dasgupta Date: Mon Jun 24 11:18:59 2019 +0530 staging: rtl8712: Remove r8712_setrttbl_cmd() Remove unused function r8712_setrttbl_cmd. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_cmd.c | 22 ---------------------- drivers/staging/rtl8712/rtl871x_cmd.h | 2 -- 2 files changed, 24 deletions(-) commit dc0f139b2ed8fd337bd3395e8dc8f6a3721877d0 Author: Nishka Dasgupta Date: Mon Jun 24 11:18:58 2019 +0530 staging: rtl8712: Replace r8712_free_evt_priv() Remove function r8712_free_evt_priv as all it does is call _free_evt_priv. Rename _free_evt_priv to r8712_free_evt_priv to maintain compatibility with call sites. Change type of new r8712_free_evt_priv from static to non-static to match old definition. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_cmd.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 03c05c470fe53246ff95bf84385162bfdf800a29 Author: Nishka Dasgupta Date: Mon Jun 24 11:18:57 2019 +0530 staging: rtl8712: Replace r8712_free_cmd_priv() Remove function r8712_free_cmd_priv as all it does is call _free_cmd_priv. Change type of new r8712_free_cmd_priv from static to non-static to match definition of original r8712_free_cmd_priv. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_cmd.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 6257450f891d3905e4e1db16fe9f9cdf49fc993d Author: Nishka Dasgupta Date: Mon Jun 24 11:18:56 2019 +0530 staging: rtl8712: Change return values of r8712_init_evt_priv() Change return values of the function r8712_init_evt_priv from _SUCCESS/_FAIL to 0/-ENOMEM. Modify call site accordingly. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/os_intfs.c | 2 +- drivers/staging/rtl8712/rtl871x_cmd.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 795eb36899ae697d898adc98d208b0bdb222d956 Author: Nishka Dasgupta Date: Mon Jun 24 11:18:55 2019 +0530 staging: rtl8712: Replace function r8712_init_evt_priv() Remove function r8712_init_evt_priv as all it does is call _init_evt_priv. Rename _init_evt_priv to r8712_init_evt_priv to maintain compatibility with call sites. Change type of new r8712_init_evt_priv from static to non-static as original r8712_init_evt_priv was non-static. Change return type of new r8712_init_evt_priv to int as original had return type u32 but new (formerly _init_evt_priv) had return type sint. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_cmd.c | 7 +------ drivers/staging/rtl8712/rtl871x_cmd.h | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) commit d91674322d1b9ae28b678d3683d522b56f1f367d Author: Nishka Dasgupta Date: Mon Jun 24 11:18:54 2019 +0530 staging: rtl8712: Change return values in r8712_init_cmd_priv() Change return values in r8712_init_cmd_priv from _SUCCESS/_FAIL to 0/-ENOMEM. Modify call site accordingly. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/os_intfs.c | 2 +- drivers/staging/rtl8712/rtl871x_cmd.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit 4a808fa3aa48663d6432e1078dea498b0e72e5d2 Author: Nishka Dasgupta Date: Tue Jun 25 23:47:09 2019 +0530 staging: vc04_services: Remove function block_resume() Remove function block_resume as it was only called by vchiq_arm_force_suspend, which was removed in a previous patch. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman .../vc04_services/interface/vchiq_arm/vchiq_arm.c | 66 ---------------------- 1 file changed, 66 deletions(-) commit efe06b2317f9eca18caedfc852f94e312a250f66 Author: Nishka Dasgupta Date: Tue Jun 25 23:47:08 2019 +0530 staging: vc04_services: Remove function output_timeout_error() Remove function output_timeout_error as it was only called by vchiq_arm_force_suspend, which was deleted in a previous patch. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman .../vc04_services/interface/vchiq_arm/vchiq_arm.c | 36 ---------------------- 1 file changed, 36 deletions(-) commit bf1ca0c6c208dfbf5af2d49cff31153358a1815b Author: Nishka Dasgupta Date: Tue Jun 25 23:47:07 2019 +0530 staging: vc04_services: Remove vchiq_send_remote_release() Remove unused function vchiq_send_remote_release. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman .../staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 11 ----------- .../staging/vc04_services/interface/vchiq_arm/vchiq_core.h | 3 --- 2 files changed, 14 deletions(-) commit 6795dbb8609d0782aa74691c55c129d3a20091e0 Author: Nishka Dasgupta Date: Tue Jun 25 23:47:06 2019 +0530 staging: vc04_services: Remove vchiq_use_service_no_resume() Remove unused function vchiq_use_service_no_resume. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman .../staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 14 -------------- .../staging/vc04_services/interface/vchiq_arm/vchiq_if.h | 2 -- 2 files changed, 16 deletions(-) commit 49d07ccb75201d56796b8891c6f9be64922e6064 Author: Nishka Dasgupta Date: Tue Jun 25 23:47:05 2019 +0530 staging: vc04_services: Remove vchiq_resume_internal() Remove unused function vchiq_resume_internal. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman .../vc04_services/interface/vchiq_arm/vchiq_core.c | 16 ---------------- .../vc04_services/interface/vchiq_arm/vchiq_core.h | 3 --- 2 files changed, 19 deletions(-) commit a4013c6422f09bf92530f40ead3cc44d94b83829 Author: Nishka Dasgupta Date: Tue Jun 25 23:47:04 2019 +0530 staging: vc04_services: Remove vchiq_pause_internal() Remove unused function vchiq_pause_internal. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman .../vc04_services/interface/vchiq_arm/vchiq_core.c | 23 ---------------------- .../vc04_services/interface/vchiq_arm/vchiq_core.h | 3 --- 2 files changed, 26 deletions(-) commit 248a58a3d765733218d7a64207a51d204ffec46a Author: Nishka Dasgupta Date: Tue Jun 25 23:47:03 2019 +0530 staging: vc04_services: Remove vchiq_arm_force_suspend() Remove unused function vchiq_arm_force_suspend. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman .../vc04_services/interface/vchiq_arm/vchiq_arm.c | 120 --------------------- .../vc04_services/interface/vchiq_arm/vchiq_arm.h | 3 - 2 files changed, 123 deletions(-) commit 49bc145285f8c8be6ad446cd000e1e2fb70407f0 Author: Nishka Dasgupta Date: Tue Jun 25 23:47:02 2019 +0530 staging: vc04_services: Remove function vchiq_arm_allow_resume() Remove unused function vchiq_arm_allow_resume. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman .../vc04_services/interface/vchiq_arm/vchiq_arm.c | 43 ---------------------- .../vc04_services/interface/vchiq_arm/vchiq_arm.h | 3 -- 2 files changed, 46 deletions(-) commit 74a2f3cb321261c7e985523e8386609f34928223 Author: Nishka Dasgupta Date: Tue Jun 25 23:47:01 2019 +0530 staging: vc04_services: Remove function vchiu_queue_is_full() Remove unused function vchiu_queue_is_full. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.c | 5 ----- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.h | 1 - 2 files changed, 6 deletions(-) commit 8e590ef5b20ce7ba73ebf1a7cf27c9a431a8a8aa Author: Simon Sandström Date: Tue Jun 25 10:41:28 2019 +0200 staging: kpc2000: add missing spaces in kpc2000_spi.c Fixes checkpatch errors: - spaces required around that '=' (ctx:VxV) - space required before the open parenthesis '(' - spaces preferred around that '-' (ctx:VxV) - space required before the open brace '{' Signed-off-by: Simon Sandström Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000_spi.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 03c1feff9e02ee84edd5b7e1cb26fede41a751c6 Author: Simon Sandström Date: Tue Jun 25 10:41:27 2019 +0200 staging: kpc2000: add missing spaces in kpc2000_i2c.c Fixes checkpatch "CHECK: spaces preferred around that '+' (ctx:VxV)". Signed-off-by: Simon Sandström Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000_i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b107b94b3be1e9777eb20f1729f12031788bf99a Author: Michael Straube Date: Sun Jun 23 19:59:57 2019 +0200 staging: rtl8188eu: remove unused function is_ap_in_wep() Function is_ap_in_wep() is not used in the driver code, so remove it. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_wlan_util.c | 30 ------------------------ drivers/staging/rtl8188eu/include/rtw_mlme_ext.h | 1 - 2 files changed, 31 deletions(-) commit 65e307d7dade7b24abbe1906add0cd793eb16d98 Author: Michael Straube Date: Sun Jun 23 19:59:56 2019 +0200 staging: rtl8188eu: remove unused function get_bsstype() Function get_bsstype() is not used in the driver code, so remove it. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_wlan_util.c | 10 ---------- drivers/staging/rtl8188eu/include/rtw_mlme_ext.h | 1 - 2 files changed, 11 deletions(-) commit 47c48c9e30bf010d0f58d94cd897d0c20af54cc8 Author: Shobhit Kukreti Date: Sat Jun 22 09:40:42 2019 -0700 staging: rtl8723bs: os_dep: Change return type of rtw_init_default_value() to void rtw_init_default_value() func always returns a value (u8)_SUCCESS. Modified return type to void to resolve coccicheck warnings of unneeded variable. Signed-off-by: Shobhit Kukreti Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/os_intfs.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 1e42a8871dbb16462ace8d4623f99cda4ef3a607 Author: Shobhit Kukreti Date: Sat Jun 22 09:40:41 2019 -0700 staging: rtl8723bs: os_dep: modified return type of function rtw_suspend_wow() to void Changed return type of function rtw_suspend_wow() to void. The function always return _SUCCESS and the value is never checked in the calling function. Resolves coccicheck Unneeded variable "ret" warning. Signed-off-by: Shobhit Kukreti Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/include/drv_types.h | 2 +- drivers/staging/rtl8723bs/os_dep/os_intfs.c | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) commit aa0d54db92158938316f182b6088d575259be254 Author: Shobhit Kukreti Date: Sat Jun 22 09:40:40 2019 -0700 staging: rtl8723bs: os_dep: Change return type of function rtw_suspend_normal() to void Coccicheck issues Unneeded variable "ret" warning. The return value of function rtw_suspend_normal() is set to _SUCCESS. The return value is never never checked by the calling function. Modified return type to void to remove the coccicheck warning.. Signed-off-by: Shobhit Kukreti Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/os_intfs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 864e69d0d108f625a93c1fcded2800f2849cede5 Author: Shobhit Kukreti Date: Sat Jun 22 08:23:08 2019 -0700 staging: rtl8723bs: os_dep: Modify return type of function rtw_reset_drv_sw() to void. The function rtw_reset_drv_sw() return value is set to _SUCCESS. The return value is never checked when the function is called. Modified the return value to void to remove "Unneeded Variable warning of coccicheck. Signed-off-by: Shobhit Kukreti Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/include/osdep_intf.h | 2 +- drivers/staging/rtl8723bs/os_dep/os_intfs.c | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) commit 3dadf62ca5b2b5f7c41af06bf8851eaed1adacba Author: Shobhit Kukreti Date: Sat Jun 22 08:23:07 2019 -0700 staging: rtl8723bs: os_dep: Modify return type of function loadparam(..) to void The function static uint loadparam(struct adapter *padapter, _nic_hdl pnetdev) return type is modified to void. The initial return value was always returning _SUCCESS and the return value is never checked when the function is called. This resolves coccicheck warnings of unneeded variables. Signed-off-by: Shobhit Kukreti Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/os_intfs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 6faeb505036d538b7ec71612aed389f9ef2ddb9e Author: Michael Straube Date: Sat Jun 22 17:14:49 2019 +0200 staging: rtl8188eu: remove hal_init_macaddr() Function hal_init_macaddr() just calls rtw_hal_set_hwreg(). Use rtw_hal_set_hwreg() directly and remove hal_init_macaddr(). Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/hal_com.c | 6 ------ drivers/staging/rtl8188eu/hal/usb_halinit.c | 3 ++- drivers/staging/rtl8188eu/include/hal_com.h | 1 - 3 files changed, 2 insertions(+), 8 deletions(-) commit 08289a56043f5e20821f1e2e21a153248338826b Author: Michael Straube Date: Sat Jun 22 17:14:48 2019 +0200 staging: rtl8188eu: cleanup lines ending with a '(' Cleanup checkpatch issues in usb_halinit.c. CHECK: Lines should not end with a '(' Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/usb_halinit.c | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) commit b6a76183dea8df67d5888493afe4181e260fad95 Author: Gao Xiang Date: Mon Jun 24 15:22:58 2019 +0800 staging: erofs: integrate decompression inplace Decompressor needs to know whether it's a partial or full decompression since only full decompression can be decompressed in-place. On kirin980 platform, sequential read is finally increased to 812MiB/s after decompression inplace is enabled. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman drivers/staging/erofs/internal.h | 3 +++ drivers/staging/erofs/unzip_vle.c | 15 +++++++++++---- drivers/staging/erofs/unzip_vle.h | 1 + drivers/staging/erofs/zmap.c | 1 + 4 files changed, 16 insertions(+), 4 deletions(-) commit 88aaf5a79c5cde56429fd96219d28707361107cd Author: Gao Xiang Date: Mon Jun 24 15:22:57 2019 +0800 staging: erofs: switch to new decompression backend This patch integrates new decompression framework to erofs decompression path, and remove the old decompression implementation as well. On kirin980 platform, sequential read is slightly improved to 778MiB/s after the new decompression backend is used. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman drivers/staging/erofs/Makefile | 2 +- drivers/staging/erofs/internal.h | 6 - drivers/staging/erofs/unzip_vle.c | 59 ++++----- drivers/staging/erofs/unzip_vle.h | 15 +-- drivers/staging/erofs/unzip_vle_lz4.c | 222 ---------------------------------- 5 files changed, 24 insertions(+), 280 deletions(-) commit 0ffd71bcc3a03ebb3551661a36052488369c4de9 Author: Gao Xiang Date: Mon Jun 24 15:22:56 2019 +0800 staging: erofs: introduce LZ4 decompression inplace compressed data will be usually loaded into last pages of the extent (the last page for 4k) for in-place decompression (more specifically, in-place IO), as ilustration below, start of compressed logical extent | end of this logical extent | | ______v___________________________v________ ... | page 6 | page 7 | page 8 | page 9 | ... |__________|__________|__________|__________| . ^ . ^ . |compressed| . | data | . . . |< dstsize >|| oend iend op ip Therefore, it's possible to do decompression inplace (thus no memcpy at all) if the margin is sufficient and safe enough [1], and it can be implemented only for fixed-size output compression compared with fixed-size input compression. No memcpy for most of in-place IO (about 99% of enwik9) after decompression inplace is implemented and sequential read will be improved of course (see the following patches for test results). [1] https://github.com/lz4/lz4/commit/b17f578a919b7e6b078cede2d52be29dd48c8e8c https://github.com/lz4/lz4/commit/5997e139f53169fa3a1c1b4418d2452a90b01602 Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman drivers/staging/erofs/compress.h | 1 + drivers/staging/erofs/decompressor.c | 36 ++++++++++++++++++++++++++++++++---- drivers/staging/erofs/erofs_fs.h | 3 ++- 3 files changed, 35 insertions(+), 5 deletions(-) commit 7fc45dbc938a2e69ecd6a78a3c0074aa6c11fac9 Author: Gao Xiang Date: Mon Jun 24 15:22:55 2019 +0800 staging: erofs: introduce generic decompression backend This patch adds a new generic decompression framework in order to replace the old LZ4-specific decompression code. Even though LZ4 is still the only supported algorithm, yet it is more cleaner and easy to integrate new algorithm than the old almost hard-coded decompression backend. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman drivers/staging/erofs/Makefile | 2 +- drivers/staging/erofs/compress.h | 21 +++ drivers/staging/erofs/decompressor.c | 301 +++++++++++++++++++++++++++++++++++ 3 files changed, 323 insertions(+), 1 deletion(-) commit 274812334b46de51fc905dc030215e69cfcafd17 Author: Gao Xiang Date: Mon Jun 24 15:22:54 2019 +0800 staging: erofs: move stagingpage operations to compress.h stagingpages are behaved as bounce pages for temporary use. Move to compress.h since the upcoming decompressor will allocate stagingpages as well. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman drivers/staging/erofs/compress.h | 40 +++++++++++++++++++++++++++++++++++++++ drivers/staging/erofs/unzip_vle.c | 11 ++++++----- drivers/staging/erofs/unzip_vle.h | 20 -------------------- 3 files changed, 46 insertions(+), 25 deletions(-) commit fa61a33f53760aa3b9b4f2a4196fc55b58b28394 Author: Gao Xiang Date: Mon Jun 24 15:22:53 2019 +0800 staging: erofs: move per-CPU buffers implementation to utils.c This patch moves per-CPU buffers to utils.c in order for the upcoming generic decompression framework to use it. Note that I tried to use generic per-CPU buffer or per-CPU page approaches to clean up further, but obvious performanace regression (about 2% for sequential read) was observed. Therefore let's leave it as it is instead, just move to utils.c and I'll try to dig into the root cause later. Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Greg Kroah-Hartman drivers/staging/erofs/internal.h | 26 ++++++++++++++++++++++++ drivers/staging/erofs/unzip_vle.c | 5 ++--- drivers/staging/erofs/unzip_vle.h | 4 +--- drivers/staging/erofs/unzip_vle_lz4.c | 37 ++++++++++++++--------------------- drivers/staging/erofs/utils.c | 12 ++++++++++++ 5 files changed, 56 insertions(+), 28 deletions(-) commit 152a333a589560bee002e4c96761f1b560a5793c Author: Gao Xiang Date: Mon Jun 24 15:22:52 2019 +0800 staging: erofs: add compacted compression indexes support This patch aims at compacted compression indexes: 1) cleanup z_erofs_map_blocks_iter and move into zmap.c; 2) add compacted 4/2B decoding support. On kirin980 platform, sequential read is increased about 6% (725MiB/s -> 770MiB/s) on enwik9 dataset if compacted 2B feature is enabled. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman drivers/staging/erofs/Makefile | 2 +- drivers/staging/erofs/inode.c | 7 +- drivers/staging/erofs/internal.h | 18 +- drivers/staging/erofs/unzip_vle.c | 286 ----------------------- drivers/staging/erofs/zmap.c | 462 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 480 insertions(+), 295 deletions(-) commit ec8c24420501d4cf3ed495c4d026984194897276 Author: Gao Xiang Date: Mon Jun 24 15:22:51 2019 +0800 staging: erofs: add compacted ondisk compression indexes This patch introduces new compacted compression indexes. In contract to legacy compression indexes that each 4k logical cluster has an 8-byte index, compacted ondisk compression indexes will have amortized 2 bytes for each 4k logical cluster (compacted 2B) amortized 4 bytes for each 4k logical cluster (compacted 4B) In detail, several continuous clusters will be encoded in a compacted pack with cluster types, offsets, and one blkaddr at the end of the pack to leave 4-byte margin for better decoding performance, as illustrated below: _____________________________________________ |___@_____ encoded bits __________|_ blkaddr _| 0 . amortized * vcnt . . . . amortized * vcnt - 4 . . .___________________. |_type_|_clusterofs_| Note that compacted 2 / 4B should be aligned with 32 / 8 bytes in order to avoid each pack crossing page boundary. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman drivers/staging/erofs/data.c | 4 +-- drivers/staging/erofs/erofs_fs.h | 65 +++++++++++++++++++++++++++++++-------- drivers/staging/erofs/inode.c | 5 +-- drivers/staging/erofs/internal.h | 11 ++----- drivers/staging/erofs/unzip_vle.c | 8 ++--- 5 files changed, 62 insertions(+), 31 deletions(-) commit e36472145aa706c186a6bb4f6419c613b0b1305c Author: Ian Abbott Date: Tue Jun 25 12:26:59 2019 +0100 staging: comedi: use dma_mmap_coherent for DMA-able buffer mmap Comedi's acquisition buffer allocation code can allocate the buffer from normal kernel memory or from DMA coherent memory depending on the `dma_async_dir` value in the comedi subdevice. (A value of `DMA_NONE` causes the buffer to be allocated from normal kernel memory. Other values cause the buffer to be allocated from DMA coherent memory.) The buffer currently consists of a bunch of page-sized blocks that are vmap'ed into a contiguous range of virtual addresses. The pages are also mmap'able into user address space. For DMA'able buffers, these page-sized blocks are allocated by `dma_alloc_coherent()`. For DMA-able buffers, the DMA API is currently abused in various ways, the most serious abuse being the calling of `virt_to_page()` on the blocks allocated by `dma_alloc_coherent()` and passing those pages to `vmap()` (for mapping to the kernels vmalloc address space) and via `page_to_pfn()` to `remap_pfn_range()` (for mmap'ing to user space). it also uses the `__GFP_COMP` flag when allocating the blocks, and marks the allocated pages as reserved (which is unnecessary for DMA coherent allocations). The code can be changed to get rid of the vmap'ed address altogether if necessary, since there are only a few places in the comedi code that use the vmap'ed address directly and we also keep a list of the kernel addresses for the individual pages prior to the vmap operation. This would add some run-time overhead to buffer accesses. The real killer is the mmap operation. For mmap, the address range specified in the VMA needs to be mmap'ed to the individually allocated page-sized blocks. That is not a problem when the pages are allocated from normal kernel memory as the individual pages can be remapped by `remap_pfn_range()`, but it is a problem when the page-sized blocks are allocated by `dma_alloc_coherent()` because the DMA API currently has no support for splitting a VMA across multiple blocks of DMA coherent memory (or rather, no support for mapping part of a VMA range to a single block of DMA coherent memory). In order to comply with the DMA API and allow the buffer to be mmap'ed, the buffer needs to be allocated as a single block by a single call to `dma_alloc_coherent()`, freed by a single call to `dma_free_coherent()`, and mmap'ed to user space by a single call to `dma_mmap_coherent()`. This patch changes the buffer allocation, freeing, and mmap'ing code to do that, with the unfortunate consequence that buffer allocation is more likely to fail. It also no longer uses the `__GFP_COMP` flag when allocating DMA coherent memory, no longer marks the allocated pages of DMA coherent memory as reserved, and no longer vmap's the DMA coherent memory pages (since they are contiguous anyway). Signed-off-by: Ian Abbott Reviewed-by: Christoph Hellwig Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/comedi_buf.c | 150 +++++++++++++++++++++++------------ drivers/staging/comedi/comedi_fops.c | 39 ++++++--- 2 files changed, 125 insertions(+), 64 deletions(-) commit 9bb5a27ac7958ce11cb02463b5a5f7f160d60916 Author: Arnaldo Carvalho de Melo Date: Tue Jun 25 21:39:18 2019 -0300 perf time-utils: Use skip_spaces() No change in behaviour intended. Cc: Adrian Hunter Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-cpugv7qd5vzhbtvnlydo90jv@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/time-utils.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit fc6a172600cd54e9b4efeb684daa8464991b6c26 Author: Arnaldo Carvalho de Melo Date: Tue Jun 25 21:33:14 2019 -0300 perf header: Use skip_spaces() in __write_cpudesc() No change in behaviour. Cc: Stephane Eranian Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-0dbfpi70aa66s6mtd8z6p391@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/header.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 810826acd122ed859e238bf1555a09b326c8fe23 Author: Arnaldo Carvalho de Melo Date: Tue Jun 25 21:28:49 2019 -0300 perf stat: Use recently introduced skip_spaces() No change in behaviour. Cc: Andi Kleen Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-ncpvp4eelf8fqhuy29uv56z9@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-display.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 7bd330de43fd5693e90be13dac7fbd9af3b6335d Author: Arnaldo Carvalho de Melo Date: Tue Jun 25 21:23:18 2019 -0300 tools lib: Adopt skip_spaces() from the kernel sources Same implementation, will be used to replace ad-hoc equivalent code in tools/. Cc: Adrian Hunter Cc: André Goddard Rosa Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-dig691cg9ripvoiprpidthw7@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/linux/string.h | 4 +++- tools/lib/string.c | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) commit bd9860bf050f77c4e260a9ae10a5587009ad6e07 Author: Arnaldo Carvalho de Melo Date: Tue Jun 25 21:13:51 2019 -0300 perf tools: Use linux/ctype.h in more places There were a few places where we still were using the libc version of ctype.h, switch to the one in tools/lib/ctype.c that the rest of perf uses. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-wa4nz4kt61eze88eprk20tfd@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/s390/util/header.c | 2 +- tools/perf/util/metricgroup.c | 2 +- tools/perf/util/time-utils.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 3052ba56bcb589046eca6a931bd897742653d2cb Author: Arnaldo Carvalho de Melo Date: Tue Jun 25 17:27:31 2019 -0300 tools perf: Move from sane_ctype.h obtained from git to the Linux's original We got the sane_ctype.h headers from git and kept using it so far, but since that code originally came from the kernel sources to the git sources, perhaps its better to just use the one in the kernel, so that we can leverage tools/perf/check_headers.sh to be notified when our copy gets out of sync, i.e. when fixes or goodies are added to the code we've copied. This will help with things like tools/lib/string.c where we want to have more things in common with the kernel, such as strim(), skip_spaces(), etc so as to go on removing the things that we have in tools/perf/util/ and instead using the code in the kernel, indirectly and removing things like EXPORT_SYMBOL(), etc, getting notified when fixes and improvements are made to the original code. Hopefully this also should help with reducing the difference of code hosted in tools/ to the one in the kernel proper. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-7k9868l713wqtgo01xxygn12@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/linux/ctype.h | 75 +++++++++++++++++++++++++++++++++++++ tools/lib/ctype.c | 35 +++++++++++++++++ tools/lib/symbol/kallsyms.c | 1 - tools/lib/symbol/kallsyms.h | 1 + tools/perf/MANIFEST | 1 + tools/perf/arch/x86/util/machine.c | 2 +- tools/perf/builtin-kmem.c | 2 +- tools/perf/builtin-report.c | 2 +- tools/perf/builtin-sched.c | 2 +- tools/perf/builtin-script.c | 2 +- tools/perf/builtin-stat.c | 2 +- tools/perf/builtin-top.c | 2 +- tools/perf/builtin-trace.c | 2 +- tools/perf/check-headers.sh | 2 + tools/perf/tests/code-reading.c | 2 +- tools/perf/ui/browser.c | 2 +- tools/perf/ui/browsers/hists.c | 2 +- tools/perf/ui/browsers/map.c | 2 +- tools/perf/ui/stdio/hist.c | 2 +- tools/perf/util/Build | 4 ++ tools/perf/util/annotate.c | 2 +- tools/perf/util/auxtrace.c | 2 +- tools/perf/util/build-id.c | 2 +- tools/perf/util/config.c | 2 +- tools/perf/util/cpumap.c | 2 +- tools/perf/util/ctype.c | 32 ---------------- tools/perf/util/data-convert-bt.c | 2 +- tools/perf/util/debug.c | 2 +- tools/perf/util/demangle-java.c | 2 +- tools/perf/util/env.c | 2 +- tools/perf/util/event.c | 2 +- tools/perf/util/evsel.c | 2 +- tools/perf/util/header.c | 2 +- tools/perf/util/jitdump.c | 2 +- tools/perf/util/machine.c | 2 +- tools/perf/util/print_binary.c | 2 +- tools/perf/util/probe-event.c | 2 +- tools/perf/util/probe-finder.h | 2 +- tools/perf/util/python-ext-sources | 2 +- tools/perf/util/sane_ctype.h | 47 ----------------------- tools/perf/util/stat-display.c | 2 +- tools/perf/util/strfilter.c | 2 +- tools/perf/util/string.c | 2 +- tools/perf/util/symbol-elf.c | 2 +- tools/perf/util/symbol.c | 2 +- tools/perf/util/trace-event-parse.c | 2 +- 46 files changed, 155 insertions(+), 117 deletions(-) commit 055ca54777b72e4e3d1b1f4e76376b8428086c02 Author: Charles Keepax Date: Tue Jun 25 14:10:53 2019 +0100 clk: lochnagar: Use new parent_data approach to register clock parents Switch over to the more modern style of registering parents and simplify the code in the process. Suggested-by: Stephen Boyd Signed-off-by: Charles Keepax Signed-off-by: Stephen Boyd drivers/clk/clk-lochnagar.c | 205 +++++++++++++++++++------------------------- 1 file changed, 86 insertions(+), 119 deletions(-) commit e3527dca15c853daaacddc3f95461e8a02190114 Author: Thierry Reding Date: Thu Jun 13 18:12:25 2019 +0200 clk: tegra: Do not enable PLL_RE_VCO on Tegra210 It turns out that this PLL is not used on Tegra210, so there's no need to enable it via the init table. Remove the init table entry for this PLL to avoid it getting enabled at boot time. If the bootloader enabled it and forgot to turn it off, the common clock framework will now know to disable it because it is unused. Signed-off-by: Thierry Reding Acked-by: Jon Hunter Signed-off-by: Stephen Boyd drivers/clk/tegra/clk-tegra210.c | 1 - 1 file changed, 1 deletion(-) commit c1139d20833f8882df608f456ce65b06cd1caa98 Author: Thierry Reding Date: Thu Jun 13 18:12:24 2019 +0200 clk: tegra: Warn if an enabled PLL is in IDDQ A PLL in IDDQ doesn't work, whether it's enabled or not. This is not a configuration that makes sense, so warn about it. Signed-off-by: Thierry Reding Acked-by: Jon Hunter Signed-off-by: Stephen Boyd drivers/clk/tegra/clk-tegra210.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 20675070127b51c6ca26a895c7e0b459f2c397e1 Author: Thierry Reding Date: Thu Jun 13 18:12:23 2019 +0200 clk: tegra: Do not warn unnecessarily There is no need to warn if the reference PLL is enabled with the correct defaults. Only warn if the boot values don't match the defaults. Signed-off-by: Thierry Reding Acked-by: Jon Hunter Signed-off-by: Stephen Boyd drivers/clk/tegra/clk-tegra210.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 0d34dfbf3023cf119b83f6470692c0b10c832495 Author: JC Kuo Date: Wed Jun 12 11:14:34 2019 +0800 clk: tegra210: fix PLLU and PLLU_OUT1 Full-speed and low-speed USB devices do not work with Tegra210 platforms because of incorrect PLLU/PLLU_OUT1 clock settings. When full-speed device is connected: [ 14.059886] usb 1-3: new full-speed USB device number 2 using tegra-xusb [ 14.196295] usb 1-3: device descriptor read/64, error -71 [ 14.436311] usb 1-3: device descriptor read/64, error -71 [ 14.675749] usb 1-3: new full-speed USB device number 3 using tegra-xusb [ 14.812335] usb 1-3: device descriptor read/64, error -71 [ 15.052316] usb 1-3: device descriptor read/64, error -71 [ 15.164799] usb usb1-port3: attempt power cycle When low-speed device is connected: [ 37.610949] usb usb1-port3: Cannot enable. Maybe the USB cable is bad? [ 38.557376] usb usb1-port3: Cannot enable. Maybe the USB cable is bad? [ 38.564977] usb usb1-port3: attempt power cycle This commit fixes the issue by: 1. initializing PLLU_OUT1 before initializing XUSB_FS_SRC clock because PLLU_OUT1 is parent of XUSB_FS_SRC. 2. changing PLLU post-divider to /2 (DIVP=1) according to Technical Reference Manual. Fixes: e745f992cf4b ("clk: tegra: Rework pll_u") Signed-off-by: JC Kuo Acked-By: Peter De Schrijver Signed-off-by: Stephen Boyd drivers/clk/tegra/clk-tegra210.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e2bb18347c8e5c4187831f3700c380e3c759601a Author: Nicolas Saenz Julienne Date: Wed Jun 12 20:24:57 2019 +0200 clk: raspberrypi: register platform device for raspberrypi-cpufreq As 'clk-raspberrypi' depends on RPi's firmware interface, which might be configured as a module, the cpu clock might not be available for the cpufreq driver during it's init process. So we register the 'raspberrypi-cpufreq' platform device after the probe sequence succeeds. Signed-off-by: Nicolas Saenz Julienne Acked-by: Eric Anholt Signed-off-by: Stephen Boyd drivers/clk/bcm/clk-raspberrypi.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 91f2cf4a6b2131016b1ae9c9500245f0572112c7 Author: Nicolas Saenz Julienne Date: Wed Jun 12 20:24:55 2019 +0200 firmware: raspberrypi: register clk device Since clk-raspberrypi is tied to the VC4 firmware instead of particular hardware it's registration should be performed by the firmware driver. Signed-off-by: Nicolas Saenz Julienne Acked-by: Eric Anholt Signed-off-by: Stephen Boyd drivers/firmware/raspberrypi.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 4e85e535e6cc6e8a96350e8ee684d0f22eb8629e Author: Nicolas Saenz Julienne Date: Wed Jun 12 20:24:54 2019 +0200 clk: bcm283x: add driver interfacing with Raspberry Pi's firmware Raspberry Pi's firmware offers an interface though which update it's clock's frequencies. This is specially useful in order to change the CPU clock (pllb_arm) which is 'owned' by the firmware and we're unable to scale using the register interface provided by clk-bcm2835. Signed-off-by: Nicolas Saenz Julienne Acked-by: Eric Anholt Signed-off-by: Stephen Boyd drivers/clk/bcm/Kconfig | 7 + drivers/clk/bcm/Makefile | 1 + drivers/clk/bcm/clk-raspberrypi.c | 300 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 308 insertions(+) commit 2256d89333bd17b8b56b42734a7e1046d52f7fc3 Author: Nicolas Saenz Julienne Date: Wed Jun 12 20:24:53 2019 +0200 clk: bcm2835: remove pllb Raspberry Pi's firmware controls this pll, we should use the firmware interface to access it. Signed-off-by: Nicolas Saenz Julienne Acked-by: Eric Anholt Signed-off-by: Stephen Boyd drivers/clk/bcm/clk-bcm2835.c | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-) commit 78a5ba8f9126047ca2478fdbbd1d4ab4d97d30e6 Author: Vabhav Sharma Date: Fri Apr 26 06:53:38 2019 +0000 clk: qoriq: add support for lx2160a Add clockgen support and configuration for NXP SoC lx2160a with compatible property as "fsl,lx2160a-clockgen". Signed-off-by: Tang Yuantian Signed-off-by: Yogesh Gaur Signed-off-by: Vabhav Sharma Acked-by: Scott Wood Acked-by: Stephen Boyd Acked-by: Viresh Kumar Signed-off-by: Stephen Boyd drivers/clk/clk-qoriq.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit df095f996b8f39a0f968ea2060dcf65e95a65faf Author: Wolfram Sang Date: Sat Jun 8 12:55:40 2019 +0200 clk: clk-cdce706: simplify getting the adapter of a client We have a dedicated pointer for that, so use it. Much easier to read and less computation involved. Signed-off-by: Wolfram Sang Reviewed-by: Simon Horman Signed-off-by: Stephen Boyd drivers/clk/clk-cdce706.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit da642427bd7710ec4f4140f693f59aa8521a358c Author: Nathan Huckleberry Date: Tue Jun 11 14:11:34 2019 -0700 clk: qcom: Fix -Wunused-const-variable Clang produces the following warning drivers/clk/qcom/gcc-msm8996.c:133:32: warning: unused variable 'gcc_xo_gpll0_gpll2_gpll3_gpll0_early_div_map' [-Wunused-const-variable] static const struct parent_map gcc_xo_gpll0_gpll2_gpll3_gpll0_early_div_map[] = { ^drivers/clk/qcom/gcc-msm8996.c:141:27: warning: unused variable 'gcc_xo_gpll0_gpll2_gpll3_gpll0_early_div' [-Wunused-const-variable] static const char * const gcc_xo_gpll0_gpll2_gpll3_gpll0_early_div[] = { ^ drivers/clk/qcom/gcc-msm8996.c:187:32: warning: unused variable 'gcc_xo_gpll0_gpll2_gpll3_gpll1_gpll4_gpll0_early_div_map' [-Wunused-const-variable] static const struct parent_map gcc_xo_gpll0_gpll2_gpll3_gpll1_gpll4_gpll0_early_div_map[] = { ^ drivers/clk/qcom/gcc-msm8996.c:197:27: warning: unused variable 'gcc_xo_gpll0_gpll2_gpll3_gpll1_gpll4_gpll0_early_div' [-Wunused-const-variable] static const char * const gcc_xo_gpll0_gpll2_gpll3_gpll1_gpll4_gpll0_early_div[] = { It looks like these were never used. Fixes: b1e010c0730a ("clk: qcom: Add MSM8996 Global Clock Control (GCC) driver") Cc: clang-built-linux@googlegroups.com Link: https://github.com/ClangBuiltLinux/linux/issues/518 Suggested-by: Nathan Chancellor Signed-off-by: Nathan Huckleberry Reviewed-by: Nathan Chancellor Signed-off-by: Stephen Boyd drivers/clk/qcom/gcc-msm8996.c | 36 ------------------------------------ 1 file changed, 36 deletions(-) commit 4abf9adc12c6ed4df158029a7381a0004d10117a Author: Paul Cercueil Date: Tue Jun 11 20:07:57 2019 +0200 MIPS: Remove dead code Remove the unused include. Signed-off-by: Paul Cercueil Acked-by: Paul Burton Signed-off-by: Stephen Boyd arch/mips/include/asm/mach-jz4740/clock.h | 31 ------------------------------- arch/mips/jz4740/board-qi_lb60.c | 2 -- arch/mips/jz4740/platform.c | 2 -- arch/mips/jz4740/time.c | 3 --- 4 files changed, 38 deletions(-) commit 9a838844a0da69c5f5e253a0be3ca13c4a216f0d Author: Paul Cercueil Date: Tue Jun 11 20:07:56 2019 +0200 clk: ingenic: Remove unused functions These functions are not called anywhere anymore, they can safely be removed. Signed-off-by: Paul Cercueil Signed-off-by: Stephen Boyd drivers/clk/ingenic/jz4740-cgu.c | 73 ---------------------------------------- 1 file changed, 73 deletions(-) commit 32ebc193cda650ad089d04b8ac14324264c5420b Author: Paul Cercueil Date: Tue Jun 11 20:07:55 2019 +0200 MIPS: jz4740: PM: Let CGU driver suspend clocks and set sleep mode Instead of forcing the jz4740 clocks to suspend here, we let the CGU driver handle it. We also let the CGU driver set the "sleep mode" bit. This has the added benefit that now it is possible to build a kernel on SoCs newer than the JZ4740 with CONFIG_PM. Signed-off-by: Paul Cercueil Signed-off-by: Stephen Boyd arch/mips/jz4740/pm.c | 8 -------- 1 file changed, 8 deletions(-) commit 2ee93e3c953b7263c21ce61e7c42e33d0539bef9 Author: Paul Cercueil Date: Tue Jun 11 20:07:54 2019 +0200 clk: ingenic: Handle setting the Low-Power Mode bit The Low-Power Mode, when enabled, will make the "wait" MIPS instruction suspend the system. This is not really clock-related, but this bit happens to be in the register set of the CGU. Signed-off-by: Paul Cercueil Signed-off-by: Stephen Boyd drivers/clk/ingenic/Makefile | 2 +- drivers/clk/ingenic/jz4725b-cgu.c | 3 +++ drivers/clk/ingenic/jz4740-cgu.c | 3 +++ drivers/clk/ingenic/jz4770-cgu.c | 33 ++-------------------------- drivers/clk/ingenic/jz4780-cgu.c | 3 +++ drivers/clk/ingenic/pm.c | 45 +++++++++++++++++++++++++++++++++++++++ drivers/clk/ingenic/pm.h | 12 +++++++++++ 7 files changed, 69 insertions(+), 32 deletions(-) commit dbc38ad0e7390162c500210f96ebf1d6a8738899 Author: Paul Cercueil Date: Tue Jun 11 20:07:53 2019 +0200 clk: ingenic: Add missing header in cgu.h The cgu.h has structures that contain 'clk_onecell_data' and 'clk_hw' structures (no pointers), so the header should be included. Signed-off-by: Paul Cercueil [sboyd@kernel.org: Drop removal of includes in drivers] Signed-off-by: Stephen Boyd drivers/clk/ingenic/cgu.h | 1 + 1 file changed, 1 insertion(+) commit 7a78a7f7695bf9ef9cef3c06fbc5fa4573fd0eef Author: Han Nandor Date: Wed May 15 10:47:14 2019 +0000 power: reset: nvmem-reboot-mode: use NVMEM as reboot mode write interface Add a new reboot mode write interface that is using an NVMEM cell to store the reboot mode magic. Signed-off-by: Nandor Han Signed-off-by: Sebastian Reichel drivers/power/reset/Kconfig | 9 ++++ drivers/power/reset/Makefile | 1 + drivers/power/reset/nvmem-reboot-mode.c | 76 +++++++++++++++++++++++++++++++++ 3 files changed, 86 insertions(+) commit e5e89247a74bf35f0bbfd180a46f5bf75c086885 Author: Leonard Crestez Date: Mon Jun 10 14:06:38 2019 +0300 clk: Add clk_parent entry in debugfs This allows to easily determine the parent in shell scripts without parsing more complex files. Add the clk_parent file for all clks which can have a parent, not just muxes. This way it can be used to determine the clk tree structure without parsing more complex files. Signed-off-by: Leonard Crestez Signed-off-by: Stephen Boyd drivers/clk/clk.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 65e2218d10064d1143572584251f8599dd09290a Author: Geert Uytterhoeven Date: Mon Jun 17 15:56:02 2019 +0200 clk: Grammar missing "and", Spelling s/statisfied/satisfied/ Signed-off-by: Geert Uytterhoeven Signed-off-by: Stephen Boyd drivers/clk/clk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit eef1f1b6cff90ab7b24f9aaee11bbfeb1c7dc66b Author: Geert Uytterhoeven Date: Mon Jun 17 14:02:48 2019 +0200 clk: Simplify clk_core_can_round() A boolean expression already evaluates to true or false, so there is no need to check the result and return true or false explicitly. Signed-off-by: Geert Uytterhoeven Reviewed-by: Jerome Brunet Signed-off-by: Stephen Boyd drivers/clk/clk.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit cba155e50a117465b64e197e197aedc18770c4cd Author: Han Nandor Date: Wed May 15 10:47:15 2019 +0000 dt-bindings: power: reset: add document for NVMEM based reboot-mode Add the device tree bindings document for the NVMEM based reboot-mode driver. Signed-off-by: Nandor Han Reviewed-by: Rob Herring Signed-off-by: Sebastian Reichel .../bindings/power/reset/nvmem-reboot-mode.txt | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 16e3c572cdc91d7e26489f3be8338da936c08495 Author: Dinh Nguyen Date: Tue Jun 25 08:55:35 2019 -0500 clk: socfpga: stratix10: fix divider entry for the emac clocks The fixed dividers for the emac clocks should be 2 not 4. Signed-off-by: Dinh Nguyen Signed-off-by: Stephen Boyd drivers/clk/socfpga/clk-s10.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3b5015c4d834a70233c4419b07375254e4675e0b Author: Dinh Nguyen Date: Mon Jun 24 16:47:10 2019 -0500 clk: socfpga: stratix10: add additional clocks needed for the NAND IP The nand_clk is actually called the nand_x_clk and the parent is the l4_mp_clk, not the l4_main_clk. The nand_clk is a child of the nand_x_clk and has a fixed divider of 4. The same is true for the nand_ecc_clk. Signed-off-by: Dinh Nguyen Signed-off-by: Stephen Boyd drivers/clk/socfpga/clk-s10.c | 6 +++++- include/dt-bindings/clock/stratix10-clock.h | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) commit 1b2fc358ddfb1b0915922e441182cda7043f5116 Author: Arnaldo Carvalho de Melo Date: Tue Jun 25 18:35:34 2019 -0300 perf tools: Add missing util.h to pick up 'page_size' variable Not to depend of getting it indirectly. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-tirjsmvu4ektw0k7lm8k9lhu@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/arm/util/cs-etm.c | 1 + tools/perf/arch/x86/tests/intel-cqm.c | 1 + tools/perf/arch/x86/util/intel-pt.c | 1 + tools/perf/perf.c | 1 + tools/perf/util/machine.c | 1 + tools/perf/util/python.c | 1 + 6 files changed, 6 insertions(+) commit 88aa7af9c180381d9612ebbb5c8b0b3f96514373 Author: Chris Packham Date: Tue Jun 18 09:54:58 2019 +1200 clk: kirkwood: Add support for MV98DX1135 The 98DX1135 is a switch chip with an integrated CPU. This is similar to the 98DX4122 except that the core clock speed is fixed to 166Mhz. Signed-off-by: Chris Packham Reviewed-by: Andrew Lunn Signed-off-by: Stephen Boyd drivers/clk/mvebu/kirkwood.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 9a042e718fc0faf77db35a8106c8ded948971219 Author: Chris Packham Date: Tue Jun 18 09:54:56 2019 +1200 dt-bindings: clock: mvebu: Add compatible string for 98dx1135 core clock Add compatible string for the core clock on the 98dx1135 switch with integrated CPU. Signed-off-by: Chris Packham Reviewed-by: Andrew Lunn Signed-off-by: Stephen Boyd Documentation/devicetree/bindings/clock/mvebu-core-clock.txt | 1 + 1 file changed, 1 insertion(+) commit 9f3926e08c26607a0dd5b1bc8a8aa1d03f72fcdc Author: Arnaldo Carvalho de Melo Date: Tue Jun 25 18:19:33 2019 -0300 perf tools: Remove old baggage that is util/include/linux/ctype.h It was just including a ../util.h that wasn't even there: $ cat tools/perf/util/include/linux/../util.h cat: tools/perf/util/include/linux/../util.h: No such file or directory $ This would make kallsyms.h get util.h somehow and then files including it would get util.h defined stuff, a mess, fix it. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-wlzwken4psiat4zvfbvaoqiw@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/lib/symbol/kallsyms.h | 1 - tools/perf/util/include/linux/ctype.h | 1 - 2 files changed, 2 deletions(-) commit cf8b6970f4fc31898f3d9e25159aa57e235ca4d1 Author: Arnaldo Carvalho de Melo Date: Tue Jun 25 18:15:46 2019 -0300 perf symbols: We need util.h in symbol-elf.c for zfree() Continuing to untangle the headers, we're about to remove the old odd baggage that is tools/perf/util/include/linux/ctype.h. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-gapezcq3p8bzrsi96vdtq0o0@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/symbol-elf.c | 1 + 1 file changed, 1 insertion(+) commit 179175d389c7aad4c7b7276f772d04cfc92864b1 Author: Stephen Boyd Date: Tue Jun 25 14:20:56 2019 -0700 clk: Document some devm_clk_bulk*() APIs Add some new clk devm APIs that we've added over time to the devres documentation. Signed-off-by: Stephen Boyd Documentation/driver-model/devres.txt | 4 ++++ 1 file changed, 4 insertions(+) commit 9bd5ef0bd8743700d9adffb6fbb1baa346575457 Author: Sylwester Nawrocki Date: Wed Jun 19 11:39:26 2019 +0200 clk: Add devm_clk_bulk_get_optional() function Add managed version of the clk_bulk_get_optional() helper function. Signed-off-by: Sylwester Nawrocki [sboyd@kernel.org: Mark __devm_clk_bulk_get() static] Signed-off-by: Stephen Boyd drivers/clk/clk-devres.c | 22 +++++++++++++++++++--- include/linux/clk.h | 28 ++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 3 deletions(-) commit 2f25528e4edddc6eddd42c8d41c9c9e341c8b9da Author: Sylwester Nawrocki Date: Wed Jun 19 11:39:25 2019 +0200 clk: Add clk_bulk_get_optional() function clk_bulk_get_optional() allows to get a group of clocks where one or more is optional. For a not available clock, e.g. not specifed in the clock consumer node in DT, its respective struct clk pointer will be NULL. This allows for operating on a group of returned clocks (struct clk_bulk_data array) with existing clk_bulk* APIs. Signed-off-by: Sylwester Nawrocki Signed-off-by: Stephen Boyd drivers/clk/clk-bulk.c | 23 ++++++++++++++++++++--- include/linux/clk.h | 19 +++++++++++++++++++ 2 files changed, 39 insertions(+), 3 deletions(-) commit 155681fcd7f82882a730240c2dde7eee76a46314 Author: Arnaldo Carvalho de Melo Date: Tue Jun 25 18:13:17 2019 -0300 perf kallsyms: Adopt hex2u64 from tools/perf/util/util.h Just removing more stuff from tools/perf/, this is mostly used in the kallsyms parsing and in places in perf where kallsyms is involved, so we get it for free there. With this we reduce a bit more util.h. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-5mc1zg0jqdwgkn8c358kaba6@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/lib/symbol/kallsyms.c | 13 +++++++++++++ tools/lib/symbol/kallsyms.h | 2 ++ tools/perf/util/util.c | 13 ------------- tools/perf/util/util.h | 1 - 4 files changed, 15 insertions(+), 14 deletions(-) commit af41949d9e022f4e37d476505e406c87479862ab Author: Arnaldo Carvalho de Melo Date: Tue Jun 25 18:01:47 2019 -0300 tools x86 machine: Add missing util.h to pick up 'page_size' We're getting it by sheer luck, add that util.h to get the 'page_size' definition. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-347078mgj3d2jfygtxs4ntti@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/x86/util/machine.c | 1 + 1 file changed, 1 insertion(+) commit 2f8776f0c5d3a4359810b68402ea707421009362 Author: Roman Mashak Date: Tue Jun 25 14:18:52 2019 -0400 tc-testing: add ingress qdisc tests Signed-off-by: Roman Mashak Signed-off-by: David S. Miller .../tc-testing/tc-tests/qdiscs/ingress.json | 102 +++++++++++++++++++++ 1 file changed, 102 insertions(+) commit 398c2b05bbee21cc172dfff017c0351d4d14e04c Author: Yamin Friedman Date: Thu Nov 22 09:51:17 2018 +0200 linux/dim: Add completions count to dim_sample Added a measurement of completions per/msec to allow for completion based dim algorithms. In order to use dynamic interrupt moderation with RDMA we need to have a different measurment than packets per second. This change is meant to prepare for adding a new DIM method. All drivers that use net_dim and thus do not need a completion count will have the completions set to 0. Signed-off-by: Yamin Friedman Reviewed-by: Max Gurtovoy Signed-off-by: Saeed Mahameed include/linux/dim.h | 28 +++++++++++++++++++++++++--- lib/dim/dim.c | 9 +++++++++ 2 files changed, 34 insertions(+), 3 deletions(-) commit 4f75da3666c0c572967729a2401ac650be5581b6 Author: Tal Gilboa Date: Thu Jan 10 17:33:17 2019 +0200 linux/dim: Move implementation to .c files Moved all logic from dim.h and net_dim.h to dim.c and net_dim.c. This is both more structurally appealing and would allow to only expose externally used functions. Signed-off-by: Tal Gilboa Signed-off-by: Saeed Mahameed MAINTAINERS | 2 +- drivers/net/ethernet/broadcom/Kconfig | 1 + drivers/net/ethernet/broadcom/bcmsysport.h | 2 +- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 2 +- drivers/net/ethernet/broadcom/bnxt/bnxt_debugfs.c | 2 +- drivers/net/ethernet/broadcom/bnxt/bnxt_dim.c | 2 +- drivers/net/ethernet/broadcom/genet/bcmgenet.h | 2 +- drivers/net/ethernet/mellanox/mlx5/core/Kconfig | 1 + drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_dim.c | 2 +- include/linux/dim.h | 319 +++++++++++++++++----- include/linux/net_dim.h | 273 ------------------ lib/Kconfig | 8 + lib/Makefile | 1 + lib/dim/Makefile | 9 + lib/dim/dim.c | 74 +++++ lib/dim/net_dim.c | 190 +++++++++++++ 17 files changed, 547 insertions(+), 345 deletions(-) commit 8960b38932bee8db0bc9c4d8c135f21df6cdd297 Author: Tal Gilboa Date: Thu Jan 31 16:44:48 2019 +0200 linux/dim: Rename externally used net_dim members Removed 'net' prefix from functions and structs used by external drivers. Signed-off-by: Tal Gilboa Signed-off-by: Saeed Mahameed drivers/net/ethernet/broadcom/bcmsysport.c | 16 ++++++------ drivers/net/ethernet/broadcom/bcmsysport.h | 2 +- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 10 ++++---- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 2 +- drivers/net/ethernet/broadcom/bnxt/bnxt_debugfs.c | 4 +-- drivers/net/ethernet/broadcom/bnxt/bnxt_dim.c | 5 ++-- drivers/net/ethernet/broadcom/genet/bcmgenet.c | 14 +++++----- drivers/net/ethernet/broadcom/genet/bcmgenet.h | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en.h | 8 +++--- drivers/net/ethernet/mellanox/mlx5/core/en_dim.c | 10 ++++---- .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 4 +-- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 12 ++++----- drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c | 8 +++--- include/linux/dim.h | 21 ++++++++------- include/linux/net_dim.h | 30 +++++++++++----------- 15 files changed, 73 insertions(+), 75 deletions(-) commit e5b6ab02d7aa4118c9a36491633812dcc442acbe Author: Tal Gilboa Date: Mon Jan 14 15:32:49 2019 +0200 linux/dim: Rename net_dim_sample() to net_dim_update_sample() In order to avoid confusion between the function and the similarly named struct. In preparation for removing the 'net' prefix from dim members. Signed-off-by: Tal Gilboa Signed-off-by: Saeed Mahameed drivers/net/ethernet/broadcom/bcmsysport.c | 4 ++-- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 8 ++++---- drivers/net/ethernet/broadcom/genet/bcmgenet.c | 4 ++-- drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c | 6 ++---- include/linux/dim.h | 3 ++- include/linux/net_dim.h | 4 ++-- 6 files changed, 14 insertions(+), 15 deletions(-) commit c002bd529d719858d4cc233431c88c9efa844053 Author: Tal Gilboa Date: Mon Nov 5 12:07:52 2018 +0200 linux/dim: Rename externally exposed macros Renamed macros in use by external drivers. Signed-off-by: Tal Gilboa Signed-off-by: Saeed Mahameed drivers/net/ethernet/broadcom/bcmsysport.c | 4 ++-- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +- drivers/net/ethernet/broadcom/bnxt/bnxt_dim.c | 2 +- drivers/net/ethernet/broadcom/genet/bcmgenet.c | 4 ++-- drivers/net/ethernet/mellanox/mlx5/core/en_dim.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 10 +++++----- include/linux/dim.h | 12 ++++++------ include/linux/net_dim.h | 18 +++++++++--------- 8 files changed, 27 insertions(+), 27 deletions(-) commit 449986ea92412727e8c553eaa5c8d3ed884253c4 Author: Tal Gilboa Date: Mon Nov 5 11:57:10 2018 +0200 linux/dim: Remove "net" prefix from internal DIM members Only renaming functions and structs which aren't used by an external code. Signed-off-by: Tal Gilboa Signed-off-by: Saeed Mahameed include/linux/dim.h | 86 ++++++++++++++++++++++++------------------------ include/linux/net_dim.h | 87 ++++++++++++++++++++++++------------------------- 2 files changed, 86 insertions(+), 87 deletions(-) commit 0e58983de0d89f6ee75daab1b0ea918cfcf6ddbf Author: Tal Gilboa Date: Sun Nov 4 19:07:02 2018 +0200 linux/dim: Move logic to dim.h In preparation for supporting more implementations of the DIM algorithm, I'm moving what would become common logic to a common library. Downstream DIM implementations will use the common lib for their implementation. Signed-off-by: Tal Gilboa Signed-off-by: Saeed Mahameed MAINTAINERS | 1 + include/linux/dim.h | 153 ++++++++++++++++++++++++++++++++++++++++++++++++ include/linux/net_dim.h | 148 +--------------------------------------------- 3 files changed, 156 insertions(+), 146 deletions(-) commit a7dc51adcafe00406d0fb6cc5be3b65b8fc52004 Author: Jon Maloy Date: Tue Jun 25 19:37:00 2019 +0200 tipc: rename function msg_get_wrapped() to msg_inner_hdr() We rename the inline function msg_get_wrapped() to the more comprehensible msg_inner_hdr(). Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/bcast.c | 4 ++-- net/tipc/link.c | 2 +- net/tipc/msg.h | 4 ++-- net/tipc/node.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) commit 20c67312946dd0e152f6c65d6fa93c1b0eedcd80 Author: Jon Maloy Date: Tue Jun 25 18:08:13 2019 +0200 tipc: eliminate unnecessary skb expansion during retransmission We increase the allocated headroom for the buffer copies to be retransmitted. This eliminates the need for the lower stack levels (UDP/IP/L2) to expand the headroom in order to add their own headers. Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/link.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6a9fa4e3bddedc027b691b6470c500d51d04e56c Author: Arnaldo Carvalho de Melo Date: Tue Jun 25 17:31:26 2019 -0300 perf string: Move 'dots' and 'graph_dotted_line' out of sane_ctype.h Those are not in that file in the git repo, lets move it from there so that we get that sane ctype code fully isolated to allow getting it in sync either with the git sources or better with the kernel sources (include/linux/ctype.h + lib/ctype.h), that way we can use check_headers.h to get notified when changes are made in the original code so that we can cherry-pick. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-ioh5sghn3943j0rxg6lb2dgs@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-kmem.c | 1 + tools/perf/builtin-sched.c | 1 + tools/perf/builtin-top.c | 1 + tools/perf/util/ctype.c | 9 --------- tools/perf/util/evsel.c | 1 + tools/perf/util/sane_ctype.h | 3 --- tools/perf/util/string.c | 9 +++++++++ tools/perf/util/string2.h | 3 +++ 8 files changed, 16 insertions(+), 12 deletions(-) commit 77cf8edbc0e7db6d68d1a49cf954849fb92cfa7c Author: Jon Maloy Date: Tue Jun 25 17:36:43 2019 +0200 tipc: simplify stale link failure criteria In commit a4dc70d46cf1 ("tipc: extend link reset criteria for stale packet retransmission") we made link retransmission failure events dependent on the link tolerance, and not only of the number of failed retransmission attempts, as we did earlier. This works well. However, keeping the original, additional criteria of 99 failed retransmissions is now redundant, and may in some cases lead to failure detection times in the order of minutes instead of the expected 1.5 sec link tolerance value. We now remove this criteria altogether. Acked-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/link.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 489ce2f42514b4324e5c63e93ae7570cab995254 Author: Lucas Bates Date: Mon Jun 24 21:00:27 2019 -0400 tc-testing: Restore original behaviour for namespaces in tdc This patch restores the original behaviour for tdc prior to the introduction of the plugin system, where the network namespace functionality was split from the main script. It introduces the concept of required plugins for testcases, and will automatically load any plugin that isn't already enabled when said plugin is required by even one testcase. Additionally, the -n option for the nsPlugin is deprecated so the default action is to make use of the namespaces. Instead, we introduce -N to not use them, but still create the veth pair. buildebpfPlugin's -B option is also deprecated. If a test cases requires the features of a specific plugin in order to pass, it should instead include a new key/value pair describing plugin interactions: "plugins": { "requires": "buildebpfPlugin" }, A test case can have more than one required plugin: a list can be inserted as the value for 'requires'. Signed-off-by: Lucas Bates Acked-by: Davide Caratti Tested-by: Nicolas Dichtel Signed-off-by: David S. Miller tools/testing/selftests/tc-testing/README | 22 ++- .../tc-testing/plugin-lib/buildebpfPlugin.py | 5 +- .../selftests/tc-testing/plugin-lib/nsPlugin.py | 26 +++- .../selftests/tc-testing/tc-tests/actions/bpf.json | 6 + .../selftests/tc-testing/tc-tests/filters/fw.json | 162 +++++++++++++++++++++ .../tc-testing/tc-tests/filters/tests.json | 12 ++ tools/testing/selftests/tc-testing/tdc.py | 78 +++++++++- tools/testing/selftests/tc-testing/tdc_helper.py | 5 +- 8 files changed, 296 insertions(+), 20 deletions(-) commit 27d92807f863173ecaf9eec5d3833bb5e31f440a Merge: 045df37e743c 1c5ba67d2277 Author: David S. Miller Date: Tue Jun 25 12:42:12 2019 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next Pablo Neira Ayuso says: ==================== Netfilter updates for net-next The following patches contains Netfilter updates for net-next: 1) .br_defrag indirection depends on CONFIG_NF_DEFRAG_IPV6, from wenxu. 2) Remove unnecessary memset() in ipset, from Florent Fourcot. 3) Merge control plane addition and deletion in ipset, also from Florent. 4) A few missing check for nla_parse() in ipset, from Aditya Pakki and Jozsef Kadlecsik. 5) Incorrect cleanup in error path of xt_set version 3, from Jozsef. 6) Memory accounting problems when resizing in ipset, from Stefano Brivio. 7) Jozsef updates his email to @netfilter.org, this batch comes with a conflict resolution with recent SPDX header updates. 8) Add to create custom conntrack expectations via nftables, from Stephane Veyret. 9) A lookup optimization for conntrack, from Florian Westphal. 10) Check for supported flags in xt_owner. 11) Support for pernet sysctl in br_netfilter, patches from Christian Brauner. 12) Patches to move common synproxy infrastructure to nf_synproxy.c, to prepare the synproxy support for nf_tables, patches from Fernando Fernandez Mancera. 13) Support to restore expiration time in set element, from Laura Garcia. 14) Fix recent rewrite of netfilter IPv6 to avoid indirections when CONFIG_IPV6 is unset, from Arnd Bergmann. 15) Always reset vlan tag on skbuff fraglist when refragmenting in bridge conntrack, from wenxu. 16) Support to match IPv4 options in nf_tables, from Stephen Suryaputra. ==================== Signed-off-by: David S. Miller commit 10dcc7448e9ea49488a38bca7551de1a9da06ad9 Author: Colin Ian King Date: Mon Jun 24 13:16:49 2019 +0100 RDMA/hns: fix spelling mistake "attatch" -> "attach" There is a spelling mistake in an dev_err message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hns/hns_roce_qp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 93d50edc80abfdf9ad8064af9631a60c56bb0868 Author: Arnaldo Carvalho de Melo Date: Tue Jun 25 16:28:40 2019 -0300 perf ctype: Remove now unused 'spaces' variable We can left justify just fine using the 'field width' modifier in %s printf, ditch this variable. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-2td8u86mia7143lbr5ttl0kf@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/ctype.c | 4 ---- tools/perf/util/sane_ctype.h | 1 - 2 files changed, 5 deletions(-) commit 34d65cd837d0c77fac0c0da632c616030b2927e3 Author: Doug Ledford Date: Fri Jun 21 17:00:44 2019 -0400 RDMA/netlink: Audit policy settings for netlink attributes For all string attributes for which we don't currently accept the element as input, we only use it as output, set the string length to RDMA_NLDEV_ATTR_EMPTY_STRING which is defined as 1. That way we will only accept a null string for that element. This will prevent someone from writing a new input routine that uses the element without also updating the policy to have a valid value. Also while there, make sure the existing entries that are valid have the correct policy, if not, correct the policy. Remove unnecessary checks for nla_strlcpy() overflow once the policy has been set correctly. Signed-off-by: Doug Ledford Signed-off-by: Jason Gunthorpe drivers/infiniband/core/nldev.c | 25 ++++++++++++------------- include/rdma/rdma_netlink.h | 6 ++++++ include/uapi/rdma/rdma_netlink.h | 4 ---- 3 files changed, 18 insertions(+), 17 deletions(-) commit b598c34ffc2b60c5c2f6450753a376a81f225652 Author: Arnaldo Carvalho de Melo Date: Tue Jun 25 16:24:20 2019 -0300 perf ui stdio: No need to use 'spaces' to left align We can just use the 'field width' for the %s used to print the alignment, this way we'll get the same result without requiring having a variable with just lots of space chars. No way to do that for the dots tho, we still need that variable filled with dot chars. # perf report --stdio --hierarchy > before # perf report --stdio --hierarchy > after # diff before after # I.e. it continues as: # perf report --stdio --hierarchy | head -15 # To display the perf.data header info, please use --header/--header-only options. # # # Total Lost Samples: 0 # # Samples: 107 of event 'cycles' # Event count (approx.): 31378313 # # Overhead Command / Shared Object / Symbol # .............. ............................................ # 80.13% swapper 72.29% [kernel.vmlinux] 49.85% [k] intel_idle 9.05% [k] tick_nohz_next_event # Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-9s1dxik37waveor7c84hqti2@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/stdio/hist.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 828e27a899156047758628a97eedeb2b8df41670 Author: Arnaldo Carvalho de Melo Date: Tue Jun 25 16:04:17 2019 -0300 perf ctype: Remove unused 'graph_line' variable Not being used at all anywhere. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-1e567f8tn8m4ii7dy1w9dp39@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/ctype.c | 4 ---- tools/perf/util/sane_ctype.h | 1 - 2 files changed, 5 deletions(-) commit 11f6c2307caee89370d7752eb6f404f1ed73faaf Author: Stephen Boyd Date: Mon Jun 24 20:01:55 2019 -0700 clk: Simplify debugfs printing and add a newline The possible parent printing function duplicates a bunch of if conditions. Pull that into another function so we can print an extra character at the end, either a space or a newline. This way we can add the required newline that got lost here and also shorten the code. Fixes: 2d156b78ce8f ("clk: Fix debugfs clk_possible_parents for clks without parent string names") Cc: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Reviewed-by: Chen-Yu Tsai Signed-off-by: Stephen Boyd drivers/clk/clk.c | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) commit a201b6ac20ff99e1c4b606f54874a20694e3b0c4 Author: Huang Rui Date: Fri Jun 14 16:19:36 2019 +0800 drm/amd/powerplay: make athub pg bit configured by pg_flags The athub pg features enabling should be indicated by pg_flags. Reported-by: Lijo Lazar Signed-off-by: Huang Rui Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/nv.c | 3 ++- drivers/gpu/drm/amd/include/amd_shared.h | 3 ++- drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) commit c12d410ff2932009c89289174a0eb99f25968b05 Author: Huang Rui Date: Fri Jun 14 16:12:51 2019 +0800 drm/amd/powerplay: make mmhub pg bit configured by pg_flags The mmhub pg features enabling should be indicated by pg_flags. Reported-by: Lijo Lazar Signed-off-by: Huang Rui Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/nv.c | 3 ++- drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) commit cb2a782eb8087d1bed61f58aa38fe06a693031d7 Author: Kevin Wang Date: Mon Jun 17 13:05:00 2019 +0800 drm/amd/powerplay: add feature check in unforce_dpm_levels function (v2) if not check dpm feature is enabled, it will cause show smc send message failed log in dmesg log. eg: echo "auto" > power_dpm_force_performance_level v2: whitespace fix (Alex) Signed-off-by: Kevin Wang Reviewed-by: Evan Quan Reviewed-by: Rui Teng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit b0c74b96d177304b6d6f8981e90f37f1cd6afa58 Author: Bartosz Golaszewski Date: Mon Jun 24 11:50:56 2019 +0200 clocksource/drivers/davinci: Add support for clocksource Extend the davinci-timer driver to also register a clock source. Signed-off-by: Bartosz Golaszewski Signed-off-by: Daniel Lezcano drivers/clocksource/timer-davinci.c | 85 +++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) commit 721154f972aa68772f410401ebfae795b7b4c5f8 Author: Bartosz Golaszewski Date: Mon Jun 24 11:50:55 2019 +0200 clocksource/drivers/davinci: Add support for clockevents Currently the clocksource and clockevent support for davinci platforms lives in mach-davinci. It hard-codes many things, uses global variables, implements functionalities unused by any platform and has code fragments scattered across many (often unrelated) files. Implement a new, modern and simplified timer driver and put it into drivers/clocksource. We still need to support legacy board files so export a config structure and a function that allows machine code to register the timer. The timer we're using is 64-bit but can be programmed in dual 32-bit mode (both chained and unchained). On all davinci SoCs except for da830 we're using both halves. Lower half for clockevents and upper half for clocksource. On da830 we're using the lower half for both with the help of a compare register. This patch contains the core code and support for clockevent. The clocksource code will be included in a subsequent patch. Signed-off-by: Bartosz Golaszewski Signed-off-by: Daniel Lezcano drivers/clocksource/Kconfig | 5 + drivers/clocksource/Makefile | 1 + drivers/clocksource/timer-davinci.c | 284 ++++++++++++++++++++++++++++++++++++ include/clocksource/timer-davinci.h | 44 ++++++ 4 files changed, 334 insertions(+) commit a55e040c6f21f55f81c53c56e1d8095df35e1d02 Author: Phong Tran Date: Tue Jun 25 11:03:45 2019 +0700 ARM: exynos: Cleanup cppcheck shifting warning Fix warning from cppcheck tool: "Shifting signed 32-bit value by 31 bits is undefined behaviour errors" Signed-off-by: Phong Tran Signed-off-by: Krzysztof Kozlowski arch/arm/mach-exynos/suspend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 79e7739f7b877d05de8f162a3ae8006657436df0 Author: Rob Clark Date: Thu May 16 18:52:46 2019 -0700 arm64: dts: qcom: sdm845-cheza: add initial cheza dt This is essentialy a squash of a bunch of history of cheza dt updates from chromium kernel, some of which were themselves squashes of history from older chromium kernels. I don't claim any credit other than wanting to more easily boot upstream kernel on cheza to have an easier way to test upstream driver work ;-) I've added below in Cc tags all the original actual authors (apologies if I missed any). Cc: Douglas Anderson Cc: Sibi Sankar Cc: Evan Green Cc: Matthias Kaehlcke Cc: Abhinav Kumar Cc: Brian Norris Cc: Venkat Gopalakrishnan Cc: Rajendra Nayak Signed-off-by: Rob Clark Reviewed-by: Douglas Anderson Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/Makefile | 3 + arch/arm64/boot/dts/qcom/sdm845-cheza-r1.dts | 238 +++++ arch/arm64/boot/dts/qcom/sdm845-cheza-r2.dts | 238 +++++ arch/arm64/boot/dts/qcom/sdm845-cheza-r3.dts | 174 ++++ arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi | 1326 ++++++++++++++++++++++++++ 5 files changed, 1979 insertions(+) commit e9146339515ece09ee651f122a51a26ae652ab80 Author: Luca Weiss Date: Fri Apr 26 21:47:47 2019 +0200 ARM: dts: msm8974-FP2: Add vibration motor Add a node describing the vibration motor on the Fairphone 2. Signed-off-by: Luca Weiss Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts | 6 ++++++ 1 file changed, 6 insertions(+) commit f48cee3239a16a2ecf7e20bee485ae1b25d0deec Author: Amit Kucheria Date: Wed Mar 20 18:48:02 2019 +0530 arm64: dts: qcom: qcs404: Add thermal zones for each sensor qcs404 has 10 sensors connected to the single TSENS IP. Define a thermal zone for each of those sensors to expose the temperature of each zone. Signed-off-by: Amit Kucheria Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/qcs404.dtsi | 252 +++++++++++++++++++++++++++++++++++ 1 file changed, 252 insertions(+) commit 64cf50d0c8d16679faf24864cff8bbe95c08f116 Author: Amit Kucheria Date: Wed Mar 20 18:48:01 2019 +0530 arm64: dts: qcom: qcs404: Add tsens controller qcs404 has a single TSENS IP block with 10 sensors. The calibration data is stored in an eeprom (qfprom) that is accessed through the nvmem framework. We add the qfprom node to allow the tsens sensors to be calibrated correctly. Signed-off-by: Amit Kucheria Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/qcs404.dtsi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit ac1092b341148c6fce8d0fe2ce8fa6764027bd02 Author: Evan Quan Date: Fri Jun 14 17:04:36 2019 +0800 drm/amd/powerplay: check gfxclk dpm enablement before proceeding Support gfxclk dpm disablement. Signed-off-by: Evan Quan Reviewed-by: Feifei Xu Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 1 + 1 file changed, 1 insertion(+) commit f3121d3dbb5278028d182a87d5396c0d005a213a Author: Kevin Wang Date: Tue Jun 11 15:21:06 2019 +0800 drm/amd/powerplay: print smu versions only if version mismatch only printf smu version when if version not matched. Signed-off-by: Kevin Wang Reviewed-by: Xiaojie Yuan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ab43c4bf1cc8e8e1f0c7036c3448c5a628d18913 Author: Kevin Wang Date: Thu Jun 6 17:12:34 2019 +0800 drm/amd/powerplay: fix fan speed show error (for hwmon pwm) the navi asic can't get current rpm by MSG_GetCurrentRpm, it will cause show fan rpm error, use Metrics_t to replace it. Signed-off-by: Kevin Wang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) commit 709527c77a8977e95166d7d446e6a54f60e1e285 Author: Nicholas Kazlauskas Date: Mon Jun 24 13:14:14 2019 -0400 drm/amd/display: update infoframe after dig fe is turned on (v2) [Why] The AVI infoframe is incorrectly programmed on DCN1/2 when enabling a stream - causing the wrong pixel encoding to be used for display. This is because the AVI infoframe is programmed before the DIG BE is connected to the FE and turned on, so enabling the AFMT block doesn't actually work and the registers subsequently can't be written to. [How] Program the infoframe *after* turning on the DIG FE. This was the behavior previously used but it was incorrectly reverted when adding the DCN2 HW sequencer code. v2: Don't call update_info_frame twice Fixes: 7ed4e6352c16fe01 ("drm/amd/display: Add DCN2 HW Sequencer and Resource") Signed-off-by: Nicholas Kazlauskas Acked-by: Alex Deucher Reviewed-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 1 + 1 file changed, 1 insertion(+) commit 1189413f9cd45e42dc8ce3dc4eacd6ae27269ef9 Author: Prike Liang Date: Mon Jun 24 17:25:26 2019 +0800 drm/amd/powerplay:clean up the residual mutex for smu_hw_init The mutex for procting SMU during hw_init was removed as system will be deadlock when smu_populate_umd_state_clk try get SMU mutex. Therefore need remove the residual mutex from failed path. Signed-off-by: Prike Liang Reviewed-by: Evan Quan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 1 - 1 file changed, 1 deletion(-) commit aeaa72e25ea8d2a2de6263ab0fe05307a588bdce Author: Ernst Sjöstrand Date: Mon Jun 24 17:15:44 2019 +0200 drm/amd/amdgpu: sdma_v4_0_start: initialize r Reported by smatch: drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:1167 sdma_v4_0_start() error: uninitialized symbol 'r'. Signed-off-by: Ernst Sjöstrand Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 803a1412fe373e6fa9f20b4eba0827dd9c614a57 Author: Ernst Sjöstrand Date: Mon Jun 24 17:15:43 2019 +0200 drm/amd/amdgpu: Fix style issues in dcn20_resource.c Inconsistent indentation and mixed use of brackets. Signed-off-by: Ernst Sjöstrand Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit ed9656fbc8b5b13a2350d9a7eb70f1b8d55e5803 Author: Ernst Sjöstrand Date: Mon Jun 24 17:15:42 2019 +0200 drm/amd/amdgpu: Check stream in amdgpu_dm_commit_planes Reported by smatch: amdgpu_dm.c:5637 amdgpu_dm_commit_planes() error: we previously assumed 'acrtc_state->stream' could be null This seems to be checked for null pretty consistently elsewhere. Signed-off-by: Ernst Sjöstrand Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 70c5350a878d945a2f6a947817260b8d373b7680 Author: Ernst Sjöstrand Date: Mon Jun 24 17:15:41 2019 +0200 drm/amd/amdgpu: amdgpu_hwmon_show_temp: initialize temp Reported by smatch: drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c:1496 amdgpu_hwmon_show_temp() error: uninitialized symbol 'temp'. Signed-off-by: Ernst Sjöstrand Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 616ae02f6c81da410163abe721a350ef6fa0d504 Author: Ernst Sjöstrand Date: Mon Jun 24 17:15:40 2019 +0200 drm/amd/amdgpu: Fix amdgpu_set_pp_od_clk_voltage error check Reported by smatch: drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c:693 amdgpu_set_pp_od_clk_voltage() error: uninitialized symbol 'ret'. Signed-off-by: Ernst Sjöstrand Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 0172591e219bca3bfc6cfde958fc1148d20173a4 Author: Ernst Sjöstrand Date: Mon Jun 24 17:15:39 2019 +0200 drm/amd/amdgpu: Indent AMD_IS_APU properly Reported by smatch: drivers/gpu/drm/amd/amdgpu/soc15.c:715 soc15_get_pcie_usage() warn: inconsistent indenting And a similar one in si.c. Signed-off-by: Ernst Sjöstrand Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/si.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/soc15.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit a6bbc3d5ac29cabe2ea7b54cddb846f93251b89b Author: Alex Deucher Date: Mon Jun 24 10:13:56 2019 -0500 drm/amdgpu/display: drop ifdefs around comments No need to protect the comments. The DCN1_01 config was dopped anyway. Got accidently brought back with the navi merge. Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubbub.c | 6 ------ 1 file changed, 6 deletions(-) commit 6fde3894e26ec53989b12162f11616029825a8c8 Author: Dmitry Osipenko Date: Tue Jun 18 17:03:58 2019 +0300 clocksource/drivers/tegra: Set up maximum-ticks limit properly Tegra's timer has 29 bits for the counter and for the "load" register which sets counter to a load-value. The counter's value is lower than the actual value by 1 because it starts to decrement after one tick, hence the maximum number of ticks that hardware can handle equals to 29 bits + 1. Signed-off-by: Dmitry Osipenko Acked-by: Jon Hunter Acked-by: Thierry Reding Signed-off-by: Daniel Lezcano drivers/clocksource/timer-tegra.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 0ef6b01d024c24fad307b277cfa4a2be7d25dc29 Author: Dmitry Osipenko Date: Tue Jun 18 17:03:57 2019 +0300 clocksource/drivers/tegra: Cycles can't be 0 Tegra's timer uses n+1 scheme for the counter, i.e. timer will fire after one tick if 0 is loaded. The minimum and maximum numbers of oneshot ticks are defined by clockevents_config_and_register(min, max) invocation and the min value is set to 1 tick. Hence "cycles" value can't ever be 0, unless it's a bug in clocksource core. Signed-off-by: Dmitry Osipenko Acked-by: Jon Hunter Acked-by: Thierry Reding Signed-off-by: Daniel Lezcano drivers/clocksource/timer-tegra.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit fc9babc2574691d3bbf0428f007b22261fed55c6 Author: Dmitry Osipenko Date: Tue Jun 18 17:03:56 2019 +0300 clocksource/drivers/tegra: Restore base address before cleanup We're adjusting the timer's base for each per-CPU timer to point to the actual start of the timer since device-tree defines a compound registers range that includes all of the timers. In this case the original base need to be restore before calling iounmap to unmap the proper address. Signed-off-by: Dmitry Osipenko Acked-by: Jon Hunter Acked-by: Thierry Reding Signed-off-by: Daniel Lezcano drivers/clocksource/timer-tegra.c | 2 ++ 1 file changed, 2 insertions(+) commit 2e08a4bb96fd275d42711af10b3484164046bd1d Author: Dmitry Osipenko Date: Tue Jun 18 17:03:55 2019 +0300 clocksource/drivers/tegra: Add verbose definition for 1MHz constant Convert all 1MHz literals to a verbose constant for better readability. Suggested-by: Daniel Lezcano Acked-by: Jon Hunter Signed-off-by: Dmitry Osipenko Acked-by: Thierry Reding Signed-off-by: Daniel Lezcano drivers/clocksource/timer-tegra.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 7c708fda79ebdce0e207562b45a8f085b9f2114f Author: Dmitry Osipenko Date: Tue Jun 18 17:03:54 2019 +0300 clocksource/drivers/tegra: Drop unneeded typecasting in one place There is no need to cast void because kernel allows to do that without a warning message from a compiler. Acked-by: Jon Hunter Signed-off-by: Dmitry Osipenko Acked-by: Thierry Reding Signed-off-by: Daniel Lezcano drivers/clocksource/timer-tegra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 09b2507fbf576ece526563886f5c215fda470924 Author: Dmitry Osipenko Date: Tue Jun 18 17:03:53 2019 +0300 clocksource/drivers/tegra: Set and use timer's period The of_clk structure has a period field that is set up initially by timer_of_clk_init(), that period value need to be adjusted for a case of TIMER1-9 that are running at a fixed rate that doesn't match the clock's rate. Note that the period value is currently used only by some of the clocksource drivers internally and hence this is just a minor cleanup change that doesn't fix anything. Signed-off-by: Dmitry Osipenko Acked-by: Jon Hunter Acked-by: Thierry Reding Signed-off-by: Daniel Lezcano drivers/clocksource/timer-tegra.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 99311d0e841c4235f784551af224de148feebc9b Author: Dmitry Osipenko Date: Tue Jun 18 17:03:52 2019 +0300 clocksource/drivers/tegra: Remove duplicated use of per_cpu_ptr It was left unnoticed by accident, which means that the code could be cleaned up a tad more. Acked-by: Jon Hunter Signed-off-by: Dmitry Osipenko Acked-by: Thierry Reding Signed-off-by: Daniel Lezcano drivers/clocksource/timer-tegra.c | 42 +++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 17 deletions(-) commit 59d43c9589538e82cd87d51ace69c9e350149d98 Author: Dmitry Osipenko Date: Tue Jun 18 17:03:51 2019 +0300 clocksource/drivers/tegra: Restore timer rate on Tegra210 The clocksource rate is initialized only for the first per-CPU clocksource and then that rate shall be replicated for the rest of clocksource's because they are initialized manually in the code. Fixes: 3be2a85a0b61 ("clocksource/drivers/tegra: Support per-CPU timers on all Tegra's") Acked-by: Jon Hunter Tested-by: Jon Hunter Signed-off-by: Dmitry Osipenko Acked-by: Thierry Reding Signed-off-by: Daniel Lezcano drivers/clocksource/timer-tegra.c | 2 ++ 1 file changed, 2 insertions(+) commit 5a354412567d7de81d69b6ac61c3b7fcebbe497e Author: Andrew Murray Date: Thu Jun 13 13:51:02 2019 +0100 clocksource/drivers/arm_arch_timer: Extract elf_hwcap use to arch-helper Different mechanisms are used to test and set elf_hwcaps between ARM and ARM64, this results in the use of ifdeferry in this file when setting/testing for the EVTSTRM hwcap. Let's improve readability by extracting this to an arch helper. Signed-off-by: Andrew Murray Acked-by: Mark Rutland Acked-by: Will Deacon Signed-off-by: Daniel Lezcano arch/arm/include/asm/arch_timer.h | 10 ++++++++++ arch/arm64/include/asm/arch_timer.h | 13 +++++++++++++ drivers/clocksource/arm_arch_timer.c | 15 ++------------- 3 files changed, 25 insertions(+), 13 deletions(-) commit 7117a44bc0eb5d73dc8aa8df92134f736c2099ac Author: Bai Ping Date: Wed Jun 5 06:40:52 2019 +0000 clocksource/drivers/sysctr: Add nxp system counter timer driver support The system counter (sys_ctr) is a programmable system counter which provides a shared time base to the Cortex A15, A7, A53 etc cores. It is intended for use in applications where the counter is always powered on and supports multiple, unrelated clocks. The sys_ctr hardware supports: - 56-bit counter width (roll-over time greater than 40 years) - compare frame(64-bit compare value) contains programmable interrupt generation when compare value <= counter value. [dlezcano] Fixed over 80 chars length warning Signed-off-by: Bai Ping Signed-off-by: Daniel Lezcano .../devicetree/bindings/timer/nxp,sysctr-timer.txt | 25 ++++ drivers/clocksource/Kconfig | 7 + drivers/clocksource/Makefile | 1 + drivers/clocksource/timer-imx-sysctr.c | 145 +++++++++++++++++++++ 4 files changed, 178 insertions(+) commit 668f870f98ac935a550e8f9b1fa6ef74831b3b40 Author: Dmitry Osipenko Date: Mon Jun 3 21:59:48 2019 +0300 clocksource/drivers/tegra: Rename timer-tegra20.c to timer-tegra.c Rename driver's source file to better reflect that it's not specific to older SoC generations. Suggested-by: Daniel Lezcano Signed-off-by: Dmitry Osipenko Acked-By: Peter De Schrijver Signed-off-by: Daniel Lezcano drivers/clocksource/Makefile | 2 +- drivers/clocksource/{timer-tegra20.c => timer-tegra.c} | 0 2 files changed, 1 insertion(+), 1 deletion(-) commit 87bd4c26a6c8e0aa29bf9c77accd16ab8c660a9a Author: Dmitry Osipenko Date: Mon Jun 3 21:59:47 2019 +0300 clocksource/drivers/tegra: Lower clocksource rating for some Tegra's Arch-timer is more preferable for a range of Tegra SoC generations as it has higher precision and is not affect by any kind of problems. Pointed-out-by: Peter De Schrijver Signed-off-by: Dmitry Osipenko Acked-By: Peter De Schrijver Signed-off-by: Daniel Lezcano drivers/clocksource/timer-tegra20.c | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) commit acb4bb3f37f1fdec00421c4126bf1e2e276a892b Author: Dmitry Osipenko Date: Mon Jun 3 21:59:46 2019 +0300 clocksource/drivers/tegra: Support COMPILE_TEST universally Remove build dependency on ARM for compile-testing to allow non-arch specific build-bots (like Intel's test robot) to compile the driver and report about problems. Signed-off-by: Dmitry Osipenko Acked-By: Peter De Schrijver Signed-off-by: Daniel Lezcano drivers/clocksource/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 49a678b8ca4c4f40bb2775369c82c9faabfc4a59 Author: Dmitry Osipenko Date: Mon Jun 3 21:59:44 2019 +0300 clocksource/drivers/tegra: Minor code clean up Correct typo and use proper upper casing for acronyms in the comments, use common style for error messages, prepend error messages with "tegra-timer:", add error message for cpuhp_setup_state() failure and clean up whitespaces in the code to fix checkpatch warnings. Signed-off-by: Dmitry Osipenko Acked-By: Peter De Schrijver Signed-off-by: Daniel Lezcano drivers/clocksource/timer-tegra20.c | 43 +++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 19 deletions(-) commit 7a3916706e858ad0bc3b5629c68168e1449de26a Author: Dmitry Osipenko Date: Mon Jun 3 21:59:43 2019 +0300 clocksource/drivers/tegra: Release all IRQ's on request_irq() error Release all requested IRQ's on the request error to properly clean up allocated resources. Signed-off-by: Dmitry Osipenko Acked-By: Peter De Schrijver Signed-off-by: Daniel Lezcano drivers/clocksource/timer-tegra20.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 6b349c3624d230f4bd692d57d8203a407f52b646 Author: Dmitry Osipenko Date: Mon Jun 3 21:59:42 2019 +0300 clocksource/drivers/tegra: Replace readl/writel with relaxed versions The readl/writel functions are inserting memory barrier to ensure that outstanding memory writes are completed, this results in L2 cache syncing being done on Tegra20 and Tegra30 which isn't a very cheap operation. Replace all readl/writel occurrences in the code with the relaxed versions since there is no need for the memory-access syncing. Signed-off-by: Dmitry Osipenko Acked-By: Peter De Schrijver Signed-off-by: Daniel Lezcano drivers/clocksource/timer-tegra20.c | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) commit 77d57d1d8016696daaf5614c070ac01c9652f4ce Author: Dmitry Osipenko Date: Mon Jun 3 21:59:41 2019 +0300 clocksource/drivers/tegra: Reset hardware state on init Reset timer's hardware state to ensure that initially it is in a predictable state. Signed-off-by: Dmitry Osipenko Acked-By: Peter De Schrijver Signed-off-by: Daniel Lezcano drivers/clocksource/timer-tegra20.c | 3 +++ 1 file changed, 3 insertions(+) commit af8d9129eced348c699cca73b1c52e3855df063e Author: Dmitry Osipenko Date: Mon Jun 3 21:59:40 2019 +0300 clocksource/drivers/tegra: Unify timer code Tegra132 is 64bit platform and it has the tegra20-timer hardware unit. Right now the corresponding timer code isn't compiled for ARM64, remove ifdef'iness from the code and compile tegra20-timer for both 32 and 64 bit platforms. Also note that like the older generations, Tegra210 has the microseconds counter, hence the timer_us clocksource is now made available for Tegra210 as well. Signed-off-by: Dmitry Osipenko Acked-By: Peter De Schrijver Signed-off-by: Daniel Lezcano drivers/clocksource/timer-tegra20.c | 111 +++++++++++++++++++----------------- 1 file changed, 60 insertions(+), 51 deletions(-) commit f6d50ec5f85c98d191d8dda032557ab297c14401 Author: Dmitry Osipenko Date: Mon Jun 3 21:59:39 2019 +0300 clocksource/drivers/tegra: Support per-CPU timers on all Tegra's Assign TMR1-4 per-CPU core on 32bit Tegra's in a way it is done for Tegra210. In a result each core can handle its own timer events, less code is unique to ARM64 and Tegra's clock events driver now has higher rating on all Tegra's, replacing the ARM's TWD timer which isn't very accurate due to the clock rate jitter caused by CPU frequency scaling. Signed-off-by: Dmitry Osipenko Acked-By: Peter De Schrijver Signed-off-by: Daniel Lezcano drivers/clocksource/timer-tegra20.c | 120 +++++++++++++----------------------- 1 file changed, 43 insertions(+), 77 deletions(-) commit 6282edb72bed5324352522d732080d4c1b9dfed6 Author: Marek Szyprowski Date: Thu May 30 12:50:43 2019 +0200 clocksource/drivers/exynos_mct: Increase priority over ARM arch timer Exynos SoCs based on CA7/CA15 have 2 timer interfaces: custom Exynos MCT (Multi Core Timer) and standard ARM Architected Timers. There are use cases, where both timer interfaces are used simultanously. One of such examples is using Exynos MCT for the main system timer and ARM Architected Timers for the KVM and virtualized guests (KVM requires arch timers). Exynos Multi-Core Timer driver (exynos_mct) must be however started before ARM Architected Timers (arch_timer), because they both share some common hardware blocks (global system counter) and turning on MCT is needed to get ARM Architected Timer working properly. To ensure selecting Exynos MCT as the main system timer, increase MCT timer rating. To ensure proper starting order of both timers during suspend/resume cycle, increase MCT hotplug priority over ARM Archictected Timers. Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Reviewed-by: Chanwoo Choi Signed-off-by: Daniel Lezcano drivers/clocksource/exynos_mct.c | 4 ++-- include/linux/cpuhotplug.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 93665ab0626ca213074355f7ddab7856898eb73b Author: Masahiro Yamada Date: Fri May 24 14:40:10 2019 +0900 clocksource/drivers/arc_timer: Use BIT() instead of _BITUL() This is in-kernel C code, so there is no reason to use _BITUL(). Replace it with equivalent BIT(). I added #include explicitly although it has been included by other headers eventually. Signed-off-by: Masahiro Yamada Signed-off-by: Daniel Lezcano drivers/clocksource/arc_timer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8925ed4b10345915d576ba2fc6b319e6eae3d8b8 Author: Linus Walleij Date: Thu May 23 20:16:02 2019 +0200 clocksource/drivers/ixp4xx: Implement delay timer This adds delay timer functionality to the IXP4xx timer driver. Signed-off-by: Linus Walleij Signed-off-by: Daniel Lezcano drivers/clocksource/timer-ixp4xx.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 91d59bdf87cac292afd29e0f5a00988ec95ff73b Author: Neil Armstrong Date: Mon May 20 16:00:07 2019 +0200 clocksource/drivers/timer-meson6: Update with SPDX Licence identifier Comply with the licensing rules defined in the documentation. Signed-off-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Signed-off-by: Daniel Lezcano drivers/clocksource/timer-meson6.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit e9816ddf2a33f3afdf3dfc35c21aafad389ee482 Author: Lijun Ou Date: Wed Jun 19 15:00:47 2019 +0800 RDMA/hns: Cleanup unnecessary exported symbols This patch removes the hns-roce.ko for cleanup all the exported symbols in common part. Signed-off-by: Xi Wang Signed-off-by: Lijun Ou Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hns/Kconfig | 15 +++++++-------- drivers/infiniband/hw/hns/Makefile | 13 +++++++++---- drivers/infiniband/hw/hns/hns_roce_alloc.c | 2 -- drivers/infiniband/hw/hns/hns_roce_cmd.c | 4 ---- drivers/infiniband/hw/hns/hns_roce_cq.c | 5 ----- drivers/infiniband/hw/hns/hns_roce_db.c | 4 ---- drivers/infiniband/hw/hns/hns_roce_hem.c | 5 ----- drivers/infiniband/hw/hns/hns_roce_main.c | 3 --- drivers/infiniband/hw/hns/hns_roce_mr.c | 5 ----- drivers/infiniband/hw/hns/hns_roce_pd.c | 2 -- drivers/infiniband/hw/hns/hns_roce_qp.c | 13 ------------- drivers/infiniband/hw/hns/hns_roce_srq.c | 1 - 12 files changed, 16 insertions(+), 56 deletions(-) commit 3e10f3196b55f3ed41a2727e9720c19e5ff1078f Author: Alex Deucher Date: Tue Jun 25 08:54:21 2019 -0500 drm/amdgpu/display: switch udelay to msleep We may need to sleep for up to 80ms (8ms per each of up to 10 loop iterations): /* First DPCD read after VDD ON can fail if the particular board * does not have HPD pin wired correctly. So if DPCD read fails, * which it should never happen, retry a few times. Target worst * case scenario of 80 ms. */ Switch udelay to msleep to avoid limits on arm. Reviewed-by: Nicholas Kazlauskas Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 44ff0ae6b15e78565199a4c295de2a5bac425922 Author: Alex Deucher Date: Tue Jun 25 08:48:15 2019 -0500 drm/amdgpu/powerplay: FEATURE_MASK is 64 bit so use ULL ULL is needed for 32 bit arches. Reviewed-by: Nicholas Kazlauskas Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 2 +- drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 555b2c3da1fc3d1c5cc133e9353354c40fbfe336 Author: Eric Sandeen Date: Fri Jun 21 18:27:13 2019 -0500 quota: honor quota type in Q_XGETQSTAT[V] calls The code in quota_getstate and quota_getstatev is strange; it says the returned fs_quota_stat[v] structure has room for only one type of time limits, so fills it in with the first enabled quota, even though every quotactl command must have a type sent in by the user. Instead of just picking the first enabled quota, fill in the reply with the timers for the quota type that was actually requested. Reviewed-by: Christoph Hellwig Signed-off-by: Eric Sandeen Signed-off-by: Jan Kara fs/quota/quota.c | 38 ++++++++++++-------------------------- 1 file changed, 12 insertions(+), 26 deletions(-) commit d914d4d4974529da898f2d2618e39df757147c2f Author: Aaro Koskinen Date: Mon Jun 17 23:35:19 2019 +0300 arm64: Implement panic_smp_self_stop() Currently arm64 uses the default implementation of panic_smp_self_stop() where the CPU runs in a cpu_relax() loop unable to receive IPIs anymore. As a result, when two CPUs panic() simultaneously we get "SMP: failed to stop secondary CPUs" warnings and extra delays before a reset, because smp_send_stop() still tries to stop the other paniced CPU. Provide an implementation of panic_smp_self_stop() that is identical to the IPI CPU stop handler, so that the online status of stopped CPUs gets properly updated. Acked-by: Will Deacon Signed-off-by: Aaro Koskinen Signed-off-by: Catalin Marinas arch/arm64/kernel/smp.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit dccc9da22dedad203acea355b0e4d946b71172e5 Author: Jayachandran C Date: Mon Jun 17 23:35:18 2019 +0300 arm64: Improve parking of stopped CPUs The current code puts the stopped cpus in an 'yield' instruction loop. Using a busy loop here is unnecessary, we can use the cpu_park_loop() function here to do a wfi/wfe. Signed-off-by: Jayachandran C Signed-off-by: Aaro Koskinen Acked-by: Will Deacon Signed-off-by: Catalin Marinas arch/arm64/kernel/smp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit ca156e006add67e4beea7896be395160735e09b0 Author: Tejun Heo Date: Mon Jun 24 09:32:50 2019 -0700 libata: don't request sense data on !ZAC ATA devices ZAC support added sense data requesting on error for both ZAC and ATA devices. This seems to cause erratic error handling behaviors on some SSDs where the device reports sense data availability and then delivers the wrong content making EH take the wrong actions. The failure mode was sporadic on a LITE-ON ssd and couldn't be reliably reproduced. There is no value in requesting sense data from non-ZAC ATA devices while there's a significant risk of introducing EH misbehaviors which are difficult to reproduce and fix. Let's do the sense data dancing only for ZAC devices. Reviewed-by: Hannes Reinecke Tested-by: Masato Suzuki Reviewed-by: Damien Le Moal Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe drivers/ata/libata-eh.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit aa38571246c6ac279ebebd141157297bcb959d76 Author: Masahiro Yamada Date: Sat Jun 22 03:00:26 2019 +0900 arm64: dts: uniphier: add reserved-memory for secure memory The memory regions specified by /memreserve/ are passed to early_init_dt_reserve_memory_arch() with nomap=false, so it is not suitable for reserving memory for Trusted Firmware-A etc. Use the more robust /reserved-memory node with the no-map property to prevent the kernel from mapping it. Signed-off-by: Masahiro Yamada arch/arm64/boot/dts/socionext/uniphier-ld11.dtsi | 13 +++++++++++-- arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi | 13 +++++++++++-- arch/arm64/boot/dts/socionext/uniphier-pxs3.dtsi | 13 +++++++++++-- 3 files changed, 33 insertions(+), 6 deletions(-) commit 53c580c1bdbd6332947fdfa6634b61048762b9b5 Author: Masahiro Yamada Date: Fri Jun 21 20:02:25 2019 +0900 arm64: dts: uniphier: update to new Denali NAND binding With commit d8e8fd0ebf8b ("mtd: rawnand: denali: decouple controller and NAND chips"), the Denali NAND controller driver migrated to the new controller/chip representation. Update DT for it. Signed-off-by: Masahiro Yamada arch/arm64/boot/dts/socionext/uniphier-ld11-global.dts | 4 ++++ arch/arm64/boot/dts/socionext/uniphier-ld11.dtsi | 2 ++ arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi | 2 ++ arch/arm64/boot/dts/socionext/uniphier-pxs3-ref.dts | 4 ++++ arch/arm64/boot/dts/socionext/uniphier-pxs3.dtsi | 2 ++ 5 files changed, 14 insertions(+) commit 3726112ec7316068625a1adefa101b9522c588ba Author: Paolo Valente Date: Tue Jun 25 07:12:49 2019 +0200 block, bfq: re-schedule empty queues if they deserve I/O plugging Consider, on one side, a bfq_queue Q that remains empty while in service, and, on the other side, the pending I/O of bfq_queues that, according to their timestamps, have to be served after Q. If an uncontrolled amount of I/O from the latter bfq_queues were dispatched while Q is waiting for its new I/O to arrive, then Q's bandwidth guarantees would be violated. To prevent this, I/O dispatch is plugged until Q receives new I/O (except for a properly controlled amount of injected I/O). Unfortunately, preemption breaks I/O-dispatch plugging, for the following reason. Preemption is performed in two steps. First, Q is expired and re-scheduled. Second, the new bfq_queue to serve is chosen. The first step is needed by the second, as the second can be performed only after Q's timestamps have been properly updated (done in the expiration step), and Q has been re-queued for service. This dependency is a consequence of the way how BFQ's scheduling algorithm is currently implemented. But Q is not re-scheduled at all in the first step, because Q is empty. As a consequence, an uncontrolled amount of I/O may be dispatched until Q becomes non empty again. This breaks Q's service guarantees. This commit addresses this issue by re-scheduling Q even if it is empty. This in turn breaks the assumption that all scheduled queues are non empty. Then a few extra checks are now needed. Signed-off-by: Paolo Valente Signed-off-by: Jens Axboe block/bfq-iosched.c | 387 +++++++++++++++++++++++++++------------------------- 1 file changed, 203 insertions(+), 184 deletions(-) commit 96a291c38c329910738c002de83a9e3f6bf8c6e7 Author: Paolo Valente Date: Tue Jun 25 07:12:48 2019 +0200 block, bfq: preempt lower-weight or lower-priority queues BFQ enqueues the I/O coming from each process into a separate bfq_queue, and serves bfq_queues one at a time. Each bfq_queue may be served for at most timeout_sync milliseconds (default: 125 ms). This service scheme is prone to the following inaccuracy. While a bfq_queue Q1 is in service, some empty bfq_queue Q2 may receive I/O, and, according to BFQ's scheduling policy, may become the right bfq_queue to serve, in place of the currently in-service bfq_queue. In this respect, postponing the service of Q2 to after the service of Q1 finishes may delay the completion of Q2's I/O, compared with an ideal service in which all non-empty bfq_queues are served in parallel, and every non-empty bfq_queue is served at a rate proportional to the bfq_queue's weight. This additional delay is equal at most to the time Q1 may unjustly remain in service before switching to Q2. If Q1 and Q2 have the same weight, then this time is most likely negligible compared with the completion time to be guaranteed to Q2's I/O. In addition, first, one of the reasons why BFQ may want to serve Q1 for a while is that this boosts throughput and, second, serving Q1 longer reduces BFQ's overhead. As a conclusion, it is usually better not to preempt Q1 if both Q1 and Q2 have the same weight. In contrast, as Q2's weight or priority becomes higher and higher compared with that of Q1, the above delay becomes larger and larger, compared with the I/O completion times that have to be guaranteed to Q2 according to Q2's weight. So reducing this delay may be more important than avoiding the costs of preempting Q1. Accordingly, this commit preempts Q1 if Q2 has a higher weight or a higher priority than Q1. Preemption causes Q1 to be re-scheduled, and triggers a new choice of the next bfq_queue to serve. If Q2 really is the next bfq_queue to serve, then Q2 will be set in service immediately. This change reduces the component of the I/O latency caused by the above delay by about 80%. For example, on an (old) PLEXTOR PX-256M5 SSD, the maximum latency reported by fio drops from 15.1 to 3.2 ms for a process doing sporadic random reads while another process is doing continuous sequential reads. Signed-off-by: Nicola Bottura Signed-off-by: Paolo Valente Signed-off-by: Jens Axboe block/bfq-iosched.c | 95 ++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 75 insertions(+), 20 deletions(-) commit 13a857a4c4e826c587cde3a69bc3d1162d247d9d Author: Paolo Valente Date: Tue Jun 25 07:12:47 2019 +0200 block, bfq: detect wakers and unconditionally inject their I/O A bfq_queue Q may happen to be synchronized with another bfq_queue Q2, i.e., the I/O of Q2 may need to be completed for Q to receive new I/O. We call Q2 "waker queue". If I/O plugging is being performed for Q, and Q is not receiving any more I/O because of the above synchronization, then, thanks to BFQ's injection mechanism, the waker queue is likely to get served before the I/O-plugging timeout fires. Unfortunately, this fact may not be sufficient to guarantee a high throughput during the I/O plugging, because the inject limit for Q may be too low to guarantee a lot of injected I/O. In addition, the duration of the plugging, i.e., the time before Q finally receives new I/O, may not be minimized, because the waker queue may happen to be served only after other queues. To address these issues, this commit introduces the explicit detection of the waker queue, and the unconditional injection of a pending I/O request of the waker queue on each invocation of bfq_dispatch_request(). One may be concerned that this systematic injection of I/O from the waker queue delays the service of Q's I/O. Fortunately, it doesn't. On the contrary, next Q's I/O is brought forward dramatically, for it is not blocked for milliseconds. Reported-by: Srivatsa S. Bhat (VMware) Tested-by: Srivatsa S. Bhat (VMware) Signed-off-by: Paolo Valente Signed-off-by: Jens Axboe block/bfq-iosched.c | 270 +++++++++++++++++++++++++++++++++++++++++++++------- block/bfq-iosched.h | 25 ++++- 2 files changed, 261 insertions(+), 34 deletions(-) commit a3f9bce3697a5b4039ff7096db4a1ee897349276 Author: Paolo Valente Date: Tue Jun 25 07:12:46 2019 +0200 block, bfq: bring forward seek&think time update Until the base value for request service times gets finally computed for a bfq_queue, the inject limit for that queue does depend on the think-time state (short|long) of the queue. A timely update of the think time then guarantees a quicker activation or deactivation of the injection. Fortunately, the think time of a bfq_queue is updated in the same code path as the inject limit; but after the inject limit. This commits moves the update of the think time before the update of the inject limit. For coherence, it moves the update of the seek time too. Reported-by: Srivatsa S. Bhat (VMware) Tested-by: Srivatsa S. Bhat (VMware) Signed-off-by: Paolo Valente Signed-off-by: Jens Axboe block/bfq-iosched.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 24792ad01cb659c8b5899de2af6e8ca250f93df3 Author: Paolo Valente Date: Tue Jun 25 07:12:45 2019 +0200 block, bfq: update base request service times when possible I/O injection gets reduced if it increases the request service times of the victim queue beyond a certain threshold. The threshold, in its turn, is computed as a function of the base service time enjoyed by the queue when it undergoes no injection. As a consequence, for injection to work properly, the above base value has to be accurate. In this respect, such a value may vary over time. For example, it varies if the size or the spatial locality of the I/O requests in the queue change. It is then important to update this value whenever possible. This commit performs this update. Reported-by: Srivatsa S. Bhat (VMware) Tested-by: Srivatsa S. Bhat (VMware) Signed-off-by: Paolo Valente Signed-off-by: Jens Axboe block/bfq-iosched.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit db599f9ed9bd31b018b6c48ad7c6b21d5b790ecf Author: Paolo Valente Date: Tue Jun 25 07:12:44 2019 +0200 block, bfq: fix rq_in_driver check in bfq_update_inject_limit One of the cases where the parameters for injection may be updated is when there are no more in-flight I/O requests. The number of in-flight requests is stored in the field bfqd->rq_in_driver of the descriptor bfqd of the device. So, the controlled condition is bfqd->rq_in_driver == 0. Unfortunately, this is wrong because, the instruction that checks this condition is in the code path that handles the completion of a request, and, in particular, the instruction is executed before bfqd->rq_in_driver is decremented in such a code path. This commit fixes this issue by just replacing 0 with 1 in the comparison. Reported-by: Srivatsa S. Bhat (VMware) Tested-by: Srivatsa S. Bhat (VMware) Signed-off-by: Paolo Valente Signed-off-by: Jens Axboe block/bfq-iosched.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 766d61412ef840295f55e98e2c5fb0fc110c6ca4 Author: Paolo Valente Date: Tue Jun 25 07:12:43 2019 +0200 block, bfq: reset inject limit when think-time state changes Until the base value of the request service times gets finally computed for a bfq_queue, the inject limit does depend on the think-time state (short|long). The limit must be 0 or 1 if the think time is deemed, respectively, as short or long. However, such a check and possible limit update is performed only periodically, once per second. So, to make the injection mechanism much more reactive, this commit performs the update also every time the think-time state changes. In addition, in the following special case, this commit lets the inject limit of a bfq_queue bfqq remain equal to 1 even if bfqq's think time is short: bfqq's I/O is synchronized with that of some other queue, i.e., bfqq may receive new I/O only after the I/O of the other queue is completed. Keeping the inject limit to 1 allows the blocking I/O to be served while bfqq is in service. And this is very convenient both for bfqq and for the total throughput, as explained in detail in the comments in bfq_update_has_short_ttime(). Reported-by: Srivatsa S. Bhat (VMware) Tested-by: Srivatsa S. Bhat (VMware) Signed-off-by: Paolo Valente Signed-off-by: Jens Axboe block/bfq-iosched.c | 219 ++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 151 insertions(+), 68 deletions(-) commit bc8841f0c1e6945fd7fde6faad3300d1b08abd86 Author: Masahiro Yamada Date: Fri Jun 21 19:53:16 2019 +0900 ARM: dts: uniphier: update to new Denali NAND binding With commit d8e8fd0ebf8b ("mtd: rawnand: denali: decouple controller and NAND chips"), the Denali NAND controller driver migrated to the new controller/chip representation. Update DT for it. In the new binding, the number of connected chips are described in DT instead of run-time probed. I added just one chip to the reference boards, where we do not know if the on-board NAND device is a single chip or multiple chips. If we added too many chips into DT, it would end up with the timeout error in nand_scan_ident(). I changed all the pinctrl properties to use the single CS. Signed-off-by: Masahiro Yamada arch/arm/boot/dts/uniphier-ld4-ref.dts | 4 ++++ arch/arm/boot/dts/uniphier-ld4.dtsi | 4 +++- arch/arm/boot/dts/uniphier-ld6b-ref.dts | 4 ++++ arch/arm/boot/dts/uniphier-pro4-ref.dts | 4 ++++ arch/arm/boot/dts/uniphier-pro4.dtsi | 2 ++ arch/arm/boot/dts/uniphier-pro5.dtsi | 4 +++- arch/arm/boot/dts/uniphier-pxs2.dtsi | 4 +++- arch/arm/boot/dts/uniphier-sld8-ref.dts | 4 ++++ arch/arm/boot/dts/uniphier-sld8.dtsi | 4 +++- 9 files changed, 30 insertions(+), 4 deletions(-) commit a8cd7066f0422f378902770034ddac1720d0e032 Author: Kamil Lulko Date: Thu Jun 13 21:04:36 2019 +0200 ASoC: Intel: Skylake: Strip T and L from TLV IPCs cAVS modules do not require Type and Length header within the set_module_params IPC. This is also true for Vendor modules. The userspace (like tinymix) always appends this header to TLV controls which are used for set_module_params. Simply assume this header is always present in the payload and omit it from the IPC. Signed-off-by: Kamil Lulko Signed-off-by: Cezary Rojewski Reviewed-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-topology.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) commit 02923faa6b29ac0423f1d5ff8c13c5eeb4e5669b Author: Amadeusz Sławiński Date: Thu Jun 13 21:04:35 2019 +0200 ASoC: Intel: Skylake: Reset pipeline before its deletion Before actual deletion, pipeline should enter RESET state. Currently, pipe skips this checkpoint and goes straight to the finish line. This is not the expected path by the FW, so correct it. Signed-off-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Reviewed-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-messages.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) commit 9f4f42d710d417745cff05845f93370126f77ff7 Author: Cezary Rojewski Date: Thu Jun 13 21:04:34 2019 +0200 ASoC: Intel: Common: Fix NULL dereference in tx_wait_done rx_data and rx_bytes present for tx_wait_done are optional parameters. If not provided, function should not attempt to copy received data. This change fixes memcpy NULL pointer dereference issue occurring when optional rx_data is NULL while received message size is non-zero. Signed-off-by: Cezary Rojewski Reviewed-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/common/sst-ipc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 26ae20490809db30677dfd54f81a73ce77ba2df1 Author: Gustaw Lewandowski Date: Thu Jun 13 21:04:33 2019 +0200 ASoC: Intel: Fix race condition in IPC rx list Since there are multiple IPCs being sent in a short span of time, there is a possibility of more than one message being on the Rx list after receiving response from firmware. In such cases, when the first notification of interrupt from firmware is received, driver retrieves the message from the Rx list but does not delete it from the list till the next lock. In the meantime, when another interrupt is received from the firmware, driver is reading the previous message again since the previous message has not been removed from the list. Signed-off-by: Gustaw Lewandowski Reviewed-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-sst-ipc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 078759399ff74e2e6f5e208c61924d1b7d66e5d8 Author: Cezary Rojewski Date: Thu Jun 13 21:04:32 2019 +0200 ASoC: Intel: Skylake: Read HIPCT extension before clearing DONE bit Host clears DONE bit to signal IPC target it has completed the operation. Once this is done, IPC target i.e. DSP may proceed with the next reply, filling registers with new portion of data. Because of this, host should always read all registers prior to clearing DONE and BUSY bits to ensure no desynchronization happens the time in between clearing bits and reading message data (here, extension). Signed-off-by: Cezary Rojewski Reviewed-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/skylake/cnl-sst.c | 2 +- sound/soc/intel/skylake/skl-sst-ipc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 9f90af3a995298d2a49b23b896f075d6a1cc8a17 Author: Amadeusz Sławiński Date: Mon Jun 17 13:36:44 2019 +0200 ASoC: topology: Consolidate and fix asoc_tplg_dapm_widget_*_create flow There are a few soc_tplg_dapm_widget_*_create functions with similar content, but slightly different flow, unify their flow and make sure that we go to error handler and free memory in case of failure. Signed-off-by: Amadeusz Sławiński Acked-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/soc-topology.c | 77 ++++++++++++++++++++++-------------------------- 1 file changed, 35 insertions(+), 42 deletions(-) commit 3cde818cd02b9602270092f6c06c727c70f84d1e Author: Amadeusz Sławiński Date: Mon Jun 17 13:36:43 2019 +0200 ASoC: topology: Consolidate how dtexts and dvalues are freed Provide helper functions and use them to free dtexts and dvalues in topology. This is followup cleanup after related changes in this area as suggested in: https://mailman.alsa-project.org/pipermail/alsa-devel/2019-January/144761.html Signed-off-by: Amadeusz Sławiński Reviewed-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/soc-topology.c | 41 ++++++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 17 deletions(-) commit 0f6ff78540bd1b4df1e0f17806b0ce2e1dff0d78 Author: Amadeusz Sławiński Date: Mon Jun 17 13:36:42 2019 +0200 ASoC: Intel: hdac_hdmi: Set ops to NULL on remove When we unload Skylake driver we may end up calling hdac_component_master_unbind(), it uses acomp->audio_ops, which we set in hdmi_codec_probe(), so we need to set it to NULL in hdmi_codec_remove(), otherwise we will dereference no longer existing pointer. Signed-off-by: Amadeusz Sławiński Reviewed-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/codecs/hdac_hdmi.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 6ee927f2f014668c5fe920d0fd1a6ad48671bfce Author: Amadeusz Sławiński Date: Mon Jun 17 13:36:41 2019 +0200 ASoC: Intel: Skylake: Fix NULL ptr dereference when unloading clk dev When driver is probed, we iterate over NHLT and check if clk entries are present. For each such entry we call register_skl_clk and keep the result in data->clk[]. Currently data->clk is sparsely indexed using NHLT table iterator, while when freeing we use number of registered entries. Let's just use data->avail_clk_cnt as index, so it can be reset back in unregister_src_clk. Signed-off-by: Amadeusz Sławiński Reviewed-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-ssp-clk.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit e79986ce50d65f490c6eab3aaea1ff2ab5df5d04 Author: Amadeusz Sławiński Date: Mon Jun 17 13:36:40 2019 +0200 ASoC: Intel: Skylake: Properly cleanup on component removal When we remove component we need to reverse things which were done on init, this consists of topology cleanup, lists cleanup and releasing firmware. Currently cleanup handlers are put in wrong places or otherwise missing. So add proper component cleanup function and perform cleanups in it. Signed-off-by: Amadeusz Sławiński Reviewed-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-pcm.c | 8 ++++++-- sound/soc/intel/skylake/skl-topology.c | 15 +++++++++++++++ sound/soc/intel/skylake/skl-topology.h | 2 ++ sound/soc/intel/skylake/skl.c | 2 -- 4 files changed, 23 insertions(+), 4 deletions(-) commit 5b8e4c1c66021dab1ed1683704f7ce47adbd7934 Author: Amadeusz Sławiński Date: Mon Jun 17 13:36:39 2019 +0200 ASoC: Intel: Skylake: Add function to cleanup debugfs interface Currently debugfs has no cleanup function. Add skl_debufs_exit function so we can clean after ourselves properly. Signed-off-by: Amadeusz Sławiński Reviewed-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-debug.c | 9 +++++++++ sound/soc/intel/skylake/skl.h | 5 +++++ 2 files changed, 14 insertions(+) commit 9f6115acc37ca4f1e064cd958b24bf457dfcef26 Author: Amadeusz Sławiński Date: Mon Jun 17 13:36:37 2019 +0200 ASoC: Intel: Skylake: Don't return failure on machine driver reload When we unload and reload machine driver, we shouldn't return that we failed to initialize. This allows to reload machine driver, without having to unload whole stack. Signed-off-by: Amadeusz Sławiński Reviewed-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-pcm.c | 5 ----- 1 file changed, 5 deletions(-) commit 09f448a415ece49ceb9d8f21f717aa3c0dbce851 Author: Amadeusz Sławiński Date: Mon Jun 17 13:36:36 2019 +0200 ASoC: compress: Fix memory leak from snd_soc_new_compress Change kzalloc to devm_kzalloc, so compr gets automatically freed when it's no longer needed. Signed-off-by: Amadeusz Sławiński Reviewed-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/soc-compress.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit 8a5b0177a7f6099ff534a4d9ce72673af5c3cade Author: Amadeusz Sławiński Date: Mon Jun 17 13:36:35 2019 +0200 ALSA: hdac: Fix codec name after machine driver is unloaded and reloaded Currently on each driver reload internal counter is being increased. It causes failure to enumerate driver devices, as they have hardcoded: .codec_name = "ehdaudio0D2", As there is currently no devices with multiple hda codecs and there is currently no established way to reliably differentiate, between them, always assign bus->idx = 0; This fixes a problem when we unload and reload machine driver idx gets incremented, so .codec_name would've needed to be set to "ehdaudio1D2" after first reload and so on. Signed-off-by: Amadeusz Sławiński Acked-by: Takashi Iwai Reviewed-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/hda/ext/hdac_ext_bus.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 776cb3b80ede9ef4ad4c8aac22fcbdf4852b44cd Author: Amadeusz Sławiński Date: Mon Jun 17 13:36:34 2019 +0200 ASoC: Intel: Skylake: Initialize lists before access so they are safe to use If skl_probe_work() was not run driver ends up dereferencing NULL pointer when operating on lists in skl_platform_unregister(). To fix this initialize lists in skl_create(). Also run cancel_work_sync() before all cleanup functions, so we don't end up unnecessarily running probe work. Easily reproducible with: while true; do modprobe snd_soc_skl; rmmod snd_soc_skl; done (with the assumption that relevant drivers are added to blacklist on system boot) Signed-off-by: Amadeusz Sławiński Reviewed-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-pcm.c | 3 --- sound/soc/intel/skylake/skl.c | 5 ++++- 2 files changed, 4 insertions(+), 4 deletions(-) commit d5fcaaba54ce729a018e50938aa6d355cffc7ef4 Author: Paweł Harłoziński Date: Thu Jun 13 21:04:31 2019 +0200 ASoC: Intel: Skylake: Use recommended SDxFMT programming sequence For BXT platforms, the recommended sequence to program the SDxFMT is to first couple the stream, write the format and decouple again. For all other platforms said sequence remains unchanged. To prevent code duplication, IS_BXT (and consequently IS_CFL) macro is relocated to hda_codec.h file so it can be accessed by SKL driver. Signed-off-by: Paweł Harłoziński Signed-off-by: Cezary Rojewski Reviewed-by: Pierre-Louis Bossart Signed-off-by: Mark Brown include/sound/hda_codec.h | 3 +++ sound/pci/hda/hda_intel.c | 3 --- sound/soc/intel/skylake/skl-pcm.c | 14 +++++++++++++- 3 files changed, 16 insertions(+), 4 deletions(-) commit 025bf37725f1929542361eef2245df30badf242e Author: Waibel Georg Date: Thu Jun 20 21:37:08 2019 +0000 gpio: Fix return value mismatch of function gpiod_get_from_of_node() In case the requested gpio property is not found in the device tree, some callers of gpiod_get_from_of_node() expect a return value of NULL, others expect -ENOENT. In particular devm_fwnode_get_index_gpiod_from_child() expects -ENOENT. Currently it gets a NULL, which breaks the loop that tries all gpio_suffixes. The result is that a gpio property is not found, even though it is there. This patch changes gpiod_get_from_of_node() to return -ENOENT instead of NULL when the requested gpio property is not found in the device tree. Additionally it modifies all calling functions to properly evaluate the return value. Another approach would be to leave the return value of gpiod_get_from_of_node() as is and fix the bug in devm_fwnode_get_index_gpiod_from_child(). Other callers would still need to be reworked. The effort would be the same as with the chosen solution. Signed-off-by: Georg Waibel Reviewed-by: Krzysztof Kozlowski Reviewed-by: Linus Walleij Signed-off-by: Mark Brown drivers/gpio/gpiolib.c | 6 +----- drivers/regulator/da9211-regulator.c | 2 ++ drivers/regulator/s2mps11.c | 4 +++- drivers/regulator/s5m8767.c | 4 +++- drivers/regulator/tps65090-regulator.c | 7 ++++--- 5 files changed, 13 insertions(+), 10 deletions(-) commit 3fe2f17c0ed5ca1a1ed6291499067256dd338f66 Author: Nathan Chancellor Date: Fri Jun 21 13:20:43 2019 -0700 pinctrl: qcom: sdm845: Fix CONFIG preprocessor guard Clang warns when CONFIG_ACPI is unset: drivers/pinctrl/qcom/pinctrl-sdm845.c:1320:5: warning: 'CONFIG_ACPI' is not defined, evaluates to 0 [-Wundef] #if CONFIG_ACPI ^ 1 warning generated. Use ifdef instead of if to resolve this. Fixes: a229105d7a1e ("pinctrl: qcom: sdm845: Provide ACPI support") Link: https://github.com/ClangBuiltLinux/linux/issues/569 Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Acked-by: Lee Jones Signed-off-by: Linus Walleij drivers/pinctrl/qcom/pinctrl-sdm845.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5206026404190125436f81088eb3667076e56083 Author: Marc Gonzalez Date: Thu Jun 13 13:32:08 2019 +0200 phy: qcom-qmp: Raise qcom_qmp_phy_enable() polling delay readl_poll_timeout() calls usleep_range() to sleep between reads. usleep_range() doesn't work efficiently for tiny values. Raise the polling delay in qcom_qmp_phy_enable() to bring it in line with the delay in qcom_qmp_phy_com_init(). Signed-off-by: Marc Gonzalez Signed-off-by: Kishon Vijay Abraham I drivers/phy/qualcomm/phy-qcom-qmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5fc2aa3ec9efad97dd7c316f3c8e4c6268bbed9b Author: Neil Armstrong Date: Wed Jun 5 11:02:15 2019 +0200 phy: meson-g12a-usb3-pcie: disable locking for cr_regmap Locking is not needed for the phy_g12a_usb3_pcie_cr_bus_read/write() and currently it causes the following BUG because of the usage of the regmap_read_poll_timeout() running in spinlock_irq, configured by regmap fast_io. Simply disable locking in the cr_regmap config since it's only used from the PHY init callback function. BUG: sleeping function called from invalid context at drivers/phy/amlogic/phy-meson-g12a-usb3-pcie.c:85 in_atomic(): 1, irqs_disabled(): 128, pid: 60, name: kworker/3:1 [snip] Workqueue: events deferred_probe_work_func Call trace: dump_backtrace+0x0/0x190 show_stack+0x14/0x20 dump_stack+0x90/0xb4 ___might_sleep+0xec/0x110 __might_sleep+0x50/0x88 phy_g12a_usb3_pcie_cr_bus_addr.isra.0+0x80/0x1a8 phy_g12a_usb3_pcie_cr_bus_read+0x34/0x1d8 _regmap_read+0x60/0xe0 _regmap_update_bits+0xc4/0x110 regmap_update_bits_base+0x60/0x90 phy_g12a_usb3_pcie_init+0xdc/0x210 phy_init+0x74/0xd0 dwc3_meson_g12a_probe+0x2cc/0x4d0 platform_drv_probe+0x50/0xa0 really_probe+0x20c/0x3b8 driver_probe_device+0x68/0x150 __device_attach_driver+0xa8/0x170 bus_for_each_drv+0x64/0xc8 __device_attach+0xd8/0x158 device_initial_probe+0x10/0x18 bus_probe_device+0x90/0x98 deferred_probe_work_func+0x94/0xe8 process_one_work+0x1e0/0x338 worker_thread+0x230/0x458 kthread+0x134/0x138 ret_from_fork+0x10/0x1c Fixes: 36077e16c050 ("phy: amlogic: Add Amlogic G12A USB3 + PCIE Combo PHY Driver") Signed-off-by: Neil Armstrong Tested-by: Kevin Hilman Signed-off-by: Kishon Vijay Abraham I drivers/phy/amlogic/phy-meson-g12a-usb3-pcie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d7929c1e13e3788e7cb741d75b5baec5e53eff21 Merge: 8ac875db0fdc 80d42db02b3a Author: Alex Deucher Date: Tue Jun 25 08:42:25 2019 -0500 Merge branch 'drm-next' into drm-next-5.3 Backmerge drm-next and fix up conflicts due to drmP.h removal. Signed-off-by: Alex Deucher commit cf75b8f2cd8f1f9beb64c2fa2eb93a7c265b59c1 Author: Thierry Reding Date: Fri Jun 21 17:19:32 2019 +0200 pinctrl: tegra: Add bitmask support for parked bits Some pin groups have park bits for multiple pins in one register. Support this by turning the parked bit field into a parked bitmask field. If no parked bits are supported, the bitmask can be 0. Update the pingroup table on Tegra210, which is the only generation where this is supported, with the parked bitmask. Signed-off-by: Thierry Reding Tested-by: Dmitry Osipenko Reviewed-by: Dmitry Osipenko Signed-off-by: Linus Walleij drivers/pinctrl/tegra/pinctrl-tegra.c | 18 +++++++--- drivers/pinctrl/tegra/pinctrl-tegra.h | 4 +-- drivers/pinctrl/tegra/pinctrl-tegra114.c | 4 +-- drivers/pinctrl/tegra/pinctrl-tegra124.c | 4 +-- drivers/pinctrl/tegra/pinctrl-tegra194.c | 4 +-- drivers/pinctrl/tegra/pinctrl-tegra20.c | 6 ++-- drivers/pinctrl/tegra/pinctrl-tegra210.c | 60 ++++++++++++++++---------------- drivers/pinctrl/tegra/pinctrl-tegra30.c | 4 +-- 8 files changed, 57 insertions(+), 47 deletions(-) commit 55bd054ce434bb4aad80f6b787d69d29342bd4a8 Author: Thierry Reding Date: Fri Jun 21 17:19:31 2019 +0200 pinctrl: tegra: Set specific GPIO compatible string Rather than reuse the nvidia,tegra30-gpio compatible string to find the GPIO controller on Tegra30, Tegra114, Tegra124 and Tegra210, use the most specific compatible string for each SoC generation for consistency. Signed-off-by: Thierry Reding Reviewed-by: Dmitry Osipenko Signed-off-by: Linus Walleij drivers/pinctrl/tegra/pinctrl-tegra114.c | 2 +- drivers/pinctrl/tegra/pinctrl-tegra124.c | 2 +- drivers/pinctrl/tegra/pinctrl-tegra210.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 0451cc8ce272f50f9fb6569b0ecdedee6e997cea Author: Gwendal Grignou Date: Fri May 17 16:38:56 2019 -0700 iio: cros_ec: Add lid angle driver Add a IIO driver that reports the angle between the lid and the base for ChromeOS convertible device. Tested on eve with ToT EC firmware. Check driver is loaded and lid angle is correct. Signed-off-by: Gwendal Grignou Acked-by: Jonathan Cameron Signed-off-by: Enric Balletbo i Serra drivers/iio/common/cros_ec_sensors/Kconfig | 9 ++ drivers/iio/common/cros_ec_sensors/Makefile | 1 + .../iio/common/cros_ec_sensors/cros_ec_lid_angle.c | 139 +++++++++++++++++++++ 3 files changed, 149 insertions(+) commit ca9503fc9e9812aa6258e55d44edb03eb30fc46f Author: Mark Brown Date: Tue Jun 18 19:10:55 2019 +0100 arm64: Expose FRINT capabilities to userspace ARMv8.5 introduces the FRINT series of instructions for rounding floating point numbers to integers. Provide a capability to userspace in order to allow applications to determine if the system supports these instructions. Signed-off-by: Mark Brown Acked-by: Will Deacon Signed-off-by: Catalin Marinas Documentation/arm64/elf_hwcaps.txt | 4 ++++ arch/arm64/include/asm/hwcap.h | 1 + arch/arm64/include/asm/sysreg.h | 1 + arch/arm64/include/uapi/asm/hwcap.h | 1 + arch/arm64/kernel/cpufeature.c | 1 + arch/arm64/kernel/cpuinfo.c | 1 + 6 files changed, 9 insertions(+) commit 97162a1ee8a1735fc7a7159fe08de966d88354ce Author: Mauro Carvalho Chehab Date: Sat Jun 8 23:27:03 2019 -0300 docs: infiniband: convert docs to ReST and rename to *.rst The InfiniBand docs are plain text with no markups. So, all we needed to do were to add the title markups and some markup sequences in order to properly parse tables, lists and literal blocks. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jason Gunthorpe .../{core_locking.txt => core_locking.rst} | 64 ++++++------ Documentation/infiniband/index.rst | 23 +++++ Documentation/infiniband/{ipoib.txt => ipoib.rst} | 24 +++-- .../infiniband/{opa_vnic.txt => opa_vnic.rst} | 110 +++++++++++---------- Documentation/infiniband/{sysfs.txt => sysfs.rst} | 4 +- .../{tag_matching.txt => tag_matching.rst} | 5 + .../infiniband/{user_mad.txt => user_mad.rst} | 33 +++++-- .../infiniband/{user_verbs.txt => user_verbs.rst} | 12 ++- drivers/infiniband/core/user_mad.c | 2 +- drivers/infiniband/ulp/ipoib/Kconfig | 2 +- 10 files changed, 175 insertions(+), 104 deletions(-) commit 1201937491822b61641c1878ebcd16a93aed4540 Author: Mark Brown Date: Tue Jun 18 19:10:54 2019 +0100 arm64: Expose ARMv8.5 CondM capability to userspace ARMv8.5 adds new instructions XAFLAG and AXFLAG to translate the representation of the results of floating point comparisons between the native ARM format and an alternative format used by some software. Add a hwcap allowing userspace to determine if they are present, since we referred to earlier CondM extensions as FLAGM call these extensions FLAGM2. Signed-off-by: Mark Brown Acked-by: Will Deacon Signed-off-by: Catalin Marinas Documentation/arm64/elf_hwcaps.txt | 4 ++++ arch/arm64/include/asm/hwcap.h | 1 + arch/arm64/include/uapi/asm/hwcap.h | 1 + arch/arm64/kernel/cpufeature.c | 1 + arch/arm64/kernel/cpuinfo.c | 1 + 5 files changed, 8 insertions(+) commit b417c0879db72f810ca81d88b719e70d20566857 Author: Dan Carpenter Date: Sat Jun 8 12:27:14 2019 +0300 RDMA/hns: Fix an error code in hns_roce_set_user_sq_size() This function is supposed to return negative kernel error codes but here it returns CMD_RST_PRC_EBUSY (2). The error code eventually gets passed to IS_ERR() and since it's not an error pointer it leads to an Oops in hns_roce_v1_rsv_lp_qp() Signed-off-by: Dan Carpenter Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit aaba9791fbb4c5c5af86ea296f5b8d577aa293d8 Author: Srinivas Pandruvada Date: Mon Apr 29 20:47:43 2019 -0700 drivers: thermal: processor_thermal: Read PPCC on resume Read PPCC power limits on system resume in case those limits changed while system was suspended. Signed-off-by: Srinivas Pandruvada Signed-off-by: Zhang Rui .../intel/int340x_thermal/processor_thermal_device.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 7ef7587541d49c6de1c9650c3c819a7fdd7ade66 Author: Colin Ian King Date: Mon Jun 24 22:46:08 2019 +0100 RDMA/hns: fix potential integer overflow on left shift There is a potential integer overflow when int i is left shifted as this is evaluated using 32 bit arithmetic but is being used in a context that expects an expression of type dma_addr_t. Fix this by casting integer i to dma_addr_t before shifting to avoid the overflow. Addresses-Coverity: ("Unintentional integer overflow") Fixes: 2ac0bc5e725e ("RDMA/hns: Add a group interfaces for optimizing buffers getting flow") Signed-off-by: Colin Ian King Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hns/hns_roce_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d9e47698965d782dba1d9d9bc04441e668d71008 Author: Govind Singh Date: Mon Jun 3 18:14:52 2019 +0300 ath10k: Add WMI diag fw logging support for WCN3990 Integrated WiFi chipset ex:WCN399x supports fw logging using WMI copy engine and shared mem DIAG based fw logging. By default shared mem DIAG based fw logging is enabled. To support WMI copy engine based fw logging add QMI control message to enable WMI copy engine based fw logging. Enable WMI based fw logging using fw_diag_log module parameter. insmod ath10k_core.ko fw_diag_log=1 DIAG utility(https://github.com/andersson/diag) implements extraction of diagnostics related messages between application processor and various subsystems while shared mem DIAG based fw logging is enabled. Testing: Tested on WCN3990/QCA6174 HW Tested FW: WLAN.HL.3.1-00959-QCAHLSWMTPLZ-1 Signed-off-by: Govind Singh Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.c | 9 +++++++ drivers/net/wireless/ath/ath10k/core.h | 1 + drivers/net/wireless/ath/ath10k/hif.h | 15 ++++++++++++ drivers/net/wireless/ath/ath10k/qmi.c | 45 ++++++++++++++++++++++++++++++++++ drivers/net/wireless/ath/ath10k/qmi.h | 1 + drivers/net/wireless/ath/ath10k/snoc.c | 15 ++++++++++++ 6 files changed, 86 insertions(+) commit 47ed1b4e5d622a53dbdca2fe75013cc634bb0050 Author: Wen Gong Date: Mon Jun 3 18:12:21 2019 +0300 ath10k: add report MIC error for sdio chip Firmware will report flag with HTT_RX_IND_MPDU_STATUS_TKIP_MIC_ERR if MIC error, the flag will be used in mac80211. ieee80211_rx_h_michael_mic_verify will check the flag and start TKIP countermeasures. Now countermeasure tests pass both with WPA only and WPA2/WPA mixed mode. Tested with QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00007-QCARMSWP-1. Signed-off-by: Wen Gong Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/htt_rx.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 33410a51468fdd8b5c398642c0d22347bc02296b Author: Ashok Raj Nagarajan Date: Mon Jun 3 18:09:02 2019 +0300 ath10k: add support for controlling tx power to a station This patch will add the support to control the transmit power for traffic to a station associated with the AP. Underlying firmware will enforce that the maximum tx power will be based on the regulatory requirements. If the user given transmit power is greater than the allowed tx power in the given channel, then the firmware will use the maximum tx power in the same channel. Max and Min tx power values will depends on no of tx chain masks, for QCA9984 allowed tx power range values from 6 to 23. When 0 is sent to the firmware as tx power, it will revert to the default tx power for the station. Tested Hardware : QCA9984 Tested Firmware : 10.4-3.9.0.2-00046 Co-developed-by: Balaji Pothunoori Signed-off-by: Ashok Raj Nagarajan Signed-off-by: Balaji Pothunoori Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/debug.h | 3 +++ drivers/net/wireless/ath/ath10k/mac.c | 39 +++++++++++++++++++++++++++++++++ drivers/net/wireless/ath/ath10k/wmi.h | 6 +++++ 3 files changed, 48 insertions(+) commit c6f537a11b812c50decb8d5fa470e5e2a0ce354f Author: Dundi Raviteja Date: Mon Jun 3 17:41:51 2019 +0300 ath10k: Add peer delete response event Peer creation in firmware fails if last peer deletion is still in progress. The firmware sends a peer delete response event if it advertises the service WMI_SERVICE_SYNC_DELETE_CMDS. This peer delete response event is used to synchronize the peer deletion. Add peer delete response event and wait for the event after deleting every peer from host driver to synchronize with firmware. Tested HW: WCN3990 Tested FW: WLAN.HL.2.0-01188-QCAHLSWMTPLZ-1 Signed-off-by: Dundi Raviteja Signed-off-by: Rakesh Pillai Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.c | 1 + drivers/net/wireless/ath/ath10k/core.h | 1 + drivers/net/wireless/ath/ath10k/mac.c | 41 +++++++++++++++++++++++++++++-- drivers/net/wireless/ath/ath10k/wmi-tlv.c | 21 ++++++++++++++++ drivers/net/wireless/ath/ath10k/wmi-tlv.h | 2 ++ drivers/net/wireless/ath/ath10k/wmi.h | 5 ++++ 6 files changed, 69 insertions(+), 2 deletions(-) commit fe36e70f766ed99c5a140f8e265e81dd39897bb6 Author: Rakesh Pillai Date: Mon Jun 3 17:41:33 2019 +0300 ath10k: wait for vdev delete response from firmware When we add an interface immediately after removing the interface the vdev deletion in firmware might not have been completed. We need to synchronize the vdev creation with the firmware. Wait for vdev delete response from firmware when we remove an interface. Tested HW: WCN3990 Tested FW: WLAN.HL.2.0-01188-QCAHLSWMTPLZ-1 Signed-off-by: Rakesh Pillai Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.c | 4 +++- drivers/net/wireless/ath/ath10k/core.h | 6 ++++-- drivers/net/wireless/ath/ath10k/mac.c | 15 +++++++++++++++ drivers/net/wireless/ath/ath10k/wmi-tlv.c | 12 +++++++++++- drivers/net/wireless/ath/ath10k/wmi-tlv.h | 6 +++++- drivers/net/wireless/ath/ath10k/wmi.h | 4 +++- 6 files changed, 41 insertions(+), 6 deletions(-) commit 011d4111c8c602ea829fa4917af1818eb0500a90 Author: Miaoqing Pan Date: Thu May 30 09:49:20 2019 +0800 ath10k: fix PCIE device wake up failed Observed PCIE device wake up failed after ~120 iterations of soft-reboot test. The error message is "ath10k_pci 0000:01:00.0: failed to wake up device : -110" The call trace as below: ath10k_pci_probe -> ath10k_pci_force_wake -> ath10k_pci_wake_wait -> ath10k_pci_is_awake Once trigger the device to wake up, we will continuously check the RTC state until it returns RTC_STATE_V_ON or timeout. But for QCA99x0 chips, we use wrong value for RTC_STATE_V_ON. Occasionally, we get 0x7 on the fist read, we thought as a failure case, but actually is the right value, also verified with the spec. So fix the issue by changing RTC_STATE_V_ON from 0x5 to 0x7, passed ~2000 iterations. Tested HW: QCA9984 Signed-off-by: Miaoqing Pan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1ac99c58bda9b911d6e47ed6d4d04a2b00ff703b Author: Paul Cercueil Date: Fri Jun 7 17:44:07 2019 +0200 pwm: jz4740: Apply configuration atomically This is cleaner, more future-proof, and incidentally it also fixes the PWM resetting its config when stopped/started several times. Signed-off-by: Paul Cercueil Signed-off-by: Thierry Reding drivers/pwm/pwm-jz4740.c | 37 ++++++++++++------------------------- 1 file changed, 12 insertions(+), 25 deletions(-) commit 93808aca349c5fde6e258640939a1c00fd8a715e Author: Paul Cercueil Date: Fri Jun 7 17:44:06 2019 +0200 pwm: jz4740: Remove unused devicetree compatible strings Right now none of the Ingenic-based boards probe this driver from devicetree. This driver defined three compatible strings for the exact same behaviour. Before these strings are used, we can remove two of them. Signed-off-by: Paul Cercueil Signed-off-by: Thierry Reding drivers/pwm/pwm-jz4740.c | 2 -- 1 file changed, 2 deletions(-) commit 925488e8df4f396ad96ff008a84f5b14d8b73347 Author: Paul Cercueil Date: Fri Jun 7 17:44:05 2019 +0200 dt-bindings: pwm: jz47xx: Remove unused compatible strings Right now none of the Ingenic-based boards probe this driver from devicetree. This driver defined three compatible strings for the exact same behaviour. Before these strings are used, we can remove two of them. Signed-off-by: Paul Cercueil Signed-off-by: Thierry Reding Documentation/devicetree/bindings/pwm/ingenic,jz47xx-pwm.txt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 8b97b055dc9db09b48d5a9a37d847900dd00d3cc Author: Miaoqing Pan Date: Wed May 29 16:13:28 2019 +0800 ath10k: fix failure to set multiple fixed rate Currently, below fixed rate commands are broken, iw wlanx set bitrates legacy-<2.4|5> ht-mcs-<2.4|5> vht-mcs-<2.4|5> \ iw wlanx set bitrates legacy-<2.4|5> ht-mcs-<2.4|5> \ vht-mcs-<2.4|5> There are two methods to set fixed rate, both failed, - Use vdev fixed rate command This command only support one single rate, but it's broken due to mac80211 change commit e8e4f5280ddd ("mac80211: reject/clear user rate mask if not usable"), which requires user to specify at least one legacy rate. So we can't use this command to set ht/vht single rate any more. - Use peer_assoc command This command can update rx capability for multiple rates, it will work fine for ht mcs rates, as each supported mcs can be advertised in ht_mcs index mask. But this will not work with vht rates because, as per the vht mcs capability advertisement, there are only two bits to indicate the supported mcs. E.g. only support 0-7, 0-8, 0-9. So introduced new WMI command: WMI_PEER_PARAM_FIXED_RATE. After peer assoc, the peer fixed rate cmd will work for that specific peer. Remaining peers will use auto rate. If both vdev fixed rate and peer fixed rates are given, peer fixed rate will take effect to peers for which this cmd is given. Remaining peers in that vdev, will use vdev fixed rate. Tested HW: QCA9984 Tested FW: 10.4-3.9.0.2-00035 Signed-off-by: Miaoqing Pan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.c | 1 + drivers/net/wireless/ath/ath10k/core.h | 7 +++ drivers/net/wireless/ath/ath10k/mac.c | 111 +++++++++++++++++++++++++++++---- drivers/net/wireless/ath/ath10k/wmi.h | 1 + 4 files changed, 108 insertions(+), 12 deletions(-) commit 265df32eae5845212ad9f55f5ae6b6dcb68b187b Author: Fabio Estevam Date: Thu May 9 09:15:00 2019 -0300 ath10k: Change the warning message string The "WARNING" string confuses syzbot, which thinks it found a crash [1]. Change the string to avoid such problem. [1] https://lkml.org/lkml/2019/5/9/243 Reported-by: syzbot+c1b25598aa60dcd47e78@syzkaller.appspotmail.com Suggested-by: Greg Kroah-Hartman Signed-off-by: Fabio Estevam Reviewed-by: Greg Kroah-Hartman Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 08d80e4cd27ba19f9bee9e5f788f9a9fc440a22f Author: Miaoqing Pan Date: Fri May 24 11:16:22 2019 +0800 ath10k: fix fw crash by moving chip reset after napi disabled On SMP platform, when continuously running wifi up/down, the napi poll can be scheduled during chip reset, which will call ath10k_pci_has_fw_crashed() to check the fw status. But in the reset period, the value from FW_INDICATOR_ADDRESS register will return 0xdeadbeef, which also be treated as fw crash. Fix the issue by moving chip reset after napi disabled. ath10k_pci 0000:01:00.0: firmware crashed! (guid 73b30611-5b1e-4bdd-90b4-64c81eb947b6) ath10k_pci 0000:01:00.0: qca9984/qca9994 hw1.0 target 0x01000000 chip_id 0x00000000 sub 168c:cafe ath10k_pci 0000:01:00.0: htt-ver 2.2 wmi-op 6 htt-op 4 cal otp max-sta 512 raw 0 hwcrypto 1 ath10k_pci 0000:01:00.0: failed to get memcpy hi address for firmware address 4: -16 ath10k_pci 0000:01:00.0: failed to read firmware dump area: -16 ath10k_pci 0000:01:00.0: Copy Engine register dump: ath10k_pci 0000:01:00.0: [00]: 0x0004a000 0 0 0 0 ath10k_pci 0000:01:00.0: [01]: 0x0004a400 0 0 0 0 ath10k_pci 0000:01:00.0: [02]: 0x0004a800 0 0 0 0 ath10k_pci 0000:01:00.0: [03]: 0x0004ac00 0 0 0 0 ath10k_pci 0000:01:00.0: [04]: 0x0004b000 0 0 0 0 ath10k_pci 0000:01:00.0: [05]: 0x0004b400 0 0 0 0 ath10k_pci 0000:01:00.0: [06]: 0x0004b800 0 0 0 0 ath10k_pci 0000:01:00.0: [07]: 0x0004bc00 1 0 1 0 ath10k_pci 0000:01:00.0: [08]: 0x0004c000 0 0 0 0 ath10k_pci 0000:01:00.0: [09]: 0x0004c400 0 0 0 0 ath10k_pci 0000:01:00.0: [10]: 0x0004c800 0 0 0 0 ath10k_pci 0000:01:00.0: [11]: 0x0004cc00 0 0 0 0 Tested HW: QCA9984,QCA9887,WCN3990 Signed-off-by: Miaoqing Pan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/pci.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 4b553f3ca4cbde67399aa3a756c37eb92145b8a1 Author: Claire Chang Date: Thu May 23 15:15:34 2019 +0800 ath10k: add missing error handling In function ath10k_sdio_mbox_rx_alloc() [sdio.c], ath10k_sdio_mbox_alloc_rx_pkt() is called without handling the error cases. This will make the driver think the allocation for skb is successful and try to access the skb. If we enable failslab, system will easily crash with NULL pointer dereferencing. Call trace of CONFIG_FAILSLAB: ath10k_sdio_irq_handler+0x570/0xa88 [ath10k_sdio] process_sdio_pending_irqs+0x4c/0x174 sdio_run_irqs+0x3c/0x64 sdio_irq_work+0x1c/0x28 Fixes: d96db25d2025 ("ath10k: add initial SDIO support") Signed-off-by: Claire Chang Reviewed-by: Brian Norris Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/sdio.c | 4 ++++ 1 file changed, 4 insertions(+) commit 9bce02ef0dfa4d3816756a85c9f25dd63592d65f Author: Neil Armstrong Date: Thu Jun 20 16:46:55 2019 +0200 pwm: meson: Fix the G12A AO clock parents order The Amlogic G12A and G12B Documentation is wrong, the AO xtal and clk81 clock source order is reversed, and validated when adding DVFS support by using the PWM AO D output to control the CPU supply voltage. The vendor tree also uses the reversed xtal and clk81 order at [1]. [1] https://github.com/hardkernel/linux/blob/odroidn2-4.9.y/drivers/amlogic/pwm/pwm_meson.c#L462 Fixes: f41efceb46e6 ("pwm: meson: Add clock source configuration for Meson G12A") Signed-off-by: Neil Armstrong Acked-by: Kevin Hilman Signed-off-by: Thierry Reding drivers/pwm/pwm-meson.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 1cdb44135dd87cd4eac77b06c075486881f04767 Author: Neil Armstrong Date: Mon May 20 16:04:21 2019 +0200 pwm: meson: Update with SPDX Licence identifier Signed-off-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Signed-off-by: Thierry Reding drivers/pwm/pwm-meson.c | 52 +------------------------------------------------ 1 file changed, 1 insertion(+), 51 deletions(-) commit 4fa42adebe5b77215e50eaad701663c8702d3c88 Author: Balaji Pothunoori Date: Mon May 13 20:23:07 2019 +0530 ath10k: enabling tx stats support over pktlog For QCA988X target, pktlog gives details of the tx bitrate which is used in the driver for station info. Enabling pktlog by default will cause more interrupts in target to host CE pipe, which can impact more CPU usage for targets ex:WCN3990 and also not required for all other platforms (eg: WCN3990), for getting tx bitrate. Enable pktlog only for QCA988X based on hardware params. Tested HW : WCN3990 Tested FW : WLAN.HL.3.1-00784-QCAHLSWMTPLZ-1 Fixes: e8123bb74c4e ("ath10k: add per peer tx stats support for 10.2.4") Signed-off-by: Balaji Pothunoori Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.c | 15 +++++++++++++++ drivers/net/wireless/ath/ath10k/hw.h | 3 +++ drivers/net/wireless/ath/ath10k/mac.c | 3 ++- 3 files changed, 20 insertions(+), 1 deletion(-) commit ef9cc0c443944fcf9dc7cdf2cfdf3975848bedc4 Author: Claire Chang Date: Mon May 6 15:38:36 2019 +0800 ath10k: acquire lock to fix lockdep's warning Lockdep warns at lockdep_assert_held(&ar->data_lock) in ath10k_htt_rx_pn_check_replay_hl(). Acquire ar->data_lock before calling ath10k_htt_rx_pn_check_replay_hl() to fix it. Call trace: ath10k_htt_rx_pn_check_replay_hl+0x118/0x134 [ath10k_core] ath10k_htt_rx_proc_rx_ind_hl+0xd8/0x250 [ath10k_core] ath10k_htt_t2h_msg_handler+0x148/0xf30 [ath10k_core] ath10k_htt_htc_t2h_msg_handler+0x24/0x40 [ath10k_core] ath10k_sdio_irq_handler+0x374/0xaa4 [ath10k_sdio] Fixes: 130c77495708 ("ath10k: add PN replay protection for high latency devices") Signed-off-by: Claire Chang Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/htt_rx.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 0b055ed4c9bc16217d5eb4f4e6a5446cd9631b87 Author: Fabrice Gasnier Date: Wed Jun 19 11:52:02 2019 +0200 pwm: stm32: Use 3 cells ->of_xlate() STM32 Timers support generic 3 cells PWM to encode PWM number, period and polarity. Fixes: 7edf7369205b ("pwm: Add driver for STM32 plaftorm") Signed-off-by: Fabrice Gasnier Reviewed-by: Benjamin Gaignard Signed-off-by: Thierry Reding drivers/pwm/pwm-stm32.c | 2 ++ 1 file changed, 2 insertions(+) commit 69252ec16596ae679bbfc29dfe64682c17ea4dc0 Author: Fabrice Gasnier Date: Wed Jun 19 11:52:01 2019 +0200 dt-bindings: pwm: stm32: Add #pwm-cells STM32 Timers support generic 3 cells PWM bindings to encode PWM number, period and polarity as defined in pwm.txt. Fixes: cd9a99c2f8e8 ("dt-bindings: pwm: Add STM32 bindings") Signed-off-by: Fabrice Gasnier Signed-off-by: Thierry Reding Documentation/devicetree/bindings/pwm/pwm-stm32.txt | 3 +++ 1 file changed, 3 insertions(+) commit 54f6643bf19ead2b4f430b85eda3dc38ba158ea5 Author: Wen Gong Date: Wed May 15 11:30:47 2019 +0800 ath10k: change firmware file name for UTF mode of SDIO/USB Firmware name for UTF mode of SDIO has changed from utf-2.bin to utf-sdio-2.bin, so it need to change in ath10k, otherwise it will fail for UTF mode. After change the name in ath10k, it will success for UTF mode of SDIO/USB. Tested with QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00007-QCARMSWP-1. Signed-off-by: Wen Gong Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/hw.h | 2 ++ drivers/net/wireless/ath/ath10k/testmode.c | 17 ++++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) commit 0f132ba7ac645b31d3660b97fb142d46566286d2 Author: Wen Gong Date: Wed May 22 14:32:56 2019 +0800 ath10k: add support for firmware crash recovery on SDIO chip The command to simulate firmware crash: echo soft > /sys/kernel/debug/ieee80211/phy0/ath10k/simulate_fw_crash It will send WMI_FORCE_FW_HANG_ASSERT to firmware, then it will trigger CPU interrupt status register for SDIO chip, ath10k driver need to configure it while enable SDIO interrupt, otherwise ath10k driver will not get the assert error info. After this change, it will success for simulate firmware crash. Tested with QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00007-QCARMSWP-1. Signed-off-by: Wen Gong Tested-by: Claire Chang Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/hw.h | 1 + drivers/net/wireless/ath/ath10k/sdio.c | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) commit b3d5f311d3cfdea0b0e2373409e50423b130f847 Author: Denis Efremov Date: Mon Jun 24 11:51:27 2019 +0300 parisc: asm: psw.h: missing header guard The psw.h header file contains #ifndef directive of the guard, but the complimentary #define directive is missing. The patch adds the appropriate #define to fix the header guard. Signed-off-by: Denis Efremov Signed-off-by: Helge Deller arch/parisc/include/asm/psw.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d78cda5aa0a0a9b75b650150e258c277d3207d45 Merge: 37937ee73ba4 50b617a61874 Author: Olof Johansson Date: Tue Jun 25 05:52:25 2019 -0700 Merge tag 'amlogic-dt64' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into arm/dt arm64: dts: Amlogic updates for v5.3 Highlights: - new SoC: S922X (G12B family, A73/A53 big.LITTLE) - new board: Hardkernel odroid-N2 (SoC: G12B S922X) - add/use ethernet PHY interrupt/reset lines - G12A: add/enable audio, PWM, IR, i2c, SD/eMMC, WiFi, bluetooth, network - gxbb-vega-s95 board: fix WiFi/BT, enable more peripherals * tag 'amlogic-dt64' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: (79 commits) arm64: dts: meson: g12a: x96-max: add the Ethernet PHY interrupt line arm64: dts: meson: g12b: odroid-n2: add the Ethernet PHY interrupt line arm64: dts: meson: g12b: odroid-n2: add the Ethernet PHY reset line arm64: dts: meson: use the generic Ethernet PHY reset GPIO bindings arm64: dts: meson: g12a: x96-max: fix the Ethernet PHY reset line arm64: dts: meson: g12a: sort sdio nodes correctly arm64: dts: meson-g12a-x96-max: add sound card arm64: dts: meson-g12b-odroid-n2: add sound card arm64: dts: meson: sei510: add sound card arm64: dts: meson: sei510: add max98357a DAC ASoC: meson: add tohdmitx DT bindings arm64: dts: meson: g12a: add the GPIO interrupt controller arm64: dts: meson-g12a-x96-max: bump bluetooth bus speed to 2Mbaud/s arm64: dts: meson-g12a-sei510: bump bluetooth bus speed to 2Mbaud/s arm64: dts: meson-g12a-x96-max: add 32k clock to bluetooth node arm64: dts: meson-g12a-sei510: add 32k clock to bluetooth node arm64: dts: meson-g12a-sei510: Enable Wifi SDIO module arm64: dts: meson-g12a-x96-max: Enable Wifi SDIO Module arm64: dts: meson-g12a-x96-max: add support for sdcard and emmc arm64: dts: meson: g12a: add SDIO controller ... Signed-off-by: Olof Johansson commit a7d881464194920a04fb9b8c324877b32fd58a1f Merge: f7fd41afa15d a5a9dffcc903 Author: Olof Johansson Date: Tue Jun 25 05:51:56 2019 -0700 Merge tag 'imx-soc-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/soc i.MX SoC changes for 5.3: - Switch imx7d to imx-cpufreq-dt for speed-grading, as imx-cpufreq-dt driver can handle speed grading bits on imx7d just like on imx8mq. - Improve imx6 cpuidle driver to use raw_spinlock_t. The change makes no difference for !RT build, but is required by RT kernel. * tag 'imx-soc-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: imx: Switch imx7d to imx-cpufreq-dt for speed-grading ARM: imx6: cpuidle: Use raw_spinlock_t Signed-off-by: Olof Johansson commit b2c200e3f2fd1158f5f1c93ccb2e0a27d96c4a7a Author: Fabrice Gasnier Date: Thu Apr 18 11:37:47 2019 +0200 pwm: Add consumer device link Add a device link between the PWM consumer and the PWM provider. This enforces the PWM user to get suspended before the PWM provider. It allows proper synchronization of suspend/resume sequences: the PWM user is responsible for properly stopping PWM, before the provider gets suspended: see [1]. Add the device link in: - of_pwm_get() - pwm_get() - devm_*pwm_get() variants as it requires a reference to the device for the PWM consumer. [1] https://lkml.org/lkml/2019/2/5/770 Suggested-by: Thierry Reding Acked-by: Uwe Kleine-König Signed-off-by: Fabrice Gasnier Signed-off-by: Thierry Reding drivers/pwm/core.c | 50 +++++++++++++++++++++++++++++++++++++++++++++++--- include/linux/pwm.h | 6 ++++-- 2 files changed, 51 insertions(+), 5 deletions(-) commit f7fd41afa15de2555ccf352b1849ab9c37d1ec33 Merge: abd6aa55d72e f5a38c8ecf52 Author: Olof Johansson Date: Tue Jun 25 05:51:29 2019 -0700 Merge tag 'pxa-for-5.3-2' of https://github.com/rjarzmik/linux into arm/soc This is the pxa changes for 5.3 cycle : - a simple cleanup for lubbock * tag 'pxa-for-5.3-2' of https://github.com/rjarzmik/linux: ARM: pxa/lubbock: remove lubbock_set_misc_wr() from global view Signed-off-by: Olof Johansson commit abd6aa55d72e4e574935dee897d8bdcb0858c9ee Merge: 0ffd86080bf5 95701b1c3c8f Author: Olof Johansson Date: Tue Jun 25 05:50:31 2019 -0700 Merge tag 'at91-5.3-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/soc AT91 SoC for 5.3 - fix a pm.c warning with W=1 * tag 'at91-5.3-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: arm: add missing include platform-data/atmel.h Signed-off-by: Olof Johansson commit cce4a833fc6dfdb43a492876ad06f506a61f8fbd Author: Fabrice Gasnier Date: Thu Apr 18 11:37:46 2019 +0200 pwm: stm32-lp: Add power management support Add suspend/resume PM sleep ops. When going to low power, enforce the PWM channel isn't active. Let the PWM consumers disable it during their own suspend sequence. Only perform a check here, and handle the pinctrl states. See [1]. [1] https://lkml.org/lkml/2019/2/5/770 Signed-off-by: Fabrice Gasnier Signed-off-by: Thierry Reding drivers/pwm/pwm-stm32-lp.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 0ffd86080bf512b71e8db5b84f4584b1eeb4cfa9 Merge: 03890f477ca6 332bbefe14e8 Author: Olof Johansson Date: Tue Jun 25 05:49:44 2019 -0700 Merge tag 'mvebu-arm-5.3-1' of git://git.infradead.org/linux-mvebu into arm/soc mvebu arm for 5.3 (part 1) Document the git repository for the mvebu entry of the MAINTAINER file * tag 'mvebu-arm-5.3-1' of git://git.infradead.org/linux-mvebu: MAINTAINERS: mvebu: Add git entry Signed-off-by: Olof Johansson commit f6c9b59769db7ec21230502d889d4bbceac56b67 Author: Fabrice Gasnier Date: Thu Apr 18 11:37:45 2019 +0200 dt-bindings: pwm: stm32-lp: Document pin control sleep state Add documentation for pin control sleep state on STM32 LPTimer PWM. Reviewed-by: Rob Herring Signed-off-by: Fabrice Gasnier Signed-off-by: Thierry Reding Documentation/devicetree/bindings/pwm/pwm-stm32-lp.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 9d740d6380e5030f356e2811b14fe45684c793b1 Author: Venkateswara Naralasetty Date: Mon May 27 15:32:13 2019 +0300 ath10k: Add wrapper function to ath10k debug ath10k_dbg() is called in ath10k_process_rx() with huge set of arguments which is causing CPU overhead even when debug_mask is not set. Good improvement was observed in the receive side performance when call to ath10k_dbg() is avoided in the RX path. Since currently all debug messages are sent via tracing infrastructure, we cannot entirely avoid calling ath10k_dbg. Therefore, call to ath10k_dbg() is made conditional based on tracing config in the driver. Trasmit performance remains unchanged with this patch; below are some experimental results with this patch and tracing disabled. mesh mode: w/o this patch with this patch Traffic TP CPU Usage TP CPU usage TCP 840Mbps 76.53% 960Mbps 78.14% UDP 1030Mbps 74.58% 1132Mbps 74.31% Infra mode: w/o this patch with this patch Traffic TP CPU Usage TP CPU usage TCP Rx 1241Mbps 80.89% 1270Mbps 73.50% UDP Rx 1433Mbps 81.77% 1472Mbps 72.80% Tested platform : IPQ8064 hardware used : QCA9984 firmware ver : ver 10.4-3.5.3-00057 Signed-off-by: Kan Yan Signed-off-by: Venkateswara Naralasetty Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.c | 2 ++ drivers/net/wireless/ath/ath10k/debug.c | 8 ++++---- drivers/net/wireless/ath/ath10k/debug.h | 22 ++++++++++++++++------ drivers/net/wireless/ath/ath10k/trace.c | 1 + drivers/net/wireless/ath/ath10k/trace.h | 6 +++++- 5 files changed, 28 insertions(+), 11 deletions(-) commit 9e37a53eb05114b663ded9f1f2f69c7fec6c5913 Author: Yash Shah Date: Tue Jun 11 11:14:44 2019 +0530 pwm: sifive: Add a driver for SiFive SoC PWM Adds a PWM driver for PWM chip present in SiFive's HiFive Unleashed SoC. Signed-off-by: Wesley W. Terpstra [Atish: Various fixes and code cleanup] Signed-off-by: Atish Patra Signed-off-by: Yash Shah Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding drivers/pwm/Kconfig | 11 ++ drivers/pwm/Makefile | 1 + drivers/pwm/pwm-sifive.c | 339 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 351 insertions(+) commit daa78cc3408e7145d99462d51c5f4c6b0cb2af9c Author: Yash Shah Date: Tue Jun 11 11:14:43 2019 +0530 pwm: sifive: Add DT documentation for SiFive PWM Controller DT documentation for PWM controller added. Signed-off-by: Wesley W. Terpstra [Atish: Compatible string update] Signed-off-by: Atish Patra Signed-off-by: Yash Shah Reviewed-by: Rob Herring Signed-off-by: Thierry Reding .../devicetree/bindings/pwm/pwm-sifive.txt | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit 03890f477ca663b0b1d050384cf0ed3e1a70732a Merge: 9060463be509 02af9f90941b Author: Olof Johansson Date: Tue Jun 25 05:47:24 2019 -0700 Merge tag 'renesas-arm-soc-for-v5.3' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into arm/soc Renesas ARM Based SoC Updates for v5.3 * Auto-enable RZ/A1 IRQC on RZ/A1H and RZ/A2M * Don't init CNTVOFF/counter if PSCI is available * tag 'renesas-arm-soc-for-v5.3' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: soc: renesas: Enable RZ/A1 IRQC on RZ/A1H and RZ/A2M ARM: mach-shmobile: Don't init CNTVOFF/counter if PSCI is available Signed-off-by: Olof Johansson commit bc31c2cfecc7a0d7018c714ada718d7cc23d2b88 Author: Erik Stromdahl Date: Mon May 27 17:39:24 2019 +0300 ath10k: add htt_h2t_aggr_cfg_msg op for high latency devices Without this op, it will not be possible to configure aggregation for high latency devices. Signed-off-by: Erik Stromdahl Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/htt_tx.c | 1 + 1 file changed, 1 insertion(+) commit 74ee5715991f9d7d2fb8269ec60b0f914d78315e Author: Erik Stromdahl Date: Tue Mar 26 17:29:03 2019 +0100 ath10k: add inline wrapper for htt_h2t_aggr_cfg_msg This is done in order to make the *htt_h2t_aggr_cfg_msg* op align better with the rest of the htt ops (whom all have inline wrappers). It also adds support for the case when the op is missing (function pointer is NULL). As a result of this, the name of the 32 bit implementation in htt_tx.c was changed and the function was made static. Signed-off-by: Erik Stromdahl Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/htt.c | 2 +- drivers/net/wireless/ath/ath10k/htt.h | 16 +++++++++++++--- drivers/net/wireless/ath/ath10k/htt_tx.c | 8 ++++---- 3 files changed, 18 insertions(+), 8 deletions(-) commit 9060463be50961387246a5cf092b6befd9da5ac6 Merge: b8ad2985c6ea 1f8e44b622dc Author: Olof Johansson Date: Tue Jun 25 05:46:44 2019 -0700 Merge tag 'davinci-for-v5.3/soc' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into arm/soc This pull request has a patch to switch DA850 EVM GPIO LED support to use GPIO lookup table * tag 'davinci-for-v5.3/soc' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: davinci: Use GPIO lookup table for DA850 LEDs Signed-off-by: Olof Johansson commit 21000823f5571ce65bb150af74b33c24f8c6c10f Merge: 0aa447e5ce14 db10496c0064 Author: Olof Johansson Date: Tue Jun 25 05:43:40 2019 -0700 Merge tag 'imx-drivers-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/drivers i.MX driver changes for 5.3: - Add i.MX SCU based SoC bus driver for i.MX8QXP SoC support, which talks to SCU firmware for getting SoC ID and revision. - Update soc-imx8 bus driver to read imx8mm soc revision from anatop. - Add i.MX8MN SoC bus support into soc-imx8 driver. - Various small improvements on soc-imx8 bus driver. * tag 'imx-drivers-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: soc: imx: Add i.MX8MN SoC driver support soc: imx8: Use existing of_root directly soc: imx8: Fix potential kernel dump in error path soc: imx: soc-imx8: Correct return value of error handle soc: imx: soc-imx8: Avoid unnecessary of_node_put() in error handling soc: imx: Add SCU SoC info driver support soc: imx: Read imx8mm soc revision from anatop Signed-off-by: Olof Johansson commit 0aa447e5ce1463243ae83071de7b732d8075944e Merge: 761d3d22fb74 c8a3b9b50d83 Author: Olof Johansson Date: Tue Jun 25 05:43:16 2019 -0700 Merge tag 'aspeed-5.3-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed into arm/drivers ASPEED SoC updates for 5.3 LPC control driver changes and a fix. * tag 'aspeed-5.3-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed: soc: aspeed: lpc-ctrl: Fix probe error handling soc: aspeed: lpc-ctrl: make parameter optional Signed-off-by: Olof Johansson commit 761d3d22fb74232d2a5a2899358ff1bab94d6fa0 Merge: 09c4e038d4b1 7ac13f6dcbd5 Author: Olof Johansson Date: Tue Jun 25 05:42:42 2019 -0700 Merge tag 'tegra-for-5.3-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/drivers soc: tegra: Changes for v5.3-rc1 This contains a set of minor fixes and cleanups for core Tegra drivers. * tag 'tegra-for-5.3-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: soc/tegra: Select pinctrl for Tegra194 soc/tegra: fuse: Do not log error message on deferred probe soc/tegra: pmc: Add comments clarifying wake events soc/tegra: pmc: Avoid crash for non-wake IRQs soc/tegra: pmc: Fail to allocate more than one wake IRQ Signed-off-by: Olof Johansson commit 09c4e038d4b16b590a3f2acc1763e6124c77acf5 Merge: 9d9dd994b509 76ce48bdb303 Author: Olof Johansson Date: Tue Jun 25 05:42:12 2019 -0700 Merge tag 'tegra-for-5.3-memory' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/drivers memory: tegra: Changes for v5.3-rc1 A single fix for an unused constant variable, due to it being declared outside the only #ifdef that it was being used from. * tag 'tegra-for-5.3-memory' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: memory: tegra: Fix -Wunused-const-variable Signed-off-by: Olof Johansson commit 9d9dd994b5090955264ce555b1944a48865765a1 Merge: 71a34b7cc7b3 61ed7ef952fc Author: Olof Johansson Date: Tue Jun 25 05:41:44 2019 -0700 Merge tag 'tegra-for-5.3-firmware' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/drivers firmware: tegra: Changes for v5.3-rc1 This contains a single, simple change that resumes the BPMP driver early so that it is available when the various consumers want to enable their clocks. * tag 'tegra-for-5.3-firmware' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: firmware: tegra: Early resume BPMP Signed-off-by: Olof Johansson commit 71a34b7cc7b3e3509e7894d1d28245f5040e6910 Merge: c616ea191d59 9a98fdf5b6e6 Author: Olof Johansson Date: Tue Jun 25 05:40:57 2019 -0700 Merge tag 'amlogic-drivers' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into arm/drivers soc: Amlogic driver updates for v5.3 - canvas: add support for Meson8* * tag 'amlogic-drivers' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: soc: amlogic: canvas: add support for Meson8, Meson8b and Meson8m2 dt-bindings: soc: amlogic: canvas: document support for Meson8/8b/8m2 Signed-off-by: Olof Johansson commit c616ea191d59a2fc374b17b80073f6464ee54460 Merge: 6c249cc7a7e6 e1068c32c1d4 Author: Olof Johansson Date: Tue Jun 25 05:39:44 2019 -0700 Merge tag 'qcom-drivers-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/drivers Qualcomm ARM Based Driver Updates for v5.3 * Add ACPI support to Qualcomm GENI SE * Update Qualcomm Maintainers entry to remove David Brown as maintainer and fixup typos and incorrect DT file entry * Fixup APR domain id usage and making callbacks in non-atomic context * Add AOSS QMP driver and bindings * Add power domains for MSM8998 and QCS404 in QCOM RPMPD * Add corner macros, max state support, and fixups for setting performance state for Qcom RPMPD * tag 'qcom-drivers-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: soc: qcom: geni: Add support for ACPI MAINTAINERS: Remove myself as qcom maintainer soc: qcom: apr: Don't use reg for domain id soc: qcom: fix QCOM_AOSS_QMP dependency and build errors soc: qcom: Add AOSS QMP driver dt-bindings: soc: qcom: Add AOSS QMP binding qcom: apr: Make apr callbacks in non-atomic context soc: qcom: rpmpd: Add MSM8998 power-domains dt-bindings: power: Add rpm power domain bindings for msm8998 soc: qcom: rpmpd: Add QCS404 power-domains dt-bindings: power: Add rpm power domain bindings for qcs404 soc: qcom: rpmpd: Modify corner defining macros soc: qcom: rpmpd: Add support to set rpmpd state to max soc: qcom: rpmpd: fixup rpmpd set performance state MAINTAINER: Fix Qualcomm ETHQOS ethernet DT file MAINTAINERS: fix typo in file name Signed-off-by: Olof Johansson commit 648fdc3f6475d96de287a849a31d89e79ba7669c Author: Brian Masney Date: Fri May 31 05:46:14 2019 -0400 drm/msm: add dirty framebuffer helper Use drm_atomic_helper_dirtyfb() as the dirty callback in the msm_framebuffer_funcs struct. Call drm_plane_enable_fb_damage_clips() when the planes are initialized in mdp4, mdp5, and dpu1. Signed-off-by: Brian Masney Signed-off-by: Rob Clark drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 3 +++ drivers/gpu/drm/msm/disp/mdp4/mdp4_plane.c | 3 +++ drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c | 3 +++ drivers/gpu/drm/msm/msm_fb.c | 2 ++ 4 files changed, 11 insertions(+) commit b1acd4b8a8942f614053e516c56c88e1716562d6 Author: Christoph Hellwig Date: Sun Apr 28 14:00:52 2019 -0500 nios2: use the generic uncached segment support in dma-direct Stop providing our own arch alloc/free hooks and just expose the segment offset and use the generic dma-direct allocator. Signed-off-by: Christoph Hellwig Acked-by: Ley Foon Tan arch/nios2/Kconfig | 1 + arch/nios2/include/asm/page.h | 6 ------ arch/nios2/mm/dma-mapping.c | 34 +++++++++++++++------------------- 3 files changed, 16 insertions(+), 25 deletions(-) commit 6309513c1be47cd3805a6ceae60ab70285df36ae Author: Christoph Hellwig Date: Sun Apr 28 14:28:38 2019 -0500 nds32: use the generic remapping allocator for coherent DMA allocations Replace the code that sets up uncached PTEs with the generic vmap based remapping code. It also provides an atomic pool for allocations from non-blocking context, which we not properly supported by the existing nds32 code. Signed-off-by: Christoph Hellwig Tested-by: Greentime Hu Reviewed-by: Greentime Hu arch/nds32/Kconfig | 2 + arch/nds32/kernel/dma.c | 325 ++---------------------------------------------- 2 files changed, 13 insertions(+), 314 deletions(-) commit f73c904534393133e7ddbbe5c36bb007f9c2fb7f Author: Christoph Hellwig Date: Fri Jun 14 16:26:41 2019 +0200 arc: use the generic remapping allocator for coherent DMA allocations Replace the code that sets up uncached PTEs with the generic vmap based remapping code. It also provides an atomic pool for allocations from non-blocking context, which we not properly supported by the existing arc code. Signed-off-by: Christoph Hellwig Reviewed-by: Evgeniy Paltsev Tested-by: Evgeniy Paltsev arch/arc/Kconfig | 2 ++ arch/arc/mm/dma.c | 62 +++++++++---------------------------------------------- 2 files changed, 12 insertions(+), 52 deletions(-) commit d98849aff87911013aadb730138ab728b52fc547 Author: Christoph Hellwig Date: Fri Jun 14 16:17:27 2019 +0200 dma-direct: handle DMA_ATTR_NO_KERNEL_MAPPING in common code DMA_ATTR_NO_KERNEL_MAPPING is generally implemented by allocating normal cacheable pages or CMA memory, and then returning the page pointer as the opaque handle. Lift that code from the xtensa and generic dma remapping implementations into the generic dma-direct code so that we don't even call arch_dma_alloc for these allocations. Signed-off-by: Christoph Hellwig arch/xtensa/kernel/pci-dma.c | 8 +------- include/linux/dma-noncoherent.h | 2 ++ kernel/dma/direct.c | 14 ++++++++++++++ kernel/dma/remap.c | 13 ++----------- 4 files changed, 19 insertions(+), 18 deletions(-) commit c2f2124e0d447ad02a41a92361b3734366797680 Author: Christoph Hellwig Date: Fri Jun 14 15:59:14 2019 +0200 dma-direct: handle DMA_ATTR_NON_CONSISTENT in common code Only call into arch_dma_alloc if we require an uncached mapping, and remove the parisc code manually doing normal cached DMA_ATTR_NON_CONSISTENT allocations. Signed-off-by: Christoph Hellwig Acked-by: Helge Deller # parisc arch/parisc/kernel/pci-dma.c | 48 ++++++++++++-------------------------------- kernel/dma/direct.c | 4 ++-- 2 files changed, 15 insertions(+), 37 deletions(-) commit 9cda7807ee1e25a3771b5357d9fb12991b2550f9 Author: Toshiaki Makita Date: Thu Jun 13 18:39:59 2019 +0900 veth: Support bulk XDP_TX XDP_TX is similar to XDP_REDIRECT as it essentially redirects packets to the device itself. XDP_REDIRECT has bulk transmit mechanism to avoid the heavy cost of indirect call but it also reduces lock acquisition on the destination device that needs locks like veth and tun. XDP_TX does not use indirect calls but drivers which require locks can benefit from the bulk transmit for XDP_TX as well. This patch introduces bulk transmit mechanism in veth using bulk queue on stack, and improves XDP_TX performance by about 9%. Here are single-core/single-flow XDP_TX test results. CPU consumptions are taken from "perf report --no-child". - Before: 7.26 Mpps _raw_spin_lock 7.83% veth_xdp_xmit 12.23% - After: 7.94 Mpps _raw_spin_lock 1.08% veth_xdp_xmit 6.10% v2: - Use stack for bulk queue instead of a global variable. Signed-off-by: Toshiaki Makita Acked-by: Jesper Dangaard Brouer Signed-off-by: Daniel Borkmann drivers/net/veth.c | 60 +++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 48 insertions(+), 12 deletions(-) commit e7d4798960b3ebcd243ae6a59e04d4fe6518c96c Author: Toshiaki Makita Date: Thu Jun 13 18:39:58 2019 +0900 xdp: Add tracepoint for bulk XDP_TX This is introduced for admins to check what is happening on XDP_TX when bulk XDP_TX is in use, which will be first introduced in veth in next commit. v3: - Add act field to be in line with other XDP tracepoints. Signed-off-by: Toshiaki Makita Acked-by: Jesper Dangaard Brouer Signed-off-by: Daniel Borkmann include/trace/events/xdp.h | 29 +++++++++++++++++++++++++++++ kernel/bpf/core.c | 1 + 2 files changed, 30 insertions(+) commit 9e6ea59f3ff37192fd7aec7821dca6ece629b7d0 Author: Bjorn Andersson Date: Wed May 15 16:32:34 2019 -0700 iommu/io-pgtable: Support non-coherent page tables Describe the memory related to page table walks as non-cacheable for iommu instances that are not DMA coherent. Signed-off-by: Bjorn Andersson [will: Use cfg->coherent_walk, fix arm-v7s, ensure outer-shareable for NC] Signed-off-by: Will Deacon drivers/iommu/io-pgtable-arm-v7s.c | 7 +++++-- drivers/iommu/io-pgtable-arm.c | 12 +++++++++--- 2 files changed, 14 insertions(+), 5 deletions(-) commit eed43e7e17c1aaa803dbc15b519819337c007b9e Author: Chris Packham Date: Tue Jun 18 09:54:57 2019 +1200 pinctrl: mvebu: Add support for MV98DX1135 The 98DX1135 is a switch chip with an integrated CPU. This is similar to the 98DX4122 except the MPP assignments differ. Signed-off-by: Chris Packham Reviewed-by: Andrew Lunn Signed-off-by: Linus Walleij drivers/pinctrl/mvebu/pinctrl-kirkwood.c | 576 ++++++++++++++++--------------- 1 file changed, 297 insertions(+), 279 deletions(-) commit 7b34b0032bae3c6dac2ddd87fbb356489acda517 Author: Chris Packham Date: Tue Jun 18 09:54:55 2019 +1200 dt-bindings: pinctrl: mvebu: Document bindings for 98DX1135 The 98DX1135 is similar to the 98DX4122 except the MPP options differ. Signed-off-by: Chris Packham Reviewed-by: Andrew Lunn Signed-off-by: Linus Walleij .../bindings/pinctrl/marvell,kirkwood-pinctrl.txt | 44 +++++++++++++++++++++- 1 file changed, 42 insertions(+), 2 deletions(-) commit 29217a9eb0ed10ef5f557a1293427b0b0d96af62 Merge: 1242de90ba06 2d8bf3404bb0 Author: Olof Johansson Date: Tue Jun 25 05:21:01 2019 -0700 Merge tag 'aspeed-5.3-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed into arm/defconfig ASPEED device tree updates for 5.3 Add new drivers to the ASPEED G4 and G5 defconfigs, and to the armv5 multi defconfig. * tag 'aspeed-5.3-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed: ARM: configs: multi_v5: Add more ASPEED devices ARM: configs: aspeed: Add new drivers Signed-off-by: Olof Johansson commit 1242de90ba0653c1356c817ebf3f5f974a58a0a2 Merge: 478b973b21a4 01d6fb565b4a Author: Olof Johansson Date: Tue Jun 25 05:19:55 2019 -0700 Merge tag 'tegra-for-5.3-arm64-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/defconfig arm64: tegra: Default configuration changes for v5.3-rc1 This enables the INA3221 power monitoring driver that is used on many of the Jetson boards as well as Tegra194 PCIe support. * tag 'tegra-for-5.3-arm64-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: arm64: defconfig: Add Tegra194 PCIe driver arm64: defconfig: Add HWMON INA3221 support Signed-off-by: Olof Johansson commit 478b973b21a4e795912adb9a2912810fc4b1061a Author: Amelie Delaunay Date: Fri Jun 21 16:44:32 2019 +0200 ARM: multi_v7_defconfig: enable STMFX pinctrl support This patch enables support for STMFX pinctrl. Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre Torgue Signed-off-by: Olof Johansson arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+) commit 111914d79b048782397ffe5b94cf7322ae937253 Merge: 5cf0fb260a32 c24f6886b2ee Author: Olof Johansson Date: Tue Jun 25 05:17:38 2019 -0700 Merge tag 'renesas-arm64-defconfig-for-v5.3' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into arm/defconfig Renesas ARM64 Based SoC Defconfig Updates for v5.3 Enable as modules: * TYPEC_HD3SS3220 B Type-C DRP Port controller driver * TDA19988 HDMI encoder driver * tag 'renesas-arm64-defconfig-for-v5.3' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: arm64: defconfig: enable TYPEC_HD3SS3220 config option arm64: defconfig: Enable TDA19988 Signed-off-by: Olof Johansson commit 5cf0fb260a322bca9eb7a7ebd92d05edb4fff586 Merge: 9dd1901b8cb6 b995421faef5 Author: Olof Johansson Date: Tue Jun 25 05:16:22 2019 -0700 Merge tag 'renesas-arm-defconfig-for-v5.3' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into arm/defconfig Renesas ARM Based SoC Defconfig Updates for v5.3 * Remove GENERIC_PHY from shmobile_defconfig as it is now selected * tag 'renesas-arm-defconfig-for-v5.3' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: ARM: shmobile: Remove GENERIC_PHY from shmobile_defconfig Signed-off-by: Olof Johansson commit 9dd1901b8cb66f60f59b56c43d74b75bb20130ae Merge: e737f13b5077 817bbbb7749d Author: Olof Johansson Date: Tue Jun 25 05:13:46 2019 -0700 Merge tag 'qcom-defconfig-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/defconfig Qualcomm ARM Based defconfig Updates for v5.3 * Add support for USB networking * Add support for display related options * tag 'qcom-defconfig-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: ARM: qcom_defconfig: add support for USB networking ARM: qcom_defconfig: add display-related options Signed-off-by: Olof Johansson commit 0eb84fa6e6163fd5e238661b376c959e8cdd549a Author: Björn Töpel Date: Mon Jun 24 07:24:55 2019 +0200 MAINTAINERS: add reviewer to maintainers entry Jonathan Lemon has volunteered as an official AF_XDP reviewer. Thank you, Jonathan! Signed-off-by: Björn Töpel Acked-by: Jonathan Lemon Signed-off-by: Daniel Borkmann MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 37937ee73ba4d24850df666261f5243d611d1cc5 Merge: 09253fccca37 01407158e4c7 Author: Olof Johansson Date: Tue Jun 25 04:52:55 2019 -0700 Merge tag 'imx-dt64-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/dt i.MX arm64 device tree changes for 5.3: - Add i.MX8MQ based Librem5 devkit support. - Add SNVS power key support for i.MX8MQ and i.MX8MM. - Add GPIO alias for imx8mq and i.MX8QXP. - A series from Daniel Baluta to add SAI devices and enable audio support for imx8mm-evk board. - Add DDR performance monitor unit support for i.MX8QXP. - Add irqsteer interrupt controller device for i.MX8MQ SoC. - Add CPU speed grading and all OPPs for i.MX8MM and i.MX8MQ. - Add OCOTP device node for i.MX8QXP. - Various device addition for LS1028A: SATA, qDMA, USB, Mali DP500 and temperature sensor. - Random minor coding style improvements. * tag 'imx-dt64-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (32 commits) arm64: dts: librem5: enable the SNVS power key arm64: dts: librem5: Limit the USB to 5V arm64: dts: imx8qxp: added ddr performance monitor nodes arm64: dts: imx8qxp: sort LSIO subsystem devices arm64: dts: imx8qxp: sort alias alphabetically arm64: dts: imx8qxp: Add lsio_mu13 node arm64: dts: imx8mm-evk: Enable audio codec wm8524 arm64: dts: fsl: librem5: Add a device tree for the Librem5 devkit arm64: dts: fsl: ls1028a: Add qDMA node arm64: dts: imx8mm: Enable SNVS power key according to board design arm64: dts: imx8mq-evk: Enable SNVS power key arm64: dts: ls1028a: add crypto node arm64: dts: ls1028a: Add temperature sensor node arm64: dts: imx8mm: Move gic node into soc node arm64: dts: imx8mm: Move usbphy out of soc node arm64: dts: imx8mm: Pass the 'ranges' property arm64: dts: imx8mm: Pass a unit name for the 'soc' node arm64: dts: fsl: imx8mq: add the snvs power key node arm64: dts: ls1028a: fix watchdog device node arm64: dts: ls1028a: Enable sata. ... Signed-off-by: Olof Johansson commit 09253fccca37137afec66ca5b9470cd566186af7 Merge: 9bb03d2644de 48cbd9ff53b7 Author: Olof Johansson Date: Tue Jun 25 04:52:17 2019 -0700 Merge tag 'imx-dt-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/dt i.MX arm32 DT changes for 5.3: - New board support: iMX6-based Kontron SMARC-sAMX6i, i.MX7D based Meerkat96 board, and NXP LS1021A-TSN board. - A series from Andrey Smirnov to update vf610-zii-dev and imx7d-zii-rpu2 board, fixing UART2 pin assignment and stdout-path, adding QSPI device, and dropping unused pinmux. - Update imx6sl and imx6qdl device tree to assign corresponding clocks instead of dummy clock. - Update i.MX6/7 boards from NXP to assign corresponding power supply for LDOs. - Update i.MX6/7 device trees to enable SNVS poweroff key support according to board design. - Update coresight DT binding for i.MX7 according to consolidations for CoreSight replicator and funnel. - A series from Marek Vasut to update M53Menlo board on various devices like UART, USB, ethernet PHY, GPIOs etc. - Enable USBOTG support for imx7ulp and evk board. - A series from Peter Robinson to update imx6sx-udoo board, switching to SPDX License Identifier, enabling I2C devices and bluetooth support. - Add video capture support for i.MX53 and imx53-smd board. - Add PXP device for i.MX6UL. - Other random small updates on various boards. * tag 'imx-dt-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (46 commits) ARM: dts: imx7ulp-evk: enable USBOTG1 support ARM: dts: imx7ulp: add imx7ulp USBOTG1 support ARM: dts: imx6qdl-kontron-samx6i: add Kontron SMARC SoM Support ARM: dts: imx6qdl-kontron-samx6i: Add iMX6-based Kontron SMARC-sAMX6i module ARM: dts: imx7d-zii-rpu2: Drop unused pinmux entries ARM: dts: imx7d-zii-rpu2: Fix incorrrect 'stdout-path' ARM: dts: Add support for 96Boards Meerkat96 board ARM: dts: imx6ul: Add PXP node ARM: dts: imx6sll: Enable SNVS poweroff according to board design ARM: dts: imx7s: Enable SNVS power key according to board design ARM: dts: imx6sll: Enable SNVS power key according to board design ARM: dts: imx6ul: Enable SNVS power key according to board design ARM: dts: imx6sx: Enable SNVS power key according to board design ARM: dts: imx6qdl: Enable SNVS power key according to board design ARM: dts: imx53: Bind CPLD on M53Menlo ARM: dts: Introduce the NXP LS1021A-TSN board ARM: dts: imx6ull-colibri: enable UHS-I for USDHC1 ARM: dts: imx7d: Update cpufreq OPP table ARM: dts: imx6sx-udoo-neo: add bluetooth config to uart3 ARM: dts: imx6sx-udoo-neo: enable i2c-2 and i2c-4 for onboard sensors ... Signed-off-by: Olof Johansson commit 9bb03d2644de0799e70991e5fb907e4b3af7e043 Merge: c529cbb54279 881b54c7e9d9 Author: Olof Johansson Date: Tue Jun 25 04:51:42 2019 -0700 Merge tag 'imx-dt-clkdep-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/dt i.MX DT changes with new clock for 5.3: - This is a set of device tree changes with new clocks - adding clock info for i.MX8 GPIO and SNVS RTC device. * tag 'imx-dt-clkdep-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: arm64: dts: imx8mq: add clock for SNVS RTC node arm64: dts: imx8mm: add clock for SNVS RTC node arm64: dts: imx8mm: add clock for GPIO node clk: imx8m: Add GIC clock dt-bindings: clock: imx8m: Add GIC clock clk: imx8mm: add SNVS clock to clock tree dt-bindings: clock: imx8mm: Add SNVS clock clk: imx8mq: add SNVS clock to clock tree dt-bindings: clock: imx8mq: Add SNVS clock clk: imx8mm: add GPIO clocks to clock tree dt-bindings: clock: imx8mm: Add GPIO clocks Signed-off-by: Olof Johansson commit 4f41845b340783eaec9cc2840fe3cb9a00574054 Author: Will Deacon Date: Tue Jun 25 12:51:25 2019 +0100 iommu/io-pgtable: Replace IO_PGTABLE_QUIRK_NO_DMA with specific flag IO_PGTABLE_QUIRK_NO_DMA is a bit of a misnomer, since it's really just an indication of whether or not the page-table walker for the IOMMU is coherent with the CPU caches. Since cache coherency is more than just a quirk, replace the flag with its own field in the io_pgtable_cfg structure. Cc: Bjorn Andersson Signed-off-by: Will Deacon drivers/iommu/arm-smmu-v3.c | 4 +--- drivers/iommu/arm-smmu.c | 4 +--- drivers/iommu/io-pgtable-arm-v7s.c | 10 +++++----- drivers/iommu/io-pgtable-arm.c | 19 ++++++++----------- drivers/iommu/ipmmu-vmsa.c | 1 + include/linux/io-pgtable.h | 11 ++++------- 6 files changed, 20 insertions(+), 29 deletions(-) commit c529cbb54279cf27b1b111d0997a59636943f10d Merge: 276610709de1 a10ecf624b7b Author: Olof Johansson Date: Tue Jun 25 04:51:18 2019 -0700 Merge tag 'imx-bindings-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/dt i.MX DT bindings for 5.3: - Add vendor prefix for Purism SPC. - Add bindings for i.MX8MQ EVK Board, Purism Librem5 devkit and i.MX7 Meerkat96 Board. - Add LS1028A specific compatible into qDMA bindings doc. - Move Emtrion i.MX6 board bindings to schema. - Add missing schemas for i.MX7ULP and i.MX1/31/35 bindings. * tag 'imx-bindings-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: dt-bindings: arm: fsl: Add missing schemas for i.MX1/31/35 dt-bindings: arm: fsl: Add back missing i.MX7ULP binding dt-bindings: arm: Move Emtrion i.MX6 board bindings to schema dt-bindings: arm: fsl: Add the imx8mq boards dt-bindings: Add an entry for Purism SPC dt-bindings: fsl-qdma: Add LS1028A qDMA bindings dt-bindings: arm: Document 96Boards Meerkat96 devicetree binding Signed-off-by: Olof Johansson commit 276610709de1b24d44750f0e03b93563df9b9d78 Merge: 28705661dd1f bea8754e784e Author: Olof Johansson Date: Tue Jun 25 04:50:23 2019 -0700 Merge tag 'pxa-dt-5.3' of https://github.com/rjarzmik/linux into arm/dt This is the pxa devicetree changes for 5.3 cycle : - devicetree pinmux support for bias on pxa3xx - devicetree pinmux bias usage for raumfeld * tag 'pxa-dt-5.3' of https://github.com/rjarzmik/linux: ARM: dts: pxa300-raumfeld-speaker-one: add channel output mapping for STA320 ARM: pxa: raumfeld-common: fix comments in gpio_keys pinctrl node ARM: pxa: raumfeld-controller: add pinctrl for charger pins ARM: pxa: raumfeld-controller: fix 'dock detect' GPIO key ARM: pxa3xx: dts: Add defines for pinctrl-single,bias-pull{up,down} Signed-off-by: Olof Johansson commit 28705661dd1f95d398c15f76ab3b306624b304ca Merge: 9c644f83ea6e 271839b0a819 Author: Olof Johansson Date: Tue Jun 25 04:49:42 2019 -0700 Merge tag 'at91-5.3-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/dt AT91 DT for 5.3 - switch to new sckc bindings - convert soc bindings to json-schema * tag 'at91-5.3-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: dt-bindings: arm: Convert Atmel board/soc bindings to json-schema ARM: dts: at91: sama5d3: switch to new sckc bindings ARM: dts: at91: at91sam9rl: switch to new sckc bindings ARM: dts: at91: at91sam9g45: switch to new sckc bindings ARM: dts: at91: at91sam9x5: switch to new sckc bindings ARM: dts: at91sam9261ek: remove unused chosen nodes Signed-off-by: Olof Johansson commit 9c644f83ea6ee4b6f9caeb01bdfac9f88ec30892 Merge: b9569a3cc3e8 a586c88eab65 Author: Olof Johansson Date: Tue Jun 25 04:48:32 2019 -0700 Merge tag 'tegra-for-5.3-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/dt arm64: tegra: Device tree changes for v5.3-rc1 This contains the bulk of the Tegra changes this cycle. It has a bunch of improvements across almost all boards. These are mostly small and not too exciting additions. Most notably perhaps is the continuation of Jetson Nano support, which is now mostly on feature parity with Jetson TX1. * tag 'tegra-for-5.3-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: (28 commits) arm64: tegra: Enable PCIe slots in P2972-0000 board arm64: tegra: Add P2U and PCIe controller nodes to Tegra194 DT arm64: tegra: Add PEX DPD states as pinctrl properties arm64: tegra: Enable ACONNECT, ADMA and AGIC arm64: tegra: Add ACONNECT, ADMA and AGIC nodes arm64: tegra: Sort device tree nodes alphabetically arm64: tegra: Fix Jetson Nano GPU regulator arm64: tegra: Update Jetson TX1 GPU regulator timings arm64: tegra: Fix AGIC register range arm64: tegra: Add INA3221 channel info for Jetson TX2 arm64: tegra: Enable PWM on Jetson Nano arm64: tegra: Enable CPU sleep on Jetson Nano arm64: tegra: Add ID EEPROMs on Jetson Nano arm64: tegra: Add ID EEPROM for Jetson TX2 Developer Kit arm64: tegra: Add ID EEPROM for Jetson TX2 module arm64: tegra: Add ID EEPROM for Jetson TX1 Developer Kit arm64: tegra: Add ID EEPROM for Jetson TX1 module arm64: tegra: Don't use architected timer for suspend on Tegra210 arm64: tegra: Mark architected timer as always on arm64: tegra: Add pin control states for I2C on Tegra186 ... Signed-off-by: Olof Johansson commit b9569a3cc3e8d9dc19f1d477f2d5c58f8ec07d58 Merge: 4cb0f05d3795 f65aaf8b897e Author: Olof Johansson Date: Tue Jun 25 04:47:55 2019 -0700 Merge tag 'stm32-dt-for-v5.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32 into arm/dt STM32 DT updates for v5.3, round 1 Highlights: ---------- MPU part: -Add stm32mp157a-avenger board support: This board embeds a STM32MP157a SOC with AC package (TFBGA361, 148 ios) , 1024MB of DDR3 and STPMIC1A pmic . Several connections are available on this boards: 2x Type A (USB 2.0) Host and 1x Micro B (USB 2.0) OTG, ethernet 10/100/1000, WiFi 5 GHz & 2.4GHz, ... -Add STMFX support en stm32mp157c-ev1 and enable joystick connected on it. -Add I2S and SAI support on stm32mp157c. -Add and enable support of Vivante GPU on stm32mp157 ED1 and DK1 boards (EV1 and DK2 inherit of it). -Add camera support: -Add DCMI support on stm32mp157c SOC -Enabled OV5640 camera support on stm32mp157c-ev1 board -Enable hdmi bridge sii9022 & display controller on stm32mp157c-dk1 board. MCU part: -Add STMFX support en stm32746g-eval and enable connections on it: leds and joystick * tag 'stm32-dt-for-v5.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32: (27 commits) ARM: dts: stm32: replace rgmii mode with rgmii-id on stm32mp15 boards ARM: dts: stm32: Add Avenger96 devicetree support based on STM32MP157A dt-bindings: arm: stm32: Document Avenger96 devicetree binding dt-bindings: arm: stm32: Convert STM32 SoC bindings to DT schema ARM: dts: stm32: Add missing pinctrl definitions for STM32MP157 ARM: dts: stm32: add sai id registers to stm32mp157c ARM: dts: stm32: add power supply of rm68200 on stm32mp157c-ev1 ARM: dts: stm32: enable display on stm32mp157c-dk1 board ARM: dts: stm32: Add I2C 1 config for stm32mp157a-dk1 ARM: dts: stm32: enable OV5640 camera on stm32mp157c-ev1 board ARM: dts: stm32: add DCMI pins to stm32mp157c ARM: dts: stm32: add DCMI camera interface support on stm32mp157c ARM: dts: stm32: enable Vivante GPU support on stm32mp157a-dk1 board ARM: dts: stm32: enable Vivante GPU support on stm32mp157c-ed1 board ARM: dts: stm32: Add Vivante GPU support on STM32MP157c ARM: dts: stm32: add i2s pins muxing on stm32mp157 ARM: dts: stm32: add i2s support on stm32mp157c ARM: dts: stm32: add sai pins muxing on stm32mp157 ARM: dts: stm32: add sai support on stm32mp157c ARM: dts: stm32: add jedec compatible for nor flash on stm32mp157c-ev1 ... Signed-off-by: Olof Johansson commit aba44287a224dfcfdd99ba885ca9d9acc4de0c17 Author: Adrian Hunter Date: Sat Jun 22 12:32:48 2019 +0300 perf scripts python: export-to-postgresql.py: Export Intel PT power and ptwrite events The format of synthesized events is determined by the attribute config. For the formats for Intel PT power and ptwrite events, create tables and populate them when the synth_data handler is called. If the tables remain empty, drop them at the end. The tables and views, including a combined power_events_view, will display automatically from the tables menu of the exported exported-sql-viewer.py script. Note, currently only Atoms since Gemini Lake have support for ptwrite and mwait, pwre, exstop and pwrx, but all Intel PT implementations support cbr. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190622093248.581-8-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/scripts/python/export-to-postgresql.py | 251 ++++++++++++++++++++++ 1 file changed, 251 insertions(+) commit 5130c6e55531b9bbcdeb8b327711ff204bc4835f Author: Adrian Hunter Date: Sat Jun 22 12:32:47 2019 +0300 perf scripts python: export-to-sqlite.py: Export Intel PT power and ptwrite events The format of synthesized events is determined by the attribute config. For the formats for Intel PT power and ptwrite events, create tables and populate them when the synth_data handler is called. If the tables remain empty, drop them at the end. The tables and views, including a combined power_events_view, will display automatically from the tables menu of the exported exported-sql-viewer.py script. Note, currently only Atoms since Gemini Lake have support for ptwrite and mwait, pwre, exstop and pwrx, but all Intel PT implementations support cbr. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190622093248.581-7-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/scripts/python/export-to-sqlite.py | 239 ++++++++++++++++++++++++++ 1 file changed, 239 insertions(+) commit b9322cab17a1092e2aa7ee2505ecceb0cd5fd685 Author: Adrian Hunter Date: Sat Jun 22 12:32:46 2019 +0300 perf db-export: Export synth events Synthesized events are samples but with architecture-specific data stored in sample->raw_data. They are identified by attribute type PERF_TYPE_SYNTH. Add a function to export them. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190622093248.581-6-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo .../util/scripting-engines/trace-event-python.c | 46 +++++++++++++++++++++- 1 file changed, 44 insertions(+), 2 deletions(-) commit 5fe2cf7d19c48f2b53b57e6a5786972bc1b8d738 Author: Adrian Hunter Date: Sat Jun 22 12:32:45 2019 +0300 perf intel-pt: Synthesize CBR events when last seen value changes The first core-to-bus ratio (CBR) event will not be shown if --itrace 's' option (skip initial number of events) is used, nor if time intervals are specified that do not include the start of tracing. Change the logic to record the last CBR value seen by the user, and synthesize CBR events whenever that changes. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190622093248.581-5-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt.c | 65 +++++++++++++++++++++++++++++----------------- 1 file changed, 41 insertions(+), 24 deletions(-) commit 51b091861828f5801207a00211ea4e94102389c3 Author: Adrian Hunter Date: Sat Jun 22 12:32:44 2019 +0300 perf intel-pt: Add CBR value to decoder state For convenience, add the core-to-bus ratio (CBR) value to the decoder state. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190622093248.581-4-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt-decoder/intel-pt-decoder.c | 1 + tools/perf/util/intel-pt-decoder/intel-pt-decoder.h | 1 + 2 files changed, 2 insertions(+) commit 91de8684f1cff6944634bfb9098dc3a2583f798c Author: Adrian Hunter Date: Sat Jun 22 12:32:43 2019 +0300 perf intel-pt: Cater for CBR change in PSB+ PSB+ provides status information only so the core-to-bus ratio (CBR) in PSB+ will not have changed from its previous value. However, cater for the possibility of a another CBR change that gets caught up in the PSB+ anyway. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190622093248.581-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt-decoder/intel-pt-decoder.c | 7 +++++++ 1 file changed, 7 insertions(+) commit abe5a1d3e4bee361bd3b21b8909c8421e46911d1 Author: Adrian Hunter Date: Sat Jun 22 12:32:42 2019 +0300 perf intel-pt: Decoder to output CBR changes immediately The core-to-bus ratio (CBR) provides the CPU frequency. With branches enabled, the decoder was outputting CBR changes only when there was a branch. That loses the correct time of the change if the trace is not in context (e.g. not tracing kernel space). Change to output the CBR change immediately. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190622093248.581-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt-decoder/intel-pt-decoder.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit 9f94c7f947e919c343b30f080285af53d0fa9902 Author: Kyle Meyer Date: Thu Jun 20 14:36:30 2019 -0500 perf tools: Increase MAX_NR_CPUS and MAX_CACHES Attempting to profile 1024 or more CPUs with perf causes two errors: perf record -a [ perf record: Woken up X times to write data ] way too many cpu caches.. [ perf record: Captured and wrote X MB perf.data (X samples) ] perf report -C 1024 Error: failed to set cpu bitmap Requested CPU 1024 too large. Consider raising MAX_NR_CPUS Increasing MAX_NR_CPUS from 1024 to 2048 and redefining MAX_CACHES as MAX_NR_CPUS * 4 returns normal functionality to perf: perf record -a [ perf record: Woken up X times to write data ] [ perf record: Captured and wrote X MB perf.data (X samples) ] perf report -C 1024 ... Signed-off-by: Kyle Meyer Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20190620193630.154025-1-meyerk@stormcage.eag.rdlabs.hpecorp.net Signed-off-by: Arnaldo Carvalho de Melo tools/perf/perf.h | 2 +- tools/perf/util/header.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit eb5d854456f5a4ccec6f9681b7196cf056df8cfa Author: Adrian Hunter Date: Wed Jun 19 09:44:29 2019 +0300 perf thread-stack: Eliminate code duplicating thread_stack__pop_ks() Use new function thread_stack__pop_ks() in place of equivalent code. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190619064429.14940-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/thread-stack.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit 97860b483c5597663a174ff7405be957b4838391 Author: Adrian Hunter Date: Wed Jun 19 09:44:28 2019 +0300 perf thread-stack: Fix thread stack return from kernel for kernel-only case Commit f08046cb3082 ("perf thread-stack: Represent jmps to the start of a different symbol") had the side-effect of introducing more stack entries before return from kernel space. When user space is also traced, those entries are popped before entry to user space, but when user space is not traced, they get stuck at the bottom of the stack, making the stack grow progressively larger. Fix by detecting a return-from-kernel branch type, and popping kernel addresses from the stack then. Note, the problem and fix affect the exported Call Graph / Tree but not the callindent option used by "perf script --call-trace". Example: perf-with-kcore record example -e intel_pt//k -- ls perf-with-kcore script example --itrace=bep -s ~/libexec/perf-core/scripts/python/export-to-sqlite.py example.db branches calls ~/libexec/perf-core/scripts/python/exported-sql-viewer.py example.db Menu option: Reports -> Context-Sensitive Call Graph Before: (showing Call Path column only) Call Path ▶ perf ▼ ls ▼ 12111:12111 ▶ setup_new_exec ▶ __task_pid_nr_ns ▶ perf_event_pid_type ▶ perf_event_comm_output ▶ perf_iterate_ctx ▶ perf_iterate_sb ▶ perf_event_comm ▶ __set_task_comm ▶ load_elf_binary ▶ search_binary_handler ▶ __do_execve_file.isra.41 ▶ __x64_sys_execve ▶ do_syscall_64 ▼ entry_SYSCALL_64_after_hwframe ▼ swapgs_restore_regs_and_return_to_usermode ▼ native_iret ▶ error_entry ▶ do_page_fault ▼ error_exit ▼ retint_user ▶ prepare_exit_to_usermode ▼ native_iret ▶ error_entry ▶ do_page_fault ▼ error_exit ▼ retint_user ▶ prepare_exit_to_usermode ▼ native_iret ▶ error_entry ▶ do_page_fault ▼ error_exit ▼ retint_user ▶ prepare_exit_to_usermode ▶ native_iret After: (showing Call Path column only) Call Path ▶ perf ▼ ls ▼ 12111:12111 ▶ setup_new_exec ▶ __task_pid_nr_ns ▶ perf_event_pid_type ▶ perf_event_comm_output ▶ perf_iterate_ctx ▶ perf_iterate_sb ▶ perf_event_comm ▶ __set_task_comm ▶ load_elf_binary ▶ search_binary_handler ▶ __do_execve_file.isra.41 ▶ __x64_sys_execve ▶ do_syscall_64 ▶ entry_SYSCALL_64_after_hwframe ▶ page_fault ▼ entry_SYSCALL_64 ▼ do_syscall_64 ▶ __x64_sys_brk ▶ __x64_sys_access ▶ __x64_sys_openat ▶ __x64_sys_newfstat ▶ __x64_sys_mmap ▶ __x64_sys_close ▶ __x64_sys_read ▶ __x64_sys_mprotect ▶ __x64_sys_arch_prctl ▶ __x64_sys_munmap ▶ exit_to_usermode_loop ▶ __x64_sys_set_tid_address ▶ __x64_sys_set_robust_list ▶ __x64_sys_rt_sigaction ▶ __x64_sys_rt_sigprocmask ▶ __x64_sys_prlimit64 ▶ __x64_sys_statfs ▶ __x64_sys_ioctl ▶ __x64_sys_getdents64 ▶ __x64_sys_write ▶ __x64_sys_exit_group Committer notes: The first arg to the perf-with-kcore needs to be the same for the 'record' and 'script' lines, otherwise we'll record the perf.data file and kcore_dir/ files in one directory ('example') to then try to use it from the 'bep' directory, fix the instructions above it so that both use 'example'. Signed-off-by: Adrian Hunter Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: stable@vger.kernel.org Fixes: f08046cb3082 ("perf thread-stack: Represent jmps to the start of a different symbol") Link: http://lkml.kernel.org/r/20190619064429.14940-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/thread-stack.c | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) commit 2d7102a0453769fd37e9f4ce68652e104fbf5c84 Author: Numfor Mbiziwo-Tiapo Date: Thu Jun 20 14:54:46 2019 -0700 perf tools: Fix cache.h include directive Change the include path so that progress.c can find cache.h since it was previously searching in the wrong directory. Committer notes: $ ls -la tools/perf/ui/../cache.h ls: cannot access 'tools/perf/ui/../cache.h': No such file or directory So it really should include ../../util/cache.h, or plain cache.h, since we have -Iutil in INC_FLAGS in tools/perf/Makefile.config Signed-off-by: Numfor Mbiziwo-Tiapo Cc: Jiri Olsa , Cc: Luke Mujica , Cc: Stephane Eranian To: Ian Rogers Link: https://lkml.kernel.org/n/tip-pud8usyutvd2npg2vpsygncz@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/progress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4cb0f05d37952d7802b95ce865d8ca1e2fb632be Merge: 2545de859c7e 200f5c4081e0 Author: Olof Johansson Date: Tue Jun 25 04:47:08 2019 -0700 Merge tag 'mvebu-dt64-5.3-1' of git://git.infradead.org/linux-mvebu into arm/dt mvebu dt64 for 5.3 (part 1) For Armada 7K/8K: - enable AP806 thermal throttling with CPUfreq - add missing #interrupt-cells property allowing configuring interrupt for GPIO On Armada 8040 based board: - Fix PCI memory window on Mcbin board - Set SFP power limit on clearfog GT board - Disable AP I2C on Armada-8040-DB On Armada 3720 based board espressobin correct the SPI node used for NOR flash On Armada 7040 DB board add USB current regulators * tag 'mvebu-dt64-5.3-1' of git://git.infradead.org/linux-mvebu: arm64: dts: marvell: add missing #interrupt-cells property arm64: dts: marvell: armada-7040-db: Add USB current regulators arm64: dts: armada-3720-espressobin: correct spi node arm64: dts: marvell: Disable AP I2C on Armada-8040-DB arm64: dts: marvell: Enable AP806 thermal throttling with CPUfreq arm64: dts: marvell: Change core numbering in AP806 thermal-node arm64: dts: marvell: clearfog-gt-8k: set SFP power limit arm64: dts: marvell: mcbin: enlarge PCI memory window Signed-off-by: Olof Johansson commit 2545de859c7eb54ddf5925a69a1e412b36f57317 Merge: d71036005f63 0e5447626bed Author: Olof Johansson Date: Tue Jun 25 04:46:25 2019 -0700 Merge tag 'mvebu-dt-5.3-1' of git://git.infradead.org/linux-mvebu into arm/dt mvebu dt for 5.3 (part 1) Add LCD support on Netgear RN104 * tag 'mvebu-dt-5.3-1' of git://git.infradead.org/linux-mvebu: ARM: dts: armada: netgear-rn104: Add LCD to RN104 dts. Signed-off-by: Olof Johansson commit d71036005f63e7112e781d6422e030784f74139e Merge: cd75dd0058e2 f6130381e2a2 Author: Olof Johansson Date: Tue Jun 25 04:45:45 2019 -0700 Merge tag 'renesas-arm64-dt-for-v5.3' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into arm/dt Renesas ARM64 Based SoC DT Updates for v5.3 * Renesas SoCs - Revise usb2_phy nodes and phys properties according to updated bindings - Use ip=on for bootargs * R-Car Gen 3 and RZ/G2M (r8a774a1) SoCs - Add dynamic power coefficient - Create thermal zone to support IPA * R-Car E3 (r8a77990) and D3 (r8a77995) SoCs - Point LVDS0 to its companion LVDS1 * R-Car E3 (r8a77990) SoC - Corresct register range of DU * R-Car E3 (r8a77990) based Ebisu board - Remove renesas, no-ether-link property * R-Car D3 (r8a77995) based Draak board: - Remove unnecessary index from vin4 port * RZ/G2M (r8a774a1) based HiHope main and sub-boards: - Initial support - Describe CPU capacity and topoligy - Enable CMT, HDMI, LEDs, PCIe RWDT, SCIF, SDHI, TMU, and USB 2.0 and 3.0 * RZ/G2E (r8a774c0) SoC based EK874 board: - Clean up CPU compatible strings - Enable: Bluetooth, HDMI audio and video, TPU, USB 3.0 and WLAN * tag 'renesas-arm64-dt-for-v5.3' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: (53 commits) arm64: dts: renesas: hihope-common: Remove "label" from LEDs arm64: dts: renesas: hihope-common: Add HDMI support arm64: dts: renesas: r8a774a1: Add HDMI encoder instance arm64: dts: renesas: r8a774a1: Add dynamic power coefficient arm64: dts: renesas: r8a774a1: Create thermal zone to support IPA arm64: dts: renesas: r8a774a1: Add CPU capacity-dmips-mhz arm64: dts: renesas: r8a774a1: Add CPU topology on r8a774a1 SoC arm64: dts: renesas: hihope-common: Add LEDs support arm64: dts: renesas: hihope-common: Enable USB3.0 arm64: dts: renesas: hihope-common: Add USB 2.0 support arm64: dts: renesas: r8a774a1: Fix USB 2.0 clocks arm64: dts: renesas: r8a774a1: Add TMU device nodes arm64: dts: renesas: r8a774a1: Add CMT device nodes arm64: dts: renesas: hihope-common: Add uSD and eMMC arm64: dts: renesas: r8a77990: Fix register range of display node arm64: dts: renesas: cat874: Enable usb role switch support arm64: dts: renesas: cat874: Enable USB3.0 host/peripheral device node arm64: dts: renesas: r8a7799[05]: Point LVDS0 to its companion LVDS1 arm64: dts: renesas: hihope-common: Add RWDT support arm64: dts: renesas: hihope-rzg2-ex: Enable PCIe support ... Signed-off-by: Olof Johansson commit cd75dd0058e242d3c2fdea319089761b1431dca3 Merge: af647fc73343 9dd6f7c484fd Author: Olof Johansson Date: Tue Jun 25 04:44:18 2019 -0700 Merge tag 'renesas-arm-dt-for-v5.3' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into arm/dt Renesas ARM Based SoC DT Updates for v5.3 * Renesas SoC based boards - Use ip=on for bootargs * Renesas R-Car Gen 2 SOC based boards - Configure PMIC IRQ pinmux * R-Car V2H (r8a7792) SoC - Describe CMT devices in DT * RZ/G1C (r8a77470) based iWave SBC (iwg23s-sbc) and RZ/G1N (r8a7744) based boards: - Correct SDHI2 VccQ regulator to fix SDR50 mode * RZ/A2M (r7s9210) based rza2mevb EVB RZ/A1H (r7s72100) based rskrza1 board - Describe input switch in DT * RZ/A2M (r7s9210) based rza2mevb EVB - Sort nodes to ease future maintenance - Add USB host, Ethernet and SDHI support * RZ/A2M (r7s9210) and RZ/A1H (r7s72100) SoCs - Describe IRQC device in DT * tag 'renesas-arm-dt-for-v5.3' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: (22 commits) ARM: dts: r8a7792: Add CMT0 and CMT1 to r8a7792 ARM: dts: iwg23s-sbc: Fix SDHI2 VccQ regulator ARM: dts: iwg20d-q7-common: Fix SDHI1 VccQ regularor ARM: dts: rza2mevb: Add input switch ARM: dts: r7s9210: Add IRQC device node ARM: dts: rza2mevb: sort nodes of rza2mevb board ARM: dts: renesas: Use ip=on for bootargs ARM: dts: rza2mevb: Add USB Host support ARM: dts: r7s9210: Add USB Device support ARM: dts: r7s9210: Add USB Host support ARM: dts: rskrza1: Add input switches ARM: dts: r7s72100: Add IRQC device node ARM: dts: r8a779x: Configure PMIC IRQ pinmux ARM: dts: rza2mevb: Add 48MHz USB clock ARM: dts: r7s9210: Add USB clock ARM: dts: rza2mevb: add ethernet aliases ARM: dts: rza2mevb: Add SDHI support ARM: dts: rza2mevb: Add Ethernet support ARM: dts: r7s9210: Add SDHI support ARM: dts: r7s9210: Add RIIC support ... Signed-off-by: Olof Johansson commit af647fc73343132257cf29251be11d2c54bf5a25 Merge: 8fbf1bb7156b 74a22e8f4350 Author: Olof Johansson Date: Tue Jun 25 04:43:29 2019 -0700 Merge tag 'renesas-dt-bindings-for-v5.3' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into arm/dt Renesas ARM Based SoC DT Bindings Updates for v5.3 * Renesas Gen3 DWC HDMI TX Encoder - Add RZ/G2M (r8a774a1) support * Renesas R-Car Compare Match Timer (CMT) - Add R-Car H3 (r8a7795), M3-N (r8a77965) and E3 (r8a77990) support * Renesas R-Car CAN FD Controller - Add R-Car M3-N (r8a77965) and E3 (r8a77990), and RZ/G2E (r8a774c0) support * Renesas R-Car CAN Controller - Add RZ/G2M (r8a774a1) support - Correct RZ/G2 clocks * Vendor prefixes: Add vendor prefix for HopeRun * Renesas SoCs and boards: Add HopeRun RZ/G2[M] boards * tag 'renesas-dt-bindings-for-v5.3' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: dt-bindings: display: renesas: Add r8a774a1 support dt-bindings: timer: renesas, cmt: Document r8a779{5|65|90} CMT support dt-bindings: can: rcar_canfd: document r8a774c0 support dt-bindings: can: rcar_canfd: document r8a77990 support dt-bindings: can: rcar_canfd: document r8a77965 support dt-bindings: can: rcar_can: Add r8a774c0 support dt-bindings: can: rcar_can: Fix RZ/G2 CAN clocks dt-bindings: Add vendor prefix for HopeRun dt-bindings: arm: renesas: Add HopeRun RZ/G2[M] boards Signed-off-by: Olof Johansson commit 8fbf1bb7156bdb9f19f929b301e788dda10a6f46 Merge: 3264c72dccce 9fbbbb7b8d63 Author: Olof Johansson Date: Tue Jun 25 04:42:05 2019 -0700 Merge tag 'sunxi-h3-h5-for-5.3-201906210812' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/dt This time we only have a single patch for our command branch between arm and arm64, a fix for the array syntax raised by our DT schemas. * tag 'sunxi-h3-h5-for-5.3-201906210812' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: ARM: dts: sunxi: h3/h5: Fix GPIO regulator state array Signed-off-by: Olof Johansson commit 3264c72dccce9c3dbd575e4c720494ddf71fd188 Merge: d12a73cf3a84 9164665a390a Author: Olof Johansson Date: Tue Jun 25 04:41:39 2019 -0700 Merge tag 'sunxi-dt64-for-5.3-201906210808' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/dt Our usual bunch of arm64 DT changes, this time with: - Some fixes for the DT schemas that were added during this release - Wifi support for the H6 - LRADC suppport for the A64 - Some background work on A64 boards, to enable various devices such as touchscreens, PMIC, audio, wifi, etc. * tag 'sunxi-dt64-for-5.3-201906210808' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: arm64: dts: allwinner: h6: Add DMA node arm64: dts: allwinner: a64: Add lradc node dt-bindings: input: sun4i-lradc-keys: Add A64 compatible arm64: dts: allwinner: h6: add r_watchog node arm64: dts: allwinner: h6: add watchdog node dt-bindings: watchdog: add Allwinner H6 watchdog arm64: dts: allwinner: a64: Enable audio on Teres-I arm64: dts: allwinner: a64: bananapi-m64: Enable PMIC USB power supply arm64: dts: allwinner: axp803: add USB power supply node arm64: dts: allwinner: a64: Add pinmux for RGB666 LCD arm64: dts: allwinner: a64: orangepi-win: Add wifi and bluetooth nodes arm64: dts: allwinner: h6: add PIO VCC bank supplies for Pine H64 arm64: dts: allwinner: a64-oceanic-5205-5inmfd: Enable GT911 CTP arm64: dts: allwinner: a64-amarula-relic: Add GT5663 CTP node arm64: dts: allwinner: a64: move I2C pinctrl to dtsi Signed-off-by: Olof Johansson commit d12a73cf3a84378e8615959fe561366e83ac5180 Merge: 266050d80ef5 2269f0c15191 Author: Olof Johansson Date: Tue Jun 25 04:40:52 2019 -0700 Merge tag 'sunxi-dt-for-5.3-201906210807' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/dt Our usual bunch of patches: - Some work on the BPi M2-Berry to support various devices - Convert some bindings to a schema, and a lot of fixes reported by the schemas we introduced. - A few other fixes here and there * tag 'sunxi-dt-for-5.3-201906210807' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: (21 commits) dt-bindings: pwm: Convert Allwinner PWM to a schema ARM: dts: sun8i: r40: Change the RTC compatible ARM: dts: sun8i: v3s: Add external crystals accuracy ARM: dts: sun8i: v3s: Fix the RTC node ARM: dts: sun6i: Add external crystals accuracy ARM: dts: sun6i: Fix RTC node ARM: dts: sun8i: a83t: Add device node for CSI (Camera Sensor Interface) ARM: dts: gr8-evb: Fix RTC vendor ARM: dts: sun7i: icnova-swac: Fix the model vendor ARM: dts: sun8i: a711: Change LRADC node names to avoid warnings ARM: dts: sun7i: olimex-lime2: Enable ac and power supplies ARM: dts: sun6i: Add default address and size cells for SPI ARM: dts: sun8i-h3: Fix wifi in Beelink X2 DT dt-bindings: bus: Convert Allwinner RSB to a schema ARM: dts: sun8i: r40: bananapi-m2-ultra: Remove regulator-always-on ARM: dts: sun8i: v40: bananapi-m2-berry: Add Bluetooth device node ARM: dts: sun8i: v40: bananapi-m2-berry: Enable AHCI ARM: dts: sun8i: v40: bananapi-m2-berry: Enable HDMI output ARM: dts: sun8i: v40: bananapi-m2-berry: Enable GMAC ethernet controller ARM: dts: sun8i: v40: bananapi-m2-berry: Add GPIO pin-bank regulator supplies ... Signed-off-by: Olof Johansson commit 266050d80ef55d47dac87f2167df1cdb17dba105 Merge: 19339e6a2214 a2c6e82e5341 Author: Olof Johansson Date: Tue Jun 25 04:38:23 2019 -0700 Merge tag 'amlogic-dt' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into arm/dt ARM: dts: Amlogic updates for v5.3 - SPDX updates - switch to generic ethernet PHY reset bindings - add the canvas module - mxiii-plus board: add regulators * tag 'amlogic-dt' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: ARM: dts: meson: switch to the generic Ethernet PHY reset bindings ARM: dts: meson8b: update with SPDX Licence identifier ARM: dts: meson8b-odroidc1: update with SPDX Licence identifier ARM: dts: meson8b-mxq: update with SPDX Licence identifier ARM: dts: meson8: update with SPDX Licence identifier ARM: dts: meson8-minix-neo-x8: update with SPDX Licence identifier ARM: dts: meson6: update with SPDX Licence identifier ARM: dts: meson6-atv1200: update with SPDX Licence identifier ARM: dts: meson: update with SPDX Licence identifier ARM: dts: meson8b: mxq: improve support for the TRONFY MXQ S805 ARM: dts: meson8m2: mxiii-plus: add the supply for the Mali GPU ARM: dts: meson8m2: mxiii-plus: rename the DCDC2 regulator ARM: dts: meson8b: add the canvas module ARM: dts: meson8m2: update the offset of the canvas module ARM: dts: meson8: add the canvas module Signed-off-by: Olof Johansson commit 19339e6a221455b1125bbc90f750daedd6828408 Merge: 97dd7871d147 3a4b44d5c032 Author: Olof Johansson Date: Tue Jun 25 04:37:18 2019 -0700 Merge tag 'davinci-for-v5.3/dt' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into arm/dt This pull request adds CPUFreq support for DA850 boards in device-tree boot using the generic CPUFREQ_DT driver. * tag 'davinci-for-v5.3/dt' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: davinci_all_defconfig: Enable CPUFREQ_DT ARM: dts: da850-evm: enable cpufreq ARM: dts: da850-lcdk: enable cpufreq ARM: dts: da850-lego-ev3: enable cpufreq ARM: dts: da850: add cpu node and operating points to DT Signed-off-by: Olof Johansson commit 97dd7871d147f9df8aa909062c94323064e15a82 Merge: 791c6fdb0ba5 6084110a0e9c Author: Olof Johansson Date: Tue Jun 25 04:35:02 2019 -0700 Merge tag 'aspeed-5.3-devicetree' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed into arm/dt ASPEED device tree updates for 5.3 We have various device tree updates from the OpenBMC project to enable bits and pieces in existing systems, notably updates to Google's Zaius. There are some AST2500 machines under development: * Lenovo Hr630 * IBM Swift * Facebook YAMP And some AST2400 machines that have been around but out of tree and have now joined the party: * YADRO VESNIN * Microsoft Olympus * tag 'aspeed-5.3-devicetree' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed: ARM: dts: aspeed: Enable video engine on romulus and wtherspoon ARM: dts: aspeed: Add Inspur fp5280g2 BMC machine ARM: dts: aspeed: Add YADRO VESNIN BMC ARM: dts: aspeed: Add Microsoft Olympus BMC ARM: dts: aspeed: Adding Lenovo Hr630 BMC ARM: dts: aspeed: Add Facebook YAMP BMC ARM: dts: aspeed: swift: Add pca9539 devices ARM: dts: aspeed: Add Swift BMC machine ARM: dts: aspeed: cmm: enable ehci host controllers ARM: dts: aspeed: zaius: fixed I2C bus numbers for pcie slots ARM: dts: aspeed: zaius: update 12V brick I2C address ARM: dts: aspeed: zaius: add Infineon and Intersil regulators ARM: dts: aspeed: quanta-q71: Enable p2a node ARM: dts: aspeed: Add aspeed-p2a-ctrl node ARM: dts: aspeed: Add Power9 and Power9 CFAM description ARM: dts: aspeed: Rename flash-controller nodes Signed-off-by: Olof Johansson commit 791c6fdb0ba582acaf0d55d683eb0440c82e093d Merge: 750ee7858f5a 489bacb29818 Author: Olof Johansson Date: Tue Jun 25 04:32:08 2019 -0700 Merge tag 'qcom-dts-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/dt Qualcomm Device Tree Changes for v5.3 * Add display support to MSM8974 * Add display, backlight, and touchscreen support to MSM8974 Hammerhead * Update coresight bindings for MSM8974 and APQ8064 * tag 'qcom-dts-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: ARM: dts: qcom: msm8974-hammerhead: add support for display ARM: dts: msm8974: add display support ARM: dts: qcom: msm8974-hammerhead: add support for backlight ARM: dts: qcom: msm8974-hammerhead: add touchscreen support ARM: dts: qcom-msm8974: Update coresight DT bindings ARM: dts: qcom-apq8064: Update coresight DT bindings Signed-off-by: Olof Johansson commit 750ee7858f5ae2894c0b12171fad3c8170c1e26c Merge: 0914acd87fa0 2410fd450c09 Author: Olof Johansson Date: Tue Jun 25 04:31:37 2019 -0700 Merge tag 'qcom-arm64-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/dt Qualcomm ARM64 Updates for v5.3 * Switch to use second gen PON on PM8998 * Add PSCI cupidle states for MSM8996, MSM8998,and SDM845 * Add MSM8996 UFS phy reset controller * Add propre cpu capacity scaling on MSM8996 * Fixups for APR domain, legacy clocks, and PSCI entry latency on MSM8996 * Enable SMMUs on MSM8996 * Add Dragonboard 845C * Add Q6V5, GPU, GMU, and AOSS QMP node on SDM845 * Fixup CPU topology on SDM845 * Change USB1 to be peripheral on SDM845 MTP * Add PCIe Phy, RC nodes, ANOC1 SMMU, and RPMPD node on MSM8998 * Update coresight bindings for MSM8916 * Update idle state names and entry-method on MSM8916 * Add PCIe, RPMPD, LPASS, Q6, TCSR, TuringCC, PSCI cpuidle states, and CDSP on QCS404 * Add reset-cells property to QCS404 GCC node * Fixup s3 max voltage, l3 min voltage, drive strength typo, and s3 supply definition on QCS404-evb * Fixup ADC outputs and VADC calibration on PMS405 * tag 'qcom-arm64-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (39 commits) arm64: dts: qcom: qcs404-evb: fix vdd_apc supply arm64: dts: qcom: pm8998: Use qcom,pm8998-pon binding for second gen pon arm64: dts: qcom: msm8996: Enable SMMUs arm64: dts: qcom: msm8996: Correct apr-domain property arm64: dts: qcom: Add Dragonboard 845c arm64: dts: qcom: qcs404-evb: Enable PCIe arm64: dts: qcom: qcs404: Add PCIe related nodes arm64: dts: qcom: msm8998: Add PCIe PHY and RC nodes arm64: dts: qcom: msm8998: Add ANOC1 SMMU node arm64: dts: qcom: msm8996: Stop using legacy clock names arm64: dts: msm8996: fix PSCI entry-latency-us arm64: dts: qcom: msm8998: Add PSCI cpuidle low power states arm64: dts: qcom: sdm845: Add Q6V5 MSS node arm64: dts: qcom: Add AOSS QMP node arm64: dts: qcom-qcs404: Add reset-cells to GCC node arm64: dts: qcom-msm8916: Update coresight DT bindings arm64: dts: qcom: msm8998: Add rpmpd node arm64: dts: qcom: qcs404: Add rpmpd node arm64: dts: qcom: qcs404: Move lpass and q6 into soc arm64: dts: qcom: qcs404: Fully describe the CDSP ... Signed-off-by: Olof Johansson commit 0914acd87fa089983f184785491d939a53f73e94 Merge: 80f7f92c16d5 06c3cba62b3b Author: Olof Johansson Date: Tue Jun 25 04:30:50 2019 -0700 Merge tag 'hisi-arm32-dt-for-5.3' of git://github.com/hisilicon/linux-hisi into arm/dt ARM: DT: Hisilicon ARM32 SoCs updates for v5.3 - Updated CoreSight funnel and replicator using new bindings to fix warning for the hip04. * tag 'hisi-arm32-dt-for-5.3' of git://github.com/hisilicon/linux-hisi: ARM: dts: hip04: Update coresight DT bindings Signed-off-by: Olof Johansson commit 80f7f92c16d591653c54ab487ec5e6157834b22f Merge: 98d70a5cd929 9500ff14c4cf Author: Olof Johansson Date: Tue Jun 25 04:30:13 2019 -0700 Merge tag 'hisi-arm64-dt-for-5.3' of git://github.com/hisilicon/linux-hisi into arm/dt ARM64: DT: Hisilicon SoCs DT updates for v5.3 * Hi3660 SoC and related boards: - Added CoreSight trace components * Hi6220 SoC and related boards: - Updated CoreSight funnel and replicator using new bindings to fix warning * tag 'hisi-arm64-dt-for-5.3' of git://github.com/hisilicon/linux-hisi: arm64: dts: hi3660: Add CoreSight support arm64: dts: hi6220: Update coresight DT bindings Signed-off-by: Olof Johansson commit e737f13b5077e5ced9c60f19cf9ed586b41826aa Author: Marcin Juszkiewicz Date: Thu Jun 20 12:17:06 2019 +0200 arm64 defconfig: enable LVM support W dniu 19.06.2019 o 16:21, Olof Johansson pisze: > On Mon, Jun 17, 2019 at 06:04:09PM +0200, Marcin Juszkiewicz wrote: >> Follow x86-64 defconfig on enabling basic LVM support. >> >> Signed-off-by: Marcin Juszkiewicz > > Do you need this to be =y? If you use LVM, you usually boot with a ramdisk that > will hold modules. Right. Forgot to change. From 63003d0047062949a1231f67e1efdcb96b54323a Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Mon, 27 May 2019 20:14:34 +0200 Subject: [PATCH 1/3] arm64 defconfig: enable LVM support Follow x86-64 defconfig on enabling basic LVM support. Signed-off-by: Marcin Juszkiewicz Signed-off-by: Olof Johansson arch/arm64/configs/defconfig | 5 +++++ 1 file changed, 5 insertions(+) commit 98d70a5cd929081e605b2983550a893d6540e955 Merge: 4ed7e4e57822 dfa84bb99285 Author: Olof Johansson Date: Tue Jun 25 04:15:53 2019 -0700 Merge tag 'arm-soc/for-5.3/devicetree-v2' of https://github.com/Broadcom/stblinux into arm/dt This pull request contain Broadcom ARM-based SoCs Device Tree changes for 5.3 please pull the following: - Lukas enables DMA support for the BCM2835 (Raspberry Pi) SPI controller - Florian fixes a number of dtc W=1 warnings in the Broadcom DTS files and provides a fix for devices failing to boot after the removal of skelton.dtsi (that commit has been submitted as a separate fix) * tag 'arm-soc/for-5.3/devicetree-v2' of https://github.com/Broadcom/stblinux: ARM: dts: BCM5301X: Fix most DTC W=1 warnings ARM: dts: NSP: Fix the bulk of W=1 DTC warnings ARM: dts: BCM63xx: Fix DTC W=1 warnings ARM: dts: BCM53573: Fix DTC W=1 warnings ARM: dts: bcm-mobile: Fix most DTC W=1 warnings ARM: dts: Cygnus: Fix most DTC W=1 warnings ARM: dts: Fix BCM7445 DTC warnings ARM: bcm283x: Enable DMA support for SPI controller ARM: dts: bcm: Add missing device_type = "memory" property Signed-off-by: Olof Johansson commit d22b85a1b97d12a4940ef9d778f6122546736f78 Author: Dmitry Osipenko Date: Mon Jun 24 00:08:32 2019 +0300 regulator: core: Expose some of core functions needed by couplers Expose some of internal functions that are required for implementation of customized regulator couplers. Signed-off-by: Dmitry Osipenko Signed-off-by: Mark Brown drivers/regulator/core.c | 58 ++++++++++++++++++--------------------- include/linux/regulator/coupler.h | 35 +++++++++++++++++++++++ 2 files changed, 62 insertions(+), 31 deletions(-) commit d8ca7d184b33af7913c244900df77c6cad6a5590 Author: Dmitry Osipenko Date: Mon Jun 24 00:08:31 2019 +0300 regulator: core: Introduce API for regulators coupling customization Right now regulator core supports only one type of regulators coupling, the "voltage max-spread" which keeps voltages of coupled regulators in a given range from each other. A more sophisticated coupling may be required in practice, one example is the NVIDIA Tegra SoCs which besides the max-spreading have other restrictions that must be adhered. Introduce API that allow platforms to provide their own customized coupling algorithms. Signed-off-by: Dmitry Osipenko Signed-off-by: Mark Brown drivers/regulator/core.c | 136 ++++++++++++++++++++++++++++++++------ drivers/regulator/of_regulator.c | 63 ++++++++++++------ include/linux/regulator/coupler.h | 62 +++++++++++++++++ include/linux/regulator/driver.h | 6 +- include/linux/regulator/machine.h | 2 +- 5 files changed, 225 insertions(+), 44 deletions(-) commit 24043d60ff50ac3b72644ddbdfb7fa2df93fd648 Author: Curtis Malainey Date: Mon Jun 24 13:52:39 2019 -0700 ASoC: rt5677: depop stereo dac Upon enabling the ASRC DAC we need a delay to avoid popping the speakers. Signed-off-by: Curtis Malainey Cc: Ross Zwisler Tested-by: Ross Zwisler Signed-off-by: Mark Brown sound/soc/codecs/rt5677.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2dcb79cde6129d948a237ef7b48a73a0c82f1e01 Author: Lorenzo Bianconi Date: Tue May 14 11:18:52 2019 +0200 mt76: mt7615: do not process rx packets if the device is not initialized Fix following crash that occurs when the driver is processing rx packets while the device is not initialized yet $ rmmod mt7615e [ 67.210261] mt7615e 0000:01:00.0: Message -239 (seq 2) timeout $ modprobe mt7615e [ 72.406937] bus=0x1, slot = 0x0, irq=0x16 [ 72.436590] CPU 0 Unable to handle kernel paging request at virtual address 00000004, epc == 8eec4240, ra == 8eec41e0 [ 72.450291] mt7615e 0000:01:00.0: Firmware is not ready for download [ 72.457724] Oops[#1]: [ 72.470494] mt7615e: probe of 0000:01:00.0 failed with error -5 [ 72.474829] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.14.114 #0 [ 72.498702] task: 805769e0 task.stack: 80564000 [ 72.507709] $ 0 : 00000000 00000001 00000000 00000001 [ 72.518106] $ 4 : 8f704dbc 00000000 00000000 8f7046c0 [ 72.528500] $ 8 : 00000024 8045e98c 81210008 11000000 [ 72.538895] $12 : 8fc09f60 00000008 00000019 00000033 [ 72.549289] $16 : 8f704d80 e00000ff 8f0c7800 3c182406 [ 72.559684] $20 : 00000006 8ee615a0 4e000108 00000000 [ 72.570078] $24 : 0000004c 8000cf94 [ 72.580474] $28 : 80564000 8fc09e38 00000001 8eec41e0 [ 72.590869] Hi : 00000001 [ 72.596582] Lo : 00000000 [ 72.602319] epc : 8eec4240 mt7615_mac_fill_rx+0xac/0x494 [mt7615e] [ 72.614953] ra : 8eec41e0 mt7615_mac_fill_rx+0x4c/0x494 [mt7615e] [ 72.627580] Status: 11008403 KERNEL EXL IE [ 72.635899] Cause : 40800008 (ExcCode 02) [ 72.643860] BadVA : 00000004 [ 72.649573] PrId : 0001992f (MIPS 1004Kc) [ 72.657704] Modules linked in: mt7615e pppoe ppp_async pppox ppp_generic nf_conntrack_ipv6 mt76x2e mt76x2_common mt76x02_lib mt7603e mt76 mac80211 iptable_nat ipt_REJECT ipt_MASQUERADE cfg80211 xt_time xt_tcpudp xt_state xt_nat xt_mu] [ 72.792717] Process swapper/0 (pid: 0, threadinfo=80564000, task=805769e0, tls=00000000) [ 72.808799] Stack : 8f0c7800 00000800 8f0c7800 8032b874 00000000 40000000 8f704d80 8ee615a0 [ 72.825428] 8dc88010 00000001 8ee615e0 8eec09b0 8dc88010 8032b914 8f3aee80 80567d20 [ 72.842055] 00000000 8ee615e0 40000000 8f0c7800 00000108 8eec9944 00000000 00000000 [ 72.858682] 80508f10 80510000 00000001 80567d20 8ee615a0 00000000 00000000 8ee61c00 [ 72.875308] 8ee61c40 00000040 80610000 80580000 00000000 8ee615dc 8ee61a68 00000001 [ 72.891936] ... [ 72.896793] Call Trace: [ 72.901649] [<8eec4240>] mt7615_mac_fill_rx+0xac/0x494 [mt7615e] [ 72.913602] [<8eec09b0>] mt7615_queue_rx_skb+0xe4/0x12c [mt7615e] [ 72.925734] [<8eec9944>] mt76_dma_cleanup+0x390/0x42c [mt76] [ 72.936988] Code: ae020018 8ea20004 24030001 <94420004> a602002a 8ea20004 90420000 14430003 a2020034 [ 72.956390] [ 72.959676] ---[ end trace f176967739edb19f ]--- Fixes: 04b8e65922f6 ("mt76: add mac80211 driver for MT7615 PCIe-based chipsets") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 3 +++ 1 file changed, 3 insertions(+) commit 4a8c99c73777afd2fe785a39ffd2dd44f7c21d27 Author: Lorenzo Bianconi Date: Mon May 13 12:23:29 2019 +0200 mt76: mt76x02: fix edcca file permission Use 0600 as edcca file permission in mt76x02 debugfs Fixes: 643749d4a82b ("mt76: mt76x02: disable ED/CCA by default") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt76x02_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 984d885437f10bc0785bec10f31678349b5b2659 Author: Lorenzo Bianconi Date: Mon May 13 12:19:35 2019 +0200 mt76: mt7603: add debugfs knob to enable/disable edcca Introduce a knob in mt7603 debugfs in order to enable/disable energy detection based on CCA thresholds Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau .../net/wireless/mediatek/mt76/mt7603/debugfs.c | 30 ++++++++++++++++++++++ drivers/net/wireless/mediatek/mt76/mt7603/init.c | 4 ++- drivers/net/wireless/mediatek/mt76/mt7603/main.c | 3 +-- drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h | 6 ++++- 4 files changed, 39 insertions(+), 4 deletions(-) commit 8aac454dbb51387a3429ab88993878193381a7cc Author: Lorenzo Bianconi Date: Sat May 11 17:30:10 2019 +0200 mt76: mt76x02: run mt76x02_edcca_init atomically in mt76_edcca_set Run mt76x02_edcca_init atomically in mt76_edcca_set since it runs concurrently with calibration work and mt76x2_set_channel. Moreover perform phy calibration atomically Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt76x02_debugfs.c | 4 ++++ drivers/net/wireless/mediatek/mt76/mt76x2/pci_phy.c | 6 ++++++ drivers/net/wireless/mediatek/mt76/mt76x2/usb_phy.c | 5 +++++ 3 files changed, 15 insertions(+) commit 6e4caaea99256632625fb4a3ec0557b6e5274e2d Author: Lorenzo Bianconi Date: Sat May 11 12:17:53 2019 +0200 mt76: mt76x2: move mutex_lock inside mt76x2_set_channel This is a preliminary patch to run mt76x02_edcca_init atomically Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau .../net/wireless/mediatek/mt76/mt76x2/pci_main.c | 16 +++++++++------- .../net/wireless/mediatek/mt76/mt76x2/usb_main.c | 22 ++++++++++++---------- 2 files changed, 21 insertions(+), 17 deletions(-) commit 842481434261e8fef7a9633f526eee4ed90db23e Author: Lorenzo Bianconi Date: Sat May 11 12:17:52 2019 +0200 mt76: mt76x2u: remove mt76x02_edcca_init in mt76x2u_set_channel Remove mt76x02_edcca_init in mt76x2u_set_channel since it is already run by mt76x2u_phy_channel_calibrate performing channel calibration Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt76x2/usb_main.c | 1 - 1 file changed, 1 deletion(-) commit a78f15471c068f594a3617596f1ba12f2bddbd6e Author: Lorenzo Bianconi Date: Sat May 11 12:17:51 2019 +0200 mt76: mt76x02: remove enable from mt76x02_edcca_init signature Remove enable parameter from mt76x02_edcca_init routine signature since it is always true Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt76x0/main.c | 2 +- drivers/net/wireless/mediatek/mt76/mt76x02_debugfs.c | 2 +- drivers/net/wireless/mediatek/mt76/mt76x02_dfs.c | 2 +- drivers/net/wireless/mediatek/mt76/mt76x02_mac.c | 4 ++-- drivers/net/wireless/mediatek/mt76/mt76x02_mac.h | 2 +- drivers/net/wireless/mediatek/mt76/mt76x2/pci_phy.c | 2 +- drivers/net/wireless/mediatek/mt76/mt76x2/usb_main.c | 2 +- drivers/net/wireless/mediatek/mt76/mt76x2/usb_phy.c | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) commit f9e5b885fab72258e7652aeea9faffb1ef118545 Author: Lorenzo Bianconi Date: Tue May 7 11:03:33 2019 +0200 mt76: mt7615: add static qualifier to mt7615_rx_poll_complete Make mt7615_rx_poll_complete static since it is used just in pci.c to initialize rx_poll_complete function pointer Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h | 1 - drivers/net/wireless/mediatek/mt76/mt7615/pci.c | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) commit 132191a8b8f4a2f038f71cce238b3ff8d90caba9 Author: Lorenzo Bianconi Date: Sun May 5 17:17:00 2019 +0200 mt76: mt7615: rearrange cleanup operations in mt7615_unregister_device Cleanup tx/rx napi before releasing pending idrs. Moreover unmap txwi_cache running mt76_free_device routine Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/init.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit c38cbba4ca3161a9e53030cb2e95117fd3dec702 Author: Lorenzo Bianconi Date: Sun May 5 02:53:32 2019 +0200 mt76: mt7603: stop mac80211 queues before setting the channel Suspend data transmission during channel switch Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7603/main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit b28248ec91955bb0c23532af912c5f8889838934 Author: Lorenzo Bianconi Date: Sat May 4 17:29:09 2019 +0200 mt7615: mcu: run __mt76_mcu_send_msg in mt7615_mcu_send_firmware Run __mt76_mcu_send_msg instead of __mt7615_mcu_msg_send and remove duplicated code. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit 5d15f2ea162f2d72d0673a7c4f147e9897370f2b Author: Lorenzo Bianconi Date: Sat May 4 17:29:08 2019 +0200 mt7615: mcu: init mcu_restart function pointer Use common function wrapper in mt7615_mcu_exit since the code is shared with m7603 driver Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit a3a2c2e79c13e6cc70934a6c88f954a9955b5ac0 Author: Lorenzo Bianconi Date: Sat May 4 17:29:07 2019 +0200 mt7615: initialize mt76_mcu_ops data structure Use __mt76_mcu_send_msg wrapper instead of mt7615_mcu_msg_send. This is a preliminary patch for mt7615-mt7603 mcu code unification Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 74 +++++++++++++------------ 1 file changed, 40 insertions(+), 34 deletions(-) commit 516c3e3805339fb189e4842df9081a85644ac1b8 Author: Lorenzo Bianconi Date: Sat May 4 17:29:06 2019 +0200 mt7615: mcu: use standard signature for mt7615_mcu_msg_send Use mt76 common signature for mt7615_mcu_msg_send. Move skb allocation in mt7615_mcu_msg_send and remove duplicated code. Remove __mt7615_mcu_set_wtbl and __mt7615_mcu_set_sta_rec since now are used just to send mcu msgs. This is a preliminary patch for mt7615-mt7603 mcu code unification Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 614 ++++++++++++------------ drivers/net/wireless/mediatek/mt76/mt7615/mcu.h | 19 +- 2 files changed, 337 insertions(+), 296 deletions(-) commit eb2024b08731f0d7e14206566dc30d4e57f361fc Author: Lorenzo Bianconi Date: Sat May 4 17:29:05 2019 +0200 mt7615: mcu: remove unused structure in mcu.h Remove following struct no longer used: - dev_info - bss_info - bss_info_tag_handler Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/mcu.h | 30 ------------------------- 1 file changed, 30 deletions(-) commit 1ca8089a55eeaec087d8d53452c91b1090aee4a7 Author: Lorenzo Bianconi Date: Thu May 9 09:54:00 2019 +0200 mt7615: mcu: do not use function pointers whenever possible Remove function pointers in mt7615_mcu_set_bss_info and run function directly. Moreover remove __mt7615_mcu_set_bss_info since it is run just by mt7615_mcu_set_bss_info and remove duplicated istructions Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 220 +++++++++++------------- 1 file changed, 105 insertions(+), 115 deletions(-) commit fddc827ffc50f654d132fb85c0aee766dc147600 Author: Lorenzo Bianconi Date: Sat May 4 17:29:03 2019 +0200 mt7615: mcu: unify __mt7615_mcu_set_dev_info and mt7615_mcu_set_dev_info Unify mt7615_mcu_set_dev_info and __mt7615_mcu_set_dev_info since the latter is run just by mt7615_mcu_set_dev_info Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 91 +++++++++------------- drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h | 4 +- 2 files changed, 38 insertions(+), 57 deletions(-) commit 893369b769c18ad14d57f731428d97a7c04dfec6 Author: Lorenzo Bianconi Date: Sat May 4 17:29:02 2019 +0200 mt7615: mcu: remove skb_ret from mt7615_mcu_msg_send Remove skb_ret parameter from mt7615_mcu_msg_send signature since it is actually used just by mt7615_mcu_patch_sem_ctrl. This is a prelimanry patch to use mt76 common mcu API Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 77 ++++++++----------------- 1 file changed, 24 insertions(+), 53 deletions(-) commit 33d9ed728eb03b02abeb69d23c1966260134bb94 Author: Lorenzo Bianconi Date: Sat May 4 17:29:01 2019 +0200 mt7615: remove dest from mt7615_mcu_msg_send signature Remove dest parameter from mt7615_mcu_msg_send/__mt7615_mcu_msg_send routine signature since it can is always set to MCU_S2D_H2N Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 56 ++++++++++--------------- 1 file changed, 22 insertions(+), 34 deletions(-) commit 27da3bfd31577f65bfd516fe2cb06b2c0824c0b2 Author: Lorenzo Bianconi Date: Sat May 4 17:29:00 2019 +0200 mt7615: remove query from mt7615_mcu_msg_send signature Remove query parameter from mt7615_mcu_msg_send routine signature since it can be obtained from cmd value Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 53 ++++++++++++------------- 1 file changed, 26 insertions(+), 27 deletions(-) commit b1722925d2def3c3d6fae015ac319bcbabd8bfd2 Author: Lorenzo Bianconi Date: Sat May 4 17:28:59 2019 +0200 mt7615: mcu: remove unused parameter in mt7615_mcu_del_wtbl Remove unused vif parameter in mt7615_mcu_del_wtbl signature Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/main.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) commit 598a44344f38a5972fd4d8695939ba8570e5462a Author: Lorenzo Bianconi Date: Sat May 4 17:28:58 2019 +0200 mt7615: mcu: unify mt7615_mcu_add_wtbl_bmc and mt7615_mcu_del_wtbl_bmc Remove duplicated code in mt7615_bss_info_changed Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/main.c | 15 ++++----------- drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 12 ++++++++---- drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h | 4 ++-- 3 files changed, 14 insertions(+), 17 deletions(-) commit d7228bcf7b4e36956b9489139c194bf3678d19c1 Author: Lorenzo Bianconi Date: Sat May 4 17:28:57 2019 +0200 mt7615: mcu: use proper msg size in mt7615_mcu_add_wtbl Use proper mcu message size in mt7615_mcu_add_wtbl and do not allocate a huge buffer. Moreover use stack memory instead of heap one Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 54 +++++++++++-------------- 1 file changed, 24 insertions(+), 30 deletions(-) commit 77eaa281c20e6227f4fdd73006e4ced113bd30b2 Author: Lorenzo Bianconi Date: Sat May 4 17:28:56 2019 +0200 mt7615: mcu: use proper msg size in mt7615_mcu_add_wtbl_bmc Use proper mcu message size in mt7615_mcu_add_wtbl_bmc and do not allocate a huge buffer. Moreover use stack memory instead of heap one Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 54 +++++++++++-------------- 1 file changed, 24 insertions(+), 30 deletions(-) commit b876457c6a40c109b5ad127805a4441f11e6e537 Author: Lorenzo Bianconi Date: Sat May 4 17:28:55 2019 +0200 mt7615: mcu: remove bss_info_convert_vif_type routine Remove bss_info_convert_vif_type routine since it is run just in mt7615_mcu_set_bss_info and the switch over vif->type is already there. Simplify mt7615_mcu_set_bss_info routine Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 73 +++++++++---------------- 1 file changed, 27 insertions(+), 46 deletions(-) commit 0467448d2eeaa6e58a95b18077eb4ae3877116b2 Author: Lorenzo Bianconi Date: Sat May 4 17:28:54 2019 +0200 mt7615: mcu: simplify __mt7615_mcu_set_sta_rec Do not loop over cmd payload in __mt7615_mcu_set_sta_rec since it is already done in before running __mt7615_mcu_set_sta_rec (e.g. mt7615_mcu_set_sta_rec) Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 51 ++++++++++--------------- 1 file changed, 21 insertions(+), 30 deletions(-) commit 8e309f7dc7e76fca1e7fa510e39618181f1f13b4 Author: Lorenzo Bianconi Date: Sat May 4 17:28:53 2019 +0200 mt7615: mcu: simplify __mt7615_mcu_set_wtbl Do not loop over cmd payload in __mt7615_mcu_set_wtbl since it is already done in before running __mt7615_mcu_set_wtbl (e.g. mt7615_mcu_set_wtbl_key) Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 62 +++++++++++-------------- 1 file changed, 26 insertions(+), 36 deletions(-) commit fd5f65c552f703b61caa9cd5842f88b897dcc44c Author: YueHaibing Date: Sat May 4 18:22:47 2019 +0800 mt76: mt7615: Make mt7615_irq_handler static Fix sparse warning: drivers/net/wireless/mediatek/mt76/mt7615/pci.c:37:13: warning: symbol 'mt7615_irq_handler' was not declared. Should it be static? Signed-off-by: YueHaibing Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9db1aec0c2d72a3b7b115ba56e8dbb5b46855333 Author: Dan Carpenter Date: Fri May 3 16:09:13 2019 +0300 mt76: mt7615: Use after free in mt7615_mcu_set_bcn() We dereference "skb" when we assign: req.pkt_len = cpu_to_le16(MT_TXD_SIZE + skb->len); ^^^^^^^^ So this patch just moves the dev_kfree_skb() down a bit to avoid the use after free. Fixes: 04b8e65922f6 ("mt76: add mac80211 driver for MT7615 PCIe-based chipsets") Signed-off-by: Dan Carpenter Acked-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b1571a0e77d8cef14227af293c6dda1464a57270 Author: Dan Carpenter Date: Fri May 3 15:54:36 2019 +0300 mt76: Fix a signedness bug in mt7615_add_interface() The problem is that "mvif->omac_idx" is a u8 so it can't be negative and the error handling won't work. The get_omac_idx() function returns -1 on error. Fixes: 04b8e65922f6 ("mt76: add mac80211 driver for MT7615 PCIe-based chipsets") Signed-off-by: Dan Carpenter Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 4875e34679ba259bb8fa6a3ac337d76c8b7283a9 Author: Lorenzo Bianconi Date: Wed May 1 16:06:23 2019 +0200 mt76: move netif_napi_del in mt76_dma_cleanup Move netif_napi_del in mt76_dma_cleanup routine since it is done by all drivers Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/dma.c | 1 + drivers/net/wireless/mediatek/mt76/mt7603/dma.c | 1 - drivers/net/wireless/mediatek/mt76/mt7615/dma.c | 1 - drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c | 1 - 4 files changed, 1 insertion(+), 3 deletions(-) commit 8357f0dcd895231ca1444df60e57a1a33605e282 Author: Lorenzo Bianconi Date: Wed May 1 16:06:22 2019 +0200 mt76: mt7615: use napi polling for tx cleanup This allows tx scheduling and tx cleanup to run concurrently Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7615/dma.c | 24 ++++++++++++++++++++++-- drivers/net/wireless/mediatek/mt76/mt7615/pci.c | 2 +- 2 files changed, 23 insertions(+), 3 deletions(-) commit 9e63f5e76b5638f51f50e7815914daf879af5b30 Author: Lorenzo Bianconi Date: Wed May 1 16:06:21 2019 +0200 mt76: mt7603: use napi polling for tx cleanup This allows tx scheduling and tx cleanup to run concurrently Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt7603/core.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7603/dma.c | 30 +++++++++++++++++++++--- drivers/net/wireless/mediatek/mt76/mt7603/mac.c | 4 +++- 3 files changed, 31 insertions(+), 5 deletions(-) commit 8402650aa708a3e4f35ded7bcfb47da516a2f6e8 Author: Lorenzo Bianconi Date: Wed May 1 16:06:20 2019 +0200 mt76: move tx_napi in mt76_dev Move tx_napi in mt76_dev data structure in order to implement concurrency between tx scheduling and tx cleanup in mt7603 and mt7615 drivers Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt76.h | 1 + drivers/net/wireless/mediatek/mt76/mt76x02.h | 1 - drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c | 19 ++++++++++--------- 3 files changed, 11 insertions(+), 10 deletions(-) commit c15b0f7cd0b9f35adfce838e6656d597f0733c05 Author: Lorenzo Bianconi Date: Wed May 1 15:44:25 2019 +0200 mt76: mt76x02: remove useless return in mt76x02_resync_beacon_timer Remove useless return statment in mt76x02_resync_beacon_timer routine Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau drivers/net/wireless/mediatek/mt76/mt76x02_beacon.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 1d333ef3d599026897fb11b4f89f9f8f30838139 Author: Nick Crews Date: Mon Jun 24 13:00:42 2019 -0600 platform/chrome: wilco_ec: Add circular buffer as event queue The current implementation of the event queue both wastes space using a doubly linked list and isn't super obvious in how it behaves. This converts the queue to an actual circular buffer. The size of the queue is a tunable module parameter. This also fixes a few other things: - A memory leak that occurred when the ACPI device was removed, but the events were not freed from the queue. - Now kfree() the oldest event from outside all locks. - Add newline to logging messages. - Add helper macros to calculate size of events. - Remove unneeded lock around a check for dev_data->exist in hangup_device(). - Remove an unneeded null event pointer check in enqueue_events(). - Correct some comments. Signed-off-by: Nick Crews Signed-off-by: Enric Balletbo i Serra drivers/platform/chrome/wilco_ec/event.c | 258 ++++++++++++++++++------------- 1 file changed, 149 insertions(+), 109 deletions(-) commit ec6516bfbaf72e7c81811162b6de96322e32a027 Author: Masahiro Yamada Date: Thu Jun 13 10:55:31 2019 +0900 pinctrl: remove unneeded #ifdef around declarations What is the point in surrounding the whole of declarations with ifdef like this? #ifdef CONFIG_FOO int foo(void); #endif If CONFIG_FOO is not defined, all callers of foo() will fail with implicit declaration errors since the top Makefile adds -Werror-implicit-function-declaration to KBUILD_CFLAGS. This breaks the build earlier when you are doing something wrong. That's it. Anyway, it will fail to link since the definition of foo() is not compiled. In summary, these ifdef are unneeded. Signed-off-by: Masahiro Yamada Signed-off-by: Linus Walleij include/linux/pinctrl/pinconf-generic.h | 20 ++++++-------------- include/linux/pinctrl/pinconf.h | 4 ---- include/linux/pinctrl/pinctrl.h | 4 ---- include/linux/pinctrl/pinmux.h | 4 ---- 4 files changed, 6 insertions(+), 26 deletions(-) commit d9c238c5a6aeee2706d5ace0b1aa005e6d1a482f Author: Anson Huang Date: Tue Jun 11 20:25:34 2019 +0800 pinctrl: freescale: Add i.MX8MN pinctrl driver support Add the pinctrl driver support for i.MX8MN. Signed-off-by: Anson Huang Acked-by: Dong Aisheng Signed-off-by: Linus Walleij drivers/pinctrl/freescale/Kconfig | 7 + drivers/pinctrl/freescale/Makefile | 1 + drivers/pinctrl/freescale/pinctrl-imx8mn.c | 348 +++++++++++++++++++++++++++++ 3 files changed, 356 insertions(+) commit 124ecd6658e7ec2f1f14cfa36be76ac0f88cc33e Author: Anson Huang Date: Tue Jun 11 20:25:33 2019 +0800 dt-bindings: imx: Add pinctrl binding doc for i.MX8MN Add binding doc for i.MX8MN pinctrl driver. Signed-off-by: Anson Huang Acked-by: Dong Aisheng Signed-off-by: Linus Walleij .../bindings/pinctrl/fsl,imx8mn-pinctrl.txt | 39 ++ arch/arm64/boot/dts/freescale/imx8mn-pinfunc.h | 646 +++++++++++++++++++++ 2 files changed, 685 insertions(+) commit 8049672bb17a53f2545fbeaa6cfbb48055f51cde Author: Nick Desaulniers Date: Mon Jun 24 10:58:50 2019 -0700 arm64: defconfig: enable CONFIG_RANDOMIZE_BASE For testing coverage and improved defense in depth, enable KASLR by default. Acked-by: Ard Biesheuvel Acked-by: Will Deacon Reviewed-by: Kees Cook Suggested-by: Arnd Bergmann Suggested-by: Olof Johansson Signed-off-by: Nick Desaulniers Signed-off-by: Catalin Marinas arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit faaa73bcec4179ac6ff4493e2e5b8c17001c8779 Author: Catalin Marinas Date: Tue Jun 25 09:32:11 2019 +0100 arm64: ARM64_MODULES_PLTS must depend on MODULES Otherwise, selecting it without MODULES leads to build failures. Fixes: 58557e486f89 ("arm64: Allow user selection of ARM64_MODULE_PLTS") Signed-off-by: Catalin Marinas arch/arm64/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 7457c0da024b181a9143988d740001f9bc98698d Author: Peter Zijlstra Date: Fri May 3 12:22:47 2019 +0200 x86/alternatives: Add int3_emulate_call() selftest Given that the entry_*.S changes for this functionality are somewhat tricky, make sure the paths are tested every boot, instead of on the rare occasion when we trip an INT3 while rewriting text. Requested-by: Andy Lutomirski Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Josh Poimboeuf Acked-by: Andy Lutomirski Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar arch/x86/kernel/alternative.c | 81 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 77 insertions(+), 4 deletions(-) commit faeedb0679bee39ebffc6d53111e86932dea189a Author: Peter Zijlstra Date: Wed May 8 09:40:54 2019 +0200 x86/stackframe/32: Allow int3_emulate_push() Now that x86_32 has an unconditional gap on the kernel stack frame, the int3_emulate_push() thing will work without further changes. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar arch/x86/include/asm/text-patching.h | 2 -- arch/x86/kernel/ftrace.c | 7 ------- 2 files changed, 9 deletions(-) commit 3c88c692c28746473791276f8b42d2c989d6cbe6 Author: Peter Zijlstra Date: Tue May 7 23:25:54 2019 +0200 x86/stackframe/32: Provide consistent pt_regs Currently pt_regs on x86_32 has an oddity in that kernel regs (!user_mode(regs)) are short two entries (esp/ss). This means that any code trying to use them (typically: regs->sp) needs to jump through some unfortunate hoops. Change the entry code to fix this up and create a full pt_regs frame. This then simplifies various trampolines in ftrace and kprobes, the stack unwinder, ptrace, kdump and kgdb. Much thanks to Josh for help with the cleanups! Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Josh Poimboeuf Acked-by: Masami Hiramatsu Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar arch/x86/entry/entry_32.S | 105 ++++++++++++++++++++++++++++++++++---- arch/x86/include/asm/kexec.h | 17 ------ arch/x86/include/asm/ptrace.h | 17 +----- arch/x86/include/asm/stacktrace.h | 2 +- arch/x86/kernel/crash.c | 8 --- arch/x86/kernel/ftrace_32.S | 75 +++++++++++++++------------ arch/x86/kernel/kgdb.c | 8 --- arch/x86/kernel/kprobes/common.h | 4 +- arch/x86/kernel/kprobes/core.c | 29 +++++------ arch/x86/kernel/kprobes/opt.c | 20 +++++--- arch/x86/kernel/process_32.c | 16 ++---- arch/x86/kernel/ptrace.c | 29 ----------- arch/x86/kernel/time.c | 3 +- arch/x86/kernel/unwind_frame.c | 32 ++---------- arch/x86/kernel/unwind_orc.c | 2 +- 15 files changed, 177 insertions(+), 190 deletions(-) commit ea1ed38dba64b64a245ab8ca1406269d17b99485 Author: Peter Zijlstra Date: Tue May 7 23:25:50 2019 +0200 x86/stackframe, x86/ftrace: Add pt_regs frame annotations When CONFIG_FRAME_POINTER, we should mark pt_regs frames. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar arch/x86/kernel/ftrace_32.S | 3 +++ arch/x86/kernel/ftrace_64.S | 3 +++ 2 files changed, 6 insertions(+) commit 4201311dae59781fb19c40adddda45bf3c562b63 Author: Peter Zijlstra Date: Tue May 7 23:25:46 2019 +0200 x86/stackframe, x86/kprobes: Fix frame pointer annotations The kprobe trampolines have a FRAME_POINTER annotation that makes no sense. It marks the frame in the middle of pt_regs, at the place of saving BP. Change it to mark the pt_regs frame as per the ENCODE_FRAME_POINTER from the respective entry_*.S. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Josh Poimboeuf Acked-by: Masami Hiramatsu Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar arch/x86/kernel/kprobes/common.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit a9b3c6998d4a7d53a787cf4d0fd4a4c11239e517 Author: Peter Zijlstra Date: Wed May 8 14:30:48 2019 +0200 x86/stackframe: Move ENCODE_FRAME_POINTER to asm/frame.h In preparation for wider use, move the ENCODE_FRAME_POINTER macros to a common header and provide inline asm versions. These macros are used to encode a pt_regs frame for the unwinder; see unwind_frame.c:decode_frame_pointer(). Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar arch/x86/entry/calling.h | 15 -------------- arch/x86/entry/entry_32.S | 16 --------------- arch/x86/include/asm/frame.h | 49 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+), 31 deletions(-) commit 5e1246ff2d3707992e3bf3eaa45551f7fab97983 Author: Peter Zijlstra Date: Tue May 7 23:25:54 2019 +0200 x86/entry/32: Clean up return from interrupt preemption path The code flow around the return from interrupt preemption point seems needlessly complicated. There is only one site jumping to resume_kernel, and none (outside of resume_kernel) jumping to restore_all_kernel. Inline resume_kernel in restore_all_kernel and avoid the CONFIG_PREEMPT dependent label. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar arch/x86/entry/entry_32.S | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) commit c21ac93288f008e1790c858a55567b6194465e57 Merge: 8dbec27a242c 4b972a01a7da Author: Ingo Molnar Date: Tue Jun 25 10:23:22 2019 +0200 Merge tag 'v5.2-rc6' into x86/asm, to refresh the branch Signed-off-by: Ingo Molnar commit 9156e545765e467e6268c4814cfa609ebb16237e Author: Kobe Wu Date: Mon Jun 24 16:35:48 2019 +0800 locking/lockdep: increase size of counters for lockdep statistics When system has been running for a long time, signed integer counters are not enough for some lockdep statistics. Using unsigned long counters can satisfy the requirement. Besides, most of lockdep statistics are unsigned. It is better to use unsigned int instead of int. Remove unused variables. - max_recursion_depth - nr_cyclic_check_recursions - nr_find_usage_forwards_recursions - nr_find_usage_backwards_recursions Signed-off-by: Kobe Wu Signed-off-by: Peter Zijlstra (Intel) Cc: Cc: Cc: Eason Lin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Will Deacon Link: https://lkml.kernel.org/r/1561365348-16050-1-git-send-email-kobe-cp.wu@mediatek.com Signed-off-by: Ingo Molnar kernel/locking/lockdep_internals.h | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) commit ebf8d82bbb32720878a3867b28e655950ccee992 Author: Michael Forney Date: Mon Jun 17 22:33:06 2019 -0700 locking/atomics: Use sed(1) instead of non-standard head(1) option POSIX says the -n option must be a positive decimal integer. Not all implementations of head(1) support negative numbers meaning offset from the end of the file. Instead, the sed expression '$d' has the same effect of removing the last line of the file. Signed-off-by: Michael Forney Signed-off-by: Peter Zijlstra (Intel) Acked-by: Will Deacon Cc: Boqun Feng Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20190618053306.730-1-mforney@mforney.org Signed-off-by: Ingo Molnar scripts/atomic/check-atomics.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 886532aee3cd42d95196601ed16d7c3d4679e9e5 Author: Arnd Bergmann Date: Mon Jun 17 14:47:05 2019 +0200 locking/lockdep: Move mark_lock() inside CONFIG_TRACE_IRQFLAGS && CONFIG_PROVE_LOCKING The last cleanup patch triggered another issue, as now another function should be moved into the same section: kernel/locking/lockdep.c:3580:12: error: 'mark_lock' defined but not used [-Werror=unused-function] static int mark_lock(struct task_struct *curr, struct held_lock *this, Move mark_lock() into the same #ifdef section as its only caller, and remove the now-unused mark_lock_irq() stub helper. Signed-off-by: Arnd Bergmann Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Bart Van Assche Cc: Frederic Weisbecker Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Waiman Long Cc: Will Deacon Cc: Yuyang Du Fixes: 0d2cc3b34532 ("locking/lockdep: Move valid_state() inside CONFIG_TRACE_IRQFLAGS && CONFIG_PROVE_LOCKING") Link: https://lkml.kernel.org/r/20190617124718.1232976-1-arnd@arndb.de Signed-off-by: Ingo Molnar kernel/locking/lockdep.c | 73 ++++++++++++++++++++++-------------------------- 1 file changed, 34 insertions(+), 39 deletions(-) commit 87b61864d7ab2aec5c212ff18950d4972f0dfb4e Author: Masahiro Yamada Date: Tue Jun 25 16:33:11 2019 +0900 x86/build: Remove redundant 'clean-files += capflags.c' All the files added to 'targets' are cleaned. Adding the same file to both 'targets' and 'clean-files' is redundant. Signed-off-by: Masahiro Yamada Signed-off-by: Thomas Gleixner Cc: "H. Peter Anvin" Cc: Borislav Petkov Link: https://lkml.kernel.org/r/20190625073311.18303-1-yamada.masahiro@socionext.com arch/x86/kernel/cpu/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit bc53d3d777f81385c1bb08b07bd1c06450ecc2c1 Author: Masahiro Yamada Date: Tue Jun 25 16:26:22 2019 +0900 x86/build: Add 'set -e' to mkcapflags.sh to delete broken capflags.c Without 'set -e', shell scripts continue running even after any error occurs. The missed 'set -e' is a typical bug in shell scripting. For example, when a disk space shortage occurs while this script is running, it actually ends up with generating a truncated capflags.c. Yet, mkcapflags.sh continues running and exits with 0. So, the build system assumes it has succeeded. It will not be re-generated in the next invocation of Make since its timestamp is newer than that of any of the source files. Add 'set -e' so that any error in this script is caught and propagated to the build system. Since 9c2af1c7377a ("kbuild: add .DELETE_ON_ERROR special target"), make automatically deletes the target on any failure. So, the broken capflags.c will be deleted automatically. Signed-off-by: Masahiro Yamada Signed-off-by: Thomas Gleixner Cc: "H. Peter Anvin" Cc: Borislav Petkov Link: https://lkml.kernel.org/r/20190625072622.17679-1-yamada.masahiro@socionext.com arch/x86/kernel/cpu/mkcapflags.sh | 2 ++ 1 file changed, 2 insertions(+) commit 2ef085bd110c5723ca08a522608ac3468dc304bd Author: Reinette Chatre Date: Mon Jun 24 13:34:27 2019 -0700 x86/resctrl: Cleanup cbm_ensure_valid() A recent fix to the cbm_ensure_valid() function left some coding style issues that are now addressed: - Return a value instead of using a function parameter as input and output - Use if (!val) instead of if (val == 0) - Follow reverse fir tree ordering of variable declarations Suggested-by: Borislav Petkov Signed-off-by: Reinette Chatre Signed-off-by: Thomas Gleixner Cc: fenghua.yu@intel.com Cc: tony.luck@intel.com Cc: hpa@zytor.com Link: https://lkml.kernel.org/r/15ba03856f1d944468ee6f44e3fd7aa548293ede.1561408280.git.reinette.chatre@intel.com arch/x86/kernel/cpu/resctrl/rdtgroup.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 4fedcde7026835a05b44aab388d4bb95f3226286 Merge: 515f0453752e ea136a112d89 Author: Thomas Gleixner Date: Tue Jun 25 09:24:35 2019 +0200 Merge branch 'x86/urgent' into x86/cache Pick up pending upstream fixes to meet dependencies commit bf10c97adbd0dc8fa65c35d5b0c0dc281a68ac8e Author: YueHaibing Date: Tue Jun 25 11:45:48 2019 +0800 x86/jump_label: Make tp_vec_nr static Fix sparse warning: arch/x86/kernel/jump_label.c:106:5: warning: symbol 'tp_vec_nr' was not declared. Should it be static? It's only used in jump_label.c, so make it static. Fixes: ba54f0c3f7c4 ("x86/jump_label: Batch jump label updates") Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Thomas Gleixner Cc: Cc: Cc: Cc: Cc: Link: https://lkml.kernel.org/r/20190625034548.26392-1-yuehaibing@huawei.com arch/x86/kernel/jump_label.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d48e0cd8fcaf314175a15d3076d7a1e71bd4e628 Author: Jason A. Donenfeld Date: Mon Jun 24 11:15:39 2019 +0200 timekeeping: Boot should be boottime for coarse ns accessor Somewhere in all the patchsets before, this cleanup got lost. Signed-off-by: Jason A. Donenfeld Signed-off-by: Thomas Gleixner Cc: Arnd Bergmann Link: https://lkml.kernel.org/r/20190624091539.13512-1-Jason@zx2c4.com Documentation/core-api/timekeeping.rst | 2 +- include/linux/timekeeping.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 4b85faed211ccfbcc7f3adf1cd62f0b00d1a172b Author: Christoph Hellwig Date: Fri Jun 14 16:06:10 2019 +0200 dma-mapping: add a dma_alloc_need_uncached helper Check if we need to allocate uncached memory for a device given the allocation flags. Switch over the uncached segment check to this helper to deal with architectures that do not support the dma_cache_sync operation and thus should not returned cacheable memory for DMA_ATTR_NON_CONSISTENT allocations. Signed-off-by: Christoph Hellwig include/linux/dma-noncoherent.h | 14 ++++++++++++++ kernel/dma/direct.c | 4 ++-- 2 files changed, 16 insertions(+), 2 deletions(-) commit 961729bfc73e698be19305834805592227bd09e3 Author: Christoph Hellwig Date: Mon Jun 3 12:54:13 2019 +0200 openrisc: remove the partial DMA_ATTR_NON_CONSISTENT support The openrisc DMA code supports DMA_ATTR_NON_CONSISTENT allocations, but does not provide a cache_sync operation. This means any user of it will never be able to actually transfer cache ownership and thus cause coherency bugs. Signed-off-by: Christoph Hellwig Acked-by: Stafford Horne arch/openrisc/kernel/dma.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) commit 80e61fcd23946cb222f780a49ab2eeb7ef1d3749 Author: Christoph Hellwig Date: Mon Jun 3 12:52:47 2019 +0200 arc: remove the partial DMA_ATTR_NON_CONSISTENT support The arc DMA code supports DMA_ATTR_NON_CONSISTENT allocations, but does not provide a cache_sync operation. This means any user of it will never be able to actually transfer cache ownership and thus cause coherency bugs. Signed-off-by: Christoph Hellwig Reviewed-by: Evgeniy Paltsev Tested-by: Evgeniy Paltsev arch/arc/mm/dma.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) commit 34ab03160eda51839be6dd5a939680963266707c Author: Christoph Hellwig Date: Mon Jun 3 12:48:57 2019 +0200 arm-nommu: remove the partial DMA_ATTR_NON_CONSISTENT support The arm-nommu DMA code supports DMA_ATTR_NON_CONSISTENT allocations, but does not provide a cache_sync operation. This means any user of it will never be able to actually transfer cache ownership and thus cause coherency bugs. Signed-off-by: Christoph Hellwig Reviewed-by: Vladimir Murzin arch/arm/mm/dma-mapping-nommu.c | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) commit ab746573c4055ae1fa226715502fb9bb9be29a79 Author: Christoph Hellwig Date: Mon Apr 29 09:04:53 2019 -0500 ARM: dma-mapping: allow larger DMA mask than supported Since the Linux 5.1 merge window we allow drivers to just set the largest DMA mask they support instead of falling back to smaller ones. But I forgot to remove a check that prohibits this behavior in the arm DMA code, as it is rather hidden. There is not reason for this check as the code will do the right thing for a "too large" DMA mask, so just remove it. Fixes: 9eb9e96e97b3 ("Documentation/DMA-API-HOWTO: update dma_mask sections") Signed-off-by: Christoph Hellwig arch/arm/mm/dma-mapping.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) commit 4a54d16f615f41489b2ecbc940f6eb2618ddafd6 Author: Christoph Hellwig Date: Mon Apr 29 09:16:42 2019 -0500 dma-mapping: truncate dma masks to what dma_addr_t can hold The dma masks in struct device are always 64-bits wide. But for builds using a 32-bit dma_addr_t we need to ensure we don't store an unsupportable value. Before Linux 5.0 this was handled at least by the ARM dma mapping code by never allowing to set a larger dma_mask, but these days we allow the driver to just set the largest supported value and never fall back to a smaller one. Ensure this always works by truncating the value. Fixes: 9eb9e96e97b3 ("Documentation/DMA-API-HOWTO: update dma_mask sections") Signed-off-by: Christoph Hellwig kernel/dma/mapping.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit e5db0ad7563c38b7b329504836c9a64ae025a47a Author: Ard Biesheuvel Date: Mon Jun 17 10:43:38 2019 +0200 airo: switch to skcipher interface The AIRO driver applies a ctr(aes) on a buffer of considerable size (2400 bytes), and instead of invoking the crypto API to handle this in its entirety, it open codes the counter manipulation and invokes the AES block cipher directly. Let's fix this, by switching to the sync skcipher API instead. Signed-off-by: Ard Biesheuvel Signed-off-by: Kalle Valo drivers/net/wireless/cisco/Kconfig | 2 ++ drivers/net/wireless/cisco/airo.c | 57 ++++++++++++++++++-------------------- 2 files changed, 29 insertions(+), 30 deletions(-) commit 0f47aeeada2a1fe296258eab9a08ced258009481 Author: Stanislaw Gruszka Date: Sat Jun 15 12:01:00 2019 +0200 rt2800: do not enable watchdog by default Make watchdog disabled by default and add module parameter to enable it. User will have to create file in /etc/modprobe.d/ with options rt2800lib watchdog=1 to enable the watchdog or load "rt2800lib watchdog=1" module manually before loading rt2800{soc,pci,usb} module. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 12 ++++++++++-- drivers/net/wireless/ralink/rt2x00/rt2x00.h | 1 + drivers/net/wireless/ralink/rt2x00/rt2x00link.c | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) commit e403fa31ed71e87de8e5991e23406b8377c9c894 Author: Stanislaw Gruszka Date: Sat Jun 15 12:00:59 2019 +0200 rt2x00: add restart hw Add ieee80211_restart_hw() to watchdog and debugfs file for testing if restart works as expected. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 4 +++ drivers/net/wireless/ralink/rt2x00/rt2x00.h | 7 +++++ drivers/net/wireless/ralink/rt2x00/rt2x00debug.c | 35 ++++++++++++++++++++++++ drivers/net/wireless/ralink/rt2x00/rt2x00dev.c | 10 +++++-- 4 files changed, 54 insertions(+), 2 deletions(-) commit 710e6cc1595e25378c4b9977f7a8b4ad4a72a109 Author: Stanislaw Gruszka Date: Sat Jun 15 12:00:58 2019 +0200 rt2800: do not nullify initialization vector data If we restart hw we should keep existing IV (initialization vector) otherwise HW encryption will be broken after restart. Also fix some coding style issues on the way. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 09db3b000619b38d504e1fff66efed33dfacb6c0 Author: Stanislaw Gruszka Date: Sat Jun 15 12:00:57 2019 +0200 rt2800: add pre_reset_hw callback Add routine to cleanup interfaces data before hw reset as ieee80211_restart_hw() will do setup interfaces again. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 19 +++++++++++++++++++ drivers/net/wireless/ralink/rt2x00/rt2800lib.h | 1 + drivers/net/wireless/ralink/rt2x00/rt2800pci.c | 1 + drivers/net/wireless/ralink/rt2x00/rt2800soc.c | 1 + drivers/net/wireless/ralink/rt2x00/rt2800usb.c | 1 + drivers/net/wireless/ralink/rt2x00/rt2x00.h | 1 + 6 files changed, 24 insertions(+) commit 759c5b599cf4ddb3b56e66d459b1bf0fe2724fb8 Author: Stanislaw Gruszka Date: Sat Jun 15 12:00:56 2019 +0200 rt2800: initial watchdog implementation Add watchdog for rt2800 devices. For now it only detect hung and print error. [Note: I verified that printing messages from process context is fine on MT7620 (WT3020) platform that have problem when printk is called from interrupt context]. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 56 ++++++++++++++++++++++++ drivers/net/wireless/ralink/rt2x00/rt2800lib.h | 2 + drivers/net/wireless/ralink/rt2x00/rt2800pci.c | 1 + drivers/net/wireless/ralink/rt2x00/rt2800soc.c | 1 + drivers/net/wireless/ralink/rt2x00/rt2800usb.c | 1 + drivers/net/wireless/ralink/rt2x00/rt2x00queue.h | 6 +++ 6 files changed, 67 insertions(+) commit 2034afe4db4a2a4f22541d7f7b426e38d2093d38 Author: Stanislaw Gruszka Date: Sat Jun 15 12:00:55 2019 +0200 rt2800: add helpers for reading dma done index For mmio we do not properlly trace dma done Q_INDEX_DMA_DONE index for TX queues. That would require implementing INT_SOURCE_CSR_*_DMA_DONE interrupts, what is rather not worth to do due to adding extra CPU load (small but still somewhat not necessary otherwise). We can just read TX DMA done indexes from registers directly. What will be used by watchdog. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2800lib.h | 8 +++++++ drivers/net/wireless/ralink/rt2x00/rt2800mmio.c | 31 +++++++++++++++++++++++++ drivers/net/wireless/ralink/rt2x00/rt2800mmio.h | 2 ++ drivers/net/wireless/ralink/rt2x00/rt2800pci.c | 1 + drivers/net/wireless/ralink/rt2x00/rt2800soc.c | 1 + drivers/net/wireless/ralink/rt2x00/rt2800usb.c | 9 +++++++ 6 files changed, 52 insertions(+) commit 9f3e3323e9966d9f21bea0c81b1acb36c0e15cec Author: Stanislaw Gruszka Date: Sat Jun 15 12:00:54 2019 +0200 rt2x00: allow to specify watchdog interval Allow subdriver to change watchdog interval by intialize link->watchdog_interval value before rt2x00link_register(). Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2x00.h | 1 + drivers/net/wireless/ralink/rt2x00/rt2x00link.c | 13 +++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) commit 12e66ffbd534b1b622e7b907511a39cf572a32e3 Author: Christian Lamparter Date: Sat Jun 15 12:00:09 2019 +0200 p54: remove dead branch in op_conf_tx callback This patch removes the error branch for (queue > dev->queues). It is no longer needed anymore as the "queue" value is validated by cfg80211's parse_txq_params() before the driver code gets called. Signed-off-by: Christian Lamparter Signed-off-by: Kalle Valo drivers/net/wireless/intersil/p54/main.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 4a36de3996c7c9623a0b1835a360e88e0df20527 Author: Tzu-En Huang Date: Fri Jun 14 15:24:15 2019 +0800 rtw88: fix typo rtw_writ16_set rtw_writ16_set should be rtw_write16_set Signed-off-by: Tzu-En Huang Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtw88/hci.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e9c87a3b744b73a34025b91871fe133986874b2d Author: Yan-Hsuan Chuang Date: Fri Jun 14 15:24:14 2019 +0800 rtw88: rsvd page should go though management queue The hardware default uses management queue to transmit frames that are downloaded into reserved page, so we need to clearly assign the frames to use qsel in TX_DESC_QSEL_MGMT to avoid using wrong queue. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtw88/tx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a11cddd42b67d9577299580ee42bfc06923626c1 Author: Yan-Hsuan Chuang Date: Fri Jun 14 15:24:13 2019 +0800 rtw88: restore DACK results to save time DACK is done right after the hardware has been turned on, which means it will be done every time we leave the IDLE state. But it takes ~2 seconds to finish DACK. We can back up the results and restore them. And it only takes a few milliseconds to restore the results to the hardware, saving a lot of time. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtw88/main.h | 8 + drivers/net/wireless/realtek/rtw88/rtw8822c.c | 351 +++++++++++++++++++++++++- drivers/net/wireless/realtek/rtw88/rtw8822c.h | 8 + 3 files changed, 355 insertions(+), 12 deletions(-) commit d41673b941f2d3fdda62930f0e3eabb3aa0ccb2b Author: Yan-Hsuan Chuang Date: Fri Jun 14 15:24:12 2019 +0800 rtw88: power on again if it was already on We could fail to power on because it was already on. If the return value is -EALREADY, power off and then power on again to turn on the hardware as expected. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtw88/mac.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit e1cc056c92f9ee64e7031c614fe85654c3b72dbe Author: Yan-Hsuan Chuang Date: Fri Jun 14 15:24:11 2019 +0800 rtw88: 8822c: use more accurate ofdm fa counting 8822c used to count OFDM FA count by subtracting tx count from FA count. But it need to substract more counters to be accurate. However, we can count it by adding up all of the FA counters we want. And it is simpler to add than list all of the components to substract. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtw88/rtw8822c.c | 25 +++++++++++++++++++++---- drivers/net/wireless/realtek/rtw88/rtw8822c.h | 5 +++++ 2 files changed, 26 insertions(+), 4 deletions(-) commit e027446667b5e848c5dc8f34b102173bd06e5739 Author: Yan-Hsuan Chuang Date: Fri Jun 14 15:24:10 2019 +0800 rtw88: 8822c: disable rx clock gating before counter reset Driver Could fail to reset counter if rx clock gating is not disabled. So we need to disable rx clock gating before resetting counters. Otherwise counters may increase unexpected. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtw88/rtw8822c.c | 4 ++++ drivers/net/wireless/realtek/rtw88/rtw8822c.h | 2 ++ 2 files changed, 6 insertions(+) commit f859e71f9615d7706bbd9ebd089dbc5bc303b483 Author: Chien-Hsun Liao Date: Fri Jun 14 15:24:09 2019 +0800 rtw88: 8822c: update channel and bandwidth BB setting In 2G channels, the cck source and rxagc should be set to different values based on different bandwidth to increase the performance of rx sensitivity. To improve rx throughput performance, the values of sbd subtune and pt_opt should be changed in different bandwidth. Signed-off-by: Chien-Hsun Liao Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtw88/rtw8822c.c | 56 +++++++++++++++++++++++---- drivers/net/wireless/realtek/rtw88/rtw8822c.h | 8 ++++ 2 files changed, 56 insertions(+), 8 deletions(-) commit 818d46e7715ef33f82e5aa2f99627fd3c6cfe0af Author: Chien-Hsun Liao Date: Fri Jun 14 15:24:08 2019 +0800 rtw88: 8822c: add rf write protection when switching channel Collision of writing rf registers could occur if the driver writes rf registers by direct write while the hardware is writing other rf registers by pi write simultaneously. Hardware pi write can be triggered by rf calibrations sometimes, so the driver can not always write rf registers by direct write protection. Direct write protection can make sure that there is no hardware pi write during the direct write. According to some experiments, if we add direct write protection when switching channel, the performance of rf calibration will not be affected. Signed-off-by: Chien-Hsun Liao Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtw88/phy.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 6fabdc4a34d0d508c1c2d18cebf7bbc23706b3f5 Author: Chin-Yen Lee Date: Fri Jun 14 15:24:07 2019 +0800 rtw88: add beacon function setting Add beacon function setting routines for each hardware port. If beacon function is not enabled, the hardware is not able to synchronize with AP's beacon and can miss the beacons under some scenarios such as PS mode. For AP and Adhoc modes that require to send beacons, do not update the TSF, otherwise the beacon interval may be affected. Signed-off-by: Chin-Yen Lee Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtw88/mac80211.c | 13 +++++++++++++ drivers/net/wireless/realtek/rtw88/main.c | 5 +++++ drivers/net/wireless/realtek/rtw88/main.h | 3 +++ 3 files changed, 21 insertions(+) commit 44cc4c63a87720f975562d48eb8f5e8a176fc934 Author: Yan-Hsuan Chuang Date: Fri Jun 14 15:24:06 2019 +0800 rtw88: add support for random mac scan When driver uses random mac address to scan, the unicast probe response will not be received because the addr1 is not matched. Configure port address by requested mac address to receive probe response from AP. To support random mac scan, we need to configure the mac address during scan period to receive unicast prop_resp. After scan is completed, configure the mac address back to the original one that the port used. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtw88/mac80211.c | 19 +++++++++++++++++++ drivers/net/wireless/realtek/rtw88/main.c | 2 ++ 2 files changed, 21 insertions(+) commit e6fec313fa3fe5696dbb40ec25aece22bd21a092 Author: Yan-Hsuan Chuang Date: Fri Jun 14 15:24:05 2019 +0800 rtw88: add fast xmit support With dynamic power save support, rtw88 is able to support fast tx path, claim it to mac80211. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtw88/main.c | 1 + 1 file changed, 1 insertion(+) commit ffb92649f4d93a83de8977f8806cda64204cc465 Author: Greg Kroah-Hartman Date: Wed Jun 12 16:26:55 2019 +0200 iwlegacy: 4965: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. This driver was saving the debugfs file away to be removed at a later time. However, the 80211 core would delete the whole directory that the debugfs files are created in, after it asks the driver to do the deletion, so just rely on the 80211 core to do all of the cleanup for us, making us not need to keep a pointer to the dentries around at all. This cleans up the structure of the driver data a bit and makes the code a tiny bit smaller. Cc: Stanislaw Gruszka Cc: Kalle Valo Cc: "David S. Miller" Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Kalle Valo drivers/net/wireless/intel/iwlegacy/4965-rs.c | 31 +++++++-------------------- drivers/net/wireless/intel/iwlegacy/common.h | 4 ---- 2 files changed, 8 insertions(+), 27 deletions(-) commit f503c769534353e7eba5b5ff6b1b6cbce39efc2b Author: Greg Kroah-Hartman Date: Wed Jun 12 16:26:54 2019 +0200 iwlegacy: 3945: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. This driver was saving the debugfs file away to be removed at a later time. However, the 80211 core would delete the whole directory that the debugfs files are created in, after it asks the driver to do the deletion, so just rely on the 80211 core to do all of the cleanup for us, making us not need to keep a pointer to the dentries around at all. This cleans up the structure of the driver data a bit and makes the code a tiny bit smaller. Cc: Stanislaw Gruszka Cc: Kalle Valo Cc: "David S. Miller" Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Kalle Valo drivers/net/wireless/intel/iwlegacy/3945-rs.c | 14 ++------------ drivers/net/wireless/intel/iwlegacy/3945.h | 3 --- 2 files changed, 2 insertions(+), 15 deletions(-) commit e73e43246da6adfe0efef93bfa73e3cc53d7f615 Author: Michael Büsch Date: Mon Jun 10 20:49:27 2019 +0200 ssb/gpio: Remove unnecessary WARN_ON from driver_gpio The WARN_ON triggers on older BCM4401-B0 100Base-TX ethernet controllers. The warning serves no purpose. So let's just remove it. Reported-by: H Buus Signed-off-by: Michael Büsch Signed-off-by: Kalle Valo drivers/ssb/driver_gpio.c | 6 ------ 1 file changed, 6 deletions(-) commit 25a986e426b0958c2f3e2431e168f9d3b7b01062 Author: Colin Ian King Date: Sat Jun 8 11:58:00 2019 +0100 rtlwifi: rtl8188ee: remove redundant assignment to rtstatus Variable rtstatus is being initialized with a value that is never read as rtstatus is being re-assigned a little later on. The assignment is redundant and hence can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9a1ace64ca3b713e1029fed83dc22d8740b20aba Author: Gustavo A. R. Silva Date: Fri Jun 7 14:17:45 2019 -0500 qtnfmac: Use struct_size() in kzalloc() One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct ieee80211_regdomain { ... struct ieee80211_reg_rule reg_rules[]; }; instance = kzalloc(sizeof(*mac->rd) + sizeof(struct ieee80211_reg_rule) * count, GFP_KERNEL); Instead of leaving these open-coded and prone to type mistakes, we can now use the new struct_size() helper: instance = kzalloc(struct_size(instance, reg_rules, count), GFP_KERNEL); This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Reviewed-by: Sergey Matyukevich Signed-off-by: Kalle Valo drivers/net/wireless/quantenna/qtnfmac/commands.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 23377c200b2eb48a60d0f228b2a2e75ed6ee6060 Author: Lorenzo Bianconi Date: Fri Jun 7 13:48:10 2019 +0200 mt7601u: fix possible memory leak when the device is disconnected When the device is disconnected while passing traffic it is possible to receive out of order urbs causing a memory leak since the skb linked to the current tx urb is not removed. Fix the issue deallocating the skb cleaning up the tx ring. Moreover this patch fixes the following kernel warning [ 57.480771] usb 1-1: USB disconnect, device number 2 [ 57.483451] ------------[ cut here ]------------ [ 57.483462] TX urb mismatch [ 57.483481] WARNING: CPU: 1 PID: 32 at drivers/net/wireless/mediatek/mt7601u/dma.c:245 mt7601u_complete_tx+0x165/00 [ 57.483483] Modules linked in: [ 57.483496] CPU: 1 PID: 32 Comm: kworker/1:1 Not tainted 5.2.0-rc1+ #72 [ 57.483498] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.12.0-2.fc30 04/01/2014 [ 57.483502] Workqueue: usb_hub_wq hub_event [ 57.483507] RIP: 0010:mt7601u_complete_tx+0x165/0x1e0 [ 57.483510] Code: 8b b5 10 04 00 00 8b 8d 14 04 00 00 eb 8b 80 3d b1 cb e1 00 00 75 9e 48 c7 c7 a4 ea 05 82 c6 05 f [ 57.483513] RSP: 0000:ffffc900000a0d28 EFLAGS: 00010092 [ 57.483516] RAX: 000000000000000f RBX: ffff88802c0a62c0 RCX: ffffc900000a0c2c [ 57.483518] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff810a8371 [ 57.483520] RBP: ffff88803ced6858 R08: 0000000000000000 R09: 0000000000000001 [ 57.483540] R10: 0000000000000002 R11: 0000000000000000 R12: 0000000000000046 [ 57.483542] R13: ffff88802c0a6c88 R14: ffff88803baab540 R15: ffff88803a0cc078 [ 57.483548] FS: 0000000000000000(0000) GS:ffff88803eb00000(0000) knlGS:0000000000000000 [ 57.483550] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 57.483552] CR2: 000055e7f6780100 CR3: 0000000028c86000 CR4: 00000000000006a0 [ 57.483554] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 57.483556] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 57.483559] Call Trace: [ 57.483561] [ 57.483565] __usb_hcd_giveback_urb+0x77/0xe0 [ 57.483570] xhci_giveback_urb_in_irq.isra.0+0x8b/0x140 [ 57.483574] handle_cmd_completion+0xf5b/0x12c0 [ 57.483577] xhci_irq+0x1f6/0x1810 [ 57.483581] ? lockdep_hardirqs_on+0x9e/0x180 [ 57.483584] ? _raw_spin_unlock_irq+0x24/0x30 [ 57.483588] __handle_irq_event_percpu+0x3a/0x260 [ 57.483592] handle_irq_event_percpu+0x1c/0x60 [ 57.483595] handle_irq_event+0x2f/0x4c [ 57.483599] handle_edge_irq+0x7e/0x1a0 [ 57.483603] handle_irq+0x17/0x20 [ 57.483607] do_IRQ+0x54/0x110 [ 57.483610] common_interrupt+0xf/0xf [ 57.483612] Acked-by: Jakub Kicinski Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo drivers/net/wireless/mediatek/mt7601u/dma.c | 21 ++++++++++++++++----- drivers/net/wireless/mediatek/mt7601u/tx.c | 4 ++-- 2 files changed, 18 insertions(+), 7 deletions(-) commit 4079e8ccabc3b6d1b503f2376123cb515d14921f Author: Lorenzo Bianconi Date: Fri Jun 7 13:48:09 2019 +0200 mt7601u: do not schedule rx_tasklet when the device has been disconnected Do not schedule rx_tasklet when the usb dongle is disconnected. Moreover do not grub rx_lock in mt7601u_kill_rx since usb_poison_urb can run concurrently with urb completion and we can unlink urbs from rx ring in any order. This patch fixes the common kernel warning reported when the device is removed. [ 24.921354] usb 3-14: USB disconnect, device number 7 [ 24.921593] ------------[ cut here ]------------ [ 24.921594] RX urb mismatch [ 24.921675] WARNING: CPU: 4 PID: 163 at drivers/net/wireless/mediatek/mt7601u/dma.c:200 mt7601u_complete_rx+0xcb/0xd0 [mt7601u] [ 24.921769] CPU: 4 PID: 163 Comm: kworker/4:2 Tainted: G OE 4.19.31-041931-generic #201903231635 [ 24.921770] Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./Z97 Extreme4, BIOS P1.30 05/23/2014 [ 24.921782] Workqueue: usb_hub_wq hub_event [ 24.921797] RIP: 0010:mt7601u_complete_rx+0xcb/0xd0 [mt7601u] [ 24.921800] RSP: 0018:ffff9bd9cfd03d08 EFLAGS: 00010086 [ 24.921802] RAX: 0000000000000000 RBX: ffff9bd9bf043540 RCX: 0000000000000006 [ 24.921803] RDX: 0000000000000007 RSI: 0000000000000096 RDI: ffff9bd9cfd16420 [ 24.921804] RBP: ffff9bd9cfd03d28 R08: 0000000000000002 R09: 00000000000003a8 [ 24.921805] R10: 0000002f485fca34 R11: 0000000000000000 R12: ffff9bd9bf043c1c [ 24.921806] R13: ffff9bd9c62fa3c0 R14: 0000000000000082 R15: 0000000000000000 [ 24.921807] FS: 0000000000000000(0000) GS:ffff9bd9cfd00000(0000) knlGS:0000000000000000 [ 24.921808] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 24.921808] CR2: 00007fb2648b0000 CR3: 0000000142c0a004 CR4: 00000000001606e0 [ 24.921809] Call Trace: [ 24.921812] [ 24.921819] __usb_hcd_giveback_urb+0x8b/0x140 [ 24.921821] usb_hcd_giveback_urb+0xca/0xe0 [ 24.921828] xhci_giveback_urb_in_irq.isra.42+0x82/0xf0 [ 24.921834] handle_cmd_completion+0xe02/0x10d0 [ 24.921837] xhci_irq+0x274/0x4a0 [ 24.921838] xhci_msi_irq+0x11/0x20 [ 24.921851] __handle_irq_event_percpu+0x44/0x190 [ 24.921856] handle_irq_event_percpu+0x32/0x80 [ 24.921861] handle_irq_event+0x3b/0x5a [ 24.921867] handle_edge_irq+0x80/0x190 [ 24.921874] handle_irq+0x20/0x30 [ 24.921889] do_IRQ+0x4e/0xe0 [ 24.921891] common_interrupt+0xf/0xf [ 24.921892] [ 24.921900] RIP: 0010:usb_hcd_flush_endpoint+0x78/0x180 [ 24.921354] usb 3-14: USB disconnect, device number 7 Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo drivers/net/wireless/mediatek/mt7601u/dma.c | 33 ++++++++++++++++------------- 1 file changed, 18 insertions(+), 15 deletions(-) commit f0822dfc5887a2f93ac2b72cd21ab307cee4226a Author: Colin Ian King Date: Fri May 31 15:14:12 2019 +0100 rtlwifi: remove redundant assignment to variable k The assignment of 0 to variable k is never read once we break out of the loop, so the assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/efuse.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 5315f9d40191f98abcd3164e632a8a8f737b1cf0 Author: Colin Ian King Date: Thu May 30 19:40:44 2019 +0100 rtlwifi: remove redundant assignment to variable badworden The variable badworden is assigned with a value that is never read and it is re-assigned a new value immediately afterwards. The assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Acked-by: Larry Finger Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/efuse.c | 1 - 1 file changed, 1 deletion(-) commit 6c0ed66f1a5b84e2a812c7c2d6571a5621bf3396 Author: Ping-Ke Shih Date: Wed May 29 14:57:30 2019 +0800 rtlwifi: rtl8192cu: fix error handle when usb probe failed rtl_usb_probe() must do error handle rtl_deinit_core() only if rtl_init_core() is done, otherwise goto error_out2. | usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0 | rtl_usb: reg 0xf0, usbctrl_vendorreq TimeOut! status:0xffffffb9 value=0x0 | rtl8192cu: Chip version 0x10 | rtl_usb: reg 0xa, usbctrl_vendorreq TimeOut! status:0xffffffb9 value=0x0 | rtl_usb: Too few input end points found | INFO: trying to register non-static key. | the code is fine but needs lockdep annotation. | turning off the locking correctness validator. | CPU: 0 PID: 12 Comm: kworker/0:1 Not tainted 5.1.0-rc4-319354-g9a33b36 #3 | Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS | Google 01/01/2011 | Workqueue: usb_hub_wq hub_event | Call Trace: | __dump_stack lib/dump_stack.c:77 [inline] | dump_stack+0xe8/0x16e lib/dump_stack.c:113 | assign_lock_key kernel/locking/lockdep.c:786 [inline] | register_lock_class+0x11b8/0x1250 kernel/locking/lockdep.c:1095 | __lock_acquire+0xfb/0x37c0 kernel/locking/lockdep.c:3582 | lock_acquire+0x10d/0x2f0 kernel/locking/lockdep.c:4211 | __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] | _raw_spin_lock_irqsave+0x44/0x60 kernel/locking/spinlock.c:152 | rtl_c2hcmd_launcher+0xd1/0x390 | drivers/net/wireless/realtek/rtlwifi/base.c:2344 | rtl_deinit_core+0x25/0x2d0 drivers/net/wireless/realtek/rtlwifi/base.c:574 | rtl_usb_probe.cold+0x861/0xa70 | drivers/net/wireless/realtek/rtlwifi/usb.c:1093 | usb_probe_interface+0x31d/0x820 drivers/usb/core/driver.c:361 | really_probe+0x2da/0xb10 drivers/base/dd.c:509 | driver_probe_device+0x21d/0x350 drivers/base/dd.c:671 | __device_attach_driver+0x1d8/0x290 drivers/base/dd.c:778 | bus_for_each_drv+0x163/0x1e0 drivers/base/bus.c:454 | __device_attach+0x223/0x3a0 drivers/base/dd.c:844 | bus_probe_device+0x1f1/0x2a0 drivers/base/bus.c:514 | device_add+0xad2/0x16e0 drivers/base/core.c:2106 | usb_set_configuration+0xdf7/0x1740 drivers/usb/core/message.c:2021 | generic_probe+0xa2/0xda drivers/usb/core/generic.c:210 | usb_probe_device+0xc0/0x150 drivers/usb/core/driver.c:266 | really_probe+0x2da/0xb10 drivers/base/dd.c:509 | driver_probe_device+0x21d/0x350 drivers/base/dd.c:671 | __device_attach_driver+0x1d8/0x290 drivers/base/dd.c:778 | bus_for_each_drv+0x163/0x1e0 drivers/base/bus.c:454 | __device_attach+0x223/0x3a0 drivers/base/dd.c:844 | bus_probe_device+0x1f1/0x2a0 drivers/base/bus.c:514 | device_add+0xad2/0x16e0 drivers/base/core.c:2106 | usb_new_device.cold+0x537/0xccf drivers/usb/core/hub.c:2534 | hub_port_connect drivers/usb/core/hub.c:5089 [inline] | hub_port_connect_change drivers/usb/core/hub.c:5204 [inline] | port_event drivers/usb/core/hub.c:5350 [inline] | hub_event+0x138e/0x3b00 drivers/usb/core/hub.c:5432 | process_one_work+0x90f/0x1580 kernel/workqueue.c:2269 | worker_thread+0x9b/0xe20 kernel/workqueue.c:2415 | kthread+0x313/0x420 kernel/kthread.c:253 | ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:352 Reported-by: syzbot+1fcc5ef45175fc774231@syzkaller.appspotmail.com Signed-off-by: Ping-Ke Shih Acked-by: Larry Finger Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/usb.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 74f202aaae0a952e0f14b87821f42d75d09b8a78 Author: Swati Kushwaha Date: Fri Jun 21 19:44:44 2019 +0530 mwifiex: ignore processing invalid command response Firmware can send invalid command response, the processing of which can attempt to modify unexpected context and cause issues. To fix this, driver should check that the command response ID is same as the one it downloaded, and ignore processing of invalid response. Signed-off-by: Swati Kushwaha Signed-off-by: Ganapathi Bhat Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/cmdevt.c | 27 ++++++++++++++++++--------- drivers/net/wireless/marvell/mwifiex/main.h | 2 +- 2 files changed, 19 insertions(+), 10 deletions(-) commit 7afb94da3cd8a28ed7ae268143117bf1ac8a3371 Author: Sharvari Harisangam Date: Wed Jun 12 20:42:11 2019 +0530 mwifiex: update set_mac_address logic In set_mac_address, driver check for interfaces with same bss_type For first STA entry, this would return 3 interfaces since all priv's have bss_type as 0 due to kzalloc. Thus mac address gets changed for STA unexpected. This patch adds check for first STA and avoids mac address change. This patch also adds mac_address change for p2p based on bss_num type. Signed-off-by: Sharvari Harisangam Signed-off-by: Ganapathi Bhat Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2fc0aa454473a5f528cdc3e357da4489d0ccc6ee Author: Brian Norris Date: Tue Jun 4 10:31:44 2019 -0700 mwifiex: print PCI mmap with %pK Unadorned '%p' has restrictive policies these days, such that it usually just prints garbage at early boot (see Documentation/core-api/printk-formats.rst, "kernel will print ``(ptrval)`` until it gathers enough entropy"). Annotating with %pK (for "kernel pointer") allows the kptr_restrict sysctl to control printing policy better. We might just as well drop this message entirely, but this fix was easy enough for now. Signed-off-by: Brian Norris Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/pcie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f7369179ad32000973fc7a0a76603e0b41792b52 Author: Brian Norris Date: Tue Jun 4 10:28:58 2019 -0700 mwifiex: drop 'set_consistent_dma_mask' log message This message is pointless. While we're at it, include the error code in the error message, which is not pointless. Signed-off-by: Brian Norris Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/pcie.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 80d42db02b3a5beb8cffba08207adf5f4c525ee3 Author: Andres Rodriguez Date: Wed Jun 19 14:30:33 2019 -0400 drm/edid: use for_each_displayid_db where applicable Replace the duplicated versions of the while loop with the new macro. Signed-off-by: Andres Rodriguez Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20190619183033.6922-1-andresx7@gmail.com drivers/gpu/drm/drm_edid.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit 6e41e2257f1094acc37618bf6c856115374c6922 Author: Alan Stern Date: Mon May 20 10:44:21 2019 -0400 p54usb: Fix race between disconnect and firmware loading The syzbot fuzzer found a bug in the p54 USB wireless driver. The issue involves a race between disconnect and the firmware-loader callback routine, and it has several aspects. One big problem is that when the firmware can't be loaded, the callback routine tries to unbind the driver from the USB _device_ (by calling device_release_driver) instead of from the USB _interface_ to which it is actually bound (by calling usb_driver_release_interface). The race involves access to the private data structure. The driver's disconnect handler waits for a completion that is signalled by the firmware-loader callback routine. As soon as the completion is signalled, you have to assume that the private data structure may have been deallocated by the disconnect handler -- even if the firmware was loaded without errors. However, the callback routine does access the private data several times after that point. Another problem is that, in order to ensure that the USB device structure hasn't been freed when the callback routine runs, the driver takes a reference to it. This isn't good enough any more, because now that the callback routine calls usb_driver_release_interface, it has to ensure that the interface structure hasn't been freed. Finally, the driver takes an unnecessary reference to the USB device structure in the probe function and drops the reference in the disconnect handler. This extra reference doesn't accomplish anything, because the USB core already guarantees that a device structure won't be deallocated while a driver is still bound to any of its interfaces. To fix these problems, this patch makes the following changes: Call usb_driver_release_interface() rather than device_release_driver(). Don't signal the completion until after the important information has been copied out of the private data structure, and don't refer to the private data at all thereafter. Lock udev (the interface's parent) before unbinding the driver instead of locking udev->parent. During the firmware loading process, take a reference to the USB interface instead of the USB device. Don't take an unnecessary reference to the device during probe (and then don't drop it during disconnect). Signed-off-by: Alan Stern Reported-and-tested-by: syzbot+200d4bb11b23d929335f@syzkaller.appspotmail.com CC: Acked-by: Christian Lamparter Signed-off-by: Kalle Valo drivers/net/wireless/intersil/p54/p54usb.c | 43 +++++++++++++----------------- 1 file changed, 18 insertions(+), 25 deletions(-) commit 78efb76ab4dfb8f74f290ae743f34162cd627f19 Author: Geert Uytterhoeven Date: Mon Jun 24 14:38:18 2019 +0200 dmaengine: rcar-dmac: Reject zero-length slave DMA requests While the .device_prep_slave_sg() callback rejects empty scatterlists, it still accepts single-entry scatterlists with a zero-length segment. These may happen if a driver calls dmaengine_prep_slave_single() with a zero len parameter. The corresponding DMA request will never complete, leading to messages like: rcar-dmac e7300000.dma-controller: Channel Address Error happen and DMA timeouts. Although requesting a zero-length DMA request is a driver bug, rejecting it early eases debugging. Note that the .device_prep_dma_memcpy() callback already rejects requests to copy zero bytes. Reported-by: Eugeniu Rosca Analyzed-by: Yoshihiro Shimoda Signed-off-by: Geert Uytterhoeven Signed-off-by: Vinod Koul drivers/dma/sh/rcar-dmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9e5ab0655ef98cc1261409f94a42219dfb68cc22 Author: Andy Shevchenko Date: Fri Jun 21 16:19:14 2019 +0300 dmaengine: dw: Enable iDMA 32-bit on Intel Elkhart Lake Intel Elkhart Lake OSE (Offload Service Engine) provides few DMA controllers to the host. Enable them in the driver. Signed-off-by: Andy Shevchenko Acked-by: Viresh Kumar Signed-off-by: Vinod Koul drivers/dma/dw/pci.c | 5 +++++ 1 file changed, 5 insertions(+) commit e28ad544f462231d3fd081a7316339359efbb481 Author: Andres Rodriguez Date: Wed Jun 19 14:09:01 2019 -0400 drm/edid: parse CEA blocks embedded in DisplayID DisplayID blocks allow embedding of CEA blocks. The payloads are identical to traditional top level CEA extension blocks, but the header is slightly different. This change allows the CEA parser to find a CEA block inside a DisplayID block. Additionally, it adds support for parsing the embedded CTA header. No further changes are necessary due to payload parity. This change fixes audio support for the Valve Index HMD. Signed-off-by: Andres Rodriguez Reviewed-by: Dave Airlie Cc: Jani Nikula Cc: # v4.15 Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20190619180901.17901-1-andresx7@gmail.com drivers/gpu/drm/drm_edid.c | 81 +++++++++++++++++++++++++++++++++++++++------ include/drm/drm_displayid.h | 10 ++++++ 2 files changed, 80 insertions(+), 11 deletions(-) commit 2b651ecfc39fb64359ce172c5b589d52cb224ad3 Author: kbuild test robot Date: Sun Jun 16 00:05:50 2019 +0800 dmaengine: dw-edma: fix semicolon.cocci warnings drivers/dma/dw-edma/dw-edma-core.c:617:2-3: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Fixes: e63d79d1ffcd ("dmaengine: Add Synopsys eDMA IP core driver") CC: Gustavo Pimentel Signed-off-by: kbuild test robot Acked-by: Gustavo Pimentel Signed-off-by: Vinod Koul drivers/dma/dw-edma/dw-edma-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e3dc00b936e5a60ca27be62008482f13bfbc06e3 Author: Geert Uytterhoeven Date: Wed Jun 19 14:45:55 2019 +0200 dmaengine: sh: usb-dmac: Use [] to denote a flexible array member Flexible array members should be denoted using [] instead of [0], else gcc will not warn when they are no longer at the end of the structure. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Vinod Koul drivers/dma/sh/usb-dmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ed04b7c57c3383ed4573f1d1d1dbdc1108ba0bed Author: Hook, Gary Date: Tue Jun 18 22:03:04 2019 +0000 dmaengine: dmatest: timeout value of -1 should specify infinite wait The dmatest module parameter 'timeout' is documented as accepting a -1 to mean "infinite timeout". However, an infinite timeout is not advised, nor possible since the module parameter is an unsigned int, which won't accept a negative value. Change the parameter comment to reflect current behavior, which allows values from 0 up to 4294967295 (0xFFFFFFFF). Signed-off-by: Gary R Hook Signed-off-by: Vinod Koul drivers/dma/dmatest.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a183ec708b7318bec6bb8a6593f9f7e9bb3fdf4e Author: Andy Shevchenko Date: Fri Jun 14 14:06:04 2019 +0300 dmaengine: dw: Distinguish ->remove() between DW and iDMA 32-bit In the same way as done for ->probe(), call ->remove() based on the type of the hardware. While it works now due to equivalency of the two removal functions, it might be changed in the future. Signed-off-by: Andy Shevchenko Acked-by: Viresh Kumar Signed-off-by: Vinod Koul drivers/dma/dw/pci.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) commit 002905eca5bedab08bafd9e325bbbb41670c7712 Author: Peng Ma Date: Thu Jun 13 10:27:08 2019 +0000 dmaengine: fsl-edma: support little endian for edma driver Our platforms with below registers(CHCFG0 - CHCFG15) of eDMA *-----------------------------------------------------------* | Offset | Big endian Register| Little endian Register| |--------------|--------------------|-----------------------| | 0x0 | CHCFG0 | CHCFG3 | |--------------|--------------------|-----------------------| | 0x1 | CHCFG1 | CHCFG2 | |--------------|--------------------|-----------------------| | 0x2 | CHCFG2 | CHCFG1 | |--------------|--------------------|-----------------------| | 0x3 | CHCFG3 | CHCFG0 | |--------------|--------------------|-----------------------| | ... | ...... | ...... | |--------------|--------------------|-----------------------| | 0xC | CHCFG12 | CHCFG15 | |--------------|--------------------|-----------------------| | 0xD | CHCFG13 | CHCFG14 | |--------------|--------------------|-----------------------| | 0xE | CHCFG14 | CHCFG13 | |--------------|--------------------|-----------------------| | 0xF | CHCFG15 | CHCFG12 | *-----------------------------------------------------------* Current eDMA driver does not support Little endian, so this patch is to improve edma driver to support little endian. Signed-off-by: Peng Ma Signed-off-by: Vinod Koul drivers/dma/fsl-edma-common.c | 5 +++++ 1 file changed, 5 insertions(+) commit c24a5c735f87d0549060de31367c095e8810b895 Author: Andy Shevchenko Date: Thu Jun 13 16:32:32 2019 +0300 dmaengine: hsu: Revert "set HSU_CH_MTSR to memory width" The commit 080edf75d337 ("dmaengine: hsu: set HSU_CH_MTSR to memory width") has been mistakenly submitted. The further investigations show that the original code does better job since the memory side transfer size has never been configured by DMA users. As per latest revision of documentation: "Channel minimum transfer size (CHnMTSR)... For IOSF UART, maximum value that can be programmed is 64 and minimum value that can be programmed is 1." This reverts commit 080edf75d337d35faa6fc3df99342b10d2848d16. Fixes: 080edf75d337 ("dmaengine: hsu: set HSU_CH_MTSR to memory width") Signed-off-by: Andy Shevchenko Signed-off-by: Vinod Koul drivers/dma/hsu/hsu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 76b77f1dbb16b89b8fca18d51ccee77433a3bde0 Merge: a188339ca5a3 15c64ff76255 Author: Stephen Boyd Date: Mon Jun 24 20:16:13 2019 -0700 Merge tag 'imx-clk-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into clk-imx Pull i.MX clk driver changes from Shawn Guo: - A series from Abel Vesa to switch i.MX6 and i.MX7 clock drivers to clk_hw based API - Add GPIO, SNVS and GIC clocks for i.MX8 drivers - Create a common function imx_mmdc_mask_handshake() for masking MMDC handshake - Drop __init for function imx_check_clocks() and imx_register_uart_clocks(), so that they can be used by i.MX8 clock drivers which use driver model - Use devm_platform_ioremap_resource() instead of of_iomap() for imx8mq clock driver - Mark imx6sx/ul/ull/sll MMDC_P1_IPG and imx8mm DRAM_APB as critical clock. - Correct imx7ulp nic1_bus_clk and imx8mm audio_pll2_clk clock setting * tag 'imx-clk-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (38 commits) clk: imx8mq: Keep uart clocks on during system boot clk: imx: Remove __init for imx_register_uart_clocks() API clk: imx6q: fix section mismatch warning clk: imx8mq: Use devm_platform_ioremap_resource() instead of of_iomap() clk: imx8mq: Use imx_check_clocks() API directly clk: imx: Remove __init for imx_check_clocks() API clk: imx6sll: Switch to clk_hw based API clk: imx7d: Switch to clk_hw based API clk: imx6ul: Switch to clk_hw based API clk: imx6sx: Switch to clk_hw based API clk: imx6q: Switch to clk_hw based API clk: imx6sl: Switch to clk_hw based API clk: imx: Switch wrappers to clk_hw based API clk: imx: clk-fixup-mux: Switch to clk_hw based API clk: imx: clk-fixup-div: Switch to clk_hw based API clk: imx: clk-gate-exclusive: Switch to clk_hw based API clk: imx: clk-pfd: Switch to clk_hw based API clk: imx: clk-pllv3: Switch to clk_hw based API clk: imx: clk-gate2: Switch to clk_hw based API clk: imx: clk-cpu: Switch to clk_hw based API ... commit c0bc660c906821acfbfde9dbdea15e6d843d982a Merge: a188339ca5a3 7ef91224c486 Author: Stephen Boyd Date: Mon Jun 24 20:07:46 2019 -0700 Merge tag 'clk-v5.3-samsung' of git://git.kernel.org/pub/scm/linux/kernel/git/snawrocki/clk into clk-samsung Pull Samsung clk driver updates from Sylwester Nawrocki: - Addition of clocks required for new Exynos5422 Dynamic Memory Controller driver - clock definition for Exynos4412 Mali - minor clean up of clk-exynos5433.c * tag 'clk-v5.3-samsung' of git://git.kernel.org/pub/scm/linux/kernel/git/snawrocki/clk: clk: samsung: Add bus clock for GPU/G3D on Exynos4412 clk: samsung: add new clocks for DMC for Exynos5422 SoC clk: samsung: add BPLL rate table for Exynos 5422 SoC clk: samsung: add needed IDs for DMC clocks in Exynos5420 clk: samsung: exynos5433: Use of_clk_get_parent_count() commit 5b68f22c3e1352f59b960ff5d69358f292c3b727 Merge: f81d086095f2 ec2b827be396 Author: Stephen Boyd Date: Mon Jun 24 20:04:57 2019 -0700 Merge tag 'clk-renesas-for-v5.3-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into clk-renesas Pull Renesas clk driver updates from Geert Uytterhoeven: - Add CMM (Color Management Module) clocks on R-Car H3, M3-N, E3, and D3 - Add TPU (Timer Pulse Unit / PWM) clocks on RZ/G2M - Small cleanups and fixes * tag 'clk-renesas-for-v5.3-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers: clk: renesas: cpg-mssr: Use [] to denote a flexible array member clk: renesas: cpg-mssr: Combine driver-private and clock array allocation clk: renesas: mstp: Combine group-private and clock array allocation clk: renesas: div6: Combine clock-private and parent array allocation clk: renesas: cpg-mssr: Update kerneldoc for struct cpg_mssr_priv clk: renesas: r8a774a1: Add TMU clock clk: renesas: r8a77995: Add CMM clocks clk: renesas: r8a77990: Add CMM clocks clk: renesas: r8a77965: Add CMM clocks clk: renesas: r8a7795: Add CMM clocks commit dfd03396d7b66f90071aa5e8fdc0f3c4a66471c5 Merge: 9b75276e4fb1 eb7cf945a8da Author: Dave Airlie Date: Tue Jun 25 12:59:35 2019 +1000 Merge tag 'drm/tegra/for-5.3-rc1' of git://anongit.freedesktop.org/tegra/linux into drm-next drm/tegra: Changes for v5.3-rc1 This contains a couple of small improvements and cleanups for the Tegra DRM driver. Signed-off-by: Dave Airlie From: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20190621150753.19550-1-thierry.reding@gmail.com commit 9b75276e4fb190b47ed62693cc4d9549a45c76a2 Merge: 417f2544f48c 2cfb1981dd0d Author: Dave Airlie Date: Tue Jun 25 12:49:08 2019 +1000 Merge commit 'refs/for-upstream/mali-dp' of git://linux-arm.org/linux-ld into drm-next Picking up pace on the upstreaming of Komeda driver, with quite a lot of new features added this time. On top of that we have the small cleanups and improved usage of the debugfs functions. Please pull! Signed-off-by: Dave Airlie From: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20190621095349.GI17204@e110455-lin.cambridge.arm.com commit f925a054f0f85c93282f6ddab0e1355237293214 Merge: b2f874d27b62 89f27fb2dd34 Author: Stephen Boyd Date: Mon Jun 24 18:28:31 2019 -0700 Merge tag 'sunxi-ng-parent-rewrite-part-1-take-2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into clk-allwinner Pull Allwinner sunxi-ng clk driver parent relation rewrite part 1 - take 2 from Chen-Yu Tsai: "The first part of ongoing work to convert the sunxi-ng clk driver from using global clock name strings to describe clk parenting, to having direct struct clk_hw pointers, or local names based on clock-names from the device tree binding. This is based on Stephen Boyd's recent work allowing clk drivers to specify clk parents using struct clk_hw * or parsing DT phandles in the clk node. This series can be split into a few major parts: 1) The first patch is a small fix for clk debugfs representation. 2) A bunch of CLK_HW_INIT_* helper macros are added. These cover the situations I encountered, or assume I will encounter, such as single internal (struct clk_hw *) parent, single DT (struct clk_parent_data .fw_name), multiple internal parents, and multiple mixed (internal + DT) parents. A special variant for just an internal single parent is added, CLK_HW_INIT_HWS, which lets the driver share the singular list, instead of having the compiler create a compound literal every time. It might even make sense to only keep this variant. 3) A bunch of CLK_FIXED_FACTOR_* helper macros are added. The rationale is the same as the single parent CLK_HW_INIT_* helpers. 4) Bulk conversion of CLK_FIXED_FACTOR to use local parent references, either struct clk_hw * or DT .fw_name types, whichever the hardware requires. 5) The beginning of SUNXI_CCU_GATE conversion to local parent references. This part is not done. They are included as justification and examples for the shared list of clk parents case." * tag 'sunxi-ng-parent-rewrite-part-1-take-2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: (25 commits) clk: sunxi-ng: sun8i-r: Use local parent references for SUNXI_CCU_GATE clk: sunxi-ng: a80-usb: Use local parent references for SUNXI_CCU_GATE clk: sunxi-ng: gate: Add macros for referencing local clock parents clk: sunxi-ng: h6-r: Use local parent references for CLK_FIXED_FACTOR clk: sunxi-ng: h6: Use local parent references for CLK_FIXED_FACTOR clk: sunxi-ng: a64: Use local parent references for CLK_FIXED_FACTOR clk: sunxi-ng: f1c100s: Use local parent references for CLK_FIXED_FACTOR clk: sunxi-ng: sun8i-r: Use local parent references for CLK_FIXED_FACTOR clk: sunxi-ng: v3s: Use local parent references for CLK_FIXED_FACTOR clk: sunxi-ng: r40: Use local parent references for CLK_FIXED_FACTOR clk: sunxi-ng: h3: Use local parent references for CLK_FIXED_FACTOR clk: sunxi-ng: a33: Use local parent references for CLK_FIXED_FACTOR clk: sunxi-ng: a23: Use local parent references for CLK_FIXED_FACTOR clk: sunxi-ng: a31: Use local parent references for CLK_FIXED_FACTOR clk: sunxi-ng: sun5i: Use local parent references for CLK_FIXED_FACTOR clk: sunxi-ng: a10: Use local parent references for CLK_FIXED_FACTOR clk: sunxi-ng: sun8i-r: Use local parent references for CLK_HW_INIT_* clk: sunxi-ng: switch to of_clk_hw_register() for registering clks clk: fixed-factor: Add CLK_FIXED_FACTOR_FW_NAME for DT clock-names parent clk: fixed-factor: Add CLK_FIXED_FACTOR_HWS which takes list of struct clk_hw * ... commit 88091ff56b71d73c5577ebefcd4f0f721a359077 Author: Toshiaki Makita Date: Thu Jun 20 11:23:23 2019 +0900 selftests, bpf: Add test for veth native XDP Add a test case for veth native XDP. It checks if XDP_PASS, XDP_TX and XDP_REDIRECT work properly. $ cd tools/testing/selftests/bpf $ make \ TEST_CUSTOM_PROGS= \ TEST_GEN_PROGS= \ TEST_GEN_PROGS_EXTENDED= \ TEST_PROGS_EXTENDED= \ TEST_PROGS="test_xdp_veth.sh" \ run_tests TAP version 13 1..1 # selftests: bpf: test_xdp_veth.sh # PING 10.1.1.33 (10.1.1.33) 56(84) bytes of data. # 64 bytes from 10.1.1.33: icmp_seq=1 ttl=64 time=0.073 ms # # --- 10.1.1.33 ping statistics --- # 1 packets transmitted, 1 received, 0% packet loss, time 0ms # rtt min/avg/max/mdev = 0.073/0.073/0.073/0.000 ms # selftests: xdp_veth [PASS] ok 1 selftests: bpf: test_xdp_veth.sh Signed-off-by: Toshiaki Makita Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/Makefile | 1 + .../testing/selftests/bpf/progs/xdp_redirect_map.c | 31 ++++++ tools/testing/selftests/bpf/progs/xdp_tx.c | 12 +++ tools/testing/selftests/bpf/test_xdp_veth.sh | 118 +++++++++++++++++++++ 4 files changed, 162 insertions(+) commit 0bed61371f7d537ecb6e1833acf59a74ae183b37 Author: Eric Leblond Date: Fri Jun 21 22:13:10 2019 +0200 xsk: sample kernel code is now in libbpf Fix documentation that mention xdpsock_kern.c which has been replaced by code embedded in libbpf. Signed-off-by: Eric Leblond Acked-by: Björn Töpel Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Documentation/networking/af_xdp.rst | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit 900de4ac4953fcf5e25ea45bea5bb28e797b1420 Author: Colin Ian King Date: Wed Jun 19 17:27:42 2019 +0100 libbpf: fix spelling mistake "conflictling" -> "conflicting" There are several spelling mistakes in pr_warning messages. Fix these. Signed-off-by: Colin Ian King Acked-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov tools/lib/bpf/libbpf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 7ae9f2817ad5130fdffa3692ef69b9d0e91279e8 Author: Michal Rostecki Date: Tue Jun 18 20:13:18 2019 +0200 samples: bpf: Remove bpf_debug macro in favor of bpf_printk ibumad example was implementing the bpf_debug macro which is exactly the same as the bpf_printk macro available in bpf_helpers.h. This change makes use of bpf_printk instead of bpf_debug. Signed-off-by: Michal Rostecki Acked-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov samples/bpf/ibumad_kern.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit b2f874d27b62816fd170a554e4fe1d15e541fa1d Merge: a188339ca5a3 b467ec063ec5 Author: Stephen Boyd Date: Mon Jun 24 18:17:28 2019 -0700 Merge tag 'sunxi-clk-for-5.3-201906210814' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into clk-allwinner Pull Allwinner clk driver updates from Maxime Ripard: - A few patches to fix two minor bugs - Introduce a schema for our device tree bindings * tag 'sunxi-clk-for-5.3-201906210814' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: dt-bindings: clk: Convert Allwinner CCU to a schema clk: sunxi-ng: sun50i-h6-r: Fix incorrect W1 clock gate register clk-sunxi: fix a missing-check bug in sunxi_divs_clk_setup() commit 0b88bc9292515550b4f7b30ac7d7ecd80f5bc1aa Author: Stephen Boyd Date: Mon Jun 24 18:06:15 2019 -0700 clk: ti: Use int to check return value from of_property_count_elems_of_size() This function can return a negative number when it fails, but res->sets is at most a u16 which can't hold that negative number. Let's store the result into an int, ret, and then assign that to res->sets when it works to avoid this logical impossibility. Signed-off-by: Stephen Boyd drivers/firmware/ti_sci.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 0af69227ed9fc4ac62f8542e52aba98fc2c7945b Merge: a188339ca5a3 81f4458c9c69 Author: Stephen Boyd Date: Mon Jun 24 17:52:29 2019 -0700 Merge tag 'keystone-clk-for-5.3-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/kristo/linux into clk-ti Pull TI Keystone clk driver changes from Tero Kristo: - Add support for 32 bit clock IDs for sci-clks, this is needed for the new J721e SoC which has a few devices that have more than 255 clocks associated to them. - Clock probing done from DT by default instead of firmware side. Scanning clocks from DT is much faster than firmware, and also we can omit unnecessary clocks which saves even more time. This has been done in the interest of saving boot time. - Remove the device tree node path from the registered sci-clk names. This mainly makes the debugfs interface more readable. - Also contains a single drivers/firmware change which needs to go in via this pull-request; to support the 32bit clock IDs. * tag 'keystone-clk-for-5.3-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/kristo/linux: firmware: ti_sci: extend clock identifiers from u8 to u32 clk: keystone: sci-clk: extend clock IDs to 32 bits clk: keystone: sci-clk: probe clocks from DT instead of firmware clk: keystone: sci-clk: split out the fw clock parsing to own function clk: keystone: sci-clk: cut down the clock name length commit afa88bdbf19314494415d622d50730b5d854dd91 Merge: a188339ca5a3 eda91833f099 Author: Stephen Boyd Date: Mon Jun 24 17:40:40 2019 -0700 Merge tag 'clk-meson-5.3-1' of https://github.com/BayLibre/clk-meson into clk-meson Pull Amlogic clk driver updates from Jerome Brunet: - Fix mpll fractional part and spread sprectrum issues - Add meson8 audio clocks - Add g12a temperature sensors clocks - Add g12a and g12b cpu clocks * tag 'clk-meson-5.3-1' of https://github.com/BayLibre/clk-meson: clk: meson: g12a: mark fclk_div3 as critical clk: meson: g12a: Add support for G12B CPUB clocks dt-bindings: clk: meson: add g12b periph clock controller bindings clk: meson-g12a: add temperature sensor clocks dt-bindings: clk: g12a-clkc: add Temperature Sensor clock IDs clk: meson: meson8b: add the cts_i958 clock clk: meson: meson8b: add the cts_mclk_i958 clocks clk: meson: meson8b: add the cts_amclk clocks dt-bindings: clock: meson8b: add the audio clocks clk: meson: g12a: add controller register init clk: meson: eeclk: add init regs clk: meson: g12a: add mpll register init sequences clk: meson: mpll: add init callback and regs clk: meson: axg: spread spectrum is on mpll2 clk: meson: gxbb: no spread spectrum on mpll0 clk: meson: mpll: properly handle spread spectrum clk: meson: meson8b: fix a typo in the VPU parent names array variable clk: meson: fix MPLL 50M binding id typo commit 5db7c8b9f9fc2aeec671ae3ca6375752c162e0e7 Author: Julian Anastasov Date: Tue Jun 18 23:07:36 2019 +0300 ipvs: fix tinfo memory leak in start_sync_thread syzkaller reports for memory leak in start_sync_thread [1] As Eric points out, kthread may start and stop before the threadfn function is called, so there is no chance the data (tinfo in our case) to be released in thread. Fix this by releasing tinfo in the controlling code instead. [1] BUG: memory leak unreferenced object 0xffff8881206bf700 (size 32): comm "syz-executor761", pid 7268, jiffies 4294943441 (age 20.470s) hex dump (first 32 bytes): 00 40 7c 09 81 88 ff ff 80 45 b8 21 81 88 ff ff .@|......E.!.... 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<0000000057619e23>] kmemleak_alloc_recursive include/linux/kmemleak.h:55 [inline] [<0000000057619e23>] slab_post_alloc_hook mm/slab.h:439 [inline] [<0000000057619e23>] slab_alloc mm/slab.c:3326 [inline] [<0000000057619e23>] kmem_cache_alloc_trace+0x13d/0x280 mm/slab.c:3553 [<0000000086ce5479>] kmalloc include/linux/slab.h:547 [inline] [<0000000086ce5479>] start_sync_thread+0x5d2/0xe10 net/netfilter/ipvs/ip_vs_sync.c:1862 [<000000001a9229cc>] do_ip_vs_set_ctl+0x4c5/0x780 net/netfilter/ipvs/ip_vs_ctl.c:2402 [<00000000ece457c8>] nf_sockopt net/netfilter/nf_sockopt.c:106 [inline] [<00000000ece457c8>] nf_setsockopt+0x4c/0x80 net/netfilter/nf_sockopt.c:115 [<00000000942f62d4>] ip_setsockopt net/ipv4/ip_sockglue.c:1258 [inline] [<00000000942f62d4>] ip_setsockopt+0x9b/0xb0 net/ipv4/ip_sockglue.c:1238 [<00000000a56a8ffd>] udp_setsockopt+0x4e/0x90 net/ipv4/udp.c:2616 [<00000000fa895401>] sock_common_setsockopt+0x38/0x50 net/core/sock.c:3130 [<0000000095eef4cf>] __sys_setsockopt+0x98/0x120 net/socket.c:2078 [<000000009747cf88>] __do_sys_setsockopt net/socket.c:2089 [inline] [<000000009747cf88>] __se_sys_setsockopt net/socket.c:2086 [inline] [<000000009747cf88>] __x64_sys_setsockopt+0x26/0x30 net/socket.c:2086 [<00000000ded8ba80>] do_syscall_64+0x76/0x1a0 arch/x86/entry/common.c:301 [<00000000893b4ac8>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 Reported-by: syzbot+7e2e50c8adfccd2e5041@syzkaller.appspotmail.com Suggested-by: Eric Biggers Fixes: 998e7a76804b ("ipvs: Use kthread_run() instead of doing a double-fork via kernel_thread()") Signed-off-by: Julian Anastasov Acked-by: Simon Horman Signed-off-by: Pablo Neira Ayuso include/net/ip_vs.h | 6 +- net/netfilter/ipvs/ip_vs_ctl.c | 4 -- net/netfilter/ipvs/ip_vs_sync.c | 134 +++++++++++++++++++++------------------- 3 files changed, 76 insertions(+), 68 deletions(-) commit 792c4e9d0bbb53b34bf1c07c2ef25609d746c57d Author: Matthew Wilcox Date: Thu Jun 20 07:03:47 2019 +0000 net/mlx5: Convert mkey_table to XArray The lock protecting the data structure does not need to be an rwlock. The only read access to the lock is in an error path, and if that's limiting your scalability, you have bigger performance problems. Eliminate mlx5_mkey_table in favour of using the xarray directly. reg_mr_callback must use GFP_ATOMIC for allocating XArray nodes as it may be called in interrupt context. This also fixes a minor bug where SRCU locking was being used on the radix tree read side, when RCU was needed too. Signed-off-by: Matthew Wilcox Signed-off-by: Jason Gunthorpe Signed-off-by: Saeed Mahameed drivers/infiniband/hw/mlx5/cq.c | 8 ++++---- drivers/infiniband/hw/mlx5/devx.c | 18 ++++-------------- drivers/infiniband/hw/mlx5/mr.c | 10 +++++----- drivers/infiniband/hw/mlx5/odp.c | 10 +++++----- drivers/net/ethernet/mellanox/mlx5/core/mr.c | 27 +++++++++++---------------- include/linux/mlx5/driver.h | 13 ++----------- include/linux/mlx5/qp.h | 5 ----- 7 files changed, 31 insertions(+), 60 deletions(-) commit 1c5ba67d2277ac2faf37c61076e8b5fa312be492 Merge: dbb5281a1f84 045df37e743c Author: Pablo Neira Ayuso Date: Tue Jun 25 01:32:59 2019 +0200 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next Resolve conflict between d2912cb15bdd ("treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500") removing the GPL disclaimer and fe03d4745675 ("Update my email address") which updates Jozsef Kadlecsik's email. Signed-off-by: Pablo Neira Ayuso commit 045df37e743c7448931131988e99e8fe0cc92a54 Merge: 0fec7e72ae13 f9f329ad87c7 Author: David S. Miller Date: Mon Jun 24 14:54:06 2019 -0700 Merge branch 'cxgb4-Reference-count-MPS-TCAM-entries-within-a-PF' Raju Rangoju says: ==================== cxgb4: Reference count MPS TCAM entries within a PF Firmware reference counts the MPS TCAM entries by PF and VF, but it does not do it for usage within a PF or VF. This patch adds the support to track MPS TCAM entries within a PF. v2->v3: Fixed the compiler errors due to incorrect patch Also, removed the new blank line at EOF v1->v2: Use refcount_t type instead of atomic_t for mps reference count ==================== Signed-off-by: David S. Miller commit f9f329ad87c746f4e6e352eb035e70b0dd7d5643 Author: Raju Rangoju Date: Mon Jun 24 23:05:35 2019 +0530 cxgb4: Add MPS refcounting for alloc/free mac filters This patch adds reference counting support for alloc/free mac filters Signed-off-by: Raju Rangoju Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 6 +++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 12 +++-- drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c | 72 +++++++++++++++++++++++++ 3 files changed, 87 insertions(+), 3 deletions(-) commit 2f0b9406f3c77491928b8c6c855ef8349eff31ac Author: Raju Rangoju Date: Mon Jun 24 23:05:34 2019 +0530 cxgb4: Add MPS TCAM refcounting for cxgb4 change mac This patch adds TCAM reference counting support for cxgb4 change mac path Signed-off-by: Raju Rangoju Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 7 +++++++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 14 +++++++------- drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c | 15 +++++++++++++++ 3 files changed, 29 insertions(+), 7 deletions(-) commit 5fab51581f6223adab8dc7b526fe1217eb3b7348 Author: Raju Rangoju Date: Mon Jun 24 23:05:33 2019 +0530 cxgb4: Add MPS TCAM refcounting for raw mac filters This patch adds TCAM reference counting support for raw mac filters. Signed-off-by: Raju Rangoju Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 16 +++++++++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c | 46 ++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) commit 28b3870578ef403000c99d54c40fffb0210ff70d Author: Raju Rangoju Date: Mon Jun 24 23:05:32 2019 +0530 cxgb4: Re-work the logic for mps refcounting Remove existing mps refcounting code which was added only for encap filters and add necessary data structures/functions to support mps reference counting for all the mac filters. Also add wrapper functions for allocating and freeing encap mac filters. Signed-off-by: Raju Rangoju Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/Makefile | 2 +- drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 24 ++++- drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c | 8 +- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 14 +-- drivers/net/ethernet/chelsio/cxgb4/cxgb4_mps.c | 108 ++++++++++++++++++++++ 5 files changed, 134 insertions(+), 22 deletions(-) commit a4e5914a7b4f175b22904fc72155e7ea41246d2c Author: Paul Cercueil Date: Mon Jun 24 23:27:52 2019 +0200 MAINTAINERS: Add myself as Ingenic SoCs maintainer Add myself as the maintainer of the arch code, devicetree files and drivers related to the JZ47xx family of SoCs from Ingenic. Signed-off-by: Paul Cercueil [paul.burton@mips.com: Keep list sorted; move after JZ4780 NAND.] Signed-off-by: Paul Burton Cc: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org Cc: linux-mips@vger.kernel.org MAINTAINERS | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit fce5430f6a86911ba3b4c8343ab04a88d7ad7795 Author: John Stultz Date: Mon Jun 3 22:23:18 2019 +0000 reset: qcom-pon: Add support for gen2 pon Add support for gen2 pon register so "reboot bootloader" can work on pixel3 and db845. Cc: Andy Gross Cc: David Brown Cc: Bjorn Andersson Cc: Amit Pundir Cc: Rob Herring Cc: Mark Rutland Cc: Sebastian Reichel Cc: linux-arm-msm@vger.kernel.org Cc: devicetree@vger.kernel.org Reviewed-by: Bjorn Andersson Signed-off-by: John Stultz v2: * Split out dts changes into separate path * Minor cleanups and remove unused variables Signed-off-by: Sebastian Reichel drivers/power/reset/qcom-pon.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 9faf929608f52b907d8d41a455f3bee852f3dc85 Author: John Stultz Date: Mon Jun 3 22:23:17 2019 +0000 dt-bindings: power: reset: qcom: Add qcom,pm8998-pon compatibility line Update bindings to support for qcom,pm8998-pon which uses gen2 pon Cc: Andy Gross Cc: David Brown Cc: Bjorn Andersson Cc: Amit Pundir Cc: Rob Herring Cc: Mark Rutland Cc: Sebastian Reichel Cc: linux-arm-msm@vger.kernel.org Cc: devicetree@vger.kernel.org Reviewed-by: Bjorn Andersson Signed-off-by: John Stultz Signed-off-by: Sebastian Reichel Documentation/devicetree/bindings/power/reset/qcom,pon.txt | 1 + 1 file changed, 1 insertion(+) commit 1bca2eacd6472979f8d74e75e631c1725e15710b Author: Stefan Roese Date: Mon May 27 11:13:22 2019 +0200 MIPS: ralink: mt7628a.dtsi: Add watchdog controller DT node This patch adds the watchdog controller description to the MT7628A dtsi file. Signed-off-by: Stefan Roese Cc: Paul Burton Cc: Harvey Hunt Cc: John Crispin Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org arch/mips/boot/dts/ralink/mt7628a.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 4e41b745d35beab56cfeb255292a6753aaf35af6 Author: Stefan Roese Date: Mon May 27 11:13:21 2019 +0200 MIPS: ralink: mt7628a.dtsi: Add SPI controller DT node This patch adds the SPI controller description to the MT7628A dtsi file. Signed-off-by: Stefan Roese Cc: Paul Burton Cc: Harvey Hunt Cc: John Crispin Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org arch/mips/boot/dts/ralink/mt7628a.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit e456a3bdea4b9a783a0dd186273ec148ca796834 Author: Stefan Roese Date: Mon May 27 11:13:19 2019 +0200 MIPS: ralink: mt7628a.dtsi: Add GPIO controller DT node This patch adds the GPIO controller description to the MT7628A dtsi file. Signed-off-by: Stefan Roese Cc: Paul Burton Cc: Harvey Hunt Cc: John Crispin Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org arch/mips/boot/dts/ralink/mt7628a.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 6394de396ed36f3e8043734676eaa9c26f84bb1b Author: Stefan Roese Date: Mon May 27 11:13:18 2019 +0200 MIPS: ralink: mt7628a.dtsi: Add pinctrl DT properties to the UART nodes Now that pinmux is available, let's use it for the UART DT nodes. Signed-off-by: Stefan Roese Cc: Paul Burton Cc: Harvey Hunt Cc: John Crispin Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org arch/mips/boot/dts/ralink/mt7628a.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) commit 380f072c57a590d7593050b8533d88e18b6a7daa Author: Stefan Roese Date: Mon May 27 11:13:17 2019 +0200 MIPS: ralink: mt7628a.dtsi: Add pinmux DT node This patch adds the pinmux DT node using the generic "pinctrl-single" pinmux driver. For this the system-controller register area needs to be changed to not overlap with the pinmux registers. This patch is based on work done by John Crispin. Signed-off-by: Stefan Roese Cc: Paul Burton Cc: Harvey Hunt Cc: John Crispin Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org arch/mips/boot/dts/ralink/mt7628a.dtsi | 95 +++++++++++++++++++++++++++++++++- 1 file changed, 94 insertions(+), 1 deletion(-) commit 9ea34af728f720e54703a89b3762d598cc742f1c Author: Stefan Roese Date: Mon May 27 11:13:16 2019 +0200 MIPS: ralink: mt7628a.dtsi: Add SPDX GPL-2.0 license identifier As done in commit b24413180f56 ("License cleanup: add SPDX GPL-2.0 license identifier to files with no license"), this patch adds the SPDX license identifier to mt7628a.dtsi, which is currently still missing this identifier. Signed-off-by: Stefan Roese Cc: Paul Burton Cc: Harvey Hunt Cc: John Crispin Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org arch/mips/boot/dts/ralink/mt7628a.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 85cf2c37cb407ed05b55b2474b6c0667b190cc83 Author: Petr Cvek Date: Thu Jun 20 23:39:39 2019 +0200 MIPS: lantiq: Add SMP support for lantiq interrupt controller Some lantiq devices have two ICU controllers. The IRQ signal is routed to both of them and user can chose which ICU will resend the IRQ to their respective VPE. The patch adds the support for the second ICU. The patch changes a register definition of the driver. Instead of an individual IM, the whole ICU is defined. This will only affects openwrt patched kernel (vanilla doesn't have additional .dts files). Also spinlocks has been added, both cores can RMW different bitfields in the same register. Added affinity set function. The new VPE cpumask will take into the action at the irq enable. The functionality was tested on 4.14 openwrt kernel and TP-W9980B modem. Signed-off-by: Petr Cvek Signed-off-by: Paul Burton Cc: hauke@hauke-m.de Cc: john@phrozen.org Cc: linux-mips@vger.kernel.org Cc: openwrt-devel@lists.openwrt.org Cc: pakahmar@hotmail.com arch/mips/lantiq/irq.c | 130 ++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 106 insertions(+), 24 deletions(-) commit f0dd300101f316fefb19710ae83bcc97a72cdf68 Author: Petr Cvek Date: Thu Jun 20 23:39:38 2019 +0200 MIPS: lantiq: Shorten register names, remove unused macros The macros LTQ_ICU_IM1_ISR and LTQ_ICU_OFFSET seems to be unused, remove them. Allong with that, remove _IM0 substring from the macro names. The IM (interrupt module) is already defined in IOMEM access and IM0 would be misleading. Signed-off-by: Petr Cvek Signed-off-by: Paul Burton Cc: hauke@hauke-m.de Cc: john@phrozen.org Cc: linux-mips@vger.kernel.org Cc: openwrt-devel@lists.openwrt.org Cc: pakahmar@hotmail.com arch/mips/lantiq/irq.c | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) commit ba1bc0fcdeaf3bf583c1517bd2e3e29cf223c969 Author: Petr Cvek Date: Thu Jun 20 23:39:37 2019 +0200 MIPS: lantiq: Fix bitfield masking The modification of EXIN register doesn't clean the bitfield before the writing of a new value. After a few modifications the bitfield would accumulate only '1's. Signed-off-by: Petr Cvek Signed-off-by: Paul Burton Cc: hauke@hauke-m.de Cc: john@phrozen.org Cc: linux-mips@vger.kernel.org Cc: openwrt-devel@lists.openwrt.org Cc: pakahmar@hotmail.com arch/mips/lantiq/irq.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 7c6747bc2e3da8abb63f69eb724006ca8276ce2d Author: Petr Cvek Date: Thu Jun 20 23:39:36 2019 +0200 MIPS: lantiq: Remove unused macros The last use of both macros was in 4.11. Signed-off-by: Petr Cvek Signed-off-by: Paul Burton Cc: hauke@hauke-m.de Cc: john@phrozen.org Cc: linux-mips@vger.kernel.org Cc: openwrt-devel@lists.openwrt.org Cc: pakahmar@hotmail.com arch/mips/lantiq/irq.c | 4 ---- 1 file changed, 4 deletions(-) commit 64a95283c3361e42a75fbe24b6390b25b38387b6 Author: Petr Cvek Date: Thu Jun 20 23:39:35 2019 +0200 MIPS: lantiq: Fix attributes of of_device_id structure According to the checkpatch the driver structure of_device_id requires to be const and with attribute __initconst. Change it accordingly. Signed-off-by: Petr Cvek Signed-off-by: Paul Burton Cc: hauke@hauke-m.de Cc: john@phrozen.org Cc: linux-mips@vger.kernel.org Cc: openwrt-devel@lists.openwrt.org Cc: pakahmar@hotmail.com arch/mips/lantiq/irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 39588164d3c94c6519f0b826ecd05d7ee3da16c4 Author: Petr Cvek Date: Thu Jun 20 23:39:34 2019 +0200 MIPS: lantiq: Change variables to the same type as the source A structure irq_data, irq_desc_get_irq() and irq_linear_revmap() use a different type than defined in the lantiq ICU driver, which is using signed integers. The substracted result should never be negative nor is tested for that situation. Change it to unsigned. Signed-off-by: Petr Cvek Signed-off-by: Paul Burton Cc: hauke@hauke-m.de Cc: john@phrozen.org Cc: linux-mips@vger.kernel.org Cc: openwrt-devel@lists.openwrt.org Cc: pakahmar@hotmail.com arch/mips/lantiq/irq.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit aa0f58b4666f7662d178905ac45d94914f72d3d4 Author: Petr Cvek Date: Thu Jun 20 23:39:33 2019 +0200 MIPS: lantiq: Move macro directly to iomem function Using the variable as a temporary holder for the macro of the register offset value is not necessary. Move it directly to the IOMEM read/write call. Signed-off-by: Petr Cvek Signed-off-by: Paul Burton Cc: hauke@hauke-m.de Cc: john@phrozen.org Cc: linux-mips@vger.kernel.org Cc: openwrt-devel@lists.openwrt.org Cc: pakahmar@hotmail.com arch/mips/lantiq/irq.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit 1e2791448b922069b1d76cb863290c7341ff5eb5 Author: Serge Semin Date: Fri Jun 14 09:33:42 2019 +0300 mips: Remove q-accessors from non-64bit platforms There are some generic drivers in the kernel, which make use of the q-accessors or their derivatives. While at current asm/io.h the accessors are defined, their implementation is only applicable either for 64bit systems, or for systems with cpu_has_64bits flag set. Obviously there are MIPS systems which are neither of these, but still need to have those drivers supported. In this case the solution is to define some generic versions of the q-accessors, but with a limitation to be non-atomic. Such accessors are defined in the io-64-nonatomic-{hi-lo,lo-hi}.h file. The drivers which utilize the q-suffixed IO-methods are supposed to include the header file, so in case if these accessors aren't defined for the platform, the generic non-atomic versions are utilized. Currently the MIPS-specific asm/io.h file provides the q-accessors for any MIPS system even for ones, which in fact don't support them and raise BUG() in case if any of them is called. Due to this the generic versions of the accessors are never used while an attempt to call the IO-methods causes the kernel BUG(). In order to fix this we need to define the q-accessors only for the MIPS systems, which actually support them, and don't define them otherwise, so to let the corresponding drivers to use the non-atomic q-suffixed accessors. Signed-off-by: Serge Semin Suggested-by: Arnd Bergmann Cc: Vadim V. Vlasov Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: Serge Semin Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org arch/mips/include/asm/io.h | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 262e4c3893aca09d1749790880d6b9bdb047c0b9 Author: Paul Burton Date: Thu Jun 20 22:13:58 2019 +0000 FDDI: defza: Include linux/io-64-nonatomic-lo-hi.h Currently arch/mips/include/asm/io.h provides 64b memory accessor functions such as readq & writeq even on MIPS32 platforms where those accessors cannot actually perform a 64b memory access. They instead BUG(). This is unfortunate for drivers which either #ifdef on the presence of these accessors, or can function with non-atomic implementations of them found in either linux/io-64-nonatomic-lo-hi.h or linux/io-64-nonatomic-hi-lo.h. As such we're preparing to remove the definitions of these 64b accessor functions for MIPS32 kernels. In preparation for this, include linux/io-64-nonatomic-lo-hi.h in defza.c in order to provide a non-atomic implementation of the readq_relaxed & writeq_relaxed functions that are used by this code. In practice this will have no runtime effect, since use of the 64b accessor functions is conditional upon sizeof(unsigned long) == 8, ie. upon CONFIG_64BIT=y. This means the calls to these non-atomic readq & writeq implementations will be optimized out anyway, but we need their definitions to keep the compiler happy. For 64bit kernels using this code this change should also have no effect because asm/io.h will continue to provide the definitions of readq_relaxed & writeq_relaxed, which linux/io-64-nonatomic-lo-hi.h checks for before defining itself. Signed-off-by: Paul Burton Acked-by: Maciej W. Rozycki Acked-by: David S. Miller Cc: Serge Semin Cc: netdev@vger.kernel.org Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org drivers/net/fddi/defza.c | 1 + 1 file changed, 1 insertion(+) commit 166a2809d65b282272c474835ec22c882a39ca1b Author: Matthew Garrett Date: Fri Jun 7 13:51:47 2019 -0700 tpm: Don't duplicate events from the final event log in the TCG2 log After the first call to GetEventLog() on UEFI systems using the TCG2 crypto agile log format, any further log events (other than those triggered by ExitBootServices()) will be logged in both the main log and also in the Final Events Log. While the kernel only calls GetEventLog() immediately before ExitBootServices(), we can't control whether earlier parts of the boot process have done so. This will result in log entries that exist in both logs, and so the current approach of simply appending the Final Event Log to the main log will result in events being duplicated. We can avoid this problem by looking at the size of the Final Event Log just before we call ExitBootServices() and exporting this to the main kernel. The kernel can then skip over all events that occured before ExitBootServices() and only append events that were not also logged to the main log. Signed-off-by: Matthew Garrett Reported-by: Joe Richey Suggested-by: Joe Richey Acked-by: Ard Biesheuvel Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/eventlog/efi.c | 11 ++++++++++- drivers/firmware/efi/libstub/tpm.c | 30 ++++++++++++++++++++++++++++++ include/linux/efi.h | 1 + 3 files changed, 41 insertions(+), 1 deletion(-) commit 82d736ac56d7cd78696c5234853684bad05efadf Author: Matthew Garrett Date: Fri Jun 7 13:51:46 2019 -0700 Abstract out support for locating an EFI config table We want to grab a pointer to the TPM final events table, so abstract out the existing code for finding an FDT table and make it generic. Signed-off-by: Matthew Garrett Reviewed-by: Ard Biesheuvel Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/firmware/efi/libstub/efi-stub-helper.c | 15 ++++++++++++++ drivers/firmware/efi/libstub/efistub.h | 2 ++ drivers/firmware/efi/libstub/fdt.c | 27 +++++++++----------------- 3 files changed, 26 insertions(+), 18 deletions(-) commit db4d8cb9c9f2af71c4d087817160d866ed572cc9 Author: Vadim Sukhomlinov Date: Mon Jun 10 15:01:18 2019 -0700 tpm: Fix TPM 1.2 Shutdown sequence to prevent future TPM operations TPM 2.0 Shutdown involve sending TPM2_Shutdown to TPM chip and disabling future TPM operations. TPM 1.2 behavior was different, future TPM operations weren't disabled, causing rare issues. This patch ensures that future TPM operations are disabled. Fixes: d1bd4a792d39 ("tpm: Issue a TPM2_Shutdown for TPM2 devices.") Cc: stable@vger.kernel.org Signed-off-by: Vadim Sukhomlinov [dianders: resolved merge conflicts with mainline] Signed-off-by: Douglas Anderson Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm-chip.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6b0326190205603fa9b7fe1b05ff1f8fb22de266 Author: Matthew Garrett Date: Mon May 20 13:55:01 2019 -0700 efi: Attempt to get the TCG2 event log in the boot stub Right now we only attempt to obtain the SHA1-only event log. The protocol also supports a crypto agile log format, which contains digests for all algorithms in use. Attempt to obtain this first, and fall back to obtaining the older format if the system doesn't support it. This is lightly complicated by the event sizes being variable (as we don't know in advance which algorithms are in use), and the interface giving us back a pointer to the start of the final entry rather than a pointer to the end of the log - as a result, we need to parse the final entry to figure out its length in order to know how much data to copy up to the OS. Signed-off-by: Matthew Garrett Acked-by: Ard Biesheuvel Reviewed-by: Bartosz Szczepanek Tested-by: Bartosz Szczepanek Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/firmware/efi/libstub/tpm.c | 50 +++++++++++++++++++++++++------------- 1 file changed, 33 insertions(+), 17 deletions(-) commit fe7eb0230c3dd95c947e18248808d7038c65f43e Author: Matthew Garrett Date: Mon May 20 13:55:00 2019 -0700 tpm: Append the final event log to the TPM event log Any events that are logged after GetEventsLog() is called are logged to the EFI Final Events table. These events are defined as being in the crypto agile log format, so we can just append them directly to the existing log if it's in the same format. In theory we can also construct old-style SHA1 log entries for devices that only return logs in that format, but EDK2 doesn't generate the final event log in that case so it doesn't seem worth it at the moment. Signed-off-by: Matthew Garrett Reviewed-by: Bartosz Szczepanek Tested-by: Bartosz Szczepanek Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/eventlog/efi.c | 50 +++++++++++++++++++++++++++++++++++------ 1 file changed, 43 insertions(+), 7 deletions(-) commit c46f3405692de1ac82240d927b9c7a0f9d6a4a36 Author: Matthew Garrett Date: Mon May 20 13:54:59 2019 -0700 tpm: Reserve the TPM final events table UEFI systems provide a boot services protocol for obtaining the TPM event log, but this is unusable after ExitBootServices() is called. Unfortunately ExitBootServices() itself triggers additional TPM events that then can't be obtained using this protocol. The platform provides a mechanism for the OS to obtain these events by recording them to a separate UEFI configuration table which the OS can then map. Unfortunately this table isn't self describing in terms of providing its length, so we need to parse the events inside it to figure out how long it is. Since the table isn't mapped at this point, we need to extend the length calculation function to be able to map the event as it goes along. (Fixes by Bartosz Szczepanek ) Signed-off-by: Matthew Garrett Acked-by: Ard Biesheuvel Reviewed-by: Bartosz Szczepanek Tested-by: Bartosz Szczepanek Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/eventlog/tpm2.c | 2 +- drivers/firmware/efi/efi.c | 2 + drivers/firmware/efi/tpm.c | 63 ++++++++++++++++++++++-- include/linux/efi.h | 9 ++++ include/linux/tpm_eventlog.h | 102 +++++++++++++++++++++++++++++++++++---- 5 files changed, 164 insertions(+), 14 deletions(-) commit 44038bc514a244fba9d0d6d698b15970185ac251 Author: Matthew Garrett Date: Mon May 20 13:54:58 2019 -0700 tpm: Abstract crypto agile event size calculations We need to calculate the size of crypto agile events in multiple locations, including in the EFI boot stub. The easiest way to do this is to put it in a header file as an inline and leave a wrapper to ensure we don't end up with multiple copies of it embedded in the existing code. Signed-off-by: Matthew Garrett Reviewed-by: Bartosz Szczepanek Tested-by: Bartosz Szczepanek Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/eventlog/tpm2.c | 47 +-------------------------- include/linux/tpm_eventlog.h | 68 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+), 46 deletions(-) commit 782779b60faa2fc7ff609ac8ef938260fd792c0f Author: Kees Cook Date: Mon Apr 1 12:06:07 2019 -0700 tpm: Actually fail on TPM errors during "get random" A "get random" may fail with a TPM error, but those codes were returned as-is to the caller, which assumed the result was the number of bytes that had been written to the target buffer, which could lead to a kernel heap memory exposure and over-read. This fixes tpm1_get_random() to mask positive TPM errors into -EIO, as before. [ 18.092103] tpm tpm0: A TPM error (379) occurred attempting get random [ 18.092106] usercopy: Kernel memory exposure attempt detected from SLUB object 'kmalloc-64' (offset 0, size 379)! Link: https://bugzilla.redhat.com/show_bug.cgi?id=1650989 Reported-by: Phil Baker Reported-by: Craig Robson Fixes: 7aee9c52d7ac ("tpm: tpm1: rewrite tpm1_get_random() using tpm_buf structure") Cc: Laura Abbott Cc: Tomas Winkler Cc: Jarkko Sakkinen Cc: stable@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Tomas Winkler Tested-by: Bartosz Szczepanek Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm1-cmd.c | 7 +++++-- drivers/char/tpm/tpm2-cmd.c | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) commit 14331726a3c47bb1649dab155a84610f509d414e Author: Jason Gunthorpe Date: Fri May 24 12:14:08 2019 -0300 mm/hmm: Remove confusing comment and logic from hmm_release hmm_release() is called exactly once per hmm. ops->release() cannot accidentally trigger any action that would recurse back onto hmm->mirrors_sem. This fixes a use after-free race of the form: CPU0 CPU1 hmm_release() up_write(&hmm->mirrors_sem); hmm_mirror_unregister(mirror) down_write(&hmm->mirrors_sem); up_write(&hmm->mirrors_sem); kfree(mirror) mirror->ops->release(mirror) The only user we have today for ops->release is an empty function, so this is unambiguously safe. As a consequence of plugging this race drivers are not allowed to register/unregister mirrors from within a release op. Signed-off-by: Jason Gunthorpe Reviewed-by: Christoph Hellwig Tested-by: Philip Yang mm/hmm.c | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) commit 2dcc3eb8ab50c9ca816cc60abfd94bea559d3e86 Author: Jason Gunthorpe Date: Thu May 23 11:40:24 2019 -0300 mm/hmm: Poison hmm_range during unregister Trying to misuse a range outside its lifetime is a kernel bug. Use poison bytes to help detect this condition. Double unregister will reliably crash. Signed-off-by: Jason Gunthorpe Reviewed-by: Jérôme Glisse Reviewed-by: John Hubbard Acked-by: Souptick Joarder Reviewed-by: Ralph Campbell Reviewed-by: Ira Weiny Tested-by: Philip Yang mm/hmm.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 187229c2ddd12a5bb5cd6bb3fbef9ecbc6eead92 Author: Jason Gunthorpe Date: Thu May 23 11:31:45 2019 -0300 mm/hmm: Remove racy protection against double-unregistration No other register/unregister kernel API attempts to provide this kind of protection as it is inherently racy, so just drop it. Callers should provide their own protection, and it appears nouveau already does. Signed-off-by: Jason Gunthorpe Reviewed-by: Jérôme Glisse Reviewed-by: John Hubbard Reviewed-by: Ralph Campbell Reviewed-by: Christoph Hellwig Tested-by: Philip Yang mm/hmm.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 0fec7e72ae1391bb2d7527efb54fe6ae88acabce Author: Icenowy Zheng Date: Thu Jun 20 15:47:44 2019 +0200 net: stmmac: sun8i: force select external PHY when no internal one The PHY selection bit also exists on SoCs without an internal PHY; if it's set to 1 (internal PHY, default value) then the MAC will not make use of any PHY on such SoCs. This problem appears when adapting for H6, which has no real internal PHY (the "internal PHY" on H6 is not on-die, but on a co-packaged AC200 chip, connected via RMII interface at GPIO bank A). Force the PHY selection bit to 0 when the SOC doesn't have an internal PHY, to address the problem of a wrong default value. Signed-off-by: Icenowy Zheng Signed-off-by: Ondrej Jirman Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 5 +++++ 1 file changed, 5 insertions(+) commit adadd38c5322008e8ea8c6333bfbef5ce944d181 Author: Icenowy Zheng Date: Thu Jun 20 15:47:43 2019 +0200 net: stmmac: sun8i: add support for Allwinner H6 EMAC The EMAC on Allwinner H6 is just like the one on A64. The "internal PHY" on H6 is on a co-packaged AC200 chip, and it's not really internal (it's connected via RMII at PA GPIO bank). Add support for the Allwinner H6 EMAC in the dwmac-sun8i driver. Signed-off-by: Icenowy Zheng Signed-off-by: Ondrej Jirman Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 86d617d6c79d79288ca608b6fb0a2467b0e8ddbb Author: Sakari Ailus Date: Thu Jun 20 10:17:53 2019 -0400 media: MAINTAINERS: Add maintainers for Media Controller When Media Controller was merged to mainline long, long time ago, no-one bothered to think what its MAINTAINERS entry should be. Now that Media Controller is moved into its own directory, address this at the same time. So tell people to mail patches to myself and Laurent Pinchart. Note that the patches are still merged through the Media tree, just like any other driver or framework bits that have separate "mail patches to" entries different from the main drivers/media one. Signed-off-by: Sakari Ailus Signed-off-by: Laurent Pinchart Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 92cd14408be36310743db9b874a13cf6eb3120c1 Author: Dmitry Osipenko Date: Sun Jun 23 13:07:30 2019 -0400 media: staging: media: tegra-vde: Defer dmabuf's unmapping Frequent IOMMU remappings take about 50% of CPU usage because there is quite a lot to remap. Defer dmabuf's unmapping by 5 seconds in order to mitigate the mapping overhead which goes away completely and driver works as fast as in a case of a disabled IOMMU. The case of a disabled IOMMU should also benefit a tad from the caching since CPU cache maintenance that happens on dmabuf's attaching takes some resources. Signed-off-by: Dmitry Osipenko Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/tegra-vde/Makefile | 2 +- drivers/staging/media/tegra-vde/dmabuf-cache.c | 226 +++++++++++++++++++++++++ drivers/staging/media/tegra-vde/iommu.c | 2 - drivers/staging/media/tegra-vde/vde.c | 143 ++++------------ drivers/staging/media/tegra-vde/vde.h | 18 +- 5 files changed, 276 insertions(+), 115 deletions(-) commit b301f8de192504518d59662404426198229bb79d Author: Dmitry Osipenko Date: Sun Jun 23 13:07:29 2019 -0400 media: staging: media: tegra-vde: Add IOMMU support All Tegra's could provide memory isolation for the video decoder hardware using IOMMU, it is also required for Tegra30+ in order to handle sparse dmabuf's which GPU exports in a default kernel configuration. Signed-off-by: Dmitry Osipenko Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/tegra-vde/Kconfig | 1 + drivers/staging/media/tegra-vde/Makefile | 1 + drivers/staging/media/tegra-vde/iommu.c | 159 +++++++++++++++++ drivers/staging/media/tegra-vde/trace.h | 2 + .../staging/media/tegra-vde/{tegra-vde.c => vde.c} | 188 +++++++++++---------- drivers/staging/media/tegra-vde/vde.h | 91 ++++++++++ 6 files changed, 349 insertions(+), 93 deletions(-) commit 6bc5a4a1927556ff9adce1aa95ea408c95453225 Author: Hans Verkuil Date: Thu Jun 20 07:43:41 2019 -0400 media: hdpvr: fix locking and a missing msleep This driver has three locking issues: - The wait_event_interruptible() condition calls hdpvr_get_next_buffer(dev) which uses a mutex, which is not allowed. Rewrite with list_empty_careful() that doesn't need locking. - In hdpvr_read() the call to hdpvr_stop_streaming() didn't lock io_mutex, but it should have since stop_streaming expects that. - In hdpvr_device_release() io_mutex was locked when calling flush_work(), but there it shouldn't take that mutex since the work done by flush_work() also wants to lock that mutex. There are also two other changes (suggested by Keith): - msecs_to_jiffies(4000); (a NOP) should have been msleep(4000). - Change v4l2_dbg to v4l2_info to always log if streaming had to be restarted. Reported-by: Keith Pyle Suggested-by: Keith Pyle Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/hdpvr/hdpvr-video.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 07d89227a983df957a6a7c56f7c040cde9ac571f Author: Boris Brezillon Date: Wed Jun 19 05:21:33 2019 -0400 media: v4l2: Test type instead of cfg->type in v4l2_ctrl_new_custom() cfg->type can be overridden by v4l2_ctrl_fill() and the new value is stored in the local type var. Fix the tests to use this local var. Fixes: 0996517cf8ea ("V4L/DVB: v4l2: Add new control handling framework") Cc: Signed-off-by: Boris Brezillon [hverkuil-cisco@xs4all.nl: change to !qmenu and !qmenu_int (checkpatch)] Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-ctrls.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 021d2ad0f6955d41b19fdb3190f5c351930c9a2d Author: Eugen Hristev Date: Wed Jun 19 03:24:41 2019 -0400 media: atmel: atmel-isc: fix i386 build error Changed module parameters to static. Reported-by: kbuild test robot Signed-off-by: Eugen Hristev Acked-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/atmel/atmel-isc-base.c | 4 ++-- drivers/media/platform/atmel/atmel-isc.h | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) commit ba74edc6def24325af256eea8e8790ce6cdb838d Author: Ezequiel Garcia Date: Tue Jun 18 19:17:31 2019 -0400 media: v4l2-ctrl: Move compound control initialization Rework std_init adding an explicit initialization for compound controls. While here, make sure the control is initialized to zero, before providing default values for all its fields. Reviewed-by: Boris Brezillon Signed-off-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-ctrls.c | 37 +++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) commit fd5b4046c7bb3073a2aa03d994cdb698586c5588 Author: Ezequiel Garcia Date: Tue Jun 18 19:12:37 2019 -0400 media: hantro: Use vb2_get_buffer Use the newly introduced vb2_get_buffer API and avoid accessing buffers in the queue directly. Signed-off-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/hantro/hantro_drv.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 782dc2d58923a4e180c48733b6c70d8d73d972cd Author: Puranjay Mohan Date: Tue Jun 18 00:19:37 2019 -0400 media: pci: cx88: Change the type of 'missed' to u64 Callers of hrtimer_forward_now() should save the return value in u64. change type of missed from unsigned long to u64. Signed-off-by: Puranjay Mohan Signed-off-by: Hans Verkuil [hverkuil-cisco@xs4all.nl: type changed, so %ld -> %llu in printk] Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/cx88/cx88-input.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 77ae46e11df5c96bb4582633851f838f5d954df4 Author: André Almeida Date: Mon Jun 17 12:28:02 2019 -0400 media: vimc: cap: check v4l2_fill_pixfmt return value v4l2_fill_pixfmt() returns -EINVAL if the pixelformat used as parameter is invalid or if the user is trying to use a multiplanar format with the singleplanar API. Currently, the vimc_cap_try_fmt_vid_cap() returns such value, but vimc_cap_s_fmt_vid_cap() is ignoring it. Fix that and returns an error value if vimc_cap_try_fmt_vid_cap() has failed. Signed-off-by: André Almeida Suggested-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vimc/vimc-capture.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 2161536516edcc0be31109eb1284939119e7ba6d Author: Hans Verkuil Date: Mon Jun 17 05:36:16 2019 -0400 media: media/pci: set device_caps in struct video_device Instead of filling in the struct v4l2_capability device_caps field, fill in the struct video_device device_caps field. That way the V4L2 core knows what the capabilities of the video device are. But this only really works if all drivers use this, so convert all pci drivers in this patch. Tested with cx88-blackbird and ivtv PVR-350. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/common/saa7146/saa7146_fops.c | 9 +++++ drivers/media/common/saa7146/saa7146_video.c | 18 +++------- drivers/media/pci/bt8xx/bttv-driver.c | 50 ++++++++++++-------------- drivers/media/pci/cobalt/cobalt-v4l2.c | 14 ++++---- drivers/media/pci/cx18/cx18-ioctl.c | 5 +-- drivers/media/pci/cx18/cx18-streams.c | 1 + drivers/media/pci/cx23885/cx23885-417.c | 13 ++++--- drivers/media/pci/cx23885/cx23885-video.c | 22 +++++++----- drivers/media/pci/cx25821/cx25821-video.c | 14 ++++---- drivers/media/pci/cx88/cx88-blackbird.c | 4 +++ drivers/media/pci/cx88/cx88-video.c | 32 +++++++---------- drivers/media/pci/dt3155/dt3155.c | 5 ++- drivers/media/pci/ivtv/ivtv-cards.h | 3 +- drivers/media/pci/ivtv/ivtv-ioctl.c | 7 ---- drivers/media/pci/ivtv/ivtv-streams.c | 14 +++++--- drivers/media/pci/ivtv/ivtvfb.c | 10 ++++++ drivers/media/pci/meye/meye.c | 6 +--- drivers/media/pci/saa7134/saa7134-core.c | 15 ++++++++ drivers/media/pci/saa7134/saa7134-empress.c | 4 +++ drivers/media/pci/saa7134/saa7134-video.c | 46 +++++------------------- drivers/media/pci/saa7164/saa7164-encoder.c | 15 +++----- drivers/media/pci/saa7164/saa7164-vbi.c | 15 +++----- drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c | 5 ++- drivers/media/pci/solo6x10/solo6x10-v4l2.c | 5 ++- drivers/media/pci/sta2x11/sta2x11_vip.c | 6 ++-- drivers/media/pci/tw68/tw68-video.c | 8 ++--- drivers/media/pci/tw686x/tw686x-video.c | 5 ++- 27 files changed, 159 insertions(+), 192 deletions(-) commit 374d62e7aa50f66c1a4316be9221df4d0f38addd Author: Janusz Krzysztofik Date: Mon May 20 17:27:47 2019 -0400 media: v4l2-subdev: Verify v4l2_subdev_call() pad config argument Extend parameter checks performed by v4l2_subdev_call() with a check for a non-NULL pad config pointer if V4L2_SUBDEV_FORMAT_TRY format type is requested so drivers don't need to care. Signed-off-by: Janusz Krzysztofik Reviewed-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-subdev.c | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) commit a4f4a763d8a01d0f461e3b8c4774ed45e9ded5f4 Author: Janusz Krzysztofik Date: Mon May 20 17:27:46 2019 -0400 media: v4l2-subdev: Verify v4l2_subdev_call() pointer arguments Parameters passed to check helpers are now obtained by dereferencing unverified pointer arguments. Check validity of those pointers first. Signed-off-by: Janusz Krzysztofik Reviewed-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-subdev.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit a8fa55078a7784a99a2ce389b5d7456a3be9a941 Author: Janusz Krzysztofik Date: Mon May 20 17:27:45 2019 -0400 media: v4l2-subdev: Verify arguments in v4l2_subdev_call() Correctness of format type (try or active) and pad number parameters passed to subdevice operation callbacks is now verified only for IOCTL calls. However, those callbacks are also used by drivers, e.g., V4L2 host interfaces. Since both subdev_do_ioctl() and drivers are using v4l2_subdev_call() macro while calling subdevice operations, move those parameter checks from subdev_do_ioctl() to v4l2_subdev_call() so we can avoid taking care of those checks inside drivers. Define a wrapper function for each operation callback in scope, then gather those wrappers in a static v4l2_subdev_ops structure so the v4l2_subdev_call() macro can find them easy if provided. Signed-off-by: Janusz Krzysztofik Reviewed-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-subdev.c | 238 +++++++++++++++++++++------------- include/media/v4l2-subdev.h | 6 + 2 files changed, 152 insertions(+), 92 deletions(-) commit b152a403a0208aad25f9977f12a2e5a039e246b0 Author: Philipp Zabel Date: Tue Jun 18 12:45:35 2019 -0400 media: coda: encoder parameter change support Add support for dynamically changing the GOP size, bitrate, frame rate, constant intra quantization parameter, number of intra refresh macro blocks and slice mode parameters. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-bit.c | 83 +++++++++++++++++++++++++++++++ drivers/media/platform/coda/coda-common.c | 7 +++ drivers/media/platform/coda/coda.h | 7 +++ drivers/media/platform/coda/coda_regs.h | 18 +++++++ 4 files changed, 115 insertions(+) commit 0414b4756820e1ec908f95953cea959d26b0063b Author: Philipp Zabel Date: Tue Jun 18 12:45:34 2019 -0400 media: coda: add coda_slice_mode() function Changing slice mode dynamically while encoding will require to calculate the register value again, so split it out into a separate function. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-bit.c | 45 ++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 21 deletions(-) commit cdc841b5ac05fa9fcfe1be5d55bb57c0d4749a49 Author: Philipp Zabel Date: Tue Jun 18 12:45:33 2019 -0400 media: coda: store device pointer in driver structure instead of pdev Currently the platform device pointer is stored in struct coda_dev, only to convert it into a device pointer wherever it is used. Just store the device pointer directly. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-bit.c | 7 +++---- drivers/media/platform/coda/coda-common.c | 33 ++++++++++++++----------------- drivers/media/platform/coda/coda.h | 2 +- 3 files changed, 19 insertions(+), 23 deletions(-) commit 4b424e9e01e6aec16d6e1deaa99f03598ccb8975 Author: Philipp Zabel Date: Tue Jun 18 12:45:32 2019 -0400 media: coda: mark last returned frame If reordering is not enabled, the last decoded frame has to be the last returned buffer. Otherwise wait for the firmware to report no more frame to display. In that case the return buffer is the last one as well, and can be reported as such. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-bit.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit d09ed310142af3e87359620d12f256969f8de439 Author: Philipp Zabel Date: Tue Jun 18 12:45:31 2019 -0400 media: coda: mark last pending buffer or last meta on decoder stop command If there is still a buffer pending, mark it as the last buffer. It will create a meta that is flagged as last when the buffer is copied into the bitstream ring buffer. If there are no more buffers pending, find the last bitstream meta and mark it as last. If there is no bitstream meta either, wake up the capture queue as there will be no more decoded frames. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-bit.c | 4 +++ drivers/media/platform/coda/coda-common.c | 44 ++++++++++++++++++++++++++----- drivers/media/platform/coda/coda.h | 1 + 3 files changed, 42 insertions(+), 7 deletions(-) commit 9ee50a9489f16048a82c94139f5436f4bb2620d9 Author: Philipp Zabel Date: Tue Jun 18 12:45:30 2019 -0400 media: coda: lock capture queue wakeup against encoder stop command Make sure that an encoder stop command running concurrently with an encoder finish_run always either flags the last returned buffer or wakes up the capture queue to signal the end of stream condition afterwards. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-bit.c | 7 +++++++ drivers/media/platform/coda/coda-common.c | 19 ++++++++++++++----- drivers/media/platform/coda/coda.h | 6 ++++++ 3 files changed, 27 insertions(+), 5 deletions(-) commit cf895efc4d9c2dfb3cd03cf298ea55637feba901 Author: Philipp Zabel Date: Tue Jun 18 12:45:29 2019 -0400 media: coda: flag the last encoded buffer Use the flagged last output buffer to also flag the corresponding capture buffer after encoding. This causes the end of stream event to be issued and the buffer to be dequeued with the last flag set. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-bit.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 0f8f633834357f2513d21a6468db6d5989e8c494 Author: Philipp Zabel Date: Tue Jun 18 12:45:28 2019 -0400 media: coda: only wake up capture queue if no pending buffers to encode If there are no pending queued output buffers to be encoded, waking up the capture queue with -EPIPE signals end of stream. If there are pending buffers on the other hand, setting the V4L2_BUF_FLAG_LAST on the resulting encoded capture buffers is all that is needed. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-common.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 0ee08a1e7b713dcf0d2526af35314dd7f21c8138 Author: Philipp Zabel Date: Tue Jun 18 12:45:27 2019 -0400 media: coda: retire coda_buf_is_end_of_stream Using the output queue sequence counter to determine the last buffer to be encoded or decoded always was fragile at best. Now that we have the last buffer flag propagating from the output queue to the capture queue correctly, this is not needed anymore. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-common.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit 9e3b94cc03db36c4735f0daa5a8789557550efc1 Author: Philipp Zabel Date: Tue Jun 18 12:45:26 2019 -0400 media: coda: mark the last output buffer on encoder stop command Mark the last output buffer to be encoded. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-common.c | 5 +++++ 1 file changed, 5 insertions(+) commit a02f6ca3367e1fd3cbd14e8798af90b8b667bbbe Author: Philipp Zabel Date: Tue Jun 18 12:45:25 2019 -0400 media: coda: only set the stream end flags if there are no more pending output buffers If there are still queued output buffers pending to be copied into the bitstream ring buffer, setting the stream end flag should be deferred until the marked last output buffer is written into the bitstream ring buffer. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-common.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 1b438b454085238b44875ac6cd508fc1106f07d1 Author: Philipp Zabel Date: Tue Jun 18 12:45:24 2019 -0400 media: coda: mark the last output buffer on decoder stop command Mark the last output buffer to be decoded and only copy pending queued output buffers into the bitstream ring buffer in the BIT processor decoder case. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-bit.c | 3 +++ drivers/media/platform/coda/coda-common.c | 6 ++++++ 2 files changed, 9 insertions(+) commit aa3972a358b6f13b482975152e3fa449b7a32974 Author: Philipp Zabel Date: Tue Jun 18 12:45:23 2019 -0400 media: coda: allow flagging last output buffer internally Since V4L2_BUF_FLAG_LAST is a CAPTURE only flag, clear it from OUTPUT buffers in QBUF and DQBUF. This allows to use the flag internally to signal the last buffer to decode after a decoder stop command was issued. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-common.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) commit b3b7d96817cdb8b6fc353867705275dce8f41ccc Author: Philipp Zabel Date: Tue Jun 18 12:45:22 2019 -0400 media: coda: increment sequence offset for the last returned frame If no more frames are decoded in bitstream end mode, and a previously decoded frame has been returned, the firmware still increments the frame number. To avoid a sequence number mismatch after decoder restart, increment the sequence_offset correction parameter. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-bit.c | 3 +++ 1 file changed, 3 insertions(+) commit e7fd95849b3c25ae1604ba2788e63fe6570ba0ff Author: Philipp Zabel Date: Tue Jun 18 12:45:21 2019 -0400 media: coda: flush bitstream ring buffer on decoder restart The bitstream ringbuffer might be in an underrun state after draining, or it might still contain unread data if the previous decoder stop command was flagged as immediate. Flush the bitstream ring buffer during V4L2_DEC_CMD_START to get into a well defined state. Also fill the bitstream with buffers that have been queued during draining, to resume decoding immediately. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-bit.c | 20 ++++++++++++++++++++ drivers/media/platform/coda/coda-common.c | 7 +++++++ drivers/media/platform/coda/coda.h | 1 + 3 files changed, 28 insertions(+) commit f74c0a29eca57e0024d31d41cbc4fc3d020bb42a Author: Philipp Zabel Date: Tue Jun 18 12:45:20 2019 -0400 media: coda: do not enforce 512-byte initial bitstream payload on CODA960 On CODA960, sequence initialization can succeed if less than 512 bytes are ready in the bitstream ring buffer. On other variants, warn about too small payload in start_streaming. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-common.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2719ef7d1b1107892923a1f5b7cbc28cccbdea3d Author: Philipp Zabel Date: Tue Jun 18 12:45:19 2019 -0400 media: coda: pad first buffer with repeated MPEG headers to fix sequence init If the first buffer contains only headers, the sequence initialization command fails. On CodaHx4 the buffer must be padded to at least 512 bytes, on CODA960 it seems to be enough to just repeat the sequence and extension headers (MPEG-2) or the VOS and VO headers (MPEG-4) once for for sequence initialization to succeed without further bitstream data. On CodaHx4 the headers can be repeated multiple times until the 512 byte mark is reached. A similar issue was solved for h.264 by padding with a filler NAL in commit 0eef89403ece ("[media] coda: pad first h.264 buffer to 512 bytes"). Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-bit.c | 59 ++++++++++++++++++++++++++++++-- drivers/media/platform/coda/coda-mpeg2.c | 43 +++++++++++++++++++++++ drivers/media/platform/coda/coda-mpeg4.c | 38 ++++++++++++++++++++ drivers/media/platform/coda/coda.h | 2 ++ 4 files changed, 139 insertions(+), 3 deletions(-) commit ccb901196ec5298458f2cd2c4c43652c3c0d5032 Author: Philipp Zabel Date: Tue Jun 18 12:45:18 2019 -0400 media: coda: make coda_bitstream_queue more versatile Pass vaddr and size to coda_bitstream_queue instead of a struct vb2_v4l2_buffer to make it reusable for queueing data that is not exactly a whole v4l2 buffer into the bitstream ringbuffer. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-bit.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) commit 94af4c45a7a6f2f4f6fcd93e07078b319ac78016 Author: Philipp Zabel Date: Tue Jun 18 12:45:17 2019 -0400 media: coda: integrate internal frame metadata into a structure Combine the separate auxiliary buffer, buffer meta, frame type, and decode error arrays into an array of struct coda_internal_frame. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-bit.c | 62 ++++++++++++++++++---------------- drivers/media/platform/coda/coda.h | 12 ++++--- 2 files changed, 40 insertions(+), 34 deletions(-) commit 236306be0b2cbb52d4f18b2550d05f7463caf3c3 Author: Philipp Zabel Date: Tue Jun 18 12:45:16 2019 -0400 media: coda: implement decoder source change event The stateful decoder API requires decoders to signal detection of stream dimensions via the V4L2_EVENT_SOURCE_CHANGE event. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-common.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 497e6b8559a64f41d6dd65a68e8a8576ba637fda Author: Philipp Zabel Date: Tue Jun 18 12:45:15 2019 -0400 media: coda: add sequence initialization work Add a sequence initialization work item to be run when OUTPUT buffers are queued in the initialization state. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-bit.c | 25 +++++++++++++++++++++++++ drivers/media/platform/coda/coda-common.c | 24 ++++++++++++++++++++++++ drivers/media/platform/coda/coda.h | 2 ++ 3 files changed, 51 insertions(+) commit 8e717396d87ec0a26ad6f72ba5697c850ed0b8f8 Author: Philipp Zabel Date: Tue Jun 18 12:45:14 2019 -0400 media: coda: split decoder sequence initialization out of start decoding The sequence initialization already has to happen during the initialization phase, after headers have been queued on the OUTPUT queue. This means that sequence initialization has to be queued as a work item from QBUF on the OUTPUT queue. The internal framebuffer setup should be done later during VIDIOC_REQBUFS() on the CAPTURE queue. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-bit.c | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) commit 7e5eaae0af2eccb7ac94eb3d958d4c052f960e7b Author: Marco Felsch Date: Tue Jun 18 12:45:13 2019 -0400 media: coda: fix V4L2_DEC_CMD_STOP when all buffers are already consumed When the DEC_CMD_STOP command is issued after the context has already consumed all the queued buffers, we need to make sure to wake the destination queue with last_buffer_dequeued set, to allow userspace to make progress in its EOS handling. As there might still be picture run workers pending at that point, we need to synchronize with them, so the sequence number comparison reads stable values. reword commit message] Signed-off-by: Marco Felsch Signed-off-by: Lucas Stach Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-common.c | 6 ++++++ 1 file changed, 6 insertions(+) commit cce5b73265db051e3259964f2f4e3b7faa661ab8 Author: Philipp Zabel Date: Tue Jun 18 12:45:12 2019 -0400 media: coda: add coda_wake_up_capture_queue Combine setting the last_buffer_dequeued flag on the capture video queue and waking up its done workqueue into a helper function. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-common.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit f3775f89852d167990b0d718587774cf00d22ac2 Author: Marco Felsch Date: Tue Jun 18 12:45:11 2019 -0400 media: coda: fix last buffer handling in V4L2_ENC_CMD_STOP coda_encoder_cmd() is racy, as the last scheduled picture run worker can still be in-flight while the ENC_CMD_STOP command is issued. Depending on the exact timing the sequence numbers might already be changed, but the last buffer might not have been put on the destination queue yet. In this case the current implementation would prematurely wake the destination queue with last_buffer_dequeued=true, causing userspace to call streamoff before the last buffer is handled. Close this race window by synchronizing with the pic_run_worker before doing the sequence check. Signed-off-by: Marco Felsch [l.stach@pengutronix.de: switch to flush_work, reword commit message] Signed-off-by: Lucas Stach Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-common.c | 2 ++ 1 file changed, 2 insertions(+) commit 56d159a4ec6d8da7313aac6fcbb95d8fffe689ba Author: Philipp Zabel Date: Tue Jun 18 12:45:10 2019 -0400 media: coda: fix mpeg2 sequence number handling Sequence number handling assumed that the BIT processor frame number starts counting at 1, but this is not true for the MPEG-2 decoder, which starts at 0. Fix the sequence counter offset detection to handle this. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-bit.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit f66a607d73389263694c9d597bcf8d36ffe3b12d Author: Philipp Zabel Date: Tue Jun 18 12:45:09 2019 -0400 media: coda: use mem2mem try_en/decoder_cmd helpers Use mem2mem try_en/decoder_cmd helpers to ensure consistent behaviour with other video codec drivers. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-common.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) commit 60c74167fef4d25112ce32030bdbb958a8d01cae Author: Michael Tretter Date: Tue Jun 18 12:45:08 2019 -0400 media: coda: implement CMD_START to restart decoding The CMD_START shall be used to start the processing after a drain that was initiated with CMD_STOP. Up until now, a drain on coda could only be finished with a STREAMOFF-STREAMON, which resulted in a reset of the device. Signed-off-by: Michael Tretter Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-common.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit 13efd80acaa4cdb61fde52732178ff9eb4141104 Author: Krzysztof Kozlowski Date: Fri Jun 21 20:02:03 2019 +0200 ARM: dts: exynos: Add GPU/Mali 400 node to Exynos4 Add nodes for GPU (Mali 400) to Exynos4210 and Exynos4412. Describe the GPU as much as possible however still few elements are missing: 1. Exynos4210 bus clock is not described in hardware manual therefore the IP gate clock was provided, 2. Exynos4412: Not sure what to do with CLK_G3D clock responsible for gating entire IP block (it is now being disabled as unused), 3. Regulator supplies on Trats board. Limited testing on Odroid U3 (Exynos4412). Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos4.dtsi | 36 +++++++++++++++++++++++++ arch/arm/boot/dts/exynos4210-origen.dts | 5 ++++ arch/arm/boot/dts/exynos4210-trats.dts | 4 +++ arch/arm/boot/dts/exynos4210-universal_c210.dts | 5 ++++ arch/arm/boot/dts/exynos4210.dtsi | 17 ++++++++++++ arch/arm/boot/dts/exynos4412-itop-scp-core.dtsi | 5 ++++ arch/arm/boot/dts/exynos4412-midas.dtsi | 5 ++++ arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 5 ++++ arch/arm/boot/dts/exynos4412-prime.dtsi | 7 +++++ arch/arm/boot/dts/exynos4412.dtsi | 25 +++++++++++++++++ 10 files changed, 114 insertions(+) commit 4a7bc07f5c04219067b328a3179bd3233fb0b7cd Author: Krzysztof Kozlowski Date: Fri Jun 21 20:02:02 2019 +0200 ARM: dts: exynos: Add GPU/Mali 400 node to Exynos3250 Add nodes for GPU (Mali 400) to Exynos3250. This is still limited and not tested: 1. No dynamic voltage and frequency scaling, 2. Not sure what to do with CLK_G3D clock responsible for gating entire IP block (it is now being disabled as unused). Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos3250-artik5.dtsi | 5 +++++ arch/arm/boot/dts/exynos3250-monk.dts | 5 +++++ arch/arm/boot/dts/exynos3250-rinato.dts | 5 +++++ arch/arm/boot/dts/exynos3250.dtsi | 33 ++++++++++++++++++++++++++++++++ 4 files changed, 48 insertions(+) commit 8b388cee66350f2dd8e77afb9eab798ed5c796e9 Author: Krzysztof Kozlowski Date: Tue Jun 18 21:07:29 2019 +0200 dt-bindings: gpu: mali: Add Samsung compatibles for Midgard and Utgard Add vendor compatibles for specific implementation of Mali Utgard (Exynos3250, Exynos4-family) and Midgard (Exynos5433, Exynos7). Signed-off-by: Krzysztof Kozlowski Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt | 1 + Documentation/devicetree/bindings/gpu/arm,mali-utgard.txt | 1 + 2 files changed, 2 insertions(+) commit 4dc2a25d058d71f39e41da986777327b423b92f1 Author: Krzysztof Kozlowski Date: Fri Jun 21 20:02:05 2019 +0200 arm64: dts: exynos: Add GPU/Mali T760 node to Exynos7 Add nodes for GPU (Mali T760) to Exynos7. Current support for Exynos7 misses a lot, including proper clocks, power domains, frequency and voltage scaling and cooling. However this still can provide basic GPU description. Not tested on HW. Signed-off-by: Krzysztof Kozlowski arch/arm64/boot/dts/exynos/exynos7-espresso.dts | 5 +++++ arch/arm64/boot/dts/exynos/exynos7.dtsi | 11 +++++++++++ 2 files changed, 16 insertions(+) commit f0a6208b90bdd44f48f5718c8bb0eb1e763d14c0 Author: Krzysztof Kozlowski Date: Fri Jun 21 20:02:04 2019 +0200 arm64: dts: exynos: Add GPU/Mali T760 node to Exynos5433 Add nodes for GPU (Mali T760) to Exynos5433. Missing element is the cooling device. Not tested on HW. Signed-off-by: Krzysztof Kozlowski .../boot/dts/exynos/exynos5433-tm2-common.dtsi | 5 +++ arch/arm64/boot/dts/exynos/exynos5433.dtsi | 51 ++++++++++++++++++++++ 2 files changed, 56 insertions(+) commit fd7d55172d1e2e501e6da0a5c1de25f06612dc2e Author: Ian Rogers Date: Sat Jun 1 01:27:22 2019 -0700 perf/cgroups: Don't rotate events for cgroups unnecessarily Currently perf_rotate_context assumes that if the context's nr_events != nr_active a rotation is necessary for perf event multiplexing. With cgroups, nr_events is the total count of events for all cgroups and nr_active will not include events in a cgroup other than the current task's. This makes rotation appear necessary for cgroups when it is not. Add a perf_event_context flag that is set when rotation is necessary. Clear the flag during sched_out and set it when a flexible sched_in fails due to resources. Signed-off-by: Ian Rogers Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Jiri Olsa Cc: Kan Liang Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Link: https://lkml.kernel.org/r/20190601082722.44543-1-irogers@google.com Signed-off-by: Ingo Molnar include/linux/perf_event.h | 5 +++++ kernel/events/core.c | 42 ++++++++++++++++++++++-------------------- 2 files changed, 27 insertions(+), 20 deletions(-) commit 637d97b53cdded02da55d0a25cda6fd6af3bd042 Author: Jiri Olsa Date: Sun Jun 16 16:03:58 2019 +0200 perf/x86/rapl: Get quirk state from new probe framework Getting the apply_quirk bool from new rapl_model_match array. And because apply_quirk was the last remaining piece of data in rapl_cpu_match, replacing it with rapl_model_match as device table. The switch to new perf_msr_probe detection API is done. Signed-off-by: Jiri Olsa Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Greg Kroah-Hartman Cc: Jiri Olsa Cc: Kan Cc: Liang Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Link: https://lkml.kernel.org/r/20190616140358.27799-9-jolsa@kernel.org Signed-off-by: Ingo Molnar arch/x86/events/intel/rapl.c | 82 ++------------------------------------------ 1 file changed, 3 insertions(+), 79 deletions(-) commit 5fc1bd84664a5152dcbdba0962c40a6a07fbd78b Author: Jiri Olsa Date: Sun Jun 16 16:03:57 2019 +0200 perf/x86/rapl: Get attributes from new probe framework We no longer need model specific attribute arrays, because we get all this detected in rapl_events_attrs. Signed-off-by: Jiri Olsa Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Greg Kroah-Hartman Cc: Jiri Olsa Cc: Kan Cc: Liang Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Link: https://lkml.kernel.org/r/20190616140358.27799-8-jolsa@kernel.org Signed-off-by: Ingo Molnar arch/x86/events/intel/rapl.c | 89 -------------------------------------------- 1 file changed, 89 deletions(-) commit 122f1c51b11a9e572263c4965d772381fcef06c5 Author: Jiri Olsa Date: Sun Jun 16 16:03:56 2019 +0200 perf/x86/rapl: Get MSR values from new probe framework There's no need to have special code for getting the bit and MSR value for given event. We can now easily get it from rapl_msrs array. Also getting rid of RAPL_IDX_*, which is no longer needed and replacing INTEL_RAPL* with PERF_RAPL* enums. Signed-off-by: Jiri Olsa Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Greg Kroah-Hartman Cc: Jiri Olsa Cc: Kan Cc: Liang Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Link: https://lkml.kernel.org/r/20190616140358.27799-7-jolsa@kernel.org Signed-off-by: Ingo Molnar arch/x86/events/intel/rapl.c | 53 +++++++++----------------------------------- 1 file changed, 11 insertions(+), 42 deletions(-) commit cd105aed1a9954605d693948efad86cd8e57cb1a Author: Jiri Olsa Date: Sun Jun 16 16:03:55 2019 +0200 perf/x86/rapl: Get rapl_cntr_mask from new probe framework We get rapl_cntr_mask from perf_msr_probe call, as a replacement for current intel_rapl_init_fun::cntr_mask value for each model. Signed-off-by: Jiri Olsa Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Greg Kroah-Hartman Cc: Jiri Olsa Cc: Kan Cc: Liang Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Link: https://lkml.kernel.org/r/20190616140358.27799-6-jolsa@kernel.org Signed-off-by: Ingo Molnar arch/x86/events/intel/rapl.c | 38 ++------------------------------------ 1 file changed, 2 insertions(+), 36 deletions(-) commit 5fb5273a905ca4cba7aae16e61c26127cadbac5c Author: Jiri Olsa Date: Sun Jun 16 16:03:54 2019 +0200 perf/x86/rapl: Use new MSR detection interface Using perf_msr_probe function to probe for RAPL MSRs. Adding new rapl_model_match device table, that gathers events info for given model, following the MSR and cstate module design. It will replace the current rapl_cpu_match device table and detection code in following patches. Signed-off-by: Jiri Olsa Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Greg Kroah-Hartman Cc: Jiri Olsa Cc: Kan Cc: Liang Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Link: https://lkml.kernel.org/r/20190616140358.27799-5-jolsa@kernel.org Signed-off-by: Ingo Molnar arch/x86/events/intel/rapl.c | 192 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 191 insertions(+), 1 deletion(-) commit 8f2a28c5859ba33519d90b66bf7f820e36640c98 Author: Jiri Olsa Date: Sun Jun 16 16:03:53 2019 +0200 perf/x86/cstate: Use new probe function Using perf_msr_probe function to probe for cstate events. The functionality is the same, with one exception, that perf_msr_probe checks for rdmsr to return value != 0 for given MSR register. Using the new attribute groups and adding the events via pmu::attr_update. Signed-off-by: Jiri Olsa Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Greg Kroah-Hartman Cc: Jiri Olsa Cc: Kan Cc: Liang Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Link: https://lkml.kernel.org/r/20190616140358.27799-4-jolsa@kernel.org Signed-off-by: Ingo Molnar arch/x86/events/intel/cstate.c | 152 +++++++++++++++++++++++------------------ 1 file changed, 87 insertions(+), 65 deletions(-) commit dde5e72068cd0cd8237f7c2589ec8f587563a390 Author: Jiri Olsa Date: Sun Jun 16 16:03:52 2019 +0200 perf/x86/msr: Use new probe function Using perf_msr_probe function to probe for msr events. The functionality is the same, with one exception, that perf_msr_probe checks for rdmsr to return value != 0 for given MSR register. Using the new attribute groups and adding the events via pmu::attr_update. Signed-off-by: Jiri Olsa Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Greg Kroah-Hartman Cc: Jiri Olsa Cc: Kan Cc: Liang Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Link: https://lkml.kernel.org/r/20190616140358.27799-3-jolsa@kernel.org Signed-off-by: Ingo Molnar arch/x86/events/msr.c | 110 +++++++++++++++++++++++++++----------------------- 1 file changed, 60 insertions(+), 50 deletions(-) commit 98253a546a468d88b7e782ab67cdf447d3c7bbe2 Author: Jiri Olsa Date: Sun Jun 16 16:03:51 2019 +0200 perf/x86: Add MSR probe interface Adding perf_msr_probe function to provide interface for checking up on MSR register and set the related attribute group visibility. User defines following struct for each MSR register: struct perf_msr { u64 msr; struct attribute_group *grp; bool (*test)(int idx, void *data); bool no_check; }; Where: msr - is the MSR address attrs - is attribute groups array to add if the check passed test - is test function pointer no_check - is bool that bypass the check and adds the attribute without any test The array of struct perf_msr is passed into: perf_msr_probe(struct perf_msr *msr, int cnt, bool zero, void *data) Together with: cnt - which is the number of struct msr array elements data - which is user pointer passed to the test function zero - allow counters that returns zero on rdmsr The perf_msr_probe will executed test code, read the MSR and check the value is != 0. If all these tests pass, related attribute group is kept visible. Also adding PMU_EVENT_GROUP macro helper to define attribute group for single attribute. It will be used in following patches. Signed-off-by: Jiri Olsa Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Greg Kroah-Hartman Cc: Jiri Olsa Cc: Kan Cc: Liang Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Link: https://lkml.kernel.org/r/20190616140358.27799-2-jolsa@kernel.org Signed-off-by: Ingo Molnar arch/x86/events/Makefile | 2 +- arch/x86/events/probe.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ arch/x86/events/probe.h | 29 +++++++++++++++++++++++++++++ 3 files changed, 75 insertions(+), 1 deletion(-) commit 9e6e87e62acce30bc9f26e0732817022f70088b6 Merge: b9271f0c65e1 203dffacf592 Author: Ingo Molnar Date: Mon Jun 24 19:26:39 2019 +0200 Merge branch 'x86/cpu' into perf/core, to pick up dependent patches Signed-off-by: Ingo Molnar commit b9271f0c65e12efd9b6319f57a378aac1be98b22 Merge: a3664a74a0aa 4b972a01a7da Author: Ingo Molnar Date: Mon Jun 24 19:25:52 2019 +0200 Merge tag 'v5.2-rc6' into perf/core, to refresh branch Signed-off-by: Ingo Molnar commit af24bde8df2029f067dc46aff0393c8f18ff6e2f Author: Patrick Bellasi Date: Fri Jun 21 09:42:12 2019 +0100 sched/uclamp: Add uclamp support to energy_compute() The Energy Aware Scheduler (EAS) estimates the energy impact of waking up a task on a given CPU. This estimation is based on: a) an (active) power consumption defined for each CPU frequency b) an estimation of which frequency will be used on each CPU c) an estimation of the busy time (utilization) of each CPU Utilization clamping can affect both b) and c). A CPU is expected to run: - on an higher than required frequency, but for a shorter time, in case its estimated utilization will be smaller than the minimum utilization enforced by uclamp - on a smaller than required frequency, but for a longer time, in case its estimated utilization is bigger than the maximum utilization enforced by uclamp While compute_energy() already accounts clamping effects on busy time, the clamping effects on frequency selection are currently ignored. Fix it by considering how CPU clamp values will be affected by a task waking up and being RUNNABLE on that CPU. Do that by refactoring schedutil_freq_util() to take an additional task_struct* which allows EAS to evaluate the impact on clamp values of a task being eventually queued in a CPU. Clamp values are applied to the RT+CFS utilization only when a FREQUENCY_UTIL is required by compute_energy(). Do note that switching from ENERGY_UTIL to FREQUENCY_UTIL in the computation of the cpu_util signal implies that we are more likely to estimate the highest OPP when a RT task is running in another CPU of the same performance domain. This can have an impact on energy estimation but: - it's not easy to say which approach is better, since it depends on the use case - the original approach could still be obtained by setting a smaller task-specific util_min whenever required Since we are at that: - rename schedutil_freq_util() into schedutil_cpu_util(), since it's not only used for frequency selection. Signed-off-by: Patrick Bellasi Signed-off-by: Peter Zijlstra (Intel) Cc: Alessio Balsini Cc: Dietmar Eggemann Cc: Joel Fernandes Cc: Juri Lelli Cc: Linus Torvalds Cc: Morten Rasmussen Cc: Paul Turner Cc: Peter Zijlstra Cc: Quentin Perret Cc: Rafael J . Wysocki Cc: Steve Muckle Cc: Suren Baghdasaryan Cc: Tejun Heo Cc: Thomas Gleixner Cc: Todd Kjos Cc: Vincent Guittot Cc: Viresh Kumar Link: https://lkml.kernel.org/r/20190621084217.8167-12-patrick.bellasi@arm.com Signed-off-by: Ingo Molnar kernel/sched/cpufreq_schedutil.c | 9 +++++---- kernel/sched/fair.c | 40 ++++++++++++++++++++++++++++++++++------ kernel/sched/sched.h | 21 +++++++++------------ 3 files changed, 48 insertions(+), 22 deletions(-) commit 9d20ad7dfc9a5cc64e33d725902d3863d350a66a Author: Patrick Bellasi Date: Fri Jun 21 09:42:11 2019 +0100 sched/uclamp: Add uclamp_util_with() So far uclamp_util() allows to clamp a specified utilization considering the clamp values requested by RUNNABLE tasks in a CPU. For the Energy Aware Scheduler (EAS) it is interesting to test how clamp values will change when a task is becoming RUNNABLE on a given CPU. For example, EAS is interested in comparing the energy impact of different scheduling decisions and the clamp values can play a role on that. Add uclamp_util_with() which allows to clamp a given utilization by considering the possible impact on CPU clamp values of a specified task. Signed-off-by: Patrick Bellasi Signed-off-by: Peter Zijlstra (Intel) Cc: Alessio Balsini Cc: Dietmar Eggemann Cc: Joel Fernandes Cc: Juri Lelli Cc: Linus Torvalds Cc: Morten Rasmussen Cc: Paul Turner Cc: Peter Zijlstra Cc: Quentin Perret Cc: Rafael J . Wysocki Cc: Steve Muckle Cc: Suren Baghdasaryan Cc: Tejun Heo Cc: Thomas Gleixner Cc: Todd Kjos Cc: Vincent Guittot Cc: Viresh Kumar Link: https://lkml.kernel.org/r/20190621084217.8167-11-patrick.bellasi@arm.com Signed-off-by: Ingo Molnar kernel/sched/core.c | 13 +++++++++++++ kernel/sched/sched.h | 21 ++++++++++++++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) commit 982d9cdc22c9f6df5ad790caa229ff74fb1d95e7 Author: Patrick Bellasi Date: Fri Jun 21 09:42:10 2019 +0100 sched/cpufreq, sched/uclamp: Add clamps for FAIR and RT tasks Each time a frequency update is required via schedutil, a frequency is selected to (possibly) satisfy the utilization reported by each scheduling class and irqs. However, when utilization clamping is in use, the frequency selection should consider userspace utilization clamping hints. This will allow, for example, to: - boost tasks which are directly affecting the user experience by running them at least at a minimum "requested" frequency - cap low priority tasks not directly affecting the user experience by running them only up to a maximum "allowed" frequency These constraints are meant to support a per-task based tuning of the frequency selection thus supporting a fine grained definition of performance boosting vs energy saving strategies in kernel space. Add support to clamp the utilization of RUNNABLE FAIR and RT tasks within the boundaries defined by their aggregated utilization clamp constraints. Do that by considering the max(min_util, max_util) to give boosted tasks the performance they need even when they happen to be co-scheduled with other capped tasks. Signed-off-by: Patrick Bellasi Signed-off-by: Peter Zijlstra (Intel) Cc: Alessio Balsini Cc: Dietmar Eggemann Cc: Joel Fernandes Cc: Juri Lelli Cc: Linus Torvalds Cc: Morten Rasmussen Cc: Paul Turner Cc: Peter Zijlstra Cc: Quentin Perret Cc: Rafael J . Wysocki Cc: Steve Muckle Cc: Suren Baghdasaryan Cc: Tejun Heo Cc: Thomas Gleixner Cc: Todd Kjos Cc: Vincent Guittot Cc: Viresh Kumar Link: https://lkml.kernel.org/r/20190621084217.8167-10-patrick.bellasi@arm.com Signed-off-by: Ingo Molnar kernel/sched/cpufreq_schedutil.c | 15 ++++++++++++--- kernel/sched/fair.c | 4 ++++ kernel/sched/rt.c | 4 ++++ kernel/sched/sched.h | 23 +++++++++++++++++++++++ 4 files changed, 43 insertions(+), 3 deletions(-) commit 1a00d999971c78ab024a17b0efc37d78404dd120 Author: Patrick Bellasi Date: Fri Jun 21 09:42:09 2019 +0100 sched/uclamp: Set default clamps for RT tasks By default FAIR tasks start without clamps, i.e. neither boosted nor capped, and they run at the best frequency matching their utilization demand. This default behavior does not fit RT tasks which instead are expected to run at the maximum available frequency, if not otherwise required by explicitly capping them. Enforce the correct behavior for RT tasks by setting util_min to max whenever: 1. the task is switched to the RT class and it does not already have a user-defined clamp value assigned. 2. an RT task is forked from a parent with RESET_ON_FORK set. NOTE: utilization clamp values are cross scheduling class attributes and thus they are never changed/reset once a value has been explicitly defined from user-space. Signed-off-by: Patrick Bellasi Signed-off-by: Peter Zijlstra (Intel) Cc: Alessio Balsini Cc: Dietmar Eggemann Cc: Joel Fernandes Cc: Juri Lelli Cc: Linus Torvalds Cc: Morten Rasmussen Cc: Paul Turner Cc: Peter Zijlstra Cc: Quentin Perret Cc: Rafael J . Wysocki Cc: Steve Muckle Cc: Suren Baghdasaryan Cc: Tejun Heo Cc: Thomas Gleixner Cc: Todd Kjos Cc: Vincent Guittot Cc: Viresh Kumar Link: https://lkml.kernel.org/r/20190621084217.8167-9-patrick.bellasi@arm.com Signed-off-by: Ingo Molnar kernel/sched/core.c | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) commit a87498ace58e23b62a572dc7267579ede4c8495c Author: Patrick Bellasi Date: Fri Jun 21 09:42:08 2019 +0100 sched/uclamp: Reset uclamp values on RESET_ON_FORK A forked tasks gets the same clamp values of its parent however, when the RESET_ON_FORK flag is set on parent, e.g. via: sys_sched_setattr() sched_setattr() __sched_setscheduler(attr::SCHED_FLAG_RESET_ON_FORK) the new forked task is expected to start with all attributes reset to default values. Do that for utilization clamp values too by checking the reset request from the existing uclamp_fork() call which already provides the required initialization for other uclamp related bits. Signed-off-by: Patrick Bellasi Signed-off-by: Peter Zijlstra (Intel) Cc: Alessio Balsini Cc: Dietmar Eggemann Cc: Joel Fernandes Cc: Juri Lelli Cc: Linus Torvalds Cc: Morten Rasmussen Cc: Paul Turner Cc: Peter Zijlstra Cc: Quentin Perret Cc: Rafael J . Wysocki Cc: Steve Muckle Cc: Suren Baghdasaryan Cc: Tejun Heo Cc: Thomas Gleixner Cc: Todd Kjos Cc: Vincent Guittot Cc: Viresh Kumar Link: https://lkml.kernel.org/r/20190621084217.8167-8-patrick.bellasi@arm.com Signed-off-by: Ingo Molnar kernel/sched/core.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit a509a7cd79747074a2c018a45bbbc52d1f4aed44 Author: Patrick Bellasi Date: Fri Jun 21 09:42:07 2019 +0100 sched/uclamp: Extend sched_setattr() to support utilization clamping The SCHED_DEADLINE scheduling class provides an advanced and formal model to define tasks requirements that can translate into proper decisions for both task placements and frequencies selections. Other classes have a more simplified model based on the POSIX concept of priorities. Such a simple priority based model however does not allow to exploit most advanced features of the Linux scheduler like, for example, driving frequencies selection via the schedutil cpufreq governor. However, also for non SCHED_DEADLINE tasks, it's still interesting to define tasks properties to support scheduler decisions. Utilization clamping exposes to user-space a new set of per-task attributes the scheduler can use as hints about the expected/required utilization for a task. This allows to implement a "proactive" per-task frequency control policy, a more advanced policy than the current one based just on "passive" measured task utilization. For example, it's possible to boost interactive tasks (e.g. to get better performance) or cap background tasks (e.g. to be more energy/thermal efficient). Introduce a new API to set utilization clamping values for a specified task by extending sched_setattr(), a syscall which already allows to define task specific properties for different scheduling classes. A new pair of attributes allows to specify a minimum and maximum utilization the scheduler can consider for a task. Do that by validating the required clamp values before and then applying the required changes using _the_ same pattern already in use for __setscheduler(). This ensures that the task is re-enqueued with the new clamp values. Signed-off-by: Patrick Bellasi Signed-off-by: Peter Zijlstra (Intel) Cc: Alessio Balsini Cc: Dietmar Eggemann Cc: Joel Fernandes Cc: Juri Lelli Cc: Linus Torvalds Cc: Morten Rasmussen Cc: Paul Turner Cc: Peter Zijlstra Cc: Quentin Perret Cc: Rafael J . Wysocki Cc: Steve Muckle Cc: Suren Baghdasaryan Cc: Tejun Heo Cc: Thomas Gleixner Cc: Todd Kjos Cc: Vincent Guittot Cc: Viresh Kumar Link: https://lkml.kernel.org/r/20190621084217.8167-7-patrick.bellasi@arm.com Signed-off-by: Ingo Molnar include/linux/sched.h | 9 ++++ include/uapi/linux/sched.h | 12 +++++- include/uapi/linux/sched/types.h | 66 +++++++++++++++++++++++++---- kernel/sched/core.c | 91 ++++++++++++++++++++++++++++++++++++---- 4 files changed, 161 insertions(+), 17 deletions(-) commit 1d6362fa0cfc8c7b243fa92924429d826599e691 Author: Patrick Bellasi Date: Fri Jun 21 09:42:06 2019 +0100 sched/core: Allow sched_setattr() to use the current policy The sched_setattr() syscall mandates that a policy is always specified. This requires to always know which policy a task will have when attributes are configured and this makes it impossible to add more generic task attributes valid across different scheduling policies. Reading the policy before setting generic tasks attributes is racy since we cannot be sure it is not changed concurrently. Introduce the required support to change generic task attributes without affecting the current task policy. This is done by adding an attribute flag (SCHED_FLAG_KEEP_POLICY) to enforce the usage of the current policy. Add support for the SETPARAM_POLICY policy, which is already used by the sched_setparam() POSIX syscall, to the sched_setattr() non-POSIX syscall. Signed-off-by: Patrick Bellasi Signed-off-by: Peter Zijlstra (Intel) Cc: Alessio Balsini Cc: Dietmar Eggemann Cc: Joel Fernandes Cc: Juri Lelli Cc: Linus Torvalds Cc: Morten Rasmussen Cc: Paul Turner Cc: Peter Zijlstra Cc: Quentin Perret Cc: Rafael J . Wysocki Cc: Steve Muckle Cc: Suren Baghdasaryan Cc: Tejun Heo Cc: Thomas Gleixner Cc: Todd Kjos Cc: Vincent Guittot Cc: Viresh Kumar Link: https://lkml.kernel.org/r/20190621084217.8167-6-patrick.bellasi@arm.com Signed-off-by: Ingo Molnar include/uapi/linux/sched.h | 4 +++- kernel/sched/core.c | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) commit e8f14172c6b11e9a86c65532497087f8eb0f91b1 Author: Patrick Bellasi Date: Fri Jun 21 09:42:05 2019 +0100 sched/uclamp: Add system default clamps Tasks without a user-defined clamp value are considered not clamped and by default their utilization can have any value in the [0..SCHED_CAPACITY_SCALE] range. Tasks with a user-defined clamp value are allowed to request any value in that range, and the required clamp is unconditionally enforced. However, a "System Management Software" could be interested in limiting the range of clamp values allowed for all tasks. Add a privileged interface to define a system default configuration via: /proc/sys/kernel/sched_uclamp_util_{min,max} which works as an unconditional clamp range restriction for all tasks. With the default configuration, the full SCHED_CAPACITY_SCALE range of values is allowed for each clamp index. Otherwise, the task-specific clamp is capped by the corresponding system default value. Do that by tracking, for each task, the "effective" clamp value and bucket the task has been refcounted in at enqueue time. This allows to lazy aggregate "requested" and "system default" values at enqueue time and simplifies refcounting updates at dequeue time. The cached bucket ids are used to avoid (relatively) more expensive integer divisions every time a task is enqueued. An active flag is used to report when the "effective" value is valid and thus the task is actually refcounted in the corresponding rq's bucket. Signed-off-by: Patrick Bellasi Signed-off-by: Peter Zijlstra (Intel) Cc: Alessio Balsini Cc: Dietmar Eggemann Cc: Joel Fernandes Cc: Juri Lelli Cc: Linus Torvalds Cc: Morten Rasmussen Cc: Paul Turner Cc: Peter Zijlstra Cc: Quentin Perret Cc: Rafael J . Wysocki Cc: Steve Muckle Cc: Suren Baghdasaryan Cc: Tejun Heo Cc: Thomas Gleixner Cc: Todd Kjos Cc: Vincent Guittot Cc: Viresh Kumar Link: https://lkml.kernel.org/r/20190621084217.8167-5-patrick.bellasi@arm.com Signed-off-by: Ingo Molnar include/linux/sched.h | 10 +++++ include/linux/sched/sysctl.h | 11 +++++ kernel/sched/core.c | 99 +++++++++++++++++++++++++++++++++++++++++++- kernel/sysctl.c | 16 +++++++ 4 files changed, 135 insertions(+), 1 deletion(-) commit e496187da71070687b55ff455e7d8d7d7f0ae0b9 Author: Patrick Bellasi Date: Fri Jun 21 09:42:04 2019 +0100 sched/uclamp: Enforce last task's UCLAMP_MAX When a task sleeps it removes its max utilization clamp from its CPU. However, the blocked utilization on that CPU can be higher than the max clamp value enforced while the task was running. This allows undesired CPU frequency increases while a CPU is idle, for example, when another CPU on the same frequency domain triggers a frequency update, since schedutil can now see the full not clamped blocked utilization of the idle CPU. Fix this by using: uclamp_rq_dec_id(p, rq, UCLAMP_MAX) uclamp_rq_max_value(rq, UCLAMP_MAX, clamp_value) to detect when a CPU has no more RUNNABLE clamped tasks and to flag this condition. Don't track any minimum utilization clamps since an idle CPU never requires a minimum frequency. The decay of the blocked utilization is good enough to reduce the CPU frequency. Signed-off-by: Patrick Bellasi Signed-off-by: Peter Zijlstra (Intel) Cc: Alessio Balsini Cc: Dietmar Eggemann Cc: Joel Fernandes Cc: Juri Lelli Cc: Linus Torvalds Cc: Morten Rasmussen Cc: Paul Turner Cc: Peter Zijlstra Cc: Quentin Perret Cc: Rafael J . Wysocki Cc: Steve Muckle Cc: Suren Baghdasaryan Cc: Tejun Heo Cc: Thomas Gleixner Cc: Todd Kjos Cc: Vincent Guittot Cc: Viresh Kumar Link: https://lkml.kernel.org/r/20190621084217.8167-4-patrick.bellasi@arm.com Signed-off-by: Ingo Molnar kernel/sched/core.c | 49 ++++++++++++++++++++++++++++++++++++++++++++----- kernel/sched/sched.h | 2 ++ 2 files changed, 46 insertions(+), 5 deletions(-) commit 60daf9c19410604f08c99e146bc378c8a64f4ccd Author: Patrick Bellasi Date: Fri Jun 21 09:42:03 2019 +0100 sched/uclamp: Add bucket local max tracking Because of bucketization, different task-specific clamp values are tracked in the same bucket. For example, with 20% bucket size and assuming to have: Task1: util_min=25% Task2: util_min=35% both tasks will be refcounted in the [20..39]% bucket and always boosted only up to 20% thus implementing a simple floor aggregation normally used in histograms. In systems with only few and well-defined clamp values, it would be useful to track the exact clamp value required by a task whenever possible. For example, if a system requires only 23% and 47% boost values then it's possible to track the exact boost required by each task using only 3 buckets of ~33% size each. Introduce a mechanism to max aggregate the requested clamp values of RUNNABLE tasks in the same bucket. Keep it simple by resetting the bucket value to its base value only when a bucket becomes inactive. Allow a limited and controlled overboosting margin for tasks recounted in the same bucket. In systems where the boost values are not known in advance, it is still possible to control the maximum acceptable overboosting margin by tuning the number of clamp groups. For example, 20 groups ensure a 5% maximum overboost. Remove the rq bucket initialization code since a correct bucket value is now computed when a task is refcounted into a CPU's rq. Signed-off-by: Patrick Bellasi Signed-off-by: Peter Zijlstra (Intel) Cc: Alessio Balsini Cc: Dietmar Eggemann Cc: Joel Fernandes Cc: Juri Lelli Cc: Linus Torvalds Cc: Morten Rasmussen Cc: Paul Turner Cc: Peter Zijlstra Cc: Quentin Perret Cc: Rafael J . Wysocki Cc: Steve Muckle Cc: Suren Baghdasaryan Cc: Tejun Heo Cc: Thomas Gleixner Cc: Todd Kjos Cc: Vincent Guittot Cc: Viresh Kumar Link: https://lkml.kernel.org/r/20190621084217.8167-3-patrick.bellasi@arm.com Signed-off-by: Ingo Molnar kernel/sched/core.c | 43 +++++++++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 18 deletions(-) commit 69842cba9ace84849bb9b8edcdf2cefccd97901c Author: Patrick Bellasi Date: Fri Jun 21 09:42:02 2019 +0100 sched/uclamp: Add CPU's clamp buckets refcounting Utilization clamping allows to clamp the CPU's utilization within a [util_min, util_max] range, depending on the set of RUNNABLE tasks on that CPU. Each task references two "clamp buckets" defining its minimum and maximum (util_{min,max}) utilization "clamp values". A CPU's clamp bucket is active if there is at least one RUNNABLE tasks enqueued on that CPU and refcounting that bucket. When a task is {en,de}queued {on,from} a rq, the set of active clamp buckets on that CPU can change. If the set of active clamp buckets changes for a CPU a new "aggregated" clamp value is computed for that CPU. This is because each clamp bucket enforces a different utilization clamp value. Clamp values are always MAX aggregated for both util_min and util_max. This ensures that no task can affect the performance of other co-scheduled tasks which are more boosted (i.e. with higher util_min clamp) or less capped (i.e. with higher util_max clamp). A task has: task_struct::uclamp[clamp_id]::bucket_id to track the "bucket index" of the CPU's clamp bucket it refcounts while enqueued, for each clamp index (clamp_id). A runqueue has: rq::uclamp[clamp_id]::bucket[bucket_id].tasks to track how many RUNNABLE tasks on that CPU refcount each clamp bucket (bucket_id) of a clamp index (clamp_id). It also has a: rq::uclamp[clamp_id]::bucket[bucket_id].value to track the clamp value of each clamp bucket (bucket_id) of a clamp index (clamp_id). The rq::uclamp::bucket[clamp_id][] array is scanned every time it's needed to find a new MAX aggregated clamp value for a clamp_id. This operation is required only when it's dequeued the last task of a clamp bucket tracking the current MAX aggregated clamp value. In this case, the CPU is either entering IDLE or going to schedule a less boosted or more clamped task. The expected number of different clamp values configured at build time is small enough to fit the full unordered array into a single cache line, for configurations of up to 7 buckets. Add to struct rq the basic data structures required to refcount the number of RUNNABLE tasks for each clamp bucket. Add also the max aggregation required to update the rq's clamp value at each enqueue/dequeue event. Use a simple linear mapping of clamp values into clamp buckets. Pre-compute and cache bucket_id to avoid integer divisions at enqueue/dequeue time. Signed-off-by: Patrick Bellasi Signed-off-by: Peter Zijlstra (Intel) Cc: Alessio Balsini Cc: Dietmar Eggemann Cc: Joel Fernandes Cc: Juri Lelli Cc: Linus Torvalds Cc: Morten Rasmussen Cc: Paul Turner Cc: Peter Zijlstra Cc: Quentin Perret Cc: Rafael J . Wysocki Cc: Steve Muckle Cc: Suren Baghdasaryan Cc: Tejun Heo Cc: Thomas Gleixner Cc: Todd Kjos Cc: Vincent Guittot Cc: Viresh Kumar Link: https://lkml.kernel.org/r/20190621084217.8167-2-patrick.bellasi@arm.com Signed-off-by: Ingo Molnar include/linux/log2.h | 34 +++++++++ include/linux/sched.h | 39 ++++++++++ include/linux/sched/topology.h | 6 -- init/Kconfig | 53 +++++++++++++ kernel/sched/core.c | 166 +++++++++++++++++++++++++++++++++++++++++ kernel/sched/sched.h | 51 +++++++++++++ 6 files changed, 343 insertions(+), 6 deletions(-) commit a3df067974c52df936f548ed218120f623c4c560 Author: Dietmar Eggemann Date: Tue Jun 18 14:23:10 2019 +0200 sched/fair: Rename weighted_cpuload() to cpu_runnable_load() The term 'weighted' is not needed since there is no 'unweighted' load. Instead use the term 'runnable' to distinguish 'runnable' load (avg.runnable_load_avg) used in load balance from load (avg.load_avg) which is the sum of 'runnable' and 'blocked' load. Signed-off-by: Dietmar Eggemann Signed-off-by: Peter Zijlstra (Intel) Cc: Frederic Weisbecker Cc: Linus Torvalds Cc: Morten Rasmussen Cc: Patrick Bellasi Cc: Peter Zijlstra Cc: Quentin Perret Cc: Rik van Riel Cc: Thomas Gleixner Cc: Valentin Schneider Cc: Vincent Guittot Link: https://lkml.kernel.org/r/57f27a7f-2775-d832-e965-0f4d51bb1954@arm.com Signed-off-by: Ingo Molnar kernel/sched/fair.c | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) commit a056a5bed7fa67706574b00cf1122c38596b2be1 Author: Qais Yousef Date: Tue Jun 4 12:14:59 2019 +0100 sched/debug: Export the newly added tracepoints So that external modules can hook into them and extract the info they need. Since these new tracepoints have no events associated with them exporting these tracepoints make them useful for external modules to perform testing and debugging. There's no other way otherwise to access them. BPF doesn't have infrastructure to access these bare tracepoints either. Signed-off-by: Qais Yousef Signed-off-by: Peter Zijlstra (Intel) Cc: Dietmar Eggemann Cc: Linus Torvalds Cc: Pavankumar Kondeti Cc: Peter Zijlstra Cc: Quentin Perret Cc: Sebastian Andrzej Siewior Cc: Steven Rostedt Cc: Thomas Gleixner Cc: Uwe Kleine-Konig Link: https://lkml.kernel.org/r/20190604111459.2862-7-qais.yousef@arm.com Signed-off-by: Ingo Molnar kernel/sched/core.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit f9f240f96efc5bcec62379eac701523e11fbb45b Author: Qais Yousef Date: Tue Jun 4 12:14:58 2019 +0100 sched/debug: Add sched_overutilized tracepoint The new tracepoint allows us to track the changes in overutilized status. Overutilized status is associated with EAS. It indicates that the system is in high performance state. EAS is disabled when the system is in this state since there's not much energy savings while high performance tasks are pushing the system to the limit and it's better to default to the spreading behavior of the scheduler. This tracepoint helps understanding and debugging the conditions under which this happens. Signed-off-by: Qais Yousef Signed-off-by: Peter Zijlstra (Intel) Cc: Dietmar Eggemann Cc: Linus Torvalds Cc: Pavankumar Kondeti Cc: Peter Zijlstra Cc: Quentin Perret Cc: Sebastian Andrzej Siewior Cc: Steven Rostedt Cc: Thomas Gleixner Cc: Uwe Kleine-Konig Link: https://lkml.kernel.org/r/20190604111459.2862-6-qais.yousef@arm.com Signed-off-by: Ingo Molnar include/trace/events/sched.h | 4 ++++ kernel/sched/fair.c | 10 ++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) commit 8de6242cca17d9299e654e29c966d8612d397272 Author: Qais Yousef Date: Tue Jun 4 12:14:57 2019 +0100 sched/debug: Add new tracepoint to track PELT at se level The new tracepoint allows tracking PELT signals at sched_entity level. Which is supported in CFS tasks and taskgroups only. Signed-off-by: Qais Yousef Signed-off-by: Peter Zijlstra (Intel) Cc: Dietmar Eggemann Cc: Linus Torvalds Cc: Pavankumar Kondeti Cc: Peter Zijlstra Cc: Quentin Perret Cc: Sebastian Andrzej Siewior Cc: Steven Rostedt Cc: Thomas Gleixner Cc: Uwe Kleine-Konig Link: https://lkml.kernel.org/r/20190604111459.2862-5-qais.yousef@arm.com Signed-off-by: Ingo Molnar include/trace/events/sched.h | 4 ++++ kernel/sched/fair.c | 1 + kernel/sched/pelt.c | 2 ++ 3 files changed, 7 insertions(+) commit ba19f51fcb549c7ee6261da243eea55a47e98d78 Author: Qais Yousef Date: Tue Jun 4 12:14:56 2019 +0100 sched/debug: Add new tracepoints to track PELT at rq level The new tracepoints allow tracking PELT signals at rq level for all scheduling classes + irq. Signed-off-by: Qais Yousef Signed-off-by: Peter Zijlstra (Intel) Cc: Dietmar Eggemann Cc: Linus Torvalds Cc: Pavankumar Kondeti Cc: Peter Zijlstra Cc: Quentin Perret Cc: Sebastian Andrzej Siewior Cc: Steven Rostedt Cc: Thomas Gleixner Cc: Uwe Kleine-Konig Link: https://lkml.kernel.org/r/20190604111459.2862-4-qais.yousef@arm.com Signed-off-by: Ingo Molnar include/trace/events/sched.h | 23 +++++++++++++++++++++++ kernel/sched/fair.c | 6 ++++++ kernel/sched/pelt.c | 9 ++++++++- 3 files changed, 37 insertions(+), 1 deletion(-) commit 3c93a0c04dfdcba199982b53b97488b1b1d90eff Author: Qais Yousef Date: Tue Jun 4 12:14:55 2019 +0100 sched/debug: Add a new sched_trace_*() helper functions The new functions allow modules to access internal data structures of unexported struct cfs_rq and struct rq to extract important information from the tracepoints to be introduced in later patches. While at it fix alphabetical order of struct declarations in sched.h Signed-off-by: Qais Yousef Signed-off-by: Peter Zijlstra (Intel) Cc: Dietmar Eggemann Cc: Linus Torvalds Cc: Pavankumar Kondeti Cc: Peter Zijlstra Cc: Quentin Perret Cc: Sebastian Andrzej Siewior Cc: Steven Rostedt Cc: Thomas Gleixner Cc: Uwe Kleine-Konig Link: https://lkml.kernel.org/r/20190604111459.2862-3-qais.yousef@arm.com Signed-off-by: Ingo Molnar include/linux/sched.h | 16 ++++++++- kernel/sched/fair.c | 99 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 114 insertions(+), 1 deletion(-) commit 9ba5090aecac08ff3ae54ac3bd94b61db7708ffc Author: Qais Yousef Date: Tue Jun 4 12:14:54 2019 +0100 sched/autogroup: Make autogroup_path() always available Remove the #ifdef CONFIG_SCHED_DEBUG. Some of the tracepoints to be introduced in later patches need to access this function. Hence make it always available since the tracepoints are not protected by CONFIG_SCHED_DEBUG. Signed-off-by: Qais Yousef Signed-off-by: Peter Zijlstra (Intel) Cc: Dietmar Eggemann Cc: Linus Torvalds Cc: Pavankumar Kondeti Cc: Peter Zijlstra Cc: Quentin Perret Cc: Sebastian Andrzej Siewior Cc: Steven Rostedt Cc: Thomas Gleixner Cc: Uwe Kleine-Konig Link: https://lkml.kernel.org/r/20190604111459.2862-2-qais.yousef@arm.com Signed-off-by: Ingo Molnar kernel/sched/autogroup.c | 2 -- 1 file changed, 2 deletions(-) commit 016190a4b5824df2d5bb97951a04dd3629973671 Author: Pavel Begunkov Date: Tue Jun 11 15:29:07 2019 +0300 sched/wait: Deduplicate code with do-while Statements in the loop's body and before it are identical. Use do-while to not repeat it. Signed-off-by: Pavel Begunkov Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/43ffea6ee2152b90dedf962eac851609e4197218.1560256112.git.asml.silence@gmail.com Signed-off-by: Ingo Molnar kernel/sched/wait.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 8ec59c0f5f4966f89f4e3e3cab81710c7fa959d0 Author: Vincent Guittot Date: Mon Jun 17 17:00:17 2019 +0200 sched/topology: Remove unused 'sd' parameter from arch_scale_cpu_capacity() The 'struct sched_domain *sd' parameter to arch_scale_cpu_capacity() is unused since commit: 765d0af19f5f ("sched/topology: Remove the ::smt_gain field from 'struct sched_domain'") Remove it. Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Viresh Kumar Reviewed-by: Valentin Schneider Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: gregkh@linuxfoundation.org Cc: linux@armlinux.org.uk Cc: quentin.perret@arm.com Cc: rafael@kernel.org Link: https://lkml.kernel.org/r/1560783617-5827-1-git-send-email-vincent.guittot@linaro.org Signed-off-by: Ingo Molnar arch/arm/kernel/topology.c | 2 +- drivers/base/arch_topology.c | 6 +++--- include/linux/arch_topology.h | 2 +- include/linux/energy_model.h | 2 +- include/linux/sched/topology.h | 14 +++----------- kernel/power/energy_model.c | 2 +- kernel/sched/cpufreq_schedutil.c | 2 +- kernel/sched/deadline.c | 2 +- kernel/sched/fair.c | 6 +++--- kernel/sched/pelt.c | 2 +- kernel/sched/pelt.h | 2 +- kernel/sched/sched.h | 2 +- kernel/sched/topology.c | 8 ++++---- 13 files changed, 22 insertions(+), 30 deletions(-) commit d2abae71ebcc409828b24ce9da402548ecdf1311 Merge: 66567fcbaeca 4b972a01a7da Author: Ingo Molnar Date: Mon Jun 24 19:19:53 2019 +0200 Merge tag 'v5.2-rc6' into sched/core, to refresh the branch Signed-off-by: Ingo Molnar commit dcdfa50eef71c126d3d9322234b7e98b998527f6 Merge: 97236cda3ae5 b964641e9925 Author: David S. Miller Date: Mon Jun 24 10:18:49 2019 -0700 Merge branch 'cached-route-listings' Stefano Brivio says: ==================== Fix listing (IPv4, IPv6) and flushing (IPv6) of cached route exceptions For IPv6 cached routes, the commands 'ip -6 route list cache' and 'ip -6 route flush cache' don't work at all after route exceptions have been moved to a separate hash table in commit 2b760fcf5cfb ("ipv6: hook up exception table to store dst cache"). For IPv4 cached routes, the command 'ip route list cache' has also stopped working in kernel 3.5 after commit 4895c771c7f0 ("ipv4: Add FIB nexthop exceptions.") introduced storage for route exceptions as a separate entity. Fix this by allowing userspace to clearly request cached routes with the RTM_F_CLONED flag used as a filter (in conjuction with strict checking) and by retrieving and dumping cached routes if requested. If strict checking is not requested (iproute2 < 5.0.0), we don't have a way to consistently filter results on other selectors (e.g. on tables), so skip filtering entirely and dump both regular routes and exceptions. For IPv4, cache flushing uses a completely different mechanism, so it wasn't affected. Listing of exception routes (modified routes pre-3.5) was tested against these versions of kernel and iproute2: iproute2 kernel 4.14.0 4.15.0 4.19.0 5.0.0 5.1.0 3.5-rc4 + + + + + 4.4 4.9 4.14 4.15 4.19 5.0 5.1 fixed + + + + + For IPv6, a separate iproute2 patch is required. Versions of iproute2 and kernel tested: iproute2 kernel 4.14.0 4.15.0 4.19.0 5.0.0 5.1.0 5.1.0, patched 3.18 list + + + + + + flush + + + + + + 4.4 list + + + + + + flush + + + + + + 4.9 list + + + + + + flush + + + + + + 4.14 list + + + + + + flush + + + + + + 4.15 list flush 4.19 list flush 5.0 list flush 5.1 list flush with list + + + + + + fix flush + + + + v7: Make sure r->rtm_tos is initialised in 3/11, move loop over nexthop objects in 4/11, add comments about usage of "skip" counters in commit messages of 4/11 and 8/11 v6: Target for net-next, rebase and adapt to nexthop objects for IPv6 paths. Merge selftests into this series (as they were addressed for net-next). A number of minor changes detailed in logs of single patches. v5: Skip filtering altogether if no strict checking is requested: selecting routes or exceptions only would be inconsistent with the fact we can't filter on tables. Drop 1/8 (non-strict dump filter function no longer needed), replace 2/8 (don't use NLM_F_MATCH, decide to skip routes or exceptions in filter function), drop 6/8 (2/8 is enough for IPv6 too). Introduce dump_routes and dump_exceptions flags in filter, adapt other patches to that. v4: Fix the listing issue also for IPv4, making the behaviour consistent with IPv6. Honour NLM_F_MATCH as per RFC 3549 and allow usage of RTM_F_CLONED filter. Split patches into smaller logical changes. v3: Drop check on RTM_F_CLONED and rework logic of return values of rt6_dump_route() v2: Add count of routes handled in partial dumps, and skip them, in patch 1/2. ==================== Signed-off-by: David S. Miller commit b964641e9925be1cb2c6dbf1d3ecaf6b594c15c0 Author: Stefano Brivio Date: Fri Jun 21 17:45:30 2019 +0200 selftests: pmtu: Make list_flush_ipv6_exception test more demanding Instead of just listing and flushing two cached exceptions, create a relatively big number of them, and count how many are listed. Single netlink dump messages contain approximately 25 entries each, and this way we can make sure the partial dump tracking mechanism is working properly. While at it, also ensure that no cached routes can be listed after flush, and remove 'sleep 1' calls, they are not actually needed. v7: No changes v6: - Merge this patch into series including fix, as it's also targeted for net-next. No actual changes Signed-off-by: Stefano Brivio Signed-off-by: David S. Miller tools/testing/selftests/net/pmtu.sh | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) commit de755a85130ede40a988dbc04e449eb56fb998db Author: Stefano Brivio Date: Fri Jun 21 17:45:29 2019 +0200 selftests: pmtu: Introduce list_flush_ipv4_exception test case This test checks that route exceptions can be successfully listed and flushed using ip -6 route {list,flush} cache. v7: No changes v6: - Merge this patch into series including fix, as it's also targeted for net-next - Drop left-over print of 'ip route list cache | wc -l' Signed-off-by: Stefano Brivio Signed-off-by: David S. Miller tools/testing/selftests/net/pmtu.sh | 60 +++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) commit 40cb35d5dc04e7f89cbc7b1fc9b4b48d9f1e5343 Author: Stefano Brivio Date: Fri Jun 21 17:45:28 2019 +0200 ip6_fib: Don't discard nodes with valid routing information in fib6_locate_1() When we perform an inexact match on FIB nodes via fib6_locate_1(), longer prefixes will be preferred to shorter ones. However, it might happen that a node, with higher fn_bit value than some other, has no valid routing information. In this case, we'll pick that node, but it will be discarded by the check on RTN_RTINFO in fib6_locate(), and we might miss nodes with valid routing information but with lower fn_bit value. This is apparent when a routing exception is created for a default route: # ip -6 route list fc00:1::/64 dev veth_A-R1 proto kernel metric 256 pref medium fc00:2::/64 dev veth_A-R2 proto kernel metric 256 pref medium fc00:4::1 via fc00:2::2 dev veth_A-R2 metric 1024 pref medium fe80::/64 dev veth_A-R1 proto kernel metric 256 pref medium fe80::/64 dev veth_A-R2 proto kernel metric 256 pref medium default via fc00:1::2 dev veth_A-R1 metric 1024 pref medium # ip -6 route list cache fc00:4::1 via fc00:2::2 dev veth_A-R2 metric 1024 expires 593sec mtu 1500 pref medium fc00:3::1 via fc00:1::2 dev veth_A-R1 metric 1024 expires 593sec mtu 1500 pref medium # ip -6 route flush cache # node for default route is discarded Failed to send flush request: No such process # ip -6 route list cache fc00:3::1 via fc00:1::2 dev veth_A-R1 metric 1024 expires 586sec mtu 1500 pref medium Check right away if the node has a RTN_RTINFO flag, before replacing the 'prev' pointer, that indicates the longest matching prefix found so far. Fixes: 38fbeeeeccdb ("ipv6: prepare fib6_locate() for exception table") Signed-off-by: Stefano Brivio Signed-off-by: David S. Miller net/ipv6/ip6_fib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1e47b4837f3bdaa425727cfe09f5ae3b6c4c41a9 Author: Stefano Brivio Date: Fri Jun 21 17:45:27 2019 +0200 ipv6: Dump route exceptions if requested Since commit 2b760fcf5cfb ("ipv6: hook up exception table to store dst cache"), route exceptions reside in a separate hash table, and won't be found by walking the FIB, so they won't be dumped to userspace on a RTM_GETROUTE message. This causes 'ip -6 route list cache' and 'ip -6 route flush cache' to have no function anymore: # ip -6 route get fc00:3::1 fc00:3::1 via fc00:1::2 dev veth_A-R1 src fc00:1::1 metric 1024 expires 539sec mtu 1400 pref medium # ip -6 route get fc00:4::1 fc00:4::1 via fc00:2::2 dev veth_A-R2 src fc00:2::1 metric 1024 expires 536sec mtu 1500 pref medium # ip -6 route list cache # ip -6 route flush cache # ip -6 route get fc00:3::1 fc00:3::1 via fc00:1::2 dev veth_A-R1 src fc00:1::1 metric 1024 expires 520sec mtu 1400 pref medium # ip -6 route get fc00:4::1 fc00:4::1 via fc00:2::2 dev veth_A-R2 src fc00:2::1 metric 1024 expires 519sec mtu 1500 pref medium because iproute2 lists cached routes using RTM_GETROUTE, and flushes them by listing all the routes, and deleting them with RTM_DELROUTE one by one. If cached routes are requested using the RTM_F_CLONED flag together with strict checking, or if no strict checking is requested (and hence we can't consistently apply filters), look up exceptions in the hash table associated with the current fib6_info in rt6_dump_route(), and, if present and not expired, add them to the dump. We might be unable to dump all the entries for a given node in a single message, so keep track of how many entries were handled for the current node in fib6_walker, and skip that amount in case we start from the same partially dumped node. When a partial dump restarts, as the starting node might change when 'sernum' changes, we have no guarantee that we need to skip the same amount of in-node entries. Therefore, we need two counters, and we need to zero the in-node counter if the node from which the dump is resumed differs. Note that, with the current version of iproute2, this only fixes the 'ip -6 route list cache': on a flush command, iproute2 doesn't pass RTM_F_CLONED and, due to this inconsistency, 'ip -6 route flush cache' is still unable to fetch the routes to be flushed. This will be addressed in a patch for iproute2. To flush cached routes, a procfs entry could be introduced instead: that's how it works for IPv4. We already have a rt6_flush_exception() function ready to be wired to it. However, this would not solve the issue for listing. Versions of iproute2 and kernel tested: iproute2 kernel 4.14.0 4.15.0 4.19.0 5.0.0 5.1.0 5.1.0, patched 3.18 list + + + + + + flush + + + + + + 4.4 list + + + + + + flush + + + + + + 4.9 list + + + + + + flush + + + + + + 4.14 list + + + + + + flush + + + + + + 4.15 list flush 4.19 list flush 5.0 list flush 5.1 list flush with list + + + + + + fix flush + + + + v7: - Explain usage of "skip" counters in commit message (suggested by David Ahern) v6: - Rebase onto net-next, use recently introduced nexthop walker - Make rt6_nh_dump_exceptions() a separate function (suggested by David Ahern) v5: - Use dump_routes and dump_exceptions from filter, ignore NLM_F_MATCH, update test results (flushing works with iproute2 < 5.0.0 now) v4: - Split NLM_F_MATCH and strict check handling in separate patches - Filter routes using RTM_F_CLONED: if it's not set, only return non-cached routes, and if it's set, only return cached routes: change requested by David Ahern and Martin Lau. This implies that iproute2 needs a separate patch to be able to flush IPv6 cached routes. This is not ideal because we can't fix the breakage caused by 2b760fcf5cfb entirely in kernel. However, two years have passed since then, and this makes it more tolerable v3: - More descriptive comment about expired exceptions in rt6_dump_route() - Swap return values of rt6_dump_route() (suggested by Martin Lau) - Don't zero skip_in_node in case we don't dump anything in a given pass (also suggested by Martin Lau) - Remove check on RTM_F_CLONED altogether: in the current UAPI semantic, it's just a flag to indicate the route was cloned, not to filter on routes v2: Add tracking of number of entries to be skipped in current node after a partial dump. As we restart from the same node, if not all the exceptions for a given node fit in a single message, the dump will not terminate, as suggested by Martin Lau. This is a concrete possibility, setting up a big number of exceptions for the same route actually causes the issue, suggested by David Ahern. Reported-by: Jianlin Shi Fixes: 2b760fcf5cfb ("ipv6: hook up exception table to store dst cache") Signed-off-by: Stefano Brivio Reviewed-by: David Ahern Signed-off-by: David S. Miller include/net/ip6_fib.h | 1 + include/net/ip6_route.h | 2 +- net/ipv6/ip6_fib.c | 12 ++++- net/ipv6/route.c | 114 +++++++++++++++++++++++++++++++++++++++++++----- 4 files changed, 116 insertions(+), 13 deletions(-) commit bf9a8a061ddcd6a58b312466ea5da44ab54ce8cb Author: Stefano Brivio Date: Fri Jun 21 17:45:26 2019 +0200 ipv6/route: Change return code of rt6_dump_route() for partial node dumps In the next patch, we are going to add optional dump of exceptions to rt6_dump_route(). Change the return code of rt6_dump_route() to accomodate partial node dumps: we might dump multiple routes per node, and might be able to dump only a given number of them, so fib6_dump_node() will need to know how many routes have been dumped on partial dump, to restart the dump from the point where it was interrupted. Note that fib6_dump_node() is the only caller and already handles all non-negative return codes as success: those become -1 to signal that we're done with the node. If we fail, return 0, as we were unable to dump the single route in the node, but we're not done with it. Signed-off-by: Stefano Brivio Reviewed-by: David Ahern Signed-off-by: David S. Miller net/ipv6/ip6_fib.c | 2 +- net/ipv6/route.c | 16 ++++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) commit 3401bfb1638efdd0b721d03c51c48171a0cde8c6 Author: Stefano Brivio Date: Fri Jun 21 17:45:25 2019 +0200 ipv6/route: Don't match on fc_nh_id if not set in ip6_route_del() If fc_nh_id isn't set, we shouldn't try to match against it. This actually matters just for the RTF_CACHE below (where this case is already handled): if iproute2 gets a route exception and tries to delete it, it won't reference it by fc_nh_id, even if a nexthop object might be associated to the originating route. Fixes: 5b98324ebe29 ("ipv6: Allow routes to use nexthop objects") Signed-off-by: Stefano Brivio Reviewed-by: David Ahern Signed-off-by: David S. Miller net/ipv6/route.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ef11209d421976fe0990b43dbf91e2d6918813d0 Author: Stefano Brivio Date: Fri Jun 21 17:45:24 2019 +0200 Revert "net/ipv6: Bail early if user only wants cloned entries" This reverts commit 08e814c9e8eb5a982cbd1e8f6bd255d97c51026f: as we are preparing to fix listing and dumping of IPv6 cached routes, we need to allow RTM_F_CLONED as a flag to match routes against while dumping them. Signed-off-by: Stefano Brivio Reviewed-by: David Ahern Signed-off-by: David S. Miller net/ipv6/ip6_fib.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit ee28906fd7a1437ca77a60a99b6b9c6d676220f8 Author: Stefano Brivio Date: Fri Jun 21 17:45:23 2019 +0200 ipv4: Dump route exceptions if requested Since commit 4895c771c7f0 ("ipv4: Add FIB nexthop exceptions."), cached exception routes are stored as a separate entity, so they are not dumped on a FIB dump, even if the RTM_F_CLONED flag is passed. This implies that the command 'ip route list cache' doesn't return any result anymore. If the RTM_F_CLONED is passed, and strict checking requested, retrieve nexthop exception routes and dump them. If no strict checking is requested, filtering can't be performed consistently: dump everything in that case. With this, we need to add an argument to the netlink callback in order to track how many entries were already dumped for the last leaf included in a partial netlink dump. A single additional argument is sufficient, even if we traverse logically nested structures (nexthop objects, hash table buckets, bucket chains): it doesn't matter if we stop in the middle of any of those, because they are always traversed the same way. As an example, s_i values in [], s_fa values in (): node (fa) #1 [1] nexthop #1 bucket #1 -> #0 in chain (1) bucket #2 -> #0 in chain (2) -> #1 in chain (3) -> #2 in chain (4) bucket #3 -> #0 in chain (5) -> #1 in chain (6) nexthop #2 bucket #1 -> #0 in chain (7) -> #1 in chain (8) bucket #2 -> #0 in chain (9) -- node (fa) #2 [2] nexthop #1 bucket #1 -> #0 in chain (1) -> #1 in chain (2) bucket #2 -> #0 in chain (3) it doesn't matter if we stop at (3), (4), (7) for "node #1", or at (2) for "node #2": walking flattens all that. It would even be possible to drop the distinction between the in-tree (s_i) and in-node (s_fa) counter, but a further improvement might advise against this. This is only as accurate as the existing tracking mechanism for leaves: if a partial dump is restarted after exceptions are removed or expired, we might skip some non-dumped entries. To improve this, we could attach a 'sernum' attribute (similar to the one used for IPv6) to nexthop entities, and bump this counter whenever exceptions change: having a distinction between the two counters would make this more convenient. Listing of exception routes (modified routes pre-3.5) was tested against these versions of kernel and iproute2: iproute2 kernel 4.14.0 4.15.0 4.19.0 5.0.0 5.1.0 3.5-rc4 + + + + + 4.4 4.9 4.14 4.15 4.19 5.0 5.1 fixed + + + + + v7: - Move loop over nexthop objects to route.c, and pass struct fib_info and table ID to it, not a struct fib_alias (suggested by David Ahern) - While at it, note that the NULL check on fa->fa_info is redundant, and the check on RTNH_F_DEAD is also not consistent with what's done with regular route listing: just keep it for nhc_flags - Rename entry point function for dumping exceptions to fib_dump_info_fnhe(), and rearrange arguments for consistency with fib_dump_info() - Rename fnhe_dump_buckets() to fnhe_dump_bucket() and make it handle one bucket at a time - Expand commit message to describe why we can have a single "skip" counter for all exceptions stored in bucket chains in nexthop objects (suggested by David Ahern) v6: - Rebased onto net-next - Loop over nexthop paths too. Move loop over fnhe buckets to route.c, avoids need to export rt_fill_info() and to touch exceptions from fib_trie.c. Pass NULL as flow to rt_fill_info(), it now allows that (suggested by David Ahern) Fixes: 4895c771c7f0 ("ipv4: Add FIB nexthop exceptions.") Signed-off-by: Stefano Brivio Reviewed-by: David Ahern Signed-off-by: David S. Miller include/net/route.h | 4 +++ net/ipv4/fib_trie.c | 44 ++++++++++++++++++++++---------- net/ipv4/route.c | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 108 insertions(+), 13 deletions(-) commit d948974ccc6613b30636014f76700de3aad7e9b7 Author: Stefano Brivio Date: Fri Jun 21 17:45:22 2019 +0200 ipv4/route: Allow NULL flowinfo in rt_fill_info() In the next patch, we're going to use rt_fill_info() to dump exception routes upon RTM_GETROUTE with NLM_F_ROOT, meaning userspace is requesting a dump and not a specific route selection, which in turn implies the input interface is not relevant. Update rt_fill_info() to handle a NULL flowinfo. v7: If fl4 is NULL, explicitly set r->rtm_tos to 0: it's not initialised otherwise (spotted by David Ahern) v6: New patch Suggested-by: David Ahern Signed-off-by: Stefano Brivio Reviewed-by: David Ahern Signed-off-by: David S. Miller net/ipv4/route.c | 56 ++++++++++++++++++++++++++++++-------------------------- 1 file changed, 30 insertions(+), 26 deletions(-) commit b597ca6e8312937450dbae945f9d58c6eb35da0e Author: Stefano Brivio Date: Fri Jun 21 17:45:21 2019 +0200 ipv4/fib_frontend: Allow RTM_F_CLONED flag to be used for filtering This functionally reverts the check introduced by commit e8ba330ac0c5 ("rtnetlink: Update fib dumps for strict data checking") as modified by commit e4e92fb160d7 ("net/ipv4: Bail early if user only wants prefix entries"). As we are preparing to fix listing of IPv4 cached routes, we need to give userspace a way to request them. Signed-off-by: Stefano Brivio Reviewed-by: David Ahern Signed-off-by: David S. Miller net/ipv4/fib_frontend.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 564c91f7e563256be835f31db97a60908702c9ec Author: Stefano Brivio Date: Fri Jun 21 17:45:20 2019 +0200 fib_frontend, ip6_fib: Select routes or exceptions dump from RTM_F_CLONED The following patches add back the ability to dump IPv4 and IPv6 exception routes, and we need to allow selection of regular routes or exceptions. Use RTM_F_CLONED as filter to decide whether to dump routes or exceptions: iproute2 passes it in dump requests (except for IPv6 cache flush requests, this will be fixed in iproute2) and this used to work as long as exceptions were stored directly in the FIB, for both IPv4 and IPv6. Caveat: if strict checking is not requested (that is, if the dump request doesn't go through ip_valid_fib_dump_req()), we can't filter on protocol, tables or route types. In this case, filtering on RTM_F_CLONED would be inconsistent: we would fix 'ip route list cache' by returning exception routes and at the same time introduce another bug in case another selector is present, e.g. on 'ip route list cache table main' we would return all exception routes, without filtering on tables. Keep this consistent by applying no filters at all, and dumping both routes and exceptions, if strict checking is not requested. iproute2 currently filters results anyway, and no unwanted results will be presented to the user. The kernel will just dump more data than needed. v7: No changes v6: Rebase onto net-next, no changes v5: New patch: add dump_routes and dump_exceptions flags in filter and simply clear the unwanted one if strict checking is enabled, don't ignore NLM_F_MATCH and don't set filter_set if NLM_F_MATCH is set. Skip filtering altogether if no strict checking is requested: selecting routes or exceptions only would be inconsistent with the fact we can't filter on tables. Signed-off-by: Stefano Brivio Reviewed-by: David Ahern Signed-off-by: David S. Miller include/net/ip_fib.h | 2 ++ net/ipv4/fib_frontend.c | 8 +++++++- net/ipv6/ip6_fib.c | 3 ++- 3 files changed, 11 insertions(+), 2 deletions(-) commit 932952e525e5c8d38cf3df4a3265be5652d57c97 Author: Mauro Carvalho Chehab Date: Mon Jun 24 13:08:59 2019 -0400 media: cafe-driver: mark an static var as such As warned by sparse: drivers/media/platform/marvell-ccic/cafe-driver.c:475:23: warning: symbol 'ov7670_info' was not declared. Should it be static? Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/marvell-ccic/cafe-driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3f750706486227f32991092fe57c25e1290691d5 Author: Ard Biesheuvel Date: Thu May 23 11:22:56 2019 +0100 arm64: bpf: do not allocate executable memory The BPF code now takes care of mapping the code pages executable after mapping them read-only, to ensure that no RWX mapped regions are needed, even transiently. This means we can drop the executable permissions from the mapping at allocation time. Acked-by: Will Deacon Signed-off-by: Ard Biesheuvel Signed-off-by: Catalin Marinas arch/arm64/net/bpf_jit_comp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f83b4f8860046e0f5244eef35b25fc3e405d7fee Author: Ard Biesheuvel Date: Thu May 23 11:22:55 2019 +0100 arm64/kprobes: set VM_FLUSH_RESET_PERMS on kprobe instruction pages In order to avoid transient inconsistencies where freed code pages are remapped writable while stale TLB entries still exist on other cores, mark the kprobes text pages with the VM_FLUSH_RESET_PERMS attribute. This instructs the core vmalloc code not to defer the TLB flush when this region is unmapped and returned to the page allocator. Acked-by: Will Deacon Signed-off-by: Ard Biesheuvel Signed-off-by: Catalin Marinas arch/arm64/kernel/probes/kprobes.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 4739d53fcd1df8a9f6f72bb02a3a1d852ad252b3 Author: Ard Biesheuvel Date: Thu May 23 11:22:54 2019 +0100 arm64/mm: wire up CONFIG_ARCH_HAS_SET_DIRECT_MAP Wire up the special helper functions to manipulate aliases of vmalloc regions in the linear map. Acked-by: Will Deacon Signed-off-by: Ard Biesheuvel Signed-off-by: Catalin Marinas arch/arm64/Kconfig | 1 + arch/arm64/include/asm/cacheflush.h | 3 +++ arch/arm64/mm/pageattr.c | 48 ++++++++++++++++++++++++++++++------- mm/vmalloc.c | 11 --------- 4 files changed, 44 insertions(+), 19 deletions(-) commit 7dfac3c5f40eb92841147eccf1b96f428b10131f Author: Ard Biesheuvel Date: Thu May 23 11:22:53 2019 +0100 arm64: module: create module allocations without exec permissions Now that the core code manages the executable permissions of code regions of modules explicitly, it is no longer necessary to create the module vmalloc regions with RWX permissions, and we can create them with RW- permissions instead, which is preferred from a security perspective. Acked-by: Will Deacon Signed-off-by: Ard Biesheuvel Signed-off-by: Catalin Marinas arch/arm64/kernel/module.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 58557e486f89823763039502923647037ef7032f Author: Florian Fainelli Date: Mon Jun 17 15:29:59 2019 -0700 arm64: Allow user selection of ARM64_MODULE_PLTS Make ARM64_MODULE_PLTS a selectable Kconfig symbol, since some people might have very big modules spilling out of the dedicated module area into vmalloc. Help text is copied from the ARM 32-bit counterpart and modified to a mention of KASLR and specific ARM errata workaround(s). Acked-by: Will Deacon Signed-off-by: Florian Fainelli Signed-off-by: Catalin Marinas arch/arm64/Kconfig | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit 2af22f3ec3ca452f1e79b967f634708ff01ced8a Author: Ard Biesheuvel Date: Wed Jun 19 14:18:31 2019 +0200 acpi/arm64: ignore 5.1 FADTs that are reported as 5.0 Some Qualcomm Snapdragon based laptops built to run Microsoft Windows are clearly ACPI 5.1 based, given that that is the first ACPI revision that supports ARM, and introduced the FADT 'arm_boot_flags' field, which has a non-zero field on those systems. So in these cases, infer from the ARM boot flags that the FADT must be 5.1 or later, and treat it as 5.1. Acked-by: Sudeep Holla Tested-by: Lee Jones Reviewed-by: Graeme Gregory Acked-by: Lorenzo Pieralisi Acked-by: Hanjun Guo Signed-off-by: Ard Biesheuvel Signed-off-by: Catalin Marinas arch/arm64/kernel/acpi.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 74b94e6b8013dcec6782b2fca4abf301f5aa5245 Author: Krzysztof Kozlowski Date: Fri Jun 21 17:44:54 2019 +0200 ARM: dts: exynos: Use proper regulator for eMMC memory on Arndale Octa The eMMC memory is supplied by LDO18 (PVDD_EMMC_1V8) and buck10 (PVDD_EMMCF_2V8), not by LDO10. The LDO10 (PVDD_PRE_1V8) supplies instead VDDP_MMC pin of eMMC host interface and it is already marked as always on. This change only properly models the hardware and reflects in usage of regulators. There is no functional change because: 1. LDO18 cannot be turned off (e.g. by lack of consumers) because in off mode it is controlled by LDO18EN pin, which is pulled up by always-on regulator LDO2 (PVDD_APIO_1V8). 2. LDO10 is marked as always on so removing its consumer will not have effect. Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos5420-arndale-octa.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3e7f057681a67941f32f6e9822793e6e71e28155 Author: Krzysztof Kozlowski Date: Thu Jun 20 20:34:57 2019 +0200 ARM: dts: exynos: Add regulator suspend configuration to Odroid XU3/XU4/HC1 family Add the PMIC regulator suspend configuration to entire Odroid XU3/XU4/HC1 family of boards to reduce power usage during suspend. The configuration is based on vendor (Hardkernel) reference kernel with additional buck9 suspend configuration (for USB hub suspend and proper reset). Energy consumption measurements from Marek Szyprowski during suspend to RAM: - all at 5 V power supply, - before: next-20190620, - after: next-20190620 + this patch + suspend configuration for s2mps11 regulator driver, Board | before [mA] | after [mA] | Odroid HC1 | 120 | 7-10 | Odroid XU4, sdcard | 88 | 6-9 | Odroid XU4, eMMC | 100 | 6-9 | Signed-off-by: Krzysztof Kozlowski Tested-by: Marek Szyprowski Tested-by: Anand Moon arch/arm/boot/dts/exynos5422-odroid-core.dtsi | 96 +++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) commit d677a6cf707cca181ba51a9ce39bca004372b7d1 Author: Aliasgar Surti Date: Fri Jun 21 02:39:52 2019 -0400 media: staging: media: fix style problem checkpatch reported "WARNING: line over 80 characters". This patch fixes the warning for file soc_camera/soc_ov5642.c Signed-off-by: Aliasgar Surti Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/soc_camera/soc_ov5642.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 1f513ee3e05d7c2512411fe2d93bce1fabf83a8c Author: Krzysztof Kozlowski Date: Fri Jun 21 17:44:50 2019 +0200 ARM: dts: exynos: Add regulator suspend configuration to Arndale Octa board Add the PMIC regulator suspend configuration to Arndale Octa board to reduce power usage during suspend and keep necessary regulators on. The configuration is based on vendor (Insignal) reference kernel and the board datasheet. Comparing to vendor kernel, additionally turn off in suspend all regulators controlled by external pin (LDO3, LDO7, LDO18 and buck10). This is purely for hardware description because board does not support Suspend to RAM and the S2MPS11 driver does not support "regulator-on-in-suspend" property. Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos5420-arndale-octa.dts | 80 +++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) commit d0b737f93968d59ff92ac2da5f1e46a85b5ce0a5 Author: Krzysztof Kozlowski Date: Thu Jun 20 20:34:52 2019 +0200 ARM: dts: exynos: Disable unused buck10 regulator on Odroid HC1 board The eMMC memory on Odroid XU3/XU4 boards is supplied by two regulators LDO18 and buck10 (and LDO13 for the host interface). However the Odroid HC1 board does not have eMMC connector so this regulator does not have to be always on. Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos5422-odroid-core.dtsi | 2 -- arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi | 6 ++++++ 2 files changed, 6 insertions(+), 2 deletions(-) commit ff250c6147f36a8b7a5305ffbde7881973fed5af Author: Lubomir Rintel Date: Thu Jun 20 10:49:04 2019 -0400 media: marvell-ccic: mmp: don't chicken out w/o pdata It's impossible for mmpcam_calc_dphy() to be called without it. Signed-off-by: Lubomir Rintel Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/marvell-ccic/mmp-driver.c | 3 --- 1 file changed, 3 deletions(-) commit 901ecb02113757df8a1b6a6ff29c6941baeec3df Author: Lubomir Rintel Date: Thu Jun 20 10:49:03 2019 -0400 media: marvell-ccic: only calculate the DPHY registers when needed Avoid pointlessly calling calc_dphy() when the bus is not V4L2_MBUS_CSI2_DPHY. This will make it easier to replace the platform data with devicetree. Signed-off-by: Lubomir Rintel Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/marvell-ccic/mcam-core.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 03aedb1d2cd7d137c01b5e33eabbf58a48266a3b Author: Hugues Fruchet Date: Mon Jun 17 09:43:58 2019 -0400 media: st-mipid02: add support of JPEG Add support of JPEG pixel format. This requires auto detection of data type from CSI-2 stream. Signed-off-by: Hugues Fruchet Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/st-mipid02.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit b9f343dfc65ee692b3e47cb34b3fa5ae4979f066 Author: Hugues Fruchet Date: Mon Jun 17 09:43:57 2019 -0400 media: st-mipid02: add support of YUYV8 and UYVY8 Add support of YUYV8 and UYVY8 pixel formats. Signed-off-by: Hugues Fruchet Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/st-mipid02.c | 5 +++++ 1 file changed, 5 insertions(+) commit 197adee605642c72732fd07ed59a3950a80f4e77 Author: Hugues Fruchet Date: Mon Jun 17 09:43:56 2019 -0400 media: st-mipid02: add support of RGB565 Add support of RGB565 pixel format. Signed-off-by: Hugues Fruchet Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/st-mipid02.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit b28944c6f6d3951f0c8f23f90c83ef741d30bfca Author: Ard Biesheuvel Date: Thu Jun 20 14:36:49 2019 +0200 spi/acpi: avoid spurious matches during slave enumeration In the new SPI ACPI slave enumeration code, we use the value of lookup.max_speed_khz as a flag to decide whether a match occurred. However, doing so only makes sense if we initialize its value to zero beforehand, or otherwise, random junk from the stack will cause spurious matches. So zero initialize the lookup struct fully, and only set the non-zero members explicitly. Fixes: 4c3c59544f33 ("spi/acpi: enumerate all SPI slaves in the namespace") Cc: Mika Westerberg Cc: andy.shevchenko@gmail.com Cc: masahisa.kojima@linaro.org Cc: "Rafael J. Wysocki" Cc: Jarkko Nikula Cc: linux-acpi@vger.kernel.org Cc: Lukas Wunner Signed-off-by: Ard Biesheuvel Tested-by: Jarkko Nikula Acked-by: Mika Westerberg Signed-off-by: Mark Brown drivers/spi/spi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit f47bee2ba447bebc304111c16ef1e1a73a9744dd Author: Rob Clark Date: Mon Jun 24 09:09:47 2019 -0700 drm/msm/a3xx: remove TPL1 regs from snapshot These regs are write-only, and the hw throws a hissy-fit (ie. reboots) when we try to read them for GPU state snapshot, in response to a GPU hang. It is rather impolite when GPU recovery triggers an insta- reboot, so lets remove the TPL1 registers from the snapshot. Fixes: 7198e6b03155 drm/msm: add a3xx gpu support Signed-off-by: Rob Clark Reviewed-by: Jordan Crouse drivers/gpu/drm/msm/adreno/a3xx_gpu.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) commit 94613d5ae1091a28b33f38e18d96e8d953ac18df Author: Patrice Chotard Date: Thu Jun 20 15:13:23 2019 +0200 spi: spi-stm32-qspi: Remove CR_FTHRES_MASK usage On STM32 F4/F7/H7 SoCs, FTHRES is a 5 bits field in QSPI_CR register, but for STM32MP1 SoCs, FTHRES is a 4 bits field long. CR_FTHRES_MASK definition is not correct. As for all these SoCs, FTHRES field is set to 3, FIELD_PREP() macro is used with a constant as second parameter which make its usage useless. CR_FTHRES_MASK and FIELD_PREP() can be removed. Signed-off-by: Patrice Chotard Signed-off-by: Mark Brown drivers/spi/spi-stm32-qspi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 65d80db2ee92330269e90313c6af782036f4d23d Author: Krzysztof Kozlowski Date: Thu Jun 20 20:35:27 2019 +0200 regulator: s2mps11: Add support for disabling S2MPS11 regulators in suspend The driver supported turning off regulators in suspend only for S2MPS14 device. However this makes also sense for S2MPS11 and can reduce the power consumption during suspend to RAM. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Mark Brown drivers/regulator/s2mps11.c | 210 ++++++++++++++++++++---------------- include/linux/mfd/samsung/s2mps11.h | 5 + 2 files changed, 120 insertions(+), 95 deletions(-) commit df33799c5c3262a69acd29b7a4eb9e7cbd1b007c Author: Krzysztof Kozlowski Date: Thu Jun 20 20:35:26 2019 +0200 regulator: s2mps11: Reduce number of rdev_get_id() calls Store the regulator ID instead of calling rdev_get_id() every time. This makes code slightly easier to read as shorter 'rdev_id' variable is used instead of full call. This can also speed things up by reducing number of calls, although effect was not measured. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Mark Brown drivers/regulator/s2mps11.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit b01d18232587881ae813d4a1d14c8d9a2ac36b15 Author: Jeffrey Hugo Date: Thu Jun 20 07:22:28 2019 -0700 regulator: qcom_spmi: Do NULL check for lvs Low-voltage switches (lvs) don't have set_points since the voltage ranges of the output are really controlled by the inputs. This is a problem for the newly added linear range support in the probe(), as that will cause a null pointer dereference error on older platforms like msm8974 which happen to need to control some of the implemented lvs. Fix this by adding the appropriate null check. Fixes: 86f4ff7a0c0c ("regulator: qcom_spmi: enable linear range info") Reported-by: Bjorn Andersson Signed-off-by: Jeffrey Hugo Tested-by: Bjorn Andersson Signed-off-by: Mark Brown drivers/regulator/qcom_spmi-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 30b233b1cb4291d39ca08a95566721e8a52e5ee3 Author: Enric Balletbo i Serra Date: Fri Jun 21 17:58:08 2019 +0200 ASoC: rk3399_gru_sound: Support 32, 44.1 and 88.2 kHz sample rates According to the datasheet the max98357a also supports 32, 44.1 and 88.2 kHz sample rate. This support was also introduced recently by commit fdf34366d324 ("ASoC: max98357a: add missing supported rates"). Actually the machine driver validates the supported sample rates but this is not really needed because the component driver can all apply whatever constraints are needed and do their own validation. So, remove the checks from the machine driver as are not needed at all. This way, we also support 32, 44.1 and 88.2 kHz sample rates and we get rid of the errors like the below. rk3399-gru-sound sound: rockchip_sound_max98357a_hw_params() doesn't support this sample rate: 44100 rk3399-gru-sound sound: ASoC: machine hw_params failed: -22 Signed-off-by: Enric Balletbo i Serra Signed-off-by: Mark Brown sound/soc/rockchip/rk3399_gru_sound.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) commit b9f2e25c599bbbf0646957e07ebb72b942c286cc Author: Kuninori Morimoto Date: Thu Jun 20 09:49:33 2019 +0900 ASoC: soc-core: use soc_find_component() at snd_soc_find_dai() snd_soc_find_dai() finds component first via specified snd_soc_dai_link_component, and find DAI from it. We already have soc_find_component() to find component, but soc_find_dai() has original implementation to find component. We shouldn't have duplicate implementation to do same things. This patch uses soc_find_component() at soc_find_dai() Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/soc-core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit c1e230f0f7a3cc640317aa78389258a2fa54bcde Author: Kuninori Morimoto Date: Thu Jun 20 09:49:27 2019 +0900 ASoC: soc-core: soc_find_component() uses snd_soc_dai_link_component soc_find_component() is using "of_node" and "name" to finding component, but we should use snd_soc_dai_link_component now, because it is created to such purpose. This patch uses snd_soc_dai_link_component for soc_find_component(). Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/soc-core.c | 45 ++++++++++++++++++++------------------------- 1 file changed, 20 insertions(+), 25 deletions(-) commit a9ec84966f6d887b9066029596eb361b5d2af214 Author: Kuninori Morimoto Date: Thu Jun 20 09:49:23 2019 +0900 ASoC: soc-core: soc_find_component() uses snd_soc_is_matching_component() ALSA SoC already has snd_soc_is_matching_component() to confirming matching component, but, soc_find_component() has original implementation to confirm component. We shouldn't have duplicate implementation to do same things. This patch uses snd_soc_is_matching_component() at soc_find_component() Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/soc-core.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 7d7db5d3c3d849c2f877be3b4c9afa7f5b5257c2 Author: Kuninori Morimoto Date: Thu Jun 20 09:49:17 2019 +0900 ASoC: soc-core: move soc_find_component() move soc_find_component() next to snd_soc_is_matching_component(). This is prepare for soc_find_component() cleanup Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/soc-core.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) commit a2438253ba73ae51d9521c90ad8d3989bcdda74e Author: YueHaibing Date: Thu Jun 20 14:57:09 2019 +0000 ASoC: SOF: Intel: hda: remove duplicated include from hda.c Remove duplicated include. Signed-off-by: YueHaibing Acked-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/sof/intel/hda.c | 1 - 1 file changed, 1 deletion(-) commit 97236cda3ae5a133f0c3b7295ddc746d1ea2c9c2 Author: Antoine Tenart Date: Fri Jun 21 17:30:02 2019 +0200 net: macb: use GRO This patch updates the macb driver to use NAPI GRO helpers when receiving SKBs. This improves performances. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller drivers/net/ethernet/cadence/macb.h | 3 ++- drivers/net/ethernet/cadence/macb_main.c | 18 ++++++++++-------- 2 files changed, 12 insertions(+), 9 deletions(-) commit 760a3c1aa173cafb6e8c12cc038fa8ef442625b0 Author: Antoine Tenart Date: Fri Jun 21 17:28:55 2019 +0200 net: macb: use NAPI_POLL_WEIGHT Use NAPI_POLL_WEIGHT, the default NAPI poll() weight instead of redefining our own value (which turns out to be 64 as well). Signed-off-by: Antoine Tenart Acked-by: Nicolas Ferre Signed-off-by: David S. Miller drivers/net/ethernet/cadence/macb_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ceaea851b9ea75f9ea2bbefb53ff0d4b27cd5a6e Author: Mark Brown Date: Fri Jun 21 12:33:57 2019 +0100 ASoC: dapm: Adapt for debugfs API change Back in ff9fb72bc07705c (debugfs: return error values, not NULL) the debugfs APIs were changed to return error pointers rather than NULL pointers on error, breaking the error checking in ASoC. Update the code to use IS_ERR() and log the codes that are returned as part of the error messages. Fixes: ff9fb72bc07705c (debugfs: return error values, not NULL) Signed-off-by: Mark Brown Cc: stable@vger.kernel.org Signed-off-by: Mark Brown sound/soc/soc-dapm.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit c2c928c93173f220955030e8440517b87ec7df92 Author: Mark Brown Date: Fri Jun 21 12:33:56 2019 +0100 ASoC: core: Adapt for debugfs API change Back in ff9fb72bc07705c (debugfs: return error values, not NULL) the debugfs APIs were changed to return error pointers rather than NULL pointers on error, breaking the error checking in ASoC. Update the code to use IS_ERR() and log the codes that are returned as part of the error messages. Fixes: ff9fb72bc07705c (debugfs: return error values, not NULL) Signed-off-by: Mark Brown Cc: stable@vger.kernel.org Signed-off-by: Mark Brown sound/soc/soc-core.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit b545542a0b866f7975254e41c595836e9bc0ff2f Author: Kuninori Morimoto Date: Wed Jun 19 10:07:19 2019 +0900 ASoC: soc-core: call snd_soc_unbind_card() under mutex_lock; commit 34ac3c3eb8f0c07 ("ASoC: core: lock client_mutex while removing link components") added mutex_lock() at soc_remove_link_components(). Is is called from snd_soc_unbind_card() snd_soc_unbind_card() => soc_remove_link_components() soc_cleanup_card_resources() soc_remove_dai_links() => soc_remove_link_components() And, there are 2 way to call it. (1) snd_soc_unregister_component() ** mutex_lock() snd_soc_component_del_unlocked() => snd_soc_unbind_card() ** mutex_unlock() (2) snd_soc_unregister_card() => snd_soc_unbind_card() (1) case is already using mutex_lock() when it calles snd_soc_unbind_card(), thus, we will get lockdep warning. commit 495f926c68ddb90 ("ASoC: core: Fix deadlock in snd_soc_instantiate_card()") tried to fixup it, but still not enough. We still have lockdep warning when we try unbind/bind. We need mutex_lock() under snd_soc_unregister_card() instead of snd_remove_link_components()/snd_soc_unbind_card(). Fixes: 34ac3c3eb8f0c07 ("ASoC: core: lock client_mutex while removing link components") Fixes: 495f926c68ddb90 ("ASoC: core: Fix deadlock in snd_soc_instantiate_card()") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/soc-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b989ff070574ad8b8621d866de0a8e9a65d42c80 Merge: 4289ee7d5a83 11ca7a9d541d Author: Paul E. McKenney Date: Mon Jun 24 09:12:39 2019 -0700 Merge LKMM and RCU commits commit 6b2c8e522c8980fedfd24f3d1e69c3bccdb9414d Merge: 2f5af4ab7de1 7e31d8215fd8 Author: Jens Axboe Date: Mon Jun 24 10:10:35 2019 -0600 Merge branch 'nvme-5.3' of git://git.infradead.org/nvme into for-5.3/block Pull NVMe updates from Christoph: "A large chunk of NVMe updates for 5.3. Highlights: - improved PCIe suspent support (Keith Busch) - error injection support for the admin queue (Akinobu Mita) - Fibre Channel discovery improvements (James Smart) - tracing improvements including nvmetc tracing support (Minwoo Im) - misc fixes and cleanups (Anton Eidelman, Minwoo Im, Chaitanya Kulkarni)" * 'nvme-5.3' of git://git.infradead.org/nvme: (26 commits) Documentation: nvme: add an example for nvme fault injection nvme: enable to inject errors into admin commands nvme: prepare for fault injection into admin commands nvmet: introduce target-side trace nvme-trace: print result and status in hex format nvme-trace: support for fabrics commands in host-side nvme-trace: move opcode symbol print to nvme.h nvme-trace: do not export nvme_trace_disk_name nvme-pci: clean up nvme_remove_dead_ctrl a bit nvme-pci: properly report state change failure in nvme_reset_work nvme-pci: set the errno on ctrl state change error nvme-pci: adjust irq max_vector using num_possible_cpus() nvme-pci: remove queue_count_ops for write_queues and poll_queues nvme-pci: remove unnecessary zero for static var nvme-pci: use host managed power state for suspend nvme: introduce nvme_is_fabrics to check fabrics cmd nvme: export get and set features nvme: fix possible io failures when removing multipathed ns nvme-fc: add message when creating new association lpfc: add sysfs interface to post NVME RSCN ... commit 4289ee7d5a8343eaddd0986f8fb492868e2f546f Author: Alan Stern Date: Thu Jun 20 11:55:58 2019 -0400 tools/memory-model: Improve data-race detection Herbert Xu recently reported a problem concerning RCU and compiler barriers. In the course of discussing the problem, he put forth a litmus test which illustrated a serious defect in the Linux Kernel Memory Model's data-race-detection code [1]. The defect was that the LKMM assumed visibility and executes-before ordering of plain accesses had to be mediated by marked accesses. In Herbert's litmus test this wasn't so, and the LKMM claimed the litmus test was allowed and contained a data race although neither is true. In fact, plain accesses can be ordered by fences even in the absence of marked accesses. In most cases this doesn't matter, because most fences only order accesses within a single thread. But the rcu-fence relation is different; it can order (and induce visibility between) accesses in different threads -- events which otherwise might be concurrent. This makes it relevant to data-race detection. This patch makes two changes to the memory model to incorporate the new insight: If a store is separated by a fence from another access, the store is necessarily visible to the other access (as reflected in the ww-vis and wr-vis relations). Similarly, if a load is separated by a fence from another access then the load necessarily executes before the other access (as reflected in the rw-xbstar relation). If a store is separated by a strong fence from a marked access then it is necessarily visible to any access that executes after the marked access (as reflected in the ww-vis and wr-vis relations). With these changes, the LKMM gives the desired result for Herbert's litmus test and other related ones [2]. [1] https://lore.kernel.org/lkml/Pine.LNX.4.44L0.1906041026570.1731-100000@iolanthe.rowland.org/ [2] https://github.com/paulmckrcu/litmus/blob/master/manual/plain/C-S-rcunoderef-1.litmus https://github.com/paulmckrcu/litmus/blob/master/manual/plain/C-S-rcunoderef-2.litmus https://github.com/paulmckrcu/litmus/blob/master/manual/plain/C-S-rcunoderef-3.litmus https://github.com/paulmckrcu/litmus/blob/master/manual/plain/C-S-rcunoderef-4.litmus https://github.com/paulmckrcu/litmus/blob/master/manual/plain/strong-vis.litmus Reported-by: Herbert Xu Signed-off-by: Alan Stern Acked-by: Andrea Parri Signed-off-by: Paul E. McKenney Tested-by: Akira Yokosawa tools/memory-model/linux-kernel.cat | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 38a3889f2d9526748af51a863968e941f7d42e63 Merge: 8bc81c570831 58ade67b0215 Author: David S. Miller Date: Mon Jun 24 09:02:56 2019 -0700 Merge branch 'ipv4-fix-bugs-when-enable-route_localnet' Shijie Luo says: ==================== ipv4: fix bugs when enable route_localnet When enable route_localnet, route of the 127/8 address is enabled. But in some situations like arp_announce=2, ARP requests or reply work abnormally. This patchset fix some bugs when enable route_localnet. Change History: V2: - Change a single patch to a patchset. - Add bug fix for arp_ignore = 3. - Add a couple of test for enabling route_localnet in selftests. ==================== Signed-off-by: David S. Miller commit 58ade67b021549d540e2ed4be6971c5e3240388f Author: Shijie Luo Date: Tue Jun 18 15:14:05 2019 +0000 selftests: add route_localnet test script Add a simple scripts to exercise several situations when enable route_localnet. Signed-off-by: Shijie Luo Signed-off-by: Zhiqiang liu Signed-off-by: David S. Miller tools/testing/selftests/net/route_localnet.sh | 74 +++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) commit 650638a7c6e60a198573873972aafb065f200056 Author: Shijie Luo Date: Tue Jun 18 15:14:04 2019 +0000 ipv4: fix confirm_addr_indev() when enable route_localnet When arp_ignore=3, the NIC won't reply for scope host addresses, but if enable route_locanet, we need to reply ip address with head 127 and scope RT_SCOPE_HOST. Fixes: d0daebc3d622 ("ipv4: Add interface option to enable routing of 127.0.0.0/8") Signed-off-by: Shijie Luo Signed-off-by: Zhiqiang Liu Signed-off-by: David S. Miller net/ipv4/devinet.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit d8c444d540beaa39aff834c5b83df7e86a1ae765 Author: Shijie Luo Date: Tue Jun 18 15:14:03 2019 +0000 ipv4: fix inet_select_addr() when enable route_localnet Suppose we have two interfaces eth0 and eth1 in two hosts, follow the same steps in the two hosts: # sysctl -w net.ipv4.conf.eth1.route_localnet=1 # sysctl -w net.ipv4.conf.eth1.arp_announce=2 # ip route del 127.0.0.0/8 dev lo table local and then set ip to eth1 in host1 like: # ifconfig eth1 127.25.3.4/24 set ip to eth2 in host2 and ping host1: # ifconfig eth1 127.25.3.14/24 # ping -I eth1 127.25.3.4 Well, host2 cannot connect to host1. When set a ip address with head 127, the scope of the address defaults to RT_SCOPE_HOST. In this situation, host2 will use arp_solicit() to send a arp request for the mac address of host1 with ip address 127.25.3.14. When arp_announce=2, inet_select_addr() cannot select a correct saddr with condition ifa->ifa_scope > scope, because ifa_scope is RT_SCOPE_HOST and scope is RT_SCOPE_LINK. Then, inet_select_addr() will go to no_in_dev to lookup all interfaces to find a primary ip and finally get the primary ip of eth0. Here I add a localnet_scope defaults to RT_SCOPE_HOST, and when route_localnet is enabled, this value changes to RT_SCOPE_LINK to make inet_select_addr() find a correct primary ip as saddr of arp request. Fixes: d0daebc3d622 ("ipv4: Add interface option to enable routing of 127.0.0.0/8") Signed-off-by: Shijie Luo Signed-off-by: Zhiqiang Liu Signed-off-by: David S. Miller net/ipv4/devinet.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 8bc81c570831f5b739a1c8dfe547b828ef398dfb Author: Xin Long Date: Mon Jun 24 16:02:42 2019 +0800 tipc: remove the unnecessary msg->req check from tipc_nl_compat_bearer_set tipc_nl_compat_bearer_set() is only called by tipc_nl_compat_link_set() which already does the check for msg->req check, so remove it from tipc_nl_compat_bearer_set(), and do the same in tipc_nl_compat_media_set(). Signed-off-by: Xin Long Signed-off-by: David S. Miller net/tipc/netlink_compat.c | 10 ---------- 1 file changed, 10 deletions(-) commit 6a381d1072f174cb80a27526a7ccdcfd6604ecb2 Author: Hugues Fruchet Date: Mon Jun 17 09:43:31 2019 -0400 media: st-mipid02: add support of V4L2_CID_LINK_FREQ Ask device connected on sink pad for link frequency in order to configure CLK_LANE_REG1 (ui_x4). If not available, ask for pixel rate information to compute it. This is needed to deal with compressed format such as JPEG where number of bits per pixel is unknown: computation of link frequency from pixel rate is not possible. Signed-off-by: Hugues Fruchet Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/st-mipid02.c | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) commit 81a409bfd5517d537097d3cfdfed7f8bf8ac469c Author: Lubomir Rintel Date: Tue May 28 05:07:31 2019 -0400 media: marvell-ccic: provide a clock for the sensor The sensor needs the MCLK clock running when it's being probed. On platforms where the sensor is instantiated from a DT (MMP2) it is going to happen asynchronously. Therefore, the current modus operandi, where the bridge driver fiddles with the sensor power and clock itself is not going to fly. As the comments wisely note, this doesn't even belong there. Luckily, the ov7670 driver is already able to control its power and reset lines, we can just drop the MMP platform glue altogether. It also requests the clock via the standard clock subsystem. Good -- let's set up a clock instance so that the sensor can ask us to enable the clock. Note that this is pretty dumb at the moment: the clock is hardwired to a particular frequency and parent. It was always the case. Signed-off-by: Lubomir Rintel Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/marvell-ccic/Kconfig | 2 + drivers/media/platform/marvell-ccic/cafe-driver.c | 9 +- drivers/media/platform/marvell-ccic/mcam-core.c | 172 ++++++++++++++++------ drivers/media/platform/marvell-ccic/mcam-core.h | 3 + drivers/media/platform/marvell-ccic/mmp-driver.c | 152 ++----------------- include/linux/platform_data/media/mmp-camera.h | 2 - 6 files changed, 157 insertions(+), 183 deletions(-) commit 3eefe36cc00c5391b1ca2a68c5f01e9aa127c2a6 Author: Lubomir Rintel Date: Tue May 28 05:07:30 2019 -0400 media: marvell-ccic: use async notifier to get the sensor An instance of a sensor on DT-based MMP2 platform is always going to be created asynchronously. Let's move the manual device creation away from the core to the Cafe driver (used on OLPC XO-1, not present in DT) and set up appropriate async matches: I2C on Cafe, FWNODE on MMP (OLPC XO-1.75). Signed-off-by: Lubomir Rintel Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/marvell-ccic/cafe-driver.c | 49 +++++-- drivers/media/platform/marvell-ccic/mcam-core.c | 157 +++++++++++++++------- drivers/media/platform/marvell-ccic/mcam-core.h | 5 +- drivers/media/platform/marvell-ccic/mmp-driver.c | 27 ++-- include/linux/platform_data/media/mmp-camera.h | 1 - 5 files changed, 162 insertions(+), 77 deletions(-) commit 83c40e6611ec1e548ece34f6940f516333abc16a Author: Lubomir Rintel Date: Tue May 28 05:07:29 2019 -0400 media: marvell-ccic/mmp: add devicetree support The platform data is actually not used anywhere (along with the CSI support) and should be safe to remove. Signed-off-by: Lubomir Rintel Acked-by: Pavel Machek Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/marvell-ccic/mmp-driver.c | 36 ++++++++++++++++++------ 1 file changed, 27 insertions(+), 9 deletions(-) commit 4d5da53d327ccfa2fe3b8a6bf776df8ba3985456 Author: Lubomir Rintel Date: Tue May 28 05:07:28 2019 -0400 media: marvell-ccic: rename the clocks Use the names more suitable for devicetree bindings. There are no board files utilizing this, thus we seem to be at liberty at renaming this without consequences. Signed-off-by: Lubomir Rintel Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/marvell-ccic/mmp-driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f12fb2849b11b4c571a32d31ec51eabd70ab8193 Author: Lubomir Rintel Date: Tue May 28 05:07:27 2019 -0400 media: marvell-ccic/mmp: enable clock before accessing registers The access to REG_CLKCTRL or REG_CTRL1 without the clock enabled hangs the machine. Enable the clock first. Signed-off-by: Lubomir Rintel Acked-by: Pavel Machek Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/marvell-ccic/mmp-driver.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit fa49e1d37bbd6d25a11379891ece1e4d5d313036 Author: Lubomir Rintel Date: Tue May 28 05:07:26 2019 -0400 media: marvell-ccic: drop unused stuff Remove structure members and headers that are not actually used. Saves us from some noise in subsequent cleanup commits. Signed-off-by: Lubomir Rintel Acked-by: Pavel Machek Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/marvell-ccic/mcam-core.c | 1 - drivers/media/platform/marvell-ccic/mcam-core.h | 2 -- drivers/media/platform/marvell-ccic/mmp-driver.c | 2 -- include/linux/platform_data/media/mmp-camera.h | 1 - 4 files changed, 6 deletions(-) commit 415cd3ac4ea04ba916a5b02f7853a504e0994757 Author: Lubomir Rintel Date: Tue May 28 05:07:25 2019 -0400 media: Revert "[media] marvell-ccic: reset ccic phy when stop streaming for stability" This accesses the clock registers directly and thus is going to stay in the way of making the driver devicetree friendly. No boards seems to actually use this. If it's somehow actually needed it needs to be done differently. This reverts commit 7c269f454e7a51b151d94f99344120efa1cd0acb. Signed-off-by: Lubomir Rintel Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/marvell-ccic/mcam-core.c | 6 ------ drivers/media/platform/marvell-ccic/mcam-core.h | 2 -- drivers/media/platform/marvell-ccic/mmp-driver.c | 25 ------------------------ 3 files changed, 33 deletions(-) commit 8d4e29a51a954b43e06d916772fa4f50b7e5bbd6 Author: Robert Jarzmik Date: Mon Jun 3 16:01:55 2019 -0400 media: mt9m111: fix fw-node refactoring In the patch refactoring the fw-node, the mt9m111 was broken for all platform_data based platforms, which were the first aim of this driver. Only the devicetree platform are still functional, probably because the testing was done on these. The result is that -EINVAL is systematically return for such platforms, what this patch fixes. [Sakari Ailus: Rework this to resolve a merge conflict and use dev_fwnode] Fixes: 98480d65c48c ("media: mt9m111: allow to setup pixclk polarity") Signed-off-by: Robert Jarzmik Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/mt9m111.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit ecaa3e9423dced739e317adbf3247ad43cb0b4fe Author: Wolfram Sang Date: Sat Jun 8 06:56:12 2019 -0400 media: staging: media: soc_camera: soc_mt9v022: simplify getting the adapter of a client We have a dedicated pointer for that, so use it. Much easier to read and less computation involved. Signed-off-by: Wolfram Sang Reviewed-by: Simon Horman Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/soc_camera/soc_mt9v022.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ac76efaecb4583a60fa542e5ff47994c958605dc Author: Wolfram Sang Date: Sat Jun 8 06:56:11 2019 -0400 media: staging: media: soc_camera: mt9t031: simplify getting the adapter of a client We have a dedicated pointer for that, so use it. Much easier to read and less computation involved. Signed-off-by: Wolfram Sang Reviewed-by: Simon Horman Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/soc_camera/mt9t031.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0283700894e60e9e239ff40af05529f36fb730f8 Author: Wolfram Sang Date: Sat Jun 8 06:56:10 2019 -0400 media: staging: media: soc_camera: imx074: simplify getting the adapter of a client We have a dedicated pointer for that, so use it. Much easier to read and less computation involved. Signed-off-by: Wolfram Sang Reviewed-by: Simon Horman Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/soc_camera/imx074.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2a50c83bbd724e8583602ac76fc04c369bd35493 Author: Wolfram Sang Date: Sat Jun 8 06:55:50 2019 -0400 media: i2c: tw9910: simplify getting the adapter of a client We have a dedicated pointer for that, so use it. Much easier to read and less computation involved. Signed-off-by: Wolfram Sang Reviewed-by: Simon Horman Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/tw9910.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e64de2082dab5e0ca51f7dbe83029f0d7b5b3d34 Author: Wolfram Sang Date: Sat Jun 8 06:55:49 2019 -0400 media: i2c: ov2640: simplify getting the adapter of a client We have a dedicated pointer for that, so use it. Much easier to read and less computation involved. Signed-off-by: Wolfram Sang Reviewed-by: Simon Horman Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov2640.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 18f3896dfd0e158576362812c60e4765f5678225 Merge: c04b6ea4e609 f485cc36b0a7 Author: David S. Miller Date: Mon Jun 24 08:15:42 2019 -0700 Merge branch 'mlxsw-Thermal-and-hwmon-extensions' Ido Schimmel says: ==================== mlxsw: Thermal and hwmon extensions This patchset from Vadim includes various enhancements to thermal and hwmon code in mlxsw. Patch #1 adds a thermal zone for each inter-connect device (gearbox). These devices are present in SN3800 systems and code to expose their temperature via hwmon was added in commit 2e265a8b6c09 ("mlxsw: core: Extend hwmon interface with inter-connect temperature attributes"). Currently, there are multiple thermal zones in mlxsw and only a few cooling devices. Patch #2 detects the hottest thermal zone and the cooling devices are switched to follow its trends. RFC was sent last month [1]. Patch #3 allows to read and report negative temperature of the sensors mlxsw exposes via hwmon and thermal subsystems. v2 (Andrew Lunn): * In patch #3, replace '%u' with '%d' in mlxsw_hwmon_module_temp_show() [1] https://patchwork.ozlabs.org/patch/1107161/ ==================== Signed-off-by: David S. Miller commit f485cc36b0a7d72335662921b4b89346c6423422 Author: Vadim Pasternak Date: Mon Jun 24 13:32:03 2019 +0300 mlxsw: core: Add support for negative temperature readout Extend macros MLXSW_REG_MTMP_TEMP_TO_MC() to allow support of negative temperature readout, since chip and others thermal components are capable of operating within the negative temperature. With no such support negative temperature will be consider as very high temperature and it will cause wrong readout and thermal shutdown. For negative values 2`s complement is used. Tested in chamber. Example of chip ambient temperature readout with chamber temperature: -10 Celsius: temp1: -6.0C (highest = -5.0C) -5 Celsius: temp1: -1.0C (highest = -1.0C) v2 (Andrew Lunn): * Replace '%u' with '%d' in mlxsw_hwmon_module_temp_show() Signed-off-by: Vadim Pasternak Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c | 14 ++++++-------- drivers/net/ethernet/mellanox/mlxsw/core_thermal.c | 14 +++++++------- drivers/net/ethernet/mellanox/mlxsw/reg.h | 12 +++++++----- 3 files changed, 20 insertions(+), 20 deletions(-) commit 6f73862fabd93213de157d9cc6ef76084311c628 Author: Vadim Pasternak Date: Mon Jun 24 13:32:02 2019 +0300 mlxsw: core: Add the hottest thermal zone detection When multiple sensors are mapped to the same cooling device, the cooling device should be set according the worst sensor from the sensors associated with this cooling device. Provide the hottest thermal zone detection and enforce cooling device to follow the temperature trends of the hottest zone only. Prevent competition for the cooling device control from others zones, by "stable trend" indication. A cooling device will not perform any actions associated with a zone with a "stable trend". When other thermal zone is detected as a hottest, a cooling device is to be switched to following temperature trends of new hottest zone. Thermal zone score is represented by 32 bits unsigned integer and calculated according to the next formula: For T < TZ, where t from {normal trip = 0, high trip = 1, hot trip = 2, critical = 3}: TZ score = (T + (TZ - T) / 2) / (TZ - T) * 256 ** j; Highest thermal zone score s is set as MAX(TZscore); Following this formula, if TZ is in trip point higher than TZ, the higher score is to be always assigned to TZ. For two thermal zones located at the same kind of trip point, the higher score will be assigned to the zone which is closer to the next trip point. Thus, the highest score will always be assigned objectively to the hottest thermal zone. All the thermal zones initially are to be configured with mode "enabled" with the "step_wise" governor. Signed-off-by: Vadim Pasternak Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/core_thermal.c | 75 ++++++++++++++++++---- 1 file changed, 62 insertions(+), 13 deletions(-) commit f14f4e621b1b4a33ea4af5ca95a8169a8d2c598c Author: Vadim Pasternak Date: Mon Jun 24 13:32:01 2019 +0300 mlxsw: core: Extend thermal core with per inter-connect device thermal zones Add a dedicated thermal zone for each inter-connect device. The current temperature is obtained from inter-connect temperature sensor and the default trip points are set to the same values as default ASIC trip points. These settings could be changed from the user space. A cooling device (fan) is bound to all inter-connect devices. Signed-off-by: Vadim Pasternak Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/core_thermal.c | 137 ++++++++++++++++++++- 1 file changed, 136 insertions(+), 1 deletion(-) commit 54ed1c182ed28b09683240fe7ebff3000107d956 Author: Wolfram Sang Date: Sat Jun 8 06:55:47 2019 -0400 media: i2c: mt9m111: simplify getting the adapter of a client We have a dedicated pointer for that, so use it. Much easier to read and less computation involved. Signed-off-by: Wolfram Sang Reviewed-by: Simon Horman Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/mt9m111.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 41341dd9c389ea96bc9ea57dc34ac443635513c0 Author: Wolfram Sang Date: Sat Jun 8 06:55:46 2019 -0400 media: i2c: mt9m001: simplify getting the adapter of a client We have a dedicated pointer for that, so use it. Much easier to read and less computation involved. Signed-off-by: Wolfram Sang Reviewed-by: Simon Horman Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/mt9m001.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5197051fdf4da4962837c4ec6d90d27dab8f2fa6 Author: Wolfram Sang Date: Sat Jun 8 06:55:45 2019 -0400 media: i2c: ak881x: simplify getting the adapter of a client We have a dedicated pointer for that, so use it. Much easier to read and less computation involved. Signed-off-by: Wolfram Sang Reviewed-by: Simon Horman Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ak881x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 48cbd9ff53b7391111e8460c3d9307ba14a5f8c0 Author: Peter Chen Date: Mon Jun 24 10:02:57 2019 +0800 ARM: dts: imx7ulp-evk: enable USBOTG1 support Enable USBOTG1 support for evk board, it is dual-role function port. Signed-off-by: Peter Chen Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7ulp-evk.dts | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit 5b7bd456318a700298dc9aa31e09dd295e6edc4a Author: Peter Chen Date: Mon Jun 24 10:02:56 2019 +0800 ARM: dts: imx7ulp: add imx7ulp USBOTG1 support Add imx7ulp USBOTG1 support. Signed-off-by: Peter Chen Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7ulp.dtsi | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 04bc4f6631f7e47a9fe47ea6c0794ed56d9b3cf8 Author: Sakari Ailus Date: Fri May 31 16:12:49 2019 -0400 media: mt9m111: Fix error handling in mt9m111_power_on The mt9m111_power_on function did not properly clean up whenever it encountered an error. Do that now. Signed-off-by: Sakari Ailus Reviewed-by: Marco Felsch Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/mt9m111.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit 2125212785c96c053a0b803b9605398e014e3a29 Author: Michael Grzeschik Date: Mon Jun 17 18:14:32 2019 +0200 ARM: dts: imx6qdl-kontron-samx6i: add Kontron SMARC SoM Support The patch adds the following interfaces according the SMARC Spec 1.1 [1] and provided schematics: - SMARC SPI0/1 Note: Since Kontron still uses silicon revisions below 1.3 they have add a spi-nor to implement Workaround #1 of erratum ERR006282. - SMARC SDIO - SMARC LCD - SMARC HDMI - SMARC Management pins Note: Kontron don't route all of these pins to the i.MX6, some are routed to the SoM CPLD. - SMARC GPIO - SMARC CSI Camera Note: As specified in [1] the data lanes are shared to cover the csi and the parallel case. The case depends on the baseboard so muxing the data lanes is not part of this patch. - SMARC I2S - SMARC Watchdog Note: The watchdog output pin is routed to the CPLD and the SMARC header. The CPLD performs a reset after a 30s timeout so we need to enable the watchdog per default. - SMARC module eeprom Due to the lack of hardware not all of these interfaces are tesetd. [1] https://sget.org/standards/smarc Signed-off-by: Michael Grzeschik Signed-off-by: Marco Felsch Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6dl-kontron-samx6i.dtsi | 12 + arch/arm/boot/dts/imx6q-kontron-samx6i.dtsi | 36 +++ arch/arm/boot/dts/imx6qdl-kontron-samx6i.dtsi | 394 ++++++++++++++++++++++++++ 3 files changed, 442 insertions(+) commit 9a57d72b94869ceb29f932e95cb39f0cc156ea1f Author: Sakari Ailus Date: Fri May 31 16:11:35 2019 -0400 media: mt9m111: No need to check for the regulator The regulator_get() function returns a regulator when it succeeds. There's no need to check whether the regulator is NULL later on. Signed-off-by: Sakari Ailus Reviewed-by: Marco Felsch Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/mt9m111.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit dbd66558dd28e69471cac7c1431bb0d8df221498 Author: Cornelia Huck Date: Mon Jun 24 11:07:21 2019 +0200 vfio-ccw: make convert_ccw0_to_ccw1 static Reported by sparse. Fixes: 7f8e89a8f2fd ("vfio-ccw: Factor out the ccw0-to-ccw1 transition") Signed-off-by: Cornelia Huck Message-Id: <20190624090721.16241-1-cohuck@redhat.com> Signed-off-by: Christian Borntraeger Signed-off-by: Vasily Gorbik drivers/s390/cio/vfio_ccw_cp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9de31912490e967e148393c04fb054f0219b7350 Merge: 96e5aaf91406 5223bee837e8 Author: Vasily Gorbik Date: Mon Jun 24 17:02:28 2019 +0200 Merge tag 'vfio-ccw-20190621' of https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/vfio-ccw into features Refactoring of the vfio-ccw cp handling, simplifying the code and avoiding unneeded allocating/copying. * tag 'vfio-ccw-20190621' of https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/vfio-ccw: vfio-ccw: Remove copy_ccw_from_iova() vfio-ccw: Factor out the ccw0-to-ccw1 transition vfio-ccw: Copy CCW data outside length calculation vfio-ccw: Skip second copy of guest cp to host vfio-ccw: Move guest_cp storage into common struct s390/cio: Combine direct and indirect CCW paths vfio-ccw: Rearrange IDAL allocation in direct CCW vfio-ccw: Remove pfn_array_table vfio-ccw: Adjust the first IDAW outside of the nested loops vfio-ccw: Rearrange pfn_array and pfn_array_table arrays s390/cio: Use generalized CCW handler in cp_init() s390/cio: Generalize the TIC handler s390/cio: Refactor the routine that handles TIC CCWs s390/cio: Squash cp_free() and cp_unpin_free() Signed-off-by: Vasily Gorbik commit 7796d2a3bb4037f9c51b8d91d059f1d690ed301f Author: Max Gurtovoy Date: Tue Jun 11 18:52:57 2019 +0300 RDMA/mlx5: Refactor MR descriptors allocation Improve code readability using static helpers for each memory region type. Re-use the common logic to get smaller functions that are easy to maintain and reduce code duplication. Signed-off-by: Max Gurtovoy Signed-off-by: Israel Rukshin Reviewed-by: Sagi Grimberg Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/mr.c | 290 ++++++++++++++++++++++------------------ 1 file changed, 157 insertions(+), 133 deletions(-) commit 2563e2f30acb4c914fc475331e476fa920eb4245 Author: Max Gurtovoy Date: Tue Jun 11 18:52:56 2019 +0300 RDMA/mlx5: Use PA mapping for PI handover If possibe, avoid doing a UMR operation to register data and protection buffers (via MTT/KLM mkeys). Instead, use the local DMA key and map the SG lists using PA access. This is safe, since the internal key for data and protection never exposed to the remote server (only signature key might be exposed). If PA mappings are not possible, perform mapping using MTT/KLM descriptors. The setup of the tested benchmark (using iSER ULP): - 2 servers with 24 cores (1 initiator and 1 target) - ConnectX-4/ConnectX-5 adapters - 24 target sessions with 1 LUN each - ramdisk backstore - PI active Performance results running fio (24 jobs, 128 iodepth) using write_generate=1 and read_verify=1 (w/w.o patch): bs IOPS(read) IOPS(write) ---- ---------- ---------- 512 1266.4K/1262.4K 1720.1K/1732.1K 4k 793139/570902 1129.6K/773982 32k 72660/72086 97229/96164 Using write_generate=0 and read_verify=0 (w/w.o patch): bs IOPS(read) IOPS(write) ---- ---------- ---------- 512 1590.2K/1600.1K 1828.2K/1830.3K 4k 1078.1K/937272 1142.1K/815304 32k 77012/77369 98125/97435 Signed-off-by: Max Gurtovoy Signed-off-by: Israel Rukshin Suggested-by: Sagi Grimberg Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/mlx5_ib.h | 1 + drivers/infiniband/hw/mlx5/mr.c | 63 ++++++++++++++++++++++++++-- drivers/infiniband/hw/mlx5/qp.c | 80 ++++++++++++++++++++++++------------ 3 files changed, 114 insertions(+), 30 deletions(-) commit de0ae958deb5e6af35c4c6a4679d4fe9896a98ca Author: Israel Rukshin Date: Tue Jun 11 18:52:55 2019 +0300 RDMA/mlx5: Improve PI handover performance In some loads, there is performance degradation when using KLM mkey instead of MTT mkey. This is because KLM descriptor access is via indirection that might require more HW resources and cycles. Using KLM descriptor is not necessary when there are no gaps at the data/metadata sg lists. As an optimization, use MTT mkey whenever it is possible. For that matter, allocate internal MTT mkey and choose the effective pi_mr for in transaction according to the required mapping scheme. The setup of the tested benchmark (using iSER ULP): - 2 servers with 24 cores (1 initiator and 1 target) - ConnectX-4/ConnectX-5 adapters - 24 target sessions with 1 LUN each - ramdisk backstore - PI active Performance results running fio (24 jobs, 128 iodepth) using write_generate=1 and read_verify=1 (w/w.o/baseline): bs IOPS(read) IOPS(write) ---- ---------- ---------- 512 1262.4K/1243.3K/1147.1K 1732.1K/1725.1K/1423.8K 4k 570902/571233/457874 773982/743293/642080 32k 72086/72388/71933 96164/71789/93249 Using write_generate=0 and read_verify=0 (w/w.o patch): bs IOPS(read) IOPS(write) ---- ---------- ---------- 512 1600.1K/1572.1K/1393.3K 1830.3K/1823.5K/1557.2K 4k 937272/921992/762934 815304/753772/646071 32k 77369/75052/72058 97435/73180/94612 Signed-off-by: Israel Rukshin Reviewed-by: Max Gurtovoy Suggested-by: Max Gurtovoy Suggested-by: Idan Burstein Reviewed-by: Sagi Grimberg Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/mlx5_ib.h | 7 +- drivers/infiniband/hw/mlx5/mr.c | 179 ++++++++++++++++++++++++++++++----- drivers/infiniband/hw/mlx5/qp.c | 2 +- 3 files changed, 164 insertions(+), 24 deletions(-) commit 5c171cbe3ab3d1390290eaa85e7b371cc26b1122 Author: Israel Rukshin Date: Tue Jun 11 18:52:54 2019 +0300 RDMA/mlx5: Remove unused IB_WR_REG_SIG_MR code IB_WR_REG_SIG_MR is not needed after IB_WR_REG_MR_INTEGRITY was used. Signed-off-by: Israel Rukshin Reviewed-by: Max Gurtovoy Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/mr.c | 15 ++- drivers/infiniband/hw/mlx5/qp.c | 154 ++---------------------------- drivers/infiniband/hw/vmw_pvrdma/pvrdma.h | 2 +- include/rdma/ib_verbs.h | 19 ---- 4 files changed, 17 insertions(+), 173 deletions(-) commit e9a53e73a2507f3a1680538bd167b2e49533659a Author: Israel Rukshin Date: Tue Jun 11 18:52:53 2019 +0300 RDMA/rw: Use IB_WR_REG_MR_INTEGRITY for PI handover Replace the old signature handover API with the new one. The new API simplifes PI handover code complexity for ULPs and improve performance. For RW API it will reduce the maximum number of work requests per task and the need of dealing with multiple MRs (and their registrations and invalidations) per task. All the mappings and registration of the data and the protection buffers is done by the LLD using a single WR and a special MR type (IB_MR_TYPE_INTEGRITY) for the PI handover operation. The setup of the tested benchmark (using iSER ULP): - 2 servers with 24 cores (1 initiator and 1 target) - ConnectX-4/ConnectX-5 adapters - 24 target sessions with 1 LUN each - ramdisk backstore - PI active Performance results running fio (24 jobs, 128 iodepth) using write_generate=1 and read_verify=1 (w/w.o patch): bs IOPS(read) IOPS(write) ---- ---------- ---------- 512 1243.3K/1182.3K 1725.1K/1680.2K 4k 571233/528835 743293/748259 32k 72388/71086 71789/93573 Using write_generate=0 and read_verify=0 (w/w.o patch): bs IOPS(read) IOPS(write) ---- ---------- ---------- 512 1572.1K/1427.2K 1823.5K/1724.3K 4k 921992/916194 753772/768267 32k 75052/73960 73180/95484 There is a performance degradation when writing big block sizes. Degradation is caused by the complexity of combining multiple indirections and perform RDMA READ operation from it. This will be fixed in the following patches by reducing the indirections if possible. Signed-off-by: Israel Rukshin Reviewed-by: Max Gurtovoy Reviewed-by: Christoph Hellwig Signed-off-by: Jason Gunthorpe drivers/infiniband/core/rw.c | 167 +++++++++++++------------------- drivers/infiniband/ulp/isert/ib_isert.c | 4 +- include/rdma/rw.h | 9 -- 3 files changed, 72 insertions(+), 108 deletions(-) commit 6cb2d5b105c93efd453d990aa2aea3ebb9405940 Author: Israel Rukshin Date: Tue Jun 11 18:52:52 2019 +0300 RDMA/rw: Introduce rdma_rw_inv_key helper This is a preparation for adding new signature API to the rw-API. Signed-off-by: Israel Rukshin Suggested-by: Christoph Hellwig Reviewed-by: Max Gurtovoy Reviewed-by: Christoph Hellwig Signed-off-by: Jason Gunthorpe drivers/infiniband/core/rw.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) commit 185eddc45798b9f73e5470964948d79b4c8df4b7 Author: Max Gurtovoy Date: Tue Jun 11 18:52:51 2019 +0300 RDMA/core: Validate integrity handover device cap Protect the case that a ULP tries to allocate a QP with signature enabled flag while the LLD doesn't support this feature. While we're here, also move integrity_en attribute from mlx5_qp to ib_qp as a preparation for adding new integrity API to the rw-API (that is part of ib_core module). Signed-off-by: Max Gurtovoy Signed-off-by: Israel Rukshin Reviewed-by: Christoph Hellwig Signed-off-by: Jason Gunthorpe drivers/infiniband/core/verbs.c | 6 ++++++ drivers/infiniband/hw/mlx5/mlx5_ib.h | 2 -- drivers/infiniband/hw/mlx5/qp.c | 7 ++----- include/rdma/ib_verbs.h | 1 + 4 files changed, 9 insertions(+), 7 deletions(-) commit c0a6cbb9cbccffc249743afa16e64f16c46c80b2 Author: Israel Rukshin Date: Tue Jun 11 18:52:50 2019 +0300 RDMA/core: Rename signature qp create flag and signature device capability Rename IB_QP_CREATE_SIGNATURE_EN to IB_QP_CREATE_INTEGRITY_EN and IB_DEVICE_SIGNATURE_HANDOVER to IB_DEVICE_INTEGRITY_HANDOVER. Signed-off-by: Israel Rukshin Reviewed-by: Max Gurtovoy Reviewed-by: Christoph Hellwig Signed-off-by: Jason Gunthorpe drivers/infiniband/core/rw.c | 4 ++-- drivers/infiniband/hw/mlx5/main.c | 2 +- drivers/infiniband/hw/mlx5/mlx5_ib.h | 3 +-- drivers/infiniband/hw/mlx5/qp.c | 14 +++++++------- drivers/infiniband/ulp/iser/iser_verbs.c | 4 ++-- drivers/infiniband/ulp/isert/ib_isert.c | 4 ++-- include/rdma/ib_verbs.h | 4 ++-- 7 files changed, 17 insertions(+), 18 deletions(-) commit 5a6781a558cc3909851c04a0d44e3a87a35aad94 Author: Israel Rukshin Date: Tue Jun 11 18:52:49 2019 +0300 RDMA/core: Add an integrity MR pool support This is a preparation for adding new signature API to the rw-API. Signed-off-by: Israel Rukshin Reviewed-by: Max Gurtovoy Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Jason Gunthorpe drivers/infiniband/core/mr_pool.c | 8 ++++++-- drivers/infiniband/core/rw.c | 4 ++-- drivers/nvme/host/rdma.c | 2 +- include/rdma/mr_pool.h | 2 +- 4 files changed, 10 insertions(+), 6 deletions(-) commit b9294f8b7c4bfdad35f4eb8330974892aedd1aaf Author: Israel Rukshin Date: Tue Jun 11 18:52:48 2019 +0300 IB/iser: Unwind WR union at iser_tx_desc After decreasing WRs array size from 7 to 3 it is more readable to give each WR a descriptive name. Signed-off-by: Israel Rukshin Reviewed-by: Max Gurtovoy Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Jason Gunthorpe drivers/infiniband/ulp/iser/iscsi_iser.c | 3 ++- drivers/infiniband/ulp/iser/iscsi_iser.h | 34 ++++++------------------------- drivers/infiniband/ulp/iser/iser_memory.c | 16 ++++++++------- drivers/infiniband/ulp/iser/iser_verbs.c | 12 +++++++++-- 4 files changed, 27 insertions(+), 38 deletions(-) commit b76a439982f8483beb2ffcfe93be50026940030a Author: Israel Rukshin Date: Tue Jun 11 18:52:47 2019 +0300 IB/iser: Use IB_WR_REG_MR_INTEGRITY for PI handover Using this new API reduces iSER code complexity. It also reduces the maximum number of work requests per task and the need of dealing with multiple MRs (and their registrations and invalidations) per task. It is done by using a single WR and a special MR type (IB_MR_TYPE_INTEGRITY) for PI operation. The setup of the tested benchmark: - 2 servers with 24 cores (1 initiator and 1 target) - 24 target sessions with 1 LUN each - ramdisk backstore - PI active Performance results running fio (24 jobs, 128 iodepth) using write_generate=0 and read_verify=0 (w/w.o patch): bs IOPS(read) IOPS(write) ---- ---------- ---------- 512 1236.6K/1164.3K 1357.2K/1332.8K 1k 1196.5K/1163.8K 1348.4K/1262.7K 2k 1016.7K/921950 1003.7K/931230 4k 662728/600545 595423/501513 8k 385954/384345 333775/277090 16k 222864/222820 170317/170671 32k 116869/114896 82331/82244 64k 55205/54931 40264/40021 Using write_generate=1 and read_verify=1 (w/w.o patch): bs IOPS(read) IOPS(write) ---- ---------- ---------- 512 1090.1K/1030.9K 1303.9K/1101.4K 1k 1057.7K/904583 1318.4K/988085 2k 965226/638799 1008.6K/692514 4k 555479/410151 542414/414517 8k 298675/224964 264729/237508 16k 133485/122481 164625/138647 32k 74329/67615 80143/78743 64k 35716/35519 39294/37334 We get performance improvement at all block sizes. The most significant improvement is when writing 4k bs (almost 30% more iops). Signed-off-by: Israel Rukshin Reviewed-by: Max Gurtovoy Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Jason Gunthorpe drivers/infiniband/ulp/iser/iscsi_iser.h | 38 ++------ drivers/infiniband/ulp/iser/iser_initiator.c | 12 ++- drivers/infiniband/ulp/iser/iser_memory.c | 98 +++++++------------ drivers/infiniband/ulp/iser/iser_verbs.c | 140 +++++++++------------------ 4 files changed, 95 insertions(+), 193 deletions(-) commit 38ca87c6f1e514686d4a385246d1afe1e1f2e482 Author: Max Gurtovoy Date: Tue Jun 11 18:52:46 2019 +0300 RDMA/mlx5: Introduce and implement new IB_WR_REG_MR_INTEGRITY work request This new WR will be used to perform PI (protection information) handover using the new API. Using the new API, the user will post a single WR that will internally perform all the needed actions to complete PI operation. This new WR will use a memory region that was allocated as IB_MR_TYPE_INTEGRITY and was mapped using ib_map_mr_sg_pi to perform the registration. In the old API, in order to perform a signature handover operation, each ULP should perform the following: 1. Map and register the data buffers. 2. Map and register the protection buffers. 3. Post a special reg WR to configure the signature handover operation layout. 4. Invalidate the signature memory key. 5. Invalidate protection buffers memory key. 6. Invalidate data buffers memory key. In the new API, the mapping of both data and protection buffers is performed using a single call to ib_map_mr_sg_pi function. Also the registration of the buffers and the configuration of the signature operation layout is done by a single new work request called IB_WR_REG_MR_INTEGRITY. This patch implements this operation for mlx5 devices that are capable to offload data integrity generation/validation while performing the actual buffer transfer. This patch will not remove the old signature API that is used by the iSER initiator and target drivers. This will be done in the future. In the internal implementation, for each IB_WR_REG_MR_INTEGRITY work request, we are using a single UMR operation to register both data and protection buffers using KLM's. Afterwards, another UMR operation will describe the strided block format. These will be followed by 2 SET_PSV operations to set the memory/wire domains initial signature parameters passed by the user. In the end of the whole transaction, only the signature memory key (the one that exposed for the RDMA operation) will be invalidated. Signed-off-by: Max Gurtovoy Signed-off-by: Israel Rukshin Reviewed-by: Sagi Grimberg Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/qp.c | 218 ++++++++++++++++++++++++++++++++++++---- include/linux/mlx5/qp.h | 3 +- include/rdma/ib_verbs.h | 1 + 3 files changed, 201 insertions(+), 21 deletions(-) commit 22465bba39c001ddac735531074d3d4d926d9088 Author: Max Gurtovoy Date: Tue Jun 11 18:52:45 2019 +0300 RDMA/mlx5: Update set_sig_data_segment attribute for new signature API Explicitly pass the sig_mr and the access flags for the mkey segment configuration. This function will be used also in the new signature API, so modify it in order to use it in both APIs. This is a preparation commit before adding new signature API. Signed-off-by: Max Gurtovoy Reviewed-by: Sagi Grimberg Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/qp.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 9ac7c4bcd383adbac9ad02ec033cce9a3a261d28 Author: Max Gurtovoy Date: Tue Jun 11 18:52:44 2019 +0300 RDMA/mlx5: Pass UMR segment flags instead of boolean UMR ctrl segment flags can vary between UMR operations. for example, using inline UMR or adding free/not-free checks for a memory key. This is a preparation commit before adding new signature API that will not need not-free checks for the internal memory key during the UMR operation. Signed-off-by: Max Gurtovoy Reviewed-by: Leon Romanovsky Reviewed-by: Sagi Grimberg Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/qp.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit 62e3c379d4d713dbcb70adc7c65443fd8722b33f Author: Max Gurtovoy Date: Tue Jun 11 18:52:43 2019 +0300 RDMA/mlx5: Add attr for max number page list length for PI operation PI offload (protection information) is a feature that each RDMA provider can implement differently. Thus, introduce new device attribute to define the maximal length of the page list for PI fast registration operation. For example, mlx5 driver uses a single internal MR to map both data and protection SGL's, so it's equal to max_fast_reg_page_list_len / 2. Signed-off-by: Max Gurtovoy Reviewed-by: Leon Romanovsky Reviewed-by: Christoph Hellwig Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/main.c | 2 ++ include/rdma/ib_verbs.h | 1 + 2 files changed, 3 insertions(+) commit 6c984472bad12da18b88e9f4345f4970bbec0b3e Author: Max Gurtovoy Date: Tue Jun 11 18:52:42 2019 +0300 RDMA/mlx5: Implement mlx5_ib_map_mr_sg_pi and mlx5_ib_alloc_mr_integrity mlx5_ib_map_mr_sg_pi() will map the PI and data dma mapped SG lists to the mlx5 memory region prior to the registration operation. In the new API, the mlx5 driver will allocate an internal memory region for the UMR operation to register both PI and data SG lists. The internal MR will use KLM mode in order to map 2 (possibly non-contiguous/non-align) SG lists using 1 memory key. In the new API, each ULP will use 1 memory region for the signature operation (instead of 3 in the old API). This memory region will have a key that will be exposed to remote server to perform RDMA operation. The internal memory key that will map the SG lists will stay private. Signed-off-by: Max Gurtovoy Signed-off-by: Israel Rukshin Reviewed-by: Sagi Grimberg Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/main.c | 2 + drivers/infiniband/hw/mlx5/mlx5_ib.h | 11 +++ drivers/infiniband/hw/mlx5/mr.c | 187 ++++++++++++++++++++++++++++++++--- 3 files changed, 189 insertions(+), 11 deletions(-) commit 7c717d3aeeaabbfddd0fe949b501595a2e3469e4 Author: Max Gurtovoy Date: Tue Jun 11 18:52:41 2019 +0300 RDMA/core: Add signature attrs element for ib_mr structure This element will describe the needed characteristics for the signature operation per signature enabled memory region (type IB_MR_TYPE_INTEGRITY). Also add meta_length attribute to ib_sig_attrs structure for saving the mapped metadata length (needed for the new API implementation). Signed-off-by: Max Gurtovoy Signed-off-by: Israel Rukshin Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Jason Gunthorpe drivers/infiniband/core/uverbs_cmd.c | 1 + drivers/infiniband/core/verbs.c | 13 ++++++++++++- include/rdma/ib_verbs.h | 2 +- include/rdma/signature.h | 2 ++ 4 files changed, 16 insertions(+), 2 deletions(-) commit 2cdfcdd8677b277b32d32ef8976802dc5d5f883f Author: Max Gurtovoy Date: Tue Jun 11 18:52:40 2019 +0300 RDMA/core: Introduce ib_map_mr_sg_pi to map data/protection sgl's This function will map the previously dma mapped SG lists for PI (protection information) and data to an appropriate memory region for future registration. The given MR must be allocated as IB_MR_TYPE_INTEGRITY. Signed-off-by: Max Gurtovoy Signed-off-by: Israel Rukshin Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Jason Gunthorpe drivers/infiniband/core/device.c | 1 + drivers/infiniband/core/verbs.c | 40 +++++++++++++++++++++++++++++++++++++++- include/rdma/ib_verbs.h | 9 +++++++++ 3 files changed, 49 insertions(+), 1 deletion(-) commit 26bc7eaee94fd904d1817fee4d864f8526807465 Author: Israel Rukshin Date: Tue Jun 11 18:52:39 2019 +0300 RDMA/core: Introduce IB_MR_TYPE_INTEGRITY and ib_alloc_mr_integrity API This is a preparation for signature verbs API re-design. In the new design a single MR with IB_MR_TYPE_INTEGRITY type will be used to perform the needed mapping for data integrity operations. Signed-off-by: Israel Rukshin Signed-off-by: Max Gurtovoy Reviewed-by: Sagi Grimberg Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Jason Gunthorpe drivers/infiniband/core/device.c | 1 + drivers/infiniband/core/verbs.c | 46 ++++++++++++++++++++++++++++++++++++++++ include/rdma/ib_verbs.h | 10 +++++++++ 3 files changed, 57 insertions(+) commit a0bc099abf7b45b16cb18459f3516af8c2fea781 Author: Max Gurtovoy Date: Tue Jun 11 18:52:38 2019 +0300 RDMA/core: Save the MR type in the ib_mr structure This is a preparation for the signature verbs API change. This change is needed since the MR type will define, in the upcoming patches, the need for allocating internal resources in LLD for signature handover related operations. It will also help to make sure that signature related functions are called with an appropriate MR type and fail otherwise. Also introduce new mr types IB_MR_TYPE_USER, IB_MR_TYPE_DMA and IB_MR_TYPE_DM for correctness. Signed-off-by: Max Gurtovoy Signed-off-by: Israel Rukshin Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Jason Gunthorpe drivers/infiniband/core/uverbs_cmd.c | 1 + drivers/infiniband/core/uverbs_std_types_mr.c | 1 + drivers/infiniband/core/verbs.c | 2 ++ include/rdma/ib_verbs.h | 10 ++++++++++ 4 files changed, 14 insertions(+) commit 36b1e47ff0c196a95d5e55a05b3f988f827cce7e Author: Max Gurtovoy Date: Tue Jun 11 18:52:37 2019 +0300 RDMA/core: Introduce new header file for signature operations Ease the exhausted ib_verbs.h file and make the code more readable. Signed-off-by: Max Gurtovoy Signed-off-by: Israel Rukshin Reviewed-by: Leon Romanovsky Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Signed-off-by: Jason Gunthorpe include/rdma/ib_verbs.h | 112 +------------------------------------------ include/rdma/signature.h | 120 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 121 insertions(+), 111 deletions(-) commit 8ac875db0fdc1cfa55c424b38a81cf5282f3df0b Author: tiancyin Date: Thu Jun 20 14:56:17 2019 +0800 drm/amdgpu: disable gfxoff on navi10 The gfxoff brings unstability, disable it by default Reviewed-by: Hawking Zhang Signed-off-by: tiancyin Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 73c86d628d6aa3d7162094ef1f0503bda17b506e Author: Hawking Zhang Date: Mon Jun 24 19:26:00 2019 +0800 drm/amdgpu: fix modprobe failure for uvd_4/5/6 For uvd_4/5/6, amdgpu driver will only power on them when there are jobs assigned to decode/enc rings.uvd_4/5/6 dpm was broken since amdgpu_dpm_set_powergating_by_smu only covers gfx block. The change would add more IP block support in amdgpu_dpm_set_powergating_by_smu For GFX/UVD/VCN/VCE, if the new SMU driver is supported, invoke new power gate helper function smu_dpm_set_power_gate, otherwise, fallback to legacy powerplay helper function pp_set_powergating_by_smu. For other IP blocks always invoke legacy powerplay helper function. Signed-off-by: Hawking Zhang Reviewed-by: Tianci Yin Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c | 11 ++++++++++- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 3 +++ 2 files changed, 13 insertions(+), 1 deletion(-) commit c04b6ea4e6097dbe35f50d4302bbcbab5310df31 Author: john.rutherford@dektech.com.au Date: Mon Jun 24 16:45:16 2019 +1000 tipc: fix missing indentation in source code Fix misalignment of policy statement in netlink.c due to automatic spatch code transformation. Fixes: 3b0f31f2b8c9 ("genetlink: make policy common to family") Acked-by: Jon Maloy Signed-off-by: John Rutherford Signed-off-by: David S. Miller net/tipc/netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2f9b0d93a9d3ec64558537ab5d7cff820886afa4 Author: Keerthy Date: Mon Jun 24 10:46:19 2019 +0530 net: ethernet: ti: cpsw: Fix suspend/resume break Commit bfe59032bd6127ee190edb30be9381a01765b958 ("net: ethernet: ti: cpsw: use cpsw as drv data")changes the driver data to struct cpsw_common *cpsw. This is done only in probe/remove but the suspend/resume functions are still left with struct net_device *ndev. Hence fix both suspend & resume also to fetch the updated driver data. Fixes: bfe59032bd6127ee1 ("net: ethernet: ti: cpsw: use cpsw as drv data") Signed-off-by: Keerthy Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 30 +++++++++--------------------- 1 file changed, 9 insertions(+), 21 deletions(-) commit e54fbbdf5a2944f084b170cd2b7ffdfa00bf3990 Author: Xue Chaojing Date: Mon Jun 24 03:50:12 2019 +0000 hinic: implement the statistical interface of ethtool This patch implement the statistical interface of ethtool, user can use ethtool -S to show hinic statistics. Signed-off-by: Xue Chaojing Signed-off-by: David S. Miller drivers/net/ethernet/huawei/hinic/hinic_ethtool.c | 341 ++++++++++++++++++++++ drivers/net/ethernet/huawei/hinic/hinic_hw_dev.h | 8 + drivers/net/ethernet/huawei/hinic/hinic_main.c | 5 + drivers/net/ethernet/huawei/hinic/hinic_port.c | 66 +++++ drivers/net/ethernet/huawei/hinic/hinic_port.h | 174 +++++++++++ drivers/net/ethernet/huawei/hinic/hinic_rx.c | 15 +- drivers/net/ethernet/huawei/hinic/hinic_rx.h | 5 +- drivers/net/ethernet/huawei/hinic/hinic_tx.c | 8 + drivers/net/ethernet/huawei/hinic/hinic_tx.h | 1 + 9 files changed, 620 insertions(+), 3 deletions(-) commit 9e645e1105ca60fbbc6bddf2fd5ef7e57ed3dca8 Author: Jens Axboe Date: Fri May 10 16:07:28 2019 -0600 io_uring: add support for sqe links With SQE links, we can create chains of dependent SQEs. One example would be queueing an SQE that's a read from one file descriptor, with the linked SQE being a write to another with the same set of buffers. An SQE link will not stall the pipeline, it'll just ensure that dependent SQEs aren't issued before the previous link has completed. Any error at submission or completion time will break the chain of SQEs. For completions, this also includes short reads or writes, as the next SQE could depend on the previous one being fully completed. Any SQE in a chain that gets canceled due to any of the above errors, will get an CQE fill with -ECANCELED as the error value. Signed-off-by: Jens Axboe fs/io_uring.c | 241 +++++++++++++++++++++++++++++++++--------- include/uapi/linux/io_uring.h | 1 + 2 files changed, 194 insertions(+), 48 deletions(-) commit 20f6239d494b2ec7fcc9930eaab3e736a6a9419e Author: Prashant Bhole Date: Thu Jun 20 15:58:15 2019 +0900 samples/bpf: xdp_redirect, correctly get dummy program id When we terminate xdp_redirect, it ends up with following message: "Program on iface OUT changed, not removing" This results in dummy prog still attached to OUT interface. It is because signal handler checks if the programs are the same that we had attached. But while fetching dummy_prog_id, current code uses prog_fd instead of dummy_prog_fd. This patch passes the correct fd. Fixes: 3b7a8ec2dec3 ("samples/bpf: Check the prog id before exiting") Signed-off-by: Prashant Bhole Acked-by: Toke Høiland-Jørgensen Signed-off-by: Daniel Borkmann samples/bpf/xdp_redirect_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e4f07120210a1794c1f1ae64d209a2fbc7bd2682 Author: Stanislav Fomichev Date: Wed Jun 19 12:01:05 2019 -0700 bpf: fix NULL deref in btf_type_is_resolve_source_only Commit 1dc92851849c ("bpf: kernel side support for BTF Var and DataSec") added invocations of btf_type_is_resolve_source_only before btf_type_nosize_or_null which checks for the NULL pointer. Swap the order of btf_type_nosize_or_null and btf_type_is_resolve_source_only to make sure the do the NULL pointer check first. Fixes: 1dc92851849c ("bpf: kernel side support for BTF Var and DataSec") Reported-by: syzbot Signed-off-by: Stanislav Fomichev Acked-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann kernel/bpf/btf.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 498d3eb5bfbb2e05e40005152976a7b9eadfb59c Author: Oren Givon Date: Thu Jun 20 11:46:23 2019 +0300 iwlwifi: add support for hr1 RF ID The 22000 series FW that was meant to be used with hr is also the FW that is used for hr1 and has a different RF ID. Add support to load the hr FW when hr1 RF ID is detected. Cc: stable@vger.kernel.org # 5.1+ Signed-off-by: Oren Givon Signed-off-by: Luciano Coelho Signed-off-by: Kalle Valo drivers/net/wireless/intel/iwlwifi/iwl-csr.h | 1 + drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) commit 63d7ef36103d26f20325a921ecc96a3288560146 Author: Brian Norris Date: Fri Jun 14 17:13:20 2019 -0700 mwifiex: Don't abort on small, spec-compliant vendor IEs Per the 802.11 specification, vendor IEs are (at minimum) only required to contain an OUI. A type field is also included in ieee80211.h (struct ieee80211_vendor_ie) but doesn't appear in the specification. The remaining fields (subtype, version) are a convention used in WMM headers. Thus, we should not reject vendor-specific IEs that have only the minimum length (3 bytes) -- we should skip over them (since we only want to match longer IEs, that match either WMM or WPA formats). We can reject elements that don't have the minimum-required 3 byte OUI. While we're at it, move the non-standard subtype and version fields into the WMM structs, to avoid this confusion in the future about generic "vendor header" attributes. Fixes: 685c9b7750bf ("mwifiex: Abort at too short BSS descriptor element") Cc: Takashi Iwai Signed-off-by: Brian Norris Reviewed-by: Takashi Iwai Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/fw.h | 12 +++++++++--- drivers/net/wireless/marvell/mwifiex/scan.c | 18 +++++++++++------- drivers/net/wireless/marvell/mwifiex/sta_ioctl.c | 4 ++-- drivers/net/wireless/marvell/mwifiex/wmm.c | 2 +- 4 files changed, 23 insertions(+), 13 deletions(-) commit 608fd7214323bd3bb2c288f68253e5bb634d4f49 Author: Nathan Huckleberry Date: Fri Jun 14 10:17:13 2019 -0700 wl18xx: Fix Wunused-const-variable Clang produces the following warning drivers/net/wireless/ti/wl18xx/main.c:1850:43: warning: unused variable 'wl18xx_iface_ap_cl_limits' [-Wunused-const-variable] static const struct ieee80211_iface_limit wl18xx_iface_ap_cl_limits[] = { ^ drivers/net/wireless/ti/wl18xx/main.c:1869:43: warning: unused variable 'wl18xx_iface_ap_go_limits' [-Wunused-const-variable] static const struct ieee80211_iface_limit wl18xx_iface_ap_go_limits[] = { ^ The commit that added these variables never used them. Removing them. Cc: clang-built-linux@googlegroups.com Link: https://github.com/ClangBuiltLinux/linux/issues/530 Signed-off-by: Nathan Huckleberry Reviewed-by: Nick Desaulniers Signed-off-by: Kalle Valo drivers/net/wireless/ti/wl18xx/main.c | 38 ----------------------------------- 1 file changed, 38 deletions(-) commit 658521fc1bf1457a944d8408b8a792b31ed9cc20 Author: Ihab Zhaika Date: Fri Jun 14 11:48:51 2019 +0300 iwlwifi: change 0x02F0 fw from qu to quz change the fw of 0x02F0 platform from qu to quz Signed-off-by: Ihab Zhaika Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo drivers/net/wireless/intel/iwlwifi/cfg/22000.c | 88 +++++++++++++++++++++ drivers/net/wireless/intel/iwlwifi/iwl-config.h | 6 ++ drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 100 ++++++++++++------------ 3 files changed, 144 insertions(+), 50 deletions(-) commit a976bfb44bdbc1b69365dc31f7c1339fff436c95 Author: Ihab Zhaika Date: Wed Jun 19 20:59:02 2019 +0300 iwlwifi: add new cards for 22000 and change wrong structs add few PCI ID'S for 22000 and chainge few cards structs names Signed-off-by: Ihab Zhaika Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo drivers/net/wireless/intel/iwlwifi/cfg/22000.c | 36 +++++++ drivers/net/wireless/intel/iwlwifi/iwl-config.h | 3 + drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 122 ++++++++++++------------ drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 5 +- 4 files changed, 103 insertions(+), 63 deletions(-) commit d151b0a2efa128cb4f643b11baf54b1e4de2c528 Author: Ihab Zhaika Date: Fri Jun 14 11:48:49 2019 +0300 iwlwifi: add new cards for 22000 and fix struct name add few PCI ID'S for 22000 and fix the wrong name for one of the structs Signed-off-by: Ihab Zhaika Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo drivers/net/wireless/intel/iwlwifi/cfg/22000.c | 20 ++++++++++++++++---- drivers/net/wireless/intel/iwlwifi/iwl-config.h | 5 +++-- drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 23 ++++++++++++++++------- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 4 ++-- 4 files changed, 37 insertions(+), 15 deletions(-) commit 801ebf1043ae7b182588554cc9b9ad3c14bc2ab5 Author: Takashi Iwai Date: Mon Jun 24 15:08:28 2019 +0200 ALSA: usb-audio: Sanity checks for each pipe and EP types The recent USB core code performs sanity checks for the given pipe and EP types, and it can be hit by manipulated USB descriptors by syzbot. For making syzbot happier, this patch introduces a local helper for a sanity check in the driver side and calls it at each place before the message handling, so that we can avoid the WARNING splats. Reported-by: syzbot+d952e5e28f5fb7718d23@syzkaller.appspotmail.com Signed-off-by: Takashi Iwai sound/usb/helper.c | 17 +++++++++++++++++ sound/usb/helper.h | 1 + sound/usb/quirks.c | 18 +++++++++++++++--- 3 files changed, 33 insertions(+), 3 deletions(-) commit b0935123a18360d19f1dcc779ea33841cdc304cc Author: Prakhar Srivastava Date: Sun Jun 23 23:23:29 2019 -0700 IMA: Define a new hook to measure the kexec boot command line arguments Currently during soft reboot(kexec_file_load) boot command line arguments are not measured. Define hooks needed to measure kexec command line arguments during soft reboot(kexec_file_load). - A new ima hook ima_kexec_cmdline is defined to be called by the kexec code. - A new function process_buffer_measurement is defined to measure the buffer hash into the IMA measurement list. - A new func policy KEXEC_CMDLINE is defined to control the measurement. Signed-off-by: Prakhar Srivastava Signed-off-by: Mimi Zohar Documentation/ABI/testing/ima_policy | 1 + include/linux/ima.h | 2 + security/integrity/ima/ima.h | 1 + security/integrity/ima/ima_api.c | 1 + security/integrity/ima/ima_main.c | 72 ++++++++++++++++++++++++++++++++++++ security/integrity/ima/ima_policy.c | 7 ++++ 6 files changed, 84 insertions(+) commit 70bac08d4157fda334fe21ee38a2e93bc434bac4 Author: Matthias Schiffer Date: Fri Jun 7 12:49:12 2019 +0200 ARM: module: recognize unwind exit sections In addition to the prefix ".exit", ".ARM.extab.exit" and ".ARM.exidx.exit" must be recognized as exit sections as well. Otherwise, loading modules can fail without CONFIG_MODULE_UNLOAD depending on the memory layout, when relocations for the unwind sections refer to the .exit.text section: imx_sdma: section 16 reloc 0 sym '': relocation 42 out of range (0x7f015260 -> 0xc0f5a5e8) where 0x7F000000 is the module load area and 0xC0000000 is the vmalloc area. Relocation 42 refers to R_ARM_PREL31, which is limited to signed 31bit offsets. Signed-off-by: Matthias Schiffer Signed-off-by: Jessica Yu arch/arm/kernel/module.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 38b37d631aec80da0c65ac03a7ef680b468c7857 Author: Matthias Schiffer Date: Fri Jun 7 12:49:11 2019 +0200 module: allow arch overrides for .exit section names Some archs like ARM store unwind information for .exit.text in sections with unusual names. As this unwind information refers to .exit.text, it must not be loaded when .exit.text is not loaded (when CONFIG_MODULE_UNLOAD is unset); otherwise, loading a module can fail due to relocation failures. Signed-off-by: Matthias Schiffer Signed-off-by: Jessica Yu include/linux/moduleloader.h | 5 +++++ kernel/module.c | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) commit 2eef1399a866c57687962e15142b141a4f8e7862 Author: Yang Yingliang Date: Thu Jun 20 10:18:14 2019 +0800 modules: fix BUG when load module with rodata=n When loading a module with rodata=n, it causes an executing NX-protected page BUG. [ 32.379191] kernel tried to execute NX-protected page - exploit attempt? (uid: 0) [ 32.382917] BUG: unable to handle page fault for address: ffffffffc0005000 [ 32.385947] #PF: supervisor instruction fetch in kernel mode [ 32.387662] #PF: error_code(0x0011) - permissions violation [ 32.389352] PGD 240c067 P4D 240c067 PUD 240e067 PMD 421a52067 PTE 8000000421a53063 [ 32.391396] Oops: 0011 [#1] SMP PTI [ 32.392478] CPU: 7 PID: 2697 Comm: insmod Tainted: G O 5.2.0-rc5+ #202 [ 32.394588] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.1-0-ga5cab58e9a3f-prebuilt.qemu.org 04/01/2014 [ 32.398157] RIP: 0010:ko_test_init+0x0/0x1000 [ko_test] [ 32.399662] Code: Bad RIP value. [ 32.400621] RSP: 0018:ffffc900029f3ca8 EFLAGS: 00010246 [ 32.402171] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 32.404332] RDX: 00000000000004c7 RSI: 0000000000000cc0 RDI: ffffffffc0005000 [ 32.406347] RBP: ffffffffc0005000 R08: ffff88842fbebc40 R09: ffffffff810ede4a [ 32.408392] R10: ffffea00108e3480 R11: 0000000000000000 R12: ffff88842bee21a0 [ 32.410472] R13: 0000000000000001 R14: 0000000000000001 R15: ffffc900029f3e78 [ 32.412609] FS: 00007fb4f0c0a700(0000) GS:ffff88842fbc0000(0000) knlGS:0000000000000000 [ 32.414722] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 32.416290] CR2: ffffffffc0004fd6 CR3: 0000000421a90004 CR4: 0000000000020ee0 [ 32.418471] Call Trace: [ 32.419136] do_one_initcall+0x41/0x1df [ 32.420199] ? _cond_resched+0x10/0x40 [ 32.421433] ? kmem_cache_alloc_trace+0x36/0x160 [ 32.422827] do_init_module+0x56/0x1f7 [ 32.423946] load_module+0x1e67/0x2580 [ 32.424947] ? __alloc_pages_nodemask+0x150/0x2c0 [ 32.426413] ? map_vm_area+0x2d/0x40 [ 32.427530] ? __vmalloc_node_range+0x1ef/0x260 [ 32.428850] ? __do_sys_init_module+0x135/0x170 [ 32.430060] ? _cond_resched+0x10/0x40 [ 32.431249] __do_sys_init_module+0x135/0x170 [ 32.432547] do_syscall_64+0x43/0x120 [ 32.433853] entry_SYSCALL_64_after_hwframe+0x44/0xa9 Because if rodata=n, set_memory_x() can't be called, fix this by calling set_memory_x in complete_formation(); Fixes: f2c65fb3221a ("x86/modules: Avoid breaking W^X while loading modules") Suggested-by: Jian Cheng Reviewed-by: Nadav Amit Signed-off-by: Yang Yingliang Signed-off-by: Jessica Yu kernel/module.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit c5dfd4b885284e4eaaf66172b918894fdde7eb06 Author: Takashi Sakamoto Date: Mon Jun 24 18:16:46 2019 +0900 ALSA: firewire-motu: unify common tracepoints for both direction In ALSA firewire-motu driver, some tracepoints are supported to probe vendor-specific data fields for SPH and status/control messages in payload of isochronous packet. At present, the events of tracepoints are unique each of direction, however the pair of events has the same structure and print format. It's possible to unify the pair. This commit unifies the pair. From userspace, direction is specified by filtering for src/dst fields in the structure. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/motu/amdtp-motu-trace.h | 70 ++++++++-------------------------- sound/firewire/motu/amdtp-motu.c | 8 ++-- 2 files changed, 20 insertions(+), 58 deletions(-) commit eee22af1eddedf2a140fcf6855564420abed818d Author: Takashi Sakamoto Date: Mon Jun 24 18:20:15 2019 +0900 Revert "ALSA: firewire-lib: fix inverted node IDs for amdtp_packet events" This reverts commit e703965a129cdd72ff74e248f8fbf0d617844527. When creating this patch, I compared the value of src field to the value of first byte of cip_header field (SID) in tracing event. But in this test I used a device which has a quirk to transfer isochronous packet with invalid SID. The original change is valid. Fixes: e703965a129c ("ALSA: firewire-lib: fix inverted node IDs for amdtp_packet events") Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/amdtp-stream-trace.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f5a38c8ecf523e3b14c3766acf0d3119d96e8438 Author: Russell King Date: Fri May 31 16:39:33 2019 +0100 ARM: pxa/lubbock: remove lubbock_set_misc_wr() from global view There are now no users of lubbock_set_misc_wr() outside lubbock.c, so make this function static. Signed-off-by: Russell King Signed-off-by: Robert Jarzmik arch/arm/mach-pxa/include/mach/lubbock.h | 4 ---- arch/arm/mach-pxa/lubbock.c | 3 +-- 2 files changed, 1 insertion(+), 6 deletions(-) commit bea8754e784ef894a7aaf1821a1e8b700cc70f32 Author: Daniel Mack Date: Thu May 9 18:04:39 2019 +0200 ARM: dts: pxa300-raumfeld-speaker-one: add channel output mapping for STA320 These settings are needed to make the hardware operable. Signed-off-by: Daniel Mack Signed-off-by: Robert Jarzmik arch/arm/boot/dts/pxa300-raumfeld-speaker-one.dts | 3 +++ 1 file changed, 3 insertions(+) commit 867a6b36a45a5056eb6775d54da91dfedb305212 Author: Daniel Mack Date: Wed Apr 24 20:58:58 2019 +0200 ARM: pxa: raumfeld-common: fix comments in gpio_keys pinctrl node Careless oversight. Signed-off-by: Daniel Mack Signed-off-by: Robert Jarzmik arch/arm/boot/dts/pxa300-raumfeld-common.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 79e60810503eb3dd1b3316e8757b3d177d78e48b Author: Daniel Mack Date: Wed Apr 24 20:58:57 2019 +0200 ARM: pxa: raumfeld-controller: add pinctrl for charger pins The PEN2 line needs to be pulled up for the charger to enter high-current mode. Do this with a static pull on the GPIO. Signed-off-by: Daniel Mack Signed-off-by: Robert Jarzmik arch/arm/boot/dts/pxa300-raumfeld-controller.dts | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 6205661df99d6537f7e7a0e0e57618f25e60db9c Author: Daniel Mack Date: Wed Apr 24 20:58:56 2019 +0200 ARM: pxa: raumfeld-controller: fix 'dock detect' GPIO key The dock detection input key is active low. Also add a pinmux for it. Signed-off-by: Daniel Mack Signed-off-by: Robert Jarzmik arch/arm/boot/dts/pxa300-raumfeld-controller.dts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 8ab7079676b5126ba36936903eb5295d1a5696c5 Author: Daniel Mack Date: Wed Apr 24 20:58:55 2019 +0200 ARM: pxa3xx: dts: Add defines for pinctrl-single,bias-pull{up,down} This allows users of the pinctrl driver to specify either pinctrl-single,bias-pullup = MPF_PULL_UP; or pinctrl-single,bias-pulldown = MPF_PULL_DOWN; To activate the pull bits in the MFP registers. Signed-off-by: Daniel Mack Signed-off-by: Robert Jarzmik arch/arm/boot/dts/pxa3xx.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit a4961427e74948ced9ddd40f3efb2a206b87e4c8 Author: Greg Kroah-Hartman Date: Mon Jun 24 16:45:34 2019 +0800 Revert "staging: ks7010: Fix build error" This reverts commit 3e5bc68fa596874500e8c718605aa44d5e42a34c as it causes build errors in linux-next. Reported-by: Stephen Rothwell Cc: YueHaibing Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/Kconfig | 1 - 1 file changed, 1 deletion(-) commit ceedd5f74d8cfe34db4e654a7808e3c5de40d6f5 Merge: 1b961423158c 4b972a01a7da Author: Joerg Roedel Date: Mon Jun 24 10:23:16 2019 +0200 Merge tag 'v5.2-rc6' into generic-dma-ops Linux 5.2-rc6 commit 25bc694a8a086bfee6e5b9dd9e53f4de721b0acf Merge: 3e26c5feed2a 000dd5316e1c Author: Rafael J. Wysocki Date: Mon Jun 24 10:11:27 2019 +0200 Merge back PCI power management material for v5.3. commit 0bb9d1876c0605815ea0452f68cb819a775a75f9 Author: Chen-Yu Tsai Date: Tue Jun 4 12:23:37 2019 +0800 arm64: dts: allwinner: h6: Pine H64: Add interrupt line for RTC The external PCF8563 RTC chip's interrupt line is connected to the NMI line on the SoC. Add the interrupt line to the device tree. Fixes: 17ebc33afc35 ("arm64: allwinner: h6: add PCF8563 RTC on Pine H64 board") Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts | 2 ++ 1 file changed, 2 insertions(+) commit 560d1bcad715c215e7ffe5d7cffe045974b623d0 Author: Dmitry Osipenko Date: Sun Jun 23 20:50:53 2019 +0300 opp: Don't use IS_ERR on invalid supplies _set_opp_custom() receives a set of OPP supplies as its arguments and the caller of it passes NULL when the supplies are not valid. But _set_opp_custom(), by mistake, checks for error by performing IS_ERR(old_supply) on it which will always evaluate to false. The problem was spotted during of testing of upcoming update for the NVIDIA Tegra CPUFreq driver. Cc: stable Fixes: 7e535993fa4f ("OPP: Separate out custom OPP handler specific code") Reported-by: Marc Dietrich Signed-off-by: Dmitry Osipenko [ Viresh: Massaged changelog ] Signed-off-by: Viresh Kumar drivers/opp/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f9020441dbc39133591ff72b420f21f51896afc5 Author: Paweł Chmiel Date: Fri Jun 21 12:10:43 2019 +0200 cpufreq: s5pv210: Don't flood kernel log after cpufreq change This commit replaces printk with pr_debug, so we don't flood kernel log. Signed-off-by: Paweł Chmiel Acked-by: Krzysztof Kozlowski Signed-off-by: Viresh Kumar drivers/cpufreq/s5pv210-cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 65b66682344a15ba2069d4dd8d0cc39cc3aed7e9 Author: Suzuki K Poulose Date: Fri Jun 14 18:54:01 2019 +0100 drivers: Add generic helper to match by of_node Add a helper to match device by the of_node. This will be later used to provide wrappers to the device iterators for {bus/class/driver}_find_device(). Convert other users to reuse this new helper. Cc: Alan Tull Cc: Andrew Lunn Cc: Daniel Vetter Cc: David Airlie Cc: "David S. Miller" Cc: devicetree@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: Florian Fainelli Cc: Frank Rowand Cc: Greg Kroah-Hartman Cc: Heiner Kallweit Cc: Jiri Slaby Cc: Jonathan Hunter Cc: Lee Jones Cc: Liam Girdwood Cc: linux-fpga@vger.kernel.org Cc: linux-i2c@vger.kernel.org Cc: linux-spi@vger.kernel.org Cc: Maarten Lankhorst Cc: Mark Brown Cc: Mathieu Poirier Cc: Maxime Ripard Cc: Moritz Fischer Cc: Peter Rosin Cc: Rob Herring Cc: Srinivas Kandagatla Cc: Thierry Reding Cc: Thor Thayer Cc: Wolfram Sang Cc: "Rafael J. Wysocki" Cc: Greg Kroah-Hartman Cc: Ulf Hansson Cc: Joe Perches Signed-off-by: Suzuki K Poulose Signed-off-by: Greg Kroah-Hartman drivers/base/core.c | 6 ++++++ drivers/fpga/of-fpga-region.c | 7 +------ include/linux/device.h | 2 ++ 3 files changed, 9 insertions(+), 6 deletions(-) commit 92ce7e83b4e5c86687d748ba53cb755acdce1256 Author: Suzuki K Poulose Date: Fri Jun 14 18:54:00 2019 +0100 driver_find_device: Unify the match function with class_find_device() The driver_find_device() accepts a match function pointer to filter the devices for lookup, similar to bus/class_find_device(). However, there is a minor difference in the prototype for the match parameter for driver_find_device() with the now unified version accepted by {bus/class}_find_device(), where it doesn't accept a "const" qualifier for the data argument. This prevents us from reusing the generic match functions for driver_find_device(). For this reason, change the prototype of the driver_find_device() to make the "match" parameter in line with {bus/class}_find_device() and adjust its callers to use the const qualifier. Also, we could now promote the "data" parameter to const as we pass it down as a const parameter to the match functions. Cc: Corey Minyard Cc: Russell King Cc: Thierry Reding Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Cc: Will Deacon Cc: Joerg Roedel Cc: Peter Oberparleiter Cc: Sebastian Ott Cc: David Airlie Cc: Daniel Vetter Cc: Nehal Shah Cc: Shyam Sundar S K Cc: Lee Jones Cc: Christian Borntraeger Signed-off-by: Suzuki K Poulose Signed-off-by: Greg Kroah-Hartman drivers/amba/tegra-ahb.c | 4 ++-- drivers/base/driver.c | 4 ++-- drivers/char/ipmi/ipmi_msghandler.c | 8 ++++---- drivers/gpu/drm/tegra/dc.c | 4 ++-- drivers/i2c/busses/i2c-amd-mp2-pci.c | 2 +- drivers/iommu/arm-smmu-v3.c | 2 +- drivers/iommu/arm-smmu.c | 2 +- drivers/mfd/altera-sysmgr.c | 4 ++-- drivers/s390/cio/ccwgroup.c | 4 ++-- drivers/s390/cio/chsc_sch.c | 2 +- drivers/s390/cio/device.c | 2 +- include/linux/device.h | 4 ++-- 12 files changed, 21 insertions(+), 21 deletions(-) commit 418e3ea157efb0eb2c6dd412a8d5f052477c7f5a Author: Suzuki K Poulose Date: Fri Jun 14 18:53:59 2019 +0100 bus_find_device: Unify the match callback with class_find_device There is an arbitrary difference between the prototypes of bus_find_device() and class_find_device() preventing their callers from passing the same pair of data and match() arguments to both of them, which is the const qualifier used in the prototype of class_find_device(). If that qualifier is also used in the bus_find_device() prototype, it will be possible to pass the same match() callback function to both bus_find_device() and class_find_device(), which will allow some optimizations to be made in order to avoid code duplication going forward. Also with that, constify the "data" parameter as it is passed as a const to the match function. For this reason, change the prototype of bus_find_device() to match the prototype of class_find_device() and adjust its callers to use the const qualifier in accordance with the new prototype of it. Cc: Alexander Shishkin Cc: Andrew Lunn Cc: Andreas Noever Cc: Arnd Bergmann Cc: Bjorn Helgaas Cc: Corey Minyard Cc: Christian Borntraeger Cc: David Kershner Cc: "David S. Miller" Cc: David Airlie Cc: Felipe Balbi Cc: Frank Rowand Cc: Grygorii Strashko Cc: Harald Freudenberger Cc: Hartmut Knaack Cc: Heiko Stuebner Cc: Jason Gunthorpe Cc: Jonathan Cameron Cc: "James E.J. Bottomley" Cc: Len Brown Cc: Mark Brown Cc: Michael Ellerman Cc: Michael Jamet Cc: "Martin K. Petersen" Cc: Peter Oberparleiter Cc: Sebastian Ott Cc: Srinivas Kandagatla Cc: Yehezkel Bernat Cc: rafael@kernel.org Acked-by: Corey Minyard Acked-by: David Kershner Acked-by: Mark Brown Acked-by: Rafael J. Wysocki Acked-by: Srinivas Kandagatla Acked-by: Wolfram Sang # for the I2C parts Acked-by: Rob Herring Signed-off-by: Suzuki K Poulose Signed-off-by: Greg Kroah-Hartman arch/powerpc/platforms/pseries/ibmebus.c | 4 ++-- drivers/acpi/acpi_lpss.c | 4 ++-- drivers/acpi/sleep.c | 2 +- drivers/acpi/utils.c | 4 ++-- drivers/base/bus.c | 6 +++--- drivers/base/devcon.c | 2 +- drivers/char/ipmi/ipmi_si_platform.c | 2 +- drivers/firmware/efi/dev-path-parser.c | 4 ++-- drivers/gpu/drm/drm_mipi_dsi.c | 2 +- drivers/hwtracing/coresight/coresight.c | 6 +++--- drivers/hwtracing/coresight/of_coresight.c | 2 +- drivers/hwtracing/intel_th/core.c | 5 ++--- drivers/i2c/i2c-core-acpi.c | 4 ++-- drivers/i2c/i2c-core-of.c | 4 ++-- drivers/iio/inkern.c | 2 +- drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 2 +- drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c | 2 +- drivers/net/ethernet/ti/cpsw-phy-sel.c | 4 ++-- drivers/net/ethernet/ti/davinci_emac.c | 2 +- drivers/net/ethernet/toshiba/tc35815.c | 4 ++-- drivers/nvmem/core.c | 2 +- drivers/of/of_mdio.c | 2 +- drivers/of/platform.c | 2 +- drivers/pci/probe.c | 2 +- drivers/pci/search.c | 4 ++-- drivers/s390/cio/css.c | 4 ++-- drivers/s390/cio/device.c | 4 ++-- drivers/s390/cio/scm.c | 4 ++-- drivers/s390/crypto/ap_bus.c | 8 ++++---- drivers/scsi/scsi_proc.c | 2 +- drivers/spi/spi.c | 4 ++-- drivers/thunderbolt/switch.c | 4 ++-- drivers/usb/core/devio.c | 4 ++-- drivers/usb/core/usb.c | 4 ++-- drivers/usb/phy/phy-am335x-control.c | 4 ++-- drivers/usb/phy/phy-isp1301.c | 4 ++-- drivers/visorbus/visorbus_main.c | 4 ++-- include/linux/device.h | 4 ++-- sound/soc/rockchip/rk3399_gru_sound.c | 2 +- 39 files changed, 67 insertions(+), 68 deletions(-) commit e6374f6b2e9c9f9a7cf5418157ad7f30f3abd70e Author: Suzuki K Poulose Date: Fri Jun 14 18:53:58 2019 +0100 acpi: utils: Cleanup acpi_dev_match_cb The prototype of bus_find_device() will be unified with that of class_find_device() subsequently, but for this purpose the callback functions passed to it need to take (const void *) as the second argument. Consequently, they cannot modify the memory pointed to by that argument which currently is not the case for acpi_dev_match_cb(). However, acpi_dev_match_cb() really need not modify the "match" object passed to it, because acpi_dev_get_first_match_dev() which uses it via bus_find_device() can easily convert the result of bus_find_device() into the pointer to return. For this reason, update acpi_dev_match_cb() to avoid the redundant memory updates. Cc: Len Brown Cc: linux-acpi@vger.kernel.org Signed-off-by: Suzuki K Poulose Reviewed-by: Rafael J. Wysocki Signed-off-by: Greg Kroah-Hartman drivers/acpi/utils.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 29d14b668d2f2e7b692525ee3f69bf12b06be0f0 Author: Suzuki K Poulose Date: Fri Jun 14 18:53:57 2019 +0100 mfd: Remove unused helper syscon_regmap_lookup_by_pdevname Nobody uses the exported helper syscon_regmap_lookup_by_pdevname, to lookup a device by name. Let us remove it. Suggested-by: Arnd Bergman Cc: Arnd Bergman Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Signed-off-by: Suzuki K Poulose Signed-off-by: Greg Kroah-Hartman drivers/mfd/syscon.c | 21 --------------------- include/linux/mfd/syscon.h | 6 ------ 2 files changed, 27 deletions(-) commit 209de31034522fae53f789f52c9461c557011d70 Author: Suzuki K Poulose Date: Fri Jun 14 18:53:56 2019 +0100 staging: most-core: Use bus_find_device_by_name Use bus_find_device_by_name() helper instead of writing our own helper. Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Cc: Christian Gromm Cc: "Gustavo A. R. Silva" Cc: Colin Ian King Signed-off-by: Suzuki K Poulose Signed-off-by: Greg Kroah-Hartman drivers/staging/most/core.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 01407158e4c7a6ac646901b7b034b5a7d605b480 Author: Angus Ainslie (Purism) Date: Thu Jun 20 11:05:32 2019 -0600 arm64: dts: librem5: enable the SNVS power key Enable the snvs power key. Signed-off-by: Angus Ainslie (Purism) Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts | 3 +++ 1 file changed, 3 insertions(+) commit 8155b786b6f245380a11f66729a1038ef0611e8e Author: Angus Ainslie (Purism) Date: Thu Jun 20 11:04:39 2019 -0600 arm64: dts: librem5: Limit the USB to 5V The charge controller can handle 14V but the PTC on the devkit can only handle 6V so limit the negotiated voltage to 5V. Signed-off-by: Angus Ainslie (Purism) Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ab6e923709d59c75f936b3bd054d8f730b70f15 Author: Frank Li Date: Mon Jun 24 09:58:48 2019 +0800 arm64: dts: imx8qxp: added ddr performance monitor nodes Add ddr performance monitor Signed-off-by: Frank Li Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 15c64ff7625513c551e2b50c1ae28f729b61c5d3 Author: Anson Huang Date: Wed Jun 19 15:12:40 2019 +0800 clk: imx8mq: Keep uart clocks on during system boot Call imx_register_uart_clocks() API to keep uart clocks enabled when earlyprintk or earlycon is active. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo drivers/clk/imx/clk-imx8mq.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit e5190586a92d43f26994f200cc3554c6dea4ceaa Author: Anson Huang Date: Wed Jun 19 15:12:39 2019 +0800 clk: imx: Remove __init for imx_register_uart_clocks() API Some of i.MX SoCs' clock driver use platform driver model, and they need to call imx_register_uart_clocks() API, so imx_register_uart_clocks() API should NOT be in .init section. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo drivers/clk/imx/clk.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 23297edbc15ae19917253064c81f91c4df240f93 Author: Guenter Roeck Date: Thu Jun 20 06:14:42 2019 -0700 hwmon: Convert remaining drivers to use SPDX identifier This gets rid of the unnecessary license boilerplate, and avoids having to deal with individual patches one by one. No functional changes intended. Reviewed-by: Corentin Labbe Reviewed-by: Jean Delvare Signed-off-by: Guenter Roeck drivers/hwmon/adm1029.c | 10 ---------- drivers/hwmon/scpi-hwmon.c | 10 +--------- 2 files changed, 1 insertion(+), 19 deletions(-) commit 3253854dc19f1610b8d01fb9265bbd98ce18abd7 Author: Arnd Bergmann Date: Mon Jun 17 14:34:30 2019 +0200 hwmon: (max6650) Fix unused variable warning The newly added variable is only used in an #if block: drivers/hwmon/max6650.c: In function 'max6650_probe': drivers/hwmon/max6650.c:766:33: error: unused variable 'cooling_dev' [-Werror=unused-variable] Change the #if to if() so the compiler can see what is actually going on. Fixes: a8463754a5a9 ("hwmon: (max6650) Use devm function to register thermal device") Signed-off-by: Arnd Bergmann Signed-off-by: Guenter Roeck drivers/hwmon/max6650.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit 7d45deb31bec3992cd92a240946fbf872661fa2c Author: Guenter Roeck Date: Wed Jun 12 07:39:33 2019 -0700 hwmon: (pmbus/adm1275) Fix power sampling support Not every chip supported by this driver supports setting the number of samples for power averaging. Also, the power monitoring register is not always a 16-bit register, and the configuration bits used for voltage sampling are different depending on the register width. Some conditional code is needed to fix the problem. On top of all that, the compiler complains about problems with FIELD_GET and FIELD_PREP macros if the file is built with W=1. Avoid using those macros to silence the warning. Cc: Krzysztof Adamski Cc: Alexander Sverdlin Reviewed-by: Krzysztof Adamski Signed-off-by: Guenter Roeck drivers/hwmon/pmbus/adm1275.c | 84 +++++++++++++++++++++++++++++++++---------- 1 file changed, 65 insertions(+), 19 deletions(-) commit e67776cc30894d2840fc0b93fc3b3647677ef0b3 Author: Wolfram Sang Date: Mon Jun 10 11:51:54 2019 +0200 hwmon: (lm90) simplify getting the adapter of a client We have a dedicated pointer for that, so use it. Much easier to read and less computation involved. Reported-by: Peter Rosin Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck drivers/hwmon/lm90.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 08d09d8099a7556d49ba0e770c32345cc79566b3 Author: Greg Kroah-Hartman Date: Tue Jun 11 19:58:58 2019 +0200 hwmon: (asus_atk0110) no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Luca Tettamanti Cc: Jean Delvare Cc: Guenter Roeck Cc: linux-hwmon@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Guenter Roeck drivers/hwmon/asus_atk0110.c | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) commit 228b9e196a6db701a80e80251ff521688865e6f9 Author: Guenter Roeck Date: Fri Jun 7 10:23:25 2019 -0700 hwmon: (max6650) Fix minor formatting issues CHECK: struct mutex definition without comment CHECK: Alignment should match open parenthesis Cc: Jean-Francois Dagenais Signed-off-by: Guenter Roeck drivers/hwmon/max6650.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 0c4a71d36566a783d795025260a7648447453966 Author: Guenter Roeck Date: Fri Jun 7 10:23:24 2019 -0700 hwmon: (max6650) Improve error handling in max6650_update_device Pass errors from i2c_smbus_read_byte_data() back to the caller of max6650_update_device(). Cc: Jean-Francois Dagenais Signed-off-by: Guenter Roeck drivers/hwmon/max6650.c | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) commit 62dbe50591769f6135b3c8a93c8168b3d177a823 Author: Guenter Roeck Date: Fri Jun 7 10:23:23 2019 -0700 hwmon: (max6650) Read non-volatile registers only once Only tachometer and alarm status registers are modified by the chip. All other registers only need to be read only once, and reading them repeatedly does not add any value. Cc: Jean-Francois Dagenais Signed-off-by: Guenter Roeck drivers/hwmon/max6650.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) commit e193acb3d681ba28355ab8bafc49768ac609b94e Author: Guenter Roeck Date: Fri Jun 7 10:23:22 2019 -0700 hwmon: (max6650) Convert to use devm_hwmon_device_register_with_info Convert driver to use devm_hwmon_device_register_with_info to simplify the code and to reduce its size. Cc: Jean-Francois Dagenais Signed-off-by: Guenter Roeck drivers/hwmon/max6650.c | 508 +++++++++++++++++++++++------------------------- 1 file changed, 247 insertions(+), 261 deletions(-) commit 0d5cc9383eea0835621cd458c34f1209d483e2ef Author: Guenter Roeck Date: Fri Jun 7 10:23:21 2019 -0700 hwmon: (max6650) Simplify alarm handling Instead of re-reading the alarm register after reporting an alarm, mark cached values as invalid. While this results in always reading all data on subsequent reads, it is quite unlikely that such reads will actually happen before the cache times out. The upside is avoiding unnecessary unconditional i2c read operations. Cc: Jean-Francois Dagenais Signed-off-by: Guenter Roeck drivers/hwmon/max6650.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit f5b20b11bbc230f64c099b12c37121aacf6f0b65 Author: Guenter Roeck Date: Fri Jun 7 10:23:20 2019 -0700 hwmon: (max6650) Cache alarm_en register The alarm_en register is read each time the is_visible function is called. Since it is a configuration register, this is completely unnecessary. Read it once and cache its value. Cc: Jean-Francois Dagenais Signed-off-by: Guenter Roeck drivers/hwmon/max6650.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit bf8c9edaa5c61999ed06c001d87c9a0c86cd0bf8 Author: Guenter Roeck Date: Fri Jun 7 10:23:19 2019 -0700 hwmon: (max6650) Declare valid as boolean Declare valid as boolean to match its use case. Cc: Jean-Francois Dagenais Signed-off-by: Guenter Roeck drivers/hwmon/max6650.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b9d8de4a173dad844f3a3e08dac1364f13ace1e2 Author: Guenter Roeck Date: Fri Jun 7 10:23:18 2019 -0700 hwmon: (max6650) Improve error handling in max6650_init_client Do not overwrite errors reported from i2c functions, and don't ignore any errors. Cc: Jean-Francois Dagenais Signed-off-by: Guenter Roeck drivers/hwmon/max6650.c | 43 ++++++++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 19 deletions(-) commit b2905bb8e1f3764c21e449931f3fb75405f7d41e Author: Guenter Roeck Date: Fri Jun 7 10:23:17 2019 -0700 hwmon: (max6650) Introduce pwm_to_dac and dac_to_pwm Consolidate conversion from pwm value to dac value and from dac value to pwm value into helper functions. While doing this, only update the cached dac value if writing it to the chip was successful after an update. Also, put macro argument of DIV_FROM_REG() into (), and simplify return statement of max6650_set_cur_state(). Cc: Jean-Francois Dagenais Signed-off-by: Guenter Roeck drivers/hwmon/max6650.c | 55 ++++++++++++++++++++++++------------------------- 1 file changed, 27 insertions(+), 28 deletions(-) commit 8e5e7ddd38b69ef48a2104cd663fab0e3dd03e14 Author: Guenter Roeck Date: Fri Jun 7 10:23:16 2019 -0700 hwmon: (max6650) Use devm function to register thermal device Use devm_thermal_of_cooling_device_register to register the thermal cooling device. This lets us drop the remove function. At the same time, use 'dev' variable in probe function consistently. Cc: Jean-Francois Dagenais Signed-off-by: Guenter Roeck drivers/hwmon/max6650.c | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) commit 792eac1843196708e6f72e73b8f50e273721757e Author: Guenter Roeck Date: Thu Jun 6 09:43:14 2019 -0700 hwmon: (core) Add comment describing how hwdev is freed in error path The hwmon core registers the hwmon device before adding sensors to the thermal core. If that fails, the hwmon device is released and an error is returned to the caller. From the code flow, it appears to be necessary to free struct hwmon_device *, allocated with kzalloc(), in that situation. This is incorrect, since the data structure will be freed automatically in hwmon_dev_release() when device_unregister() is called. This used to result in a double free, which was found and fixed with commit 74e3512731bd ("hwmon: (core) Fix double-free in __hwmon_device_register()"). This is, however, not obvious; any reader may erroneously conclude that the data structure is not freed. Add comment explaining why kfree() is not necessary in this situation. Reported-by: Eduardo Valentin Cc: Eduardo Valentin Signed-off-by: Guenter Roeck drivers/hwmon/hwmon.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 5fe625c136367fc7283d021d3ae574fce060d716 Author: Masahiro Yamada Date: Thu Jun 6 17:52:42 2019 +0900 hwmon: (smsc47m1) fix (suspicious) outside array bounds warnings Kbuild test robot reports outside array bounds warnings. This is reproducible for ARCH=sh allmodconfig with the kernel.org toolchains available at: https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/8.1.0/x86_64-gcc-8.1.0-nolibc-sh4-linux.tar.xz CC [M] drivers/hwmon/smsc47m1.o drivers/hwmon/smsc47m1.c: In function 'fan_div_store': drivers/hwmon/smsc47m1.c:370:49: warning: array subscript [0, 2] is outside array bounds of 'u8[3]' {aka 'unsigned char[3]'} [-Warray-bounds] tmp = 192 - (old_div * (192 - data->fan_preload[nr]) ~~~~~~~~~~~~~~~~~^~~~ drivers/hwmon/smsc47m1.c:372:19: warning: array subscript [0, 2] is outside array bounds of 'u8[3]' {aka 'unsigned char[3]'} [-Warray-bounds] data->fan_preload[nr] = clamp_val(tmp, 0, 191); ~~~~~~~~~~~~~~~~~^~~~ drivers/hwmon/smsc47m1.c:373:53: warning: array subscript [0, 2] is outside array bounds of 'const u8[3]' {aka 'const unsigned char[3]'} [-Warray-bounds] smsc47m1_write_value(data, SMSC47M1_REG_FAN_PRELOAD[nr], ~~~~~~~~~~~~~~~~~~~~~~~~^~~~ Looking at the code, I believe these are false positives. While it is ridiculous to patch our driver to make the insane compiler happy, clarifying the unreachable path will be helpful not only for compilers but also for humans. Reported-by: kbuild test robot Signed-off-by: Masahiro Yamada [groeck: Use BUG() instead of unreachable() to make objtool happy] Signed-off-by: Guenter Roeck drivers/hwmon/smsc47m1.c | 2 ++ 1 file changed, 2 insertions(+) commit 9158411b96b14d9d448e978b0fc8a1cffcb8a1c6 Author: Robert Hancock Date: Wed Jun 5 13:49:01 2019 -0600 hwmon: (pmbus) Add Infineon IRPS5401 driver Add a driver to support the Infineon IRPS5401 PMIC. This chip has 5 pages corresponding to 4 switching outputs and one linear (LDO) output. The switching and LDO outputs have slightly different supported parameters. Signed-off-by: Robert Hancock Signed-off-by: Guenter Roeck drivers/hwmon/pmbus/Kconfig | 9 ++++++ drivers/hwmon/pmbus/Makefile | 1 + drivers/hwmon/pmbus/irps5401.c | 67 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 77 insertions(+) commit b67b7356135a4f969a33cde46359ab1068a75117 Author: amy.shih Date: Fri May 31 10:20:47 2019 +0000 hwmon: (nct7904) Fix the incorrect value of tcpu_mask in nct7904_data struct. Detect the multi-function of voltage, thermal diode and thermistor from register VT_ADC_MD_REG to set value of tcpu_mask in nct7904_data struct, set temp[1-5]_input the input values TEMP_CH1~4 and LTD of temperature. Set temp[6~13]_input the input values of DTS temperature that correspond to sensors TCPU1~8. Signed-off-by: amy.shih Signed-off-by: Guenter Roeck drivers/hwmon/nct7904.c | 72 ++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 63 insertions(+), 9 deletions(-) commit 37ab356417950bcefce49aa18a2c9d68dfcaab4b Author: Vijay Khemka Date: Thu May 30 16:11:57 2019 -0700 hwmon: (pmbus) Document Infineon PXE1610 driver Added documentation for Infineon PXE1610 driver Signed-off-by: Vijay Khemka Signed-off-by: Guenter Roeck Documentation/hwmon/pxe1610 | 90 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) commit 344757bac526726ec08f8c710770cc2488569343 Author: Vijay Khemka Date: Thu May 30 16:11:56 2019 -0700 hwmon: (pmbus) Add Infineon PXE1610 VR driver Added pmbus driver for the new device Infineon pxe1610 voltage regulator. It also supports similar family device PXE1110 and PXM1310. Signed-off-by: Vijay Khemka Signed-off-by: Guenter Roeck drivers/hwmon/pmbus/Kconfig | 9 +++ drivers/hwmon/pmbus/Makefile | 1 + drivers/hwmon/pmbus/pxe1610.c | 139 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 149 insertions(+) commit 8083034251f1e21271d3849feb0fd74380819f58 Author: Alexander Soldatov Date: Wed Apr 17 21:03:29 2019 +0300 hwmon: (occ) Add temp sensor value check The occ driver supports two formats for the temp sensor value. The OCC firmware for P8 supports only the first format, for which no range checking or error processing is performed in the driver. Inspecting the OCC sources for P8 reveals that OCC may send a special value 0xFFFF to indicate that a sensor read timeout has occurred, see https://github.com/open-power/occ/blob/master_p8/src/occ/cmdh/cmdh_fsp_cmds.c#L395 That situation wasn't handled in the driver. This patch adds invalid temp value check for the sensor data format 1 and handles it the same way as it is done for the format 2, where EREMOTEIO is reported for this case. Signed-off-by: Alexander Soldatov Signed-off-by: Alexander Amelkin Reviewed-by: Alexander Amelkin Cc: Edward A. James Cc: Joel Stanley Reviewed-by: Eddie James Signed-off-by: Guenter Roeck drivers/hwmon/occ/common.c | 6 ++++++ 1 file changed, 6 insertions(+) commit c83529c17e12046ac4a8d8fbbc49c51255c7b4da Author: Adamski, Krzysztof (Nokia - PL/Wroclaw) Date: Wed May 29 14:36:21 2019 +0000 hwmon: (pmbus/adm1275) support PMBUS_VIRT_*_SAMPLES The device supports setting the number of samples for averaging the measurements. There are two separate settings - PWR_AVG for averaging PIN and VI_AVG for averaging VIN/VAUX/IOUT, both being part of PMON_CONFIG register. The values are stored as exponent of base 2 of the actual number of samples that will be taken. Signed-off-by: Krzysztof Adamski Reviewed-by: Alexander Sverdlin [groeck: Dropped unused variables] Signed-off-by: Guenter Roeck drivers/hwmon/pmbus/adm1275.c | 59 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) commit 5696e4aaabf2a6bae0fe8b4abf17fe17c2b03beb Author: Guenter Roeck Date: Fri Jun 7 13:27:06 2019 -0700 hwmon: (pwm-fan) Check return value from devm_add_action_or_reset devm_add_action_or_reset() can fail due to a memory allocation failure. Check for it and return the error if that happens. Fixes: 37bcec5d9f71 ("hwmon: (pwm-fan) Use devm_thermal_of_cooling_device_register") Signed-off-by: Guenter Roeck drivers/hwmon/pwm-fan.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit b9bb92e1d1be921e91d8b469dc1261ea5ac71991 Author: Guenter Roeck Date: Fri Jun 7 13:19:12 2019 -0700 hwmon: (gpio-fan) Check return value from devm_add_action_or_reset devm_add_action_or_reset() can fail due to a memory allocation failure. Check for it and return the error if that happens. Fixes: 9534784550ab ("hwmon: (gpio-fan) Use devm_thermal_of_cooling_device_register") Signed-off-by: Guenter Roeck drivers/hwmon/gpio-fan.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit db10496c0064ba3355936de801cd3ba0b6711bd1 Author: Anson Huang Date: Wed Jun 19 09:07:08 2019 +0800 soc: imx: Add i.MX8MN SoC driver support This patch adds i.MX8MN SoC driver support: root@imx8mnevk:~# cat /sys/devices/soc0/family Freescale i.MX root@imx8mnevk:~# cat /sys/devices/soc0/machine NXP i.MX8MNano DDR4 EVK board root@imx8mnevk:~# cat /sys/devices/soc0/soc_id i.MX8MN root@imx8mnevk:~# cat /sys/devices/soc0/revision 1.0 Signed-off-by: Anson Huang Signed-off-by: Shawn Guo drivers/soc/imx/soc-imx8.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 107529cf2e4ee6cc684ec3c4384178576f1b79c1 Author: Shawn Guo Date: Mon Jun 24 09:03:00 2019 +0800 arm64: dts: imx8qxp: sort LSIO subsystem devices We prefer to sort device nodes under simple bus in order of unit address. Let's sort the devices under lsio_subsys properly. Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 106 ++++++++++++++--------------- 1 file changed, 53 insertions(+), 53 deletions(-) commit 74d82a302081d24a1fe2a2a5d87ad35ae8ebe4ec Author: Shawn Guo Date: Mon Jun 24 09:00:49 2019 +0800 arm64: dts: imx8qxp: sort alias alphabetically We prefer to sort alias entries alphabetically, so let's move serial0 to the right place. Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 93b2106bafeec19dfc238425d157555437a72fd0 Author: Daniel Baluta Date: Wed Jun 19 00:05:16 2019 +0300 arm64: dts: imx8qxp: Add lsio_mu13 node lsio_mu13 node is used to communicate with DSP. Signed-off-by: Daniel Baluta Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 2a51f9dae13d1f2f59ab192fc66b4131e7a83ed0 Author: Priit Laes Date: Mon Jun 17 18:14:31 2019 +0200 ARM: dts: imx6qdl-kontron-samx6i: Add iMX6-based Kontron SMARC-sAMX6i module SMARC-sAMX6i is a SMARC (Smart Mobility Architecture) compliant module. Signed-off-by: Priit Laes Signed-off-by: Michael Grzeschik Signed-off-by: Marco Felsch Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-kontron-samx6i.dtsi | 421 ++++++++++++++++++++++++++ 1 file changed, 421 insertions(+) commit 674eecb3d35ab9531b49e2aceff1eeb142a850d6 Author: Joseph Salisbury Date: Tue Apr 23 03:47:27 2019 +0000 drivers: hv: Add a module description line to the hv_vmbus driver This patch only adds a MODULE_DESCRIPTION statement to the driver. This change is only cosmetic, so there should be no runtime impact. Signed-off-by: Joseph Salisbury Reviewed-by: Michael Kelley Signed-off-by: Sasha Levin drivers/hv/vmbus_drv.c | 1 + 1 file changed, 1 insertion(+) commit 203dffacf592317e54480704f569a09f8b7ca380 Author: Fenghua Yu Date: Wed Jun 19 18:33:58 2019 -0700 Documentation/ABI: Document umwait control sysfs interfaces Since two new sysfs interface files are created for umwait control, add an ABI document entry for the files: /sys/devices/system/cpu/umwait_control/enable_c02 /sys/devices/system/cpu/umwait_control/max_time [ tglx: Made the write value instructions readable ] Signed-off-by: Fenghua Yu Signed-off-by: Thomas Gleixner Reviewed-by: Ashok Raj Cc: "Borislav Petkov" Cc: "H Peter Anvin" Cc: "Andy Lutomirski" Cc: "Peter Zijlstra" Cc: "Tony Luck" Cc: "Ravi V Shankar" Link: https://lkml.kernel.org/r/1560994438-235698-6-git-send-email-fenghua.yu@intel.com Documentation/ABI/testing/sysfs-devices-system-cpu | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit bd9a0c97e53c3d7a56b2751179903ddc5da42683 Author: Fenghua Yu Date: Wed Jun 19 18:33:57 2019 -0700 x86/umwait: Add sysfs interface to control umwait maximum time IA32_UMWAIT_CONTROL[31:2] determines the maximum time in TSC-quanta that processor can stay in C0.1 or C0.2. A zero value means no maximum time. Each instruction sets its own deadline in the instruction's implicit input EDX:EAX value. The instruction wakes up if the time-stamp counter reaches or exceeds the specified deadline, or the umwait maximum time expires, or a store happens in the monitored address range in umwait. The administrator can write an unsigned 32-bit number to /sys/devices/system/cpu/umwait_control/max_time to change the default value. Note that a value of zero means there is no limit. The lower two bits of the value must be zero. [ tglx: Simplify the write function. Massage changelog ] Signed-off-by: Fenghua Yu Signed-off-by: Thomas Gleixner Reviewed-by: Ashok Raj Reviewed-by: Tony Luck Cc: "Borislav Petkov" Cc: "H Peter Anvin" Cc: "Andy Lutomirski" Cc: "Peter Zijlstra" Cc: "Ravi V Shankar" Link: https://lkml.kernel.org/r/1560994438-235698-5-git-send-email-fenghua.yu@intel.com arch/x86/kernel/cpu/umwait.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit ff4b353f2ef9dc8e396d7cb9572801e34a8c7374 Author: Fenghua Yu Date: Wed Jun 19 18:33:56 2019 -0700 x86/umwait: Add sysfs interface to control umwait C0.2 state C0.2 state in umwait and tpause instructions can be enabled or disabled on a processor through IA32_UMWAIT_CONTROL MSR register. By default, C0.2 is enabled and the user wait instructions results in lower power consumption with slower wakeup time. But in real time systems which require faster wakeup time although power savings could be smaller, the administrator needs to disable C0.2 and all umwait invocations from user applications use C0.1. Create a sysfs interface which allows the administrator to control C0.2 state during run time. Andy Lutomirski suggested to turn off local irqs before writing the MSR to ensure the cached control value is not changed by a concurrent sysfs write from a different CPU via IPI. [ tglx: Simplified the update logic in the write function and got rid of all the convoluted type casts. Added a shared update function and made the namespace consistent. Moved the sysfs create invocation. Massaged changelog ] Signed-off-by: Fenghua Yu Signed-off-by: Thomas Gleixner Reviewed-by: Ashok Raj Reviewed-by: Tony Luck Cc: "Borislav Petkov" Cc: "H Peter Anvin" Cc: "Andy Lutomirski" Cc: "Peter Zijlstra" Cc: "Ravi V Shankar" Link: https://lkml.kernel.org/r/1560994438-235698-4-git-send-email-fenghua.yu@intel.com arch/x86/kernel/cpu/umwait.c | 118 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 110 insertions(+), 8 deletions(-) commit bd688c69b7e6693de3bd78f38fd63f7850c2711e Author: Fenghua Yu Date: Wed Jun 19 18:33:55 2019 -0700 x86/umwait: Initialize umwait control values umwait or tpause allows the processor to enter a light-weight power/performance optimized state (C0.1 state) or an improved power/performance optimized state (C0.2 state) for a period specified by the instruction or until the system time limit or until a store to the monitored address range in umwait. IA32_UMWAIT_CONTROL MSR register allows the OS to enable/disable C0.2 on the processor and to set the maximum time the processor can reside in C0.1 or C0.2. By default C0.2 is enabled so the user wait instructions can enter the C0.2 state to save more power with slower wakeup time. Andy Lutomirski proposed to set the maximum umwait time to 100000 cycles by default. A quote from Andy: "What I want to avoid is the case where it works dramatically differently on NO_HZ_FULL systems as compared to everything else. Also, UMWAIT may behave a bit differently if the max timeout is hit, and I'd like that path to get exercised widely by making it happen even on default configs." A sysfs interface to adjust the time and the C0.2 enablement is provided in a follow up change. [ tglx: Renamed MSR_IA32_UMWAIT_CONTROL_MAX_TIME to MSR_IA32_UMWAIT_CONTROL_TIME_MASK because the constant is used as mask throughout the code. Massaged comments and changelog ] Signed-off-by: Fenghua Yu Signed-off-by: Thomas Gleixner Reviewed-by: Ashok Raj Reviewed-by: Andy Lutomirski Cc: "Borislav Petkov" Cc: "H Peter Anvin" Cc: "Peter Zijlstra" Cc: "Tony Luck" Cc: "Ravi V Shankar" Link: https://lkml.kernel.org/r/1560994438-235698-3-git-send-email-fenghua.yu@intel.com arch/x86/include/asm/msr-index.h | 9 ++++++ arch/x86/kernel/cpu/Makefile | 1 + arch/x86/kernel/cpu/umwait.c | 62 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 72 insertions(+) commit 6dbbf5ec9e1e9f607a4c51266d0f9a63ba754b63 Author: Fenghua Yu Date: Wed Jun 19 18:33:54 2019 -0700 x86/cpufeatures: Enumerate user wait instructions umonitor, umwait, and tpause are a set of user wait instructions. umonitor arms address monitoring hardware using an address. The address range is determined by using CPUID.0x5. A store to an address within the specified address range triggers the monitoring hardware to wake up the processor waiting in umwait. umwait instructs the processor to enter an implementation-dependent optimized state while monitoring a range of addresses. The optimized state may be either a light-weight power/performance optimized state (C0.1 state) or an improved power/performance optimized state (C0.2 state). tpause instructs the processor to enter an implementation-dependent optimized state C0.1 or C0.2 state and wake up when time-stamp counter reaches specified timeout. The three instructions may be executed at any privilege level. The instructions provide power saving method while waiting in user space. Additionally, they can allow a sibling hyperthread to make faster progress while this thread is waiting. One example of an application usage of umwait is when waiting for input data from another application, such as a user level multi-threaded packet processing engine. Availability of the user wait instructions is indicated by the presence of the CPUID feature flag WAITPKG CPUID.0x07.0x0:ECX[5]. Detailed information on the instructions and CPUID feature WAITPKG flag can be found in the latest Intel Architecture Instruction Set Extensions and Future Features Programming Reference and Intel 64 and IA-32 Architectures Software Developer's Manual. Signed-off-by: Fenghua Yu Signed-off-by: Thomas Gleixner Reviewed-by: Ashok Raj Reviewed-by: Andy Lutomirski Cc: "Borislav Petkov" Cc: "H Peter Anvin" Cc: "Peter Zijlstra" Cc: "Tony Luck" Cc: "Ravi V Shankar" Link: https://lkml.kernel.org/r/1560994438-235698-2-git-send-email-fenghua.yu@intel.com arch/x86/include/asm/cpufeatures.h | 1 + 1 file changed, 1 insertion(+) commit ecf9db3d1f1a8fd2c335148891c3b044e9ce0628 Author: Andy Lutomirski Date: Sat Jun 22 15:08:18 2019 -0700 x86/vdso: Give the [ph]vclock_page declarations real types Clean up the vDSO code a bit by giving pvclock_page and hvclock_page their actual types instead of u8[PAGE_SIZE]. This shouldn't materially affect the generated code. Heavily based on a patch from Linus. [ tglx: Adapted to the unified VDSO code ] Co-developed-by: Linus Torvalds Signed-off-by: Linus Torvalds Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Cc: Borislav Petkov Cc: Peter Zijlstra Link: https://lkml.kernel.org/r/6920c5188f8658001af1fc56fd35b815706d300c.1561241273.git.luto@kernel.org arch/x86/include/asm/vdso/gettimeofday.h | 36 +++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 12 deletions(-) commit ad97f9df0fee4ddc9ef056dda4dcbc6630d9f972 Author: Christoph Hellwig Date: Thu Jun 13 09:09:03 2019 +0200 riscv: add binfmt_flat support Just use the generic definitions. Signed-off-by: Christoph Hellwig Signed-off-by: Greg Ungerer arch/riscv/Kconfig | 1 + arch/riscv/include/asm/Kbuild | 1 + 2 files changed, 2 insertions(+) commit a2357223c50a784ae144c8398683551252bcd61d Author: Christoph Hellwig Date: Thu Jun 13 09:09:02 2019 +0200 binfmt_flat: don't offset the data start Ever since the initial commit of the binfmt_flat shared library support back in the bitkeeper days we've offset the actual in-memory .data start by one field per possible shared library, or 1 in case shared library support isn't enabled. I can't find anything in the loader that actually makes use of it, nor was it present before shared library support it. Signed-off-by: Christoph Hellwig Signed-off-by: Greg Ungerer fs/binfmt_flat.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) commit a445d988b4790e06bb94e927e740017675d7e700 Author: Christoph Hellwig Date: Thu Jun 13 09:09:01 2019 +0200 binfmt_flat: move the MAX_SHARED_LIBS definition to binfmt_flat.c MAX_SHARED_LIBS is an implementation detail of the kernel loader, and should be kept away from the file format definition. Signed-off-by: Christoph Hellwig Signed-off-by: Greg Ungerer fs/binfmt_flat.c | 6 ++++++ include/linux/flat.h | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) commit 6843d8aa5b9bc61df8787801f19f538123724bfa Author: Christoph Hellwig Date: Thu Jun 13 09:09:00 2019 +0200 binfmt_flat: remove the persistent argument from flat_get_addr_from_rp The argument is never used. Signed-off-by: Christoph Hellwig Signed-off-by: Greg Ungerer arch/c6x/include/asm/flat.h | 2 +- arch/h8300/include/asm/flat.h | 2 +- arch/microblaze/include/asm/flat.h | 2 +- arch/sh/include/asm/flat.h | 2 +- arch/xtensa/include/asm/flat.h | 2 +- fs/binfmt_flat.c | 4 +--- include/asm-generic/flat.h | 2 +- 7 files changed, 7 insertions(+), 9 deletions(-) commit 7a8998c9d830b59626e049a827678ba444fcf8e2 Author: Christoph Hellwig Date: Thu Jun 13 09:08:59 2019 +0200 binfmt_flat: provide an asm-generic/flat.h This file implements the flat get/put reloc helpers for architectures that do not need to overload the relocs by simply using get_user/put_user. Note that many nommu architectures currently use {get,put}_unaligned, which looks a little bogus and should probably later be switched over to this version as well. Signed-off-by: Christoph Hellwig Reviewed-by: Vladimir Murzin Signed-off-by: Greg Ungerer arch/arm/include/asm/Kbuild | 1 + arch/m68k/include/asm/flat.h | 21 +-------------------- .../arm/include/asm => include/asm-generic}/flat.h | 12 ++++-------- 3 files changed, 6 insertions(+), 28 deletions(-) commit cf9a566c2c06ac34425c4faf6d32ac55ddbeea7a Author: Christoph Hellwig Date: Thu Jun 13 09:08:58 2019 +0200 binfmt_flat: make support for old format binaries optional No need to carry the extra code around, given that systems using flat binaries are generally very resource constrained. Signed-off-by: Christoph Hellwig Signed-off-by: Greg Ungerer fs/Kconfig.binfmt | 7 +++++++ fs/binfmt_flat.c | 30 ++++++++++++++++++++++-------- 2 files changed, 29 insertions(+), 8 deletions(-) commit aef0f78e7460cd2889fe5359b26f7ad3c9555630 Author: Christoph Hellwig Date: Thu Jun 13 09:08:57 2019 +0200 binfmt_flat: add a ARCH_HAS_BINFMT_FLAT option Allow architectures to opt into ARCH_HAS_BINFMT_FLAT support instead of assuming that all nommu ports support the format. Signed-off-by: Christoph Hellwig Reviewed-by: Vladimir Murzin Signed-off-by: Greg Ungerer arch/arm/Kconfig | 1 + arch/c6x/Kconfig | 1 + arch/h8300/Kconfig | 1 + arch/m68k/Kconfig | 1 + arch/microblaze/Kconfig | 1 + arch/sh/Kconfig | 1 + arch/xtensa/Kconfig | 1 + fs/Kconfig.binfmt | 5 ++++- 8 files changed, 11 insertions(+), 1 deletion(-) commit 3b9777184232a9c2ded88caa5f50adb75d636325 Author: Christoph Hellwig Date: Thu Jun 13 09:08:56 2019 +0200 binfmt_flat: add endianess annotations Most binfmt_flat on-disk fields are big endian. Use the proper __be32 type where applicable. Signed-off-by: Christoph Hellwig Tested-by: Vladimir Murzin Reviewed-by: Vladimir Murzin Signed-off-by: Greg Ungerer fs/binfmt_flat.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) commit 34b4664ac4824d6c7a8b29db24b18733df07b2f4 Author: Christoph Hellwig Date: Thu Jun 13 09:08:55 2019 +0200 binfmt_flat: use fixed size type for the on-disk format So far binfmt_flat has only been supported on 32-bit platforms, so the variable size of the fields didn't matter. But the upcoming RISC-V nommu port supports 64-bit CPUs, and we now have a conflict between the elf2flt creation tool that always uses 32-bit fields and the kernel that uses (unsigned) long field. Switch to the userspace view as the rest of the binfmt_flat format is completely architecture neutral, and binfmt_flat isn't the right binary format for huge executables to start with. While we're at it also ensure these fields are using __be types as they big endian and are byte swapped when loaded. Signed-off-by: Christoph Hellwig Reviewed-by: Vladimir Murzin Signed-off-by: Greg Ungerer include/linux/flat.h | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) commit 3f8b76a66e0d49e3afaba595b9762c126448e783 Author: Christoph Hellwig Date: Thu Jun 13 09:08:54 2019 +0200 binfmt_flat: consolidate two version of flat_v2_reloc_t Two branches of the ifdef maze actually have the same content, so merge them. Signed-off-by: Christoph Hellwig Signed-off-by: Greg Ungerer include/linux/flat.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 38e63483a31747ef8a964ba3f0184c1e5b507749 Author: Christoph Hellwig Date: Thu Jun 13 09:08:53 2019 +0200 binfmt_flat: remove the unused OLD_FLAT_FLAG_RAM definition Signed-off-by: Christoph Hellwig Signed-off-by: Greg Ungerer include/linux/flat.h | 3 --- 1 file changed, 3 deletions(-) commit 06d2bfedd147d26af6908e4202466586133e73a7 Author: Christoph Hellwig Date: Thu Jun 13 09:08:52 2019 +0200 binfmt_flat: remove the uapi header The split between the two flat.h files is completely arbitrary, and the uapi version even contains CONFIG_ ifdefs that can't work in userspace. The only userspace program known to use the header is elf2flt, and it ships with its own version of the combined header. Use the chance to move the inclusion out of this file, as it is in no way needed for the format defintion, but just for the binfmt implementation. Signed-off-by: Christoph Hellwig Tested-by: Vladimir Murzin Reviewed-by: Vladimir Murzin Signed-off-by: Greg Ungerer fs/binfmt_flat.c | 1 + include/linux/flat.h | 45 ++++++++++++++++++++++++++++++++---- include/uapi/linux/flat.h | 59 ----------------------------------------------- 3 files changed, 42 insertions(+), 63 deletions(-) commit bdd15a288492f2f496a904c69c4b332057ae2ef6 Author: Christoph Hellwig Date: Thu Jun 13 09:08:51 2019 +0200 binfmt_flat: replace flat_argvp_envp_on_stack with a Kconfig variable This will eventually allow us to kill the need for an for many cases. Signed-off-by: Christoph Hellwig Tested-by: Vladimir Murzin Reviewed-by: Vladimir Murzin Signed-off-by: Greg Ungerer arch/arm/Kconfig | 1 + arch/arm/include/asm/flat.h | 2 -- arch/c6x/include/asm/flat.h | 1 - arch/h8300/Kconfig | 1 + arch/h8300/include/asm/flat.h | 2 -- arch/m68k/Kconfig | 1 + arch/m68k/include/asm/flat.h | 1 - arch/microblaze/include/asm/flat.h | 2 -- arch/sh/include/asm/flat.h | 1 - arch/xtensa/include/asm/flat.h | 1 - fs/Kconfig.binfmt | 3 +++ fs/binfmt_flat.c | 5 +++-- 12 files changed, 9 insertions(+), 12 deletions(-) commit 1d52dca117434eca9c6efc9c22d24e7a341ad903 Author: Christoph Hellwig Date: Thu Jun 13 09:08:50 2019 +0200 binfmt_flat: remove flat_old_ram_flag Instead add a Kconfig variable that only h8300 selects. Signed-off-by: Christoph Hellwig Signed-off-by: Greg Ungerer arch/arm/include/asm/flat.h | 1 - arch/c6x/include/asm/flat.h | 1 - arch/h8300/Kconfig | 1 + arch/h8300/include/asm/flat.h | 1 - arch/m68k/include/asm/flat.h | 1 - arch/microblaze/include/asm/flat.h | 1 - arch/sh/include/asm/flat.h | 1 - arch/xtensa/include/asm/flat.h | 1 - fs/Kconfig.binfmt | 3 +++ fs/binfmt_flat.c | 3 ++- 10 files changed, 6 insertions(+), 8 deletions(-) commit 02da283302f7e723a6cef3ea296fbb2313dde992 Author: Christoph Hellwig Date: Thu Jun 13 09:08:49 2019 +0200 binfmt_flat: provide a default version of flat_get_relocate_addr This way only the two architectures that do masking need to provide the helper. Signed-off-by: Christoph Hellwig Tested-by: Vladimir Murzin Reviewed-by: Vladimir Murzin Signed-off-by: Greg Ungerer arch/arm/include/asm/flat.h | 2 -- arch/c6x/include/asm/flat.h | 1 - arch/m68k/include/asm/flat.h | 1 - arch/sh/include/asm/flat.h | 1 - arch/xtensa/include/asm/flat.h | 1 - fs/binfmt_flat.c | 4 ++++ 6 files changed, 4 insertions(+), 6 deletions(-) commit 2f3196d49b1e10f1d4bc64cce00dc95fde2b0ce1 Author: Christoph Hellwig Date: Thu Jun 13 09:08:48 2019 +0200 binfmt_flat: remove flat_set_persistent This helper is a no-op on all architectures, remove it. Signed-off-by: Christoph Hellwig Tested-by: Vladimir Murzin Reviewed-by: Vladimir Murzin Signed-off-by: Greg Ungerer arch/arm/include/asm/flat.h | 1 - arch/c6x/include/asm/flat.h | 1 - arch/h8300/include/asm/flat.h | 1 - arch/m68k/include/asm/flat.h | 5 ----- arch/microblaze/include/asm/flat.h | 1 - arch/sh/include/asm/flat.h | 1 - arch/xtensa/include/asm/flat.h | 1 - fs/binfmt_flat.c | 2 -- 8 files changed, 13 deletions(-) commit 9ee24b2a38358acbe004640776520a093ac34642 Author: Christoph Hellwig Date: Thu Jun 13 09:08:47 2019 +0200 binfmt_flat: remove flat_reloc_valid This helper is the same for all architectures, open code it in the only caller. Signed-off-by: Christoph Hellwig Tested-by: Vladimir Murzin Reviewed-by: Vladimir Murzin Signed-off-by: Greg Ungerer arch/arm/include/asm/flat.h | 1 - arch/c6x/include/asm/flat.h | 1 - arch/h8300/include/asm/flat.h | 1 - arch/m68k/include/asm/flat.h | 1 - arch/microblaze/include/asm/flat.h | 1 - arch/sh/include/asm/flat.h | 1 - arch/xtensa/include/asm/flat.h | 1 - fs/binfmt_flat.c | 2 +- 8 files changed, 1 insertion(+), 8 deletions(-) commit a88b6d5668bef303d01b706a35946bfc8e67402c Author: kbuild test robot Date: Mon Jun 24 02:50:44 2019 +0800 fix platform_no_drv_owner.cocci warnings drivers/char/ipmi/ipmb_dev_int.c:352:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Fixes: 51bd6f291583 ("Add support for IPMB driver") CC: Asmaa Mnebhi Signed-off-by: kbuild test robot Message-Id: <20190623185044.GA94834@lkp-kbuild21> Signed-off-by: Corey Minyard drivers/char/ipmi/ipmb_dev_int.c | 1 - 1 file changed, 1 deletion(-) commit 7d30a7f6424e88c958c19a02f6f54ab8d25919cd Merge: 8c25c0cb5bb4 7d9e5f422150 Author: David S. Miller Date: Sun Jun 23 13:24:17 2019 -0700 Merge branch 'ipv6-avoid-taking-refcnt-on-dst-during-route-lookup' Wei Wang says: ==================== ipv6: avoid taking refcnt on dst during route lookup Ipv6 route lookup code always grabs refcnt on the dst for the caller. But for certain cases, grabbing refcnt is not always necessary if the call path is rcu protected and the caller does not cache the dst. Another issue in the route lookup logic is: When there are multiple custom rules, we have to do the lookup into each table associated to each rule individually. And when we can't find the route in one table, we grab and release refcnt on net->ipv6.ip6_null_entry before going to the next table. This operation is completely redundant, and causes false issue because net->ipv6.ip6_null_entry is a shared object. This patch set introduces a new flag RT6_LOOKUP_F_DST_NOREF for route lookup callers to set, to avoid any manipulation on the dst refcnt. And it converts the major input and output path to use it. The performance gain is noticable. I ran synflood tests between 2 hosts under the same switch. Both hosts have 20G mlx NIC, and 8 tx/rx queues. Sender sends pure SYN flood with random src IPs and ports using trafgen. Receiver has a simple TCP listener on the target port. Both hosts have multiple custom rules: - For incoming packets, only local table is traversed. - For outgoing packets, 3 tables are traversed to find the route. The packet processing rate on the receiver is as follows: - Before the fix: 3.78Mpps - After the fix: 5.50Mpps v2->v3: - Handled fib6_rule_lookup() when CONFIG_IPV6_MULTIPLE_TABLES is not configured in patch 03 (suggested by David Ahern) - Removed the renaming of l3mdev_link_scope_lookup() in patch 05 (suggested by David Ahern) - Moved definition of ip6_route_output_flags() from an inline function in /net/ipv6/route.c to net/ipv6/route.c in order to address kbuild error in patch 05 v1->v2: - Added a helper ip6_rt_put_flags() in patch 3 suggested by David Miller ==================== Reviewed-by: David Ahern Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit 7d9e5f422150ed00de744e02a80734d74cc9704d Author: Wei Wang Date: Thu Jun 20 17:36:41 2019 -0700 ipv6: convert major tx path to use RT6_LOOKUP_F_DST_NOREF For tx path, in most cases, we still have to take refcnt on the dst cause the caller is caching the dst somewhere. But it still is beneficial to make use of RT6_LOOKUP_F_DST_NOREF flag while doing the route lookup. It is cause this flag prevents manipulating refcnt on net->ipv6.ip6_null_entry when doing fib6_rule_lookup() to traverse each routing table. The null_entry is a shared object and constant updates on it cause false sharing. We converted the current major lookup function ip6_route_output_flags() to make use of RT6_LOOKUP_F_DST_NOREF. Together with the change in the rx path, we see noticable performance boost: I ran synflood tests between 2 hosts under the same switch. Both hosts have 20G mlx NIC, and 8 tx/rx queues. Sender sends pure SYN flood with random src IPs and ports using trafgen. Receiver has a simple TCP listener on the target port. Both hosts have multiple custom rules: - For incoming packets, only local table is traversed. - For outgoing packets, 3 tables are traversed to find the route. The packet processing rate on the receiver is as follows: - Before the fix: 3.78Mpps - After the fix: 5.50Mpps Signed-off-by: Wei Wang Signed-off-by: David S. Miller drivers/net/vrf.c | 5 +++-- include/net/ip6_route.h | 4 ++++ net/ipv6/route.c | 29 +++++++++++++++++++++++++++-- net/l3mdev/l3mdev.c | 7 +++---- 4 files changed, 37 insertions(+), 8 deletions(-) commit 67f415dd29063a5906c560051c00e42dcf01a4dd Author: Wei Wang Date: Thu Jun 20 17:36:40 2019 -0700 ipv6: convert rx data path to not take refcnt on dst ip6_route_input() is the key function to do the route lookup in the rx data path. All the callers to this function are already holding rcu lock. So it is fairly easy to convert it to not take refcnt on the dst: We pass in flag RT6_LOOKUP_F_DST_NOREF and do skb_dst_set_noref(). This saves a few atomic inc or dec operations and should boost performance overall. This also makes the logic more aligned with v4. Signed-off-by: Wei Wang Acked-by: Eric Dumazet Acked-by: Mahesh Bandewar Signed-off-by: David S. Miller net/ipv6/route.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit d64a1f574a2957b4bcb06452d36cc1c6bf16e9fc Author: Wei Wang Date: Thu Jun 20 17:36:39 2019 -0700 ipv6: honor RT6_LOOKUP_F_DST_NOREF in rule lookup logic This patch specifically converts the rule lookup logic to honor this flag and not release refcnt when traversing each rule and calling lookup() on each routing table. Similar to previous patch, we also need some special handling of dst entries in uncached list because there is always 1 refcnt taken for them even if RT6_LOOKUP_F_DST_NOREF flag is set. Signed-off-by: Wei Wang Signed-off-by: David S. Miller include/net/ip6_route.h | 10 ++++++++++ net/ipv6/fib6_rules.c | 12 +++++++----- net/ipv6/ip6_fib.c | 5 +++-- 3 files changed, 20 insertions(+), 7 deletions(-) commit 74109218b051c2431eec2569886627c7217e235a Author: Wei Wang Date: Thu Jun 20 17:36:38 2019 -0700 ipv6: initialize rt6->rt6i_uncached in all pre-allocated dst entries Initialize rt6->rt6i_uncached on the following pre-allocated dsts: net->ipv6.ip6_null_entry net->ipv6.ip6_prohibit_entry net->ipv6.ip6_blk_hole_entry This is a preparation patch for later commits to be able to distinguish dst entries in uncached list by doing: !list_empty(rt6->rt6i_uncached) Signed-off-by: Wei Wang Acked-by: Eric Dumazet Acked-by: Mahesh Bandewar Signed-off-by: David S. Miller net/ipv6/route.c | 3 +++ 1 file changed, 3 insertions(+) commit 0e09edcce7ad9c8120eb8462334e1c9e8f3be09a Author: Wei Wang Date: Thu Jun 20 17:36:37 2019 -0700 ipv6: introduce RT6_LOOKUP_F_DST_NOREF flag in ip6_pol_route() This new flag is to instruct the route lookup function to not take refcnt on the dst entry. The user which does route lookup with this flag must properly use rcu protection. ip6_pol_route() is the major route lookup function for both tx and rx path. In this function: Do not take refcnt on dst if RT6_LOOKUP_F_DST_NOREF flag is set, and directly return the route entry. The caller should be holding rcu lock when using this flag, and decide whether to take refcnt or not. One note on the dst cache in the uncached_list: As uncached_list does not consume refcnt, one refcnt is always returned back to the caller even if RT6_LOOKUP_F_DST_NOREF flag is set. Uncached dst is only possible in the output path. So in such call path, caller MUST check if the dst is in the uncached_list before assuming that there is no refcnt taken on the returned dst. Signed-off-by: Wei Wang Acked-by: Eric Dumazet Acked-by: Mahesh Bandewar Signed-off-by: David S. Miller include/net/ip6_route.h | 1 + net/ipv6/route.c | 73 ++++++++++++++++++++----------------------------- 2 files changed, 31 insertions(+), 43 deletions(-) commit 7ff4f0805eb5056662093b9886a819d2352e188b Author: Masahiro Yamada Date: Sat Jun 22 15:55:20 2019 +0900 kbuild: fix 'No such file or directory' warning for headers_install Since commit d5470d14431e ("kbuild: re-implement Makefile.headersinst without recursion"), headers_install emits an ugly warning. $ make headers_install [ snip ] UPD include/generated/uapi/linux/version.h find: ‘./include/uapi/Kbuild’: No such file or directory HDRINST usr/include/video/uvesafb.h ... This happens for GNU Make <= 4.2.1 When I wrote that commit, I missed this warning because I was using the state-of-the-art Make version compiled from the git tree. $(wildcard $(src)/*/) is intended to match to only existing directories since it has a trailing slash, but actually matches to regular files too. (include/uapi/Kbuild in this case) This is a bug of GNU Make, and was fixed by: | commit b7acb10e86dc8f5fdf2a2bbd87e1059c315e31d6 | Author: spagoveanu@gmail.com | Date: Wed Jun 20 02:03:48 2018 +0300 | | * src/dir.c: Preserve glob d_type field We need to cater to old Make versions. Add '$(filter %/,...) to filter out the regular files. Fixes: d5470d14431e ("kbuild: re-implement Makefile.headersinst without recursion") Signed-off-by: Masahiro Yamada scripts/Makefile.headersinst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit a222061b85234d8a44486a46bd4df7e2cda52385 Author: Will Deacon Date: Tue Jun 18 14:10:48 2019 +0100 genksyms: Teach parser about 128-bit built-in types __uint128_t crops up in a few files that export symbols to modules, so teach genksyms about it and the other GCC built-in 128-bit integer types so that we don't end up skipping the CRC generation for some symbols due to the parser failing to spot them: | WARNING: EXPORT symbol "kernel_neon_begin" [vmlinux] version | generation failed, symbol will not be versioned. | ld: arch/arm64/kernel/fpsimd.o: relocation R_AARCH64_ABS32 against | `__crc_kernel_neon_begin' can not be used when making a shared | object | ld: arch/arm64/kernel/fpsimd.o:(.data+0x0): dangerous relocation: | unsupported relocation Reported-by: Arnd Bergmann Signed-off-by: Will Deacon Signed-off-by: Masahiro Yamada scripts/genksyms/keywords.c | 4 ++++ scripts/genksyms/parse.y | 2 ++ 2 files changed, 6 insertions(+) commit 4df607cc6fe8e46b258ff2a53d0a60ca3008ffc7 Author: Nathan Huckleberry Date: Mon Jun 17 10:28:29 2019 -0700 kbuild: Remove unnecessary -Wno-unused-value This flag turns off several other warnings that would be useful. Most notably -warn_unused_result is disabled. All of the following warnings are currently disabled: UnusedValue |-UnusedComparison |-warn_unused_comparison |-UnusedResult |-warn_unused_result |-UnevaluatedExpression |-PotentiallyEvaluatedExpression |-warn_side_effects_typeid |-warn_side_effects_unevaluated_context |-warn_unused_expr |-warn_unused_voidptr |-warn_unused_container_subscript_expr |-warn_unused_call With this flag removed there are ~10 warnings. Patches have been submitted for each of these warnings. Reported-by: Nick Desaulniers Cc: clang-built-linux@googlegroups.com Link: https://github.com/ClangBuiltLinux/linux/issues/520 Signed-off-by: Nathan Huckleberry Reviewed-by: Nick Desaulniers Signed-off-by: Masahiro Yamada scripts/Makefile.extrawarn | 1 - 1 file changed, 1 deletion(-) commit 72ad21075df8a960007fb84b4c97e3ac55010f6a Author: Masahiro Yamada Date: Mon Jun 17 02:48:05 2019 +0900 lib/raid6: refactor unroll rules with pattern rules This Makefile repeats very similar rules. Let's use pattern rules. $(UNROLL) can be replaced with $*. No intended change in behavior. Signed-off-by: Masahiro Yamada lib/raid6/Makefile | 97 +++++++----------------------------------------------- 1 file changed, 11 insertions(+), 86 deletions(-) commit 7747badc3d64b029bd6c2951d2e8335a13a09545 Author: Masahiro Yamada Date: Mon Jun 17 02:48:04 2019 +0900 lib/raid6: remove duplicated CFLAGS_REMOVE_altivec8.o No intended change in behavior. Signed-off-by: Masahiro Yamada lib/raid6/Makefile | 1 - 1 file changed, 1 deletion(-) commit 3a61925e91ba9f0ece1b444eb1aa49caa59e4ae7 Author: Nathan Chancellor Date: Fri Jun 14 09:52:42 2019 -0700 kbuild: Enable -Wuninitialized This helps fine very dodgy behavior through both -Wuninitialized (warning that a variable is always uninitialized) and -Wsometimes-uninitialized (warning that a variable is sometimes uninitialized, like GCC's -Wmaybe-uninitialized). These warnings catch things that GCC doesn't such as: https://lore.kernel.org/lkml/86649ee4-9794-77a3-502c-f4cd10019c36@lca.pw/ We very much want to catch these so turn this warning on so that CI is aware of it. Link: https://github.com/ClangBuiltLinux/linux/issues/381 Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Signed-off-by: Masahiro Yamada scripts/Makefile.extrawarn | 1 - 1 file changed, 1 deletion(-) commit 589834b3a0097a4908f4112eac0ca2feb486fa32 Author: Nathan Chancellor Date: Tue Jun 11 11:43:31 2019 -0700 kbuild: Add -Werror=unknown-warning-option to CLANG_FLAGS In commit ebcc5928c5d9 ("arm64: Silence gcc warnings about arch ABI drift"), the arm64 Makefile added -Wno-psabi to KBUILD_CFLAGS, which is a GCC only option so clang rightfully complains: warning: unknown warning option '-Wno-psabi' [-Wunknown-warning-option] https://clang.llvm.org/docs/DiagnosticsReference.html#wunknown-warning-option However, by default, this is merely a warning so the build happily goes on with a slew of these warnings in the process. Commit c3f0d0bc5b01 ("kbuild, LLVMLinux: Add -Werror to cc-option to support clang") worked around this behavior in cc-option by adding -Werror so that unknown flags cause an error. However, this all happens silently and when an unknown flag is added to the build unconditionally like -Wno-psabi, cc-option will always fail because there is always an unknown flag in the list of flags. This manifested as link time failures in the arm64 libstub because -fno-stack-protector didn't get added to KBUILD_CFLAGS. To avoid these weird cryptic failures in the future, make clang behave like gcc and immediately error when it encounters an unknown flag by adding -Werror=unknown-warning-option to CLANG_FLAGS. This can be added unconditionally for clang because it is supported by at least 3.0.0, according to godbolt [1] and 4.0.0, according to its documentation [2], which is far earlier than we typically support. [1]: https://godbolt.org/z/7F7rm3 [2]: https://releases.llvm.org/4.0.0/tools/clang/docs/DiagnosticsReference.html#wunknown-warning-option Link: https://github.com/ClangBuiltLinux/linux/issues/511 Link: https://github.com/ClangBuiltLinux/linux/issues/517 Suggested-by: Peter Smith Signed-off-by: Nathan Chancellor Tested-by: Nick Desaulniers Signed-off-by: Masahiro Yamada Makefile | 1 + 1 file changed, 1 insertion(+) commit 8c25c0cb5bb4e63170bb7760179ec294a3827694 Author: Russell King Date: Fri Jun 21 15:59:09 2019 +0100 doc: phy: document some PHY_INTERFACE_MODE_xxx settings There seems to be some confusion surrounding three PHY interface modes, specifically 1000BASE-X, 2500BASE-X and SGMII. Add some documentation to phylib detailing precisely what these interface modes refer to. Signed-off-by: Russell King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller Documentation/networking/phy.rst | 45 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) commit 08003d0b63a63bebaccca90e2f1d628dfd66cd4d Author: Qian Cai Date: Thu Jun 20 10:52:40 2019 -0400 inet: fix compilation warnings in fqdir_pre_exit() The linux-next commit "inet: fix various use-after-free in defrags units" [1] introduced compilation warnings, ./include/net/inet_frag.h:117:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration] static void inline fqdir_pre_exit(struct fqdir *fqdir) ^~~~~~ In file included from ./include/net/netns/ipv4.h:10, from ./include/net/net_namespace.h:20, from ./include/linux/netdevice.h:38, from ./include/linux/icmpv6.h:13, from ./include/linux/ipv6.h:86, from ./include/net/ipv6.h:12, from ./include/rdma/ib_verbs.h:51, from ./include/linux/mlx5/device.h:37, from ./include/linux/mlx5/driver.h:51, from drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c:37: [1] https://lore.kernel.org/netdev/20190618180900.88939-3-edumazet@google.com/ Signed-off-by: Qian Cai Signed-off-by: David S. Miller include/net/inet_frag.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c9acece064e3f0042c50162d3405759243225dd6 Author: Rasmus Villemoes Date: Thu Jun 20 13:50:42 2019 +0000 net: dsa: mv88e6xxx: introduce helpers for handling chip->reg_lock This is a no-op that simply moves all locking and unlocking of ->reg_lock into trivial helpers. I did that to be able to easily add some ad hoc instrumentation to those helpers to get some information on contention and hold times of the mutex. Perhaps others want to do something similar at some point, so this frees them from doing the 'sed -i' yoga, and have a much smaller 'git diff' while fiddling. Signed-off-by: Rasmus Villemoes Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 176 ++++++++++++++++---------------- drivers/net/dsa/mv88e6xxx/chip.h | 10 ++ drivers/net/dsa/mv88e6xxx/global1_atu.c | 6 +- drivers/net/dsa/mv88e6xxx/global1_vtu.c | 6 +- drivers/net/dsa/mv88e6xxx/global2.c | 20 ++-- drivers/net/dsa/mv88e6xxx/hwtstamp.c | 28 ++--- drivers/net/dsa/mv88e6xxx/phy.c | 4 +- drivers/net/dsa/mv88e6xxx/ptp.c | 32 +++--- drivers/net/dsa/mv88e6xxx/serdes.c | 24 ++--- 9 files changed, 158 insertions(+), 148 deletions(-) commit e67d4dfc9ff19dbe74b29617cf2592ccc50c3920 Author: Andrey Smirnov Date: Wed Jun 12 01:44:04 2019 -0700 power: supply: Add HWMON compatibility layer Add code implementing HWMON adapter/compatibility layer to allow expositing various sensors present on power supply devices via HWMON subsystem. This is done in order to allow userspace to use single ABI/library(libsensors) to access/manipulate all of the sensors of the system. Signed-off-by: Andrey Smirnov Reviewed-by: Guenter Roeck Tested-by: Chris Healy Cc: Chris Healy Cc: Cory Tusar Cc: Lucas Stach Cc: Fabio Estevam Cc: Guenter Roeck Cc: Sebastian Reichel Cc: linux-kernel@vger.kernel.org Cc: linux-pm@vger.kernel.org Signed-off-by: Sebastian Reichel drivers/power/supply/Kconfig | 14 ++ drivers/power/supply/Makefile | 1 + drivers/power/supply/power_supply_core.c | 7 + drivers/power/supply/power_supply_hwmon.c | 355 ++++++++++++++++++++++++++++++ include/linux/power_supply.h | 13 ++ 5 files changed, 390 insertions(+) commit 8afecaa68df1e94a9d634f1f961533a925f239fc Author: Muchun Song Date: Tue Jun 18 22:33:05 2019 +0800 softirq: Use __this_cpu_write() in takeover_tasklets() The code is executed with interrupts disabled, so it's safe to use __this_cpu_write(). [ tglx: Massaged changelog ] Signed-off-by: Muchun Song Signed-off-by: Thomas Gleixner Cc: joel@joelfernandes.org Cc: rostedt@goodmis.org Cc: frederic@kernel.org Cc: paulmck@linux.vnet.ibm.com Cc: alexander.levin@verizon.com Cc: peterz@infradead.org Link: https://lkml.kernel.org/r/20190618143305.2038-1-smuchun@gmail.com kernel/softirq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 22ee8384dc688cbcb8ac03112ce81c43d55a961b Author: Wolfram Sang Date: Sat Jun 8 12:56:03 2019 +0200 power: supply: sbs-manager: simplify getting the adapter of a client We have a dedicated pointer for that, so use it. Much easier to read and less computation involved. Signed-off-by: Wolfram Sang Reviewed-by: Simon Horman Signed-off-by: Sebastian Reichel drivers/power/supply/sbs-manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bf0e482aefe1dad509f6f2b843bf7461c53ce052 Author: Wolfram Sang Date: Sat Jun 8 12:56:02 2019 +0200 power: supply: rt9455_charger: simplify getting the adapter of a client We have a dedicated pointer for that, so use it. Much easier to read and less computation involved. Signed-off-by: Wolfram Sang Reviewed-by: Simon Horman Signed-off-by: Sebastian Reichel drivers/power/supply/rt9455_charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit df324c606aafa16045542b3129de577d7a4ca3b6 Author: Wolfram Sang Date: Sat Jun 8 12:56:01 2019 +0200 power: supply: rt5033_battery: simplify getting the adapter of a client We have a dedicated pointer for that, so use it. Much easier to read and less computation involved. Signed-off-by: Wolfram Sang Reviewed-by: Simon Horman Signed-off-by: Sebastian Reichel drivers/power/supply/rt5033_battery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dee2f3cf9499848f137cea23dcc13da1a6f921e0 Author: Wolfram Sang Date: Sat Jun 8 12:56:00 2019 +0200 power: supply: max17042_battery: simplify getting the adapter of a client We have a dedicated pointer for that, so use it. Much easier to read and less computation involved. Signed-off-by: Wolfram Sang Reviewed-by: Simon Horman Signed-off-by: Sebastian Reichel drivers/power/supply/max17042_battery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4e9c406dbea8c9b28a7ac38c5fa2bd1d006240be Author: Wolfram Sang Date: Sat Jun 8 12:55:59 2019 +0200 power: supply: max17040_battery: simplify getting the adapter of a client We have a dedicated pointer for that, so use it. Much easier to read and less computation involved. Signed-off-by: Wolfram Sang Reviewed-by: Simon Horman Signed-off-by: Sebastian Reichel drivers/power/supply/max17040_battery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 71d7ffb29b6b9b492b2b14348dabc3c144456788 Author: Wolfram Sang Date: Sat Jun 8 12:55:58 2019 +0200 power: supply: max14656_charger_detector: simplify getting the adapter of a client We have a dedicated pointer for that, so use it. Much easier to read and less computation involved. Signed-off-by: Wolfram Sang Reviewed-by: Simon Horman Signed-off-by: Sebastian Reichel drivers/power/supply/max14656_charger_detector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 124db1f91b00c1076a20d616ee007762323e7fab Author: Wolfram Sang Date: Sat Jun 8 12:55:57 2019 +0200 power: supply: bq25890_charger: simplify getting the adapter of a client We have a dedicated pointer for that, so use it. Much easier to read and less computation involved. Signed-off-by: Wolfram Sang Reviewed-by: Simon Horman Signed-off-by: Sebastian Reichel drivers/power/supply/bq25890_charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c9427be2a9c04e2c56ddcc3c60e5af3a4d67ffc Author: Wolfram Sang Date: Sat Jun 8 12:55:56 2019 +0200 power: supply: bq24257_charger: simplify getting the adapter of a client We have a dedicated pointer for that, so use it. Much easier to read and less computation involved. Signed-off-by: Wolfram Sang Reviewed-by: Simon Horman Signed-off-by: Sebastian Reichel drivers/power/supply/bq24257_charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 37669d9ff5cf116bb9b6b5968386df9aca4e680a Author: Wolfram Sang Date: Sat Jun 8 12:55:55 2019 +0200 power: supply: bq24190_charger: simplify getting the adapter of a client We have a dedicated pointer for that, so use it. Much easier to read and less computation involved. Signed-off-by: Wolfram Sang Reviewed-by: Simon Horman Signed-off-by: Sebastian Reichel drivers/power/supply/bq24190_charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3e5bfb189e1a65df132fd0e3fa00fbb6feec1431 Author: Sameeh Jubran Date: Sun Jun 23 10:11:10 2019 +0300 net: ena: Fix bug where ring allocation backoff stopped too late The current code of create_queues_with_size_backoff() allows the ring size to become as small as ENA_MIN_RING_SIZE/2. This is a bug since we don't want the queue ring to be smaller than ENA_MIN_RING_SIZE In this commit we change the loop's termination condition to look at the queue size of the next iteration instead of that of the current one, so that the minimal queue size again becomes ENA_MIN_RING_SIZE. Fixes: eece4d2ab9d2 ("net: ena: add ethtool function for changing io queue sizes") Signed-off-by: Arthur Kiyanovski Signed-off-by: Sameeh Jubran Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_netdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit caa759323c73676b3e48c8d9c86093c88b4aba97 Author: Nadav Amit Date: Wed Jun 12 23:48:05 2019 -0700 smp: Remove smp_call_function() and on_each_cpu() return values The return value is fixed. Remove it and amend the callers. [ tglx: Fixup arm/bL_switcher and powerpc/rtas ] Signed-off-by: Nadav Amit Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner Cc: Tony Luck Cc: Fenghua Yu Cc: Andrew Morton Link: https://lkml.kernel.org/r/20190613064813.8102-2-namit@vmware.com arch/alpha/kernel/smp.c | 19 +++++-------------- arch/alpha/oprofile/common.c | 6 +++--- arch/arm/common/bL_switcher.c | 6 ++---- arch/ia64/kernel/perfmon.c | 12 ++---------- arch/ia64/kernel/uncached.c | 8 ++++---- arch/powerpc/kernel/rtas.c | 3 +-- arch/x86/lib/cache-smp.c | 3 ++- drivers/char/agp/generic.c | 3 +-- include/linux/smp.h | 7 +++---- kernel/smp.c | 10 +++------- kernel/up.c | 3 +-- 11 files changed, 27 insertions(+), 53 deletions(-) commit a22793c79d6ea0a492ce1a308ec46df52ee9406e Author: Nadav Amit Date: Wed Jun 12 23:48:11 2019 -0700 smp: Do not mark call_function_data as shared cfd_data is marked as shared, but although it hold pointers to shared data structures, it is private per core. Signed-off-by: Nadav Amit Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Rik van Riel Link: https://lkml.kernel.org/r/20190613064813.8102-8-namit@vmware.com kernel/smp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dde3626f815e38bbf96fddd5185038c4b4d395a8 Author: Nadav Amit Date: Wed Jun 12 23:48:13 2019 -0700 x86/apic: Use non-atomic operations when possible Using __clear_bit() and __cpumask_clear_cpu() is more efficient than using their atomic counterparts. Use them when atomicity is not needed, such as when manipulating bitmasks that are on the stack. Signed-off-by: Nadav Amit Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Link: https://lkml.kernel.org/r/20190613064813.8102-10-namit@vmware.com arch/x86/kernel/apic/apic_flat_64.c | 4 ++-- arch/x86/kernel/apic/x2apic_cluster.c | 2 +- arch/x86/kernel/smp.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 90b45399b4418a3542fe096b92840b3bf235e78e Merge: e39956c0d35e 4b972a01a7da Author: Greg Kroah-Hartman Date: Sun Jun 23 13:29:03 2019 +0200 Merge 5.2-rc6 into staging-next We want the fixes and this resolves a merge issue as well. Signed-off-by: Greg Kroah-Hartman commit 13f3b9fdef6c7d9ad069ae617707e5a10a685074 Author: Daniel Baluta Date: Tue Jun 4 20:32:57 2019 +0800 arm64: dts: imx8mm-evk: Enable audio codec wm8524 i.MX8MM has one wm8524 audio codec connected with SAI3 digital audio interface. This patch uses simple-card machine driver in order to enable wm8524 codec. We need to set: * SAI3 pinctrl configuration * codec reset gpio pinctrl configuration * clock hierarchy * codec node * simple-card configuration Signed-off-by: Daniel Baluta Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mm-evk.dts | 55 ++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) commit 8083f3d78825c0ea1948339613914b46105bfd0b Merge: 06b32fdb0309 4b972a01a7da Author: Greg Kroah-Hartman Date: Sun Jun 23 09:23:33 2019 +0200 Merge 5.2-rc6 into char-misc-next We need the char-misc fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 58ee01007c9e00531c1280b2d99b49d29a5e9844 Merge: 4850f26abfca 4b972a01a7da Author: Greg Kroah-Hartman Date: Sun Jun 23 09:21:15 2019 +0200 Merge 5.2-rc6 into usb-next We need the USB fixes in here too. Signed-off-by: Greg Kroah-Hartman commit 11518370b332c0eeaaccef1f5de7877747893f1f Author: Tim Schumacher Date: Tue Jun 18 17:22:14 2019 -0700 Input: iforce - add the Saitek R440 Force Wheel This is added based on the fact that this is an iforce-based device and that the Windows driver for the R440 works for the Logitech WingMan Formula Force after replacing the device/vendor IDs. Signed-off-by: Tim Schumacher Signed-off-by: Dmitry Torokhov drivers/input/joystick/iforce/iforce-main.c | 1 + drivers/input/joystick/iforce/iforce-usb.c | 1 + 2 files changed, 2 insertions(+) commit 21ae38f8558511450a33fb3873bfcd6b8f1e0922 Author: Dmitry Torokhov Date: Fri Aug 10 13:54:02 2018 -0700 Input: iforce - use unaligned accessors, where appropriate Instead of open-coding conversion from/to little-endian, let's use proper accessors. Tested-by: Tim Schumacher Signed-off-by: Dmitry Torokhov drivers/input/joystick/iforce/iforce-main.c | 7 ++++--- drivers/input/joystick/iforce/iforce-packets.c | 12 ++++++++---- 2 files changed, 12 insertions(+), 7 deletions(-) commit 8624dfd10a3bb3ea3d8a959e17f8951f1b03d68d Author: Dmitry Torokhov Date: Fri Aug 10 13:52:31 2018 -0700 Input: iforce - drop couple of temps from transport code Transport initialization code now deals mostly with transport-specific data, so we can drop couple of temporary variables. Tested-by: Tim Schumacher Signed-off-by: Dmitry Torokhov drivers/input/joystick/iforce/iforce-serio.c | 7 ++----- drivers/input/joystick/iforce/iforce-usb.c | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) commit 2178db65cd9c81c790cbf7504e90650750c3b467 Author: Dmitry Torokhov Date: Fri Aug 10 13:48:16 2018 -0700 Input: iforce - drop bus type from iforce structure It is not needed anymore as behavior is controlled by the transport operations set up for given device. Tested-by: Tim Schumacher Signed-off-by: Dmitry Torokhov drivers/input/joystick/iforce/iforce-serio.c | 1 - drivers/input/joystick/iforce/iforce-usb.c | 1 - drivers/input/joystick/iforce/iforce.h | 5 ----- 3 files changed, 7 deletions(-) commit dfad2b17935d70d7dc3830c4986344b3f2669c62 Author: Dmitry Torokhov Date: Fri Aug 10 13:44:52 2018 -0700 Input: iforce - use DMA-safe buffores for USB transfers USB transport has to use cache line-aligned buffers for transfers to avoid DMA issues; serio doe snot have such restrictions. Let's move "data_in" buffer from main driver structure into transport modules and make sure USB requirements are respected. Tested-by: Tim Schumacher Signed-off-by: Dmitry Torokhov drivers/input/joystick/iforce/iforce-serio.c | 10 ++++++---- drivers/input/joystick/iforce/iforce-usb.c | 28 +++++++++++++++++++--------- drivers/input/joystick/iforce/iforce.h | 2 -- 3 files changed, 25 insertions(+), 15 deletions(-) commit 6ac0aec6b0a651d64eef759fddf17d9145b51033 Author: Dmitry Torokhov Date: Thu Aug 9 17:28:35 2018 -0700 Input: iforce - allow callers supply data buffer when fetching device IDs We want to move buffer handling into transport layers as the properties of buffers (DMA-safety, alignment, etc) are different for different transports. To allow this, let's allow caller to specify their own buffers for the results of iforce_get_id_packet() and let transport drivers to figure what buffers they need to use for transfers. Tested-by: Tim Schumacher Signed-off-by: Dmitry Torokhov drivers/input/joystick/iforce/iforce-main.c | 27 +++++++++++++++------------ drivers/input/joystick/iforce/iforce-serio.c | 28 ++++++++++++++++++++-------- drivers/input/joystick/iforce/iforce-usb.c | 11 ++++++----- drivers/input/joystick/iforce/iforce.h | 11 ++++++----- 4 files changed, 47 insertions(+), 30 deletions(-) commit 633354d1910262f2a3262797572ff72da461379e Author: Dmitry Torokhov Date: Fri Aug 10 10:34:13 2018 -0700 Input: iforce - only call iforce_process_packet() if initialized It is excessive to check if device is fully initialized in iforce_process_packet(), as for USB-conected devices we do not start collecting reports until the device is fully initialized. Let's change serio transport code to not call iforce_process_packet() until device initialization is done. Tested-by: Tim Schumacher Signed-off-by: Dmitry Torokhov drivers/input/joystick/iforce/iforce-packets.c | 3 --- drivers/input/joystick/iforce/iforce-serio.c | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) commit 2880dcf9cfc28a3803aee4c964743adbb66b0f1a Author: Dmitry Torokhov Date: Fri Aug 10 10:21:13 2018 -0700 Input: iforce - signal command completion from transport code Signalling command completion from iforce_process_packet() does not make sense, as not all transport use the same data path for both commands and motion data form the device, that is why USB code already has to signal command completion iforce_usb_out(). Let's move signalling completion into individual transport modules. Tested-by: Tim Schumacher Signed-off-by: Dmitry Torokhov drivers/input/joystick/iforce/iforce-packets.c | 2 -- drivers/input/joystick/iforce/iforce-serio.c | 9 ++++++--- 2 files changed, 6 insertions(+), 5 deletions(-) commit d3cc100069f945a392d6cde5ea326bb686418193 Author: Dmitry Torokhov Date: Thu Aug 9 17:50:39 2018 -0700 Input: iforce - do not combine arguments for iforce_process_packet() Current code combines packet type and data length into single argument to iforce_process_packet() and then has to untangle it. It is much clearer to simply use separate arguments. Tested-by: Tim Schumacher Signed-off-by: Dmitry Torokhov drivers/input/joystick/iforce/iforce-packets.c | 9 +++++---- drivers/input/joystick/iforce/iforce-serio.c | 8 ++++---- drivers/input/joystick/iforce/iforce-usb.c | 4 ++-- drivers/input/joystick/iforce/iforce.h | 3 ++- 4 files changed, 13 insertions(+), 11 deletions(-) commit 8a25e05890f155406171e8cb256177275bbf387f Author: Dmitry Torokhov Date: Thu Aug 9 17:41:40 2018 -0700 Input: iforce - factor out hat handling when parsing packets This makes code clearer a bit. Tested-by: Tim Schumacher Signed-off-by: Dmitry Torokhov drivers/input/joystick/iforce/iforce-packets.c | 101 ++++++++++++++----------- 1 file changed, 57 insertions(+), 44 deletions(-) commit 43e61fc77fd1b1ee6c7e4989809e1d6b3fb65ad9 Author: Dmitry Torokhov Date: Thu Aug 9 17:40:39 2018 -0700 Input: iforce - update formatting of switch statements According to our coding style case labels in switch statements should be aligned with the switch keyword. Tested-by: Tim Schumacher Signed-off-by: Dmitry Torokhov drivers/input/joystick/iforce/iforce-ff.c | 18 ++-- drivers/input/joystick/iforce/iforce-main.c | 70 +++++++--------- drivers/input/joystick/iforce/iforce-packets.c | 112 +++++++++++++------------ 3 files changed, 100 insertions(+), 100 deletions(-) commit 4873586278258453bed94ffc04bfdc439197e86b Author: Dmitry Torokhov Date: Thu Aug 9 16:08:15 2018 -0700 Input: iforce - use DMA-safe buffer when getting IDs from USB When working with USB devices we need to use DMA-safe buffers, and iforce->edata is not one. Let's rework the code to allocate temporary buffer (iforce_get_id() is called only during initialization so there is no reason to have permanent buffer) and use it. While at it, let's utilize usb_control_msg() API which simplifies code. Tested-by: Tim Schumacher Signed-off-by: Dmitry Torokhov drivers/input/joystick/iforce/iforce-usb.c | 68 ++++++++++-------------------- 1 file changed, 22 insertions(+), 46 deletions(-) commit 4f99de6d9d57d29b10f132490034aa21b7ba184f Author: Dmitry Torokhov Date: Tue Jul 24 17:32:24 2018 -0700 Input: iforce - split into core and transport modules Now that we have moved enough transport details into separate source files we can change them into transport modules so that they are only loaded when needed. Tested-by: Tim Schumacher Signed-off-by: Dmitry Torokhov drivers/input/joystick/iforce/Kconfig | 8 +++--- drivers/input/joystick/iforce/Makefile | 7 +++--- drivers/input/joystick/iforce/iforce-main.c | 35 ++------------------------ drivers/input/joystick/iforce/iforce-packets.c | 2 ++ drivers/input/joystick/iforce/iforce-serio.c | 7 ++++++ drivers/input/joystick/iforce/iforce-usb.c | 7 ++++++ drivers/input/joystick/iforce/iforce.h | 2 -- 7 files changed, 25 insertions(+), 43 deletions(-) commit 81fd43132684605b21600fa5e27f23034e18dfd3 Author: Dmitry Torokhov Date: Fri Aug 3 16:27:45 2018 -0700 Input: iforce - move transport data into transport modules This moves transport-specific data from main iforce structure into transport modules. Tested-by: Tim Schumacher Signed-off-by: Dmitry Torokhov drivers/input/joystick/iforce/iforce-serio.c | 96 ++++++++++++------- drivers/input/joystick/iforce/iforce-usb.c | 138 ++++++++++++++++----------- drivers/input/joystick/iforce/iforce.h | 14 +-- 3 files changed, 144 insertions(+), 104 deletions(-) commit 501025df2e774ea840276e08d2a0aead606ffa52 Author: Dmitry Torokhov Date: Fri Aug 3 15:34:41 2018 -0700 Input: iforce - add bus type and parent arguments to iforce_init_device() Note that the parent device for the USB-connected controllers is now USB interface instead of USB device. Tested-by: Tim Schumacher Signed-off-by: Dmitry Torokhov drivers/input/joystick/iforce/iforce-main.c | 19 ++++--------------- drivers/input/joystick/iforce/iforce-serio.c | 2 +- drivers/input/joystick/iforce/iforce-usb.c | 2 +- drivers/input/joystick/iforce/iforce.h | 3 ++- 4 files changed, 8 insertions(+), 18 deletions(-) commit 05ca38283afa5ad11de88395cf0b28c192766bc1 Author: Dmitry Torokhov Date: Fri Aug 3 15:26:00 2018 -0700 Input: iforce - introduce start and stop io transport ops Add start_io() and stop_io() transport methods so that core does not have to know the details. Tested-by: Tim Schumacher Signed-off-by: Dmitry Torokhov drivers/input/joystick/iforce/iforce-main.c | 25 ++----------------------- drivers/input/joystick/iforce/iforce-serio.c | 13 +++++++++++++ drivers/input/joystick/iforce/iforce-usb.c | 17 +++++++++++++++++ drivers/input/joystick/iforce/iforce.h | 2 ++ 4 files changed, 34 insertions(+), 23 deletions(-) commit 9381758466f9939d84f6f70097c8883da9639379 Author: Dmitry Torokhov Date: Fri Aug 3 15:23:40 2018 -0700 Input: iforce - move command completion handling to serio code Continue teasing apart protocol-specific bits from core into transport modules. This time move RS232-specific command completion handling from core to iforce-serio module. Tested-by: Tim Schumacher Signed-off-by: Dmitry Torokhov drivers/input/joystick/iforce/iforce-packets.c | 7 ------- drivers/input/joystick/iforce/iforce-serio.c | 12 +++++++++++- 2 files changed, 11 insertions(+), 8 deletions(-) commit 2a1433ff08a1b23e3003483ee2883d327f78db9e Author: Dmitry Torokhov Date: Thu Jul 26 17:49:34 2018 -0700 Input: iforce - move get_id to the transport operations To avoid #ifdef-ing out parts of the code and having conditionals in normal control flow, let's define "get_id" transport method and move implementation into respective transport modules. Tested-by: Tim Schumacher Signed-off-by: Dmitry Torokhov drivers/input/joystick/iforce/iforce-packets.c | 64 -------------------------- drivers/input/joystick/iforce/iforce-serio.c | 17 +++++++ drivers/input/joystick/iforce/iforce-usb.c | 29 ++++++++++++ drivers/input/joystick/iforce/iforce.h | 6 ++- 4 files changed, 51 insertions(+), 65 deletions(-) commit 38d107690df7f0826adb5b53f4e87676859ff0a6 Author: Dmitry Torokhov Date: Thu Jul 26 17:36:36 2018 -0700 Input: iforce - introduce transport ops In order to tease apart the driver into core and transport modules, let's introduce transport operations and make "xmit" the very first one such operation. Tested-by: Tim Schumacher Signed-off-by: Dmitry Torokhov drivers/input/joystick/iforce/iforce-packets.c | 20 ++------------------ drivers/input/joystick/iforce/iforce-serio.c | 9 +++++++-- drivers/input/joystick/iforce/iforce-usb.c | 15 +++++++++++++-- drivers/input/joystick/iforce/iforce.h | 13 +++++++------ 4 files changed, 29 insertions(+), 28 deletions(-) commit f7f3651e0887f536a6854dfcae0c21fc5463b733 Author: Dmitry Torokhov Date: Tue Jul 24 17:18:27 2018 -0700 Input: iforce - remove "being used" silliness The kernel is supposed to handle multiple devices, static flags in packet handling code will never work. Tested-by: Tim Schumacher Signed-off-by: Dmitry Torokhov drivers/input/joystick/iforce/iforce-packets.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit 002cdb95dc398919bd37d3228c677a22c5ca1498 Author: Gustavo A. R. Silva Date: Tue Jun 18 17:17:13 2019 -0700 Input: gpio_keys - use struct_size() in devm_kzalloc() One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct gpio_keys_drvdata { ... struct gpio_button_data data[0]; }; size = sizeof(struct gpio_keys_drvdata) + count * sizeof(struct gpio_button_data); instance = devm_kzalloc(dev, size, GFP_KERNEL); Instead of leaving these open-coded and prone to type mistakes, we can now use the new struct_size() helper: instance = devm_kzalloc(dev, struct_size(instance, data, count), GFP_KERNEL); Notice that, in this case, variable size is not necessary, hence it is removed. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Dmitry Torokhov drivers/input/keyboard/gpio_keys.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 3d4149ec87fdab5006cb94f8ebe4720b1ee7e564 Author: Gustavo A. R. Silva Date: Sat Jun 22 23:33:21 2019 -0700 Input: gpio_keys_polled - use struct_size() in devm_kzalloc() One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct gpio_keys_polled_dev { ... struct gpio_keys_button_data data[0]; }; size = sizeof(struct gpio_keys_polled_dev) + count * sizeof(struct gpio_keys_button_data); instance = devm_kzalloc(dev, size, GFP_KERNEL); Instead of leaving these open-coded and prone to type mistakes, we can now use the new struct_size() helper: instance = devm_kzalloc(dev, struct_size(instance, data, count), GFP_KERNEL); Notice that, in this case, variable size is not necessary, hence it is removed. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Dmitry Torokhov drivers/input/keyboard/gpio_keys_polled.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 06b32fdb030989c45bb9dad685b794bf2395d53a Author: Kees Cook Date: Sat Jun 22 13:18:23 2019 -0700 lkdtm: Check for SMEP clearing protections This adds an x86-specific test for pinned cr4 bits. A successful test will validate pinning and check the ROP-style call-middle-of-function defense, if needed. For example, in the case of native_write_cr4() looking like this: ffffffff8171bce0 : ffffffff8171bce0: 48 8b 35 79 46 f2 00 mov 0xf24679(%rip),%rsi ffffffff8171bce7: 48 09 f7 or %rsi,%rdi ffffffff8171bcea: 0f 22 e7 mov %rdi,%cr4 ... ffffffff8171bd5a: c3 retq The UNSET_SMEP test will jump to ffffffff8171bcea (the mov to cr4) instead of ffffffff8171bce0 (native_write_cr4() entry) to simulate a direct-call bypass attempt. Expected successful results: # echo UNSET_SMEP > /sys/kernel/debug/provoke-crash/DIRECT # dmesg [ 79.594433] lkdtm: Performing direct entry UNSET_SMEP [ 79.596459] lkdtm: trying to clear SMEP normally [ 79.598406] lkdtm: ok: SMEP did not get cleared [ 79.599981] lkdtm: trying to clear SMEP with call gadget [ 79.601810] ------------[ cut here ]------------ [ 79.603421] Attempt to unpin cr4 bits: 100000; bypass attack?! ... [ 79.650170] ---[ end trace 2452ca0f6126242e ]--- [ 79.650937] lkdtm: ok: SMEP removal was reverted Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/misc/lkdtm/bugs.c | 66 ++++++++++++++++++++++++++++++++++++++++++++++ drivers/misc/lkdtm/core.c | 1 + drivers/misc/lkdtm/lkdtm.h | 1 + 3 files changed, 68 insertions(+) commit 65bbdd49b4722a09901469e57497850311c017dc Author: Colin Ian King Date: Fri Jun 14 10:43:11 2019 +0100 lkdtm: remove redundant initialization of ret The variable ret is being initialized with the value -EINVAL however this value is never read and ret is being re-assigned later on. Hence the initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Acked-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/misc/lkdtm/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dfa84bb99285b4335e5b2a23b772991362e47ee6 Author: Florian Fainelli Date: Tue May 28 16:01:33 2019 -0700 ARM: dts: BCM5301X: Fix most DTC W=1 warnings Fix the bulk of the unit_address_vs_reg warnings and unnecessary \#address-cells/#size-cells without "ranges" or child "reg" property Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dts | 4 +--- arch/arm/boot/dts/bcm4708-asus-rt-ac68u.dts | 4 +--- arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts | 4 +--- arch/arm/boot/dts/bcm4708-linksys-ea6300-v1.dts | 4 +--- arch/arm/boot/dts/bcm4708-linksys-ea6500-v2.dts | 4 +--- arch/arm/boot/dts/bcm4708-luxul-xap-1510.dts | 4 +--- arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts | 4 +--- arch/arm/boot/dts/bcm4708-netgear-r6250.dts | 2 -- arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts | 4 +--- arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts | 4 +--- arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts | 4 +--- arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts | 4 +--- arch/arm/boot/dts/bcm47081-buffalo-wzr-900dhp.dts | 4 +--- arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts | 4 +--- arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts | 4 +--- arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts | 4 +--- arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts | 4 +--- arch/arm/boot/dts/bcm47094-linksys-panamera.dts | 4 +--- arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts | 4 +--- arch/arm/boot/dts/bcm47094-luxul-xap-1610.dts | 4 +--- arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts | 4 +--- arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts | 4 +--- arch/arm/boot/dts/bcm47094-luxul-xwr-3150-v1.dts | 4 +--- arch/arm/boot/dts/bcm47094-netgear-r8500.dts | 4 +--- arch/arm/boot/dts/bcm47094-phicomm-k3.dts | 4 +--- arch/arm/boot/dts/bcm5301x.dtsi | 10 ++++------ arch/arm/boot/dts/bcm953012er.dts | 4 +--- arch/arm/boot/dts/bcm953012k.dts | 2 +- 28 files changed, 30 insertions(+), 84 deletions(-) commit 875e2f5faba03dd9eebe82d720f2deed86a28cfd Author: Florian Fainelli Date: Tue May 28 16:01:34 2019 -0700 ARM: dts: NSP: Fix the bulk of W=1 DTC warnings Fix the bulk of the unit_address_vs_reg warnings and unnecessary \#address-cells/#size-cells without "ranges" or child "reg" property Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm-nsp.dtsi | 9 +++------ arch/arm/boot/dts/bcm958522er.dts | 2 +- arch/arm/boot/dts/bcm958525er.dts | 2 +- arch/arm/boot/dts/bcm958525xmc.dts | 2 +- arch/arm/boot/dts/bcm958622hr.dts | 2 +- arch/arm/boot/dts/bcm958623hr.dts | 2 +- arch/arm/boot/dts/bcm958625hr.dts | 2 +- arch/arm/boot/dts/bcm958625k.dts | 2 +- arch/arm/boot/dts/bcm988312hr.dts | 2 +- 9 files changed, 11 insertions(+), 14 deletions(-) commit f6bf17291d8fdcd4b9db2b1136f2a521650693e9 Author: Florian Fainelli Date: Tue May 28 16:01:32 2019 -0700 ARM: dts: BCM63xx: Fix DTC W=1 warnings Fix the bulk of the unit_address_vs_reg warnings and unnecessary \#address-cells/#size-cells without "ranges" or child "reg" property Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm63138.dtsi | 9 +++------ arch/arm/boot/dts/bcm963138dvt.dts | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) commit bc3b68886c90ee4f121063e6308a5dca7043a2b2 Author: Florian Fainelli Date: Tue May 28 16:01:31 2019 -0700 ARM: dts: BCM53573: Fix DTC W=1 warnings Fix the the unit_address_vs_reg warnings and unnecessary \#address-cells/#size-cells without "ranges" or child "reg" property warnings. Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm47189-luxul-xap-1440.dts | 4 +--- arch/arm/boot/dts/bcm47189-luxul-xap-810.dts | 4 +--- arch/arm/boot/dts/bcm47189-tenda-ac9.dts | 4 +--- arch/arm/boot/dts/bcm53573.dtsi | 2 +- arch/arm/boot/dts/bcm947189acdbmr.dts | 4 +--- 5 files changed, 5 insertions(+), 13 deletions(-) commit c8159a6be8019644f8f32b4f4b23a69f8fe703d4 Author: Florian Fainelli Date: Tue May 28 16:01:30 2019 -0700 ARM: dts: bcm-mobile: Fix most DTC W=1 warnings Fix the bulk of the unit_address_vs_reg warnings and unnecessary \#address-cells/#size-cells without "ranges" or child "reg" property Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm11351.dtsi | 12 ++++++------ arch/arm/boot/dts/bcm21664-garnet.dts | 2 +- arch/arm/boot/dts/bcm21664.dtsi | 10 +++++----- arch/arm/boot/dts/bcm23550-sparrow.dts | 2 +- arch/arm/boot/dts/bcm23550.dtsi | 8 ++++---- arch/arm/boot/dts/bcm28155-ap.dts | 2 +- 6 files changed, 18 insertions(+), 18 deletions(-) commit c7b23bcb9e8217f093329b7c8bf972c76a397e9c Author: Florian Fainelli Date: Tue May 28 16:01:29 2019 -0700 ARM: dts: Cygnus: Fix most DTC W=1 warnings Fix the bulk of the unit_address_vs_reg warnings and unnecessary \#address-cells/#size-cells without "ranges" or child "reg" property Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm-cygnus-clock.dtsi | 12 ++++++------ arch/arm/boot/dts/bcm-cygnus.dtsi | 6 +++--- arch/arm/boot/dts/bcm911360_entphn.dts | 2 -- 3 files changed, 9 insertions(+), 11 deletions(-) commit 4cf2b6abaf2e50c814f4cf79fe3fb15b44d207f5 Author: Florian Fainelli Date: Tue May 28 16:01:28 2019 -0700 ARM: dts: Fix BCM7445 DTC warnings Fixes a number of unit_address_vs_reg warnings: DTC arch/arm/boot/dts/bcm7445-bcm97445svmb.dtb arch/arm/boot/dts/bcm7445.dtsi:66.6-225.4: Warning (unit_address_vs_reg): /rdb: node has a reg or ranges property, but no unit name arch/arm/boot/dts/bcm7445.dtsi:227.21-298.4: Warning (unit_address_vs_reg): /memory_controllers: node has a reg or ranges property, but no unit name arch/arm/boot/dts/bcm7445-bcm97445svmb.dts:9.9-14.4: Warning (unit_address_vs_reg): /memory: node has a reg or ranges property, but no unit name arch/arm/boot/dts/bcm7445.dtsi:255.10-275.5: Warning (simple_bus_reg): /memory_controllers/memc@1: simple-bus unit address format error, expected "80000" arch/arm/boot/dts/bcm7445.dtsi:277.10-297.5: Warning (simple_bus_reg): /memory_controllers/memc@2: simple-bus unit address format error, expected "100000" Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm7445-bcm97445svmb.dts | 2 +- arch/arm/boot/dts/bcm7445.dtsi | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) commit 0ad4ca81bc2f16d27f7538c67331015968ca78f5 Merge: e8bd76dccd79 cbbe88333062 Author: Florian Fainelli Date: Mon Jun 3 11:59:51 2019 -0700 Merge tag 'tags/bcm2835-dt-next-2019-06-01' into devicetree/next This pull requests enables DMA support for the main SPI controller on all Raspberry Pis. Signed-off-by: Florian Fainelli commit cbbe883330623ba88019f8bce48af59addf7237c Author: Lukas Wunner Date: Thu May 9 19:03:00 2019 +0200 ARM: bcm283x: Enable DMA support for SPI controller Without this, the driver for the BCM2835 SPI controller uses interrupt mode instead of DMA mode, incurring a significant performance penalty. The Foundation's device tree has had these attributes for years, but for some reason they were never upstreamed. They were originally contributed by Noralf Trønnes and Martin Sperl: https://github.com/raspberrypi/linux/commit/25f3e064afc8 https://github.com/raspberrypi/linux/commit/e0edb52b47e6 The DREQ numbers 6 and 7 are documented in section 4.2.1.3 of: https://www.raspberrypi.org/app/uploads/2012/02/BCM2835-ARM-Peripherals.pdf Tested-by: Nicolas Saenz Julienne Signed-off-by: Lukas Wunner Reviewed-by: Eric Anholt Reviewed-by: Martin Sperl Signed-off-by: Stefan Wahren Cc: Martin Sperl Cc: Noralf Trønnes arch/arm/boot/dts/bcm283x.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 137e4e1ab7b3145364b01d2a260ca46672765865 Author: Colin Ian King Date: Thu Jun 20 14:27:51 2019 +0100 hinic: fix dereference of pointer hwdev before it is null checked Currently pointer hwdev is dereferenced when assigning hwif before hwdev is null checked. Fix this by only derefencing hwdev after the null check. Addresses-Coverity: ("Dereference before null check") Fixes: 4fdc51bb4e92 ("hinic: add support for rss parameters with ethtool") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/huawei/hinic/hinic_port.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) commit 969b15b002628ca4bb7fa4ee9c2e07bc545d0477 Merge: b272a0ad7301 7ef6f6f8d237 Author: David S. Miller Date: Sat Jun 22 16:58:24 2019 -0700 Merge branch 'net-mediatek-Add-MT7621-TRGMII-mode-support' René van Dorst says: ==================== net: mediatek: Add MT7621 TRGMII mode support Like many other mediatek SOCs, the MT7621 SOC and the internal MT7530 switch both supports TRGMII mode. MT7621 TRGMII speed is fix 1200MBit. v1->v2: - Fix breakage on non MT7621 SOC - Support 25MHz and 40MHz XTAL as MT7530 clocksource ==================== Tested-by: "Frank Wunderlich" Acked-by: Sean Wang Signed-off-by: David S. Miller commit 7ef6f6f8d237fa6724108b57d9706cb5069688e4 Author: René van Dorst Date: Thu Jun 20 14:21:55 2019 +0200 net: dsa: mt7530: Add MT7621 TRGMII mode support This patch add support TRGMII mode for MT7621 internal MT7530 switch. MT7621 TRGMII has only one fix speed mode of 1200MBit. Also adding support for mt7530 25MHz and 40MHz crystal clocksource. Values are based on Banana Pi R2 bsp [1]. Don't change MT7623 registers on a MT7621 device. [1] https://github.com/BPI-SINOVOIP/BPI-R2-bsp/blob/master/linux-mt/drivers/net/ethernet/mediatek/gsw_mt7623.c#L769 Signed-off-by: René van Dorst Tested-by: Frank Wunderlich Signed-off-by: David S. Miller drivers/net/dsa/mt7530.c | 46 ++++++++++++++++++++++++++++++++++++---------- drivers/net/dsa/mt7530.h | 4 ++++ 2 files changed, 40 insertions(+), 10 deletions(-) commit 8efaa653a8a540c2cc4b3a7bb4459ec5ea27f1fd Author: René van Dorst Date: Thu Jun 20 14:21:54 2019 +0200 net: ethernet: mediatek: Add MT7621 TRGMII mode support MT7621 SOC also supports TRGMII. TRGMII speed is 1200MBit. Signed-off-by: René van Dorst Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 38 ++++++++++++++++++++++++++--- drivers/net/ethernet/mediatek/mtk_eth_soc.h | 11 +++++++++ 2 files changed, 45 insertions(+), 4 deletions(-) commit b272a0ad730103e84fb735fd0a8cc050cdf7f77c Author: Li RongQing Date: Thu Jun 20 19:24:40 2019 +0800 netns: restore ops before calling ops_exit_list ops has been iterated to first element when call pre_exit, and it needs to restore from save_ops, not save ops to save_ops Fixes: d7d99872c144 ("netns: add pre_exit method to struct pernet_operations") Signed-off-by: Li RongQing Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller net/core/net_namespace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9eee3b4913d734b2c2496ddeea625d5b56583757 Author: Ido Schimmel Date: Thu Jun 20 12:10:21 2019 +0300 ipv6: Error when route does not have any valid nexthops When user space sends invalid information in RTA_MULTIPATH, the nexthop list in ip6_route_multipath_add() is empty and 'rt_notif' is set to NULL. The code that emits the in-kernel notifications does not check for this condition, which results in a NULL pointer dereference [1]. Fix this by bailing earlier in the function if the parsed nexthop list is empty. This is consistent with the corresponding IPv4 code. v2: * Check if parsed nexthop list is empty and bail with extack set [1] kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 9190 Comm: syz-executor149 Not tainted 5.2.0-rc5+ #38 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:call_fib6_multipath_entry_notifiers+0xd1/0x1a0 net/ipv6/ip6_fib.c:396 Code: 8b b5 30 ff ff ff 48 c7 85 68 ff ff ff 00 00 00 00 48 c7 85 70 ff ff ff 00 00 00 00 89 45 88 4c 89 e0 48 c1 e8 03 4c 89 65 80 <42> 80 3c 28 00 0f 85 9a 00 00 00 48 b8 00 00 00 00 00 fc ff df 4d RSP: 0018:ffff88809788f2c0 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 1ffff11012f11e59 RCX: 00000000ffffffff RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffff88809788f390 R08: ffff88809788f8c0 R09: 000000000000000c R10: ffff88809788f5d8 R11: ffff88809788f527 R12: 0000000000000000 R13: dffffc0000000000 R14: ffff88809788f8c0 R15: ffffffff89541d80 FS: 000055555632c880(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020000080 CR3: 000000009ba7c000 CR4: 00000000001406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ip6_route_multipath_add+0xc55/0x1490 net/ipv6/route.c:5094 inet6_rtm_newroute+0xed/0x180 net/ipv6/route.c:5208 rtnetlink_rcv_msg+0x463/0xb00 net/core/rtnetlink.c:5219 netlink_rcv_skb+0x177/0x450 net/netlink/af_netlink.c:2477 rtnetlink_rcv+0x1d/0x30 net/core/rtnetlink.c:5237 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0x531/0x710 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x8ae/0xd70 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:665 ___sys_sendmsg+0x803/0x920 net/socket.c:2286 __sys_sendmsg+0x105/0x1d0 net/socket.c:2324 __do_sys_sendmsg net/socket.c:2333 [inline] __se_sys_sendmsg net/socket.c:2331 [inline] __x64_sys_sendmsg+0x78/0xb0 net/socket.c:2331 do_syscall_64+0xfd/0x680 arch/x86/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4401f9 Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 fb 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007ffc09fd0028 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 00000000004401f9 RDX: 0000000000000000 RSI: 0000000020000080 RDI: 0000000000000003 RBP: 00000000006ca018 R08: 0000000000000000 R09: 00000000004002c8 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a80 R13: 0000000000401b10 R14: 0000000000000000 R15: 0000000000000000 Reported-by: syzbot+382566d339d52cd1a204@syzkaller.appspotmail.com Fixes: ebee3cad835f ("ipv6: Add IPv6 multipath notifications for add / replace") Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Reviewed-by: David Ahern Signed-off-by: David S. Miller net/ipv6/route.c | 6 ++++++ 1 file changed, 6 insertions(+) commit de467c116ca2ffc141d2abf8aef18b360fb19b21 Author: Greg Kroah-Hartman Date: Thu Jun 20 09:31:06 2019 +0200 fjes: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: "David S. Miller" Cc: Yangtao Li Cc: netdev@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: David S. Miller drivers/net/fjes/fjes_debugfs.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) commit 438ac88009bcb10f9ced07fbb4b32d5377ee936b Author: Ard Biesheuvel Date: Wed Jun 19 23:46:28 2019 +0200 net: fastopen: robustness and endianness fixes for SipHash Some changes to the TCP fastopen code to make it more robust against future changes in the choice of key/cookie size, etc. - Instead of keeping the SipHash key in an untyped u8[] buffer and casting it to the right type upon use, use the correct type directly. This ensures that the key will appear at the correct alignment if we ever change the way these data structures are allocated. (Currently, they are only allocated via kmalloc so they always appear at the correct alignment) - Use DIV_ROUND_UP when sizing the u64[] array to hold the cookie, so it is always of sufficient size, even if TCP_FASTOPEN_COOKIE_MAX is no longer a multiple of 8. - Drop the 'len' parameter from the tcp_fastopen_reset_cipher() function, which is no longer used. - Add endian swabbing when setting the keys and calculating the hash, to ensure that cookie values are the same for a given key and source/destination address pair regardless of the endianness of the server. Note that none of these are functional changes wrt the current state of the code, with the exception of the swabbing, which only affects big endian systems. Signed-off-by: Ard Biesheuvel Signed-off-by: David S. Miller include/linux/tcp.h | 2 +- include/net/tcp.h | 8 ++++---- net/ipv4/sysctl_net_ipv4.c | 3 +-- net/ipv4/tcp.c | 3 +-- net/ipv4/tcp_fastopen.c | 35 +++++++++++++++++------------------ 5 files changed, 24 insertions(+), 27 deletions(-) commit a9314773a91a1d3b36270085246a6715a326ff00 Author: Nathan Huckleberry Date: Fri Jun 14 11:16:04 2019 -0700 timer_list: Guard procfs specific code With CONFIG_PROC_FS=n the following warning is emitted: kernel/time/timer_list.c:361:36: warning: unused variable 'timer_list_sops' [-Wunused-const-variable] static const struct seq_operations timer_list_sops = { Add #ifdef guard around procfs specific code. Signed-off-by: Nathan Huckleberry Signed-off-by: Thomas Gleixner Reviewed-by: Nick Desaulniers Cc: john.stultz@linaro.org Cc: sboyd@kernel.org Cc: clang-built-linux@googlegroups.com Link: https://github.com/ClangBuiltLinux/linux/issues/534 Link: https://lkml.kernel.org/r/20190614181604.112297-1-nhuck@google.com kernel/time/timer_list.c | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) commit 22ca962288c0a1c9729e8e440b9bb9ad05df6db6 Author: Vincenzo Frascino Date: Fri Jun 21 10:52:51 2019 +0100 x86/vdso: Add clock_gettime64() entry point Linux 5.1 gained the new clock_gettime64() syscall to address the Y2038 problem on 32bit systems. The x86 VDSO is missing support for this variant of clock_gettime(). Update the x86 specific vDSO library accordingly so it exposes the new time getter. [ tglx: Massaged changelog ] Signed-off-by: Vincenzo Frascino Signed-off-by: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mips@vger.kernel.org Cc: linux-kselftest@vger.kernel.org Cc: Catalin Marinas Cc: Will Deacon Cc: Arnd Bergmann Cc: Russell King Cc: Ralf Baechle Cc: Paul Burton Cc: Daniel Lezcano Cc: Mark Salyzyn Cc: Peter Collingbourne Cc: Shuah Khan Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Rasmus Villemoes Cc: Huw Davies Cc: Shijith Thotton Cc: Andre Przywara Link: https://lkml.kernel.org/r/20190621095252.32307-25-vincenzo.frascino@arm.com arch/x86/entry/vdso/vclock_gettime.c | 8 ++++++++ arch/x86/entry/vdso/vdso32/vdso32.lds.S | 1 + 2 files changed, 9 insertions(+) commit f66501dc53e72079045a6a17e023b41316ede220 Author: Vincenzo Frascino Date: Fri Jun 21 10:52:50 2019 +0100 x86/vdso: Add clock_getres() entry point The generic vDSO library provides an implementation of clock_getres() that can be leveraged by each architecture. Add the clock_getres() VDSO entry point on x86. [ tglx: Massaged changelog and cleaned up the function signature formatting ] Signed-off-by: Vincenzo Frascino Signed-off-by: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mips@vger.kernel.org Cc: linux-kselftest@vger.kernel.org Cc: Catalin Marinas Cc: Will Deacon Cc: Arnd Bergmann Cc: Russell King Cc: Ralf Baechle Cc: Paul Burton Cc: Daniel Lezcano Cc: Mark Salyzyn Cc: Peter Collingbourne Cc: Shuah Khan Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Rasmus Villemoes Cc: Huw Davies Cc: Shijith Thotton Cc: Andre Przywara Link: https://lkml.kernel.org/r/20190621095252.32307-24-vincenzo.frascino@arm.com arch/x86/entry/vdso/vclock_gettime.c | 17 +++++++++++++++++ arch/x86/entry/vdso/vdso.lds.S | 2 ++ arch/x86/entry/vdso/vdso32/vdso32.lds.S | 1 + arch/x86/include/asm/vdso/gettimeofday.h | 31 +++++++++++++++++++++++++++++++ 4 files changed, 51 insertions(+) commit 7ac8707479886c75f353bfb6a8273f423cfccb23 Author: Vincenzo Frascino Date: Fri Jun 21 10:52:49 2019 +0100 x86/vdso: Switch to generic vDSO implementation The x86 vDSO library requires some adaptations to take advantage of the newly introduced generic vDSO library. Introduce the following changes: - Modification of vdso.c to be compliant with the common vdso datapage - Use of lib/vdso for gettimeofday [ tglx: Massaged changelog and cleaned up the function signature formatting ] Signed-off-by: Vincenzo Frascino Signed-off-by: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mips@vger.kernel.org Cc: linux-kselftest@vger.kernel.org Cc: Catalin Marinas Cc: Will Deacon Cc: Arnd Bergmann Cc: Russell King Cc: Ralf Baechle Cc: Paul Burton Cc: Daniel Lezcano Cc: Mark Salyzyn Cc: Peter Collingbourne Cc: Shuah Khan Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Rasmus Villemoes Cc: Huw Davies Cc: Shijith Thotton Cc: Andre Przywara Link: https://lkml.kernel.org/r/20190621095252.32307-23-vincenzo.frascino@arm.com arch/x86/Kconfig | 3 + arch/x86/entry/vdso/Makefile | 9 ++ arch/x86/entry/vdso/vclock_gettime.c | 245 ++++--------------------------- arch/x86/entry/vdso/vdsox32.lds.S | 1 + arch/x86/entry/vsyscall/Makefile | 2 - arch/x86/entry/vsyscall/vsyscall_gtod.c | 83 ----------- arch/x86/include/asm/pvclock.h | 2 +- arch/x86/include/asm/vdso/gettimeofday.h | 191 ++++++++++++++++++++++++ arch/x86/include/asm/vdso/vsyscall.h | 44 ++++++ arch/x86/include/asm/vgtod.h | 75 +--------- arch/x86/include/asm/vvar.h | 7 +- arch/x86/kernel/pvclock.c | 1 + 12 files changed, 284 insertions(+), 379 deletions(-) commit bfe801ebe84f42b4666d3f0adde90f504d56e35b Author: Vincenzo Frascino Date: Fri Jun 21 10:52:42 2019 +0100 arm64: vdso: Enable vDSO compat support Add vDSO compat support to the arm64 build system. Signed-off-by: Vincenzo Frascino Signed-off-by: Thomas Gleixner Tested-by: Shijith Thotton Tested-by: Andre Przywara Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mips@vger.kernel.org Cc: linux-kselftest@vger.kernel.org Cc: Catalin Marinas Cc: Will Deacon Cc: Arnd Bergmann Cc: Russell King Cc: Ralf Baechle Cc: Paul Burton Cc: Daniel Lezcano Cc: Mark Salyzyn Cc: Peter Collingbourne Cc: Shuah Khan Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Rasmus Villemoes Cc: Huw Davies Link: https://lkml.kernel.org/r/20190621095252.32307-16-vincenzo.frascino@arm.com arch/arm64/Kconfig | 1 + arch/arm64/Makefile | 23 +++++++++++++++++++++-- arch/arm64/kernel/Makefile | 6 +++++- 3 files changed, 27 insertions(+), 3 deletions(-) commit f01703b3d2e6faf7233cedf78f1e2d31b39fa90f Author: Vincenzo Frascino Date: Fri Jun 21 10:52:41 2019 +0100 arm64: compat: Get sigreturn trampolines from vDSO When the compat vDSO is enabled, the sigreturn trampolines are not anymore available through [sigpage] but through [vdso]. Add the relevant code the enable the feature. Signed-off-by: Vincenzo Frascino Signed-off-by: Thomas Gleixner Tested-by: Shijith Thotton Tested-by: Andre Przywara Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mips@vger.kernel.org Cc: linux-kselftest@vger.kernel.org Cc: Catalin Marinas Cc: Will Deacon Cc: Arnd Bergmann Cc: Russell King Cc: Ralf Baechle Cc: Paul Burton Cc: Daniel Lezcano Cc: Mark Salyzyn Cc: Peter Collingbourne Cc: Shuah Khan Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Rasmus Villemoes Cc: Huw Davies Link: https://lkml.kernel.org/r/20190621095252.32307-15-vincenzo.frascino@arm.com arch/arm64/include/asm/vdso.h | 3 +++ arch/arm64/kernel/signal32.c | 26 ++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) commit 1e3f17f55aec6510f88ff65dcbaae13435af0ba6 Author: Vincenzo Frascino Date: Fri Jun 21 10:52:40 2019 +0100 arm64: elf: VDSO code page discovery Like in normal vDSOs, when compat vDSOs are enabled the auxiliary vector symbol AT_SYSINFO_EHDR needs to point to the address of the vDSO code, to allow the dynamic linker to find it. Add the necessary code to the elf arm64 module to make this possible. Signed-off-by: Vincenzo Frascino Signed-off-by: Thomas Gleixner Tested-by: Shijith Thotton Tested-by: Andre Przywara Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mips@vger.kernel.org Cc: linux-kselftest@vger.kernel.org Cc: Catalin Marinas Cc: Will Deacon Cc: Arnd Bergmann Cc: Russell King Cc: Ralf Baechle Cc: Paul Burton Cc: Daniel Lezcano Cc: Mark Salyzyn Cc: Peter Collingbourne Cc: Shuah Khan Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Rasmus Villemoes Cc: Huw Davies Link: https://lkml.kernel.org/r/20190621095252.32307-14-vincenzo.frascino@arm.com arch/arm64/include/asm/elf.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 7c1deeeb01308426a27a70d5a506aa5fae66dc62 Author: Vincenzo Frascino Date: Fri Jun 21 10:52:39 2019 +0100 arm64: compat: VDSO setup for compat layer If CONFIG_GENERIC_COMPAT_VDSO is enabled, compat vDSO is installed in a compat (32 bit) process instead of sigpage. Add the necessary code to setup the vDSO required pages. Signed-off-by: Vincenzo Frascino Signed-off-by: Thomas Gleixner Tested-by: Shijith Thotton Tested-by: Andre Przywara Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mips@vger.kernel.org Cc: linux-kselftest@vger.kernel.org Cc: Catalin Marinas Cc: Will Deacon Cc: Arnd Bergmann Cc: Russell King Cc: Ralf Baechle Cc: Paul Burton Cc: Daniel Lezcano Cc: Mark Salyzyn Cc: Peter Collingbourne Cc: Shuah Khan Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Rasmus Villemoes Cc: Huw Davies Link: https://lkml.kernel.org/r/20190621095252.32307-13-vincenzo.frascino@arm.com arch/arm64/kernel/vdso.c | 90 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 88 insertions(+), 2 deletions(-) commit c7aa2d71020d74d4c673922e295b07f6adafd6e0 Author: Vincenzo Frascino Date: Fri Jun 21 10:52:38 2019 +0100 arm64: vdso: Refactor vDSO code Most of the code for initializing the vDSOs in arm64 and compat will be shared, hence refactoring of the current code is required to avoid duplication and to simplify maintainability. No functional change. Signed-off-by: Vincenzo Frascino Signed-off-by: Thomas Gleixner Tested-by: Shijith Thotton Tested-by: Andre Przywara Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mips@vger.kernel.org Cc: linux-kselftest@vger.kernel.org Cc: Catalin Marinas Cc: Will Deacon Cc: Arnd Bergmann Cc: Russell King Cc: Ralf Baechle Cc: Paul Burton Cc: Daniel Lezcano Cc: Mark Salyzyn Cc: Peter Collingbourne Cc: Shuah Khan Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Rasmus Villemoes Cc: Huw Davies Link: https://lkml.kernel.org/r/20190621095252.32307-12-vincenzo.frascino@arm.com arch/arm64/kernel/vdso.c | 215 +++++++++++++++++++++++++++++++---------------- 1 file changed, 144 insertions(+), 71 deletions(-) commit a7f71a2c8903f8599312f75233946287c558d9f6 Author: Vincenzo Frascino Date: Fri Jun 21 10:52:37 2019 +0100 arm64: compat: Add vDSO Provide the arm64 compat (AArch32) vDSO in kernel/vdso32 in a similar way to what happens in kernel/vdso. The compat vDSO leverages on an adaptation of the arm architecture code with few changes: - Use of lib/vdso for gettimeofday - Implement a syscall based fallback - Introduce clock_getres() for the compat library - Implement trampolines - Implement elf note To build the compat vDSO a 32 bit compiler is required and needs to be specified via CONFIG_CROSS_COMPILE_COMPAT_VDSO. The code is not yet enabled as other prerequisites are missing. Signed-off-by: Vincenzo Frascino Signed-off-by: Thomas Gleixner Tested-by: Shijith Thotton Tested-by: Andre Przywara Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mips@vger.kernel.org Cc: linux-kselftest@vger.kernel.org Cc: Catalin Marinas Cc: Will Deacon Cc: Arnd Bergmann Cc: Russell King Cc: Ralf Baechle Cc: Paul Burton Cc: Daniel Lezcano Cc: Mark Salyzyn Cc: Peter Collingbourne Cc: Shuah Khan Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Rasmus Villemoes Cc: Huw Davies Link: https://lkml.kernel.org/r/20190621095252.32307-11-vincenzo.frascino@arm.com arch/arm64/include/asm/vdso/compat_barrier.h | 51 ++++++ arch/arm64/include/asm/vdso/compat_gettimeofday.h | 108 +++++++++++++ arch/arm64/kernel/vdso32/.gitignore | 2 + arch/arm64/kernel/vdso32/Makefile | 186 ++++++++++++++++++++++ arch/arm64/kernel/vdso32/note.c | 15 ++ arch/arm64/kernel/vdso32/sigreturn.S | 62 ++++++++ arch/arm64/kernel/vdso32/vdso.S | 19 +++ arch/arm64/kernel/vdso32/vdso.lds.S | 82 ++++++++++ arch/arm64/kernel/vdso32/vgettimeofday.c | 59 +++++++ 9 files changed, 584 insertions(+) commit f14d8025d263f3c8236775df724a7c1f14e0dc94 Author: Vincenzo Frascino Date: Fri Jun 21 10:52:35 2019 +0100 arm64: compat: Generate asm offsets for signals Update asm-offsets for arm64 to generate the correct offsets for compat signals. They will be useful for the implementation of the compat sigreturn trampolines in vDSO context. Signed-off-by: Vincenzo Frascino Signed-off-by: Thomas Gleixner Tested-by: Shijith Thotton Tested-by: Andre Przywara Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mips@vger.kernel.org Cc: linux-kselftest@vger.kernel.org Cc: Catalin Marinas Cc: Will Deacon Cc: Arnd Bergmann Cc: Russell King Cc: Ralf Baechle Cc: Paul Burton Cc: Daniel Lezcano Cc: Mark Salyzyn Cc: Peter Collingbourne Cc: Shuah Khan Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Rasmus Villemoes Cc: Huw Davies Link: https://lkml.kernel.org/r/20190621095252.32307-9-vincenzo.frascino@arm.com arch/arm64/kernel/asm-offsets.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 206c0dfa3c55bf31f9d78da3d7384b9343745153 Author: Vincenzo Frascino Date: Fri Jun 21 10:52:34 2019 +0100 arm64: compat: Expose signal related structures The compat signal data structures are required as part of the compat vDSO implementation in order to provide the unwinding information for the sigreturn trampolines. Expose these data structures as part of signal32.h. Signed-off-by: Vincenzo Frascino Signed-off-by: Thomas Gleixner Tested-by: Shijith Thotton Tested-by: Andre Przywara Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mips@vger.kernel.org Cc: linux-kselftest@vger.kernel.org Cc: Catalin Marinas Cc: Will Deacon Cc: Arnd Bergmann Cc: Russell King Cc: Ralf Baechle Cc: Paul Burton Cc: Daniel Lezcano Cc: Mark Salyzyn Cc: Peter Collingbourne Cc: Shuah Khan Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Rasmus Villemoes Cc: Huw Davies Link: https://lkml.kernel.org/r/20190621095252.32307-8-vincenzo.frascino@arm.com arch/arm64/include/asm/signal32.h | 46 +++++++++++++++++++++++++++++++++++++++ arch/arm64/kernel/signal32.c | 46 --------------------------------------- 2 files changed, 46 insertions(+), 46 deletions(-) commit 53c489e1dfeb6092b9fb14eb73c2cbcb07224798 Author: Vincenzo Frascino Date: Fri Jun 21 10:52:33 2019 +0100 arm64: compat: Add missing syscall numbers vDSO requires gettimeofday() and clock_gettime() syscalls to implement the fallback mechanism. Add the missing syscall numbers to unistd.h for arm64. Signed-off-by: Vincenzo Frascino Signed-off-by: Thomas Gleixner Tested-by: Shijith Thotton Tested-by: Andre Przywara Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mips@vger.kernel.org Cc: linux-kselftest@vger.kernel.org Cc: Catalin Marinas Cc: Will Deacon Cc: Arnd Bergmann Cc: Russell King Cc: Ralf Baechle Cc: Paul Burton Cc: Daniel Lezcano Cc: Mark Salyzyn Cc: Peter Collingbourne Cc: Shuah Khan Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Rasmus Villemoes Cc: Huw Davies Link: https://lkml.kernel.org/r/20190621095252.32307-7-vincenzo.frascino@arm.com arch/arm64/include/asm/unistd.h | 5 +++++ 1 file changed, 5 insertions(+) commit 98cd3c3f83fbba27a6bacd75ad12e8388a61a32a Author: Peter Collingbourne Date: Fri Jun 21 10:52:32 2019 +0100 arm64: vdso: Build vDSO with -ffixed-x18 The vDSO needs to be built with x18 reserved in order to accommodate userspace platform ABIs built on top of Linux that use the register to carry inter-procedural state, as provided for by the AAPCS. An example of such a platform ABI is the one that will be used by an upcoming version of Android. Although this change is currently a no-op due to the fact that the vDSO is currently implemented in pure assembly on arm64, it is necessary in order to prepare for using the generic C implementation of the vDSO. [ tglx: Massaged changelog ] Signed-off-by: Peter Collingbourne Signed-off-by: Vincenzo Frascino Signed-off-by: Thomas Gleixner Tested-by: Shijith Thotton Tested-by: Andre Przywara Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mips@vger.kernel.org Cc: linux-kselftest@vger.kernel.org Cc: Catalin Marinas Cc: Will Deacon Cc: Arnd Bergmann Cc: Russell King Cc: Ralf Baechle Cc: Paul Burton Cc: Daniel Lezcano Cc: Mark Salyzyn Cc: Shuah Khan Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Rasmus Villemoes Cc: Huw Davies Cc: Mark Salyzyn Link: https://lkml.kernel.org/r/20190621095252.32307-6-vincenzo.frascino@arm.com arch/arm64/kernel/vdso/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 28b1a824a4f44da46983cd2c3249f910bd4b797b Author: Vincenzo Frascino Date: Fri Jun 21 10:52:31 2019 +0100 arm64: vdso: Substitute gettimeofday() with C implementation To take advantage of the commonly defined vdso interface for gettimeofday() the architectural code requires an adaptation. Re-implement the gettimeofday VDSO in C in order to use lib/vdso. With the new implementation arm64 gains support for CLOCK_BOOTTIME and CLOCK_TAI. [ tglx: Reformatted the function line breaks ] Signed-off-by: Vincenzo Frascino Signed-off-by: Thomas Gleixner Tested-by: Shijith Thotton Tested-by: Andre Przywara Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mips@vger.kernel.org Cc: linux-kselftest@vger.kernel.org Cc: Catalin Marinas Cc: Will Deacon Cc: Arnd Bergmann Cc: Russell King Cc: Ralf Baechle Cc: Paul Burton Cc: Daniel Lezcano Cc: Mark Salyzyn Cc: Peter Collingbourne Cc: Shuah Khan Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Rasmus Villemoes Cc: Huw Davies Link: https://lkml.kernel.org/r/20190621095252.32307-5-vincenzo.frascino@arm.com arch/arm64/Kconfig | 2 + arch/arm64/include/asm/vdso/gettimeofday.h | 84 ++++++++ arch/arm64/include/asm/vdso/vsyscall.h | 53 +++++ arch/arm64/kernel/asm-offsets.c | 33 ++- arch/arm64/kernel/vdso.c | 51 +---- arch/arm64/kernel/vdso/Makefile | 34 ++- arch/arm64/kernel/vdso/gettimeofday.S | 323 ----------------------------- arch/arm64/kernel/vdso/vgettimeofday.c | 27 +++ 8 files changed, 220 insertions(+), 387 deletions(-) commit 44f57d788e7deecb504843534081d3449c2eede9 Author: Vincenzo Frascino Date: Fri Jun 21 10:52:30 2019 +0100 timekeeping: Provide a generic update_vsyscall() implementation The new generic VDSO library allows to unify the update_vsyscall[_tz]() implementations. Provide a generic implementation based on the x86 code and the bindings which need to be implemented in architecture specific code. [ tglx: Moved it into kernel/time where it belongs. Removed the pointless line breaks in the stub functions. Massaged changelog ] Signed-off-by: Vincenzo Frascino Signed-off-by: Thomas Gleixner Tested-by: Shijith Thotton Tested-by: Andre Przywara Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mips@vger.kernel.org Cc: linux-kselftest@vger.kernel.org Cc: Catalin Marinas Cc: Will Deacon Cc: Arnd Bergmann Cc: Russell King Cc: Ralf Baechle Cc: Paul Burton Cc: Daniel Lezcano Cc: Mark Salyzyn Cc: Peter Collingbourne Cc: Shuah Khan Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Rasmus Villemoes Cc: Huw Davies Link: https://lkml.kernel.org/r/20190621095252.32307-4-vincenzo.frascino@arm.com include/asm-generic/vdso/vsyscall.h | 50 ++++++++++++++ include/vdso/vsyscall.h | 11 +++ kernel/time/Makefile | 1 + kernel/time/vsyscall.c | 133 ++++++++++++++++++++++++++++++++++++ 4 files changed, 195 insertions(+) commit 629fdf77ac4584b73bf3a7a07f5fc5ab0d27afdc Author: Vincenzo Frascino Date: Fri Jun 21 10:52:36 2019 +0100 lib/vdso: Add compat support Some 64 bit architectures have support for 32 bit applications that require a separate version of the vDSOs. Add support to the generic code for compat fallback functions. Signed-off-by: Vincenzo Frascino Signed-off-by: Thomas Gleixner Tested-by: Shijith Thotton Tested-by: Andre Przywara Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mips@vger.kernel.org Cc: linux-kselftest@vger.kernel.org Cc: Catalin Marinas Cc: Will Deacon Cc: Arnd Bergmann Cc: Russell King Cc: Ralf Baechle Cc: Paul Burton Cc: Daniel Lezcano Cc: Mark Salyzyn Cc: Peter Collingbourne Cc: Shuah Khan Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Rasmus Villemoes Cc: Huw Davies Link: https://lkml.kernel.org/r/20190621095252.32307-10-vincenzo.frascino@arm.com lib/vdso/gettimeofday.c | 4 ++++ 1 file changed, 4 insertions(+) commit 00b26474c2f1613d7ab894c525f775c67c8a9e8f Author: Vincenzo Frascino Date: Fri Jun 21 10:52:29 2019 +0100 lib/vdso: Provide generic VDSO implementation In the last few years the kernel gained quite some architecture specific vdso implementations which contain very similar code. Introduce a generic VDSO implementation of gettimeofday() which will be shareable between architectures once they are converted over. The implementation is based on the current x86 VDSO code. [ tglx: Massaged changelog and made the kernel doc tabular ] Signed-off-by: Vincenzo Frascino Signed-off-by: Thomas Gleixner Tested-by: Shijith Thotton Tested-by: Andre Przywara Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mips@vger.kernel.org Cc: linux-kselftest@vger.kernel.org Cc: Catalin Marinas Cc: Will Deacon Cc: Arnd Bergmann Cc: Russell King Cc: Ralf Baechle Cc: Paul Burton Cc: Daniel Lezcano Cc: Mark Salyzyn Cc: Peter Collingbourne Cc: Shuah Khan Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Rasmus Villemoes Cc: Huw Davies Link: https://lkml.kernel.org/r/20190621095252.32307-3-vincenzo.frascino@arm.com include/vdso/helpers.h | 56 ++++++++++++ lib/Kconfig | 5 ++ lib/vdso/Kconfig | 36 ++++++++ lib/vdso/Makefile | 22 +++++ lib/vdso/gettimeofday.c | 224 ++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 343 insertions(+) commit 361f8aee9b093526297d567a9dc2f6cbf746e5f9 Author: Vincenzo Frascino Date: Fri Jun 21 10:52:28 2019 +0100 vdso: Define standardized vdso_datapage Define a common formet for the vdso datapage as a preparation for sharing the VDSO implementation as a generic library. The datastructures are based on the current x86 layout. [ tglx: Massaged changelog ] Signed-off-by: Vincenzo Frascino Signed-off-by: Thomas Gleixner Tested-by: Shijith Thotton Tested-by: Andre Przywara Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mips@vger.kernel.org Cc: linux-kselftest@vger.kernel.org Cc: Catalin Marinas Cc: Will Deacon Cc: Arnd Bergmann Cc: Russell King Cc: Ralf Baechle Cc: Paul Burton Cc: Daniel Lezcano Cc: Mark Salyzyn Cc: Peter Collingbourne Cc: Shuah Khan Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Rasmus Villemoes Cc: Huw Davies Link: https://lkml.kernel.org/r/20190621095252.32307-2-vincenzo.frascino@arm.com include/vdso/datapage.h | 93 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) commit 32e29396f00e7849ea0b1aeebae097fc1de6e979 Author: Vincenzo Frascino Date: Sat Jun 22 15:02:07 2019 +0200 hrtimer: Split out hrtimer defines into separate header To avoid include dependency hell split out the hrtimer defines which are required in the upcoming VDSO library into a separate header file. [ tglx: Split out from the VDSO library patch and included ktime.h as the new header depends on it. ] Signed-off-by: Vincenzo Frascino Signed-off-by: Thomas Gleixner Tested-by: Shijith Thotton Tested-by: Andre Przywara Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mips@vger.kernel.org Cc: linux-kselftest@vger.kernel.org Cc: Catalin Marinas Cc: Will Deacon Cc: Arnd Bergmann Cc: Russell King Cc: Ralf Baechle Cc: Paul Burton Cc: Daniel Lezcano Cc: Mark Salyzyn Cc: Peter Collingbourne Cc: Shuah Khan Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Rasmus Villemoes Cc: Huw Davies Link: https://lkml.kernel.org/r/20190621095252.32307-3-vincenzo.frascino@arm.com include/linux/hrtimer.h | 16 +--------------- include/linux/hrtimer_defs.h | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 15 deletions(-) commit cc9e303c91f5c25c49a4312552841f4c23fa2b69 Author: Konstantin Khlebnikov Date: Wed May 15 09:59:00 2019 +0300 x86/cpu: Disable frequency requests via aperfmperf IPI for nohz_full CPUs Since commit 7d5905dc14a8 ("x86 / CPU: Always show current CPU frequency in /proc/cpuinfo") open and read of /proc/cpuinfo sends IPI to all CPUs. Many applications read /proc/cpuinfo at the start for trivial reasons like counting cores or detecting cpu features. While sensitive workloads like DPDK network polling don't like any interrupts. Integrates this feature with cpu isolation and do not send IPIs to CPUs without housekeeping flag HK_FLAG_MISC (set by nohz_full). Code that requests cpu frequency like show_cpuinfo() falls back to the last frequency set by the cpufreq driver if this method returns 0. Signed-off-by: Konstantin Khlebnikov Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: Len Brown Cc: Frederic Weisbecker Cc: "Rafael J. Wysocki" Cc: "Paul E. McKenney" Link: https://lkml.kernel.org/r/155790354043.1104.15333317408370209.stgit@buzz arch/x86/kernel/cpu/aperfmperf.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit f3f48d7331cf5ad9a6b3a6beff38f3dad1871b49 Author: Alex Deucher Date: Fri Jun 21 16:32:25 2019 -0500 drm/amdgpu: drop unused df init callback It was replaced with the sw_init callback so is no longer needed. Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 - 1 file changed, 1 deletion(-) commit 8f78f1b03eb2f4e574a638ef648cf3db0990b303 Author: Jonathan Kim Date: Thu Jun 20 22:23:35 2019 -0400 drm/amdgpu: add sw_init to df_v1_7 change df_init to df_sw_init df 1.7 to prevent regression issues on pre-vega20 products when callback is called in sw_common_sw_init. Reviewed-by: Felix Kuehling Signed-off-by: Jonathan Kim Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/df_v1_7.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d9848e149da1ac98bf1220a4fe5977c5bfeca7ef Author: Oak Zeng Date: Fri Jun 14 10:55:50 2019 -0500 drm/amdkfd: Set gws_mask to 64 bit 1s Previous kfd doesn't use gws so this mask was set to 0. Set it to 64 bit 1s because now kfd can use all 64 gws resources. Signed-off-by: Oak Zeng Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9cbee6eff8f6bb8bcc16609887c91fbbd4cb0e62 Author: hersen wu Date: Thu May 23 18:49:39 2019 -0400 drm/amd/display/dc: set num-dwb = 1 as navi10 asic cap during navi10 bring up, dwb causes system hang. to continue debug major issue, disable dwb by set num-dwb = 0. the hang issue is not reproduced now by enable num-dwb =1. dc source is shared by all os. win needs num-dwb = 1. Signed-off-by: hersen wu Acked-by: Alex Deucher Reviewed-by: Roman Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 170a2398d2d80f0df0d6c664dddd237baf4408cf Author: Su Sung Chung Date: Thu May 30 14:59:03 2019 -0400 drm/amd/display: make clk_mgr call enable_pme_wa [why] Before for raven and navi we are calling pp_smu functions for pme [how] refactor a code so we will call clk_mgr's enable_pme_wa function so we can use pme_wa for future asics. This way we don't need to worry about different ASIC since clk_mgr already have that information Signed-off-by: Su Sung Chung Reviewed-by: Eric Yang Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher .../drm/amd/display/dc/clk_mgr/dcn10/rv1_clk_mgr.c | 14 +++++++++++ .../amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c | 16 +++++++++++- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 29 +++++----------------- 3 files changed, 35 insertions(+), 24 deletions(-) commit 7a5ab155d34a04efbf7227754b8dc06aaa296ff2 Author: Charlene Liu Date: Tue May 28 19:44:32 2019 -0400 drm/amd/display: expose dentist_get_did_from_divider for future use Signed-off-by: Charlene Liu Reviewed-by: Dmytro Laktyushkin Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c | 2 +- drivers/gpu/drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) commit c00d56fede05a36b1718c3d23496c887f232448f Author: Dmytro Laktyushkin Date: Wed May 29 11:24:35 2019 -0400 drm/amd/display: add missing mod_vmid destructor mod_vmid is missing a destructor. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Charlene Liu Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/modules/inc/mod_vmid.h | 2 ++ drivers/gpu/drm/amd/display/modules/vmid/vmid.c | 9 +++++++++ 2 files changed, 11 insertions(+) commit 1a7d296d162ede31d170fdb9205ce07c8cb7dfac Author: Thomas Lim Date: Mon Apr 29 16:05:42 2019 -0400 drm/amd/display: Add Underflow Asserts to dc [Why] For debugging underflow issues it can be useful to have asserts when the underflow initially occurs. [How] Read the underflow status registers after actions that have a high risk of causing underflow and assert that no underflow occurred. If underflow occurred, clear the bit. Signed-off-by: Thomas Lim Reviewed-by: Eric Yang Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 1 + .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 32 +++++++++++++++++++++- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.h | 2 ++ .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 4 ++- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 1 + .../gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 2 ++ drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 1 + 7 files changed, 41 insertions(+), 2 deletions(-) commit bda9afdacf8942c313a47cc95582737345a91c5e Author: Dmytro Laktyushkin Date: Wed May 22 18:05:41 2019 -0400 drm/amd/display: move vmid determination logic to a module Currently vmid is decided internally inside dc. With the introduction of new asics we are required to coordinate vmid use with external components. This change converts vmid logic to a DAL module allowing vmid to be passed in as a parameter to DC. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Charlene Liu Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/Makefile | 7 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 20 --- drivers/gpu/drm/amd/display/dc/core/dc_vm_helper.c | 93 +++--------- drivers/gpu/drm/amd/display/dc/dc.h | 17 ++- drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 2 + drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c | 3 +- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.h | 3 +- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 3 +- .../gpu/drm/amd/display/dc/dcn20/dcn20_hubbub.c | 72 +++++----- .../gpu/drm/amd/display/dc/dcn20/dcn20_hubbub.h | 12 +- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubp.c | 5 +- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubp.h | 3 +- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 83 ++++++----- .../gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_vmid.c | 7 +- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_vmid.h | 1 - drivers/gpu/drm/amd/display/dc/inc/hw/dchubbub.h | 16 +-- drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h | 3 +- drivers/gpu/drm/amd/display/dc/inc/hw/vmid.h | 1 + drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 17 ++- drivers/gpu/drm/amd/display/dc/inc/vm_helper.h | 16 +-- drivers/gpu/drm/amd/display/modules/inc/mod_vmid.h | 44 ++++++ drivers/gpu/drm/amd/display/modules/vmid/vmid.c | 158 +++++++++++++++++++++ 23 files changed, 357 insertions(+), 231 deletions(-) commit a6465d1f3b8f863bd4ffd4048d10de3558b378d5 Author: Charlene Liu Date: Tue May 28 13:52:09 2019 -0400 drm/amd/display: dcn2 use fixed clocks. [Description] dcn2 use fixed clocks and not program DPP CLK or Disp_CLK. Signed-off-by: Charlene Liu Reviewed-by: Dmytro Laktyushkin Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher .../amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c | 22 +++++++++++----------- drivers/gpu/drm/amd/display/dc/dc.h | 2 ++ .../gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 9 ++++++++- 3 files changed, 21 insertions(+), 12 deletions(-) commit 971ff2b43359176d324b921ac6c6e2388e88a279 Author: Charlene Liu Date: Wed May 22 18:25:33 2019 -0400 drm/amd/display: add p010 and ayuv plane caps for future use Signed-off-by: Charlene Liu Reviewed-by: Chris Park Acked-by: Bhawanpreet Lakha Acked-by: Krunoslav Kovac Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 2 ++ 1 file changed, 2 insertions(+) commit 6e17b5b8a846850d73e06dc778e7d5c3ef0423f9 Author: Jun Lei Date: Mon May 27 14:15:27 2019 -0400 drm/amd/display: update DCN2 uclk switch time [why] value commited to by HW team is going to be higher than pre-silicon, and will cause underflow if driver not updated [how] update hardcoded value, update pstate switching logic to fix case where with long uclk time we won't allow switch even when we should Signed-off-by: Jun Lei Reviewed-by: Eric Yang Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c | 8 +++----- drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr_internal.h | 6 ++++++ 2 files changed, 9 insertions(+), 5 deletions(-) commit cf020d49b3c4ef6ab6f26be3dbf2f36b3df9f797 Author: Nicholas Kazlauskas Date: Thu May 9 12:14:58 2019 -0400 drm/amd/display: Rework CRTC color management [Why] To prepare for the upcoming DRM plane color management properties we need to correct a lot of wrong behavior and assumptions made for CRTC color management. The documentation added by this commit in amdgpu_dm_color explains how the HW color pipeline works and its limitations with the DRM interface. The current implementation does the following wrong: - Implicit sRGB DGM when no CRTC DGM is set - Implicit sRGB RGM when no CRTC RGM is set - No way to specify a non-linear DGM matrix that produces correct output - No way to specify a correct RGM when a linear DGM is used We had workarounds for passing kms_color tests but not all of the behavior we had wrong was covered by these tests (especially when it comes to non-linear DGM). Testing both DGM and RGM at the same time isn't something kms_color tests well either. [How] The specifics for how color management works in AMDGPU and the new behavior can be found by reading the documentation added to amdgpu_dm_color.c from this patch. All of the incorrect cases from the old implementation have been addressed for the atomic interface, but there still a few TODOs for the legacy one. Note: this does cause regressions for kms_color@pipe-a-ctm-* over HDMI. The result looks correct from visual inspection but the CRC no longer matches. For reference, the test was previously doing the following: linear degamma -> CTM -> sRGB regamma -> RGB to YUV (709) -> ... Now the test is doing: linear degamma -> CTM -> linear regamma -> RGB to YUV (709) -> ... Signed-off-by: Nicholas Kazlauskas Reviewed-by: Sun peng Li Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 32 +- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 10 +- .../drm/amd/display/amdgpu_dm/amdgpu_dm_color.c | 473 ++++++++++++++------- 3 files changed, 356 insertions(+), 159 deletions(-) commit 043f5bb630c18edaaaad9c55ee60f8828e416ff4 Author: Wesley Chalmers Date: Thu May 23 11:54:12 2019 -0400 drm/amd/display: Use macro for invalid OPP ID [WHY] This is meant to make it clearer that 0xf is not a valid OPP ID, and that code making use of OPP IDs should not accept this value. Signed-off-by: Wesley Chalmers Reviewed-by: Charlene Liu Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c | 4 ++-- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 4 ++-- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubp.c | 2 +- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 4 ++-- drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h | 2 ++ 5 files changed, 9 insertions(+), 7 deletions(-) commit c5509aadcfa16763024a4e2abce5ecb3e3a0f639 Author: Eric Bernstein Date: Thu May 16 18:00:05 2019 -0400 drm/amd/display: expose enable dp output functions expose this function for future use Implementation of DCN3 DIO Link Encoder including dpcs register headers. Signed-off-by: Eric Bernstein Reviewed-by: Charlene Liu Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_link_encoder.c | 2 +- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_link_encoder.h | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) commit a6132cb10207968b61b0616ee7c1536876c8fe9f Author: Charlene Liu Date: Tue May 21 13:32:02 2019 -0400 drm/amd/display: add dwb stere caps and version add dwb stereo caps and ver for future use Signed-off-by: Charlene Liu Reviewed-by: Charlene Liu Reviewed-by: Krunoslav Kovac Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc_types.h | 1 + drivers/gpu/drm/amd/display/dc/inc/hw/dwb.h | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) commit 779451a736d67f443d948980b6c4100e999e30b7 Author: Eric Bernstein Date: Wed May 22 11:30:41 2019 -0400 drm/amd/display: Alpha plane type Add Alpha surface type for future use Signed-off-by: Eric Bernstein Reviewed-by: Dmytro Laktyushkin Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.h | 1 + 1 file changed, 1 insertion(+) commit 5d36f78311cfff7ad539fe6200fbb126ca0e92a7 Author: Jun Lei Date: Wed May 22 13:20:34 2019 -0400 drm/amd/display: making DCN20 WM table non-overlapping [why] Existing behavior has overlapping ranges resulting in path dependent SMU selection [how] Make ranges non-overlapping, resulting in non-path dependent selection Signed-off-by: Jun Lei Reviewed-by: Eric Yang Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit e710fdb134ad4c08ae2cabc6731fba6fb72fa0b8 Author: Wenjing Liu Date: Wed May 22 11:50:20 2019 -0400 drm/amd/display: update dsc max_target_bpp to 16 bpp [why] According to the latest specs, the max_target bpp sink can support is 16 bpp. [how] update dsc max_target_bpp to 16 Signed-off-by: Wenjing Liu Reviewed-by: Jun Lei Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit f82c916c41974c4e786c7311c34c33ca67373092 Author: Charlene Liu Date: Mon Jun 3 10:53:44 2019 -0400 drm/amd/display: add some parameters to validate bandwidth functions required for new checks. Signed-off-by: Charlene Liu Reviewed-by: Charlene Liu Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc_types.h | 8 ++++++++ drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 3 ++- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_stream_encoder.c | 9 +-------- .../gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c | 5 ++++- .../gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.h | 5 ++++- drivers/gpu/drm/amd/display/dc/dml/display_mode_lib.h | 5 ++++- 6 files changed, 23 insertions(+), 12 deletions(-) commit 39a4eb853f9ac85e9b042874ef5fa12c8e20e440 Author: Wenjing Liu Date: Thu May 16 13:01:51 2019 -0400 drm/amd/display: update DSC MST DP virtual DPCD peer device enumeration policy [why] Current policy assumes virtual DPCD peer device as an individual MST branch device with 1 input and 1 output. However this is only true for virtual DP-to-DP peer device. In general there are three types of virtual DP peer devices. 1. Sink peer device with virtual DPCD. 2. Virtual DP-to-DP Peer device with virtual DPCD. 3. Virtual DP-to-HDMI Protocol Converter Peer Device with Virtual DPCD. So we should break the assumption and handle all three types. [how] DP-to-DP peer device will have virtual DPCD cap upstream. Sink peer device will have virtual DPCD on the logical port. Dp to HDMI protocol converter peer device will have virtual DPCD on its converter port. For DSC capable Synaptics non VGA port we workaround by enumerating a virutal DPCD peer device on its upstream even if it doesn't have one. Signed-off-by: Wenjing Liu Reviewed-by: Jun Lei Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 14 ++ drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 95 ++---------- drivers/gpu/drm/amd/display/dc/dc.h | 19 ++- drivers/gpu/drm/amd/display/dc/dc_dp_types.h | 115 +++++++++++++- drivers/gpu/drm/amd/display/dc/dc_dsc.h | 6 + drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c | 5 +- drivers/gpu/drm/amd/display/include/dpcd_structs.h | 168 --------------------- 7 files changed, 161 insertions(+), 261 deletions(-) commit 2131f65581ba462f491062f44c08e8d099327d42 Author: Jun Lei Date: Fri May 17 11:08:02 2019 -0400 drm/amd/display: add support for forcing DCFCLK without affecting watermarks [why] useful for debugging [how] plumb a debug option in dc Signed-off-by: Jun Lei Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c | 4 ++++ drivers/gpu/drm/amd/display/dc/dc.h | 8 ++++++++ 2 files changed, 12 insertions(+) commit 6f4992b0e2db5f8a182bfb75e710ce47555b10ff Author: Nicholas Kazlauskas Date: Tue May 14 09:19:01 2019 -0400 drm/amd/display: Copy stream updates onto streams [Why] Almost every function in DC that works with stream state expects that the current state on the stream is the one that it should be writing out. These functions are typically triggered by specifying a particular stream update - but the actual contents of the stream update itself are ignored, leaving it to the DM to actually update the stream state itself. The problem with doing this in DM is a matter of timing. On Linux most of this is incorrectly done in atomic check, when we actually want it to be done during atomic commit tail while access to DC is locked. To give an example, a commit requesting to modify color management state for DM could come in, be rejected, but still have modified the actual system state for the stream since it's shared memory. The next time color management gets programmed it'll use the rejected color management info - which might not even still be around if it's a custom transfer function. So a reasonable place to perform this is within DC itself and this is the model that's currently in use for surface updates. DC can even compare the current system state to the incoming surface update to determine update level, something that can't currnetly be done with the framework for stream updates. [How] Duplicate the framework used for surface updates for stream updates as well. Copy all the updates after checking the update type. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Harry Wentland Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 97 ++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) commit 4f008d931b9f4d1cfeb88f04579786b3b2c3dcf2 Author: Ilya Bakoulin Date: Thu May 16 14:33:14 2019 -0400 drm/amd/display: Fix incorrect vba type SwathWidthCThisState is expected to be an unsigned int array. Signed-off-by: Ilya Bakoulin Reviewed-by: Charlene Liu Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d8cd587d2bfd13dfc0dce6b74c1a78333415f413 Author: Martin Leung Date: Wed May 15 15:50:51 2019 -0400 drm/amd/display: removing MODULO change for dcn2 [why] when resetting pipes from 480p to dual-pipe 8k, modulo reg write for video optimized rate updated one pipe without changing the other, causing sync error [how] removed code from dcn2 Signed-off-by: Martin Leung Reviewed-by: Jun Lei Acked-by: Leo Li Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dce/dce_clock_source.c | 28 ---------------------- 1 file changed, 28 deletions(-) commit 03fd87db6d55b62a4771626a660a0df3d4a8546a Author: Ilya Bakoulin Date: Fri May 3 17:22:32 2019 -0400 drm/amd/display: Fix incorrect DML output_bpp value [Why] The output_bpp pipe parameter was assigned an incorrect value (color depth enum), and subsequently used to overwrite the OutputBpp parameter calculated by DML. Seems like this had no effect except with DSC enabled, which would make DML produce bad outputs. [How] Removed assignment to OutputBpp, fixed output_bpp assignment, and properly set ForcedOutputLinkBPP instead of OutputBpp. Also removed condition in DML that prevented forcing of Output BPP with DSC enabled. Signed-off-by: Ilya Bakoulin Reviewed-by: Dmytro Laktyushkin Acked-by: Leo Li Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 40 +++++++++++++++++++++- .../gpu/drm/amd/display/dc/dml/display_mode_vba.c | 8 +++-- 2 files changed, 45 insertions(+), 3 deletions(-) commit 3979efcec6272848fca96496c53096f6ee8aa32f Author: Jun Lei Date: Mon May 13 15:09:13 2019 -0400 drm/amd/display: Add missing VM conversion from hw values [why] VM implemenation is missing conversion from HW values in hubbub DM not passing actual PTB during flip [how] add proper HW conversion from logical values fix cases where we programmed VA even though we are in PA plumb in PTB from DM Signed-off-by: Jun Lei Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dcn20/dcn20_hubbub.c | 77 +++++++++++++++++----- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 5 +- 2 files changed, 65 insertions(+), 17 deletions(-) commit a746a2585542179bf9ec37c5243a10a6490ba41d Author: Ilya Bakoulin Date: Fri May 3 12:59:35 2019 -0400 drm/amd/display: Drive-by fixes for display_mode_vba Fixes for the following: - Incorrect pointer type (unsigned int instead of double) - Incorrect DSC number of slices setting Signed-off-by: Ilya Bakoulin Reviewed-by: Dmytro Laktyushkin Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.c | 3 --- drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.h | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) commit 98ce8cc1b47ab74e96e08e7b70dc278104f98f36 Author: Nikola Cornij Date: Wed May 8 14:36:03 2019 -0400 drm/amd/display: Enable DSC power-gating for DSC streams [why] Currently DSC power gating is disabled by default because the power transition doesn't happen, causing a crash on some systems [how] Fix the lack of power state transition and enable DSC power gating by default. Signed-off-by: Nikola Cornij Reviewed-by: Martin Leung Reviewed-by: Nevenko Stupar Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 8 ++++++++ drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 3 --- 2 files changed, 8 insertions(+), 3 deletions(-) commit c3ec8ba5377994251e83893aa8820f771ff4aabf Author: Charlene Liu Date: Wed May 8 13:29:09 2019 -0400 drm/amd/display: Return UPDATE_TYPE_FULL on writeback update Should do full update when display writeback is updated. Signed-off-by: Charlene Liu Reviewed-by: Duke Du Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 5 +++++ drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 4 +++- drivers/gpu/drm/amd/display/dc/inc/hw/dwb.h | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) commit ba32c50f04466463258546a8e75ff8ddd6776bd5 Author: Wenjing Liu Date: Mon May 6 14:22:39 2019 -0400 drm/amd/display: decouple dsc adjustment out of enablement [why] dsc adjustment is allowed via stream update sequence. dsc enablement is only allowed via commit stream sequence. with the current unified dsc set function, it is hard to determine which sequence it is called by. The solution is to decouple dsc adjustment out of enablement sequence so we can handle them separately. [how] decouple dsc adjustment out of enablement. Signed-off-by: Wenjing Liu Reviewed-by: Nikola Cornij Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 7 +---- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c | 35 +++++++++++----------- .../gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 12 +++----- .../gpu/drm/amd/display/dc/dcn20/dcn20_resource.h | 2 -- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 9 ------ drivers/gpu/drm/amd/display/dc/inc/dc_link_dp.h | 1 + 7 files changed, 24 insertions(+), 44 deletions(-) commit 1621f4c417bf31e2b741a3d876b1d61435a41e18 Author: Jun Lei Date: Fri May 3 15:59:54 2019 -0400 drm/amd/display: always use 4 dp lanes for dml [why] current DML logic uses currently trained setting for number of dp lanes in DML calculations. this is obviously flawed since just because 1 lane is in use doesn't mean only 1 lane can be used this causes mode validation to fail depending on current state, which is incorrect [how] DML should always assume 4 lanes are available. validation of bandwidth is not supposed to be handled by DML, since we do link validation without DML already also, DML is expecting there to be a copy of the max state, this state is removed when update_bounding_box is called to update actual SKU clocks. fix this as well by duping last state. Signed-off-by: Jun Lei Reviewed-by: Dmytro Laktyushkin Acked-by: Bhawanpreet Lakha Acked-by: Eric Yang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit 278141f58e2c9c8f7830f40086c1d43edc6c268b Author: Wesley Chalmers Date: Wed Apr 24 15:29:06 2019 -0400 drm/amd/display: Use DCN2 functions instead of DCE [WHY] DCN code should make as few references to DCE as possible [HOW] Copy DCE110 implementation of find_first_free_match_stream_enc_for_link into DCN10 Signed-off-by: Wesley Chalmers Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6936c8b1d41514fa498c071c3bed8ff9f6beafc5 Author: Wesley Chalmers Date: Wed Apr 24 15:25:41 2019 -0400 drm/amd/display: DCN2 Engine-specifc encoder allocation [WHY] From DCE110 onward, we have the ability to assign DIG BE and FE separately for any display connector type; before, we could only do this for DP. Signed-off-by: Wesley Chalmers Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b5d71c93963deb53ebd0f8e762d290f0cee2ff32 Author: Nikola Cornij Date: Tue Apr 30 17:54:31 2019 -0400 drm/amd/display: Disable DSC power gating in Diags [why] With DSC power gating enabled, one of the register reads times out occasionally, causing a DSC test to fail. [how] Disable DSC power gating in Diags. NOTE: This has to be reverted once the problems with DSC power gating are resolved. Signed-off-by: Nikola Cornij Reviewed-by: Nevenko Stupar Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 3 +++ 1 file changed, 3 insertions(+) commit 324707fdf83a5c25a99b2ac2500f530d530c89d2 Author: Joshua Aberback Date: Mon Apr 29 17:27:12 2019 -0400 drm/amd/display: Set test pattern on blank when using Visual Confirm [Why] We want a test pattern to show up on screen when we're blanked and have visual confirm enabled, for debugging. Raven does this, it's a mistake that Navi does not. [How] - in "blank_pixel_data", set appropriate DPG pattern for visual confirm - refactor DPG calls out of "enable_stream_timing" Signed-off-by: Joshua Aberback Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 53 +++++----------------- 1 file changed, 11 insertions(+), 42 deletions(-) commit ad141db915a8b402fd29e553d4f0b9e870141ca6 Author: Dmytro Laktyushkin Date: Mon Apr 8 14:56:29 2019 -0400 drm/amd/display: add null checks and set update flags for DCN2 * add plane state null checks * add and set update surface flags Signed-off-by: Dmytro Laktyushkin Reviewed-by: Eric Bernstein Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 3 +++ drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 8 +++----- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.h | 14 +++++++++++--- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 1 - 4 files changed, 17 insertions(+), 9 deletions(-) commit 9796b71318152666f1804215922588c7edb3f4cb Author: Tyler DiBattista Date: Mon Apr 8 13:30:07 2019 -0400 drm/amd/display: move DWB structs and enums to dc_hw_types [Why] these enums/structs will be used more generically in the future so moving it to dc_hw_types and dc_types Signed-off-by: Tyler DiBattista Reviewed-by: Charlene Liu Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 10 ++++++++++ drivers/gpu/drm/amd/display/dc/dc_types.h | 7 +++++++ drivers/gpu/drm/amd/display/dc/inc/hw/dwb.h | 17 ----------------- 3 files changed, 17 insertions(+), 17 deletions(-) commit f99b6f4f216ac0ff7f477dd36c88e7b229292dec Author: Vitaly Prosyak Date: Thu Apr 18 09:51:12 2019 -0500 drm/amd/display: Integrate color transform3x4 with 3dlut tm [Why & How] Reuse existent code path (dcn1+) and in order to do that apply de gamma in 1D blender LUT and re use MPC OGAM. Follow up is required. Signed-off-by: Vitaly Prosyak Reviewed-by: Aric Cyr Acked-by: Bhawanpreet Lakha Acked-by: Krunoslav Kovac Acked-by: Vitaly Prosyak Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 7 +++++++ drivers/gpu/drm/amd/display/dc/core/dc_surface.c | 10 ++++++++++ drivers/gpu/drm/amd/display/dc/dc.h | 1 + drivers/gpu/drm/amd/display/modules/inc/mod_shared.h | 7 ++++--- 4 files changed, 22 insertions(+), 3 deletions(-) commit 8bb3d7e7b5de731a990af8fe6d99a30751602f15 Author: Charlene Liu Date: Fri Apr 26 00:29:13 2019 -0400 drm/amd/display: used optimum VSTARTUP instead of MaxVStartup [Description] Features that are desirable for minimizing the Global Sync Period: DRR and lateflip Signed-off-by: Charlene Liu Reviewed-by: Dmytro Laktyushkin Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 4 ++++ drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20.c | 8 ++++++-- drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.h | 2 ++ 3 files changed, 12 insertions(+), 2 deletions(-) commit 09104d151acfb32e0d6039d8c0f8f59e22af2c46 Author: Wenjing Liu Date: Thu Apr 25 16:24:13 2019 -0400 drm/amd/display: add dsc_passthrough_support bit in dpcd struct Signed-off-by: Wenjing Liu Reviewed-by: Nikola Cornij Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/include/dpcd_structs.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit cba4d59c936cd17ac601c188725ccd779467a509 Author: Wenjing Liu Date: Thu Apr 25 12:11:50 2019 -0400 drm/amd/display: fix a potential issue in DSC logic [why] In compute dsc bandwidth range there is an uninitialized variable [how] Initialize the variable to the correct value. Signed-off-by: Wenjing Liu Reviewed-by: Nikola Cornij Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit e34fe1bba65880c5dd66fae11362bd5c370493c1 Author: Leo (Hanghong) Ma Date: Tue Apr 16 11:07:22 2019 -0400 drm/amd/display: Expose send immediate sdp message interface [Why] To send sdp message immediately from a single slot. [How] Modify the generic SDP message interface, and use GSP4 to send immediate sdp message. Signed-off-by: Leo (Hanghong) Ma Reviewed-by: Harry Wentland Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc_stream.h | 1 - 1 file changed, 1 deletion(-) commit ed07237c0c480902a00cdf18a527849a4a9c75bf Author: Ilya Bakoulin Date: Wed Apr 17 14:48:25 2019 -0400 drm/amd/display: Fix LB BPP and Cursor width DCN2.0 LB BPP should be 48 or 16BPC and max cursor width should be 256. Also use populate_dml_pipes as functions pointer instead of using it directly Signed-off-by: Ilya Bakoulin Reviewed-by: Eric Bernstein Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 27 +++++++++++++++------- .../drm/amd/display/dc/dml/display_mode_enums.h | 3 ++- .../gpu/drm/amd/display/dc/dml/display_mode_vba.c | 3 +++ drivers/gpu/drm/amd/display/dc/inc/core_types.h | 5 ++++ 4 files changed, 29 insertions(+), 9 deletions(-) commit b964e79064269b0d4274bda92439b11ff1f2865c Author: Dmytro Laktyushkin Date: Mon Apr 22 15:38:09 2019 -0400 drm/amd/display: fix macro_tile_size for tiling A regression was introduced when we set correct tile size for the gfx9 swizzle mode. This resulted in incorrect macro tile size. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 97ae9b967517ad5aac265a9966d8ebfc9ee450d2 Author: Joshua Aberback Date: Tue Apr 23 16:50:50 2019 -0400 drm/amd/display: Remove OPP clock programming on plane disable [Why] Plane disable gets calls when we enable blank. On DCN2, we blank by using DPG to display a black colour instead of using OTG blank. DPG runs off the OPP clock, therefore we shouldn't disable the OPP clock when disabling the plane. We do need to disable the OPP clock when disabling the entire pipe, that will be addressed in a separate commit. Signed-off-by: Joshua Aberback Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 6 ------ 1 file changed, 6 deletions(-) commit 02ce5a799aae6519a6f6183a6a9773e3564f7584 Author: Dmytro Laktyushkin Date: Tue Apr 23 16:02:45 2019 -0400 drm/amd/display: fix odm mpo disable It looks like mpo isn't properly disabled during odm, this change is meant to fix that. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Nikola Cornij Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 72c6473a6aff9112dc213558bbe55b673f56d161 Author: Charlene Liu Date: Wed Apr 17 19:15:15 2019 -0400 drm/amd/display: [backport] dwb dm + efc support dwb fixes. Signed-off-by: Charlene Liu Reviewed-by: Duke Du Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dwb.c | 25 ++++++++++++++++++---- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.h | 4 ++++ drivers/gpu/drm/amd/display/dc/inc/hw/dwb.h | 7 ++++++ drivers/gpu/drm/amd/display/include/logger_types.h | 1 + 4 files changed, 33 insertions(+), 4 deletions(-) commit bb21290ff61529f7b8a6acdba6bbc21b15ac8c18 Author: Charlene Liu Date: Tue Apr 30 13:01:12 2019 -0400 drm/amd/display: Create DWB resource for DCN2 [Description] dcn20 has num_dwb =1 in the res cap, but not created. Signed-off-by: Charlene Liu Reviewed-by: Dmytro Laktyushkin Reviewed-by: Duke Du Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/Makefile | 1 - .../gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 111 +++++++++++++++++++++ drivers/gpu/drm/amd/display/include/logger_types.h | 3 + .../amd/include/asic_reg/dcn/dcn_2_0_0_offset.h | 4 + .../amd/include/asic_reg/dcn/dcn_2_0_0_sh_mask.h | 16 +++ 5 files changed, 134 insertions(+), 1 deletion(-) commit 6bd8d7d3f75be1c327f3fd63e6f03ca68faffb33 Author: Aric Cyr Date: Mon Apr 22 17:45:11 2019 -0400 drm/amd/display: Intermittent DCN2 pipe hang on mode change [Why] GSL is being used to synchronize pipes when vsync is off but on transition to vsync on during a mode change GSL is not being reset correctly. [How] Disable GSL on any plane that is disabled. Signed-off-by: Aric Cyr Reviewed-by: Krunoslav Kovac Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 15 +++++++++++---- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.h | 2 +- 2 files changed, 12 insertions(+), 5 deletions(-) commit f446489adcbc9c4833ae724a985166731c577bcd Author: Nikola Cornij Date: Wed Apr 17 19:07:08 2019 -0400 drm/amd/display: Add support for extended DSC DPCD caps [why] A few of the new DSC DPCD caps were introduced by a DP 1.4a SCR in order to give DSC branch decoders a chance to expose their maximum throughput and maximum line width limitations. Signed-off-by: Nikola Cornij Reviewed-by: Wenjing Liu Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 50 +++--- drivers/gpu/drm/amd/display/dc/dc_dsc.h | 3 +- drivers/gpu/drm/amd/display/dc/dc_types.h | 5 + drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c | 118 ++++++++++----- drivers/gpu/drm/amd/display/include/dpcd_structs.h | 168 +++++++++++++++++++++ include/drm/drm_dp_helper.h | 5 + 6 files changed, 289 insertions(+), 60 deletions(-) commit ce76898527cd14e9f1b04f463fd3d1cae80ed9c6 Author: Nikola Cornij Date: Thu Apr 18 15:15:58 2019 -0400 drm/amd/display: Do a reg update instead of set when writing ODM color format [why] If a set is done, DSC settings are zeroed out, leading to no DSC for the modes that require ODM, such as 8k60. This was a regression introduced by 5a4f26295176bbfc776c75aaf0f6dd8ccf806958. Signed-off-by: Nikola Cornij Reviewed-by: Eric Bernstein Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_optc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 97516065a0da1c771ee0035b11a5f9a46d8fd021 Author: Vitaly Prosyak Date: Tue Apr 9 10:39:25 2019 -0500 drm/amd/display: add flags for gamut map library [Why & How] Gamut map lib provides a wider gamut mapping options vs BT2390 Signed-off-by: Vitaly Prosyak Reviewed-by: Krunoslav Kovac Acked-by: Aric Cyr Acked-by: Bhawanpreet Lakha Acked-by: Vitaly Prosyak Signed-off-by: Alex Deucher .../gpu/drm/amd/display/modules/inc/mod_shared.h | 24 +++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) commit 796c9ece2ed0605c0b3d5bab8c354bad23d1bea9 Author: Samson Tam Date: Fri Apr 12 18:23:11 2019 -0400 drm/amd/display: block passive dongle EDID Emulation for USB-C ports [Why] Emulating passive dongle on USB-C port causes issue on some asics. [How] Check for DP_IS_USB_C flag in bios parser and propagate it to encoder features flags. If DP_IS_USB_C flag is set and it is trying to emulate passive dongle, then return fail. Signed-off-by: Samson Tam Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_link_encoder.c | 2 ++ 1 file changed, 2 insertions(+) commit 040a4d63bde4bbd5fd7ae40a7b94a05b259cca06 Author: Yongqiang Sun Date: Fri Apr 12 15:50:55 2019 -0400 drm/amd/display: DCHUB requestors numbers for Navi. [Why] The DCHub arbiter has a mechanism to dynamically rate limit the DCHub request stream to the fabric. If the memory controller is fully utilized and the DCHub requestors are well ahead of their amortized schedule, then it is safe to prevent the next winner from being committed and sent to the fabric. The utilization of the memory controller is approximated by ensuring that the number of outstanding requests is greater than a threshold specified by the ARB_MIN_REQ_OUTSTANDING. To determine that the DCHub requestors are well ahead of the amortized schedule, the slack of the next winner is compared with the ARB_SAT_LEVEL in DLG RefClk cycles. [How] The recommended settings to enable thise dynamic limiting for Navi is 180 requests. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dcn20/dcn20_hubbub.c | 24 +++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) commit d7cd0e053b17dfa0dd4669dfb388c100be272823 Author: Nikola Cornij Date: Mon Apr 15 17:31:44 2019 -0400 drm/amd/display: Add 170Mpix/sec DSC throughput support [why] It was missing, although defined in DP spec [how] - Add handling of this value to DSC code - Also remove unused file dsc_helpers.c Signed-off-by: Nikola Cornij Reviewed-by: Joshua Aberback Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c | 10 +- drivers/gpu/drm/amd/display/dc/dsc/dsc_helpers.c | 243 ----------------------- include/drm/drm_dp_helper.h | 4 + 3 files changed, 12 insertions(+), 245 deletions(-) commit c703e753c8d150295335ff9671d5573310048831 Author: Charlene Liu Date: Mon Apr 15 16:17:59 2019 -0400 drm/amd/display: add SW_USE_I2C_REG request. [Description] This is for DC_I2c arbitration use between HW use/SW use and DMCU use. Signed-off-by: Charlene Liu Reviewed-by: Krunoslav Kovac Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_i2c_hw.c | 2 ++ 1 file changed, 2 insertions(+) commit b01473e919fa4dd32df696ebfc899c8ba6e817a8 Author: Nikola Cornij Date: Mon Apr 15 14:32:28 2019 -0400 drm/amd/display: Make sure line size is not zero in DCN2 line buffer size calculations [why] 'Divide by zero' error happens when line size happens to be zero. [how] The code that makes sure line size minimum value can be 1 was already present in DCN1 part of the driver, this is mearly a port to DCN2. Signed-off-by: Nikola Cornij Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit 7fad39ca4a1cd721864a3b7da19b2489e73dbf42 Author: Eryk Brol Date: Mon Apr 15 16:09:01 2019 -0400 drm/amd/display: Change DCN2 vupdate start programming [Why] In order to ensure that incoming flips are latched and complete immediately, we need to program the vupdate interrupt to come during the back porch of each frame. [How] Program the vupdate start_line to be in the back porch like it's done for DCN1. Signed-off-by: Eryk Brol Reviewed-by: Aric Cyr Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 78b674573a552f046322d70b943349c133241e04 Author: Yongqiang Sun Date: Thu Apr 11 14:11:47 2019 -0400 drm/amd/display: Refactor program watermark. Refactor programming watermark function: Divided into urgent watermark, stutter watermark and pstate watermark. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubbub.c | 2 +- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubbub.h | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) commit be67de3561352ca59e4cef86811c1183719dc4e3 Author: Dmytro Laktyushkin Date: Wed Apr 3 14:51:18 2019 -0400 drm/amd/display: fix dcn2 mpc split decision The split condition is broken and will always activate at the moment. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Jun Lei Acked-by: Leo Li Acked-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4850ce697f9892df083bd7b3ec7c715404dd4279 Author: Charlene Liu Date: Tue May 7 15:12:02 2019 -0500 drm/amd/display: Add hubp_init entry to hubp vtable Different HW will need to init HUBP differently. For now, add a vtable entry, and hook a NO-OP for DCN1 and DCN2. In addition, future HW will need to access the HUBPREQ_DEBUG and CUR_TTU_CNTL0 register for hubp_init. Add that here. Signed-off-by: Charlene Liu Reviewed-by: Jun Lei Acked-by: Leo Li Acked-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubp.c | 4 +++- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubp.h | 2 ++ drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 6 ++++-- drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h | 4 ++-- 4 files changed, 11 insertions(+), 5 deletions(-) commit fbc9ca671f4ffbc0c873de17cf2305ca438cb09e Author: Ilya Bakoulin Date: Tue Apr 9 11:50:38 2019 -0400 drm/amd/display: Fix ODM combine data format [Why] OPTC data format was left at its default value (444) when enabling ODM combine. This caused issues with FPGA capture. [How] Write the OPTC_DATA_FORMAT field when enabling ODM combine. Signed-off-by: Ilya Bakoulin Reviewed-by: Eric Bernstein Acked-by: Leo Li Acked-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.h | 1 + drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 6 ++++-- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_optc.c | 11 ++++++++++- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_optc.h | 4 +++- drivers/gpu/drm/amd/display/dc/inc/hw/timing_generator.h | 3 ++- 5 files changed, 20 insertions(+), 5 deletions(-) commit 2a874fa0257ac834142e0570a2bec629421ee031 Author: Yongqiang Sun Date: Thu Apr 4 16:10:20 2019 -0400 drm/amd/display: Remove duplicate define of TO_DCN20_HUBBUB Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Leo Li Acked-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubbub.h | 3 --- 1 file changed, 3 deletions(-) commit 78ad75f8d77a1a5dd99d8d8dae66c49113bd0bd7 Author: Thomas Lim Date: Tue May 7 15:08:22 2019 -0500 drm/amd/display: Add power down display on boot flag [Why] Due to the generic introduction of seamless boot, the display is no longer blanked upon boot. However, this causes corruption on some systems that does not lock the memory in the non-secure boot case, resulting in brief corruption on boot due to garbage being written into the frame buffer. [How] Add a flag, read during DC init, to determine whether display should be blanked on boot. Default to true. Signed-off-by: Thomas Lim Reviewed-by: Aric Cyr Acked-by: Anthony Koo Acked-by: Leo Li Acked-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 + 1 file changed, 1 insertion(+) commit 9c0ab2dd070db6282c27690e7b57976485055ff7 Author: Nikola Cornij Date: Fri Apr 5 15:02:18 2019 -0400 drm/amd/display: Consider DSC target bpp precision when calculating DSC target bpp [why] DSC target bpp precision is a decoder DPCD and an AMD encoder capability. It must be taken into account when calculating target bitrate. [how] Add a DC DSC function that does this calculation. Signed-off-by: Nikola Cornij Reviewed-by: Wenjing Liu Acked-by: Leo Li Acked-by: Hawking Zhang Acked-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc_dsc.h | 10 ++++++---- drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c | 25 +++++++++++++++++-------- 2 files changed, 23 insertions(+), 12 deletions(-) commit d7c29549e35cecc7cd866dc566e595b0cdee2590 Author: Josip Pavic Date: Thu Apr 4 13:44:27 2019 -0400 drm/amd/display: enable abm on dcn2 [Why] ABM is currently not enabled on DCN2. [How] Update the register name list for DCN2 and un-comment the code that creates the abm object. Signed-off-by: Josip Pavic Reviewed-by: Anthony Koo Acked-by: Leo Li Acked-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_abm.h | 20 ++++++++++++++++++++ .../gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 14 +++++++------- 2 files changed, 27 insertions(+), 7 deletions(-) commit c2209d15444581e2314e7f66edf24e1d9e6dba4a Author: Wenjing Liu Date: Tue May 7 15:00:43 2019 -0500 drm/amd/display: Implement DSC MST fair share algorithm [why] The current policy will always enable DSC to 12 bpp regardless of if the current bandwidth is enough for MST displays. This logic is not optimal because user will get lower quality output if DSC compression is enabled. This change to is to implement a DSC MST bandwidth fair share algorithm so we will dynamically decide if DSC is needed and what quality (target bpp) is needed to fairly destribute the MST bandwidth in one MST topology. This will allow user to see the most optimal image quality with the given bandwidth. [how] We will start with lowest bandwidth possible and run a Max-Min fairness algorithm to fairly distribute the available bandwidth. If there is still remaining bandwidth, we will try to fit the timing without DSC compression. Signed-off-by: Wenjing Liu Reviewed-by: Jun Lei Acked-by: Leo Li Acked-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 2 +- drivers/gpu/drm/amd/display/dc/dc_dsc.h | 2 ++ drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c | 26 ++++++++++++++++++-------- 3 files changed, 21 insertions(+), 9 deletions(-) commit c9ae6e1691cd1dcd5f7f76050b5eca16bc82445e Author: Nikola Cornij Date: Tue Apr 2 12:40:22 2019 -0400 drm/amd/display: Acquire DSC HW resource only if required by stream [why] There are ASICs that have fewer DSC engines than pipes, which makes DSC a resource that should be used only if required. [how] Acquire DSC HW resource if required by stream and release when not required anymore. Signed-off-by: Nikola Cornij Reviewed-by: Wenjing Liu Acked-by: Leo Li Acked-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 19 ++- .../gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 139 ++++++++++++--------- .../gpu/drm/amd/display/dc/dcn20/dcn20_resource.h | 2 + drivers/gpu/drm/amd/display/dc/inc/core_types.h | 10 ++ 4 files changed, 97 insertions(+), 73 deletions(-) commit 0d7bd17c6e7146df6de8c37b3fbc91dbaa138014 Author: hersen wu Date: Wed Apr 10 16:19:09 2019 -0400 drm/amd/display: Disable display writeback on Linux for NV10 [WHY] system crash when initialize dwb current linux driver does not support dwb. disable this feature for now. [HOW] set num_dwb = 0 to disable dwb for now Signed-off-by: hersen wu Reviewed-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b37727fb148612ca11568a8c83c143e1d991571c Author: hersen wu Date: Wed Apr 10 15:17:40 2019 -0400 drm/amd/display: Add vupdate interrupt sources to NV10 [WHY] linux upstream already has interrupt vupdate for freesync in dcn10. dcn20 interrupt shares the same source code as dcn10. but dcn20 interrupt translator does not add vupdate interrupt. this cause index of vupdate aarray be negative which causes crash. [HOW] add vupdate into dc interrupt transltor Signed-off-by: hersen wu Reviewed-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/irq/dcn20/irq_service_dcn20.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit c92b4c46c164fbc05b72543b76222b8468f9fad3 Author: Nikola Cornij Date: Wed Apr 3 12:17:34 2019 -0400 drm/amd/display: Mark DSC resource as unused after copying to the secondary ODM pipe [why] DSC resource has to be acquired before it can be used and simply copying a reference to it is very likely to cause problems when accessing DSC. [how] Set DSC resource pointer to NULL to mark it as unused after primary pipe resources were copied to the secondary ODM pipe. Signed-off-by: Nikola Cornij Reviewed-by: Dmytro Laktyushkin Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 3 +++ 1 file changed, 3 insertions(+) commit 5940ff3941c8917d04b1485e9ac9ae03da498393 Author: Tyler DiBattista Date: Mon Apr 1 15:20:44 2019 -0400 drm/amd/display: Change Min fclk to 1.2Ghz [Why] Some nightly tests are failing since the new value for fclk is a bit too low. Also, a new test for the maximum downscale case was needed. [How] Updated the default value for fclk to be 1.2GHz. Signed-off-by: Tyler DiBattista Reviewed-by: Eric Bernstein Acked-by: Bhawanpreet Lakha Acked-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6c5be4ac630805d3a3b20157a0c6421ef815fe78 Author: Wenjing Liu Date: Tue Mar 5 19:28:10 2019 -0500 drm/amd/display: add global master update lock for DCN2 [why] when an update programming sequence requires both front end and back end pipe to be updated synchronously, a global update lock needs to be set to ensure that we don't get a frame with only front end update but not the back end update. [how] setup global lock parameters on enable_stream_timing. enable global lock when pipe_control_lock_global is called. disable global lock when pipe_control_lock is called. Signed-off-by: Wenjing Liu Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 4 ++ drivers/gpu/drm/amd/display/dc/dcn20/dcn20_optc.c | 63 +++++++++++++++++++++- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_optc.h | 3 ++ .../drm/amd/display/dc/inc/hw/timing_generator.h | 2 + drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 1 + 5 files changed, 72 insertions(+), 1 deletion(-) commit 64f223b0dd120040ce74b0e2d493ee676c921c4a Author: Yongqiang Sun Date: Tue Apr 2 10:05:46 2019 -0400 drm/amd/display: Remove REFCYC regs [Why] Some register fields are not needed. [How] remove them Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubp.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 42351c66aedcd142de33c0ae17bbde09eaff1b3d Author: Joshua Aberback Date: Mon Apr 1 15:21:24 2019 -0400 drm/amd/display: Add profiling tools for bandwidth validation [Why] We used this change to investigate the performance of bandwidth validation, it will be useful to have if we need to investigate further. [How] We use performance counter tick numbers to profile performance, they live at dc->debug.bw_val_profile (set .enable in debugger to turn on measuring). Signed-off-by: Joshua Aberback Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 254eb07cb090374d0e1e90790395ead77f6f6ad5 Author: Joshua Aberback Date: Mon Apr 1 15:18:29 2019 -0400 drm/amd/display: Optimize bandwidth validation by adding early return We can split validation into three parts: getting voltage level, getting watermarks, and rq/dlg calculations. The voltage level is enough to answer the question "do we support this state", and the rest of it is to determine what hardware programming is needed to support the state. Most of the calls to validate_bandwidth only care about the first part, so we added an early return in that case Signed-off-by: Joshua Aberback Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 11 +++---- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 3 +- .../gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 35 ++++++++++++++++------ 3 files changed, 31 insertions(+), 18 deletions(-) commit 776c1f569f94e39a1776c22f29137661f294ff03 Author: Leo Li Date: Mon Mar 25 21:11:07 2019 -0400 drm/amd/display: Properly guard display_mode_vba with DCN2 [Why] display_mode_vba is for DCN2 and up. When building for upstream (DCN1 enabled only), there will be a build error, since display_mode_vba.c/h is stripped out. Note that building DCN1 only with internal dal-dev is still fine, since display_mode_vba.h is not stripped out internally - only in upstream. The make directives therefore stll work, and so will any #include's. [How] Since subsequent generations require DCN2 enabled anyways, guard the makefile directive for display_mode_vba.o with DCN2. Guard any includes with DCN2. In addition, guard the entire contents of display_mode_vba.h with DCN2, to simulate the file being stripped out in upstream. A forward declaration for 'struct display_mode_lib' also needs to be added in display_mode_lib.h. Previously, display_mode_vba.h contained the forward declaration, and display_mode_lib.h in turn included it. This won't work if mode_vba.h is stripped out, requring mode_lib.h to do so itself. Signed-off-by: Leo Li Reviewed-by: Harry Wentland Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/Makefile | 7 ++++--- drivers/gpu/drm/amd/display/dc/dml/display_mode_lib.h | 4 ++++ drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.h | 3 +++ 3 files changed, 11 insertions(+), 3 deletions(-) commit 10b3aa5eb1ea2fc810d2b7fc1947c8f0f8ddf55a Author: Leo Li Date: Thu Mar 28 12:14:05 2019 -0400 drm/amd/display: Guard DML_FAIL_DSC_VALIDATION_FAILURE [Why] Usage of this enum is DSC-only. [How] Guard it with CONFIG_DRM_AMD_DC_DSC_SUPPORT. Signed-off-by: Leo Li Reviewed-by: Harry Wentland Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/display_mode_enums.h | 2 ++ 1 file changed, 2 insertions(+) commit 83a76b53737e5e0ad52606aefa69ac9ce307b697 Author: Vitaly Prosyak Date: Fri Mar 29 12:47:10 2019 -0500 drm/amd/display: Add 3dlut control flags [Why & How] The follow up change Improve some naming for fields and structs Signed-off-by: Vitaly Prosyak Reviewed-by: Aric Cyr Acked-by: Bhawanpreet Lakha Acked-by: Vitaly Prosyak Signed-off-by: Alex Deucher .../gpu/drm/amd/display/modules/inc/mod_shared.h | 36 +++++++++++----------- 1 file changed, 18 insertions(+), 18 deletions(-) commit ede37e4ce4957166706f0fdb727ae912d6e65589 Author: Charlene Liu Date: Fri Mar 29 19:40:58 2019 -0400 drm/amd/display: fix can not turn on two displays due to DSC_RESOURCE failed. [Why] Can not turn on two displays at the same time with the asic having only one DSC. DC_DSC_RESOURCE allocation failed. [Solution] Only add_dsc if the timing is dsc capable based on diag_dc and num_dsc Signed-off-by: Charlene Liu Reviewed-by: Wesley Chalmers Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 8e27a2d4cd76095c80dbbf63548175659d4b9d76 Author: Ilya Bakoulin Date: Thu Mar 28 14:43:29 2019 -0400 drm/amd/display: Fix DCFCLK and SOCCLK not set [Why] If voltage level > 0, DCFCLK and SOCCLK could be 0 during DML calculations, which ended up causing an assert. [How] Initialize dcfclk_mhz and socclk_mhz values according to the voltage level. Signed-off-by: Ilya Bakoulin Reviewed-by: Dmytro Laktyushkin Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 4 ++++ 1 file changed, 4 insertions(+) commit 0213541d4b6b241a83611dd8324af024f87b5368 Author: Yongqiang Sun Date: Thu Mar 28 16:49:42 2019 -0400 drm/amd/display: DCN2 reg refactors Added some regs and exposed some functions for future use Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubp.c | 2 +- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubp.h | 47 ++++++++++++++++++++--- 2 files changed, 42 insertions(+), 7 deletions(-) commit adb732d66cf13b6c4276b498fab5dc5a09bebce1 Author: Vitaly Prosyak Date: Tue Mar 26 17:34:00 2019 -0500 drm/amd/display: Add some tm3dlut flags Move flags from color_gamma.h to mod_shared.h and add more options and setting structures Signed-off-by: Vitaly Prosyak Reviewed-by: Aric Cyr Acked-by: Bhawanpreet Lakha Acked-by: Vitaly Prosyak Signed-off-by: Alex Deucher .../drm/amd/display/modules/color/color_gamma.h | 12 ------- .../gpu/drm/amd/display/modules/inc/mod_shared.h | 37 ++++++++++++++++++++++ 2 files changed, 37 insertions(+), 12 deletions(-) commit 23882a693fe11228cfd38c74cd8db3e54edaef82 Author: Nikola Cornij Date: Thu Mar 28 17:40:18 2019 -0400 drm/amd/display: Make sure DSC slice height is divisible by 2 for 4:2:0 color format [why] DSC spec requires this Signed-off-by: Nikola Cornij Reviewed-by: Wenjing Liu Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit d438d113380eff1c27a1d239a9bd624e0fb15b6d Author: Nikola Cornij Date: Thu Mar 28 13:47:25 2019 -0400 drm/amd/display: Use 1/8th DSC target bitrate precision for N4:2:2 and 4:2:0 formats [why] On at least some of the devices (e.g. Realtek scaler) we get a black screen if 1/16th precision is used. [how] Work around it by reducing precision to 1/8th for N4:2:2 and 4:2:0 color formats. This is a safe workaround and would have a very mild impact on the quality. The issue is still to be root-caused and fixed correctly. Signed-off-by: Nikola Cornij Reviewed-by: Wenjing Liu Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c | 4 ++++ 1 file changed, 4 insertions(+) commit db5378c1dcff3391dac42d714e6064c80702fa3d Author: Wenjing Liu Date: Thu Mar 28 11:27:05 2019 -0400 drm/amd/display: isolate global double buffer lock programming [why] Global optic double buffer lock is currently disabled due to incorrect programming sequence that affects non global lock. [how] Isolate global lock programming sequence out of non global lock programming sequence, so it can be enabled without affecting non global lock. Signed-off-by: Wenjing Liu Reviewed-by: Jun Lei Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 19 ++++--- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_optc.c | 60 +++++++--------------- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_optc.h | 5 +- .../drm/amd/display/dc/inc/hw/timing_generator.h | 4 +- 4 files changed, 35 insertions(+), 53 deletions(-) commit 87029eb4fad8fd6a46e92886f350c2fe91c6a5e8 Author: Nikola Cornij Date: Wed Mar 27 18:54:19 2019 -0400 drm/amd/display: Remove additional FEC link bandwidth reduction [why] This is now done in the original link bandwidth calculation and DSC must not do this anymore. [how] Remove the line of code that should have been removed when transition to correctly applying FEC overhead was made. Signed-off-by: Nikola Cornij Reviewed-by: Wenjing Liu Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit b7d39c5878776cd936cf3d72f60e89dbd39dc56c Author: Tony Cheng Date: Fri Mar 22 14:22:07 2019 -0400 drm/amd/display: move dsc clock from plane_resource to stream_resource code restructure. Signed-off-by: Tony Cheng Reviewed-by: Dmytro Laktyushkin Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) commit 0ff8dfe8f8f2387ed58f922f0653e531ec184ee4 Author: Dmytro Laktyushkin Date: Thu Mar 21 15:24:53 2019 -0400 drm/amd/display: fix fpga fclk programming We shouldnt need overhead on top of dppclk when setting fclk. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Eric Bernstein Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 96454cfb4fbe84948cfa84a538550f1429ce441f Author: Wenjing Liu Date: Tue Mar 26 14:36:52 2019 -0400 drm/amd/display: remove target_dpp hack for dsc Remove dc_dsc hack for MST policy Signed-off-by: Wenjing Liu Reviewed-by: Nikola Cornij Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) commit 390fdfbd2d6578dc54b234a801cfc8da05641eda Author: Wenjing Liu Date: Sat Mar 23 16:28:31 2019 -0400 drm/amd/display: remove legacy DSC functions [why] Clean up some dsc legacy functions that are no longer needed. [how] remove two dsc functions in dc_dsc, use dc_bandwidth_in_kbps_from_timing instead of calc_required_bandwidth_for_timing. Signed-off-by: Wenjing Liu Reviewed-by: Nikola Cornij Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc_dsc.h | 10 --- drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c | 123 ++-------------------------- 2 files changed, 9 insertions(+), 124 deletions(-) commit 2e2e73fc632d34b0cec612dc5df0ba64cc98df9a Author: Joshua Aberback Date: Tue Mar 26 15:04:31 2019 -0400 drm/amd/display: Remove dependency on pipe->plane for immedaite flip status [Why] dcn20_apply_ctx_for_surface can be called with 0 planes, which means we should blank the display. In this case when we get down to dcn20_setup_gsl_group_as_lock, pipe_ctx->plane_state is NULL, but we don't check for it. However, this function is only called by dcn20_pipe_control_lock, and in that function we alraedy have a local for the immediate flip status, which is what we care about in the plane state. [How] - pass in immediate flip status as parameter Signed-off-by: Joshua Aberback Reviewed-by: Krunoslav Kovac Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 9 +++++---- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.h | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) commit 0ba37b20ef1c587a24f0f8060f32a4d56f4d65df Author: Dmytro Laktyushkin Date: Tue Mar 26 13:26:37 2019 -0400 drm/amd/display: fix dsc validation Currently dsc is validated not taking the image width limitation into mind. This change addresses that, but due to previous design being limited to non odm dsc validation additional sequence changes are made. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Nikola Cornij Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dsc.c | 5 ++ drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dsc.h | 2 + .../gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 91 ++++++++++++---------- .../gpu/drm/amd/display/dc/dcn20/dcn20_resource.h | 1 - .../drm/amd/display/dc/dml/display_mode_enums.h | 1 + 5 files changed, 60 insertions(+), 40 deletions(-) commit 173932dec76fbf9f8e5a75a74ccbffc186ce0a4a Author: Aidan Wood Date: Fri Mar 22 14:45:12 2019 -0400 drm/amd/display: Properly set u clock [Why] u clk set request was being sent in units of mts, when it needed to be in units of Mhz [How] add a division by 16 to convert from mts to Mhz Signed-off-by: Aidan Wood Reviewed-by: Jun Lei Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c2ad17c3b2657b476044582e875c88b750011bba Author: Aidan Wood Date: Fri Mar 22 14:21:35 2019 -0400 drm/amd/display: Properly set DCF clock [Why] If num_states == 0 we did update_bound_box which doesn't updated any max clocks if num_states == 0, therefore we need to do cap_soc_clocks instead, also SMU cannot set DCF clock to a higher than or equal to freq than SOC clock [How] Add a num_states != 0 check for update_bounding_box to be run, and after we run get_maximum_sustainable_clocks we now check if the reported max value of DCF is higher than SOC and if necessary set it to 1000 (becomes 1 after division by 1000) lower than SOC Signed-off-by: Aidan Wood Reviewed-by: Aric Cyr Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit c2bcd914a2a7917442daf20a7b33d690f5903bea Author: Nikola Cornij Date: Tue Mar 19 19:47:32 2019 -0400 drm/amd/display: Calculate link bandwidth in a common function [why] Currently link bandwidth is calculated in various places using the same multi-step formula. Doing this in one common place makes sure the same formula will indeed be applied to all link bandwidth calculations. It also makes it possible to apply link-setting-specific adjustments that affect effective link bandwidth. [how] Replace all implementations of link bandwidth calculation with a call to a function. Signed-off-by: Nikola Cornij Reviewed-by: Nikola Cornij Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 5 ----- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dsc.c | 3 ++- drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c | 14 +++++--------- 3 files changed, 7 insertions(+), 15 deletions(-) commit c5d3a38b1a18a0bcdfd4cc54e4396cce2aabc968 Author: Vitaly Prosyak Date: Tue Mar 19 15:46:50 2019 -0500 drm/amd/display: Add a flags union for 3dlut transformation matrix [Why & How] When TM is enabled with 3dlut, we apply conversion to dcip3 in gamut remap matrix, if source area less than dcip3. If it is bigger, we remap to bt2020. The added flags will be used to facilitate this logic. Signed-off-by: Vitaly Prosyak Reviewed-by: Aric Cyr Acked-by: Krunoslav Kovac Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/modules/color/color_gamma.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 00999d991fdebc1ee2d0b06342c6d10e3c51d4c8 Author: Dmytro Laktyushkin Date: Mon Mar 18 18:20:56 2019 -0400 drm/amd/display: clean up validation failure log spam Currently dcn2+ validation will unconditionally print a failure reason before validation completes. This change categorizes the failure reason as a warning log and only prints at the end of validation resolving false positives. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Nikola Cornij Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 3 +++ drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.c | 12 +----------- 2 files changed, 4 insertions(+), 11 deletions(-) commit 0cd3262566797b3c2de5a180b32fa820808f7f1a Author: Bob Yang Date: Mon Mar 18 11:44:52 2019 +0800 drm/amd/display: fixed DCC corruption [Description] swath_bytes_horz_wc should be 256/64/64 for 2160p 32bpp surface Signed-off-by: Bob Yang Reviewed-by: Charlene Liu Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubbub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4e0cbbbfbc37fd5a8bdf653a1ebb7b271a506e2d Author: Leo Li Date: Wed Mar 20 09:52:14 2019 -0400 drm/amd/display: Clean up locking in dcn*_apply_ctx_for_surface() [Why] dcn*_disable_plane() doesn't unlock the pipe anymore, making the extra lock unnecessary. In addition - during full plane updates - all necessary pipes should be locked/unlocked together when modifying hubp to avoid tearing in pipesplit setups. [How] Remove redundant locks, and add function to lock all pipes. If an interdependent pipe update is required, lock down all pipes. Otherwise, lock only the top pipe for the updated pipe tree. Signed-off-by: Leo Li Acked-by: Hawking Zhang Signed-off-by: Alex Deucher .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 11 +++--- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 46 ++++++++-------------- 2 files changed, 22 insertions(+), 35 deletions(-) commit 1b394e92a149db7ec277b7cc995888304149a5b1 Author: Leo Li Date: Fri Mar 15 13:50:26 2019 -0400 drm/amd/display: Disconnect DCN2 mpcc when changing tg A previous fix was done for DCN1 that needed to be ported to DCN2: commit 60c677534e73 ("drm/amd/display: Disconnect mpcc when changing tg") Signed-off-by: Leo Li Acked-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 38354495d7cedaf4a20c526b692d86916fb2c6d3 Author: Hawking Zhang Date: Thu Mar 14 23:46:51 2019 +0800 drm/amd/display: enable DSC support by default Enable DSC (display stream compression) by default. Signed-off-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ec8763486dd3d2fb585c2e6747520406e7dcef98 Author: hersen wu Date: Wed Mar 13 16:25:37 2019 -0400 drm/amd/display: navi10 bring up skip dsc encoder config not needed for bring up. Signed-off-by: hersen wu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_stream_encoder.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 9e14d4f17e23ce46d346a6a22a295b4a65b9d918 Author: hersen wu Date: Wed Mar 13 16:21:26 2019 -0400 drm/amd/display: skip dsc config for navi10 bring up [why] we meet a bug when program dsc register even dsc mode is not enabled. disable dsc config for now. we will re-visit this issue. Signed-off-by: hersen wu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_optc.c | 9 +++++++++ drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) commit 0fcf90d1775e09fbee2afe40a43f6400c103ac55 Author: hersen wu Date: Wed Mar 13 16:19:17 2019 -0400 drm/amd/display: do not need otg lock if otg is not active [todo] need find caller bug. tempooariy fix Signed-off-by: hersen wu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 96cb7cf13d8530099c256c053648ad576588c387 Author: hersen wu Date: Thu Feb 28 16:35:24 2019 -0500 drm/amd/display: disable dcn20 abm feature for bring up [WHY] dcn20 enable usb-c dp ALT mode in dmcu. There is bug when enable abm feature which cause system crash. dal team will debug this bug later. [HOW] disable dcn abm feature for dcn20. Signed-off-by: hersen wu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit bcba830ce7cddb225fd19ecb857ce2b26ebc28b7 Author: Eric Bernstein Date: Wed May 8 16:08:39 2019 -0400 drm/amd/display: Refactor DIO stream encoder * Pull duplicate audio_clock_info struct to stream_encoder.h * Generalize sec_gsp7* to sec_gsp_pps* * Expose enc1 and enc2 stream encoder audio funcs Signed-off-by: Eric Bernstein Reviewed-by: Charlene Liu Reviewed-by: Dmytro Laktyushkin Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 4 ++-- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_stream_encoder.c | 9 ++++----- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_stream_encoder.h | 10 ++++++++++ drivers/gpu/drm/amd/display/dc/inc/hw/stream_encoder.h | 4 ++-- 4 files changed, 18 insertions(+), 9 deletions(-) commit 6ba117404e4121ddd043201706f9b4b8dc718036 Author: Jun Lei Date: Thu May 16 15:23:20 2019 -0400 drm/amd/display: fix pstate allow handling in dcn2 [why] pstate allow/block is not being handled properly on DCN2 [how] DML needs to be updated to calculate pstate support at both min and max mpc combine rather than just min clock manager needs to update current to new pstate support before sending to pplib/smu Signed-off-by: Jun Lei Reviewed-by: Dmytro Laktyushkin Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c | 7 +++++-- .../gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20.c | 12 ++++-------- 2 files changed, 9 insertions(+), 10 deletions(-) commit 5cb646d767bb3d1d85c9828afad505bb9ee1982a Author: Ilya Bakoulin Date: Fri Apr 12 16:47:08 2019 -0400 drm/amd/display: Add writeback_config to VBA vars Adding writeback_config enum to vba_vars_st, replacing old flag. Initialize to dm_normal. Signed-off-by: Ilya Bakoulin Reviewed-by: Charlene Liu Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/display_mode_structs.h | 1 + drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.c | 2 +- drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) commit c69dd2d06cdfb1bb8c6cd0ebfb3cc1e502b9de3a Author: Eric Yang Date: Wed May 8 19:06:30 2019 -0400 drm/amd/display: Refactor clk_mgr functions [Why] Some HW specific implementations can be pulled out into clk_mgr.c. [How] - Pull get_active_display_cnt out to clk_mgr. - Pull out shared logic in set_dispclk and set_dprefclk Signed-off-by: Eric Yang Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c | 25 ++++++++++ .../drm/amd/display/dc/clk_mgr/dcn10/rv1_clk_mgr.c | 25 +--------- .../dc/clk_mgr/dcn10/rv1_clk_mgr_vbios_smu.c | 58 +++++++++++----------- .../amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c | 43 +++++----------- .../amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.h | 2 + 5 files changed, 71 insertions(+), 82 deletions(-) commit 8712bda45cdc9e40f92c5a513489a13de38cfdc0 Author: Charlene Liu Date: Thu May 9 13:04:07 2019 -0400 drm/amd/display: dcn2 dmcu wait_for_loop update with dispclk. [Description] DMUB is using DPREF CLK, but DMCU still use displayclk. This is for updating DMCU wait_for_loop after display clock change. Signed-off-by: Charlene Liu Reviewed-by: Krunoslav Kovac Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c | 2 ++ 1 file changed, 2 insertions(+) commit 45021f8ea536b5d40decf35af6f91116dd112787 Author: Anthony Koo Date: Fri May 10 14:57:48 2019 -0400 drm/amd/display: do not power on eDP power rail early [Why] Modern Standby may toggle display adapter state between D0 and D3 state unpredictably. But events that cause transition to D0 are not always resulting in a display light up scenario. Modern eDP panels should be able to power on panel logic quickly upon VDD going high. Based on spec, the T3 time between VDD on and HPD high can be between 0 and 80 ms. Doing any tricky sorts of optimization by powering on panel VDD early during D0 transition on can negatively impact other features due to unnecessary power drain and toggling when final system state does not intend for the panel to be lit up. We need OEMs to source higher end panels that have T3 time close to 0 if they want quick S3/Modern Standby resume times. [How] Remove panel VDD power on in init_hw Signed-off-by: Anthony Koo Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 3 --- 1 file changed, 3 deletions(-) commit bedbbe6af4bee062c7d035c424826190aab602a0 Author: Chris Park Date: Fri May 10 13:34:30 2019 -0400 drm/amd/display: Move link functions from dc to dc_link [Why] link-specific functions should reside in dc_link.c [How] Move them there. Signed-off-by: Chris Park Reviewed-by: Charlene Liu Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit f18bc4e53ad60d31321f7a35a714ebadc7135acf Author: Jun Lei Date: Thu May 9 15:32:27 2019 -0400 drm/amd/display: update calculated bounding box logic for NV [why] Current calculation of bounding box will cause DML to increase voltage state due to DPP or DISPCLK, this is unnecessary since from DML perspective we can max DPP/DISP can be supported at DPM0. This is because increasing voltage for DPP/DISP is done separately via actual minimum values of DISP and DPP CLK [how] For each calculated state, DPP, DISP, PHY, and DSC clk should always be set to maximum. FCLK, SOCCLK, and DCFCLK should be based of UCLK. Signed-off-by: Jun Lei Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 55 ++++++++++------------ 1 file changed, 24 insertions(+), 31 deletions(-) commit 98b5b65eb8b7136489ba42ae4598f5ed799fa936 Author: Paul Hsieh Date: Tue May 7 17:58:58 2019 +0800 drm/amd/display: disable PSR/ABM before destroy DMCU struct [Why] 1. DMCU is not running on some platform but driver still send ABM command. It may cause assert due to DMCU is not alive. 2. To make sure PSR disable when driver disable [How] 1. Add dmcu_is_running in ABM struct, driver can check this flag to determine driver should send ABM command or not. 2. Send PSR disable command when destroy PSR Signed-off-by: Paul Hsieh Reviewed-by: Anthony Koo Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 3 +++ 1 file changed, 3 insertions(+) commit ae8f425840cb642873ff97b7a6711aad42766133 Author: Eryk Brol Date: Tue Apr 23 11:53:52 2019 -0400 drm/amd/display: Ensure DRR triggers in BP [Why] In the previous implementation DRR event sometimes came in during FP2 region which is a keep-out zone. This would cause the frame not to latch until the next frame which resulted in heavy flicker. To fix this we need to make sure that it triggers in the BP. [How] 1. Remove DRR programming during flip 2. Setup manual trigger for DRR event and trigger it after surface programming is complete Signed-off-by: Eryk Brol Reviewed-by: Aric Cyr Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_optc.c | 31 ++++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dcn20/dcn20_optc.h | 7 +++-- .../drm/amd/display/dc/inc/hw/timing_generator.h | 1 + 3 files changed, 37 insertions(+), 2 deletions(-) commit 284358f2acc189fa99088819cfdf93daf97a147d Author: hersen wu Date: Sat Jun 1 18:23:38 2019 -0400 drm/amd/display/dc: fix azalia workaround sw implementation bug caller of pp_nv_set_pme_wa_enable pass incorrect pp_smu: dc->res_pool->pp_smu. it should be dc->res_pool->pp_smu->nv_funcs.pp_smu. with incorrect input, pp->dm = NULL. This causes system crash. Signed-off-by: hersen wu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3972c3508594310eb868f0e57c44cf0b6fccf7b2 Author: Joshua Aberback Date: Mon Apr 29 17:21:19 2019 -0400 drm/amd/display: Program VTG params after programming Global Sync for DCN2 [Why] VTG has a parameter FP2, which is defined as: if VSTARTUP is before VSYNC: FP2 = number of lines in between VSTARTUP and VSYNC else FP2 = 0 Currently, FP2 is only programmed during "program_timing". However, the position of VSTARTUP is affected by the prefetching requirements on all pipes, so the position might change when we do memory request control on another pipe, so we need to make sure that FP2 stays up-to-date whenever we adjust VSTARTUP. [How] - refactor VTG_CONTROL programming into a new function "set_vtg_params" - call it after calling "program_global_sync" - make sure it's called after because it relies on the cached dlg params Signed-off-by: Joshua Aberback Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Acked-by: Jun Lei Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 6 ++++++ drivers/gpu/drm/amd/display/dc/dcn20/dcn20_optc.c | 1 + 2 files changed, 7 insertions(+) commit 97bda0322b8a91aa8d534763e709571b2334e585 Author: Harry Wentland Date: Mon Feb 25 13:26:34 2019 -0500 drm/amd/display: Add DSC support for Navi (v2) Add support for DCN2 DSC (Display Stream Compression) HW Blocks: +--------++------+ +----------+ | HUBBUB || HUBP | <-- | MMHUBBUB | +--------++------+ +----------+ | ^ v | +--------+ +--------+ | DPP | | DWB | +--------+ +--------+ | v ^ +--------+ | | MPC | | +--------+ | | | v | +-------+ +-------+ | | OPP | <--> | DSC | | +-------+ +-------+ | | | v | +--------+ / | OPTC | -------------- +--------+ | v +--------+ +--------+ | DIO | | DCCG | +--------+ +--------+ v2: rebase (Alex) Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/Kconfig | 10 + .../drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 10 + drivers/gpu/drm/amd/display/dc/Makefile | 3 + drivers/gpu/drm/amd/display/dc/core/dc.c | 21 + drivers/gpu/drm/amd/display/dc/core/dc_link.c | 51 ++ drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 153 ++++ drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c | 145 ++++ drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 10 + drivers/gpu/drm/amd/display/dc/dc.h | 24 + drivers/gpu/drm/amd/display/dc/dc_dp_types.h | 14 + drivers/gpu/drm/amd/display/dc/dc_dsc.h | 61 ++ drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 18 + drivers/gpu/drm/amd/display/dc/dc_link.h | 10 + drivers/gpu/drm/amd/display/dc/dc_stream.h | 6 + drivers/gpu/drm/amd/display/dc/dc_types.h | 69 ++ .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 58 ++ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c | 18 + drivers/gpu/drm/amd/display/dc/dcn20/Makefile | 4 + drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dsc.c | 688 ++++++++++++++++ drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dsc.h | 573 +++++++++++++ drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 93 +++ .../drm/amd/display/dc/dcn20/dcn20_link_encoder.c | 20 + .../drm/amd/display/dc/dcn20/dcn20_link_encoder.h | 3 + drivers/gpu/drm/amd/display/dc/dcn20/dcn20_optc.c | 38 + drivers/gpu/drm/amd/display/dc/dcn20/dcn20_optc.h | 6 + .../gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 184 +++++ .../amd/display/dc/dcn20/dcn20_stream_encoder.c | 168 ++++ drivers/gpu/drm/amd/display/dc/dm_helpers.h | 7 + drivers/gpu/drm/amd/display/dc/dsc/Makefile | 13 + drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c | 899 +++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dsc/drm_dsc_dc.c | 382 +++++++++ drivers/gpu/drm/amd/display/dc/dsc/dsc_helpers.c | 243 ++++++ drivers/gpu/drm/amd/display/dc/dsc/dscc_types.h | 54 ++ drivers/gpu/drm/amd/display/dc/dsc/qp_tables.h | 706 ++++++++++++++++ drivers/gpu/drm/amd/display/dc/dsc/rc_calc.c | 258 ++++++ drivers/gpu/drm/amd/display/dc/dsc/rc_calc.h | 85 ++ drivers/gpu/drm/amd/display/dc/dsc/rc_calc_dpi.c | 147 ++++ drivers/gpu/drm/amd/display/dc/inc/core_status.h | 5 + drivers/gpu/drm/amd/display/dc/inc/core_types.h | 9 + drivers/gpu/drm/amd/display/dc/inc/dc_link_dp.h | 6 + drivers/gpu/drm/amd/display/dc/inc/hw/dsc.h | 101 +++ drivers/gpu/drm/amd/display/dc/inc/hw/hw_shared.h | 7 + .../gpu/drm/amd/display/dc/inc/hw/link_encoder.h | 13 + .../gpu/drm/amd/display/dc/inc/hw/stream_encoder.h | 22 + .../drm/amd/display/dc/inc/hw/timing_generator.h | 6 + drivers/gpu/drm/amd/display/dc/inc/resource.h | 3 + .../display/dc/virtual/virtual_stream_encoder.c | 10 + drivers/gpu/drm/amd/display/include/logger_types.h | 6 + 48 files changed, 5440 insertions(+) commit b4f199c7b00c87183f10c0a8f635f26ba2ede3eb Author: Harry Wentland Date: Tue Feb 26 16:25:27 2019 -0500 drm/amdgpu: Enable DC support for Navi10 Enable the IP for navi10. Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++ drivers/gpu/drm/amd/amdgpu/nv.c | 2 ++ 2 files changed, 5 insertions(+) commit 476e955dd679673c81c35f383ffff8f7dbd70d97 Author: Harry Wentland Date: Fri Feb 22 16:52:52 2019 -0500 drm/amd/display: Hook DCN2 into amdgpu_dm and expose as config (v2) Enable DCN2 support in DM (Display Manager). v2: fix spurious raven change (Alex) Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/Kconfig | 9 +++++++++ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 14 ++++++++++++++ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c | 2 +- 3 files changed, 24 insertions(+), 1 deletion(-) commit 5b1b2f209f0d9085df5f34712d004ddf792c2be5 Author: Alex Deucher Date: Mon Apr 22 16:49:04 2019 -0500 drm/amd/display: update dcn2 dc_plane_cap To deal with rebasing the code. Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) commit e249428256e2b6d18936d139a3f9a2893ed74955 Author: Alex Deucher Date: Mon Apr 22 16:41:54 2019 -0500 drm/amd/display: updates for dcn20_update_bandwidth Pass extra parameter to validate_bandwidth() callback. Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cb0b554abeace43819c5d0f1f50751f5f0dbd7cc Author: Alex Deucher Date: Mon Apr 22 16:38:24 2019 -0500 drm/amd/display: add fast_validate parameter to dcn20_validate_bandwidth To deal with changes from rebasing. Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 4 +++- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) commit 79a7b060d8dc23069ef487f650eff4adc2336a12 Author: hersen wu Date: Thu May 23 13:23:25 2019 -0400 drm/amd/display: hook navi10 pplib functions during bring up time, before window dc-ppplib interface design, linux dc use raven dc-pplib interface. now nvai10 dc-pplib-smu interface is changed and verified under window, navi10 need its specific dc-pplib-smu interface. todo: hook set_hard_min_uclk_by_freq, get_maximum_sustainable_clocks Signed-off-by: hersen wu Acked-by: Alex Deucher Reviewed-by: Roman Li Signed-off-by: Alex Deucher .../drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c | 279 ++++++++++++++++++++- 1 file changed, 271 insertions(+), 8 deletions(-) commit be9a7355e9ee90016054614d7bbd1eb488de47a1 Author: hersen wu Date: Tue May 21 15:02:23 2019 -0400 drm/amd/powerplay: add interface to get uclk dpm table dc needs get uclk dpm table for bandwidth calculation Signed-off-by: hersen wu Acked-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 4 ++++ 1 file changed, 4 insertions(+) commit a18bf0ca41a9a40cb80b9118eac045e7087a18db Author: hersen wu Date: Tue May 21 13:07:57 2019 -0400 drm/amd/powrplay: add interface for dc to get max clock values dc (display component) needs maximum clock values of uclock, socclk, dcefclk, to calculate display bandwidth. Signed-off-by: hersen wu Acked-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 4 ++++ drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 31 ++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) commit 92ad6325cb891bb455487bfe90cc47d18aa6ec37 Merge: e0effb5fbd56 c356dc4b540e Author: David S. Miller Date: Sat Jun 22 08:59:24 2019 -0400 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Minor SPDX change conflict. Signed-off-by: David S. Miller commit bad5b5e707a58db9a65d59f7706314012a8e3219 Author: Tomasz Figa Date: Fri Jun 21 13:13:52 2019 +0200 extcon: Add fsa9480 extcon driver This patch adds extcon driver for Fairchild Semiconductor FSA9480 microUSB switch. Signed-off-by: Tomasz Figa Signed-off-by: Jonathan Bakker Signed-off-by: Paweł Chmiel Signed-off-by: Chanwoo Choi drivers/extcon/Kconfig | 12 ++ drivers/extcon/Makefile | 1 + drivers/extcon/extcon-fsa9480.c | 395 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 408 insertions(+) commit fd757dbac5f6c42f45b1a29a354255045a655a27 Author: Tomasz Figa Date: Fri Jun 21 13:13:51 2019 +0200 dt-bindings: extcon: Add support for fsa9480 switch This patch adds documentation for binding of extcont Fairchild Semiconductor FSA9480 microusb switch. This usb port accessory detector and switch, can be found for example in some Samsung s5pv210 based phones. Signed-off-by: Tomasz Figa Signed-off-by: Paweł Chmiel Acked-by: Chanwoo Choi Signed-off-by: Chanwoo Choi .../devicetree/bindings/extcon/extcon-fsa9480.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 62de37da9f382455b983f2f92b10012109005278 Author: Mika Westerberg Date: Thu Jun 20 15:26:29 2019 +0300 mtd: spi-nor: intel-spi: Convert to use SPDX identifier This gets rid of the license boilerplate duplicated in each file. No functional changes intended. Signed-off-by: Mika Westerberg Signed-off-by: Tudor Ambarus drivers/mtd/spi-nor/intel-spi-pci.c | 5 +---- drivers/mtd/spi-nor/intel-spi-platform.c | 5 +---- drivers/mtd/spi-nor/intel-spi.c | 5 +---- drivers/mtd/spi-nor/intel-spi.h | 5 +---- include/linux/platform_data/intel-spi.h | 5 +---- 5 files changed, 5 insertions(+), 20 deletions(-) commit ba0d4e04a5b57ef048dbf3afd9107ae6ca353258 Author: Mika Westerberg Date: Thu Jun 20 15:26:28 2019 +0300 mtd: spi-nor: intel-spi: Add support for Intel Elkhart Lake SPI serial flash Intel Elkhart Lake has the same SPI serial flash controller as Ice Lake. Add Elkhart Lake PCI ID to the driver list of supported devices. Signed-off-by: Mika Westerberg Signed-off-by: Tudor Ambarus drivers/mtd/spi-nor/intel-spi-pci.c | 1 + 1 file changed, 1 insertion(+) commit d880fa6627483822bee2ebf170901ad51623b9a2 Author: Russell King Date: Sat Jul 14 11:17:49 2018 +0100 drm/armada: use mode_valid to validate the adjusted mode Validate the adjusted mode in the CRTC mode_fixup() call to ensure that any encoder or bridge doesn't supply us with a mode we can't support. Signed-off-by: Russell King drivers/gpu/drm/armada/armada_crtc.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit 1ba246f2fd2f6e6647b29e362a7d8c235e7fe9a7 Author: Russell King Date: Sat Jul 14 11:15:35 2018 +0100 drm/armada: improve Dove clock selection Improve the Dove (Armada 510) LCD clock selection and divider calculation, limiting to the valid divisor values, and reporting an error if the clock is not achievable within the bounds of HDMI clocking requirements. Signed-off-by: Russell King drivers/gpu/drm/armada/armada_510.c | 121 +++++++++++++++++++++++++---------- drivers/gpu/drm/armada/armada_crtc.c | 78 +++++++++++++++++++++- drivers/gpu/drm/armada/armada_crtc.h | 21 +++++- 3 files changed, 183 insertions(+), 37 deletions(-) commit 7586addb99322faf4d096fc8beb140f879409212 Author: Sebastian Andrzej Siewior Date: Fri Jun 21 16:36:43 2019 +0200 posix-timers: Use spin_lock_irq() in itimer_delete() itimer_delete() uses spin_lock_irqsave() to obtain a `flags' variable which can then be passed to unlock_timer(). It uses already spin_lock locking for the structure instead of lock_timer() because it has a timer which can not be removed by others at this point. The cleanup is always performed with enabled interrupts. Use spin_lock_irq() / spin_unlock_irq() so the `flags' variable can be removed. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20190621143643.25649-3-bigeasy@linutronix.de kernel/time/posix-timers.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 12063d431078be73d11cb5e48a17c6db5f0d8254 Author: Sebastian Andrzej Siewior Date: Fri Jun 21 16:36:42 2019 +0200 posix-timers: Remove "it_signal = NULL" assignment in itimer_delete() itimer_delete() is invoked during do_exit(). At this point it is the last thread in the group dying and doing the clean up. Since it is the last thread in the group, there can not be any other task attempting to lock the itimer which means the NULL assignment (which avoids lookups in __lock_timer()) is not required. The assignment and comment was copied in commit 0e568881178ff ("[PATCH] fix posix-timers to have proper per-process scope") from sys_timer_delete() which was/is the syscall interface and requires the assignment. Remove the superfluous ->it_signal = NULL assignment. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20190621143643.25649-2-bigeasy@linutronix.de kernel/time/posix-timers.c | 5 ----- 1 file changed, 5 deletions(-) commit 4c54294d01e605a9f992361b924c5d8b12822a6d Author: Jason A. Donenfeld Date: Fri Jun 21 22:32:49 2019 +0200 timekeeping: Add missing _ns functions for coarse accessors This further unifies the accessors for the fast and coarse functions, so that the same types of functions are available for each. There was also a bit of confusion with the documentation, which prior advertised a function that has never existed. Finally, the vanilla ktime_get_coarse() was omitted from the API originally, so this fills this oversight. Signed-off-by: Jason A. Donenfeld Signed-off-by: Thomas Gleixner Reviewed-by: Arnd Bergmann Link: https://lkml.kernel.org/r/20190621203249.3909-3-Jason@zx2c4.com Documentation/core-api/timekeeping.rst | 10 +++++++--- include/linux/timekeeping.h | 28 ++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 3 deletions(-) commit 9285ec4c8b61d4930a575081abeba2cd4f449a74 Author: Jason A. Donenfeld Date: Fri Jun 21 22:32:48 2019 +0200 timekeeping: Use proper clock specifier names in functions This makes boot uniformly boottime and tai uniformly clocktai, to address the remaining oversights. Signed-off-by: Jason A. Donenfeld Signed-off-by: Thomas Gleixner Reviewed-by: Arnd Bergmann Link: https://lkml.kernel.org/r/20190621203249.3909-2-Jason@zx2c4.com Documentation/core-api/timekeeping.rst | 2 +- arch/x86/kvm/pmu.c | 4 ++-- arch/x86/kvm/x86.c | 12 ++++++------ drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 2 +- drivers/iio/humidity/dht11.c | 8 ++++---- drivers/iio/industrialio-core.c | 4 ++-- drivers/infiniband/hw/mlx4/alias_GUID.c | 6 +++--- drivers/leds/trigger/ledtrig-activity.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/rx.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 2 +- drivers/net/wireless/mac80211_hwsim.c | 2 +- drivers/net/wireless/ti/wlcore/main.c | 2 +- drivers/net/wireless/ti/wlcore/rx.c | 2 +- drivers/net/wireless/ti/wlcore/tx.c | 2 +- drivers/net/wireless/virt_wifi.c | 2 +- include/linux/timekeeping.h | 4 ++-- include/net/cfg80211.h | 2 +- kernel/bpf/syscall.c | 2 +- kernel/events/core.c | 4 ++-- kernel/fork.c | 2 +- 22 files changed, 36 insertions(+), 36 deletions(-) commit 0354c1a3cdf31f44b035cfad14d32282e815a572 Author: Jason A. Donenfeld Date: Fri Jun 21 22:32:47 2019 +0200 timekeeping: Use proper ktime_add when adding nsecs in coarse offset While this doesn't actually amount to a real difference, since the macro evaluates to the same thing, every place else operates on ktime_t using these functions, so let's not break the pattern. Fixes: e3ff9c3678b4 ("timekeeping: Repair ktime_get_coarse*() granularity") Signed-off-by: Jason A. Donenfeld Signed-off-by: Thomas Gleixner Reviewed-by: Arnd Bergmann Link: https://lkml.kernel.org/r/20190621203249.3909-1-Jason@zx2c4.com kernel/time/timekeeping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6808acb57a286cda48d8674713e672681ca7ffb3 Merge: d21e43f2ef32 9e0babf2c06c Author: Thomas Gleixner Date: Sat Jun 22 12:07:35 2019 +0200 Merge branch 'linus' into timers/core Pick up upstream fixes for pending changes. commit 67009e1932f00d0d29dfa3ad1c7576178c7c2c2b Author: Patrick Havelange Date: Tue Jun 18 11:05:41 2019 +0200 counter/ftm-quaddec: Add missing '>' in MODULE_AUTHOR The last '>' chars were missing in the MODULE_AUTHOR entries. Reported-by: Randy Dunlap Fixes: a3b9a99980d9 ("counter: add FlexTimer Module Quadrature decoder counter driver") Signed-off-by: Patrick Havelange Signed-off-by: William Breathitt Gray Signed-off-by: Jonathan Cameron drivers/counter/ftm-quaddec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8dbec27a242cd3e2816eeb98d3237b9f57cf6232 Author: Kees Cook Date: Mon Jun 17 21:55:03 2019 -0700 x86/asm: Pin sensitive CR0 bits With sensitive CR4 bits pinned now, it's possible that the WP bit for CR0 might become a target as well. Following the same reasoning for the CR4 pinning, pin CR0's WP bit. Contrary to the cpu feature dependend CR4 pinning this can be done with a constant value. Suggested-by: Peter Zijlstra Signed-off-by: Kees Cook Signed-off-by: Thomas Gleixner Cc: Linus Torvalds Cc: Dave Hansen Cc: kernel-hardening@lists.openwall.com Link: https://lkml.kernel.org/r/20190618045503.39105-4-keescook@chromium.org arch/x86/include/asm/special_insns.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 873d50d58f67ef15d2777b5e7f7a5268bb1fbae2 Author: Kees Cook Date: Mon Jun 17 21:55:02 2019 -0700 x86/asm: Pin sensitive CR4 bits Several recent exploits have used direct calls to the native_write_cr4() function to disable SMEP and SMAP before then continuing their exploits using userspace memory access. Direct calls of this form can be mitigate by pinning bits of CR4 so that they cannot be changed through a common function. This is not intended to be a general ROP protection (which would require CFI to defend against properly), but rather a way to avoid trivial direct function calling (or CFI bypasses via a matching function prototype) as seen in: https://googleprojectzero.blogspot.com/2017/05/exploiting-linux-kernel-via-packet.html (https://github.com/xairy/kernel-exploits/tree/master/CVE-2017-7308) The goals of this change: - Pin specific bits (SMEP, SMAP, and UMIP) when writing CR4. - Avoid setting the bits too early (they must become pinned only after CPU feature detection and selection has finished). - Pinning mask needs to be read-only during normal runtime. - Pinning needs to be checked after write to validate the cr4 state Using __ro_after_init on the mask is done so it can't be first disabled with a malicious write. Since these bits are global state (once established by the boot CPU and kernel boot parameters), they are safe to write to secondary CPUs before those CPUs have finished feature detection. As such, the bits are set at the first cr4 write, so that cr4 write bugs can be detected (instead of silently papered over). This uses a few bytes less storage of a location we don't have: read-only per-CPU data. A check is performed after the register write because an attack could just skip directly to the register write. Such a direct jump is possible because of how this function may be built by the compiler (especially due to the removal of frame pointers) where it doesn't add a stack frame (function exit may only be a retq without pops) which is sufficient for trivial exploitation like in the timer overwrites mentioned above). The asm argument constraints gain the "+" modifier to convince the compiler that it shouldn't make ordering assumptions about the arguments or memory, and treat them as changed. Signed-off-by: Kees Cook Signed-off-by: Thomas Gleixner Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Dave Hansen Cc: kernel-hardening@lists.openwall.com Link: https://lkml.kernel.org/r/20190618045503.39105-3-keescook@chromium.org arch/x86/include/asm/special_insns.h | 22 +++++++++++++++++++++- arch/x86/kernel/cpu/common.c | 20 ++++++++++++++++++++ arch/x86/kernel/smpboot.c | 8 +++++++- 3 files changed, 48 insertions(+), 2 deletions(-) commit 1909a671dbc3606685b1daf8b22a16f65ea7edda Author: Todd Kjos Date: Fri Jun 21 10:54:15 2019 -0700 binder: fix memory leak in error path syzkallar found a 32-byte memory leak in a rarely executed error case. The transaction complete work item was not freed if put_user() failed when writing the BR_TRANSACTION_COMPLETE to the user command buffer. Fixed by freeing it before put_user() is called. Reported-by: syzbot+182ce46596c3f2e1eb24@syzkaller.appspotmail.com Signed-off-by: Todd Kjos Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/android/binder.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f8c0e061cb83bd528ff0843e717bcebc846d4838 Author: Tony W Wang-oc Date: Tue Jun 18 08:37:29 2019 +0000 x86/acpi/cstate: Add Zhaoxin processors support for cache flush policy in C3 Same as Intel, Zhaoxin MP CPUs support C3 share cache and on all recent Zhaoxin platforms ARB_DISABLE is a nop. So set related flags correctly in the same way as Intel does. Signed-off-by: Tony W Wang-oc Signed-off-by: Thomas Gleixner Cc: "hpa@zytor.com" Cc: "gregkh@linuxfoundation.org" Cc: "rjw@rjwysocki.net" Cc: "lenb@kernel.org" Cc: David Wang Cc: "Cooper Yan(BJ-RD)" Cc: "Qiyuan Wang(BJ-RD)" Cc: "Herry Yang(BJ-RD)" Link: https://lkml.kernel.org/r/a370503660994669991a7f7cda7c5e98@zhaoxin.com arch/x86/kernel/acpi/cstate.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 773b2f30a3fc026f3ed121a8b945b0ae19b64ec5 Author: Tony W Wang-oc Date: Tue Jun 18 08:37:14 2019 +0000 ACPI, x86: Add Zhaoxin processors support for NONSTOP TSC Zhaoxin CPUs have NONSTOP TSC feature, so enable the ACPI driver support for it. Signed-off-by: Tony W Wang-oc Signed-off-by: Thomas Gleixner Cc: "hpa@zytor.com" Cc: "gregkh@linuxfoundation.org" Cc: "rjw@rjwysocki.net" Cc: "lenb@kernel.org" Cc: David Wang Cc: "Cooper Yan(BJ-RD)" Cc: "Qiyuan Wang(BJ-RD)" Cc: "Herry Yang(BJ-RD)" Link: https://lkml.kernel.org/r/d1cfd937dabc44518d42038b55522c53@zhaoxin.com drivers/acpi/acpi_pad.c | 1 + drivers/acpi/processor_idle.c | 1 + 2 files changed, 2 insertions(+) commit 761fdd5e3327db6c646a09bab5ad48cd42680cd2 Author: Tony W Wang-oc Date: Tue Jun 18 08:37:05 2019 +0000 x86/cpu: Create Zhaoxin processors architecture support file Add x86 architecture support for new Zhaoxin processors. Carve out initialization code needed by Zhaoxin processors into a separate compilation unit. To identify Zhaoxin CPU, add a new vendor type X86_VENDOR_ZHAOXIN for system recognition. Signed-off-by: Tony W Wang-oc Signed-off-by: Thomas Gleixner Cc: "hpa@zytor.com" Cc: "gregkh@linuxfoundation.org" Cc: "rjw@rjwysocki.net" Cc: "lenb@kernel.org" Cc: David Wang Cc: "Cooper Yan(BJ-RD)" Cc: "Qiyuan Wang(BJ-RD)" Cc: "Herry Yang(BJ-RD)" Link: https://lkml.kernel.org/r/01042674b2f741b2aed1f797359bdffb@zhaoxin.com MAINTAINERS | 6 ++ arch/x86/Kconfig.cpu | 13 +++ arch/x86/include/asm/processor.h | 3 +- arch/x86/kernel/cpu/Makefile | 1 + arch/x86/kernel/cpu/zhaoxin.c | 167 +++++++++++++++++++++++++++++++++++++++ 5 files changed, 189 insertions(+), 1 deletion(-) commit 0a05fa67e62c73baad2a7d0fa20e8f96896c1093 Author: Andy Shevchenko Date: Mon Jun 17 14:55:37 2019 +0300 x86/cpu: Split Tremont based Atoms from the rest Split Tremont based Atoms from the rest to keep logical grouping. Signed-off-by: Andy Shevchenko Signed-off-by: Thomas Gleixner Cc: Borislav Petkov Cc: "H. Peter Anvin" Link: https://lkml.kernel.org/r/20190617115537.33309-1-andriy.shevchenko@linux.intel.com arch/x86/include/asm/intel-family.h | 1 + 1 file changed, 1 insertion(+) commit 8915aacac4dd5326a07f6b9c01f266289c57c71e Author: Greg Kroah-Hartman Date: Tue Jun 18 17:54:40 2019 +0200 iio: core: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Jonathan Cameron Cc: Hartmut Knaack Cc: Lars-Peter Clausen Cc: Peter Meerwald-Stadler Cc: linux-iio@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Jonathan Cameron drivers/iio/industrialio-core.c | 35 ++++++++--------------------------- 1 file changed, 8 insertions(+), 27 deletions(-) commit 1c349f4fd36e7f957217402f3a7f87031dc8a0b7 Author: Mauro Carvalho Chehab Date: Tue Jun 18 17:53:40 2019 -0300 docs: iio: convert to ReST Rename the iio documentation files to ReST, add an index for them and adjust in order to produce a nice html output via the Sphinx build system. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Cameron .../iio/{ep93xx_adc.txt => ep93xx_adc.rst} | 15 ++++++- .../iio/{iio_configfs.txt => iio_configfs.rst} | 52 +++++++++++++--------- Documentation/iio/index.rst | 12 +++++ drivers/iio/Kconfig | 2 +- 4 files changed, 56 insertions(+), 25 deletions(-) commit 2c7b5ac5d5a93c4b0557293d06c6677f765081a6 Author: Thomas Gleixner Date: Thu Jun 13 22:04:24 2019 +0300 Documentation/x86/64: Add documentation for GS/FS addressing mode Explain how the GS/FS based addressing can be utilized in user space applications along with the differences between the generic prctl() based GS/FS base control and the FSGSBASE version available on newer CPUs. Originally-by: Andi Kleen Signed-off-by: Thomas Gleixner Cc: "Bae, Chang Seok" Cc: Andy Lutomirski , Cc: H . Peter Anvin Cc: "Shankar, Ravi V" Cc: Randy Dunlap Cc: Jonathan Corbet Link: https://lkml.kernel.org/r/alpine.DEB.2.21.1906132246310.1791@nanos.tec.linutronix.de Documentation/x86/x86_64/fsgs.rst | 199 +++++++++++++++++++++++++++++++++++++ Documentation/x86/x86_64/index.rst | 1 + 2 files changed, 200 insertions(+) commit f987c955c74501c9295a81372c7d363cbe07c8a6 Author: Andi Kleen Date: Wed May 8 03:02:32 2019 -0700 x86/elf: Enumerate kernel FSGSBASE capability in AT_HWCAP2 The kernel needs to explicitly enable FSGSBASE. So, the application needs to know if it can safely use these instructions. Just looking at the CPUID bit is not enough because it may be running in a kernel that does not enable the instructions. One way for the application would be to just try and catch the SIGILL. But that is difficult to do in libraries which may not want to overwrite the signal handlers of the main application. Enumerate the enabled FSGSBASE capability in bit 1 of AT_HWCAP2 in the ELF aux vector. AT_HWCAP2 is already used by PPC for similar purposes. The application can access it open coded or by using the getauxval() function in newer versions of glibc. [ tglx: Massaged changelog ] Signed-off-by: Andi Kleen Signed-off-by: Chang S. Bae Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Ravi Shankar Cc: H. Peter Anvin Link: https://lkml.kernel.org/r/1557309753-24073-18-git-send-email-chang.seok.bae@intel.com arch/x86/include/uapi/asm/hwcap2.h | 3 +++ arch/x86/kernel/cpu/common.c | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) commit 2032f1f96ee0da600633c6c627b9c0a2e0f8b8a6 Author: Andy Lutomirski Date: Wed May 8 03:02:31 2019 -0700 x86/cpu: Enable FSGSBASE on 64bit by default and add a chicken bit Now that FSGSBASE is fully supported, remove unsafe_fsgsbase, enable FSGSBASE by default, and add nofsgsbase to disable it. Signed-off-by: Andy Lutomirski Signed-off-by: Chang S. Bae Signed-off-by: Thomas Gleixner Reviewed-by: Andi Kleen Cc: Ravi Shankar Cc: H. Peter Anvin Link: https://lkml.kernel.org/r/1557309753-24073-17-git-send-email-chang.seok.bae@intel.com Documentation/admin-guide/kernel-parameters.txt | 3 +-- arch/x86/kernel/cpu/common.c | 32 +++++++++++-------------- 2 files changed, 15 insertions(+), 20 deletions(-) commit a87730cc3acc475eff12ddde3f7d5687371b5c76 Author: Chang S. Bae Date: Wed May 8 03:02:30 2019 -0700 selftests/x86/fsgsbase: Test ptracer-induced GSBASE write with FSGSBASE This validates that GS and GSBASE are independently preserved in ptracer commands. Suggested-by: Andy Lutomirski Signed-off-by: Chang S. Bae Signed-off-by: Thomas Gleixner Cc: Andi Kleen Cc: Ravi Shankar Cc: H. Peter Anvin Link: https://lkml.kernel.org/r/1557309753-24073-16-git-send-email-chang.seok.bae@intel.com tools/testing/selftests/x86/fsgsbase.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 9ad75a0922e1533b08f3d1451bd908d19e5db41e Author: Andy Lutomirski Date: Wed May 8 03:02:29 2019 -0700 selftests/x86/fsgsbase: Test RD/WRGSBASE This validates that GS and GSBASE are independently preserved across context switches. [ chang: Use FSGSBASE instructions directly instead of .byte ] Signed-off-by: Andy Lutomirski Signed-off-by: Chang S. Bae Signed-off-by: Thomas Gleixner Reviewed-by: Andi Kleen Cc: Ravi Shankar Cc: H. Peter Anvin Link: https://lkml.kernel.org/r/1557309753-24073-15-git-send-email-chang.seok.bae@intel.com tools/testing/selftests/x86/fsgsbase.c | 102 ++++++++++++++++++++++++++++++++- 1 file changed, 99 insertions(+), 3 deletions(-) commit 5bf0cab60ee2c730ec91ae0aabc3146bcfed138b Author: Chang S. Bae Date: Wed May 8 03:02:28 2019 -0700 x86/entry/64: Document GSBASE handling in the paranoid path On a FSGSBASE system, the way to handle GSBASE in the paranoid path is different from the existing SWAPGS-based entry/exit path handling. Document the reason and what has to be done for FSGSBASE enabled systems. [ tglx: Massaged doc and changelog ] Signed-off-by: Chang S. Bae Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Andi Kleen Cc: Ravi Shankar Cc: H. Peter Anvin Link: https://lkml.kernel.org/r/1557309753-24073-14-git-send-email-chang.seok.bae@intel.com Documentation/x86/entry_64.rst | 9 +++++++++ 1 file changed, 9 insertions(+) commit 708078f65721b46d82d9934a3f0b36a2b8ad0656 Author: Chang S. Bae Date: Wed May 8 03:02:27 2019 -0700 x86/entry/64: Handle FSGSBASE enabled paranoid entry/exit Without FSGSBASE, user space cannot change GSBASE other than through a PRCTL. The kernel enforces that the user space GSBASE value is postive as negative values are used for detecting the kernel space GSBASE value in the paranoid entry code. If FSGSBASE is enabled, user space can set arbitrary GSBASE values without kernel intervention, including negative ones, which breaks the paranoid entry assumptions. To avoid this, paranoid entry needs to unconditionally save the current GSBASE value independent of the interrupted context, retrieve and write the kernel GSBASE and unconditionally restore the saved value on exit. The restore happens either in paranoid_exit or in the special exit path of the NMI low level code. All other entry code pathes which use unconditional SWAPGS are not affected as they do not depend on the actual content. [ tglx: Massaged changelogs and comments ] Suggested-by: H. Peter Anvin Suggested-by: Andy Lutomirski Suggested-by: Thomas Gleixner Signed-off-by: Chang S. Bae Signed-off-by: Thomas Gleixner Cc: Andi Kleen Cc: Ravi Shankar Cc: Dave Hansen Link: https://lkml.kernel.org/r/1557309753-24073-13-git-send-email-chang.seok.bae@intel.com arch/x86/entry/calling.h | 6 ++++ arch/x86/entry/entry_64.S | 80 ++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 75 insertions(+), 11 deletions(-) commit 79e1932fa3cedd731ddbd6af111fe4db8ca109ae Author: Chang S. Bae Date: Wed May 8 03:02:26 2019 -0700 x86/entry/64: Introduce the FIND_PERCPU_BASE macro GSBASE is used to find per-CPU data in the kernel. But when GSBASE is unknown, the per-CPU base can be found from the per_cpu_offset table with a CPU NR. The CPU NR is extracted from the limit field of the CPUNODE entry in GDT, or by the RDPID instruction. This is a prerequisite for using FSGSBASE in the low level entry code. Also, add the GAS-compatible RDPID macro as binutils 2.21 do not support it. Support is added in version 2.27. [ tglx: Massaged changelog ] Suggested-by: H. Peter Anvin Signed-off-by: Chang S. Bae Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Andi Kleen Cc: Ravi Shankar Cc: Dave Hansen Link: https://lkml.kernel.org/r/1557309753-24073-12-git-send-email-chang.seok.bae@intel.com arch/x86/entry/calling.h | 34 ++++++++++++++++++++++++++++++++++ arch/x86/include/asm/inst.h | 15 +++++++++++++++ 2 files changed, 49 insertions(+) commit 1d07316b1363a004ed548c3759584f8e8b1e24e3 Author: Chang S. Bae Date: Wed May 8 03:02:25 2019 -0700 x86/entry/64: Switch CR3 before SWAPGS in paranoid entry When FSGSBASE is enabled, the GSBASE handling in paranoid entry will need to retrieve the kernel GSBASE which requires that the kernel page table is active. As the CR3 switch to the kernel page tables (PTI is active) does not depend on kernel GSBASE, move the CR3 switch in front of the GSBASE handling. Comment the EBX content while at it. No functional change. [ tglx: Rewrote changelog and comments ] Signed-off-by: Chang S. Bae Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: "H . Peter Anvin" Cc: Andi Kleen Cc: Ravi Shankar Cc: Dave Hansen Cc: H. Peter Anvin Link: https://lkml.kernel.org/r/1557309753-24073-11-git-send-email-chang.seok.bae@intel.com arch/x86/entry/entry_64.S | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) commit f60a83df4593c5e03e746ded66d8b436c4ad6e41 Author: Chang S. Bae Date: Wed May 8 03:02:23 2019 -0700 x86/process/64: Use FSGSBASE instructions on thread copy and ptrace When FSGSBASE is enabled, copying threads and reading fsbase and gsbase using ptrace must read the actual values. When copying a thread, use save_fsgs() and copy the saved values. For ptrace, the bases must be read from memory regardless of the selector if FSGSBASE is enabled. [ tglx: Invoke __rdgsbase_inactive() with interrupts disabled ] [ luto: Massage changelog ] Suggested-by: Andy Lutomirski Signed-off-by: Chang S. Bae Signed-off-by: Thomas Gleixner Cc: "H . Peter Anvin" Cc: Andi Kleen Cc: Ravi Shankar Cc: H. Peter Anvin Link: https://lkml.kernel.org/r/1557309753-24073-9-git-send-email-chang.seok.bae@intel.com arch/x86/kernel/process_64.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit 1ab5f3f7fe3d7548b4361b68c1fed140c6841af9 Author: Andy Lutomirski Date: Wed May 8 03:02:22 2019 -0700 x86/process/64: Use FSBSBASE in switch_to() if available With the new FSGSBASE instructions, FS and GSABSE can be efficiently read and writen in __switch_to(). Use that capability to preserve the full state. This will enable user code to do whatever it wants with the new instructions without any kernel-induced gotchas. (There can still be architectural gotchas: movl %gs,%eax; movl %eax,%gs may change GSBASE if WRGSBASE was used, but users are expected to read the CPU manual before doing things like that.) This is a considerable speedup. It seems to save about 100 cycles per context switch compared to the baseline 4.6-rc1 behavior on a Skylake laptop. [ chang: 5~10% performance improvements were seen with a context switch benchmark that ran threads with different FS/GSBASE values (to the baseline 4.16). Minor edit on the changelog. ] [ tglx: Masaage changelog ] Signed-off-by: Andy Lutomirski Signed-off-by: Chang S. Bae Signed-off-by: Thomas Gleixner Reviewed-by: Andi Kleen Cc: Ravi Shankar Cc: H. Peter Anvin Link: https://lkml.kernel.org/r/1557309753-24073-8-git-send-email-chang.seok.bae@intel.com arch/x86/kernel/process_64.c | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) commit a86b4625138d39e97b4cc254fc9c4bb9e1dc4542 Author: Chang S. Bae Date: Wed May 8 03:02:21 2019 -0700 x86/fsgsbase/64: Enable FSGSBASE instructions in helper functions Add cpu feature conditional FSGSBASE access to the relevant helper functions. That allows to accelerate certain FS/GS base operations in subsequent changes. Note, that while possible, the user space entry/exit GSBASE operations are not going to use the new FSGSBASE instructions. The reason is that it would require additional storage for the user space value which adds more complexity to the low level code and experiments have shown marginal benefit. This may be revisited later but for now the SWAPGS based handling in the entry code is preserved except for the paranoid entry/exit code. To preserve the SWAPGS entry mechanism introduce __[rd|wr]gsbase_inactive() helpers. Note, for Xen PV, paravirt hooks can be added later as they might allow a very efficient but different implementation. [ tglx: Massaged changelog ] Signed-off-by: Chang S. Bae Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Andi Kleen Cc: Ravi Shankar Cc: Andrew Cooper Cc: H. Peter Anvin Link: https://lkml.kernel.org/r/1557309753-24073-7-git-send-email-chang.seok.bae@intel.com arch/x86/include/asm/fsgsbase.h | 27 ++++++++--------- arch/x86/kernel/process_64.c | 66 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+), 15 deletions(-) commit 8b71340d702ec5d587443b38a852671c4fb6a723 Author: Andi Kleen Date: Wed May 8 03:02:20 2019 -0700 x86/fsgsbase/64: Add intrinsics for FSGSBASE instructions [ luto: Rename the variables from FS and GS to FSBASE and GSBASE and make safe to include on 32-bit kernels. ] Signed-off-by: Andi Kleen Signed-off-by: Andy Lutomirski Signed-off-by: Chang S. Bae Signed-off-by: Thomas Gleixner Reviewed-by: Andy Lutomirski Reviewed-by: Andi Kleen Cc: Ravi Shankar Cc: H. Peter Anvin Link: https://lkml.kernel.org/r/1557309753-24073-6-git-send-email-chang.seok.bae@intel.com arch/x86/include/asm/fsgsbase.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 1fb12b35e5ffe379d109b22cb3069830d0136d9a Author: Chang S. Bae Date: Wed May 8 03:02:19 2019 -0700 kbuild: Raise the minimum required binutils version to 2.21 It helps to use some new instructions directly in assembly code. Suggested-by: Andi Kleen Signed-off-by: Chang S. Bae Signed-off-by: Thomas Gleixner Reviewed-by: Andi Kleen Acked-by: Andrew Morton Cc: Andy Lutomirski Cc: Ravi Shankar Cc: Linux Torvalds Cc: H. Peter Anvin Link: https://lkml.kernel.org/r/1557309753-24073-5-git-send-email-chang.seok.bae@intel.com Documentation/process/changes.rst | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit b64ed19b93c368be0fb6acf05377e8e3a694c92b Author: Andy Lutomirski Date: Wed May 8 03:02:18 2019 -0700 x86/cpu: Add 'unsafe_fsgsbase' to enable CR4.FSGSBASE This is temporary. It will allow the next few patches to be tested incrementally. Setting unsafe_fsgsbase is a root hole. Don't do it. Signed-off-by: Andy Lutomirski Signed-off-by: Chang S. Bae Signed-off-by: Thomas Gleixner Reviewed-by: Andi Kleen Reviewed-by: Andy Lutomirski Cc: Ravi Shankar Cc: Andrew Morton Cc: Randy Dunlap Cc: H. Peter Anvin Link: https://lkml.kernel.org/r/1557309753-24073-4-git-send-email-chang.seok.bae@intel.com Documentation/admin-guide/kernel-parameters.txt | 3 +++ arch/x86/kernel/cpu/common.c | 24 ++++++++++++++++++++++++ 2 files changed, 27 insertions(+) commit 1b6858d5a2eb2485761f06bd48055ed5bed08464 Author: Chang S. Bae Date: Wed May 8 03:02:17 2019 -0700 selftests/x86/fsgsbase: Test ptracer-induced GSBASE write The test validates that the selector is not changed when a ptracer writes the ptracee's GSBASE. Suggested-by: Andy Lutomirski Signed-off-by: Chang S. Bae Signed-off-by: Thomas Gleixner Cc: "H . Peter Anvin" Cc: Andi Kleen Cc: Ravi Shankar Cc: H. Peter Anvin Link: https://lkml.kernel.org/r/1557309753-24073-3-git-send-email-chang.seok.bae@intel.com tools/testing/selftests/x86/fsgsbase.c | 70 ++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) commit 48f5e52e916b55fb73754833efbacc7f8081a159 Author: Chang S. Bae Date: Sun Jun 16 15:44:11 2019 +0000 x86/ptrace: Prevent ptrace from clearing the FS/GS selector When a ptracer writes a ptracee's FS/GSBASE with a different value, the selector is also cleared. This behavior is not correct as the selector should be preserved. Update only the base value and leave the selector intact. To simplify the code further remove the conditional checking for the same value as this code is not performance critical. The only recognizable downside of this change is when the selector is already nonzero on write. The base will be reloaded according to the selector. But the case is highly unexpected in real usages. [ tglx: Massage changelog ] Suggested-by: Andy Lutomirski Signed-off-by: Chang S. Bae Signed-off-by: Thomas Gleixner Cc: "H . Peter Anvin" Cc: Andi Kleen Cc: H. Peter Anvin Link: https://lkml.kernel.org/r/9040CFCD-74BD-4C17-9A01-B9B713CF6B10@intel.com arch/x86/kernel/ptrace.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit 7685010fca2ba0284f31fd1380df3cffc96d847e Author: Fabrice Gasnier Date: Wed Jun 19 14:29:55 2019 +0200 iio: adc: stm32-adc: add missing vdda-supply Add missing vdda-supply, analog power supply, to STM32 ADC. When vdda is an independent supply, it needs to be properly turned on or off to supply the ADC. Signed-off-by: Fabrice Gasnier Fixes: 1add69880240 ("iio: adc: Add support for STM32 ADC core"). Cc: Signed-off-by: Jonathan Cameron drivers/iio/adc/stm32-adc-core.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) commit 597382cbd3c1192f0bb0d19c48d1dcc8e1147bdd Author: Fabrice Gasnier Date: Wed Jun 19 14:29:54 2019 +0200 dt-bindings: iio: adc: stm32: add missing vdda supply Add missing vdda-supply, analog power supply, to STM32 ADC. It's required to properly supply the ADC. Fixes: 841fcea454fe ("Documentation: dt-bindings: Document STM32 ADC DT bindings") Signed-off-by: Fabrice Gasnier Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/adc/st,stm32-adc.txt | 1 + 1 file changed, 1 insertion(+) commit 18eaffab90eb3c2280986bb546e571adc85756d5 Author: Olivier Moysan Date: Wed Jun 19 15:03:51 2019 +0200 iio: adc: stm32-dfsdm: add comment for 16 bits record Add a comment on DMA configuration for 16 bits record. Signed-off-by: Olivier Moysan Acked-by: Fabrice Gasnier Signed-off-by: Jonathan Cameron drivers/iio/adc/stm32-dfsdm-adc.c | 5 +++++ 1 file changed, 5 insertions(+) commit fb683f47a9fb824dc11d529119354d1a88a96ca2 Author: Ard Biesheuvel Date: Thu Jun 20 09:33:53 2019 +0200 ACPI: Make AC and battery drivers available on !X86 ACPI battery and AC devices can be found in arm64 laptops as well, so drop the Kconfig dependency on X86 for their drivers. Signed-off-by: Ard Biesheuvel Tested-by: Lee Jones Signed-off-by: Rafael J. Wysocki drivers/acpi/Kconfig | 2 -- 1 file changed, 2 deletions(-) commit d716204fd5472631970aa927c773c3302ac70fbe Author: Olivier Moysan Date: Wed Jun 19 15:03:50 2019 +0200 iio: adc: stm32-dfsdm: add fast mode support The use of fast mode allows to get a larger set of solution for filter parameters. This can be useful to reach a better output sample resolution, when fast mode can be used. Fast mode is selected at startup if it is relevant. The startup is performed in postenable callback context, where there are too tight time constraints for filter parameters computation. For this reason both fast and non fast filter parameters are pre-computed previously. Signed-off-by: Olivier Moysan Acked-by: Fabrice Gasnier Signed-off-by: Jonathan Cameron drivers/iio/adc/stm32-dfsdm-adc.c | 65 ++++++++++++++++++++++++++++++--------- drivers/iio/adc/stm32-dfsdm.h | 4 +-- 2 files changed, 53 insertions(+), 16 deletions(-) commit d21e43f2ef32ba3242687dbedb3c4b9a76b3eebc Author: Miroslav Lichvar Date: Tue Jun 18 18:06:12 2019 +0200 kselftests: timers: freq-step: Update maximum acceptable precision and errors PTI has a significant impact on precision of the MONOTONIC_RAW clock, which prevents a lot of computers from running the freq-step test. Increase the maximum acceptable precision for the test to not be skipped to 500 nanoseconds. After commit 78b98e3c5a66 ("timekeeping/ntp: Determine the multiplier directly from NTP tick length") the frequency and time errors should be much smaller. Reduce the maximum acceptable values for the test to pass to 0.02 ppm and 50 nanoseconds respectively. Signed-off-by: Miroslav Lichvar Signed-off-by: Thomas Gleixner Cc: John Stultz Cc: Prarit Bhargava Cc: Richard Cochran Cc: Stephen Boyd Link: https://lkml.kernel.org/r/20190618160612.21957-1-mlichvar@redhat.com tools/testing/selftests/timers/freq-step.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d897a4ab11dc8a9fda50d2eccc081a96a6385998 Author: Miroslav Lichvar Date: Tue Jun 18 17:47:13 2019 +0200 ntp: Limit TAI-UTC offset Don't allow the TAI-UTC offset of the system clock to be set by adjtimex() to a value larger than 100000 seconds. This prevents an overflow in the conversion to int, prevents the CLOCK_TAI clock from getting too far ahead of the CLOCK_REALTIME clock, and it is still large enough to allow leap seconds to be inserted at the maximum rate currently supported by the kernel (once per day) for the next ~270 years, however unlikely it is that someone can survive a catastrophic event which slowed down the rotation of the Earth so much. Reported-by: Weikang shi Signed-off-by: Miroslav Lichvar Signed-off-by: Thomas Gleixner Cc: John Stultz Cc: Prarit Bhargava Cc: Richard Cochran Cc: Stephen Boyd Link: https://lkml.kernel.org/r/20190618154713.20929-1-mlichvar@redhat.com kernel/time/ntp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e9bea8f98a539080070e3eff70a1731ce0ffdc8d Author: Rafael J. Wysocki Date: Wed Jun 19 00:48:15 2019 +0200 PM: sleep: Update struct wakeup_source documentation The kerneldoc comment for struct wakeup_source has become outdated, so fix that. Signed-off-by: Rafael J. Wysocki Reviewed-by: Greg Kroah-Hartman include/linux/pm_wakeup.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 102afde62937de32758a023655ed90545c292245 Author: Olivier Moysan Date: Wed Jun 19 15:03:49 2019 +0200 iio: adc: stm32-dfsdm: manage data resolution in trigger mode Add output sample resolution management in scan mode. Add stm32_dfsdm_process_data() function to share sample processing between continuous and trigger modes. Signed-off-by: Olivier Moysan Acked-by: Fabrice Gasnier Signed-off-by: Jonathan Cameron drivers/iio/adc/stm32-dfsdm-adc.c | 41 ++++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 13 deletions(-) commit c6013bf50e2a2a94ab3d012e191096432aa50c6f Author: Olivier Moysan Date: Wed Jun 19 15:03:48 2019 +0200 iio: adc: stm32-dfsdm: fix data type Fix the data type as DFSDM raw output is complements 2, 24bits left aligned in a 32-bit register. This change does not affect AUDIO path - Set data as signed for IIO (as for AUDIO) - Set 8 bit right shift for IIO. The 8 LSBs bits of data contains channel info and are masked. Signed-off-by: Olivier Moysan Fixes: e2e6771c6462 ("IIO: ADC: add STM32 DFSDM sigma delta ADC support") Acked-by: Fabrice Gasnier Signed-off-by: Jonathan Cameron drivers/iio/adc/stm32-dfsdm-adc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 12c8398d8012ead3d3d68422067ab2f9a66ae76a Author: Olivier Moysan Date: Wed Jun 19 15:03:47 2019 +0200 iio: adc: stm32-dfsdm: fix output resolution In buffered mode, output samples are shifted left unconditionally. This works for filter order 3, but this shift is not adapted for other filter orders. Compute required shift, left or right, and shift output data accordingly. Add also saturation management to avoid wrap-around when maximum positive sample is reached. Signed-off-by: Olivier Moysan Fixes: eca949800d2d ("IIO: ADC: add stm32 DFSDM support for PDM microphone") Acked-by: Fabrice Gasnier Signed-off-by: Jonathan Cameron drivers/iio/adc/stm32-dfsdm-adc.c | 158 +++++++++++++++++++++++++++++--------- drivers/iio/adc/stm32-dfsdm.h | 24 ++++-- 2 files changed, 142 insertions(+), 40 deletions(-) commit 2d60d1f64b57b5a5cb259caa6fbe4aaa3f9def3a Author: Geert Uytterhoeven Date: Fri Jun 7 13:28:48 2019 +0200 mtd: spi-nor: Spelling s/Writ/Write/ Signed-off-by: Geert Uytterhoeven Signed-off-by: Tudor Ambarus drivers/mtd/spi-nor/spi-nor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 88489c29de60783a417c79ef418bedfec5d61fa1 Author: Robert Marko Date: Sat May 18 21:29:35 2019 +0200 mtd: spi-nor: Add Winbond w25q16jv support Testing done on Mikrotik Routerboard RB450Gx4 board under 4.14.119 and 4.19.43 kernels. The test board does not support Dual or Quad modes. Datasheet at: https://www.winbond.com/resource-files/w25q16jv%20spi%20revg%2003222018%20plus.pdf Signed-off-by: Robert Marko [tudor.ambarus@microchip.com: w25q16jv-im/jm and w25q16jv-iq/jq have different jedec ids, fix flash name.] Signed-off-by: Tudor Ambarus drivers/mtd/spi-nor/spi-nor.c | 5 +++++ 1 file changed, 5 insertions(+) commit c2a0ffdc255101fccae1c5daa4459292d6fc8dd2 Author: Tomasz Duszynski Date: Thu Jun 20 21:50:11 2019 +0200 MAINTAINERS: add entry for sensirion sps30 driver Add myself as a sensirion sps30 driver maintainer. Signed-off-by: Tomasz Duszynski Signed-off-by: Jonathan Cameron MAINTAINERS | 6 ++++++ 1 file changed, 6 insertions(+) commit f24cd7df6f329c9d03932d5824a49d0f69f2ceda Author: Tomasz Duszynski Date: Thu Jun 20 21:50:10 2019 +0200 dt-bindings: iio: chemical: sps30: convert bindings to yaml Convert existing device tree bindings to yaml. Signed-off-by: Tomasz Duszynski Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron .../bindings/iio/chemical/sensirion,sps30.txt | 12 ------- .../bindings/iio/chemical/sensirion,sps30.yaml | 39 ++++++++++++++++++++++ 2 files changed, 39 insertions(+), 12 deletions(-) commit aabcbfe8dbbfa87f353071182d9bbc68d10f728e Author: Dan Carpenter Date: Fri Jun 21 12:18:28 2019 +0300 iio: sca3000: Potential endian bug in sca3000_read_event_value() The problem is that "ret" is an int but we're casting it as "(unsigned long *)&ret" when we do the for_each_set_bit() loop. This will not work on big endian 64 bit systems. Signed-off-by: Dan Carpenter Signed-off-by: Jonathan Cameron drivers/iio/accel/sca3000.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 05b8bcc96278c9ef927a6f25a98e233e55de42e1 Author: Alexandru Ardelean Date: Fri Jun 14 13:47:25 2019 +0300 iio: st_accel: fix iio_triggered_buffer_{pre,post}enable positions The iio_triggered_buffer_{predisable,postenable} functions attach/detach the poll functions. For the predisable hook, the disable code should occur before detaching the poll func, and for the postenable hook, the poll func should be attached before the enable code. Signed-off-by: Alexandru Ardelean Acked-by: Denis Ciocca Signed-off-by: Jonathan Cameron drivers/iio/accel/st_accel_buffer.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit 2d8bf3404bb0e65dffb7326f7fb6e96fa3cee418 Author: Joel Stanley Date: Thu Jun 20 17:36:12 2019 +0930 ARM: configs: multi_v5: Add more ASPEED devices Enables RTC, LPC P2A, DRM, USB device and video capture as modules. Signed-off-by: Joel Stanley arch/arm/configs/multi_v5_defconfig | 8 ++++++++ 1 file changed, 8 insertions(+) commit c8a3b9b50d8331528fc8d03aadd1fec3d60362d7 Author: Joel Stanley Date: Thu Jun 20 18:47:38 2019 +0930 soc: aspeed: lpc-ctrl: Fix probe error handling gcc warns that a mising "flash" phandle node leads to undefined behavior later: drivers/soc/aspeed/aspeed-lpc-ctrl.c: In function 'aspeed_lpc_ctrl_probe': drivers/soc/aspeed/aspeed-lpc-ctrl.c:201:18: error: '*((void *)&resm+8)' may be used uninitialized in this function [-Werror=maybe-uninitialized] Only set the flash base and size if we find a phandle in the device tree. Reported-by: Arnd Bergmann Reviewed-by: Andrew Jeffery Reviewed-by: Vijay Khemka Signed-off-by: Joel Stanley drivers/soc/aspeed/aspeed-lpc-ctrl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit a3664a74a0aa0b11d8d4ade04984965b77d14d44 Merge: 3ce5aceb5dee 3469fa84c163 Author: Ingo Molnar Date: Sat Jun 22 08:27:05 2019 +0200 Merge tag 'perf-core-for-mingo-5.3-20190621' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: perf trace: Arnaldo Carvalho de Melo: - Fix exclusion of not available syscall names from selector list. - Fixup pointer arithmetic when consuming augmented syscall args. Intel PT: Adrian Hunter: - Add support for decoding PEBS via PT packets. See: https://software.intel.com/en-us/articles/intel-sdm May 2019 version: Vol. 3B 18.5.5.2 PEBS output to Intel® Processor Trace for more details about it. ARM64: John Garry: - Fix uncore PMU alias list for ARM64 Raphael Gault: - Compile tests unconditionally. cs-etm: Mathieu Poirier: - Optimize option setup for CPU-wide sessions. build: Florian Fainelli: - Don't hardcode host include path for libslang, fixing up building with it in cross build environments. Arnaldo Carvalho de Melo: - Check if gettid() is available before providing helper, fixing the build when using the latest glibc version, where a helper for gettid() is finally present. - Fix building with libslang in systems where it is located in slang/slang.h. - Fix fast path test for zstd library. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 05af0765707fc136433ab380d5d627afe3b8dda9 Author: Wolfram Sang Date: Thu Jun 20 22:01:47 2019 +0200 i2c: mux: demux-pinctrl: use proper email address for ABI requests Use my commercial address, not my community one. Signed-off-by: Wolfram Sang Reviewed-by: Simon Horman [Removed a misplaced newline. /Peter] Signed-off-by: Peter Rosin Documentation/ABI/testing/sysfs-platform-i2c-demux-pinctrl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cfafa80b6ed7399b8c68c009318a930c51fc3f37 Author: Wolfram Sang Date: Wed Jun 19 19:03:06 2019 +0200 i2c: mux: add sysfs header We are using sysfs functions directly, so we should include the header. Signed-off-by: Wolfram Sang Signed-off-by: Peter Rosin drivers/i2c/i2c-mux.c | 1 + 1 file changed, 1 insertion(+) commit d308dfbf62eff897d71968d764f21a78678ee0a5 Author: Linus Walleij Date: Tue Jun 18 12:58:33 2019 +0200 i2c: mux/i801: Switch to use descriptor passing This switches the i801 GPIO mux to use GPIO descriptors for handling the GPIO lines. The previous hack which was reaching inside the GPIO chips etc cannot live on. We pass descriptors along with the GPIO mux device at creation instead. The GPIO mux was only used by way of platform data with a platform device from one place in the kernel: the i801 i2c bus driver. Let's just associate the GPIO descriptor table with the actual device like everyone else and dynamically create a descriptor table passed along with the GPIO i2c mux. This enables simplification of the GPIO i2c mux driver to use only the descriptor API and the OF probe path gets simplified in the process. The i801 driver was registering the GPIO i2c mux with PLATFORM_DEVID_AUTO which would make it hard to predict the device name and assign the descriptor table properly, but this seems to be a mistake to begin with: all of the GPIO mux devices are hardcoded to look up GPIO lines from the "gpio_ich" GPIO chip. If there are more than one mux, there is certainly more than one gpio chip as well, and then we have more serious problems. Switch to PLATFORM_DEVID_NONE instead. There can be only one. Cc: Mika Westerberg Cc: Andy Shevchenko Cc: Peter Rosin Cc: Jean Delvare Signed-off-by: Serge Semin Signed-off-by: Linus Walleij Reviewed-by: Andy Shevchenko Reviewed-by: Mika Westerberg [Removed a newline, suggested by Andy. /Peter] Signed-off-by: Peter Rosin drivers/i2c/busses/i2c-i801.c | 37 +++++++-- drivers/i2c/muxes/i2c-mux-gpio.c | 116 ++++++++--------------------- include/linux/platform_data/i2c-mux-gpio.h | 7 -- 3 files changed, 60 insertions(+), 100 deletions(-) commit 89f27fb2dd348d8d52a97e6ebec15c64fe461a25 Author: Chen-Yu Tsai Date: Fri May 3 19:31:04 2019 +0800 clk: sunxi-ng: sun8i-r: Use local parent references for SUNXI_CCU_GATE With the new clk parenting code and SUNXI_CCU_GATE macros, we can reference parents locally via pointers to struct clk_hw or DT clock-names. Convert existing SUNXI_CCU_GATE definitions to SUNXI_CCU_GATE_HWS as the parent clock is internal to this clock unit. To avoid duplication of clock definitions, we fix up the parent reference for A83T in the A83T init function. Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai drivers/clk/sunxi-ng/ccu-sun8i-r.c | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) commit 4b8891518466cd29fc5d451e46d4ab3c4e25bcf7 Author: Chen-Yu Tsai Date: Fri May 3 19:25:12 2019 +0800 clk: sunxi-ng: a80-usb: Use local parent references for SUNXI_CCU_GATE With the new clk parenting code and SUNXI_CCU_GATE macros, we can reference parents locally via pointers to struct clk_hw or DT clock-names. Convert existing SUNXI_CCU_GATE definitions to SUNXI_CCU_GATE_DATA to specify the parent clock. Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai drivers/clk/sunxi-ng/ccu-sun9i-a80-usb.c | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) commit 4b751ffae7a7659d665499ee9ed6fd7a144e575a Author: Chen-Yu Tsai Date: Fri May 3 19:21:08 2019 +0800 clk: sunxi-ng: gate: Add macros for referencing local clock parents With the new clk parenting code, clk_init_data was expanded to include .parent_hws, for clk drivers to directly reference parents by clk_hw, and .parent_data, for clk drivers to specify parents using a combination of device tree clock-names, pointers to struct clk_hw, device tree clocks, and/or fallback global clock names. Add four new macros: - SUNXI_CCU_GATE_HW, that can take a struct clk_hw pointer, instead of a string, as its parent. - SUNXI_CCU_GATE_FW that takes a string to match a clock-names entry in the device tree to specify the clock parent. - SUNXI_CCU_GATE_HWS that takes an array of struct clk_hw * as its parent. This allows the array to be shared with other clk declarations. - SUNXI_CCU_GATE_DATA that takes an array of struct clk_parent_data * as its parent. This allows the array to be shared with other clk declarations. Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai drivers/clk/sunxi-ng/ccu_gate.h | 53 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) commit 22ce173f76f47b087d9978473db22d5d9ce79f71 Author: Chen-Yu Tsai Date: Fri May 3 18:10:53 2019 +0800 clk: sunxi-ng: h6-r: Use local parent references for CLK_FIXED_FACTOR With the new clk parenting code and CLK_FIXED_FACTOR_{HW,FW_NAME} macros, we can reference parents locally via pointers to struct clk_hw or DT clock-names. Convert existing CLK_FIXED_FACTOR definitions to either the _HW or _FW_NAME variant based on whether the parent clock is internal or external to the CCU. Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai drivers/clk/sunxi-ng/ccu-sun50i-h6-r.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8916d3fc3a476c6df25edf3d5186c9bb22c59e76 Author: Chen-Yu Tsai Date: Fri May 3 18:10:39 2019 +0800 clk: sunxi-ng: h6: Use local parent references for CLK_FIXED_FACTOR With the new clk parenting code and CLK_FIXED_FACTOR_{HW,FW_NAME} macros, we can reference parents locally via pointers to struct clk_hw or DT clock-names. Convert existing CLK_FIXED_FACTOR definitions to either the _HW or _FW_NAME variant based on whether the parent clock is internal or external to the CCU. A forward declaration for struct clk_fixed_factor pll_periph0_4x_clk is added as the definitions of the fixed factor clocks appear much later in the file. The position of fixed factor clock definitions will be moved for all drivers at a later time, before the conversion of all other clock types. Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai drivers/clk/sunxi-ng/ccu-sun50i-h6.c | 69 +++++++++++++++++++++++------------- 1 file changed, 44 insertions(+), 25 deletions(-) commit ecd73c04b3e81aa8c14828c0a55f1e9a62e173d6 Author: Chen-Yu Tsai Date: Fri May 3 18:09:33 2019 +0800 clk: sunxi-ng: a64: Use local parent references for CLK_FIXED_FACTOR With the new clk parenting code and CLK_FIXED_FACTOR_{HW,FW_NAME} macros, we can reference parents locally via pointers to struct clk_hw or DT clock-names. Convert existing CLK_FIXED_FACTOR definitions to either the _HW or _FW_NAME variant based on whether the parent clock is internal or external to the CCU. Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai drivers/clk/sunxi-ng/ccu-sun50i-a64.c | 41 ++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 15 deletions(-) commit 4d34497ee458482efdcb80fc55250ba5d6484eb6 Author: Chen-Yu Tsai Date: Fri May 3 18:08:46 2019 +0800 clk: sunxi-ng: f1c100s: Use local parent references for CLK_FIXED_FACTOR With the new clk parenting code and CLK_FIXED_FACTOR_{HW,FW_NAME} macros, we can reference parents locally via pointers to struct clk_hw or DT clock-names. Convert existing CLK_FIXED_FACTOR definitions to either the _HW or _FW_NAME variant based on whether the parent clock is internal or external to the CCU. Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai drivers/clk/sunxi-ng/ccu-suniv-f1c100s.c | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) commit e0effb5fbd56a8b2b8917611cbf4fcd9aba92b8f Merge: dca73a65a683 62b1b3b3b6d3 Author: David S. Miller Date: Fri Jun 21 22:05:42 2019 -0400 Merge branch 'PCI-let-pci_disable_link_state-propagate-errors' Heiner Kallweit says: ==================== PCI: let pci_disable_link_state propagate errors Drivers like r8169 rely on pci_disable_link_state() having disabled certain ASPM link states. If OS can't control ASPM then pci_disable_link_state() turns into a no-op w/o informing the caller. The driver therefore may falsely assume the respective ASPM link states are disabled. Let pci_disable_link_state() propagate errors to the caller, enabling the caller to react accordingly. I'd propose to let this series go through the netdev tree if the PCI core extension is acked by the PCI people. ==================== Signed-off-by: David S. Miller commit 62b1b3b3b6d3ef309b1024aea95265c01929933c Author: Heiner Kallweit Date: Tue Jun 18 23:14:50 2019 +0200 r8169: don't activate ASPM in chip if OS can't control ASPM Certain chip version / board combinations have massive problems if ASPM is active. If BIOS enables ASPM and doesn't let OS control it, then we may have a problem with the current code. Therefore check the return code of pci_disable_link_state() and don't enable ASPM in the network chip if OS can't control ASPM. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169_main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 4cfd218855923a07dc02a5bec3d3bb37a118ebc2 Author: Heiner Kallweit Date: Tue Jun 18 23:13:48 2019 +0200 PCI: let pci_disable_link_state propagate errors Drivers may rely on pci_disable_link_state() having disabled certain ASPM link states. If OS can't control ASPM then pci_disable_link_state() turns into a no-op w/o informing the caller. The driver therefore may falsely assume the respective ASPM link states are disabled. Let pci_disable_link_state() propagate errors to the caller, enabling the caller to react accordingly. Signed-off-by: Heiner Kallweit Acked-by: Bjorn Helgaas Signed-off-by: David S. Miller drivers/pci/pcie/aspm.c | 20 +++++++++++--------- include/linux/pci-aspm.h | 7 ++++--- 2 files changed, 15 insertions(+), 12 deletions(-) commit 7633b08b2750513cef662fbcbe66065b9940fc6a Author: Theodore Ts'o Date: Fri Jun 21 21:57:00 2019 -0400 ext4: rename htree_inline_dir_to_tree() to ext4_inlinedir_to_tree() Clean up namespace pollution by the inline_data code. Signed-off-by: Theodore Ts'o fs/ext4/ext4.h | 10 +++++----- fs/ext4/inline.c | 10 +++++----- fs/ext4/namei.c | 8 ++++---- 3 files changed, 14 insertions(+), 14 deletions(-) commit 6fbefb84a98ecc43cb4035c44fe417e6751ddd83 Author: Harry Wentland Date: Fri Feb 22 16:52:34 2019 -0500 drm/amd/display: Add DC core changes for DCN2 Core DC changes for DCN2. Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/Makefile | 6 + drivers/gpu/drm/amd/display/dc/core/dc.c | 141 ++++++++++++++++- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 6 +- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 62 ++++++++ drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 185 +++++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/core/dc_surface.c | 63 ++++++++ drivers/gpu/drm/amd/display/dc/dc.h | 89 ++++++++++- drivers/gpu/drm/amd/display/dc/dc_stream.h | 67 ++++++++ drivers/gpu/drm/amd/display/dc/dm_pp_smu.h | 113 +++++++++++++- 9 files changed, 728 insertions(+), 4 deletions(-) commit 7ed4e6352c16fe018864bc4e626c48e27a0cefee Author: Harry Wentland Date: Fri Feb 22 16:52:08 2019 -0500 drm/amd/display: Add DCN2 HW Sequencer and Resource Add DCN2 resource definition and HW Sequencer changes. Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 15 + drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c | 88 + drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.h | 8 + drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h | 127 + .../amd/display/dc/dce110/dce110_hw_sequencer.c | 42 +- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 13 + drivers/gpu/drm/amd/display/dc/dcn20/Makefile | 14 + drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 1926 ++++++++++++++ drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.h | 90 + .../gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 2741 ++++++++++++++++++++ .../gpu/drm/amd/display/dc/dcn20/dcn20_resource.h | 134 + drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 46 + drivers/gpu/drm/amd/display/dc/inc/resource.h | 3 + 13 files changed, 5246 insertions(+), 1 deletion(-) commit 18eaea4bf80bb8aab6a7070dc6550e6132cd5bdc Author: Harry Wentland Date: Fri Feb 22 16:38:28 2019 -0500 drm/amd/display: Add DCN2 VMID Add support to program DCN2 VMID (Virtual Memory Support) Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn20/dcn20_vmid.c | 62 +++++++++++++++ drivers/gpu/drm/amd/display/dc/dcn20/dcn20_vmid.h | 91 +++++++++++++++++++++++ 2 files changed, 153 insertions(+) commit 83421f32b7632632dd06411bad678d386d4d0847 Author: Harry Wentland Date: Fri Feb 22 16:37:36 2019 -0500 drm/amd/display: Add DCN2 IPP Add support to program DCN2 cursor (IPP) Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_ipp.c | 24 +++++++++++++ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_ipp.h | 43 ++++++++++++++++++++++++ 2 files changed, 67 insertions(+) commit 345429a67c48e1e9f7f95a406285be2b1bd09886 Author: Harry Wentland Date: Fri Feb 22 15:54:43 2019 -0500 drm/amd/display: Add DCN2 DWB Add support to program the DCN2 DWB (Display Writeback) HW Blocks: +--------++------+ +----------+ | HUBBUB || HUBP | <-- | MMHUBBUB | +--------++------+ +----------+ | ^ v | +--------+ +--------+ | DPP | | DWB | +--------+ +--------+ | v ^ +--------+ | | MPC | | +--------+ | | | v | +-------+ | | OPP | | +-------+ | | | v | +--------+ / | OPTC | -------------- +--------+ | v +--------+ +--------+ | DIO | | DCCG | +--------+ +--------+ Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc_types.h | 26 + drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dwb.c | 136 ++++ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dwb.h | 271 +++++++ drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dwb.c | 315 ++++++++ drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dwb.h | 458 +++++++++++ .../gpu/drm/amd/display/dc/dcn20/dcn20_dwb_scl.c | 877 +++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/inc/core_types.h | 52 ++ drivers/gpu/drm/amd/display/dc/inc/hw/dwb.h | 187 +++++ drivers/gpu/drm/amd/display/dc/inc/hw/mcif_wb.h | 105 +++ 9 files changed, 2427 insertions(+) commit fa0d2c989c94579ab143199a07849697afb1b4a8 Author: Harry Wentland Date: Fri Feb 22 15:53:49 2019 -0500 drm/amd/display: Add DCN2 MMHUBBUB Add support to program the DCN2 MMHUBBUB (Multimedia HUB interface) HW Blocks: +--------++------+ +----------+ | HUBBUB || HUBP | <-- | MMHUBBUB | +--------++------+ +----------+ | v +--------+ | DPP | +--------+ | v +--------+ | MPC | +--------+ | v +-------+ | OPP | +-------+ | v +--------+ | OPTC | +--------+ | v +--------+ +--------+ | DIO | | DCCG | +--------+ +--------+ Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dcn20/dcn20_mmhubbub.c | 323 ++++++++++++ .../gpu/drm/amd/display/dc/dcn20/dcn20_mmhubbub.h | 544 +++++++++++++++++++++ 2 files changed, 867 insertions(+) commit bbeb64d0eb78f493323897bbb8cbd1820645501b Author: Harry Wentland Date: Tue May 7 14:58:48 2019 -0500 drm/amd/display: Add DCN2 HUBP and HUBBUB Add support to program the DCN2 HUBP (Display to data fabric interface pipe) and HUBBUB (DCN memory HUB interface) HW Blocks: +--------++------+ | HUBBUB || HUBP | +--------++------+ | v +--------+ | DPP | +--------+ | v +--------+ | MPC | +--------+ | v +-------+ | OPP | +-------+ | v +--------+ | OPTC | +--------+ | v +--------+ +--------+ | DIO | | DCCG | +--------+ +--------+ Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dcn10/dcn10_hubbub.c | 45 +- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c | 27 + drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.h | 8 + .../gpu/drm/amd/display/dc/dcn20/dcn20_hubbub.c | 523 +++++++++++++++ .../gpu/drm/amd/display/dc/dcn20/dcn20_hubbub.h | 108 ++++ drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubp.c | 699 +++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubp.h | 244 +++++++ drivers/gpu/drm/amd/display/dc/inc/hw/dchubbub.h | 62 ++ drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h | 25 + 9 files changed, 1739 insertions(+), 2 deletions(-) commit f7de96ee8b5f4d0d4ef7b00b8868049a6869a10f Author: Harry Wentland Date: Fri Feb 22 15:50:50 2019 -0500 drm/amd/display: Add DCN2 DPP Add support to program the DCN2 DPP (Multiple pipe and plane combine) HW Blocks: +--------+ | DPP | +--------+ | v +--------+ | MPC | +--------+ | v +-------+ | OPP | +-------+ | v +--------+ | OPTC | +--------+ | v +--------+ +--------+ | DIO | | DCCG | +--------+ +--------+ Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c | 10 + drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.h | 5 + .../gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c | 4 + .../gpu/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c | 8 + drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp.c | 493 ++++++++++ drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp.h | 698 +++++++++++++++ .../gpu/drm/amd/display/dc/dcn20/dcn20_dpp_cm.c | 990 +++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h | 53 ++ 8 files changed, 2261 insertions(+) commit f789b0b82bf0aee36ce2bb4270aad617d16c3b6b Author: Harry Wentland Date: Fri Feb 22 10:49:04 2019 -0500 drm/amd/display: Add DCN2 MPC Add support to program the DCN2 MPC (Multiple pipe and plane combine) HW Blocks: +--------+ | MPC | +--------+ | v +-------+ | OPP | +-------+ | v +--------+ | OPTC | +--------+ | v +--------+ +--------+ | DIO | | DCCG | +--------+ +--------+ Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 87 +++- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c | 6 + drivers/gpu/drm/amd/display/dc/dcn20/dcn20_mpc.c | 526 +++++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dcn20/dcn20_mpc.h | 285 ++++++++++++ drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h | 52 +++ 5 files changed, 955 insertions(+), 1 deletion(-) commit eb7a74a36c247bfb7cb4249df59b8cedcb0b1fff Author: Harry Wentland Date: Fri Feb 22 15:45:23 2019 -0500 drm/amd/display: Add DCN2 OPP Add support to program the DCN2 OPP (Output Plane Processing) HW Blocks: +-------+ | OPP | +-------+ | v +--------+ | OPTC | +--------+ | v +--------+ +--------+ | DIO | | DCCG | +--------+ +--------+ Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_opp.c | 8 + drivers/gpu/drm/amd/display/dc/dcn20/dcn20_opp.c | 355 +++++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dcn20/dcn20_opp.h | 158 ++++++++++ drivers/gpu/drm/amd/display/dc/inc/hw/opp.h | 29 ++ 4 files changed, 550 insertions(+) commit 2d78b3a177fea66cf576a420d2ff83811643c021 Author: Harry Wentland Date: Fri Feb 22 10:19:04 2019 -0500 drm/amd/display: Add DCN2 OPTC Add support for programming the DCN2 OPTC (Output Timing Controller) HW Blocks: +--------+ | OPTC | +--------+ | v +--------+ +--------+ | DIO | | DCCG | +--------+ +--------+ Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.h | 33 +- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_optc.c | 415 +++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dcn20/dcn20_optc.h | 103 +++++ drivers/gpu/drm/amd/display/dc/inc/hw/hw_shared.h | 43 ++- .../drm/amd/display/dc/inc/hw/timing_generator.h | 22 ++ 5 files changed, 614 insertions(+), 2 deletions(-) commit fcee01b9f82d44a4f62791f710ede954731df1bf Author: Harry Wentland Date: Tue May 7 14:57:07 2019 -0500 drm/amd/display: Add DCN2 clk mgr Adds support for handling of clocking relevant to the DCN2 block, including programming of the DCCG (Display Controller Clock Generator) block: HW Blocks: +--------+ +--------+ | DIO | | DCCG | +--------+ +--------+ Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/Makefile | 12 + drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c | 32 +- .../amd/display/dc/clk_mgr/dce100/dce_clk_mgr.h | 22 -- .../drm/amd/display/dc/clk_mgr/dcn10/rv1_clk_mgr.c | 25 +- .../dc/clk_mgr/dcn10/rv1_clk_mgr_vbios_smu.c | 58 ++-- .../amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c | 384 +++++++++++++++++++++ .../amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.h | 44 +++ .../gpu/drm/amd/display/dc/dce/dce_clock_source.c | 108 ++++++ .../gpu/drm/amd/display/dc/dce/dce_clock_source.h | 42 +++ drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dccg.c | 157 +++++++++ drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dccg.h | 116 +++++++ .../drm/amd/display/dc/inc/hw/clk_mgr_internal.h | 82 ++++- 12 files changed, 999 insertions(+), 83 deletions(-) commit ca4d9b3a5a3b70da5af1f48d36e181cdebe77e2c Author: Harry Wentland Date: Tue May 7 14:50:05 2019 -0500 drm/amd/display: Add DCN2 DIO Add support for the DIO (Display IO) block of DCN2, which entails our stream and link encoders. HW Blocks: +--------+ | DIO | +--------+ Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/dc/dcn10/dcn10_link_encoder.h | 174 ++++++++ .../amd/display/dc/dcn10/dcn10_stream_encoder.h | 40 ++ .../drm/amd/display/dc/dcn20/dcn20_link_encoder.c | 438 ++++++++++++++++++++ .../drm/amd/display/dc/dcn20/dcn20_link_encoder.h | 165 ++++++++ .../amd/display/dc/dcn20/dcn20_stream_encoder.c | 440 +++++++++++++++++++++ .../amd/display/dc/dcn20/dcn20_stream_encoder.h | 97 +++++ .../gpu/drm/amd/display/dc/inc/hw/link_encoder.h | 14 + .../gpu/drm/amd/display/dc/inc/hw/stream_encoder.h | 24 ++ .../display/dc/virtual/virtual_stream_encoder.c | 5 + 9 files changed, 1397 insertions(+) commit 728c06986a4f386c7ec5e5170716e30b610c6d32 Author: Harry Wentland Date: Fri Feb 22 09:59:43 2019 -0500 drm/amd/display: Add DCN2 changes to DML Update DML (Display Mode Lib) to support DCN2 Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 7 + drivers/gpu/drm/amd/display/dc/dml/Makefile | 15 +- .../amd/display/dc/dml/dcn20/display_mode_vba_20.c | 5104 ++++++++++++++++++++ .../amd/display/dc/dml/dcn20/display_mode_vba_20.h | 32 + .../display/dc/dml/dcn20/display_rq_dlg_calc_20.c | 1698 +++++++ .../display/dc/dml/dcn20/display_rq_dlg_calc_20.h | 71 + .../gpu/drm/amd/display/dc/dml/display_mode_lib.c | 22 + .../gpu/drm/amd/display/dc/dml/display_mode_lib.h | 29 +- .../drm/amd/display/dc/dml/display_mode_structs.h | 26 + .../gpu/drm/amd/display/dc/dml/display_mode_vba.c | 845 ++++ .../gpu/drm/amd/display/dc/dml/display_mode_vba.h | 848 ++++ 11 files changed, 8693 insertions(+), 4 deletions(-) commit bff65b778152a98531c8a0d85287f703ef33bf9f Author: Harry Wentland Date: Fri Feb 22 09:59:12 2019 -0500 drm/amd/display: Add DCN2 IRQ handling Add support to program DCN2 IRQ handling Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/irq/Makefile | 10 + .../amd/display/dc/irq/dcn20/irq_service_dcn20.c | 361 +++++++++++++++++++++ .../amd/display/dc/irq/dcn20/irq_service_dcn20.h | 34 ++ 3 files changed, 405 insertions(+) commit 9647509497602890e0209dc774494f7ffdeaf8f3 Author: Harry Wentland Date: Fri Feb 22 09:58:49 2019 -0500 drm/amd/display: Add DCN2 BIOS parsing Handle BIOS parsing for DCN2 Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 4 ++++ drivers/gpu/drm/amd/display/dc/bios/command_table_helper2.c | 6 ++++++ 2 files changed, 10 insertions(+) commit 2e35facf82bcdd9b9eb9129f4fb31127b79249ec Author: Harry Wentland Date: Fri Feb 22 09:45:07 2019 -0500 drm/amd/display: Add GPIO support for DCN2 Adding support to program GPIO HW block of DCN2 Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/gpio/Makefile | 11 + .../amd/display/dc/gpio/dcn20/hw_factory_dcn20.c | 212 ++++++++++++ .../amd/display/dc/gpio/dcn20/hw_factory_dcn20.h | 33 ++ .../amd/display/dc/gpio/dcn20/hw_translate_dcn20.c | 382 +++++++++++++++++++++ .../amd/display/dc/gpio/dcn20/hw_translate_dcn20.h | 35 ++ drivers/gpu/drm/amd/display/dc/gpio/ddc_regs.h | 53 +++ drivers/gpu/drm/amd/display/dc/gpio/hw_ddc.c | 15 + drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c | 9 + drivers/gpu/drm/amd/display/dc/gpio/hw_translate.c | 9 + 9 files changed, 759 insertions(+) commit 38e7128960a67a172c0fc525ff9bc8b738ebe127 Author: Harry Wentland Date: Tue May 7 14:47:35 2019 -0500 drm/amd/display: add AUX and I2C for DCN2 Adding support to program DCN2 AUX and I2C HW. Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_aux.h | 10 ++++++++ drivers/gpu/drm/amd/display/dc/dce/dce_i2c_hw.c | 32 +++++++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dce/dce_i2c_hw.h | 22 +++++++++++++++++ 3 files changed, 64 insertions(+) commit 9793014570b90340adf464f7af45f15adb436c63 Author: Harry Wentland Date: Fri Feb 22 10:11:16 2019 -0500 drm/amd/display: Add DCN2 and NV ASIC ID DCN2.0 (Display Core Next) is the display block in Navi10. Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/include/dal_asic_id.h | 6 ++++++ drivers/gpu/drm/amd/display/include/dal_types.h | 3 +++ 2 files changed, 9 insertions(+) commit 76b743f45d7f5788422a9e7631f1c6cb6d46e88a Author: Xiaojie Yuan Date: Tue Mar 19 14:27:04 2019 +0800 drm/amd/display: use fixed-width data type for soc bounding box struct since it's firmware. Signed-off-by: Xiaojie Yuan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_socbb.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit 57b3ec35d5df7ebec65c6472ea1cd9f6a764eb09 Author: Leo Li Date: Wed Apr 3 17:20:49 2019 -0400 drm/amdgpu: Split gpu_info_soc_bounding_box out from amdgpu_ucode.h DC needs to include the soc bounding box when initializing HW resources. Including amdgpu_ucode.h directly will cause warnings, since amdgpu.h is required to define amdgpu_device. The solution here is to split the bounding box structs into a different header, then include it in both amdgpu_ucode.h, and relevant DC HW resource files. Signed-off-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_socbb.h | 82 +++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 58 +--------------------- 2 files changed, 84 insertions(+), 56 deletions(-) commit 48321c3dde79f7f2db5000febddf70df3620c445 Author: Harry Wentland Date: Tue May 7 14:34:21 2019 -0500 drm/amd/display: Read soc_bounding_box from gpu_info (v2) [WHY] We don't want to expose sensitive ASIC information before ASIC release. [HOW] Encode the soc_bounding_box in the gpu_info FW (for Linux) and read it at driver load. v2: fix warning when CONFIG_DRM_AMD_DC_DCN2_0 is not set (Alex) Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 10 +++- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 63 +++++++++++++++++++++++ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ++ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 7 +++ drivers/gpu/drm/amd/display/dc/dc.h | 9 ++++ 5 files changed, 91 insertions(+), 1 deletion(-) commit edee92c3794074c698ef0dfbcb4274576dea39c7 Author: hersen wu Date: Tue May 21 16:03:28 2019 -0400 drm/amd/powerplay: notify smu with active display count when dc update clocks via smu, smu needs to know how many displays active. this interface is for dc notify number of active displays to smu. Signed-off-by: hersen wu Reviewed-by: Huang Rui Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 1 + 1 file changed, 1 insertion(+) commit 5c170a59e7d89f306dfedbada113fb09ce6db114 Author: hersen wu Date: Wed May 22 10:57:40 2019 -0400 drm/amd/powerplay: allow dc request uclk change when dc set mode or color format in frame buffer change, it may request clock changes, like dispclk, dcfclk, uclk. after smu get clock requests, smu will make decision. Signed-off-by: hersen wu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ccbf007b47212d6f24683792ba59773c75a1ece1 Author: Hawking Zhang Date: Sat Jun 15 23:14:30 2019 +0800 drm/amdgpu: initialize THM & CLK IP registers base address was missed before. Signed-off-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/navi10_reg_init.c | 2 ++ 1 file changed, 2 insertions(+) commit 61af800fe7b03163b92a718afc94b1e466dac695 Author: Marek Olšák Date: Tue May 28 18:13:00 2019 -0400 drm/amdgpu: fix PA_SC_FIFO_SIZE for Navi10 (v2) Proper size is 0. v2: squash in whitespace fixes (Ernst Sjöstrand) Signed-off-by: Marek Olšák Reviewed-by: Xiaojie Yuan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 93dfbcefb374f38e6255b927bf3427af14f593c1 Author: Kevin Wang Date: Thu May 30 19:22:28 2019 +0800 drm/amd/powerplay: remove unsupport function set_thermal_fan_table for navi10 the PPSMC_MSG_SetFanTemperatureTarget is not support on navi10 Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 13 ------------- 1 file changed, 13 deletions(-) commit 7c6fe84cf5f23c4d7913ff9d18aa09db449e0cb5 Author: Jack Xiao Date: Sat Jun 1 10:35:12 2019 +0800 drm/amd/powerplay: enable BACO feature as WAR It would hit SMU fw bug without BACO enablement when audio driver put audio device to D3 state. Before the bug in SMU fw get fixed, enable BACO feature as WAR. Signed-off-by: Jack Xiao Acked-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 1 + 1 file changed, 1 insertion(+) commit a39bf39816b0d02344fa36e280a52a9b9787bd89 Author: Kevin Wang Date: Thu May 30 10:28:11 2019 +0800 drm/amd/powerplay: use pp_feature_mask to control uclk(mclk) dpm enabled the uclk dpm feature is not work well on all navi10 asic, use pp feature mask module parameter to control it. Signed-off-by: Kevin Wang Reviewed-by: Jack Xiao Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 4f56d9d412ed8f2edb15d54d24bdf87c4c4e1fc0 Author: tiancyin Date: Thu May 30 11:04:11 2019 +0800 drm/amdgpu: add new navi10 DIDs Reviewed-by: Jack Xiao Signed-off-by: tiancyin Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 ++ 1 file changed, 2 insertions(+) commit 408e27cbba46467dabc93217ed41365ce34626a1 Author: tiancyin Date: Mon May 20 18:21:59 2019 +0800 drm/amd/powerplay: add ppt interface version log Include the interface version as well. Signed-off-by: tiancyin Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 6ad68a7e1f3ebda4971363b395f50ebea3745ed6 Author: Alex Deucher Date: Tue Jun 4 14:37:05 2019 -0500 drm/amdgpu/gfx10: update to latest golden setting Fix UTCL1_CGTT_CLK_CTRL Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 591745854893330adc3bd44389045ba0011f6efe Author: Alex Deucher Date: Thu May 30 00:51:44 2019 -0500 drm/amdgpu/powerplay/vega20: use correct table index Use the SMU_* variant so we look up the correct index. Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 450af30ce23a6fca66686855255a69d9179f42c4 Author: Leo Liu Date: Mon May 27 10:49:19 2019 -0400 drm/amdgpu/VCN: enable indirect DPG SRAM mode This is default mode for VCN2.x now Signed-off-by: Leo Liu Reviewed-by: James Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 3 +++ 1 file changed, 3 insertions(+) commit dc8ae677c2a03891149a743fe50931bae4c506c5 Author: Leo Liu Date: Mon May 27 10:46:25 2019 -0400 drm/amdgpu/VCN: implement indirect DPG SRAM mode SRAM will be programmed by PSP Signed-off-by: Leo Liu Reviewed-by: James Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 3 ++ drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 69 ++++++++++++++++++++++++--------- 2 files changed, 53 insertions(+), 19 deletions(-) commit a77b9fdf9aca3d9d8955487e95cd1e884b45fe1a Author: Leo Liu Date: Fri May 24 14:07:41 2019 -0400 drm/amdgpu/VCN: add buffer for indirect SRAM usage This will be used later for indirect SRAM mode Signed-off-by: Leo Liu Reviewed-by: James Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 16 ++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 6 ++++++ 2 files changed, 22 insertions(+) commit 1768908ec5a80d20da70245c319092db8fce09b8 Author: Jack Xiao Date: Tue May 28 21:47:05 2019 +0800 drm/amd/powerplay: disable fw dstate when gfxoff is enabled SMU FW has bug that it would cause hung when both fw dstate and gfxoff are enabled at the same time. Signed-off-by: Jack Xiao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 4bc920a68028f476d0460a31bad488b602af8eab Author: Jack Xiao Date: Tue May 28 15:43:02 2019 +0800 drm/amd/powerplay: update smu11_driver_if_navi10.h update the smu11_driver_if_navi10.h since navi10 smu fw update to 42.23 Signed-off-by: Jack Xiao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher .../drm/amd/powerplay/inc/smu11_driver_if_navi10.h | 24 +++++++++++++--------- 1 file changed, 14 insertions(+), 10 deletions(-) commit 86ddf3529e34d768a70f074bfbac5c9af0434f78 Author: Jack Xiao Date: Tue May 14 11:31:04 2019 +0800 drm/amdgpu/psp: add new psp interface for vcn updating sram PSP leverages the existing fw loading function for vcn updating sram. Signed-off-by: Jack Xiao Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 13 +++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 3 +++ 2 files changed, 16 insertions(+) commit c76ff09bef2d11e89e57b096c2fdc93c68bb2a5b Author: Jack Xiao Date: Tue May 14 11:53:57 2019 +0800 drm/amdgpu/psp: convert ucode id to psp ucode id Convert ucode id to the corresponding psp ucode id. Signed-off-by: Jack Xiao Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 6e72d8e9fb70d3677b319949c41370781c148f4f Author: Jack Xiao Date: Tue May 14 11:36:33 2019 +0800 drm/amdgpu: add corresponding vcn ram ucode id Add VCN RAM ucode id in corresponding to psp ucode id. Signed-off-by: Jack Xiao Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 2 ++ 1 file changed, 2 insertions(+) commit 68c0798cd9f96ceac4d17b16738558712d1780f4 Author: Jack Xiao Date: Tue May 14 11:26:52 2019 +0800 drm/amdgpu/psp: add new VCN RAM ucode id to psp PSP supports to program vcn sram by ucode loading interface. Signed-off-by: Jack Xiao Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/psp_gfx_if.h | 2 ++ 1 file changed, 2 insertions(+) commit 157710ea4d61d6440790f52655fd4af09165a70a Author: Leo Liu Date: Wed May 15 13:58:20 2019 -0400 drm/amdgpu: enable VCN2.0 DPG mode It will be the default for VCN2.x family Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Reviewed-by: James Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/nv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7282da0b3ac9453bc98fda0f0e28a11549332454 Author: Leo Liu Date: Fri May 24 12:51:48 2019 -0400 drm/amdgpu/VCN2.0: add DPG pause mode Pause the DPG when not doing decode Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 70 +++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) commit bf4865b587c0d8ffd1ba8aad942fdb42b6d3399f Author: Leo Liu Date: Tue May 14 14:36:42 2019 -0400 drm/amdgpu/VCN2.0: add DPG mode start and stop (v2) This is for using SRAM directly v2: rebase (Alex) Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Reviewed-by: James Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 299 +++++++++++++++++++++++++++++++++- 1 file changed, 296 insertions(+), 3 deletions(-) commit 19c663fc7799035f39f9833a2e3d82a2ed27b1e5 Author: Leo Liu Date: Fri May 24 12:19:00 2019 -0400 drm/amdgpu/VCN2.0: add direct SRAM read and write This will be the basic and used for DPG mode Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Reviewed-by: James Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 48 +++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit b3ef5ce0379b4a440d89b7731efc7384aff9efe1 Author: Leo Liu Date: Tue May 14 12:55:54 2019 -0400 drm/amdgpu/VCN2.0 remove unused Macro and declaration Just for cleanup Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Reviewed-by: James Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 2 -- 1 file changed, 2 deletions(-) commit 0c83d32c565c9f40cb686df5ad65ade8ec85a876 Author: Kevin Wang Date: Mon Jun 17 13:17:27 2019 -0500 drm/amd/powerplay: simplified od_settings for each asic the od_settings is asic related data, so move it to asic file. Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 12 --- drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 7 +- drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 139 +++++++++++++------------ drivers/gpu/drm/amd/powerplay/vega20_ppt.h | 6 ++ 4 files changed, 77 insertions(+), 87 deletions(-) commit 8f30a16d3ac15f61aa7a02b77191aafe44912654 Author: Kevin Wang Date: Tue May 21 15:37:24 2019 +0800 drm/amd/powerplay: move od_default_setting callback to asic file the set default od_setting is asic related function, so move thic code to vega20_ppt file. Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 2 +- drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 7 ++-- drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 44 -------------------------- drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 40 ++++++++++++++++++++++- 4 files changed, 43 insertions(+), 50 deletions(-) commit a259714bb26a5d107d5d0d742afd509c350441f4 Author: Kevin Wang Date: Tue May 21 15:19:22 2019 +0800 drm/amd/powerplay: move od8_setting helper function to vega20_ppt these callback functions is only used for vega20 asic, to be compatible other asics,need to move this code to vega20_ppt file Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 10 --------- drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 27 ---------------------- drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 31 ++++++++++++++++++++++++-- 3 files changed, 29 insertions(+), 39 deletions(-) commit c7a063a2f21b2ec83f4a3ea2494dc10b52dc3589 Author: Kevin Wang Date: Thu May 16 18:24:08 2019 +0800 drm/amd/powerplay: fix clk type name error OD_SCLK OD_MCLK use sw-smu clk type name to replace legacy clk type name Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 4 ++-- drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) commit 6f6a7bba696118ea440116f7c09dc93e18d8e78b Author: Kevin Wang Date: Wed May 15 15:59:38 2019 +0800 drm/amd/powerplay: fix deadlock issue for smu_force_performance_level the smu->mutex is internal lock resource in sw-smu, some functions will use it at the same time, so it maybe will cause deadlock issue. this patch fix this issue in smu_force_performance_level function. Signed-off-by: Kevin Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 9 --------- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 5 ++++- 2 files changed, 4 insertions(+), 10 deletions(-) commit 3ebab625e6626a0794808a25ea2de5de1ea65646 Author: Jack Xiao Date: Mon May 20 12:16:19 2019 +0800 drm/amd: the data retured from PRT is expected to be 0 The dummy page for returning from PRT resides inside system memory, need set system flag bit in VM_L2_CNTL. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c | 3 ++- drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) commit b1fa87a48e53e05a712386baea39370331d95d72 Author: tiancyin Date: Wed Jun 5 16:57:44 2019 -0500 drm/amdgpu/gfx10: update gfx golden settings add new registers: mmPA_SC_ENHANCE_1, mmTCP_CNTL, update registers: mmDB_DEBUG4, mmUTCL1_CTRL Reviewed-by: Xiaojie Yuan Signed-off-by: tiancyin Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit f5c1b7afff8e02d9dfcdae810a6d875e2aa25a9b Author: Alex Deucher Date: Wed May 22 11:58:18 2019 -0500 drm/amdgpu/powerplay: add license to smu11 header Signed-off-by: Alex Deucher .../drm/amd/powerplay/inc/smu11_driver_if_navi10.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit f4b3295fa228eef5fe1a0a736f945d757eaaaed1 Author: hersen wu Date: Tue May 21 15:02:23 2019 -0400 drm/amd/powerplay: add interface to get uclk dpm table dc needs get uclk dpm table for bandwidth calculation Signed-off-by: hersen wu Acked-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 3 +++ drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 30 ++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) commit 26e2b581482d69053eff27d355c04e182fb6b662 Author: hersen wu Date: Tue May 21 15:38:59 2019 -0400 drm/amd/powerplay: wake up azalia from d3 by sending smu message this is hw workaround to wake up azalia from d3. display asic and azalia are two different pci devices. while display asic wake from d3, current hw does not send signal to azalia. workaround: display driver ask smu send message to azalia device to let azalia wake up. Defintion of SMU message, like PPSMC_MSG_BacroAudioD3PME, is per asic. It is shared by different OS. Signed-off-by: hersen wu Acked-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 4 ++++ drivers/gpu/drm/amd/powerplay/inc/smu_v11_0_ppsmc.h | 3 ++- drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 1 + drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 12 ++++++++++++ 4 files changed, 19 insertions(+), 1 deletion(-) commit 2e13c7551ca03dac449c0d55a08a0459d876ea11 Author: hersen wu Date: Wed May 29 23:30:32 2019 -0500 drm/amd/powerplay: notify smu with active display count when dc update clocks via smu, smu needs to know how many displays active. this interface is for dc notify number of active displays to smu. Signed-off-by: hersen wu Reviewed-by: Huang Rui Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 13 ++++++++++++- drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 8 +++++--- drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 6 +++--- 3 files changed, 20 insertions(+), 7 deletions(-) commit 382fb77891b6f9b067fc801cc63503d0d1d07dfb Author: hersen wu Date: Wed May 29 23:28:55 2019 -0500 drm/amd/powerplay: allow dc request uclk change when dc set mode or color format in frame buffer change, it may request clock changes, like dispclk, dcfclk, uclk. after smu get clock requests, smu will make decision. Signed-off-by: hersen wu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 576851345b677b28617217f5d97920f62eab471e Author: Kevin Wang Date: Tue Jun 4 17:38:42 2019 +0800 drm/amd/powerplay: remove smu callback funciton get_mclk(get_sclk) remove smu callback: get_mclk, get_sclk. because the function smu_get_dpm_freq_range has the same function. Signed-off-by: Kevin Wang Reviewed-by: Evan Quan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c | 30 +++++++-- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 34 +++++++++-- drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 6 -- drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 85 -------------------------- 4 files changed, 52 insertions(+), 103 deletions(-) commit e9c12a8e27aa211b057e5cb442ce96c02d9fde78 Author: Kevin Wang Date: Tue Jun 4 17:41:48 2019 +0800 drm/amd/powerplay: remove smu mutex lock in smu_hw_init the smu mutex lock is unnecessary in smu hw init. Signed-off-by: Kevin Wang Reviewed-by: Evan Quan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 4 ---- 1 file changed, 4 deletions(-) commit 5e6d266573db27f97de56f457138730a6ac48413 Author: Kevin Wang Date: Thu May 30 18:00:22 2019 +0800 drm/amd/powerplay: add thermal ctf support for navi10 add sw-CTF support for navi10 Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 7 +++ drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 4 ++ drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 2 + drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 79 ++++++++++++++++++++++++++ 4 files changed, 92 insertions(+) commit 9634de271a474ca0e5fa04f3308b718f2e164e69 Author: Hawking Zhang Date: Fri Jun 21 11:29:29 2019 -0500 drm/amd/powerplay: fix no statements in function returning non-void Add missing return (rebase fix). Signed-off-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 2 ++ 1 file changed, 2 insertions(+) commit e211580da9a4767b1902a17f0cbed580000f2b66 Author: Hawking Zhang Date: Mon Jun 10 21:39:29 2019 +0800 drm/amd/powerplay: move get_thermal_temperature_range to ppt funcs The thermal policy could be ASIC specific ones and depends on structures in pptable. As a result, get_thermal_temperature_range should be implemented as ppt funcs instead of smu funcs Signed-off-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 14 ++++ drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 90 ++++---------------------- drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 47 +++++++++++++- 3 files changed, 70 insertions(+), 81 deletions(-) commit 4dc9c8bf3474955cd721991a415df8e2b9e73b84 Author: Kevin Wang Date: Fri May 17 14:12:51 2019 +0800 drm/amd/powerplay: move function thermal_get_temperature to veag20_ppt the fcuntion thermal_get_temperature will be access SmuMetrics_t data, the data structure is asic related, so move vega20_ppt to implement. Signed-off-by: Kevin Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 7 ----- drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 48 ++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 7 deletions(-) commit 62b9a88c0ef97ca3373da53b3d499ffabbd13c94 Author: Kevin Wang Date: Fri May 17 14:02:15 2019 +0800 drm/amd/powerplay: move function get_metrics_table to vega20_ppt the SmuMetrics_t table is asic related data structure. so move vega20_ppt file to implement. Signed-off-by: Kevin Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 6 ++--- drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 2 +- drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 36 +++++-------------------- drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 37 ++++++++++++++++++++++---- 4 files changed, 42 insertions(+), 39 deletions(-) commit a38470f0f8dcd639262d7e2eeaa26b8e0947d811 Author: Kevin Wang Date: Wed May 15 12:59:58 2019 +0800 drm/amd/powerplay: move power_dpm_force_performance_level to amdgpu_smu file because this callback is not asic related function, so move it to top code level to support more asic (eg: navi10) Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 41 +++++++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 8 ++--- drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 42 -------------------------- 3 files changed, 43 insertions(+), 48 deletions(-) commit eefa5e2b3030585ffb0e4afaf26ae5f28b3f9f8e Author: Kevin Wang Date: Thu May 16 15:06:25 2019 +0800 drm/amd/powerplay: enable uclk dpm default on navi10 enable uclk (mclk) dpm by default on navi10 Signed-off-by: Kevin Wang Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit d8ceb192cb8e1c1daa71242399ece5dba7cd3cf2 Author: Kenneth Feng Date: Tue May 14 17:34:55 2019 +0800 drm/amd/powerplay: enable ac/dc feature on navi10 enable ac/dc feature on navi10. currently we don't have the case to verify it. Signed-off-by: Kenneth Feng Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3a3c51dd9008a5787dae6dd66a322df7e0f8909d Author: Kenneth Feng Date: Tue May 14 17:08:36 2019 +0800 drm/amd/powerplay: enable gfxclk ds,dcefclk ds and fw dstate on navi10 on navi10, by default the below four features are enabled. gfxclk deep sleep: enabled and verified fw dstate: enabled and then soc ulv is verified dcefclk deep sleep: enabled and verified. notice that on different boards, due to the minimum dcefclk deep sleep setting in VBIOS, we may not see dcefclk deep sleep kicking in. Signed-off-by: Kenneth Feng Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit c0b9d6d2f1c20c4360589a3321b626272d787bde Author: Kevin Wang Date: Tue May 14 14:01:01 2019 +0800 drm/amd/powerplay: add sclk sysfs interface support for navi10 miss sclk support in force_clk_levels function Signed-off-by: Kevin Wang Reviewed-by: Xiaojie Yuan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 1 + 1 file changed, 1 insertion(+) commit 462a70d87e257aa26a528b210775fa58f5417e0a Author: Tao Zhou Date: Tue May 14 11:37:32 2019 +0800 drm/amdgpu: correct reference clock value on navi10 remove the divisor 4 Signed-off-by: Tao Zhou Acked-by: Jack Xiao Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/nv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c877dff7d97eb59e5a3b54160a6d66454b4e8778 Author: Tao Zhou Date: Mon May 13 16:52:22 2019 +0800 drm/amd/powerplay/smu11: disable some pp features on navi10 A0 secure board disable DPM UCLK and SOC DS on A0 secure board Signed-off-by: Tao Zhou Acked-by: Alex Deucher Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit fc419158104c66e8ce12aa4cccabfdb5aff3fc5c Author: Tao Zhou Date: Fri May 10 16:31:57 2019 +0800 drm/amd/powerplay/smu11: add secure board check function (v2) To determine whether the board is secure or not. v2: rebase (Alex) Signed-off-by: Tao Zhou Acked-by: Alex Deucher Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit d7a8efa59b5eeea0e1c32ec1d117bdaf95ebee28 Author: Tao Zhou Date: Mon May 13 16:56:17 2019 +0800 drm/amd/powerplay/smu11: enable ds socclk by default Enable soc clk deep sleep. Signed-off-by: Tao Zhou Acked-by: Alex Deucher Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 1 + 1 file changed, 1 insertion(+) commit d5c316930fd5196a7263f2bd8b7daf9296ae520b Author: Kevin Wang Date: Fri May 10 15:29:11 2019 +0800 drm/amd/powerplay: fix amdgpu_pm_info show gpu load error due to the smu dma/RTOS restriction, the interval of catching smu metric table should be more than 1ms. otherwise it will cause the gpu activity data corruption. Signed-off-by:Kevin Wang Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 2 ++ 1 file changed, 2 insertions(+) commit 564c4c7f00266a92fd3521983164b1014e6bc7e9 Author: Kevin Wang Date: Fri Jun 21 11:26:18 2019 -0500 drm/amd/powerplay: simplify the interface of get_gpu_power this callback function is only call in read_sensor in smu_v11_0.c, so move this code to {asic}_ppt.c to implement as asic related function. Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 3 --- drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 5 ++++- drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 4 ---- drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 5 ++++- 4 files changed, 8 insertions(+), 9 deletions(-) commit d573bb214dd2578f7a09c116c3ea9bf99cb4d4fd Author: Kevin Wang Date: Fri Jun 21 11:25:00 2019 -0500 drm/amd/powerplay: simplify the interface of get_current_activity_percent this callback function is only call in read_sensor in smu_v11_0.c, so move this code to {asic}_ppt.c to implement as asic related function. Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 5 --- drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 5 ++- drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 7 ---- drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 48 +++++++++++++++----------- 4 files changed, 31 insertions(+), 34 deletions(-) commit e36182490dec3d2947dbf3c3d979051b8706845c Author: Kevin Wang Date: Wed May 8 14:37:08 2019 +0800 drm/amd/powerplay: fix dpm freq unit error (10KHz -> Mhz) the interface smu_v11_0_get_current_clk_freq should be return 10Khz not Mhz unit to adapt vega20 and navi10 asic at the same time. Signed-off-by: Kevin Wang Acked-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 2 ++ drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 19 ++++++++++--------- 2 files changed, 12 insertions(+), 9 deletions(-) commit 162aa5c31afc64282b1bdce6893fb0f17733818c Author: Kenneth Feng Date: Sun Apr 28 17:43:36 2019 +0800 amd/powerplay: update the vcn pg update the vcn pg function in navi10. Signed-off-by: Kenneth Feng Reviewed-by: Evan Quan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 6 ++++++ drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 14 ++++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) commit 9c62f993eeda3e71a7f0bbe1dc57ac305bfda486 Author: Kevin Wang Date: Sun Apr 28 18:40:11 2019 +0800 drm/amd/powerplay: add function read_sensor for navi10 add callback function read_sensor for navi10 asic Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 5bbb09943e5f4df025bac2731b8e3e3546873b14 Author: Kevin Wang Date: Thu Apr 25 18:02:14 2019 +0800 drm/amd/powerplay: add function set_watermarks_table function for navi10 add callback function set_watermarks_table for navi10 asic Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 61 ++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) commit 4f963b01f649b358c1ae99fd4ac24353f3c84a0e Author: Kevin Wang Date: Thu Apr 25 16:15:21 2019 +0800 drm/amd/powerplay: add function notify_smc_display_config_change for navi10 add callback function notify_smc_display_config_change for navi10 asic Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 40 ++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit 2d9fb9b06643d2bd19fef11611ede36db148557c Author: Kevin Wang Date: Thu Apr 25 15:52:54 2019 +0800 drm/amd/powerplay: add function get_profiling_clk_mask for navi10 add callback function get_profiling_clk_mask for navi10 asic Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 42 ++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit b45dc20b08c03d90f8ac279fa96f14e011a16989 Author: Kevin Wang Date: Thu Apr 25 15:41:13 2019 +0800 drm/amd/powerplay: add funciton get[set]_power_profile_mode for navi10 (v2) add callback function get[set]_power_profile_mode for navi10 asic v2: fix smu_update_table for rebase (Alex) Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 173 +++++++++++++++++++++++++++++ 1 file changed, 173 insertions(+) commit 6c6187ece013f220c7d29805f012cb88968ce880 Author: Kevin Wang Date: Fri Jun 21 11:19:15 2019 -0500 drm/amd/powerplay: add function get_workload_type_map for swsmu 1.add new callback function get_workload_byte for smu 2.remove old workload map function Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 6 +-- drivers/gpu/drm/amd/powerplay/inc/smu_v11_0.h | 3 ++ drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 23 ++++++++++ drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 58 +++++++++++--------------- 4 files changed, 53 insertions(+), 37 deletions(-) commit 1316b713618cbbef3141c630bf47214bfe0d1b82 Author: Kevin Wang Date: Tue Apr 23 14:45:54 2019 +0800 drm/amd/powerplay: remove upload_dpm_level function for vega20 the function upload_dpm_level is an internal function, so remove public interface. Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 4 ---- drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 5 ++--- 2 files changed, 2 insertions(+), 7 deletions(-) commit 2d589a5bfbe7c5d1daf36e6254d52a0fcda8cc27 Author: Kevin Wang Date: Tue Apr 23 13:14:15 2019 +0800 drm/amd/powerplay: add function get_fan_speed_percent for navi10 add callback function get_fan_speed_percent for navi10 asic Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit da85f0812365dac45273a9dd8bd6bc1c254055e4 Author: Kevin Wang Date: Tue Apr 23 13:05:27 2019 +0800 drm/amd/powerplay: add function set_thermal_fan_table for navi10 add callback function set_thermal_fan_table for navi10 asic Signed-off-by:Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 4228b6015d659c63cd8e4f24fc1db3a0c23e56a1 Author: Kevin Wang Date: Tue Apr 23 11:29:11 2019 +0800 drm/amd/powerplay: add function is_dpm_running for navi10 add callback function is_dpm_running for navi10 asic Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) commit 6b1b7b5bf03db9fb2cac485eee5289edf2bc5b61 Author: Kevin Wang Date: Tue Apr 23 11:20:46 2019 +0800 drm/amd/powerplay: move read sensor of UVD[VCE]_POWER to amdgpu_smu file This part of code is asic unrelated and moves to top code level. Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 8 ++++++++ drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 8 -------- 2 files changed, 8 insertions(+), 8 deletions(-) commit 7447a23b08fc191d7141886bad3718ef63cce930 Author: Kevin Wang Date: Tue Apr 23 11:10:30 2019 +0800 drm/amd/powerplay: add function get_current_activity_percent for navi10 add callback function get_current_activity_percent for navi10 asic Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 077ca74e3cbf9a6a11ccc3ea32c5f3afa4bb35f0 Author: Kevin Wang Date: Tue Apr 23 11:07:52 2019 +0800 drm/amd/powerplay: add function get_gpu_power for navi10 add callback function get_gpu_power for navi10 asic Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 2f72726b2af655c2ce28cbce27b822fd666d467d Author: Kevin Wang Date: Tue Apr 23 11:02:24 2019 +0800 drm/amd/powerplay: add function unforce_dpm_levels for navi10 add callback function unforce_dpm_levels for navi10 asic Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 50add63bbf1f7095db4bdd72dceca1ee60997550 Author: Kevin Wang Date: Tue Apr 23 10:53:51 2019 +0800 drm/amd/powerplay: add funciton force_dpm_limit for navi10 add callback function force_dpm_limit for navi10 asic Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 0a6430da0c7c6603aeb99b5b91418e6665c77561 Author: Kevin Wang Date: Tue Apr 23 14:16:52 2019 +0800 drm/amd/powerplay: add function display_configuration_changed for navi10 1.add callback function to support navi10 asic. 2.Remove unnecessary logical code. Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 25 +++++++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 16 ++++++++++++++-- drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 10 +--------- 3 files changed, 40 insertions(+), 11 deletions(-) commit 284305445fee2384114aac12e77966120d1c9c96 Author: Kevin Wang Date: Mon Apr 22 14:37:46 2019 +0800 drm/amd/powerplay: add function pre_display_config_changed for navi10 add callback function pre_display_config_changed for navi10 asic Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit a43913ea50a545c437b6e264b46fe3a0485f54f0 Author: Kevin Wang Date: Fri Apr 19 14:05:58 2019 +0800 drm/amd/powerplay: add function get_clock_by_type_with_latency for navi10 add callback function get_clock_by_type_with_latency for navi10 asic Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher .../drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c | 19 +++++++++++- drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 6 ++-- drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 35 ++++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 12 ++++---- 4 files changed, 62 insertions(+), 10 deletions(-) commit fa51bfc2794b096a6d009712529c15a95667d383 Author: Kevin Wang Date: Fri Apr 19 13:27:19 2019 +0800 drm/amd/powerplay: add function populate_umd_state_clk for navi10 add callback function populate_umd_state_clk for navi10 asic Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit db439ca21b81f0c1f1b0f1f1b6f0efc8af3a0cf4 Author: Kevin Wang Date: Fri Apr 19 10:31:18 2019 +0800 drm/amd/powerplay: add function force_clk_levels for navi10 add sysfs interface of force_clk_levels sysfs for navi10. Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 16 +++++------ drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 6 ++--- drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 37 ++++++++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 16 +++++------ 4 files changed, 56 insertions(+), 19 deletions(-) commit 3366561767209326d3a6d4d2c727788beca7fcea Author: Kevin Wang Date: Mon Apr 22 14:40:30 2019 +0800 drm/amd/powerplay: add helper function of smu_set_hard_freq_range add this function to get dpm clock information. Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 33 ++++++++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 2 ++ 2 files changed, 35 insertions(+) commit 0d7cbd280796f709b134d763295c2d4276392594 Author: Kevin Wang Date: Fri Apr 19 10:19:28 2019 +0800 drm/amd/powerplay: add helper function of smu_set_soft_freq_range add this helper function to get dpm clk information. Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 33 ++++++++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 2 ++ 2 files changed, 35 insertions(+) commit 8b3d243e47ddd4a570150651e028ecd1c30287bc Author: Kevin Wang Date: Thu Apr 18 18:46:04 2019 +0800 drm/amd/powerplay: add helper function of smu_get_dpm_freq_range add this helper function to get dpm clk information (min, max); Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 36 ++++++++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 2 ++ 2 files changed, 38 insertions(+) commit b1e7e224192fb5d9f8534c35fe14fb5bf30cb08e Author: Kevin Wang Date: Thu Apr 18 15:06:34 2019 +0800 drm/amd/powerplay: add function print_clk_levels for navi10 add sysfs interface of print_clk_levels sysfs for navi10. Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 24 +++++++------- drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 13 ++++++-- drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 44 ++++++++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 22 ++++++------- 4 files changed, 77 insertions(+), 26 deletions(-) commit 3ac54a50438053b1f4d3480c608eda50ae25775c Author: Kevin Wang Date: Wed Mar 27 14:46:20 2019 +0800 drm/amd/powerplay: add helper function to get dpm freq informations this function can help driver to get ppclk informations Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 37 ++++++++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 4 +++ 2 files changed, 41 insertions(+) commit 98e1a543c7b1af60efee0f019773ee097bd50bba Author: Kevin Wang Date: Wed Apr 17 14:58:28 2019 +0800 drm/amd/powerplay: add function get current clock freq interface for navi10 add function of get_current_clk_freq_by_table for navi10. Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 5 +++++ drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 24 ++++++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 4 ++++ 3 files changed, 33 insertions(+) commit bbd7a6535002289d3ddaf30b8377b492983712df Author: Jack Xiao Date: Mon May 6 18:55:23 2019 +0800 drm/amdgpu/gfx10: require to pin/unpin CSIB BO when suspend/resume CSIB BO is required to be pinned down to guarantee bo is always valid when resume, and to be unpinned it so that its content can be saved during suspend. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 38 ++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit 2c195b6cac59e2d60b75ac20379a7a48f5185c2c Author: Jack Xiao Date: Mon May 6 16:40:48 2019 +0800 drm/amdgpu/gfx10: remove unnecessary waiting on gfx inactive The following KIQ ring test could guarantee the previous unmap has been done. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 35 +++++----------------------------- 1 file changed, 5 insertions(+), 30 deletions(-) commit e17a512a18c1f1dece8c3d4f9685c581052d3191 Author: Jack Xiao Date: Mon May 6 16:35:41 2019 +0800 drm/amdgpu: RLC must be disabled after SMU when S3 on navi SMU requires to interact with RLC when disable all features, so RLC shouldn't be disabled ahead of SMU. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 4 +--- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 4 ++++ 2 files changed, 5 insertions(+), 3 deletions(-) commit 2a8bfa139a4515cd020c7a5be1e1e45d5d116352 Author: Jack Xiao Date: Mon May 6 16:28:22 2019 +0800 drm/amd/powerplay/smu11: disable PLL shutdown when gfxoff enabled MP1 cannot access clock IP during MP1 FW reload, disable PLL shutdown as a workaround. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 8c3b2d1bc0ec339d0f0747f87b130ed8ea9f9777 Author: tiancyin Date: Mon Apr 29 16:56:16 2019 +0800 drm/amd/powerplay: disable uclk dpm by default [why] The uclk dpm feature is not supported by some certain navi10 board like 18202, while supported by some board like 18201. It causes modprobe failure on 18202 board. [how] Disabled this feature by default, it can be enabled by module parameter uclk_dpm_support=1. Reviewed-by: Jack Xiao Signed-off-by: tiancyin Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 863dd269fa413ab8366cc42c8c2baade6f96de6e Author: Leo Liu Date: Tue Apr 30 10:15:38 2019 -0400 drm/amdgpu/VCN2.0: remove powergating for UVDW tile No UVDW tile any more from VCN2.0, so mark out related fields. It fixes error: "[drm] Register(0) [mmUVD_PGFSM_STATUS] failed to reach value 0x002aaaaa != 0x00aaaaaa" Signed-off-by: Leo Liu Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 1 + drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 18 +++++++----------- 2 files changed, 8 insertions(+), 11 deletions(-) commit 71322c187c4e7a17615e55961ab165307f1c286f Author: Kenneth Feng Date: Fri Apr 26 13:53:10 2019 +0800 amd/powerplay: enable uclk dpm Enable uclk dpm on navi10 as the result of removing fast switch setting. Signed-off-by: Kenneth Feng Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 687e8ad0760184001a4889732bdb2a14338ba0dd Author: Kenneth Feng Date: Wed May 29 23:20:24 2019 -0500 amd/powerplay: fix the issue of uclk dpm PPSMC_MSG_SetUclkFastSwitch message can be applied on vega20, but can't on navi10. This is the prerequisite of uclk dpm on navi10. Signed-off-by: Kenneth Feng Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c39f3da4e246c84af6272c18ff00353c221d74b1 Author: Xiaojie Yuan Date: Fri Apr 19 18:44:18 2019 +0800 drm/amdgpu/gfx10: fix unbalanced MAP/UNMAP_QUEUES when async_gfx_ring is disabled gfx_v10_0_kiq_enable_kgq() is called only when async_gfx_ring is enabled, so should gfx_v10_0_kiq_disable_kgq(). Signed-off-by: Xiaojie Yuan Acked-by: Alex Deucher Reviewed-by: Jack Xiao Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit ec171a93020206027a2dba32c4f1e22314439c49 Author: Xiaojie Yuan Date: Fri Jun 21 11:14:37 2019 -0500 drm/amdgpu/gfx10: drop redundant se/sh selection we already selected se/sh at the beginning of the for loop Signed-off-by: Xiaojie Yuan Reviewed-by: Jack Xiao Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 1 - 1 file changed, 1 deletion(-) commit 77657ad1eca39a1ed1c84815e4962f3ca7213214 Author: Jack Xiao Date: Mon Apr 15 17:03:01 2019 +0800 drm/amdgpu/mes10.1: enable mes FW backdoor loading It enables MES FW backdoor loading in ip block functions. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/mes_v10_1.c | 36 ++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit 5c264af735c05f93a41f141bf8ba4df9812dff43 Author: Jack Xiao Date: Sun Apr 14 17:16:48 2019 +0800 drm/amdgpu/mes10.1: implement mes enablement function After MES firmware gets loaded, it enables MES engine starting execution. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/mes_v10_1.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit fb19a68df261a0691a1a123ef960fefb83a89219 Author: Jack Xiao Date: Sun Apr 14 16:17:30 2019 +0800 drm/amdgpu/mes10.1: implement MES firmware backdoor loading It implements MES firmware backdoor loading. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/mes_v10_1.c | 67 ++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) commit 71c57941889173d11a3261d5d619bc2bfc1f8e4d Author: Jack Xiao Date: Fri Apr 12 19:11:18 2019 +0800 drm/amdgpu/mes10.1: implement ucode buffers destruction Free ucode GPU buffers. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/mes_v10_1.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 85c90e9b54047e591fa9fc2f45ce9b3f4d74eac0 Author: Jack Xiao Date: Fri Apr 12 18:58:57 2019 +0800 drm/amdgpu/mes10.1: upload mes data ucode to gpu buffer Allocate GPU buffer and upload mes data ucode to the buffer. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/mes_v10_1.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 02b61149486b3a33cf630095859a412f458a19f2 Author: Jack Xiao Date: Fri Apr 12 18:53:35 2019 +0800 drm/amdgpu/mes10.1: upload mes ucode to gpu buffer Allocate GPU buffer and upload ucode firmware to the buffer. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/mes_v10_1.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit 086981052bd8fa7f2cf14c547f2b8990336c2b34 Author: Jack Xiao Date: Mon Apr 15 16:58:20 2019 +0800 drm/amdgpu/mes10.1: implement ucode CPU buffer destruction It implements the CPU buffer destruction of ucode. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/mes_v10_1.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 298d05460cc459aef9d5ae0b022e2e27f5eaac34 Author: Jack Xiao Date: Mon Apr 15 11:31:04 2019 +0800 drm/amdgpu/mes10.1: load mes firmware file to CPU buffer It requests MES firmware binary and uploads to CPU buffer. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/mes_v10_1.c | 43 ++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) commit 5aa91248c080da44d0c052b9b71efcc75d11cc8b Author: Jack Xiao Date: Mon Apr 15 11:34:03 2019 +0800 drm/amdgpu/mes10.1: add mes firmware info fields The newly added fields is to store mes firmware related information. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 7f785e7843a4024aeb4c17c3ff53c395aca84d64 Author: Jack Xiao Date: Mon Apr 15 11:33:05 2019 +0800 drm/amdgpu/ucode: add mes firmware file support The newly added firmware struct is for mes firmware file. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 186b0ca28293c599b425b84d90d3385e81df9702 Author: Jack Xiao Date: Fri Apr 12 14:23:44 2019 +0800 drm/amdgpu/ucode: add the definitions of MES ucode and ucode data MES requires two seperate firmwares: ucode and ucode data. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 2 ++ 1 file changed, 2 insertions(+) commit 37809f55292e119accbd379f806cc8201b30209d Author: Jack Xiao Date: Wed Apr 24 10:55:20 2019 +0800 drm/amdgpu/sdma5: incorrect variable type for gpu address Incorrect programming with 64bit gpu address assignment for 32bit variable. Signed-off-by: Jack Xiao Reviewed-by: Xiaojie Yuan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 278b6fba223005e87c8f491c9b7fa33dc6a6461e Author: tiancyin Date: Mon Apr 22 17:07:06 2019 +0800 drm/amdgpu/sdma5: fix a sdma potential hang in VK_Examples test [why] When page fault happens, it could lead to sdma hang is RESP_MODE = 0 for non-PRT case. [how] Setting SDMAx_UTCL1_CNTL.RESP_MODE to 0b011 to avoid SDMA halt. Reviewed-by: Jack Xiao Signed-off-by: tiancyin Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4135f10e26eaeb75a30ccfa6359d81004e1adc82 Author: Hawking Zhang Date: Mon Apr 22 21:06:22 2019 +0800 drm/amd/powerplay: remove uvd_gated/vce_gated from smu_power_context (v2) It's not needed for navi. v2: remove unused variable (Alex) Signed-off-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 6ff687319f68e8cb3c8127c904250c71df945d54 Author: Jack Xiao Date: Thu Apr 18 15:55:27 2019 +0800 drm/amdgpu/nv: set vcn pg flag Enable VCN power gating by default. Signed-off-by: Jack Xiao Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/nv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6e4cb4e8b31faf12575ac01dac47d2f87f9ac245 Author: Jack Xiao Date: Thu Apr 18 18:11:55 2019 +0800 drm/amdgpu: enable vcn dpm scheme for navi On navi1x, vcn dpm scheme was merged into powergating scheme. Signed-off-by: Jack Xiao Acked-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0b8794e252fcf47d840985dde1d7a4f8802b61a7 Author: Jack Xiao Date: Thu Apr 18 17:37:14 2019 +0800 drm/amdgpu/vcn2: don't access register when power gated It will cause bus hang to access register UVD_STATUS when VCN is in the state of power gated. Signed-off-by: Jack Xiao Acked-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a8179d62fbbd1e6fd73690fe0888f9471c5d7e94 Author: Kenneth Feng Date: Thu Apr 18 10:00:48 2019 +0800 drm/amd/powerplay: add new interface for vcn powergating add new interface for vcn powrergating and vcn dpm as well. Signed-off-by: Kenneth Feng Signed-off-by: Jack Xiao Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 4 ++++ drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 28 ++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) commit c4b76d23df24b096893efd315da9e44a732fd7a6 Author: Kenneth Feng Date: Tue Apr 16 16:47:10 2019 +0800 drm/amd/powerplay: enable vcn powergating v2 enable vcn powergating in driver for navi10 v2: set vcn pg bit according to AMD_PG_SUPPORT_VCN flag Signed-off-by: Kenneth Feng Signed-off-by: Jack Xiao Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 3 +++ 1 file changed, 3 insertions(+) commit c113ba157f41325e62e434f21e7235e9e829ea65 Author: Jack Xiao Date: Thu Apr 18 16:20:10 2019 +0800 drm/amdgpu/vcn2: notify SMU power up/down VCN For sw control power gating, it needs notify SMU to power up/down VCN when enter/exit working state. Signed-off-by: Jack Xiao Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 8a33c4f1945cdecc585eee6a94aa06fb9c85668c Author: Jack Xiao Date: Tue Apr 16 17:27:41 2019 +0800 drm/amdgpu/gfx10: fix issues for suspend/resume 1). use PREEMPT_QUEUE instead of RESET_QUEUE for gfx ring disablement. 2). Need wait for unmapping queue done before continue execution. Signed-off-by: Jack Xiao Reviewed-by: Tianci Yin Reviewed-by: Xiaojie Yuan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 35 +++++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) commit 948f540cd0120ef9d622af42c1b95f28cf992da0 Author: Huang Rui Date: Wed May 29 23:18:01 2019 -0500 drm/amd/powerplay: set dpm_enabled flag but don't enable vcn dpm This patch sets dpm_enabled flag but don't enable vcn dpm, because vcn dpm doesn't work so far and we needs to enable the sysfs interfaces. Signed-off-by: Huang Rui Acked-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 4 ++-- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) commit eb0b49ea404c79d54088274d7213e88f8bbcde71 Author: Kenneth Feng Date: Tue Apr 16 16:33:43 2019 +0800 drm/amd/powerplay: update smu11_driver_if_navi10.h update the smu11_driver_if_navi10.h since navi10 smu fw update to 42.15.0 Signed-off-by: Kenneth Feng Reviewed-by: Xiaojie Yuan Signed-off-by: Alex Deucher .../gpu/drm/amd/powerplay/inc/smu11_driver_if_navi10.h | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit 4b6349d4d84c271b349b9e674796f5ac16c89a27 Author: Xiaojie Yuan Date: Mon Apr 1 21:44:21 2019 +0800 drm/amdgpu/gfx10: fix resume failure when enabling async gfx ring 'adev->in_suspend' code path is missing in gfx_v10_0_gfx_init_queue() Signed-off-by: Xiaojie Yuan Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) commit 36f87f0acd039618b080e08702e4d25b825754d8 Author: Tianci Yin Date: Thu Apr 11 18:59:07 2019 +0800 drm/amdgpu: disable some gfx light sleep temporarily disable to avoid s3 test failure. s3 test failure log: "[drm:amdgpu_job_timedout [amdgpu]] *ERROR* ring sdma0 timeout, signaled seq=8278, emitted seq=8281" Reviewed-by: Jack Xiao Signed-off-by: Tianci Yin Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/nv.c | 4 ---- 1 file changed, 4 deletions(-) commit 8ea763e2304951a086179bbc37476a48d125ca3e Author: Tianci Yin Date: Wed Apr 3 16:38:31 2019 +0800 drm/amdgpu/gfx10: update gfx golden settings add new registers: mmCGTT_SPI_CLK_CTRL, mmDB_DEBUG3 and mmGL2C_CGTT_SCLK_CTRL. Reviewed-by: Jack Xiao Signed-off-by: Tianci Yin Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 3 +++ 1 file changed, 3 insertions(+) commit 8d7315cef98bfd1f53b69aafde83bc9834b11904 Author: Huang Rui Date: Wed May 29 23:15:54 2019 -0500 drm/amd/powerplay: do not set dpm_enabled flag before VCN/DCN DPM is workable This dpm_enabled flag will be recognized as the VCN DPM enabled as well. In fact VCN/DCN DPM on Navi10 is not good so far, so we cannot enable it for now. Signed-off-by: Huang Rui Acked-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 3 +++ 1 file changed, 3 insertions(+) commit 4b2bb705a0b72fb8fdc6f6330b737f198097b347 Author: Kenneth Feng Date: Thu Apr 4 12:50:23 2019 +0800 drm/amd/powerplay: fix the incorrect type of pptable This patch is to fix the incorrect type of pptable, otherwise, the data will be totally wrong in parsing phase. Signed-off-by: Kenneth Feng Signed-off-by: Huang Rui Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/smu_v11_0_pptable.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 013fd3a61a827c65491b0bb9ad3c0417f09c8146 Author: Huang Rui Date: Sun Mar 31 16:08:21 2019 +0800 drm/amd/powerplay: don't include the smu11 driver if header in smu v11 (v2) This header is actually for each asic, so we should not include in smu_v11_0.c. And rename the one for navi10. v2: add hack for XGMI (Alex) Signed-off-by: Huang Rui Reviewed-by: Kevin Wang Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher .../powerplay/inc/{smu_11_0_driver_if.h => smu11_driver_if_navi10.h} | 4 ++-- drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 2 +- drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) commit 6a36e3e57c0cbcb9168cc1564ff37179cb110b52 Author: Huang Rui Date: Mon Apr 1 18:06:36 2019 +0800 drm/amd/powerplay: move getting MAX_FAN_RPM value to asic level Getting MAX_FAN_RPM value needs to be read by pptable, so it should be moved to asic level. Signed-off-by: Huang Rui Reviewed-by: Kevin Wang Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 6 ------ drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) commit 8890fe5f435333c9f6ea7cd6b6de964c669602f4 Author: Huang Rui Date: Sun Mar 31 15:53:42 2019 +0800 drm/amd/powerplay: introduce smu power source type to handle AC/DC source for each asic This patch introduces new smu power source type, it's to handle the different AC/DC source defines for each asic with the same smu ip. Signed-off-by: Huang Rui Reviewed-by: Kevin Wang Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 10 ++++++++++ drivers/gpu/drm/amd/powerplay/inc/smu_v11_0.h | 3 +++ drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 19 +++++++++++++++++++ drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 2 +- drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 19 +++++++++++++++++++ 5 files changed, 52 insertions(+), 1 deletion(-) commit 973849042e0101d6dea1a4c00fdb2007128f86a6 Author: Huang Rui Date: Sun Mar 31 15:15:49 2019 +0800 drm/amd/powerplay: move Watermarks_t uses into asic level This patch moves the rest of Watermarks_t uses into asic level. It's to avoid the conflicts with different asic. Signed-off-by: Huang Rui Reviewed-by: Kevin Wang Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 4 ++ drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 63 +------------------------- drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 61 +++++++++++++++++++++++++ 3 files changed, 67 insertions(+), 61 deletions(-) commit 8b1f4c87a30e6497ea646737e0b4d8ef854878a5 Author: Huang Rui Date: Sun Mar 31 14:53:23 2019 +0800 drm/amd/powerplay: move SmuMetrics_t uses into asic level This patch moves the rest of SmuMetrics_t uses into asic level. It's to avoid the conflicts with different asic. Signed-off-by: Huang Rui Reviewed-by: Kevin Wang Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 8 ++++ drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 54 ++------------------------ drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 50 ++++++++++++++++++++++++ 3 files changed, 62 insertions(+), 50 deletions(-) commit ee0db82027eef38d869d22cfa24a18d78b590db9 Author: Huang Rui Date: Sun Mar 31 13:25:04 2019 +0800 drm/amd/powerplay: move PPTable_t uses into asic level This patch moves the rest of PPTable_t uses into asic level. It's to avoid the conflicts with different asic. Signed-off-by: Huang Rui Reviewed-by: Kevin Wang Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 7 ++++-- drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 31 +------------------------- drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 29 ++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 32 deletions(-) commit cbfba01dde1cb8e805898607544aa8de606a3cfe Author: Huang Rui Date: Sun Mar 31 12:49:11 2019 +0800 drm/amd/powerplay: use the table size member in the structure instead of getting directly This patch uses the table size member in the structure instead of getting directly, because the table is different in each asic. Signed-off-by: Huang Rui Reviewed-by: Kevin Wang Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 33bd73ae6c615754cffb94336abbbd8bb841eb34 Author: Huang Rui Date: Sun Mar 31 12:02:00 2019 +0800 drm/amd/powerplay: modify smu_update_table to use SMU_TABLE_xxx as the input Table id may be different for each asic, so it's good to use this as the input for common interface. Signed-off-by: Huang Rui Reviewed-by: Kevin Wang Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 8 ++++---- drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 24 ++++++++++++++---------- 2 files changed, 18 insertions(+), 14 deletions(-) commit 8b2ae145de4cd263b96c67d5ba936cd0c896b0c2 Author: Alex Deucher Date: Mon Apr 22 14:06:42 2019 -0500 drm/amd/powerplay/smu11: remove smu_update_table_with_arg Nothing was using it. Just replace with smu_update_table which is what everything was using via a wrapper anyway. Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 6 ++---- drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 4 +--- 2 files changed, 3 insertions(+), 7 deletions(-) commit 22c9c6ca9658f75b45806eaf551c0b2736979fe3 Author: Huang Rui Date: Sun Mar 31 11:53:28 2019 +0800 drm/amd/powerplay: add tables_init interface for each asic The smc tables defines should be in the asic level. Signed-off-by: Huang Rui Reviewed-by: Kevin Wang Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 3 +++ drivers/gpu/drm/amd/powerplay/inc/smu_v11_0.h | 2 ++ drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 18 ++++++++++++++++++ drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 16 +--------------- drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 18 ++++++++++++++++++ 5 files changed, 42 insertions(+), 15 deletions(-) commit cdb0c632e4d0a6e882e585f458cb3448799d8ed7 Author: Huang Rui Date: Fri Mar 29 18:07:23 2019 +0800 drm/amd/powerplay: init table_count for smu tables on asic level TABLE_COUNT should be inited in asic level. Because the value may be different on each asic even on the same ip. Signed-off-by: Huang Rui Reviewed-by: Kevin Wang Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 3 +++ drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 6 +++--- drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 3 +++ 3 files changed, 9 insertions(+), 3 deletions(-) commit 2436911bdb2c58f387af59e4e9dcd55c8f667868 Author: Huang Rui Date: Fri Mar 29 17:52:11 2019 +0800 drm/amd/powerplay: introduce smu table id type to handle the smu table for each asic This patch introduces new smu table type, it's to handle the different smu table defines for each asic with the same smu ip. Signed-off-by: Huang Rui Reviewed-by: Kevin Wang Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 20 ++++++++++++++++++ drivers/gpu/drm/amd/powerplay/inc/smu_v11_0.h | 3 +++ drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 29 ++++++++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 27 ++++++++++++++++++++++++ 4 files changed, 79 insertions(+) commit ffcb08dfaa3ae80292f89ee36b4604d3751ea4da Author: Huang Rui Date: Wed May 29 23:14:33 2019 -0500 drm/amd/powerplay: introduce smu feature type to handle feature mask for each asic This patch introduces new smu feature type, it's to handle the different feature mask defines for each asic with the same smu ip. Signed-off-by: Huang Rui Reviewed-by: Kevin Wang Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 22 +++- drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 72 +++++++++++- .../gpu/drm/amd/powerplay/inc/smu_11_0_driver_if.h | 4 +- drivers/gpu/drm/amd/powerplay/inc/smu_v11_0.h | 3 + drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 63 ++++++++++- drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 26 ++--- drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 122 +++++++++++++++------ 7 files changed, 251 insertions(+), 61 deletions(-) commit 0de94acf90e3ac61a11782cbb2394799bba4c96d Author: Huang Rui Date: Sun Mar 24 19:22:07 2019 +0800 drm/amd/powerplay: introduce smu clk type to handle ppclk for each asic This patch introduces new smu clk type, it's to handle the different ppclk defines for each asic with the same smu ip. Signed-off-by: Huang Rui Reviewed-by: Kevin Wang Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 21 +++++++- drivers/gpu/drm/amd/powerplay/inc/smu_v11_0.h | 3 ++ drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 26 ++++++++++ drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 66 +++++++++++++------------- drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 32 ++++++++++++- 5 files changed, 113 insertions(+), 35 deletions(-) commit 54b998ca8d1ccbf626b398ff6ad0d1dfa771e197 Author: Hawking Zhang Date: Mon Apr 1 15:32:48 2019 +0800 drm/amdgpu: enable sw smu driver for navi10 by default Navi10 will use sw smu driver for dynamic power managment, while vega20 could also use sw smu driver when amdgpu_dpm is set to 2 Signed-off-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 +++- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 11 +++++------ 2 files changed, 8 insertions(+), 7 deletions(-) commit a8998488059c5dd63ad44e9185b189cadd6b27d0 Author: Kenneth Feng Date: Thu Mar 28 17:14:42 2019 +0800 drm/amd/powerplay: enable DCEFCLK dpm support Enabale DCEFCLK dpm on navi10 Signed-off-by: Kenneth Feng Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit acbcc111ce1075eb00a755be2ffca1bfbe1fd549 Author: Kenneth Feng Date: Thu Mar 28 10:54:16 2019 +0800 drm/amd/powerplay: gfxoff-seperate the Vega20 case seperate the Vega20 case from navi10 for gfxoff so that gfxoff won't be allowed on Vega20 Signed-off-by: Kenneth Feng Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) commit 9e04021602e758bc42e15c9f8c87b196ecf9c6ef Author: Kenneth Feng Date: Wed Mar 27 17:10:09 2019 +0800 drm/amd/amdgpu: fw version check with gfxoff 1. check the firmware version when enabling gfxoff 2. overwrite the pptable to make sure gfxoff is really enabled on navi10 Signed-off-by: Kenneth Feng Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 1 - drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 11 +++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) commit bca325280d1f17a84a8af70cb840ab5fcdb8d062 Author: Kenneth Feng Date: Wed Mar 27 11:46:31 2019 +0800 drm/amd: add gfxoff support on navi10 add the gfxoff interface to navi10,it's disabled by default. Signed-off-by: Kenneth Feng Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c | 20 ++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h | 7 +++---- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 4 +++- drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 5 ++++- drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 16 ++++++++++++++++ 5 files changed, 46 insertions(+), 6 deletions(-) commit 77ee9caf380afc19aa3e9984e503dcaae04b64ee Author: Kevin Wang Date: Wed Mar 20 15:10:29 2019 +0800 drm/amd/powerplay: add allowed feature mask for navi10 add smu feature mask: 1.FEATURE_DPM_PREFETCHER_BIT 2.FEATURE_DPM_PREFETCHER_BIT 3.FEATURE_ATHUB_PG Signed-off-by: Kevin Wang Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 74c958a3766cd1948978a60cc995c17145a5eed8 Author: Kevin Wang Date: Tue Mar 19 17:20:09 2019 +0800 drm/amd/powerplay: optimization feature mask function for asic 1.change function return value type: from "unallowed" to "allowed" 2.replace feature mask number with feature macro, the code will clear. Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 10 +++---- drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 6 ++--- drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 22 +++++++++++++--- drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 36 ++++++++++++++++++++++---- 4 files changed, 57 insertions(+), 17 deletions(-) commit 5586348236f81de739f8d818a305d7034651bb00 Author: Kevin Wang Date: Tue Mar 19 11:00:41 2019 +0800 drm/amd/powerplay: remove duplicate code from smu hw init remove duplicate code (un-used) in smu Signed-off-by: Kevin Wang Reviewed-by: Xiaojie Yuan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 4 ---- 1 file changed, 4 deletions(-) commit b55c83a7438da50126e6a2c98dcf4476ce2fd0fd Author: Kevin Wang Date: Fri Jun 21 10:49:22 2019 -0500 drm/amd/powerplay: implement smc firmware v2.1 for smu11 1.add smc_firmware_header_v2_1 hfirmware support, support more pptable in smc firmware. 2.optimization current pptable load framework. 3.rename read_pptable_from_vbios with setup_pptable. Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 13 ++++ drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 2 +- drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 6 +- drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 93 +++++++++++++++++++------- 4 files changed, 84 insertions(+), 30 deletions(-) commit 19d894b92d6b2746c8ea0b8463d78b270dfbbdbb Author: Kevin Wang Date: Mon Mar 11 14:15:37 2019 +0800 drm/amd/powerplay: add smu11 smu_if_version check for navi10 add smu11 fw version check for navi10 Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 1 + 1 file changed, 1 insertion(+) commit e17980535bca652e733eed910c0a434a5524885d Author: Kevin Wang Date: Tue Mar 5 15:42:16 2019 +0800 drm/amd/powerplay: move the function of is_dpm_running to asic file the function os is_dpm_running is aisc related function, so move them to asic file. Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 4 ++-- drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 22 ---------------------- drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 22 ++++++++++++++++++++++ 3 files changed, 24 insertions(+), 24 deletions(-) commit 6d22f1aa924c6012e4107b40b111c21b9d2b5c0d Author: Kevin Wang Date: Tue Mar 5 14:16:12 2019 +0800 drm/amd/powerplay: move the function of read_sensor to asic file The read_sensor functions has asic related parts code, so move them to asic file to implement. Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 4 ++++ drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 12 ++++-------- drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 23 +++++++++++++++++++++++ 3 files changed, 31 insertions(+), 8 deletions(-) commit 86eb3ed3d393678a0ba625138658b755adbda357 Author: Kevin Wang Date: Wed May 29 23:11:28 2019 -0500 drm/amd/powerplay: move the function of uvd&vce dpm to asic file Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 8 ++++---- drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 24 ------------------------ drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 24 ++++++++++++++++++++++++ 3 files changed, 28 insertions(+), 28 deletions(-) commit 667273c166e98e3e38e6ac1f2b69950309bc42a5 Author: Kevin Wang Date: Wed May 29 23:09:06 2019 -0500 drm/amd/powerplay: move the function of get[set]_power_profile to asic file The callback of get[set]_power_profile is asic related function, so move theme into vega20_ppt file. Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 6 +- drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 194 ------------------------ drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 197 +++++++++++++++++++++++++ 3 files changed, 199 insertions(+), 198 deletions(-) commit 940680c3b48a5d90896e638cb6ec3bf1a2cebcfa Author: Kevin Wang Date: Mon Mar 4 19:50:02 2019 +0800 drm/amd/powerplay: move the funciton of conv_profile_to_workload to asic file the function of conv_profile_to_workload is asic related function, so move them into vega20_ppt file Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 3 +++ drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 37 ++------------------------ drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 32 ++++++++++++++++++++++ 3 files changed, 37 insertions(+), 35 deletions(-) commit 1e87e0124ba413b751ee03b09f5520e778982b58 Author: Kenneth Feng Date: Mon Mar 11 16:06:03 2019 +0800 drm/amd/powerplay: enable power features the below smu related power features can be enabled now. 1.Prefetcher 2.GFX DPM 3.SOCCLK DPM 4.MP0CLK DPM 5.LCLK DPM 6.GFX ULV 7.CG 8.PPT 9.TDC 10.GFX EDC 11.VR0HOT 12.Fan Control 13.Thermal Control 14.LED Display 15.MMHub PG 16.ATHub PG Signed-off-by: Kenneth Feng Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5ba80a0a816f85b9037cc2424b7ba5c6c96c7a3e Author: Huang Rui Date: Wed Feb 20 20:20:00 2019 +0800 drm/amd/powerplay: skip od feature on navi10 for the moment OD feature isn't enabled on navi10 so skip it for the moment. Signed-off-by: Huang Rui Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 3a4dc27b4373b2127ae7c202f8ef5bf89d0691b3 Author: Huang Rui Date: Wed Feb 20 20:17:23 2019 +0800 drm/amd/powerplay: modify the feature mask to enable gfx/soc dpm So far, the gfx/soc dpm is enabled with feature mask set. Signed-off-by: Huang Rui Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 879af1c65af6d3e6289f4dbac847b46a4c717529 Author: Huang Rui Date: Wed Feb 20 20:12:22 2019 +0800 drm/amd/powerplay: introduce the function to load the soft pptable for navi10 (v2) Driver is able to load soft pptable from smc bin file with this function. We stored the soft pptable in the bottom of smc.bin that the version is v2. v2: remove is_fw_v2_0 flag. Signed-off-by: Huang Rui Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 5 ++++ drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 38 ++++++++++++++++++++++---- 2 files changed, 37 insertions(+), 6 deletions(-) commit 0186eb96300d26bbb82050f2acc462a396d55e6b Author: Huang Rui Date: Wed Feb 20 20:05:11 2019 +0800 drm/amd/powerplay: smu needs to be initialized after rlc in direct mode For gfx 10, rlc firmware loading relies on smu firmware is loaded firstly, so in direct type, it has to load smc ucode here before rlc. And meanwhile, the smu initialization has to move after rlc, otherwise, smu message will get failure during the handshake with rlc and smu. Signed-off-by: Huang Rui Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit c16d001bf261b70b90463248a2a99628e1fae6f8 Author: Huang Rui Date: Wed Feb 20 20:00:21 2019 +0800 drm/amdgpu: fix the issue of checking on message mapping The navi10_message_map[index] scope should be in PPSMC_Message_Count not in SMU_MSG_MAX_COUNT. Signed-off-by: Huang Rui Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 336a1c825e362aeee402e832ec276e35e0b48cda Author: Huang Rui Date: Wed Feb 20 19:43:36 2019 +0800 drm/amdgpu: bump smc firmware header version to v2 (v2) This patch bumps smc firmware header version to v2 for storing soft pptable. v2: fix the typo, and add prints for v2 header Signed-off-by: Huang Rui Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 8 ++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 8 ++++++++ 2 files changed, 16 insertions(+) commit 9e8a163d9bd472af6c61784215d5ba58bd7baebf Author: Huang Rui Date: Wed Feb 13 10:44:50 2019 +0800 drm/amd/powerplay: update smu11 driver if header for navi10 (v2) This patch updates smu11 driver if header for navi10 to match 42.09.00 smu firmware. v2: clean up comments Signed-off-by: Huang Rui Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/smu_11_0_driver_if.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 827440a90146c62351e8bbe17b295815ecd36d62 Author: Kenneth Feng Date: Sat Feb 2 11:43:12 2019 +0800 drm/amd/powerplay: enable backdoor smu fw loading (v2) enable backdoor smu fw loading on navi10 v2: squash in define fix (Alex) Signed-off-by: Kenneth Feng Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/smu_v11_0.h | 1 + drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 33 +++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) commit 4009b9b589aa11d812d40b92b1f825e45efb853f Author: Huang Rui Date: Thu Jan 31 21:11:11 2019 +0800 drm/amd/powerplay: move bootup value before read pptable from vbios In navi10, we need read the pp_table_id from bootup value, then decide whether use load the soft pptable. Signed-off-by: Huang Rui Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 31528650356c30809a4902ea8ea3345975fdc1d5 Author: Huang Rui Date: Thu Jan 31 20:49:59 2019 +0800 drm/amd/powerplay: add navi10 smc ucode init and navi10 ppt functions setting This patch adds navi10 smc ucode init and ppt functions setting. Signed-off-by: Huang Rui Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 2573e87074f02ad74c88f952487b01f867a1c5f9 Author: Huang Rui Date: Thu Jan 31 20:32:54 2019 +0800 drm/amd/powerplay: set smu v11 funcs for navi10 Naiv10 also uses smu v11 functions. Signed-off-by: Huang Rui Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 1 + 1 file changed, 1 insertion(+) commit b3490673f905413014e064a2048425f97dab9b5c Author: Huang Rui Date: Thu Jan 31 19:46:26 2019 +0800 drm/amd/powerplay: introduce the navi10 pptable implementation This patch introduces the navi10 pptable implementation, so far it is already has firmware loading, pptable side loading, writing back to smc, and feature mask enabling. Signed-off-by: Huang Rui Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/Makefile | 2 +- drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 303 +++++++++++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/navi10_ppt.h | 28 +++ 3 files changed, 332 insertions(+), 1 deletion(-) commit 980e04ec373081067c51a69bc901152086121319 Author: Huang Rui Date: Thu Jan 31 21:03:24 2019 +0800 drm/amd/powerplay: fix the mp/smuio header for navi10 SMU11 should use mp11 and smuio11 headers. Signed-off-by: Huang Rui Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 55f72087af714c0edfc5c2e8d82d4dbd1ae53e85 Author: Huang Rui Date: Thu Jan 31 19:21:25 2019 +0800 drm/amd/powerplay: update smu 11 driver if header for navi10 This patch updates smu 11 driver if header for navi10. UVD/VCE won't be used for navi10. Here, reverve them for vega20. Signed-off-by: Huang Rui Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher .../gpu/drm/amd/powerplay/inc/smu_11_0_driver_if.h | 1039 ++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 2 +- 2 files changed, 1040 insertions(+), 1 deletion(-) commit dded62c71e4495dd8d929f21414e8a4b7810e044 Author: Huang Rui Date: Thu Jan 31 19:19:48 2019 +0800 drm/amd/powerplay: update smu v11 ppsmc header This patch updates smu v11 ppsmc header for navi10. Signed-off-by: Huang Rui Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher .../gpu/drm/amd/powerplay/inc/smu_v11_0_ppsmc.h | 38 ++++++++++++---------- 1 file changed, 20 insertions(+), 18 deletions(-) commit 0a5b8c7b9490e94290bdb2a7865d9bc9f80c315f Author: Huang Rui Date: Wed Jul 19 09:45:26 2017 +0800 drm/amdgpu: add to set navi ip blocks Set the IPs for navi10 in early_init like other asics. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit bd1c0fdfc1a166859ad926dce2f12e3155b65e7d Author: Alex Deucher Date: Fri Apr 19 17:58:21 2019 -0500 drm/amdgpu: add Navi10 pci ids Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 14328aa58ce523a59996c5a82681c43ec048cc33 Author: Philip Cox Date: Wed May 29 23:03:45 2019 -0500 drm/amdkfd: Add navi10 support to amdkfd. (v3) KFD (kernel fusion driver) is the kernel driver for the compute backend for usermode compute stack. v2: squash in updates (Alex) v3: squash in rebase fixes (Alex) Signed-off-by: Oak Zeng Signed-off-by: Philip Cox Acked-by: Alex Deucher Signed-off-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 8 + drivers/gpu/drm/amd/amdkfd/Makefile | 3 + drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler.h | 299 ++++++ .../gpu/drm/amd/amdkfd/cwsr_trap_handler_gfx10.asm | 1124 ++++++++++++++++++++ drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 5 + drivers/gpu/drm/amd/amdkfd/kfd_device.c | 31 +- .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 15 +- .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.h | 4 +- .../drm/amd/amdkfd/kfd_device_queue_manager_v10.c | 88 ++ drivers/gpu/drm/amd/amdkfd/kfd_flat_memory.c | 1 + drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c | 3 + drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.h | 1 + drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue_v10.c | 348 ++++++ drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c | 498 +++++++++ drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c | 3 + drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 21 +- drivers/gpu/drm/amd/amdkfd/kfd_process.c | 1 + drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 1 + 18 files changed, 2442 insertions(+), 12 deletions(-) commit e0d076574e8d904fdd3334ceb04fe1bb9cb5f5c0 Author: Hawking Zhang Date: Fri Jun 8 18:10:57 2018 +0800 drm/amdgpu: update golden setting programming logic Since from soc15, make sure only AndMasked bit get changed when applied or_mask Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 ++++- drivers/gpu/drm/amd/amdgpu/soc15.c | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) commit 6bdadb2072243154e6441bfd789dce1fc941976c Author: Hawking Zhang Date: Tue Mar 5 19:59:30 2019 +0800 drm/amdgpu: Add navi10 kfd support for amdgpu (v3) KFD (Kernel Fusion Driver) is the compute backend driver for AMD GPUs. v2: squash in updates (Alex) v3: fix warnings (Alex) Signed-off-by: Oak Zeng Signed-off-by: Philip Cox Signed-off-by: Hawking Zhang Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Makefile | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 17 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c | 975 +++++++++++++++++++++ 4 files changed, 992 insertions(+), 4 deletions(-) commit c6b6a42175f5d36d8e7f85afb8acb6559210641e Author: Hawking Zhang Date: Mon Mar 4 14:07:37 2019 +0800 drm/amdgpu: add navi10 common ip block (v3) This adds the core SOC code for navi asics. v1: add place holder and initial basic function (Ray) v2: add new introduced functions to avoid reference NULL pointer (Hawking) v3L squash in updates (Alex) Signed-off-by: Huang Rui Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- drivers/gpu/drm/amd/amdgpu/navi10_reg_init.c | 66 +++ drivers/gpu/drm/amd/amdgpu/nv.c | 777 +++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/nv.h | 33 ++ 4 files changed, 877 insertions(+), 1 deletion(-) commit 44f1bb1fed2596330ab55192ddb280865ebc79d2 Author: Hawking Zhang Date: Fri May 10 11:05:13 2019 -0500 drm/amdgpu: avoid to use SOC15_REG_OFFSET in static array for navi10 Move to the header file. Signed-off-by: Hawking Zhang Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc15.c | 9 --------- drivers/gpu/drm/amd/amdgpu/soc15.h | 8 ++++++++ 2 files changed, 8 insertions(+), 9 deletions(-) commit a644d85a5cd4efbb1eb62751ef8a98a70d9794bc Author: Hawking Zhang Date: Mon Mar 4 14:41:42 2019 +0800 drm/amdgpu: add gfx v10 implementation (v10) GFX is the graphics and compute block on the GPU. v1: add initial gfx v10 implementation (Ray) v2: convert to new get_vm_pde function in emit_vm_flush (Hawking) v3: switch to new emit ib interfaces (Hawking) v4: squash in updates (Alex) v5: remove unused variables (Alex) v6: v6: some golden regs moved to vbios (Alex) v7: squash in some cleanups (Alex) v8: squash in golden settings update (Alex) v9: squash in whitespace fixes (Ernst Sjöstrand, Alex) v10: squash in GDS backup size fix and GDS/GWS/OA removal rebase fixes (Hawking) Signed-off-by: Huang Rui Signed-off-by: Hawking Zhang Acked-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Makefile | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 4 +- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 5171 ++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/gfx_v10_0.h | 29 + 4 files changed, 5204 insertions(+), 3 deletions(-) commit 886f82aa7a1d5af372a449e6bcd6de579578a602 Author: Jack Xiao Date: Fri Jan 25 15:25:15 2019 +0800 drm/amdgpu/mes10.1: add ip block mes10.1 (v2) MES takes over the scheduling capability of GFX and SDMA, add MES as a standalone ip. v2: squash in updates (Alex) Acked-by: Hawking Zhang Signed-off-by: Jack Xiao Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Makefile | 4 ++ drivers/gpu/drm/amd/amdgpu/mes_v10_1.c | 103 +++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/mes_v10_1.h | 29 +++++++++ drivers/gpu/drm/amd/include/amd_shared.h | 3 +- 4 files changed, 138 insertions(+), 1 deletion(-) commit 5f84cc635bce5817290f788e87778c2008fbb0a7 Author: Jack Xiao Date: Fri Jan 25 14:56:01 2019 +0800 drm/amdgpu/mes: enable mes on navi10 and later asic When amdgpu_mes is enabled and asic family is navi10 and later asic, enable mes per device. Acked-by: Hawking Zhang Signed-off-by: Jack Xiao Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++ 1 file changed, 3 insertions(+) commit 7bbc36765ccbf1a4706fe4c6d0400c2bb544dbc8 Author: Jack Xiao Date: Fri Jan 25 17:54:58 2019 +0800 drm/amdgpu/mes: add definitions of ip callback function Abstract mes ip independent function layer. Acked-by: Hawking Zhang Signed-off-by: Jack Xiao Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h | 54 +++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) commit a538bbe7a8db66730af522e687af03c0e3d9d643 Author: Jack Xiao Date: Fri Jan 25 14:36:23 2019 +0800 drm/amdgpu/mes: add mes header file and definition Add dummy header file and definitions of mes. Acked-by: Hawking Zhang Signed-off-by: Jack Xiao Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 5 +++++ drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h | 31 +++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) commit 384872846f719760645dbe1b0c70edccb9cc941a Author: Jack Xiao Date: Fri Jan 25 14:11:35 2019 +0800 drm/amdgpu/mes: add amdgpu_mes driver parameter amdgpu_mes, which is a driver scope parameter, is used to whether enable mes or not. MES (Micro Engine Scheduler) is the new on chip hw scheduling microcontroller. It can be used to handle queue scheduling and preemption and priorities. Acked-by: Hawking Zhang Signed-off-by: Jack Xiao Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 5 +++++ 2 files changed, 6 insertions(+) commit 1b61de45dfaff00b627e47349a019658e39268b9 Author: Leo Liu Date: Mon Oct 15 11:38:59 2018 -0400 drm/amdgpu: add initial VCN2.0 support (v2) VCN (Video Core Next) is the video encode/decode block. Porting over the same functions from VCN1.0 v2: squash in updates (Alex) Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Reviewed-by: James Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Makefile | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 1 + drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 1865 +++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/vcn_v2_0.h | 29 + 4 files changed, 1897 insertions(+), 1 deletion(-) commit 54bb93c2251ce8fcfd44db491e85f01c17025fb5 Author: Leo Liu Date: Mon Oct 15 16:17:27 2018 -0400 drm/amdgpu: add JPEG2.0 decode ring ib test Add internal register offset for registers involving in ib tests Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9085914a5af4b3078a0289c4d67ee7cbc45dac99 Author: Leo Liu Date: Mon Dec 3 11:42:28 2018 -0500 drm/amdgpu: add JPEG2.0 decode ring test Use register from JPEG tile, the UVD tile reg won't work for JPEG Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 8 +++----- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 1 + drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 2 ++ 3 files changed, 6 insertions(+), 5 deletions(-) commit 60a2309ec465aab22910ddce8e45aaa624f87f5d Author: Leo Liu Date: Mon Oct 15 15:41:36 2018 -0400 drm/amdgpu: add VCN2.0 decode ib test Add internal register offset for registers involving in ib tests Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 8 ++++---- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 6 +++++- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 8 ++++++++ 3 files changed, 17 insertions(+), 5 deletions(-) commit 45a1a48b5c310700d338105df5883e8f8ab1f994 Author: Leo Liu Date: Wed Oct 17 14:33:48 2018 -0400 drm/amdgpu: add VCN2.0 decode ring test Add internal register offset for registers involving in ring tests Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 8 +++----- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 5 +++++ drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 3 +++ 3 files changed, 11 insertions(+), 5 deletions(-) commit a8790e2475ea48a06d8834db7717f7f715a77366 Author: Leo Liu Date: Mon Oct 15 15:07:08 2018 -0400 drm/amdgpu: add Navi10 VCN firmware support Add Navi10 to VCN family Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 5 +++++ 1 file changed, 5 insertions(+) commit fef6e24c8b0243c3c43723949091cf999bb39c56 Author: Hawking Zhang Date: Sun Mar 31 22:13:57 2019 +0800 drm/amdgpu: add initial support for sdma v5.0 (v6) SDMA (System DMA) is a general purpose DMA engine usable by UMDs for transfers or the kernel for paging or GPUVM updates. v1: support basic funcitonalites includes rb, ib, vm, copy buffer and trap irq v2: convert to use new get_vm_pde in emit_vm_flush v3: retire amdgpu_ttm_set_active_vram_size from sdma v5 v4: retire the redundant hdp_invalidate implementation v5: squash in updates v6: some golden regs moved to vbios Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Makefile | 3 +- drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c | 1685 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/sdma_v5_0.h | 45 + 3 files changed, 1732 insertions(+), 1 deletion(-) commit be9250fb962d36aa5e7ca05b0760e39753f5ce7a Author: Hawking Zhang Date: Tue Jun 12 18:31:24 2018 +0800 drm/amdgpu: set the default value of pa_sc_tile_steering_override So userspace can access it. Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 4 ++++ 1 file changed, 4 insertions(+) commit 22e96fa62ec66ca9d21a76b74601fc200908fec3 Author: Hawking Zhang Date: Tue Jun 12 18:30:04 2018 +0800 drm/amdgpu: add pa_sc_tile_steering_override to drm_amdgpu_info_device the initial/default value of pa_sc_tile_steering_override need to be exposed to user mode driver Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher include/uapi/drm/amdgpu_drm.h | 2 ++ 1 file changed, 2 insertions(+) commit a2bd77bbde791202267c25478bbcbe71bb4ecdd5 Author: Christian König Date: Thu Feb 7 12:10:29 2019 +0100 drm/amdgpu: disable concurrent flushes for Navi10 v2 Navi10 have a bug in the SDMA which can theoretically cause memory corruption with concurrent VMID flushes v2: explicitely check Navi10 Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 437298b833996de86a94d53e4051461cac25010d Author: Xiaojie Yuan Date: Wed Mar 27 17:58:25 2019 +0800 drm/amdgpu/discovery: refactor ip list traversal for each ip, check whether it is needed by amdgpu driver, if yes, record its base addresses v2: change some DRM_INFO to DRM_DEBUG v3: remove unused variable (Alex) Signed-off-by: Xiaojie Yuan Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 71 ++++++++++++++++----------- 1 file changed, 42 insertions(+), 29 deletions(-) commit a190d1c75c73ce7cab3dc7261061d877ffbd8517 Author: Xiaojie Yuan Date: Wed Mar 27 12:39:18 2019 +0800 drm/amdgpu/discovery: add module param for ip discovery enablement to control enablement. Signed-off-by: Xiaojie Yuan Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 10 ++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 5 +++++ 3 files changed, 16 insertions(+) commit 966f1d8fd05fd1e3b7c35f4cf657ceb3bfbdfc7a Author: Xiaojie Yuan Date: Wed Mar 27 20:27:20 2019 +0800 drm/amdgpu/discovery: stop converting the units of base addresses the unit is already in dword Signed-off-by: Xiaojie Yuan Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6a8ee0257dee074ce8b96643f44b1efd1ce120b4 Author: Xiaojie Yuan Date: Wed Mar 27 17:46:04 2019 +0800 drm/amdgpu/discovery: update definition for struct die_header Update to latest spec. Signed-off-by: Xiaojie Yuan Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/discovery.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8e84aa1bf2af81346cc8a3aaab630bc86a4af681 Author: Xiaojie Yuan Date: Wed Mar 27 12:21:40 2019 +0800 drm/amdgpu/discovery: stop taking psp header into account psp will write a header to vram, but the value exposed in RCC_CONFIG_MEMSIZE does not include the memory that this header is written to. Therefore, the interpretation of the table does not need to take the psp header into account. Signed-off-by: Xiaojie Yuan Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 2de00413761d7d66cb00001c00240474f222b603 Author: Xiaojie Yuan Date: Wed Mar 27 12:19:20 2019 +0800 drm/amdgpu/discovery: fix hwid for nbio Properly set this. Signed-off-by: Xiaojie Yuan Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 85f267a7078f4e0da8513ff1fd3e8a9bc082e44d Author: Xiaojie Yuan Date: Wed Mar 27 12:29:49 2019 +0800 drm/amdgpu/discovery: use hardcoded mmRCC_CONFIG_MEMSIZE register base offset of nbio is not known before IP Discovery table is parsed, so hardcode this value. Signed-off-by: Xiaojie Yuan Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 70cbfe3d64b84e9f4c47c186942cd70d6495b465 Author: Xiaojie Yuan Date: Thu Feb 21 17:55:30 2019 +0800 drm/amdgpu/discovery: add harvest info data table Add support for the harvest tables. Signed-off-by: Xiaojie Yuan Reviewed-by: Jack Xiao Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/discovery.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit 478586d6d5c7db7a9af47746973463edea35ca11 Author: Xiaojie Yuan Date: Thu Feb 21 17:55:05 2019 +0800 drm/amdgpu/discovery: update definitions of table_info and binary_header Use the proper definitions. Signed-off-by: Xiaojie Yuan Reviewed-by: Jack Xiao Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/discovery.h | 4 ++++ 1 file changed, 4 insertions(+) commit 987da7294bdf71fb1b4456cccb13e5cb2469f1aa Author: Xiaojie Yuan Date: Thu Feb 21 14:05:47 2019 +0800 drm/amdgpu/discovery: fix calculations of some gfx info fix gfx info table handling. Signed-off-by: Xiaojie Yuan Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit f39f5bb1c9d68d557ff1539fea7adfe7c4d4ed7a Author: Xiaojie Yuan Date: Thu Jun 20 10:18:50 2019 -0500 drm/amdgpu/discovery: add ip discovery initial support The IP discovery table lists is populated by the psp at power on and includes all of the hw details on the board: - List of IPs and MMIO offsets - IP harvest details - IP configuration details v2: prefix struct and function names with 'amdgpu' v3: read table binary from vram using mmMM_INDEX and mmMM_DATA update TABLE_BINARY_MAX_SIZE to 64kb (1 TMR) add 'instance_number' field per ip info consider endianness and replace uint8/16/32_t with u8/16/32 initialize register base addresses initialize adev->gfx.config and adev->gfx.cu_info to replace gpu info fw get major and minor version using a single api don't expose internal data structures in amdgpu_discovery.h v4: RCC_CONFIG_MEMSIZE is in MB units hold mmio_idx_lock while reading ip discovery binary v5: pick out discovery.h as a cross-OS header do structure pointer cast directly consider endianness while using the member of structure convert base addresses to dword at boot up, PSP BL copies ip discovery binary from VBIOS(SPIROM) image to the top of the frame buffer (just below the reserved regions for PSP & SMU). ip discovery data table includes the collection of each ip's identification number, base addresses, version number, and harvest setting placeholder. gc data table includes gfx info structure. Signed-off-by: Xiaojie Yuan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 + drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 401 ++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.h | 34 +++ drivers/gpu/drm/amd/include/discovery.h | 145 ++++++++++ 5 files changed, 585 insertions(+), 1 deletion(-) commit 80f8fb9178eda5a16b5ff8e2b2e8304f0a06f5f4 Author: Jack Xiao Date: Wed Jan 23 13:54:26 2019 +0800 drm/amdgpu: mark the partial job as preempted in mcbp unit test In mcbp unit test, the test should detect the preempted job which may be a partial execution ib and mark it as preempted; so that the gfx block can correctly generate PM4 frame. Reviewed-by: Hawking Zhang Signed-off-by: Jack Xiao Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 44 +++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 12 deletions(-) commit 6698a3d05fda57f37add68c55a0696bfa7100413 Author: Jack Xiao Date: Thu Jun 20 10:17:31 2019 -0500 drm/amdgpu: add mcbp unit test in debugfs (v3) The MCBP unit test is used to test the functionality of MCBP. It emualtes to send preemption request and resubmit the unfinished jobs. v2: squash in fixes (Alex) v3: squash in memory leak fix (Jack) Acked-by: Hawking Zhang Signed-off-by: Jack Xiao Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 158 ++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 + 4 files changed, 161 insertions(+) commit 43974dacb6c35ea6a2bf89c1d5e2e04195464f81 Author: Jack Xiao Date: Tue Jan 8 15:28:52 2019 +0800 drm/amdgpu: program for resuming preempted ib For new submission ib, CE/DE metadata should be programmed to 0; for partially execution ib, CE/DE metadata should be restored. Acked-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Jack Xiao Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 1 + 2 files changed, 2 insertions(+) commit ca1eb73207a49c0777b0dac3dc0be6bd07597a44 Author: Jack Xiao Date: Mon Jan 7 15:28:01 2019 +0800 drm/amdgpu/sdma: allocate CSA per sdma ring Allocate CSA for the given sdma ring. Acked-by: Hawking Zhang Signed-off-by: Jack Xiao Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c | 27 +++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.h | 2 +- 2 files changed, 28 insertions(+), 1 deletion(-) commit d8780dc71d56acf734a5756cac8c7787eb6bec11 Author: Jack Xiao Date: Thu Jan 17 15:47:36 2019 +0800 drm/amdgpu: add ib preemption status in amdgpu_job (v2) Add ib preemption status in amdgpu_job, so that ring level function can detect preemption and program for resuming it. v2: squash in fix to restore job->preamble_status back to status value (Jack) Acked-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Jack Xiao Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_job.h | 3 +++ 2 files changed, 4 insertions(+) commit 15aa25cbf0ccc4bd63ed6f2a8065decb7f5e6f89 Author: Alan Stern Date: Thu Jun 20 11:55:46 2019 -0400 tools/memory-model: Change definition of rcu-fence The rcu-fence relation in the Linux Kernel Memory Model is not well named. It doesn't act like any other fence relation, in that it does not relate events before a fence to events after that fence. All it does is relate certain RCU events to one another (those that are ordered by the RCU Guarantee); this induces an actual strong-fence-like relation linking events preceding the first RCU event to those following the second. This patch renames rcu-fence, now called rcu-order. It adds a new definition of rcu-fence, something which should have been present all along because it is used in the rb relation. And it modifies the fence and strong-fence relations by making them incorporate the new rcu-fence. As a result of this change, there is no longer any need to define full-fence in the section for detecting data races. It can simply be replaced by the updated strong-fence relation. This change should have no effect on the operation of the memory model. Signed-off-by: Alan Stern Acked-by: Andrea Parri Signed-off-by: Paul E. McKenney tools/memory-model/linux-kernel.cat | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit f9de417121001879d92a86960647adb06b5b81bf Author: Alan Stern Date: Thu Jun 20 11:55:36 2019 -0400 tools/memory-model: Expand definition of barrier Commit 66be4e66a7f4 ("rcu: locking and unlocking need to always be at least barriers") added compiler barriers back into rcu_read_lock() and rcu_read_unlock(). Furthermore, srcu_read_lock() and srcu_read_unlock() have always contained compiler barriers. The Linux Kernel Memory Model ought to know about these barriers. This patch adds them into the memory model. Signed-off-by: Alan Stern Acked-by: Andrea Parri Signed-off-by: Paul E. McKenney tools/memory-model/linux-kernel.cat | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 85dc04136e86680378546afb808357a58c06061c Author: Benjamin Herrenschmidt Date: Sat Jun 15 10:23:59 2019 +1000 arm64: PCI: Preserve firmware configuration when desired If we must preserve the firmware resource assignments, claim the existing resources rather than reassigning everything. Link: https://lore.kernel.org/r/20190615002359.29577-4-benh@kernel.crashing.org Signed-off-by: Benjamin Herrenschmidt [bhelgaas: commit log] Signed-off-by: Bjorn Helgaas Acked-by: Lorenzo Pieralisi Acked-by: Ard Biesheuvel arch/arm64/kernel/pci.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 3e8ba9686600e5f77e692126bf0293edf162989a Author: Benjamin Herrenschmidt Date: Sat Jun 15 10:23:56 2019 +1000 arm64: PCI: Allow resource reallocation if necessary Call pci_assign_unassigned_root_bus_resources() instead of the simpler: pci_bus_size_bridges(bus); pci_bus_assign_resources(bus); pci_assign_unassigned_root_bus_resources() calls: __pci_bus_size_bridges(bus, add_list); __pci_bus_assign_resources(bus, add_list, &fail_head); so this should be equivalent as long as we're able to assign everything. If we were unable to assign something, previously we did nothing and left it unassigned, but after this patch, we will attempt to do some reallocation. Once we start honoring FW resource allocations, this will bring up the "reallocation" feature which can help making room for SR-IOV when necessary. Link: https://lore.kernel.org/r/20190615002359.29577-1-benh@kernel.crashing.org Signed-off-by: Benjamin Herrenschmidt [bhelgaas: commit log] Signed-off-by: Bjorn Helgaas Acked-by: Lorenzo Pieralisi arch/arm64/kernel/pci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7ac0d094fbe95bf7cc96b3066a97e1090ddc734a Author: Benjamin Herrenschmidt Date: Sat Jun 15 10:23:58 2019 +1000 PCI: Don't auto-realloc if we're preserving firmware config Prevent auto-enabling of bridges reallocation when the FW tells us that the initial configuration must be preserved for a given host bridge. Link: https://lore.kernel.org/r/20190615002359.29577-3-benh@kernel.crashing.org Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Bjorn Helgaas drivers/pci/setup-bus.c | 5 +++++ 1 file changed, 5 insertions(+) commit a78cf9657ba5426f54aa93a067c10d097944c082 Author: Benjamin Herrenschmidt Date: Sat Jun 15 10:23:57 2019 +1000 PCI/ACPI: Evaluate PCI Boot Configuration _DSM Evaluate _DSM Function #5, the "PCI Boot Configuration" function. If the result is 0, the OS should preserve any resource assignments made by the firmware. Link: https://lore.kernel.org/r/20190615002359.29577-2-benh@kernel.crashing.org Signed-off-by: Benjamin Herrenschmidt [bhelgaas: commit log] Signed-off-by: Bjorn Helgaas drivers/acpi/pci_root.c | 12 ++++++++++++ include/linux/pci-acpi.h | 7 ++++--- include/linux/pci.h | 2 ++ 3 files changed, 18 insertions(+), 3 deletions(-) commit 3a959dcd11a4b1f55bbb4a37d3bac685c4e106b1 Author: Robert Jarzmik Date: Wed May 29 15:25:18 2019 -0400 media: mt9m111: add regulator support In the soc_camera removal, the board specific power callback was dropped. This at least will remove the power optimization from ezx and em-x270 pxa based boards. As to recreate the same level of functionality, make the mt9m111 have a regulator providing it its power, so that board designers can plug in a gpio based or ldo regulator, mimicking their former soc_camera power hook. [sakari.ailus@linux.intel.com: fix a build warning] Fixes: 5c10113cc668 ("media: mt9m111: make a standalone v4l2 subdevice") Signed-off-by: Robert Jarzmik Signed-off-by: Mauro Carvalho Chehab Tested-by: Akinobu Mita Tested-by: Robert Jarzmik Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/mt9m111.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit e14b77c3db5c97c5ef67f508cc302571163dbbca Author: Sakari Ailus Date: Thu Jun 6 10:21:25 2019 -0400 media: ov9640: Don't check for NULL on devm_gpiod_get return values devm_gpiod_get never returns NULL; therefore it's not necessary to check for that. PTR_ERR(NULL) also yields zero, which is confusing to smatch. Reported-by: Hans Verkuil Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov9640.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4ace2d28aba594e234923f55f476e97c56f6689a Author: Sakari Ailus Date: Thu Jun 6 10:18:42 2019 -0400 media: v4l2-fwnode: Avoid using PTR_ERR(NULL) PTR_ERR(NULL) yields 0 which is commonly used to denote success. This is the case here, and PTR_ERR(NULL) is apparently shunned upon. Fix this by explicitly returning 0 if fwnode == NULL. Reported-by: Hans Verkuil Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-fwnode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5c49ac3ac6562a39baa2aece050a14b661197036 Author: Janusz Krzysztofik Date: Sun Jun 2 17:22:15 2019 -0400 media: ov6650: Fix device node exposed without proper locking Commit c62b96050bee ("media: ov6650: Register with asynchronous subdevice framework") carelessly requested creation of a video device node by setting a V4L2_SUBDEV_FL_HAS_DEVNODE flag. The driver is not ready for that as it doesn't implement proper locking required for serialization of IOCTLs. Fix it by dropping the flag assignment. Fixes: c62b96050bee ("media: ov6650: Register with asynchronous subdevice framework") Signed-off-by: Janusz Krzysztofik Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov6650.c | 1 - 1 file changed, 1 deletion(-) commit 26092e7eec3d1a5f2dd4fc9cb691bfdcdc558a51 Author: Shobhit Kukreti Date: Sat Jun 1 11:27:34 2019 -0400 media: i2c: Fix Unnecessary Semicolon Warning Reported by coccicheck Removed the warning from the following files: drivers/media/i2c/ov13858.c drivers/media/i2c/ov2685.c drivers/media/i2c/ov5695.c Signed-off-by: Shobhit Kukreti Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov13858.c | 4 ++-- drivers/media/i2c/ov2685.c | 2 +- drivers/media/i2c/ov5695.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 4196ad7cc99fce466b50be5df94ca8a2f0d1cf42 Author: Johan Korsnes Date: Tue Jun 18 03:37:26 2019 -0400 media: vivid.rst: describe display present control Signed-off-by: Johan Korsnes Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/v4l-drivers/vivid.rst | 5 +++++ 1 file changed, 5 insertions(+) commit 4938958f5374962e54cfdb04a7b041808af3d4c8 Author: Johan Korsnes Date: Tue Jun 18 03:37:25 2019 -0400 media: vivid: add CEC support to display present ctrl Set/invalidate physical addresses based on the configuration of the display present control. This is relevant not only when the display present control is modified, but also when the Vivid instance EDID is set/cleared. Signed-off-by: Johan Korsnes Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vivid/vivid-ctrls.c | 25 +++++++++++++++++++++---- drivers/media/platform/vivid/vivid-vid-cap.c | 17 +++++++++++++++-- drivers/media/platform/vivid/vivid-vid-common.c | 2 ++ 3 files changed, 38 insertions(+), 6 deletions(-) commit 4ee895e71abb51de61f8ea4b7cdba68e474ccf16 Author: Johan Korsnes Date: Tue Jun 18 03:37:24 2019 -0400 media: vivid: reorder CEC allocation and control set-up CEC adapters and controllers (handlers) are now set up as follows: 1. Allocate CEC adapters: setup of control handlers in next step requires these adapters to be allocated. 2. Setup of control handlers: This must be done prior to registering and exposing the adapters to user space to avoid a race condition. 3. Register CEC adapters: make them available to user space. Signed-off-by: Johan Korsnes Signed-off-by: Hans Verkuil [hverkuil-cisco@xs4all.nl: PTR_ERR -> PTR_ERR_OR_ZERO] Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vivid/vivid-core.c | 100 +++++++++++++++++------------- 1 file changed, 58 insertions(+), 42 deletions(-) commit 8a99e9faa131b2cfedf9764c646b85ad6217f2e8 Author: Johan Korsnes Date: Tue Jun 18 03:37:23 2019 -0400 media: vivid: add HDMI (dis)connect RX emulation Adds the following bitmask control: -V4L2_CID_DV_RX_POWER_PRESENT The RX_POWER_PRESENT bitmask is set based on the digital video timings signal mode. This also removes 1/1 warnings for v4l2-compliance test on vivid instance with HDMI input. Signed-off-by: Johan Korsnes Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vivid/vivid-core.h | 4 ++++ drivers/media/platform/vivid/vivid-ctrls.c | 21 +++++++++++++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) commit 79a792dafac60b8bd7397e0bf15b3e9ce8a6278c Author: Johan Korsnes Date: Tue Jun 18 03:37:22 2019 -0400 media: vivid: add HDMI (dis)connect TX emulation Adds the following bitmask controls: -V4L2_CID_DV_TX_EDID_PRESENT -V4L2_CID_DV_TX_HOTPLUG -V4L2_CID_DV_TX_RXSENSE The bitmasks are all set based on the custom vivid DISPLAY_PRESENT control. This also removes 2/2 v4l2-compliance warnings for vivid output device. Signed-off-by: Johan Korsnes Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vivid/vivid-core.h | 3 +++ drivers/media/platform/vivid/vivid-ctrls.c | 25 ++++++++++++++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) commit 389e21b312a4bbe4ae72de5412dd3db6ea0818fa Author: Johan Korsnes Date: Tue Jun 18 03:37:21 2019 -0400 media: vivid: add number of HDMI ports to device state This will be used for HDMI-specific controls such as hotplug detection and power present. Signed-off-by: Johan Korsnes Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vivid/vivid-core.c | 2 ++ drivers/media/platform/vivid/vivid-core.h | 2 ++ 2 files changed, 4 insertions(+) commit c533435ffb91ff52a407fae24b2fe560870aea10 Author: Johan Korsnes Date: Tue Jun 18 03:37:20 2019 -0400 media: vivid: add display present control Add a custom control for selecting the presence of a display connected to the active output. This control is part of an effort to implement proper HDMI (dis)connect behavior for vivid. Signed-off-by: Johan Korsnes Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vivid/vivid-core.c | 3 +++ drivers/media/platform/vivid/vivid-core.h | 2 ++ drivers/media/platform/vivid/vivid-ctrls.c | 18 ++++++++++++++++++ drivers/media/platform/vivid/vivid-vid-out.c | 6 ++++++ 4 files changed, 29 insertions(+) commit 6c396c28dce0709b105eb59ecf4e44fd2f2e54dc Author: Johan Korsnes Date: Tue Jun 18 03:37:19 2019 -0400 media: vivid: make input std_signal per-input Make the following properties per-input: -Standard Signal Mode -Standard These properties need to be per-input in order to implement proper HDMI (dis)connect-behavior, where the signal mode will be used to signify whether or not there is an inpute device connected. Signed-off-by: Johan Korsnes Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vivid/vivid-core.c | 5 ++- drivers/media/platform/vivid/vivid-core.h | 10 ++--- drivers/media/platform/vivid/vivid-ctrls.c | 14 +++--- drivers/media/platform/vivid/vivid-kthread-cap.c | 6 +-- drivers/media/platform/vivid/vivid-vbi-cap.c | 16 +++---- drivers/media/platform/vivid/vivid-vid-cap.c | 55 +++++++++++++++--------- drivers/media/platform/vivid/vivid-vid-common.c | 4 +- 7 files changed, 64 insertions(+), 46 deletions(-) commit 448e11538f71933ba0ebd156bb176cf66827d6fd Author: Johan Korsnes Date: Tue Jun 18 03:37:18 2019 -0400 media: vivid: make input dv_timings per-input Make the following properties per-input -DV Timings Signal Mode -DV Timings These properties need to be per-input in order to implement proper HDMI (dis)connect-behavior, where the signal mode will be used to signify whether or not there is an input device connected. Signed-off-by: Johan Korsnes Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vivid/vivid-core.c | 12 ++++- drivers/media/platform/vivid/vivid-core.h | 11 +++-- drivers/media/platform/vivid/vivid-ctrls.c | 13 +++-- drivers/media/platform/vivid/vivid-kthread-cap.c | 2 +- drivers/media/platform/vivid/vivid-vid-cap.c | 63 ++++++++++++++++-------- drivers/media/platform/vivid/vivid-vid-common.c | 2 +- 6 files changed, 69 insertions(+), 34 deletions(-) commit 57ca968b69ecb741f6f8e643666e21635b6828bc Author: Bitan Biswas Date: Tue Jun 18 04:09:42 2019 -0700 i2c: tegra: remove BUG() macro The usage of BUG() macro is generally discouraged in kernel, unless it's a problem that results in a physical damage or loss of data. This patch removes unnecessary BUG() macros and replaces the rest with warning. Signed-off-by: Bitan Biswas Reviewed-by: Dmitry Osipenko Tested-by: Dmitry Osipenko Acked-by: Thierry Reding Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-tegra.c | 47 +++++++++++++++++++++++++++++++++++------- 1 file changed, 39 insertions(+), 8 deletions(-) commit b1b9b7bee370b552517efed60b41228838364e14 Author: Dmitry Osipenko Date: Sun Jun 2 17:37:10 2019 -0400 media: staging: media: tegra-vde: Manually pack UAPI structures The __packed macro isn't available in userspace with the kernel headers. Checkpatch asks to use the macro, which is unwanted in a case of a UAPI header. There is no much benefit in a tight packing of the structures, hence let's pack them manually to cleanup things a tad. Note that there is no old-stable userspace that will suffer from this change, hence it's fine to change the ABI. In a result also more space is reserved for a possible future expansion of the UAPI as it was already shown that more fields will be needed for a later SoC generations. Suggested-by: Thierry Reding Signed-off-by: Dmitry Osipenko Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/tegra-vde/tegra-vde.c | 13 +++++++-- drivers/staging/media/tegra-vde/uapi.h | 44 +++++++++++++++-------------- 2 files changed, 34 insertions(+), 23 deletions(-) commit 9be1485accd4a0375170b93f90894e7728029078 Author: Jarkko Nikula Date: Thu Jun 20 13:51:26 2019 +0300 i2c: i801: Add support for Intel Elkhart Lake Add PCI ID for Intel Elkhart Lake PCH. Signed-off-by: Jarkko Nikula Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang Documentation/i2c/busses/i2c-i801 | 1 + drivers/i2c/busses/Kconfig | 1 + drivers/i2c/busses/i2c-i801.c | 4 ++++ 3 files changed, 6 insertions(+) commit 0f8cd165287bf777da3280e7cda8f51d9c3ed624 Author: Dmitry Osipenko Date: Sun Jun 2 17:37:09 2019 -0400 media: staging: media: tegra-vde: Remove BIT() macro from UAPI header The BIT macro isn't available in userspace. Checkpatch complains about shifts being used instead of the macro and people are starting to send patches without realizing that it's a UAPI header file. Hence let's replace the BIT macro with a hex values to make everyone happy. Signed-off-by: Dmitry Osipenko Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/tegra-vde/uapi.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 56202c0cbe4fdeaeced6f5d2785b8a7ef4332905 Author: Fabio Estevam Date: Wed Jun 5 14:05:43 2019 -0400 media: coda: Use devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify the code a bit. Signed-off-by: Fabio Estevam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-common.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 1a9ade50b82fd941d23473015752a56aa9812e37 Author: Jae Hyun Yoo Date: Fri May 31 18:15:48 2019 -0400 media: aspeed: add a workaround to fix a silicon bug AST2500 silicon revision A1 and A2 have a silicon bug which causes extremly long capturing time on specific resolutions (1680 width). To fix the bug, this commit adjusts the capturing window register setting to 1728 if detected width is 1680. The compression window register setting will be kept as the original width so output result will be the same. Signed-off-by: Jae Hyun Yoo Reviewed-by: Eddie James Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/aspeed-video.c | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) commit 315cd67c945351f8a569500f8ab16b7fa94026e8 Author: Alexander Sverdlin Date: Tue Jun 18 17:06:50 2019 +0000 i2c: i801: Add Block Write-Block Read Process Call support Add SMBUS 2.0 Block Write-Block Read Process Call command support. Signed-off-by: Alexander Sverdlin Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang Documentation/i2c/busses/i2c-i801 | 2 +- drivers/i2c/busses/i2c-i801.c | 43 +++++++++++++++++++++++++++++++++------ 2 files changed, 38 insertions(+), 7 deletions(-) commit ad266c031662e9e05304be70cc92fc3e833a7e78 Author: Fabio Estevam Date: Sat May 4 10:40:25 2019 -0400 media: dt-bindings: imx7-csi: Document a single CSI clock As per the i.MX7D Reference Manual only the MCLK is used for the CSI block, so only document this single clock. Signed-off-by: Fabio Estevam Tested-by: Rui Miguel Silva Reviewed-by: Rui Miguel Silva Reviewed-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/devicetree/bindings/media/imx7-csi.txt | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 03f4175bd01f94b99688b087c82706a11efbde5c Author: André Almeida Date: Sat Jun 15 22:09:59 2019 -0400 media: docs: create vimc documentation Create vimc documentation file to explain its basic features, its topology, how to configure it and to document vimc's subdevices. Signed-off-by: André Almeida Suggested-by: Helen Koike [hverkuil-cisco@xs4all.nl: Fix typo: The ``v4l2-utils`` -> The ``v4l-utils`` package] Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/v4l-drivers/index.rst | 1 + Documentation/media/v4l-drivers/vimc.dot | 22 +++++++ Documentation/media/v4l-drivers/vimc.rst | 98 +++++++++++++++++++++++++++++++ 3 files changed, 121 insertions(+) commit bfa69bdf342b723a065528acdb217d13a40e40b6 Author: André Almeida Date: Sat Jun 15 22:09:58 2019 -0400 media: vimc: stream: add missing function documentation Add comments at vimc_streamer_s_stream and vimc_streamer_thread, making the vimc-stream totally documented. Signed-off-by: André Almeida [hverkuil-cisco@xs4all.nl: fix typo: in a fixed framerate -> at a fixed framerate] [hverkuil-cisco@xs4all.nl: fix typo: stops the thread -> stop the thread] Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vimc/vimc-streamer.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 94954bb709c998aeda73be42bb18a7911b6413b4 Author: Akinobu Mita Date: Sat Jun 15 11:00:57 2019 -0400 media: video-i2c: use V4L2_FRACT_COMPARE Use V4L2_FRACT_COMPARE to check whether two v4l2_fract structs are equal. Cc: Matt Ranostay Cc: Sakari Ailus Cc: Hans Verkuil Signed-off-by: Akinobu Mita Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/video-i2c.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit eef4d8e9f06dd06496ea82400f26379c4de8797c Author: YueHaibing Date: Sat Jun 15 03:45:53 2019 -0400 media: meye: Fix build COMPILE_TEST error If COMPILE_TEST is y and SONY_LAPTOP is m, building fails as below: Reported-by: Hulk Robot Fixes: 6159e12e1177 ("media: meye: allow building it with COMPILE_TEST on non-x86") Signed-off-by: YueHaibing Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/meye/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 79b4499524ed659fb76323efc30f3dc03967c88f Author: Fabrice Gasnier Date: Mon Jun 17 09:53:01 2019 +0200 i2c: stm32f7: fix the get_irq error cases During probe, return the "get_irq" error value instead of -EINVAL which allows the driver to be deferred probed if needed. Fix also the case where of_irq_get() returns a negative value. Note : On failure of_irq_get() returns 0 or a negative value while platform_get_irq() returns a negative value. Fixes: aeb068c57214 ("i2c: i2c-stm32f7: add driver") Reviewed-by: Pierre-Yves MORDRET Signed-off-by: Fabien Dessenne Signed-off-by: Fabrice Gasnier Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-stm32f7.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) commit 8c937ab966fdf639e517594b48f06b1f07309072 Author: Luca Ceresoli Date: Fri Jun 14 11:14:29 2019 -0400 media: docs: v4l2-controls: fix sentence rendered in a nonsense way This sentence renders as: > Since such compound controls need to expose more information about > themselves than is possible with ioctls VIDIOC_QUERYCTRL, > VIDIOC_QUERY_EXT_CTRL and VIDIOC_QUERYMENU the VIDIOC_QUERY_EXT_CTRL ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ > ioctl was added. This does not make sense. Fix by providing an explicit link text. This results in: > Since such compound controls need to expose more information about > themselves than is possible with VIDIOC_QUERYCTRL the > VIDIOC_QUERY_EXT_CTRL ioctl was added. Signed-off-by: Luca Ceresoli Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/extended-controls.rst | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 3fcedae346029561f4d033412371c857fa9ebf0f Author: Akinobu Mita Date: Fri Jun 14 10:09:06 2019 -0400 media: vivid: remove unnecessary min and max timeperframe constants The tpf_min (1/100) and tpf_max (100/1) are used as the lowest and the highest allowable value for the desired frame period in vivid_vid_cap_s_parm(). But the comparison between these values is unnecessary because the compared value is already chosen from webcam_intervals[] (from 1/60 to 1/1). Cc: Hans Verkuil Signed-off-by: Akinobu Mita Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vivid/vivid-core.h | 12 ------------ drivers/media/platform/vivid/vivid-vid-cap.c | 7 ------- 2 files changed, 19 deletions(-) commit 9fcb242be63db7c43c65401b615012225c648515 Author: Alexandre Courbot Date: Fri Jun 14 03:56:40 2019 -0400 media: mtk-vcodec: remove unneeded proxy functions We were getting the codec interface through a proxy function that does not bring anything compared to just accessing the interface definition directly, so just do that. Also make the decoder interfaces const. Signed-off-by: Alexandre Courbot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mtk-vcodec/vdec/vdec_h264_if.c | 9 +-------- drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_if.c | 9 +-------- drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_if.c | 9 +-------- drivers/media/platform/mtk-vcodec/vdec_drv_if.c | 10 +++------- drivers/media/platform/mtk-vcodec/vdec_drv_if.h | 4 ++++ drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c | 9 +-------- drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c | 9 +-------- drivers/media/platform/mtk-vcodec/venc_drv_if.c | 7 ++----- drivers/media/platform/mtk-vcodec/venc_drv_if.h | 3 +++ 9 files changed, 17 insertions(+), 52 deletions(-) commit 86aed3f519312ee86bf6c618687aa1be08dd9ca4 Author: Alexandre Courbot Date: Fri Jun 14 03:56:21 2019 -0400 media: mtk-vcodec: avoid unneeded pointer-to-long conversions The interface used to communicate with the firmware casts pointers into unsigned longs and back again in order to store private references, all of this for pointers that remain purely in the kernel. Replace these unsigned longs with void pointers to make the code a bit sturdier and easier to follow. Also simplify some interfaces by removing arguments that could be infered from others. Signed-off-by: Alexandre Courbot Signed-off-by: Hans Verkuil [hverkuil-cisco@xs4all.nl: fix checkpatch alignment warning] Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h | 2 +- drivers/media/platform/mtk-vcodec/vdec/vdec_h264_if.c | 12 ++++++------ drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_if.c | 12 ++++++------ drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_if.c | 14 +++++++------- drivers/media/platform/mtk-vcodec/vdec_drv_base.h | 8 ++++---- drivers/media/platform/mtk-vcodec/vdec_drv_if.c | 10 +++++----- drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c | 10 +++++----- drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c | 10 +++++----- drivers/media/platform/mtk-vcodec/venc_drv_base.h | 8 ++++---- drivers/media/platform/mtk-vcodec/venc_drv_if.c | 6 +++--- 10 files changed, 46 insertions(+), 46 deletions(-) commit af668d6518dcf7106bf4eef1641d8143842dc9cc Author: Andy Shevchenko Date: Fri Jun 21 14:36:24 2019 +0300 i2c: i801: Use match_string() helper to simplify the code match_string() returns the array index of a matching string. Use it instead of the open-coded implementation. Signed-off-by: Andy Shevchenko Reviewed-by: Pali Rohár Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-i801.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit d13b3cdcbacbeb31c0a4b5b3a63e855b4511fd85 Author: André Almeida Date: Thu Jun 13 11:06:14 2019 -0400 media: vimc: Makefile: file cleanup Remove redundant Makefile rules (vimc_capture-objs, ...). Stop exposing vimc-{common, streamer} as modules, since there's no use case where they would be individually added/removed from Vimc. As consequence, remove MODULE_ macros from vimc-{common, streamer}. `-objs` is fitted for building host programs, change to `-y`, more straightforward for device drivers. Signed-off-by: André Almeida Suggested-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vimc/Makefile | 12 +++--------- drivers/media/platform/vimc/vimc-common.c | 4 ---- drivers/media/platform/vimc/vimc-streamer.c | 4 ---- 3 files changed, 3 insertions(+), 17 deletions(-) commit 9aa36e61dc6bf11d8ff46d6f177fb2e3a8fc5e91 Author: André Almeida Date: Thu Jun 13 11:06:13 2019 -0400 media: vimc: debayer: Fix typos Fix typo on "tranforming". Add a line break so it keeps under 80 columns. Fix typo on "[it] need". Signed-off-by: André Almeida Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vimc/vimc-debayer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 40208924b988888f786850fae42fb5ca880fab80 Author: Luca Ceresoli Date: Thu Jun 13 10:18:26 2019 -0400 media: docs: v4l2-controls: remove outdated paragraph This paragraph was added by commit a42b57f5aacf ("V4L/DVB: Documentation: add v4l2-controls.txt documenting the new controls API") back in 2010, when the controls API has been improved. Nowadays it is a bit anachronistic, so remove it. The same information is stated in up-to-date wording a few paragraphs later > You’re done! And this is sufficient for most of the drivers we have. No > need to do any validation of control values, or implement QUERYCTRL, > QUERY_EXT_CTRL and QUERYMENU. And G/S_CTRL as well as G/TRY/S_EXT_CTRLS > are automatically supported. Signed-off-by: Luca Ceresoli Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/kapi/v4l2-controls.rst | 5 ----- 1 file changed, 5 deletions(-) commit 025b941132352c6093cbb3a1f6760426e739dc79 Author: Luca Ceresoli Date: Thu Jun 13 10:18:25 2019 -0400 media: docs: v4l2-controls: document file to include The tutorial in this section is almost complete, add the one missing bit. Signed-off-by: Luca Ceresoli Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/kapi/v4l2-controls.rst | 4 ++++ 1 file changed, 4 insertions(+) commit 270c0024a368806a84a7e15d6024cbd232752c04 Author: Luca Ceresoli Date: Thu Jun 13 10:18:24 2019 -0400 media: docs: v4l2-controls: convert code blocks to C All these code blocks contain C code, enable C formatting for a nicer reading. Signed-off-by: Luca Ceresoli Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/kapi/v4l2-controls.rst | 74 +++++++++++++++--------------- 1 file changed, 37 insertions(+), 37 deletions(-) commit 6b623dbfbd4f940de45b66ec07582aed0462f6da Author: Luca Ceresoli Date: Thu Jun 13 10:18:23 2019 -0400 media: docs: v4l2-controls: add links to functions This section lacks links to functions. Add one to simplify reading. Signed-off-by: Luca Ceresoli Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/kapi/v4l2-controls.rst | 67 ++++++++++++++++-------------- 1 file changed, 35 insertions(+), 32 deletions(-) commit e36160b84253d7125d0fa4109a3d69f0c55fc5d0 Author: Luca Ceresoli Date: Thu Jun 13 10:18:22 2019 -0400 media: docs: v4l2-controls: rearrange control initialization sequence The code snippet showing how to add controls to the driver’s top-level struct is present twice, but only the second time it is split in the V4L2 and subdev cases. Consolidate everything at the beginning. Also remove the "Where foo->bar is of type struct baz" sentences, this obvious from the code. Signed-off-by: Luca Ceresoli Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/kapi/v4l2-controls.rst | 40 +++++++++++++----------------- 1 file changed, 17 insertions(+), 23 deletions(-) commit 9e75efb0f2c56c7285f28bba877da14f428a730c Author: Luca Ceresoli Date: Thu Jun 13 10:18:21 2019 -0400 media: docs: v4l2-controls: add links to structs This section lacks links to struct definitions. Add one where each struct is introduced. Signed-off-by: Luca Ceresoli Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/kapi/v4l2-controls.rst | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit e050f55207c547f78cd65758f148dd1b4404f133 Author: Luca Ceresoli Date: Thu Jun 13 10:18:20 2019 -0400 media: docs: v4l2-controls: fix indentation Fix indentation in example C code. Signed-off-by: Luca Ceresoli Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/extended-controls.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7239682847b5a7d2633f39ddea1c0c11a69d5fd3 Author: Luca Ceresoli Date: Thu Jun 13 10:18:19 2019 -0400 media: docs: v4l2-controls: remove repeated ioctl names Mentioning :ref:`VIDIOC_QUERYCTRL` renders all the three related ioctls. Explicitly adding VIDIOC_QUERY_EXT_CTRL and VIDIOC_QUERYMENU will make them render twice, so remove them Signed-off-by: Luca Ceresoli Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/extended-controls.rst | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit e08efef8fe7db87206314c19b341612c719f891a Author: Marek Szyprowski Date: Thu Jun 13 06:48:34 2019 -0400 media: s5p-mfc: Make additional clocks optional Since the beginning the second clock ('special', 'sclk') was optional and it is not available on some variants of Exynos SoCs (i.e. Exynos5420 with v7 of MFC hardware). However commit 1bce6fb3edf1 ("[media] s5p-mfc: Rework clock handling") made handling of all specified clocks mandatory. This patch restores original behavior of the driver and fixes its operation on Exynos5420 SoCs. Fixes: 1bce6fb3edf1 ("[media] s5p-mfc: Rework clock handling") Signed-off-by: Marek Szyprowski Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-mfc/s5p_mfc_pm.c | 5 +++++ 1 file changed, 5 insertions(+) commit fc47bf1147ecf55fe51181723dd52cbad53dd02b Author: Maxime Jourdan Date: Thu Jun 13 05:51:02 2019 -0400 media: MAINTAINERS: fix linux-media mailing list for meson drivers Both MESON AO CEC and MESON VIDEO DECODER point to the wrong linux-media mailing list. Update it to linux-media@vger.kernel.org. Signed-off-by: Maxime Jourdan Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ff3c65cb81157b7259250a1f68ddf13a43923ecb Author: Shuah Khan Date: Wed Jun 12 20:56:52 2019 -0400 media: videodev2.h: Fix shifting signed 32-bit value by 31 bits problem Fix v4l2_fourcc define to use "U" cast to avoid shifting signed 32-bit value by 31 bits problem. This isn't a problem for kernel builds with gcc. This could be problem since this header is part of public API which could be included for builds using compilers that don't handle this condition safely resulting in undefined behavior. Signed-off-by: Shuah Khan Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab include/uapi/linux/videodev2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5ca004d11bfa4f5705b2761b6de29f81914cf3fe Author: Shuah Khan Date: Wed Jun 12 20:56:20 2019 -0400 media: media.h: Fix shifting signed 32-bit value by 31 bits problem Fix MEDIA_ENT_ID_FLAG_NEXT to use "U" cast to avoid shifting signed 32-bit value by 31 bits problem. This isn't a problem for kernel builds with gcc. This could be problem since this header is part of public API which could be included for builds using compilers that don't handle this condition safely resulting in undefined behavior. Signed-off-by: Shuah Khan Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab include/uapi/linux/media.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a60b42c9218b3fdd33974c94e4c023d99191a114 Author: Niklas Söderlund Date: Wed Jun 12 19:45:47 2019 -0400 media: rcar-vin: Merge Gen2 and Gen3 file operations After the rework of the Gen2 file operations it's now trivial to merge the Gen2 and Gen3 versions. Signed-off-by: Niklas Söderlund Reviewed-by: Ulrich Hecht Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar-vin/rcar-v4l2.c | 102 ++++++---------------------- 1 file changed, 19 insertions(+), 83 deletions(-) commit a59846ce4f26530a457b5a25e7ea5647946ccd71 Author: Niklas Söderlund Date: Wed Jun 12 19:45:46 2019 -0400 media: rcar-vin: Fold rvin_initialize_device() into rvin_open() The function no longer serve a purpose as most tasks it performed have been refactored, fold what remains of it into the only caller. While at it add error checking for v4l2_ctrl_handler_setup(). Signed-off-by: Niklas Söderlund Reviewed-by: Ulrich Hecht Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar-vin/rcar-v4l2.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) commit e378faaa66f18a7a26b181574d5f4a7c25598a3f Author: Niklas Söderlund Date: Wed Jun 12 19:45:45 2019 -0400 media: rcar-vin: Merge helpers dealing with powering the parallel subdevice The two power helpers are now only dealing with the parallel subdevice, merge them into a single rvin_power_parallel() helper to reduce code duplication. Signed-off-by: Niklas Söderlund Reviewed-by: Ulrich Hecht Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar-vin/rcar-v4l2.c | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) commit 2a18fbec1dabf053f97365e7aa1ef64c69112618 Author: Niklas Söderlund Date: Wed Jun 12 19:45:44 2019 -0400 media: rcar-vin: Move pm_runtime_{get,put} out of helpers The helpers rvin_power_{on,off} deal with both VIN and the parallel subdevice power. This makes it hard to merge the Gen2 and Gen3 open/release functions. Move the VIN power handling directly to the open/release functions to prepare for the merge. Signed-off-by: Niklas Söderlund Reviewed-by: Ulrich Hecht Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar-vin/rcar-v4l2.c | 35 +++++++++++++++++------------ 1 file changed, 21 insertions(+), 14 deletions(-) commit 4e4ef86f522d36771396e96e2a6b7ac22cb2dae2 Author: Niklas Söderlund Date: Wed Jun 12 19:45:43 2019 -0400 media: rcar-vin: Do not sync subdevice format when opening the video device The format is already synced when the subdevice is bound, there is no need to do do it every time the video device is opened. Signed-off-by: Niklas Söderlund Reviewed-by: Ulrich Hecht Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar-vin/rcar-v4l2.c | 25 ------------------------- 1 file changed, 25 deletions(-) commit 11492ee7cbfec989caf319bc299f0004b8a23e01 Author: Niklas Söderlund Date: Wed Jun 12 19:45:42 2019 -0400 media: rcar-vin: Allow interrupting lock when trying to open the video device The user should be allowed to break waiting for the lock when opening the video device. Signed-off-by: Niklas Söderlund Reviewed-by: Ulrich Hecht Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar-vin/rcar-v4l2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit b2ef816c3db01f365448e8623c4f1d51cc2ba610 Author: Niklas Söderlund Date: Wed Jun 12 19:45:41 2019 -0400 media: rcar-vin: Remove unneeded calls to pm_runtime_{enable, disable} Runtime PM is already enabled unconditionally when the driver is probed and disabled when it's removed. There is no point in doing it again for Gen2 when opening and closing the video device. Signed-off-by: Niklas Söderlund Reviewed-by: Ulrich Hecht Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar-vin/rcar-v4l2.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit a244fabc15ffba245f80fd49ab486b9881e9e6de Author: Niklas Söderlund Date: Wed Jun 12 19:45:40 2019 -0400 media: rcar-vin: Do not call pm_runtime_{resume,suspend}() The driver does not implement runtime resume and suspend function so there is little point in trying to call them. This is a leftover from the drivers soc_camera beginnings. Signed-off-by: Niklas Söderlund Reviewed-by: Ulrich Hecht Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar-vin/rcar-v4l2.c | 5 ----- 1 file changed, 5 deletions(-) commit b2ce5617dad254230551feda3599f2cc68e53ad8 Author: Anders Roxell Date: Wed Jun 12 12:19:35 2019 -0400 media: i2c: fix warning same module names When building with CONFIG_VIDEO_ADV7511 and CONFIG_DRM_I2C_ADV7511 enabled as loadable modules, we see the following warning: drivers/gpu/drm/bridge/adv7511/adv7511.ko drivers/media/i2c/adv7511.ko Rework so that the file is named adv7511-v4l2.c. Signed-off-by: Anders Roxell Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/Makefile | 2 +- drivers/media/i2c/{adv7511.c => adv7511-v4l2.c} | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) commit 89a9f68883bbaba645352a90016f496d48c75be2 Author: Colin Ian King Date: Wed Jun 12 10:42:18 2019 -0400 media: staging: media: meson: remove redundant initialization of mpeg12 The pointer mpeg12 is being initialized however that value is never read and mpeg12 is being re-assigned almost immediately afterwards. Remove the redundant initialization. Signed-off-by: Colin Ian King Acked-by: Maxime Jourdan Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/meson/vdec/codec_mpeg12.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b046ec51f9bb53a63a61dbc11733879aa4c7004c Author: Eugen Hristev Date: Wed Jun 12 08:00:35 2019 -0400 media: atmel: atmel-isc: fix and cleanup potential bugs Fixed issues that can lead to potential bugs. Cleanup order in the driver Taking into consideration std control creation can fail mutex_destroy call changing controller_formats with const specifier some cosmetic cleanups Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/atmel/atmel-isc-base.c | 28 ++++++++++++++++-------- drivers/media/platform/atmel/atmel-isc.h | 2 +- drivers/media/platform/atmel/atmel-sama5d2-isc.c | 14 +++++++----- 3 files changed, 29 insertions(+), 15 deletions(-) commit 0a0e265515db7619d0da9331d74245d02c741f07 Author: Eugen Hristev Date: Wed Jun 12 08:00:31 2019 -0400 media: atmel: atmel-isc: split driver into driver base and isc This splits the Atmel ISC driver into a common base: atmel-isc-base.c and the driver probe/dt part , atmel-sama5d2-isc.c This is needed to keep a common ground for the sensor controller which will be reused. The atmel-isc will use the common symbols inside the atmel-isc-base Future driver will also use the same symbols and redefine different aspects, for a different version of the ISC. This is done to avoid complete code duplication by creating a totally different driver for the new variant of the ISC. Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil [hverkuil-cisco@xs4all.nl: folded 'atmel: atmel-sama5d2-isc: fixed checkpatch warnings' into this patch] Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 4 +- drivers/media/platform/atmel/Makefile | 4 +- .../atmel/{atmel-isc.c => atmel-isc-base.c} | 522 +-------------------- drivers/media/platform/atmel/atmel-isc.h | 249 ++++++++++ drivers/media/platform/atmel/atmel-sama5d2-isc.c | 344 ++++++++++++++ 5 files changed, 621 insertions(+), 502 deletions(-) commit ddce3b94715ca5a19a107cd7c1d89fea177d2454 Author: Theodore Ts'o Date: Fri Jun 21 16:31:47 2019 -0400 ext4: refactor initialize_dirent_tail() Move the calculation of the location of the dirent tail into initialize_dirent_tail(). Also prefix the function with ext4_ to fix kernel namepsace polution. Signed-off-by: Theodore Ts'o fs/ext4/ext4.h | 4 ++-- fs/ext4/inline.c | 9 +++------ fs/ext4/namei.c | 54 +++++++++++++++++++++--------------------------------- 3 files changed, 26 insertions(+), 41 deletions(-) commit e0c76a7d3428824c4f360982efcfa085d8d7fb85 Author: Rui Miguel Silva Date: Wed Jun 12 06:00:28 2019 -0400 media: imx7-media-csi: get csi upstream endpoint When the upstream endpoint is neither a mux nor a CSI2 module, just get the source pad directly upstream from the CSI. Reported-by: Sebastien Szymanski Signed-off-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 13d93380fca826e49c42e8d83fc8a077cabbe6b8 Author: Tomasz Figa Date: Wed Jun 12 05:36:48 2019 -0400 media: Clarify the meaning of file descriptors in VIDIOC_DQBUF When the application calls VIDIOC_DQBUF with the DMABUF memory type, the v4l2_buffer structure (or v4l2_plane structures) are filled with DMA-buf file descriptors. However, the current documentation does not explain whether those are new file descriptors referring to the same DMA-bufs or just the same integers as passed to VIDIOC_QBUF back in time. Clarify the documentation that it's the latter. Signed-off-by: Tomasz Figa Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/vidioc-qbuf.rst | 8 ++++++++ 1 file changed, 8 insertions(+) commit ababd7612321bbe89abc87c607ca8d70702d9e56 Author: Ezequiel Garcia Date: Mon Jun 10 16:55:25 2019 -0400 media: sti: Use vb2_get_buffer Use the newly introduced vb2_get_buffer API and avoid accessing buffers in the queue directly. Signed-off-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/sti/hva/hva-v4l2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 9e393300167be4d0c6a6d17330de1fba9a675212 Author: Ezequiel Garcia Date: Mon Jun 10 16:55:24 2019 -0400 media: mtk-vcodec: Use vb2_get_buffer Use the newly introduced vb2_get_buffer API and avoid accessing buffers in the queue directly. Signed-off-by: Ezequiel Garcia Signed-off-by: Hans Verkuil [hverkuil-cisco@xs4all.nl: fixed checkpatch alignment warning] Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 8eebd6150aa5232d4b47b9f0cc33c76b2bf3b06a Author: Ezequiel Garcia Date: Mon Jun 10 16:55:23 2019 -0400 media: mtk-jpeg: Use vb2_get_buffer Use the newly introduced vb2_get_buffer API and avoid accessing buffers in the queue directly. Signed-off-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3dd8c097541794c82913092030ad22f8a4cafec1 Author: Ezequiel Garcia Date: Mon Jun 10 16:55:22 2019 -0400 media: vb2: Introduce a vb2_get_buffer accessor Some drivers need to access a vb2 buffer from its queue index. Introduce an accessor to abstract this, and avoid drivers from accessing private members. Reviewed-by: Boris Brezillon Signed-off-by: Ezequiel Garcia Acked-by: Marek Szyprowski Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab include/media/videobuf2-core.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit a84e355ecd3ed9759d7aaa40170aab78e2a68a06 Author: Colin Ian King Date: Sat Jun 8 07:27:25 2019 -0400 media: staging: davinci: fix memory leaks and check for allocation failure There are three error return paths that don't kfree params causing a memory leak. Fix this by adding an error return path that kfree's params before returning. Also add a check to see params failed to be allocated. Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/davinci_vpfe/dm365_ipipe.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 94b5bf3ac9c4b34a2b1516772c63fb94da6ad5d3 Author: Dan Carpenter Date: Fri Jun 7 09:56:09 2019 -0400 media: hantro: remove an unnecessary NULL check Thus the address of "&ctx->dev->variant->codec_ops[codec_mode]" can't possibly be NULL. Signed-off-by: Dan Carpenter Reviewed-by: Boris Brezillon [hverkuil-cisco@xs4all.nl: rebased after rockchip/vpu -> hantro rename] Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/hantro/hantro_v4l2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4b1f67dc8edcb4a1e8a1d141609d89fa7d430d46 Author: Ezequiel Garcia Date: Thu Jun 6 12:12:53 2019 -0400 media: v4l2-ctrl: Initialize _BUTTON and _CTRL_CLASS These two control types don't really need a default value, as they are not expected to carry any value. However, it's slightly clearer to initialize them explicitly instead of falling back to the switch default. Signed-off-by: Ezequiel Garcia Reviewed-by: Boris Brezillon Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-ctrls.c | 4 ++++ 1 file changed, 4 insertions(+) commit 882f261874c9aa3792e37d631342e84c84766dd0 Merge: 5c4c8b4a9990 9e0babf2c06c Author: Mauro Carvalho Chehab Date: Fri Jun 21 16:09:25 2019 -0400 Merge tag 'v5.2-rc5' into patchwork Linux 5.2-rc5 There are some media fixes on -rc5, so merge from it at media devel tree. * tag 'v5.2-rc5': (210 commits) Linux 5.2-rc5 x86/microcode, cpuhotplug: Add a microcode loader CPU hotplug callback Smack: Restore the smackfsdef mount option and add missing prefixes ftrace: Fix NULL pointer dereference in free_ftrace_func_mapper() module: Fix livepatch/ftrace module text permissions race tracing/uprobe: Fix obsolete comment on trace_uprobe_create() tracing/uprobe: Fix NULL pointer dereference in trace_uprobe_create() tracing: Make two symbols static tracing: avoid build warning with HAVE_NOP_MCOUNT tracing: Fix out-of-range read in trace_stack_print() gfs2: Fix rounding error in gfs2_iomap_page_prepare x86/kasan: Fix boot with 5-level paging and KASAN timekeeping: Repair ktime_get_coarse*() granularity Revert "ALSA: hda/realtek - Improve the headset mic for Acer Aspire laptops" mm/devm_memremap_pages: fix final page put race PCI/P2PDMA: track pgmap references per resource, not globally lib/genalloc: introduce chunk owners PCI/P2PDMA: fix the gen_pool_add_virt() failure path mm/devm_memremap_pages: introduce devm_memunmap_pages drivers/base/devres: introduce devm_release_action() ... commit f036adb39976467cf57f577490269594994f9eb4 Author: Theodore Ts'o Date: Fri Jun 21 15:49:26 2019 -0400 ext4: rename "dirent_csum" functions to use "dirblock" Functions such as ext4_dirent_csum_verify() and ext4_dirent_csum_set() don't actually operate on a directory entry, but a directory block. And while they take a struct ext4_dir_entry *dirent as an argument, it had better be the first directory at the beginning of the direct block, or things will go very wrong. Rename the following functions so that things make more sense, and remove a lot of confusing casts along the way: ext4_dirent_csum_verify -> ext4_dirblock_csum_verify ext4_dirent_csum_set -> ext4_dirblock_csum_set ext4_dirent_csum -> ext4_dirblock_csum ext4_handle_dirty_dirent_node -> ext4_handle_dirty_dirblock Signed-off-by: Theodore Ts'o fs/ext4/dir.c | 3 +-- fs/ext4/ext4.h | 9 ++++---- fs/ext4/inline.c | 2 +- fs/ext4/namei.c | 62 ++++++++++++++++++++++++++------------------------------ 4 files changed, 35 insertions(+), 41 deletions(-) commit 5c4c8b4a999019f19e770cb55cbacb89c95897bd Author: Sean Young Date: Thu Jun 13 04:49:26 2019 -0400 media: rc: IR signal for Panasonic air conditioner too long The IR signal to control the Panasonic ACXA75C00600 air conditioner has 439 pulse/spaces. Increase limit to make it possible to transmit signal. Reported-by: Takashi Kanamaru Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/lirc_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 12e23ebb396e6ffea88b8c5e483059a297326afb Author: YueHaibing Date: Thu Jun 13 11:23:19 2019 -0400 media: ttpci: Fix build error without RC_CORE If RC_CORE is not set, building fails: Reported-by: Hulk Robot Suggested-by: Sean Young Signed-off-by: YueHaibing Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ttpci/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit efe8b031d8eb92ef8c68efd05ca5c11a1050619a Author: Colin Ian King Date: Tue Jun 11 11:38:12 2019 -0400 media: stv090x: fix double free on state object There two callers of stv090x_setup_compound manage the allocation and freeing if state there is an error condition from stv090x_setup_compound. Currently function stv090x_setup_compound also frees the state object too, leading to a double free in the callers of this function. Fix this by removing the extraneous free in stv090x_setup_compound and just leave the callers handle the allocation/free'ing. Signed-off-by: Colin Ian King Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/stv090x.c | 1 - 1 file changed, 1 deletion(-) commit 12869ecd5eef299cf3745bbeb9c6ce37f3b52cb3 Author: Rob Herring Date: Fri Jun 21 08:18:32 2019 -0600 scripts/dtc: Update to upstream version v1.5.0-30-g702c1b6c0e73 Pull in SPDX tag conversion from upstream dtc. This will replace the conversion done in the kernel tree copy in v5.2-rc2. This adds the following commits from upstream: 702c1b6c0e73 README.license: Update to reflect SPDX tag usage 4097bbffcf1d dtc: Add GPLv2 SPDX tags to files missing license text 94f87cd5b7c5 libfdt: Add dual GPL/BSD SPDX tags to files missing license text c4ffc05574b1 tests: Replace license boilerplate with SPDX tags a5ac29baacd2 pylibfdt: Replace dual GPLv2/BSD license boilerplate with SPDX tags 7fb0f4db2eb7 libfdt: Replace GPL/BSD boilerplate/reference with SPDX tags acfe84f2c47e dtc: Replace GPLv2 boilerplate/reference with SPDX tags Reviewed-by: Greg Kroah-Hartman Signed-off-by: Rob Herring scripts/dtc/Makefile.dtc | 1 + scripts/dtc/checks.c | 17 +------------ scripts/dtc/data.c | 17 +------------ scripts/dtc/dtc-lexer.l | 17 +------------ scripts/dtc/dtc-parser.y | 17 +------------ scripts/dtc/dtc.c | 17 +------------ scripts/dtc/dtc.h | 17 +------------ scripts/dtc/flattree.c | 17 +------------ scripts/dtc/fstree.c | 17 +------------ scripts/dtc/libfdt/Makefile.libfdt | 1 + scripts/dtc/libfdt/fdt.c | 47 +----------------------------------- scripts/dtc/libfdt/fdt.h | 47 +----------------------------------- scripts/dtc/libfdt/fdt_addresses.c | 47 +----------------------------------- scripts/dtc/libfdt/fdt_empty_tree.c | 47 +----------------------------------- scripts/dtc/libfdt/fdt_overlay.c | 47 +----------------------------------- scripts/dtc/libfdt/fdt_ro.c | 47 +----------------------------------- scripts/dtc/libfdt/fdt_rw.c | 47 +----------------------------------- scripts/dtc/libfdt/fdt_strerror.c | 46 +---------------------------------- scripts/dtc/libfdt/fdt_sw.c | 47 +----------------------------------- scripts/dtc/libfdt/fdt_wip.c | 47 +----------------------------------- scripts/dtc/libfdt/libfdt.h | 47 +----------------------------------- scripts/dtc/libfdt/libfdt_env.h | 47 +----------------------------------- scripts/dtc/libfdt/libfdt_internal.h | 47 +----------------------------------- scripts/dtc/livetree.c | 17 +------------ scripts/dtc/srcpos.c | 16 +----------- scripts/dtc/srcpos.h | 16 +----------- scripts/dtc/treesource.c | 17 +------------ scripts/dtc/util.c | 16 +----------- scripts/dtc/util.h | 16 +----------- scripts/dtc/version_gen.h | 2 +- scripts/dtc/yamltree.c | 16 +----------- 31 files changed, 31 insertions(+), 833 deletions(-) commit 24d2c73ff28bcda48607eacc4bc804002dbf78d9 Author: Arnd Bergmann Date: Wed Jun 19 14:55:29 2019 +0200 ARM: exynos: Only build MCPM support if used We get a link error for configurations that enable an Exynos SoC that does not require MCPM, but then manually enable MCPM anyway without also turning on the arm-cci: arch/arm/mach-exynos/mcpm-exynos.o: In function `exynos_pm_power_up_setup': mcpm-exynos.c:(.text+0x8): undefined reference to `cci_enable_port_for_self' Change it back to only build the code we actually need, by introducing a CONFIG_EXYNOS_MCPM that serves the same purpose as the older CONFIG_EXYNOS5420_MCPM. Fixes: 2997520c2d4e ("ARM: exynos: Set MCPM as mandatory for Exynos542x/5800 SoCs") Signed-off-by: Arnd Bergmann Signed-off-by: Krzysztof Kozlowski arch/arm/mach-exynos/Kconfig | 6 +++++- arch/arm/mach-exynos/Makefile | 2 +- arch/arm/mach-exynos/suspend.c | 6 +++--- 3 files changed, 9 insertions(+), 5 deletions(-) commit 5043a9643fe65347badf33dca9e045d991e9c049 Author: Wang Shilong Date: Thu Jun 13 16:29:53 2019 +0900 f2fs: only set project inherit bit for directory It doesn't make any sense to have project inherit bits for regular files, even though this won't cause any problem, but it is better fix this. Cc: Andreas Dilger Signed-off-by: Wang Shilong Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 2 +- fs/f2fs/inode.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) commit 360985573b556db415daf93e34ce103ec0ee1fe5 Author: Eric Biggers Date: Tue Jun 4 22:59:04 2019 -0700 f2fs: separate f2fs i_flags from fs_flags and ext4 i_flags f2fs copied all the on-disk i_flags from ext4, and along with it the assumption that the on-disk i_flags are the same as the bits used by FS_IOC_GETFLAGS and FS_IOC_SETFLAGS. This is problematic because reserving an on-disk inode flag in either filesystem's i_flags or in these ioctls effectively reserves it in all the other places too. In fact, most of the "f2fs i_flags" are not used by f2fs at all. Fix this by separating f2fs's i_flags from the ioctl bits and ext4's i_flags. In the process, un-reserve all "f2fs i_flags" that aren't actually supported by f2fs. This included various flags that were not settable at all, as well as various flags that were settable by FS_IOC_SETFLAGS but didn't actually do anything. There's a slight chance we'll need to add some flag(s) back to FS_IOC_SETFLAGS in order to avoid breaking users who expect f2fs to accept some random flag(s). But hopefully such users don't exist. Signed-off-by: Eric Biggers Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 42 +--------- fs/f2fs/file.c | 239 ++++++++++++++++++++++++++++++++++++++------------------- 2 files changed, 163 insertions(+), 118 deletions(-) commit 176ef3c4dea3d9d6f7e7fd9a44feac3cd0c78be7 Author: Kimberly Brown Date: Fri Jun 7 13:40:41 2019 -0400 f2fs: replace ktype default_attrs with default_groups The kobj_type default_attrs field is being replaced by the default_groups field. Replace the default_attrs fields in f2fs_sb_ktype and f2fs_feat_ktype with default_groups. Use the ATTRIBUTE_GROUPS macro to create f2fs_groups and f2fs_feat_groups. Fixes: fef4129ec2e6 ("f2fs: fix to be aware discard/preflush/dio command in is_idle()") Signed-off-by: Kimberly Brown Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/sysfs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 166da5c5462f4cf299e0daa47c7384617c1699d7 Author: Krzysztof Kozlowski Date: Tue Jun 4 10:01:24 2019 +0200 x86/defconfigs: Remove useless UEVENT_HELPER_PATH Remove the CONFIG_UEVENT_HELPER_PATH because: 1. It is disabled since commit 1be01d4a5714 ("driver: base: Disable CONFIG_UEVENT_HELPER by default") as its dependency (UEVENT_HELPER) was made default to 'n', 2. It is not recommended (help message: "This should not be used today [...] creates a high system load") and was kept only for ancient userland, 3. Certain userland specifically requests it to be disabled (systemd README: "Legacy hotplug slows down the system and confuses udev"). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Borislav Petkov Acked-by: Geert Uytterhoeven Cc: Adam Borowski Cc: "Ahmed S. Darwish" Cc: Alexey Brodkin Cc: Andrew Morton Cc: Ard Biesheuvel Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Masahiro Yamada Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/1559635284-21696-1-git-send-email-krzk@kernel.org arch/x86/configs/i386_defconfig | 1 - arch/x86/configs/x86_64_defconfig | 1 - 2 files changed, 2 deletions(-) commit dbb5281a1f84b2f93032d4864c211ce8a20811a7 Author: Stephen Suryaputra Date: Thu Jun 20 12:19:59 2019 -0400 netfilter: nf_tables: add support for matching IPv4 options This is the kernel change for the overall changes with this description: Add capability to have rules matching IPv4 options. This is developed mainly to support dropping of IP packets with loose and/or strict source route route options. Signed-off-by: Stephen Suryaputra Signed-off-by: Pablo Neira Ayuso include/uapi/linux/netfilter/nf_tables.h | 2 + net/ipv4/ip_options.c | 1 + net/netfilter/nft_exthdr.c | 133 +++++++++++++++++++++++++++++++ 3 files changed, 136 insertions(+) commit c31b11c3eb4d41df4038b0441b15f3f0b2fca5d4 Author: Krzysztof Kozlowski Date: Tue Jun 18 21:07:32 2019 +0200 ARM: dts: exynos: Fix language typo and indentation Correct language typo and wrong indentation. Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos4210.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4850f26abfcac9ed28a4db5817b46dc0bfbbbae0 Author: Daniel M German Date: Fri Jun 21 08:22:40 2019 -0700 usb: clean up some of the computations in adu_read Replace ?: with min to calculate the number of bytes in the secondary buffer, including changing the data type of data_in_secondary to size_t to be type-consistent. data_in_secondary can never be negative. Remove some spurious calculations (copy_to_user returns zero on success), making one variable redundant (i) This change does not alter the functionality of the code. Signed-off-by: Daniel M German Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/adutux.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 4b06843d404855063decbccd206d3dc927280b0c Author: Firas Jahjah Date: Thu Jun 13 12:10:14 2019 +0300 RDMA/efa: Print address on AH creation failure For debugging purposes, print destination address if failed to create AH. Signed-off-by: Firas Jahjah Reviewed-by: Yossi Leybovich Signed-off-by: Gal Pressman Signed-off-by: Doug Ledford drivers/infiniband/hw/efa/efa_com_cmd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b41f75724ab8aeeba1001e63c31db8623432f001 Author: Gal Pressman Date: Thu Jun 13 12:10:13 2019 +0300 RDMA/efa: Be consistent with success flow return value The EFA driver is written with success oriented flows in mind, meaning that functions should mostly end with a return 0 statement. Error flows return their error value on their own instead of assuming that the function will return the error at the end. This commit fixes a bunch of functions that were not aligned with this behavior. Reviewed-by: Firas JahJah Reviewed-by: Yossi Leybovich Signed-off-by: Gal Pressman Signed-off-by: Doug Ledford drivers/infiniband/hw/efa/efa_com_cmd.c | 4 ++-- drivers/infiniband/hw/efa/efa_main.c | 2 +- drivers/infiniband/hw/efa/efa_verbs.c | 6 ++++-- 3 files changed, 7 insertions(+), 5 deletions(-) commit 40ddb3f020834f9afb7aab31385994811f4db259 Author: Gal Pressman Date: Thu Jun 13 12:10:12 2019 +0300 RDMA/efa: Use API to get contiguous memory blocks aligned to device supported page size Use the ib_umem_find_best_pgsz() and rdma_for_each_block() API when registering an MR instead of coding it in the driver. ib_umem_find_best_pgsz() is used to find the best suitable page size which replaces the existing efa_cont_pages() implementation. rdma_for_each_block() is used to iterate the umem in aligned contiguous memory blocks. Reviewed-by: Firas JahJah Reviewed-by: Yossi Leybovich Reviewed-by: Shiraz Saleem Signed-off-by: Gal Pressman Signed-off-by: Doug Ledford drivers/infiniband/hw/efa/efa_verbs.c | 88 +++++++++-------------------------- 1 file changed, 21 insertions(+), 67 deletions(-) commit de1033881e936382d67ae47073a7092554729d74 Author: Michael Mei Date: Mon May 27 17:04:47 2019 +0800 arm64: dts: mt8183: add efuse and Mediatek Chip id node to read support for reading chip ID and efuse Signed-off-by: Michael Mei Signed-off-by: Erin Lo Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8183.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 8e2dd0f9249119e0084de4b75855359efe3fb5cc Author: Erin Lo Date: Mon May 27 17:04:46 2019 +0800 arm64: dts: mt8183: add spi node Add spi DTS node to the mt8183 and mt8183-evb. Signed-off-by: Mengqi Zhang Signed-off-by: Erin Lo Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8183-evb.dts | 105 ++++++++++++++++++++++++++++ arch/arm64/boot/dts/mediatek/mt8183.dtsi | 78 +++++++++++++++++++++ 2 files changed, 183 insertions(+) commit cf47a0b882a4e5f6b34c7949d7b293e9287f1972 Author: Julian Anastasov Date: Tue Jun 4 21:56:35 2019 +0300 ipvs: defer hook registration to avoid leaks syzkaller reports for memory leak when registering hooks [1] As we moved the nf_unregister_net_hooks() call into __ip_vs_dev_cleanup(), defer the nf_register_net_hooks() call, so that hooks are allocated and freed from same pernet_operations (ipvs_core_dev_ops). [1] BUG: memory leak unreferenced object 0xffff88810acd8a80 (size 96): comm "syz-executor073", pid 7254, jiffies 4294950560 (age 22.250s) hex dump (first 32 bytes): 02 00 00 00 00 00 00 00 50 8b bb 82 ff ff ff ff ........P....... 00 00 00 00 00 00 00 00 00 77 bb 82 ff ff ff ff .........w...... backtrace: [<0000000013db61f1>] kmemleak_alloc_recursive include/linux/kmemleak.h:55 [inline] [<0000000013db61f1>] slab_post_alloc_hook mm/slab.h:439 [inline] [<0000000013db61f1>] slab_alloc_node mm/slab.c:3269 [inline] [<0000000013db61f1>] kmem_cache_alloc_node_trace+0x15b/0x2a0 mm/slab.c:3597 [<000000001a27307d>] __do_kmalloc_node mm/slab.c:3619 [inline] [<000000001a27307d>] __kmalloc_node+0x38/0x50 mm/slab.c:3627 [<0000000025054add>] kmalloc_node include/linux/slab.h:590 [inline] [<0000000025054add>] kvmalloc_node+0x4a/0xd0 mm/util.c:431 [<0000000050d1bc00>] kvmalloc include/linux/mm.h:637 [inline] [<0000000050d1bc00>] kvzalloc include/linux/mm.h:645 [inline] [<0000000050d1bc00>] allocate_hook_entries_size+0x3b/0x60 net/netfilter/core.c:61 [<00000000e8abe142>] nf_hook_entries_grow+0xae/0x270 net/netfilter/core.c:128 [<000000004b94797c>] __nf_register_net_hook+0x9a/0x170 net/netfilter/core.c:337 [<00000000d1545cbc>] nf_register_net_hook+0x34/0xc0 net/netfilter/core.c:464 [<00000000876c9b55>] nf_register_net_hooks+0x53/0xc0 net/netfilter/core.c:480 [<000000002ea868e0>] __ip_vs_init+0xe8/0x170 net/netfilter/ipvs/ip_vs_core.c:2280 [<000000002eb2d451>] ops_init+0x4c/0x140 net/core/net_namespace.c:130 [<000000000284ec48>] setup_net+0xde/0x230 net/core/net_namespace.c:316 [<00000000a70600fa>] copy_net_ns+0xf0/0x1e0 net/core/net_namespace.c:439 [<00000000ff26c15e>] create_new_namespaces+0x141/0x2a0 kernel/nsproxy.c:107 [<00000000b103dc79>] copy_namespaces+0xa1/0xe0 kernel/nsproxy.c:165 [<000000007cc008a2>] copy_process.part.0+0x11fd/0x2150 kernel/fork.c:2035 [<00000000c344af7c>] copy_process kernel/fork.c:1800 [inline] [<00000000c344af7c>] _do_fork+0x121/0x4f0 kernel/fork.c:2369 Reported-by: syzbot+722da59ccb264bc19910@syzkaller.appspotmail.com Fixes: 719c7d563c17 ("ipvs: Fix use-after-free in ip_vs_in") Signed-off-by: Julian Anastasov Acked-by: Simon Horman Signed-off-by: Pablo Neira Ayuso net/netfilter/ipvs/ip_vs_core.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit eb59b35331469f3348ef09743fd425318fd0aac5 Author: Zhiyong Tao Date: Mon May 27 17:04:45 2019 +0800 arm64: dts: mt8183: Add auxadc device node Add auxadc device node for MT8183 Signed-off-by: Zhiyong Tao Signed-off-by: Erin Lo Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8183-evb.dts | 4 ++++ arch/arm64/boot/dts/mediatek/mt8183.dtsi | 10 ++++++++++ 2 files changed, 14 insertions(+) commit da719a3567a31a0e6a01d6c4f931f50d72ff228a Author: Zhiyong Tao Date: Mon May 27 17:04:44 2019 +0800 arm64: dts: mt8183: add pinctrl device node The commit adds pinctrl device node for mt8183 Signed-off-by: Zhiyong Tao Signed-off-by: Erin Lo Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8183.dtsi | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit cc216dfd5615f9ba1abe14c1d5e19b21ac1e1e95 Author: Hsin-Yi, Wang Date: Mon May 27 17:04:43 2019 +0800 arm64: dts: mt8183: add capacity-dmips-mhz Pinned the frequency to the max and run dhrystone to get the value. little cpu: 11071 (max freq: 1989000) big cpu: 15293 (max freq: 1989000) 11071 : 15293 ~= 741 : 1024 Signed-off-by: Erin Lo Signed-off-by: Hsin-Yi Wang Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8183.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit f76c7bfca4326140d86ab86168214ef447177bc0 Author: Fernando Fernandez Mancera Date: Thu Jun 20 20:01:59 2019 +0200 netfilter: synproxy: fix manual bump of the reference counter This operation is handled by nf_synproxy_ipv4_init() now. Fixes: d7f9b2f18eae ("netfilter: synproxy: extract SYNPROXY infrastructure from {ipt, ip6t}_SYNPROXY") Signed-off-by: Fernando Fernandez Mancera Signed-off-by: Pablo Neira Ayuso net/ipv4/netfilter/ipt_SYNPROXY.c | 1 - 1 file changed, 1 deletion(-) commit 29099462354fdfa601f8d08dd5664bdfa4f1eaec Author: wenxu Date: Wed Jun 19 22:35:07 2019 +0800 netfilter: bridge: Fix non-untagged fragment packet ip netns exec ns1 ip a a dev eth0 10.0.0.7/24 ip netns exec ns2 ip link a link eth0 name vlan type vlan id 200 ip netns exec ns2 ip a a dev vlan 10.0.0.8/24 ip l add dev br0 type bridge vlan_filtering 1 brctl addif br0 veth1 brctl addif br0 veth2 bridge vlan add dev veth1 vid 200 pvid untagged bridge vlan add dev veth2 vid 200 A two fragment packet sent from ns2 contains the vlan tag 200. In the bridge conntrack, this packet will defrag to one skb with fraglist. When the packet is forwarded to ns1 through veth1, the first skb vlan tag will be cleared by the "untagged" flags. But the vlan tag in the second skb is still tagged, so the second fragment ends up with tag 200 to ns1. So if the first fragment packet doesn't contain the vlan tag, all of the remain should not contain vlan tag. Fixes: 3c171f496ef5 ("netfilter: bridge: add connection tracking system") Signed-off-by: wenxu Acked-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/bridge/netfilter/nf_conntrack_bridge.c | 2 ++ 1 file changed, 2 insertions(+) commit 43a38c3f318082839d7e613352d4dae7bbdfcdec Author: Arnd Bergmann Date: Mon Jun 17 15:15:04 2019 +0200 netfilter: fix nf_conntrack_bridge/ipv6 link error When CONFIG_IPV6 is disabled, the bridge netfilter code produces a link error: ERROR: "br_ip6_fragment" [net/bridge/netfilter/nf_conntrack_bridge.ko] undefined! ERROR: "nf_ct_frag6_gather" [net/bridge/netfilter/nf_conntrack_bridge.ko] undefined! The problem is that it assumes that whenever IPV6 is not a loadable module, we can call the functions direction. This is clearly not true when IPV6 is disabled. There are two other functions defined like this in linux/netfilter_ipv6.h, so change them all the same way. Fixes: 764dd163ac92 ("netfilter: nf_conntrack_bridge: add support for IPv6") Signed-off-by: Arnd Bergmann Signed-off-by: Pablo Neira Ayuso include/linux/netfilter_ipv6.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 4056e79faa2dc8352634b594991b4b210d724e6f Author: Mauro Carvalho Chehab Date: Fri Jun 21 06:54:25 2019 -0300 ABI: sysfs-driver-mlxreg-io: fix the what fields The author of this file should be given an award for creativity: the What: fields on this file technically fulfills the description at README. Yet, the way it is, it can't be parsed on a script, and if someone would try to do something like: grep hwmon*/jtag_enable It wouldn't find anything. Fix the What fields in a way that it can be parseable by a script and other search tools. Signed-off-by: Mauro Carvalho Chehab Acked-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman Documentation/ABI/stable/sysfs-driver-mlxreg-io | 45 +++++++++++-------------- 1 file changed, 19 insertions(+), 26 deletions(-) commit ecb351f1c4475d11ce6b4fa443fe71764027d409 Author: Mauro Carvalho Chehab Date: Thu Jun 20 14:23:10 2019 -0300 doc: ABI scripts: add a SPDX header file released under GPL v2. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman scripts/get_abi.pl | 1 + 1 file changed, 1 insertion(+) commit 7ce7b89bf565b4e86d37fd32577272e98d3359cd Author: Mauro Carvalho Chehab Date: Thu Jun 20 14:23:04 2019 -0300 scripts/get_abi.pl: add a validate command Sometimes, we just want the parser to retrieve all symbols from ABI, in order to check for parsing errors. So, add a new "validate" command. While here, update the man/help pages. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman scripts/get_abi.pl | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 2c0700e7afa40330f2d21defe2a7bffcb0eecb1e Author: Mauro Carvalho Chehab Date: Thu Jun 20 14:23:03 2019 -0300 scripts/get_abi.pl: add a handler for invalid "where" tag The ABI README file doesn't provide any meaning for a Where: tag. Yet, a few ABI symbols use it. So, make the parser handle it, emitting a warning. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman scripts/get_abi.pl | 6 ++++++ 1 file changed, 6 insertions(+) commit 2e7ce05593b39f0a947819ca8b73f2185f372f12 Author: Mauro Carvalho Chehab Date: Thu Jun 20 14:23:02 2019 -0300 scripts/get_abi.pl: avoid creating duplicate names The file the Documentation/ABI/testing/sysfs-class-power has voltage_min, voltage_max and voltage_now symbols duplicated. They are defined first for "General Properties" and then for "USB Properties". This cause those warnings: get_abi.pl rest --dir $srctree/Documentation/ABI/testing:26933: WARNING: Duplicate explicit target name: "abi_sys_class_power_supply_supply_name_voltage_max". get_abi.pl rest --dir $srctree/Documentation/ABI/testing:26968: WARNING: Duplicate explicit target name: "abi_sys_class_power_supply_supply_name_voltage_min". get_abi.pl rest --dir $srctree/Documentation/ABI/testing:27008: WARNING: Duplicate explicit target name: "abi_sys_class_power_supply_supply_name_voltage_now". And, as the references are not valid, it will also generate warnings about links to undefined references. Fix it by storing labels into a hash table and, when a duplicated one is found, appending random characters at the end. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman scripts/get_abi.pl | 9 +++++++++ 1 file changed, 9 insertions(+) commit 7d7ea8d2409fca0796f87676e489ed4ac0690a1b Author: Mauro Carvalho Chehab Date: Thu Jun 20 14:23:01 2019 -0300 scripts/get_abi.pl: fix parse issues with some files A few files are failing to parse: Documentation/ABI/testing/sysfs-bus-pci-devices-aer_stats Documentation/ABI/testing/sysfs-class-pktcdvd Documentation/ABI/testing/sysfs-bus-nfit On all three files, the problem is that there is a ":" character at the initial file description. Improve the parse in order to handle those special cases. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman scripts/get_abi.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 45f965179560f26227d87641da0d055d5751f49f Author: Mauro Carvalho Chehab Date: Thu Jun 20 14:23:00 2019 -0300 scripts/get_abi.pl: represent what in tables Several entries at the ABI have multiple What: with the same description. Instead of showing those symbols as sections, let's show them as tables. That makes easier to read on the final output, and avoid too much recursion at Sphinx parsing. We need to put file references at the end, as we don't want non-file tables to be mangled with other entries. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman scripts/get_abi.pl | 41 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 36 insertions(+), 5 deletions(-) commit 33e3e9913e22481fd90fa0c50d4a04dded0ee1e1 Author: Mauro Carvalho Chehab Date: Thu Jun 20 14:22:59 2019 -0300 scripts/get_abi.pl: add support for searching for ABI symbols Change its syntax to allow switching between ReST output mode and a new search mode, with allows to seek for ABI symbols using regex. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman scripts/get_abi.pl | 112 ++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 103 insertions(+), 9 deletions(-) commit d0ebaf51d219b63f87f3dc1da4c9da501d0519a4 Author: Mauro Carvalho Chehab Date: Thu Jun 20 14:22:58 2019 -0300 scripts/get_abi.pl: split label naming from xref logic Instead of using a ReST compilant label while parsing, move the label to ReST output. That makes the parsing logic more generic, allowing it to provide other types of output. As a side effect, now all files used to generate the output will be output. We can later add command line arguments to filter. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman scripts/get_abi.pl | 94 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 53 insertions(+), 41 deletions(-) commit 4e6a6234da84496c6173ebe991060fe382ec4f15 Author: Mauro Carvalho Chehab Date: Thu Jun 20 14:22:57 2019 -0300 scripts/get_abi.pl: avoid use literal blocks when not needed The usage of literal blocks make the document very complex, causing the browser to take a long time to load. On most ABI descriptions, they're a plain text, and don't require a literal block. So, add a logic there with identifies when a literal block is needed. As, on literal blocks, we need to respect the original document space, the most complex part of this patch is to preserve the original spacing where needed. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman scripts/get_abi.pl | 102 ++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 77 insertions(+), 25 deletions(-) commit 6619c6617a88e3b5e35b12aed069aabe35c370e0 Author: Mauro Carvalho Chehab Date: Thu Jun 20 14:22:56 2019 -0300 scripts/get_abi.pl: parse files with text at beginning It sounds usefult o parse files with has some text at the beginning. Add support for it. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman scripts/get_abi.pl | 59 +++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 54 insertions(+), 5 deletions(-) commit bbc249f2b85916da489111f6d33bf1da2be444bb Author: Mauro Carvalho Chehab Date: Thu Jun 20 14:22:55 2019 -0300 scripts: add an script to parse the ABI files Add a script to parse the Documentation/ABI files and produce an output with all entries inside an ABI (sub)directory. Right now, it outputs its contents on ReST format. It shouldn't be hard to make it produce other kind of outputs, since the ABI file parser is implemented in separate than the output generator. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman scripts/get_abi.pl | 212 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 212 insertions(+) commit e39956c0d35efc36acbead9fc624a9ffd7d7ab82 Author: Nishka Dasgupta Date: Fri Jun 21 11:38:16 2019 +0530 staging: rtl8712: Replace function r8712_init_cmd_priv() Remove function r8712_init_cmd_priv as all it does is call _init_cmd_priv. Rename _init_cmd_priv to r8712_init_cmd_priv to maintain compatibility with call sites. Change type of new r8712_init_cmd_priv from static to non-static as original r8712_init_cmd_priv was non-static. Change return type of new r8712_init_cmd_priv to int as original had return type u32 but new (formerly _init_cmd_priv) had return type sint. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_cmd.c | 7 +------ drivers/staging/rtl8712/rtl871x_cmd.h | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) commit 7a7213b08a41361d8ced4d3f645427c6ddcd3de2 Author: Nishka Dasgupta Date: Fri Jun 21 11:38:15 2019 +0530 staging: rtl8712: Remove function r8712_setrfintfs_cmd() Remove unused function r8712_setrfintfs_cmd. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_cmd.c | 21 --------------------- drivers/staging/rtl8712/rtl871x_cmd.h | 1 - 2 files changed, 22 deletions(-) commit 8cb9a36ebf93aed53707c33f3ae899a6d88b2bce Author: Nishka Dasgupta Date: Fri Jun 21 11:38:14 2019 +0530 staging: rtl8712: Remove function r8712_setfwra_cmd() Remove unused function r8712_setfwra_cmd. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_cmd.c | 20 -------------------- drivers/staging/rtl8712/rtl871x_cmd.h | 1 - 2 files changed, 21 deletions(-) commit f9ed50d78c621cb40565ebe1e63f90b8ee05bf71 Author: Nishka Dasgupta Date: Fri Jun 21 11:38:13 2019 +0530 staging: rtl8712: Remove function r8712_setfwdig_cmd() Remove unused function r8712_setfwdig_cmd(). Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_cmd.c | 20 -------------------- drivers/staging/rtl8712/rtl871x_cmd.h | 1 - 2 files changed, 21 deletions(-) commit 575922b1cf424058d68efdc2d0bf2d868b5d1424 Author: Nishka Dasgupta Date: Fri Jun 21 11:38:12 2019 +0530 staging: rtl8712: Remove function r8712_setbasicrate_cmd Remove unused function r8712_setbasicrate_cmd. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_cmd.c | 21 --------------------- drivers/staging/rtl8712/rtl871x_cmd.h | 1 - 2 files changed, 22 deletions(-) commit 2a438ffa74c0f3b718dc71ac59fbdce5f2e352e4 Author: Julien Thierry Date: Tue Jun 11 10:38:13 2019 +0100 arm64: Allow selecting Pseudo-NMI again Now that Pseudo-NMI are fixed, allow the use of that option again This reverts commit 96a13f57b946be7a6c10405e4bd780c0b6b6fe63 ("arm64: Kconfig: Make ARM64_PSEUDO_NMI depend on BROKEN for now"). Cc: Will Deacon Reviewed-by: Marc Zyngier Signed-off-by: Julien Thierry Signed-off-by: Catalin Marinas arch/arm64/Kconfig | 1 - 1 file changed, 1 deletion(-) commit e1d22385ea6686ff3dcd7092d84465c193849829 Author: Wei Li Date: Tue Jun 11 10:38:12 2019 +0100 arm64: fix kernel stack overflow in kdump capture kernel When enabling ARM64_PSEUDO_NMI feature in kdump capture kernel, it will report a kernel stack overflow exception: [ 0.000000] CPU features: detected: IRQ priority masking [ 0.000000] alternatives: patching kernel code [ 0.000000] Insufficient stack space to handle exception! [ 0.000000] ESR: 0x96000044 -- DABT (current EL) [ 0.000000] FAR: 0x0000000000000040 [ 0.000000] Task stack: [0xffff0000097f0000..0xffff0000097f4000] [ 0.000000] IRQ stack: [0x0000000000000000..0x0000000000004000] [ 0.000000] Overflow stack: [0xffff80002b7cf290..0xffff80002b7d0290] [ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 4.19.34-lw+ #3 [ 0.000000] pstate: 400003c5 (nZcv DAIF -PAN -UAO) [ 0.000000] pc : el1_sync+0x0/0xb8 [ 0.000000] lr : el1_irq+0xb8/0x140 [ 0.000000] sp : 0000000000000040 [ 0.000000] pmr_save: 00000070 [ 0.000000] x29: ffff0000097f3f60 x28: ffff000009806240 [ 0.000000] x27: 0000000080000000 x26: 0000000000004000 [ 0.000000] x25: 0000000000000000 x24: ffff000009329028 [ 0.000000] x23: 0000000040000005 x22: ffff000008095c6c [ 0.000000] x21: ffff0000097f3f70 x20: 0000000000000070 [ 0.000000] x19: ffff0000097f3e30 x18: ffffffffffffffff [ 0.000000] x17: 0000000000000000 x16: 0000000000000000 [ 0.000000] x15: ffff0000097f9708 x14: ffff000089a382ef [ 0.000000] x13: ffff000009a382fd x12: ffff000009824000 [ 0.000000] x11: ffff0000097fb7b0 x10: ffff000008730028 [ 0.000000] x9 : ffff000009440018 x8 : 000000000000000d [ 0.000000] x7 : 6b20676e69686374 x6 : 000000000000003b [ 0.000000] x5 : 0000000000000000 x4 : ffff000008093600 [ 0.000000] x3 : 0000000400000008 x2 : 7db2e689fc2b8e00 [ 0.000000] x1 : 0000000000000000 x0 : ffff0000097f3e30 [ 0.000000] Kernel panic - not syncing: kernel stack overflow [ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 4.19.34-lw+ #3 [ 0.000000] Call trace: [ 0.000000] dump_backtrace+0x0/0x1b8 [ 0.000000] show_stack+0x24/0x30 [ 0.000000] dump_stack+0xa8/0xcc [ 0.000000] panic+0x134/0x30c [ 0.000000] __stack_chk_fail+0x0/0x28 [ 0.000000] handle_bad_stack+0xfc/0x108 [ 0.000000] __bad_stack+0x90/0x94 [ 0.000000] el1_sync+0x0/0xb8 [ 0.000000] init_gic_priority_masking+0x4c/0x70 [ 0.000000] smp_prepare_boot_cpu+0x60/0x68 [ 0.000000] start_kernel+0x1e8/0x53c [ 0.000000] ---[ end Kernel panic - not syncing: kernel stack overflow ]--- The reason is init_gic_priority_masking() may unmask PSR.I while the irq stacks are not inited yet. Some "NMI" could be raised unfortunately and it will just go into this exception. In this patch, we just write the PMR in smp_prepare_boot_cpu(), and delay unmasking PSR.I after irq stacks inited in init_IRQ(). Fixes: e79321883842 ("arm64: Switch to PMR masking when starting CPUs") Cc: Will Deacon Reviewed-by: Marc Zyngier Signed-off-by: Wei Li [JT: make init_gic_priority_masking() not modify daif, rebase on other priority masking fixes] Signed-off-by: Julien Thierry Signed-off-by: Catalin Marinas arch/arm64/kernel/irq.c | 9 +++++++++ arch/arm64/kernel/smp.c | 8 +------- 2 files changed, 10 insertions(+), 7 deletions(-) commit 48ce8f80f5901f1f031b00be66d659d39f33b0a1 Author: Julien Thierry Date: Tue Jun 11 10:38:11 2019 +0100 arm64: irqflags: Introduce explicit debugging for IRQ priorities Using IRQ priority masking to enable/disable interrupts is a bit sensitive as it requires to deal with both ICC_PMR_EL1 and PSR.I. Introduce some validity checks to both highlight the states in which functions dealing with IRQ enabling/disabling can (not) be called, and bark a warning when called in an unexpected state. Since these checks are done on hotpaths, introduce a build option to choose whether to do the checking. Cc: Will Deacon Reviewed-by: Marc Zyngier Signed-off-by: Julien Thierry Signed-off-by: Catalin Marinas arch/arm64/Kconfig | 11 +++++++++++ arch/arm64/include/asm/cpufeature.h | 6 ++++++ arch/arm64/include/asm/daifflags.h | 7 +++++++ arch/arm64/include/asm/irqflags.h | 12 ++++++++++++ 4 files changed, 36 insertions(+) commit 2e26e96672c2c06e87312d5c5baad7fea29a35bc Author: Sergio Paracuellos Date: Fri Jun 21 08:15:17 2019 +0200 staging: mt7621-pci: use 'module_init' instead of 'arch_initcall' This driver has dependencies on mt7621-gpio and mt7621-pci-phy which are init in later stages. Hence, when this driver is probed it is always returning 'EPROBE_DEFER' and being initialized afterwards. Use function 'module_init' to just initialize later. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/mt7621-pci/pci-mt7621.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bd82d4bd21880b7c4d5f5756be435095d6ae07b5 Author: Julien Thierry Date: Tue Jun 11 10:38:10 2019 +0100 arm64: Fix incorrect irqflag restore for priority masking When using IRQ priority masking to disable interrupts, in order to deal with the PSR.I state, local_irq_save() would convert the I bit into a PMR value (GIC_PRIO_IRQOFF). This resulted in local_irq_restore() potentially modifying the value of PMR in undesired location due to the state of PSR.I upon flag saving [1]. In an attempt to solve this issue in a less hackish manner, introduce a bit (GIC_PRIO_IGNORE_PMR) for the PMR values that can represent whether PSR.I is being used to disable interrupts, in which case it takes precedence of the status of interrupt masking via PMR. GIC_PRIO_PSR_I_SET is chosen such that ( | GIC_PRIO_PSR_I_SET) does not mask more interrupts than as some sections (e.g. arch_cpu_idle(), interrupt acknowledge path) requires PMR not to mask interrupts that could be signaled to the CPU when using only PSR.I. [1] https://www.spinics.net/lists/arm-kernel/msg716956.html Fixes: 4a503217ce37 ("arm64: irqflags: Use ICC_PMR_EL1 for interrupt masking") Cc: # 5.1.x- Reported-by: Zenghui Yu Cc: Steven Rostedt Cc: Wei Li Cc: Will Deacon Cc: Christoffer Dall Cc: James Morse Cc: Suzuki K Pouloze Cc: Oleg Nesterov Reviewed-by: Marc Zyngier Signed-off-by: Julien Thierry Signed-off-by: Catalin Marinas arch/arm64/include/asm/arch_gicv3.h | 4 ++- arch/arm64/include/asm/daifflags.h | 68 ++++++++++++++++++++++--------------- arch/arm64/include/asm/irqflags.h | 67 +++++++++++++++--------------------- arch/arm64/include/asm/kvm_host.h | 7 ++-- arch/arm64/include/asm/ptrace.h | 10 ++++-- arch/arm64/kernel/entry.S | 38 ++++++++++++++++++--- arch/arm64/kernel/process.c | 2 +- arch/arm64/kernel/smp.c | 8 +++-- arch/arm64/kvm/hyp/switch.c | 2 +- 9 files changed, 123 insertions(+), 83 deletions(-) commit 774dd15f81f7a812f0347215f32dabfe0fb69aa1 Author: Sergio Paracuellos Date: Fri Jun 21 08:15:16 2019 +0200 staging: mt7621-pci-phy: remove disable clock from the phy exit function The clock which has been used here is not about the phy but the pcie port. It has been properly handled into host pcie driver code. Hence, remove it from here which is the correct thing to do. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/mt7621-pci-phy/pci-mt7621-phy.c | 8 -------- 1 file changed, 8 deletions(-) commit cdf6f83b3cca8ba89b6e492c590282395df35470 Author: Sergio Paracuellos Date: Fri Jun 21 08:15:15 2019 +0200 staging: mt7621-pci: add phy exit call if phy_power_on call fails Add missing call to 'phy_exit' function if the phy_power_on call fails. With this call added the error path is properly handled. Fixes: 07420a02b003 ("staging: mt7621-pci: use gpio perst instead of builtin behaviour") Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/mt7621-pci/pci-mt7621.c | 1 + 1 file changed, 1 insertion(+) commit 36e92f611e33d5e00849d175805fc6c6d4332c25 Author: Sergio Paracuellos Date: Fri Jun 21 08:15:14 2019 +0200 staging: mt7621-pci: disable pcie port clock if there is no pcie link When there is no pcie link detected we have to properly disable the port pcie clock. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/mt7621-pci/pci-mt7621.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 17ce302f3117e9518395847a3120c8a108b587b8 Author: Julien Thierry Date: Tue Jun 11 10:38:09 2019 +0100 arm64: Fix interrupt tracing in the presence of NMIs In the presence of any form of instrumentation, nmi_enter() should be done before calling any traceable code and any instrumentation code. Currently, nmi_enter() is done in handle_domain_nmi(), which is much too late as instrumentation code might get called before. Move the nmi_enter/exit() calls to the arch IRQ vector handler. On arm64, it is not possible to know if the IRQ vector handler was called because of an NMI before acknowledging the interrupt. However, It is possible to know whether normal interrupts could be taken in the interrupted context (i.e. if taking an NMI in that context could introduce a potential race condition). When interrupting a context with IRQs disabled, call nmi_enter() as soon as possible. In contexts with IRQs enabled, defer this to the interrupt controller, which is in a better position to know if an interrupt taken is an NMI. Fixes: bc3c03ccb464 ("arm64: Enable the support of pseudo-NMIs") Cc: # 5.1.x- Cc: Will Deacon Cc: Thomas Gleixner Cc: Jason Cooper Cc: Mark Rutland Reviewed-by: Marc Zyngier Signed-off-by: Julien Thierry Signed-off-by: Catalin Marinas arch/arm64/kernel/entry.S | 44 +++++++++++++++++++++++++++++++++----------- arch/arm64/kernel/irq.c | 17 +++++++++++++++++ drivers/irqchip/irq-gic-v3.c | 7 +++++++ kernel/irq/irqdesc.c | 8 ++++++-- 4 files changed, 63 insertions(+), 13 deletions(-) commit f57065782f245ca96f1472209a485073bbc11247 Author: Julien Thierry Date: Tue Jun 11 10:38:08 2019 +0100 arm64: irqflags: Add condition flags to inline asm clobber list Some of the inline assembly instruction use the condition flags and need to include "cc" in the clobber list. Fixes: 4a503217ce37 ("arm64: irqflags: Use ICC_PMR_EL1 for interrupt masking") Cc: # 5.1.x- Suggested-by: Marc Zyngier Cc: Will Deacon Reviewed-by: Marc Zyngier Acked-by: Mark Rutland Signed-off-by: Julien Thierry Signed-off-by: Catalin Marinas arch/arm64/include/asm/irqflags.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f5a3cb90b802da2dee8bc1dc39339b6521c33652 Author: Adham Abozaeid Date: Thu Jun 20 19:54:55 2019 +0000 staging: wilc1000: add passive scan support Add passive scan support to the driver by passing the scan type to the HW and configure the HW scan time if configured by the cfg80211. Signed-off-by: Adham Abozaeid Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 18 +++++++++++++++--- drivers/staging/wilc1000/host_interface.h | 1 - drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 12 +++++++++--- drivers/staging/wilc1000/wilc_wlan_if.h | 2 +- 4 files changed, 25 insertions(+), 8 deletions(-) commit b43f6a60e2718058675f7fcd681b96be2bdedbeb Author: Nishka Dasgupta Date: Fri Jun 21 11:38:11 2019 +0530 staging: rtl8712: r8712_enqueue_cmd_ex(): Change return type Change return type of function r8712_enqueue_cmd_ex from u8 to void as its return value is never stored, checked or otherwise used. Modify return statements accordingly. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_cmd.c | 7 +++---- drivers/staging/rtl8712/rtl871x_cmd.h | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) commit 0236f87b80aba7115cc446c2f6d5ba1180cb2fa7 Author: Nishka Dasgupta Date: Fri Jun 21 11:38:10 2019 +0530 staging: rtl8712: r8712_wdg_timeout_handler: Remove function Remove function _r8712_wdg_timeout_handler as all it does is call r8712_wdg_wk_cmd. Modify call site of _r8712_wdg_timeout_handler to call r8712_wdg_wk_cmd instead. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/mlme_linux.c | 2 +- drivers/staging/rtl8712/rtl871x_mlme.c | 5 ----- drivers/staging/rtl8712/rtl871x_mlme.h | 1 - 3 files changed, 1 insertion(+), 7 deletions(-) commit ec25a9c5f7d17c0d2c28658c9d1e73dd028369e2 Author: Nishka Dasgupta Date: Fri Jun 21 11:38:09 2019 +0530 staging: rtl8712: r8712_wdg_wk_cmd(): Change return type Change return type of function r8712_wdg_wk_cmd from u8 to void as its return value is never stored, checked or otherwise used. Modify its return statements accordingly. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_cmd.c | 7 +++---- drivers/staging/rtl8712/rtl871x_cmd.h | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) commit a2b6457e58f169359f007bfd93becd2389a9b898 Author: Nishka Dasgupta Date: Fri Jun 21 11:38:08 2019 +0530 staging: rtl8712: r8712_disconnectCtrlEx_cmd(): Change return type Change return type of function r8712_disconnectCtrlEx_cmd from u8 to void as its return value is never stored, checked or otherwise used. Modify its return statements accordingly. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_cmd.c | 7 +++---- drivers/staging/rtl8712/rtl871x_cmd.h | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) commit fc73bf67123b2414d3a419e77539868926b6fff8 Author: Nishka Dasgupta Date: Fri Jun 21 11:38:07 2019 +0530 staging: rtl8712: r8712_addbareq_cmd(): Change return type Change return type of the function r8712_addbareq_cmd from u8 to void as its return value is not stored, checked or otherwise used. Also modify its return statements accordingly. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_cmd.c | 7 +++---- drivers/staging/rtl8712/rtl871x_cmd.h | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) commit 3e5bc68fa596874500e8c718605aa44d5e42a34c Author: YueHaibing Date: Fri Jun 21 15:24:55 2019 +0800 staging: ks7010: Fix build error when CRYPTO is m and KS7010 is y, building fails: drivers/staging/ks7010/ks_hostif.o: In function `michael_mic.constprop.13': ks_hostif.c:(.text+0x560): undefined reference to `crypto_alloc_shash' ks_hostif.c:(.text+0x580): undefined reference to `crypto_shash_setkey' ks_hostif.c:(.text+0x5e0): undefined reference to `crypto_destroy_tfm' ks_hostif.c:(.text+0x614): undefined reference to `crypto_shash_update' ks_hostif.c:(.text+0x62c): undefined reference to `crypto_shash_update' ks_hostif.c:(.text+0x648): undefined reference to `crypto_shash_finup' Add CRYPTO and CRYPTO_HASH dependencies to fix this. Reported-by: Hulk Robot Fixes: 8b523f20417d ("staging: ks7010: removed custom Michael MIC implementation.") Signed-off-by: YueHaibing Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 10055c6fe274adab58bb0e20a4a7224829b62513 Author: YueHaibing Date: Thu Jun 20 14:59:26 2019 +0000 Staging: kpc2000: kpc_dma: Fix platform_no_drv_owner.cocci warnings Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: YueHaibing Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c | 1 - 1 file changed, 1 deletion(-) commit 670a44c1631ffc668ef535f4c5c217097bf78b16 Author: Nishka Dasgupta Date: Thu Jun 20 18:55:27 2019 +0530 staging: rtl8723bs: Delete file odm_AntDiv.c Delete file odm_AntDiv.c and corresponding header file odm_AntDiv.h as its functions and definitions are not used anywhere. Remove reference to odm_AntDiv.h. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/odm_AntDiv.c | 62 ----------------------------- drivers/staging/rtl8723bs/hal/odm_AntDiv.h | 30 -------------- drivers/staging/rtl8723bs/hal/odm_precomp.h | 1 - 3 files changed, 93 deletions(-) commit dc6b698a86fe40a50525433eb8e92a267847f6f9 Author: Marek Vasut Date: Mon May 27 00:51:51 2019 +0200 PCI: sysfs: Ignore lockdep for remove attribute With CONFIG_PROVE_LOCKING=y, using sysfs to remove a bridge with a device below it causes a lockdep warning, e.g., # echo 1 > /sys/class/pci_bus/0000:00/device/0000:00:00.0/remove ============================================ WARNING: possible recursive locking detected ... pci_bus 0000:01: busn_res: [bus 01] is released The remove recursively removes the subtree below the bridge. Each call uses a different lock so there's no deadlock, but the locks were all created with the same lockdep key so the lockdep checker can't tell them apart. Mark the "remove" sysfs attribute with __ATTR_IGNORE_LOCKDEP() as it is safe to ignore the lockdep check between different "remove" kernfs instances. There's discussion about a similar issue in USB at [1], which resulted in 356c05d58af0 ("sysfs: get rid of some lockdep false positives") and e9b526fe7048 ("i2c: suppress lockdep warning on delete_device"), which do basically the same thing for USB "remove" and i2c "delete_device" files. [1] https://lore.kernel.org/r/Pine.LNX.4.44L0.1204251436140.1206-100000@iolanthe.rowland.org Link: https://lore.kernel.org/r/20190526225151.3865-1-marek.vasut@gmail.com Signed-off-by: Marek Vasut [bhelgaas: trim commit log, details at above links] Signed-off-by: Bjorn Helgaas Cc: Geert Uytterhoeven Cc: Phil Edworthy Cc: Simon Horman Cc: Tejun Heo Cc: Wolfram Sang drivers/pci/pci-sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f92d5c6123f4f06a3660e4c398e1d453d1d29a9d Author: Jack Xiao Date: Thu Jan 10 15:50:10 2019 +0800 drm/amdgpu: enable the static csa when mcbp enabled CSA is the Context Save Area for preemption. Acked-by: Hawking Zhang Signed-off-by: Jack Xiao Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 5 +++-- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 7 ++++--- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 6 +++--- 4 files changed, 11 insertions(+), 9 deletions(-) commit b239c01727459ba08c44b79e6225d3c58723f282 Author: Jack Xiao Date: Thu Jan 10 15:43:33 2019 +0800 drm/amdgpu: add mcbp driver parameter Add mcbp driver parameter, so that mcbp feature can be enabled/disabled by driver parameter. Acked-by: Hawking Zhang Signed-off-by: Jack Xiao Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 5 +++++ 3 files changed, 9 insertions(+) commit 692441f2654c80e1452d66aeadf4b00da9ccddc6 Author: Rex Zhu Date: Wed Oct 31 20:21:55 2018 +0800 drm/amdgpu: Add new ring interface preempt_ib Used to trigger preemtption Acked-by: Hawking Zhang Signed-off-by: Rex Zhu Signed-off-by: Jack Xiao Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 2 ++ 1 file changed, 2 insertions(+) commit ef3e13238b5f27412651387ac4c210ba2d7ea312 Author: Jack Xiao Date: Thu Jan 10 14:28:08 2019 +0800 drm/amdgpu: add the trailing fence per ring The trailing fence for ring is used to track the completion of preemption. Acked-by: Hawking Zhang Signed-off-by: Jack Xiao Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 18 +++++++++++++----- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 10 ++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 4 ++++ 3 files changed, 27 insertions(+), 5 deletions(-) commit dfc9847956d55cdd1111711e2a3d9901967b4368 Author: Rex Zhu Date: Mon Oct 8 14:55:42 2018 +0800 drm/amdgpu: Add helper function amdgpu_ring_set_preempt_cond_exec can preempt the ring by setting cond_exec to false Acked-by: Hawking Zhang Signed-off-by: Rex Zhu Signed-off-by: Jack Xiao Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 6 ++++++ 1 file changed, 6 insertions(+) commit 6f298bd8158971cab2d9c1b7f9297b4ec73fe6ea Author: Le.Ma Date: Fri Jan 5 16:21:18 2018 +0800 drm/amdgpu: enable virtual display feature for navi10 Virtual display is a pure sw implementation of KMS for use in virtualization and for bring up and emulation. Signed-off-by: Le.Ma Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 1 + 1 file changed, 1 insertion(+) commit f65aaf8b897efce4df1c3e2498bc48795dc2ba56 Author: Christophe Roullier Date: Mon Jun 17 10:50:18 2019 +0200 ARM: dts: stm32: replace rgmii mode with rgmii-id on stm32mp15 boards On disco and eval board, Tx and Rx delay are applied (pull-up of 4.7k put on VDD) so which correspond to RGMII-ID mode with internal RX and TX delays provided by the PHY, the MAC should not add the RX or TX delays in this case Signed-off-by: Christophe Roullier Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp157a-dk1.dts | 2 +- arch/arm/boot/dts/stm32mp157c-ev1.dts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 94cafe1b648240569e930a751413f5843e86d2c0 Author: Manivannan Sadhasivam Date: Wed Jun 12 13:24:51 2019 +0530 ARM: dts: stm32: Add Avenger96 devicetree support based on STM32MP157A Add devicetree support for Avenger96 board based on STM32MP157A MPU from ST Micro. This board is one of the 96Boards Consumer Edition board from Arrow Electronics and has the following features: SoC: STM32MP157AAC PMIC: STPMIC1A RAM: 1024 Mbyte @ 533MHz Storage: eMMC v4.51: 8 Gbyte microSD Socket: UHS-1 v3.01 Ethernet Port: 10/100/1000 Mbit/s, IEEE 802.3 Compliant Wireless: WiFi 5 GHz & 2.4GHz IEEE 802.11a/b/g/n/ac Bluetooth®v4.2 (BR/EDR/BLE) USB: 2x Type A (USB 2.0) Host and 1x Micro B (USB 2.0) OTG Display: HDMI: WXGA (1366x768)@ 60 fps, HDMI 1.4 LED: 4x User LED, 1x WiFi LED, 1x BT LED More information about this board can be found in 96Boards website: https://www.96boards.org/product/avenger96/ Signed-off-by: Manivannan Sadhasivam Signed-off-by: Alexandre Torgue arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/stm32mp157a-avenger96.dts | 321 ++++++++++++++++++++++++++++ 2 files changed, 322 insertions(+) commit 861ca2d32be767a2109b27a39ac71838881a9010 Author: Manivannan Sadhasivam Date: Wed Jun 12 13:24:50 2019 +0530 dt-bindings: arm: stm32: Document Avenger96 devicetree binding This commit documents Avenger96 devicetree binding based on STM32MP157 SoC. Reviewed-by: Rob Herring Signed-off-by: Manivannan Sadhasivam Signed-off-by: Alexandre Torgue Documentation/devicetree/bindings/arm/stm32/stm32.yaml | 2 ++ 1 file changed, 2 insertions(+) commit b85d7502188689f2adb5600d777f96ce79c9ae24 Author: Manivannan Sadhasivam Date: Wed Jun 12 13:24:49 2019 +0530 dt-bindings: arm: stm32: Convert STM32 SoC bindings to DT schema This commit converts STM32 SoC bindings to DT schema using jsonschema. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Rob Herring Signed-off-by: Alexandre Torgue .../devicetree/bindings/arm/stm32/stm32.txt | 10 -------- .../devicetree/bindings/arm/stm32/stm32.yaml | 29 ++++++++++++++++++++++ 2 files changed, 29 insertions(+), 10 deletions(-) commit bf4b5f379fed6ee2e68b5320f59b0239705e4d94 Author: Manivannan Sadhasivam Date: Wed Jun 12 13:24:48 2019 +0530 ARM: dts: stm32: Add missing pinctrl definitions for STM32MP157 Add missing pinctrl definitions for STM32MP157 MPU. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp157-pinctrl.dtsi | 75 +++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) commit 5c1846394ad99cd01a959982be80fa0416f5a4eb Author: Olivier Moysan Date: Tue Jun 11 13:45:56 2019 +0200 ARM: dts: stm32: add sai id registers to stm32mp157c Add identification registers to address range of SAI DT parent node, for stm32mp157c. Signed-off-by: Olivier Moysan Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp157c.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 59713360ab29f2e3e446f235f0f8be6483347881 Author: Yannick Fertré Date: Tue May 21 17:03:18 2019 +0200 ARM: dts: stm32: add power supply of rm68200 on stm32mp157c-ev1 This patch adds a new property (power-supply) to panel rm68200 (raydium) on stm32mp157c-ev1. Signed-off-by: Yannick Fertré Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp157c-ev1.dts | 1 + 1 file changed, 1 insertion(+) commit 21f010b110c58f4e77d5a35244f42169c8d33e9a Author: Dragan Cvetic Date: Tue Jun 11 18:29:37 2019 +0100 misc: xilinx_sdfec: Add CCF support Add the support for Linux Clock Control Framework (CCF). Registers and enables clocks with the Clock Control Framework (CCF), to prevent shared clocks from been disabled. Tested-by: Dragan Cvetic Signed-off-by: Derek Kiernan Signed-off-by: Dragan Cvetic Signed-off-by: Greg Kroah-Hartman drivers/misc/xilinx_sdfec.c | 193 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 188 insertions(+), 5 deletions(-) commit 76d83e1c32334a793e50de6f955c2eefcc60bb8e Author: Dragan Cvetic Date: Tue Jun 11 18:29:36 2019 +0100 misc: xilinx-sdfec: add core driver Implement a platform driver that matches with xlnx, sd-fec-1.1 device tree node and registers as a character device, including: - SD-FEC driver binds to sdfec DT node. - creates and initialise an initial driver dev structure. - add the driver in Linux build and Kconfig. Tested-by: Dragan Cvetic Signed-off-by: Derek Kiernan Signed-off-by: Dragan Cvetic Signed-off-by: Greg Kroah-Hartman drivers/misc/Kconfig | 12 ++++ drivers/misc/Makefile | 1 + drivers/misc/xilinx_sdfec.c | 162 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 175 insertions(+) commit a00b004218be6b907a1e14ae0bc33f363e70e176 Author: Paul Cercueil Date: Tue Jun 4 16:30:18 2019 +0200 memory: jz4780_nemc: Add support for the JZ4740 Add support for the JZ4740 SoC from Ingenic. Signed-off-by: Paul Cercueil Reviewed-by: Boris Brezillon Signed-off-by: Greg Kroah-Hartman drivers/memory/jz4780-nemc.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) commit 1a927ad64bcf2b0e11559e3761360147d2ddbde8 Author: Paul Cercueil Date: Tue Jun 4 16:30:17 2019 +0200 memory: jz4780-nemc: Reduce size of const array The maximum value found in that array is 15, there's no need to store these values as uint32_t, a uint8_t is enough. Signed-off-by: Paul Cercueil Signed-off-by: Greg Kroah-Hartman drivers/memory/jz4780-nemc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 94b3a02c31eebbaa647f1f5252052e4ccbd0b938 Author: Paul Cercueil Date: Tue Jun 4 16:30:16 2019 +0200 memory: Kconfig: Drop dependency on MACH_JZ4780 for jz4780 Depending on MACH_JZ4780 prevent us from creating a generic kernel that works on more than one MIPS board. Instead, we just depend on MIPS being set. Signed-off-by: Paul Cercueil Reviewed-by: Boris Brezillon Signed-off-by: Greg Kroah-Hartman drivers/memory/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 22d137e283e63a62414464744302e01f28196ffc Author: Paul Cercueil Date: Tue Jun 4 16:30:15 2019 +0200 dt-bindings: memory: jz4780: Add compatible string for JZ4740 SoC Add a compatible string to support the memory controller built into the JZ4740 SoC from Ingenic. Signed-off-by: Paul Cercueil Reviewed-by: Boris Brezillon Reviewed-by: Rob Herring Signed-off-by: Greg Kroah-Hartman .../devicetree/bindings/memory-controllers/ingenic,jz4780-nemc.txt | 1 + 1 file changed, 1 insertion(+) commit 7a82a01e5c850986d4b53dab52ac71294285586f Author: Dragan Cvetic Date: Tue Jun 11 18:29:35 2019 +0100 dt-bindings: xilinx-sdfec: Add SDFEC binding Add the Soft Decision Forward Error Correction (SDFEC) Engine bindings which is available for the Zynq UltraScale+ RFSoC FPGA's. Signed-off-by: Dragan Cvetic Signed-off-by: Derek Kiernan Reviewed-by: Rob Herring .../devicetree/bindings/misc/xlnx,sd-fec.txt | 58 ++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 Documentation/devicetree/bindings/misc/xlnx,sd-fec.txt Signed-off-by: Greg Kroah-Hartman .../devicetree/bindings/misc/xlnx,sd-fec.txt | 58 ++++++++++++++++++++++ 1 file changed, 58 insertions(+) commit a586c88eab65619f3654194dc90d46c98e712af2 Author: Vidya Sagar Date: Wed Jun 12 15:23:36 2019 +0530 arm64: tegra: Enable PCIe slots in P2972-0000 board Enable PCIe controller nodes to enable respective PCIe slots on P2972-0000 board. Following is the ownership of slots by different PCIe controllers. Controller-0 : M.2 Key-M slot Controller-1 : On-board Marvell eSATA controller Controller-3 : M.2 Key-E slot Signed-off-by: Vidya Sagar Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi | 2 +- arch/arm64/boot/dts/nvidia/tegra194-p2972-0000.dts | 41 ++++++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) commit 2602c32f15e71729f3d638da5ad1692099cacf97 Author: Vidya Sagar Date: Wed Jun 12 15:23:35 2019 +0530 arm64: tegra: Add P2U and PCIe controller nodes to Tegra194 DT Add P2U (PIPE to UPHY) and PCIe controller nodes to device tree. The Tegra194 SoC contains six PCIe controllers and twenty P2U instances grouped into two different PHY bricks namely High-Speed IO (HSIO-12 P2Us) and NVIDIA High Speed (NVHS-8 P2Us) respectively. Signed-off-by: Vidya Sagar Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra194.dtsi | 437 +++++++++++++++++++++++++++++++ 1 file changed, 437 insertions(+) commit 871be845dfee0a29572ae360c48f8fe20a81a126 Author: Manikanta Maddireddy Date: Tue Jun 18 23:32:02 2019 +0530 arm64: tegra: Add PEX DPD states as pinctrl properties Add PEX deep power down states as pinctrl properties to set in PCIe driver. In Tegra210, BIAS pads are not in power down mode when clamps are applied. To set the pads in DPD, pass the PEX DPD states as pinctrl properties to PCIe driver. Signed-off-by: Manikanta Maddireddy Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra210.dtsi | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 9a182db4576d0f5d729a6900f16e4430f8fb1890 Author: Sameer Pujar Date: Wed Jun 19 17:21:22 2019 +0530 arm64: tegra: Enable ACONNECT, ADMA and AGIC Enable ACONNECT, ADMA and AGIC devices on Jetson TX2 and Jetson AGX Xavier. Verified driver probe path and devices get registered fine. Signed-off-by: Sameer Pujar Acked-by: Jon Hunter Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra186-p2771-0000.dts | 12 ++++++++++++ arch/arm64/boot/dts/nvidia/tegra194-p2972-0000.dts | 12 ++++++++++++ 2 files changed, 24 insertions(+) commit 5d2249dda08e817b0caafcba3a8d60d8bb898c41 Author: Sameer Pujar Date: Wed Jun 19 17:21:21 2019 +0530 arm64: tegra: Add ACONNECT, ADMA and AGIC nodes Add device tree nodes for the ACONNECT, ADMA and AGIC devices on Tegra186 and Tegra194. Signed-off-by: Sameer Pujar Acked-by: Jon Hunter Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra186.dtsi | 69 +++++++++++++++++++++++++++++++ arch/arm64/boot/dts/nvidia/tegra194.dtsi | 71 ++++++++++++++++++++++++++++++++ 2 files changed, 140 insertions(+) commit 1c2eb5b2853c9f513690ba6b71072d8eb65da16a Author: Vishnu DASA Date: Fri May 24 15:13:10 2019 +0000 VMCI: Fix integer overflow in VMCI handle arrays The VMCI handle array has an integer overflow in vmci_handle_arr_append_entry when it tries to expand the array. This can be triggered from a guest, since the doorbell link hypercall doesn't impose a limit on the number of doorbell handles that a VM can create in the hypervisor, and these handles are stored in a handle array. In this change, we introduce a mandatory max capacity for handle arrays/lists to avoid excessive memory usage. Signed-off-by: Vishnu Dasa Reviewed-by: Adit Ranadive Reviewed-by: Jorgen Hansen Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/misc/vmw_vmci/vmci_context.c | 80 +++++++++++++++++-------------- drivers/misc/vmw_vmci/vmci_handle_array.c | 38 ++++++++++----- drivers/misc/vmw_vmci/vmci_handle_array.h | 29 +++++++---- include/linux/vmw_vmci_defs.h | 11 ++++- 4 files changed, 99 insertions(+), 59 deletions(-) commit 84705f9f8c64cc3d8409ac63e5dd06ed97886fb7 Author: Jolly Shah Date: Wed Jun 19 13:59:34 2019 -0700 firmware: xilinx: zynqmp: Remove unused macro ZYNQMP_PM_CAPABILITY_POWER capability is not supported by firmware and hence needs to be removed Signed-off-by: Tejas Patel Signed-off-by: Michal Simek Signed-off-by: Jolly Shah Signed-off-by: Greg Kroah-Hartman include/linux/firmware/xlnx-zynqmp.h | 1 - 1 file changed, 1 deletion(-) commit 8ecfaca7926f4bb9fb584df070f50acd407e52ce Author: Pankaj Bansal Date: Wed Jun 12 08:53:00 2019 +0000 mux: mmio: add generic regmap bitfield-based multiplexer Generic register bitfield-based multiplexer that controls the multiplexer producer defined under a parent node. The driver corresponding to parent node provides register read/write capabilities. Signed-off-by: Pankaj Bansal Signed-off-by: Peter Rosin Signed-off-by: Greg Kroah-Hartman drivers/mux/Kconfig | 12 ++++++------ drivers/mux/mmio.c | 6 +++++- 2 files changed, 11 insertions(+), 7 deletions(-) commit ae1c6b9aa34be021555e1234a271d56108caa82e Author: Pankaj Bansal Date: Wed Jun 12 08:52:56 2019 +0000 dt-bindings: add register based devices' mux controller DT bindings This adds device tree binding documentation for generic register based multiplexer controlled by a bitfields in a parent device's register range. since MMIO mux is a special case of generic register based mux, the MMIO mux bindings have been subsumed in these bindings. Signed-off-by: Pankaj Bansal Signed-off-by: Peter Rosin Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/mux/mmio-mux.txt | 60 ---------- Documentation/devicetree/bindings/mux/reg-mux.txt | 129 +++++++++++++++++++++ 2 files changed, 129 insertions(+), 60 deletions(-) commit 4489f161b739f01ab60a58784f6ef7de9d7a1352 Author: Mauro Carvalho Chehab Date: Tue Jun 18 17:53:27 2019 -0300 docs: driver-model: convert docs to ReST and rename to *.rst Convert the various documents at the driver-model, preparing them to be part of the driver-api book. The conversion is actually: - add blank lines and identation in order to identify paragraphs; - fix tables markups; - add some lists markups; - mark literal blocks; - adjust title markups. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Acked-by: Jeff Kirsher # ice Signed-off-by: Greg Kroah-Hartman Documentation/driver-api/gpio/driver.rst | 2 +- .../driver-model/{binding.txt => binding.rst} | 20 +- Documentation/driver-model/{bus.txt => bus.rst} | 69 +++-- .../driver-model/{class.txt => class.rst} | 74 ++--- .../{design-patterns.txt => design-patterns.rst} | 106 +++---- .../driver-model/{device.txt => device.rst} | 57 ++-- .../driver-model/{devres.txt => devres.rst} | 50 +-- .../driver-model/{driver.txt => driver.rst} | 114 +++---- Documentation/driver-model/index.rst | 26 ++ .../driver-model/{overview.txt => overview.rst} | 37 +-- .../driver-model/{platform.txt => platform.rst} | 30 +- .../driver-model/{porting.txt => porting.rst} | 335 +++++++++++---------- Documentation/eisa.txt | 4 +- Documentation/hwmon/submitting-patches.rst | 2 +- drivers/base/platform.c | 2 +- drivers/gpio/gpio-cs5535.c | 2 +- drivers/net/ethernet/intel/ice/ice_main.c | 2 +- scripts/coccinelle/free/devm_free.cocci | 2 +- 18 files changed, 491 insertions(+), 443 deletions(-) commit 58cb346c7188f04bafa2a089ab0b093f5642572c Author: Mauro Carvalho Chehab Date: Tue Jun 18 15:55:12 2019 -0300 drivers: base/node.c: fixes a kernel-doc markups There was a typo at the name of the vars inside the kernel-doc comment, causing those warnings: ./drivers/base/node.c:690: warning: Function parameter or member 'mem_nid' not described in 'register_memory_node_under_compute_node' ./drivers/base/node.c:690: warning: Function parameter or member 'cpu_nid' not described in 'register_memory_node_under_compute_node' ./drivers/base/node.c:690: warning: Excess function parameter 'mem_node' description in 'register_memory_node_under_compute_node' ./drivers/base/node.c:690: warning: Excess function parameter 'cpu_node' description in 'register_memory_node_under_compute_node' There's also a description missing here: ./drivers/base/node.c:78: warning: Function parameter or member 'hmem_attrs' not described in 'node_access_nodes' Copy an existing description from another function call. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman drivers/base/node.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit a6cd400ac8a8b39b6830621eb51db351e1048f79 Author: Greg Kroah-Hartman Date: Thu Jun 13 20:37:29 2019 +0200 thermal: bcm2835: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Zhang Rui Cc: Eduardo Valentin Cc: Daniel Lezcano Cc: Florian Fainelli Cc: Ray Jui Cc: Scott Branden Cc: bcm-kernel-feedback-list@broadcom.com Cc: linux-pm@vger.kernel.org Signed-off-by: Greg Kroah-Hartman drivers/thermal/broadcom/bcm2835_thermal.c | 2 -- 1 file changed, 2 deletions(-) commit 10ff826ab0a46e6fbac324b3a633c4943e2a745e Author: Greg Kroah-Hartman Date: Tue Jun 11 20:05:47 2019 +0200 power: avs: smartreflex: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. And even when not checking the return value, no need to cast away the call to (void), as these functions were never a "must check" type of a function, so remove that odd cast. Cc: Kevin Hilman Cc: Nishanth Menon Cc: linux-pm@vger.kernel.org Signed-off-by: Greg Kroah-Hartman drivers/power/avs/smartreflex.c | 41 +++++++++++------------------------------ 1 file changed, 11 insertions(+), 30 deletions(-) commit 6987738dfa4cdd8ef68149c2fe644d9c20397d76 Author: Greg Kroah-Hartman Date: Fri Jun 14 09:14:23 2019 +0200 6lowpan: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Because we don't care if debugfs works or not, this trickles back a bit so we can clean things up by making some functions return void instead of an error value that is never going to fail. Cc: Alexander Aring Cc: Jukka Rissanen Cc: "David S. Miller" Cc: linux-bluetooth@vger.kernel.org Cc: linux-wpan@vger.kernel.org Cc: netdev@vger.kernel.org Acked-by: Jukka Rissanen Signed-off-by: Greg Kroah-Hartman net/6lowpan/6lowpan_i.h | 16 ++------ net/6lowpan/core.c | 8 +--- net/6lowpan/debugfs.c | 97 +++++++++++++------------------------------------ 3 files changed, 32 insertions(+), 89 deletions(-) commit 8bff68b80964134085a2f58642f22f6ea1b54857 Author: Greg Kroah-Hartman Date: Tue Jun 18 17:58:09 2019 +0200 watchdog: bcm_kona_wdt: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Wim Van Sebroeck Cc: Florian Fainelli Cc: Ray Jui Cc: Scott Branden Cc: bcm-kernel-feedback-list@broadcom.com Cc: linux-watchdog@vger.kernel.org Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/watchdog/bcm_kona_wdt.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 1012592cce2c59d85b7f535eb21d38d131167f07 Author: Greg Kroah-Hartman Date: Tue Jun 18 17:58:30 2019 +0200 watchdog: mei_wdt: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Tomas Winkler Cc: Wim Van Sebroeck Cc: linux-watchdog@vger.kernel.org Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/watchdog/mei_wdt.c | 30 +++++++----------------------- 1 file changed, 7 insertions(+), 23 deletions(-) commit 200f3a3fec0c1efab6dcdadc18c65eb61b4c89ce Author: Greg Kroah-Hartman Date: Tue Jun 18 17:52:46 2019 +0200 coresight: cpu-debug: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Suzuki K Poulose Cc: Alexander Shishkin Cc: linux-arm-kernel@lists.infradead.org Reviewed-by: Mathieu Poirier Tested-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-cpu-debug.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) commit 7c7e301406d0a93051d236600a72066278c2e4dc Author: Kimberly Brown Date: Thu May 2 13:34:45 2019 -0400 btrfs: sysfs: Replace default_attrs in ktypes with groups The kobj_type default_attrs field is being replaced by the default_groups field. Replace the default_attrs fields in btrfs_raid_ktype and space_info_ktype with default_groups. Change "raid_attributes" to "raid_attrs", and use the ATTRIBUTE_GROUPS macro to create raid_groups and space_info_groups. Signed-off-by: Kimberly Brown Acked-by: David Sterba Signed-off-by: Greg Kroah-Hartman fs/btrfs/sysfs.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 235e6e0a8d5fd1d0285a8d13fbaa3b92112b877a Author: Greg Kroah-Hartman Date: Fri Jun 21 15:28:35 2019 +0200 remove Documentation/index.rst.rej It got added accidentally by a previous patch that I had to "hand apply". Reported-by: Stephen Rothwell Signed-off-by: Greg Kroah-Hartman Documentation/index.rst.rej | 10 ---------- 1 file changed, 10 deletions(-) commit 76c47323c15106f8cbd67c722e85f2eb583b86c1 Author: Bartlomiej Zolnierkiewicz Date: Fri Jun 21 15:13:14 2019 +0200 video: fbdev: omap2: remove rfbi Equivalent of drm's commit aa61321d4c08 ("drm/omap: remove rfbi"). The RFBI driver has been marked as BROKEN and has not been included in the kernel build for many years. Just remove it (it can be trivially brought back from git repository if ever needed). Cc: Tomi Valkeinen Cc: Laurent Pinchart Cc: Aaro Koskinen Cc: Tony Lindgren Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/omap2/omapfb/dss/Kconfig | 12 - drivers/video/fbdev/omap2/omapfb/dss/Makefile | 1 - drivers/video/fbdev/omap2/omapfb/dss/core.c | 6 - drivers/video/fbdev/omap2/omapfb/dss/dss.h | 4 - drivers/video/fbdev/omap2/omapfb/dss/rfbi.c | 1078 ------------------------- include/video/omapfb_dss.h | 32 - 6 files changed, 1133 deletions(-) commit b6bb068dbd08879ca3cc69c9ec84580b08c17b37 Author: Colin Ian King Date: Fri Jun 21 15:13:14 2019 +0200 video: fbdev: atmel_lcdfb: remove redundant initialization to variable ret Currently variable ret is being initialized with -ENOENT however that value is never read and ret is being re-assigned later on. Hence this assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Acked-by: Nicolas Ferre Acked-by: Ludovic Desroches Cc: Alexandre Belloni Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/atmel_lcdfb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b27b0017efa28217d234c23acbceadb1a71cf53a Author: Gustavo A. R. Silva Date: Fri Jun 21 15:13:14 2019 +0200 video: fbdev-MMP: Use struct_size() in devm_kzalloc() One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct foo { int stuff; struct boo entry[]; }; size = sizeof(struct foo) + count * sizeof(struct boo); instance = devm_kzalloc(dev, size, GFP_KERNEL); Instead of leaving these open-coded and prone to type mistakes, we can now use the new struct_size() helper: instance = devm_kzalloc(dev, struct_size(instance, entry, count), GFP_KERNEL); Notice that, in this case, variable size is not necessary, hence it is removed. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/mmp/hw/mmp_ctrl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit acf7287e77852cf787c45980c27bfbdca7d94b0d Author: Shobhit Kukreti Date: Fri Jun 21 15:13:14 2019 +0200 video: fbdev: controlfb: fix warnings about comparing pointer to 0 Fix warnings aboout comparing pointer to 0 reported by coccicheck: drivers/video/fbdev/controlfb.c: WARNING comparing pointer to 0 drivers/video/fbdev/controlfb.c: WARNING comparing pointer to 0 drivers/video/fbdev/controlfb.c: WARNING comparing pointer to 0 Also while at it change return value to -ENOMEM on kzalloc() failure. Signed-off-by: Shobhit Kukreti Reviewed-by: Mathieu Malaterre [b.zolnierkie: minor fixups] Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/controlfb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b6b1d5119297abc881128bb05f4d2611bf28e7a9 Author: Hans de Goede Date: Fri Jun 21 15:13:14 2019 +0200 efifb: BGRT: Add check for new BGRT status field rotation bits Starting with ACPI 6.2 bits 1 and 2 of the BGRT status field are no longer reserved. These bits are now used to indicate if the image needs to be rotated before being displayed. The efifb code does not support rotating the image before copying it to the screen. This commit adds a check for these new bits and if they are set leaves the fb contents as is instead of trying to use the un-rotated BGRT image. Signed-off-by: Hans de Goede Acked-by: Ard Biesheuvel Cc: Peter Jones Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/efifb.c | 5 +++++ 1 file changed, 5 insertions(+) commit 813e34adeefbd4a8ee0d3003db79f1a3b97dfe17 Author: Christoph Hellwig Date: Fri Jun 21 15:13:14 2019 +0200 jz4740_fb: fix DMA API abuse Virtual addresses return from dma(m)_alloc_coherent are opaque in what backs then, and drivers must not poke into them. Signed-off-by: Christoph Hellwig Cc: Manuel Lauss [b.zolnierkie: patch description fixup] Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/jz4740_fb.c | 7 ------- 1 file changed, 7 deletions(-) commit 56fc5f48200fc432d80a9cffe1b2fe5fe7680f36 Author: Arnd Bergmann Date: Fri Jun 21 15:13:13 2019 +0200 video: fbdev: pvr2fb: fix link error for pvr2fb_pci_exit When the driver is built-in for PCI, we reference the exit function after discarding it: `pvr2fb_pci_exit' referenced in section `.ref.data' of drivers/video/fbdev/pvr2fb.o: defined in discarded section `.exit.text' of drivers/video/fbdev/pvr2fb.o Just remove the __exit annotation as the easiest workaround. Also apply the same workaround for pvr2fb_dc_exit(). Fixes: 0f5a5712ad1e ("video: fbdev: pvr2fb: add COMPILE_TEST support") Signed-off-by: Arnd Bergmann Cc: YueHaibing Cc: Ira Weiny Cc: Andrew Morton [b.zolnierkie: remove __exit annotation also from pvr2fb_dc_exit()] Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/pvr2fb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 597179b0ba550bd83fab1a9d57c42a9343c58514 Author: Arnd Bergmann Date: Tue Jun 18 13:22:13 2019 +0200 ipsec: select crypto ciphers for xfrm_algo kernelci.org reports failed builds on arc because of what looks like an old missed 'select' statement: net/xfrm/xfrm_algo.o: In function `xfrm_probe_algs': xfrm_algo.c:(.text+0x1e8): undefined reference to `crypto_has_ahash' I don't see this in randconfig builds on other architectures, but it's fairly clear we want to select the hash code for it, like we do for all its other users. As Herbert points out, CRYPTO_BLKCIPHER is also required even though it has not popped up in build tests. Fixes: 17bc19702221 ("ipsec: Use skcipher and ahash when probing algorithms") Signed-off-by: Arnd Bergmann Acked-by: Herbert Xu Signed-off-by: Steffen Klassert net/xfrm/Kconfig | 2 ++ 1 file changed, 2 insertions(+) commit e526c9bc11f858f115c77ca7f0b0256f09668f96 Author: Ben Ho Date: Mon May 27 17:04:42 2019 +0800 arm64: dts: Add Mediatek SoC MT8183 and evaluation board dts and Makefile Add basic chip support for Mediatek 8183, include uart node with correct uart clocks, pwrap device Add clock controller nodes, include topckgen, infracfg, apmixedsys and subsystem. Signed-off-by: Ben Ho Signed-off-by: Erin Lo Signed-off-by: Seiya Wang Signed-off-by: Weiyi Lu Signed-off-by: Hsin-Hsiung Wang Signed-off-by: Eddie Huang Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/Makefile | 1 + arch/arm64/boot/dts/mediatek/mt8183-evb.dts | 31 +++ arch/arm64/boot/dts/mediatek/mt8183.dtsi | 311 ++++++++++++++++++++++++++++ 3 files changed, 343 insertions(+) commit 5223bee837e8d90d752de744c5702706a7bb13d9 Author: Eric Farman Date: Tue Jun 18 22:23:52 2019 +0200 vfio-ccw: Remove copy_ccw_from_iova() Just to keep things tidy. Signed-off-by: Eric Farman Message-Id: <20190618202352.39702-6-farman@linux.ibm.com> Reviewed-by: Cornelia Huck Reviewed-by: Farhan Ali Signed-off-by: Cornelia Huck drivers/s390/cio/vfio_ccw_cp.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit 7f8e89a8f2fdb58461b01bb33ed8a5aa8119bf17 Author: Eric Farman Date: Tue Jun 18 22:23:51 2019 +0200 vfio-ccw: Factor out the ccw0-to-ccw1 transition This is a really useful function, but it's buried in the copy_ccw_from_iova() routine so that ccwchain_calc_length() can just work with Format-1 CCWs while doing its counting. But it means we're translating a full 2K of "CCWs" to Format-1, when in reality there's probably far fewer in that space. Let's factor it out, so maybe we can do something with it later. Signed-off-by: Eric Farman Message-Id: <20190618202352.39702-5-farman@linux.ibm.com> Reviewed-by: Cornelia Huck Reviewed-by: Farhan Ali Signed-off-by: Cornelia Huck drivers/s390/cio/vfio_ccw_cp.c | 48 ++++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 23 deletions(-) commit ded563f31d0eb4de0bcb101b755cdf6f4ed805e4 Author: Eric Farman Date: Tue Jun 18 22:23:50 2019 +0200 vfio-ccw: Copy CCW data outside length calculation It doesn't make much sense to "hide" the copy to the channel_program struct inside a routine that calculates the length of the chain. Let's move it to the calling routine, which will later copy from channel_program to the memory it allocated itself. Signed-off-by: Eric Farman Message-Id: <20190618202352.39702-4-farman@linux.ibm.com> Reviewed-by: Cornelia Huck Reviewed-by: Farhan Ali Signed-off-by: Cornelia Huck drivers/s390/cio/vfio_ccw_cp.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) commit 6246590230e9c1225d2ce8d0160376b4d5511281 Author: Eric Farman Date: Tue Jun 18 22:23:49 2019 +0200 vfio-ccw: Skip second copy of guest cp to host We already pinned/copied/unpinned 2K (256 CCWs) of guest memory to the host space anchored off vfio_ccw_private. There's no need to do that again once we have the length calculated, when we could just copy the section we need to the "permanent" space for the I/O. Signed-off-by: Eric Farman Message-Id: <20190618202352.39702-3-farman@linux.ibm.com> Reviewed-by: Cornelia Huck Reviewed-by: Farhan Ali Signed-off-by: Cornelia Huck drivers/s390/cio/vfio_ccw_cp.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 1d897e478da3db91593d86227854802102e2fcd3 Author: Eric Farman Date: Tue Jun 18 22:23:48 2019 +0200 vfio-ccw: Move guest_cp storage into common struct Rather than allocating/freeing a piece of memory every time we try to figure out how long a CCW chain is, let's use a piece of memory allocated for each device. The io_mutex added with commit 4f76617378ee9 ("vfio-ccw: protect the I/O region") is held for the duration of the VFIO_CCW_EVENT_IO_REQ event that accesses/uses this space, so there should be no race concerns with another CPU attempting an (unexpected) SSCH for the same device. Suggested-by: Cornelia Huck Signed-off-by: Eric Farman Message-Id: <20190618202352.39702-2-farman@linux.ibm.com> Reviewed-by: Cornelia Huck Reviewed-by: Farhan Ali Signed-off-by: Cornelia Huck drivers/s390/cio/vfio_ccw_cp.c | 23 ++++------------------- drivers/s390/cio/vfio_ccw_cp.h | 7 +++++++ drivers/s390/cio/vfio_ccw_drv.c | 7 +++++++ 3 files changed, 18 insertions(+), 19 deletions(-) commit f10effe5f77a9deb13c8fa3df6c2f103f04e6a0f Author: Bartlomiej Zolnierkiewicz Date: Fri Jun 21 13:04:39 2019 +0200 video: fbdev: s3c-fb: add COMPILE_TEST support Add COMPILE_TEST support to s3c-fb driver for better compile testing coverage. Acked-by: Jingoo Han Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 739a6439c2bf09732ab69983870f532dc7b6c7b8 Author: Bartlomiej Zolnierkiewicz Date: Fri Jun 21 13:04:39 2019 +0200 video: fbdev: imxfb: fix sparse warnings about using incorrect types Use ->screen_buffer instead of ->screen_base to fix sparse warnings. [ Please see commit 17a7b0b4d974 ("fb.h: Provide alternate screen_base pointer") for details. ] Reported-by: kbuild test robot Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: Uwe Kleine-König Cc: NXP Linux Team Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/imxfb.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 10715127e4f6f5e0e78f2e6d575e5238a3cc9a1f Author: Bartlomiej Zolnierkiewicz Date: Fri Jun 21 13:04:38 2019 +0200 video: fbdev: pvr2fb: fix build warning when compiling as module Add missing #ifndef MODULE around pvr2_get_param_val(). Fixes: 0f5a5712ad1e ("video: fbdev: pvr2fb: add COMPILE_TEST support") Reported-by: Stephen Rothwell Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/pvr2fb.c | 2 ++ 1 file changed, 2 insertions(+) commit f4c8116e294b12c360b724173f4b79f232573fb1 Author: Guido Günther Date: Thu Jun 20 21:42:37 2019 +0200 phy: Add driver for mixel mipi dphy found on NXP's i.MX8 SoCs This adds support for the Mixel DPHY as found on i.MX8 CPUs but since this is an IP core it will likely be found on others in the future. So instead of adding this to the nwl host driver make it a generic PHY driver. The driver supports the i.MX8MQ. Support for i.MX8QM and i.MX8QXP can be added once the necessary system controller bits are in via mixel_dphy_devdata. Signed-off-by: Guido Günther Co-developed-by: Robert Chiras Signed-off-by: Robert Chiras Reviewed-by: Fabio Estevam Reviewed-by: Sam Ravnborg Signed-off-by: Kishon Vijay Abraham I drivers/phy/freescale/Kconfig | 10 + drivers/phy/freescale/Makefile | 1 + drivers/phy/freescale/phy-fsl-imx8-mipi-dphy.c | 497 +++++++++++++++++++++++++ 3 files changed, 508 insertions(+) commit 00fcc69d6e52643fc5ecd04ff7e2d560ed3e2ec0 Author: Guido Günther Date: Thu Jun 20 21:42:36 2019 +0200 dt-bindings: phy: Add documentation for mixel dphy Add support for the MIXEL DPHY IP as found on NXP's i.MX8MQ SoCs. Signed-off-by: Guido Günther Reviewed-by: Sam Ravnborg Reviewed-by: Rob Herring Reviewed-by: Fabio Estevam Signed-off-by: Kishon Vijay Abraham I .../devicetree/bindings/phy/mixel,mipi-dsi-phy.txt | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 51cc0da52e16ef487e3b9f73ad0ba8243684e73d Author: Lubomir Rintel Date: Thu Jun 20 13:46:36 2019 +0200 dt-bindings: phy-pxa-usb: add bindings This is the PHY chip for USB OTG on PXA platforms. Signed-off-by: Lubomir Rintel Acked-by: Pavel Machek Signed-off-by: Kishon Vijay Abraham I Documentation/devicetree/bindings/phy/phy-pxa-usb.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 19c36b185a1d13f79f3a382e08695a2633155e5a Author: Julien Thierry Date: Tue Jun 11 10:38:07 2019 +0100 arm64: irqflags: Pass flags as readonly operand to restore instruction Flags are only read by the instructions doing the irqflags restore operation. Pass the operand as read only to the asm inline instead of read-write. Cc: Will Deacon Reviewed-by: Marc Zyngier Acked-by: Mark Rutland Signed-off-by: Julien Thierry Signed-off-by: Catalin Marinas arch/arm64/include/asm/irqflags.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9034f6251572a4744597c51dea5ab73a55f2b938 Author: Julien Thierry Date: Tue Jun 11 10:38:06 2019 +0100 arm64: Do not enable IRQs for ct_user_exit For el0_dbg and el0_error, DAIF bits get explicitly cleared before calling ct_user_exit. When context tracking is disabled, DAIF gets set (almost) immediately after. When context tracking is enabled, among the first things done is disabling IRQs. What is actually needed is: - PSR.D = 0 so the system can be debugged (should be already the case) - PSR.A = 0 so async error can be handled during context tracking Do not clear PSR.I in those two locations. Reviewed-by: Marc Zyngier Acked-by: Mark Rutland Reviewed-by: James Morse Cc: Will Deacon Signed-off-by: Julien Thierry Signed-off-by: Catalin Marinas arch/arm64/kernel/entry.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 69bc586518e0902493c42b77652fa712fae3480f Author: Biju Das Date: Fri Jun 7 08:03:36 2019 +0100 dt-bindings: PCI: rcar: Add device tree support for r8a774a1 Add PCIe support for the RZ/G2M (a.k.a. R8A774A1). Signed-off-by: Biju Das Signed-off-by: Lorenzo Pieralisi Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman Acked-by: Simon Horman Documentation/devicetree/bindings/pci/rcar-pci.txt | 1 + 1 file changed, 1 insertion(+) commit 2cfb1981dd0d9505b59868a7f7591746f51794b0 Author: Ayan Halder Date: Thu Jun 13 16:13:10 2019 +0100 drm/komeda: Make Komeda interrupts shareable Komeda interrupts may be shared with other hardware blocks. One needs to use devm_request_irq() with IRQF_SHARED to create a shared interrupt handler. As a result of not using drm_irq_install() api, one needs to set "(struct drm_device *)->irq_enabled = true/false" to enable/disable vblank interrupts. Changes from v1:- 1. Squashed the following two patches into one (as the second patch is a consequence of the first one):- drm/komeda: Avoid using DRIVER_IRQ_SHARED drm/komeda: Enable/Disable vblank interrupts 2. Fixed the commit message (as pointed by Daniel Vetter) 3. Removed calls to 'drm_irq_uninstall()' as we are no longer using drm_irq_install() 4. Removed the struct member 'komeda_kms_driver.irq_handler' as it is not used anywhere. Signed-off-by: Ayan Halder Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/display/komeda/komeda_kms.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 3f2ce83ddba936568de2d057bbd29d74cd2de80d Author: Takashi Sakamoto Date: Tue Jun 18 22:26:22 2019 +0900 ALSA: oxfw: ensure to release isochronous resources in pcm.hw_params callback When stopping packet streaming in reserve function for duplex streams, isochronous resources should be released. Fixes: 7bc93821a70a ("ALSA: firewire-lib: split allocation of isochronous resources from establishment of connection") Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/oxfw/oxfw-stream.c | 2 ++ 1 file changed, 2 insertions(+) commit a9679dd31dd379e7e14a13c55bd0a3214c18fe47 Author: Takashi Sakamoto Date: Tue Jun 18 22:26:21 2019 +0900 ALSA: fireworks: ensure to release isochronous resources in pcm.hw_params callback When stopping packet streaming in reserve function for duplex streams, isochronous resources should be released. Fixes: 7bc93821a70a ("ALSA: firewire-lib: split allocation of isochronous resources from establishment of connection") Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/fireworks/fireworks_stream.c | 3 +++ 1 file changed, 3 insertions(+) commit 7599e279c04511731e2aba4a6dc7b98e5c2a2d25 Author: Takashi Sakamoto Date: Tue Jun 18 22:26:20 2019 +0900 ALSA: bebob: ensure to release isochronous resources in pcm.hw_params callback When stopping packet streaming in reserve function for duplex streams, isochronous resources should be released. Fixes: 7bc93821a70a ("ALSA: firewire-lib: split allocation of isochronous resources from establishment of connection") Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/bebob/bebob_stream.c | 3 +++ 1 file changed, 3 insertions(+) commit 740680f22d96e078245211b40fc2c141a24c8d1a Author: Takashi Sakamoto Date: Tue Jun 18 22:26:19 2019 +0900 ALSA: dice: unify stop and release method for duplex streams >From callbacks for pcm and rawmidi interfaces, the functions to stop and release duplex streams are called at the same time. This commit merges the two functions. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/dice/dice-midi.c | 1 - sound/firewire/dice/dice-pcm.c | 1 - sound/firewire/dice/dice-stream.c | 8 ++------ sound/firewire/dice/dice.h | 1 - 4 files changed, 2 insertions(+), 9 deletions(-) commit b9434540dd8f702c2cf33b82674e027cb779146e Author: Takashi Sakamoto Date: Tue Jun 18 22:26:18 2019 +0900 ALSA: firewire-digi00x: unify stop and release method for duplex streams >From callbacks for pcm and rawmidi interfaces, the functions to stop and release duplex streams are called at the same time. This commit merges the two functions. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/digi00x/digi00x-midi.c | 1 - sound/firewire/digi00x/digi00x-pcm.c | 1 - sound/firewire/digi00x/digi00x-stream.c | 14 +++++--------- sound/firewire/digi00x/digi00x.h | 1 - 4 files changed, 5 insertions(+), 12 deletions(-) commit eccd895c998549ebb4a80f0ebee13b6a179bd40c Author: Takashi Sakamoto Date: Tue Jun 18 22:26:17 2019 +0900 ALSA: firewire-motu: unify stop and release method for duplex streams >From callbacks for pcm and rawmidi interfaces, the functions to stop and release duplex streams are called at the same time. This commit merges the two functions. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/motu/motu-midi.c | 1 - sound/firewire/motu/motu-pcm.c | 1 - sound/firewire/motu/motu-stream.c | 14 +++++--------- sound/firewire/motu/motu.h | 1 - 4 files changed, 5 insertions(+), 12 deletions(-) commit af26bacc1c5ace50645b29aea148c6143753edd4 Author: Takashi Sakamoto Date: Tue Jun 18 22:26:16 2019 +0900 ALSA: fireface: unify stop and release method for duplex streams >From callbacks for pcm and rawmidi interfaces, the functions to stop and release duplex streams are called at the same time. This commit merges the two functions. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/fireface/ff-pcm.c | 1 - sound/firewire/fireface/ff-stream.c | 14 +++++--------- sound/firewire/fireface/ff.h | 1 - 3 files changed, 5 insertions(+), 11 deletions(-) commit 9628fc82f9feedfcb6b9756efb2966c00b3811ef Author: Takashi Sakamoto Date: Tue Jun 18 22:26:15 2019 +0900 ALSA: firewire-tascam: unify stop and release method for duplex streams >From callbacks for pcm and rawmidi interfaces, the functions to stop and release duplex streams are called at the same time. This commit merges the two functions. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/tascam/tascam-pcm.c | 1 - sound/firewire/tascam/tascam-stream.c | 14 +++++--------- sound/firewire/tascam/tascam.h | 1 - 3 files changed, 5 insertions(+), 11 deletions(-) commit 0b044a999e86ed1aa8791f8bd11a6d7083b33438 Author: Arnd Bergmann Date: Mon Jun 17 14:51:04 2019 +0200 drm/komeda: fix 32-bit komeda_crtc_update_clock_ratio clang points out a bug in the clock calculation on 32-bit, that leads to the clock_ratio always being zero: drivers/gpu/drm/arm/display/komeda/komeda_crtc.c:31:36: error: shift count >= width of type [-Werror,-Wshift-count-overflow] aclk = komeda_calc_aclk(kcrtc_st) << 32; Move the shift into the division to make it apply on a 64-bit variable. Also use the more expensive div64_u64() instead of div_u64() to account for pxlclk being a 64-bit integer. Fixes: 1f7f9ab7900e ("drm/komeda: Add engine clock requirement check for the downscaling") Signed-off-by: Arnd Bergmann Reviewed-by: James Qian Wang (Arm Technology China) Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/display/komeda/komeda_crtc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 84872dc448fe0ae11fe8412f4966e9c431a45b8f Author: Erwan Le Ray Date: Tue Jun 18 12:02:26 2019 +0200 serial: stm32: add RX and TX FIFO flush Adds a flush of RX and TX FIFOs, and fixes some errors: - adds RX FIFO flush in startup fonction - removes the useless transmitter enabling in startup fonction (e.g. receiver only, see Documentation/serial/driver) - configures FIFO threshold before enabling it, rather than after - flushes both TX and RX in set_termios function Signed-off-by: Erwan Le Ray Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/stm32-usart.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit d0a6a7bcc3fa0e97efce1d9a5c4cca6f3474c6bb Author: Erwan Le Ray Date: Tue Jun 18 12:02:25 2019 +0200 serial: stm32: add support of RX FIFO threshold Adds the support of RX FIFO threshold in order to improve the RX FIFO management. This is done by enabling fifo threshold interrupt, instead of relying on rx empty/fifo not full irq. That basically generates one irq/char currently. With this patch: - RXCFG is set to half fifo size (e.g. 16/2 = 8 data for a 16 data depth FIFO) - irq rate may be reduced by up to 1/RXCFG, e.g. 1 over 8 with current RXCFG setting. - Receiver timeout is used to gather chars when FIFO threshold isn't reached. Signed-off-by: Erwan Le Ray Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/stm32-usart.c | 21 +++++++++++++++++++-- drivers/tty/serial/stm32-usart.h | 7 ++++++- 2 files changed, 25 insertions(+), 3 deletions(-) commit d075719e62ae7bc7fed3ff5be365c8c384483f15 Author: Erwan Le Ray Date: Tue Jun 18 12:02:24 2019 +0200 serial: stm32: add support of TX FIFO threshold Adds the support of TX FIFO threshold in order to improve the TX FIFO management: - TX FIFO threshold irq enabling (instead of relying on tx empty / fifo not full irq that generates one irq/char) - TXCFG is set to half fifo size (e.g. 16/2 = 8 data for a 16 data depth FIFO) - irq rate may be reduced by up to 1/TXCFG, e.g. 1 over 8 with current TXCFG setting. Signed-off-by: Erwan Le Ray Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/stm32-usart.c | 51 +++++++++++++++++++++++++++++++++------- drivers/tty/serial/stm32-usart.h | 13 ++++++++++ 2 files changed, 55 insertions(+), 9 deletions(-) commit 5d9176edacc29cadb9a0b52c8aaba67ce5ff4ed4 Author: Erwan Le Ray Date: Tue Jun 18 12:02:23 2019 +0200 serial: stm32: update PIO transmission Improves PIO transmission: - Replaces the FIFO filling per character by a filling per blocks of characters, which provides better performances - Replaces the active waiting loop by TX empty interrupt dynamic handling. TXE interrupt is now enabled when data has to be sent (ie when uart_circ is not empty), and inhibited when there is no more data to send (ie when uart_circ is empty). Signed-off-by: Erwan Le Ray Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/stm32-usart.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) commit 4cc0ed626f2ba36cd008d4b380613f0360133891 Author: Erwan Le Ray Date: Tue Jun 18 12:02:22 2019 +0200 serial: stm32: add support of timeout interrupt for RX Add support of RX timeout interrupts to limit the number of interrupts. RX timeout is a number of bits (baud clock cycles) without transmission seen in the receiver. One character is used as an arbitrary RX timeout value. If parity is enabled, the number of bits has to include parity bit. Signed-off-by: Gerald Baeza Signed-off-by: Fabrice Gasnier Signed-off-by: Erwan Le Ray Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/stm32-usart.c | 31 +++++++++++++++++++++++++------ drivers/tty/serial/stm32-usart.h | 1 + 2 files changed, 26 insertions(+), 6 deletions(-) commit 7e31d8215fd8cb1c13b47e23f1136545010e00de Author: Akinobu Mita Date: Sun Jun 9 23:17:02 2019 +0900 Documentation: nvme: add an example for nvme fault injection This adds an example of how to inject errors into admin commands. Suggested-by: Thomas Tai Signed-off-by: Akinobu Mita Reviewed-by: Chaitanya Kulkarni Reviewed-by: Minwoo Im Reviewed-by: Christoph Hellwig Signed-off-by: Christoph Hellwig .../fault-injection/nvme-fault-injection.txt | 56 ++++++++++++++++++++++ 1 file changed, 56 insertions(+) commit f79d5fda4ea08c33a114087573d86f703149ee0e Author: Akinobu Mita Date: Sun Jun 9 23:17:01 2019 +0900 nvme: enable to inject errors into admin commands This enables to inject errors into the commands submitted to the admin queue. It is useful to test error handling in the controller initialization. # echo 100 > /sys/kernel/debug/nvme0/fault_inject/probability # echo 1 > /sys/kernel/debug/nvme0/fault_inject/times # echo 10 > /sys/kernel/debug/nvme0/fault_inject/space # nvme reset /dev/nvme0 # dmesg ... nvme nvme0: Could not set queue count (16385) nvme nvme0: IO queues not created Signed-off-by: Akinobu Mita Reviewed-by: Minwoo Im Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Reviewed-by: Christoph Hellwig Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 3 +++ drivers/nvme/host/fault_inject.c | 5 ++--- drivers/nvme/host/nvme.h | 2 ++ 3 files changed, 7 insertions(+), 3 deletions(-) commit a3646451edd52ba238cbe4f618aaf6eb9bf9d60c Author: Akinobu Mita Date: Thu Jun 20 08:49:02 2019 +0200 nvme: prepare for fault injection into admin commands Currenlty fault injection support for nvme only enables to inject errors into the commands submitted to I/O queues. In preparation for fault injection into the admin commands, this makes the helper functions independent of struct nvme_ns. Signed-off-by: Akinobu Mita Reviewed-by: Minwoo Im Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 4 ++-- drivers/nvme/host/fault_inject.c | 36 ++++++++++++++++++++---------------- drivers/nvme/host/nvme.h | 34 +++++++++++++++++++--------------- 3 files changed, 41 insertions(+), 33 deletions(-) commit a5448fdc469d67da99728a132229aba5fce8f67a Author: Minwoo Im Date: Wed Jun 12 21:45:33 2019 +0900 nvmet: introduce target-side trace This patch introduces target-side request tracing. As Christoph suggested, the trace would not be in a core or module to avoid disadvantages like cache miss: http://lists.infradead.org/pipermail/linux-nvme/2019-June/024721.html The target-side trace code is entirely based on the Johannes's trace code from the host side. It has lots of codes duplicated, but it would be better than having advantages mentioned above. It also traces not only fabrics commands, but also nvme normal commands. Once the codes to be shared gets bigger, then we can make it common as suggsted. This also removed the create_sq and create_cq trace parsing functions because it will be done by the connect fabrics command. Example: echo 1 > /sys/kernel/debug/tracing/event/nvmet/nvmet_req_init/enable echo 1 > /sys/kernel/debug/tracing/event/nvmet/nvmet_req_complete/enable cat /sys/kernel/debug/tracing/trace Signed-off-by: Minwoo Im [hch: fixed the symbol namespace and a an endianess conversion] Signed-off-by: Christoph Hellwig drivers/nvme/target/Makefile | 3 + drivers/nvme/target/core.c | 8 ++ drivers/nvme/target/trace.c | 201 +++++++++++++++++++++++++++++++++++++++++++ drivers/nvme/target/trace.h | 141 ++++++++++++++++++++++++++++++ 4 files changed, 353 insertions(+) commit 2f5af4ab7de14bd35f3435e6a47300276bbb6c17 Author: Geert Uytterhoeven Date: Fri Jun 21 11:12:00 2019 +0200 lightnvm: fix uninitialized pointer in nvm_remove_tgt() With gcc 4.1: drivers/lightnvm/core.c: In function ‘nvm_remove_tgt’: drivers/lightnvm/core.c:510: warning: ‘t’ is used uninitialized in this function Indeed, if no NVM devices have been registered, t will be an uninitialized pointer, and may be dereferenced later. A call to nvm_remove_tgt() can be triggered from userspace by issuing the NVM_DEV_REMOVE ioctl on the lightnvm control device. Fix this by preinitializing t to NULL. Fixes: 843f2edbdde085b4 ("lightnvm: do not remove instance under global lock") Signed-off-by: Geert Uytterhoeven Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 510fd8ea98fcb586c01aef93d87c060a159ac30a Author: Heiner Litz Date: Fri Jun 21 11:11:59 2019 +0200 lightnvm: pblk: fix freeing of merged pages bio_add_pc_page() may merge pages when a bio is padded due to a flush. Fix iteration over the bio to free the correct pages in case of a merge. Signed-off-by: Heiner Litz Reviewed-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-core.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 5f965f4fd92303066b319db4b4bbdb53cb924582 Author: Minwoo Im Date: Wed Jun 12 21:45:32 2019 +0900 nvme-trace: print result and status in hex format The "result" field is in 64bit to be printed out which means it could be like: nvme_complete_rq: nvme0: qid=0, cmdid=0, res=18446612684158962624, etries=0, flags=0x0, status=0 Switch both the result and status field to be printed in hexadecimal format to be easier to read. Signed-off-by: Minwoo Im Reviewed-by: Christoph Hellwig Signed-off-by: Christoph Hellwig drivers/nvme/host/trace.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ad795e47cdef078bfd9e48745040d12104005aab Author: Minwoo Im Date: Wed Jun 12 21:45:31 2019 +0900 nvme-trace: support for fabrics commands in host-side This patch introduces fabrics commands tracing feature from host-side. This patch does not include any changes for the previous host-side tracing, but just add fabrics commands parsing in cmd=() format. Signed-off-by: Minwoo Im [hch: fixed some whitespace damage] Signed-off-by: Christoph Hellwig drivers/nvme/host/trace.c | 63 +++++++++++++++++++++++++++++++++++++++++++++++ drivers/nvme/host/trace.h | 20 ++++++++++----- include/linux/nvme.h | 20 ++++++++++++--- 3 files changed, 94 insertions(+), 9 deletions(-) commit 26f2990d85838caa650744a0ded9e38988a2bd7f Author: Minwoo Im Date: Wed Jun 12 21:45:30 2019 +0900 nvme-trace: move opcode symbol print to nvme.h The following patches are going to provide the target-side trace which might need these kind of macros. It would be great if it can be shared between host and target side both. Signed-off-by: Minwoo Im Signed-off-by: Christoph Hellwig drivers/nvme/host/trace.h | 44 -------------------------------------------- include/linux/nvme.h | 45 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 44 deletions(-) commit 7183a46a4879b1640ed428334a8468f3f9b0a4bb Author: Minwoo Im Date: Wed Jun 12 21:45:29 2019 +0900 nvme-trace: do not export nvme_trace_disk_name nvme_trace_disk_name() is now already being invoked with the function prototype in trace.h. We don't need to export this symbol at all. The following patches are going to provide target-side trace feature with the exactly same function with this so that this patch removes the EXPORT_SYMBOL() for this function. Signed-off-by: Minwoo Im Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig drivers/nvme/host/trace.c | 1 - 1 file changed, 1 deletion(-) commit 7c1ce408eb320b3d4051570d167852ffbd7778ce Author: Chaitanya Kulkarni Date: Sat Jun 8 13:16:32 2019 -0700 nvme-pci: clean up nvme_remove_dead_ctrl a bit Remove the status parameter o nvme_remove_dead_ctrl(), which is only used for printing it. We move the print message to the same function where actual error is occurring. Signed-off-by: Chaitanya Kulkarni Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/pci.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit cee6c269b016ba89c62e34d6bccb103ee2c7de4f Author: Minwoo Im Date: Sun Jun 9 03:35:20 2019 +0900 nvme-pci: properly report state change failure in nvme_reset_work If the state change to NVME_CTRL_CONNECTING fails, the dmesg is going to be like: [ 293.689160] nvme nvme0: failed to mark controller CONNECTING [ 293.689160] nvme nvme0: Removing after probe failure status: 0 Even it prints the first line to indicate the situation, the second line is not proper because the status is 0 which means normally success of the previous operation. This patch makes it indicate the proper error value when it fails. [ 25.932367] nvme nvme0: failed to mark controller CONNECTING [ 25.932369] nvme nvme0: Removing after probe failure status: -16 This situation is able to be easily reproduced by: root@target:~# rmmod nvme && modprobe nvme && rmmod nvme Signed-off-by: Minwoo Im Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig drivers/nvme/host/pci.c | 1 + 1 file changed, 1 insertion(+) commit e71afda49335620e3d9adf56015676db33a3bd86 Author: Chaitanya Kulkarni Date: Sat Jun 8 13:01:02 2019 -0700 nvme-pci: set the errno on ctrl state change error This patch removes the confusing assignment of the variable result at the time of declaration and sets the value in error cases next to the places where the actual error is happening. Here we also set the result value to -ENODEV when we fail at the final ctrl state transition in nvme_reset_work(). Without this assignment result will hold 0 from nvme_setup_io_queue() and on failure 0 will be passed to he nvme_remove_dead_ctrl() from final state transition. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig drivers/nvme/host/pci.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit dad77d63903e91a2e97a0c984cabe5d36e91ba60 Author: Minwoo Im Date: Sun Jun 9 03:02:19 2019 +0900 nvme-pci: adjust irq max_vector using num_possible_cpus() If the "irq_queues" are greater than num_possible_cpus(), nvme_calc_irq_sets() can have irq set_size for HCTX_TYPE_DEFAULT greater than it can be afforded. 2039 affd->set_size[HCTX_TYPE_DEFAULT] = nrirqs - nr_read_queues; It might cause a WARN() from the irq_build_affinity_masks() like [1]: 220 if (nr_present < numvecs) 221 WARN_ON(nr_present + nr_others < numvecs); This patch prevents it from the WARN() by adjusting the max_vector value from the nvme_setup_irqs(). [1] WARN messages when modprobe nvme write_queues=32 poll_queues=0: root@target:~/nvme# nproc 8 root@target:~/nvme# modprobe nvme write_queues=32 poll_queues=0 [ 17.925326] nvme nvme0: pci function 0000:00:04.0 [ 17.940601] WARNING: CPU: 3 PID: 1030 at kernel/irq/affinity.c:221 irq_create_affinity_masks+0x222/0x330 [ 17.940602] Modules linked in: nvme nvme_core [last unloaded: nvme] [ 17.940605] CPU: 3 PID: 1030 Comm: kworker/u17:4 Tainted: G W 5.1.0+ #156 [ 17.940605] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.1-0-ga5cab58e9a3f-prebuilt.qemu.org 04/01/2014 [ 17.940608] Workqueue: nvme-reset-wq nvme_reset_work [nvme] [ 17.940609] RIP: 0010:irq_create_affinity_masks+0x222/0x330 [ 17.940611] Code: 4c 8d 4c 24 28 4c 8d 44 24 30 e8 c9 fa ff ff 89 44 24 18 e8 c0 38 fa ff 8b 44 24 18 44 8b 54 24 1c 5a 44 01 d0 41 39 c4 76 02 <0f> 0b 48 89 df 44 01 e5 e8 f1 ce 10 00 48 8b 34 24 44 89 f0 44 01 [ 17.940611] RSP: 0018:ffffc90002277c50 EFLAGS: 00010216 [ 17.940612] RAX: 0000000000000008 RBX: ffff88807ca48860 RCX: 0000000000000000 [ 17.940612] RDX: ffff88807bc03800 RSI: 0000000000000020 RDI: 0000000000000000 [ 17.940613] RBP: 0000000000000001 R08: ffffc90002277c78 R09: ffffc90002277c70 [ 17.940613] R10: 0000000000000008 R11: 0000000000000001 R12: 0000000000000020 [ 17.940614] R13: 0000000000025d08 R14: 0000000000000001 R15: ffff88807bc03800 [ 17.940614] FS: 0000000000000000(0000) GS:ffff88807db80000(0000) knlGS:0000000000000000 [ 17.940616] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 17.940617] CR2: 00005635e583f790 CR3: 000000000240a000 CR4: 00000000000006e0 [ 17.940617] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 17.940618] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 17.940618] Call Trace: [ 17.940622] __pci_enable_msix_range+0x215/0x540 [ 17.940623] ? kernfs_put+0x117/0x160 [ 17.940625] pci_alloc_irq_vectors_affinity+0x74/0x110 [ 17.940626] nvme_reset_work+0xc30/0x1397 [nvme] [ 17.940628] ? __switch_to_asm+0x34/0x70 [ 17.940628] ? __switch_to_asm+0x40/0x70 [ 17.940629] ? __switch_to_asm+0x34/0x70 [ 17.940630] ? __switch_to_asm+0x40/0x70 [ 17.940630] ? __switch_to_asm+0x34/0x70 [ 17.940631] ? __switch_to_asm+0x40/0x70 [ 17.940632] ? nvme_irq_check+0x30/0x30 [nvme] [ 17.940633] process_one_work+0x20b/0x3e0 [ 17.940634] worker_thread+0x1f9/0x3d0 [ 17.940635] ? cancel_delayed_work+0xa0/0xa0 [ 17.940636] kthread+0x117/0x120 [ 17.940637] ? kthread_stop+0xf0/0xf0 [ 17.940638] ret_from_fork+0x3a/0x50 [ 17.940639] ---[ end trace aca8a131361cd42a ]--- [ 17.942124] nvme nvme0: 7/1/0 default/read/poll queues Signed-off-by: Minwoo Im Signed-off-by: Christoph Hellwig drivers/nvme/host/pci.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 483178f38cbe55a0b1854a93ceef715a0fc2ef9f Author: Minwoo Im Date: Sun Jun 9 03:02:18 2019 +0900 nvme-pci: remove queue_count_ops for write_queues and poll_queues queue_count_set() seems like that it has been provided to limit the number of queue entries for write/poll queues. But, the queue_count_set() has been doing nothing but a parameter check even it has num_possible_cpus() which is nop. This patch removes entire queue_count_ops from the write_queues and poll_queues. Signed-off-by: Minwoo Im Signed-off-by: Christoph Hellwig drivers/nvme/host/pci.c | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) commit a232ea0ebffeaab48ec24cf795dcb07280a55ea1 Author: Minwoo Im Date: Sun Jun 9 03:02:17 2019 +0900 nvme-pci: remove unnecessary zero for static var poll_queues will be zero even without zero initialization here. Signed-off-by: Minwoo Im Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig drivers/nvme/host/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d916b1be94b6dc8d293abed2451f3062f6af7551 Author: Keith Busch Date: Thu May 23 09:27:35 2019 -0600 nvme-pci: use host managed power state for suspend The nvme pci driver prepares its devices for power loss during suspend by shutting down the controllers. The power setting is deferred to pci driver's power management before the platform removes power. The suspend-to-idle mode, however, does not remove power. NVMe devices that implement host managed power settings can achieve lower power and better transition latencies than using generic PCI power settings. Try to use this feature if the platform is not involved with the suspend. If successful, restore the previous power state on resume. Tested-by: Kai-Heng Feng Tested-by: Mario Limonciello Reviewed-by: Rafael J. Wysocki Signed-off-by: Keith Busch Signed-off-by: Sagi Grimberg [hch: fixed the compilation for the !CONFIG_PM_SLEEP case] Signed-off-by: Christoph Hellwig drivers/nvme/host/pci.c | 95 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 92 insertions(+), 3 deletions(-) commit 7a1f46e3f75cff5042dfa1bb80c9929a0e412abc Author: Minwoo Im Date: Thu Jun 6 14:30:14 2019 +0900 nvme: introduce nvme_is_fabrics to check fabrics cmd This patch introduces a nvme_is_fabrics() inline function to check whether or not the given command structure is for fabrics. Signed-off-by: Minwoo Im Reviewed-by: Sagi Grimberg Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/fabrics.c | 2 +- drivers/nvme/target/core.c | 2 +- drivers/nvme/target/fabrics-cmd.c | 2 +- drivers/nvme/target/fc.c | 2 +- include/linux/nvme.h | 7 ++++++- 5 files changed, 10 insertions(+), 5 deletions(-) commit 1a87ee657c530bb2f3e39e4ac184d48f5f959cda Author: Keith Busch Date: Mon May 27 01:29:01 2019 +0900 nvme: export get and set features Future use intends to make use of both, so export these functions. And since their implementation is identical except for the opcode, provide a new function that implement both. [akinobu.mita@gmail.com>: fix line over 80 characters] Signed-off-by: Keith Busch Signed-off-by: Akinobu Mita Reviewed-by: Chaitanya Kulkarni Reviewed-by: Minwoo Im Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 24 +++++++++++++++++++++--- drivers/nvme/host/nvme.h | 6 ++++++ 2 files changed, 27 insertions(+), 3 deletions(-) commit 2181e455612a8db2761eabbf126640552a451e96 Author: Anton Eidelman Date: Thu Jun 20 08:48:10 2019 +0200 nvme: fix possible io failures when removing multipathed ns When a shared namespace is removed, we call blk_cleanup_queue() when the device can still be accessed as the current path and this can result in submission to a dying queue. Hence, direct_make_request() called by our mpath device may fail (propagating the failure to userspace). Instead, we want to failover this I/O to a different path if one exists. Thus, before we cleanup the request queue, we make sure that the device is cleared from the current path nor it can be selected again as such. Fix this by: - clear the ns from the head->list and synchronize rcu to make sure there is no concurrent path search that restores it as the current path - clear the mpath current path in order to trigger a subsequent path search and sync srcu to wait for any ongoing request submissions - safely continue to namespace removal and blk_cleanup_queue Signed-off-by: Anton Eidelman Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 4bea364f161810523032f37a8ae0b7d92cf28eea Author: James Smart Date: Wed May 29 15:25:26 2019 -0700 nvme-fc: add message when creating new association When looking at console messages to troubleshoot, there are one maybe two messages before creation of the controller is complete. However, a lot of io takes place to reach that point. It's unclear when things have started. Add a message when the controller is attempting to create a new association. Thus we know what controller, between what host and remote port, and what NQN is being put into place for any subsequent success or failure messages. Signed-off-by: James Smart Reviewed-by: Chaitanya Kulkarni Reviewed-by: Giridhar Malavali Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/fc.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 41b194b843a255d5a6e9468edd3ab1d71a24abb3 Author: James Smart Date: Tue May 14 14:58:08 2019 -0700 lpfc: add sysfs interface to post NVME RSCN To support scenarios which aren't bound to nvmetcli add port scenarios, which is currently where the nvmet_fc transport invokes the discovery event callbacks, a syfs attribute is added to lpfc which can be written to cause an RSCN to be generated for the nport. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Reviewed-by: Arun Easi Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/scsi/lpfc/lpfc.h | 1 + drivers/scsi/lpfc/lpfc_attr.c | 60 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) commit 6f2589f478795c46a61696d7d7c2f47a0bc6cfe3 Author: James Smart Date: Tue May 14 14:58:07 2019 -0700 lpfc: add support for translating an RSCN rcv into a discovery rescan This patch updates RSCN receive processing to check for the remote port being an NVME port, and if so, invoke the nvme_fc callback to rescan the remote port. The rescan will generate a discovery udev event. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Reviewed-by: Arun Easi Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/scsi/lpfc/lpfc_crtn.h | 2 ++ drivers/scsi/lpfc/lpfc_els.c | 5 +++++ drivers/scsi/lpfc/lpfc_nvme.c | 44 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 51 insertions(+) commit ab723121a8eade04ecc6bd7116924c359336f4eb Author: James Smart Date: Tue May 14 14:58:06 2019 -0700 lpfc: add nvmet discovery_event op support This patch adds support for the nvmet discovery op. When the callback routine is called, the driver will call the routine to generate an RSCN to the port on the other end of the link. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Reviewed-by: Arun Easi Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/scsi/lpfc/lpfc_nvmet.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit f60cb93bbfecf1ad13713af285c3793e861fc9b2 Author: James Smart Date: Tue May 14 14:58:05 2019 -0700 lpfc: add support to generate RSCN events for nport This patch adds general RSCN support: - The ability to transmit an RSCN to the port on the other end of the link (regular port if pt2pt, or fabric controller if fabric). - And general recognition of an RSCN ELS when an ELS is received. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Reviewed-by: Arun Easi Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/scsi/lpfc/lpfc.h | 1 + drivers/scsi/lpfc/lpfc_crtn.h | 2 + drivers/scsi/lpfc/lpfc_els.c | 122 +++++++++++++++++++++++++++++++++++++++ drivers/scsi/lpfc/lpfc_hbadisc.c | 35 +++++++++++ drivers/scsi/lpfc/lpfc_hw.h | 2 + drivers/scsi/lpfc/lpfc_sli.c | 1 + 6 files changed, 163 insertions(+) commit 4cf7c363b41552d76331fcf1e7ce600c8deeddc3 Author: James Smart Date: Tue May 14 14:58:04 2019 -0700 nvme-fcloop: add support for nvmet discovery_event op Update fcloop to support the discovery_event operation and invoke a nvme rescan. In a real fc adapter, this would generate an RSCN, which the host would receive and convert into a nvme rescan on the remote port specified in the rscn payload. Signed-off-by: James Smart [kbuild-bot: fcloop_tgt_discovery_evt can be static] Reviewed-by: Hannes Reinecke Reviewed-by: Arun Easi Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/target/fcloop.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit 150d71f725fd2f5a0015b7fa8df0816a207d4e4b Author: James Smart Date: Tue May 14 14:58:03 2019 -0700 nvmet-fc: add transport discovery change event callback support This patch adds support for the nvmet discovery_change transport op. In turn, the transport adds it's own LLDD api callback discovery_event op to request the LLDD to generate an RSCN for the discovery change. Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Reviewed-by: Arun Easi Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/target/fc.c | 11 +++++++++++ include/linux/nvme-fc-driver.h | 6 ++++++ 2 files changed, 17 insertions(+) commit 9d09dd8d7626b9124ce4bc081aabcb0590173b27 Author: James Smart Date: Tue May 14 14:58:02 2019 -0700 nvmet: add transport discovery change op Some transports, such as FC-NVME, support discovery controller change events without the use of a persistent discovery controller. FC receives events via RSCN from the FC Fabric Controller or subsystem FC port. This patch adds a nvmet transport op that is called whenever a discovery change event occurs in the nvmet layer. To facilitate the callback without adding another layer to cross into core.c to reference the transport ops, the port structure snapshots the transport ops when the port is enabled and clears them when disabled. Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Reviewed-by: Arun Easi Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/target/core.c | 2 ++ drivers/nvme/target/discovery.c | 4 ++++ drivers/nvme/target/nvmet.h | 2 ++ 3 files changed, 8 insertions(+) commit 3f2640ed7be838c3f05c0d2b0f7c7508e7431e48 Author: Oliver Barta Date: Wed Jun 19 10:16:39 2019 +0200 Revert "serial: 8250: Don't service RX FIFO if interrupts are disabled" This reverts commit 2e9fe539108320820016f78ca7704a7342788380. Reading LSR unconditionally but processing the error flags only if UART_IIR_RDI bit was set before in IIR may lead to a loss of transmission error information on UARTs where the transmission error flags are cleared by a read of LSR. Information are lost in case an error is detected right before the read of LSR while processing e.g. an UART_IIR_THRI interrupt. Signed-off-by: Oliver Barta Reviewed-by: Andy Shevchenko Fixes: 2e9fe5391083 ("serial: 8250: Don't service RX FIFO if interrupts are disabled") Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_port.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 474a280036e8d319ef852f1dec59bedf4eda0107 Author: Christoph Hellwig Date: Fri Jun 21 10:22:48 2019 +0200 cgroup: export css_next_descendant_pre for bfq The bfq schedule now uses css_next_descendant_pre directly after the stats functionality depending on it has been from the core blk-cgroup code to bfq. Export the symbol so that bfq can still be build modular. Fixes: d6258980daf2 ("bfq-iosched: move bfq_stat_recursive_sum into the only caller") Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe kernel/cgroup/cgroup.c | 1 + 1 file changed, 1 insertion(+) commit 4a96895f74c9633b51427fd080ab70fa62b65bc4 Author: Yegor Yefremov Date: Thu Jun 20 08:24:20 2019 +0200 tty/serial/8250: use mctrl_gpio helpers This patch permits the usage for GPIOs to control the CTS/RTS/DTR/DSR/DCD/RI signals. Changed by Stefan: Only call mctrl_gpio_init(), if the device has no ACPI companion device to not break existing ACPI based systems. Also only use the mctrl_gpio_ functions when "gpios" is available. Use MSR / MCR <-> TIOCM wrapper functions. Signed-off-by: Yegor Yefremov Signed-off-by: Stefan Roese Reviewed-by: Andy Shevchenko Reviewed-by: Mika Westerberg Tested-by: Yegor Yefremov Cc: Mika Westerberg Cc: Andy Shevchenko Cc: Giulio Benetti Cc: Yegor Yefremov Cc: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/serial/8250.txt | 19 +++++++++++++++ drivers/tty/serial/8250/8250.h | 18 +++++++++++++- drivers/tty/serial/8250/8250_core.c | 17 +++++++++++++ drivers/tty/serial/8250/8250_omap.c | 29 +++++++++++++---------- drivers/tty/serial/8250/8250_port.c | 11 ++++++++- drivers/tty/serial/8250/Kconfig | 1 + include/linux/serial_8250.h | 1 + 7 files changed, 81 insertions(+), 15 deletions(-) commit d99482673f950817b30caf3fcdfb31179b050ce1 Author: Stefan Roese Date: Thu Jun 20 08:24:19 2019 +0200 serial: mctrl_gpio: Check if GPIO property exisits before requesting it This patch adds a check for the GPIOs property existence, before the GPIO is requested. This fixes an issue seen when the 8250 mctrl_gpio support is added (2nd patch in this patch series) on x86 platforms using ACPI. Here Mika's comments from 2016-08-09: " I noticed that with v4.8-rc1 serial console of some of our Broxton systems does not work properly anymore. I'm able to see output but input does not work. I bisected it down to commit 4ef03d328769eddbfeca1f1c958fdb181a69c341 ("tty/serial/8250: use mctrl_gpio helpers"). The reason why it fails is that in ACPI we do not have names for GPIOs (except when _DSD is used) so we use the "idx" to index into _CRS GPIO resources. Now mctrl_gpio_init_noauto() goes through a list of GPIOs calling devm_gpiod_get_index_optional() passing "idx" of 0 for each. The UART device in Broxton has following (simplified) ACPI description: Device (URT4) { ... Name (_CRS, ResourceTemplate () { GpioIo (Exclusive, PullDefault, 0x0000, 0x0000, IoRestrictionOutputOnly, "\\_SB.GPO0", 0x00, ResourceConsumer) { 0x003A } GpioIo (Exclusive, PullDefault, 0x0000, 0x0000, IoRestrictionOutputOnly, "\\_SB.GPO0", 0x00, ResourceConsumer) { 0x003D } }) In this case it finds the first GPIO (0x003A which happens to be RX pin for that UART), turns it into GPIO which then breaks input for the UART device. This also breaks systems with bluetooth connected to UART (those typically have some GPIOs in their _CRS). Any ideas how to fix this? We cannot just drop the _CRS index lookup fallback because that would break many existing machines out there so maybe we can limit this to only DT enabled machines. Or alternatively probe if the property first exists before trying to acquire the GPIOs (using device_property_present()). " This patch implements the fix suggested by Mika in his statement above. Signed-off-by: Stefan Roese Reviewed-by: Mika Westerberg Reviewed-by: Andy Shevchenko Tested-by: Yegor Yefremov Cc: Mika Westerberg Cc: Andy Shevchenko Cc: Yegor Yefremov Cc: Greg Kroah-Hartman Cc: Giulio Benetti Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/serial_mctrl_gpio.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit f785b42f4cb5a63eeb3f9037acf35b827aabb328 Author: Benjamin Gaignard Date: Tue May 21 10:18:19 2019 +0100 ARM: 8863/1: stm32: select ARM errata 814220 Make sure that ARM errata 814220 is selected by STM32MP157 SoC Signed-off-by: Benjamin Gaignard Acked-by: Arnd Bergmann Signed-off-by: Russell King arch/arm/mach-stm32/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 779eb41ccb2e8cc91b63ad5172dfaadcf663f1fa Author: Benjamin Gaignard Date: Tue May 21 10:17:39 2019 +0100 ARM: 8862/1: errata: 814220-B-Cache maintenance by set/way operations can execute out of order The v7 ARM states that all cache and branch predictor maintenance operations that do not specify an address execute, relative to each other, in program order. However, because of this erratum, an L2 set/way cache maintenance operation can overtake an L1 set/way cache maintenance operation, this would cause the data corruption. This ERRATA affected the Cortex-A7 and present in r0p2, r0p3, r0p4, r0p5. This patch is the SW workaround by adding a DSB before changing cache levels as the ARM ERRATA: ARM/MP: 814220 told in the ARM ERRATA documentation. Signed-off-by: Jason Liu Signed-off-by: Benjamin Gaignard Acked-by: Arnd Bergmann Signed-off-by: Russell King arch/arm/Kconfig | 12 ++++++++++++ arch/arm/mm/cache-v7.S | 3 +++ 2 files changed, 15 insertions(+) commit 2269f0c15191af317d64115176a01bf303532af3 Author: Maxime Ripard Date: Thu May 16 14:08:48 2019 +0200 dt-bindings: pwm: Convert Allwinner PWM to a schema The Allwinner SoCs have a PWM controller supported in Linux, with a matching Device Tree binding. Now that we have the DT validation in place, let's convert the device tree bindings for that controller over to a YAML schemas. Signed-off-by: Maxime Ripard .../bindings/pwm/allwinner,sun4i-a10-pwm.yaml | 57 ++++++++++++++++++++++ .../devicetree/bindings/pwm/pwm-sun4i.txt | 24 --------- 2 files changed, 57 insertions(+), 24 deletions(-) commit 9dd6f7c484fd2aaa468dfdf5087425ea9e4c7bf8 Author: Magnus Damm Date: Mon Jun 17 18:17:08 2019 +0900 ARM: dts: r8a7792: Add CMT0 and CMT1 to r8a7792 Add CMT0 and CMT1 to the R-Car Gen2 V2H (r8a7792) SoC. Signed-off-by: Magnus Damm Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7792.dtsi | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit 7eef616f1cec623bc9e79123b51d0c2ca134d87c Author: Fabrizio Castro Date: Mon Jun 3 10:53:52 2019 +0100 ARM: dts: iwg23s-sbc: Fix SDHI2 VccQ regulator SDR50 isn't working anymore because the GPIO regulator driver is using descriptors since commit d6cd33ad7102 ("regulator: gpio: Convert to use descriptors") which in turn causes the system to use the polarity of the GPIOs (as specified in the DT) for selecting the states, but the polarity specified in the DT is wrong. This patch fixes the regulator DT definition, and that fixes SDR50. Fixes: 9eb36b945b5c ("ARM: dts: iwg23s-sbc: Add uSD and eMMC support") Signed-off-by: Fabrizio Castro Signed-off-by: Simon Horman arch/arm/boot/dts/r8a77470-iwg23s-sbc.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d211650a87edc7f4130651c0ccbc0a4583fd72d3 Author: Fabrizio Castro Date: Mon Jun 3 10:53:51 2019 +0100 ARM: dts: iwg20d-q7-common: Fix SDHI1 VccQ regularor SDR50 isn't working anymore because the GPIO regulator driver is using descriptors since commit d6cd33ad7102 ("regulator: gpio: Convert to use descriptors") which in turn causes the system to use the polarity of the GPIOs (as specified in the DT) for selecting the states, but the polarity specified in the DT is wrong. This patch fixes the regulator DT definition, and that fixes SDR50. Fixes: 029efb3a03c5 ("ARM: dts: iwg20d-q7: Add SDHI1 support") Signed-off-by: Fabrizio Castro Signed-off-by: Simon Horman arch/arm/boot/dts/iwg20d-q7-common.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4592e49225cd40dcbc4c1e91772caa80da10f785 Author: Chris Brandt Date: Tue Jun 4 15:09:14 2019 -0500 ARM: dts: rza2mevb: Add input switch Add support for input switch SW3 on the Renesas RZ/A2M EVB development board. Note that this uses the IRQ interrupt, as the RZ/A2 GPIO controller does not include interrupt support Signed-off-by: Chris Brandt Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r7s9210-rza2mevb.dts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit e23391f36ce14719768ad5395e93a54fec7edf5a Author: Chris Brandt Date: Tue Jun 4 15:09:13 2019 -0500 ARM: dts: r7s9210: Add IRQC device node Enable support for the IRQC on RZ/A2M, which is a small front-end to the GIC. This allows to use up to 8 external interrupts with configurable sense select. Signed-off-by: Chris Brandt Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r7s9210.dtsi | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 1de78ccbda7835da6e1a75d5860267afb4f393f3 Author: Yoshihiro Kaneko Date: Fri May 17 23:43:07 2019 +0900 ARM: dts: rza2mevb: sort nodes of rza2mevb board This patch sorts the nodes of arch/arm/boot/dts/r7s9210-rza2mevb.dts. * Sort subnodes of root ("/") node alphabetically * Sort following top-level nodes alphabetically * Sort subnodes of pinctrl alphabetically Signed-off-by: Yoshihiro Kaneko [simon: rebase and sort new ehci nodes] Signed-off-by: Simon Horman arch/arm/boot/dts/r7s9210-rza2mevb.dts | 104 ++++++++++++++++----------------- 1 file changed, 52 insertions(+), 52 deletions(-) commit 07d2bf96e0e1bd12f78617282380bab62e5c3e38 Author: Magnus Damm Date: Sat May 18 19:03:57 2019 +0900 ARM: dts: renesas: Use ip=on for bootargs Convert bootargs from ip=dhcp to ip=on Signed-off-by: Magnus Damm Signed-off-by: Simon Horman arch/arm/boot/dts/emev2-kzm9d.dts | 2 +- arch/arm/boot/dts/r7s72100-genmai.dts | 2 +- arch/arm/boot/dts/r8a73a4-ape6evm.dts | 2 +- arch/arm/boot/dts/r8a7740-armadillo800eva.dts | 2 +- arch/arm/boot/dts/r8a7743-sk-rzg1m.dts | 2 +- arch/arm/boot/dts/r8a7745-iwg22d-sodimm.dts | 2 +- arch/arm/boot/dts/r8a7745-sk-rzg1e.dts | 2 +- arch/arm/boot/dts/r8a77470-iwg23s-sbc.dts | 2 +- arch/arm/boot/dts/r8a7778-bockw.dts | 2 +- arch/arm/boot/dts/r8a7779-marzen.dts | 2 +- arch/arm/boot/dts/r8a7790-lager.dts | 2 +- arch/arm/boot/dts/r8a7790-stout.dts | 2 +- arch/arm/boot/dts/r8a7791-koelsch.dts | 2 +- arch/arm/boot/dts/r8a7791-porter.dts | 2 +- arch/arm/boot/dts/r8a7792-blanche.dts | 2 +- arch/arm/boot/dts/r8a7792-wheat.dts | 2 +- arch/arm/boot/dts/r8a7793-gose.dts | 2 +- arch/arm/boot/dts/r8a7794-alt.dts | 2 +- arch/arm/boot/dts/r8a7794-silk.dts | 2 +- arch/arm/boot/dts/sh73a0-kzm9g.dts | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) commit 8d54094ef430d89cea75ef586183f05a7c9a2b22 Merge: 0ce353794b6c d494549ac885 Author: Jens Axboe Date: Thu Jun 20 23:37:20 2019 -0600 Merge branch 'md-next' of https://github.com/liu-song-6/linux into for-5.3/block Pull MD changes from Song. * 'md-next' of https://github.com/liu-song-6/linux: md: add bitmap_abort label in md_run md-bitmap: create and destroy wb_info_pool with the change of bitmap md-bitmap: create and destroy wb_info_pool with the change of backlog md: introduce mddev_create/destroy_wb_pool for the change of member device md/raid1: fix potential data inconsistency issue with write behind device commit 5c9dc6379f539c68a0fdd39e39a9d359545649e9 Author: Yoshihiro Shimoda Date: Mon Jun 10 15:23:55 2019 +0900 phy: renesas: rcar-gen3-usb2: fix imbalance powered flag The powered flag should be set for any other phys anyway. Also the flag should be locked by the channel. Otherwise, after we have revised the device tree for the usb phy, the following warning happened during a second system suspend. And if the driver doesn't lock the flag, an imbalance is possible when enabling the regulator during system resume. So, this patch fixes the issues. < The warning > [ 56.026531] unbalanced disables for USB20_VBUS0 [ 56.031108] WARNING: CPU: 3 PID: 513 at drivers/regulator/core.c:2593 _regula tor_disable+0xe0/0x1c0 [ 56.040146] Modules linked in: rcar_du_drm rcar_lvds drm_kms_helper drm drm_p anel_orientation_quirks vsp1 videobuf2_vmalloc videobuf2_dma_contig videobuf2_me mops videobuf2_v4l2 videobuf2_common videodev snd_soc_rcar renesas_usbhs snd_soc _audio_graph_card media snd_soc_simple_card_utils crct10dif_ce renesas_usb3 snd_ soc_ak4613 rcar_fcp pwm_rcar usb_dmac phy_rcar_gen3_usb3 pwm_bl ipv6 [ 56.074047] CPU: 3 PID: 513 Comm: kworker/u16:19 Not tainted 5.2.0-rc3-00001- g5f20a19 #6 [ 56.082129] Hardware name: Renesas Salvator-X board based on r8a7795 ES2.0+ ( DT) [ 56.089524] Workqueue: events_unbound async_run_entry_fn [ 56.094832] pstate: 40000005 (nZcv daif -PAN -UAO) [ 56.099617] pc : _regulator_disable+0xe0/0x1c0 [ 56.104054] lr : _regulator_disable+0xe0/0x1c0 [ 56.108489] sp : ffff0000121c3ae0 [ 56.111796] x29: ffff0000121c3ae0 x28: 0000000000000000 [ 56.117102] x27: 0000000000000000 x26: ffff000010fe0e60 [ 56.122407] x25: 0000000000000002 x24: 0000000000000001 [ 56.127712] x23: 0000000000000002 x22: ffff8006f99d4000 [ 56.133017] x21: ffff8006f99cc000 x20: ffff8006f9846800 [ 56.138322] x19: ffff8006f9846800 x18: ffffffffffffffff [ 56.143626] x17: 0000000000000000 x16: 0000000000000000 [ 56.148931] x15: ffff0000112f96c8 x14: ffff0000921c37f7 [ 56.154235] x13: ffff0000121c3805 x12: ffff000011312000 [ 56.159540] x11: 0000000005f5e0ff x10: ffff0000112f9f20 [ 56.164844] x9 : ffff0000112d3018 x8 : 00000000000001ad [ 56.170149] x7 : 00000000ffffffcc x6 : ffff8006ff768180 [ 56.175453] x5 : ffff8006ff768180 x4 : 0000000000000000 [ 56.180758] x3 : ffff8006ff76ef10 x2 : ffff8006ff768180 [ 56.186062] x1 : 3d2eccbaead8fb00 x0 : 0000000000000000 [ 56.191367] Call trace: [ 56.193808] _regulator_disable+0xe0/0x1c0 [ 56.197899] regulator_disable+0x40/0x78 [ 56.201820] rcar_gen3_phy_usb2_power_off+0x3c/0x50 [ 56.206692] phy_power_off+0x48/0xd8 [ 56.210263] usb_phy_roothub_power_off+0x30/0x50 [ 56.214873] usb_phy_roothub_suspend+0x1c/0x50 [ 56.219311] hcd_bus_suspend+0x13c/0x168 [ 56.223226] generic_suspend+0x4c/0x58 [ 56.226969] usb_suspend_both+0x1ac/0x238 [ 56.230972] usb_suspend+0xcc/0x170 [ 56.234455] usb_dev_suspend+0x10/0x18 [ 56.238199] dpm_run_callback.isra.6+0x20/0x68 [ 56.242635] __device_suspend+0x110/0x308 [ 56.246637] async_suspend+0x24/0xa8 [ 56.250205] async_run_entry_fn+0x40/0xf8 [ 56.254210] process_one_work+0x1e0/0x320 [ 56.258211] worker_thread+0x40/0x450 [ 56.261867] kthread+0x124/0x128 [ 56.265094] ret_from_fork+0x10/0x18 [ 56.268661] ---[ end trace 86d7ec5de5c517af ]--- [ 56.273290] phy phy-ee080200.usb-phy.10: phy poweroff failed --> -5 Reported-by: Geert Uytterhoeven Fixes: 549b6b55b005 ("phy: renesas: rcar-gen3-usb2: enable/disable independent irqs") Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Tested-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Kishon Vijay Abraham I drivers/phy/renesas/phy-rcar-gen3-usb2.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit 67c2eccb7d6ef953c0f382adfa8348211d919ff4 Author: Marc Gonzalez Date: Thu Jun 13 13:05:31 2019 +0200 phy: qcom-qmp: Drop useless msm8998_pciephy_cfg setting 'mask_com_pcs_ready' is only useful if 'has_phy_com_ctrl' is true. Since msm8998_pciephy_cfg.has_phy_com_ctrl is false, let's drop msm8998_pciephy_cfg.mask_com_pcs_ready altogether. Signed-off-by: Marc Gonzalez Signed-off-by: Kishon Vijay Abraham I drivers/phy/qualcomm/phy-qcom-qmp.c | 1 - 1 file changed, 1 deletion(-) commit 885bd765963b42c380db442db7f1c0f2a26076fa Author: Bjorn Andersson Date: Tue Jun 4 16:24:43 2019 -0700 phy: qcom-qmp: Correct READY_STATUS poll break condition After issuing a PHY_START request to the QMP, the hardware documentation states that the software should wait for the PCS_READY_STATUS to become 1. With the introduction of commit c9b589791fc1 ("phy: qcom: Utilize UFS reset controller") an additional 1ms delay was introduced between the start request and the check of the status bit. This greatly increases the chances for the hardware to actually becoming ready before the status bit is read. The result can be seen in that UFS PHY enabling is now reported as a failure in 10% of the boots on SDM845, which is a clear regression from the previous rare/occasional failure. This patch fixes the "break condition" of the poll to check for the correct state of the status bit. Unfortunately PCIe on 8996 and 8998 does not specify the mask_pcs_ready register, which means that the code checks a bit that's always 0. So the patch also fixes these, in order to not regress these targets. Fixes: 73d7ec899bd8 ("phy: qcom-qmp: Add msm8998 PCIe QMP PHY support") Fixes: e78f3d15e115 ("phy: qcom-qmp: new qmp phy driver for qcom-chipsets") Cc: stable@vger.kernel.org Cc: Evan Green Cc: Marc Gonzalez Cc: Vivek Gautam Reviewed-by: Evan Green Reviewed-by: Niklas Cassel Reviewed-by: Marc Gonzalez Tested-by: Marc Gonzalez Signed-off-by: Bjorn Andersson Signed-off-by: Kishon Vijay Abraham I drivers/phy/qualcomm/phy-qcom-qmp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 1853bc0ae64b035ba49d285cf8d3fb4991e7872e Author: YueHaibing Date: Thu Apr 18 21:36:33 2019 +0800 phy: ti: am654-serdes: Make serdes_am654_xlate() static Fix sparse warning: drivers/phy/ti/phy-am654-serdes.c:250:12: warning: symbol 'serdes_am654_xlate' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: YueHaibing Acked-by: Roger Quadros Signed-off-by: Kishon Vijay Abraham I drivers/phy/ti/phy-am654-serdes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 417f2544f48c19f5958790658c4aa30b0986647f Merge: 39a207d0cfce 1ee008f240ad Author: Dave Airlie Date: Fri Jun 21 13:59:49 2019 +1000 Merge tag 'drm-intel-next-2019-06-19' of git://anongit.freedesktop.org/drm/drm-intel into drm-next Features: - HDR support (Uma, Ville) - Add I2C symlink under HDMI connector similar to DP (Oleg) - Add ICL multi-segmented gamma support (Shashank, Uma) - Update register whitelist support for new hardware (Robert, John) - GuC firmware update with updated ABI interface (Michal, Oscar) - Add support for new DMC header versions (Lucas) - In-kernel blitter client for selftest use (Matthew) - Add Mule Creec Canyon (MCC) PCH support to go with EHL (Matt) - EHL platform feature updates (Matt) - Use Command Transport Buffers with GuC on all gens (Daniele) - New i915.force_probe module parameter to replace i915.alpha_support (Jani) Refactoring: - Better runtime PM code abstraction/encapsulation (Daniele) - VBT parsing cleanup and improvements (Jani) - Move display code to its own subdirectory (Jani) - Header cleanup (Jani, Daniele) - Prep work for subsclice mask expansion (Stuart) - Use uncore mmio register accessors more, remove unused macro wrappers (Tvrtko) - Remove unused atomic property get/set stubs (Maarten) - GTT cleanups and improvements (Mika) - Pass intel_ types instead of drm_ types in plenty of display code (Ville) - Engine reset, hangcheck, fault code cleanups and improvements (Tvrtko) - Consider AML variants simply as either KBL or CFL ULX (Ville) - State checker cleanups and improvements (Ville) - GEM code reorganization to more files under gem subdirectory (Chris) - Reducing dependency on a coarse struct_mutex (Chris) Fixes: - Fix use of uninitialized/incorrect error pointers (Colin, Dan) - Fix DSI fastboot on some VLV/CHV platforms (Hans) - Fix DSI error path (Hans) - Add ICL port A combo PHY HW state check (Imre) - Fix ICL AUX-B HW not done issue (Imre) - Fix perf whitelist on gen10+ (Lionel) - Fix PSR exit by forcing manual exit on older gens (José) - Match voltage ranges instead of exact values (Lucas) - Fix SDVO HDMI audio, with cleanups (Ville) - Fix plane state dumps (Ville) - Fix driver cleanup code to support driver hot unbind (Janusz) - Add checks for ICL memory bandwidth requirements (Ville) - Fix toggling between no C8 planes vs. at least one C8 plane (Ville) - Improved checks on PLL usage conditions, refactoring (Ville) - Avoid clobbering M/N values in fastset fuzzy checks (Ville) - Take a runtime pm wakeref for atomic commits (Chris) - Do not allow runtime pm autosuspend to remove userspace GGTT mmaps too quickly (Chris) - Avoid refcount_inc on known zero count to avoid debug flagging (Chris) Signed-off-by: Dave Airlie From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87v9x1lpdh.fsf@intel.com commit 39a207d0cfce9b9937864d82bb59745ceae0cf17 Merge: 031e610a6a21 836334fd7475 Author: Dave Airlie Date: Fri Jun 21 13:54:46 2019 +1000 Merge tag 'drm-misc-next-2019-06-20' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for v5.3: UAPI Changes: - Give each dma-buf their own inode, add DMA_BUF_SET_NAME ioctl and a show_fdinfo handler. Cross-subsystem Changes: - Pull in the topic/remove-fbcon-notifiers branch: * remove fbdev notifier usage for fbcon, as prep work to clean up the fbcon locking * assorted locking checks in vt/console code * assorted notifier and cleanups in fbdev and backlight code Core Changes: - Make drm_debugfs_create_files() never fail. - add debug print to update_vblank_count. - Add DP_DPCD_QUIRK_NO_SINK_COUNT quirk. - Add todo item for drm_gem_objects. - Unexport drm_gem_(un)pin/v(un)map. - Document struct drm_cmdline_mode. - Rewrite the command handler for mode names, and add support to specify rotation, reflection and overscan. With a new selftest! :) - Fixes to drm/client for improving rotation support, and fixing variable scope. - Small fixes to self refresh helper. Driver Changes: - Add rockchip RK3328 support. - Assorted driver fixes to rockchip, vc4, rcar-du, vkms. - Expose panfrost performance counters through unstable ioctl's, hidden behind a module parameter. - Enumerate CRC sources list in vkms. - Add a basic kms driver for the Ingenic JZ47xx SoC, which will be expanded soon with more advanced features. - Suspend/resume fix for stm. Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/18e22ec1-adf3-3a75-34a3-9fe09a91eef5@linux.intel.com commit a954f3ffc7fef951407790246f9bb046eef385c3 Author: Hawking Zhang Date: Sat Feb 16 22:22:46 2019 +0800 drm/amdgpu/psp11: skip ta firmware for navi10 Not used on Navi10. Signed-off-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 54 +++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 24 deletions(-) commit a698faf862f0e5d87505228bdd9ba65958a1607a Author: Hawking Zhang Date: Sat Feb 16 22:17:35 2019 +0800 drm/amdgpu: declare navi10 asd firmware So the dependencies are properly handled. Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 1 + 1 file changed, 1 insertion(+) commit 1316956284ac44b4714510186eb9091ed7829421 Author: Huang Rui Date: Thu Feb 14 19:08:22 2019 +0800 drm/amdgpu: load smc ucode at first with psp while rlc auto load is supported This patch loades smc ucode at first with psp while rlc auto load is supported on navi10. Signed-off-by: Huang Rui Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 35 ++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) commit bb67469e29f30462582fbf55690f1a41249fc1a5 Author: Hawking Zhang Date: Thu Jan 31 12:19:54 2019 +0800 drm/amdgpu: enable psp front door loading by default on navi10 Required for production hw and vddgfx. Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 119eb6db542f9d81ba9e488175ac171f3b29aee2 Author: Hawking Zhang Date: Thu Dec 13 01:29:53 2018 +0800 drm/amdgpu/psp: skip mec jt when autoload is enabled When autoload is enabled, there is no need to load mec jt, RLC will handle it automatically Signed-off-by: Hawking Zhang Acked-by: Alex Deucher Reviewed-by: Jack Xiao Reviewed-by: Le Ma Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 5 +++++ 1 file changed, 5 insertions(+) commit cc0beec2dd18b6fd506765542d7ee768a84f0159 Author: Hawking Zhang Date: Thu Dec 13 01:21:30 2018 +0800 drm/amd/amdgpu: add flag to mark whether autoload is supported or not rlc autoload is supported since navi10 Signed-off-by: Hawking Zhang Acked-by: Alex Deucher Reviewed-by: Jack Xiao Reviewed-by: Le Ma Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 2 ++ 1 file changed, 2 insertions(+) commit 1d1f41cf49d16c784682f8efff333475204d0e10 Author: Hawking Zhang Date: Thu Dec 13 01:23:56 2018 +0800 drm/amdgpu/psp: initialize autoload_supported flag in psp_sw_init RLC autoload is supported since from Navi10 Signed-off-by: Hawking Zhang Acked-by: Alex Deucher Reviewed-by: Jack Xiao Reviewed-by: Le Ma Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 4414ec6d14dada3a455d01ef4ab142d381dabbe4 Author: Hawking Zhang Date: Fri May 10 10:58:44 2019 -0500 drm/amdgpu/psp: update psp gfx interface to match with psp fw (v2) new psp gfx cmd is introuduced for rlc autoload v2: rebase (Alex) Signed-off-by: Hawking Zhang Acked-by: Alex Deucher Reviewed-by: Jack Xiao Reviewed-by: Le Ma Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/psp_gfx_if.h | 96 ++++++++++++++++++++++----------- 1 file changed, 66 insertions(+), 30 deletions(-) commit fba08a77bbbe0f3d0eff0d96c8b52243ae0fafe0 Author: Hawking Zhang Date: Mon Nov 12 16:33:08 2018 +0800 drm/amdgpu/psp: perform tmr_init and asd_init after loading sysdrv/sos Since from navi10, the tmr_size should be decided by psp sos according to toc header. Driver should issue LOAD_TOC to psp sos to get the tmr_size needed. The allocation of tmr_size then should be done only when sos/sysdrv loading completed Accordingly, asd_init also move to psp_hw_start after sos fw loading to make calling sequence consistent. Signed-off-by: Hawking Zhang Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 5160709d4509c4bda50ab35060b954f135a89fb6 Author: Hawking Zhang Date: Fri Nov 9 18:09:36 2018 +0800 drm/amdgpu/psp: switch to use sos_offset_bytes member as sys_bin_size Navi10 will have toc built-in sos binary so that using header.ucode_size_bytes minus sos_size_bytes actually is not sys_bin_size. Using sos_offset_bytes works for both vega20 (psp_firmware_header_v1_0) and navi10 (psp_firmware_header_v1_1) Signed-off-by: Hawking Zhang Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 1a5b4cca29ba7f256ebd683a2e636576d3b54e96 Author: Hawking Zhang Date: Wed Oct 24 19:41:13 2018 +0800 drm/amdgpu/psp: start rlc autoload after psp recieved all gfx firmware RLC handles firmware loading for gfx to support vddgfx feature. Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 28 ++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 5 +++++ drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 6 ++++++ 3 files changed, 39 insertions(+) commit 7ea49e7651896573e86a471518777584014226f3 Author: Hawking Zhang Date: Wed Oct 24 15:25:38 2018 +0800 drm/amdgpu/psp: add support to load TOC to psp Add support for the new load TOC command. Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 57 ++++++++++++++++++++++++++++++--- 1 file changed, 53 insertions(+), 4 deletions(-) commit 46ea9501fbc9c7cc24db647afcbe15c82518a494 Author: Hawking Zhang Date: Fri May 10 10:06:19 2019 -0500 drm/amdgpu/psp: add structure to support load toc in psp (v2) Update the psp interface for the new commands. v2: rebase (Alex) FIXME: GFX_CMD_ID_PROG_REG = 0x0000000B, /* program regs */ GFX_CMD_ID_LOAD_TOC = 0x0000000B, /* Load TOC and obtain TMR size */ Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/psp_gfx_if.h | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) commit 434dbb2a4abc5ed6484c9e17f535c27d941aa2fc Author: Hawking Zhang Date: Tue Oct 23 17:55:38 2018 +0800 drm/amdgpu/psp: support print out psp firmware header v1_1 info Support version 1.1. Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 37e919180c378c1fa3aca55c4052c650963f0bd1 Author: Hawking Zhang Date: Tue Oct 23 17:49:17 2018 +0800 drm/amdgpu/psp: print out psp v11 ucode hdr in drm debug mode Print the psp header data if requested. Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 1 + 1 file changed, 1 insertion(+) commit 6fa405646de66de83ee5166230793cc463815c17 Author: Hawking Zhang Date: Tue Oct 23 17:46:17 2018 +0800 drm/amdgpu: add helper function to print psp hdr print the psp header data like we do for other firmwares. Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 24 ++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 1 + 2 files changed, 25 insertions(+) commit 4a94ba8f376e6923fd36651b9f2f0b54b4a4608d Author: Hawking Zhang Date: Tue Oct 23 16:49:11 2018 +0800 drm/amdgpu: rename rlc autoload to backdoor autoload This is to differentiate rlc backdoor autoload from rlc frontdoor autoload Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 52718c844c60fa852a0f35c5e132b51618f90b14 Author: Hawking Zhang Date: Tue Oct 23 16:27:48 2018 +0800 drm/amdgpu: use rlc toc from psp sos binary Instead of putting toc into driver source code, the toc will be part of psp_sos fw. Driver need to get and parse it from psp fw Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_rlc.h | 93 +++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) commit 93d8f2221b5e9aea6acef1d68fa5603da3704197 Author: Hawking Zhang Date: Mon Oct 22 20:34:17 2018 +0800 drm/amdgpu/psp: support init psp sos microcode with build-in toc psp_firmware_header_v1_1 is used for psp sos with build-in toc Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 2 +- drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 31 ++++++++++++++++++++++++------- 2 files changed, 25 insertions(+), 8 deletions(-) commit 7d0906e83a2f5069189b0f088d8e5d29b77f179c Author: Hawking Zhang Date: Fri Oct 19 21:46:05 2018 +0800 drm/amdgpu: add structure to support build-in toc to psp sos Table Of Content (TOC) is used by RLC to auto load gc firmwares. PSP need to parse the toc to calculate the tmr size needed and load gc firmwares to tmr for RLC to auto load them finally Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 9 +++++++++ 2 files changed, 11 insertions(+) commit bc290fe552591e55b67794b7ed09c574b714b4ff Author: Tao Zhou Date: Mon May 21 16:32:05 2018 +0800 drm/amdgpu: Add psp 11.0 support for navi10. Add psp 11.0 code for navi10. psp 11.0 is not enabled for now. Will enable it when psp 11.0 firmware is available. Signed-off-by: Tao Zhou Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 1 + drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 27 +++++++++++++++++++++++---- 2 files changed, 24 insertions(+), 4 deletions(-) commit 9dd4b75cf0afdc5f42d1b972441464d47305d435 Author: Huang Rui Date: Tue Jul 18 19:29:37 2017 +0800 drm/amdgpu: set navi10's fw loading type as direct For bring up. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 2 ++ 1 file changed, 2 insertions(+) commit 5cc036a84705f14b5c071c7ed66b4c2be286d4f8 Author: Le.Ma Date: Thu Apr 26 16:15:39 2018 +0800 drm/amdgpu: add fw load type flag for rlc autoload Add another firmware load type AMDGPU_FW_LOAD_RLC_AUTO to support firmware autoloading new feature in gfx10. This flag can be leveraged for future engines that need autoload fw. Signed-off-by: Le.Ma Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 1 + 1 file changed, 1 insertion(+) commit 2beae55e392939f80e4ace11064c461e824f1a24 Author: Le.Ma Date: Thu Apr 26 16:13:14 2018 +0800 drm/amdgpu: add structures for buffer allocate/release for rlc autoload Allocate a visible framebuffer to store all gfxip ucodes as the format of TOC. Signed-off-by: Le.Ma Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_rlc.h | 5 +++++ 1 file changed, 5 insertions(+) commit edc611475a8adbdea8ce358216c5b1a9d710049c Author: Hawking Zhang Date: Sun Mar 3 13:02:40 2019 +0800 drm/amdgpu: add navi10 ih ip block (v3) IH is the interrupt handler block. v1: add initial ih support (Ray) v2: add dummy prescreen iv function for navi10 (Hawking) v3: squash in additional updates (Alex) Signed-off-by: Huang Rui Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Makefile | 3 +- drivers/gpu/drm/amd/amdgpu/navi10_ih.c | 486 +++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/navi10_ih.h | 29 ++ 3 files changed, 517 insertions(+), 1 deletion(-) commit 5527cd064012937915306806bcbb9de01f77b132 Author: Hawking Zhang Date: Tue Mar 5 19:52:22 2019 +0800 drm/amd/display: move dcn v1_0 irq source header to ivsrcid/dcn/ interrupt source packet definitions for the display block (DCN). Signed-off-by: Hawking Zhang Reviewed-by: Jack Xiao Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- drivers/gpu/drm/amd/display/dc/irq/dcn10/irq_service_dcn10.c | 2 +- drivers/gpu/drm/amd/include/ivsrcid/{ => dcn}/irqsrcs_dcn_1_0.h | 0 3 files changed, 2 insertions(+), 2 deletions(-) commit abade675e02e1b73da0c20ffaf08fbe309038298 Author: Hawking Zhang Date: Thu Dec 6 05:25:51 2018 +0800 drm/amdgpu: add irq sources for vcn v2_0 (v2) Add the interrupt source packet definitions. v2: update (Alex) Signed-off-by: Hawking Zhang Reviewed-by: Jack Xiao Signed-off-by: Alex Deucher .../drm/amd/include/ivsrcid/vcn/irqsrcs_vcn_2_0.h | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 4984dd069f2995f239f075199ee8c0d9f020bcd9 Author: Hawking Zhang Date: Sat Dec 8 23:06:41 2018 +0800 drm/amdgpu: add irq sources for sdma v5_0 Add the interrupt source packet definitions. Signed-off-by: Hawking Zhang Reviewed-by: Jack Xiao Signed-off-by: Alex Deucher .../amd/include/ivsrcid/sdma0/irqsrcs_sdma0_5_0.h | 43 +++++++++++++++++++++ .../amd/include/ivsrcid/sdma1/irqsrcs_sdma1_5_0.h | 44 ++++++++++++++++++++++ 2 files changed, 87 insertions(+) commit cb3908c133f1285069673f11ad651d14ae0406cf Author: Hawking Zhang Date: Thu Dec 6 05:23:34 2018 +0800 drm/amdgpu: add irq sources for gfx v10_1 Add the interrupt source packet definitions. Signed-off-by: Hawking Zhang Reviewed-by: Jack Xiao Signed-off-by: Alex Deucher .../drm/amd/include/ivsrcid/gfx/irqsrcs_gfx_10_1.h | 53 ++++++++++++++++++++++ 1 file changed, 53 insertions(+) commit f9df67e92404cba82b4a76c138d6d211cf27bf9c Author: Hawking Zhang Date: Mon Mar 4 16:27:14 2019 +0800 drm/amdgpu: add gmc v10 ip block for navi10 (v6) GMC in the GPU memory controller. v1: add place holder and initial basic implementation (Ray) v2: retire unused amdgpu_gart_set_defaults (Hawking) v3: re-work get_vm_pde function (Hawking) v4: replace legacy amdgpu_vram/gtt_location with amdgpu_gmc_vram/gtt_location (Hawking) v5: squash in updates (Alex) v6: use get_vbios_fb_size (Alex) Signed-off-by: Huang Rui Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 916 +++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/gmc_v10_0.h | 30 ++ 3 files changed, 947 insertions(+), 1 deletion(-) commit adc43c1b5e47856b6348c14b93a7ae5f44d670b3 Author: Hawking Zhang Date: Mon Mar 4 13:49:28 2019 +0800 drm/amdgpu: add mmhub v2 block for navi10 (v4) mmhub is the memory controller hub for multi-media (VCN). v1: add place holder and initial functions (Ray) v2: replace legacy amdgpu_mc structure with amdgpu_gmc (Hawking) v3: switch to use amdgpu_gmc_pd_addr (Hawking) v4: squash in updates (Alex) Signed-off-by: Huang Rui Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c | 442 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.h | 35 +++ 3 files changed, 478 insertions(+), 1 deletion(-) commit 770b93e9ee842f02529e12ca84076d0ee5a658ff Author: Hawking Zhang Date: Mon Mar 4 16:18:27 2019 +0800 drm/amdgpu: add gfxhub v2.0 block for navi10 (v4) gfxhub is the memory controller hub for gfx and sdma. v1: add place holder and initial basic functions (Ray) v2: replace the refernce to legacy mc structure with gmc structure remove the direct use of gart.table_addr (Hawking) v3: switch to use amdgpu_gmc_pd_addr (Hawking) v4: squash in updates (Alex) Signed-off-by: Huang Rui Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Makefile | 3 +- drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c | 352 +++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.h | 35 +++ 3 files changed, 389 insertions(+), 1 deletion(-) commit 7f95167ce131674ab77b46e4064f053e6c6f1552 Author: Jack Xiao Date: Fri Feb 22 15:34:00 2019 +0800 drm/amdgpu: refine the PTE encoding of PRT for navi10 Due to GCR change from navi10, the PTE encoding of PRT needs change VSCTL = 01111 (was 0XX1X). Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 5 +++++ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 2 ++ 2 files changed, 7 insertions(+) commit 7596ab68ff7dc13515f0c9dc3803472d75055c60 Author: Hawking Zhang Date: Mon Jun 25 21:03:40 2018 +0800 drm/amd/gmc9: rename AMDGPU_PTE_MTYPE to AMDGPU_PTE_MTYPE_VG10 To differentiate the mtypes across asics. Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 6 +++--- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 14 +++++++------- 4 files changed, 14 insertions(+), 14 deletions(-) commit c304b9e51914d6ffe765f35eb39310d35f988a28 Author: Hawking Zhang Date: Fri Apr 12 18:17:24 2019 -0500 drm/amdgpu: correct pte mtype field for navi The MTYPE filed moves from bits 58:57 to 50:48 for NV10 And the size of MTYPE field is now 3bits Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 9 +++++++-- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 6 +++++- 2 files changed, 12 insertions(+), 3 deletions(-) commit 367adb2ad5bd738b0899edb4825b356f810fd8d8 Author: Jack Xiao Date: Wed Feb 13 18:43:03 2019 +0800 drm/amdgpu/athub2: enable athub2 clock gating Enable athub2 clock gating and light sleep Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Makefile | 4 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 3 + drivers/gpu/drm/amd/amdgpu/athub_v2_0.c | 101 +++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/athub_v2_0.h | 30 +++++++++ drivers/gpu/drm/amd/include/amd_shared.h | 2 + 5 files changed, 140 insertions(+) commit 4a9ceb7dbadf9e1435644b1f49720ee87431ce26 Author: Mike Marciniszyn Date: Thu Jun 13 08:30:52 2019 -0400 IB/{rdmavt, qib, hfi1}: Convert to new completion API Convert all completions to use the new completion routine that fixes a race between post send and completion where fields from a SWQE can be read after SWQE has been freed. This patch also addresses issues reported in https://marc.info/?l=linux-kernel&m=155656897409107&w=2. The reserved operation path has no need for any barrier. The barrier for the other path is addressed by the smp_load_acquire() barrier. Cc: Andrea Parri Reviewed-by: Michael J. Ruhl Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/rc.c | 26 ++++---------------------- drivers/infiniband/hw/qib/qib_rc.c | 26 ++++---------------------- drivers/infiniband/sw/rdmavt/qp.c | 31 +++++++++---------------------- include/rdma/rdmavt_qp.h | 36 ------------------------------------ 4 files changed, 17 insertions(+), 102 deletions(-) commit f56044d686c82bd31713fc0398d68e322813dc62 Author: Mike Marciniszyn Date: Thu Jun 13 08:30:44 2019 -0400 IB/rdmavt: Add new completion inline There is opencoded send completion logic all over all the drivers. We need to convert to this routine to enforce ordering issues for completions. This routine fixes an ordering issue where the read of the SWQE fields necessary for creating the completion can race with a post send if the post send catches a send queue at the edge of being full. Is is possible in that situation to read SWQE fields that are being written. This new routine insures that SWQE fields are read prior to advancing the index that post send uses to determine queue fullness. Reviewed-by: Michael J. Ruhl Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford include/rdma/rdmavt_qp.h | 72 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) commit 9faa494e2fcc10162f725a3bda98b627b6f50bcb Author: Hawking Zhang Date: Sat Feb 2 15:03:11 2019 +0800 drm/amdgpu: add flag to support IH clock gating Add new flag for IH (interrupt handler) clockgating. Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/amd_shared.h | 1 + 1 file changed, 1 insertion(+) commit 714ff85251187a459c4eb28120d55b6a88cd2cb3 Author: Hawking Zhang Date: Wed Aug 29 21:18:19 2018 +0800 drm/amdgpu: add new HDP CG flags HDP 5.0 supports SRAM power gating. all the LS (Light Sleep)/ DS (Deep Sleep)/SD (Shut Down) modes are supported. However, only one of these modes can be enabled at one time. There is no dynamic power mode switch support. clock/power gating has to be disabled before making any power mode change. Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/amd_shared.h | 2 ++ 1 file changed, 2 insertions(+) commit 54fc447279ecfa919663448e4d8d640be9795a44 Author: Hawking Zhang Date: Tue Aug 14 20:54:35 2018 +0800 drm/amdgpu: create mqd for gfx queues on navi10 mqd is the memory queue descriptor for gfx and compute. Signed-off-by: Hawking Zhang Reviewed-by: Jack Xiao Reviewed-by: Alex Deucher Acked-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 35 ++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) commit 5bfca0692849b0faea3f884441a531bf88d0b525 Author: Jack Xiao Date: Thu Mar 21 18:20:23 2019 +0800 drm/amdgpu: enable async gfx ring by default VDDGFX requires gfx queue to be installed via MAP_QUEUES packet. Hence, enable async gfx ring by default. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 51bcce4621d86b71d75f8f493d65e83b72748fce Author: Hawking Zhang Date: Tue Jul 31 15:00:40 2018 +0800 drm/amdgpu: add module parameter for async_gfx_ring enablement 0 means disable async_gfx_ring and is the default setting 1 means enable async_gfx_ring Signed-off-by: Hawking Zhang Reviewed-by: Jack Xiao Reviewed-by: Alex Deucher Acked-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 9 +++++++++ 2 files changed, 10 insertions(+) commit 53b2fe415fb161b25efa685d89848db273e4ea42 Author: Hawking Zhang Date: Mon Mar 11 22:04:44 2019 +0800 drm/amdgpu: enable gfx eop interrupt per gfx pipe Navi10 has 2 gfx pipe and need to enable gfx eop interrupt per pipe, instead of enable eop int for all gfx pipes at one time. Signed-off-by: Hawking Zhang Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 ++- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 4 ++-- 5 files changed, 10 insertions(+), 9 deletions(-) commit 19191961659c5208a03f81fabe2688ddd6264efb Author: Jack Xiao Date: Tue Jan 8 13:33:46 2019 +0800 drm/amdgpu/gfx10: add special unmap_queues packet for preemption CP introduced a special unmap_queues packet for gfx preemtion. Acked-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Jack Xiao Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 11 ++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) commit 849aca9f9c033af8e8342193425bcbf1a9340817 Author: Hawking Zhang Date: Tue Mar 5 22:05:02 2019 +0800 drm/amdgpu: Move common code to amdgpu_gfx.c move common code to amdgpu_gfx_enable_kcq,so this function can be shared with gfx8 and gfx9 Signed-off-by: Hawking Zhang Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 47 +++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 1 + 2 files changed, 48 insertions(+) commit ba0c13b7747ba0157603414366bbe5a00a2f32cd Author: Rex Zhu Date: Wed Aug 22 13:45:25 2018 +0800 drm/amdgpu: Add common gfx func Disable kcq via kiq so can be shared with gfx8 and gfx9 Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 19 +++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 1 + 2 files changed, 20 insertions(+) commit bc4a6f71355f8abda43b379a5c86735f1de57e58 Author: Rex Zhu Date: Wed Aug 22 11:44:20 2018 +0800 drm/amdgpu: Add struct kiq_pm4_funcs into kiq struct kiq can support 4 pm4 scheduler packets set_resource, map_queues, unmap_queues, query_status. Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 4fc6a88f01b938b03298779a9a7b8eb2b66fdace Author: Hawking Zhang Date: Wed Aug 1 12:03:20 2018 +0800 drm/amdgpu: rename amdgpu_gfx_compute_mqd_sw_init The function now will create mqd bos for both gfx queue and compute queue Signed-off-by: Hawking Zhang Reviewed-by: Jack Xiao Reviewed-by: Alex Deucher Acked-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 8 ++++---- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 6 +++--- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) commit 7470bfcf20141306e2f23d7b0484dc70ba1483fd Author: Hawking Zhang Date: Tue Jul 31 15:43:10 2018 +0800 drm/amdgpu: add helper function for gfx queue/bitmap transition Similar to what we do for compute already. Signed-off-by: Hawking Zhang Reviewed-by: Jack Xiao Reviewed-by: Alex Deucher Acked-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 42 +++++++++++++++++++++++++----- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 14 +++++++--- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 18 ++++++------- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 18 ++++++------- 5 files changed, 65 insertions(+), 29 deletions(-) commit e537c9946115cf5391f417c23d2601ca8582db9c Author: Hawking Zhang Date: Wed Aug 8 15:16:43 2018 +0800 drm/amdgpu: acquire available gfx queues currently, amdgpu will owns the first gfx queue of each pipe they are: me:0 pipe:0 queue:0 me:0 pipe:1 queue:0 Signed-off-by: Hawking Zhang Reviewed-by: Jack Xiao Reviewed-by: Alex Deucher Acked-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 24 ++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 2 ++ 2 files changed, 26 insertions(+) commit cf02b03f7c001c8fdbc8d8e6b71e83d4efe72441 Author: Hawking Zhang Date: Fri Aug 3 17:26:33 2018 +0800 drm/amdgpu: add members in amdgpu_me for gfx queue Update the structure for gfx10. Signed-off-by: Hawking Zhang Reviewed-by: Jack Xiao Reviewed-by: Alex Deucher Acked-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit 8825af65ffc1d9eb3fafd8841a741c4f5bef88c8 Author: Hawking Zhang Date: Mon Sep 4 17:17:39 2017 +0800 drm/amdgpu/gfx10: new approach to load gfx10 me fw (v4) gfx10 allows to only upload me jumptable while save the whole me image at gtt memory. v2: program CP_ME_IC_BASE_CNTL to default value v3: switch to use amdgpu_bo_create_reserved to create me fw bo v4: split common code from gfx10 code Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Acked-by: Huang Rui Reviewed-by: Evan Quan Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 7 +++++++ 1 file changed, 7 insertions(+) commit 2a00bb13226b05688f90b6fa49c993e2eb8f08aa Author: Hawking Zhang Date: Mon Sep 4 17:14:47 2017 +0800 drm/amdgpu/gfx10: new approach to load ce fw (v4) gfx10 allows to only upload ce jumptable while save the whole ce image at gtt memory. v2: program CP_CE_IC_BASE_CNTL to default value v3: switch to use amdgpu_bo_create_reserved to create ce fw bo v4: split common code from gfx10 code Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Acked-by: Huang Rui Reviewed-by: Evan Quan Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 7 +++++++ 1 file changed, 7 insertions(+) commit 068ed934ee57186ef3818f30942e46b78fa67881 Author: Hawking Zhang Date: Wed Jan 10 18:12:44 2018 +0800 drm/amdgpu/gfx10: new approach to load pfp fw (v4) gfx10 allows to only upload pfp jumptable while save the whole pfp image at gtt memory. v2: program CP_PFP_IC_BASE_CNTL to default value v3: switch to use amdgpu_bo_create_reserved to create pfp fw bo v4: split common code from gfx10 code Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Acked-by: Huang Rui Reviewed-by: Evan Quan Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 7 +++++++ 1 file changed, 7 insertions(+) commit 225cef9d88507888143d3d781abfdba2dc8c21de Author: Hawking Zhang Date: Fri Apr 12 16:51:19 2019 -0500 drm/amdgpu: add nbio v2.3 for navi10 (v4) nbio handles bus io functionality. v1: add place holder and initial basic nbio v2.3 functions (Ray) v2: implements and expose all functions in format of nbio_v2_3_funcs (Hawking) v3: squash in updates (Alex) v4: whitespace fix (Alex) Signed-off-by: Huang Rui Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- drivers/gpu/drm/amd/amdgpu/nbio_v2_3.c | 334 +++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/nbio_v2_3.h | 31 +++ 3 files changed, 366 insertions(+), 1 deletion(-) commit 031e610a6a21448a63dff7a0416e5e206724caac Merge: 52d2d44eee80 9bbfda544ed7 Author: Dave Airlie Date: Fri Jun 21 12:06:03 2019 +1000 Merge branch 'vmwgfx-next' of git://people.freedesktop.org/~thomash/linux into drm-next - The coherent memory changes including mm changes. - Some vmwgfx debug fixes. - Removal of vmwgfx legacy security checks. Signed-off-by: Dave Airlie From: Thomas Hellstrom Link: https://patchwork.freedesktop.org/patch/msgid/20190619072531.4026-1-thomas@shipmail.org commit b45ddfe811b99beae895be0e00d84d4aa1bf6c54 Author: Leo Liu Date: Tue Oct 16 09:54:20 2018 -0400 drm/amdgpu: add nbio callbacks for vcn doorbell support For Navi10 VCN2.0, the engine supports Doorbell Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++ 1 file changed, 2 insertions(+) commit 09fa0613bd9fb1a3ce986062414a48fea32c6e28 Author: Hawking Zhang Date: Tue Dec 11 07:12:16 2018 +0800 drm/amdgpu: query vram_width from vram_info table Driver will get channel_number and channel_width from vram_info table, then calculate vram_width by multiply channel_number by channel_width Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Reviewed-by: Jack Xiao Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 46 +++++++++++++++++++----- 1 file changed, 37 insertions(+), 9 deletions(-) commit 89d7a79c7bd9a9993a78aaad835cf7be3c7dcbfd Author: Hawking Zhang Date: Tue Dec 11 05:20:12 2018 +0800 drm/amdgpu: query vram type from atomfirmware vram_info vram_type is saved in member vram_module[0].memory_type Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Reviewed-by: Jack Xiao Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 98cd7f5b1837fd103088bfffacc4900372788e1d Author: Hawking Zhang Date: Mon Mar 4 14:29:55 2019 +0800 drm/amdgpu: add navi pm4 header A pm4 header for Navi. PM4 is the packet format used by the compute and gfx engines. Signed-off-by: Huang Rui Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/nvd.h | 418 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 418 insertions(+) commit 9a87c32fdabf9492b58e1299b51b640daef29e57 Author: Hawking Zhang Date: Sun Mar 3 13:13:05 2019 +0800 drm/amdgpu: add sdma v5 packet header file Defines the SDMA packet formats. Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/navi10_sdma_pkt_open.h | 4806 +++++++++++++++++++++ 1 file changed, 4806 insertions(+) commit 1f43631be5f98738ecac57366745d78812638d0f Author: Huang Rui Date: Wed Aug 9 20:48:04 2017 +0800 drm/amdgpu: add gfx v10 clear state header v2 Clear state for gfx pipe. v2: squash in updates Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/clearstate_gfx10.h | 975 ++++++++++++++++++++++++++ 1 file changed, 975 insertions(+) commit a9833d02b515ecc14cd5f21beb5bb5e776354318 Author: Huang Rui Date: Thu Sep 14 20:34:37 2017 +0800 drm/amdgpu: add v10 structs header (v2) Header for CP structures (MQD, etc.) V2: squash in updates Signed-off-by: Huang Rui Acked-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/v10_structs.h | 1258 +++++++++++++++++++++++++++++ 1 file changed, 1258 insertions(+) commit 35c2e91059cbefdcb8c03d3405e59eec7af389b5 Author: Hawking Zhang Date: Wed Jun 13 12:19:43 2018 +0800 drm/amdgpu: parse the new members added by gpu_info ucode v1_1 Parse the new parameters for gfx10. Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 109c80ddb40ff2c01554f3777cf996276dac4fe6 Author: Hawking Zhang Date: Wed Jun 13 11:18:42 2018 +0800 drm/amdgpu: add gpu_info_firmware v1_1 structure for navi10 two new members that specific for navi10 are included in v2_0: num_sc_per_sh and num_packer_per_sc Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 6 ++++++ 1 file changed, 6 insertions(+) commit 23c6268eb1968b4baa13ebe4caaf6d3bca98d983 Author: Huang Rui Date: Fri Aug 4 11:10:15 2017 +0800 drm/amdgpu: add navi10 gpu info firmware gpu info firmware stores configuration data for various IP blocks. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++++ 1 file changed, 4 insertions(+) commit 3e514732c0e13bb31b97e49b294c7e417fd35165 Author: Hawking Zhang Date: Tue Jun 12 17:10:19 2018 +0800 drm/amdgpu: add gfx10 specific new member pa_sc_tile_steering_override New gfx config parameter. Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 1 + 1 file changed, 1 insertion(+) commit 02a9e40a83bc220c6cb7dfc62b2e73d517cf6172 Author: Hawking Zhang Date: Tue Jun 12 17:05:59 2018 +0800 drm/amdgpu: add gfx10 specific config in amdgpu_gfx_config The two members are used to cache the values from gpu_info fw accordingly Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 3 +++ 1 file changed, 3 insertions(+) commit 5228fe3010f03f865427ddb5cc104fd69410ce46 Author: Hawking Zhang Date: Wed May 2 17:52:39 2018 +0800 drm/amdgpu: Add GDDR6 in vram_name arrary For printing vram type. Signed-off-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 1 + 1 file changed, 1 insertion(+) commit d67383e6b764957b39667af2754920e38a5eb43e Author: Huang Rui Date: Tue Jul 18 18:59:24 2017 +0800 drm/amdgpu: add GDDR6 vram type New vram type. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher include/uapi/drm/amdgpu_drm.h | 1 + 1 file changed, 1 insertion(+) commit dd82e668892ead6fe97c97eabd7ba28e296052c6 Author: Jason Gunthorpe Date: Thu Jun 13 21:46:45 2019 -0300 RDMA/odp: Do not leak dma maps when working with huge pages The ib_dma_unmap_page() must match the length of the ib_dma_map_page(), which is based on odp_shift. Otherwise iommu resources under this API will not be properly freed. Signed-off-by: Jason Gunthorpe Signed-off-by: Doug Ledford drivers/infiniband/core/umem_odp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d384742ed1afa925bb78fd50ff337538f202f19c Author: Jason Gunthorpe Date: Fri Jun 14 00:13:51 2019 +0000 RDMA/uverbs: Use offsetofend instead of opencoding Discovered this was available already. Signed-off-by: Jason Gunthorpe Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_cmd.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 4e19d6b65fb4fc42e352ce9883649e049da14743 Author: Theodore Ts'o Date: Thu Jun 20 21:19:02 2019 -0400 ext4: allow directory holes The largedir feature was intended to allow ext4 directories to have unmapped directory blocks (e.g., directory holes). And so the released e2fsprogs no longer enforces this for largedir file systems; however, the corresponding change to the kernel-side code was not made. This commit fixes this oversight. Signed-off-by: Theodore Ts'o Cc: stable@kernel.org fs/ext4/dir.c | 19 +++++++++---------- fs/ext4/namei.c | 45 +++++++++++++++++++++++++++++++++++++-------- 2 files changed, 46 insertions(+), 18 deletions(-) commit 40cdc60ac16a42eb4e013f84d0e7aa1d6ee060d3 Author: Vishal Verma Date: Thu Jun 20 18:40:38 2019 -0600 device-dax: Add a 'resource' attribute device-dax based devices were missing a 'resource' attribute to indicate the physical address range contributed by the device in question. This information is desirable to userspace tooling that may want to use the dax device as system-ram, and wants to selectively hotplug and online the memory blocks associated with a given device. Without this, the tooling would have to parse /proc/iomem for the memory ranges contributed by dax devices, which can be a workaround, but it is far easier to provide this information in the sysfs hierarchy. Cc: Dave Hansen Cc: Dan Williams Signed-off-by: Vishal Verma Signed-off-by: Dan Williams drivers/dax/bus.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit d68dbb0c9ac8b1ff52eb09aa58ce6358400fa939 Author: Christian Brauner Date: Fri Jun 21 01:26:35 2019 +0200 arch: handle arches who do not yet define clone3 This cleanly handles arches who do not yet define clone3. clone3() was initially placed under __ARCH_WANT_SYS_CLONE under the assumption that this would cleanly handle all architectures. It does not. Architectures such as nios2 or h8300 simply take the asm-generic syscall definitions and generate their syscall table from it. Since they don't define __ARCH_WANT_SYS_CLONE the build would fail complaining about sys_clone3 missing. The reason this doesn't happen for legacy clone is that nios2 and h8300 provide assembly stubs for sys_clone. This seems to be done for architectural reasons. The build failures for nios2 and h8300 were caught int -next luckily. The solution is to define __ARCH_WANT_SYS_CLONE3 that architectures can add. Additionally, we need a cond_syscall(clone3) for architectures such as nios2 or h8300 that generate their syscall table in the way I explained above. Fixes: 8f3220a80654 ("arch: wire-up clone3() syscall") Signed-off-by: Christian Brauner Cc: Arnd Bergmann Cc: Kees Cook Cc: David Howells Cc: Andrew Morton Cc: Oleg Nesterov Cc: Adrian Reber Cc: Linus Torvalds Cc: Al Viro Cc: Florian Weimer Cc: linux-api@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: x86@kernel.org arch/arm/include/asm/unistd.h | 1 + arch/arm64/include/asm/unistd.h | 1 + arch/x86/include/asm/unistd.h | 1 + arch/xtensa/include/asm/unistd.h | 1 + kernel/fork.c | 2 ++ kernel/sys_ni.c | 2 ++ 6 files changed, 8 insertions(+) commit d494549ac8852ec42854d1491dd17bb9350a0abc Author: Guoqing Jiang Date: Fri Jun 14 17:10:39 2019 +0800 md: add bitmap_abort label in md_run Now, there are two places need to consider about the failure of destroy bitmap, so move the common part between bitmap_abort and abort label. Reviewed-by: NeilBrown Signed-off-by: Guoqing Jiang Signed-off-by: Song Liu drivers/md/md.c | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) commit 617b194a13c0f3b0a6d14fc6227c222877c23b4e Author: Guoqing Jiang Date: Fri Jun 14 17:10:38 2019 +0800 md-bitmap: create and destroy wb_info_pool with the change of bitmap The write-behind attribute is part of bitmap, since bitmap can be added/removed dynamically with the following. 1. mdadm --grow /dev/md0 --bitmap=none 2. mdadm --grow /dev/md0 --bitmap=internal --write-behind So we need to destroy wb_info_pool in md_bitmap_destroy, and create the pool before load bitmap. Reviewed-by: NeilBrown Signed-off-by: Guoqing Jiang Signed-off-by: Song Liu drivers/md/md-bitmap.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 10c92fca636e40dcb15d85ffe06b1b6843cd28fc Author: Guoqing Jiang Date: Fri Jun 14 17:10:37 2019 +0800 md-bitmap: create and destroy wb_info_pool with the change of backlog Since we can enable write-behind mode by write backlog node, so create wb_info_pool if the mode is just enabled, also call call md_bitmap_update_sb to make user aware the write-behind mode is enabled. Conversely, wb_info_pool should be destroyed when write-behind mode is disabled. Beside above, it is better to update bitmap sb if we change the number of max_write_behind. Reviewed-by: NeilBrown Signed-off-by: Guoqing Jiang Signed-off-by: Song Liu drivers/md/md-bitmap.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 963c555e75b033202dd76cf6325a7b7c83d08d5f Author: Guoqing Jiang Date: Fri Jun 14 17:10:36 2019 +0800 md: introduce mddev_create/destroy_wb_pool for the change of member device Previously, we called rdev_init_wb to avoid potential data inconsistency when array is created. Now, we need to call the function and create mempool if a device is added or just be flaged as "writemostly". So mddev_create_wb_pool is introduced and called accordingly. And for safety reason, we mark implicit GFP_NOIO allocation scope for create mempool during mddev_suspend/mddev_resume. And mempool should be removed conversely after remove a member device or its's "writemostly" flag, which is done by call mddev_destroy_wb_pool. Reviewed-by: NeilBrown Signed-off-by: Guoqing Jiang Signed-off-by: Song Liu drivers/md/md.c | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ drivers/md/md.h | 2 ++ 2 files changed, 67 insertions(+) commit 3e148a3209792e04f63ec99701235c960765fc9a Author: Guoqing Jiang Date: Wed Jun 19 17:30:46 2019 +0800 md/raid1: fix potential data inconsistency issue with write behind device For write-behind mode, we think write IO is complete once it has reached all the non-writemostly devices. It works fine for single queue devices. But for multiqueue device, if there are lots of IOs come from upper layer, then the write-behind device could issue those IOs to different queues, depends on the each queue's delay, so there is no guarantee that those IOs can arrive in order. To address the issue, we need to check the collision among write behind IOs, we can only continue without collision, otherwise wait for the completion of previous collisioned IO. And WBCollision is introduced for multiqueue device which is worked under write-behind mode. But this patch doesn't handle below cases which could have the data inconsistency issue as well, these cases will be handled in later patches. 1. modify max_write_behind by write backlog node. 2. add or remove array's bitmap dynamically. 3. the change of member disk. Reviewed-by: NeilBrown Signed-off-by: Guoqing Jiang Signed-off-by: Song Liu drivers/md/md.c | 41 ++++++++++++++++++++++++++++++++ drivers/md/md.h | 21 +++++++++++++++++ drivers/md/raid1.c | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 129 insertions(+), 1 deletion(-) commit 62b52c8ce9d4b7666e293b95bc511cbcabeebe7f Author: Dongli Zhang Date: Wed Jun 19 15:52:19 2019 +0800 scsi: virtio_scsi: remove unused 'affinity_hint_set' The 'affinity_hint_set' is not used any longer since commit 0d9f0a52c8b9 ("virtio_scsi: use virtio IRQ affinity"). Signed-off-by: Dongli Zhang Acked-by: Paolo Bonzini Signed-off-by: Martin K. Petersen drivers/scsi/virtio_scsi.c | 3 --- 1 file changed, 3 deletions(-) commit 9382cde8cd8fb941fc333b644a5772d02e1ff924 Author: Theodore Ts'o Date: Thu Jun 20 17:32:21 2019 -0400 jbd2: drop declaration of journal_sync_buffer() The journal_sync_buffer() function was never carried over from jbd to jbd2. So get rid of the vestigal declaration of this (non-existent) function. Signed-off-by: Theodore Ts'o Reviewed-by: Darrick J. Wong fs/jbd2/journal.c | 3 --- include/linux/jbd2.h | 1 - 2 files changed, 4 deletions(-) commit e6c4375f7c9293ffa65469d16f8ebd2586cb03f2 Author: YueHaibing Date: Tue Jun 4 07:19:57 2019 +0100 ARM: 8865/1: mm: remove unused variables Fix gcc warnings: arch/arm/mm/init.c: In function 'mem_init': arch/arm/mm/init.c:456:13: warning: unused variable 'itcm_end' [-Wunused-variable] extern u32 itcm_end; ^ arch/arm/mm/init.c:455:13: warning: unused variable 'dtcm_end' [-Wunused-variable] extern u32 dtcm_end; ^ They are not used any more since commit 1c31d4e96b8c ("ARM: 8820/1: mm: Stop printing the virtual memory layout") Link: https://lkml.org/lkml/2019/5/12/82 Signed-off-by: YueHaibing Reviewed-by: Geert Uytterhoeven Reviewed-by: Krzysztof Kozlowski Signed-off-by: Russell King arch/arm/mm/init.c | 6 ------ 1 file changed, 6 deletions(-) commit 5f41f9198f296091c6a58bc2e86af1e9f019b2a3 Author: Marek Szyprowski Date: Tue May 28 09:38:14 2019 +0100 ARM: 8864/1: Add workaround for I-Cache line size mismatch between CPU cores Some big.LITTLE systems have I-Cache line size mismatch between LITTLE and big cores. This patch adds a workaround for proper I-Cache support on such systems. Without it, some class of the userspace code (typically self-modifying) might suffer from random SIGILL failures. Similar workaround already exists for ARM64 architecture. I has been added by commit 116c81f427ff ("arm64: Work around systems with mismatched cache line sizes"). Signed-off-by: Marek Szyprowski Signed-off-by: Russell King arch/arm/configs/exynos_defconfig | 1 + arch/arm/include/asm/cacheflush.h | 7 +++++++ arch/arm/kernel/smp.c | 1 + arch/arm/mm/Kconfig | 8 ++++++++ arch/arm/mm/cache-v7.S | 13 +++++++++++++ arch/arm/mm/init.c | 16 ++++++++++++++++ arch/arm/mm/mm.h | 2 ++ 7 files changed, 48 insertions(+) commit 304009a182b9fc6eff74060b415c8240380501cb Author: Doug Anderson Date: Fri Apr 26 23:35:46 2019 +0100 ARM: 8861/1: errata: Workaround errata A12 857271 / A17 857272 This adds support for working around errata A12 857271 / A17 857272. These errata were causing hangs on rk3288-based Chromebooks and it was confirmed that this workaround fixed the problems. In the Chrome OS 3.14 kernel this was treated as two errata: ERRATA_FOOBAR [1] and ERRATA_CR711784 [2]. Apparently the two errata got lumped together at some point in time. Let's actually get the workaround landed. [1] https://crrev.com/c/342753 [2] https://crbug.com/711784 Signed-off-by: Douglas Anderson Signed-off-by: Sonny Rao Signed-off-by: Russell King arch/arm/Kconfig | 18 ++++++++++++++++++ arch/arm/mm/proc-v7.S | 10 ++++++++++ 2 files changed, 28 insertions(+) commit b777a981d504678d7d90e7449a3da0b2924a2a76 Author: Nick Desaulniers Date: Wed Apr 24 19:37:46 2019 +0100 ARM: 8860/1: VDSO: Drop implicit common-page-size linker flag GNU linker's -z common-page-size's default value is based on the target architecture. arch/arm/vdso/Makefile sets it to the architecture default, which is implicit and redundant. Drop it. Link: https://lkml.kernel.org/r/20181206191231.192355-1-ndesaulniers@google.com Acked-by: Arnd Bergmann Acked-by: Nathan Lynch Suggested-by: Nathan Chancellor Signed-off-by: Nick Desaulniers Signed-off-by: Russell King arch/arm/vdso/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 49b38c345baa1bfdb79ff7f546755c29ea59e028 Author: Russell King Date: Tue Jan 29 15:44:38 2019 +0000 ARM: arrange show_pte() to issue severity-based messages show_pte() is used to print information after various other kernel messages, which themselves are printed at different severities. Include the severity in the show_pte() information so that associated messages are printed with the same severity. Signed-off-by: Russell King arch/arm/include/asm/bug.h | 2 +- arch/arm/kernel/traps.c | 2 +- arch/arm/mm/fault.c | 17 ++++++++--------- 3 files changed, 10 insertions(+), 11 deletions(-) commit bafeb7a0d9213e64a0e09d149b52abeb0c8798b5 Author: Russell King Date: Tue Jan 29 14:07:58 2019 +0000 ARM: add "8<--- cut here ---" to kernel dumps Add a "8<--- cut here ---" marker to kernel dumps to help users cut the dump at the right place when emailing list, rather than cutting off the first line which gives the reason for the dump. Signed-off-by: Russell King arch/arm/kernel/traps.c | 1 + arch/arm/mm/fault.c | 3 +++ 2 files changed, 4 insertions(+) commit 73131fbb003b3691cfcf9656f234b00da497fcd6 Author: Ross Zwisler Date: Thu Jun 20 17:26:26 2019 -0400 ext4: use jbd2_inode dirty range scoping Use the newly introduced jbd2_inode dirty range scoping to prevent us from waiting forever when trying to complete a journal transaction. Signed-off-by: Ross Zwisler Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara Cc: stable@vger.kernel.org fs/ext4/ext4_jbd2.h | 12 ++++++------ fs/ext4/inode.c | 13 ++++++++++--- fs/ext4/move_extent.c | 3 ++- 3 files changed, 18 insertions(+), 10 deletions(-) commit 6ba0e7dc64a5adcda2fbe65adc466891795d639e Author: Ross Zwisler Date: Thu Jun 20 17:24:56 2019 -0400 jbd2: introduce jbd2_inode dirty range scoping Currently both journal_submit_inode_data_buffers() and journal_finish_inode_data_buffers() operate on the entire address space of each of the inodes associated with a given journal entry. The consequence of this is that if we have an inode where we are constantly appending dirty pages we can end up waiting for an indefinite amount of time in journal_finish_inode_data_buffers() while we wait for all the pages under writeback to be written out. The easiest way to cause this type of workload is do just dd from /dev/zero to a file until it fills the entire filesystem. This can cause journal_finish_inode_data_buffers() to wait for the duration of the entire dd operation. We can improve this situation by scoping each of the inode dirty ranges associated with a given transaction. We do this via the jbd2_inode structure so that the scoping is contained within jbd2 and so that it follows the lifetime and locking rules for that structure. This allows us to limit the writeback & wait in journal_submit_inode_data_buffers() and journal_finish_inode_data_buffers() respectively to the dirty range for a given struct jdb2_inode, keeping us from waiting forever if the inode in question is still being appended to. Signed-off-by: Ross Zwisler Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara Cc: stable@vger.kernel.org fs/jbd2/commit.c | 23 +++++++++++++++++------ fs/jbd2/journal.c | 4 ++++ fs/jbd2/transaction.c | 49 ++++++++++++++++++++++++++++--------------------- include/linux/jbd2.h | 22 ++++++++++++++++++++++ 4 files changed, 71 insertions(+), 27 deletions(-) commit aa0bfcd939c30617385ffa28682c062d78050eba Author: Ross Zwisler Date: Thu Jun 20 17:05:37 2019 -0400 mm: add filemap_fdatawait_range_keep_errors() In the spirit of filemap_fdatawait_range() and filemap_fdatawait_keep_errors(), introduce filemap_fdatawait_range_keep_errors() which both takes a range upon which to wait and does not clear errors from the address space. Signed-off-by: Ross Zwisler Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara Cc: stable@vger.kernel.org include/linux/fs.h | 2 ++ mm/filemap.c | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+) commit 2aa31767259722d159e07240b0b8482a54223c2a Author: Sean Paul Date: Fri May 24 16:29:13 2019 -0400 drm/msm: Re-order uninit function to work during probe defer If bind fails, we can call msm_drm_uninit before kms elements have been created. In this case, drm_atomic_helper_shutdown will fail since there are no drm objects. Only call drm unregistration and shutdown if drm is registered. Also while we're in here move the workqueue destruction to below component_unbind since components could be actively using the wq during uninit or in their unbind routine. Reviewed-by: Rob Clark Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190524202919.179289-1-sean@poorly.run drivers/gpu/drm/msm/msm_drv.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit a2c6e82e5341a283b06b04029f952598e445b159 Author: Martin Blumenstingl Date: Sat Jun 15 12:38:30 2019 +0200 ARM: dts: meson: switch to the generic Ethernet PHY reset bindings The snps,reset-gpio bindings are deprecated in favour of the generic "Ethernet PHY reset" bindings. Replace snps,reset-gpio from the ðmac node with reset-gpios in the ethernet-phy node. The old snps,reset-active-low property is now encoded directly as GPIO flag inside the reset-gpios property. snps,reset-delays-us is converted to reset-assert-us and reset-deassert-us. reset-assert-us is the second cell from snps,reset-delays-us while reset-deassert-us was the third cell. Instead of blindly copying the old values (which seems strange since they gave the PHY one second to come out of reset) over this also updates the delays based on the datasheets: - RTL8211F PHY on the Odroid-C1 and MXIII-Plus needs a 10ms assert delay (the datasheet mentions: "For a complete PHY reset, this pin must be asserted low for at least 10ms") and a 30ms deassert delay (the datasheet mentions: "Wait for a further 30ms (for internal circuits settling time) before accessing the PHY register"). The old settings used 10ms for assert and 1000ms for deassert. - IP101GR PHY on the EC-100 and MXQ needs a 10ms assert delay (the datasheet mentions: "Trst | Reset period | 10ms") and a 10ms deassert delay as well (the datasheet mentions: "Tclk_MII_rdy | MII/RMII clock output ready after reset released | 10ms")). The old settings used 10ms for assert and 1000ms for deassert. No functional changes intended. Reviewed-by: Neil Armstrong Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson8b-ec100.dts | 9 +++++---- arch/arm/boot/dts/meson8b-mxq.dts | 9 +++++---- arch/arm/boot/dts/meson8b-odroidc1.dts | 9 +++++---- arch/arm/boot/dts/meson8m2-mxiii-plus.dts | 8 ++++---- 4 files changed, 19 insertions(+), 16 deletions(-) commit 107c34bcbf4737b457ca44156aa11e788cbb6b83 Author: Huang Rui Date: Wed Jul 19 09:43:26 2017 +0800 drm/amdgpu: add NV series gpu family id Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher include/uapi/drm/amdgpu_drm.h | 1 + 1 file changed, 1 insertion(+) commit 852a6626d5fdd5dd442e6c6ab51ce0cb022d75b4 Author: Huang Rui Date: Tue Jul 18 19:27:55 2017 +0800 drm/amdgpu: add navi10 asic type Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 + include/drm/amd_asic_type.h | 1 + 2 files changed, 2 insertions(+) commit 33934b3576b0ef86c7c03b88857b185f15a04732 Author: Hawking Zhang Date: Mon Mar 4 15:53:41 2019 +0800 drm/amdgpu: add navi10 ip offset header Signed-off-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/navi10_ip_offset.h | 855 +++++++++++++++++++++++++ drivers/gpu/drm/amd/include/soc15_hw_ip.h | 4 +- 2 files changed, 858 insertions(+), 1 deletion(-) commit 76a2d0b0a1d483ee1c48e8d8a4e03e130e991d1b Author: Hawking Zhang Date: Fri Apr 12 14:13:08 2019 -0500 drm/amdgpu: add doorbell assignement for navi10 Update mappings for Navi10. Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Reviewed-by: Jack Xiao Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell.h | 40 ++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit 10e4b22735353ee66669c5a74fb4c1f974e7ed4d Author: Hawking Zhang Date: Fri Apr 12 14:08:00 2019 -0500 drm/amdgpu: atomfirmware.h updates for navi10 Updated tables for Navi10. Signed-off-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/atomfirmware.h | 188 +++++++++++++++++++++++++++-- 1 file changed, 180 insertions(+), 8 deletions(-) commit efd8725f03c9fd8ad78f5e975fa232f387a92069 Author: Hawking Zhang Date: Mon Mar 4 15:51:48 2019 +0800 drm/amdgpu: add navi10 enums header Signed-off-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/navi10_enum.h | 22764 ++++++++++++++++++++++++++++ 1 file changed, 22764 insertions(+) commit d2996831b288953505c72be9b0b75b26621f186a Author: Hawking Zhang Date: Sun Mar 3 11:32:16 2019 +0800 drm/amdgpu: add SMUIO 11.0 register headers Signed-off-by: Hawking Zhang Signed-off-by: Alex Deucher .../include/asic_reg/smuio/smuio_11_0_0_offset.h | 323 ++++++++++ .../include/asic_reg/smuio/smuio_11_0_0_sh_mask.h | 689 +++++++++++++++++++++ 2 files changed, 1012 insertions(+) commit 3d220cc3bde54df9fdfbe40458e580971723b767 Author: Hawking Zhang Date: Sun Mar 3 11:30:47 2019 +0800 drm/amdgpu: add OSS 5.0 register headers Signed-off-by: Hawking Zhang Signed-off-by: Alex Deucher .../amd/include/asic_reg/oss/osssys_5_0_0_offset.h | 353 ++++++ .../include/asic_reg/oss/osssys_5_0_0_sh_mask.h | 1305 ++++++++++++++++++++ 2 files changed, 1658 insertions(+) commit f519f0be45da3bd09efbcaf9930dac34949f9f82 Author: Hawking Zhang Date: Sun Mar 3 11:29:18 2019 +0800 drm/amdgpu: add MMHUB 2.0 register headers Signed-off-by: Hawking Zhang Signed-off-by: Alex Deucher .../include/asic_reg/mmhub/mmhub_2_0_0_default.h | 927 +++ .../include/asic_reg/mmhub/mmhub_2_0_0_offset.h | 1799 +++++ .../include/asic_reg/mmhub/mmhub_2_0_0_sh_mask.h | 7567 ++++++++++++++++++++ 3 files changed, 10293 insertions(+) commit be4008b8c5b9df89fec5f5528a99851f39a84f23 Author: Hawking Zhang Date: Sun Mar 3 11:27:27 2019 +0800 drm/amdgpu: add GC 10.1 register headers (v4) v2: Update regs (Alex) v3: More updates (Alex) v4: more updates (Alex) Signed-off-by: Hawking Zhang Signed-off-by: Alex Deucher .../amd/include/asic_reg/gc/gc_10_1_0_default.h | 6028 +++ .../drm/amd/include/asic_reg/gc/gc_10_1_0_offset.h | 11339 +++++ .../amd/include/asic_reg/gc/gc_10_1_0_sh_mask.h | 43963 +++++++++++++++++++ 3 files changed, 61330 insertions(+) commit 326354fa97cf0aa97e292c81f2e8e21636283b80 Author: Hawking Zhang Date: Sun Mar 3 11:23:35 2019 +0800 drm/amdgpu: add VCN 2.0 register headers Signed-off-by: Hawking Zhang Signed-off-by: Alex Deucher .../amd/include/asic_reg/vcn/vcn_2_0_0_offset.h | 1008 ++++++ .../amd/include/asic_reg/vcn/vcn_2_0_0_sh_mask.h | 3815 ++++++++++++++++++++ 2 files changed, 4823 insertions(+) commit 9edefe7bacbd30230b0981277b6e9b4235710012 Author: Hawking Zhang Date: Sun Mar 3 11:17:25 2019 +0800 drm/amdgpu: add NBIO 2.3 register headers Signed-off-by: Hawking Zhang Signed-off-by: Alex Deucher .../amd/include/asic_reg/nbio/nbio_2_3_default.h | 18521 +++ .../amd/include/asic_reg/nbio/nbio_2_3_offset.h | 14663 +++ .../amd/include/asic_reg/nbio/nbio_2_3_sh_mask.h | 120339 ++++++++++++++++++ 3 files changed, 153523 insertions(+) commit d33ad040279caf1072126bfe609b71843ad4b2f8 Author: Hawking Zhang Date: Sun Mar 3 11:15:26 2019 +0800 drm/amdgpu: add MP 11.0 register headers Signed-off-by: Hawking Zhang Signed-off-by: Alex Deucher .../drm/amd/include/asic_reg/mp/mp_11_0_sh_mask.h | 429 +++++++++++++++++++++ 1 file changed, 429 insertions(+) commit 2a3196f1f0881ff69ada8798307a43db13f56a3f Author: Hawking Zhang Date: Sun Mar 3 11:10:29 2019 +0800 drm/amdgpu: add HDP 5.0 register headers Signed-off-by: Hawking Zhang Signed-off-by: Alex Deucher .../amd/include/asic_reg/hdp/hdp_5_0_0_offset.h | 217 +++++++ .../amd/include/asic_reg/hdp/hdp_5_0_0_sh_mask.h | 659 +++++++++++++++++++++ 2 files changed, 876 insertions(+) commit d6ad5023e87756dc0642b9d150bd2bbfaa967d36 Author: Hawking Zhang Date: Sun Mar 3 11:05:29 2019 +0800 drm/amdgpu: add DCN 2.0 register headers Signed-off-by: Hawking Zhang Signed-off-by: Alex Deucher .../amd/include/asic_reg/dcn/dcn_2_0_0_offset.h | 17531 +++++ .../amd/include/asic_reg/dcn/dcn_2_0_0_sh_mask.h | 68008 +++++++++++++++++++ 2 files changed, 85539 insertions(+) commit ae213c44506c5f68951bb01e9fd41c4a3ba0159e Author: Hawking Zhang Date: Sun Mar 3 11:02:58 2019 +0800 drm/amdgpu: add CLK 11.0 register headers Signed-off-by: Hawking Zhang Signed-off-by: Alex Deucher .../amd/include/asic_reg/clk/clk_11_0_0_offset.h | 33 +++++++++++++++++++ .../amd/include/asic_reg/clk/clk_11_0_0_sh_mask.h | 38 ++++++++++++++++++++++ 2 files changed, 71 insertions(+) commit db3239f535cb3f364bfa6618f256542446e3b7bf Author: Hawking Zhang Date: Sun Mar 3 10:57:10 2019 +0800 drm/amdgpu: add ATHUB 2.0 register headers Signed-off-by: Hawking Zhang Signed-off-by: Alex Deucher .../include/asic_reg/athub/athub_2_0_0_default.h | 272 +++ .../include/asic_reg/athub/athub_2_0_0_offset.h | 514 +++++ .../include/asic_reg/athub/athub_2_0_0_sh_mask.h | 2264 ++++++++++++++++++++ 3 files changed, 3050 insertions(+) commit c9df1442725953591fd0d351cf0c95dc4b6cc9e5 Author: Tomas Henzl Date: Fri Jun 14 16:41:44 2019 +0200 scsi: mpt3sas: use DEVICE_ATTR_{RO, RW} Use existing macros. No functional change. [mkp: typo] Signed-off-by: Tomas Henzl Acked-by: Suganath Prabu Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_ctl.c | 210 +++++++++++++++++-------------------- 1 file changed, 97 insertions(+), 113 deletions(-) commit ab9f5adb8d14a59fd5062ac1d880c5d10bb75959 Author: Tomas Henzl Date: Fri Jun 14 16:41:43 2019 +0200 scsi: mpt3sas: make driver options visible in sys Support is easier with all driver parameters visible in sysfs. Also I've replaced a constant with an octal permission. Signed-off-by: Tomas Henzl Acked-by: Suganath Prabu Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.c | 14 +++++++------- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) commit 0f48a2441613d39db50fb12cc739455ef7f1921f Author: Geert Uytterhoeven Date: Mon Jun 17 16:34:00 2019 +0200 doc-rst: Add missing newline at end of file "git diff" says: \ No newline at end of file after modifying the file. Signed-off-by: Geert Uytterhoeven Signed-off-by: Jonathan Corbet Documentation/docutils.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 57794aab8884087debb22fc214d8ca81999ffb0e Author: James Morse Date: Fri Jun 7 16:14:09 2019 +0100 Documentation: x86: fix some typos These are all obvious typos. Signed-off-by: James Morse Signed-off-by: Jonathan Corbet Documentation/x86/resctrl_ui.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit b5453a8ec310f3ee2f7689958d63d9b8ffcbcd3e Author: James Morse Date: Fri Jun 7 16:14:08 2019 +0100 Documentation: x86: Clarify MBA takes MB as referring to mba_sc "If the MBA is specified in MB then user can enter the max b/w in MB" is a tautology. How can the user know if the schemata takes a percentage or a MB/s value? This is referring to whether the software controller is interpreting the schemata's value. Make this clear. Signed-off-by: James Morse Signed-off-by: Jonathan Corbet Documentation/x86/resctrl_ui.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7c7a49958286fee9a2b18baffc9c626304a00843 Author: James Morse Date: Fri Jun 7 16:14:07 2019 +0100 Documentation: x86: Remove cdpl2 unspported statement and fix capitalisation "L2 cache does not support code and data prioritization". This isn't true, elsewhere the document says it can be enabled with the cdpl2 mount option. While we're here, these sample strings have lower-case code/data, which isn't how the kernel exports them. Signed-off-by: James Morse Signed-off-by: Jonathan Corbet Documentation/x86/resctrl_ui.rst | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit eb8ed28f024fe428a08ee6b7c4de6a31ff6610ad Author: James Morse Date: Fri Jun 7 16:14:06 2019 +0100 Documentation: x86: Contiguous cbm isn't all X86 Since commit 4d05bf71f157 ("x86/resctrl: Introduce AMD QOS feature") resctrl has supported non-contiguous cache bit masks. The interface for this is currently try-it-and-see. Update the documentation to say Intel CPUs have this requirement, instead of X86. Cc: Babu Moger Signed-off-by: James Morse Signed-off-by: Jonathan Corbet Documentation/x86/resctrl_ui.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 22aac857394c6105803afcb9801e4e4771eb755d Author: Valentin Schneider Date: Tue Jun 18 15:56:05 2019 +0100 docs/vm: hwpoison.rst: Fix quote formatting The asterisks prepended to the quoted text currently get translated to bullet points, which gets increasingly confusing the smaller your screen is (when viewing the sphinx output, that is). Convert the whole quote to a literal block. Signed-off-by: Valentin Schneider Signed-off-by: Jonathan Corbet Documentation/vm/hwpoison.rst | 52 +++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 26 deletions(-) commit 220ee02a0b38726a90430e94714c87550dc3d476 Author: Stephen Kitt Date: Thu Jun 13 18:25:48 2019 +0200 docs: stop suggesting strlcpy Since strlcpy is deprecated, the documentation shouldn't suggest using it. This patch fixes the examples to use strscpy instead. It also uses sizeof instead of underlying constants as far as possible, to simplify future changes to the corresponding data structures. Signed-off-by: Stephen Kitt Acked-by: Kees Cook Acked-by: Federico Vaga Signed-off-by: Jonathan Corbet Documentation/hid/hid-transport.txt | 6 +++--- Documentation/i2c/instantiating-devices | 2 +- Documentation/i2c/upgrading-clients | 4 ++-- Documentation/kernel-hacking/locking.rst | 6 +++--- Documentation/translations/it_IT/kernel-hacking/locking.rst | 6 +++--- 5 files changed, 12 insertions(+), 12 deletions(-) commit 4ae5b8f2140d18788979153370c83cf925092b5c Author: Mauro Carvalho Chehab Date: Tue Jun 18 15:51:19 2019 -0300 lib: list_sort.c: add a blank line to avoid kernel-doc warnings In order for a list to be recognized as such, blank lines are required. Solve those Sphinx warnings: ./lib/list_sort.c:162: WARNING: Unexpected indentation. ./lib/list_sort.c:163: WARNING: Block quote ends without a blank line; unexpected unindent. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet lib/list_sort.c | 2 ++ 1 file changed, 2 insertions(+) commit 7e6294cdc0b055225f45e66003b33175e06154aa Author: Mauro Carvalho Chehab Date: Tue Jun 18 15:51:18 2019 -0300 docs: trace: add a missing blank line Sphinx expects a blank line after a literal block markup. Signed-off-by: Mauro Carvalho Chehab Acked-by: Steven Rostedt (VMware) Acked-by: Masami Hiramatsu Signed-off-by: Jonathan Corbet Documentation/trace/kprobetrace.rst | 1 + 1 file changed, 1 insertion(+) commit 0ad6be30baa3a3bc69349327d62ec4c188db3364 Author: Takashi Iwai Date: Wed Jun 19 07:39:43 2019 +0200 docs: fb: Add TER16x32 to the available font names The new font is available since recently. Signed-off-by: Takashi Iwai Acked-by: Randy Dunlap Signed-off-by: Jonathan Corbet Documentation/fb/fbcon.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3572e8aea3bf925dac1dbf86127657c39fe5c254 Author: Chen-Yu Tsai Date: Tue Jun 4 12:23:36 2019 +0800 rtc: pcf8563: Clear event flags and disable interrupts before requesting irq Besides the alarm, the PCF8563 also has a timer triggered interrupt. In cases where the previous system left the timer and interrupts on, or somehow the bits got enabled, the interrupt would keep triggering as the kernel doesn't know about it. Clear both the alarm and timer event flags, and disable the interrupts, before requesting the interrupt line. Fixes: ede3e9d47cca ("drivers/rtc/rtc-pcf8563.c: add alarm support") Fixes: a45d528aab8b ("rtc: pcf8563: clear expired alarm at boot time") Signed-off-by: Chen-Yu Tsai Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pcf8563.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 65f662cbf829834fa4d94190eb7691e5a9cb92d8 Author: Chen-Yu Tsai Date: Tue Jun 4 12:23:35 2019 +0800 rtc: pcf8563: Fix interrupt trigger method The PCF8563 datasheet says the interrupt line is active low and stays active until the events are cleared, i.e. a level trigger interrupt. Fix the flags used to request the interrupt. Fixes: ede3e9d47cca ("drivers/rtc/rtc-pcf8563.c: add alarm support") Signed-off-by: Chen-Yu Tsai Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pcf8563.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit da3929218a4481fc12f9eaa30c9edb09aad5ff24 Author: Leon Romanovsky Date: Sun Jun 16 15:05:58 2019 +0300 RDMa/hns: Don't stuck in endless timeout loop The "end" variable is declared as unsigned and can't be negative, it leads to the situation where timeout limit is not honored, so let's convert logic to ensure that loop is bounded. drivers/infiniband/hw/hns/hns_roce_hw_v1.c: In function _hns_roce_v1_clear_hem_: drivers/infiniband/hw/hns/hns_roce_hw_v1.c:2471:12: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] 2471 | if (end < 0) { | ^ Fixes: 669cefb654cb ("RDMA/hns: Remove jiffies operation in disable interrupt context") Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hem.h | 2 +- drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit e1a7752ca7b150b2acd2560ca3a9eae1287d0201 Author: Lee Jones Date: Mon Jun 17 12:54:54 2019 +0100 scsi: ufs-qcom: Add support for platforms booting ACPI New Qualcomm AArch64 based laptops are now available which use UFS as their primary data storage medium. These devices are supplied with ACPI support out of the box. This patch ensures the Qualcomm UFS driver will be bound when the "QCOM24A5" H/W device is advertised as present. Signed-off-by: Lee Jones Reviewed-by: Ard Biesheuvel Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufs-qcom.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) commit e58ed5002f17ed027272088fa0d3e57fa81bd8d4 Author: Gustavo A. R. Silva Date: Fri Jun 7 13:40:53 2019 -0500 scsi: megaraid_sas: Use struct_size() helper One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct MR_PD_CFG_SEQ_NUM_SYNC { ... struct MR_PD_CFG_SEQ seq[1]; } __packed; Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. So, replace the following form: sizeof(struct MR_PD_CFG_SEQ_NUM_SYNC) + (sizeof(struct MR_PD_CFG_SEQ) * (MAX_PHYSICAL_DEVICES - 1)) with: struct_size(pd_sync, seq, MAX_PHYSICAL_DEVICES - 1) This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Acked-by: Sumit Saxena Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_fusion.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 7c1f3e3447a13a91e95fff6bac7312858c90b0cf Author: Finn Thain Date: Sun Jun 9 11:19:11 2019 +1000 scsi: mac_scsi: Treat Last Byte Sent time-out as failure A system bus error during a PDMA send operation can result in bytes being lost. Theoretically that could cause the target to remain in DATA OUT phase and the initiator (expecting a phase change) would time-out waiting for the Last Byte Sent flag. Should that happen, fail the transfer so the core driver will stop using PDMA with this target. Cc: Michael Schmitz Signed-off-by: Finn Thain Tested-by: Stan Johnson Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/mac_scsi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 8fb9a64eb6e6fe502187c154434729871d9e5578 Author: Finn Thain Date: Sun Jun 9 11:19:11 2019 +1000 scsi: mac_scsi: Enable PDMA on Mac IIfx Add support for Apple's custom "SCSI DMA" chip. This patch doesn't make use of its DMA capability. Just the PDMA capability is sufficient to improve sequential read throughput by a factor of 5. Cc: Michael Schmitz Cc: Joshua Thompson Cc: Geert Uytterhoeven Signed-off-by: Finn Thain Tested-by: Stan Johnson Tested-by: Michael Schmitz Acked-by: Geert Uytterhoeven Signed-off-by: Martin K. Petersen arch/m68k/mac/config.c | 10 ++++++++-- drivers/scsi/mac_scsi.c | 47 +++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 47 insertions(+), 10 deletions(-) commit 78ff751f8e6a9446e9fb26b2bff0b8d3f8974cbd Author: Finn Thain Date: Sun Jun 9 11:19:11 2019 +1000 scsi: mac_scsi: Fix pseudo DMA implementation, take 2 A system bus error during a PDMA transfer can mess up the calculation of the transfer residual (the PDMA handshaking hardware lacks a byte counter). This results in data corruption. The algorithm in this patch anticipates a bus error by starting each transfer with a MOVE.B instruction. If a bus error is caught the transfer will be retried. If a bus error is caught later in the transfer (for a MOVE.W instruction) the transfer gets failed and subsequent requests for that target will use PIO instead of PDMA. This avoids the "!REQ and !ACK" error so the severity level of that message is reduced to KERN_DEBUG. Cc: Michael Schmitz Cc: Geert Uytterhoeven Cc: stable@vger.kernel.org # v4.14+ Fixes: 3a0f64bfa907 ("mac_scsi: Fix pseudo DMA implementation") Signed-off-by: Finn Thain Reported-by: Chris Jones Tested-by: Stan Johnson Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/mac_scsi.c | 371 ++++++++++++++++++++++++++++-------------------- 1 file changed, 218 insertions(+), 153 deletions(-) commit 7398cee4c3e6aea1ba07a6449e5533ecd0b92cdd Author: Finn Thain Date: Sun Jun 9 11:19:11 2019 +1000 scsi: mac_scsi: Increase PIO/PDMA transfer length threshold Some targets introduce delays when handshaking the response to certain commands. For example, a disk may send a 96-byte response to an INQUIRY command (or a 24-byte response to a MODE SENSE command) too slowly. Apparently the first 12 or 14 bytes are handshaked okay but then the system bus error timeout is reached while transferring the next word. Since the scsi bus phase hasn't changed, the driver then sets the target borken flag to prevent further PDMA transfers. The driver also logs the warning, "switching to slow handshake". Raise the PDMA threshold to 512 bytes so that PIO transfers will be used for these commands. This default is sufficiently low that PDMA will still be used for READ and WRITE commands. The existing threshold (16 bytes) was chosen more or less at random. However, best performance requires the threshold to be as low as possible. Those systems that don't need the PIO workaround at all may benefit from mac_scsi.setup_use_pdma=1 Cc: Michael Schmitz Cc: stable@vger.kernel.org # v4.14+ Fixes: 3a0f64bfa907 ("mac_scsi: Fix pseudo DMA implementation") Signed-off-by: Finn Thain Tested-by: Stan Johnson Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/mac_scsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f9dfed1c785734b95b08d67600e05d2092508ab0 Author: Finn Thain Date: Sun Jun 9 11:19:11 2019 +1000 scsi: NCR5380: Handle PDMA failure reliably A PDMA error is handled in the core driver by setting the device's 'borken' flag and aborting the command. Unfortunately, do_abort() is not dependable. Perform a SCSI bus reset instead, to make sure that the command fails and gets retried. Cc: Michael Schmitz Cc: stable@vger.kernel.org # v4.20+ Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Finn Thain Tested-by: Stan Johnson Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 57f31326518e98ee4cabf9a04efe00ed57c54147 Author: Finn Thain Date: Sun Jun 9 11:19:11 2019 +1000 scsi: NCR5380: Always re-enable reselection interrupt The reselection interrupt gets disabled during selection and must be re-enabled when hostdata->connected becomes NULL. If it isn't re-enabled a disconnected command may time-out or the target may wedge the bus while trying to reselect the host. This can happen after a command is aborted. Fix this by enabling the reselection interrupt in NCR5380_main() after calls to NCR5380_select() and NCR5380_information_transfer() return. Cc: Michael Schmitz Cc: stable@vger.kernel.org # v4.9+ Fixes: 8b00c3d5d40d ("ncr5380: Implement new eh_abort_handler") Signed-off-by: Finn Thain Tested-by: Stan Johnson Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit 25fcf94a2fa89dd3e73e965ebb0b38a2a4f72aa4 Author: Finn Thain Date: Sun Jun 9 11:19:11 2019 +1000 Revert "scsi: ncr5380: Increase register polling limit" This reverts commit 4822827a69d7cd3bc5a07b7637484ebd2cf88db6. The purpose of that commit was to suppress a timeout warning message which appeared to be caused by target latency. But suppressing the warning is undesirable as the warning may indicate a messed up transfer count. Another problem with that commit is that 15 ms is too long to keep interrupts disabled as interrupt latency can cause system clock drift and other problems. Cc: Michael Schmitz Cc: stable@vger.kernel.org Fixes: 4822827a69d7 ("scsi: ncr5380: Increase register polling limit") Signed-off-by: Finn Thain Tested-by: Stan Johnson Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5da1faa07b7d6975a6d0266eab391f92a16aeb09 Author: Ondrej Zary Date: Mon Jun 17 19:50:12 2019 +0200 scsi: wd719x: Fix resets and aborts Host reset oopses because it calls wd719x_chip_init, which calls request_firmware, under a spinlock. Stop the RISC first, then flush active SCBs under a spinlock. Finally call wd719x_chip_init unlocked. Also found and fixed more bugs during tests: Affected active SCBs were not flushed during abort, bus and device reset. This caused problems in a following host reset (hang or oops). Device and bus reset failed under load because the result of the reset command is WD719X_SUE_TERM or WD719X_SUE_RESET. Don't treat these codes as error in wd719x_wait_done. wd719x_direct_cmd for RESET/ABORT commands didn't work properly, causing timeouts. Looks like it was caused by the WD719X_DISABLE_INT bit. Not setting it for RESET/ABORT commands seems to fix the probem. Also lower the log level of the corresponding "direct command completed" message to debug. Unfortunately, my documentation is missing some pages, including page 67 (SPIDER67.gif) about resets :( Reported-by: Hariprasad Kelam Signed-off-by: Ondrej Zary Signed-off-by: Martin K. Petersen drivers/scsi/wd719x.c | 42 ++++++++++++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 12 deletions(-) commit fd56141244066a6a21ef458670071c58b6402035 Author: Bart Van Assche Date: Mon Jun 17 08:18:20 2019 -0700 scsi: RDMA/srp: Fix a sleep-in-invalid-context bug The previous patch guarantees that srp_queuecommand() does not get invoked while reconnecting occurs. Hence remove the code from srp_queuecommand() that prevents command queueing while reconnecting. This patch avoids that the following can appear in the kernel log: BUG: sleeping function called from invalid context at kernel/locking/mutex.c:747 in_atomic(): 1, irqs_disabled(): 0, pid: 5600, name: scsi_eh_9 1 lock held by scsi_eh_9/5600: #0: (rcu_read_lock){....}, at: [<00000000cbb798c7>] __blk_mq_run_hw_queue+0xf1/0x1e0 Preemption disabled at: [<00000000139badf2>] __blk_mq_delay_run_hw_queue+0x78/0xf0 CPU: 9 PID: 5600 Comm: scsi_eh_9 Tainted: G W 4.15.0-rc4-dbg+ #1 Hardware name: Dell Inc. PowerEdge R720/0VWT90, BIOS 2.5.4 01/22/2016 Call Trace: dump_stack+0x67/0x99 ___might_sleep+0x16a/0x250 [ib_srp] __mutex_lock+0x46/0x9d0 srp_queuecommand+0x356/0x420 [ib_srp] scsi_dispatch_cmd+0xf6/0x3f0 scsi_queue_rq+0x4a8/0x5f0 blk_mq_dispatch_rq_list+0x73/0x440 blk_mq_sched_dispatch_requests+0x109/0x1a0 __blk_mq_run_hw_queue+0x131/0x1e0 __blk_mq_delay_run_hw_queue+0x9a/0xf0 blk_mq_run_hw_queue+0xc0/0x1e0 blk_mq_start_hw_queues+0x2c/0x40 scsi_run_queue+0x18e/0x2d0 scsi_run_host_queues+0x22/0x40 scsi_error_handler+0x18d/0x5f0 kthread+0x11c/0x140 ret_from_fork+0x24/0x30 Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Laurence Oberman Cc: Jason Gunthorpe Cc: Leon Romanovsky Cc: Doug Ledford Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/infiniband/ulp/srp/ib_srp.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) commit bbe9fb0d04b96dda1fd7bd973e094004978b2166 Author: Bart Van Assche Date: Mon Jun 17 08:18:19 2019 -0700 scsi: Avoid that .queuecommand() gets called for a blocked SCSI device Several SCSI transport and LLD drivers surround code that does not tolerate concurrent calls of .queuecommand() with scsi_target_block() / scsi_target_unblock(). These last two functions use blk_mq_quiesce_queue() / blk_mq_unquiesce_queue() for scsi-mq request queues to prevent concurrent .queuecommand() calls. However, that is not sufficient to prevent .queuecommand() calls from scsi_send_eh_cmnd(). Hence surround the .queuecommand() call from the SCSI error handler with code that avoids that .queuecommand() gets called in the blocked state. Note: converting the .queuecommand() call in scsi_send_eh_cmnd() into code that calls blk_get_request() + blk_execute_rq() is not an option since scsi_send_eh_cmnd() must be able to make forward progress even if all requests have been allocated. Cc: Ming Lei Cc: Hannes Reinecke Cc: Johannes Thumshirn Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/scsi_error.c | 26 ++++++++++++++++++++++++-- drivers/scsi/scsi_lib.c | 4 ---- 2 files changed, 24 insertions(+), 6 deletions(-) commit ac88c1f6730e73771dc36b9fd83804e7aa15941a Author: Bart Van Assche Date: Mon Jun 17 08:18:18 2019 -0700 scsi: Restrict user space SCSI device state changes to "running" and "offline" The ability to modify the SCSI device state was introduced by commit 638127e579a4 ("[PATCH] Fix error handler offline behaviour"; v2.6.12). That same commit introduced the following device states: { SDEV_CREATED, "created" }, { SDEV_RUNNING, "running" }, { SDEV_CANCEL, "cancel" }, { SDEV_DEL, "deleted" }, { SDEV_QUIESCE, "quiesce" }, { SDEV_OFFLINE, "offline" }, The SDEV_BLOCK state was introduced later to avoid that an FC cable pull would immediately result in an I/O error (commit 1094e682310e; "[PATCH] suspending I/Os to a device"; v2.6.12). That same patch introduced the ability to set the SDEV_BLOCK state from user space. I'm not sure whether that ability was introduced on purpose or accidentally. Since there is agreement that only writing "running" or "offline" into the SCSI sysfs device state attribute makes sense, restrict sysfs writes to these values. This patch makes sure that SDEV_BLOCK is only used for its original purpose, namely to allow transport drivers and LLDs to block further .queuecommand() calls while transport layer or adapter recovery is in progress. Note: a web search for "/sys/class/scsi_device" AND "device/state" revealed several storage configuration guides. The instructions I found in these guides tell users to write the value "running" or "offline" in the SCSI device state sysfs attribute and no other values. [mkp: typo] Cc: Christoph Hellwig Cc: Ming Lei Cc: Hannes Reinecke Cc: Johannes Thumshirn Cc: James Smart Cc: Ewan D. Milne Cc: Laurence Oberman Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/scsi_sysfs.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 152e30fc53cb110b3d51c58ba271ae452f1d2edb Author: Varun Prakash Date: Mon Jun 17 18:46:26 2019 +0530 scsi: cxgb4i: add support for IEEE_8021QAZ_APP_SEL_STREAM selector IEEE_8021QAZ_APP_SEL_STREAM is a valid selector for iSCSI connections, so add code to use IEEE_8021QAZ_APP_SEL_STREAM selector to get priority mask. Signed-off-by: Varun Prakash Signed-off-by: Martin K. Petersen drivers/scsi/cxgbi/cxgb4i/cxgb4i.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 22c2f35f49d474fa093b227253941980886d7b1b Author: Christophe JAILLET Date: Sun Jun 16 09:02:20 2019 +0200 scsi: tcmu: Simplify tcmu_update_uio_info() Use 'kasprintf()' instead of: - snprintf(NULL, 0... - kmalloc(... - snprintf(... This is less verbose and saves 7 bytes (i.e. the space for '/(null)') if 'udev->dev_config' is NULL. Signed-off-by: Christophe JAILLET Acked-by: Mike Christie Signed-off-by: Martin K. Petersen drivers/target/target_core_user.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit adfbd028e155fca3bbe33d458f2f27cb657e5792 Author: Branden Bonaby Date: Fri Jun 14 19:48:22 2019 -0400 scsi: storvsc: Add ability to change scsi queue depth Adding functionality to allow the SCSI queue depth to be changed by utilizing the "scsi_change_queue_depth" function. [mkp: checkpatch] Signed-off-by: Branden Bonaby Reviewed-by: Michael Kelley Reviewed-by: K. Y. Srinivasan Signed-off-by: Martin K. Petersen drivers/scsi/storvsc_drv.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 6ea3b189f7704f0881815b414a20f36a2529030c Author: Gustavo A. R. Silva Date: Tue Jun 11 10:02:19 2019 -0500 scsi: mpt3sas: Mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warning: drivers/scsi/mpt3sas/mpt3sas_base.c: In function _base_update_ioc_page1_inlinewith_perf_mode : drivers/scsi/mpt3sas/mpt3sas_base.c:4510:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (ioc->high_iops_queues) { ^ drivers/scsi/mpt3sas/mpt3sas_base.c:4530:2: note: here case MPT_PERF_MODE_LATENCY: ^~~~ Warning level 3 was used: -Wimplicit-fallthrough=3 This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough. Fixes: 30cb97023f38 ("scsi: mpt3sas: Introduce perf_mode module parameter") Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.c | 1 + 1 file changed, 1 insertion(+) commit 924a3541eab0d28101baf0831e4315593f06ba4a Author: John Garry Date: Mon Jun 10 20:41:41 2019 +0800 scsi: libsas: aic94xx: hisi_sas: mvsas: pm8001: Use dev_is_expander() Many times in libsas, and in LLDDs which use libsas, the check for an expander device is re-implemented or open coded. Use dev_is_expander() instead. We rename this from sas_dev_type_is_expander() to not spill so many lines in referencing. Signed-off-by: John Garry Reviewed-by: Jason Yan Reviewed-by: Jack Wang Signed-off-by: Martin K. Petersen drivers/scsi/aic94xx/aic94xx_dev.c | 4 +--- drivers/scsi/hisi_sas/hisi_sas.h | 4 ---- drivers/scsi/hisi_sas/hisi_sas_main.c | 8 ++++---- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 4 ++-- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 4 ++-- drivers/scsi/isci/remote_device.c | 4 ++-- drivers/scsi/isci/remote_device.h | 5 ----- drivers/scsi/isci/request.c | 2 +- drivers/scsi/isci/task.c | 2 +- drivers/scsi/libsas/sas_discover.c | 5 ++--- drivers/scsi/libsas/sas_expander.c | 29 ++++++++++------------------- drivers/scsi/libsas/sas_port.c | 6 +++--- drivers/scsi/mvsas/mv_sas.c | 2 +- drivers/scsi/mvsas/mv_sas.h | 3 --- drivers/scsi/pm8001/pm8001_hwi.c | 4 ++-- drivers/scsi/pm8001/pm8001_sas.c | 2 +- drivers/scsi/pm8001/pm8001_sas.h | 1 - drivers/scsi/pm8001/pm80xx_hwi.c | 4 ++-- include/scsi/libsas.h | 3 +-- 19 files changed, 35 insertions(+), 61 deletions(-) commit 3e99b3b13a1fc8f7354edaee4c04f73a07faba69 Author: Ming Lei Date: Thu Jun 6 16:34:09 2019 +0800 scsi: core: don't preallocate small SGL in case of NO_SG_CHAIN The preallocated small SGL depends on SG_CHAIN so if the ARCH doesn't support SG_CHAIN, preallocation of small SGL can't work at all. Fix this issue by not using small preallocation in case of NO_SG_CHAIN. Cc: Christoph Hellwig Cc: Bart Van Assche Cc: Ewan D. Milne Cc: Hannes Reinecke Cc: Guenter Roeck Reported-by: Guenter Roeck Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche Tested-by: Guenter Roeck Signed-off-by: Ming Lei Signed-off-by: Martin K. Petersen drivers/scsi/scsi_lib.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit b79d9a09ae23c7047bdce3a15e284398334198ea Author: Ming Lei Date: Thu Jun 6 16:34:08 2019 +0800 scsi: lib/sg_pool.c: clear 'first_chunk' in case of no preallocation If user doesn't ask to preallocate by passing zero 'nents_first_chunk' to sg_alloc_table_chained, we need to make sure that 'first_chunk' is cleared. Otherwise, __sg_alloc_table() still may think that the 1st SGL should be from the preallocation. Fixes the issue by clearing 'first_chunk' in sg_alloc_table_chained() if 'nents_first_chunk' is zero. Cc: Christoph Hellwig Cc: Bart Van Assche Cc: Ewan D. Milne Cc: Hannes Reinecke Cc: Guenter Roeck Reported-by: Guenter Roeck Tested-by: Guenter Roeck Signed-off-by: Ming Lei Signed-off-by: Martin K. Petersen lib/sg_pool.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 3dccdf53c2f38399b11085ded4447ce1467f006c Author: Ming Lei Date: Sun Apr 28 15:39:32 2019 +0800 scsi: core: avoid preallocating big SGL for data scsi_mq_setup_tags() preallocates a big buffer for the IO SGL. The size is based on scsi_mq_sgl_size() which is determined based on shost->sg_tablesize and SG_CHUNK_SIZE. Modern DMA engines are often capable of dealing with very big segments so the resulting scsi_mq_sgl_size() is often too big. SG_CHUNK_SIZE results in a static 4KB SGL allocation per command. If an HBA has lots of deep queues, preallocation for the sg list can consume substantial amounts of memory. For lpfc, nr_hw_queues can be 70 and each queue's depth 3781. This means the resulting preallocation for the data SGL is 70*3781*2K = 517MB. Switch to runtime allocation for SGL for lists longer than 2 entries. This is the approach used by NVMe PCI so it should be reasonable for SCSI as well. Runtime SGL allocation has always been the case for the legacy I/O path so this is nothing new. [mkp: attempted to clarify commit desc] Cc: Christoph Hellwig Cc: Bart Van Assche Cc: Ewan D. Milne Cc: Hannes Reinecke Reviewed-by: Christoph Hellwig Signed-off-by: Ming Lei Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/scsi_lib.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 92524fa12312d1f082a473e14c590c48b4ef3fe5 Author: Ming Lei Date: Sun Apr 28 15:39:31 2019 +0800 scsi: core: avoid preallocating big SGL for protection information scsi_mq_setup_tags() currently preallocates a big buffer for protection SGL entries. scsi_mq_sgl_size() is used to determine the size for both data and protection information scatterlists but the protection buffer is usually much smaller. For example, one 512-byte sector needs 8 bytes of protection information. Given that the maximum number of sectors for one request is 2560 (BLK_DEF_MAX_SECTORS) sectors, the max protection information buffer size is just 20K. The protection information segment count generally matches the number of bios in the request. As a result, the typical actual number of segments won't be very big. And should the need arise, allocating a bigger SGL from slab is fast enough. Pre-allocate only one SGL entry for protection information and switch to runtime allocation in case that the protection information segment number is bigger than 1. This reduces memory tied up by static command allocations. For example, 500+ MB is saved on single lpfc HBA. [mkp: attempted to clarify commit desc] Cc: Christoph Hellwig Cc: Bart Van Assche Cc: Ewan D. Milne Cc: Hannes Reinecke Reviewed-by: Christoph Hellwig Signed-off-by: Ming Lei Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/scsi_lib.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 4635873c561ac57b66adfcc2487c38106b1c916c Author: Ming Lei Date: Sun Apr 28 15:39:30 2019 +0800 scsi: lib/sg_pool.c: improve APIs for allocating sg pool sg_alloc_table_chained() currently allows the caller to provide one preallocated SGL and returns if the requested number isn't bigger than size of that SGL. This is used to inline an SGL for an IO request. However, scattergather code only allows that size of the 1st preallocated SGL to be SG_CHUNK_SIZE(128). This means a substantial amount of memory (4KB) is claimed for the SGL for each IO request. If the I/O is small, it would be prudent to allocate a smaller SGL. Introduce an extra parameter to sg_alloc_table_chained() and sg_free_table_chained() for specifying size of the preallocated SGL. Both __sg_free_table() and __sg_alloc_table() assume that each SGL has the same size except for the last one. Change the code to allow both functions to accept a variable size for the 1st preallocated SGL. [mkp: attempted to clarify commit desc] Cc: Christoph Hellwig Cc: Bart Van Assche Cc: Ewan D. Milne Cc: Hannes Reinecke Cc: Sagi Grimberg Cc: Chuck Lever Cc: netdev@vger.kernel.org Cc: linux-nvme@lists.infradead.org Suggested-by: Christoph Hellwig Signed-off-by: Ming Lei Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/nvme/host/fc.c | 7 ++++--- drivers/nvme/host/rdma.c | 7 ++++--- drivers/nvme/target/loop.c | 4 ++-- drivers/scsi/scsi_lib.c | 10 ++++++---- include/linux/scatterlist.h | 11 +++++++---- lib/scatterlist.c | 36 +++++++++++++++++++++++------------- lib/sg_pool.c | 37 +++++++++++++++++++++++++++---------- net/sunrpc/xprtrdma/svc_rdma_rw.c | 5 +++-- 8 files changed, 76 insertions(+), 41 deletions(-) commit ee5a1dbfec57cc1ffdedf2bd767c84d5e0498ed8 Author: Ming Lei Date: Thu Jun 6 16:34:10 2019 +0800 scsi: esp: use sg helper to iterate over scatterlist Unlike the legacy I/O path, scsi-mq preallocates a large array to hold the scatterlist for each request. This static allocation can consume substantial amounts of memory on modern controllers which support a large number of concurrently outstanding requests. To facilitate a switch to a smaller static allocation combined with a dynamic allocation for requests that need it, we need to make sure all SCSI drivers handle chained scatterlists correctly. Convert remaining drivers that directly dereference the scatterlist array to using the iterator functions. [mkp: clarified commit message] Cc: Christoph Hellwig Cc: Bart Van Assche Cc: Ewan D. Milne Cc: Hannes Reinecke Cc: Finn Thain Cc: Guenter Roeck Reported-by: Guenter Roeck Tested-by: Guenter Roeck Reviewed-by: Finn Thain Signed-off-by: Ming Lei Signed-off-by: Martin K. Petersen drivers/scsi/esp_scsi.c | 20 +++++++++++++------- drivers/scsi/esp_scsi.h | 2 ++ 2 files changed, 15 insertions(+), 7 deletions(-) commit 0e9fdd2b315c0fde535336ea09499a927e415566 Author: Finn Thain Date: Tue Jun 18 09:37:57 2019 +0800 scsi: NCR5380: use sg helper to iterate over scatterlist Unlike the legacy I/O path, scsi-mq preallocates a large array to hold the scatterlist for each request. This static allocation can consume substantial amounts of memory on modern controllers which support a large number of concurrently outstanding requests. To facilitate a switch to a smaller static allocation combined with a dynamic allocation for requests that need it, we need to make sure all SCSI drivers handle chained scatterlists correctly. Convert remaining drivers that directly dereference the scatterlist array to using the iterator functions. [mkp: clarified commit message] Cc: Michael Schmitz Reviewed-by: Michael Schmitz Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Finn Thain Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 41 ++++++++++++++++++----------------------- 1 file changed, 18 insertions(+), 23 deletions(-) commit c3c0fd9b108f6360ceaade790571be097df1f3ef Author: Ming Lei Date: Tue Jun 18 09:37:56 2019 +0800 scsi: wd33c93: use sg helper to iterate over scatterlist Unlike the legacy I/O path, scsi-mq preallocates a large array to hold the scatterlist for each request. This static allocation can consume substantial amounts of memory on modern controllers which support a large number of concurrently outstanding requests. To facilitate a switch to a smaller static allocation combined with a dynamic allocation for requests that need it, we need to make sure all SCSI drivers handle chained scatterlists correctly. Convert remaining drivers that directly dereference the scatterlist array to using the iterator functions. [mkp: clarified commit message] Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Ming Lei Signed-off-by: Martin K. Petersen drivers/scsi/wd33c93.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 57ef4e510939e305ad905cc54b8031401ff5450e Author: Ming Lei Date: Tue Jun 18 09:37:55 2019 +0800 scsi: ppa: use sg helper to iterate over scatterlist Unlike the legacy I/O path, scsi-mq preallocates a large array to hold the scatterlist for each request. This static allocation can consume substantial amounts of memory on modern controllers which support a large number of concurrently outstanding requests. To facilitate a switch to a smaller static allocation combined with a dynamic allocation for requests that need it, we need to make sure all SCSI drivers handle chained scatterlists correctly. Convert remaining drivers that directly dereference the scatterlist array to using the iterator functions. [mkp: clarified commit message] Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Ming Lei Signed-off-by: Martin K. Petersen drivers/scsi/ppa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1b3a4640106603ce6b3ad261ef4d20ea60e9790b Author: Ming Lei Date: Tue Jun 18 09:37:54 2019 +0800 scsi: pcmcia: nsp_cs: use sg helper to iterate over scatterlist Unlike the legacy I/O path, scsi-mq preallocates a large array to hold the scatterlist for each request. This static allocation can consume substantial amounts of memory on modern controllers which support a large number of concurrently outstanding requests. To facilitate a switch to a smaller static allocation combined with a dynamic allocation for requests that need it, we need to make sure all SCSI drivers handle chained scatterlists correctly. Convert remaining drivers that directly dereference the scatterlist array to using the iterator functions. [mkp: clarified commit message] Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Ming Lei Signed-off-by: Martin K. Petersen drivers/scsi/pcmcia/nsp_cs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 79da19b48fc188f6b5186e9ed605e10e5bef3ad6 Author: Ming Lei Date: Tue Jun 18 09:37:53 2019 +0800 scsi: imm: use sg helper to iterate over scatterlist Unlike the legacy I/O path, scsi-mq preallocates a large array to hold the scatterlist for each request. This static allocation can consume substantial amounts of memory on modern controllers which support a large number of concurrently outstanding requests. To facilitate a switch to a smaller static allocation combined with a dynamic allocation for requests that need it, we need to make sure all SCSI drivers handle chained scatterlists correctly. Convert remaining drivers that directly dereference the scatterlist array to using the iterator functions. [mkp: clarified commit message] Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Ming Lei Signed-off-by: Martin K. Petersen drivers/scsi/imm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a7a253ba6c26490fb132ee682661c03a6c454fd5 Author: Finn Thain Date: Tue Jun 18 09:37:52 2019 +0800 scsi: aha152x: use sg helper to iterate over scatterlist Unlike the legacy I/O path, scsi-mq preallocates a large array to hold the scatterlist for each request. This static allocation can consume substantial amounts of memory on modern controllers which support a large number of concurrently outstanding requests. To facilitate a switch to a smaller static allocation combined with a dynamic allocation for requests that need it, we need to make sure all SCSI drivers handle chained scatterlists correctly. Convert remaining drivers that directly dereference the scatterlist array to using the iterator functions. Finn added the change to replace SCp.buffers_residual with sg_is_last() for fixing updating it, and the similar change has been applied on NCR5380.c [mkp: clarified commit message] Signed-off-by: Finn Thain Signed-off-by: Ming Lei Signed-off-by: Martin K. Petersen drivers/scsi/aha152x.c | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) commit 013be03840c2ba3a2717f9cee457f01fdc4d8436 Author: Ming Lei Date: Tue Jun 18 09:37:51 2019 +0800 scsi: s390: zfcp_fc: use sg helper to iterate over scatterlist Unlike the legacy I/O path, scsi-mq preallocates a large array to hold the scatterlist for each request. This static allocation can consume substantial amounts of memory on modern controllers which support a large number of concurrently outstanding requests. To facilitate a switch to a smaller static allocation combined with a dynamic allocation for requests that need it, we need to make sure all SCSI drivers handle chained scatterlists correctly. Convert remaining drivers that directly dereference the scatterlist array to using the iterator functions. [mkp: clarified commit message] Cc: Steffen Maier Cc: Benjamin Block Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: linux-s390@vger.kernel.org Acked-by: Benjamin Block Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Ming Lei Signed-off-by: Martin K. Petersen drivers/s390/scsi/zfcp_fc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit da5567369fb686eb050da15364f11ef561f9a03e Author: Ming Lei Date: Tue Jun 18 09:37:49 2019 +0800 scsi: staging: unisys: visorhba: use sg helper to iterate over scatterlist Unlike the legacy I/O path, scsi-mq preallocates a large array to hold the scatterlist for each request. This static allocation can consume substantial amounts of memory on modern controllers which support a large number of concurrently outstanding requests. To facilitate a switch to a smaller static allocation combined with a dynamic allocation for requests that need it, we need to make sure all SCSI drivers handle chained scatterlists correctly. Convert remaining drivers that directly dereference the scatterlist array to using the iterator functions. [mkp: clarified commit message] Cc: devel@driverdev.osuosl.org Cc: Greg Kroah-Hartman Acked-by: Greg Kroah-Hartman Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Ming Lei Signed-off-by: Martin K. Petersen drivers/staging/unisys/visorhba/visorhba_main.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 1194b5ce57d27c2ad49ed26f8cec98757c7c23ec Author: Ming Lei Date: Tue Jun 18 09:37:48 2019 +0800 scsi: usb: image: microtek: use sg helper to iterate over scatterlist Unlike the legacy I/O path, scsi-mq preallocates a large array to hold the scatterlist for each request. This static allocation can consume substantial amounts of memory on modern controllers which support a large number of concurrently outstanding requests. To facilitate a switch to a smaller static allocation combined with a dynamic allocation for requests that need it, we need to make sure all SCSI drivers handle chained scatterlists correctly. Convert remaining drivers that directly dereference the scatterlist array to using the iterator functions. [mkp: clarified commit message] Cc: Oliver Neukum Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Ming Lei Signed-off-by: Martin K. Petersen drivers/usb/image/microtek.c | 20 ++++++++------------ drivers/usb/image/microtek.h | 2 +- 2 files changed, 9 insertions(+), 13 deletions(-) commit 74eb7446eda5e348dbb90981e91e9caf54f2fde4 Author: Ming Lei Date: Tue Jun 18 09:37:47 2019 +0800 scsi: pmcraid: use sg helper to iterate over scatterlist Unlike the legacy I/O path, scsi-mq preallocates a large array to hold the scatterlist for each request. This static allocation can consume substantial amounts of memory on modern controllers which support a large number of concurrently outstanding requests. To facilitate a switch to a smaller static allocation combined with a dynamic allocation for requests that need it, we need to make sure all SCSI drivers handle chained scatterlists correctly. Convert remaining drivers that directly dereference the scatterlist array to using the iterator functions. [mkp: clarified commit message] Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Ming Lei Signed-off-by: Martin K. Petersen drivers/scsi/pmcraid.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit c71ae886d1321e74f524c7c023933cf87768915d Author: Ming Lei Date: Tue Jun 18 09:37:46 2019 +0800 scsi: ipr: use sg helper to iterate over scatterlist Unlike the legacy I/O path, scsi-mq preallocates a large array to hold the scatterlist for each request. This static allocation can consume substantial amounts of memory on modern controllers which support a large number of concurrently outstanding requests. To facilitate a switch to a smaller static allocation combined with a dynamic allocation for requests that need it, we need to make sure all SCSI drivers handle chained scatterlists correctly. Convert remaining drivers that directly dereference the scatterlist array to using the iterator functions. [mkp: clarified commit message] Reviewed-by: Bart Van Assche Signed-off-by: Ming Lei Signed-off-by: Martin K. Petersen drivers/scsi/ipr.c | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) commit 3c1a30df6d9c21c3235b6af5f25da2765b19d05b Author: Ming Lei Date: Tue Jun 18 09:37:45 2019 +0800 scsi: mvumi: use sg helper to iterate over scatterlist Unlike the legacy I/O path, scsi-mq preallocates a large array to hold the scatterlist for each request. This static allocation can consume substantial amounts of memory on modern controllers which support a large number of concurrently outstanding requests. To facilitate a switch to a smaller static allocation combined with a dynamic allocation for requests that need it, we need to make sure all SCSI drivers handle chained scatterlists correctly. Convert remaining drivers that directly dereference the scatterlist array to using the iterator functions. [mkp: clarified commit message and folded in build fix reported by zeroday] Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Ewan D. Milne Signed-off-by: Ming Lei Signed-off-by: Martin K. Petersen drivers/scsi/mvumi.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 836a0fbb3e76f704ad65ddfb57f00725245e509b Author: Leon Romanovsky Date: Sun Jun 16 15:05:20 2019 +0300 RDMA: Check umem pointer validity prior to release Update ib_umem_release() to behave similarly to kfree() and allow submitting NULL pointer as safe input to this function. Fixes: a52c8e2469c3 ("RDMA: Clean destroy CQ in drivers do not return errors") Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/umem.c | 3 +++ drivers/infiniband/hw/bnxt_re/ib_verbs.c | 29 +++++++++------------------- drivers/infiniband/hw/cxgb3/iwch_provider.c | 3 +-- drivers/infiniband/hw/cxgb4/mem.c | 3 +-- drivers/infiniband/hw/efa/efa_verbs.c | 2 +- drivers/infiniband/hw/hns/hns_roce_cq.c | 8 +++----- drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 13 +++++-------- drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 2 +- drivers/infiniband/hw/hns/hns_roce_mr.c | 4 +--- drivers/infiniband/hw/hns/hns_roce_qp.c | 5 ++--- drivers/infiniband/hw/hns/hns_roce_srq.c | 14 ++++++-------- drivers/infiniband/hw/i40iw/i40iw_verbs.c | 3 +-- drivers/infiniband/hw/mlx4/cq.c | 14 +++++--------- drivers/infiniband/hw/mlx4/qp.c | 7 +++---- drivers/infiniband/hw/mlx4/srq.c | 7 +++---- drivers/infiniband/hw/mlx5/cq.c | 20 +++++-------------- drivers/infiniband/hw/mlx5/mr.c | 13 ++++++------- drivers/infiniband/hw/mlx5/qp.c | 9 +++------ drivers/infiniband/hw/mthca/mthca_provider.c | 3 +-- drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 3 +-- drivers/infiniband/hw/qedr/verbs.c | 9 +++------ drivers/infiniband/hw/vmw_pvrdma/pvrdma_cq.c | 6 ++---- drivers/infiniband/hw/vmw_pvrdma/pvrdma_mr.c | 3 +-- drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c | 16 ++++----------- drivers/infiniband/sw/rdmavt/mr.c | 3 +-- drivers/infiniband/sw/rxe/rxe_mr.c | 3 +-- 26 files changed, 73 insertions(+), 132 deletions(-) commit 89a6da3cb8f30ee0aeca924d84bef688f22f883e Author: Lang Cheng Date: Fri Jun 14 22:56:03 2019 +0800 RDMA/hns: reset function when removing module During removing the driver, we needs to notify the roce engine to stop working immediately,and symmetrically recycle the hardware resources requested during initialization. The hardware provides a command called function clear that can package these operations,so that the driver can only focus on releasing resources that applied from the operating system. This patch implements the call of this command. Signed-off-by: Lang Cheng Signed-off-by: Lijun Ou Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 44 ++++++++++++++++++++++++++++++ drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 17 ++++++++++++ 2 files changed, 61 insertions(+) commit 0ce353794b6c4dc88592b942e94b33cd1bf2ef54 Author: Chaitanya Kulkarni Date: Thu Jun 20 10:59:19 2019 -0700 f2fs: use block layer helper for show_bio_op macro Adjust the f2fs tracing code to use newly introduced block layer function blk_op_str() which converts the REQ_OP_XXX into the string XXX. Reviewed-by: Chao Yu Signed-off-by: Chaitanya Kulkarni Signed-off-by: Jens Axboe include/trace/events/f2fs.h | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit b0e5168a77387d19caee1622e30f77464c369885 Author: Chaitanya Kulkarni Date: Thu Jun 20 10:59:18 2019 -0700 block: update print_req_error() Improve the print_req_error with additional request fields which are helpful for debugging. Use newly introduced blk_op_str() to print the REQ_OP_XXX in the string format. Reviewed-by: Chao Yu Signed-off-by: Chaitanya Kulkarni Signed-off-by: Jens Axboe block/blk-core.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 874c893bf07b88d25c6d1db3e1d14e582f838281 Author: Chaitanya Kulkarni Date: Thu Jun 20 10:59:17 2019 -0700 block: use blk_op_str() in blk-mq-debugfs.c Now that we've a helper function blk_op_str() to convert the REQ_OP_XXX to string XXX, adjust the code to use that. Get rid of the duplicate array op_name which is now present in the blk-core.c which we renamed it to "blk_op_name" and open coding in the blk-mq-debugfs.c. Reviewed-by: Bart Van Assche Signed-off-by: Chaitanya Kulkarni Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) commit e47bc4eda953928644109101d07c9c95dc29a458 Author: Chaitanya Kulkarni Date: Thu Jun 20 10:59:16 2019 -0700 block: add centralize REQ_OP_XXX to string helper In order to centralize the REQ_OP_XXX to string conversion which can be used in the block layer and different places in the kernel like f2fs, this patch adds a new helper function along with an array similar to the one present in the blk-mq-debugfs.c. We keep this helper functionality centralize under blk-core.c instead of blk-mq-debugfs.c since blk-core.c is configured using CONFIG_BLOCK and it will not be dependent on blk-mq-debugfs.c which is configured using CONFIG_BLK_DEBUG_FS. Next patch adjusts the code in the blk-mq-debugfs.c with newly introduced helper. Reviewed-by: Bart Van Assche Signed-off-by: Chaitanya Kulkarni Signed-off-by: Jens Axboe block/blk-core.c | 36 ++++++++++++++++++++++++++++++++++++ include/linux/blkdev.h | 3 +++ 2 files changed, 39 insertions(+) commit 178cc590e54a9e04a749a0474fcaac0e8c20888f Author: Christoph Hellwig Date: Thu Jun 20 10:59:15 2019 -0700 block: improve print_req_error Print the calling function instead of print_req_error as a prefix, and print the operation and op_flags separately instead of the whole field. Reviewed-by: Bart Van Assche Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig Signed-off-by: Chaitanya Kulkarni Signed-off-by: Jens Axboe block/blk-core.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 5c5d3ac2064ae2466c81d40186bcc09b2d5b7892 Author: Qiuxu Zhuo Date: Thu Jun 13 16:40:27 2019 +0800 EDAC, i10nm: Add Intel additional Ice-Lake support Two new CPU models share the same memory controller architecture with Jacobsville/Tremont, so can use the same i10nm EDAC driver. Add ICX and ICX-D CPU model numbers for EDAC support. Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck drivers/edac/i10nm_base.c | 2 ++ 1 file changed, 2 insertions(+) commit 40d796243478e0d072a7e637e7558c3c8216b60a Author: Greg Kroah-Hartman Date: Tue Jun 11 19:54:33 2019 +0200 EDAC: Make edac_debugfs_create_x*() return void The return values of edac_debugfs_create_x16() and edac_debugfs_create_x8() are never checked (as they don't need to be), so no need to have them return anything, just make the functions return void instead. This is done with the goal of being able to change the debugfs_create_x* functions to also not return a value. Signed-off-by: Greg Kroah-Hartman Signed-off-by: Borislav Petkov Cc: James Morse Cc: linux-edac Cc: Mauro Carvalho Chehab Link: https://lkml.kernel.org/r/20190611175433.GA5108@kroah.com drivers/edac/debugfs.c | 12 ++++++------ drivers/edac/edac_module.h | 18 ++++++++---------- 2 files changed, 14 insertions(+), 16 deletions(-) commit ff70cacc967f9455e4b6f62b9a57b5962d9fb725 Author: YueHaibing Date: Sat May 25 22:41:53 2019 +0800 EDAC/aspeed: Remove set but not used variable 'np' Fix the following -Wunused-but-set-variable warning: drivers/edac/aspeed_edac.c: In function aspeed_probe: drivers/edac/aspeed_edac.c:284:22: warning: variable np set but not used [-Wunused-but-set-variable] It is never used and can be removed. Signed-off-by: YueHaibing Signed-off-by: Borislav Petkov Reviewed-by: Andrew Jeffery Reviewed-by: Stefan Schaeckeler Cc: James Morse Cc: Joel Stanley Cc: linux-arm-kernel@lists.infradead.org Cc: linux-aspeed@lists.ozlabs.org Cc: linux-edac Cc: Mauro Carvalho Chehab Link: https://lkml.kernel.org/r/20190525144153.2028-1-yuehaibing@huawei.com drivers/edac/aspeed_edac.c | 4 ---- 1 file changed, 4 deletions(-) commit 4d91fde8d570ffe82e6aa0eec39935b5eed18b45 Author: Marco Elver Date: Mon Jun 10 21:14:22 2019 +0200 EDAC/ie31200: Reformat PCI device table Reformat device table after Coffee Lake additions to be more readable. No functional change. Signed-off-by: Marco Elver Signed-off-by: Borislav Petkov Acked-by: Tony Luck Cc: James Morse Cc: Jason Baron Cc: linux-edac Cc: Mauro Carvalho Chehab Link: https://lkml.kernel.org/r/20190610191422.177931-2-elver@google.com drivers/edac/ie31200_edac.c | 80 ++++++++++++--------------------------------- 1 file changed, 20 insertions(+), 60 deletions(-) commit c452a9d30feb79787ada829d7d7c99574c77049f Author: Marco Elver Date: Mon Jun 10 21:14:21 2019 +0200 EDAC/ie31200: Add Intel Coffee Lake CPU support Coffee Lake seems to work like Skylake and Kaby Lake. Add all device IDs for Coffee Lake-S CPUs according to datasheet. [ bp: Massage. ] Signed-off-by: Marco Elver Signed-off-by: Borislav Petkov Acked-by: Tony Luck Cc: James Morse Cc: Jason Baron Cc: linux-edac Cc: Mauro Carvalho Chehab Link: https://lkml.kernel.org/r/20190610191422.177931-1-elver@google.com drivers/edac/ie31200_edac.c | 58 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 55 insertions(+), 3 deletions(-) commit 91abaeaaff35d97e88d2249f69f19db749a19a68 Author: Yash Shah Date: Mon May 6 16:57:06 2019 +0530 EDAC/sifive: Add EDAC platform driver for SiFive SoCs Add an EDAC driver for SiFive SoCs. The initial version supports ECC event monitoring and reporting through the EDAC framework for the SiFive L2 cache controller. It registers for notifier events from the L2 cache controller driver (arch/riscv/mm/sifive_l2_cache.c) for L2 ECC events. [ bp: Massage commit message. ] Signed-off-by: Yash Shah Signed-off-by: Borislav Petkov Reviewed-by: James Morse Cc: Albert Ou Cc: "David S. Miller" Cc: Greg Kroah-Hartman Cc: Jonathan Cameron Cc: Linus Walleij Cc: linux-edac Cc: linux-riscv@lists.infradead.org Cc: Mauro Carvalho Chehab Cc: Nicolas Ferre Cc: Palmer Dabbelt Cc: "Paul E. McKenney" Cc: Paul Walmsley Cc: sachin.ghadi@sifive.com Link: https://lkml.kernel.org/r/1557142026-15949-2-git-send-email-yash.shah@sifive.com MAINTAINERS | 6 +++ arch/riscv/Kconfig | 1 + drivers/edac/Kconfig | 6 +++ drivers/edac/Makefile | 1 + drivers/edac/sifive_edac.c | 119 +++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 133 insertions(+) commit 0042e9e7a5f662d7b8226316369d02c3553d6400 Author: Colin Ian King Date: Wed May 8 23:42:01 2019 +0100 EDAC/sb_edac: Remove redundant update of tad_base The variable tad_base is being set to a value that is never read and is being over-written on the next iteration of a for-loop. This assignment is therefore redundant and can be removed. Signed-off-by: Colin Ian King Signed-off-by: Borislav Petkov Acked-by: Tony Luck Cc: James Morse Cc: kernel-janitors@vger.kernel.org Cc: linux-edac Cc: Mauro Carvalho Chehab Cc: Qiuxu Zhuo Link: https://lkml.kernel.org/r/20190508224201.27120-1-colin.king@canonical.com drivers/edac/sb_edac.c | 1 - 1 file changed, 1 deletion(-) commit 109d789922f157a569f5e56cbf4a717187567543 Author: Thor Thayer Date: Tue Apr 23 09:36:37 2019 -0500 arm64: dts: stratix10: Add SDMMC EDAC node Add the Stratix10 SDMMC EDAC node. Signed-off-by: Thor Thayer Signed-off-by: Borislav Petkov Acked-by: Dinh Nguyen Cc: devicetree@vger.kernel.org Cc: James Morse Cc: linux-edac Cc: Mark Rutland Cc: mchehab@kernel.org Cc: Rob Herring Link: https://lkml.kernel.org/r/1556030197-24534-5-git-send-email-thor.thayer@linux.intel.com arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts | 11 +++++++++++ 1 file changed, 11 insertions(+) commit a428b4d348c40584342ad0f7733f546b707e4a65 Author: Thor Thayer Date: Tue Apr 23 09:36:36 2019 -0500 EDAC/altera: Add Stratix10 SDMMC support Add SDMMC support for Stratix10 which has IRQ differences from Arria10. Update comment accordingly. Signed-off-by: Thor Thayer Signed-off-by: Borislav Petkov Cc: devicetree@vger.kernel.org Cc: dinguyen@kernel.org Cc: James Morse Cc: linux-edac Cc: mark.rutland@arm.com Cc: Mauro Carvalho Chehab Cc: robh+dt@kernel.org Link: https://lkml.kernel.org/r/1556030197-24534-4-git-send-email-thor.thayer@linux.intel.com drivers/edac/altera_edac.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit 3c4fcb89db2c01b220477318659a31b3dd22dfba Author: Thor Thayer Date: Tue Apr 23 09:36:35 2019 -0500 arm64: dts: stratix10: Add OCRAM EDAC node Add the OCRAM ECC node with Stratix10 compatible string. Signed-off-by: Thor Thayer Signed-off-by: Borislav Petkov Acked-by: Dinh Nguyen Cc: devicetree@vger.kernel.org Cc: James Morse Cc: linux-edac Cc: Mark Rutland Cc: mchehab@kernel.org Cc: Rob Herring Link: https://lkml.kernel.org/r/1556030197-24534-3-git-send-email-thor.thayer@linux.intel.com arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 17e47dc6db4fa6114f031365a81fda1b2d9b8e3f Author: Thor Thayer Date: Tue Apr 23 09:36:34 2019 -0500 EDAC/altera: Add Stratix10 OCRAM ECC support Use the newer ECC error injection method for Arria10 and Stratix10 OCRAM. If OCRAM has already been initialized during boot and OCRAM ECC is enabled, ensure the Single Bit Error IRQ is enabled. Signed-off-by: Thor Thayer Signed-off-by: Borislav Petkov Cc: devicetree@vger.kernel.org Cc: dinguyen@kernel.org Cc: James Morse Cc: linux-edac Cc: mark.rutland@arm.com Cc: Mauro Carvalho Chehab Cc: robh+dt@kernel.org Link: https://lkml.kernel.org/r/1556030197-24534-2-git-send-email-thor.thayer@linux.intel.com drivers/edac/altera_edac.c | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) commit 7adc05d2dc3af95e4e1534841d58f736262142cd Author: Greg KH Date: Wed May 8 12:40:42 2019 +0200 EDAC/sysfs: Drop device references properly Do put_device() if device_add() fails. [ bp: do device_del() for the successfully created devices in edac_create_csrow_objects(), on the unwind path. ] Signed-off-by: Greg KH Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20190427214925.GE16338@kroah.com drivers/edac/edac_mc_sysfs.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 585fb3d93d32dbe89e718b85009f9c322cc554cd Author: Pan Bian Date: Thu Apr 18 10:27:18 2019 +0800 EDAC/sysfs: Fix memory leak when creating a csrow object In edac_create_csrow_object(), the reference to the object is not released when adding the device to the device hierarchy fails (device_add()). This may result in a memory leak. Signed-off-by: Pan Bian Signed-off-by: Borislav Petkov Reviewed-by: Greg Kroah-Hartman Cc: James Morse Cc: Mauro Carvalho Chehab Cc: linux-edac Link: https://lkml.kernel.org/r/1555554438-103953-1-git-send-email-bianpan2016@163.com drivers/edac/edac_mc_sysfs.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 03436e3ec69c8e026224a5f172e5d0431f722305 Author: Sean Paul Date: Mon Jun 17 16:12:58 2019 -0400 drm/msm/dsi: Move setup_encoder to modeset_init Now that the panel probe/setup is in the modeset path, we can call dsi_manager_setup_encoder() in a common place for both internal and external bridge setups. Reviewed-by: Rob Clark Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190617201301.133275-10-sean@poorly.run drivers/gpu/drm/msm/dsi/dsi.c | 2 ++ drivers/gpu/drm/msm/dsi/dsi.h | 2 +- drivers/gpu/drm/msm/dsi/dsi_host.c | 2 -- drivers/gpu/drm/msm/dsi/dsi_manager.c | 37 ++--------------------------------- 4 files changed, 5 insertions(+), 38 deletions(-) commit 6d5e78406991a144b7c44cd57b21e290fdb1d227 Author: Sean Paul Date: Mon Jun 17 16:12:57 2019 -0400 drm/msm/dsi: Move dsi panel init into modeset init path Since deferred probe from the modeset init path now works, we can move the panel initialization from detect() into connector init. This avoids doing work in detect() and hopefully will result in a more deterministic boot sequence between devices with a dsi panel, and those with an external bridge. Reviewed-by: Rob Clark Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190617201301.133275-9-sean@poorly.run drivers/gpu/drm/msm/dsi/dsi_manager.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 970524b07a9c1d0434266a0f32825631bc206848 Author: Sean Paul Date: Mon Jun 17 16:12:56 2019 -0400 drm/msm/dsi: Use the new setup_encoder function in attach_dsi_device Now that we have a function to call set_encoder_mode() for us, use it. Reviewed-by: Rob Clark Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190617201301.133275-8-sean@poorly.run drivers/gpu/drm/msm/dsi/dsi.h | 2 +- drivers/gpu/drm/msm/dsi/dsi_host.c | 2 +- drivers/gpu/drm/msm/dsi/dsi_manager.c | 15 ++------------- 3 files changed, 4 insertions(+), 15 deletions(-) commit faccd71cec5516b1f79e8b40757563617c886171 Author: Sean Paul Date: Mon Jun 17 16:12:55 2019 -0400 drm/msm/dsi: Simplify the logic in msm_dsi_manager_panel_init() This patch moves things around a bit to be a little more readable and pulls out the set_encoder_mode() call into its own function for later use. Reviewed-by: Rob Clark Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190617201301.133275-7-sean@poorly.run drivers/gpu/drm/msm/dsi/dsi_manager.c | 100 ++++++++++++++++++++-------------- 1 file changed, 59 insertions(+), 41 deletions(-) commit 4f229b41386fbf290505411964c8ed25f48e1656 Author: Sean Paul Date: Mon Jun 17 16:12:54 2019 -0400 drm/msm/dsi: Pull out panel init code into function Pull all of the panel init code out of detect() and put it in its own function. This will be useful in future patches where it's moved from detect(). Reviewed-by: Rob Clark Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190617201301.133275-6-sean@poorly.run drivers/gpu/drm/msm/dsi/dsi_manager.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 09951aaa7229b253b0e00979d6c6d17b20e16fe4 Author: Sean Paul Date: Mon Jun 17 16:12:53 2019 -0400 drm/msm/dsi: Don't store dsi host mode_flags in msm_dsi It's a bit dangerous to store the flags in msm_dsi since there's no way to tell when they're populated. Fortunately the only place that uses them is the same place that fills them. So just use a local variable and delete the struct member. Reviewed-by: Rob Clark Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190617201301.133275-5-sean@poorly.run drivers/gpu/drm/msm/dsi/dsi.h | 1 - drivers/gpu/drm/msm/dsi/dsi_manager.c | 17 +++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) commit e3a91f893cabd684a6cd63599425118308defc06 Author: Sean Paul Date: Mon Jun 17 16:12:52 2019 -0400 drm/msm/dsi: Split mode_flags out of msm_dsi_host_get_panel() We use the flags in more places than just get_panel, so split them out into a separate function. Reviewed-by: Rob Clark Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190617201301.133275-4-sean@poorly.run drivers/gpu/drm/msm/dsi/dsi.h | 4 ++-- drivers/gpu/drm/msm/dsi/dsi_host.c | 15 ++++++--------- drivers/gpu/drm/msm/dsi/dsi_manager.c | 7 ++++--- 3 files changed, 12 insertions(+), 14 deletions(-) commit 4368a1539c6b41ac3cddc06f5a5117952998804c Author: Sean Paul Date: Mon Jun 17 16:12:51 2019 -0400 drm/msm: Depopulate platform on probe failure add_display_components() calls of_platform_populate, and we depopluate on pdev remove, but not when probe fails. So if we get a probe deferral in one of the components, we won't depopulate the platform. This causes the core to keep references to devices which should be destroyed, which causes issues when those same devices try to re-initialize on the next probe attempt. I think this is the reason we had issues with the gmu's device-managed resources on deferral (worked around in commit 94e3a17f33a5). Reviewed-by: Rob Clark Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190617201301.133275-3-sean@poorly.run drivers/gpu/drm/msm/msm_drv.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 8b3c087a7998fc5db10b2a9fc850dfc295306c20 Author: Sean Paul Date: Mon Jun 17 16:12:50 2019 -0400 drm/msm/dsi_pll_10nm: Remove impossible check While I'm in here, cut this out, pdev can't be NULL Reviewed-by: Rob Clark Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190617201301.133275-2-sean@poorly.run drivers/gpu/drm/msm/dsi/pll/dsi_pll_10nm.c | 3 --- 1 file changed, 3 deletions(-) commit 83dda228866eb2e30bff2fc7a4192872f61fe900 Author: Sean Paul Date: Mon Jun 17 16:12:49 2019 -0400 drm/msm/dsi_pll_10nm: Release clk hw on destroy and failure The 10nm pll driver didn't have any failure-path cleanup in register, and the destroy function didn't unregister any of the hardware. This patch adds both. The reason things haven't been blowing up horribly is that msm_drv has a reference count issue that keeps devices alive, so the destroy function was never called. That will be fixed in a follow-up patch. Reviewed-by: Rob Clark Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190617201301.133275-1-sean@poorly.run drivers/gpu/drm/msm/dsi/pll/dsi_pll_10nm.c | 103 ++++++++++++++++++++--------- 1 file changed, 73 insertions(+), 30 deletions(-) commit 7896e2237d034493036b25fc0c674654eeeb4dfa Author: Sean Paul Date: Mon Jun 17 16:09:17 2019 -0400 drm/msm/phy/dsi_phy: Set pll to NULL in case initialization fails We have if (!phy->pll) checks scattered through the driver and if phy->pll is an error pointer, those checks will pass and bad things will happen :( Reviewed-by: Rob Clark Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190617200920.133104-1-sean@poorly.run drivers/gpu/drm/msm/dsi/phy/dsi_phy.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit a93be1fc6c84f09a51bb72f833a39c2dc942bd21 Author: Sean Paul Date: Mon Jun 17 16:03:46 2019 -0400 drm/msm/dpu: Avoid calling _dpu_kms_mmu_destroy() on init failure Fix the error paths in _dpu_kms_mmu_init() to properly clean up the iommu domain and not call _dpu_kms_mmu_destroy() when things are only partially setup. Reviewed-by: Rob Clark Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190617200405.131843-2-sean@poorly.run drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit 73e82519ea775799bdc8f10cd77aad2f550edb0a Author: Sean Paul Date: Mon Jun 17 16:03:45 2019 -0400 drm/msm/dpu: Remove call to drm_mode_set_crtcinfo Now that mode_fixup has been removed, we can just rely on the call from drm_helper_probe_single_connector_modes(), Reviewed-by: Rob Clark Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190617200405.131843-1-sean@poorly.run drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 3 --- 1 file changed, 3 deletions(-) commit 46e8e475a160be5e31e99171b7c0c8a21eb4d6ad Author: Ming Lei Date: Tue Jun 18 09:37:44 2019 +0800 scsi: lpfc: use sg helper to iterate over scatterlist Unlike the legacy I/O path, scsi-mq preallocates a large array to hold the scatterlist for each request. This static allocation can consume substantial amounts of memory on modern controllers which support a large number of concurrently outstanding requests. To facilitate a switch to a smaller static allocation combined with a dynamic allocation for requests that need it, we need to make sure all SCSI drivers handle chained scatterlists correctly. Convert remaining drivers that directly dereference the scatterlist array to using the iterator functions. [mkp: clarified commit message] Reviewed by: Ewan D. Milne Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Ming Lei Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_nvmet.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c0d0d81ad34a41e2aa562bc59f22bed3e9e98080 Author: Ming Lei Date: Tue Jun 18 09:37:43 2019 +0800 scsi: advansys: use sg helper to iterate over scatterlist Unlike the legacy I/O path, scsi-mq preallocates a large array to hold the scatterlist for each request. This static allocation can consume substantial amounts of memory on modern controllers which support a large number of concurrently outstanding requests. To facilitate a switch to a smaller static allocation combined with a dynamic allocation for requests that need it, we need to make sure all SCSI drivers handle chained scatterlists correctly. Convert remaining drivers that directly dereference the scatterlist array to using the iterator functions. [mkp: clarified commit message] Reviewed-by: Ewan D. Milne Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Ming Lei Signed-off-by: Martin K. Petersen drivers/scsi/advansys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cf9648cb71d6f1a463553d2fcd4c8137587dc060 Author: Ming Lei Date: Tue Jun 18 09:37:42 2019 +0800 scsi: vmw_pscsi: use sg helper to iterate over scatterlist Unlike the legacy I/O path, scsi-mq preallocates a large array to hold the scatterlist for each request. This static allocation can consume substantial amounts of memory on modern controllers which support a large number of concurrently outstanding requests. To facilitate a switch to a smaller static allocation combined with a dynamic allocation for requests that need it, we need to make sure all SCSI drivers handle chained scatterlists correctly. Convert remaining drivers that directly dereference the scatterlist array to using the iterator functions. [mkp: clarified commit message] Reviewed-by: Ewan D. Milne Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Ming Lei Signed-off-by: Martin K. Petersen drivers/scsi/vmw_pvscsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a49b1dc7ae447d7085360cd587fc1c8b9ec6c871 Author: Leon Romanovsky Date: Wed Jun 12 15:27:41 2019 +0300 RDMA: Convert destroy_wq to be void All callers of destroy WQ are always success and there is no need to check their return value, so convert destroy_wq to be void. Signed-off-by: Leon Romanovsky Reviewed-by: Yuval Shaia Signed-off-by: Doug Ledford drivers/infiniband/core/verbs.c | 12 +++++------- drivers/infiniband/hw/mlx4/mlx4_ib.h | 2 +- drivers/infiniband/hw/mlx4/qp.c | 4 +--- drivers/infiniband/hw/mlx5/mlx5_ib.h | 2 +- drivers/infiniband/hw/mlx5/qp.c | 4 +--- include/rdma/ib_verbs.h | 2 +- 6 files changed, 10 insertions(+), 16 deletions(-) commit 4f0793989f2f65eccffc7d326856f18788534c61 Author: Alex Deucher Date: Mon Jun 17 13:10:48 2019 -0500 Revert "drm/amd/display: Copy stream updates onto streams" This reverts commit 6e5155ae6b66054db35d8f3c64f9863b9d0466c1. Revert this to apply the version that includes DCN2 support. Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 69 -------------------------------- 1 file changed, 69 deletions(-) commit 1a1da391c9e24b0102205aa2fb819643b21fdd97 Author: Alex Deucher Date: Mon Jun 17 13:08:58 2019 -0500 Revert "drm/amd/display: Use macro for invalid OPP ID" This reverts commit 1760bd06c8e94e1b184139ae35201856403638cf. Revert this to apply the version that includes DCN2 support. Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c | 4 ++-- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 4 ++-- drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h | 2 -- 3 files changed, 4 insertions(+), 6 deletions(-) commit ecbc382c9fdf19b4e0e1ee4702923a39133b864e Author: Alex Deucher Date: Mon Jun 17 13:08:40 2019 -0500 Revert "drm/amd/display: Rework CRTC color management" This reverts commit 7cd4b70091a5cfa1f58d3a529535304a116acc95. Revert this to apply the version that includes DCN2 support. Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 32 +- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 10 +- .../drm/amd/display/amdgpu_dm/amdgpu_dm_color.c | 473 +++++++-------------- 3 files changed, 159 insertions(+), 356 deletions(-) commit f94ec6f8b8857e5792328774fa47984f7d7df194 Author: Alex Deucher Date: Mon Jun 17 13:06:37 2019 -0500 Revert "drm/amd/display: move vmid determination logic out of dc" This reverts commit 11cd74cdb98aa6f4d6f54a0082dd28e0d4743746. Revert this to apply the version that includes DCN2 support. Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/Makefile | 4 +- drivers/gpu/drm/amd/display/dc/core/dc_vm_helper.c | 123 +++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dc.h | 1 - drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 2 - drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c | 3 +- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 3 +- drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h | 3 +- drivers/gpu/drm/amd/display/dc/inc/hw/vmid.h | 1 - drivers/gpu/drm/amd/display/dc/inc/vm_helper.h | 16 ++- 9 files changed, 143 insertions(+), 13 deletions(-) commit 0198b6e5be885fd4dfe467dd6bea45416c2cd34e Author: Alex Deucher Date: Mon Jun 17 13:06:19 2019 -0500 Revert "drm/amd/display: Add Underflow Asserts to dc" This reverts commit 9ed43ef84d9d1e668acdf43c95510fb7b11f8d71. Revert this to apply the version that includes DCN2 support. Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 1 - .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 32 +--------------------- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.h | 2 -- .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 4 +-- drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 1 - 5 files changed, 2 insertions(+), 38 deletions(-) commit 76d981a9fe8239b722b6efa5b5f8b85e9b8e4056 Author: Alex Deucher Date: Mon Jun 17 13:04:43 2019 -0500 Revert "drm/amd/display: make clk_mgr call enable_pme_wa" This reverts commit a1651530a3bacf1d796fdb7bc587faef9f305d36. Revert this to apply the version that includes DCN2 support. Signed-off-by: Alex Deucher .../drm/amd/display/dc/clk_mgr/dcn10/rv1_clk_mgr.c | 14 ------------ .../amd/display/dc/dce110/dce110_hw_sequencer.c | 25 ++++++++++++++++------ 2 files changed, 19 insertions(+), 20 deletions(-) commit ee102584efd53547bf9a0810e80b56f99f4a9105 Author: Zhengyuan Liu Date: Thu Jun 20 18:12:17 2019 +0100 fs/afs: use struct_size() in kzalloc() As Gustavo said in other patches doing the same replace, we can now use the new struct_size() helper to avoid leaving these open-coded and prone to type mistake. Signed-off-by: Zhengyuan Liu Signed-off-by: David Howells fs/afs/dir.c | 3 +-- fs/afs/file.c | 6 ++---- fs/afs/write.c | 3 +-- 3 files changed, 4 insertions(+), 8 deletions(-) commit 452181936931f0f08923aba5e04e1e9ef58c389f Author: David Howells Date: Thu Jun 20 18:12:17 2019 +0100 afs: Trace afs_server usage Add a tracepoint (afs_server) to track the afs_server object usage count. Signed-off-by: David Howells fs/afs/callback.c | 4 +-- fs/afs/cmservice.c | 5 +++- fs/afs/fsclient.c | 2 +- fs/afs/internal.h | 10 +++----- fs/afs/rxrpc.c | 2 +- fs/afs/server.c | 39 ++++++++++++++++++++++------ fs/afs/server_list.c | 6 +++-- include/trace/events/afs.h | 63 ++++++++++++++++++++++++++++++++++++++++++++++ 8 files changed, 110 insertions(+), 21 deletions(-) commit 051d25250b55c215a2254a0130d46fbd38bcbcc0 Author: David Howells Date: Thu Jun 20 18:12:16 2019 +0100 afs: Add some callback management tracepoints Add a couple of tracepoints to track callback management: (1) afs_cb_miss - Logs when we were unable to apply a callback, either due to the inode being discarded or due to a competing thread applying a callback first. (2) afs_cb_break - Logs when we attempted to clear the noted callback promise, either due to the server explicitly breaking the callback, the callback promise lapsing or a local event obsoleting it. Signed-off-by: David Howells fs/afs/callback.c | 16 ++++++++--- fs/afs/dir.c | 4 +-- fs/afs/inode.c | 17 +++++++----- fs/afs/internal.h | 8 +++--- include/trace/events/afs.h | 69 ++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 97 insertions(+), 17 deletions(-) commit fa59f52f5b1412c373813e24e7cbe5ab44518ed8 Author: David Howells Date: Thu Jun 20 18:12:16 2019 +0100 afs: afs_unlink() doesn't need to check dentry->d_inode Don't check that dentry->d_inode is valid in afs_unlink(). We should be able to take that as given. This caused Smatch to issue the following warning: fs/afs/dir.c:1392 afs_unlink() error: we previously assumed 'vnode' could be null (see line 1375) Reported-by: kbuild test robot Reported-by: Dan Carpenter Signed-off-by: David Howells fs/afs/dir.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 8d18ad83f19b7fb67485f977a51408287e3f801f Author: Lijun Ou Date: Sat Jun 8 14:46:10 2019 +0800 RDMA/hns: Fix bug when wqe num is larger than 16K hip08 can support up to 32768 wqes in one qp. currently if the wqe num is larger than 16384, the driver will lead a calltrace as follows. [21361.393725] Call trace: [21361.398605] hns_roce_v2_modify_qp+0xbcc/0x1360 [hns_roce_hw_v2] [21361.410627] hns_roce_modify_qp+0x1d8/0x2f8 [hns_roce] [21361.420906] _ib_modify_qp+0x70/0x118 [21361.428222] ib_modify_qp+0x14/0x1c [21361.435193] rt_ktest_modify_qp+0xb8/0x650 [rdma_test] [21361.445472] exec_modify_qp_cmd+0x110/0x4d8 [rdma_test] [21361.455924] rt_ktest_dispatch_cmd_3+0xa94/0x2edc [rdma_test] [21361.467422] rt_ktest_dispatch_cmd_2+0x9c/0x108 [rdma_test] [21361.478570] rt_ktest_dispatch_cmd+0x138/0x904 [rdma_test] [21361.489545] rt_ktest_dev_write+0x328/0x4b0 [rdma_test] [21361.499998] __vfs_write+0x38/0x15c [21361.506966] vfs_write+0xa8/0x1a0 [21361.513586] ksys_write+0x50/0xb0 [21361.520206] sys_write+0xc/0x14 [21361.526479] el0_svc_naked+0x30/0x34 [21361.533622] Code: 1ac10841 d37d7c22 0b000021 d37df021 (f86268c0) [21361.545815] ---[ end trace e2a1feb2c3d7f13c ]--- When the wqe num is larger than 16384, hns_roce_table_find will return an invalid mtt, this will lead an kernel paging requet error if the driver try to access it. It's the mtt design defect which can't support up to the max wqe num of hip08. This patch fixs it by replacing mtt with mtr for wqe. Fixes: 926a01dc000d ("RDMA/hns: Add QP operations support for hip08 SoC") Signed-off-by: Xi Wang Signed-off-by: Lijun Ou Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_device.h | 11 ++ drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 118 +++++++++++------ drivers/infiniband/hw/hns/hns_roce_qp.c | 189 +++++++++++++++++++++------- 3 files changed, 235 insertions(+), 83 deletions(-) commit 2ac0bc5e725e84d56b7fc8b280b2dbc9f2f10737 Author: Lijun Ou Date: Sat Jun 8 14:46:09 2019 +0800 RDMA/hns: Add a group interfaces for optimizing buffers getting flow Currently, the code for getting umem and kmem buffers exist many files, this patch adds a group interfaces to simplify the buffers getting flow. Signed-off-by: Xi Wang Signed-off-by: Lijun Ou Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_alloc.c | 99 +++++++++++++++++++++++++++++ drivers/infiniband/hw/hns/hns_roce_device.h | 12 ++++ 2 files changed, 111 insertions(+) commit 38389eaa4db192648916464b60f6086d6bbaa6de Author: Lijun Ou Date: Sat Jun 8 14:46:08 2019 +0800 RDMA/hns: Add mtr support for mixed multihop addressing Currently, the MTT(memory translate table) design required a buffer space must has the same hopnum, but the hip08 hw can support mixed hopnum config in a buffer space. This patch adds the MTR(memory translate region) design for supporting mixed multihop. Signed-off-by: Xi Wang Signed-off-by: Lijun Ou Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_device.h | 36 +++ drivers/infiniband/hw/hns/hns_roce_hem.c | 460 ++++++++++++++++++++++++++++ drivers/infiniband/hw/hns/hns_roce_hem.h | 14 + drivers/infiniband/hw/hns/hns_roce_mr.c | 118 +++++++ 4 files changed, 628 insertions(+) commit 0fc8b82f31c4a7bea4c487d380a10d1271bf8d4d Author: Manikanta Maddireddy Date: Tue Jun 18 23:32:04 2019 +0530 PCI: Add DT binding for "reset-gpios" property Add DT binding for "reset-gpios" property which supports GPIO based PERST# signal. Signed-off-by: Manikanta Maddireddy Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Acked-by: Thierry Reding Documentation/devicetree/bindings/pci/pci.txt | 3 +++ 1 file changed, 3 insertions(+) commit 2d8c7361585fd53903943cc6a632585f32c14a20 Author: Manikanta Maddireddy Date: Tue Jun 18 23:32:03 2019 +0530 PCI: tegra: Put PEX CLK & BIAS pads in DPD mode In Tegra210 AFI design has clamp value for the BIAS pad as 0, which keeps the bias pad in non power down mode. This is leading to power consumption of 2 mW in BIAS pad, even if the PCIe partition is powergated. To avoid unnecessary power consumption, put PEX CLK & BIAS pads in deep power down mode when PCIe partition is power gated. Signed-off-by: Manikanta Maddireddy Signed-off-by: Lorenzo Pieralisi Acked-by: Thierry Reding drivers/pci/controller/pci-tegra.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 5992b044989daf281a2ab78b2e841cd6bd51d93a Author: Manikanta Maddireddy Date: Tue Jun 18 23:32:01 2019 +0530 dt-bindings: pci: tegra: Document PCIe DPD pinctrl optional prop Document PCIe DPD pinctrl optional property to put PEX clk & BIAS pads in low power mode. Signed-off-by: Manikanta Maddireddy Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Acked-by: Thierry Reding Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt | 8 ++++++++ 1 file changed, 8 insertions(+) commit adb2653b3d2e91e3053c807710615f532781b61f Author: Manikanta Maddireddy Date: Tue Jun 18 23:32:00 2019 +0530 PCI: tegra: Add AFI_PEX2_CTRL reg offset as part of SoC struct Tegra186 and Tegra30 have three PCIe root ports. AFI_PEX2_CTRL register is defined for third root port. Offset of this register in Tegra186 is different from Tegra30, so add the offset as part of SoC data structure. Signed-off-by: Manikanta Maddireddy Signed-off-by: Lorenzo Pieralisi Acked-by: Thierry Reding drivers/pci/controller/pci-tegra.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit c894121d014260af3fd199e1d2a56d4af5ff8ba9 Author: Manikanta Maddireddy Date: Tue Jun 18 23:31:58 2019 +0530 PCI: tegra: Change PRSNT_SENSE IRQ log to debug PRSNT_MAP bit field is programmed to update the slot present status. PRSNT_SENSE IRQ is triggered when this bit field is programmed, which is not an error. Add a new if condition to trap PRSNT_SENSE code and print it with debug log level. Signed-off-by: Manikanta Maddireddy Signed-off-by: Lorenzo Pieralisi Acked-by: Thierry Reding drivers/pci/controller/pci-tegra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b5b4717ea0ddf64357c68a865f652487b9b1cdf8 Author: Manikanta Maddireddy Date: Tue Jun 18 23:31:57 2019 +0530 PCI: tegra: Program AFI_CACHE_BAR_{0,1}_{ST,SZ} registers only for Tegra20 Cacheable upstream transactions are supported in Tegra20 and Tegra186 only. AFI_CACHE_BAR_{0,1}_{ST,SZ} registers are available in Tegra20 to support cacheable upstream transactions. In Tegra186, AFI_AXCACHE register is defined instead of AFI_CACHE_BAR_{0,1}_{ST,SZ} to be in line with its memory subsystem design. Therefore, program AFI_CACHE_BAR_{0,1}_{ST,SZ} registers only for Tegra20. Signed-off-by: Manikanta Maddireddy [lorenzo.pieralisi@arm.com: updated commit log] Signed-off-by: Lorenzo Pieralisi Acked-by: Thierry Reding drivers/pci/controller/pci-tegra.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit 70a1efac712caf5c47fad1eed06353303860fe2d Author: Nicholas Kazlauskas Date: Thu Jun 20 08:30:09 2019 -0400 Revert "drm/amd/display: Enable fast plane updates when state->allow_modeset = true" This reverts commit ebc8c6f18322ad54275997a888ca1731d74b711f. There are still missing corner cases with cursor interaction and these fast plane updates on Picasso and Raven2 leading to endless PSTATE warnings for typical desktop usage depending on the userspace. This change should be reverted until these issues have been resolved. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110949 Signed-off-by: Nicholas Kazlauskas Reviewed-by: David Francis Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit a95ecb653aa8aba844b182cdc76a35803b626743 Author: Jack Zhang Date: Thu Jun 20 13:44:47 2019 +0800 drm/amdgpu/sriov: fix Tonga load driver failed Tonga sriov need to use smu to load firmware. Remove sriov flag because the default return value is zero. Signed-off-by: Jack Zhang Reviewed-by: Trigger Huang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 2 -- 1 file changed, 2 deletions(-) commit 9c7c85f7ea1fe55e9406858e3ca32a51494bd02e Author: Jonathan Kim Date: Wed Jun 19 23:56:25 2019 -0400 drm/amdgpu: add pmu counters adding perf event counters Signed-off-by: Jonathan Kim Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 + drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c | 280 +++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.h | 37 ++++ 4 files changed, 324 insertions(+), 1 deletion(-) commit e4cf4bf5b876df83ad42604e21337eb3e7dfa52c Author: Jonathan Kim Date: Wed Jun 19 23:37:59 2019 -0400 drm/amdgpu: update df_v3_6 for xgmi perfmons (v2) add pmu attribute groups and structures for perf events. add sysfs to track available df perfmon counters fix overflow handling in perfmon counter reads. v2: squash in fix (Alex) Signed-off-by: Jonathan Kim Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 18 ++ drivers/gpu/drm/amd/amdgpu/df_v3_6.c | 440 ++++++++++++++++------------------- drivers/gpu/drm/amd/amdgpu/df_v3_6.h | 19 +- drivers/gpu/drm/amd/amdgpu/soc15.c | 3 + 4 files changed, 224 insertions(+), 256 deletions(-) commit 496091fa041fe8e8a6b2da745ba4fbcb8caed2dd Author: Roman Li Date: Tue Jun 18 11:25:25 2019 -0400 drm/amd/display: Fix null-deref on vega20 with xgmi [Why] After clkmgr rework it gets initialized after resource pool. The clkmgr is used in resource pool init for xgmi path. That causes driver crash on Vega20 with xgmi due to NULL deref. [How] Move xgmi compensation code to dce121_clk_mgr_construct() That also allows to make dce121_clock_patch_xgmi_ss_info() internal static function. Signed-off-by: Roman Li Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/clk_mgr/dce120/dce120_clk_mgr.c | 14 +++++++++++--- drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c | 10 ---------- drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr.h | 2 -- 3 files changed, 11 insertions(+), 15 deletions(-) commit de9f26bbd3842a7e8fca4f88b448636cc56319ff Author: Kent Russell Date: Thu Jun 13 09:55:40 2019 -0400 drm/amdkfd: Add procfs-style information for KFD processes Add a folder structure to /sys/class/kfd/kfd/ called proc which contains subfolders, each representing an active KFD process' PID, containing 1 file: pasid. Signed-off-by: Kent Russell Reviewed-by: Felix Kuehling Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_module.c | 6 ++ drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 9 +++ drivers/gpu/drm/amd/amdkfd/kfd_process.c | 100 ++++++++++++++++++++++++++++++- 3 files changed, 113 insertions(+), 2 deletions(-) commit e82fdb16a0650250e27f7241133682342d476ad3 Author: Philip Yang Date: Fri Jun 14 14:03:36 2019 -0400 drm/amdgpu: improve HMM error -ENOMEM and -EBUSY handling Under memory pressure, hmm_range_fault may return error code -ENOMEM or -EBUSY, change pr_info to pr_debug to remove unnecessary kernel log message because we will retry restore again. Call get_user_pages_done if TTM get user pages failed will have WARN_ONCE kernel calling stack dump log. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 38 ++++-------------------- 1 file changed, 6 insertions(+), 32 deletions(-) commit 8060c47ba853f147c46bf1e6f6d93d1726fcb57a Author: Christoph Hellwig Date: Thu Jun 6 12:26:24 2019 +0200 block: rename CONFIG_DEBUG_BLK_CGROUP to CONFIG_BFQ_CGROUP_DEBUG This option is entirely bfq specific, give it an appropinquate name. Also make it depend on CONFIG_BFQ_GROUP_IOSCHED in Kconfig, as all the functionality already does so anyway. Acked-by: Tejun Heo Acked-by: Paolo Valente Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe Documentation/block/bfq-iosched.txt | 12 ++++++------ Documentation/cgroup-v1/blkio-controller.txt | 12 ++++++------ block/Kconfig.iosched | 7 +++++++ block/bfq-cgroup.c | 27 +++++++++++++-------------- block/bfq-iosched.c | 8 ++++---- block/bfq-iosched.h | 4 ++-- init/Kconfig | 8 -------- 7 files changed, 38 insertions(+), 40 deletions(-) commit d6258980daf207f986676e59e6ea295204cdc84e Author: Christoph Hellwig Date: Thu Jun 6 12:26:23 2019 +0200 bfq-iosched: move bfq_stat_recursive_sum into the only caller This function was moved from core block code and is way to generic. Fold it into the only caller and simplify it based on the actually passed arguments. Acked-by: Tejun Heo Acked-by: Paolo Valente Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/bfq-cgroup.c | 62 +++++++++++++++++------------------------------------- 1 file changed, 19 insertions(+), 43 deletions(-) commit c0ce79dca5b0e8373a546ebea2af7b3df94c584e Author: Christoph Hellwig Date: Thu Jun 6 12:26:22 2019 +0200 blk-cgroup: move struct blkg_stat to bfq This structure and assorted infrastructure is only used by the bfq I/O scheduler. Move it there instead of bloating the common code. Acked-by: Tejun Heo Acked-by: Paolo Valente Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/bfq-cgroup.c | 192 ++++++++++++++++++++++++++++++++++++--------- block/bfq-iosched.h | 19 +++-- block/blk-cgroup.c | 56 ------------- include/linux/blk-cgroup.h | 71 ----------------- 4 files changed, 167 insertions(+), 171 deletions(-) commit 7af6fd9112ba310a889c60d0606b4b74049cfe14 Author: Christoph Hellwig Date: Thu Jun 6 12:26:21 2019 +0200 blk-cgroup: introduce a new struct blkg_rwstat_sample When sampling the blkcg counts we don't need atomics or per-cpu variables. Introduce a new structure just containing plain u64 counters. Acked-by: Tejun Heo Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/bfq-cgroup.c | 10 ++++------ block/blk-cgroup.c | 39 +++++++++++++++++++-------------------- include/linux/blk-cgroup.h | 22 ++++++++++++---------- 3 files changed, 35 insertions(+), 36 deletions(-) commit 5d0b6e48cbef3219c0ed75e0e746c4ed259303c2 Author: Christoph Hellwig Date: Thu Jun 6 12:26:20 2019 +0200 blk-cgroup: pass blkg_rwstat structures by reference Returning a structure generates rather bad code, so switch to passing by reference. Also don't require the structure to be zeroed and add to the 0-initialized counters, but actually set the counters to the calculated value. Acked-by: Tejun Heo Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/bfq-cgroup.c | 15 +++++++++------ block/blk-cgroup.c | 31 ++++++++++++++++--------------- include/linux/blk-cgroup.h | 14 +++++++------- 3 files changed, 32 insertions(+), 28 deletions(-) commit 239eeb085753d4356f731a773f363eb5bed4fe81 Author: Christoph Hellwig Date: Thu Jun 6 12:26:19 2019 +0200 blk-cgroup: factor out a helper to read rwstat counter Trying to break up the crazy statements to something readable. Also switch to an unsigned counter as it can't ever turn negative. Reviewed-by: Chaitanya Kulkarni Acked-by: Tejun Heo Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/blk-cgroup.c | 5 ++--- include/linux/blk-cgroup.h | 7 +++++++ 2 files changed, 9 insertions(+), 3 deletions(-) commit c1d827d62f71eb6eaa0b2ffad4d893faa99e4c87 Author: Tom St Denis Date: Fri Jun 14 11:47:21 2019 -0400 drm/amd/amdgpu: cast mem->num_pages to 64-bits when shifting (v2) On 32-bit hosts mem->num_pages is 32-bits and can overflow when shifted. Add a cast to avoid this. (v2): Style fix. Signed-off-by: Tom St Denis Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit acb05f0a3f6261b330034e14e4d2c6b4bc896504 Author: xinhui pan Date: Fri Jun 14 16:06:10 2019 +0800 drm/amdgpu: Do error injection even vram reserve fails As long as the address is mapped with vram, we can do an error injection. Signed-off-by: xinhui pan Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 1aa0a133fbabeca9e8785fb11de471841009d6d9 Author: Christoph Hellwig Date: Thu Jun 6 12:29:04 2019 +0200 block: mark blk_rq_bio_prep as inline This function just has a few trivial assignments, has two callers with one of them being in the fastpath. Reviewed-by: Hannes Reinecke Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/blk-core.c | 11 ----------- block/blk.h | 13 ++++++++++++- 2 files changed, 12 insertions(+), 12 deletions(-) commit d627065d88469933bc1527f97c539c464482f0bb Author: Christoph Hellwig Date: Thu Jun 6 12:29:03 2019 +0200 block: untangle the end of blk_bio_segment_split Now that we don't need to assign the front/back segment sizes, we can duplicating the segs assignment for the split vs no-split case and remove a whole chunk of boilerplate code. Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/blk-merge.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) commit e9cd19c0c198aa1c893e142b015fde6da862ed52 Author: Christoph Hellwig Date: Thu Jun 6 12:29:02 2019 +0200 block: simplify blk_recalc_rq_segments Return the segement and let the callers assign them, which makes the code a littler more obvious. Also pass the request instead of q plus bio chain, allowing for the use of rq_for_each_bvec. Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/blk-core.c | 4 ++-- block/blk-merge.c | 21 ++++++--------------- block/blk.h | 2 +- 3 files changed, 9 insertions(+), 18 deletions(-) commit 14ccb66b3f585b2bc21e7256c96090abed5a512c Author: Christoph Hellwig Date: Thu Jun 6 12:29:01 2019 +0200 block: remove the bi_phys_segments field in struct bio We only need the number of segments in the blk-mq submission path. Remove the field from struct bio, and return it from a variant of blk_queue_split instead of that it can passed as an argument to those functions that need the value. This also means we stop recounting segments except for cloning and partial segments. To keep the number of arguments in this how path down remove pointless struct request_queue arguments from any of the functions that had it and grew a nr_segs argument. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe Documentation/block/biodoc.txt | 1 - block/bfq-iosched.c | 5 +-- block/bio.c | 15 +-------- block/blk-core.c | 32 ++++++++---------- block/blk-map.c | 10 ++++-- block/blk-merge.c | 75 +++++++++++++++--------------------------- block/blk-mq-sched.c | 26 ++++++++------- block/blk-mq-sched.h | 10 +++--- block/blk-mq.c | 23 ++++++------- block/blk.h | 23 ++++++------- block/kyber-iosched.c | 5 +-- block/mq-deadline.c | 5 +-- drivers/md/raid5.c | 1 - include/linux/bio.h | 1 - include/linux/blk-mq.h | 2 +- include/linux/blk_types.h | 6 ---- include/linux/blkdev.h | 1 - include/linux/elevator.h | 2 +- 18 files changed, 106 insertions(+), 137 deletions(-) commit f924cddebc900f7cb10d5538d69523e558fa681c Author: Christoph Hellwig Date: Thu Jun 6 12:29:00 2019 +0200 block: remove blk_init_request_from_bio lightnvm should have never used this function, as it is sending passthrough requests, so switch it to blk_rq_append_bio like all the other passthrough request users. Inline blk_init_request_from_bio into the only remaining caller. Reviewed-by: Hannes Reinecke Reviewed-by: Minwoo Im Reviewed-by: Javier González Reviewed-by: Matias Bjørling Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/blk-core.c | 11 ----------- block/blk-mq.c | 7 ++++++- drivers/nvme/host/lightnvm.c | 2 +- include/linux/blkdev.h | 1 - 4 files changed, 7 insertions(+), 14 deletions(-) commit 0c8cf8c2a553f01732f23ba407fae8edb0a18ff5 Author: Christoph Hellwig Date: Thu Jun 6 12:28:59 2019 +0200 block: initialize the write priority in blk_rq_bio_prep The priority field also makes sense for passthrough requests, so initialize it in blk_rq_bio_prep. Reviewed-by: Minwoo Im Reviewed-by: Hannes Reinecke Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/blk-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eef4a35026613ff1576ca93a9b158e774330576b Author: Manikanta Maddireddy Date: Tue Jun 18 23:31:56 2019 +0530 PCI: tegra: Fix PLLE power down issue due to CLKREQ# signal Disable controllers which failed to bring the link up and configure CLKREQ# signals of these controllers as GPIO. This is required to avoid CLKREQ# signal of inactive controllers interfering with PLLE power down sequence. PCIE_CLKREQ_GPIO bits are defined only in Tegra186, however programming these bits in other SoCs doesn't cause any side effects. Program these bits for all Tegra SoCs to avoid a conditional check. Signed-off-by: Manikanta Maddireddy Signed-off-by: Lorenzo Pieralisi Acked-by: Thierry Reding drivers/pci/controller/pci-tegra.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit c23ae2aec5bc40cfc8e9ad0058aff2edacb0fbcb Author: Manikanta Maddireddy Date: Tue Jun 18 23:31:55 2019 +0530 PCI: tegra: Set target speed as Gen1 before starting LTSSM PCIe link up fails with few legacy endpoints if root port advertises both Gen-1 and Gen-2 speeds in Tegra. This is because link number negotiation fails if both Gen1 & Gen2 are advertised. Tegra doesn't retry link up by advertising only Gen1. Hence, the strategy followed here is to initially advertise only Gen-1 and after link is up, retrain link to Gen-2 speed. Tegra doesn't support HW autonomous speed change. Link comes up in Gen1 even if Gen2 is advertised, so there is no downside of this change. This behavior is observed with following two PCIe devices on Tegra: - Fusion HDTV 5 Express card - IOGear SIL - PCIE - SATA card Signed-off-by: Manikanta Maddireddy Signed-off-by: Lorenzo Pieralisi Acked-by: Thierry Reding drivers/pci/controller/pci-tegra.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 9f570b6c240e4f64791805b37fb4c60c65ea95c6 Author: Manikanta Maddireddy Date: Tue Jun 18 23:31:54 2019 +0530 PCI: tegra: Update flow control timer frequency in Tegra210 Recommended UpdateFC threshold in Tegra210 is 0x60 for best performance of x1 link. Setting this to 0x60 provides the best balance between number of UpdateFC packets and read data sent over the link. UpdateFC timer frequency is equal to twice the value of register content in nsec, i.e (2 * 0x60) = 192 nsec. Signed-off-by: Manikanta Maddireddy Signed-off-by: Lorenzo Pieralisi Acked-by: Thierry Reding drivers/pci/controller/pci-tegra.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 191cd6fb5d2cf184a3010c55ca290b2fe5a3d727 Author: Manikanta Maddireddy Date: Tue Jun 18 23:31:53 2019 +0530 PCI: tegra: Add SW fixup for RAW violations The logic which blocks read requests till AFI gets ACK for all outstanding writes from memory controller does not behave correctly when number of outstanding writes become more than 32 in Tegra124 and Tegra132. SW fixup is to prevent writes from accumulating more than 32 by: - limiting outstanding posted writes to 14 - modifying Gen1 and Gen2 UpdateFC timer frequency UpdateFC timer frequency is equal to twice the value of register content in nsec. These settings are recommended after stress testing with different values. Signed-off-by: Manikanta Maddireddy Signed-off-by: Lorenzo Pieralisi Acked-by: Thierry Reding drivers/pci/controller/pci-tegra.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit b2634cd0d26d2431f065e06e30069ce11a081755 Author: Manikanta Maddireddy Date: Tue Jun 18 23:31:52 2019 +0530 PCI: tegra: Increase the deskew retry time Sometimes link speed change from Gen2 to Gen1 fails due to instability in deskew logic on lane-0 in Tegra210. Increase the deskew retry time to resolve this issue. Signed-off-by: Manikanta Maddireddy Signed-off-by: Lorenzo Pieralisi Acked-by: Thierry Reding drivers/pci/controller/pci-tegra.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit f1178099a6e434d3ae676db4c13dbcc5211c2817 Author: Manikanta Maddireddy Date: Tue Jun 18 23:31:51 2019 +0530 PCI: tegra: Enable PCIe xclk clock clamping Enable xclk clock clamping when entering L1. Clamp threshold will determine the time spent waiting for clock module to turn on xclk after signaling it. Default threshold value in Tegra124 and Tegra210 is not enough to turn on xclk clock. Increase the clamp threshold to meet the clock module timing in Tegra124 and Tegra210. Default threshold value is enough in Tegra20, Tegra30 and Tegra186. Signed-off-by: Manikanta Maddireddy Signed-off-by: Lorenzo Pieralisi Acked-by: Thierry Reding drivers/pci/controller/pci-tegra.c | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) commit 52db2fd89e1a811c3bf63586a31fe4e454e59b56 Author: Manikanta Maddireddy Date: Tue Jun 18 23:31:50 2019 +0530 PCI: tegra: Process pending DLL transactions before entering L1 or L2 PM message are truncated while entering L1 or L2, which is resulting in receiver errors. Set the required bit to finish processing DLLP before link enter L1 or L2. Signed-off-by: Manikanta Maddireddy Signed-off-by: Lorenzo Pieralisi Acked-by: Thierry Reding drivers/pci/controller/pci-tegra.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 92bd94f1fdde630e593a81930b45c9e3dc024d48 Author: Manikanta Maddireddy Date: Tue Jun 18 23:31:49 2019 +0530 PCI: tegra: Disable AFI dynamic clock gating Outstanding write counter in AFI is used to generate idle signal to dynamically gate the AFI clock. When there are 32 outstanding writes from AFI to memory, the outstanding write counter overflows and indicates that there are "0" outstanding write transactions. When memory controller is under heavy load, write completions to AFI gets delayed and AFI write counter overflows. This causes AFI clock gating even when there are outstanding transactions towards memory controller resulting in a system hang. Disable dynamic clock gating of AFI clock to avoid system hang. CLKEN_OVERRIDE bit is not defined in Tegra20 and Tegra30, however programming this bit doesn't cause any side effects. Program this bit for all Tegra SoCs to avoid conditional check. Signed-off-by: Manikanta Maddireddy Signed-off-by: Lorenzo Pieralisi Acked-by: Thierry Reding drivers/pci/controller/pci-tegra.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 7763cc24e2103a54eb43bbe46fca59ddab77c2f2 Author: Manikanta Maddireddy Date: Tue Jun 18 23:31:48 2019 +0530 PCI: tegra: Enable opportunistic UpdateFC and ACK Enable opportunistic UpdateFC and ACK to allow data link layer send pending ACKs and UpdateFC packets when link is idle instead of waiting for timers to expire. This improves the PCIe performance due to better utilization of PCIe bandwidth. Signed-off-by: Manikanta Maddireddy Signed-off-by: Lorenzo Pieralisi Acked-by: Thierry Reding drivers/pci/controller/pci-tegra.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 2513a4ee47354e1d8b6b9d084cb5625813fb96d4 Author: Manikanta Maddireddy Date: Tue Jun 18 23:31:47 2019 +0530 PCI: tegra: Program UPHY electrical settings for Tegra210 UPHY electrical programming guidelines are documented in Tegra210 TRM. Program these electrical settings for proper eye diagram in Gen1 and Gen2 link speeds. Signed-off-by: Manikanta Maddireddy Signed-off-by: Lorenzo Pieralisi Acked-by: Thierry Reding drivers/pci/controller/pci-tegra.c | 107 +++++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) commit c635a815c8c73a985b0e723efd4ffd70e99729fc Author: Manikanta Maddireddy Date: Tue Jun 18 23:31:46 2019 +0530 PCI: tegra: Advertise PCIe Advanced Error Reporting (AER) capability Default root port setting hides AER capability. This patch enables the advertisement of AER capability by root port. Signed-off-by: Manikanta Maddireddy Signed-off-by: Lorenzo Pieralisi Acked-by: Thierry Reding drivers/pci/controller/pci-tegra.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 538123a29aebca0ba7c35d69bd4d2b91d9d81026 Author: Manikanta Maddireddy Date: Tue Jun 18 23:31:45 2019 +0530 PCI: tegra: Add PCIe Gen2 link speed support Tegra124, Tegra132, Tegra210 and Tegra186 support Gen2 link speed. After PCIe link is up in Gen1, set target link speed as Gen2 and retrain link. Link switches to Gen2 speed if Gen2 capable end point is connected, otherwise the link stays in Gen1. Per PCIe 4.0r0.9 sec 7.6.3.7 implementation note, driver needs to wait for PCIe LTSSM to come back from recovery before retraining the link. Signed-off-by: Manikanta Maddireddy Signed-off-by: Lorenzo Pieralisi Acked-by: Thierry Reding drivers/pci/controller/pci-tegra.c | 64 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) commit d1f9113faf8ade46d48c6277cc3914e1422f3a4b Author: Manikanta Maddireddy Date: Tue Jun 18 23:31:44 2019 +0530 PCI: tegra: Fix PCIe host power up sequence The PCIe host power up sequence requires to program AFI(AXI to FPCI bridge) registers first and then PCIe registers, otherwise AFI register settings may not latch to PCIe IP. PCIe root port starts LTSSM as soon as PCIe xrst is deasserted. So deassert PCIe xrst after programming PCIe registers. Modify PCIe power up sequence as follows: - Power ungate PCIe partition - Enable AFI clock - Deassert AFI reset - Program AFI registers - Enable PCIe clock - Deassert PCIe reset - Program PCIe PHY - Program PCIe pad control registers - Program PCIe root port registers - Deassert PCIe xrst to start LTSSM Signed-off-by: Manikanta Maddireddy Signed-off-by: Lorenzo Pieralisi Acked-by: Thierry Reding drivers/pci/controller/pci-tegra.c | 52 ++++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 22 deletions(-) commit 316b9ef1ee14c405f25923bf5831c0bd4bebc47a Author: Manikanta Maddireddy Date: Tue Jun 18 23:31:43 2019 +0530 PCI: tegra: Mask AFI_INTR in runtime suspend AFI_INTR is unmasked in tegra_pcie_enable_controller(), mask it to avoid unwanted interrupts raised by AFI after pex_rst is asserted. The following sequence triggers such scenario: - tegra_pcie_remove() triggers runtime suspend - pex_rst is asserted in runtime suspend - PRSNT_MAP bit field in RP_PRIV_MISC register changes from EP_PRSNT to EP_ABSNT - This is sensed by AFI and triggers "Slot present pin change" interrupt - tegra_pcie_isr() function accesses AFI register when runtime suspend is going through power off sequence Resulting faulty backtrace: rmmod pci-tegra pci_generic_config_write32: 108 callbacks suppressed pci_bus 0002:00: 2-byte config write to 0002:00:02.0 offset 0x4c may corrupt adjacent RW1C bits pci_bus 0002:00: 2-byte config write to 0002:00:02.0 offset 0x9c may corrupt adjacent RW1C bits pci_bus 0002:00: 2-byte config write to 0002:00:02.0 offset 0x88 may corrupt adjacent RW1C bits pci_bus 0002:00: 2-byte config write to 0002:00:02.0 offset 0x90 may corrupt adjacent RW1C bits pci_bus 0002:00: 2-byte config write to 0002:00:02.0 offset 0x4 may corrupt adjacent RW1C bits igb 0002:04:00.1: removed PHC on enP2p4s0f1 igb 0002:04:00.0: removed PHC on enP2p4s0f0 pci_bus 0002:00: 2-byte config write to 0002:00:01.0 offset 0x4c may corrupt adjacent RW1C bits pci_bus 0002:00: 2-byte config write to 0002:00:01.0 offset 0x9c may corrupt adjacent RW1C bits pci_bus 0002:00: 2-byte config write to 0002:00:01.0 offset 0x88 may corrupt adjacent RW1C bits pci_bus 0002:00: 2-byte config write to 0002:00:01.0 offset 0x90 may corrupt adjacent RW1C bits pci_bus 0002:00: 2-byte config write to 0002:00:01.0 offset 0x4 may corrupt adjacent RW1C bits rcu: INFO: rcu_preempt self-detected stall on CPU SError Interrupt on CPU0, code 0xbf000002 -- SError CPU: 0 PID: 0 Comm: swapper/0 Tainted: G W 5.1.0-rc3-next-20190405-00027-gcd8110499e6f-dirty #42 Hardware name: NVIDIA Jetson TX1 Developer Kit (DT) pstate: 20000085 (nzCv daIf -PAN -UAO) pc : tegra_pcie_isr+0x58/0x178 [pci_tegra] lr : tegra_pcie_isr+0x40/0x178 [pci_tegra] sp : ffff000010003da0 x29: ffff000010003da0 x28: 0000000000000000 x27: ffff8000f9e61000 x26: ffff000010fbf420 x25: ffff000011427f93 x24: ffff8000fa600410 x23: ffff00001129d000 x22: ffff00001129d000 x21: ffff8000f18bf3c0 x20: 0000000000000070 x19: 00000000ffffffff x18: 0000000000000000 x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000 x14: ffff000008d40a48 x13: ffff000008d40a30 x12: ffff000008d40a20 x11: ffff000008d40a10 x10: ffff000008d40a00 x9 : ffff000008d409e8 x8 : ffff000008d40ae8 x7 : ffff000008d40ad0 x6 : ffff000010003e58 x5 : ffff8000fac00248 x4 : 0000000000000000 x3 : ffff000008d40b08 x2 : fffffffffffffff8 x1 : ffff000008d3f4e8 x0 : 00000000ffffffff Kernel panic - not syncing: Asynchronous SError Interrupt CPU: 0 PID: 0 Comm: swapper/0 Tainted: G W 5.1.0-rc3-next-20190405-00027-gcd8110499e6f-dirty #42 Hardware name: NVIDIA Jetson TX1 Developer Kit (DT) Call trace: dump_backtrace+0x0/0x158 show_stack+0x14/0x20 dump_stack+0xa8/0xcc panic+0x140/0x2f4 nmi_panic+0x6c/0x70 arm64_serror_panic+0x74/0x80 __pte_error+0x0/0x28 el1_error+0x84/0xf8 tegra_pcie_isr+0x58/0x178 [pci_tegra] __handle_irq_event_percpu+0x70/0x198 handle_irq_event_percpu+0x34/0x88 handle_irq_event+0x48/0x78 handle_fasteoi_irq+0xb4/0x190 generic_handle_irq+0x24/0x38 __handle_domain_irq+0x5c/0xb8 gic_handle_irq+0x58/0xa8 el1_irq+0xb8/0x180 cpuidle_enter_state+0x138/0x358 cpuidle_enter+0x18/0x20 call_cpuidle+0x1c/0x48 do_idle+0x230/0x2d0 cpu_startup_entry+0x20/0x28 rest_init+0xd4/0xe0 arch_call_rest_init+0xc/0x14 start_kernel+0x444/0x470 AFI_INTR is re-enabled on resume in tegra_pcie_pm_resume() through tegra_pcie_enable_controller(). Signed-off-by: Manikanta Maddireddy [lorenzo.pieralisi@arm.com: updated log] Signed-off-by: Lorenzo Pieralisi Acked-by: Thierry Reding drivers/pci/controller/pci-tegra.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 973d7499c51c105c739ed82673965e14ff793867 Author: Manikanta Maddireddy Date: Tue Jun 18 23:31:42 2019 +0530 PCI: tegra: Rearrange Tegra PCIe driver functions Tegra PCIe has register specifications for: - AXI to FPCI(AFI) bridge - Multiple PCIe root ports - PCIe PHY - PCIe pad control Rearrange Tegra PCIe driver functions so that each function programs the required module only. - tegra_pcie_enable_controller(): Program AFI module and enable PCIe controller - tegra_pcie_phy_power_on(): Bring up PCIe PHY - tegra_pcie_apply_pad_settings(): Program PCIe REFCLK pad settings - tegra_pcie_enable_ports(): Program each root port and bring up PCIe link Signed-off-by: Manikanta Maddireddy Signed-off-by: Lorenzo Pieralisi Acked-by: Thierry Reding drivers/pci/controller/pci-tegra.c | 70 ++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 40 deletions(-) commit 1056dda8a8d662622fee123c4cc1845c8a8ea4bf Author: Manikanta Maddireddy Date: Tue Jun 18 23:31:41 2019 +0530 PCI: tegra: Handle failure cases in tegra_pcie_power_on() Unroll the PCIe power on sequence if any one of the steps fails in tegra_pcie_power_on(). Signed-off-by: Manikanta Maddireddy Signed-off-by: Lorenzo Pieralisi Acked-by: Thierry Reding drivers/pci/controller/pci-tegra.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) commit e3b09c18c604f5755990125c0d3f0f7bda9419ff Author: Manikanta Maddireddy Date: Tue Jun 18 23:31:40 2019 +0530 soc/tegra: pmc: Export tegra_powergate_power_on() tegra_powergate_sequence_power_up() powers up partition and also enables clock & reset. However, if a controller like PCIe have multiple clocks & resets and they need to be enabled in a sequence, driver must use standalone function tegra_powergate_power_on() to power up partition. Export tegra_powergate_power_on() to allow Tegra controller drivers to unpower gate partition independent to clock & reset. Signed-off-by: Manikanta Maddireddy Signed-off-by: Lorenzo Pieralisi Acked-by: Thierry Reding drivers/soc/tegra/pmc.c | 1 + 1 file changed, 1 insertion(+) commit 97f90e1b82e801bd9fa135af6a10843ecde4d125 Author: Georgi Djakov Date: Tue Jun 18 15:10:16 2019 -0700 drm/msm/mdp5: Use the interconnect API The interconnect API provides an interface for consumer drivers to express their bandwidth needs in the SoC. This data is aggregated and the on-chip interconnect hardware is configured to the most appropriate power/performance profile. Use the API to configure the interconnects and request bandwidth between DDR and the display hardware (MDP port(s) and rotator downscaler). v2: update the path names to be consistent with dpu, handle the NULL path case, updated commit msg from Georgi. v3: split out icc setup into it's own function, and rework logic slightly so no interconnect paths is not fatal. Signed-off-by: Georgi Djakov Signed-off-by: Rob Clark Reviewed-By: Jeffrey Hugo drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 38 ++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit 217a6ddf93e0d99ac720ded6c81401030af981a7 Author: Abhinav Kumar Date: Tue Jun 18 13:24:12 2019 -0700 drm/msm/dpu: add icc voting in dpu_mdss_init dpu_mdss_destroy() can get called not just from msm_drm_uninit() but also from msm_drm_bind() in case of any failures. dpu_mdss_destroy() removes the icc voting by calling icc_put. This could accidentally remove the voting done by pm_runtime_enable. To make the voting balanced add a minimum vote in dpu_mdss_init() to avoid any unclocked access. This change depends on the following patch which introduces interconnect binding to MDSS driver: https://patchwork.codeaurora.org/patch/708155/ Signed-off-by: Abhinav Kumar Reviewed-by: Sean Paul Signed-off-by: Rob Clark drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit a67e13e1ee2d62871149e5ec629cf766d4127ff9 Author: Jayant Shekhar Date: Tue Jun 18 13:24:11 2019 -0700 dt-bindings: msm/disp: Introduce interconnect bindings for MDSS on SDM845 Add interconnect properties such as interconnect provider specifier , the edge source and destination ports which are required by the interconnect API to configure interconnect path for MDSS. Changes in v2: - None Changes in v3: - Remove common property definitions (Rob Herring) Changes in v4: - Use port macros and change port string names (Georgi Djakov) Changes in v5-v7: - None Signed-off-by: Sravanthi Kollukuduru Signed-off-by: Jayant Shekhar Reviewed-by: Rob Herring Signed-off-by: Rob Clark Documentation/devicetree/bindings/display/msm/dpu.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 20cad6cd14f4ec5dd4e530ac2b8013d0bed75264 Author: Jayant Shekhar Date: Tue Jun 18 13:24:10 2019 -0700 drm/msm/dpu: Integrate interconnect API in MDSS The interconnect framework is designed to provide a standard kernel interface to control the settings of the interconnects on a SoC. The interconnect API uses a consumer/provider-based model, where the providers are the interconnect buses and the consumers could be various drivers. MDSS is one of the interconnect consumers which uses the interconnect APIs to get the path between endpoints and set its bandwidth requirement for the given interconnected path. Changes in v2: - Remove error log and unnecessary check (Jordan Crouse) Changes in v3: - Code clean involving variable name change, removal of extra paranthesis and variables (Matthias Kaehlcke) Changes in v4: - Add comments, spacings, tabs, proper port name and icc macro (Georgi Djakov) Changes in v5: - Commit text and parenthesis alignment (Georgi Djakov) Changes in v6: - Change to new icc_set API's (Doug Anderson) Changes in v7: - Fixed a typo Changes in v8: - Handle the of_icc_get() returning NULL case. In practice icc_set_bw() will gracefully handle the case of a NULL path, but it's probably best for clarity to keep num_paths=0 in this case. Signed-off-by: Sravanthi Kollukuduru Signed-off-by: Jayant Shekhar Signed-off-by: Rob Clark Acked-by: Georgi Djakov Reviewed-by: Sean Paul drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c | 49 +++++++++++++++++++++++++++++--- 1 file changed, 45 insertions(+), 4 deletions(-) commit cb88482e2570f67a6f4e72569e5a18329d5536ab Author: Jayant Shekhar Date: Tue Jun 18 13:24:09 2019 -0700 drm/msm/dpu: clean up references of DPU custom bus scaling Since the upstream interconnect bus framework has landed upstream, the existing references of custom bus scaling needs to be cleaned up. Changes in v2: - Fixed build error due to partial clean up Changes in v3: - Condense multiple lines into a single line (Sean Paul) Changes in v4-v7: - None Signed-off-by: Sravanthi Kollukuduru Signed-off-by: Jayant Shekhar Signed-off-by: Rob Clark Reviewed-by: Sean Paul drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c | 174 ++++++++++---------------- drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.h | 4 +- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 11 +- drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h | 22 ++-- 4 files changed, 80 insertions(+), 131 deletions(-) commit 836334fd747595331dcdc7709b447ad8134db693 Author: Daniel Vetter Date: Tue Jun 18 16:02:41 2019 +0200 drm/todo: Update drm_gem_object_funcs todo even more I rushed merging this a bit too much, and Noralf pointed out that we're a lot better already and have made great progress. Let's try again. v2: Fix typo spotted by Eric Engestrom. Fixes: 8db420ac6cf2 ("drm/todo: Improve drm_gem_object funcs todo") Reviewed-by: Noralf Trønnes Cc: Greg Kroah-Hartman Cc: Daniel Vetter Cc: David Airlie Cc: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: Thomas Zimmermann Cc: Gerd Hoffmann Cc: Rob Herring Cc: Noralf Trønnes Cc: Eric Anholt Cc: Gerd Hoffmann Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190618140241.19856-1-daniel.vetter@ffwll.ch Documentation/gpu/todo.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 2b5d74fa3ceeaf178c74cb3f673ae452c46a7d35 Author: Yannick Fertré Date: Mon Jun 17 09:18:17 2019 +0200 drm/stm: drv: fix suspend/resume Without this fix, the system can not go in "suspend" mode due to an error in drv_suspend function. Fixes: 35ab6cfbf211 ("drm/stm: support runtime power management") Signed-off-by: Yannick Fertré Acked-by: Philippe Cornu Signed-off-by: Benjamin Gaignard Link: https://patchwork.freedesktop.org/patch/msgid/1560755897-5002-1-git-send-email-yannick.fertre@st.com drivers/gpu/drm/stm/drv.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit ac59a471e9371e3184425efd6a2fd8ac5c7e4c2b Author: Petr Mladek Date: Tue Jun 11 16:13:20 2019 +0200 livepatch: Remove duplicate warning about missing reliable stacktrace support WARN_ON_ONCE() could not be called safely under rq lock because of console deadlock issues. Moreover WARN_ON_ONCE() is superfluous in klp_check_stack(), because stack_trace_save_tsk_reliable() cannot return -ENOSYS thanks to klp_have_reliable_stack() check in klp_try_switch_task(). [ mbenes: changelog edited ] Signed-off-by: Miroslav Benes Acked-by: Josh Poimboeuf Reviewed-by: Kamalesh Babulal Signed-off-by: Petr Mladek kernel/livepatch/transition.c | 1 - 1 file changed, 1 deletion(-) commit 67059d65f7da537c41513fc52e78eff096092b8c Author: Miroslav Benes Date: Tue Jun 11 16:13:19 2019 +0200 Revert "livepatch: Remove reliable stacktrace check in klp_try_switch_task()" This reverts commit 1d98a69e5cef3aeb68bcefab0e67e342d6bb4dad. Commit 31adf2308f33 ("livepatch: Convert error about unsupported reliable stacktrace into a warning") weakened the enforcement for architectures to have reliable stack traces support. The system only warns now about it. It only makes sense to reintroduce the compile time checking in klp_try_switch_task() again and bail out early. Signed-off-by: Miroslav Benes Acked-by: Josh Poimboeuf Reviewed-by: Kamalesh Babulal Signed-off-by: Petr Mladek kernel/livepatch/transition.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 002c845be525939ee22899452fbe2b597d27b424 Author: Sean Paul Date: Wed Jun 19 14:19:47 2019 -0400 drm/self_refresh: Fix possible NULL deref in failure path If state allocation fails, we still try to give back the reference on it. Also initialize ret in case the crtc is not enabled and we hit the eject button. Fixes: 1452c25b0e60 ("drm: Add helpers to kick off self refresh mode in drivers") Cc: Daniel Vetter Cc: Jose Souza Cc: Zain Wang Cc: Tomasz Figa Cc: Ville Syrjälä Cc: Sam Ravnborg Cc: Sean Paul Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Cc: dri-devel@lists.freedesktop.org Reported-by: Dan Carpenter Reviewed-by: Daniel Vetter Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190619181951.192305-1-sean@poorly.run drivers/gpu/drm/drm_self_refresh_helper.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 3c25ab35fbc8526ac0c9b298e8a78e7ad7a55479 Author: Suraj Jitindar Singh Date: Thu Jun 20 11:46:51 2019 +1000 KVM: PPC: Book3S HV: Clear pending decrementer exceptions on nested guest entry If we enter an L1 guest with a pending decrementer exception then this is cleared on guest exit if the guest has writtien a positive value into the decrementer (indicating that it handled the decrementer exception) since there is no other way to detect that the guest has handled the pending exception and that it should be dequeued. In the event that the L1 guest tries to run a nested (L2) guest immediately after this and the L2 guest decrementer is negative (which is loaded by L1 before making the H_ENTER_NESTED hcall), then the pending decrementer exception isn't cleared and the L2 entry is blocked since L1 has a pending exception, even though L1 may have already handled the exception and written a positive value for it's decrementer. This results in a loop of L1 trying to enter the L2 guest and L0 blocking the entry since L1 has an interrupt pending with the outcome being that L2 never gets to run and hangs. Fix this by clearing any pending decrementer exceptions when L1 makes the H_ENTER_NESTED hcall since it won't do this if it's decrementer has gone negative, and anyway it's decrementer has been communicated to L0 in the hdec_expires field and L0 will return control to L1 when this goes negative by delivering an H_DECREMENTER exception. Fixes: 95a6432ce903 ("KVM: PPC: Book3S HV: Streamlined guest entry/exit path on P9 for radix guests") Cc: stable@vger.kernel.org # v4.20+ Signed-off-by: Suraj Jitindar Singh Signed-off-by: Michael Ellerman arch/powerpc/kvm/book3s_hv.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 869537709ebf1dc865e75c3fc97b23f8acf37c16 Author: Suraj Jitindar Singh Date: Thu Jun 20 11:46:50 2019 +1000 KVM: PPC: Book3S HV: Signed extend decrementer value if not using large decrementer On POWER9 the decrementer can operate in large decrementer mode where the decrementer is 56 bits and signed extended to 64 bits. When not operating in this mode the decrementer behaves as a 32 bit decrementer which is NOT signed extended (as on POWER8). Currently when reading a guest decrementer value we don't take into account whether the large decrementer is enabled or not, and this means the value will be incorrect when the guest is not using the large decrementer. Fix this by sign extending the value read when the guest isn't using the large decrementer. Fixes: 95a6432ce903 ("KVM: PPC: Book3S HV: Streamlined guest entry/exit path on P9 for radix guests") Cc: stable@vger.kernel.org # v4.20+ Signed-off-by: Suraj Jitindar Singh Signed-off-by: Michael Ellerman arch/powerpc/kvm/book3s_hv.c | 2 ++ 1 file changed, 2 insertions(+) commit 380178ef7fde58f2040788a1bab972ce4867ac58 Author: Miroslav Benes Date: Tue Jun 11 16:13:18 2019 +0200 stacktrace: Remove weak version of save_stack_trace_tsk_reliable() Recent rework of stack trace infrastructure introduced a new set of helpers for common stack trace operations (commit e9b98e162aa5 ("stacktrace: Provide helpers for common stack trace operations") and related). As a result, save_stack_trace_tsk_reliable() is not directly called anywhere. Livepatch, currently the only user of the reliable stack trace feature, now calls stack_trace_save_tsk_reliable(). When CONFIG_HAVE_RELIABLE_STACKTRACE is set and depending on CONFIG_ARCH_STACKWALK, stack_trace_save_tsk_reliable() calls either arch_stack_walk_reliable() or mentioned save_stack_trace_tsk_reliable(). x86_64 defines the former, ppc64le the latter. All other architectures do not have HAVE_RELIABLE_STACKTRACE and include/linux/stacktrace.h defines -ENOSYS returning version for them. In short, stack_trace_save_tsk_reliable() returning -ENOSYS defined in include/linux/stacktrace.h serves the same purpose as the old weak version of save_stack_trace_tsk_reliable() which is therefore no longer needed. Signed-off-by: Miroslav Benes Acked-by: Josh Poimboeuf Reviewed-by: Thomas Gleixner Reviewed-by: Kamalesh Babulal Signed-off-by: Petr Mladek kernel/stacktrace.c | 8 -------- 1 file changed, 8 deletions(-) commit cf4b20ecfa4edc4a0e55d52bc0a735f60bdfe7eb Author: Ulf Hansson Date: Tue Jun 18 17:34:42 2019 +0200 mmc: sdio: Turn sdio_run_irqs() into static All external users of sdio_run_irqs() have converted into using the preferred sdio_signal_irq() interface, thus not calling the function directly any more. Avoid further new users of it, by turning it into static. Suggested-by: Douglas Anderson Signed-off-by: Ulf Hansson Reviewed-by: Douglas Anderson Signed-off-by: Ulf Hansson drivers/mmc/core/sdio_irq.c | 3 +-- include/linux/mmc/host.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) commit 61d7fdc49f03f4ec990974d1d2a8b05e64afeae4 Author: Jeffrey Hugo Date: Wed Jun 19 11:56:36 2019 -0700 regulator: qcom_spmi: Fix math of spmi_regulator_set_voltage_time_sel spmi_regulator_set_voltage_time_sel() calculates the amount of delay needed as the result of setting a new voltage. Essentially this is the absolute difference of the old and new voltages, divided by the slew rate. The implementation of spmi_regulator_set_voltage_time_sel() is wrong. It attempts to calculate the difference in voltages by using the difference in selectors and multiplying by the voltage step between selectors. This ignores the possibility that the old and new selectors might be from different ranges, which have different step values. Also, the difference between the selectors may encapsulate N ranges inbetween, so a summation of each selector change from old to new would be needed. Lets avoid all of that complexity, and just get the actual voltage represented by both the old and new selector, and use those to directly compute the voltage delta. This is more straight forward, and has the side benifit of avoiding issues with regulator implementations that don't have hardware register support to get the current configured range. Fixes: e92a4047419c ("regulator: Add QCOM SPMI regulator driver") Reported-by: Bjorn Andersson Reported-by: Jorge Ramirez-Ortiz Reported-by: Mark Brown Signed-off-by: Jeffrey Hugo Reviewed-by: Bjorn Andersson Tested-by: Jorge Ramirez-Ortiz Signed-off-by: Mark Brown drivers/regulator/qcom_spmi-regulator.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 7377f5bec13332bc470856f337935be6cabbcf24 Author: Amir Goldstein Date: Sun May 26 17:34:11 2019 +0300 fsnotify: get rid of fsnotify_nameremove() For all callers of fsnotify_{unlink,rmdir}(), we made sure that d_parent and d_name are stable. Therefore, fsnotify_{unlink,rmdir}() do not need the safety measures in fsnotify_nameremove() to stabilize parent and name. We can now simplify those hooks and get rid of fsnotify_nameremove(). Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara fs/notify/fsnotify.c | 41 ---------------------------------------- include/linux/fsnotify.h | 6 ++---- include/linux/fsnotify_backend.h | 4 ---- 3 files changed, 2 insertions(+), 49 deletions(-) commit 49246466a98996e78b68a0041807dbd2628c53fe Author: Amir Goldstein Date: Sun May 26 17:34:10 2019 +0300 fsnotify: move fsnotify_nameremove() hook out of d_delete() d_delete() was piggy backed for the fsnotify_nameremove() hook when in fact not all callers of d_delete() care about fsnotify events. For all callers of d_delete() that may be interested in fsnotify events, we made sure to call one of fsnotify_{unlink,rmdir}() hooks before calling d_delete(). Now we can move the fsnotify_nameremove() call from d_delete() to the fsnotify_{unlink,rmdir}() hooks. Two explicit calls to fsnotify_nameremove() from nfs/afs sillyrename are also removed. This will cause a change of behavior - nfs/afs will NOT generate an fsnotify delete event when renaming over a positive dentry. This change is desirable, because it is consistent with the behavior of all other filesystems. Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara fs/afs/dir_silly.c | 5 ----- fs/dcache.c | 2 -- fs/nfs/unlink.c | 6 ------ include/linux/fsnotify.h | 2 ++ 4 files changed, 2 insertions(+), 13 deletions(-) commit 2f1539b24e2a1ed7726d932a4a44f833e66ce0ee Author: Nishka Dasgupta Date: Thu Jun 20 17:23:04 2019 +0530 staging: rtl8712: r8712_setMacAddr_cmd(): Change return type Change return type of function r8712_setMacAddr_cmd() to void as its return value is never stored, checked, or otherwise used. Modify its return statements accordingly. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_cmd.c | 7 +++---- drivers/staging/rtl8712/rtl871x_cmd.h | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) commit 092a370dbf38dcfc3d266a20df3af80bc68e669f Author: Nishka Dasgupta Date: Thu Jun 20 17:23:03 2019 +0530 staging: rtl8712: r8712_setstakey_cmd(): Change return type Change return type of function r8712_setstakey_cmd() to void as its return value is never stored, checked, or otherwise used. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_cmd.c | 9 ++++----- drivers/staging/rtl8712/rtl871x_cmd.h | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) commit 612168e40755ac8c880b285c1a66ed7641035bf7 Author: Nishka Dasgupta Date: Thu Jun 20 17:23:02 2019 +0530 staging: rtl8712: r8712_setopmode_cmd(): Change return type Change return type of function r8712_setopmode_cmd() from u8 to void as its return value is never stored or checked or otherwise used. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_cmd.c | 7 +++---- drivers/staging/rtl8712/rtl871x_cmd.h | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) commit c24d83e14dcfb9af7b47f7a3d4e483adf1fc6f94 Author: Nishka Dasgupta Date: Thu Jun 20 17:23:01 2019 +0530 staging: rtl8712: r8712_disassoc_cmd(): Change type to void Change return type of function r8712_disassoc_cmd from u8 to void as its return value is never stored, checked or otherwise used. Modify its return statements accordingly. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_cmd.c | 7 +++---- drivers/staging/rtl8712/rtl871x_cmd.h | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) commit ee71f8e8ed89ba1827251190a0e786089d90837a Author: Nishka Dasgupta Date: Thu Jun 20 17:23:00 2019 +0530 staging: rtl8712: r8712_set_chplan_cmd(): Change return type Change return type of function r8712_set_chplan_cmd from u8 to void as its return value is never stored, checked or otherwise used. Change the return statements accordingly. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_cmd.c | 7 +++---- drivers/staging/rtl8712/rtl871x_cmd.h | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) commit 29de098b330fb57da030819618635c619f5a0066 Author: Nishka Dasgupta Date: Thu Jun 20 17:22:59 2019 +0530 staging: rtl8712: Change (r8712)_enqueue_cmd to void Change the return types of r8712_enqueue_cmd to void as the return value of r8712_enqueue_cmd is never stored, checked, or otherwise used. Also change the return type of _enqueue_cmd to void as it is only called by r8712_enqueue_cmd which does not do anything with the return value except return it itself. Modify return statements in both functions accordingly. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_cmd.c | 14 +++++--------- drivers/staging/rtl8712/rtl871x_cmd.h | 2 +- 2 files changed, 6 insertions(+), 10 deletions(-) commit 36f484ef094104bb525e50052bc580daa5488763 Author: Nishka Dasgupta Date: Thu Jun 20 17:22:58 2019 +0530 staging: rtl8712: r8712_joinbss_cmd(): Change return values and type Change return values of function r8712_joinbss_cmd from _SUCCESS/_FAIL to 0/-ENOMEM respectively. Change return type from u8 to int to accommodate return of -ENOMEM. Similarly, change the return values (_SUCCESS to 0 and _FAIL to -ENOMEM or -EINVAL) and type (sint to int) of the call site of r8712_joinbss_cmd, r8712_select_and_join_from_scan, as one of the branches of r8712_select_and_join_from_scan directly returns the return value of r8712_joinbss_cmd. Modify the call sites of r8712_select_and_join_from_scan to check for 0 instead of _SUCCESS. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_cmd.c | 6 +++--- drivers/staging/rtl8712/rtl871x_cmd.h | 4 ++-- drivers/staging/rtl8712/rtl871x_ioctl_set.c | 2 +- drivers/staging/rtl8712/rtl871x_mlme.c | 8 +++----- drivers/staging/rtl8712/rtl871x_mlme.h | 2 +- 5 files changed, 10 insertions(+), 12 deletions(-) commit 97a738d30cb17a327874d8f594d59c69d33c5c37 Author: Nishka Dasgupta Date: Thu Jun 20 17:22:57 2019 +0530 staging: rtl8712: rtl871x_cmd.c: Remove unnecessary null check Remove the check for whether the value of variable psecnetwork is NULL as psecnetwork is a field of a field of a non-NULL pointer, and therefore cannot be NULL itself. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_cmd.c | 4 ---- 1 file changed, 4 deletions(-) commit fbcfbf653636a4afe1ac5d477b755c327c2d2a10 Author: Nishka Dasgupta Date: Thu Jun 20 17:22:56 2019 +0530 staging: rtl8712: rtl8712_efuse.c: Remove leading p from variable names Remove leading 'p' from the name of the pointer variable padapter. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl8712_efuse.c | 152 ++++++++++++++++---------------- 1 file changed, 76 insertions(+), 76 deletions(-) commit f745aa40964ef44884a4fb45c5aca562d3198538 Author: Nishka Dasgupta Date: Thu Jun 20 17:22:55 2019 +0530 staging: rtl8712: mlme_linux.c: Remove leading p from variable names Remove leading p from the names of the following pointer variables: - padapter - pmlmepriv - psec_priv. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/mlme_linux.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) commit 6146e78c0364a881af9bec42eb40882b1e329327 Author: Amir Goldstein Date: Sun May 26 17:34:09 2019 +0300 configfs: call fsnotify_rmdir() hook This will allow generating fsnotify delete events on unregister of group/subsystem after the fsnotify_nameremove() hook is removed from d_delete(). The rest of the d_delete() calls from this filesystem are either called recursively from within debugfs_unregister_{group,subsystem}, called from a vfs function that already has delete hooks or are called from shutdown/cleanup code. Cc: Joel Becker Cc: Christoph Hellwig Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara fs/configfs/dir.c | 3 +++ 1 file changed, 3 insertions(+) commit 6679ea6dea15ec2fa7e2dd3c11cce639270c4386 Author: Amir Goldstein Date: Sun May 26 17:34:08 2019 +0300 debugfs: call fsnotify_{unlink,rmdir}() hooks This will allow generating fsnotify delete events after the fsnotify_nameremove() hook is removed from d_delete(). Cc: Greg Kroah-Hartman Reviewed-by: Greg Kroah-Hartman Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara fs/debugfs/inode.c | 3 +++ 1 file changed, 3 insertions(+) commit 823e545c027795997f29ec5c255aff605cf39e85 Author: Amir Goldstein Date: Sun May 26 17:34:07 2019 +0300 debugfs: simplify __debugfs_remove_file() Move simple_unlink()+d_delete() from __debugfs_remove_file() into caller __debugfs_remove() and rename helper for post remove file to __debugfs_file_removed(). This will simplify adding fsnotify_unlink() hook. Cc: Greg Kroah-Hartman Reviewed-by: Greg Kroah-Hartman Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara fs/debugfs/inode.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) commit fd0d506f2b8247b3defcca2723622e404fb55c64 Author: Amir Goldstein Date: Sun May 26 17:34:06 2019 +0300 devpts: call fsnotify_unlink() hook This will allow generating fsnotify delete events after the fsnotify_nameremove() hook is removed from d_delete(). Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara fs/devpts/inode.c | 1 + 1 file changed, 1 insertion(+) commit 4bf2377472c7ca8f9523f8ccce9ade212483dba4 Author: Amir Goldstein Date: Sun May 26 17:34:05 2019 +0300 tracefs: call fsnotify_{unlink,rmdir}() hooks This will allow generating fsnotify delete events after the fsnotify_nameremove() hook is removed from d_delete(). Cc: Steven Rostedt Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara fs/tracefs/inode.c | 3 +++ 1 file changed, 3 insertions(+) commit a35d632c723cbbd0654efb7dfaa9947f258a16e5 Author: Amir Goldstein Date: Sun May 26 17:34:04 2019 +0300 rpc_pipefs: call fsnotify_{unlink,rmdir}() hooks This will allow generating fsnotify delete events after the fsnotify_nameremove() hook is removed from d_delete(). Cc: Trond Myklebust Cc: Anna Schumaker Reviewed-by: Trond Myklebust Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara net/sunrpc/rpc_pipe.c | 4 ++++ 1 file changed, 4 insertions(+) commit 014860188c156c391abe2c3597e57876a8b7249f Author: Sergio Paracuellos Date: Wed Jun 19 09:44:58 2019 +0200 staging: mt7621-pci: dt-bindings: add perst-gpio to sample bindings Both driver and device tree have been updated to use GPIO perst. Update bindings documentation also. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/mt7621-pci/mediatek,mt7621-pci.txt | 2 ++ 1 file changed, 2 insertions(+) commit fd69d7faaefd6bfa9647df4e72d496b8e28e0977 Author: Sergio Paracuellos Date: Wed Jun 19 09:44:57 2019 +0200 staging: mt7621-dts: add gpio perst to pcie bindings node Driver has been changed to use perts gpio reset instead of perst builtin behaviour. Update device tree accordly. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/mt7621-dts/mt7621.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 07420a02b003ea1f162c4f85a58b3458a4406ce6 Author: Sergio Paracuellos Date: Wed Jun 19 09:44:56 2019 +0200 staging: mt7621-pci: use gpio perst instead of builtin behaviour Some boards seems to ignore the PERST builtin behaviour to properly perform a pcie line reset. Use gpio PERST behaviour instead which seems to be more common. Fixes: bd1a05bd87ad ("staging: mt7621-pci: use PERST_N instead of gpio control") Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/mt7621-pci/pci-mt7621.c | 106 +++++++++++++++++--------------- 1 file changed, 58 insertions(+), 48 deletions(-) commit fdd228cd6d9074b47854af31d224c4241a277618 Author: Sergio Paracuellos Date: Wed Jun 19 09:44:55 2019 +0200 staging: mt7621-pci: fix two messages in driver code There are two messages in driver code which are not correct. Fix both of them to clarify boot runs. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman drivers/staging/mt7621-pci/pci-mt7621.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 46008d9d3f0ef78524c327dbd5cc99843d4b3dae Author: Amir Goldstein Date: Sun May 26 17:34:03 2019 +0300 btrfs: call fsnotify_rmdir() hook This will allow generating fsnotify delete events after the fsnotify_nameremove() hook is removed from d_delete(). Signed-off-by: Amir Goldstein Acked-by: David Sterba Signed-off-by: Jan Kara fs/btrfs/ioctl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit c2e1e0f30b1e77351b73b4f7228bf3611691ef09 Author: Michael Straube Date: Wed Jun 19 14:19:08 2019 +0200 staging: rtl8188eu: remove unused code Remove unused and/or commented code from rtw_wlan_util.c. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_wlan_util.c | 6 ------ 1 file changed, 6 deletions(-) commit e5dc970eb13ced45e42cdd88810b02a4592b5a62 Author: Nishka Dasgupta Date: Wed Jun 19 13:02:01 2019 +0530 staging: rts5208: Remove function soft_reset_sd_card() Remove function soft_reset_sd_card, as all it does is call reset_sd. Modify call sites of the former to call the latter instead. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/sd.c | 7 +------ drivers/staging/rts5208/sd.h | 1 - 2 files changed, 1 insertion(+), 7 deletions(-) commit 116b9731ad7614032a390bb9ad8998a14d6dc752 Author: Amir Goldstein Date: Sun May 26 17:34:02 2019 +0300 fsnotify: add empty fsnotify_{unlink,rmdir}() hooks We would like to move fsnotify_nameremove() calls from d_delete() into a higher layer where the hook makes more sense and so we can consider every d_delete() call site individually. Start by creating empty hook fsnotify_{unlink,rmdir}() and place them in the proper VFS call sites. After all d_delete() call sites will be converted to use the new hook, the new hook will generate the delete events and fsnotify_nameremove() hook will be removed. Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara fs/namei.c | 2 ++ include/linux/fsnotify.h | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) commit 65ae78c20b8adbca03950b7c299cb4bea2d85ea6 Author: Shobhit Kukreti Date: Tue Jun 18 17:37:34 2019 -0700 staging: rtl8723bs: Fix Indentation Error: code indent should use tabs where possible Resolve indentation errors which were caused by a mix of space and tabs for indentation. Previous patch to fix if-else brace styles revealed the indentation error Signed-off-by: Shobhit Kukreti Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/recv_linux.c | 6 ++--- drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 36 +++++++++++++-------------- 2 files changed, 21 insertions(+), 21 deletions(-) commit fabf298696d030a14bfb183d5af84d26b47cb542 Author: Shobhit Kukreti Date: Tue Jun 18 17:37:33 2019 -0700 staging: rtl8723bs: Resolve the checkpatch error: else should follow close brace '}' Cleaned up the code to resolve the checkpatch error else should follow close brace '}' from the following files: mlme_linux.c recv_linux.c sdio_intf.c Signed-off-by: Shobhit Kukreti Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/mlme_linux.c | 6 ++---- drivers/staging/rtl8723bs/os_dep/recv_linux.c | 21 +++++++-------------- drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 9 +++------ 3 files changed, 12 insertions(+), 24 deletions(-) commit 6a9b5dd1e24c0641959c3df9f7df54c2baa0ffba Author: Shobhit Kukreti Date: Tue Jun 18 17:37:32 2019 -0700 staging: rtl8723bs: Resolve checkpatch error "that open brace { should be on the previous line" in the rtl8723 driver Cleaned up the code from the following files to get rid of check patch error "that open brace { should be on the previous line" drivers/staging/rtl8723bs/os_dep/mlme_linux.c drivers/staging/rtl8723bs/os_dep/recv_linux.c drivers/staging/rtl8723bs/os_dep/rtw_proc.c drivers/staging/rtl8723bs/os_dep/sdio_intf.c drivers/staging/rtl8723bs/os_dep/sdio_ops_linux.c Signed-off-by: Shobhit Kukreti Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/mlme_linux.c | 14 ++--- drivers/staging/rtl8723bs/os_dep/recv_linux.c | 76 ++++++++--------------- drivers/staging/rtl8723bs/os_dep/rtw_proc.c | 6 +- drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 15 ++--- drivers/staging/rtl8723bs/os_dep/sdio_ops_linux.c | 24 +++---- 5 files changed, 47 insertions(+), 88 deletions(-) commit a7a22bc46c709f759eae93ea0bee6fdcf72588ae Author: Hariprasad Kelam Date: Thu Jun 20 07:57:26 2019 +0530 staging: rtl8723bs: hal: hal_btcoex: Remove variables pHalData and pU1Tmp Remove pHalData variable as it is set but unused in function. Remove pU1Tmp and replace this with pu8 Signed-off-by: Hariprasad Kelam Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/hal_btcoex.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 9cc579cc9588cfe1e6ffc12193253bc0950cada1 Author: Colin Ian King Date: Wed Jun 19 17:50:27 2019 +0100 staging: rtl8723bs: os_dep: fix indentation on break statement The break statement is indented one level too deep, fix this. Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d189a7c2f88c366c64ae7933cec046d1bcb64efc Author: Hariprasad Kelam Date: Wed Jun 19 08:00:10 2019 +0530 staging: rtl8723bs: hal: odm_RegConfig8723B: fix Lines should not end with a '(' this patch fixes below issue reported by checkpatch.pl CHECK: Lines should not end with a '(' CHECK: Lines should not end with a '(' Signed-off-by: Hariprasad Kelam Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/odm_RegConfig8723B.h | 61 ++++++++++------------ 1 file changed, 28 insertions(+), 33 deletions(-) commit 6254acded763af1904204677d765e6a46090da86 Author: Hariprasad Kelam Date: Wed Jun 19 07:27:43 2019 +0530 staging: rtl8723bs: os_dep: ioctl_linux: make use of kzalloc This patch is a cleanup which replaces rtw_malloc(wep_total_len) with kzalloc() and removes the memset(). The rtw_malloc() does GFP_ATOMIC allocations when in_atomic() is true. But as the comments for in_atomic() describe, the in_atomic() check should not be used in driver code. The in_atomic() check is not accurate when preempt is disabled. In this code we are not in IRQ context and we are not holding any spin_locks so GFP_KERNEL is safe. Signed-off-by: Hariprasad Kelam ---- changes in v2: Replace rtw_zmalloc with kzalloc changes in v3: Add proper changelog Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit 35659639671835101c5a50afb270a5e63cc23dd0 Author: Shobhit Kukreti Date: Tue Jun 18 18:42:26 2019 -0700 staging: rtl8723bs: hal: Fix Brace Style Issues in if/else statements Cleaned Up code to fix brace style issues reported by checkpatch: -space required before the open brace '{' -Unbalanced braces around if/else statements Signed-off-by: Shobhit Kukreti Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/hal_btcoex.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) commit d47f4db767324dda5cf9b71036901fbaf3ac4260 Author: Shobhit Kukreti Date: Tue Jun 18 18:14:44 2019 -0700 staging: rtl8723bs: hal: Remove True/False Comparisons Removing comparisons to True/False in if statements. Checkpatch reported: CHECK: Using comparison to true is error prone Signed-off-by: Shobhit Kukreti Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f2e741cbba1cadbd94631494407e08d13710bbb5 Author: Hariprasad Kelam Date: Wed Jun 19 00:29:27 2019 +0530 staging: rtl8723bs: hal: rtl8723b_cmd: fix comparison to true is error prone this patch fixes below issues reported by checkpatch CHECK: Using comparison to true is error prone CHECK: Using comparison to false is error prone Signed-off-by: Hariprasad Kelam Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit a029e223458f5b0a858204681f5f015f163a8259 Author: Hariprasad Kelam Date: Wed Jun 19 00:29:08 2019 +0530 staging: rtl8723bs: hal: rtl8723b_cmd: fix Comparison to NULL This patch fixes below issues reported by checkpatch CHECK: Comparison to NULL could be written "psta" CHECK: Comparison to NULL could be written "pmlmepriv->wps_probe_resp_ie" CHECK: Comparison to NULL could be written "psta" Signed-off-by: Hariprasad Kelam Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d326d99aa00f284e4320aededb3f7c663f5b4c87 Author: Colin Ian King Date: Tue Jun 18 11:15:54 2019 +0100 staging: kpc2000: fix integer overflow with left shifts Currently there are several left shifts that are assigned to 64 bit unsigned longs where a signed int 1 is being shifted, resulting in an integer overflow. Fix this bit using the BIT_ULL macro to perform a 64 bit shift. Also clean up an overly long statement. Addresses-Coverity: ("Unintentional integer overflow") Fixes: 7dc7967fc39a ("staging: kpc2000: add initial set of Daktronics drivers") Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/cell_probe.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit a50185cbb383f29543a86ff238fff13ec850dbf9 Author: Simon Sandström Date: Wed Jun 19 08:36:07 2019 +0200 staging: kpc2000: simplify error handling in kp2000_pcie_probe We can get rid of a few iounmaps in the middle of the function by re-ordering the error handling labels and adding two new labels. Signed-off-by: Simon Sandström Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/core.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) commit 0234961dbc1816732025b946ebccf64f08e42b0d Author: Hariprasad Kelam Date: Tue Jun 18 23:03:05 2019 +0530 staging: rtl8712: rtl87x_io : make use of kzalloc kmalloc followed by memset can be replaced with kzalloc. Signed-off-by: Hariprasad Kelam Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_io.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 1011f2b09aca841938712e92a0fdde50220b773f Author: Hariprasad Kelam Date: Tue Jun 18 23:25:16 2019 +0530 staging: rtl8192u: ieee80211: Remove redundant memset alloc_etherdev function internally calls kvzalloc . So we may not need explicit memset after this call. Signed-off-by: Hariprasad Kelam Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211_module.c | 1 - 1 file changed, 1 deletion(-) commit da0721cc2620e18d325a2bd050df1c74e10b975e Author: Hariprasad Kelam Date: Tue Jun 18 23:34:31 2019 +0530 staging: rtl8192e: rtllib_module: Remove redundant memset alloc_etherdev function internally calls kvzalloc . So we may not need explicit memset after this call. Signed-off-by: Hariprasad Kelam Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtllib_module.c | 1 - 1 file changed, 1 deletion(-) commit 42203fbe73f24f276a135948cfb68749737673c9 Author: Hariprasad Kelam Date: Tue Jun 18 23:55:07 2019 +0530 staging: wilc1000: Remove redundant memset alloc_etherdev function internally calls kvzalloc . So we may not need explicit memset after this call. Signed-off-by: Hariprasad Kelam Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_netdev.c | 1 - 1 file changed, 1 deletion(-) commit 8fa2081030e73ecced862c0b6a3344c059fce531 Author: Bastien Nocera Date: Thu Jun 20 11:51:21 2019 +0200 staging: rtl8723bs: Remove myself from CC: I don't have easy access to this hardware anymore. Signed-off-by: Bastien Nocera Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/TODO | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 57744c8d5ce3c35f221377c0674e198fee7354d8 Author: Colin Ian King Date: Wed Jun 19 17:54:05 2019 +0100 staging: vt6656: fix indentation on break statement The break statement is indented one level too deep, fix this. Signed-off-by: Colin Ian King Reviewed-by: Quentin Deslandes Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6656/card.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ecefae6db042283bf88ef3777f2381b18df8ed46 Author: Mauro Carvalho Chehab Date: Tue Jun 18 18:05:38 2019 -0300 docs: usb: rename files to .rst and add them to drivers-api While there are a mix of things here, most of the stuff were written from Kernel developer's PoV. So, add them to the driver-api book. A follow up for this patch would be to move documents from there that are specific to sysadmins, adding them to the admin-guide. Signed-off-by: Mauro Carvalho Chehab Acked-by: Johan Hovold Acked-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman Documentation/index.rst | 1 + Documentation/index.rst.rej | 10 ++++++ Documentation/usb/{acm.txt => acm.rst} | 0 .../usb/{authorization.txt => authorization.rst} | 0 Documentation/usb/{chipidea.txt => chipidea.rst} | 0 Documentation/usb/{dwc3.txt => dwc3.rst} | 0 Documentation/usb/{ehci.txt => ehci.rst} | 0 .../usb/{functionfs.txt => functionfs.rst} | 0 .../usb/{gadget-testing.txt => gadget-testing.rst} | 4 +-- .../{gadget_configfs.txt => gadget_configfs.rst} | 0 .../usb/{gadget_hid.txt => gadget_hid.rst} | 0 .../usb/{gadget_multi.txt => gadget_multi.rst} | 0 .../usb/{gadget_printer.txt => gadget_printer.rst} | 0 .../usb/{gadget_serial.txt => gadget_serial.rst} | 0 Documentation/usb/index.rst | 39 ++++++++++++++++++++++ .../usb/{iuu_phoenix.txt => iuu_phoenix.rst} | 0 .../usb/{mass-storage.txt => mass-storage.rst} | 0 .../usb/{misc_usbsevseg.txt => misc_usbsevseg.rst} | 0 Documentation/usb/{mtouchusb.txt => mtouchusb.rst} | 0 Documentation/usb/{ohci.txt => ohci.rst} | 0 Documentation/usb/{rio.txt => rio.rst} | 0 Documentation/usb/text_files.rst | 29 ++++++++++++++++ Documentation/usb/{usb-help.txt => usb-help.rst} | 0 .../usb/{usb-serial.txt => usb-serial.rst} | 0 .../usb/{usbip_protocol.txt => usbip_protocol.rst} | 0 Documentation/usb/{usbmon.txt => usbmon.rst} | 0 ...esign-overview.txt => wusb-design-overview.rst} | 0 MAINTAINERS | 12 +++---- drivers/usb/Kconfig | 2 +- drivers/usb/class/Kconfig | 2 +- drivers/usb/gadget/Kconfig | 6 ++-- drivers/usb/gadget/function/f_mass_storage.c | 2 +- drivers/usb/gadget/legacy/Kconfig | 6 ++-- drivers/usb/host/Kconfig | 2 +- drivers/usb/misc/Kconfig | 2 +- drivers/usb/mon/Kconfig | 2 +- drivers/usb/serial/Kconfig | 10 +++--- drivers/usb/serial/belkin_sa.c | 2 +- drivers/usb/serial/belkin_sa.h | 2 +- drivers/usb/serial/cypress_m8.c | 2 +- drivers/usb/serial/empeg.c | 2 +- drivers/usb/serial/ftdi_sio.c | 2 +- drivers/usb/serial/ir-usb.c | 2 +- drivers/usb/serial/keyspan_pda.c | 2 +- drivers/usb/serial/omninet.c | 2 +- drivers/usb/serial/oti6858.c | 2 +- drivers/usb/serial/pl2303.c | 2 +- drivers/usb/serial/usb-serial.c | 2 +- drivers/usb/serial/visor.c | 2 +- drivers/usb/serial/visor.h | 2 +- drivers/usb/serial/whiteheat.c | 2 +- drivers/usb/serial/whiteheat.h | 2 +- 52 files changed, 119 insertions(+), 40 deletions(-) commit 743344a952fcebee9ca4d783807cf1f03f933baf Author: Yoshihiro Shimoda Date: Thu Jun 13 20:18:48 2019 +0900 usb: renesas_usbhs: Use struct assignment instead of memcpy() To avoid the error-proneness of calls to sizeof() in the memcpy, this patch uses struct assignment instead of memcpy. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Simon Horman --- This patch is based on Greg's linux-usb.git / usb-next branch. Note that mod_host.c also has memcpy but we cannot use struct assignment for it because the type of urb->setup_patcket is just "unsigned char *". drivers/usb/renesas_usbhs/common.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) Signed-off-by: Greg Kroah-Hartman drivers/usb/renesas_usbhs/common.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit d46a6024c709a7f3057e512b1e836e816ace1143 Author: Harry Pan Date: Thu Jun 20 13:58:23 2019 +0800 USB: core: correct a spelling mistake in the comment Fix a spelling typo in the function comment. Signed-off-by: Harry Pan Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a251fb90ab8a3e6efb2b4e14923ddb4421317f65 Author: Saar Amar Date: Mon May 6 11:29:16 2019 +0300 KVM: x86: Fix apic dangling pointer in vcpu The function kvm_create_lapic() attempts to allocate the apic structure and sets a pointer to it in the virtual processor structure. However, if get_zeroed_page() failed, the function frees the apic chunk, but forgets to set the pointer in the vcpu to NULL. It's not a security issue since there isn't a use of that pointer if kvm_create_lapic() returns error, but it's more accurate that way. Signed-off-by: Saar Amar Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 1 + 1 file changed, 1 insertion(+) commit 4d763b168e9c5c366b05812c7bba7662e5ea3669 Author: Wanpeng Li Date: Thu Jun 20 17:00:02 2019 +0800 KVM: VMX: check CPUID before allowing read/write of IA32_XSS Raise #GP when guest read/write IA32_XSS, but the CPUID bits say that it shouldn't exist. Fixes: 203000993de5 (kvm: vmx: add MSR logic for XSAVES) Reported-by: Xiaoyao Li Reported-by: Tao Xu Cc: Paolo Bonzini Cc: Radim Krčmář Cc: stable@vger.kernel.org Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/vmx.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit f9481b08220d7dc1ff21e296a330ee8b721b44e4 Author: Tudor Ambarus Date: Wed Jun 19 14:38:28 2019 +0000 spi: fix ctrl->num_chipselect constraint at91sam9g25ek showed the following error at probe: atmel_spi f0000000.spi: Using dma0chan2 (tx) and dma0chan3 (rx) for DMA transfers atmel_spi: probe of f0000000.spi failed with error -22 Commit 0a919ae49223 ("spi: Don't call spi_get_gpio_descs() before device name is set") moved the calling of spi_get_gpio_descs() after ctrl->dev is set, but didn't move the !ctrl->num_chipselect check. When there are chip selects in the device tree, the spi-atmel driver lets the SPI core discover them when registering the SPI master. The ctrl->num_chipselect is thus expected to be set by spi_get_gpio_descs(). Move the !ctlr->num_chipselect after spi_get_gpio_descs() as it was before the aforementioned commit. While touching this block, get rid of the explicit comparison with 0 and update the commenting style. Fixes: 0a919ae49223 ("spi: Don't call spi_get_gpio_descs() before device name is set") Signed-off-by: Tudor Ambarus Signed-off-by: Mark Brown drivers/spi/spi.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 51c711f2c38a412aaeda43c8167fe41877cf414d Author: Masahisa Kojima Date: Thu Jun 20 17:24:26 2019 +0900 spi: spi-synquacer: Fixed build on architectures missing readsl/writesl series kbuild test reported that alpha and some of the architectures are missing readsl/writesl series. Use more portable ioread32_rep()/iowrite32_rep() series. Fixes: b0823ee35cf9b ("spi: Add spi driver for Socionext SynQuacer platform") Reported-by: kbuild test robot Signed-off-by: Masahisa Kojima Signed-off-by: Mark Brown drivers/spi/spi-synquacer.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit fd5d10059d5ead12dd12f05ae6d96e70d1fac3df Author: Felix Riemann Date: Thu Jun 20 08:45:00 2019 +0100 regulator: da9061/62: Adjust LDO voltage selection minimum value According to the DA9061 and DA9062 datasheets the LDO voltage selection registers have a lower value of 0x02. This applies to voltage registers VLDO1_A, VLDO2_A, VLDO3_A and VLDO4_A. This linear offset of 0x02 was previously not observed by the driver, causing the LDO output voltage to be systematically lower by two steps (= 0.1V). This patch fixes the minimum linear selector offset by setting it to a value of 2 and increases the n_voltages by the same amount allowing voltages in the range 0x02 -> 0.9V to 0x38 -> 3.6V to be correctly selected. Also fixes an incorrect calculaton for the n_voltages value in the regulator LDO2. These fixes effect all LDO regulators for DA9061 and DA9062. Acked-by: Steve Twiss Tested-by: Steve Twiss Signed-off-by: Felix Riemann Signed-off-by: Steve Twiss Signed-off-by: Mark Brown drivers/regulator/da9062-regulator.c | 40 +++++++++++++++++++++--------------- include/linux/mfd/da9062/registers.h | 3 +++ 2 files changed, 27 insertions(+), 16 deletions(-) commit 70ca117b02f3b1c8830fe95e4e3dea2937038e11 Author: Krzysztof Kozlowski Date: Wed Jun 19 14:42:39 2019 +0200 regulator: s2mps11: Fix ERR_PTR dereference on GPIO lookup failure If devm_gpiod_get_from_of_node() call returns ERR_PTR, it is assigned into an array of GPIO descriptors and used later because such error is not treated as critical thus it is not propagated back to the probe function. All code later expects that such GPIO descriptor is either a NULL or proper value. This later might lead to dereference of ERR_PTR. Only devices with S2MPS14 flavor are affected (other do not control regulators with GPIOs). Fixes: 1c984942f0a4 ("regulator: s2mps11: Pass descriptor instead of GPIO number") Cc: Signed-off-by: Krzysztof Kozlowski Signed-off-by: Mark Brown drivers/regulator/s2mps11.c | 1 + 1 file changed, 1 insertion(+) commit 7f80e1376aa4e74924ca3cb229dbd6c54fa4656e Author: Kuninori Morimoto Date: Thu Jun 20 16:03:41 2019 +0900 ASoC: rt5514-spi: don't use snd_soc_lookup_component() rt5514-spi can use dev_get_drvdata() to get its component because it is using snd_soc_component_set_drvdata(); static int rt5514_spi_pcm_probe(...) { ... => snd_soc_component_set_drvdata(component, ...); ... } We don't need to use snd_soc_lookup_component() for it. This patch uses dev_get_drvdata() instead of snd_soc_lookup_component(). Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/codecs/rt5514-spi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 9700022109b6c495fb571f77324d34b294b29145 Author: Peter Ujfalusi Date: Thu Jun 20 12:26:56 2019 +0300 ASoC: pcm3168a: Add support for multi DIN/DOUT with TDM slots parameter The driver was wired to be only usable in DIN1/DOUT1 mode, switching between TDM and non TDM modes based on the number of channels. While keeping this functionality for compatibility add support for using all DIN1/2/3/4 and DOUT1/2/3 if it is needed by setting the TDM slots to 2. Signed-off-by: Peter Ujfalusi Signed-off-by: Mark Brown sound/soc/codecs/pcm3168a.c | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) commit b5d8dffb8cc9792c3bb4310e142932c8bc5c0387 Author: Peter Ujfalusi Date: Thu Jun 20 12:26:55 2019 +0300 ASoC: pcm3168a: Rename min_frame_size to slot_width It represents slot size and not frame. Signed-off-by: Peter Ujfalusi Signed-off-by: Mark Brown sound/soc/codecs/pcm3168a.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit fd14f4436fd47d5418023c90e933e66d3645552e Author: Peter Ujfalusi Date: Thu Jun 20 12:20:02 2019 +0300 ASoC: ti: davinci-mcasp: Fix slot mask settings when using multiple AXRs If multiple serializers are connected in the system and the number of channels will need to use more than one serializer the mask to enable the serializers were left to 0 if tdm_mask is provided Fixes: dd55ff8346a97 ("ASoC: davinci-mcasp: Add set_tdm_slots() support") Signed-off-by: Peter Ujfalusi Signed-off-by: Mark Brown sound/soc/ti/davinci-mcasp.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 5dd17a3c3ed545f73b8bf7754efd5f6125bf7531 Author: Peter Ujfalusi Date: Thu Jun 20 12:20:01 2019 +0300 ASoC: ti: davinci-mcasp: Set unused serializers as INACTIVE Unused serializers needs to be configured as INACTIVE, otherwise they will underflow/overflow when multiple serializers are connected, but some are not needed for the given stream. Signed-off-by: Peter Ujfalusi Signed-off-by: Mark Brown sound/soc/ti/davinci-mcasp.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 9e0784d00e35e058353e2e7e59dd956be7519788 Author: Andy Shevchenko Date: Wed Jun 19 18:02:13 2019 +0300 ASoC: Intel: Skylake: Switch to modern UUID API Switch the driver to use modern UUID API, i.e. guid_t type and accompanying functions, such as guid_equal(). Cc: Liam Girdwood Cc: Mark Brown Cc: Vinod Koul Signed-off-by: Andy Shevchenko Reviewed-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-pcm.c | 12 ++++++------ sound/soc/intel/skylake/skl-sst-dsp.h | 6 +++--- sound/soc/intel/skylake/skl-sst-utils.c | 23 +++++++---------------- sound/soc/intel/skylake/skl-sst.c | 4 +--- sound/soc/intel/skylake/skl-topology.c | 24 ++++++++++++------------ sound/soc/intel/skylake/skl-topology.h | 6 +++--- 6 files changed, 32 insertions(+), 43 deletions(-) commit f1572a4489543c051a6097a706b91ff0f1c2175d Author: Richard Fitzgerald Date: Wed Jun 19 14:41:59 2019 +0100 ASoC: cs47l90: Add codec driver for Cirrus Logic CS47L90 Adds the codec driver for the CS47L90 SmartCodec. This is a multi-functional codec based on the Cirrus Logic Madera platform. Signed-off-by: Nikesh Oswal Signed-off-by: Richard Fitzgerald Signed-off-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/Kconfig | 6 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/cs47l90.c | 2657 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 2665 insertions(+) commit 95a9049b5854d21420a782a41e3f79619655c2bc Author: Richard Fitzgerald Date: Wed Jun 19 14:41:58 2019 +0100 ASoC: cs47l85: Add codec driver for Cirrus Logic CS47L85 Adds the codec driver for the CS47L85 SmartCodec. This is a multi-functional codec based on the Cirrus Logic Madera platform. Signed-off-by: Nariman Poushin Signed-off-by: Richard Fitzgerald Signed-off-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/Kconfig | 6 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/cs47l85.c | 2734 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 2742 insertions(+) commit e6a2b5c0b7ebd28bc44117cf27b5308a288c7925 Author: Richard Fitzgerald Date: Wed Jun 19 14:41:57 2019 +0100 ASoC: cs47l35: Add codec driver for Cirrus Logic CS47L35 Adds the codec driver for the CS47L35 SmartCodec. This is a multi-functional codec based on the Cirrus Logic Madera platform. Signed-off-by: Piotr Stankiewicz Signed-off-by: Richard Fitzgerald Signed-off-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/Kconfig | 6 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/cs47l35.c | 1782 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1790 insertions(+) commit 2735b683e1f284560f7e8e1d1ebf385ab111312d Author: Richard Fitzgerald Date: Wed Jun 19 14:41:56 2019 +0100 ASoC: madera: Add common support for Cirrus Logic Madera codecs The Cirrus Logic Madera codecs are a family of related codecs with extensive digital and analogue I/O, digital mixing and routing, signal processing and programmable DSPs. This patch adds common support code shared by all Madera codecs. This patch also adds the pdata to the parent mfd pdata struct. Since there is a circular build dependency it's convenient to patch them both atomically. Signed-off-by: Nariman Poushin Signed-off-by: Nikesh Oswal Signed-off-by: Piotr Stankiewicz Signed-off-by: Ajit Pandey Signed-off-by: Richard Fitzgerald Signed-off-by: Charles Keepax Signed-off-by: Mark Brown MAINTAINERS | 4 + include/linux/mfd/madera/pdata.h | 4 + include/sound/madera-pdata.h | 63 + sound/soc/codecs/Kconfig | 5 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/madera.c | 4181 ++++++++++++++++++++++++++++++++++++++ sound/soc/codecs/madera.h | 446 ++++ 7 files changed, 4705 insertions(+) commit f0b1f5f08dfbc043fb3759a3ed6d0a249d55e8ec Author: Richard Fitzgerald Date: Wed Jun 19 14:41:55 2019 +0100 ASoC: madera: Add DT bindings for Cirrus Logic Madera codecs The Cirrus Logic Madera codecs are a family of related codecs with extensive digital and analogue I/O, digital mixing and routing, signal processing and programmable DSPs. Signed-off-by: Richard Fitzgerald Signed-off-by: Charles Keepax Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/madera.txt | 67 ++++++++++++++++++++++ MAINTAINERS | 1 + include/dt-bindings/sound/madera.h | 29 ++++++++++ 3 files changed, 97 insertions(+) commit 1e7f6e1c69f0ff35c90878f9b44adcff77995eb9 Author: Olivier Moysan Date: Wed Jun 19 13:40:02 2019 +0200 ASoC: stm32: dfsdm: add 16 bits audio record support Add support of audio 16 bits format record to STM32 DFSDM driver. Signed-off-by: Olivier Moysan Signed-off-by: Mark Brown sound/soc/stm/stm32_adfsdm.c | 49 +++++++++++++++++++++++++++++++++++--------- 1 file changed, 39 insertions(+), 10 deletions(-) commit 01d6fb565b4a7858af1699727f25da2279d75deb Author: Vidya Sagar Date: Wed Jun 12 15:23:39 2019 +0530 arm64: defconfig: Add Tegra194 PCIe driver Add PCIe host controller driver for DesignWare core based PCIe controller IP present in Tegra194. Signed-off-by: Vidya Sagar Signed-off-by: Thierry Reding arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit b04832ed1f70457ee9c702fe7669460e005dcaa2 Author: Leo Yan Date: Wed May 8 10:19:02 2019 +0800 arm64: dts: sc9860: Update coresight DT bindings CoreSight DT bindings have been updated, thus the old compatible strings are obsolete and the drivers will report warning if DTS uses these obsolete strings. This patch switches to the new bindings for CoreSight dynamic funnel, so can dismiss warning during initialisation. Change-Id: Ifcc4394589f1307e92b113ebeda098b461fe085a Cc: Chunyan Zhang Cc: Orson Zhai Cc: Mathieu Poirier Cc: Suzuki K Poulose Signed-off-by: Leo Yan Signed-off-by: Chunyan Zhang arch/arm64/boot/dts/sprd/sc9860.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b8b89a8407df89018f264c22a805ba37db6f02c1 Author: Leo Yan Date: Wed May 8 10:19:01 2019 +0800 arm64: dts: sc9836: Update coresight DT bindings CoreSight DT bindings have been updated, thus the old compatible strings are obsolete and the drivers will report warning if DTS uses these obsolete strings. This patch switches to the new bindings for CoreSight dynamic funnel, so can dismiss warning during initialisation. Change-Id: I2f7072bacf76aac0bb2fc891d5d71352d99e6ea8 Cc: Chunyan Zhang Cc: Orson Zhai Cc: Mathieu Poirier Cc: Suzuki K Poulose Signed-off-by: Leo Yan Signed-off-by: Chunyan Zhang arch/arm64/boot/dts/sprd/sc9836.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b302e4b176d00e1cbc80148c5d0aee36751f7480 Author: Fenghua Yu Date: Mon Jun 17 11:00:16 2019 -0700 x86/cpufeatures: Enumerate the new AVX512 BFLOAT16 instructions AVX512 BFLOAT16 instructions support 16-bit BFLOAT16 floating-point format (BF16) for deep learning optimization. BF16 is a short version of 32-bit single-precision floating-point format (FP32) and has several advantages over 16-bit half-precision floating-point format (FP16). BF16 keeps FP32 accumulation after multiplication without loss of precision, offers more than enough range for deep learning training tasks, and doesn't need to handle hardware exception. AVX512 BFLOAT16 instructions are enumerated in CPUID.7.1:EAX[bit 5] AVX512_BF16. CPUID.7.1:EAX contains only feature bits. Reuse the currently empty word 12 as a pure features word to hold the feature bits including AVX512_BF16. Detailed information of the CPUID bit and AVX512 BFLOAT16 instructions can be found in the latest Intel Architecture Instruction Set Extensions and Future Features Programming Reference. [ bp: Check CPUID(7) subleaf validity before accessing subleaf 1. ] Signed-off-by: Fenghua Yu Signed-off-by: Borislav Petkov Cc: "Chang S. Bae" Cc: Frederic Weisbecker Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jann Horn Cc: Masahiro Yamada Cc: Michael Ellerman Cc: Nadav Amit Cc: Paolo Bonzini Cc: Pavel Tatashin Cc: Peter Feiner Cc: Radim Krcmar Cc: "Rafael J. Wysocki" Cc: "Ravi V Shankar" Cc: Robert Hoo Cc: "Sean J Christopherson" Cc: Thomas Gleixner Cc: Thomas Lendacky Cc: x86 Link: https://lkml.kernel.org/r/1560794416-217638-3-git-send-email-fenghua.yu@intel.com arch/x86/include/asm/cpufeature.h | 2 +- arch/x86/include/asm/cpufeatures.h | 3 +++ arch/x86/kernel/cpu/common.c | 6 ++++++ arch/x86/kernel/cpu/cpuid-deps.c | 1 + 4 files changed, 11 insertions(+), 1 deletion(-) commit acec0ce081de0c36459eea91647faf99296445a3 Author: Fenghua Yu Date: Wed Jun 19 18:51:09 2019 +0200 x86/cpufeatures: Combine word 11 and 12 into a new scattered features word It's a waste for the four X86_FEATURE_CQM_* feature bits to occupy two whole feature bits words. To better utilize feature words, re-define word 11 to host scattered features and move the four X86_FEATURE_CQM_* features into Linux defined word 11. More scattered features can be added in word 11 in the future. Rename leaf 11 in cpuid_leafs to CPUID_LNX_4 to reflect it's a Linux-defined leaf. Rename leaf 12 as CPUID_DUMMY which will be replaced by a meaningful name in the next patch when CPUID.7.1:EAX occupies world 12. Maximum number of RMID and cache occupancy scale are retrieved from CPUID.0xf.1 after scattered CQM features are enumerated. Carve out the code into a separate function. KVM doesn't support resctrl now. So it's safe to move the X86_FEATURE_CQM_* features to scattered features word 11 for KVM. Signed-off-by: Fenghua Yu Signed-off-by: Borislav Petkov Cc: Aaron Lewis Cc: Andy Lutomirski Cc: Babu Moger Cc: "Chang S. Bae" Cc: "Sean J Christopherson" Cc: Frederic Weisbecker Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jann Horn Cc: Juergen Gross Cc: Konrad Rzeszutek Wilk Cc: kvm ML Cc: Masahiro Yamada Cc: Masami Hiramatsu Cc: Nadav Amit Cc: Paolo Bonzini Cc: Pavel Tatashin Cc: Peter Feiner Cc: "Peter Zijlstra (Intel)" Cc: "Radim Krčmář" Cc: "Rafael J. Wysocki" Cc: Ravi V Shankar Cc: Sherry Hurwitz Cc: Thomas Gleixner Cc: Thomas Lendacky Cc: x86 Link: https://lkml.kernel.org/r/1560794416-217638-2-git-send-email-fenghua.yu@intel.com arch/x86/include/asm/cpufeature.h | 4 ++-- arch/x86/include/asm/cpufeatures.h | 17 ++++++++++------- arch/x86/kernel/cpu/common.c | 38 +++++++++++++++----------------------- arch/x86/kernel/cpu/cpuid-deps.c | 3 +++ arch/x86/kernel/cpu/scattered.c | 4 ++++ arch/x86/kvm/cpuid.h | 2 -- 6 files changed, 34 insertions(+), 34 deletions(-) commit 7e6daf50e1f4ea0ecd56406beb64ffc66e1e94db Author: Christian Brauner Date: Wed Jun 19 19:05:47 2019 +0200 netfilter: bridge: prevent UAF in brnf_exit_net() Prevent a UAF in brnf_exit_net(). When unregister_net_sysctl_table() is called the ctl_hdr pointer will obviously be freed and so accessing it righter after is invalid. Fix this by stashing a pointer to the table we want to free before we unregister the sysctl header. Note that syzkaller falsely chased this down to the drm tree so the Fixes tag that syzkaller requested would be wrong. This commit uses a different but the correct Fixes tag. /* Splat */ BUG: KASAN: use-after-free in br_netfilter_sysctl_exit_net net/bridge/br_netfilter_hooks.c:1121 [inline] BUG: KASAN: use-after-free in brnf_exit_net+0x38c/0x3a0 net/bridge/br_netfilter_hooks.c:1141 Read of size 8 at addr ffff8880a4078d60 by task kworker/u4:4/8749 CPU: 0 PID: 8749 Comm: kworker/u4:4 Not tainted 5.2.0-rc5-next-20190618 #17 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: netns cleanup_net Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x172/0x1f0 lib/dump_stack.c:113 print_address_description.cold+0xd4/0x306 mm/kasan/report.c:351 __kasan_report.cold+0x1b/0x36 mm/kasan/report.c:482 kasan_report+0x12/0x20 mm/kasan/common.c:614 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:132 br_netfilter_sysctl_exit_net net/bridge/br_netfilter_hooks.c:1121 [inline] brnf_exit_net+0x38c/0x3a0 net/bridge/br_netfilter_hooks.c:1141 ops_exit_list.isra.0+0xaa/0x150 net/core/net_namespace.c:154 cleanup_net+0x3fb/0x960 net/core/net_namespace.c:553 process_one_work+0x989/0x1790 kernel/workqueue.c:2269 worker_thread+0x98/0xe40 kernel/workqueue.c:2415 kthread+0x354/0x420 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 Allocated by task 11374: save_stack+0x23/0x90 mm/kasan/common.c:71 set_track mm/kasan/common.c:79 [inline] __kasan_kmalloc mm/kasan/common.c:489 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:462 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:503 __do_kmalloc mm/slab.c:3645 [inline] __kmalloc+0x15c/0x740 mm/slab.c:3654 kmalloc include/linux/slab.h:552 [inline] kzalloc include/linux/slab.h:743 [inline] __register_sysctl_table+0xc7/0xef0 fs/proc/proc_sysctl.c:1327 register_net_sysctl+0x29/0x30 net/sysctl_net.c:121 br_netfilter_sysctl_init_net net/bridge/br_netfilter_hooks.c:1105 [inline] brnf_init_net+0x379/0x6a0 net/bridge/br_netfilter_hooks.c:1126 ops_init+0xb3/0x410 net/core/net_namespace.c:130 setup_net+0x2d3/0x740 net/core/net_namespace.c:316 copy_net_ns+0x1df/0x340 net/core/net_namespace.c:439 create_new_namespaces+0x400/0x7b0 kernel/nsproxy.c:103 unshare_nsproxy_namespaces+0xc2/0x200 kernel/nsproxy.c:202 ksys_unshare+0x444/0x980 kernel/fork.c:2822 __do_sys_unshare kernel/fork.c:2890 [inline] __se_sys_unshare kernel/fork.c:2888 [inline] __x64_sys_unshare+0x31/0x40 kernel/fork.c:2888 do_syscall_64+0xfd/0x680 arch/x86/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 9: save_stack+0x23/0x90 mm/kasan/common.c:71 set_track mm/kasan/common.c:79 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:451 kasan_slab_free+0xe/0x10 mm/kasan/common.c:459 __cache_free mm/slab.c:3417 [inline] kfree+0x10a/0x2c0 mm/slab.c:3746 __rcu_reclaim kernel/rcu/rcu.h:215 [inline] rcu_do_batch kernel/rcu/tree.c:2092 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2310 [inline] rcu_core+0xcc7/0x1500 kernel/rcu/tree.c:2291 __do_softirq+0x25c/0x94c kernel/softirq.c:292 The buggy address belongs to the object at ffff8880a4078d40 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 32 bytes inside of 512-byte region [ffff8880a4078d40, ffff8880a4078f40) The buggy address belongs to the page: page:ffffea0002901e00 refcount:1 mapcount:0 mapping:ffff8880aa400a80 index:0xffff8880a40785c0 flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea0001d636c8 ffffea0001b07308 ffff8880aa400a80 raw: ffff8880a40785c0 ffff8880a40780c0 0000000100000004 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a4078c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a4078c80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc > ffff8880a4078d00: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ^ ffff8880a4078d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a4078e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb Reported-by: syzbot+43a3fa52c0d9c5c94f41@syzkaller.appspotmail.com Fixes: 22567590b2e6 ("netfilter: bridge: namespace bridge netfilter sysctls") Signed-off-by: Christian Brauner Signed-off-by: Pablo Neira Ayuso net/bridge/br_netfilter_hooks.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 95701b1c3c8fe36368361394e3950094eece4723 Author: Philippe Mazenauer Date: Wed May 22 09:36:57 2019 +0000 arm: add missing include platform-data/atmel.h Include corresponding headerfile for function at91_suspend_entering_slow_clock(). ../arch/arm/mach-at91/pm.c:279:5: warning: no previous prototype for ‘at91_suspend_entering_slow_clock’ [-Wmissing-prototypes] int at91_suspend_entering_slow_clock(void) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Philippe Mazenauer Signed-off-by: Alexandre Belloni arch/arm/mach-at91/pm.c | 1 + 1 file changed, 1 insertion(+) commit 22f2efd337761dd03e79b8ddf988653bdb5c20f9 Author: Pablo Neira Ayuso Date: Wed Jun 19 18:30:37 2019 +0200 netfilter: synproxy: use nf_cookie_v6_check() from core This helper function is never used and it is intended to avoid a direct dependency with the ipv6 module. Fixes: d7f9b2f18eae ("netfilter: synproxy: extract SYNPROXY infrastructure from {ipt, ip6t}_SYNPROXY") Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_synproxy_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9eecd07b34507de9d6a9c264d13d30e1ee5fabe8 Author: Enric Balletbo i Serra Date: Fri Jun 14 23:43:02 2019 +0200 platform/chrome: cros_ec_lpc_mec: Fix kernel-doc comment first line kernel-doc comments have a prescribed format. To be _particularly_ correct we should also capitalise the brief description and terminate it with a period. Signed-off-by: Enric Balletbo i Serra Reviewed-by: Nick Crews drivers/platform/chrome/cros_ec_lpc_mec.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 22c040fa21b604b9b3d88645e108fb2f0a74474b Author: Enric Balletbo i Serra Date: Fri Jun 14 23:43:01 2019 +0200 platform/chrome: cros_ec_lpc: Choose Microchip EC at runtime On many boards, communication between the kernel and the Embedded Controller happens over an LPC bus. In these cases, the kernel config CONFIG_CROS_EC_LPC is enabled. Some of these LPC boards contain a Microchip Embedded Controller (MEC) that is different from the regular EC. On these devices, the same LPC bus is used, but the protocol is a little different. In these cases, the CONFIG_CROS_EC_LPC_MEC kernel config is enabled. Currently, the kernel decides at compile-time whether or not to use the MEC variant, and, when that kernel option is selected it breaks the other boards. We would like a kind of runtime detection to avoid this. This patch adds that detection mechanism by probing the protocol at runtime, first we assume that a MEC variant is connected, and if the protocol fails it fallbacks to the regular EC. This adds a bit of overload because we try to read twice on those LPC boards that doesn't contain a MEC variant, but is a better solution than having to select the EC variant at compile-time. While here also fix the alignment in Kconfig file for this config option replacing the spaces by tabs. Signed-off-by: Enric Balletbo i Serra Reviewed-by: Ezequiel Garcia Tested-by: Nick Crews Reviewed-by: Nick Crews drivers/platform/chrome/Kconfig | 29 ++---- drivers/platform/chrome/Makefile | 3 +- drivers/platform/chrome/cros_ec_lpc.c | 158 ++++++++++++++++--------------- drivers/platform/chrome/wilco_ec/Kconfig | 2 +- 4 files changed, 95 insertions(+), 97 deletions(-) commit 8527fa6cc68a489f735823e61b31ec6cb266274a Author: Arnd Bergmann Date: Wed Jun 19 14:54:36 2019 +0200 netfilter: synproxy: fix building syncookie calls When either CONFIG_IPV6 or CONFIG_SYN_COOKIES are disabled, the kernel fails to build: include/linux/netfilter_ipv6.h:180:9: error: implicit declaration of function '__cookie_v6_init_sequence' [-Werror,-Wimplicit-function-declaration] return __cookie_v6_init_sequence(iph, th, mssp); include/linux/netfilter_ipv6.h:194:9: error: implicit declaration of function '__cookie_v6_check' [-Werror,-Wimplicit-function-declaration] return __cookie_v6_check(iph, th, cookie); net/ipv6/netfilter.c:237:26: error: use of undeclared identifier '__cookie_v6_init_sequence'; did you mean 'cookie_init_sequence'? net/ipv6/netfilter.c:238:21: error: use of undeclared identifier '__cookie_v6_check'; did you mean '__cookie_v4_check'? Fix the IS_ENABLED() checks to match the function declaration and definitions for these. Fixes: 3006a5224f15 ("netfilter: synproxy: remove module dependency on IPv6 SYNPROXY") Signed-off-by: Arnd Bergmann Signed-off-by: Pablo Neira Ayuso include/linux/netfilter_ipv6.h | 14 ++++++++------ net/ipv6/netfilter.c | 2 ++ 2 files changed, 10 insertions(+), 6 deletions(-) commit 4116fd25c5262e90427f9840e861a8553374a867 Author: Enric Balletbo i Serra Date: Fri Jun 14 23:43:00 2019 +0200 platform/chrome: cros_ec_lpc: Merge cros_ec_lpc and cros_ec_lpc_reg The cros_ec_lpc_reg files are only used by the cros_ec_lpc core and there isn't logical separation between them. So, merge those files into the cros_ec_lpc also allowing us to drop the header file used for the interface between the two. Signed-off-by: Enric Balletbo i Serra Reviewed-by: Nick Crews drivers/platform/chrome/Makefile | 2 +- drivers/platform/chrome/cros_ec_lpc.c | 97 +++++++++++++++++++++++++++- drivers/platform/chrome/cros_ec_lpc_reg.c | 101 ------------------------------ drivers/platform/chrome/cros_ec_lpc_reg.h | 45 ------------- 4 files changed, 97 insertions(+), 148 deletions(-) commit d096aa3eb6045a6a475a0239f3471c59eedf3d61 Author: Ting Shen Date: Fri Jun 14 14:54:38 2019 +0800 Input: cros_ec_keyb: mask out extra flags in event_type http://crosreview.com/1341159 added a EC_MKBP_HAS_MORE_EVENTS flag to the event_type field, the receiver side should mask out this extra bit when processing the event. Signed-off-by: Ting Shen Reviewed-by: Enrico Granata Acked-by: Dmitry Torokhov Reviewed-by: Benson Leung Signed-off-by: Enric Balletbo i Serra drivers/input/keyboard/cros_ec_keyb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ec2b827be39624bab743730385bc170d29472965 Author: Geert Uytterhoeven Date: Mon Jun 17 13:58:58 2019 +0200 clk: renesas: cpg-mssr: Use [] to denote a flexible array member Flexible array members should be denoted using [] instead of [0], else gcc will not warn when they are no longer at the end of the structure. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman drivers/clk/renesas/renesas-cpg-mssr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8f5e20b6b8848baca6b1cebcd46ab9e94991d24e Author: Geert Uytterhoeven Date: Wed Jun 12 17:27:56 2019 +0200 clk: renesas: cpg-mssr: Combine driver-private and clock array allocation Make cpg_mssr_priv.clks[] a flexible array member, and use the new struct_size() helper, to combine the allocation of the driver-private structure and array of available clocks. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman drivers/clk/renesas/renesas-cpg-mssr.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) commit a79f5836bd5f38673e130e78e8b8a03438e6a030 Author: Geert Uytterhoeven Date: Wed Jun 12 17:25:39 2019 +0200 clk: renesas: mstp: Combine group-private and clock array allocation Make mstp_clock_group.clks[] a flexible array member, and use the new struct_size() helper, to combine the allocation of the group-private structure and array of module clocks. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman drivers/clk/renesas/clk-mstp.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit ba0386111cd86462b994c73084dedf4401c33c44 Author: Geert Uytterhoeven Date: Wed Jun 12 17:22:18 2019 +0200 clk: renesas: div6: Combine clock-private and parent array allocation Make div6_clock.parents[] a flexible array member, and use the new struct_size() helper, to combine the allocation of the clock-private structure and array of parent clocks. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman drivers/clk/renesas/clk-div6.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) commit d2e4cb45af8facc76e03c9e36675294ed005287c Author: Geert Uytterhoeven Date: Wed Jun 12 17:19:12 2019 +0200 clk: renesas: cpg-mssr: Update kerneldoc for struct cpg_mssr_priv New fields were added, but kerneldoc was forgotten, or inserted at the wrong place. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman drivers/clk/renesas/renesas-cpg-mssr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 541d7c44069b7b8a13cdd33c1413108acdaa3f18 Author: Thierry Reding Date: Thu Jun 20 11:32:24 2019 +0200 arm64: tegra: Sort device tree nodes alphabetically Device tree nodes without unit-address are to be sorted alphabetically. Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra186.dtsi | 48 ++++++++++++++++---------------- 1 file changed, 24 insertions(+), 24 deletions(-) commit a3fb01ba5af066521f3f3421839e501bb2c71805 Author: Dennis Zhou Date: Thu May 23 16:10:18 2019 -0400 blk-iolatency: only account submitted bios As is, iolatency recognizes done_bio and cleanup as ending paths. If a request is marked REQ_NOWAIT and fails to get a request, the bio is cleaned up via rq_qos_cleanup() and ended in bio_wouldblock_error(). This results in underflowing the inflight counter. Fix this by only accounting bios that were actually submitted. Signed-off-by: Dennis Zhou Cc: Josef Bacik Signed-off-by: Jens Axboe block/blk-iolatency.c | 4 ++++ 1 file changed, 4 insertions(+) commit d27e84a305980ac61df0a6841059d0eb09b8283d Author: Greg Kroah-Hartman Date: Tue Jun 18 17:45:49 2019 +0200 block: drbd: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Philipp Reisner Cc: Lars Ellenberg Cc: Jens Axboe Cc: drbd-dev@lists.linbit.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Jens Axboe drivers/block/drbd/drbd_debugfs.c | 64 ++------------------------------------- drivers/block/drbd/drbd_debugfs.h | 4 +-- drivers/block/drbd/drbd_main.c | 3 +- 3 files changed, 5 insertions(+), 66 deletions(-) commit 3a211b71529fdd0a89095b18fb19155db0c8fb5d Author: Pavel Begunkov Date: Thu May 23 18:43:11 2019 +0300 blk-core: Remove blk_end_request*() declarations Commit a1ce35fa49852db60fc6e268 ("block: remove dead elevator code") deleted blk_end_request() and friends, but some declaration are still left. Purge them. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe block/blk-core.c | 2 +- include/linux/blkdev.h | 12 ------------ 2 files changed, 1 insertion(+), 13 deletions(-) commit 45fc56e629caa451467e7664fbd4c797c434a6c4 Author: Borislav Petkov Date: Wed Jun 19 17:24:34 2019 +0200 x86/cpufeatures: Carve out CQM features retrieval ... into a separate function for better readability. Split out from a patch from Fenghua Yu to keep the mechanical, sole code movement separate for easy review. No functional changes. Signed-off-by: Borislav Petkov Cc: Fenghua Yu Cc: x86@kernel.org arch/x86/kernel/cpu/common.c | 60 ++++++++++++++++++++++++-------------------- 1 file changed, 33 insertions(+), 27 deletions(-) commit 243d9f78d942c4ed4a684202814c6cd0d1bcd954 Author: Chaitanya Kulkarni Date: Wed Jun 19 15:01:50 2019 -0700 block: code cleanup queue_poll_stat_show() This is a pure code cleanup patch and doesn't change any functionality. Having multiple coding styles in the code creates confusion when someone tries to add a new code. Make queue_poll_stat_show() consistent by adding spaces around binary operators with the rest of the code. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 3f6d385f818029d353fb932fcac38c3f11eeeb20 Author: Chaitanya Kulkarni Date: Wed Jun 19 15:01:49 2019 -0700 block: use right format specifier for op In function __blk_mq_debugfs_rq_show variable op has unsigned int type. Since op can never be negative use %u format specifier to match the variable type. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ee1e03598f7961f471367e075edcdbd8492a2239 Author: Chaitanya Kulkarni Date: Wed Jun 19 15:01:48 2019 -0700 block: get rid of redundant else This is a pure code cleanup patch and doesn't change any functionality. This removes the redundant else in the code which is not needed since we are returning from function anyway. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8c54803b98d5907b45fe98270be5ed4fbc7e4c4c Author: Chaitanya Kulkarni Date: Wed Jun 19 21:56:58 2019 -0700 null_blk: remove duplicate 0 initialization In function null_add_dev() struct nullb *nullb member is allocated using kzalloc_node() which returns 0red memory. In function setup_queues() which is called from the null_add_dev(), on successful queue allocation we set the nullb->nr_queues = 0 which is not needed due to earlier use of kzalloc_node(). Signed-off-by: Chaitanya Kulkarni Signed-off-by: Jens Axboe drivers/block/null_blk_main.c | 1 - 1 file changed, 1 deletion(-) commit 434e8aedeaec595933811c2af191db9f11d3ce3b Author: Jon Hunter Date: Thu Jun 20 09:17:02 2019 +0100 arm64: tegra: Fix Jetson Nano GPU regulator There are a few issues with the GPU regulator defined for Jetson Nano which are: 1. The GPU regulator is a PWM based regulator and not a fixed voltage regulator. 2. The output voltages for the GPU regulator are not correct. 3. The regulator enable ramp delay is too short for the regulator and needs to be increased. 2ms should be sufficient. 4. This is the same regulator used on Jetson TX1 and so make the ramp delay and settling time the same as Jetson TX1. Cc: stable@vger.kernel.org Signed-off-by: Jon Hunter Fixes: 6772cd0eacc8 ("arm64: tegra: Add NVIDIA Jetson Nano Developer Kit support") Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit 2f578aaf51624aa6fcff041fc7dc5c2d4dfa447f Author: Minwoo Im Date: Sun Jun 9 05:15:51 2019 +0900 block: move tag field position in struct request __data_len and __sector are internal fields which should not be accessed directly in driver-level like the comment above it. But, tag field can be accessed by driver level directly so that we need to make the comment right by moving it to some other place. Cc: Jens Axboe Cc: linux-block@vger.kernel.org Signed-off-by: Minwoo Im Reviewed-by: Chaitanya Kulkarni Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe include/linux/blkdev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ece6031ece2dd64d63708cfe1088016cee5b10c0 Author: Jon Hunter Date: Thu Jun 20 09:17:01 2019 +0100 arm64: tegra: Update Jetson TX1 GPU regulator timings The GPU regulator enable ramp delay for Jetson TX1 is set to 1ms which not sufficient because the enable ramp delay has been measured to be greater than 1ms. Furthermore, the downstream kernels released by NVIDIA for Jetson TX1 are using a enable ramp delay 2ms and a settling delay of 160us. Update the GPU regulator enable ramp delay for Jetson TX1 to be 2ms and add a settling delay of 160us. Cc: stable@vger.kernel.org Signed-off-by: Jon Hunter Fixes: 5e6b9a89afce ("arm64: tegra: Add VDD_GPU regulator to Jetson TX1") Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra210-p2180.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ba24eee6686f6ed3738602b54d959253316a9541 Author: Jon Hunter Date: Thu Jun 20 09:17:00 2019 +0100 arm64: tegra: Fix AGIC register range The Tegra AGIC interrupt controller is an ARM GIC400 interrupt controller. Per the ARM GIC device-tree binding, the first address region is for the GIC distributor registers and the second address region is for the GIC CPU interface registers. The address space for the distributor registers is 4kB, but currently this is incorrectly defined as 8kB for the Tegra AGIC and overlaps with the CPU interface registers. Correct the address space for the distributor to be 4kB. Cc: stable@vger.kernel.org Signed-off-by: Jon Hunter Fixes: bcdbde433542 ("arm64: tegra: Add AGIC node for Tegra210") Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra210.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 08c7c74b0986576b0381dec58845f99f32d1542d Author: Nicolin Chen Date: Mon Jun 17 15:16:59 2019 -0700 arm64: tegra: Add INA3221 channel info for Jetson TX2 There are four INA3221 chips on the Jetson TX2 (p3310 + p2771). And each INA3221 chip has three input channels to monitor power. So this patch adds these 12 channels to the DT of Jetson TX2, by following the DT binding of INA3221 and official documents from https://developer.nvidia.com/embedded/downloads tegra186-p3310: https://developer.nvidia.com/embedded/dlc/jetson-tx2-series-modules-oem-product-design-guide tegra186-p2771-0000: http://developer.nvidia.com/embedded/dlc/jetson-tx1-tx2-developer-kit-carrier-board-spec-20180618 Signed-off-by: Nicolin Chen Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra186-p2771-0000.dts | 40 ++++++++++++++++++++++ arch/arm64/boot/dts/nvidia/tegra186-p3310.dtsi | 40 ++++++++++++++++++++++ 2 files changed, 80 insertions(+) commit d87764daed0b3379ea8a643ef1abe8879da6a6a7 Author: Thierry Reding Date: Fri Jun 7 16:01:11 2019 +0200 arm64: tegra: Enable PWM on Jetson Nano Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 271839b0a819cbb76ef3ce5c7237d6cb624b3eba Author: Rob Herring Date: Fri May 17 10:39:11 2019 -0500 dt-bindings: arm: Convert Atmel board/soc bindings to json-schema Convert Atmel SoC bindings to DT schema format using json-schema. Cc: Mark Rutland Cc: Nicolas Ferre Cc: devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Rob Herring Signed-off-by: Alexandre Belloni .../devicetree/bindings/arm/atmel-at91.txt | 73 ----------- .../devicetree/bindings/arm/atmel-at91.yaml | 134 +++++++++++++++++++++ 2 files changed, 134 insertions(+), 73 deletions(-) commit 1f8e44b622dc9d47af1815ac59169b1adaa1195d Author: Linus Walleij Date: Sat Jun 1 00:43:33 2019 +0200 ARM: davinci: Use GPIO lookup table for DA850 LEDs This switches the DA850 board to use a GPIO lookup table to look up the GPIO LEDs. Thanks to the offset handling when we define GPIOs as an offset into the chip, we can drop some complex code. Tested-by: Bartosz Golaszewski Reviewed-by: Bartosz Golaszewski Signed-off-by: Linus Walleij Signed-off-by: Sekhar Nori arch/arm/mach-davinci/board-da850-evm.c | 43 +++++++++++++++++---------------- 1 file changed, 22 insertions(+), 21 deletions(-) commit a6c929f69f27385b467d5acd04c87189e6e3c3a1 Author: Linus Walleij Date: Thu Jun 20 10:54:55 2019 +0200 pinctrl: Minimize SPDX hamming distance OK so some automatic scripts were fixing the SPDX tags in the mainline branch while we were patching other stuff, and yeah it is more correct to have "GPL-2.0-only" rather than "GPL-2.0" so let's conform to what is already upstream so we don't end up getting the wrong license on the merged result later. Signed-off-by: Linus Walleij drivers/pinctrl/nomadik/Kconfig | 1 - drivers/pinctrl/pinctrl-coh901.c | 2 +- drivers/pinctrl/pinctrl-u300.c | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) commit aa23ce847ddac1fd5ffe987ff12e12ff48318e45 Author: Chunfeng Yun Date: Thu Jun 20 16:12:31 2019 +0800 usb: dwc3: remove unused @lock member of dwc3_ep struct The member @lock of dwc3_ep struct is only initialized, and not used elsewhere, so remove it. Signed-off-by: Chunfeng Yun Signed-off-by: Felipe Balbi drivers/usb/dwc3/core.h | 2 -- drivers/usb/dwc3/gadget.c | 2 -- 2 files changed, 4 deletions(-) commit 1a044213fc64835b13e675b8dda252aea9b92122 Author: Srinivas Kandagatla Date: Thu Jun 20 09:11:29 2019 +0100 slimbus: core: generate uevent for non-dt only Rely on MODULE_ALIAS() for automatic kernel module loading, rather than basing it on the OF compatible. This ensures that drivers without of_device_id table, such as wcd9335, will be automatically loaded. Signed-off-by: Srinivas Kandagatla [bjorn: Added commit message] Signed-off-by: Bjorn Andersson Signed-off-by: Greg Kroah-Hartman drivers/slimbus/core.c | 5 ----- 1 file changed, 5 deletions(-) commit e9cd251980f8b216a93721c3e0595596d9dcf643 Author: Ding Xiang Date: Thu Jun 20 09:11:28 2019 +0100 slimbus: remove redundant dev_err message devm_ioremap_resource already contains error message, so remove the redundant dev_err message Signed-off-by: Ding Xiang Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/slimbus/qcom-ctrl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit c7a787de7f3f3639b259d13190376af38068515c Author: YueHaibing Date: Thu Jun 6 04:28:40 2019 +0000 phy: usb: phy-brcm-usb: Fix platform_no_drv_owner.cocci warnings Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: YueHaibing Signed-off-by: Kishon Vijay Abraham I drivers/phy/broadcom/phy-brcm-usb.c | 1 - 1 file changed, 1 deletion(-) commit c886ec0256d32ec219372d9a88fb31d1ae7fcb2a Author: Gustavo A. R. Silva Date: Wed Jun 5 15:00:02 2019 -0500 phy: samsung: Use struct_size() in devm_kzalloc() One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct samsung_usb2_phy_driver { ... struct samsung_usb2_phy_instance instances[0]; }; instance = devm_kzalloc(dev, sizeof(struct samsung_usb2_phy_driver) + count * sizeof(struct samsung_usb2_phy_instance), GFP_KERNEL); Instead of leaving these open-coded and prone to type mistakes, we can now use the new struct_size() helper: instance = devm_kzalloc(dev, struct_size(instance, instances, count), GFP_KERNEL); This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kishon Vijay Abraham I drivers/phy/samsung/phy-samsung-usb2.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 786285f5e05c708d63632a359e856ec0b3df6716 Author: Enrico Weigelt Date: Tue Jun 18 21:24:39 2019 -0700 drivers: fpga: Kconfig: pedantic cleanups Formatting of Kconfig files doesn't look so pretty, so just take damp cloth and clean it up. Signed-off-by: Enrico Weigelt Signed-off-by: Moritz Fischer Signed-off-by: Greg Kroah-Hartman drivers/fpga/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit dfd19a5004eff03755967086aa04254c3d91b8ec Author: Takashi Iwai Date: Tue Jun 18 22:34:25 2019 +0200 fonts: Prefer a bigger font for high resolution screens Although we may have multiple fonts in kernel, the small 8x16 font is chosen as default usually unless user specify the boot option. This is suboptimal for monitors with high resolutions. This patch tries to assign a bigger font for such a high resolution by calculating some penalty value. This won't change anything for a standard monitor like Full HD (1920x1080), but for a high res monitor like UHD 4K, a bigger font like TER16x32 will be chosen once when enabled in Kconfig. Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman lib/fonts/fonts.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 4eb5fec31e613105668a1472d5876f3d0558e5d8 Author: Lianbo Jiang Date: Tue Apr 30 15:44:21 2019 +0800 fs/proc/vmcore: Enable dumping of encrypted memory when SEV was active In the kdump kernel, the memory of the first kernel gets to be dumped into a vmcore file. Similarly to SME kdump, if SEV was enabled in the first kernel, the old memory has to be remapped encrypted in order to access it properly. Commit 992b649a3f01 ("kdump, proc/vmcore: Enable kdumping encrypted memory with SME enabled") took care of the SME case but it uses sme_active() which checks for SME only. Use mem_encrypt_active() instead, which returns true when either SME or SEV is active. Unlike SME, the second kernel images (kernel and initrd) are loaded into encrypted memory when SEV is active, hence the kernel elf header must be remapped as encrypted in order to access it properly. [ bp: Massage commit message. ] Co-developed-by: Brijesh Singh Signed-off-by: Brijesh Singh Signed-off-by: Lianbo Jiang Signed-off-by: Borislav Petkov Cc: Alexey Dobriyan Cc: Andrew Morton Cc: Arnd Bergmann Cc: bhe@redhat.com Cc: dyoung@redhat.com Cc: Ganesh Goudar Cc: H. Peter Anvin Cc: kexec@lists.infradead.org Cc: linux-fsdevel@vger.kernel.org Cc: Matthew Wilcox Cc: Mike Rapoport Cc: mingo@redhat.com Cc: Rahul Lakkireddy Cc: Souptick Joarder Cc: Thomas Gleixner Cc: Tom Lendacky Cc: x86-ml Link: https://lkml.kernel.org/r/20190430074421.7852-4-lijiang@redhat.com fs/proc/vmcore.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 85784d16c2cf172cf1ebaf2390d6b7c4045d659c Author: Lianbo Jiang Date: Tue Apr 30 15:44:20 2019 +0800 x86/kexec: Set the C-bit in the identity map page table when SEV is active When SEV is active, the second kernel image is loaded into encrypted memory. For that, make sure that when kexec builds the identity mapping page table, the memory is encrypted (i.e., _PAGE_ENC is set). [ bp: Sort local args and OR in _PAGE_ENC for more clarity. ] Co-developed-by: Brijesh Singh Signed-off-by: Brijesh Singh Signed-off-by: Lianbo Jiang Signed-off-by: Borislav Petkov Cc: Andrew Morton Cc: bhe@redhat.com Cc: dyoung@redhat.com Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: kexec@lists.infradead.org Cc: "Kirill A. Shutemov" Cc: Thomas Gleixner Cc: Tom Lendacky Cc: x86-ml Link: https://lkml.kernel.org/r/20190430074421.7852-3-lijiang@redhat.com arch/x86/kernel/machine_kexec_64.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit 1a79c1b8a04153c4c387518967ce851f89e22733 Author: Lianbo Jiang Date: Tue Apr 30 15:44:19 2019 +0800 x86/kexec: Do not map kexec area as decrypted when SEV is active When a virtual machine panics, its memory needs to be dumped for analysis. With memory encryption in the picture, special care must be taken when loading a kexec/kdump kernel in a SEV guest. A SEV guest starts and runs fully encrypted. In order to load a kexec kernel and initrd, arch_kexec_post_{alloc,free}_pages() need to not map areas as decrypted unconditionally but differentiate whether the kernel is running as a SEV guest and if so, leave kexec area encrypted. [ bp: Reduce commit message to the relevant information pertaining to this commit only. ] Co-developed-by: Brijesh Singh Signed-off-by: Brijesh Singh Signed-off-by: Lianbo Jiang Signed-off-by: Borislav Petkov Cc: Andrew Morton Cc: bhe@redhat.com Cc: Brijesh Singh Cc: dyoung@redhat.com Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: kexec@lists.infradead.org Cc: "Kirill A. Shutemov" Cc: Thomas Gleixner Cc: Tom Lendacky Cc: x86-ml Link: https://lkml.kernel.org/r/20190430074421.7852-2-lijiang@redhat.com arch/x86/kernel/machine_kexec_64.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 980621daf368f2b9aa69c7ea01baa654edb7577b Author: Lianbo Jiang Date: Tue Apr 23 09:30:07 2019 +0800 x86/crash: Add e820 reserved ranges to kdump kernel's e820 table At present, when using the kexec_file_load() syscall to load the kernel image and initramfs, for example: kexec -s -p xxx the kernel does not pass the e820 reserved ranges to the second kernel, which might cause two problems: 1. MMCONFIG: A device in PCI segment 1 cannot be discovered by the kernel PCI probing without all the e820 I/O reservations being present in the e820 table. Which is the case currently, because the kdump kernel does not have those reservations because the kexec command does not pass the I/O reservation via the "memmap=xxx" command line option. Further details courtesy of Bjorn Helgaas¹: I think you should regard correct MCFG/ECAM usage in the kdump kernel as a requirement. MMCONFIG (aka ECAM) space is described in the ACPI MCFG table. If you don't have ECAM: (a) PCI devices won't work at all on non-x86 systems that use only ECAM for config access, (b) you won't be able to access devices on non-0 segments (granted, there aren't very many of these yet, but there will be more in the future), and (c) you won't be able to access extended config space (addresses 0x100-0xfff), which means none of the Extended Capabilities will be available (AER, ACS, ATS, etc). 2. The second issue is that the SME kdump kernel doesn't work without the e820 reserved ranges. When SME is active in the kdump kernel, those reserved regions are still decrypted, but because those reserved ranges are not present at all in kdump kernel's e820 table, they are accessed as encrypted. Which is obviously wrong. [1]: https://lkml.kernel.org/r/CABhMZUUscS3jUZUSM5Y6EYJK6weo7Mjj5-EAKGvbw0qEe%2B38zw@mail.gmail.com [ bp: Heavily massage commit message. ] Suggested-by: Dave Young Signed-off-by: Lianbo Jiang Signed-off-by: Borislav Petkov Cc: Andrew Morton Cc: Andy Lutomirski Cc: Baoquan He Cc: Bjorn Helgaas Cc: dave.hansen@linux.intel.com Cc: Dave Young Cc: "Gustavo A. R. Silva" Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: kexec@lists.infradead.org Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tom Lendacky Cc: x86-ml Cc: Yi Wang Link: https://lkml.kernel.org/r/20190423013007.17838-4-lijiang@redhat.com arch/x86/kernel/crash.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 1c1ecf09ee2200bac9713364673daa01188f19c0 Author: Joel Stanley Date: Thu Jun 20 17:07:41 2019 +0930 ARM: configs: aspeed: Add new drivers This enables a handful of new drivers that have recently landed: - Video caputre, for doing BMC virtual keyboard-video-mouse - DRM driver for the BMC's own graphics device - Error detection and correction - P2A control, a BMC feature for moving data between the host and BMC - RTC driver Signed-off-by: Joel Stanley arch/arm/configs/aspeed_g4_defconfig | 10 ++++++++-- arch/arm/configs/aspeed_g5_defconfig | 14 ++++++++++++-- 2 files changed, 20 insertions(+), 4 deletions(-) commit 5da04cc86d1215fd9fe0e5c88ead6e8428a75e56 Author: Lianbo Jiang Date: Tue Apr 23 09:30:06 2019 +0800 x86/mm: Rework ioremap resource mapping determination On ioremap(), __ioremap_check_mem() does a couple of checks on the supplied memory range to determine how the range should be mapped and in particular what protection flags should be used. Generalize the procedure by introducing IORES_MAP_* flags which control different aspects of the ioremapping and use them in the respective helpers which determine which descriptor flags should be set per range. [ bp: - Rewrite commit message. - Add/improve comments. - Reflow __ioremap_caller()'s args. - s/__ioremap_check_desc/__ioremap_check_encrypted/g; - s/__ioremap_res_check/__ioremap_collect_map_flags/g; - clarify __ioremap_check_ram()'s purpose. ] Signed-off-by: Lianbo Jiang Co-developed-by: Borislav Petkov Signed-off-by: Borislav Petkov Cc: Andrew Morton Cc: Andy Lutomirski Cc: bhe@redhat.com Cc: Dave Hansen Cc: dyoung@redhat.com Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: kexec@lists.infradead.org Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tom Lendacky Cc: x86-ml Link: https://lkml.kernel.org/r/20190423013007.17838-3-lijiang@redhat.com arch/x86/mm/ioremap.c | 71 ++++++++++++++++++++++++++++++++------------------ include/linux/ioport.h | 9 +++++++ 2 files changed, 54 insertions(+), 26 deletions(-) commit ae9e13d621d6795ec1ad6bf10bd2549c6c3feca4 Author: Lianbo Jiang Date: Tue Apr 23 09:30:05 2019 +0800 x86/e820, ioport: Add a new I/O resource descriptor IORES_DESC_RESERVED When executing the kexec_file_load() syscall, the first kernel needs to pass the e820 reserved ranges to the second kernel because some devices (PCI, for example) need them present in the kdump kernel for proper initialization. But the kernel can not exactly match the e820 reserved ranges when walking through the iomem resources using the default IORES_DESC_NONE descriptor, because there are several types of e820 ranges which are marked IORES_DESC_NONE, see e820_type_to_iores_desc(). Therefore, add a new I/O resource descriptor called IORES_DESC_RESERVED to mark exactly those ranges. It will be used to match the reserved resource ranges when walking through iomem resources. [ bp: Massage commit message. ] Suggested-by: Borislav Petkov Signed-off-by: Lianbo Jiang Signed-off-by: Borislav Petkov Cc: Andrew Morton Cc: Andy Lutomirski Cc: bhe@redhat.com Cc: dave.hansen@linux.intel.com Cc: dyoung@redhat.com Cc: "H. Peter Anvin" Cc: Huang Zijiang Cc: Ingo Molnar Cc: Joe Perches Cc: Juergen Gross Cc: kexec@lists.infradead.org Cc: Masayoshi Mizuma Cc: Michal Hocko Cc: Mike Rapoport Cc: Naoya Horiguchi Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tom Lendacky Cc: x86-ml Link: https://lkml.kernel.org/r/20190423013007.17838-2-lijiang@redhat.com arch/x86/kernel/e820.c | 2 +- include/linux/ioport.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit e1bfa87399e372446454ecbaeba2800f0a385733 Author: Thomas Lendacky Date: Wed Jun 19 18:40:59 2019 +0000 x86/mm: Create a workarea in the kernel for SME early encryption In order for the kernel to be encrypted "in place" during boot, a workarea outside of the kernel must be used. This SME workarea used during early encryption of the kernel is situated on a 2MB boundary after the end of the kernel text, data, etc. sections (_end). This works well during initial boot of a compressed kernel because of the relocation used for decompression of the kernel. But when performing a kexec boot, there's a chance that the SME workarea may not be mapped by the kexec pagetables or that some of the other data used by kexec could exist in this range. Create a section for SME in vmlinux.lds.S. Position it after "_end", which is after "__end_of_kernel_reserve", so that the memory will be reclaimed during boot and since this area is all zeroes, it compresses well. This new section will be part of the kernel image, so kexec will account for it in pagetable mappings and placement of data after the kernel. Here's an example of a kernel size without and with the SME section: without: vmlinux: 36,501,616 bzImage: 6,497,344 100000000-47f37ffff : System RAM 1e4000000-1e47677d4 : Kernel code (0x7677d4) 1e47677d5-1e4e2e0bf : Kernel data (0x6c68ea) 1e5074000-1e5372fff : Kernel bss (0x2fefff) with: vmlinux: 44,419,408 bzImage: 6,503,136 880000000-c7ff7ffff : System RAM 8cf000000-8cf7677d4 : Kernel code (0x7677d4) 8cf7677d5-8cfe2e0bf : Kernel data (0x6c68ea) 8d0074000-8d0372fff : Kernel bss (0x2fefff) Signed-off-by: Tom Lendacky Signed-off-by: Borislav Petkov Reviewed-by: Baoquan He Reviewed-by: Dave Hansen Tested-by: Lianbo Jiang Cc: Andy Lutomirski Cc: Brijesh Singh Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Joerg Roedel Cc: Kees Cook Cc: Nick Desaulniers Cc: Peter Zijlstra Cc: "Rafael Ávila de Espíndola" Cc: Sami Tolvanen Cc: Thomas Gleixner Cc: "x86@kernel.org" Link: https://lkml.kernel.org/r/3c483262eb4077b1654b2052bd14a8d011bffde3.1560969363.git.thomas.lendacky@amd.com arch/x86/kernel/vmlinux.lds.S | 25 +++++++++++++++++++++++++ arch/x86/mm/mem_encrypt_identity.c | 22 ++++++++++++++++++++-- 2 files changed, 45 insertions(+), 2 deletions(-) commit 2af47c10e80baf91cff56c44cec47402e05ac45c Author: Arnd Bergmann Date: Wed Jun 19 15:19:44 2019 +0200 floppy: fix harmless clang build warning clang warns about unusual code in floppy.c that looks like it was intended to be a bit mask operation, checking for a specific bit in the UDP->cmos variable (FLOPPY1_TYPE expands to '4' on ARM): drivers/block/floppy.c:3902:17: error: use of logical '&&' with constant operand [-Werror,-Wconstant-logical-operand] if (!UDP->cmos && FLOPPY1_TYPE) ^ ~~~~~~~~~~~~ drivers/block/floppy.c:3902:17: note: use '&' for a bitwise operation if (!UDP->cmos && FLOPPY1_TYPE) The check here is redundant anyway, if FLOPPY1_TYPE is zero, then assigning it to a zero UDP->cmos field does not change anything, so removing the extra check here has no effect other than shutting up the warning. On x86, this will no longer read a hardware register, as the FLOPPY1_TYPE macro is not expanded if UDP->cmos is already zero, but the result is the same. Cc: Robert Elliott Cc: Keith Busch Link: https://patchwork.kernel.org/patch/10851841/ Signed-off-by: Arnd Bergmann Signed-off-by: Jens Axboe drivers/block/floppy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dbb0569de852fb4576d6f62078d515f989a181ca Author: Felipe Balbi Date: Mon Jun 11 11:21:12 2018 +0300 usb: dwc3: pci: Add Support for Intel Elkhart Lake Devices This patch simply adds a new PCI Device ID Signed-off-by: Felipe Balbi drivers/usb/dwc3/dwc3-pci.c | 4 ++++ 1 file changed, 4 insertions(+) commit f467907c1c38575c8d936d012957b19a69538249 Author: Vitor Soares Date: Wed Jun 19 20:36:33 2019 +0200 i3c: dw: add limited bus mode support This patch add limited bus mode support for DesignWare i3c master Signed-off-by: Vitor Soares Cc: Boris Brezillon Cc: Signed-off-by: Boris Brezillon drivers/i3c/master/dw-i3c-master.c | 1 + 1 file changed, 1 insertion(+) commit cbf4f7325a638ced1d815580dfed44ea3b76163c Author: Vitor Soares Date: Wed Jun 19 20:36:32 2019 +0200 i3c: add mixed limited bus mode The i3c bus spec defines a bus configuration where i2c devices don't have a 50ns filter but support SCL running at SDR max rate (12.5MHz). This patch introduces the limited bus mode so that users can use a higher speed in presence of i2c devices index 1. Signed-off-by: Vitor Soares Cc: Boris Brezillon Cc: Signed-off-by: Boris Brezillon drivers/i3c/master.c | 5 +++++ include/linux/i3c/master.h | 5 +++++ 2 files changed, 10 insertions(+) commit ecc8fb54bd443bf69996d9d5ddb8d90a50f14936 Author: Vitor Soares Date: Wed Jun 19 20:36:31 2019 +0200 i3c: fix i2c and i3c scl rate by bus mode Currently the I3C framework limits SCL frequency to FM speed when dealing with a mixed slow bus, even if all I2C devices are FM+ capable. The core was also not accounting for I3C speed limitations when operating in mixed slow mode and was erroneously using FM+ speed as the max I2C speed when operating in mixed fast mode. Fixes: 3a379bbcea0a ("i3c: Add core I3C infrastructure") Signed-off-by: Vitor Soares Cc: Boris Brezillon Cc: Cc: Signed-off-by: Boris Brezillon drivers/i3c/master.c | 51 ++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 38 insertions(+), 13 deletions(-) commit c603a309cc75f3dd018ddb20ee44c05047918cbf Author: Thomas Lendacky Date: Wed Jun 19 18:40:57 2019 +0000 x86/mm: Identify the end of the kernel area to be reserved The memory occupied by the kernel is reserved using memblock_reserve() in setup_arch(). Currently, the area is from symbols _text to __bss_stop. Everything after __bss_stop must be specifically reserved otherwise it is discarded. This is not clearly documented. Add a new symbol, __end_of_kernel_reserve, that more readily identifies what is reserved, along with comments that indicate what is reserved, what is discarded and what needs to be done to prevent a section from being discarded. Signed-off-by: Tom Lendacky Signed-off-by: Borislav Petkov Reviewed-by: Baoquan He Reviewed-by: Dave Hansen Tested-by: Lianbo Jiang Cc: Andy Lutomirski Cc: Brijesh Singh Cc: Dave Young Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Joerg Roedel Cc: Juergen Gross Cc: Kees Cook Cc: Nick Desaulniers Cc: Pavel Tatashin Cc: Peter Zijlstra Cc: Robert Richter Cc: Sami Tolvanen Cc: Sinan Kaya Cc: Thomas Gleixner Cc: "x86@kernel.org" Link: https://lkml.kernel.org/r/7db7da45b435f8477f25e66f292631ff766a844c.1560969363.git.thomas.lendacky@amd.com arch/x86/include/asm/sections.h | 2 ++ arch/x86/kernel/setup.c | 8 +++++++- arch/x86/kernel/vmlinux.lds.S | 9 ++++++++- 3 files changed, 17 insertions(+), 2 deletions(-) commit 6084110a0e9c4bff75970f3d68091ceff9e2c2c7 Author: Eddie James Date: Tue Apr 2 02:42:29 2019 +0000 ARM: dts: aspeed: Enable video engine on romulus and wtherspoon Enable the video engine and add it's optional reserved memory region. Use 32MB for the reserved memory since the video engine could need up to two 1920x1200@32bpp source buffers. Source buffers: 2 * 1920 * 1200 * 4 = 18432000 bytes In addition, the V4L2 subsystem will allocate any number of compression buffers, each at most 1/8th the size of the source buffer. Signed-off-by: Eddie James Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts | 12 ++++++++++++ arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts | 12 ++++++++++++ 2 files changed, 24 insertions(+) commit 03c511dde04074fb8519d50d8001157d4bdebc7d Author: John Wang Date: Thu Jun 13 15:00:02 2019 +0800 ARM: dts: aspeed: Add Inspur fp5280g2 BMC machine The fp5280g2 is an OpenPower server platform with an ASPEED AST2500 BMC. Signed-off-by: John Wang Reviewed-by: Lei YU Reviewed-by: Andrew Jeffery Signed-off-by: Joel Stanley arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/aspeed-bmc-inspur-fp5280g2.dts | 846 +++++++++++++++++++++++ 2 files changed, 847 insertions(+) commit 73a649d2b98e25f4960b8081080c78695fea8bc7 Author: Takashi Iwai Date: Tue Jun 18 22:34:24 2019 +0200 fonts: Use BUILD_BUG_ON() for checking empty font table We have a nice macro, and the check of emptiness of the font table can be done in a simpler way. Signed-off-by: Takashi Iwai Acked-by: Randy Dunlap Signed-off-by: Greg Kroah-Hartman lib/fonts/fonts.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) commit aa1d19f1f96764e72155235ece22461599d0e7ac Author: Takashi Iwai Date: Tue Jun 18 22:34:23 2019 +0200 fonts: Fix coding style Fix indentation, spaces, and move EXPORT_SYMBOL line to the appropriate place as a preliminary work. No actual code change. Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman lib/fonts/fonts.c | 83 +++++++++++++++++++++++++++---------------------------- 1 file changed, 40 insertions(+), 43 deletions(-) commit 576d152ccc56574475faa7460d4b507e8440e9aa Author: Greg Kroah-Hartman Date: Fri Jun 14 16:29:04 2019 +0200 crypto: nx - no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Also, there is no need to store the individual debugfs file names, especially as the whole directiry is deleted at once, so remove the unneeded structure entirely. Cc: "Breno Leitão" Cc: Nayna Jain Cc: Paulo Flabiano Smorigo Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Herbert Xu Cc: "David S. Miller" Cc: linux-crypto@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Herbert Xu drivers/crypto/nx/nx.c | 4 +-- drivers/crypto/nx/nx.h | 12 ++----- drivers/crypto/nx/nx_debugfs.c | 71 ++++++++++++++---------------------------- 3 files changed, 26 insertions(+), 61 deletions(-) commit 97a5fee2bd70df9e48cdfdbbacc15d45089228a3 Author: Ard Biesheuvel Date: Wed Jun 12 18:19:59 2019 +0200 fs: cifs: switch to RC4 library interface The CIFS code uses the sync skcipher API to invoke the ecb(arc4) skcipher, of which only a single generic C code implementation exists. This means that going through all the trouble of using scatterlists etc buys us very little, and we're better off just invoking the arc4 library directly. This also reverts commit 5f4b55699aaf ("CIFS: Fix BUG() in calc_seckey()"), since it is no longer necessary to allocate sec_key on the heap. Cc: linux-cifs@vger.kernel.org Cc: Steve French Signed-off-by: Ard Biesheuvel Acked-by: Steve French Signed-off-by: Herbert Xu fs/cifs/Kconfig | 2 +- fs/cifs/cifsencrypt.c | 62 +++++++++++++-------------------------------------- fs/cifs/cifsfs.c | 1 - 3 files changed, 17 insertions(+), 48 deletions(-) commit 0e5a610b5ca52ca4fa0705c87114310a95cfbe34 Author: Ard Biesheuvel Date: Wed Jun 12 18:19:58 2019 +0200 ppp: mppe: switch to RC4 library interface The MPPE code uses the sync skcipher to invoke the ecb(arc4) skcipher, of which only a single generic C code implementation exists. This means that going through all the trouble of using scatterlists etc buys us very little, and we're better off just invoking the arc4 library directly. Note that the SHA1 shash used by this driver has several accelerated implementations for various architectures, so retaining that part does make sense. Cc: linux-ppp@vger.kernel.org Cc: Paul Mackerras Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu drivers/net/ppp/Kconfig | 3 +- drivers/net/ppp/ppp_mppe.c | 97 +++++++--------------------------------------- 2 files changed, 15 insertions(+), 85 deletions(-) commit 611a23c2d3961d2ec72f42582ee88755f9a03cee Author: Ard Biesheuvel Date: Wed Jun 12 18:19:57 2019 +0200 crypto: arc4 - remove cipher implementation There are no remaining users of the cipher implementation, and there are no meaningful ways in which the arc4 cipher can be combined with templates other than ECB (and the way we do provide that combination is highly dubious to begin with). So let's drop the arc4 cipher altogether, and only keep the ecb(arc4) skcipher, which is used in various places in the kernel. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu crypto/arc4.c | 65 +++++++++++++------------------------------------------- crypto/testmgr.c | 1 + 2 files changed, 16 insertions(+), 50 deletions(-) commit 4be297016cd3a6aedbcc3b053da16cdd42546f04 Author: Ard Biesheuvel Date: Wed Jun 12 18:19:56 2019 +0200 net/lib80211: move TKIP handling to ARC4 library code The crypto API abstraction is not very useful for invoking ciphers directly, especially in the case of arc4, which only has a generic implementation in C. So let's invoke the library code directly. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu net/wireless/Kconfig | 1 + net/wireless/lib80211_crypt_tkip.c | 48 ++++++++++++++------------------------ 2 files changed, 18 insertions(+), 31 deletions(-) commit af1f3d327d49d9bb94d9c173023e6cbdc5453d38 Author: Ard Biesheuvel Date: Wed Jun 12 18:19:55 2019 +0200 net/lib80211: move WEP handling to ARC4 library code The crypto API abstraction is not very useful for invoking ciphers directly, especially in the case of arc4, which only has a generic implementation in C. So let's invoke the library code directly. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu net/wireless/Kconfig | 1 + net/wireless/lib80211_crypt_wep.c | 51 ++++++++++----------------------------- 2 files changed, 14 insertions(+), 38 deletions(-) commit 5fdb373570b2119abf00d909a277ebf4ea2c078f Author: Ard Biesheuvel Date: Wed Jun 12 18:19:54 2019 +0200 net/mac80211: move WEP handling to ARC4 library interface The WEP code in the mac80211 subsystem currently uses the crypto API to access the arc4 (RC4) cipher, which is overly complicated, and doesn't really have an upside in this particular case, since ciphers are always synchronous and therefore always implemented in software. Given that we have no accelerated software implementations either, it is much more straightforward to invoke a generic library interface directly. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu net/mac80211/Kconfig | 2 +- net/mac80211/cfg.c | 4 ++-- net/mac80211/ieee80211_i.h | 4 ++-- net/mac80211/key.h | 1 + net/mac80211/main.c | 6 ++---- net/mac80211/mlme.c | 3 ++- net/mac80211/tkip.c | 8 ++++---- net/mac80211/tkip.h | 4 ++-- net/mac80211/wep.c | 49 ++++++++++------------------------------------ net/mac80211/wep.h | 5 ++--- net/mac80211/wpa.c | 4 ++-- 11 files changed, 30 insertions(+), 60 deletions(-) commit dc51f25752bfcb5f1edbac1ca4ce16af7b3bd507 Author: Ard Biesheuvel Date: Wed Jun 12 18:19:53 2019 +0200 crypto: arc4 - refactor arc4 core code into separate library Refactor the core rc4 handling so we can move most users to a library interface, permitting us to drop the cipher interface entirely in a future patch. This is part of an effort to simplify the crypto API and improve its robustness against incorrect use. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu MAINTAINERS | 1 + crypto/Kconfig | 4 +++ crypto/arc4.c | 60 +---------------------------------------- include/crypto/arc4.h | 10 +++++++ lib/Makefile | 2 +- lib/crypto/Makefile | 4 +++ lib/crypto/arc4.c | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 95 insertions(+), 60 deletions(-) commit 192125ed5ce62afba24312d8e7a0314577565b4a Author: Christophe Leroy Date: Wed Jun 12 05:49:50 2019 +0000 crypto: talitos - fix max key size for sha384 and sha512 Below commit came with a typo in the CONFIG_ symbol, leading to a permanently reduced max key size regarless of the driver capabilities. Reported-by: Horia Geantă Fixes: b8fbdc2bc4e7 ("crypto: talitos - reduce max key size for SEC1") Signed-off-by: Christophe Leroy Reviewed-by: Horia Geantă Signed-off-by: Herbert Xu drivers/crypto/talitos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f651bd96b20127d1ebc449f01aaaa79277f0574b Author: Daniel Axtens Date: Tue Jun 11 11:54:31 2019 +1000 crypto: vmx - Document CTR mode counter width quirks The CTR code comes from OpenSSL, where it does a 32-bit counter. The kernel has a 128-bit counter. This difference has lead to issues. Document it. Signed-off-by: Daniel Axtens Signed-off-by: Herbert Xu drivers/crypto/vmx/aesp8-ppc.pl | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) commit 334d37c9e26364511f0673ef155e2ad207316e90 Author: Horia Geantă Date: Mon Jun 10 16:30:59 2019 +0300 crypto: caam - update IV using HW support Modify drivers to perform skcipher IV update using the crypto engine, instead of performing the operation in SW. Besides being more efficient, this also fixes IV update for CTR mode. Output HW S/G table is appended with an entry pointing to the same IV buffer used as input (which is now mapped BIDIRECTIONAL). AS (Algorithm State) parameter of the OPERATION command is changed from INIFINAL to INIT in descriptors used by ctr(aes), cbc(aes). This is needed since in case FINAL bit is set, HW skips IV updating in the Context Register for the last data block. Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu drivers/crypto/caam/caamalg.c | 88 +++++++++++++++++++--------------- drivers/crypto/caam/caamalg_desc.c | 31 +++++++++--- drivers/crypto/caam/caamalg_desc.h | 4 +- drivers/crypto/caam/caamalg_qi.c | 90 ++++++++++++++++------------------- drivers/crypto/caam/caamalg_qi2.c | 96 ++++++++++++++++++-------------------- 5 files changed, 163 insertions(+), 146 deletions(-) commit 059d73eea6409873446a858dd64a5bec9bf68b70 Author: Horia Geantă Date: Mon Jun 10 16:30:58 2019 +0300 crypto: caam - use len instead of nents for bulding HW S/G table Currently, conversion of SW S/G table into HW S/G layout relies on nents returned by sg_nents_for_len(sg, len). However this leaves the possibility of HW S/G referencing more data then needed: since buffer length in HW S/G entries is filled using sg_dma_len(sg), the last entry in HW S/G table might have a length that is bigger than needed for the crypto request. This way of S/G table conversion is fine, unless after converting a table more entries have to be appended to the HW S/G table. In this case, crypto engine would access data from the S/G entry having the incorrect length, instead of advancing in the S/G table. This situation doesn't exist, but the upcoming implementation of IV update for skcipher algorithms needs to add a S/G entry after req->dst S/G (corresponding to output IV). Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu drivers/crypto/caam/caamalg.c | 35 +++++++++++------------ drivers/crypto/caam/caamalg_qi.c | 36 +++++++++++------------ drivers/crypto/caam/caamalg_qi2.c | 60 +++++++++++++++++++-------------------- drivers/crypto/caam/caamhash.c | 15 +++++----- drivers/crypto/caam/caampkc.c | 4 +-- drivers/crypto/caam/sg_sw_qm.h | 18 +++++++----- drivers/crypto/caam/sg_sw_qm2.h | 18 +++++++----- drivers/crypto/caam/sg_sw_sec4.h | 18 +++++++----- 8 files changed, 105 insertions(+), 99 deletions(-) commit 1fa6d053b2a53b1979fc12000be41646be379503 Author: Florian Fainelli Date: Fri May 10 10:31:11 2019 -0700 hwrng: iproc-rng200 - Add support for 7211 BCM7211 features a RNG200 hardware random number generator block, add support for this chip by matching the chip-specific compatible string. Signed-off-by: Florian Fainelli Signed-off-by: Herbert Xu drivers/char/hw_random/iproc-rng200.c | 1 + 1 file changed, 1 insertion(+) commit 6223949a1531f31f4191a40257e6cb37af1af75f Author: Florian Fainelli Date: Fri May 10 10:31:10 2019 -0700 dt-bindings: rng: Document BCM7211 RNG compatible string BCM7211 features a RNG200 block, document its compatible string. Signed-off-by: Florian Fainelli Reviewed-by: Rob Herring Signed-off-by: Herbert Xu Documentation/devicetree/bindings/rng/brcm,iproc-rng200.txt | 1 + 1 file changed, 1 insertion(+) commit bdb275bb6486d19888cb669fedd7d3eea2031669 Merge: b0d765219fb3 7829a0c1cb9c Author: Herbert Xu Date: Thu Jun 20 14:17:24 2019 +0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Merge crypto tree to pick up vmx changes. commit 055ecea0aa6e619aff3b2a523f25aa9837682a8f Author: Wei Yongjun Date: Wed Jun 19 13:53:18 2019 -0600 coresight: replicator: Add terminate entry for acpi_device_id tables Make sure acpi_device_id tables have terminate entry. Fixes: 115b1aa23307 ("coresight: acpi: Support for platform devices") Signed-off-by: Wei Yongjun Reviewed-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-replicator.c | 1 + 1 file changed, 1 insertion(+) commit 745cfc56517f0aa9c13ceb4f99c12475779a8a8e Author: Arnd Bergmann Date: Wed Jun 19 13:53:17 2019 -0600 coresight: platform: add OF/APCI dependency When neither CONFIG_OF nor CONFIG_ACPI are set, we get a harmless build warning: drivers/hwtracing/coresight/coresight-platform.c:26:12: error: unused function 'coresight_alloc_conns' [-Werror,-Wunused-function] static int coresight_alloc_conns(struct device *dev, ^ drivers/hwtracing/coresight/coresight-platform.c:46:1: error: unused function 'coresight_find_device_by_fwnode' [-Werror,-Wunused-function] coresight_find_device_by_fwnode(struct fwnode_handle *fwnode) As the code is useless in that configuration anyway, just add a Kconfig dependency that only allows building when at least one of the two is set. This should not hinder compile-testing, as CONFIG_OF can be enabled on any architecture. Fixes: 20961aea982e ("coresight: platform: Use fwnode handle for device search") Signed-off-by: Arnd Bergmann Reviewed-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 40a1c5b31969eb9b6fa9102f2c460b2e0104e85d Author: Suzuki K Poulose Date: Wed Jun 19 13:53:09 2019 -0600 coresight: Add dummy definition for of_coresight_get_cpu() For !CONFIG_OF case, add a dummy definition for the of_coresight_get_cpu(). Reported-by: Mike Leach Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-platform.c | 5 +++++ 1 file changed, 5 insertions(+) commit 115b1aa23307b212db72fd90311e8649d56cda0d Author: Suzuki K Poulose Date: Wed Jun 19 13:53:08 2019 -0600 coresight: acpi: Support for platform devices Add support for platform devices which do not appear on the AMBA bus. Cc: "Rafael J. Wysocki" Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-replicator.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 1c20a213da6c0ae6bea6e30a2cb14635e7bf7148 Author: Suzuki K Poulose Date: Wed Jun 19 13:53:07 2019 -0600 coresight: acpi: Support for AMBA components All AMBA devices are handled via ACPI AMBA scan notifier infrastructure. The platform devices get the ACPI id added to their driver. Cc: "Rafael J. Wysocki" Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/acpi/acpi_amba.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 76ffa5ab5b79c250b9744b7f8bdd835db426a1ae Author: Suzuki K Poulose Date: Wed Jun 19 13:53:06 2019 -0600 coresight: Support for ACPI bindings Add support for parsing the ACPI platform description for CoreSight. The connections are encoded in a DSD graph property with CoreSight specific variation of the property. The ETMs are listed as the children device of the respective CPU. Cc: "Rafael J. Wysocki" Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-platform.c | 464 +++++++++++++++++++++++ 1 file changed, 464 insertions(+) commit 68c0dacb88fbf6cd818cc87ee07fde8022afa89d Author: Suzuki K Poulose Date: Wed Jun 19 13:53:05 2019 -0600 coresight: stm: ACPI support for parsing stimulus base The stimulus base for STM device must be listed as the second memory resource, followed by the programming base address as described in "Section 2.3 Resources" in ACPI for CoreSightTM 1.0 Platform Design documen (DEN0067). Add support for parsing the information for ACPI. Cc: "Rafael J. Wysocki" Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-stm.c | 53 ++++++++++++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) commit 0f5f9b6ba9e1a706f5a3b1bd467e9242ab31b352 Author: Suzuki K Poulose Date: Wed Jun 19 13:53:04 2019 -0600 coresight: Use platform agnostic names So far we have reused the name of the "platform" device for the CoreSight device. But this is not very intuitive when we move to ACPI. Also, the ACPI device names have ":" in them (e.g, ARMHC97C:01), which the perf tool doesn't like very much. This patch introduces a generic naming scheme, givin more intuitive names for the devices that appear on the CoreSight bus. The names follow the pattern "prefix" followed by "index" (e.g, etm5). We maintain a list of allocated devices per "prefix" to make sure we don't allocate a new name when it is reprobed (e.g, due to unsatisifed device dependencies). So, we maintain the list of "fwnodes" of the parent devices to allocate a consistent name. All devices except the ETMs get an index allocated in the order of probing. ETMs get an index based on the CPU they are attached to. TMC devices are named using "tmc_etf", "tmc_etb", and "tmc_etr" prefixes depending on the configuration of the device. The replicators and funnels are not classified as dynamic/static anymore. One could easily figure that out by checking the presence of "mgmt" registers under sysfs. Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-catu.c | 7 ++- drivers/hwtracing/coresight/coresight-etb10.c | 7 ++- drivers/hwtracing/coresight/coresight-etm3x.c | 4 +- drivers/hwtracing/coresight/coresight-etm4x.c | 4 +- drivers/hwtracing/coresight/coresight-funnel.c | 7 ++- drivers/hwtracing/coresight/coresight-replicator.c | 7 ++- drivers/hwtracing/coresight/coresight-stm.c | 12 +++-- drivers/hwtracing/coresight/coresight-tmc.c | 15 +++++- drivers/hwtracing/coresight/coresight-tpiu.c | 7 ++- drivers/hwtracing/coresight/coresight.c | 58 ++++++++++++++++++++++ include/linux/coresight.h | 25 +++++++++- 11 files changed, 141 insertions(+), 12 deletions(-) commit 37ea1ffddffa63c920ce826786fe610c78f57842 Author: Suzuki K Poulose Date: Wed Jun 19 13:53:03 2019 -0600 coresight: Use fwnode handle instead of device names We rely on the device names to find a CoreSight device on the coresight bus. The device name however is obtained from the platform, which is bound to the real platform/amba device. As we are about to use different naming scheme for the coresight devices, we can't rely on the platform device name to find the corresponding coresight device. Instead we use the platform agnostic "fwnode handle" of the parent device to find the devices. We also reuse the same fwnode as the parent for the Coresight device we create. Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-platform.c | 14 +++++--- drivers/hwtracing/coresight/coresight-priv.h | 6 ++-- drivers/hwtracing/coresight/coresight.c | 42 +++++++++++++++++++----- include/linux/coresight.h | 4 +-- 4 files changed, 49 insertions(+), 17 deletions(-) commit 20961aea982e839fa64cd08a616847aea14a185f Author: Suzuki K Poulose Date: Wed Jun 19 13:53:02 2019 -0600 coresight: platform: Use fwnode handle for device search We match of_node while searching for a device. Make this more generic in preparation for the ACPI support by using fwnode_handle. Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-platform.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 688da45f20fec12cf94a5a0f3f9babe8125d0732 Author: Suzuki K Poulose Date: Wed Jun 19 13:53:01 2019 -0600 coresight: Add support for releasing platform specific data Add a helper to clean up the platform specific data provided by the firmware. This will be later used for dropping the necessary references when we switch to the fwnode handles for tracking connections. Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-platform.c | 6 +++++- drivers/hwtracing/coresight/coresight-priv.h | 4 ++++ drivers/hwtracing/coresight/coresight.c | 3 +++ 3 files changed, 12 insertions(+), 1 deletion(-) commit af7cfd0f80d7cfbafd0ef85b0359b6ca95ead8c5 Author: Suzuki K Poulose Date: Wed Jun 19 13:53:00 2019 -0600 coresight: Rearrange platform data probing We are about to introduce methods to clean up the platform data as we switch to tracking the device reference from "name" to "fwnode handles" for device connections. This requires us to drop the fwnode handle references when the data is no longer required - i.e, when the device probe fails or the device gets unregistered. In order to consolidate the invocation of the cleanup, we delay the platform probing to the very last minute, possibly before invoking the coresight_register. Then, we leave the coresight core code to do the clean up. i.e, if the coresight_register fails, it takes care of freeing the data. Otherwise, coresight_unregister will do the necessary operations. Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-catu.c | 14 +++++++------- drivers/hwtracing/coresight/coresight-etb10.c | 10 +++++----- drivers/hwtracing/coresight/coresight-etm3x.c | 12 +++++++----- drivers/hwtracing/coresight/coresight-etm4x.c | 12 +++++++----- drivers/hwtracing/coresight/coresight-funnel.c | 12 +++++++----- drivers/hwtracing/coresight/coresight-replicator.c | 12 +++++++----- drivers/hwtracing/coresight/coresight-stm.c | 11 +++++++---- drivers/hwtracing/coresight/coresight-tmc.c | 16 ++++++++-------- drivers/hwtracing/coresight/coresight-tpiu.c | 10 +++++----- 9 files changed, 60 insertions(+), 49 deletions(-) commit b77e3ed038c0d877f6f3b6ad278b931048a48e34 Author: Suzuki K Poulose Date: Wed Jun 19 13:52:59 2019 -0600 coresight: Reuse platform data structure for connection tracking The platform specific information describes the connections and the ports of a given coresigh device. This information is also recorded in the coresight device as separate fields. Let us reuse the original platform description to streamline the handling of the data. Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-tmc-etr.c | 4 +-- drivers/hwtracing/coresight/coresight.c | 46 ++++++++++++------------- include/linux/coresight.h | 8 ++--- 3 files changed, 27 insertions(+), 31 deletions(-) commit d2998dc1f9b14d19f886d8f75ca47c5806635902 Author: Suzuki K Poulose Date: Wed Jun 19 13:52:58 2019 -0600 coresight: Cleanup coresight_remove_conns When a device is unregistered, we remove all connection references to it, by searching the connection records of all devices in the coresight bus, via coresight_remove_conns. We could avoid searching if this device doesn't have an input port (e.g, a source). Also document the purpose of the function. Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 2ede79a6e8a541d1bc7c033b1198f05088e7cefb Author: Suzuki K Poulose Date: Wed Jun 19 13:52:57 2019 -0600 coresight: Remove name from platform description We are about to use a name independent of the parent AMBA device name. As such, there is no need to have it in the platform description. Let us move this to coresight description instead. Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-catu.c | 2 ++ drivers/hwtracing/coresight/coresight-etb10.c | 3 ++- drivers/hwtracing/coresight/coresight-etm3x.c | 1 + drivers/hwtracing/coresight/coresight-etm4x.c | 1 + drivers/hwtracing/coresight/coresight-funnel.c | 1 + drivers/hwtracing/coresight/coresight-platform.c | 3 --- drivers/hwtracing/coresight/coresight-replicator.c | 2 ++ drivers/hwtracing/coresight/coresight-stm.c | 1 + drivers/hwtracing/coresight/coresight-tmc.c | 5 +++-- drivers/hwtracing/coresight/coresight-tpiu.c | 1 + drivers/hwtracing/coresight/coresight.c | 2 +- include/linux/coresight.h | 8 ++++---- 12 files changed, 19 insertions(+), 11 deletions(-) commit aff70a45fe3120b08ae459a6e3996346d2766b1f Author: Suzuki K Poulose Date: Wed Jun 19 13:52:56 2019 -0600 coresight: Remove cpu field from platform data CPU field is only used by ETMs and there is a separate API for fetching the same. So, let us use that instead of using the common platform probing helper. Also, remove it from the platform_data. Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-etm3x.c | 2 +- drivers/hwtracing/coresight/coresight-etm4x.c | 2 +- drivers/hwtracing/coresight/coresight-platform.c | 1 - include/linux/coresight.h | 2 -- 4 files changed, 2 insertions(+), 5 deletions(-) commit 91824db2ea2d2bacacd54de55a7faba10c63b166 Author: Suzuki K Poulose Date: Wed Jun 19 13:52:55 2019 -0600 coresight: Make device to CPU mapping generic The CoreSight components ETM and CPU-Debug are always associated with CPUs. Replace the of_coresight_get_cpu() with a platform agnostic helper, in preparation to add ACPI support. Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-cpu-debug.c | 3 +-- drivers/hwtracing/coresight/coresight-platform.c | 18 +++++++++++++----- include/linux/coresight.h | 7 +------ 3 files changed, 15 insertions(+), 13 deletions(-) commit f03631da4be33219021323630a8cf788fd066267 Author: Suzuki K Poulose Date: Wed Jun 19 13:52:54 2019 -0600 coresight: Introduce generic platform data helper So far we have hard coded the DT platform parsing code in every driver. Introduce generic helper to parse the information provided by the firmware in a platform agnostic manner, in preparation for the ACPI support. Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-catu.c | 13 ++--- drivers/hwtracing/coresight/coresight-etb10.c | 11 ++-- drivers/hwtracing/coresight/coresight-etm3x.c | 12 ++--- drivers/hwtracing/coresight/coresight-etm4x.c | 11 ++-- drivers/hwtracing/coresight/coresight-funnel.c | 11 ++-- drivers/hwtracing/coresight/coresight-platform.c | 58 ++++++++++++++++------ drivers/hwtracing/coresight/coresight-replicator.c | 11 ++-- drivers/hwtracing/coresight/coresight-stm.c | 11 ++-- drivers/hwtracing/coresight/coresight-tmc.c | 13 ++--- drivers/hwtracing/coresight/coresight-tpiu.c | 11 ++-- include/linux/coresight.h | 7 +-- 11 files changed, 83 insertions(+), 86 deletions(-) commit a15dab756b0f4687a7c3e9e54767f58fbc63c603 Author: Suzuki K Poulose Date: Wed Jun 19 13:52:53 2019 -0600 coresight: Make sure device uses DT for obsolete compatible check As we prepare to add support for ACPI bindings, let us make sure we do the compatible check only if we are sure we are dealing with a DT based system. Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-funnel.c | 3 ++- drivers/hwtracing/coresight/coresight-replicator.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 88a1607cbed371fa9853b0ebbbaadf9cd6f27ea3 Author: Suzuki K Poulose Date: Wed Jun 19 13:52:52 2019 -0600 coresight: platform: Make memory allocation helper generic Rename the of_coresight_alloc_memory() => coresight_alloc_conns() as it is independent of the underlying firmware type. This is in preparation for the ACPI support. Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-platform.c | 34 +++++++++++++----------- 1 file changed, 19 insertions(+), 15 deletions(-) commit 22aa495a64770f39b0c29d7bda9b777d487e79bd Author: Suzuki K Poulose Date: Wed Jun 19 13:52:51 2019 -0600 coresight: Rename of_coresight to coresight-platform Rename the firmware handling file to a more generic name, in preparation for adding ACPI support. Right now we only support DT and we have all the platform handling code in of_coresight.c. Let us rename the file to coresight-platform.c in order to keep the platform handling in a single place for DT and the upcoming ACPI support. Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/Makefile | 3 +-- drivers/hwtracing/coresight/{of_coresight.c => coresight-platform.c} | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) commit 37e444c8296c14cb5768a1197b24cfc07ee8e0cd Author: Daniel M German Date: Wed Jun 19 21:50:38 2019 -0700 usb: Replace snprintf with scnprintf in gether_get_ifname snprintf returns the actual length of the buffer created; however, this is not the case if snprintf truncates its parameter. See https://lwn.net/Articles/69419/ for a detailed explanation. The current code correctly handles this case at the expense of extra code in the return statement. scnprintf does returns the actual length of the buffer created making the ?: operator unnecessary in the return statement. This change does not alter the functionality of the code. Signed-off-by: Daniel M German Signed-off-by: Felipe Balbi drivers/usb/gadget/function/u_ether.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit df5be5be8735ef2ae80d5ae1f2453cd81a035c4b Author: Alexey Kardashevskiy Date: Wed Jun 5 13:38:14 2019 +1000 powerpc/pci/of: Fix OF flags parsing for 64bit BARs When the firmware does PCI BAR resource allocation, it passes the assigned addresses and flags (prefetch/64bit/...) via the "reg" property of a PCI device device tree node so the kernel does not need to do resource allocation. The flags are stored in resource::flags - the lower byte stores PCI_BASE_ADDRESS_SPACE/etc bits and the other bytes are IORESOURCE_IO/etc. Some flags from PCI_BASE_ADDRESS_xxx and IORESOURCE_xxx are duplicated, such as PCI_BASE_ADDRESS_MEM_PREFETCH/PCI_BASE_ADDRESS_MEM_TYPE_64/etc. When parsing the "reg" property, we copy the prefetch flag but we skip on PCI_BASE_ADDRESS_MEM_TYPE_64 which leaves the flags out of sync. The missing IORESOURCE_MEM_64 flag comes into play under 2 conditions: 1. we remove PCI_PROBE_ONLY for pseries (by hacking pSeries_setup_arch() or by passing "/chosen/linux,pci-probe-only"); 2. we request resource alignment (by passing pci=resource_alignment= via the kernel cmd line to request PAGE_SIZE alignment or defining ppc_md.pcibios_default_alignment which returns anything but 0). Note that the alignment requests are ignored if PCI_PROBE_ONLY is enabled. With 1) and 2), the generic PCI code in the kernel unconditionally decides to: - reassign the BARs in pci_specified_resource_alignment() (works fine) - write new BARs to the device - this fails for 64bit BARs as the generic code looks at IORESOURCE_MEM_64 (not set) and writes only lower 32bits of the BAR and leaves the upper 32bit unmodified which breaks BAR mapping in the hypervisor. This fixes the issue by copying the flag. This is useful if we want to enforce certain BAR alignment per platform as handling subpage sized BARs is proven to cause problems with hotplug (SLOF already aligns BARs to 64k). Signed-off-by: Alexey Kardashevskiy Reviewed-by: Sam Bobroff Reviewed-by: Oliver O'Halloran Reviewed-by: Shawn Anastasio Signed-off-by: Michael Ellerman arch/powerpc/kernel/pci_of_scan.c | 2 ++ 1 file changed, 2 insertions(+) commit 2410fd450c09a126aefefc9106b4652285b5d60f Author: Jorge Ramirez-Ortiz Date: Wed Jun 19 20:16:53 2019 +0200 arm64: dts: qcom: qcs404-evb: fix vdd_apc supply The invalid definition in the supply causes the Qualcomm's EVB-1000 and EVB-4000 not to boot. Fix the boot issue by correctly defining the supply: vdd_s3 (namely "vdd_apc") is actually connected to vph_pwr. Reported-by: Niklas Cassel Tested-by: Jorge Ramirez-Ortiz Signed-off-by: Jorge Ramirez-Ortiz Reviewed-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/qcs404-evb.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c708b1c6de7f996b073bb3296af17f37881a09de Author: Colin Ian King Date: Thu Jun 20 00:10:10 2019 -0400 ext4: remove redundant assignment to node Pointer 'node' is assigned a value that is never read, node is later overwritten when it re-assigned a different value inside the while-loop. The assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara fs/ext4/extents_status.c | 1 - 1 file changed, 1 deletion(-) commit dca73a65a68329ee386d3ff473152bac66eaab39 Merge: 497ad9f5b2dc 94079b64255f Author: David S. Miller Date: Thu Jun 20 00:06:27 2019 -0400 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Alexei Starovoitov says: ==================== pull-request: bpf-next 2019-06-19 The following pull-request contains BPF updates for your *net-next* tree. The main changes are: 1) new SO_REUSEPORT_DETACH_BPF setsocktopt, from Martin. 2) BTF based map definition, from Andrii. 3) support bpf_map_lookup_elem for xskmap, from Jonathan. 4) bounded loops and scalar precision logic in the verifier, from Alexei. ==================== Signed-off-by: David S. Miller commit 3ae72562ad917df36a1b1247d749240e3b4865db Author: Gabriel Krisman Bertazi Date: Wed Jun 19 23:45:09 2019 -0400 ext4: optimize case-insensitive lookups Temporarily cache a casefolded version of the file name under lookup in ext4_filename, to avoid repeatedly casefolding it. I got up to 30% speedup on lookups of large directories (>100k entries), depending on the length of the string under lookup. Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Theodore Ts'o fs/ext4/dir.c | 2 +- fs/ext4/ext4.h | 39 ++++++++++++++++++++++++++++++++++++--- fs/ext4/namei.c | 43 ++++++++++++++++++++++++++++++++++++++----- fs/unicode/utf8-core.c | 28 ++++++++++++++++++++++++++++ include/linux/unicode.h | 3 +++ 5 files changed, 106 insertions(+), 9 deletions(-) commit b03755ad6f33b7b8cd7312a3596a2dbf496de6e7 Author: zhangjs Date: Wed Jun 19 23:41:29 2019 -0400 ext4: make __ext4_get_inode_loc plug Add a blk_plug to prevent the inode table readahead from being submitted as small I/O requests. Signed-off-by: zhangjs Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara fs/ext4/inode.c | 3 +++ 1 file changed, 3 insertions(+) commit 50b617a61874a136d9c4fd75e9cccc7e2f9a03c8 Author: Martin Blumenstingl Date: Sat Jun 15 12:43:51 2019 +0200 arm64: dts: meson: g12a: x96-max: add the Ethernet PHY interrupt line X96 Max has the PHY reset and interrupt lines are identical to the Odroid-N2: - GPIOZ_14 is the interrupt on X96 Max - GPIOZ_15 is the reset line on X96 Max Add GPIOZ_14 as PHY interrupt line on the X96 Max so we don't have to poll for the PHY status. Suggested-by: Neil Armstrong Acked-by: Neil Armstrong Tested-by: Neil Armstrong Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 98ba71c94eaff1c3af6170bce9fe63c93dd32f2f Author: Martin Blumenstingl Date: Sat Jun 15 12:43:50 2019 +0200 arm64: dts: meson: g12b: odroid-n2: add the Ethernet PHY interrupt line The interrupt line of the RTL8211F PHY is routed to the GPIOZ_14 pad. Describe this in the device tree so the PHY framework doesn't have to poll the PHY status. Acked-by: Neil Armstrong Tested-by: Neil Armstrong Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 658e4129bb81b2a3b8c84d8f712174481e04be72 Author: Martin Blumenstingl Date: Sat Jun 15 12:38:32 2019 +0200 arm64: dts: meson: g12b: odroid-n2: add the Ethernet PHY reset line The reset line of the RTL8211F PHY is routed to the GPIOZ_15 pad. Describe this in the device tree so the PHY framework can bring the PHY into a known state when initializing it. GPIOZ_15 doesn't support driving the output HIGH (to take the PHY out of reset, only output LOW to reset the PHY is supported). The datasheet states it's an "3.3V input tolerant open drain (OD) output pin". Instead there's a pull-up resistor on the board to take the PHY out of reset. The GPIO itself will be set to INPUT mode to take the PHY out of reset and LOW to reset the PHY, which is achieved with the flags (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN). Acked-by: Neil Armstrong Tested-by: Neil Armstrong Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts | 4 ++++ 1 file changed, 4 insertions(+) commit f29cabf240ed6e67993f17594e5e6fffc5bc07e0 Author: Martin Blumenstingl Date: Sat Jun 15 12:38:31 2019 +0200 arm64: dts: meson: use the generic Ethernet PHY reset GPIO bindings The snps,reset-gpio bindings are deprecated in favour of the generic "Ethernet PHY reset" bindings. Replace snps,reset-gpio from the ðmac node with reset-gpios in the ethernet-phy node. The old snps,reset-active-low property is now encoded directly as GPIO flag inside the reset-gpios property. snps,reset-delays-us is converted to reset-assert-us and reset-deassert-us. reset-assert-us is the second cell from snps,reset-delays-us while reset-deassert-us was the third cell. Instead of blindly copying the old values (which seems strange since they gave the PHY one second to come out of reset) over this also updates the delays based on the datasheets: - the Realtek RTL8211F PHY needs a 10ms assert delay (the datasheet mentions: "For a complete PHY reset, this pin must be asserted low for at least 10ms") and a 30ms deassert delay (the datasheet mentions: "Wait for a further 30ms (for internal circuits settling time) before accessing the PHY register". This applies to the following boards: GXBB NanoPi K2, GXBB Odroid-C2, GXBB Vega S95 variants, GXBB Wetek variants, GXL P230, GXM Khadas VIM2, GXM Nexbox A1, GXM Q200, GXM RBox Pro boards. - the ICPlus IP101GR PHY needs a 10ms assert delay (the datasheet mentions: "Trst | Reset period | 10ms") and a deassert delay of 10ms as well (the datasheet mentions: "Tclk_MII_rdy | MII/RMII clock output ready after reset released | 10ms"). This applies to the GXBB Nexbox A95X board. - the Micrel KSZ9031 seems to require a 100us delay but use the same (seemingly safe) values from RTL8211F due to lack of a board to verify this. This applies to the GXBB P200 board. The GXBB P201 board is left out from this conversion because it doesn't have a dedicated PHY node (because it's not clear which PHY is used on that board). Reviewed-by: Neil Armstrong Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts | 9 +++++---- arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts | 8 ++++---- arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 9 +++++---- arch/arm64/boot/dts/amlogic/meson-gxbb-p200.dts | 9 +++++---- arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi | 9 +++++---- arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi | 8 ++++---- arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dts | 11 ++++++----- arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 10 +++++----- arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts | 8 ++++---- arch/arm64/boot/dts/amlogic/meson-gxm-q200.dts | 11 ++++++----- arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts | 8 ++++---- 11 files changed, 53 insertions(+), 47 deletions(-) commit ed5e8f6891548fefe26cf883d5b037aab5c105b4 Author: Martin Blumenstingl Date: Sat Jun 15 12:38:29 2019 +0200 arm64: dts: meson: g12a: x96-max: fix the Ethernet PHY reset line The Odroid-N2 schematics show that the following pins are used for the reset and interrupt lines: - GPIOZ_14 is the PHY interrupt line - GPIOZ_15 is the PHY reset line The GPIOZ_14 and GPIOZ_15 pins are special. The datasheet describes that they are "3.3V input tolerant open drain (OD) output pins". This means the GPIO controller can drive the output LOW to reset the PHY. To release the reset it can only switch the pin to input mode. The output cannot be driven HIGH for these pins. This requires configuring the reset line as GPIO_OPEN_DRAIN because otherwise the PHY will be stuck in "reset" state (because driving the pin HIGH seems to result in the same signal as driving it LOW). The reset line works together with a pull-up resistor (R143 in the Odroid-N2 schematics). The SoC can drive GPIOZ_14 LOW to assert the PHY reset. However, since the SoC can't drive the pin HIGH (to release the reset) we switch the mode to INPUT and let the pull-up resistor take care of driving the reset line HIGH. Switch to GPIOZ_15 for the PHY reset line instead of using GPIOZ_14 (which actually is the interrupt line). Move from the "snps" specific resets to the MDIO framework's reset-gpios because only the latter honors the GPIO flags. Use the GPIO flags (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN) to match with the pull-up resistor because this will: - drive the output LOW to reset the PHY (= active low) - switch the pin to INPUT mode so the pull-up will take the PHY out of reset Fixes: 51d116557b2044 ("arm64: dts: meson-g12a-x96-max: Add Gigabit Ethernet Support") Reviewed-by: Neil Armstrong Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 9a3f37143f669b45c4a96ac9a37caec038fcb2f3 Author: Jerome Brunet Date: Mon Jun 10 14:49:31 2019 +0200 arm64: dts: meson: g12a: sort sdio nodes correctly Fix sdio node order in the soc device tree Fixes: a1737347250e ("arm64: dts: meson: g12a: add SDIO controller") Signed-off-by: Jerome Brunet Reviewed-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 73 ++++++++++++++--------------- 1 file changed, 36 insertions(+), 37 deletions(-) commit 497ad9f5b2dc86b733761b9afa44ecfa2f17be65 Author: Jesper Dangaard Brouer Date: Thu Jun 20 00:15:52 2019 +0200 page_pool: fix compile warning when CONFIG_PAGE_POOL is disabled Kbuild test robot reported compile warning: warning: no return statement in function returning non-void in function page_pool_request_shutdown, when CONFIG_PAGE_POOL is disabled. The fix makes the code a little more verbose, with a descriptive variable. Fixes: 99c07c43c4ea ("xdp: tracking page_pool resources and safe removal") Signed-off-by: Jesper Dangaard Brouer Reported-by: kbuild test robot Signed-off-by: David S. Miller include/net/page_pool.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 19453ce0bcfbdf7332a104eebf5d835977af7284 Author: Matthew Garrett Date: Wed Jun 19 15:46:11 2019 -0700 IMA: support for per policy rule template formats Admins may wish to log different measurements using different IMA templates. Add support for overriding the default template on a per-rule basis. Inspired-by: Roberto Sassu Signed-off-by: Matthew Garrett Signed-off-by: Mimi Zohar Documentation/ABI/testing/ima_policy | 5 +++-- security/integrity/ima/ima.h | 16 +++++++++++---- security/integrity/ima/ima_api.c | 24 +++++++++++++++------- security/integrity/ima/ima_appraise.c | 2 +- security/integrity/ima/ima_init.c | 2 +- security/integrity/ima/ima_main.c | 9 +++++---- security/integrity/ima/ima_policy.c | 38 +++++++++++++++++++++++++++++++++-- security/integrity/ima/ima_template.c | 12 ++++------- 8 files changed, 79 insertions(+), 29 deletions(-) commit 696de2e9ccec812eae8c85bd24c75bcb12104750 Author: Doug Ledford Date: Wed Jun 19 09:20:49 2019 -0400 RDMA/netlink: Resort policy array Sort the netlink policy array by netlink attribute name. This will make it easier in the future to find the entry you are looking for when you need to make changes, or to make sure you don't add the same entry twice. Fix the whitespace while we are there. Reviewed-by: Jason Gunthorpe Signed-off-by: Doug Ledford drivers/infiniband/core/nldev.c | 153 ++++++++++++++++++++-------------------- 1 file changed, 78 insertions(+), 75 deletions(-) commit 84ce4d0f9f55b4f4ca4d4edcbb54a23d9dad1aae Author: Martin Blumenstingl Date: Tue Jun 18 22:39:27 2019 +0200 net: stmmac: initialize the reset delay array Commit ce4ab73ab0c27c ("net: stmmac: drop the reset delays from struct stmmac_mdio_bus_data") moved the reset delay array from struct stmmac_mdio_bus_data to a stack variable. The values from the array inside struct stmmac_mdio_bus_data were previously initialized to 0 because the struct was allocated using devm_kzalloc(). The array on the stack has to be initialized explicitly, else we might be reading garbage values. Initialize all reset delays to 0 to ensure that the values are 0 if the "snps,reset-delays-us" property is not defined. This fixes booting at least two boards (MIPS pistachio marduk and ARM sun8i H2+ Orange Pi Zero). These are hanging during boot when initializing the stmmac Ethernet controller (as found by Kernel CI). Both have in common that they don't define the "snps,reset-delays-us" property. Fixes: ce4ab73ab0c27c ("net: stmmac: drop the reset delays from struct stmmac_mdio_bus_data") Signed-off-by: Martin Blumenstingl Reported-by: "kernelci.org bot" Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 22f1a38a547b5ce5e73b0a77339cbf23f70dee5d Author: Willem de Bruijn Date: Tue Jun 18 16:03:04 2019 -0400 selftests/net: make udpgso_bench skip unsupported testcases Kselftest can be run against older kernels. Instead of failing hard when a feature is unsupported, return the KSFT_SKIP exit code. Specifically, do not fail hard on missing udp zerocopy. The udp gso bench test runs multiple test cases from a single script. Fail if any case fails, else return skip if any test is skipped. Link: https://lore.kernel.org/lkml/20190618171516.GA17547@kroah.com/ Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller tools/testing/selftests/net/udpgso_bench.sh | 75 +++++++++++++++------------ tools/testing/selftests/net/udpgso_bench_tx.c | 18 ++++++- 2 files changed, 59 insertions(+), 34 deletions(-) commit 25cec756891e8733433efea63b2254ddc93aa5cc Author: Matthias Kaehlcke Date: Tue Jun 18 14:14:40 2019 -0700 net/ipv4: fib_trie: Avoid cryptic ternary expressions empty_child_inc/dec() use the ternary operator for conditional operations. The conditions involve the post/pre in/decrement operator and the operation is only performed when the condition is *not* true. This is hard to parse for humans, use a regular 'if' construct instead and perform the in/decrement separately. This also fixes two warnings that are emitted about the value of the ternary expression being unused, when building the kernel with clang + "kbuild: Remove unnecessary -Wno-unused-value" (https://lore.kernel.org/patchwork/patch/1089869/): CC net/ipv4/fib_trie.o net/ipv4/fib_trie.c:351:2: error: expression result unused [-Werror,-Wunused-value] ++tn_info(n)->empty_children ? : ++tn_info(n)->full_children; Fixes: 95f60ea3e99a ("fib_trie: Add collapse() and should_collapse() to resize") Signed-off-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Reviewed-by: Nick Desaulniers Acked-by: Alexander Duyck Signed-off-by: David S. Miller net/ipv4/fib_trie.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 16e5a266f51639492ac30761d043525d7d43f4c8 Author: Kevin Darbyshire-Bryant Date: Wed Jun 19 18:41:10 2019 +0100 net: sched: act_ctinfo: tidy UAPI definition Remove some enums from the UAPI definition that were only used internally and are NOT part of the UAPI. Signed-off-by: Kevin Darbyshire-Bryant Signed-off-by: David S. Miller include/net/tc_act/tc_ctinfo.h | 5 +++++ include/uapi/linux/tc_act/tc_ctinfo.h | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) commit c60990b361cc0a08e7b442a8191d89e9304c2d62 Author: Theodore Ts'o Date: Wed Jun 19 16:30:03 2019 -0400 ext4: clean up kerneldoc warnigns when building with W=1 Signed-off-by: Theodore Ts'o fs/ext4/balloc.c | 4 ++-- fs/ext4/dir.c | 3 +++ fs/ext4/extents.c | 4 ++-- fs/ext4/indirect.c | 22 ++++++++-------------- fs/ext4/mballoc.c | 5 +++-- fs/ext4/move_extent.c | 12 ++++++------ 6 files changed, 24 insertions(+), 26 deletions(-) commit 01a090c746697436aef0873c6f33ede44c517aec Author: Nathan Chancellor Date: Wed Jun 19 12:17:23 2019 -0700 drm/msm/dsi: Add parentheses to quirks check in dsi_phy_hw_v3_0_lane_settings Clang warns: drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c:80:6: warning: logical not is only applied to the left hand side of this bitwise operator [-Wlogical-not-parentheses] if (!phy->cfg->quirks & V3_0_0_10NM_OLD_TIMINGS_QUIRK) { ^ ~ drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c:80:6: note: add parentheses after the '!' to evaluate the bitwise operator first if (!phy->cfg->quirks & V3_0_0_10NM_OLD_TIMINGS_QUIRK) { ^ ( ) drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c:80:6: note: add parentheses around left hand side expression to silence this warning if (!phy->cfg->quirks & V3_0_0_10NM_OLD_TIMINGS_QUIRK) { ^ ( ) 1 warning generated. Add parentheses around the bitwise AND so it is evaluated first then negated. Fixes: 3dbbf8f09e83 ("drm/msm/dsi: Add old timings quirk for 10nm phy") Link: https://github.com/ClangBuiltLinux/linux/issues/547 Reported-by: kbuild test robot Reviewed-by: Jeffrey Hugo Reviewed-by: Sean Paul Signed-off-by: Nathan Chancellor Signed-off-by: Rob Clark drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 538eca25ff8f844c8c8f9c2f2e39f1fdb996f4aa Author: Suzuki K Poulose Date: Wed Jun 19 11:29:22 2019 -0600 coresight: tmc-etr: Rearrange probing default buffer size As we are about to refactor the platform specific handling, make the default buffer size probing generic. Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-tmc.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) commit 18e46e1109b41a89ef8ea1a9d4b8164c428b5a3b Author: Suzuki K Poulose Date: Wed Jun 19 11:29:21 2019 -0600 coresight: stm: Rearrange probing the stimulus area As we are about to refactor the platform specific handling re-arrange some of the DT specific property handling. Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-stm.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) commit 6e9ad805069bc1bf7d336a2a0da8f4717505c5e5 Author: Suzuki K Poulose Date: Wed Jun 19 11:29:20 2019 -0600 coresight: etm3x: Rearrange cp14 access detection As we are about to refactor the platform specific handling, move the DT property handling to generic helpers. Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-etm3x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6887cfa075349a8c16e72747408feeced7235ade Author: Mathieu Poirier Date: Wed Jun 19 11:29:18 2019 -0600 coresight: Use coresight device names for sinks in PMU attribute Move to using the coresight device name instead of the parent device name for SINK attribute for PMU. Signed-off-by: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-etm-perf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 7f84712a0d9db4cec3f6467286126762dc16383e Author: Suzuki K Poulose Date: Wed Jun 19 11:29:17 2019 -0600 coresight: etb10: Clean up device specific data Track the coresight device instead of the real device. Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-etb10.c | 32 +++++++++++++-------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit aaff7623284159af037904cb83f7b7dd79d42393 Author: Suzuki K Poulose Date: Wed Jun 19 11:29:16 2019 -0600 coresight: etm: Clean up device specific data Track the coresight device instead of the real device. Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-etm.h | 6 ++---- .../hwtracing/coresight/coresight-etm3x-sysfs.c | 12 ++++++------ drivers/hwtracing/coresight/coresight-etm3x.c | 22 ++++++++++++---------- drivers/hwtracing/coresight/coresight-etm4x.c | 17 +++++++++-------- drivers/hwtracing/coresight/coresight-etm4x.h | 2 -- 5 files changed, 29 insertions(+), 30 deletions(-) commit ec62db1b2f18c2dcaca32f11f02367e94360cc68 Author: Suzuki K Poulose Date: Wed Jun 19 11:29:15 2019 -0600 coresight: stm: Cleanup device specific data Keep track of the STM coresight device which is a child device of the AMBA device. Since we can get to the coresight_device from the "device" instance, remove the explicit field. Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-stm.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit fa87fa79678d1072073925f2e83d42dc3132fe52 Author: Suzuki K Poulose Date: Wed Jun 19 11:29:14 2019 -0600 coresight: tpiu: Clean up device specific data Switch to using the coresight device instead of the parent amba device. Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-tpiu.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit c95e224fee34b25bd0cc07cfcfa37816f50498bf Author: Suzuki K Poulose Date: Wed Jun 19 11:29:13 2019 -0600 coresight: catu: Cleanup device specific data Switch to using the CoreSight device instead of the real amba device. Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-catu.c | 13 +++++++------ drivers/hwtracing/coresight/coresight-catu.h | 1 - 2 files changed, 7 insertions(+), 7 deletions(-) commit 9dd0a92097675ffc629cfe3ea7a169842cc9b29c Author: Suzuki K Poulose Date: Wed Jun 19 11:29:12 2019 -0600 coresight: tmc: Clean up device specific data In preparation to use a consistent device naming scheme, clean up the device link tracking in replicator driver. Use the "coresight" device instead of the "real" parent device for all internal purposes. All other requests (e.g, power management, DMA operations) must use the "real" device which is the parent device. Since the CATU driver also uses the TMC-SG infrastructure, update the callers to ensure they pass the appropriate device argument for the tables. Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-catu.c | 5 ++-- drivers/hwtracing/coresight/coresight-tmc-etf.c | 9 +++--- drivers/hwtracing/coresight/coresight-tmc-etr.c | 40 ++++++++++++++----------- drivers/hwtracing/coresight/coresight-tmc.c | 38 +++++++++++------------ drivers/hwtracing/coresight/coresight-tmc.h | 2 -- 5 files changed, 47 insertions(+), 47 deletions(-) commit 36f590825e67176db0f9214061b26f9e8ef77e20 Author: Suzuki K Poulose Date: Wed Jun 19 11:29:11 2019 -0600 coresight: replicator: Cleanup device tracking In preparation to use a consistent device naming scheme, clean up the device link tracking in replicator driver. Use the "coresight" device instead of the "real" parent device for all internal purposes. All other requests (e.g, power management, DMA operations) must use the "real" device which is the parent device. Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-replicator.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 207f31125f9d3f674f13449278c40f69fb41fabe Author: Suzuki K Poulose Date: Wed Jun 19 11:29:10 2019 -0600 coresight: funnel: Clean up device book keeping In preparation to use a consistent device naming scheme, clean up the device link tracking in funnel driver. Use the "coresight" device instead of the "real" parent device for all internal purposes. All other requests (e.g, power management, DMA operations) must use the "real" device which is the parent device. Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-funnel.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 5aafd9bf7aa932f2a97e5a55d1acda67c161621f Author: Mathieu Poirier Date: Wed Jun 19 11:29:09 2019 -0600 coresight: perf: Don't set the truncated flag in snapshot mode This patch avoids setting the truncated flag when operating in snapshot mode since the trace buffer is expected to be truncated and discontinuous from one snapshot to another. Moreover when the truncated flag is set the perf core stops enabling the event, waiting for user space to consume the data. In snapshot mode this is clearly not what we want since it results in stale data. Signed-off-by: Mathieu Poirier Reviewed-by: Suzuki K Poulose Tested-by: Leo Yan Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-etb10.c | 8 +++++++- drivers/hwtracing/coresight/coresight-tmc-etf.c | 8 +++++++- drivers/hwtracing/coresight/coresight-tmc-etr.c | 8 +++++++- 3 files changed, 21 insertions(+), 3 deletions(-) commit 99f81eb9c51d499f65bac25597e9def22f6a32dc Author: Mathieu Poirier Date: Wed Jun 19 11:29:08 2019 -0600 coresight: tmc-etf: Fix snapshot mode update function When working in snapshot mode function perf_aux_output_begin() does not set the handle->size because the size is expected to be deduced by the placement of the "head" and "old" pointers in user space. As such there is no point in trying to adjust the amount of data to copy to the ring buffer. Signed-off-by: Mathieu Poirier Reviewed-by: Leo Yan Reviewed-by: Suzuki K Poulose Tested-by: Leo Yan Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-tmc-etf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 0402f75efe4719bca950900275100d9a12f44a92 Author: Mathieu Poirier Date: Wed Jun 19 11:29:07 2019 -0600 coresight: tmc-etf: Properly set AUX buffer head in snapshot mode Unify amongst sink drivers how the AUX ring buffer head is communicated to user space. That way the same algorithm in user space can be used to determine where the latest data is and how much of it to access. Signed-off-by: Mathieu Poirier Reviewed-by: Suzuki K Poulose Tested-by: Leo Yan Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-tmc-etf.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 3ecb03022a25b3f089b93a35f608ea7ee6a244aa Author: Mathieu Poirier Date: Wed Jun 19 11:29:06 2019 -0600 coresight: tmc-etr: Properly set AUX buffer head in snapshot mode Unify amongst sink drivers how the AUX ring buffer head is communicated to user space. That way the same algorithm in user space can be used to determine where the latest data is and how much of it to access. Signed-off-by: Mathieu Poirier Reviewed-by: Suzuki K Poulose Tested-by: Leo Yan Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-tmc-etr.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 514e5150e7c6b247d7a473f935fc49d6f194688b Author: Mathieu Poirier Date: Wed Jun 19 11:29:05 2019 -0600 coresight: etb10: Properly set AUX buffer head in snapshot mode Unify amongst sink drivers how the AUX ring buffer head is communicated to user space. That way the same algorithm in user space can be used to determine where the latest data is and how much of it to access. Signed-off-by: Mathieu Poirier Reviewed-by: Suzuki K Poulose Tested-by: Leo Yan Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-etb10.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit f506a547a9f4dc40fc24a176a98058c94108185b Author: Greg Kroah-Hartman Date: Tue Jun 11 20:17:00 2019 +0200 eeprom: idt_89hpesx: remove unneeded csr_file variable The csr_file variable was only ever set, never read. So remove it from struct idt_89hpesx_dev as it is pointless to keep around. Cc: Arnd Bergmann Cc: Dan Carpenter Cc: Kees Cook Cc: Colin Ian King Cc: linux-kernel@vger.kernel.org Reviewed-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/misc/eeprom/idt_89hpesx.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 7603eab4a5433f825c5f8d9ccc29c490adb4edbd Author: Nishad Kamdar Date: Sat Jun 15 08:27:42 2019 +0530 fsi: cf-fsi-fw: Use the correct style for SPDX License Identifier This patch corrects the SPDX License Identifier style in header file related to Drivers for FRU Support Interface. For C header files Documentation/process/license-rules.rst mandates C-like comments (opposed to C source files where C++ style should be used) Changes made by using a script provided by Joe Perches here: https://lkml.org/lkml/2019/2/7/46 Suggested-by: Joe Perches Signed-off-by: Nishad Kamdar Signed-off-by: Greg Kroah-Hartman drivers/fsi/cf-fsi-fw.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 42c3dcedc6b76b1383e1b63be82b84c058b5a8ad Author: Maxime Ripard Date: Fri Jun 14 15:32:21 2019 +0100 dt-bindings: nvmem: Convert Allwinner SID to a schema The Allwinner SoCs have an efuse supported in Linux, with a matching Device Tree binding. Now that we have the DT validation in place, let's convert the device tree bindings for that controller over to a YAML schemas. Signed-off-by: Maxime Ripard Reviewed-by: Rob Herring Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman .../bindings/nvmem/allwinner,sun4i-a10-sid.yaml | 51 ++++++++++++++++++++++ .../bindings/nvmem/allwinner,sunxi-sid.txt | 29 ------------ 2 files changed, 51 insertions(+), 29 deletions(-) commit 2d1c193911b03b77b2f4df8df07578af43ce5564 Author: Fabio Estevam Date: Fri Jun 14 15:32:20 2019 +0100 nvmem: Broaden the selection of NVMEM_SNVS_LPGPR The SNVS LPGR IP block is also found on other i.MX SoCs that are not covered by the current SOC_IMX6 || SOC_IMX7D logic. One example is the i.MX7ULP. To avoid keep expanding the SoC logic selection, make it broader by using the more generic ARCH_MXC symbol instead. Signed-off-by: Fabio Estevam Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 67ff708bd2facd0a7b93f3c5960586999962456d Author: Peng Fan Date: Fri Jun 14 15:32:19 2019 +0100 nvmem: imx: add i.MX8 nvmem driver This patch adds i.MX8 nvmem ocotp driver to access fuse via RPC to i.MX8 system controller. Cc: Srinivas Kandagatla Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Peng Fan Reviewed-by: Dong Aisheng Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/Kconfig | 7 ++ drivers/nvmem/Makefile | 2 + drivers/nvmem/imx-ocotp-scu.c | 161 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 170 insertions(+) commit c2a6ea23a40152a03d6c605d6f0ea239b11605b8 Author: Peng Fan Date: Fri Jun 14 15:32:18 2019 +0100 dt-bindings: fsl: scu: add ocotp binding NXP i.MX8QXP is an ARMv8 SoC with a Cortex-M4 core inside as system controller(SCU), the ocotp controller is being controlled by the SCU, so Linux need use RPC to SCU for ocotp handling. This patch adds binding doc for i.MX8 SCU OCOTP driver. Cc: Mark Rutland Cc: Shawn Guo Cc: Ulf Hansson Cc: Stephen Boyd Cc: Anson Huang Cc: devicetree@vger.kernel.org Reviewed-by: Rob Herring Reviewed-by: Dong Aisheng Signed-off-by: Peng Fan Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman .../devicetree/bindings/arm/freescale/fsl,scu.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit d2527682160a09e4eb5e9abcf37e83ee5239561a Author: Nishad Kamdar Date: Thu Jun 13 19:30:03 2019 +0530 firmware: arm_scmi: Use the correct style for SPDX License Identifier This patch corrects the SPDX License Identifier style in header file related to Firmware Drivers for ARM SCMI Message Protocol. For C header files Documentation/process/license-rules.rst mandates C-like comments (opposed to C source files where C++ style should be used) Changes made by using a script provided by Joe Perches here: https://lkml.org/lkml/2019/2/7/46 Suggested-by: Joe Perches Signed-off-by: Nishad Kamdar Signed-off-by: Greg Kroah-Hartman drivers/firmware/arm_scmi/common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5d8a437c583de22451e2787a20bdf12a52bfb447 Author: Nishad Kamdar Date: Fri Jun 14 19:27:45 2019 +0530 firmware: ti_sci: Use the correct style for SPDX License Identifier This patch corrects the SPDX License Identifier style in header file related to Firmware Drivers for Texas Instruments SCI Protocol. For C header files Documentation/process/license-rules.rst mandates C-like comments (opposed to C source files where C++ style should be used) Changes made by using a script provided by Joe Perches here: https://lkml.org/lkml/2019/2/7/46 Suggested-by: Joe Perches Signed-off-by: Nishad Kamdar Reviewed-by: Lokesh Vutla Signed-off-by: Greg Kroah-Hartman drivers/firmware/ti_sci.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 122f8ec7b78e2d0f2dc6c966bef96b47c955ca36 Author: Lin Yi Date: Mon Jun 3 16:08:10 2019 +0800 lib : kobject: fix refcount imblance on kobject_rename the kobj refcount increased by kobject_get should be released before error return, otherwise lead to a memory leak. Signed-off-by: Lin Yi Signed-off-by: Greg Kroah-Hartman lib/kobject.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit dd50a69b5697532666023766688c6ea642e5a443 Author: Krzysztof Kozlowski Date: Tue Jun 18 21:07:41 2019 +0200 ARM: exynos_defconfig: Enable Panfrost and Lima drivers Enable support for Mali GPU with Panfrost and Lima drivers. Most of Exynos chipsets come with Mali GPUs: 1. Mali 400 (Exynos3250, Exynos4210, Exynos4412), 2. Mali T628 (Exynos542x). Signed-off-by: Krzysztof Kozlowski arch/arm/configs/exynos_defconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 23851326d37c674333a258375dbbf88b1b5500b7 Author: Krzysztof Kozlowski Date: Tue Jun 18 21:07:40 2019 +0200 ARM: multi_v7_defconfig: Enable Panfrost and Lima drivers Enable support for Mali GPU with Panfrost and Lima drivers. Most of Exynos chipsets come with Mali GPUs: 1. Mali 400 (Exynos3250, Exynos4210, Exynos4412), 2. Mali T628 (Exynos542x). As Mali GPU is quite popular among ARM vendors, other platforms will benefit as well. Signed-off-by: Krzysztof Kozlowski arch/arm/configs/multi_v7_defconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1b7aebf0487613033aff26420e32fa2076d52846 Author: Qian Cai Date: Wed Jun 19 10:32:53 2019 -0400 x86/cacheinfo: Fix a -Wtype-limits warning cpuinfo_x86.x86_model is an unsigned type, so comparing against zero will generate a compilation warning: arch/x86/kernel/cpu/cacheinfo.c: In function 'cacheinfo_amd_init_llc_id': arch/x86/kernel/cpu/cacheinfo.c:662:19: warning: comparison is always true \ due to limited range of data type [-Wtype-limits] Remove the unnecessary lower bound check. [ bp: Massage. ] Fixes: 68091ee7ac3c ("x86/CPU/AMD: Calculate last level cache ID from number of sharing threads") Signed-off-by: Qian Cai Signed-off-by: Borislav Petkov Reviewed-by: Sean Christopherson Cc: "Gustavo A. R. Silva" Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Masami Hiramatsu Cc: Pu Wen Cc: Suravee Suthikulpanit Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/1560954773-11967-1-git-send-email-cai@lca.pw arch/x86/kernel/cpu/cacheinfo.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 6da4e11cc749a303e986a6bff9b7b994f3ea918b Author: Krzysztof Kozlowski Date: Fri Jun 14 16:26:40 2019 +0200 ARM: dts: exynos: Add PMU interrupt affinity to Exynos4 boards Move SoC-specific PMU properties from exynos4.dtsi to respective SoC (4210 or 4412) so common DTSI would have only common properties. Define there also interrupt affinity to remove the boot warning message: hw perfevents: no interrupt-affinity property for /pmu, guessing. Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos4.dtsi | 2 +- arch/arm/boot/dts/exynos4210.dtsi | 6 ++++++ arch/arm/boot/dts/exynos4412.dtsi | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) commit 4e4dfcb2a425cccc6dd1fb7d46e060cd57999afc Author: Simon Shields Date: Tue Jun 18 02:17:42 2019 +0200 ARM: dts: exynos: Add flash support to Galaxy S3 boards The Galaxy S3 boards use an aat1290 to control the flash LED. Add the relevant device tree configuration to use it. Signed-off-by: Simon Shields Signed-off-by: Denis 'GNUtoo' Carikli [rebase] Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos4412-galaxy-s3.dtsi | 32 +++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit b8ad2985c6ea04fc64d49fcf87c08fcd03c25895 Author: Stefan Agner Date: Tue May 28 00:40:51 2019 +0200 ARM: OMAP2: drop explicit assembler architecture OMAP2 depends on ARCH_MULTI_V6, which makes sure that the kernel is compiled with -march=armv6. The compiler frontend will pass the architecture to the assembler. There is no explicit architecture specification necessary. Signed-off-by: Stefan Agner Acked-by: Tony Lindgren Signed-off-by: Olof Johansson arch/arm/mach-omap2/Makefile | 5 ----- 1 file changed, 5 deletions(-) commit 3fe1ee40b2a2db271513a498c475c13572dcb4c6 Author: Stefan Agner Date: Tue May 28 00:40:50 2019 +0200 ARM: use arch_extension directive instead of arch argument The LLVM Target parser currently does not allow to specify the security extension as part of -march (see also LLVM Bug 40186 [0]). When trying to use Clang with LLVM's integrated assembler, this leads to build errors such as this: clang-8: error: the clang compiler does not support '-Wa,-march=armv7-a+sec' Use ".arch_extension sec" to enable the security extension in a more portable fasion. Also make sure to use ".arch armv7-a" in case a v6/v7 multi-platform kernel is being built. Note that this is technically not exactly the same as the old code checked for availabilty of the security extension by calling as-instr. However, there are already other sites which use ".arch_extension sec" unconditionally, hence de-facto we need an assembler capable of ".arch_extension sec" already today (arch/arm/mm/proc-v7.S). The arch extension "sec" is available since binutils 2.21 according to its documentation [1]. [0] https://bugs.llvm.org/show_bug.cgi?id=40186 [1] https://sourceware.org/binutils/docs-2.21/as/ARM-Options.html Signed-off-by: Stefan Agner Acked-by: Mans Rullgard Acked-by: Arnd Bergmann Acked-by: Krzysztof Kozlowski Signed-off-by: Olof Johansson arch/arm/mach-bcm/Makefile | 3 --- arch/arm/mach-bcm/bcm_kona_smc.c | 2 -- arch/arm/mach-exynos/Makefile | 4 ---- arch/arm/mach-exynos/exynos-smc.S | 3 ++- arch/arm/mach-exynos/sleep.S | 3 ++- arch/arm/mach-highbank/Makefile | 3 --- arch/arm/mach-highbank/smc.S | 3 ++- arch/arm/mach-keystone/Makefile | 3 --- arch/arm/mach-keystone/smc.S | 1 + arch/arm/mach-omap2/Makefile | 8 -------- arch/arm/mach-omap2/omap-headsmp.S | 2 ++ arch/arm/mach-omap2/omap-smc.S | 3 ++- arch/arm/mach-omap2/sleep33xx.S | 1 + arch/arm/mach-omap2/sleep34xx.S | 2 ++ arch/arm/mach-omap2/sleep43xx.S | 2 ++ arch/arm/mach-omap2/sleep44xx.S | 3 +++ arch/arm/mach-tango/Makefile | 3 --- arch/arm/mach-tango/smc.S | 2 ++ 18 files changed, 21 insertions(+), 30 deletions(-) commit 37c600a3cc8a6941d77e853ec4e0e33fffa1046b Author: Andrea Parri Date: Tue Feb 19 23:55:23 2019 +0100 tools/memory-model: Do not use "herd" to refer to "herd7" Use "herd7" in each such reference. Signed-off-by: Andrea Parri Cc: Will Deacon Cc: Peter Zijlstra Cc: Boqun Feng Cc: Nicholas Piggin Cc: David Howells Cc: Jade Alglave Cc: Luc Maranget Cc: "Paul E. McKenney" Cc: Akira Yokosawa Cc: Daniel Lustig Acked-by: Alan Stern Signed-off-by: Paul E. McKenney tools/memory-model/litmus-tests/README | 2 +- tools/memory-model/lock.cat | 2 +- tools/memory-model/scripts/README | 4 ++-- tools/memory-model/scripts/checkalllitmus.sh | 2 +- tools/memory-model/scripts/checklitmus.sh | 2 +- tools/memory-model/scripts/parseargs.sh | 2 +- tools/memory-model/scripts/runlitmushist.sh | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) commit 46f52b1fe79d2453467b904600ae4759808c4a44 Author: Andrea Parri Date: Tue Feb 19 23:55:22 2019 +0100 tools/memory-model: Fix comment in MP+poonceonces.litmus The comment should say "Sometimes" for the result. Signed-off-by: Andrea Parri Cc: Will Deacon Cc: Peter Zijlstra Cc: Boqun Feng Cc: Nicholas Piggin Cc: David Howells Cc: Jade Alglave Cc: Luc Maranget Cc: "Paul E. McKenney" Cc: Akira Yokosawa Cc: Daniel Lustig Acked-by: Alan Stern Signed-off-by: Paul E. McKenney tools/memory-model/litmus-tests/MP+poonceonces.litmus | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2966f8d440c3d2b6ef6c44093a9f9c42701a077a Author: Alan Stern Date: Fri May 3 13:13:44 2019 -0400 Documentation: atomic_t.txt: Explain ordering provided by smp_mb__{before,after}_atomic() The description of smp_mb__before_atomic() and smp_mb__after_atomic() in Documentation/atomic_t.txt is slightly terse and misleading. It does not clearly state which other instructions are ordered by these barriers. This improves the text to make the actual ordering implications clear, and also to explain how these barriers differ from a RELEASE or ACQUIRE ordering. Signed-off-by: Alan Stern Cc: Jonathan Corbet Cc: Peter Zijlstra Acked-by: Andrea Parri Signed-off-by: Paul E. McKenney Documentation/atomic_t.txt | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit 936bbf3aea84696ce1081ab9648d08bbf08ca7aa Author: Jan Kara Date: Wed Jun 19 18:29:45 2019 +0200 ext2: Always brelse bh on failure in ext2_iget() All but one bail out paths in ext2_iget() is releasing bh. Move the releasing of bh into a common error handling code. Signed-off-by: Jan Kara fs/ext2/inode.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit edb895d3bfbab558df2149947a3f245ddf42292e Author: Chengguang Xu Date: Sun Jun 16 23:08:01 2019 +0800 ext2: add missing brelse() in ext2_iget() Add missing brelse() on error path of ext2_iget(). Reviewed-by: Darrick J. Wong Signed-off-by: Chengguang Xu Signed-off-by: Jan Kara fs/ext2/inode.c | 1 + 1 file changed, 1 insertion(+) commit 11ca7a9d541d09586fbf89290d1e14619cc40de0 Merge: f0b635627395 588759a39145 9129b017b54d 11b000457f46 89da3b94bb97 354ea05d0276 Author: Paul E. McKenney Date: Wed Jun 19 09:21:46 2019 -0700 Merge branches 'consolidate.2019.05.28a', 'doc.2019.05.28a', 'fixes.2019.06.13a', 'srcu.2019.05.28a', 'sync.2019.05.28a' and 'torture.2019.05.28a' into HEAD consolidate.2019.05.28a: RCU flavor consolidation cleanups and optmizations. doc.2019.05.28a: Documentation updates. fixes.2019.06.13a: Miscellaneous fixes. srcu.2019.05.28a: SRCU updates. sync.2019.05.28a: RCU-sync flavor consolidation. torture.2019.05.28a: Torture-test updates. commit 4ed7e4e57822d01d887d3eec7e10d8e50c39dd43 Merge: 50f5ef466dfa 78eccc2ac98e Author: Olof Johansson Date: Wed Jun 19 09:03:38 2019 -0700 Merge tag 'ti-k3-soc-for-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/kristo/linux into arm/dt Texas Instruments K3 SoC family changes for 5.3 - Add support for the new J721e SoC, includes basic peripherals needed for booting up the device - New peripheral support added for AM654x: * TI SCI irqchip * GPIO * MCU SRAM * R5Fs * MSMC RAM * SERDES and PCIe * tag 'ti-k3-soc-for-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/kristo/linux: (26 commits) arm64: dts: ti: k3-j721e: Add the MCU SRAM node arm64: dts: ti: k3-j721e: Add interrupt controllers in wakeup domain arm64: dts: ti: k3-j721e: Add interrupt controllers in main domain arm64: dts: ti: k3-j721e-main: Add Main NavSS Interrupt controller node arm64: defconfig: Enable TI's J721E SoC platform arm64: dts: ti: Add support for J721E Common Processor Board soc: ti: Add Support for J721E SoC config option arm64: dts: ti: Add Support for J721E SoC dt-bindings: serial: 8250_omap: Add compatible for J721E UART controller dt-bindings: arm: ti: Add bindings for J721E SoC arm64: dts: ti: am654-base-board: Disable SERDES and PCIe arm64: dts: k3-am6: Add PCIe Endpoint DT node arm64: dts: k3-am6: Add PCIe Root Complex DT node arm64: dts: k3-am6: Add SERDES DT node arm64: dts: k3-am6: Add mux-controller DT node required for muxing SERDES arm64: dts: k3-am6: Add "socionext,synquacer-pre-its" property to gic_its arm64: dts: ti: k3-am65: Add MSMC RAM ranges in interconnect node arm64: dts: ti: k3-am65: Add R5F ranges in interconnect nodes arm64: dts: ti: k3-am65-mcu: Add the MCU RAM node arm64: dts: ti: k3-am65: Add MCU SRAM ranges in interconnect nodes ... Signed-off-by: Olof Johansson commit a6c606047810100b96cc5ac865bf106477e542d2 Author: james qian wang (Arm Technology China) Date: Wed Jun 19 08:42:45 2019 +0100 drm/komeda: Correct printk format specifier for "size_t" Warnings popup when "make ARCH=i386" In file included from include/drm/drm_mm.h:49, from include/drm/drm_vma_manager.h:26, from include/drm/drm_gem.h:40, from drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c:9: drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c: In function 'komeda_fb_afbc_size_check': drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c:96:17: error: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'size_t' {aka 'unsigned int'} [-Werror=format=] DRM_DEBUG_KMS("afbc size check failed, obj_size: 0x%lx. min_size 0x%x.\n", That leads by misuse "%lx" as format speicifier for size_t, correct it to "%zx" Reported-by: kbuild test robot Signed-off-by: james qian wang (Arm Technology China) Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit a106504ba7aa4d738a52676e3e0c43fce9f2ba03 Author: Greg Kroah-Hartman Date: Thu Jun 13 15:28:29 2019 +0200 malidp: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Liviu Dudau Cc: Brian Starkey Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/malidp_drv.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit 8b70ce7ddf074a46d7137b1805f2a88ec89a6271 Author: Greg Kroah-Hartman Date: Thu Jun 13 15:28:06 2019 +0200 komeda: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: "James (Qian) Wang" Cc: Liviu Dudau Cc: Brian Starkey Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/display/komeda/komeda_dev.c | 3 --- 1 file changed, 3 deletions(-) commit 6c249cc7a7e69b2d3c6ad957ab5e02d155508fa6 Merge: df767c0a437c 4c960505df44 Author: Olof Johansson Date: Wed Jun 19 09:02:52 2019 -0700 Merge tag 'drivers_soc_for_5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone into arm/drivers SOC: TI SCI updates for v5.3 - Couple of fixes to handle resource ranges and requesting response always from firmware; - Add processor control - Add support APIs for DMA - Fix the SPDX license plate - Unused varible warning fix * tag 'drivers_soc_for_5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone: firmware: ti_sci: Fix gcc unused-but-set-variable warning firmware: ti_sci: Use the correct style for SPDX License Identifier firmware: ti_sci: Parse all resource ranges even if some is not available firmware: ti_sci: Add support for processor control firmware: ti_sci: Add resource management APIs for ringacc, psi-l and udma firmware: ti_sci: Always request response from firmware Signed-off-by: Olof Johansson commit 50f5ef466dfaf0847b67417447ad586a5c8ed0f9 Merge: ecf890235575 c946feaabbdd Author: Olof Johansson Date: Wed Jun 19 09:00:58 2019 -0700 Merge tag 'socfpga_dts_updates_for_v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into arm/dt SoCFPGA DTS updates for v5.3 - Use the new "altr,socfpga-stmmac-a10-s10" for the EMAC controllers on Arria10/Stratix10 - Add the ltc2497 i2c entry on the Arria10 devkit - Add the EMAC OCP reset property on the Arria10 * tag 'socfpga_dts_updates_for_v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: ARM: dts: arria10: Add EMAC OCP reset property ARM: dts: socfpga: add ltc2497 on arria10 devkit arm64: dts: stratix10: use the "altr,socfpga-stmmac-a10-s10" binding ARM: dts: socfpga: use the "altr,socfpga-stmmac-a10-s10" binding Signed-off-by: Olof Johansson commit 96e5aaf914060a02955b09487e176769a75ae225 Author: Julian Wiedmann Date: Fri Jun 14 11:18:28 2019 +0200 s390/cio: move struct node_descriptor to cio.h This allows device drivers (eg. qeth) to use the struct when processing information retrieved via RCD. Signed-off-by: Julian Wiedmann Acked-by: Sebastian Ott Signed-off-by: Vasily Gorbik arch/s390/include/asm/cio.h | 30 ++++++++++++++++++++++++++++++ drivers/s390/cio/chsc.c | 30 ------------------------------ 2 files changed, 30 insertions(+), 30 deletions(-) commit 4f18d869ffd056c7858f3d617c71345cf19be008 Author: Heiko Carstens Date: Mon Jun 17 14:02:41 2019 +0200 s390: fix stfle zero padding The stfle inline assembly returns the number of double words written (condition code 0) or the double words it would have written (condition code 3), if the memory array it got as parameter would have been large enough. The current stfle implementation assumes that the array is always large enough and clears those parts of the array that have not been written to with a subsequent memset call. If however the array is not large enough memset will get a negative length parameter, which means that memset clears memory until it gets an exception and the kernel crashes. To fix this simply limit the maximum length. Move also the inline assembly to an extra function to avoid clobbering of register 0, which might happen because of the added min_t invocation together with code instrumentation. The bug was introduced with commit 14375bc4eb8d ("[S390] cleanup facility list handling") but was rather harmless, since it would only write to a rather large array. It became a potential problem with commit 3ab121ab1866 ("[S390] kernel: Add z/VM LGR detection"). Since then it writes to an array with only four double words, while some machines already deliver three double words. As soon as machines have a facility bit within the fifth double a crash on IPL would happen. Fixes: 14375bc4eb8d ("[S390] cleanup facility list handling") Cc: # v2.6.37+ Reviewed-by: Vasily Gorbik Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik arch/s390/include/asm/facility.h | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit 191fa92b344831e3d1b15e0bf698dfe9755a81d2 Author: Heiko Carstens Date: Mon Jun 17 14:02:40 2019 +0200 s390/sclp: remove call home support This feature has never been used, so remove it. Acked-by: Vasily Gorbik Acked-by: Hendrik Brueckner Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik Documentation/sysctl/kernel.txt | 16 ---- drivers/s390/char/Kconfig | 21 ----- drivers/s390/char/Makefile | 1 - drivers/s390/char/sclp_async.c | 189 ---------------------------------------- 4 files changed, 227 deletions(-) commit d1523a8f4b8beca90e6ada5ad41faa9776575287 Author: Heiko Carstens Date: Mon Jun 17 14:02:40 2019 +0200 s390: replace defconfig with performance_defconfig Replace defconfig with performance_defconfig. defconfig had some more or less random debug options enabled, where nobody knows why anymore. Just remove the old defconfig and replace it with performance_defconfig, which reduces the number of configs to maintain. A config with debugging options enabled is debug_defconfig which is supposed to be rather close to performance_defconfig except that is has debug options enabled. Acked-by: Vasily Gorbik Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik arch/s390/configs/defconfig | 602 +++++++++++++++++++++++----- arch/s390/configs/performance_defconfig | 680 -------------------------------- 2 files changed, 514 insertions(+), 768 deletions(-) commit e57cf057c57d80b4949379e92769a34d7839cced Author: Thierry Reding Date: Fri Jun 14 17:41:04 2019 +0200 arm64: tegra: Enable CPU sleep on Jetson Nano Jetson Nano implements CPU sleep via PSCI, much like any of the other Tegra X1 platforms. Enable the sleep states to allow the CPU to go into lower power states when idle. Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts | 6 ++++++ 1 file changed, 6 insertions(+) commit 8300a70e6567d2b89791708bc618c506ef29262d Author: Thierry Reding Date: Thu Jun 6 17:54:05 2019 +0200 arm64: tegra: Add ID EEPROMs on Jetson Nano The Jetson Nano has two ID EEPROMs, one for the module and another for the carrier board. Add both to the device tree so that they can be read from at runtime. Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 5205abd2832a48966910cbe0dc94f2713ebd87e1 Author: Thierry Reding Date: Thu Jun 13 18:53:29 2019 +0200 arm64: tegra: Add ID EEPROM for Jetson TX2 Developer Kit There is an ID EEPROM on the Jetson TX2 carrier board, part of the Jetson TX2 Developer Kit, that exposes information that can be used to identify the carrier board. Add the device tree node so that operating systems can access this EEPROM. Acked-by: Jon Hunter Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra186-p2771-0000.dts | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit a4ff413b714d5b627bb81f5aca6d30e4714260e4 Author: Thierry Reding Date: Thu Jun 13 18:53:28 2019 +0200 arm64: tegra: Add ID EEPROM for Jetson TX2 module There is an ID EEPROM in the Jetson TX2 module that stores various bits of information to indentify the module. Add the device tree node so that operating systems can access this EEPROM. Acked-by: Jon Hunter Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra186-p3310.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 3492d0a1550ec06d5c7094dc8d0553b257e3398c Author: Thierry Reding Date: Thu Jun 13 18:53:31 2019 +0200 arm64: tegra: Add ID EEPROM for Jetson TX1 Developer Kit There is an ID EEPROM on the Jetson TX1 carrier board, part of the Jetson TX1 Developer Kit, that exposes information that can be used to identify the carrier board. Add the device tree node so that operating systems can access this EEPROM. Acked-by: Jon Hunter Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra210-p2371-2180.dts | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit a5b6b67364cb5679fa6ade5ab844bfdf1def2484 Author: Thierry Reding Date: Thu Jun 13 18:53:30 2019 +0200 arm64: tegra: Add ID EEPROM for Jetson TX1 module There is an ID EEPROM in the Jetson TX1 module that stores various bits of information to indentify the module. Add the device tree node so that operating systems can access this EEPROM. Acked-by: Jon Hunter Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra210-p2180.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 79ebb5bb4e38a58ca796dd242b855a4982e101d7 Author: Laura Garcia Liebana Date: Tue Jun 18 11:11:02 2019 +0200 netfilter: nf_tables: enable set expiration time for set elements Currently, the expiration of every element in a set or map is a read-only parameter generated at kernel side. This change will permit to set a certain expiration date per element that will be required, for example, during stateful replication among several nodes. This patch handles the NFTA_SET_ELEM_EXPIRATION in order to configure the expiration parameter per element, or will use the timeout in the case that the expiration is not set. Signed-off-by: Laura Garcia Liebana Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables.h | 2 +- net/netfilter/nf_tables_api.c | 26 ++++++++++++++++++++------ net/netfilter/nft_dynset.c | 2 +- 3 files changed, 22 insertions(+), 8 deletions(-) commit 2f0513d487d2619c751fd08f5b7c64e759435ff4 Author: Stéphane Veyret Date: Wed Jun 19 09:03:14 2019 +0200 netfilter: nft_ct: fix null pointer in ct expectations support nf_ct_helper_ext_add may return null, which must then be checked. Fixes: 857b46027d6f ("netfilter: nft_ct: add ct expectations support") Reported-by: Colin Ian King Signed-off-by: Stéphane Veyret Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_ct.c | 4 ++++ 1 file changed, 4 insertions(+) commit 72c5e11854afb842e157353be0291d65b91725f5 Author: Colin Ian King Date: Tue Jun 18 15:22:44 2019 +0100 netfilter: synproxy: ensure zero is returned on non-error return path Currently functions nf_synproxy_{ipc4|ipv6}_init return an uninitialized garbage value in variable ret on a successful return. Fix this by returning zero on success. Addresses-Coverity: ("Uninitialized scalar variable") Fixes: d7f9b2f18eae ("netfilter: synproxy: extract SYNPROXY infrastructure from {ipt, ip6t}_SYNPROXY") Signed-off-by: Colin Ian King Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_synproxy_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6c9bef32c6e742e847fc28c9bf7721cbfa003fa6 Merge: 2a54003e7af1 d5dd88794a13 Author: David S. Miller Date: Wed Jun 19 11:37:48 2019 -0400 Merge branch 'inet-fix-defrag-units-dismantle-races' Eric Dumazet says: ==================== inet: fix defrag units dismantle races This series add a new pre_exit() method to struct pernet_operations to solve a race in defrag units dismantle, without adding extra delays to netns dismantles. ==================== Signed-off-by: David S. Miller commit d5dd88794a13c2f24cce31abad7a0a6c5e0ed2db Author: Eric Dumazet Date: Tue Jun 18 11:09:00 2019 -0700 inet: fix various use-after-free in defrags units syzbot reported another issue caused by my recent patches. [1] The issue here is that fqdir_exit() is initiating a work queue and immediately returns. A bit later cleanup_net() was able to free the MIB (percpu data) and the whole struct net was freed, but we had active frag timers that fired and triggered use-after-free. We need to make sure that timers can catch fqdir->dead being set, to bailout. Since RCU is used for the reader side, this means we want to respect an RCU grace period between these operations : 1) qfdir->dead = 1; 2) netns dismantle (freeing of various data structure) This patch uses new new (struct pernet_operations)->pre_exit infrastructure to ensures a full RCU grace period happens between fqdir_pre_exit() and fqdir_exit() This also means we can use a regular work queue, we no longer need rcu_work. Tested: $ time for i in {1..1000}; do unshare -n /bin/false;done real 0m2.585s user 0m0.160s sys 0m2.214s [1] BUG: KASAN: use-after-free in ip_expire+0x73e/0x800 net/ipv4/ip_fragment.c:152 Read of size 8 at addr ffff88808b9fe330 by task syz-executor.4/11860 CPU: 1 PID: 11860 Comm: syz-executor.4 Not tainted 5.2.0-rc2+ #22 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x172/0x1f0 lib/dump_stack.c:113 print_address_description.cold+0x7c/0x20d mm/kasan/report.c:188 __kasan_report.cold+0x1b/0x40 mm/kasan/report.c:317 kasan_report+0x12/0x20 mm/kasan/common.c:614 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:132 ip_expire+0x73e/0x800 net/ipv4/ip_fragment.c:152 call_timer_fn+0x193/0x720 kernel/time/timer.c:1322 expire_timers kernel/time/timer.c:1366 [inline] __run_timers kernel/time/timer.c:1685 [inline] __run_timers kernel/time/timer.c:1653 [inline] run_timer_softirq+0x66f/0x1740 kernel/time/timer.c:1698 __do_softirq+0x25c/0x94c kernel/softirq.c:293 invoke_softirq kernel/softirq.c:374 [inline] irq_exit+0x180/0x1d0 kernel/softirq.c:414 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x13b/0x550 arch/x86/kernel/apic/apic.c:1068 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:806 RIP: 0010:tomoyo_domain_quota_is_ok+0x131/0x540 security/tomoyo/util.c:1035 Code: 24 4c 3b 65 d0 0f 84 9c 00 00 00 e8 19 1d 73 fe 49 8d 7c 24 18 48 ba 00 00 00 00 00 fc ff df 48 89 f8 48 c1 e8 03 0f b6 04 10 <48> 89 fa 83 e2 07 38 d0 7f 08 84 c0 0f 85 69 03 00 00 41 0f b6 5c RSP: 0018:ffff88806ae079c0 EFLAGS: 00000a02 ORIG_RAX: ffffffffffffff13 RAX: 0000000000000000 RBX: 0000000000000010 RCX: ffffc9000e655000 RDX: dffffc0000000000 RSI: ffffffff82fd88a7 RDI: ffff888086202398 RBP: ffff88806ae07a00 R08: ffff88808b6c8700 R09: ffffed100d5c0f4d R10: ffffed100d5c0f4c R11: 0000000000000000 R12: ffff888086202380 R13: 0000000000000030 R14: 00000000000000d3 R15: 0000000000000000 tomoyo_supervisor+0x2e8/0xef0 security/tomoyo/common.c:2087 tomoyo_audit_path_number_log security/tomoyo/file.c:235 [inline] tomoyo_path_number_perm+0x42f/0x520 security/tomoyo/file.c:734 tomoyo_file_ioctl+0x23/0x30 security/tomoyo/tomoyo.c:335 security_file_ioctl+0x77/0xc0 security/security.c:1370 ksys_ioctl+0x57/0xd0 fs/ioctl.c:711 __do_sys_ioctl fs/ioctl.c:720 [inline] __se_sys_ioctl fs/ioctl.c:718 [inline] __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:718 do_syscall_64+0xfd/0x680 arch/x86/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4592c9 Code: fd b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 cb b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f8db5e44c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00000000004592c9 RDX: 0000000020000080 RSI: 00000000000089f1 RDI: 0000000000000006 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f8db5e456d4 R13: 00000000004cc770 R14: 00000000004d5cd8 R15: 00000000ffffffff Allocated by task 9047: save_stack+0x23/0x90 mm/kasan/common.c:71 set_track mm/kasan/common.c:79 [inline] __kasan_kmalloc mm/kasan/common.c:489 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:462 kasan_slab_alloc+0xf/0x20 mm/kasan/common.c:497 slab_post_alloc_hook mm/slab.h:437 [inline] slab_alloc mm/slab.c:3326 [inline] kmem_cache_alloc+0x11a/0x6f0 mm/slab.c:3488 kmem_cache_zalloc include/linux/slab.h:732 [inline] net_alloc net/core/net_namespace.c:386 [inline] copy_net_ns+0xed/0x340 net/core/net_namespace.c:426 create_new_namespaces+0x400/0x7b0 kernel/nsproxy.c:107 unshare_nsproxy_namespaces+0xc2/0x200 kernel/nsproxy.c:206 ksys_unshare+0x440/0x980 kernel/fork.c:2692 __do_sys_unshare kernel/fork.c:2760 [inline] __se_sys_unshare kernel/fork.c:2758 [inline] __x64_sys_unshare+0x31/0x40 kernel/fork.c:2758 do_syscall_64+0xfd/0x680 arch/x86/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 2541: save_stack+0x23/0x90 mm/kasan/common.c:71 set_track mm/kasan/common.c:79 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:451 kasan_slab_free+0xe/0x10 mm/kasan/common.c:459 __cache_free mm/slab.c:3432 [inline] kmem_cache_free+0x86/0x260 mm/slab.c:3698 net_free net/core/net_namespace.c:402 [inline] net_drop_ns.part.0+0x70/0x90 net/core/net_namespace.c:409 net_drop_ns net/core/net_namespace.c:408 [inline] cleanup_net+0x538/0x960 net/core/net_namespace.c:571 process_one_work+0x989/0x1790 kernel/workqueue.c:2269 worker_thread+0x98/0xe40 kernel/workqueue.c:2415 kthread+0x354/0x420 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 The buggy address belongs to the object at ffff88808b9fe100 which belongs to the cache net_namespace of size 6784 The buggy address is located 560 bytes inside of 6784-byte region [ffff88808b9fe100, ffff88808b9ffb80) The buggy address belongs to the page: page:ffffea00022e7f80 refcount:1 mapcount:0 mapping:ffff88821b6f60c0 index:0x0 compound_mapcount: 0 flags: 0x1fffc0000010200(slab|head) raw: 01fffc0000010200 ffffea000256f288 ffffea0001bbef08 ffff88821b6f60c0 raw: 0000000000000000 ffff88808b9fe100 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88808b9fe200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88808b9fe280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88808b9fe300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88808b9fe380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88808b9fe400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb Fixes: 3c8fc8782044 ("inet: frags: rework rhashtable dismantle") Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David S. Miller include/net/inet_frag.h | 8 +++++++- include/net/ipv6_frag.h | 2 ++ net/ieee802154/6lowpan/reassembly.c | 13 +++++++++++-- net/ipv4/inet_fragment.c | 19 ++++--------------- net/ipv4/ip_fragment.c | 14 ++++++++++++-- net/ipv6/netfilter/nf_conntrack_reasm.c | 10 ++++++++-- net/ipv6/reassembly.c | 10 ++++++++-- 7 files changed, 52 insertions(+), 24 deletions(-) commit d7d99872c144a2c2f5d9c9d83627fa833836cba5 Author: Eric Dumazet Date: Tue Jun 18 11:08:59 2019 -0700 netns: add pre_exit method to struct pernet_operations Current struct pernet_operations exit() handlers are highly discouraged to call synchronize_rcu(). There are cases where we need them, and exit_batch() does not help the common case where a single netns is dismantled. This patch leverages the existing synchronize_rcu() call in cleanup_net() Calling optional ->pre_exit() method before ->exit() or ->exit_batch() allows to benefit from a single synchronize_rcu() call. Note that the synchronize_rcu() calls added in this patch are only in error paths or slow paths. Tested: $ time for i in {1..1000}; do unshare -n /bin/false;done real 0m2.612s user 0m0.171s sys 0m2.216s Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/net_namespace.h | 5 +++++ net/core/net_namespace.c | 28 ++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) commit 06c3cba62b3be0a46427a2a63b2f08c617d14530 Author: Leo Yan Date: Wed May 8 10:18:52 2019 +0800 ARM: dts: hip04: Update coresight DT bindings CoreSight DT bindings have been updated, thus the old compatible strings are obsolete and the drivers will report warning if DTS uses these obsolete strings. This patch switches to the new bindings for CoreSight dynamic funnel and static replicator, so can dismiss warning during initialisation. Cc: Wei Xu Cc: Guodong Xu Cc: Zhangfei Gao Cc: Haojian Zhuang Cc: Mathieu Poirier Cc: Suzuki K Poulose Signed-off-by: Leo Yan Acked-by: Suzuki K Poulose Reviewed-by: Mathieu Poirier Signed-off-by: Wei Xu arch/arm/boot/dts/hip04.dtsi | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 2a54003e7af1eaddc05848dac14f7bcd77301478 Merge: 9371a56f7101 f71fec47c2df Author: David S. Miller Date: Wed Jun 19 11:23:14 2019 -0400 Merge branch 'xdp-page_pool-fixes-and-in-flight-accounting' Jesper Dangaard Brouer says: ==================== xdp: page_pool fixes and in-flight accounting This patchset fix page_pool API and users, such that drivers can use it for DMA-mapping. A number of places exist, where the DMA-mapping would not get released/unmapped, all these are fixed. This occurs e.g. when an xdp_frame gets converted to an SKB. As network stack doesn't have any callback for XDP memory models. The patchset also address a shutdown race-condition. Today removing a XDP memory model, based on page_pool, is only delayed one RCU grace period. This isn't enough as redirected xdp_frames can still be in-flight on different queues (remote driver TX, cpumap or veth). We stress that when drivers use page_pool for DMA-mapping, then they MUST use one packet per page. This might change in the future, but more work lies ahead, before we can lift this restriction. This patchset change the page_pool API to be more strict, as in-flight page accounting is added. ==================== Signed-off-by: David S. Miller commit f71fec47c2df704c7081f946d7e46fe036a4208b Author: Jesper Dangaard Brouer Date: Tue Jun 18 15:06:08 2019 +0200 page_pool: make sure struct device is stable For DMA mapping use-case the page_pool keeps a pointer to the struct device, which is used in DMA map/unmap calls. For our in-flight handling, we also need to make sure that the struct device have not disappeared. This is assured via using get_device/put_device API. Signed-off-by: Jesper Dangaard Brouer Reported-by: Ivan Khoronzhuk Signed-off-by: David S. Miller net/core/page_pool.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 32c28f7e413981c7dd4a3ad9bbb1151e4b654261 Author: Jesper Dangaard Brouer Date: Tue Jun 18 15:06:03 2019 +0200 page_pool: add tracepoints for page_pool with details need by XDP The xdp tracepoints for mem id disconnect don't carry information about, why it was not safe_to_remove. The tracepoint page_pool:page_pool_inflight in this patch can be used for extract this info for further debugging. This patchset also adds tracepoint for the pages_state_* release/hold transitions, including a pointer to the page. This can be used for stats about in-flight pages, or used to debug page leakage via keeping track of page pointer and combining this with kprobe for __put_page(). Signed-off-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller include/trace/events/page_pool.h | 87 ++++++++++++++++++++++++++++++++++++++++ net/core/net-traces.c | 4 ++ net/core/page_pool.c | 9 ++++- 3 files changed, 99 insertions(+), 1 deletion(-) commit f033b688c1ede5ec78c9a718fa9f0b374049bc31 Author: Jesper Dangaard Brouer Date: Tue Jun 18 15:05:58 2019 +0200 xdp: add tracepoints for XDP mem These tracepoints make it easier to troubleshoot XDP mem id disconnect. The xdp:mem_disconnect tracepoint cannot be replaced via kprobe. It is placed at the last stable place for the pointer to struct xdp_mem_allocator, just before it's scheduled for RCU removal. It also extract info on 'safe_to_remove' and 'force'. Detailed info about in-flight pages is not available at this layer. The next patch will added tracepoints needed at the page_pool layer for this. Signed-off-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller include/net/xdp_priv.h | 23 +++++++++ include/trace/events/xdp.h | 115 +++++++++++++++++++++++++++++++++++++++++++++ net/core/xdp.c | 21 ++------- 3 files changed, 143 insertions(+), 16 deletions(-) commit d956a048cd3fc1ba154101a1a50fb37950081ff6 Author: Jesper Dangaard Brouer Date: Tue Jun 18 15:05:53 2019 +0200 xdp: force mem allocator removal and periodic warning If bugs exists or are introduced later e.g. by drivers misusing the API, then we want to warn about the issue, such that developer notice. This patch will generate a bit of noise in form of periodic pr_warn every 30 seconds. It is not nice to have this stall warning running forever. Thus, this patch will (after 120 attempts) force disconnect the mem id (from the rhashtable) and free the page_pool object. This will cause fallback to the put_page() as before, which only potentially leak DMA-mappings, if objects are really stuck for this long. In that unlikely case, a WARN_ONCE should show us the call stack. Signed-off-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller net/core/page_pool.c | 18 +++++++++++++++++- net/core/xdp.c | 37 +++++++++++++++++++++++++++++++------ 2 files changed, 48 insertions(+), 7 deletions(-) commit 99c07c43c4ea0bc101331401a0fabfc51933c6a3 Author: Jesper Dangaard Brouer Date: Tue Jun 18 15:05:47 2019 +0200 xdp: tracking page_pool resources and safe removal This patch is needed before we can allow drivers to use page_pool for DMA-mappings. Today with page_pool and XDP return API, it is possible to remove the page_pool object (from rhashtable), while there are still in-flight packet-pages. This is safely handled via RCU and failed lookups in __xdp_return() fallback to call put_page(), when page_pool object is gone. In-case page is still DMA mapped, this will result in page note getting correctly DMA unmapped. To solve this, the page_pool is extended with tracking in-flight pages. And XDP disconnect system queries page_pool and waits, via workqueue, for all in-flight pages to be returned. To avoid killing performance when tracking in-flight pages, the implement use two (unsigned) counters, that in placed on different cache-lines, and can be used to deduct in-flight packets. This is done by mapping the unsigned "sequence" counters onto signed Two's complement arithmetic operations. This is e.g. used by kernel's time_after macros, described in kernel commit 1ba3aab3033b and 5a581b367b5, and also explained in RFC1982. The trick is these two incrementing counters only need to be read and compared, when checking if it's safe to free the page_pool structure. Which will only happen when driver have disconnected RX/alloc side. Thus, on a non-fast-path. It is chosen that page_pool tracking is also enabled for the non-DMA use-case, as this can be used for statistics later. After this patch, using page_pool requires more strict resource "release", e.g. via page_pool_release_page() that was introduced in this patchset, and previous patches implement/fix this more strict requirement. Drivers no-longer call page_pool_destroy(). Drivers already call xdp_rxq_info_unreg() which call xdp_rxq_info_unreg_mem_model(), which will attempt to disconnect the mem id, and if attempt fails schedule the disconnect for later via delayed workqueue. Signed-off-by: Jesper Dangaard Brouer Reviewed-by: Ilias Apalodimas Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 3 -- include/net/page_pool.h | 41 ++++++++++---- net/core/page_pool.c | 62 +++++++++++++++------ net/core/xdp.c | 65 ++++++++++++++++++++--- 4 files changed, 136 insertions(+), 35 deletions(-) commit 29b006a67634e389ebc1b0c45e72a84d60118d6f Author: Jesper Dangaard Brouer Date: Tue Jun 18 15:05:42 2019 +0200 mlx5: more strict use of page_pool API The mlx5 driver is using page_pool, but not for DMA-mapping (currently), and is a little too relaxed about returning or releasing page resources, as it is not strictly necessary, when not using DMA-mappings. As this patchset is working towards tracking page_pool resources, to know about in-flight frames on shutdown. Then fix places where mlx5 leak page_pool resource. In case of dma_mapping_error, then recycle into page_pool. In mlx5e_free_rq() moved the page_pool_destroy() call to after the mlx5e_page_release() calls, as it is more correct. In mlx5e_page_release() when no recycle was requested, then release page from the page_pool, via page_pool_release_page(). Signed-off-by: Jesper Dangaard Brouer Reviewed-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 9 +++++---- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) commit e54cfd7e1745e52eb6c67ee9c77aefb8e4666a88 Author: Jesper Dangaard Brouer Date: Tue Jun 18 15:05:37 2019 +0200 page_pool: introduce page_pool_free and use in mlx5 In case driver fails to register the page_pool with XDP return API (via xdp_rxq_info_reg_mem_model()), then the driver can free the page_pool resources more directly than calling page_pool_destroy(), which does a unnecessarily RCU free procedure. This patch is preparing for removing page_pool_destroy(), from driver invocation. Signed-off-by: Jesper Dangaard Brouer Reviewed-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 6 +++--- include/net/page_pool.h | 11 +++++++++++ net/core/page_pool.c | 15 +++++++++++---- 3 files changed, 25 insertions(+), 7 deletions(-) commit cbf3351067cea1a58862b2c7667b479a358a2071 Author: Jesper Dangaard Brouer Date: Tue Jun 18 15:05:32 2019 +0200 veth: use xdp_release_frame for XDP_PASS Like cpumap use xdp_release_frame() when an xdp_frame got converted into an SKB and send towars the network stack. Signed-off-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller drivers/net/veth.c | 1 + 1 file changed, 1 insertion(+) commit 6bf071bf09d4b2ff3ee8783531e2ce814f0870cb Author: Jesper Dangaard Brouer Date: Tue Jun 18 15:05:27 2019 +0200 xdp: page_pool related fix to cpumap When converting an xdp_frame into an SKB, and sending this into the network stack, then the underlying XDP memory model need to release associated resources, because the network stack don't have callbacks for XDP memory models. The only memory model that needs this is page_pool, when a driver use the DMA-mapping feature. Introduce page_pool_release_page(), which basically does the same as page_pool_unmap_page(). Add xdp_release_frame() as the XDP memory model interface for calling it, if the memory model match MEM_TYPE_PAGE_POOL, to save the function call overhead for others. Have cpumap call xdp_release_frame() before xdp_scrub_frame(). Signed-off-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller include/net/page_pool.h | 15 ++++++++++++++- include/net/xdp.h | 15 +++++++++++++++ kernel/bpf/cpumap.c | 3 +++ net/core/xdp.c | 15 +++++++++++++++ 4 files changed, 47 insertions(+), 1 deletion(-) commit 516a7593fda6f20a04988e988725a182644f67b4 Author: Jesper Dangaard Brouer Date: Tue Jun 18 15:05:22 2019 +0200 xdp: fix leak of IDA cyclic id if rhashtable_insert_slow fails Fix error handling case, where inserting ID with rhashtable_insert_slow fails in xdp_rxq_info_reg_mem_model, which leads to never releasing the IDA ID, as the lookup in xdp_rxq_info_unreg_mem_model fails and thus ida_simple_remove() is never called. Fix by releasing ID via ida_simple_remove(), and mark xdp_rxq->mem.id with zero, which is already checked in xdp_rxq_info_unreg_mem_model(). Signed-off-by: Jesper Dangaard Brouer Reviewed-by: Ilias Apalodimas Signed-off-by: David S. Miller net/core/xdp.c | 2 ++ 1 file changed, 2 insertions(+) commit a25d50bfe645b3ed6b2cb3773e7025db14a608f3 Author: Ilias Apalodimas Date: Tue Jun 18 15:05:17 2019 +0200 net: page_pool: add helper function to unmap dma addresses On a previous patch dma addr was stored in 'struct page'. Use that to unmap DMA addresses used by network drivers Signed-off-by: Ilias Apalodimas Signed-off-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller include/net/page_pool.h | 1 + net/core/page_pool.c | 7 +++++++ 2 files changed, 8 insertions(+) commit 0afdeeed08b5f59148069e9f7a52d2ab0eba5d49 Author: Ilias Apalodimas Date: Tue Jun 18 15:05:12 2019 +0200 net: page_pool: add helper function to retrieve dma addresses On a previous patch dma addr was stored in 'struct page'. Use that to retrieve DMA addresses used by network drivers Signed-off-by: Ilias Apalodimas Signed-off-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller include/net/page_pool.h | 5 +++++ 1 file changed, 5 insertions(+) commit 7743c48e54ee9be9c799cbf3b8e3e9f2b8d19e72 Author: David Howells Date: Wed Jun 19 16:10:15 2019 +0100 keys: Cache result of request_key*() temporarily in task_struct If a filesystem uses keys to hold authentication tokens, then it needs a token for each VFS operation that might perform an authentication check - either by passing it to the server, or using to perform a check based on authentication data cached locally. For open files this isn't a problem, since the key should be cached in the file struct since it represents the subject performing operations on that file descriptor. During pathwalk, however, there isn't anywhere to cache the key, except perhaps in the nameidata struct - but that isn't exposed to the filesystems. Further, a pathwalk can incur a lot of operations, calling one or more of the following, for instance: ->lookup() ->permission() ->d_revalidate() ->d_automount() ->get_acl() ->getxattr() on each dentry/inode it encounters - and each one may need to call request_key(). And then, at the end of pathwalk, it will call the actual operation: ->mkdir() ->mknod() ->getattr() ->open() ... which may need to go and get the token again. However, it is very likely that all of the operations on a single dentry/inode - and quite possibly a sequence of them - will all want to use the same authentication token, which suggests that caching it would be a good idea. To this end: (1) Make it so that a positive result of request_key() and co. that didn't require upcalling to userspace is cached temporarily in task_struct. (2) The cache is 1 deep, so a new result displaces the old one. (3) The key is released by exit and by notify-resume. (4) The cache is cleared in a newly forked process. Signed-off-by: David Howells Documentation/security/keys/request-key.rst | 7 +++++- include/linux/sched.h | 5 ++++ include/linux/tracehook.h | 7 ++++++ kernel/cred.c | 9 +++++++ security/keys/Kconfig | 18 ++++++++++++++ security/keys/request_key.c | 37 +++++++++++++++++++++++++++++ 6 files changed, 82 insertions(+), 1 deletion(-) commit 896f1950e5944532b971d880a6bae7fba3b6a8d3 Author: David Howells Date: Wed Jun 19 16:10:15 2019 +0100 keys: Provide request_key_rcu() Provide a request_key_rcu() function that can be used to request a key under RCU conditions. It can only search and check permissions; it cannot allocate a new key, upcall or wait for an upcall to complete. It may return a partially constructed key. Signed-off-by: David Howells Documentation/security/keys/core.rst | 10 +++++++ Documentation/security/keys/request-key.rst | 9 ++++++ include/linux/key.h | 3 ++ security/keys/request_key.c | 44 +++++++++++++++++++++++++++++ 4 files changed, 66 insertions(+) commit e59428f721ee096d8a020504ea908a6f0d952735 Author: David Howells Date: Wed Jun 19 16:10:15 2019 +0100 keys: Move the RCU locks outwards from the keyring search functions Move the RCU locks outwards from the keyring search functions so that it will become possible to provide an RCU-capable partial request_key() function in a later commit. Signed-off-by: David Howells Documentation/security/keys/request-key.rst | 2 +- include/keys/request_key_auth-type.h | 1 + security/keys/internal.h | 6 +-- security/keys/keyring.c | 16 ++++---- security/keys/proc.c | 4 +- security/keys/process_keys.c | 41 +++++++++----------- security/keys/request_key.c | 8 +++- security/keys/request_key_auth.c | 60 +++++++++++++++++------------ 8 files changed, 77 insertions(+), 61 deletions(-) commit a09003b5d7cea71ce4b59e409d5a7158c789e1b4 Author: David Howells Date: Wed Jun 19 16:10:15 2019 +0100 keys: Invalidate used request_key authentication keys Invalidate used request_key authentication keys rather than revoking them so that they get cleaned up immediately rather than potentially hanging around. There doesn't seem any need to keep the revoked keys around. Signed-off-by: David Howells security/keys/key.c | 4 ++-- security/keys/request_key.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 504b69eb3c95180bc59f1ae9096ad4b10bbbf254 Author: David Howells Date: Wed Jun 19 16:10:15 2019 +0100 keys: Fix request_key() lack of Link perm check on found key The request_key() syscall allows a process to gain access to the 'possessor' permits of any key that grants it Search permission by virtue of request_key() not checking whether a key it finds grants Link permission to the caller. Signed-off-by: David Howells Documentation/security/keys/core.rst | 4 ++++ security/keys/request_key.c | 10 ++++++++++ 2 files changed, 14 insertions(+) commit b119deca1e016e37614117f56f74461eac559af5 Author: Stephen Rothwell Date: Wed Jun 19 16:36:16 2019 +1000 USB: fix types in uapi include Signed-off-by: Stephen Rothwell Signed-off-by: Greg Kroah-Hartman include/uapi/linux/usbdevice_fs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9500ff14c4cf0eedf4c5f55175b9046768db5cbd Author: Wanglai Shi Date: Sat Apr 20 22:00:35 2019 +0800 arm64: dts: hi3660: Add CoreSight support This patch adds DT bindings for the CoreSight trace components on hi3660, which is used by 96boards Hikey960. Signed-off-by: Wanglai Shi Reviewed-and-tested-by: Leo Yan Reviewed-by: Mathieu Poirier Signed-off-by: Wei Xu .../arm64/boot/dts/hisilicon/hi3660-coresight.dtsi | 456 +++++++++++++++++++++ arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 2 + 2 files changed, 458 insertions(+) commit b6f7cd7faecf1d199552327db72c56182d801b82 Author: Leo Yan Date: Wed May 8 10:18:58 2019 +0800 arm64: dts: hi6220: Update coresight DT bindings CoreSight DT bindings have been updated, thus the old compatible strings are obsolete and the drivers will report warning if DTS uses these obsolete strings. This patch switches to the new bindings for CoreSight dynamic funnel and static replicator, so can dismiss warning during initialisation. Cc: Wei Xu Cc: Guodong Xu Cc: Zhangfei Gao Cc: Haojian Zhuang Cc: Mathieu Poirier Cc: Suzuki K Poulose Signed-off-by: Leo Yan Acked-by: Suzuki K Poulose Reviewed-by: Mathieu Poirier Signed-off-by: Wei Xu arch/arm64/boot/dts/hisilicon/hi6220-coresight.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f6130381e2a20b0503838477462a3f55f7672434 Author: Fabrizio Castro Date: Wed Jun 19 15:11:24 2019 +0100 arm64: dts: renesas: hihope-common: Remove "label" from LEDs Remove "label" properties from the LEDs device tree nodes, since we don't have nice labels on the PCB. Signed-off-by: Fabrizio Castro Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/hihope-common.dtsi | 4 ---- 1 file changed, 4 deletions(-) commit 8492101e15f9e2d30ab3533563d94590bb01c09c Merge: 4aa095ea329d 9c106119f653 Author: Konrad Rzeszutek Wilk Date: Wed Jun 19 10:29:24 2019 -0400 Merge branch 'stable/for-linus-5.2' into devel/for-linus-5.2 * stable/for-linus-5.2: swiotlb: fix phys_addr_t overflow warning commit 9c106119f6538f65bdddb7948a157d90625effa7 Author: Arnd Bergmann Date: Mon Jun 17 15:28:43 2019 +0200 swiotlb: fix phys_addr_t overflow warning On architectures that have a larger dma_addr_t than phys_addr_t, the swiotlb_tbl_map_single() function truncates its return code in the failure path, making it impossible to identify the error later, as we compare to the original value: kernel/dma/swiotlb.c:551:9: error: implicit conversion from 'dma_addr_t' (aka 'unsigned long long') to 'phys_addr_t' (aka 'unsigned int') changes value from 18446744073709551615 to 4294967295 [-Werror,-Wconstant-conversion] return DMA_MAPPING_ERROR; Use an explicit typecast here to convert it to the narrower type, and use the same expression in the error handling later. Fixes: b907e20508d0 ("swiotlb: remove SWIOTLB_MAP_ERROR") Acked-by: Stefano Stabellini Signed-off-by: Arnd Bergmann Signed-off-by: Konrad Rzeszutek Wilk drivers/xen/swiotlb-xen.c | 2 +- kernel/dma/swiotlb.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 9371a56f7101cc3f12b57db4bfbb6159205211f4 Author: Ilias Apalodimas Date: Wed Jun 19 13:04:01 2019 +0300 net: netsec: remove loops in napi Rx process netsec_process_rx was running in a loop trying to process as many packets as possible before re-enabling interrupts. With the recent DMA changes this is not needed anymore as we manage to consume all the budget without looping over the function. Since it has no performance penalty let's remove that and simplify the Rx path a bit Signed-off-by: Ilias Apalodimas Acked-by: Ard Biesheuvel Signed-off-by: David S. Miller drivers/net/ethernet/socionext/netsec.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit 39e3622edeffa63c2871153d8743c5825b139968 Author: Ilias Apalodimas Date: Wed Jun 19 13:04:00 2019 +0300 net: netsec: initialize tx ring on ndo_open Since we changed the Tx ring handling and now depends on bit31 to figure out the owner of the descriptor, we should initialize this every time the device goes down-up instead of doing it once on driver init. If the value is not correctly initialized the device won't have any available descriptors Changes since v1: - Typo fixes Fixes: 35e07d234739 ("net: socionext: remove mmio reads on Tx") Signed-off-by: Ilias Apalodimas Acked-by: Ard Biesheuvel Signed-off-by: David S. Miller drivers/net/ethernet/socionext/netsec.c | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) commit e41d4bc554dedf80590f5fe4a1805bc9383b42e7 Author: Rasmus Villemoes Date: Wed Jun 19 10:02:38 2019 +0000 net: dsa: mv88e6xxx: fix shift of FID bits in mv88e6250_g1_vtu_loadpurge() The comment is correct, but the code ends up moving the bits four places too far, into the VTUOp field. Fixes: bec8e5725281 (net: dsa: mv88e6xxx: implement vtu_getnext and vtu_loadpurge for mv88e6250) Signed-off-by: Rasmus Villemoes Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/global1_vtu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 801dd05bbfa4076f5539a732380194043a9d8a91 Author: Marcin Juszkiewicz Date: Mon Jun 17 18:04:11 2019 +0200 arm64 defconfig: enable Mellanox cards Mellanox cards are present in several AArch64 servers. Signed-off-by: Marcin Juszkiewicz Signed-off-by: Olof Johansson arch/arm64/configs/defconfig | 9 +++++++++ 1 file changed, 9 insertions(+) commit 427e54a22d0c3547d0ea788ff4c9a45318e59a83 Author: Marcin Juszkiewicz Date: Mon Jun 17 18:04:10 2019 +0200 arm64 defconfig: enable MPT3 SAS and BNX2X drivers ThunderX2 server requires both to provide storage and network. 05:00.0 Ethernet controller [0200]: Broadcom Limited BCM57840 NetXtreme II 10 Gigabit Ethernet [14e4:16a1] (rev 11) 05:00.1 Ethernet controller [0200]: Broadcom Limited BCM57840 NetXtreme II 10 Gigabit Ethernet [14e4:16a1] (rev 11) 8d:00.0 Serial Attached SCSI controller [0107]: LSI Logic / Symbios Logic SAS3224 PCI-Express Fusion-MPT SAS-3 [1000:00c4] (rev 01) Signed-off-by: Marcin Juszkiewicz Signed-off-by: Olof Johansson arch/arm64/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+) commit fedc459a3da35ecf171a1d6dd9f7f51fb452baf8 Author: Alexandre Belloni Date: Wed Jun 19 15:17:53 2019 +0200 rtc: pcf2123: fix negative offset rounding Using result = (value + divisor/2) / divisor is rounding values up and only works well for positive values. Instead use DIV_ROUND_CLOSEST which does the correct thing. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pcf2123.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e32e60a2d5ecd8affc79f7da02d3479b4116579f Author: Dylan Howey Date: Fri May 3 19:52:12 2019 +0000 rtc: pcf2123: add alarm support Allows alarm to be controlled using, e.g., the RTC_WKALM_SET ioctl. Signed-off-by: Dylan Howey Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pcf2123.c | 116 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 114 insertions(+), 2 deletions(-) commit c33850bbc6c9f2276d1065b0faee2186260cb664 Author: Dylan Howey Date: Fri May 3 19:52:12 2019 +0000 rtc: pcf2123: use %ptR Use %ptR to print date in human readable format. Signed-off-by: Dylan Howey Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pcf2123.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit 790d033933b8a1d6bd537bdd6c08d9af745d9b78 Author: Dylan Howey Date: Fri May 3 19:52:10 2019 +0000 rtc: pcf2123: port to regmap Also remove pcf2123_delay_trec. This claimed to add a 30ns delay to SPI writes, but I could not see any reference to this requirement in the datasheet. Closest thing I could find to a requirement are timings for the SPI chip enable line, which cannot be controlled by this driver (the ndelay came after the call to spi_write_then_read, which means it would sleep after CE has already gone inactive). Things seem to work fine without it. Signed-off-by: Dylan Howey Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pcf2123.c | 142 ++++++++++++++++++++-------------------------- 1 file changed, 61 insertions(+), 81 deletions(-) commit 2372a7d32b694e39bfac54d7f4dd7c0edb02d19e Author: Dylan Howey Date: Fri May 3 19:52:08 2019 +0000 rtc: pcf2123: remove sysfs register view Use regmap debugfs register view instead. Signed-off-by: Dylan Howey Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pcf2123.c | 90 +---------------------------------------------- 1 file changed, 1 insertion(+), 89 deletions(-) commit 8d955f24db3f60f77565af1129ee666491dbc522 Author: Neil Armstrong Date: Thu Jun 6 10:56:45 2019 +0200 ARM: multi_v7_defconfig: enable Lima driver A bunch of armv7 boards can now use the Lima driver, let's enable it in defconfig, it will be useful to have it enabled for KernelCI boot and runtime testing. Signed-off-by: Neil Armstrong Signed-off-by: Olof Johansson arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+) commit 23cdf8752b26d4edbd60a6293bca492d83192d4d Author: David S. Miller Date: Wed Jun 19 10:12:58 2019 -0400 act_ctinfo: Don't use BIT() in UAPI headers. Use _BITUL() instead. Reported-by: Stephen Rothwell Signed-off-by: David S. Miller include/uapi/linux/tc_act/tc_ctinfo.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d547bcf373428bfcd5f50a204087a586a52ce980 Author: Neil Armstrong Date: Thu Jun 6 10:56:44 2019 +0200 arm64: defconfig: enable Lima driver A bunch of arm64 boards can now use the Lima driver, let's enable it in defconfig, it will be useful to have it enabled for KernelCI boot and runtime testing. Signed-off-by: Neil Armstrong Signed-off-by: Olof Johansson arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit bff2a29f4f29230fd55fb8460efb17a93ec9b691 Author: Tomeu Vizoso Date: Tue Jun 4 13:20:02 2019 +0200 arm64: defconfig: add Panfrost driver With the goal of making it easier for CI services such as KernelCI to run tests for it. Signed-off-by: Tomeu Vizoso Acked-by: Neil Armstrong Signed-off-by: Olof Johansson arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit f56a1fa75c5ae0f1726792944798dece2bad01d4 Author: Tomeu Vizoso Date: Tue Jun 4 13:20:01 2019 +0200 ARM: multi_v7_defconfig: add Panfrost driver With the goal of making it easier for CI services such as KernelCI to run tests for it. Signed-off-by: Tomeu Vizoso Acked-by: Neil Armstrong Signed-off-by: Olof Johansson arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+) commit 6c48edcc955a4a5d0098fa5727260e75359fcbc4 Author: Krzysztof Kozlowski Date: Tue Jun 4 10:14:53 2019 +0200 ARM: configs: Remove useless UEVENT_HELPER_PATH Remove the CONFIG_UEVENT_HELPER_PATH because: 1. It is disabled since commit 1be01d4a5714 ("driver: base: Disable CONFIG_UEVENT_HELPER by default") as its dependency (UEVENT_HELPER) was made default to 'n', 2. It is not recommended (help message: "This should not be used today [...] creates a high system load") and was kept only for ancient userland, 3. Certain userland specifically requests it to be disabled (systemd README: "Legacy hotplug slows down the system and confuses udev"). Signed-off-by: Krzysztof Kozlowski Acked-by: Geert Uytterhoeven Acked-by: Sudeep Holla Acked-by: Andrew Jeffery Acked-by: Shawn Guo Acked-by: Nicolas Ferre Acked-by: Dinh Nguyen Signed-off-by: Olof Johansson arch/arm/configs/acs5k_defconfig | 1 - arch/arm/configs/acs5k_tiny_defconfig | 1 - arch/arm/configs/am200epdkit_defconfig | 1 - arch/arm/configs/aspeed_g4_defconfig | 1 - arch/arm/configs/aspeed_g5_defconfig | 1 - arch/arm/configs/at91_dt_defconfig | 1 - arch/arm/configs/axm55xx_defconfig | 1 - arch/arm/configs/cm_x2xx_defconfig | 1 - arch/arm/configs/cm_x300_defconfig | 1 - arch/arm/configs/cns3420vb_defconfig | 1 - arch/arm/configs/colibri_pxa270_defconfig | 1 - arch/arm/configs/colibri_pxa300_defconfig | 1 - arch/arm/configs/corgi_defconfig | 1 - arch/arm/configs/dove_defconfig | 1 - arch/arm/configs/em_x270_defconfig | 1 - arch/arm/configs/ep93xx_defconfig | 1 - arch/arm/configs/eseries_pxa_defconfig | 1 - arch/arm/configs/ezx_defconfig | 1 - arch/arm/configs/gemini_defconfig | 1 - arch/arm/configs/h3600_defconfig | 1 - arch/arm/configs/h5000_defconfig | 1 - arch/arm/configs/imote2_defconfig | 1 - arch/arm/configs/imx_v4_v5_defconfig | 1 - arch/arm/configs/iop13xx_defconfig | 1 - arch/arm/configs/iop32x_defconfig | 1 - arch/arm/configs/iop33x_defconfig | 1 - arch/arm/configs/ixp4xx_defconfig | 1 - arch/arm/configs/jornada720_defconfig | 1 - arch/arm/configs/keystone_defconfig | 1 - arch/arm/configs/ks8695_defconfig | 1 - arch/arm/configs/lpc32xx_defconfig | 1 - arch/arm/configs/magician_defconfig | 1 - arch/arm/configs/mini2440_defconfig | 1 - arch/arm/configs/moxart_defconfig | 1 - arch/arm/configs/multi_v5_defconfig | 1 - arch/arm/configs/mv78xx0_defconfig | 1 - arch/arm/configs/mvebu_v5_defconfig | 1 - arch/arm/configs/mvebu_v7_defconfig | 1 - arch/arm/configs/nhk8815_defconfig | 1 - arch/arm/configs/nuc910_defconfig | 1 - arch/arm/configs/nuc950_defconfig | 1 - arch/arm/configs/nuc960_defconfig | 1 - arch/arm/configs/omap1_defconfig | 1 - arch/arm/configs/orion5x_defconfig | 1 - arch/arm/configs/palmz72_defconfig | 1 - arch/arm/configs/pcm027_defconfig | 1 - arch/arm/configs/prima2_defconfig | 1 - arch/arm/configs/pxa168_defconfig | 1 - arch/arm/configs/pxa3xx_defconfig | 1 - arch/arm/configs/pxa910_defconfig | 1 - arch/arm/configs/pxa_defconfig | 1 - arch/arm/configs/realview_defconfig | 1 - arch/arm/configs/s3c2410_defconfig | 1 - arch/arm/configs/s3c6400_defconfig | 1 - arch/arm/configs/s5pv210_defconfig | 1 - arch/arm/configs/sama5_defconfig | 1 - arch/arm/configs/socfpga_defconfig | 1 - arch/arm/configs/spear13xx_defconfig | 1 - arch/arm/configs/spear3xx_defconfig | 1 - arch/arm/configs/spear6xx_defconfig | 1 - arch/arm/configs/spitz_defconfig | 1 - arch/arm/configs/tango4_defconfig | 1 - arch/arm/configs/tct_hammer_defconfig | 1 - arch/arm/configs/u300_defconfig | 1 - arch/arm/configs/u8500_defconfig | 1 - arch/arm/configs/vexpress_defconfig | 1 - arch/arm/configs/viper_defconfig | 1 - arch/arm/configs/xcep_defconfig | 1 - arch/arm/configs/zeus_defconfig | 1 - arch/arm/configs/zx_defconfig | 1 - 70 files changed, 70 deletions(-) commit cfecf0d0017b87c11a978ea9a7d4e5c155b93723 Merge: 39f588603238 dcc5e1f9cad0 Author: David S. Miller Date: Wed Jun 19 10:09:22 2019 -0400 Merge branch 'mlxsw-Implement-flower-ingress-device-matching-offload' Ido Schimmel says: ==================== mlxsw: Implement flower ingress device matching offload Jiri says: In case of using shared block, user might find it handy to be able to insert filters to match on particular ingress device. This patchset exposes the ingress ifindex through flow_dissector and flow_offload so mlxsw can use it to push down to HW. See the selftests for examples of usage. ==================== Signed-off-by: David S. Miller commit dcc5e1f9cad0e31198c4a4254981928299b49054 Author: Jiri Pirko Date: Wed Jun 19 09:41:09 2019 +0300 selftests: tc: add ingress device matching support Extend tc_flower to test plain ingress device matching and also tc_shblock to test ingress device matching on shared block. Add new tc_flower_router.sh where ingress device matching on egress (after routing) is done. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller .../testing/selftests/net/forwarding/tc_flower.sh | 26 +++- .../selftests/net/forwarding/tc_flower_router.sh | 172 +++++++++++++++++++++ .../selftests/net/forwarding/tc_shblocks.sh | 29 +++- 3 files changed, 225 insertions(+), 2 deletions(-) commit 0c1f391d192a1586ce627784f9c348f7a640adef Author: Jiri Pirko Date: Wed Jun 19 09:41:08 2019 +0300 mlxsw: spectrum_flower: Implement support for ingress device matching Benefit from the previously extended flow_dissector infrastructure and offload matching on ingress port. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 9 ++++ drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c | 9 +--- .../net/ethernet/mellanox/mlxsw/spectrum_flower.c | 50 +++++++++++++++++++++- 3 files changed, 59 insertions(+), 9 deletions(-) commit d8e94614461c2290e62154b3a2978bf0992954c4 Author: Jiri Pirko Date: Wed Jun 19 09:41:07 2019 +0300 mlxsw: spectrum_acl: Fix SRC_SYS_PORT element size Fix the size of the SRC_SYS_PORT element to be 16. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_keys.h | 2 +- drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_flex_keys.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) commit ff5405f690865762887cbc73529976a7448738ee Author: Jiri Pirko Date: Wed Jun 19 09:41:06 2019 +0300 mlxsw: spectrum_acl: Avoid size check for RX_ACL_SYSTEM_PORT element RX_ACL_SYSTEM_PORT is 8 bit but SRC_SYS_PORT is 16 bits. Internally, SRC_SYS_PORT is used to carry the value. Relax the checker in case of RX_ACL_SYSTEM_PORT and allow different size. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_keys.c | 5 +++-- drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_keys.h | 14 +++++++++----- .../net/ethernet/mellanox/mlxsw/spectrum_acl_flex_keys.c | 2 +- 3 files changed, 13 insertions(+), 8 deletions(-) commit 511a5adcaa11fdbd224833f939cca6e18ddbd5c0 Author: Jiri Pirko Date: Wed Jun 19 09:41:05 2019 +0300 mlxsw: spectrum_acl: Write RX_ACL_SYSTEM_PORT acl element correctly RX_ACL_SYSTEM_PORT is equal to SRC_SYS_PORT - 1. So before write to block we need to adjust the key value. Introduce new "EXT" helper to implement this. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_keys.c | 13 +++++++------ drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_keys.h | 16 +++++++++++++--- .../net/ethernet/mellanox/mlxsw/spectrum_acl_flex_keys.c | 2 +- 3 files changed, 21 insertions(+), 10 deletions(-) commit 9558a83aee62be7c3ce9eddd6484a5da16aad4cf Author: Jiri Pirko Date: Wed Jun 19 09:41:04 2019 +0300 net: flow_offload: implement support for meta key Implement support for previously added flow dissector meta key. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller include/net/flow_offload.h | 6 ++++++ net/core/flow_offload.c | 7 +++++++ 2 files changed, 13 insertions(+) commit 8212ed777f40c7f801454c92ca8566db51aa73e8 Author: Jiri Pirko Date: Wed Jun 19 09:41:03 2019 +0300 net: sched: cls_flower: use flow_dissector for ingress ifindex Use previously introduced infra to obtain and store ingress ifindex instead doing it locally. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller net/sched/cls_flower.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 82828b88f081a0084cd65f90a4a1d3652f5adb66 Author: Jiri Pirko Date: Wed Jun 19 09:41:02 2019 +0300 flow_dissector: add support for ingress ifindex dissection Add new key meta that contains ingress ifindex value and add a function to dissect this from skb. The key and function is prepared to cover other potential skb metadata values dissection. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller include/linux/skbuff.h | 4 ++++ include/net/flow_dissector.h | 9 +++++++++ net/core/flow_dissector.c | 16 ++++++++++++++++ 3 files changed, 29 insertions(+) commit 89d6adc63f859b45eb961d86a451e38b679143a5 Author: Fabrizio Castro Date: Tue Jun 18 16:18:39 2019 +0100 arm64: dts: renesas: hihope-common: Add HDMI support Add HDMI support to the HiHope RZ/G2[MN] mother board common dtsi. Signed-off-by: Fabrizio Castro Acked-by: Laurent Pinchart Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/hihope-common.dtsi | 61 ++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) commit 21feadd024e747123bc0aaba8d8cbef2b5eda058 Author: Arnd Bergmann Date: Wed Jun 19 14:50:34 2019 +0200 ipmi: ipmb: don't allocate i2c_client on stack The i2c_client structure can be fairly large, which leads to a warning about possible kernel stack overflow in some configurations: drivers/char/ipmi/ipmb_dev_int.c:115:16: error: stack frame size of 1032 bytes in function 'ipmb_write' [-Werror,-Wframe-larger-than=] There is no real reason to even declare an i2c_client, as we can simply call i2c_smbus_xfer() directly instead of the i2c_smbus_write_block_data() wrapper. Convert the ipmb_write() to use an open-coded i2c_smbus_write_block_data() here, without changing the behavior. It seems that there is another problem with this implementation; when user space passes a length of more than I2C_SMBUS_BLOCK_MAX bytes, all the rest is silently ignored. This should probably be addressed in a separate patch, but I don't know what the intended behavior is here. Fixes: 51bd6f291583 ("Add support for IPMB driver") Signed-off-by: Arnd Bergmann Message-Id: <20190619125045.918700-1-arnd@arndb.de> Acked-by: Asmaa Mnebhi [Broke up a line >80 characters on i2c_smbus_xfer().] Signed-off-by: Corey Minyard drivers/char/ipmi/ipmb_dev_int.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 39bab7bfb7d96cd677dfb0b46515bad9049c20ec Author: Krzysztof Kozlowski Date: Tue Jun 4 09:52:28 2019 +0200 arm64: configs: Remove useless UEVENT_HELPER_PATH Remove the CONFIG_UEVENT_HELPER_PATH because: 1. It is disabled since commit 1be01d4a5714 ("driver: base: Disable CONFIG_UEVENT_HELPER by default") as its dependency (UEVENT_HELPER) was made default to 'n', 2. It is not recommended (help message: "This should not be used today [...] creates a high system load") and was kept only for ancient userland, 3. Certain userland specifically requests it to be disabled (systemd README: "Legacy hotplug slows down the system and confuses udev"). Signed-off-by: Krzysztof Kozlowski Acked-by: Geert Uytterhoeven Signed-off-by: Olof Johansson arch/arm64/configs/defconfig | 1 - 1 file changed, 1 deletion(-) commit 39bda3158e352737501e11983ad5076480db84a6 Author: Krzysztof Kozlowski Date: Tue Jun 4 09:24:21 2019 +0200 ARM: config: Remove left-over BACKLIGHT_LCD_SUPPORT The CONFIG_BACKLIGHT_LCD_SUPPORT was removed in commit 8c5dc8d9f19c ("video: backlight: Remove useless BACKLIGHT_LCD_SUPPORT kernel symbol"). Options protected by CONFIG_BACKLIGHT_LCD_SUPPORT are now available directly. Signed-off-by: Krzysztof Kozlowski Acked-by: Sudeep Holla Acked-by: Shawn Guo Signed-off-by: Olof Johansson arch/arm/configs/cm_x2xx_defconfig | 1 - arch/arm/configs/cm_x300_defconfig | 1 - arch/arm/configs/colibri_pxa270_defconfig | 1 - arch/arm/configs/colibri_pxa300_defconfig | 1 - arch/arm/configs/collie_defconfig | 1 - arch/arm/configs/corgi_defconfig | 1 - arch/arm/configs/em_x270_defconfig | 1 - arch/arm/configs/eseries_pxa_defconfig | 1 - arch/arm/configs/ezx_defconfig | 1 - arch/arm/configs/imote2_defconfig | 1 - arch/arm/configs/integrator_defconfig | 1 - arch/arm/configs/jornada720_defconfig | 1 - arch/arm/configs/lpc18xx_defconfig | 1 - arch/arm/configs/lpc32xx_defconfig | 1 - arch/arm/configs/magician_defconfig | 1 - arch/arm/configs/mini2440_defconfig | 1 - arch/arm/configs/mmp2_defconfig | 1 - arch/arm/configs/mxs_defconfig | 1 - arch/arm/configs/nhk8815_defconfig | 1 - arch/arm/configs/omap1_defconfig | 1 - arch/arm/configs/palmz72_defconfig | 1 - arch/arm/configs/pxa3xx_defconfig | 1 - arch/arm/configs/pxa_defconfig | 1 - arch/arm/configs/qcom_defconfig | 1 - arch/arm/configs/realview_defconfig | 1 - arch/arm/configs/s3c6400_defconfig | 1 - arch/arm/configs/sama5_defconfig | 1 - arch/arm/configs/spear3xx_defconfig | 1 - arch/arm/configs/spitz_defconfig | 1 - arch/arm/configs/trizeps4_defconfig | 1 - arch/arm/configs/u300_defconfig | 1 - arch/arm/configs/versatile_defconfig | 1 - arch/arm/configs/vexpress_defconfig | 1 - arch/arm/configs/viper_defconfig | 1 - arch/arm/configs/zeus_defconfig | 1 - 35 files changed, 35 deletions(-) commit 7d0ed30433aa88c94411b6c078a7985a6e7c889f Author: Dan Carpenter Date: Wed Jun 19 13:01:41 2019 +0300 drm: self_refresh: Fix a reversed condition in drm_self_refresh_helper_cleanup() This test is flipped around so it either leads to a memory leak or a NULL dereference. Fixes: 1452c25b0e60 ("drm: Add helpers to kick off self refresh mode in drivers") Signed-off-by: Dan Carpenter Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190619100141.GA28596@mwanda drivers/gpu/drm/drm_self_refresh_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8c965642354950cd17d1edff57fd5ca965040517 Author: Fabrizio Castro Date: Tue Jun 18 16:18:38 2019 +0100 arm64: dts: renesas: r8a774a1: Add HDMI encoder instance Add the HDMI encoder to the R8A774A1 DT in disabled state. Signed-off-by: Fabrizio Castro Reviewed-by: Laurent Pinchart Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a774a1.dtsi | 32 +++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 74a22e8f4350a9e096c84fc9e88cf72abf71887c Author: Fabrizio Castro Date: Tue Jun 18 16:18:37 2019 +0100 dt-bindings: display: renesas: Add r8a774a1 support Document RZ/G2M (R8A774A1) SoC bindings. Signed-off-by: Fabrizio Castro Reviewed-by: Laurent Pinchart Signed-off-by: Simon Horman Documentation/devicetree/bindings/display/bridge/renesas,dw-hdmi.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ecf890235575bfda0c9b575022a754aeea9e896c Merge: f82695814c39 d2cac68e0d9b Author: Olof Johansson Date: Wed Jun 19 06:27:32 2019 -0700 Merge tag 'samsung-dt-5.3' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/dt Samsung DTS ARM changes for v5.3 1. Fixes for minor warnings. 2. Enable ADC on Exynos5410 Odroid XU board. * tag 'samsung-dt-5.3' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: dts: exynos: Add ADC node to Exynos5410 and Odroid XU ARM: dts: exynos: Raise maximum buck regulator voltages on Arndale Octa ARM: dts: exynos: Move CPU OPP tables out of SoC node on Exynos5420 Signed-off-by: Olof Johansson commit f82695814c39239fb05a6982355a57b983a05547 Merge: 65004867c953 b8e65c1939ff Author: Olof Johansson Date: Wed Jun 19 06:27:01 2019 -0700 Merge tag 'vexpress-updates-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/dt ARMv7 Vexpress updates for v5.3 1. Couple of updates switching to use new/updated bindings for CoreSight dynamic funnel components and NOR flash partition type 2. Disable NOR flash on Vexpress TC2 platform as it conflicts with CPU power management. This follows what we have on ARMv8 Juno platform and is required after recent commit that enabled CFI NOR FLASH in multi_v7 defconfig * tag 'vexpress-updates-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: ARM: dts: vexpress: set the right partition type for NOR flash arm: dts: vexpress-v2p-ca15_a7: disable NOR flash node by default ARM: dts: vexpress-v2p-ca15_a7: update coresight DT bindings Signed-off-by: Olof Johansson commit 65004867c953807f3ac6f4232a56d3d62d139dac Merge: b3dbb6e3efff 7f8e78ca90e2 Author: Olof Johansson Date: Wed Jun 19 06:26:35 2019 -0700 Merge tag 'juno-updates-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/dt ARMv8 Juno updates for v5.3 Couple of updates switching to use new/updated bindings for CoreSight dynamic funnel components and NOR flash partition type * tag 'juno-updates-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: arm64: dts: juno: set the right partition type for NOR flash arm64: dts: juno: update coresight DT bindings Signed-off-by: Olof Johansson commit b3dbb6e3efff6e13c2dc818dd470b3779e9550b8 Merge: 0164a087a69a 22a7fc15cf1e Author: Olof Johansson Date: Wed Jun 19 06:25:55 2019 -0700 Merge tag 'omap-for-v5.3/ti-sysc-dt-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/dt ti-sysc dts changes for v5.3 We can now drop the custom dts property "ti,hwmods" for drivers that have the ti-sysc interconnect target module configured in dts. Let's start with a minimal changes to omap4 uart and mmc. We use omap4 as the starting point as it has runtime PM implemented and all the omap variants after that are based on it with similar clkctrl clock for the modules. More devices will be updated later on as they get tested. Note that these changes are based on the related ti-sysc driver changes. * tag 'omap-for-v5.3/ti-sysc-dt-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (21 commits) ARM: dts: Drop legacy custom hwmods property for omap4 mmc ARM: dts: Drop legacy custom hwmods property for omap4 uart bus: ti-sysc: Detect uarts also on omap34xx bus: ti-sysc: Do rstctrl reset handling in two phases bus: ti-sysc: Add support for disabling module without legacy mode bus: ti-sysc: Set ENAWAKEUP if available bus: ti-sysc: Handle swsup idle mode quirks bus: ti-sysc: Handle clockactivity for enable and disable bus: ti-sysc: Enable interconnect target module autoidle bit on enable bus: ti-sysc: Allow QUIRK_LEGACY_IDLE even if legacy_mode is not set bus: ti-sysc: Make OCP reset work for sysstatus and sysconfig reset bits bus: ti-sysc: Support 16-bit writes too bus: ti-sysc: Add support for missing clockdomain handling ARM: dts: dra71x: Disable usb4_tm target module ARM: dts: dra71x: Disable rtc target module ARM: dts: dra76x: Disable usb4_tm target module ARM: dts: dra76x: Disable rtc target module ARM: dts: dra76x: Update MMC2_HS200_MANUAL1 iodelay values ARM: dts: am57xx-idk: Remove support for voltage switching for SD card bus: ti-sysc: Handle devices with no control registers ... Signed-off-by: Olof Johansson commit 0164a087a69a52370c4c56fbcf55242340081642 Merge: 3aa45174e135 8f62581f820d Author: Olof Johansson Date: Wed Jun 19 06:25:29 2019 -0700 Merge tag 'omap-for-v5.3/dt-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/dt dts changes for omap variants for v5.3 This series of changes improves support for few boards: - configure another lcd type for logicpd torpedo devkit - a series of updates for am335x phytec boards - configure mmc card detect pin for am335x-baltos * tag 'omap-for-v5.3/dt-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: am335x-baltos: add support for MMC1 CD pin ARM: dts: am335x-baltos: Fix PHY mode for ethernet ARM: dts: Add support for phyBOARD-REGOR-AM335x ARM: dts: am335x-pcm-953: Remove eth phy delay ARM: dts: am335x-pcm-953: Update user led names ARM: dts: am335x-phycore-som: Enable gpmc node in dts files ARM: dts: am335x-phycore-som: Add emmc node ARM: dts: am335x phytec boards: Remove regulator node ARM: dts: Add LCD type 28 support to LogicPD Torpedo DM3730 devkit Signed-off-by: Olof Johansson commit 3aa45174e135dfe2b58bf7e301fb4513d2271856 Merge: 3990c9918af3 f8526c2d99ca Author: Olof Johansson Date: Wed Jun 19 06:24:21 2019 -0700 Merge tag 'arm-soc/for-5.3/devicetree-arm64' of https://github.com/Broadcom/stblinux into arm/dt This pull request contains Broadcom ARM64-based SoCs Device Tree changes for 5.3, please pull the following: - Pramod adds the Device Tree nodes for thermal support on Stingray - Srinath adds the Device Tree nodes for both XHCI (host) and BDC (device) modes - Rayagonda adds the Device Tree node for slave I2C operation when Stingray operates as a SmartNIC * tag 'arm-soc/for-5.3/devicetree-arm64' of https://github.com/Broadcom/stblinux: arm64: dts: Stingray: Add NIC i2c device node arm64: dts: Add USB DT nodes for Stingray SoC arm64: dts: stingray: Add Stingray Thermal DT support. Signed-off-by: Olof Johansson commit 4d0664ab88109099045df38b5288ef5c7726575f Merge: 2ee692802b8f 2443091408c2 Author: Bartlomiej Zolnierkiewicz Date: Wed Jun 19 15:26:28 2019 +0200 Merge branch 'topic/remove-fbcon-notifiers' of git://anongit.freedesktop.org/drm/drm-misc into fbdev-for-next Trivial buildfix (export fbcon_update_vcs symbol) from Daniel Vetter. commit 3990c9918af3a206c6d68ea5e00bcdb279c8b2fc Merge: 5b8ea6bfa497 45fa7c383871 Author: Olof Johansson Date: Wed Jun 19 06:22:43 2019 -0700 Merge tag 'v5.3-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/dt PCIe for rockpro64, wifi+bt for Rock-PI4, spi for Rock960 family and a fix for the yet unused isp-iommus. * tag 'v5.3-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: arm64: dts: rockchip: add WiFi+BT support on ROCK Pi4 board arm64: dts: rockchip: fix isp iommu clocks and power domain arm64: dts: rockchip: Enable SPI1 on Ficus arm64: dts: rockchip: Enable SPI0 and SPI4 on Rock960 arm64: dts: rockchip: add PCIe nodes on rk3399-rockpro64 Signed-off-by: Olof Johansson commit 5b8ea6bfa4972366d14c205319874c99141e714c Merge: 0763d0c2273a b8925b7c2f86 Author: Olof Johansson Date: Wed Jun 19 06:22:09 2019 -0700 Merge tag 'v5.3-rockchip-dts32-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/dt A lot more love for rk3288 in general and veyron specially with changes all over the place. * tag 'v5.3-rockchip-dts32-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: (21 commits) ARM: dts: rockchip: Split GPIO keys for veyron into multiple devices ARM: dts: rockchip: Add HDMI i2c unwedging for rk3288-veyron ARM: dts: rockchip: Add unwedge pinctrl entries for dw_hdmi on rk3288 ARM: dts: rockchip: Switch to builtin HDMI DDC bus on rk3288-veyron ARM: dts: rockchip: Add pin names for rk3288-veyron jaq, mickey, speedy ARM: dts: rockchip: fix pwm-cells for rk3288's pwm3 ARM: dts: rockchip: Configure the GPU thermal zone for mickey ARM: dts: rockchip: Use the GPU to cool CPU thermal zone of veyron mickey ARM: dts: rockchip: remove GPU 500 MHz OPP on rk3288 ARM: dts: rockchip: Use GPU as cooling device for the GPU thermal zone of the rk3288 ARM: dts: rockchip: Add #cooling-cells entry for rk3288 GPU ARM: dts: rockchip: Mark that the rk3288 timer might stop in suspend ARM: dts: rockchip: Add pin names for rk3288-veyron-jerry ARM: dts: rockchip: Add pin names for rk3288-veyron-minnie ARM: dts: raise GPU trip point temperature for speedy to 80 degC ARM: dts: rockchip: raise GPU trip point temperatures for veyron ARM: dts: rockchip: raise CPU trip point temperature for veyron to 100 degC ARM: dts: rockchip: Make rk3288-veyron-minnie run at hs200 ARM: dts: rockchip: Make rk3288-veyron-mickey's emmc work again ARM: dts: rockchip: Remove bogus 'i2s_clk_out' from rk3288-veyron-mickey ... Signed-off-by: Olof Johansson commit 2ee692802b8f6c54bd6499addd3d07c2833d84d8 Merge: 0f5a5712ad1e 1dcff4ae6518 Author: Bartlomiej Zolnierkiewicz Date: Wed Jun 19 15:18:48 2019 +0200 Merge tag 'topic/remove-fbcon-notifiers-2019-06-14-1' of git://anongit.freedesktop.org/drm/drm-misc into fbdev-for-next topic/remove-fbcon-notifiers: - remove fbdev notifier usage for fbcon, as prep work to clean up the fbcon locking - assorted locking checks in vt/console code - assorted notifier and cleanups in fbdev and backlight code One trivial merge conflict fixed. Signed-off-by: Bartlomiej Zolnierkiewicz commit 0763d0c2273a3c72247d325c48fbac3d918d6b87 Author: Andy Gross Date: Sat Jun 8 23:19:32 2019 -0500 arm64: qcom: qcs404: Add reset-cells to GCC node This patch adds a reset-cells property to the gcc controller on the QCS404. Without this in place, we get warnings like the following if nodes reference a gcc reset: arch/arm64/boot/dts/qcom/qcs404.dtsi:261.38-310.5: Warning (resets_property): /soc@0/remoteproc@b00000: Missing property '#reset-cells' in node /soc@0/clock-controller@1800000 or bad phandle (referred from resets[0]) also defined at arch/arm64/boot/dts/qcom/qcs404-evb.dtsi:82.18-84.3 DTC arch/arm64/boot/dts/qcom/qcs404-evb-4000.dtb arch/arm64/boot/dts/qcom/qcs404.dtsi:261.38-310.5: Warning (resets_property): /soc@0/remoteproc@b00000: Missing property '#reset-cells' in node /soc@0/clock-controller@1800000 or bad phandle (referred from resets[0]) also defined at arch/arm64/boot/dts/qcom/qcs404-evb.dtsi:82.18-84.3 Signed-off-by: Andy Gross Reviewed-by: Niklas Cassel Reviewed-by: Vinod Koul Signed-off-by: Olof Johansson arch/arm64/boot/dts/qcom/qcs404.dtsi | 1 + 1 file changed, 1 insertion(+) commit c311f4ff2b55176a33234b60b87536e7e4c5c60a Author: Baolin Wang Date: Tue Jun 4 16:14:29 2019 +0800 arm64: dts: sprd: Add Spreadtrum SD host controller support Add one Spreadtrum SD host controller to support eMMC card for Spreadtrum SC9860 platform. Signed-off-by: Baolin Wang Signed-off-by: Olof Johansson arch/arm64/boot/dts/sprd/whale2.dtsi | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit 0dfe186a452f9f0538148a68e6299c0051f587c5 Merge: 9e0babf2c06c 62a5017bf825 Author: Olof Johansson Date: Wed Jun 19 06:15:10 2019 -0700 Merge tag 'integrator-dts-v5.3-arm-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator into arm/dt DTS updates for the Integrator, target kernel v5.3. * tag 'integrator-dts-v5.3-arm-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator: ARM: dts: vexpress: specify AFS partition ARM: dts: realview: specify AFS partition ARM: dts: versatile: specify AFS partition ARM: dts: integrator: specify AFS partition Signed-off-by: Olof Johansson commit 387e3746d01c34457d6a73688acd90428725070b Author: Amir Goldstein Date: Fri Jun 7 17:24:38 2019 +0300 locks: eliminate false positive conflicts for write lease check_conflicting_open() is checking for existing fd's open for read or for write before allowing to take a write lease. The check that was implemented using i_count and d_count is an approximation that has several false positives. For example, overlayfs since v4.19, takes an extra reference on the dentry; An open with O_PATH takes a reference on the dentry although the file cannot be read nor written. Change the implementation to use i_readcount and i_writecount to eliminate the false positive conflicts and allow a write lease to be taken on an overlayfs file. The change of behavior with existing fd's open with O_PATH is symmetric w.r.t. current behavior of lease breakers - an open with O_PATH currently does not break a write lease. This increases the size of struct inode by 4 bytes on 32bit archs when CONFIG_FILE_LOCKING is defined and CONFIG_IMA was not already defined. Signed-off-by: Amir Goldstein Signed-off-by: Jeff Layton fs/locks.c | 42 +++++++++++++++++++++++++++--------------- include/linux/fs.h | 4 ++-- 2 files changed, 29 insertions(+), 17 deletions(-) commit d51f527f44f96276a94c191bc160de051f64aeea Author: Ira Weiny Date: Wed Jun 5 18:45:34 2019 -0700 locks: Add trace_leases_conflict Signed-off-by: Ira Weiny Signed-off-by: Jeff Layton fs/locks.c | 20 +++++++++++++++----- include/trace/events/filelock.h | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 5 deletions(-) commit 1ee008f240ad5401f683ec3b79a2e3b044a82a89 Author: Jani Nikula Date: Wed Jun 19 15:32:25 2019 +0300 drm/i915: Update DRIVER_DATE to 20190619 Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_drv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 45e0f30c30bb131663fbe1752974d6f2e39611e2 Author: David Howells Date: Thu May 30 14:53:10 2019 +0100 keys: Add capability-checking keyctl function Add a keyctl function that requests a set of capability bits to find out what features are supported. Signed-off-by: David Howells include/uapi/linux/keyctl.h | 14 ++++++++++++++ security/keys/compat.c | 3 +++ security/keys/internal.h | 2 ++ security/keys/keyctl.c | 35 +++++++++++++++++++++++++++++++++++ 4 files changed, 54 insertions(+) commit aed2a26283528fb69c38e414f649411aa48fb391 Author: Jörgen Storvist Date: Wed Jun 19 00:30:19 2019 +0200 USB: serial: option: add support for GosunCn ME3630 RNDIS mode Added USB IDs for GosunCn ME3630 cellular module in RNDIS mode. T: Bus=03 Lev=01 Prnt=01 Port=01 Cnt=03 Dev#= 18 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=19d2 ProdID=0601 Rev=03.18 S: Manufacturer=Android S: Product=Android S: SerialNumber=b950269c C: #Ifs= 5 Cfg#= 1 Atr=a0 MxPwr=500mA I: If#=0x0 Alt= 0 #EPs= 1 Cls=e0(wlcon) Sub=01 Prot=03 Driver=rndis_host I: If#=0x1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=rndis_host I: If#=0x2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option I: If#=0x3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option I: If#=0x4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option Signed-off-by: Jörgen Storvist Cc: stable Signed-off-by: Johan Hovold drivers/usb/serial/option.c | 1 + 1 file changed, 1 insertion(+) commit 64ee5067cf64f948449201579d89829b5c693c16 Author: Kuninori Morimoto Date: Wed Jun 19 10:19:44 2019 +0900 ASoC: soc-utils: remove dummy Platform ALSA SoC used 2 type of Platform if sound card doesn't need Platform. 1) use Dummy Platform as Platform component 2) use CPU component as Platform component Now, ALSA SoC allows "no Platform" settings, and it will behave same as 2) case selection. And, all sound card which doesn't need specific Platform are now not selecting Platform any more. This means, no sound card is using dummy Platform on ALSA SoC any more. This patch removes unused dummy Platform. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/soc-utils.c | 25 ------------------------- 1 file changed, 25 deletions(-) commit 961fb3c206dc84febe87cc433ca321eb6587ec66 Author: Kuninori Morimoto Date: Wed Jun 19 10:19:40 2019 +0900 ASoC: rockchip: rk3399_gru_sound: don't select unnecessary Platform ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/rockchip/rk3399_gru_sound.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) commit 0814c6412967bac140ef9878ad48e1f30e5afba3 Author: Kuninori Morimoto Date: Wed Jun 19 10:19:35 2019 +0900 ASoC: qcom: don't select unnecessary Platform ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/qcom/common.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2f5309452dc044a133c36c6e75170eb5f7450088 Author: Chris Wilson Date: Tue Jun 18 08:41:30 2019 +0100 drm/i915: Stop passing I915_WAIT_LOCKED to i915_request_wait() Since commit eb8d0f5af4ec ("drm/i915: Remove GPU reset dependence on struct_mutex"), the I915_WAIT_LOCKED flags passed to i915_request_wait() has been defunct. Now go ahead and remove it from all callers. References: eb8d0f5af4ec ("drm/i915: Remove GPU reset dependence on struct_mutex") Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190618074153.16055-3-chris@chris-wilson.co.uk .../gpu/drm/i915/gem/selftests/i915_gem_context.c | 14 +++------- drivers/gpu/drm/i915/gt/intel_ringbuffer.c | 2 +- drivers/gpu/drm/i915/gt/intel_workarounds.c | 2 +- drivers/gpu/drm/i915/gt/selftest_hangcheck.c | 9 +++---- drivers/gpu/drm/i915/gt/selftest_lrc.c | 24 +++++++---------- drivers/gpu/drm/i915/gt/selftest_workarounds.c | 6 ++--- drivers/gpu/drm/i915/i915_active.h | 2 +- drivers/gpu/drm/i915/i915_request.c | 4 --- drivers/gpu/drm/i915/i915_trace.h | 3 +-- drivers/gpu/drm/i915/selftests/i915_request.c | 30 ++++++++-------------- drivers/gpu/drm/i915/selftests/i915_timeline.c | 6 ++--- 11 files changed, 36 insertions(+), 66 deletions(-) commit 6f043744573520095bdee9e532d75574060e62f4 Author: Kuninori Morimoto Date: Wed Jun 19 10:19:31 2019 +0900 ASoC: simple-card-utils: don't select unnecessary Platform ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/simple-card-utils.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 9ae6cdb184b651bf48b9feed4f947468ff1c3c1f Author: Kuninori Morimoto Date: Wed Jun 19 10:19:28 2019 +0900 ASoC: ux500: mop500: don't select unnecessary Platform ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/ux500/mop500.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit f0edc6c1ee48c947d762b0e21b8d3f61858f47f0 Author: Kuninori Morimoto Date: Wed Jun 19 10:19:24 2019 +0900 ASoC: ti: rx51: don't select unnecessary Platform ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/ti/rx51.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit bfe1273c65e1c97ed3861fecd4812f2feeb67800 Author: Kuninori Morimoto Date: Wed Jun 19 10:19:18 2019 +0900 ASoC: ti: omap-twl4030: don't select unnecessary Platform ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/ti/omap-twl4030.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit edba13aeae88feda7b689bccbbcdc911377a3fdd Author: Kuninori Morimoto Date: Wed Jun 19 10:19:14 2019 +0900 ASoC: ti: omap-hdmi: don't select unnecessary Platform ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/ti/omap-hdmi.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 1306ab2eddd1ede09da7a849ef92c3c820d6850e Author: Kuninori Morimoto Date: Wed Jun 19 10:19:11 2019 +0900 ASoC: ti: omap-abe-twl6040: don't select unnecessary Platform ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/ti/omap-abe-twl6040.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) commit f46da1b9046ed80748a58e9b3c701fb7297a50e2 Author: Kuninori Morimoto Date: Wed Jun 19 10:19:08 2019 +0900 ASoC: ti: davinci-evm: don't select unnecessary Platform ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/ti/davinci-evm.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 567b374d99733ff4bee751636bb3d34e81c6a7e8 Author: Kuninori Morimoto Date: Wed Jun 19 10:19:04 2019 +0900 ASoC: tegra: trimslice: don't select unnecessary Platform ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/tegra/trimslice.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 5d62677238e94c0c347b386c3d9787b17d92a4c8 Author: Kuninori Morimoto Date: Wed Jun 19 10:19:00 2019 +0900 ASoC: tegra: tegra_wm9712: don't select unnecessary Platform ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/tegra/tegra_wm9712.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit b28d985271578efa4eaefba92f22182820b23930 Author: Kuninori Morimoto Date: Wed Jun 19 10:18:55 2019 +0900 ASoC: tegra: tegra_wm8903: don't select unnecessary Platform ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/tegra/tegra_wm8903.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 404b229b84afa2ffba14ea83e52d1434d7698520 Author: Kuninori Morimoto Date: Wed Jun 19 10:18:51 2019 +0900 ASoC: tegra: tegra_wm8753: don't select unnecessary Platform ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/tegra/tegra_wm8753.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit cee1cf3f9f9ed7b5fecfcd194cbb7e3718d8da5f Author: Kuninori Morimoto Date: Wed Jun 19 10:18:48 2019 +0900 ASoC: tegra: tegra_sgtl5000: don't select unnecessary Platform ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/tegra/tegra_sgtl5000.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit d035d13b2277ee71babb6a16d31ecdc2f35da189 Author: Kuninori Morimoto Date: Wed Jun 19 10:18:44 2019 +0900 ASoC: tegra: tegra_rt5677: don't select unnecessary Platform ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/tegra/tegra_rt5677.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 1d641e1523ca401c7e873684b5b65e362c278119 Author: Kuninori Morimoto Date: Wed Jun 19 10:18:40 2019 +0900 ASoC: tegra: tegra_rt5640: don't select unnecessary Platform ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/tegra/tegra_rt5640.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 4bfd08540b443ae4e40faf2c385cd9799f5da4d4 Author: Kuninori Morimoto Date: Wed Jun 19 10:18:36 2019 +0900 ASoC: tegra: tegra_max98090: don't select unnecessary Platform ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/tegra/tegra_max98090.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit e7fc99e641da1f0da50328c98e7aa890b49d35d3 Author: Kuninori Morimoto Date: Wed Jun 19 10:18:31 2019 +0900 ASoC: tegra: tegra_alc5632: don't select unnecessary Platform ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/tegra/tegra_alc5632.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 3f780533bac9025f3e569ebf5ebdc02bd860b27e Author: Kuninori Morimoto Date: Wed Jun 19 10:18:27 2019 +0900 ASoC: sunxi: sun4i-codec: don't select unnecessary Platform ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sunxi/sun4i-codec.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit e562a5f13c9451e732d13b0a5ad58b6c99ccee8f Author: Kuninori Morimoto Date: Wed Jun 19 10:18:22 2019 +0900 ASoC: sirf: sirf-audio: don't select unnecessary Platform ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sirf/sirf-audio.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit ae7cbcc43b8c275b9f9b2491144110d260cd6b18 Author: Kuninori Morimoto Date: Wed Jun 19 10:18:17 2019 +0900 ASoC: samsung: tm2_wm5110: don't select unnecessary Platform ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/samsung/tm2_wm5110.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit a555b6a959e6a1539d8a1dc6a48d5c8920d7724e Author: Kuninori Morimoto Date: Wed Jun 19 10:18:12 2019 +0900 ASoC: samsung: snow: don't select unnecessary Platform ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/samsung/snow.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit d815e0f08fdd6259c9fff9eb4dc1834454526e98 Author: Kuninori Morimoto Date: Wed Jun 19 10:18:09 2019 +0900 ASoC: samsung: smdk_wm8994: don't select unnecessary Platform ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/samsung/smdk_wm8994.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 33949eb5019d4b319e89eb6469a622ebbba30cd5 Author: Kuninori Morimoto Date: Wed Jun 19 10:18:04 2019 +0900 ASoC: samsung: arndale_rt5631: don't select unnecessary Platform ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/samsung/arndale_rt5631.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 27a37973a6f1d508398f6ef1b140e8433870fe8a Author: Kuninori Morimoto Date: Wed Jun 19 10:18:00 2019 +0900 ASoC: rockchip: rockchip_rt5645: don't select unnecessary Platform ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/rockchip/rockchip_rt5645.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 7df405ae58953a6e880921d1948c33cd357c6ed4 Author: Kuninori Morimoto Date: Wed Jun 19 10:17:55 2019 +0900 ASoC: rockchip: rockchip_max98090: don't select unnecessary Platform ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/rockchip/rockchip_max98090.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 9c21e82c165c009563928f4c0fe21a579352ae5b Author: Kuninori Morimoto Date: Wed Jun 19 10:17:51 2019 +0900 ASoC: rockchip: rk3288_hdmi_analog: don't select unnecessary Platform ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/rockchip/rk3288_hdmi_analog.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 3caf11fa88a954916c14c719b89478f4d89386d5 Author: Kuninori Morimoto Date: Wed Jun 19 10:17:26 2019 +0900 ASoC: qcom: storm: don't select unnecessary Platform ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/qcom/storm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 5646843879699a8774c560126b4da4ced97d9b9c Author: Kuninori Morimoto Date: Wed Jun 19 10:17:22 2019 +0900 ASoC: qcom: apq8016_sbc: don't select unnecessary Platform ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/qcom/apq8016_sbc.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 5f92229d184b80712a8b94d098318960171ae749 Author: Kuninori Morimoto Date: Wed Jun 19 10:17:18 2019 +0900 ASoC: mxs: mxs-sgtl5000: don't select unnecessary Platform ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/mxs/mxs-sgtl5000.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 717f163317127bc5fdc0d90ad42e3d309dac0df0 Author: Kuninori Morimoto Date: Wed Jun 19 10:17:14 2019 +0900 ASoC: kirkwood: armada-370-db: don't select unnecessary Platform ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/kirkwood/armada-370-db.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit d8893261a7d327302520eb9bebb72c5040c2219f Author: Kuninori Morimoto Date: Wed Jun 19 10:17:10 2019 +0900 ASoC: fsl: imx-audmix: don't select unnecessary Platform ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/fsl/imx-audmix.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 014f07ca1cb12947aea7c9132efe920c5b003b29 Author: Kuninori Morimoto Date: Wed Jun 19 10:17:06 2019 +0900 ASoC: fsl: imx-spdif: don't select unnecessary Platform ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/fsl/imx-spdif.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 82bf78ca49a3a048dcb61620f88d1ae40553ab88 Author: Kuninori Morimoto Date: Wed Jun 19 10:16:57 2019 +0900 ASoC: fsl: imx-sgtl5000: don't select unnecessary Platform ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/fsl/imx-sgtl5000.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 577cf50d4dc865af13be05d201abbd5a4a4d4be8 Author: Kuninori Morimoto Date: Wed Jun 19 10:16:51 2019 +0900 ASoC: fsl: imx-es8328: don't select unnecessary Platform ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/fsl/imx-es8328.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit e57a4c2f15df27929303624477b7409405aba0ad Author: Kuninori Morimoto Date: Wed Jun 19 10:16:47 2019 +0900 ASoC: fsl: fsl-asoc-card: don't select unnecessary Platform ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/fsl/fsl-asoc-card.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 2058ea1c4f514a01bc0eba68ffe193d6f39bee43 Author: Kuninori Morimoto Date: Wed Jun 19 10:16:42 2019 +0900 ASoC: fsl: eukrea-tlv320: don't select unnecessary Platform ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/fsl/eukrea-tlv320.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 655368dfc75e86fc69cb8f92260c675c28929bc8 Author: Kuninori Morimoto Date: Wed Jun 19 10:16:35 2019 +0900 ASoC: atmel: tse850-pcm5142: don't select unnecessary Platform ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/atmel/tse850-pcm5142.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit ced5b08020cdd4e2bed194dc35dba504221006ae Author: Kuninori Morimoto Date: Wed Jun 19 10:16:10 2019 +0900 ASoC: atmel: sam9x5_wm8731: don't select unnecessary Platform ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/atmel/sam9x5_wm8731.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit bfc7938e58142a583a8141f55e453fa1bb68439d Author: Kuninori Morimoto Date: Wed Jun 19 10:15:26 2019 +0900 ASoC: atmel: sam9g20_wm8731: don't select unnecessary Platform ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/atmel/sam9g20_wm8731.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 318ebbe8060d9664370c844029246f0588263fe4 Author: Kuninori Morimoto Date: Wed Jun 19 10:15:05 2019 +0900 ASoC: atmel: mikroe-proto: don't select unnecessary Platform ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/atmel/mikroe-proto.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 3609750e9d4ba9db7027866827a0e462fbe86866 Author: Kuninori Morimoto Date: Wed Jun 19 10:14:48 2019 +0900 ASoC: atmel: atmel_wm8904: don't select unnecessary Platform ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/atmel/atmel_wm8904.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 7baf32e164da5d447f9525f51fa48665fbf1cd8a Author: Kuninori Morimoto Date: Wed Jun 19 10:14:28 2019 +0900 ASoC: atmel: atmel-pdmic: don't select unnecessary Platform ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/atmel/atmel-pdmic.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 02602401e53168a66d9c5fbf0b16bae0826f8145 Author: Kuninori Morimoto Date: Wed Jun 19 10:14:23 2019 +0900 ASoC: atmel: atmel-classd: don't select unnecessary Platform ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/atmel/atmel-classd.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 6c6de1c9e2bf2a0901ca1f2a169d1a2f9fd27958 Author: Kuninori Morimoto Date: Wed Jun 19 10:14:12 2019 +0900 ASoC: vc4: vc4_hdmi: don't select unnecessary Platform ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown drivers/gpu/drm/vc4/vc4_hdmi.c | 4 ---- 1 file changed, 4 deletions(-) commit 1d76898928783d79bfd7c465e891b6cf957c839a Author: Kuninori Morimoto Date: Wed Jun 19 10:14:07 2019 +0900 ASoC: soc-core: allow no Platform on dai_link dai_link is used to selecting Component (= CPU/Codec/Platform) and DAI (= CPU/Codec). And selected CPU/Codec/Platform components are *listed* on Card. Many drivers don't need special Platform component, but was mandatory at legacy style ALSA SoC. Thus, there is this kind of settings on many drivers. dai_link->platform_of_node = dai_link->cpu_of_node; In this case, soc_bind_dai_link() will pick-up "CPU component" as "Platform component", and try to add it to snd_soc_pcm_runtime. But it will be ignored, because it is already added when CPU bindings. Historically, this kind of "CPU component" is used/selected as "Platform" on many ALSA SoC drivers. OTOH, Dummy Platform will be selected automatically by ALSA SoC if driver doesn't have Platform settings. These indicates that there are 2 type of Platforms exist at current ALSA SoC if driver doesn't need special Platform. 1) use Dummy Platform as Platform component 2) use CPU component as Platform component ALSA SoC will call Dummy Platform callback function if it is using Dummy Platform, but it is completely pointless. Because it is the sound card which doesn't need special Platform. Thus, the behavior we request to ALSA SoC is selecting 2) automatically instead of 1) if sound card doesn't need special Platform. And, 2) means "do nothing" as above explain. These were needed at legacy style dai_link, but is no longer needed at modern style dai_link anymore. This patch allows "no Platform" settings on dai_link, and will do nothing for it if there was no platform settings. This is same as 2). By this patch, all drivers which is selecting "CPU component" as "Platform" can remove such settings. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/soc.h | 2 +- sound/soc/soc-core.c | 64 +++++++++++++++++++++++++++------------------------- 2 files changed, 34 insertions(+), 32 deletions(-) commit df9091e9d3f4500bc6fb15f5d2a1c2614f67004c Author: Ben Zhang Date: Tue Jun 18 17:45:55 2019 -0600 ASoC: rt5677: handle concurrent interrupts The rt5677 driver writes to the IRQ control register within the IRQ handler in order to flip the polarity of the interrupts that have been signalled. If an interrupt fires in the interval between the regmap_read and the regmap_write, it will not trigger a new call to rt5677_irq. Add a bounded loop to rt5677_irq that keeps checking interrupts until none are seen, so that any interrupts that are signalled in that interval are correctly handled. Signed-off-by: Ben Zhang Signed-off-by: Fletcher Woodruff Signed-off-by: Mark Brown sound/soc/codecs/rt5677.c | 71 ++++++++++++++++++++++++++++++----------------- 1 file changed, 45 insertions(+), 26 deletions(-) commit 4f7b018b55db0361718161e1471d8b7a16fdfa47 Author: Ben Zhang Date: Tue Jun 18 17:45:54 2019 -0600 ASoC: rt5677: clear interrupts by polarity flip The rt5677 jack detection function has a requirement that the polarity of an interrupt be flipped after it fires in order to clear the interrupt. This patch implements an irq_chip with irq_domain directly instead of using regmap-irq, so that interrupt source line polarities can be flipped in the irq handler. The reason that this patch does not add this feature within regmap-irq is that future patches will add hotword detection support to this irq handler. Those patches will require adding additional logic that would not make sense to have in regmap-irq. Signed-off-by: Ben Zhang Signed-off-by: Fletcher Woodruff Signed-off-by: Mark Brown sound/soc/codecs/rt5677.c | 173 ++++++++++++++++++++++++++++++++++++---------- sound/soc/codecs/rt5677.h | 8 ++- 2 files changed, 145 insertions(+), 36 deletions(-) commit 90b86fcc47b4d186f92cd66393fe51871615b4cc Author: Paul Cercueil Date: Mon Jun 3 17:23:31 2019 +0200 DRM: Add KMS driver for the Ingenic JZ47xx SoCs Add a KMS driver for the Ingenic JZ47xx family of SoCs. This driver is meant to replace the aging jz4740-fb driver. This driver does not make use of the simple pipe helper, for the reason that it will soon be updated to support more advanced features like multiple planes, IPU integration for colorspace conversion and up/down scaling, support for DSI displays, and TV-out and HDMI outputs. Notes: v2: - Remove custom handling of panel. The panel is now discovered using the standard API. - Lots of small tweaks suggested by upstream v3: - Use devm_drm_dev_init() - Update compatible strings to -lcd instead of -drm - Add destroy() callbacks to plane and crtc - The ingenic,lcd-mode is now read from the bridge's DT node v4: Remove ingenic,lcd-mode property completely. The various modes are now deduced from the connector type, the pixel format or the bus flags. v5: - Fix framebuffer size incorrectly calculated for 24bpp framebuffers - Use 32bpp framebuffer instead of 16bpp, as it'll work with both 16-bit and 24-bit panel - Get rid of drm_format_plane_cpp() which has been dropped upstream - Avoid using drm_format_info->depth, which is deprecated. Signed-off-by: Paul Cercueil Tested-by: Artur Rojek Reviewed-by: Sam Ravnborg Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20190603152331.23160-2-paul@crapouillou.net drivers/gpu/drm/Kconfig | 2 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/ingenic/Kconfig | 16 + drivers/gpu/drm/ingenic/Makefile | 1 + drivers/gpu/drm/ingenic/ingenic-drm.c | 818 ++++++++++++++++++++++++++++++++++ 5 files changed, 838 insertions(+) commit 34884dba294488304adf702d8d16feba768bad6d Author: Paul Cercueil Date: Mon Jun 3 17:23:30 2019 +0200 dt-bindings: Add doc for the Ingenic JZ47xx LCD controller driver Add documentation for the devicetree bindings of the LCD controller present in the JZ47xx family of SoCs from Ingenic. Signed-off-by: Paul Cercueil Tested-by: Artur Rojek Reviewed-by: Rob Herring Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20190603152331.23160-1-paul@crapouillou.net .../devicetree/bindings/display/ingenic,lcd.txt | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit 73591341014d394a03e54607ffdcccd0b8e2e000 Author: Chris Wilson Date: Tue Jun 18 12:07:36 2019 +0100 drm/i915/execlists: Detect cross-contamination with GuC The process_csb routine from execlists_submission is incompatible with the GuC backend. Add a warning to detect if we accidentally end up in the wrong spot. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Michal Wajdeczko Cc: Michał Winiarski Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190618110736.31155-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gt/intel_lrc.c | 1 + 1 file changed, 1 insertion(+) commit 44d89409a12eb8333735958509d7d591b461d13d Author: Chris Wilson Date: Tue Jun 18 08:41:35 2019 +0100 drm/i915: Make the semaphore saturation mask global The idea behind keeping the saturation mask local to a context backfired spectacularly. The premise with the local mask was that we would be more proactive in attempting to use semaphores after each time the context idled, and that all new contexts would attempt to use semaphores ignoring the current state of the system. This turns out to be horribly optimistic. If the system state is still oversaturated and the existing workloads have all stopped using semaphores, the new workloads would attempt to use semaphores and be deprioritised behind real work. The new contexts would not switch off using semaphores until their initial batch of low priority work had completed. Given sufficient backload load of equal user priority, this would completely starve the new work of any GPU time. To compensate, remove the local tracking in favour of keeping it as global state on the engine -- once the system is saturated and semaphores are disabled, everyone stops attempting to use semaphores until the system is idle again. One of the reason for preferring local context tracking was that it worked with virtual engines, so for switching to global state we could either do a complete check of all the virtual siblings or simply disable semaphores for those requests. This takes the simpler approach of disabling semaphores on virtual engines. The downside is that the decision that the engine is saturated is a local measure -- we are only checking whether or not this context was scheduled in a timely fashion, it may be legitimately delayed due to user priorities. We still have the same dilemma though, that we do not want to employ the semaphore poll unless it will be used. v2: Explain why we need to assume the worst wrt virtual engines. Fixes: ca6e56f654e7 ("drm/i915: Disable semaphore busywaits on saturated systems") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Dmitry Rogozhkin Cc: Dmitry Ermilov Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190618074153.16055-8-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gt/intel_context.c | 2 -- drivers/gpu/drm/i915/gt/intel_context_types.h | 2 -- drivers/gpu/drm/i915/gt/intel_engine_pm.c | 2 ++ drivers/gpu/drm/i915/gt/intel_engine_types.h | 2 ++ drivers/gpu/drm/i915/gt/intel_lrc.c | 16 +++++++++++++++- drivers/gpu/drm/i915/i915_request.c | 4 ++-- 6 files changed, 21 insertions(+), 7 deletions(-) commit 16395ceee11f8f8af764bac76adc20a43ba1a153 Author: Bjorn Andersson Date: Mon Jun 17 22:28:13 2019 -0700 ASoC: qcom: common: Fix NULL pointer in of parser A snd_soc_dai_link_component is allocated and associated with the first link, so when the code tries to assign the of_node of the second link's "cpu" member it dereferences a NULL pointer. Fix this by moving the allocation and assignement of snd_soc_dai_link_components into the loop, giving us one pair per link. Fixes: 1e36ea360ab9 ("ASoC: qcom: common: use modern dai_link style") Signed-off-by: Bjorn Andersson Acked-by: Srinivas Kandagatla Signed-off-by: Mark Brown sound/soc/qcom/common.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit e711223ad35b326a597ebd3a6acc8276fd38e25c Author: Keyon Jie Date: Wed Jun 19 02:15:39 2019 +0800 ASoC: Intel: sof-rt5682: correct naming for dmic16k Change the link name to be "dmic16k", the cpu_dai_name to be "DMIC16k Pin", to be aligned with other machine drivers. Signed-off-by: Keyon Jie Signed-off-by: Bard liao Acked-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/boards/sof_rt5682.c | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) commit 1eed6bc03f5409f0367780d4045bf3036e51b7ee Author: Xun Zhang Date: Wed Jun 19 02:15:38 2019 +0800 ASoC: Intel: sof-rt5682: add MCLK support for BYT platform The sof-rt5682 machine driver currently uses BCLK on BYT/Minnowboard platform. The MCLK signal is available since the Turbot revision, so enable MCLK on BYT/Minnowboard Turbot platform. Signed-off-by: Xun Zhang Signed-off-by: Bard liao Acked-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/boards/sof_rt5682.c | 65 ++++++++++++++++++++++++++++++++++++- 1 file changed, 64 insertions(+), 1 deletion(-) commit b5e3cf410b486a2415ff09b12f3ef18aba9f53ff Author: Ard Biesheuvel Date: Wed Jun 19 11:52:54 2019 +0200 spi/acpi: fix incorrect ACPI parent check The ACPI device object parsing code for SPI slaves enumerates the entire ACPI namespace to look for devices that refer to the master in question via the 'resource_source' field in the 'SPISerialBus' resource. If that field does not refer to a valid ACPI device or if it refers to the wrong SPI master, we should disregard the device. Current, the valid device check is wrong, since it gets the polarity of 'status' wrong. This could cause issues if the 'resource_source' field is bogus but parent_handle happens to refer to the correct master (which is not entirely imaginary since this code runs in a loop) So test for ACPI_FAILURE() instead, to make the code more self explanatory. Fixes: 4c3c59544f33 ("spi/acpi: enumerate all SPI slaves in the namespace") Reported-by: kbuild test robot Reported-by: Dan Carpenter Cc: Mika Westerberg Cc: andy.shevchenko@gmail.com Cc: masahisa.kojima@linaro.org Cc: "Rafael J. Wysocki" Cc: Jarkko Nikula Cc: linux-acpi@vger.kernel.org Cc: Lukas Wunner Signed-off-by: Ard Biesheuvel Acked-by: Mika Westerberg Signed-off-by: Mark Brown drivers/spi/spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5f174cf75a8cb14d50c1cecfb3884ae82f754058 Author: Kuninori Morimoto Date: Wed Jun 19 10:27:52 2019 +0900 ASoC: soc.h: fixup for_each_card_links() macro Macro is using "link", not "dai_link" Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/soc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 264b9436d23b065cb74d76dff49b4ffac2cee11e Author: james qian wang (Arm Technology China) Date: Wed Jun 12 11:20:18 2019 +0100 drm/komeda: Enable writeback split support Writeback split is also for workaround the size limitation of d71 scaler. Like layer_split, writeback downscaling also can use two scalers to handle the scaling half-by-half. The only differnence is writback needs a standalone component (splitter)'s help to split the composition result. The data pipeline of writeback split as below: /-> scaler-0 ->\ compiz -> splitter merger -> wb_layer -> memory \-> scaler-1 ->/ v2: Rebase Signed-off-by: James Qian Wang (Arm Technology China) Signed-off-by: Liviu Dudau .../gpu/drm/arm/display/komeda/komeda_pipeline.h | 4 + .../drm/arm/display/komeda/komeda_pipeline_state.c | 117 ++++++++++++++++++--- .../drm/arm/display/komeda/komeda_wb_connector.c | 17 ++- 3 files changed, 124 insertions(+), 14 deletions(-) commit 4b9baf74ef732f611bbd267f7b8ffcfb163d667b Author: james qian wang (Arm Technology China) Date: Wed Jun 12 11:20:12 2019 +0100 drm/komeda: Add new component komeda_splitter Similar to Layer Split, but Splitter is used for writeback, which splits the compiz result to two half parts and then feed them to two scalers. v2: Rebase Signed-off-by: James Qian Wang (Arm Technology China) Signed-off-by: Liviu Dudau .../gpu/drm/arm/display/komeda/d71/d71_component.c | 63 ++++++++++++++++++++++ .../gpu/drm/arm/display/komeda/komeda_pipeline.c | 3 ++ .../gpu/drm/arm/display/komeda/komeda_pipeline.h | 19 ++++++- .../drm/arm/display/komeda/komeda_private_obj.c | 50 +++++++++++++++++ 4 files changed, 133 insertions(+), 2 deletions(-) commit f461d6591f33e0344d1211e50e76a837f9e43169 Author: james qian wang (Arm Technology China) Date: Fri May 24 04:16:47 2019 +0100 drm/komeda: Accept null writeback configurations for writeback User may send null writeback configurations for writeback connector like: - Only bind the writeback connector to crtc. - set a fb_id(0) to writeback_fb_id_property All above configurations are meaningless for writeback, but since they are still valid configurations, accept them. Depends on: - https://patchwork.freedesktop.org/series/60856/ Signed-off-by: James Qian Wang (Arm Technology China) Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 420810cec63bfd15069de1681605f137a8886d25 Author: james qian wang (Arm Technology China) Date: Fri May 24 03:55:45 2019 +0100 drm/komeda: Refine function to_d71_input_id Since the component_state->input[i] is only valid when it is active, the content of input[i] is undefined if it is inactive. The user must check the state->active_inputs with input index firstly before using state->input[i]. Refine the function to_d71_input_id and directly move such check into it. Simplify the using and avoid problem that caller forget the valid check. Depends on: - https://patchwork.freedesktop.org/series/60856/ Signed-off-by: James Qian Wang (Arm Technology China) Signed-off-by: Liviu Dudau .../gpu/drm/arm/display/komeda/d71/d71_component.c | 32 ++++++++++++---------- 1 file changed, 17 insertions(+), 15 deletions(-) commit 3b9dfa4ef28c7dfb847cd3f8f97e7b92686c3e76 Author: Lowry Li (Arm Technology China) Date: Tue Jun 11 12:13:39 2019 +0100 drm/komeda: Add slave pipeline support One crtc can use two komeda_pipeline, and one works as master and as slave. the slave pipeline doesn't have its own output and timing ctrlr, but pre-composite the input layer data flow and then feed the result to master. the pipeline configuration like: slave-layer-0 \ ... slave->CU slave-layer-4 / \ \ master-layer-0 --------> master->CU -> ... ... / master-layer-4 ------> Since komeda Compiz doesn't output alpha, so the slave->CU result only can be used as bottom input when blend it with master input data flows. Signed-off-by: Lowry Li (Arm Technology China) Reviewed-by: James Qian Wang (Arm Technology China) Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/display/komeda/komeda_crtc.c | 41 ++++++++++++++++++++-- drivers/gpu/drm/arm/display/komeda/komeda_kms.c | 10 ++++++ drivers/gpu/drm/arm/display/komeda/komeda_kms.h | 9 +++++ .../gpu/drm/arm/display/komeda/komeda_pipeline.c | 22 ++++++++++++ .../gpu/drm/arm/display/komeda/komeda_pipeline.h | 2 ++ .../drm/arm/display/komeda/komeda_pipeline_state.c | 15 ++++++++ drivers/gpu/drm/arm/display/komeda/komeda_plane.c | 32 ++++++++++++++++- 7 files changed, 128 insertions(+), 3 deletions(-) commit a407a65093937f6ced4a2ae30d3290088b41df87 Author: james qian wang (Arm Technology China) Date: Mon Jun 10 11:16:08 2019 +0100 drm/komeda: Add layer split support Komeda supports two types of layer split: - none-scaling split - scaling split Since D71 merger only support scaler as input, so for none-scaling split, the two layer dflow will be output to compiz directly. for scaling_split, the data flow will be merged by merger firstly, then output the merged data flow to compiz. Komeda handles the split in kernel completely to hide the detailed and complicated split calcualtion to user mode, for user only need to set the layer_split property to enable/disable it. v2: Rebase Signed-off-by: James Qian Wang (Arm Technology China) Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/display/komeda/komeda_kms.c | 8 + drivers/gpu/drm/arm/display/komeda/komeda_kms.h | 22 +- .../gpu/drm/arm/display/komeda/komeda_pipeline.c | 23 +- .../gpu/drm/arm/display/komeda/komeda_pipeline.h | 12 + .../drm/arm/display/komeda/komeda_pipeline_state.c | 300 ++++++++++++++++++++- drivers/gpu/drm/arm/display/komeda/komeda_plane.c | 24 +- 6 files changed, 378 insertions(+), 11 deletions(-) commit b35d0927d3b02ccef061113268c202b7b9fac695 Author: james qian wang (Arm Technology China) Date: Mon Jun 10 11:16:02 2019 +0100 drm/komeda: Add split support for scaler To achieve same caling effect compare with none split, the texel calculation need to use the same scaling ratio before split, so add "total_xxx" to pipeline to describe the hsize/vsize before split. Update pipeline and d71_scaler_update accordingly. v2: Rebase and addressed Liviu's comments Signed-off-by: James Qian Wang (Arm Technology China) Signed-off-by: Liviu Dudau .../gpu/drm/arm/display/komeda/d71/d71_component.c | 47 +++++++++++++++++++--- .../gpu/drm/arm/display/komeda/komeda_pipeline.h | 19 +++++++-- .../drm/arm/display/komeda/komeda_pipeline_state.c | 18 ++++++++- drivers/gpu/drm/arm/display/komeda/komeda_plane.c | 11 ++--- .../drm/arm/display/komeda/komeda_wb_connector.c | 2 +- 5 files changed, 80 insertions(+), 17 deletions(-) commit 9a28105f5a439d3dc5e595042b3f97b1bb4cd4f1 Author: james qian wang (Arm Technology China) Date: Mon Jun 10 11:15:55 2019 +0100 drm/komeda: Add component komeda_merger Introduce a new component komeda_merger, because D71 HW supports to split a whole image to two half parts and does the scaling independently. Merger merges two separate results to one, and output it to compositor or wb_layer For this patch: - Add the definition of komeda_merger/merger_state - Report and initialize komeda_merger according to the D71 HW. v2: Rebase Signed-off-by: James Qian Wang (Arm Technology China) Signed-off-by: Liviu Dudau .../gpu/drm/arm/display/komeda/d71/d71_component.c | 74 ++++++++++++++++++++++ .../gpu/drm/arm/display/komeda/komeda_pipeline.c | 3 + .../gpu/drm/arm/display/komeda/komeda_pipeline.h | 18 +++++- .../drm/arm/display/komeda/komeda_private_obj.c | 49 ++++++++++++++ 4 files changed, 143 insertions(+), 1 deletion(-) commit 619053220a7d5620d26d60d1848ca9c681bea830 Author: james qian wang (Arm Technology China) Date: Wed Jun 5 11:35:45 2019 +0100 dt/bindings: drm/komeda: Unify mclk/pclk/pipeline->aclk to one ACLK Current komeda driver uses three dedicated clks for a specific purpose: - mclk: main engine clock - pclk: APB clock - pipeline->aclk: AXI clock. But per spec the komeda HW only has three input clks: - ACLK: used for AXI masters, APB slave and most pipeline processing - PXCLK for pipeline 0: output pixel clock for pipeline 0 - PXCLK for pipeline 1: output pixel clock for pipeline 1 So one ACLK is enough, no need to split it to three mclk/pclk/axiclk. Signed-off-by: James Qian Wang (Arm Technology China) Signed-off-by: Liviu Dudau Documentation/devicetree/bindings/display/arm,komeda.txt | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 6f84da0c74f12f9dbcc612cced6b1fa07965415d Author: james qian wang (Arm Technology China) Date: Wed Jun 5 11:35:39 2019 +0100 drm/komeda: Rename main engine clk name "mclk" to "aclk" To avoid confusion, unify the driver main engine clk name "mclk" to the spec name "aclk". Signed-off-by: James Qian Wang (Arm Technology China) Signed-off-by: Liviu Dudau .../gpu/drm/arm/display/komeda/d71/d71_component.c | 10 +++---- drivers/gpu/drm/arm/display/komeda/komeda_crtc.c | 34 +++++++++++----------- drivers/gpu/drm/arm/display/komeda/komeda_dev.c | 18 ++++++------ drivers/gpu/drm/arm/display/komeda/komeda_dev.h | 4 +-- drivers/gpu/drm/arm/display/komeda/komeda_kms.h | 6 ++-- .../gpu/drm/arm/display/komeda/komeda_pipeline.h | 4 +-- .../drm/arm/display/komeda/komeda_pipeline_state.c | 4 +-- 7 files changed, 40 insertions(+), 40 deletions(-) commit 28be315c9c0c0b8d1093fcddf3245398108b83fd Author: james qian wang (Arm Technology China) Date: Wed Jun 5 11:35:32 2019 +0100 drm/komeda: Unify mclk/pclk/pipeline->aclk to one MCLK Current komeda driver uses three dedicated clks for a specific purpose: - mclk: main engine clock - pclk: APB clock - pipeline->aclk: AXI clock. But per spec the komeda HW only has three input clks: - ACLK: used for AXI masters, APB slave and most pipeline processing - PXCLK for pipeline 0: output pixel clock for pipeline 0 - PXCLK for pipeline 1: output pixel clock for pipeline 1 So one ACLK is enough, no need to split it to three mclk/pclk/axiclk. drop pclk/pipeline->axiclk. but only keep one mclk in komeda driver. Signed-off-by: James Qian Wang (Arm Technology China) Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/display/komeda/komeda_crtc.c | 11 -------- drivers/gpu/drm/arm/display/komeda/komeda_dev.c | 33 +++++----------------- drivers/gpu/drm/arm/display/komeda/komeda_dev.h | 2 -- .../gpu/drm/arm/display/komeda/komeda_pipeline.c | 1 - .../gpu/drm/arm/display/komeda/komeda_pipeline.h | 2 -- 5 files changed, 7 insertions(+), 42 deletions(-) commit 109bd7d5f4c2db66541272e5a41aeabd6cfeef95 Author: Lowry Li (Arm Technology China) Date: Mon May 20 04:33:19 2019 +0100 drm/komeda: Adds zorder support - Creates the zpos property. - Implement komeda_crtc_normalize_zpos to replace drm_atomic_normalize_zpos, reasons as the following: 1. The drm_atomic_normalize_zpos allows to configure same zpos for different planes, but komeda doesn't support such configuration. 2. For further slave pipline case, Komeda need to calculate the max_slave_zorder, we will merge such calculation into komed_crtc_normalize_zpos to save a separated plane_state loop. 3. For feature none-scaling layer_split, which a plane_state will be assigned to two individual layers(left/right), which requires two normalize_zpos for this plane, plane_st->normalize_zpos will be used by left layer, normalize_zpos + 1 for right_layer. This patch series depends on: - https://patchwork.freedesktop.org/series/58710/ - https://patchwork.freedesktop.org/series/59000/ - https://patchwork.freedesktop.org/series/59002/ - https://patchwork.freedesktop.org/series/59747/ - https://patchwork.freedesktop.org/series/59915/ - https://patchwork.freedesktop.org/series/60083/ - https://patchwork.freedesktop.org/series/60698/ Signed-off-by: Lowry Li (Arm Technology China) Reviewed-by: James Qian Wang (Arm Technology China) Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/display/komeda/komeda_kms.c | 90 ++++++++++++++++++++++- drivers/gpu/drm/arm/display/komeda/komeda_kms.h | 3 + drivers/gpu/drm/arm/display/komeda/komeda_plane.c | 6 +- 3 files changed, 97 insertions(+), 2 deletions(-) commit 04e84545b9805f6a141fce0b1f05fb74551094fc Author: james qian wang (Arm Technology China) Date: Fri May 17 11:05:13 2019 +0100 drm/komeda: Add format support for Y0L2, P010, YUV420_8/10BIT - Y0L2 and P010 are block (tiled) format, Update the kemeda logic to compatible with such block format. - Since DRM introduced a general block information to drm_format_info, the format_caps->tiled_size no long needed, delete it. - Build some fb utils functions for code sharing. Signed-off-by: James Qian Wang (Arm Technology China) Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/display/include/malidp_io.h | 7 +++ .../gpu/drm/arm/display/komeda/d71/d71_component.c | 58 +++++++++-------- drivers/gpu/drm/arm/display/komeda/d71/d71_dev.c | 72 ++++++++++------------ .../drm/arm/display/komeda/komeda_format_caps.h | 2 - .../drm/arm/display/komeda/komeda_framebuffer.c | 57 +++++++++-------- 5 files changed, 97 insertions(+), 99 deletions(-) commit df860f98bcd52c5425b40eb53e6a46ddbb6f1adc Author: james qian wang (Arm Technology China) Date: Fri May 17 11:05:06 2019 +0100 drm/komeda: Add komeda_fb_check_src_coords Add komeda_fb_check_src_coords and check if the layer configured src rect can meet the requirement of fb and fb format. Signed-off-by: James Qian Wang (Arm Technology China) Signed-off-by: Liviu Dudau .../drm/arm/display/komeda/komeda_framebuffer.c | 21 +++++++++++++ .../drm/arm/display/komeda/komeda_framebuffer.h | 2 ++ .../drm/arm/display/komeda/komeda_pipeline_state.c | 34 +++++++++++++++------- 3 files changed, 46 insertions(+), 11 deletions(-) commit 6af386db05635db7cc3fac4d1d38a83b953f7251 Author: Lowry Li (Arm Technology China) Date: Thu Jun 6 10:53:10 2019 +0100 dt/bindings: drm/komeda: Adds SMMU support for D71 devicetree Updates the device-tree doc about how to enable SMMU by devicetree. Signed-off-by: Lowry Li (Arm Technology China) Reviewed-by: Liviu Dudau Reviewed-by: James Qian Wang (Arm Technology China) Signed-off-by: Liviu Dudau Documentation/devicetree/bindings/display/arm,komeda.txt | 7 +++++++ 1 file changed, 7 insertions(+) commit e87cae37f6006f5cebb2ae2b39daf39be7fc0a27 Author: Lowry Li (Arm Technology China) Date: Thu Jun 6 10:53:05 2019 +0100 drm/komeda: Adds SMMU support Adds iommu_connect and disconnect for SMMU support, and configures TBU translation once SMMU has been attached to the display device. Signed-off-by: Lowry Li (Arm Technology China) [fixed checking of error code returned by dp_wait_cond() and removed extraneous DRM_ERROR() calls] Signed-off-by: Liviu Dudau .../gpu/drm/arm/display/komeda/d71/d71_component.c | 5 +++ drivers/gpu/drm/arm/display/komeda/d71/d71_dev.c | 49 ++++++++++++++++++++++ drivers/gpu/drm/arm/display/komeda/komeda_dev.c | 17 ++++++++ drivers/gpu/drm/arm/display/komeda/komeda_dev.h | 7 ++++ .../drm/arm/display/komeda/komeda_framebuffer.c | 2 + .../drm/arm/display/komeda/komeda_framebuffer.h | 2 + 6 files changed, 82 insertions(+) commit 9682dee9822246c4ea3d320ff8c96afc54163c89 Author: Lowry Li (Arm Technology China) Date: Thu May 16 07:13:13 2019 +0100 drm/komeda: Enable color-encoding (YUV format) support Adds color-encoding properties if layer can support YUV format. Updates HW YUV-RGB matrix state according to the color-encoding properties. Signed-off-by: Lowry Li (Arm Technology China) Reviewed-by: James Qian Wang (Arm Technology China) Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/display/komeda/Makefile | 1 + .../gpu/drm/arm/display/komeda/d71/d71_component.c | 6 ++ .../gpu/drm/arm/display/komeda/komeda_color_mgmt.c | 67 ++++++++++++++++++++++ .../gpu/drm/arm/display/komeda/komeda_color_mgmt.h | 17 ++++++ drivers/gpu/drm/arm/display/komeda/komeda_plane.c | 13 +++++ 5 files changed, 104 insertions(+) commit 97e659d4670fc78ef7e0d2e7500d54a402c0a0be Author: Lowry Li (Arm Technology China) Date: Thu May 16 07:13:09 2019 +0100 drm/komeda: Update HW up-sampling on D71 Updates HW up-sampling method according to the format type. Signed-off-by: Lowry Li (Arm Technology China) Reviewed-by: James Qian Wang (Arm Technology China) Signed-off-by: Liviu Dudau .../gpu/drm/arm/display/komeda/d71/d71_component.c | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 19358630f3a570e7ced509a65c28693840d2ae65 Author: Lowry Li (Arm Technology China) Date: Mon Apr 22 04:16:30 2019 +0100 drm/komeda: Adds limitation check for AFBC wide block not support Rot90 Komeda series hardware doesn't support Rot90 for AFBC wide block. So add limitation check to reject it if such configuration has been posted. Signed-off-by: Lowry Li (Arm Technology China) Reviewed-by: James Qian Wang (Arm Technology China) Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/display/komeda/d71/d71_dev.c | 15 +++++++++++++++ .../gpu/drm/arm/display/komeda/komeda_format_caps.c | 7 ++++++- .../gpu/drm/arm/display/komeda/komeda_format_caps.h | 8 +++++++- .../gpu/drm/arm/display/komeda/komeda_framebuffer.c | 18 +++++++++--------- .../gpu/drm/arm/display/komeda/komeda_framebuffer.h | 5 +++-- .../gpu/drm/arm/display/komeda/komeda_pipeline_state.c | 8 +++++++- drivers/gpu/drm/arm/display/komeda/komeda_plane.c | 2 +- 7 files changed, 48 insertions(+), 15 deletions(-) commit 429bfabe00549c3a5db4d7d6aacd7852a1f53f12 Author: Lowry Li (Arm Technology China) Date: Mon Apr 22 04:16:26 2019 +0100 drm/komeda: Add rotation support on Komeda driver - Adds rotation property to plane. - Komeda display rotation support diverges from the specific formats, so need to check the user required rotation type with the format caps and reject the commit if it can not be supported. - In the layer validate flow, sets the rotation value to the layer state. If r90 or r270, swap the width and height of the data flow for next stage. Signed-off-by: Lowry Li (Arm Technology China) Reviewed-by: James Qian Wang (Arm Technology China) Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/display/komeda/komeda_format_caps.h | 11 +++++++++++ .../gpu/drm/arm/display/komeda/komeda_pipeline_state.c | 7 +++++++ drivers/gpu/drm/arm/display/komeda/komeda_plane.c | 16 ++++++++++++++++ 3 files changed, 34 insertions(+) commit 0e52ab9ff0fc8a1cb9ea11c5fed4c2c4e47ae899 Author: Lowry Li (Arm Technology China) Date: Wed May 15 04:02:05 2019 +0100 drm/komeda: Clear enable bit in CU_INPUTx_CONTROL Besides clearing the input ID to zero, D71 compiz also has input enable bit in CU_INPUTx_CONTROL which need to be cleared. Signed-off-by: Lowry Li (Arm Technology China) Reviewed-by: James Qian Wang (Arm Technology China) Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/display/komeda/d71/d71_component.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit ebf68996de0ab250c5d520eb2291ab65643e9a1e Author: Liviu Dudau Date: Wed Jun 5 11:48:01 2019 +0100 arm/komeda: Convert dp_wait_cond() to return an error code. dp_wait_cond() currently returns the number of retries left over which is hardly an useful information. Convert to returning -ETIMEDOUT when the wait times out, or 0 (zero) when condition is met before deadline. Also convert the users of the function to return the error value. Signed-off-by: Liviu Dudau Reviewed-by: James Qian Wang (Arm Technology China) drivers/gpu/drm/arm/display/include/malidp_utils.h | 5 ++--- drivers/gpu/drm/arm/display/komeda/d71/d71_dev.c | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) commit 62ffc39320e6135235c659687324b393d4215300 Author: Lowry Li (Arm Technology China) Date: Fri May 24 10:20:24 2019 +0100 drm/komeda: Creates plane alpha and blend mode properties Creates plane alpha and blend mode properties attached to plane. This patch depends on: - https://patchwork.freedesktop.org/series/59915/ - https://patchwork.freedesktop.org/series/58665/ - https://patchwork.freedesktop.org/series/59000/ - https://patchwork.freedesktop.org/series/59002/ - https://patchwork.freedesktop.org/series/59471/ Changes since v1: - Adds patch denpendency in the comment Changes since v2: - Remove [RFC] from the subject Changes since v3: - Rebase the code Signed-off-by: Lowry Li (Arm Technology China) Reviewed-by: James Qian Wang (Arm Technology China) Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/display/komeda/komeda_plane.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 42b6f118f6d11268d652ce4946fef25a2611c39d Author: james qian wang (Arm Technology China) Date: Thu May 23 12:10:27 2019 +0100 drm/komeda: Add image enhancement support Besides scaling, Arm display scaler also can support image enhancement. For support it, Add a new property "img_enhancement" to plane, then user can turn on/off it by this property, and kernel follow user's requirement to maitain the state and enable/disable the real HW image enhancement. v2: Rebase and rename "needs_img_enhancement" to "en_img_enhancement" Signed-off-by: James Qian Wang (Arm Technology China) Signed-off-by: Liviu Dudau .../gpu/drm/arm/display/komeda/d71/d71_component.c | 1 + drivers/gpu/drm/arm/display/komeda/komeda_kms.h | 6 +- .../gpu/drm/arm/display/komeda/komeda_pipeline.h | 6 +- .../drm/arm/display/komeda/komeda_pipeline_state.c | 6 +- drivers/gpu/drm/arm/display/komeda/komeda_plane.c | 73 +++++++++++++++++++++- 5 files changed, 85 insertions(+), 7 deletions(-) commit 1f7f9ab7900ec92c0beac0660cdce37d6af02d38 Author: james qian wang (Arm Technology China) Date: Thu May 23 12:10:21 2019 +0100 drm/komeda: Add engine clock requirement check for the downscaling For downscaling there is a restriction, the downscaling needed engine clock can not acceed the real engine clock, and the clock requirement mostly depend on the specific HW, to solve this problem: 1. Add a pipeline func - downscaling_clk_check for CORE to query the real HW if downscaling can be supported. 2. Add new property clock ratio which is the ratio of: (mclk << 32) / pxlclk then User driver can use this ratio to do the clock check to avoid post an invalid downscaling to kernel. v2: Rebase and Delete debug print Signed-off-by: James Qian Wang (Arm Technology China) Signed-off-by: Liviu Dudau .../gpu/drm/arm/display/komeda/d71/d71_component.c | 45 +++++++++++++++ drivers/gpu/drm/arm/display/komeda/d71/d71_dev.c | 2 +- drivers/gpu/drm/arm/display/komeda/d71/d71_dev.h | 2 + drivers/gpu/drm/arm/display/komeda/komeda_crtc.c | 66 +++++++++++++++++++++- drivers/gpu/drm/arm/display/komeda/komeda_kms.h | 8 +++ .../gpu/drm/arm/display/komeda/komeda_pipeline.h | 8 ++- .../drm/arm/display/komeda/komeda_pipeline_state.c | 17 +++++- 7 files changed, 142 insertions(+), 6 deletions(-) commit d92b66b875024f6b2ae90543039e2c030f084fbc Author: james qian wang (Arm Technology China) Date: Thu May 23 12:10:15 2019 +0100 drm/komeda: Add writeback scaling support 1. Add scaler to writeback pipeline to enable the writeback scaling support 2. Display HW can not do upscaling for writeback, check it when validate. v2: Rebase Signed-off-by: James Qian Wang (Arm Technology China) Signed-off-by: Liviu Dudau .../gpu/drm/arm/display/komeda/komeda_pipeline.h | 2 ++ .../drm/arm/display/komeda/komeda_pipeline_state.c | 36 +++++++++++++++++----- drivers/gpu/drm/arm/display/komeda/komeda_plane.c | 8 +---- .../drm/arm/display/komeda/komeda_wb_connector.c | 2 ++ 4 files changed, 34 insertions(+), 14 deletions(-) commit 6d30cbfbcdd6d9a7cd6b01b1eeeab3246af4c204 Author: james qian wang (Arm Technology China) Date: Thu May 23 12:10:09 2019 +0100 drm/komeda: Implement D71 scaler support 1. Add scaler component and initialize it according to D71 HW. 2. Implement d71_scaler_update/disable/dump v2: - Correct a typo - Constify component_funcs: d71_scaler_funcs Signed-off-by: James Qian Wang (Arm Technology China) Signed-off-by: Liviu Dudau .../gpu/drm/arm/display/komeda/d71/d71_component.c | 131 ++++++++++++++++++++- 1 file changed, 130 insertions(+), 1 deletion(-) commit 502932a03fceca1cb161eba5f30b18eb640aa8de Author: james qian wang (Arm Technology China) Date: Thu May 23 12:10:03 2019 +0100 drm/komeda: Add the initial scaler support for CORE This patch add the initial and necessary logic for CORE to support scaler: - Complete the struct komeda_scaler and komeda_scaler_state for adding the scaler specific features and capablities. - Implement komeda_scaler_validate to check the scaler with the data flow configurations. - Enable scaling support for plane input path (layer input data flow). v2: Fix a typo, and rename "needs_scaling" to "en_scaling" Signed-off-by: James Qian Wang (Arm Technology China) Signed-off-by: Liviu Dudau .../gpu/drm/arm/display/komeda/komeda_pipeline.c | 14 +++ .../gpu/drm/arm/display/komeda/komeda_pipeline.h | 20 +++- .../drm/arm/display/komeda/komeda_pipeline_state.c | 116 +++++++++++++++++++++ drivers/gpu/drm/arm/display/komeda/komeda_plane.c | 8 ++ 4 files changed, 157 insertions(+), 1 deletion(-) commit 7fded557c439642ca83559d57ceefd18cf125a01 Author: james qian wang (Arm Technology China) Date: Thu May 23 12:09:57 2019 +0100 drm/komeda: Attach scaler to drm as private object According to the komeda pipeline configuration, attach scaler to drm as private object. v2: Rebase Signed-off-by: James Qian Wang (Arm Technology China) Signed-off-by: Liviu Dudau .../drm/arm/display/komeda/komeda_private_obj.c | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) commit 65ad2392dd6d1691db93e82b08d3311298b9d64a Author: james qian wang (Arm Technology China) Date: Thu May 23 10:56:54 2019 +0100 drm/komeda: Added AFBC support for komeda driver For supporting AFBC: 1. Check if the user requested modifier can be supported by display HW. 2. Check the obj->size with AFBC's requirement. 3. Configure HW according to the modifier (afbc features) This patch depends on: - https://patchwork.freedesktop.org/series/59915/ - https://patchwork.freedesktop.org/series/59000/ v2: Rebase and addressed Ayan's comments Signed-off-by: James Qian Wang (Arm Technology China) Signed-off-by: Liviu Dudau .../gpu/drm/arm/display/komeda/d71/d71_component.c | 39 +++++++++++ .../drm/arm/display/komeda/komeda_format_caps.c | 53 +++++++++++++++ .../drm/arm/display/komeda/komeda_format_caps.h | 5 ++ .../drm/arm/display/komeda/komeda_framebuffer.c | 75 +++++++++++++++++++++- .../drm/arm/display/komeda/komeda_framebuffer.h | 4 ++ drivers/gpu/drm/arm/display/komeda/komeda_kms.c | 2 +- .../gpu/drm/arm/display/komeda/komeda_pipeline.h | 4 ++ .../drm/arm/display/komeda/komeda_pipeline_state.c | 18 +++++- drivers/gpu/drm/arm/display/komeda/komeda_plane.c | 15 ++++- 9 files changed, 210 insertions(+), 5 deletions(-) commit 5d51f6c0da1b563e2f8eb5022a4d7748aa687be4 Author: james qian wang (Arm Technology China) Date: Thu May 23 10:36:38 2019 +0100 drm/komeda: Add writeback support Komeda driver uses a individual component to describe the HW's writeback caps, but drivers doesn't define a new structure and still uses the existing "struct komeda_layer" to describe this new component. The detailed changes as follow: 1. Initialize wb_layer according to HW and report it to CORE. 2. CORE exposes wb_layer as a resource to KMS by private_obj. 3. Report writeback supporting by add a wb_connector to KMS, and then wb_connector will take act as a component resources user, so the func komeda_wb_encoder_atomic_check claims komeda resources (scaler and wb_layer) accroding to its state configuration to the wb_connector. and the wb_state configuration will be validated on the specific component resources to see if the caps of component can meet the requirement of wb_connector. if not check failed. 4. Update irq_handler to notify the completion of writeback. NOTE: This change doesn't add scaling writeback support, that support will be added in the future after the scaler support. v2: Rebase v3: Rebase and constify the d71_wb_layer_funcs v4: Addressed Ayan's comments Depends on: - https://patchwork.freedesktop.org/series/59915/ Signed-off-by: James Qian Wang (Arm Technology China) Acked-by: Ayan Kumar Halder Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/display/komeda/Makefile | 1 + .../gpu/drm/arm/display/komeda/d71/d71_component.c | 90 +++++++++- drivers/gpu/drm/arm/display/komeda/komeda_crtc.c | 15 ++ .../drm/arm/display/komeda/komeda_framebuffer.c | 19 +++ drivers/gpu/drm/arm/display/komeda/komeda_kms.c | 4 + drivers/gpu/drm/arm/display/komeda/komeda_kms.h | 27 +++ .../gpu/drm/arm/display/komeda/komeda_pipeline.h | 7 + .../drm/arm/display/komeda/komeda_pipeline_state.c | 51 +++++- .../drm/arm/display/komeda/komeda_private_obj.c | 6 + .../drm/arm/display/komeda/komeda_wb_connector.c | 181 +++++++++++++++++++++ 10 files changed, 398 insertions(+), 3 deletions(-) commit d609f60addfcb32bcaccc1d2339a9a261870ece4 Merge: bcb7416e3480 2443091408c2 Author: Maarten Lankhorst Date: Wed Jun 19 12:33:05 2019 +0200 Merge branch 'topic/remove-fbcon-notifiers' into drm-misc-next topic/remove-fbcon-notifiers: - remove fbdev notifier usage for fbcon, as prep work to clean up the fbcon locking - assorted locking checks in vt/console code - assorted notifier and cleanups in fbdev and backlight code This is the pull request that was sent out, plus the compile fix for sh4 reported by kbuild. Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Maarten Lankhorst commit bcb7416e3480c1abb46266bdab874b3b3d6124cb Merge: 90b2df5743cd 52d2d44eee80 Author: Maarten Lankhorst Date: Wed Jun 19 12:32:13 2019 +0200 Merge remote-tracking branch 'drm/drm-next' into drm-misc-next remove-fbcon-notifiers topic branch is based on rc4, so we need a fresh backmerge of drm-next to pull it in. Signed-off-by: Maarten Lankhorst commit 90b2df5743cd92f4525f662e8f12a536dfb58557 Author: Maxime Ripard Date: Wed Jun 19 12:17:53 2019 +0200 drm/vc4: hdmi: Set default state margin at reset Now that the TV margins are properly parsed and filled into drm_cmdline_mode, we just need to initialise the first state at reset to get those values and start using them. Acked-by: Eric Anholt Reviewed-by: Noralf Trønnes Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/44e24172e300be6a41578517021ef6a6e90ed682.1560783090.git-series.maxime.ripard@bootlin.com drivers/gpu/drm/vc4/vc4_hdmi.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit b7ced38916a95a0c66c3e3fc7af3ba2cf0f874af Author: Maxime Ripard Date: Wed Jun 19 12:17:52 2019 +0200 drm/selftests: Add command line parser selftests The command line parser is pretty tough to get right and very error prone, so let's add a selftest to try to catch any regression. Reviewed-by: Noralf Trønnes Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/735348d3a475ce0bcc88b46e093ab149023bb202.1560783090.git-series.maxime.ripard@bootlin.com drivers/gpu/drm/selftests/Makefile | 2 +- drivers/gpu/drm/selftests/drm_cmdline_selftests.h | 55 ++ .../gpu/drm/selftests/test-drm_cmdline_parser.c | 918 +++++++++++++++++++++ 3 files changed, 974 insertions(+), 1 deletion(-) commit 731514b446fe6748d5a55a3dff202efb45c7d8df Author: Maxime Ripard Date: Wed Jun 19 12:17:52 2019 +0200 drm/atomic: Add a function to reset connector TV properties During the connector reset, if that connector has a TV property, it needs to be reset to the value provided on the command line. Provide a helper to do that. Reviewed-by: Noralf Trønnes Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/84a7b657f09303a2850e1cc79e68f623547f3fdd.1560783090.git-series.maxime.ripard@bootlin.com drivers/gpu/drm/drm_atomic_state_helper.c | 18 ++++++++++++++++++ include/drm/drm_atomic_state_helper.h | 1 + 2 files changed, 19 insertions(+) commit 3d46a3007cd8f73bae502bf5c171977b91d7aacc Author: Maxime Ripard Date: Wed Jun 19 12:17:51 2019 +0200 drm/modes: Parse overscan properties Properly configuring the overscan properties might be needed for the initial setup of the framebuffer for display that still have overscan. Let's allow for more properties on the kernel command line to setup each margin. Reviewed-by: Noralf Trønnes Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/e481f1628e3768ca49226ec2115cfa4dfcbd5e4c.1560783090.git-series.maxime.ripard@bootlin.com Documentation/fb/modedb.txt | 2 ++ drivers/gpu/drm/drm_modes.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ include/drm/drm_connector.h | 5 +++++ 3 files changed, 51 insertions(+) commit 22045e8e52bd802f743f0471242782fc3b479707 Author: Maxime Ripard Date: Wed Jun 19 12:17:51 2019 +0200 drm/connector: Introduce a TV margins structure The TV margins has been defined as a structure inside the drm_connector_state structure so far. However, we will need it in other structures as well, so let's move that structure definition so that it can be reused. Reviewed-by: Noralf Trønnes Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/38b773b03f15ec7a135cdf8f7db669e5ada20cf2.1560783090.git-series.maxime.ripard@bootlin.com include/drm/drm_connector.h | 41 ++++++++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 11 deletions(-) commit 1bf4e09227c345e246062285eba4b8fe660e512e Author: Maxime Ripard Date: Wed Jun 19 12:17:51 2019 +0200 drm/modes: Allow to specify rotation and reflection on the commandline Rotations and reflections setup are needed in some scenarios to initialise properly the initial framebuffer. Some drivers already had a bunch of quirks to deal with this, such as either a private kernel command line parameter (omapdss) or on the device tree (various panels). In order to accomodate this, let's create a video mode parameter to deal with the rotation and reflexion. Reviewed-by: Noralf Trønnes Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/777da16e42db757c1f5b414b5ca34507097fed5c.1560783090.git-series.maxime.ripard@bootlin.com Documentation/fb/modedb.txt | 12 ++++ drivers/gpu/drm/drm_client_modeset.c | 30 +++++++++ drivers/gpu/drm/drm_modes.c | 114 +++++++++++++++++++++++++++++------ include/drm/drm_connector.h | 10 +++ 4 files changed, 146 insertions(+), 20 deletions(-) commit 3aeeb13d899627fe2b86bdbdcd0927cf7192234f Author: Maxime Ripard Date: Wed Jun 19 12:17:50 2019 +0200 drm/modes: Support modes names on the command line The drm subsystem also uses the video= kernel parameter, and in the documentation refers to the fbdev documentation for that parameter. However, that documentation also says that instead of giving the mode using its resolution we can also give a name. However, DRM doesn't handle that case at the moment. Even though in most case it shouldn't make any difference, it might be useful for analog modes, where different standards might have the same resolution, but still have a few different parameters that are not encoded in the modes (NTSC vs NTSC-J vs PAL-M for example). Reviewed-by: Noralf Trønnes Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/18443e0c3bdbbd16cea4ec63bc7f2079b820b43b.1560783090.git-series.maxime.ripard@bootlin.com drivers/gpu/drm/drm_client_modeset.c | 4 +++ drivers/gpu/drm/drm_connector.c | 3 +- drivers/gpu/drm/drm_modes.c | 62 ++++++++++++++++++++++++++---------- include/drm/drm_connector.h | 7 ++++ 4 files changed, 59 insertions(+), 17 deletions(-) commit e08ab74bd4c7a5fe311bc05f32dbb4f1e7fa3428 Author: Maxime Ripard Date: Wed Jun 19 12:17:49 2019 +0200 drm/modes: Rewrite the command line parser Rewrite the command line parser in order to get away from the state machine parsing the video mode lines. Hopefully, this will allow to extend it more easily to support named modes and / or properties set directly on the command line. Reviewed-by: Noralf Trønnes Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/e32cd4009153b184103554009135c7bf7c9975d7.1560783090.git-series.maxime.ripard@bootlin.com drivers/gpu/drm/drm_modes.c | 325 ++++++++++++++++++++++++++++---------------- 1 file changed, 210 insertions(+), 115 deletions(-) commit a99076e87e0644088b09182bba147754ba7238ad Author: Maxime Ripard Date: Wed Jun 19 12:17:49 2019 +0200 drm/client: Change drm_client_panel_rotation name The drm_client_panel_rotation function has been used so far to set the default rotation based on the panel orientation. However, we can have more sources of information to make that decision, starting with the command line that we will introduce later in this series. Change the name to remove the panel mention. Reviewed-by: Noralf Trønnes Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/8cb0f0d9569d41685bbf30a1538da6578cd2769b.1560783090.git-series.maxime.ripard@bootlin.com drivers/gpu/drm/drm_client_modeset.c | 12 ++++++------ drivers/gpu/drm/drm_fb_helper.c | 2 +- include/drm/drm_client.h | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) commit 307696d3b73406a266191b3fb977ac6e70b34e18 Author: Maxime Ripard Date: Wed Jun 19 12:17:48 2019 +0200 drm/client: Restrict the rotation check to the rotation itself The drm_client_rotation has a check on the rotation value, but the reflections are also stored in the same variable, and the check doesn't take this into account. Therefore, even though we might have a valid rotation, if we're also using a reflection parameter, the test will fail for no particular reason. Reviewed-by: Noralf Trønnes Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/cf4de0cdef20aac6c654b7b73c2ab3e317c46803.1560783090.git-series.maxime.ripard@bootlin.com drivers/gpu/drm/drm_client_modeset.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 46cc2d76a74a77e7abc94aa0aa378a8efaf82aa5 Author: Maxime Ripard Date: Wed Jun 19 12:17:48 2019 +0200 drm/client: Restrict the plane_state scope The drm_client_modeset_commit_atomic function uses two times the plane_state variable in inner blocks of code, but the variable has a scope global to this function. This will lead to inadvertent devs to reuse the variable in the second block with the value left by the first, without any warning from the compiler since value would have been initialized. Fix this by moving the variable declaration to the proper scope. Reviewed-by: Noralf Trønnes Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/8bd9696ea915a4ad08be6d93a4d9565e8d6aa2f3.1560783090.git-series.maxime.ripard@bootlin.com drivers/gpu/drm/drm_client_modeset.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 772cd52c5574b04b00a97d638b2cfe94c0c1a9b6 Author: Maxime Ripard Date: Wed Jun 19 12:17:48 2019 +0200 drm/connector: Add documentation for drm_cmdline_mode The struct drm_cmdline_mode holds the result of the command line parsers. However, it wasn't documented so far, so let's do that. Reviewed-by: Noralf Trønnes Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/963c893c16c6a25fc469b53c726f493d99bdc578.1560783090.git-series.maxime.ripard@bootlin.com include/drm/drm_connector.h | 86 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 84 insertions(+), 2 deletions(-) commit 52d2d44eee8091e740d0d275df1311fb8373c9a9 Merge: 2454fcea338a 9e0babf2c06c Author: Daniel Vetter Date: Wed Jun 19 12:04:55 2019 +0200 Merge v5.2-rc5 into drm-next Maarten needs -rc4 backmerged so he can pull in the fbcon notifier removal topic branch into drm-misc-next. Signed-off-by: Daniel Vetter commit d909f9109c301f4e9e41678025c45d719ab8f7d7 Author: Nicholas Piggin Date: Mon Jun 10 13:08:18 2019 +1000 powerpc/64s/radix: Enable HAVE_ARCH_HUGE_VMAP This sets the HAVE_ARCH_HUGE_VMAP option, and defines the required page table functions. This enables huge (2MB and 1GB) ioremap mappings. I don't have a benchmark for this change, but huge vmap will be used by a later core kernel change to enable huge vmalloc memory mappings. This improves cached `git diff` performance by about 5% on a 2-node POWER9 with 32MB size dentry cache hash. Profiling git diff dTLB misses with a vanilla kernel: 81.75% git [kernel.vmlinux] [k] __d_lookup_rcu 7.21% git [kernel.vmlinux] [k] strncpy_from_user 1.77% git [kernel.vmlinux] [k] find_get_entry 1.59% git [kernel.vmlinux] [k] kmem_cache_free 40,168 dTLB-miss 0.100342754 seconds time elapsed With powerpc huge vmalloc: 2,987 dTLB-miss 0.095933138 seconds time elapsed Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Documentation/admin-guide/kernel-parameters.txt | 2 +- arch/powerpc/Kconfig | 1 + arch/powerpc/include/asm/book3s/64/pgtable.h | 8 ++ arch/powerpc/mm/book3s64/radix_pgtable.c | 100 ++++++++++++++++++++++++ 4 files changed, 110 insertions(+), 1 deletion(-) commit d38153f9ccc9b6b6a27a91559999292c27b72b8c Author: Nicholas Piggin Date: Mon Jun 10 13:08:17 2019 +1000 powerpc/64s/radix: ioremap use ioremap_page_range Radix can use ioremap_page_range for ioremap, after slab is available. This makes it possible to enable huge ioremap mapping support. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/radix.h | 3 +++ arch/powerpc/mm/book3s64/pgtable.c | 21 +++++++++++++++++++++ arch/powerpc/mm/book3s64/radix_pgtable.c | 21 +++++++++++++++++++++ arch/powerpc/mm/pgtable_64.c | 2 +- 4 files changed, 46 insertions(+), 1 deletion(-) commit a72808a7ec5d340417a91a81e5cabdaa50650f2e Author: Nicholas Piggin Date: Mon Jun 10 13:08:16 2019 +1000 powerpc/64: __ioremap_at clean up in the error case __ioremap_at error handling is wonky, it requires caller to clean up after it. Implement a helper that does the map and error cleanup and remove the requirement from the caller. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/mm/pgtable_64.c | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) commit 9c9f8fb71feed144973a70455e0a4ee3da57ed2a Author: Anju T Sudhakar Date: Mon Jun 10 12:02:29 2019 +0530 powerpc/perf: Use cpumask_last() to determine the designated cpu for nest/core units. Nest and core IMC (In-Memory Collection counters) assigns a particular cpu as the designated target for counter data collection. During system boot, the first online cpu in a chip gets assigned as the designated cpu for that chip(for nest-imc) and the first online cpu in a core gets assigned as the designated cpu for that core(for core-imc). If the designated cpu goes offline, the next online cpu from the same chip(for nest-imc)/core(for core-imc) is assigned as the next target, and the event context is migrated to the target cpu. Currently, cpumask_any_but() function is used to find the target cpu. Though this function is expected to return a `random` cpu, this always returns the next online cpu. If all cpus in a chip/core is offlined in a sequential manner, starting from the first cpu, the event migration has to happen for all the cpus which goes offline. Since the migration process involves a grace period, the total time taken to offline all the cpus will be significantly high. Example: In a system which has 2 sockets, with NUMA node0 CPU(s): 0-87 NUMA node8 CPU(s): 88-175 Time taken to offline cpu 88-175: real 2m56.099s user 0m0.191s sys 0m0.000s Use cpumask_last() to choose the target cpu, when the designated cpu goes online, so the migration will happen only when the last_cpu in the mask goes offline. This way the time taken to offline all cpus in a chip/core can be reduced. With the patch: Time taken to offline cpu 88-175: real 0m12.207s user 0m0.171s sys 0m0.000s Offlining all cpus in reverse order is also taken care because, cpumask_any_but() is used to find the designated cpu if the last cpu in the mask goes offline. Since cpumask_any_but() always return the first cpu in the mask, that becomes the designated cpu and migration will happen only when the first_cpu in the mask goes offline. Example: With the patch, Time taken to offline cpu from 175-88: real 0m9.330s user 0m0.110s sys 0m0.000s Signed-off-by: Anju T Sudhakar Reviewed-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman arch/powerpc/perf/imc-pmu.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 87997471c597d0594dc8c9346ecaafab83798cf3 Author: Shaokun Zhang Date: Wed May 29 17:21:51 2019 +0800 powerpc/64s: Fix misleading SPR and timebase information pr_info shows SPR and timebase as a decimal value with a '0x' prefix, which is somewhat misleading. Fix it to print hexadecimal, as was intended. Fixes: 10d91611f426 ("powerpc/64s: Reimplement book3s idle code in C") Cc: Michael Ellerman Cc: Nicholas Piggin Signed-off-by: Shaokun Zhang Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/idle.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 348ea30f51fc63ce3c7fd7dba6043e8e3ee0ef34 Author: Nathan Lynch Date: Tue May 28 18:28:01 2019 -0500 powerpc/pseries: avoid blocking in irq when queuing hotplug events A couple of bugs in queue_hotplug_event(): 1. Unchecked kmalloc result which could lead to an oops. 2. Use of GFP_KERNEL allocations in interrupt context (this code's only caller is ras_hotplug_interrupt()). Use kmemdup to avoid open-coding the allocation+copy and check for failure; use GFP_ATOMIC for both allocations. Ultimately it probably would be better to avoid or reduce allocations in this path if possible. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman arch/powerpc/platforms/pseries/dlpar.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f474c28fbcbe42faca4eb415172c07d76adcb819 Author: Ravi Bangoria Date: Thu Jun 13 09:00:14 2019 +0530 powerpc/watchpoint: Restore NV GPRs while returning from exception powerpc hardware triggers watchpoint before executing the instruction. To make trigger-after-execute behavior, kernel emulates the instruction. If the instruction is 'load something into non-volatile register', exception handler should restore emulated register state while returning back, otherwise there will be register state corruption. eg, adding a watchpoint on a list can corrput the list: # cat /proc/kallsyms | grep kthread_create_list c00000000121c8b8 d kthread_create_list Add watchpoint on kthread_create_list->prev: # perf record -e mem:0xc00000000121c8c0 Run some workload such that new kthread gets invoked. eg, I just logged out from console: list_add corruption. next->prev should be prev (c000000001214e00), \ but was c00000000121c8b8. (next=c00000000121c8b8). WARNING: CPU: 59 PID: 309 at lib/list_debug.c:25 __list_add_valid+0xb4/0xc0 CPU: 59 PID: 309 Comm: kworker/59:0 Kdump: loaded Not tainted 5.1.0-rc7+ #69 ... NIP __list_add_valid+0xb4/0xc0 LR __list_add_valid+0xb0/0xc0 Call Trace: __list_add_valid+0xb0/0xc0 (unreliable) __kthread_create_on_node+0xe0/0x260 kthread_create_on_node+0x34/0x50 create_worker+0xe8/0x260 worker_thread+0x444/0x560 kthread+0x160/0x1a0 ret_from_kernel_thread+0x5c/0x70 List corruption happened because it uses 'load into non-volatile register' instruction: Snippet from __kthread_create_on_node: c000000000136be8: addis r29,r2,-19 c000000000136bec: ld r29,31424(r29) if (!__list_add_valid(new, prev, next)) c000000000136bf0: mr r3,r30 c000000000136bf4: mr r5,r28 c000000000136bf8: mr r4,r29 c000000000136bfc: bl c00000000059a2f8 <__list_add_valid+0x8> Register state from WARN_ON(): GPR00: c00000000059a3a0 c000007ff23afb50 c000000001344e00 0000000000000075 GPR04: 0000000000000000 0000000000000000 0000001852af8bc1 0000000000000000 GPR08: 0000000000000001 0000000000000007 0000000000000006 00000000000004aa GPR12: 0000000000000000 c000007ffffeb080 c000000000137038 c000005ff62aaa00 GPR16: 0000000000000000 0000000000000000 c000007fffbe7600 c000007fffbe7370 GPR20: c000007fffbe7320 c000007fffbe7300 c000000001373a00 0000000000000000 GPR24: fffffffffffffef7 c00000000012e320 c000007ff23afcb0 c000000000cb8628 GPR28: c00000000121c8b8 c000000001214e00 c000007fef5b17e8 c000007fef5b17c0 Watchpoint hit at 0xc000000000136bec. addis r29,r2,-19 => r29 = 0xc000000001344e00 + (-19 << 16) => r29 = 0xc000000001214e00 ld r29,31424(r29) => r29 = *(0xc000000001214e00 + 31424) => r29 = *(0xc00000000121c8c0) 0xc00000000121c8c0 is where we placed a watchpoint and thus this instruction was emulated by emulate_step. But because handle_dabr_fault did not restore emulated register state, r29 still contains stale value in above register state. Fixes: 5aae8a5370802 ("powerpc, hw_breakpoints: Implement hw_breakpoints for 64-bit server processors") Signed-off-by: Ravi Bangoria Cc: stable@vger.kernel.org # 2.6.36+ Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 1b7de1df997a57e3e144bdb31ceaee9c16d6d284 Author: Greg Kroah-Hartman Date: Wed Jun 12 17:54:18 2019 +0200 cxl: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Because there's no need to check, also make the return value of the local debugfs_create_io_x64() call void, as no one ever did anything with the return value (as they did not need to.) And make the cxl_debugfs_* calls return void as no one was even checking their return value at all. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Arnd Bergmann Reviewed-by: Frederic Barrat Acked-by: Andrew Donnellan Signed-off-by: Michael Ellerman drivers/misc/cxl/cxl.h | 15 ++++++--------- drivers/misc/cxl/debugfs.c | 36 +++++++++++------------------------- 2 files changed, 17 insertions(+), 34 deletions(-) commit 0b1be03f25bb4c92de6408da4de9361f4cb50ae3 Author: Geert Uytterhoeven Date: Mon Jun 17 11:07:13 2019 +0200 powerpc/ps3: Use [] to denote a flexible array member Flexible array members should be denoted using [] instead of [0], else gcc will not warn when they are no longer at the end of the structure. Signed-off-by: Geert Uytterhoeven Signed-off-by: Michael Ellerman arch/powerpc/include/asm/ps3stor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 46c2478af610efb3212b8b08f74389d69899ef70 Author: Andreas Schwab Date: Mon Jun 17 23:22:20 2019 +0200 powerpc/mm/32s: fix condition that is always true Move a misplaced paren that makes the condition always true. Fixes: 63b2bc619565 ("powerpc/mm/32s: Use BATs for STRICT_KERNEL_RWX") Cc: stable@vger.kernel.org # v5.1+ Signed-off-by: Andreas Schwab Reviewed-by: Christophe Leroy Signed-off-by: Michael Ellerman arch/powerpc/mm/pgtable_32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ecb78ef56e08d2119d337ae23cb951a640dc52d Author: Christophe Leroy Date: Mon Jun 17 21:42:14 2019 +0000 powerpc/32s: fix suspend/resume when IBATs 4-7 are used Previously, only IBAT1 and IBAT2 were used to map kernel linear mem. Since commit 63b2bc619565 ("powerpc/mm/32s: Use BATs for STRICT_KERNEL_RWX"), we may have all 8 BATs used for mapping kernel text. But the suspend/restore functions only save/restore BATs 0 to 3, and clears BATs 4 to 7. Make suspend and restore functions respectively save and reload the 8 BATs on CPUs having MMU_FTR_USE_HIGH_BATS feature. Reported-by: Andreas Schwab Cc: stable@vger.kernel.org Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman arch/powerpc/kernel/swsusp_32.S | 73 +++++++++++++++++++++++++++++---- arch/powerpc/platforms/powermac/sleep.S | 68 +++++++++++++++++++++++++++--- 2 files changed, 128 insertions(+), 13 deletions(-) commit 8d0f1e05ab16c4bd628ddaefd20b94ffb36d799c Author: Gustavo Romero Date: Mon Jun 17 17:24:58 2019 -0400 selftests/powerpc: Fix earlyclobber in tm-vmxcopy In some cases, compiler can allocate the same register for operand 'res' and 'vecoutptr', resulting in segfault at 'stxvd2x 40,0,%[vecoutptr]' because base register will contain 1, yielding a false-positive. This is because output 'res' must be marked as an earlyclobber operand so it may not overlap an input operand ('vecoutptr'). Signed-off-by: Gustavo Romero Reviewed-by: Segher Boessenkool Signed-off-by: Michael Ellerman tools/testing/selftests/powerpc/tm/tm-vmxcopy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 44758bafa53602f2581a6857bb20b55d4d8ad5b2 Author: Rafael J. Wysocki Date: Mon Jun 17 13:31:45 2019 +0200 ACPICA: Clear status of GPEs on first direct enable ACPI GPEs (other than the EC one) can be enabled in two situations. First, the GPEs with existing _Lxx and _Exx methods are enabled implicitly by ACPICA during system initialization. Second, the GPEs without these methods (like GPEs listed by _PRW objects for wakeup devices) need to be enabled directly by the code that is going to use them (e.g. ACPI power management or device drivers). In the former case, if the status of a given GPE is set to start with, its handler method (either _Lxx or _Exx) needs to be invoked to take care of the events (possibly) signaled before the GPE was enabled. In the latter case, however, the first caller of acpi_enable_gpe() for a given GPE should not be expected to care about any events that might be signaled through it earlier. In that case, it is better to clear the status of the GPE before enabling it, to prevent stale events from triggering unwanted actions (like spurious system resume, for example). For this reason, modify acpi_ev_add_gpe_reference() to take an additional boolean argument indicating whether or not the GPE status needs to be cleared when its reference counter changes from zero to one and make acpi_enable_gpe() pass TRUE to it through that new argument. Fixes: 18996f2db918 ("ACPICA: Events: Stop unconditionally clearing ACPI IRQs during suspend/resume") Reported-by: Furquan Shaikh Tested-by: Furquan Shaikh Tested-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/acevents.h | 3 ++- drivers/acpi/acpica/evgpe.c | 8 +++++++- drivers/acpi/acpica/evgpeblk.c | 2 +- drivers/acpi/acpica/evxface.c | 2 +- drivers/acpi/acpica/evxfgpe.c | 2 +- 5 files changed, 12 insertions(+), 5 deletions(-) commit 25fa4d9d4ca62dbf8fd1eeef413421c94183da3c Author: Greg Kroah-Hartman Date: Tue Jun 18 17:34:16 2019 +0200 drivers: base: power: remove wakeup_sources_stats_dentry variable wakeup_sources_stats_dentry is assigned when the debugfs file is created, but then never used ever again. So no need for it at all, just remove it and call debugfs_create_file() on its own. Signed-off-by: Greg Kroah-Hartman Signed-off-by: Rafael J. Wysocki drivers/base/power/wakeup.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 2443091408c267f84b40025183490486b79ee2cd Author: Daniel Vetter Date: Wed Jun 19 10:11:15 2019 +0200 fbcon: Export fbcon_update_vcs I failed to spot this while compile-testing. Oops. Reported-by: kbuild test robot Fixes: 9e1467002630 ("fbcon: replace FB_EVENT_MODE_CHANGE/_ALL with direct calls") Cc: Sam Ravnborg Cc: Daniel Vetter Cc: Maarten Lankhorst Cc: Daniel Thompson Cc: Lee Jones Cc: Jingoo Han Cc: Bartlomiej Zolnierkiewicz Cc: Daniel Vetter Cc: Hans de Goede Cc: Yisheng Xie Cc: "Michał Mirosław" Cc: Peter Rosin Cc: Mikulas Patocka Cc: linux-fbdev@vger.kernel.org Cc: Gerd Hoffmann Cc: Geert Uytterhoeven Cc: Lukas Wunner Cc: dri-devel@lists.freedesktop.org Signed-off-by: Daniel Vetter Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20190619081115.27921-1-daniel.vetter@ffwll.ch drivers/video/fbdev/core/fbcon.c | 1 + 1 file changed, 1 insertion(+) commit 0b385a0c3bd3f6d1044728b732bfc7dfb01c9fb5 Author: Rafael J. Wysocki Date: Tue Jun 18 10:18:28 2019 +0200 PM: suspend: Rename pm_suspend_via_s2idle() The name of pm_suspend_via_s2idle() is confusing, as it doesn't reflect the purpose of the function precisely enough and it is very similar to pm_suspend_via_firmware(), which has a different purpose, so rename it as pm_suspend_default_s2idle() and update its only caller, i8042_register_ports(), accordingly. Signed-off-by: Rafael J. Wysocki Acked-by: Dmitry Torokhov drivers/input/serio/i8042.c | 2 +- include/linux/suspend.h | 4 ++-- kernel/power/suspend.c | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) commit 78eccc2ac98e4166def294f02283f21cefd89591 Author: Suman Anna Date: Wed Jun 5 11:34:33 2019 -0500 arm64: dts: ti: k3-j721e: Add the MCU SRAM node Add the on-chip SRAM present within the MCU domain as a mmio-sram node. The K3 J721E SoCs have 1 MB of such memory. Any specific memory range within this RAM needed by a driver/software module ought to be reserved using an appropriate child node. Signed-off-by: Suman Anna Signed-off-by: Tero Kristo arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit ae7d8505b10d983a1da5dc6e507c57b0f384f2ec Author: Lokesh Vutla Date: Fri Jun 14 20:20:01 2019 +0530 arm64: dts: ti: k3-j721e: Add interrupt controllers in wakeup domain Wakeup domain in J721E SoC has an interrupt router connected to gpio in wakeup domain. Add DT node for this interrupt router. Signed-off-by: Lokesh Vutla Signed-off-by: Tero Kristo arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 073086fc68d7f6a8bb473fd74a47c7254cf95de8 Author: Lokesh Vutla Date: Fri Jun 14 20:20:00 2019 +0530 arm64: dts: ti: k3-j721e: Add interrupt controllers in main domain Main domain in J721E has the following interrupt controller instances: - Main Domain GPIO Interrupt router connected to gpio in main domain. - Under the Main Domain Navigator Subsystem(NAVSS) - Main Navss Interrupt Router connected to main navss inta and mailboxes. - Main Navss Interrupt Aggregator connected to main domain UDMASS Add DT nodes for the interrupt controllers available in main domain. Signed-off-by: Lokesh Vutla Signed-off-by: Tero Kristo arch/arm64/boot/dts/ti/k3-j721e-main.dtsi | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 1463a70dfc871ab5a9353b6d9c34f9b770f12650 Author: Suman Anna Date: Thu May 30 19:48:48 2019 -0500 arm64: dts: ti: k3-j721e-main: Add Main NavSS Interrupt controller node Add the Interrupt controller node for the Interrupt Router present within the Main NavSS module. This Interrupt Router can route 192 interrupts to the GIC_SPI in 3 sets of 64 interrupts each. Note that the last set is reserved for the host ID A72_3 for hypervisor usecases, so the node is added only with 2 sets for the Linux kernel context (host id A72_2). This is specified through the ti,sci-rm-range-girq property. Signed-off-by: Suman Anna Reviewed-by: Lokesh Vutla Signed-off-by: Tero Kristo arch/arm64/boot/dts/ti/k3-j721e-main.dtsi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 3cd277c6d021b19a531f897942e688b494b16225 Author: Nishanth Menon Date: Wed May 22 11:19:21 2019 -0500 arm64: defconfig: Enable TI's J721E SoC platform Enable J721E SoC support from TI. Signed-off-by: Nishanth Menon Signed-off-by: Tero Kristo arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 803d3a1870e26ec9748443e47e287c7cc3e45187 Author: Nishanth Menon Date: Wed May 22 11:19:20 2019 -0500 arm64: dts: ti: Add support for J721E Common Processor Board Add Support for J721E Common Processor board support. The EVM architecture is as follows: +------------------------------------------------------+ | +-------------------------------------------+ | | | | | | | Add-on Card 1 Options | | | | | | | +-------------------------------------------+ | | | | | | +-------------------+ | | | | | | | SOM | | | +--------------+ | | | | | | | | | | | Add-on | +-------------------+ | | | Card 2 | | Power Supply | | Options | | | | | | | | | +--------------+ | <--- +------------------------------------------------------+ Common Processor Board Common Processor board is the baseboard that has most of the actual connectors, power supply etc. A SOM (System on Module) is plugged on to the common processor board and this contains the SoC, PMIC, DDR and basic high speed components necessary for functionality. Add-n card options add further functionality (such as additional Audio, Display, networking options). Note: A) The minimum configuration required to boot up the board is System On Module(SOM) + Common Processor Board. B) Since there is just a single SOM and Common Processor Board, we are maintaining common processor board as the base dts and SOM as the dtsi that we include. In the future as more SOM's appear, we should move common processor board as a dtsi and include configurations as dts. C) All daughter cards beyond the basic boards shall be maintained as overlays. Signed-off-by: Nishanth Menon Signed-off-by: Tero Kristo arch/arm64/boot/dts/ti/Makefile | 2 + .../boot/dts/ti/k3-j721e-common-proc-board.dts | 50 ++++++++++++++++++++++ arch/arm64/boot/dts/ti/k3-j721e-som-p0.dtsi | 29 +++++++++++++ 3 files changed, 81 insertions(+) commit cff377f7897afbddb2f6aaa74ed46aff2302148f Author: Nishanth Menon Date: Wed May 22 11:19:19 2019 -0500 soc: ti: Add Support for J721E SoC config option Add option to build J721E SoC specific components Signed-off-by: Nishanth Menon Signed-off-by: Tero Kristo drivers/soc/ti/Kconfig | 5 +++++ 1 file changed, 5 insertions(+) commit 2d87061e70dea4c05e148e2d1facf9e814bb6662 Author: Nishanth Menon Date: Wed May 22 11:19:18 2019 -0500 arm64: dts: ti: Add Support for J721E SoC The J721E SoC belongs to the K3 Multicore SoC architecture platform, providing advanced system integration to enable lower system costs of automotive applications such as infotainment, cluster, premium Audio, Gateway, industrial and a range of broad market applications. This SoC is designed around reducing the system cost by eliminating the need of an external system MCU and is targeted towards ASIL-B/C certification/requirements in addition to allowing complex software and system use-cases. Some highlights of this SoC are: * Dual Cortex-A72s in a single cluster, three clusters of lockstep capable dual Cortex-R5F MCUs, Deep-learning Matrix Multiply Accelerator(MMA), C7x floating point Vector DSP, Two C66x floating point DSPs. * 3D GPU PowerVR Rogue 8XE GE8430 * Vision Processing Accelerator (VPAC) with image signal processor and Depth and Motion Processing Accelerator (DMPAC) * Two Gigabit Industrial Communication Subsystems (ICSSG), each with dual PRUs and dual RTUs * Two CSI2.0 4L RX plus one CSI2.0 4L TX, one eDP/DP, One DSI Tx, and up to two DPI interfaces. * Integrated Ethernet switch supporting up to a total of 8 external ports in addition to legacy Ethernet switch of up to 2 ports. * System MMU (SMMU) Version 3.0 and advanced virtualisation capabilities. * Upto 4 PCIe-GEN3 controllers, 2 USB3.0 Dual-role device subsystems, 16 MCANs, 12 McASP, eMMC and SD, UFS, OSPI/HyperBus memory controller, QSPI, I3C and I2C, eCAP/eQEP, eHRPWM, MLB among other peripherals. * Two hardware accelerator block containing AES/DES/SHA/MD5 called SA2UL management. * Configurable L3 Cache and IO-coherent architecture with high data throughput capable distributed DMA architecture under NAVSS * Centralized System Controller for Security, Power, and Resource Management (DMSC) See J721E Technical Reference Manual (SPRUIL1, May 2019) for further details: http://www.ti.com/lit/pdf/spruil1 Signed-off-by: Nishanth Menon Reviewed-by: Suman Anna Signed-off-by: Tero Kristo arch/arm64/boot/dts/ti/k3-j721e-main.dtsi | 202 ++++++++++++++++++++++++ arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi | 71 +++++++++ arch/arm64/boot/dts/ti/k3-j721e.dtsi | 177 +++++++++++++++++++++ 3 files changed, 450 insertions(+) commit e28c6d941dacbdd0d6fdda2dfe009fb72f6b1f8f Author: Nishanth Menon Date: Wed May 22 11:19:17 2019 -0500 dt-bindings: serial: 8250_omap: Add compatible for J721E UART controller J721e uses a UART controller that is compatible with AM654 UART. Introduce a specific compatible to help handle the differences if necessary. Cc: Sekhar Nori Cc: Vignesh R Signed-off-by: Nishanth Menon Reviewed-by: Rob Herring Signed-off-by: Tero Kristo Documentation/devicetree/bindings/serial/omap_serial.txt | 1 + 1 file changed, 1 insertion(+) commit 7c42f43c29e2613536f34a39bf42df6fb838989a Author: Nishanth Menon Date: Wed May 22 11:19:16 2019 -0500 dt-bindings: arm: ti: Add bindings for J721E SoC The J721E SoC belongs to the K3 Multicore SoC architecture platform, providing advanced system integration to enable lower system costs of automotive applications such as infotainment, cluster, premium Audio, Gateway, industrial and a range of broad market applications. This SoC is designed around reducing the system cost by eliminating the need of an external system MCU and is targeted towards ASIL-B/C certification/requirements in addition to allowing complex software and system use-cases. Some highlights of this SoC are: * Dual Cortex-A72s in a single cluster, three clusters of lockstep capable dual Cortex-R5F MCUs, Deep-learning Matrix Multiply Accelerator(MMA), C7x floating point Vector DSP, Two C66x floating point DSPs. * 3D GPU PowerVR Rogue 8XE GE8430 * Vision Processing Accelerator (VPAC) with image signal processor and Depth and Motion Processing Accelerator (DMPAC) * Two Gigabit Industrial Communication Subsystems (ICSSG), each with dual PRUs and dual RTUs * Two CSI2.0 4L RX plus one CSI2.0 4L TX, one eDP/DP, One DSI Tx, and up to two DPI interfaces. * Integrated Ethernet switch supporting up to a total of 8 external ports in addition to legacy Ethernet switch of up to 2 ports. * System MMU (SMMU) Version 3.0 and advanced virtualisation capabilities. * Upto 4 PCIe-GEN3 controllers, 2 USB3.0 Dual-role device subsystems, 16 MCANs, 12 McASP, eMMC and SD, UFS, OSPI/HyperBus memory controller, QSPI, I3C and I2C, eCAP/eQEP, eHRPWM, MLB among other peripherals. * Two hardware accelerator block containing AES/DES/SHA/MD5 called SA2UL management. * Configurable L3 Cache and IO-coherent architecture with high data throughput capable distributed DMA architecture under NAVSS * Centralized System Controller for Security, Power, and Resource Management (DMSC) See J721E Technical Reference Manual (SPRUIL1, May 2019) for further details: http://www.ti.com/lit/pdf/spruil1 Signed-off-by: Nishanth Menon Reviewed-by: Rob Herring Signed-off-by: Tero Kristo Documentation/devicetree/bindings/arm/ti/k3.txt | 3 +++ 1 file changed, 3 insertions(+) commit 7ef91224c4864202958b018cd5612db5cc9dc67d Author: Krzysztof Kozlowski Date: Tue Jun 18 21:05:26 2019 +0200 clk: samsung: Add bus clock for GPU/G3D on Exynos4412 Add ID and gate for bus clock for GPU (Mali 400) on Exynos4412. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk-exynos4.c | 1 + include/dt-bindings/clock/exynos4.h | 1 + 2 files changed, 2 insertions(+) commit e1068c32c1d413eaf8818ac10497817af9d2f231 Author: Lee Jones Date: Mon Jun 17 13:51:02 2019 +0100 soc: qcom: geni: Add support for ACPI When booting with ACPI as the active set of configuration tables, all; clocks, regulators, pin functions ect are expected to be at their ideal values/levels/rates, thus the associated frameworks are unavailable. Ensure calls to these APIs are shielded when ACPI is enabled. Signed-off-by: Lee Jones Acked-by: Ard Biesheuvel Reviewed-by: Bjorn Andersson Signed-off-by: Andy Gross drivers/soc/qcom/qcom-geni-se.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) commit c036061be907b8bcf8c030cf4d2fb97a04d6f5d1 Author: YueHaibing Date: Fri Jun 14 23:51:17 2019 +0800 ecryptfs: Make ecryptfs_xattr_handler static Fix sparse warning: fs/ecryptfs/inode.c:1138:28: warning: symbol 'ecryptfs_xattr_handler' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Tyler Hicks fs/ecryptfs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 29a51df0609c74e7163d41334021166d6a34d083 Author: YueHaibing Date: Mon May 27 21:28:14 2019 +0800 ecryptfs: remove unnessesary null check in ecryptfs_keyring_auth_tok_for_sig request_key and ecryptfs_get_encrypted_key never return a NULL pointer, so no need do a null check. Signed-off-by: YueHaibing Signed-off-by: Tyler Hicks fs/ecryptfs/keystore.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 96827c3044cf2562af2f5f09988f48acdbee25c7 Author: Sascha Hauer Date: Fri May 17 12:45:15 2019 +0200 ecryptfs: use print_hex_dump_bytes for hexdump The Kernel has nice hexdump facilities, use them rather a homebrew hexdump function. Signed-off-by: Sascha Hauer Signed-off-by: Tyler Hicks fs/ecryptfs/debug.c | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) commit 6fd7c4da546bee28533474658e3a08cd11e2da1d Author: John Stultz Date: Fri Jun 14 23:14:51 2019 +0000 arm64: dts: qcom: pm8998: Use qcom,pm8998-pon binding for second gen pon This changes pm8998 to use the new qcom,pm8998-pon compatible string for the pon in order to support the gen2 pon functionality properly. Cc: Andy Gross Cc: David Brown Cc: Bjorn Andersson Cc: Amit Pundir Cc: Rob Herring Cc: Mark Rutland Cc: Sebastian Reichel Cc: linux-arm-msm@vger.kernel.org Cc: devicetree@vger.kernel.org Reviewed-by: Bjorn Andersson Signed-off-by: John Stultz Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/pm8998.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 72825e7f4a63478d6afa04468545c7ecfa0acbb6 Author: Bjorn Andersson Date: Mon Jun 17 22:23:46 2019 -0700 arm64: dts: qcom: msm8996: Enable SMMUs Enable SMMUs on 8996 now that the WRZ workaround in the arm-smmu driver has landed. Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/msm8996.dtsi | 6 ------ 1 file changed, 6 deletions(-) commit 4c960505df44b94001178575a505dd8315086edc Author: YueHaibing Date: Tue Jun 18 21:32:25 2019 -0700 firmware: ti_sci: Fix gcc unused-but-set-variable warning Fixes gcc '-Wunused-but-set-variable' warning: drivers/firmware/ti_sci.c: In function ti_sci_cmd_ring_config: drivers/firmware/ti_sci.c:2035:17: warning: variable dev set but not used [-Wunused-but-set-variable] drivers/firmware/ti_sci.c: In function ti_sci_cmd_ring_get_config: drivers/firmware/ti_sci.c:2104:17: warning: variable dev set but not used [-Wunused-but-set-variable] drivers/firmware/ti_sci.c: In function ti_sci_cmd_rm_udmap_tx_ch_cfg: drivers/firmware/ti_sci.c:2287:17: warning: variable dev set but not used [-Wunused-but-set-variable] drivers/firmware/ti_sci.c: In function ti_sci_cmd_rm_udmap_rx_ch_cfg: drivers/firmware/ti_sci.c:2357:17: warning: variable dev set but not used [-Wunused-but-set-variable] Use the 'dev' variable instead of info->dev to fix this. Acked-by: Suman Anna Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Santosh Shilimkar drivers/firmware/ti_sci.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 8e1395a4249cc97ea7a8596fb87e36ee7b9826fe Author: Nishad Kamdar Date: Tue Jun 18 21:32:25 2019 -0700 firmware: ti_sci: Use the correct style for SPDX License Identifier This patch corrects the SPDX License Identifier style in header file related to Firmware Drivers for Texas Instruments SCI Protocol. For C header files Documentation/process/license-rules.rst mandates C-like comments (opposed to C source files where C++ style should be used) Changes made by using a script provided by Joe Perches here: https://lkml.org/lkml/2019/2/7/46 Reviewed-by: Lokesh Vutla Suggested-by: Joe Perches Signed-off-by: Nishad Kamdar Signed-off-by: Santosh Shilimkar drivers/firmware/ti_sci.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 09d985bea99da4991076a53e104ec213ac518adb Author: Maor Gottlieb Date: Wed Jun 12 15:20:14 2019 +0300 RDMA/mlx5: Enable decap and packet reformat on FDB If FDB flow tables support decap operation, enable it on creation, This allows to perform decapsulation of tunnelled packets by steering rules. If FDB flow tables support reformat operation, enable it on creation as well. Signed-off-by: Maor Gottlieb Reviewed-by: Petr Vorel Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 5 +++++ 1 file changed, 5 insertions(+) commit cecae747b6208d40d08f8336393345093536b124 Author: Maor Gottlieb Date: Wed Jun 12 15:20:13 2019 +0300 RDMA/mlx5: Consider eswitch encap mode When flow steering is created, then the encap support should consider the eswitch encap mode. If the eswitch flow table (FDB) supports encap then it shouldn't be supported on NIC RX flow tables. Fixes: 4adda1122c490 ('RDMA/mlx5: Enable decap and packet reformat on flow tables') Signed-off-by: Maor Gottlieb Reviewed-by: Petr Vorel Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit 12dbc04db08dc225b0e06cc5bb99c2dfa8236df9 Merge: 7608bf40cf24 82b11f071936 Author: Doug Ledford Date: Tue Jun 18 22:44:36 2019 -0400 Merge remote-tracking branch 'mlx5-next/mlx5-next' into HEAD Take mlx5-next so we can take a dependent two patch series next. Signed-off-by: Doug Ledford commit 7608bf40cf2480057ec0da31456cc428791c32ef Author: Jason Gunthorpe Date: Tue Jun 11 13:09:51 2019 -0300 RDMA/odp: Fix missed unlock in non-blocking invalidate_start If invalidate_start returns with EAGAIN then the umem_rwsem needs to be unlocked as no invalidate_end will be called. Cc: Fixes: ca748c39ea3f ("RDMA/umem: Get rid of per_mm->notifier_count") Signed-off-by: Jason Gunthorpe Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/umem_odp.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 5a3113d19cb0ec06fd0d068a2f2860786a770e4f Author: Geert Uytterhoeven Date: Mon Jun 17 16:01:38 2019 +0200 IB/hfi1: Spelling s/statisfied/satisfied/ Signed-off-by: Geert Uytterhoeven Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/tid_rdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8f71bb0030b8816f57be142f95b3c7189c6eaf4c Author: Jason Gunthorpe Date: Thu Jun 13 21:38:19 2019 -0300 RDMA: Report available cdevs through RDMA_NLDEV_CMD_GET_CHARDEV Update the struct ib_client for all modules exporting cdevs related to the ibdevice to also implement RDMA_NLDEV_CMD_GET_CHARDEV. All cdevs are now autoloadable and discoverable by userspace over netlink instead of relying on sysfs. uverbs also exposes the DRIVER_ID for drivers that are able to support driver id binding in rdma-core. Signed-off-by: Jason Gunthorpe Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/device.c | 3 ++ drivers/infiniband/core/nldev.c | 1 + drivers/infiniband/core/ucma.c | 23 +++++++++++++ drivers/infiniband/core/user_mad.c | 51 +++++++++++++++++++++++++--- drivers/infiniband/core/uverbs_main.c | 32 ++++++++++++++++- drivers/infiniband/hw/cxgb3/iwch_provider.c | 1 + drivers/infiniband/hw/hns/hns_roce_main.c | 1 + drivers/infiniband/hw/mthca/mthca_provider.c | 1 + include/rdma/ib_verbs.h | 1 + include/uapi/rdma/rdma_netlink.h | 1 + 10 files changed, 110 insertions(+), 5 deletions(-) commit 0e2d00eb6fd45f2a645f4874286bdc5b4b53782b Author: Jason Gunthorpe Date: Thu Jun 13 21:38:18 2019 -0300 RDMA: Add NLDEV_GET_CHARDEV to allow char dev discovery and autoload Allow userspace to issue a netlink query against the ib_device for something like "uverbs" and get back the char dev name, inode major/minor, and interface ABI information for "uverbs0". Since we are now in netlink this can also trigger a module autoload to make the uverbs device come into existence. Largely this will let us replace searching and reading inside sysfs to setup devices, and provides an alternative (using driver_id) to device name based provider binding for things like rxe. Signed-off-by: Jason Gunthorpe Signed-off-by: Doug Ledford drivers/infiniband/core/core_priv.h | 9 ++++ drivers/infiniband/core/device.c | 98 +++++++++++++++++++++++++++++++++++++ drivers/infiniband/core/nldev.c | 94 +++++++++++++++++++++++++++++++++++ include/rdma/ib_verbs.h | 4 ++ include/rdma/rdma_netlink.h | 2 + include/uapi/rdma/rdma_netlink.h | 14 ++++++ 6 files changed, 221 insertions(+) commit 39f5886032380e49119786b23274b38e9b3aa99c Author: Colin Ian King Date: Tue Jun 18 16:15:10 2019 +0100 net/mlx5: add missing void argument to function mlx5_devlink_alloc Function mlx5_devlink_alloc is missing a void argument, add it to clean up the non-ANSI function declaration. Signed-off-by: Colin Ian King Acked-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/devlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit da21ad276af46d87749eaade2e8e5a52f6df8ecb Merge: 9368b8e24b08 1274daede3ef Author: David S. Miller Date: Tue Jun 18 22:26:05 2019 -0400 Merge branch 'net-mvpp2-cls-Allow-steering-based-on-vlan-tag' Maxime Chevallier says: ==================== net: mvpp2: cls: Allow steering based on vlan tag The PPv2 classifier can perform flow steering based on keys extracted from the VLAN tag. This series adds support for using the vlan id and the vlan prio as keys, using the ethtool interface. Patch 1 is a preparatory patch that prevent false-positive matches, using a dedicated lookup id for the RSS C2 lookup. Patch 2 allows to separate the flows based on the header fields they contain. The main goal is to be able to separate tagged traffic from untagged traffic for flow steering, just as we already do for RSS. Patch 3 solves an issue we have when extracting fields that aren't full bytes, such as the vlan tag which is 12 bits wide, or the priority which is 3 bits wide. Finally, patch 4 adds support for steering based on both vlan id and priority, extracted from the outermost tag. ==================== Signed-off-by: David S. Miller commit 1274daede3eff80e04a792219cf74c62994713fb Author: Maxime Chevallier Date: Tue Jun 18 16:55:19 2019 +0200 net: mvpp2: cls: Add steering based on vlan Id and priority. This commit allows using the vlan Id and priority as parts of the key for classification offload. These fields are extracted from the outermost tag, if multiple tags are present. Vlan Id and priority are considered as 2 different fields by the classifier, however the fields are both appended in the Header Extracted Key in the same layout as they are found in the tags. This means that when steering only based on the prio, a 16-bit slot is still taken in the HEK. The classifier doesn't allow extracting the DEI bit from the tag, so we explicitly prevent user from using this bit in the key. This commit adds the vlan priotity as a compatible HEK field for tagged traffic, meaning that we limit the possibility of extracting this field only to the flows that contain tagged traffic. Signed-off-by: Maxime Chevallier Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c | 97 +++++++++++++++++++------- drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.h | 23 +++--- 2 files changed, 86 insertions(+), 34 deletions(-) commit 12b8e2dd01ce642ce968819078f5f2798227087a Author: Maxime Chevallier Date: Tue Jun 18 16:55:18 2019 +0200 net: mvpp2: cls: right-justify the C2 TCAM keys The C2 TCAM used for classification uses a key (Header Extracted Key) built by concatenating several fields extracted from the packet header. After a lot of trial-and-error and some guess work, it seems the HEK is right justified, with the first fields being stored in the MSB, then concatenated up until the LSB. Until now, this doesn't cause any issue since all HEK fields we use are full bytes. However this is an issue for the upcoming VLAN id and pri extraction, which aren't full bytes. Rework the way we built that TCAM key, by changing the order in which we append the fields. Signed-off-by: Maxime Chevallier Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 834df6ea955559af06fcbe36c767d25e0e9364ee Author: Maxime Chevallier Date: Tue Jun 18 16:55:17 2019 +0200 net: mvpp2: cls: Only select applicable flows of classification offload The way we currently handle classification offload and RSS is by having dedicated lookup sequences in the flow table, each being selected depending on several fields being present in the packet header. We need to make sure the classification operation we want to perform can be done in each flow we want to insert it into. As an example, classifying on VLAN tag can only be done on flows used for tagged traffic. This commit makes sure we don't insert rules in flows we aren't compatible with. Signed-off-by: Maxime Chevallier Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c | 3 +++ 1 file changed, 3 insertions(+) commit c641af4f6fe0a1d91b5e9c67e4946f7e784a56a6 Author: Maxime Chevallier Date: Tue Jun 18 16:55:16 2019 +0200 net: mvpp2: cls: Use a dedicated lu_type for the RSS lookup When performing a TCAM lookup in the C2 engine, it's possible that multiple entries match the packet. To make sure the correct entry match when performing a lookup, the Flow Table can set a lookup type, which will be used in the TCAM lookup, thus preventing such false-positives. We need to make sure the RSS match doesn't interfere with other classification lookups, hence we use a dedicated lookup_type for it. Signed-off-by: Maxime Chevallier Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c | 4 ++-- drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.h | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) commit 9368b8e24b08f3219c12c04edfe930c45fc2a403 Merge: d75d5f9764c3 c218ad559020 Author: David S. Miller Date: Tue Jun 18 22:02:27 2019 -0400 Merge branch 'macb-SiFive-FU540-C000' Yash Shah says: ==================== Add macb support for SiFive FU540-C000 On FU540, the management IP block is tightly coupled with the Cadence MACB IP block. It manages many of the boundary signals from the MACB IP This patchset controls the tx_clk input signal to the MACB IP. It switches between the local TX clock (125MHz) and PHY TX clocks. This is necessary to toggle between 1Gb and 100/10Mb speeds. Future patches may add support for monitoring or controlling other IP boundary signals. This patchset is mostly based on work done by Wesley Terpstra This patchset is based on Linux v5.2-rc1 and tested on HiFive Unleashed board with additional board related patches needed for testing can be found at dev/yashs/ethernet_v3 branch of: https://github.com/yashshah7/riscv-linux.git Change History: V3: - Revert "MACB_SIFIVE_FU540" config changes in Kconfig and driver code. The driver does not depend on SiFive GPIO driver. V2: - Change compatible string from "cdns,fu540-macb" to "sifive,fu540-macb" - Add "MACB_SIFIVE_FU540" in Kconfig to support SiFive FU540 in macb driver. This is needed because on FU540, the macb driver depends on SiFive GPIO driver. - Avoid writing the result of a comparison to a register. - Fix the issue of probe fail on reloading the module reported by: Andreas Schwab ==================== Signed-off-by: David S. Miller commit c218ad559020ff98f5d7de6c8bca05b635581777 Author: Yash Shah Date: Tue Jun 18 13:26:08 2019 +0530 macb: Add support for SiFive FU540-C000 The management IP block is tightly coupled with the Cadence MACB IP block on the FU540, and manages many of the boundary signals from the MACB IP. This patch only controls the tx_clk input signal to the MACB IP. Future patches may add support for monitoring or controlling other IP boundary signals. Signed-off-by: Yash Shah Signed-off-by: David S. Miller drivers/net/ethernet/cadence/macb_main.c | 123 +++++++++++++++++++++++++++++++ 1 file changed, 123 insertions(+) commit d4993e19da6e7eb18eeb509aeebb6796650a3c1f Author: Yash Shah Date: Tue Jun 18 13:26:07 2019 +0530 macb: bindings doc: add sifive fu540-c000 binding Add the compatibility string documentation for SiFive FU540-C0000 interface. On the FU540, this driver also needs to read and write registers in a management IP block that monitors or drives boundary signals for the GEMGXL IP block that are not directly mapped to GEMGXL registers. Therefore, add additional range to "reg" property for SiFive GEMGXL management IP registers. Signed-off-by: Yash Shah Reviewed-by: Paul Walmsley Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/macb.txt | 3 +++ 1 file changed, 3 insertions(+) commit c936843f06ee4acfe91c2ef2909a2b46eb63c14a Author: Oleg Vasilev Date: Thu Jun 13 15:18:02 2019 +0300 drm/vkms: add crc sources list Other drivers are able to list crc sources when accessing /sys/kernel/debug/dri/.../crtc-0/crc/control Even though VKMS now supports only 'auto' mode, it is more consistent to have the list available to the userspace. Signed-off-by: Oleg Vasilev Reviewed-by: Rodrigo Siqueira Signed-off-by: Rodrigo Siqueira Link: https://patchwork.freedesktop.org/patch/msgid/20190613121802.2193-3-oleg.vasilev@intel.com drivers/gpu/drm/vkms/vkms_crc.c | 9 +++++++++ drivers/gpu/drm/vkms/vkms_crtc.c | 1 + drivers/gpu/drm/vkms/vkms_drv.h | 2 ++ 3 files changed, 12 insertions(+) commit d75d5f9764c378534f88f8ec0a1162879732b239 Merge: 760f1dc29580 4fdc51bb4e92 Author: David S. Miller Date: Tue Jun 18 21:52:27 2019 -0400 Merge branch 'hinic-add-rss-support-and-rss-parameters-configuration' Xue Chaojing says: ==================== hinic: add rss support and rss parameters configuration This series add rss support for HINIC driver and implement the ethtool interface related to rss parameter configuration. user can use ethtool configure rss parameters or show rss parameters. ==================== Signed-off-by: David S. Miller commit 4fdc51bb4e92e1d7d55be2699eaf17c9c11d4004 Author: Xue Chaojing Date: Tue Jun 18 06:20:53 2019 +0000 hinic: add support for rss parameters with ethtool This patch adds support rss parameters with ethtool, user can change hash key, hash indirection table, hash function by ethtool -X, and show rss parameters by ethtool -x. Signed-off-by: Xue Chaojing Signed-off-by: David S. Miller drivers/net/ethernet/huawei/hinic/hinic_dev.h | 2 + drivers/net/ethernet/huawei/hinic/hinic_ethtool.c | 295 ++++++++++++++++++++++ drivers/net/ethernet/huawei/hinic/hinic_hw_dev.h | 12 +- drivers/net/ethernet/huawei/hinic/hinic_port.c | 126 +++++++++ drivers/net/ethernet/huawei/hinic/hinic_port.h | 45 ++++ 5 files changed, 479 insertions(+), 1 deletion(-) commit eb8ce9ac167146b0679859ba69c492ee1403a0f0 Author: Xue Chaojing Date: Tue Jun 18 06:20:52 2019 +0000 hinic: move ethtool code into hinic_ethtool This patch moves ethtool code from hinic_main.c to hinic_ethtool.c Signed-off-by: Xue Chaojing Signed-off-by: David S. Miller drivers/net/ethernet/huawei/hinic/Makefile | 2 +- drivers/net/ethernet/huawei/hinic/hinic_ethtool.c | 163 ++++++++++++++++++++++ drivers/net/ethernet/huawei/hinic/hinic_main.c | 134 +----------------- drivers/net/ethernet/huawei/hinic/hinic_port.h | 2 + 4 files changed, 167 insertions(+), 134 deletions(-) commit 421e9526288b6ec241b46153493884277cbb533f Author: Xue Chaojing Date: Tue Jun 18 06:20:51 2019 +0000 hinic: add rss support This patch adds rss support for the HINIC driver. Signed-off-by: Xue Chaojing Signed-off-by: David S. Miller drivers/net/ethernet/huawei/hinic/hinic_dev.h | 26 +++ drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c | 10 +- drivers/net/ethernet/huawei/hinic/hinic_hw_dev.h | 26 +++ drivers/net/ethernet/huawei/hinic/hinic_hw_wqe.h | 16 ++ drivers/net/ethernet/huawei/hinic/hinic_main.c | 126 ++++++++++- drivers/net/ethernet/huawei/hinic/hinic_port.c | 263 +++++++++++++++++++++++ drivers/net/ethernet/huawei/hinic/hinic_port.h | 82 +++++++ 7 files changed, 541 insertions(+), 8 deletions(-) commit b6b3821fac22aa941ebc94e8892e39c565dac6eb Author: Daniel Vetter Date: Fri Jun 7 00:27:45 2019 +0200 drm/vkms: Move format arrays to vkms_plane.c No need to have them multiple times. Signed-off-by: Daniel Vetter Cc: Rodrigo Siqueira Cc: Haneen Mohammed Cc: Daniel Vetter Reviewed-by: Rodrigo Siqueira Tested-by: Rodrigo Siqueira Signed-off-by: Rodrigo Siqueira Link: https://patchwork.freedesktop.org/patch/msgid/20190606222751.32567-5-daniel.vetter@ffwll.ch drivers/gpu/drm/vkms/vkms_drv.h | 8 -------- drivers/gpu/drm/vkms/vkms_plane.c | 8 ++++++++ 2 files changed, 8 insertions(+), 8 deletions(-) commit 760f1dc29580220c5949d22cc4937e3e44eacac1 Author: Colin Ian King Date: Mon Jun 17 17:58:36 2019 +0100 net: stmmac: add sanity check to device_property_read_u32_array call Currently the call to device_property_read_u32_array is not error checked leading to potential garbage values in the delays array that are then used in msleep delays. Add a sanity check to the property fetching. Addresses-Coverity: ("Uninitialized scalar variable") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit cf29a498796a8a0ec45ed63fd59352d7172d59ee Author: Geert Uytterhoeven Date: Mon Jun 17 16:38:36 2019 +0200 net: hns3: Add missing newline at end of file "git diff" says: \ No newline at end of file after modifying the file. Signed-off-by: Geert Uytterhoeven Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3vf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 94079b64255fe40b9b53fd2e4081f68b9b14f54a Merge: a324aae32fa9 b5dc0163d8fd Author: Daniel Borkmann Date: Wed Jun 19 02:22:53 2019 +0200 Merge branch 'bpf-bounded-loops' Alexei Starovoitov says: ==================== v2->v3: fixed issues in backtracking pointed out by Andrii. The next step is to add a lot more tests for backtracking. v1->v2: addressed Andrii's feedback. this patch set introduces verifier support for bounded loops and adds several other improvements. Ideally they would be introduced one at a time, but to support bounded loop the verifier needs to 'step back' in the patch 1. That patch introduces tracking of spill/fill of constants through the stack. Though it's a useful feature it hurts cilium tests. Patch 3 introduces another feature by extending is_branch_taken logic to 'if rX op rY' conditions. This feature is also necessary to support bounded loops. Then patch 4 adds support for the loops while adding key heuristics with jmp_processed. Introduction of parentage chain of verifier states in patch 4 allows patch 9 to add backtracking of precise scalar registers which finally resolves degradation from patch 1. The end result is much faster verifier for existing programs and new support for loops. See patch 8 for many kinds of loops that are now validated. Patch 9 is the most tricky one and could be rewritten with a different algorithm in the future. ==================== Signed-off-by: Daniel Borkmann commit b5dc0163d8fd78e64a7e21f309cf932fda34353e Author: Alexei Starovoitov Date: Sat Jun 15 12:12:25 2019 -0700 bpf: precise scalar_value tracking Introduce precision tracking logic that helps cilium programs the most: old clang old clang new clang new clang with all patches with all patches bpf_lb-DLB_L3.o 1838 2283 1923 1863 bpf_lb-DLB_L4.o 3218 2657 3077 2468 bpf_lb-DUNKNOWN.o 1064 545 1062 544 bpf_lxc-DDROP_ALL.o 26935 23045 166729 22629 bpf_lxc-DUNKNOWN.o 34439 35240 174607 28805 bpf_netdev.o 9721 8753 8407 6801 bpf_overlay.o 6184 7901 5420 4754 bpf_lxc_jit.o 39389 50925 39389 50925 Consider code: 654: (85) call bpf_get_hash_recalc#34 655: (bf) r7 = r0 656: (15) if r8 == 0x0 goto pc+29 657: (bf) r2 = r10 658: (07) r2 += -48 659: (18) r1 = 0xffff8881e41e1b00 661: (85) call bpf_map_lookup_elem#1 662: (15) if r0 == 0x0 goto pc+23 663: (69) r1 = *(u16 *)(r0 +0) 664: (15) if r1 == 0x0 goto pc+21 665: (bf) r8 = r7 666: (57) r8 &= 65535 667: (bf) r2 = r8 668: (3f) r2 /= r1 669: (2f) r2 *= r1 670: (bf) r1 = r8 671: (1f) r1 -= r2 672: (57) r1 &= 255 673: (25) if r1 > 0x1e goto pc+12 R0=map_value(id=0,off=0,ks=20,vs=64,imm=0) R1_w=inv(id=0,umax_value=30,var_off=(0x0; 0x1f)) 674: (67) r1 <<= 1 675: (0f) r0 += r1 At this point the verifier will notice that scalar R1 is used in map pointer adjustment. R1 has to be precise for later operations on R0 to be validated properly. The verifier will backtrack the above code in the following way: last_idx 675 first_idx 664 regs=2 stack=0 before 675: (0f) r0 += r1 // started backtracking R1 regs=2 is a bitmask regs=2 stack=0 before 674: (67) r1 <<= 1 regs=2 stack=0 before 673: (25) if r1 > 0x1e goto pc+12 regs=2 stack=0 before 672: (57) r1 &= 255 regs=2 stack=0 before 671: (1f) r1 -= r2 // now both R1 and R2 has to be precise -> regs=6 mask regs=6 stack=0 before 670: (bf) r1 = r8 // after this insn R8 and R2 has to be precise regs=104 stack=0 before 669: (2f) r2 *= r1 // after this one R8, R2, and R1 regs=106 stack=0 before 668: (3f) r2 /= r1 regs=106 stack=0 before 667: (bf) r2 = r8 regs=102 stack=0 before 666: (57) r8 &= 65535 regs=102 stack=0 before 665: (bf) r8 = r7 regs=82 stack=0 before 664: (15) if r1 == 0x0 goto pc+21 // this is the end of verifier state. The following regs will be marked precised: R1_rw=invP(id=0,umax_value=65535,var_off=(0x0; 0xffff)) R7_rw=invP(id=0) parent didn't have regs=82 stack=0 marks // so backtracking continues into parent state last_idx 663 first_idx 655 regs=82 stack=0 before 663: (69) r1 = *(u16 *)(r0 +0) // R1 was assigned no need to track it further regs=80 stack=0 before 662: (15) if r0 == 0x0 goto pc+23 // keep tracking R7 regs=80 stack=0 before 661: (85) call bpf_map_lookup_elem#1 // keep tracking R7 regs=80 stack=0 before 659: (18) r1 = 0xffff8881e41e1b00 regs=80 stack=0 before 658: (07) r2 += -48 regs=80 stack=0 before 657: (bf) r2 = r10 regs=80 stack=0 before 656: (15) if r8 == 0x0 goto pc+29 regs=80 stack=0 before 655: (bf) r7 = r0 // here the assignment into R7 // mark R0 to be precise: R0_rw=invP(id=0) parent didn't have regs=1 stack=0 marks // regs=1 -> tracking R0 last_idx 654 first_idx 644 regs=1 stack=0 before 654: (85) call bpf_get_hash_recalc#34 // and in the parent frame it was a return value // nothing further to backtrack Two scalar registers not marked precise are equivalent from state pruning point of view. More details in the patch comments. It doesn't support bpf2bpf calls yet and enabled for root only. Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann include/linux/bpf_verifier.h | 18 ++ kernel/bpf/verifier.c | 491 ++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 498 insertions(+), 11 deletions(-) commit b061017f8b4d0e05d4c11486581a702fb2a975b2 Author: Alexei Starovoitov Date: Sat Jun 15 12:12:24 2019 -0700 selftests/bpf: add realistic loop tests Add a bunch of loop tests. Most of them are created by replacing '#pragma unroll' with '#pragma clang loop unroll(disable)' Several tests are artificially large: /* partial unroll. llvm will unroll loop ~150 times. * C loop count -> 600. * Asm loop count -> 4. * 16k insns in loop body. * Total of 5 such loops. Total program size ~82k insns. */ "./pyperf600.o", /* no unroll at all. * C loop count -> 600. * ASM loop count -> 600. * ~110 insns in loop body. * Total of 5 such loops. Total program size ~1500 insns. */ "./pyperf600_nounroll.o", /* partial unroll. 19k insn in a loop. * Total program size 20.8k insn. * ~350k processed_insns */ "./strobemeta.o", Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann .../selftests/bpf/prog_tests/bpf_verif_scale.c | 67 ++- tools/testing/selftests/bpf/progs/loop1.c | 28 ++ tools/testing/selftests/bpf/progs/loop2.c | 28 ++ tools/testing/selftests/bpf/progs/loop3.c | 22 + tools/testing/selftests/bpf/progs/pyperf.h | 6 +- tools/testing/selftests/bpf/progs/pyperf600.c | 9 + .../selftests/bpf/progs/pyperf600_nounroll.c | 8 + tools/testing/selftests/bpf/progs/strobemeta.c | 10 + tools/testing/selftests/bpf/progs/strobemeta.h | 528 +++++++++++++++++++++ .../selftests/bpf/progs/strobemeta_nounroll1.c | 9 + .../selftests/bpf/progs/strobemeta_nounroll2.c | 9 + tools/testing/selftests/bpf/progs/test_seg6_loop.c | 261 ++++++++++ .../selftests/bpf/progs/test_sysctl_loop1.c | 71 +++ .../selftests/bpf/progs/test_sysctl_loop2.c | 72 +++ tools/testing/selftests/bpf/progs/test_xdp_loop.c | 231 +++++++++ 15 files changed, 1347 insertions(+), 12 deletions(-) commit 0d3679e99ae4b7868da22e3b8540fd597df501f5 Author: Alexei Starovoitov Date: Sat Jun 15 12:12:23 2019 -0700 selftests/bpf: add basic verifier tests for loops This set of tests is a rewrite of Edward's earlier tests: https://patchwork.ozlabs.org/patch/877221/ Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/verifier/loops1.c | 161 ++++++++++++++++++++++++++ 1 file changed, 161 insertions(+) commit aeee380ccfc59c05a4c6e8e762fd645c6bdc773a Author: Alexei Starovoitov Date: Sat Jun 15 12:12:22 2019 -0700 selftests/bpf: fix tests Fix tests that assumed no loops. Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/test_verifier.c | 11 ++++------- tools/testing/selftests/bpf/verifier/calls.c | 22 +++++++++++++--------- tools/testing/selftests/bpf/verifier/cfg.c | 11 +++++++---- 3 files changed, 24 insertions(+), 20 deletions(-) commit eea1c227b9e9bad295e8ef984004a9acf12bb68c Author: Alexei Starovoitov Date: Sat Jun 15 12:12:21 2019 -0700 bpf: fix callees pruning callers The commit 7640ead93924 partially resolved the issue of callees incorrectly pruning the callers. With introduction of bounded loops and jmps_processed heuristic single verifier state may contain multiple branches and calls. It's possible that new verifier state (for future pruning) will be allocated inside callee. Then callee will exit (still within the same verifier state). It will go back to the caller and there R6-R9 registers will be read and will trigger mark_reg_read. But the reg->live for all frames but the top frame is not set to LIVE_NONE. Hence mark_reg_read will fail to propagate liveness into parent and future walking will incorrectly conclude that the states are equivalent because LIVE_READ is not set. In other words the rule for parent/live should be: whenever register parentage chain is set the reg->live should be set to LIVE_NONE. is_state_visited logic already follows this rule for spilled registers. Fixes: 7640ead93924 ("bpf: verifier: make sure callees don't prune with caller differences") Fixes: f4d7e40a5b71 ("bpf: introduce function calls (verification)") Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann kernel/bpf/verifier.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 2589726d12a1b12eaaa93c7f1ea64287e383c7a5 Author: Alexei Starovoitov Date: Sat Jun 15 12:12:20 2019 -0700 bpf: introduce bounded loops Allow the verifier to validate the loops by simulating their execution. Exisiting programs have used '#pragma unroll' to unroll the loops by the compiler. Instead let the verifier simulate all iterations of the loop. In order to do that introduce parentage chain of bpf_verifier_state and 'branches' counter for the number of branches left to explore. See more detailed algorithm description in bpf_verifier.h This algorithm borrows the key idea from Edward Cree approach: https://patchwork.ozlabs.org/patch/877222/ Additional state pruning heuristics make such brute force loop walk practical even for large loops. Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann include/linux/bpf_verifier.h | 51 ++++++++++++++- kernel/bpf/verifier.c | 143 +++++++++++++++++++++++++++++++++++++++---- 2 files changed, 181 insertions(+), 13 deletions(-) commit fb8d251ee2a6bf4d7f4af5548e9c8f4fb5f90402 Author: Alexei Starovoitov Date: Sat Jun 15 12:12:19 2019 -0700 bpf: extend is_branch_taken to registers This patch extends is_branch_taken() logic from JMP+K instructions to JMP+X instructions. Conditional branches are often done when src and dst registers contain known scalars. In such case the verifier can follow the branch that is going to be taken when program executes. That speeds up the verification and is essential feature to support bounded loops. Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann kernel/bpf/verifier.c | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) commit fc559a70d57c6ee5443f7a750858503e94cdc941 Author: Alexei Starovoitov Date: Sat Jun 15 12:12:18 2019 -0700 selftests/bpf: fix tests due to const spill/fill fix tests that incorrectly assumed that the verifier cannot track constants through stack. Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann .../selftests/bpf/verifier/direct_packet_access.c | 3 ++- .../selftests/bpf/verifier/helper_access_var_len.c | 28 ++++++++++++---------- 2 files changed, 17 insertions(+), 14 deletions(-) commit f7cf25b2026dc8441e0fa3a202c2aa8a56211e30 Author: Alexei Starovoitov Date: Sat Jun 15 12:12:17 2019 -0700 bpf: track spill/fill of constants Compilers often spill induction variables into the stack, hence it is necessary for the verifier to track scalar values of the registers through stack slots. Also few bpf programs were incorrectly rejected in the past, since the verifier was not able to track such constants while they were used to compute offsets into packet headers. Tracking constants through the stack significantly decreases the chances of state pruning, since two different constants are considered to be different by state equivalency. End result that cilium tests suffer serious degradation in the number of states processed and corresponding verification time increase. before after bpf_lb-DLB_L3.o 1838 6441 bpf_lb-DLB_L4.o 3218 5908 bpf_lb-DUNKNOWN.o 1064 1064 bpf_lxc-DDROP_ALL.o 26935 93790 bpf_lxc-DUNKNOWN.o 34439 123886 bpf_netdev.o 9721 31413 bpf_overlay.o 6184 18561 bpf_lxc_jit.o 39389 359445 After further debugging turned out that cillium progs are getting hurt by clang due to the same constant tracking issue. Newer clang generates better code by spilling less to the stack. Instead it keeps more constants in the registers which hurts state pruning since the verifier already tracks constants in the registers: old clang new clang (no spill/fill tracking introduced by this patch) bpf_lb-DLB_L3.o 1838 1923 bpf_lb-DLB_L4.o 3218 3077 bpf_lb-DUNKNOWN.o 1064 1062 bpf_lxc-DDROP_ALL.o 26935 166729 bpf_lxc-DUNKNOWN.o 34439 174607 bpf_netdev.o 9721 8407 bpf_overlay.o 6184 5420 bpf_lcx_jit.o 39389 39389 The final table is depressing: old clang old clang new clang new clang const spill/fill const spill/fill bpf_lb-DLB_L3.o 1838 6441 1923 8128 bpf_lb-DLB_L4.o 3218 5908 3077 6707 bpf_lb-DUNKNOWN.o 1064 1064 1062 1062 bpf_lxc-DDROP_ALL.o 26935 93790 166729 380712 bpf_lxc-DUNKNOWN.o 34439 123886 174607 440652 bpf_netdev.o 9721 31413 8407 31904 bpf_overlay.o 6184 18561 5420 23569 bpf_lxc_jit.o 39389 359445 39389 359445 Tracking constants in the registers hurts state pruning already. Adding tracking of constants through stack hurts pruning even more. The later patch address this general constant tracking issue with coarse/precise logic. Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann kernel/bpf/verifier.c | 90 +++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 65 insertions(+), 25 deletions(-) commit a324aae32fa9bfdd03e89078e20ebcbd7737fda5 Author: Andrii Nakryiko Date: Mon Jun 17 15:48:58 2019 -0700 libbpf: constify getter APIs Add const qualifiers to bpf_object/bpf_program/bpf_map arguments for getter APIs. There is no need for them to not be const pointers. Verified that make -C tools/lib/bpf make -C tools/testing/selftests/bpf make -C tools/perf all build without warnings. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann tools/lib/bpf/libbpf.c | 80 ++++++++++++++++++++++++++------------------------ tools/lib/bpf/libbpf.h | 62 +++++++++++++++++++------------------- 2 files changed, 72 insertions(+), 70 deletions(-) commit 64a68a7360681cfb3ce1cd5eb9c1eb3a12b6d44c Author: Bjorn Andersson Date: Mon Jun 17 22:25:47 2019 -0700 arm64: dts: qcom: msm8996: Correct apr-domain property The domain specifier was changed from using "reg" to "qcom,apr-domain", update the dts accordingly. Acked-by: Srinivas Kandagatla Signed-off-by: Bjorn Andersson arch/arm64/boot/dts/qcom/msm8996.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 895d8860a1a9b13ebddccb76a70faf4c01081699 Author: Suganath Prabu S Date: Fri May 31 08:14:43 2019 -0400 scsi: mpt3sas: Update driver version to 29.100.00.00 Update driver version from 28.100.00.00 to 29.100.00.00 This is equivalent to Phase 10 OOB driver. Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ca7e1e9d88a4a89bcdd7da5d81d038199ea96592 Author: Suganath Prabu S Date: Fri May 31 08:14:42 2019 -0400 scsi: mpt3sas: Introduce perf_mode module parameter 1. Introduce module parameter perf_mode for only Aero/Sea generation HBAs. 2. Update IOC page1 fields according to performance mode. Below are the performance modes that can be enabled with module parameter perf_mode: 0: Balanced - Few high iops reply queues will be enabled. Interrupt coalescing will be enabled only for these high iops reply descriptor queues. 1: Iops - Interrupt coalescing will be enabled on all reply queues. Coalescing timeout is set to 0x20.This is default value for Aero. 2: Latency - Interrupt coalescing will be enabled on all reply queues. Coalescing timeout is set to 0xA. This is a legacy behavior similar to Ventura & Invader HBA series. Default perf mode set by driver will be balanced mode if the following conditions are met: - CPU vendor = Intel; - Aero controller working in 16GT/s pcie speed Performance mode will be set to latency mode for all other cases. 4k Random Read IO performance numbers on 24 SAS SSD drives for above three permormance modes. Performance data is from Intel Skylake and HGST SS300 (drive model SDLL1DLR400GCCA1). IOPs: ----------------------------------------------------------------------- |perf_mode | qd = 1 | qd = 64 | note | |-------------|--------|---------|------------------------------------- |balanced | 259K | 3061k | Provides max performance numbers | | | | | both on lower QD workload & | | | | | also on higher QD workload | |-------------|--------|---------|------------------------------------- |iops | 220K | 3100k | Provides max performance numbers | | | | | only on higher QD workload. | |-------------|--------|---------|------------------------------------- |latency | 246k | 2226k | Provides good performance numbers | | | | | only on lower QD worklaod. | ----------------------------------------------------------------------- Avarage Latency: ----------------------------------------------------- |perf_mode | qd = 1 | qd = 64 | |-------------|--------------|----------------------| |balanced | 92.05 usec | 501.12 usec | |-------------|--------------|----------------------| |iops | 108.40 usec | 498.10 usec | |-------------|--------------|----------------------| |latency | 97.10 usec | 689.26 usec | ----------------------------------------------------- Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.c | 144 +++++++++++++++++++++++++++++++----- 1 file changed, 126 insertions(+), 18 deletions(-) commit 2426f20903ff4ee83cef585b2130ed45adc865d8 Author: Suganath Prabu S Date: Fri May 31 08:14:41 2019 -0400 scsi: mpt3sas: Enable interrupt coalescing on high iops Enable interrupt coalescing only on high iops queues. In ioc config page 1, offset 0x14 (ProductSpecific field) is used to determine interrupt coalescing enabled/disabled on per reply descriptor post queue group(8) basis. If 31st bit is zero, then interrupt coalescing is enabled for all reply descriptor post queues. If 31st bit is set to one, then user can enable/disable interrupt coalescing on per reply descriptor post queue group(8) basis. So to enable interrupt coalescing only on first reply descriptor post queue group (i.e. on high iops queues), set bit 0 and 31. This configuration should reset during driver unload or shutdown to the default settings. For this, the driver takes copy of default ioc page 1 and copies back the default or unmodified ioc page1 during unload and shutdown. This means that on next driver load (e.g. if older version driver is loaded by user), current modified changes on ioc page1 won't take effect. Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h | 2 +- drivers/scsi/mpt3sas/mpt3sas_base.c | 16 ++++++++ drivers/scsi/mpt3sas/mpt3sas_base.h | 5 +++ drivers/scsi/mpt3sas/mpt3sas_config.c | 71 +++++++++++++++++++++++++++++++++++ drivers/scsi/mpt3sas/mpt3sas_scsih.c | 17 ++++++++- 5 files changed, 109 insertions(+), 2 deletions(-) commit 728bbc6cbff70051813730fb7977f5d99d867e12 Author: Suganath Prabu S Date: Fri May 31 08:14:40 2019 -0400 scsi: mpt3sas: Affinity high iops queues IRQs to local node High iops queues are mapped to non-managed irqs. Set affinity of non-managed irqs to local numa node. Low latency queues are mapped to managed irqs. Driver reserves some reply queues for max iops (through pci_alloc_irq_vectors_affinity and .pre_vectors interface). The rest of queues are for low latency. Based on io workload in io submission path, driver will decide which group of reply queues (either high iops queues or low latency queues) to be used. High iops queues will be mapped to local numa node of controller and low latency queues will be mapped to cpus across numa nodes. In general, high iops and low latency queues should fit into 128 reply queues which is the max number of reply queues supported by Aero/Sea. Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.c | 73 +++++++++++++++++++++++++++++++------ 1 file changed, 62 insertions(+), 11 deletions(-) commit 998c3001d31a278c9fb5cf68a2b0285dc7c76cdd Author: Suganath Prabu S Date: Fri May 31 08:14:39 2019 -0400 scsi: mpt3sas: save and use MSI-X index for posting RD In the IO submission path _base_get_msix_index is called twice. Initially while getting the smid and subsequently while posting the request descriptor (RD). Refactor code to query msix index only while posting the request descriptor. Save determined msix index in msix_io field. Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.c | 42 ++++++++++++++++++++++++++++-------- drivers/scsi/mpt3sas/mpt3sas_base.h | 1 + drivers/scsi/mpt3sas/mpt3sas_scsih.c | 1 + 3 files changed, 35 insertions(+), 9 deletions(-) commit 5dd48a555a40431787e4e780ec6b3a7632250853 Author: Suganath Prabu S Date: Fri May 31 08:14:38 2019 -0400 scsi: mpt3sas: Use high iops queues under some circumstances The driver will use round-robin method for io submission in batches within the high iops queues when the number of in-flight ios on the target device is larger than 8. Otherwise the driver will use low latency reply queues. Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.c | 36 +++++++++++++++++++++++++++++++++++- drivers/scsi/mpt3sas/mpt3sas_base.h | 14 +++++++++++++- 2 files changed, 48 insertions(+), 2 deletions(-) commit 0213651609b91180d1645388d35d6e77d7e0a886 Author: Suganath Prabu S Date: Fri May 31 08:14:37 2019 -0400 scsi: mpt3sas: change _base_get_msix_index prototype Code refactoring. In function _base_get_msix_index, add scmd as second argument. This change is made in preparation for the next patch where we introduce a new function to get the MSI-X index for high iops queues. Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.c | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) commit 18fd3d8cf903404b2c7cd31a083be4db2e6a2a76 Author: Suganath Prabu S Date: Fri May 31 08:14:36 2019 -0400 scsi: mpt3sas: Add flag high_iops_queues Aero controllers support balanced performance mode through the ability to configure queues with different properties. Reply queues with interrupt coalescing enabled are called "high iops reply queues" and reply queues with interrupt coalescing disabled are called "low latency reply queues". The driver configures a combination of high iops and low latency reply queues if: - HBA is an AERO controller; - MSI-X vectors supported by the HBA is 128; - Total CPU count in the system more than high iops queue count; - Driver is loaded with default max_msix_vectors module parameter; and - System booted in non-kdump mode. Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.c | 45 ++++++++++++++++++++++++++++++++----- drivers/scsi/mpt3sas/mpt3sas_base.h | 5 +++++ 2 files changed, 45 insertions(+), 5 deletions(-) commit 79c74d03d527f8bd6727eba4ed4c22f6b0bca14d Author: Suganath Prabu S Date: Fri May 31 08:14:35 2019 -0400 scsi: mpt3sas: Add Atomic RequestDescriptor support on Aero If the Aero HBA supports Atomic Request Descriptors, it sets the Atomic Request Descriptor Capable bit in the IOCCapabilities field of the IOCFacts Reply message. Driver uses an Atomic Request Descriptor as an alternative method for posting an entry onto a request queue. The posting of an Atomic Request Descriptor is an atomic operation, providing a safe mechanism for multiple processors on the host to post requests without synchronization. This Atomic Request Descriptor format is identical to first 32 bits of Default Request Descriptor and uses only 32 bits. Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.c | 118 +++++++++++++++++++++++++++++++++--- drivers/scsi/mpt3sas/mpt3sas_base.h | 2 + 2 files changed, 111 insertions(+), 9 deletions(-) commit 078a4cc1380de7d4857e6db31c1d1ae9bdd56cc7 Author: Suganath Prabu S Date: Fri May 31 08:14:34 2019 -0400 scsi: mpt3sas: function pointers of request descriptor This code refactoring introduces function pointers. Host uses Request Descriptors of different types for posting an entry onto a request queue. Based on controller type and capabilities, host can also use atomic descriptors other than normal descriptors. Using function pointer will avoid if-else statements Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.c | 38 ++++++++++++++++++-------------- drivers/scsi/mpt3sas/mpt3sas_base.h | 3 +++ drivers/scsi/mpt3sas/mpt3sas_config.c | 2 +- drivers/scsi/mpt3sas/mpt3sas_ctl.c | 20 ++++++++--------- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 20 ++++++++--------- drivers/scsi/mpt3sas/mpt3sas_transport.c | 8 +++---- 6 files changed, 49 insertions(+), 42 deletions(-) commit 881a9a54da175aa5897b8fef7abe0f85a5242770 Author: Geert Uytterhoeven Date: Fri Jun 7 13:34:26 2019 +0200 scsi: isci: Grammar s/the its/its/ Signed-off-by: Geert Uytterhoeven Signed-off-by: Martin K. Petersen drivers/scsi/isci/request.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ec0a95aba4be8b217081883c79fcf2bbd9453916 Author: Geert Uytterhoeven Date: Fri Jun 7 13:27:36 2019 +0200 scsi: aic7xxx: Spelling s/configuraion/configuration/ Signed-off-by: Geert Uytterhoeven Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/aic7xxx/aic7xxx.reg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bc7625795cb993de0297b0e010d70dde75ad75ff Author: YueHaibing Date: Sat Jun 1 03:18:06 2019 +0000 scsi: megaraid_sas: Remove unused including Remove including that don't need it. Signed-off-by: YueHaibing Acked-by: Sumit Saxena Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_debugfs.c | 1 - 1 file changed, 1 deletion(-) commit d635468349695e6f2286400eb7a740f1635000b4 Author: Tomas Henzl Date: Wed May 29 18:00:41 2019 +0200 scsi: megaraid_sas: use DEVICE_ATTR_{RO, RW} Use existing macros. No functional change. Signed-off-by: Tomas Henzl Acked-by: Sumit Saxena Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 44 +++++++++++++------------------ 1 file changed, 18 insertions(+), 26 deletions(-) commit ea14e46240fee24f125610d3038183d68ae75b80 Author: Tomas Henzl Date: Wed May 29 18:00:40 2019 +0200 scsi: megaraid_sas: use octal permissions instead of constants Checkpatch emits a warning when using symbolic permissions. Use octal permissions instead. No functional change. Signed-off-by: Tomas Henzl Acked-by: Sumit Saxena Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 20 ++++++++++---------- drivers/scsi/megaraid/megaraid_sas_fp.c | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) commit deff37063351ddf5defe1027b172548fdfbdcbe6 Author: Tomas Henzl Date: Wed May 29 18:00:39 2019 +0200 scsi: megaraid_sas: make max_sectors visible in sys Support is easier with all driver parameters visible in sysfs. Signed-off-by: Tomas Henzl Acked-by: Sumit Saxena Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cdf79db476c44c580045e9e0937288502e00eaad Author: YueHaibing Date: Sat May 25 20:40:06 2019 +0800 scsi: megaraid_sas: remove set but not used variables 'buff_addr' and 'ci_h' Fixes gcc '-Wunused-but-set-variable' warnings: drivers/scsi/megaraid/megaraid_sas_base.c: In function megasas_fw_crash_buffer_show: drivers/scsi/megaraid/megaraid_sas_base.c:3138:16: warning: variable buff_addr set but not used [-Wunused-but-set-variable] drivers/scsi/megaraid/megaraid_sas_base.c: In function megasas_get_pd_list: drivers/scsi/megaraid/megaraid_sas_base.c:4426:13: warning: variable ci_h set but not used [-Wunused-but-set-variable] 'buff_addr' is never used since inroduction in commit fc62b3fc9021 ("megaraid_sas : Firmware crash dump feature support") 'ci_h' is not used since commit 9b3d028f3468 ("scsi: megaraid_sas: Pre-allocate frequently used DMA buffers") Signed-off-by: YueHaibing Acked-by: Sumit Saxena Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 5 ----- 1 file changed, 5 deletions(-) commit ed17190941c795314a5dcc2e8d48107aed0f8782 Author: YueHaibing Date: Sat May 25 20:37:05 2019 +0800 scsi: megaraid_sas: remove set but not used variable 'sge_sz' Fixes gcc '-Wunused-but-set-variable' warning: drivers/scsi/megaraid/megaraid_sas_base.c: In function megasas_create_frame_pool: drivers/scsi/megaraid/megaraid_sas_base.c:4124:6: warning: variable sge_sz set but not used [-Wunused-but-set-variable] It's not used any more since commit 200aed582d61 ("megaraid_sas: endianness related bug fixes and code optimization") Signed-off-by: YueHaibing Acked-by: Sumit Saxena Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 11 ----------- 1 file changed, 11 deletions(-) commit 336df6eb628298e27e40e23d1eb00a0fb7083269 Author: Nathan Chancellor Date: Wed Jun 5 22:24:21 2019 -0700 scsi: lpfc: Avoid unused function warnings When building powerpc pseries_defconfig or powernv_defconfig: drivers/scsi/lpfc/lpfc_nvmet.c:224:1: error: unused function 'lpfc_nvmet_get_ctx_for_xri' [-Werror,-Wunused-function] drivers/scsi/lpfc/lpfc_nvmet.c:246:1: error: unused function 'lpfc_nvmet_get_ctx_for_oxid' [-Werror,-Wunused-function] These functions are only compiled when CONFIG_NVME_TARGET_FC is enabled. Use that same condition so there is no more warning. While the fixes commit did not introduce these functions, it caused these warnings. Fixes: 4064b27417a7 ("scsi: lpfc: Make some symbols static") Signed-off-by: Nathan Chancellor Acked-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_nvmet.c | 2 ++ 1 file changed, 2 insertions(+) commit 0824721463bc0c9394838af771dc7a8995065efa Author: Jack Wang Date: Thu Jun 6 17:33:05 2019 +0200 scsi: MAINTAINERS: update maintainer for PM8001 Lindar's email addess is bouncing for some time, just remove it. ProfitBricks was rebranded to 1 & 1 Cloud IONOS, so update my email address too. Signed-off-by: Jack Wang Signed-off-by: Martin K. Petersen MAINTAINERS | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 961ed94e8a83d8881546a278bf844699af92a502 Author: Nathan Chancellor Date: Mon Jun 3 16:44:06 2019 -0700 scsi: ibmvscsi: Don't use rc uninitialized in ibmvscsi_do_work clang warns: drivers/scsi/ibmvscsi/ibmvscsi.c:2126:7: warning: variable 'rc' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized] case IBMVSCSI_HOST_ACTION_NONE: ^~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/ibmvscsi/ibmvscsi.c:2151:6: note: uninitialized use occurs here if (rc) { ^~ Initialize rc in the IBMVSCSI_HOST_ACTION_UNBLOCK case statement then shuffle IBMVSCSI_HOST_ACTION_NONE down to the default case statement and make it return early so that rc is never used uninitialized in this function. Fixes: 035a3c4046b5 ("scsi: ibmvscsi: redo driver work thread to use enum action states") Link: https://github.com/ClangBuiltLinux/linux/issues/502 Suggested-by: Michael Ellerman Suggested-by: Tyrel Datwyler Signed-off-by: Nathan Chancellor Acked-by: Tyrel Datwyler Signed-off-by: Martin K. Petersen drivers/scsi/ibmvscsi/ibmvscsi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit d7b761b0694986ea811c0daaa1178bfaaddf036d Author: YueHaibing Date: Fri May 31 23:28:41 2019 +0800 scsi: lpfc: Make some symbols static Fix sparse warnings: drivers/scsi/lpfc/lpfc_sli.c:115:1: warning: symbol 'lpfc_sli4_pcimem_bcopy' was not declared. Should it be static? drivers/scsi/lpfc/lpfc_sli.c:7854:1: warning: symbol 'lpfc_sli4_process_missed_mbox_completions' was not declared. Should it be static? drivers/scsi/lpfc/lpfc_nvmet.c:223:27: warning: symbol 'lpfc_nvmet_get_ctx_for_xri' was not declared. Should it be static? drivers/scsi/lpfc/lpfc_nvmet.c:245:27: warning: symbol 'lpfc_nvmet_get_ctx_for_oxid' was not declared. Should it be static? drivers/scsi/lpfc/lpfc_init.c:75:10: warning: symbol 'lpfc_present_cpu' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: YueHaibing Acked-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_init.c | 2 +- drivers/scsi/lpfc/lpfc_nvmet.c | 4 ++-- drivers/scsi/lpfc/lpfc_sli.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) commit a82b3539dc27b3a85f0c46c9bc398734fdd08260 Author: YueHaibing Date: Fri May 31 23:27:45 2019 +0800 scsi: lpfc: Remove set but not used variables 'qp' Fixes gcc '-Wunused-but-set-variable' warnings: drivers/scsi/lpfc/lpfc_init.c: In function lpfc_setup_cq_lookup: drivers/scsi/lpfc/lpfc_init.c:9359:30: warning: variable qp set but not used [-Wunused-but-set-variable] It's not used since commit e70596a60f88 ("scsi: lpfc: Fix poor use of hardware queues if fewer irq vectors") Signed-off-by: YueHaibing Acked-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_init.c | 2 -- 1 file changed, 2 deletions(-) commit a90ef98b21cf40784af7ace77038f8341a7b96c8 Author: Enzo Matsumiya Date: Tue May 7 12:39:05 2019 -0300 scsi: qla2xxx: remove double assignment in qla2x00_update_fcport Remove double assignment in qla2x00_update_fcport(). Signed-off-by: Enzo Matsumiya Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_init.c | 1 - 1 file changed, 1 deletion(-) commit 97fcf176b43bedcfd64cca5fd7e07e2cd2bde284 Author: Xiang Chen Date: Wed May 29 17:58:47 2019 +0800 scsi: hisi_sas: Disable stash for v3 hw For v3 hw, stash is enabled to promote performance, but it does little to improve performance according to current tests. What's more, it causes exceptions for some situations, so disable it. Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 2 ++ 1 file changed, 2 insertions(+) commit e4c19deba6078c41fab2cb2ea0088088db228c21 Author: Luo Jiaxing Date: Wed May 29 17:58:46 2019 +0800 scsi: hisi_sas: Ignore the error code between phy down to phy up Several error codes will be generated between PHY down to up. This issue was introduced by HW design. The designers came to the conclusion that we should ignore these errors. Signed-off-by: Jiaxing Luo Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 0ab7bc825a12100bff27f82b8bc1eb7aaf929248 Author: Xiang Chen Date: Wed May 29 17:58:45 2019 +0800 scsi: hisi_sas: Change the type of some numbers to unsigned It reports a error as follows from some tools at two places in our code: runtime error: left shift of 4 by 29 places cannot be represented in type 'int' So change the type of the two numbers to unsigned to avoid the error. Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c7669f50121ac43d33fe8fe7c38f737c6c35e323 Author: John Garry Date: Wed May 29 17:58:44 2019 +0800 scsi: hisi_sas: Reduce HISI_SAS_SGE_PAGE_CNT in size Macro HISI_SAS_SGE_PAGE_CNT is defined to SG_CHUNK_SIZE, which is 128. This means that sizeof(struct hisi_sas_slot_buf_table) is 4192. This is just over a 4K, which can mean inefficient DMA memory usage (for no PI). Reduce the size of HISI_SAS_SGE_PAGE_CNT to 124 to fit in a 4K page. With this change, we experience no performance hit. Cc: dann frazier Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 794327ab53cc6b330774d6fdb93b547666583db9 Author: Xiaofei Tan Date: Wed May 29 17:58:43 2019 +0800 scsi: hisi_sas: Fix the issue of argument mismatch of printing ecc errors The argument of dev_err() called by multi_bit_ecc_error_process_v3_hw() is not right. We pass two arguments, but there is only one printk format specifier in the string. Also move the print format string to dev_err(). Signed-off-by: Xiaofei Tan Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 46 ++++++++++++++++++---------------- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 25 +++++++++--------- 2 files changed, 37 insertions(+), 34 deletions(-) commit 6c86e046cf97b4a03d6166ba95b3f448455abbb0 Author: Xiang Chen Date: Wed May 29 17:58:42 2019 +0800 scsi: hisi_sas: Delete PHY timers when rmmod or probe failed When removing the driver or when probe fails, we need to delete the PHY timers. Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_main.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit b3b2a9f60fd9e38c45d4728cac78ddf5596f3bb0 Author: Bharath Vedartham Date: Wed May 22 21:31:49 2019 +0530 scsi: message: fusion: Use kmemdup instead of memcpy and kmalloc Replace kmalloc + memcpy with kmemdup. This was reported by coccinelle. Signed-off-by: Bharath Vedartham Signed-off-by: Martin K. Petersen drivers/message/fusion/mptbase.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit de19212c2890d1bb1e2d0e303affba620b86819b Author: YueHaibing Date: Sat May 25 20:42:02 2019 +0800 scsi: megaraid_sas: remove set but not used variables 'host' and 'wait_time' Fixes gcc '-Wunused-but-set-variable' warnings: drivers/scsi/megaraid/megaraid_sas_base.c: In function megasas_suspend: drivers/scsi/megaraid/megaraid_sas_base.c:7269:20: warning: variable host set but not used [-Wunused-but-set-variable] drivers/scsi/megaraid/megaraid_sas_base.c: In function megasas_aen_polling: drivers/scsi/megaraid/megaraid_sas_base.c:8397:15: warning: variable wait_time set but not used [-Wunused-but-set-variable] 'host' never used since introduction in commit 31ea7088974c ("[SCSI] megaraid_sas: add hibernation support") 'wait_time' never used since commit 11c71cb4ab7c ("megaraid_sas: Do not allow PCI access during OCR") Signed-off-by: YueHaibing Acked-by: Sumit Saxena Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit dea98ba45a187fd6fa836b070e95a8ba68499bb4 Author: YueHaibing Date: Sat May 25 20:38:21 2019 +0800 scsi: megaraid_sas: remove set but not used variable 'cur_state' Fixes gcc '-Wunused-but-set-variable' warning: drivers/scsi/megaraid/megaraid_sas_base.c: In function megasas_transition_to_ready: drivers/scsi/megaraid/megaraid_sas_base.c:3900:6: warning: variable cur_state set but not used [-Wunused-but-set-variable] Never used since commit 7218df69e360 ("[SCSI] megaraid_sas: use the firmware boot timeout when waiting for commands") Signed-off-by: YueHaibing Acked-by: Sumit Saxena Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 11 ----------- 1 file changed, 11 deletions(-) commit f9e3ebeea4521652318af903cddeaf033527e93e Author: Gen Zhang Date: Thu May 30 09:10:30 2019 +0800 scsi: mpt3sas_ctl: fix double-fetch bug in _ctl_ioctl_main() In _ctl_ioctl_main(), 'ioctl_header' is fetched the first time from userspace. 'ioctl_header.ioc_number' is then checked. The legal result is saved to 'ioc'. Then, in condition MPT3COMMAND, the whole struct is fetched again from the userspace. Then _ctl_do_mpt_command() is called, 'ioc' and 'karg' as inputs. However, a malicious user can change the 'ioc_number' between the two fetches, which will cause a potential security issues. Moreover, a malicious user can provide a valid 'ioc_number' to pass the check in first fetch, and then modify it in the second fetch. To fix this, we need to recheck the 'ioc_number' in the second fetch. Signed-off-by: Gen Zhang Acked-by: Suganath Prabu S Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_ctl.c | 4 ++++ 1 file changed, 4 insertions(+) commit 821744403913d957cb52263b2016fd5bd29c30d0 Author: Stanley Chu Date: Tue May 21 14:44:54 2019 +0800 scsi: ufs: Add error-handling of Auto-Hibernate Currently auto-hibernate is activated if host supports auto-hibern8 capability. However error-handling is not implemented, which makes the feature somewhat risky. If either "Hibernate Enter" or "Hibernate Exit" fail during auto-hibernate flow, the corresponding interrupt "UIC_HIBERNATE_ENTER" or "UIC_HIBERNATE_EXIT" shall be raised according to UFS specification. This patch adds auto-hibernate error-handling: - Monitor "Hibernate Enter" and "Hibernate Exit" interrupts after auto-hibernate feature is activated. - If a failure happens, trigger error-handling just like "manual-hibernate" failure and apply the same recovery flow: schedule UFS error handler in ufshcd_check_errors(), and then do host reset and restore in UFS error handler. Signed-off-by: Stanley Chu Reviewed-by: Bean Huo Reviewed-by: Alim Akhtar Reviewed-by: Avri Altman Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 31 +++++++++++++++++++++++++++++++ drivers/scsi/ufs/ufshci.h | 6 ++++-- 2 files changed, 35 insertions(+), 2 deletions(-) commit f571b377ded7466e175e73c116df9ae09527dcb0 Author: Stanley Chu Date: Tue May 21 14:44:53 2019 +0800 scsi: ufs: Do not overwrite Auto-Hibernate timer Some vendor-specific initialization flow may set its own auto-hibernate timer. In this case, do not overwrite timer value as "default value" in ufshcd_init(). Signed-off-by: Stanley Chu Reviewed-by: Alim Akhtar Reviewed-by: Avri Altman Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ee5f1042b20e1ffbc5c7eb0e0883fdbc05cec85f Author: Stanley Chu Date: Tue May 21 14:44:52 2019 +0800 scsi: ufs: Introduce ufshcd_is_auto_hibern8_supported() The checking of Auto-Hibernation support is used in many places in the driver, thus re-factor it as ufshcd_is_auto_hibern8_supported() to make code more clean. Signed-off-by: Stanley Chu Reviewed-by: Bean Huo Reviewed-by: Alim Akhtar Reviewed-by: Avri Altman Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufs-sysfs.c | 6 +++--- drivers/scsi/ufs/ufshcd.c | 4 ++-- drivers/scsi/ufs/ufshcd.h | 5 +++++ 3 files changed, 10 insertions(+), 5 deletions(-) commit a1b6fb947f92352bc8edab901d773306c5b80b8b Author: Jason Yan Date: Mon May 20 22:06:00 2019 +0800 scsi: libsas: no need to join wide port again in sas_ex_discover_dev() Since we are processing events synchronously now, the second call of sas_ex_join_wide_port() in sas_ex_discover_dev() is not needed. There will be no races with other works in disco workqueue. So remove the second sas_ex_join_wide_port(). I did not change the return value of 'res' to error when discover failed because we need to continue to discover other phys if one phy discover failed. So let's keep that logic as before and just add a debug log to detect the failure. And directly return if second fanout expander attatched to the parent expander because it has nothing to do after the phy is disabled. Signed-off-by: Jason Yan Reviewed-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/libsas/sas_expander.c | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) commit a5c990eea5ddd587bcd9af6dc973a1653c8d94af Author: Thomas Meyer Date: Wed May 29 22:21:36 2019 +0200 scsi: lpfc: Use *_pool_zalloc rather than *_pool_alloc Use *_pool_zalloc rather than *_pool_alloc followed by memset with 0. Signed-off-by: Thomas Meyer Acked-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_init.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 36631157eb3ff8b0b359d574452ebb8f81370ec5 Author: Colin Ian King Date: Wed May 22 09:39:03 2019 +0100 scsi: hpsa: fix an uninitialized read and dereference of pointer dev Currently the check for a lockup_detected failure exits via the label return_reset_status that reads and dereferences an uninitialized pointer dev. Fix this by ensuring dev is inintialized to null. Addresses-Coverity: ("Uninitialized pointer read") Fixes: 14991a5bade5 ("scsi: hpsa: correct device resets") Signed-off-by: Colin Ian King Acked-by: Don Brace Reviewed-by: Nathan Chancellor Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8a914f32e2dfaff7f23002502ba64a2abb2a4a50 Author: Hariprasad Kelam Date: Tue May 28 06:51:52 2019 +0530 scsi: target/iscsi: fix possible condition with no effect (if == else) Fix the following warning reported by coccicheck: drivers/target/iscsi/iscsi_target_nego.c:175:6-8: WARNING: possible condition with no effect (if == else) Signed-off-by: Hariprasad Kelam Reviewed-by: David Disseldorp Signed-off-by: Martin K. Petersen drivers/target/iscsi/iscsi_target_nego.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) commit 32877947b7a806bb655a830d9cab709a3aebd49b Author: Weitao Hou Date: Mon May 20 11:24:03 2019 +0800 scsi: pm8001: Fix typo in code comments Fix abord to abort. Signed-off-by: Weitao Hou Acked-by: Jack Wang Signed-off-by: Martin K. Petersen drivers/scsi/pm8001/pm8001_sas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8674a8aa2c399cb4014052796ba4bd0fbd6f3c03 Author: Ondrej Zary Date: Mon May 27 22:19:47 2019 +0200 scsi: fdomain: Add PCMCIA support Add PCMCIA card support to Future Domain SCSI driver. Tested with IBM SCSI PCMCIA Adapter 40G1890. Signed-off-by: Ondrej Zary Signed-off-by: Martin K. Petersen drivers/scsi/fdomain.c | 7 ++- drivers/scsi/pcmcia/Kconfig | 10 +++++ drivers/scsi/pcmcia/Makefile | 1 + drivers/scsi/pcmcia/fdomain_cs.c | 95 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 111 insertions(+), 2 deletions(-) commit 1697c6a64c49df3ed1a7e81845dcf2edf6ea23db Author: Ondrej Zary Date: Sat May 18 21:47:24 2019 +0200 scsi: fdomain: Add register definitions Add register bit definitions from documentation to header file and use them instead of magic constants. No changes to generated binary. Signed-off-by: Ondrej Zary Signed-off-by: Martin K. Petersen drivers/scsi/fdomain.c | 144 ++++++++++++++++++++++++--------------------- drivers/scsi/fdomain.h | 117 +++++++++++++++++++++++++++--------- drivers/scsi/fdomain_isa.c | 4 +- 3 files changed, 167 insertions(+), 98 deletions(-) commit aa343c695aa59f03f31a2f989b8c977a727e46e3 Author: Tyrel Datwyler Date: Thu May 2 19:50:58 2019 -0500 scsi: ibmvscsi: fix tripping of blk_mq_run_hw_queue WARN_ON After a successful SRP login response we call scsi_unblock_requests() to kick any pending IOs. The callback to process this SRP response happens in a tasklet and therefore is in softirq context. The result of such is that when blk-mq is enabled, it is no longer safe to call scsi_unblock_requests() from this context. The result of duing so triggers the following WARN_ON splat in dmesg after a host reset or CRQ reenablement. WARNING: CPU: 0 PID: 0 at block/blk-mq.c:1375 __blk_mq_run_hw_queue+0x120/0x180 Modules linked in: CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.0.0-rc8 #4 NIP [c0000000009771e0] __blk_mq_run_hw_queue+0x120/0x180 LR [c000000000977484] __blk_mq_delay_run_hw_queue+0x244/0x250 Call Trace: __blk_mq_delay_run_hw_queue+0x244/0x250 blk_mq_run_hw_queue+0x8c/0x1c0 blk_mq_run_hw_queues+0x60/0x90 scsi_run_queue+0x1e4/0x3b0 scsi_run_host_queues+0x48/0x80 login_rsp+0xb0/0x100 ibmvscsi_handle_crq+0x30c/0x3e0 ibmvscsi_task+0x54/0xe0 tasklet_action_common.isra.3+0xc4/0x1a0 __do_softirq+0x174/0x3f4 irq_exit+0xf0/0x120 __do_irq+0xb0/0x210 call_do_irq+0x14/0x24 do_IRQ+0x9c/0x130 hardware_interrupt_common+0x14c/0x150 This patch fixes the issue by introducing a new host action for unblocking the scsi requests in our seperate work thread. Signed-off-by: Tyrel Datwyler Signed-off-by: Martin K. Petersen drivers/scsi/ibmvscsi/ibmvscsi.c | 5 ++++- drivers/scsi/ibmvscsi/ibmvscsi.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) commit 6e40de8b6b3cfa7288bb4a1fee2c7173f53b7345 Author: Tyrel Datwyler Date: Thu May 2 19:50:57 2019 -0500 scsi: ibmvscsi: redo driver work thread to use enum action states The current implemenation relies on two flags in the driver's private host structure to signal the need for a host reset or to reenable the CRQ after a LPAR migration. This patch does away with those flags and introduces a single action flag and defined enums for the supported kthread work actions. Lastly, the if/else logic is replaced with a switch statement. Signed-off-by: Tyrel Datwyler Signed-off-by: Martin K. Petersen drivers/scsi/ibmvscsi/ibmvscsi.c | 61 +++++++++++++++++++++++++++------------- drivers/scsi/ibmvscsi/ibmvscsi.h | 9 ++++-- 2 files changed, 49 insertions(+), 21 deletions(-) commit 2e22520475037f97b5a3234591183105ecf9845b Author: Tyrel Datwyler Date: Thu May 2 19:50:56 2019 -0500 scsi: ibmvscsi: Wire up host_reset() in the driver's scsi_host_template Wire up the host_reset function in our driver_template to allow a user requested adpater reset via the host_reset sysfs attribute. Example: echo "adapter" > /sys/class/scsi_host/host0/host_reset Signed-off-by: Tyrel Datwyler Signed-off-by: Martin K. Petersen drivers/scsi/ibmvscsi/ibmvscsi.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 852eb63a7179249f95ba2e1faaabf403e39d88b3 Author: James Smart Date: Tue May 21 17:49:11 2019 -0700 scsi: lpfc: Update lpfc version to 12.2.0.3 Update lpfc version to 12.2.0.3 Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 01d53c04637f96bbb753e9c7f61392c40671b564 Author: James Smart Date: Tue May 21 17:49:10 2019 -0700 scsi: lpfc: Fix kernel warnings related to smp_processor_id() Kernel warnings may be seen with preempt debugging enabled. Replace smp_processor_id calls with raw_smp_processor_id or cpu information stored in hdwq structures. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_nvmet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aa6ff309187256ee542a8cf47adbfcfdaa888c46 Author: James Smart Date: Tue May 21 17:49:09 2019 -0700 scsi: lpfc: Fix BFS crash with DIX enabled Crashes in scsi_queue_rq or in dma_unmap_direct_sg during BFS when lpfc has lpfc_enable_bg=1. lpfc is setting DIX and prot sg after scsi_add_host_with_dma() has been called. The scsi_host_set_prot() and scsi_host_set_guard() routines need to be called before scsi_add_host_with_dma(). Revise the calling sequence to set the protection/guard data before calling scsi_add_host_with_dma(). Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Ewan D. Milne Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_init.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 93f647f93df14742923133582ad603bf35628e92 Author: James Smart Date: Tue May 21 17:49:08 2019 -0700 scsi: lpfc: Fix FDMI fc4type for nvme support FDMI protocol support registration was not accurately showing nvme support. The fcponly-path clears the parameter object. Move the code out of the fcponly code path. Fix the FDMI registration data to properly check for nvme support. Commonize the manner in which the fdmi routines set protocol support. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_ct.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 996a02aeb959414378ea6c620934450944f8c5db Author: James Smart Date: Tue May 21 17:49:07 2019 -0700 scsi: lpfc: Fix fcp_rsp_len checking on lun reset Issuing a LUN reset was resulting in a command failure which then escalated to a host reset. The FCP-4 spec allows fcp_rsp_len field to specify the number of valid bytes of FCP_RSP_INFO, and the value could be 4 or 8. The driver is allowing only a value of 8, thus it failed the command. Revise the driver to allow 4 or 8. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_scsi.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 657add4e5e15b4872e6a6c2dfca43bff1b0197b4 Author: James Smart Date: Tue May 21 17:49:06 2019 -0700 scsi: lpfc: Fix poor use of hardware queues if fewer irq vectors While fixing the resources per socket, realized the driver was not using hardware queues (up to 1 per cpu) if there were fewer interrupt vectors. The driver was only using the hardware queue assigned to the cpu with the vector. Rework the affinity map check to use the additional hardware queue elements that had been allocated. If the cpu count exceeds the hardware queue count - share, but choose what is shared with by: hyperthread peer, core peer, socket peer, or finally similar cpu in a different socket. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_attr.c | 3 +- drivers/scsi/lpfc/lpfc_init.c | 321 +++++++++++++++++++++++++++++------------- drivers/scsi/lpfc/lpfc_sli.c | 42 +++--- drivers/scsi/lpfc/lpfc_sli4.h | 2 + 4 files changed, 255 insertions(+), 113 deletions(-) commit d9954a2d18c3405bbbe3f15390a9747f66df9f9a Author: James Smart Date: Tue May 21 17:49:05 2019 -0700 scsi: lpfc: Fix oops when driver is loaded with 1 interrupt vector The driver was coded expecting enough hardware queues and interrupt vectors such that at least there was one per socket. In the case where there were fewer than sockets, cpus were left unassigned thus null pointers. Rework the affinity mappings. Map settings for the cpu's that are in the irq cpu mask. For each cpu not in the mask, map to another cpu that does have a mask. Choice of the "other" cpu will attempt to map to the same cpu but differing hyperthread, or cpu within in same core, or cpu within same socket, or finally cpu in the base socket. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_attr.c | 27 +++++--- drivers/scsi/lpfc/lpfc_init.c | 143 +++++++++++++++++++++++++++++++++++++++--- drivers/scsi/lpfc/lpfc_sli4.h | 4 +- 3 files changed, 155 insertions(+), 19 deletions(-) commit b8e6f13617db126c8898908e8601f5e4e3b393cf Author: James Smart Date: Tue May 21 17:49:04 2019 -0700 scsi: lpfc: Fix incorrect logical link speed on trunks when links down Invalid logical speed is displayed for trunk enabled ports when all ports are down. Also noted that link speed is incorrectly reported for the units when links are up. Current code is returning the logical link speed from the last event from the adapter. In cases where the last link went down, the link speed in the event was not valid - meaning that although the links where down the field had a bogus value. Rework the event handling to qualify the trunk link state before using the event speed data. Also correct units on other areas where the logical link speed was taken from a link event. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_bsg.c | 2 +- drivers/scsi/lpfc/lpfc_init.c | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) commit 04d210c98e11d863ebe38a7e482e40fb90d9ad82 Author: James Smart Date: Tue May 21 17:49:03 2019 -0700 scsi: lpfc: Fix memory leak in abnormal exit path from lpfc_eq_create eq create is leaking mailbox memory if it encounters an error. rework error path to free the memory. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_sli.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit c15e07047e7ad006324d8a8b9d58a86e8f0131fe Author: James Smart Date: Tue May 21 17:49:02 2019 -0700 scsi: lpfc: Rework misleading nvme not supported in firmware message The driver unconditionally says fw doesn't support nvme when in truth it was a driver parameter settings that disabled nvme support. Rework the code validating nvme support to accurately report what condition is disabling nvme support. Save state on whether nvme fw supports nvme in case sysfs attributes change dynamically. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_init.c | 55 +++++++++++++++++++++++++++++-------------- drivers/scsi/lpfc/lpfc_sli4.h | 1 + 2 files changed, 38 insertions(+), 18 deletions(-) commit b9e5a2d961dbedd7ee293d21f12d6b5d4d4fc35a Author: James Smart Date: Tue May 21 17:49:01 2019 -0700 scsi: lpfc: Fix hardlockup in scsi_cmd_iocb_cmpl There is a race condition with the abort handler declaring a waitq item on it's stack, followed by a timeout in the abort handler that has it give up on the abort return to its caller. When the io is finally aborted and its completion handler called, it references the waitq element that the abort_handler set up, which is no longer valid resulting in a deadlock. Fix by clearing the waitq reference, under lock, when the abort handler timeout gives up. Have the completion handler validate the waitq before referencing it. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_scsi.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 6594d31bab02e4a1d02355ff2f16a87dfc11b34f Author: James Smart Date: Tue May 21 17:49:00 2019 -0700 scsi: lpfc: Cancel queued work for an IO when processing a received ABTS When queued work is executed posting a new command to the transport the driver is reporting a null buffer. The driver had received an ABTS which matched a command that had been scheduled for delivery to the transport. The driver proceeded to cancel the command, but the work item was never cancelled. Fix by cancelling the queued work item. Also turns out the ABTS response was not properly sending a BA_ACC, so set the flag to send the ACC. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_nvmet.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 51d23fb28ccb355ee4d26dedacca24c171c2f664 Author: James Smart Date: Tue May 21 17:48:59 2019 -0700 scsi: lpfc: Prevent 'use after free' memory overwrite in nvmet LS handling Use-after-free memory overwrite detected. Problem reported by Ewan Milne at Red Hat after running lpfc target with additional memory checking enabled. Race condition when lpfc_nvmet_xmt_ls_rsp_cmp frees the ctxp memory in interrupt context before lpfc_nvmet_xmt_ls_rsp clears a field in the ctxp after successfully issuing the wqe. Remove the unnecessary ctxp write after reposting the rq buffer. The ctxp->rqb_buffer field is not checked in LS handling after the wqe is submitted. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reported-by: Ewan Milne Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_nvmet.c | 1 - 1 file changed, 1 deletion(-) commit f22bfe8d1c900b8ce2105223db69742d8ebc46fe Author: James Smart Date: Tue May 21 17:48:58 2019 -0700 scsi: lpfc: Fix PT2PT PLOGI collison stopping discovery Under heavy load the target stops responding, the drivers aborts timeout and we start recovery by logging out of the target, but the target is never logged into again. In a point-to-point scenario, there were battling PLOGI's. When we received a PLOGI request after having sent one, the driver cancels the processing of the original plogi. However, the completion path of the remaining plogi was coded to skip the reg_rpi that should be happening on the 2nd plogi. Correct by adding a simple pt2pt check such that the 2nd plogi isn't skipped and the reg_login occurs. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_els.c | 1 + 1 file changed, 1 insertion(+) commit f6978f4163671ff0ced80ca7423c476627ac99ab Author: James Smart Date: Tue May 21 17:48:57 2019 -0700 scsi: lpfc: Revert message logging on unsupported topology Turns out the message change in 12.2.0.1 for unsupported topology makes the linux driver out of sync with other products. Revert the message back to the prior content for product consistency. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_attr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 79d8c4ce01b273348e98335c9a9e405e549a88c6 Author: James Smart Date: Tue May 21 17:48:56 2019 -0700 scsi: lpfc: Fix nvmet handling of received ABTS for unmapped frames The driver currently is relying on firmware to match ABTSs to existing exchanges. This works fine as long as an exchange has been assigned to the io and work posted to it. However, for unmapped frames (rxid=0xFFFF), the driver has yet to assign an xri. The driver was blindly saying it couldn't match the ABTS and sending the BA_xxx. However, the command frame may have been in queues waiting on xri's before posting to the nvmet_fc layer. When xri's became available, the command frame would still be pushed to the transport and that io would execute, even though the io had been killed by ABTS. The initiator, seeing the io ABTS'd, would reuse the exchange for a different io which would be received on the target and pushed up. If the "zombie" io then came back down and started transmitting, the initiator would match the oxid and accept erroneous data. Bad things happened. Add tracking of active exchanges in the target to allow matching of a received ABTS against active or pending IO requests. If the ABTS is matched to a pending or active IO, the drive initiates cleanup and conditionally notifies the transport. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_init.c | 2 + drivers/scsi/lpfc/lpfc_nvmet.c | 234 ++++++++++++++++++++++++++++++++++++----- drivers/scsi/lpfc/lpfc_nvmet.h | 1 + drivers/scsi/lpfc/lpfc_sli4.h | 2 + 4 files changed, 214 insertions(+), 25 deletions(-) commit d74a89aab9be1df8bceb564258305e0f3bf1c471 Author: James Smart Date: Tue May 21 17:48:55 2019 -0700 scsi: lpfc: Separate CQ processing for nvmet_fc upcalls Currently the driver is notified of new command frame receipt by CQEs. As part of the CQE processing, the driver upcalls the nvmet_fc transport to deliver the command. nvmet_fc, as part of receiving the command builds out a context for it, where one of the first steps is to allocate memory for the io. When running with tests that do large ios (1MB), it was found on some systems, the total number of outstanding I/O's, at 1MB per, completely consumed the system's memory. Thus additional ios were getting blocked in the memory allocator. Given that this blocked the lpfc thread processing CQEs, there were lots of other commands that were received and which are then held up, and given CQEs are serially processed, the aggregate delays for an IO waiting behind the others became cummulative - enough so that the initiator hit timeouts for the ios. The basic fix is to avoid the direct upcall and instead schedule a work item for each io as it is received. This allows the cq processing to complete very quickly, and each io can then run or block on it's own. However, this general solution hurts latency when there are few ios. As such, implemented the fix such that the driver watches how many CQEs it has processed sequentially in one run. As long as the count is below a threshold, the direct nvmet_fc upcall will be made. Only when the count is exceeded will it revert to work scheduling. Given that debug of this showed a surprisingly long delay in cq processing, the io timer stats were updated to better reflect the processing of the different points. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_crtn.h | 3 +- drivers/scsi/lpfc/lpfc_nvmet.c | 67 +++++++++++++++++++++++++++++------------- drivers/scsi/lpfc/lpfc_sli.c | 22 ++++++++------ drivers/scsi/lpfc/lpfc_sli4.h | 2 ++ 4 files changed, 64 insertions(+), 30 deletions(-) commit 2ab70c210664c76b293ba30f46d2831b9960e8f6 Author: James Smart Date: Tue May 21 17:48:54 2019 -0700 scsi: lpfc: Revise message when stuck due to unresponsive adapter Revise a stalled adapter message to also include the number of jobs that are stalling the thread. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_nvme.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit 4767c58af96e1c6a2dad307c6e5bb75d6c646815 Author: James Smart Date: Tue May 21 17:48:53 2019 -0700 scsi: lpfc: Correct nvmet buffer free race condition A race condition resulted in receive buffers being placed in the free list twice. Change the locking and handling to check whether the "other" path will be freeing the entry in a later thread and skip it if it is. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_nvmet.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit 32b938656462dd2c4aa1e91e0b48cd114c2d00f7 Author: James Smart Date: Tue May 21 17:48:52 2019 -0700 scsi: lpfc: Fix nvmet target abort cmd matching After receiving an unsolicited ABTS (meaning rxid is 0xFFFF), the driver used the oxid from the initiator to match against a local xri which may have been allocated for the io. The xri would be the rxid - it's an invalid check resulting in the command not being matched or erroneously matched. Change the lookup to use the oxid and the SID to match against received IO's original values. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_nvmet.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 2d71dc8eb6e826f42f5dd0c8e005044a65c1da8b Author: James Smart Date: Tue May 21 17:48:51 2019 -0700 scsi: lpfc: Fix alloc context on oas lun creations Softlockups are seen in low memory situations. They are due to doing oas_lun allocation with GFP_KERNEL in atomic contexts. Change the calls to oas_lun to indicate atomic context so that GFP_ATOMIC is used. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_scsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c9ac8e2466fe321b1a13e8ebfbce4d74f31b471b Author: Shivasharan S Date: Tue May 7 10:05:50 2019 -0700 scsi: megaraid_sas: Update driver version to 07.708.03.00 Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ba53572bf02da1836e5780e8c283c8e0cea714e2 Author: Shivasharan S Date: Tue May 7 10:05:49 2019 -0700 scsi: megaraid_sas: Export RAID map through debugfs Create a debugfs interface for megaraid_sas driver. Provide interface to dump driver RAID map in debugfs. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/Makefile | 2 +- drivers/scsi/megaraid/megaraid_sas.h | 4 + drivers/scsi/megaraid/megaraid_sas_base.c | 14 +++ drivers/scsi/megaraid/megaraid_sas_debugfs.c | 180 +++++++++++++++++++++++++++ drivers/scsi/megaraid/megaraid_sas_fusion.h | 5 + 5 files changed, 204 insertions(+), 1 deletion(-) commit ce88418dce0b471491cee63eee628df13fff03ec Author: Shivasharan S Date: Tue May 7 10:05:48 2019 -0700 scsi: megaraid_sas: Fix MSI-X vector print Print FW supported MSI-X vector count only if FW supports MSI-X. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 0a11c0b02a48933d3a21b6608ccb770486fa0181 Author: Shivasharan S Date: Tue May 7 10:05:47 2019 -0700 scsi: megaraid_sas: Add debug prints for device list Add debug prints related to device list being returned by firmware. The a debug flag to activate these prints. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas.h | 1 + drivers/scsi/megaraid/megaraid_sas_base.c | 35 +++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) commit f7331f18001405c0e150a608fd66550e64135a34 Author: Shivasharan S Date: Tue May 7 10:05:46 2019 -0700 scsi: megaraid_sas: Add prints in suspend and resume path Add prints in resume/suspend path to help in debugging hibernation issues. The print gives an indication when the driver entry points are called. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 3 +++ 1 file changed, 3 insertions(+) commit 223d5818e73065d9076ad6638647dc171135164e Author: Shivasharan S Date: Tue May 7 10:05:45 2019 -0700 scsi: megaraid_sas: Print firmware interrupt status Add a print to dump the interrupt status in system log for debugging. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_fusion.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit b6661342f26bbeb75948827b9bb0484c19d41865 Author: Shivasharan S Date: Tue May 7 10:05:44 2019 -0700 scsi: megaraid_sas: Print FW fault information When driver detects a firmware fault during load, dump additional information on fault code and subcode that will help in debugging. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas.h | 2 ++ drivers/scsi/megaraid/megaraid_sas_base.c | 5 ++++- drivers/scsi/megaraid/megaraid_sas_fusion.c | 25 ++++++++++++++----------- 3 files changed, 20 insertions(+), 12 deletions(-) commit a6024a9e9153d8ff2719724e20f401878e20891d Author: Shivasharan S Date: Tue May 7 10:05:43 2019 -0700 scsi: megaraid_sas: Export RAID map id through sysfs Add a sysfs interface to get the raid map index that is being used by driver. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 9a5987101c15e57720759315e66d4884378f13c3 Author: Shivasharan S Date: Tue May 7 10:05:42 2019 -0700 scsi: megaraid_sas: Print BAR information from driver Add prints for BAR address information during driver load. This helps in debugging issues with BAR address changing during OS boot. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 3d1d9eb7f294ca740b90f6ed4d13f09a7a4e7fcf Author: Shivasharan S Date: Tue May 7 10:05:41 2019 -0700 scsi: megaraid_sas: Dump system registers for debugging When controller fails to transition to READY state during driver probe, dump the system interface register set. This will give snapshot of the firmware status for debugging driver load issues. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) commit cfb9a30e5dcacbaf783357f0ef5f7f9adf205d34 Author: Shivasharan S Date: Tue May 7 10:05:40 2019 -0700 scsi: megaraid_sas: Dump system interface regs from sysfs Add a sysfs interface to dump the controller's system interface registers. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 37 +++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit 4fe55035f30fb38bfb898c974f603943cdfe390a Author: Shivasharan S Date: Tue May 7 10:05:39 2019 -0700 scsi: megaraid_sas: Add formatting option for megasas_dump Add option to format the buffer that is being dumped. Currently, the IO frame and chain frame dumped in the syslog is getting split across multiple lines based on the formatting. Fix this by using KERN_CONT in printk. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) commit 2ce435087902d42fa33d0032143868ceb42d9fb6 Author: Shivasharan S Date: Tue May 7 10:05:38 2019 -0700 scsi: megaraid_sas: Enhance internal DCMD timeout prints Add prints to identify the internal DCMD opcode that has timed out. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 96c9603cf1ed84e9d637b66a79090aab379e5078 Author: Shivasharan S Date: Tue May 7 10:05:37 2019 -0700 scsi: megaraid_sas: Enhance prints in OCR and TM path This patch enhances the existing debug prints in reset and task management path. These debug prints in adapter reset path helps with debugging issues related to IO timeouts that are seen frequently in the field. Add additional debug prints to dump the pending command frames before initiating an adapter reset. Also, print FastPath IOs that are outstanding. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas.h | 4 +- drivers/scsi/megaraid/megaraid_sas_base.c | 69 ++++++++++++++++++++++------- drivers/scsi/megaraid/megaraid_sas_fusion.c | 44 +++++++++--------- 3 files changed, 80 insertions(+), 37 deletions(-) commit 1d15d9098ad12b0021ac5a6b851f26d1ab021e5a Author: Shivasharan S Date: Tue May 7 10:05:36 2019 -0700 scsi: megaraid_sas: Load balance completions across all MSI-X Driver will use "reply descriptor post queues" in round robin fashion when the combined MSI-X mode is not enabled. With this IO completions are distributed and load balanced across all the available reply descriptor post queues equally. This is enabled only if combined MSI-X mode is not enabled in firmware. This improves performance and also fixes soft lockups. When load balancing is enabled, IRQ affinity from driver needs to be disabled. Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas.h | 3 +++ drivers/scsi/megaraid/megaraid_sas_base.c | 22 ++++++++++++++++++---- drivers/scsi/megaraid/megaraid_sas_fusion.c | 18 ++++++++++++++---- 3 files changed, 35 insertions(+), 8 deletions(-) commit 62a04f81e6133c8eaa5e93e15eab1ad2511a45db Author: Shivasharan S Date: Tue May 7 10:05:35 2019 -0700 scsi: megaraid_sas: IRQ poll to avoid CPU hard lockups Issue Description: We have seen cpu lock up issues from field if system has a large (more than 96) logical cpu count. SAS3.0 controller (Invader series) supports max 96 MSI-X vector and SAS3.5 product (Ventura) supports max 128 MSI-X vectors. This may be a generic issue (if PCI device support completion on multiple reply queues). Let me explain it w.r.t megaraid_sas supported h/w just to simplify the problem and possible changes to handle such issues. MegaRAID controller supports multiple reply queues in completion path. Driver creates MSI-X vectors for controller as "minimum of (FW supported Reply queues, Logical CPUs)". If submitter is not interrupted via completion on same CPU, there is a loop in the IO path. This behavior can cause hard/soft CPU lockups, IO timeout, system sluggish etc. Example - one CPU (e.g. CPU A) is busy submitting the IOs and another CPU (e.g. CPU B) is busy with processing the corresponding IO's reply descriptors from reply descriptor queue upon receiving the interrupts from HBA. If CPU A is continuously pumping the IOs then always CPU B (which is executing the ISR) will see the valid reply descriptors in the reply descriptor queue and it will be continuously processing those reply descriptor in a loop without quitting the ISR handler. megaraid_sas driver will exit ISR handler if it finds unused reply descriptor in the reply descriptor queue. Since CPU A will be continuously sending the IOs, CPU B may always see a valid reply descriptor (posted by HBA Firmware after processing the IO) in the reply descriptor queue. In worst case, driver will not quit from this loop in the ISR handler. Eventually, CPU lockup will be detected by watchdog. Above mentioned behavior is not common if "rq_affinity" set to 2 or affinity_hint is honored by irqbalancer as "exact". If rq_affinity is set to 2, submitter will be always interrupted via completion on same CPU. If irqbalancer is using "exact" policy, interrupt will be delivered to submitter CPU. Problem statement: If CPU count to MSI-X vectors (reply descriptor Queues) count ratio is not 1:1, we still have exposure of issue explained above and for that we don't have any solution. Exposure of soft/hard lockup is seen if CPU count is more than MSI-X supported by device. If CPUs count to MSI-X vectors count ratio is not 1:1, (Other way, if CPU counts to MSI-X vector count ratio is something like X:1, where X > 1) then 'exact' irqbalance policy OR rq_affinity = 2 won't help to avoid CPU hard/soft lockups. There won't be any one to one mapping between CPU to MSI-X vector instead one MSI-X interrupt (or reply descriptor queue) is shared with group/set of CPUs and there is a possibility of having a loop in the IO path within that CPU group and may observe lockups. For example: Consider a system having two NUMA nodes and each node having four logical CPUs and also consider that number of MSI-X vectors enabled on the HBA is two, then CPUs count to MSI-X vector count ratio as 4:1. e.g. MSI-X vector 0 is affinity to CPU 0, CPU 1, CPU 2 & CPU 3 of NUMA node 0 and MSI-X vector 1 is affinity to CPU 4, CPU 5, CPU 6 & CPU 7 of NUMA node 1. numactl --hardware available: 2 nodes (0-1) node 0 cpus: 0 1 2 3 --> MSI-X 0 node 0 size: 65536 MB node 0 free: 63176 MB node 1 cpus: 4 5 6 7 --> MSI-X 1 node 1 size: 65536 MB node 1 free: 63176 MB Assume that user started an application which uses all the CPUs of NUMA node 0 for issuing the IOs. Only one CPU from affinity list (it can be any cpu since this behavior depends upon irqbalance) CPU0 will receive the interrupts from MSI-X 0 for all the IOs. Eventually, CPU 0 IO submission percentage will be decreasing and ISR processing percentage will be increasing as it is more busy with processing the interrupts. Gradually IO submission percentage on CPU 0 will be zero and it's ISR processing percentage will be 100% as IO loop has already formed within the NUMA node 0, i.e. CPU 1, CPU 2 & CPU 3 will be continuously busy with submitting the heavy IOs and only CPU 0 is busy in the ISR path as it always find the valid reply descriptor in the reply descriptor queue. Eventually, we will observe the hard lockup here. Chances of occurring of hard/soft lockups are directly proportional to value of X. If value of X is high, then chances of observing CPU lockups is high. Solution: Use IRQ poll interface defined in "irq_poll.c". megaraid_sas driver will execute ISR routine in softirq context and it will always quit the loop based on budget provided in IRQ poll interface. Driver will switch to IRQ poll only when more than a threshold number of reply descriptors are handled in one ISR. Currently threshold is set as 1/4th of HBA queue depth. In these scenarios (i.e. where CPUs count to MSI-X vectors count ratio is X:1 (where X > 1)), IRQ poll interface will avoid CPU hard lockups due to voluntary exit from the reply queue processing based on budget. Note - Only one MSI-X vector is busy doing processing. Select CONFIG_IRQ_POLL from driver Kconfig for driver compilation. Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/Kconfig.megaraid | 1 + drivers/scsi/megaraid/megaraid_sas.h | 5 ++ drivers/scsi/megaraid/megaraid_sas_base.c | 36 ++++++++ drivers/scsi/megaraid/megaraid_sas_fp.c | 1 + drivers/scsi/megaraid/megaraid_sas_fusion.c | 122 +++++++++++++++++++++------- drivers/scsi/megaraid/megaraid_sas_fusion.h | 1 - 6 files changed, 136 insertions(+), 30 deletions(-) commit 78409d4b47b83d81d29450ef890e07d9ce629fdd Author: Shivasharan S Date: Tue May 7 10:05:34 2019 -0700 scsi: megaraid_sas: Block PCI config space access from userspace during OCR While an online controller reset(OCR) is in progress, there is short duration where all access to controller's PCI config space from the host needs to be blocked. This is due to a hardware limitation of MegaRAID controllers. With this patch, driver will block all access to controller's config space from userland applications by calling pci_cfg_access_lock() while OCR is in progress and unlocking after controller comes back to ready state. Added helper function which locks the config space before initiating OCR and wait for controller to become READY. Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas.h | 3 ++ drivers/scsi/megaraid/megaraid_sas_base.c | 15 ++++--- drivers/scsi/megaraid/megaraid_sas_fusion.c | 66 +++++++++++++++++++++++++++-- 3 files changed, 74 insertions(+), 10 deletions(-) commit 44e8d6930ff67ce5e72a6a81c2a578c801eb2e39 Author: Shivasharan S Date: Tue May 7 10:05:33 2019 -0700 scsi: megaraid_sas: Rework code around controller reset No functional change. This patch reworks code around controller reset path which gets rid of a couple of goto labels. This is in preparation for the next patch which adds PCI config space access locking while controller reset is in progress. Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas.h | 1 + drivers/scsi/megaraid/megaraid_sas_fusion.c | 23 ++++++++++------------- 2 files changed, 11 insertions(+), 13 deletions(-) commit f10fb8523aeebb99c03bac1f17cb48d0179312d5 Author: Shivasharan S Date: Tue May 7 10:05:32 2019 -0700 scsi: megaraid_sas: fw_reset_no_pci_access required for MFI adapters only fw_reset_no_pci_access is only applicable for MFI controllers and is not used for Fusion controllers. For all Fusion controllers, driver can check reset adapter bit in status register before performing a chip reset without setting "fw_reset_no_pci_access". Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 4a0bcf362d4a55810812030eed89068d7c904870 Author: Shivasharan S Date: Tue May 7 10:05:30 2019 -0700 scsi: megaraid_sas: Remove unused variable target_index No functional change. Remove set but unused variable in megasas_set_static_target_properties. Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 3 --- 1 file changed, 3 deletions(-) commit e5207cf021df382fe1936f2314ab19e390026a06 Author: Ondrej Zary Date: Tue May 14 19:23:09 2019 +0200 scsi: fdomain: Resurrect driver - ISA support Future Domain 16xx ISA SCSI support card support. Tested on IBM 92F0330 card (18C50 chip) with v1.00 BIOS. Signed-off-by: Ondrej Zary Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/Kconfig | 14 +++ drivers/scsi/Makefile | 1 + drivers/scsi/fdomain_isa.c | 222 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 237 insertions(+) commit 68046d5003e7b7b4083cdf5dfc2823b7bb0e40ea Author: Ondrej Zary Date: Tue May 14 19:23:08 2019 +0200 scsi: fdomain: Resurrect driver - PCI support Future Domain TMC-3260/AHA-2920A PCI card support. Tested on Adaptec AHA-2920A PCI card. Signed-off-by: Ondrej Zary Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/Kconfig | 17 ++++++++++++ drivers/scsi/Makefile | 1 + drivers/scsi/fdomain_pci.c | 68 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 86 insertions(+) commit ebeb466531154d6238399eb54438235f6fbbd013 Author: Ondrej Zary Date: Tue May 14 19:23:07 2019 +0200 scsi: fdomain: Resurrect driver - Core Future Domain TMC-16xx/TMC-3260 SCSI driver. This is the core driver, common for PCI, ISA and PCMCIA cards. Signed-off-by: Ondrej Zary Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/Kconfig | 4 + drivers/scsi/Makefile | 1 + drivers/scsi/fdomain.c | 586 +++++++++++++++++++++++++++++++++++++++++++++++++ drivers/scsi/fdomain.h | 53 +++++ 4 files changed, 644 insertions(+) commit 9a14f9b1be7ca55a33e8680918cdcf75ae202be1 Author: Don Brace Date: Tue May 7 13:32:40 2019 -0500 scsi: hpsa: update driver version [mkp: wrong baseline, applied by hand] Reviewed-by: Gerry Morong Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c5dfd106414f3e038fee5c6f0800fd55ed07b41d Author: Don Brace Date: Tue May 7 13:32:33 2019 -0500 scsi: hpsa: correct device resets Correct a race condition that occurs between the reset handler and the completion handler. There are times when the wait_event condition is never met due to this race condition and the reset never completes. The reset_pending field is NULL initially. t Reset Handler Thread Completion Thread -- -------------------- ----------------- t1 if (c->reset_pending) t2 c->reset_pending = dev; if (atomic_dev_and_test(counter)) t3 atomic_inc(counter) wait_up_all(event_sync_wait_queue) t4 t5 wait_event(...counter == 0) Kernel.org Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=1994350 Bug 199435 - HPSA + P420i resetting logical Direct-Access never complete Reviewed-by: Justin Lindley Reviewed-by: David Carroll Reviewed-by: Scott Teel Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 173 ++++++++++++++++++++++++------------------------ drivers/scsi/hpsa.h | 3 +- drivers/scsi/hpsa_cmd.h | 2 +- 3 files changed, 88 insertions(+), 90 deletions(-) commit 9e33f0d5788fe4aaa42b1abf6536d046c724a8cd Author: Don Brace Date: Tue May 7 13:32:26 2019 -0500 scsi: hpsa: do-not-complete-cmds-for-deleted-devices Close up a rare multipath issue. Close up small hole where a command completes after a device has been removed from SML and before the device is re-added. - Mark device as removed in slave_destroy - Do not complete commands for deleted devices Reviewed-by: Justin Lindley Reviewed-by: David Carroll Reviewed-by: Scott Teel Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 14 +++++++++++++- drivers/scsi/hpsa.h | 1 + 2 files changed, 14 insertions(+), 1 deletion(-) commit b443d3eab600b86025ee338669c9ddd399167a4b Author: Don Brace Date: Tue May 7 13:32:20 2019 -0500 scsi: hpsa: wait longer for ptraid commands Wait longer for outstanding commands before removing a multipath device. Increase the timeout value for ptraid commands. Reviewed-by: Justin Lindley Reviewed-by: David Carroll Reviewed-by: Scott Teel Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) commit 4770e68d162634b2134741d08c49185f858c90ee Author: Don Brace Date: Tue May 7 13:32:13 2019 -0500 scsi: hpsa: check for tag collision Correct rare multipath issue where a device is deleted with an outstanding cmd which results in a tag collision. The cmd eventually completes. If a collision is detected wait until the command slot is cleared. Reviewed-by: Justin Lindley Reviewed-by: David Carroll Reviewed-by: Scott Teel Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 21 ++++++++++++++------- drivers/scsi/hpsa.h | 1 + 2 files changed, 15 insertions(+), 7 deletions(-) commit 0119208885b3faf2459de6d3fcc6d090580b906f Author: Don Brace Date: Tue May 7 13:32:07 2019 -0500 scsi: hpsa: use local workqueues instead of system workqueues Avoid system stalls by switching to local workqueue. Reviewed-by: Justin Lindley Reviewed-by: David Carroll Reviewed-by: Scott Teel Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 22 +++++++++++++++++++--- drivers/scsi/hpsa.h | 1 + 2 files changed, 20 insertions(+), 3 deletions(-) commit a68fdb3aed541808ae6b1078ff840a4d9281731b Author: Don Brace Date: Tue May 7 13:32:00 2019 -0500 scsi: hpsa: correct simple mode Correct issue with hpsa_simple_mode module parameter. Driver was hanging due to incorrect interrupt setup. Reviewed-by: Justin Lindley Reviewed-by: Dave Carroll Reviewed-by: Scott Teel Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit 4e3ea141b5cb79ded7f4a67bb32e5b23a06a784a Author: Hannes Reinecke Date: Mon May 6 08:19:15 2019 +0200 scsi: osst: kill obsolete driver The osst driver is becoming obsolete, as the manufacturer went out of business ages ago, and the maintainer has no means of testing any improvements anymore. Plus these days flash drives are cheaper and offer a higher capacity. So drop it completely. Cc: Willem Riede Signed-off-by: Hannes Reinece Signed-off-by: Martin K. Petersen Documentation/scsi/osst.txt | 218 -- MAINTAINERS | 10 - drivers/scsi/Kconfig | 22 - drivers/scsi/Makefile | 1 - drivers/scsi/osst.c | 6107 ------------------------------------------- drivers/scsi/osst.h | 651 ----- drivers/scsi/osst_detect.h | 7 - drivers/scsi/osst_options.h | 107 - drivers/scsi/st.c | 6 +- 9 files changed, 3 insertions(+), 7126 deletions(-) commit 82a54da641f3cacfa31db36fc58a5e903f804c22 Author: Bart Van Assche Date: Tue Apr 30 14:39:19 2019 -0700 scsi: sd: Inline sd_probe_part2() Make sd_probe() easier to read by inlining sd_probe_part2(). This patch does not change any functionality. [mkp: applied by hand] Cc: Lee Duncan Cc: Hannes Reinecke Cc: Luis Chamberlain Cc: Johannes Thumshirn Cc: Christoph Hellwig Cc: Pavel Machek Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/sd.c | 103 +++++++++++++++++++++++------------------------------- 1 file changed, 44 insertions(+), 59 deletions(-) commit f049cf1a7b6737c75884247c3f6383ef104d255a Author: Bart Van Assche Date: Tue Apr 30 14:39:18 2019 -0700 scsi: sd: Rely on the driver core for asynchronous probing As explained during the 2018 LSF/MM session about increasing SCSI disk probing concurrency, the problems with the current probing approach are as follows: - The driver core is unaware of asynchronous SCSI LUN probing. wait_for_device_probe() waits for all asynchronous probes except asynchronous SCSI disk probes. - There is unnecessary serialization between sd_probe() and sd_remove(). This can lead to a deadlock. Hence this patch that modifies the sd driver such that it uses the driver core framework for asynchronous probing. The async domain and get_device()/put_device() pairs that became superfluous due to this change are removed. This patch does not affect the time needed for loading the scsi_debug kernel module with parameters delay=0 and max_luns=256. This patch depends on commit ef0ff68351be ("driver core: Probe devices asynchronously instead of the driver") that went upstream in kernel version v5.1-rc1. Cc: Lee Duncan Cc: Hannes Reinecke Cc: Luis Chamberlain Cc: Johannes Thumshirn Cc: Christoph Hellwig Cc: Pavel Machek Cc: Dan Williams Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/scsi.c | 12 +++--------- drivers/scsi/scsi_pm.c | 6 +----- drivers/scsi/scsi_priv.h | 1 - drivers/scsi/sd.c | 12 +++--------- 4 files changed, 7 insertions(+), 24 deletions(-) commit 3469fa84c1631face938efc42b3f488a2c2504e0 Author: Arnaldo Carvalho de Melo Date: Tue Jun 18 17:59:16 2019 -0300 tools build: Fix the zstd test in the test-all.c common case feature test We were renanimg 'main' to 'main_zstd' but then using 'main_libzstd();' in the main() for test-all.c, causing this: $ cat /tmp/build/perf/feature/test-all.make.output test-all.c: In function ‘main’: test-all.c:236:2: error: implicit declaration of function ‘main_test_libzstd’; did you mean ‘main_test_zstd’? [-Werror=implicit-function-declaration] main_test_libzstd(); ^~~~~~~~~~~~~~~~~ main_test_zstd cc1: all warnings being treated as errors $ I.e. what was supposed to be the fast path feature test was _always_ failing, duh, fix it. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Cc: Alexey Budankov Fixes: 3b1c5d965971 ("tools build: Implement libzstd feature check, LIBZSTD_DIR and NO_LIBZSTD defines") Link: https://lkml.kernel.org/n/tip-ma4abk0utroiw4mwpmvnjlru@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/build/feature/test-all.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3f72e2d3e682a48cad535b50c69cdc2f2f23315f Author: Bjorn Andersson Date: Tue Jun 18 14:19:45 2019 -0700 arm64: dts: qcom: Add Dragonboard 845c This adds an initial dts for the Dragonboard 845. Supported functionality includes Debug UART, UFS, USB-C (peripheral), USB-A (host), microSD-card and Bluetooth. Initializing the SMMU is clearing the mapping used for the splash screen framebuffer, which causes the board to reboot. This can be worked around using: fastboot oem select-display-panel none Reviewed-by: Vinod Koul Reviewed-by: Vivek Gautam Tested-by: Vinod Koul Tested-by: Srinivas Kandagatla Signed-off-by: Bjorn Andersson arch/arm64/boot/dts/qcom/Makefile | 1 + arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 557 +++++++++++++++++++++++++++++ 2 files changed, 558 insertions(+) commit 370063ee427ae77b07c6f5dbdced608ae2ce79de Author: Jeffrey Hugo Date: Tue Jun 11 11:54:00 2019 -0700 drm/msm/adreno: Add A540 support The A540 is a derivative of the A530, and is found in the MSM8998 SoC. Signed-off-by: Jeffrey Hugo Reviewed-by: Jordan Crouse Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/a5xx.xml.h | 28 ++++++----- drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 26 +++++++++- drivers/gpu/drm/msm/adreno/a5xx_power.c | 76 ++++++++++++++++++++++++++++-- drivers/gpu/drm/msm/adreno/adreno_device.c | 18 +++++++ drivers/gpu/drm/msm/adreno/adreno_gpu.h | 6 +++ 5 files changed, 137 insertions(+), 17 deletions(-) commit d67f1b6d0e0be8240186e3cc998353e52ed6ea31 Author: Brian Masney Date: Sun Jun 2 21:01:31 2019 -0400 drm/msm: correct attempted NULL pointer dereference in put_iova put_iova() would attempt to dereference a NULL pointer via the address space pointer when no IOMMU is present. Correct this by adding the appropriate check. Signed-off-by: Brian Masney Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_gem.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 61f0479757aa4371801b9d552e85dd6d6327d036 Author: Abhinav Kumar Date: Fri May 31 19:43:27 2019 -0700 drm/msm/dsi: add protection against NULL dsi device When panel probe happens after DSI probe, the DSI probe is deferred as per current design. In the probe defer path dsi device is destroyed. This NULL dsi device could be deferenced by the panel probe in the mipi_dsi_attach path. Check for NULL dsi device before accessing it. Changes in v2: - Add more comments on how this NULL pointer situation will be hit Reported-by: Jeffrey Hugo Tested-by: Jeffrey Hugo Signed-off-by: Abhinav Kumar Signed-off-by: Rob Clark drivers/gpu/drm/msm/dsi/dsi_manager.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 6672e11cad662ce6631e04c38f92a140a99c042c Author: Jordan Crouse Date: Fri May 31 16:09:38 2019 -0600 drm/msm/adreno: Ensure that the zap shader region is big enough Before loading the zap shader we should ensure that the reserved memory region is big enough to hold the loaded file. Signed-off-by: Jordan Crouse Reviewed-by: Bjorn Andersson Reviewed-by: Jeffrey Hugo Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/adreno_gpu.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 7b8c9e203039591e20337d5c6034331fc17d8d48 Author: Jeffrey Hugo Date: Thu May 30 09:00:59 2019 -0700 drm/msm/dsi: Add support for MSM8998 DSI controller The DSI controller on the MSM8998 SoC is a 6G v2.0.0 controller which is very similar to the v2.0.1 of SDM845. Signed-off-by: Jeffrey Hugo Signed-off-by: Rob Clark drivers/gpu/drm/msm/dsi/dsi_cfg.c | 21 +++++++++++++++++++++ drivers/gpu/drm/msm/dsi/dsi_cfg.h | 1 + 2 files changed, 22 insertions(+) commit 3dbbf8f09e8398c7bb838571b5def270609a6807 Author: Jeffrey Hugo Date: Thu May 30 09:00:49 2019 -0700 drm/msm/dsi: Add old timings quirk for 10nm phy The v3.0.0 10nm phy has two different implementations between MSM8998 and SDM845, which require different timings calculations. Unfortunately, the hardware designers did not choose to revise the version to account for this delta so implement a quirk instead. Signed-off-by: Jeffrey Hugo Signed-off-by: Rob Clark drivers/gpu/drm/msm/dsi/phy/dsi_phy.h | 4 ++++ drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c | 12 +++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) commit d440b3374bab867da012021a23d5450c79f082e8 Author: Jeffrey Hugo Date: Thu May 30 09:00:39 2019 -0700 drm/msm/dsi: Add support for MSM8998 10nm dsi phy The MSM8998 dsi phy is 10nm v3.0.0 like SDM845, however there appear to be minor differences such as the address space location. Signed-off-by: Jeffrey Hugo Signed-off-by: Rob Clark drivers/gpu/drm/msm/dsi/phy/dsi_phy.c | 2 ++ drivers/gpu/drm/msm/dsi/phy/dsi_phy.h | 1 + drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c | 18 ++++++++++++++++++ 3 files changed, 21 insertions(+) commit 590714e5a3704c7db21a4f82932d3f2699edb35c Author: Jeffrey Hugo Date: Thu May 30 09:00:23 2019 -0700 dt-bindings: msm/dsi: Add 10nm phy for msm8998 compatible The DSI phy on MSM8998 is a 10nm design like SDM845, however it has some slightly different quirks which need to be handled by drivers. Provide a separate compatible to assist in handling the specifics. Signed-off-by: Jeffrey Hugo Signed-off-by: Rob Clark Documentation/devicetree/bindings/display/msm/dsi.txt | 1 + 1 file changed, 1 insertion(+) commit fc19cbb785d7bbd1a1af26229b5240a3ab332744 Author: Jeffrey Hugo Date: Tue May 21 08:00:30 2019 -0700 drm/msm/mdp5: Fix mdp5_cfg_init error return If mdp5_cfg_init fails because of an unknown major version, a null pointer dereference occurs. This is because the caller of init expects error pointers, but init returns NULL on error. Fix this by returning the expected values on error. Fixes: 2e362e1772b8 (drm/msm/mdp5: introduce mdp5_cfg module) Signed-off-by: Jeffrey Hugo Reviewed-by: Bjorn Andersson Signed-off-by: Rob Clark drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 03b7af1ef4992bd0dc2b758e94698054fbbb19eb Author: Jordan Crouse Date: Tue May 7 13:18:11 2019 -0600 drm/msm/adreno: Call pm_runtime_force_suspend() during unbind The GPU specific pm_suspend code assumes that the hardware is active when the function is called, which it usually is when called as part of pm_runtime. But during unbind, the pm_suspend functions are called blindly resulting in a bit of a when the hardware wasn't already active (or booted, in the case of the GMU). Instead of calling the pm_suspend function directly, use pm_runtime_force_suspend() which should check the correct state of runtime and call the functions on our behalf or skip them if they are not needed. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 4 +--- drivers/gpu/drm/msm/adreno/adreno_device.c | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) commit fecabfd9241f6c41ffa975803682028361791cad Author: Jordan Crouse Date: Tue May 7 13:18:10 2019 -0600 drm/msm/dpu: Avoid a null de-ref while recovering from kms init fail In the failure path for dpu_kms_init() it is possible to get to the MMU destroy function with uninitialized MMU structs. Check for NULL and skip if needed. Signed-off-by: Jordan Crouse Reviewed-by: Kristian H. Kristensen Signed-off-by: Rob Clark drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 36415615adf4b55668a99ba4565bdd38733e5bff Author: Jordan Crouse Date: Tue May 7 13:18:09 2019 -0600 drm/msm/dpu: Fix error recovery after failing to enable clocks If enabling clocks fails in msm_dss_enable_clk() the code to unwind the settings starts at 'i' which is the clock that just failed. While this isn't harmful it does result in a number of warnings from the clock subsystem while trying to unpreare/disable the very clock that had just failed to prepare/enable. Skip the current failed clock during the unwind to to avoid the extra log spew. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark drivers/gpu/drm/msm/disp/dpu1/dpu_io_util.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 78d6ccce03e86de34c7000bcada493ed0679e350 Author: Arnaldo Carvalho de Melo Date: Tue Jun 18 17:48:12 2019 -0300 perf build: Handle slang being in /usr/include and in /usr/include/slang/ In some distros slang.h may be in a /usr/include 'slang' subdir, so use the if slang is not explicitely disabled (by using NO_SLANG=1) and its feature test for the common case (having /usr/include/slang.h) failed, use the results for the test that checks if it is in slang/slang.h. Change the only file in perf that includes slang.h to use HAVE_SLANG_INCLUDE_SUBDIR and forget about this for good. On a rhel6 system now we have: $ /tmp/build/perf/perf -vv | grep slang libslang: [ on ] # HAVE_SLANG_SUPPORT $ ldd /tmp/build/perf/perf | grep libslang libslang.so.2 => /usr/lib64/libslang.so.2 (0x00007fa2d5a8d000) $ grep slang /tmp/build/perf/FEATURE-DUMP feature-libslang=0 feature-libslang-include-subdir=1 $ cat /etc/redhat-release CentOS release 6.10 (Final) $ While on fedora:29: $ /tmp/build/perf/perf -vv | grep slang libslang: [ on ] # HAVE_SLANG_SUPPORT $ ldd /tmp/build/perf/perf | grep slang libslang.so.2 => /lib64/libslang.so.2 (0x00007f8eb11a7000) $ grep slang /tmp/build/perf/FEATURE-DUMP feature-libslang=1 feature-libslang-include-subdir=1 $ $ cat /etc/fedora-release Fedora release 29 (Twenty Nine) $ The feature-libslang-include-subdir=1 line is because the 'gettid()' test was added to test-all.c as the new glibc has an implementation for that, so we soon should have it not failing, i.e. should be the common case soon. Perhaps I should move it out till it becomes the norm... Cc: Adrian Hunter Cc: Florian Fainelli Cc: Jiri Olsa Cc: Namhyung Kim Fixes: 1955c8cf5e26 ("perf tools: Don't hardcode host include path for libslang") Link: https://lkml.kernel.org/n/tip-bkgtpsu3uit821fuwsdhj9gd@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.config | 11 ++++++++--- tools/perf/ui/libslang.h | 5 +++++ 2 files changed, 13 insertions(+), 3 deletions(-) commit 295b22ae596c1d2dd8a4eb597d576f43acb4da6f Author: Jordan Crouse Date: Tue May 7 12:02:07 2019 -0600 drm/msm: Pass the MMU domain index in struct msm_file_private Pass the index of the MMU domain in struct msm_file_private instead of assuming gpu->id throughout the submit path. This clears the way to change ctx->aspace to a per-instance pagetable. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_drv.c | 2 ++ drivers/gpu/drm/msm/msm_drv.h | 1 + drivers/gpu/drm/msm/msm_gem.h | 1 + drivers/gpu/drm/msm/msm_gem_submit.c | 13 ++++++++----- drivers/gpu/drm/msm/msm_gpu.c | 5 ++--- 5 files changed, 14 insertions(+), 8 deletions(-) commit bdad5c53e10b91adf1c30cde708411da2331ee11 Author: Jordan Crouse Date: Tue May 7 12:02:06 2019 -0600 drm/msm: Print all 64 bits of the faulting IOMMU address When we move to 64 bit addressing for a5xx and a6xx targets we will start seeing pagefaults at larger addresses so format them appropriately in the log message for easier debugging. Signed-off-by: Jordan Crouse Reviewed-by: Kristian H. Kristensen Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit adf151c246ec7e2799e2ed0de22c9d60221602dc Author: Jordan Crouse Date: Tue May 7 12:02:05 2019 -0600 drm/msm/adreno: Enable 64 bit mode by default on a5xx and a6xx targets A5XX and newer GPUs can be run in either 32 or 64 bit mode. The GPU registers and the microcode use 64 bit virtual addressing in either case but the upper 32 bits are ignored if the GPU is in 32 bit mode. There is no performance disadvantage to remaining in 64 bit mode even if we are only generating 32 bit addresses so switch over now to prepare for using addresses above 4G on targets that support them. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 14 ++++++++++++++ drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 14 ++++++++++++++ 2 files changed, 28 insertions(+) commit c8bffdcb25ea548b03ccdfa00d19f471010919bc Author: Greg Kroah-Hartman Date: Thu Jun 13 14:24:02 2019 +0200 msm: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Rob Clark Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Cc: linux-arm-msm@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: freedreno@lists.freedesktop.org Signed-off-by: Greg Kroah-Hartman [small fixup for unused variable warning] Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_perf.c | 15 ++------------- drivers/gpu/drm/msm/msm_rd.c | 16 ++-------------- 2 files changed, 4 insertions(+), 27 deletions(-) commit cbefd24f0aee3a5d787a013f207f6fd31d3c76d2 Author: Arnaldo Carvalho de Melo Date: Tue Jun 18 17:43:35 2019 -0300 tools build: Add test to check if slang.h is in /usr/include/slang/ A few odd old distros (rhel5, 6, yeah, lots of those out in use, in many cases we want to use upstream perf on it) have the slang header files in /usr/include/slang/, so add a test that will be performed only when test-all.c (the one with the most common sane settings) fails, either because we're in one of these odd distros with slang/slang.h or because something else failed (say libelf is not present). So for the common case nothing changes, no additional test is performed. Next step is to check in perf the result of these tests. Cc: Adrian Hunter Cc: Florian Fainelli Cc: Jiri Olsa Cc: Namhyung Kim Fixes: 1955c8cf5e26 ("perf tools: Don't hardcode host include path for libslang") Link: https://lkml.kernel.org/n/tip-2sy7hbwkx68jr6n97qxgg0c6@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/build/Makefile.feature | 2 +- tools/build/feature/Makefile | 4 ++++ tools/build/feature/test-libslang-include-subdir.c | 7 +++++++ 3 files changed, 12 insertions(+), 1 deletion(-) commit 7aca4d65e7052c1b9905653c948fc6ffc05bfb02 Author: Greg Kroah-Hartman Date: Thu Jun 13 14:23:23 2019 +0200 msm: dpu1: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Rob Clark Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Cc: Jeykumar Sankaran Cc: Jordan Crouse Cc: Abhinav Kumar Cc: Bruce Wang Cc: Sravanthi Kollukuduru Cc: Fritz Koenig Cc: Chandan Uddaraju Cc: linux-arm-msm@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: freedreno@lists.freedesktop.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Rob Clark drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c | 2 -- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 3 --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 2 -- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 11 +++-------- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h | 6 +----- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 3 --- drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c | 4 ---- 7 files changed, 4 insertions(+), 27 deletions(-) commit 491d5071c4d2ea7a89064e91f11ed75abf9cd1fb Author: Greg Kroah-Hartman Date: Thu Jun 13 14:22:56 2019 +0200 msm: adreno: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Rob Clark Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Cc: Jordan Crouse Cc: Mamta Shukla Cc: Thomas Zimmermann Cc: linux-arm-msm@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: freedreno@lists.freedesktop.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/a5xx_debugfs.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 276b6f2e7911f90594e56815c0e629a92e9c83d3 Author: Nathan Huckleberry Date: Fri Jun 14 13:56:23 2019 -0700 drm/msm/dpu: Fix Wunused-const-variable Clang produces the following warning drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c:477:32: warning: unused variable 'dpu_format_map_tile' [-Wunused-const-variable] static const struct dpu_format dpu_format_map_tile[] = { ^ drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c:602:32: warning: unused variable 'dpu_format_map_p010' [-Wunused-const-variable] static const struct dpu_format dpu_format_map_p010[] = { ^ drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c:610:32: warning: unused variable 'dpu_format_map_p010_ubwc' [-Wunused-const-variable] static const struct dpu_format dpu_format_map_p010_ubwc[] = { ^ drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c:619:32: warning: unused variable 'dpu_format_map_tp10_ubwc' [-Wunused-const-variable] static const struct dpu_format dpu_format_map_tp10_ubwc[] = { ^ Removing the unimplemented modifiers that cause the warning. Cc: clang-built-linux@googlegroups.com Link: https://github.com/ClangBuiltLinux/linux/issues/528 Signed-off-by: Nathan Huckleberry Signed-off-by: Rob Clark drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c | 110 ---------------------------- 1 file changed, 110 deletions(-) commit 8a08e50cee669387195a1189ec9aee42edc1da49 Author: Serge Semin Date: Tue Apr 23 15:31:22 2019 +0300 drm: Permit video-buffers writecombine mapping for MIPS Since commit 4b050ba7a66c ("MIPS: pgtable.h: Implement the pgprot_writecombine function for MIPS") and commit c4687b15a848 ("MIPS: Fix definition of pgprot_writecombine()") write-combine vma mapping is available to be used by kernel subsystems for MIPS. In particular the uncached accelerated attribute is requested to be set by ioremap_wc() method and by generic PCI memory pages/ranges mapping methods. The same is done by the drm_io_prot()/ttm_io_prot() functions in case if write-combine flag is set for vma's passed for mapping. But for some reason the pgprot_writecombine() method calling is ifdefed to be a platform-specific with MIPS system being marked as lacking of one. At the very least it doesn't reflect the current MIPS platform implementation. So in order to improve the DRM subsystem performance on MIPS with UCA mapping enabled, we need to have pgprot_writecombine() called for buffers, which need store operations being combined. In case if particular MIPS chip doesn't support the UCA attribute, the mapping will fall back to noncached. Cc: Ralf Baechle Cc: Paul Burton Cc: James Hogan Acked-by: Christian König Reviewed-by: Paul Burton Signed-off-by: Vadim V. Vlasov Signed-off-by: Serge Semin Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190423123122.32573-1-fancer.lancer@gmail.com drivers/gpu/drm/drm_vm.c | 5 +++-- drivers/gpu/drm/ttm/ttm_bo_util.c | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) commit 381f8a20d2f6770ee39f3280a35e19c0c9b2af1b Author: José Roberto de Souza Date: Mon Jun 17 12:51:54 2019 -0700 drm/i915/psr: Force manual PSR exit in older gens To do frontbuffer tracking we are depending on Display WA #0884 to exit PSR when there is a frontbuffer modification but according to user reports a write to CURSURFLIVE do not cause PSR to exit in older gens so lets force a PSR exit. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110799 Cc: Dhinakaran Pandiyan Cc: Rodrigo Vivi Signed-off-by: José Roberto de Souza Reviewed-by: Rodrigo Vivi Tested-by: Thomas Rohwer Link: https://patchwork.freedesktop.org/patch/msgid/20190617195154.30292-1-jose.souza@intel.com drivers/gpu/drm/i915/display/intel_psr.c | 36 +++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 10 deletions(-) commit 0211f68e626fb02d33c1e4302d907a45366a2d93 Author: Jorge Ramirez Date: Mon Jun 17 11:38:27 2019 -0700 regulator: qcom_spmi: add PMS405 SPMI regulator The PMS405 has 5 HFSMPS and 13 LDO regulators, This commit adds support for one of the 5 HFSMPS regulators (s3) to the spmi regulator driver. The PMIC HFSMPS 430 regulators have 8 mV step size and a voltage control scheme consisting of two 8-bit registers defining a 16-bit voltage set point in units of millivolts S3 controls the cpu voltages (s3 is a buck regulator of type HFS430); it is therefore required so we can enable voltage scaling for safely running cpufreq. Signed-off-by: Jorge Ramirez-Ortiz Signed-off-by: Jeffrey Hugo Signed-off-by: Mark Brown drivers/regulator/qcom_spmi-regulator.c | 43 ++++++++++++++++++++++++++++++--- 1 file changed, 40 insertions(+), 3 deletions(-) commit 9a4a153b092c9f89dfa2766d48b61af251ea5697 Author: Nicholas Mc Guire Date: Thu Apr 25 16:03:51 2019 +0200 drm/msm: check for equals 0 only wait_for_completion_timeout() returns 0 on timeout and aleast 1 otherwise so checking for < makes no sense here. Signed-off-by: Nicholas Mc Guire Reviewed-by: Abhinav Kumar Signed-off-by: Rob Clark drivers/gpu/drm/msm/dsi/dsi_host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bbd7992e6a32a3a52f3c26c86eba81037651c5c6 Author: Jorge Ramirez Date: Mon Jun 17 11:38:15 2019 -0700 dt-bindings: qcom_spmi: Document pms405 support The PMS405 supports 5 SMPS and 13 LDO regulators. Signed-off-by: Jorge Ramirez-Ortiz Reviewed-by: Rob Herring Signed-off-by: Jeffrey Hugo Signed-off-by: Mark Brown .../bindings/regulator/qcom,spmi-regulator.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 1c3f37d11023ff5b57135bc2bbacf4816baa67df Author: Jeffrey Hugo Date: Mon Jun 17 11:37:58 2019 -0700 arm64: dts: msm8998-mtp: Add pm8005_s1 regulator The pm8005_s1 is VDD_GFX, and needs to be on to enable the GPU. This should be hooked up to the GPU CPR, but we don't have support for that yet, so until then, just turn on the regulator and keep it on so that we can focus on basic GPU bringup. Signed-off-by: Jeffrey Hugo Reviewed-by: Bjorn Andersson Signed-off-by: Mark Brown arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 90ec7a76cc4ba65bfedeb8621cba09cd5a317d8f Author: Vivek Gautam Date: Thu May 16 15:00:20 2019 +0530 iommu/io-pgtable-arm: Add support to use system cache Few Qualcomm platforms such as, sdm845 have an additional outer cache called as System cache, aka. Last level cache (LLC) that allows non-coherent devices to upgrade to using caching. This cache sits right before the DDR, and is tightly coupled with the memory controller. The clients using this cache request their slices from this system cache, make it active, and can then start using it. There is a fundamental assumption that non-coherent devices can't access caches. This change adds an exception where they *can* use some level of cache despite still being non-coherent overall. The coherent devices that use cacheable memory, and CPU make use of this system cache by default. Looking at memory types, we have following - a) Normal uncached :- MAIR 0x44, inner non-cacheable, outer non-cacheable; b) Normal cached :- MAIR 0xff, inner read write-back non-transient, outer read write-back non-transient; attribute setting for coherenet I/O devices. and, for non-coherent i/o devices that can allocate in system cache another type gets added - c) Normal sys-cached :- MAIR 0xf4, inner non-cacheable, outer read write-back non-transient Coherent I/O devices use system cache by marking the memory as normal cached. Non-coherent I/O devices should mark the memory as normal sys-cached in page tables to use system cache. Acked-by: Robin Murphy Signed-off-by: Vivek Gautam Signed-off-by: Will Deacon drivers/iommu/io-pgtable-arm.c | 9 ++++++++- include/linux/iommu.h | 6 ++++++ 2 files changed, 14 insertions(+), 1 deletion(-) commit 42ba89c8bbd95fce16122d357456ce1bd35d31d2 Author: Jeffrey Hugo Date: Mon Jun 17 11:37:29 2019 -0700 regulator: qcom_spmi: Add support for PM8005 The PM8005 is used on the msm8998 MTP. The S1 regulator is VDD_GFX, ie it needs to be on and controlled inorder to use the GPU. Add support to drive the PM8005 regulators so that we can bring up the GPU on msm8998. Signed-off-by: Jeffrey Hugo Reviewed-by: Bjorn Andersson Signed-off-by: Mark Brown drivers/regulator/qcom_spmi-regulator.c | 176 ++++++++++++++++++++++++++++++++ 1 file changed, 176 insertions(+) commit 4fe0676b04edc5032ffdc3fed00b670e1cfef049 Author: Jeffrey Hugo Date: Mon Jun 17 11:37:16 2019 -0700 dt-bindings: qcom_spmi: Document PM8005 regulators Document the dt bindings for the PM8005 regulators which are usually used for VDD of standalone blocks on a SoC like the GPU. Signed-off-by: Jeffrey Hugo Reviewed-by: Bjorn Andersson Signed-off-by: Mark Brown Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.txt | 4 ++++ 1 file changed, 4 insertions(+) commit f56943699463478617b235930252261d5277bd46 Author: Vladimir Zapolskiy Date: Tue Jun 18 19:28:18 2019 +0300 spi: don't open code list_for_each_entry_safe_reverse() The loop declaration in function spi_res_release() can be simplified by reusing the common list_for_each_entry_safe_reverse() helper macro. Signed-off-by: Vladimir Zapolskiy Signed-off-by: Mark Brown drivers/spi/spi.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit ac28ec07ae1c5c1e18ed6855eb105a328418da88 Author: Nilkanth Ahirrao Date: Tue Jun 18 14:19:53 2019 +0900 ASoC: rsnd: fixup mod ID calculation in rsnd_ctu_probe_ commit c16015f36cc1 ("ASoC: rsnd: add .get_id/.get_id_sub") introduces rsnd_ctu_id which calcualates and gives the main Device id of the CTU by dividing the id by 4. rsnd_mod_id uses this interface to get the CTU main Device id. But this commit forgets to revert the main Device id calcution previously done in rsnd_ctu_probe_ which also divides the id by 4. This path corrects the same to get the correct main Device id. The issue is observered when rsnd_ctu_probe_ is done for CTU1 Fixes: c16015f36cc1 ("ASoC: rsnd: add .get_id/.get_id_sub") Signed-off-by: Nilkanth Ahirrao Signed-off-by: Suresh Udipi Signed-off-by: Jiada Wang Acked-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/ctu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 281c443f1e8e25ebc46aaebf48c73e0545a0830e Author: Tzung-Bi Shih Date: Tue Jun 18 15:04:26 2019 +0800 ASoC: Intel: sof_rt5682: use GFP_KERNEL instead of GFP_ATOMIC Change the memory allocation flag from GFP_ATOMIC to GFP_KERNEL because probe of platform device is unlikely a place where cannot sleep. Signed-off-by: Tzung-Bi Shih Signed-off-by: Mark Brown sound/soc/intel/boards/sof_rt5682.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c054b41690a44e6534eb2a1beda1b655f3994c5b Author: Bjorn Andersson Date: Mon Jun 17 22:29:09 2019 -0700 ASoC: qcom: common: Mark links as nonatomic The interface used to communicate with the DSP can sleep, so mark the links as nonatomic. This prevents various sleep while atomic errors when bringing up the audio interface. Suggested-by: Srinivas Kandagatla Signed-off-by: Bjorn Andersson Signed-off-by: Mark Brown sound/soc/qcom/common.c | 1 + 1 file changed, 1 insertion(+) commit 7a1954de3050cb13cf9ee43493ea45785dae68a2 Author: Cezary Rojewski Date: Thu Jun 13 21:04:30 2019 +0200 ASoC: Intel: Skylake: Fix incorrect capture position reporting HW recommends to set DUM bit on device power up, so that DPIB write request occurs every frame regardless of whether DPIB has changed or not. This addresses incorrect position reporting for capture streams. Signed-off-by: Leoni Prodduvaka Signed-off-by: Cezary Rojewski Signed-off-by: Mark Brown sound/soc/intel/skylake/skl.c | 21 +++++++++++++++++++++ sound/soc/intel/skylake/skl.h | 1 + 2 files changed, 22 insertions(+) commit f2c6203fdd1197d8254073a8f3f3372b0d3d9e6b Author: Mark Brown Date: Mon Jun 17 18:16:52 2019 +0100 regulator: core: Make entire header comment C++ style Makes things look more consistent. Signed-off-by: Mark Brown drivers/regulator/core.c | 15 +++++++-------- drivers/regulator/helpers.c | 11 +++++------ 2 files changed, 12 insertions(+), 14 deletions(-) commit e1d700f7c94e755106749411706a38e39a93404b Merge: ba576a6232dc d1fdb6d8f6a4 Author: Mark Brown Date: Tue Jun 18 19:12:47 2019 +0100 Merge tag 'v5.2-rc4' into regulator-5.3 Linux 5.2-rc4 commit d3cb8f3d0fb2a334690e090f6ddb6bfcfbc7b4ce Author: Sean Paul Date: Tue May 28 14:26:45 2019 -0400 drm/msm/dpu: Remove bogus comment This comment doesn't make any sense, remove it. Suggested-by: Jordan Crouse Reviewed-by: Jordan Crouse Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190528182657.246714-1-sean@poorly.run drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 1 - 1 file changed, 1 deletion(-) commit e9f050f18e43b95bcf1da7ed8afb2a9a19f8908b Author: Sean Paul Date: Fri May 24 13:32:19 2019 -0400 drm/msm/dpu: Remove _dpu_debugfs_init Fold it into dpu_debugfs_init. Cc: Stephen Boyd Reviewed-by: Abhinav Kumar Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190524173231.5040-2-sean@poorly.run drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit c4957347d9d713aaab947f27b6e3ca77243df221 Author: Sean Paul Date: Fri May 24 13:32:18 2019 -0400 drm/msm/dpu: Use provided drm_minor to initialize debugfs Instead of reaching into dev->primary for debugfs_root, use the minor passed into debugfs_init. This avoids creating the debug directory under /sys/kernel/debug/ and instead creates the directory under the correct node in /sys/kernel/debug/dri// Reported-by: Stephen Boyd Reviewed-by: Abhinav Kumar Reviewed-by: Rob Clark Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190524173231.5040-1-sean@poorly.run drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 815deee0e34503dee7e74fb5ba4ea4a9b3a56750 Author: Arnd Bergmann Date: Mon Jun 17 15:04:49 2019 +0200 qed: Fix -Wmaybe-uninitialized false positive A previous attempt to shut up the uninitialized variable use warning was apparently insufficient. When CONFIG_PROFILE_ANNOTATED_BRANCHES is set, gcc-8 still warns, because the unlikely() check in DP_NOTICE() causes it to no longer track the state of all variables correctly: drivers/net/ethernet/qlogic/qed/qed_dev.c: In function 'qed_llh_set_ppfid_affinity': drivers/net/ethernet/qlogic/qed/qed_dev.c:798:47: error: 'abs_ppfid' may be used uninitialized in this function [-Werror=maybe-uninitialized] addr = NIG_REG_PPF_TO_ENGINE_SEL + abs_ppfid * 0x4; ~~~~~~~~~~^~~~~ This is not a nice workaround, but always initializing the output from qed_llh_abs_ppfid() at least shuts up the false positive reliably. Fixes: 79284adeb99e ("qed: Add llh ppfid interface and 100g support for offload protocols") Fixes: 8e2ea3ea9625 ("qed: Fix static checker warning") Signed-off-by: Arnd Bergmann Acked-by: Michal Kalderon  Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dev.c | 1 + 1 file changed, 1 insertion(+) commit b594850e65b5b3a22cbc0a250940504c08ec45b1 Author: Geert Uytterhoeven Date: Mon Jun 17 13:50:44 2019 +0200 ps3_gelic: Use [] to denote a flexible array member Flexible array members should be denoted using [] instead of [0], else gcc will not warn when they are no longer at the end of a struct. Signed-off-by: Geert Uytterhoeven Signed-off-by: David S. Miller drivers/net/ethernet/toshiba/ps3_gelic_net.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 75345f888f700c4ab2448287e35d48c760b202e6 Author: Denis Kirjanov Date: Mon Jun 17 10:53:41 2019 +0200 ipoib: show VF broadcast address in IPoIB case we can't see a VF broadcast address for but can see for PF Before: 11: ib1: mtu 2044 qdisc pfifo_fast state UP mode DEFAULT group default qlen 256 link/infiniband 80:00:00:66:fe:80:00:00:00:00:00:00:24:8a:07:03:00:a4:3e:7c brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff vf 0 MAC 14:80:00:00:66:fe, spoof checking off, link-state disable, trust off, query_rss off ... After: 11: ib1: mtu 2044 qdisc pfifo_fast state UP mode DEFAULT group default qlen 256 link/infiniband 80:00:00:66:fe:80:00:00:00:00:00:00:24:8a:07:03:00:a4:3e:7c brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff vf 0 link/infiniband 80:00:00:66:fe:80:00:00:00:00:00:00:24:8a:07:03:00:a4:3e:7c brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff, spoof checking off, link-state disable, trust off, query_rss off v1->v2: add the IFLA_VF_BROADCAST constant v2->v3: put IFLA_VF_BROADCAST at the end to avoid KABI breakage and set NLA_REJECT dev_setlink Signed-off-by: Denis Kirjanov Acked-by: Doug Ledford Signed-off-by: David S. Miller include/uapi/linux/if_link.h | 5 +++++ net/core/rtnetlink.c | 5 +++++ 2 files changed, 10 insertions(+) commit 64d701c608fea362881e823b666327f5d28d7ffd Author: Denis Kirjanov Date: Mon Jun 17 10:53:40 2019 +0200 ipoib: correcly show a VF hardware address in the case of IPoIB with SRIOV enabled hardware ip link show command incorrecly prints 0 instead of a VF hardware address. Before: 11: ib1: mtu 2044 qdisc pfifo_fast state UP mode DEFAULT group default qlen 256 link/infiniband 80:00:00:66:fe:80:00:00:00:00:00:00:24:8a:07:03:00:a4:3e:7c brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff vf 0 MAC 00:00:00:00:00:00, spoof checking off, link-state disable, trust off, query_rss off ... After: 11: ib1: mtu 2044 qdisc pfifo_fast state UP mode DEFAULT group default qlen 256 link/infiniband 80:00:00:66:fe:80:00:00:00:00:00:00:24:8a:07:03:00:a4:3e:7c brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff vf 0 link/infiniband 80:00:00:66:fe:80:00:00:00:00:00:00:24:8a:07:03:00:a4:3e:7c brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff, spoof checking off, link-state disable, trust off, query_rss off v1->v2: just copy an address without modifing ifla_vf_mac v2->v3: update the changelog Signed-off-by: Denis Kirjanov Acked-by: Doug Ledford Signed-off-by: David S. Miller drivers/infiniband/ulp/ipoib/ipoib_main.c | 1 + 1 file changed, 1 insertion(+) commit eca153603f2f020e15d071918e0daf1d56c17d29 Author: Chris Wilson Date: Tue Jun 18 17:19:51 2019 +0100 drm/i915: Don't dereference request if it may have been retired when printing This has caught me out on countless occasions, when we retrieve a pointer from the submission/execlists backend, it does not carry a reference to the context or ring. Those are only pinned while the request is active, so if we see the request is already completed, it may be in the process of being retired and those pointers defunct. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110938 Fixes: 3a068721a973 ("drm/i915: Show ring->start for the ELSP context/request queue") Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190618161951.28820-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gt/intel_engine_cs.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 1422768fa2600442bfc4be4b1fe112bf9d6bb5cf Author: Chris Wilson Date: Tue Jun 18 17:19:50 2019 +0100 drm/i915/selftests: Flush live_evict Be sure to cleanup after live_evict by flushing any residual state off the GPU using igt_flush_test. Tvrtko mentioned that it is probably wise to stop repeating this ad hoc around the tests and implement a live test runner. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190618161951.28820-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/selftests/i915_gem_evict.c | 3 +++ 1 file changed, 3 insertions(+) commit d25f6ead162eab3f51b6616be23691ac42e141b5 Author: Will Deacon Date: Thu May 16 16:08:47 2019 +0100 iommu/arm-smmu-v3: Increase maximum size of queues We've been artificially limiting the size of our queues to 4k so that we don't end up allocating huge amounts of physically-contiguous memory at probe time. However, 4k is only enough for 256 commands in the command queue, so instead let's try to allocate the largest queue that the SMMU supports, retrying with a smaller size if the allocation fails. The caveat here is that we have to limit our upper bound based on CONFIG_CMA_ALIGNMENT to ensure that our queue allocations remain natually aligned, which is required by the SMMU architecture. Signed-off-by: Will Deacon drivers/iommu/arm-smmu-v3.c | 54 +++++++++++++++++++++++++++++++-------------- 1 file changed, 38 insertions(+), 16 deletions(-) commit 0bd6cb6b58f7332c61cef2e4ae48db1ca9910b6b Author: Chris Wilson Date: Tue Jun 18 08:41:29 2019 +0100 drm/i915: Skip shrinking already freed pages Previously, we wanted to shrink the pages of freed objects before they were finally RCU collected. However, by removing the struct_mutex serialisation around the active reference, we need to acquire an extra reference around the wait. Unfortunately this means that we have to skip objects that are waiting RCU collection. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110937 Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190618074153.16055-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gem/i915_gem_object.c | 47 +--------------------------- drivers/gpu/drm/i915/gem/i915_gem_shrinker.c | 5 +++ 2 files changed, 6 insertions(+), 46 deletions(-) commit 2ae6b594fb610e0826f731ce52f264b9eef9310b Merge: 714a485aae9a 12ee82203999 Author: David S. Miller Date: Tue Jun 18 09:45:37 2019 -0700 Merge branch 'mlxsw-Improve-IPv6-route-insertion-rate' Ido Schimmel says: ==================== mlxsw: Improve IPv6 route insertion rate Unlike IPv4, an IPv6 multipath route in the kernel is composed from multiple sibling routes, each representing a single nexthop. Therefore, an addition of a multipath route with N nexthops translates to N in-kernel notifications. This is inefficient for device drivers that need to program the route to the underlying device. Each time a new nexthop is appended, a new nexthop group needs to be constructed and the old one deleted. This patchset improves the situation by sending a single notification for a multipath route addition / deletion instead of one per-nexthop. When adding thousands of multipath routes with 16 nexthops, I measured an improvement of about x10 in the insertion rate. Patches #1-#3 add a flag that indicates that in-kernel notifications need to be suppressed and extend the IPv6 FIB notification info with information about the number of sibling routes that are being notified. Patches #4-#5 adjust the two current listeners to these notifications to ignore notifications about IPv6 multipath routes. Patches #6-#7 adds add / delete notifications for IPv6 multipath routes. Patches #8-#14 do the same for mlxsw. Patch #15 finally removes the limitations added in patches #4-#5 and stops the kernel from sending a notification for each added / deleted nexthop. Patch #16 adds test cases. v2 (David Ahern): * Remove patch adjusting netdevsim to consume resources for each fib6_info. Instead, consume one resource for the entire multipath route * Remove 'multipath_rt' usage in patch #10 * Remove 'multipath_rt' from 'struct fib6_entry_notifier_info' in patch #15. The member is only removed in this patch to prevent drivers from processing multipath routes twice during the series ==================== Signed-off-by: David S. Miller commit 12ee8220399995cc63fe590d9b01e94921478ad8 Author: Ido Schimmel Date: Tue Jun 18 18:12:58 2019 +0300 selftests: mlxsw: Add a test for FIB offload indication Test that the offload indication for unicast routes is correctly set in different scenarios. IPv4 support will be added in the future. Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller .../selftests/drivers/net/mlxsw/fib_offload.sh | 349 +++++++++++++++++++++ 1 file changed, 349 insertions(+) commit d5382fef70ce273608d6fc652c24f075de3737ef Author: Ido Schimmel Date: Tue Jun 18 18:12:57 2019 +0300 ipv6: Stop sending in-kernel notifications for each nexthop Both listeners - mlxsw and netdevsim - of IPv6 FIB notifications are now ready to handle IPv6 multipath notifications. Therefore, stop ignoring such notifications in both drivers and stop sending notification for each added / deleted nexthop. v2: * Remove 'multipath_rt' from 'struct fib6_entry_notifier_info' Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Reviewed-by: David Ahern Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 2 -- drivers/net/netdevsim/fib.c | 7 ------ include/net/ip6_fib.h | 1 - net/ipv6/ip6_fib.c | 29 +++++++++++++--------- 4 files changed, 17 insertions(+), 22 deletions(-) commit 2d9dd7ec79fb656852837c3821a3cb49dd464e76 Author: Ido Schimmel Date: Tue Jun 18 18:12:56 2019 +0300 mlxsw: spectrum_router: Create IPv6 multipath routes in one go Allow the driver to create an IPv6 multipath route in one go by passing an array of sibling routes and iterating over them. Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 36 ++++++++++++++-------- 1 file changed, 23 insertions(+), 13 deletions(-) commit d21afd3029b940e87539f18b385f2214413fe44c Author: Ido Schimmel Date: Tue Jun 18 18:12:55 2019 +0300 mlxsw: spectrum_router: Add / delete multiple IPv6 nexthops Currently, the functions that take care of populating IPv6 nexthop groups only add / delete a single nexthop. Prepare them to handle multiple routes in one notification by passing an array of routes and adding / deleting all of them. Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 61 ++++++++++++++-------- 1 file changed, 39 insertions(+), 22 deletions(-) commit 921bc539cbcbb89274ff692ae58fc000c1f251bc Author: Ido Schimmel Date: Tue Jun 18 18:12:54 2019 +0300 mlxsw: spectrum_router: Pass array of routes to route handling functions Prepare the driver to handle multiple routes in a single notification by passing an array of routes to the functions that actually add / delete a route. Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 94d628d1f97b88749caee797ff78d41eb95e26e5 Author: Ido Schimmel Date: Tue Jun 18 18:12:53 2019 +0300 mlxsw: spectrum_router: Adjust IPv6 replace logic to new notifications Previously, IPv6 replace notifications were only sent from fib6_add_rt2node(). The function only emitted such notifications if a route actually replaced another route. A previous patch added another call site in ip6_route_multipath_add() from which such notification can be emitted even if a route was merely added and did not replace another route. Adjust the driver to take this into account and potentially set the 'replace' flag to 'false' if the notified route did not replace an existing route. Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 928c0b534f2977a3c20c6237282fb8f685775373 Author: Ido Schimmel Date: Tue Jun 18 18:12:52 2019 +0300 mlxsw: spectrum_router: Pass multiple routes to work item Prepare the driver to process IPv6 multipath notifications by passing an array of 'struct fib6_info' instead of just one route. A reference is taken on each sibling route in order to prevent them from being freed until they are processed by the workqueue. v2: * Remove 'multipath_rt' usage Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 72 +++++++++++++++++++--- 1 file changed, 65 insertions(+), 7 deletions(-) commit ccd56a5f5018ba2b32847a521b50997537d9838c Author: Ido Schimmel Date: Tue Jun 18 18:12:51 2019 +0300 mlxsw: spectrum_router: Prepare function to return errors The function mlxsw_sp_router_fib6_event() takes care of preparing the needed information for the work item that actually inserts the route into the device. When processing an IPv6 multipath route, the function will need to allocate an array to store pointers to all the sibling routes. Change the function's signature to return an error code and adjust the single call site. Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 20247fcab397dc6339992ee6deb9f4a6e53d05ef Author: Ido Schimmel Date: Tue Jun 18 18:12:50 2019 +0300 mlxsw: spectrum_router: Remove processing of IPv6 append notifications No such notifications are sent by the IPv6 code, so remove them. Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 2 -- 1 file changed, 2 deletions(-) commit 2881fd61b68ef260b65ff25e19e3133d99f6a0a8 Author: Ido Schimmel Date: Tue Jun 18 18:12:49 2019 +0300 ipv6: Add IPv6 multipath notification for route delete If all the nexthops of a multipath route are being deleted, send one notification for the entire route, instead of one per-nexthop. Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Reviewed-by: David Ahern Signed-off-by: David S. Miller net/ipv6/route.c | 6 ++++++ 1 file changed, 6 insertions(+) commit ebee3cad835f7fe7250213225cf6d62c7cf3b2ca Author: Ido Schimmel Date: Tue Jun 18 18:12:48 2019 +0300 ipv6: Add IPv6 multipath notifications for add / replace Emit a notification when a multipath routes is added or replace. Note that unlike the replace notifications sent from fib6_add_rt2node(), it is possible we are sending a 'FIB_EVENT_ENTRY_REPLACE' when a route was merely added and not replaced. Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Reviewed-by: David Ahern Signed-off-by: David S. Miller net/ipv6/route.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit d133e4f1fa12bff58e1203c7d6c75f993fb5dead Author: Ido Schimmel Date: Tue Jun 18 18:12:47 2019 +0300 netdevsim: Ignore IPv6 multipath notifications In a similar fashion to previous patch, have netdevsim ignore IPv6 multipath notifications for now. Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/netdevsim/fib.c | 7 +++++++ 1 file changed, 7 insertions(+) commit f6c3bb75165cb4d0a0beb2ea6df5b392b7131645 Author: Ido Schimmel Date: Tue Jun 18 18:12:46 2019 +0300 mlxsw: spectrum_router: Ignore IPv6 multipath notifications IPv6 multipath notifications are about to be sent, but mlxsw is not ready to process them, so ignore them. The limitation will be lifted by a subsequent patch which will also stop the kernel from sending a notification for each nexthop. Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 2 ++ 1 file changed, 2 insertions(+) commit d4b96c7b51e8fe9bcf94c8ab8cd5717d2f005b04 Author: Ido Schimmel Date: Tue Jun 18 18:12:45 2019 +0300 ipv6: Extend notifier info for multipath routes Extend the IPv6 FIB notifier info with number of sibling routes being notified. This will later allow listeners to process one notification for a multipath routes instead of N, where N is the number of nexthops. Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Reviewed-by: David Ahern Signed-off-by: David S. Miller include/net/ip6_fib.h | 7 +++++++ net/ipv6/ip6_fib.c | 17 +++++++++++++++++ 2 files changed, 24 insertions(+) commit c82481f7ea21be8ec960a28aef07bf258f6820b7 Author: Ido Schimmel Date: Tue Jun 18 18:12:44 2019 +0300 netlink: Add field to skip in-kernel notifications The struct includes a 'skip_notify' flag that indicates if netlink notifications to user space should be suppressed. As explained in commit 3b1137fe7482 ("net: ipv6: Change notifications for multipath add to RTA_MULTIPATH"), this is useful to suppress per-nexthop RTM_NEWROUTE notifications when an IPv6 multipath route is added / deleted. Instead, one notification is sent for the entire multipath route. This concept is also useful for in-kernel notifications. Sending one in-kernel notification for the addition / deletion of an IPv6 multipath route - instead of one per-nexthop - provides a significant increase in the insertion / deletion rate to underlying devices. Add a 'skip_notify_kernel' flag to suppress in-kernel notifications. Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Reviewed-by: David Ahern Signed-off-by: David S. Miller include/net/netlink.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 3de205cde4ee8e36416f8b1a1510658abb14f408 Author: Ido Schimmel Date: Tue Jun 18 18:12:43 2019 +0300 netlink: Document all fields of 'struct nl_info' Some fields were not documented. Add documentation. Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Reviewed-by: David Ahern Signed-off-by: David S. Miller include/net/netlink.h | 2 ++ 1 file changed, 2 insertions(+) commit 714a485aae9a1707edc8b6dcdb88b0e5b4ea8f0e Merge: cd4bb2a3344c efa14c398582 Author: David S. Miller Date: Tue Jun 18 09:33:15 2019 -0700 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2019-06-17 This series contains updates to the iavf driver only. Akeem updates the driver to change how VLAN tags are being populated and programmed into the hardware by starting from the first member of the list until the number of allowed VLAN tags is exhausted. Mitch fixed the variable type since the variable counter starts out negative and climbs to zero, so use a signed integer instead of unsigned. Also increase the timeout to avoid erroneous errors. Fixed the driver to be able to handle when the hardware hands us a null receive descriptor with no data attached, yet is still valid. Aleksandr fixes the driver to use GFP_ATOMIC when allocating memory in atomic context. Avinash updates the driver to fix a calculation error in virtchnl regarding the valid length. Jakub does some refactoring of the commands processing the watchdog state machine to reduce the length and complexity of the function. Also decalre watchdog task as delayed work and use a dedicated work queue to service the driver tasks. Paul updated the iavf_process_aq_command to call the necessary functions to be able to clear cloud filter bits that need to be cleared. ==================== Signed-off-by: David S. Miller commit 767662bc62a43741b1bba7a2f8c04faaf0e3e93b Author: Robert M. Fosha Date: Mon Jun 17 18:01:08 2019 -0700 drm/i915: Update workarounds selftest for read only regs Updates the live_workarounds selftest to handle whitelisted registers that are flagged as read only. Signed-off-by: Robert M. Fosha Signed-off-by: John Harrison Reviewed-by: Tvrtko Ursulin Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190618010108.27499-5-John.C.Harrison@Intel.com drivers/gpu/drm/i915/gt/selftest_workarounds.c | 43 +++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 4 deletions(-) commit 7b3d406310983a89ed7a1ecdd115efbe12b0ded5 Author: John Harrison Date: Mon Jun 17 18:01:07 2019 -0700 drm/i915: Add whitelist workarounds for ICL Updated whitelist table for ICL. v2: Reduce changes to just those required for media driver until the selftest can be updated to support the new features of the other entries. Signed-off-by: John Harrison Signed-off-by: Robert M. Fosha Cc: Tvrtko Ursulin Cc: Chris Wilson Reviewed-by: Tvrtko Ursulin Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190618010108.27499-4-John.C.Harrison@Intel.com drivers/gpu/drm/i915/gt/intel_workarounds.c | 38 ++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 11 deletions(-) commit ebd2de47a19f1c17ae47f8331aae3cd436766663 Author: John Harrison Date: Mon Jun 17 18:01:06 2019 -0700 drm/i915: Support whitelist workarounds on all engines Newer hardware requires setting up whitelists on engines other than render. So, extend the whitelist code to support all engines. Signed-off-by: John Harrison Signed-off-by: Robert M. Fosha Cc: Tvrtko Ursulin Cc: Chris Wilson Reviewed-by: Tvrtko Ursulin Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190618010108.27499-3-John.C.Harrison@Intel.com drivers/gpu/drm/i915/gt/intel_workarounds.c | 66 ++++++++++++++++++++--------- 1 file changed, 47 insertions(+), 19 deletions(-) commit 5380d0b781c491d94b4f4690ecf9762c1946c4ec Author: John Harrison Date: Mon Jun 17 18:01:05 2019 -0700 drm/i915: Support flags in whitlist WAs Newer hardware adds flags to the whitelist work-around register. These allow per access direction privileges and ranges. Signed-off-by: John Harrison Signed-off-by: Robert M. Fosha Cc: Tvrtko Ursulin Cc: Chris Wilson Reviewed-by: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190618010108.27499-2-John.C.Harrison@Intel.com drivers/gpu/drm/i915/gt/intel_workarounds.c | 9 ++++++++- drivers/gpu/drm/i915/i915_reg.h | 7 +++++++ 2 files changed, 15 insertions(+), 1 deletion(-) commit cd4bb2a3344cb53d9234cca232edfb2dce0f0a35 Author: Shalom Toledo Date: Tue Jun 18 12:45:35 2019 +0000 mlxsw: spectrum_ptp: Fix compilation on 32-bit ARM Compilation on 32-bit ARM fails after commit 992aa864dca0 ("mlxsw: spectrum_ptp: Add implementation for physical hardware clock operations") because of 64-bit division: arm-linux-gnueabi-ld: drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.o: in function `mlxsw_sp1_ptp_phc_settime': spectrum_ptp.c:(.text+0x39c): undefined reference to `__aeabi_uldivmod' Fix by using div_u64(). Fixes: 992aa864dca0 ("mlxsw: spectrum_ptp: Add implementation for physical hardware clock operations") Signed-off-by: Shalom Toledo Reviewed-by: Ido Schimmel Reported-by: Nathan Chancellor Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit b7a3623d87e912f2633a6010cbcb1a78ab11d26d Author: Sean Paul Date: Mon Jun 17 14:15:42 2019 -0400 drm/rcar-du: Fix error check when retrieving crtc state drm_atomic_get_crtc_state() returns an error pointer when it fails, so the null check is doing nothing here. Credit to 0-day/Dan Carpenter for reporting this. Fixes: 6f3b62781bbd ("drm: Convert connector_helper_funcs->atomic_check to accept drm_atomic_state") Cc: Daniel Vetter Cc: Ville Syrjälä Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Ben Skeggs Cc: Laurent Pinchart Cc: Kieran Bingham Cc: Eric Anholt Cc: Laurent Pinchart [for rcar lvds] Cc: Sean Paul Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Cc: Lyude Paul Cc: Karol Herbst Cc: Ilia Mirkin Cc: dri-devel@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org Cc: linux-renesas-soc@vger.kernel.org Reported-by: kbuild test robot Reported-by: Dan Carpenter Reviewed-by: Laurent Pinchart Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190617181548.124134-1-sean@poorly.run drivers/gpu/drm/rcar-du/rcar_lvds.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d95ea1a4e1fb7c7ec44969afaf0d983f8170ebef Author: Jonathan Corbet Date: Tue May 28 17:12:51 2019 -0600 docs: Add a document on repository management Every merge window seems to involve at least one episode where subsystem maintainers don't manage their trees as Linus would like. Document the expectations so that at least he has something to point people to. Acked-by: David Rientjes Signed-off-by: Jonathan Corbet Documentation/maintainer/index.rst | 1 + Documentation/maintainer/rebasing-and-merging.rst | 226 ++++++++++++++++++++++ 2 files changed, 227 insertions(+) commit af88ec3962010e3ac96bcfe5476c9bd68b42477f Author: Qian Cai Date: Mon Jun 3 10:05:19 2019 -0400 iommu/vt-d: Silence a variable set but not used The commit "iommu/vt-d: Probe DMA-capable ACPI name space devices" introduced a compilation warning due to the "iommu" variable in for_each_active_iommu() but never used the for each element, i.e, "drhd->iommu". drivers/iommu/intel-iommu.c: In function 'probe_acpi_namespace_devices': drivers/iommu/intel-iommu.c:4639:22: warning: variable 'iommu' set but not used [-Wunused-but-set-variable] struct intel_iommu *iommu; Silence the warning the same way as in the commit d3ed71e5cc50 ("drivers/iommu/intel-iommu.c: fix variable 'iommu' set but not used") Signed-off-by: Qian Cai Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 42db7c6a404b21dafd3288ffa43136da562490ac Author: Qian Cai Date: Mon Jun 17 09:20:27 2019 -0400 iommu/vt-d: Remove an unused variable "length" The linux-next commit "iommu/vt-d: Duplicate iommu_resv_region objects per device list" [1] left out an unused variable, drivers/iommu/intel-iommu.c: In function 'dmar_parse_one_rmrr': drivers/iommu/intel-iommu.c:4014:9: warning: variable 'length' set but not used [-Wunused-but-set-variable] [1] https://lore.kernel.org/patchwork/patch/1083073/ Signed-off-by: Qian Cai Reviewed-by: Eric Auger Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 3 --- 1 file changed, 3 deletions(-) commit 7afc7f8168708b53937b25baed931da3c0a5367b Author: Ville Syrjälä Date: Wed Jun 12 16:08:01 2019 +0300 drm/i915: Drop the _INCOMPLETE for has_infoframe We have full infoframe readout now so we can replace the PIPE_CONF_CHECK_BOOL_INCOMPLETE(has_infoframe) with the normal PIPE_CONF_CHECK_BOOL(has_infoframe). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190612130801.2085-4-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak drivers/gpu/drm/i915/display/intel_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dde84833c325b72847f9468d1ba8355bde08b9a5 Author: Ville Syrjälä Date: Wed Jun 12 16:08:00 2019 +0300 drm/i915: Make pipe_config_err() vs. fastset less confusing Rename pipe_config_err() to pipe_config_mismatch(), and also print whether we're doing the fastset check or the sw vs. hw state readout check. Should make the logs a bit less confusing when they're not filled with what looks like a real error. Also rename the 'adjust' variable to 'fastset' to make it clear what it means. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190612130801.2085-3-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak drivers/gpu/drm/i915/display/intel_display.c | 158 +++++++++++++-------------- 1 file changed, 79 insertions(+), 79 deletions(-) commit b124ea432af7993ccea6f1a50076459d2a2626fe Author: Ville Syrjälä Date: Wed Jun 12 16:07:59 2019 +0300 drm/i915: Constify intel_pipe_config_compare() Now that intel_pipe_config_compare() no longer clobbers the passed in state we can make both crtc states const. And while at we simplify the calling convention, and clean up intel_compare_link_m_n() a bit. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190612130801.2085-2-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak drivers/gpu/drm/i915/display/intel_display.c | 43 +++++++++++----------------- 1 file changed, 17 insertions(+), 26 deletions(-) commit f0521558a2a89d58a08745e225025d338572e60a Author: Ville Syrjälä Date: Wed Jun 12 20:24:23 2019 +0300 drm/i915: Don't clobber M/N values during fastset check We're now calling intel_pipe_config_compare(..., true) uncoditionally which means we're always going clobber the calculated M/N values with the old values if the fuzzy M/N check passes. That causes problems because the fuzzy check allows for a huge difference in the values. I'm actually tempted to just make the M/N checks exact, but that might prevent fastboot from kicking in when people want it. So for now let's overwrite the computed values with the old values only if decide to skip the modeset. v2: Copy has_drrs along with M/N M2/N2 values Cc: stable@vger.kernel.org Cc: Blubberbub@protonmail.com Cc: Maarten Lankhorst Cc: Hans de Goede Tested-by: Blubberbub@protonmail.com Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110782 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110675 Fixes: d19f958db23c ("drm/i915: Enable fastset for non-boot modesets.") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190612172423.25231-1-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak drivers/gpu/drm/i915/display/intel_display.c | 36 +++++++++++++++++++++------- 1 file changed, 28 insertions(+), 8 deletions(-) commit 29fcea8ce7f3c16ebd267f8cb2f4a07887530aa9 Author: Arnd Bergmann Date: Mon Jun 17 15:30:54 2019 +0200 iommu: Fix integer truncation On 32-bit architectures, phys_addr_t may be different from dma_add_t, both smaller and bigger. This can lead to an overflow during an assignment that clang warns about: drivers/iommu/dma-iommu.c:230:10: error: implicit conversion from 'dma_addr_t' (aka 'unsigned long long') to 'phys_addr_t' (aka 'unsigned int') changes value from 18446744073709551615 to 4294967295 [-Werror,-Wconstant-conversion] Use phys_addr_t here because that is the type that the variable was declared as. Fixes: aadad097cd46 ("iommu/dma: Reserve IOVA for PCIe inaccessible DMA address") Signed-off-by: Arnd Bergmann Signed-off-by: Joerg Roedel drivers/iommu/dma-iommu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7786fd1087774c6090775932290f33ac73044f41 Author: Boris Brezillon Date: Tue Jun 18 10:16:48 2019 +0200 drm/panfrost: Expose performance counters through unstable ioctls Expose performance counters through 2 driver specific ioctls: one to enable/disable the perfcnt block, and one to dump the counter values. There are discussions to expose global performance monitors (those counters that can't be retrieved on a per-job basis) in a consistent way, but this is likely to take time to settle on something that works for various HW/users. The ioctls are marked unstable so we can get rid of them when the time comes. We initally went for a debugfs-based interface, but this was making the transition to per-FD address space more complicated (we need to specify the namespace the GPU has to use when dumping the perf counters), hence the decision to switch back to driver specific ioctls which are passed the FD they operate on and thus will have a dedicated address space attached to them. Other than that, the implementation is pretty simple: it basically dumps all counters and copy the values to a userspace buffer. The parsing is left to userspace which has to know the specific layout that's used by the GPU (layout differs on a per-revision basis). Signed-off-by: Boris Brezillon Acked-by: Alyssa Rosenzweig Signed-off-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20190618081648.17297-5-boris.brezillon@collabora.com drivers/gpu/drm/panfrost/Makefile | 3 +- drivers/gpu/drm/panfrost/panfrost_device.c | 8 + drivers/gpu/drm/panfrost/panfrost_device.h | 3 + drivers/gpu/drm/panfrost/panfrost_drv.c | 4 + drivers/gpu/drm/panfrost/panfrost_gpu.c | 7 + drivers/gpu/drm/panfrost/panfrost_perfcnt.c | 329 ++++++++++++++++++++++++++++ drivers/gpu/drm/panfrost/panfrost_perfcnt.h | 18 ++ drivers/gpu/drm/panfrost/panfrost_regs.h | 19 ++ include/uapi/drm/panfrost_drm.h | 24 ++ 9 files changed, 414 insertions(+), 1 deletion(-) commit 1e51348013a255a12048b3e12c660f4352f49f1c Author: Boris Brezillon Date: Tue Jun 18 10:16:47 2019 +0200 drm/panfrost: Add an helper to check the GPU generation All models with an ID >= 0x1000 are Bifrost GPUs for now (might change with new gens). Suggested-by: Alyssa Rosenzweig Signed-off-by: Boris Brezillon Reviewed-by: Alyssa Rosenzweig Signed-off-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20190618081648.17297-4-boris.brezillon@collabora.com drivers/gpu/drm/panfrost/panfrost_device.h | 5 +++++ 1 file changed, 5 insertions(+) commit 92f0ad0b1dc63cc27362cd8e466976a7ccde2da3 Author: Boris Brezillon Date: Tue Jun 18 10:16:46 2019 +0200 drm/panfrost: Add a module parameter to expose unstable ioctls We plan to expose performance counters through 2 driver specific ioctls until there's a solution to expose them in a generic way. In order to be able to deprecate those ioctls when this new infrastructure is in place we add an unsafe module parameter that will keep those ioctls hidden unless it's set to true (which also has the effect of tainting the kernel). All unstable ioctl handlers should use panfrost_unstable_ioctl_check() to check whether they're supposed to handle the request or reject it with ENOSYS. Suggested-by: Emil Velikov Signed-off-by: Boris Brezillon Reviewed-by: Alyssa Rosenzweig Signed-off-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20190618081648.17297-3-boris.brezillon@collabora.com drivers/gpu/drm/panfrost/panfrost_device.h | 2 ++ drivers/gpu/drm/panfrost/panfrost_drv.c | 11 +++++++++++ 2 files changed, 13 insertions(+) commit dd082cef99b6e7fd14b17d8a05ac32347a579a41 Author: Boris Brezillon Date: Tue Jun 18 10:16:45 2019 +0200 drm/panfrost: Move gpu_{write, read}() macros to panfrost_regs.h So they can be used from other files. Signed-off-by: Boris Brezillon Reviewed-by: Alyssa Rosenzweig Signed-off-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20190618081648.17297-2-boris.brezillon@collabora.com drivers/gpu/drm/panfrost/panfrost_gpu.c | 3 --- drivers/gpu/drm/panfrost/panfrost_regs.h | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) commit 58b55c859ac00c6845b6aed8852c541bc204c935 Author: Jean-Philippe Brucker Date: Wed Jun 12 18:59:38 2019 +0100 iommu: Add padding to struct iommu_fault Ease future extensions of struct iommu_fault_page_request and struct iommu_fault_unrecoverable by adding a few bytes of padding. That way, a new field can be added to either of these structures by simply introducing a new flag. To extend it after the size limit is reached, a new fault reporting structure will have to be negotiated with userspace. With 56 bytes of padding, the total size of iommu_fault is 64 bytes and fits in a cache line on a lot of contemporary machines, while providing 16 and 24 bytes of extension to structures iommu_fault_page_request and iommu_fault_unrecoverable respectively. Signed-off-by: Jean-Philippe Brucker Acked-by: Jacob Pan Reviewed-by: Eric Auger Signed-off-by: Joerg Roedel include/uapi/linux/iommu.h | 2 ++ 1 file changed, 2 insertions(+) commit 8a1a0cd0b770a0f40a49db923479879fa7135aae Author: Jason Gunthorpe Date: Thu May 23 11:23:30 2019 -0300 mm/hmm: Use lockdep instead of comments So we can check locking at runtime. Signed-off-by: Jason Gunthorpe Reviewed-by: Jérôme Glisse Reviewed-by: John Hubbard Reviewed-by: Ralph Campbell Acked-by: Souptick Joarder Reviewed-by: Christoph Hellwig Tested-by: Philip Yang mm/hmm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 47f245985a4f3e270b1e4f28aa49f4c939527981 Author: Jason Gunthorpe Date: Thu May 23 11:08:28 2019 -0300 mm/hmm: Hold on to the mmget for the lifetime of the range Range functions like hmm_range_snapshot() and hmm_range_fault() call find_vma, which requires hodling the mmget() and the mmap_sem for the mm. Make this simpler for the callers by holding the mmget() inside the range for the lifetime of the range. Other functions that accept a range should only be called if the range is registered. This has the side effect of directly preventing hmm_release() from happening while a range is registered. That means range->dead cannot be false during the lifetime of the range, so remove dead and hmm_mirror_mm_is_alive() entirely. Signed-off-by: Jason Gunthorpe Reviewed-by: John Hubbard Reviewed-by: Ralph Campbell Reviewed-by: Christoph Hellwig Tested-by: Philip Yang include/linux/hmm.h | 26 -------------------------- mm/hmm.c | 32 +++++++++++--------------------- 2 files changed, 11 insertions(+), 47 deletions(-) commit eceb9973d908cb327372bf0d04f2d1ee0b27bff5 Author: Paolo Bonzini Date: Thu Jun 13 16:16:39 2019 +0200 KVM: nVMX: shadow pin based execution controls The VMX_PREEMPTION_TIMER flag may be toggled frequently, though not *very* frequently. Since it does not affect KVM's dirty logic, e.g. the preemption timer value is loaded from vmcs12 even if vmcs12 is "clean", there is no need to mark vmcs12 dirty when L1 writes pin controls, and shadowing the field achieves that. Reviewed-by: Paolo Bonzini Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/vmcs_shadow_fields.h | 1 + 1 file changed, 1 insertion(+) commit 804939ea200d421fb7f3bf9eefebc38c255dd624 Author: Sean Christopherson Date: Tue May 7 12:18:05 2019 -0700 KVM: VMX: Leave preemption timer running when it's disabled VMWRITEs to the major VMCS controls, pin controls included, are deceptively expensive. CPUs with VMCS caching (Westmere and later) also optimize away consistency checks on VM-Entry, i.e. skip consistency checks if the relevant fields have not changed since the last successful VM-Entry (of the cached VMCS). Because uops are a precious commodity, uCode's dirty VMCS field tracking isn't as precise as software would prefer. Notably, writing any of the major VMCS fields effectively marks the entire VMCS dirty, i.e. causes the next VM-Entry to perform all consistency checks, which consumes several hundred cycles. As it pertains to KVM, toggling PIN_BASED_VMX_PREEMPTION_TIMER more than doubles the latency of the next VM-Entry (and again when/if the flag is toggled back). In a non-nested scenario, running a "standard" guest with the preemption timer enabled, toggling the timer flag is uncommon but not rare, e.g. roughly 1 in 10 entries. Disabling the preemption timer can change these numbers due to its use for "immediate exits", even when explicitly disabled by userspace. Nested virtualization in particular is painful, as the timer flag is set for the majority of VM-Enters, but prepare_vmcs02() initializes vmcs02's pin controls to *clear* the flag since its the timer's final state isn't known until vmx_vcpu_run(). I.e. the majority of nested VM-Enters end up unnecessarily writing pin controls *twice*. Rather than toggle the timer flag in pin controls, set the timer value itself to the largest allowed value to put it into a "soft disabled" state, and ignore any spurious preemption timer exits. Sadly, the timer is a 32-bit value and so theoretically it can fire before the head death of the universe, i.e. spurious exits are possible. But because KVM does *not* save the timer value on VM-Exit and because the timer runs at a slower rate than the TSC, the maximuma timer value is still sufficiently large for KVM's purposes. E.g. on a modern CPU with a timer that runs at 1/32 the frequency of a 2.4ghz constant-rate TSC, the timer will fire after ~55 seconds of *uninterrupted* guest execution. In other words, spurious VM-Exits are effectively only possible if the host is completely tickless on the logical CPU, the guest is not using the preemption timer, and the guest is not generating VM-Exits for any other reason. To be safe from bad/weird hardware, disable the preemption timer if its maximum delay is less than ten seconds. Ten seconds is mostly arbitrary and was selected in no small part because it's a nice round number. For simplicity and paranoia, fall back to __kvm_request_immediate_exit() if the preemption timer is disabled by KVM or userspace. Previously KVM continued to use the preemption timer to force immediate exits even when the timer was disabled by userspace. Now that KVM leaves the timer running instead of truly disabling it, allow userspace to kill it entirely in the unlikely event the timer (or KVM) malfunctions. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 5 ++-- arch/x86/kvm/vmx/vmcs.h | 1 + arch/x86/kvm/vmx/vmx.c | 60 ++++++++++++++++++++++++++++++----------------- 3 files changed, 41 insertions(+), 25 deletions(-) commit 157816f3775f5c4df2c68ef0e3a100ada974aa2e Author: Jason Gunthorpe Date: Thu May 23 11:43:43 2019 -0300 mm/hmm: Do not use list*_rcu() for hmm->ranges This list is always read and written while holding hmm->lock so there is no need for the confusing _rcu annotations. Signed-off-by: Jason Gunthorpe Reviewed-by: Jérôme Glisse Reviewed-by: John Hubbard Acked-by: Souptick Joarder Reviewed-by: Ralph Campbell Reviewed-by: Ira Weiny Reviewed-by: Christoph Hellwig Tested-by: Philip Yang mm/hmm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 378a60406415bd20ec6e845a3d6883d460656537 Author: Jason Gunthorpe Date: Thu May 23 11:17:22 2019 -0300 mm/hmm: Remove duplicate condition test before wait_event_timeout The wait_event_timeout macro already tests the condition as its first action, so there is no reason to open code another version of this, all that does is skip the might_sleep() debugging in common cases, which is not helpful. Further, based on prior patches, we can now simplify the required condition test: - If range is valid memory then so is range->hmm - If hmm_release() has run then range->valid is set to false at the same time as dead, so no reason to check both. - A valid hmm has a valid hmm->mm. Allowing the return value of wait_event_timeout() (along with its internal barriers) to compute the result of the function. Signed-off-by: Jason Gunthorpe Reviewed-by: Ralph Campbell Reviewed-by: John Hubbard Reviewed-by: Ira Weiny Reviewed-by: Christoph Hellwig Tested-by: Philip Yang include/linux/hmm.h | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) commit 8a9320b7ec5d879884c547fb73c35ac411a0b977 Author: Jason Gunthorpe Date: Thu May 23 10:24:13 2019 -0300 mm/hmm: Simplify hmm_get_or_create and make it reliable As coded this function can false-fail in various racy situations. Make it reliable and simpler by running under the write side of the mmap_sem and avoiding the false-failing compare/exchange pattern. Due to the mmap_sem this no longer has to avoid racing with a 2nd parallel hmm_get_or_create(). Unfortunately this still has to use the page_table_lock as the non-sleeping lock protecting mm->hmm, since the contexts where we free the hmm are incompatible with mmap_sem. Signed-off-by: Jason Gunthorpe Reviewed-by: John Hubbard Reviewed-by: Ralph Campbell Reviewed-by: Ira Weiny Reviewed-by: Christoph Hellwig Tested-by: Philip Yang mm/hmm.c | 77 +++++++++++++++++++++++++--------------------------------------- 1 file changed, 30 insertions(+), 47 deletions(-) commit ef78f7b18726578fbabdeb8719f161f48a34d85d Author: Chris Wilson Date: Tue Jun 18 13:58:58 2019 +0100 drm/i915: Use drm_gem_object.resv Since commit 1ba627148ef5 ("drm: Add reservation_object to drm_gem_object"), struct drm_gem_object grew its own builtin reservation_object rendering our own private one bloat. Remove our redundant reservation_object and point into obj->base.resv instead. References: 1ba627148ef5 ("drm: Add reservation_object to drm_gem_object") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Matthew Auld Cc: Mika Kuoppala Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20190618125858.7295-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/display/intel_display.c | 6 +++--- drivers/gpu/drm/i915/gem/i915_gem_busy.c | 9 +++++---- drivers/gpu/drm/i915/gem/i915_gem_clflush.c | 5 +++-- drivers/gpu/drm/i915/gem/i915_gem_client_blt.c | 4 ++-- drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 4 ++-- drivers/gpu/drm/i915/gem/i915_gem_fence.c | 4 ++-- drivers/gpu/drm/i915/gem/i915_gem_object.c | 4 ---- drivers/gpu/drm/i915/gem/i915_gem_object.h | 10 +++++----- drivers/gpu/drm/i915/gem/i915_gem_object_types.h | 16 ---------------- drivers/gpu/drm/i915/gem/i915_gem_wait.c | 7 ++++--- drivers/gpu/drm/i915/i915_gem_batch_pool.c | 4 ++-- drivers/gpu/drm/i915/i915_request.c | 4 ++-- drivers/gpu/drm/i915/i915_vma.c | 10 +++++----- 13 files changed, 35 insertions(+), 52 deletions(-) commit 7009db1475e9e92c823b60c2a9c1e5a3222699f0 Author: Chris Wilson Date: Tue Jun 18 08:41:28 2019 +0100 drm/i915: Keep engine alive as we retire the context Though we pin the context first before taking the pm wakeref, during retire we need to unpin before dropping the pm wakeref (breaking the "natural" onion). During the unpin, we may need to attach a cleanup operation on to the engine wakeref, ergo we want to keep the engine awake until after the unpin. v2: Push the engine wakeref into the barrier so we keep the onion unwind ordering in the request itself Fixes: ce476c80b8bf ("drm/i915: Keep contexts pinned until after the next kernel context switch") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190618074153.16055-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_active.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) commit 1bdd44579a54f73b87aff21d3b53f0f4e20b679c Author: Geert Uytterhoeven Date: Mon Jun 17 16:33:22 2019 +0200 dt-bindings: Add missing newline at end of file "git diff" says: \ No newline at end of file after modifying the files. Signed-off-by: Geert Uytterhoeven Signed-off-by: Rob Herring Documentation/devicetree/bindings/ipmi/npcm7xx-kcs-bmc.txt | 2 +- Documentation/devicetree/bindings/pinctrl/nuvoton,npcm7xx-pinctrl.txt | 2 +- Documentation/devicetree/bindings/regulator/pv88060.txt | 2 +- Documentation/devicetree/bindings/sound/cs42l73.txt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 5d9c4e9591dc0cce80dac170cbdc9015e34b074a Author: Kefeng Wang Date: Sat Jun 15 11:03:43 2019 +0800 of/fdt: Fix ‘of_fdt_match’ defined but not used compiler warning When CONFIG_OF_EARLY_FLATTREE is disabled, there is a compiler warning, drivers/of/fdt.c:129:19: warning: ‘of_fdt_match’ defined but not used [-Wunused-function] static int __init of_fdt_match(const void *blob, unsigned long node, Since the only caller of of_fdt_match() is of_flat_dt_match(), let's move the body of of_fdt_match() into of_flat_dt_match() and eliminate of_fdt_match(). Meanwhile, move of_fdt_is_compatible() under CONFIG_OF_EARLY_FLATTREE, as all callers are over there. Fixes: 9b4d2b635bd0 ("of/fdt: Remove dead code and mark functions with __init") Cc: Frank Rowand Signed-off-by: Kefeng Wang Reviewed-by: Stephen Boyd Signed-off-by: Rob Herring drivers/of/fdt.c | 99 ++++++++++++++++++++++++++------------------------------ 1 file changed, 45 insertions(+), 54 deletions(-) commit 2554fcb8cc4028f1ea0269c23265ce693d7de965 Author: Marco Felsch Date: Mon Jun 17 18:14:30 2019 +0200 dt-bindings: add Kontron vendor prefix Kontron is a leading embedded computer supplier. More information can be found on: https://www.kontron.de/ Signed-off-by: Marco Felsch Signed-off-by: Rob Herring Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) commit a10ecf624b7b7c1ec6c263d4562bd6631d380d2f Author: Rob Herring Date: Mon Jun 17 16:42:44 2019 -0600 dt-bindings: arm: fsl: Add missing schemas for i.MX1/31/35 The SoC/board bindings for i.MX1/31/35 are undocumented. Add the missing bindings to the schema. Cc: Shawn Guo Signed-off-by: Rob Herring Signed-off-by: Shawn Guo Documentation/devicetree/bindings/arm/fsl.yaml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit f37545c59bf3b92f05a030b4a3c0cfb8d3a003c7 Author: Rob Herring Date: Mon Jun 17 16:40:28 2019 -0600 dt-bindings: arm: fsl: Add back missing i.MX7ULP binding In the conversion to DT schema, the addition of the i.MX7ULP binding got dropped. Add it to the binding schema. Fixes: a1a38e1f4d1d ("dt-bindings: arm: Convert FSL board/soc bindings to json-schema") Cc: Shawn Guo Signed-off-by: Rob Herring Signed-off-by: Shawn Guo Documentation/devicetree/bindings/arm/fsl.yaml | 6 ++++++ 1 file changed, 6 insertions(+) commit fbfe9ba4599f8941b02bc4fc701d6df9f04ebf02 Author: Rob Herring Date: Mon Jun 17 14:44:23 2019 -0600 dt-bindings: arm: Move Emtrion i.MX6 board bindings to schema The Emtrion board bindings landed when the i.MX board/SoC bindings were being converted to DT schema. Add them to the schema and remove the separate file. Cc: Jan Tuerk Cc: Shawn Guo Signed-off-by: Rob Herring Signed-off-by: Shawn Guo Documentation/devicetree/bindings/arm/emtrion.txt | 12 ------------ Documentation/devicetree/bindings/arm/fsl.yaml | 4 ++++ 2 files changed, 4 insertions(+), 12 deletions(-) commit 283172b01956e9281885dccee9fb9727e07a55e0 Author: Anson Huang Date: Tue Jun 18 17:43:38 2019 +0800 soc: imx8: Use existing of_root directly There is common of_root for reference, no need to find it from DT again, use of_root directly to make driver simple. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo drivers/soc/imx/soc-imx8.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 9bbfda544ed79e8e9abde27bfe2c85428d582e7b Author: Thomas Hellstrom Date: Tue May 28 08:08:55 2019 +0200 drm/vmwgfx: Kill unneeded legacy security features At one point, the GPU command verifier and user-space handle manager couldn't properly protect GPU clients from accessing each other's data. Instead there was an elaborate mechanism to make sure only the active master's primary clients could render. The other clients were either put to sleep or even killed (if the master had exited). VRAM was evicted on master switch. With the advent of render-node functionality, we relaxed the VRAM eviction, but the other mechanisms stayed in place. Now that the GPU command verifier and ttm object manager properly isolate primary clients from different master realms we can remove the master switch related code and drop those legacy features. Signed-off-by: Thomas Hellstrom Reviewed-by: Brian Paul Reviewed-by: Deepak Rawat Acked-by: Emil Velikov drivers/gpu/drm/vmwgfx/ttm_lock.c | 100 -------------------- drivers/gpu/drm/vmwgfx/ttm_lock.h | 30 ------ drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 162 +------------------------------- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 16 +--- drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 6 -- 5 files changed, 3 insertions(+), 311 deletions(-) commit 358d76d9b577aefba973aea9a50dbfcbaac25d6e Author: Deepak Rawat Date: Thu May 9 12:42:58 2019 -0700 drm/vmwgfx: Use VMW_DEBUG_KMS for vmwgfx mode-setting user errors For errors during layout change ioctl use VMW_DEBUG_KMS instead of DRM_ERROR. Signed-off-by: Deepak Rawat Reviewed-by: Thomas Hellstrom Reviewed-by: Emil Velikov Signed-off-by: Thomas Hellstrom drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 03583e503de624b0672d1a1c16e66b39324db509 Author: Deepak Rawat Date: Thu May 9 11:47:40 2019 -0700 drm/vmwgfx: Add debug message for layout change ioctl Add debug code to check user-space layout change request. Signed-off-by: Deepak Rawat Reviewed-by: Thomas Hellstrom Reviewed-by: Emil Velikov Signed-off-by: Thomas Hellstrom drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 8 ++++++++ drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 8 ++++++++ 2 files changed, 16 insertions(+) commit 4ba397671237784a212378c271f700e99c66cf39 Author: Thomas Hellstrom Date: Tue Mar 19 13:27:50 2019 +0100 drm/vmwgfx: Add surface dirty-tracking callbacks Add the callbacks necessary to implement emulated coherent memory for surfaces. Add a flag to the gb_surface_create ioctl to indicate that surface memory should be coherent. Also bump the drm minor version to signal the availability of coherent surfaces. Signed-off-by: Thomas Hellstrom Reviewed-by: Deepak Rawat .../drm/vmwgfx/device_include/svga3d_surfacedefs.h | 233 +++++++++++- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 4 +- drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 395 ++++++++++++++++++++- include/uapi/drm/vmwgfx_drm.h | 4 +- 4 files changed, 629 insertions(+), 7 deletions(-) commit d58e3b087b76381ab8460a5bbfa6bd60047df860 Author: Thomas Hellstrom Date: Thu Mar 28 11:36:25 2019 +0100 drm/vmwgfx: Implement an infrastructure for read-coherent resources Similar to write-coherent resources, make sure that from the user-space point of view, GPU rendered contents is automatically available for reading by the CPU. Signed-off-by: Thomas Hellstrom Reviewed-by: Deepak Rawat drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 7 +- drivers/gpu/drm/vmwgfx/vmwgfx_page_dirty.c | 73 ++++++++++++++++-- drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | 103 +++++++++++++++++++++++++- drivers/gpu/drm/vmwgfx/vmwgfx_resource_priv.h | 2 + drivers/gpu/drm/vmwgfx/vmwgfx_validation.c | 3 +- 5 files changed, 177 insertions(+), 11 deletions(-) commit 86aeaa09f3dfc43c89ae45e62f9b1b7f705c90e4 Author: Thomas Hellstrom Date: Tue Mar 5 08:24:35 2019 +0100 drm/vmwgfx: Use an RBtree instead of linked list for MOB resources With emulated coherent memory we need to be able to quickly look up a resource from the MOB offset. Instead of traversing a linked list with O(n) worst case, use an RBtree with O(log n) worst case complexity. Signed-off-by: Thomas Hellstrom Reviewed-by: Deepak Rawat drivers/gpu/drm/vmwgfx/vmwgfx_bo.c | 5 +++-- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 10 +++++----- drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | 33 +++++++++++++++++++++++--------- 3 files changed, 32 insertions(+), 16 deletions(-) commit 93392217066d9fb5f05188d05afa9ea56829a61c Author: Thomas Hellstrom Date: Wed Mar 27 10:56:08 2019 +0100 drm/vmwgfx: Implement an infrastructure for write-coherent resources This infrastructure will, for coherent resources, make sure that from the user-space point of view, data written by the CPU is immediately automatically available to the GPU at resource validation time. Signed-off-by: Thomas Hellstrom Reviewed-by: Deepak Rawat drivers/gpu/drm/vmwgfx/Kconfig | 1 + drivers/gpu/drm/vmwgfx/Makefile | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_bo.c | 5 +- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 5 + drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 26 +- drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 1 - drivers/gpu/drm/vmwgfx/vmwgfx_page_dirty.c | 409 ++++++++++++++++++++++++++ drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | 57 ++++ drivers/gpu/drm/vmwgfx/vmwgfx_resource_priv.h | 11 + drivers/gpu/drm/vmwgfx/vmwgfx_validation.c | 71 +++++ drivers/gpu/drm/vmwgfx/vmwgfx_validation.h | 16 +- 11 files changed, 584 insertions(+), 20 deletions(-) commit 7a39f35ce43f96ff293cc90f845416d03566b14b Author: Thomas Hellstrom Date: Wed Feb 6 12:55:08 2019 +0100 drm/ttm: TTM fault handler helpers With the vmwgfx dirty tracking, the default TTM fault handler is not completely sufficient (vmwgfx need to modify the vma->vm_flags member, and also needs to restrict the number of prefaults). We also want to replicate the new ttm_bo_vm_reserve() functionality So start turning the TTM vm code into helpers: ttm_bo_vm_fault_reserved() and ttm_bo_vm_reserve(), and provide a default TTM fault handler for other drivers to use. Cc: "Christian König" Signed-off-by: Thomas Hellstrom Reviewed-by: "Christian König" #v1 drivers/gpu/drm/ttm/ttm_bo_vm.c | 163 +++++++++++++++++++++++++--------------- include/drm/ttm/ttm_bo_api.h | 10 +++ 2 files changed, 111 insertions(+), 62 deletions(-) commit 32d1f6985ceb6b9099bc9e02dc04e58660f28c16 Author: Thomas Hellstrom Date: Fri Oct 12 17:16:39 2018 +0200 drm/ttm: Allow the driver to provide the ttm struct vm_operations_struct Add a pointer to the struct vm_operations_struct in the bo_device, and assign that pointer to the default value currently used. The driver can then optionally modify that pointer and the new value can be used for each new vma created. Cc: "Christian König" Signed-off-by: Thomas Hellstrom Reviewed-by: Christian König drivers/gpu/drm/ttm/ttm_bo.c | 1 + drivers/gpu/drm/ttm/ttm_bo_vm.c | 6 +++--- include/drm/ttm/ttm_bo_driver.h | 6 ++++++ 3 files changed, 10 insertions(+), 3 deletions(-) commit 4fe51e9e7902b5724b618dadd9527b1bbf2b55cc Author: Thomas Hellstrom Date: Tue Mar 19 13:12:30 2019 +0100 mm: Add write-protect and clean utilities for address space ranges Add two utilities to a) write-protect and b) clean all ptes pointing into a range of an address space. The utilities are intended to aid in tracking dirty pages (either driver-allocated system memory or pci device memory). The write-protect utility should be used in conjunction with page_mkwrite() and pfn_mkwrite() to trigger write page-faults on page accesses. Typically one would want to use this on sparse accesses into large memory regions. The clean utility should be used to utilize hardware dirtying functionality and avoid the overhead of page-faults, typically on large accesses into small memory regions. The added file "as_dirty_helpers.c" is initially listed as maintained by VMware under our DRM driver. If somebody would like it elsewhere, that's of course no problem. Notable changes since RFC: - Added comments to help avoid the usage of these function for VMAs it's not intended for. We also do advisory checks on the vm_flags and warn on illegal usage. - Perform the pte modifications the same way softdirty does. - Add mmu_notifier range invalidation calls. - Add a config option so that this code is not unconditionally included. - Tell the mmu_gather code about pending tlb flushes. Cc: Andrew Morton Cc: Matthew Wilcox Cc: Will Deacon Cc: Peter Zijlstra Cc: Rik van Riel Cc: Minchan Kim Cc: Michal Hocko Cc: Huang Ying Cc: Souptick Joarder Cc: "Jérôme Glisse" Cc: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Thomas Hellstrom Reviewed-by: Ralph Campbell #v1 MAINTAINERS | 1 + include/linux/mm.h | 9 +- mm/Kconfig | 3 + mm/Makefile | 1 + mm/as_dirty_helpers.c | 300 ++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 313 insertions(+), 1 deletion(-) commit 29875a52915e09abb9703722054f6443cb492ccc Author: Thomas Hellstrom Date: Fri Oct 12 17:06:06 2018 +0200 mm: Add an apply_to_pfn_range interface This is basically apply_to_page_range with added functionality: Allocating missing parts of the page table becomes optional, which means that the function can be guaranteed not to error if allocation is disabled. Also passing of the closure struct and callback function becomes different and more in line with how things are done elsewhere. Finally we keep apply_to_page_range as a wrapper around apply_to_pfn_range The reason for not using the page-walk code is that we want to perform the page-walk on vmas pointing to an address space without requiring the mmap_sem to be held rather than on vmas belonging to a process with the mmap_sem held. Notable changes since RFC: Don't export apply_to_pfn range. Cc: Andrew Morton Cc: Matthew Wilcox Cc: Will Deacon Cc: Peter Zijlstra Cc: Rik van Riel Cc: Minchan Kim Cc: Michal Hocko Cc: Huang Ying Cc: Souptick Joarder Cc: "Jérôme Glisse" Cc: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Thomas Hellstrom Reviewed-by: Ralph Campbell #v1 include/linux/mm.h | 10 ++++ mm/memory.c | 135 ++++++++++++++++++++++++++++++++++++++++------------- 2 files changed, 113 insertions(+), 32 deletions(-) commit c9e5f41f732057097cd66ab7b01e7f7a2ff6c795 Author: Thomas Hellstrom Date: Fri Oct 12 16:58:12 2018 +0200 mm: Allow the [page|pfn]_mkwrite callbacks to drop the mmap_sem Driver fault callbacks are allowed to drop the mmap_sem when expecting long hardware waits to avoid blocking other mm users. Allow the mkwrite callbacks to do the same by returning early on VM_FAULT_RETRY. In particular we want to be able to drop the mmap_sem when waiting for a reservation object lock on a GPU buffer object. These locks may be held while waiting for the GPU. Cc: Andrew Morton Cc: Matthew Wilcox Cc: Will Deacon Cc: Peter Zijlstra Cc: Rik van Riel Cc: Minchan Kim Cc: Michal Hocko Cc: Huang Ying Cc: Souptick Joarder Cc: "Jérôme Glisse" Cc: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Thomas Hellstrom Reviewed-by: Ralph Campbell mm/memory.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit eb4ea0857c83d006b9c514929f1af547bc3319c6 Author: Angus Ainslie (Purism) Date: Mon Jun 17 07:52:13 2019 -0600 arm64: dts: fsl: librem5: Add a device tree for the Librem5 devkit This is for the development kit board for the Librem 5. The current level of support yields a working console and is able to boot userspace from the network or eMMC. Additional subsystems that are active : - Both USB ports - SD card socket - WiFi usdhc - WWAN modem - GNSS - GPIO keys - LEDs - gyro - magnetometer - touchscreen - pwm - backlight - haptic motor Signed-off-by: Angus Ainslie (Purism) Reviewed-by: Fabio Estevam Reviewed-by: Pavel Machek Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/Makefile | 1 + .../boot/dts/freescale/imx8mq-librem5-devkit.dts | 806 +++++++++++++++++++++ 2 files changed, 807 insertions(+) commit e126417ff1b172cba599d39e3e8583bf12e651eb Author: Angus Ainslie (Purism) Date: Mon Jun 17 07:52:15 2019 -0600 dt-bindings: arm: fsl: Add the imx8mq boards Add an entry for imx8mq based boards Signed-off-by: Angus Ainslie (Purism) Reviewed-by: Rob Herring Signed-off-by: Shawn Guo Documentation/devicetree/bindings/arm/fsl.yaml | 7 +++++++ 1 file changed, 7 insertions(+) commit ac013c7e2dc256dad465da539f7b072167770018 Author: Angus Ainslie (Purism) Date: Mon Jun 17 07:52:14 2019 -0600 dt-bindings: Add an entry for Purism SPC Add an entry for Purism, SPC Signed-off-by: Angus Ainslie (Purism) Reviewed-by: Rob Herring Signed-off-by: Shawn Guo Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 4251fa5fc3bbe3e1df99f60a738d367373ee335f Author: Thomas Hellstrom Date: Mon Mar 4 19:37:40 2019 +0100 drm/vmwgfx: Assign eviction priorities to resources TTM provides a means to assign eviction priorities to buffer object. This means that all buffer objects with a lower priority will be evicted first on memory pressure. Use this to make sure surfaces and in particular non-dirty surfaces are evicted first. Evicting in particular shaders, cotables and contexts imply a significant performance hit on vmwgfx, so make sure these resources are evicted last. Some buffer objects are sub-allocated in user-space which means we can have many resources attached to a single buffer object or resource. In that case the buffer object is given the highest priority of the attached resources. Signed-off-by: Thomas Hellstrom Reviewed-by: Deepak Rawat Reviewed-by: Emil Velikov drivers/gpu/drm/vmwgfx/vmwgfx_bo.c | 2 + drivers/gpu/drm/vmwgfx/vmwgfx_context.c | 4 ++ drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c | 13 +++-- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 72 +++++++++++++++++++++++++++ drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | 56 ++++++++++++++++----- drivers/gpu/drm/vmwgfx/vmwgfx_resource_priv.h | 2 + drivers/gpu/drm/vmwgfx/vmwgfx_shader.c | 8 ++- drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 4 ++ 8 files changed, 141 insertions(+), 20 deletions(-) commit 0e12248c68f3b667ca7899d1d92a3a9f54197a21 Author: Arnd Bergmann Date: Mon Jun 17 13:11:35 2019 +0200 clk: imx6q: fix section mismatch warning The imx6q_obtain_fixed_clk_hw lacks an __init marker, which leads to this otherwise harmless warning: WARNING: vmlinux.o(.text+0x495358): Section mismatch in reference from the function imx6q_obtain_fixed_clk_hw() to the function .init.text:imx_obtain_fixed_clock_hw() The function imx6q_obtain_fixed_clk_hw() references the function __init imx_obtain_fixed_clock_hw(). This is often because imx6q_obtain_fixed_clk_hw lacks a __init annotation or the annotation of imx_obtain_fixed_clock_hw is wrong. Fixes: 992b703b5b38 ("clk: imx6q: Switch to clk_hw based API") Signed-off-by: Arnd Bergmann Signed-off-by: Shawn Guo drivers/clk/imx/clk-imx6q.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 7802f88de0e1c3f81271850ecd0204b52dc4a45a Author: Peng Ma Date: Mon May 6 09:03:41 2019 +0000 arm64: dts: fsl: ls1028a: Add qDMA node Add the qDMA device tree nodes for LS1028A devices Signed-off-by: Peng Ma Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 781f9f30312625a13c999e2cff429989e2275e55 Author: Peng Ma Date: Mon May 6 09:03:44 2019 +0000 dt-bindings: fsl-qdma: Add LS1028A qDMA bindings Add LS1028A qDMA controller bindings to fsl-qdma bindings. Signed-off-by: Peng Ma Reviewed-by: Rob Herring Signed-off-by: Shawn Guo Documentation/devicetree/bindings/dma/fsl-qdma.txt | 1 + 1 file changed, 1 insertion(+) commit 9d767dc55208f19f81767a2aa775f36010a1fb14 Merge: 6e8e1acda6aa 83293386bc95 Author: Ulf Hansson Date: Tue Jun 18 14:06:56 2019 +0200 Merge branch 'fixes' into next commit 5666d896e838c974c535b3949353c83d68ce4384 Author: Greg Kroah-Hartman Date: Tue Jun 11 20:38:16 2019 +0200 mei: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Tomas Winkler Cc: Arnd Bergmann Cc: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/debugfs.c | 47 +++++++++++----------------------------------- drivers/misc/mei/main.c | 8 +------- drivers/misc/mei/mei_dev.h | 7 ++----- 3 files changed, 14 insertions(+), 48 deletions(-) commit d7ef4857d947a0c9ba26bfe02bac1629bda9f9a0 Author: Greg Kroah-Hartman Date: Tue Jun 11 20:41:07 2019 +0200 genwq: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Frank Haverkamp Cc: linux-kernel@vger.kernel.org Reviewed-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/misc/genwqe/card_base.c | 5 -- drivers/misc/genwqe/card_base.h | 2 +- drivers/misc/genwqe/card_debugfs.c | 165 +++++++------------------------------ drivers/misc/genwqe/card_dev.c | 6 +- 4 files changed, 32 insertions(+), 146 deletions(-) commit 7e9f02a7896bf12bddfa28c4fdc442aa6cc6eda1 Author: Greg Kroah-Hartman Date: Tue Jun 11 20:43:23 2019 +0200 mic: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Ashutosh Dixit Cc: linux-kernel@vger.kernel.org Reviewed-by: Arnd Bergmann Reviewed-by: Sudeep Dutt Signed-off-by: Greg Kroah-Hartman drivers/misc/mic/card/mic_debugfs.c | 18 ++---------------- drivers/misc/mic/cosm/cosm_debugfs.c | 4 ---- drivers/misc/mic/host/mic_debugfs.c | 4 ---- drivers/misc/mic/scif/scif_debugfs.c | 5 ----- drivers/misc/mic/vop/vop_debugfs.c | 4 ---- 5 files changed, 2 insertions(+), 33 deletions(-) commit 053cf51040ed0ebc56c1b58453ad502dc4d0927b Author: Greg Kroah-Hartman Date: Wed Jun 12 11:58:28 2019 +0200 fault-inject: clean up debugfs file creation logic There is no need to check the return value of a debugfs_create_file call, a caller should never change what they do depending on if debugfs is working properly or not, so remove the checks, simplifying the logic in the file a lot. Also fix up the error check for debugfs_create_dir() which was not returning NULL for an error, but rather a error pointer. Cc: linux-kernel@vger.kernel.org Reviewed-by: Akinobu Mita Signed-off-by: Greg Kroah-Hartman lib/fault-inject.c | 73 +++++++++++++++++++----------------------------------- 1 file changed, 26 insertions(+), 47 deletions(-) commit 9fd714cd7f4676e8ff3f840911a8d64cacbeab8b Author: Greg Kroah-Hartman Date: Wed Jun 12 17:35:34 2019 +0200 lib: dynamic_debug: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: linux-kernel@vger.kernel.org Acked-by: Jason Baron Signed-off-by: Greg Kroah-Hartman lib/dynamic_debug.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit 4eb293487d05a69862a4907ee944aa271ed49a4c Author: Masahiro Yamada Date: Thu Jun 13 10:55:32 2019 +0900 pinctrl: make pinconf.h self-contained This header uses 'bool', but it does not include any header by itself. So, it could cause unknown type name error, depending on the header include order, although probably has been included by someone else. Include to make it self-contained. Signed-off-by: Masahiro Yamada Signed-off-by: Linus Walleij include/linux/pinctrl/pinconf.h | 2 ++ 1 file changed, 2 insertions(+) commit 4a14abc4bbe58aa465f0f5599bf4c612cfeb367f Author: Greg Kroah-Hartman Date: Wed Jun 12 17:54:18 2019 +0200 cxl: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Because there's no need to check, also make the return value of the local debugfs_create_io_x64() call void, as no one ever did anything with the return value (as they did not need to.) And make the cxl_debugfs_* calls return void as no one was even checking their return value at all. Cc: linuxppc-dev@lists.ozlabs.org Acked-by: Andrew Donnellan Reviewed-by: Frederic Barrat Reviewed-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/misc/cxl/cxl.h | 15 ++++++--------- drivers/misc/cxl/debugfs.c | 36 +++++++++++------------------------- 2 files changed, 17 insertions(+), 34 deletions(-) commit f9d5de4064e57017b75cfed9c7cfdff73bb52681 Author: Greg Kroah-Hartman Date: Thu Jun 13 20:37:53 2019 +0200 thermal: tegra: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Zhang Rui Cc: Eduardo Valentin Cc: Daniel Lezcano Cc: Thierry Reding Cc: Jonathan Hunter Cc: Wei Ni Cc: Yangtao Li Cc: linux-pm@vger.kernel.org Acked-by: Thierry Reding Signed-off-by: Greg Kroah-Hartman drivers/thermal/tegra/soctherm.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit c008c6754c109fed660221e4d8b8194bbcd003ed Author: Greg Kroah-Hartman Date: Thu Jun 13 20:38:10 2019 +0200 thermal: intel_powerclamp: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Zhang Rui Cc: Eduardo Valentin Cc: Daniel Lezcano Cc: Finn Thain Cc: linux-pm@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Reviewed-by: Daniel Lezcano Signed-off-by: Greg Kroah-Hartman drivers/thermal/intel/intel_powerclamp.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit 72c9f26b583c54e89de386e0eb63398c07d95cfa Author: Greg Kroah-Hartman Date: Thu Jun 13 20:38:30 2019 +0200 thermal: intel: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Zhang Rui Cc: Eduardo Valentin Cc: linux-pm@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Reviewed-by: Daniel Lezcano Signed-off-by: Greg Kroah-Hartman drivers/thermal/intel/x86_pkg_temp_thermal.c | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) commit 45d0706ebf26384c97f29959a23636f896e5eaca Author: Chen-Yu Tsai Date: Fri May 3 11:29:42 2019 +0800 clk: sunxi-ng: sun8i-r: Use local parent references for CLK_FIXED_FACTOR With the new clk parenting code and CLK_FIXED_FACTOR_{HW,FW_NAME} macros, we can reference parents locally via pointers to struct clk_hw or DT clock-names. Convert existing CLK_FIXED_FACTOR definitions to either the _HW or _FW_NAME variant based on whether the parent clock is internal or external to the CCU. Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai drivers/clk/sunxi-ng/ccu-sun8i-r.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6e8e1acda6aab9638c15c085dbef1dc429c1e87e Author: Raul E Rangel Date: Mon Jun 17 14:10:14 2019 -0600 mmc: sdhci: Fix indenting on SDHCI_CTRL_8BITBUS Remove whitespace in front of SDHCI_CTRL_8BITBUS. The value is not part of SDHCI_CTRL_DMA_MASK. Signed-off-by: Raul E Rangel Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 707f601373aeaf967579564c67ae9701c5e6b11e Author: Chen-Yu Tsai Date: Fri May 3 18:08:18 2019 +0800 clk: sunxi-ng: v3s: Use local parent references for CLK_FIXED_FACTOR With the new clk parenting code and CLK_FIXED_FACTOR_{HW,FW_NAME} macros, we can reference parents locally via pointers to struct clk_hw or DT clock-names. Convert existing CLK_FIXED_FACTOR definitions to either the _HW or _FW_NAME variant based on whether the parent clock is internal or external to the CCU. Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai drivers/clk/sunxi-ng/ccu-sun8i-v3s.c | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) commit de23f0b757766d9fae59df97da6e8bdc5b231351 Author: Raul E Rangel Date: Mon Jun 17 14:10:13 2019 -0600 mmc: sdhci: sdhci-pci-o2micro: Check if controller supports 8-bit width The O2 controller supports 8-bit EMMC access. JESD84-B51 section A.6.3.a defines the bus testing procedure that `mmc_select_bus_width()` implements. This is used to determine the actual bus width of the eMMC. Signed-off-by: Raul E Rangel Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-pci-o2micro.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 3fccf2ed6f27e314ba4965cf455347b53fdf8d6b Author: Chen-Yu Tsai Date: Fri May 3 18:07:52 2019 +0800 clk: sunxi-ng: r40: Use local parent references for CLK_FIXED_FACTOR With the new clk parenting code and CLK_FIXED_FACTOR_{HW,FW_NAME} macros, we can reference parents locally via pointers to struct clk_hw or DT clock-names. Convert existing CLK_FIXED_FACTOR definitions to either the _HW or _FW_NAME variant based on whether the parent clock is internal or external to the CCU. Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai drivers/clk/sunxi-ng/ccu-sun8i-r40.c | 46 +++++++++++++++++++++++------------- 1 file changed, 29 insertions(+), 17 deletions(-) commit b28e3eb6325b932d61e3d0ff9ed98192370104ba Author: Chen-Yu Tsai Date: Fri May 3 18:07:10 2019 +0800 clk: sunxi-ng: h3: Use local parent references for CLK_FIXED_FACTOR With the new clk parenting code and CLK_FIXED_FACTOR_{HW,FW_NAME} macros, we can reference parents locally via pointers to struct clk_hw or DT clock-names. Convert existing CLK_FIXED_FACTOR definitions to either the _HW or _FW_NAME variant based on whether the parent clock is internal or external to the CCU. Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai drivers/clk/sunxi-ng/ccu-sun8i-h3.c | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) commit cdaf8388ea8eff982b5a501220788824cd04151e Author: Chen-Yu Tsai Date: Fri May 3 18:06:26 2019 +0800 clk: sunxi-ng: a33: Use local parent references for CLK_FIXED_FACTOR With the new clk parenting code and CLK_FIXED_FACTOR_{HW,FW_NAME} macros, we can reference parents locally via pointers to struct clk_hw or DT clock-names. Convert existing CLK_FIXED_FACTOR definitions to either the _HW or _FW_NAME variant based on whether the parent clock is internal or external to the CCU. Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai drivers/clk/sunxi-ng/ccu-sun8i-a33.c | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) commit 7a40e3d8696e7a48f1d729198ed2361ab4615cfd Author: Chen-Yu Tsai Date: Fri May 3 18:06:05 2019 +0800 clk: sunxi-ng: a23: Use local parent references for CLK_FIXED_FACTOR With the new clk parenting code and CLK_FIXED_FACTOR_{HW,FW_NAME} macros, we can reference parents locally via pointers to struct clk_hw or DT clock-names. Convert existing CLK_FIXED_FACTOR definitions to either the _HW or _FW_NAME variant based on whether the parent clock is internal or external to the CCU. Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai drivers/clk/sunxi-ng/ccu-sun8i-a23.c | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) commit 8b1dd564b9e3e8d1e6e02199638c1cefe560d68f Author: Chen-Yu Tsai Date: Fri May 3 18:05:35 2019 +0800 clk: sunxi-ng: a31: Use local parent references for CLK_FIXED_FACTOR With the new clk parenting code and CLK_FIXED_FACTOR_{HW,FW_NAME} macros, we can reference parents locally via pointers to struct clk_hw or DT clock-names. Convert existing CLK_FIXED_FACTOR definitions to either the _HW or _FW_NAME variant based on whether the parent clock is internal or external to the CCU. Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai drivers/clk/sunxi-ng/ccu-sun6i-a31.c | 39 +++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 14 deletions(-) commit 260311bfb383d28a9b8bf88489cc24175963b3e1 Author: Chen-Yu Tsai Date: Fri May 3 18:05:18 2019 +0800 clk: sunxi-ng: sun5i: Use local parent references for CLK_FIXED_FACTOR With the new clk parenting code and CLK_FIXED_FACTOR_{HW,FW_NAME} macros, we can reference parents locally via pointers to struct clk_hw or DT clock-names. Convert existing CLK_FIXED_FACTOR definitions to either the _HW or _FW_NAME variant based on whether the parent clock is internal or external to the CCU. Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai drivers/clk/sunxi-ng/ccu-sun5i.c | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) commit d1c924732bdf2710ce513d965d3ca2a4ff877ea7 Author: Chen-Yu Tsai Date: Fri May 3 18:02:31 2019 +0800 clk: sunxi-ng: a10: Use local parent references for CLK_FIXED_FACTOR With the new clk parenting code and CLK_FIXED_FACTOR_{HW,FW_NAME} macros, we can reference parents locally via pointers to struct clk_hw or DT clock-names. Convert existing CLK_FIXED_FACTOR definitions to either the _HW or _FW_NAME variant based on whether the parent clock is internal or external to the CCU. Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai drivers/clk/sunxi-ng/ccu-sun4i-a10.c | 39 +++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 14 deletions(-) commit 6873d20726563c5ee54b53ecbe232c929b32ea38 Author: Chen-Yu Tsai Date: Fri May 3 11:18:24 2019 +0800 clk: sunxi-ng: sun8i-r: Use local parent references for CLK_HW_INIT_* With the new clk parenting code and CLK_HW_INIT_* macros, we can reference parents locally via pointers to struct clk_hw or DT clock-names. Convert existing CLK_HW_INIT_* definitions to describe parents using either struct clk_hw pointers or clock-names from the device tree binding. For the AR100, this also allows us to merge the generic AR100 and the A83T specific one, which only differed in the global clock names for their parent clocks. The device tree bindings used the same name specifiers. Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai drivers/clk/sunxi-ng/ccu-sun8i-r.c | 65 +++++++++++++++----------------------- 1 file changed, 25 insertions(+), 40 deletions(-) commit 930944833550ff36c0154d8e18a410d158df26d7 Author: Chen-Yu Tsai Date: Fri May 3 11:21:56 2019 +0800 clk: sunxi-ng: switch to of_clk_hw_register() for registering clks Commit 89a5ddcc799d ("clk: Add of_clk_hw_register() API for early clk drivers") introduces a new API for registering clks, which allows the user to directly specify a device node, even if there is no struct device attached to it. The device node is used for local DT clock-names matching. Switch to of_clk_hw_register() so that local DT clock-names matching works. Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai drivers/clk/sunxi-ng/ccu_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8b13a48b891c7c855e9f3a401d91391a946f4ca7 Author: Chen-Yu Tsai Date: Fri May 3 11:58:20 2019 +0800 clk: fixed-factor: Add CLK_FIXED_FACTOR_FW_NAME for DT clock-names parent With the new clk parenting code, clk_init_data was expanded to include .parent_data, for clk drivers to specify parents using a combination of device tree clock-names, pointers to struct clk_hw, device tree clocks, and/or fallback global clock names. Add a new macro, CLK_FIXED_FACTOR_FW_NAME, that takes a string to match a clock-names entry in the device tree to specify the clock parent. Signed-off-by: Chen-Yu Tsai include/linux/clk-provider.h | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 1bef004e2680511ecbb6b5db3954fba430501ecb Author: Chen-Yu Tsai Date: Mon May 6 10:43:16 2019 +0800 clk: fixed-factor: Add CLK_FIXED_FACTOR_HWS which takes list of struct clk_hw * With the new clk parenting code, clk_init_data was expanded to include .parent_hws, for clk drivers to directly reference parents by clk_hw. Add a new macro, CLK_FIXED_FACTOR_HWS, that can take an array of pointers to struct clk_hw, instead of a string, as its parent. Taking an array instead of a direct pointer allows the reuse of the array for multiple clks, rather than having one compound literal with the same contents allocated for each clk declaration. Signed-off-by: Chen-Yu Tsai include/linux/clk-provider.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit d7b15114aba956ca395ec5cc28f68fe861ffc208 Author: Chen-Yu Tsai Date: Mon Apr 22 07:19:46 2019 +0800 clk: fixed-factor: Add CLK_FIXED_FACTOR_HW which takes clk_hw pointer as parent With the new clk parenting code, clk_init_data was expanded to include .parent_hws, for clk drivers to directly reference parents by clk_hw. Add a new macro, CLK_FIXED_FACTOR_HW, that can take a struct clk_hw pointer, instead of a string, as its parent. Signed-off-by: Chen-Yu Tsai include/linux/clk-provider.h | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 13933109dff0a5abbfc3980304c6c21c90829810 Author: Chen-Yu Tsai Date: Mon Apr 22 07:17:50 2019 +0800 clk: Add CLK_HW_INIT_PARENT_DATA macro using .parent_data With the new clk parenting code, struct clk_init_data was expanded to include .parent_data, for clk drivers that have parents referenced using a combination of device tree clock-names, clock indices, and/or struct clk_hw pointers. Add a new macro that can take a list of struct clk_parent_data for drivers to use. Signed-off-by: Chen-Yu Tsai include/linux/clk-provider.h | 9 +++++++++ 1 file changed, 9 insertions(+) commit 2d6b4f33e637bf51c50c536966a19e94a59f3212 Author: Chen-Yu Tsai Date: Fri May 3 11:49:03 2019 +0800 clk: Add CLK_HW_INIT_FW_NAME macro using .fw_name in .parent_data With the new clk parenting code, clk_init_data was expanded to include .parent_data, for clk drivers that have parents referenced using a combination of device tree clock-names, clock indices, and/or clk_hw pointers. Add a CLK_HW_INIT macro for specifying a single parent from the device tree using .fw_name in struct clk_parent_data. Signed-off-by: Chen-Yu Tsai include/linux/clk-provider.h | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 99600fd47eafd20b9ba6e04562bb2fcc48475344 Author: Chen-Yu Tsai Date: Mon Apr 22 07:15:05 2019 +0800 clk: Add CLK_HW_INIT_* macros using .parent_hws With the new clk parenting code, struct clk_init_data was expanded to include .parent_hws, for clk drivers to directly list parents by pointing to their respective struct clk_hw's. Add macros that can take either one single struct clk_hw *, or an array of them, for drivers to use. A special CLK_HW_INIT_HWS macro is included, which takes an array of struct clk_hw *, but sets .num_parents to 1. This variant is to allow the reuse of the array, instead of having a compound literal allocated for each clk sharing the same parent. Signed-off-by: Chen-Yu Tsai include/linux/clk-provider.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 2d156b78ce8febf15cd58a025d7d9d7b7577126a Author: Chen-Yu Tsai Date: Fri May 3 11:15:09 2019 +0800 clk: Fix debugfs clk_possible_parents for clks without parent string names Following the commit fc0c209c147f ("clk: Allow parents to be specified without string names"), the parent name string is not always populated. Instead, fetch the parents clk_core struct using the appropriate helper, and read its name directly. If that fails, go through the possible sources of parent names. The order in which they are used is different from how parents are looked up, with the global name having precedence over local fw_name and indices. This makes more sense as a) the parent_maps structure does not differentiate between legacy global names and fallback global names, and b) global names likely provide more information than local fw_names. Fixes: fc0c209c147f ("clk: Allow parents to be specified without string names") Signed-off-by: Chen-Yu Tsai drivers/clk/clk.c | 44 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 3 deletions(-) commit 99a934443d9282b92f721e5d0c6ec5bdee10fbcb Merge: f24483a64e42 0f7b79a44e7d Author: Ulf Hansson Date: Tue Jun 18 13:38:49 2019 +0200 Merge branch 'fixes' into next commit 607ea69d2621b08b03a5c87de099be68a4e2bcf7 Author: kbuild test robot Date: Tue Jun 18 19:23:51 2019 +0800 serial: 8250: pericom_do_set_divisor can be static Fixes: 6bf4e42f1d19 ("serial: 8250: Add support for higher baud rates to Pericom chips") Signed-off-by: kbuild test robot Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f24483a64e425aa20178d4760f7d0349db84aeb7 Merge: 791463ba1ae9 65dade604407 Author: Ulf Hansson Date: Tue Jun 18 13:32:07 2019 +0200 Merge branch 'fixes' into next commit 9e35f49cf7037c3fe3fe4d51aec6d492741cddbe Author: Biju Das Date: Wed Jun 12 15:20:55 2019 +0100 arm64: dts: renesas: r8a774a1: Add dynamic power coefficient Describe the dynamic power coefficient of A57 and A53 CPUs. Based on work by Gaku Inami and others. Signed-off-by: Biju Das Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a774a1.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 06a928fb5805d1bb80a87c557ac487b916adc50d Author: Biju Das Date: Wed Jun 12 15:20:54 2019 +0100 arm64: dts: renesas: r8a774a1: Create thermal zone to support IPA Setup a thermal zone driven by SoC temperature sensor. Create passive trip points and bind them to CPUFreq cooling device that supports power extension. Based on work by Dien Pham for r8a7796 SoC. Signed-off-by: Biju Das Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a774a1.dtsi | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) commit 5f5249497bd7ed65d90cac36c3c3dabcda2903dd Author: Biju Das Date: Wed Jun 12 15:20:53 2019 +0100 arm64: dts: renesas: r8a774a1: Add CPU capacity-dmips-mhz Set the capacity-dmips-mhz for RZ/G2M(r8a774a1) SoC, that is based on dhrystone. Based on work done by Gaku Inami for r8a7796 SoC. The average dhrystone result for 5 iterations is as below: r8a774a1 SoC (CA57x2 + CA53x4) CPU max-freq dhrystone --------------------------------- CA57 1500 MHz 11428571 lps/s CA53 1200 MHz 5000000 lps/s From this, CPU capacity-dmips-mhz for CA57 and CA53 are calculated as follows: r8a774a1 SoC CA57 : 1024 / (11428571 / 1500) * (11428571 / 1500) = 1024 CA53 : 1024 / (11428571 / 1500) * ( 5000000 / 1200) = 560 Since each CPUs have different max frequencies, the final CPU capacities of A53 scaled by the above difference is as below $ cat /sys/devices/system/cpu/cpu*/cpu_capacity 1024 1024 448 448 448 448 Signed-off-by: Biju Das Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a774a1.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit 7b996955e514bd3639419c1e725bc3b69c96bd05 Author: Biju Das Date: Wed Jun 12 15:20:52 2019 +0100 arm64: dts: renesas: r8a774a1: Add CPU topology on r8a774a1 SoC This patch adds the "cpu-map" into r8a774a1 composed of multi-cluster. This definition is used to parse the cpu topology. Based on work by Gaku Inami for r8a7796 SoC. Signed-off-by: Biju Das Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a774a1.dtsi | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 1485b6353a9940c5ac5d3f90880207ac95b4e350 Author: Fabrizio Castro Date: Fri Jun 14 14:14:35 2019 +0100 arm64: dts: renesas: hihope-common: Add LEDs support This patch adds LEDs support to the HiHope RZ/G2[MN] Main Board common device tree. Signed-off-by: Fabrizio Castro Reviewed-by: Simon Horman Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/hihope-common.dtsi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 3ba27637d8019d5bfea4ca25302b0d08bb6a1736 Author: Biju Das Date: Fri Jun 14 15:51:09 2019 +0100 arm64: dts: renesas: hihope-common: Enable USB3.0 This patch enables USB3.0 host/peripheral device node for the HiHope RZ/G2M board. Signed-off-by: Biju Das Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/hihope-common.dtsi | 29 ++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 4951dc0178ba144619e9c20ed71f7ff006282bbf Author: Chris Wilson Date: Mon Jun 17 11:09:17 2019 +0100 drm/i915/guc: Reduce verbosity on log overflows If the user is clearing the log buffer too slowly, we overflow. As this is an expected condition, and the driver tries to handle it, reduce the error message down to a notice. Michal mentioned that another cause would be incorrect reset handling, so we don't want to lose the notification entirely. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110817 Signed-off-by: Chris Wilson Cc: Michal Wajdeczko Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190617100917.13110-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_guc_log.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 9d99cc49a483d4e73fbc1b5ec27621d67e773ecd Author: Sean Christopherson Date: Tue May 7 12:18:03 2019 -0700 KVM: VMX: Drop hv_timer_armed from 'struct loaded_vmcs' ... now that it is fully redundant with the pin controls shadow. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 1 - arch/x86/kvm/vmx/vmcs.h | 1 - arch/x86/kvm/vmx/vmx.c | 8 ++------ 3 files changed, 2 insertions(+), 8 deletions(-) commit 469debdb8be5814c71c146ce8e21ae7363ae644d Author: Sean Christopherson Date: Tue May 7 12:18:02 2019 -0700 KVM: nVMX: Preset *DT exiting in vmcs02 when emulating UMIP KVM dynamically toggles SECONDARY_EXEC_DESC to intercept (a subset of) instructions that are subject to User-Mode Instruction Prevention, i.e. VMCS.SECONDARY_EXEC_DESC == CR4.UMIP when emulating UMIP. Preset the VMCS control when preparing vmcs02 to avoid unnecessarily VMWRITEs, e.g. KVM will clear VMCS.SECONDARY_EXEC_DESC in prepare_vmcs02_early() and then set it in vmx_set_cr4(). Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit de0286b7884a6a3309e299dda876810faa281547 Author: Sean Christopherson Date: Tue May 7 12:18:01 2019 -0700 KVM: nVMX: Preserve last USE_MSR_BITMAPS when preparing vmcs02 KVM dynamically toggles the CPU_BASED_USE_MSR_BITMAPS execution control for nested guests based on whether or not both L0 and L1 want to pass through the same MSRs to L2. Preserve the last used value from vmcs02 so as to avoid multiple VMWRITEs to (re)set/(re)clear the bit on nested VM-Entry. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 3af80fec6e7fe2e89aa131a0ebdb90be780668f8 Author: Sean Christopherson Date: Tue May 7 12:18:00 2019 -0700 KVM: VMX: Explicitly initialize controls shadow at VMCS allocation Or: Don't re-initialize vmcs02's controls on every nested VM-Entry. VMWRITEs to the major VMCS controls are deceptively expensive. Intel CPUs with VMCS caching (Westmere and later) also optimize away consistency checks on VM-Entry, i.e. skip consistency checks if the relevant fields have not changed since the last successful VM-Entry (of the cached VMCS). Because uops are a precious commodity, uCode's dirty VMCS field tracking isn't as precise as software would prefer. Notably, writing any of the major VMCS fields effectively marks the entire VMCS dirty, i.e. causes the next VM-Entry to perform all consistency checks, which consumes several hundred cycles. Zero out the controls' shadow copies during VMCS allocation and use the optimized setter when "initializing" controls. While this technically affects both non-nested and nested virtualization, nested virtualization is the primary beneficiary as avoid VMWRITEs when prepare vmcs02 allows hardware to optimizie away consistency checks. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 10 +++++----- arch/x86/kvm/vmx/vmx.c | 12 +++++++----- arch/x86/kvm/vmx/vmx.h | 5 ----- 3 files changed, 12 insertions(+), 15 deletions(-) commit ae81d08993cbc515e3181ee6bebce5cd878133f2 Author: Sean Christopherson Date: Tue May 7 12:17:59 2019 -0700 KVM: nVMX: Don't reset VMCS controls shadow on VMCS switch ... now that the shadow copies are per-VMCS. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 5 ----- arch/x86/kvm/vmx/vmx.h | 4 ---- 2 files changed, 9 deletions(-) commit 09e226cf07e6bf85d885afa43fabc02b88dc1652 Author: Sean Christopherson Date: Tue May 7 12:17:58 2019 -0700 KVM: nVMX: Shadow VMCS controls on a per-VMCS basis ... to pave the way for not preserving the shadow copies across switches between vmcs01 and vmcs02, and eventually to avoid VMWRITEs to vmcs02 when the desired value is unchanged across nested VM-Enters. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/vmcs.h | 9 +++++++++ arch/x86/kvm/vmx/vmx.h | 22 +++++++--------------- 2 files changed, 16 insertions(+), 15 deletions(-) commit fe7f895dae4fa5725c0459b316b3e9ee814d2583 Author: Sean Christopherson Date: Tue May 7 12:17:57 2019 -0700 KVM: VMX: Shadow VMCS secondary execution controls Prepare to shadow all major control fields on a per-VMCS basis, which allows KVM to avoid costly VMWRITEs when switching between vmcs01 and vmcs02. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 12 ++++++------ arch/x86/kvm/vmx/vmx.c | 40 ++++++++++++++++++++-------------------- arch/x86/kvm/vmx/vmx.h | 2 ++ 3 files changed, 28 insertions(+), 26 deletions(-) commit 2183f5645ae7e074ed1777f3de9a782dd23db248 Author: Sean Christopherson Date: Tue May 7 12:17:56 2019 -0700 KVM: VMX: Shadow VMCS primary execution controls Prepare to shadow all major control fields on a per-VMCS basis, which allows KVM to avoid VMREADs when switching between vmcs01 and vmcs02, and more importantly can eliminate costly VMWRITEs to controls when preparing vmcs02. Shadowing exec controls also saves a VMREAD when opening virtual INTR/NMI windows, yay... Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 14 ++++++-------- arch/x86/kvm/vmx/vmx.c | 38 +++++++++++++++----------------------- arch/x86/kvm/vmx/vmx.h | 2 ++ 3 files changed, 23 insertions(+), 31 deletions(-) commit c5f2c76643b612ffa47e4660c8f44deba619b068 Author: Sean Christopherson Date: Tue May 7 12:17:55 2019 -0700 KVM: VMX: Shadow VMCS pin controls Prepare to shadow all major control fields on a per-VMCS basis, which allows KVM to avoid costly VMWRITEs when switching between vmcs01 and vmcs02. Shadowing pin controls also allows a future patch to remove the per-VMCS 'hv_timer_armed' flag, as the shadow copy is a superset of said flag. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 3 ++- arch/x86/kvm/vmx/vmx.c | 10 ++++------ arch/x86/kvm/vmx/vmx.h | 2 ++ 3 files changed, 8 insertions(+), 7 deletions(-) commit 70f932ecdfe6b593ef6784d55d2c096aafac1510 Author: Sean Christopherson Date: Tue May 7 12:17:54 2019 -0700 KVM: VMX: Add builder macros for shadowing controls ... to pave the way for shadowing all (five) major VMCS control fields without massive amounts of error prone copy+paste+modify. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/vmx.h | 100 ++++++++++++++++++------------------------------- 1 file changed, 36 insertions(+), 64 deletions(-) commit c075c3e49d7ae3599106f1af53352268030469db Author: Sean Christopherson Date: Tue May 7 12:17:53 2019 -0700 KVM: nVMX: Use adjusted pin controls for vmcs02 KVM provides a module parameter to allow disabling virtual NMI support to simplify testing (hardware *without* virtual NMI support is hard to come by but it does have users). When preparing vmcs02, use the accessor for pin controls to ensure that the module param is respected for nested guests. Opportunistically swap the order of applying L0's and L1's pin controls to better align with other controls and to prepare for a future patche that will ignore L1's, but not L0's, preemption timer flag. Fixes: d02fcf50779ec ("kvm: vmx: Allow disabling virtual NMI support") Cc: Paolo Bonzini Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 5 ++--- arch/x86/kvm/vmx/vmx.c | 2 +- arch/x86/kvm/vmx/vmx.h | 1 + 3 files changed, 4 insertions(+), 4 deletions(-) commit c7554efc83355150c91d8097f26a3c99d58ad53d Author: Sean Christopherson Date: Tue May 7 09:06:40 2019 -0700 KVM: nVMX: Copy PDPTRs to/from vmcs12 only when necessary Per Intel's SDM: ... the logical processor uses PAE paging if CR0.PG=1, CR4.PAE=1 and IA32_EFER.LME=0. A VM entry to a guest that uses PAE paging loads the PDPTEs into internal, non-architectural registers based on the setting of the "enable EPT" VM-execution control. and: [GUEST_PDPTR] values are saved into the four PDPTE fields as follows: - If the "enable EPT" VM-execution control is 0 or the logical processor was not using PAE paging at the time of the VM exit, the values saved are undefined. In other words, if EPT is disabled or the guest isn't using PAE paging, then the PDPTRS aren't consumed by hardware on VM-Entry and are loaded with junk on VM-Exit. From a nesting perspective, all of the above hold true, i.e. KVM can effectively ignore the VMCS PDPTRs. E.g. KVM already loads the PDPTRs from memory when nested EPT is disabled (see nested_vmx_load_cr3()). Because KVM intercepts setting CR4.PAE, there is no danger of consuming a stale value or crushing L1's VMWRITEs regardless of whether L1 intercepts CR4.PAE. The vmcs12's values are unchanged up until the VM-Exit where L2 sets CR4.PAE, i.e. L0 will see the new PAE state on the subsequent VM-Entry and propagate the PDPTRs from vmcs12 to vmcs02. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) commit bf03d4f9334728bf7c8ffc7de787df48abd6340e Author: Paolo Bonzini Date: Thu Jun 6 18:52:44 2019 +0200 KVM: x86: introduce is_pae_paging Checking for 32-bit PAE is quite common around code that fiddles with the PDPTRs. Add a function to compress all checks into a single invocation. Reviewed-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 3 +-- arch/x86/kvm/vmx/vmx.c | 4 ++-- arch/x86/kvm/x86.c | 8 ++++---- arch/x86/kvm/x86.h | 5 +++++ 4 files changed, 12 insertions(+), 8 deletions(-) commit c27e5b0d139b8728abd6b087cb0d3b2eae6ab079 Author: Sean Christopherson Date: Tue May 7 09:06:39 2019 -0700 KVM: nVMX: Don't update GUEST_BNDCFGS if it's clean in HV eVMCS L1 is responsible for dirtying GUEST_GRP1 if it writes GUEST_BNDCFGS. Cc: Vitaly Kuznetsov Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 699a1ac214328569d203b9c6bfc22903d5642dee Author: Sean Christopherson Date: Tue May 7 09:06:37 2019 -0700 KVM: nVMX: Update vmcs12 for MSR_IA32_DEBUGCTLMSR when it's written KVM unconditionally intercepts WRMSR to MSR_IA32_DEBUGCTLMSR. In the unlikely event that L1 allows L2 to write L1's MSR_IA32_DEBUGCTLMSR, but but saves L2's value on VM-Exit, update vmcs12 during L2's WRMSR so as to eliminate the need to VMREAD the value from vmcs02 on nested VM-Exit. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 4 +--- arch/x86/kvm/vmx/vmx.c | 8 ++++++++ 2 files changed, 9 insertions(+), 3 deletions(-) commit de70d279709efb7d0b0c0dce2eb398fc43c4b7f6 Author: Sean Christopherson Date: Tue May 7 09:06:36 2019 -0700 KVM: nVMX: Update vmcs12 for SYSENTER MSRs when they're written For L2, KVM always intercepts WRMSR to SYSENTER MSRs. Update vmcs12 in the WRMSR handler so that they don't need to be (re)read from vmcs02 on every nested VM-Exit. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 7 ++++--- arch/x86/kvm/vmx/vmx.c | 6 ++++++ 2 files changed, 10 insertions(+), 3 deletions(-) commit 142e4be77bc629802599d7c94f413759bca1c185 Author: Sean Christopherson Date: Tue May 7 09:06:35 2019 -0700 KVM: nVMX: Update vmcs12 for MSR_IA32_CR_PAT when it's written As alluded to by the TODO comment, KVM unconditionally intercepts writes to the PAT MSR. In the unlikely event that L1 allows L2 to write L1's PAT directly but saves L2's PAT on VM-Exit, update vmcs12 when L2 writes the PAT. This eliminates the need to VMREAD the value from vmcs02 on VM-Exit as vmcs12 is already up to date in all situations. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 4 ---- arch/x86/kvm/vmx/vmx.c | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) commit a49700b66e3523947f0e19c761891cc7c510d9fb Author: Sean Christopherson Date: Tue May 7 09:06:34 2019 -0700 KVM: nVMX: Don't speculatively write APIC-access page address If nested_get_vmcs12_pages() fails to map L1's APIC_ACCESS_ADDR into L2, then it disables SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES in vmcs02. In other words, the APIC_ACCESS_ADDR in vmcs02 is guaranteed to be written with the correct value before being consumed by hardware, drop the unneessary VMWRITE. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 8 -------- 1 file changed, 8 deletions(-) commit ca2f5466f854184f1753ecb526f0e21a353a25e7 Author: Sean Christopherson Date: Tue May 7 09:06:33 2019 -0700 KVM: nVMX: Don't speculatively write virtual-APIC page address The VIRTUAL_APIC_PAGE_ADDR in vmcs02 is guaranteed to be updated before it is consumed by hardware, either in nested_vmx_enter_non_root_mode() or via the KVM_REQ_GET_VMCS12_PAGES callback. Avoid an extra VMWRITE and only stuff a bad value into vmcs02 when mapping vmcs12's address fails. This also eliminates the need for extra comments to connect the dots between prepare_vmcs02_early() and nested_get_vmcs12_pages(). Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) commit 73cb85568433feadb79e963bf2efba9b3e9ae3df Author: Sean Christopherson Date: Tue May 7 09:06:26 2019 -0700 KVM: nVMX: Don't dump VMCS if virtual APIC page can't be mapped ... as a malicious userspace can run a toy guest to generate invalid virtual-APIC page addresses in L1, i.e. flood the kernel log with error messages. Fixes: 690908104e39d ("KVM: nVMX: allow tests to use bad virtual-APIC page address") Cc: stable@vger.kernel.org Cc: Paolo Bonzini Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 3 --- 1 file changed, 3 deletions(-) commit 8ef863e67a89c72b5af893a1214f6c35a5f456f8 Author: Sean Christopherson Date: Tue May 7 09:06:32 2019 -0700 KVM: nVMX: Don't reread VMCS-agnostic state when switching VMCS When switching between vmcs01 and vmcs02, there is no need to update state tracking for values that aren't tied to any particular VMCS as the per-vCPU values are already up-to-date (vmx_switch_vmcs() can only be called when the vCPU is loaded). Avoiding the update eliminates a RDMSR, and potentially a RDPKRU and posted-interrupt update (cmpxchg64() and more). Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 2 +- arch/x86/kvm/vmx/vmx.c | 18 +++++++++++++----- arch/x86/kvm/vmx/vmx.h | 1 + 3 files changed, 15 insertions(+), 6 deletions(-) commit 13b964a29d66333c1957dbd51f2c9e138c546f7a Author: Sean Christopherson Date: Tue May 7 09:06:31 2019 -0700 KVM: nVMX: Don't "put" vCPU or host state when switching VMCS When switching between vmcs01 and vmcs02, KVM isn't actually switching between guest and host. If guest state is already loaded (the likely, if not guaranteed, case), keep the guest state loaded and manually swap the loaded_cpu_state pointer after propagating saved host state to the new vmcs0{1,2}. Avoiding the switch between guest and host reduces the latency of switching between vmcs01 and vmcs02 by several hundred cycles, and reduces the roundtrip time of a nested VM by upwards of 1000 cycles. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 23 +++++++++++++++++++- arch/x86/kvm/vmx/vmx.c | 53 ++++++++++++++++++++++++++--------------------- arch/x86/kvm/vmx/vmx.h | 3 ++- 3 files changed, 53 insertions(+), 26 deletions(-) commit b464f57e133d8c751ca1fb4af039c808b873876b Author: Paolo Bonzini Date: Fri Jun 7 19:00:14 2019 +0200 KVM: VMX: simplify vmx_prepare_switch_to_{guest,host} vmx->loaded_cpu_state can only be NULL or equal to vmx->loaded_vmcs, so change it to a bool. Because the direction of the bool is now the opposite of vmx->guest_msrs_dirty, change the direction of vmx->guest_msrs_dirty so that they match. Finally, do not imply that MSRs have to be reloaded when vmx->guest_state_loaded is false; instead, set vmx->guest_msrs_ready to false explicitly in vmx_prepare_switch_to_host. Cc: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/vmx.c | 26 +++++++++++++------------- arch/x86/kvm/vmx/vmx.h | 18 ++++++++++++------ 2 files changed, 25 insertions(+), 19 deletions(-) commit 4d6c989284ca61176f60148ba3f3c70650ee1aff Author: Sean Christopherson Date: Tue May 7 09:06:30 2019 -0700 KVM: nVMX: Don't rewrite GUEST_PML_INDEX during nested VM-Entry Emulation of GUEST_PML_INDEX for a nested VMM is a bit weird. Because L0 flushes the PML on every VM-Exit, the value in vmcs02 at the time of VM-Enter is a constant -1, regardless of what L1 thinks/wants. Fixes: 09abe32002665 ("KVM: nVMX: split pieces of prepare_vmcs02() to prepare_vmcs02_early()") Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit c538d57f6726022f9810bfbb52c4696cfdaf10a7 Author: Sean Christopherson Date: Tue May 7 09:06:29 2019 -0700 KVM: nVMX: Write ENCLS-exiting bitmap once per vmcs02 KVM doesn't yet support SGX virtualization, i.e. writes a constant value to ENCLS_EXITING_BITMAP so that it can intercept ENCLS and inject a #UD. Fixes: 0b665d3040281 ("KVM: vmx: Inject #UD for SGX ENCLS instruction in guest") Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3b013a2972d5bc344d6eaa8f24fdfe268211e45f Author: Sean Christopherson Date: Tue May 7 09:06:28 2019 -0700 KVM: nVMX: Always sync GUEST_BNDCFGS when it comes from vmcs01 If L1 does not set VM_ENTRY_LOAD_BNDCFGS, then L1's BNDCFGS value must be propagated to vmcs02 since KVM always runs with VM_ENTRY_LOAD_BNDCFGS when MPX is supported. Because the value effectively comes from vmcs01, vmcs02 must be updated even if vmcs12 is clean. Fixes: 62cf9bd8118c4 ("KVM: nVMX: Fix emulation of VM_ENTRY_LOAD_BNDCFGS") Cc: stable@vger.kernel.org Cc: Liran Alon Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit d28f4290b53a157191ed9991ad05dffe9e8c0c89 Author: Sean Christopherson Date: Tue May 7 09:06:27 2019 -0700 KVM: VMX: Always signal #GP on WRMSR to MSR_IA32_CR_PAT with bad value The behavior of WRMSR is in no way dependent on whether or not KVM consumes the value. Fixes: 4566654bb9be9 ("KVM: vmx: Inject #GP on invalid PAT CR") Cc: stable@vger.kernel.org Cc: Nadav Amit Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/vmx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit b1346ab2afbe64e7fb4ebc45efe5dd69367c9308 Author: Paolo Bonzini Date: Thu Jun 6 17:24:00 2019 +0200 KVM: nVMX: Rename prepare_vmcs02_*_full to prepare_vmcs02_*_rare These function do not prepare the entire state of the vmcs02, only the rarely needed parts. Rename them to make this clearer. Reviewed-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 7952d769c29caac4fb51c1f0f0c12434c805b127 Author: Sean Christopherson Date: Tue May 7 08:36:29 2019 -0700 KVM: nVMX: Sync rarely accessed guest fields only when needed Many guest fields are rarely read (or written) by VMMs, i.e. likely aren't accessed between runs of a nested VMCS. Delay pulling rarely accessed guest fields from vmcs02 until they are VMREAD or until vmcs12 is dirtied. The latter case is necessary because nested VM-Entry will consume all manner of fields when vmcs12 is dirty, e.g. for consistency checks. Note, an alternative to synchronizing all guest fields on VMREAD would be to read *only* the field being accessed, but switching VMCS pointers is expensive and odds are good if one guest field is being accessed then others will soon follow, or that vmcs12 will be dirtied due to a VMWRITE (see above). And the full synchronization results in slightly cleaner code. Note, although GUEST_PDPTRs are relevant only for a 32-bit PAE guest, they are accessed quite frequently for said guests, and a separate patch is in flight to optimize away GUEST_PDTPR synchronziation for non-PAE guests. Skipping rarely accessed guest fields reduces the latency of a nested VM-Exit by ~200 cycles. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 140 +++++++++++++++++++++++++++++++++++++++------- arch/x86/kvm/vmx/vmx.h | 7 +++ 2 files changed, 127 insertions(+), 20 deletions(-) commit e2174295b41d8c9115ab246a630d4630724a2cd5 Author: Sean Christopherson Date: Tue May 7 08:36:28 2019 -0700 KVM: nVMX: Add helpers to identify shadowed VMCS fields So that future optimizations related to shadowed fields don't need to define their own switch statement. Add a BUILD_BUG_ON() to ensure at least one of the types (RW vs RO) is defined when including vmcs_shadow_fields.h (guess who keeps mistyping SHADOW_FIELD_RO as SHADOW_FIELD_R0). Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 71 ++++++++++++++++++++--------------- arch/x86/kvm/vmx/vmcs_shadow_fields.h | 4 ++ 2 files changed, 44 insertions(+), 31 deletions(-) commit 3731905ef28fc1a9240d1532b2a9efbaea205dc0 Author: Sean Christopherson Date: Tue May 7 08:36:27 2019 -0700 KVM: nVMX: Use descriptive names for VMCS sync functions and flags Nested virtualization involves copying data between many different types of VMCSes, e.g. vmcs02, vmcs12, shadow VMCS and eVMCS. Rename a variety of functions and flags to document both the source and destination of each sync. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 28 ++++++++++++++-------------- arch/x86/kvm/vmx/nested.h | 2 +- arch/x86/kvm/vmx/vmx.c | 4 ++-- arch/x86/kvm/vmx/vmx.h | 2 +- 4 files changed, 18 insertions(+), 18 deletions(-) commit f4f8316d2ad5f93ff0ec829a893db0728b9041bd Author: Sean Christopherson Date: Tue May 7 08:36:26 2019 -0700 KVM: nVMX: Lift sync_vmcs12() out of prepare_vmcs12() ... to make it more obvious that sync_vmcs12() is invoked on all nested VM-Exits, e.g. hiding sync_vmcs12() in prepare_vmcs12() makes it appear that guest state is NOT propagated to vmcs12 for a normal VM-Exit. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 1c6f0b47fb59d1674a6ba91b0ce58dfbfc5a76de Author: Sean Christopherson Date: Tue May 7 08:36:25 2019 -0700 KVM: nVMX: Track vmcs12 offsets for shadowed VMCS fields The vmcs12 fields offsets are constant and known at compile time. Store the associated offset for each shadowed field to avoid the costly lookup in vmcs_field_to_offset() when copying between vmcs12 and the shadow VMCS. Avoiding the costly lookup reduces the latency of copying by ~100 cycles in each direction. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 96 +++++++++++++++++++---------------- arch/x86/kvm/vmx/vmcs12.h | 57 +++++++-------------- arch/x86/kvm/vmx/vmcs_shadow_fields.h | 74 +++++++++++++-------------- 3 files changed, 108 insertions(+), 119 deletions(-) commit b643780562af5378ef7fe731c65b8f93e49c59c6 Author: Sean Christopherson Date: Tue May 7 08:36:24 2019 -0700 KVM: nVMX: Intercept VMWRITEs to GUEST_{CS,SS}_AR_BYTES VMMs frequently read the guest's CS and SS AR bytes to detect 64-bit mode and CPL respectively, but effectively never write said fields once the VM is initialized. Intercepting VMWRITEs for the two fields saves ~55 cycles in copy_shadow_to_vmcs12(). Because some Intel CPUs, e.g. Haswell, drop the reserved bits of the guest access rights fields on VMWRITE, exposing the fields to L1 for VMREAD but not VMWRITE leads to inconsistent behavior between L1 and L2. On hardware that drops the bits, L1 will see the stripped down value due to reading the value from hardware, while L2 will see the full original value as stored by KVM. To avoid such an inconsistency, emulate the behavior on all CPUS, but only for intercepted VMWRITEs so as to avoid introducing pointless latency into copy_shadow_to_vmcs12(), e.g. if the emulation were added to vmcs12_write_any(). Since the AR_BYTES emulation is done only for intercepted VMWRITE, if a future patch (re)exposed AR_BYTES for both VMWRITE and VMREAD, then KVM would end up with incosistent behavior on pre-Haswell hardware, e.g. KVM would drop the reserved bits on intercepted VMWRITE, but direct VMWRITE to the shadow VMCS would not drop the bits. Add a WARN in the shadow field initialization to detect any attempt to expose an AR_BYTES field without updating vmcs12_write_any(). Note, emulation of the AR_BYTES reserved bit behavior is based on a patch[1] from Jim Mattson that applied the emulation to all writes to vmcs12 so that live migration across different generations of hardware would not introduce divergent behavior. But given that live migration of nested state has already been enabled, that ship has sailed (not to mention that no sane VMM will be affected by this behavior). [1] https://patchwork.kernel.org/patch/10483321/ Cc: Jim Mattson Cc: Liran Alon Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 15 +++++++++++++++ arch/x86/kvm/vmx/vmcs_shadow_fields.h | 4 ++-- 2 files changed, 17 insertions(+), 2 deletions(-) commit fadcead00c3e167255ac3016b6c3855cf639cca5 Author: Sean Christopherson Date: Tue May 7 08:36:23 2019 -0700 KVM: nVMX: Intercept VMWRITEs to read-only shadow VMCS fields Allowing L1 to VMWRITE read-only fields is only beneficial in a double nesting scenario, e.g. no sane VMM will VMWRITE VM_EXIT_REASON in normal non-nested operation. Intercepting RO fields means KVM doesn't need to sync them from the shadow VMCS to vmcs12 when running L2. The obvious downside is that L1 will VM-Exit more often when running L3, but it's likely safe to assume most folks would happily sacrifice a bit of L3 performance, which may not even be noticeable in the grande scheme, to improve L2 performance across the board. Not intercepting fields tagged read-only also allows for additional optimizations, e.g. marking GUEST_{CS,SS}_AR_BYTES as SHADOW_FIELD_RO since those fields are rarely written by a VMMs, but read frequently. When utilizing a shadow VMCS with asymmetric R/W and R/O bitmaps, fields that cause VM-Exit on VMWRITE but not VMREAD need to be propagated to the shadow VMCS during VMWRITE emulation, otherwise a subsequence VMREAD from L1 will consume a stale value. Note, KVM currently utilizes asymmetric bitmaps when "VMWRITE any field" is not exposed to L1, but only so that it can reject the VMWRITE, i.e. propagating the VMWRITE to the shadow VMCS is a new requirement, not a bug fix. Eliminating the copying of RO fields reduces the latency of nested VM-Entry (copy_shadow_to_vmcs12()) by ~100 cycles (plus 40-50 cycles if/when the AR_BYTES fields are exposed RO). Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 72 ++++++++++++++++++++--------------------------- 1 file changed, 31 insertions(+), 41 deletions(-) commit 95b5a48c4f2b7755702c2993f9986e4a45d85e45 Author: Sean Christopherson Date: Fri Apr 19 22:50:59 2019 -0700 KVM: VMX: Handle NMIs, #MCs and async #PFs in common irqs-disabled fn Per commit 1b6269db3f833 ("KVM: VMX: Handle NMIs before enabling interrupts and preemption"), NMIs are handled directly in vmx_vcpu_run() to "make sure we handle NMI on the current cpu, and that we don't service maskable interrupts before non-maskable ones". The other exceptions handled by complete_atomic_exit(), e.g. async #PF and #MC, have similar requirements, and are located there to avoid extra VMREADs since VMX bins hardware exceptions and NMIs into a single exit reason. Clean up the code and eliminate the vaguely named complete_atomic_exit() by moving the interrupts-disabled exception and NMI handling into the existing handle_external_intrs() callback, and rename the callback to a more appropriate name. Rename VMexit handlers throughout so that the atomic and non-atomic counterparts have similar names. In addition to improving code readability, this also ensures the NMI handler is run with the host's debug registers loaded in the unlikely event that the user is debugging NMIs. Accuracy of the last_guest_tsc field is also improved when handling NMIs (and #MCs) as the handler will run after updating said field. Signed-off-by: Sean Christopherson [Naming cleanups. - Paolo] Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 2 +- arch/x86/kvm/svm.c | 4 ++-- arch/x86/kvm/vmx/vmx.c | 33 ++++++++++++++++++--------------- arch/x86/kvm/x86.c | 2 +- 4 files changed, 22 insertions(+), 19 deletions(-) commit 165072b089e5af32c2693ab900d5fb5d41e3f293 Author: Sean Christopherson Date: Fri Apr 19 22:50:58 2019 -0700 KVM: x86: Move kvm_{before,after}_interrupt() calls to vendor code VMX can conditionally call kvm_{before,after}_interrupt() since KVM always uses "ack interrupt on exit" and therefore explicitly handles interrupts as opposed to blindly enabling irqs. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/svm.c | 2 ++ arch/x86/kvm/vmx/vmx.c | 4 ++++ arch/x86/kvm/x86.c | 2 -- 3 files changed, 6 insertions(+), 2 deletions(-) commit 2342080cd6752fd40958f5a2aee0fb496ae92dce Author: Sean Christopherson Date: Fri Apr 19 22:50:57 2019 -0700 KVM: VMX: Store the host kernel's IDT base in a global variable Although the kernel may use multiple IDTs, KVM should only ever see the "real" IDT, e.g. the early init IDT is long gone by the time KVM runs and the debug stack IDT is only used for small windows of time in very specific flows. Before commit a547c6db4d2f1 ("KVM: VMX: Enable acknowledge interupt on vmexit"), the kernel's IDT base was consumed by KVM only when setting constant VMCS state, i.e. to set VMCS.HOST_IDTR_BASE. Because constant host state is done once per vCPU, there was ostensibly no need to cache the kernel's IDT base. When support for "ack interrupt on exit" was introduced, KVM added a second consumer of the IDT base as handling already-acked interrupts requires directly calling the interrupt handler, i.e. KVM uses the IDT base to find the address of the handler. Because interrupts are a fast path, KVM cached the IDT base to avoid having to VMREAD HOST_IDTR_BASE. Presumably, the IDT base was cached on a per-vCPU basis simply because the existing code grabbed the IDT base on a per-vCPU (VMCS) basis. Note, all post-boot IDTs use the same handlers for external interrupts, i.e. the "ack interrupt on exit" use of the IDT base would be unaffected even if the cached IDT somehow did not match the current IDT. And as for the original use case of setting VMCS.HOST_IDTR_BASE, if any of the above analysis is wrong then KVM has had a bug since the beginning of time since KVM has effectively been caching the IDT at vCPU creation since commit a8b732ca01c ("[PATCH] kvm: userspace interface"). Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/vmx.c | 12 +++++++----- arch/x86/kvm/vmx/vmx.h | 1 - 2 files changed, 7 insertions(+), 6 deletions(-) commit 49def500e5eca40c73da9bad9799e9fab885996f Author: Sean Christopherson Date: Fri Apr 19 22:50:56 2019 -0700 KVM: VMX: Read cached VM-Exit reason to detect external interrupt Generic x86 code invokes the kvm_x86_ops external interrupt handler on all VM-Exits regardless of the actual exit type. Use the already-cached EXIT_REASON to determine if the VM-Exit was due to an interrupt, thus avoiding an extra VMREAD (to query VM_EXIT_INTR_INFO) for all other types of VM-Exit. In addition to avoiding the extra VMREAD, checking the EXIT_REASON instead of VM_EXIT_INTR_INFO makes it more obvious that vmx_handle_external_intr() is called for all VM-Exits, e.g. someone unfamiliar with the flow might wonder under what condition(s) VM_EXIT_INTR_INFO does not contain a valid interrupt, which is simply not possible since KVM always runs with "ack interrupt on exit". WARN once if VM_EXIT_INTR_INFO doesn't contain a valid interrupt on an EXTERNAL_INTERRUPT VM-Exit, as such a condition would indicate a hardware bug. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/vmcs.h | 6 +++++ arch/x86/kvm/vmx/vmx.c | 62 ++++++++++++++++++++++++++----------------------- 2 files changed, 39 insertions(+), 29 deletions(-) commit 2ea72039808d50c909c2eb00eaebfaaaa743927a Author: Paolo Bonzini Date: Thu Jun 6 14:57:25 2019 +0200 kvm: nVMX: small cleanup in handle_exception The reason for skipping handling of NMI and #MC in handle_exception is the same, namely they are handled earlier by vmx_complete_atomic_exit. Calling the machine check handler (which just returns 1) is misleading, don't do it. Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/vmx.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit beb8d93b3e423043e079ef3dda19dad7b28467a8 Author: Sean Christopherson Date: Fri Apr 19 22:50:55 2019 -0700 KVM: VMX: Fix handling of #MC that occurs during VM-Entry A previous fix to prevent KVM from consuming stale VMCS state after a failed VM-Entry inadvertantly blocked KVM's handling of machine checks that occur during VM-Entry. Per Intel's SDM, a #MC during VM-Entry is handled in one of three ways, depending on when the #MC is recognoized. As it pertains to this bug fix, the third case explicitly states EXIT_REASON_MCE_DURING_VMENTRY is handled like any other VM-Exit during VM-Entry, i.e. sets bit 31 to indicate the VM-Entry failed. If a machine-check event occurs during a VM entry, one of the following occurs: - The machine-check event is handled as if it occurred before the VM entry: ... - The machine-check event is handled after VM entry completes: ... - A VM-entry failure occurs as described in Section 26.7. The basic exit reason is 41, for "VM-entry failure due to machine-check event". Explicitly handle EXIT_REASON_MCE_DURING_VMENTRY as a one-off case in vmx_vcpu_run() instead of binning it into vmx_complete_atomic_exit(). Doing so allows vmx_vcpu_run() to handle VMX_EXIT_REASONS_FAILED_VMENTRY in a sane fashion and also simplifies vmx_complete_atomic_exit() since VMCS.VM_EXIT_INTR_INFO is guaranteed to be fresh. Fixes: b060ca3b2e9e7 ("kvm: vmx: Handle VMLAUNCH/VMRESUME failure properly") Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Reviewed-by: Jim Mattson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/vmx.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) commit 73f624f47c495d7129abef4b7031ed371cc7abb6 Author: Paolo Bonzini Date: Thu Jun 6 14:32:59 2019 +0200 KVM: x86: move MSR_IA32_POWER_CTL handling to common code Make it available to AMD hosts as well, just in case someone is trying to use an Intel processor's CPUID setup. Suggested-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/vmx/vmx.c | 6 ------ arch/x86/kvm/vmx/vmx.h | 2 -- arch/x86/kvm/x86.c | 6 ++++++ 4 files changed, 7 insertions(+), 8 deletions(-) commit 4cb8b1163586addc9e1f4eebe232a11534c24d4a Author: Wei Yang Date: Sun Mar 31 19:17:23 2019 -0700 kvm: x86: offset is ensure to be in range In function apic_mmio_write(), the offset has been checked in: * apic_mmio_in_range() * offset & 0xf These two ensures offset is in range [0x010, 0xff0]. Signed-off-by: Wei Yang Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ee171d2f39d60c6405dc21a0aaa766cad2c9c43e Author: Wei Yang Date: Sun Mar 31 19:17:22 2019 -0700 kvm: x86: use same convention to name kvm_lapic_{set,clear}_vector() apic_clear_vector() is the counterpart of kvm_lapic_set_vector(), while they have different naming convention. Rename it and move together to arch/x86/kvm/lapic.h. Also fix one typo in comment by hand. Signed-off-by: Wei Yang Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 17 +++++++---------- arch/x86/kvm/lapic.h | 5 +++++ 2 files changed, 12 insertions(+), 10 deletions(-) commit 7d2296bfa52cc9b63063935dd21ca5fa0d790754 Author: Wei Yang Date: Sun Mar 31 19:17:21 2019 -0700 kvm: x86: check kvm_apic_sw_enabled() is enough On delivering irq to apic, we iterate on vcpu and do the check like this: kvm_apic_present(vcpu) kvm_lapic_enabled(vpu) kvm_apic_present(vcpu) && kvm_apic_sw_enabled(vcpu->arch.apic) Since we have already checked kvm_apic_present(), it is reasonable to replace kvm_lapic_enabled() with kvm_apic_sw_enabled(). Signed-off-by: Wei Yang Signed-off-by: Paolo Bonzini arch/x86/kvm/irq_comm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2d5ba19bdfef4dd06add144eb04287ee98409f75 Author: Marcelo Tosatti Date: Mon Jun 3 19:52:44 2019 -0300 kvm: x86: add host poll control msrs Add an MSRs which allows the guest to disable host polling (specifically the cpuidle-haltpoll, when performing polling in the guest, disables host side polling). Signed-off-by: Marcelo Tosatti Signed-off-by: Paolo Bonzini Documentation/virtual/kvm/msr.txt | 9 +++++++++ arch/x86/include/asm/kvm_host.h | 2 ++ arch/x86/include/uapi/asm/kvm_para.h | 2 ++ arch/x86/kvm/Kconfig | 1 + arch/x86/kvm/cpuid.c | 3 ++- arch/x86/kvm/x86.c | 23 +++++++++++++++++++++++ 6 files changed, 39 insertions(+), 1 deletion(-) commit fdb28619a8f033c13f5d9b9e8b5536bb6e68a2c3 Author: Eugene Korenevsky Date: Thu Jun 6 00:19:16 2019 +0300 kvm: vmx: segment limit check: use access length There is an imperfection in get_vmx_mem_address(): access length is ignored when checking the limit. To fix this, pass access length as a function argument. The access length is usually obvious since it is used by callers after get_vmx_mem_address() call, but for vmread/vmwrite it depends on the state of 64-bit mode. Signed-off-by: Eugene Korenevsky Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 28 ++++++++++++++++------------ arch/x86/kvm/vmx/nested.h | 2 +- arch/x86/kvm/vmx/vmx.c | 3 ++- 3 files changed, 19 insertions(+), 14 deletions(-) commit c1a9acbc5295e278d788e9f7510f543bc9864fa2 Author: Eugene Korenevsky Date: Thu Jun 6 00:17:39 2019 +0300 kvm: vmx: fix limit checking in get_vmx_mem_address() Intel SDM vol. 3, 5.3: The processor causes a general-protection exception (or, if the segment is SS, a stack-fault exception) any time an attempt is made to access the following addresses in a segment: - A byte at an offset greater than the effective limit - A word at an offset greater than the (effective-limit – 1) - A doubleword at an offset greater than the (effective-limit – 3) - A quadword at an offset greater than the (effective-limit – 7) Therefore, the generic limit checking error condition must be exn = (off > limit + 1 - access_len) = (off + access_len - 1 > limit) but not exn = (off + access_len > limit) as for now. Also avoid integer overflow of `off` at 32-bit KVM by casting it to u64. Note: access length is currently sizeof(u64) which is incorrect. This will be fixed in the subsequent patch. Signed-off-by: Eugene Korenevsky Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a87f2d3a6eadabad3ce3a8a57c1dd04c14b856ba Author: Like Xu Date: Thu Jun 6 09:18:45 2019 +0800 KVM: x86: Add Intel CPUID.1F cpuid emulation support Add support to expose Intel V2 Extended Topology Enumeration Leaf for some new systems with multiple software-visible die within each package. Because unimplemented and unexposed leaves should be explicitly reported as zero, there is no need to limit cpuid.0.eax to the maximum value of feature configuration but limit it to the highest leaf implemented in the current code. A single clamping seems sufficient and cheaper. Co-developed-by: Xiaoyao Li Signed-off-by: Xiaoyao Li Signed-off-by: Like Xu Signed-off-by: Paolo Bonzini arch/x86/kvm/cpuid.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 1fc5d19472f77fc44f0c5b6852b18416f1db3fea Author: Liran Alon Date: Thu Jun 6 01:54:47 2019 +0300 KVM: x86: Use DR_TRAP_BITS instead of hard-coded 15 Make all code consistent with kvm_deliver_exception_payload() by using appropriate symbolic constant instead of hard-coded number. Reviewed-by: Nikita Leshenko Reviewed-by: Krish Sadhukhan Signed-off-by: Liran Alon Signed-off-by: Paolo Bonzini arch/x86/kvm/emulate.c | 2 +- arch/x86/kvm/vmx/vmx.c | 4 ++-- arch/x86/kvm/x86.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 0bdd0047ec949661b61692198dc1773d99694d1c Author: Kefeng Wang Date: Tue Jun 18 17:15:05 2019 +0800 irqchip/mbigen: Stop printing kernel addresses After commit ad67b74d2469d9b8 ("printk: hash addresses printed with %p"), it will print "____ptrval____" instead of actual addresses when mbigen create domain fails, Hisilicon MBIGEN-V2 HISI0152:00: Failed to create mbi-gen@(____ptrval____) irqdomain Hisilicon MBIGEN-V2: probe of HISI0152:00 failed with error -12 dev_xxx() helper contains the device info, HISI0152:00, which stands for mbigen ACPI HID and its UID, we can identify the failing probed mbigen, so just remove the printing "mgn_chip->base", and also add missing "\n". Signed-off-by: Kefeng Wang Reviewed-by: Hanjun Guo Signed-off-by: Marc Zyngier drivers/irqchip/irq-mbigen.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c1324171a9d1771d3610cd13c952b981d52317df Author: Fabrizio Castro Date: Tue Jun 11 14:06:39 2019 +0100 clk: renesas: r8a774a1: Add TMU clock This patch adds the TMU clocks to the R8A774A1 SoC. Signed-off-by: Fabrizio Castro Reviewed-by: Simon Horman Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r8a774a1-cpg-mssr.c | 5 +++++ 1 file changed, 5 insertions(+) commit fa59290e3d23565bd0924d73fcb0ea87f42c9414 Author: Jacopo Mondi Date: Thu Jun 6 16:22:08 2019 +0200 clk: renesas: r8a77995: Add CMM clocks Add clock definitions for CMM units on Renesas R-Car D3. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r8a77995-cpg-mssr.c | 2 ++ 1 file changed, 2 insertions(+) commit 08911c4a8e28e89914559f80ecd74483cf2020c5 Author: Jacopo Mondi Date: Thu Jun 6 16:22:07 2019 +0200 clk: renesas: r8a77990: Add CMM clocks Add clock definitions for CMM units on Renesas R-Car E3. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r8a77990-cpg-mssr.c | 2 ++ 1 file changed, 2 insertions(+) commit 140444003c6bcd8bcaf9e6637b637d656f5c70a6 Author: Jacopo Mondi Date: Thu Jun 6 16:22:06 2019 +0200 clk: renesas: r8a77965: Add CMM clocks Add clock definitions for CMM units on Renesas R-Car M3-N. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r8a77965-cpg-mssr.c | 3 +++ 1 file changed, 3 insertions(+) commit 00c7cd3f130a45582783af318450c80d294ffb29 Author: Jacopo Mondi Date: Thu Jun 6 16:22:05 2019 +0200 clk: renesas: r8a7795: Add CMM clocks Add clock definitions for CMM units on Renesas R-Car H3. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r8a7795-cpg-mssr.c | 4 ++++ 1 file changed, 4 insertions(+) commit 1bcbe7300815e91fef18ee905b04f65490ad38c9 Author: Anson Huang Date: Fri Jun 14 16:07:47 2019 +0800 soc: imx8: Fix potential kernel dump in error path When SoC's revision value is 0, SoC driver will print out "unknown" in sysfs's revision node, this "unknown" is a static string which can NOT be freed, this will caused below kernel dump in later error path which calls kfree: kernel BUG at mm/slub.c:3942! Internal error: Oops - BUG: 0 [#1] PREEMPT SMP Modules linked in: CPU: 2 PID: 1 Comm: swapper/0 Not tainted 5.2.0-rc4-next-20190611-00023-g705146c-dirty #2197 Hardware name: NXP i.MX8MQ EVK (DT) pstate: 60000005 (nZCv daif -PAN -UAO) pc : kfree+0x170/0x1b0 lr : imx8_soc_init+0xc0/0xe4 sp : ffff00001003bd10 x29: ffff00001003bd10 x28: ffff00001121e0a0 x27: ffff000011482000 x26: ffff00001117068c x25: ffff00001121e100 x24: ffff000011482000 x23: ffff000010fe2b58 x22: ffff0000111b9ab0 x21: ffff8000bd9dfba0 x20: ffff0000111b9b70 x19: ffff7e000043f880 x18: 0000000000001000 x17: ffff000010d05fa0 x16: ffff0000122e0000 x15: 0140000000000000 x14: 0000000030360000 x13: ffff8000b94b5bb0 x12: 0000000000000038 x11: ffffffffffffffff x10: ffffffffffffffff x9 : 0000000000000003 x8 : ffff8000b9488147 x7 : ffff00001003bc00 x6 : 0000000000000000 x5 : 0000000000000003 x4 : 0000000000000003 x3 : 0000000000000003 x2 : b8793acd604edf00 x1 : ffff7e000043f880 x0 : ffff7e000043f888 Call trace: kfree+0x170/0x1b0 imx8_soc_init+0xc0/0xe4 do_one_initcall+0x58/0x1b8 kernel_init_freeable+0x1cc/0x288 kernel_init+0x10/0x100 ret_from_fork+0x10/0x18 This patch fixes this potential kernel dump when a chip's revision is "unknown", it is done by checking whether the revision space can be freed. Fixes: a7e26f356ca1 ("soc: imx: Add generic i.MX8 SoC driver") Signed-off-by: Anson Huang Signed-off-by: Shawn Guo drivers/soc/imx/soc-imx8.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d29fcf7078bc8be2b6366cbd4418265b53c94fac Author: Kiruthika Varadarajan Date: Tue Jun 18 08:39:06 2019 +0000 usb: gadget: ether: Fix race between gether_disconnect and rx_submit On spin lock release in rx_submit, gether_disconnect get a chance to run, it makes port_usb NULL, rx_submit access NULL port USB, hence null pointer crash. Fixed by releasing the lock in rx_submit after port_usb is used. Fixes: 2b3d942c4878 ("usb ethernet gadget: split out network core") Cc: Signed-off-by: Kiruthika Varadarajan Signed-off-by: Felipe Balbi drivers/usb/gadget/function/u_ether.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e70b3f5da00119e057b7faa557753fee7f786f17 Author: EJ Hsu Date: Fri May 10 19:02:10 2019 +0800 usb: gadget: storage: Remove warning message This change is to fix below warning message in following scenario: usb_composite_setup_continue: Unexpected call When system tried to enter suspend, the fsg_disable() will be called to disable fsg driver and send a signal to fsg_main_thread. However, at this point, the fsg_main_thread has already been frozen and can not respond to this signal. So, this signal will be pended until fsg_main_thread wakes up. Once system resumes from suspend, fsg_main_thread will detect a signal pended and do some corresponding action (in handle_exception()). Then, host will send some setup requests (get descriptor, set configuration...) to UDC driver trying to enumerate this device. During the handling of "set configuration" request, it will try to sync up with fsg_main_thread by sending a signal (which is the same as the signal sent by fsg_disable) to it. In a similar manner, once the fsg_main_thread receives this signal, it will call handle_exception() to handle the request. However, if the fsg_main_thread wakes up from suspend a little late and "set configuration" request from Host arrives a little earlier, fsg_main_thread might come across the request from "set configuration" when it handles the signal from fsg_disable(). In this case, it will handle this request as well. So, when fsg_main_thread tries to handle the signal sent from "set configuration" later, there will nothing left to do and warning message "Unexpected call" is printed. Acked-by: Alan Stern Signed-off-by: EJ Hsu Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_mass_storage.c | 21 +++++++++++++++------ drivers/usb/gadget/function/storage_common.h | 1 + 2 files changed, 16 insertions(+), 6 deletions(-) commit 729dcffd1ed319c9738456543f382d0801e768b8 Author: Anurag Kumar Vulisha Date: Fri May 10 12:37:28 2019 +0530 usb: dwc3: gadget: Add support for disabling U1 and U2 entries Gadget applications may have a requirement to disable the U1 and U2 entry based on the usecase. Below are few usecases where the disabling U1/U2 entries may be possible. Usecase 1: When combining dwc3 with an redriver for a USB Type-C device solution, it sometimes have problems with leaving U1/U2 for certain hosts, resulting in link training errors and reconnects. For this U1/U2 state entries may be avoided. Usecase 2: When performing performance benchmarking on mass storage gadget the U1 and U2 entries can be disabled. Usecase 3: When periodic transfers like ISOC transfers are used with bInterval of 1 which doesn't require the link to enter into U1 or U2 state entry (since ping is issued from host for every uframe interval). In this case the U1 and U2 entry can be disabled. Disablement of U1/U2 can be done by setting U1DevExitLat and U2DevExitLat values to 0 in the BOS descriptor. Host on seeing 0 value for U1DevExitLat and U2DevExitLat, it doesn't send SET_SEL requests to the gadget. There may be some hosts which may send SET_SEL requests even after seeing 0 in the UxDevExitLat of BOS descriptor. To aviod U1/U2 entries for these type of hosts, dwc3 controller can be programmed to reject those U1/U2 requests by not enabling ACCEPTUxENA bits in DCTL register. This patch updates the same. Signed-off-by: Anurag Kumar Vulisha Signed-off-by: Claus H. Stovgaard Signed-off-by: Felipe Balbi drivers/usb/dwc3/core.c | 4 ++++ drivers/usb/dwc3/core.h | 4 ++++ drivers/usb/dwc3/ep0.c | 9 ++++++++- drivers/usb/dwc3/gadget.c | 20 ++++++++++++++++++++ drivers/usb/dwc3/gadget.h | 6 ++++++ 5 files changed, 42 insertions(+), 1 deletion(-) commit 4ed9890c4c44d2ead7b57ad65425e3fbe9b9d42a Author: Anurag Kumar Vulisha Date: Fri May 10 12:37:27 2019 +0530 usb: gadget: send usb_gadget as an argument in get_config_params Passing struct usb_gadget * as an extra argument in get_config_params makes gadget drivers to easily update the U1DevExitLat & U2DevExitLat values based on the values passed from the device tree. This patch does the same Signed-off-by: Anurag Kumar Vulisha Signed-off-by: Felipe Balbi drivers/usb/gadget/composite.c | 2 +- include/linux/usb/gadget.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) commit 34cc761bdcc84fa7b9c5fd4e1f8548df6979f194 Author: Anurag Kumar Vulisha Date: Fri May 10 12:37:26 2019 +0530 doc: dt: bindings: usb: dwc3: Update entries for disabling U1 and U2 This patch updates the documentation with the information related to the quirks that needs to be added for disabling the link entering into the U1 and U2 states Reviewed-by: Rob Herring Signed-off-by: Anurag Kumar Vulisha Signed-off-by: Felipe Balbi Documentation/devicetree/bindings/usb/dwc3.txt | 2 ++ 1 file changed, 2 insertions(+) commit 4d20a6107050b45da976e28dc23274eb9ff1c242 Author: Kefeng Wang Date: Sat May 25 19:58:08 2019 +0800 usb: dwc3: qcom: Use of_clk_get_parent_count() Use of_clk_get_parent_count() instead of open coding. Signed-off-by: Kefeng Wang Signed-off-by: Felipe Balbi drivers/usb/dwc3/dwc3-qcom.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit dc1b5d9aed1794b5a1c6b0da46e372cc09974cbc Author: Enric Balletbo i Serra Date: Thu Jun 13 17:01:07 2019 +0200 usb: dwc3: Fix core validation in probe, move after clocks are enabled The required clocks needs to be enabled before the first register access. After commit fe8abf332b8f ("usb: dwc3: support clocks and resets for DWC3 core"), this happens when the dwc3_core_is_valid function is called, but the mentioned commit adds that call in the wrong place, before the clocks are enabled. So, move that call after the clk_bulk_enable() to ensure the clocks are enabled and the reset deasserted. I detected this while, as experiment, I tried to move the clocks and resets from the glue layer to the DWC3 core on a Samsung Chromebook Plus. That was not detected before because, in most cases, the glue layer initializes SoC-specific things and then populates the child "snps,dwc3" with those clocks already enabled. Fixes: b873e2d0ea1ef ("usb: dwc3: Do core validation early on probe") Signed-off-by: Enric Balletbo i Serra Signed-off-by: Felipe Balbi drivers/usb/dwc3/core.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 7f5d6a4696170ca7394d9dcecd5a54ebe2b9a067 Author: Lee Jones Date: Mon Jun 17 13:51:05 2019 +0100 usb: dwc3: qcom: Improve error handling dwc3_qcom_clk_init() is called with of_count_phandle_with_args() as an argument. If of_count_phandle_with_args() returns an error, the number of clocks will be a negative value and will lead to undefined behaviour. Ensure we check for an error before attempting to blindly use the value. Signed-off-by: Lee Jones Reviewed-by: Bjorn Andersson Signed-off-by: Felipe Balbi drivers/usb/dwc3/dwc3-qcom.c | 3 +++ 1 file changed, 3 insertions(+) commit a6e456209d088df31eacfa877d40194c755ca153 Author: Lee Jones Date: Mon Jun 17 13:51:04 2019 +0100 usb: dwc3: qcom: Start USB in 'host mode' on the SDM845 When booting with Device Tree, the current default boot configuration table option, the request to boot via 'host mode' comes from the 'dr_mode' property. A property of the same name can be used inside ACPI tables too. However it is missing from the SDM845's ACPI tables so we have to supply this information using Platform Device Properties instead. This does not change the behaviour of any currently supported devices. The property is only set on ACPI enabled platforms, thus for H/W booting DT, unless a 'dr_mode' property is present, the default is still OTG (On-The-Go) as per [0]. Any new ACPI devices added will also be able to over-ride this implementation by providing a 'dr_mode' property in their ACPI tables. In cases where 'dr_mode' is omitted from the tables AND 'host mode' should not be the default (very unlikely), then we will have to add some way of choosing between them at run time - most likely by ACPI HID. [0] Documentation/devicetree/bindings/usb/generic.txt Signed-off-by: Lee Jones Reviewed-by: Bjorn Andersson Signed-off-by: Felipe Balbi drivers/usb/dwc3/dwc3-qcom.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 2bc02355f8ba2c1f108ec8b16a673b467a17228c Author: Lee Jones Date: Mon Jun 17 13:51:03 2019 +0100 usb: dwc3: qcom: Add support for booting with ACPI In Linux, the DWC3 core exists as its own independent platform device. Thus when describing relationships in Device Tree, the current default boot configuration table option, the DWC3 core often resides as a child of the platform specific node. Both of which are given their own address space descriptions and the drivers can be mostly agnostic to each other. However, other Operating Systems have taken a more monolithic approach, which is evident in the configuration ACPI tables for the Qualcomm Snapdragon SDM850, where all DWC3 (core and platform) components are described under a single IO memory region. To ensure successful booting using the supplied ACPI tables, we need to devise a way to chop up the address regions provided and subsequently register the DWC3 core with the resultant information, which is precisely what this patch aims to achieve. Signed-off-by: Lee Jones Reviewed-by: Bjorn Andersson Signed-off-by: Felipe Balbi drivers/usb/dwc3/Kconfig | 2 +- drivers/usb/dwc3/dwc3-qcom.c | 206 +++++++++++++++++++++++++++++++++++++------ 2 files changed, 179 insertions(+), 29 deletions(-) commit 8bc529b25354d4ed1dcd3d3663ada5775e7acaec Author: Lee Jones Date: Mon Jun 17 13:51:02 2019 +0100 soc: qcom: geni: Add support for ACPI When booting with ACPI as the active set of configuration tables, all; clocks, regulators, pin functions ect are expected to be at their ideal values/levels/rates, thus the associated frameworks are unavailable. Ensure calls to these APIs are shielded when ACPI is enabled. Signed-off-by: Lee Jones Acked-by: Ard Biesheuvel Signed-off-by: Felipe Balbi drivers/soc/qcom/qcom-geni-se.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) commit ad408a1596b45868e38d0504f2ec1d5fb06f17d4 Author: Guenter Roeck Date: Wed May 29 13:54:43 2019 -0700 Revert "usb: dwc2: host: Setting qtd to NULL after freeing it" This reverts commit b0d659022e5c96ee5c4bd62d22d3da2d66de306b. The reverted commit does nothing but adding two unnecessary lines of code. It sets a local variable to NULL in two functions, but that variable is not used anywhere in the rest of those functions. This is just confusing, so let's remove it. Cc: Vardan Mikayelyan Cc: John Youn Cc: Douglas Anderson Cc: Felipe Balbi Acked-by: Minas Harutyunyan Reviewed-by: Douglas Anderson Signed-off-by: Guenter Roeck Signed-off-by: Felipe Balbi drivers/usb/dwc2/hcd.c | 1 - drivers/usb/dwc2/hcd.h | 1 - 2 files changed, 2 deletions(-) commit d78cc1a4b72a455ae53c434ddb8835035a332c5b Author: Colin Ian King Date: Thu May 30 19:14:58 2019 +0100 usb: gadget: net2272: remove redundant assignments to pointer 's' The pointer 's' is being assigned however the pointer is never used with either of these values before it it reassigned much later on. I suspect it was going to be used in the output of the main control registers scnprintf but was omitted. The assignments of 's' to the driver name or the literal string are redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/net2272.c | 5 ----- 1 file changed, 5 deletions(-) commit 508595515f4bcfe36246e4a565cf280937aeaade Author: Andrzej Pietrasiewicz Date: Mon Jun 3 19:05:28 2019 +0200 usb: gadget: Zero ffs_io_data In some cases the "Allocate & copy" block in ffs_epfile_io() is not executed. Consequently, in such a case ffs_alloc_buffer() is never called and struct ffs_io_data is not initialized properly. This in turn leads to problems when ffs_free_buffer() is called at the end of ffs_epfile_io(). This patch uses kzalloc() instead of kmalloc() in the aio case and memset() in non-aio case to properly initialize struct ffs_io_data. Signed-off-by: Andrzej Pietrasiewicz Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_fs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 48f5e7493a6a0ac2cf6cf41835495a1f67f4a57c Author: Hariprasad Kelam Date: Wed Jun 5 17:34:25 2019 +0530 USB: omap_udc: Remove unneeded variable With the current implementation omap_udc_stop is always returning -ENODEV. Added changes to return 0 and remove variable status. Issue identified with coccicheck drivers/usb/gadget/udc/omap_udc.c:2106:6-12: Unneeded variable: "status". Return "- ENODEV" on line 2128 Signed-off-by: Hariprasad Kelam Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/omap_udc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 811e5c3d3c4adf0b037fab3417395d3060a4492a Author: Hariprasad Kelam Date: Wed Jun 5 17:41:17 2019 +0530 fotg210-udc: Remove unneeded variable This patch fixes below warning reported by coccicheck drivers/usb/gadget/udc/fotg210-udc.c:484:5-8: Unneeded variable: "ret". Return "0" on line 507 Signed-off-by: Hariprasad Kelam Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/fotg210-udc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 67929a7ded5263106931521c3455e3250f0a26ff Author: Hariprasad Kelam Date: Wed Jun 5 19:42:53 2019 +0530 usb: gadget: at91_udc: Remove unneeded variable at91_wakeup is always returning -EINVAL. But usb_gadget_wakeup expects 0 on success and negative number on failure. As per current implementation this function wont fail. This patch removes unneeded variable and returns 0. Issue identified by coccicheck drivers/usb/gadget/udc/at91_udc.c:802:6-12: Unneeded variable: "status". Return "- EINVAL" on line 821 Signed-off-by: Hariprasad Kelam Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/at91_udc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 0604160d8c0b6082727182398d432a68bdd58872 Author: Biju Das Date: Fri May 31 10:59:57 2019 +0100 usb: gadget: udc: renesas_usb3: Enhance role switch support The RZ/G2E cat874 board has a type-c connector connected to hd3ss3220 usb type-c drp port controller. Enhance role switch support to assign the role requested by connector device using the usb role switch class framework. Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Signed-off-by: Biju Das Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/renesas_usb3.c | 91 ++++++++++++++++++++++++++++++++--- 1 file changed, 84 insertions(+), 7 deletions(-) commit f4408a98c4e6f90af032bc473f987acd89fd81d9 Author: Jonas Stenvall Date: Thu Jun 13 11:34:33 2019 +0200 usb: gadget: u_audio: Fixed variable declaration coding style issue Fixed a coding style issue, replacing unsigned with unsigned int. Reviewed-by: Eugeniu Rosca Signed-off-by: Jonas Stenvall Signed-off-by: Felipe Balbi drivers/usb/gadget/function/u_audio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4833a94eb383f5b22775077ff92ddaae90440921 Author: Fei Yang Date: Wed Jun 12 15:13:26 2019 -0700 usb: gadget: f_fs: data_len used before properly set The following line of code in function ffs_epfile_io is trying to set flag io_data->use_sg in case buffer required is larger than one page. io_data->use_sg = gadget->sg_supported && data_len > PAGE_SIZE; However at this point of time the variable data_len has not been set to the proper buffer size yet. The consequence is that io_data->use_sg is always set regardless what buffer size really is, because the condition (data_len > PAGE_SIZE) is effectively an unsigned comparison between -EINVAL and PAGE_SIZE which would always result in TRUE. Fixes: 772a7a724f69 ("usb: gadget: f_fs: Allow scatter-gather buffers") Signed-off-by: Fei Yang Cc: stable Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_fs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c846b03ff767149d75d4d8dca6d3d4945a21074a Author: Douglas Anderson Date: Mon May 20 10:56:04 2019 -0700 USB: dwc2: Don't turn off the usbphy in suspend if wakeup is enabled If the 'snps,need-phy-for-wake' is set in the device tree then: - We know that we can wakeup, so call device_set_wakeup_capable(). The USB core will use this knowledge to enable wakeup by default. - We know that we should keep the PHY on during suspend if something on our root hub needs remote wakeup. This requires the patch (USB: Export usb_wakeup_enabled_descendants()). Note that we don't keep the PHY on at suspend time if it's not needed because it would be a power draw. If we later find some users of dwc2 that can support wakeup without keeping the PHY on we may want to add a way to call device_set_wakeup_capable() without keeping the PHY on at suspend time. Signed-off-by: Douglas Anderson Signed-off-by: Chris Zhong Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.h | 8 ++++++++ drivers/usb/dwc2/hcd.c | 19 +++++++++++++++++++ drivers/usb/dwc2/platform.c | 23 ++++++++++++++++++++--- 3 files changed, 47 insertions(+), 3 deletions(-) commit 1d390437f605db28596ad4c4bfeca2fed052c025 Author: Douglas Anderson Date: Mon May 20 10:56:05 2019 -0700 ARM: dts: rockchip: Allow wakeup from rk3288-veyron's dwc2 USB ports We want to be able to wake from USB if a device is plugged in that wants remote wakeup. Enable it on both dwc2 controllers. NOTE: this is added specifically to veyron and not to rk3288 in general since it's not known whether all rk3288 boards are designed to support USB wakeup. It is plausible that some boards could shut down important rails in S3. Also note that currently wakeup doesn't seem to happen unless you use the "deep" suspend mode (where SDRAM is turned off). Presumably the shallow suspend mode is gating some sort of clock that's important but I couldn't easily figure out how to get it working. Signed-off-by: Douglas Anderson Signed-off-by: Felipe Balbi arch/arm/boot/dts/rk3288-veyron.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit cd5f9726773b654f8e1cfd6ec1a989c558fa164b Author: Douglas Anderson Date: Mon May 20 10:56:03 2019 -0700 Documentation: dt-bindings: Add snps,need-phy-for-wake for dwc2 USB Some SoCs with a dwc2 USB controller may need to keep the PHY on to support remote wakeup. Allow specifying this as a device tree property. Reviewed-by: Rob Herring Signed-off-by: Douglas Anderson Signed-off-by: Felipe Balbi Documentation/devicetree/bindings/usb/dwc2.txt | 3 +++ 1 file changed, 3 insertions(+) commit 1112cf4c4109473fd8a30a4678d25f9321ef5d67 Author: Marek Szyprowski Date: Fri Jun 14 08:52:53 2019 +0200 usb: dwc2: Force 8bit UTMI width for Samsung Exynos SoCs Samsung Exynos SoCs require to force UTMI width to 8bit, otherwise the host side of the shared USB2 PHY doesn't work. Reported-by: Krzysztof Kozlowski Fixes: 707d80f0a3c5 ("usb: dwc2: gadget: Replace phyif with phy_utmi_width") Signed-off-by: Marek Szyprowski Acked-by: Minas Harutyunyan Acked-by: Krzysztof Kozlowski Tested-by: Krzysztof Kozlowski Signed-off-by: Felipe Balbi drivers/usb/dwc2/params.c | 1 + 1 file changed, 1 insertion(+) commit f90db10779adab4b2bb12dd5de661616b6fda9e3 Author: Neil Armstrong Date: Fri Jun 14 10:58:24 2019 +0200 usb: dwc3: meson-g12a: Add support for IRQ based OTG switching Add support for the OTG ID change interrupt to switch between Host and Device mode. Tested on the Hardkernel Odroid-N2 board. Signed-off-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Signed-off-by: Felipe Balbi drivers/usb/dwc3/dwc3-meson-g12a.c | 36 +++++++++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) commit 8eb835e4789acb7c306d56ae9069e0e1134aa5b2 Author: Greg Kroah-Hartman Date: Tue Jun 11 20:05:47 2019 +0200 power: avs: smartreflex: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. And even when not checking the return value, no need to cast away the call to (void), as these functions were never a "must check" type of a function, so remove that odd cast. Signed-off-by: Greg Kroah-Hartman Signed-off-by: Rafael J. Wysocki drivers/power/avs/smartreflex.c | 41 +++++++++++------------------------------ 1 file changed, 11 insertions(+), 30 deletions(-) commit aa8b8f9f9bef4696b6d9f1ca4d0de2b403db65c5 Author: Nick Crews Date: Fri Jun 14 14:56:31 2019 -0600 platform/chrome: wilco_ec: Fix unreleased lock in event_read() When copying an event to userspace failed, the event queue lock was never released. This fixes that. Reported-by: Dan Carpenter Signed-off-by: Nick Crews Signed-off-by: Enric Balletbo i Serra drivers/platform/chrome/wilco_ec/event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 35b52b3315a21d3314f859814717ca3583660f73 Author: kbuild test robot Date: Tue Jun 18 10:32:31 2019 +0200 platform/chrome: cros_ec_debugfs: cros_ec_uptime_fops can be static Fixes: 909447f683b3 ("platform/chrome: cros_ec_debugfs: Add debugfs entry to retrieve EC uptime") Signed-off-by: kbuild test robot Signed-off-by: Enric Balletbo i Serra drivers/platform/chrome/cros_ec_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 200f5c4081e03b068ceac8b5418fb5160274b547 Author: Russell King Date: Mon Jun 17 15:49:55 2019 +0100 arm64: dts: marvell: add missing #interrupt-cells property The GPIO interrupt controllers are missing their required specified in DT. Signed-off-by: Russell King Reviewed-by: Alexandre Belloni Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-cp110.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 1fbc6ec2f35e28a23c9f0e9bef199bbbcfb4635e Author: Enric Balletbo i Serra Date: Fri Jun 14 12:23:47 2019 +0200 platform/chrome: cros_ec_debugfs: Add debugfs ABI documentation Add the missing ABI documentation for the already available debugfs entries: console_log, panicinfo and pdinfo. Signed-off-by: Enric Balletbo i Serra Documentation/ABI/testing/debugfs-cros-ec | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit cb78a163c1510a35c4bee2576c38a7dc95cf1ba1 Author: Enric Balletbo i Serra Date: Fri Jun 14 11:51:24 2019 +0200 platform/chrome: cros_ec_debugfs: Fix kernel-doc comment first line kernel-doc comments have a prescribed format. To be _particularly_ correct we should also capitalise the brief description and terminate it with a period. Signed-off-by: Enric Balletbo i Serra drivers/platform/chrome/cros_ec_debugfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e90716a6612150218aaff1fd47ca6de954100a06 Author: Tim Wawrzynczak Date: Thu Jun 13 11:57:36 2019 -0600 platform/chrome: cros_ec_debugfs: Add debugfs entry to retrieve EC uptime The new debugfs entry 'uptime' is being made available to userspace so that a userspace daemon can synchronize EC logs with host time. Signed-off-by: Tim Wawrzynczak [rework based on Tim's first approach] Signed-off-by: Enric Balletbo i Serra Tested-by: Tim Wawrzynczak Documentation/ABI/testing/debugfs-cros-ec | 8 +++++++ drivers/platform/chrome/cros_ec_debugfs.c | 38 +++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) commit 6f0af5da86d11fa5cce0db7b5fee315673f6f20f Author: Andrey Smirnov Date: Fri Jun 14 00:43:48 2019 -0700 ARM: dts: imx7d-zii-rpu2: Drop unused pinmux entries Neither pinctrl_i2c1_gpio nor pinctrl_i2c2_gpio are used anywhere in the file, drop them. Signed-off-by: Andrey Smirnov Cc: Shawn Guo Cc: Chris Healy Cc: Fabio Estevam Cc: Lucas Stach Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7d-zii-rpu2.dts | 14 -------------- 1 file changed, 14 deletions(-) commit d38f5fdb87ef5f050657b9f4e870e8a61653d39e Author: Andrey Smirnov Date: Fri Jun 14 00:43:47 2019 -0700 ARM: dts: imx7d-zii-rpu2: Fix incorrrect 'stdout-path' RPU2 uses UART2 as a serial console and UART1 is not used at all. Fix incorrrectly specified 'stdout-path' to reflect that. Signed-off-by: Andrey Smirnov Cc: Shawn Guo Cc: Chris Healy Cc: Fabio Estevam Cc: Lucas Stach Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7d-zii-rpu2.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ae7b3384b61bf31e19ed64f598f00876c1c38a2e Author: Manivannan Sadhasivam Date: Thu Jun 13 18:57:05 2019 +0530 ARM: dts: Add support for 96Boards Meerkat96 board Add devicetree support for 96Boards Meerkat96 board from Novtech. This board is one of the Consumer Edition boards of the 96Boards family based on i.MX7D SoC. Following are the currently supported features of the board: * uSD * WiFi/BT * USB More information about this board can be found in 96Boards product page: https://www.96boards.org/product/imx7-96/ Signed-off-by: Manivannan Sadhasivam Signed-off-by: Shawn Guo arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/imx7d-meerkat96.dts | 375 ++++++++++++++++++++++++++++++++++ 2 files changed, 376 insertions(+) commit 13b18d35909707571af9539f7731389fbf0feb31 Author: Serge Semin Date: Wed May 8 13:44:41 2019 +0300 tty: serial_core: Set port active bit in uart_port_activate A bug was introduced by commit b3b576461864 ("tty: serial_core: convert uart_open to use tty_port_open"). It caused a constant warning printed into the system log regarding the tty and port counter mismatch: [ 21.644197] ttyS ttySx: tty_port_close_start: tty->count = 1 port count = 2 in case if session hangup was detected so the warning is printed starting from the second open-close iteration. Particularly the problem was discovered in situation when there is a serial tty device without hardware back-end being setup. It is considered by the tty-serial subsystems as a hardware problem with session hang up. In this case uart_startup() will return a positive value with TTY_IO_ERROR flag set in corresponding tty_struct instance. The same value will get passed to be returned from the activate() callback and then being returned from tty_port_open(). But since in this case tty_port_block_til_ready() isn't called the TTY_PORT_ACTIVE flag isn't set (while the method had been called before tty_port_open conversion was introduced and the rest of the subsystem code expected the bit being set in this case), which prevents the uart_hangup() method to perform any cleanups including the tty port counter setting to zero. So the next attempt to open/close the tty device will discover the counters mismatch. In order to fix the problem we need to manually set the TTY_PORT_ACTIVE flag in case if uart_startup() returned a positive value. In this case the hang up procedure will perform a full set of cleanup actions including the port ref-counter resetting. Fixes: b3b576461864 "tty: serial_core: convert uart_open to use tty_port_open" Signed-off-by: Serge Semin Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/serial_core.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit bee0aa5704d8c9353b4c230f2613906aadd979c2 Author: Manivannan Sadhasivam Date: Thu Jun 13 18:57:04 2019 +0530 dt-bindings: arm: Document 96Boards Meerkat96 devicetree binding Document 96Boards Meerkat96 devicetree binding based on i.MX7D SoC. Reviewed-by: Rob Herring Signed-off-by: Manivannan Sadhasivam Signed-off-by: Shawn Guo Documentation/devicetree/bindings/arm/fsl.yaml | 1 + 1 file changed, 1 insertion(+) commit 42912081481c6303d880f315223f725ee813c8f1 Author: Stefan Roese Date: Thu Jun 13 17:45:41 2019 +0200 serial: 8250: Add MSR/MCR TIOCM conversion wrapper functions This patch adds wrapper functions to convert MSR <-> TIOCM and also MCR <-> TIOCM. These functions are used now in serial8250_do_set_mctrl() and serial8250_do_get_mctrl(). Signed-off-by: Stefan Roese Suggested-by: Andy Shevchenko Cc: Andy Shevchenko Cc: Yegor Yefremov Cc: Greg Kroah-Hartman Cc: Giulio Benetti Reviewed-by: Mika Westerberg Reviewed-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250.h | 54 +++++++++++++++++++++++++++++++++++++ drivers/tty/serial/8250/8250_port.c | 25 +++-------------- 2 files changed, 57 insertions(+), 22 deletions(-) commit 7e267b2956f122b3b86c09447e8791727f9d2624 Author: Andy Shevchenko Date: Mon Jun 17 16:53:20 2019 +0300 serial: 8250: factor out serial8250_{set,clear}_THRI() helpers Factor out similar code pieces that set or clear UART_IER_THRI bit to serial8250_{set,clear}_THRI() helpers. Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250.h | 18 ++++++++++++++++++ drivers/tty/serial/8250/8250_dma.c | 11 +++-------- drivers/tty/serial/8250/8250_omap.c | 14 +++----------- drivers/tty/serial/8250/8250_port.c | 10 ++-------- 4 files changed, 26 insertions(+), 27 deletions(-) commit 099f79c019993a7c6071942e9d873f7298f3af7f Author: Fabio Estevam Date: Tue Jun 11 10:03:39 2019 -0300 serial: fsl_lpuart: Remove unneeded OOM error message There is no need to add an out-of-memory error message inside the driver because the core MM code will take care of it. Remove the unneeded OOM error message. Signed-off-by: Fabio Estevam Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/fsl_lpuart.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 8d53935d9beb4b9b51fdae9296e4a7840214a64a Author: Nava kishore Manne Date: Wed Jun 12 13:14:43 2019 +0200 serial: uartps: Remove useless return from cdns_uart_poll_put_char There is no reason to call return at the end of function which should return void. The patch is also remove one checkpatch warning: WARNING: void function return statements are not generally useful + return; +} Fixes: 6ee04c6c5488 ("tty: xuartps: Add polled mode support for xuartps") Signed-off-by: Nava kishore Manne Signed-off-by: Michal Simek Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/xilinx_uartps.c | 2 -- 1 file changed, 2 deletions(-) commit 7be7a0145f01393e487aef8123902e08e7286a45 Author: Nava kishore Manne Date: Wed Jun 12 13:14:42 2019 +0200 serial: uartps: Do not add a trailing semicolon to macro This patch fixes this checkpatch warning: WARNING: macros should not use a trailing semicolon +#define to_cdns_uart(_nb) container_of(_nb, struct cdns_uart, \ + clk_rate_change_nb); Fixes: d9bb3fb12685 ("tty: xuartps: Rebrand driver as Cadence UART") Signed-off-by: Nava kishore Manne Signed-off-by: Michal Simek Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/xilinx_uartps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a53f82d6ccb5199ba4f3b54ae3ff0298ffe1c91d Author: Nava kishore Manne Date: Wed Jun 12 13:14:41 2019 +0200 serial: uartps: Fix long line over 80 chars Trivial patch which fixes one checkpatch warning: WARNING: line over 80 characters + !(readl(port->membase + CDNS_UART_SR) & CDNS_UART_SR_TXFULL)) { Fixes: c8dbdc842d30 ("serial: xuartps: Rewrite the interrupt handling logic") Signed-off-by: Nava kishore Manne Signed-off-by: Michal Simek Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/xilinx_uartps.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b6415f243919703c97483a29ff918872f66f165c Author: Nava kishore Manne Date: Wed Jun 12 13:14:40 2019 +0200 serial: uartps: Fix multiple line dereference Trivial patch which fixes this checkpatch warning: WARNING: Avoid multiple line dereference - prefer 'port->state->xmit.tail' + port->state->xmit.buf[port->state->xmit. + tail], port->membase + CDNS_UART_FIFO); Fixes: c8dbdc842d30 ("serial: xuartps: Rewrite the interrupt handling logic") Signed-off-by: Nava kishore Manne Signed-off-by: Michal Simek Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/xilinx_uartps.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 26d5a3245b3f3ce406277e7584f7ccbbd5ea98bb Author: Nava kishore Manne Date: Wed Jun 12 13:14:39 2019 +0200 serial: uartps: Use octal permission for module_param() Octal permission is preffered compare to symbolic one. This patch fixes checkpatch warnings: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. Fixes: 85baf542d54e ("tty: xuartps: support 64 byte FIFO size") Signed-off-by: Nava kishore Manne Signed-off-by: Michal Simek Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/xilinx_uartps.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ab262666018de6f4e206b021386b93ed0c164316 Author: Shubhrajyoti Datta Date: Wed Jun 12 13:14:38 2019 +0200 serial: uartps: Use the same dynamic major number for all ports Let kernel to find out major number dynamically for the first device and then reuse it for other instances. This fixes the issue that each uart is registered with a different major number. After the patch: crw------- 1 root root 253, 0 Jun 10 08:31 /dev/ttyPS0 crw--w---- 1 root root 253, 1 Jan 1 1970 /dev/ttyPS1 Fixes: 024ca329bfb9 ("serial: uartps: Register own uart console and driver structures") Signed-off-by: Shubhrajyoti Datta Signed-off-by: Michal Simek Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/xilinx_uartps.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 6bf4e42f1d19de10800f4483b4bb7945aab283cb Author: Jay Dolan Date: Tue Jun 11 04:47:15 2019 -0700 serial: 8250: Add support for higher baud rates to Pericom chips The Pericom chips can achieve additional baud rates by programming the sample clock register. The baud rates can be described as 921600 * 16 / (16 - scr) for scr values 5 to 15. The divisor is set to 1 for these baud rates. Adds new quirk for Pericom chips other than the four port chips to use the Signed-off-by: Jay Dolan Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_pci.c | 97 +++++++++++++++++++++++++++++++------- 1 file changed, 79 insertions(+), 18 deletions(-) commit 4e828c3e09201512be5ee162393f334321f7cf01 Author: Sergey Organov Date: Tue Jun 11 15:05:24 2019 +0300 serial: imx: fix locking in set_termios() imx_uart_set_termios() called imx_uart_rts_active(), or imx_uart_rts_inactive() before taking port->port.lock. As a consequence, sport->port.mctrl that these functions modify could have been changed without holding port->port.lock. Moved locking of port->port.lock above the calls to fix the issue. Signed-off-by: Sergey Organov Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit 6800d9a53532b9fd602b4f9b89bff5cf61c45dbe Author: Jani Nikula Date: Mon Jun 17 13:29:44 2019 +0300 Documentation/i915: fix file references after display/ subdir renames Fix the plethora of Sphinx build errors after moving the display files under a subdirectory. Fixes: 379bc100232a ("drm/i915: move modesetting output/encoder code under display/") Fixes: df0566a641f9 ("drm/i915: move modesetting core code under display/") Cc: Chris Wilson Cc: Rodrigo Vivi Cc: Ville Syrjälä Cc: Maarten Lankhorst Reviewed-by: Rodrigo Vivi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190617102944.25129-1-jani.nikula@intel.com Documentation/gpu/i915.rst | 66 +++++++++++++++++++++++----------------------- 1 file changed, 33 insertions(+), 33 deletions(-) commit 312d362c6ae4350784717dff91ba18f365dd8643 Author: Alan Tull Date: Sun Jun 16 22:11:13 2019 -0500 MAINTAINERS: fpga: hand off maintainership to Moritz I'm moving on to a new position and stepping down as FPGA subsystem maintainer. Moritz has graciously agreed to take over the maintainership. Signed-off-by: Alan Tull Acked-by: Moritz Fischer Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit 470f248368ad787abaf0478e566fec878fb5dc89 Author: Sébastien Szymanski Date: Thu Jun 13 12:23:55 2019 +0200 ARM: dts: imx6ul: Add PXP node Add PXP node for i.MX6UL/L SoC. Signed-off-by: Sébastien Szymanski Reviewed-by: Marco Felsch Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6ul.dtsi | 8 ++++++++ arch/arm/boot/dts/imx6ull.dtsi | 6 ++++++ 2 files changed, 14 insertions(+) commit 6869114832b71f357f63b3a3d4bac32e05f244d1 Author: Anson Huang Date: Thu Jun 13 11:35:27 2019 +0800 ARM: dts: imx6sll: Enable SNVS poweroff according to board design The SNVS poweroff depends on board design, by default it should be disabled in SoC DT and ONLY be enabled on board DT if it is wired up to external PMIC. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6sll-evk.dts | 4 ++++ arch/arm/boot/dts/imx6sll.dtsi | 1 + 2 files changed, 5 insertions(+) commit 4664179fe67970ff834e55d937a79e96d84e24a7 Author: Anson Huang Date: Thu Jun 13 11:35:26 2019 +0800 ARM: dts: imx7s: Enable SNVS power key according to board design The SNVS power key depends on board design, by default it should be disabled in SoC DT and ONLY be enabled on board DT if it is wired up. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7d-sdb.dts | 4 ++++ arch/arm/boot/dts/imx7s.dtsi | 1 + 2 files changed, 5 insertions(+) commit bbfba8c7150b37ff536bd6629a62a0321a75abdb Author: Anson Huang Date: Thu Jun 13 11:35:25 2019 +0800 ARM: dts: imx6sll: Enable SNVS power key according to board design The SNVS power key depends on board design, by default it should be disabled in SoC DT and ONLY be enabled on board DT if it is wired up. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6sll-evk.dts | 4 ++++ arch/arm/boot/dts/imx6sll.dtsi | 1 + 2 files changed, 5 insertions(+) commit 052ce6f4de52d2df131c221205e37ba073a420df Author: Anson Huang Date: Thu Jun 13 11:35:24 2019 +0800 ARM: dts: imx6ul: Enable SNVS power key according to board design The SNVS power key depends on board design, by default it should be disabled in SoC DT and ONLY be enabled on board DT if it is wired up. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6ul-14x14-evk.dtsi | 4 ++++ arch/arm/boot/dts/imx6ul.dtsi | 1 + 2 files changed, 5 insertions(+) commit ee279588ac481742f53641d1b1e9049d97d8fb90 Author: Anson Huang Date: Thu Jun 13 11:35:23 2019 +0800 ARM: dts: imx6sx: Enable SNVS power key according to board design The SNVS power key depends on board design, by default it should be disabled in SoC DT and ONLY be enabled on board DT if it is wired up. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6sx-sdb-reva.dts | 4 ++++ arch/arm/boot/dts/imx6sx-sdb.dts | 4 ++++ arch/arm/boot/dts/imx6sx.dtsi | 1 + 3 files changed, 9 insertions(+) commit 770856f0da5d4282942df83a928fdcb662417331 Author: Anson Huang Date: Thu Jun 13 11:35:22 2019 +0800 ARM: dts: imx6qdl: Enable SNVS power key according to board design The SNVS power key depends on board design, by default it should be disabled in SoC DT and ONLY be enabled on board DT if it is wired up. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-sabresd.dtsi | 4 ++++ arch/arm/boot/dts/imx6qdl.dtsi | 1 + 2 files changed, 5 insertions(+) commit 108ae07c50363d0768a4c2bb7454a717fd36af52 Author: Takashi Iwai Date: Tue Jun 11 14:26:26 2019 +0200 selftests: firmware: Add compressed firmware tests This patch adds the test cases for checking compressed firmware load. Two more cases are added to fw_filesystem.sh: - Both a plain file and an xz file are present, and load the former - Only an xz file is present, and load without '.xz' suffix The tests are enabled only when CONFIG_FW_LOADER_COMPRESS is enabled and xz program is installed. Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman tools/testing/selftests/firmware/fw_filesystem.sh | 73 +++++++++++++++++++---- tools/testing/selftests/firmware/fw_lib.sh | 7 +++ tools/testing/selftests/firmware/fw_run_tests.sh | 1 + 3 files changed, 71 insertions(+), 10 deletions(-) commit 82fd7a8142a10b8eb41313074b3859d82c0857dc Author: Takashi Iwai Date: Tue Jun 11 14:26:25 2019 +0200 firmware: Add support for loading compressed files This patch adds the support for loading compressed firmware files. The primary motivation is to reduce the storage size; e.g. currently the files in /lib/firmware on my machine counts up to 419MB, while they can be reduced to 130MB by file compression. The patch introduces a new kconfig option CONFIG_FW_LOADER_COMPRESS. Even with this option set, the firmware loader still tries to load the original firmware file as-is at first, but then falls back to the file with ".xz" extension when it's not found, and the decompressed file content is returned to the caller of request_firmware(). So, no change is needed for the rest. Currently only XZ format is supported. A caveat is that the kernel XZ helper code supports only CRC32 (or none) integrity check type, so you'll have to compress the files via xz -C crc32 option. Since we can't determine the expanded size immediately from an XZ file, the patch re-uses the paged buffer that was used for the user-mode fallback; it puts the decompressed content page, which are vmapped at the end. The paged buffer code is conditionally built with a new Kconfig that is selected automatically. Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman drivers/base/firmware_loader/Kconfig | 18 ++++ drivers/base/firmware_loader/firmware.h | 8 +- drivers/base/firmware_loader/main.c | 147 ++++++++++++++++++++++++++++++-- 3 files changed, 161 insertions(+), 12 deletions(-) commit 5342e7093ff298d9cbd40f9342b607adb02b2dd0 Author: Takashi Iwai Date: Tue Jun 11 14:26:24 2019 +0200 firmware: Factor out the paged buffer handling code This is merely a preparation for the upcoming compressed firmware support and no functional changes. It moves the code to handle the paged buffer allocation and mapping out of fallback.c into the main code, so that they can be used commonly. Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman drivers/base/firmware_loader/fallback.c | 61 ++++----------------------------- drivers/base/firmware_loader/firmware.h | 4 +++ drivers/base/firmware_loader/main.c | 52 ++++++++++++++++++++++++++++ 3 files changed, 63 insertions(+), 54 deletions(-) commit 3aa6980139d19542d9204387fadadd3861e433ec Author: Geert Uytterhoeven Date: Mon Jun 17 16:41:22 2019 +0200 tools/firmware: Add missing newline at end of file "git diff" says: \ No newline at end of file after modifying the file. Signed-off-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman tools/firmware/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2472d64af2d3561954e2f05365a67692bb852f2a Author: Sven Van Asbroeck Date: Mon Jun 17 14:23:54 2019 -0400 firmware: improve LSM/IMA security behaviour The firmware loader queries if LSM/IMA permits it to load firmware via the sysfs fallback. Unfortunately, the code does the opposite: it expressly permits sysfs fw loading if security_kernel_load_data( LOADING_FIRMWARE) returns -EACCES. This happens because a zero-on-success return value is cast to a bool that's true on success. Fix the return value handling so we get the correct behaviour. Fixes: 6e852651f28e ("firmware: add call to LSM hook before firmware sysfs fallback") Cc: Stable Cc: Mimi Zohar Cc: Kees Cook To: Luis Chamberlain Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Cc: linux-kernel@vger.kernel.org Signed-off-by: Sven Van Asbroeck Reviewed-by: Mimi Zohar Signed-off-by: Greg Kroah-Hartman drivers/base/firmware_loader/fallback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d038c1dc35565e6522d9fafd19ded704591eb5b1 Author: Anson Huang Date: Thu Jun 13 10:01:04 2019 +0800 arm64: dts: imx8mm: Enable SNVS power key according to board design The SNVS power key depends on board design, by default it should be disabled in SoC DT and ONLY be enabled on board DT if it is wired up. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mm-evk.dts | 4 ++++ arch/arm64/boot/dts/freescale/imx8mm.dtsi | 1 + 2 files changed, 5 insertions(+) commit 3c3a8e50139af4a624d59a5ba03847661cefc9c6 Author: Anson Huang Date: Thu Jun 13 09:02:27 2019 +0800 arm64: dts: imx8mq-evk: Enable SNVS power key Enable SNVS power key for i.MX8MQ EVK board. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mq-evk.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 38ef0515e1e89794ad1797ce5fadbface4bec216 Author: Rolf Eike Beer Date: Mon Jun 17 14:24:12 2019 +0200 H8300: remove unused barrier defines From c907e749917f430e3dc62048985c8419778572f9 Mon Sep 17 00:00:00 2001 From: Rolf Eike Beer Date: Fri, 14 Jul 2017 11:19:08 +0200 Subject: [PATCH] H8300: remove unused barrier defines They were introduced in d2a5f4999f6c211adf30d9788349e13988d6f2a7 long after 2e39465abc4b7856a0ea6fcf4f6b4668bb5db877 removed the remnants of all previous instances from the tree. Signed-off-by: Rolf Eike Beer Signed-off-by: Yoshinori Sato arch/h8300/include/asm/bitops.h | 6 ------ 1 file changed, 6 deletions(-) commit 61959885103a33ff3e35ad3fd33176e1c03ae060 Author: Hariprasad Kelam Date: Tue Jun 18 08:09:14 2019 +0530 staging: rtl8723bs: hal: odm_HWConfig: Unneeded variable: "result". Return "HAL_STATUS_SUCCESS" Remove function ODM_ConfigMACWithHeaderFile as trace is not necessary and as it is getting called only once and call direct function "ODM_ReadAndConfig_MP_8723B_MAC_REG" Issue identified by coccicheck Signed-off-by: Hariprasad Kelam ---- changes v2: fixed typo in commit message changes v3: Remove function ODM_ConfigMACWithHeaderFile and replace with ODM_ReadAndConfig_MP_8723B_MAC_REG Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/odm_HWConfig.c | 29 ------------------------- drivers/staging/rtl8723bs/hal/odm_HWConfig.h | 2 -- drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c | 2 +- 3 files changed, 1 insertion(+), 32 deletions(-) commit f3a9e4136893fc9722022c8bc6da55c89e419bd3 Author: Hariprasad Kelam Date: Tue Jun 18 06:50:07 2019 +0530 staging: rtl8723bs: hal: rtl8723b_rf6052: fix spaces preferred around unary operator ERROR: spaces required around that '<<' (ctx:VxV) Signed-off-by: Hariprasad Kelam Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/rtl8723b_rf6052.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f60cb23f0f0f8f88eef7e944726ab459dc7db6c8 Author: Hariprasad Kelam Date: Tue Jun 18 06:39:03 2019 +0530 staging: rtl8723bs: hal: rtl8723b_hal_init: Remove set but unused variable Remove variable pHalData as it is not being used in function. Signed-off-by: Hariprasad Kelam Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 6 ------ 1 file changed, 6 deletions(-) commit 7036126aa2f5f9064916e65cfe988698e078b6db Author: Hariprasad Kelam Date: Tue Jun 18 06:38:28 2019 +0530 staging: rtl8723bs: hal: rtl8723b_hal_init: fix Using comparison to true is error prone This patch tries to fix below issues reported by checkpatch CHECK: Using comparison to true is error prone CHECK: Using comparison to true is false prone Signed-off-by: Hariprasad Kelam Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 38 +++++++++++------------ 1 file changed, 19 insertions(+), 19 deletions(-) commit 02ca9aa02534ac89d4f941d16f4ee40ea2d06c25 Author: Hariprasad Kelam Date: Tue Jun 18 06:37:03 2019 +0530 staging: rtl8723bs: hal: rtl8723b_hal_init: fix Comparison to NULL This patch tries to fix below issues reported by checkpatch CHECK: Comparison to NULL could be written "!efuseTbl" CHECK: Comparison to NULL could be written "!psta" Signed-off-by: Hariprasad Kelam Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5d8c5c684ad808d4067ba283ee9b0aa095240ab5 Author: Hariprasad Kelam Date: Sun Jun 16 09:05:27 2019 +0530 staging/rtl8723bs/core/rtw_ap: Remove redundant call to memset rtw_zmalloc is internally doing memset . So there is no need to call memset again. Signed-off-by: Hariprasad Kelam Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_ap.c | 2 -- 1 file changed, 2 deletions(-) commit bd462d407bbb498b48f21f2c88a392fb52823700 Author: Hariprasad Kelam Date: Sun Jun 16 08:57:05 2019 +0530 staging/rtl8723bs/core: Remove redundant call to memset rtw_zmalloc is doing memset . So there is no need to call memset again. Signed-off-by: Hariprasad Kelam Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_mlme.c | 2 -- 1 file changed, 2 deletions(-) commit 7930f8e5892fa683a1aaf2ba83d8aedc588b409e Author: Hariprasad Kelam Date: Sun Jun 16 08:44:09 2019 +0530 staging: rtl8723bs: hal: Add null check after memory allocation Add NULL check post call to rtw_zmalloc. Signed-off-by: Hariprasad Kelam Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/sdio_ops.c | 3 +++ 1 file changed, 3 insertions(+) commit 247c2ad278dd457b774d4b7ca73b6afeef13f90c Author: Hariprasad Kelam Date: Sun Jun 16 08:24:31 2019 +0530 staging: rtl8723bs: hal: fix Using comparison to false is error prone fix below issue reported by checkpatch CHECK: Using comparison to false is error prone Signed-off-by: Hariprasad Kelam Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 289fb19ef7a9485890a0451f9c90b7f54fcd6ae4 Author: Hariprasad Kelam Date: Sun Jun 16 08:23:55 2019 +0530 staging: rtl8723bs: hal: Remove return type of initrecvbuf change return of initrecvbuf from s32 to void. As this function always returns SUCCESS . Signed-off-by: Hariprasad Kelam Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 4c1c1dbd6d935487adc744ab26164507efc68336 Author: Hariprasad Kelam Date: Sat Jun 15 10:06:57 2019 +0530 staging: rtl8723bs: hal: spaces preferred around unary operator This patch fixes below issues reported by checkpatch CHECK: spaces preferred around that '-' (ctx:VxV) CHECK: spaces preferred around that '/' (ctx:VxV) Signed-off-by: Hariprasad Kelam Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 88004c3e693d27d7408ad364e8441224affcf2b4 Author: Hariprasad Kelam Date: Sat Jun 15 10:06:36 2019 +0530 staging: rtl8723bs: hal: Using comparison to true is error prone fix below issue reported by checkpatch CHECK: Using comparison to true is error prone CHECK: Using comparison to false is error prone Signed-off-by: Hariprasad Kelam Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 0c20037c6749b8dbb5f6d5952b2894cf3b375571 Author: Geert Uytterhoeven Date: Mon Jun 17 16:39:39 2019 +0200 staging: Add missing newline at end of file "git diff" says: \ No newline at end of file after modifying the files. Signed-off-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman drivers/staging/mt7621-dts/TODO | 2 +- drivers/staging/rts5208/TODO | 2 +- drivers/staging/vt6655/test | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 5c8004ce6149a6342fbaffe1410e1f5f7a21ca2a Author: Colin Ian King Date: Mon Jun 17 13:55:29 2019 +0100 staging: erofs: clean up initialization of pointer de Currently pointer de is being initialized with a value that is never read and a few statements later de is being re-assigned. Clean this up by ininitialzing de and removing the re-assignment. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Reviewed-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman drivers/staging/erofs/dir.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7c23143199e3bae4f1ad8ad38370fc8cf1b3d5c9 Author: Colin Ian King Date: Mon Jun 17 14:03:58 2019 +0100 staging: comedi: usbdux: remove redundant initialization of fx2delay Variable fx2delay is being initialized to a value that is never read and is being re-assigned a few statements later. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/usbdux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1d0becabdc0e794299714de4493c5f38bc1388c9 Author: Horia Geantă Date: Mon Jun 10 18:23:31 2019 +0300 arm64: dts: ls1028a: add crypto node LS1028A has a SEC v5.0 compatible security engine. Signed-off-by: Horia Geantă Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls1028a-qds.dts | 1 + arch/arm64/boot/dts/freescale/fsl-ls1028a-rdb.dts | 1 + arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi | 39 +++++++++++++++++++++++ 3 files changed, 41 insertions(+) commit d7863de8cdea75c9a4747621b1587fc70855460c Author: Hans Ulli Kroll Date: Thu Jun 13 17:07:35 2019 +0200 usb: host: fotg2: add device tree probing Add device tree probing to the fotg2 driver. Signed-off-by: Hans Ulli Kroll [Drop DMA mask coercion, drivers/of/platform.c does the job] Signed-off-by: Linus Walleij Signed-off-by: Greg Kroah-Hartman drivers/usb/host/fotg210-hcd.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit ae748b9cf852833d121cf0c1d35bff52d566102b Author: Ard Biesheuvel Date: Mon Jun 17 10:18:48 2019 +0200 wusb: switch to cbcmac transform The wusb code takes a very peculiar approach at implementing CBC-MAC, by using plain CBC into a scratch buffer, and taking the output IV as the MAC. We can clean up this code substantially by switching to the cbcmac shash, as exposed by the CCM template. To ensure that the module is loaded on demand, add the cbcmac template name as a module alias. Signed-off-by: Ard Biesheuvel Signed-off-by: Greg Kroah-Hartman crypto/ccm.c | 1 + drivers/usb/wusbcore/Kconfig | 8 +- drivers/usb/wusbcore/crypto.c | 169 +++++++++++------------------------------- 3 files changed, 48 insertions(+), 130 deletions(-) commit 1aa6af5f1813c8619736c6e38607bf562c0d5cff Author: Anson Huang Date: Mon Jun 10 13:39:22 2019 +0800 clk: imx8mq: Use devm_platform_ioremap_resource() instead of of_iomap() i.MX8MQ clock driver uses platform driver model, better to use devm_platform_ioremap_resource() instead of of_iomap() to get IO base. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo drivers/clk/imx/clk-imx8mq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b6409906c7c03b7ca090678614ef027bb8537196 Author: Geert Uytterhoeven Date: Mon Jun 17 16:02:22 2019 +0200 usb: isp1362: Spelling s/eclusive/exclusive/ Signed-off-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman drivers/usb/host/isp1362.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 883cd3c9626fe6ba543138ddc8dbbc5ef8e15996 Author: Anson Huang Date: Mon Jun 10 13:36:34 2019 +0800 clk: imx8mq: Use imx_check_clocks() API directly Use imx_check_clocks() API to check clocks directly. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo drivers/clk/imx/clk-imx8mq.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit c63fe28bf152f75369cc041bc361d18a6157dd16 Author: Anson Huang Date: Mon Jun 10 13:36:33 2019 +0800 clk: imx: Remove __init for imx_check_clocks() API Some of i.MX SoCs' clock driver use platform driver model, and they need to call imx_check_clocks() API, so imx_check_clocks() API should NOT be in .init section. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo drivers/clk/imx/clk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 15d472ecc510e20e42337c8205fa3987329e488d Author: Takashi Sakamoto Date: Mon Jun 17 17:15:10 2019 +0900 ALSA: firewire-motu: code refactoring for pcm.hw_params/hw_free callbacks The pairs of pcm.hw_params callbacks and .hw_free callbacks for both direction have no differences. This commit unifies the pairs. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/motu/motu-pcm.c | 54 ++++++------------------------------------ 1 file changed, 7 insertions(+), 47 deletions(-) commit 2d103420c6eae2ef7d464798242f0d5283526054 Author: Takashi Sakamoto Date: Mon Jun 17 17:15:09 2019 +0900 ALSA: firewire-motu: update isochronous resources when starting packet streaming after bus-reset After bus reset, isochronous resource manager releases all of allocated isochronous resources. The nodes to transfer isochronous packet should request reallocation of the resources. However, between the bus-reset and invocation of 'struct fw_driver.update' handler, ALSA PCM application can detect this situation by XRUN because the target device cancelled to transmit packets once bus-reset occurs. Due to the above mechanism, ALSA fireface driver just stops packet streaming in the update handler, thus pcm.prepare handler should request the reallocation. This commit requests the reallocation in pcm.prepare callback when bus generation is changed. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/motu/motu-stream.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 8edc56ec8f14a586a55b2ab2fda76e6bf4738ee6 Author: Takashi Sakamoto Date: Mon Jun 17 17:15:08 2019 +0900 ALSA: firewire-motu: reserve/release isochronous resources in pcm.hw_params/hw_free callbacks Once allocated, isochronous resources are available for packet streaming, even if the streaming is cancelled. For this reason, current implementation handles allocation of the resources and starting packet streaming at the same time. However, this brings complicated procedure to start packet streaming. This commit separates the allocation and starting. The allocation is done in pcm.hw_params callback and available till pcm.hw_free callback. Even if any XRUN occurs, pcm.prepare callback is done to restart packet streaming without releasing/allocating the resources. There are two points to stop packet streaming; in pcm.hw_params and pcm.prepare callbacks. The former point is a case that packet streaming is already started for any MIDI substream then packet streaming is requested with different sampling transfer frequency for any PCM substream. The latter point is cases of any XRUN or packet queueing error. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/motu/motu-midi.c | 10 ++-- sound/firewire/motu/motu-pcm.c | 26 +++++++--- sound/firewire/motu/motu-stream.c | 100 +++++++++++++++++++++----------------- sound/firewire/motu/motu.h | 4 +- 4 files changed, 84 insertions(+), 56 deletions(-) commit ec694fba2ac9406cb3fc3c3216db3de9ed3174a7 Author: Takashi Sakamoto Date: Mon Jun 17 17:15:07 2019 +0900 ALSA: firewire-motu: code refactoring to finish streaming session The operation to finish packet streaming includes stopping isochronous contexts. This commit merges it to the helper function. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/motu/motu-stream.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit e63a15185a7a5ac1fd65dd368de52196d66c0cac Author: Takashi Sakamoto Date: Mon Jun 17 17:15:06 2019 +0900 ALSA: firewire-motu: minor code refactoring to stop isochronous context The helper function to stop isochronous context is superfluous. This commit removes it with simpler codes. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/motu/motu-stream.c | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) commit b66ab1428e68d0c1caea1c1d1490faadc21c2ac5 Author: Takashi Sakamoto Date: Mon Jun 17 17:15:05 2019 +0900 ALSA: firewire-motu: rename helper functions to begin/finish streaming session Like the other drivers in ALSA firewire stack, this commit renames functions to begin/finish packet streaming. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/motu/motu-stream.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit fc49769af4fdba92e8e4f7429e05bb20b0639f90 Author: Takashi Sakamoto Date: Mon Jun 17 17:15:04 2019 +0900 ALSA: firewire-motu: code refactoring for condition to stop streaming In snd_motu_stream_start_duplex() function, there're two points to stop packet streaming, however they can be merged. This commit merges them. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/motu/motu-stream.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 8350132e399dacb212c506bea688a40df2101221 Author: Takashi Sakamoto Date: Mon Jun 17 17:15:03 2019 +0900 ALSA: firewire-motu: add helper function to keep isochronous resources This commit is a part of preparation to perform allocation/release of isochronous resources in pcm.hw_params/hw_free callbacks. This commit adds a helper function to allocate isochronous resources. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/motu/motu-stream.c | 57 ++++++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 25 deletions(-) commit f6341db65a0ad73e0eed10db424958919ce13dc2 Author: Takashi Sakamoto Date: Mon Jun 17 17:15:02 2019 +0900 ALSA: firewire-motu: unify midi callback function Two sets of callbacks for rawmidi.open/close but they have the same codes. This commit unifies each of the callbacks. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/motu/motu-midi.c | 49 +++++------------------------------------ 1 file changed, 6 insertions(+), 43 deletions(-) commit 18f26034be2711254adfa8923dfd263b50d4018a Author: Takashi Sakamoto Date: Mon Jun 17 17:15:01 2019 +0900 ALSA: firewire-motu: unify the count of subscriber for packet streaming Two counters are used to maintain isochronous packet streaming for both directions. However, like the other drivers, they can be replaced with one counter. This commit unifies them. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/motu/motu-midi.c | 8 ++++---- sound/firewire/motu/motu-pcm.c | 8 ++++---- sound/firewire/motu/motu-stream.c | 17 ++++++----------- sound/firewire/motu/motu.h | 3 +-- 4 files changed, 15 insertions(+), 21 deletions(-) commit 6d101f24f1dd41ef6eff3d7f175417ce27a3055a Author: Dmitry Torokhov Date: Mon Jun 10 15:36:58 2019 -0700 USB: add usbfs ioctl to retrieve the connection parameters Recently usfbs gained availability to retrieve device speed, but there is sill no way to determine the bus number or list of ports the device is connected to when using usbfs. While this information can be obtained from sysfs, not all environments allow sysfs access. In a jailed environment a program might be simply given an opened file descriptor to usbfs device, and it is really important that all data can be gathered from said file descriptor. This patch introduces a new ioctl, USBDEVFS_CONNINFO_EX, which return extended connection information for the device, including the bus number, address, port list and speed. The API allows kernel to extend amount of data returned by the ioctl and userspace has an option of adjusting the amount of data it is willing to consume. A new capability, USBDEVFS_CAP_CONNINFO_EX, is introduced to help userspace in determining whether the kernel supports this new ioctl. Signed-off-by: Dmitry Torokhov Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/core/devio.c | 42 ++++++++++++++++++++++++++++++++++++++- include/uapi/linux/usbdevice_fs.h | 26 ++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 1 deletion(-) commit 1a65a03561198f38f8198650b52f55a21cbb4b6c Author: Nathan Huckleberry Date: Thu Jun 13 11:58:38 2019 -0700 usb: host: xhci-tegra: Fix Wunused-const-variable Clang produces the following warning drivers/usb/host/xhci-tegra.c:357:27: warning: unused variable 'mbox_cmd_name' [-Wunused-const-variable] static const char * const mbox_cmd_name[] = { Looks like it was intended for logging or debugging, but was never implemented. Removing mbox_cmd_name. Cc: clang-built-linux@googlegroups.com Link: https://github.com/ClangBuiltLinux/linux/issues/533 Signed-off-by: Nathan Huckleberry Acked-by: Thierry Reding Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-tegra.c | 23 ----------------------- 1 file changed, 23 deletions(-) commit 73786fea0211c61ece47c357334481049a994e79 Author: Bjorn Andersson Date: Wed May 8 15:43:09 2019 -0700 arm64: dts: qcom: qcs404-evb: Enable PCIe Enable the PCIe PHY and controller found on the QCS404 EVB. Signed-off-by: Bjorn Andersson arch/arm64/boot/dts/qcom/qcs404-evb.dtsi | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 431f64642c2f4f188cc81549295460b690df5e2e Author: Bjorn Andersson Date: Wed May 8 15:43:08 2019 -0700 arm64: dts: qcom: qcs404: Add PCIe related nodes The QCS404 has a PCIe2 PHY and a Qualcomm PCIe controller, define these to for the platform. Reviewed-by: Niklas Cassel Signed-off-by: Bjorn Andersson arch/arm64/boot/dts/qcom/qcs404.dtsi | 65 ++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) commit 13091aa30535b719e269f20a7bc34002bf5afae5 Merge: f97252a8c33f 29f785ff76b6 Author: David S. Miller Date: Mon Jun 17 19:48:13 2019 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Honestly all the conflicts were simple overlapping changes, nothing really interesting to report. Signed-off-by: David S. Miller commit f0553dcb9778c343641d3a41f1db01be02e7551b Author: Gustavo A. R. Silva Date: Mon Jun 10 16:22:19 2019 -0500 tracepoint: Use struct_size() in kmalloc() One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct tp_probes { ... struct tracepoint_func probes[0]; }; instance = kmalloc(sizeof(sizeof(struct tp_probes) + sizeof(struct tracepoint_func) * count, GFP_KERNEL); Instead of leaving these open-coded and prone to type mistakes, we can now use the new struct_size() helper: instance = kmalloc(struct_size(instance, probes, count) GFP_KERNEL); This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Steven Rostedt (VMware) kernel/tracepoint.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 000dd5316e1c756a1c028f22e01d06a38249dd4d Author: Mika Westerberg Date: Wed Jun 12 13:57:39 2019 +0300 PCI: Do not poll for PME if the device is in D3cold PME polling does not take into account that a device that is directly connected to the host bridge may go into D3cold as well. This leads to a situation where the PME poll thread reads from a config space of a device that is in D3cold and gets incorrect information because the config space is not accessible. Here is an example from Intel Ice Lake system where two PCIe root ports are in D3cold (I've instrumented the kernel to log the PMCSR register contents): [ 62.971442] pcieport 0000:00:07.1: Check PME status, PMCSR=0xffff [ 62.971504] pcieport 0000:00:07.0: Check PME status, PMCSR=0xffff Since 0xffff is interpreted so that PME is pending, the root ports will be runtime resumed. This repeats over and over again essentially blocking all runtime power management. Prevent this from happening by checking whether the device is in D3cold before its PME status is read. Fixes: 71a83bd727cc ("PCI/PM: add runtime PM support to PCIe port") Signed-off-by: Mika Westerberg Reviewed-by: Lukas Wunner Cc: 3.6+ # v3.6+ Signed-off-by: Rafael J. Wysocki drivers/pci/pci.c | 7 +++++++ 1 file changed, 7 insertions(+) commit c2bf1fc212f7e6f25ace1af8f0b3ac061ea48ba5 Author: Mika Westerberg Date: Wed Jun 12 13:57:38 2019 +0300 PCI: Add missing link delays required by the PCIe spec Currently Linux does not follow PCIe spec regarding the required delays after reset. A concrete example is a Thunderbolt add-in-card that consists of a PCIe switch and two PCIe endpoints: +-1b.0-[01-6b]----00.0-[02-6b]--+-00.0-[03]----00.0 TBT controller +-01.0-[04-36]-- DS hotplug port +-02.0-[37]----00.0 xHCI controller \-04.0-[38-6b]-- DS hotplug port The root port (1b.0) and the PCIe switch downstream ports are all PCIe gen3 so they support 8GT/s link speeds. We wait for the PCIe hierarchy to enter D3cold (runtime): pcieport 0000:00:1b.0: power state changed by ACPI to D3cold When it wakes up from D3cold, according to the PCIe 4.0 section 5.8 the PCIe switch is put to reset and its power is re-applied. This means that we must follow the rules in PCIe 4.0 section 6.6.1. For the PCIe gen3 ports we are dealing with here, the following applies: With a Downstream Port that supports Link speeds greater than 5.0 GT/s, software must wait a minimum of 100 ms after Link training completes before sending a Configuration Request to the device immediately below that Port. Software can determine when Link training completes by polling the Data Link Layer Link Active bit or by setting up an associated interrupt (see Section 6.7.3.3). Translating this into the above topology we would need to do this (DLLLA stands for Data Link Layer Link Active): pcieport 0000:00:1b.0: wait for 100ms after DLLLA is set before access to 0000:01:00.0 pcieport 0000:02:00.0: wait for 100ms after DLLLA is set before access to 0000:03:00.0 pcieport 0000:02:02.0: wait for 100ms after DLLLA is set before access to 0000:37:00.0 I've instrumented the kernel with additional logging so we can see the actual delays the kernel performs: pcieport 0000:00:1b.0: power state changed by ACPI to D0 pcieport 0000:00:1b.0: waiting for D3cold delay of 100 ms pcieport 0000:00:1b.0: waking up bus pcieport 0000:00:1b.0: waiting for D3hot delay of 10 ms pcieport 0000:00:1b.0: restoring config space at offset 0x2c (was 0x60, writing 0x60) ... pcieport 0000:00:1b.0: PME# disabled pcieport 0000:01:00.0: restoring config space at offset 0x3c (was 0x1ff, writing 0x201ff) ... pcieport 0000:01:00.0: PME# disabled pcieport 0000:02:00.0: restoring config space at offset 0x3c (was 0x1ff, writing 0x201ff) ... pcieport 0000:02:00.0: PME# disabled pcieport 0000:02:01.0: restoring config space at offset 0x3c (was 0x1ff, writing 0x201ff) ... pcieport 0000:02:01.0: restoring config space at offset 0x4 (was 0x100000, writing 0x100407) pcieport 0000:02:01.0: PME# disabled pcieport 0000:02:02.0: restoring config space at offset 0x3c (was 0x1ff, writing 0x201ff) ... pcieport 0000:02:02.0: PME# disabled pcieport 0000:02:04.0: restoring config space at offset 0x3c (was 0x1ff, writing 0x201ff) ... pcieport 0000:02:04.0: PME# disabled pcieport 0000:02:01.0: PME# enabled pcieport 0000:02:01.0: waiting for D3hot delay of 10 ms pcieport 0000:02:04.0: PME# enabled pcieport 0000:02:04.0: waiting for D3hot delay of 10 ms thunderbolt 0000:03:00.0: restoring config space at offset 0x14 (was 0x0, writing 0x8a040000) ... thunderbolt 0000:03:00.0: PME# disabled xhci_hcd 0000:37:00.0: restoring config space at offset 0x10 (was 0x0, writing 0x73f00000) ... xhci_hcd 0000:37:00.0: PME# disabled For the switch upstream port (01:00.0) we wait for 100ms but not taking into account the DLLLA requirement. We then wait 10ms for D3hot -> D0 transition of the root port and the two downstream hotplug ports. This means that we deviate from what the spec requires. Performing the same check for system sleep (s2idle) transitions we can see following when resuming from s2idle: pcieport 0000:00:1b.0: power state changed by ACPI to D0 pcieport 0000:00:1b.0: restoring config space at offset 0x2c (was 0x60, writing 0x60) ... pcieport 0000:01:00.0: restoring config space at offset 0x3c (was 0x1ff, writing 0x201ff) ... pcieport 0000:02:02.0: restoring config space at offset 0x3c (was 0x1ff, writing 0x201ff) pcieport 0000:02:02.0: restoring config space at offset 0x2c (was 0x0, writing 0x0) pcieport 0000:02:01.0: restoring config space at offset 0x3c (was 0x1ff, writing 0x201ff) pcieport 0000:02:04.0: restoring config space at offset 0x3c (was 0x1ff, writing 0x201ff) pcieport 0000:02:02.0: restoring config space at offset 0x28 (was 0x0, writing 0x0) pcieport 0000:02:00.0: restoring config space at offset 0x3c (was 0x1ff, writing 0x201ff) pcieport 0000:02:02.0: restoring config space at offset 0x24 (was 0x10001, writing 0x1fff1) pcieport 0000:02:01.0: restoring config space at offset 0x2c (was 0x0, writing 0x60) pcieport 0000:02:02.0: restoring config space at offset 0x20 (was 0x0, writing 0x73f073f0) pcieport 0000:02:04.0: restoring config space at offset 0x2c (was 0x0, writing 0x60) pcieport 0000:02:01.0: restoring config space at offset 0x28 (was 0x0, writing 0x60) pcieport 0000:02:00.0: restoring config space at offset 0x2c (was 0x0, writing 0x0) pcieport 0000:02:02.0: restoring config space at offset 0x1c (was 0x101, writing 0x1f1) pcieport 0000:02:04.0: restoring config space at offset 0x28 (was 0x0, writing 0x60) pcieport 0000:02:01.0: restoring config space at offset 0x24 (was 0x10001, writing 0x1ff10001) pcieport 0000:02:00.0: restoring config space at offset 0x28 (was 0x0, writing 0x0) pcieport 0000:02:02.0: restoring config space at offset 0x18 (was 0x0, writing 0x373702) pcieport 0000:02:04.0: restoring config space at offset 0x24 (was 0x10001, writing 0x49f12001) pcieport 0000:02:01.0: restoring config space at offset 0x20 (was 0x0, writing 0x73e05c00) pcieport 0000:02:00.0: restoring config space at offset 0x24 (was 0x10001, writing 0x1fff1) pcieport 0000:02:04.0: restoring config space at offset 0x20 (was 0x0, writing 0x89f07400) pcieport 0000:02:01.0: restoring config space at offset 0x1c (was 0x101, writing 0x5151) pcieport 0000:02:00.0: restoring config space at offset 0x20 (was 0x0, writing 0x8a008a00) pcieport 0000:02:02.0: restoring config space at offset 0xc (was 0x10000, writing 0x10020) pcieport 0000:02:04.0: restoring config space at offset 0x1c (was 0x101, writing 0x6161) pcieport 0000:02:01.0: restoring config space at offset 0x18 (was 0x0, writing 0x360402) pcieport 0000:02:00.0: restoring config space at offset 0x1c (was 0x101, writing 0x1f1) pcieport 0000:02:04.0: restoring config space at offset 0x18 (was 0x0, writing 0x6b3802) pcieport 0000:02:02.0: restoring config space at offset 0x4 (was 0x100000, writing 0x100407) pcieport 0000:02:00.0: restoring config space at offset 0x18 (was 0x0, writing 0x30302) pcieport 0000:02:01.0: restoring config space at offset 0xc (was 0x10000, writing 0x10020) pcieport 0000:02:04.0: restoring config space at offset 0xc (was 0x10000, writing 0x10020) pcieport 0000:02:00.0: restoring config space at offset 0xc (was 0x10000, writing 0x10020) pcieport 0000:02:01.0: restoring config space at offset 0x4 (was 0x100000, writing 0x100407) pcieport 0000:02:04.0: restoring config space at offset 0x4 (was 0x100000, writing 0x100407) pcieport 0000:02:00.0: restoring config space at offset 0x4 (was 0x100000, writing 0x100407) xhci_hcd 0000:37:00.0: restoring config space at offset 0x10 (was 0x0, writing 0x73f00000) ... thunderbolt 0000:03:00.0: restoring config space at offset 0x14 (was 0x0, writing 0x8a040000) This is even worse. None of the mandatory delays are performed. If this would be S3 instead of s2idle then according to PCI FW spec 3.2 section 4.6.8. there is a specific _DSM that allows the OS to skip the delays but this platform does not provide the _DSM and does not go to S3 anyway so no firmware is involved that could already handle these delays. In this particular Intel Coffee Lake platform these delays are not actually needed because there is an additional delay as part of the ACPI power resource that is used to turn on power to the hierarchy but since that additional delay is not required by any of standards (PCIe, ACPI) it is not present in the Intel Ice Lake, for example where missing the mandatory delays causes pciehp to start tearing down the stack too early (links are not yet trained). For this reason, change the PCIe portdrv PM resume hooks so that they perform the mandatory delays before the downstream component gets resumed. We perform the delays before port services are resumed because otherwise pciehp might find that the link is not up (even if it is just training) and tears-down the hierarchy. Signed-off-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki drivers/pci/pci.c | 29 +++++++++++------- drivers/pci/pci.h | 1 + drivers/pci/pcie/portdrv_core.c | 66 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 86 insertions(+), 10 deletions(-) commit f97252a8c33f0e02f4ffbf61dc94cd38164007bc Merge: 4bd366cecefa 4ffc37f5c077 Author: David S. Miller Date: Mon Jun 17 16:30:38 2019 -0700 Merge branch 'UDP-GSO-audit-tests' Fred Klassen says: ==================== UDP GSO audit tests Updates to UDP GSO selftests ot optionally stress test CMSG subsytem, and report the reliability and performance of both TX Timestamping and ZEROCOPY messages. ==================== Acked-by: Willem de Bruijn Signed-off-by: David S. Miller commit 4ffc37f5c07791ffe1de59a7c08fdf8d7f585a60 Author: Fred Klassen Date: Mon Jun 17 12:08:37 2019 -0700 net/udpgso_bench.sh test fails on error Ensure that failure on any individual test results in an overall failure of the test script. Signed-off-by: Fred Klassen Signed-off-by: David S. Miller tools/testing/selftests/net/udpgso_bench.sh | 33 +++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit ade90d69ffefd99e5e655ec6d976a96f010bb5b3 Author: Fred Klassen Date: Mon Jun 17 12:08:36 2019 -0700 net/udpgso_bench.sh add UDP GSO audit tests Audit tests count the total number of messages sent and compares with total number of CMSG received on error queue. Example: udp gso zerocopy timestamp audit udp rx: 1599 MB/s 1166414 calls/s udp tx: 1615 MB/s 27395 calls/s 27395 msg/s udp rx: 1634 MB/s 1192261 calls/s udp tx: 1633 MB/s 27699 calls/s 27699 msg/s udp rx: 1633 MB/s 1191358 calls/s udp tx: 1631 MB/s 27678 calls/s 27678 msg/s Summary over 4.000 seconds... sum udp tx: 1665 MB/s 82772 calls (27590/s) 82772 msgs (27590/s) Tx Timestamps: 82772 received 0 errors Zerocopy acks: 82772 received Errors are thrown if CMSG count does not equal send count, example: Summary over 4.000 seconds... sum tcp tx: 7451 MB/s 493706 calls (123426/s) 493706 msgs (123426/s) ./udpgso_bench_tx: Unexpected number of Zerocopy completions: 493706 expected 493704 received Also reduce individual test time from 4 to 3 seconds so that overall test time does not increase significantly. v3: Enhancements as per Willem de Bruijn - document -P option for TCP audit Signed-off-by: Fred Klassen Signed-off-by: David S. Miller tools/testing/selftests/net/udpgso_bench.sh | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit 79ebc3c26010eba3b6eaaad0efdf1f8ec19aaf9d Author: Fred Klassen Date: Mon Jun 17 12:08:35 2019 -0700 net/udpgso_bench_tx: options to exercise TX CMSG This enhancement adds options that facilitate load testing with additional TX CMSG options, and to optionally print results of various send CMSG operations. These options are especially useful in isolating situations where error-queue messages are lost when combined with other CMSG operations (e.g. SO_ZEROCOPY). New options: -a - count all CMSG messages and match to sent messages -T - add TX CMSG that requests TX software timestamps -H - similar to -T except request TX hardware timestamps -P - call poll() before reading error queue -v - print detailed results v2: Enhancements as per Willem de Bruijn - Updated control and buffer parameters for recvmsg - poll() parameter cleanup - fail on bad audit results - remove TOS options - improved reporting v3: Enhancements as per Willem de Bruijn - add SOF_TIMESTAMPING_OPT_TSONLY to eliminate MSG_TRUNC - general code cleanup Signed-off-by: Fred Klassen Signed-off-by: David S. Miller tools/testing/selftests/net/udpgso_bench_tx.c | 291 ++++++++++++++++++++++++-- 1 file changed, 276 insertions(+), 15 deletions(-) commit 4bd366cecefa3f1c35da58f0d75458d160e60612 Merge: 78fe8a28fb96 3cfa148826e3 Author: David S. Miller Date: Mon Jun 17 16:27:43 2019 -0700 Merge branch 'net-ipv4-remove-erroneous-advancement-of-list-pointer' Florian Westphal says: ==================== net: ipv4: remove erroneous advancement of list pointer Tariq reported a soft lockup on net-next that Mellanox was able to bisect to 2638eb8b50cf ("net: ipv4: provide __rcu annotation for ifa_list"). While reviewing above patch I found a regression when addresses have a lifetime specified. Second patch extends rtnetlink.sh to trigger crash (without first patch applied). ==================== Signed-off-by: David S. Miller commit 3cfa148826e3c666da1cc2a43fbe8689e2650636 Author: Florian Westphal Date: Mon Jun 17 16:02:28 2019 +0200 selftests: rtnetlink: add addresses with fixed life time This exercises kernel code path that deal with addresses that have a limited lifetime. Without previous fix, this triggers following crash on net-next: BUG: KASAN: null-ptr-deref in check_lifetime+0x403/0x670 Read of size 8 at addr 0000000000000010 by task kworker [..] Signed-off-by: Florian Westphal Signed-off-by: David S. Miller tools/testing/selftests/net/rtnetlink.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 40008e921133f95685ca4dfd7233b3df96af2bd6 Author: Florian Westphal Date: Mon Jun 17 16:02:27 2019 +0200 net: ipv4: remove erroneous advancement of list pointer Causes crash when lifetime expires on an adress as garbage is dereferenced soon after. This used to look like this: for (ifap = &ifa->ifa_dev->ifa_list; *ifap != NULL; ifap = &(*ifap)->ifa_next) { if (*ifap == ifa) ... but this was changed to: struct in_ifaddr *tmp; ifap = &ifa->ifa_dev->ifa_list; tmp = rtnl_dereference(*ifap); while (tmp) { tmp = rtnl_dereference(tmp->ifa_next); // Bogus if (rtnl_dereference(*ifap) == ifa) { ... ifap = &tmp->ifa_next; // Can be NULL tmp = rtnl_dereference(*ifap); // Dereference } } Remove the bogus assigment/list entry skip. Fixes: 2638eb8b50cf ("net: ipv4: provide __rcu annotation for ifa_list") Signed-off-by: Florian Westphal Signed-off-by: David S. Miller net/ipv4/devinet.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 78fe8a28fb9615c3c255702ed854f7796f266661 Author: Arnd Bergmann Date: Mon Jun 17 15:14:10 2019 +0200 net: dsa: sja1105: fix ptp link error Due to a reversed dependency, it is possible to build the lower ptp driver as a loadable module and the actual driver using it as built-in, causing a link error: drivers/net/dsa/sja1105/sja1105_spi.o: In function `sja1105_static_config_upload': sja1105_spi.c:(.text+0x6f0): undefined reference to `sja1105_ptp_reset' drivers/net/dsa/sja1105/sja1105_spi.o:(.data+0x2d4): undefined reference to `sja1105et_ptp_cmd' drivers/net/dsa/sja1105/sja1105_spi.o:(.data+0x604): undefined reference to `sja1105pqrs_ptp_cmd' drivers/net/dsa/sja1105/sja1105_main.o: In function `sja1105_remove': sja1105_main.c:(.text+0x8d4): undefined reference to `sja1105_ptp_clock_unregister' drivers/net/dsa/sja1105/sja1105_main.o: In function `sja1105_rxtstamp_work': sja1105_main.c:(.text+0x964): undefined reference to `sja1105_tstamp_reconstruct' drivers/net/dsa/sja1105/sja1105_main.o: In function `sja1105_setup': sja1105_main.c:(.text+0xb7c): undefined reference to `sja1105_ptp_clock_register' drivers/net/dsa/sja1105/sja1105_main.o: In function `sja1105_port_deferred_xmit': sja1105_main.c:(.text+0x1fa0): undefined reference to `sja1105_ptpegr_ts_poll' sja1105_main.c:(.text+0x1fc4): undefined reference to `sja1105_tstamp_reconstruct' drivers/net/dsa/sja1105/sja1105_main.o:(.rodata+0x5b0): undefined reference to `sja1105_get_ts_info' Change the Makefile logic to always build the ptp module the same way as the rest. Another option would be to just add it to the same module and remove the exports, but I don't know if there was a good reason to keep them separate. Fixes: bb77f36ac21d ("net: dsa: sja1105: Add support for the PTP clock") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/dsa/sja1105/Kconfig | 2 +- drivers/net/dsa/sja1105/Makefile | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) commit c63d1e5c2d3d18a3a9590b8cd1b11e27b23e244d Author: Arnd Bergmann Date: Mon Jun 17 15:13:03 2019 +0200 net: stmmac: fix unused-variable warning When building without CONFIG_OF, we get a harmless build warning: drivers/net/ethernet/stmicro/stmmac/stmmac_main.c: In function 'stmmac_phy_setup': drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:973:22: error: unused variable 'node' [-Werror=unused-variable] struct device_node *node = priv->plat->phy_node; Reword it so we always use the local variable, by making it the fwnode pointer instead of the device_node. Fixes: 74371272f97f ("net: stmmac: Convert to phylink and remove phylib logic") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit efa14c3985828da3163f5372137cb64d992b0f79 Author: Mitch Williams Date: Tue May 14 10:37:09 2019 -0700 iavf: allow null RX descriptors In some circumstances, the hardware can hand us a null receive descriptor, with no data attached but otherwise valid. Unfortunately, the driver was ill-equipped to handle such an event, and would stop processing packets at that point. To fix this, use the Descriptor Done bit instead of the size to determine whether or not a descriptor is ready to be processed. Add some checks to allow for unused buffers. Signed-off-by: Mitch Williams Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/iavf/iavf_txrx.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) commit 68dfe6348f06945f900bfea803e1e030e7e158e6 Author: Paul Greenwalt Date: Tue May 14 10:37:08 2019 -0700 iavf: add call to iavf_[add|del]_cloud_filter Add call to iavf_add_cloud_filter and iavf_del_cloud_filter from iavf_process_aq_command to clear aq_required IAVF_FLAG_AQ_ADD_CLOUD_FILTER and IAVF_FLAG_AQ_DEL_CLOUD_FILTER bits. aq_required IAVF_FLAG_AQ_DEL_CLOUD_FILTER bit is being set in iavf_down and iavf_delete_clsflower, and are never cleared. aq_required IAVF_FLAG_AQ_ADD_CLOUD_FILTER bit is being set in iavf_handle_reset and iavf_configure_clsflower, and are never cleared. Since the aq_required is not zero, iavf_watchdog_task is setting the queue_delayed_work to 20 msec instead of the longer delay. Signed-off-by: Paul Greenwalt Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/iavf/iavf_main.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit b66c7bc1cd4d724db73ffaa4b24c64bcb3338bb9 Author: Jakub Pawlak Date: Tue May 14 10:37:07 2019 -0700 iavf: Refactor init state machine Cleanup of init state machine, move state specific code to separate functions and rewrite the iavf_init_task() function. Signed-off-by: Jakub Pawlak Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/iavf/iavf_main.c | 451 ++++++++++++++++------------ 1 file changed, 261 insertions(+), 190 deletions(-) commit bac8486116b0ee3d5eba07532b4cbba02834979a Author: Jan Sokolowski Date: Tue May 14 10:37:06 2019 -0700 iavf: Refactor the watchdog state machine Refactor the watchdog state machine implementation. Add the additional state __IAVF_COMM_FAILED to process the PF communication fails. Prepare the watchdog state machine to integrate with init state machine. Signed-off-by: Jan Sokolowski Signed-off-by: Jakub Pawlak Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/iavf/iavf.h | 1 + drivers/net/ethernet/intel/iavf/iavf_main.c | 73 +++++++++++++++++------------ 2 files changed, 44 insertions(+), 30 deletions(-) commit fdd4044ffdc8313b91353af7879a39ef9c683bec Author: Jakub Pawlak Date: Tue May 14 10:37:05 2019 -0700 iavf: Remove timer for work triggering, use delaying work instead Remove the watchdog timer, instead declare watchdog task as delayed work and use dedicated workqueue to service driver tasks. The dedicated driver workqueue iavf_wq is common for all driver instances. Signed-off-by: Jakub Pawlak Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/iavf/iavf.h | 4 +- drivers/net/ethernet/intel/iavf/iavf_ethtool.c | 4 +- drivers/net/ethernet/intel/iavf/iavf_main.c | 66 ++++++++++--------------- drivers/net/ethernet/intel/iavf/iavf_virtchnl.c | 2 +- 4 files changed, 31 insertions(+), 45 deletions(-) commit b476b0030e612e0c968fed91e52db2c4a9786476 Author: Jakub Pawlak Date: Tue May 14 10:37:04 2019 -0700 iavf: Move commands processing to the separate function Move the commands processing outside the watchdog_task() function. This reduce length and complexity of the function which is mainly designed to process the watchdog state machine. Signed-off-by: Jakub Pawlak Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/iavf/iavf_main.c | 197 +++++++++++++++------------- 1 file changed, 105 insertions(+), 92 deletions(-) commit 16e00c25ac36d09c077aa0f296e053538096a48d Author: Avinash Dayanand Date: Tue May 14 10:37:03 2019 -0700 iavf: Fix the math for valid length for ADq enable There was a calculation error in virtchnl regarding the valid length which was fixed recently and a corresponding change needs to go into the code while we enable ADq. Signed-off-by: Avinash Dayanand Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/iavf/iavf_virtchnl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f0a48fb44138bdb0a7b02082f2fd048903478451 Author: Aleksandr Loktionov Date: Tue May 14 10:37:02 2019 -0700 iavf: Change GFP_KERNEL to GFP_ATOMIC in kzalloc() iavf_add_vlan() is being called in atomic context so kzalloc() needs GFP_ATOMIC. This patch fixes it. Signed-off-by: Aleksandr Loktionov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/iavf/iavf_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 88ec7308eadb1deb2177265e12f9845d1be56e23 Author: Mitch Williams Date: Tue May 14 10:37:01 2019 -0700 iavf: wait longer for close to complete On some hardware/driver/architecture combinations, it may take longer than 200msec for all close operations to be completed, causing a spurious error message to be logged. Increase the timeout value to 500msec to avoid this erroneous error. Signed-off-by: Mitch Williams Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/iavf/iavf_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 168d91cf2a90a809502b665fff6b4c66579e8f0a Author: Mitch Williams Date: Tue May 14 10:37:00 2019 -0700 iavf: use signed variable The counter variable in iavf_clean_tx_irq starts out negative and climbs to 0. So allocating it as u16 is actually a really bad idea that just happens to work because the value underflows and overflows consistently on most architectures. Replace the u16 with an int so signed math works as expected. Signed-off-by: Mitch Williams Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/iavf/iavf_txrx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c2417a7b0e3c0bb173067bc06e6ba08c3138b5b1 Author: Akeem G Abodunrin Date: Tue May 14 10:36:59 2019 -0700 iavf: Create VLAN tag elements starting from the first element This patch changes how VLAN tag are being populated and programmed into the HW - Instead of start adding VF VLAN tag from the last member of the element list, start from the first member of the list, until number of allowed VLAN tags is exhausted in the HW. Signed-off-by: Akeem G Abodunrin Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/iavf/iavf_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 4d18f6de6ac1d85dc0bc85481fb7cabde09e59ae Author: Daniel T. Lee Date: Sun Jun 16 00:14:47 2019 +0900 samples: bpf: refactor header include path Currently, header inclusion in each file is inconsistent. For example, "libbpf.h" header is included as multiple ways. #include "bpf/libbpf.h" #include "libbpf.h" Due to commit b552d33c80a9 ("samples/bpf: fix include path in Makefile"), $(srctree)/tools/lib/bpf/ path had been included during build, path "bpf/" in header isn't necessary anymore. This commit removes path "bpf/" in header inclusion. Signed-off-by: Daniel T. Lee Signed-off-by: Daniel Borkmann samples/bpf/fds_example.c | 2 +- samples/bpf/hbm.c | 4 ++-- samples/bpf/ibumad_user.c | 2 +- samples/bpf/sockex1_user.c | 2 +- samples/bpf/sockex2_user.c | 2 +- samples/bpf/xdp1_user.c | 4 ++-- samples/bpf/xdp_adjust_tail_user.c | 4 ++-- samples/bpf/xdp_fwd_user.c | 2 +- samples/bpf/xdp_redirect_cpu_user.c | 2 +- samples/bpf/xdp_redirect_map_user.c | 2 +- samples/bpf/xdp_redirect_user.c | 2 +- samples/bpf/xdp_router_ipv4_user.c | 2 +- samples/bpf/xdp_rxq_info_user.c | 4 ++-- samples/bpf/xdp_tx_iptunnel_user.c | 2 +- samples/bpf/xdpsock_user.c | 4 ++-- 15 files changed, 20 insertions(+), 20 deletions(-) commit fa206dccd85d7682d36de4ccca1549e93c501d9d Author: Daniel T. Lee Date: Sun Jun 16 00:14:46 2019 +0900 samples: bpf: remove unnecessary include options in Makefile Due to recent change of include path at commit b552d33c80a9 ("samples/bpf: fix include path in Makefile"), some of the previous include options became unnecessary. This commit removes duplicated include options in Makefile. Signed-off-by: Daniel T. Lee Signed-off-by: Daniel Borkmann samples/bpf/Makefile | 9 --------- 1 file changed, 9 deletions(-) commit 32b88d3743573222c3ce0165727b6a4c4f7c245b Merge: 7f94208c8f9a df0b77925982 Author: Daniel Borkmann Date: Tue Jun 18 00:11:14 2019 +0200 Merge branch 'bpf-libbpf-btf-defined-maps' Andrii Nakryiko says: ==================== This patch set implements initial version (as discussed at LSF/MM2019 conference) of a new way to specify BPF maps, relying on BTF type information, which allows for easy extensibility, preserving forward and backward compatibility. See details and examples in description for patch #6. [0] contains an outline of follow up extensions to be added after this basic set of features lands. They are useful by itself, but also allows to bring libbpf to feature-parity with iproute2 BPF loader. That should open a path forward for BPF loaders unification. Patch #1 centralizes commonly used min/max macro in libbpf_internal.h. Patch #2 extracts .BTF and .BTF.ext loading loging from elf_collect(). Patch #3 simplifies elf_collect() error-handling logic. Patch #4 refactors map initialization logic into user-provided maps and global data maps, in preparation to adding another way (BTF-defined maps). Patch #5 adds support for map definitions in multiple ELF sections and deprecates bpf_object__find_map_by_offset() API which doesn't appear to be used anymore and makes assumption that all map definitions reside in single ELF section. Patch #6 splits BTF intialization from sanitization/loading into kernel to preserve original BTF at the time of map initialization. Patch #7 adds support for BTF-defined maps. Patch #8 adds new test for BTF-defined map definition. Patches #9-11 convert test BPF map definitions to use BTF way. [0] https://lore.kernel.org/bpf/CAEf4BzbfdG2ub7gCi0OYqBrUoChVHWsmOntWAkJt47=FE+km+A@mail.gmail.com/ v1->v2: - more BTF-sanity checks in parsing map definitions (Song); - removed confusing usage of "attribute", switched to "field; - split off elf_collect() refactor from btf loading refactor (Song); - split selftests conversion into 3 patches (Stanislav): 1. test already relying on BTF; 2. tests w/ custom types as key/value (so benefiting from BTF); 3. all the rest tests (integers as key/value, special maps w/o BTF support). - smaller code improvements (Song); rfc->v1: - error out on unknown field by default (Stanislav, Jakub, Lorenz); ==================== Signed-off-by: Daniel Borkmann commit df0b7792598291128fcca66b039fd027be25c10a Author: Andrii Nakryiko Date: Mon Jun 17 12:26:59 2019 -0700 selftests/bpf: convert tests w/ custom values to BTF-defined maps Convert a bulk of selftests that have maps with custom (not integer) key and/or value. Signed-off-by: Andrii Nakryiko Acked-by: Song Liu Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/progs/bpf_flow.c | 18 +++++-- .../selftests/bpf/progs/socket_cookie_prog.c | 11 ++-- .../selftests/bpf/progs/test_get_stack_rawtp.c | 27 +++++++--- .../testing/selftests/bpf/progs/test_global_data.c | 27 ++++++---- tools/testing/selftests/bpf/progs/test_l4lb.c | 45 ++++++++++------ .../selftests/bpf/progs/test_l4lb_noinline.c | 45 ++++++++++------ .../bpf/progs/test_select_reuseport_kern.c | 45 +++++++++++----- .../selftests/bpf/progs/test_stacktrace_build_id.c | 44 +++++++++++----- .../selftests/bpf/progs/test_stacktrace_map.c | 40 ++++++++++----- .../testing/selftests/bpf/progs/test_tcp_estats.c | 9 ++-- .../testing/selftests/bpf/progs/test_tcpbpf_kern.c | 18 ++++--- .../selftests/bpf/progs/test_tcpnotify_kern.c | 18 +++++-- tools/testing/selftests/bpf/progs/test_xdp.c | 18 ++++--- .../selftests/bpf/progs/test_xdp_noinline.c | 60 +++++++++++++--------- 14 files changed, 285 insertions(+), 140 deletions(-) commit f654407481e9bbba7039e939163ef60f9d5e43ba Author: Andrii Nakryiko Date: Mon Jun 17 12:26:58 2019 -0700 selftests/bpf: switch BPF_ANNOTATE_KV_PAIR tests to BTF-defined maps Switch tests that already rely on BTF to BTF-defined map definitions. Signed-off-by: Andrii Nakryiko Acked-by: Song Liu Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/progs/netcnt_prog.c | 22 ++++---- tools/testing/selftests/bpf/progs/test_map_lock.c | 22 ++++---- .../selftests/bpf/progs/test_send_signal_kern.c | 22 ++++---- .../selftests/bpf/progs/test_sock_fields_kern.c | 60 +++++++++++++--------- tools/testing/selftests/bpf/progs/test_spin_lock.c | 33 ++++++------ 5 files changed, 87 insertions(+), 72 deletions(-) commit 9e3d709c47ca3d10df461635b350edef94f3cf11 Author: Andrii Nakryiko Date: Mon Jun 17 12:26:57 2019 -0700 selftests/bpf: add test for BTF-defined maps Add file test for BTF-defined map definition. Signed-off-by: Andrii Nakryiko Acked-by: Song Liu Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/progs/test_btf_newkv.c | 73 ++++++++++++++++++++++ tools/testing/selftests/bpf/test_btf.c | 10 +-- 2 files changed, 76 insertions(+), 7 deletions(-) commit abd29c9314595b1ee5ec6c61d7c49a497ffb30a3 Author: Andrii Nakryiko Date: Mon Jun 17 12:26:56 2019 -0700 libbpf: allow specifying map definitions using BTF This patch adds support for a new way to define BPF maps. It relies on BTF to describe mandatory and optional attributes of a map, as well as captures type information of key and value naturally. This eliminates the need for BPF_ANNOTATE_KV_PAIR hack and ensures key/value sizes are always in sync with the key/value type. Relying on BTF, this approach allows for both forward and backward compatibility w.r.t. extending supported map definition features. By default, any unrecognized attributes are treated as an error, but it's possible relax this using MAPS_RELAX_COMPAT flag. New attributes, added in the future will need to be optional. The outline of the new map definition (short, BTF-defined maps) is as follows: 1. All the maps should be defined in .maps ELF section. It's possible to have both "legacy" map definitions in `maps` sections and BTF-defined maps in .maps sections. Everything will still work transparently. 2. The map declaration and initialization is done through a global/static variable of a struct type with few mandatory and extra optional fields: - type field is mandatory and specified type of BPF map; - key/value fields are mandatory and capture key/value type/size information; - max_entries attribute is optional; if max_entries is not specified or initialized, it has to be provided in runtime through libbpf API before loading bpf_object; - map_flags is optional and if not defined, will be assumed to be 0. 3. Key/value fields should be **a pointer** to a type describing key/value. The pointee type is assumed (and will be recorded as such and used for size determination) to be a type describing key/value of the map. This is done to save excessive amounts of space allocated in corresponding ELF sections for key/value of big size. 4. As some maps disallow having BTF type ID associated with key/value, it's possible to specify key/value size explicitly without associating BTF type ID with it. Use key_size and value_size fields to do that (see example below). Here's an example of simple ARRAY map defintion: struct my_value { int x, y, z; }; struct { int type; int max_entries; int *key; struct my_value *value; } btf_map SEC(".maps") = { .type = BPF_MAP_TYPE_ARRAY, .max_entries = 16, }; This will define BPF ARRAY map 'btf_map' with 16 elements. The key will be of type int and thus key size will be 4 bytes. The value is struct my_value of size 12 bytes. This map can be used from C code exactly the same as with existing maps defined through struct bpf_map_def. Here's an example of STACKMAP definition (which currently disallows BTF type IDs for key/value): struct { __u32 type; __u32 max_entries; __u32 map_flags; __u32 key_size; __u32 value_size; } stackmap SEC(".maps") = { .type = BPF_MAP_TYPE_STACK_TRACE, .max_entries = 128, .map_flags = BPF_F_STACK_BUILD_ID, .key_size = sizeof(__u32), .value_size = PERF_MAX_STACK_DEPTH * sizeof(struct bpf_stack_build_id), }; This approach is naturally extended to support map-in-map, by making a value field to be another struct that describes inner map. This feature is not implemented yet. It's also possible to incrementally add features like pinning with full backwards and forward compatibility. Support for static initialization of BPF_MAP_TYPE_PROG_ARRAY using pointers to BPF programs is also on the roadmap. Signed-off-by: Andrii Nakryiko Acked-by: Song Liu Signed-off-by: Daniel Borkmann tools/lib/bpf/btf.h | 1 + tools/lib/bpf/libbpf.c | 353 +++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 345 insertions(+), 9 deletions(-) commit 063183bf0486c7e61a2b454896bba2f7908b4ab0 Author: Andrii Nakryiko Date: Mon Jun 17 12:26:55 2019 -0700 libbpf: split initialization and loading of BTF Libbpf does sanitization of BTF before loading it into kernel, if kernel doesn't support some of newer BTF features. This removes some of the important information from BTF (e.g., DATASEC and VAR description), which will be used for map construction. This patch splits BTF processing into initialization step, in which BTF is initialized from ELF and all the original data is still preserved; and sanitization/loading step, which ensures that BTF is safe to load into kernel. This allows to use full BTF information to construct maps, while still loading valid BTF into older kernels. Signed-off-by: Andrii Nakryiko Acked-by: Song Liu Signed-off-by: Daniel Borkmann tools/lib/bpf/libbpf.c | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) commit db48814bd2833ee231f48bd2030082369b88f9ef Author: Andrii Nakryiko Date: Mon Jun 17 12:26:54 2019 -0700 libbpf: identify maps by section index in addition to offset To support maps to be defined in multiple sections, it's important to identify map not just by offset within its section, but section index as well. This patch adds tracking of section index. For global data, we record section index of corresponding .data/.bss/.rodata ELF section for uniformity, and thus don't need a special value of offset for those maps. Signed-off-by: Andrii Nakryiko Acked-by: Song Liu Signed-off-by: Daniel Borkmann tools/lib/bpf/libbpf.c | 40 +++++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 15 deletions(-) commit bf82927125dd25003d76ed5541da704df21de57a Author: Andrii Nakryiko Date: Mon Jun 17 12:26:53 2019 -0700 libbpf: refactor map initialization User and global data maps initialization has gotten pretty complicated and unnecessarily convoluted. This patch splits out the logic for global data map and user-defined map initialization. It also removes the restriction of pre-calculating how many maps will be initialized, instead allowing to keep adding new maps as they are discovered, which will be used later for BTF-defined map definitions. Signed-off-by: Andrii Nakryiko Acked-by: Song Liu Signed-off-by: Daniel Borkmann tools/lib/bpf/libbpf.c | 247 ++++++++++++++++++++++++++----------------------- 1 file changed, 133 insertions(+), 114 deletions(-) commit 01b29d1dc9a06e2cdc6a0172d35605eb0300ecb2 Author: Andrii Nakryiko Date: Mon Jun 17 12:26:52 2019 -0700 libbpf: streamline ELF parsing error-handling Simplify ELF parsing logic by exiting early, as there is no common clean up path to execute. That makes it unnecessary to track when err was set and when it was cleared. It also reduces nesting in some places. Signed-off-by: Andrii Nakryiko Acked-by: Song Liu Signed-off-by: Daniel Borkmann tools/lib/bpf/libbpf.c | 44 ++++++++++++++++++++------------------------ 1 file changed, 20 insertions(+), 24 deletions(-) commit 9c6660d0406f8c32d21957ca9853108513bea8b1 Author: Andrii Nakryiko Date: Mon Jun 17 12:26:51 2019 -0700 libbpf: extract BTF loading logic As a preparation for adding BTF-based BPF map loading, extract .BTF and .BTF.ext loading logic. Signed-off-by: Andrii Nakryiko Acked-by: Song Liu Signed-off-by: Daniel Borkmann tools/lib/bpf/libbpf.c | 93 +++++++++++++++++++++++++++++--------------------- 1 file changed, 55 insertions(+), 38 deletions(-) commit d7fe74f9404a9736e9d4f754c30e43640a822c17 Author: Andrii Nakryiko Date: Mon Jun 17 12:26:50 2019 -0700 libbpf: add common min/max macro to libbpf_internal.h Multiple files in libbpf redefine their own definitions for min/max. Let's define them in libbpf_internal.h and use those everywhere. Signed-off-by: Andrii Nakryiko Acked-by: Song Liu Signed-off-by: Daniel Borkmann tools/lib/bpf/bpf.c | 7 ++----- tools/lib/bpf/bpf_prog_linfo.c | 5 +---- tools/lib/bpf/btf.c | 3 --- tools/lib/bpf/btf_dump.c | 3 --- tools/lib/bpf/libbpf_internal.h | 7 +++++++ 5 files changed, 10 insertions(+), 15 deletions(-) commit 56f0f84e69c7a7f229dfa524b13b0ceb6ce9b09e Author: Anton Protopopov Date: Sat Jun 15 22:53:48 2019 +0000 bpf: fix the check that forwarding is enabled in bpf_ipv6_fib_lookup The bpf_ipv6_fib_lookup function should return BPF_FIB_LKUP_RET_FWD_DISABLED when forwarding is disabled for the input device. However instead of checking if forwarding is enabled on the input device, it checked the global net->ipv6.devconf_all->forwarding flag. Change it to behave as expected. Fixes: 87f5fc7e48dd ("bpf: Provide helper to do forwarding lookups in kernel FIB table") Signed-off-by: Anton Protopopov Acked-by: Toke Høiland-Jørgensen Reviewed-by: David Ahern Signed-off-by: Daniel Borkmann net/core/filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f517f2716c34087ca15a36e9f13dbca8bd2e3ffc Author: Jiri Pirko Date: Mon Jun 17 18:02:32 2019 +0200 net: sched: cls_matchall: allow to delete filter Currently user is unable to delete the filter. See following example: $ tc filter add dev ens16np1 ingress pref 1 handle 1 matchall action drop $ tc filter show dev ens16np1 ingress filter protocol all pref 1 matchall chain 0 filter protocol all pref 1 matchall chain 0 handle 0x1 in_hw action order 1: gact action drop random type none pass val 0 index 1 ref 1 bind 1 $ tc filter del dev ens16np1 ingress pref 1 handle 1 matchall action drop RTNETLINK answers: Operation not supported Implement tcf_proto_ops->delete() op and allow user to delete the filter. Reported-by: Eli Cohen Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller net/sched/cls_matchall.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit ad9bf5451945877c73ca3f49b803648363322f0e Author: Colin Ian King Date: Mon Jun 17 12:42:14 2019 +0100 net: hns3: fix dereference of ae_dev before it is null checked Pointer ae_dev is null checked however, prior to that it is dereferenced when assigned pointer ops. Fix this by assigning pointer ops after ae_dev has been null checked. Addresses-Coverity: ("Dereference before null check") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 76bc27a26acc950eb1739def65f19b92302eee4e Author: Gao Xiang Date: Tue Jun 11 10:42:20 2019 +0800 staging: erofs: rename data_mapping_mode to datamode data_mapping_mode is too long as a member name of erofs_vnode, datamode is straight-forward enough. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman drivers/staging/erofs/inode.c | 17 ++++++++--------- drivers/staging/erofs/internal.h | 10 ++++------ 2 files changed, 12 insertions(+), 15 deletions(-) commit 98a716ce1d6ae09a3ed4acabec4bd3236515a0f4 Merge: faa398844161 5efe5137f05b Author: Greg Kroah-Hartman Date: Mon Jun 17 23:00:37 2019 +0200 Merge branch 'erofs_fix' into staging-next erofs needed a fix in both -linus and -next branches at the same time. Signed-off-by: Greg Kroah-Hartman commit 43321251e2f2805aac8fa70bb084814388a91002 Merge: 098eadce3c62 c197d6362750 Author: David S. Miller Date: Mon Jun 17 14:00:30 2019 -0700 Merge branch 'net-sched-act_ctinfo-fixes' Kevin Darbyshire-Bryant says: ==================== net: sched: act_ctinfo: fixes This is first attempt at sending a small series. Order is important because one bug (policy validation) prevents us from encountering the more important 'OOPS' generating bug in action creation. Fix the OOPS first. Confession time: Until very recently, development of this module has been done on 'net-next' tree to 'clean compile' level with run-time testing on backports to 4.14 & 4.19 kernels under openwrt. It turns out that sched: action: based code has been under more active change than I realised. During the back & forward porting during development & testing, the critical ACT_P_CREATED return code got missed despite being in the 4.14 & 4.19 backports. I have now gone through the init functions, using act_csum as reference with a fine toothed comb and am happy they do the same things. This issue hadn't been caught till now due to another issue caused by new strict nla_parse_nested function failing parsing validation before action creation. Thanks to Marcelo Leitner for flagging extack deficiency (fixed in 733f0766c3de sched: act_ctinfo: use extack error reporting) which led to b424e432e770 ("netlink: add validation of NLA_F_NESTED flag") and 8cb081746c03 ("netlink: make validation more configurable for future strictness”) which led to the policy validation fix, which then led to the action creation fix both contained in this series. If I ever get to a developer conference please feel free to tar/feather/apply cone of shame. ==================== Signed-off-by: David S. Miller commit c197d636275031aaacb6fa969221d2be22837067 Author: Kevin Darbyshire-Bryant Date: Mon Jun 17 11:03:27 2019 +0100 net: sched: act_ctinfo: fix policy validation Fix nla_policy definition by specifying an exact length type attribute to CTINFO action paraneter block structure. Without this change, netlink parsing will fail validation and the action will not be instantiated. 8cb081746c03 ("netlink: make validation more configurable for future") introduced much stricter checking to attributes being passed via netlink. Existing actions were updated to use less restrictive deprecated versions of nla_parse_nested. As a new module, act_ctinfo should be designed to use the strict checking model otherwise, well, what was the point of implementing it. Confession time: Until very recently, development of this module has been done on 'net-next' tree to 'clean compile' level with run-time testing on backports to 4.14 & 4.19 kernels under openwrt. This is how I managed to miss the run-time impacts of the new strict nla_parse_nested function. I hopefully have learned something from this (glances toward laptop running a net-next kernel) There is however a still outstanding implication on iproute2 user space in that it needs to be told to pass nested netlink messages with the nested attribute actually set. So even with this kernel fix to do things correctly you still cannot instantiate a new 'strict' nla_parse_nested based action such as act_ctinfo with iproute2's tc. Signed-off-by: Kevin Darbyshire-Bryant Signed-off-by: David S. Miller net/sched/act_ctinfo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a658c2e49f02eedafd3e1b6e30a8a9b173d7248b Author: Kevin Darbyshire-Bryant Date: Mon Jun 17 11:03:26 2019 +0100 net: sched: act_ctinfo: fix action creation Use correct return value on action creation: ACT_P_CREATED. The use of incorrect return value could result in a situation where the system thought a ctinfo module was listening but actually wasn't instantiated correctly leading to an OOPS in tcf_generic_walker(). Confession time: Until very recently, development of this module has been done on 'net-next' tree to 'clean compile' level with run-time testing on backports to 4.14 & 4.19 kernels under openwrt. During the back & forward porting during development & testing, the critical ACT_P_CREATED return code got missed despite being in the 4.14 & 4.19 backports. I have now gone through the init functions, using act_csum as reference with a fine toothed comb. Bonus, no more OOPSes. I managed to also miss this issue till now due to the new strict nla_parse_nested function failing validation before action creation. As an inexperienced developer I've learned that copy/pasting/backporting/forward porting code correctly is hard. If I ever get to a developer conference I shall don the cone of shame. Signed-off-by: Kevin Darbyshire-Bryant Signed-off-by: David S. Miller net/sched/act_ctinfo.c | 1 + 1 file changed, 1 insertion(+) commit 098eadce3c622c07b328d0a43dda379b38cf7c5e Author: Jason Wang Date: Mon Jun 17 05:20:54 2019 -0400 vhost_net: disable zerocopy by default Vhost_net was known to suffer from HOL[1] issues which is not easy to fix. Several downstream disable the feature by default. What's more, the datapath was split and datacopy path got the support of batching and XDP support recently which makes it faster than zerocopy part for small packets transmission. It looks to me that disable zerocopy by default is more appropriate. It cold be enabled by default again in the future if we fix the above issues. [1] https://patchwork.kernel.org/patch/3787671/ Signed-off-by: Jason Wang Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller drivers/vhost/net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c681edae33e86ff27be2d6cc717663d91df20b0e Author: Ard Biesheuvel Date: Mon Jun 17 10:09:33 2019 +0200 net: ipv4: move tcp_fastopen server side code to SipHash library Using a bare block cipher in non-crypto code is almost always a bad idea, not only for security reasons (and we've seen some examples of this in the kernel in the past), but also for performance reasons. In the TCP fastopen case, we call into the bare AES block cipher one or two times (depending on whether the connection is IPv4 or IPv6). On most systems, this results in a call chain such as crypto_cipher_encrypt_one(ctx, dst, src) crypto_cipher_crt(tfm)->cit_encrypt_one(crypto_cipher_tfm(tfm), ...); aesni_encrypt kernel_fpu_begin(); aesni_enc(ctx, dst, src); // asm routine kernel_fpu_end(); It is highly unlikely that the use of special AES instructions has a benefit in this case, especially since we are doing the above twice for IPv6 connections, instead of using a transform which can process the entire input in one go. We could switch to the cbcmac(aes) shash, which would at least get rid of the duplicated overhead in *some* cases (i.e., today, only arm64 has an accelerated implementation of cbcmac(aes), while x86 will end up using the generic cbcmac template wrapping the AES-NI cipher, which basically ends up doing exactly the above). However, in the given context, it makes more sense to use a light-weight MAC algorithm that is more suitable for the purpose at hand, such as SipHash. Since the output size of SipHash already matches our chosen value for TCP_FASTOPEN_COOKIE_SIZE, and given that it accepts arbitrary input sizes, this greatly simplifies the code as well. NOTE: Server farms backing a single server IP for load balancing purposes and sharing a single fastopen key will be adversely affected by this change unless all systems in the pool receive their kernel upgrades at the same time. Signed-off-by: Ard Biesheuvel Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/linux/tcp.h | 7 +--- include/net/tcp.h | 10 ++--- net/Kconfig | 2 - net/ipv4/tcp_fastopen.c | 97 ++++++++++++++++--------------------------------- 4 files changed, 36 insertions(+), 80 deletions(-) commit c6f7acb80abf5f73be4ee08541e3393a0146b15e Author: Matt Roper Date: Fri Jun 14 17:42:10 2019 -0700 drm/i915/ehl: Introduce Mule Creek Canyon PCH Although EHL introduces a new PCH, the South Display part of the PCH that we care about is nearly identical to ICP, just with some pins remapped. Most notably, Port C is mapped to the pins that ICP uses for TC Port 1. Signed-off-by: Matt Roper Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20190615004210.16656-1-matthew.d.roper@intel.com drivers/gpu/drm/i915/display/intel_bios.c | 11 ++++++++++- drivers/gpu/drm/i915/display/intel_gmbus.c | 14 ++++++++++++-- drivers/gpu/drm/i915/display/intel_hdmi.c | 26 +++++++++++++++++++++++++- drivers/gpu/drm/i915/display/intel_vbt_defs.h | 3 +++ drivers/gpu/drm/i915/i915_drv.c | 8 +++++++- drivers/gpu/drm/i915/i915_drv.h | 3 +++ drivers/gpu/drm/i915/i915_irq.c | 19 ++++++++++++++----- 7 files changed, 74 insertions(+), 10 deletions(-) commit 6a6b5c8bff89c76b09a921ef05b042fdee940f2a Author: Tuong Lien Date: Mon Jun 17 12:15:42 2019 +0700 tipc: include retrans failure detection for unicast In patch series, commit 9195948fbf34 ("tipc: improve TIPC throughput by Gap ACK blocks"), as for simplicity, the repeated retransmit failures' detection in the function - "tipc_link_retrans()" was kept there for broadcast retransmissions only. This commit now reapplies this feature for link unicast retransmissions that has been done via the function - "tipc_link_advance_transmq()". Also, the "tipc_link_retrans()" is renamed to "tipc_link_bc_retrans()" as it is used only for broadcast. Acked-by: Jon Maloy Signed-off-by: Tuong Lien Signed-off-by: David S. Miller net/tipc/link.c | 106 +++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 70 insertions(+), 36 deletions(-) commit 9ed68ca0d90b53ba00745cb61ef105599532226f Author: Hangbin Liu Date: Mon Jun 17 09:32:55 2019 +0800 team: add ethtool get_link_ksettings Like bond, add ethtool get_link_ksettings to show the total speed. v2: no update, just repost. Signed-off-by: Hangbin Liu Acked-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/team/team.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 8bb0d36cbaeec31787a3062a1c433905d53afec5 Author: Robert Hancock Date: Mon Jun 10 10:23:44 2019 -0600 iio: adc: xilinx: support all platforms Since the XADC logic can be used with standalone Xilinx FPGAs, this driver can potentially be used with many different platforms, not just the Zynq and MicroBlaze platforms this driver was allowed to be built for. There should be no platform-specific code in this driver, so just delete the platform dependency. Signed-off-by: Robert Hancock Signed-off-by: Jonathan Cameron drivers/iio/adc/Kconfig | 1 - 1 file changed, 1 deletion(-) commit 7e8b817e5978fdaabba37ab1d2ddb062a4c9abbb Author: Shobhit Kukreti Date: Mon Jun 10 20:55:57 2019 -0700 iio: humidity: Replace older GPIO APIs with GPIO Consumer APIs for the dht11 sensor The dht11 driver uses a single gpio to make measurements. It was using the older global gpio numberspace. The patch replaces the old gpio api with the new gpio descriptor based api. Removed header files "linux/gpio.h" and "linux/of_gpio.h" Signed-off-by: Shobhit Kukreti Acked-by: Harald Geyer Signed-off-by: Jonathan Cameron drivers/iio/humidity/dht11.c | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) commit 517b2d045aebf3d662c642723897cf9f66044271 Author: Patrick Havelange Date: Wed Jun 12 16:52:23 2019 +0200 MAINTAINERS: add counter/ftm-quaddec driver entry Adding myself as maintainer for this driver Signed-off-by: Patrick Havelange Signed-off-by: Jonathan Cameron MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) commit 4766975556e70fd673162fb980acc43b281d6ed0 Author: Melissa Wen Date: Fri Jun 14 13:33:19 2019 -0300 staging: iio: ad7150: clean up of comments General cleaning of comments to remove useless information or improve description. Signed-off-by: Melissa Wen Signed-off-by: Jonathan Cameron drivers/staging/iio/cdc/ad7150.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit 28c7901451b662c0bf200ed22c110e212e40f3ba Author: Melissa Wen Date: Fri Jun 14 13:32:54 2019 -0300 staging: iio: ad7150: simplify i2c SMBus return treatment Since i2c_smbus_write_byte_data returns no-positive value, this commit making the treatment of its return value less verbose. Signed-off-by: Melissa Wen Signed-off-by: Jonathan Cameron drivers/staging/iio/cdc/ad7150.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 34b94f9383138acc892f460bfcb9a35581e048fd Author: Melissa Wen Date: Fri Jun 14 13:32:21 2019 -0300 staging: iio: ad7150: use FIELD_GET and GENMASK Use the bitfield macro FIELD_GET, and GENMASK to do the shift and mask in one go. This makes the code more readable than explicit masking followed by a shift. Signed-off-by: Melissa Wen Signed-off-by: Jonathan Cameron drivers/staging/iio/cdc/ad7150.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 362cd500a2daaa8ec4ab8bb65ca96acf87087f39 Author: Melissa Wen Date: Fri Jun 14 13:50:59 2019 -0300 staging: iio: ad7150: use ternary operating to ensure 0/1 value Remove idiom and use ternary operator for consistently trigger 0/1 value on variable declaration. Signed-off-by: Melissa Wen Signed-off-by: Jonathan Cameron drivers/staging/iio/cdc/ad7150.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 387c1d770667fbe046ef241ae6995bb4294402c6 Author: Alexandru Ardelean Date: Thu May 30 10:25:41 2019 +0300 iio: ad_sigma_delta: return directly in ad_sd_buffer_postenable() There is nothing being done after the `err_predisable` label, so just remove it. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron drivers/iio/adc/ad_sigma_delta.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 075da9cd6aa503e05c86f2bbd29b539d1b145644 Author: Alexandru Ardelean Date: Thu May 30 16:18:12 2019 +0300 iio: amplifiers: ad8366: Add support for ADL5240 VGA The ADL5240 is a high performance, digitally controlled variable gain amplifier (VGA) operating from 100 MHz to 4000 MHz. The VGA integrates a high performance, 20 dB gain, internally matched amplifier (AMP) with a 6-bit digital step attenuator (DSA) that has a gain control range of 31.5 dB in 0.5 dB steps with ±0.25 dB step accuracy. Datasheet link: https://www.analog.com/media/en/technical-documentation/data-sheets/adl5240.pdf Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron drivers/iio/amplifiers/Kconfig | 1 + drivers/iio/amplifiers/ad8366.c | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) commit cee211f4e5a0f70ee0c202e9a5fc8eac0b9b4945 Author: Paul Cercueil Date: Thu May 30 16:18:11 2019 +0300 iio: amplifiers: ad8366: Add support for the ADA4961 DGA This change adds support for the ADA4961 BiCMOS RF Digital Gain Amplifier, (DGA), which is optimized for driving heavy loads out 2.0 GHz and beyond. The device typically achieves -90 dBc IMD3 performance at 500 MHz and -85 dBc at 1.5 GHz. Datasheet link: http://www.analog.com/media/en/technical-documentation/data-sheets/ADA4961.pdf This change re-uses the existing ad8366 driver, as most logic is similar. Also, this chip has a reset pin which is initialized during probe. Signed-off-by: Paul Cercueil Signed-off-by: Michael Hennerich Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron drivers/iio/amplifiers/Kconfig | 10 +++++++--- drivers/iio/amplifiers/ad8366.c | 34 ++++++++++++++++++++++++++++++++-- 2 files changed, 39 insertions(+), 5 deletions(-) commit 11ab555a6d3b0ecbb51076af79e625303bfa61de Author: Alexandru Ardelean Date: Thu May 30 16:18:10 2019 +0300 iio: amplifiers: ad8366: rework driver to allow other chips The SPI gain amplifiers are simple devices, with 1 or 2 channels, to which are read-from/written-to. The gain computation in ad8366_write_raw() has been updated to compute gain in dB for negative values. This driver will be extended to support other chips as well. To do that, this rework handles the AD8366 device as a special-case (via switch-statements). This will make things easier when adding new chips. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron drivers/iio/amplifiers/ad8366.c | 81 +++++++++++++++++++++++++++++++---------- 1 file changed, 62 insertions(+), 19 deletions(-) commit dbcf6b5d2625b904f13810b168773b05d891204b Author: Alexandru Ardelean Date: Thu May 30 16:18:09 2019 +0300 iio: amplifiers: ad8366: use own lock to guard state This driver is still using iio_dev's mlock to guard against inconsistent state. This has been discouraged for some time. This change switches to using it's own mutex, defined on the state struct. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron drivers/iio/amplifiers/ad8366.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 38ffa3a34cb04c378c32c04337d0b98247a04012 Author: Alexandru Ardelean Date: Thu May 30 16:18:08 2019 +0300 iio: amplifiers: update license information Use the new `SPDX-License-Identifier` tag to specify the license. For ad8366, also update copyright years in the header part. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron drivers/iio/amplifiers/Kconfig | 1 + drivers/iio/amplifiers/ad8366.c | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) commit 925120108860a61e3825f149433714e6a0549748 Author: Lucas Oshiro Date: Fri May 31 17:11:14 2019 -0300 dt-bindings: iio: accel: adxl372: switch to YAML bindings Convert the old device tree documentation to yaml format. Signed-off-by: Lucas Oshiro Signed-off-by: Rodrigo Ribeiro Co-developed-by: Rodrigo Ribeiro Reviewed-by: Matheus Tavares Reviewed-by: Marcelo Schmitt Reviewed-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron .../devicetree/bindings/iio/accel/adi,adxl372.yaml | 63 ++++++++++++++++++++++ .../devicetree/bindings/iio/accel/adxl372.txt | 33 ------------ MAINTAINERS | 2 +- 3 files changed, 64 insertions(+), 34 deletions(-) commit 0e4f0b42f42d88507b48282c8915f502551534e4 Author: Alexandru Ardelean Date: Wed May 29 16:01:08 2019 +0300 iio: adxl372: fix iio_triggered_buffer_{pre,post}enable positions The iio_triggered_buffer_{predisable,postenable} functions attach/detach the poll functions. For the predisable hook, the disable code should occur before detaching the poll func, and for the postenable hook, the poll func should be attached before the enable code. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron drivers/iio/accel/adxl372.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) commit 4b65e3ba97ca1a8ad487a40fe2be807bea324d10 Author: Stefan Popa Date: Tue Jun 4 17:58:21 2019 +0300 dt-bindings: iio: frequency: Add docs for ADF4371 PLL Document support for Analog Devices ADF4371 SPI Wideband Synthesizer. Signed-off-by: Stefan Popa Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron .../devicetree/bindings/iio/frequency/adf4371.yaml | 54 ++++++++++++++++++++++ 1 file changed, 54 insertions(+) commit 7f699bd14913423ce971f7b8d725448093eaa51a Author: Stefan Popa Date: Tue Jun 4 17:58:02 2019 +0300 iio: frequency: adf4371: Add support for ADF4371 PLL The ADF4371 is a frequency synthesizer with an integrated voltage controlled oscillator (VCO) for phase-locked loops (PLLs). The ADF4371 has an integrated VCO with a fundamental output frequency ranging from 4000 MHz to 8000 MHz. In addition, the VCO frequency is connected to divide by 1, 2, 4, 8, 16, 32, or 64 circuits that allows the user to generate radio frequency (RF) output frequencies as low as 62.5 MHz at RF8x. A frequency multiplier at RF16x generates from 8 GHz to 16 GHz. A frequency quadrupler generates frequencies from 16 GHz to 32 GHz at RF32x. RFAUX8x duplicates the frequency range of RF8x or permits direct access to the VCO output. The driver takes the reference input frequency from the device tree and uses it to calculate and maximize the PFD frequency (frequency of the phase frequency detector). The PFD frequency is further used to calculate the timeouts: synthesizer lock, VCO band selection, automatic level calibration (ALC) and PLL settling time. This initial driver exposes the attributes for setting the frequency and enabling/disabling the different adf4371 channels. Datasheet: Link: https://www.analog.com/media/en/technical-documentation/data-sheets/adf4371.pdf Signed-off-by: Stefan Popa Signed-off-by: Jonathan Cameron .../ABI/testing/sysfs-bus-iio-frequency-adf4371 | 44 ++ drivers/iio/frequency/Kconfig | 10 + drivers/iio/frequency/Makefile | 1 + drivers/iio/frequency/adf4371.c | 594 +++++++++++++++++++++ 4 files changed, 649 insertions(+) commit 81956a93b552205b35250f19120058fc3337e01e Author: Lorenzo Bianconi Date: Sat Jun 8 14:30:08 2019 +0200 iio: imu: st_lsm6dsx: get device name from st_lsm6dsx_sensor_settings Introduce sensor name in st_lsm6dsx_sensor_settings table. This is a preliminary patch to add I3C support to st_lsm6dsx since i3c_device_id data structure does not contain a name field Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h | 9 +++-- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 53 +++++++++++++++++++++------- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c | 3 +- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.c | 3 +- 4 files changed, 48 insertions(+), 20 deletions(-) commit 9f3bf94f65fc1e065953572495abfe27a044d45c Author: Fabio Estevam Date: Mon Jun 3 16:34:33 2019 -0300 iio: imx7d_adc: Remove unneeded 'average_en' member average_en is always true, so there is not really need for this structure member. Signed-off-by: Fabio Estevam Signed-off-by: Jonathan Cameron drivers/iio/adc/imx7d_adc.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit f5d2f9c293c2b51abd33477a64ffcc5cb64273f5 Author: Fabio Estevam Date: Mon Jun 3 16:34:32 2019 -0300 iio: imx7d_adc: Fit into a single line All the parameters of devm_request_irq() can fit into a single line, so place them all in a single line for better readability. Signed-off-by: Fabio Estevam Signed-off-by: Jonathan Cameron drivers/iio/adc/imx7d_adc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 9ce92da84ff2eec3792edabbc3d3a654f2e2842a Author: Fabio Estevam Date: Mon Jun 3 16:34:31 2019 -0300 iio: imx7d_adc: Introduce a definition for the input clock Since the input clock is always 24MHz, there is no need for storing this value into a variable. Use a definition instead, which is more appropriate in this case. Signed-off-by: Fabio Estevam Signed-off-by: Jonathan Cameron drivers/iio/adc/imx7d_adc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit fe93116459717eb363713b2e272006a46e914733 Author: Fabio Estevam Date: Mon Jun 3 16:34:30 2019 -0300 iio: imx7d_adc: Remove unneeded error message In case of ioremap failure, the core code will take care of printing the error message, so there is no need for having a local error message in the driver. Signed-off-by: Fabio Estevam Signed-off-by: Jonathan Cameron drivers/iio/adc/imx7d_adc.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 677f16813a9245d02247d1379c8c535e361b7d0b Author: Martijn Braam Date: Mon Jun 3 21:20:39 2019 +0200 iio: light: stk3310: Add support for stk3335 The stk3335 light/proximity sensor is similar to the stk3310 and stk3311 sensors and works with the stk3310 driver. Signed-off-by: Martijn Braam Signed-off-by: Luca Weiss Signed-off-by: Jonathan Cameron drivers/iio/light/stk3310.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 936d3e536dcf88ce80d27bdb637009b13dba6d8c Author: Young Xiao <92siuyang@gmail.com> Date: Tue Jun 4 20:40:00 2019 +0800 iio:core: Fix bug in length of event info_mask and catch unhandled bits set in masks. The incorrect limit for the for_each_set_bit loop was noticed whilst fixing this other case. Note that as we only have 3 possible entries a the moment and the value was set to 4, the bug would not have any effect currently. It will bite fairly soon though, so best fix it now. See commit ef4b4856593f ("iio:core: Fix bug in length of event info_mask and catch unhandled bits set in masks.") for details. Signed-off-by: Young Xiao <92siuyang@gmail.com> Reviewed-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron drivers/iio/industrialio-core.c | 2 ++ 1 file changed, 2 insertions(+) commit cf344bd67e569b02a6d323a43405ad425396d6ea Author: Alexandru Ardelean Date: Thu Jun 6 13:34:09 2019 +0300 staging: iio: ad2s1210: Remove platform data NULL check in probe The driver only needs to access GPIOs via GPIOLIB. And SPI can be configured via device-tree or ACPI. The platform data is a remnant from another time, and should not cause the driver to error out during probing if it is NULL. Also, it's not used. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron drivers/staging/iio/resolver/ad2s1210.c | 3 --- 1 file changed, 3 deletions(-) commit aa7093299253a8c4cb5bd0053ab9c8128beba5e4 Author: Wolfram Sang Date: Sat Jun 8 12:55:42 2019 +0200 iio: light: bh1780: simplify getting the adapter of a client We have a dedicated pointer for that, so use it. Much easier to read and less computation involved. Signed-off-by: Wolfram Sang Signed-off-by: Jonathan Cameron drivers/iio/light/bh1780.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 32a1963148277407f7af0160da2b7c0527afc8a4 Author: Chris Wilson Date: Mon Jun 17 15:04:26 2019 +0100 drm/i915/gtt: Serialise both updates to PDE and our shadow Currently, we perform a locked update of the shadow entry when allocating a page directory entry such that if two clients are concurrently allocating neighbouring ranges we only insert one new entry for the pair of them. However, we also need to serialise both clients wrt to the actual entry in the HW table, or else we may allow one client or even a third client to proceed ahead of the HW write. My handwave before was that under the _pathological_ condition we would see the scratch entry instead of the expected entry, causing a temporary glitch. That starvation condition will eventually show up in practice, so fix it. The reason for the previous cheat was to avoid having to free the extra allocation while under the spinlock. Now, we keep the extra entry allocated until the end instead. v2: Fix error paths for gen6 Fixes: 1d1b5490b91c ("drm/i915/gtt: Replace struct_mutex serialisation for allocation") Signed-off-by: Chris Wilson Cc: Matthew Auld Cc: Mika Kuoppala Reviewed-by: Matthew Auld Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190617140426.7203-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 133 ++++++++++++++++++++---------------- 1 file changed, 73 insertions(+), 60 deletions(-) commit e93821146921efa9e8f6a83606145445f9a9cc3a Author: Lucas De Marchi Date: Fri Jun 7 02:12:30 2019 -0700 drm/i915/dmc: protect against loading wrong firmware In intel_package_header version 2 there's a new field in the fw_info table that must be 0, otherwise it's not the correct DMC firmware. Add a check for version 2 or later. Signed-off-by: Lucas De Marchi Reviewed-by: Anusha Srivatsa Link: https://patchwork.freedesktop.org/patch/msgid/20190607091230.1489-10-lucas.demarchi@intel.com drivers/gpu/drm/i915/intel_csr.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 8132b8d182e3e3c20bb1ba99be0434c43c462286 Author: Lucas De Marchi Date: Fri Jun 7 02:12:29 2019 -0700 drm/i915/dmc: remove redundant return in parse_csr_fw() parse_csr_fw() is responsible to set up several fields in struct intel_csr, including the payload. We don't need to assign it again. Signed-off-by: Lucas De Marchi Reviewed-by: Anusha Srivatsa Link: https://patchwork.freedesktop.org/patch/msgid/20190607091230.1489-9-lucas.demarchi@intel.com drivers/gpu/drm/i915/intel_csr.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit 0703a53b818caa57b428d1ba59839b2dbccf5ce8 Author: Lucas De Marchi Date: Fri Jun 7 02:12:28 2019 -0700 drm/i915/dmc: add support to load dmc_header version 3 Main difference is that now there are up to 20 MMIOs that can be set and a lot of noise due to the struct changing the fields in the middle. Signed-off-by: Lucas De Marchi Reviewed-by: Anusha Srivatsa Link: https://patchwork.freedesktop.org/patch/msgid/20190607091230.1489-8-lucas.demarchi@intel.com drivers/gpu/drm/i915/i915_drv.h | 4 +- drivers/gpu/drm/i915/intel_csr.c | 121 ++++++++++++++++++++++++++++++--------- 2 files changed, 95 insertions(+), 30 deletions(-) commit 08f8984fd733535683c4d91319884204be06696d Author: Lucas De Marchi Date: Fri Jun 7 02:12:27 2019 -0700 drm/i915/dmc: extract function to parse dmc_header Complete the extraction of functions to parse specific parts of the firmware. The return of the function parse_csr_fw() is now redundant since it already sets the dmc_payload field. Changing it is left for later to avoid noise in the commit. Signed-off-by: Lucas De Marchi Reviewed-by: Anusha Srivatsa Link: https://patchwork.freedesktop.org/patch/msgid/20190607091230.1489-7-lucas.demarchi@intel.com drivers/gpu/drm/i915/intel_csr.c | 130 ++++++++++++++++++++++----------------- 1 file changed, 74 insertions(+), 56 deletions(-) commit 32fd773384afc2b9e8dfc9c8ee1927f34b852fab Author: Lucas De Marchi Date: Fri Jun 7 02:12:26 2019 -0700 drm/i915/dmc: extract function to parse package_header Like parse_csr_fw_css() this parses the package_header from firmware and saves the relevant fields in the csr struct. In this function we also lookup the fw_info we are interested in. Signed-off-by: Lucas De Marchi Reviewed-by: Anusha Srivatsa Link: https://patchwork.freedesktop.org/patch/msgid/20190607091230.1489-6-lucas.demarchi@intel.com drivers/gpu/drm/i915/intel_csr.c | 117 ++++++++++++++++++++++----------------- 1 file changed, 66 insertions(+), 51 deletions(-) commit 46fcbe4b5e40d5f0862b44cd1c7d9adbbe59f511 Author: Lucas De Marchi Date: Fri Jun 7 02:12:25 2019 -0700 drm/i915/dmc: extract function to parse css header Let's start splitting the parse function, making all of them return the number of bytes parsed - different versions of the firmware header may require different sizes for the structures. v2: rework remaining bytes calculation on new protection for amount of bytes read Signed-off-by: Lucas De Marchi Reviewed-by: Anusha Srivatsa Link: https://patchwork.freedesktop.org/patch/msgid/20190607091230.1489-5-lucas.demarchi@intel.com drivers/gpu/drm/i915/intel_csr.c | 66 +++++++++++++++++++++++++--------------- 1 file changed, 41 insertions(+), 25 deletions(-) commit 0bba84975b3780db115d396f86518cc8d67fc0ae Author: Lucas De Marchi Date: Fri Jun 7 02:12:24 2019 -0700 drm/i915/dmc: add support for package_header with version 2 The only meaninful change is that it supports up to 32 fw_info entries rather than the previous max=20. Signed-off-by: Lucas De Marchi Reviewed-by: Anusha Srivatsa Link: https://patchwork.freedesktop.org/patch/msgid/20190607091230.1489-4-lucas.demarchi@intel.com drivers/gpu/drm/i915/intel_csr.c | 38 ++++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) commit 56b206bcdada2b95e9e5b303d663aa1b3228b5cf Author: Lucas De Marchi Date: Fri Jun 7 02:12:23 2019 -0700 drm/i915/dmc: extract fw_info and table walk from intel_package_header Move fw_info out of struct intel_package_header to allow it to grow more easily in future. To make a cleaner move, let's also extract a function to search the header for the dmc_offset. While reviewing this code I wondered why we continued the search even after finding a suitable firmware. Add a comment to explain we will continue to try to find a more specific firmware version, even if this is not required by the spec. Signed-off-by: Lucas De Marchi Reviewed-by: Anusha Srivatsa Link: https://patchwork.freedesktop.org/patch/msgid/20190607091230.1489-3-lucas.demarchi@intel.com drivers/gpu/drm/i915/intel_csr.c | 72 ++++++++++++++++++++++++++++++---------- 1 file changed, 55 insertions(+), 17 deletions(-) commit 8a6f9d5c172d1aa170754832d0214983ed51fa01 Author: Lucas De Marchi Date: Fri Jun 7 02:12:22 2019 -0700 drm/i915/dmc: use kernel types Change all fields in intel_package_header and intel_dmc_header whose meaning are 1-byte numbers to use u8. Signed-off-by: Lucas De Marchi Reviewed-by: Rodrigo Vivi Reviewed-by: Anusha Srivatsa Link: https://patchwork.freedesktop.org/patch/msgid/20190607091230.1489-2-lucas.demarchi@intel.com drivers/gpu/drm/i915/intel_csr.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 5d60c11154116e2127374d4178e952649612b69b Author: Jason Gunthorpe Date: Thu Jun 13 21:38:17 2019 -0300 RDMA: Move rdma_node_type to uapi/ This enum is exposed over the sysfs file 'node_type' and over netlink via RDMA_NLDEV_ATTR_DEV_NODE_TYPE, so declare it in the uapi headers. Signed-off-by: Jason Gunthorpe Signed-off-by: Doug Ledford drivers/infiniband/core/verbs.c | 2 +- include/rdma/ib_verbs.h | 13 +------------ include/uapi/rdma/rdma_netlink.h | 12 ++++++++++++ 3 files changed, 14 insertions(+), 13 deletions(-) commit 1955c8cf5e26b1f70d674190ff9984dbfd531ee9 Author: Florian Fainelli Date: Fri Jun 14 11:39:47 2019 -0700 perf tools: Don't hardcode host include path for libslang Hardcoding /usr/include/slang is fundamentally incompatible with cross compilation and will lead to the inability for a cross-compiled environment to properly detect whether slang is available or not. If /usr/include/slang is necessary that is a distribution specific knowledge that could be solved with either a standard pkg-config .pc file (which slang has) or simply overriding CFLAGS accordingly, but the default perf Makefile should be clean of all of that. Signed-off-by: Florian Fainelli Cc: Alexander Shishkin Cc: Alexey Budankov Cc: bcm-kernel-feedback-list@broadcom.com Cc: Jakub Kicinski Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Quentin Monnet Cc: Stanislav Fomichev Fixes: ef7b93a11904 ("perf report: Librarize the annotation code and use it in the newt browser") Link: http://lkml.kernel.org/r/20190614183949.5588-1-f.fainelli@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/build/feature/Makefile | 2 +- tools/perf/Makefile.config | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) commit fdbdd7e8580eac9bdafa532746c865644d125e34 Author: Arnaldo Carvalho de Melo Date: Mon Jun 17 14:32:53 2019 -0300 perf evsel: Make perf_evsel__name() accept a NULL argument In which case it simply returns "unknown", like when it can't figure out the evsel->name value. This makes this code more robust and fixes a problem in 'perf trace' where a NULL evsel was being passed to a routine that only used the evsel for printing its name when a invalid syscall id was passed. Reported-by: Leo Yan Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-f30ztaasku3z935cn3ak3h53@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/evsel.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 016f327ce48f9b0b1cdea729ba7080596113563f Author: Arnaldo Carvalho de Melo Date: Fri Jun 14 16:50:19 2019 -0300 perf trace: Fixup pointer arithmetic when consuming augmented syscall args We can't just add the consumed bytes to the arg->augmented.args member, as it is not void *, so it will access (consumed * sizeof(struct augmented_arg)) in the next augmented arg, totally wrong, cast the member to void pointe before adding the number of bytes consumed, duh. With this and hardcoding handling the 'renameat' and 'renameat2' syscalls in the tools/perf/examples/bpf/augmented_raw_syscalls.c eBPF proggie, we get: mv/24388 renameat2(AT_FDCWD, "/tmp/build/perf/util/.bpf-event.o.tmp", AT_FDCWD, "/tmp/build/perf/util/.bpf-event.o.cmd", RENAME_NOREPLACE) = 0 mv/24394 renameat2(AT_FDCWD, "/tmp/build/perf/util/.perf-hooks.o.tmp", AT_FDCWD, "/tmp/build/perf/util/.perf-hooks.o.cmd", RENAME_NOREPLACE) = 0 mv/24398 renameat2(AT_FDCWD, "/tmp/build/perf/util/.pmu-bison.o.tmp", AT_FDCWD, "/tmp/build/perf/util/.pmu-bison.o.cmd", RENAME_NOREPLACE) = 0 mv/24401 renameat2(AT_FDCWD, "/tmp/build/perf/util/.expr-bison.o.tmp", AT_FDCWD, "/tmp/build/perf/util/.expr-bison.o.cmd", RENAME_NOREPLACE) = 0 mv/24406 renameat2(AT_FDCWD, "/tmp/build/perf/util/.pmu.o.tmp", AT_FDCWD, "/tmp/build/perf/util/.pmu.o.cmd", RENAME_NOREPLACE) = 0 mv/24407 renameat2(AT_FDCWD, "/tmp/build/perf/util/.pmu-flex.o.tmp", AT_FDCWD, "/tmp/build/perf/util/.pmu-flex.o.cmd", RENAME_NOREPLACE) = 0 mv/24416 renameat2(AT_FDCWD, "/tmp/build/perf/util/.parse-events-flex.o.tmp", AT_FDCWD, "/tmp/build/perf/util/.parse-events-flex.o.cmd", RENAME_NOREPLACE) = 0 I.e. it works with two string args in the same syscall. Now back to taming the verifier... Cc: Adrian Hunter Cc: Brendan Gregg Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Fixes: 8195168e8779 ("perf trace: Consume the augmented_raw_syscalls payload") Link: https://lkml.kernel.org/n/tip-n1w59lpxks6m1le7fpo6rmyw@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 599ee18f0740d7661b8711249096db94c09bc508 Author: John Garry Date: Fri Jun 14 22:07:59 2019 +0800 perf pmu: Fix uncore PMU alias list for ARM64 In commit 292c34c10249 ("perf pmu: Fix core PMU alias list for X86 platform"), we fixed the issue of CPU events being aliased to uncore events. Fix this same issue for ARM64, since the said commit left the (broken) behaviour untouched for ARM64. Signed-off-by: John Garry Cc: Alexander Shishkin Cc: Ben Hutchings Cc: Hendrik Brueckner Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Shaokun Zhang Cc: Thomas Richter Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Cc: linuxarm@huawei.com Cc: stable@vger.kernel.org Fixes: 292c34c10249 ("perf pmu: Fix core PMU alias list for X86 platform") Link: http://lkml.kernel.org/r/1560521283-73314-2-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/pmu.c | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) commit 5875cf4cd32ea08d0d6abb82091f2d1f7cd6889f Author: Arnaldo Carvalho de Melo Date: Thu Jun 13 18:29:05 2019 -0300 perf tests: Add missing SPDX headers Cc: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-p0kg493z2m8qizjbdefzip1i@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/Build | 2 ++ tools/perf/tests/bp_account.c | 1 + tools/perf/tests/bpf-script-example.c | 1 + tools/perf/tests/bpf-script-test-kbuild.c | 1 + tools/perf/tests/bpf-script-test-prologue.c | 1 + tools/perf/tests/bpf-script-test-relocation.c | 1 + tools/perf/tests/bpf.c | 1 + tools/perf/tests/map_groups.c | 1 + tools/perf/tests/mem.c | 1 + tools/perf/tests/mem2node.c | 1 + tools/perf/tests/shell/lib/probe.sh | 1 + tools/perf/tests/shell/probe_vfs_getname.sh | 3 ++- tools/perf/tests/shell/record+probe_libc_inet_pton.sh | 1 + tools/perf/tests/shell/record+script_probe_vfs_getname.sh | 1 + tools/perf/tests/shell/record+zstd_comp_decomp.sh | 2 ++ tools/perf/tests/shell/trace+probe_vfs_getname.sh | 1 + 16 files changed, 19 insertions(+), 1 deletion(-) commit 5e2156d837e875c0277bbe9c5cd965ff56539e0b Author: Arnaldo Carvalho de Melo Date: Thu Jun 13 18:25:04 2019 -0300 tools build feature tests: Add missing SPDX headers Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-3h6fa866w6ao0wsbyqz9nrm8@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/build/feature/test-fortify-source.c | 1 + tools/build/feature/test-hello.c | 1 + tools/build/feature/test-setns.c | 1 + 3 files changed, 3 insertions(+) commit 99f26f854867175ad7e157c7efc1e91ddc7eec44 Author: Arnaldo Carvalho de Melo Date: Thu Jun 13 18:17:41 2019 -0300 perf trace: Streamline validation of select syscall names list Rename the 'i' variable to 'nr_used' and use set 'nr_allocated' since the start of this function, leaving the final assignment of the longer named trace->ev_qualifier_ids.nr state to 'nr_used' at the end of the function. No change in behaviour intended. Cc: Leo Yan Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mathieu Poirier Cc: Mike Leach Cc: Namhyung Kim Cc: Suzuki K Poulose Link: https://lkml.kernel.org/n/tip-kpgyn8xjdjgt0timrrnniquv@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-trace.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit a4066d64d9391a734ee0e49c8d2757f5685013b4 Author: Arnaldo Carvalho de Melo Date: Thu Jun 13 17:35:09 2019 -0300 perf trace: Fix exclusion of not available syscall names from selector list We were just skipping the syscalls not available in a particular architecture without reflecting this in the number of entries in the ev_qualifier_ids.nr variable, fix it. This was done with the most minimalistic way, reusing the index variable 'i', a followup patch will further clean this by making 'i' renamed to 'nr_used' and using 'nr_allocated' in a few more places. Reported-by: Leo Yan Tested-by: Leo Yan Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mathieu Poirier Cc: Mike Leach Cc: Namhyung Kim Cc: Suzuki K Poulose Fixes: 04c41bcb862b ("perf trace: Skip unknown syscalls when expanding strace like syscall groups") Link: https://lkml.kernel.org/r/20190613181514.GC1402@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-trace.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4541a8bb13a86e504416a13360c8dc64d2fd612a Author: Arnaldo Carvalho de Melo Date: Thu Jun 13 12:04:19 2019 -0300 tools build: Check if gettid() is available before providing helper Laura reported that the perf build failed in fedora when we got a glibc that provides gettid(), which I reproduced using fedora rawhide with the glibc-devel-2.29.9000-26.fc31.x86_64 package. Add a feature check to avoid providing a gettid() helper in such systems. On a fedora rawhide system with this patch applied we now get: [root@7a5f55352234 perf]# grep gettid /tmp/build/perf/FEATURE-DUMP feature-gettid=1 [root@7a5f55352234 perf]# cat /tmp/build/perf/feature/test-gettid.make.output [root@7a5f55352234 perf]# ldd /tmp/build/perf/feature/test-gettid.bin linux-vdso.so.1 (0x00007ffc6b1f6000) libc.so.6 => /lib64/libc.so.6 (0x00007f04e0a74000) /lib64/ld-linux-x86-64.so.2 (0x00007f04e0c47000) [root@7a5f55352234 perf]# nm /tmp/build/perf/feature/test-gettid.bin | grep -w gettid U gettid@@GLIBC_2.30 [root@7a5f55352234 perf]# While on a fedora:29 system: [acme@quaco perf]$ grep gettid /tmp/build/perf/FEATURE-DUMP feature-gettid=0 [acme@quaco perf]$ cat /tmp/build/perf/feature/test-gettid.make.output test-gettid.c: In function ‘main’: test-gettid.c:8:9: error: implicit declaration of function ‘gettid’; did you mean ‘getgid’? [-Werror=implicit-function-declaration] return gettid(); ^~~~~~ getgid cc1: all warnings being treated as errors [acme@quaco perf]$ Reported-by: Laura Abbott Tested-by: Laura Abbott Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Florian Weimer Cc: Namhyung Kim Cc: Stephane Eranian Link: https://lkml.kernel.org/n/tip-yfy3ch53agmklwu9o7rlgf9c@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/build/Makefile.feature | 1 + tools/build/feature/Makefile | 4 ++++ tools/build/feature/test-all.c | 5 +++++ tools/build/feature/test-gettid.c | 11 +++++++++++ tools/perf/Makefile.config | 4 ++++ tools/perf/jvmti/jvmti_agent.c | 2 ++ 6 files changed, 27 insertions(+) commit e01f0ef509ea7e76929f24a074d241de52c6f82a Author: Adrian Hunter Date: Mon Jun 10 10:28:03 2019 +0300 perf intel-pt: Add callchain to synthesized PEBS sample Like other synthesized events, if there is also an Intel PT branch trace, then a call stack can also be synthesized. Add that. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190610072803.10456-12-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 975846eddf907297aa036544545cd839c7c7dd31 Author: Adrian Hunter Date: Mon Jun 10 10:28:02 2019 +0300 perf intel-pt: Add memory information to synthesized PEBS sample Add memory information from PEBS data in the Intel PT trace to the synthesized PEBS sample. This provides sample types PERF_SAMPLE_ADDR, PERF_SAMPLE_WEIGHT, and PERF_SAMPLE_TRANSACTION, but not PERF_SAMPLE_DATA_SRC. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190610072803.10456-11-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit aa62afd7daac4b4cc95cd2454e3f43aa23f519c1 Author: Adrian Hunter Date: Mon Jun 10 10:28:01 2019 +0300 perf intel-pt: Add LBR information to synthesized PEBS sample Add LBR information from PEBS data in the Intel PT trace to the synthesized PEBS sample. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190610072803.10456-10-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) commit 143d34a6b387b96aba42c49cb76d18ad3e3863e5 Author: Adrian Hunter Date: Mon Jun 10 10:28:00 2019 +0300 perf intel-pt: Add XMM registers to synthesized PEBS sample Add XMM register information from PEBS data in the Intel PT trace to the synthesized PEBS sample. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190610072803.10456-9-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt.c | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) commit 9e9a618afc178e747cc449464ba54d9c932f7af2 Author: Adrian Hunter Date: Mon Jun 10 10:27:59 2019 +0300 perf intel-pt: Add gp registers to synthesized PEBS sample Add general purpose register information from PEBS data in the Intel PT trace to the synthesized PEBS sample. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190610072803.10456-8-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt.c | 69 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) commit 9d0bc53e35b82e429ab698d112f7af4336578735 Author: Adrian Hunter Date: Mon Jun 10 10:27:58 2019 +0300 perf intel-pt: Synthesize PEBS sample basic information Synthesize a PEBS sample using basic information (ip, timestamp) only. Other PEBS information will be added in later patches. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190610072803.10456-7-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt.c | 52 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 50 insertions(+), 2 deletions(-) commit 0dfded34a2e3b517c149ee9c7d1e5173025017b7 Author: Adrian Hunter Date: Mon Jun 10 10:27:57 2019 +0300 perf intel-pt: Factor out common sample preparation for re-use Factor out common sample preparation for re-use when synthesizing PEBS samples. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190610072803.10456-6-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) commit e62ca655eea7ad4956929f647c2d9fb36aeff90e Author: Adrian Hunter Date: Mon Jun 10 10:27:56 2019 +0300 perf intel-pt: Prepare to synthesize PEBS samples Add infrastructure to prepare for synthesizing PEBS samples but leave the actual synthesis to later patches. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190610072803.10456-5-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 4c35595e1ea7585d09eb80096f47af237061e795 Author: Adrian Hunter Date: Mon Jun 10 10:27:55 2019 +0300 perf intel-pt: Add decoder support for PEBS via PT PEBS data is encoded in Block Item Packets (BIP). Populate a new structure intel_pt_blk_items with the values and, upon a Block End Packet (BEP), report them as a new Intel PT sample type INTEL_PT_BLK_ITEMS. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190610072803.10456-4-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo .../perf/util/intel-pt-decoder/intel-pt-decoder.c | 78 +++++++++++- .../perf/util/intel-pt-decoder/intel-pt-decoder.h | 137 +++++++++++++++++++++ 2 files changed, 214 insertions(+), 1 deletion(-) commit a0db77bf880b8badd2f9ce4da708c69b0b865853 Author: Adrian Hunter Date: Mon Jun 10 10:27:54 2019 +0300 perf intel-pt: Add Intel PT packet decoder test Add Intel PT packet decoder test. This test feeds byte sequences to the Intel PT packet decoder and checks the results. Changes to the packet context are also checked. Committer testing: # perf test "Intel PT" 65: Intel PT packet decoder : Ok # perf test -v "Intel PT" 65: Intel PT packet decoder : --- start --- test child forked, pid 6360 Decoded ok: 00 PAD Decoded ok: 04 TNT N (1) Decoded ok: 06 TNT T (1) Decoded ok: 80 TNT NNNNNN (6) Decoded ok: fe TNT TTTTTT (6) Decoded ok: 02 a3 02 00 00 00 00 00 TNT N (1) Decoded ok: 02 a3 03 00 00 00 00 00 TNT T (1) Decoded ok: 02 a3 00 00 00 00 00 80 TNT NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN (47) Decoded ok: 02 a3 ff ff ff ff ff ff TNT TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT (47) Decoded ok: 0d TIP no ip Decoded ok: 2d 01 02 TIP 0x201 Decoded ok: 4d 01 02 03 04 TIP 0x4030201 Decoded ok: 6d 01 02 03 04 05 06 TIP 0x60504030201 Decoded ok: 8d 01 02 03 04 05 06 TIP 0x60504030201 Decoded ok: cd 01 02 03 04 05 06 07 08 TIP 0x807060504030201 Decoded ok: 11 TIP.PGE no ip Decoded ok: 31 01 02 TIP.PGE 0x201 Decoded ok: 51 01 02 03 04 TIP.PGE 0x4030201 Decoded ok: 71 01 02 03 04 05 06 TIP.PGE 0x60504030201 Decoded ok: 91 01 02 03 04 05 06 TIP.PGE 0x60504030201 Decoded ok: d1 01 02 03 04 05 06 07 08 TIP.PGE 0x807060504030201 Decoded ok: 01 TIP.PGD no ip Decoded ok: 21 01 02 TIP.PGD 0x201 Decoded ok: 41 01 02 03 04 TIP.PGD 0x4030201 Decoded ok: 61 01 02 03 04 05 06 TIP.PGD 0x60504030201 Decoded ok: 81 01 02 03 04 05 06 TIP.PGD 0x60504030201 Decoded ok: c1 01 02 03 04 05 06 07 08 TIP.PGD 0x807060504030201 Decoded ok: 1d FUP no ip Decoded ok: 3d 01 02 FUP 0x201 Decoded ok: 5d 01 02 03 04 FUP 0x4030201 Decoded ok: 7d 01 02 03 04 05 06 FUP 0x60504030201 Decoded ok: 9d 01 02 03 04 05 06 FUP 0x60504030201 Decoded ok: dd 01 02 03 04 05 06 07 08 FUP 0x807060504030201 Decoded ok: 02 43 02 04 06 08 0a 0c PIP 0x60504030201 (NR=0) Decoded ok: 02 43 03 04 06 08 0a 0c PIP 0x60504030201 (NR=1) Decoded ok: 99 00 MODE.Exec 16 Decoded ok: 99 01 MODE.Exec 64 Decoded ok: 99 02 MODE.Exec 32 Decoded ok: 99 20 MODE.TSX TXAbort:0 InTX:0 Decoded ok: 99 21 MODE.TSX TXAbort:0 InTX:1 Decoded ok: 99 22 MODE.TSX TXAbort:1 InTX:0 Decoded ok: 02 83 TraceSTOP Decoded ok: 02 03 12 00 CBR 0x12 Decoded ok: 19 01 02 03 04 05 06 07 TSC 0x7060504030201 Decoded ok: 59 12 MTC 0x12 Decoded ok: 02 73 00 00 00 00 00 TMA CTC 0x0 FC 0x0 Decoded ok: 02 73 01 02 00 00 00 TMA CTC 0x201 FC 0x0 Decoded ok: 02 73 00 00 00 ff 01 TMA CTC 0x0 FC 0x1ff Decoded ok: 02 73 80 c0 00 ff 01 TMA CTC 0xc080 FC 0x1ff Decoded ok: 03 CYC 0x0 Decoded ok: 0b CYC 0x1 Decoded ok: fb CYC 0x1f Decoded ok: 07 02 CYC 0x20 Decoded ok: ff fe CYC 0xfff Decoded ok: 07 01 02 CYC 0x1000 Decoded ok: ff ff fe CYC 0x7ffff Decoded ok: 07 01 01 02 CYC 0x80000 Decoded ok: ff ff ff fe CYC 0x3ffffff Decoded ok: 07 01 01 01 02 CYC 0x4000000 Decoded ok: ff ff ff ff fe CYC 0x1ffffffff Decoded ok: 07 01 01 01 01 02 CYC 0x200000000 Decoded ok: ff ff ff ff ff fe CYC 0xffffffffff Decoded ok: 07 01 01 01 01 01 02 CYC 0x10000000000 Decoded ok: ff ff ff ff ff ff fe CYC 0x7fffffffffff Decoded ok: 07 01 01 01 01 01 01 02 CYC 0x800000000000 Decoded ok: ff ff ff ff ff ff ff fe CYC 0x3fffffffffffff Decoded ok: 07 01 01 01 01 01 01 01 02 CYC 0x40000000000000 Decoded ok: ff ff ff ff ff ff ff ff fe CYC 0x1fffffffffffffff Decoded ok: 07 01 01 01 01 01 01 01 01 02 CYC 0x2000000000000000 Decoded ok: ff ff ff ff ff ff ff ff ff 0e CYC 0xffffffffffffffff Decoded ok: 02 c8 01 02 03 04 05 VMCS 0x504030201 Decoded ok: 02 f3 OVF Decoded ok: 02 f3 OVF Decoded ok: 02 f3 OVF Decoded ok: 02 82 02 82 02 82 02 82 02 82 02 82 02 82 02 82 PSB Decoded ok: 02 82 02 82 02 82 02 82 02 82 02 82 02 82 02 82 PSB Decoded ok: 02 82 02 82 02 82 02 82 02 82 02 82 02 82 02 82 PSB Decoded ok: 02 23 PSBEND Decoded ok: 02 c3 88 01 02 03 04 05 06 07 00 MNT 0x7060504030201 Decoded ok: 02 12 01 02 03 04 PTWRITE 0x4030201 IP:0 Decoded ok: 02 32 01 02 03 04 05 06 07 08 PTWRITE 0x807060504030201 IP:0 Decoded ok: 02 92 01 02 03 04 PTWRITE 0x4030201 IP:1 Decoded ok: 02 b2 01 02 03 04 05 06 07 08 PTWRITE 0x807060504030201 IP:1 Decoded ok: 02 62 EXSTOP IP:0 Decoded ok: 02 e2 EXSTOP IP:1 Decoded ok: 02 c2 00 00 00 00 00 00 00 00 MWAIT 0x0 Hints 0x0 Extensions 0x0 Decoded ok: 02 c2 01 02 03 04 05 06 07 08 MWAIT 0x807060504030201 Hints 0x1 Extensions 0x1 Decoded ok: 02 c2 ff 02 03 04 07 06 07 08 MWAIT 0x8070607040302ff Hints 0xff Extensions 0x3 Decoded ok: 02 22 00 00 PWRE 0x0 HW:0 CState:0 Sub-CState:0 Decoded ok: 02 22 01 02 PWRE 0x201 HW:0 CState:0 Sub-CState:2 Decoded ok: 02 22 80 34 PWRE 0x3480 HW:1 CState:3 Sub-CState:4 Decoded ok: 02 22 00 56 PWRE 0x5600 HW:0 CState:5 Sub-CState:6 Decoded ok: 02 a2 00 00 00 00 00 PWRX 0x0 Last CState:0 Deepest CState:0 Wake Reason 0x0 Decoded ok: 02 a2 01 02 03 04 05 PWRX 0x504030201 Last CState:0 Deepest CState:1 Wake Reason 0x2 Decoded ok: 02 a2 ff ff ff ff ff PWRX 0xffffffffff Last CState:15 Deepest CState:15 Wake Reason 0xf Decoded ok: 02 63 00 BBP SZ 8-byte Type 0x0 Decoded ok: 02 63 80 BBP SZ 4-byte Type 0x0 Decoded ok: 02 63 1f BBP SZ 8-byte Type 0x1f Decoded ok: 02 63 9f BBP SZ 4-byte Type 0x1f Decoded ok: 04 00 00 00 00 BIP ID 0x00 Value 0x0 Decoded ok: fc 00 00 00 00 BIP ID 0x1f Value 0x0 Decoded ok: 04 01 02 03 04 BIP ID 0x00 Value 0x4030201 Decoded ok: fc 01 02 03 04 BIP ID 0x1f Value 0x4030201 Decoded ok: 04 00 00 00 00 00 00 00 00 BIP ID 0x00 Value 0x0 Decoded ok: fc 00 00 00 00 00 00 00 00 BIP ID 0x1f Value 0x0 Decoded ok: 04 01 02 03 04 05 06 07 08 BIP ID 0x00 Value 0x807060504030201 Decoded ok: fc 01 02 03 04 05 06 07 08 BIP ID 0x1f Value 0x807060504030201 Decoded ok: 02 33 BEP IP:0 Decoded ok: 02 b3 BEP IP:1 Decoded ok: 02 33 BEP IP:0 Decoded ok: 02 b3 BEP IP:1 test child finished with 0 ---- end ---- Intel PT packet decoder: Ok # Signed-off-by: Adrian Hunter Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190610072803.10456-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/x86/include/arch-tests.h | 1 + tools/perf/arch/x86/tests/Build | 2 +- tools/perf/arch/x86/tests/arch-tests.c | 4 + .../arch/x86/tests/intel-pt-pkt-decoder-test.c | 304 +++++++++++++++++++++ 4 files changed, 310 insertions(+), 1 deletion(-) commit edff7809c80f09398783d602c33a507309c23e24 Author: Adrian Hunter Date: Mon Jun 10 10:27:53 2019 +0300 perf intel-pt: Add new packets for PEBS via PT Add 3 new packets to supports PEBS via PT, namely Block Begin Packet (BBP), Block Item Packet (BIP) and Block End Packet (BEP). PEBS data is encoded into multiple BIP packets that come between BBP and BEP. The BEP packet might be associated with a FUP packet. That is indicated by using a separate packet type (INTEL_PT_BEP_IP) similar to other packets types with the _IP suffix. Refer to the Intel SDM for more information about PEBS via PT: https://software.intel.com/en-us/articles/intel-sdm May 2019 version: Vol. 3B 18.5.5.2 PEBS output to Intel® Processor Trace Decoding of BIP packets conflicts with single-byte TNT packets. Since BIP packets only occur in the context of a block (i.e. between BBP and BEP), that context must be recorded and passed to the packet decoder. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190610072803.10456-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo .../perf/util/intel-pt-decoder/intel-pt-decoder.c | 38 +++++- .../util/intel-pt-decoder/intel-pt-pkt-decoder.c | 140 ++++++++++++++++++++- .../util/intel-pt-decoder/intel-pt-pkt-decoder.h | 21 +++- tools/perf/util/intel-pt.c | 3 +- 4 files changed, 193 insertions(+), 9 deletions(-) commit 374d910f87b87283df2b1e8a60a6a546d4a14c90 Author: Mathieu Poirier Date: Tue Jun 11 14:45:28 2019 -0600 perf: cs-etm: Optimize option setup for CPU-wide sessions Call function cs_etm_set_option() once with all relevant options set rather than multiple times to avoid going through the list of CPU more than once. Suggested-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20190611204528.20093-1-mathieu.poirier@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/arm/util/cs-etm.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) commit 010e3e8fc12b1c13ce19821a11d8930226ebb4b6 Author: Raphael Gault Date: Tue Jun 11 13:53:09 2019 +0100 perf tests arm64: Compile tests unconditionally In order to subsequently add more tests for the arm64 architecture we compile the tests target for arm64 systematically. Further explanation provided by Mark Rutland: Given prior questions regarding this commit, it's probably worth spelling things out more explicitly, e.g. Currently we only build the arm64/tests directory if CONFIG_DWARF_UNWIND is selected, which is fine as the only test we have is arm64/tests/dwarf-unwind.o. So that we can add more tests to the test directory, let's unconditionally build the directory, but conditionally build dwarf-unwind.o depending on CONFIG_DWARF_UNWIND. There should be no functional change as a result of this patch. Signed-off-by: Raphael Gault Acked-by: Mark Rutland Cc: Catalin Marinas Cc: Peter Zijlstra Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20190611125315.18736-2-raphael.gault@arm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/arm64/Build | 2 +- tools/perf/arch/arm64/tests/Build | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 3ce5aceb5dee298b082adfa2baa0df5a447c1b0b Merge: d0e1a507bdc7 04c41bcb862b Author: Ingo Molnar Date: Mon Jun 17 20:48:14 2019 +0200 Merge tag 'perf-core-for-mingo-5.3-20190611' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: perf record: Alexey Budankov: - Allow mixing --user-regs with --call-graph=dwarf, making sure that the minimal set of registers for DWARF unwinding is present in the set of user registers requested to be present in each sample, while warning the user that this may make callchains unreliable if more that the minimal set of registers is needed to unwind. yuzhoujian: - Add support to collect callchains from kernel or user space only, IOW allow setting the perf_event_attr.exclude_callchain_{kernel,user} bits from the command line. perf trace: Arnaldo Carvalho de Melo: - Remove x86_64 specific syscall numbers from the augmented_raw_syscalls BPF in-kernel collector of augmented raw_syscalls:sys_{enter,exit} payloads, use instead the syscall numbers obtainer either by the arch specific syscalltbl generators or from audit-libs. - Allow 'perf trace' to ask for the number of bytes to collect for string arguments, for now ask for PATH_MAX, i.e. the whole pathnames, which ends up being just a way to speficy which syscall args are pathnames and thus should be read using bpf_probe_read_str(). - Skip unknown syscalls when expanding strace like syscall groups. This helps using the 'string' group of syscalls to work in arm64, where some of the syscalls present in x86_64 that deal with strings, for instance 'access', are deprecated and this should not be asked for tracing. Leo Yan: - Exit when failing to build eBPF program. perf config: Arnaldo Carvalho de Melo: - Bail out when a handler returns failure for a key-value pair. This helps with cases where processing a key-value pair is not just a matter of setting some tool specific knob, involving, for instance building a BPF program to then attach to the list of events 'perf trace' will use, e.g. augmented_raw_syscalls.c. perf.data: Kan Liang: - Read and store die ID information available in new Intel processors in CPUID.1F in the CPU topology written in the perf.data header. perf stat: Kan Liang: - Support per-die aggregation. Documentation: Arnaldo Carvalho de Melo: - Update perf.data documentation about the CPU_TOPOLOGY, MEM_TOPOLOGY, CLOCKID and DIR_FORMAT headers. Song Liu: - Add description of headers HEADER_BPF_PROG_INFO and HEADER_BPF_BTF. Leo Yan: - Update default value for llvm.clang-bpf-cmd-template in 'man perf-config'. JVMTI: Jiri Olsa: - Address gcc string overflow warning for strncpy() core: - Remove superfluous nthreads system_wide setup in perf_evsel__alloc_fd(). Intel PT: Adrian Hunter: - Add support for samples to contain IPC ratio, collecting cycles information from CYC packets, showing the IPC info periodically, because Intel PT does not update the cycle count on every branch or instruction, the incremental values will often be zero. When there are values, they will be the number of instructions and number of cycles since the last update, and thus represent the average IPC since the last IPC value. E.g.: # perf record --cpu 1 -m200000 -a -e intel_pt/cyc/u sleep 0.0001 rounding mmap pages size to 1024M (262144 pages) [ perf record: Woken up 0 times to write data ] [ perf record: Captured and wrote 2.208 MB perf.data ] # perf script --insn-trace --xed -F+ipc,-dso,-cpu,-tid # 1 cc1 63501.650479626: 7f5219ac27bf _int_free+0x3f jnz 0x7f5219ac2af0 IPC: 0.81 (36/44) 2 cc1 63501.650479626: 7f5219ac27c5 _int_free+0x45 cmp $0x1f, %rbp 3 cc1 63501.650479626: 7f5219ac27c9 _int_free+0x49 jbe 0x7f5219ac2b00 4 cc1 63501.650479626: 7f5219ac27cf _int_free+0x4f test $0x8, %al 5 cc1 63501.650479626: 7f5219ac27d1 _int_free+0x51 jnz 0x7f5219ac2b00 6 cc1 63501.650479626: 7f5219ac27d7 _int_free+0x57 movq 0x13c58a(%rip), %rcx 7 cc1 63501.650479626: 7f5219ac27de _int_free+0x5e mov %rdi, %r12 8 cc1 63501.650479626: 7f5219ac27e1 _int_free+0x61 movq %fs:(%rcx), %rax 9 cc1 63501.650479626: 7f5219ac27e5 _int_free+0x65 test %rax, %rax 10 cc1 63501.650479626: 7f5219ac27e8 _int_free+0x68 jz 0x7f5219ac2821 11 cc1 63501.650479626: 7f5219ac27ea _int_free+0x6a leaq -0x11(%rbp), %rdi 12 cc1 63501.650479626: 7f5219ac27ee _int_free+0x6e mov %rdi, %rsi 13 cc1 63501.650479626: 7f5219ac27f1 _int_free+0x71 shr $0x4, %rsi 14 cc1 63501.650479626: 7f5219ac27f5 _int_free+0x75 cmpq %rsi, 0x13caf4(%rip) 15 cc1 63501.650479626: 7f5219ac27fc _int_free+0x7c jbe 0x7f5219ac2821 16 cc1 63501.650479626: 7f5219ac2821 _int_free+0xa1 cmpq 0x13f138(%rip), %rbp 17 cc1 63501.650479626: 7f5219ac2828 _int_free+0xa8 jnbe 0x7f5219ac28d8 18 cc1 63501.650479626: 7f5219ac28d8 _int_free+0x158 testb $0x2, 0x8(%rbx) 19 cc1 63501.650479628: 7f5219ac28dc _int_free+0x15c jnz 0x7f5219ac2ab0 IPC: 6.00 (18/3) - Allow using time ranges with Intel PT, i.e. these features, already present but not optimially usable with Intel PT, should be now: Select the second 10% time slice: $ perf script --time 10%/2 Select from 0% to 10% time slice: $ perf script --time 0%-10% Select the first and second 10% time slices: $ perf script --time 10%/1,10%/2 Select from 0% to 10% and 30% to 40% slices: $ perf script --time 0%-10%,30%-40% cs-etm (ARM): Mathieu Poirier: - Add support for CPU-wide trace scenarios. s390: Thomas Richter: - Fix missing kvm module load for s390. - Fix OOM error in TUI mode on s390 - Support s390 diag event display when doing analysis on !s390 architectures. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 8c655784e2cf59cb6140759b8b546d98261d1ad9 Author: Geert Uytterhoeven Date: Mon Jun 17 09:44:52 2019 +0200 integrity: Fix __integrity_init_keyring() section mismatch With gcc-4.6.3: WARNING: vmlinux.o(.text.unlikely+0x24c64): Section mismatch in reference from the function __integrity_init_keyring() to the function .init.text:set_platform_trusted_keys() The function __integrity_init_keyring() references the function __init set_platform_trusted_keys(). This is often because __integrity_init_keyring lacks a __init annotation or the annotation of set_platform_trusted_keys is wrong. Indeed, if the compiler decides not to inline __integrity_init_keyring(), a warning is issued. Fix this by adding the missing __init annotation. Fixes: 9dc92c45177ab70e ("integrity: Define a trusted platform keyring") Signed-off-by: Geert Uytterhoeven Reviewed-by: Nayna Jain Reviewed-by: James Morris Signed-off-by: Mimi Zohar security/integrity/digsig.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 21a249ca02415cba22e95ede9a71be20a5fe8619 Author: Alex Deucher Date: Mon Jun 17 09:37:45 2019 -0500 drm/amdgpu: wait to fetch the vbios until after common init We need the asic_funcs set for the get rom callbacks in some cases. Tested-by: Kent Russell Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) commit b9341521700dddea0c5d80d904c2c2f4d100323f Author: Markus Elfring Date: Mon Jun 17 14:24:14 2019 +0200 drm/amd/powerplay: Delete a redundant memory setting in vega20_set_default_od8_setttings() The memory was set to zero already by a call of the function “kzalloc”. Thus remove an extra call of the function “memset” for this purpose. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 1 - 1 file changed, 1 deletion(-) commit 4fe7d1a8a4c4dd289ec30d02f4bad9054674ec6c Author: Markus Elfring Date: Mon Jun 17 13:56:39 2019 +0200 drm/amd/display: Delete a redundant memory setting in amdgpu_dm_irq_register_interrupt() The memory was set to zero already by a call of the function “kzalloc”. Thus remove an extra call of the function “memset” for this purpose. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c | 2 -- 1 file changed, 2 deletions(-) commit e1a2f2d23a989c928c5c5b3d4827daf2f01dd9df Author: Arnd Bergmann Date: Mon Jun 17 14:51:45 2019 +0200 drm/amdgpu: fix error handling in df_v3_6_pmc_start When df_v3_6_pmc_get_ctrl_settings() fails for some reason, we store uninitialized data in a register, as gcc points out: drivers/gpu/drm/amd/amdgpu/df_v3_6.c: In function 'df_v3_6_pmc_start': drivers/gpu/drm/amd/amdgpu/amdgpu.h:1012:29: error: 'lo_val' may be used uninitialized in this function [-Werror=maybe-uninitialized] #define WREG32_PCIE(reg, v) adev->pcie_wreg(adev, (reg), (v)) ^~~~ drivers/gpu/drm/amd/amdgpu/df_v3_6.c:334:39: note: 'lo_val' was declared here uint32_t lo_base_addr, hi_base_addr, lo_val, hi_val; ^~~~~~ Make it return a proper error code that we can catch in the caller. Fixes: 992af942a6cf ("drm/amdgpu: add df perfmon regs and funcs for xgmi") Signed-off-by: Arnd Bergmann Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/df_v3_6.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit b6bb56ac7d16887f8ef95403b18d346b5cfae8cf Author: Geert Uytterhoeven Date: Mon Jun 17 16:37:28 2019 +0200 drm/amd/display: Add missing newline at end of file "git diff" says: \ No newline at end of file after modifying the file. Signed-off-by: Geert Uytterhoeven Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/modules/power/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 82973e078b9dcb07a1379f4e75a4f65d2c793d49 Author: Prike Liang Date: Fri Jun 14 12:06:35 2019 +0800 drm/amd/powerplay: detect version of smu backend (v2) Print the backend type. v2: whitespace fixes (Alex) Signed-off-by: Prike Liang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 1 + drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 1 + drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c | 1 + drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c | 1 + drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c | 1 + drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c | 1 + drivers/gpu/drm/amd/powerplay/smumgr/smu10_smumgr.c | 1 + drivers/gpu/drm/amd/powerplay/smumgr/smu8_smumgr.c | 1 + drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c | 1 + drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c | 1 + drivers/gpu/drm/amd/powerplay/smumgr/vega12_smumgr.c | 1 + drivers/gpu/drm/amd/powerplay/smumgr/vega20_smumgr.c | 1 + drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c | 1 + 13 files changed, 13 insertions(+) commit 38bb4226ffe51b033ecc6724c00ce0dd210db248 Author: Oak Zeng Date: Fri Jun 14 19:27:58 2019 -0500 drm/amdkfd: Fix sdma queue allocate race condition SDMA queue allocation requires the dqm lock as it modify the global dqm members. Enclose it in the dqm_lock. Signed-off-by: Oak Zeng Reviewed-by: Philip Yang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 6a6ef5ee257eb178a5ada3b4327a9a208d3a4683 Author: Oak Zeng Date: Fri Jun 14 20:10:45 2019 -0500 drm/amdkfd: Fix a circular lock dependency The idea to break the circular lock dependency is to temporarily drop dqm lock before calling allocate_mqd. See callstack #1 below. [ 59.510149] [drm] Initialized amdgpu 3.30.0 20150101 for 0000:04:00.0 on minor 0 [ 513.604034] ====================================================== [ 513.604205] WARNING: possible circular locking dependency detected [ 513.604375] 4.18.0-kfd-root #2 Tainted: G W [ 513.604530] ------------------------------------------------------ [ 513.604699] kswapd0/611 is trying to acquire lock: [ 513.604840] 00000000d254022e (&dqm->lock_hidden){+.+.}, at: evict_process_queues_nocpsch+0x26/0x140 [amdgpu] [ 513.605150] but task is already holding lock: [ 513.605307] 00000000961547fc (&anon_vma->rwsem){++++}, at: page_lock_anon_vma_read+0xe4/0x250 [ 513.605540] which lock already depends on the new lock. [ 513.605747] the existing dependency chain (in reverse order) is: [ 513.605944] -> #4 (&anon_vma->rwsem){++++}: [ 513.606106] __vma_adjust+0x147/0x7f0 [ 513.606231] __split_vma+0x179/0x190 [ 513.606353] mprotect_fixup+0x217/0x260 [ 513.606553] do_mprotect_pkey+0x211/0x380 [ 513.606752] __x64_sys_mprotect+0x1b/0x20 [ 513.606954] do_syscall_64+0x50/0x1a0 [ 513.607149] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 513.607380] -> #3 (&mapping->i_mmap_rwsem){++++}: [ 513.607678] rmap_walk_file+0x1f0/0x280 [ 513.607887] page_referenced+0xdd/0x180 [ 513.608081] shrink_page_list+0x853/0xcb0 [ 513.608279] shrink_inactive_list+0x33b/0x700 [ 513.608483] shrink_node_memcg+0x37a/0x7f0 [ 513.608682] shrink_node+0xd8/0x490 [ 513.608869] balance_pgdat+0x18b/0x3b0 [ 513.609062] kswapd+0x203/0x5c0 [ 513.609241] kthread+0x100/0x140 [ 513.609420] ret_from_fork+0x24/0x30 [ 513.609607] -> #2 (fs_reclaim){+.+.}: [ 513.609883] kmem_cache_alloc_trace+0x34/0x2e0 [ 513.610093] reservation_object_reserve_shared+0x139/0x300 [ 513.610326] ttm_bo_init_reserved+0x291/0x480 [ttm] [ 513.610567] amdgpu_bo_do_create+0x1d2/0x650 [amdgpu] [ 513.610811] amdgpu_bo_create+0x40/0x1f0 [amdgpu] [ 513.611041] amdgpu_bo_create_reserved+0x249/0x2d0 [amdgpu] [ 513.611290] amdgpu_bo_create_kernel+0x12/0x70 [amdgpu] [ 513.611584] amdgpu_ttm_init+0x2cb/0x560 [amdgpu] [ 513.611823] gmc_v9_0_sw_init+0x400/0x750 [amdgpu] [ 513.612491] amdgpu_device_init+0x14eb/0x1990 [amdgpu] [ 513.612730] amdgpu_driver_load_kms+0x78/0x290 [amdgpu] [ 513.612958] drm_dev_register+0x111/0x1a0 [ 513.613171] amdgpu_pci_probe+0x11c/0x1e0 [amdgpu] [ 513.613389] local_pci_probe+0x3f/0x90 [ 513.613581] pci_device_probe+0x102/0x1c0 [ 513.613779] driver_probe_device+0x2a7/0x480 [ 513.613984] __driver_attach+0x10a/0x110 [ 513.614179] bus_for_each_dev+0x67/0xc0 [ 513.614372] bus_add_driver+0x1eb/0x260 [ 513.614565] driver_register+0x5b/0xe0 [ 513.614756] do_one_initcall+0xac/0x357 [ 513.614952] do_init_module+0x5b/0x213 [ 513.615145] load_module+0x2542/0x2d30 [ 513.615337] __do_sys_finit_module+0xd2/0x100 [ 513.615541] do_syscall_64+0x50/0x1a0 [ 513.615731] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 513.615963] -> #1 (reservation_ww_class_mutex){+.+.}: [ 513.616293] amdgpu_amdkfd_alloc_gtt_mem+0xcf/0x2c0 [amdgpu] [ 513.616554] init_mqd+0x223/0x260 [amdgpu] [ 513.616779] create_queue_nocpsch+0x4d9/0x600 [amdgpu] [ 513.617031] pqm_create_queue+0x37c/0x520 [amdgpu] [ 513.617270] kfd_ioctl_create_queue+0x2f9/0x650 [amdgpu] [ 513.617522] kfd_ioctl+0x202/0x350 [amdgpu] [ 513.617724] do_vfs_ioctl+0x9f/0x6c0 [ 513.617914] ksys_ioctl+0x66/0x70 [ 513.618095] __x64_sys_ioctl+0x16/0x20 [ 513.618286] do_syscall_64+0x50/0x1a0 [ 513.618476] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 513.618695] -> #0 (&dqm->lock_hidden){+.+.}: [ 513.618984] __mutex_lock+0x98/0x970 [ 513.619197] evict_process_queues_nocpsch+0x26/0x140 [amdgpu] [ 513.619459] kfd_process_evict_queues+0x3b/0xb0 [amdgpu] [ 513.619710] kgd2kfd_quiesce_mm+0x1c/0x40 [amdgpu] [ 513.620103] amdgpu_amdkfd_evict_userptr+0x38/0x70 [amdgpu] [ 513.620363] amdgpu_mn_invalidate_range_start_hsa+0xa6/0xc0 [amdgpu] [ 513.620614] __mmu_notifier_invalidate_range_start+0x70/0xb0 [ 513.620851] try_to_unmap_one+0x7fc/0x8f0 [ 513.621049] rmap_walk_anon+0x121/0x290 [ 513.621242] try_to_unmap+0x93/0xf0 [ 513.621428] shrink_page_list+0x606/0xcb0 [ 513.621625] shrink_inactive_list+0x33b/0x700 [ 513.621835] shrink_node_memcg+0x37a/0x7f0 [ 513.622034] shrink_node+0xd8/0x490 [ 513.622219] balance_pgdat+0x18b/0x3b0 [ 513.622410] kswapd+0x203/0x5c0 [ 513.622589] kthread+0x100/0x140 [ 513.622769] ret_from_fork+0x24/0x30 [ 513.622957] other info that might help us debug this: [ 513.623354] Chain exists of: &dqm->lock_hidden --> &mapping->i_mmap_rwsem --> &anon_vma->rwsem [ 513.623900] Possible unsafe locking scenario: [ 513.624189] CPU0 CPU1 [ 513.624397] ---- ---- [ 513.624594] lock(&anon_vma->rwsem); [ 513.624771] lock(&mapping->i_mmap_rwsem); [ 513.625020] lock(&anon_vma->rwsem); [ 513.625253] lock(&dqm->lock_hidden); [ 513.625433] *** DEADLOCK *** [ 513.625783] 3 locks held by kswapd0/611: [ 513.625967] #0: 00000000f14edf84 (fs_reclaim){+.+.}, at: __fs_reclaim_acquire+0x5/0x30 [ 513.626309] #1: 00000000961547fc (&anon_vma->rwsem){++++}, at: page_lock_anon_vma_read+0xe4/0x250 [ 513.626671] #2: 0000000067b5cd12 (srcu){....}, at: __mmu_notifier_invalidate_range_start+0x5/0xb0 [ 513.627037] stack backtrace: [ 513.627292] CPU: 0 PID: 611 Comm: kswapd0 Tainted: G W 4.18.0-kfd-root #2 [ 513.627632] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 [ 513.627990] Call Trace: [ 513.628143] dump_stack+0x7c/0xbb [ 513.628315] print_circular_bug.isra.37+0x21b/0x228 [ 513.628581] __lock_acquire+0xf7d/0x1470 [ 513.628782] ? unwind_next_frame+0x6c/0x4f0 [ 513.628974] ? lock_acquire+0xec/0x1e0 [ 513.629154] lock_acquire+0xec/0x1e0 [ 513.629357] ? evict_process_queues_nocpsch+0x26/0x140 [amdgpu] [ 513.629587] __mutex_lock+0x98/0x970 [ 513.629790] ? evict_process_queues_nocpsch+0x26/0x140 [amdgpu] [ 513.630047] ? evict_process_queues_nocpsch+0x26/0x140 [amdgpu] [ 513.630309] ? evict_process_queues_nocpsch+0x26/0x140 [amdgpu] [ 513.630562] evict_process_queues_nocpsch+0x26/0x140 [amdgpu] [ 513.630816] kfd_process_evict_queues+0x3b/0xb0 [amdgpu] [ 513.631057] kgd2kfd_quiesce_mm+0x1c/0x40 [amdgpu] [ 513.631288] amdgpu_amdkfd_evict_userptr+0x38/0x70 [amdgpu] [ 513.631536] amdgpu_mn_invalidate_range_start_hsa+0xa6/0xc0 [amdgpu] [ 513.632076] __mmu_notifier_invalidate_range_start+0x70/0xb0 [ 513.632299] try_to_unmap_one+0x7fc/0x8f0 [ 513.632487] ? page_lock_anon_vma_read+0x68/0x250 [ 513.632690] rmap_walk_anon+0x121/0x290 [ 513.632875] try_to_unmap+0x93/0xf0 [ 513.633050] ? page_remove_rmap+0x330/0x330 [ 513.633239] ? rcu_read_unlock+0x60/0x60 [ 513.633422] ? page_get_anon_vma+0x160/0x160 [ 513.633613] shrink_page_list+0x606/0xcb0 [ 513.633800] shrink_inactive_list+0x33b/0x700 [ 513.633997] shrink_node_memcg+0x37a/0x7f0 [ 513.634186] ? shrink_node+0xd8/0x490 [ 513.634363] shrink_node+0xd8/0x490 [ 513.634537] balance_pgdat+0x18b/0x3b0 [ 513.634718] kswapd+0x203/0x5c0 [ 513.634887] ? wait_woken+0xb0/0xb0 [ 513.635062] kthread+0x100/0x140 [ 513.635231] ? balance_pgdat+0x3b0/0x3b0 [ 513.635414] ? kthread_delayed_work_timer_fn+0x80/0x80 [ 513.635626] ret_from_fork+0x24/0x30 [ 513.636042] Evicting PASID 32768 queues [ 513.936236] Restoring PASID 32768 queues [ 524.708912] Evicting PASID 32768 queues [ 524.999875] Restoring PASID 32768 queues Signed-off-by: Oak Zeng Reviewed-by: Philip Yang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 4 ++++ 1 file changed, 4 insertions(+) commit d091bc0a700faabf84eefedea1e133441ad52004 Author: Oak Zeng Date: Fri Jun 14 19:39:55 2019 -0500 Revert "drm/amdkfd: Fix a circular lock dependency" This reverts commit 06b89b38f3cc518a761164f9f958a9607bbb3587. This fix is not proper. allocate_mqd can't be moved before allocate_sdma_queue as it depends on q->properties->sdma_id set in later. Signed-off-by: Oak Zeng Reviewed-by: Philip Yang Signed-off-by: Alex Deucher .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 70d488fb3f9e096e037994aa4b18441fea625e7b Author: Oak Zeng Date: Fri Jun 14 19:32:51 2019 -0500 Revert "drm/amdkfd: Fix sdma queue allocate race condition" This reverts commit f77dac6cd62e5d4bcadd740620af1218bfb54cc6. This fix is not proper. allocate_mqd can't be moved before allocate_sdma_queue as it depends on q->properties->sdma_id set in later. Signed-off-by: Oak Zeng Reviewed-by: Philip Yang Signed-off-by: Alex Deucher .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 26 ++++++++++++---------- 1 file changed, 14 insertions(+), 12 deletions(-) commit eb03e7959c36b1df2cc7c9054e1ee1e821368272 Author: James Zhu Date: Mon Jun 10 13:23:41 2019 -0400 drm/amdgpu: explicitly set mmGDS_VMID0_BASE to 0 Explicitly set mmGDS_VMID0_BASE to 0. Also update GDS_VMID0_BASE/_SIZE with direct register writes. Signed-off-by: James Zhu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) commit b84dfd175c09888751f501e471fdca346f582e06 Author: Marc Gonzalez Date: Thu Apr 11 10:50:53 2019 +0200 arm64: dts: qcom: msm8998: Add PCIe PHY and RC nodes Add MSM8998 PCIe QMP PHY and PCIe root complex DT nodes. Based on the following DTS downstream: https://source.codeaurora.org/quic/la/kernel/msm-4.4/tree/arch/arm/boot/dts/qcom/msm8998.dtsi?h=LE.UM.1.3.r3.25#n2537 Signed-off-by: Marc Gonzalez Signed-off-by: Bjorn Andersson arch/arm64/boot/dts/qcom/msm8998.dtsi | 69 +++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) commit 8389b869bbf00de11e5bc7ae3a433eb13d7b53d0 Author: Marc Gonzalez Date: Mon Apr 1 17:40:13 2019 +0200 arm64: dts: qcom: msm8998: Add ANOC1 SMMU node The MSM8998 ANOC1(*) SMMU services BLSP2, PCIe, UFS, and USB. (*) Aggregate Network-on-Chip #1 Based on the following DTS downstream: https://source.codeaurora.org/quic/la/kernel/msm-4.4/tree/arch/arm/boot/dts/qcom/msm-arm-smmu-8998.dtsi?h=LE.UM.1.3.r3.25#n18 Signed-off-by: Marc Gonzalez Signed-off-by: Bjorn Andersson arch/arm64/boot/dts/qcom/msm8998.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit eb69c8a4bf5e26ae112793bb04a6cd6c27114900 Author: Daniel Vetter Date: Fri Jun 14 22:35:18 2019 +0200 drm/gem: Unexport drm_gem_(un)pin/v(un)map They're purely for internal use, not for drivers. Cc: Noralf Trønnes Cc: Christian König Reviewed-by: Eric Anholt Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-3-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_gem.c | 32 -------------------------------- drivers/gpu/drm/drm_internal.h | 5 +++++ include/drm/drm_gem.h | 5 ----- 3 files changed, 5 insertions(+), 37 deletions(-) commit 8db420ac6cf2e4a019c64d310e516520522900b9 Author: Daniel Vetter Date: Fri Jun 14 22:35:17 2019 +0200 drm/todo: Improve drm_gem_object funcs todo We're kinda going in the wrong direction. Spotted while typing better gem/prime docs. Cc: Thomas Zimmermann Cc: Gerd Hoffmann Cc: Rob Herring Cc: Noralf Trønnes Reviewed-by: Eric Anholt Acked-by: Gerd Hoffmann Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-2-daniel.vetter@ffwll.ch Documentation/gpu/todo.rst | 4 ++++ 1 file changed, 4 insertions(+) commit f9bc64a0f0f884036d76d71edeaafb994c5ceddf Author: Chaitanya Kulkarni Date: Thu Jun 13 07:14:21 2019 -0700 block: use req_op() to maintain consistency This is a pure code cleanup patch and doesn't change any functionality. In block layer to identify the request operation req_op() macro is used, so change the open coding the req_op() in the blk-mq-debugfs.c. Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke Signed-off-by: Chaitanya Kulkarni Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 501e94b52aeda5841a60ceead5984ff575aeefa0 Author: Geert Uytterhoeven Date: Mon Jun 17 16:40:48 2019 +0200 ASoC: Add missing newline at end of file "git diff" says: \ No newline at end of file after modifying the files. Signed-off-by: Geert Uytterhoeven Signed-off-by: Mark Brown sound/soc/mediatek/common/Makefile | 2 +- sound/soc/tegra/Makefile | 2 +- sound/usb/bcd2000/Makefile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 3e802e90ffcce333127d928eaefdfcc34af233e8 Author: Janusz Krzysztofik Date: Sun Jun 2 16:55:49 2019 +0200 ASoC: ti: Fix SDMA users not providing channel names McBSP used to work correctly as long as compat DMA probing, removed by commit 642aafea8889 ("ASoC: ti: remove compat dma probing"), was available. New method of DMA probing apparently requires users to provide channel names when registering with SDMA, while McBSP passes NULLs. Fix it. The same probably applies to McASP (not tested), hence the patch fixes both. Fixes: 642aafea8889 ("ASoC: ti: remove compat dma probing") Signed-off-by: Janusz Krzysztofik Signed-off-by: Mark Brown sound/soc/ti/davinci-mcasp.c | 2 +- sound/soc/ti/omap-mcbsp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit d7f9b2f18eaef74b4f948c7e24e3a8f796f0c90d Author: Fernando Fernandez Mancera Date: Fri Jun 7 02:36:07 2019 +0200 netfilter: synproxy: extract SYNPROXY infrastructure from {ipt, ip6t}_SYNPROXY Add common functions into nf_synproxy_core.c to prepare for nftables support. The prototypes of the functions used by {ipt, ip6t}_SYNPROXY are in the new file nf_synproxy.h Signed-off-by: Fernando Fernandez Mancera Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack_synproxy.h | 13 +- include/net/netfilter/nf_synproxy.h | 44 ++ net/ipv4/netfilter/ipt_SYNPROXY.c | 394 +---------- net/ipv6/netfilter/ip6t_SYNPROXY.c | 420 +----------- net/netfilter/nf_synproxy_core.c | 896 ++++++++++++++++++++++++-- 5 files changed, 920 insertions(+), 847 deletions(-) commit 241800642ea3482ab3f80a2a3662e9f2e6a82208 Author: Fletcher Woodruff Date: Fri Jun 14 13:48:52 2019 -0600 ASoC: rt5677: move jack-detect init to i2c probe This patch moves the code to select the gpios for jack detection from rt5677_probe to rt5677_init_irq (called from rt5677_i2c_probe). It also sets some registers to fix bugs related to jack detection, and adds some constants and comments to make it easier to understand what certain register settings are controlling. Signed-off-by: Ben Zhang Signed-off-by: Fletcher Woodruff Signed-off-by: Mark Brown sound/soc/codecs/rt5677.c | 60 +++++++++++++++++++++++++++-------------------- sound/soc/codecs/rt5677.h | 6 +++++ 2 files changed, 40 insertions(+), 26 deletions(-) commit 8893cba2fa6994ac8434cbc616eeddcde211ec45 Author: Fletcher Woodruff Date: Fri Jun 14 13:48:51 2019 -0600 ASoC: rt5677: fall back to DT prop names on error The rt5677 driver uses ACPI-style property names to read from the device API. However, these do not match the property names in _DSD used on the Chromebook Pixel 2015, which are closer to the Device Tree style. Unify the two functions for reading from the device API so that they try ACPI-style names first and fall back to the DT names on error. With this patch, plugging and unplugging the headphone jack switches between headphones and speakers automatically. Signed-off-by: Fletcher Woodruff Signed-off-by: Mark Brown sound/soc/codecs/rt5677.c | 74 +++++++++++++++++++++++------------------------ 1 file changed, 37 insertions(+), 37 deletions(-) commit 3006a5224f15cf68edc4878799ac6d6089861518 Author: Fernando Fernandez Mancera Date: Fri Jun 7 02:36:05 2019 +0200 netfilter: synproxy: remove module dependency on IPv6 SYNPROXY This is a prerequisite for the infrastructure module NETFILTER_SYNPROXY. The new module is needed to avoid duplicated code for the SYNPROXY nftables support. Signed-off-by: Fernando Fernandez Mancera Signed-off-by: Pablo Neira Ayuso include/linux/netfilter_ipv6.h | 36 ++++++++++++++++++++++++++++++++++++ net/ipv6/netfilter.c | 2 ++ 2 files changed, 38 insertions(+) commit 5fcc88ecf681b64da6c2c918352e2451db6a97ec Author: Fernando Fernandez Mancera Date: Fri Jun 7 02:36:02 2019 +0200 netfilter: synproxy: add common uapi for SYNPROXY infrastructure This new UAPI file is going to be used by the xt and nft common SYNPROXY infrastructure. It is needed to avoid duplicated code. Signed-off-by: Fernando Fernandez Mancera Signed-off-by: Pablo Neira Ayuso include/uapi/linux/netfilter/nf_SYNPROXY.h | 19 +++++++++++++++++++ include/uapi/linux/netfilter/xt_SYNPROXY.h | 18 +++++++----------- 2 files changed, 26 insertions(+), 11 deletions(-) commit 1b89dc93b8b257fa0a72ec8a5429021dd0fe7865 Author: Kishon Vijay Abraham I Date: Wed May 29 14:48:12 2019 +0530 arm64: dts: ti: am654-base-board: Disable SERDES and PCIe AM654 base board does not have any PCIe slots. Disable all the SERDES and PCIe instances. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Tero Kristo arch/arm64/boot/dts/ti/k3-am654-base-board.dts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 30eb8ea46cc6850fa63a901f83aa58f04b5d29c1 Author: Kishon Vijay Abraham I Date: Wed May 29 14:48:11 2019 +0530 arm64: dts: k3-am6: Add PCIe Endpoint DT node Add PCIe Endpoint DT node. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Tero Kristo arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit cfa6437a71646854a46b2daff78f5b893f95c78d Author: Kishon Vijay Abraham I Date: Wed May 29 14:48:10 2019 +0530 arm64: dts: k3-am6: Add PCIe Root Complex DT node Add PCIe Root Complex DT node. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Tero Kristo arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 53 ++++++++++++++++++++++++++++++++ arch/arm64/boot/dts/ti/k3-am65.dtsi | 1 + 2 files changed, 54 insertions(+) commit cedc255cc6fecab1be1bad6155cbb8ddee24e7f9 Author: Kishon Vijay Abraham I Date: Wed May 29 14:48:09 2019 +0530 arm64: dts: k3-am6: Add SERDES DT node Add DT node for SERDES0 and SERDES1. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Tero Kristo arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 41 ++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit 1cbe04b0b74414f1182213e7f9d90e9ffe258e6d Author: Kishon Vijay Abraham I Date: Wed May 29 14:48:08 2019 +0530 arm64: dts: k3-am6: Add mux-controller DT node required for muxing SERDES Add mux-controller DT node as a child node of scm_conf. This is required for muxing SERDES between USB, PCIe and ICSS2 SGMII. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Tero Kristo arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit 4b4ffc6e1f66811aba8347d64a3a55834c7ae5a5 Author: Kishon Vijay Abraham I Date: Wed May 29 14:48:07 2019 +0530 arm64: dts: k3-am6: Add "socionext,synquacer-pre-its" property to gic_its GIC_ITS used in AM654 platform has the same configuration as that of GIC_ITS used in Socionext SoCs. Add "socionext,synquacer-pre-its" property to get PCI MSI working. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Tero Kristo arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 1 + 1 file changed, 1 insertion(+) commit cc2d13e750099207ae8b07b701517dc57bfcf3cd Author: Roger Quadros Date: Wed May 29 16:13:44 2019 -0500 arm64: dts: ti: k3-am65: Add MSMC RAM ranges in interconnect node Add the MSCM RAM address space to the ranges property of the cbass_main interconnect node so that the addresses can be translated properly. This fixes the probe failure in the sram driver for the MSMC RAM node. Signed-off-by: Roger Quadros Signed-off-by: Suman Anna Acked-by: Nishanth Menon Signed-off-by: Tero Kristo arch/arm64/boot/dts/ti/k3-am65.dtsi | 1 + 1 file changed, 1 insertion(+) commit ba576a6232dc06605f4edfaeea9b526ba7724f84 Author: Jeffrey Hugo Date: Thu Jun 13 14:25:31 2019 -0700 regulator: qcom_spmi: Refactor get_mode/set_mode spmi_regulator_common_get_mode and spmi_regulator_common_set_mode use multi-level ifs which mirror a switch statement. Refactor to use a switch statement to make the code flow more clear. Signed-off-by: Jeffrey Hugo Reviewed-by: Bjorn Andersson Signed-off-by: Mark Brown drivers/regulator/qcom_spmi-regulator.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) commit 86f4ff7a0c0cd8e391ffa4dd0edb82ae0eedcc9e Author: Jorge Ramirez-Ortiz Date: Thu Jun 13 14:25:30 2019 -0700 regulator: qcom_spmi: enable linear range info Signed-off-by: Jorge Ramirez-Ortiz Signed-off-by: Jeffrey Hugo Signed-off-by: Mark Brown drivers/regulator/qcom_spmi-regulator.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 9de7eaddfa7f47fbb1cd9cdb9aab405599ef414e Author: Arnd Bergmann Date: Mon Jun 17 14:45:49 2019 +0200 ASoC: SOF: disallow building without CONFIG_PCI again Compile-testing without PCI just causes warnings: sound/soc/sof/sof-pci-dev.c:330:13: error: 'sof_pci_remove' defined but not used [-Werror=unused-function] static void sof_pci_remove(struct pci_dev *pci) ^~~~~~~~~~~~~~ sound/soc/sof/sof-pci-dev.c:230:12: error: 'sof_pci_probe' defined but not used [-Werror=unused-function] static int sof_pci_probe(struct pci_dev *pci, ^~~~~~~~~~~~~ I tried to fix this in a way that would still allow compile tests, but it got too ugly, so this just reverts the patch that allowed it in the first place. Most architectures do allow enabling PCI, so the value of the COMPILE_TEST alternative was not very high to start with. Fixes: e13ef82a9ab8 ("ASoC: SOF: add COMPILE_TEST for PCI options") Signed-off-by: Arnd Bergmann Signed-off-by: Mark Brown sound/soc/sof/Kconfig | 2 +- sound/soc/sof/intel/hda.c | 13 ++----------- sound/soc/sof/sof-pci-dev.c | 4 ---- 3 files changed, 3 insertions(+), 16 deletions(-) commit 667ec21ebf0913d7166ddea2de14a0d56be0efc6 Merge: 22567590b2e6 fe03d4745675 Author: Pablo Neira Ayuso Date: Mon Jun 17 16:37:24 2019 +0200 Merge branch 'master' of git://blackhole.kfki.hu/nf-next Jozsef Kadlecsik says: ==================== ipset patches for nf-next - Remove useless memset() calls, nla_parse_nested/nla_parse erase the tb array properly, from Florent Fourcot. - Merge the uadd and udel functions, the code is nicer this way, also from Florent Fourcot. - Add a missing check for the return value of a nla_parse[_deprecated] call, from Aditya Pakki. - Add the last missing check for the return value of nla_parse[_deprecated] call. - Fix error path and release the references properly in set_target_v3_checkentry(). - Fix memory accounting which is reported to userspace for hash types on resize, from Stefano Brivio. - Update my email address to kadlec@netfilter.org. The patch covers all places in the source tree where my kadlec@blackhole.kfki.hu address could be found. ==================== Signed-off-by: Pablo Neira Ayuso commit 22567590b2e634247931b3d2351384ba45720ebe Author: Christian Brauner Date: Mon Jun 10 23:26:06 2019 +0200 netfilter: bridge: namespace bridge netfilter sysctls Currently, the /proc/sys/net/bridge folder is only created in the initial network namespace. This patch ensures that the /proc/sys/net/bridge folder is available in each network namespace if the module is loaded and disappears from all network namespaces when the module is unloaded. In doing so the patch makes the sysctls: bridge-nf-call-arptables bridge-nf-call-ip6tables bridge-nf-call-iptables bridge-nf-filter-pppoe-tagged bridge-nf-filter-vlan-tagged bridge-nf-pass-vlan-input-dev apply per network namespace. This unblocks some use-cases where users would like to e.g. not do bridge filtering for bridges in a specific network namespace while doing so for bridges located in another network namespace. The netfilter rules are afaict already per network namespace so it should be safe for users to specify whether bridge devices inside a network namespace are supposed to go through iptables et al. or not. Also, this can already be done per-bridge by setting an option for each individual bridge via Netlink. It should also be possible to do this for all bridges in a network namespace via sysctls. Cc: Tyler Hicks Signed-off-by: Christian Brauner Signed-off-by: Pablo Neira Ayuso net/bridge/br_netfilter_hooks.c | 117 ++++++++++++++++++++++++---------------- 1 file changed, 72 insertions(+), 45 deletions(-) commit ff6d090d0db41425aef0cfe5dc58bb3cc12514a2 Author: Christian Brauner Date: Mon Jun 10 23:26:05 2019 +0200 netfilter: bridge: port sysctls to use brnf_net This ports the sysctls to use struct brnf_net. With this patch we make it possible to namespace the br_netfilter module in the following patch. Signed-off-by: Christian Brauner Signed-off-by: Pablo Neira Ayuso include/net/netfilter/br_netfilter.h | 3 +- net/bridge/br_netfilter_hooks.c | 162 ++++++++++++++++++++++------------- net/bridge/br_netfilter_ipv6.c | 2 +- 3 files changed, 107 insertions(+), 60 deletions(-) commit 9911c1139fd072594ac259c2ce055b004ca92f49 Author: Pablo Neira Ayuso Date: Fri Jun 7 16:37:30 2019 +0200 netfilter: xt_owner: bail out with EINVAL in case of unsupported flags Reject flags that are not supported with EINVAL. Signed-off-by: Pablo Neira Ayuso include/uapi/linux/netfilter/xt_owner.h | 5 +++++ net/netfilter/xt_owner.c | 3 +++ 2 files changed, 8 insertions(+) commit 87e389b4c20091b562bd65d90272f9d7c67eb437 Author: Florian Westphal Date: Tue Jun 4 14:14:04 2019 +0200 netfilter: conntrack: small conntrack lookup optimization ____nf_conntrack_find() performs checks on the conntrack objects in this order: 1. if (nf_ct_is_expired(ct)) This fetches ct->timeout, in third cache line. The hnnode that is used to store the list pointers resides in the first (origin) or second (reply tuple) cache lines. This test rarely passes, but its necessary to reap obsolete entries. 2. if (nf_ct_is_dying(ct)) This fetches ct->status, also in third cache line. The test is useless, and can be removed: Consider: cpu0 cpu1 ct = ____nf_conntrack_find() atomic_inc_not_zero(ct) -> ok nf_ct_key_equal -> ok is_dying -> DYING bit not set, ok set_bit(ct, DYING); ... unhash ... etc. return ct -> returning a ct with dying bit set, despite having a test for it. This (unlikely) case is fine - refcount prevents ct from getting free'd. 3. if (nf_ct_key_equal(h, tuple, zone, net)) nf_ct_key_equal checks in following order: 1. Tuple equal (first or second cacheline) 2. Zone equal (third cacheline) 3. confirmed bit set (->status, third cacheline) 4. net namespace match (third cacheline). Swapping "timeout" and "cpu" places timeout in the first cacheline. This has two advantages: 1. For a conntrack that won't even match the original tuple, we will now only fetch the first and maybe the second cacheline instead of always accessing the 3rd one as well. 2. in case of TCP ct->timeout changes frequently because we reduce/increase it when there are packets outstanding in the network. The first cacheline contains both the reference count and the ct spinlock, i.e. moving timeout there avoids writes to 3rd cacheline. The restart sequence in __nf_conntrack_find() is removed, if we found a candidate, but then fail to increment the refcount or discover the tuple has changed (object recycling), just pretend we did not find an entry. A second lookup won't find anything until another CPU adds a new conntrack with identical tuple into the hash table, which is very unlikely. We have the confirmation-time checks (when we hold hash lock) that deal with identical entries and even perform clash resolution in some cases. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack.h | 7 +++---- net/netfilter/nf_conntrack_core.c | 25 +++++++++++++------------ 2 files changed, 16 insertions(+), 16 deletions(-) commit 857b46027d6f91150797295752581b7155b9d0e1 Author: Stéphane Veyret Date: Sat May 25 15:30:58 2019 +0200 netfilter: nft_ct: add ct expectations support This patch allows to add, list and delete expectations via nft objref infrastructure and assigning these expectations via nft rule. This allows manual port triggering when no helper is defined to manage a specific protocol. For example, if I have an online game which protocol is based on initial connection to TCP port 9753 of the server, and where the server opens a connection to port 9876, I can set rules as follow: table ip filter { ct expectation mygame { protocol udp; dport 9876; timeout 2m; size 1; } chain input { type filter hook input priority 0; policy drop; tcp dport 9753 ct expectation set "mygame"; } chain output { type filter hook output priority 0; policy drop; udp dport 9876 ct status expected accept; } } Signed-off-by: Stéphane Veyret Signed-off-by: Pablo Neira Ayuso include/uapi/linux/netfilter/nf_tables.h | 14 +++- net/netfilter/nft_ct.c | 138 ++++++++++++++++++++++++++++++- 2 files changed, 149 insertions(+), 3 deletions(-) commit 833123386c6937397eff8d2164970efe299a0b1c Author: Suman Anna Date: Wed Jun 5 11:34:34 2019 -0500 arm64: dts: ti: k3-am65: Add R5F ranges in interconnect nodes Add the address spaces for the R5F cores in MCU domain to the ranges property of the cbass_mcu interconnect node so that the addresses within the R5F nodes can be translated properly by the relevant OF address API. Signed-off-by: Suman Anna Signed-off-by: Tero Kristo arch/arm64/boot/dts/ti/k3-am65.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit f853f00531646535c686b493d7826e69dd1a1b46 Author: Suman Anna Date: Wed Jun 5 11:34:32 2019 -0500 arm64: dts: ti: k3-am65-mcu: Add the MCU RAM node Add the on-chip SRAM present within the MCU domain as a mmio-sram node. The K3 AM65x SoCs have 512 KB of such memory. Any specific memory range within this RAM needed by a software module ought to be reserved using an appropriate child node. Signed-off-by: Suman Anna Signed-off-by: Tero Kristo arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 0ded541218d142e9c64c42c8a91208a4d79eb541 Author: Suman Anna Date: Wed Jun 5 11:34:31 2019 -0500 arm64: dts: ti: k3-am65: Add MCU SRAM ranges in interconnect nodes Add the address space for the MCU SRAM memory to the ranges property of the cbass_mcu interconnect node so that the addresses within the mcu_sram nodes and its children can be translated properly by the relevant OF address API. Signed-off-by: Suman Anna Signed-off-by: Tero Kristo arch/arm64/boot/dts/ti/k3-am65.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit c67f7388a62e1de81894dfbf8c6cc296a7a86ded Author: Keerthy Date: Thu Jun 6 15:26:20 2019 +0530 arm64: dts: ti: am654-base-board: Add gpio_keys node There are 2 push buttons: SW5 and SW6 that are basically connected to WKUP_GPIO0_24 and WKUP_GPIO0_27 respectively. Add the respective nodes and the pinctrl data to set the mode to GPIO and Input. Signed-off-by: Keerthy Signed-off-by: Tero Kristo arch/arm64/boot/dts/ti/k3-am654-base-board.dts | 27 ++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 980cc42754a5114b1d3d2ee5548deb8d1955638f Author: Keerthy Date: Thu Jun 6 15:26:19 2019 +0530 arm64: dts: ti: am6-main: Add gpio nodes Add gpio0/1 nodes under main domain. They have 96 and 90 gpios respectively and all are capable of generating banked interrupts. Signed-off-by: Keerthy Signed-off-by: Tero Kristo arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 7a558c4697e87ff9d4baba3c7668c2665baff158 Author: Keerthy Date: Thu Jun 6 15:26:18 2019 +0530 arm64: dts: ti: am6-wakeup: Add gpio node Add gpio0 node under wakeup domain. This has 56 gpios and all are capable of generating banked interrupts. Signed-off-by: Keerthy Signed-off-by: Tero Kristo arch/arm64/boot/dts/ti/k3-am65-wakeup.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 5fec389febea6f820573399f59069c507aebfbf4 Author: Lokesh Vutla Date: Thu May 2 15:11:19 2019 +0530 arm64: dts: ti: k3-am654: Add interrupt controllers in wakeup domain Wakeup domain in AM654 SoC has an interrupt router connected to gpio in wakeup domain. Add DT node for this interrupt router. Signed-off-by: Lokesh Vutla Signed-off-by: Tero Kristo arch/arm64/boot/dts/ti/k3-am65-wakeup.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) commit cba9943cdeb046ac9ecb448f821d0ad8e91d8c39 Author: Lokesh Vutla Date: Thu May 2 15:11:18 2019 +0530 arm64: dts: ti: k3-am654: Add interrupt controllers in main domain Main domain in AM654 has the following interrupt controller instances: - Main Domain GPIO Interrupt router connected to gpio in main domain. - Under the Main Domain Navigator Subsystem(NAVSS) - Main Navss Interrupt Router connected to main navss inta and mailboxes. - Main Navss Interrupt Aggregator connected to main domain UDMASS Add DT nodes for the above three interrupt controllers available in main domain. Signed-off-by: Lokesh Vutla Signed-off-by: Tero Kristo arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 41 ++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit f5a5d83f16cf3e310489df27ffb89322662714af Author: Lokesh Vutla Date: Thu May 2 15:11:17 2019 +0530 arm64: dts: ti: k3-am654: Update compatible for dmsc Use the am654 specific compatible for dmsc. This allows to use the am654 specific RM mapping table. Signed-off-by: Lokesh Vutla Signed-off-by: Tero Kristo arch/arm64/boot/dts/ti/k3-am65-wakeup.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 55535589eb7f46898621668fb2044ca0d21ca21e Author: Andy Shevchenko Date: Mon Jun 17 14:54:03 2019 +0300 regmap: lzo: Switch to bitmap_zalloc() Switch to bitmap_zalloc() to show clearly what we are allocating. Besides that it returns pointer of bitmap type instead of opaque void *. Signed-off-by: Andy Shevchenko Signed-off-by: Mark Brown drivers/base/regmap/regcache-lzo.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 9ee7250384d877b3fca16e1ddcbeb2859a1b8d70 Author: Mika Kuoppala Date: Fri Jun 14 19:43:45 2019 +0300 drm/i915/gtt: Generalize alloc_pd Allocate all page directory variants with alloc_pd. As the lvl3 and lvl4 variants differ in manipulation, we need to check for existence of backing phys page before accessing it. v2: use err in returns Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190614164350.30415-5-mika.kuoppala@linux.intel.com drivers/gpu/drm/i915/i915_gem_gtt.c | 88 +++++++++++++++---------------------- 1 file changed, 36 insertions(+), 52 deletions(-) commit 56ab674190b1f3047a186954d5e13cfaf77edc59 Author: Mika Kuoppala Date: Fri Jun 14 19:43:44 2019 +0300 drm/i915/gtt: Introduce init_pd All page directories, excluding last level, are initialized with pointer to next level page directories. Make common function for it. Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190614164350.30415-4-mika.kuoppala@linux.intel.com drivers/gpu/drm/i915/i915_gem_gtt.c | 37 ++++++++++++++----------------------- 1 file changed, 14 insertions(+), 23 deletions(-) commit 4fba8764b6db821ed632df38156e702a49eb1b5d Author: Mika Kuoppala Date: Fri Jun 14 19:43:43 2019 +0300 drm/i915/gtt: Introduce init_pd_with_page We set the page directory entries to point into a page table. There is no gen specifics in here so make it simple and obvious. Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190614164350.30415-3-mika.kuoppala@linux.intel.com drivers/gpu/drm/i915/i915_gem_gtt.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit b5b7bef9ca9e63cdc563dce447505feb2992cca5 Author: Mika Kuoppala Date: Fri Jun 14 19:43:42 2019 +0300 drm/i915/gtt: Use a common type for page directories All page directories are identical in function, only the position in the hierarchy differ. Use same base type for directory functionality. v2: cleanup, size always 512, init to null Cc: Chris Wilson Cc: Joonas Lahtinen Cc: Matthew Auld Cc: Abdiel Janulgue Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190614164350.30415-2-mika.kuoppala@linux.intel.com drivers/gpu/drm/i915/gem/i915_gem_context.c | 2 +- drivers/gpu/drm/i915/gt/intel_lrc_reg.h | 2 +- drivers/gpu/drm/i915/gt/intel_ringbuffer.c | 2 +- drivers/gpu/drm/i915/gvt/scheduler.c | 30 ++- drivers/gpu/drm/i915/i915_gem_gtt.c | 351 ++++++++++++++-------------- drivers/gpu/drm/i915/i915_gem_gtt.h | 64 ++--- 6 files changed, 236 insertions(+), 215 deletions(-) commit 7d82cc353ad4e57d4d459e459f305bf43dedfdad Author: Mika Kuoppala Date: Fri Jun 14 19:43:41 2019 +0300 drm/i915/gtt: No need to zero the table for page dirs We set them to scratch right after allocation so prevent useless zeroing before. v2: atomic_t v3: allow pdp alloc fail Cc: Chris Wilson Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190614164350.30415-1-mika.kuoppala@linux.intel.com drivers/gpu/drm/i915/i915_gem_gtt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5669245b57df8a0edae475e06d1b851729a21457 Author: Arnd Bergmann Date: Mon Jun 17 14:55:02 2019 +0200 ARM: omap1: remove unused variable The cleanup of the debugfs functions left one variable behind that should now be removed as well: arch/arm/mach-omap1/clock.c:1008:6: error: unused variable 'err' [-Werror,-Wunused-variable] Fixes: d5ddd5a51726 ("arm: omap1: no need to check return value of debugfs_create functions") Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman arch/arm/mach-omap1/clock.c | 1 - 1 file changed, 1 deletion(-) commit 0780f3b6f054ec6497a1a16edb9bf5832c0b92f4 Author: Greg Kroah-Hartman Date: Thu Jun 13 17:52:29 2019 +0300 drm/i915: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: David Airlie Cc: Daniel Vetter Cc: intel-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190613145229.21389-1-jani.nikula@intel.com drivers/gpu/drm/i915/i915_debugfs.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) commit ebc37af5e0a134355ea2b62ed4141458bdbd5389 Author: Andy Shevchenko Date: Sat Jun 15 20:41:35 2019 +0300 spi: No need to assign dummy value in spi_unregister_controller() The device_for_each_child() doesn't require the returned value to be checked. Thus, drop the dummy variable completely and have no warning anymore: drivers/spi/spi.c: In function ‘spi_unregister_controller’: drivers/spi/spi.c:2480:6: warning: variable ‘dummy’ set but not used [-Wunused-but-set-variable] int dummy; ^~~~~ Signed-off-by: Andy Shevchenko Signed-off-by: Mark Brown drivers/spi/spi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 36f34737ff48f66c8a19b8788311e4b40d4adf80 Author: Andy Shevchenko Date: Sat Jun 15 20:47:37 2019 +0300 spi: Add a prototype for exported spi_set_cs_timing() Compiler is not happy about spi_set_cs_timing() prototype. drivers/spi/spi.c:3016:6: warning: no previous prototype for ‘spi_set_cs_timing’ [-Wmissing-prototypes] void spi_set_cs_timing(struct spi_device *spi, u8 setup, u8 hold, ^~~~~~~~~~~~~~~~~ Let's add it to the header. Signed-off-by: Andy Shevchenko Signed-off-by: Mark Brown include/linux/spi/spi.h | 2 ++ 1 file changed, 2 insertions(+) commit 5b8cc7d17f56257056ed65624dec28dcdf14e87e Author: Zhu Yingjiang Date: Wed Jun 12 12:23:47 2019 -0500 ASoC: SOF: Intel: hda: make sure RUN bit setting to 0 during clear stream status Before clearing stream statuses, ensure RUN bit update has taken effect by reading the value back. Signed-off-by: Zhu Yingjiang Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/sof/intel/hda-stream.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 7bcaf0f2cdfacca2226eee8895f64bc019d5a8be Author: Zhu Yingjiang Date: Wed Jun 12 12:23:46 2019 -0500 ASoC: SOF: Intel: hda: make sure DMA is start/stop by read the RUN bit As per the HW recommendation, after setting the RUN bit (start as 1, stop as 0), software must read the bit back to make sure the bit is set right, before modifying related control registers/re-starting the DMA engine. Signed-off-by: Zhu Yingjiang Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/sof/intel/hda-stream.c | 22 ++++++++++++++++++++++ sound/soc/sof/intel/hda.h | 6 ++++++ 2 files changed, 28 insertions(+) commit 3a39e0eae80919a15831f66324d4530454b4f495 Author: Ranjani Sridharan Date: Wed Jun 12 12:23:45 2019 -0500 ASoC: SOF: Intel: hda: clear stream status and wakests properly Stream status and WAKESTS registers need to be cleared by writing to them with snd_sof_dsp_write(). snd_sof_dsp_update_bits() only writes if the value is changed and will result in not clearing the status. Signed-off-by: Ranjani Sridharan Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/sof/intel/hda-ctrl.c | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) commit 9a50ee58b8b11300788d41cd1c0f370833424823 Author: Zhu Yingjiang Date: Wed Jun 12 12:23:44 2019 -0500 ASoC: SOF: Intel: hda: use the defined stop chip in suspend Unify suspend code by using SOF common function hda_dsp_ctrl_stop_chip() which can handle both HDA and non-HDA cases. Signed-off-by: Zhu Yingjiang Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/sof/intel/hda-dsp.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit 13063a2ccf79d232889491105a7bd9d552e417fc Author: Zhu Yingjiang Date: Wed Jun 12 12:23:43 2019 -0500 ASoC: SOF: Intel: hda: add function for hda stop chip Add common hda_dsp_ctrl_stop_chip() function to stop controller with the same function handling both HDA and non-HDA cases. This function disables IRQs and clears status masks. When CONFIG_SND_SOC_SOF_HDA is defined, also disables the CORB/RIRB, and stops i/o. Signed-off-by: Zhu Yingjiang Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/sof/intel/hda-ctrl.c | 67 ++++++++++++++++++++++++++++++++++++++++++ sound/soc/sof/intel/hda.h | 2 +- 2 files changed, 68 insertions(+), 1 deletion(-) commit 24b6ff686fce808346c129bce52836c3339733bf Author: Zhu Yingjiang Date: Wed Jun 12 12:23:42 2019 -0500 ASoC: SOF: Intel: hda: use the SOF defined ppcap functions Unify ppcap function setup by using SOF common functions for both HDA and non-HDA cases. Signed-off-by: Zhu Yingjiang Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/sof/intel/hda-dsp.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit 7fd572e7d317fa51049d623badb8b2874bfd0119 Author: Keyon Jie Date: Wed Jun 12 12:23:41 2019 -0500 ASoC: SOF: Intel: hda-stream: fix a deadlock with bus->reg_lock We should use irq disabled mode when read/write hda registers from thread context, as we need to hold the same bus->reg_lock in interrupt context hda_dsp_stream_interrupt(), otherwise, when we are holding the lock in hda_dsp_stream_hw_free() and the interrupt arrives, we will get deadlock in the interrupt handler. Error logs like this: [ 5.603606] CPU0 [ 5.603606] ---- [ 5.603607] lock(&(&bus->reg_lock)->rlock); [ 5.603608] [ 5.603609] lock(&(&bus->reg_lock)->rlock); [ 5.603610] *** DEADLOCK *** [ 5.603611] 2 locks held by pulseaudio/2329: [ 5.603612] #0: 000000005fcf26c6 (&card->mutex/1){+.+.}, at: dpcm_fe_dai_hw_free+0x2b/0x110 [snd_soc_core] [ 5.603619] #1: 00000000ef369faf (&rtd->pcm_mutex){+.+.}, at: soc_pcm_hw_free+0x2e/0x1c0 [snd_soc_core] The fix is simple, let's switch to use spin_lock/unlock_irq(). Reported-by: Xun Zhang Signed-off-by: Keyon Jie Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/sof/intel/hda-stream.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6297a0dc4c14a62bea5a9137ceef280cb7a80665 Author: Ranjani Sridharan Date: Wed Jun 12 12:23:40 2019 -0500 ASoC: SOF: Intel: hda: modify stream interrupt handler Modify the stream interrupt handler to always wake up the IRQ thread if the status register is valid. The IRQ thread performs the check for stream interrupts and RIRB interrupts in a loop to handle the case of missed interrupts when an unsolicited response from the codec is received just before the stream interrupt handler is completed. Signed-off-by: Kai Vehmanen Signed-off-by: Ranjani Sridharan Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/sof/intel/hda-stream.c | 79 ++++++++++++++++++++++++++-------------- 1 file changed, 51 insertions(+), 28 deletions(-) commit 93146bc22f6131abf5161030f259e4b911d859eb Author: Ranjani Sridharan Date: Wed Jun 12 12:23:39 2019 -0500 ASoC: SOF: Intel: hda: couple host and link DMA during FE hw_free Host and link DMA are decoupled during FE hw_params. So, they must be coupled in hw_free if the link DMA channel is idle. Signed-off-by: Ranjani Sridharan Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/sof/intel/apl.c | 1 + sound/soc/sof/intel/cnl.c | 1 + sound/soc/sof/intel/hda-stream.c | 20 ++++++++++++++++++++ sound/soc/sof/intel/hda.h | 2 ++ sound/soc/sof/ops.h | 11 +++++++++++ sound/soc/sof/pcm.c | 7 +++++++ sound/soc/sof/sof-priv.h | 4 ++++ 7 files changed, 46 insertions(+) commit 7077a07a72d38a78040873bbc13a77d1e45f8aa0 Author: Ranjani Sridharan Date: Wed Jun 12 12:23:38 2019 -0500 ASoC: SOF: Intel: hda: release link DMA for paused streams during suspend Paused streams do not get suspended when the system enters S3. So, clear and release link DMA channel for such streams in the hda_dsp_set_hw_params_upon_resume() callback. Also, invalidate the link DMA channel in the DAI config before restoring the dai config upon resume. Also, modify the signature for the set_hw_params_upon_resume() op to return an int. Signed-off-by: Ranjani Sridharan Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/sof/intel/hda-dsp.c | 29 ++++++++++++++++++++++++++++- sound/soc/sof/intel/hda.h | 2 +- sound/soc/sof/ops.h | 5 +++-- sound/soc/sof/pm.c | 24 ++++++++++++++++++++---- sound/soc/sof/sof-priv.h | 2 +- 5 files changed, 53 insertions(+), 9 deletions(-) commit 6b2239e3337b4c46b850078a6fc8f1a70ebe1c1f Author: Ranjani Sridharan Date: Wed Jun 12 12:23:37 2019 -0500 ASoC: SOF: Intel: hda: reserve host DMA channel for hostless streams Due to the HW programming sequence requirement that the host and link DMA channels need to be coupled/decoupled during pcm hw_params, the host DMA channel corresponding to the link DMA channel in use for hostless streams needs to be reserved. This is achieved by adding a host_reserved flag in the sof_intel_hda_stream structure which is checked when assigning a host DMA channel. Signed-off-by: Ranjani Sridharan Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/sof/intel/hda-dai.c | 11 ++++++++++- sound/soc/sof/intel/hda-stream.c | 10 +++++++++- sound/soc/sof/intel/hda.h | 1 + 3 files changed, 20 insertions(+), 2 deletions(-) commit bdf4ad3fd01f5dc53c5d6d3b17afc98cd76d8988 Author: Ranjani Sridharan Date: Wed Jun 12 12:23:36 2019 -0500 ASoC: SOF: Intel: hda: assign link DMA channel at run-time The recommended HDA HW programming sequence for setting the DMA format requires that the link DMA and host DMA channels be coupled before setting the format. This change means that host DMA or link DMA channels be reserved even if only one is used. Statically assigned link DMA channels would mean that all the corresponding host DMA channels will need to be reserved, leaving only a few channels available at run-time. So, the suggestion here is to switch to dynamically assigning both host DMA channels and link DMA channels are run-time. The host DMA channel is assigned when the pcm is opened as before. While choosing the link DMA channel, if the host DMA channel corresponding to the link DMA channel is already taken, the proposed method checks to make sure that the BE is connected to the FE that has been assigned this host DMA channel. Once the link DMA channel is assigned, an IPC is sent to the DSP to set the link DMA channel. The link DMA channel is freed during hw_free() and also in the SUSPEND trigger callback. It will be re-assigned when hw_params are set upon resume. Signed-off-by: Ranjani Sridharan Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/sof/intel/hda-dai.c | 284 +++++++++++++++++++++++++++--------------- sound/soc/sof/sof-priv.h | 2 + sound/soc/sof/topology.c | 51 +------- 3 files changed, 189 insertions(+), 148 deletions(-) commit 1b7e1956860d7566325502651c6bf14f115cd91d Author: Ranjani Sridharan Date: Wed Jun 12 12:23:35 2019 -0500 ASoC: SOF: topology: add cpu_dai_name for DAIs Add the cpu_dai_name member to snd_sof_dai and save the cpu_dai_name while setting the DAI config. The internal SOF representation will have to change at a later point as well when we have multiple CPU dais. Signed-off-by: Ranjani Sridharan Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/sof/sof-priv.h | 1 + sound/soc/sof/topology.c | 5 +++++ 2 files changed, 6 insertions(+) commit f5dbba9fee801f4678a50d92c785f7f24d4ee2c6 Author: Ranjani Sridharan Date: Wed Jun 12 12:23:34 2019 -0500 ASoC: SOF: Intel: hda: add new macro hstream_to_sof_hda_stream() Add a new macro to get sof_intel_hda_stream from hdac_ext_stream. Signed-off-by: Ranjani Sridharan Signed-off-by: Mark Brown sound/soc/sof/intel/hda.h | 3 +++ 1 file changed, 3 insertions(+) commit 7623ae793c28cc0928c5d1292542dbb92fc2e9e2 Author: Ranjani Sridharan Date: Wed Jun 12 12:23:33 2019 -0500 ASoC: SOF: Intel: hda: save handle to sdev in sof_intel_hda_stream Add a snd_sof_dev member to sof_intel_hda_stream. This will be used to access the snd_sof_dev during link hw_params callback. Signed-off-by: Ranjani Sridharan Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/sof/intel/hda-stream.c | 4 ++++ sound/soc/sof/intel/hda.h | 1 + 2 files changed, 5 insertions(+) commit 23c46801d14cb647afefc9ec9a7f785777251e76 Author: Simon Horman Date: Mon Jun 17 11:06:03 2019 +0200 dt-bindings: usb: renesas_gen3: Rename bindings documentation file For consistency with the naming of (most) other documentation files for DT bindings for Renesas IP blocks rename the Renesas USB3.0 peripheral documentation file from renesas-gen3.txt to renesas,gen3.txt. Signed-off-by: Simon Horman Signed-off-by: Felipe Balbi .../devicetree/bindings/usb/{renesas_usb3.txt => renesas,usb3.txt} | 0 1 file changed, 0 insertions(+), 0 deletions(-) commit 59d7d4c5178d18b58414194271ad85e30ecaff92 Author: Simon Horman Date: Mon Jun 17 11:06:02 2019 +0200 dt-bindings: usb: renesas_usbhs: Rename bindings documentation file For consistency with the naming of (most) other documentation files for DT bindings for Renesas IP blocks rename the Renesas USBHS documentation file from renesas-usbhs.txt to renesas,usbhs.txt. Signed-off-by: Simon Horman Signed-off-by: Felipe Balbi .../devicetree/bindings/usb/{renesas_usbhs.txt => renesas,usbhs.txt} | 0 1 file changed, 0 insertions(+), 0 deletions(-) commit 83ee240aad9147ed5dac5a7c7b4c559d134072e7 Author: Arnd Bergmann Date: Mon Jun 17 13:06:15 2019 +0200 ASoC: cx2072x: mark PM function as __maybe_unused While the suspend function is already marked __maybe_unused, the resume function is not, which leads to a warning when CONFIG_PM is disabled: sound/soc/codecs/cx2072x.c:1625:12: error: unused function 'cx2072x_runtime_resume' [-Werror,-Wunused-function] Mark this one like the other one. Fixes: a497a4363706 ("ASoC: Add support for Conexant CX2072X CODEC") Signed-off-by: Arnd Bergmann Signed-off-by: Mark Brown sound/soc/codecs/cx2072x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 41d92e0c835bff7dec343bf41e79d24b326d94c1 Author: Arnd Bergmann Date: Mon Jun 17 13:03:51 2019 +0200 ASoC: rockchip: pdm: select CONFIG_RATIONAL Without this, we get a link error: sound/soc/rockchip/rockchip_pdm.o: In function `rockchip_pdm_hw_params': rockchip_pdm.c:(.text+0x754): undefined reference to `rational_best_approximation' Fixes: 624e8e00acaf ("ASoC: rockchip: pdm: fixup pdm fractional div") Signed-off-by: Arnd Bergmann Signed-off-by: Mark Brown sound/soc/rockchip/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 440c4983de262f78033ec58f6abcd199a664327d Author: Mattias Jacobsson <2pi@mok.nu> Date: Mon May 27 18:21:30 2019 +0200 platform/x86: wmi: add context argument to the probe function The struct wmi_device_id has a context pointer field, forward this pointer as an argument to the probe function in struct wmi_driver. Update existing users of the same probe function to accept this new context argument. Signed-off-by: Mattias Jacobsson <2pi@mok.nu> Signed-off-by: Andy Shevchenko drivers/platform/x86/dell-smbios-wmi.c | 2 +- drivers/platform/x86/dell-wmi-descriptor.c | 3 ++- drivers/platform/x86/dell-wmi.c | 2 +- drivers/platform/x86/huawei-wmi.c | 2 +- drivers/platform/x86/intel-wmi-thunderbolt.c | 3 ++- drivers/platform/x86/wmi-bmof.c | 2 +- drivers/platform/x86/wmi.c | 3 ++- include/linux/wmi.h | 2 +- 8 files changed, 11 insertions(+), 8 deletions(-) commit a48e23385fcf397e69e2a75d72a81c545ec8bec2 Author: Mattias Jacobsson <2pi@mok.nu> Date: Mon May 27 18:21:29 2019 +0200 platform/x86: wmi: add context pointer field to struct wmi_device_id When using wmi_install_notify_handler() to initialize a WMI handler a data pointer can be supplied which will be passed on to the notification handler. No similar feature exist when handling WMI events via struct wmi_driver. Add a context field pointer to struct wmi_device_id and add a function find_guid_context() to retrieve that context pointer. Signed-off-by: Mattias Jacobsson <2pi@mok.nu> Signed-off-by: Andy Shevchenko drivers/platform/x86/wmi.c | 22 ++++++++++++++++++++++ include/linux/mod_devicetable.h | 1 + 2 files changed, 23 insertions(+) commit 3e58167ac3703c9b15a8600ab559d239f3d4dd97 Author: Yurii Pavlovskyi Date: Tue May 14 21:07:46 2019 +0200 platform/x86: asus-wmi: Do not disable keyboard backlight on unloading The keyboard backlight is automatically disabled when the module is unloaded as it is exposed as a ledclass device. Change this behavior to ignore setting brightness when the device is in unloading state. Signed-off-by: Yurii Pavlovskyi Signed-off-by: Andy Shevchenko drivers/platform/x86/asus-wmi.c | 4 ++++ 1 file changed, 4 insertions(+) commit b096f626a6827ad2ced5ebdbdc04e62422d463f6 Author: Yurii Pavlovskyi Date: Tue May 14 21:07:05 2019 +0200 platform/x86: asus-wmi: Switch fan boost mode The WMI exposes a write-only device ID where up to three fan modes can be switched on some laptops (TUF Gaming FX505GM). There is a hotkey combination Fn-F5 that does have a fan icon, which is designed to toggle between fan modes. The DSTS of the device ID returns information about the presence of this capability and the presence of each of the two additional fan modes as a bitmask (0x01 - overboost present, 0x02 - silent present) [1]. Add a SysFS entry that reads the last written value and updates value in WMI on write and a hotkey handler that toggles the modes taking into account their availability according to DSTS. Modes: * 0x00 - normal or balanced, * 0x01 - overboost, increased fan RPM, * 0x02 - silent, decreased fan RPM [1] Link: https://lkml.org/lkml/2019/4/12/110 Signed-off-by: Yurii Pavlovskyi Suggested-by: Daniel Drake Signed-off-by: Andy Shevchenko Documentation/ABI/testing/sysfs-platform-asus-wmi | 10 ++ drivers/platform/x86/asus-wmi.c | 151 ++++++++++++++++++++-- include/linux/platform_data/x86/asus-wmi.h | 1 + 3 files changed, 154 insertions(+), 8 deletions(-) commit 4fd1982545398bf801fe13455e02bc01b6402de6 Author: Yurii Pavlovskyi Date: Tue May 14 21:05:46 2019 +0200 platform/x86: asus-wmi: Enhance detection of thermal data The obviously wrong value 1 for temperature device ID in this driver is returned by at least some devices, including TUF Gaming series laptops, instead of 0 as expected previously. Observable effect is that a temp1_input in hwmon reads temperature near absolute zero. Consider 0.1 K an erroneous value in addition to 0 K. Signed-off-by: Yurii Pavlovskyi Signed-off-by: Andy Shevchenko drivers/platform/x86/asus-wmi.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 54a3121f00dad3227735085fd568cdee5a733696 Author: Yurii Pavlovskyi Date: Tue May 14 21:04:48 2019 +0200 platform/x86: asus-wmi: Organize code into sections The driver has grown pretty big and will grow more, which makes it hard to navigate and understand. Add uniform comments to the code and ensure that it is sorted into logical sections. Signed-off-by: Yurii Pavlovskyi Signed-off-by: Andy Shevchenko drivers/platform/x86/asus-wmi.c | 89 ++++++++++++++++++++++------------------- 1 file changed, 47 insertions(+), 42 deletions(-) commit 1827f3f06aafe67c1d273025a26390d9d2bdd3f7 Author: Yurii Pavlovskyi Date: Tue May 14 21:03:50 2019 +0200 platform/x86: asus-wmi: Refactor error handling Remove exit label as it is only used once from the point in code where no cleanup is required and return can be called immediately. Signed-off-by: Yurii Pavlovskyi Signed-off-by: Andy Shevchenko drivers/platform/x86/asus-wmi.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 2b5767bf86ea261ed98dda96c91e3eee052887b8 Author: Yurii Pavlovskyi Date: Tue May 14 21:02:58 2019 +0200 platform/x86: asus-nb-wmi: Add microphone mute key code The microphone mute key is missing from sparse keymap. It is present on FX505GM and possibly other laptops. Add the missing code. Also, comment on the fan mode switch key, which has the same code as the already used key. Signed-off-by: Yurii Pavlovskyi Signed-off-by: Andy Shevchenko drivers/platform/x86/asus-nb-wmi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1a373d15e283937b51eaf5debf4fc31474c31436 Author: Yurii Pavlovskyi Date: Tue May 14 21:02:09 2019 +0200 platform/x86: asus-wmi: Support WMI event queue Event codes are expected to be retrieved from a queue on at least some models. Specifically, very likely the ACPI WMI devices with _UID ATK are queued whereas those with ASUSWMI are not [1]. The WMI event codes are pushed into a circular buffer queue. After the INIT method is called, ACPI code is allowed to push events into this buffer. The INIT method cannot be reverted. If the module is unloaded and an event (such as hotkey press) gets emitted before inserting it back the events get processed delayed by one or if the queue overflows, additionally delayed by about 3 seconds. It might be considered a minor issue and no normal user would likely observe this (there is little reason unloading the driver), but it does significantly frustrate a developer who is unlucky enough to encounter this. Therefore, the fallback to unqueued behavior occurs whenever something unexpected happens. The fix flushes the old key codes out of the queue on load. After receiving event the queue is read until either ..FFFF or 1 is encountered. Also as noted in [1] it is checked whether notify code is equal to 0xFF before enabling queue processing in WMI notify handler. DSDT examples: FX505GM Device (ATKD) { .. Name (ATKQ, Package (0x10) { 0xFFFFFFFF, .. } Method (IANQ, 1, Serialized) { If ((AQNO >= 0x10)) { Local0 = 0x64 While ((Local0 && (AQNO >= 0x10))) { Local0-- Sleep (0x0A) } ... .. AQTI++ AQTI &= 0x0F ATKQ [AQTI] = Arg0 ... } Method (GANQ, 0, Serialized) { .. If (AQNO) { ... Local0 = DerefOf (ATKQ [AQHI]) AQHI++ AQHI &= 0x0F Return (Local0) } Return (One) } This code is almost identical to K54C, which does return Ones on empty queue. K54C: Method (GANQ, 0, Serialized) { If (AQNO) { ... Return (Local0) } Return (Ones) } [1] Link: https://lkml.org/lkml/2019/4/12/104 Signed-off-by: Yurii Pavlovskyi Suggested-by: Daniel Drake Signed-off-by: Andy Shevchenko drivers/platform/x86/asus-wmi.c | 73 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 68 insertions(+), 5 deletions(-) commit 8abd752bd4733ed2e812fc37413ef80e13946c34 Author: Yurii Pavlovskyi Date: Tue May 14 21:01:24 2019 +0200 platform/x86: asus-wmi: Refactor WMI event handling Refactor WMI event handling into separate functions for getting the event code and handling the retrieved event code as a preparation for introduction of WMI event queue support. Signed-off-by: Yurii Pavlovskyi Signed-off-by: Andy Shevchenko drivers/platform/x86/asus-wmi.c | 66 ++++++++++++++++++++++++++--------------- 1 file changed, 42 insertions(+), 24 deletions(-) commit e0668f28888184f6c633110a37386f2d4a6fa00e Author: Yurii Pavlovskyi Date: Tue May 14 21:00:31 2019 +0200 platform/x86: asus-wmi: Improve DSTS WMI method ID detection The DSTS method detection mistakenly selects DCTS instead of DSTS if nothing is returned when the method ID is not defined in WMNB. As a result, the control of keyboard backlight is not functional for TUF Gaming series laptops. Implement detection based on _UID of the WMI device instead. There is evidence that DCTS is handled by ACPI WMI devices that have _UID ASUSWMI, whereas none of the devices without ASUSWMI respond to DCTS and DSTS is used instead [1]. DSDT examples: FX505GM (_UID ATK): Method (WMNB, 3, Serialized) { ... If ((Local0 == 0x53545344)) { ... Return (Zero) } ... // No return } K54C (_UID ATK): Method (WMNB, 3, Serialized) { ... If ((Local0 == 0x53545344)) { ... Return (0x02) } ... Return (0xFFFFFFFE) } [1] Link: https://lkml.org/lkml/2019/4/11/322 Signed-off-by: Yurii Pavlovskyi Suggested-by: Daniel Drake Signed-off-by: Andy Shevchenko drivers/hid/hid-asus.c | 2 +- drivers/platform/x86/asus-wmi.c | 23 ++++++++++++++++++++--- include/linux/platform_data/x86/asus-wmi.h | 4 ++-- 3 files changed, 23 insertions(+), 6 deletions(-) commit e7488e58c7cfe4be0c52db68622a0397bb75258e Author: Yurii Pavlovskyi Date: Tue May 14 20:59:01 2019 +0200 platform/x86: wmi: Add function to get _UID of WMI device Add a new function to acpi.h / wmi.c that returns _UID of the ACPI WMI device. For example, it returns "ATK" for the following declaration in DSDT: Device (ATKD) { Name (_HID, "PNP0C14" /* Windows Management Instrumentation Device */) // _HID: Hardware ID Name (_UID, "ATK") // _UID: Unique ID .. Generally, it is possible that multiple PNP0C14 ACPI devices are present in the system as mentioned in the commit message of commit bff431e49ff5 ("ACPI: WMI: Add ACPI-WMI mapping driver"). Therefore the _UID is returned for a specific ACPI device that declares the given GUID, to which it is also mapped by other methods of wmi module. Signed-off-by: Yurii Pavlovskyi Signed-off-by: Andy Shevchenko drivers/platform/x86/wmi.c | 19 +++++++++++++++++++ include/linux/acpi.h | 1 + 2 files changed, 20 insertions(+) commit 98e865a522983f2afde075648ec9d15ea4bb9194 Author: Yurii Pavlovskyi Date: Tue May 14 20:54:50 2019 +0200 platform/x86: asus-wmi: Increase input buffer size of WMI methods The asus-nb-wmi driver is matched by WMI alias but fails to load on TUF Gaming series laptops producing multiple ACPI errors in the kernel log. The input buffer for WMI method invocation size is 2 dwords, whereas 3 are expected by this model. FX505GM: .. Method (WMNB, 3, Serialized) { P8XH (Zero, 0x11) CreateDWordField (Arg2, Zero, IIA0) CreateDWordField (Arg2, 0x04, IIA1) CreateDWordField (Arg2, 0x08, IIA2) Local0 = (Arg1 & 0xFFFFFFFF) ... Compare with older K54C: ... Method (WMNB, 3, NotSerialized) { CreateDWordField (Arg2, 0x00, IIA0) CreateDWordField (Arg2, 0x04, IIA1) Local0 = (Arg1 & 0xFFFFFFFF) ... Increase buffer size to 3 dwords. No negative consequences of this change are expected, as the input buffer size is not verified. The original function is replaced by a wrapper for a new method passing value 0 for the last parameter. The new function will be used to control RGB keyboard backlight. Signed-off-by: Yurii Pavlovskyi Reviewed-by: Daniel Drake Signed-off-by: Andy Shevchenko drivers/platform/x86/asus-wmi.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 8853a2f6498b244d0cfff5c11158e2f76e323975 Author: Yurii Pavlovskyi Date: Tue May 14 20:51:25 2019 +0200 platform/x86: asus-wmi: Fix preserving keyboard backlight intensity on load The error code and return value are mixed up. The intensity is always set to 0 on load as kbd_led_read returns either 0 or negative value. To reproduce set backlight to maximum, reload driver and try to increase it using keyboard hotkey, the intensity will drop as a result. Correct the implementation. Signed-off-by: Yurii Pavlovskyi Reviewed-by: Daniel Drake Signed-off-by: Andy Shevchenko drivers/platform/x86/asus-wmi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit cd10ee006ab504b2b9c5ed992cc06d3e110c6311 Author: Yurii Pavlovskyi Date: Tue May 14 20:50:30 2019 +0200 platform/x86: asus-wmi: Fix hwmon device cleanup The driver does not clean up the hwmon device on exit or error. To reproduce the bug, repeat rmmod, insmod to verify that device number /sys/devices/platform/asus-nb-wmi/hwmon/hwmon?? grows every time. Replace call for registering device with devm_* version that unregisters it automatically. Signed-off-by: Yurii Pavlovskyi Reviewed-by: Daniel Drake Signed-off-by: Andy Shevchenko drivers/platform/x86/asus-wmi.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 2a5753559ed30461f0aade19290009973a15ce5a Author: Greg Kroah-Hartman Date: Wed Jun 12 14:12:58 2019 +0200 platform/x86: intel_telemetry: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Rajneesh Bhardwaj Cc: "David E. Box" Cc: Darren Hart Cc: Andy Shevchenko Cc: platform-driver-x86@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_telemetry_debugfs.c | 78 ++++++-------------------- 1 file changed, 16 insertions(+), 62 deletions(-) commit 151675540a2f936280493f3d114c2a687ae1dc63 Author: Greg Kroah-Hartman Date: Wed Jun 12 14:12:57 2019 +0200 platform/x86: intel_pmc: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Rajneesh Bhardwaj Cc: Vishwanath Somayaji Cc: Darren Hart Cc: Andy Shevchenko Cc: platform-driver-x86@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_pmc_core.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) commit d42c06c44baf31d13ff22fb3d583952c4b7b0ecd Author: Greg Kroah-Hartman Date: Wed Jun 12 14:12:56 2019 +0200 platform/x86: pmc_atom: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Darren Hart Cc: Andy Shevchenko Cc: platform-driver-x86@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Andy Shevchenko drivers/platform/x86/pmc_atom.c | 43 ++++++++++------------------------------- 1 file changed, 10 insertions(+), 33 deletions(-) commit d30cdc9a8adb1d18a2eed47dceaa2998adf5f47d Author: Greg Kroah-Hartman Date: Wed Jun 12 14:12:55 2019 +0200 platform/x86: samsung-laptop: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Corentin Chary Cc: Darren Hart Cc: Andy Shevchenko Cc: platform-driver-x86@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Andy Shevchenko drivers/platform/x86/samsung-laptop.c | 89 +++++++++-------------------------- 1 file changed, 23 insertions(+), 66 deletions(-) commit 17f1bf38c8821ce851d95708a1f1e226d17ec2c5 Author: Greg Kroah-Hartman Date: Wed Jun 12 14:12:54 2019 +0200 platform/x86: ideapad-laptop: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Ike Panhc Cc: Darren Hart Cc: Andy Shevchenko Cc: platform-driver-x86@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Andy Shevchenko drivers/platform/x86/ideapad-laptop.c | 36 +++++++---------------------------- 1 file changed, 7 insertions(+), 29 deletions(-) commit 9ea18802d04c46eb22927d78ea89556c31e015f9 Author: Greg Kroah-Hartman Date: Wed Jun 12 14:12:53 2019 +0200 platform/x86: dell-laptop: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Matthew Garrett Cc: "Pali Rohár" Cc: Darren Hart Cc: Andy Shevchenko Cc: platform-driver-x86@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Reviewed-by: Pali Rohár Signed-off-by: Andy Shevchenko drivers/platform/x86/dell-laptop.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d2785d37ed6fdceb2d8d17058f09577dadf3e592 Author: Greg Kroah-Hartman Date: Wed Jun 12 14:12:52 2019 +0200 platform/x86: asus-wmi: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Corentin Chary Cc: Darren Hart Cc: Andy Shevchenko Cc: acpi4asus-user@lists.sourceforge.net Cc: platform-driver-x86@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Andy Shevchenko drivers/platform/x86/asus-wmi.c | 47 ++++++++++------------------------------- 1 file changed, 11 insertions(+), 36 deletions(-) commit 0b9dd93492eeaf7233b17c505c29cab10ef196b0 Author: Greg Kroah-Hartman Date: Wed Jun 12 14:12:51 2019 +0200 platform/x86: acer-wmi: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Also, because there is no need to save the file dentry, remove the variable that was saving it and just recursively delete the whole directory. Cc: "Lee, Chun-Yi" Cc: Darren Hart Cc: Andy Shevchenko Cc: platform-driver-x86@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Andy Shevchenko drivers/platform/x86/acer-wmi.c | 29 +++++------------------------ 1 file changed, 5 insertions(+), 24 deletions(-) commit 24cb4bc8f0c9ee346826f33e6dcbdbc533cc6ad8 Merge: b41e48a82bcf 45450f36e569 Author: Olof Johansson Date: Mon Jun 17 05:17:10 2019 -0700 Merge tag 'omap-for-v5.3/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/soc ti-sysc soc changes for v5.3 Just two changes to make few platform data functions static, and to call dev_info() if am437x is suspending to RTC-only mode. We want to see this in case of issues as it depends on the board wiring for things like DDR memory. * tag 'omap-for-v5.3/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: soc: ti: pm33xx: Add a print while entering RTC only mode with DDR in self-refresh ARM: OMAP2+: Make some variables static Signed-off-by: Olof Johansson commit b41e48a82bcf056cbb9f4194a5f21504d24f0139 Merge: b06c51debc6c 724cf0aecb0d Author: Olof Johansson Date: Mon Jun 17 05:16:02 2019 -0700 Merge tag 'arm-soc/for-5.3/soc-arm64' of https://github.com/Broadcom/stblinux into arm/soc This pull request contains Broadcom ARM64-based SoCs Kconfig.platform changes for 5.3, please pull the following: - Jim adds the ability for ARCH_BRCMSTB to use reset controllers - Doug adds the ability for ARCH_BRCMSTB to use the PINCTRL framework - Florian enables the use of the BCM7038 Level 1 interrupt controller for ARCH_BRCMSTB * tag 'arm-soc/for-5.3/soc-arm64' of https://github.com/Broadcom/stblinux: arm64: Enable PINCTRL for ARCH_BRCMSTB arm64: Enable ARCH_HAS_RESET_CONTROLLER for ARCH_BRCMSTB arm64: Enable BCM7038_L1_IRQ for ARCH_BRCMSTB Signed-off-by: Olof Johansson commit b06c51debc6c12f2859c5a626cb2ba043fa8001d Merge: 4ab3a3e7e8ba 885895a8eae6 Author: Olof Johansson Date: Mon Jun 17 05:15:22 2019 -0700 Merge tag 'arm-soc/for-5.3/soc' of https://github.com/Broadcom/stblinux into arm/soc This pull request contains Broadcom ARM-based SoC Kconfig/machine changes for 5.3, please pull the following: - Wen fixes a missing referenc count on the CPU device_node object throughout mach-bcm/ - Jim adds the ability for ARCH_BRCMSTB to use reset controllers - Doug adds the ability for ARCH_BRCMSTB to use the PINCTRL framework * tag 'arm-soc/for-5.3/soc' of https://github.com/Broadcom/stblinux: ARM: bcm: Enable PINCTRL for ARCH_BRCMSTB ARM: bcm: Enable ARCH_HAS_RESET_CONTROLLER for ARCH_BRCMSTB ARM: bcm: fix a leaked reference by adding missing of_node_put Signed-off-by: Olof Johansson commit 4ab3a3e7e8ba63739bd2b1f6a0372b9534449078 Merge: 449c1cd29777 c2af88f1a0cd Author: Olof Johansson Date: Mon Jun 17 05:14:24 2019 -0700 Merge tag 'v5.3-rockchip-soc32-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/soc Another missing of_node_put * tag 'v5.3-rockchip-soc32-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: ARM: rockchip: fix missing of_node_put calls in smp code Signed-off-by: Olof Johansson commit 449c1cd29777c5d6bf29647871bef6b93d60bb0b Merge: 6ad135992e66 153969fd952d Author: Olof Johansson Date: Mon Jun 17 05:11:53 2019 -0700 Merge tag 'versatile-v5.3-armsoc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator into arm/soc Versatile platform updates for the v5.3 kernel cycle: - Drop a slew of unused CLCD platform data - Fix OF reference counts * tag 'versatile-v5.3-armsoc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator: ARM: versatile: Drop CLCD platform data ARM: versatile: fix a leaked reference by addingmissing of_node_put Signed-off-by: Olof Johansson commit 6ad135992e661e205579b5eadfb4c099da138a01 Merge: 9e0babf2c06c ceb02dcf676f Author: Olof Johansson Date: Mon Jun 17 05:09:55 2019 -0700 Merge tag 'armsoc-drop-netx-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator into arm/soc This deletes the NetX 100/500 machine support. After discussing with the subarch maintainers and Hilscher, we concluded that the netx subarchitecture (Netx 100/500) is no longer maintained or tested, and noone will miss it if we delete it. So delete it. There is a newer Netx 4000 architecture which we may see included at some point, but this will be supported using the standard multiplatform and devicetree mechanisms and is easier to develop from scratch. * tag 'armsoc-drop-netx-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator: ARM: delete netx machine Signed-off-by: Olof Johansson commit df767c0a437c9094ca2d79d37c1c5cf559039f53 Merge: c3bd15a0786e ac778e62634e Author: Olof Johansson Date: Mon Jun 17 04:54:11 2019 -0700 Merge tag 'scmi-updates-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/drivers ARM SCMI updates/fixes for v5.3 1. Correction to ARM document ID referred in SCMI protocol binding 2. Fix to correct bitfield definitions for SENSOR_DESC attributes which otherwise will calculate sensor values on wrong scale 3. Adds the missing rate_discrete flag setting so that discrete clocks are handled correctly. Without this fix it assumes continuous range which is incorrect 4. Adds support to read and scale the sensor values based on the factor read from the firmware * tag 'scmi-updates-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: hwmon: scmi: Scale values to target desired HWMON units firmware: arm_scmi: fetch and store sensor scale firmware: arm_scmi: update rate_discrete in clock_describe_rates_get firmware: arm_scmi: fix bitfield definitions for SENSOR_DESC attributes dt-bindings: arm: fix the document ID for SCMI protocol documentation Signed-off-by: Olof Johansson commit c3bd15a0786ef7e32482a7dced21d79286b6f36c Merge: 426356392c2c 4e23be473e30 Author: Olof Johansson Date: Mon Jun 17 04:53:32 2019 -0700 Merge tag 'omap-for-v5.3/ti-sysc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/drivers ti-sysc interconnect target module driver changes for v5.3 This series of changes improves probing devices with ti-sysc to the point where we can now probe most devices without the custom dts property "ti,hwmods" and no legacy platform data :) We add support for platform data callbacks for idling and unidling the clockdomain the module belongs to. The rest of the series mostly adds handling for the various quirks needed by old legacy modules such as i2c and watchdog. Some quirk handling is still missing for few modules, but those will be added as they get tested. The related platform data and dts changes will be sent separately. * tag 'omap-for-v5.3/ti-sysc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: bus: ti-sysc: Add support for module specific reset quirks bus: ti-sysc: Detect uarts also on omap34xx bus: ti-sysc: Do rstctrl reset handling in two phases bus: ti-sysc: Add support for disabling module without legacy mode bus: ti-sysc: Set ENAWAKEUP if available bus: ti-sysc: Handle swsup idle mode quirks bus: ti-sysc: Handle clockactivity for enable and disable bus: ti-sysc: Enable interconnect target module autoidle bit on enable bus: ti-sysc: Allow QUIRK_LEGACY_IDLE even if legacy_mode is not set bus: ti-sysc: Make OCP reset work for sysstatus and sysconfig reset bits bus: ti-sysc: Support 16-bit writes too bus: ti-sysc: Add support for missing clockdomain handling ARM: dts: dra71x: Disable usb4_tm target module ARM: dts: dra71x: Disable rtc target module ARM: dts: dra76x: Disable usb4_tm target module ARM: dts: dra76x: Disable rtc target module ARM: dts: dra76x: Update MMC2_HS200_MANUAL1 iodelay values ARM: dts: am57xx-idk: Remove support for voltage switching for SD card bus: ti-sysc: Handle devices with no control registers ARM: dts: Configure osc clock for d_can on am335x Signed-off-by: Olof Johansson commit 426356392c2ce9c720852ec9181c66d9e57d7340 Merge: 92e074acf6f7 e3b7472362ba Author: Olof Johansson Date: Mon Jun 17 04:52:52 2019 -0700 Merge tag 'arm-soc/for-5.3/drivers' of https://github.com/Broadcom/stblinux into arm/drivers This pull request contains Broadcom ARM/ARM64/MIPS SoCs drivers changes for 5.3, please pull the following: - Markus provides a set of updates to the DPFE driver to support a new revision of the API to the firmware (version 3) and provides minor fixes about how the MR4-8 words are read for LPDDR4 devices - Florian removes a print of a virtual address in brcmstb_gisb.c * tag 'arm-soc/for-5.3/drivers' of https://github.com/Broadcom/stblinux: memory: brcmstb: dpfe: introduce DPFE API v3 memory: brcmstb: dpfe: prepare for API-dependent sysfs attributes memory: brcmstb: dpfe: prepare support for multiple API versions memory: brcmstb: dpfe: wait for DCPU to be ready memory: brcmstb: dpfe: report firmware loading error memory: brcmstb: dpfe: remove unused code and fix formatting bus: brcmstb_gisb: Remove print of base address memory: brcmstb: dpfe: use byte 3 of registers MR4-MR8 memory: brcmstb: dpfe: optimize generic_show() memory: brcmstb: dpfe: use msleep() over udelay() Signed-off-by: Olof Johansson commit 92e074acf6f7694e96204265eb18ac113f546e80 Author: Jean-Philippe Brucker Date: Mon Jun 10 18:38:29 2019 +0100 firmware/psci: psci_checker: Park kthreads before stopping them Since commit 85f1abe0019f ("kthread, sched/wait: Fix kthread_parkme() completion issue"), kthreads that are bound to a CPU must be parked before being stopped. At the moment the PSCI checker calls kthread_stop() directly on the suspend kthread, which triggers the following warning: [ 6.068288] WARNING: CPU: 1 PID: 1 at kernel/kthread.c:398 __kthread_bind_mask+0x20/0x78 ... [ 6.190151] Call trace: [ 6.192566] __kthread_bind_mask+0x20/0x78 [ 6.196615] kthread_unpark+0x74/0x80 [ 6.200235] kthread_stop+0x44/0x1d8 [ 6.203769] psci_checker+0x3bc/0x484 [ 6.207389] do_one_initcall+0x48/0x260 [ 6.211180] kernel_init_freeable+0x2c8/0x368 [ 6.215488] kernel_init+0x10/0x100 [ 6.218935] ret_from_fork+0x10/0x1c [ 6.222467] ---[ end trace e05e22863d043cd3 ]--- kthread_unpark() tries to bind the thread to its CPU and aborts with a WARN() if the thread wasn't in TASK_PARKED state. Park the kthreads before stopping them. Fixes: 85f1abe0019f ("kthread, sched/wait: Fix kthread_parkme() completion issue") Signed-off-by: Jean-Philippe Brucker Reviewed-by: Sudeep Holla Acked-by: Lorenzo Pieralisi Signed-off-by: Olof Johansson drivers/firmware/psci/psci_checker.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 5ec47cda74e98ad2f723f93b4a97ba87638338aa Author: Masahiro Yamada Date: Mon Jun 3 17:12:33 2019 +0900 memory: move jedec_ddr.h from include/memory to drivers/memory/ Now that jedec_ddr_data.c was moved from lib/ to drivers/memory/, is included only from drivers/memory/. Make it a local header of drivers/memory/. The directory include/memory is now gone. While I am here, I also changed #include to . Because CONFIG_DDR is bool, jedec_ddr_data.c is never compiled as a module. Signed-off-by: Masahiro Yamada Signed-off-by: Olof Johansson drivers/memory/emif.c | 3 ++- {include => drivers}/memory/jedec_ddr.h | 6 +++--- drivers/memory/jedec_ddr_data.c | 5 +++-- drivers/memory/of_memory.c | 3 ++- 4 files changed, 10 insertions(+), 7 deletions(-) commit 7b43b8fdc9a6283c0b9405542c4406cfa1e5689a Author: Masahiro Yamada Date: Mon Jun 3 17:12:32 2019 +0900 memory: move jedec_ddr_data.c from lib/ to drivers/memory/ jedec_ddr_data.c exports 3 symbols, and all of them are only referenced from drivers/memory/{emif.c,of_memory.c} drivers/memory/ is a better location than lib/. I removed the Kconfig prompt "JEDEC DDR data" because it is only select'ed by TI_EMIF, and there is no other user. There is no good reason in making it a user-configurable CONFIG option. Signed-off-by: Masahiro Yamada Signed-off-by: Olof Johansson drivers/memory/Kconfig | 8 ++++++++ drivers/memory/Makefile | 1 + {lib => drivers/memory}/jedec_ddr_data.c | 0 lib/Kconfig | 8 -------- lib/Makefile | 2 -- 5 files changed, 9 insertions(+), 10 deletions(-) commit c9727db7cc1da03ea4247010e47597c617ee2176 Merge: 112603739338 d7f3f7d84704 Author: Olof Johansson Date: Mon Jun 17 04:40:41 2019 -0700 Merge tag 'tee-maint-for-5.3' of https://git.linaro.org/people/jens.wiklander/linux-tee into arm/drivers Adding mailing list for TEE subsystem * tag 'tee-maint-for-5.3' of https://git.linaro.org/people/jens.wiklander/linux-tee: MAINTAINERS: Add mailing list for the TEE subsystem Signed-off-by: Olof Johansson commit 112603739338346eb2f34f3d3ab94b04731ab83d Merge: 9e0babf2c06c 5d1d046e2868 Author: Olof Johansson Date: Mon Jun 17 04:38:06 2019 -0700 Merge tag 'soc-fsl-next-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/leo/linux into arm/drivers NXP/FSL SoC driver updates for v5.3 DPAA2 Console driver - Add driver to export two char devices to dump logs for MC and AIOP DPAA2 DPIO driver - Add support for memory backed QBMan portals - Increase the timeout period to prevent false error - Add APIs to retrieve QBMan portal probing status DPAA Qman driver - Only make liodn fixup on powerpc SoCs with PAMU iommu * tag 'soc-fsl-next-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/leo/linux: soc: fsl: qbman_portals: add APIs to retrieve the probing status soc: fsl: qman: fixup liodns only on ppc targets soc: fsl: dpio: Add support for memory backed QBMan portals bus: mc-bus: Add support for mapping shareable portals soc: fsl: dpio: Increase timeout for QBMan Management Commands soc: fsl: add DPAA2 console support Documentation: DT: Add entry for DPAA2 console soc: fsl: guts: Add definition for LX2160A Signed-off-by: Olof Johansson commit 791463ba1ae90a7457ddcb07c6c5a1a64738e354 Author: Yangbo Lu Date: Fri Jun 14 16:29:54 2019 +0800 mmc: sdhci-of-esdhc: use 1/2 periperhal clock for ls1028a LS1028A used 1/2 periperhal clock as one reference clock. Signed-off-by: Yangbo Lu Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-of-esdhc.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 04509d77097914ae1bd351f4cec751d011844ca3 Author: Yangbo Lu Date: Fri Jun 14 16:29:53 2019 +0800 mmc: sdhci-of-esdhc: set the sd clock divisor value above 3 This patch is to set the sd clock divisor value above 3 in tuning mode Signed-off-by: Yinbo Zhu Signed-off-by: Yangbo Lu Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-of-esdhc.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 01aa26c672c0eb771de4aaa2a8ccf6055778887b Author: Eric Farman Date: Thu Jun 6 22:28:31 2019 +0200 s390/cio: Combine direct and indirect CCW paths With both the direct-addressed and indirect-addressed CCW paths simplified to this point, the amount of shared code between them is (hopefully) more easily visible. Move the processing of IDA-specific bits into the direct-addressed path, and add some useful commentary of what the individual pieces are doing. This allows us to remove the entire ccwchain_fetch_idal() routine and maintain a single function for any non-TIC CCW. Signed-off-by: Eric Farman Reviewed-by: Cornelia Huck Message-Id: <20190606202831.44135-10-farman@linux.ibm.com> Signed-off-by: Cornelia Huck drivers/s390/cio/vfio_ccw_cp.c | 115 ++++++++++++++--------------------------- 1 file changed, 39 insertions(+), 76 deletions(-) commit 5928d8929d8cc3ba89f0af57ddeecaa004aa2340 Author: Greg Kroah-Hartman Date: Wed Jun 12 10:25:31 2019 +0200 mmc: host: s3cmci: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Also, because there is no need to save the file dentries, remove them from the host-specific structure and just recursively delete the directory that the driver created, when shutting down. Cc: Ben Dooks Signed-off-by: Greg Kroah-Hartman Signed-off-by: Ulf Hansson drivers/mmc/host/s3cmci.c | 27 ++++++--------------------- drivers/mmc/host/s3cmci.h | 2 -- 2 files changed, 6 insertions(+), 23 deletions(-) commit fcac152782e302a553c6d197d5fb38224b50023e Author: Greg Kroah-Hartman Date: Wed Jun 12 10:25:30 2019 +0200 mmc: host: dw_mmc: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this Cc: Jaehoon Chung Signed-off-by: Greg Kroah-Hartman Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc.c | 36 +++++++----------------------------- 1 file changed, 7 insertions(+), 29 deletions(-) commit e8573b39a81b9933bb8b3fffcc7533b27d82231d Author: Eric Farman Date: Thu Jun 6 22:28:30 2019 +0200 vfio-ccw: Rearrange IDAL allocation in direct CCW This is purely deck furniture, to help understand the merge of the direct and indirect handlers. Signed-off-by: Eric Farman Reviewed-by: Cornelia Huck Message-Id: <20190606202831.44135-9-farman@linux.ibm.com> Signed-off-by: Cornelia Huck drivers/s390/cio/vfio_ccw_cp.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) commit 091eb12f62b06bcf7e7cf4e4ae55e1d5ab2c25e3 Author: Greg Kroah-Hartman Date: Wed Jun 12 10:25:29 2019 +0200 mmc: host: atmel-mci: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Nicolas Ferre Signed-off-by: Greg Kroah-Hartman Acked-by: Alexandre Belloni Acked-by: Ludovic Desroches Signed-off-by: Ulf Hansson drivers/mmc/host/atmel-mci.c | 38 +++++++------------------------------- 1 file changed, 7 insertions(+), 31 deletions(-) commit a04c50aaa916f8c5704ef8292928095ccb4469b6 Author: Greg Kroah-Hartman Date: Wed Jun 12 10:25:28 2019 +0200 mmc: core: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Signed-off-by: Greg Kroah-Hartman Signed-off-by: Ulf Hansson drivers/mmc/core/debugfs.c | 56 +++++++-------------------------------------- drivers/mmc/core/mmc_test.c | 10 +------- 2 files changed, 9 insertions(+), 57 deletions(-) commit e7eaf91b0aad276b164277dd6d20cdf3ee1c77e6 Author: Eric Farman Date: Thu Jun 6 22:28:29 2019 +0200 vfio-ccw: Remove pfn_array_table Now that both CCW codepaths build this nested array: ccwchain->pfn_array_table[1]->pfn_array[#idaws/#pages] We can collapse this into simply: ccwchain->pfn_array[#idaws/#pages] Let's do that, so that we don't have to continually navigate two nested arrays when the first array always has a count of one. Signed-off-by: Eric Farman Reviewed-by: Cornelia Huck Message-Id: <20190606202831.44135-8-farman@linux.ibm.com> Signed-off-by: Cornelia Huck drivers/s390/cio/vfio_ccw_cp.c | 118 ++++++++++++----------------------------- 1 file changed, 33 insertions(+), 85 deletions(-) commit 8aabf0edae4a6cc82042785079075aebf7cd5c79 Author: Eric Farman Date: Thu Jun 6 22:28:28 2019 +0200 vfio-ccw: Adjust the first IDAW outside of the nested loops Now that pfn_array_table[] is always an array of 1, it seems silly to check for the very first entry in an array in the middle of two nested loops, since we know it'll only ever happen once. Let's move this outside the loops to simplify things, even though the "k" variable is still necessary. Signed-off-by: Eric Farman Reviewed-by: Cornelia Huck Message-Id: <20190606202831.44135-7-farman@linux.ibm.com> Signed-off-by: Cornelia Huck drivers/s390/cio/vfio_ccw_cp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit cc06ee983cffc28fbd9c31908137f7b3c097f5a7 Author: Eric Farman Date: Thu Jun 6 22:28:27 2019 +0200 vfio-ccw: Rearrange pfn_array and pfn_array_table arrays While processing a channel program, we currently have two nested arrays that carry a slightly different structure. The direct CCW path creates this: ccwchain->pfn_array_table[1]->pfn_array[#pages] while an IDA CCW creates: ccwchain->pfn_array_table[#idaws]->pfn_array[1] The distinction appears to state that each pfn_array_table entry points to an array of contiguous pages, represented by a pfn_array, um, array. Since the direct-addressed scenario can ONLY represent contiguous pages, it makes the intermediate array necessary but difficult to recognize. Meanwhile, since an IDAL can contain non-contiguous pages and there is no logic in vfio-ccw to detect adjacent IDAWs, it is the second array that is necessary but appearing to be superfluous. I am not aware of any documentation that states the pfn_array[] needs to be of contiguous pages; it is just what the code does today. I don't see any reason for this either, let's just flip the IDA codepath around so that it generates: ch_pat->pfn_array_table[1]->pfn_array[#idaws] This will bring it in line with the direct-addressed codepath, so that we can understand the behavior of this memory regardless of what type of CCW is being processed. And it means the casual observer does not need to know/care whether the pfn_array[] represents contiguous pages or not. NB: The existing vfio-ccw code only supports 4K-block Format-2 IDAs, so that "#pages" == "#idaws" in this area. This means that we will have difficulty with this overlap in terminology if support for Format-1 or 2K-block Format-2 IDAs is ever added. I don't think that this patch changes our ability to make that distinction. Signed-off-by: Eric Farman Reviewed-by: Cornelia Huck Message-Id: <20190606202831.44135-6-farman@linux.ibm.com> Signed-off-by: Cornelia Huck drivers/s390/cio/vfio_ccw_cp.c | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) commit 99afcb05d973f7f74c0c4b8a8c5f6f87c8427aa3 Author: Eric Farman Date: Thu Jun 6 22:28:26 2019 +0200 s390/cio: Use generalized CCW handler in cp_init() It is now pretty apparent that ccwchain_handle_ccw() (nee ccwchain_handle_tic()) does everything that cp_init() wants to do. Let's remove that duplicated code from cp_init() and let ccwchain_handle_ccw() handle it itself. Signed-off-by: Eric Farman Reviewed-by: Cornelia Huck Message-Id: <20190606202831.44135-5-farman@linux.ibm.com> Signed-off-by: Cornelia Huck drivers/s390/cio/vfio_ccw_cp.c | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) commit 363fe5f7aee0c2001af4cc4d7dd028cfa2eee64a Author: Eric Farman Date: Thu Jun 6 22:28:25 2019 +0200 s390/cio: Generalize the TIC handler Refactor ccwchain_handle_tic() into a routine that handles a channel program address (which itself is a CCW pointer), rather than a CCW pointer that is only a TIC CCW. This will make it easier to reuse this code for other CCW commands. Signed-off-by: Eric Farman Reviewed-by: Cornelia Huck Message-Id: <20190606202831.44135-4-farman@linux.ibm.com> Signed-off-by: Cornelia Huck drivers/s390/cio/vfio_ccw_cp.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit e64bd68946bec40d9dfe6ea5d22733119908e6f3 Author: Eric Farman Date: Thu Jun 6 22:28:24 2019 +0200 s390/cio: Refactor the routine that handles TIC CCWs Extract the "does the target of this TIC already exist?" check from ccwchain_handle_tic(), so that it's easier to refactor that function into one that cp_init() is able to use. Signed-off-by: Eric Farman Reviewed-by: Cornelia Huck Message-Id: <20190606202831.44135-3-farman@linux.ibm.com> Signed-off-by: Cornelia Huck drivers/s390/cio/vfio_ccw_cp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 812271b91006e59407ea30ee72341d92b240f667 Author: Eric Farman Date: Thu Jun 6 22:28:23 2019 +0200 s390/cio: Squash cp_free() and cp_unpin_free() The routine cp_free() does nothing but call cp_unpin_free(), and while most places call cp_free() there is one caller of cp_unpin_free() used when the cp is guaranteed to have not been marked initialized. This seems like a dubious way to make a distinction, so let's combine these routines and make cp_free() do all the work. Signed-off-by: Eric Farman Reviewed-by: Cornelia Huck Message-Id: <20190606202831.44135-2-farman@linux.ibm.com> Signed-off-by: Cornelia Huck drivers/s390/cio/vfio_ccw_cp.c | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) commit 163367c952e7dc9ae7c286bf4a42d0cbe974d7f7 Merge: 1accbced1c32 20314ce30af1 Author: Ulf Hansson Date: Mon Jun 17 13:28:12 2019 +0200 Merge branch 'fixes' into next commit 7a28db0a251ebc932a37f53a74c76e067aaac542 Author: Ley Foon Tan Date: Wed Jun 12 14:42:00 2019 +0800 PCI: altera: Fix configuration type based on secondary number Stratix 10 PCIe controller does not support Type 1 to Type 0 conversion as previous version (V1) does so the PCIe controller configuration mechanism needs to send Type 0 config TLP if the target bus number matches with the secondary bus number. Implement a function to form a TLP header that depends on the PCIe controller version, so that the header can be formed according to specific host controller HW internals, fixing the type conversion issue. Signed-off-by: Ley Foon Tan [lorenzo.pieralisi@arm.com: commit log] Signed-off-by: Lorenzo Pieralisi drivers/pci/controller/pcie-altera.c | 41 ++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 14 deletions(-) commit c369b536f8e309691a8ac3f9264941867b4a7155 Author: Miquel Raynal Date: Mon Apr 1 15:12:39 2019 +0200 PCI: armada8k: Add PHYs support Bring PHY support for the Armada8k driver. The Armada8k IP only supports x1, x2 or x4 link widths. Iterate over the DT 'phys' entries and configure them one by one. Use phy_set_mode_ext() to make use of the submode parameter (initially introduced for Ethernet modes). For PCI configuration, let the submode be the width (1, 2, 4, etc) so that the PHY driver knows how many lanes are bundled. Do not error out in case of error for compatibility reasons. Signed-off-by: Miquel Raynal Signed-off-by: Lorenzo Pieralisi Reviewed-by: Thomas Petazzoni drivers/pci/controller/dwc/pcie-armada8k.c | 82 +++++++++++++++++++++++++++++- 1 file changed, 81 insertions(+), 1 deletion(-) commit 8f5c9037a55b22e847f636f9a39fa98fe67923d1 Author: Masayoshi Mizuma Date: Fri Jun 14 09:11:41 2019 -0400 arm64/mm: Correct the cache line size warning with non coherent device If the cache line size is greater than ARCH_DMA_MINALIGN (128), the warning shows and it's tainted as TAINT_CPU_OUT_OF_SPEC. However, it's not good because as discussed in the thread [1], the cpu cache line size will be problem only on non-coherent devices. Since the coherent flag is already introduced to struct device, show the warning only if the device is non-coherent device and ARCH_DMA_MINALIGN is smaller than the cpu cache size. [1] https://lore.kernel.org/linux-arm-kernel/20180514145703.celnlobzn3uh5tc2@localhost/ Signed-off-by: Masayoshi Mizuma Reviewed-by: Hidetoshi Seto Tested-by: Zhang Lei [catalin.marinas@arm.com: removed 'if' block for WARN_TAINT] Signed-off-by: Catalin Marinas arch/arm64/include/asm/cache.h | 7 +++++++ arch/arm64/kernel/cacheinfo.c | 4 +--- arch/arm64/mm/dma-mapping.c | 12 ++++++++---- 3 files changed, 16 insertions(+), 7 deletions(-) commit 2234a6d3a28a971182cc91d5679e444516421de0 Author: Peter Zijlstra Date: Wed Feb 27 11:09:56 2019 +0100 x86/percpu: Optimize raw_cpu_xchg() Since raw_cpu_xchg() doesn't need to be IRQ-safe, like this_cpu_xchg(), we can use a simple load-store instead of the cmpxchg loop. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar arch/x86/include/asm/percpu.h | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit 8dc2d993cf1aea578d947e34ea2d5c6ffd1644e4 Author: Peter Zijlstra Date: Wed Feb 27 10:27:58 2019 +0100 x86/percpu, sched/fair: Avoid local_clock() Nadav reported that code-gen changed because of the this_cpu_*() constraints, avoid this for select_idle_cpu() because that runs with preemption (and IRQs) disabled anyway. Reported-by: Nadav Amit Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar kernel/sched/fair.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 602447f95461469e20c81254c1c08be23a46fe53 Author: Peter Zijlstra Date: Wed Feb 27 09:53:46 2019 +0100 x86/percpu, x86/irq: Relax {set,get}_irq_regs() Nadav reported that since the this_cpu_*() ops got asm-volatile constraints on, code generation suffered for do_IRQ(), but since this is all with IRQs disabled we can use __this_cpu_*(). smp_x86_platform_ipi 234 222 -12,+0 smp_kvm_posted_intr_ipi 74 66 -8,+0 smp_kvm_posted_intr_wakeup_ipi 86 78 -8,+0 smp_apic_timer_interrupt 292 284 -8,+0 smp_kvm_posted_intr_nested_ipi 74 66 -8,+0 do_IRQ 195 187 -8,+0 Reported-by: Nadav Amit Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar arch/x86/include/asm/irq_regs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9ed7d75b2f09d836e71d597cd5879abb1a44e7a9 Author: Peter Zijlstra Date: Wed Feb 27 09:48:51 2019 +0100 x86/percpu: Relax smp_processor_id() Nadav reported that since this_cpu_read() became asm-volatile, many smp_processor_id() users generated worse code due to the extra constraints. However since smp_processor_id() is reading a stable value, we can use __this_cpu_read(). While this does reduce text size somewhat, this mostly results in code movement to .text.unlikely as a result of more/larger .cold. subfunctions. Less text on the hotpath is good for I$. $ ./compare.sh defconfig-build1 defconfig-build2 vmlinux.o setup_APIC_ibs 90 98 -12,+20 force_ibs_eilvt_setup 400 413 -57,+70 pci_serr_error 109 104 -54,+49 pci_serr_error 109 104 -54,+49 unknown_nmi_error 125 120 -76,+71 unknown_nmi_error 125 120 -76,+71 io_check_error 125 132 -97,+104 intel_thermal_interrupt 730 822 +92,+0 intel_init_thermal 951 945 -6,+0 generic_get_mtrr 301 294 -7,+0 generic_get_mtrr 301 294 -7,+0 generic_set_all 749 754 -44,+49 get_fixed_ranges 352 360 -41,+49 x86_acpi_suspend_lowlevel 369 363 -6,+0 check_tsc_sync_source 412 412 -71,+71 irq_migrate_all_off_this_cpu 662 674 -14,+26 clocksource_watchdog 748 748 -113,+113 __perf_event_account_interrupt 204 197 -7,+0 attempt_merge 1748 1741 -7,+0 intel_guc_send_ct 1424 1409 -15,+0 __fini_doorbell 235 231 -4,+0 bdw_set_cdclk 928 923 -5,+0 gen11_dsi_disable 1571 1556 -15,+0 gmbus_wait 493 488 -5,+0 md_make_request 376 369 -7,+0 __split_and_process_bio 543 536 -7,+0 delay_tsc 96 89 -7,+0 hsw_disable_pc8 696 691 -5,+0 tsc_verify_tsc_adjust 215 228 -22,+35 cpuidle_driver_unref 56 49 -7,+0 blk_account_io_completion 159 148 -11,+0 mtrr_wrmsr 95 99 -29,+33 __intel_wait_for_register_fw 401 419 +18,+0 cpuidle_driver_ref 43 36 -7,+0 cpuidle_get_driver 15 8 -7,+0 blk_account_io_done 535 528 -7,+0 irq_migrate_all_off_this_cpu 662 674 -14,+26 check_tsc_sync_source 412 412 -71,+71 irq_wait_for_poll 170 163 -7,+0 generic_end_io_acct 329 322 -7,+0 x86_acpi_suspend_lowlevel 369 363 -6,+0 nohz_balance_enter_idle 198 191 -7,+0 generic_start_io_acct 254 247 -7,+0 blk_account_io_start 341 334 -7,+0 perf_event_task_tick 682 675 -7,+0 intel_init_thermal 951 945 -6,+0 amd_e400_c1e_apic_setup 47 51 -28,+32 setup_APIC_eilvt 350 328 -22,+0 hsw_enable_pc8 1611 1605 -6,+0 total 12985947 12985892 -994,+939 Reported-by: Nadav Amit Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar arch/x86/include/asm/smp.h | 3 ++- include/linux/smp.h | 45 +++++++++++++++++++++++++++++++-------------- 2 files changed, 33 insertions(+), 15 deletions(-) commit 0b9ccc0a9b146b49e83bf1e32f70d2396a694bfb Author: Peter Zijlstra Date: Thu Dec 6 12:24:33 2018 +0100 x86/percpu: Differentiate this_cpu_{}() and __this_cpu_{}() Nadav Amit reported that commit: b59167ac7baf ("x86/percpu: Fix this_cpu_read()") added a bunch of constraints to all sorts of code; and while some of that was correct and desired, some of that seems superfluous. The thing is, the this_cpu_*() operations are defined IRQ-safe, this means the values are subject to change from IRQs, and thus must be reloaded. Also, the generic form: local_irq_save() __this_cpu_read() local_irq_restore() would not allow the re-use of previous values; if by nothing else, then the barrier()s implied by local_irq_*(). Which raises the point that percpu_from_op() and the others also need that volatile. OTOH __this_cpu_*() operations are not IRQ-safe and assume external preempt/IRQ disabling and could thus be allowed more room for optimization. This makes the this_cpu_*() vs __this_cpu_*() behaviour more consistent with other architectures. $ ./compare.sh defconfig-build defconfig-build1 vmlinux.o x86_pmu_cancel_txn 80 71 -9,+0 __text_poke 919 964 +45,+0 do_user_addr_fault 1082 1058 -24,+0 __do_page_fault 1194 1178 -16,+0 do_exit 2995 3027 -43,+75 process_one_work 1008 989 -67,+48 finish_task_switch 524 505 -19,+0 __schedule_bug 103 98 -59,+54 __schedule_bug 103 98 -59,+54 __sched_setscheduler 2015 2030 +15,+0 freeze_processes 203 230 +31,-4 rcu_gp_kthread_wake 106 99 -7,+0 rcu_core 1841 1834 -7,+0 call_timer_fn 298 286 -12,+0 can_stop_idle_tick 146 139 -31,+24 perf_pending_event 253 239 -14,+0 shmem_alloc_page 209 213 +4,+0 __alloc_pages_slowpath 3284 3269 -15,+0 umount_tree 671 694 +23,+0 advance_transaction 803 798 -5,+0 con_put_char 71 51 -20,+0 xhci_urb_enqueue 1302 1295 -7,+0 xhci_urb_enqueue 1302 1295 -7,+0 tcp_sacktag_write_queue 2130 2075 -55,+0 tcp_try_undo_loss 229 208 -21,+0 tcp_v4_inbound_md5_hash 438 411 -31,+4 tcp_v4_inbound_md5_hash 438 411 -31,+4 tcp_v6_inbound_md5_hash 469 411 -33,-25 tcp_v6_inbound_md5_hash 469 411 -33,-25 restricted_pointer 434 420 -14,+0 irq_exit 162 154 -8,+0 get_perf_callchain 638 624 -14,+0 rt_mutex_trylock 169 156 -13,+0 avc_has_extended_perms 1092 1089 -3,+0 avc_has_perm_noaudit 309 306 -3,+0 __perf_sw_event 138 122 -16,+0 perf_swevent_get_recursion_context 116 102 -14,+0 __local_bh_enable_ip 93 72 -21,+0 xfrm_input 4175 4161 -14,+0 avc_has_perm 446 443 -3,+0 vm_events_fold_cpu 57 56 -1,+0 vfree 68 61 -7,+0 freeze_processes 203 230 +31,-4 _local_bh_enable 44 30 -14,+0 ip_do_fragment 1982 1944 -38,+0 do_exit 2995 3027 -43,+75 __do_softirq 742 724 -18,+0 cpu_init 1510 1489 -21,+0 account_system_time 80 79 -1,+0 total 12985281 12984819 -742,+280 Reported-by: Nadav Amit Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20181206112433.GB13675@hirez.programming.kicks-ass.net Signed-off-by: Ingo Molnar arch/x86/include/asm/percpu.h | 224 +++++++++++++++++++++--------------------- 1 file changed, 112 insertions(+), 112 deletions(-) commit d0e1a507bdc761a14906f03399d933ea639a1756 Author: Jiri Olsa Date: Sun Jun 16 16:13:13 2019 +0200 perf/x86/intel: Disable check_msr for real HW Tom Vaden reported false failure of the check_msr() function, because some servers can do POST tracing and enable LBR tracing during bootup. Kan confirmed that check_msr patch was to fix a bug report in guest, so it's ok to disable it for real HW. Reported-by: Tom Vaden Signed-off-by: Jiri Olsa Signed-off-by: Peter Zijlstra (Intel) Acked-by: Tom Vaden Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Liang Kan Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20190616141313.GD2500@krava [ Readability edits. ] Signed-off-by: Ingo Molnar arch/x86/events/intel/core.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit b7c9b3927337b43b3c854064b9c17b84cb7ef0dc Author: Jiri Olsa Date: Fri May 24 15:21:52 2019 +0200 perf/x86/intel: Use ->is_visible callback for default group It's preffered to use group's ->is_visible callback, so we do not need to use condition attribute assignment. Suggested-by: Peter Zijlstra Signed-off-by: Jiri Olsa Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Greg Kroah-Hartman Cc: Linus Torvalds Cc: Namhyung Kim Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20190524132152.GB26617@krava Signed-off-by: Ingo Molnar arch/x86/events/intel/core.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit ee49532b38dd084650bf715eabe7e3828fb8d275 Author: Kan Liang Date: Tue Apr 30 17:53:48 2019 -0700 perf/x86/intel/uncore: Add IMC uncore support for Snow Ridge IMC uncore unit can only be accessed via MMIO on Snow Ridge. The MMIO space of IMC uncore is at the specified offsets from the MEM0_BAR. Add snr_uncore_get_mc_dev() to locate the PCI device with MMIO_BASE and MEM0_BAR register. Add new ops to access the IMC registers via MMIO. Add 3 new free running counters for clocks, read and write bandwidth. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: acme@kernel.org Cc: eranian@google.com Link: https://lkml.kernel.org/r/1556672028-119221-7-git-send-email-kan.liang@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/uncore.c | 3 +- arch/x86/events/intel/uncore.h | 2 + arch/x86/events/intel/uncore_snbep.c | 197 +++++++++++++++++++++++++++++++++++ 3 files changed, 201 insertions(+), 1 deletion(-) commit 07ce734dd8adc0f170d43c15a9b91b707a21b9d7 Author: Kan Liang Date: Tue Apr 30 17:53:47 2019 -0700 perf/x86/intel/uncore: Clean up client IMC The client IMC block is accessed by MMIO. Current code uses an informal way to access the block, which is not recommended. Clean up the code by using __iomem annotation and the accessor functions (read[lq]()). Move exit_box() and read_counter() to generic code, which can be shared with the server code later. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: acme@kernel.org Cc: eranian@google.com Link: https://lkml.kernel.org/r/1556672028-119221-6-git-send-email-kan.liang@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/uncore.c | 15 +++++++++++++++ arch/x86/events/intel/uncore.h | 6 +++++- arch/x86/events/intel/uncore_snb.c | 16 ++-------------- 3 files changed, 22 insertions(+), 15 deletions(-) commit 3da04b8a00dd6d39970b9e764b78c5dfb40ec013 Author: Kan Liang Date: Tue Apr 30 17:53:46 2019 -0700 perf/x86/intel/uncore: Support MMIO type uncore blocks A new MMIO type uncore box is introduced on Snow Ridge server. The counters of MMIO type uncore box can only be accessed by MMIO. Add a new uncore type, uncore_mmio_uncores, for MMIO type uncore blocks. Support MMIO type uncore blocks in CPU hot plug. The MMIO space has to be map/unmap for the first/last CPU. The context also need to be migrated if the bind CPU changes. Add mmio_init() to init and register PMUs for MMIO type uncore blocks. Add a helper to calculate the box_ctl address. The helpers which calculate ctl/ctr can be shared with PCI type uncore blocks. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: acme@kernel.org Cc: eranian@google.com Link: https://lkml.kernel.org/r/1556672028-119221-5-git-send-email-kan.liang@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/uncore.c | 51 ++++++++++++++++++++++++++++++++++++------ arch/x86/events/intel/uncore.h | 21 ++++++++++++----- 2 files changed, 60 insertions(+), 12 deletions(-) commit c8872d90e0a3651a096860d3241625ccfa1647e0 Author: Kan Liang Date: Tue Apr 30 17:53:45 2019 -0700 perf/x86/intel/uncore: Factor out box ref/unref functions For uncore box which can only be accessed by MSR, its reference box->refcnt is updated in CPU hot plug. The uncore boxes need to be initalized and exited accordingly for the first/last CPU of a socket. Starts from Snow Ridge server, a new type of uncore box is introduced, which can only be accessed by MMIO. The driver needs to map/unmap MMIO space for the first/last CPU of a socket. Extract the codes of box ref/unref and init/exit for reuse later. There is no functional change. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: acme@kernel.org Cc: eranian@google.com Link: https://lkml.kernel.org/r/1556672028-119221-4-git-send-email-kan.liang@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/uncore.c | 54 ++++++++++++++++++++++++++++-------------- 1 file changed, 36 insertions(+), 18 deletions(-) commit 210cc5f9db7a5c66b7ca6290b7d35cc7db7e9dbd Author: Kan Liang Date: Tue Apr 30 17:53:44 2019 -0700 perf/x86/intel/uncore: Add uncore support for Snow Ridge server The uncore subsystem on Snow Ridge is similar as previous SKX server. The uncore units on Snow Ridge include Ubox, Chabox, IIO, IRP, M2PCIE, PCU, M2M, PCIE3 and IMC. - The config register encoding and pci device IDs are changed. - For CHA, the umask_ext and filter_tid fields are changed. - For IIO, the ch_mask and fc_mask fields are changed. - For M2M, the mask_ext field is changed. - Add new PCIe3 unit for PCIe3 root port which provides the interface between PCIe devices, plugged into the PCIe port, and the components (in M2IOSF). - IMC can only be accessed via MMIO on Snow Ridge now. Current common code doesn't support it yet. IMC will be supported in following patches. - There are 9 free running counters for IIO CLOCKS and bandwidth In. - Full uncore event list is not published yet. Event constrain is not included in this patch. It will be added later separately. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: acme@kernel.org Cc: eranian@google.com Link: https://lkml.kernel.org/r/1556672028-119221-3-git-send-email-kan.liang@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/uncore.c | 6 + arch/x86/events/intel/uncore.h | 2 + arch/x86/events/intel/uncore_snbep.c | 403 +++++++++++++++++++++++++++++++++++ 3 files changed, 411 insertions(+) commit 543ac280b3576c0009e8c0fcd4d6bfc9978d7bd0 Author: Kan Liang Date: Tue Apr 30 17:53:43 2019 -0700 perf/x86/intel/uncore: Handle invalid event coding for free-running counter Counting with invalid event coding for free-running counter may cause OOPs, e.g. uncore_iio_free_running_0/event=1/. Current code only validate the event with free-running event format, event=0xff,umask=0xXY. Non-free-running event format never be checked for the PMU with free-running counters. Add generic hw_config() to check and reject the invalid event coding for free-running PMU. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: acme@kernel.org Cc: eranian@google.com Fixes: 0f519f0352e3 ("perf/x86/intel/uncore: Support IIO free-running counters on SKX") Link: https://lkml.kernel.org/r/1556672028-119221-2-git-send-email-kan.liang@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/uncore.h | 10 ++++++++++ arch/x86/events/intel/uncore_snbep.c | 1 + 2 files changed, 11 insertions(+) commit faaeff98666c24376cebd0b106504d05a36881d1 Author: Kan Liang Date: Mon Jun 3 06:41:21 2019 -0700 perf/x86/intel: Add more Icelake CPUIDs Add new model number for Icelake desktop and server to perf. The data source encoding for Icelake server is the same as Skylake server. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bp@alien8.de Cc: qiuxu.zhuo@intel.com Cc: rui.zhang@intel.com Cc: tony.luck@intel.com Link: https://lkml.kernel.org/r/20190603134122.13853-2-kan.liang@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/core.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 2a538fda82824a7722e296be656bb5d11d91a9cb Author: Kan Liang Date: Mon Jun 3 06:41:22 2019 -0700 perf/x86/intel: Add Icelake desktop CPUID Add new Icelake desktop CPUID for RAPL, CSTATE and UNCORE. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bp@alien8.de Cc: qiuxu.zhuo@intel.com Cc: rui.zhang@intel.com Cc: tony.luck@intel.com Link: https://lkml.kernel.org/r/20190603134122.13853-3-kan.liang@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/cstate.c | 1 + arch/x86/events/intel/rapl.c | 1 + arch/x86/events/intel/uncore.c | 1 + 3 files changed, 3 insertions(+) commit 0c7376ada9508141becec9b897d73b65ce66a15a Author: Rafael J. Wysocki Date: Fri Jun 7 00:32:31 2019 +0200 PCI: PM: Replace pci_dev_keep_suspended() with two functions The code in pci_dev_keep_suspended() is relatively hard to follow due to the negative checks in it and in its callers and the function has a possible side-effect (disabling the PME) which doesn't really match its role. For this reason, move the PME disabling from pci_dev_keep_suspended() to a separate function and change the semantics (and name) of the rest of it, so that 'true' is returned when the device needs to be resumed (and not the other way around). Change the callers of pci_dev_keep_suspended() accordingly. While at it, make the code flow in pci_pm_poweroff() reflect the pci_pm_suspend() more closely to avoid arbitrary differences between them. This is a cosmetic change with no intention to alter behavior. Signed-off-by: Rafael J. Wysocki Reviewed-by: Mika Westerberg drivers/pci/pci-driver.c | 22 +++++++++++++++---- drivers/pci/pci.c | 55 ++++++++++++++++++++++++------------------------ drivers/pci/pci.h | 3 ++- 3 files changed, 48 insertions(+), 32 deletions(-) commit 234f223d63d8f7db64a682ccf02871d40d38db52 Author: Rafael J. Wysocki Date: Fri Jun 7 00:30:58 2019 +0200 PCI: PM: Avoid resuming devices in D3hot during system suspend The current code resumes devices in D3hot during system suspend if the target power state for them is D3cold, but that is not necessary in general. It only is necessary to do that if the platform firmware requires the device to be resumed, but that should be covered by the platform_pci_need_resume() check anyway, so rework pci_dev_keep_suspended() to avoid returning 'false' for devices in D3hot which need not be resumed due to platform firmware requirements. Signed-off-by: Rafael J. Wysocki Reviewed-by: Mika Westerberg drivers/pci/pci.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit bddb3636737f658886a0a02b64db5366bba3428e Merge: 3384c78631dd cbb99c0f5887 Author: Ingo Molnar Date: Mon Jun 17 12:29:16 2019 +0200 Merge branch 'x86/cpu' into perf/core, to pick up dependent changes Signed-off-by: Ingo Molnar commit a15ea1a35f1b2782befc8b958c123c5d6a7cab0a Author: Waiman Long Date: Mon May 20 16:59:15 2019 -0400 locking/rwsem: Guard against making count negative The upper bits of the count field is used as reader count. When sufficient number of active readers are present, the most significant bit will be set and the count becomes negative. If the number of active readers keep on piling up, we may eventually overflow the reader counts. This is not likely to happen unless the number of bits reserved for reader count is reduced because those bits are need for other purpose. To prevent this count overflow from happening, the most significant bit is now treated as a guard bit (RWSEM_FLAG_READFAIL). Read-lock attempts will now fail for both the fast and slow paths whenever this bit is set. So all those extra readers will be put to sleep in the wait list. Wakeup will not happen until the reader count reaches 0. Signed-off-by: Waiman Long Signed-off-by: Peter Zijlstra (Intel) Cc: Borislav Petkov Cc: Davidlohr Bueso Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tim Chen Cc: Will Deacon Cc: huang ying Link: https://lkml.kernel.org/r/20190520205918.22251-17-longman@redhat.com Signed-off-by: Ingo Molnar kernel/locking/rwsem.c | 53 ++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 41 insertions(+), 12 deletions(-) commit 5cfd92e12e13432251981b9d0cd68dbd7aa8d690 Author: Waiman Long Date: Mon May 20 16:59:14 2019 -0400 locking/rwsem: Adaptive disabling of reader optimistic spinning Reader optimistic spinning is helpful when the reader critical section is short and there aren't that many readers around. It makes readers relatively more preferred than writers. When a writer times out spinning on a reader-owned lock and set the nospinnable bits, there are two main reasons for that. 1) The reader critical section is long, perhaps the task sleeps after acquiring the read lock. 2) There are just too many readers contending the lock causing it to take a while to service all of them. In the former case, long reader critical section will impede the progress of writers which is usually more important for system performance. In the later case, reader optimistic spinning tends to make the reader groups that contain readers that acquire the lock together smaller leading to more of them. That may hurt performance in some cases. In other words, the setting of nonspinnable bits indicates that reader optimistic spinning may not be helpful for those workloads that cause it. Therefore, any writers that have observed the setting of the writer nonspinnable bit for a given rwsem after they fail to acquire the lock via optimistic spinning will set the reader nonspinnable bit once they acquire the write lock. Similarly, readers that observe the setting of reader nonspinnable bit at slowpath entry will also set the reader nonspinnable bit when they acquire the read lock via the wakeup path. Once the reader nonspinnable bit is on, it will only be reset when a writer is able to acquire the rwsem in the fast path or somehow a reader or writer in the slowpath doesn't observe the nonspinable bit. This is to discourage reader optmistic spinning on that particular rwsem and make writers more preferred. This adaptive disabling of reader optimistic spinning will alleviate some of the negative side effect of this feature. In addition, this patch tries to make readers in the spinning queue follow the phase-fair principle after quitting optimistic spinning by checking if another reader has somehow acquired a read lock after this reader enters the optimistic spinning queue. If so and the rwsem is still reader-owned, this reader is in the right read-phase and can attempt to acquire the lock. On a 2-socket 40-core 80-thread Skylake system, the page_fault1 test of the will-it-scale benchmark was run with various number of threads. The number of operations done before reader optimistic spinning patches, this patch and after this patch were: Threads Before rspin Before patch After patch %change ------- ------------ ------------ ----------- ------- 20 5541068 5345484 5455667 -3.5%/ +2.1% 40 10185150 7292313 9219276 -28.5%/+26.4% 60 8196733 6460517 7181209 -21.2%/+11.2% 80 9508864 6739559 8107025 -29.1%/+20.3% This patch doesn't recover all the lost performance, but it is more than half. Given the fact that reader optimistic spinning does benefit some workloads, this is a good compromise. Using the rwsem locking microbenchmark with very short critical section, this patch doesn't have too much impact on locking performance as shown by the locking rates (kops/s) below with equal numbers of readers and writers before and after this patch: # of Threads Pre-patch Post-patch ------------ --------- ---------- 2 4,730 4,969 4 4,814 4,786 8 4,866 4,815 16 4,715 4,511 32 3,338 3,500 64 3,212 3,389 80 3,110 3,044 When running the locking microbenchmark with 40 dedicated reader and writer threads, however, the reader performance is curtailed to favor the writer. Before patch: 40 readers, Iterations Min/Mean/Max = 204,026/234,309/254,816 40 writers, Iterations Min/Mean/Max = 88,515/95,884/115,644 After patch: 40 readers, Iterations Min/Mean/Max = 33,813/35,260/36,791 40 writers, Iterations Min/Mean/Max = 95,368/96,565/97,798 Signed-off-by: Waiman Long Signed-off-by: Peter Zijlstra (Intel) Cc: Borislav Petkov Cc: Davidlohr Bueso Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tim Chen Cc: Will Deacon Cc: huang ying Link: https://lkml.kernel.org/r/20190520205918.22251-16-longman@redhat.com Signed-off-by: Ingo Molnar kernel/locking/lock_events_list.h | 10 +-- kernel/locking/rwsem.c | 133 ++++++++++++++++++++++++++++++++++++-- 2 files changed, 135 insertions(+), 8 deletions(-) commit 7d43f1ce9dd075d8b2aa3ad1f3970ef386a5c358 Author: Waiman Long Date: Mon May 20 16:59:13 2019 -0400 locking/rwsem: Enable time-based spinning on reader-owned rwsem When the rwsem is owned by reader, writers stop optimistic spinning simply because there is no easy way to figure out if all the readers are actively running or not. However, there are scenarios where the readers are unlikely to sleep and optimistic spinning can help performance. This patch provides a simple mechanism for spinning on a reader-owned rwsem by a writer. It is a time threshold based spinning where the allowable spinning time can vary from 10us to 25us depending on the condition of the rwsem. When the time threshold is exceeded, the nonspinnable bits will be set in the owner field to indicate that no more optimistic spinning will be allowed on this rwsem until it becomes writer owned again. Not even readers is allowed to acquire the reader-locked rwsem by optimistic spinning for fairness. We also want a writer to acquire the lock after the readers hold the lock for a relatively long time. In order to give preference to writers under such a circumstance, the single RWSEM_NONSPINNABLE bit is now split into two - one for reader and one for writer. When optimistic spinning is disabled, both bits will be set. When the reader count drop down to 0, the writer nonspinnable bit will be cleared to allow writers to spin on the lock, but not the readers. When a writer acquires the lock, it will write its own task structure pointer into sem->owner and clear the reader nonspinnable bit in the process. The time taken for each iteration of the reader-owned rwsem spinning loop varies. Below are sample minimum elapsed times for 16 iterations of the loop. System Time for 16 Iterations ------ ---------------------- 1-socket Skylake ~800ns 4-socket Broadwell ~300ns 2-socket ThunderX2 (arm64) ~250ns When the lock cacheline is contended, we can see up to almost 10X increase in elapsed time. So 25us will be at most 500, 1300 and 1600 iterations for each of the above systems. With a locking microbenchmark running on 5.1 based kernel, the total locking rates (in kops/s) on a 8-socket IvyBridge-EX system with equal numbers of readers and writers before and after this patch were as follows: # of Threads Pre-patch Post-patch ------------ --------- ---------- 2 1,759 6,684 4 1,684 6,738 8 1,074 7,222 16 900 7,163 32 458 7,316 64 208 520 128 168 425 240 143 474 This patch gives a big boost in performance for mixed reader/writer workloads. With 32 locking threads, the rwsem lock event data were: rwsem_opt_fail=79850 rwsem_opt_nospin=5069 rwsem_opt_rlock=597484 rwsem_opt_wlock=957339 rwsem_sleep_reader=57782 rwsem_sleep_writer=55663 With 64 locking threads, the data looked like: rwsem_opt_fail=346723 rwsem_opt_nospin=6293 rwsem_opt_rlock=1127119 rwsem_opt_wlock=1400628 rwsem_sleep_reader=308201 rwsem_sleep_writer=72281 So a lot more threads acquired the lock in the slowpath and more threads went to sleep. Signed-off-by: Waiman Long Signed-off-by: Peter Zijlstra (Intel) Cc: Borislav Petkov Cc: Davidlohr Bueso Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tim Chen Cc: Will Deacon Cc: huang ying Link: https://lkml.kernel.org/r/20190520205918.22251-15-longman@redhat.com Signed-off-by: Ingo Molnar kernel/locking/lock_events_list.h | 1 + kernel/locking/rwsem.c | 173 +++++++++++++++++++++++++++++++------- 2 files changed, 144 insertions(+), 30 deletions(-) commit 94a9717b3c40e77a54e4afacd8f19a9a86bfeead Author: Waiman Long Date: Mon May 20 16:59:12 2019 -0400 locking/rwsem: Make rwsem->owner an atomic_long_t The rwsem->owner contains not just the task structure pointer, it also holds some flags for storing the current state of the rwsem. Some of the flags may have to be atomically updated. To reflect the new reality, the owner is now changed to an atomic_long_t type. New helper functions are added to properly separate out the task structure pointer and the embedded flags. Suggested-by: Peter Zijlstra Signed-off-by: Waiman Long Signed-off-by: Peter Zijlstra (Intel) Cc: Borislav Petkov Cc: Davidlohr Bueso Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Thomas Gleixner Cc: Tim Chen Cc: Will Deacon Cc: huang ying Link: https://lkml.kernel.org/r/20190520205918.22251-14-longman@redhat.com Signed-off-by: Ingo Molnar include/linux/percpu-rwsem.h | 4 +- include/linux/rwsem.h | 11 ++-- kernel/locking/rwsem.c | 125 +++++++++++++++++++++++++++---------------- 3 files changed, 88 insertions(+), 52 deletions(-) commit cf69482d62d996d3ce840eeead8e160de281ac6c Author: Waiman Long Date: Mon May 20 16:59:11 2019 -0400 locking/rwsem: Enable readers spinning on writer This patch enables readers to optimistically spin on a rwsem when it is owned by a writer instead of going to sleep directly. The rwsem_can_spin_on_owner() function is extracted out of rwsem_optimistic_spin() and is called directly by rwsem_down_read_slowpath() and rwsem_down_write_slowpath(). With a locking microbenchmark running on 5.1 based kernel, the total locking rates (in kops/s) on a 8-socket IvyBrige-EX system with equal numbers of readers and writers before and after the patch were as follows: # of Threads Pre-patch Post-patch ------------ --------- ---------- 4 1,674 1,684 8 1,062 1,074 16 924 900 32 300 458 64 195 208 128 164 168 240 149 143 The performance change wasn't significant in this case, but this change is required by a follow-on patch. Signed-off-by: Waiman Long Signed-off-by: Peter Zijlstra (Intel) Cc: Borislav Petkov Cc: Davidlohr Bueso Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tim Chen Cc: Will Deacon Cc: huang ying Link: https://lkml.kernel.org/r/20190520205918.22251-13-longman@redhat.com Signed-off-by: Ingo Molnar kernel/locking/lock_events_list.h | 1 + kernel/locking/rwsem.c | 86 +++++++++++++++++++++++++++++++++------ 2 files changed, 75 insertions(+), 12 deletions(-) commit 02f1082b003a0cd48f48f12533d969cdbf1c2b63 Author: Waiman Long Date: Mon May 20 16:59:10 2019 -0400 locking/rwsem: Clarify usage of owner's nonspinaable bit Bit 1 of sem->owner (RWSEM_ANONYMOUSLY_OWNED) is used to designate an anonymous owner - readers or an anonymous writer. The setting of this anonymous bit is used as an indicator that optimistic spinning cannot be done on this rwsem. With the upcoming reader optimistic spinning patches, a reader-owned rwsem can be spinned on for a limit period of time. We still need this bit to indicate a rwsem is nonspinnable, but not setting this bit loses its meaning that the owner is known. So rename the bit to RWSEM_NONSPINNABLE to clarify its meaning. This patch also fixes a DEBUG_RWSEMS_WARN_ON() bug in __up_write(). Signed-off-by: Waiman Long Signed-off-by: Peter Zijlstra (Intel) Cc: Borislav Petkov Cc: Davidlohr Bueso Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tim Chen Cc: Will Deacon Cc: huang ying Link: https://lkml.kernel.org/r/20190520205918.22251-12-longman@redhat.com Signed-off-by: Ingo Molnar include/linux/rwsem.h | 2 +- kernel/locking/rwsem.c | 43 +++++++++++++++++++++---------------------- 2 files changed, 22 insertions(+), 23 deletions(-) commit d3681e269fff84048c94012342c3434b227c4706 Author: Waiman Long Date: Mon May 20 16:59:09 2019 -0400 locking/rwsem: Wake up almost all readers in wait queue When the front of the wait queue is a reader, other readers immediately following the first reader will also be woken up at the same time. However, if there is a writer in between. Those readers behind the writer will not be woken up. Because of optimistic spinning, the lock acquisition order is not FIFO anyway. The lock handoff mechanism will ensure that lock starvation will not happen. Assuming that the lock hold times of the other readers still in the queue will be about the same as the readers that are being woken up, there is really not much additional cost other than the additional latency due to the wakeup of additional tasks by the waker. Therefore all the readers up to a maximum of 256 in the queue are woken up when the first waiter is a reader to improve reader throughput. This is somewhat similar in concept to a phase-fair R/W lock. With a locking microbenchmark running on 5.1 based kernel, the total locking rates (in kops/s) on a 8-socket IvyBridge-EX system with equal numbers of readers and writers before and after this patch were as follows: # of Threads Pre-Patch Post-patch ------------ --------- ---------- 4 1,641 1,674 8 731 1,062 16 564 924 32 78 300 64 38 195 240 50 149 There is no performance gain at low contention level. At high contention level, however, this patch gives a pretty decent performance boost. Signed-off-by: Waiman Long Signed-off-by: Peter Zijlstra (Intel) Cc: Borislav Petkov Cc: Davidlohr Bueso Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tim Chen Cc: Will Deacon Cc: huang ying Link: https://lkml.kernel.org/r/20190520205918.22251-11-longman@redhat.com Signed-off-by: Ingo Molnar kernel/locking/rwsem.c | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) commit 990fa7384a3057a3298bcf493651c6e14416c47c Author: Waiman Long Date: Mon May 20 16:59:08 2019 -0400 locking/rwsem: More optimal RT task handling of null owner An RT task can do optimistic spinning only if the lock holder is actually running. If the state of the lock holder isn't known, there is a possibility that high priority of the RT task may block forward progress of the lock holder if it happens to reside on the same CPU. This will lead to deadlock. So we have to make sure that an RT task will not spin on a reader-owned rwsem. When the owner is temporarily set to NULL, there are two cases where we may want to continue spinning: 1) The lock owner is in the process of releasing the lock, sem->owner is cleared but the lock has not been released yet. 2) The lock was free and owner cleared, but another task just comes in and acquire the lock before we try to get it. The new owner may be a spinnable writer. So an RT task is now made to retry one more time to see if it can acquire the lock or continue spinning on the new owning writer. When testing on a 8-socket IvyBridge-EX system, the one additional retry seems to improve locking performance of RT write locking threads under heavy contentions. The table below shows the locking rates (in kops/s) with various write locking threads before and after the patch. Locking threads Pre-patch Post-patch --------------- --------- ----------- 4 2,753 2,608 8 2,529 2,520 16 1,727 1,918 32 1,263 1,956 64 889 1,343 Signed-off-by: Waiman Long Signed-off-by: Peter Zijlstra (Intel) Cc: Borislav Petkov Cc: Davidlohr Bueso Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tim Chen Cc: Will Deacon Cc: huang ying Link: https://lkml.kernel.org/r/20190520205918.22251-10-longman@redhat.com Signed-off-by: Ingo Molnar kernel/locking/rwsem.c | 51 +++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 44 insertions(+), 7 deletions(-) commit 00f3c5a3df2c1e3dab14d0dd2b71f852d46be97f Author: Waiman Long Date: Mon May 20 16:59:07 2019 -0400 locking/rwsem: Always release wait_lock before waking up tasks With the use of wake_q, we can do task wakeups without holding the wait_lock. There is one exception in the rwsem code, though. It is when the writer in the slowpath detects that there are waiters ahead but the rwsem is not held by a writer. This can lead to a long wait_lock hold time especially when a large number of readers are to be woken up. Remediate this situation by releasing the wait_lock before waking up tasks and re-acquiring it afterward. The rwsem_try_write_lock() function is also modified to read the rwsem count directly to avoid stale count value. Suggested-by: Peter Zijlstra Signed-off-by: Waiman Long Signed-off-by: Peter Zijlstra (Intel) Cc: Borislav Petkov Cc: Davidlohr Bueso Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Thomas Gleixner Cc: Tim Chen Cc: Will Deacon Cc: huang ying Link: https://lkml.kernel.org/r/20190520205918.22251-9-longman@redhat.com Signed-off-by: Ingo Molnar include/linux/sched/wake_q.h | 5 +++++ kernel/locking/rwsem.c | 31 +++++++++++++++---------------- 2 files changed, 20 insertions(+), 16 deletions(-) commit 4f23dbc1e657951e5d94c60369bc1db065961fb3 Author: Waiman Long Date: Mon May 20 16:59:06 2019 -0400 locking/rwsem: Implement lock handoff to prevent lock starvation Because of writer lock stealing, it is possible that a constant stream of incoming writers will cause a waiting writer or reader to wait indefinitely leading to lock starvation. This patch implements a lock handoff mechanism to disable lock stealing and force lock handoff to the first waiter or waiters (for readers) in the queue after at least a 4ms waiting period unless it is a RT writer task which doesn't need to wait. The waiting period is used to avoid discouraging lock stealing too much to affect performance. The setting and clearing of the handoff bit is serialized by the wait_lock. So racing is not possible. A rwsem microbenchmark was run for 5 seconds on a 2-socket 40-core 80-thread Skylake system with a v5.1 based kernel and 240 write_lock threads with 5us sleep critical section. Before the patch, the min/mean/max numbers of locking operations for the locking threads were 1/7,792/173,696. After the patch, the figures became 5,842/6,542/7,458. It can be seen that the rwsem became much more fair, though there was a drop of about 16% in the mean locking operations done which was a tradeoff of having better fairness. Making the waiter set the handoff bit right after the first wakeup can impact performance especially with a mixed reader/writer workload. With the same microbenchmark with short critical section and equal number of reader and writer threads (40/40), the reader/writer locking operation counts with the current patch were: 40 readers, Iterations Min/Mean/Max = 1,793/1,794/1,796 40 writers, Iterations Min/Mean/Max = 1,793/34,956/86,081 By making waiter set handoff bit immediately after wakeup: 40 readers, Iterations Min/Mean/Max = 43/44/46 40 writers, Iterations Min/Mean/Max = 43/1,263/3,191 Signed-off-by: Waiman Long Signed-off-by: Peter Zijlstra (Intel) Cc: Borislav Petkov Cc: Davidlohr Bueso Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tim Chen Cc: Will Deacon Cc: huang ying Link: https://lkml.kernel.org/r/20190520205918.22251-8-longman@redhat.com Signed-off-by: Ingo Molnar kernel/locking/lock_events_list.h | 2 + kernel/locking/rwsem.c | 225 +++++++++++++++++++++++++++++--------- 2 files changed, 173 insertions(+), 54 deletions(-) commit 3f6d517a3ece6e6ced7abcbe798ff332ac5ca586 Author: Waiman Long Date: Mon May 20 16:59:05 2019 -0400 locking/rwsem: Make rwsem_spin_on_owner() return owner state This patch modifies rwsem_spin_on_owner() to return four possible values to better reflect the state of lock holder which enables us to make a better decision of what to do next. Signed-off-by: Waiman Long Signed-off-by: Peter Zijlstra (Intel) Cc: Borislav Petkov Cc: Davidlohr Bueso Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tim Chen Cc: Will Deacon Cc: huang ying Link: https://lkml.kernel.org/r/20190520205918.22251-7-longman@redhat.com Signed-off-by: Ingo Molnar kernel/locking/rwsem.c | 65 ++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 47 insertions(+), 18 deletions(-) commit 6cef7ff6e43cbdb9fa8eb91eb9a6b25d45ae11e3 Author: Waiman Long Date: Mon May 20 16:59:04 2019 -0400 locking/rwsem: Code cleanup after files merging After merging all the relevant rwsem code into one single file, there are a number of optimizations and cleanups that can be done: 1) Remove all the EXPORT_SYMBOL() calls for functions that are not accessed elsewhere. 2) Remove all the __visible tags as none of the functions will be called from assembly code anymore. 3) Make all the internal functions static. 4) Remove some unneeded blank lines. 5) Remove the intermediate rwsem_down_{read|write}_failed*() functions and rename __rwsem_down_{read|write}_failed_common() to rwsem_down_{read|write}_slowpath(). 6) Remove "__" prefix of __rwsem_mark_wake(). 7) Use atomic_long_try_cmpxchg_acquire() as much as possible. 8) Remove the rwsem_rtrylock and rwsem_wtrylock lock events as they are not that useful. That enables the compiler to do better optimization and reduce code size. The text+data size of rwsem.o on an x86-64 machine with gcc8 was reduced from 10237 bytes to 5030 bytes with this change. Suggested-by: Peter Zijlstra Signed-off-by: Waiman Long Signed-off-by: Peter Zijlstra (Intel) Cc: Borislav Petkov Cc: Davidlohr Bueso Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Thomas Gleixner Cc: Tim Chen Cc: Will Deacon Cc: huang ying Link: https://lkml.kernel.org/r/20190520205918.22251-6-longman@redhat.com Signed-off-by: Ingo Molnar kernel/locking/lock_events_list.h | 2 - kernel/locking/rwsem.c | 135 ++++++++++++-------------------------- 2 files changed, 42 insertions(+), 95 deletions(-) commit 5dec94d4923683b1dd6a09dc62427a24d79ee7b4 Author: Waiman Long Date: Mon May 20 16:59:03 2019 -0400 locking/rwsem: Merge rwsem.h and rwsem-xadd.c into rwsem.c Now we only have one implementation of rwsem. Even though we still use xadd to handle reader locking, we use cmpxchg for writer instead. So the filename rwsem-xadd.c is not strictly correct. Also no one outside of the rwsem code need to know the internal implementation other than function prototypes for two internal functions that are called directly from percpu-rwsem.c. So the rwsem-xadd.c and rwsem.h files are now merged into rwsem.c in the following order: The rwsem.h file now contains only 2 function declarations for __up_read() and __down_read(). This is a code relocation patch with no code change at all except making __up_read() and __down_read() non-static functions so they can be used by percpu-rwsem.c. Suggested-by: Peter Zijlstra Signed-off-by: Waiman Long Signed-off-by: Peter Zijlstra (Intel) Cc: Borislav Petkov Cc: Davidlohr Bueso Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Thomas Gleixner Cc: Tim Chen Cc: Will Deacon Cc: huang ying Link: https://lkml.kernel.org/r/20190520205918.22251-5-longman@redhat.com Signed-off-by: Ingo Molnar kernel/locking/Makefile | 2 +- kernel/locking/rwsem-xadd.c | 624 ------------------------------- kernel/locking/rwsem.c | 884 ++++++++++++++++++++++++++++++++++++++++++++ kernel/locking/rwsem.h | 281 +------------- 4 files changed, 891 insertions(+), 900 deletions(-) commit 64489e78004cb5623211c75790cac90bd25ff5e9 Author: Waiman Long Date: Mon May 20 16:59:02 2019 -0400 locking/rwsem: Implement a new locking scheme The current way of using various reader, writer and waiting biases in the rwsem code are confusing and hard to understand. I have to reread the rwsem count guide in the rwsem-xadd.c file from time to time to remind myself how this whole thing works. It also makes the rwsem code harder to be optimized. To make rwsem more sane, a new locking scheme similar to the one in qrwlock is now being used. The atomic long count has the following bit definitions: Bit 0 - writer locked bit Bit 1 - waiters present bit Bits 2-7 - reserved for future extension Bits 8-X - reader count (24/56 bits) The cmpxchg instruction is now used to acquire the write lock. The read lock is still acquired with xadd instruction, so there is no change here. This scheme will allow up to 16M/64P active readers which should be more than enough. We can always use some more reserved bits if necessary. With that change, we can deterministically know if a rwsem has been write-locked. Looking at the count alone, however, one cannot determine for certain if a rwsem is owned by readers or not as the readers that set the reader count bits may be in the process of backing out. So we still need the reader-owned bit in the owner field to be sure. With a locking microbenchmark running on 5.1 based kernel, the total locking rates (in kops/s) of the benchmark on a 8-socket 120-core IvyBridge-EX system before and after the patch were as follows: Before Patch After Patch # of Threads wlock rlock wlock rlock ------------ ----- ----- ----- ----- 1 30,659 31,341 31,055 31,283 2 8,909 16,457 9,884 17,659 4 9,028 15,823 8,933 20,233 8 8,410 14,212 7,230 17,140 16 8,217 25,240 7,479 24,607 The locking rates of the benchmark on a Power8 system were as follows: Before Patch After Patch # of Threads wlock rlock wlock rlock ------------ ----- ----- ----- ----- 1 12,963 13,647 13,275 13,601 2 7,570 11,569 7,902 10,829 4 5,232 5,516 5,466 5,435 8 5,233 3,386 5,467 3,168 The locking rates of the benchmark on a 2-socket ARM64 system were as follows: Before Patch After Patch # of Threads wlock rlock wlock rlock ------------ ----- ----- ----- ----- 1 21,495 21,046 21,524 21,074 2 5,293 10,502 5,333 10,504 4 5,325 11,463 5,358 11,631 8 5,391 11,712 5,470 11,680 The performance are roughly the same before and after the patch. There are run-to-run variations in performance. Runs with higher variances usually have higher throughput. Signed-off-by: Waiman Long Signed-off-by: Peter Zijlstra (Intel) Cc: Borislav Petkov Cc: Davidlohr Bueso Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tim Chen Cc: Will Deacon Cc: huang ying Link: https://lkml.kernel.org/r/20190520205918.22251-4-longman@redhat.com Signed-off-by: Ingo Molnar kernel/locking/rwsem-xadd.c | 147 +++++++++++++++----------------------------- kernel/locking/rwsem.h | 74 +++++++++++----------- 2 files changed, 85 insertions(+), 136 deletions(-) commit 5c1ec49b60cdb31e51010f8a647f3189b774bddf Author: Waiman Long Date: Mon May 20 16:59:01 2019 -0400 locking/rwsem: Remove rwsem_wake() wakeup optimization After the following commit: 59aabfc7e959 ("locking/rwsem: Reduce spinlock contention in wakeup after up_read()/up_write()") the rwsem_wake() forgoes doing a wakeup if the wait_lock cannot be directly acquired and an optimistic spinning locker is present. This can help performance by avoiding spinning on the wait_lock when it is contended. With the later commit: 133e89ef5ef3 ("locking/rwsem: Enable lockless waiter wakeup(s)") the performance advantage of the above optimization diminishes as the average wait_lock hold time become much shorter. With a later patch that supports rwsem lock handoff, we can no longer relies on the fact that the presence of an optimistic spinning locker will ensure that the lock will be acquired by a task soon and rwsem_wake() will be called later on to wake up waiters. This can lead to missed wakeup and application hang. So the original 59aabfc7e959 commit has to be reverted. Signed-off-by: Waiman Long Signed-off-by: Peter Zijlstra (Intel) Cc: Borislav Petkov Cc: Davidlohr Bueso Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tim Chen Cc: Will Deacon Cc: huang ying Link: https://lkml.kernel.org/r/20190520205918.22251-3-longman@redhat.com Signed-off-by: Ingo Molnar kernel/locking/rwsem-xadd.c | 72 --------------------------------------------- 1 file changed, 72 deletions(-) commit c71fd893f614f205dbc050d60299cc5496491c19 Author: Waiman Long Date: Mon May 20 16:59:00 2019 -0400 locking/rwsem: Make owner available even if !CONFIG_RWSEM_SPIN_ON_OWNER The owner field in the rw_semaphore structure is used primarily for optimistic spinning. However, identifying the rwsem owner can also be helpful in debugging as well as tracing locking related issues when analyzing crash dump. The owner field may also store state information that can be important to the operation of the rwsem. So the owner field is now made a permanent member of the rw_semaphore structure irrespective of CONFIG_RWSEM_SPIN_ON_OWNER. Signed-off-by: Waiman Long Signed-off-by: Peter Zijlstra (Intel) Cc: Borislav Petkov Cc: Davidlohr Bueso Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tim Chen Cc: Will Deacon Cc: huang ying Link: https://lkml.kernel.org/r/20190520205918.22251-2-longman@redhat.com Signed-off-by: Ingo Molnar include/linux/rwsem.h | 9 +++++---- kernel/locking/rwsem-xadd.c | 2 +- kernel/locking/rwsem.h | 23 ----------------------- lib/Kconfig.debug | 8 ++++---- 4 files changed, 10 insertions(+), 32 deletions(-) commit 2d4a79ae34048996906e585375c2e3e699e1e11a Author: David Arcari Date: Thu Jun 6 14:50:52 2019 -0400 cpufreq: pcc-cpufreq: Fail initialization if driver cannot be registered Make pcc_cpufreq_init() return error codes when the driver cannot be registered. Otherwise the driver can shows up loaded via lsmod even though it failed initialization. This is confusing to the user. Signed-off-by: David Arcari Cc: "Rafael J. Wysocki" Cc: Viresh Kumar Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/pcc-cpufreq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 466329bf407cc5143c3211620faa2c132b9d9a06 Author: Christoph Hellwig Date: Tue Jun 4 09:15:24 2019 +0200 x86/fpu: Remove the fpu__save() export This function is only use by the core FPU code. Signed-off-by: Christoph Hellwig Signed-off-by: Borislav Petkov Acked-by: Sebastian Andrzej Siewior Cc: Dave Hansen Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Nicolai Stange Cc: Rik van Riel Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/20190604071524.12835-4-hch@lst.de arch/x86/kernel/fpu/core.c | 1 - 1 file changed, 1 deletion(-) commit 6d79d86f9600510e08ad45c72b9d7e664e439e62 Author: Christoph Hellwig Date: Tue Jun 4 09:15:23 2019 +0200 x86/fpu: Simplify kernel_fpu_begin() Merge two helpers into the main function, remove a pointless local variable and flatten a conditional. Signed-off-by: Christoph Hellwig Signed-off-by: Borislav Petkov Acked-by: Sebastian Andrzej Siewior Cc: Dave Hansen Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Nicolai Stange Cc: Rik van Riel Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/20190604071524.12835-3-hch@lst.de arch/x86/kernel/fpu/core.c | 36 ++++++++++++------------------------ 1 file changed, 12 insertions(+), 24 deletions(-) commit 66567fcbaecac455caa1b13643155d686b51ce63 Author: bsegall@google.com Date: Thu Jun 6 10:21:01 2019 -0700 sched/fair: Don't push cfs_bandwith slack timers forward When a cfs_rq sleeps and returns its quota, we delay for 5ms before waking any throttled cfs_rqs to coalesce with other cfs_rqs going to sleep, as this has to be done outside of the rq lock we hold. The current code waits for 5ms without any sleeps, instead of waiting for 5ms from the first sleep, which can delay the unthrottle more than we want. Switch this around so that we can't push this forward forever. This requires an extra flag rather than using hrtimer_active, since we need to start a new timer if the current one is in the process of finishing. Signed-off-by: Ben Segall Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Xunlei Pang Acked-by: Phil Auld Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/xm26a7euy6iq.fsf_-_@bsegall-linux.svl.corp.google.com Signed-off-by: Ingo Molnar kernel/sched/fair.c | 7 +++++++ kernel/sched/sched.h | 8 ++++---- 2 files changed, 11 insertions(+), 4 deletions(-) commit aacedf26fb7601222f2452cf0a54cab4fee160c5 Author: Peter Zijlstra Date: Fri Jun 7 15:39:49 2019 +0200 sched/core: Optimize try_to_wake_up() for local wakeups Jens reported that significant performance can be had on some block workloads by special casing local wakeups. That is, wakeups on the current task before it schedules out. Given something like the normal wait pattern: for (;;) { set_current_state(TASK_UNINTERRUPTIBLE); if (cond) break; schedule(); } __set_current_state(TASK_RUNNING); Any wakeup (on this CPU) after set_current_state() and before schedule() would benefit from this. Normal wakeups take p->pi_lock, which serializes wakeups to the same task. By eliding that we gain concurrency on: - ttwu_stat(); we already had concurrency on rq stats, this now also brings it to task stats. -ENOCARE - tracepoints; it is now possible to get multiple instances of trace_sched_waking() (and possibly trace_sched_wakeup()) for the same task. Tracers will have to learn to cope. Furthermore, p->pi_lock is used by set_special_state(), to order against TASK_RUNNING stores from other CPUs. But since this is strictly CPU local, we don't need the lock, and set_special_state()'s disabling of IRQs is sufficient. After the normal wakeup takes p->pi_lock it issues smp_mb__after_spinlock(), in order to ensure the woken task must observe prior stores before we observe the p->state. If this is CPU local, this will be satisfied with a compiler barrier, and we rely on try_to_wake_up() being a funcation call, which implies such. Since, when 'p == current', 'p->on_rq' must be true, the normal wakeup would continue into the ttwu_remote() branch, which normally is concerned with exactly this wakeup scenario, except from a remote CPU. IOW we're waking a task that is still running. In this case, we can trivially avoid taking rq->lock, all that's left from this is to set p->state. This then yields an extremely simple and fast path for 'p == current'. Reported-by: Jens Axboe Tested-by: Jens Axboe Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Qian Cai Cc: Thomas Gleixner Cc: akpm@linux-foundation.org Cc: gkohli@codeaurora.org Cc: hch@lst.de Cc: oleg@redhat.com Signed-off-by: Ingo Molnar kernel/sched/core.c | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) commit 509466b7d480bc5d22e90b9fbe6122ae0e2fbe39 Author: Qian Cai Date: Mon Jun 3 17:11:44 2019 -0400 sched/fair: Fix "runnable_avg_yN_inv" not used warnings runnable_avg_yN_inv[] is only used in kernel/sched/pelt.c but was included in several other places because they need other macros all came from kernel/sched/sched-pelt.h which was generated by Documentation/scheduler/sched-pelt. As the result, it causes compilation a lot of warnings, kernel/sched/sched-pelt.h:4:18: warning: 'runnable_avg_yN_inv' defined but not used [-Wunused-const-variable=] kernel/sched/sched-pelt.h:4:18: warning: 'runnable_avg_yN_inv' defined but not used [-Wunused-const-variable=] kernel/sched/sched-pelt.h:4:18: warning: 'runnable_avg_yN_inv' defined but not used [-Wunused-const-variable=] ... Silence it by appending the __maybe_unused attribute for it, so all generated variables and macros can still be kept in the same file. Signed-off-by: Qian Cai Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/1559596304-31581-1-git-send-email-cai@lca.pw Signed-off-by: Ingo Molnar Documentation/scheduler/sched-pelt.c | 3 ++- kernel/sched/sched-pelt.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) commit b0c792244138d3ef099e7fce978675dc4acae570 Author: Valentin Schneider Date: Mon Jun 3 12:54:24 2019 +0100 sched/fair: Clean up definition of NOHZ blocked load functions cfs_rq_has_blocked() and others_have_blocked() are only used within update_blocked_averages(). The !CONFIG_FAIR_GROUP_SCHED version of the latter calls them within a #define CONFIG_NO_HZ_COMMON block, whereas the CONFIG_FAIR_GROUP_SCHED one calls them unconditionnally. As reported by Qian, the above leads to this warning in !CONFIG_NO_HZ_COMMON configs: kernel/sched/fair.c: In function 'update_blocked_averages': kernel/sched/fair.c:7750:7: warning: variable 'done' set but not used [-Wunused-but-set-variable] It wouldn't be wrong to keep cfs_rq_has_blocked() and others_have_blocked() as they are, but since their only current use is to figure out when we can stop calling update_blocked_averages() on fully decayed NOHZ idle CPUs, we can give them a new definition for !CONFIG_NO_HZ_COMMON. Change the definition of cfs_rq_has_blocked() and others_have_blocked() for !CONFIG_NO_HZ_COMMON so that the NOHZ-specific blocks of update_blocked_averages() become no-ops and the 'done' variable gets optimised out. While at it, remove the CONFIG_NO_HZ_COMMON block from the !CONFIG_FAIR_GROUP_SCHED definition of update_blocked_averages() by using the newly-introduced update_blocked_load_status() helper. No change in functionality intended. [ Additions by Peter Zijlstra. ] Reported-by: Qian Cai Signed-off-by: Valentin Schneider Signed-off-by: Peter Zijlstra (Intel) Acked-by: Vincent Guittot Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20190603115424.7951-1-valentin.schneider@arm.com Signed-off-by: Ingo Molnar kernel/sched/fair.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) commit e3b929b0a184edb35531153c5afcaebb09014f9d Author: Gao Xiang Date: Mon Jun 3 17:13:38 2019 +0800 sched/core: Add __sched tag for io_schedule() Non-inline io_schedule() was introduced in: commit 10ab56434f2f ("sched/core: Separate out io_schedule_prepare() and io_schedule_finish()") Keep in line with io_schedule_timeout(), otherwise "/proc//wchan" will report io_schedule() rather than its callers when waiting for IO. Reported-by: Jilong Kou Signed-off-by: Gao Xiang Signed-off-by: Peter Zijlstra (Intel) Acked-by: Tejun Heo Cc: Andrew Morton Cc: Linus Torvalds Cc: Miao Xie Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 10ab56434f2f ("sched/core: Separate out io_schedule_prepare() and io_schedule_finish()") Link: https://lkml.kernel.org/r/20190603091338.2695-1-gaoxiang25@huawei.com Signed-off-by: Ingo Molnar kernel/sched/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 23da766ab1dc005860b675bf048226a11a748bf9 Merge: af75d1a9a9f7 9e0babf2c06c Author: Ingo Molnar Date: Mon Jun 17 12:12:27 2019 +0200 Merge tag 'v5.2-rc5' into sched/core, to pick up fixes Signed-off-by: Ingo Molnar commit 69d927bba39517d0980462efc051875b7f4db185 Author: Peter Zijlstra Date: Wed Apr 24 13:38:23 2019 +0200 x86/atomic: Fix smp_mb__{before,after}_atomic() Recent probing at the Linux Kernel Memory Model uncovered a 'surprise'. Strongly ordered architectures where the atomic RmW primitive implies full memory ordering and smp_mb__{before,after}_atomic() are a simple barrier() (such as x86) fail for: *x = 1; atomic_inc(u); smp_mb__after_atomic(); r0 = *y; Because, while the atomic_inc() implies memory order, it (surprisingly) does not provide a compiler barrier. This then allows the compiler to re-order like so: atomic_inc(u); *x = 1; smp_mb__after_atomic(); r0 = *y; Which the CPU is then allowed to re-order (under TSO rules) like: atomic_inc(u); r0 = *y; *x = 1; And this very much was not intended. Therefore strengthen the atomic RmW ops to include a compiler barrier. NOTE: atomic_{or,and,xor} and the bitops already had the compiler barrier. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar Documentation/atomic_t.txt | 3 +++ arch/x86/include/asm/atomic.h | 8 ++++---- arch/x86/include/asm/atomic64_64.h | 8 ++++---- arch/x86/include/asm/barrier.h | 4 ++-- 4 files changed, 13 insertions(+), 10 deletions(-) commit dd471efe345bf6f9e1206f6c629ca3e80eb43523 Author: Kobe Wu Date: Thu May 30 19:59:35 2019 +0800 locking/lockdep: Remove unnecessary DEBUG_LOCKS_WARN_ON() DEBUG_LOCKS_WARN_ON() will turn off debug_locks and makes print_unlock_imbalance_bug() return directly. Remove a redundant whitespace. Signed-off-by: Kobe Wu Signed-off-by: Peter Zijlstra (Intel) Cc: Cc: Cc: Eason Lin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Will Deacon Link: https://lkml.kernel.org/r/1559217575-30298-1-git-send-email-kobe-cp.wu@mediatek.com Signed-off-by: Ingo Molnar kernel/locking/lockdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9ffbe8ac05dbb4ab4a4836a55a47fc6be945a38f Author: Nikolay Borisov Date: Fri May 31 13:06:51 2019 +0300 locking/lockdep: Rename lockdep_assert_held_exclusive() -> lockdep_assert_held_write() All callers of lockdep_assert_held_exclusive() use it to verify the correct locking state of either a semaphore (ldisc_sem in tty, mmap_sem for perf events, i_rwsem of inode for dax) or rwlock by apparmor. Thus it makes sense to rename _exclusive to _write since that's the semantics callers care. Additionally there is already lockdep_assert_held_read(), which this new naming is more consistent with. No functional changes. Signed-off-by: Nikolay Borisov Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20190531100651.3969-1-nborisov@suse.com Signed-off-by: Ingo Molnar arch/x86/events/core.c | 2 +- drivers/infiniband/core/device.c | 2 +- drivers/tty/tty_ldisc.c | 8 ++++---- fs/dax.c | 2 +- include/linux/lockdep.h | 4 ++-- security/apparmor/label.c | 8 ++++---- 6 files changed, 13 insertions(+), 13 deletions(-) commit ba54f0c3f7c400a392c413d8ca21d3ada35f2584 Author: Daniel Bristot de Oliveira Date: Wed Jun 12 11:57:31 2019 +0200 x86/jump_label: Batch jump label updates Currently, the jump label of a static key is transformed via the arch specific function: void arch_jump_label_transform(struct jump_entry *entry, enum jump_label_type type) The new approach (batch mode) uses two arch functions, the first has the same arguments of the arch_jump_label_transform(), and is the function: bool arch_jump_label_transform_queue(struct jump_entry *entry, enum jump_label_type type) Rather than transforming the code, it adds the jump_entry in a queue of entries to be updated. This functions returns true in the case of a successful enqueue of an entry. If it returns false, the caller must to apply the queue and then try to queue again, for instance, because the queue is full. This function expects the caller to sort the entries by the address before enqueueuing then. This is already done by the arch independent code, though. After queuing all jump_entries, the function: void arch_jump_label_transform_apply(void) Applies the changes in the queue. Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Peter Zijlstra (Intel) Cc: Borislav Petkov Cc: Chris von Recklinghausen Cc: Clark Williams Cc: Greg Kroah-Hartman Cc: H. Peter Anvin Cc: Jason Baron Cc: Jiri Kosina Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Marcelo Tosatti Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Scott Wood Cc: Steven Rostedt (VMware) Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/57b4caa654bad7e3b066301c9a9ae233dea065b5.1560325897.git.bristot@redhat.com Signed-off-by: Ingo Molnar arch/x86/include/asm/jump_label.h | 2 ++ arch/x86/kernel/jump_label.c | 69 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+) commit c2ba8a15f310d915f8748dd8324c91c82b12b5ff Author: Daniel Bristot de Oliveira Date: Wed Jun 12 11:57:30 2019 +0200 jump_label: Batch updates if arch supports it If the architecture supports the batching of jump label updates, use it! An easy way to see the benefits of this patch is switching the schedstats on and off. For instance: -------------------------- %< ---------------------------- #!/bin/sh while [ true ]; do sysctl -w kernel.sched_schedstats=1 sleep 2 sysctl -w kernel.sched_schedstats=0 sleep 2 done -------------------------- >% ---------------------------- while watching the IPI count: -------------------------- %< ---------------------------- # watch -n1 "cat /proc/interrupts | grep Function" -------------------------- >% ---------------------------- With the current mode, it is possible to see +- 168 IPIs each 2 seconds, while with this patch the number of IPIs goes to 3 each 2 seconds. Regarding the performance impact of this patch set, I made two measurements: The time to update a key (the task that is causing the change) The time to run the int3 handler (the side effect on a thread that hits the code being changed) The schedstats static key was chosen as the key to being switched on and off. The reason being is that it is used in more than 56 places, in a hot path. The change in the schedstats static key will be done with the following command: while [ true ]; do sysctl -w kernel.sched_schedstats=1 usleep 500000 sysctl -w kernel.sched_schedstats=0 usleep 500000 done In this way, they key will be updated twice per second. To force the hit of the int3 handler, the system will also run a kernel compilation with two jobs per CPU. The test machine is a two nodes/24 CPUs box with an Intel Xeon processor @2.27GHz. Regarding the update part, on average, the regular kernel takes 57 ms to update the schedstats key, while the kernel with the batch updates takes just 1.4 ms on average. Although it seems to be too good to be true, it makes sense: the schedstats key is used in 56 places, so it was expected that it would take around 56 times to update the keys with the current implementation, as the IPIs are the most expensive part of the update. Regarding the int3 handler, the non-batch handler takes 45 ns on average, while the batch version takes around 180 ns. At first glance, it seems to be a high value. But it is not, considering that it is doing 56 updates, rather than one! It is taking four times more, only. This gain is possible because the patch uses a binary search in the vector: log2(56)=5.8. So, it was expected to have an overhead within four times. (voice of tv propaganda) But, that is not all! As the int3 handler keeps on for a shorter period (because the update part is on for a shorter time), the number of hits in the int3 handler decreased by 10%. The question then is: Is it worth paying the price of "135 ns" more in the int3 handler? Considering that, in this test case, we are saving the handling of 53 IPIs, that takes more than these 135 ns, it seems to be a meager price to be paid. Moreover, the test case was forcing the hit of the int3, in practice, it does not take that often. While the IPI takes place on all CPUs, hitting the int3 handler or not! For instance, in an isolated CPU with a process running in user-space (nohz_full use-case), the chances of hitting the int3 handler is barely zero, while there is no way to avoid the IPIs. By bounding the IPIs, we are improving a lot this scenario. Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Peter Zijlstra (Intel) Cc: Borislav Petkov Cc: Chris von Recklinghausen Cc: Clark Williams Cc: Greg Kroah-Hartman Cc: H. Peter Anvin Cc: Jason Baron Cc: Jiri Kosina Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Marcelo Tosatti Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Scott Wood Cc: Steven Rostedt (VMware) Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/acc891dbc2dbc9fd616dd680529a2337b1d1274c.1560325897.git.bristot@redhat.com Signed-off-by: Ingo Molnar include/linux/jump_label.h | 3 +++ kernel/jump_label.c | 23 +++++++++++++++++++++++ 2 files changed, 26 insertions(+) commit c0213b0ac03cf69f90fe5c6a8fe2c986630940fa Author: Daniel Bristot de Oliveira Date: Wed Jun 12 11:57:29 2019 +0200 x86/alternative: Batch of patch operations Currently, the patch of an address is done in three steps: -- Pseudo-code #1 - Current implementation --- 1) add an int3 trap to the address that will be patched sync cores (send IPI to all other CPUs) 2) update all but the first byte of the patched range sync cores (send IPI to all other CPUs) 3) replace the first byte (int3) by the first byte of replacing opcode sync cores (send IPI to all other CPUs) -- Pseudo-code #1 --- When a static key has more than one entry, these steps are called once for each entry. The number of IPIs then is linear with regard to the number 'n' of entries of a key: O(n*3), which is O(n). This algorithm works fine for the update of a single key. But we think it is possible to optimize the case in which a static key has more than one entry. For instance, the sched_schedstats jump label has 56 entries in my (updated) fedora kernel, resulting in 168 IPIs for each CPU in which the thread that is enabling the key is _not_ running. With this patch, rather than receiving a single patch to be processed, a vector of patches is passed, enabling the rewrite of the pseudo-code #1 in this way: -- Pseudo-code #2 - This patch --- 1) for each patch in the vector: add an int3 trap to the address that will be patched sync cores (send IPI to all other CPUs) 2) for each patch in the vector: update all but the first byte of the patched range sync cores (send IPI to all other CPUs) 3) for each patch in the vector: replace the first byte (int3) by the first byte of replacing opcode sync cores (send IPI to all other CPUs) -- Pseudo-code #2 - This patch --- Doing the update in this way, the number of IPI becomes O(3) with regard to the number of keys, which is O(1). The batch mode is done with the function text_poke_bp_batch(), that receives two arguments: a vector of "struct text_to_poke", and the number of entries in the vector. The vector must be sorted by the addr field of the text_to_poke structure, enabling the binary search of a handler in the poke_int3_handler function (a fast path). Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Masami Hiramatsu Cc: Borislav Petkov Cc: Chris von Recklinghausen Cc: Clark Williams Cc: Greg Kroah-Hartman Cc: H. Peter Anvin Cc: Jason Baron Cc: Jiri Kosina Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Marcelo Tosatti Cc: Peter Zijlstra Cc: Scott Wood Cc: Steven Rostedt (VMware) Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/ca506ed52584c80f64de23f6f55ca288e5d079de.1560325897.git.bristot@redhat.com Signed-off-by: Ingo Molnar arch/x86/include/asm/text-patching.h | 15 ++++ arch/x86/kernel/alternative.c | 154 +++++++++++++++++++++++++++-------- 2 files changed, 135 insertions(+), 34 deletions(-) commit 0f133021bd82548a33580bfb7b055e8857f46c2a Author: Daniel Bristot de Oliveira Date: Wed Jun 12 11:57:28 2019 +0200 jump_label: Sort entries of the same key by the code In the batching mode, all the entries of a given key are updated at once. During the update of a key, a hit in the int3 handler will check if the hitting code address belongs to one of these keys. To optimize the search of a given code in the vector of entries being updated, a binary search is used. The binary search relies on the order of the entries of a key by its code. Hence the keys need to be sorted by the code too, so sort the entries of a given key by the code. Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Peter Zijlstra (Intel) Cc: Borislav Petkov Cc: Chris von Recklinghausen Cc: Clark Williams Cc: Greg Kroah-Hartman Cc: H. Peter Anvin Cc: Jason Baron Cc: Jiri Kosina Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Marcelo Tosatti Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Scott Wood Cc: Steven Rostedt (VMware) Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/f57ae83e0592418ba269866bb7ade570fc8632e0.1560325897.git.bristot@redhat.com Signed-off-by: Ingo Molnar kernel/jump_label.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 4cc6620b5e4c8953c725bcfab86a57df01e83a7c Author: Daniel Bristot de Oliveira Date: Wed Jun 12 11:57:27 2019 +0200 x86/jump_label: Add a __jump_label_set_jump_code() helper Move the definition of the code to be written from __jump_label_transform() to a specialized function. No functional change. Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Peter Zijlstra (Intel) Cc: Borislav Petkov Cc: Chris von Recklinghausen Cc: Clark Williams Cc: Greg Kroah-Hartman Cc: H. Peter Anvin Cc: Jason Baron Cc: Jiri Kosina Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Marcelo Tosatti Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Scott Wood Cc: Steven Rostedt (VMware) Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/d2f52a0010ecd399cf9b02a65bcf5836571b9e52.1560325897.git.bristot@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/jump_label.c | 52 +++++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 25 deletions(-) commit e1aacb3f4adc1bcd4273a1d538a2dc3e50f1cbb5 Author: Daniel Bristot de Oliveira Date: Wed Jun 12 11:57:26 2019 +0200 jump_label: Add a jump_label_can_update() helper Move the check if a jump_entry is valid to a function. No functional change. Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Peter Zijlstra (Intel) Cc: Borislav Petkov Cc: Chris von Recklinghausen Cc: Clark Williams Cc: Greg Kroah-Hartman Cc: H. Peter Anvin Cc: Jason Baron Cc: Jiri Kosina Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Marcelo Tosatti Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Scott Wood Cc: Steven Rostedt (VMware) Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/56b69bd3f8e644ed64f2dbde7c088030b8cbe76b.1560325897.git.bristot@redhat.com Signed-off-by: Ingo Molnar kernel/jump_label.c | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) commit 410df0c5748f6c5a53847d2acb163dc7cd8b6c51 Merge: fff9b6c7d269 9e0babf2c06c Author: Ingo Molnar Date: Mon Jun 17 12:06:34 2019 +0200 Merge tag 'v5.2-rc5' into locking/core, to pick up fixes Signed-off-by: Ingo Molnar commit 1accbced1c3273ead1d30de14339c4a39062bee0 Author: Faiz Abbas Date: Tue Jun 4 11:39:13 2019 +0530 mmc: sdhci_am654: Add Support for 4 bit IP on J721E Add support for 4 bit instances on TI's J721E devices. Because these instances have no DLL, introduce a DLL_PRESENT flag and make sure DLL related registers are only accessed when it is present. Also add a separate set_clock callback for this compatible. Signed-off-by: Faiz Abbas Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci_am654.c | 124 ++++++++++++++++++++++++++++------------- 1 file changed, 86 insertions(+), 38 deletions(-) commit 99909b55f2982e548f594e8c8e2310b50d3254ce Author: Faiz Abbas Date: Tue Jun 4 11:39:12 2019 +0530 mmc: sdhci_am654: Add Support for 8 bit IP on J721E The 8 bit IP on the TI's J721E device departs from the AM654x IP in some ways which require special handling. Create a driver_data structure which holds the pltfm_data and a flags field which is used to indicate these differences. These are the following: 1. The pins are not muxed with anything else inside the SoC and hence the IOMUX_ENABLE field does not exist. Add a flag which is used to indicate the presence of the field. 2. The register field used to select DLL frequency is 3 bit wide as compared to 2 bits in AM65x. Add another flag which differentiates between 3 bit and 2 bit fields. 3. The strobe select field is 8 bit wide as compared to 4 bits for AM65x. Add yet another flag to indicate this difference. Strobe select is used only for HS400 speed mode, support for which has not yet been added in AM65x. Signed-off-by: Faiz Abbas Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci_am654.c | 135 +++++++++++++++++++++++++++++++++-------- 1 file changed, 110 insertions(+), 25 deletions(-) commit a457b70904bbf9a96d39fa01ce4d04a1d10c5e44 Author: Faiz Abbas Date: Tue Jun 4 11:39:11 2019 +0530 dt-bindings: mmc: sdhci-am654: Document bindings for the host controllers on TI's J721E devices. Add binding documentation for mmc host controllers present on TI's J721E SOC. The 4 bit IP on J721E doesn't have a phy DLL so make DLL related properties as optional for that compatible. Also add an optional strobe-sel property used for HS400 speed mode. Signed-off-by: Faiz Abbas Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/sdhci-am654.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 7b347ad4938ddca1a22b983e36b9ef825a72d230 Merge: 9db9b76767f1 9e0babf2c06c Author: Ingo Molnar Date: Mon Jun 17 12:00:22 2019 +0200 Merge tag 'v5.2-rc5' into x86/asm, to refresh the branch Signed-off-by: Ingo Molnar commit a954e5fb4bc2d401b8fc3b4c7cd316497ff80225 Merge: e137d34f94eb 9e0babf2c06c Author: Greg Kroah-Hartman Date: Mon Jun 17 11:23:24 2019 +0200 Merge 5.2-rc5 into usb-next We need the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit b8d6d0079757cbd1b69724cfd1c08e2171c68cee Author: Nicolas Dichtel Date: Fri Jun 14 11:13:55 2019 +0200 xfrm: fix sa selector validation After commit b38ff4075a80, the following command does not work anymore: $ ip xfrm state add src 10.125.0.2 dst 10.125.0.1 proto esp spi 34 reqid 1 \ mode tunnel enc 'cbc(aes)' 0xb0abdba8b782ad9d364ec81e3a7d82a1 auth-trunc \ 'hmac(sha1)' 0xe26609ebd00acb6a4d51fca13e49ea78a72c73e6 96 flag align4 In fact, the selector is not mandatory, allow the user to provide an empty selector. Fixes: b38ff4075a80 ("xfrm: Fix xfrm sel prefix length validation") CC: Anirudh Gupta Signed-off-by: Nicolas Dichtel Acked-by: Herbert Xu Signed-off-by: Steffen Klassert net/xfrm/xfrm_user.c | 3 +++ 1 file changed, 3 insertions(+) commit ac97aea7df7b97ff56d50861404c7a8491b03d87 Author: Cao Van Dong Date: Thu May 9 14:29:49 2019 +0200 dt-bindings: timer: renesas, cmt: Document r8a779{5|65|90} CMT support Document SoC specific bindings for R-Car H3/M3-N/E3 SoCs. Signed-off-by: Cao Van Dong Reviewed-by: Rob Herring Reviewed-by: Geert Uytterhoeven Acked-by: Daniel Lezcano Signed-off-by: Simon Horman Documentation/devicetree/bindings/timer/renesas,cmt.txt | 6 ++++++ 1 file changed, 6 insertions(+) commit c908fd08692b8b4d87524762218652df6922386d Author: Fabrizio Castro Date: Thu May 9 20:20:22 2019 +0100 dt-bindings: can: rcar_canfd: document r8a774c0 support Document the support for rcar_canfd on R8A774C0 SoC devices. Signed-off-by: Fabrizio Castro Reviewed-by: Chris Paterson Reviewed-by: Rob Herring Acked-by: David S. Miller Signed-off-by: Simon Horman Documentation/devicetree/bindings/net/can/rcar_canfd.txt | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 485dccb48f7590939c6dee794e0a30512926c830 Author: Marek Vasut Date: Thu May 9 20:20:21 2019 +0100 dt-bindings: can: rcar_canfd: document r8a77990 support Document the support for rcar_canfd on R8A77990 SoC devices. Signed-off-by: Marek Vasut Acked-by: David S. Miller Reviewed-by: Rob Herring Signed-off-by: Simon Horman Documentation/devicetree/bindings/net/can/rcar_canfd.txt | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit d04824b263480212771da4efbb34b49dc1a88d9f Author: Marek Vasut Date: Thu May 9 20:20:20 2019 +0100 dt-bindings: can: rcar_canfd: document r8a77965 support Document the support for rcar_canfd on R8A77965 SoC devices. Signed-off-by: Marek Vasut Acked-by: David S. Miller Reviewed-by: Rob Herring Signed-off-by: Simon Horman Documentation/devicetree/bindings/net/can/rcar_canfd.txt | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 702655234dd1d07e76f9bff9575e438c969fc32c Author: Jiangfeng Xiao Date: Fri Jun 14 20:57:09 2019 +0800 irqchip/gic: Add dependency for ARM_GIC_MAX_NR CONFIG_ARM_GIC_MAX_NR is enabled by default. It is redundant in x86 and IA-64 where is without GIC. Signed-off-by: Jiangfeng Xiao Signed-off-by: Marc Zyngier drivers/irqchip/Kconfig | 1 + 1 file changed, 1 insertion(+) commit df0566a641f959108c152be748a0a58794280e0e Author: Jani Nikula Date: Thu Jun 13 11:44:16 2019 +0300 drm/i915: move modesetting core code under display/ Now that we have a new subdirectory for display code, continue by moving modesetting core code. display/intel_frontbuffer.h sticks out like a sore thumb, otherwise this is, again, a surprisingly clean operation. v2: - don't move intel_sideband.[ch] (Ville) - use tabs for Makefile file lists and sort them Cc: Chris Wilson Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Ville Syrjälä Reviewed-by: Chris Wilson Acked-by: Rodrigo Vivi Acked-by: Maarten Lankhorst Acked-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190613084416.6794-3-jani.nikula@intel.com drivers/gpu/drm/i915/Makefile | 66 +++++++++++----------- drivers/gpu/drm/i915/Makefile.header-test | 24 -------- drivers/gpu/drm/i915/display/Makefile.header-test | 2 +- drivers/gpu/drm/i915/{ => display}/intel_acpi.c | 0 drivers/gpu/drm/i915/{ => display}/intel_acpi.h | 0 drivers/gpu/drm/i915/{ => display}/intel_atomic.c | 0 drivers/gpu/drm/i915/{ => display}/intel_atomic.h | 0 .../drm/i915/{ => display}/intel_atomic_plane.c | 0 .../drm/i915/{ => display}/intel_atomic_plane.h | 0 drivers/gpu/drm/i915/{ => display}/intel_audio.c | 0 drivers/gpu/drm/i915/{ => display}/intel_audio.h | 0 drivers/gpu/drm/i915/{ => display}/intel_bios.c | 0 drivers/gpu/drm/i915/{ => display}/intel_bios.h | 0 drivers/gpu/drm/i915/{ => display}/intel_bw.c | 0 drivers/gpu/drm/i915/{ => display}/intel_bw.h | 0 drivers/gpu/drm/i915/{ => display}/intel_cdclk.c | 0 drivers/gpu/drm/i915/{ => display}/intel_cdclk.h | 0 drivers/gpu/drm/i915/{ => display}/intel_color.c | 0 drivers/gpu/drm/i915/{ => display}/intel_color.h | 0 .../gpu/drm/i915/{ => display}/intel_combo_phy.c | 0 .../gpu/drm/i915/{ => display}/intel_combo_phy.h | 0 .../gpu/drm/i915/{ => display}/intel_connector.c | 0 .../gpu/drm/i915/{ => display}/intel_connector.h | 0 drivers/gpu/drm/i915/{ => display}/intel_display.c | 0 drivers/gpu/drm/i915/{ => display}/intel_display.h | 0 .../drm/i915/{ => display}/intel_display_power.c | 0 .../drm/i915/{ => display}/intel_display_power.h | 0 .../gpu/drm/i915/{ => display}/intel_dpio_phy.c | 0 .../gpu/drm/i915/{ => display}/intel_dpio_phy.h | 0 .../gpu/drm/i915/{ => display}/intel_dpll_mgr.c | 0 .../gpu/drm/i915/{ => display}/intel_dpll_mgr.h | 0 drivers/gpu/drm/i915/{ => display}/intel_fbc.c | 0 drivers/gpu/drm/i915/{ => display}/intel_fbc.h | 0 drivers/gpu/drm/i915/{ => display}/intel_fbdev.c | 0 drivers/gpu/drm/i915/{ => display}/intel_fbdev.h | 0 .../drm/i915/{ => display}/intel_fifo_underrun.c | 0 .../drm/i915/{ => display}/intel_fifo_underrun.h | 0 .../gpu/drm/i915/{ => display}/intel_frontbuffer.c | 0 .../gpu/drm/i915/{ => display}/intel_frontbuffer.h | 0 drivers/gpu/drm/i915/{ => display}/intel_hdcp.c | 0 drivers/gpu/drm/i915/{ => display}/intel_hdcp.h | 0 drivers/gpu/drm/i915/{ => display}/intel_hotplug.c | 0 drivers/gpu/drm/i915/{ => display}/intel_hotplug.h | 0 .../gpu/drm/i915/{ => display}/intel_lpe_audio.c | 0 .../gpu/drm/i915/{ => display}/intel_lpe_audio.h | 0 .../gpu/drm/i915/{ => display}/intel_opregion.c | 0 .../gpu/drm/i915/{ => display}/intel_opregion.h | 0 drivers/gpu/drm/i915/{ => display}/intel_overlay.c | 0 drivers/gpu/drm/i915/{ => display}/intel_overlay.h | 0 .../gpu/drm/i915/{ => display}/intel_pipe_crc.c | 0 .../gpu/drm/i915/{ => display}/intel_pipe_crc.h | 0 drivers/gpu/drm/i915/{ => display}/intel_psr.c | 0 drivers/gpu/drm/i915/{ => display}/intel_psr.h | 0 drivers/gpu/drm/i915/{ => display}/intel_quirks.c | 0 drivers/gpu/drm/i915/{ => display}/intel_quirks.h | 0 drivers/gpu/drm/i915/{ => display}/intel_sprite.c | 0 drivers/gpu/drm/i915/{ => display}/intel_sprite.h | 0 .../gpu/drm/i915/{ => display}/intel_vbt_defs.h | 0 drivers/gpu/drm/i915/gem/i915_gem_clflush.c | 3 +- drivers/gpu/drm/i915/gem/i915_gem_domain.c | 3 +- drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 3 +- drivers/gpu/drm/i915/gem/i915_gem_object.c | 3 +- drivers/gpu/drm/i915/gt/intel_reset.c | 3 +- drivers/gpu/drm/i915/gvt/opregion.c | 2 +- drivers/gpu/drm/i915/i915_debugfs.c | 6 +- drivers/gpu/drm/i915/i915_drv.c | 18 +++--- drivers/gpu/drm/i915/i915_drv.h | 13 +++-- drivers/gpu/drm/i915/i915_gem.c | 5 +- drivers/gpu/drm/i915/i915_gem_gtt.c | 3 +- drivers/gpu/drm/i915/i915_gpu_error.c | 5 +- drivers/gpu/drm/i915/i915_irq.c | 9 +-- drivers/gpu/drm/i915/i915_pci.c | 3 +- drivers/gpu/drm/i915/i915_suspend.c | 2 +- drivers/gpu/drm/i915/i915_vma.c | 10 ++-- drivers/gpu/drm/i915/intel_device_info.h | 4 +- drivers/gpu/drm/i915/intel_pm.c | 7 ++- drivers/gpu/drm/i915/intel_runtime_pm.h | 3 +- 77 files changed, 94 insertions(+), 103 deletions(-) commit b78ea19ac22fd7b32d7828066cce3d8f2db5226a Author: Christoph Hellwig Date: Tue Jun 4 09:15:22 2019 +0200 x86/fpu: Simplify kernel_fpu_end() Remove two little helpers and merge them into kernel_fpu_end() to streamline the function. Signed-off-by: Christoph Hellwig Signed-off-by: Borislav Petkov Acked-by: Sebastian Andrzej Siewior Cc: Dave Hansen Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Nicolai Stange Cc: Rik van Riel Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/20190604071524.12835-2-hch@lst.de arch/x86/kernel/fpu/core.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) commit 02ae8ba9664081a74cafe6662e64b3d7b8b292e6 Author: Shashank Sharma Date: Wed Jun 12 12:15:00 2019 +0530 drm/i915/icl: Add Multi-segmented gamma support ICL introduces a new gamma correction mode in display engine, called multi-segmented-gamma mode. This mode allows users to program the darker region of the gamma curve with sueprfine precision. An example use case for this is HDR curves (like PQ ST-2084). If we plot a gamma correction curve from value range between 0.0 to 1.0, ICL's multi-segment has 3 different sections: - superfine segment: 9 values, ranges between 0 - 1/(128 * 256) - fine segment: 257 values, ranges between 0 - 1/(128) - corase segment: 257 values, ranges between 0 - 1 This patch: - Changes gamma LUTs size for ICL/GEN11 to 262144 entries (8 * 128 * 256), so that userspace can program with highest precision supported. - Changes default gamma mode (non-legacy) to multi-segmented-gamma mode. - Adds functions to program/detect multi-segment gamma. V2: Addressed review comments from Ville - separate function for superfine and fine segments. - remove enum for segments. - reuse last entry of the LUT as gc_max value. - replace if() ....cond with switch...case in icl_load_luts. - add an entry variable, instead of 'word' V3: Addressed review comments from Ville - extra newline - s/entry/color/ - remove LUT size checks - program ilk_lut_12p4_ldw value before ilk_lut_12p4_udw - Change the comments in description of fine and coarse segments, and try to make more sense. - use 8 * 128 instead of 1024 - add 1 entry in LUT for GCMAX V4: Addressed review comments from Ville - Remove unused macro - missing shift entry in blue - pick correct entry for GCMAX - Added Ville's R-B Note: Tested and confirmed the programming sequence of odd/even registers in the HW. The correct sequence should be: ilk_lut_12p4_udw ilk_lut_12p4_ldw v5: Addressed Ville's review comments and renamed odd/even register helpers to be more consistent with the values. Cc: Ville Syrjälä Cc: Maarten Lankhorst Cc: Daniel Vetter Reviewed-by: Ville Syrjälä Suggested-by: Ville Syrjälä Signed-off-by: Shashank Sharma Signed-off-by: Uma Shankar Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/1560321900-18318-5-git-send-email-uma.shankar@intel.com drivers/gpu/drm/i915/i915_pci.c | 2 +- drivers/gpu/drm/i915/intel_color.c | 126 +++++++++++++++++++++++++++++++++++-- 2 files changed, 123 insertions(+), 5 deletions(-) commit eec0778ec4215cfd276252f17c0eb1d51457643b Author: Shashank Sharma Date: Wed Jun 12 12:14:59 2019 +0530 drm/i915: Rename ivb_load_lut_10_max This patch renames function ivb_load_lut_10_max to ivb_load_lut_ext_max. V3: Added Vill'es r-b. Cc: Uma Shankar Suggested-by: Ville Syrjala Reviewed-by: Ville Syrjala Signed-off-by: Shashank Sharma Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/1560321900-18318-4-git-send-email-uma.shankar@intel.com drivers/gpu/drm/i915/intel_color.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 377c70edd486754020ac4375ab2c403ed5108907 Author: Uma Shankar Date: Wed Jun 12 12:14:58 2019 +0530 drm/i915/icl: Add register definitions for Multi Segmented gamma Add macros to define multi segmented gamma registers V2: Addressed Ville's comments: Add gen-lable before bit definition Addressed Jani's comment - Use REG_GENMASK() and REG_BIT() V3: Addressed Ville's comments: - Put comments at the end of line. - Change the comment at start of ICL multisegmented gamma registers. Added Ville's r-b Cc: Ville Syrjälä Cc: Jani Nikula Cc: Maarten Lankhorst Reviewed-by: Ville Syrjälä Signed-off-by: Uma Shankar Signed-off-by: Shashank Sharma Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/1560321900-18318-3-git-send-email-uma.shankar@intel.com drivers/gpu/drm/i915/i915_reg.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit 89a72304f2f3d4baf14e71c570ea4d99a00dae07 Author: Shashank Sharma Date: Wed Jun 12 12:14:57 2019 +0530 drm/i915: Change gamma/degamma_lut_size data type to u32 Currently, data type of gamma_lut_size & degamma_lut_size elements in intel_device_info is u16, which means it can accommodate maximum 64k values. In case of ICL multisegmented gamma, the size of gamma LUT is 256K. This patch changes the data type of both of these elements to u32. Cc: Ville Syrjälä Cc: Maarten Lankhorst Cc: Uma Shankar V4: Added Uma's r-b. Reviewed-by: Uma Shankar Signed-off-by: Shashank Sharma Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/1560321900-18318-2-git-send-email-uma.shankar@intel.com drivers/gpu/drm/i915/intel_device_info.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 83766cdef332b46a467b7fc97d6ffae7c1694d48 Author: Maarten Lankhorst Date: Tue Jun 11 15:28:20 2019 +0200 drm/i915: Nuke atomic set/get prop plane stubs They have been unused since rotation was added to drm core in 2015, time to get rid of them. Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20190611132820.31981-1-maarten.lankhorst@linux.intel.com Reviewed-by: Ville Syrjälä drivers/gpu/drm/i915/intel_atomic_plane.c | 45 ------------------------------- drivers/gpu/drm/i915/intel_atomic_plane.h | 8 ------ drivers/gpu/drm/i915/intel_display.c | 6 ----- drivers/gpu/drm/i915/intel_sprite.c | 8 ------ 4 files changed, 67 deletions(-) commit 379bc100232acd45b19421bd0748f9f549da8a8a Author: Jani Nikula Date: Thu Jun 13 11:44:15 2019 +0300 drm/i915: move modesetting output/encoder code under display/ Add a new subdirectory for display code, and start off by moving modesetting output/encoder code. Judging by the include changes, this is a surprisingly clean operation. v2: - move intel_sdvo_regs.h too - use tabs for Makefile file lists and sort them Cc: Chris Wilson Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Ville Syrjälä Reviewed-by: Chris Wilson Acked-by: Rodrigo Vivi Acked-by: Maarten Lankhorst Acked-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190613084416.6794-2-jani.nikula@intel.com drivers/gpu/drm/i915/Makefile | 56 +++++++++++----------- drivers/gpu/drm/i915/Makefile.header-test | 19 -------- drivers/gpu/drm/i915/display/Makefile | 2 + drivers/gpu/drm/i915/display/Makefile.header-test | 16 +++++++ drivers/gpu/drm/i915/{ => display}/dvo_ch7017.c | 0 drivers/gpu/drm/i915/{ => display}/dvo_ch7xxx.c | 0 drivers/gpu/drm/i915/{ => display}/dvo_ivch.c | 0 drivers/gpu/drm/i915/{ => display}/dvo_ns2501.c | 0 drivers/gpu/drm/i915/{ => display}/dvo_sil164.c | 0 drivers/gpu/drm/i915/{ => display}/dvo_tfp410.c | 0 drivers/gpu/drm/i915/{ => display}/icl_dsi.c | 0 drivers/gpu/drm/i915/{ => display}/intel_crt.c | 0 drivers/gpu/drm/i915/{ => display}/intel_crt.h | 0 drivers/gpu/drm/i915/{ => display}/intel_ddi.c | 0 drivers/gpu/drm/i915/{ => display}/intel_ddi.h | 0 drivers/gpu/drm/i915/{ => display}/intel_dp.c | 0 drivers/gpu/drm/i915/{ => display}/intel_dp.h | 0 .../i915/{ => display}/intel_dp_aux_backlight.c | 0 .../i915/{ => display}/intel_dp_aux_backlight.h | 0 .../i915/{ => display}/intel_dp_link_training.c | 0 .../i915/{ => display}/intel_dp_link_training.h | 0 drivers/gpu/drm/i915/{ => display}/intel_dp_mst.c | 0 drivers/gpu/drm/i915/{ => display}/intel_dp_mst.h | 0 drivers/gpu/drm/i915/{ => display}/intel_dsi.c | 0 drivers/gpu/drm/i915/{ => display}/intel_dsi.h | 0 .../i915/{ => display}/intel_dsi_dcs_backlight.c | 0 .../i915/{ => display}/intel_dsi_dcs_backlight.h | 0 drivers/gpu/drm/i915/{ => display}/intel_dsi_vbt.c | 0 drivers/gpu/drm/i915/{ => display}/intel_dvo.c | 0 drivers/gpu/drm/i915/{ => display}/intel_dvo.h | 0 drivers/gpu/drm/i915/{ => display}/intel_dvo_dev.h | 0 drivers/gpu/drm/i915/{ => display}/intel_gmbus.c | 0 drivers/gpu/drm/i915/{ => display}/intel_gmbus.h | 0 drivers/gpu/drm/i915/{ => display}/intel_hdmi.c | 0 drivers/gpu/drm/i915/{ => display}/intel_hdmi.h | 0 drivers/gpu/drm/i915/{ => display}/intel_lspcon.c | 0 drivers/gpu/drm/i915/{ => display}/intel_lspcon.h | 0 drivers/gpu/drm/i915/{ => display}/intel_lvds.c | 0 drivers/gpu/drm/i915/{ => display}/intel_lvds.h | 0 drivers/gpu/drm/i915/{ => display}/intel_panel.c | 0 drivers/gpu/drm/i915/{ => display}/intel_panel.h | 0 drivers/gpu/drm/i915/{ => display}/intel_sdvo.c | 0 drivers/gpu/drm/i915/{ => display}/intel_sdvo.h | 0 .../gpu/drm/i915/{ => display}/intel_sdvo_regs.h | 0 drivers/gpu/drm/i915/{ => display}/intel_tv.c | 0 drivers/gpu/drm/i915/{ => display}/intel_tv.h | 0 drivers/gpu/drm/i915/{ => display}/intel_vdsc.c | 0 drivers/gpu/drm/i915/{ => display}/intel_vdsc.h | 0 drivers/gpu/drm/i915/{ => display}/vlv_dsi.c | 0 drivers/gpu/drm/i915/{ => display}/vlv_dsi_pll.c | 0 drivers/gpu/drm/i915/i915_debugfs.c | 5 +- drivers/gpu/drm/i915/i915_drv.c | 5 +- drivers/gpu/drm/i915/i915_suspend.c | 3 +- drivers/gpu/drm/i915/intel_bios.c | 3 +- drivers/gpu/drm/i915/intel_connector.c | 3 +- drivers/gpu/drm/i915/intel_display.c | 23 ++++----- drivers/gpu/drm/i915/intel_display_power.c | 5 +- drivers/gpu/drm/i915/intel_dpio_phy.c | 3 +- drivers/gpu/drm/i915/intel_frontbuffer.c | 3 +- drivers/gpu/drm/i915/intel_opregion.c | 3 +- drivers/gpu/drm/i915/intel_psr.c | 3 +- 61 files changed, 82 insertions(+), 70 deletions(-) commit ca851bae0f525ba5a9f75b1644acccb57f88aabf Author: Jani Nikula Date: Thu Jun 13 13:08:18 2019 +0300 drm/i915: make intel_sdvo_regs.h self-contained Ensure intel_sdvo_regs.h is self-contained and remains that way. v2: - include for __packed (Chris) Cc: Chris Wilson Reviewed-by: Chris Wilson Acked-by: Maarten Lankhorst Acked-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190613100818.24800-1-jani.nikula@intel.com drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/intel_sdvo_regs.h | 8 ++++++++ 2 files changed, 9 insertions(+) commit f5500f385ba344d24468c086eb9c50f5ef4f1419 Merge: 527e4ca3b6d1 2454fcea338a Author: Maarten Lankhorst Date: Mon Jun 17 10:17:38 2019 +0200 Merge remote-tracking branch 'drm/drm-next' into drm-misc-next Pick up rc3 and rc4 and the merges from the other branches, we're a bit out of date. Signed-off-by: Maarten Lankhorst commit 734d277f412ae9e6ea9f2ee7a6b5f1b3deadf2fc Author: Fabrizio Castro Date: Tue Jun 11 14:06:37 2019 +0100 arm64: dts: renesas: hihope-common: Add USB 2.0 support Add USB 2.0 support to the HiHope RZ/G2M. Signed-off-by: Fabrizio Castro Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/hihope-common.dtsi | 76 ++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) commit a573cb676d54ce314f58e129f8d69ff09c9a92cf Author: Fabrizio Castro Date: Tue Jun 11 14:06:36 2019 +0100 arm64: dts: renesas: r8a774a1: Fix USB 2.0 clocks Similarly to what done for the r8a7796 with commit 737e05bf034e ("arm64: dts: renesas: revise properties for R-Car Gen3 SoCs' usb 2.0"), this patch lists the clock for the USB High-Speed Module (HS-USB) with the USB2.0 Host (EHCI/OHCI) IP DT node, and it lists the clock for the USB2.0 Host IP with the HS-USB module DT node. Fixes: 4c2c2fb99876 ("arm64: dts: renesas: r8a774a1: Add USB2.0 phy and host(EHCI/OHCI) device nodes") Fixes: ed898d4fc19d ("arm64: dts: renesas: r8a774a1: Add USB-DMAC and HSUSB device nodes") Signed-off-by: Fabrizio Castro Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a774a1.dtsi | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit ccaf591d6382a52472988645086a85884c8372ac Author: Yannick Fertré Date: Tue May 21 12:19:18 2019 +0200 ARM: dts: stm32: enable display on stm32mp157c-dk1 board Enable hdmi bridge sii9022 & display controller. Signed-off-by: Yannick Fertré Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp157a-dk1.dts | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit 7ee63bd74750a2c6fac31805ca0ac67f2522bfa5 Author: Keerthy Date: Wed Jun 12 20:16:20 2019 +0530 regulator: lp87565: Add 4-phase lp87561 regulator support The LP8756x family has a single output 4-phase regulator configuration. Add support for the same. The control lies in the master buck which is buck0 for 4-phase configuration. Enable/disable/voltage set happen via buck0 registers. Data Sheet: https://www.ti.com/lit/ds/symlink/lp87561-q1.pdf Signed-off-by: Keerthy Acked-by: Mark Brown Signed-off-by: Lee Jones drivers/regulator/lp87565-regulator.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit 013e868bc9465452c7b667830712ab57de236d08 Author: Keerthy Date: Wed May 15 15:38:47 2019 +0530 mfd: lp87565: Add support for 4-phase LP87561 combination Add support for 4-phase LP87561 combination. Data Sheet: https://www.ti.com/lit/ds/symlink/lp87561-q1.pdf Signed-off-by: Keerthy Signed-off-by: Lee Jones drivers/mfd/lp87565.c | 4 ++++ include/linux/mfd/lp87565.h | 2 ++ 2 files changed, 6 insertions(+) commit c88dd606a1cd9edeb6bb7e6f6a45e1248c3a6453 Author: Keerthy Date: Wed May 15 15:38:46 2019 +0530 dt-bindings: mfd: lp87565: Add LP87561 configuration lp87561 is a single output 4-phase regulator configuration. Add support for the same. Data Sheet: https://www.ti.com/lit/ds/symlink/lp87561-q1.pdf Signed-off-by: Keerthy Signed-off-by: Lee Jones Documentation/devicetree/bindings/mfd/lp87565.txt | 36 +++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit b03e5dcb942b332774cfd62735c137f62e5bb360 Author: Max Filippov Date: Sun Jun 16 22:06:19 2019 -0700 xtensa: use generic pcibios_set_master and pcibios_enable_device Both functions don't do anything xtensa-specific and there are generic implementations for both. Drop both and use generic versions. Signed-off-by: Max Filippov arch/xtensa/kernel/pci.c | 32 -------------------------------- 1 file changed, 32 deletions(-) commit 88804e680bac74114cecd2e565eef9a678daacd0 Author: Max Filippov Date: Mon Oct 15 12:33:51 2018 -0700 xtensa: drop dead PCI support code xtensa-specific PCI initialization code has significantly bitrotted over time because there's no platform that use it. Get rid of remaining non-functioning initialization and remove platform_pcibios_* interface. A new platform that would use PCI on xtensa will configure PCI controller using device tree. Drop variables pci_ctrl_head, pci_bus_count and functions pcibios_init, pci_controller_apertures, platform_pcibios_init and platform_pcibios_fixup. Signed-off-by: Max Filippov arch/xtensa/include/asm/platform.h | 10 ----- arch/xtensa/kernel/pci.c | 91 -------------------------------------- arch/xtensa/kernel/platform.c | 2 - arch/xtensa/kernel/setup.c | 4 -- 4 files changed, 107 deletions(-) commit 2a97d60cf6a53123f5a0f066b7b219410eccd0dc Author: Guenter Roeck Date: Sun Jun 16 07:12:01 2019 -0700 xtensa/PCI: Remove unused variable gcc reports: arch/xtensa/kernel/pci.c:40:32: warning: 'pci_ctrl_tail' defined but not used which is indeed the case. Signed-off-by: Guenter Roeck Message-Id: <1560694321-31380-1-git-send-email-linux@roeck-us.net> Signed-off-by: Max Filippov arch/xtensa/kernel/pci.c | 1 - 1 file changed, 1 deletion(-) commit 7bc93821a70adc621df443c8b7a4745023c36e7c Author: Takashi Sakamoto Date: Sat Jun 15 18:11:01 2019 +0900 ALSA: firewire-lib: split allocation of isochronous resources from establishment of connection In current implementation, establishment connection corresponds to allocation of isochronous resources. Although this is an ideal implementation of CMP described in IEC 61883-1, it's not enough efficient to recover PCM substream multiplexed in packet streaming. The packet streaming can always restart on the same allocated isochronous resources even if the previous packet streaming corrupted. This commit splits allocation of isochronous resources from establishment of connection so that CMP runs with allocated isochronous resources. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/bebob/bebob_stream.c | 30 ++++++++---- sound/firewire/cmp.c | 74 +++++++++++++++++------------ sound/firewire/cmp.h | 7 ++- sound/firewire/fireworks/fireworks_stream.c | 22 +++++++-- sound/firewire/oxfw/oxfw-stream.c | 18 +++++-- 5 files changed, 100 insertions(+), 51 deletions(-) commit c6b84ffbd5e78d6cf4aaafe5502e1bc99eb9657c Author: Takashi Sakamoto Date: Sat Jun 15 18:11:00 2019 +0900 ALSA: fireworks: change the range of critical section for stream data in PCM.hw_free callback The operation of duplex streams should be in critical section. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/fireworks/fireworks_pcm.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit d173265ae36f8f6f76a507e2f529c351671269c0 Author: Takashi Sakamoto Date: Sat Jun 15 18:10:59 2019 +0900 ALSA: bebob: code refactoring for error path to start duplex stream This commit removes useless procedures to stop packet streaming. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/bebob/bebob_stream.c | 2 -- 1 file changed, 2 deletions(-) commit 5e818ac21f9d48a52955e68b96148a3b18f60c09 Author: Takashi Sakamoto Date: Sat Jun 15 18:10:58 2019 +0900 ALSA: bebob: change the range of critical section for stream data in PCM.hw_free callback The operation of duplex streams should be in critical section. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/bebob/bebob_pcm.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 73f7864eb5f00cc1a7a3936b5f7b170886851874 Author: Takashi Sakamoto Date: Sat Jun 15 18:10:57 2019 +0900 ALSA: bebob: code refactoring for callback function to rawmidi interface The pairs of rawmidi.hw_params callback functions and .hw_free callback functions for both direction have no differences. This commit unifies the pairs. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/bebob/bebob_midi.c | 47 +++++---------------------------------- 1 file changed, 6 insertions(+), 41 deletions(-) commit f69fc17947f1035459ebc55bc24f9b805dffba3d Author: Takashi Sakamoto Date: Sat Jun 15 18:10:56 2019 +0900 ALSA: bebob: code rafactoring for callback functions to PCM interface The pairs of pcm.hw_params callback functions and .hw_free callback functions for both direction have no differences. This commit unifies the pairs. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/bebob/bebob_pcm.c | 55 +++++----------------------------------- 1 file changed, 7 insertions(+), 48 deletions(-) commit 2498f8c1c668fe8416e645f50a634f71df49f8bb Author: David Brown Date: Wed Jun 12 10:12:39 2019 -0600 MAINTAINERS: Remove myself as qcom maintainer I no longer regularly work on this platform, and only have a few increasingly outdated boards. Andy has primarily been doing the maintenance. Signed-off-by: David Brown Signed-off-by: Andy Gross MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit cd7ea582866f43324f3d60f0d4daac05e08f0f41 Author: Rajendra Nayak Date: Wed Mar 20 15:19:09 2019 +0530 opp: Make dev_pm_opp_set_rate() handle freq = 0 to drop performance votes For devices with performance state, we use dev_pm_opp_set_rate() to set the appropriate clk rate and the performance state. We do need a way to remove the performance state vote when we idle the device and turn the clocks off. Use dev_pm_opp_set_rate() with freq = 0 to achieve this. Signed-off-by: Rajendra Nayak Signed-off-by: Stephen Boyd [ Viresh: Updated _set_required_opps() to handle the !opp case ] Signed-off-by: Viresh Kumar drivers/opp/core.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit b3e3759ee4abd72bedbf4b109ff1749d3aea6f21 Author: Stephen Boyd Date: Wed Mar 20 15:19:08 2019 +0530 opp: Don't overwrite rounded clk rate The OPP table normally contains 'fmax' values corresponding to the voltage or performance levels of each OPP, but we don't necessarily want all the devices to run at fmax all the time. Running at fmax makes sense for devices like CPU/GPU, which have a finite amount of work to do and since a specific amount of energy is consumed at an OPP, its better to run at the highest possible frequency for that voltage value. On the other hand, we have IO devices which need to run at specific frequencies only for their proper functioning, instead of maximum possible frequency. The OPP core currently roundup to the next possible OPP for a frequency and select the fmax value. To support the IO devices by the OPP core, lets do the roundup to fetch the voltage or performance state values, but not use the OPP frequency value. Rather use the value returned by clk_round_rate(). The current user, cpufreq, of dev_pm_opp_set_rate() already does the rounding to the next OPP before calling this routine and it won't have any side affects because of this change. Signed-off-by: Stephen Boyd Signed-off-by: Rajendra Nayak [ Viresh: Massaged changelog, added comment and use temp_opp variable instead ] Signed-off-by: Viresh Kumar drivers/opp/core.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit e4272af4247f86ffe65a00619f9d9e8dea496b1d Author: Vijay Khemka Date: Thu May 30 13:36:51 2019 -0700 soc: aspeed: lpc-ctrl: make parameter optional Making memory-region and flash as optional parameter in device tree if user needs to use these parameter through ioctl then need to define in devicetree. Signed-off-by: Vijay Khemka Reviewed-by: Andrew Jeffery Signed-off-by: Joel Stanley drivers/soc/aspeed/aspeed-lpc-ctrl.c | 58 ++++++++++++++++++++++-------------- 1 file changed, 36 insertions(+), 22 deletions(-) commit f464100f576610aa4702dd9e168c80d6c661958a Author: Willem de Bruijn Date: Sun Jun 16 13:15:01 2019 -0400 selftests/net: fix warnings in TFO key rotation selftest One warning each on signedness, unused variable and return type. Fixes: 10fbcdd12aa2 ("selftests/net: add TFO key rotation selftest") Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller tools/testing/selftests/net/tcp_fastopen_backup_key.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 8e6a481739a840237ffda9bdc5d4a7ae722745d0 Author: Jeremy Sowden Date: Sun Jun 16 11:43:32 2019 +0100 x25_asy: fixed function name in error message. Replaced incorrect hard-coded function-name in error message with __func__. Signed-off-by: Jeremy Sowden Signed-off-by: David S. Miller drivers/net/wan/x25_asy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4201c9260a8d3c4ef238e51692a7e9b4e1e29efe Author: Jeremy Sowden Date: Sun Jun 16 11:41:59 2019 +0100 lapb: moved export of lapb_register. The EXPORT_SYMBOL for lapb_register was next to a different function. Moved it to the right place. Signed-off-by: Jeremy Sowden Signed-off-by: David S. Miller net/lapb/lapb_iface.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 1718132587e8c73c9a6fd7cfbf0fa9f14559c134 Author: Roman Mashak Date: Sat Jun 15 16:25:50 2019 -0400 tc-tests: updated skbedit tests - Added index upper bound test case - Added mark upper bound test case - Re-worded descriptions to few cases for clarity Signed-off-by: Roman Mashak Signed-off-by: David S. Miller .../tc-testing/tc-tests/actions/skbedit.json | 62 ++++++++++++++++++---- 1 file changed, 53 insertions(+), 9 deletions(-) commit 92c1a19e2fb9dc3194de123009cd8d418f1e2a3b Author: Roman Mashak Date: Sat Jun 15 15:41:43 2019 -0400 tc-tests: added path to ip command in tdc This macro $IP will be used in upcoming tc tests, which require to create interfaces etc. Signed-off-by: Roman Mashak Signed-off-by: David S. Miller tools/testing/selftests/tc-testing/tdc_config.py | 2 ++ 1 file changed, 2 insertions(+) commit 871e846585919adf727f21398f433fd424b6f0e1 Author: Ivan Khoronzhuk Date: Sat Jun 15 14:01:32 2019 +0300 net: ethernet: ti: davinci_cpdma: use idled submit While data pass suspend, reuse of rx descriptors can be disabled using channel state & lock from cpdma layer. For this, submit to a channel has to be disabled using state != "not active" under lock, what is done with this patch. The same submit is used to fill rx channel while ndo_open, when channel is idled, so add idled submit routine that allows to prepare descs for the channel. All this simplifies code and helps to avoid dormant mode usage and send packets only to active channels, avoiding potential race in later on changes. Also add missed sync barrier analogically like in other places after stopping tx queues. Signed-off-by: Ivan Khoronzhuk Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 15 +++--- drivers/net/ethernet/ti/cpsw_ethtool.c | 12 ++--- drivers/net/ethernet/ti/davinci_cpdma.c | 85 +++++++++++++++++++++++++-------- drivers/net/ethernet/ti/davinci_cpdma.h | 2 + drivers/net/ethernet/ti/davinci_emac.c | 4 +- 5 files changed, 77 insertions(+), 41 deletions(-) commit 4e18a8a149d5577a171ddc5fe80cc715041b193d Merge: a51486266c3b fead5b1b5838 Author: David S. Miller Date: Sun Jun 16 13:53:41 2019 -0700 Merge branch 'stmmac-cleanups-for-stmmac_mdio_reset' Martin Blumenstingl says: ==================== stmmac: cleanups for stmmac_mdio_reset This is a successor to my previous series "stmmac: honor the GPIO flags for the PHY reset GPIO" from [0]. It contains only the "cleanup" patches from that series plus some additional cleanups on top. I broke out the actual GPIO flag handling into a separate patch which is already part of net-next: "net: stmmac: use GPIO descriptors in stmmac_mdio_reset" from [1] I have build and runtime tested this on my ARM Meson8b Odroid-C1. [0] https://patchwork.kernel.org/cover/10983801/ [1] https://patchwork.ozlabs.org/patch/1114798/ ==================== Signed-off-by: David S. Miller commit fead5b1b5838ba2f231d76e1b8ed31a4e9449382 Author: Martin Blumenstingl Date: Sat Jun 15 12:09:32 2019 +0200 net: stmmac: drop the phy_reset hook from struct stmmac_mdio_bus_data The phy_reset hook is not set anywhere. Drop it to make stmmac_mdio_reset() smaller. Signed-off-by: Martin Blumenstingl Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 6 ------ include/linux/stmmac.h | 1 - 2 files changed, 7 deletions(-) commit ce4ab73ab0c27c6a3853695aa8ec0f453c6329cd Author: Martin Blumenstingl Date: Sat Jun 15 12:09:31 2019 +0200 net: stmmac: drop the reset delays from struct stmmac_mdio_bus_data Only OF platforms use the reset delays and these delays are only read in stmmac_mdio_reset(). Move them from struct stmmac_mdio_bus_data to a stack variable inside stmmac_mdio_reset() because that's the only usage of these delays. Signed-off-by: Martin Blumenstingl Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 15 ++++++++------- include/linux/stmmac.h | 3 --- 2 files changed, 8 insertions(+), 10 deletions(-) commit 7e770b252a62e7498cfa9411018100fd86e56d47 Author: Martin Blumenstingl Date: Sat Jun 15 12:09:30 2019 +0200 net: stmmac: drop the reset GPIO from struct stmmac_mdio_bus_data No platform uses the "reset_gpio" field from stmmac_mdio_bus_data anymore. Drop it so we don't get any new consumers either. Plain GPIO numbers are being deprecated in favor of GPIO descriptors. If needed any new non-OF platform can add a GPIO descriptor lookup table. devm_gpiod_get_optional() will find the GPIO in that case. Suggested-by: Linus Walleij Signed-off-by: Martin Blumenstingl Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 29 +++++++---------------- include/linux/stmmac.h | 1 - 2 files changed, 9 insertions(+), 21 deletions(-) commit 42a90766fe1ff438b2af26a94bb8395c405f684b Author: Martin Blumenstingl Date: Sat Jun 15 12:09:29 2019 +0200 net: stmmac: use device_property_read_u32_array to read the reset delays Change stmmac_mdio_reset() to use device_property_read_u32_array() instead of of_property_read_u32_array(). This is meant as a cleanup because we can drop the struct device_node variable. Also it will make it easier to get rid of struct stmmac_mdio_bus_data (or at least make it private) in the future because non-OF platforms can now pass the reset delays as device properties. No functional changes (neither for OF platforms nor for ones that are not using OF, because the modified code is still contained in an "if (priv->device->of_node)"). Signed-off-by: Martin Blumenstingl Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 626c5fe423c2bc9b88cc07549626b94bcde05c9f Author: Martin Blumenstingl Date: Sat Jun 15 12:09:28 2019 +0200 net: stmmac: drop redundant check in stmmac_mdio_reset A simplified version of the existing code looks like this: if (priv->device->of_node) { struct device_node *np = priv->device->of_node; if (!np) return 0; The second "if" never evaluates to true because the first "if" checks for exactly the opposite. Drop the redundant check and early return to make the code easier to understand. No functional changes intended. Signed-off-by: Martin Blumenstingl Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 3 --- 1 file changed, 3 deletions(-) commit 748b170ca19ab67b891279cce258d1defe73c5ab Author: Thomas Gleixner Date: Sun Jun 16 15:41:24 2019 +0200 x86/apic: Make apic_bsp_setup() static No user outside of apic.c. Remove the stale and bogus function comment while at it. Signed-off-by: Thomas Gleixner arch/x86/include/asm/apic.h | 1 - arch/x86/kernel/apic/apic.c | 7 +++---- 2 files changed, 3 insertions(+), 5 deletions(-) commit 817bbbb7749decb99262dc3bb1569a579eea5ba8 Author: Brian Masney Date: Sun Jun 2 21:04:55 2019 -0400 ARM: qcom_defconfig: add support for USB networking Add support for USB networking as a module to qcom_defconfig since its a useful feature to have for development purposes. Signed-off-by: Brian Masney Signed-off-by: Bjorn Andersson arch/arm/configs/qcom_defconfig | 1 + 1 file changed, 1 insertion(+) commit ef7a5baf64ce83c04b2ced044ded31528820fef7 Author: Brian Masney Date: Fri May 31 05:46:16 2019 -0400 ARM: qcom_defconfig: add display-related options Add the CMA (Contiguous Memory Allocator) for the MSM DRM/KMS driver, the simple panel, and the TI LM3630A driver in order to support the display on the LG Nexus 5 (hammerhead) phone. Signed-off-by: Brian Masney Reviewed-by: Linus Walleij Signed-off-by: Bjorn Andersson arch/arm/configs/qcom_defconfig | 5 +++++ 1 file changed, 5 insertions(+) commit 489bacb29818865d2db63d4800f4ddff56929031 Author: Brian Masney Date: Fri May 31 05:46:19 2019 -0400 ARM: dts: qcom: msm8974-hammerhead: add support for display Add initial support for the display found on the LG Nexus 5 (hammerhead) phone. This is based on work from Jonathan Marek. Signed-off-by: Brian Masney Signed-off-by: Bjorn Andersson .../dts/qcom-msm8974-lge-nexus5-hammerhead.dts | 58 ++++++++++++++++++++++ 1 file changed, 58 insertions(+) commit 5a9fc531f6ecc987980fdd025928790c5db5f48a Author: Brian Masney Date: Fri May 31 05:46:18 2019 -0400 ARM: dts: msm8974: add display support Add the MDP5, DSI and DSI PHY blocks for the display found on the msm8974 SoCs. This is based on work from msm8916.dtsi and Jonathan Marek. Signed-off-by: Brian Masney Reviewed-by: Linus Walleij Signed-off-by: Bjorn Andersson arch/arm/boot/dts/qcom-msm8974.dtsi | 132 ++++++++++++++++++++++++++++++++++++ 1 file changed, 132 insertions(+) commit 030b6d48ebfb8d45f397aa13da712210c9803042 Author: Brian Masney Date: Fri May 31 05:46:17 2019 -0400 ARM: dts: qcom: msm8974-hammerhead: add support for backlight Add necessary device tree nodes for the main LCD backlight. Signed-off-by: Brian Masney Reviewed-by: Linus Walleij Signed-off-by: Bjorn Andersson .../dts/qcom-msm8974-lge-nexus5-hammerhead.dts | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit 48100d10c93fe3df6e1f4ea77888985d054f25d8 Author: Jonathan Marek Date: Sun Jun 2 21:04:54 2019 -0400 ARM: dts: qcom: msm8974-hammerhead: add touchscreen support Add support for the Synaptics RMI4 touchscreen that is found on the Nexus 5. Reviewed-by: Linus Walleij Signed-off-by: Jonathan Marek Signed-off-by: Brian Masney Signed-off-by: Bjorn Andersson .../dts/qcom-msm8974-lge-nexus5-hammerhead.dts | 64 ++++++++++++++++++++++ 1 file changed, 64 insertions(+) commit 3c23e9e8085308d7d960b920af145938a103ddc5 Author: Beniamin Bia Date: Mon May 27 15:56:48 2019 +0300 iio: adc: ad7606: Add software configuration Because this driver will support multiple configurations for software, the software configuration was made generic. Signed-off-by: Beniamin Bia Signed-off-by: Jonathan Cameron drivers/iio/adc/ad7606.c | 40 +++++++++++++++++++++++++++++++++++++--- drivers/iio/adc/ad7606.h | 2 ++ 2 files changed, 39 insertions(+), 3 deletions(-) commit 88dd03135063b0f60efda064f7ecccdef57b0634 Author: Beniamin Bia Date: Mon May 27 15:56:47 2019 +0300 iio: adc: ad7606: Move oversampling and scale options to chip info The device dependent options which are going to be different for devices which will be supported in the future by this driver, were moved in chip info for a more generic driver. This patch allows supporting more devices by the driver. Also, it is an intermediate step of adding support for ad7616 in software mode. Signed-off-by: Beniamin Bia Signed-off-by: Jonathan Cameron drivers/iio/adc/ad7606.c | 61 ++++++++++++++++++++++++++++++++++-------------- drivers/iio/adc/ad7606.h | 15 +++++++++++- 2 files changed, 58 insertions(+), 18 deletions(-) commit 47dd8378f953152944b651df92e5f2c7ebb6729c Author: Neil Armstrong Date: Mon May 27 15:43:14 2019 +0200 iio: adc: meson_saradc: update with SPDX Licence identifier Signed-off-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Signed-off-by: Jonathan Cameron drivers/iio/adc/meson_saradc.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit d4e96de0f45f51b51116825e41b75cea259251ee Author: Renato Lui Geh Date: Fri May 24 22:26:55 2019 -0300 MAINTAINERS: add entry for ad7780 adc driver This patch adds a MAINTAINERS entry for the AD7780 ADC driver. Signed-off-by: Renato Lui Geh Signed-off-by: Jonathan Cameron MAINTAINERS | 9 +++++++++ 1 file changed, 9 insertions(+) commit 8f69a686e2355c03d4e36e9b4c71f9580bf6aa47 Author: Renato Lui Geh Date: Fri May 24 22:26:30 2019 -0300 dt-bindings: iio: adc: add adi,ad7780.yaml binding This patch adds a YAML binding for the Analog Devices AD7780/1 and AD7170/1 analog-to-digital converters. Signed-off-by: Renato Lui Geh Acked-by: Michael Hennerich Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron .../devicetree/bindings/iio/adc/adi,ad7780.txt | 48 ------------ .../devicetree/bindings/iio/adc/adi,ad7780.yaml | 87 ++++++++++++++++++++++ 2 files changed, 87 insertions(+), 48 deletions(-) commit 4a0ce7764b09044fdb5f92dcf03ec5d8657296f4 Author: Tomer Tayar Date: Sun Jun 16 13:48:29 2019 +0000 habanalabs: Allow accessing host mapped addresses via debugfs Allows using the addr/data32 debugfs nodes to access a device VA of a host mapped memory when the IOMMU is disabled. Due to the possible large amount of a user host mapped memory, the driver doesn't maintain a database with the host addresses per device VA. When the IOMMU is disabled, this missing info is being overcome by simply using phys_to_virt(). However, this is not useful when the IOMMU is enabled, and thus the enforced limitation. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay .../ABI/testing/debugfs-driver-habanalabs | 11 +++++-- drivers/misc/habanalabs/debugfs.c | 35 ++++++++++++++-------- drivers/misc/habanalabs/goya/goya.c | 19 +++++++++--- 3 files changed, 46 insertions(+), 19 deletions(-) commit 527e4ca3b6d13c62340d7a8e2ac3d24800f72f4b Author: Douglas Anderson Date: Fri Jun 14 15:47:30 2019 -0700 drm/rockchip: Base adjustments of the mode based on prev adjustments In vop_crtc_mode_fixup() we fixup the mode to show what we actually will be able to achieve. However we should base our adjustments on any previous adjustments that were made. As an example, the dw_hdmi driver may wish to make some small adjustments to clock rates in its atomic_check() function. If it does, it will update the adjusted_mode. We shouldn't throw away those adjustments. NOTE: the version of the dw_hdmi driver upstream doesn't _actually_ make such adjustments, but downstream in Chrome OS it does. It is plausible that one day we'll figure out how to cleanly make that happen in an upstream-friendly way, so we should prepare by using the right mode. Signed-off-by: Douglas Anderson Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20190614224730.98622-2-dianders@chromium.org drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 99b9683f2142b20bad78e61f7f829e8714e45685 Author: Douglas Anderson Date: Fri Jun 14 15:47:29 2019 -0700 drm/rockchip: Properly adjust to a true clock in adjusted_mode When fixing up the clock in vop_crtc_mode_fixup() we're not doing it quite correctly. Specifically if we've got the true clock 266666667 Hz, we'll perform this calculation: 266666667 / 1000 => 266666 Later when we try to set the clock we'll do clk_set_rate(266666 * 1000). The common clock framework won't actually pick the proper clock in this case since it always wants clocks <= the specified one. Let's solve this by using DIV_ROUND_UP. Fixes: b59b8de31497 ("drm/rockchip: return a true clock rate to adjusted_mode") Signed-off-by: Douglas Anderson Signed-off-by: Sean Paul Reviewed-by: Yakir Yang Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20190614224730.98622-1-dianders@chromium.org drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 82b11f071936a11094e1c44730030cd3d894e0b4 Author: Maor Gottlieb Date: Wed Jun 12 15:20:12 2019 +0300 net/mlx5: Expose eswitch encap mode Add API to get the current Eswitch encap mode. It will be used in downstream patches to check if flow table can be created with encap support or not. Signed-off-by: Maor Gottlieb Reviewed-by: Petr Vorel Signed-off-by: Leon Romanovsky Reviewed-by: Parav Pandit drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 11 +++++++++++ include/linux/mlx5/eswitch.h | 12 ++++++++++++ 2 files changed, 23 insertions(+) commit 98fdbea550378e0153092bce21261df86a8ccc57 Author: Leon Romanovsky Date: Wed Jun 12 15:20:11 2019 +0300 net/mlx5: Declare more strictly devlink encap mode Devlink has UAPI declaration for encap mode, so there is no need to be loose on the data get/set by drivers. Update call sites to use enum devlink_eswitch_encap_mode instead of plain u8. Suggested-by: Parav Pandit Signed-off-by: Leon Romanovsky Acked-by: Jiri Pirko Reviewed-by: Parav Pandit Reviewed-by: Petr Vorel drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 8 +++++--- drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 6 ++++-- include/net/devlink.h | 6 ++++-- net/core/devlink.c | 6 ++++-- 4 files changed, 17 insertions(+), 9 deletions(-) commit a51486266c3ba8e035a47fa96df67f274fe0c7d0 Author: Jiri Pirko Date: Sat Jun 15 11:03:49 2019 +0200 net: sched: remove NET_CLS_IND config option This config option makes only couple of lines optional. Two small helpers and an int in couple of cls structs. Remove the config option and always compile this in. This saves the user from unexpected surprises when he adds a filter with ingress device match which is silently ignored in case the config option is not set. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller arch/mips/configs/malta_defconfig | 1 - arch/mips/configs/malta_kvm_defconfig | 1 - arch/mips/configs/malta_kvm_guest_defconfig | 1 - arch/mips/configs/malta_qemu_32r6_defconfig | 1 - arch/mips/configs/maltaaprp_defconfig | 1 - arch/mips/configs/maltasmvp_defconfig | 1 - arch/mips/configs/maltasmvp_eva_defconfig | 1 - arch/mips/configs/maltaup_defconfig | 1 - arch/mips/configs/maltaup_xpa_defconfig | 1 - arch/mips/configs/rb532_defconfig | 1 - arch/powerpc/configs/ppc6xx_defconfig | 1 - arch/sh/configs/se7712_defconfig | 1 - arch/sh/configs/se7721_defconfig | 1 - arch/sh/configs/titan_defconfig | 1 - include/net/pkt_cls.h | 5 +---- include/uapi/linux/pkt_cls.h | 2 +- net/sched/Kconfig | 8 -------- net/sched/cls_flower.c | 3 +-- net/sched/cls_fw.c | 13 ------------- net/sched/cls_u32.c | 15 --------------- tools/include/uapi/linux/pkt_cls.h | 2 +- tools/testing/selftests/tc-testing/config | 1 - 22 files changed, 4 insertions(+), 59 deletions(-) commit 9d9f3fba4c46a88d51cd3be580419b52e0d74c6d Author: Heiner Kallweit Date: Sat Jun 15 09:58:21 2019 +0200 r8169: improve handling of Abit Fatal1ty F-190HD The Abit Fatal1ty F-190HD has a PCI ID quirk and the entry marks this board as not GBit-capable, what is wrong. According to [0] the board has a RTL8111B that is GBit-capable, therefore remove the RTL_CFG_NO_GBIT flag. [0] https://www.centos.org/forums/viewtopic.php?t=23390 Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169_main.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 4838a54050284daac15dfeb1d65677e4dacf1bf5 Author: Jose Abreu Date: Fri Jun 14 17:06:57 2019 +0200 net: stmmac: Fix wrapper drivers not detecting PHY Because of PHYLINK conversion we stopped parsing the phy-handle property from DT. Unfortunatelly, some wrapper drivers still rely on this phy node to configure the PHY. Let's restore the parsing of PHY handle while these wrapper drivers are not fully converted to PHYLINK. Fixes: 74371272f97f ("net: stmmac: Convert to phylink and remove phylib logic") Reported-by: Corentin Labbe Signed-off-by: Jose Abreu Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Tested-by: Corentin Labbe Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ++-- drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 9 ++++++++- include/linux/stmmac.h | 1 + 3 files changed, 11 insertions(+), 3 deletions(-) commit 91d0a48a480a29257e9a787ca73dc62e85bfeb72 Merge: 930cfe0f129d 28c67157e637 Author: David S. Miller Date: Sat Jun 15 13:43:07 2019 -0700 Merge branch 'Reuse-ptp_qoriq-driver-for-dpaa2-ptp' Yangbo Lu says: ==================== Reuse ptp_qoriq driver for dpaa2-ptp Although dpaa2-ptp.c driver is a fsl_mc_driver which is using MC APIs for register accessing, it's same IP block with eTSEC/DPAA/ENETC 1588 timer. This patch-set is to convert to reuse ptp_qoriq driver by using register ioremap and dropping related MC APIs. However the interrupts could only be handled by MC which fires MSIs to ARM cores. So the interrupt enabling and handling still rely on MC APIs. MC APIs for interrupt and PPS event support are also added by this patch-set. --- Changes for v2: - Allowed to compile with COMPILE_TEST. ==================== Signed-off-by: David S. Miller commit 28c67157e637f376c61ecf0a3e6a21efeeb34e3c Author: Yangbo Lu Date: Fri Jun 14 18:40:55 2019 +0800 MAINTAINERS: maintain DPAA2 PTP driver in QorIQ PTP entry Maintain DPAA2 PTP driver in QorIQ PTP entry. Signed-off-by: Yangbo Lu Signed-off-by: David S. Miller MAINTAINERS | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 8893a843b1ac2215f39940f96bd0a506791be0bc Author: Yangbo Lu Date: Fri Jun 14 18:40:54 2019 +0800 dpaa2-ptp: add interrupt support This patch is to add interrupt support for dpaa2 ptp clock, including MC APIs and PPS interrupt support. Other events haven't been supported in MC by now. Signed-off-by: Yangbo Lu Signed-off-by: David S. Miller drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp.c | 110 +++++++++++- drivers/net/ethernet/freescale/dpaa2/dprtc-cmd.h | 45 +++++ drivers/net/ethernet/freescale/dpaa2/dprtc.c | 219 +++++++++++++++++++++++ drivers/net/ethernet/freescale/dpaa2/dprtc.h | 44 +++++ 4 files changed, 417 insertions(+), 1 deletion(-) commit fe844f1936c9e28e89e545bb7d20cd94f8cf28af Author: Yangbo Lu Date: Fri Jun 14 18:40:53 2019 +0800 arm64: dts: fsl: add ptp timer node for dpaa2 platforms This patch is to add ptp timer device tree node for dpaa2 platforms(ls1088a/ls208xa/lx2160a). Signed-off-by: Yangbo Lu Signed-off-by: David S. Miller arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi | 8 ++++++++ arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi | 8 ++++++++ arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi | 8 ++++++++ 3 files changed, 24 insertions(+) commit d2563290dbe124afc3ac5cebeb0231dabe694845 Author: Yangbo Lu Date: Fri Jun 14 18:40:52 2019 +0800 dt-binding: ptp_qoriq: support DPAA2 PTP compatible Add a new compatible for DPAA2 PTP. Signed-off-by: Yangbo Lu Signed-off-by: David S. Miller Documentation/devicetree/bindings/ptp/ptp-qoriq.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d346c9e86d8685d7cdceddf5b2e9c4376334620c Author: Yangbo Lu Date: Fri Jun 14 18:40:51 2019 +0800 dpaa2-ptp: reuse ptp_qoriq driver Although dpaa2-ptp.c driver is a fsl_mc_driver which is using MC APIs for register accessing, it's same IP block with eTSEC/DPAA/ENETC 1588 timer. This patch is to convert to reuse ptp_qoriq driver by using register ioremap and dropping related MC APIs. However the interrupts could only be handled by MC which fires MSIs to ARM cores. So the interrupt enabling and handling still rely on MC APIs. Signed-off-by: Yangbo Lu Signed-off-by: David S. Miller drivers/net/ethernet/freescale/dpaa2/Kconfig | 3 +- drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp.c | 160 +++++------------------ drivers/net/ethernet/freescale/dpaa2/dprtc-cmd.h | 13 -- drivers/net/ethernet/freescale/dpaa2/dprtc.c | 120 ----------------- drivers/net/ethernet/freescale/dpaa2/dprtc.h | 20 --- 5 files changed, 34 insertions(+), 282 deletions(-) commit 8099d7ca6e7b76282fef7565877f5c8f02f8ef4f Author: Yangbo Lu Date: Fri Jun 14 18:40:50 2019 +0800 ptp: add QorIQ PTP support for DPAA2 This patch is to add QorIQ PTP support for DPAA2. Although dpaa2-ptp.c driver is a fsl_mc_driver which is using MC APIs for register accessing, it's same IP block with eTSEC/DPAA/ENETC 1588 timer. We will convert to reuse ptp_qoriq driver by using register ioremap and dropping related MC APIs. Also allow to compile ptp_qoriq with COMPILE_TEST. Signed-off-by: Yangbo Lu Signed-off-by: David S. Miller drivers/ptp/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 930cfe0f129d2e9fee8ed3e8488daee881aa31c5 Author: Christophe JAILLET Date: Thu Jun 13 21:54:12 2019 +0200 hinic: Use devm_kasprintf instead of hard coding it 'devm_kasprintf' is less verbose than: snprintf(NULL, 0, ...); devm_kzalloc(...); sprintf so use it instead. Signed-off-by: Christophe JAILLET Signed-off-by: Zhao Chen Signed-off-by: David S. Miller drivers/net/ethernet/huawei/hinic/hinic_rx.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 407308f60d46e50d258143f0bd38adc3f780908e Author: David S. Miller Date: Sat Jun 15 13:35:29 2019 -0700 Revert "net: dsa: mv88e6xxx: do not flood CPU with unknown multicast" This reverts commit 422efd032775757c41e9579facd9656a87bf4f00. It breaks ipv6. Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 422efd032775757c41e9579facd9656a87bf4f00 Author: Vivien Didelot Date: Wed Jun 12 18:33:44 2019 -0400 net: dsa: mv88e6xxx: do not flood CPU with unknown multicast The DSA ports must flood unknown unicast and multicast, but the switch must not flood the CPU ports with unknown multicast, as this results in a lot of undesirable traffic that the network stack needs to filter in software. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit faa398844161df4d1826cb2ffa828ff50de79441 Author: Hariprasad Kelam Date: Fri Jun 14 08:25:19 2019 +0530 staging: rtl8723bs: hal: sdio_halinit: fix Comparison to NULL This patch fixes below issue reported by checkpatch CHECK: Comparison to NULL could be written "psta" CHECK: Comparison to NULL could be written "psta" Signed-off-by: Hariprasad Kelam ----- changes in v2: Send proper patch with out corruption ---- Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/sdio_halinit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 639b6023beb433b7c2ae3e986cccd8348d6bb768 Author: Hariprasad Kelam Date: Fri Jun 14 08:24:59 2019 +0530 staging: rtl8723bs: hal: sdio_halinit: fix spaces preferred around that unary operator This patch fixes below issues reported by checkpatch CHECK: spaces preferred around that '+' (ctx:VxV) CHECK: spaces preferred around that '<<' (ctx:VxV) CHECK: spaces preferred around that '|' (ctx:VxV) Signed-off-by: Hariprasad Kelam ------ changes in v2: Send proper patch without corruption ---- Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/sdio_halinit.c | 90 ++++++++++++++-------------- 1 file changed, 45 insertions(+), 45 deletions(-) commit c11621ffd9a824bffbb33b2e09945bb5c68504bd Author: Hariprasad Kelam Date: Fri Jun 14 08:24:34 2019 +0530 staging: rtl8723bs: hal: sdio_halinit: fix comparison to true/false is error prone fix below issues reported by checkpatch CHECK: Using comparison to false is error prone CHECK: Using comparison to true is error prone Signed-off-by: Hariprasad Kelam ---- changes in v2: send proper patch without corruption ---- Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/sdio_halinit.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 0c3b9b7e19ecbebd1bce33f519e41fa5dba69eb4 Author: Simon Sandström Date: Thu Jun 13 15:14:51 2019 +0200 staging: kpc2000: remove dead code in core.c Fixes checkpatch warning: "Consider removing the code enclosed by this #if 0 and its #endif". Signed-off-by: Simon Sandström Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/core.c | 6 ------ 1 file changed, 6 deletions(-) commit c90c1b427b08c17c9c1385b3d0aaf3004fe3d877 Author: Christian Gromm Date: Thu Jun 13 17:23:47 2019 +0200 staging: most: deregister net and video config subsystems with configFS This patch makes the modules net and video deregister its config subsystems when the modules are removed from the kernel. Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/net/net.c | 1 + drivers/staging/most/video/video.c | 1 + 2 files changed, 2 insertions(+) commit 9884b3f6f73d931e59646c56046d75a56f39a6de Author: Saiyam Doshi Date: Sun Jun 16 00:16:05 2019 +0530 staging: android: fix style problem checkpatch reported "WARNING: line over 80 characters". This patch fixes it by aligning function arguments. Signed-off-by: Saiyam Doshi Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion_chunk_heap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6631142229005e1b1c311a09efe9fb3cfdac8559 Author: Tejun Heo Date: Thu Jun 13 15:30:41 2019 -0700 blkcg, writeback: dead memcgs shouldn't contribute to writeback ownership arbitration wbc_account_io() collects information on cgroup ownership of writeback pages to determine which cgroup should own the inode. Pages can stay associated with dead memcgs but we want to avoid attributing IOs to dead blkcgs as much as possible as the association is likely to be stale. However, currently, pages associated with dead memcgs contribute to the accounting delaying and/or confusing the arbitration. Fix it by ignoring pages associated with dead memcgs. Signed-off-by: Tejun Heo Cc: Jan Kara Signed-off-by: Jens Axboe fs/fs-writeback.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 71c814077de60b2e7415dac6f5c4e98f59d521fd Author: Tejun Heo Date: Thu Jun 13 15:30:40 2019 -0700 blkcg: blkcg_activate_policy() should initialize ancestors first When blkcg_activate_policy() is creating blkg_policy_data for existing blkgs, it did in the wrong order - descendants first. Fix it. None of the existing controllers seem affected by this. Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe block/blk-cgroup.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ef069b97feec11c2399bbc5f6f347b35482105dc Author: Tejun Heo Date: Thu Jun 13 15:30:39 2019 -0700 blkcg: perpcu_ref init/exit should be done from blkg_alloc/free() blkg alloc is performed as a separate step from the rest of blkg creation so that GFP_KERNEL allocations can be used when creating blkgs from configuration file writes because otherwise user actions may fail due to failures of opportunistic GFP_NOWAIT allocations. While making blkgs use percpu_ref, 7fcf2b033b84 ("blkcg: change blkg reference counting to use percpu_ref") incorrectly added unconditional opportunistic percpu_ref_init() to blkg_create() breaking this guarantee. This patch moves percpu_ref_init() to blkg_alloc() so makes it use @gfp_mask that blkg_alloc() is called with. Also, percpu_ref_exit() is moved to blkg_free() for consistency. Signed-off-by: Tejun Heo Fixes: 7fcf2b033b84 ("blkcg: change blkg reference counting to use percpu_ref") Cc: Dennis Zhou Signed-off-by: Jens Axboe block/blk-cgroup.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit f539da82f2158916e154d206054e0efd5df7ab61 Author: Tejun Heo Date: Thu Jun 13 15:30:38 2019 -0700 blkcg: update blkcg_print_stat() to handle larger outputs Depending on the number of devices, blkcg stats can go over the default seqfile buf size. seqfile normally retries with a larger buffer but since the ->pd_stat() addition, blkcg_print_stat() doesn't tell seqfile that overflow has happened and the output gets printed truncated. Fix it by calling seq_commit() w/ -1 on possible overflows. Signed-off-by: Tejun Heo Fixes: 903d23f0a354 ("blk-cgroup: allow controllers to output their own stats") Cc: stable@vger.kernel.org # v4.19+ Cc: Josef Bacik Signed-off-by: Jens Axboe block/blk-cgroup.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 5de0073fcd50cc1f150895a7bb04d3cf8067b1d7 Author: Tejun Heo Date: Thu Jun 13 15:30:37 2019 -0700 blk-iolatency: clear use_delay when io.latency is set to zero If use_delay was non-zero when the latency target of a cgroup was set to zero, it will stay stuck until io.latency is enabled on the cgroup again. This keeps readahead disabled for the cgroup impacting performance negatively. Signed-off-by: Tejun Heo Cc: Josef Bacik Fixes: d70675121546 ("block: introduce blk-iolatency io controller") Cc: stable@vger.kernel.org # v4.19+ Signed-off-by: Jens Axboe block/blk-iolatency.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit f4071997f1de016780ec6b79c63d90cd5886ee83 Author: Matt Roper Date: Thu May 30 16:40:14 2019 -0700 drm/i915/ehl: Update MOCS table for EHL EHL defines two new MOCS table entries but is otherwise compatible with the ICL MOCS table. These table entries (16 and 17) should still be considered unused for ICL and as such their behavior remains undefined for that platform. Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20190530234014.22340-1-matthew.d.roper@intel.com Reviewed-by: Lucas De Marchi Reviewed-by: José Roberto de Souza drivers/gpu/drm/i915/gt/intel_mocs.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 9c4e4c90ec24652921e31e9551fcaedc26eec86d Author: Christophe Leroy Date: Fri May 10 06:31:28 2019 +0000 powerpc/64: mark start_here_multiplatform as __ref Otherwise, the following warning is encountered: WARNING: vmlinux.o(.text+0x3dc6): Section mismatch in reference from the variable start_here_multiplatform to the function .init.text:.early_setup() The function start_here_multiplatform() references the function __init .early_setup(). This is often because start_here_multiplatform lacks a __init annotation or the annotation of .early_setup is wrong. Fixes: 56c46bba9bbf ("powerpc/64: Fix booting large kernels with STRICT_KERNEL_RWX") Cc: Russell Currey Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman arch/powerpc/kernel/head_64.S | 2 ++ 1 file changed, 2 insertions(+) commit e4488e45e240c4906119dfda24996701632bdb4d Author: Heiko Stuebner Date: Thu Jun 6 10:20:32 2019 +0200 clk: rockchip: convert pclk_wdt boilerplat to new SGRF_GATE macro Convert the boilerplate code for manual addition of the watchdog clock to the new SGRF_GATE macro for all affected socs. Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-px30.c | 12 +++--------- drivers/clk/rockchip/clk-rk3288.c | 12 +++--------- drivers/clk/rockchip/clk-rk3368.c | 12 +++--------- drivers/clk/rockchip/clk-rk3399.c | 12 +++--------- 4 files changed, 12 insertions(+), 36 deletions(-) commit e846f0dc57f441e5e93194d39bc9b8ac2ab5e0a4 Author: Jani Nikula Date: Tue Jun 4 15:42:48 2019 +0300 kbuild: add support for ensuring headers are self-contained Sometimes it's useful to be able to explicitly ensure certain headers remain self-contained, i.e. that they are compilable as standalone units, by including and/or forward declaring everything they depend on. Add special target header-test-y where individual Makefiles can add headers to be tested if CONFIG_HEADER_TEST is enabled. This will generate a dummy C file per header that gets built as part of extra-y. Signed-off-by: Jani Nikula Reviewed-by: Sam Ravnborg Signed-off-by: Masahiro Yamada .gitignore | 1 + Documentation/dontdiff | 1 + Documentation/kbuild/makefiles.txt | 7 +++++++ Makefile | 1 + drivers/gpu/drm/i915/.gitignore | 1 - drivers/gpu/drm/i915/Makefile.header-test | 12 +----------- init/Kconfig | 9 +++++++++ scripts/Makefile.build | 9 +++++++++ scripts/Makefile.lib | 3 +++ 9 files changed, 32 insertions(+), 12 deletions(-) commit 0315bb7a25267bfeee2a7aaed5d1b4ba915e0c53 Author: Masahiro Yamada Date: Tue Jun 4 19:14:06 2019 +0900 kbuild: deb-pkg: do not run headers_check It is absolutely fine to add extra sanity checks in package scripts, but it is not necessary to do so. This is already covered by the daily compile-testing (0day bot etc.) because headers_check is run as a part of the normal build process when CONFIG_HEADERS_CHECK=y. Replace it with the newly-added "make headers". Signed-off-by: Masahiro Yamada scripts/package/builddeb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 555187a8791d492bed4dc57aae93b47162f6398d Author: Masahiro Yamada Date: Tue Jun 4 19:14:05 2019 +0900 kbuild: simplify scripts/headers_install.sh Now that headers_install.sh is invoked per file, remove the for-loop in the shell script. Signed-off-by: Masahiro Yamada scripts/Makefile.headersinst | 2 +- scripts/headers_install.sh | 48 ++++++++++++++++++-------------------------- 2 files changed, 21 insertions(+), 29 deletions(-) commit a5bae54c106db8734d5ca81e2eb8e0351dd11737 Author: Masahiro Yamada Date: Tue Jun 4 19:14:04 2019 +0900 kbuild: move hdr-inst shorthand to top Makefile Now that hdr-inst is used only in the top Makefile, move it there from scripts/Kbuild.include. Signed-off-by: Masahiro Yamada Makefile | 2 ++ scripts/Kbuild.include | 6 ------ 2 files changed, 2 insertions(+), 6 deletions(-) commit d5470d14431e9d39ee2131323589afac2a0bfee4 Author: Masahiro Yamada Date: Tue Jun 4 19:14:03 2019 +0900 kbuild: re-implement Makefile.headersinst without recursion Since commit fcc8487d477a ("uapi: export all headers under uapi directories"), the headers in uapi directories are all exported by default although exceptional cases are still allowed by the syntax 'no-export-headers'. The traditional directory descending has been kept (in a somewhat hacky way), but it is actually unneeded. Get rid of it to simplify the code. Also, handle files one by one instead of the previous per-directory processing. This will emit much more log, but I like it. Signed-off-by: Masahiro Yamada Makefile | 8 +-- include/uapi/{linux => }/Kbuild | 6 +- scripts/Makefile.headersinst | 132 +++++++++++++++++----------------------- 3 files changed, 62 insertions(+), 84 deletions(-) commit 59b2bd05f5f4dc62979c2e82ddd384f07e8f10bc Author: Masahiro Yamada Date: Tue Jun 4 19:14:02 2019 +0900 kbuild: add 'headers' target to build up uapi headers in usr/include In Linux build system, build targets and installation targets are separated. Examples are: - 'make vmlinux' -> 'make install' - 'make modules' -> 'make modules_install' - 'make dtbs' -> 'make dtbs_install' - 'make vdso' -> 'make vdso_install' The intention is to run the build targets under the normal privilege, then the installation targets under the root privilege since we need the write permission to the system directories. We have 'make headers_install' but the corresponding 'make headers' stage does not exist. The purpose of headers_install is to provide the kernel interface to C library. So, nobody would try to install headers to /usr/include directly. If 'sudo make INSTALL_HDR_PATH=/usr/include headers_install' were run, some build artifacts in the kernel tree would be owned by root because some of uapi headers are generated by 'uapi-asm-generic', 'archheaders' targets. Anyway, I believe it makes sense to split the header installation into two stages. [1] 'make headers' Process headers in uapi directories by scripts/headers_install.sh and copy them to usr/include [2] 'make headers_install' Copy '*.h' verbatim from usr/include to $(INSTALL_HDR_PATH)/include For the backward compatibility, 'headers_install' depends on 'headers'. Some samples expect uapi headers in usr/include. So, the 'headers' target is useful to build up them in the fixed location usr/include irrespective of INSTALL_HDR_PATH. Another benefit is to stop polluting the final destination with the time-stamp files '.install' and '.check'. Maybe you can see them in your toolchains. Lastly, my main motivation is to prepare for compile-testing uapi headers. To build something, we have to save an object and .*.cmd somewhere. The usr/include/ will be the work directory for that. Signed-off-by: Masahiro Yamada Makefile | 23 +++++++++++++++-------- lib/Kconfig.debug | 4 +--- scripts/Makefile.headersinst | 8 ++++---- 3 files changed, 20 insertions(+), 15 deletions(-) commit bdd7714b6f4cca75dd1b234306077150060c2f45 Author: Masahiro Yamada Date: Tue Jun 4 19:14:01 2019 +0900 kbuild: build all prerequisites of headers_install simultaneously Currently, scripts/unifdef is compiled after scripts_basic, uapi-asm-generic, archheaders, and archscripts. The proper dependency is just scripts_basic. There is no problem to compile scripts/unifdef and other headers at the same time. Split scripts_unifdef out in order to allow more parallel building. Signed-off-by: Masahiro Yamada Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 2b8481be3cc3b8dfb2704f4d33668d930474fac8 Author: Masahiro Yamada Date: Tue Jun 4 19:14:00 2019 +0900 kbuild: remove build_unifdef target in scripts/Makefile Since commit 2aedcd098a94 ("kbuild: suppress annoying "... is up to date." message"), if_changed and friends nicely suppress "is up to date" messages. We do not need per-Makefile tricks. Signed-off-by: Masahiro Yamada Makefile | 2 +- scripts/Makefile | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) commit e949f4c2d6a3df2b7fd00e56c0f081b15284906f Author: Masahiro Yamada Date: Tue Jun 4 19:13:59 2019 +0900 kbuild: add CONFIG_HEADERS_INSTALL and loosen the dependency of samples Commit 5318321d367c ("samples: disable CONFIG_SAMPLES for UML") used a big hammer to fix the build errors under the samples/ directory. Only some samples actually include uapi headers from usr/include. Introduce CONFIG_HEADERS_INSTALL since 'depends on HEADERS_INSTALL' is clearer than 'depends on !UML'. If this option is enabled, uapi headers are installed before starting directory descending. I added 'depends on HEADERS_INSTALL' to per-sample CONFIG options. This allows UML to compile some samples. $ make ARCH=um allmodconfig samples/ [ snip ] CC [M] samples/configfs/configfs_sample.o CC [M] samples/kfifo/bytestream-example.o CC [M] samples/kfifo/dma-example.o CC [M] samples/kfifo/inttype-example.o CC [M] samples/kfifo/record-example.o CC [M] samples/kobject/kobject-example.o CC [M] samples/kobject/kset-example.o CC [M] samples/trace_events/trace-events-sample.o CC [M] samples/trace_printk/trace-printk.o AR samples/vfio-mdev/built-in.a AR samples/built-in.a Signed-off-by: Masahiro Yamada Makefile | 8 ++++---- arch/arc/configs/tb10x_defconfig | 1 + arch/nds32/configs/defconfig | 1 + arch/parisc/configs/a500_defconfig | 1 + arch/parisc/configs/b180_defconfig | 1 + arch/parisc/configs/c3000_defconfig | 1 + arch/parisc/configs/default_defconfig | 1 + arch/powerpc/configs/ppc6xx_defconfig | 1 + arch/s390/configs/debug_defconfig | 1 + lib/Kconfig.debug | 19 ++++++++++++++----- samples/Kconfig | 14 +++++++++++--- samples/Makefile | 4 ++-- 12 files changed, 39 insertions(+), 14 deletions(-) commit c6509a24d6ba0f8560a81c032c30d169ba467b0a Author: Masahiro Yamada Date: Tue Jun 4 19:13:58 2019 +0900 kbuild: fix Kconfig prompt of CONFIG_HEADERS_CHECK Prior to commit 257edce66d31 ("kbuild: exploit parallel building for CONFIG_HEADERS_CHECK"), the sanity check of exported headers was done as a side-effect of build rule of vmlinux. That commit is good, but I missed to update the prompt of the Kconfig entry. For the sake of preciseness, lets' say "when building 'all'". Signed-off-by: Masahiro Yamada lib/Kconfig.debug | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7a739ce51dca77184e5fc7b4ad5696b32a5c9422 Author: Masahiro Yamada Date: Tue Jun 4 19:13:57 2019 +0900 kbuild: make gdb_script depend on prepare0 instead of prepare 'gdb_script' needs headers generated by ./Kbuild, which is visited by 'prepare0'. None of 'gdb_script' depends on 'prepare'. Loosen the dependency. Signed-off-by: Masahiro Yamada Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3a51f9081e7b4c7229e1d3cb5ec74bc27ae4ea84 Author: Masahiro Yamada Date: Tue Jun 4 19:13:56 2019 +0900 kbuild: remove stale dependency between Documentation/ and headers_install Commit 8e2faea877eb ("Make Documenation depend on headers_install") dates back to 2014, which is before Sphinx was introduced for the kernel documentation. Since none of DOC_TARGET requires headers_install, it is strange to run it only for the single target "Documentation/". Signed-off-by: Masahiro Yamada Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit f3c8d4c7a7280cdc6622adb4f8e39d51b3786d68 Author: Masahiro Yamada Date: Tue Jun 4 19:13:55 2019 +0900 kbuild: remove headers_{install,check}_all headers_install_all does not make much sense any more because different architectures export different set of uapi/linux/ headers. As you see in include/uapi/linux/Kbuild, the installation of a.out.h, kvm.h, and kvm_para.h is arch-dependent. So, headers_install_all repeats the installation/removal of them. If somebody really thinks it is useful to do headers_install for all architectures, it would be possible by small shell-scripting, but the top Makefile does not have to provide entry targets just for that purpose. Signed-off-by: Masahiro Yamada Acked-by: Sam Ravnborg Documentation/kbuild/headers_install.txt | 7 ------- Documentation/kbuild/makefiles.txt | 6 +----- Makefile | 15 ++------------- scripts/headers.sh | 29 ----------------------------- 4 files changed, 3 insertions(+), 54 deletions(-) commit 39c00378e337c869b0c9cd35e108fc0c8671d644 Author: Martin Schwidefsky Date: Wed Jan 2 08:11:40 2019 +0100 Update default configuration Signed-off-by: Martin Schwidefsky Signed-off-by: Heiko Carstens arch/s390/configs/debug_defconfig | 2 ++ arch/s390/configs/defconfig | 7 ++++--- arch/s390/configs/performance_defconfig | 2 ++ 3 files changed, 8 insertions(+), 3 deletions(-) commit 4ecf0a43e729a7e641d800c294faabe87378fc05 Author: Heiko Carstens Date: Sat Jun 8 12:13:57 2019 +0200 processor: get rid of cpu_relax_yield stop_machine is the only user left of cpu_relax_yield. Given that it now has special semantics which are tied to stop_machine introduce a weak stop_machine_yield function which architectures can override, and get rid of the generic cpu_relax_yield implementation. Acked-by: Peter Zijlstra (Intel) Acked-by: Thomas Gleixner Signed-off-by: Heiko Carstens arch/s390/include/asm/processor.h | 6 ------ arch/s390/kernel/processor.c | 4 ++-- include/linux/sched.h | 4 ---- include/linux/stop_machine.h | 1 + kernel/stop_machine.c | 7 ++++++- 5 files changed, 9 insertions(+), 13 deletions(-) commit 38f2c691a4b3e89d476f8e8350d1ca299974b89d Author: Martin Schwidefsky Date: Fri May 17 12:50:42 2019 +0200 s390: improve wait logic of stop_machine The stop_machine loop to advance the state machine and to wait for all affected CPUs to check-in calls cpu_relax_yield in a tight loop until the last missing CPUs acknowledged the state transition. On a virtual system where not all logical CPUs are backed by real CPUs all the time it can take a while for all CPUs to check-in. With the current definition of cpu_relax_yield a diagnose 0x44 is done which tells the hypervisor to schedule *some* other CPU. That can be any CPU and not necessarily one of the CPUs that need to run in order to advance the state machine. This can lead to a pretty bad diagnose 0x44 storm until the last missing CPU finally checked-in. Replace the undirected cpu_relax_yield based on diagnose 0x44 with a directed yield. Each CPU in the wait loop will pick up the next CPU in the cpumask of stop_machine. The diagnose 0x9c is used to tell the hypervisor to run this next CPU instead of the current one. If there is only a limited number of real CPUs backing the virtual CPUs we end up with the real CPUs passed around in a round-robin fashion. [heiko.carstens@de.ibm.com]: Use cpumask_next_wrap as suggested by Peter Zijlstra. Signed-off-by: Martin Schwidefsky Acked-by: Peter Zijlstra (Intel) Acked-by: Thomas Gleixner Signed-off-by: Heiko Carstens arch/s390/include/asm/processor.h | 3 ++- arch/s390/kernel/processor.c | 17 ++++++++++++----- arch/s390/kernel/smp.c | 2 +- include/linux/sched.h | 2 +- kernel/stop_machine.c | 14 +++++++++----- 5 files changed, 25 insertions(+), 13 deletions(-) commit 7928260539f3a13b5b23a3fa0a7c0e4f5255940b Author: Heiko Carstens Date: Sat Jun 8 11:39:05 2019 +0200 processor: remove spin_cpu_yield spin_cpu_yield is unused, therefore remove it. Acked-by: Peter Zijlstra (Intel) Acked-by: Thomas Gleixner Signed-off-by: Heiko Carstens arch/powerpc/include/asm/processor.h | 2 -- include/linux/processor.h | 9 --------- 2 files changed, 11 deletions(-) commit b4e3133b65987f349a1cba96169c4485909c91ad Author: Vasily Gorbik Date: Fri Jun 14 13:02:16 2019 +0200 s390/traps: simplify data exception handler Simplify conditions and remove unnecessary variable in data exception handler. Signed-off-by: Vasily Gorbik Reviewed-by: Heiko Carstens Reviewed-by: Hendrik Brueckner Signed-off-by: Heiko Carstens arch/s390/kernel/traps.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 39c7dcb158924f84e04f4c2433d164eee845a732 Author: Halil Pasic Date: Tue Mar 26 19:03:47 2019 +0100 virtio/s390: make airq summary indicators DMA The hypervisor needs to interact with the summary indicators, so these need to be DMA memory as well (at least for protected virtualization guests). Signed-off-by: Halil Pasic Reviewed-by: Cornelia Huck Reviewed-by: Michael Mueller Tested-by: Michael Mueller Signed-off-by: Heiko Carstens drivers/s390/virtio/virtio_ccw.c | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) commit 48720ba56891570e3b750b271d80efb631478630 Author: Halil Pasic Date: Mon Oct 1 19:01:58 2018 +0200 virtio/s390: use DMA memory for ccw I/O and classic notifiers Before virtio-ccw could get away with not using DMA API for the pieces of memory it does ccw I/O with. With protected virtualization this has to change, since the hypervisor needs to read and sometimes also write these pieces of memory. The hypervisor is supposed to poke the classic notifiers, if these are used, out of band with regards to ccw I/O. So these need to be allocated as DMA memory (which is shared memory for protected virtualization guests). Let us factor out everything from struct virtio_ccw_device that needs to be DMA memory in a satellite that is allocated as such. Note: The control blocks of I/O instructions do not need to be shared. These are marshalled by the ultravisor. Signed-off-by: Halil Pasic Reviewed-by: Pierre Morel Reviewed-by: Cornelia Huck Reviewed-by: Michael Mueller Tested-by: Michael Mueller Signed-off-by: Heiko Carstens drivers/s390/virtio/virtio_ccw.c | 169 +++++++++++++++++++++------------------ 1 file changed, 89 insertions(+), 80 deletions(-) commit 22a4a639b9cebff4568f32202e96d6f286251b72 Author: Halil Pasic Date: Mon Dec 3 17:18:07 2018 +0100 virtio/s390: add indirection to indicators access This will come in handy soon when we pull out the indicators from virtio_ccw_device to a memory area that is shared with the hypervisor (in particular for protected virtualization guests). Signed-off-by: Halil Pasic Reviewed-by: Pierre Morel Reviewed-by: Cornelia Huck Reviewed-by: Michael Mueller Tested-by: Michael Mueller Signed-off-by: Heiko Carstens drivers/s390/virtio/virtio_ccw.c | 40 +++++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 15 deletions(-) commit 01b3fb1ea00d5b2af77f41da69dd9dc859c12748 Author: Halil Pasic Date: Thu May 23 16:50:07 2019 +0200 virtio/s390: use cacheline aligned airq bit vectors The flag AIRQ_IV_CACHELINE was recently added to airq_iv_create(). Let us use it! We actually wanted the vector to span a cacheline all along. Signed-off-by: Halil Pasic Reviewed-by: Christian Borntraeger Reviewed-by: Cornelia Huck Reviewed-by: Michael Mueller Tested-by: Michael Mueller Signed-off-by: Heiko Carstens drivers/s390/virtio/virtio_ccw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b50623e5db802e41736f3305cb54c03bc7f0e30a Author: Halil Pasic Date: Thu Sep 13 18:57:16 2018 +0200 s390/airq: use DMA memory for adapter interrupts Protected virtualization guests have to use shared pages for airq notifier bit vectors, because the hypervisor needs to write these bits. Let us make sure we allocate DMA memory for the notifier bit vectors by replacing the kmem_cache with a dma_cache and kalloc() with cio_dma_zalloc(). Signed-off-by: Halil Pasic Reviewed-by: Sebastian Ott Reviewed-by: Michael Mueller Tested-by: Michael Mueller Signed-off-by: Heiko Carstens arch/s390/include/asm/airq.h | 2 ++ drivers/s390/cio/airq.c | 37 +++++++++++++++++++++++-------------- drivers/s390/cio/cio.h | 2 ++ drivers/s390/cio/css.c | 1 + 4 files changed, 28 insertions(+), 14 deletions(-) commit 37db8985b2116c89a3cbaf87083a02f83afaba5b Author: Halil Pasic Date: Tue Mar 26 12:41:09 2019 +0100 s390/cio: add basic protected virtualization support As virtio-ccw devices are channel devices, we need to use the dma area within the common I/O layer for any communication with the hypervisor. Note that we do not need to use that area for control blocks directly referenced by instructions, e.g. the orb. It handles neither QDIO in the common code, nor any device type specific stuff (like channel programs constructed by the DASD driver). An interesting side effect is that virtio structures are now going to get allocated in 31 bit addressable storage. Signed-off-by: Halil Pasic Reviewed-by: Sebastian Ott Reviewed-by: Cornelia Huck Reviewed-by: Michael Mueller Tested-by: Michael Mueller Signed-off-by: Heiko Carstens arch/s390/include/asm/ccwdev.h | 4 +++ drivers/s390/cio/ccwreq.c | 9 +++--- drivers/s390/cio/device.c | 68 +++++++++++++++++++++++++++++++++------- drivers/s390/cio/device_fsm.c | 49 +++++++++++++++++------------ drivers/s390/cio/device_id.c | 20 ++++++------ drivers/s390/cio/device_ops.c | 21 +++++++++++-- drivers/s390/cio/device_pgid.c | 22 +++++++------ drivers/s390/cio/device_status.c | 24 +++++++------- drivers/s390/cio/io_sch.h | 20 +++++++++--- drivers/s390/virtio/virtio_ccw.c | 10 ------ 10 files changed, 164 insertions(+), 83 deletions(-) commit bb99332a2b558e1f28b4c5011f9ea3b46f1c8806 Author: Halil Pasic Date: Tue Apr 2 18:47:29 2019 +0200 s390/cio: introduce DMA pools to cio To support protected virtualization cio will need to make sure the memory used for communication with the hypervisor is DMA memory. Let us introduce one global pool for cio. Our DMA pools are implemented as a gen_pool backed with DMA pages. The idea is to avoid each allocation effectively wasting a page, as we typically allocate much less than PAGE_SIZE. Signed-off-by: Halil Pasic Reviewed-by: Sebastian Ott Reviewed-by: Cornelia Huck Reviewed-by: Michael Mueller Tested-by: Michael Mueller Signed-off-by: Heiko Carstens arch/s390/Kconfig | 1 + arch/s390/include/asm/cio.h | 11 ++++ drivers/s390/cio/css.c | 133 ++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 141 insertions(+), 4 deletions(-) commit 64e1f0c531d1072cd97939bf0d8df42b26713543 Author: Halil Pasic Date: Thu Sep 13 18:57:16 2018 +0200 s390/mm: force swiotlb for protected virtualization On s390, protected virtualization guests have to use bounced I/O buffers. That requires some plumbing. Let us make sure, any device that uses DMA API with direct ops correctly is spared from the problems, that a hypervisor attempting I/O to a non-shared page would bring. Signed-off-by: Halil Pasic Reviewed-by: Claudio Imbrenda Reviewed-by: Michael Mueller Tested-by: Michael Mueller Signed-off-by: Heiko Carstens arch/s390/Kconfig | 4 ++++ arch/s390/include/asm/mem_encrypt.h | 17 ++++++++++++++ arch/s390/mm/init.c | 47 +++++++++++++++++++++++++++++++++++++ 3 files changed, 68 insertions(+) commit 45488c48e49b6ded9850bb0293668a92f96293c2 Author: David Hildenbrand Date: Wed Jun 12 15:33:06 2019 +0200 s390/crypto: sha: Use -ENODEV instead of -EOPNOTSUPP Let's use the error value that is typically used if HW support is not available when trying to load a module - this is also what systemd's systemd-modules-load.service expects. Reviewed-by: Cornelia Huck Reviewed-by: Harald Freudenberger Signed-off-by: David Hildenbrand Signed-off-by: Heiko Carstens arch/s390/crypto/sha1_s390.c | 2 +- arch/s390/crypto/sha256_s390.c | 2 +- arch/s390/crypto/sha512_s390.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit ba6a98fe79b416541d11d6d4a89ba8d86b5409a2 Author: David Hildenbrand Date: Wed Jun 12 15:33:05 2019 +0200 s390/crypto: prng: Use -ENODEV instead of -EOPNOTSUPP Let's use the error value that is typically used if HW support is not available when trying to load a module - this is also what systemd's systemd-modules-load.service expects. Reviewed-by: Cornelia Huck Reviewed-by: Harald Freudenberger Signed-off-by: David Hildenbrand Signed-off-by: Heiko Carstens arch/s390/crypto/prng.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1c0908fcdaeb35ff200241280518fbe356f11e57 Author: David Hildenbrand Date: Wed Jun 12 15:33:04 2019 +0200 s390/crypto: ghash: Use -ENODEV instead of -EOPNOTSUPP Let's use the error value that is typically used if HW support is not available when trying to load a module - this is also what systemd's systemd-modules-load.service expects. Reviewed-by: Cornelia Huck Reviewed-by: Harald Freudenberger Signed-off-by: David Hildenbrand Signed-off-by: Heiko Carstens arch/s390/crypto/ghash_s390.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 58443b676b9eef9f79ea1fe85ccfdffd4dc3bc6f Author: David Hildenbrand Date: Wed Jun 12 15:33:03 2019 +0200 s390/pkey: Use -ENODEV instead of -EOPNOTSUPP systemd-modules-load.service automatically tries to load the pkey module on systems that have MSA. Pkey also requires the MSA3 facility and a bunch of subfunctions. Failing with -EOPNOTSUPP makes "systemd-modules-load.service" fail on any system that does not have all needed subfunctions. For example, when running under QEMU TCG (but also on systems where protected keys are disabled via the HMC). Let's use -ENODEV, so systemd-modules-load.service properly ignores failing to load the pkey module because of missing HW functionality. While at it, also convert the -EOPNOTSUPP in pkey_clr2protkey() to -ENODEV. Reviewed-by: Cornelia Huck Reviewed-by: Harald Freudenberger Signed-off-by: David Hildenbrand Signed-off-by: Heiko Carstens drivers/s390/crypto/pkey_api.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 2a368ed7b5df04b4543602fe07e49445750ee0b7 Author: Rob Herring Date: Fri May 17 10:42:02 2019 -0500 dt-bindings: arm: Convert MediaTek board/soc bindings to json-schema Convert MediaTek SoC bindings to DT schema format using json-schema. Cc: Mark Rutland Cc: Matthias Brugger Cc: devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mediatek@lists.infradead.org Signed-off-by: Rob Herring Signed-off-by: Matthias Brugger Documentation/devicetree/bindings/arm/mediatek.txt | 89 --------------------- .../devicetree/bindings/arm/mediatek.yaml | 91 ++++++++++++++++++++++ 2 files changed, 91 insertions(+), 89 deletions(-) commit dfdeaff293962a55a9ab8699cfc2ef960fa4b754 Author: Chris Wilson Date: Fri Jun 14 23:06:16 2019 +0100 drm/i915: Avoid tainting i915_gem_park() with wakeref.lock While we need to flush the wakeref before parking, we do not need to perform the i915_gem_park() itself underneath the wakeref lock, merely the struct_mutex. If we rearrange the locks, we can avoid the unnecessary tainting. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190614220616.24932-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gem/i915_gem_pm.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit f1f8f292cd12292289cae87aac3a5c035186ec54 Author: Gustavo A. R. Silva Date: Mon Jun 10 10:04:12 2019 -0500 block: bio: Use struct_size() in kmalloc() One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct bio_map_data { ... struct iovec iov[]; }; instance = kmalloc(sizeof(sizeof(struct bio_map_data) + sizeof(struct iovec) * count, GFP_KERNEL); Instead of leaving these open-coded and prone to type mistakes, we can now use the new struct_size() helper: instance = kmalloc(struct_size(instance, iov, count), GFP_KERNEL); This code was detected with the help of Coccinelle. Reviewed-by: Kees Cook Signed-off-by: Gustavo A. R. Silva Signed-off-by: Jens Axboe block/bio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 78b90a2ce8424eb4be4a6a1623dc7c07af8303aa Author: Gustavo A. R. Silva Date: Fri May 31 13:47:54 2019 -0500 block: genhd: Use struct_size() helper Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes, in particular in the context in which this code is being used. So, replace the following form: sizeof(*new_ptbl) + target * sizeof(new_ptbl->part[0]) with: struct_size(new_ptbl, part, target) Also, notice that variable size is unnecessary, hence it is removed. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Jens Axboe block/genhd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 7602843fd873cae43a444b83b14dfdd114a9659c Author: Bob Liu Date: Sat Jun 15 01:43:48 2019 -0600 block: null_blk: fix race condition for null_del_dev Dulicate call of null_del_dev() will trigger null pointer error like below. The reason is a race condition between nullb_device_power_store() and nullb_group_drop_item(). CPU#0 CPU#1 ---------------- ----------------- do_rmdir() >configfs_rmdir() >client_drop_item() >nullb_group_drop_item() nullb_device_power_store() >null_del_dev() >test_and_clear_bit(NULLB_DEV_FL_UP >null_del_dev() ^^^^^ Duplicated null_dev_dev() triger null pointer error >clear_bit(NULLB_DEV_FL_UP The fix could be keep the sequnce of clear NULLB_DEV_FL_UP and null_del_dev(). [ 698.613600] BUG: unable to handle kernel NULL pointer dereference at 0000000000000018 [ 698.613608] #PF error: [normal kernel read fault] [ 698.613611] PGD 0 P4D 0 [ 698.613619] Oops: 0000 [#1] SMP PTI [ 698.613627] CPU: 3 PID: 6382 Comm: rmdir Not tainted 5.0.0+ #35 [ 698.613631] Hardware name: LENOVO 20LJS2EV08/20LJS2EV08, BIOS R0SET33W (1.17 ) 07/18/2018 [ 698.613644] RIP: 0010:null_del_dev+0xc/0x110 [null_blk] [ 698.613649] Code: 00 00 00 5b 41 5c 41 5d 41 5e 41 5f 5d c3 0f 0b eb 97 e8 47 bb 2a e8 0f 1f 80 00 00 00 00 0f 1f 44 00 00 55 48 89 e5 41 54 53 <8b> 77 18 48 89 fb 4c 8b 27 48 c7 c7 40 57 1e c1 e8 bf c7 cb e8 48 [ 698.613654] RSP: 0018:ffffb887888bfde0 EFLAGS: 00010286 [ 698.613659] RAX: 0000000000000000 RBX: ffff9d436d92bc00 RCX: ffff9d43a9184681 [ 698.613663] RDX: ffffffffc11e5c30 RSI: 0000000068be6540 RDI: 0000000000000000 [ 698.613667] RBP: ffffb887888bfdf0 R08: 0000000000000001 R09: 0000000000000000 [ 698.613671] R10: ffffb887888bfdd8 R11: 0000000000000f16 R12: ffff9d436d92bc08 [ 698.613675] R13: ffff9d436d94e630 R14: ffffffffc11e5088 R15: ffffffffc11e5000 [ 698.613680] FS: 00007faa68be6540(0000) GS:ffff9d43d14c0000(0000) knlGS:0000000000000000 [ 698.613685] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 698.613689] CR2: 0000000000000018 CR3: 000000042f70c002 CR4: 00000000003606e0 [ 698.613693] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 698.613697] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 698.613700] Call Trace: [ 698.613712] nullb_group_drop_item+0x50/0x70 [null_blk] [ 698.613722] client_drop_item+0x29/0x40 [ 698.613728] configfs_rmdir+0x1ed/0x300 [ 698.613738] vfs_rmdir+0xb2/0x130 [ 698.613743] do_rmdir+0x1c7/0x1e0 [ 698.613750] __x64_sys_rmdir+0x17/0x20 [ 698.613759] do_syscall_64+0x5a/0x110 [ 698.613768] entry_SYSCALL_64_after_hwframe+0x44/0xa9 Signed-off-by: Bob Liu Signed-off-by: Jens Axboe drivers/block/null_blk_main.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 315eb656649db680af06c5e56c6cb77c858cbe45 Author: Pavel Begunkov Date: Fri Jun 14 14:39:26 2019 +0300 blk-mq/debugfs: Fix improper print qualifier struct blk_rq_stat::mean is a u64 value, so use %llu Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e9eeba28a1e01a55b49cdcf9c7a346d2aaa0aa7d Author: Guoqing Jiang Date: Fri Jun 14 15:41:11 2019 -0700 md/raid10: read balance chooses idlest disk for SSD Andy reported that raid10 array with SSD disks has poor read performance. Compared with raid1, RAID-1 can be 3x faster than RAID-10 sometimes [1]. The thing is that raid10 chooses the low distance disk for read request, however, the approach doesn't work well for SSD device since it doesn't have spindle like HDD, we should just read from the SSD which has less pending IO like commit 9dedf60313fa4 ("md/raid1: read balance chooses idlest disk for SSD"). So this commit selects the idlest SSD disk for read if array has none rotational disk, otherwise, read_balance uses the previous distance priority algorithm. With the change, the performance of raid10 gets increased largely per Andy's test [2]. [1]. https://marc.info/?l=linux-raid&m=155915890004761&w=2 [2]. https://marc.info/?l=linux-raid&m=155990654223786&w=2 Tested-by: Andy Smith Signed-off-by: Guoqing Jiang Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/raid10.c | 45 +++++++++++++++++++++++++++++++++------------ 1 file changed, 33 insertions(+), 12 deletions(-) commit c7afa8034b09bc2bb664d86de7db34466401f352 Author: Marcos Paulo de Souza Date: Fri Jun 14 15:41:10 2019 -0700 md: raid1-10: Unify r{1,10}bio_pool_free Avoiding duplicated code, since they just execute a kfree. Signed-off-by: Marcos Paulo de Souza Signed-off-by: Jens Axboe drivers/md/raid1-10.c | 5 +++++ drivers/md/raid1.c | 13 ++++--------- drivers/md/raid10.c | 11 +++-------- 3 files changed, 12 insertions(+), 17 deletions(-) commit 8cf05a7841e1cfd894741d6bab43067b0ca85eb8 Author: Gustavo A. R. Silva Date: Fri Jun 14 15:41:09 2019 -0700 md: raid10: Use struct_size() in kmalloc() One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct foo { int stuff; struct boo entry[]; }; instance = kmalloc(size, GFP_KERNEL); Instead of leaving these open-coded and prone to type mistakes, we can now use the new struct_size() helper: instance = kmalloc(struct_size(instance, entry, count), GFP_KERNEL); This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/raid10.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ebfeb444fa6fd9bc7be62694fff838bc57e19a7d Author: Yufen Yu Date: Fri Jun 14 15:41:08 2019 -0700 md/raid1: get rid of extra blank line and space This patch get rid of extra blank line and space, and add necessary space for code. Signed-off-by: Yufen Yu Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/raid1.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit e5b521ee9b58c8954ad4d75ccaed9428f4b1a0ca Author: Yufen Yu Date: Fri Jun 14 15:41:07 2019 -0700 md: fix spelling typo and add necessary space This patch fix a spelling typo and add necessary space for code. In addition, the patch get rid of the unnecessary 'if'. Signed-off-by: Yufen Yu Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/md.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 168b305b0cfb7467a6691993f922ecbdcfc00c98 Author: Marcos Paulo de Souza Date: Fri Jun 14 15:41:06 2019 -0700 md: md.c: Return -ENODEV when mddev is NULL in rdev_attr_show Commit c42d3240990814eec1e4b2b93fa0487fc4873aed ("md: return -ENODEV if rdev has no mddev assigned") changed rdev_attr_store to return -ENODEV when rdev->mddev is NULL, now do the same to rdev_attr_show. Signed-off-by: Marcos Paulo de Souza Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/md.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d9771f5ec46c282d518b453c793635dbdc3a2a94 Author: Xiao Ni Date: Fri Jun 14 15:41:05 2019 -0700 raid5-cache: Need to do start() part job after adding journal device commit d5d885fd514f ("md: introduce new personality funciton start()") splits the init job to two parts. The first part run() does the jobs that do not require the md threads. The second part start() does the jobs that require the md threads. Now it just does run() in adding new journal device. It needs to do the second part start() too. Fixes: d5d885fd514f ("md: introduce new personality funciton start()") Cc: stable@vger.kernel.org #v4.9+ Reported-by: Michal Soltys Signed-off-by: Xiao Ni Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/raid5.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 3f677f9c998a18d11641b5a2de6f11d0af32a153 Author: Marcos Paulo de Souza Date: Fri Jun 14 15:41:04 2019 -0700 drivers: md: Unify common definitions of raid1 and raid10 These definitions are being moved to raid1-10.c. Signed-off-by: Marcos Paulo de Souza Signed-off-by: Song Liu Signed-off-by: Jens Axboe drivers/md/raid1-10.c | 25 +++++++++++++++++++++++++ drivers/md/raid1.c | 29 ++--------------------------- drivers/md/raid10.c | 27 +-------------------------- 3 files changed, 28 insertions(+), 53 deletions(-) commit 70d22b78d3235303555c921246e3c1ec37b0a29c Author: Bjorn Andersson Date: Thu May 23 08:01:53 2019 -0700 soc: qcom: apr: Don't use reg for domain id The reg property represents the address and size on the bus that a device lives, but for APR the parent is a rpmsg bus, which does not have numerical addresses. Simply defining #address/#size-cells to 1 and 0, respectively, to silence the compiler is not an appropriate solution. Replace the use of "reg" with an APR specific property. Reviewed-by: Srinivas Kandagatla Reviewed-by: Rob Herring Signed-off-by: Bjorn Andersson Documentation/devicetree/bindings/soc/qcom/qcom,apr.txt | 6 +++--- drivers/soc/qcom/apr.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit e610a466d16a086e321f0bd421e2fc75cff28605 Author: Nathan Lynch Date: Tue Jun 11 23:45:06 2019 -0500 powerpc/pseries/mobility: rebuild cacheinfo hierarchy post-migration It's common for the platform to replace the cache device nodes after a migration. Since the cacheinfo code is never informed about this, it never drops its references to the source system's cache nodes, causing it to wind up in an inconsistent state resulting in warnings and oopses as soon as CPU online/offline occurs after the migration, e.g. cache for /cpus/l3-cache@3113(Unified) refers to cache for /cpus/l2-cache@200d(Unified) WARNING: CPU: 15 PID: 86 at arch/powerpc/kernel/cacheinfo.c:176 release_cache+0x1bc/0x1d0 [...] NIP release_cache+0x1bc/0x1d0 LR release_cache+0x1b8/0x1d0 Call Trace: release_cache+0x1b8/0x1d0 (unreliable) cacheinfo_cpu_offline+0x1c4/0x2c0 unregister_cpu_online+0x1b8/0x260 cpuhp_invoke_callback+0x114/0xf40 cpuhp_thread_fun+0x270/0x310 smpboot_thread_fn+0x2c8/0x390 kthread+0x1b8/0x1c0 ret_from_kernel_thread+0x5c/0x68 Using device tree notifiers won't work since we want to rebuild the hierarchy only after all the removals and additions have occurred and the device tree is in a consistent state. Call cacheinfo_teardown() before processing device tree updates, and rebuild the hierarchy afterward. Fixes: 410bccf97881 ("powerpc/pseries: Partition migration in the kernel") Signed-off-by: Nathan Lynch Reviewed-by: Gautham R. Shenoy Signed-off-by: Michael Ellerman arch/powerpc/platforms/pseries/mobility.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit e59a175faa8df9d674247946f2a5a9c29c835725 Author: Nathan Lynch Date: Tue Jun 11 23:45:05 2019 -0500 powerpc/pseries/mobility: prevent cpu hotplug during DT update CPU online/offline code paths are sensitive to parts of the device tree (various cpu node properties, cache nodes) that can be changed as a result of a migration. Prevent CPU hotplug while the device tree potentially is inconsistent. Fixes: 410bccf97881 ("powerpc/pseries: Partition migration in the kernel") Signed-off-by: Nathan Lynch Reviewed-by: Gautham R. Shenoy Signed-off-by: Michael Ellerman arch/powerpc/platforms/pseries/mobility.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit d4aa219a074a5abaf95a756b9f0d190b5c03a945 Author: Nathan Lynch Date: Tue Jun 11 23:45:04 2019 -0500 powerpc/cacheinfo: add cacheinfo_teardown, cacheinfo_rebuild Allow external callers to force the cacheinfo code to release all its references to cache nodes, e.g. before processing device tree updates post-migration, and to rebuild the hierarchy afterward. CPU online/offline must be blocked by callers; enforce this. Fixes: 410bccf97881 ("powerpc/pseries: Partition migration in the kernel") Signed-off-by: Nathan Lynch Reviewed-by: Gautham R. Shenoy Signed-off-by: Michael Ellerman arch/powerpc/kernel/cacheinfo.c | 21 +++++++++++++++++++++ arch/powerpc/kernel/cacheinfo.h | 4 ++++ 2 files changed, 25 insertions(+) commit 129fb4cb3b6a352a1ba3e9b4d2c41fbfa06f28a2 Author: Mauro Carvalho Chehab Date: Fri Jun 14 14:52:16 2019 -0300 ABI: Fix KernelVersion tags It is "KernelVersion:" and not "Kernel Version:". Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman Documentation/ABI/testing/pstore | 2 +- .../testing/sysfs-bus-event_source-devices-format | 2 +- .../ABI/testing/sysfs-bus-i2c-devices-hm6352 | 6 +++--- .../ABI/testing/sysfs-bus-pci-devices-aer_stats | 12 ++++++------ .../ABI/testing/sysfs-bus-pci-devices-cciss | 22 +++++++++++----------- .../ABI/testing/sysfs-bus-usb-devices-usbsevseg | 10 +++++----- Documentation/ABI/testing/sysfs-driver-altera-cvp | 2 +- Documentation/ABI/testing/sysfs-driver-ppi | 2 +- Documentation/ABI/testing/sysfs-driver-st | 2 +- Documentation/ABI/testing/sysfs-driver-wacom | 2 +- 10 files changed, 31 insertions(+), 31 deletions(-) commit abf313b5a8b72302062dd407ed7e470d67d389bb Author: Mauro Carvalho Chehab Date: Fri Jun 14 14:52:15 2019 -0300 ABI: sysfs-bus-pci-devices-aer_stats uses an invalid tag According with Documentation/ABI/, the right tag to describe an ABI symbol is "What:", and not "Where:". Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman Documentation/ABI/testing/sysfs-bus-pci-devices-aer_stats | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 6b9d226b8495deff2e1e702f0ad6cdbb228f3b27 Author: Randy Dunlap Date: Fri Jun 14 14:47:48 2019 -0700 soc: qcom: fix QCOM_AOSS_QMP dependency and build errors Fix Kconfig warning and subsequent build errors that are caused when PM_GENERIC_DOMAINS=y but CONFIG_PM is not set/enabled. WARNING: unmet direct dependencies detected for PM_GENERIC_DOMAINS Depends on [n]: PM [=n] Selected by [m]: - QCOM_AOSS_QMP [=m] && (ARCH_QCOM || COMPILE_TEST [=y]) && MAILBOX [=y] && COMMON_CLK [=y] Fixes these build errors: ../drivers/base/power/domain.c: In function ‘genpd_queue_power_off_work’: ../drivers/base/power/domain.c:485:13: error: ‘pm_wq’ undeclared (first use in this function) queue_work(pm_wq, &genpd->power_off_work); ../drivers/base/power/domain.c:485:13: note: each undeclared identifier is reported only once for each function it appears in ../drivers/base/power/domain.c: In function ‘genpd_dev_pm_qos_notifier’: ../drivers/base/power/domain.c:675:25: error: ‘struct dev_pm_info’ has no member named ‘ignore_children’ if (!dev || dev->power.ignore_children) ../drivers/base/power/domain.c: In function ‘rtpm_status_str’: ../drivers/base/power/domain.c:2754:16: error: ‘struct dev_pm_info’ has no member named ‘runtime_error’ if (dev->power.runtime_error) ../drivers/base/power/domain.c:2756:21: error: ‘struct dev_pm_info’ has no member named ‘disable_depth’ else if (dev->power.disable_depth) ../drivers/base/power/domain.c:2758:21: error: ‘struct dev_pm_info’ has no member named ‘runtime_status’ else if (dev->power.runtime_status < ARRAY_SIZE(status_lookup)) ../drivers/base/power/domain.c:2759:31: error: ‘struct dev_pm_info’ has no member named ‘runtime_status’ p = status_lookup[dev->power.runtime_status]; ../drivers/base/power/domain_governor.c: In function ‘default_suspend_ok’: ../drivers/base/power/domain_governor.c:82:17: error: ‘struct dev_pm_info’ has no member named ‘ignore_children’ Signed-off-by: Randy Dunlap Cc: Bjorn Andersson Cc: Bjorn Andersson Cc: Andy Gross Cc: David Brown Signed-off-by: Bjorn Andersson drivers/soc/qcom/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 877cd9ffbc9ca5990b28ee52e3dd1082a551633f Merge: 5a1c492b00aa 79b139f4bc46 Author: David S. Miller Date: Fri Jun 14 20:20:07 2019 -0700 Merge branch 'net-dsa-use-switchdev-attr-and-obj-handlers' Vivien Didelot says: ==================== net: dsa: use switchdev attr and obj handlers This series reduces boilerplate in the handling of switchdev attribute and object operations by using the switchdev_handle_* helpers, which check the targeted devices and recurse into their lower devices. This also brings back the ability to inspect operations targeting the bridge device itself (where .orig_dev and .dev were originally the bridge device), even though that is of no use yet and skipped by this series. Changes in v2: Only VLAN and (non-host) MDB objects not directly targeting the slave device are unsupported at the moment, so only skip these cases. ==================== Signed-off-by: David S. Miller commit 79b139f4bc4659016854115b9104cfb9ef598b31 Author: Vivien Didelot Date: Fri Jun 14 13:49:22 2019 -0400 net: dsa: use switchdev handle helpers Get rid of the dsa_slave_switchdev_port_{attr_set,obj}_event functions in favor of the switchdev_handle_port_{attr_set,obj_add,obj_del} helpers which recurse into the lower devices of the target interface. This has the benefit of being aware of the operations made on the bridge device itself, where orig_dev is the bridge, and dev is the slave. This can be used later to configure the hardware switches. Only VLAN and (port) MDB objects not directly targeting the slave device are unsupported at the moment, so skip this case in their respective case statements. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller net/dsa/slave.c | 76 ++++++++++++++++++++++++--------------------------------- 1 file changed, 32 insertions(+), 44 deletions(-) commit f3b78049d4629b4fc565e225dda4e3ffdf907a84 Author: Vivien Didelot Date: Fri Jun 14 13:49:21 2019 -0400 net: dsa: make dsa_slave_dev_check use const The switchdev handle helpers make use of a device checking helper requiring a const net_device. Make dsa_slave_dev_check compliant to this. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/slave.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 68b2d4a844e157c08773fcd8f412ba1a37bf45b8 Author: Vivien Didelot Date: Fri Jun 14 13:49:20 2019 -0400 net: dsa: make cpu_dp non const A port may trigger operations on its dedicated CPU port, so using cpu_dp as const will raise warnings. Make cpu_dp non const. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller include/net/dsa.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 14aafbd822333684f6595fb492f05eb054354a72 Author: Vivien Didelot Date: Fri Jun 14 13:49:19 2019 -0400 net: dsa: do not check orig_dev in vlan del The current DSA code handling switchdev objects does not recurse into the lower devices thus is never called with an orig_dev member being a bridge device, hence remove this useless check. At the same time, remove the comments about the callers, which is unlikely to be updated if the code changes and thus will be confusing. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/port.c | 9 --------- 1 file changed, 9 deletions(-) commit 5a1c492b00aa990825a4b035804a81511107698c Merge: f48d2ccee1ba 514af5f09952 Author: David S. Miller Date: Fri Jun 14 19:53:10 2019 -0700 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 40GbE Intel Wired LAN Driver Updates 2019-06-14 This series contains updates to i40e only. Aleksandr adds stub functions for Energy Efficient Ethernet (EEE) to currently report that it is not supported in i40e. Fixed up the Link Layer Detection Protocol (LLDP) code to ensure we do not set the LLDP flag too early before we ensure that we have a successful start. This also will prevent needles restarting of the device if LLDP did not change its state with an unsuccessful start. Piotr bumps up the amount of VLANs that an untrusted VF can implement, from 8 VLANs to 16. Adds checks to the Virtual Embedded Bridge (VEB) and channel arrays so access does not exceed the boundary and ensure the index is below the maximum. Fixed an issue in the driver where we were not checking the response from the LLDP flag and were returned success no matter what the value of the response was. Mitch fixes a variable counter, which can be negative in value so make it an integer instead of an unsigned-integer. Doug improves the admin queue log granularity by making it possible to log only the admin queue descriptors without the entire admin queue message buffers. Sergey fixes up the virtchnl code by removing duplicate checks, ensure the variable type is correct when comparing integers, enhance error and warning messages to include useful information. Adam fixes a potential kernel panic when the i40e driver was being bound to a non-i40e port by adding a check on the BAR size to ensure it is large enough by reading the highest register. Jake fixes a statistics error in the "transmit errors" stat, which was being calculated twice. Gustavo A. R. Silva adds a fall-through code comment to help with compiler checks. v2: Fixed the return values wrapped in parenthesis in patch 8 and cleaned up the commit message in patch 12 so the Gustavo does not repeat himself. ==================== Signed-off-by: David S. Miller commit f48d2ccee1ba3b2bdb0901d4e5bb3cfe2edd7b36 Author: Tim Beale Date: Fri Jun 14 16:41:27 2019 +1200 udp: Remove unused variable/function (exact_dif) This was originally passed through to the VRF logic in compute_score(). But that logic has now been replaced by udp_sk_bound_dev_eq() and so this code is no longer used or needed. Signed-off-by: Tim Beale Reviewed-by: David Ahern Signed-off-by: David S. Miller net/ipv4/udp.c | 12 ------------ net/ipv6/udp.c | 11 ----------- 2 files changed, 23 deletions(-) commit 735453730a05391b4be97ad408b3bef07df13fe7 Author: Tim Beale Date: Fri Jun 14 16:41:26 2019 +1200 udp: Remove unused parameter (exact_dif) Originally this was used by the VRF logic in compute_score(), but that was later replaced by udp_sk_bound_dev_eq() and the parameter became unused. Note this change adds an 'unused variable' compiler warning that will be removed in the next patch (I've split the removal in two to make review slightly easier). Signed-off-by: Tim Beale Reviewed-by: David Ahern Signed-off-by: David S. Miller net/ipv4/udp.c | 10 +++++----- net/ipv6/udp.c | 13 ++++++------- 2 files changed, 11 insertions(+), 12 deletions(-) commit d6fb396cfaa71afc9f38d573b8ec6409fe3716de Author: Eric Dumazet Date: Thu Jun 13 21:22:35 2019 -0700 ipv4: tcp: fix ACK/RST sent with a transmit delay If we want to set a EDT time for the skb we want to send via ip_send_unicast_reply(), we have to pass a new parameter and initialize ipc.sockc.transmit_time with it. This fixes the EDT time for ACK/RST packets sent on behalf of a TIME_WAIT socket. Fixes: a842fe1425cb ("tcp: add optional per socket transmit delay") Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/ip.h | 2 +- include/net/tcp.h | 9 ++++++--- net/ipv4/ip_output.c | 3 ++- net/ipv4/tcp_ipv4.c | 14 +++++++++----- net/ipv6/tcp_ipv6.c | 2 +- 5 files changed, 19 insertions(+), 11 deletions(-) commit 3e18943333404b03d17fc4a008da7c3676523f05 Author: Li RongQing Date: Fri Jun 14 09:29:09 2019 +0800 net: remove empty netlink_tap_exit_net Pointer members of an object with static storage duration, if not explicitly initialized, will be initialized to a NULL pointer. The net namespace API checks if this pointer is not NULL before using it, it are safe to remove the function. Signed-off-by: Li RongQing Signed-off-by: David S. Miller net/netlink/af_netlink.c | 5 ----- 1 file changed, 5 deletions(-) commit c4aaa5ddffe78f4fba86e94eed0980dd287bc2b4 Merge: b4a6d9abeb54 bef6e97d57f5 Author: David S. Miller Date: Fri Jun 14 19:48:58 2019 -0700 Merge branch 'nfp-flower-loosen-L4-checks-and-add-extack-to-flower-offload' Jakub Kicinski says: ==================== nfp: flower: loosen L4 checks and add extack to flower offload Pieter says: This set allows the offload of filters that make use of an unknown ip protocol, given that layer 4 is being wildcarded. The set then aims to make use of extack messaging for flower offloads. It adds about 70 extack messages to the driver. ==================== Signed-off-by: David S. Miller commit bef6e97d57f5ff5dbffb1b0b845bd3e249a1ac24 Author: Pieter Jansen van Vuuren Date: Thu Jun 13 14:17:11 2019 -0700 nfp: flower: extend extack messaging for flower match and actions Use extack messages in flower offload when compiling match and actions messages that will configure hardware. Signed-off-by: Pieter Jansen van Vuuren Reviewed-by: Simon Horman Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/action.c | 205 +++++++++++++++------ .../net/ethernet/netronome/nfp/flower/lag_conf.c | 4 +- drivers/net/ethernet/netronome/nfp/flower/main.h | 12 +- drivers/net/ethernet/netronome/nfp/flower/match.c | 14 +- .../net/ethernet/netronome/nfp/flower/metadata.c | 28 ++- .../net/ethernet/netronome/nfp/flower/offload.c | 10 +- 6 files changed, 196 insertions(+), 77 deletions(-) commit 14179c4b4572afd806228505b9b0fdb7bc28e07f Author: Pieter Jansen van Vuuren Date: Thu Jun 13 14:17:10 2019 -0700 nfp: flower: use extack messages in flower offload Use extack messages in flower offload, specifically focusing on the extack use in add offload, remove offload and get stats paths. Signed-off-by: Pieter Jansen van Vuuren Reviewed-by: Simon Horman Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller .../net/ethernet/netronome/nfp/flower/offload.c | 105 ++++++++++++++++----- 1 file changed, 80 insertions(+), 25 deletions(-) commit 2a04784594f67b795bb4c08dd83cfc88c8311276 Author: Pieter Jansen van Vuuren Date: Thu Jun 13 14:17:09 2019 -0700 nfp: flower: check L4 matches on unknown IP protocols Matching on fields with a protocol that is unknown to hardware is not strictly unsupported. Determine if hardware can offload a filter with an unknown protocol by checking if any L4 fields are being matched as well. Signed-off-by: Pieter Jansen van Vuuren Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/offload.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit b4a6d9abeb545d79cc76f150f31c3cebc3472287 Merge: 363887a2cdfe 06efeb555524 Author: David S. Miller Date: Fri Jun 14 19:44:29 2019 -0700 Merge tag 'mlx5-updates-2019-06-13' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2019-06-13 Mlx5 devlink health fw reporters and sw reset support This series provides mlx5 firmware reset support and firmware devlink health reporters. 1) Add initial mlx5 kernel documentation and include devlink health reporters 2) Add CR-Space access and FW Crdump snapshot support via devlink region_snapshot 3) Issue software reset upon FW asserts 4) Add fw and fw_fatal devlink heath reporters to follow fw errors indication by dump and recover procedures and enable trigger these functionality by user. 4.1) fw reporter: The fw reporter implements diagnose and dump callbacks. It follows symptoms of fw error such as fw syndrome by triggering fw core dump and storing it and any other fw trace into the dump buffer. The fw reporter diagnose command can be triggered any time by the user to check current fw status. 4.2) fw_fatal repoter: The fw_fatal reporter implements dump and recover callbacks. It follows fatal errors indications by CR-space dump and recover flow. The CR-space dump uses vsc interface which is valid even if the FW command interface is not functional, which is the case in most FW fatal errors. The CR-space dump is stored as a memory region snapshot to ease read by address. The recover function runs recover flow which reloads the driver and triggers fw reset if needed. ==================== Signed-off-by: David S. Miller commit 363887a2cdfeb6af52a9b78d84697662adf6f8d5 Author: Stephen Suryaputra Date: Thu Jun 13 14:38:58 2019 -0400 ipv4: Support multipath hashing on inner IP pkts for GRE tunnel Multipath hash policy value of 0 isn't distributing since the outer IP dest and src aren't varied eventhough the inner ones are. Since the flow is on the inner ones in the case of tunneled traffic, hashing on them is desired. This is done mainly for IP over GRE, hence only tested for that. But anything else supported by flow dissection should work. v2: Use skb_flow_dissect_flow_keys() directly so that other tunneling can be supported through flow dissection (per Nikolay Aleksandrov). v3: Remove accidental inclusion of ports in the hash keys and clarify the documentation (Nikolay Alexandrov). Signed-off-by: Stephen Suryaputra Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller Documentation/networking/ip-sysctl.txt | 1 + net/ipv4/route.c | 17 +++++++++++++++++ net/ipv4/sysctl_net_ipv4.c | 2 +- 3 files changed, 19 insertions(+), 1 deletion(-) commit 31c03aef9bc22a64a8324d650ca4198819ef3a33 Author: Willem de Bruijn Date: Thu Jun 13 12:24:57 2019 -0400 virtio_net: enable napi_tx by default NAPI tx mode improves TCP behavior by enabling TCP small queues (TSQ). TSQ reduces queuing ("bufferbloat") and burstiness. Previous measurements have shown significant improvement for TCP_STREAM style workloads. Such as those in commit 86a5df1495cc ("Merge branch 'virtio-net-tx-napi'"). There has been uncertainty about smaller possible regressions in latency due to increased reliance on tx interrupts. The above results did not show that, nor did I observe this when rerunning TCP_RR on Linux 5.1 this week on a pair of guests in the same rack. This may be subject to other settings, notably interrupt coalescing. In the unlikely case of regression, we have landed a credible runtime solution. Ethtool can configure it with -C tx-frames [0|1] as of commit 0c465be183c7 ("virtio_net: ethtool tx napi configuration"). NAPI tx mode has been the default in Google Container-Optimized OS (COS) for over half a year, as of release M70 in October 2018, without any negative reports. Link: https://marc.info/?l=linux-netdev&m=149305618416472 Link: https://lwn.net/Articles/507065/ Signed-off-by: Willem de Bruijn Acked-by: Michael S. Tsirkin Acked-by: Jason Wang Signed-off-by: David S. Miller drivers/net/virtio_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 87f373921c4ed770abdb3cdafd796ef7f7b86620 Author: Vlad Buslov Date: Thu Jun 13 19:12:05 2019 +0300 net: sched: ingress: set 'unlocked' flag for clsact Qdisc ops To remove rtnl lock dependency in tc filter update API when using clsact Qdisc, set QDISC_CLASS_OPS_DOIT_UNLOCKED flag in clsact Qdisc_class_ops. Clsact Qdisc ops don't require any modifications to be used without rtnl lock on tc filter update path. Implementation never changes its q->block and only releases it when Qdisc is being destroyed. This means it is enough for RTM_{NEWTFILTER|DELTFILTER|GETTFILTER} message handlers to hold clsact Qdisc reference while using it without relying on rtnl lock protection. Unlocked Qdisc ops support is already implemented in filter update path by unlocked cls API patch set. Signed-off-by: Vlad Buslov Signed-off-by: David S. Miller net/sched/sch_ingress.c | 1 + 1 file changed, 1 insertion(+) commit 3d797eb1d08f02cc767f9e00714077b9ed8670fc Merge: 26e392ca9b76 7b58139f98e2 Author: David S. Miller Date: Fri Jun 14 19:31:48 2019 -0700 Merge branch 'enable-and-use-static_branch_deferred_inc' Willem de Bruijn says: ==================== enable and use static_branch_deferred_inc 1. make static_branch_deferred_inc available if !CONFIG_JUMP_LABEL 2. convert the existing STATIC_KEY_DEFERRED_FALSE user to this api ==================== Signed-off-by: David S. Miller commit 7b58139f98e227289cb2989224dbe0a9c5928d7e Author: Willem de Bruijn Date: Thu Jun 13 11:08:16 2019 -0400 tcp: use static_branch_deferred_inc for clean_acked_data_enabled Deferred static key clean_acked_data_enabled uses the deferred variants of dec and flush. Do the same for inc. Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller net/ipv4/tcp_input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f01c373fbeed9f5870bb056b65750ccef42f1f20 Author: Willem de Bruijn Date: Thu Jun 13 11:08:15 2019 -0400 locking/static_key: always define static_branch_deferred_inc This interface is currently only defined if CONFIG_JUMP_LABEL. Make it available also when jump labels are off. Signed-off-by: Willem de Bruijn Acked-by: Peter Zijlstra (Intel) Signed-off-by: David S. Miller include/linux/jump_label_ratelimit.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 26e392ca9b76b219fe3e3831f425c28b03f6fd74 Merge: cbbe9bd0a088 ebaf1908772e Author: David S. Miller Date: Fri Jun 14 19:26:16 2019 -0700 Merge branch 'hns3-next' Huazhong Tan says: ==================== net: hns3: some code optimizations & cleanups & bugfixes This patch-set includes code optimizations, cleanups and bugfixes for the HNS3 ethernet controller driver. [patch 1/12 - 6/12] adds some code optimizations and bugfixes about RAS and MSI-X HW error. [patch 7/12] fixes a loading issue. [patch 8/12 - 11/12] adds some bugfixes. [patch 12/12] adds some cleanups, which does not change the logic of code. ==================== Signed-off-by: David S. Miller commit ebaf1908772e0502081cbe4f64e59276770ba02b Author: Weihang Li Date: Thu Jun 13 17:12:32 2019 +0800 net: hns3: some variable modification This patch does following things: 1. add the keyword const before some variables which won't be modified in functions. 2. changes some variables from signed to unsigned to avoid bitwise operation on signed variables. 3. adds or removes initialization of some variables. 4. defines a new structure to help parsing mailbox messages instead of using an array which is harder to get the meaning of each element. Signed-off-by: Weihang Li Signed-off-by: Peng Li Signed-off-by: Yunsheng Lin Signed-off-by: Yufeng Mo Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hnae3.c | 3 +- drivers/net/ethernet/hisilicon/hns3/hnae3.h | 5 +- drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c | 5 +- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 5 +- drivers/net/ethernet/hisilicon/hns3/hns3_enet.h | 2 +- .../ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c | 16 +++--- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 64 +++++++++++++--------- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h | 15 ++++- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c | 20 ++++--- .../ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c | 8 +-- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 2 +- .../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 11 ++-- 12 files changed, 95 insertions(+), 61 deletions(-) commit 3a30964a2eef6aabd3ab18b979ea0eacf1147731 Author: Yunsheng Lin Date: Thu Jun 13 17:12:31 2019 +0800 net: hns3: delay ring buffer clearing during reset The driver may not be able to disable the ring through firmware when downing the netdev during reset process, which may cause hardware accessing freed buffer problem. This patch delays the ring buffer clearing to reset uninit process because hardware will not access the ring buffer after hardware reset is completed. Fixes: bb6b94a896d4 ("net: hns3: Add reset interface implementation in client") Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit 8f9eed1a8791b83eb1c54c261d68424717e4111e Author: Yunsheng Lin Date: Thu Jun 13 17:12:30 2019 +0800 net: hns3: fix for skb leak when doing selftest If hns3_nic_net_xmit does not return NETDEV_TX_BUSY when doing a loopback selftest, the skb is not freed in hns3_clean_tx_ring or hns3_nic_net_xmit, which causes skb not freed problem. This patch fixes it by freeing skb when hns3_nic_net_xmit does not return NETDEV_TX_OK. Fixes: c39c4d98dc65 ("net: hns3: Add mac loopback selftest support in hns3 driver") Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 757188005f905664b0186b88cf26a7e844190a63 Author: Yunsheng Lin Date: Thu Jun 13 17:12:29 2019 +0800 net: hns3: fix for dereferencing before null checking The netdev is dereferenced before null checking in the function hns3_setup_tc. This patch moves the dereferencing after the null checking. Fixes: 76ad4f0ee747 ("net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC") Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit d547ecdc1fc1eb5e9caf678d2f1c02cf3d77cbe7 Author: Yonglong Liu Date: Thu Jun 13 17:12:28 2019 +0800 net: hns3: free irq when exit from abnormal branch In hns3_nic_init_irq(), if request irq fail at index i, the function return directly without releasing irq resources that already requested, and nowhere else will release them. Signed-off-by: Yonglong Liu Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 1 + 1 file changed, 1 insertion(+) commit 31bb229d6f4a603a351d670ac078dff8ba3af398 Author: Peng Li Date: Thu Jun 13 17:12:27 2019 +0800 net: hns3: clear restting state when initializing HW device IMP will set restting state for all function when PF FLR, driver just clear the restting state in resetting progress, but don't do it in initializing progress. As FLR is not created by driver, it is necessary to clear restting state when initializing HW device. Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller .../net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 9e0254ddea78cf947bf6650a3ec8e50ab132e8a1 Author: Weihang Li Date: Thu Jun 13 17:12:26 2019 +0800 net: hns3: extract handling of mpf/pf msi-x errors into functions Function hclge_handle_all_hw_msix_error() contains four parts: 1. Query buffer descriptors for MSI-X errors. 2. Query and clear all main PF MSI-X errors. 3. Query and clear all PF MSI-X errors. 4. Handle mac tunnel interrupts. Part 2 and part 3 handle errors of some different modules respectively, this patch extracts them into dividual functions, which makes the logic clearer. Signed-off-by: Weihang Li Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller .../net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c | 122 ++++++++++++++------- 1 file changed, 83 insertions(+), 39 deletions(-) commit 9f65e5ef900f6590dc7c90ca2a956247da393b07 Author: Weihang Li Date: Thu Jun 13 17:12:25 2019 +0800 net: hns3: some changes of MSI-X bits in PPU(RCB) This patch modifies print message of rx_q_search_miss from error to dfx to prevent misleading users, because this interrupt may occur if we receive packets during initialization of HNS3 driver. Otherwise, this patch masks 28th bit of PPU_MPF_ABNORMAL_SRC2 which is now meaningless. Signed-off-by: Weihang Li Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c | 5 ++--- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) commit e3b84ed27043d66a75cd229adc05426b6847dfa6 Author: Shiju Jose Date: Thu Jun 13 17:12:24 2019 +0800 net: hns3: add recovery for the H/W errors occurred before the HNS dev initialization This patch adds the recovery for the HNS H/W errors which occurred before the driver initialization. Reported-by: Salil Mehta Signed-off-by: Shiju Jose Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit e4193e24a52016d9088e796c313f6eb3c9c540e0 Author: Shiju Jose Date: Thu Jun 13 17:12:23 2019 +0800 net: hns3: process H/W errors occurred before HNS dev initialization Presently the HNS driver enables the HNS H/W error interrupts after the dev initialization is completed. However some exceptions such as NCSI errors can occur when the network port driver is not loaded and those errors required reporting to the BMC. Therefore the firmware enabled all the HNS ras error interrupts before the driver is loaded. And in some cases, there will be some H/W errors remained unclear before reboot. Thus the HNS driver needs to process and recover those hw errors occurred before HNS driver is initialized. This patch adds processing of the HNS hw errors(RAS and MSI-X) which occurred before the driver initialization. For RAS, because they are enabled by firmware, so we can detect specific bits, then log and clear them. But for MSI-X which can not be enabled before open vector0 irq, we can't detect the specific error bits, so we just write 1 to all interrupt source registers to clear. Signed-off-by: Shiju Jose Signed-off-by: Weihang Li Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller .../net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c | 111 +++++++++++++++++++-- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_err.h | 1 + .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 3 + 3 files changed, 107 insertions(+), 8 deletions(-) commit a955d71df26c43337ca0ab8f9279d54715cd601f Author: Shiju Jose Date: Thu Jun 13 17:12:22 2019 +0800 net: hns3: fix avoid unnecessary resetting for the H/W errors which do not require reset HNS does not need to be reset when errors occur in some bits. However presently the HNAE3_FUNC_RESET is set in this case and as a result the default_reset is done when these errors are reported. This patch fix this issue. Also patch does some optimization in setting the reset level for the error recovery. Reported-by: Weihang Li Signed-off-by: Shiju Jose Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller .../net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c | 280 ++++++++------------- 1 file changed, 109 insertions(+), 171 deletions(-) commit 123297b78bc6ce7b8b599d18952d99ada958dd27 Author: Shiju Jose Date: Thu Jun 13 17:12:21 2019 +0800 net: hns3: delay setting of reset level for hw errors until slot_reset is called Presently the error handling code sets the reset level required for the recovery of the hw errors to the reset framework in the error_detected AER callback. However the rest_event would be called later from the slot_reset callback. This can cause issue of using the wrong reset_level if a high priority reset request occur before the slot_reset is called. This patch delays setting of the reset level, required for the hw errors, to the reset framework until the slot_reset is called. Reported-by: Salil Mehta Signed-off-by: Shiju Jose Signed-off-by: Weihang Li Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hnae3.h | 3 ++ drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 15 ++++-- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c | 61 ++++++++++------------ .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 14 +++-- 4 files changed, 51 insertions(+), 42 deletions(-) commit cbbe9bd0a0888b3a04eb797f05dcd7afd8194437 Merge: 1086ca3a63a3 fbce23a8036d Author: David S. Miller Date: Fri Jun 14 19:23:30 2019 -0700 Merge branch 'qed-iWARP-fixes' Michal Kalderon says: ==================== qed: iWARP fixes This series contains a few small fixes related to iWARP. ==================== Signed-off-by: David S. Miller commit fbce23a8036d995b17f79c31118d3f549ef44be8 Author: Michal Kalderon Date: Thu Jun 13 11:29:43 2019 +0300 qed: iWARP - Fix default window size to be based on chip The default window size is calculated for best performance based on internal hw buffer sizes. The size differs between the different chips and modes. Fixes: 67b40dccc45f ("qed: Implement iWARP initialization, teardown and qp operations") Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_iwarp.c | 30 ++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) commit cb94d52b93c74fe1f2595734fabeda9f8ae891ee Author: Michal Kalderon Date: Thu Jun 13 11:29:42 2019 +0300 qed: iWARP - Fix tc for MPA ll2 connection The driver needs to assign a lossless traffic class for the MPA ll2 connection to ensure no packets are dropped when returning from the driver as they will never be re-transmitted by the peer. Fixes: ae3488ff37dc ("qed: Add ll2 connection for processing unaligned MPA packets") Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_iwarp.c | 2 ++ 1 file changed, 2 insertions(+) commit 43cf40d93fadbb0d3edf0942a4612f8ff67478a1 Author: Michal Kalderon Date: Thu Jun 13 11:29:41 2019 +0300 qed: iWARP - fix uninitialized callback Fix uninitialized variable warning by static checker. Fixes: ae3488ff37dc ("qed: Add ll2 connection for processing unaligned MPA packets") Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_iwarp.c | 1 + 1 file changed, 1 insertion(+) commit 6117561e1bb30b2fe7f51e1961f34dbedd0bec8a Author: Michal Kalderon Date: Thu Jun 13 11:29:40 2019 +0300 qed: iWARP - Use READ_ONCE and smp_store_release to access ep->state Destroy QP waits for it's ep object state to be set to CLOSED before proceeding. ep->state can be updated from a different context. Add smp_store_release/READ_ONCE to synchronize. Fixes: fc4c6065e661 ("qed: iWARP implement disconnect flows") Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_iwarp.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 1086ca3a63a3af6b8a722fff55da46f111bc40ee Author: Dan Carpenter Date: Thu Jun 13 09:51:02 2019 +0300 net: phy: sfp: clean up a condition The acpi_node_get_property_reference() doesn't return ACPI error codes, it just returns regular negative kernel error codes. This patch doesn't affect run time, it's just a clean up. Signed-off-by: Dan Carpenter Reviewed-by: Ruslan Babayev Signed-off-by: David S. Miller drivers/net/phy/sfp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d5afa82c977ea06f7119058fa0eb8519ea501031 Author: Sunil Muthuswamy Date: Thu Jun 13 03:52:27 2019 +0000 vsock: correct removal of socket from the list The current vsock code for removal of socket from the list is both subject to race and inefficient. It takes the lock, checks whether the socket is in the list, drops the lock and if the socket was on the list, deletes it from the list. This is subject to race because as soon as the lock is dropped once it is checked for presence, that condition cannot be relied upon for any decision. It is also inefficient because if the socket is present in the list, it takes the lock twice. Signed-off-by: Sunil Muthuswamy Signed-off-by: David S. Miller net/vmw_vsock/af_vsock.c | 38 +++++++------------------------------- 1 file changed, 7 insertions(+), 31 deletions(-) commit b3733263ef23b9a2eab3dbe3cf8014091836458a Merge: d42176c6bf50 f767fc6655ea Author: David S. Miller Date: Fri Jun 14 19:18:27 2019 -0700 Merge branch 'nfp-add-two-user-friendly-errors' Jakub Kicinski says: ==================== nfp: add two user friendly errors This small series adds two error messages based on recent bug reports which turned out not to be bugs.. ==================== Signed-off-by: David S. Miller commit f767fc6655ea31eb8af2fc0d2c4461cdb05e3478 Author: Jakub Kicinski Date: Wed Jun 12 16:59:03 2019 -0700 nfp: print a warning when binding VFs to PF driver Users sometimes mistakenly try to manually bind the PF driver to the VFs, print a warning message in that case. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_main.c | 4 ++++ 1 file changed, 4 insertions(+) commit 605fd1c67e6557c2a0694b7dd7a9d70294944bb3 Author: Jakub Kicinski Date: Wed Jun 12 16:59:02 2019 -0700 nfp: update the old flash error message Apparently there are still cards in the wild with a very old management FW. Let's make the error message in that case indicate more clearly that management firmware has to be updated. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit d42176c6bf501191a929cf9926450d72627e834a Merge: 7c86f20d15b7 79c8bd15b61e Author: David S. Miller Date: Fri Jun 14 19:11:54 2019 -0700 Merge branch 'Microchip-KSZ-driver-enhancements' Robert Hancock says: ==================== Microchip KSZ driver enhancements A couple of enhancements to the Microchip KSZ switch driver: one to add PHY register settings for errata workarounds for more stable operation, and another to add a device tree option to change the output clock rate as required by some board designs. ==================== Signed-off-by: David S. Miller commit 79c8bd15b61eca456c49d20d083f02a2614b4d12 Author: Robert Hancock Date: Wed Jun 12 14:49:06 2019 -0600 net: dsa: microchip: Support optional 125MHz SYNCLKO output The KSZ9477 series chips have a SYNCLKO pin which by default outputs a 25MHz clock, but some board setups require a 125MHz clock instead. Added a microchip,synclko-125 device tree property to allow indicating a 125MHz clock output is required. Signed-off-by: Robert Hancock Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/dsa/ksz.txt | 2 ++ drivers/net/dsa/microchip/ksz9477.c | 4 ++++ drivers/net/dsa/microchip/ksz_common.c | 2 ++ drivers/net/dsa/microchip/ksz_priv.h | 1 + 4 files changed, 9 insertions(+) commit 1fc33199185ddb2296270a7ae8114c40ab28b17b Author: Robert Hancock Date: Wed Jun 12 14:49:05 2019 -0600 net: dsa: microchip: Add PHY errata workarounds The Silicon Errata and Data Sheet Clarification documents for the KSZ9477 series of chips describe a number of otherwise undocumented PHY register settings which are required to work around various chip errata. Apply these settings when initializing the PHY ports on these chips. Signed-off-by: Robert Hancock Signed-off-by: David S. Miller drivers/net/dsa/microchip/ksz9477.c | 62 ++++++++++++++++++++++++++++++++++++ drivers/net/dsa/microchip/ksz_priv.h | 1 + 2 files changed, 63 insertions(+) commit 7c86f20d15b7c1132e0c24358ce240ba4cb002b7 Author: Martin Blumenstingl Date: Wed Jun 12 21:31:15 2019 +0200 net: stmmac: use GPIO descriptors in stmmac_mdio_reset Switch stmmac_mdio_reset to use GPIO descriptors. GPIO core handles the "snps,reset-gpio" for GPIO descriptors so we don't need to take care of it inside the driver anymore. The advantage of this is that we now preserve the GPIO flags which are passed via devicetree. This is required on some newer Amlogic boards which use an Open Drain pin for the reset GPIO. This pin can only output a LOW signal or switch to input mode but it cannot output a HIGH signal. There are already devicetree bindings for these special cases and GPIO core already takes care of them but only if we use GPIO descriptors instead of GPIO numbers. Signed-off-by: Martin Blumenstingl Reviewed-by: Linus Walleij Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 27 +++++++++++------------ include/linux/stmmac.h | 2 +- 2 files changed, 14 insertions(+), 15 deletions(-) commit 4373a5e2606b4eda14fa096caf93dc2efc22689f Merge: f30e33bcdab9 9bb6cd652454 Author: David S. Miller Date: Fri Jun 14 18:52:14 2019 -0700 Merge branch 'packet-DDOS' Eric Dumazet says: ==================== net/packet: better behavior under DDOS Using tcpdump (or other af_packet user) on a busy host can lead to catastrophic consequences, because suddenly, potentially all cpus are spinning on a contended spinlock. Both packet_rcv() and tpacket_rcv() grab the spinlock to eventually find there is no room for an additional packet. This patch series align packet_rcv() and tpacket_rcv() to both check if the queue is full before grabbing the spinlock. If the queue is full, they both increment a new atomic counter placed on a separate cache line to let readers drain the queue faster. There is still false sharing on this new atomic counter, we might in the future make it per cpu if there is interest. ==================== Acked-by: Willem de Bruijn Signed-off-by: David S. Miller commit 9bb6cd652454969fa0ae6c52c8ebd31472d0171c Author: Eric Dumazet Date: Wed Jun 12 09:52:33 2019 -0700 net/packet: introduce packet_rcv_try_clear_pressure() helper There are two places where we want to clear the pressure if possible, add a helper to make it more obvious. Signed-off-by: Eric Dumazet Suggested-by: Willem de Bruijn Acked-by: Vinicius Costa Gomes Signed-off-by: David S. Miller net/packet/af_packet.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 3a2bb84e4aeab5c90d16e1cd17dbaa17631af529 Author: Eric Dumazet Date: Wed Jun 12 09:52:32 2019 -0700 net/packet: remove locking from packet_rcv_has_room() __packet_rcv_has_room() can now be run without lock being held. po->pressure is only a non persistent hint, we can mark all read/write accesses with READ_ONCE()/WRITE_ONCE() to document the fact that the field could be written without any synchronization. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/packet/af_packet.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit 2c51c6273c73ff04099f48fb42dfdd2acc7a1b70 Author: Eric Dumazet Date: Wed Jun 12 09:52:31 2019 -0700 net/packet: implement shortcut in tpacket_rcv() tpacket_rcv() can be hit under DDOS quite hard, since it will always grab a socket spinlock, to eventually find there is no room for an additional packet. Using tcpdump [1] on a busy host can lead to catastrophic consequences, because of all cpus spinning on a contended spinlock. This replicates a similar strategy used in packet_rcv() [1] Also some applications mistakenly use af_packet socket bound to ETH_P_ALL only to send packets. Receive queue is never drained and immediately full. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/packet/af_packet.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 8e8e2951e3095732d7e780c241f61ea130955a57 Author: Eric Dumazet Date: Wed Jun 12 09:52:30 2019 -0700 net/packet: make tp_drops atomic Under DDOS, we want to be able to increment tp_drops without touching the spinlock. This will help readers to drain the receive queue slightly faster :/ Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/packet/af_packet.c | 20 +++++++++++--------- net/packet/internal.h | 1 + 2 files changed, 12 insertions(+), 9 deletions(-) commit 0338a14523e3864524dafb6a66c7b82e94201317 Author: Eric Dumazet Date: Wed Jun 12 09:52:29 2019 -0700 net/packet: constify __packet_rcv_has_room() Goal is use the helper without lock being held. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/packet/af_packet.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit dcf70cefaf99a40cfa25face160f29c1cf3bf84d Author: Eric Dumazet Date: Wed Jun 12 09:52:28 2019 -0700 net/packet: constify prb_lookup_block() and __tpacket_v3_has_room() Goal is to be able to use __tpacket_v3_has_room() without holding a lock. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/packet/af_packet.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit d4b5bd98faec345933d6080989e035a833b1077a Author: Eric Dumazet Date: Wed Jun 12 09:52:27 2019 -0700 net/packet: constify packet_lookup_frame() and __tpacket_has_room() Goal is to be able to use __tpacket_has_room() without holding a lock. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/packet/af_packet.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 96f657e6cfc25b27d8189cb6b9eac66e1b1ff4f3 Author: Eric Dumazet Date: Wed Jun 12 09:52:26 2019 -0700 net/packet: constify __packet_get_status() argument struct packet_sock is only read. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/packet/af_packet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f30e33bcdab9d541febfb56a04c6bb7d8026accc Author: Robert Hancock Date: Tue Jun 11 16:06:09 2019 -0600 net: phy: Add more 1000BaseX support detection Commit "net: phy: Add detection of 1000BaseX link mode support" added support for not filtering out 1000BaseX mode from the PHY's supported modes in genphy_config_init, but we have to make a similar change in genphy_read_abilities in order to actually detect it as a supported mode in the first place. Add this in. Signed-off-by: Robert Hancock Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/phy_device.c | 2 ++ 1 file changed, 2 insertions(+) commit 9126e75e39e14c357cfb2820abf0733bbc3cd8dc Author: Ivan Khoronzhuk Date: Wed Jun 12 00:59:40 2019 +0300 net: ethernet: ti: cpsw_ethtool: simplify slave loops Only for consistency reasons, do it like in main cpsw.c module and use ndev reference but not by means of slave. Signed-off-by: Ivan Khoronzhuk Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw_ethtool.c | 40 ++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 19 deletions(-) commit bfe59032bd6127ee190edb30be9381a01765b958 Author: Ivan Khoronzhuk Date: Wed Jun 12 00:49:03 2019 +0300 net: ethernet: ti: cpsw: use cpsw as drv data No need to set ndev for drvdata when mainly cpsw reference is needed, so correct this legacy decision. Reviewed-by: Grygorii Strashko Signed-off-by: Ivan Khoronzhuk Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 7f94208c8f9a0a6d2ff0e0c0858c00ad8e5c8617 Author: YueHaibing Date: Wed Jun 12 17:18:47 2019 +0800 bpf: Fix build error without CONFIG_INET If CONFIG_INET is not set, building fails: kernel/bpf/verifier.o: In function `check_mem_access': verifier.c: undefined reference to `bpf_xdp_sock_is_valid_access' kernel/bpf/verifier.o: In function `convert_ctx_accesses': verifier.c: undefined reference to `bpf_xdp_sock_convert_ctx_access' Reported-by: Hulk Robot Fixes: fada7fdc83c0 ("bpf: Allow bpf_map_lookup_elem() on an xskmap") Signed-off-by: YueHaibing Acked-by: Jonathan Lemon Signed-off-by: Daniel Borkmann include/linux/bpf.h | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) commit 69d96519dbf0bfa1868dc8597d4b9b2cdeb009d7 Author: Stanislav Fomichev Date: Wed Jun 12 10:30:40 2019 -0700 selftests/bpf: convert socket_cookie test to sk storage This lets us test that both BPF_PROG_TYPE_CGROUP_SOCK_ADDR and BPF_PROG_TYPE_SOCK_OPS can access underlying bpf_sock. Cc: Martin Lau Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann .../selftests/bpf/progs/socket_cookie_prog.c | 46 ++++++++++++++-------- tools/testing/selftests/bpf/test_socket_cookie.c | 24 +++++------ 2 files changed, 38 insertions(+), 32 deletions(-) commit cd17d77705780e2270937fb3cbd2b985adab3edc Author: Stanislav Fomichev Date: Wed Jun 12 10:30:39 2019 -0700 bpf/tools: sync bpf.h Add sk to struct bpf_sock_addr and struct bpf_sock_ops. Cc: Martin Lau Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann tools/include/uapi/linux/bpf.h | 2 ++ 1 file changed, 2 insertions(+) commit 1314ef561102e534e14cb1d37f89f5c1df0b2ea7 Author: Stanislav Fomichev Date: Wed Jun 12 10:30:38 2019 -0700 bpf: export bpf_sock for BPF_PROG_TYPE_SOCK_OPS prog type And let it use bpf_sk_storage_{get,delete} helpers to access socket storage. Kernel context (struct bpf_sock_ops_kern) already has sk member, so I just expose it to the BPF hooks. I use PTR_TO_SOCKET_OR_NULL and return NULL in !is_fullsock case. I also export bpf_tcp_sock to make it possible to access tcp socket stats. Cc: Martin Lau Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann include/uapi/linux/bpf.h | 1 + net/core/filter.c | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) commit fb85c4a730af221339c1dde1a434b73da0dfc3ed Author: Stanislav Fomichev Date: Wed Jun 12 10:30:37 2019 -0700 bpf: export bpf_sock for BPF_PROG_TYPE_CGROUP_SOCK_ADDR prog type And let it use bpf_sk_storage_{get,delete} helpers to access socket storage. Kernel context (struct bpf_sock_addr_kern) already has sk member, so I just expose it to the BPF hooks. Using PTR_TO_SOCKET instead of PTR_TO_SOCK_COMMON should be safe because the hook is called on bind/connect. Cc: Martin Lau Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann include/uapi/linux/bpf.h | 1 + net/core/filter.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) commit d30bd78ce8ba1f093aa4877ed06601d0debd872b Author: Martin KaFai Lau Date: Thu Jun 13 15:00:05 2019 -0700 bpf: Add test for SO_REUSEPORT_DETACH_BPF This patch adds a test for the new sockopt SO_REUSEPORT_DETACH_BPF. Signed-off-by: Martin KaFai Lau Reviewed-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann .../testing/selftests/bpf/test_select_reuseport.c | 54 ++++++++++++++++++++++ 1 file changed, 54 insertions(+) commit 5d4d823d0ac9cbb70f93ef02b54d270cd2cba4c7 Author: Greg Kroah-Hartman Date: Thu Jun 13 13:45:48 2019 +0200 drm/vc4: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Reviewed-by: Eric Anholt Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20190613114548.GC13119@kroah.com drivers/gpu/drm/vc4/vc4_debugfs.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 13a748ea6df1fee13fdcbd9d10a3d70f9e188b48 Author: Martin KaFai Lau Date: Thu Jun 13 15:00:03 2019 -0700 bpf: Sync asm-generic/socket.h to tools/ SO_DETACH_REUSEPORT_BPF is needed for the test in the next patch. It is defined in the socket.h. Signed-off-by: Martin KaFai Lau Reviewed-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann tools/include/uapi/asm-generic/socket.h | 147 ++++++++++++++++++++++++++++++++ 1 file changed, 147 insertions(+) commit 99f3a064bc2e4bd5fe50218646c5be342f2ad18c Author: Martin KaFai Lau Date: Thu Jun 13 15:00:01 2019 -0700 bpf: net: Add SO_DETACH_REUSEPORT_BPF There is SO_ATTACH_REUSEPORT_[CE]BPF but there is no DETACH. This patch adds SO_DETACH_REUSEPORT_BPF sockopt. The same sockopt can be used to undo both SO_ATTACH_REUSEPORT_[CE]BPF. reseport_detach_prog() is added and it is mostly a mirror of the existing reuseport_attach_prog(). The differences are, it does not call reuseport_alloc() and returns -ENOENT when there is no old prog. Cc: Craig Gallek Signed-off-by: Martin KaFai Lau Reviewed-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann arch/alpha/include/uapi/asm/socket.h | 2 ++ arch/mips/include/uapi/asm/socket.h | 2 ++ arch/parisc/include/uapi/asm/socket.h | 2 ++ arch/sparc/include/uapi/asm/socket.h | 2 ++ include/net/sock_reuseport.h | 2 ++ include/uapi/asm-generic/socket.h | 2 ++ net/core/sock.c | 4 ++++ net/core/sock_reuseport.c | 24 ++++++++++++++++++++++++ 8 files changed, 40 insertions(+) commit e55d54f43d3f11718d9e2800225097fda498e141 Author: Andrii Nakryiko Date: Wed Jun 12 22:04:57 2019 -0700 libbpf: fix check for presence of associated BTF for map creation Kernel internally checks that either key or value type ID is specified, before using btf_fd. Do the same in libbpf's map creation code for determining when to retry map creation w/o BTF. Reported-by: Dan Carpenter Fixes: fba01a0689a9 ("libbpf: use negative fd to specify missing BTF") Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann tools/lib/bpf/libbpf.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit cabd3e889b5772a0dc448ddca9a4b23591640bca Author: Dan Carpenter Date: Thu Jun 13 10:00:21 2019 +0300 selftests/bpf: signedness bug in enable_all_controllers() The "len" variable needs to be signed for the error handling to work properly. Fixes: 596092ef8bea ("selftests/bpf: enable all available cgroup v2 controllers") Signed-off-by: Dan Carpenter Acked-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/cgroup_helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b552d33c80a967a4f653b53243562f1bd4950e8c Author: Prashant Bhole Date: Fri Jun 14 15:43:18 2019 +0900 samples/bpf: fix include path in Makefile Recent commit included libbpf.h in selftests/bpf/bpf_util.h. Since some samples use bpf_util.h and samples/bpf/Makefile doesn't have libbpf.h path included, build was failing. Let's add the path in samples/bpf/Makefile. Signed-off-by: Prashant Bhole Signed-off-by: Daniel Borkmann samples/bpf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cd0727aa42f9dddcd1a4afa35e8c804c7910f078 Author: Neil Armstrong Date: Tue Jun 11 17:01:01 2019 +0200 arm64: dts: meson-g12a-x96-max: add sound card Enable the sound card on the X96 Max, enabling HDMI output using the TDM interface B, being aligned on other boards sound cards. SPDI/F support is also enabled to the physical toslink port and to HDMI. The internal DAC connected to the audio jack will be added later on, when driver support is added. Tested by running: tinymix set "FRDDR_A SRC 1 EN Switch" 1 tinymix set "FRDDR_A SINK 1 SEL" "OUT 1" tinymix set "FRDDR_B SRC 1 EN Switch" 1 tinymix set "FRDDR_B SINK 1 SEL" "OUT 1" tinymix set "FRDDR_C SRC 1 EN Switch" 1 tinymix set "FRDDR_C SINK 1 SEL" "OUT 1" tinymix set "TOHDMITX I2S SRC" "I2S B" tinymix set "TOHDMITX Switch" 1 then: tinymix set "TDMOUT_B SRC SEL" "IN 0" speaker-test -Dhw:0,0 -c2 then: tinymix set "TDMOUT_B SRC SEL" "IN 1" speaker-test -Dhw:0,1 -c2 then: tinymix set "TDMOUT_B SRC SEL" "IN 2" speaker-test -Dhw:0,2 -c2 testing HDMI audio output from the all 3 ASoC playback interfaces. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts | 131 +++++++++++++++++++++ 1 file changed, 131 insertions(+) commit aa7d5873bf6edb385f347d07ed94a4b0386906c1 Author: Neil Armstrong Date: Tue Jun 11 16:31:20 2019 +0200 arm64: dts: meson-g12b-odroid-n2: add sound card Enable the sound card on the Hardkernel Odroid-N2, enabling HDMI output using the TDM interface B, being aligned on other boards sound cards. The internal DAC connected to the audio jack will be added later on, when driver support is added. Tested by running: tinymix set "FRDDR_A SRC 1 EN Switch" 1 tinymix set "FRDDR_A SINK 1 SEL" "OUT 1" tinymix set "FRDDR_B SRC 1 EN Switch" 1 tinymix set "FRDDR_B SINK 1 SEL" "OUT 1" tinymix set "FRDDR_C SRC 1 EN Switch" 1 tinymix set "FRDDR_C SINK 1 SEL" "OUT 1" tinymix set "TOHDMITX I2S SRC" "I2S B" tinymix set "TOHDMITX Switch" 1 then: tinymix set "TDMOUT_B SRC SEL" "IN 0" speaker-test -Dhw:0,0 -c2 then: tinymix set "TDMOUT_B SRC SEL" "IN 1" speaker-test -Dhw:0,1 -c2 then: tinymix set "TDMOUT_B SRC SEL" "IN 2" speaker-test -Dhw:0,2 -c2 testing HDMI audio output from the all 3 ASoC playback interfaces. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman .../boot/dts/amlogic/meson-g12b-odroid-n2.dts | 88 ++++++++++++++++++++++ 1 file changed, 88 insertions(+) commit 64c10554bf9cccd039ee642a7be2bedb6fc98195 Author: Jerome Brunet Date: Fri May 24 16:03:18 2019 +0200 arm64: dts: meson: sei510: add sound card Enable the sound card on the sei510: * TDM interface A is connected to an external DAC and a speaker installed on the device. * HDMI is expected to use TDM B. It can also use TDM A but will be limited to 2 channels, as accepted by the external DAC. * 2 Built in PDM mics through the PDM interface. * Both TDM outputs may use HW loopback. The internal DAC connected to audio jack will be added later on, when driver support is added. Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts | 202 +++++++++++++++++++++- 1 file changed, 201 insertions(+), 1 deletion(-) commit b06c8c6e9b7bf30f5994ab9b74ccd0ea1ee6cd78 Author: Maxime Jourdan Date: Fri May 24 16:03:17 2019 +0200 arm64: dts: meson: sei510: add max98357a DAC The SEI510 board features a max98357a audio codec for built-in speaker Signed-off-by: Maxime Jourdan Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts | 7 +++++++ 1 file changed, 7 insertions(+) commit b39978086abfe3a1ed97e5377ef1019f5053f1cd Merge: 568465c3fb91 abdcfc25641c Author: Kevin Hilman Date: Fri Jun 14 15:55:25 2019 -0700 Merge tag 'asoc-tohdmitx' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into HEAD ASoC: tohdmitx bindings The patch on this branch adds bindings for tohdmitx, including a header to be used in DT bindings which needs to be shared with the arm-soc tree in order to allow system DTs to be merged. # gpg: Signature made Fri 14 Jun 2019 11:43:33 AM PDT # gpg: using RSA key ADE668AA675718B59FE29FEA24D68B725D5487D0 # gpg: issuer "broonie@kernel.org" # gpg: Good signature from "Mark Brown " [full] # gpg: aka "Mark Brown " [full] # gpg: aka "Mark Brown " [full] # gpg: aka "Mark Brown " [full] # gpg: aka "Mark Brown " [unknown] # gpg: aka "Mark Brown " [unknown] * tag 'asoc-tohdmitx' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound: ASoC: meson: add tohdmitx DT bindings commit eea9e3a40dbc15a4b03b447158c2555079875ba5 Merge: d96ec9751114 55f968726e14 Author: David S. Miller Date: Fri Jun 14 15:35:18 2019 -0700 Merge branch 'net-mlx5-use-indirect-call-wrappers' Paolo Abeni says: ==================== net/mlx5: use indirect call wrappers The mlx5_core driver uses several indirect calls in fast-path, some of them are invoked on each ingress packet, even for the XDP-only traffic. This series leverage the indirect call wrappers infrastructure the avoid the expansive RETPOLINE overhead for 2 indirect calls in fast-path. Each call is addressed on a different patch, plus we need to introduce a couple of additional helpers to cope with the higher number of possible direct-call alternatives. v2 -> v3: - do not add more INDIRECT_CALL_* macros - use only the direct calls always available regardless of the mlx5 build options in the last patch v1 -> v2: - update the direct call list and use a macro to define it, as per Saeed suggestion. An intermediated additional macro is needed to allow arg list expansion - patch 2/3 is unchanged, as the generated code looks better this way than with possible alternative (dropping BP hits) ==================== Signed-off-by: David S. Miller commit 55f968726e14ced7558fd4cb229fcc6b12d7f788 Author: Paolo Abeni Date: Wed Jun 12 12:18:36 2019 +0200 net/mlx5e: use indirect calls wrapper for the rx packet handler We can avoid another indirect call per packet wrapping the rx handler call with the proper helper. To ensure that even the last listed direct call experience measurable gain, despite the additional conditionals we must traverse before reaching it, I tested reversing the order of the listed options, with performance differences below noise level. Together with the previous indirect call patch, this gives ~6% performance improvement in raw UDP tput. v2 -> v3: - use only the direct calls always available regardless of the mlx5 build options - drop the direct call list macro, to keep the code as simple as possible for future rework v1 -> v2: - update the direct call list and use a macro to define it, as per Saeed suggestion. An intermediated additional macro is needed to allow arg list expansion Signed-off-by: Paolo Abeni Acked-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b3c04e8340824cae0f40bc2b4a009025b0d6e285 Author: Paolo Abeni Date: Wed Jun 12 12:18:35 2019 +0200 net/mlx5e: use indirect calls wrapper for skb allocation We can avoid an indirect call per packet wrapping the skb creation with the appropriate helper. Signed-off-by: Paolo Abeni Acked-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) commit c9913ac42135cf7f1c8986bcb175c5a7dda126e6 Author: Lee Jones Date: Wed Jun 12 15:26:49 2019 +0100 i2c: qcom-geni: Provide support for ACPI Add a match table to allow automatic probing of ACPI device QCOM0220. Ignore clock attainment errors. Set default clock frequency value. Signed-off-by: Lee Jones Acked-by: Ard Biesheuvel Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-qcom-geni.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit c3c2889b8a2c9dfccca5aad647878ae0032dfc69 Author: Lee Jones Date: Wed Jun 12 15:26:50 2019 +0100 i2c: qcom-geni: Signify successful driver probe The Qualcomm Geni I2C driver currently probes silently which can be confusing when debugging potential issues. Add a low level (INFO) print when each I2C controller is successfully initially set-up. Signed-off-by: Lee Jones Acked-by: Ard Biesheuvel Acked-by: Bjorn Andersson Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-qcom-geni.c | 2 ++ 1 file changed, 2 insertions(+) commit acc8abcb2a9ca26318d86f53addf952dea930ab7 Author: Bitan Biswas Date: Thu Jun 6 22:37:47 2019 -0700 i2c: tegra: Add suspend-resume support Post suspend I2C registers have power on reset values. Before any transfer initialize I2C registers to prevent I2C transfer timeout and implement suspend and resume callbacks needed. Fix below errors post suspend: 1) Tegra I2C transfer timeout during jetson tx2 resume: [ 27.520613] pca953x 1-0074: calling pca953x_resume+0x0/0x1b0 @ 2939, parent: i2c-1 [ 27.633623] tegra-i2c 3160000.i2c: i2c transfer timed out [ 27.639162] pca953x 1-0074: Unable to sync registers 0x3-0x5. -110 [ 27.645336] pca953x 1-0074: Failed to sync GPIO dir registers: -110 [ 27.651596] PM: dpm_run_callback(): pca953x_resume+0x0/0x1b0 returns -110 [ 27.658375] pca953x 1-0074: pca953x_resume+0x0/0x1b0 returned -110 after 127152 usecs [ 27.666194] PM: Device 1-0074 failed to resume: error -110 2) Tegra I2C transfer timeout error on jetson Xavier post resume. Remove i2c bus lock-unlock calls in resume callback as i2c_mark_adapter_* (suspended-resumed) help ensure i2c core calls from client are not executed before i2c-tegra resume. Signed-off-by: Bitan Biswas Reviewed-by: Dmitry Osipenko Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-tegra.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 76cc9f0efd952d376e93e79b1f19fd6fdb8291bc Author: Wolfram Sang Date: Mon Jun 3 10:25:35 2019 +0200 i2c: headers: reformat header comment and update copyright Let's stick to coding style. Signed-off-by: Wolfram Sang include/linux/i2c.h | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) commit 2caea56f569ac361fc854f6bf2fe94b70514c917 Author: Wolfram Sang Date: Mon Jun 3 10:25:34 2019 +0200 i2c: headers: update docs about I2C_CLIENT_* Update kerneldoc for i2c client flags because they increased over time. Also, move them to a position where they can be more easily found. Signed-off-by: Wolfram Sang include/linux/i2c.h | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) commit edd7a5639f83c2d2bb6ee021addac1bc4624a822 Author: Wolfram Sang Date: Mon Jun 3 10:25:33 2019 +0200 i2c: core: always have a named variable in arguments Much better to read and understand. Signed-off-by: Wolfram Sang drivers/i2c/i2c-core-base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d68222d4d6647611be5a32c80a53a145e7c80ce9 Author: Wolfram Sang Date: Mon Jun 3 10:25:32 2019 +0200 i2c: headers: always have a named variable in arguments Much better to read and understand. Naming for i2c_adapter is not consistent (yet), so use the name which is also used in core code. Signed-off-by: Wolfram Sang include/linux/i2c.h | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) commit e1714daad7cf8fe4d6dd91adcfbbdd0604b0210d Author: Wolfram Sang Date: Mon Jun 3 10:25:31 2019 +0200 i2c: headers: don't use 'dev' as adapter variable It is not a struct device, so 'dev' is confusing. Use 'adap', the most common name. Signed-off-by: Wolfram Sang include/linux/i2c.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c45d4ba8673196e3adc70d4a6b3752c74dd64c98 Author: Sagar Shrikant Kadam Date: Sat Jun 1 11:41:15 2019 +0530 i2c: ocores: add polling mode workaround for Sifive FU540-C000 SoC The i2c-ocore driver already has a polling mode interface.But it needs a workaround for FU540 Chipset on HiFive unleashed board (RevA00). There is an erratum in FU540 chip that prevents interrupt driven i2c transfers from working, and also the I2C controller's interrupt bit cannot be cleared if set, due to this the existing i2c polling mode interface added in mainline earlier doesn't work, and CPU stall's infinitely, when-ever i2c transfer is initiated. Ref: commit dd7dbf0eb090 ("i2c: ocores: refactor setup for polling") The workaround / fix under OCORES_FLAG_BROKEN_IRQ is particularly for FU540-COOO SoC. The polling function identifies a SiFive device based on the device node and enables the workaround. Signed-off-by: Sagar Shrikant Kadam Reviewed-by: Andrew Lunn Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-ocores.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) commit d9ce957d414bf871a57da332dff033a501698b9c Author: Sagar Shrikant Kadam Date: Sat Jun 1 11:41:14 2019 +0530 i2c: ocores: add support for i2c device on Sifive FU540-c000 SoC Update device id table for Opencore's I2C master based re-implementation used in FU540-c000 chipset on HiFive Unleashed platform. Device ID's include Sifive, soc-specific device for chip specific tweaks and sifive IP block specific device for generic programming model. Signed-off-by: Sagar Shrikant Kadam Reviewed-by: Andrew Lunn Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-ocores.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 7ea651ec392ecbd52227e009a482b571ce7b3bce Author: Sagar Shrikant Kadam Date: Sat Jun 1 11:41:13 2019 +0530 dt-bindings: i2c: extend existing opencore bindings Reformatted compatibility strings to one valid combination on each line. Add FU540-C000 specific device tree bindings to already available i2-ocores file. This device is available on HiFive Unleashed Rev A00 board. Move interrupt under optional property list as this can be optional. The FU540-C000 SoC from sifive, has an Opencore's I2C block reimplementation. The DT compatibility string for this IP is present in HDL and available at. https://github.com/sifive/sifive-blocks/blob/master/src/main/scala/devices/i2c/I2C.scala#L73 Signed-off-by: Sagar Shrikant Kadam Reviewed-by: Rob Herring Signed-off-by: Wolfram Sang Documentation/devicetree/bindings/i2c/i2c-ocores.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit d680a50cb9c59669d4f695f732731ed298a31bec Author: Thierry Reding Date: Mon May 27 12:29:39 2019 +0200 i2c: tegra: Avoid error message on deferred probe If the driver defers probe because of a missing clock, avoid outputting an error message. The clock will show up eventually. Signed-off-by: Thierry Reding Acked-by: Jon Hunter Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-tegra.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit aa5ae06515a451d543d9ab37e2c14f97a5ba4519 Author: Andy Shevchenko Date: Thu Jun 13 19:45:27 2019 +0300 i2c: i801: Fix kernel crash in is_dell_system_with_lis3lv02d() The commit 19b07cb4a187 ("i2c: i801: Register optional lis3lv02d I2C device on Dell machines") introduced a new check in order to enumerate some slave devices on Dell machines. Though, it brings a regression on machines where DMI vendor is not set. BUG: kernel NULL pointer dereference, address: 0000000000000000 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 0 P4D 0 Oops: 0000 [#1] SMP PTI CPU: 8 PID: 1 Comm: swapper/0 Not tainted 5.2.0-rc4-next-20190613+ #317 RIP: 0010:strcmp+0xc/0x20 To fix this crash, check if vendor field is present before accessing to it. Fixes: 19b07cb4a187 ("i2c: i801: Register optional lis3lv02d I2C device on Dell machines") Signed-off-by: Andy Shevchenko Reviewed-by: Pali Rohár Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-i801.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 151f4e2bdc7a04020ae5c533896fb91a16e1f501 Author: Mauro Carvalho Chehab Date: Thu Jun 13 07:10:36 2019 -0300 docs: power: convert docs to ReST and rename to *.rst Convert the PM documents to ReST, in order to allow them to build with Sphinx. The conversion is actually: - add blank lines and indentation in order to identify paragraphs; - fix tables markups; - add some lists markups; - mark literal blocks; - adjust title markups. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Bjorn Helgaas Acked-by: Mark Brown Acked-by: Srivatsa S. Bhat (VMware) Documentation/ABI/testing/sysfs-class-powercap | 2 +- Documentation/admin-guide/kernel-parameters.txt | 6 +- Documentation/cpu-freq/core.txt | 2 +- Documentation/driver-api/pm/devices.rst | 6 +- Documentation/driver-api/usb/power-management.rst | 2 +- Documentation/power/{apm-acpi.txt => apm-acpi.rst} | 10 +- ...sic-pm-debugging.txt => basic-pm-debugging.rst} | 79 ++-- .../{charger-manager.txt => charger-manager.rst} | 105 +++-- .../{drivers-testing.txt => drivers-testing.rst} | 15 +- .../power/{energy-model.txt => energy-model.rst} | 105 ++--- ...freezing-of-tasks.txt => freezing-of-tasks.rst} | 91 ++-- Documentation/power/index.rst | 46 ++ .../power/{interface.txt => interface.rst} | 24 +- Documentation/power/{opp.txt => opp.rst} | 175 ++++--- Documentation/power/{pci.txt => pci.rst} | 87 +++- .../{pm_qos_interface.txt => pm_qos_interface.rst} | 127 +++--- Documentation/power/power_supply_class.rst | 282 ++++++++++++ Documentation/power/power_supply_class.txt | 231 ---------- Documentation/power/powercap/powercap.rst | 257 +++++++++++ Documentation/power/powercap/powercap.txt | 236 ---------- .../power/regulator/{consumer.txt => consumer.rst} | 141 +++--- .../power/regulator/{design.txt => design.rst} | 9 +- .../power/regulator/{machine.txt => machine.rst} | 47 +- .../power/regulator/{overview.txt => overview.rst} | 57 ++- Documentation/power/regulator/regulator.rst | 32 ++ Documentation/power/regulator/regulator.txt | 30 -- .../power/{runtime_pm.txt => runtime_pm.rst} | 234 +++++----- Documentation/power/{s2ram.txt => s2ram.rst} | 20 +- ...d-cpuhotplug.txt => suspend-and-cpuhotplug.rst} | 42 +- ...d-interrupts.txt => suspend-and-interrupts.rst} | 2 + ...nd-swap-files.txt => swsusp-and-swap-files.rst} | 17 +- .../{swsusp-dmcrypt.txt => swsusp-dmcrypt.rst} | 122 ++--- Documentation/power/swsusp.rst | 501 +++++++++++++++++++++ Documentation/power/swsusp.txt | 446 ------------------ Documentation/power/{tricks.txt => tricks.rst} | 6 +- .../{userland-swsusp.txt => userland-swsusp.rst} | 55 ++- Documentation/power/{video.txt => video.rst} | 156 ++++--- Documentation/process/submitting-drivers.rst | 2 +- Documentation/scheduler/sched-energy.txt | 6 +- Documentation/trace/coresight-cpu-debug.txt | 2 +- .../zh_CN/process/submitting-drivers.rst | 2 +- MAINTAINERS | 4 +- arch/x86/Kconfig | 2 +- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/opp/Kconfig | 2 +- drivers/power/supply/power_supply_core.c | 2 +- include/linux/interrupt.h | 2 +- include/linux/pci.h | 2 +- include/linux/pm.h | 2 +- kernel/power/Kconfig | 6 +- net/wireless/Kconfig | 2 +- 51 files changed, 2132 insertions(+), 1711 deletions(-) commit 9d9b889540c380d8f56f7a79edbaae2fff8684d1 Author: Konstantin Khlebnikov Date: Sun Jun 9 14:14:36 2019 +0300 block: document iostat changes for disk busy time accounting Since commit 5b18b5a73760 ("block: delete part_round_stats and switch to less precise counting") io_ticks is approximated by adding one at each start and end of requests if jiffies has changed. This works perfectly for requests shorter than a jiffy. If requests runs more than 2 jiffies some I/O time will not be accounted unless there are other reuqests. Signed-off-by: Konstantin Khlebnikov Signed-off-by: Jonathan Corbet Documentation/iostats.txt | 4 ++++ 1 file changed, 4 insertions(+) commit 31753202325dd4f9bba27fbbad05f189881c60bc Author: Bhupesh Sharma Date: Mon Jun 10 15:33:39 2019 +0530 Documentation/stackprotector: powerpc supports stack protector powerpc architecture (both 64-bit and 32-bit) supports stack protector mechanism since some time now [see commit 06ec27aea9fc ("powerpc/64: add stack protector support")]. Update stackprotector arch support documentation to reflect the same. Cc: Michael Ellerman Signed-off-by: Bhupesh Sharma Signed-off-by: Jonathan Corbet Documentation/features/debug/stackprotector/arch-support.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cd84d63a2983ee2d386ff5a020c2c36562e4ef68 Author: Suzuki K Poulose Date: Mon Jun 10 19:02:42 2019 +0100 Documentation: coresight: Update the generic device names Update the documentation to reflect the new naming scheme with latest changes. Reported-by: Leo Yan Reviewed-by: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Jonathan Corbet Documentation/trace/coresight.txt | 82 ++++++++++++++++++++++++++++++++------- 1 file changed, 67 insertions(+), 15 deletions(-) commit 83e8b971f81cebe4f9a84cc76d328ac955b62a7a Author: André Almeida Date: Tue Jun 11 17:03:16 2019 -0300 sphinx.rst: Add note about code snippets embedded in the text There's a paragraph that explains how to create fixed width text block, but it doesn't explains how to create fixed width text inline, although this feature is really used through the documentation. Fix that adding a quick note about it. Signed-off-by: André Almeida Signed-off-by: Jonathan Corbet Documentation/doc-guide/sphinx.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 407b584d155be67a9311a62da8d7874f62b987ac Author: Mauro Carvalho Chehab Date: Thu Jun 13 07:29:17 2019 -0300 scripts/documentation-file-ref-check: ignore output dir When there's no Documentation/output directory, the script will complain about those missing references: Documentation/doc-guide/sphinx.rst: Documentation/output Documentation/doc-guide/sphinx.rst: Documentation/output Documentation/process/howto.rst: Documentation/output Documentation/translations/it_IT/doc-guide/sphinx.rst: Documentation/output Documentation/translations/it_IT/doc-guide/sphinx.rst: Documentation/output Documentation/translations/it_IT/process/howto.rst: Documentation/output Documentation/translations/ja_JP/howto.rst: Documentation/output Documentation/translations/ko_KR/howto.rst: Documentation/output Those are false positives, so add an ignore rule for them. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet scripts/documentation-file-ref-check | 3 +++ 1 file changed, 3 insertions(+) commit a2f405a5269fc7d705926298971dcb5e76054e8a Author: Mauro Carvalho Chehab Date: Wed Jun 12 14:53:04 2019 -0300 docs: EDID/HOWTO.txt: convert it and rename to howto.rst Sphinx need to know when a paragraph ends. So, do some adjustments at the file for it to be properly parsed. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. that's said, I believe that this file should be moved to the GPU/DRM documentation. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/EDID/{HOWTO.txt => howto.rst} | 35 ++++++++++++++++--------- Documentation/admin-guide/kernel-parameters.txt | 2 +- drivers/gpu/drm/Kconfig | 2 +- 3 files changed, 24 insertions(+), 15 deletions(-) commit d6a3b247627a3bc0551504eb305d624cc6fb5453 Author: Mauro Carvalho Chehab Date: Wed Jun 12 14:53:03 2019 -0300 docs: scheduler: convert docs to ReST and rename to *.rst In order to prepare to add them to the Kernel API book, convert the files to ReST format. The conversion is actually: - add blank lines and identation in order to identify paragraphs; - fix tables markups; - add some lists markups; - mark literal blocks; - adjust title markups. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/ABI/testing/sysfs-kernel-uids | 2 +- .../scheduler/{completion.txt => completion.rst} | 38 +-- Documentation/scheduler/index.rst | 29 ++ .../scheduler/{sched-arch.txt => sched-arch.rst} | 18 +- .../scheduler/{sched-bwc.txt => sched-bwc.rst} | 30 +- .../{sched-deadline.txt => sched-deadline.rst} | 311 +++++++++++---------- .../{sched-design-CFS.txt => sched-design-CFS.rst} | 15 +- .../{sched-domains.txt => sched-domains.rst} | 8 +- .../{sched-energy.txt => sched-energy.rst} | 47 ++-- ...sched-nice-design.txt => sched-nice-design.rst} | 6 +- .../{sched-rt-group.txt => sched-rt-group.rst} | 28 +- .../scheduler/{sched-stats.txt => sched-stats.rst} | 35 ++- Documentation/scheduler/text_files.rst | 5 + Documentation/vm/numa.rst | 2 +- init/Kconfig | 6 +- kernel/sched/deadline.c | 2 +- 16 files changed, 340 insertions(+), 242 deletions(-) commit d223884089734cc637c4e5458870d69f6ded9f89 Author: Mauro Carvalho Chehab Date: Wed Jun 12 14:53:02 2019 -0300 docs: xilinx: convert eemi.txt to eemi.rst This is a very trivial conversion: adjust the title markup and add a few literal block markups to produce a better visual when parsed and avoid warnings. As newer documents related to xilinx could be added in the future, create a new index file for it. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/xilinx/{eemi.txt => eemi.rst} | 8 ++++---- Documentation/xilinx/index.rst | 17 +++++++++++++++++ 2 files changed, 21 insertions(+), 4 deletions(-) commit cc2a2d19f896d174cad16c2348100bec49c00958 Author: Mauro Carvalho Chehab Date: Wed Jun 12 14:53:01 2019 -0300 docs: watchdog: convert docs to ReST and rename to *.rst Convert those documents and prepare them to be part of the kernel API book, as most of the stuff there are related to the Kernel interfaces. Still, in the future, it would make sense to split the docs, as some of the stuff is clearly focused on sysadmin tasks. The conversion is actually: - add blank lines and identation in order to identify paragraphs; - fix tables markups; - add some lists markups; - mark literal blocks; - adjust title markups. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Guenter Roeck Signed-off-by: Jonathan Corbet Documentation/admin-guide/kernel-parameters.txt | 2 +- Documentation/kernel-per-CPU-kthreads.txt | 2 +- ...l_api.txt => convert_drivers_to_kernel_api.rst} | 109 +-- Documentation/watchdog/{hpwdt.txt => hpwdt.rst} | 25 +- Documentation/watchdog/index.rst | 25 + .../watchdog/{mlx-wdt.txt => mlx-wdt.rst} | 24 +- .../{pcwd-watchdog.txt => pcwd-watchdog.rst} | 13 +- .../{watchdog-api.txt => watchdog-api.rst} | 76 ++- ...hdog-kernel-api.txt => watchdog-kernel-api.rst} | 91 ++- Documentation/watchdog/watchdog-parameters.rst | 736 +++++++++++++++++++++ Documentation/watchdog/watchdog-parameters.txt | 410 ------------ .../watchdog/{watchdog-pm.txt => watchdog-pm.rst} | 3 + Documentation/watchdog/{wdt.txt => wdt.rst} | 31 +- MAINTAINERS | 2 +- drivers/watchdog/Kconfig | 6 +- drivers/watchdog/smsc37b787_wdt.c | 2 +- 16 files changed, 1004 insertions(+), 553 deletions(-) commit 458f69ef36656dc74679667380422dd8063eabfb Author: Mauro Carvalho Chehab Date: Wed Jun 12 14:53:00 2019 -0300 docs: timers: convert docs to ReST and rename to *.rst The conversion here is really trivial: just a bunch of title markups and very few puntual changes is enough to make it to be parsed by Sphinx and generate a nice html. The conversion is actually: - add blank lines and identation in order to identify paragraphs; - fix tables markups; - add some lists markups; - mark literal blocks; - adjust title markups. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Acked-by: Mark Brown Signed-off-by: Jonathan Corbet Documentation/timers/{highres.txt => highres.rst} | 13 +++---- Documentation/timers/{hpet.txt => hpet.rst} | 4 ++- .../timers/{hrtimers.txt => hrtimers.rst} | 6 ++-- Documentation/timers/index.rst | 22 ++++++++++++ Documentation/timers/{NO_HZ.txt => no_hz.rst} | 40 +++++++++++++--------- .../timers/{timekeeping.txt => timekeeping.rst} | 3 +- .../timers/{timers-howto.txt => timers-howto.rst} | 15 +++++--- MAINTAINERS | 2 +- drivers/media/usb/dvb-usb-v2/anysee.c | 2 +- drivers/regulator/core.c | 2 +- include/linux/iopoll.h | 4 +-- include/linux/regmap.h | 4 +-- scripts/checkpatch.pl | 8 ++--- sound/soc/sof/ops.h | 2 +- 14 files changed, 84 insertions(+), 43 deletions(-) commit 4ca9bc225e46eb7bc040dd948be7cb68975d80d3 Author: Mauro Carvalho Chehab Date: Wed Jun 12 14:52:59 2019 -0300 docs: target: convert docs to ReST and rename to *.rst Convert the TCM docs to ReST format and add them to the bookset. This has a mix of userspace-faced and Kernelspace faced docs. Still, it sounds a better candidate to be added at the kernel API set of docs. The conversion is actually: - add blank lines and identation in order to identify paragraphs; - fix tables markups; - add some lists markups; - mark literal blocks; - adjust title markups. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/target/index.rst | 19 ++ Documentation/target/scripts.rst | 11 + Documentation/target/tcm_mod_builder.rst | 149 +++++++++++ Documentation/target/tcm_mod_builder.txt | 145 ----------- .../target/{tcmu-design.txt => tcmu-design.rst} | 272 +++++++++++---------- scripts/documentation-file-ref-check | 2 +- 6 files changed, 328 insertions(+), 270 deletions(-) commit bdf3a950fb46600a2c34e5f3d9810c274e59a031 Author: Mauro Carvalho Chehab Date: Wed Jun 12 14:52:58 2019 -0300 docs: riscv: convert docs to ReST and rename to *.rst The conversion here is trivial: - Adjust the document title's markup - Do some whitespace alignment; - mark literal blocks; - Use ReST way to markup indented lists. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/riscv/index.rst | 17 ++++++ Documentation/riscv/{pmu.txt => pmu.rst} | 98 +++++++++++++++++--------------- 2 files changed, 69 insertions(+), 46 deletions(-) commit 329f00415a424063c23f75ff77f7d9c67916324d Author: Mauro Carvalho Chehab Date: Wed Jun 12 14:52:57 2019 -0300 docs: ptp.txt: convert to ReST and move to driver-api The conversion is trivial: just adjust title markups. In order to avoid conflicts, let's add an :orphan: tag to it, to be removed when this file gets added to the driver-api book. Signed-off-by: Mauro Carvalho Chehab Acked-by: Richard Cochran Signed-off-by: Jonathan Corbet Documentation/{ptp/ptp.txt => driver-api/ptp.rst} | 26 ++++++++++++++++------- Documentation/networking/timestamping.txt | 2 +- MAINTAINERS | 2 +- 3 files changed, 20 insertions(+), 10 deletions(-) commit 28aedd7ee214eb63a2e6924b5ec2b081aa7b3953 Author: Mauro Carvalho Chehab Date: Wed Jun 12 14:52:56 2019 -0300 docs: pps.txt: convert to ReST and rename to pps.rst This file is already in a good shape: just its title and adding some literal block markups is needed for it to be part of the document. While it has a small chapter with sysfs stuff, most of the document is focused on driver development. As it describes a kernel API, move it to the driver-api directory. In order to avoid conflicts, let's add an :orphan: tag to it, to be removed when added to the driver-api book. Signed-off-by: Mauro Carvalho Chehab Acked-by: Rodolfo Giometti Signed-off-by: Jonathan Corbet Documentation/{pps/pps.txt => driver-api/pps.rst} | 67 ++++++++++++----------- MAINTAINERS | 2 +- 2 files changed, 36 insertions(+), 33 deletions(-) commit 99c8b231ae6c6ca4ca2fd1c0b3701071f589661f Author: Mauro Carvalho Chehab Date: Wed Jun 12 14:52:41 2019 -0300 docs: cgroup-v1: convert docs to ReST and rename to *.rst Convert the cgroup-v1 files to ReST format, in order to allow a later addition to the admin-guide. The conversion is actually: - add blank lines and identation in order to identify paragraphs; - fix tables markups; - add some lists markups; - mark literal blocks; - adjust title markups. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Acked-by: Tejun Heo Signed-off-by: Tejun Heo Documentation/admin-guide/hw-vuln/l1tf.rst | 2 +- Documentation/admin-guide/kernel-parameters.txt | 4 +- .../admin-guide/mm/numa_memory_policy.rst | 2 +- Documentation/block/bfq-iosched.txt | 2 +- .../{blkio-controller.txt => blkio-controller.rst} | 96 +++-- .../cgroup-v1/{cgroups.txt => cgroups.rst} | 186 +++++---- .../cgroup-v1/{cpuacct.txt => cpuacct.rst} | 15 +- .../cgroup-v1/{cpusets.txt => cpusets.rst} | 209 ++++++---- .../cgroup-v1/{devices.txt => devices.rst} | 40 +- ...freezer-subsystem.txt => freezer-subsystem.rst} | 14 +- .../cgroup-v1/{hugetlb.txt => hugetlb.rst} | 41 +- Documentation/cgroup-v1/index.rst | 30 ++ .../cgroup-v1/{memcg_test.txt => memcg_test.rst} | 265 +++++++----- Documentation/cgroup-v1/{memory.txt => memory.rst} | 463 +++++++++++++-------- .../cgroup-v1/{net_cls.txt => net_cls.rst} | 37 +- .../cgroup-v1/{net_prio.txt => net_prio.rst} | 24 +- Documentation/cgroup-v1/{pids.txt => pids.rst} | 82 ++-- Documentation/cgroup-v1/{rdma.txt => rdma.rst} | 66 +-- Documentation/filesystems/tmpfs.txt | 2 +- Documentation/scheduler/sched-deadline.txt | 2 +- Documentation/scheduler/sched-design-CFS.txt | 2 +- Documentation/scheduler/sched-rt-group.txt | 2 +- Documentation/vm/numa.rst | 4 +- Documentation/vm/page_migration.rst | 2 +- Documentation/vm/unevictable-lru.rst | 2 +- Documentation/x86/x86_64/fake-numa-for-cpusets.rst | 4 +- MAINTAINERS | 2 +- block/Kconfig | 2 +- include/linux/cgroup-defs.h | 2 +- include/uapi/linux/bpf.h | 2 +- init/Kconfig | 2 +- kernel/cgroup/cpuset.c | 2 +- security/device_cgroup.c | 2 +- tools/include/uapi/linux/bpf.h | 2 +- 34 files changed, 966 insertions(+), 648 deletions(-) commit 3bdab16c55f57a24245c97d707241dd9b48d1a91 Author: Mauro Carvalho Chehab Date: Wed Jun 12 14:52:53 2019 -0300 docs: pcmcia: convert docs to ReST and rename to *.rst Convert the pcmcia docs to ReST format. Most of the changes here are trivial. The conversion is actually: - add blank lines and identation in order to identify paragraphs; - fix tables markups; - add some lists markups; - mark literal blocks; - adjust title markups. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Acked-by: Dominik Brodowski Signed-off-by: Jonathan Corbet .../pcmcia/{devicetable.txt => devicetable.rst} | 4 +++ .../{driver-changes.txt => driver-changes.rst} | 35 ++++++++++++------- Documentation/pcmcia/{driver.txt => driver.rst} | 18 +++++----- Documentation/pcmcia/index.rst | 20 +++++++++++ Documentation/pcmcia/{locking.txt => locking.rst} | 39 +++++++++++++++------- drivers/pcmcia/ds.c | 2 +- include/pcmcia/ds.h | 2 +- include/pcmcia/ss.h | 2 +- 8 files changed, 86 insertions(+), 36 deletions(-) commit 593733ab80ac2c607acc1fc3fbaba5031d38253a Author: Mauro Carvalho Chehab Date: Wed Jun 12 14:52:52 2019 -0300 docs: netlabel: convert docs to ReST and rename to *.rst Convert netlabel documentation to ReST. This was trivial: just add proper title markups. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Acked-by: Paul Moore Signed-off-by: Jonathan Corbet .../netlabel/{cipso_ipv4.txt => cipso_ipv4.rst} | 19 +++++++++++++------ Documentation/netlabel/draft_ietf.rst | 5 +++++ Documentation/netlabel/index.rst | 21 +++++++++++++++++++++ .../netlabel/{introduction.txt => introduction.rst} | 16 +++++++++++----- .../{lsm_interface.txt => lsm_interface.rst} | 16 +++++++++++----- 5 files changed, 61 insertions(+), 16 deletions(-) commit 09bbf055c3329008522b4a9814afe412c202daa7 Author: Mauro Carvalho Chehab Date: Wed Jun 12 14:52:51 2019 -0300 docs: mic: convert docs to ReST and rename to *.rst Convert Intel Many Integrated Core architecture docs to ReST. The conversion is trivial: just add title and literal block markups, and adjust some identation. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/mic/index.rst | 18 +++++++ .../mic/{mic_overview.txt => mic_overview.rst} | 6 ++- .../mic/{scif_overview.txt => scif_overview.rst} | 58 +++++++++++++--------- 3 files changed, 57 insertions(+), 25 deletions(-) commit d67297ad343ec02a88f947b45526c92d2870aed3 Author: Mauro Carvalho Chehab Date: Wed Jun 12 14:52:49 2019 -0300 docs: kdump: convert docs to ReST and rename to *.rst Convert kdump documentation to ReST and add it to the user faced manual, as the documents are mainly focused on sysadmins that would be enabling kdump. Note: the vmcoreinfo.rst has one very long title on one of its sub-sections: PG_lru|PG_private|PG_swapcache|PG_swapbacked|PG_slab|PG_hwpoision|PG_head_mask|PAGE_BUDDY_MAPCOUNT_VALUE(~PG_buddy)|PAGE_OFFLINE_MAPCOUNT_VALUE(~PG_offline) I opted to break this one, into two entries with the same content, in order to make it easier to display after being parsed in html and PDF. The conversion is actually: - add blank lines and identation in order to identify paragraphs; - fix tables markups; - add some lists markups; - mark literal blocks; - adjust title markups. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/admin-guide/bug-hunting.rst | 2 +- Documentation/admin-guide/kernel-parameters.txt | 6 +- Documentation/kdump/index.rst | 21 ++++ Documentation/kdump/{kdump.txt => kdump.rst} | 131 ++++++++++++--------- .../kdump/{vmcoreinfo.txt => vmcoreinfo.rst} | 59 ++++------ Documentation/powerpc/firmware-assisted-dump.txt | 2 +- Documentation/translations/zh_CN/oops-tracing.txt | 2 +- Documentation/watchdog/hpwdt.txt | 2 +- arch/arm/Kconfig | 2 +- arch/arm64/Kconfig | 2 +- arch/sh/Kconfig | 2 +- arch/x86/Kconfig | 4 +- 12 files changed, 137 insertions(+), 98 deletions(-) commit cd238effefa28fac177e51dcf5e9d1a8b59c3c6b Author: Mauro Carvalho Chehab Date: Wed Jun 12 14:52:48 2019 -0300 docs: kbuild: convert docs to ReST and rename to *.rst The kbuild documentation clearly shows that the documents there are written at different times: some use markdown, some use their own peculiar logic to split sections. Convert everything to ReST without affecting too much the author's style and avoiding adding uneeded markups. The conversion is actually: - add blank lines and identation in order to identify paragraphs; - fix tables markups; - add some lists markups; - mark literal blocks; - adjust title markups. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/admin-guide/README.rst | 2 +- .../{headers_install.txt => headers_install.rst} | 5 +- Documentation/kbuild/index.rst | 27 ++ Documentation/kbuild/issues.rst | 11 + Documentation/kbuild/{kbuild.txt => kbuild.rst} | 119 +++-- .../{kconfig-language.txt => kconfig-language.rst} | 242 +++++----- ...cro-language.txt => kconfig-macro-language.rst} | 37 +- Documentation/kbuild/{kconfig.txt => kconfig.rst} | 136 +++--- .../kbuild/{makefiles.txt => makefiles.rst} | 530 +++++++++++++-------- Documentation/kbuild/{modules.txt => modules.rst} | 170 ++++--- Documentation/kernel-hacking/hacking.rst | 4 +- Documentation/process/coding-style.rst | 2 +- Documentation/process/submit-checklist.rst | 2 +- .../translations/it_IT/kernel-hacking/hacking.rst | 4 +- .../translations/it_IT/process/coding-style.rst | 2 +- .../it_IT/process/submit-checklist.rst | 2 +- .../translations/zh_CN/process/coding-style.rst | 2 +- .../zh_CN/process/submit-checklist.rst | 2 +- Kconfig | 2 +- arch/arc/plat-eznps/Kconfig | 2 +- arch/c6x/Kconfig | 2 +- arch/microblaze/Kconfig.debug | 2 +- arch/microblaze/Kconfig.platform | 2 +- arch/nds32/Kconfig | 2 +- arch/openrisc/Kconfig | 2 +- arch/powerpc/sysdev/Kconfig | 2 +- arch/riscv/Kconfig | 2 +- drivers/auxdisplay/Kconfig | 2 +- drivers/firmware/Kconfig | 2 +- drivers/mtd/devices/Kconfig | 2 +- drivers/net/ethernet/smsc/Kconfig | 6 +- drivers/net/wireless/intel/iwlegacy/Kconfig | 4 +- drivers/net/wireless/intel/iwlwifi/Kconfig | 2 +- drivers/parport/Kconfig | 2 +- drivers/scsi/Kconfig | 4 +- drivers/staging/sm750fb/Kconfig | 2 +- drivers/usb/misc/Kconfig | 4 +- drivers/video/fbdev/Kconfig | 14 +- net/bridge/netfilter/Kconfig | 2 +- net/ipv4/netfilter/Kconfig | 2 +- net/ipv6/netfilter/Kconfig | 2 +- net/netfilter/Kconfig | 16 +- net/tipc/Kconfig | 2 +- scripts/Kbuild.include | 4 +- scripts/Makefile.host | 2 +- scripts/kconfig/symbol.c | 2 +- .../tests/err_recursive_dep/expected_stderr | 14 +- sound/oss/dmasound/Kconfig | 6 +- 48 files changed, 846 insertions(+), 567 deletions(-) commit d7b461c5e82fc5f5e4261f3b0228ecda58eb9f1a Author: Mauro Carvalho Chehab Date: Wed Jun 12 14:52:47 2019 -0300 docs: ide: convert docs to ReST and rename to *.rst The conversion is actually: - add blank lines and identation in order to identify paragraphs; - fix tables markups; - add some lists markups; - mark literal blocks; - adjust title markups. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Acked-by: Geert Uytterhoeven Signed-off-by: Jonathan Corbet Documentation/admin-guide/kernel-parameters.txt | 2 +- Documentation/cdrom/ide-cd.rst | 18 +-- Documentation/ide/changelogs.rst | 17 +++ Documentation/ide/{ide-tape.txt => ide-tape.rst} | 23 ++-- Documentation/ide/{ide.txt => ide.rst} | 147 +++++++++++---------- Documentation/ide/index.rst | 21 +++ .../{warm-plug-howto.txt => warm-plug-howto.rst} | 10 +- arch/m68k/q40/README | 2 +- drivers/ide/Kconfig | 20 +-- 9 files changed, 155 insertions(+), 105 deletions(-) commit c220a1fae6c5df52ed3a02f88b86a27830ea0210 Author: Mauro Carvalho Chehab Date: Wed Jun 12 14:52:46 2019 -0300 docs: fpga: convert docs to ReST and rename to *.rst The dfl.txt file is almost there. It needs just a few adjustments to be properly parsed. The conversion is actually: - add blank lines and identation in order to identify paragraphs; - fix tables markups; - add some lists markups; - mark literal blocks; - adjust title markups. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/fpga/{dfl.txt => dfl.rst} | 58 ++++++++++++++++++--------------- Documentation/fpga/index.rst | 17 ++++++++++ MAINTAINERS | 2 +- 3 files changed, 50 insertions(+), 27 deletions(-) commit ab42b818954c040fa13639dc031d8541edcecb4b Author: Mauro Carvalho Chehab Date: Wed Jun 12 14:52:45 2019 -0300 docs: fb: convert docs to ReST and rename to *.rst The conversion is actually: - add blank lines and identation in order to identify paragraphs; - fix tables markups; - add some lists markups; - mark literal blocks; - adjust title markups. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Also, removed the Maintained by, as requested by Geert. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/admin-guide/kernel-parameters.txt | 2 +- Documentation/fb/{api.txt => api.rst} | 29 +- Documentation/fb/{arkfb.txt => arkfb.rst} | 8 +- Documentation/fb/{aty128fb.txt => aty128fb.rst} | 35 +- Documentation/fb/{cirrusfb.txt => cirrusfb.rst} | 47 +-- .../fb/{cmap_xfbdev.txt => cmap_xfbdev.rst} | 57 +-- .../fb/{deferred_io.txt => deferred_io.rst} | 28 +- Documentation/fb/{efifb.txt => efifb.rst} | 18 +- Documentation/fb/{ep93xx-fb.txt => ep93xx-fb.rst} | 27 +- Documentation/fb/{fbcon.txt => fbcon.rst} | 179 +++++---- .../fb/{framebuffer.txt => framebuffer.rst} | 80 ++-- Documentation/fb/{gxfb.txt => gxfb.rst} | 24 +- Documentation/fb/index.rst | 50 +++ Documentation/fb/{intel810.txt => intel810.rst} | 79 ++-- Documentation/fb/{intelfb.txt => intelfb.rst} | 62 +-- Documentation/fb/{internals.txt => internals.rst} | 24 +- Documentation/fb/{lxfb.txt => lxfb.rst} | 25 +- Documentation/fb/matroxfb.rst | 443 +++++++++++++++++++++ Documentation/fb/matroxfb.txt | 413 ------------------- .../fb/{metronomefb.txt => metronomefb.rst} | 8 +- Documentation/fb/{modedb.txt => modedb.rst} | 44 +- Documentation/fb/pvr2fb.rst | 66 +++ Documentation/fb/pvr2fb.txt | 65 --- Documentation/fb/{pxafb.txt => pxafb.rst} | 81 ++-- Documentation/fb/{s3fb.txt => s3fb.rst} | 8 +- Documentation/fb/{sa1100fb.txt => sa1100fb.rst} | 23 +- Documentation/fb/sh7760fb.rst | 130 ++++++ Documentation/fb/sh7760fb.txt | 131 ------ Documentation/fb/{sisfb.txt => sisfb.rst} | 40 +- Documentation/fb/{sm501.txt => sm501.rst} | 7 +- Documentation/fb/{sm712fb.txt => sm712fb.rst} | 18 +- Documentation/fb/sstfb.rst | 207 ++++++++++ Documentation/fb/sstfb.txt | 174 -------- Documentation/fb/{tgafb.txt => tgafb.rst} | 30 +- Documentation/fb/{tridentfb.txt => tridentfb.rst} | 36 +- Documentation/fb/{udlfb.txt => udlfb.rst} | 55 +-- Documentation/fb/{uvesafb.txt => uvesafb.rst} | 142 +++---- Documentation/fb/{vesafb.txt => vesafb.rst} | 121 +++--- Documentation/fb/viafb.rst | 297 ++++++++++++++ Documentation/fb/viafb.txt | 252 ------------ Documentation/fb/{vt8623fb.txt => vt8623fb.rst} | 10 +- MAINTAINERS | 10 +- drivers/tty/Kconfig | 2 +- drivers/video/fbdev/Kconfig | 24 +- drivers/video/fbdev/matrox/matroxfb_base.c | 2 +- drivers/video/fbdev/pxafb.c | 2 +- drivers/video/fbdev/sh7760fb.c | 2 +- 47 files changed, 1952 insertions(+), 1665 deletions(-) commit 10ffebbed5503b1830c7920ef528075785351be6 Author: Mauro Carvalho Chehab Date: Wed Jun 12 14:52:44 2019 -0300 docs: fault-injection: convert docs to ReST and rename to *.rst The conversion is actually: - add blank lines and identation in order to identify paragraphs; - fix tables markups; - add some lists markups; - mark literal blocks; - adjust title markups. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Acked-by: Federico Vaga Signed-off-by: Jonathan Corbet .../{fault-injection.txt => fault-injection.rst} | 281 +++++++++++---------- Documentation/fault-injection/index.rst | 20 ++ ...-error-inject.txt => notifier-error-inject.rst} | 18 +- .../fault-injection/nvme-fault-injection.rst | 120 +++++++++ .../fault-injection/nvme-fault-injection.txt | 116 --------- Documentation/fault-injection/provoke-crashes.rst | 48 ++++ Documentation/fault-injection/provoke-crashes.txt | 38 --- Documentation/process/4.Coding.rst | 2 +- .../translations/it_IT/process/4.Coding.rst | 2 +- .../translations/zh_CN/process/4.Coding.rst | 2 +- drivers/misc/lkdtm/core.c | 2 +- include/linux/fault-inject.h | 2 +- lib/Kconfig.debug | 2 +- tools/testing/fault-injection/failcmd.sh | 2 +- 14 files changed, 352 insertions(+), 303 deletions(-) commit f0ba43774cea3fc14732bb9243ce7238ae8a3202 Author: Mauro Carvalho Chehab Date: Wed Jun 12 14:52:43 2019 -0300 docs: convert docs to ReST and rename to *.rst The conversion is actually: - add blank lines and indentation in order to identify paragraphs; - fix tables markups; - add some lists markups; - mark literal blocks; - adjust title markups. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Acked-by: Bjorn Helgaas Acked-by: Mark Brown Signed-off-by: Jonathan Corbet .../{cache-policies.txt => cache-policies.rst} | 24 ++- .../device-mapper/{cache.txt => cache.rst} | 214 +++++++++++--------- .../device-mapper/{delay.txt => delay.rst} | 29 +-- .../device-mapper/{dm-crypt.txt => dm-crypt.rst} | 61 +++--- .../device-mapper/{dm-flakey.txt => dm-flakey.rst} | 45 +++-- .../device-mapper/{dm-init.txt => dm-init.rst} | 75 ++++--- .../{dm-integrity.txt => dm-integrity.rst} | 62 ++++-- .../device-mapper/{dm-io.txt => dm-io.rst} | 14 +- .../device-mapper/{dm-log.txt => dm-log.rst} | 5 +- .../{dm-queue-length.txt => dm-queue-length.rst} | 25 ++- .../device-mapper/{dm-raid.txt => dm-raid.rst} | 225 +++++++++++++-------- .../{dm-service-time.txt => dm-service-time.rst} | 76 ++++--- Documentation/device-mapper/dm-uevent.rst | 110 ++++++++++ Documentation/device-mapper/dm-uevent.txt | 97 --------- .../device-mapper/{dm-zoned.txt => dm-zoned.rst} | 10 +- Documentation/device-mapper/{era.txt => era.rst} | 36 ++-- Documentation/device-mapper/index.rst | 44 ++++ .../device-mapper/{kcopyd.txt => kcopyd.rst} | 10 +- Documentation/device-mapper/linear.rst | 63 ++++++ Documentation/device-mapper/linear.txt | 61 ------ .../{log-writes.txt => log-writes.rst} | 105 +++++----- .../{persistent-data.txt => persistent-data.rst} | 4 + .../device-mapper/{snapshot.txt => snapshot.rst} | 116 ++++++----- .../{statistics.txt => statistics.rst} | 62 +++--- Documentation/device-mapper/striped.rst | 61 ++++++ Documentation/device-mapper/striped.txt | 57 ------ .../device-mapper/{switch.txt => switch.rst} | 47 +++-- ...thin-provisioning.txt => thin-provisioning.rst} | 68 ++++--- .../device-mapper/{unstriped.txt => unstriped.rst} | 93 +++++---- .../device-mapper/{verity.txt => verity.rst} | 20 +- .../{writecache.txt => writecache.rst} | 13 +- Documentation/device-mapper/{zero.txt => zero.rst} | 14 +- Documentation/filesystems/ubifs-authentication.md | 4 +- drivers/md/Kconfig | 2 +- drivers/md/dm-init.c | 2 +- drivers/md/dm-raid.c | 2 +- 36 files changed, 1142 insertions(+), 814 deletions(-) commit 8ea618899b6b4fbe97c8462e7d769867307de011 Author: Mauro Carvalho Chehab Date: Wed Jun 12 14:52:40 2019 -0300 docs: cdrom: convert docs to ReST and rename to *.rst The stuff there is almost already at ReST format. A conversion for them is trivial: just add a missing titles and fix some scape codes for them to match ReST syntax. While here, rename the cdrom-standard.txt, with was converted from LaTeX to ReST on the previous patch, and add it to the index file. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet .../{cdrom-standard.txt => cdrom-standard.rst} | 0 Documentation/cdrom/{ide-cd => ide-cd.rst} | 184 +++++++++++---------- Documentation/cdrom/index.rst | 19 +++ .../{packet-writing.txt => packet-writing.rst} | 27 +-- MAINTAINERS | 2 +- drivers/block/Kconfig | 2 +- drivers/cdrom/cdrom.c | 2 +- drivers/ide/ide-cd.c | 2 +- 8 files changed, 134 insertions(+), 104 deletions(-) commit e327cfcb25422c91f4bb8e8a3488386ac95955f1 Author: Mauro Carvalho Chehab Date: Wed Jun 12 14:52:39 2019 -0300 docs: cdrom-standard.tex: convert from LaTeX to ReST This is the only LaTeX documentation file inside the documentation. Instead of having a Latex document directly there, convert it to ReST format, as this is the format we're using for docs. For now, let's keep the extension as .txt in order to avoid warnings when building the documentation with Sphinx. The next patch patch will rename it to .rst and add it to the building system. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/cdrom/Makefile | 21 - Documentation/cdrom/cdrom-standard.tex | 1026 ------------------------------ Documentation/cdrom/cdrom-standard.txt | 1063 ++++++++++++++++++++++++++++++++ drivers/cdrom/cdrom.c | 2 +- 4 files changed, 1064 insertions(+), 1048 deletions(-) commit b693d0b372afb39432e1c49ad7b3454855bc6bed Author: Mauro Carvalho Chehab Date: Wed Jun 12 14:52:38 2019 -0300 docs: arm64: convert docs to ReST and rename to .rst The documentation is in a format that is very close to ReST format. The conversion is actually: - add blank lines in order to identify paragraphs; - fixing tables markups; - adding some lists markups; - marking literal blocks; - adjust some title markups. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet ...acpi_object_usage.txt => acpi_object_usage.rst} | 288 +++++++++++++++------ Documentation/arm64/{arm-acpi.txt => arm-acpi.rst} | 163 ++++++------ Documentation/arm64/{booting.txt => booting.rst} | 91 ++++--- ...ure-registers.txt => cpu-feature-registers.rst} | 210 +++++++-------- .../arm64/{elf_hwcaps.txt => elf_hwcaps.rst} | 56 +--- .../arm64/{hugetlbpage.txt => hugetlbpage.rst} | 7 +- Documentation/arm64/index.rst | 28 ++ ...cy_instructions.txt => legacy_instructions.rst} | 43 +-- Documentation/arm64/memory.rst | 98 +++++++ Documentation/arm64/memory.txt | 97 ------- ...thentication.txt => pointer-authentication.rst} | 2 + .../{silicon-errata.txt => silicon-errata.rst} | 65 ++++- Documentation/arm64/{sve.txt => sve.rst} | 12 +- .../{tagged-pointers.txt => tagged-pointers.rst} | 6 +- Documentation/translations/zh_CN/arm64/booting.txt | 4 +- .../zh_CN/arm64/legacy_instructions.txt | 4 +- Documentation/translations/zh_CN/arm64/memory.txt | 4 +- .../translations/zh_CN/arm64/silicon-errata.txt | 4 +- .../translations/zh_CN/arm64/tagged-pointers.txt | 4 +- Documentation/virtual/kvm/api.txt | 2 +- arch/arm64/include/asm/efi.h | 2 +- arch/arm64/include/asm/image.h | 2 +- arch/arm64/include/uapi/asm/sigcontext.h | 2 +- arch/arm64/kernel/kexec_image.c | 2 +- 24 files changed, 710 insertions(+), 486 deletions(-) commit 305a99eb98af22996e9771078b7a19978732ed41 Author: Mauro Carvalho Chehab Date: Wed Jun 12 14:52:37 2019 -0300 docs: aoe: convert docs to ReST and rename to *.rst There are only two files within Documentation/aoe dir that are documentation. The remaining ones are examples and shell scripts. Convert the two AoE files to ReST format, and add the others as literal, as they're part of the documentation. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/aoe/{aoe.txt => aoe.rst} | 65 ++++++++++++++++++-------------- Documentation/aoe/examples.rst | 23 +++++++++++ Documentation/aoe/index.rst | 19 ++++++++++ Documentation/aoe/{todo.txt => todo.rst} | 3 ++ Documentation/aoe/udev.txt | 2 +- 5 files changed, 82 insertions(+), 30 deletions(-) commit 8afecfb0ec961e37e61b2d19c4fa71617a9482de Merge: ce1a5ea18ef9 d1fdb6d8f6a4 Author: Jonathan Corbet Date: Fri Jun 14 14:18:53 2019 -0600 Merge tag 'v5.2-rc4' into mauro We need to pick up post-rc1 changes to various document files so they don't get lost in Mauro's massive RST conversion push. commit 514af5f0995219da7f18d73ecece6e7d1fec8c4e Author: Gustavo A. R. Silva Date: Wed May 1 15:55:41 2019 -0500 i40e: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warning: drivers/net/ethernet/intel/i40e/i40e_xsk.c: In function ‘i40e_run_xdp_zc’: drivers/net/ethernet/intel/i40e/i40e_xsk.c:217:3: warning: this statement may fall through [-Wimplicit-fallthrough=] bpf_warn_invalid_xdp_action(act); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/intel/i40e/i40e_xsk.c:218:2: note: here case XDP_ABORTED: ^~~~ Signed-off-by: "Gustavo A. R. Silva" Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_xsk.c | 1 + 1 file changed, 1 insertion(+) commit c1e212bfc32ea8368ef3fa5232203029be507908 Author: Aleksandr Loktionov Date: Wed Apr 24 05:20:55 2019 -0700 i40e: Missing response checks in driver when starting/stopping FW LLDP Driver updated pf->flags before calling i40e_aq_start_lldp(). This patch moved down updating pf->flags down so flags will be updated only in case of successful i40e_aq_start_lldp() call. Also was introduced is_reset_needed local flag to avoid unnecessary h/w reset in case 40e_aq_start_lldp() didn't change lldp state. Signed-off-by: Aleksandr Loktionov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 45 ++++++++++++++------------ 1 file changed, 24 insertions(+), 21 deletions(-) commit 781ee4ae16e5c7482ed2e0027aaaccace4c7a885 Author: Jacob Keller Date: Wed Apr 24 05:20:54 2019 -0700 i40e: remove duplicate stat calculation for tx_errors The tx_errors statistic was being calculated twice in i40e_update_eth_stats. This appears to be as of commit 201db2898f2c ("i40e: add missing VSI statistics", 2014-03-25). Remove the extra i40e_stat_update32 call for GLV_TEPC. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 3 --- 1 file changed, 3 deletions(-) commit fefa9cfddf29a7c76ab052d13c2ef7170d9d6511 Author: Adam Ludkiewicz Date: Wed Apr 24 05:20:53 2019 -0700 i40e: Check if the BAR size is large enough before writing to registers This patch fixes the problem with a kernel panic occurring when trying to bind the i40e driver to a non-i40e port. The problem is fixed by checking if the BAR size in the device is large enough by reading the highest register. Signed-off-by: Adam Ludkiewicz Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit c1041d07043748460f215386b760f3943f6890bb Author: Piotr Marczak Date: Wed Apr 24 05:20:52 2019 -0700 i40e: Missing response checks in driver when starting/stopping FW LLDP Driver did not check response on LLDP flag change and always returned SUCCESS. This patch now checks for an error and returns an error code and has additional information in the log. Signed-off-by: Piotr Marczak Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 27 ++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) commit d510497b8397ec875edd1a86aaee207822245eee Author: Sergey Nemov Date: Wed Apr 24 05:20:51 2019 -0700 i40e: add input validation for virtchnl handlers Change some data to unsigned int instead of integer when we compare. Check LUT values in VIRTCHNL_OP_CONFIG_RSS_LUT handler. Also enhance error/warning messages to print the real values of I40E_MAX_VF_QUEUES, I40E_MAX_VF_VSI and I40E_DEFAULT_QUEUES_PER_VF instead of plain text. Refactor code to comply with 'check first then assign' policy. Remove duplicate checks for VIRTCHNL_OP_CONFIG_RSS_KEY and VIRTCHNL_OP_CONFIG_RSS_LUT opcodes in i40e_vc_process_vf_msg(). We have the very same checks inside the handlers already. Signed-off-by: Sergey Nemov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 74 +++++++++------------- 1 file changed, 31 insertions(+), 43 deletions(-) commit b83ebf506ba3241ccb61175f432f7ae4fece9111 Author: Doug Dziggel Date: Wed Apr 24 05:20:50 2019 -0700 i40e: Improve AQ log granularity This patch makes it possible to log only AQ descriptors, without the entire AQ message buffers being dumped too. It should greatly reduce kernel log size in cases where a full AQ dump is not needed. Selection is made by setting flags in hw->debug_mask. Additionally, some debug messages that preceded an AQ dump have been moved to I40E_DEBUG_AQ_COMMAND class, which seems more appropriate. Signed-off-by: Doug Dziggel Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_adminq.c | 8 +++--- drivers/net/ethernet/intel/i40e/i40e_common.c | 40 ++++++++++++++------------- 2 files changed, 25 insertions(+), 23 deletions(-) commit f5a2b3ffb7af4b6ae5b905850a1a6bad82b268b9 Author: Piotr Kwapulinski Date: Wed Apr 24 05:20:49 2019 -0700 i40e: Add bounds check for ch[] array Add bounds check for ch[] array. Use ARRAY_SIZE() to ensure that idx is within the range. Signed-off-by: Piotr Kwapulinski Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 97e42ef440a37efee0878625d18d22e57c3077cb Author: Mitch Williams Date: Wed Apr 24 05:20:48 2019 -0700 i40e: Use signed variable The counter variable in i40e_clean_tx_irq starts out negative and climbs to 0. So it should not be defined as a u16. This was working by accident due to the fact the u16 overflows and underflows predictably. Replace the u16 with int, which is signed and can handle the negativity. Signed-off-by: Mitch Williams Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_txrx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f031c7227a4af718455918d28e7431f89b94d006 Author: Piotr Kwapulinski Date: Wed Apr 24 05:20:47 2019 -0700 i40e: add constraints for accessing veb array Add veb array access boundary checks. Ensure veb array index is smaller than I40E_MAX_VEB. Signed-off-by: Piotr Kwapulinski Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 51110f162d215beb13417426bc1ab9ce6320f1a1 Author: Piotr Kwapulinski Date: Wed Apr 24 05:20:46 2019 -0700 i40e: let untrusted VF to create up to 16 VLANs This patch lets untrusted VF to create up to 16 VLANs. It was implemented by increasing I40E_VC_MAX_VLAN_PER_VF up to 16. Without this patch untrusted VF could create only up to 8 VLANs. Signed-off-by: Piotr Kwapulinski Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6a6567776fdfc7408ce01b83453252174a88f4d0 Author: Aleksandr Loktionov Date: Fri Mar 29 17:04:56 2019 -0700 i40e: add functions stubs to support EEE This patch adds functions stubs to support EEE on/off. Signed-off-by: Aleksandr Loktionov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit abdcfc25641c5ba6d63047bec1dc8d3aaa7d4111 Author: Jerome Brunet Date: Wed May 15 15:18:56 2019 +0200 ASoC: meson: add tohdmitx DT bindings Add the bindings and the related documentation for the audio hdmitx control glue of the Amlogic g12a SoC family Signed-off-by: Jerome Brunet Tested-by: Neil Armstrong Tested-by: Kevin Hilman Signed-off-by: Mark Brown .../bindings/sound/amlogic,g12a-tohdmitx.txt | 55 ++++++++++++++++++++++ include/dt-bindings/sound/meson-g12a-tohdmitx.h | 13 +++++ 2 files changed, 68 insertions(+) commit d96ec97511149b447712a5a401b290913cbd4426 Merge: 733f0766c3de ddb754aa3181 Author: David S. Miller Date: Fri Jun 14 11:27:26 2019 -0700 Merge tag 'mac80211-next-for-davem-2019-06-14' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Johannes Berg says: ==================== Many changes all over: * HE (802.11ax) work continues * WPA3 offloads * work on extended key ID handling continues * fixes to honour AP supported rates with auth/assoc frames * nl80211 netlink policy improvements to fix some issues with strict validation on new commands with old attrs ==================== Signed-off-by: David S. Miller commit 025e32048f39e24d8ddf9369d679644ea2bdcce6 Author: YueHaibing Date: Fri Jun 14 23:54:41 2019 +0800 x86/amd_nb: Make hygon_nb_misc_ids static Fix the following sparse warning: arch/x86/kernel/amd_nb.c:74:28: warning: symbol 'hygon_nb_misc_ids' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Borislav Petkov Cc: Bjorn Helgaas Cc: Brian Woods Cc: Guenter Roeck Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Pu Wen Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/20190614155441.22076-1-yuehaibing@huawei.com arch/x86/kernel/amd_nb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 422d7df4f090bbbc4d49e66d533a259ba63ec70d Author: Chris Wilson Date: Fri Jun 14 17:46:06 2019 +0100 drm/i915: Replace engine->timeline with a plain list To continue the onslaught of removing the assumption of a global execution ordering, another casualty is the engine->timeline. Without an actual timeline to track, it is overkill and we can replace it with a much less grand plain list. We still need a list of requests inflight, for the simple purpose of finding inflight requests (for retiring, resetting, preemption etc). Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190614164606.15633-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gt/intel_engine.h | 6 ++ drivers/gpu/drm/i915/gt/intel_engine_cs.c | 62 ++++++++--------- drivers/gpu/drm/i915/gt/intel_engine_types.h | 6 +- drivers/gpu/drm/i915/gt/intel_lrc.c | 95 ++++++++++++++------------ drivers/gpu/drm/i915/gt/intel_reset.c | 10 +-- drivers/gpu/drm/i915/gt/intel_ringbuffer.c | 15 ++-- drivers/gpu/drm/i915/gt/mock_engine.c | 18 ++--- drivers/gpu/drm/i915/i915_gpu_error.c | 5 +- drivers/gpu/drm/i915/i915_request.c | 43 ++++-------- drivers/gpu/drm/i915/i915_request.h | 2 +- drivers/gpu/drm/i915/i915_scheduler.c | 38 +++++------ drivers/gpu/drm/i915/i915_timeline.c | 1 - drivers/gpu/drm/i915/i915_timeline.h | 19 ------ drivers/gpu/drm/i915/i915_timeline_types.h | 4 -- drivers/gpu/drm/i915/intel_guc_submission.c | 16 ++--- drivers/gpu/drm/i915/selftests/mock_timeline.c | 1 - 16 files changed, 153 insertions(+), 188 deletions(-) commit 9db0c5caa7471b463627e1a87c58de874be1c55f Author: Chris Wilson Date: Fri Jun 14 17:46:05 2019 +0100 drm/i915: Stop retiring along engine We no longer track the execution order along the engine and so no longer need to enforce ordering of retire along the engine. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190614164606.15633-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_request.c | 131 +++++++++++++++--------------------- 1 file changed, 53 insertions(+), 78 deletions(-) commit ce476c80b8bfa8a8e4c9182cdb686c5aea2431a6 Author: Chris Wilson Date: Fri Jun 14 17:46:04 2019 +0100 drm/i915: Keep contexts pinned until after the next kernel context switch We need to keep the context image pinned in memory until after the GPU has finished writing into it. Since it continues to write as we signal the final breadcrumb, we need to keep it pinned until the request after it is complete. Currently we know the order in which requests execute on each engine, and so to remove that presumption we need to identify a request/context-switch we know must occur after our completion. Any request queued after the signal must imply a context switch, for simplicity we use a fresh request from the kernel context. The sequence of operations for keeping the context pinned until saved is: - On context activation, we preallocate a node for each physical engine the context may operate on. This is to avoid allocations during unpinning, which may be from inside FS_RECLAIM context (aka the shrinker) - On context deactivation on retirement of the last active request (which is before we know the context has been saved), we add the preallocated node onto a barrier list on each engine - On engine idling, we emit a switch to kernel context. When this switch completes, we know that all previous contexts must have been saved, and so on retiring this request we can finally unpin all the contexts that were marked as deactivated prior to the switch. We can enhance this in future by flushing all the idle contexts on a regular heartbeat pulse of a switch to kernel context, which will also be used to check for hung engines. v2: intel_context_active_acquire/_release Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190614164606.15633-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gem/i915_gem_context.c | 24 ++----- drivers/gpu/drm/i915/gem/i915_gem_context.h | 1 - drivers/gpu/drm/i915/gem/i915_gem_pm.c | 20 +++++- drivers/gpu/drm/i915/gem/i915_gem_shrinker.c | 17 ++--- drivers/gpu/drm/i915/gt/intel_context.c | 80 +++++++++++++++++++++--- drivers/gpu/drm/i915/gt/intel_context.h | 3 + drivers/gpu/drm/i915/gt/intel_context_types.h | 6 +- drivers/gpu/drm/i915/gt/intel_engine.h | 2 - drivers/gpu/drm/i915/gt/intel_engine_cs.c | 23 +------ drivers/gpu/drm/i915/gt/intel_engine_pm.c | 2 + drivers/gpu/drm/i915/gt/intel_engine_types.h | 13 +--- drivers/gpu/drm/i915/gt/intel_lrc.c | 62 +++--------------- drivers/gpu/drm/i915/gt/intel_ringbuffer.c | 44 ++----------- drivers/gpu/drm/i915/gt/mock_engine.c | 11 ++-- drivers/gpu/drm/i915/i915_active.c | 78 +++++++++++++++++++++++ drivers/gpu/drm/i915/i915_active.h | 5 ++ drivers/gpu/drm/i915/i915_active_types.h | 3 + drivers/gpu/drm/i915/i915_gem.c | 4 -- drivers/gpu/drm/i915/i915_request.c | 15 ----- drivers/gpu/drm/i915/selftests/mock_gem_device.c | 1 - 20 files changed, 219 insertions(+), 195 deletions(-) commit 1419f64ef526b5657ccfe604a69533736db44490 Author: Erwan Le Ray Date: Fri May 24 17:30:38 2019 +0200 dt-bindings: stm32: serial: Add optional reset STM32 serial can be reset via reset controller. Add an optional reset property to stm32 usart bindings. Signed-off-by: Erwan Le Ray Signed-off-by: Rob Herring Documentation/devicetree/bindings/serial/st,stm32-usart.txt | 1 + 1 file changed, 1 insertion(+) commit 38cf3a687f5827fcfc81cbc433ef5822693a49c1 Author: Tejun Heo Date: Fri Jun 14 10:12:45 2019 -0700 cgroup: Move cgroup_parse_float() implementation out of CONFIG_SYSFS a5e112e6424a ("cgroup: add cgroup_parse_float()") accidentally added cgroup_parse_float() inside CONFIG_SYSFS block. Move it outside so that it doesn't cause failures on !CONFIG_SYSFS builds. Signed-off-by: Tejun Heo Fixes: a5e112e6424a ("cgroup: add cgroup_parse_float()") kernel/cgroup/cgroup.c | 84 +++++++++++++++++++++++++------------------------- 1 file changed, 42 insertions(+), 42 deletions(-) commit ce1a5ea18ef9bf4c62c75abe7c540a29264ec988 Author: Thomas Gleixner Date: Fri Jun 14 09:02:49 2019 +0200 Documentation: Remove duplicate x86 index entry x86 got added twice to the index via the RST conversion and the MDS documentation changes. Remove one instance. Signed-off-by: Thomas Gleixner Signed-off-by: Jonathan Corbet Documentation/index.rst | 1 - 1 file changed, 1 deletion(-) commit b3b723d8c485af81663b5331459885536006d7fa Author: Heiko Stuebner Date: Thu Jun 6 10:05:40 2019 +0200 clk: rockchip: add a type from SGRF-controlled gate clocks Some clk gates on Rockchip SoCs are part of the SGRF (secure general register files) and thus only controllable from secure mode, with the most prominent example being the watchdog. In most cases we still want to define this as a real clock though, to have complete clock tree and not reference the generic base-clock from the devicetree. So far we've just defined this as factor-1-1 clocks in the clock init, so define a special clock-type for it so that this definition can be part of the general tree-definition and save some boilerplate code. Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk.h | 4 ++++ 1 file changed, 4 insertions(+) commit 1107049034ac094dd66998ec91d59d8f8807c88a Author: Mauro Carvalho Chehab Date: Thu Jun 13 23:04:10 2019 -0300 ABI: better identificate tables When parsing via script, it is important to know if the script should consider a description as a literal block that should be displayed as-is, or if the description can be considered as a normal text. Change descriptions to ensure that the preceding line of a table ends with a colon. That makes easy to identify the need of a literal block. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman Documentation/ABI/obsolete/sysfs-driver-hid-roccat-pyra | 2 +- Documentation/ABI/testing/sysfs-class-backlight-driver-lm3533 | 6 +++--- Documentation/ABI/testing/sysfs-class-led-driver-lm3533 | 8 ++++---- Documentation/ABI/testing/sysfs-class-leds-gt683r | 4 ++-- Documentation/ABI/testing/sysfs-driver-hid-roccat-kone | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) commit d59f0ec7151e8f70ceaf58e2ddd057e3296cc2d7 Author: Mauro Carvalho Chehab Date: Thu Jun 13 23:04:09 2019 -0300 ABI: sysfs-class-uwb_rc: remove a duplicated incomplete entry There are two entries for /sys/class/uwb_rc/uwbN//BPST. The second one has a missing description. Get rid of it. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman Documentation/ABI/testing/sysfs-class-uwb_rc | 6 ------ 1 file changed, 6 deletions(-) commit 745b2888a2afdb33055f62ba3b245b79e2462e65 Author: Mauro Carvalho Chehab Date: Thu Jun 13 23:04:08 2019 -0300 ABI: sysfs-driver-hid: the "What" field doesn't parse fine The What: field on this ABI description use a different syntax than expected, causing it to not be properly parsed by script. Fix it. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman Documentation/ABI/testing/sysfs-driver-hid | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit ed66bcd0674a97cbacb01e7d140eea0f882d31a6 Author: Mauro Carvalho Chehab Date: Thu Jun 13 23:04:07 2019 -0300 ABI: fix some syntax issues at the ABI database On those three files, the ABI representation described at README are violated. - at sysfs-bus-iio-proximity-as3935: a ':' character is missing after "What" - at sysfs-class-devfreq: there's a typo at Description - at sysfs-class-cxl, it is using the ":" character at a file preamble, causing it to be misinterpreted as a tag. - On the other files, instead of "What", they use "Where". Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab Acked-by: Rafael J. Wysocki Acked-by: Andrew Donnellan # cxl Signed-off-by: Greg Kroah-Hartman Documentation/ABI/testing/pstore | 2 +- .../testing/sysfs-bus-event_source-devices-format | 2 +- .../ABI/testing/sysfs-bus-i2c-devices-hm6352 | 6 +++--- .../ABI/testing/sysfs-bus-iio-distance-srf08 | 4 ++-- .../ABI/testing/sysfs-bus-iio-proximity-as3935 | 4 ++-- .../ABI/testing/sysfs-bus-pci-devices-cciss | 22 +++++++++++----------- .../ABI/testing/sysfs-bus-usb-devices-usbsevseg | 12 ++++++------ Documentation/ABI/testing/sysfs-class-cxl | 6 +++--- Documentation/ABI/testing/sysfs-class-devfreq | 2 +- Documentation/ABI/testing/sysfs-class-powercap | 2 +- Documentation/ABI/testing/sysfs-kernel-fscaps | 2 +- Documentation/ABI/testing/sysfs-kernel-vmcoreinfo | 2 +- 12 files changed, 33 insertions(+), 33 deletions(-) commit 7974033e527a5dd12d96126d09d4cff4f9b65c69 Author: Ville Syrjälä Date: Tue May 28 17:06:49 2019 +0300 drm/dp: Add DP_DPCD_QUIRK_NO_SINK_COUNT CH7511 eDP->LVDS bridge doesn't seem to set SINK_COUNT properly causing i915 to detect it as disconnected. Add a quirk to ignore SINK_COUNT on these devices. Cc: David S. Cc: Peteris Rudzusiks Tested-by: Peteris Rudzusiks Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105406 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190528140650.19230-1-ville.syrjala@linux.intel.com Acked-by: Jani Nikula #irc drivers/gpu/drm/drm_dp_helper.c | 4 +++- include/drm/drm_dp_helper.h | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) commit 41ff5bd834356a310ad909152f19bf23963527ce Author: Oleg Vasilev Date: Thu Jun 13 15:18:00 2019 +0300 drm: add debug print to update_vblank_count Since we are logging all vblank counter updates 30 lines below, it is also good to have some details whether and how vblank count difference is calculated. Signed-off-by: Oleg Vasilev Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190613121802.2193-1-oleg.vasilev@intel.com drivers/gpu/drm/drm_vblank.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 76ce48bdb303afa6e33cfbadca9d6bee23a4f559 Author: Nathan Huckleberry Date: Thu Jun 13 11:26:10 2019 -0700 memory: tegra: Fix -Wunused-const-variable Clang produces the following warning drivers/memory/tegra/tegra124.c:36:28: warning: unused variable 'tegra124_mc_emem_regs' [-Wunused-const-variable] static const unsigned long tegra124_mc_emem_regs[] = { ^ The only usage of this variable is from within an ifdef. It seems logical to move the variable into the ifdef as well. Cc: clang-built-linux@googlegroups.com Link: https://github.com/ClangBuiltLinux/linux/issues/526 Signed-off-by: Nathan Huckleberry Reviewed-by: Nick Desaulniers Signed-off-by: Thierry Reding drivers/memory/tegra/tegra124.c | 44 ++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 22 deletions(-) commit 34b09b9f1faaae87dc34706baed2777c8748ccff Author: Nicolin Chen Date: Wed Apr 24 11:10:10 2019 -0700 arm64: defconfig: Add HWMON INA3221 support Tegra186 board under arm64 is using this device, according to its dts file. So this patch enables its driver with a "=m" as the other HWMON drivers. Signed-off-by: Nicolin Chen Signed-off-by: Thierry Reding arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 6b9e263b449ff3ffb844391c3a3b8500799b1c6f Author: Thierry Reding Date: Fri Jun 14 12:52:37 2019 +0200 arm64: tegra: Don't use architected timer for suspend on Tegra210 Due to an integration issue the architected timer on Tegra210 does not remain on during system suspend (a.k.a. SC7). Mark it accordingly so that it isn't considered as a means to track suspend time. Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra210.dtsi | 1 + 1 file changed, 1 insertion(+) commit b30be6734e11adb33d1fb64120d6e5816fb64bfe Author: Thierry Reding Date: Fri Jun 14 12:52:36 2019 +0200 arm64: tegra: Mark architected timer as always on The architected timer on Tegra186 and Tegra194 is in an always on power partition and its reference clock will always run, so mark the timer as always on. Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra186.dtsi | 1 + arch/arm64/boot/dts/nvidia/tegra194.dtsi | 1 + 2 files changed, 2 insertions(+) commit 733f0766c3dea0a92573e38acb62ace3cf4e58c6 Author: Kevin Darbyshire-Bryant Date: Fri Jun 14 10:09:44 2019 +0100 sched: act_ctinfo: use extack error reporting Use extack error reporting mechanism in addition to returning -EINVAL NL_SET_ERR_* code shamelessy copy/paste/adjusted from act_pedit & sch_cake and used as reference as to what I should have done in the first place. Signed-off-by: Kevin Darbyshire-Bryant Signed-off-by: David S. Miller net/sched/act_ctinfo.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) commit 61ed7ef952fc482ec8d4a966ed0d1e32df276c59 Author: Bitan Biswas Date: Fri Jun 14 05:31:39 2019 -0700 firmware: tegra: Early resume BPMP Early resume Tegra BPMP to fix Xavier clock rate error as follows: [ 159.017101] of_serial 3110000.serial: calling platform_pm_resume+0x0/0x58 @ 317, parent: cbb [ 159.025501] of_serial 3110000.serial: platform_pm_resume+0x0/0x58 returned 0 after 14 usecs [ 159.033694] tegra-i2c 31c0000.i2c: calling platform_pm_resume+0x0/0x58 @ 317, parent: cbb [ 159.042254] tegra-i2c 31c0000.i2c: failed changing clock rate: -22 [ 159.048216] PM: dpm_run_callback(): platform_pm_resume+0x0/0x58 returns -22 [ 159.055553] tegra-i2c 31c0000.i2c: platform_pm_resume+0x0/0x58 returned -22 after 13072 usecs [ 159.063875] PM: Device 31c0000.i2c failed to resume: error -22 Signed-off-by: Bitan Biswas Signed-off-by: Thierry Reding drivers/firmware/tegra/bpmp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 3adcfa4478661463dd8eb91f3717c5bdd77633eb Author: Greg Kroah-Hartman Date: Fri Jun 14 09:04:38 2019 +0200 l2tp: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Also, there is no need to store the individual debugfs file name, just remove the whole directory all at once, saving a local variable. Cc: "David S. Miller" Cc: Guillaume Nault Cc: netdev@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Acked-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_debugfs.c | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) commit 0b55b630352e259b7bf5de3980393afdab6c2f4a Merge: 20023d3e5071 272b2265c87c Author: David S. Miller Date: Fri Jun 14 08:38:27 2019 -0700 Merge branch 'r8169-add-and-use-helper-rtl_is_8168evl_up' Heiner Kallweit says: ==================== r8169: add and use helper rtl_is_8168evl_up Few registers have been added or changed its purpose with version RTL8168e-vl, so create a helper for identifying chip versions from RTL8168e-vl. ==================== Signed-off-by: David S. Miller commit 272b2265c87c0934ae2eb309a1be35c2ea92311f Author: Heiner Kallweit Date: Fri Jun 14 07:55:21 2019 +0200 r8169: use helper rtl_is_8168evl_up for setting register MaxTxPacketSize >From RTL8168e-vl the value in register MaxTxPacketSize is interpreted differently, therefore use new helper rtl_is_8168evl_up to set this register. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169_main.c | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) commit 9e9f33bae81272ca08e5d6a29fce40d4a09fceaf Author: Heiner Kallweit Date: Fri Jun 14 07:54:07 2019 +0200 r8169: add helper rtl_is_8168evl_up Add helper rtl_is_8168evl_up to make the code better readable and to simplify it. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169_main.c | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) commit 227ab8baa15bdd7a48acfb7b61c52a7a5eb87e72 Author: Greg Kroah-Hartman Date: Fri Jun 14 11:47:55 2019 +0200 ASoC: fsl: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Signed-off-by: Greg Kroah-Hartman Signed-off-by: Mark Brown sound/soc/fsl/fsl_ssi.c | 4 +--- sound/soc/fsl/fsl_ssi.h | 8 +++----- sound/soc/fsl/fsl_ssi_dbg.c | 18 ++++-------------- sound/soc/fsl/imx-audmux.c | 10 ++-------- 4 files changed, 10 insertions(+), 30 deletions(-) commit 7f807f280964e31fb32fe6aaa263cfa2488236d8 Author: Greg Kroah-Hartman Date: Fri Jun 14 11:47:54 2019 +0200 ASoC: wm_adsp: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Richard Fitzgerald Signed-off-by: Mark Brown sound/soc/codecs/wm_adsp.c | 37 +++++++------------------------------ 1 file changed, 7 insertions(+), 30 deletions(-) commit a0e93c41eb75ab05bd07d4bd8027f30d484b3966 Author: Rob Herring Date: Mon Jun 10 10:58:06 2019 -0600 drm/panfrost: Align GEM objects GPU VA to 2MB In order to increase the chances of using 2MB pages, we need to align the GPU VA mapping to 2MB. Only do this if the object size is 2MB or more. Cc: Robin Murphy Cc: Steven Price Cc: Tomeu Vizoso Signed-off-by: Rob Herring Reviewed-by: Tomeu Vizoso Link: https://patchwork.freedesktop.org/patch/msgid/20190610165806.24854-1-robh@kernel.org drivers/gpu/drm/panfrost/panfrost_gem.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 141e1ecda356bb0034027a9acb949e97a963ba16 Author: Yangtao Li Date: Sat May 25 14:39:25 2019 -0400 alarmtimer: Fix kerneldoc comment for alarmtimer_suspend() This brings the kernel doc in line with the function signature. Signed-off-by: Yangtao Li Signed-off-by: Thomas Gleixner Cc: john.stultz@linaro.org Cc: sboyd@kernel.org Link: https://lkml.kernel.org/r/20190525183925.18963-1-tiny.windzz@gmail.com kernel/time/alarmtimer.c | 1 - 1 file changed, 1 deletion(-) commit 0f48b41f597e3b62b649abbf796e1e72901f9df3 Author: Mathieu Malaterre Date: Fri May 24 12:33:39 2019 +0200 clocksource: Move inline keyword to the beginning of function declarations The inline keyword was not at the beginning of the function declarations. Fix the following warnings triggered when using W=1: kernel/time/clocksource.c:108:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration] kernel/time/clocksource.c:113:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration] Signed-off-by: Mathieu Malaterre Signed-off-by: Thomas Gleixner Cc: trivial@kernel.org Cc: kernel-janitors@vger.kernel.org Cc: John Stultz Cc: Stephen Boyd Link: https://lkml.kernel.org/r/20190524103339.28787-1-malat@debian.org kernel/time/clocksource.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 83e837269e87436fda1cbf82214a5494fb6b35b1 Author: Mathieu Malaterre Date: Fri May 24 12:32:51 2019 +0200 x86/tsc: Move inline keyword to the beginning of function declarations The inline keyword was not at the beginning of the function declarations. Fix the following warnings triggered when using W=1: arch/x86/kernel/tsc.c:62:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration] arch/x86/kernel/tsc.c:79:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration] Signed-off-by: Mathieu Malaterre Signed-off-by: Thomas Gleixner Cc: trivial@kernel.org Cc: kernel-janitors@vger.kernel.org Cc: Peter Zijlstra Cc: Borislav Petkov Cc: "H. Peter Anvin" Link: https://lkml.kernel.org/r/20190524103252.28575-1-malat@debian.org arch/x86/kernel/tsc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 987d65d013561947282525dbf5425b2bc28b69e6 Author: Greg Kroah-Hartman Date: Fri Jun 14 11:51:10 2019 +0200 drm: debugfs: make drm_debugfs_create_files() never fail As stated before, there is no need to care if a debugfs function succeeds or not, and no code logic in the kernel should ever change based on a debugfs function return value, so make drm_debugfs_create_files() never fail. If it encounters an odd/rare/impossible error (i.e. out of memory, or a duplicate debugfs filename to be created), just keep on moving as if nothing improper had happened. Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190614095110.3716-2-gregkh@linuxfoundation.org drivers/gpu/drm/drm_debugfs.c | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) commit 58a111f03a6e3f66f68260e09eb5cf1eefe2a387 Author: Daniele Ceraolo Spurio Date: Thu Jun 13 16:21:56 2019 -0700 drm/i915: make intel_wakeref work on the rpm struct intel_runtime_pm is the only thing they use from the i915 structure, so use that directly. Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190613232156.34940-9-daniele.ceraolospurio@intel.com drivers/gpu/drm/i915/gt/intel_engine_pm.c | 4 ++-- drivers/gpu/drm/i915/gt/intel_gt_pm.c | 4 ++-- drivers/gpu/drm/i915/i915_gem_fence_reg.c | 2 +- drivers/gpu/drm/i915/intel_wakeref.c | 32 +++++++++++++++---------------- drivers/gpu/drm/i915/intel_wakeref.h | 18 ++++++++--------- 5 files changed, 30 insertions(+), 30 deletions(-) commit c447ff7db34807082dcabbdcbbba2445b49211d9 Author: Daniele Ceraolo Spurio Date: Thu Jun 13 16:21:55 2019 -0700 drm/i915: update with_intel_runtime_pm to use the rpm structure Matching the underlying get/put functions. Signed-off-by: Daniele Ceraolo Spurio Cc: Imre Deak Reviewed-by: Chris Wilson Acked-by: Imre Deak Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190613232156.34940-8-daniele.ceraolospurio@intel.com drivers/gpu/drm/i915/gem/i915_gem_shrinker.c | 8 ++++---- .../gpu/drm/i915/gem/selftests/i915_gem_context.c | 6 +++--- drivers/gpu/drm/i915/gt/intel_context.c | 2 +- drivers/gpu/drm/i915/gt/intel_reset.c | 2 +- drivers/gpu/drm/i915/gt/selftest_reset.c | 2 +- drivers/gpu/drm/i915/gt/selftest_workarounds.c | 4 ++-- drivers/gpu/drm/i915/i915_debugfs.c | 24 +++++++++++----------- drivers/gpu/drm/i915/i915_gem.c | 2 +- drivers/gpu/drm/i915/i915_gem_gtt.c | 8 ++++---- drivers/gpu/drm/i915/i915_pmu.c | 3 ++- drivers/gpu/drm/i915/i915_sysfs.c | 2 +- drivers/gpu/drm/i915/intel_guc_log.c | 6 +++--- drivers/gpu/drm/i915/intel_huc.c | 2 +- drivers/gpu/drm/i915/intel_panel.c | 2 +- drivers/gpu/drm/i915/intel_pm.c | 8 ++++---- drivers/gpu/drm/i915/intel_runtime_pm.h | 12 +++++------ drivers/gpu/drm/i915/intel_uc.c | 2 +- drivers/gpu/drm/i915/intel_uncore.c | 2 +- drivers/gpu/drm/i915/selftests/i915_gem.c | 6 +++--- drivers/gpu/drm/i915/selftests/i915_gem_evict.c | 2 +- drivers/gpu/drm/i915/selftests/i915_request.c | 2 +- 21 files changed, 54 insertions(+), 53 deletions(-) commit d858d5695f3897d55df68452066a90d7560cb845 Author: Daniele Ceraolo Spurio Date: Thu Jun 13 16:21:54 2019 -0700 drm/i915: update rpm_get/put to use the rpm structure The functions where internally already only using the structure, so we need to just flip the interface. v2: rebase Signed-off-by: Daniele Ceraolo Spurio Cc: Imre Deak Reviewed-by: Chris Wilson Acked-by: Imre Deak Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190613232156.34940-7-daniele.ceraolospurio@intel.com drivers/gpu/drm/i915/gem/i915_gem_mman.c | 11 ++--- drivers/gpu/drm/i915/gem/i915_gem_object.c | 4 +- drivers/gpu/drm/i915/gem/i915_gem_shrinker.c | 4 +- drivers/gpu/drm/i915/gem/selftests/huge_pages.c | 4 +- .../drm/i915/gem/selftests/i915_gem_coherency.c | 4 +- .../gpu/drm/i915/gem/selftests/i915_gem_context.c | 12 +++--- drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c | 4 +- drivers/gpu/drm/i915/gt/intel_engine_cs.c | 8 ++-- drivers/gpu/drm/i915/gt/intel_hangcheck.c | 4 +- drivers/gpu/drm/i915/gt/intel_reset.c | 4 +- drivers/gpu/drm/i915/gt/selftest_hangcheck.c | 12 +++--- drivers/gpu/drm/i915/gt/selftest_lrc.c | 36 ++++++++-------- drivers/gpu/drm/i915/gt/selftest_reset.c | 4 +- drivers/gpu/drm/i915/gt/selftest_workarounds.c | 12 +++--- drivers/gpu/drm/i915/gvt/aperture_gm.c | 15 +++---- drivers/gpu/drm/i915/gvt/gvt.h | 4 +- drivers/gpu/drm/i915/gvt/sched_policy.c | 4 +- drivers/gpu/drm/i915/gvt/scheduler.c | 4 +- drivers/gpu/drm/i915/i915_debugfs.c | 49 +++++++++++----------- drivers/gpu/drm/i915/i915_gem.c | 19 +++++---- drivers/gpu/drm/i915/i915_gem_fence_reg.c | 4 +- drivers/gpu/drm/i915/i915_gem_gtt.c | 6 +-- drivers/gpu/drm/i915/i915_perf.c | 6 +-- drivers/gpu/drm/i915/i915_pmu.c | 12 +++--- drivers/gpu/drm/i915/i915_sysfs.c | 12 +++--- drivers/gpu/drm/i915/intel_display.c | 12 +++--- drivers/gpu/drm/i915/intel_display_power.c | 37 ++++++++-------- drivers/gpu/drm/i915/intel_fbdev.c | 6 +-- drivers/gpu/drm/i915/intel_hotplug.c | 4 +- drivers/gpu/drm/i915/intel_runtime_pm.c | 43 +++++++++---------- drivers/gpu/drm/i915/intel_runtime_pm.h | 26 ++++++------ drivers/gpu/drm/i915/intel_wakeref.c | 8 ++-- drivers/gpu/drm/i915/selftests/i915_active.c | 8 ++-- drivers/gpu/drm/i915/selftests/i915_gem.c | 4 +- drivers/gpu/drm/i915/selftests/i915_gem_evict.c | 4 +- drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 8 ++-- drivers/gpu/drm/i915/selftests/i915_request.c | 20 ++++----- drivers/gpu/drm/i915/selftests/i915_timeline.c | 16 +++---- drivers/gpu/drm/i915/selftests/i915_vma.c | 4 +- drivers/gpu/drm/i915/selftests/intel_guc.c | 8 ++-- drivers/gpu/drm/i915/selftests/intel_uncore.c | 4 +- 41 files changed, 236 insertions(+), 234 deletions(-) commit 69c663554452e6589144046331d08e597e7f5823 Author: Daniele Ceraolo Spurio Date: Thu Jun 13 16:21:53 2019 -0700 drm/i915: move a few more functions to accept the rpm structure Focusing on the functions called in few places. Signed-off-by: Daniele Ceraolo Spurio Cc: Imre Deak Reviewed-by: Chris Wilson Acked-by: Imre Deak Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190613232156.34940-6-daniele.ceraolospurio@intel.com drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/i915_drv.c | 22 ++++++++++++---------- drivers/gpu/drm/i915/intel_runtime_pm.c | 19 ++++++++----------- drivers/gpu/drm/i915/intel_runtime_pm.h | 12 ++++++------ drivers/gpu/drm/i915/selftests/mock_gem_device.c | 2 +- 5 files changed, 28 insertions(+), 29 deletions(-) commit 1bf676cc2dbaeec7a52ea93e71660f746123c2fe Author: Daniele Ceraolo Spurio Date: Thu Jun 13 16:21:52 2019 -0700 drm/i915: move and rename i915_runtime_pm Asserts aside, all the code working on this structure is in intel_runtime_pm.c and uses the intel_ prefix, so move the structure to intel_runtime_pm.h and adopt the same prefix. Since all the asserts are now working on the runtime_pm structure, bring them across as well. v2: drop unneeded include (Chris), don't rename debugfs, rebase Signed-off-by: Daniele Ceraolo Spurio Cc: Chris Wilson Cc: Imre Deak Reviewed-by: Chris Wilson Acked-by: Imre Deak Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190613232156.34940-5-daniele.ceraolospurio@intel.com drivers/gpu/drm/i915/i915_drv.c | 4 +- drivers/gpu/drm/i915/i915_drv.h | 52 +---------- drivers/gpu/drm/i915/intel_drv.h | 97 --------------------- drivers/gpu/drm/i915/intel_runtime_pm.c | 42 ++++----- drivers/gpu/drm/i915/intel_runtime_pm.h | 149 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_uncore.h | 4 +- 6 files changed, 175 insertions(+), 173 deletions(-) commit 9102650fb97548f8a08120c7d0174b39092257d6 Author: Daniele Ceraolo Spurio Date: Thu Jun 13 16:21:51 2019 -0700 drm/i915: make enable/disable rpm assert function use the rpm structure With this all the rpm assert-related functions consistently work on the i915_runtime_pm structure Signed-off-by: Daniele Ceraolo Spurio Cc: Imre Deak Reviewed-by: Chris Wilson Acked-by: Imre Deak Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190613232156.34940-4-daniele.ceraolospurio@intel.com drivers/gpu/drm/i915/i915_drv.c | 48 +++++++++++++++++++------------------ drivers/gpu/drm/i915/i915_irq.c | 32 ++++++++++++------------- drivers/gpu/drm/i915/intel_drv.h | 12 +++++----- drivers/gpu/drm/i915/intel_uncore.c | 12 +++++----- 4 files changed, 53 insertions(+), 51 deletions(-) commit 87b391b9518497ecdda7958c723ccd868afb9630 Author: Daniele Ceraolo Spurio Date: Thu Jun 13 16:21:50 2019 -0700 drm/i915: Remove rpm asserts that use i915 Quite a few of the call points have already switched to the version working directly on the runtime_pm structure, so let's switch over the rest and kill the i915-based asserts. v2: rebase Signed-off-by: Daniele Ceraolo Spurio Cc: Imre Deak Reviewed-by: Chris Wilson Acked-by: Imre Deak Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190613232156.34940-3-daniele.ceraolospurio@intel.com drivers/gpu/drm/i915/gem/i915_gem_mman.c | 2 +- drivers/gpu/drm/i915/gvt/aperture_gm.c | 2 +- drivers/gpu/drm/i915/i915_gem_fence_reg.c | 2 +- drivers/gpu/drm/i915/i915_irq.c | 6 +++--- drivers/gpu/drm/i915/i915_vma.c | 2 +- drivers/gpu/drm/i915/intel_csr.c | 2 +- drivers/gpu/drm/i915/intel_display_power.c | 4 ++-- drivers/gpu/drm/i915/intel_drv.h | 26 +++++++------------------- drivers/gpu/drm/i915/intel_runtime_pm.c | 10 +++++----- drivers/gpu/drm/i915/intel_uncore.c | 12 ++++++------ drivers/gpu/drm/i915/intel_wakeref.c | 2 +- 11 files changed, 29 insertions(+), 41 deletions(-) commit d5b6c275d04aacffc06b5bad837a6805091fb7c6 Author: Daniele Ceraolo Spurio Date: Thu Jun 13 16:21:49 2019 -0700 drm/i915: prefer i915_runtime_pm in intel_runtime function As a first step towards updating the code to work on the runtime_pm structure instead of i915, rework all the internals to use and pass around that. v2: add comment for kdev (Jani), move rpm init after pdev init for mock_device Signed-off-by: Daniele Ceraolo Spurio Cc: Jani Nikula Cc: Imre Deak Reviewed-by: Chris Wilson Acked-by: Imre Deak Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190613232156.34940-2-daniele.ceraolospurio@intel.com drivers/gpu/drm/i915/i915_drv.h | 2 + drivers/gpu/drm/i915/intel_drv.h | 10 +- drivers/gpu/drm/i915/intel_runtime_pm.c | 122 +++++++++++------------ drivers/gpu/drm/i915/selftests/mock_gem_device.c | 4 +- 4 files changed, 68 insertions(+), 70 deletions(-) commit cc49abc2460fadcc5fc8ec703538100405a405d4 Author: Matt Roper Date: Wed Jun 12 11:36:31 2019 -0700 drm/i915: Add Wa_1409120013:icl,ehl This chicken bit should be set before enabling FBC to avoid screen corruption when the plane size has odd vertical and horizontal dimensions. It is safe to leave the bit set even when FBC is disabled. v2: - The bspec's name for this bit on these platforms ("Spare 14") is pretty meaningless. Let's rename the bit definition to something that more accurately reflects what the bit really does. (Clint) v3: - The chicken register was already defined (along with a few other gen9-specific bits) farther down. Just add the new bit definition there. (Clint) Cc: Clinton Taylor Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20190612183631.30540-1-matthew.d.roper@intel.com Reviewed-by: Clint Taylor drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_fbc.c | 4 ++++ 2 files changed, 5 insertions(+) commit 84383d2e8d7c50dc344a1acf7b5b4d32cd1569fc Author: Chris Wilson Date: Fri Jun 14 08:09:46 2019 +0100 drm/i915: Refine i915_reset.lock_map We already use a mutex to serialise i915_reset() and wedging, so all we need it to link that into i915_request_wait() and we have our lock cycle detection. v2.5: Take error mutex for selftests Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190614071023.17929-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gt/intel_reset.c | 6 ++---- drivers/gpu/drm/i915/i915_drv.h | 8 -------- drivers/gpu/drm/i915/i915_gem.c | 3 --- drivers/gpu/drm/i915/i915_request.c | 12 ++++++++++-- drivers/gpu/drm/i915/selftests/mock_gem_device.c | 2 -- 5 files changed, 12 insertions(+), 19 deletions(-) commit ddb754aa31813fd17d8374eba881827e6e2c85c6 Author: James Prestwood Date: Wed Jun 12 12:35:10 2019 -0700 mac80211: notify offchannel expire on mgmt_tx When the offchannel TX wait time expires, send the appropriate event. Signed-off-by: James Prestwood Signed-off-by: Johannes Berg net/mac80211/offchannel.c | 4 ++++ 1 file changed, 4 insertions(+) commit 1c38c7f22068b54a7ba5f026a45663c6727ab84c Author: James Prestwood Date: Wed Jun 12 12:35:09 2019 -0700 nl80211: send event when CMD_FRAME duration expires cfg80211_remain_on_channel_expired is used to notify userspace when the remain on channel duration expired by sending an event. There is no such equivalent to CMD_FRAME, where if offchannel and a duration is provided, the card will go offchannel for that duration. Currently there is no way for userspace to tell when that duration expired apart from setting an independent timeout. This timeout is quite erroneous as the kernel may not immediately send out the frame because of scheduling or work queue delays. In testing, it was found this timeout had to be quite large to accomidate any potential delays. A better solution is to have the kernel send an event when this duration has expired. There is already NL80211_CMD_FRAME_WAIT_CANCEL which can be used to cancel a NL80211_CMD_FRAME offchannel. Using this command matches perfectly to how NL80211_CMD_CANCEL_REMAIN_ON_CHANNEL works, where its both used to cancel and notify if the duration has expired. Signed-off-by: James Prestwood Signed-off-by: Johannes Berg include/net/cfg80211.h | 10 ++++++++++ net/wireless/nl80211.c | 13 +++++++++++++ net/wireless/trace.h | 18 ++++++++++++++++++ 3 files changed, 41 insertions(+) commit 5a7bb7ce26a98d52190086ae6174becedf03bf43 Author: Greg Kroah-Hartman Date: Fri Jun 14 08:59:34 2019 +0200 mac80211: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Johannes Berg Cc: "David S. Miller" Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Johannes Berg net/mac80211/debugfs_key.c | 3 --- net/mac80211/debugfs_netdev.c | 10 +++------- net/mac80211/debugfs_sta.c | 2 -- 3 files changed, 3 insertions(+), 12 deletions(-) commit 6e4f929ea8b2097b0052f6674de839a3c9d477e9 Author: Greg Kroah-Hartman Date: Wed Jun 12 17:15:31 2019 +0200 x86/mce: Do not check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. The only way this can fail is if: * debugfs superblock can not be pinned - something really went wrong with the vfs layer. * file is created with same name - the caller's fault. * new_inode() fails - happens if memory is exhausted. so failing to clean up debugfs properly is the least of the system's sproblems in uch a situation. [ bp: Extend commit message, remove unused err var in inject_init(). ] Signed-off-by: Greg Kroah-Hartman Signed-off-by: Borislav Petkov Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: linux-edac Cc: Thomas Gleixner Cc: Tony Luck Cc: x86-ml Link: https://lkml.kernel.org/r/20190612151531.GA16278@kroah.com arch/x86/kernel/cpu/mce/core.c | 16 +++++----------- arch/x86/kernel/cpu/mce/inject.c | 37 +++++-------------------------------- arch/x86/kernel/cpu/mce/severity.c | 14 +++----------- 3 files changed, 13 insertions(+), 54 deletions(-) commit c2aacceedc86af87428d998e23a1aca24fd8aa2e Author: Nick Xie Date: Mon Jun 10 15:57:53 2019 +0800 arm64: dts: rockchip: Add support for Khadas Edge/Edge-V/Captain boards Add devicetree support for Khadas Edge/Edge-V/Captain boards. Khadas Edge is an expandable Rockchip RK3399 board with goldfinger. Khadas Captain is the carrier board for Khadas Edge. Khadas Edge-V is a Khadas VIM form factor Rockchip RK3399 board. Signed-off-by: Nick Xie [edge-captain and edge-v contain different components that are supposed to get added in future patches, so should stay separate while looking somewhat similar right now] Signed-off-by: Heiko Stuebner .../devicetree/bindings/arm/rockchip.yaml | 8 + arch/arm64/boot/dts/rockchip/Makefile | 3 + .../dts/rockchip/rk3399-khadas-edge-captain.dts | 27 + .../boot/dts/rockchip/rk3399-khadas-edge-v.dts | 27 + .../arm64/boot/dts/rockchip/rk3399-khadas-edge.dts | 13 + .../boot/dts/rockchip/rk3399-khadas-edge.dtsi | 804 +++++++++++++++++++++ 6 files changed, 882 insertions(+) commit fee77829083ad70845bd650f3c84c5900c5abae1 Author: Steve Longerbeam Date: Thu Jun 13 18:02:55 2019 -0700 gpu: ipu-v3: image-convert: Enable double write reduction For the write channels with 4:2:0 subsampled YUV formats, avoid chroma overdraw by only writing chroma for even lines (skip odd chroma rows). This reduces necessary write memory bandwidth by at least 25% (more with rotation enabled). Signed-off-by: Steve Longerbeam Signed-off-by: Philipp Zabel drivers/gpu/ipu-v3/ipu-image-convert.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 4791bd7d6adc406e12e4f69588ef201d39c3d8ac Author: Steve Longerbeam Date: Tue May 21 18:03:17 2019 -0700 media: imx: Try colorimetry at both sink and source pads Retask imx_media_fill_default_mbus_fields() to try colorimetry parameters, renaming it to to imx_media_try_colorimetry(), and call it at both sink and source pad try_fmt's. The unrelated check for uninitialized field value is moved out to appropriate places in each subdev try_fmt. The IC now supports Rec.709 and BT.601 Y'CbCr encoding, and both limited and full range quantization for both YUV and RGB space, so allow those for pipelines that route through the IC. Signed-off-by: Steve Longerbeam Acked-by: Hans Verkuil Signed-off-by: Philipp Zabel drivers/staging/media/imx/imx-ic-prp.c | 6 ++- drivers/staging/media/imx/imx-ic-prpencvf.c | 8 ++-- drivers/staging/media/imx/imx-media-csi.c | 19 ++++---- drivers/staging/media/imx/imx-media-utils.c | 73 ++++++++++++++--------------- drivers/staging/media/imx/imx-media-vdic.c | 5 +- drivers/staging/media/imx/imx-media.h | 5 +- drivers/staging/media/imx/imx7-media-csi.c | 8 ++-- 7 files changed, 62 insertions(+), 62 deletions(-) commit 614014cfc148031df2ce49fa93740ae9770ae339 Author: Steve Longerbeam Date: Tue May 21 18:03:16 2019 -0700 gpu: ipu-v3: ipu-ic-csc: Add support for Rec.709 encoding Add support for Rec.709 encoding and inverse encoding. Reported-by: Tim Harvey Signed-off-by: Steve Longerbeam Signed-off-by: Philipp Zabel drivers/gpu/ipu-v3/ipu-ic-csc.c | 139 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 134 insertions(+), 5 deletions(-) commit e3e4820d054c0d616fc9636489b7b87844ac104d Author: Steve Longerbeam Date: Tue May 21 18:03:15 2019 -0700 gpu: ipu-v3: ipu-ic-csc: Add support for limited range encoding Add support for encodings to or from limited range quantization. Signed-off-by: Steve Longerbeam Signed-off-by: Philipp Zabel drivers/gpu/ipu-v3/ipu-ic-csc.c | 180 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 166 insertions(+), 14 deletions(-) commit f208b26e61df411cf0bee413bee57ff434e8b38a Author: Steve Longerbeam Date: Tue May 21 18:03:14 2019 -0700 gpu: ipu-v3: ipu-ic: Fully describe colorspace conversions Only providing the input and output RGB/YUV space to the IC task init functions is not sufficient. To fully characterize a colorspace conversion, the Y'CbCr encoding standard, and quantization also need to be specified. Define a 'struct ipu_ic_colorspace' that includes all the above. This allows to actually enforce the fact that the IC: - can only encode to/from YUV and RGB full range. A follow-up patch will remove this restriction. - can only encode using BT.601 standard. A follow-up patch will add Rec.709 encoding support. The determination of the CSC coefficients based on the input/output 'struct ipu_ic_colorspace' are moved to a new exported function ipu_ic_calc_csc(), and 'struct ic_csc_params' is exported as 'struct ipu_ic_csc_params'. ipu_ic_calc_csc() fills a 'struct ipu_ic_csc' with the input/output 'struct ipu_ic_colorspace' and the calculated 'struct ic_csc_params' from those input/output colorspaces. The functions ipu_ic_task_init(_rsc)() now take a filled 'struct ipu_ic_csc'. The existing CSC coefficient tables and ipu_ic_calc_csc() are moved to a new module ipu-ic-csc.c. This is in preparation for adding more coefficient tables for limited range quantization and more encoding standards. The existing ycbcr2rgb and inverse rgb2ycbcr tables defined the BT.601 Y'CbCr encoding coefficients. The rgb2ycbcr table specifically described the BT.601 encoding from full range RGB to full range YUV. Table comments have been added in ipu-ic-csc.c to make this more clear. The ycbcr2rgb inverse table described encoding YUV limited range to RGB full range. To be consistent with the rgb2ycbcr table, this table is converted to YUV full range to RGB full range, and the comments are expanded in ipu-ic-csc.c. The ic_csc_rgb2rgb table was just an identity matrix, so it is renamed 'identity' in ipu-ic-csc.c. Signed-off-by: Steve Longerbeam [p.zabel@pengutronix.de: removed a superfluous blank line] Signed-off-by: Philipp Zabel drivers/gpu/ipu-v3/Makefile | 4 +- drivers/gpu/ipu-v3/ipu-ic-csc.c | 128 ++++++++++++++++++++++++++ drivers/gpu/ipu-v3/ipu-ic.c | 138 +++++++++------------------- drivers/gpu/ipu-v3/ipu-image-convert.c | 28 +++--- drivers/staging/media/imx/imx-ic-prpencvf.c | 34 +++++-- include/video/imx-ipu-v3.h | 56 +++++++++-- 6 files changed, 270 insertions(+), 118 deletions(-) commit e038f5f691e003af25cda0f1593d2cc0a4d1c866 Author: Thiago Jung Bauermann Date: Tue Jun 11 03:28:10 2019 -0300 ima: Use designated initializers for struct ima_event_data Designated initializers allow specifying only the members of the struct that need initialization. Non-mentioned members are initialized to zero. This makes the code a bit clearer (particularly in ima_add_boot_aggregate) and also allows adding a new member to the struct without having to update all struct initializations. Signed-off-by: Thiago Jung Bauermann Signed-off-by: Mimi Zohar security/integrity/ima/ima_api.c | 13 +++++++++---- security/integrity/ima/ima_init.c | 4 ++-- 2 files changed, 11 insertions(+), 6 deletions(-) commit b169424551930a9325f700f502802f4d515194e5 Author: Janne Karhunen Date: Fri Jun 14 15:20:15 2019 +0300 ima: use the lsm policy update notifier Don't do lazy policy updates while running the rule matching, run the updates as they happen. Depends on commit f242064c5df3 ("LSM: switch to blocking policy update notifiers") Signed-off-by: Janne Karhunen Signed-off-by: Mimi Zohar security/integrity/ima/ima.h | 2 + security/integrity/ima/ima_main.c | 8 +++ security/integrity/ima/ima_policy.c | 116 +++++++++++++++++++++++++++++------- 3 files changed, 106 insertions(+), 20 deletions(-) commit 42df744c4166af6959eda2df1ee5cde744d4a1c3 Author: Janne Karhunen Date: Fri Jun 14 15:20:14 2019 +0300 LSM: switch to blocking policy update notifiers Atomic policy updaters are not very useful as they cannot usually perform the policy updates on their own. Since it seems that there is no strict need for the atomicity, switch to the blocking variant. While doing so, rename the functions accordingly. Signed-off-by: Janne Karhunen Acked-by: Paul Moore Acked-by: James Morris Signed-off-by: Mimi Zohar drivers/infiniband/core/device.c | 6 +++--- include/linux/security.h | 12 ++++++------ security/security.c | 23 +++++++++++++---------- security/selinux/hooks.c | 2 +- security/selinux/selinuxfs.c | 2 +- 5 files changed, 24 insertions(+), 21 deletions(-) commit 9e1e5d4372d641d3cd6d6cb8dc0b488a7850d222 Author: Nayna Jain Date: Fri Jun 7 15:12:06 2019 -0400 x86/ima: fix the Kconfig dependency for IMA_ARCH_POLICY If enabled, ima arch specific policies always adds the measurements rules, this makes it dependent on CONFIG_IMA. CONFIG_IMA_APPRAISE implicitly takes care of this, however it is needed explicitly for CONFIG_KEXEC_VERIFY_SIG. This patch adds the CONFIG_IMA dependency in combination with CONFIG_KEXEC_VERIFY_SIG for CONFIG_IMA_ARCH_POLICY Fixes: d958083a8f640 (x86/ima: define arch_get_ima_policy() for x86) Signed-off-by: Nayna Jain Cc: Eric Biederman Cc: Dave Young Signed-off-by: Mimi Zohar security/integrity/ima/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 68f2529078f97dd4dc7f01bc4d495cf5f5814363 Author: YueHaibing Date: Tue Jun 11 21:40:32 2019 +0800 ima: Make arch_policy_entry static Fix sparse warning: security/integrity/ima/ima_policy.c:202:23: warning: symbol 'arch_policy_entry' was not declared. Should it be static? Fixes: 6191706246de ("ima: add support for arch specific policies") Reported-by: Hulk Robot Signed-off-by: YueHaibing Cc: stable@vger.kernel.org (linux-5.0) Signed-off-by: Mimi Zohar security/integrity/ima/ima_policy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3a4b44d5c032f03cee71a8f2ad5c10ce18b3519b Author: David Lechner Date: Mon May 27 10:22:59 2019 +0200 ARM: davinci_all_defconfig: Enable CPUFREQ_DT This sets CONFIG_CPUFREQ_DT=m in davinci_all_defconfig. This is used for frequency scaling on device tree boards. Signed-off-by: David Lechner Signed-off-by: Bartosz Golaszewski Signed-off-by: Sekhar Nori arch/arm/configs/davinci_all_defconfig | 1 + 1 file changed, 1 insertion(+) commit e8e3699f65c396a65facb507548b88a008b25c88 Author: Bartosz Golaszewski Date: Mon May 27 10:22:58 2019 +0200 ARM: dts: da850-evm: enable cpufreq Enable cpufreq-dt support for da850-evm. The cvdd is supplied by the tps65070 pmic with configurable output voltage. By default da850-evm boards support frequencies up to 375MHz so enable this operating point. Signed-off-by: Bartosz Golaszewski Reviewed-by: Adam Ford Signed-off-by: Sekhar Nori arch/arm/boot/dts/da850-evm.dts | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit fdf1b274610428dd4e5d296cc4c414f0c97ecc33 Author: David Lechner Date: Mon May 27 10:22:57 2019 +0200 ARM: dts: da850-lcdk: enable cpufreq Add a fixed regulator for the da850-lcdk board along with board-specific CPU configuration. Signed-off-by: David Lechner Signed-off-by: Bartosz Golaszewski Signed-off-by: Sekhar Nori arch/arm/boot/dts/da850-lcdk.dts | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit 3975205ac334373efe65641482ef42ff3fec80af Author: David Lechner Date: Mon May 27 10:22:56 2019 +0200 ARM: dts: da850-lego-ev3: enable cpufreq Add a fixed regulator for the LEGO EV3 board along with board-specific CPU configuration. Signed-off-by: David Lechner Signed-off-by: Bartosz Golaszewski Signed-off-by: Sekhar Nori arch/arm/boot/dts/da850-lego-ev3.dts | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 3be5c7425fd2869f438e179ba54b03619a545977 Author: David Lechner Date: Mon May 27 10:22:55 2019 +0200 ARM: dts: da850: add cpu node and operating points to DT This adds a cpu node and operating points to the common da850.dtsi file. All operating points above 300MHz are disabled by default. Regulators need to be hooked up on a per-board basis. Signed-off-by: David Lechner Signed-off-by: Bartosz Golaszewski Signed-off-by: Sekhar Nori arch/arm/boot/dts/da850.dtsi | 50 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) commit d5f34153e526903abe71869dbbc898bfc0f69373 Author: Waiman Long Date: Mon May 20 10:14:50 2019 -0400 debugobjects: Move printk out of db->lock critical sections The db->lock is a raw spinlock and so the lock hold time is supposed to be short. This will not be the case when printk() is being involved in some of the critical sections. In order to avoid the long hold time, in case some messages need to be printed, the debug_object_is_on_stack() and debug_print_object() calls are now moved out of those critical sections. Signed-off-by: Waiman Long Signed-off-by: Thomas Gleixner Cc: Andrew Morton Cc: Yang Shi Cc: "Joel Fernandes (Google)" Cc: Qian Cai Cc: Zhong Jiang Link: https://lkml.kernel.org/r/20190520141450.7575-6-longman@redhat.com lib/debugobjects.c | 58 ++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 39 insertions(+), 19 deletions(-) commit a7344a68a79ab91bc38af4b9d24284b479aa780a Author: Waiman Long Date: Mon May 20 10:14:49 2019 -0400 debugobjects: Less aggressive freeing of excess debug objects After a system bootup and 3 parallel kernel builds, a partial output of the debug objects stats file was: pool_free :5101 pool_pcp_free :4181 pool_min_free :220 pool_used :104172 pool_max_used :171920 on_free_list :0 objs_allocated:39268280 objs_freed :39160031 More than 39 millions debug objects had since been allocated and then freed. The pool_max_used, however, was only about 172k. So this is a lot of extra overhead in freeing and allocating objects from slabs. It may also causes the slabs to be more fragmented and harder to reclaim. Make the freeing of excess debug objects less aggressive by freeing them at a maximum frequency of 10Hz and about 1k objects at each round of freeing. With that change applied, the partial output of the debug objects stats file after similar actions became: pool_free :5901 pool_pcp_free :3742 pool_min_free :1022 pool_used :104805 pool_max_used :168081 on_free_list :0 objs_allocated:5796864 objs_freed :5687182 Signed-off-by: Waiman Long Signed-off-by: Thomas Gleixner Cc: Andrew Morton Cc: Yang Shi Cc: "Joel Fernandes (Google)" Cc: Qian Cai Cc: Zhong Jiang Link: https://lkml.kernel.org/r/20190520141450.7575-5-longman@redhat.com lib/debugobjects.c | 61 +++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 49 insertions(+), 12 deletions(-) commit d26bf5056fc087d845bfbb8b651b4be2933ab7a6 Author: Waiman Long Date: Mon May 20 10:14:48 2019 -0400 debugobjects: Reduce number of pool_lock acquisitions in fill_pool() In fill_pool(), the pool_lock is acquired and then released once per debug object. If many objects are to be filled, the constant lock and unlock operations are extra overhead. To reduce the overhead, batch them up and do an allocation of 4 objects per lock/unlock sequence. Signed-off-by: Waiman Long Signed-off-by: Thomas Gleixner Cc: Andrew Morton Cc: Yang Shi Cc: "Joel Fernandes (Google)" Cc: Qian Cai Cc: Zhong Jiang Link: https://lkml.kernel.org/r/20190520141450.7575-4-longman@redhat.com lib/debugobjects.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit 634d61f45d6f668fe7e468b62d00ae469a583ca2 Author: Waiman Long Date: Mon May 20 10:14:47 2019 -0400 debugobjects: Percpu pool lookahead freeing/allocation Most workloads will allocate a bunch of memory objects, work on them and then freeing all or most of them. So just having a percpu free pool may not reduce the pool_lock contention significantly if large number of objects are being used. To help those situations, we are now doing lookahead allocation and freeing of the debug objects into and out of the percpu free pool. This will hopefully reduce the number of times the pool_lock needs to be taken and hence its contention level. Signed-off-by: Waiman Long Signed-off-by: Thomas Gleixner Cc: Andrew Morton Cc: Yang Shi Cc: "Joel Fernandes (Google)" Cc: Qian Cai Cc: Zhong Jiang Link: https://lkml.kernel.org/r/20190520141450.7575-3-longman@redhat.com lib/debugobjects.c | 75 +++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 69 insertions(+), 6 deletions(-) commit d86998b17a01050c0232231fa481e65ef8171ca6 Author: Waiman Long Date: Mon May 20 10:14:46 2019 -0400 debugobjects: Add percpu free pools When a multi-threaded workload does a lot of small memory object allocations and deallocations, it may cause the allocation and freeing of many debug objects. This will make the global pool_lock a bottleneck in the performance of the workload. Since interrupts are disabled when acquiring the pool_lock, it may even cause hard lockups to happen. To reduce contention of the global pool_lock, add a percpu debug object free pool that can be used to buffer some of the debug object allocation and freeing requests without acquiring the pool_lock. Each CPU will now have a percpu free pool that can hold up to a maximum of 64 debug objects. Allocation and freeing requests will go to the percpu free pool first. If that fails, the pool_lock will be taken and the global free pool will be used. The presence or absence of obj_cache is used as a marker to see if the percpu cache should be used. Signed-off-by: Waiman Long Signed-off-by: Thomas Gleixner Cc: Andrew Morton Cc: Yang Shi Cc: "Joel Fernandes (Google)" Cc: Qian Cai Cc: Zhong Jiang Link: https://lkml.kernel.org/r/20190520141450.7575-2-longman@redhat.com lib/debugobjects.c | 115 ++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 91 insertions(+), 24 deletions(-) commit fecb0d95cdf752836cafdfffc1661f61ba4e2101 Author: Greg Kroah-Hartman Date: Wed Jun 12 17:35:13 2019 +0200 debugobjects: No need to check return value of debugfs_create() When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Signed-off-by: Greg Kroah-Hartman Signed-off-by: Thomas Gleixner Cc: Qian Cai Cc: Andrew Morton Cc: Waiman Long Cc: "Joel Fernandes (Google)" Cc: Zhong Jiang Link: https://lkml.kernel.org/r/20190612153513.GA21082@kroah.com lib/debugobjects.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit 591fcf3b301b3396d96f082298a9e8403c027d3f Author: Nicolin Chen Date: Mon Jun 3 15:52:59 2019 -0700 iommu/dma: Apply dma_{alloc,free}_contiguous functions This patch replaces dma_{alloc,release}_from_contiguous() with dma_{alloc,free}_contiguous() to simplify those function calls. Signed-off-by: Nicolin Chen Acked-by: Robin Murphy Signed-off-by: Christoph Hellwig drivers/iommu/dma-iommu.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 4b4b077cbd0a998aebaa72c199e06b8a4c8dcfee Author: Florian Fainelli Date: Mon Jun 10 15:54:37 2019 -0700 dma-remap: Avoid de-referencing NULL atomic_pool With architectures allowing the kernel to be placed almost arbitrarily in memory (e.g.: ARM64), it is possible to have the kernel resides at physical addresses above 4GB, resulting in neither the default CMA area, nor the atomic pool from successfully allocating. This does not prevent specific peripherals from working though, one example is XHCI, which still operates correctly. Trouble comes when the XHCI driver gets suspended and resumed, since we can now trigger the following NPD: [ 12.664170] usb usb1: root hub lost power or was reset [ 12.669387] usb usb2: root hub lost power or was reset [ 12.674662] Unable to handle kernel NULL pointer dereference at virtual address 00000008 [ 12.682896] pgd = ffffffc1365a7000 [ 12.686386] [00000008] *pgd=0000000136500003, *pud=0000000136500003, *pmd=0000000000000000 [ 12.694897] Internal error: Oops: 96000006 [#1] SMP [ 12.699843] Modules linked in: [ 12.702980] CPU: 0 PID: 1499 Comm: pml Not tainted 4.9.135-1.13pre #51 [ 12.709577] Hardware name: BCM97268DV (DT) [ 12.713736] task: ffffffc136bb6540 task.stack: ffffffc1366cc000 [ 12.719740] PC is at addr_in_gen_pool+0x4/0x48 [ 12.724253] LR is at __dma_free+0x64/0xbc [ 12.728325] pc : [] lr : [] pstate: 60000145 [ 12.735825] sp : ffffffc1366cf990 [ 12.739196] x29: ffffffc1366cf990 x28: ffffffc1366cc000 [ 12.744608] x27: 0000000000000000 x26: ffffffc13a8568c8 [ 12.750020] x25: 0000000000000000 x24: ffffff80098f9000 [ 12.755433] x23: 000000013a5ff000 x22: ffffff8009c57000 [ 12.760844] x21: ffffffc13a856810 x20: 0000000000000000 [ 12.766255] x19: 0000000000001000 x18: 000000000000000a [ 12.771667] x17: 0000007f917553e0 x16: 0000000000001002 [ 12.777078] x15: 00000000000a36cb x14: ffffff80898feb77 [ 12.782490] x13: ffffffffffffffff x12: 0000000000000030 [ 12.787899] x11: 00000000fffffffe x10: ffffff80098feb7f [ 12.793311] x9 : 0000000005f5e0ff x8 : 65776f702074736f [ 12.798723] x7 : 6c2062756820746f x6 : ffffff80098febb1 [ 12.804134] x5 : ffffff800809797c x4 : 0000000000000000 [ 12.809545] x3 : 000000013a5ff000 x2 : 0000000000000fff [ 12.814955] x1 : ffffff8009c57000 x0 : 0000000000000000 [ 12.820363] [ 12.821907] Process pml (pid: 1499, stack limit = 0xffffffc1366cc020) [ 12.828421] Stack: (0xffffffc1366cf990 to 0xffffffc1366d0000) [ 12.834240] f980: ffffffc1366cf9e0 ffffff80086004d0 [ 12.842186] f9a0: ffffffc13ab08238 0000000000000010 ffffff80097c2218 ffffffc13a856810 [ 12.850131] f9c0: ffffff8009c57000 000000013a5ff000 0000000000000008 000000013a5ff000 [ 12.858076] f9e0: ffffffc1366cfa50 ffffff80085f9250 ffffffc13ab08238 0000000000000004 [ 12.866021] fa00: ffffffc13ab08000 ffffff80097b6000 ffffffc13ab08130 0000000000000001 [ 12.873966] fa20: 0000000000000008 ffffffc13a8568c8 0000000000000000 ffffffc1366cc000 [ 12.881911] fa40: ffffffc13ab08130 0000000000000001 ffffffc1366cfa90 ffffff80085e3de8 [ 12.889856] fa60: ffffffc13ab08238 0000000000000000 ffffffc136b75b00 0000000000000000 [ 12.897801] fa80: 0000000000000010 ffffff80089ccb92 ffffffc1366cfac0 ffffff80084ad040 [ 12.905746] faa0: ffffffc13a856810 0000000000000000 ffffff80084ad004 ffffff80084b91a8 [ 12.913691] fac0: ffffffc1366cfae0 ffffff80084b91b4 ffffffc13a856810 ffffff80080db5cc [ 12.921636] fae0: ffffffc1366cfb20 ffffff80084b96bc ffffffc13a856810 0000000000000010 [ 12.929581] fb00: ffffffc13a856870 0000000000000000 ffffffc13a856810 ffffff800984d2b8 [ 12.937526] fb20: ffffffc1366cfb50 ffffff80084baa70 ffffff8009932ad0 ffffff800984d260 [ 12.945471] fb40: 0000000000000010 00000002eff0a065 ffffffc1366cfbb0 ffffff80084bafbc [ 12.953415] fb60: 0000000000000010 0000000000000003 ffffff80098fe000 0000000000000000 [ 12.961360] fb80: ffffff80097b6000 ffffff80097b6dc8 ffffff80098c12b8 ffffff80098c12f8 [ 12.969306] fba0: ffffff8008842000 ffffff80097b6dc8 ffffffc1366cfbd0 ffffff80080e0d88 [ 12.977251] fbc0: 00000000fffffffb ffffff80080e10bc ffffffc1366cfc60 ffffff80080e16a8 [ 12.985196] fbe0: 0000000000000000 0000000000000003 ffffff80097b6000 ffffff80098fe9f0 [ 12.993140] fc00: ffffff80097d4000 ffffff8008983802 0000000000000123 0000000000000040 [ 13.001085] fc20: ffffff8008842000 ffffffc1366cc000 ffffff80089803c2 00000000ffffffff [ 13.009029] fc40: 0000000000000000 0000000000000000 ffffffc1366cfc60 0000000000040987 [ 13.016974] fc60: ffffffc1366cfcc0 ffffff80080dfd08 0000000000000003 0000000000000004 [ 13.024919] fc80: 0000000000000003 ffffff80098fea08 ffffffc136577ec0 ffffff80089803c2 [ 13.032864] fca0: 0000000000000123 0000000000000001 0000000500000002 0000000000040987 [ 13.040809] fcc0: ffffffc1366cfd00 ffffff80083a89d4 0000000000000004 ffffffc136577ec0 [ 13.048754] fce0: ffffffc136610cc0 ffffffffffffffea ffffffc1366cfeb0 ffffffc136610cd8 [ 13.056700] fd00: ffffffc1366cfd10 ffffff800822a614 ffffffc1366cfd40 ffffff80082295d4 [ 13.064645] fd20: 0000000000000004 ffffffc136577ec0 ffffffc136610cc0 0000000021670570 [ 13.072590] fd40: ffffffc1366cfd80 ffffff80081b5d10 ffffff80097b6000 ffffffc13aae4200 [ 13.080536] fd60: ffffffc1366cfeb0 0000000000000004 0000000021670570 0000000000000004 [ 13.088481] fd80: ffffffc1366cfe30 ffffff80081b6b20 ffffffc13aae4200 0000000000000000 [ 13.096427] fda0: 0000000000000004 0000000021670570 ffffffc1366cfeb0 ffffffc13a838200 [ 13.104371] fdc0: 0000000000000000 000000000000000a ffffff80097b6000 0000000000040987 [ 13.112316] fde0: ffffffc1366cfe20 ffffff80081b3af0 ffffffc13a838200 0000000000000000 [ 13.120261] fe00: ffffffc1366cfe30 ffffff80081b6b0c ffffffc13aae4200 0000000000000000 [ 13.128206] fe20: 0000000000000004 0000000000040987 ffffffc1366cfe70 ffffff80081b7dd8 [ 13.136151] fe40: ffffff80097b6000 ffffffc13aae4200 ffffffc13aae4200 fffffffffffffff7 [ 13.144096] fe60: 0000000021670570 ffffffc13a8c63c0 0000000000000000 ffffff8008083180 [ 13.152042] fe80: ffffffffffffff1d 0000000021670570 ffffffffffffffff 0000007f917ad9b8 [ 13.159986] fea0: 0000000020000000 0000000000000015 0000000000000000 0000000000040987 [ 13.167930] fec0: 0000000000000001 0000000021670570 0000000000000004 0000000000000000 [ 13.175874] fee0: 0000000000000888 0000440110000000 000000000000006d 0000000000000003 [ 13.183819] ff00: 0000000000000040 ffffff80ffffffc8 0000000000000000 0000000000000020 [ 13.191762] ff20: 0000000000000000 0000000000000000 0000000000000001 0000000000000000 [ 13.199707] ff40: 0000000000000000 0000007f917553e0 0000000000000000 0000000000000004 [ 13.207651] ff60: 0000000021670570 0000007f91835480 0000000000000004 0000007f91831638 [ 13.215595] ff80: 0000000000000004 00000000004b0de0 00000000004b0000 0000000000000000 [ 13.223539] ffa0: 0000000000000000 0000007fc92ac8c0 0000007f9175d178 0000007fc92ac8c0 [ 13.231483] ffc0: 0000007f917ad9b8 0000000020000000 0000000000000001 0000000000000040 [ 13.239427] ffe0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 [ 13.247360] Call trace: [ 13.249866] Exception stack(0xffffffc1366cf7a0 to 0xffffffc1366cf8d0) [ 13.256386] f7a0: 0000000000001000 0000007fffffffff ffffffc1366cf990 ffffff80083c0df8 [ 13.264331] f7c0: 0000000060000145 ffffff80089b5001 ffffffc13ab08130 0000000000000001 [ 13.272275] f7e0: 0000000000000008 ffffffc13a8568c8 0000000000000000 0000000000000000 [ 13.280220] f800: ffffffc1366cf960 ffffffc1366cf960 ffffffc1366cf930 00000000ffffffd8 [ 13.288165] f820: ffffff8009931ac0 4554535953425553 4544006273753d4d 3831633d45434956 [ 13.296110] f840: ffff003832313a39 ffffff800845926c ffffffc1366cf880 0000000000040987 [ 13.304054] f860: 0000000000000000 ffffff8009c57000 0000000000000fff 000000013a5ff000 [ 13.311999] f880: 0000000000000000 ffffff800809797c ffffff80098febb1 6c2062756820746f [ 13.319944] f8a0: 65776f702074736f 0000000005f5e0ff ffffff80098feb7f 00000000fffffffe [ 13.327884] f8c0: 0000000000000030 ffffffffffffffff [ 13.332835] [] addr_in_gen_pool+0x4/0x48 [ 13.338398] [] xhci_mem_cleanup+0xc8/0x51c [ 13.344137] [] xhci_resume+0x308/0x65c [ 13.349524] [] xhci_brcm_resume+0x84/0x8c [ 13.355174] [] platform_pm_resume+0x3c/0x64 [ 13.360997] [] dpm_run_callback+0x5c/0x15c [ 13.366732] [] device_resume+0xc0/0x190 [ 13.372205] [] dpm_resume+0x144/0x2cc [ 13.377504] [] dpm_resume_end+0x20/0x34 [ 13.382980] [] suspend_devices_and_enter+0x104/0x704 [ 13.389585] [] pm_suspend+0x320/0x53c [ 13.394881] [] state_store+0xbc/0xe0 [ 13.400094] [] kobj_attr_store+0x14/0x24 [ 13.405655] [] sysfs_kf_write+0x60/0x70 [ 13.411128] [] kernfs_fop_write+0x130/0x194 [ 13.416954] [] __vfs_write+0x60/0x150 [ 13.422254] [] vfs_write+0xc8/0x164 [ 13.427376] [] SyS_write+0x70/0xc8 [ 13.432412] [] el0_svc_naked+0x34/0x38 [ 13.437800] Code: 92800173 97f6fb9e 17fffff5 d1000442 (f8408c03) [ 13.444033] ---[ end trace 2effe12f909ce205 ]--- The call path leading to this problem is xhci_mem_cleanup() -> dma_free_coherent() -> dma_free_from_pool() -> addr_in_gen_pool. If the atomic_pool is NULL, we can't possibly have the address in the atomic pool anyway, so guard against that. Signed-off-by: Florian Fainelli Signed-off-by: Christoph Hellwig kernel/dma/remap.c | 3 +++ 1 file changed, 3 insertions(+) commit 163a7cdd1f30122d6743d4dc5a3481b0fb914d58 Author: Johannes Berg Date: Wed May 29 15:25:37 2019 +0300 mac80211: extend __rate_control_send_low warning This appears to happen occasionally, and if it does we really want even more information than we have now. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg net/mac80211/rate.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 583a7a34c5d3bb76777b710c6f3fcd51981db256 Author: Johannes Berg Date: Wed May 29 15:25:36 2019 +0300 mac80211: fill low rate even for HAS_RATE_CONTROL If HW advertises it has rate control, we skip all of the rate control assignments, but sometimes the data we have here is useful, especially so that we don't have to do the lookups again on which rates are configured and are supported. So do the low rate assignment anyway to help out drivers that might need it. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg net/mac80211/rate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bd718fc11d5b184701e7fd8302033e31a3a03ba8 Author: Johannes Berg Date: Wed May 29 15:25:35 2019 +0300 mac80211: use STA info in rate_control_send_low() Even if we have a station, we currently call rate_control_send_low() with the NULL station unless further rate control (driver, minstrel) has been initialized. Change this so we can use more information about the station to use a better rate. For example, when we associate with an AP, we will now use the lowest rate it advertised as supported (that we can) rather than the lowest mandatory rate. This aligns our behaviour with most other 802.11 implementations. To make this possible, we need to also ensure that we have non-zero rates at all times, so in case we really have *nothing* pre-fill the supp_rates bitmap with the very lowest mandatory bitmap (11b and 11a on 2.4 and 5 GHz respectively). Additionally, hostapd appears to be giving us an empty supported rates bitmap (it can and should do better, since the STA must have supported for at least the basic rates in the BSS), so ignore any such bitmaps that would actually zero out the supp_rates, and in that case just keep the pre-filled mandatory rates. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg net/mac80211/cfg.c | 4 ++-- net/mac80211/mlme.c | 7 ++++++- net/mac80211/rate.c | 12 ++++++------ net/mac80211/sta_info.c | 43 ++++++++++++++++++++++++++++++++++++++++++- 4 files changed, 56 insertions(+), 10 deletions(-) commit 1e87fec9fa52a6f7c223998d6bfbd3464eb37e31 Author: Johannes Berg Date: Thu May 16 11:44:52 2019 +0200 mac80211: call rate_control_send_low() internally There's no rate control algorithm that *doesn't* want to call it internally, and calling it internally will let us modify its behaviour in the future. Signed-off-by: Johannes Berg .../driver-api/80211/mac80211-advanced.rst | 3 --- drivers/net/wireless/intel/iwlegacy/3945-rs.c | 3 --- drivers/net/wireless/intel/iwlegacy/4965-rs.c | 4 ---- drivers/net/wireless/intel/iwlwifi/dvm/rs.c | 4 ---- drivers/net/wireless/intel/iwlwifi/mvm/rs.c | 4 ---- drivers/net/wireless/realtek/rtlwifi/rc.c | 3 --- include/net/mac80211.h | 23 ---------------------- net/mac80211/rate.c | 13 ++++++------ net/mac80211/rc80211_minstrel.c | 4 ---- net/mac80211/rc80211_minstrel_ht.c | 3 --- 10 files changed, 7 insertions(+), 57 deletions(-) commit cd6f34110285742ec5570f07aa2229e29f4d2092 Author: Ilan Peer Date: Wed May 29 15:25:33 2019 +0300 ieee80211: Add a missing extended capability flag definition Add the "OBSS Narrow Bandwidth RU In OFDMA Tolerance Support" flag definition to the definitions of the flags covered by the Extended Capability IE. Signed-off-by: Ilan Peer Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg include/linux/ieee80211.h | 7 +++++++ 1 file changed, 7 insertions(+) commit 4770c8f902285089ae1911de39808c808766a115 Author: Ilan Peer Date: Wed May 29 15:25:32 2019 +0300 cfg80211: Add a function to iterate all BSS entries Add a function that iterates over the BSS entries associated with a given wiphy and calls a callback for each iterated BSS. This can be used by drivers in various ways, e.g., to evaluate some property for all the BSSs in the medium. Signed-off-by: Ilan Peer Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg include/net/cfg80211.h | 20 ++++++++++++++++++++ net/wireless/scan.c | 21 +++++++++++++++++++++ 2 files changed, 41 insertions(+) commit a0de1ca383c77a1ae123d7c0cea45e327b61876a Author: John Crispin Date: Tue May 28 13:49:48 2019 +0200 mac80211: allow turning TWT responder support on and off via netlink Allow the userland daemon to en/disable TWT support for an AP. Signed-off-by: Shashidhar Lakkavalli Signed-off-by: John Crispin [simplify parsing code] Signed-off-by: Johannes Berg include/net/cfg80211.h | 2 ++ include/net/mac80211.h | 3 +++ include/uapi/linux/nl80211.h | 4 ++++ net/mac80211/cfg.c | 4 +++- net/wireless/nl80211.c | 4 ++++ 5 files changed, 16 insertions(+), 1 deletion(-) commit c9d3245e03ce20566e373b68dd24a7f2365d8dda Author: John Crispin Date: Tue May 28 13:49:47 2019 +0200 mac80211: dynamically enable the TWT requester support on STA interfaces Turn TWT for STA interfaces when they associate and/or receive a beacon where the twt_responder bit has changed. Signed-off-by: Shashidhar Lakkavalli Signed-off-by: John Crispin Signed-off-by: Johannes Berg include/net/mac80211.h | 2 ++ net/mac80211/mlme.c | 18 ++++++++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) commit 901bb9891855164fdcfcfdd9c3d25bcc800d3f5b Author: Johannes Berg Date: Tue May 28 10:56:03 2019 +0200 nl80211: require and validate vendor command policy Require that each vendor command give a policy of its sub-attributes in NL80211_ATTR_VENDOR_DATA, and then (stricly) check the contents, including the NLA_F_NESTED flag that we couldn't check on the outer layer because there we don't know yet. It is possible to use VENDOR_CMD_RAW_DATA for raw data, but then no nested data can be given (NLA_F_NESTED flag must be clear) and the data is just passed as is to the command. Signed-off-by: Johannes Berg drivers/net/wireless/mac80211_hwsim.c | 2 ++ include/net/cfg80211.h | 8 +++++++ include/net/netlink.h | 9 ++++++++ net/wireless/core.c | 13 ++++++++++++ net/wireless/nl80211.c | 39 +++++++++++++++++++++++++++++++++-- 5 files changed, 69 insertions(+), 2 deletions(-) commit d7edf40c15e85b44c4bef146819b664089b827b1 Author: John Crispin Date: Tue May 21 17:02:58 2019 +0200 mac80211: add ieee80211_get_he_iftype_cap() helper This function is similar to ieee80211_get_he_sta_cap() but allows passing the iftype. Also make ieee80211_get_he_sta_cap() use the new helper rather than duplicating the code. Signed-off-by: Shashidhar Lakkavalli Signed-off-by: John Crispin Signed-off-by: Johannes Berg include/net/cfg80211.h | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) commit 26f7044e95042daabcf1c71796a0e804a83c979f Author: Chung-Hsien Hsu Date: Thu May 9 09:49:06 2019 +0000 nl80211: add support for SAE authentication offload Let drivers advertise support for station-mode SAE authentication offload with a new NL80211_EXT_FEATURE_SAE_OFFLOAD flag. Signed-off-by: Chung-Hsien Hsu Signed-off-by: Chi-Hsien Lin Signed-off-by: Johannes Berg include/linux/ieee80211.h | 1 + include/net/cfg80211.h | 5 +++++ include/uapi/linux/nl80211.h | 19 +++++++++++++++++++ net/wireless/nl80211.c | 14 ++++++++++++++ 4 files changed, 39 insertions(+) commit 3d1f62c686acdedf5ed9642b763f3808d6a47d1e Author: Steve Longerbeam Date: Tue May 21 18:03:13 2019 -0700 gpu: ipu-v3: ipu-ic: Fix saturation bit offset in TPMEM The saturation bit was being set at bit 9 in the second 32-bit word of the TPMEM CSC. This isn't correct, the saturation bit is bit 42, which is bit 10 of the second word. Fixes: 1aa8ea0d2bd5d ("gpu: ipu-v3: Add Image Converter unit") Signed-off-by: Steve Longerbeam Reviewed-by: Philipp Zabel Cc: stable@vger.kernel.org Signed-off-by: Philipp Zabel drivers/gpu/ipu-v3/ipu-ic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cc3e14c21ae928b3f8bce584b2c7d53d332b9738 Author: Chung-Hsien Hsu Date: Thu May 9 09:49:05 2019 +0000 nl80211: add WPA3 definition for SAE authentication Add definition of WPA version 3 for SAE authentication. Signed-off-by: Chung-Hsien Hsu Signed-off-by: Chi-Hsien Lin Signed-off-by: Johannes Berg include/uapi/linux/nl80211.h | 1 + net/wireless/nl80211.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) commit 72bccb487fd55a3b5e753cf9f554f9980a228e8e Author: Philipp Zabel Date: Thu Jan 17 12:05:02 2019 +0100 drm/imx: enable IDMAC watermark feature The DMFC is configured to supply a watermark signal that can be used to temporarily increase channel priority if the FIFO runs low. Use it. Signed-off-by: Philipp Zabel drivers/gpu/drm/imx/ipuv3-plane.c | 1 + 1 file changed, 1 insertion(+) commit f4d75993d85b6ddaeec0e72811debff7a96a7f0d Author: Chung-Hsien Hsu Date: Thu May 9 09:48:25 2019 +0000 nl80211: add NL80211_ATTR_IFINDEX to port authorized event Add NL80211_ATTR_IFINDEX attribute to port authorized event to indicate the operating interface of the device. Also put NL80211_ATTR_WIPHY attribute in it to be consistent with the other MLME notifications. Signed-off-by: Chung-Hsien Hsu Signed-off-by: Chi-Hsien Lin Signed-off-by: Johannes Berg net/wireless/nl80211.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 90cc4bd611903c77b29b94aa03ced6ad79229065 Author: Alexander Wetzel Date: Mon May 6 21:01:48 2019 +0200 mac80211: AMPDU handling for Extended Key ID IEEE 802.11 - 2016 forbids mixing MPDUs with different keyIDs in one A-MPDU. Drivers supporting A-MPDUs and Extended Key ID must actively enforce that requirement due to the available two unicast keyIDs. Allow driver to signal mac80211 that they will not check the keyID in MPDUs when aggregating them and that they expect mac80211 to stop Tx aggregation when rekeying a connection using Extended Key ID. Signed-off-by: Alexander Wetzel Signed-off-by: Johannes Berg include/net/mac80211.h | 4 ++ net/mac80211/debugfs.c | 1 + net/mac80211/key.c | 100 +++++++++++++++++++++++++++---------------------- 3 files changed, 61 insertions(+), 44 deletions(-) commit de85ec271a864c05e99ad5ffbed9e95d1b65c757 Author: Sandor Yu Date: Wed Jun 5 16:04:24 2019 +0800 drm/rockchip: cdn-dp: correct rate in the struct drm_dp_link assignment The value stored in the rate field of struct drm_dp_link should be the actual link-rate and not the bw_code. Right now the driver stores the code and converts it to the rate. So fixup the driver to store the rate itself. Signed-off-by: Sandor Yu Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20190605080424.28731-1-sandor.yu@nxp.com drivers/gpu/drm/rockchip/cdn-dp-reg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 53ffa1ee8de2cdfb0fcbef798486ba9c7f9316fd Author: Justin Swartz Date: Wed May 22 22:46:29 2019 +0000 drm/rockchip: dw_hdmi: add basic rk3228 support Like the RK3328, RK322x SoCs offer a Synopsis DesignWare HDMI transmitter and an Innosilicon HDMI PHY. Add a new dw_hdmi_plat_data struct, rk3228_hdmi_drv_data. Assign a set of mostly generic rk3228_hdmi_phy_ops functions. Add dw_hdmi_rk3228_setup_hpd() to enable the HDMI HPD and DDC lines. Signed-off-by: Justin Swartz Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20190522224631.25164-1-justin.swartz@risingedge.co.za .../bindings/display/rockchip/dw_hdmi-rockchip.txt | 1 + drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 53 ++++++++++++++++++++++ 2 files changed, 54 insertions(+) commit 6e4e9708614aaf743fd9eb29cc2738ab7b501c3f Author: Chris Wilson Date: Fri Jun 14 12:10:53 2019 +0100 drm/i915: Execute signal callbacks from no-op i915_request_wait If we enter i915_request_wait() with an already completed request, but unsignaled dma-fence, signal the fence before returning. This allows us to execute any of the signal callbacks at the earliest opportunity. v2: Also signal after busyspin success Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190614111053.25615-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_request.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit a09507682e45d62e64c93cdb810de6a280424f17 Author: Chris Wilson Date: Fri Jun 14 12:10:52 2019 +0100 drm/i915: Discard some redundant cache domain flushes Since commit a679f58d0510 ("drm/i915: Flush pages on acquisition"), we flush objects on acquire their pages and as such when we create an object for the purpose of writing into it, we do not need to manually flush. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20190614111053.25615-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c | 6 ------ drivers/gpu/drm/i915/gt/selftest_workarounds.c | 6 ------ drivers/gpu/drm/i915/intel_guc_log.c | 11 +---------- drivers/gpu/drm/i915/intel_overlay.c | 8 -------- 4 files changed, 1 insertion(+), 30 deletions(-) commit 5e3fb2a5b528bbb6090bea3f345eb72d8c8b808d Author: Chris Wilson Date: Thu Jun 13 13:28:42 2019 +0100 drm/i915: Enable refcount debugging for default debug levels refcount_t is our first line of defence against use-after-free, so let's enable it for debugging. Signed-off-by: Chris Wilson Acked-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20190613122842.4840-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/Kconfig.debug | 1 + 1 file changed, 1 insertion(+) commit 1a2a66db4967d66402501c43bdfe9d68be54f648 Author: Bartlomiej Zolnierkiewicz Date: Fri Apr 12 11:42:16 2019 +0200 arm64: remove redundant 'default n' from Kconfig 'default n' is the default value for any bool or tristate Kconfig setting so there is no need to write it explicitly. Also since commit f467c5640c29 ("kconfig: only write '# CONFIG_FOO is not set' for visible symbols") the Kconfig behavior is the same regardless of 'default n' being present or not: ... One side effect of (and the main motivation for) this change is making the following two definitions behave exactly the same: config FOO bool config FOO bool default n With this change, neither of these will generate a '# CONFIG_FOO is not set' line (assuming FOO isn't selected/implied). That might make it clearer to people that a bare 'default n' is redundant. ... Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Catalin Marinas arch/arm64/Kconfig | 1 - 1 file changed, 1 deletion(-) commit cbb99c0f588737ec98c333558922ce47e9a95827 Author: Aaron Lewis Date: Wed Jun 5 15:02:52 2019 -0700 x86/cpufeatures: Add FDP_EXCPTN_ONLY and ZERO_FCS_FDS Add the CPUID enumeration for Intel's de-feature bits to accommodate passing these de-features through to kvm guests. These de-features are (from SDM vol 1, section 8.1.8): - X86_FEATURE_FDP_EXCPTN_ONLY: If CPUID.(EAX=07H,ECX=0H):EBX[bit 6] = 1, the data pointer (FDP) is updated only for the x87 non-control instructions that incur unmasked x87 exceptions. - X86_FEATURE_ZERO_FCS_FDS: If CPUID.(EAX=07H,ECX=0H):EBX[bit 13] = 1, the processor deprecates FCS and FDS; it saves each as 0000H. Signed-off-by: Aaron Lewis Signed-off-by: Borislav Petkov Reviewed-by: Jim Mattson Cc: Fenghua Yu Cc: Frederic Weisbecker Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Konrad Rzeszutek Wilk Cc: marcorr@google.com Cc: Peter Feiner Cc: pshier@google.com Cc: Robert Hoo Cc: Thomas Gleixner Cc: Thomas Lendacky Cc: x86-ml Link: https://lkml.kernel.org/r/20190605220252.103406-1-aaronlewis@google.com arch/x86/include/asm/cpufeatures.h | 2 ++ 1 file changed, 2 insertions(+) commit 2454fcea338ad821a39d471bc7db5a58ba41b742 Merge: 561564bea324 51e857af9f3f Author: Daniel Vetter Date: Fri Jun 14 11:31:13 2019 +0200 Merge tag 'drm-misc-next-2019-06-14' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for v5.3: UAPI Changes: Cross-subsystem Changes: - Add code to signal all dma-fences when freed with pending signals. - Annotate reservation object access in CONFIG_DEBUG_MUTEXES Core Changes: - Assorted documentation fixes. - Use irqsave/restore spinlock to add crc entry. - Move code around to drm_client, for internal modeset clients. - Make drm_crtc.h and drm_debugfs.h self-contained. - Remove drm_fb_helper_connector. - Add bootsplash to todo. - Fix lock ordering in pan_display_legacy. - Support pinning buffers to current location in gem-vram. - Remove the now unused locking functions from gem-vram. - Remove the now unused kmap-object argument from vram helpers. - Stop checking return value of debugfs_create. - Add atomic encoder enable/disable helpers. - pass drm_atomic_state to atomic connector check. - Add atomic support for bridge enable/disable. - Add self refresh helpers to core. Driver Changes: - Add extra delay to make MTP SDM845 work. - Small fixes to virtio, vkms, sii902x, sii9234, ast, mcde, analogix, rockchip. - Add zpos and ?BGR8888 support to meson. - More removals of drm_os_linux and drmP headers for amd, radeon, sti, r128, r128, savage, sis. - Allow synopsis to unwedge the i2c hdmi bus. - Add orientation quirks for GPD panels. - Edid cleanups and fixing handling for edid < 1.2. - Add runtime pm to stm. - Handle s/r in dw-hdmi. - Add hooks for power on/off to dsi for stm. - Remove virtio dirty tracking code, done in drm core. - Rework BO handling in ast and mgag200. Tiny conflict in drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c, needed #include to make it compile. Signed-off-by: Daniel Vetter From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/0e01de30-9797-853c-732f-4a5bd6e61445@linux.intel.com commit 034252e37b313083002e1cb13b4b5d0b6d926b4c Author: Fabio Estevam Date: Wed Jun 5 14:37:38 2019 -0300 usb: chipidea: msm: Use devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify the code a bit. Signed-off-by: Fabio Estevam Signed-off-by: Peter Chen drivers/usb/chipidea/ci_hdrc_msm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 8fbd06e592304a121c61b0a01f0b85e7b5a9a05d Author: Fabio Estevam Date: Wed Jun 5 14:37:37 2019 -0300 usb: chipidea: imx: Use devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify the code a bit. Signed-off-by: Fabio Estevam Signed-off-by: Peter Chen drivers/usb/chipidea/usbmisc_imx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit b8a4f526fabafa2b701644c0a8a6220f39c3cbf1 Author: Fabio Estevam Date: Wed Jun 5 13:08:49 2019 -0300 usb: chipidea: Use dev_err() instead of pr_err() dev_err() is more appropriate for printing error messages inside drivers, so switch to dev_err(). While at it also add the missing newlines. Signed-off-by: Fabio Estevam Signed-off-by: Peter Chen drivers/usb/chipidea/core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit ed5a419bb0195c4f79ccbb85d6bd3ae3ad0a8ac7 Author: Peter Chen Date: Tue May 7 09:53:55 2019 +0800 usb: chipidea: imx: "fsl,usbphy" phandle is not mandatory now Since the chipidea common code support get the USB PHY phandle from "phys", the glue layer is not mandatory to get the "fsl,usbphy" phandle any more. Signed-off-by: Peter Chen drivers/usb/chipidea/ci_hdrc_imx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit d1609c312d42f3bdfe7df9d4dd9d5b2c7ace90f4 Author: Peter Chen Date: Sun Apr 28 10:35:31 2019 +0800 usb: chipidea: imx: add imx7ulp support In this commit, we add CI_HDRC_PMQOS to avoid system entering idle, at imx7ulp, if the system enters idle, the DMA will stop, so the USB transfer can't work at this case. Signed-off-by: Peter Chen drivers/usb/chipidea/ci_hdrc_imx.c | 28 +++++++++++++++++++++++++++- drivers/usb/chipidea/usbmisc_imx.c | 4 ++++ include/linux/usb/chipidea.h | 1 + 3 files changed, 32 insertions(+), 1 deletion(-) commit d06c47e3dd07fdf3f07e8fc45f2ce655e9b295c5 Author: Nikolaus Voss Date: Wed Jun 12 10:36:06 2019 +0200 ACPI: configfs: Resolve objects on host-directed table loads If an ACPI SSDT overlay is loaded after built-in tables have been loaded e.g. via configfs or efivar_ssdt_load() it is necessary to rewalk the namespace to resolve references. Without this, relative and absolute paths like ^PCI0.SBUS or \_SB.PCI0.SBUS are not resolved correctly. Make configfs loads use the same method as efivar_ssdt_load(). Signed-off-by: Nikolaus Voss Signed-off-by: Rafael J. Wysocki drivers/acpi/acpi_configfs.c | 6 +----- drivers/acpi/acpica/tbxfload.c | 11 +++++++++++ 2 files changed, 12 insertions(+), 5 deletions(-) commit f497ab6b4bb813aca439b7f3a72a060b58b147c4 Author: Douglas Anderson Date: Mon Jun 10 16:51:44 2019 -0700 ARM: dts: rockchip: Configure BT_HOST_WAKE as wake-up signal on veyron This enables wake up on Bluetooth activity when the device is suspended. The BT_HOST_WAKE signal is only connected on devices with BT module that are connected through UART. Signed-off-by: Douglas Anderson Signed-off-by: Matthias Kaehlcke Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288-veyron.dtsi | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit bcc071110aeacd28a87525a2442dd96eab145a3c Author: Greg Hackmann Date: Thu Jun 13 15:34:08 2019 -0700 dma-buf: add show_fdinfo handler The show_fdinfo handler exports the same information available through debugfs on a per-buffer basis. Signed-off-by: Greg Hackmann Signed-off-by: Chenbo Feng Signed-off-by: Sumit Semwal Link: https://patchwork.freedesktop.org/patch/msgid/20190613223408.139221-4-fengc@google.com drivers/dma-buf/dma-buf.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit bb2bb903042517b8fb17b2bc21e00512f2dcac01 Author: Greg Hackmann Date: Thu Jun 13 15:34:07 2019 -0700 dma-buf: add DMA_BUF_SET_NAME ioctls This patch adds complimentary DMA_BUF_SET_NAME ioctls, which lets userspace processes attach a free-form name to each buffer. This information can be extremely helpful for tracking and accounting shared buffers. For example, on Android, we know what each buffer will be used for at allocation time: GL, multimedia, camera, etc. The userspace allocator can use DMA_BUF_SET_NAME to associate that information with the buffer, so we can later give developers a breakdown of how much memory they're allocating for graphics, camera, etc. Signed-off-by: Greg Hackmann Signed-off-by: Chenbo Feng Signed-off-by: Sumit Semwal Link: https://patchwork.freedesktop.org/patch/msgid/20190613223408.139221-3-fengc@google.com drivers/dma-buf/dma-buf.c | 65 ++++++++++++++++++++++++++++++++++++++++++-- include/linux/dma-buf.h | 5 +++- include/uapi/linux/dma-buf.h | 3 ++ 3 files changed, 69 insertions(+), 4 deletions(-) commit ed63bb1d1f8469586006a9ca63c42344401aa2ab Author: Greg Hackmann Date: Thu Jun 13 15:34:06 2019 -0700 dma-buf: give each buffer a full-fledged inode By traversing /proc/*/fd and /proc/*/map_files, processes with CAP_ADMIN can get a lot of fine-grained data about how shmem buffers are shared among processes. stat(2) on each entry gives the caller a unique ID (st_ino), the buffer's size (st_size), and even the number of pages currently charged to the buffer (st_blocks / 512). In contrast, all dma-bufs share the same anonymous inode. So while we can count how many dma-buf fds or mappings a process has, we can't get the size of the backing buffers or tell if two entries point to the same dma-buf. On systems with debugfs, we can get a per-buffer breakdown of size and reference count, but can't tell which processes are actually holding the references to each buffer. Replace the singleton inode with full-fledged inodes allocated by alloc_anon_inode(). This involves creating and mounting a mini-pseudo-filesystem for dma-buf, following the example in fs/aio.c. Signed-off-by: Greg Hackmann Signed-off-by: Chenbo Feng Signed-off-by: Sumit Semwal Link: https://patchwork.freedesktop.org/patch/msgid/20190613223408.139221-2-fengc@google.com drivers/dma-buf/dma-buf.c | 63 +++++++++++++++++++++++++++++++++++++++++----- include/uapi/linux/magic.h | 1 + 2 files changed, 58 insertions(+), 6 deletions(-) commit 5f4318c1b1d23a9290e4def78ee76017c288bf60 Author: Rajneesh Bhardwaj Date: Fri Jun 14 13:47:01 2019 +0530 perf/x86: Add Intel Ice Lake NNPI uncore support Intel Ice Lake uncore support already included IMC PCI ID but ICL-NNPI CPUID is missing so add it to fix the probe function. Fixes: e39875d15ad6 ("perf/x86: add Intel Icelake uncore support") Signed-off-by: Rajneesh Bhardwaj Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra Cc: alexander.shishkin@linux.intel.com Cc: Dave Hansen Cc: Andy Shevchenko Cc: "H. Peter Anvin" Cc: Kan Liang Cc: Qiuxu Zhuo Cc: Srinivas Pandruvada Cc: Len Brown Cc: Linux PM Link: https://lkml.kernel.org/r/20190614081701.13828-1-rajneesh.bhardwaj@linux.intel.com arch/x86/events/intel/uncore.c | 1 + 1 file changed, 1 insertion(+) commit 549dcdafe793000fbe38914a1f231d3c6034a6ec Author: Ezequiel Garcia Date: Fri Jun 7 21:35:01 2019 -0300 arm64: dts: rockchip: Enable HDMI audio on Rock Pi This commit enables the hdmi-sound device needed to have audio over HDMI on the Rock Pi board. Fixes: 1b5715c602fda ("arm64: dts: rockchip: add ROCK Pi 4 DTS support") Signed-off-by: Ezequiel Garcia Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 3540d38dd38308b811c6ddaf2fde03e9948cc1c1 Author: Bart Van Assche Date: Wed Jun 5 09:12:37 2019 -0700 PM: sleep: Show how long dpm_suspend_start() and dpm_suspend_end() take When debugging device driver power management code it is convenient to know how much time is spent in the "suspend start" and "suspend end" phases. Hence log the time spent in these phases. Signed-off-by: Bart Van Assche Signed-off-by: Rafael J. Wysocki drivers/base/power/main.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 1ec0cd8286f35988134e05367ab5e66213b84e7c Author: Mathieu Malaterre Date: Fri May 24 12:44:18 2019 +0200 PM: hibernate: powerpc: Expose pfn_is_nosave() prototype The declaration for pfn_is_nosave is only available in kernel/power/power.h. Since this function can be override in arch, expose it globally. Having a prototype will make sure to avoid warning (sometime treated as error with W=1) such as: arch/powerpc/kernel/suspend.c:18:5: error: no previous prototype for 'pfn_is_nosave' [-Werror=missing-prototypes] This moves the declaration into a globally visible header file and add missing include to avoid a warning on powerpc. Also remove the duplicated prototypes since not required anymore. Signed-off-by: Mathieu Malaterre Acked-by: Michael Ellerman (powerpc) Signed-off-by: Rafael J. Wysocki arch/powerpc/kernel/suspend.c | 1 + arch/s390/kernel/entry.h | 1 - include/linux/suspend.h | 1 + kernel/power/power.h | 2 -- 4 files changed, 2 insertions(+), 3 deletions(-) commit 4892d3a6a009f7eba2e806b9183e5d8790769f41 Author: Linus Walleij Date: Fri Jun 14 10:12:26 2019 +0200 gpio: Drop the parent_irq from gpio_irq_chip We already have an array named "parents" so instead of letting one point to the other, simply allocate a dynamic array to hold the parents, just one if desired and drop the number of members in gpio_irq_chip by 1. Rename gpiochip to gc in the process. Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 30 +++++++++++++++++++----------- include/linux/gpio/driver.h | 7 ------- 2 files changed, 19 insertions(+), 18 deletions(-) commit 9a82ee69ee938c04f8ea4fe5d3e44565377122b8 Author: Linus Walleij Date: Fri Jun 14 09:34:11 2019 +0200 gpio: Add GPIOLIB_IRQCHIP cleanup to TODO We now have two APIs for registering GPIOLIB_IRQCHIP, this is not working and creating confusion. Add a TODO item to fix it up. Cc: Thierry Reding Signed-off-by: Linus Walleij drivers/gpio/TODO | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit 42d9fc7176eb6b0ed4cd73bb66d28c8ea758a944 Author: Linus Walleij Date: Thu Jun 13 16:11:42 2019 +0200 gpio: ftgpio: Pass irqchip when adding gpiochip We need to convert all old gpio irqchips to pass the irqchip setup along when adding the gpio_chip. For chained irqchips this is a pretty straight-forward conversion. Cc: Thierry Reding Signed-off-by: Linus Walleij drivers/gpio/gpio-ftgpio010.c | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) commit b1622cb3be4557fd086831ca7426eafe5f1acc2e Author: Tomi Valkeinen Date: Mon Jun 10 16:57:39 2019 +0300 drm/bridge: tfp410: fix use of cancel_delayed_work_sync We use delayed_work in HPD handling, and cancel any scheduled work in tfp410_fini using cancel_delayed_work_sync(). However, we have only initialized the delayed work if we actually have a HPD interrupt configured in the DT, but in the tfp410_fini, we always cancel the work, possibly causing a WARN(). Fix this by doing the cancel only if we actually had the delayed work set up. Signed-off-by: Tomi Valkeinen Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190610135739.6077-2-tomi.valkeinen@ti.com drivers/gpu/drm/bridge/ti-tfp410.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c08f99c39083ab55a9c93b3e93cef48711294dad Author: Tomi Valkeinen Date: Mon Jun 10 16:57:38 2019 +0300 drm/bridge: tfp410: fix memleak in get_modes() We don't free the edid blob allocated by the call to drm_get_edid(), causing a memleak. Fix this by calling kfree(edid) at the end of the get_modes(). Signed-off-by: Tomi Valkeinen Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190610135739.6077-1-tomi.valkeinen@ti.com drivers/gpu/drm/bridge/ti-tfp410.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 51e857af9f3f1ab78be10ff6bf5c4a8a56f4e4d6 Author: Sean Paul Date: Thu Jun 13 20:27:00 2019 -0400 drm/amdgpu: Fix connector atomic_check compilation fail I missed amdgpu in my connnector_helper_funcs->atomic_check conversion, which is understandably causing compilation failures. Fixes: 6f3b62781bbd ("drm: Convert connector_helper_funcs->atomic_check to accept drm_atomic_state") Cc: Daniel Vetter Cc: Ville Syrjälä Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Ben Skeggs Cc: Laurent Pinchart Cc: Kieran Bingham Cc: Eric Anholt Cc: Laurent Pinchart [for rcar lvds] Cc: Sean Paul Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Cc: Lyude Paul Cc: Karol Herbst Cc: Ilia Mirkin Cc: dri-devel@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org Cc: linux-renesas-soc@vger.kernel.org Reported-by: Chris Wilson Signed-off-by: Sean Paul Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20190614002713.141340-1-sean@poorly.run drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit bc6f2a757d525e001268c3658bd88822e768f8db Author: YueHaibing Date: Tue Jun 11 23:00:07 2019 +0800 kernel/module: Fix mem leak in module_add_modinfo_attrs In module_add_modinfo_attrs if sysfs_create_file fails, we forget to free allocated modinfo_attrs and roll back the sysfs files. Fixes: 03e88ae1b13d ("[PATCH] fix module sysfs files reference counting") Reviewed-by: Miroslav Benes Signed-off-by: YueHaibing Signed-off-by: Jessica Yu kernel/module.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) commit 8928aa6a007d0a58f500b79812ea8147ec477090 Author: Li RongQing Date: Thu Jun 13 19:45:24 2019 +0800 xfrm: remove empty xfrmi_init_net Pointer members of an object with static storage duration, if not explicitly initialized, will be initialized to a NULL pointer. The net namespace API checks if this pointer is not NULL before using it, it are safe to remove the function. Signed-off-by: Li RongQing Signed-off-by: Steffen Klassert net/xfrm/xfrm_interface.c | 6 ------ 1 file changed, 6 deletions(-) commit 0eaab70a7a1b70ec39e61817553321b3bc638156 Author: Dinh Nguyen Date: Tue Jun 11 10:34:33 2019 -0500 dmagengine: pl330: add code to get reset property The DMA controller on some SoCs can be held in reset, and thus requires the reset signal(s) to deasserted. Most SoCs will have just one reset signal, but there are others, i.e. Arria10/Stratix10 will have an additional reset signal, referred to as the OCP. Add code to get the reset property from the device tree for deassert and assert. Signed-off-by: Dinh Nguyen Signed-off-by: Vinod Koul drivers/dma/pl330.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit 0ed91bded307cc980f9542eff861266f1744c303 Author: Dinh Nguyen Date: Tue Jun 11 10:34:32 2019 -0500 dt-bindings: pl330: document the optional resets property Add the optional resets property the pl330 dma node. Signed-off-by: Dinh Nguyen Signed-off-by: Vinod Koul Documentation/devicetree/bindings/dma/arm-pl330.txt | 3 +++ 1 file changed, 3 insertions(+) commit fc15be39a827e6e417431a8dc5ca2612d0b3e944 Author: Alexandru Ardelean Date: Thu Jun 6 13:45:50 2019 +0300 dmaengine: axi-dmac: add regmap support The registers for AXI DMAC are detailed at: https://wiki.analog.com/resources/fpga/docs/axi_dmac#register_map This change adds regmap support for these registers, in case some wants to have a more direct access to them via this interface. Signed-off-by: Alexandru Ardelean [vkoul: fixed code style issue] Signed-off-by: Vinod Koul drivers/dma/Kconfig | 1 + drivers/dma/dma-axi-dmac.c | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) commit e28d915528136449ed261a743dfa3f392f555045 Author: Alexandru Ardelean Date: Thu Jun 6 13:45:49 2019 +0300 dmaengine: axi-dmac: terminate early DMA transfers after a partial one When a partial transfer is received, the driver should not submit any more segments to the hardware, as they will be ignored/unused until a new transfer start operation is done. This change implements this by adding a new flag on the AXI DMAC descriptor. This flags is set to true, if there was a partial transfer in a previously completed segment. When that flag is true, the TLAST flag is added to the to the submitted segment, signaling the controller to stop receiving more segments. Signed-off-by: Alexandru Ardelean Signed-off-by: Vinod Koul drivers/dma/dma-axi-dmac.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e3923592f80ba93aaa35b8d49b1f0a5b31db6b7f Author: Alexandru Ardelean Date: Thu Jun 6 13:45:48 2019 +0300 dmaengine: axi-dmac: populate residue info for completed xfers Starting with version 4.2.a, the AXI DMAC controller can report partial transfers that have been issued. This change implements computing DMA residue information for transfers, based on that reported information. The way this is done, is to dequeue the partial transfers from the FIFO of partial transfers, store the partial length to the correct segment & descriptor, and compute the residue before submitting the DMA cookie to the DMA framework. Signed-off-by: Alexandru Ardelean Signed-off-by: Vinod Koul drivers/dma/dma-axi-dmac.c | 99 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 98 insertions(+), 1 deletion(-) commit 09d5b702b0f97dd0768dade7106b6bf7622b1355 Author: Alexandru Ardelean Date: Thu Jun 6 13:45:47 2019 +0300 dmaengine: virt-dma: store result on dma descriptor This allows each virtual channel to store information about each transfer that completed, i.e. which transfer succeeded (or which failed) and if there was any residue data on each (completed) transfer. Signed-off-by: Alexandru Ardelean Signed-off-by: Vinod Koul drivers/dma/virt-dma.c | 4 ++-- drivers/dma/virt-dma.h | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) commit a08a9645a3d6f9e11a2dba2b46f0d5ac5d80c4e0 Author: Greg Kroah-Hartman Date: Wed Jun 12 14:25:57 2019 +0200 dmaengine: qcom: hidma: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Also, because there is no need to save the file dentry, remove the variables that were saving them as they were never even being used once set. Cc: Sinan Kaya Cc: Andy Gross Cc: David Brown Cc: Dan Williams Cc: Vinod Koul Cc: linux-arm-kernel@lists.infradead.org Cc: linux-arm-msm@vger.kernel.org Cc: dmaengine@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Acked-by: Sinan Kaya Signed-off-by: Vinod Koul drivers/dma/qcom/hidma.h | 5 +---- drivers/dma/qcom/hidma_dbg.c | 37 +++++++------------------------------ 2 files changed, 8 insertions(+), 34 deletions(-) commit bea696c5ce1e165a95699acd2c4fc34c43177a08 Author: Greg Kroah-Hartman Date: Wed Jun 12 14:25:56 2019 +0200 dmaengine: mic_x100_dma: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Sudeep Dutt Cc: Ashutosh Dixit Cc: Dan Williams Cc: Vinod Koul Cc: dmaengine@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Reviewed-by: Sudeep Dutt Signed-off-by: Vinod Koul drivers/dma/mic_x100_dma.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 8148a87846ebe07e8f34954205bbd8ab40693f4b Author: Greg Kroah-Hartman Date: Wed Jun 12 14:25:55 2019 +0200 dmaengine: pxa_dma: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Also, because there is no need to save the file dentry, remove the variable that was saving it as it was never even being used once set. Cc: Daniel Mack Cc: Haojian Zhuang Cc: Robert Jarzmik Cc: Vinod Koul Cc: Dan Williams Cc: linux-arm-kernel@lists.infradead.org Cc: dmaengine@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Vinod Koul drivers/dma/pxa_dma.c | 56 ++++++++++----------------------------------------- 1 file changed, 11 insertions(+), 45 deletions(-) commit c33394bd006c2efa742b204e740c098763972dc9 Author: Greg Kroah-Hartman Date: Wed Jun 12 14:25:54 2019 +0200 dmaengine: coh901318: no need to cast away call to debugfs_create_file() No need to check the return value of debugfs_create_file(), so no need to provide a fake "cast away" of the return value either. Cc: Linus Walleij Cc: Vinod Koul Cc: Dan Williams Cc: linux-arm-kernel@lists.infradead.org Cc: dmaengine@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Reviewed-by: Linus Walleij Signed-off-by: Vinod Koul drivers/dma/coh901318.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 635d7302caca40841077804c194ae8e00339e2a0 Author: Greg Kroah-Hartman Date: Wed Jun 12 14:25:53 2019 +0200 dmaengine: bcm-sba-raid: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Also, because there is no need to save the file dentry, remove the variable that was saving it as it was never even being used once set. Cc: Vinod Koul Cc: Dan Williams Cc: dmaengine@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Vinod Koul drivers/dma/bcm-sba-raid.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) commit 718745f87f95d0a8c3cdeb52abd20bfc2b063d12 Author: Greg Kroah-Hartman Date: Wed Jun 12 14:25:52 2019 +0200 dmaengine: amba-pl08x: no need to cast away call to debugfs_create_file() No need to check the return value of debugfs_create_file(), so no need to provide a fake "cast away" of the return value either. Cc: Dan Williams Cc: Vinod Koul Cc: dmaengine@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Vinod Koul drivers/dma/amba-pl08x.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 20023d3e5071a49c530df239c694b2dcefd97597 Author: Heiner Kallweit Date: Tue Jun 11 21:09:19 2019 +0200 r8169: improve rtl_coalesce_info tp->coalesce_info is used in rtl_coalesce_info() only, so we can remove this member. In addition replace phy_ethtool_get_link_ksettings with a direct access to tp->phydev->speed. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169_main.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) commit 9b994b4a074c5d1daea0e9d4eb83e0372a3337e5 Author: Heiner Kallweit Date: Tue Jun 11 21:04:09 2019 +0200 r8169: let mdio read functions return -ETIMEDOUT In case of a timeout currently ~0 is returned. Callers often just check whether a certain bit is set and therefore may behave incorrectly. So let's return -ETIMEDOUT in case of a timeout. r8168_phy_ocp_read is used in r8168g_mdio_read only, therefore we can apply the same change. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 6358f38c062d791ec1b617738f5c2de54f0ff6db Author: Vladimir Oltean Date: Tue Jun 11 21:47:45 2019 +0300 net: dsa: tag_sja1105: Select CONFIG_PACKING The packing facility is needed to decode Ethernet meta frames containing source port and RX timestamping information. The DSA driver selects CONFIG_PACKING, but the tagger did not, and since taggers can be now compiled as modules independently from the drivers themselves, this is an issue now, as CONFIG_PACKING is disabled by default on all architectures. Fixes: e53e18a6fe4d ("net: dsa: sja1105: Receive and decode meta frames") Signed-off-by: Vladimir Oltean Reported-by: Randy Dunlap Acked-by: Randy Dunlap # build-tested Signed-off-by: David S. Miller net/dsa/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 7fa0043d5c74c6ef6ab58ecf7528fd33c6cb07a8 Author: Robert Hancock Date: Tue Jun 11 10:56:02 2019 -0600 net: axienet: move use of resource after validity check We were accessing the pointer returned from platform_get_resource before checking if it was valid, causing an oops if it was not. Move this access after the call to devm_ioremap_resource which does the validity check. Signed-off-by: Robert Hancock Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f9a94f85e885c8eced04ef839dfda90f2511b185 Merge: 11817aa69bf3 d9b9f40bba7d Author: David S. Miller Date: Thu Jun 13 22:39:32 2019 -0700 Merge branch 's390-qeth-next' Julian Wiedmann says: ==================== s390/qeth: updates 2019-06-11 please apply the following patch series for qeth to net-next. This brings all sorts of cleanups and minor improvements, primarily for the control IO path. ==================== Signed-off-by: David S. Miller commit d9b9f40bba7db1147e8069fd3eba711b2247ee67 Author: Julian Wiedmann Date: Tue Jun 11 18:38:00 2019 +0200 s390/qeth: allocate a single cmd on read channel We statically allocate 8 cmd buffers on the read channel, when the only IO left that's still using them is the long-running READ. Replace this with a single allocated cmd, that gets restarted whenever the READ completed. This introduces refcounting for allocated cmds, so that the READ cmd can survive the IO completion. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_core.h | 7 +++++ drivers/s390/net/qeth_core_main.c | 54 +++++++++++++++++++++++---------------- drivers/s390/net/qeth_l2_main.c | 1 - drivers/s390/net/qeth_l3_main.c | 1 - 4 files changed, 39 insertions(+), 24 deletions(-) commit f3b783b1d0d7d2d76e2bd8c136a80487f93dc680 Author: Julian Wiedmann Date: Tue Jun 11 18:37:59 2019 +0200 s390/qeth: command-chain the IDX sequence The current IDX sequence first sends one WRITE cmd to activate the device, and then sends a second cmd that READs the response. Using qeth_alloc_cmd(), we can combine this into a single IO with two command-chained CCWs. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_core_main.c | 58 ++++++++++----------------------------- 1 file changed, 14 insertions(+), 44 deletions(-) commit 2066e1db9eef8e2057bb3a1b7cb3503a7f6725d9 Author: Julian Wiedmann Date: Tue Jun 11 18:37:58 2019 +0200 s390/qeth: convert RCD code to common IO infrastructure The RCD code is the last remaining IO path that doesn't use the qeth_send_control_data() infrastructure. Doing so allows us to remove all sorts of custom state machinery and logic in the IRQ handler. Instead of introducing statically allocated cmd buffers for this single IO on the data channel, use the new qeth_alloc_cmd() helper. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_core.h | 2 - drivers/s390/net/qeth_core_main.c | 132 +++++++++++++------------------------- drivers/s390/net/qeth_core_mpc.h | 2 - 3 files changed, 46 insertions(+), 90 deletions(-) commit 405548959cc7e81b4ec0a88a06cc8e1060d4666f Author: Julian Wiedmann Date: Tue Jun 11 18:37:57 2019 +0200 s390/qeth: add support for dynamically allocated cmds qeth currently uses a fixed set of statically allocated cmd buffers for the read and write IO channels. This (1) doesn't play well with the single RCD cmd we need to issue on the data channel, (2) doesn't provide the necessary flexibility for certain IDX improvements, and (3) is also rather wasteful since the buffers are idle most of the time. Add a new type of cmd buffer that is dynamically allocated, and keeps its ccw chain in the DMA data area. Since this touches most callers of qeth_setup_ccw(), also add a new CCW flags parameter for future usage. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_core.h | 9 +++++++ drivers/s390/net/qeth_core_main.c | 56 ++++++++++++++++++++++++++++++++------- 2 files changed, 56 insertions(+), 9 deletions(-) commit fcda7f73b618d93e16c9f82fbc366ed4ea327e0e Author: Julian Wiedmann Date: Tue Jun 11 18:37:56 2019 +0200 s390/qeth: remove 'channel' parameter from callbacks Each cmd buffer maintains a pointer to the IO channel that it was/will be issued on. So when dealing with cmd buffers, we don't need to pass around a separate channel pointer. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_core.h | 5 ++--- drivers/s390/net/qeth_core_main.c | 38 +++++++++++++++++--------------------- drivers/s390/net/qeth_l2_main.c | 5 ++--- 3 files changed, 21 insertions(+), 27 deletions(-) commit 57a688aa22eb0ce4b1c7e9310a5d84880d1884ca Author: Julian Wiedmann Date: Tue Jun 11 18:37:55 2019 +0200 s390/qeth: convert device-specific trace entries The vast majority of SETUP-classified trace entries can be moved to their device-specific trace file. This reduces pollution of the global SETUP file, and provides a consistent trace view of all activity on the device. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_core_main.c | 196 ++++++++++++++++++-------------------- drivers/s390/net/qeth_l2_main.c | 28 +++--- drivers/s390/net/qeth_l3_main.c | 35 ++++--- 3 files changed, 122 insertions(+), 137 deletions(-) commit 0ce37ec297f68d754fa2f8e1aa4c233c897ce137 Author: Julian Wiedmann Date: Tue Jun 11 18:37:54 2019 +0200 s390/qeth: remove OSN-specific IO code OSN currently provides a custom code path to submit IPA cmds, without waiting for the cmd response. Replace it with qeth_send_ipa_cmd(), which uses the common qeth_send_control_data() IO infrastructure. By setting a custom iob->callback, we can now provide feedback to the caller about whether the cmd has been successfully submitted to HW. Since the callback then immediately wakes up the reply-waiter object, we maintain the old behaviour of returning early without waiting for the response. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_core.h | 1 + drivers/s390/net/qeth_core_main.c | 3 ++- drivers/s390/net/qeth_l2_main.c | 43 +++++++-------------------------------- 3 files changed, 10 insertions(+), 37 deletions(-) commit 1273a800141084c73a59947f9734f46da23979e5 Author: Julian Wiedmann Date: Tue Jun 11 18:37:53 2019 +0200 s390/qeth: remove qeth_wait_for_buffer() The basic MPC initialization sequence is strictly sequential, and waiting for an available cmd buffer should never be necessary. So this change only affects the OSN path, where dangling waiters on an unbounded wait_event() are not desirable. Switch to qeth_get_buffers(), and let OSN callers deal with -ENOMEM. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_core.h | 2 +- drivers/s390/net/qeth_core_main.c | 58 +++++++++++++++++++++------------------ drivers/s390/net/qeth_l2_main.c | 5 +++- 3 files changed, 37 insertions(+), 28 deletions(-) commit 09ac887f03608db76847f2be4a8ec72cb4323b0d Author: Julian Wiedmann Date: Tue Jun 11 18:37:52 2019 +0200 s390/qeth: clean up setting of BLKT defaults When called from qeth_core_probe_device(), qeth_determine_capabilities() initializes the device's BLKT defaults. From all other callers, the ccw_device has already been set online and the BLKT setting is skipped. Clean this up by extracting the BLKT setting into a separate helper that gets called from the right place. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_core.h | 1 + drivers/s390/net/qeth_core_main.c | 11 ++++++----- 2 files changed, 7 insertions(+), 5 deletions(-) commit 7cbc9e8fe6ccbc47604a91901620c67bc538e152 Author: Julian Wiedmann Date: Tue Jun 11 18:37:51 2019 +0200 s390/qeth: restart pending READ cmd from callback The completion of a pending READ cmd is processed via qeth_issue_next_read_cb(). Let this callback also start the next READ cmd, instead of hardcoding that step into the IRQ handler. While at it remove the check of the channel state, __qeth_issue_next_read() already does this. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_core_main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit ad16087222262d7e66cc1ed3838264b84997323a Author: Julian Wiedmann Date: Tue Jun 11 18:37:50 2019 +0200 s390/qeth: simplify DOWN state handling When the tear down sequence in qeth_l?_stop_card() has finished, the card is guaranteed to be in DOWN state and we don't have to check for it again. With this insight we can also remove the redundant setting of card->state in qeth_l?_set_online()'s error path. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_l2_main.c | 7 ++----- drivers/s390/net/qeth_l3_main.c | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) commit 4e2fe4edcabe50b4fe82dcae5c0daca2109df1a9 Author: Julian Wiedmann Date: Tue Jun 11 18:37:49 2019 +0200 s390/qeth: use mm helpers Slightly reduce the complexity of the core xmit path, by replacing some open-coded logic with the corresponding helpers. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_core_main.c | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) commit e8b1116118d777d9851a305c2c30ce5673681fce Author: Julian Wiedmann Date: Tue Jun 11 18:37:48 2019 +0200 s390/qeth: don't mask TX errors on IQD devices Current code suppresses debug entries when an TX buffer completes in ERROR state with no error indication set in SBALF15. This was introduced back with commit 58490f18071d ("qeth: HiperSockets SIGA retry support on CC=2."). But qeth no longer retries after CC=2, and this sort of suppression make no sense anymore. Remove it. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_core_main.c | 7 ------- 1 file changed, 7 deletions(-) commit 0aa82c482ab2ece530a6f44897b63b274bb43c8e Author: Nathan Lynch Date: Fri Jun 7 00:04:07 2019 -0500 powerpc/pseries: Fix oops in hotplug memory notifier During post-migration device tree updates, we can oops in pseries_update_drconf_memory() if the source device tree has an ibm,dynamic-memory-v2 property and the destination has a ibm,dynamic_memory (v1) property. The notifier processes an "update" for the ibm,dynamic-memory property but it's really an add in this scenario. So make sure the old property object is there before dereferencing it. Fixes: 2b31e3aec1db ("powerpc/drmem: Add support for ibm, dynamic-memory-v2 property") Cc: stable@vger.kernel.org # v4.16+ Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman arch/powerpc/platforms/pseries/hotplug-memory.c | 3 +++ 1 file changed, 3 insertions(+) commit 934bda59f286d0221f1a3ebab7f5156a996cc37d Author: Daniel Axtens Date: Mon Jun 3 16:56:57 2019 +1000 powerpc/pseries/hvconsole: Fix stack overread via udbg While developing KASAN for 64-bit book3s, I hit the following stack over-read. It occurs because the hypercall to put characters onto the terminal takes 2 longs (128 bits/16 bytes) of characters at a time, and so hvc_put_chars() would unconditionally copy 16 bytes from the argument buffer, regardless of supplied length. However, udbg_hvc_putc() can call hvc_put_chars() with a single-byte buffer, leading to the error. ================================================================== BUG: KASAN: stack-out-of-bounds in hvc_put_chars+0xdc/0x110 Read of size 8 at addr c0000000023e7a90 by task swapper/0 CPU: 0 PID: 0 Comm: swapper Not tainted 5.2.0-rc2-next-20190528-02824-g048a6ab4835b #113 Call Trace: dump_stack+0x104/0x154 (unreliable) print_address_description+0xa0/0x30c __kasan_report+0x20c/0x224 kasan_report+0x18/0x30 __asan_report_load8_noabort+0x24/0x40 hvc_put_chars+0xdc/0x110 hvterm_raw_put_chars+0x9c/0x110 udbg_hvc_putc+0x154/0x200 udbg_write+0xf0/0x240 console_unlock+0x868/0xd30 register_console+0x970/0xe90 register_early_udbg_console+0xf8/0x114 setup_arch+0x108/0x790 start_kernel+0x104/0x784 start_here_common+0x1c/0x534 Memory state around the buggy address: c0000000023e7980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 c0000000023e7a00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 >c0000000023e7a80: f1 f1 01 f2 f2 f2 00 00 00 00 00 00 00 00 00 00 ^ c0000000023e7b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 c0000000023e7b80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== Document that a 16-byte buffer is requred, and provide it in udbg. Signed-off-by: Daniel Axtens Signed-off-by: Michael Ellerman arch/powerpc/platforms/pseries/hvconsole.c | 2 +- drivers/tty/hvc/hvc_vio.c | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) commit 2305ff225c0b1691ec2e93f3d6990e13a2e63c95 Author: Masahiro Yamada Date: Tue Jun 4 20:16:32 2019 +0900 ocxl: do not use C++ style comments in uapi header Linux kernel tolerates C++ style comments these days. Actually, the SPDX License tags for .c files start with //. On the other hand, uapi headers are written in more strict C, where the C++ comment style is forbidden. Signed-off-by: Masahiro Yamada Acked-by: Frederic Barrat Acked-by: Andrew Donnellan Signed-off-by: Michael Ellerman include/uapi/misc/ocxl.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 11817aa69bf32410ab014f77f7ed1fd307aa26c4 Merge: 514fcaac371e 9366211f3207 Author: David S. Miller Date: Thu Jun 13 22:34:55 2019 -0700 Merge branch 'mlxsw-Add-support-for-physical-hardware-clock' Ido Schimmel says: ==================== mlxsw: Add support for physical hardware clock Shalom says: This patchset adds support for physical hardware clock for Spectrum-1 ASIC only. Patches #1, #2 and #3 add the ability to query the free running clock PCI address. Patches #4 and #5 add two new register, the Management UTC Register and the Management Pulse Per Second Register. Patch #6 publishes scaled_ppm_to_ppb() to allow drivers to use it. Patch #7 adds the physical hardware clock operations. Patch #8 initializes the physical hardware clock. Patch #9 adds a selftest for testing the PTP physical hardware clock. v2 (Richard): * s/ptp_clock_scaled_ppm_to_ppb/scaled_ppm_to_ppb/ * imply PTP_1588_CLOCK in mlxsw Kconfig * s/mlxsw_sp1_ptp_update_phc_settime/mlxsw_sp1_ptp_phc_settime/ * s/mlxsw_sp1_ptp_update_phc_adjfreq/mlxsw_sp1_ptp_phc_adjfreq/ ==================== Signed-off-by: David S. Miller commit 9366211f32076a6f3265f65a4851af9af22e4403 Author: Shalom Toledo Date: Tue Jun 11 18:45:12 2019 +0300 selftests: ptp: Add Physical Hardware Clock test Test the PTP Physical Hardware Clock functionality using the "phc_ctl" (a part of "linuxptp"). The test contains three sub-tests: * "settime" test * "adjtime" test * "adjfreq" test "settime" test: * set the PHC time to 0 seconds. * wait for 120.5 seconds. * check if PHC time equal to 120.XX seconds. "adjtime" test: * set the PHC time to 0 seconds. * adjust the time by 10 seconds. * check if PHC time equal to 10.XX seconds. "adjfreq" test: * adjust the PHC frequency to be 1% faster. * set the PHC time to 0 seconds. * wait for 100.5 seconds. * check if PHC time equal to 101.XX seconds. Usage: $ ./phc.sh /dev/ptp It is possible to run a subset of the tests, for example: * To run only the "settime" test: $ TESTS="settime" ./phc.sh /dev/ptp Signed-off-by: Shalom Toledo Reviewed-by: Petr Machata Acked-by: Richard Cochran Tested-by: Vladimir Oltean Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller tools/testing/selftests/ptp/phc.sh | 166 +++++++++++++++++++++++++++++++++++++ 1 file changed, 166 insertions(+) commit 412cd2ad18d3dff25d58a2fc183f5229877a5a2d Author: Shalom Toledo Date: Tue Jun 11 18:45:11 2019 +0300 mlxsw: spectrum: PTP physical hardware clock initialization Initialize the PTP physical hardware clock. Signed-off-by: Shalom Toledo Acked-by: Jiri Pirko Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 36 ++++++++++++++++++++++++++ drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 3 +++ 2 files changed, 39 insertions(+) commit 992aa864dca068554802a65a467a2640985cc213 Author: Shalom Toledo Date: Tue Jun 11 18:45:10 2019 +0300 mlxsw: spectrum_ptp: Add implementation for physical hardware clock operations Implement physical hardware clock operations. Signed-off-by: Shalom Toledo Acked-by: Jiri Pirko Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/Kconfig | 1 + drivers/net/ethernet/mellanox/mlxsw/Makefile | 1 + drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c | 267 +++++++++++++++++++++ drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.h | 44 ++++ 4 files changed, 313 insertions(+) commit 4368dada5b37e74a13b892ca5cef8a7d558e9a5f Author: Shalom Toledo Date: Tue Jun 11 18:45:09 2019 +0300 ptp: ptp_clock: Publish scaled_ppm_to_ppb Publish scaled_ppm_to_ppb to allow drivers to use it. Signed-off-by: Shalom Toledo Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/ptp/ptp_clock.c | 3 ++- include/linux/ptp_clock_kernel.h | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) commit 1078645af6c02fd82f53c2a72e6f5ef21fd951e8 Author: Shalom Toledo Date: Tue Jun 11 18:45:08 2019 +0300 mlxsw: reg: Add Management Pulse Per Second Register The MTPPS register provides the device PPS capabilities, configure the PPS in and out modules and holds the PPS in time stamp. Signed-off-by: Shalom Toledo Acked-by: Jiri Pirko Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 58 +++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) commit 55a8b00157d27a5bf0b84bb1c49755034a5962cf Author: Shalom Toledo Date: Tue Jun 11 18:45:07 2019 +0300 mlxsw: reg: Add Management UTC Register The MTUTC register configures the HW UTC counter. Signed-off-by: Shalom Toledo Reviewed-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 45 +++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit 8289169dd26291ea6c12b8aad78587ad695ec78e Author: Shalom Toledo Date: Tue Jun 11 18:45:06 2019 +0300 mlxsw: pci: Query free running clock PCI BAR and offsets Query free running clock PCI BAR and offsets during the pci_init. Signed-off-by: Shalom Toledo Acked-by: Jiri Pirko Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/pci.c | 32 ++++++++++++++++++++++++++++ drivers/net/ethernet/mellanox/mlxsw/pci_hw.h | 3 +++ 2 files changed, 35 insertions(+) commit 34dacb4d519deff74baf2049634c934e8c54e997 Author: Shalom Toledo Date: Tue Jun 11 18:45:05 2019 +0300 mlxsw: core: Add a new interface for reading the hardware free running clock Add two new bus operations for reading the hardware free running clock. Signed-off-by: Shalom Toledo Acked-by: Jiri Pirko Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/core.c | 12 ++++++++++++ drivers/net/ethernet/mellanox/mlxsw/core.h | 8 +++++++- 2 files changed, 19 insertions(+), 1 deletion(-) commit 4b6b8c02f6e67216d2e1fe777a31b127055e2d46 Author: Shalom Toledo Date: Tue Jun 11 18:45:04 2019 +0300 mlxsw: cmd: Free running clock PCI BAR and offsets via query firmware Add free running clock PCI BAR and offset to query firmware command. Signed-off-by: Shalom Toledo Reviewed-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/cmd.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 514fcaac371e31fe5bc6280d15f2903c37b015b8 Author: Roman Mashak Date: Tue Jun 11 10:02:22 2019 -0400 tc-tests: updated fw with bind actions by reference use cases Extended fw TDC tests with use cases where actions are pre-created and attached to a filter by reference, i.e. by action index. Signed-off-by: Roman Mashak Signed-off-by: David S. Miller .../selftests/tc-testing/tc-tests/filters/fw.json | 144 +++++++++++++++++++++ 1 file changed, 144 insertions(+) commit 4c0a59e1123f90b773d46942a6d505b3cb5bd406 Author: Amit Kucheria Date: Tue May 21 15:05:12 2019 +0530 Documentation: arm: Link idle-states binding to "enable-method" property The "enable-method" property for cpu nodes needs to be "psci" for CPU idle management to be setup correctly. Add a note to the binding documentation to this effect to make it obvious. Signed-off-by: Amit Kucheria Acked-by: Sudeep Holla Signed-off-by: Rob Herring Documentation/devicetree/bindings/arm/idle-states.txt | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 9129b017b54dab09eb69b7269026243156e5188e Author: Andrea Parri Date: Mon May 27 10:49:57 2019 +0200 rcu: Don't return a value from rcu_assign_pointer() Quoting Paul [1]: "Given that a quick (and perhaps error-prone) search of the uses of rcu_assign_pointer() in v5.1 didn't find a single use of the return value, let's please instead change the documentation and implementation to eliminate the return value." [1] https://lkml.kernel.org/r/20190523135013.GL28207@linux.ibm.com Signed-off-by: Andrea Parri Cc: "Paul E. McKenney" Cc: Josh Triplett Cc: Steven Rostedt Cc: Mathieu Desnoyers Cc: Lai Jiangshan Cc: Joel Fernandes Cc: rcu@vger.kernel.org Cc: Peter Zijlstra Cc: Will Deacon Cc: Mark Rutland Cc: Matthew Wilcox Cc: Sasha Levin Signed-off-by: Paul E. McKenney Documentation/RCU/whatisRCU.txt | 8 ++++---- include/linux/rcupdate.h | 5 ++--- tools/include/linux/rcu.h | 4 ++-- tools/testing/radix-tree/linux/rcupdate.h | 2 +- 4 files changed, 9 insertions(+), 10 deletions(-) commit 6da9f775175e516fc7229ceaa9b54f8f56aa7924 Author: Waiman Long Date: Tue May 21 16:48:43 2019 -0400 rcu: Force inlining of rcu_read_lock() When debugging options are turned on, the rcu_read_lock() function might not be inlined. This results in lockdep's print_lock() function printing "rcu_read_lock+0x0/0x70" instead of rcu_read_lock()'s caller. For example: [ 10.579995] ============================= [ 10.584033] WARNING: suspicious RCU usage [ 10.588074] 4.18.0.memcg_v2+ #1 Not tainted [ 10.593162] ----------------------------- [ 10.597203] include/linux/rcupdate.h:281 Illegal context switch in RCU read-side critical section! [ 10.606220] [ 10.606220] other info that might help us debug this: [ 10.606220] [ 10.614280] [ 10.614280] rcu_scheduler_active = 2, debug_locks = 1 [ 10.620853] 3 locks held by systemd/1: [ 10.624632] #0: (____ptrval____) (&type->i_mutex_dir_key#5){.+.+}, at: lookup_slow+0x42/0x70 [ 10.633232] #1: (____ptrval____) (rcu_read_lock){....}, at: rcu_read_lock+0x0/0x70 [ 10.640954] #2: (____ptrval____) (rcu_read_lock){....}, at: rcu_read_lock+0x0/0x70 These "rcu_read_lock+0x0/0x70" strings are not providing any useful information. This commit therefore forces inlining of the rcu_read_lock() function so that rcu_read_lock()'s caller is instead shown. Signed-off-by: Waiman Long Signed-off-by: Paul E. McKenney include/linux/rcupdate.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b3119cde1d70d6df1574b9f26d8e087e8e5116b4 Author: Paul E. McKenney Date: Wed May 22 10:07:45 2019 -0700 rcu: Fix irritating whitespace error in rcu_assign_pointer() Signed-off-by: Paul E. McKenney include/linux/rcupdate.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 96050c68be33edef18800ad6748f61f81db81a20 Author: Paul E. McKenney Date: Sat Apr 20 01:40:54 2019 -0700 rcu: Upgrade sync_exp_work_done() to smp_mb() The sync_exp_work_done() function uses smp_mb__before_atomic(), but there is no obvious atomic in the ensuing code. The ordering is absolutely required for grace periods to work correctly, so this commit upgrades the smp_mb__before_atomic() to smp_mb(). Fixes: 6fba2b3767ea ("rcu: Remove deprecated RCU debugfs tracing code") Reported-by: Andrea Parri Signed-off-by: Paul E. McKenney kernel/rcu/tree_exp.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit de76cda215d56256ffcda7ffa538b70f9fb301a7 Author: Gustavo Pimentel Date: Tue Jun 4 18:24:43 2019 +0200 PCI: Decode PCIe 32 GT/s link speed PCIe r5.0, sec 7.5.3.18, defines a new 32.0 GT/s bit in the Supported Link Speeds Vector of Link Capabilities 2. Decode this new speed. This does not affect the speed of the link, which should be negotiated automatically by the hardware; it only adds decoding when showing the speed to the user. Previously, reading the speed of a link operating at this speed showed "Unknown speed" instead of "32.0 GT/s". Link: https://lore.kernel.org/lkml/92365e3caf0fc559f9ab14bcd053bfc92d4f661c.1559664969.git.gustavo.pimentel@synopsys.com Signed-off-by: Gustavo Pimentel [bhelgaas: changelog] Signed-off-by: Bjorn Helgaas drivers/pci/pci-sysfs.c | 3 +++ drivers/pci/pci.c | 4 +++- drivers/pci/probe.c | 2 +- drivers/pci/slot.c | 1 + include/linux/pci.h | 1 + include/uapi/linux/pci_regs.h | 4 ++++ 6 files changed, 13 insertions(+), 2 deletions(-) commit 2d2f4273cbe9058d1f5a518e5e880d27d7b3b30f Author: Alex Williamson Date: Thu May 9 13:27:22 2019 -0600 PCI: Always allow probing with driver_override Commit 0e7df22401a3 ("PCI: Add sysfs sriov_drivers_autoprobe to control VF driver binding") introduced the sriov_drivers_autoprobe attribute which allows users to prevent the kernel from automatically probing a driver for new VFs as they are created. This allows VFs to be spawned without automatically binding the new device to a host driver, such as in cases where the user intends to use the device only with a meta driver like vfio-pci. However, the current implementation prevents any use of drivers_probe with the VF while sriov_drivers_autoprobe=0. This blocks the now current general practice of setting driver_override followed by using drivers_probe to bind a device to a specified driver. The kernel never automatically sets a driver_override therefore it seems we can assume a driver_override reflects the intent of the user. Also, probing a device using a driver_override match seems outside the scope of the 'auto' part of sriov_drivers_autoprobe. Therefore, let's allow driver_override matches regardless of sriov_drivers_autoprobe, which we can do by simply testing if a driver_override is set for a device as a 'can probe' condition. Fixes: 0e7df22401a3 ("PCI: Add sysfs sriov_drivers_autoprobe to control VF driver binding") Link: https://lore.kernel.org/lkml/155742996741.21878.569845487290798703.stgit@gimli.home Link: https://lore.kernel.org/linux-pci/155672991496.20698.4279330795743262888.stgit@gimli.home/T/#u Signed-off-by: Alex Williamson Signed-off-by: Bjorn Helgaas drivers/pci/pci-driver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 15d5dfaf4adb9e4d38fd6d4c88590817dc32c7cf Author: Masahiro Yamada Date: Tue Jun 4 17:23:14 2019 +0900 sparc: fix unknown type name u_int in uapi header 'u_int' is a shorthand that is only available in the kernel space because it is defined in include/linux/types.h, which is not exported to the user space. You cannot use it in uapi headers even if you include Detected by compile-testing exported headers. ./usr/include/asm/openpromio.h:16:2: error: unknown type name ‘u_int’ u_int oprom_size; /* Actual size of the oprom_array. */ ^~~~~ Signed-off-by: Masahiro Yamada Signed-off-by: David S. Miller arch/sparc/include/uapi/asm/openpromio.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 6284ad9453ba8eb093de046e2f9ba86537f4b27a Author: Krzysztof Kozlowski Date: Tue Jun 4 10:00:59 2019 +0200 sparc: configs: Remove useless UEVENT_HELPER_PATH Remove the CONFIG_UEVENT_HELPER_PATH because: 1. It is disabled since commit 1be01d4a5714 ("driver: base: Disable CONFIG_UEVENT_HELPER by default") as its dependency (UEVENT_HELPER) was made default to 'n', 2. It is not recommended (help message: "This should not be used today [...] creates a high system load") and was kept only for ancient userland, 3. Certain userland specifically requests it to be disabled (systemd README: "Legacy hotplug slows down the system and confuses udev"). Signed-off-by: Krzysztof Kozlowski Acked-by: Geert Uytterhoeven Signed-off-by: David S. Miller arch/sparc/configs/sparc32_defconfig | 1 - arch/sparc/configs/sparc64_defconfig | 1 - 2 files changed, 2 deletions(-) commit 4165c54c97bd201b4dc09bea0b52f4c17b01328d Author: Thomas Huth Date: Mon May 27 18:32:53 2019 +0200 sparc: Remove redundant copy of the LGPL-2.0 We already provide the LGPL-2.0 text in LICENSES/preferred/LGPL-2.0, so there is no need for this additional copy here. Signed-off-by: Thomas Huth Signed-off-by: David S. Miller arch/sparc/lib/COPYING.LIB | 481 --------------------------------------------- 1 file changed, 481 deletions(-) commit 07a6d63eb1b54b5fb38092780fe618dfe1d96e23 Author: John Paul Adrian Glaubitz Date: Tue Jun 11 17:38:37 2019 +0200 sunhv: Fix device naming inconsistency between sunhv_console and sunhv_reg In d5a2aa24, the name in struct console sunhv_console was changed from "ttyS" to "ttyHV" while the name in struct uart_ops sunhv_pops remained unchanged. This results in the hypervisor console device to be listed as "ttyHV0" under /proc/consoles while the device node is still named "ttyS0": root@osaka:~# cat /proc/consoles ttyHV0 -W- (EC p ) 4:64 tty0 -WU (E ) 4:1 root@osaka:~# readlink /sys/dev/char/4:64 ../../devices/root/f02836f0/f0285690/tty/ttyS0 root@osaka:~# This means that any userland code which tries to determine the name of the device file of the hypervisor console device can not rely on the information provided by /proc/consoles. In particular, booting current versions of debian- installer inside a SPARC LDOM will fail with the installer unable to determine the console device. After renaming the device in struct uart_ops sunhv_pops to "ttyHV" as well, the inconsistency is fixed and it is possible again to determine the name of the device file of the hypervisor console device by reading the contents of /proc/console: root@osaka:~# cat /proc/consoles ttyHV0 -W- (EC p ) 4:64 tty0 -WU (E ) 4:1 root@osaka:~# readlink /sys/dev/char/4:64 ../../devices/root/f02836f0/f0285690/tty/ttyHV0 root@osaka:~# With this change, debian-installer works correctly when installing inside a SPARC LDOM. Signed-off-by: John Paul Adrian Glaubitz Signed-off-by: David S. Miller drivers/tty/serial/sunhv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 425b0fad9c7e09a20d7d79a8ef142dd2892750db Merge: 5948d11766bc 74371272f97f Author: David S. Miller Date: Thu Jun 13 14:02:09 2019 -0700 Merge branch 'net-stmmac-Convert-to-phylink' Jose Abreu says: ==================== net: stmmac: Convert to phylink This converts stmmac to use phylink. Besides the code redution this will allow to gain more flexibility. ==================== Signed-off-by: David S. Miller commit 74371272f97fd1a7b668f1da34aea4ae737c2fa1 Author: Jose Abreu Date: Tue Jun 11 17:18:47 2019 +0200 net: stmmac: Convert to phylink and remove phylib logic Convert everything to phylink. Signed-off-by: Jose Abreu Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Cc: Russell King Cc: Andrew Lunn Cc: Florian Fainelli Cc: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/Kconfig | 2 - drivers/net/ethernet/stmicro/stmmac/stmmac.h | 3 - .../net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 81 +---- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 364 +++++++-------------- .../net/ethernet/stmicro/stmmac/stmmac_platform.c | 21 +- 5 files changed, 132 insertions(+), 339 deletions(-) commit eeef2f6b9f6e090c52fb3882c4d3e44d7c527570 Author: Jose Abreu Date: Tue Jun 11 17:18:46 2019 +0200 net: stmmac: Start adding phylink support Start adding the phylink callbacks. Signed-off-by: Jose Abreu Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Cc: Russell King Cc: Andrew Lunn Cc: Florian Fainelli Cc: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/Kconfig | 1 + drivers/net/ethernet/stmicro/stmmac/stmmac.h | 4 ++ drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 48 +++++++++++++++++++++++ 3 files changed, 53 insertions(+) commit 9ad372fc5aaf1296761a365f9925fa5ae962c1a5 Author: Jose Abreu Date: Tue Jun 11 17:18:45 2019 +0200 net: stmmac: Prepare to convert to phylink In preparation for the convertion, split the adjust_link function into mac_config and add the mac_link_up and mac_link_down functions. Signed-off-by: Jose Abreu Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Cc: Russell King Cc: Andrew Lunn Cc: Florian Fainelli Cc: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 113 ++++++++++++++-------- 1 file changed, 72 insertions(+), 41 deletions(-) commit 5948d11766bc5b57aca6d82ba345a6ed8ccd8f80 Author: YueHaibing Date: Tue Jun 11 22:07:09 2019 +0800 qede: Make two functions static Fix sparse warning: drivers/net/ethernet/qlogic/qede/qede_main.c:963:6: warning: symbol 'qede_lock' was not declared. Should it be static? drivers/net/ethernet/qlogic/qede/qede_main.c:969:6: warning: symbol 'qede_unlock' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qede/qede_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1dbb98699cf0eaa1d86afca074074bfe669881d0 Author: YueHaibing Date: Tue Jun 11 21:58:34 2019 +0800 net: dsa: sja1105: Make two functions static Fix sparse warnings: drivers/net/dsa/sja1105/sja1105_main.c:1848:6: warning: symbol 'sja1105_port_rxtstamp' was not declared. Should it be static? drivers/net/dsa/sja1105/sja1105_main.c:1869:6: warning: symbol 'sja1105_port_txtstamp' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: YueHaibing Tested-by: Vladimir Oltean Signed-off-by: David S. Miller drivers/net/dsa/sja1105/sja1105_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 45a19dd397886a9591110c0e9ba7e058393a395d Author: Russell King Date: Wed Dec 5 15:51:45 2018 +0000 drm/i2c: tda998x: add vendor specific infoframe support Add support for the vendor specific infoframe. Reviewed-by: Brian Starkey Tested-by: Sven Van Asbroeck Signed-off-by: Russell King drivers/gpu/drm/i2c/tda998x_drv.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit fcc22c5f9ddaa8d1bb051878cc7e5f928b9973d8 Author: Russell King Date: Tue Jul 31 11:12:27 2018 +0100 drm/i2c: tda998x: improve correctness of quantisation range CEA-861 says: "A Source shall not send a non-zero Q value that does not correspond to the default RGB Quantization Range for the transmitted Picture unless the Sink indicates support for the Q bit in a Video Capabilities Data Block." Make TDA998x compliant by using the helper to set the quantisation range in the infoframe, and using the TDA998x's colour scaling to appropriately adjust the RGB values sent to the monitor. This ensures that monitors that do not support the Q bit are sent RGB values that are within the expected range. Monitors with support for the Q bit will be sent full-range RGB. Reviewed-by: Brian Starkey Tested-by: Sven Van Asbroeck Signed-off-by: Russell King drivers/gpu/drm/i2c/tda998x_drv.c | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) commit 2807ba75970367c528a9c43aef6296c95eade5be Author: Russell King Date: Sun Jul 8 22:19:02 2018 +0100 drm/i2c: tda998x: add support for pixel repeated modes TDA998x has no support for pixel repeated modes, and the code notes this as a "TODO" item. The implementation appears to be relatively simple, so lets add it. We need to calculate the serializer clock divisor based on the TMDS clock rate, set the repeat control, and set the serializer pixel repeat count. Since the audio code needs the actual TMDS clock, record that. Tested-by: Sven Van Asbroeck Signed-off-by: Russell King drivers/gpu/drm/i2c/tda998x_drv.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) commit 125a4f9394c769bc3e4306ff6cc73529bc1fa6dd Author: Russell King Date: Fri Mar 1 11:32:15 2019 +0000 drm/i2c: tda998x: get rid of params in audio settings Get rid of the tda998x_audio_params structure in audio_settings, which is now just used for platform data. Tested-by: Sven Van Asbroeck Signed-off-by: Russell King drivers/gpu/drm/i2c/tda998x_drv.c | 43 +++++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 17 deletions(-) commit 900b2b7250b8fe49270e9272a1d937fa69350538 Author: Russell King Date: Fri Mar 1 21:21:38 2019 +0000 drm/i2c: tda998x: clean up tda998x_configure_audio() tda998x_configure_audio() is called via some paths where an error return is meaningless, and as a result of moving the audio routing code, this function no longer returns any errors, so let's make it void. We can also make tda998x_write_aif() return void as well. tda998x_configure_audio() also only ever needs to write the current audio settings, so simplify the code in tda998x_audio_hw_params() so that can happen. Tested-by: Sven Van Asbroeck Signed-off-by: Russell King drivers/gpu/drm/i2c/tda998x_drv.c | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) commit 26f7bf1251c70bafe99f73edd222f6126b395b3b Author: Russell King Date: Fri Mar 1 21:17:04 2019 +0000 drm/i2c: tda998x: move audio routing configuration Move the mux and clocking selection out of tda998x_configure_audio() into the parent functions, so we can validate this when parameters are set outside of the audio mutex. Tested-by: Sven Van Asbroeck Signed-off-by: Russell King drivers/gpu/drm/i2c/tda998x_drv.c | 78 +++++++++++++++++++++++---------------- 1 file changed, 47 insertions(+), 31 deletions(-) commit e4fe96f11ee4de6612862191efef9242243ed364 Author: Russell King Date: Fri Mar 1 20:11:17 2019 +0000 drm/i2c: tda998x: configure both fields of AIP_CLKSEL together We can configure both fields of the AIP_CLKSEL register with a single write, there is no need to delay the setting of the CTS reference. Tested-by: Sven Van Asbroeck Signed-off-by: Russell King drivers/gpu/drm/i2c/tda998x_drv.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit 7168916072b54934fd949e7ae24695080d4388ba Author: Russell King Date: Fri Mar 1 19:52:23 2019 +0000 drm/i2c: tda998x: index audio port enable config by route type Rather than searching an array for the audio format (which we control) implement indexing by route type. This avoids iterating over the array in several locations. Tested-by: Sven Van Asbroeck Signed-off-by: Russell King drivers/gpu/drm/i2c/tda998x_drv.c | 57 ++++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 28 deletions(-) commit 82642ab7345d7e736c6f1dee58c033ea6b41d2e9 Author: Russell King Date: Fri Mar 1 19:12:28 2019 +0000 drm/i2c: tda998x: store audio port enable in settings Store the audio port enable register in the audio settings structure, which can never be zero for a valid audio configuration. Use this to signal whether we have audio configured, rather than AFMT_UNUSED. Tested-by: Sven Van Asbroeck Signed-off-by: Russell King drivers/gpu/drm/i2c/tda998x_drv.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit a03a915b8387286dfd1e7500705124414802ede7 Author: Russell King Date: Fri Feb 22 20:53:38 2019 +0000 drm/i2c: tda998x: derive CTS_N value from aclk sample rate ratio The TDA998x derives the CTS value using the supplied I2S bit clock (ACLK, in TDA998x parlence) rather than 128·fs. TDA998x uses two constants named m and k in the CTS generator such that we have this relationship between the I2S source ACLK and the sink fs: 128·fs_sink = ACLK·m / k Where ACLK = aclk_ratio·fs_source. When audio support was originally added, we supported a fixed ratio of 64·fs, intending to support the Kirkwood I2S on Dove. However, when hdmi-codec support was added, this was changed to scale the ratio with the sample width, which would've broken its use with Kirkwood I2S. We are now starting to see other users whose I2S blocks send at 64·fs for 16-bit samples, so we need to reinstate the support for the fixed ratio I2S bit clock. This commit takes a step towards supporting these configurations by selecting the CTS_N register m and k values based on the bit clock ratio. However, as the driver is not given the bit clock ratio from ALSA, continue deriving this from the sample width. This will be addressed in a later commit. Tested-by: Sven Van Asbroeck Signed-off-by: Russell King drivers/gpu/drm/i2c/tda998x_drv.c | 94 ++++++++++++++++++++++++++++++--------- 1 file changed, 74 insertions(+), 20 deletions(-) commit 7dad3740aeb7103817e38a191810dbb81afd692e Author: Russell King Date: Wed Feb 27 00:04:53 2019 +0000 drm/i2c: tda998x: improve programming of audio divisor Improve the selection of the audio clock divisor so that more modes and sample rates work. Tested-by: Sven Van Asbroeck Signed-off-by: Russell King drivers/gpu/drm/i2c/tda998x_drv.c | 44 +++++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 16 deletions(-) commit 935b9ca357443250fded91fad0e973555528b390 Author: Russell King Date: Fri Feb 22 16:14:36 2019 +0000 drm/i2c: tda998x: implement different I2S flavours Add support for the left and right justified I2S formats as well as the more tranditional "Philips" I2S format. Tested-by: Peter Ujfalusi Tested-by: Sven Van Asbroeck Signed-off-by: Russell King drivers/gpu/drm/i2c/tda998x_drv.c | 51 +++++++++++++++++++++++++-------------- 1 file changed, 33 insertions(+), 18 deletions(-) commit 2e9943aab5680ec7bce07f4b980e5e2a86ff294a Author: Russell King Date: Fri Mar 1 14:14:14 2019 +0000 drm/i2c: tda998x: introduce tda998x_audio_settings Introduce a structure to hold the register values to be programmed while programming the TDA998x audio settings. This is currently a stub structure, which will be populated in subsequent commits. When we initialise this from the platform data, only do so if there is a valid audio format specification. Tested-by: Sven Van Asbroeck Signed-off-by: Russell King drivers/gpu/drm/i2c/tda998x_drv.c | 68 +++++++++++++++++++++------------------ 1 file changed, 37 insertions(+), 31 deletions(-) commit c78fea61f0c1f8568fbbb36ac3d1e1c85a903ae4 Author: Andrea Oliveri Date: Mon Jun 10 14:45:41 2019 +0200 ACPI: tables: Allow BGRT to be overridden Thinkpad T Series expose a malformed BGRT table with Version field set to 0. This fact prevents bootsplashes (as Plymouth) to correctly show the manufacturer logo. This patch permits to override malformed BGRT table with a correct one defined by the user. Signed-off-by: Andrea Oliveri [ rjw: Subject ] Signed-off-by: Rafael J. Wysocki drivers/acpi/tables.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 6d2e369f0d4c3e6125c886847c04106b03d2609e Author: Abhishek Sahu Date: Thu Jun 6 14:52:25 2019 +0530 PCI: Add NVIDIA GPU multi-function power dependencies The NVIDIA Turing GPU is a multi-function PCI device with the following functions: - Function 0: VGA display controller - Function 1: Audio controller - Function 2: USB xHCI Host controller - Function 3: USB Type-C UCSI controller Function 0 is tightly coupled with other functions in the hardware. When function 0 is in D3, it gates power for hardware blocks used by other functions, which means those functions only work when function 0 is in D0. If any of these functions (1/2/3) are in D0, then function 0 should also be in D0. Commit 07f4f97d7b4b ("vga_switcheroo: Use device link for HDA controller") already creates a device link to show the dependency of function 1 on function 0 of this GPU. Create additional device links to express the dependencies of functions 2 and 3 on function 0. This means function 0 will be in D0 if any other function is in D0. [bhelgaas: I think the PCI spec expectation is that functions can be power-managed independently, so I don't think this device is technically compliant. For example, the PCIe r5.0 spec, sec 1.4, says "the PCI/PCIe hardware/software model includes architectural constructs necessary to discover, configure, and use a Function, without needing Function-specific knowledge" and sec 5.1 says "D states are associated with a particular Function" and "PM provides ... a mechanism to identify power management capabilities of a given Function [and] the ability to transition a Function into a certain power management state."] Link: https://lore.kernel.org/lkml/20190606092225.17960-3-abhsahu@nvidia.com Signed-off-by: Abhishek Sahu [bhelgaas: commit log] Signed-off-by: Bjorn Helgaas drivers/pci/quirks.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit a17beb1a0882a544523dcb5d0da4801272dfd43a Author: Abhishek Sahu Date: Thu Jun 6 14:52:24 2019 +0530 PCI: Generalize multi-function power dependency device links Although not allowed by the PCI specs, some multi-function devices have power dependencies between the functions. For example, function 1 may not work unless function 0 is in the D0 power state. The existing quirk_gpu_hda() adds a device link to express this dependency for GPU and HDA devices, but it really is not specific to those device types. Generalize it and rename it to pci_create_device_link() so we can create dependencies between any "consumer" and "producer" functions of a multi-function device, where the consumer is only functional if the producer is in D0. This reorganization should not affect any functionality. Link: https://lore.kernel.org/lkml/20190606092225.17960-2-abhsahu@nvidia.com Signed-off-by: Abhishek Sahu [bhelgaas: commit log, reword diagnostic] Signed-off-by: Bjorn Helgaas drivers/pci/quirks.c | 54 +++++++++++++++++++++++++++++++++------------------- 1 file changed, 34 insertions(+), 20 deletions(-) commit a3487d8f30635e3fa9db986cee6fca8012a996f4 Author: Andy Shevchenko Date: Wed Jun 12 13:07:02 2019 +0300 ACPI / sleep: Switch to use acpi_dev_get_first_match_dev() Switch the acpi_pm_finish() to use acpi_dev_get_first_match_dev() instead of custom approach. Signed-off-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki drivers/acpi/sleep.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) commit 33ee09cd59ce154b64f9df942dfa5456db90d5f9 Author: Andy Shevchenko Date: Thu Jun 13 19:59:51 2019 +0300 device property: Add helpers to count items in an array The usual pattern to allocate the necessary space for an array of properties is to count them first by calling: count = device_property_read_uXX_array(dev, propname, NULL, 0); if (count < 0) return count; Introduce helpers device_property_count_uXX() to count items by supplying hard coded last two parameters to device_property_readXX_array(). Signed-off-by: Andy Shevchenko Acked-by: Sakari Ailus Reviewed-by: Heikki Krogerus Signed-off-by: Rafael J. Wysocki include/linux/property.h | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit 573748081a66b2baacce5e0927c700e480a60c7c Author: Geert Uytterhoeven Date: Tue May 14 10:50:24 2019 +0200 dt-bindings: property-units: Sanitize unit naming Make the naming of units consistent with common practices: - Do not capitalize the first character of units ("Celsius" is special, as it is not the unit name, but a reference to its proposer), - Do not use plural for units, - Do not abbreviate "ampere", - Concatenate prefixes and units (no spaces or hyphens), - Separate units by spaces not hyphens, - "milli" applies to "degree", not to "Celsius". Signed-off-by: Geert Uytterhoeven Signed-off-by: Rob Herring .../devicetree/bindings/property-units.txt | 34 +++++++++++----------- 1 file changed, 17 insertions(+), 17 deletions(-) commit 06efeb555524a8c65ef429f2603885c31a5212b1 Author: Moshe Shemesh Date: Sat Jun 1 16:40:16 2019 +0300 Documentation: net: mlx5: Devlink health documentation Documentation for devlink health reporters supported by mlx5. Signed-off-by: Moshe Shemesh Signed-off-by: Saeed Mahameed .../networking/device_drivers/mellanox/mlx5.rst | 72 ++++++++++++++++++++++ 1 file changed, 72 insertions(+) commit b3bd076f7501afea2871bb4738ab53498fd32cd5 Author: Moshe Shemesh Date: Sun Jan 27 18:38:39 2019 +0200 net/mlx5: Report devlink health on FW fatal issues Report devlink health on FW fatal issues via fw_fatal_reporter. The driver recover flow for FW fatal error is now being handled by the devlink health. Having the recovery controlled by devlink health, the user has the ability to cancel the auto-recovery for debug session and run it manually. Call mlx5_enter_error_state() before calling devlink_health_report() to ensure entering device error state even if auto-recovery is off. Signed-off-by: Moshe Shemesh Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/health.c | 42 +++++++++++++++--------- drivers/net/ethernet/mellanox/mlx5/core/main.c | 10 +++--- include/linux/mlx5/driver.h | 2 +- 3 files changed, 31 insertions(+), 23 deletions(-) commit 9b1f2982360579cbdb3069fa026f6cfc31c4388b Author: Moshe Shemesh Date: Wed Jan 16 13:23:25 2019 +0200 net/mlx5: Add support for FW fatal reporter dump Add support of dump callback for mlx5 FW fatal reporter. The FW fatal dump uses cr-dump functionality to gather cr-space data for debug. The cr-dump uses vsc interface which is valid even if the FW command interface is not functional, which is the case in most FW fatal errors. Command example and output: $ devlink health dump show pci/0000:82:00.0 reporter fw_fatal crdump_data: 00 20 00 01 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ba 82 00 00 0c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fa 00 a4 0e 00 00 00 00 00 00 80 c7 fe ff 50 0a 00 00 ... ... Signed-off-by: Moshe Shemesh Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/health.c | 50 ++++++++++++++++++++++++ 1 file changed, 50 insertions(+) commit 96c82cdfe77b5e769624af71ec0554434037b82f Author: Moshe Shemesh Date: Tue Dec 11 16:09:57 2018 +0200 net/mlx5: Add fw fatal devlink_health_reporter Create mlx5_devlink_health_reporter for fw fatal reporter. The fw fatal reporter is added in addition to the fw reporter and implements the recover callback. The point of having two reporters for FW issues, is that we don't want to run FW recover on any issue, but only fatal ones. Signed-off-by: Moshe Shemesh Signed-off-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/health.c | 81 ++++++++++++++++++------ include/linux/mlx5/driver.h | 1 + 2 files changed, 62 insertions(+), 20 deletions(-) commit d1bf0e2cc4a6e66c2bff48176b8b2930098468ef Author: Moshe Shemesh Date: Tue Dec 11 16:09:56 2018 +0200 net/mlx5: Report devlink health on FW issues Use devlink_health_report() to report any symptom of FW issue as FW counter miss or new health syndrome. The FW issues detected in mlx5 during poll_health which is called in timer atomic context and so health work queue is used to schedule the reports. Signed-off-by: Moshe Shemesh Signed-off-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/health.c | 33 ++++++++++++++++++++++++ include/linux/mlx5/driver.h | 3 ++- 2 files changed, 35 insertions(+), 1 deletion(-) commit fd1483fe1f9fd45fe312adffb0faffa57446690d Author: Moshe Shemesh Date: Tue Dec 11 16:09:54 2018 +0200 net/mlx5: Add support for FW reporter dump Add support of dump callback for mlx5 FW reporter. Once we trigger FW dump, the FW will write the core dump to its raw data buffer. The tracer translates the raw data to traces and save it to a cyclic array. Once dump is done, the saved traces data is filled into the dump buffer. In case syndrome is not zero the health buffer content will be printed as well. FW dump example: $ devlink health dump show pci/0000:82:00.0 reporter fw dump fw traces: timestamp: 509006640427 lost: false event_id: 185 msg: dump general info GVMI=0x0000 timestamp: 509006645474 lost: false event_id: 185 msg: GVMI management info, gvmi_management context: timestamp: 509006654463 lost: false event_id: 185 msg: [000]: 00000000 00000000 00000000 00000000 timestamp: 509006656127 lost: false event_id: 185 msg: [010]: 00000000 00000000 00000000 00000000 timestamp: 509006656255 lost: false event_id: 185 msg: [020]: 00000000 00000000 00000000 00000000 timestamp: 509006656511 lost: false event_id: 185 msg: [030]: 00000000 00000000 00000000 00000000 timestamp: 509006656639 lost: false event_id: 185 msg: [040]: 00000000 00000000 00000000 00000000 timestamp: 509006656895 lost: false event_id: 185 msg: [050]: 00000000 00000000 00000000 00000000 timestamp: 509006657023 lost: false event_id: 185 msg: [060]: 00000000 00000000 00000000 00000000 timestamp: 509006657180 lost: false event_id: 185 msg: [070]: 00000000 00000000 00000000 00000000 timestamp: 509006659839 lost: false event_id: 185 msg: CMDIF dbase from IRON: active_dbase_slots = 0x00000000 timestamp: 509006667391 lost: false event_id: 185 msg: GVMI=0x0000 hw_toc context: timestamp: 509006667647 lost: false event_id: 185 msg: [000]: 00000000 00000000 00000000 fffff000 timestamp: 509006667775 lost: false event_id: 185 msg: [010]: 00000000 00000000 00000000 80d00000 ... ... Signed-off-by: Moshe Shemesh Signed-off-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed .../ethernet/mellanox/mlx5/core/diag/fw_tracer.c | 139 +++++++++++++++++++++ .../ethernet/mellanox/mlx5/core/diag/fw_tracer.h | 20 +++ drivers/net/ethernet/mellanox/mlx5/core/health.c | 111 ++++++++++++++++ 3 files changed, 270 insertions(+) commit 1e34f3efd413a6318c3edd6e8e7e091f1214b2e6 Author: Moshe Shemesh Date: Tue Dec 11 16:09:53 2018 +0200 net/mlx5: Create FW devlink_health_reporter Create mlx5_devlink_health_reporter for FW reporter. The FW reporter implements devlink_health_reporter diagnose callback. The fw reporter diagnose command can be triggered any time by the user to check current fw status. In healthy status, it will return clear syndrome. Otherwise it will return the syndrome and description of the error type. Command example and output on healthy status: $ devlink health diagnose pci/0000:82:00.0 reporter fw Syndrome: 0 Command example and output on non healthy status: $ devlink health diagnose pci/0000:82:00.0 reporter fw Syndrome: 8 Description: unrecoverable hardware error Signed-off-by: Moshe Shemesh Signed-off-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/health.c | 48 ++++++++++++++++++++++++ include/linux/mlx5/driver.h | 2 + 2 files changed, 50 insertions(+) commit 3e5b72ac2f298423902169db7893fef43365e0a6 Author: Feras Daoud Date: Mon Nov 12 16:40:17 2018 +0200 net/mlx5: Issue SW reset on FW assert If a FW assert is considered fatal, indicated by a new bit in the health buffer, reset the FW. After the reset go through the normal recovery flow. Only one PF needs to issue the reset, so an attempt is made to prevent the 2nd function from also issuing the reset. It's not an error if that happens, it just slows recovery. Signed-off-by: Feras Daoud Signed-off-by: Alex Vesker Signed-off-by: Moshe Shemesh Signed-off-by: Daniel Jurgens Signed-off-by: Saeed Mahameed .../net/ethernet/mellanox/mlx5/core/diag/crdump.c | 13 +- drivers/net/ethernet/mellanox/mlx5/core/health.c | 157 ++++++++++++++++++++- drivers/net/ethernet/mellanox/mlx5/core/main.c | 1 + .../net/ethernet/mellanox/mlx5/core/mlx5_core.h | 2 + include/linux/mlx5/device.h | 10 +- include/linux/mlx5/driver.h | 1 + 6 files changed, 176 insertions(+), 8 deletions(-) commit 1ef6f1a17e56f9126472d2c50818f468f1fc43d2 Author: Feras Daoud Date: Sun Dec 2 14:41:22 2018 +0200 net/mlx5: Control CR-space access by different PFs Since the FW can be shared between different PFs/VFs it is common that more than one health poll will detected a failure, this can lead to multiple resets which are unneeded. The solution is to use a FW locking mechanism using semaphore space to provide a way to allow only one device to collect the cr-dump and to issue a sw-reset. Signed-off-by: Feras Daoud Signed-off-by: Saeed Mahameed .../net/ethernet/mellanox/mlx5/core/lib/pci_vsc.c | 40 +++++++++++++++++++--- .../net/ethernet/mellanox/mlx5/core/lib/pci_vsc.h | 8 +++++ .../net/ethernet/mellanox/mlx5/core/mlx5_core.h | 4 +++ 3 files changed, 47 insertions(+), 5 deletions(-) commit 63cbc552eebf08818af2025aef4589a48ef849c0 Author: Feras Daoud Date: Mon Nov 12 15:23:02 2018 +0200 net/mlx5: Handle SW reset of FW in error flow New mlx5 adapters allow the driver to reset the FW in the event of an error, this action called "SW Reset". When an SW reset is issued on any PF all PFs enter reset state which is a recoverable condition. The existing recovery flow was designed to allow the recovery of a VF after a PF driver reload. This patch adds the sw reset to the NIC states as a preparation for sw reset handling. When a software reset is issued the following occurs: 1. The NIC interface mode is set to 7 while the reset is in progress. 2. Once the reset completes the NIC interface mode is set to 1. Signed-off-by: Feras Daoud Signed-off-by: Moshe Shemesh Signed-off-by: Daniel Jurgens Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed .../net/ethernet/mellanox/mlx5/core/en_selftest.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/health.c | 105 +++++++++------------ drivers/net/ethernet/mellanox/mlx5/core/main.c | 2 +- .../net/ethernet/mellanox/mlx5/core/mlx5_core.h | 2 +- include/linux/mlx5/driver.h | 2 +- 5 files changed, 48 insertions(+), 65 deletions(-) commit 8b9d8baae1de7400f19058020ee8f0f27d436687 Author: Alex Vesker Date: Tue Jul 17 11:18:26 2018 +0300 net/mlx5: Add Crdump support Crdump allows the driver to retrieve a dump of the FW PCI crspace. This is useful in case of catastrophic issues which may require FW reset. The crspace dump can be used for later debug. Signed-off-by: Alex Vesker Signed-off-by: Moshe Shemesh Reviewed-by: Feras Daoud Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/Makefile | 2 +- .../net/ethernet/mellanox/mlx5/core/diag/crdump.c | 106 +++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/lib/mlx5.h | 3 + drivers/net/ethernet/mellanox/mlx5/core/main.c | 5 + include/linux/mlx5/driver.h | 1 + 5 files changed, 116 insertions(+), 1 deletion(-) commit b25bbc2f24dcab9cd186ef4003c39bf51ad0454c Author: Alex Vesker Date: Thu Jun 28 15:05:58 2018 +0300 net/mlx5: Add Vendor Specific Capability access gateway The Vendor Specific Capability (VSC) is used to activate a gateway interfacing with the device. The gateway is used to read or write device configurations, which are organized in different domains (spaces). A configuration access may result in multiple actions, reads, writes. Example usages are accessing the Crspace domain to read the crspace or locking a device semaphore using the Semaphore domain. The configuration access use pci_cfg_access to prevent parallel access to the VSC space by the driver and userspace calls. Signed-off-by: Alex Vesker Signed-off-by: Feras Daoud Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/Makefile | 3 +- .../net/ethernet/mellanox/mlx5/core/lib/pci_vsc.c | 286 +++++++++++++++++++++ .../net/ethernet/mellanox/mlx5/core/lib/pci_vsc.h | 24 ++ drivers/net/ethernet/mellanox/mlx5/core/main.c | 3 + include/linux/mlx5/driver.h | 1 + 5 files changed, 316 insertions(+), 1 deletion(-) commit 1f28d7768f1d181249318a0f61949d4cb412e8c4 Author: Eran Ben Elisha Date: Tue Dec 11 16:09:51 2018 +0200 net/mlx5: Move all devlink related functions calls to devlink.c Centralize all devlink related callbacks in one file. In the downstream patch, some more functionality will be added, this patch is preparing the driver infrastructure for it. Currently, move devlink un/register functions calls into this file. Signed-off-by: Eran Ben Elisha Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/Makefile | 2 +- drivers/net/ethernet/mellanox/mlx5/core/devlink.c | 58 +++++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/devlink.h | 14 ++++++ drivers/net/ethernet/mellanox/mlx5/core/main.c | 44 +++-------------- 4 files changed, 80 insertions(+), 38 deletions(-) commit 00091c0da136f36feaa974f761fd0fc8905a29c9 Author: Saeed Mahameed Date: Tue Jun 11 17:15:13 2019 -0700 Documentation: net: mlx5: Add mlx5 initial documentation Add initial documentation for mlx5 driver. Signed-off-by: Saeed Mahameed Documentation/networking/device_drivers/index.rst | 1 + .../networking/device_drivers/mellanox/mlx5.rst | 101 +++++++++++++++++++++ MAINTAINERS | 1 + 3 files changed, 103 insertions(+) commit e44ef4e4516cce783e95d7221936aa9a4f325ad9 Author: Aya Levin Date: Thu May 16 09:49:20 2019 +0300 devlink: Hang reporter's dump method on a dumpit cb The devlink health reporter provides a dump method on an error. Dump may contain a large amount of data, in this case doit cb isn't sufficient. This is because the user side is blocking and doesn't allow draining of the socket until the socket runs out of buffers. Using dumpit cb is the correct way to go. Please note that thankfully the dump op is not yet implemented in any driver and therefore this change is not breaking userspace. Fixes: 35455e23e6f3 ("devlink: Add health dump {get,clear} commands") Signed-off-by: Aya Levin Acked-by: Jiri Pirko Signed-off-by: Saeed Mahameed net/core/devlink.c | 118 ++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 98 insertions(+), 20 deletions(-) commit 5a96019ce5cd7a7eaaeffc47e07834e4124bafc6 Author: Krzysztof Kozlowski Date: Tue Jun 4 20:48:22 2019 +0200 ARM: defconfig: samsung: Cleanup with savedefconfig Run savedefconfig to cleanup and reorganize the configs. Most entries are only moved around and few options disappear because of defaults. However this removes the already disabled OSS Emulation and OSS Sequencer API (SND_MIXER_OSS, SND_PCM_OSS, SND_SEQUENCER_OSS). These were already disabled (hidden by missing SND_OSSEMUL and SND_SEQUENCER) and are not strictly hardware related, therefore they are not necessary for providing reference hardware config. Signed-off-by: Krzysztof Kozlowski arch/arm/configs/mini2440_defconfig | 43 ++++++++++++++++--------------------- arch/arm/configs/s3c2410_defconfig | 24 ++++++++------------- arch/arm/configs/s3c6400_defconfig | 11 ++++------ 3 files changed, 31 insertions(+), 47 deletions(-) commit 4c3c59544f33e97cf8557f27e05a9904ead16363 Author: Ard Biesheuvel Date: Thu May 30 13:16:34 2019 +0200 spi/acpi: enumerate all SPI slaves in the namespace Currently, the ACPI enumeration that takes place when registering a SPI master only considers immediate child devices in the ACPI namespace, rather than checking the ResourceSource field in the SpiSerialBus() resource descriptor. This is incorrect: SPI slaves could reside anywhere in the ACPI namespace, and so we should enumerate the entire namespace and look for any device that refers to the newly registered SPI master in its resource descriptor. So refactor the existing code and use a lookup structure so that allocating the SPI device structure is deferred until we have identified the device as an actual child of the controller. This approach is loosely based on the way the I2C subsystem handles ACPI enumeration. Note that Apple x86 hardware does not rely on SpiSerialBus() resources in _CRS but uses nested devices below the controller's device node in the ACPI namespace, with a special set of device properties. This means we have to take care to only parse those properties for device nodes that are direct children of the controller node. Cc: Mika Westerberg Cc: linux-spi@vger.kernel.org Cc: broonie@kernel.org Cc: andy.shevchenko@gmail.com Cc: masahisa.kojima@linaro.org Cc: "Rafael J. Wysocki" Cc: Jarkko Nikula Cc: linux-acpi@vger.kernel.org Cc: Lukas Wunner Signed-off-by: Ard Biesheuvel Signed-off-by: Mark Brown drivers/spi/spi.c | 103 ++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 72 insertions(+), 31 deletions(-) commit 88099f53cc3717437f5fc9cf84205c5b65118377 Author: Hariprasad Kelam Date: Thu Jun 13 08:02:08 2019 +0530 drm/amd/display: fix compilation error this patch fixes below compilation error drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c: In function ‘dcn10_apply_ctx_for_surface’: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c:2378:3: error: implicit declaration of function ‘udelay’ [-Werror=implicit-function-declaration] udelay(underflow_check_delay_us); Signed-off-by: Hariprasad Kelam Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 1 + 1 file changed, 1 insertion(+) commit 4be8be78b7d848544b7c4b0191791c7e5c2e2236 Author: Greg Kroah-Hartman Date: Thu Jun 13 15:20:12 2019 +0200 amdgpu_dm: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: "David (ChunMing) Zhou" Cc: David Airlie Cc: Daniel Vetter Cc: Nicholas Kazlauskas Cc: David Francis Cc: Mario Kleiner Cc: Bhawanpreet Lakha Cc: Anthony Koo Cc: hersen wu Cc: "Leo (Hanghong) Ma" Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 +--- .../drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 35 +++++++--------------- .../drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.h | 2 +- 3 files changed, 12 insertions(+), 31 deletions(-) commit 641d30035c7d7ad273e2cb2ba52cba0150236fc5 Author: Greg Kroah-Hartman Date: Thu Jun 13 15:19:45 2019 +0200 amdkfd: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Oded Gabbay Cc: Alex Deucher Cc: "Christian König" Cc: "David (ChunMing) Zhou" Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Cc: amd-gfx@lists.freedesktop.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_debugfs.c | 36 +++++++------------------------- 1 file changed, 8 insertions(+), 28 deletions(-) commit 450f30ea9c60228e87cc60647473e2c1eb55df0b Author: Greg Kroah-Hartman Date: Thu Jun 13 15:19:19 2019 +0200 amdgpu: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Alex Deucher Cc: "Christian König" Cc: "David (ChunMing) Zhou" Cc: David Airlie Cc: Daniel Vetter Cc: xinhui pan Cc: Evan Quan Cc: Feifei Xu Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 51 ++++++++------------------------- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h | 4 +-- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 5 +--- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 5 +--- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 5 +--- 5 files changed, 17 insertions(+), 53 deletions(-) commit bb1d26b4609163c9a01c1d54fb593aa4b5512912 Author: Greg Kroah-Hartman Date: Thu Jun 13 13:56:31 2019 +0200 radeon: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Alex Deucher Cc: "Christian König" Cc: "David (ChunMing) Zhou" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_ttm.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) commit 635e2c5f0a1f7fa94cf8c8b027a5ff59f7af630c Author: Marek Olšák Date: Tue Jun 4 22:48:29 2019 -0400 drm/amdgpu: bump the DRM version for GDS ENOMEM fixes So userspace knows when this fix is available. Signed-off-by: Marek Olšák Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0079f82e710caf3e821267917af9517ac0fca83d Author: Alex Deucher Date: Tue Jun 11 09:45:51 2019 -0500 drm/amdgpu: return 0 by default in amdgpu_pm_load_smu_firmware Fixes SI cards running on amdgpu. Fixes: 1929059893022 ("drm/amd/amdgpu: add RLC firmware to support raven1 refresh") Bug: https://bugs.freedesktop.org/show_bug.cgi?id=110883 Reviewed-by: Evan Quan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 96cf624b164a55a09538460727ec1ad3d0719625 Author: Oak Zeng Date: Tue Jun 11 11:15:00 2019 -0500 drm/amdgpu: Reserve space for shared fence Call reservation_object_reserve_shared to reserve space for shared fence. Otherwise it will trigger BUG_ON condition in reservation_object_add_shared_fence. Signed-off-by: Oak Zeng Acked-by: Christian Konig Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 4 ++++ 1 file changed, 4 insertions(+) commit c5e4c6bbbdce750a52ae65c429384e7324a50fd3 Author: Tom St Denis Date: Mon Jun 10 09:53:58 2019 -0400 drm/amd/amdgpu: Bail out of BO node creation if not enough VRAM (v3) (v2): Return 0 and set mem->mm_node to NULL. (v3): Use atomic64_add_return instead. Signed-off-by: Tom St Denis Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit e9bc1bf7916e006f62a27f400f74a6e10b874886 Author: Yintian Tao Date: Wed Jun 5 20:40:08 2019 +0800 drm/amdgpu: register pm sysfs for sriov (v2) we need register pm sysfs for virt in order to support dpm level modification because smu ip block will not be added under SRIOV v2: whitespace fixes (Alex) Signed-off-by: Yintian Tao Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 65 +++++++++++++++++++++++++++--- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.h | 2 + 3 files changed, 67 insertions(+), 6 deletions(-) commit 0c888baba8e041c92c5c1882f25b8df5c29bff9f Author: Bard Liao Date: Wed Jun 12 12:01:48 2019 -0500 ASoC: SOF: dont wake dsp up in kcontrol IO Always get kcontrol value from cache, set kcontrol value to DSP when DSP is active. Kcontrol values will be restored when DSP boot up. We will set the default value of kcontrol in sof_complete to make sure the value is align with firmware. Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/sof/control.c | 270 +++++++---------------------------------------- sound/soc/sof/topology.c | 48 +++++++++ 2 files changed, 86 insertions(+), 232 deletions(-) commit 7df43911e92aa2137ae77ae60efaa9d6656df3fe Author: Seppo Ingalsuo Date: Wed Jun 12 12:01:47 2019 -0500 ASoC: SOF: Add DMIC token for unmute gain ramp time The settling time of DMIC DC level is both platform and used microphone model specific. The unmute gain ramp is used to conceal most of the large DC level seen in beginning of capture. This patch adds into the DMIC DAI IPC struct a new field called unmute_ramp_time and a new token SOF_TKN_INTEL_DMIC_UNMUTE_RAMP_TIME. The value is the ramp length in milliseconds (ms). The ABI minor version is incremented for this backwards compatible change. Signed-off-by: Seppo Ingalsuo Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown include/sound/sof/dai-intel.h | 3 ++- include/uapi/sound/sof/abi.h | 2 +- include/uapi/sound/sof/tokens.h | 1 + sound/soc/sof/topology.c | 4 ++++ 4 files changed, 8 insertions(+), 2 deletions(-) commit 65a18a46b274e64012fcf19d79ac62c8fb2a12e9 Author: Zhu Yingjiang Date: Wed Jun 12 12:01:46 2019 -0500 ASoC: SOF: topology: pass volume min/max linear value to FW The driver currently passes the volume ramp type and length topology tokens to firmware, but the min and max volume are not set. This patch provides a correction to convert the information from the topology file and pass the linear volume min/max value to the firmware to improve transitions. Signed-off-by: Zhu Yingjiang Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/sof/topology.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit aa66fd80e0813fab0146e001b8bef8c4ffe0ba3a Author: Zhu Yingjiang Date: Wed Jun 12 12:01:45 2019 -0500 ASoC: SOF: topology: add min/max step for volume_table add two units min_volume_step and max_volume_step to the snd_sof_control struct, for the min and max step of the volume_table. Signed-off-by: Zhu Yingjiang Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/sof/sof-priv.h | 2 ++ sound/soc/sof/topology.c | 2 ++ 2 files changed, 4 insertions(+) commit 847a040dd2ebb39effcc6bd3a5157fbded65bce7 Author: Pierre-Louis Bossart Date: Wed Jun 12 11:57:05 2019 -0500 ASoC: SOF: ipc: clarify operator precedence Cppcheck complains about the following warning, fix by adding parentheses [sound/soc/sof/ipc.c:783]: (style) Clarify calculation precedence for '&' and '?'. [sound/soc/sof/ipc.c:785]: (style) Clarify calculation precedence for '&' and '?'. [sound/soc/sof/ipc.c:787]: (style) Clarify calculation precedence for '&' and '?'. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/sof/ipc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e2eba551d2f4226400a6bb7871fef439ad1318dd Author: Kai Vehmanen Date: Wed Jun 12 11:57:04 2019 -0500 ASoC: SOF: ignore unrecoverable CTX_SAVE IPC errors at suspend As part of the suspend flow, a context save IPC message is sent to the firmware before powering down the DSP. If errors are met, the suspend flow is aborted with current code. Change the behaviour such that if firmware returns -EBUSY or -EAGAIN, return the error codes to PM core as before. The device is left in active state in this case. If other errors are reported, print a warning but do not block the suspend flow. As per interface specification, no valid error can be returned in this scenario. If the hardware has hit a fatal error and is not able to respond successfully, best recovery method is to proceed with suspend and power off the DSP. Signed-off-by: Kai Vehmanen Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/sof/pm.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit f1fd9d0e6dbae9c7cdd7e82fe3055ec7b790abb6 Author: Kai Vehmanen Date: Wed Jun 12 11:57:03 2019 -0500 ASoC: SOF: intel: extend IPC dump information Extend the HDA IPC dump implementation with status of key IRQ registers. This is useful to debug IPC timeouts and similar issues. Signed-off-by: Kai Vehmanen Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/sof/intel/cnl.c | 2 ++ sound/soc/sof/intel/hda.c | 29 +++++++++++++++++++++++++++++ sound/soc/sof/intel/hda.h | 2 ++ 3 files changed, 33 insertions(+) commit b943f798011346589bd9ae994e5755e776756a31 Author: Pierre-Louis Bossart Date: Wed Jun 12 11:57:02 2019 -0500 ASoC: SOF: uapi: align comments with firmware files No functional change, just mirror firmware comment changes Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown include/sound/sof/topology.h | 4 ++-- include/sound/sof/trace.h | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) commit 4cee883e97b6095e23f5d72543da93e1506ff8c2 Author: Dragos Tarcatu Date: Wed Jun 12 11:57:01 2019 -0500 ASOC: SOF: ipc: prevent logging trace messages If the firmware is set for verbose tracing, the kernel log is flooded with ipc rx/ipc rx done messages. Prevent logging those unless the verbose IPC debugging config option is set. Signed-off-by: Dragos Tarcatu Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/sof/ipc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3e6de89409bf7ad149bfb05dd0dce6c5678ea0a8 Author: Pierre-Louis Bossart Date: Wed Jun 12 11:38:45 2019 -0500 ASoC: soc-topology: fix modern dai link style The topology code can create a FE DAI link but did not allocate the memory for a platform component - whose name can be overridden at a later time. Fixes: 23b946ce2808b ("ASoC: soc-topology: use modern dai_link style") Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/soc-topology.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 2f7e015c1f20cfdbe97df25868abbfa8b7514778 Author: Nathan Huckleberry Date: Wed Jun 12 16:25:02 2019 -0700 ASoC: tas571x: Fix -Wunused-const-variable Clang produces the following warning sound/soc/codecs/tas571x.c:666:38: warning: unused variable 'tas5721_controls' [-Wunused-const-variable] In the chip struct definition tas5711_controls is used rather than tac5712_controls. Looks like a typo was made in the original commit. Since tac5711_controls is identical to tas5721_controls we can just swap them Cc: clang-built-linux@googlegroups.com Link: https://github.com/ClangBuiltLinux/linux/issues/522 Signed-off-by: Nathan Huckleberry Signed-off-by: Mark Brown sound/soc/codecs/tas571x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 05113483fd300d7a4605a726770e7255e29f1ac7 Author: Jerome Brunet Date: Thu Jun 13 13:42:33 2019 +0200 ASoC: meson: axg-tdm: consistently use SND_SOC_DAIFMT defines There a mix of SND_SOC_DAIFMT_ and SND_SOC_DAI_FORMAT_ in axg-tdm-interface.c. Even, if this is currently the same thing, lets use the same group consistently. Signed-off-by: Jerome Brunet Signed-off-by: Mark Brown sound/soc/meson/axg-tdm-interface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 489f231e0f4c44d4d019aa5c26e1c3f147875f13 Author: Kai Vehmanen Date: Thu Jun 13 14:54:12 2019 +0300 ASoC: codec: hdac_hdmi: fix pin connections at cvt enable In display codecs supported by hdac_hdmi, the connection indices are shared by all converters. At boot and resume from suspend, the connection state may be reset to default values. In case of multiple connected pins (multiple monitors connected with audio capability), routing and mute status of pins that are not connected to any PCM, may interfere with other pins. E.g. after resume from S3 with multiple monitors, unless all converters are in active use, playback to some PCMs may be muted due to the default settings of unrelated converters. Avoid this by ensuring all pin:cvt selections are correct in codec whenever a converter is enabled for playback. Signed-off-by: Kai Vehmanen Signed-off-by: Mark Brown sound/soc/codecs/hdac_hdmi.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit cb36ff785e868992e96e8b9e5a0c2822b680a9e2 Author: Jerome Brunet Date: Thu Jun 13 13:42:32 2019 +0200 ASoC: meson: axg-tdm: fix sample clock inversion The content of SND_SOC_DAIFMT_FORMAT_MASK is a number, not a bitfield, so the test to check if the format is i2s is wrong. Because of this the clock setting may be wrong. For example, the sample clock gets inverted in DSP B mode, when it should not. Fix the lrclk invert helper function Fixes: 1a11d88f499c ("ASoC: meson: add tdm formatter base driver") Signed-off-by: Jerome Brunet Signed-off-by: Mark Brown sound/soc/meson/axg-tdm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7e0d7d0fbd06af0507611f85dba8daf24832abd9 Author: Jerome Brunet Date: Thu Jun 13 13:42:31 2019 +0200 ASoC: meson: axg-tdmout: right_j is not supported Right justified format is actually not supported by the amlogic tdm output encoder. Fixes: c41c2a355b86 ("ASoC: meson: add tdm output driver") Signed-off-by: Jerome Brunet Signed-off-by: Mark Brown sound/soc/meson/axg-tdmout.c | 1 - 1 file changed, 1 deletion(-) commit 47c317b786b6c1efc2cb3cdb894fd323422fe5ea Author: Jerome Brunet Date: Thu Jun 13 13:42:30 2019 +0200 ASoC: meson: axg-tdmin: right_j is not supported Right justified format is actually not supported by the amlogic tdm input decoder. Fixes: 13a22e6a98f8 ("ASoC: meson: add tdm input driver") Signed-off-by: Jerome Brunet Signed-off-by: Mark Brown sound/soc/meson/axg-tdmin.c | 1 - 1 file changed, 1 deletion(-) commit 575f60312b3c5036385e95f61737da5a9e72f0ad Author: Brad Love Date: Thu Jun 6 12:57:54 2019 -0400 media: cx231xx-cards: Add Hauppauge 955Q variant cx231xx/lgdt3306a/si2157/cx25840 Signed-off-by: Brad Love Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/cx231xx/cx231xx-cards.c | 2 ++ 1 file changed, 2 insertions(+) commit dd60bf4360312559654a5efdac5108fee6fc9fdf Author: Brad Love Date: Wed Jun 5 16:22:11 2019 -0400 media: pvrusb2: Add Hauppauge HVR1955/1975 devices Includes support to identify and use two Hauppauge device. - LGDT3306a ATSC/QAM demod - si2177 tuner - cx25840 decoder for analog tv/composite/s-video/audio HVR-1975 dual-frontend: - LGDT3306a ATSC/QAM demod - si2168 DVB-C/T/T2 demod - si2177 tuner - cx25840 decoder for analog tv/composite/s-video/audio Signed-off-by: Brad Love Reviewed-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/pvrusb2/Kconfig | 2 + drivers/media/usb/pvrusb2/pvrusb2-cx2584x-v4l.c | 25 ++++ drivers/media/usb/pvrusb2/pvrusb2-devattr.c | 166 ++++++++++++++++++++++++ drivers/media/usb/pvrusb2/pvrusb2-devattr.h | 1 + drivers/media/usb/pvrusb2/pvrusb2-fx2-cmd.h | 4 + drivers/media/usb/pvrusb2/pvrusb2-hdw.c | 36 ++++- 6 files changed, 233 insertions(+), 1 deletion(-) commit 9f9b25593ab4197318e3621201588ad8cd525c9b Author: Sean Paul Date: Thu Jun 13 11:17:23 2019 -0400 drm/connector: Fix kerneldoc warning in HDR_OUTPUT_METADATA description Fixes the following warning: ../drivers/gpu/drm/drm_connector.c:981: WARNING: Definition list ends without a blank line; unexpected unindent. Fixes: a09db883e5d9 ("drm: Fix docbook warnings in hdr metadata helper structures") Cc: Shashank Sharma Cc: Ville Syrjä Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Cc: Bartlomiej Zolnierkiewicz Cc: "Ville Syrjä" Cc: Hans Verkuil Cc: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org Cc: Sean Paul (v1) Cc: Uma Shankar Cc: Daniel Vetter Cc: "Ville Syrjälä" Reviewed-by: Alex Deucher Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190613151727.133696-1-sean@poorly.run drivers/gpu/drm/drm_connector.c | 1 + 1 file changed, 1 insertion(+) commit 6c83ca795f2c09649a3c3ac3c04563a60146e2d7 Author: Sean Paul Date: Tue Jun 11 12:08:20 2019 -0400 drm/rockchip: Use dirtyfb helper Instead of flushing all vops every time we get a dirtyfb call, use the damage helper to kick off an atomic commit. Even though we don't use damage clips, the helper commit will force us through the normal psr_inhibit_get/put sequence. Changes in v3: - Added to the set Changes in v4: - None Changes in v5: - None Link to v3: https://patchwork.freedesktop.org/patch/msgid/20190502194956.218441-7-sean@poorly.run Link to v4: https://patchwork.freedesktop.org/patch/msgid/20190508160920.144739-7-sean@poorly.run Suggested-by: Daniel Vetter Tested-by: Heiko Stuebner Reviewed-by: Daniel Vetter Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190611160844.257498-7-sean@poorly.run drivers/gpu/drm/rockchip/rockchip_drm_fb.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) commit 1452c25b0e60278820f3d2155c65f1bfcce5ee79 Author: Sean Paul Date: Wed Jun 12 10:50:19 2019 -0400 drm: Add helpers to kick off self refresh mode in drivers This patch adds a new drm helper library to help drivers implement self refresh. Drivers choosing to use it will register crtcs and will receive callbacks when it's time to enter or exit self refresh mode. In its current form, it has a timer which will trigger after a driver-specified amount of inactivity. When the timer triggers, the helpers will submit a new atomic commit to shut the refreshing pipe off. On the next atomic commit, the drm core will revert the self refresh state and bring everything back up to be actively driven. From the driver's perspective, this works like a regular disable/enable cycle. The driver need only check the 'self_refresh_active' state in crtc_state. It should initiate self refresh mode on the panel and enter an off or low-power state. Changes in v2: - s/psr/self_refresh/ (Daniel) - integrated the psr exit into the commit that wakes it up (Jose/Daniel) - made the psr state per-crtc (Jose/Daniel) Changes in v3: - Remove the self_refresh_(active|changed) from connector state (Daniel) - Simplify loop in drm_self_refresh_helper_alter_state (Daniel) - Improve self_refresh_aware comment (Daniel) - s/self_refresh_state/self_refresh_data/ (Daniel) Changes in v4: - Move docbook location below panel (Daniel) - Improve docbook with references and more detailed explanation (Daniel) - Instead of register/unregister, use init/cleanup (Daniel) Changes in v5: - Resolved conflict in drm_atomic_helper.c #include block - Resolved conflict in rst with HDCP helper docs Changes in v6: - Fix include ordering, clean up forward declarations (Sam) Link to v1: https://patchwork.freedesktop.org/patch/msgid/20190228210939.83386-2-sean@poorly.run Link to v2: https://patchwork.freedesktop.org/patch/msgid/20190326204509.96515-1-sean@poorly.run Link to v3: https://patchwork.freedesktop.org/patch/msgid/20190502194956.218441-6-sean@poorly.run Link to v4: https://patchwork.freedesktop.org/patch/msgid/20190508160920.144739-6-sean@poorly.run Link to v5: https://patchwork.freedesktop.org/patch/msgid/20190611160844.257498-6-sean@poorly.run Cc: Daniel Vetter Cc: Jose Souza Cc: Zain Wang Cc: Tomasz Figa Cc: Ville Syrjälä Cc: Sam Ravnborg Tested-by: Heiko Stuebner Reviewed-by: Daniel Vetter Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190612145026.191846-1-sean@poorly.run Documentation/gpu/drm-kms-helpers.rst | 9 ++ drivers/gpu/drm/Makefile | 2 +- drivers/gpu/drm/drm_atomic.c | 2 + drivers/gpu/drm/drm_atomic_helper.c | 35 ++++- drivers/gpu/drm/drm_atomic_state_helper.c | 4 + drivers/gpu/drm/drm_atomic_uapi.c | 7 +- drivers/gpu/drm/drm_self_refresh_helper.c | 216 ++++++++++++++++++++++++++++++ include/drm/drm_atomic.h | 15 +++ include/drm/drm_connector.h | 14 ++ include/drm/drm_crtc.h | 19 +++ include/drm/drm_self_refresh_helper.h | 20 +++ 11 files changed, 338 insertions(+), 5 deletions(-) commit 6f3b62781bbd2670756a4847113d410a827a2593 Author: Sean Paul Date: Tue Jun 11 12:08:18 2019 -0400 drm: Convert connector_helper_funcs->atomic_check to accept drm_atomic_state Everyone who implements connector_helper_funcs->atomic_check reaches into the connector state to get the atomic state. Instead of continuing this pattern, change the callback signature to just give atomic state and let the driver determine what it does and does not need from it. Eventually all atomic functions should do this, but that's just too much busy work for me. Changes in v3: - Added to the set Changes in v4: - None Changes in v5: - intel_digital_connector_atomic_check declaration moved to i915_atomic.h Link to v3: https://patchwork.freedesktop.org/patch/msgid/20190502194956.218441-5-sean@poorly.run Link to v4: https://patchwork.freedesktop.org/patch/msgid/20190508160920.144739-5-sean@poorly.run Cc: Daniel Vetter Cc: Ville Syrjälä Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Ben Skeggs Cc: Laurent Pinchart Cc: Kieran Bingham Cc: Eric Anholt Tested-by: Heiko Stuebner Reviewed-by: Laurent Pinchart [for rcar lvds] Acked-by: Daniel Vetter Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190611160844.257498-5-sean@poorly.run drivers/gpu/drm/drm_atomic_helper.c | 4 ++-- drivers/gpu/drm/i915/intel_atomic.c | 8 +++++--- drivers/gpu/drm/i915/intel_atomic.h | 2 +- drivers/gpu/drm/i915/intel_dp_mst.c | 7 ++++--- drivers/gpu/drm/i915/intel_sdvo.c | 9 +++++---- drivers/gpu/drm/i915/intel_tv.c | 8 +++++--- drivers/gpu/drm/nouveau/dispnv50/disp.c | 5 +++-- drivers/gpu/drm/rcar-du/rcar_lvds.c | 12 +++++++----- drivers/gpu/drm/vc4/vc4_txp.c | 7 ++++--- include/drm/drm_modeset_helper_vtables.h | 2 +- 10 files changed, 37 insertions(+), 27 deletions(-) commit 6f6be371608e88922970a3968f963720ba3871f0 Author: Brad Love Date: Thu Dec 20 15:14:25 2018 -0500 media: pvrusb2: Add i2c client demod/tuner support i2c client device is the "new" method to attach to dvb modules, include support for this functionality. Cleanup code has been added to init in case of failure, as well as to frontend exit. Required by Hauppauge HVR-1975 Signed-off-by: Brad Love Reviewed-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/pvrusb2/pvrusb2-dvb.c | 11 +++++++++++ drivers/media/usb/pvrusb2/pvrusb2-dvb.h | 3 +++ 2 files changed, 14 insertions(+) commit cac821d2ea72fbefb16e8af1e192ec70aae29afe Author: Brad Love Date: Thu May 30 16:32:25 2019 -0400 media: pvrusb2: Add multiple dvb frontend support All changes are equivalent and backwards compatible. All current devices have been changed to use fe[0] Code has been added to dvb init to support cleanup after failure. Multiple frontends are required by Hauppauge HVR-1975, which is in a later commit. Signed-off-by: Brad Love Reviewed-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/pvrusb2/pvrusb2-devattr.c | 46 ++++++++--------- drivers/media/usb/pvrusb2/pvrusb2-dvb.c | 77 ++++++++++++++++++++++------- drivers/media/usb/pvrusb2/pvrusb2-dvb.h | 2 +- 3 files changed, 82 insertions(+), 43 deletions(-) commit d5cb82b01a5ae6cf9a36a24be02ef28b84df28cc Author: Brad Love Date: Thu Dec 20 12:09:31 2018 -0500 media: si2157: add detection of si2177 tuner Works in ATSC and QAM as is, DVB is completely untested. Firmware required. Signed-off-by: Brad Love Reviewed-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/tuners/si2157.c | 6 ++++++ drivers/media/tuners/si2157_priv.h | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) commit 630eccfd0a0355dc18b7e4456d3479901fb108e9 Author: Hannes Schmelzer Date: Fri May 3 11:23:32 2019 +0200 Documentation: devicetree: Add vendor prefix for B&R Industrial Automation GmbH Signed-off-by: Hannes Schmelzer [robh: rework for schema] Signed-off-by: Rob Herring Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 1f8a7bee27e63d7c5287719049941e285e54d370 Author: Yuval Avnery Date: Mon Jun 10 23:38:42 2019 +0000 net/mlx5: Add EQ enable/disable API Previously, EQ joined the chain notifier on creation. This forced the caller to be ready to handle events before creating the EQ through eq_create_generic interface. To help the caller control when the created EQ will be attached to the IRQ, add enable/disable API. Signed-off-by: Yuval Avnery Signed-off-by: Saeed Mahameed drivers/infiniband/hw/mlx5/odp.c | 9 +- drivers/net/ethernet/mellanox/mlx5/core/eq.c | 105 ++++++++++++++++------- drivers/net/ethernet/mellanox/mlx5/core/lib/eq.h | 1 - include/linux/mlx5/eq.h | 5 +- 4 files changed, 88 insertions(+), 32 deletions(-) commit 81bfa206032a67f0700459a64a5493c246629604 Author: Ariel Levkovich Date: Mon Jun 10 23:38:41 2019 +0000 net/mlx5: Use a single IRQ for all async EQs The patch modifies the IRQ allocation so that all async EQs are assigned to the same IRQ resulting in more available IRQs for completion EQs. The changes are using the support for IRQ sharing and EQ polling budget that was introduced in previous patches so when the shared interrupt is triggered, the kernel will serially call the handler of each of the sharing EQs with a certain budget of EQEs to poll in order to prevent starvation. Signed-off-by: Ariel Levkovich Signed-off-by: Saeed Mahameed drivers/infiniband/hw/mlx5/odp.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/eq.c | 19 ++++++------ drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c | 38 +++++++++-------------- include/linux/mlx5/eq.h | 14 ++------- 4 files changed, 27 insertions(+), 46 deletions(-) commit cf49f41d29467ccec16b12f77475cc217132c572 Author: Yuval Avnery Date: Mon Jun 10 23:38:39 2019 +0000 net/mlx5: Rename mlx5_irq_info to mlx5_irq struct mlx5_irq_info is an active object and not just info. Signed-off-by: Yuval Avnery Reviewed-by: Parav Pandit Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c | 77 +++++++++++------------ 1 file changed, 38 insertions(+), 39 deletions(-) commit 256cf690af0668dd4e7c192648d2faf2e7e58788 Author: Yuval Avnery Date: Mon Jun 10 23:38:37 2019 +0000 net/mlx5: Move all IRQ logic to pci_irq.c Finalize IRQ separation and expose irq interface. Signed-off-by: Yuval Avnery Reviewed-by: Parav Pandit Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/Makefile | 2 +- drivers/net/ethernet/mellanox/mlx5/core/eq.c | 327 ------------------- drivers/net/ethernet/mellanox/mlx5/core/lib/eq.h | 1 - .../net/ethernet/mellanox/mlx5/core/mlx5_core.h | 8 + drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c | 345 +++++++++++++++++++++ 5 files changed, 354 insertions(+), 329 deletions(-) commit bfb49549ea7993f49c0374295d84a0c7772102a2 Author: Yuval Avnery Date: Mon Jun 10 23:38:34 2019 +0000 net/mlx5: Generalize IRQ interface to work with irq_table IRQ interface should operate within the irq_table context. It should be independent of any EQ data structure. The interface that will be exposed: init/clenup, create/destroy, attach/detach Signed-off-by: Yuval Avnery Reviewed-by: Parav Pandit Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eq.c | 38 +++++++++++++++++++++------- 1 file changed, 29 insertions(+), 9 deletions(-) commit e1706e62801e9ad65b1fb6e6eccc69acfa43d16d Author: Yuval Avnery Date: Mon Jun 10 23:38:32 2019 +0000 net/mlx5: Separate IRQ table creation from EQ table creation IRQ allocation should be part of the IRQ table life-cycle. Signed-off-by: Yuval Avnery Reviewed-by: Parav Pandit Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eq.c | 22 +++------------------- drivers/net/ethernet/mellanox/mlx5/core/main.c | 9 +++++++++ .../net/ethernet/mellanox/mlx5/core/mlx5_core.h | 2 ++ 3 files changed, 14 insertions(+), 19 deletions(-) commit 90426cc00c77e4c11f1d23799de44ecb54e8ff27 Author: Yuval Avnery Date: Mon Jun 10 23:38:30 2019 +0000 net/mlx5: Move IRQ affinity set to IRQ allocation phase Affinity set/clear is part of the IRQ life-cycle. Signed-off-by: Yuval Avnery Reviewed-by: Parav Pandit Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eq.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) commit b79e6beb9c36a1f26116a9a576392647643ac456 Author: Yuval Avnery Date: Mon Jun 10 23:38:28 2019 +0000 net/mlx5: Move IRQ rmap creation to IRQ allocation phase Rmap creation/deletion is part of the IRQ life-cycle. Signed-off-by: Yuval Avnery Reviewed-by: Parav Pandit Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eq.c | 82 +++++++++++++++++++--------- 1 file changed, 57 insertions(+), 25 deletions(-) commit 561aa15ad69e9d1e5a8bb277adb3209bf8091ecb Author: Yuval Avnery Date: Mon Jun 10 23:38:27 2019 +0000 net/mlx5: Separate IRQ data from EQ table data IRQ table should only exist for mlx5_core_dev for PF and VF only. EQ table of mediated devices should hold a pointer to the IRQ table of the parent PCI device. Signed-off-by: Yuval Avnery Reviewed-by: Parav Pandit Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eq.c | 125 ++++++++++++++------- drivers/net/ethernet/mellanox/mlx5/core/main.c | 11 +- .../net/ethernet/mellanox/mlx5/core/mlx5_core.h | 3 + include/linux/mlx5/driver.h | 3 + 4 files changed, 98 insertions(+), 44 deletions(-) commit 24163189da487b4caa751eef4e945c9333aae441 Author: Yuval Avnery Date: Mon Jun 10 23:38:25 2019 +0000 net/mlx5: Separate IRQ request/free from EQ life cycle Instead of requesting IRQ with eq creation, IRQs will be requested before EQ table creation. Instead of freeing the IRQs after EQ destroy, free IRQs after eq table destroy. Signed-off-by: Yuval Avnery Reviewed-by: Parav Pandit Signed-off-by: Saeed Mahameed drivers/infiniband/hw/mlx5/odp.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/eq.c | 121 ++++++++++++++++++--------- include/linux/mlx5/eq.h | 3 +- 3 files changed, 84 insertions(+), 42 deletions(-) commit ca390799c2aa03632c294107fa7f647bcbdff428 Author: Yuval Avnery Date: Mon Jun 10 23:38:23 2019 +0000 net/mlx5: Change interrupt handler to call chain notifier Multiple EQs may share the same IRQ in subsequent patches. Instead of calling the IRQ handler directly, the EQ will register to an atomic chain notfier. The Linux built-in shared IRQ is not used because it forces the caller to disable the IRQ and clear affinity before free_irq() can be called. This patch is the first step in the separation of IRQ and EQ logic. Signed-off-by: Yuval Avnery Reviewed-by: Parav Pandit Signed-off-by: Saeed Mahameed drivers/infiniband/hw/mlx5/mlx5_ib.h | 1 + drivers/infiniband/hw/mlx5/odp.c | 10 +- drivers/net/ethernet/mellanox/mlx5/core/eq.c | 138 +++++++++++++++-------- drivers/net/ethernet/mellanox/mlx5/core/lib/eq.h | 9 +- include/linux/mlx5/eq.h | 3 +- 5 files changed, 105 insertions(+), 56 deletions(-) commit 081cc2d7fa5828c8214c41b97352245ca5cc0f58 Author: Yuval Avnery Date: Mon Jun 10 23:38:21 2019 +0000 net/mlx5: Introduce EQ polling budget Multiple EQs may share the same irq in subsequent patches. To avoid starvation, a budget is set per EQ's interrupt handler. Because of this change, it is no longer required to check that MLX5_NUM_SPARE_EQE eqes were polled (to detect that arm is required). It is guaranteed that MLX5_NUM_SPARE_EQE > budget, therefore the handler will arm and exit the handler before all the entries in the eq are polled. In the scenario where the handler is out of budget and there are more EQEs to poll, arming the EQ guarantees that the HW will send another interrupt and the handler will be called again. Signed-off-by: Yuval Avnery Reviewed-by: Parav Pandit Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eq.c | 55 ++++++++++++++-------------- 1 file changed, 27 insertions(+), 28 deletions(-) commit 86eec50beaf3a45f6432d491072fa5c54284dbca Author: Bodong Wang Date: Mon Jun 10 23:38:19 2019 +0000 net/mlx5: Support querying max VFs from device For ECPF with eswitch manager privilege, query the host max VF count by querying the device using query_functions command. With this enhancement: 1. flow steering entries are created only for valid vports based on the max VF count of the PF. 2. Driver only queries cap of valid vport. Eswitch requires the max VFs when doing initialization, so do sr-iov init before eswitch init. Signed-off-by: Bodong Wang Reviewed-by: Parav Pandit Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/main.c | 18 +++++++++--------- drivers/net/ethernet/mellanox/mlx5/core/sriov.c | 22 ++++++++++++++++++++++ include/linux/mlx5/driver.h | 7 ++----- include/linux/mlx5/mlx5_ifc.h | 2 +- 4 files changed, 34 insertions(+), 15 deletions(-) commit 10ee82cedb62dd716c44ba7a2c458688638873ab Author: Bodong Wang Date: Mon Jun 10 23:38:18 2019 +0000 net/mlx5: E-Switch, Return raw output for query esw functions Current function only returns host num of VFs, later patch requires other params such as host maximum num of VFs. Return the raw output so that caller can extract info as needed. Signed-off-by: Bodong Wang Reviewed-by: Parav Pandit Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 21 ++------------------- drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 7 ++++++- .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 5 ++++- 3 files changed, 12 insertions(+), 21 deletions(-) commit ac35dcd6e4bdfadc90d6566ccf9fdc3b8f5e1b23 Author: Vu Pham Date: Mon Jun 10 23:38:16 2019 +0000 net/mlx5: E-Switch, Handle representors creation in handler context Unified representors creation in esw_functions_changed context handler. Emulate the esw_function_changed event for FW/HW that does not support this event. Signed-off-by: Vu Pham Reviewed-by: Parav Pandit Reviewed-by: Bodong Wang Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 12 +-- .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 89 ++++++++++++---------- 2 files changed, 50 insertions(+), 51 deletions(-) commit b8a92577f4be89427f0b150261626ebcc25c498d Author: Daniel Jurgens Date: Mon Jun 10 23:38:14 2019 +0000 net/mlx5: Increase wait time for fw initialization Firmware FLR happens sequentially, in some cases, like when destroying a VM that had many VFs, may require waiting much longer than 10 seconds. Increase the timeout to 2 minutes, and print a wait countdown status every 20 seconds. Signed-off-by: Daniel Jurgens Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/main.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit e32d045cd4ba06b59878323e434bad010e78e658 Author: Rajneesh Bhardwaj Date: Thu Jun 6 06:54:19 2019 +0530 x86/cpu: Add Ice Lake NNPI to Intel family Add the CPUID model number of Ice Lake Neural Network Processor for Deep Learning Inference (ICL-NNPI) to the Intel family list. Ice Lake NNPI uses model number 0x9D and this will be documented in a future version of Intel Software Development Manual. Signed-off-by: Rajneesh Bhardwaj Signed-off-by: Thomas Gleixner Cc: bp@suse.de Cc: Borislav Petkov Cc: Dave Hansen Cc: Andy Shevchenko Cc: "H. Peter Anvin" Cc: Kan Liang Cc: Peter Zijlstra Cc: platform-driver-x86@vger.kernel.org Cc: Qiuxu Zhuo Cc: Srinivas Pandruvada Cc: Len Brown Cc: Linux PM Link: https://lkml.kernel.org/r/20190606012419.13250-1-rajneesh.bhardwaj@linux.intel.com arch/x86/include/asm/intel-family.h | 1 + 1 file changed, 1 insertion(+) commit 1dfdb45ec510ba27e366878f97484e9c9e728902 Author: Paolo Bonzini Date: Wed Jun 5 16:46:44 2019 +0200 KVM: x86: clean up conditions for asynchronous page fault handling Even when asynchronous page fault is disabled, KVM does not want to pause the host if a guest triggers a page fault; instead it will put it into an artificial HLT state that allows running other host processes while allowing interrupt delivery into the guest. However, the way this feature is triggered is a bit confusing. First, it is not used for page faults while a nested guest is running: but this is not an issue since the artificial halt is completely invisible to the guest, either L1 or L2. Second, it is used even if kvm_halt_in_guest() returns true; in this case, the guest probably should not pay the additional latency cost of the artificial halt, and thus we should handle the page fault in a completely synchronous way. By introducing a new function kvm_can_deliver_async_pf, this patch commonizes the code that chooses whether to deliver an async page fault (kvm_arch_async_page_not_present) and the code that chooses whether a page fault should be handled synchronously (kvm_can_do_async_pf). Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 13 ------------- arch/x86/kvm/x86.c | 47 ++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 42 insertions(+), 18 deletions(-) commit 5ade071ba13e3bb24e3a9d5f8d6a3cf145deeb18 Author: Sean Paul Date: Tue Jun 11 12:08:17 2019 -0400 drm: Add atomic variants for bridge enable/disable This patch adds atomic variants for all of pre_enable/enable/disable/post_disable bridge functions. These will be called from the appropriate atomic helper functions. If the bridge driver doesn't implement the atomic version of the function, we will fall back to the vanilla implementation. Note that some drivers call drm_bridge_disable directly, and these cases are not covered. It's up to the driver to decide whether to implement both atomic_disable and disable, or if it's not necessary. Changes in v3: - Added to the patchset Changes in v4: - Fix up docbook references (Daniel) Changes in v5: - None Link to v3: https://patchwork.freedesktop.org/patch/msgid/20190502194956.218441-4-sean@poorly.run Link to v4: https://patchwork.freedesktop.org/patch/msgid/20190508160920.144739-4-sean@poorly.run Cc: Daniel Vetter Cc: Ville Syrjälä Tested-by: Heiko Stuebner Reviewed-by: Daniel Vetter Reviewed-by: Andrzej Hajda Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190611160844.257498-4-sean@poorly.run drivers/gpu/drm/drm_atomic_helper.c | 8 +-- drivers/gpu/drm/drm_bridge.c | 110 ++++++++++++++++++++++++++++++++++++ include/drm/drm_bridge.h | 106 ++++++++++++++++++++++++++++++++++ 3 files changed, 220 insertions(+), 4 deletions(-) commit 1b27fbdde1df172dba604855c45078d741f8c858 Author: Laurent Pinchart Date: Tue Jun 11 16:51:43 2019 -0400 drm: Add drm_atomic_get_(old|new)_connector_for_encoder() helpers Add functions to the atomic core to retrieve the old and new connectors associated with an encoder in a drm_atomic_state. This is useful for encoders and bridges that need to access the connector, for instance for the drm_display_info. The CRTC associated with the encoder can also be retrieved through the connector state, and from it, the old and new CRTC states. Changed in v4: - Added to the set Changed in v5: - Fix up docbook (Daniel & Laurent) Changed in v6: - Updated commit subject (Sam) Link to v4: https://patchwork.freedesktop.org/patch/msgid/20190508160920.144739-3-sean@poorly.run Link to v5: https://patchwork.freedesktop.org/patch/msgid/20190611160844.257498-3-sean@poorly.run Cc: Daniel Vetter Cc: Sam Ravnborg Tested-by: Heiko Stuebner Reviewed-by: Daniel Vetter Signed-off-by: Laurent Pinchart [seanpaul removed WARNs from helpers and added docs to explain why returning NULL might be valid] Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190611205147.181298-1-sean@poorly.run drivers/gpu/drm/drm_atomic.c | 69 ++++++++++++++++++++++++++++++++++++++++++++ include/drm/drm_atomic.h | 7 +++++ include/drm/drm_connector.h | 5 ++++ 3 files changed, 81 insertions(+) commit 43c76d72ea853ccaeb22a497c13d3cd946869ec6 Author: Sean Paul Date: Tue Jun 11 16:49:53 2019 -0400 drm: Add atomic variants of enable/disable to encoder helper funcs This patch adds atomic_enable and atomic_disable callbacks to the encoder helpers. This will allow encoders to make informed decisions in their start-up/shutdown based on the committed state. Aside from the new hooks, this patch also introduces the new signature for .atomic_* functions going forward. Instead of passing object state (well, encoders don't have atomic state, but let's ignore that), we pass the entire atomic state so the driver can inspect more than what's happening locally. This is particularly important for the upcoming self refresh helpers. Changes in v3: - Added patch to the set Changes in v4: - Move atomic_disable above prepare (Daniel) - Add breadcrumb to .enable() docbook (Daniel) Changes in v5: - None Changes in v6: - Tweak kerneldoc some more (Sam) Link to v3: https://patchwork.freedesktop.org/patch/msgid/20190502194956.218441-2-sean@poorly.run Link to v4: https://patchwork.freedesktop.org/patch/msgid/20190508160920.144739-2-sean@poorly.run Link to v5: https://patchwork.freedesktop.org/patch/msgid/20190611160844.257498-2-sean@poorly.run Cc: Daniel Vetter Cc: Ville Syrjälä Cc: Sam Ravnborg Tested-by: Heiko Stuebner Reviewed-by: Daniel Vetter Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190611204959.180855-1-sean@poorly.run drivers/gpu/drm/drm_atomic_helper.c | 8 ++++-- include/drm/drm_modeset_helper_vtables.h | 49 ++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 2 deletions(-) commit 837158b847a48d886f23937b539965f83917cc1f Author: Rob Herring Date: Fri May 17 16:17:08 2019 -0500 dt-bindings: Check the examples against the schemas Currently, the binding examples are just built with dtc. dtc recently gained the support necessary to output the examples in YAML format (commit 87963ee20693 ("livetree: add missing type markers in generated overlay properties"). Now just switch the output format and the examples will be checked against the schema. Reviewed-by: Maxime Ripard Signed-off-by: Rob Herring Documentation/devicetree/bindings/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f7a6463e389e9222e5d6fb60211673e06a307438 Author: Rob Herring Date: Fri May 17 16:18:13 2019 -0500 dt-bindings: vendor-prefixes: Also allow node names starting with '_' Generated nodes for overlays begin with '_'. The binding examples are built as overlays in order to allow unresolved phandles, so we need to allow the generated node names. Reviewed-by: Maxime Ripard Signed-off-by: Rob Herring Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9aa892d2c1a0aa4f4287aa1d922602ca0e9db990 Author: Wolfram Sang Date: Thu Jun 13 18:04:23 2019 +0200 ALSA: pci: echoaudio: remove variable which is a constant Checking a variable which is always '1' has no use. Signed-off-by: Wolfram Sang Signed-off-by: Takashi Iwai sound/pci/echoaudio/echoaudio_dsp.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit eb7cf945a8dac8603e6d0759023e9b6cfed7a008 Author: Greg Kroah-Hartman Date: Thu Jun 13 13:45:22 2019 +0200 host1x: debugfs_create_dir() can never return NULL So there is no need to check for a value that can never happen. No need to check the return value all anyway, as any debugfs call can take the result of this function as an option just fine. Cc: Thierry Reding Cc: dri-devel@lists.freedesktop.org Cc: linux-tegra@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Thierry Reding drivers/gpu/host1x/debug.c | 3 --- 1 file changed, 3 deletions(-) commit a75e91bad717fea43358e7f743de5f93c4e5978f Author: Jorge Ramirez-Ortiz Date: Mon Jun 10 09:22:43 2019 +0200 spi: qup: fix PIO/DMA transfers. - DMA/PIO: If an error IRQ occurred during PIO or DMA mode make sure to log it so on completion the transfer can be marked as an error. - PIO: Do not complete a transaction until all data has been transferred or an error IRQ was flagged. 1) If there was no error IRQ, ignore the done flag IRQ (QUP_OP_MAX_INPUT_DONE_FLAG) until all data for the transfer has been processed: not doing so risks completing the transfer returning uninitialized data in the buffers. 2) Under stress testing we have identified the need to protect read/write operations against spurious IN/OUT service events. Signed-off-by: Jorge Ramirez-Ortiz Signed-off-by: Mark Brown drivers/spi/spi-qup.c | 51 +++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 45 insertions(+), 6 deletions(-) commit fd742eaab827b47c5f2de6c1811a17075608da60 Author: Linus Walleij Date: Sun Jun 9 13:48:12 2019 +0200 regulator: max8952: Convert to use GPIO descriptors This finalizes the descriptor conversion of the MAX8952 driver by letting the VID0 and VID1 GPIOs be fetched from descriptors. Both VID0 and VID1 must be supplied for the VID selection to work, I add some code to preserve the semantics that if only one of the two VID gpios is supplied, it will be initialized to low. This might be a bit overzealous, but I want to preserve any implicit semantics. This is currently only used by device tree in-kernel but it is still also possible to supply the same GPIOs using a machine descriptor table if a board file is used. Ideally this should be phased over to using gpio-regulator.c that does the same thing, but it might require some refactoring and needs testing on real hardware. Cc: Tomasz Figa Cc: MyungJoo Ham Cc: Marek Szyprowski Signed-off-by: Linus Walleij Signed-off-by: Mark Brown drivers/regulator/max8952.c | 62 ++++++++++++++++++--------------------- include/linux/regulator/max8952.h | 3 -- 2 files changed, 28 insertions(+), 37 deletions(-) commit 150c6624a6fa4323401f88c56cd38aad588afaad Author: Greg Kroah-Hartman Date: Thu Jun 13 13:46:18 2019 +0200 sti: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Benjamin Gaignard Cc: Vincent Abriou Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Benjamin Gaignard Link: https://patchwork.freedesktop.org/patch/msgid/20190613114618.GD13119@kroah.com drivers/gpu/drm/sti/sti_drv.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit fc30f2adb621aa6d6c59f0276d06004dcb204a56 Author: Keyon Jie Date: Wed Jun 12 11:39:58 2019 -0500 ASoC: Intel: bxt-da7219-max98357a: add BE dailink for dmic16k We need dmic16k BE(and FE, in tplg file) dailink for keyword detection feature on bxt-da7219-max98357a machine, here add it in driver side. Signed-off-by: Keyon Jie Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/boards/bxt_da7219_max98357a.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit cbb9f8ccc8232b4647c4180af653eee744818221 Author: John Hsu Date: Mon Jun 10 11:40:40 2019 +0800 ASoC: nau8825: fix fake interruption when booting There is no pull-up resistor at IRQ line where it connects from the codec to SoC. When booting, the signal of IRQ pin will keep low which makes the SoC invoke the ISR repeatedly because the IRQ is registered trigger low. It will not stop until the codec sets up the interruption and pulls the signal high. In the patch, nau8825 will internally pull the signal to high at booting in case the fake interrupts happen. Signed-off-by: John Hsu Tested-by: Cheng-Yi Chiang Signed-off-by: Mark Brown sound/soc/codecs/nau8825.c | 4 ++++ sound/soc/codecs/nau8825.h | 2 ++ 2 files changed, 6 insertions(+) commit 15893fa40109f5e7c67eeb8da62267d0fdf0be9d Author: Aaron Armstrong Skomra Date: Wed Jun 12 14:19:31 2019 -0700 HID: wacom: generic: read the number of expected touches on a per collection basis Bluetooth connections may contain more than one set of touches, or a partial set of touches, in one report. Set the number of expected touches when reading a collection instead of once per report (in the pre-report function). Accordingly, reset the number of touches expected after each sync. Signed-off-by: Aaron Armstrong Skomra Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 79 +++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 63 insertions(+), 16 deletions(-) commit f4e11d599610a61e978f722f6ade660872a43816 Author: Aaron Armstrong Skomra Date: Wed Jun 12 14:19:30 2019 -0700 HID: wacom: generic: support the 'report valid' usage for touch Finger data is separated into chunks in our Bluetooth report, where each report contains the same number of chunks. Those chunks are not aligned in any particular way to a set of finger touches. That is, the first half of a group of simultaneous touches may be in one chunk at the end of a report and the second half could be at the beginning of the next report. Also some chunks contain no data and potentially some chunks could contain leftover (bad) data. Introduce and process the WACOM_HID_WT_REPORT_VALID usage that the device uses to let us know if we should process a chunk of data. Signed-off-by: Aaron Armstrong Skomra Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 12 +++++++++++- drivers/hid/wacom_wac.h | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) commit 184eccd40389df29abefab88092c4ff33191fd0c Author: Aaron Armstrong Skomra Date: Wed Jun 12 14:19:29 2019 -0700 HID: wacom: generic: read HID_DG_CONTACTMAX from any feature report In the generic code path, HID_DG_CONTACTMAX was previously only read from the second byte of report 0x23. Another report (0x82) has the HID_DG_CONTACTMAX in the higher nibble of the third byte. We should support reading the value of HID_DG_CONTACTMAX no matter what report we are reading or which position that value is in. To do this we submit the feature report as a event report using hid_report_raw_event(). Our modified finger event path records the value of HID_DG_CONTACTMAX when it sees that usage. Fixes: 8ffffd5212846 ("HID: wacom: fix timeout on probe for some wacoms") Signed-off-by: Aaron Armstrong Skomra Signed-off-by: Jiri Kosina drivers/hid/wacom_sys.c | 10 ++++++---- drivers/hid/wacom_wac.c | 4 ++++ 2 files changed, 10 insertions(+), 4 deletions(-) commit 912c6aa67ad4252dc92e6569cfcb32ee44575183 Author: Aaron Armstrong Skomra Date: Wed Jun 12 14:19:28 2019 -0700 HID: wacom: Add 2nd gen Intuos Pro Small support The existing INTUOSP2_BT device class supports LEDs and this device does not. A new device class enum entry, "INTUOSP2S_BT", is created to avoid the INTUOSP2_BT LED code. Signed-off-by: Aaron Armstrong Skomra Reviewed-by: Jason Gerecke Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 30 +++++++++++++++++++++++++----- drivers/hid/wacom_wac.h | 1 + 2 files changed, 26 insertions(+), 5 deletions(-) commit b792e64021ecdefd27b84eb235d59b0476d4255c Author: Greg Kroah-Hartman Date: Thu Jun 13 15:34:39 2019 +0200 drm: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Because there is no need to check these functions, a number of local functions can be made to return void to simplify things as nothing can fail. Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190613133439.GA6715@kroah.com drivers/gpu/drm/drm_connector.c | 6 +---- drivers/gpu/drm/drm_crtc.c | 4 +-- drivers/gpu/drm/drm_debugfs.c | 53 +++++++++------------------------------ drivers/gpu/drm/drm_debugfs_crc.c | 28 ++++++--------------- drivers/gpu/drm/drm_drv.c | 5 ---- drivers/gpu/drm/drm_internal.h | 20 ++++++--------- 6 files changed, 29 insertions(+), 87 deletions(-) commit 2d3c72ed504196edb2f22a08cb03a0f9fb7e564f Author: Jason Gunthorpe Date: Mon Jun 10 16:49:11 2019 -0300 rdma: Remove nes This driver was first merged over 10 years ago and has not seen major activity by the authors in the last 7 years. However, in that time it has been patched 150 times to adapt it to changing kernel APIs. Further, the hardware has several issues, like not supporting 64 bit DMA, that make it rather uninteresting for use with modern systems and RDMA. Signed-off-by: Jason Gunthorpe Reviewed-by: Leon Romanovsky Reviewed-by: Shiraz Saleem Signed-off-by: Doug Ledford Documentation/ABI/stable/sysfs-class-infiniband | 17 - MAINTAINERS | 8 - drivers/infiniband/Kconfig | 1 - drivers/infiniband/hw/Makefile | 1 - drivers/infiniband/hw/nes/Kconfig | 15 - drivers/infiniband/hw/nes/Makefile | 3 - drivers/infiniband/hw/nes/nes.c | 1205 ------- drivers/infiniband/hw/nes/nes.h | 574 ---- drivers/infiniband/hw/nes/nes_cm.c | 3992 ----------------------- drivers/infiniband/hw/nes/nes_cm.h | 470 --- drivers/infiniband/hw/nes/nes_context.h | 193 -- drivers/infiniband/hw/nes/nes_hw.c | 3887 ---------------------- drivers/infiniband/hw/nes/nes_hw.h | 1380 -------- drivers/infiniband/hw/nes/nes_mgt.c | 1155 ------- drivers/infiniband/hw/nes/nes_mgt.h | 97 - drivers/infiniband/hw/nes/nes_nic.c | 1870 ----------- drivers/infiniband/hw/nes/nes_utils.c | 913 ------ drivers/infiniband/hw/nes/nes_verbs.c | 3721 --------------------- drivers/infiniband/hw/nes/nes_verbs.h | 198 -- 19 files changed, 19700 deletions(-) commit 855b5e01c0732d66c306cdd5215c3337e5311899 Author: Jaroslav Kysela Date: Thu Jun 13 15:09:01 2019 +0200 ALSA: hda/hdmi - consider eld_valid also in sync_eld_via_acomp() In the commit 7f641e26a6df9269cb25dd7a4b0a91d6586ed441 (ALSA: hda/hdmi - Consider eld_valid when reporting jack event) the eld_valid check was added for the jack event reports. Do the same in sync_eld_via_acomp() function. Apparently, it is required for the NVIDIA proprietary driver (monitor presence reported first, but ELD is available later). Signed-off-by: Jaroslav Kysela Signed-off-by: Takashi Iwai sound/pci/hda/patch_hdmi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5b038dcf9d0aa0b1e8f2a8f973441b4f66d325f2 Author: Linus Walleij Date: Mon Jun 10 01:13:39 2019 +0200 drm/bridge: analogix_dp: Convert to GPIO descriptors This converts the Analogix display port to use GPIO descriptors instead of DT-extracted numbers. Cc: Douglas Anderson Cc: Sean Paul Cc: Marek Szyprowski Cc: Enric Balletbo i Serra Signed-off-by: Linus Walleij Reviewed-by: Enric Balletbo i Serra Tested-by: Marek Szyprowski Reviewed-by: Andrzej Hajda Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190609231339.22136-1-linus.walleij@linaro.org drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 28 ++++++++++------------ drivers/gpu/drm/bridge/analogix/analogix_dp_core.h | 4 +++- drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c | 14 +++++------ 3 files changed, 23 insertions(+), 23 deletions(-) commit eb19e8479b96adb01ddb69fdc2010101f3f0ddf5 Author: Linus Walleij Date: Mon Jun 10 00:32:54 2019 +0200 drm/bridge: analogix-anx78xx: Drop of_gpio.h include This include is only used for some gpio drivers and consumers that look up GPIO numbers directly from the device tree. This driver does not use it and only needs . Delete the unused include. Cc: Enric Balletbo i Serra Cc: Jose Abreu Signed-off-by: Linus Walleij Reviewed-by: Enric Balletbo i Serra Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190609223254.8523-1-linus.walleij@linaro.org drivers/gpu/drm/bridge/analogix-anx78xx.c | 1 - 1 file changed, 1 deletion(-) commit 1de287512dfd64fdcfa5f6231d7c0b1f85483723 Author: Hariprasad Kelam Date: Sat May 25 23:29:37 2019 +0530 drm/bridge: analogix_dp: possible condition with no effect (if == else) fix below warning reported by coccicheck ./drivers/gpu/drm/bridge/analogix/analogix_dp_core.c:1414:6-8: WARNING: possible condition with no effect (if == else) Signed-off-by: Hariprasad Kelam Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190525175937.GA29368@hari-Inspiron-1545 drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 2 -- 1 file changed, 2 deletions(-) commit 2a08f2b8990ce59f9c1e4c2ede1702e9635c2a60 Author: Greg Kroah-Hartman Date: Thu Jun 13 13:57:17 2019 +0200 panel: rocktech: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: "Guido Günther" Cc: Thierry Reding Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Greg Kroah-Hartman Reviewed-by: Guido Günther Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190613115717.GB26335@kroah.com drivers/gpu/drm/panel/panel-rocktech-jh057n00900.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) commit 90e73491d5db182407ce6b44bf4c88e7fbe706c1 Author: Greg Kroah-Hartman Date: Thu Jun 13 13:44:55 2019 +0200 vga_switcheroo: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Also, because there is no need to save the file dentry, remove the local variable and just recursively delete the whole directory when shutting down. Cc: Lukas Wunner Cc: David Airlie Cc: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: dri-devel@lists.freedesktop.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190613114455.GA13119@kroah.com drivers/gpu/vga/vga_switcheroo.c | 34 +++++++--------------------------- 1 file changed, 7 insertions(+), 27 deletions(-) commit d9c53aa440b332059f7f0ce3f7868ff1dc58c62c Author: Logan Gunthorpe Date: Thu May 23 16:31:00 2019 -0600 NTB: Describe the ntb_msi_test client in the documentation. Add a blurb in Documentation/ntb.txt to describe the ntb_msi_test tool's debugfs interface. Similar to the (out of date) ntb_tool description. Signed-off-by: Logan Gunthorpe Signed-off-by: Jon Mason Documentation/ntb.txt | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 2b0569b3b7e6eac7a0c5aef741aeebe5675e1640 Author: Logan Gunthorpe Date: Thu May 23 16:30:59 2019 -0600 NTB: Add MSI interrupt support to ntb_transport Introduce the module parameter 'use_msi' which, when set, uses MSI interrupts instead of doorbells for each queue pair (QP). The parameter is only available if NTB MSI support is configured into the kernel. We also require there to be more than one memory window (MW) so that an extra one is available to forward the APIC region. To use MSIs, we request one interrupt per QP and forward the MSI address and data to the peer using scratch pad registers (SPADS) above the MW SPADS. (If there are not enough SPADS the MSI interrupt will not be used.) Once registered, we simply use ntb_msi_peer_trigger and the receiving ISR simply queues up the rxc_db_work for the queue. This addition can significantly improve performance of ntb_transport. In a simple, untuned, apples-to-apples comparision using ntb_netdev and iperf with switchtec hardware, I see 3.88Gb/s without MSI interrupts and 14.1Gb/s wit MSI, which is a more than 3x improvement. Signed-off-by: Logan Gunthorpe Cc: Dave Jiang Cc: Allen Hubbe Signed-off-by: Jon Mason drivers/ntb/ntb_transport.c | 169 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 168 insertions(+), 1 deletion(-) commit 76ab785e7396796118016c8bc9fd62b58fe422ea Author: Logan Gunthorpe Date: Thu May 23 16:30:58 2019 -0600 NTB: Add ntb_msi_test support to ntb_test When the ntb_msi_test module is available, the test code will trigger each of the interrupts and ensure the corresponding occurrences files gets incremented. Signed-off-by: Logan Gunthorpe Cc: Dave Jiang Cc: Allen Hubbe Signed-off-by: Jon Mason tools/testing/selftests/ntb/ntb_test.sh | 54 +++++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 2 deletions(-) commit a6bed7a541651f5845fba325e311f78c6a4a880a Author: Logan Gunthorpe Date: Thu May 23 16:30:57 2019 -0600 NTB: Introduce NTB MSI Test Client Introduce a tool to test NTB MSI interrupts similar to the other NTB test tools. This tool creates a debugfs directory for each NTB device with the following files: port irqX_occurrences peerX/port peerX/count peerX/trigger The 'port' file tells the user the local port number and the 'occurrences' files tell the number of local interrupts that have been received for each interrupt. For each peer, the 'port' file and the 'count' file tell you the peer's port number and number of interrupts respectively. Writing the interrupt number to the 'trigger' file triggers the interrupt handler for the peer which should increment their corresponding 'occurrences' file. The 'ready' file indicates if a peer is ready, writing to this file blocks until it is ready. The module parameter num_irqs can be used to set the number of local interrupts. By default this is 4. This is only limited by the number of unused MSI interrupts registered by the hardware (this will require support of the hardware driver) and there must be at least 2*num_irqs + 1 spads registers available. Signed-off-by: Logan Gunthorpe Cc: Dave Jiang Cc: Allen Hubbe Signed-off-by: Jon Mason drivers/ntb/test/Kconfig | 9 + drivers/ntb/test/Makefile | 1 + drivers/ntb/test/ntb_msi_test.c | 433 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 443 insertions(+) commit 26b3a37b928457ba2cd98eaf6d7b0feca5a30fa6 Author: Logan Gunthorpe Date: Thu May 23 16:30:56 2019 -0600 NTB: Introduce MSI library The NTB MSI library allows passing MSI interrupts across a memory window. This offers similar functionality to doorbells or messages except will often have much better latency and the client can potentially use significantly more remote interrupts than typical hardware provides for doorbells. (Which can be important in high-multiport setups.) The library utilizes one memory window per peer and uses the highest index memory windows. Before any ntb_msi function may be used, the user must call ntb_msi_init(). It may then setup and tear down the memory windows when the link state changes using ntb_msi_setup_mws() and ntb_msi_clear_mws(). The peer which receives the interrupt must call ntb_msim_request_irq() to assign the interrupt handler (this function is functionally similar to devm_request_irq()) and the returned descriptor must be transferred to the peer which can use it to trigger the interrupt. The triggering peer, once having received the descriptor, can trigger the interrupt by calling ntb_msi_peer_trigger(). Signed-off-by: Logan Gunthorpe Cc: Dave Jiang Cc: Allen Hubbe Signed-off-by: Jon Mason drivers/ntb/Kconfig | 11 ++ drivers/ntb/Makefile | 3 +- drivers/ntb/msi.c | 415 +++++++++++++++++++++++++++++++++++++++++++++++++++ include/linux/ntb.h | 73 +++++++++ 4 files changed, 501 insertions(+), 1 deletion(-) commit d217e07b32a6750e44f529e0218898c024b2c637 Author: Logan Gunthorpe Date: Thu May 23 16:30:55 2019 -0600 NTB: Rename ntb.c to support multiple source files in the module The kbuild system does not support having multiple source files in a module if one of those source files has the same name as the module. Therefore, we must rename ntb.c to core.c, while the module remains ntb.ko. This is similar to the way the nvme modules are structured. Signed-off-by: Logan Gunthorpe Cc: Dave Jiang Cc: Allen Hubbe Signed-off-by: Jon Mason drivers/ntb/Makefile | 2 ++ drivers/ntb/{ntb.c => core.c} | 0 2 files changed, 2 insertions(+) commit 5f1b1f065c791de71017502ed3ba46779e231d9b Author: Logan Gunthorpe Date: Thu May 23 16:30:54 2019 -0600 NTB: Introduce functions to calculate multi-port resource index When using multi-ports each port uses resources (dbs, msgs, mws, etc) on every other port. Creating a mapping for these resources such that each port has a corresponding resource on every other port is a bit tricky. Introduce the ntb_peer_resource_idx() function for this purpose. It returns the peer resource number that will correspond with the local peer index on the remote peer. Also, introduce ntb_peer_highest_mw_idx() which will use ntb_peer_resource_idx() but return the MW index starting with the highest index and working down. Signed-off-by: Logan Gunthorpe Cc: Dave Jiang Cc: Allen Hubbe Signed-off-by: Jon Mason include/linux/ntb.h | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) commit 246a42c51bc5dd247629f86c87d5e1b7628343c4 Author: Logan Gunthorpe Date: Thu May 23 16:30:53 2019 -0600 NTB: Introduce helper functions to calculate logical port number This patch introduces the "Logical Port Number" which is similar to the "Port Number" in that it enumerates the ports in the system. The original (or Physical) "Port Number" can be any number used by the hardware to uniquely identify a port in the system. The "Logical Port Number" enumerates all ports in the system from 0 to the number of ports minus one. For example a system with 5 ports might have the following port numbers which would be enumerated thusly: Port Number: 1 2 5 7 116 Logical Port Number: 0 1 2 3 4 The logical port number is useful when calculating which resources to use for which peers. So we thus define two helper functions: ntb_logical_port_number() and ntb_peer_logical_port_number() which provide the "Logical Port Number" for the local port and any peer respectively. Signed-off-by: Logan Gunthorpe Cc: Dave Jiang Cc: Allen Hubbe Cc: Serge Semin Signed-off-by: Jon Mason include/linux/ntb.h | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) commit fcdf8e95fa3b97097bd4e200f0ee04df85b04d99 Author: Logan Gunthorpe Date: Thu May 23 16:30:52 2019 -0600 PCI/switchtec: Add module parameter to request more interrupts Seeing the we want to use more interrupts in the NTB MSI code we need to be able allocate more (sometimes virtual) interrupts in the switchtec driver. Therefore add a module parameter to request to allocate additional interrupts. This puts virtually no limit on the number of MSI interrupts available to NTB clients. Signed-off-by: Logan Gunthorpe Cc: Bjorn Helgaas Signed-off-by: Jon Mason drivers/pci/switch/switchtec.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit d7cc609fb679e11dc2b00cbe6c50cbd37ec4bfa2 Author: Logan Gunthorpe Date: Thu May 23 16:30:51 2019 -0600 PCI/MSI: Support allocating virtual MSI interrupts For NTB devices, we want to be able to trigger MSI interrupts through a memory window. In these cases we may want to use more interrupts than the NTB PCI device has available in its MSI-X table. We allow for this by creating a new 'virtual' interrupt. These interrupts are allocated as usual but are not programmed into the MSI-X table (as there may not be space for them). The MSI address and data will then handled through an NTB MSI library introduced later in this series. Signed-off-by: Logan Gunthorpe Acked-by: Bjorn Helgaas Signed-off-by: Jon Mason drivers/pci/msi.c | 54 ++++++++++++++++++++++++++++++++++++++++++++--------- include/linux/msi.h | 8 ++++++++ include/linux/pci.h | 9 +++++++++ 3 files changed, 62 insertions(+), 9 deletions(-) commit a944ccc3b0aedb7f3a24b8c90624fe182e8a8851 Author: Joey Zhang Date: Thu Jun 6 15:09:44 2019 +0800 ntb_hw_switchtec: Fix setup MW with failure bug Switchtec does not support setting multiple MWs simultaneously. The driver takes a hardware lock to ensure that two peers are not doing this simultaneously and it fails if someone else takes the lock. In most cases, this is fine as clients only setup the MWs once on one side of the link. However, there's a race condition when a re-initialization is caused by a link event. The driver will re-setup the shared memory window asynchronously and this races with the client setting up it's memory windows on the link up event. To fix this we ensure do the entire initialization in a work queue and signal the client once it's done. Signed-off-by: Joey Zhang Signed-off-by: Wesley Sheng Signed-off-by: Jon Mason drivers/ntb/hw/mscc/ntb_hw_switchtec.c | 66 ++++++++++++++++++++-------------- 1 file changed, 39 insertions(+), 27 deletions(-) commit f0f43e766bdb314b3816ac891fb18cea5de4123d Author: Wesley Sheng Date: Thu Jun 6 15:09:43 2019 +0800 ntb_hw_switchtec: Skip unnecessary re-setup of shared memory window for crosslink case In case of NTB crosslink topology, the setting of shared memory window in the virtual partition doesn't reset on peer's reboot. So skip the unnecessary re-setup of shared memory window for that case. Signed-off-by: Wesley Sheng Signed-off-by: Jon Mason drivers/ntb/hw/mscc/ntb_hw_switchtec.c | 3 +++ 1 file changed, 3 insertions(+) commit 28e339f100e34608a8f40c5ec6a6f8ef7b826028 Author: Joey Zhang Date: Thu Jun 6 15:09:42 2019 +0800 ntb_hw_switchtec: Remove redundant steps of switchtec_ntb_reinit_peer() function When a re-initialization is caused by a link event, the driver will re-setup the shared memory window. But at that time, the shared memory is still valid, and it's unnecessary to free, reallocate and then initialize it again. We only need to reconfigure the hardware registers. Remove the redundant steps from switchtec_ntb_reinit_peer() function. Signed-off-by: Joey Zhang Signed-off-by: Wesley Sheng Reviewed-by: Logan Gunthorpe Signed-off-by: Jon Mason drivers/ntb/hw/mscc/ntb_hw_switchtec.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 18c8c0954d15105b02f7d2f556b9eafae426871f Author: Wesley Sheng Date: Tue Apr 30 18:04:29 2019 +0800 NTB: correct ntb_dev_ops and ntb_dev comment typos The comment for ntb_dev_ops and ntb_dev incorrectly referred to ntb_ctx_ops and ntb_device. Signed-off-by: Wesley Sheng Reviewed-by: Logan Gunthorpe Signed-off-by: Jon Mason include/linux/ntb.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1e590dec3ed6852dba6fcbcc7e5300c893914fd7 Author: Dan Carpenter Date: Mon Mar 25 12:23:26 2019 +0300 NTB: amd: Silence shift wrapping warning in amd_ntb_db_vector_mask() This code triggers a Smatch warning: drivers/ntb/hw/amd/ntb_hw_amd.c:336 amd_ntb_db_vector_mask() warn: should '(1 << db_vector)' be a 64 bit type? I don't think "db_vector" can be higher than 16 so this doesn't affect runtime, but it's nice to silence the static checker warning and we might increase "ndev->db_count" in the future. Signed-off-by: Dan Carpenter Acked-by: Shyam Sundar S K Signed-off-by: Jon Mason drivers/ntb/hw/amd/ntb_hw_amd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ff148d8ac53e59802645bd3200c811620317eb9f Author: Dan Carpenter Date: Mon Mar 25 12:17:26 2019 +0300 ntb_hw_switchtec: potential shift wrapping bug in switchtec_ntb_init_sndev() This code triggers a Smatch warning: drivers/ntb/hw/mscc/ntb_hw_switchtec.c:884 switchtec_ntb_init_sndev() warn: should '(1 << sndev->peer_partition)' be a 64 bit type? The "part_map" and "tpart_vec" variables are u64 type so this seems like a valid warning. Fixes: 3df54c870f52 ("ntb_hw_switchtec: Allow using Switchtec NTB in multi-partition setups") Signed-off-by: Dan Carpenter Reviewed-by: Logan Gunthorpe Signed-off-by: Jon Mason drivers/ntb/hw/mscc/ntb_hw_switchtec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 51cb8dbf13246a0b144bff01d7d617efe550a055 Author: Logan Gunthorpe Date: Tue Feb 19 12:56:36 2019 -0700 NTB: ntb_transport: Ensure qp->tx_mw_dma_addr is initaliazed Dan Carpenter's static checker reported: drivers/ntb/ntb_transport.c:1926 ntb_transport_create_queue() error: we previously assumed 'qp->tx_dma_chan' could be null (see line 1872) This is because the tx_mw_dma_addr is uninitialized in this function and may be incorrectly released using a NULL DMA channel. In practice this bug will not likely be seen. I'd guess you could hit this if you loaded ntb_netdev with use_dma=True, then unloaded it and loaded it again after setting the module parameter to use_dma=False. To fix this, we simply ensure that tx_mw_dma_addr is always initialized to zero. This is the safest in case any other part of the code operates on it if it is non-zero. Fixes: c59666bb32b9 ("NTB: ntb_transport: Ensure the destination buffer is mapped for TX DMA") Signed-off-by: Logan Gunthorpe Cc: Dan Carpenter Signed-off-by: Jon Mason drivers/ntb/ntb_transport.c | 1 + 1 file changed, 1 insertion(+) commit a5c3666f1c32714d8ee8735a129a9f13773135ba Author: Sanjay R Mehta Date: Fri Feb 15 09:21:46 2019 +0000 NTB: ntb_hw_amd: set peer limit register As per amd ntb spec it says that peer limit register must be programmed Signed-off-by: Sanjay R Mehta Acked-by: Allen Hubbe Acked-by: Logan Gunthorpe Acked-by: Serge Semin Signed-off-by: Jon Mason drivers/ntb/hw/amd/ntb_hw_amd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 12c023d7c32ae14254c8903f0466d37dea6d21ed Author: Sanjay R Mehta Date: Fri Feb 15 09:21:19 2019 +0000 NTB: ntb_perf: Clear stale values in doorbell and command SPAD register when ntb_perf is unloaded, the command scratchpad register still retains the last initialized value of PERF_CMD_INVAL. When ntb_perf is re-loaded and reads peer command scratchpad register and it mis interprets the peer state as initialized. To avoid this, clearing the local side command scratchpad register in perf_disable_service Signed-off-by: Sanjay R Mehta Acked-by: Allen Hubbe Acked-by: Logan Gunthorpe Acked-by: Serge Semin Signed-off-by: Jon Mason drivers/ntb/test/ntb_perf.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit b1ee5998a5d2bb16fb2bb9a03a30a83a55012b92 Author: Sanjay R Mehta Date: Fri Feb 15 09:20:30 2019 +0000 NTB: ntb_perf: Disable NTB link after clearing peer XLAT registers If ntb link disabled before clearing peer's XLAT register, the clearing won't have any effect since the link is already down. So modified the sequence so that the link is down only towards the end of the function after clearing the XLAT register Signed-off-by: Sanjay R Mehta Acked-by: Allen Hubbe Acked-by: Logan Gunthorpe Acked-by: Serge Semin Signed-off-by: Jon Mason drivers/ntb/test/ntb_perf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8b2f033631c2ec735c10846030fad44f3bfdaf07 Author: Sanjay R Mehta Date: Fri Feb 15 09:20:07 2019 +0000 NTB: ntb_perf: Increased the number of message retries to 1000 while waiting for the peer ntb_perf to initialize scratchpad registers, local side ntb_perf might have already exhausted the maximum number of retries which is currently set to 500. To avoid this and to give little more time to the peer ntb_perf for scratchpad initialization, increased the number of retries to 1000 Signed-off-by: Sanjay R Mehta Acked-by: Allen Hubbe Acked-by: Logan Gunthorpe Acked-by: Serge Semin Signed-off-by: Jon Mason drivers/ntb/test/ntb_perf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c56b4ef1cf0c2a2ee2593ea6f3c0b3198af11f48 Author: YueHaibing Date: Wed Mar 20 22:08:12 2019 +0800 ntb: intel: Make intel_ntb3_peer_db_addr static Fix sparse warning: drivers/ntb/hw/intel/ntb_hw_gen3.c:535:5: warning: symbol 'intel_ntb3_peer_db_addr' was not declared. Should it be static? Signed-off-by: YueHaibing Acked-by: Dave Jiang Signed-off-by: Jon Mason drivers/ntb/hw/intel/ntb_hw_gen3.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit dad4afe746b3e73dbc8ef8d60a3645a78a919026 Author: Kimberly Brown Date: Fri Jun 7 13:40:41 2019 -0400 f2fs: replace ktype default_attrs with default_groups The kobj_type default_attrs field is being replaced by the default_groups field. Replace the default_attrs fields in f2fs_sb_ktype and f2fs_feat_ktype with default_groups. Use the ATTRIBUTE_GROUPS macro to create f2fs_groups and f2fs_feat_groups. Signed-off-by: Kimberly Brown Reviewed-by: Chao Yu Signed-off-by: Greg Kroah-Hartman fs/f2fs/sysfs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit c9c5b5e1565d6166e8d477d598e82652d0d7542d Author: Kimberly Brown Date: Tue May 7 21:48:05 2019 -0400 dlm: Replace default_attrs in dlm_ktype with default_groups The kobj_type default_attrs field is being replaced by the default_groups field, so replace the default_attrs field in dlm_ktype with default_groups. Use the ATTRIBUTE_GROUPS macro to create dlm_groups. Signed-off-by: Kimberly Brown Signed-off-by: Greg Kroah-Hartman fs/dlm/lockspace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 59137a93f3af3ffb31c5c538357486df3d2e40d9 Author: Kimberly Brown Date: Wed May 8 16:07:48 2019 -0400 ext4: replace ktype default_attrs with default_groups The kobj_type default_attrs field is being replaced by the default_groups field. Replace the default_attrs field in ext4_sb_ktype and ext4_feat_ktype with default_groups. Use the ATTRIBUTE_GROUPS macro to create ext4_groups and ext4_feat_groups. Signed-off-by: Kimberly Brown Signed-off-by: Greg Kroah-Hartman fs/ext4/sysfs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit ef254d13f1783793747c639d8e79843d5caf995a Author: Kimberly Brown Date: Fri Jun 7 14:23:00 2019 -0400 gfs2: replace ktype default_attrs with default_groups The kobj_type default_attrs field is being replaced by the default_groups field. Replace the default_attrs field in gfs2_ktype with default_groups. Use the ATTRIBUTE_GROUPS macro to create gfs2_groups. Signed-off-by: Kimberly Brown Signed-off-by: Greg Kroah-Hartman fs/gfs2/sys.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 921721738f4994b54f916f9a3bdd5dfdf26f753c Author: Thomas Zimmermann Date: Thu Jun 13 09:30:41 2019 +0200 drm: Remove functions with kmap-object argument from GEM VRAM helpers The GEM VRAM functions with kmap-object argument are not required any longer. Remove them. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20190613073041.29350-10-tzimmermann@suse.de drivers/gpu/drm/drm_gem_vram_helper.c | 50 ++++++----------------------------- include/drm/drm_gem_vram_helper.h | 4 --- 2 files changed, 8 insertions(+), 46 deletions(-) commit 57c84d5c9348bda5e9129bc4e4e567546915ad8c Author: Thomas Zimmermann Date: Thu Jun 13 09:30:40 2019 +0200 drm: Remove lock interfaces from GEM VRAM helpers The lock functions and the locked-pin/unpin functions of GEM VRAM are not required any longer. Remove them. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20190613073041.29350-9-tzimmermann@suse.de drivers/gpu/drm/drm_gem_vram_helper.c | 109 ---------------------------------- include/drm/drm_gem_vram_helper.h | 5 -- 2 files changed, 114 deletions(-) commit 94dc57b1039979b3669b36fc83e8b97cabc149ef Author: Thomas Zimmermann Date: Thu Jun 13 09:30:39 2019 +0200 drm/mgag200: Rewrite cursor handling The cursor handling in mgag200 is complicated to understand. It touches a number of different BOs, but doesn't really use all of them. Rewriting the cursor update reduces the amount of cursor state. There are two BOs for double-buffered HW updates. The source BO updates the one that is currently not displayed and then switches buffers. Explicit BO locking has been removed from the code. BOs are simply pinned and unpinned in video RAM. v2: * pin cursor BOs to current location Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20190613073041.29350-8-tzimmermann@suse.de drivers/gpu/drm/mgag200/mgag200_cursor.c | 165 +++++++++++++------------------ drivers/gpu/drm/mgag200/mgag200_drv.h | 3 - drivers/gpu/drm/mgag200/mgag200_main.c | 4 +- 3 files changed, 69 insertions(+), 103 deletions(-) commit f4ce5af71bc267a741672bf66467dd70282ff7ef Author: Thomas Zimmermann Date: Thu Jun 13 09:30:38 2019 +0200 drm/mgag200: Pin framebuffer BO during dirty update Another explicit lock operation of a GEM VRAM BO is located in mgag200's framebuffer update code. Instead of locking the BO, we pin it to wherever it is. v2: * update with pin flag of 0 Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20190613073041.29350-7-tzimmermann@suse.de drivers/gpu/drm/mgag200/mgag200_fb.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) commit da460a29c28cac865b74f1ad578cf6fc4b18649f Author: Thomas Zimmermann Date: Thu Jun 13 09:30:37 2019 +0200 drm/ast: Pin framebuffer BO during dirty update Another explicit lock operation of a GEM VRAM BO is located in AST's framebuffer update code. Instead of locking the BO, we pin it to wherever it is. v2: * update with pin flag of 0 Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20190613073041.29350-6-tzimmermann@suse.de drivers/gpu/drm/ast/ast_fb.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 27072152075e7542fb52a64054fae921b87f9085 Author: Thomas Zimmermann Date: Thu Jun 13 09:30:36 2019 +0200 drm/ast: Pin and map cursor source BO during update The ast driver used to lock the cursor source BO during updates. Locking should be done internally by the BO's implementation, so we pin it instead to system memory. The mapping information is also stored in the BO. No need to have an extra argument to the kmap function. v2: * pin cursor BOs to current location Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20190613073041.29350-5-tzimmermann@suse.de drivers/gpu/drm/ast/ast_mode.c | 37 ++++++++++++++++--------------------- 1 file changed, 16 insertions(+), 21 deletions(-) commit ff771bb1d0683973ab2efc80927684004a8013d2 Author: Thomas Zimmermann Date: Thu Jun 13 09:30:35 2019 +0200 drm/ast: Remove obsolete or unused cursor state The ast driver's data structures store unused or uncecessary cursor state. Most of the cursor state is already stored elsewhere and can be retrieved when necessary. Remove the obsolete fields and adapt users accordingly. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20190613073041.29350-4-tzimmermann@suse.de drivers/gpu/drm/ast/ast_drv.h | 7 ------- drivers/gpu/drm/ast/ast_mode.c | 31 +++++++++++++++++-------------- 2 files changed, 17 insertions(+), 21 deletions(-) commit 4d7553c3ed2c4614eb030fcf0ed904d639bb687e Author: Thomas Zimmermann Date: Thu Jun 13 09:30:34 2019 +0200 drm/ast: Unpin cursor BO during cleanup The unpin operation was missing from ast_cursor_fini(). Fixed now. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20190613073041.29350-3-tzimmermann@suse.de drivers/gpu/drm/ast/ast_mode.c | 1 + 1 file changed, 1 insertion(+) commit a6c3464f69cf5a8a31eb31cc436e7dbd325b8ff9 Author: Thomas Zimmermann Date: Thu Jun 13 09:30:33 2019 +0200 drm/gem-vram: Support pinning buffers to current location Pinning a buffer prevents it from being moved to a different memory location. For some operations, such as buffer updates, it is not important where the buffer is located. Setting the pin function's pl_flag argument to 0 will pin the buffer to whereever it is stored. v2: * document pin flags in PRIME pin helper Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20190613073041.29350-2-tzimmermann@suse.de drivers/gpu/drm/drm_gem_vram_helper.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit ae9924667a7ee91d49c91ebbc076451ca6b6293a Author: Frank Li Date: Wed May 1 18:43:35 2019 +0000 MAINTAINERS: Add maintainer entry for the imx8 DDR PMU driver Frank Li wrote the imx8 DDR PMU driver and has access to the hardware, so add him as maintainer for the files in question. Signed-off-by: Frank Li [will: fixed case of title] Signed-off-by: Will Deacon MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) commit 9a66d36cc7ace8062bd703d1edfb99437a2ddf2b Author: Frank Li Date: Wed May 1 18:43:29 2019 +0000 drivers/perf: imx_ddr: Add DDR performance counter support to perf Add DDR performance monitor support for iMX8QXP. The PMU consists of 3 programmable event counters and a single dedicated cycle counter. Example usage: $ perf stat -a -e \ imx8_ddr0/read-cycles/,imx8_ddr0/write-cycles/,imx8_ddr0/precharge/ ls - or - $ perf stat -a -e \ imx8_ddr0/cycles/,imx8_ddr0/read-access/,imx8_ddr0/write-access/ ls Other events are supported, and advertised via perf list. Reviewed-by: Andrey Smirnov Signed-off-by: Frank Li [will: rewrote commit message/kconfig and used #defines for dev/cpuhp names] Signed-off-by: Will Deacon drivers/perf/Kconfig | 8 + drivers/perf/Makefile | 1 + drivers/perf/fsl_imx8_ddr_perf.c | 554 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 563 insertions(+) commit 7c11bb40f12544ff24039b1dc178ffc38d491415 Author: Nishka Dasgupta Date: Wed Jun 12 23:34:39 2019 +0530 staging: rtl8723bs: Remove rtw_btcoex_Initialize() Remove function rtw_btcoex_Initialize as the only thing it does is call hal_btcoex_Initialize. Modify call sites accordingly. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_btcoex.c | 6 ------ drivers/staging/rtl8723bs/include/rtw_btcoex.h | 1 - drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 3 ++- 3 files changed, 2 insertions(+), 8 deletions(-) commit eddd422b54acc94aea5842caef4fd2a98c2940ab Author: Nishka Dasgupta Date: Wed Jun 12 23:34:38 2019 +0530 staging: rtl8723bs: hal: Replace function _InitQueuePriority() Remove function _InitQueuePriority as all it does it call _InitNormalChipQueuePriority. Rename _InitNormalChipQueuePriority to _InitQueuePriority for compatibility with call site. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/sdio_halinit.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 7ee3501de81615267a5ccd24f1cef46a65a435f0 Author: Nishka Dasgupta Date: Wed Jun 12 23:34:37 2019 +0530 staging: rtl8723bs: Fix typo in function name Change name of function hal_btcoex_Hanlder to hal_btcoex_Handler. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_btcoex.c | 2 +- drivers/staging/rtl8723bs/hal/hal_btcoex.c | 2 +- drivers/staging/rtl8723bs/include/hal_btcoex.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit f4db969efa80552f64a38b8b004ed7c8f91cc5c4 Author: Nishka Dasgupta Date: Wed Jun 12 23:34:36 2019 +0530 staging: rtl8723bs: Remove function rtw_set_scan_deny_timer_hdl() Remove function rtw_set_scan_deny_timer_hdl as all it does is call rtw_clear_scan_deny. Modify call sites of rtw_set_scan_deny_timer_hdl to call rtw_clear_scan_deny instead. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_mlme.c | 5 ----- drivers/staging/rtl8723bs/include/rtw_mlme.h | 1 - drivers/staging/rtl8723bs/os_dep/mlme_linux.c | 2 +- 3 files changed, 1 insertion(+), 7 deletions(-) commit 2b524fc4ffd398c7a4d82d8212b014326245b342 Author: Nishka Dasgupta Date: Wed Jun 12 23:34:35 2019 +0530 staging: rtl8723bs: Replace function rtw_free_network_queue() Remove function rtw_free_network_queue as all it does is call _rtw_free_network_queue. Rename _rtw_free_network_queue to rtw_free_network_queue to maintain compatibility with call sites. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_mlme.c | 8 +------- drivers/staging/rtl8723bs/include/rtw_mlme.h | 2 -- 2 files changed, 1 insertion(+), 9 deletions(-) commit 534415d29c0c4d85ec73e7b40915f13f63c747f9 Author: Nishka Dasgupta Date: Wed Jun 12 23:34:34 2019 +0530 staging: rtl8723bs: core: Remove wrapper functions Remove function power_saving_wk_hdl as all it does is call rtw_ps_processor. Edit call sites accordingly. Remove function reset_securitypriv_hdl as all it does is call rtw_reset_securitypriv. Modify call sites accordingly. Remove function free_assoc_resources_hdl as all it does is call rtw_free_assoc_resources with one extra constant argument, and the former is only called once. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_cmd.c | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) commit 183eb53d25a30acd2f688f581d352ddc9d572d32 Author: Nishka Dasgupta Date: Wed Jun 12 23:34:33 2019 +0530 staging: rtl8723bs: core: Remove function enable_rate_adaptive() Remove function enable_rate_adaptive as all it does is call Update_RA_Entry. Modify the single callsite of enable_rate_adaptive to call Update_RA_Entry directly instead. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_wlan_util.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit eb569cc0d91651ccf0bec3b83ea440cac55ce535 Author: Nishka Dasgupta Date: Wed Jun 12 23:34:32 2019 +0530 staging: rtl8723bs: core: Replace function Set_MSR() Remove function Set_NETYPE0_MSR as it only has one line and it is only called by one other function, Set_MSR. Replace contents of Set_MSR with the contents of Set_NETYPE0_MSR as Set_MSR does nothing except call Set_NETYPE0_MSR. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 2 +- drivers/staging/rtl8723bs/core/rtw_wlan_util.c | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) commit 65699f341f1575a60670164d3a910505bfaa1b5f Author: Nishka Dasgupta Date: Wed Jun 12 23:34:31 2019 +0530 staging: rtl8723bs: core: Remove eeprom_write16() Remove unused function eeprom_write16. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_eeprom.c | 62 ----------------------------- 1 file changed, 62 deletions(-) commit a8c14146084ce7f75b28b39c04f1f2c3ac6efb3e Author: Nishka Dasgupta Date: Wed Jun 12 23:34:30 2019 +0530 staging: rtl8723bs: core: Remove function read_eeprom_content() Remove unused function read_eeprom_content. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_eeprom.c | 11 ----------- 1 file changed, 11 deletions(-) commit 67c4f7fc5dd30897af5fa3b219dc5cbbddbb61bb Author: Nishka Dasgupta Date: Wed Jun 12 23:34:29 2019 +0530 staging: rtl8723bs: core: Remove function eeprom_read_sz() Remove unused function eeprom_read_sz. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_eeprom.c | 47 ----------------------------- 1 file changed, 47 deletions(-) commit 232034b3425342b0bb465760489b12fac26fef96 Author: Nishka Dasgupta Date: Wed Jun 12 12:20:03 2019 +0530 staging: rtl8188eu: Change type of rtw_get_sec_ie() Change return type of function rtw_get_sec_ie from int to void and remove its return statement as the return value is never stored, checked or otherwise used. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 4 +--- drivers/staging/rtl8188eu/include/ieee80211.h | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) commit bb5ce9a017b851190300bf01b73eb96fc528b6c4 Author: Dan Carpenter Date: Wed May 29 14:34:58 2019 +0300 drm/mcde: Fix an uninitialized variable We never set "vblank" to "false". Current versions of GCC will initialize it to zero automatically at certain optimization levels so that's probably why this didn't show up in testing. Fixes: 5fc537bfd000 ("drm/mcde: Add new driver for ST-Ericsson MCDE") Signed-off-by: Dan Carpenter Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20190529113458.GG19119@mwanda drivers/gpu/drm/mcde/mcde_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bb3982b42e797b1dd7197c4142ccd5231d0109ac Author: Christian Gromm Date: Wed Jun 12 11:30:29 2019 +0200 staging: most: register net and video config subsystems with configFS This patch makes the core components net and video register their config subsystems with configFS. It is needed to have the configuration interface of the modules exposed to user space. Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman drivers/staging/most/net/net.c | 12 +++++++++++- drivers/staging/most/video/video.c | 12 +++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) commit 8810493fc54e7562e7b8350813f8fdf865e8ec37 Author: Deepak Mishra Date: Wed Jun 12 10:21:31 2019 +0530 staging: rtl8712: Fixed CamelCase wkFilterRxFF0 renamed to wk_filter_rx_ff0 In process of cleaning up struct _adapter in drv_types.h, wkFilterRxFF0 is renamed to to wk_filter_rx_ff0 to fix a checkpatch reported issue. Signed-off-by: Deepak Mishra Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/drv_types.h | 2 +- drivers/staging/rtl8712/rtl871x_xmit.c | 2 +- drivers/staging/rtl8712/xmit_linux.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 6cc6677aee4346aa5157a37342e1555b1966bc6f Author: Deepak Mishra Date: Wed Jun 12 10:21:30 2019 +0530 staging: rtl8712: Fixed CamelCase lockRxFF0Filter renamed to lock_rx_ff0_filter In process of cleaning up struct _adapter in drv_types.h, lockRxFF0Filter is renamed to to lock_rx_ff0_filter to fix a checkpatch reported issue. Signed-off-by: Deepak Mishra Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/drv_types.h | 2 +- drivers/staging/rtl8712/usb_intf.c | 2 +- drivers/staging/rtl8712/xmit_linux.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) commit 12efdd8dc6751b6fe39b70b87a7a843da90b7fe9 Author: Hariprasad Kelam Date: Wed Jun 12 00:25:03 2019 +0530 staging: rtl8723bs: hal: Change return type to void from u8 The function HalQueryTxOQTBufferStatus8723BSdio always returns true and caller functions are not bother about return status. Change return type to void. Signed-off-by: Hariprasad Kelam Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/sdio_ops.c | 3 +-- drivers/staging/rtl8723bs/include/sdio_ops.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) commit 52f7ee660f433a9ec5232e9abf229dd71dd02262 Author: Hariprasad Kelam Date: Tue Jun 11 23:52:30 2019 +0530 staging: rtl8723bs: hal: sdio_ops: fix braces {} are not necessary for single statement blocks This patch fixes below issue reported by checkpatch WARNING: braces {} are not necessary for single statement blocks Signed-off-by: Hariprasad Kelam Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/sdio_ops.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit 282c7818a57b40cab888dd2976028b18a71ec4ff Author: Hariprasad Kelam Date: Tue Jun 11 23:52:06 2019 +0530 staging: rtl8723bs: hal: sdio_ops: fix spaces preferred around unary operator CHECK: spaces preferred around that '+' (ctx:VxV) CHECK: spaces preferred around that '+' (ctx:VxV) CHECK: spaces preferred around that '+' (ctx:VxV) CHECK: spaces preferred around that '+' (ctx:VxV) Signed-off-by: Hariprasad Kelam Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/sdio_ops.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit e99547e5ae17149f9da48d82422538c763fbc7b3 Author: Hariprasad Kelam Date: Tue Jun 11 23:51:42 2019 +0530 staging: rtl8723bs: hal: sdio_ops: fix Comparison to NULL this patch fixes below warning reported by checkpatch CHECK: Comparison to NULL could be written "c2h_evt" Signed-off-by: Hariprasad Kelam Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/sdio_ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1714844abbcacc76d182d71b25db29b6be534bc4 Author: Hariprasad Kelam Date: Tue Jun 11 08:29:53 2019 +0530 staging: rtl8723bs: fix issue Comparison to NULL This patch fixes below issues reported by checkpatch CHECK: Comparison to NULL could be written "rtw_proc" CHECK: Comparison to NULL could be written "!rtw_proc" CHECK: Comparison to NULL could be written "!rtw_proc" Signed-off-by: Hariprasad Kelam Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/rtw_proc.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit a89ba68105f8abedc5b15a72a69dc7616062fb80 Author: Hariprasad Kelam Date: Tue Jun 11 01:02:24 2019 +0530 staging: rtl8723bs: fix spaces required around unary operator this patch fixes below issues reported by checkpatch ERROR: spaces required around that '=' (ctx:WxV) ERROR: spaces required around that '=' (ctx:WxV) ERROR: spaces required around that '<' (ctx:VxV) Signed-off-by: Hariprasad Kelam Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/osdep_service.c | 36 ++++++++++++------------ 1 file changed, 18 insertions(+), 18 deletions(-) commit 6e12260a7c187a1efcdab1e6811e1af124d10ceb Author: Li Mingshuo Date: Mon Jun 10 16:30:26 2019 +0200 staging: rtl8712: remove the leading spaces This patch fixes the checkpatch warning, removing leading spaces to make sure that tabstop starts a new line. Signed-off-by: Li Mingshuo Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_xmit.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 288f9aca4c781078cba7a833b0b0fe874a8305bc Author: Nishka Dasgupta Date: Mon Jun 10 13:17:10 2019 +0530 staging: rtl8723bs: os_dep: Remove variable pos Remove variable pos as it is not used after (or before) being assigned a value. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit a21a773f3d06bffaba928218071d657a498ca34e Author: Nishka Dasgupta Date: Mon Jun 10 13:17:09 2019 +0530 staging: rtl8723bs: rtw_get_sec_ie(): Change return type Remove assignment of return value of function rtw_get_sec_ie as it is never checked or used. Remove return statement of rtw_get_sec_ie as its return value is never stored or checked or used. Change return type of rtw_get_sec_ie to void. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_ieee80211.c | 4 +--- drivers/staging/rtl8723bs/include/ieee80211.h | 2 +- drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) commit fc98ef8fb8541f0a05a9967a088671c2c63a5d1e Author: Nishka Dasgupta Date: Mon Jun 10 13:17:08 2019 +0530 staging: rtl8723bs: core: rtw_mlme_ext.c: Remove unused variables Remove variables that are declared and assigned values but not otherwise used. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 9 --------- 1 file changed, 9 deletions(-) commit 4c0955991b0042b932b218ee53f04c97fa729f62 Author: Nishka Dasgupta Date: Mon Jun 10 13:17:07 2019 +0530 staging: rtl8723bs: hal: rtl8723b_cmd.c: Remove variables Remove variables that are declared and initialised but never used. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c | 6 ------ 1 file changed, 6 deletions(-) commit 581b4945bfccd8f52636d9fdf68cfdd56e17590b Author: Nishka Dasgupta Date: Mon Jun 10 13:17:06 2019 +0530 staging: rtl8723bs: core: Remove variable change_priority Remove local variable change_priority, as it takes the value of the argument priority; as both of these variables are of type u8, priority can be modified without changing the value of its copy at the call site. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_xmit.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 535e5a9b630cc24a9ccd12c17af4769bcdc158fe Author: Nishka Dasgupta Date: Mon Jun 10 13:17:05 2019 +0530 staging: rtl8723bs: hal: hal_btcoex.c: Remove variables Remove variables and use the values directly. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/hal_btcoex.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit d4c33acb2a305360f57c8e0978ecb4f013c8b3c6 Author: Nishka Dasgupta Date: Mon Jun 10 13:17:04 2019 +0530 staging: rtl8723bs: hal: sdio_halinit.c: Remove variables Remove the variables RegRATR and RegRRSR as they are never used after initialisation and assignment. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/sdio_halinit.c | 11 ----------- 1 file changed, 11 deletions(-) commit 8915d9896b0022216e9f2df69a3b7b2aacdf1783 Author: Nishka Dasgupta Date: Mon Jun 10 13:17:03 2019 +0530 staging: rtl8723bs: os_dep: ioctl_linux.c: Remove return variables Remove return variables and in multiple functions and return the values directly, as the functions all return 0 in all cases. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit 85d237bdf8d36b22592bfc39ade74562f3ee0981 Author: Nishka Dasgupta Date: Mon Jun 10 13:17:02 2019 +0530 staging: rtl8723bs: Change type of rtw_os_recvbuf_resource_free() Change return type of function rtw_os_recvbuf_resource_free to void as its return value is never stored, checked or otherwise used. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/include/recv_osdep.h | 2 +- drivers/staging/rtl8723bs/os_dep/recv_linux.c | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) commit d05b53205e96f758be84e3724987be5120bfaa84 Author: Nishka Dasgupta Date: Mon Jun 10 13:17:01 2019 +0530 staging: rtl8723bs: Change type of rtw_os_recv_resource_alloc() Remove assignment of the return value of rtw_os_recv_resource_alloc as this assignment at the call site is never used. Remove return statement from rtw_os_recv_resource_alloc() as its return variable is never used. Change the type of the function to void. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_recv.c | 2 +- drivers/staging/rtl8723bs/include/recv_osdep.h | 2 +- drivers/staging/rtl8723bs/os_dep/recv_linux.c | 6 +----- 3 files changed, 3 insertions(+), 7 deletions(-) commit 6c8265009f8593eecd446f8d3e182076ede15fff Author: Nishka Dasgupta Date: Mon Jun 10 13:52:54 2019 +0530 staging: rtl8712: Change return values of r8712_createbss_cmd() Change return values of r8712_createbss_cmd from _SUCCESS and _FAIL to 0 and -ENOMEM respectively. Change return type of the function from unsigned to int to reflect this. Change call site to check for 0 instead of _SUCCESS. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_cmd.c | 6 +++--- drivers/staging/rtl8712/rtl871x_cmd.h | 2 +- drivers/staging/rtl8712/rtl871x_ioctl_set.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit 1f1e13017d64dc5b57eaff094da5148248cf080d Author: Nishka Dasgupta Date: Mon Jun 10 13:52:53 2019 +0530 staging: rtl8712: Change return values of r8712_setdatarate_cmd() Change the return values of function r8712_setdatarate_cmd from _SUCCESS and _FAIL to 0 and -ENOMEM respectively. Change the return type of the function from u8 to int to reflect this. Change the call site of the function to check for 0 instead of _SUCCESS. Return the value at the call site directly instead of storing it in a return variable. Remove now-unused return variable. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_cmd.c | 8 ++++---- drivers/staging/rtl8712/rtl871x_cmd.h | 2 +- drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 6 ++---- 3 files changed, 7 insertions(+), 9 deletions(-) commit c77a6794c0fe543df7226ab045e0f507a0b24aee Author: Jeremy Sowden Date: Thu Jun 13 10:23:58 2019 +0100 staging: kpc2000: removed DMA AIO implementation. The existing implementation for doing DMA via asynchronous IO didn't work and there was no longer a use-case for it. Removed it. Fixed a few checkpatch warnings about too-long lines and extraneous braces in the process. Reported-by: Matt Sickler Signed-off-by: Jeremy Sowden Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/TODO | 3 - drivers/staging/kpc2000/kpc_dma/fileops.c | 102 +++++------------------ drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.h | 2 - 3 files changed, 21 insertions(+), 86 deletions(-) commit 2b37c1c3e7bbfaaa3910ee66f44f5a4138229884 Author: Frank Li Date: Wed May 1 18:43:26 2019 +0000 dt-bindings: perf: imx8-ddr: add imx8qxp ddr performance monitor Add binding documentation for the imx8qxp DDR performance monitor unit. Signed-off-by: Frank Li Reviewed-by: Rob Herring [will: Removed trailing newline] Signed-off-by: Will Deacon .../devicetree/bindings/perf/fsl-imx-ddr.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 3e985effb25edcf500a58f41be71cc049b1b837f Author: Guennadi Liakhovetski Date: Wed Jun 12 11:36:54 2019 -0500 ALSA: hda: remove an unused field from struct hda_codec The .jacks field in struct hda_codec is unused and seems to be a duplicate of .jacktbl, remove it. Signed-off-by: Guennadi Liakhovetski Signed-off-by: Pierre-Louis Bossart Signed-off-by: Takashi Iwai include/sound/hda_codec.h | 3 --- 1 file changed, 3 deletions(-) commit f94287b653542e09e7004bae5f0d9d37fcaa89c8 Author: Lai, Poey Seng Date: Fri Jun 14 00:21:39 2019 +0800 ALSA: hda: Add Elkhart Lake PCI ID Add HD Audio Device PCI ID for the Intel Elkhart Lake platform. Signed-off-by: Lai, Poey Seng Signed-off-by: Takashi Iwai sound/pci/hda/hda_intel.c | 3 +++ 1 file changed, 3 insertions(+) commit d703a52eb1ebeeba42f2385bbe84f1dc86f4353c Author: Fabrizio Castro Date: Thu May 9 20:20:19 2019 +0100 dt-bindings: can: rcar_can: Add r8a774c0 support Document RZ/G2E (r8a774c0) SoC specific bindings. Signed-off-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Reviewed-by: Rob Herring Acked-by: David S. Miller Signed-off-by: Simon Horman Documentation/devicetree/bindings/net/can/rcar_can.txt | 1 + 1 file changed, 1 insertion(+) commit e6aacf9a52e0b013835c7e33538bcdf0703bbe2e Author: Fabrizio Castro Date: Thu May 9 20:20:18 2019 +0100 dt-bindings: can: rcar_can: Fix RZ/G2 CAN clocks According to the latest information, the clock options for CAN on RZ/G2 are the same as the ones available on R-Car Gen3 Fixes: 868b7c0f43e6 ("dt-bindings: can: rcar_can: Add r8a774a1 support") Signed-off-by: Fabrizio Castro Reviewed-by: Chris Paterson Reviewed-by: Rob Herring Acked-by: David S. Miller Signed-off-by: Simon Horman Documentation/devicetree/bindings/net/can/rcar_can.txt | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit d382084f77b0b4c3eb594cfec893d116c21fb034 Merge: 30f234b4d6f0 d5a5e4ec5b41 Author: Rafael J. Wysocki Date: Thu Jun 13 11:06:21 2019 +0200 Merge back earlier pm-tools material for v5.3. commit 30f234b4d6f05baa88dc46e8d16587f11990ef5f Merge: d1fdb6d8f6a4 04507c0a9385 Author: Rafael J. Wysocki Date: Thu Jun 13 11:04:21 2019 +0200 Merge tag 'linux-cpupower-5.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux Pull cpupower utility updates from Shuah Khan: "This cpupower update consists of a fix and a minor spelling correction." * tag 'linux-cpupower-5.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux: cpupower : frequency-set -r option misses the last cpu in related cpu list cpupower: correct spelling of interval commit eafae15fe16d472d3f0253fbc13f1a58c386a4d4 Author: Simon Sandström Date: Wed Jun 12 15:58:36 2019 +0200 staging: kpc2000: remove unnecessary comments in kp2000_pcie_probe Much of the code comments in kp2000_pcie_probe just repeats the code and does not add any additional information. Delete them and make sure that comments still left in the function all use the same style. Signed-off-by: Simon Sandström Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/core.c | 38 +++++----------------------------- 1 file changed, 5 insertions(+), 33 deletions(-) commit fd5a82f4a6158bbd975a8858239cfd651170528b Author: Simon Sandström Date: Wed Jun 12 15:58:35 2019 +0200 staging: kpc2000: improve label names in kp2000_pcie_probe Use self-explanatory label names instead of the generic numbered ones, to make it easier to follow and understand the code. Signed-off-by: Simon Sandström Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/core.c | 42 ++++++++++++++++------------------ 1 file changed, 20 insertions(+), 22 deletions(-) commit 0bbb1374f1fe85268d6e78141dd2ca3c33ce8b56 Author: YueHaibing Date: Tue Jun 11 21:42:28 2019 +0800 Staging: kpc2000: kpc_dma: Make some symbols static Fix sparse warnings: drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c:46:6: warning: symbol 'kpc_dma_del_device' was not declared. Should it be static? drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c:84:1: warning: symbol 'dev_attr_engine_regs' was not declared. Should it be static? drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c:91:14: warning: symbol 'kpc_dma_class' was not declared. Should it be static? drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c:199:24: warning: symbol 'kpc_dma_plat_driver_i' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit abddd78ef465b86fc89a3d9750bb76a138bc0859 Author: Rishiraj Manwatkar Date: Tue Jun 11 03:35:41 2019 +0000 staging: kpc2000: Fix: 'kpc_dma_del_device' and other symbols were not declared This patch removes the Sparse generated warnings. Following warnings are reported by Sparse: drivers/staging/kpc2000//kpc_dma/kpc_dma_driver.c:46:6: warning: symbol 'kpc_dma_del_device' was not declared. Should it be static? drivers/staging/kpc2000//kpc_dma/kpc_dma_driver.c:91:14: warning: symbol 'kpc_dma_class' was not declared. Should it be static? drivers/staging/kpc2000//kpc_dma/kpc_dma_driver.c:199:24: warning: symbol 'kpc_dma_plat_driver_i' was not declared. Should it be static? Signed-off-by: Rishiraj Manwatkar Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7ac13f6dcbd59b8f99395588cd7ef31f7e3bd3c6 Author: Krishna Yarlagadda Date: Thu May 16 17:23:14 2019 +0530 soc/tegra: Select pinctrl for Tegra194 Select PINCTRL_TEGRA194 by default for Tegra194 SoC needed for dynamically controlling PCIe pins. Signed-off-by: Krishna Yarlagadda Reviewed-by: Linus Walleij Signed-off-by: Thierry Reding drivers/soc/tegra/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 0cf289bd5de3f26d28781d81650e5bf022702a7e Author: Chris Wilson Date: Thu Jun 13 08:32:54 2019 +0100 drm/i915: Move fence register tracking from i915->mm to ggtt As the fence registers only apply to regions inside the GGTT is makes more sense that we track these as part of the i915_ggtt and not the general mm. In the next patch, we will then pull the register locking underneath the i915_ggtt.mutex. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190613073254.24048-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gem/i915_gem_mman.c | 4 +- drivers/gpu/drm/i915/gem/i915_gem_pm.c | 2 +- drivers/gpu/drm/i915/gt/intel_reset.c | 6 +-- drivers/gpu/drm/i915/gvt/aperture_gm.c | 7 +-- drivers/gpu/drm/i915/gvt/gvt.h | 4 +- drivers/gpu/drm/i915/i915_debugfs.c | 42 ++++++++------- drivers/gpu/drm/i915/i915_drv.c | 3 +- drivers/gpu/drm/i915/i915_drv.h | 28 ---------- drivers/gpu/drm/i915/i915_gem.c | 52 ++++-------------- drivers/gpu/drm/i915/i915_gem_fence_reg.c | 90 +++++++++++++++++++++---------- drivers/gpu/drm/i915/i915_gem_fence_reg.h | 19 ++++++- drivers/gpu/drm/i915/i915_gem_gtt.c | 2 + drivers/gpu/drm/i915/i915_gem_gtt.h | 14 ++++- drivers/gpu/drm/i915/i915_gpu_error.c | 6 +-- drivers/gpu/drm/i915/i915_vma.h | 2 +- 15 files changed, 144 insertions(+), 137 deletions(-) commit 31534fda1259c7f149296ad445dc2dbd7609dba0 Author: Daniel Vetter Date: Wed Jun 12 11:12:53 2019 +0200 drm/ast: Drop fb_debug_enter/leave ast doesn't implement the mode_set_base_atomic hook this would need, so this is dead code. Signed-off-by: Daniel Vetter Acked-by: Thomas Zimmermann Cc: Dave Airlie Cc: Daniel Vetter Cc: Gerd Hoffmann Cc: Thomas Zimmermann Cc: Alex Deucher Cc: Sam Bobroff Cc: Sam Ravnborg Cc: YueHaibing Link: https://patchwork.freedesktop.org/patch/msgid/20190612091253.26413-2-daniel.vetter@ffwll.ch drivers/gpu/drm/ast/ast_fb.c | 2 -- 1 file changed, 2 deletions(-) commit 1dcff4ae65185e8c0300972f6d8d39d9a9db2bda Author: Daniel Vetter Date: Tue May 28 11:03:04 2019 +0200 backlight: simplify lcd notifier With all the work I've done on replacing fb notifier calls with direct calls into fbcon the backlight/lcd notifier is the only user left. It will only receive events now that it cares about, hence we can remove this check. Signed-off-by: Daniel Vetter Reviewed-by: Sam Ravnborg Reviewed-by: Maarten Lankhorst Acked-by: Daniel Thompson Cc: Lee Jones Cc: Daniel Thompson Cc: Jingoo Han Link: https://patchwork.freedesktop.org/patch/msgid/20190528090304.9388-34-daniel.vetter@ffwll.ch drivers/video/backlight/lcd.c | 11 ----------- 1 file changed, 11 deletions(-) commit af1440368837f19ac7d5dec05d929d91308f5a90 Author: Daniel Vetter Date: Tue May 28 11:03:03 2019 +0200 staging/olpc_dcon: Add drm conversion to TODO this driver is pretty horrible from a design pov, and needs a complete overhaul. Concrete thing that annoys me is that it looks at registered_fb, which is an internal thing to fbmem.c and fbcon.c. And ofc it gets the lifetime rules all wrong (it should at least use get/put_fb_info). Looking at the history, there's been an attempt at dropping this from staging in 2016, but that had to be reverted. Since then not real effort except the usual stream of trivial patches, and fbdev has been formally closed for any new hw support. Time to try again and drop this? Signed-off-by: Daniel Vetter Reviewed-by: Sam Ravnborg Acked-by: Greg Kroah-Hartman Reviewed-by: Maarten Lankhorst Cc: Greg Kroah-Hartman Cc: Jens Frederich Cc: Daniel Drake Cc: Jon Nettleton Link: https://patchwork.freedesktop.org/patch/msgid/20190528090304.9388-33-daniel.vetter@ffwll.ch drivers/staging/olpc_dcon/TODO | 7 +++++++ 1 file changed, 7 insertions(+) commit 94193d2aae63c49b706b1b7e535f23cfeccec93e Author: Daniel Vetter Date: Tue May 28 11:03:02 2019 +0200 fbcon: Document what I learned about fbcon locking It's not pretty. Signed-off-by: Daniel Vetter Reviewed-by: Sam Ravnborg Reviewed-by: Maarten Lankhorst Cc: Daniel Vetter Cc: Bartlomiej Zolnierkiewicz Cc: Hans de Goede Cc: Yisheng Xie Link: https://patchwork.freedesktop.org/patch/msgid/20190528090304.9388-32-daniel.vetter@ffwll.ch drivers/video/fbdev/core/fbcon.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit b07baa0393d09fb8ade7d10269d43ed12f517b6e Author: Gerd Hoffmann Date: Tue Jun 11 14:54:07 2019 +0200 drm/virtio: drop framebuffer dirty tracking code No need to have our own implementation, atomic helpers can do it for us. Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20190611125408.29421-1-kraxel@redhat.com drivers/gpu/drm/virtio/Makefile | 2 +- drivers/gpu/drm/virtio/virtgpu_display.c | 20 +---- drivers/gpu/drm/virtio/virtgpu_drv.h | 7 -- drivers/gpu/drm/virtio/virtgpu_fb.c | 150 ------------------------------- 4 files changed, 3 insertions(+), 176 deletions(-) commit b0d765219fb3308638754e28f71377d3752f1266 Author: Fabio Estevam Date: Thu Jun 6 13:13:49 2019 -0300 crypto: sahara - Use devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify the code a bit. Signed-off-by: Fabio Estevam Signed-off-by: Herbert Xu drivers/crypto/sahara.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit cec1caaf3f62f8ed104e24c8b4b9c5dc0fd44e17 Author: Fabio Estevam Date: Thu Jun 6 13:13:48 2019 -0300 crypto: mxs-dcp - Use devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify the code a bit. Signed-off-by: Fabio Estevam Signed-off-by: Herbert Xu drivers/crypto/mxs-dcp.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit b0200065cd6ee5d461e4c0af01fc3887bd755370 Author: Nishad Kamdar Date: Thu Jun 6 20:36:17 2019 +0530 crypto: hisilicon - Use the correct style for SPDX License Identifier This patch corrects the SPDX License Identifier style in header file related to Crypto Drivers for Hisilicon SEC Engine in Hip06 and Hip07. For C header files Documentation/process/license-rules.rst mandates C-like comments (opposed to C source files where C++ style should be used) Changes made by using a script provided by Joe Perches here: https://lkml.org/lkml/2019/2/7/46 Suggested-by: Joe Perches Signed-off-by: Nishad Kamdar Acked-by: Jonathan Cameron Signed-off-by: Herbert Xu drivers/crypto/hisilicon/sec/sec_drv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1793d1aba1941573ba9ebf75dfbb11a8c2b943b1 Author: Gustavo A. R. Silva Date: Thu Jun 6 09:57:13 2019 -0500 crypto: qat - use struct_size() helper One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct qat_alg_buf_list { ... struct qat_alg_buf bufers[]; } __packed __aligned(64); Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. So, replace the following form: sizeof(struct qat_alg_buf_list) + ((1 + n) * sizeof(struct qat_alg_buf)) with: struct_size(bufl, bufers, n + 1) This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Herbert Xu drivers/crypto/qat/qat_common/qat_algs.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 0b211338cf73eb7dd9a1c26721ce43076918373f Author: Iuliana Prodan Date: Thu Jun 6 11:02:55 2019 +0300 ARM: dts: imx7ulp: add crypto support Add crypto node in device tree for CAAM support. Noteworthy is that on 7ulp the interrupt line is shared between the two job rings. Signed-off-by: Iuliana Prodan Signed-off-by: Franck LENORMAND Signed-off-by: Horia Geantă Acked-by: Shawn Guo Signed-off-by: Herbert Xu arch/arm/boot/dts/imx7ulp.dtsi | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 98785092f279e5dff74463b311a1c7d0c10cda4d Author: Nishad Kamdar Date: Wed Jun 5 18:51:53 2019 +0530 crypto: cavium/nitrox - Use the correct style for SPDX License Identifier This patch corrects the SPDX License Identifier style in header files related to Crypto Drivers for Cavium Nitrox family CNN55XX devices. For C header files Documentation/process/license-rules.rst mandates C-like comments (opposed to C source files where C++ style should be used) Changes made by using a script provided by Joe Perches here: https://lkml.org/lkml/2019/2/7/46 Suggested-by: Joe Perches Signed-off-by: Nishad Kamdar Signed-off-by: Herbert Xu drivers/crypto/cavium/nitrox/nitrox_debugfs.h | 2 +- drivers/crypto/cavium/nitrox/nitrox_mbx.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit dd508618486bb573141cecd5e4e5060b35c4aefe Author: YueHaibing Date: Tue Jun 4 22:53:51 2019 +0800 crypto: bcm - Make some symbols static Fix sparse warnings: drivers/crypto/bcm/cipher.c:99:6: warning: symbol 'BCMHEADER' was not declared. Should it be static? drivers/crypto/bcm/cipher.c:2096:6: warning: symbol 'spu_no_incr_hash' was not declared. Should it be static? drivers/crypto/bcm/cipher.c:4823:5: warning: symbol 'bcm_spu_probe' was not declared. Should it be static? drivers/crypto/bcm/cipher.c:4867:5: warning: symbol 'bcm_spu_remove' was not declared. Should it be static? drivers/crypto/bcm/spu2.c:52:6: warning: symbol 'spu2_cipher_type_names' was not declared. Should it be static? drivers/crypto/bcm/spu2.c:56:6: warning: symbol 'spu2_cipher_mode_names' was not declared. Should it be static? drivers/crypto/bcm/spu2.c:60:6: warning: symbol 'spu2_hash_type_names' was not declared. Should it be static? drivers/crypto/bcm/spu2.c:66:6: warning: symbol 'spu2_hash_mode_names' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Herbert Xu drivers/crypto/bcm/cipher.c | 8 ++++---- drivers/crypto/bcm/spu2.c | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) commit 860ab2e50204c41e713c54c752617d2da57f0fd7 Author: Eric Biggers Date: Sun Jun 2 22:47:14 2019 -0700 crypto: chacha - constify ctx and iv arguments Constify the ctx and iv arguments to crypto_chacha_init() and the various chacha*_stream_xor() functions. This makes it clear that they are not modified. Signed-off-by: Eric Biggers Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm/crypto/chacha-neon-glue.c | 2 +- arch/arm64/crypto/chacha-neon-glue.c | 2 +- arch/x86/crypto/chacha_glue.c | 2 +- crypto/chacha_generic.c | 4 ++-- include/crypto/chacha.h | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) commit 76cadf2244518d3b1610082d037b01e2651ea402 Author: Eric Biggers Date: Sun Jun 2 22:46:34 2019 -0700 crypto: chacha20poly1305 - a few cleanups - Use sg_init_one() instead of sg_init_table() then sg_set_buf(). - Remove unneeded calls to sg_init_table() prior to scatterwalk_ffwd(). - Simplify initializing the poly tail block. - Simplify computing padlen. This doesn't change any actual behavior. Cc: Martin Willi Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu crypto/chacha20poly1305.c | 43 +++++++++++++------------------------------ 1 file changed, 13 insertions(+), 30 deletions(-) commit 314d0f0ea69f2fb8e6fc4cb5d5ae6b1e3418e36c Author: Eric Biggers Date: Sun Jun 2 22:46:11 2019 -0700 crypto: skcipher - make chunksize and walksize accessors internal The 'chunksize' and 'walksize' properties of skcipher algorithms are implementation details that users of the skcipher API should not be looking at. So move their accessor functions from to . Signed-off-by: Eric Biggers Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu include/crypto/internal/skcipher.h | 60 ++++++++++++++++++++++++++++++++++++++ include/crypto/skcipher.h | 60 -------------------------------------- 2 files changed, 60 insertions(+), 60 deletions(-) commit 81bcbb1ee75d44f270a2905ea09c8a5861cf0086 Author: Eric Biggers Date: Sun Jun 2 22:45:51 2019 -0700 crypto: skcipher - un-inline encrypt and decrypt functions crypto_skcipher_encrypt() and crypto_skcipher_decrypt() have grown to be more than a single indirect function call. They now also check whether a key has been set, and with CONFIG_CRYPTO_STATS=y they also update the crypto statistics. That can add up to a lot of bloat at every call site. Moreover, these always involve a function call anyway, which greatly limits the benefits of inlining. So change them to be non-inline. Signed-off-by: Eric Biggers Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu crypto/skcipher.c | 34 ++++++++++++++++++++++++++++++++++ include/crypto/skcipher.h | 32 ++------------------------------ 2 files changed, 36 insertions(+), 30 deletions(-) commit f2fe1154542e69976f859e573dc4d9aa0b76a495 Author: Eric Biggers Date: Sun Jun 2 22:45:16 2019 -0700 crypto: aead - un-inline encrypt and decrypt functions crypto_aead_encrypt() and crypto_aead_decrypt() have grown to be more than a single indirect function call. They now also check whether a key has been set, the decryption side checks whether the input is at least as long as the authentication tag length, and with CONFIG_CRYPTO_STATS=y they also update the crypto statistics. That can add up to a lot of bloat at every call site. Moreover, these always involve a function call anyway, which greatly limits the benefits of inlining. So change them to be non-inline. Signed-off-by: Eric Biggers Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu crypto/aead.c | 36 ++++++++++++++++++++++++++++++++++++ include/crypto/aead.h | 34 ++-------------------------------- 2 files changed, 38 insertions(+), 32 deletions(-) commit 07269559ac0bf778c6eadcaa9104e7adb4d46f33 Author: Eric Biggers Date: Sun Jun 2 22:44:50 2019 -0700 crypto: x86/aesni - remove unused internal cipher algorithm Since commit 944585a64f5e ("crypto: x86/aes-ni - remove special handling of AES in PCBC mode"), the "__aes-aesni" internal cipher algorithm is no longer used. So remove it too. Signed-off-by: Eric Biggers Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/x86/crypto/aesni-intel_glue.c | 45 ++++++-------------------------------- 1 file changed, 7 insertions(+), 38 deletions(-) commit 03d66cfa2ad62cd0bb4c9aabc5a28d56af41f0cb Author: Eric Biggers Date: Sun Jun 2 22:44:08 2019 -0700 crypto: doc - improve the skcipher API example code Rewrite the skcipher API example, changing it to encrypt a buffer with AES-256-XTS. This addresses various problems with the previous example: - It requests a specific driver "cbc-aes-aesni", which is unusual. Normally users ask for "cbc(aes)", not a specific driver. - It encrypts only a single AES block. For the reader, that doesn't clearly distinguish the "skcipher" API from the "cipher" API. - Showing how to encrypt something with bare CBC is arguably a poor choice of example, as it doesn't follow modern crypto trends. Now, usually authenticated encryption is recommended, in which case the user would use the AEAD API, not skcipher. Disk encryption is still a legitimate use for skcipher, but for that usually XTS is recommended. - Many other bugs and poor coding practices, such as not setting CRYPTO_TFM_REQ_MAY_SLEEP, unnecessarily allocating a heap buffer for the IV, unnecessary NULL checks, using a pointless wrapper struct, and forgetting to set an error code in one case. Signed-off-by: Eric Biggers Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu Documentation/crypto/api-samples.rst | 176 +++++++++++++++-------------------- 1 file changed, 77 insertions(+), 99 deletions(-) commit e63e1b0dd0003dc31f73d875907432be3a2abe5d Author: Eric Biggers Date: Sun Jun 2 22:42:33 2019 -0700 crypto: testmgr - add some more preemption points Call cond_resched() after each fuzz test iteration. This avoids stall warnings if fuzz_iterations is set very high for testing purposes. While we're at it, also call cond_resched() after finishing testing each test vector. Signed-off-by: Eric Biggers Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu crypto/testmgr.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 177f87d063ebc7a11a38bdafaca8fec4a9dae13e Author: Eric Biggers Date: Sun Jun 2 22:40:58 2019 -0700 crypto: algapi - require cra_name and cra_driver_name Now that all algorithms explicitly set cra_driver_name, make it required for algorithm registration and remove the code that generated a default cra_driver_name. Also add an explicit check that cra_name is set too, since that's obviously required too, yet it didn't seem to be checked anywhere. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu crypto/algapi.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) commit d6ebf5286f8f94a254a8c90d4b9f2a8b076a8634 Author: Eric Biggers Date: Sun Jun 2 22:40:57 2019 -0700 crypto: make all generic algorithms set cra_driver_name Most generic crypto algorithms declare a driver name ending in "-generic". The rest don't declare a driver name and instead rely on the crypto API automagically appending "-generic" upon registration. Having multiple conventions is unnecessarily confusing and makes it harder to grep for all generic algorithms in the kernel source tree. But also, allowing NULL driver names is problematic because sometimes people fail to set it, e.g. the case fixed by commit 417980364300 ("crypto: cavium/zip - fix collision with generic cra_driver_name"). Of course, people can also incorrectly name their drivers "-generic". But that's much easier to notice / grep for. Therefore, let's make cra_driver_name mandatory. In preparation for this, this patch makes all generic algorithms set cra_driver_name. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu crypto/anubis.c | 1 + crypto/arc4.c | 2 ++ crypto/crypto_null.c | 3 +++ crypto/deflate.c | 1 + crypto/fcrypt.c | 1 + crypto/khazad.c | 1 + crypto/lz4.c | 1 + crypto/lz4hc.c | 1 + crypto/lzo-rle.c | 1 + crypto/lzo.c | 1 + crypto/md4.c | 7 ++++--- crypto/md5.c | 7 ++++--- crypto/michael_mic.c | 1 + crypto/rmd128.c | 1 + crypto/rmd160.c | 1 + crypto/rmd256.c | 1 + crypto/rmd320.c | 1 + crypto/serpent_generic.c | 1 + crypto/tea.c | 3 +++ crypto/tgr192.c | 21 ++++++++++++--------- crypto/wp512.c | 21 ++++++++++++--------- crypto/zstd.c | 1 + 22 files changed, 55 insertions(+), 24 deletions(-) commit da0f843e6e6ff23790e9d97a05dc555ee2e3fa11 Author: Greg Kroah-Hartman Date: Thu Jun 13 08:10:45 2019 +0200 Revert "serial: stm32: select pinctrl state in each suspend/resume function" This reverts commit c70669ecef4e34af8913108fae4b8a9b1dc63fa1 as it breaks the build. Reported-by: Stephen Rothwell Reported-by: kbuild test robot Cc: Bich Hemon Cc: Erwan Le Ray Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/stm32-usart.c | 4 ---- 1 file changed, 4 deletions(-) commit c72d3a0a93471b95084339e5cba927d516724b83 Author: Takashi Sakamoto Date: Thu Jun 13 12:35:22 2019 +0900 ALSA: dice: fix compiler warning due to returning uninitialized value This commit fixes the warning due to returning uninitialized value from start_streams() helper function. sound/firewire/dice/dice-stream.c: In function 'start_streams.isra.0': >> sound/firewire/dice/dice-stream.c:350:6: warning: 'err' may be used uninitialized in this function [-Wmaybe-uninitialized] int err; ^~~ Reported-by: kbuild test robot Fixes: 3cd2c2d780a2 ("ALSA: dice: reserve/release isochronous resources in pcm.hw_params/hw_free callbacks") Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/dice/dice-stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d3df18a97e586702920337056540267807b23f8e Author: Nicolas Saenz Julienne Date: Wed Jun 12 20:24:56 2019 +0200 cpufreq: add driver for Raspberry Pi Raspberry Pi's firmware offers and interface though which update it's performance requirements. It allows us to request for specific runtime frequencies, which the firmware might or might not respect, depending on the firmware configuration and thermals. As the maximum and minimum frequencies are configurable in the firmware there is no way to know in advance their values. So the Raspberry Pi cpufreq driver queries them, builds an opp frequency table to then launch cpufreq-dt. Also, as the firmware interface might be configured as a module, making the cpu clock unavailable during init, this implements a full fledged driver, as opposed to most drivers registering cpufreq-dt, which only make use of an init routine. Signed-off-by: Nicolas Saenz Julienne Acked-by: Eric Anholt Reviewed-by: Stephen Boyd Acked-by: Stefan Wahren Signed-off-by: Viresh Kumar drivers/cpufreq/Kconfig.arm | 8 +++ drivers/cpufreq/Makefile | 1 + drivers/cpufreq/raspberrypi-cpufreq.c | 97 +++++++++++++++++++++++++++++++++++ 3 files changed, 106 insertions(+) commit fa42da11b285d720af5ccb1a305e76feab26c879 Author: Peter Ujfalusi Date: Thu Jun 6 15:13:57 2019 +0300 firmware: ti_sci: Parse all resource ranges even if some is not available Do not fail if any of the requested subtypes are not availabe, but set the number of resources to 0 and continue parsing the resource ranges. Reviewed-by: Lokesh Vutla Signed-off-by: Peter Ujfalusi Signed-off-by: Tero Kristo Signed-off-by: Santosh Shilimkar drivers/firmware/ti_sci.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 1e407f337f4015c8ffc56e7cfd70e06b2e9fc9da Author: Suman Anna Date: Wed Jun 5 17:33:34 2019 -0500 firmware: ti_sci: Add support for processor control Texas Instrument's System Control Interface (TI-SCI) Message Protocol is used in Texas Instrument's System on Chip (SoC) such as those in K3 family AM654 SoC to communicate between various compute processors with a central system controller entity. The system controller provides various services including the control of other compute processors within the SoC. Extend the TI-SCI protocol support to add various TI-SCI commands to invoke services associated with power and reset control, and boot vector management of the various compute processors from the Linux kernel. Signed-off-by: Suman Anna Signed-off-by: Tero Kristo Signed-off-by: Santosh Shilimkar drivers/firmware/ti_sci.c | 350 +++++++++++++++++++++++++++++++++ drivers/firmware/ti_sci.h | 135 +++++++++++++ include/linux/soc/ti/ti_sci_protocol.h | 31 +++ 3 files changed, 516 insertions(+) commit 68608b5e5063dd12942f1118286c6f595d0c4a05 Author: Peter Ujfalusi Date: Mon Jun 10 12:18:56 2019 +0300 firmware: ti_sci: Add resource management APIs for ringacc, psi-l and udma Configuration of NAVSS resource, like rings, UDMAP channels, flows and PSI-L thread management need to be done via TISCI. Add the needed structures and functions for NAVSS resource configuration of the following: Rings from Ring Accelerator PSI-L thread management UDMAP tchan, rchan and rflow configuration. Signed-off-by: Peter Ujfalusi Reviewed-by: Lokesh Vutla Signed-off-by: Tero Kristo Signed-off-by: Santosh Shilimkar drivers/firmware/ti_sci.c | 488 ++++++++++++++++++++++++ drivers/firmware/ti_sci.h | 675 +++++++++++++++++++++++++++++++++ include/linux/soc/ti/ti_sci_protocol.h | 215 +++++++++++ 3 files changed, 1378 insertions(+) commit 66f030eac257a572fbedab3d9646d87d647351fd Author: Andrew F. Davis Date: Tue May 28 11:55:10 2019 -0400 firmware: ti_sci: Always request response from firmware TI-SCI firmware will only respond to messages when the TI_SCI_FLAG_REQ_ACK_ON_PROCESSED flag is set. Most messages already do this, set this for the ones that do not. This will be enforced in future firmware that better match the TI-SCI specifications, this patch will not break users of existing firmware. Fixes: aa276781a64a ("firmware: Add basic support for TI System Control Interface (TI-SCI) protocol") Signed-off-by: Andrew F. Davis Acked-by: Nishanth Menon Tested-by: Alejandro Hernandez Signed-off-by: Tero Kristo Signed-off-by: Santosh Shilimkar drivers/firmware/ti_sci.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 55d0f98a2de6e195f88122085cedcb8ce7f4daed Author: Yuantian Tang Date: Tue Jun 11 13:42:44 2019 +0800 arm64: dts: ls1028a: Add temperature sensor node Add nxp sa56004 chip node for temperature monitor. Signed-off-by: Yuantian Tang Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls1028a-qds.dts | 15 +++++++++++++++ arch/arm64/boot/dts/freescale/fsl-ls1028a-rdb.dts | 15 +++++++++++++++ 2 files changed, 30 insertions(+) commit 53f7ca84c0631aeff49e319030c2838237e943ab Author: Marek Vasut Date: Sun Jun 9 18:50:20 2019 +0200 ARM: dts: imx53: Bind CPLD on M53Menlo Enable ECSPI2 and bind CPLD to both chip selects. Signed-off-by: Marek Vasut Cc: Shawn Guo Cc: Fabio Estevam Cc: NXP Linux Team To: linux-arm-kernel@lists.infradead.org Signed-off-by: Shawn Guo arch/arm/boot/dts/imx53-m53menlo.dts | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 077ac579cefa910328e7d8da5fb3f5754a4c9b55 Author: Vladimir Oltean Date: Fri Jun 7 01:28:17 2019 +0300 ARM: dts: Introduce the NXP LS1021A-TSN board The LS1021A-TSN is a development board built by VVDN/Argonboards in partnership with NXP. It features the LS1021A SoC and the first-generation SJA1105T Ethernet switch for prototyping implementations of a subset of IEEE 802.1 TSN standards. It has two regular Ethernet ports and four switched, TSN-capable ports. It also features: - One Arduino header - One expansion header - Two USB 3.0 ports - One mini PCIe slot - One SATA interface - Accelerometer, gyroscope, temperature sensors Signed-off-by: Vladimir Oltean Signed-off-by: Shawn Guo arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/ls1021a-tsn.dts | 289 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 290 insertions(+) commit d664c43958e0d9e0b34e23b6f8a8f4cf8ec61a2e Author: Enrico Weigelt Date: Wed Jun 12 23:59:36 2019 +0200 gpio: Fix build warnings on undefined struct pinctrl_dev This fixes the warnings: * include/linux/gpio.h:254:11: warning: 'struct pinctrl_dev' declared inside parameter list will not be visible outside of this definition or declaration * include/linux/gpio/driver.h:602:11: warning: 'struct pinctrl_dev' declared inside parameter list will not be visible outside of this definition or declaration Fixes: 78b99577b393 ("pinctrl: remove unused pin_is_valid()") Reported-by: kbuild test robot Signed-off-by: Enrico Weigelt Signed-off-by: Linus Walleij include/linux/gpio.h | 1 + include/linux/gpio/driver.h | 2 ++ 2 files changed, 3 insertions(+) commit a842fe1425cb20f457abd3f8ef98b468f83ca98b Author: Eric Dumazet Date: Wed Jun 12 11:57:25 2019 -0700 tcp: add optional per socket transmit delay Adding delays to TCP flows is crucial for studying behavior of TCP stacks, including congestion control modules. Linux offers netem module, but it has unpractical constraints : - Need root access to change qdisc - Hard to setup on egress if combined with non trivial qdisc like FQ - Single delay for all flows. EDT (Earliest Departure Time) adoption in TCP stack allows us to enable a per socket delay at a very small cost. Networking tools can now establish thousands of flows, each of them with a different delay, simulating real world conditions. This requires FQ packet scheduler or a EDT-enabled NIC. This patchs adds TCP_TX_DELAY socket option, to set a delay in usec units. unsigned int tx_delay = 10000; /* 10 msec */ setsockopt(fd, SOL_TCP, TCP_TX_DELAY, &tx_delay, sizeof(tx_delay)); Note that FQ packet scheduler limits might need some tweaking : man tc-fq PARAMETERS limit Hard limit on the real queue size. When this limit is reached, new packets are dropped. If the value is lowered, packets are dropped so that the new limit is met. Default is 10000 packets. flow_limit Hard limit on the maximum number of packets queued per flow. Default value is 100. Use of TCP_TX_DELAY option will increase number of skbs in FQ qdisc, so packets would be dropped if any of the previous limit is hit. Use of a jump label makes this support runtime-free, for hosts never using the option. Also note that TSQ (TCP Small Queues) limits are slightly changed with this patch : we need to account that skbs artificially delayed wont stop us providind more skbs to feed the pipe (netem uses skb_orphan_partial() for this purpose, but FQ can not use this trick) Because of that, using big delays might very well trigger old bugs in TSO auto defer logic and/or sndbuf limited detection. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/linux/tcp.h | 2 ++ include/net/tcp.h | 19 +++++++++++++++++++ include/uapi/linux/tcp.h | 3 +++ net/ipv4/tcp.c | 24 ++++++++++++++++++++++++ net/ipv4/tcp_ipv4.c | 10 ++++++---- net/ipv4/tcp_minisocks.c | 2 +- net/ipv4/tcp_output.c | 23 ++++++++++++++++++++--- net/ipv6/tcp_ipv6.c | 1 + 8 files changed, 76 insertions(+), 8 deletions(-) commit 464c258aa45b09f16aa0f05847ed8895873262d9 Author: Ondrej Mosnacek Date: Wed Jun 12 10:12:26 2019 +0200 selinux: fix empty write to keycreate file When sid == 0 (we are resetting keycreate_sid to the default value), we should skip the KEY__CREATE check. Before this patch, doing a zero-sized write to /proc/self/keycreate would check if the current task can create unlabeled keys (which would usually fail with -EACCESS and generate an AVC). Now it skips the check and correctly sets the task's keycreate_sid to 0. Bug report: https://bugzilla.redhat.com/show_bug.cgi?id=1719067 Tested using the reproducer from the report above. Fixes: 4eb582cf1fbd ("[PATCH] keys: add a way to store the appropriate context for newly-created keys") Reported-by: Kir Kolyshkin Signed-off-by: Ondrej Mosnacek Signed-off-by: Paul Moore security/selinux/hooks.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit fe2d70d6f6ff038c20705c34695bd34ac072af14 Author: Daniel Vetter Date: Tue May 28 11:03:01 2019 +0200 fbcon: Call con2fb_map functions directly These are actually fbcon ioctls which just happen to be exposed through /dev/fb*. They completely ignore which fb_info they're called on, and I think the userspace tool even hardcodes to /dev/fb0. Hence just forward the entire thing to fbcon.c wholesale. Note that this patch drops the fb_lock/unlock on the set side. Since the ioctl can operate on any fb (as passed in through con2fb.framebuffer) this is bogus. Also note that fbcon.c in general never calls fb_lock on anything, so this has been badly broken already. With this the last user of the fbcon notifier callback is gone, and we can garbage collect that too. v2: add missing uaccess.h include (alpha fails to compile otherwise), reported by kbuild. v3: Remember to also drop the #defines (Maarten) v4: Add the static inline to dummy functions. Signed-off-by: Daniel Vetter Reviewed-by: Sam Ravnborg Reviewed-by: Maarten Lankhorst Cc: Maarten Lankhorst Cc: Daniel Vetter Cc: Bartlomiej Zolnierkiewicz Cc: Hans de Goede Cc: Yisheng Xie Cc: "Michał Mirosław" Cc: Peter Rosin Cc: Mikulas Patocka Link: https://patchwork.freedesktop.org/patch/msgid/20190528090304.9388-31-daniel.vetter@ffwll.ch drivers/video/fbdev/core/fbcon.c | 59 ++++++++++++++++++++++++---------------- drivers/video/fbdev/core/fbmem.c | 34 ++--------------------- include/linux/fb.h | 4 --- include/linux/fbcon.h | 4 +++ 4 files changed, 42 insertions(+), 59 deletions(-) commit 1cd51b5d200dec292577a4656803d8aeff54ad51 Author: Daniel Vetter Date: Tue May 28 11:03:00 2019 +0200 vgaswitcheroo: call fbcon_remap_all directly While at it, clean up the interface a bit and push the console locking into fbcon.c. v2: Remove now outdated comment (Lukas). v3: Forgot to add static inline to the dummy function. Acked-by: Lukas Wunner Signed-off-by: Daniel Vetter Reviewed-by: Sam Ravnborg Reviewed-by: Maarten Lankhorst Cc: Lukas Wunner Cc: David Airlie Cc: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: Bartlomiej Zolnierkiewicz Cc: Hans de Goede Cc: Yisheng Xie Cc: linux-fbdev@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20190528090304.9388-30-daniel.vetter@ffwll.ch drivers/gpu/vga/vga_switcheroo.c | 11 +++-------- drivers/video/fbdev/core/fbcon.c | 14 +++++--------- include/linux/fb.h | 2 -- include/linux/fbcon.h | 2 ++ 4 files changed, 10 insertions(+), 19 deletions(-) commit 9e1467002630065ed86c65ea28bfc9194fff6f0e Author: Daniel Vetter Date: Tue May 28 11:02:59 2019 +0200 fbcon: replace FB_EVENT_MODE_CHANGE/_ALL with direct calls Create a new wrapper function for this, feels like there's some refactoring room here between the two modes. v2: backlight notifier is also interested in the mode change event, it calls lcd->set_mode, of which there are 3 implementations. Thanks to Maarten for spotting this. So we keep that. We can ditch the differentiation between mode change and all mode changes (because backlight notifier doesn't care), and we can drop the FBINFO_MISC_USEREVENT stuff too, because that's just to prevent recursion between fbmem.c and fbcon.c. While at it flatten the control flow a bit. v3: Need to add a static inline to the dummy function. v4: Add missing #include to sh_mob (Sam). Cc: Sam Ravnborg Signed-off-by: Daniel Vetter Reviewed-by: Sam Ravnborg Reviewed-by: Maarten Lankhorst Acked-by: Daniel Thompson Cc: Maarten Lankhorst Cc: Lee Jones Cc: Daniel Thompson Cc: Jingoo Han Cc: Bartlomiej Zolnierkiewicz Cc: Daniel Vetter Cc: Hans de Goede Cc: Yisheng Xie Cc: "Michał Mirosław" Cc: Peter Rosin Cc: Mikulas Patocka Cc: linux-fbdev@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20190528090304.9388-29-daniel.vetter@ffwll.ch drivers/video/backlight/lcd.c | 1 - drivers/video/fbdev/core/fbcon.c | 15 +++++++++------ drivers/video/fbdev/core/fbmem.c | 21 ++++++++++----------- drivers/video/fbdev/sh_mobile_lcdcfb.c | 12 ++---------- include/linux/fb.h | 2 -- include/linux/fbcon.h | 2 ++ 6 files changed, 23 insertions(+), 30 deletions(-) commit c428f35adf0faac11e0cceb7dadf3b29055d7d49 Author: Daniel Vetter Date: Tue May 28 11:02:58 2019 +0200 fb: Flatten control flow in fb_set_var Instead of wiring almost everything down to the very last line using goto soup (but not consistently, where would the fun be otherwise) drop out early when checks fail. This allows us to flatten the huge indent levels to just 1. Aside: If a driver doesn't set ->fb_check_var, then FB_ACTIVATE_NOW does nothing. This bug exists ever since this code was extracted as a common helper in 2002, hence I decided against fixing it. Everyone just better have a fb_check_var to make sure things work correctly. Signed-off-by: Daniel Vetter Reviewed-by: Sam Ravnborg Reviewed-by: Maarten Lankhorst Cc: Daniel Vetter Cc: Bartlomiej Zolnierkiewicz Cc: "Michał Mirosław" Cc: Peter Rosin Cc: Hans de Goede Cc: Mikulas Patocka Link: https://patchwork.freedesktop.org/patch/msgid/20190528090304.9388-28-daniel.vetter@ffwll.ch drivers/video/fbdev/core/fbmem.c | 126 +++++++++++++++++++-------------------- 1 file changed, 63 insertions(+), 63 deletions(-) commit 3667617347ba42c85ec846a9ea5c33f5d6ab9e4a Author: Daniel Vetter Date: Tue May 28 11:02:57 2019 +0200 fbdev: remove FBINFO_MISC_USEREVENT around fb_blank With the recursion broken in the previous patch we can drop the FBINFO_MISC_USEREVENT flag around calls to fb_blank - recursion prevention was it's only job. Signed-off-by: Daniel Vetter Reviewed-by: Sam Ravnborg Reviewed-by: Maarten Lankhorst Cc: Daniel Vetter Cc: Bartlomiej Zolnierkiewicz Cc: Hans de Goede Cc: Yisheng Xie Cc: "Michał Mirosław" Cc: Peter Rosin Cc: Mikulas Patocka Cc: Rob Clark Link: https://patchwork.freedesktop.org/patch/msgid/20190528090304.9388-27-daniel.vetter@ffwll.ch drivers/video/fbdev/core/fbcon.c | 5 ++--- drivers/video/fbdev/core/fbmem.c | 3 --- drivers/video/fbdev/core/fbsysfs.c | 2 -- 3 files changed, 2 insertions(+), 8 deletions(-) commit de29ae5c092bd9a5360cfabf174b0f783248d278 Author: Daniel Vetter Date: Tue May 28 11:02:56 2019 +0200 fbmem: pull fbcon_fb_blanked out of fb_blank There's a callchain of: fbcon_fb_blanked -> do_(un)blank_screen -> consw->con_blank -> fbcon_blank -> fb_blank Things don't go horribly wrong because the BKL console_lock safes the day, but that's about it. And the seeming recursion is broken in 2 ways: - Starting from the fbdev ioctl we set FBINFO_MISC_USEREVENT, which tells the fbcon_blank code to not call fb_blank. This was required to not deadlock when recursing on the fb_notifier_chain mutex. - Starting from the con_blank hook we're getting saved by the console_blanked checks in do_blank/unblank_screen. Or at least that's my theory. Anyway, recursion isn't awesome, so let's stop it. Breaking the recursion avoids the need to be in the FBINFO_MISC_USEREVENT critical section, so lets move it out of that too. The astute reader will notice that fb_blank seems to require lock_fb_info(), which the fbcon code seems to ignore. I have no idea how to fix that problem, so let's keep ignoring it. v2: I forgot the sysfs blanking code. v3: Fix typo in callchain in the commmit message (Sam). Signed-off-by: Daniel Vetter Reviewed-by: Sam Ravnborg Reviewed-by: Maarten Lankhorst Cc: Sam Ravnborg Cc: Daniel Vetter Cc: Bartlomiej Zolnierkiewicz Cc: "Michał Mirosław" Cc: Peter Rosin Cc: Hans de Goede Cc: Mikulas Patocka Cc: Rob Clark Link: https://patchwork.freedesktop.org/patch/msgid/20190528090304.9388-26-daniel.vetter@ffwll.ch drivers/video/fbdev/core/fbmem.c | 4 +++- drivers/video/fbdev/core/fbsysfs.c | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) commit 7a625549ea8c14be70bc7cfaf30215401bba6da0 Author: Daniel Vetter Date: Tue May 28 11:02:55 2019 +0200 Revert "backlight/fbcon: Add FB_EVENT_CONBLANK" This reverts commit 994efacdf9a087b52f71e620b58dfa526b0cf928. The justification is that if hw blanking fails (i.e. fbops->fb_blank) fails, then we still want to shut down the backlight. Which is exactly _not_ what fb_blank() does and so rather inconsistent if we end up with different behaviour between fbcon and direct fbdev usage. Given that the entire notifier maze is getting in the way anyway I figured it's simplest to revert this not well justified commit. v2: Add static inline to the dummy version. Cc: Richard Purdie Signed-off-by: Daniel Vetter Reviewed-by: Sam Ravnborg Reviewed-by: Maarten Lankhorst Acked-by: Daniel Thompson Cc: Lee Jones Cc: Daniel Thompson Cc: Jingoo Han Cc: Bartlomiej Zolnierkiewicz Cc: Daniel Vetter Cc: Hans de Goede Cc: Yisheng Xie Cc: linux-fbdev@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20190528090304.9388-25-daniel.vetter@ffwll.ch drivers/video/backlight/backlight.c | 2 +- drivers/video/fbdev/core/fbcon.c | 14 +------------- drivers/video/fbdev/core/fbmem.c | 1 + include/linux/fb.h | 4 +--- include/linux/fbcon.h | 2 ++ 5 files changed, 6 insertions(+), 17 deletions(-) commit 0526c2239ad8ceef98652fe8e059044c24c62ea7 Author: Daniel Vetter Date: Tue May 28 11:02:54 2019 +0200 fbdev: Call fbcon_get_requirement directly Pretty simple case really. v2: Forgot to remove a break; v3: Add static inline to the dummy versions. Signed-off-by: Daniel Vetter Reviewed-by: Sam Ravnborg Reviewed-by: Maarten Lankhorst Cc: Bartlomiej Zolnierkiewicz Cc: Daniel Vetter Cc: Hans de Goede Cc: "Steven Rostedt (VMware)" Cc: Prarit Bhargava Cc: Kees Cook Cc: Yisheng Xie Cc: "Michał Mirosław" Cc: Peter Rosin Cc: Mikulas Patocka Cc: linux-fbdev@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20190528090304.9388-24-daniel.vetter@ffwll.ch drivers/video/fbdev/core/fbcon.c | 9 ++------- drivers/video/fbdev/core/fbmem.c | 5 +---- include/linux/fb.h | 2 -- include/linux/fbcon.h | 4 ++++ 4 files changed, 7 insertions(+), 13 deletions(-) commit 13ff178ccd6d3b8074c542a911300b79c4eec255 Author: Daniel Vetter Date: Tue May 28 11:02:53 2019 +0200 fbcon: Call fbcon_mode_deleted/new_modelist directly I'm not entirely clear on what new_modelist actually does, it seems exclusively for a sysfs interface. Which in the end does amount to a normal fb_set_par to check the mode, but then takes a different path in both fbmem.c and fbcon.c. I have no idea why these 2 paths are different, but then I also don't really want to find out. So just do the simple conversion to a direct function call. v2: static inline for the dummy versions, I forgot. Signed-off-by: Daniel Vetter Reviewed-by: Sam Ravnborg Reviewed-by: Maarten Lankhorst Cc: Bartlomiej Zolnierkiewicz Cc: Daniel Vetter Cc: Hans de Goede Cc: Mikulas Patocka Cc: Sergey Senozhatsky Cc: Kees Cook Cc: Peter Rosin Cc: Yisheng Xie Cc: "Michał Mirosław" Cc: linux-fbdev@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20190528090304.9388-23-daniel.vetter@ffwll.ch drivers/video/fbdev/core/fbcon.c | 14 +++----------- drivers/video/fbdev/core/fbmem.c | 22 +++++++--------------- include/linux/fb.h | 5 ----- include/linux/fbcon.h | 6 ++++++ 4 files changed, 16 insertions(+), 31 deletions(-) commit 50c5056356340c8b5be90440d2f32fec8c47a7c3 Author: Daniel Vetter Date: Tue May 28 11:02:52 2019 +0200 fbdev: directly call fbcon_suspended/resumed With the sh_mobile notifier removed we can just directly call the fbcon code here. v2: Remove now unused local variable. v3: fixup !CONFIG_FRAMEBUFFER_CONSOLE, noticed by kbuild Signed-off-by: Daniel Vetter Reviewed-by: Sam Ravnborg Reviewed-by: Maarten Lankhorst Cc: Bartlomiej Zolnierkiewicz Cc: Daniel Vetter Cc: Hans de Goede Cc: Greg Kroah-Hartman Cc: Prarit Bhargava Cc: Kees Cook Cc: Konstantin Khorenko Cc: Yisheng Xie Cc: "Michał Mirosław" Cc: Peter Rosin Cc: Mikulas Patocka Cc: linux-fbdev@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20190528090304.9388-22-daniel.vetter@ffwll.ch drivers/video/fbdev/core/fbcon.c | 10 ++-------- drivers/video/fbdev/core/fbmem.c | 7 ++----- include/linux/fb.h | 8 -------- include/linux/fbcon.h | 4 ++++ 4 files changed, 8 insertions(+), 21 deletions(-) commit 9c22ad983328d6083420b5fcc035f001b7c8f875 Author: Daniel Vetter Date: Tue May 28 11:02:51 2019 +0200 fbdev/sh_mob: Remove fb notifier callback This seems to be entirely defunct: - The FB_EVEN_SUSPEND/RESUME events are only sent out by fb_set_suspend. Which is supposed to be called by drivers in their suspend/resume hooks, and not itself call into drivers. Luckily sh_mob doesn't call fb_set_suspend, so this seems to do nothing useful. - The notify hook calls sh_mobile_fb_reconfig() which in turn can call into the fb notifier. Or attempt too, since that would deadlock. So looks like leftover hacks from when this was originally introduced in commit 6011bdeaa6089d49c02de69f05980da7bad314ab Author: Guennadi Liakhovetski Date: Wed Jul 21 10:13:21 2010 +0000 fbdev: sh-mobile: HDMI support for SH-Mobile SoCs So let's just remove it. Signed-off-by: Daniel Vetter Reviewed-by: Geert Uytterhoeven Tested-by: Geert Uytterhoeven Reviewed-by: Sam Ravnborg Reviewed-by: Maarten Lankhorst Cc: Daniel Vetter Cc: Bartlomiej Zolnierkiewicz Cc: Markus Elfring Cc: Geert Uytterhoeven Cc: Wolfram Sang Link: https://patchwork.freedesktop.org/patch/msgid/20190528090304.9388-21-daniel.vetter@ffwll.ch drivers/video/fbdev/sh_mobile_lcdcfb.c | 38 ---------------------------------- 1 file changed, 38 deletions(-) commit 927ab1aed13d6a5188b764d830197d79b8c0e1ad Author: Daniel Vetter Date: Tue May 28 11:02:50 2019 +0200 fbdev: unify unlink_framebuffer paths For some reasons the pm_vt_switch_unregister call was missing from the direct unregister_framebuffer path. Fix this. v2: fbinfo->dev is used to decided whether unlink_framebuffer has been called already. I botched that in v1. Make this all clearer by inlining __unlink_framebuffer. v3: Fix typoe in subject (Maarten). Signed-off-by: Daniel Vetter Reviewed-by: Sam Ravnborg Reviewed-by: Maarten Lankhorst Cc: Maarten Lankhorst Cc: Bartlomiej Zolnierkiewicz Cc: Daniel Vetter Cc: "Michał Mirosław" Cc: Peter Rosin Cc: Hans de Goede Cc: Mikulas Patocka Link: https://patchwork.freedesktop.org/patch/msgid/20190528090304.9388-20-daniel.vetter@ffwll.ch drivers/video/fbdev/core/fbmem.c | 47 +++++++++++++++++----------------------- 1 file changed, 20 insertions(+), 27 deletions(-) commit deb00d2785bedd379caa7aaf18c1ffb824580b9d Author: Daniel Vetter Date: Tue May 28 11:02:49 2019 +0200 fbdev: make unregister/unlink functions not fail Except for driver bugs (which we'll catch with a WARN_ON) this is only to report failures of the new driver taking over the console. There's nothing the outgoing driver can do about that, and no one ever bothered to actually look at these return values. So remove them all. v2: fixup unregister_framebuffer in savagefb, fbtft, ivtvfb, and neofb drivers, reported by kbuild. Signed-off-by: Daniel Vetter Reviewed-by: Sam Ravnborg Reviewed-by: Maarten Lankhorst Cc: Bartlomiej Zolnierkiewicz Cc: Daniel Vetter Cc: "Michał Mirosław" Cc: Peter Rosin Cc: Hans de Goede Cc: Mikulas Patocka Cc: linux-fbdev@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20190528090304.9388-19-daniel.vetter@ffwll.ch drivers/media/pci/ivtv/ivtvfb.c | 6 +-- drivers/staging/fbtft/fbtft-core.c | 4 +- drivers/video/fbdev/core/fbmem.c | 73 +++++++++------------------- drivers/video/fbdev/neofb.c | 9 +--- drivers/video/fbdev/savage/savagefb_driver.c | 9 +--- include/linux/fb.h | 4 +- 6 files changed, 31 insertions(+), 74 deletions(-) commit 0e0f3250d4402d60f4571d076ab27d5af049853e Author: Daniel Vetter Date: Tue May 28 11:02:48 2019 +0200 fbcon: call fbcon_fb_bind directly Also remove the error return value. That's all errors for either driver bugs (trying to unbind something that isn't bound), or errors of the new driver that will take over. There's nothing the outgoing driver can do about this anyway, so switch over to void. Signed-off-by: Daniel Vetter Reviewed-by: Sam Ravnborg Reviewed-by: Maarten Lankhorst Cc: Bartlomiej Zolnierkiewicz Cc: Daniel Vetter Cc: Hans de Goede Cc: Sergey Senozhatsky Cc: Peter Rosin Cc: Kees Cook Cc: Konstantin Khorenko Cc: Yisheng Xie Cc: "Michał Mirosław" Cc: Mikulas Patocka Cc: Thomas Zimmermann Cc: linux-fbdev@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20190528090304.9388-18-daniel.vetter@ffwll.ch drivers/video/fbdev/core/fbcon.c | 24 +++++++----------------- drivers/video/fbdev/core/fbmem.c | 7 ++----- include/linux/fb.h | 2 -- include/linux/fbcon.h | 2 ++ 4 files changed, 11 insertions(+), 24 deletions(-) commit cf4a3ae4ef3399179166a464af1d6b172225bef4 Author: Daniel Vetter Date: Tue May 28 11:02:47 2019 +0200 fbdev: lock_fb_info cannot fail Ever since commit c47747fde931c02455683bd00ea43eaa62f35b0e Author: Linus Torvalds Date: Wed May 11 14:58:34 2011 -0700 fbmem: make read/write/ioctl use the frame buffer at open time fbdev has gained proper refcounting for the fbinfo attached to any open files, which means that the backing driver (stored in fb_info->fbops) cannot untimely disappear anymore. The only thing that can happen is that the entire device just outright disappears and gets unregistered, but file_fb_info does check for that. Except that it's racy - it only checks once at the start of a file_ops, there's no guarantee that the underlying fbdev won't untimely disappear. Aside: A proper way to fix that race is probably to replicate the srcu trickery we've rolled out in drm. But given that this race has existed since forever it's probably not one we need to fix right away. do_unregister_framebuffer also nowhere clears fb_info->fbops, hence the check in lock_fb_info can't possible catch a disappearing fbdev later on. Long story short: Ever since the above commit the fb_info->fbops checks have essentially become dead code. Remove this all. Aside from the file_ops callbacks, and stuff called from there there's only register/unregister code left. If that goes wrong a driver managed to register/unregister a device instance twice or in the wrong order. That's just a driver bug. v2: - fb_mmap had an open-coded version of the fbinfo->fops check, because it doesn't need the fbinfo->lock. Delete that too. - Use the wrapper function in fb_open/release now, since no difference anymore. Signed-off-by: Daniel Vetter Reviewed-by: Sam Ravnborg Reviewed-by: Maarten Lankhorst Cc: Bartlomiej Zolnierkiewicz Cc: Daniel Vetter Cc: Hans de Goede Cc: Yisheng Xie Cc: Sergey Senozhatsky Cc: "Noralf Trønnes" Cc: Peter Rosin Cc: "Michał Mirosław" Cc: Mikulas Patocka Cc: "Gustavo A. R. Silva" Cc: linux-fbdev@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20190528090304.9388-17-daniel.vetter@ffwll.ch drivers/video/fbdev/core/fbcmap.c | 6 +--- drivers/video/fbdev/core/fbcon.c | 3 +- drivers/video/fbdev/core/fbmem.c | 73 +++++++++------------------------------ include/linux/fb.h | 5 ++- 4 files changed, 23 insertions(+), 64 deletions(-) commit cd90b5fdfad5b1c41f3a87fd3a928f574bc60933 Author: Daniel Vetter Date: Tue May 28 11:02:46 2019 +0200 fbdev/atyfb: lock_fb_info can't fail It's properly protected by reboot_lock. Signed-off-by: Daniel Vetter Reviewed-by: Sam Ravnborg Reviewed-by: Maarten Lankhorst Cc: Mikulas Patocka Cc: "David S. Miller" Cc: "Ville Syrjälä" Cc: Bartlomiej Zolnierkiewicz Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190528090304.9388-16-daniel.vetter@ffwll.ch drivers/video/fbdev/aty/atyfb_base.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 9ef373923756b96680853d5b93578986dd07169a Author: Daniel Vetter Date: Tue May 28 11:02:45 2019 +0200 staging/olpc: lock_fb_info can't fail Simply because olpc never unregisters the damn thing. It also registers the framebuffer directly by poking around in fbdev core internals, so it's all around rather broken. Signed-off-by: Daniel Vetter Reviewed-by: Sam Ravnborg Acked-by: Greg Kroah-Hartman Reviewed-by: Maarten Lankhorst Cc: Greg Kroah-Hartman Cc: Jens Frederich Cc: Daniel Drake Cc: Jon Nettleton Link: https://patchwork.freedesktop.org/patch/msgid/20190528090304.9388-15-daniel.vetter@ffwll.ch drivers/staging/olpc_dcon/olpc_dcon.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 34f31f14c477f3c27e0fa0899db1bb6648cf53ca Author: Daniel Vetter Date: Tue May 28 11:02:44 2019 +0200 fbdev: sysfs files can't disappear before the device is gone Which means lock_fb_info can never fail. Remove the error handling. Signed-off-by: Daniel Vetter Reviewed-by: Sam Ravnborg Reviewed-by: Maarten Lankhorst Cc: Daniel Vetter Cc: Bartlomiej Zolnierkiewicz Cc: Rob Clark Link: https://patchwork.freedesktop.org/patch/msgid/20190528090304.9388-14-daniel.vetter@ffwll.ch drivers/video/fbdev/core/fbsysfs.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 1e16eaebe2ea777a19b13cd1916992b544874d42 Author: Daniel Vetter Date: Tue May 28 11:02:43 2019 +0200 fbdev/omap: sysfs files can't disappear before the device is gone Which means lock_fb_info can never fail. Remove the error handling. Signed-off-by: Daniel Vetter Reviewed-by: Sam Ravnborg Reviewed-by: Maarten Lankhorst Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190528090304.9388-13-daniel.vetter@ffwll.ch drivers/video/fbdev/omap2/omapfb/omapfb-sysfs.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) commit 0fe66f327c464943a969ac3ad5f7a07a7cd4674e Author: Daniel Vetter Date: Tue May 28 11:02:42 2019 +0200 fbdev/sh_mobile: remove sh_mobile_lcdc_display_notify It's dead code, and removing it avoids me having to understand what it's doing with lock_fb_info. v2: Also remove sh_mobile_lcdc_must_reconfigure, now unused (Sam). Signed-off-by: Daniel Vetter Reviewed-by: Geert Uytterhoeven (v1) Reviewed-by: Sam Ravnborg Reviewed-by: Maarten Lankhorst Cc: Geert Uytterhoeven Cc: Daniel Vetter Cc: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20190528090304.9388-12-daniel.vetter@ffwll.ch drivers/video/fbdev/sh_mobile_lcdcfb.c | 82 ---------------------------------- drivers/video/fbdev/sh_mobile_lcdcfb.h | 5 --- 2 files changed, 87 deletions(-) commit 97b67986f1451c772b488d597310f95c14547cce Author: Daniel Vetter Date: Tue May 28 11:02:41 2019 +0200 fbcon: call fbcon_fb_(un)registered directly With commit 6104c37094e729f3d4ce65797002112735d49cd1 Author: Daniel Vetter Date: Tue Aug 1 17:32:07 2017 +0200 fbcon: Make fbcon a built-time depency for fbdev we have a static dependency between fbcon and fbdev, and we can replace the indirection through the notifier chain with a function call. v2: Sam Ravnborg noticed that mach-pxa/am200epd.c has a notifier too, and listens to this. ... Looking at the code it seems to wait for some fb to show up, so that it can get the framebuffer base address from the fb_info struct. I suspect his is some firmware fbdev. Then it uses that information to let the real fbdev driver (metronomefb.c by the looks) get at the framebuffer memory. This doesn't looke like it's easy to fix (except by deleting the entire thing, seems untouched since 2008, we might be able to get away with that), so let's just stuff a few #ifdef into fb.h and fbmem.c and cry over them for a bit. Signed-off-by: Daniel Vetter Reviewed-by: Sam Ravnborg Reviewed-by: Maarten Lankhorst Cc: Bartlomiej Zolnierkiewicz Cc: Daniel Vetter Cc: Hans de Goede Cc: Greg Kroah-Hartman Cc: "Noralf Trønnes" Cc: Yisheng Xie Cc: Peter Rosin Cc: "Michał Mirosław" Cc: Thomas Zimmermann Cc: Mikulas Patocka Cc: linux-fbdev@vger.kernel.org Cc: Daniel Mack Cc: Haojian Zhuang Cc: Robert Jarzmik Cc: Konstantin Khorenko Cc: Prarit Bhargava Cc: Gerd Hoffmann Cc: Steve Sakoman Cc: Steve Sakoman Cc: linux-arm-kernel@lists.infradead.org Link: https://patchwork.freedesktop.org/patch/msgid/20190528090304.9388-11-daniel.vetter@ffwll.ch arch/arm/mach-pxa/am200epd.c | 13 +++++++++++-- drivers/video/fbdev/core/fbcon.c | 14 +++----------- drivers/video/fbdev/core/fbmem.c | 24 +++++++++++++++++------- include/linux/fb.h | 7 +++++-- include/linux/fbcon.h | 4 ++++ 5 files changed, 40 insertions(+), 22 deletions(-) commit 1f4ed2fb01f80faa722f71efd3791e1d1f337010 Author: Daniel Vetter Date: Tue May 28 11:02:40 2019 +0200 fbcon: Remove fbcon_has_exited This is unused code since commit 6104c37094e729f3d4ce65797002112735d49cd1 Author: Daniel Vetter Date: Tue Aug 1 17:32:07 2017 +0200 fbcon: Make fbcon a built-time depency for fbdev when fbcon was made a compile-time static dependency of fbdev. We can't exit fbcon anymore without exiting fbdev first, which only works if all fbdev drivers have unloaded already. Hence this is all dead code. v2: I missed that fbcon_exit is also called from con_deinit stuff, and there fbcon_has_exited prevents double-cleanup. But we can fix that by properly resetting con2fb_map[] to all -1, which is used everywhere else to indicate "no fb_info allocate to this console". With that change the double-cleanup (which resulted in a module refcount underflow, among other things) is prevented. Aside: con2fb_map is a signed char, so don't register more than 128 fb_info or hilarity will ensue. v3: CI showed me that I still didn't fully understand what's going on here. The leaked references in con2fb_map have been used upon rebinding the fb console in fbcon_init. It worked because fbdev unregistering still cleaned out con2fb_map, and reset it to info_idx. If the last fbdev driver unregistered, then it also reset info_idx, and unregistered the fbcon driver. Imo that's all a bit fragile, so let's keep the con2fb_map reset to -1, and in fbcon_init pick info_idx if we're starting fresh. That means unbinding and rebinding will cleanse the mapping, but why are you doing that if you want to retain the mapping, so should be fine. Also, I think info_idx == -1 is impossible in fbcon_init - we unregister the fbcon in that case. So catch&warn about that. v4: Drop unecessary assignment - I forgot to delete the first assignment of info in fbcon_init. Cc: Sam Ravnborg Reviewed-by: Sam Ravnborg Reviewed-by: Maarten Lankhorst Signed-off-by: Daniel Vetter Cc: Maarten Lankhorst Cc: Bartlomiej Zolnierkiewicz Cc: Daniel Vetter Cc: Hans de Goede Cc: "Noralf Trønnes" Cc: Yisheng Xie Cc: Konstantin Khorenko Cc: Prarit Bhargava Cc: Kees Cook Link: https://patchwork.freedesktop.org/patch/msgid/20190528090304.9388-10-daniel.vetter@ffwll.ch drivers/video/fbdev/core/fbcon.c | 41 +++++++--------------------------------- 1 file changed, 7 insertions(+), 34 deletions(-) commit 50233393f0cf9babe1361ed5afe86fcabb32f648 Author: Daniel Vetter Date: Tue May 28 11:02:39 2019 +0200 fbcon: s/struct display/struct fbcon_display/ This was formerly used in fbdev drivers (not sure why, predates most git history), but now it's entirely an fbcon internal thing. Give it a more specific name. Signed-off-by: Daniel Vetter Reviewed-by: Sam Ravnborg Reviewed-by: Maarten Lankhorst Cc: Bartlomiej Zolnierkiewicz Cc: Daniel Vetter Cc: Hans de Goede Cc: Greg Kroah-Hartman Cc: Kees Cook Cc: Prarit Bhargava Cc: Konstantin Khorenko Cc: Peter Rosin Cc: Yisheng Xie Link: https://patchwork.freedesktop.org/patch/msgid/20190528090304.9388-9-daniel.vetter@ffwll.ch drivers/video/fbdev/core/fbcon.c | 74 ++++++++++++++++++++-------------------- drivers/video/fbdev/core/fbcon.h | 6 ++-- 2 files changed, 40 insertions(+), 40 deletions(-) commit 127cd8d33ec75637a29fec75b14605e6b1b871a4 Author: Daniel Vetter Date: Tue May 28 11:02:38 2019 +0200 fbdev/aty128fb: Remove dead code Motivated because it contains a struct display, which is a fbcon internal data structure that I want to rename. It seems to have been formerly used in drivers, but that's very long time ago. Signed-off-by: Daniel Vetter Reviewed-by: Sam Ravnborg Reviewed-by: Maarten Lankhorst Cc: Paul Mackerras Cc: linux-fbdev@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20190528090304.9388-8-daniel.vetter@ffwll.ch drivers/video/fbdev/aty/aty128fb.c | 64 -------------------------------------- 1 file changed, 64 deletions(-) commit 561f1f6e023bd548f1d24f80502eb6c075f2a467 Author: Daniel Vetter Date: Tue May 28 11:02:37 2019 +0200 fbdev/cyber2000: Remove struct display Entirely unused. Signed-off-by: Daniel Vetter Reviewed-by: Sam Ravnborg Reviewed-by: Maarten Lankhorst Cc: Russell King Cc: linux-arm-kernel@lists.infradead.org Link: https://patchwork.freedesktop.org/patch/msgid/20190528090304.9388-7-daniel.vetter@ffwll.ch drivers/video/fbdev/cyber2000fb.c | 1 - 1 file changed, 1 deletion(-) commit 390e5de11284a1615662a2773c73b71884310dbe Author: Daniel Vetter Date: Tue May 28 11:02:36 2019 +0200 fbdev/sa1100fb: Remove dead code Motivated because it contains a struct display, which is a fbcon internal data structure that I want to rename. It seems to have been formerly used in drivers, but that's very long time ago. Signed-off-by: Daniel Vetter Reviewed-by: Sam Ravnborg Reviewed-by: Maarten Lankhorst Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190528090304.9388-6-daniel.vetter@ffwll.ch drivers/video/fbdev/sa1100fb.c | 25 ------------------------- 1 file changed, 25 deletions(-) commit ddde3c18b70061cc09b84a52624909349c212822 Author: Daniel Vetter Date: Tue May 28 11:02:35 2019 +0200 vt: More locking checks I honestly have no idea what the subtle differences between con_is_visible, con_is_fg (internal to vt.c) and con_is_bound are. But it looks like both vc->vc_display_fg and con_driver_map are protected by the console_lock, so probably better if we hold that when checking this. To do that I had to deinline the con_is_visible function. Signed-off-by: Daniel Vetter Reviewed-by: Sam Ravnborg Acked-by: Greg Kroah-Hartman Reviewed-by: Maarten Lankhorst Cc: Greg Kroah-Hartman Cc: Nicolas Pitre Cc: Martin Hostettler Cc: Adam Borowski Cc: Daniel Vetter Cc: Mikulas Patocka Link: https://patchwork.freedesktop.org/patch/msgid/20190528090304.9388-5-daniel.vetter@ffwll.ch drivers/tty/vt/vt.c | 16 ++++++++++++++++ include/linux/console_struct.h | 5 +---- 2 files changed, 17 insertions(+), 4 deletions(-) commit a135513c0b579be55c534b35e628be55578576b2 Author: Daniel Vetter Date: Tue May 28 11:02:34 2019 +0200 vt: might_sleep() annotation for do_blank_screen For symmetry reasons with do_unblank_screen, except without the oops_in_progress special case. Just a drive-by annotation while I'm trying to untangle the fbcon vs. fbdev screen blank/unblank maze. Signed-off-by: Daniel Vetter Reviewed-by: Sam Ravnborg Acked-by: Greg Kroah-Hartman Reviewed-by: Maarten Lankhorst Cc: Greg Kroah-Hartman Cc: Nicolas Pitre Cc: Adam Borowski Cc: Martin Hostettler Cc: Daniel Vetter Cc: Mikulas Patocka Link: https://patchwork.freedesktop.org/patch/msgid/20190528090304.9388-4-daniel.vetter@ffwll.ch drivers/tty/vt/vt.c | 2 ++ 1 file changed, 2 insertions(+) commit 7076404f7c8d3fc01e8cb8ea259c7552b2061ae0 Author: Daniel Vetter Date: Tue May 28 11:02:33 2019 +0200 fbdev: locking check for fb_set_suspend Just drive-by, nothing systematic yet. Signed-off-by: Daniel Vetter Reviewed-by: Sam Ravnborg Reviewed-by: Maarten Lankhorst Cc: Bartlomiej Zolnierkiewicz Cc: Daniel Vetter Cc: "Michał Mirosław" Cc: Peter Rosin Cc: Hans de Goede Cc: Thomas Zimmermann Cc: Manfred Schlaegl Cc: Mikulas Patocka Cc: Kees Cook Link: https://patchwork.freedesktop.org/patch/msgid/20190528090304.9388-3-daniel.vetter@ffwll.ch drivers/video/fbdev/core/fbmem.c | 2 ++ 1 file changed, 2 insertions(+) commit 214b0dd591abfde8cbc5536cd0a6b996a659c23e Author: Daniel Vetter Date: Tue May 28 11:02:32 2019 +0200 dummycon: Sprinkle locking checks As part of trying to understand the locking (or lack thereof) in the fbcon/vt/fbdev maze, annotate everything. Signed-off-by: Daniel Vetter Reviewed-by: Sam Ravnborg Reviewed-by: Maarten Lankhorst Cc: Bartlomiej Zolnierkiewicz Cc: Hans de Goede Cc: Daniel Vetter Cc: Greg Kroah-Hartman Cc: Kees Cook Cc: Nicolas Pitre Link: https://patchwork.freedesktop.org/patch/msgid/20190528090304.9388-2-daniel.vetter@ffwll.ch drivers/video/console/dummycon.c | 6 ++++++ 1 file changed, 6 insertions(+) commit e0ffbd37f3deb0100f4ae578be9bbd135c8224ce Merge: f2dec9a2760a dbbc6e687776 Author: David S. Miller Date: Wed Jun 12 11:23:45 2019 -0700 Merge branch 'ena-dynamic-queue-sizes' Sameeh Jubran says: ==================== Support for dynamic queue size changes This patchset introduces the following: * add new admin command for supporting different queue size for Tx/Rx * add support for Tx/Rx queues size modification through ethtool * allow queues allocation backoff when low on memory * update driver version Difference from v2: * Dropped superfluous range checks which are already done in ethtool. [patch 5/7] * Dropped inline keyword from function. [patch 4/7] * Added a new patch which drops inline keyword all *.c files. [patch 6/7] Difference from v1: * Changed ena_update_queue_sizes() signature to use u32 instead of int type for the size arguments. [patch 5/7] ==================== Signed-off-by: David S. Miller commit dbbc6e6877768a03092751edf89d012d561b4553 Author: Sameeh Jubran Date: Tue Jun 11 14:58:11 2019 +0300 net: ena: update driver version from 2.0.3 to 2.1.0 Update driver version to match device specification. Signed-off-by: Sameeh Jubran Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_netdev.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c2b542044761965db0e4cc400ab6abf670fc25b7 Author: Sameeh Jubran Date: Tue Jun 11 14:58:10 2019 +0300 net: ena: remove inline keyword from functions in *.c Let the compiler decide if the function should be inline in *.c files Signed-off-by: Sameeh Jubran Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_com.c | 6 +++--- drivers/net/ethernet/amazon/ena/ena_eth_com.c | 26 +++++++++++++------------- drivers/net/ethernet/amazon/ena/ena_netdev.c | 16 ++++++++-------- 3 files changed, 24 insertions(+), 24 deletions(-) commit eece4d2ab9d214e3b12f5ac1ed189a05793b28a5 Author: Sameeh Jubran Date: Tue Jun 11 14:58:09 2019 +0300 net: ena: add ethtool function for changing io queue sizes Implement the set_ringparam() function of the ethtool interface to enable the changing of io queue sizes. Signed-off-by: Arthur Kiyanovski Signed-off-by: Sameeh Jubran Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_ethtool.c | 22 ++++++++++++++++++++++ drivers/net/ethernet/amazon/ena/ena_netdev.c | 14 ++++++++++++++ drivers/net/ethernet/amazon/ena/ena_netdev.h | 5 ++++- 3 files changed, 40 insertions(+), 1 deletion(-) commit 13ca32a69e29f3a0fe72094dd930f312b3f3ee44 Author: Sameeh Jubran Date: Tue Jun 11 14:58:08 2019 +0300 net: ena: allow queue allocation backoff when low on memory If there is not enough memory to allocate io queues the driver will try to allocate smaller queues. The backoff algorithm is as follows: 1. Try to allocate TX and RX and if successful. 1.1. return success 2. Divide by 2 the size of the larger of RX and TX queues (or both if their size is the same). 3. If TX or RX is smaller than 256 3.1. return failure. 4. else 4.1. go back to 1. Also change the tx_queue_size, rx_queue_size field names in struct adapter to requested_tx_queue_size and requested_rx_queue_size, and use RX and TX queue 0 for actual queue sizes. Explanation: The original fields were useless as they were simply used to assign values once from them to each of the queues in the adapter in ena_probe(). They could simply be deleted. However now that we have a backoff feature, we have use for them. In case of backoff there is a difference between the requested queue sizes and the actual sizes. Therefore there is a need to save the requested queue size for future retries of queue allocation (for example if allocation failed and then ifdown + ifup was called we want to start the allocation from the original requested size of the queues). Signed-off-by: Arthur Kiyanovski Signed-off-by: Sameeh Jubran Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_ethtool.c | 4 +- drivers/net/ethernet/amazon/ena/ena_netdev.c | 159 ++++++++++++++++++++------ drivers/net/ethernet/amazon/ena/ena_netdev.h | 6 +- 3 files changed, 127 insertions(+), 42 deletions(-) commit 9f9ae3f98b8d8b8aa709831057759dbb52ba5083 Author: Sameeh Jubran Date: Tue Jun 11 14:58:07 2019 +0300 net: ena: make ethtool show correct current and max queue sizes Currently ethtool -g shows the same size for current and max queue sizes. Signed-off-by: Arthur Kiyanovski Signed-off-by: Sameeh Jubran Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_ethtool.c | 10 ++++------ drivers/net/ethernet/amazon/ena/ena_netdev.c | 2 ++ 2 files changed, 6 insertions(+), 6 deletions(-) commit 31aa9857f1733403f2eb12d51c1cec20a22483d9 Author: Sameeh Jubran Date: Tue Jun 11 14:58:06 2019 +0300 net: ena: enable negotiating larger Rx ring size Use MAX_QUEUES_EXT get feature capability to query the device. Signed-off-by: Netanel Belgazal Signed-off-by: Sameeh Jubran Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_netdev.c | 144 ++++++++++++++++++--------- drivers/net/ethernet/amazon/ena/ena_netdev.h | 15 +++ 2 files changed, 110 insertions(+), 49 deletions(-) commit ba8ef506fb91005fc4808370b7587ab7bf4bd918 Author: Arthur Kiyanovski Date: Tue Jun 11 14:58:05 2019 +0300 net: ena: add MAX_QUEUES_EXT get feature admin command Add a new admin command to support different queue size for Tx/Rx queues (the change also support different SQ/CQ sizes) Signed-off-by: Arthur Kiyanovski Signed-off-by: Sameeh Jubran Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_admin_defs.h | 56 ++++++++++++++++- drivers/net/ethernet/amazon/ena/ena_com.c | 76 +++++++++++++++--------- drivers/net/ethernet/amazon/ena/ena_com.h | 3 + 3 files changed, 105 insertions(+), 30 deletions(-) commit f2dec9a2760a02357e63374fb5352ef5c478c3f1 Merge: a41efedfaf95 ab1e6de2bd49 Author: David S. Miller Date: Wed Jun 12 11:22:18 2019 -0700 Merge branch 'dpaa2-eth-Add-support-for-MQPRIO-offloading' Ioana Radulescu says: ==================== dpaa2-eth: Add support for MQPRIO offloading Add support for adding multiple TX traffic classes with mqprio. We can have up to one netdev queue and hardware frame queue per TC per core. ==================== Signed-off-by: David S. Miller commit ab1e6de2bd49ff0170df7094a47bfe76ece718cc Author: Ioana Radulescu Date: Tue Jun 11 14:50:03 2019 +0300 dpaa2-eth: Add mqprio support Implement mqprio qdisc support by mapping traffic classes to different hardware enqueue priorities. The maximum number of supported traffic classes is an attribute of each DPNI object. The traffic classes map to hardware priorities from highest (0) to lowest (highest prio number). The skb priority information received from the stack is used to select the hardware Tx queue on which to enqueue the frame. Signed-off-by: Ioana Radulescu Signed-off-by: Bogdan Purcareata Signed-off-by: David S. Miller drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 67 ++++++++++++++++++++++-- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h | 2 + 2 files changed, 64 insertions(+), 5 deletions(-) commit 15c87f6b0d10203abdd34ef8c9b243d7fe0ca58a Author: Ioana Radulescu Date: Tue Jun 11 14:50:02 2019 +0300 dpaa2-eth: Support multiple traffic classes on Tx DPNI objects can have multiple traffic classes, as reflected by the num_tc attribute. Until now we ignored its value and only used traffic class 0. This patch adds support for multiple Tx traffic classes; we have num_queues x num_tcs hardware queues available for each interface. Signed-off-by: Ioana Radulescu Signed-off-by: David S. Miller drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 23 +++++++++++++---------- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h | 7 ++++++- 2 files changed, 19 insertions(+), 11 deletions(-) commit 06d5b1791126d73a06b0604daeef9d25ffc14d73 Author: Ioana Radulescu Date: Tue Jun 11 14:50:01 2019 +0300 dpaa2-eth: Refactor xps code Move the code configuring xps on the netdev TX queues to a separate function. A subsequent patch will need to call this in another context as well. Signed-off-by: Ioana Radulescu Signed-off-by: David S. Miller drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 45 +++++++++++++++++------- 1 file changed, 32 insertions(+), 13 deletions(-) commit a41efedfaf956698bcf5658daaadbe43b4ca1f46 Author: Grygorii Strashko Date: Tue Jun 11 14:16:32 2019 +0300 net: ethernet: ti: cpts: fix build failure for powerpc Add dependency to TI CPTS from Common CLK framework COMMON_CLK to fix allyesconfig build for Powerpc: drivers/net/ethernet/ti/cpts.c: In function 'cpts_of_mux_clk_setup': drivers/net/ethernet/ti/cpts.c:567:2: error: implicit declaration of function 'of_clk_parent_fill'; did you mean 'of_clk_get_parent_name'? [-Werror=implicit-function-declaration] of_clk_parent_fill(refclk_np, parent_names, num_parents); ^~~~~~~~~~~~~~~~~~ of_clk_get_parent_name Fixes: a3047a81ba13 ("net: ethernet: ti: cpts: add support for ext rftclk selection") Reported-by: Stephen Rothwell Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller drivers/net/ethernet/ti/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 2131fba53186c22254ab762655675d3179adfb0f Author: Florian Fainelli Date: Mon Jun 10 12:31:49 2019 -0700 net: dsa: Deal with non-existing PHY/fixed-link We need to specifically deal with phylink_of_phy_connect() returning -ENODEV, because this can happen when a CPU/DSA port does connect neither to a PHY, nor has a fixed-link property. This is a valid use case that is permitted by the binding and indicates to the switch: auto-configure port with maximum capabilities. Fixes: 0e27921816ad ("net: dsa: Use PHYLINK for the CPU/DSA ports") Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller net/dsa/port.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fcf15367cbd90e5fd6f69d73a1d512fbb7ca2748 Author: Vivien Didelot Date: Wed Jun 12 12:42:47 2019 -0400 net: dsa: mv88e6xxx: lock mutex in port_fdb_dump During a port FDB dump operation, the mutex protecting the concurrent access to the switch registers is currently held by the internal mv88e6xxx_port_db_dump and mv88e6xxx_port_db_dump_fid helpers. It must be held at the higher level in mv88e6xxx_port_fdb_dump which is called directly by DSA through ds->ops->port_fdb_dump. Fix this. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 0114214eca21e85d66a5e206f803db42d1d07960 Author: Nicolas Saenz Julienne Date: Wed Jun 12 14:25:27 2019 +0200 dt-bindings: net: wiznet: add w5x00 support Add bindings for Wiznet's w5x00 series of SPI interfaced Ethernet chips. Based on the bindings for microchip,enc28j60. Signed-off-by: Nicolas Saenz Julienne Signed-off-by: David S. Miller .../devicetree/bindings/net/wiznet,w5x00.txt | 50 ++++++++++++++++++++++ 1 file changed, 50 insertions(+) commit b9dd694eb058b30575f73af8950b35ab93a7c65c Author: Nicolas Saenz Julienne Date: Wed Jun 12 14:25:25 2019 +0200 net: ethernet: wiznet: w5X00 add device tree support The w5X00 chip provides an SPI to Ethernet inteface. This patch allows platform devices to be defined through the device tree. Signed-off-by: Nicolas Saenz Julienne Signed-off-by: David S. Miller drivers/net/ethernet/wiznet/w5100-spi.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) commit 7a096d579e8e2bd8b8ff34d5ef3093cd9bf3f13b Author: Vlad Buslov Date: Wed Jun 12 10:14:35 2019 +0300 net: sched: ingress: set 'unlocked' flag for Qdisc ops To remove rtnl lock dependency in tc filter update API when using ingress Qdisc, set QDISC_CLASS_OPS_DOIT_UNLOCKED flag in ingress Qdisc_class_ops. Ingress Qdisc ops don't require any modifications to be used without rtnl lock on tc filter update path. Ingress implementation never changes its q->block and only releases it when Qdisc is being destroyed. This means it is enough for RTM_{NEWTFILTER|DELTFILTER|GETTFILTER} message handlers to hold ingress Qdisc reference while using it without relying on rtnl lock protection. Unlocked Qdisc ops support is already implemented in filter update path by unlocked cls API patch set. Signed-off-by: Vlad Buslov Signed-off-by: David S. Miller net/sched/sch_ingress.c | 1 + 1 file changed, 1 insertion(+) commit 74e80d81cc7e2b445c28c88cf3b2fa944ae73555 Merge: 81bc8c03e1b0 3aa6be30da89 Author: Enric Balletbo i Serra Date: Wed Jun 12 18:04:17 2019 +0200 Merge tag 'ib-mfd-cros-v5.3' into chrome-platform/for-next Immutable branch between MFD and chrome-platform for driver changes to allow picking patches that depends on the cros_ec_commands.h file update. Signed-off-by: Enric Balletbo i Serra commit f5b999c03f4c178d151e79803a95f8482a26521e Author: Eric Sandeen Date: Wed Jun 12 09:00:00 2019 -0700 xfs: remove unused flag arguments There are several functions which take a flag argument that is only ever passed as "0," so remove these arguments. Signed-off-by: Eric Sandeen Reviewed-by: Brian Foster Reviewed-by: Bill O'Donnell Reviewed-by: Allison Collins Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_ag.c | 8 ++++---- fs/xfs/libxfs/xfs_alloc.c | 4 ++-- fs/xfs/libxfs/xfs_attr_remote.c | 2 +- fs/xfs/libxfs/xfs_bmap.c | 14 +++++++------- fs/xfs/libxfs/xfs_btree.c | 30 +++++++++++------------------- fs/xfs/libxfs/xfs_btree.h | 10 +++------- fs/xfs/libxfs/xfs_sb.c | 2 +- fs/xfs/scrub/repair.c | 2 +- fs/xfs/xfs_bmap_util.c | 6 +++--- fs/xfs/xfs_buf.h | 5 ++--- 10 files changed, 35 insertions(+), 48 deletions(-) commit 76dee76921e138d93dba7aaabece13f2c3c1219f Author: Christoph Hellwig Date: Wed Jun 12 08:59:59 2019 -0700 xfs: remove the debug-only q_transp field from struct xfs_dquot The field is only used for a few assertations. Shrink the dqout structure instead, similarly to what commit f3ca87389dbf ("xfs: remove i_transp") did for the xfs_inode. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_dquot.h | 1 - fs/xfs/xfs_dquot_item.c | 5 ----- fs/xfs/xfs_trans_dquot.c | 10 ---------- 3 files changed, 16 deletions(-) commit f9a196ee5ab517deff40ae57195416c13c44c13f Author: Christoph Hellwig Date: Wed Jun 12 08:59:59 2019 -0700 xfs: merge xfs_buf_zero and xfs_buf_iomove xfs_buf_zero is the only caller of xfs_buf_iomove. Remove support for copying from or to the buffer in xfs_buf_iomove and merge the two functions. Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_buf.c | 25 +++++-------------------- fs/xfs/xfs_buf.h | 11 +---------- 2 files changed, 6 insertions(+), 30 deletions(-) commit 8c9ce2f707a1571782b4d3d100af627b6d147357 Author: Eric Sandeen Date: Wed Jun 12 08:59:58 2019 -0700 xfs: remove unused flags arg from getsb interfaces The flags value is always passed as 0 so remove the argument. Signed-off-by: Eric Sandeen Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_sb.c | 4 ++-- fs/xfs/xfs_log_recover.c | 2 +- fs/xfs/xfs_mount.c | 14 ++------------ fs/xfs/xfs_mount.h | 2 +- fs/xfs/xfs_trans.c | 2 +- fs/xfs/xfs_trans.h | 2 +- fs/xfs/xfs_trans_buf.c | 7 +++---- 7 files changed, 11 insertions(+), 22 deletions(-) commit 6f10419187d0d5fe395e2a2f2a64370961bf02a3 Author: Anders Roxell Date: Wed Jun 12 10:11:58 2019 +0200 regulator: 88pm800: fix warning same module names When building with CONFIG_MFD_88PM800 and CONFIG_REGULATOR_88PM800 enabled as loadable modules, we see the following warning: warning: same module names found: drivers/regulator/88pm800.ko drivers/mfd/88pm800.ko Rework so that the file is named 88pm800-regulator. Signed-off-by: Anders Roxell Signed-off-by: Mark Brown drivers/regulator/{88pm800.c => 88pm800-regulator.c} | 0 drivers/regulator/Makefile | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) commit ce9a1046434caee1d4c33a63712fdb18e6904a02 Author: Marc Gonzalez Date: Wed Jun 12 17:03:56 2019 +0200 clk: xgene: Don't build COMMON_CLK_XGENE by default Building COMMON_CLK_XGENE is pointless, unless we're building for an XGENE system. Signed-off-by: Marc Gonzalez Signed-off-by: Stephen Boyd drivers/clk/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 513dbd35b5d93c45fa7291147f21fc0227a9f999 Author: Mauro Carvalho Chehab Date: Wed Jun 5 13:24:35 2019 -0400 media: add SPDX headers to some files Add SPDX headers and fix MODULE_LICENSE() when needed on some files I co-authored. Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/tda7432.c | 3 ++- drivers/media/pci/bt8xx/bttv-audio-hook.c | 2 +- drivers/media/pci/bt8xx/bttv-audio-hook.h | 2 ++ drivers/media/pci/cx88/cx88-alsa.c | 2 +- drivers/media/pci/cx88/cx88-blackbird.c | 2 +- drivers/media/pci/cx88/cx88-core.c | 2 +- drivers/media/pci/cx88/cx88-i2c.c | 1 - drivers/media/pci/cx88/cx88-video.c | 2 +- drivers/media/v4l2-core/videobuf-core.c | 5 +---- drivers/media/v4l2-core/videobuf-dma-contig.c | 5 +---- drivers/media/v4l2-core/videobuf-dma-sg.c | 5 +---- drivers/media/v4l2-core/videobuf-vmalloc.c | 7 ++----- 12 files changed, 14 insertions(+), 24 deletions(-) commit d03a2f1b9fa83ee88acb4fd92c66240aff628488 Author: Eric Sandeen Date: Wed Jun 5 11:19:48 2019 -0700 xfs: include WARN, REPAIR build options in XFS_BUILD_OPTIONS The XFS_BUILD_OPTIONS string, shown at module init time and in modinfo output, does not currently include all available build options. So, add in CONFIG_XFS_WARN and CONFIG_XFS_REPAIR. It has been suggested in some quarters That this is not enough. Well ... Anybody who would like to see this in a sysfs file can send a patch. :) Signed-off-by: Eric Sandeen Reviewed-by: Bill O'Donnell Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_super.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 4b4d98cca32053ec8993e836cb8cb7c8098959dc Author: Darrick J. Wong Date: Wed Jun 5 11:19:36 2019 -0700 xfs: finish converting to inodes_per_cluster Finish converting all the old inode_cluster_size >> inopblog users to inodes_per_cluster. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/libxfs/xfs_inode_buf.c | 5 +---- fs/xfs/xfs_inode.c | 8 +++----- 2 files changed, 4 insertions(+), 9 deletions(-) commit 490d451fa5188975c21246f7f8f4914cd3f2d6f2 Author: Darrick J. Wong Date: Wed Jun 5 11:19:35 2019 -0700 xfs: fix inode_cluster_size rounding mayhem inode_cluster_size is supposed to represent the size (in bytes) of an inode cluster buffer. We avoid having to handle multiple clusters per filesystem block on filesystems with large blocks by openly rounding this value up to 1 FSB when necessary. However, we never reset inode_cluster_size to reflect this new rounded value, which adds to the potential for mistakes in calculating geometries. Fix this by setting inode_cluster_size to reflect the rounded-up size if needed, and special-case the few places in the sparse inodes code where we actually need the smaller value to validate on-disk metadata. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/libxfs/xfs_format.h | 9 +++++++-- fs/xfs/libxfs/xfs_ialloc.c | 21 ++++++++++++++++----- fs/xfs/libxfs/xfs_trans_resv.c | 6 ++---- fs/xfs/xfs_log_recover.c | 3 +-- fs/xfs/xfs_mount.c | 4 ++-- 5 files changed, 28 insertions(+), 15 deletions(-) commit 494dba7b276e12bc3f6ff2b9b584b6e9f693af45 Author: Darrick J. Wong Date: Wed Jun 5 11:19:35 2019 -0700 xfs: refactor inode geometry setup routines Migrate all of the inode geometry setup code from xfs_mount.c into a single libxfs function that we can share with xfsprogs. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/libxfs/xfs_ialloc.c | 124 +++++++++++++++++++++++++++++++++++---------- fs/xfs/libxfs/xfs_ialloc.h | 18 +------ fs/xfs/libxfs/xfs_sb.c | 20 ++------ fs/xfs/xfs_mount.c | 83 +----------------------------- 4 files changed, 101 insertions(+), 144 deletions(-) commit ef325959993edd53e3ce7c818b18f776ac0740a6 Author: Darrick J. Wong Date: Wed Jun 5 11:19:34 2019 -0700 xfs: separate inode geometry Separate the inode geometry information into a distinct structure. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/libxfs/xfs_format.h | 38 +++++++++++++- fs/xfs/libxfs/xfs_ialloc.c | 107 ++++++++++++++++++++------------------- fs/xfs/libxfs/xfs_ialloc.h | 6 +-- fs/xfs/libxfs/xfs_ialloc_btree.c | 15 +++--- fs/xfs/libxfs/xfs_inode_buf.c | 2 +- fs/xfs/libxfs/xfs_sb.c | 24 +++++---- fs/xfs/libxfs/xfs_trans_resv.c | 17 ++++--- fs/xfs/libxfs/xfs_trans_space.h | 7 +-- fs/xfs/libxfs/xfs_types.c | 4 +- fs/xfs/scrub/ialloc.c | 21 ++++---- fs/xfs/scrub/quota.c | 2 +- fs/xfs/xfs_fsops.c | 4 +- fs/xfs/xfs_inode.c | 16 +++--- fs/xfs/xfs_itable.c | 11 ++-- fs/xfs/xfs_log_recover.c | 21 ++++---- fs/xfs/xfs_mount.c | 49 ++++++++++-------- fs/xfs/xfs_mount.h | 19 ++----- fs/xfs/xfs_super.c | 6 +-- 18 files changed, 208 insertions(+), 161 deletions(-) commit 70972f51819a22e7708094af930346bb7275f06a Author: Chris Wilson Date: Wed Jun 12 16:13:11 2019 +0100 drm/i915: kerneldoc warnings squelched drivers/gpu/drm/i915//gem/i915_gem_shrinker.c:142: warning: Function parameter or member 'shrink' not described in 'i915_gem_shrink' drivers/gpu/drm/i915//gem/i915_gem_shrinker.c:142: warning: Excess function parameter 'flags' description in 'i915_gem_shrink' drivers/gpu/drm/i915//intel_display.c:13443: warning: Function parameter or member '_state' not described in 'intel_atomic_check' drivers/gpu/drm/i915//intel_display.c:13443: warning: Excess function parameter 'state' description in 'intel_atomic_check' Signed-off-by: Chris Wilson Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190612151311.30295-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gem/i915_gem_shrinker.c | 2 +- drivers/gpu/drm/i915/intel_display.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 09cc560951dbcc74c7f9419f7cf703b57472b7a2 Author: Sean Paul Date: Wed Jun 12 11:00:34 2019 -0400 drm: Tweak drm_encoder_helper_funcs.enable kerneldoc I copied the kerneldoc for encoder_funcs.atomic_enable from encoder_funcs.enable in a recent patch [1]. Sam rightly pointed out in the review that "for symmetry with" text is awkward [2]. So here's a patch to fix up the source of the awkward language. [1] https://patchwork.freedesktop.org/patch/msgid/20190611160844.257498-2-sean@poorly.run [2] https://patchwork.freedesktop.org/patch/msgid/20190611185352.GA16305@ravnborg.org Suggested-by: Sam Ravnborg Reviewed-by: Sam Ravnborg Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190612150038.194843-1-sean@poorly.run include/drm/drm_modeset_helper_vtables.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit aee450cbe482a8c2f6fa5b05b178ef8b8ff107ca Author: Valdis Klētnieks Date: Thu Jun 6 22:39:27 2019 -0400 bpf: silence warning messages in core Compiling kernel/bpf/core.c with W=1 causes a flood of warnings: kernel/bpf/core.c:1198:65: warning: initialized field overwritten [-Woverride-init] 1198 | #define BPF_INSN_3_TBL(x, y, z) [BPF_##x | BPF_##y | BPF_##z] = true | ^~~~ kernel/bpf/core.c:1087:2: note: in expansion of macro 'BPF_INSN_3_TBL' 1087 | INSN_3(ALU, ADD, X), \ | ^~~~~~ kernel/bpf/core.c:1202:3: note: in expansion of macro 'BPF_INSN_MAP' 1202 | BPF_INSN_MAP(BPF_INSN_2_TBL, BPF_INSN_3_TBL), | ^~~~~~~~~~~~ kernel/bpf/core.c:1198:65: note: (near initialization for 'public_insntable[12]') 1198 | #define BPF_INSN_3_TBL(x, y, z) [BPF_##x | BPF_##y | BPF_##z] = true | ^~~~ kernel/bpf/core.c:1087:2: note: in expansion of macro 'BPF_INSN_3_TBL' 1087 | INSN_3(ALU, ADD, X), \ | ^~~~~~ kernel/bpf/core.c:1202:3: note: in expansion of macro 'BPF_INSN_MAP' 1202 | BPF_INSN_MAP(BPF_INSN_2_TBL, BPF_INSN_3_TBL), | ^~~~~~~~~~~~ 98 copies of the above. The attached patch silences the warnings, because we *know* we're overwriting the default initializer. That leaves bpf/core.c with only 6 other warnings, which become more visible in comparison. Signed-off-by: Valdis Kletnieks Acked-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann kernel/bpf/Makefile | 1 + 1 file changed, 1 insertion(+) commit 3dad39e67cca68b321073cecabf2d7d1103d97d5 Author: Masanari Iida Date: Wed Jun 12 08:05:10 2019 -0400 media: imx214: Fix typo in module description of imx214 This patch fixes a spelling typo found in imx214.c Signed-off-by: Masanari Iida Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/imx214.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit be22203aec440c1761ce8542c2636ac6c8951e3a Author: Marek Szyprowski Date: Wed Jun 12 09:57:57 2019 -0400 media: s5p-mfc: fix reading min scratch buffer size on MFC v6/v7 MFC v6 and v7 has no register to read min scratch buffer size, so it has to be read conditionally only if hardware supports it. This fixes following NULL pointer exception on SoCs with MFC v6/v7: 8<--- cut here --- Unable to handle kernel NULL pointer dereference at virtual address 00000000 pgd = f25837f9 [00000000] *pgd=bd93d835 Internal error: Oops: 17 [#1] PREEMPT SMP ARM Modules linked in: btmrvl_sdio btmrvl bluetooth mwifiex_sdio mwifiex ecdh_generic ecc Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) PC is at s5p_mfc_get_min_scratch_buf_size+0x30/0x3c LR is at s5p_mfc_get_min_scratch_buf_size+0x28/0x3c ... [] (s5p_mfc_get_min_scratch_buf_size) from [] (s5p_mfc_irq+0x814/0xa5c) [] (s5p_mfc_irq) from [] (__handle_irq_event_percpu+0x64/0x3f8) [] (__handle_irq_event_percpu) from [] (handle_irq_event_percpu+0x2c/0x7c) [] (handle_irq_event_percpu) from [] (handle_irq_event+0x38/0x5c) [] (handle_irq_event) from [] (handle_fasteoi_irq+0xc4/0x180) [] (handle_fasteoi_irq) from [] (generic_handle_irq+0x24/0x34) [] (generic_handle_irq) from [] (__handle_domain_irq+0x7c/0xec) [] (__handle_domain_irq) from [] (gic_handle_irq+0x58/0x9c) [] (gic_handle_irq) from [] (__irq_svc+0x70/0xb0) Exception stack(0xe73ddc60 to 0xe73ddca8) ... [] (__irq_svc) from [] (console_unlock+0x5a8/0x6a8) [] (console_unlock) from [] (vprintk_emit+0x118/0x2d8) [] (vprintk_emit) from [] (vprintk_default+0x20/0x28) [] (vprintk_default) from [] (printk+0x30/0x54) [] (printk) from [] (s5p_mfc_init_decode_v6+0x1d4/0x284) [] (s5p_mfc_init_decode_v6) from [] (vb2_start_streaming+0x24/0x150) [] (vb2_start_streaming) from [] (vb2_core_streamon+0x11c/0x15c) [] (vb2_core_streamon) from [] (vidioc_streamon+0x64/0xa0) [] (vidioc_streamon) from [] (__video_do_ioctl+0x28c/0x45c) [] (__video_do_ioctl) from [] (video_usercopy+0x260/0x8a4) [] (video_usercopy) from [] (do_vfs_ioctl+0xb0/0x9fc) [] (do_vfs_ioctl) from [] (ksys_ioctl+0x34/0x58) [] (ksys_ioctl) from [] (ret_fast_syscall+0x0/0x28) Exception stack(0xe73ddfa8 to 0xe73ddff0) ... ---[ end trace 376cf5ba6e0bee93 ]--- Signed-off-by: Marek Szyprowski Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-mfc/s5p_mfc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 64f883cd98c6d43013fb0cea788b63e50ebc068c Author: Young Xiao <92siuyang@gmail.com> Date: Tue Jun 4 08:26:33 2019 -0400 media: davinci: vpif_capture: fix memory leak in vpif_probe() If vpif_probe() fails on v4l2_device_register() and vpif_probe_complete(), then memory allocated at initialize_vpif() for global vpif_obj.dev[i] become unreleased. The patch adds deallocation of vpif_obj.dev[i] on the error path. Signed-off-by: Young Xiao <92siuyang@gmail.com> Acked-by: Lad, Prabhakar Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/davinci/vpif_capture.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 3510c68d32bf3a188c077b5fb87339379f4e6b43 Author: YueHaibing Date: Wed Jun 12 06:05:36 2019 -0400 media: meson: vdec: Add missing kthread.h Fix building error: of function kthread_should_stop; did you mean thread_saved_sp? [-Werror=implicit-function-declaration] Reported-by: Hulk Robot Signed-off-by: YueHaibing Acked-by: Maxime Jourdan Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/meson/vdec/vdec.c | 1 + 1 file changed, 1 insertion(+) commit 1296987d2baf7f56748359b8dd42c425b9e7ee3a Author: Anders Roxell Date: Wed Jun 12 04:15:50 2019 -0400 media: drivers: media: coda: fix warning same module names When building with CONFIG_VIDEO_CODA and CONFIG_CODA_FS enabled as loadable modules, we see the following warning: fs/coda/coda.ko drivers/media/platform/coda/coda.ko Rework so media/platform/coda is named coda-vpu. Leaving CODA_FS as is since that's a well known module. Signed-off-by: Anders Roxell Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4419617e0d0cc6f6526439e16f3a880e7d292eaa Author: Anders Roxell Date: Wed Jun 12 04:15:43 2019 -0400 media: drivers: media: i2c: don't enable if CONFIG_DRM_I2C_ADV7511=n CONFIG_DRM_I2C_ADV7511 and CONFIG_VIDEO_ADV7511 bind to the same platform device, so whichever driver gets loaded first will be used on the device. So they shouldn't be enabled at the same time. Rework so that VIDEO_ADV7511 and VIDEO_COBALT depends on DRM_I2C_ADV7511=n or COMPILE_TEST. Suggested-by: Hans Verkuil Signed-off-by: Anders Roxell Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/Kconfig | 1 + drivers/media/pci/cobalt/Kconfig | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit de7a0020901e4647fe3549e7f66ec6f28cae5dd7 Author: Tomasz Figa Date: Fri Jun 7 04:35:18 2019 -0400 media: MAINTAINERS: media: Add Tomasz Figa as a videobuf2 reviewer I tend to review most of the vb2 patches anyway and we need some active reviewers, so let add me to the MAINTAINERS file as such. Signed-off-by: Tomasz Figa Acked-by: Marek Szyprowski Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 6c0bbc933386fa2b00854fe9a5df1251a624ae7b Author: Hans Verkuil Date: Tue Jun 4 07:19:56 2019 -0400 media: touchscreen/sur40: set device_caps in struct video_device Instead of filling in the struct v4l2_capability device_caps field, fill in the struct video_device device_caps field. That way the V4L2 core knows what the capabilities of the video device are. But this only really works if all drivers use this, so convert this touchscreen driver accordingly. Signed-off-by: Hans Verkuil Acked-by: Florian Echtler Acked-by: Dmitry Torokhov Signed-off-by: Mauro Carvalho Chehab drivers/input/touchscreen/sur40.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit b86b8473d52f307de1b9a3295492a87e6d119160 Author: Philipp Zabel Date: Wed Jun 12 05:39:12 2019 -0400 media: hantro: allow arbitrary number of clocks Dynamically allocate clocks and move clock names out of struct hantro_variant. This lifts the four clock limit and allows to use ARRAY_SIZE() to fill .num_clocks to reduce the risk of mismatches. Signed-off-by: Philipp Zabel Reviewed-by: Boris Brezillon Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/hantro/hantro.h | 6 ++---- drivers/staging/media/hantro/hantro_drv.c | 5 +++++ drivers/staging/media/hantro/rk3288_vpu_hw.c | 8 ++++++-- drivers/staging/media/hantro/rk3399_vpu_hw.c | 8 ++++++-- 4 files changed, 19 insertions(+), 8 deletions(-) commit c330d371137fca9190a83f68bba2af7f64d205a0 Author: Philipp Zabel Date: Wed Jun 12 05:39:11 2019 -0400 media: hantro: add support for separate control block On i.MX8MQ/MM a separate control block contains registers for per-core resets, clock gating, and fuse register control. Signed-off-by: Philipp Zabel Reviewed-by: Boris Brezillon Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/hantro/hantro.h | 2 ++ 1 file changed, 2 insertions(+) commit f855fc2c0d7188d24e4185c2dfa97f34322d29e6 Author: Philipp Zabel Date: Wed Jun 12 05:39:10 2019 -0400 media: hantro: add support for named register ranges Add support for multiple register ranges with SoC specific names. Signed-off-by: Philipp Zabel Reviewed-by: Boris Brezillon Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/hantro/hantro.h | 8 ++++++-- drivers/staging/media/hantro/hantro_drv.c | 24 ++++++++++++++++++------ 2 files changed, 24 insertions(+), 8 deletions(-) commit 4d20d087db46ee58e2d00d494c34f3dcd4218c78 Author: Philipp Zabel Date: Wed Jun 12 05:39:09 2019 -0400 media: hantro: make irq names configurable The i.MX8MQ bindings will use different IRQ names ("g1" instead of "vdpu", and "g2"), so make them configurable. This also allows to register more than two IRQs, which will be required for i.MX8MM support later (it will add "h1" instead of "vepu"). Signed-off-by: Philipp Zabel Reviewed-by: Boris Brezillon Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/hantro/hantro.h | 19 ++++++++++++---- drivers/staging/media/hantro/hantro_drv.c | 33 ++++++++++------------------ drivers/staging/media/hantro/rk3288_vpu_hw.c | 9 ++++++-- drivers/staging/media/hantro/rk3399_vpu_hw.c | 9 ++++++-- 4 files changed, 40 insertions(+), 30 deletions(-) commit 0fd7ada14eefa99921fc24666ac93ca6931c09f0 Author: Philipp Zabel Date: Wed Jun 12 05:39:08 2019 -0400 media: hantro: add PM runtime resume callback It seems that on i.MX8MQ the power domain controller does not propagate resets to the VPU cores on resume. Add a callback to allow implementing manual reset of the VPU cores after ungating the power domain. Signed-off-by: Philipp Zabel Reviewed-by: Boris Brezillon Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/hantro/hantro.h | 2 ++ drivers/staging/media/hantro/hantro_drv.c | 13 +++++++++++++ 2 files changed, 15 insertions(+) commit 0b675962d9395269ab2a808a08dabce5249de7b2 Author: Philipp Zabel Date: Wed Jun 12 05:39:07 2019 -0400 media: hantro: print video device name in addition to device node It can be helpful to know which video device was registered at which device node. Signed-off-by: Philipp Zabel Reviewed-by: Boris Brezillon Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/hantro/hantro_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4f5fd91fb327420d799354b9d068ebcf58d8ff45 Author: Tvrtko Ursulin Date: Tue Jun 11 11:45:48 2019 +0100 drm/i915: Remove I915_READ16 and I915_WRITE16 Remove call sites in favour of uncore mmio accessors and remove the old macros. Signed-off-by: Tvrtko Ursulin Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190611104548.30545-6-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/gt/intel_ringbuffer.c | 6 +- drivers/gpu/drm/i915/i915_debugfs.c | 37 +++++----- drivers/gpu/drm/i915/i915_drv.h | 3 - drivers/gpu/drm/i915/i915_gpu_error.c | 104 ++++++++++++++++------------- drivers/gpu/drm/i915/i915_irq.c | 40 ++++++----- drivers/gpu/drm/i915/intel_pm.c | 93 ++++++++++++++++---------- 6 files changed, 161 insertions(+), 122 deletions(-) commit 5a31d30b22c04615329132f0c7fa20b4b6079b43 Author: Tvrtko Ursulin Date: Tue Jun 11 11:45:47 2019 +0100 drm/i915: Remove I915_READ_NOTRACE Only a few call sites remain which have been converted to uncore mmio accessors and so the macro can be removed. Signed-off-by: Tvrtko Ursulin Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190611104548.30545-5-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/gvt/debugfs.c | 4 ++-- drivers/gpu/drm/i915/gvt/firmware.c | 5 +++-- drivers/gpu/drm/i915/i915_drv.c | 6 ++++-- drivers/gpu/drm/i915/i915_drv.h | 1 - drivers/gpu/drm/i915/i915_pmu.c | 8 ++++--- drivers/gpu/drm/i915/intel_dp.c | 43 ++++++++++++++++++++----------------- drivers/gpu/drm/i915/intel_gmbus.c | 11 +++++----- 7 files changed, 43 insertions(+), 35 deletions(-) commit 54ac6479737be1d00adbacb659c79d3393028c08 Author: Tvrtko Ursulin Date: Tue Jun 11 11:45:46 2019 +0100 drm/i915: Remove I915_WRITE_NOTRACE Only a few call sites remain which have been converted to uncore mmio accessors and so the macro can be removed. Signed-off-by: Tvrtko Ursulin Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190611104548.30545-4-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/i915_drv.h | 1 - drivers/gpu/drm/i915/intel_gmbus.c | 42 ++++++++++++++++++++++++-------------- 2 files changed, 27 insertions(+), 16 deletions(-) commit e44d62d1dd29e1d5855b053dd7fa7b2120f50bd7 Author: Tvrtko Ursulin Date: Tue Jun 11 11:45:45 2019 +0100 drm/i915: Remove POSTING_READ16 Only a few call sites remain which have been converted to uncore mmio accessors and so the macro can be removed. ENGINE_POSTING_READ16 is added to replace one engine->mmio_base relative call site. Signed-off-by: Tvrtko Ursulin Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190611104548.30545-3-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/gt/intel_engine.h | 1 + drivers/gpu/drm/i915/gt/intel_ringbuffer.c | 8 ++++---- drivers/gpu/drm/i915/i915_drv.h | 1 - drivers/gpu/drm/i915/intel_pm.c | 11 ++++++----- 4 files changed, 11 insertions(+), 10 deletions(-) commit e33a4be83a64cd4f127f002abbe7f62b833fa3ac Author: Tvrtko Ursulin Date: Tue Jun 11 11:45:44 2019 +0100 drm/i915: Remove I915_POSTING_READ_FW Only a few call sites remain which have been converted to uncore mmio accessors and so the macro can be removed. Signed-off-by: Tvrtko Ursulin Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190611104548.30545-2-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/i915_drv.h | 1 - drivers/gpu/drm/i915/i915_gem.c | 9 +++++---- drivers/gpu/drm/i915/i915_irq.c | 2 +- drivers/gpu/drm/i915/intel_guc_submission.c | 4 ++-- drivers/gpu/drm/i915/intel_pm.c | 31 +++++++++++++++-------------- 5 files changed, 24 insertions(+), 23 deletions(-) commit c54f0bac70466fa8a46d26529bb80099906c4e36 Author: Tvrtko Ursulin Date: Tue Jun 11 11:45:43 2019 +0100 drm/i915: Remove I915_READ8 Only a few call sites remain which have been converted to uncore mmio accessors and so the macro can be removed. Signed-off-by: Tvrtko Ursulin Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190611104548.30545-1-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/i915_drv.h | 2 -- drivers/gpu/drm/i915/intel_crt.c | 41 ++++++++++++++++++++++------------------ drivers/gpu/drm/i915/intel_pm.c | 6 +++--- 3 files changed, 26 insertions(+), 23 deletions(-) commit a29add8c9bb29dfa8dc47c71b2702e9cc4f332a6 Author: Philipp Zabel Date: Wed Jun 12 05:39:06 2019 -0400 media: rockchip/vpu: rename from rockchip to hantro Rename the driver and all relevant identifiers from Rockchip to Hantro, as other Hantro IP based VPU implementations can be supported by the same driver. The RK3288 decoder is Hantro G1 based, the encoder is Hantro H1. This patch just renames, no functional changes. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 4 +- drivers/staging/media/Kconfig | 4 +- drivers/staging/media/Makefile | 2 +- drivers/staging/media/hantro/Kconfig | 23 ++ drivers/staging/media/hantro/Makefile | 15 + .../staging/media/{rockchip/vpu => hantro}/TODO | 0 .../vpu/rockchip_vpu.h => hantro/hantro.h} | 136 +++---- .../vpu/rockchip_vpu_drv.c => hantro/hantro_drv.c} | 253 ++++++------ drivers/staging/media/hantro/hantro_g1_mpeg2_dec.c | 260 ++++++++++++ drivers/staging/media/hantro/hantro_g1_regs.h | 301 ++++++++++++++ drivers/staging/media/hantro/hantro_h1_jpeg_enc.c | 125 ++++++ drivers/staging/media/hantro/hantro_h1_regs.h | 154 +++++++ drivers/staging/media/hantro/hantro_hw.h | 102 +++++ .../rockchip_vpu_jpeg.c => hantro/hantro_jpeg.c} | 18 +- drivers/staging/media/hantro/hantro_jpeg.h | 13 + .../rockchip_vpu_mpeg2.c => hantro/hantro_mpeg2.c} | 14 +- .../rockchip_vpu_v4l2.c => hantro/hantro_v4l2.c} | 234 ++++++----- .../rockchip_vpu_v4l2.h => hantro/hantro_v4l2.h} | 16 +- drivers/staging/media/hantro/rk3288_vpu_hw.c | 178 +++++++++ .../media/{rockchip/vpu => hantro}/rk3399_vpu_hw.c | 60 +-- .../vpu => hantro}/rk3399_vpu_hw_jpeg_enc.c | 32 +- .../vpu => hantro}/rk3399_vpu_hw_mpeg2_dec.c | 37 +- .../{rockchip/vpu => hantro}/rk3399_vpu_regs.h | 2 +- drivers/staging/media/rockchip/vpu/Kconfig | 14 - drivers/staging/media/rockchip/vpu/Makefile | 14 - drivers/staging/media/rockchip/vpu/rk3288_vpu_hw.c | 177 -------- .../media/rockchip/vpu/rk3288_vpu_hw_jpeg_enc.c | 125 ------ .../media/rockchip/vpu/rk3288_vpu_hw_mpeg2_dec.c | 261 ------------ .../staging/media/rockchip/vpu/rk3288_vpu_regs.h | 443 --------------------- .../staging/media/rockchip/vpu/rockchip_vpu_hw.h | 102 ----- .../staging/media/rockchip/vpu/rockchip_vpu_jpeg.h | 14 - 31 files changed, 1572 insertions(+), 1561 deletions(-) commit 5740671e596bdc3986a5391997de194300970201 Author: Chris Wilson Date: Wed Jun 12 14:28:30 2019 +0100 dma-fence/reservation: Markup rcu protected access for DEBUG_MUTEXES Mark the access to reservation_object.fence as being protected to silence sparse. Signed-off-by: Chris Wilson Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20190612132830.31221-1-chris@chris-wilson.co.uk include/linux/reservation.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit c412187dda6ea557879b6103d17a3f47e38621ed Author: Wolfram Sang Date: Sat Jun 8 12:55:41 2019 +0200 gpu: drm: bridge: sii9234: simplify getting the adapter of a client We have a dedicated pointer for that, so use it. Much easier to read and less computation involved. Signed-off-by: Wolfram Sang Reviewed-by: Laurent Pinchart Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190608105619.593-3-wsa+renesas@sang-engineering.com drivers/gpu/drm/bridge/sii9234.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0356ce3adda0a7b5ef49d580790e94b9c80e8862 Author: Takashi Sakamoto Date: Wed Jun 12 17:44:22 2019 +0900 ALSA: oxfw: configure stream parameter in pcm.hw_params callback This commit is a part of preparation to perform allocation/release of isochronous resources in pcm.hw_params/hw_free callbacks. This commit splits out an operation to configure stream parameters into pcm.hw_params callback. In pcm.prepare callback, establishing connections and start isochronous contexts. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/oxfw/oxfw-stream.c | 97 +++++++++++++++++++++++---------------- 1 file changed, 57 insertions(+), 40 deletions(-) commit 4f380d0070528da8b93c4ac3994c20097393f6dd Author: Takashi Sakamoto Date: Wed Jun 12 17:44:21 2019 +0900 ALSA: oxfw: configure packet format in pcm.hw_params callback This commit is a part of preparation to perform allocation/release of isochronous resources in pcm.hw_params/hw_free callbacks. At present, several operations are done in pcm.prepare callback. To reduce load of the callback, This commit splits out an operation to set packet format in pcm.hw_params callback. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/oxfw/oxfw-midi.c | 14 +++++++++---- sound/firewire/oxfw/oxfw-pcm.c | 26 +++++++++++++++-------- sound/firewire/oxfw/oxfw-stream.c | 44 +++++++++++++++++++++++++++------------ sound/firewire/oxfw/oxfw.h | 7 ++++--- 4 files changed, 62 insertions(+), 29 deletions(-) commit 4a0a04729a44ea317270885e1722636b156cf620 Author: Takashi Sakamoto Date: Wed Jun 12 17:44:20 2019 +0900 ALSA: oxfw: unify substreams counter In former commits, two isochronous contexts are handles at the same time. This commit unifies stream counters to obsolete them. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/oxfw/oxfw-midi.c | 8 ++++---- sound/firewire/oxfw/oxfw-pcm.c | 8 ++++---- sound/firewire/oxfw/oxfw-stream.c | 4 ++-- sound/firewire/oxfw/oxfw.h | 3 +-- 4 files changed, 11 insertions(+), 12 deletions(-) commit 779f0dba0b99f32276315ba40e812648b6ceed34 Author: Takashi Sakamoto Date: Wed Jun 12 17:44:19 2019 +0900 ALSA: oxfw: rename helper functions for duplex streams In former commits, ALSA oxfw driver handles two isochronous contexts at the same time, except for some devices which supports one endpoint of isochronous packet stream. This commit renames some helper functions so that they handles duplex streams. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/oxfw/oxfw-midi.c | 8 +++--- sound/firewire/oxfw/oxfw-pcm.c | 12 ++++---- sound/firewire/oxfw/oxfw-stream.c | 60 ++++++++++++++++++++++++++------------- sound/firewire/oxfw/oxfw.c | 17 ++--------- sound/firewire/oxfw/oxfw.h | 14 ++++----- 5 files changed, 58 insertions(+), 53 deletions(-) commit e34244dd2266773f699977c831b60a44fc3a164b Author: Takashi Sakamoto Date: Wed Jun 12 17:44:18 2019 +0900 ALSA: oxfw: expand stop procedure for packet streaming The helper function stop packet streaming is not enough useful. This commit obsoletes it and expands its code. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/oxfw/oxfw-stream.c | 68 ++++++++++++++++++++------------------- 1 file changed, 35 insertions(+), 33 deletions(-) commit 7efa19ab4848305a17aea542b09930e3d7d1bede Author: Takashi Sakamoto Date: Wed Jun 12 17:44:17 2019 +0900 ALSA: oxfw: break packet streaming at bus-reset handler In most cases, recovery from bus reset is not successful. This commit aborts packet streaming in bus reset handler. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/oxfw/oxfw-stream.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) commit 20358d4460bd4aa833b1ad79b79763887d9b75e4 Author: Takashi Sakamoto Date: Wed Jun 12 17:44:16 2019 +0900 ALSA: oxfw: start duplex streams if supported It's inconvenient to handle two isochronous context separately each other. This commit unifies the counters to handle the two at the same time. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/oxfw/oxfw-stream.c | 102 ++++++++++++++++++-------------------- 1 file changed, 49 insertions(+), 53 deletions(-) commit 521b2e11fad0b4d6b36727ecca624710b5f81fd1 Author: Takashi Sakamoto Date: Wed Jun 12 17:44:15 2019 +0900 ALSA: oxfw: set packet parameter according to current configuration After a call of pcm.hw_params, the state of target device is expected for applications. This commit retrieves the state and start packet streaming. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/oxfw/oxfw-stream.c | 48 +++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 24 deletions(-) commit da2af86d51ac32067c77759e40a162d684690a43 Author: Takashi Sakamoto Date: Wed Jun 12 17:44:14 2019 +0900 ALSA: oxfw: code refactoring for stop condition of packet streaming This commit unifies stop condition due to queueing error and unmatched state of the target device. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/oxfw/oxfw-stream.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 5ad840728ac3f56008da03481a96d3ed175e7c3f Author: Takashi Sakamoto Date: Wed Jun 12 17:44:13 2019 +0900 ALSA: fireworks: don't set XRUN in stop streaming When stopping packet streaming, no need to stop PCM substream with XRUN state. This commit suppresses it. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/fireworks/fireworks_stream.c | 1 - 1 file changed, 1 deletion(-) commit 206cf896d6e9024dbdf5722c4676f2e671191b97 Author: Takashi Sakamoto Date: Wed Jun 12 17:44:12 2019 +0900 ALSA: fireworks: configure stream parameters in pcm.hw_params callback This commit is a part of preparation to perform allocation/release of isochronous resources in pcm.hw_params/hw_free callbacks. This commit splits out an operation to configure stream parameters into pcm.hw_params callback. In pcm.prepare callback, establishing connections and start isochronous contexts. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/fireworks/fireworks_stream.c | 82 +++++++++++++++++------------ 1 file changed, 49 insertions(+), 33 deletions(-) commit 3d7250667ea96e7f9738caa6d5af85d87982066e Author: Takashi Sakamoto Date: Wed Jun 12 17:44:11 2019 +0900 ALSA: fireworks: configure sampling transfer frequency in pcm.hw_params callback This commit is a part of preparation to perform allocation/release of isochronous resources in pcm.hw_params/hw_free callbacks. At present, several operations are done in pcm.prepare callback. To reduce load of the callback, This commit splits out an operation to set sampling transfer frequency in pcm.hw_params callback. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/fireworks/fireworks.h | 3 +- sound/firewire/fireworks/fireworks_midi.c | 7 +++- sound/firewire/fireworks/fireworks_pcm.c | 14 ++++--- sound/firewire/fireworks/fireworks_stream.c | 65 +++++++++++++++++++---------- 4 files changed, 57 insertions(+), 32 deletions(-) commit fb56eb73c6266164e4b06c9eca9716348420dbf1 Author: Takashi Sakamoto Date: Wed Jun 12 17:44:10 2019 +0900 ALSA: fireworks: code refactoring for pcm.hw_params/hw_free Two sets of callbacks for pcm.hw_params/hw_free but they have the same codes. This commit unifies each of the callbacks. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/fireworks/fireworks_pcm.c | 45 +++++--------------------------- 1 file changed, 6 insertions(+), 39 deletions(-) commit add147ad556cce588d1a714a6df4c4e556a6cb2f Author: Takashi Sakamoto Date: Wed Jun 12 17:44:09 2019 +0900 ALSA: fireworks: code refactoring for rawmidi.open/close Two sets of callbacks for rawmidi.open/close but they have the same codes. This commit unifies each of the callbacks. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/fireworks/fireworks_midi.c | 45 +++++-------------------------- 1 file changed, 6 insertions(+), 39 deletions(-) commit 1dc5921082d48dc53e48e88ae2f9a24b9737307d Author: Takashi Sakamoto Date: Wed Jun 12 17:44:08 2019 +0900 ALSA: fireworks: unify substream counter This commit is a part of preparation to perform allocation/release of isochronous resources in pcm.hw_params/hw_free callbacks. It's inconvenient to handle two isochronous context separately each other. This commit unifies the counters to handle the two at the same time. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/fireworks/fireworks.h | 3 +-- sound/firewire/fireworks/fireworks_midi.c | 8 ++++---- sound/firewire/fireworks/fireworks_pcm.c | 8 ++++---- sound/firewire/fireworks/fireworks_stream.c | 27 ++++++++++----------------- 4 files changed, 19 insertions(+), 27 deletions(-) commit 33e41a5ce59ad34c822228d3811ba3785f1a97a2 Author: Takashi Sakamoto Date: Wed Jun 12 17:44:07 2019 +0900 ALSA: bebob: code refactoring to initialize/destroy stream data This commit changes helper functions to initialize/destroy stream data so that it has an argument for direction. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/bebob/bebob_stream.c | 121 ++++++++++++++++++------------------ 1 file changed, 61 insertions(+), 60 deletions(-) commit 87a23092dd971b960f9065dbc0cc48be31400326 Author: Takashi Sakamoto Date: Wed Jun 12 17:44:06 2019 +0900 ALSA: bebob: obsolete useless member of private structure The private structure of this driver has 'connected' member but nowadays it's useless. This commit removes it. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/bebob/bebob.h | 2 -- sound/firewire/bebob/bebob_stream.c | 7 ------- 2 files changed, 9 deletions(-) commit 83122f85d4d87885a379a7f71cd6688b1a38d4e1 Author: Takashi Sakamoto Date: Wed Jun 12 17:44:05 2019 +0900 ALSA: bebob: don't set XRUN in stop streaming When stopping packet streaming, no need to stop PCM substream with XRUN state. This commit suppresses it. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/bebob/bebob_stream.c | 3 --- 1 file changed, 3 deletions(-) commit ac2888b958f217be15d6afb966df48a313f2d87a Author: Takashi Sakamoto Date: Wed Jun 12 17:44:04 2019 +0900 ALSA: bebob: configure sampling transfer frequency in pcm.hw_params callback This commit is a part of preparation to perform allocation/release of isochronous resources in pcm.hw_params/hw_free callbacks. At present, several operations are done in pcm.prepare callback. To reduce load of the callback, This commit splits out an operation to set sampling transfer frequency in pcm.hw_params callback. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/bebob/bebob.h | 3 +- sound/firewire/bebob/bebob_midi.c | 22 ++-- sound/firewire/bebob/bebob_pcm.c | 22 ++-- sound/firewire/bebob/bebob_stream.c | 212 ++++++++++++++++++------------------ 4 files changed, 136 insertions(+), 123 deletions(-) commit 9164665a390a2a42e9f56094eeec8c4a52748723 Author: Jernej Skrabec Date: Tue Jun 11 23:40:55 2019 +0200 arm64: dts: allwinner: h6: Add DMA node H6 has DMA controller which supports 16 channels. Add a node for it. Signed-off-by: Jernej Skrabec Signed-off-by: Clément Péron Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 20353143a27f4ded458910226d503207c9ae4688 Author: Igor Opaniuk Date: Thu Jun 6 12:06:12 2019 +0300 ARM: dts: imx6ull-colibri: enable UHS-I for USDHC1 Allows to use the SD interface at a higher speed mode if the card supports it. For this the signaling voltage is switched from 3.3V to 1.8V under the usdhc1's drivers control. Signed-off-by: Igor Opaniuk Reviewed-by: Marcel Ziswiler Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6ul.dtsi | 4 ++++ arch/arm/boot/dts/imx6ull-colibri-eval-v3.dtsi | 11 +++++++++-- arch/arm/boot/dts/imx6ull-colibri.dtsi | 6 ++++++ 3 files changed, 19 insertions(+), 2 deletions(-) commit fdbd3e8c9ffdf9c75a1cfc5951abcf141d68f8d9 Author: Fumiya Shigemitsu Date: Tue Jun 11 21:33:40 2019 +0900 ext2: Fix a typo in ext2_getattr argument Fix a typo in a ext2_getattr argument Signed-off-by: Fumiya Shigemitsu Signed-off-by: Jan Kara fs/ext2/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1fe03415447ba06f17fb6446d4bb01d1ba551be8 Author: Chengguang Xu Date: Wed Jun 12 12:57:53 2019 +0800 ext2: fix a typo in comment Just fix a typo in comment and remove redundant blank line in ext2_data_block_valid(). Signed-off-by: Chengguang Xu Signed-off-by: Jan Kara fs/ext2/balloc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 9bb9c6a110eaad53054e939f8800223ae6d9b66c Author: Rob Herring Date: Wed Jun 12 07:05:52 2019 -0600 scripts/dtc: Update to upstream version v1.5.0-23-g87963ee20693 This adds the following commits from upstream: 87963ee20693 livetree: add missing type markers in generated overlay properties 825146d13dc0 Fix typos in various documentation and source files 25bb080c18d1 Update the GPL2 text to the latest revision 243176c4ce84 Fix bogus error on rebuild ce01b21098a4 libfdt: Add FDT_CREATE_FLAG_NO_NAME_DEDUP flag that trades size for speed fbb62754ce45 libfdt: Introduce fdt_create_with_flags() 228a44cce857 libfdt: Ensure fdt_add_property frees allocated name string on failure 8f695676227b Avoid assertion in check_interrupts_property() 5c3513f68921 Link tools and tests against libfdt shared library 00f9febf9c16 tests: Rename tests.sh to testutils.sh c5d45188f923 Clean up LDLIBS handling 6ef8fcd05b74 Rebuild libfdt shared object if versioning linker script changes 26ee65a16c38 Use Python3 by default cca6546244cb libfdt: Make fdt_get_max_phandle() an inline 730875016a6a libfdt: Add phandle generation helper 7dfb61ba96b1 libfdt: Use fdt_find_max_phandle() 2bc5b66d7f6c libfdt: Add new maximum phandle lookup function 7fcf8208b8a9 libfdt: add fdt_append_addrrange() ae795b2db7a4 checks: Do not omit nodes with labels if symbol generation is requested eac2ad495b29 Update version.lds again f67b47135523 Revert "libfdt: Add phandle generation helper" 54ea41c22415 libfdt: Add phandle generation helper 4762ad051ee0 checks: Fix spelling in check_graph_endpoint d37f6b20107e Bump version to v1.5.0 a4b1a307ff3a pylibfdt:tests: Extend the way how to find a Python module 625dd8aaf20f pylibfdt: Change how passing tests are recognized 364631626bb7 pylibfdt: Test fdt.setprop take bytes on Python 3, add error handling cb0f454f73cc pylibfdt: check_err accepts only integer as a first argument. 4b68c6b3605a pylibfdt: Proper handling of bytes/unicode strings and octal literals 78e113e81c9d Use PRIxPTR for printing uintptr_t values ea7a8f6dad67 libfdt: Fix FDT_ERR_NOTFOUND typos in documentation 5aafd7ca43e0 libfdt: Fix fdt_getprop_by_offset() parameter name in documentation 7cbc550f903b checks: Add unit address check if node is enabled Signed-off-by: Rob Herring scripts/dtc/checks.c | 55 +++++++++++-- scripts/dtc/dtc.h | 3 +- scripts/dtc/flattree.c | 2 +- scripts/dtc/libfdt/Makefile.libfdt | 2 + scripts/dtc/libfdt/fdt_addresses.c | 47 +++++++++++ scripts/dtc/libfdt/fdt_overlay.c | 10 ++- scripts/dtc/libfdt/fdt_ro.c | 50 ++++++++---- scripts/dtc/libfdt/fdt_rw.c | 22 +++++- scripts/dtc/libfdt/fdt_strerror.c | 1 + scripts/dtc/libfdt/fdt_sw.c | 78 +++++++++++++++--- scripts/dtc/libfdt/libfdt.h | 158 +++++++++++++++++++++++++++++++++++-- scripts/dtc/libfdt/libfdt_env.h | 1 + scripts/dtc/livetree.c | 20 +++-- scripts/dtc/util.h | 4 +- scripts/dtc/version_gen.h | 2 +- 15 files changed, 399 insertions(+), 56 deletions(-) commit 9a5ed0bac86edce4097abf7595a7de050b2f87fa Author: Linus Walleij Date: Wed Jun 12 09:42:22 2019 +0200 regulator: wm831x: Convert to use GPIO descriptors This converts the Wolfson Micro WM831x DCDC converter to use a GPIO descriptor for the GPIO driving the DVS pin. There is just one (non-DT) machine in the kernel using this, and that is the Wolfson Micro (now Cirrus) Cragganmore 6410 so we patch this board to pass a descriptor table and fix up the driver accordingly. Cc: Charles Keepax Cc: Richard Fitzgerald Cc: patches@opensource.cirrus.com Signed-off-by: Linus Walleij Acked-by: Charles Keepax Signed-off-by: Mark Brown arch/arm/mach-s3c64xx/mach-crag6410.c | 21 ++++++++++++++++++++- drivers/regulator/wm831x-dcdc.c | 29 +++++++++++++---------------- include/linux/mfd/wm831x/pdata.h | 1 - 3 files changed, 33 insertions(+), 18 deletions(-) commit db057679de3e9e6a03c1bcd5aee09b0d25fd9f5b Author: Srinivas Kandagatla Date: Wed Jun 12 12:03:43 2019 +0100 regmap: fix bulk writes on paged registers On buses like SlimBus and SoundWire which does not support gather_writes yet in regmap, A bulk write on paged register would be silently ignored after programming page. This is because local variable 'ret' value in regmap_raw_write_impl() gets reset to 0 once page register is written successfully and the code below checks for 'ret' value to be -ENOTSUPP before linearising the write buffer to send to bus->write(). Fix this by resetting the 'ret' value to -ENOTSUPP in cases where gather_writes() is not supported or single register write is not possible. Signed-off-by: Srinivas Kandagatla Signed-off-by: Mark Brown drivers/base/regmap/regmap.c | 2 ++ 1 file changed, 2 insertions(+) commit 764958f2b5239cbf174e70cad4c3f19a8c1081ba Author: Peter Ujfalusi Date: Tue Jun 11 15:29:41 2019 +0300 ASoC: ti: davinci-mcasp: Support for auxclk-fs-ratio When McASP is bus master and it's AUXCLK clock is not static, but it is a multiple of the frame sync the constraint rules should take it account when validating possible stream formats. Signed-off-by: Peter Ujfalusi Signed-off-by: Mark Brown sound/soc/ti/davinci-mcasp.c | 52 +++++++++++++++++++++++++++++++++++++------- 1 file changed, 44 insertions(+), 8 deletions(-) commit b7e47f48f1197c24f5347327afc2a4f7f6da9ca5 Author: Peter Ujfalusi Date: Tue Jun 11 15:29:40 2019 +0300 bindings: sound: davinci-mcasp: Add support for optional auxclk-fs-ratio When McASP is bus master it's reference clock (AUXCLK) might not be a static clock, but running at a specific FS ratio. Signed-off-by: Peter Ujfalusi Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt | 3 +++ 1 file changed, 3 insertions(+) commit 2e927ad7981db6765a2a0e8694371e0154b6e820 Author: David Lin Date: Mon Jun 10 11:05:23 2019 +0800 ASoC: nau8822: support master mode The driver selects the proper BCLK divide through the BCLK and FS at the hardware parameter when the I2S master mode. Signed-off-by: David Lin Signed-off-by: John Hsu Signed-off-by: Mark Brown sound/soc/codecs/nau8822.c | 18 ++++++++++++++++++ sound/soc/codecs/nau8822.h | 7 +++++++ 2 files changed, 25 insertions(+) commit ecab9be174d98ffbc69d614978f2372ca2ef54c9 Author: Chris Wilson Date: Wed Jun 12 11:57:20 2019 +0100 drm/i915: Combine unbound/bound list tracking for objects With async binding, we don't want to manage a bound/unbound list as we may end up running before we even acquire the pages. All that is required is keeping track of shrinkable objects, so reduce it to the minimum list. Fixes: 6951e5893b48 ("drm/i915: Move GEM object domain management from struct_mutex to local") Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20190612105720.30310-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gem/i915_gem_domain.c | 11 +- drivers/gpu/drm/i915/gem/i915_gem_object.c | 2 +- drivers/gpu/drm/i915/gem/i915_gem_object_types.h | 2 +- drivers/gpu/drm/i915/gem/i915_gem_pages.c | 10 +- drivers/gpu/drm/i915/gem/i915_gem_pm.c | 30 +++- drivers/gpu/drm/i915/gem/i915_gem_shrinker.c | 30 ++-- drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 5 +- drivers/gpu/drm/i915/i915_debugfs.c | 191 +---------------------- drivers/gpu/drm/i915/i915_drv.h | 14 +- drivers/gpu/drm/i915/i915_gem.c | 30 ++-- drivers/gpu/drm/i915/i915_vma.c | 34 +--- drivers/gpu/drm/i915/selftests/i915_gem_evict.c | 16 +- drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 2 +- 13 files changed, 95 insertions(+), 282 deletions(-) commit a522f1d0c381c42f3ace13b8bbeeccabdd6d2e5c Author: Tony Lindgren Date: Tue Jun 11 23:33:52 2019 -0700 gpio: omap: Fix lost edge wake-up interrupts If an edge interrupt triggers while entering idle just before we save GPIO datain register to saved_datain, the triggered GPIO will not be noticed on wake-up. This is because the saved_datain and GPIO datain are the same on wake-up in omap_gpio_unidle(). Let's fix this by ignoring any pending edge interrupts for saved_datain. This issue affects only idle states where the GPIO module internal wake-up path is operational. For deeper idle states where the GPIO module gets powered off, Linux generic wakeirqs must be used for the padconf wake-up events with pinctrl-single driver. For examples, please see "interrupts-extended" dts usage in many drivers. This issue can be somewhat easily reproduced by pinging an idle system with smsc911x Ethernet interface configured IRQ_TYPE_EDGE_FALLING. At some point the smsc911x interrupts will just stop triggering. Also if WLCORE WLAN is used with EDGE interrupt like it's documentation specifies, we can see lost interrupts without this patch. Note that in the long run we may be able to cancel entering idle by returning an error in gpio_omap_cpu_notifier() on pending interrupts. But let's fix the bug first. Also note that because of the recent clean-up efforts this patch does not apply directly to older kernels. This does fix a long term issue though, and can be backported as needed. Cc: Aaro Koskinen Cc: Grygorii Strashko Cc: Keerthy Cc: Ladislav Michl Cc: Peter Ujfalusi Cc: Russell King Cc: Tero Kristo Signed-off-by: Tony Lindgren Signed-off-by: Linus Walleij drivers/gpio/gpio-omap.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 67e291362a759be998c43cbd35b20ac3fa9add4b Author: Fabrizio Castro Date: Tue Jun 11 14:06:41 2019 +0100 arm64: dts: renesas: r8a774a1: Add TMU device nodes This patch adds TMU[01234] device tree nodes to the r8a774a1 SoC specific DT. Signed-off-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a774a1.dtsi | 65 +++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) commit aa85b3cac7d87cb28f27c8bf8f1737290879ad57 Author: Fabrizio Castro Date: Tue Jun 11 14:06:38 2019 +0100 arm64: dts: renesas: r8a774a1: Add CMT device nodes This patch adds the CMT[0123] device tree nodes to the r8a774a1 SoC specific DT. Signed-off-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a774a1.dtsi | 70 +++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) commit 6a80b30086b861b2591ba2a953042abd08c498e3 Author: Linus Walleij Date: Mon Jun 10 16:04:39 2019 +0200 fmc: Delete the FMC subsystem The FMC subsystem was created in 2012 with the ambition to drive development of drivers for this hardware upstream. The current implementation has architectural flaws and would need to be revamped using real hardware to something that can reuse existing kernel abstractions in the subsystems for e.g. I2C, FPGA and GPIO. We have concluded that for the mainline kernel it will be better to delete the subsystem and start over with a clean slate when/if an active maintainer steps up. For details see: https://lkml.org/lkml/2018/10/29/534 Suggested-by: Federico Vaga Cc: Pat Riehecky Acked-by: Alessandro Rubini Signed-off-by: Federico Vaga Signed-off-by: Linus Walleij Documentation/fmc/API.txt | 47 ---- Documentation/fmc/FMC-and-SDB.txt | 88 -------- Documentation/fmc/carrier.txt | 311 -------------------------- Documentation/fmc/fmc-chardev.txt | 64 ------ Documentation/fmc/fmc-fakedev.txt | 36 --- Documentation/fmc/fmc-trivial.txt | 17 -- Documentation/fmc/fmc-write-eeprom.txt | 98 --------- Documentation/fmc/identifiers.txt | 168 -------------- Documentation/fmc/mezzanine.txt | 123 ----------- Documentation/fmc/parameters.txt | 56 ----- drivers/Kconfig | 2 - drivers/Makefile | 1 - drivers/fmc/Kconfig | 52 ----- drivers/fmc/Makefile | 15 -- drivers/fmc/fmc-chardev.c | 199 ----------------- drivers/fmc/fmc-core.c | 388 --------------------------------- drivers/fmc/fmc-debug.c | 172 --------------- drivers/fmc/fmc-dump.c | 58 ----- drivers/fmc/fmc-fakedev.c | 355 ------------------------------ drivers/fmc/fmc-match.c | 113 ---------- drivers/fmc/fmc-private.h | 8 - drivers/fmc/fmc-sdb.c | 219 ------------------- drivers/fmc/fmc-trivial.c | 102 --------- drivers/fmc/fmc-write-eeprom.c | 175 --------------- drivers/fmc/fru-parse.c | 80 ------- include/linux/fmc-sdb.h | 39 ---- include/linux/fmc.h | 271 ----------------------- 27 files changed, 3257 deletions(-) commit 102308f557bca8e539a800614b0e274945a81cdf Author: YueHaibing Date: Wed Jun 12 11:18:25 2019 +0800 ipmi: ipmb: Fix build error while CONFIG_I2C is set to m If CONFIG_I2C is m and CONFIG_I2C_SLAVE is y, building with CONFIG_IPMB_DEVICE_INTERFACE setting to y will fail: drivers/char/ipmi/ipmb_dev_int.o: In function `ipmb_remove': ipmb_dev_int.c: undefined reference to `i2c_slave_unregister' drivers/char/ipmi/ipmb_dev_int.o: In function `ipmb_write': ipmb_dev_int.c: undefined reference to `i2c_smbus_write_block_data' drivers/char/ipmi/ipmb_dev_int.o: In function `ipmb_probe': ipmb_dev_int.c: undefined reference to `i2c_slave_register' drivers/char/ipmi/ipmb_dev_int.o: In function `ipmb_driver_init': ipmb_dev_int.c: undefined reference to `i2c_register_driver' drivers/char/ipmi/ipmb_dev_int.o: In function `ipmb_driver_exit': ipmb_dev_int.c: undefined reference to `i2c_del_driver' Add I2C Kconfig dependency to fix this. Reported-by: Hulk Robot Fixes: 51bd6f291583 ("Add support for IPMB driver") Signed-off-by: YueHaibing Message-Id: <20190612031825.24732-1-yuehaibing@huawei.com> Signed-off-by: Corey Minyard drivers/char/ipmi/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 015a75077d7b9d95ff882d0a6bbf0913df36a593 Author: Fabrizio Castro Date: Fri Jun 7 09:14:11 2019 +0100 arm64: dts: renesas: hihope-common: Add uSD and eMMC This patch adds uSD and eMMC support to the HiHope RZ/G2M board. Signed-off-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/hihope-common.dtsi | 77 ++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) commit 2e80e10f2d71f42c6c8f82fc173b21be856acc0f Author: Icenowy Zheng Date: Tue Jun 11 22:09:31 2019 +0800 dt-bindings: pinctrl: add compatible string for Allwinner V3 pinctrl The Allwinner V3 SoC, despite come with the same die with V3s, has more GPIO pins than V3s, and a different compatible string for pinctrl is needed. Add the compatible string for V3 pinctrl. Signed-off-by: Icenowy Zheng Reviewed-by: Rob Herring Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt | 1 + 1 file changed, 1 insertion(+) commit 1d90dff62e16fee5bdc761c3230cc8a4c79814fc Author: Icenowy Zheng Date: Tue Jun 11 22:09:30 2019 +0800 dt-bindings: pinctrl: add missing compatible string for V3s The pinctrl driver of V3s is already available and used in the kernel, but the compatible string of it is forgotten to be added. Add the missing compatible string. Signed-off-by: Icenowy Zheng Acked-by: Maxime Ripard Reviewed-by: Rob Herring Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt | 1 + 1 file changed, 1 insertion(+) commit 06585ed38b6698bcaccd0f969e8117b2780d6355 Author: Takeshi Kihara Date: Sun Jun 9 21:43:18 2019 +0900 arm64: dts: renesas: r8a77990: Fix register range of display node Since the R8A77990 SoC uses DU{0,1}, the range from the base address to the 0x4000 address is used. This patch fixed it. Fixes: 13ee2bfc5444 ("arm64: dts: renesas: r8a77990: Add display output support") Signed-off-by: Takeshi Kihara Signed-off-by: Yoshihiro Kaneko Reviewed-by: Simon Horman Reviewed-by: Laurent Pinchart Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77990.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ec0a286a339e0fff8666d48ccce48263488e64fb Author: Biju Das Date: Fri May 31 11:00:00 2019 +0100 arm64: dts: renesas: cat874: Enable usb role switch support This patch enables TI HD3SS3220 device and support usb role switch for the CAT 874 platform. Signed-off-by: Biju Das Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a774c0-cat874.dts | 32 +++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit cf7b175ae4deee43e3408bece10246d6a54cbe4c Author: Biju Das Date: Fri May 31 10:59:59 2019 +0100 arm64: dts: renesas: cat874: Enable USB3.0 host/peripheral device node This patch enables USB3.0 host/peripheral device node for the cat874 board. Signed-off-by: Biju Das Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a774c0-cat874.dts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit c24f6886b2ee321b50543d3683573689a1817336 Author: Biju Das Date: Fri May 31 10:59:58 2019 +0100 arm64: defconfig: enable TYPEC_HD3SS3220 config option Enable support for the TI HD3SS320 USB Type-C DRP Port controller driver by turning on CONFIG_TYPEC and CONFIG_TYPEC_HD3SS3220 as modules. Signed-off-by: Biju Das Signed-off-by: Simon Horman arch/arm64/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+) commit 46f69d06afd0174b5448ca8b0772a388cb3de9c6 Author: Laurent Pinchart Date: Tue May 28 17:12:32 2019 +0300 arm64: dts: renesas: r8a7799[05]: Point LVDS0 to its companion LVDS1 Add the new renesas,companion property to the LVDS0 node to point to the companion LVDS encoder LVDS1. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Tested-by: Jacopo Mondi Reviewed-by: Kieran Bingham Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77990.dtsi | 2 ++ arch/arm64/boot/dts/renesas/r8a77995.dtsi | 2 ++ 2 files changed, 4 insertions(+) commit 6ce1c33d6c36fb3858e8e956d72586f7a024ed3a Author: Ville Syrjälä Date: Wed Jun 5 19:29:46 2019 +0300 drm/i915: Kill INTEL_SUBPLATFORM_AML All AML parts are either KBL ULX or CFL ULX so there is no point in keeping INTEL_SUBPLATFORM_AML around. As these are the only CFL ULX parts (normal CFL didn't have Y SKUs) so we'll just replace IS_AML_ULX with IS_CFL_ULX (it was already paired with IS_KBL_ULX which accounts for the other half of the AML parts). Cc: Tvrtko Ursulin Cc: José Roberto de Souza Cc: Rodrigo Vivi Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190605162946.19223-2-ville.syrjala@linux.intel.com Reviewed-by: Rodrigo Vivi drivers/gpu/drm/i915/i915_drv.h | 5 ++--- drivers/gpu/drm/i915/intel_ddi.c | 8 +++++--- drivers/gpu/drm/i915/intel_device_info.c | 6 ------ drivers/gpu/drm/i915/intel_device_info.h | 1 - 4 files changed, 7 insertions(+), 13 deletions(-) commit 736a291d4f665340dbc9af7cc31f7e9ab2ff9943 Author: Biju Das Date: Tue Jun 11 09:22:18 2019 +0100 arm64: dts: renesas: hihope-common: Add RWDT support Enable RWDT and use 60 seconds as default timeout. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/hihope-common.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit 3c3ca5f746d850f9d4c4b1b7aee986f1114178aa Author: Biju Das Date: Fri Jun 7 08:13:59 2019 +0100 arm64: dts: renesas: hihope-rzg2-ex: Enable PCIe support This patch enables PCIEC[01] PCI express controller on the sub board. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/hihope-rzg2-ex.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit c3ad8d29db5e57ba0494105b46f8ba76c2ee07cf Author: Ville Syrjälä Date: Wed Jun 5 19:29:45 2019 +0300 drm/i915: Add missing commas to the end of the subplatform ID arrays Add a comma after the final entry to make diffs less obnoxious if we have to add further entries past the last one. Cc: Tvrtko Ursulin Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190605162946.19223-1-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson #irc drivers/gpu/drm/i915/intel_device_info.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 86761789b38a90ee56d455b81d534ac65e8a2b8b Author: Ville Syrjälä Date: Tue Jun 4 23:09:33 2019 +0300 drm/i915: Improve WRPLL reference clock readout on HSW/BDW On non-ULT HSW the "special" WRPLL reference clock select actually means non-SSC. Take that into account when reading out the WRPLL state. Also the non-SSC reference may be either 24MHz or 135MHz, which we can read out from FUSE_STRAP3. The BDW docs actually say: "also indicates whether the CPU and PCH are in a single package or separate packages", so it may be that this is not actually required and we could just assume 135 MHz (just like the code already did). But it doesn't really hurt to read this out as the HSW docs aren't quite so clear. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190604200933.29417-5-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/i915_reg.h | 3 +++ drivers/gpu/drm/i915/intel_ddi.c | 15 ++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) commit d1707a96b11787c7b9ca11fd93d235d6eb6ccbf1 Author: Ville Syrjälä Date: Tue Jun 4 23:09:32 2019 +0300 drm/i915: Assert that HSW/BDW LCPLL is using the non-SSC reference Only the non-SSC reference is truly supported for the LCPLL. Assert that it is indeed selected. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190604200933.29417-4-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_display_power.c | 3 +++ 1 file changed, 3 insertions(+) commit 0f52c097a25fb09378968db7afed54d306e6bcff Author: Ville Syrjälä Date: Tue Jun 4 23:09:31 2019 +0300 drm/i915: Nuke LC_FREQ Get rid of the pointless LC_FREQ define. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190604200933.29417-3-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_ddi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 61e0505b162a3974663cc6d1dbec30268a7a03ea Author: Biju Das Date: Fri Jun 7 08:13:58 2019 +0100 arm64: dts: renesas: hihope-common: Declare pcie bus clock Declare pcie bus clock, since it is generated on the HiHope RZ/G2M main board. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/hihope-common.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit 4a95e36f0357ab4de6aeadfbe78ffe6af75b2fee Author: Ville Syrjälä Date: Mon Jun 10 16:36:09 2019 +0300 drm/i915: Rename HSW/BDW PLL bits Give the PLL control register bits better names on HSW/BDW. v2: Fix the copy paste fails in SPLL_REF defines (Maarten) Cc: Maarten Lankhorst Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190610133609.27288-1-ville.syrjala@linux.intel.com Acked-by: Maarten Lankhorst #irc drivers/gpu/drm/i915/i915_reg.h | 32 ++++++++++++++++++++------------ drivers/gpu/drm/i915/intel_ddi.c | 16 ++++++++-------- drivers/gpu/drm/i915/intel_display.c | 8 ++++---- drivers/gpu/drm/i915/intel_dpll_mgr.c | 4 ++-- 4 files changed, 34 insertions(+), 26 deletions(-) commit 81f4458c9c6998fcd37c427d16d76d4dba65d015 Author: Tero Kristo Date: Tue May 28 16:10:24 2019 +0300 firmware: ti_sci: extend clock identifiers from u8 to u32 Future SoCs are going to have more than 255 device clocks in certain cases, and thus the API must be extended to support this. The support is done in backwards compatible extension, in which the new u32 clock identifier fields are only used if the existing u8 size clock identifier is set as 255. In all the other cases, the existing u8 clock identifier is used. As the size of the messages sent / received is not verified for existing devices / old firmware, increasing the size of the messages from the end is also fine. Due to this reason, depending on ABI version isn't necessary either. Acked-by: Santosh Shilimkar Signed-off-by: Tero Kristo drivers/firmware/ti_sci.c | 115 ++++++++++++++++++++++++--------- drivers/firmware/ti_sci.h | 63 ++++++++++++++---- include/linux/soc/ti/ti_sci_protocol.h | 28 ++++---- 3 files changed, 150 insertions(+), 56 deletions(-) commit b16c7ed95caf270075c52faad0af8f4cb57ae979 Author: Ville Syrjälä Date: Tue Jun 4 23:09:29 2019 +0300 drm/i915: Do not touch the PCH SSC reference if a PLL is using it Our PCH refclk init code currently assumes that the PCH SSC reference can only be used for FDI. That is not true and it can be used by SPLL/WRPLL for eDP SSC or clock bending as well. Before we go reconfiguring it let's make sure no PLL is currently using the PCH SSC reference. For some reason the hw is not particularly upset about losing the clock if we immediately follow up with a modeset. Can't really explain why nothing times out during the crtc disable at least, but that's what the logs say. With fastboot the story is quite different and we lose the entire display if we turn off the PCH SSC reference when it's still being used. Since we totally skip configuring the PCH SSC reference it may not be in the proper state for FDI. Hopefully that won't be a problem in practice. We really should move this code to be part of the modeset seqeuence and properly deal with the potentially conflicting requirements imposed on PLL reference clocks. But that requires actual work. Let's toss in a TODO for that. v2: Pimp the commit message with the fastboot vs. not details Cc: Julius B. Cc: Johannes Krampf Tested-by: Johannes Krampf Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108773 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190604200933.29417-1-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_display.c | 79 ++++++++++++++++++++++++++++++++++-- 2 files changed, 77 insertions(+), 3 deletions(-) commit a5a41d50ffe77d250655f767eb192dbbc387edd7 Author: Biju Das Date: Fri Jun 7 08:13:57 2019 +0100 arm64: dts: renesas: r8a774a1: Add PCIe device nodes This patch adds PCIe{0,1} device nodes for R8A774A1 SoC. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a774a1.dtsi | 54 +++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) commit 909bad2d978737592b70a0546edfa8bd023ab147 Author: Greg Kroah-Hartman Date: Tue Jun 11 20:45:03 2019 +0200 ti-st: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: linux-kernel@vger.kernel.org Reviewed-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/misc/ti-st/st_kim.c | 4 ---- 1 file changed, 4 deletions(-) commit 5a2338dbf97fac3a93e2ffefa5ab907ac5a9ba56 Author: Greg Kroah-Hartman Date: Tue Jun 11 20:32:13 2019 +0200 lkdtm: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Arnd Bergmann Cc: linux-kernel@vger.kernel.org Acked-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/misc/lkdtm/core.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) commit 225afca60b8a21bb53ca461eef78a60958ff95e4 Author: Greg Kroah-Hartman Date: Tue Jun 11 20:55:28 2019 +0200 vmw_balloon: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Julien Freche Cc: "VMware, Inc." Cc: Arnd Bergmann Cc: linux-kernel@vger.kernel.org Acked-by: Nadav Amit Signed-off-by: Greg Kroah-Hartman drivers/misc/vmw_balloon.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) commit ac778e62634eee0685b622605b063a49edf2f2d1 Author: Florian Fainelli Date: Wed May 8 11:46:35 2019 -0700 hwmon: scmi: Scale values to target desired HWMON units If the SCMI firmware implementation is reporting values in a scale that is different from the HWMON units, we need to scale up or down the value according to how far apart they are. Reviewed-by: Guenter Roeck Signed-off-by: Florian Fainelli [sudeep.holla: added check of scale = 0 for early exit in scmi_hwmon_scale] Signed-off-by: Sudeep Holla drivers/hwmon/scmi-hwmon.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit 0b673b6486998061b0489b09447ebe8452da0146 Author: Florian Fainelli Date: Wed May 8 11:46:34 2019 -0700 firmware: arm_scmi: fetch and store sensor scale In preparation for dealing with scales within the SCMI HWMON driver, fetch and store the sensor unit scale into the scmi_sensor_info structure. In order to simplify computations for upper layer, take care of sign extending the scale to a full 8-bit signed value. Reviewed-by: Guenter Roeck Signed-off-by: Florian Fainelli [sudeep.holla: update bitfield values as per specification] Signed-off-by: Sudeep Holla drivers/firmware/arm_scmi/sensors.c | 6 ++++++ include/linux/scmi_protocol.h | 1 + 2 files changed, 7 insertions(+) commit c0759b9b5d411ab27c479125cee9bae391a96436 Author: Peng Fan Date: Wed May 22 10:15:21 2019 +0000 firmware: arm_scmi: update rate_discrete in clock_describe_rates_get The boolean rate_discrete needs to be assigned to clk->rate_discrete, so that clock driver can distinguish between the continuous range and discrete rates. It uses this in scmi_clk_round_rate could get the rounded value if it's a continuous range. Fixes: 5f6c6430e904 ("firmware: arm_scmi: add initial support for clock protocol") Signed-off-by: Peng Fan [sudeep.holla: updated commit message] Signed-off-by: Sudeep Holla drivers/firmware/arm_scmi/clock.c | 2 ++ 1 file changed, 2 insertions(+) commit 430daaf96ad133be5ce7c3a5c60e94247f7c6f71 Author: Sudeep Holla Date: Tue May 14 17:10:31 2019 +0100 firmware: arm_scmi: fix bitfield definitions for SENSOR_DESC attributes As per the SCMI specification the bitfields for SENSOR_DESC attributes are as follows: attributes_low [7:0] Number of trip points supported attributes_high [15:11] The power-of-10 multiplier in 2's-complement format that is applied to the sensor units Looks like the code developed during the draft versions of the specification slipped through and are wrong with respect to final released version. Fix them by adjusting the bitfields appropriately. Fixes: 5179c523c1ea ("firmware: arm_scmi: add initial support for sensor protocol") Reviewed-by: Florian Fainelli Signed-off-by: Sudeep Holla drivers/firmware/arm_scmi/sensors.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0ab2c44def8f6cc637a5fb3ce9766d69d2c289d0 Author: Volodymyr Babchuk Date: Thu May 23 11:23:35 2019 +0000 dt-bindings: arm: fix the document ID for SCMI protocol documentation arm,scmi.txt used the wrong document identifier. "ARM DUI 0922B" is the "ARM Compute Subsystem SCP, Message Interface Protocols". What we need is the ARM DEN 0056A - "ARM System Control and Management Interface Platform Design Document". Fixes: fe7be8b297b2 ("dt-bindings: arm: add support for ARM System Control and Management Interface(SCMI) protocol") Signed-off-by: Volodymyr Babchuk Signed-off-by: Sudeep Holla Documentation/devicetree/bindings/arm/arm,scmi.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fdb7e884ad617f8aa69abdd7f39e3fdac85e081e Author: Linus Walleij Date: Sat Jun 1 00:37:56 2019 +0200 i2c: iop: Use GPIO descriptors The IOP3xx has some elaborate code to directly slam the GPIO lines multiplexed with I2C down low before enablement, apparently a workaround for a hardware bug found in the early chips. After consulting the developer documentation for IOP80321 and IOP80331 I can clearly see that this may be useful for IOP80321 family (mach-iop32x) but it is highly dubious for any 80331 series or later chip: in these chips the lines are not multiplexed for UARTs. We convert the code to pass optional GPIO descriptors and register these only on the 80321-based boards where it makes sense, optionally obtain them in the driver and use the gpiod_set_raw_value() to ascertain the line gets driven low when needed. The GPIO driver does not give the GPIO chip a reasonable label so the patch also adds that so that these machine descriptor tables can be used. Signed-off-by: Linus Walleij Acked-by: Arnd Bergmann Acked-by: Dan Williams Signed-off-by: Wolfram Sang arch/arm/include/asm/hardware/iop3xx.h | 2 ++ arch/arm/mach-iop32x/em7210.c | 3 +++ arch/arm/mach-iop32x/glantank.c | 3 +++ arch/arm/mach-iop32x/iq31244.c | 3 +++ arch/arm/mach-iop32x/iq80321.c | 3 +++ arch/arm/mach-iop32x/n2100.c | 2 ++ arch/arm/plat-iop/i2c.c | 24 ++++++++++++++++++++++++ drivers/gpio/gpio-iop.c | 1 + drivers/i2c/busses/i2c-iop3xx.c | 32 +++++++++++++++++++++----------- drivers/i2c/busses/i2c-iop3xx.h | 2 ++ 10 files changed, 64 insertions(+), 11 deletions(-) commit 33df8a7697a08ec96811a1e9bbce45c7cdbbc316 Author: Chris Wilson Date: Wed Jun 12 09:52:46 2019 +0100 drm/i915: Prevent lock-cycles between GPU waits and GPU resets We cannot allow ourselves to wait on the GPU while holding any lock as we may need to reset the GPU. While there is not an explicit lock between the two operations, lockdep cannot detect the dependency. So let's tell lockdep about the wait/reset dependency with an explicit lockmap. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190612085246.16374-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gt/intel_reset.c | 5 ++++- drivers/gpu/drm/i915/i915_drv.h | 8 ++++++++ drivers/gpu/drm/i915/i915_gem.c | 3 +++ drivers/gpu/drm/i915/i915_request.c | 2 ++ drivers/gpu/drm/i915/selftests/mock_gem_device.c | 2 ++ 5 files changed, 19 insertions(+), 1 deletion(-) commit ed7357c9f9b6a560992446c37260be25e514c4ab Author: Linus Walleij Date: Thu May 30 23:50:13 2019 +0200 i2c: s3c2410: Convert to use GPIO descriptors The S3C2410 does some funny dance around its pins: - First try to call back to the platform to get and control some GPIO pins - If this doesn't work, it tries to get a pin control handle - If this doesn't work, it retrieves two GPIOs from the device tree node and does nothing with them If we're gonna retrieve two GPIOs and do nothing with them, we might as well do it using the GPIO descriptor API. When we use the resource management API, the code gets smaller. Signed-off-by: Linus Walleij Acked-by: Krzysztof Kozlowski Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-s3c2410.c | 47 ++++++++-------------------------------- 1 file changed, 9 insertions(+), 38 deletions(-) commit bebff81fb8b9216eb4fba22cf910553621ae3477 Author: Annaliese McDermond Date: Sat Jun 8 10:14:43 2019 -0700 i2c: bcm2835: Model Divider in CCF Model the I2C bus clock divider as a part of the Core Clock Framework. Primarily this removes the clk_get_rate() call from each transfer. This call causes problems for slave drivers that themselves have internal clock components that are controlled by an I2C interface. When the slave's internal clock component is prepared, the prepare lock is obtained, and it makes calls to the I2C subsystem to command the hardware to activate the clock. In order to perform the I2C transfer, this driver sets the divider, which requires it to get the parent clock rate, which it does with clk_get_rate(). Unfortunately, this function will try to take the clock prepare lock, which is already held by the slave's internal clock calls creating a deadlock. Modeling the divider in the CCF natively removes this dependency and the divider value is only set upon changing the bus clock frequency or changes in the parent clock that cascade down to this divisor. This obviates the need to set the divider with every transfer and avoids the deadlock described above. It also should provide better clock debugging and save a few cycles on each transfer due to not having to recalcuate the divider value. Signed-off-by: Annaliese McDermond Acked-by: Stefan Wahren Reviewed-by: Eric Anholt Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-bcm2835.c | 145 ++++++++++++++++++++++++++++++--------- 1 file changed, 114 insertions(+), 31 deletions(-) commit d7bfba7296ca02123938719c2192d1fae6e1b148 Author: Leonard Crestez Date: Wed Jun 5 13:37:08 2019 +0300 ARM: dts: imx7d: Update cpufreq OPP table According to latest docs imx7d chips can go from 800 to 1200 mhz. Maximum frequency is determined from two speed grading bits present in OCOTP fuses at same location as other imx chips. Also update to "typical" voltages from latest datasheet, 25mv higher than current dts. All imx7s parts are still fixed at 800mhz Based on: * IMX7DCEC Rev. 6, 03/2019 * IMX7SCEC Rev. 6, 03/2019 * IMX7DRM Rev. 1, 01/2018 Page 1102 Signed-off-by: Leonard Crestez Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7d.dtsi | 16 +++++++++++++--- arch/arm/boot/dts/imx7s.dtsi | 4 ++++ 2 files changed, 17 insertions(+), 3 deletions(-) commit a5a9dffcc9034ec244f68ead4e61c80965cc8d2d Author: Leonard Crestez Date: Wed Jun 5 13:37:07 2019 +0300 ARM: imx: Switch imx7d to imx-cpufreq-dt for speed-grading The imx-cpufreq-dt driver can handle speed grading bits on imx7d just like on imx8mq and imx8mm. Signed-off-by: Leonard Crestez Signed-off-by: Shawn Guo arch/arm/mach-imx/mach-imx7d.c | 7 +++++++ 1 file changed, 7 insertions(+) commit fbbe4941f0dd36b5d39a4a1796aca8ce1f8efdf5 Author: Bitan Biswas Date: Tue Jun 11 03:51:12 2019 -0700 i2c: tegra: fix msleep warning Fix checkpatch.pl WARNING for delay of approximately 1msec in flush i2c FIFO polling loop by using usleep_range(1000, 2000): WARNING: msleep < 20ms can sleep for up to 20ms; see ... Documentation/timers/timers-howto.txt + msleep(1); Signed-off-by: Bitan Biswas Reviewed-by: Dmitry Osipenko Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-tegra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9d174476ddc137d3b47b3336f32edaa0ad40e158 Author: Bitan Biswas Date: Tue Jun 11 03:51:11 2019 -0700 i2c: tegra: add spinlock definition comment Fix checkpatch.pl CHECK as follows: CHECK: spinlock_t definition without comment + spinlock_t xfer_lock; Signed-off-by: Bitan Biswas Reviewed-by: Dmitry Osipenko Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-tegra.c | 1 + 1 file changed, 1 insertion(+) commit 26955a7bbfca698b024e1ff750b2d8e3d3f74118 Author: Bitan Biswas Date: Tue Jun 11 03:51:10 2019 -0700 i2c: tegra: fix alignment and spacing violations Fix checkpatch.pl alignment and blank line check(s) in i2c-tegra.c Signed-off-by: Bitan Biswas Reviewed-by: Dmitry Osipenko Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-tegra.c | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) commit 233d0ab6ffdc1a1ada5d393c1b6ba55dbc669764 Author: Bitan Biswas Date: Tue Jun 11 03:51:09 2019 -0700 i2c: tegra: remove unnecessary variable init Remove variable initializations in functions that are followed by assignments before use Signed-off-by: Bitan Biswas Reviewed-by: Dmitry Osipenko Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-tegra.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c84663cbdb4d880ce6e4c7f7503f62235df66ff6 Author: Bitan Biswas Date: Tue Jun 11 03:51:08 2019 -0700 i2c: tegra: clean up macros Clean up macros by: 1) removing unused macros 2) replace constants by macro BIT() Signed-off-by: Bitan Biswas Reviewed-by: Dmitry Osipenko Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-tegra.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) commit ea60f4bdc4330fc3be90e6a8634b9b912046b09d Author: Chris Wilson Date: Wed Jun 12 10:31:11 2019 +0100 drm/i915: Add a label for config DRM_I915_SPIN_REQUEST If we don't give it a label, it does not appear as a configuration option. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190612093111.11684-9-chris@chris-wilson.co.uk drivers/gpu/drm/i915/Kconfig.profile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e3888cda394c72dcfd450afec1121d9777a59805 Author: Thierry Reding Date: Thu Apr 25 17:34:44 2019 +0200 phy: tegra: xusb: Add Tegra210 PLL power supplies The Tegra210 SoC has four inputs that consume power in order to supply the PLLs that drive the various USB, PCI and SATA pads. Signed-off-by: Thierry Reding Acked-by: Jon Hunter Tested-by: Jon Hunter Signed-off-by: Kishon Vijay Abraham I drivers/phy/tegra/xusb-tegra210.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit aa5452f54b9f21213364baed25a0f8241aa09050 Author: Thierry Reding Date: Thu Apr 25 17:34:43 2019 +0200 phy: tegra: xusb: Add Tegra124 PLL power supplies The Tegra124 SoC has four inputs that consume power in order to supply the PLLs that drive the various USB, PCI and SATA pads. Signed-off-by: Thierry Reding Acked-by: Jon Hunter Tested-by: Jon Hunter Signed-off-by: Kishon Vijay Abraham I drivers/phy/tegra/xusb-tegra124.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit f40043b368ae787837ef659728f0b08bd34f5317 Author: Thierry Reding Date: Thu Apr 25 17:34:42 2019 +0200 dt-bindings: phy: tegra-xusb: List PLL power supplies These power supplies provide power for various PLLs that are set up and driven by the XUSB pad controller. These power supplies were previously improperly added to the PCIe and XUSB controllers, but depending on the driver probe order, power to the PLLs will not be supplied soon enough and cause initialization to fail. Reviewed-by: Rob Herring Signed-off-by: Thierry Reding Acked-by: Jon Hunter Signed-off-by: Kishon Vijay Abraham I .../devicetree/bindings/phy/nvidia,tegra124-xusb-padctl.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit d9e100829fca6cbd270d7e005b0c0bb2d14924b8 Author: Florian Fainelli Date: Wed May 22 11:35:25 2019 -0700 phy: usb: phy-brcm-usb: Remove sysfs attributes upon driver removal We are not destroying the sysfs attribute groupe we registered during the probe function which will make subsequent probe calls to that driver fail. Correct that with adding a remove function which only removes those attributes since the reference counting on clocks did its job already. Fixes: 415060b21f31 ("phy: usb: phy-brcm-usb: Add ability to force DRD mode to host or device") Signed-off-by: Florian Fainelli Signed-off-by: Kishon Vijay Abraham I drivers/phy/broadcom/phy-brcm-usb.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit d4a36e82924d3305a17ac987a510f3902df5a4b2 Author: Yoshihiro Shimoda Date: Tue May 28 14:04:02 2019 +0900 phy: renesas: rcar-gen2: Fix memory leak at error paths This patch fixes memory leak at error paths of the probe function. In for_each_child_of_node, if the loop returns, the driver should call of_put_node() before returns. Reported-by: Julia Lawall Fixes: 1233f59f745b237 ("phy: Renesas R-Car Gen2 PHY driver") Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Signed-off-by: Kishon Vijay Abraham I drivers/phy/renesas/phy-rcar-gen2.c | 2 ++ 1 file changed, 2 insertions(+) commit a2558e2478043209ef597a17951297abe23278e9 Author: Colin Sindle Date: Mon Jun 3 13:14:46 2019 +0200 platform/x86: hp_accel: Add support for HP ProBook 450 G0 HP ProBook 450 G0 needs a non-standard mapping (x_inverted). Signed-off-by: Colin Sindle Signed-off-by: Andy Shevchenko drivers/platform/x86/hp_accel.c | 1 + 1 file changed, 1 insertion(+) commit 84f669b4b8c909f3588bc80416b47e3c185504de Author: YueHaibing Date: Wed May 29 22:38:44 2019 +0800 platform/x86: pcengines-apuv2: Make two symbols static Fix sparse warnings: drivers/platform/x86/pcengines-apuv2.c:80:27: warning: symbol 'gpios_led_table' was not declared. Should it be static? drivers/platform/x86/pcengines-apuv2.c:113:27: warning: symbol 'gpios_key_table' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: YueHaibing Acked-By: Enrico Weigelt, metux IT consult Signed-off-by: Andy Shevchenko drivers/platform/x86/pcengines-apuv2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 92a74ce3c466011375bdf8282e64b13a7052aee8 Author: Young Xiao <92siuyang@gmail.com> Date: Wed May 29 09:55:51 2019 +0800 platform/x86: intel_menlow: avoid null pointer deference error Fix a null pointer deference by acpi_driver_data() if device is null (dereference before check). We should only set cdev and check this is OK after we are sure device is not null. Signed-off-by: Young Xiao <92siuyang@gmail.com> Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_menlow.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 711486fd18596315d42cebaac3dba8c408f60a3d Author: Aubrey Li Date: Thu Jun 6 09:22:36 2019 +0800 Documentation/filesystems/proc.txt: Add arch_status file Add documentation for /proc//arch_status file and the x86 specific AVX512_elapsed_ms entry in it. [ tglx: Massage changelog ] Signed-off-by: Aubrey Li Signed-off-by: Thomas Gleixner Cc: akpm@linux-foundation.org Cc: peterz@infradead.org Cc: hpa@zytor.com Cc: ak@linux.intel.com Cc: tim.c.chen@linux.intel.com Cc: dave.hansen@intel.com Cc: arjan@linux.intel.com Cc: adobriyan@gmail.com Cc: aubrey.li@intel.com Cc: linux-api@vger.kernel.org Cc: Andy Lutomirski Cc: Peter Zijlstra Cc: Andi Kleen Cc: Tim Chen Cc: Dave Hansen Cc: Arjan van de Ven Cc: Alexey Dobriyan Cc: Andrew Morton Cc: Linux API Link: https://lkml.kernel.org/r/20190606012236.9391-3-aubrey.li@linux.intel.com Documentation/filesystems/proc.txt | 40 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit 0c608dad2a771c0a11b6d12148d1a8b975e015d4 Author: Aubrey Li Date: Thu Jun 6 09:22:35 2019 +0800 x86/process: Add AVX-512 usage elapsed time to /proc/pid/arch_status AVX-512 components usage can result in turbo frequency drop. So it's useful to expose AVX-512 usage elapsed time as a heuristic hint for user space job schedulers to cluster the AVX-512 using tasks together. Examples: $ while [ 1 ]; do cat /proc/tid/arch_status | grep AVX512; sleep 1; done AVX512_elapsed_ms: 4 AVX512_elapsed_ms: 8 AVX512_elapsed_ms: 4 This means that 4 milliseconds have elapsed since the tsks AVX512 usage was detected when the task was scheduled out. $ cat /proc/tid/arch_status | grep AVX512 AVX512_elapsed_ms: -1 '-1' indicates that no AVX512 usage was recorded for this task. The time exposed is not necessarily accurate when the arch_status file is read as the AVX512 usage is only evaluated when a task is scheduled out. Accurate usage information can be obtained with performance counters. [ tglx: Massaged changelog ] Signed-off-by: Aubrey Li Signed-off-by: Thomas Gleixner Cc: akpm@linux-foundation.org Cc: peterz@infradead.org Cc: hpa@zytor.com Cc: ak@linux.intel.com Cc: tim.c.chen@linux.intel.com Cc: dave.hansen@intel.com Cc: arjan@linux.intel.com Cc: adobriyan@gmail.com Cc: aubrey.li@intel.com Cc: linux-api@vger.kernel.org Cc: Andy Lutomirski Cc: Peter Zijlstra Cc: Andi Kleen Cc: Tim Chen Cc: Dave Hansen Cc: Arjan van de Ven Cc: Alexey Dobriyan Cc: Andrew Morton Cc: Linux API Link: https://lkml.kernel.org/r/20190606012236.9391-2-aubrey.li@linux.intel.com arch/x86/Kconfig | 1 + arch/x86/kernel/fpu/xstate.c | 47 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) commit 68bc30bb9f33fc8d11e3d110d29e06490896a999 Author: Aubrey Li Date: Thu Jun 6 09:22:34 2019 +0800 proc: Add /proc//arch_status Exposing architecture specific per process information is useful for various reasons. An example is the AVX512 usage on x86 which is important for task placement for power/performance optimizations. Adding this information to the existing /prcc/pid/status file would be the obvious choise, but it has been agreed on that a explicit arch_status file is better in separating the generic and architecture specific information. [ tglx: Massage changelog ] Signed-off-by: Aubrey Li Signed-off-by: Thomas Gleixner Acked-by: Andrew Morton Cc: peterz@infradead.org Cc: hpa@zytor.com Cc: ak@linux.intel.com Cc: tim.c.chen@linux.intel.com Cc: dave.hansen@intel.com Cc: arjan@linux.intel.com Cc: adobriyan@gmail.com Cc: aubrey.li@intel.com Cc: linux-api@vger.kernel.org Cc: Andy Lutomirski Cc: Peter Zijlstra Cc: Andi Kleen Cc: Tim Chen Cc: Dave Hansen Cc: Arjan van de Ven Cc: Alexey Dobriyan Cc: Linux API Link: https://lkml.kernel.org/r/20190606012236.9391-1-aubrey.li@linux.intel.com fs/proc/Kconfig | 4 ++++ fs/proc/base.c | 6 ++++++ include/linux/proc_fs.h | 9 +++++++++ 3 files changed, 19 insertions(+) commit 8d4b2daff2567ac189a83ed99aa2f0338afbd5f0 Author: Krzysztof Kozlowski Date: Mon Jun 3 21:23:38 2019 +0200 platform/x86: Remove left-over BACKLIGHT_LCD_SUPPORT The CONFIG_BACKLIGHT_LCD_SUPPORT was removed in commit 8c5dc8d9f19c ("video: backlight: Remove useless BACKLIGHT_LCD_SUPPORT kernel symbol"). Options protected by CONFIG_BACKLIGHT_LCD_SUPPORT are now available directly. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Andy Shevchenko drivers/platform/x86/Kconfig | 2 -- 1 file changed, 2 deletions(-) commit 754dfd7992653ca2e2d6f69fcbf0e9ad3f9ba281 Author: Russell King Date: Mon Jun 10 20:11:03 2019 +0300 gpio: omap: clean up register access in omap2_set_gpio_debounce() Signed-off-by: Russell King Signed-off-by: Grygorii Strashko Tested-by: Tony Lindgren Signed-off-by: Linus Walleij drivers/gpio/gpio-omap.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit f1c32ef14b4c55eabbc40646dc2a70b3114f8691 Author: Russell King Date: Mon Jun 10 20:11:02 2019 +0300 gpio: omap: irq_startup() must not return error codes The irq_startup() method returns an unsigned int, but in __irq_startup() it is assigned to an int. However, nothing checks for errors, so any error that is returned is ignored. Remove the check for GPIO-input mode and the error return. Signed-off-by: Russell King Signed-off-by: Grygorii Strashko Tested-by: Tony Lindgren Signed-off-by: Linus Walleij drivers/gpio/gpio-omap.c | 5 ----- 1 file changed, 5 deletions(-) commit 40fd422a7d599a7a0a7f8d4b373529dd58abaae5 Author: Russell King Date: Mon Jun 10 20:11:01 2019 +0300 gpio: omap: clean up wakeup handling Signed-off-by: Russell King Signed-off-by: Grygorii Strashko Tested-by: Tony Lindgren Signed-off-by: Linus Walleij drivers/gpio/gpio-omap.c | 36 +++++++++++++----------------------- 1 file changed, 13 insertions(+), 23 deletions(-) commit 18bd49c4c7c22a59634c8142d8618f5da8d29250 Author: Russell King Date: Mon Jun 10 20:11:00 2019 +0300 gpio: omap: constify register tables We must never alter the register tables; these are read-only as far as the driver is concerned. Constify these tables. Signed-off-by: Russell King Signed-off-by: Grygorii Strashko Tested-by: Tony Lindgren Signed-off-by: Linus Walleij drivers/gpio/gpio-omap.c | 12 ++++++------ include/linux/platform_data/gpio-omap.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) commit 9c7f798d170a848cdcfbb81763c05635900146aa Author: Russell King Date: Mon Jun 10 20:10:59 2019 +0300 gpio: omap: clean up omap_gpio_restore_context() Use local variables to store the base iomem address and regs table pointer like omap_gpio_init_context() does. Not only does this make the function neater, it also avoids unnecessary reloads of the same data multiple times. Signed-off-by: Russell King Signed-off-by: Grygorii Strashko Tested-by: Tony Lindgren Signed-off-by: Linus Walleij drivers/gpio/gpio-omap.c | 36 +++++++++++++++--------------------- 1 file changed, 15 insertions(+), 21 deletions(-) commit 9a3027812257de71cd4122f69d7f4b16551bc076 Author: Russell King Date: Mon Jun 10 20:10:58 2019 +0300 gpio: omap: remove dataout variation in context handling When a GPIO block has the set/clear dataout registers implemented, it also has the normal dataout register implemented. Reading this register reads the current GPIO output state, and writing it sets the GPIOs to the explicit state. This is the behaviour that we want when saving and restoring the context, so use the dataout register exclusively. Signed-off-by: Russell King Signed-off-by: Grygorii Strashko Tested-by: Tony Lindgren Signed-off-by: Linus Walleij drivers/gpio/gpio-omap.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit 31b2d7f7cc07b60e0ff6aa31192a694ea36795e8 Author: Russell King Date: Mon Jun 10 20:10:57 2019 +0300 gpio: omap: simplify omap_set_gpio_irqenable() omap_set_gpio_irqenable() calls two helpers that are almost the same apart from whether they set or clear bits. We can consolidate these: - in the set/clear bit register case, we can perform the operation on our saved context copy and write the appropriate set/clear register. - otherwise, we can use our read-modify-write helper and invert enable if irqenable_inv is set. Signed-off-by: Russell King Signed-off-by: Grygorii Strashko Tested-by: Tony Lindgren Signed-off-by: Linus Walleij drivers/gpio/gpio-omap.c | 61 ++++++++++++------------------------------------ 1 file changed, 15 insertions(+), 46 deletions(-) commit a47b91587f6a05f2758dfa216c92d9dbc92528e7 Author: Russell King Date: Mon Jun 10 20:10:56 2019 +0300 gpio: omap: simplify omap_toggle_gpio_edge_triggering() This function open-codes an exclusive-or bitwise operation using an if() statement and explicitly setting or clearing the bit. Instead, use an exclusive-or operation instead, and simplify the function. We can combine the preprocessor conditional using IS_ENABLED() and gain some additional compilation coverage. Signed-off-by: Russell King Signed-off-by: Grygorii Strashko Tested-by: Tony Lindgren Signed-off-by: Linus Walleij drivers/gpio/gpio-omap.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) commit 8ee1de65a94b14427b5d5e3a7e7b81523451d4f2 Author: Russell King Date: Mon Jun 10 20:10:55 2019 +0300 gpio: omap: simplify read-modify-write We already have a read-modify-write helper, but there's more that can be done with a read-modify-write helper if it returned the new value. Modify the existing helper to return the new value, and arrange for it to take one less argument by having the caller compute the register address. Signed-off-by: Russell King Signed-off-by: Grygorii Strashko Tested-by: Tony Lindgren Signed-off-by: Linus Walleij drivers/gpio/gpio-omap.c | 83 +++++++++++++++++------------------------------- 1 file changed, 30 insertions(+), 53 deletions(-) commit a0e881e2c5739145a54561751c3c43f07e44d462 Author: Russell King Date: Mon Jun 10 20:10:54 2019 +0300 gpio: omap: simplify bank->level_mask bank->level_mask is merely the bitwise or of the level detection context which we have already read in this function. Rather than repeating additional reads, compute it from the values already read. Signed-off-by: Russell King Signed-off-by: Grygorii Strashko Tested-by: Tony Lindgren Signed-off-by: Linus Walleij drivers/gpio/gpio-omap.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 8ba705957f561ecc0ed4fb6b9c300477c1fc9536 Author: Russell King Date: Mon Jun 10 20:10:53 2019 +0300 gpio: omap: simplify set_multiple() One of the reasons for set_multiple() to exist is to allow multiple GPIOs on the same chip to be changed simultaneously - see commit 5f42424354f5 ("gpiolib: allow simultaneous setting of multiple GPIO outputs"): - Simultaneous glitch-free setting of multiple pins on any kind of parallel bus attached to GPIOs provided they all reside on the same chip and bank. In order for this to work, we should not use the atomic set/clear registers, but instead read-modify-write the dataout register. We already take the spinlock to ensure that happens atomically, so move the code into the set_multiple() function and kill the two helper functions. Signed-off-by: Russell King Signed-off-by: Grygorii Strashko Tested-by: Tony Lindgren Signed-off-by: Linus Walleij drivers/gpio/gpio-omap.c | 45 +++++++-------------------------------------- 1 file changed, 7 insertions(+), 38 deletions(-) commit 6653dd88cf69d95b0e96baf4856e41e5b3cf8005 Author: Russell King Date: Mon Jun 10 20:10:52 2019 +0300 gpio: omap: simplify get_multiple() There is no reason to have helper functions to read the datain and dataout registers when they are only used in one location. Simplify this code to make it more readable. Signed-off-by: Russell King Signed-off-by: Grygorii Strashko Tested-by: Tony Lindgren Signed-off-by: Linus Walleij drivers/gpio/gpio-omap.c | 36 +++++++++++------------------------- 1 file changed, 11 insertions(+), 25 deletions(-) commit 5ca5f92c1add64895bd72ff96f58ff2a1e02a53e Author: Russell King Date: Mon Jun 10 20:10:51 2019 +0300 gpio: omap: simplify get() method omap_gpio_get() calls omap_get_gpio_datain() or omap_get_gpio_dataout() to read the GPIO state. These two functions are only called from this method, so they don't add much value. Move their contents into omap_gpio_get() method and simplify. Signed-off-by: Russell King Signed-off-by: Grygorii Strashko Tested-by: Tony Lindgren Signed-off-by: Linus Walleij drivers/gpio/gpio-omap.c | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) commit 40bb2273a263ada2e563e1e601940e60bf7e53da Author: Russell King Date: Mon Jun 10 20:10:50 2019 +0300 gpio: omap: simplify omap_gpio_get_direction() Architectures are single-copy atomic, which means that simply reading a register is an inherently atomic operation. There is no need to take a spinlock here. Signed-off-by: Russell King Signed-off-by: Grygorii Strashko Tested-by: Tony Lindgren Signed-off-by: Linus Walleij drivers/gpio/gpio-omap.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) commit dfbc6c7a1d25e933fbb6436fa8d9d28589955cf7 Author: Russell King Date: Mon Jun 10 20:10:49 2019 +0300 gpio: omap: move omap_gpio_request() and omap_gpio_free() Move these two functions to live beside the rest of the gpio chip implementation, rather than in the middle of the irq chip implementation. Signed-off-by: Russell King Signed-off-by: Grygorii Strashko Tested-by: Tony Lindgren Signed-off-by: Linus Walleij drivers/gpio/gpio-omap.c | 64 ++++++++++++++++++++++++------------------------ 1 file changed, 32 insertions(+), 32 deletions(-) commit 693de831c6e5412f613b8cd84e2ef442fec91a03 Author: Russell King Date: Mon Jun 10 20:10:48 2019 +0300 gpio: omap: remove irq_ack method The irq_ack method does not fit our hardware requirements. Edge interrupts must be cleared before we handle them, and level interrupts must be cleared after handling them. We handle the interrupt clearance in our interrupt handler for edge IRQs and in the unmask method for level IRQs. Replace the irq_ack method with the no-op method from the dummy irq chip. Signed-off-by: Russell King Signed-off-by: Grygorii Strashko Tested-by: Tony Lindgren Signed-off-by: Linus Walleij drivers/gpio/gpio-omap.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) commit 395373c721a2dc22daf09c902effab5fc0bb5ae5 Author: Russell King Date: Mon Jun 10 20:10:47 2019 +0300 gpio: omap: clean up edge interrupt handling The edge interrupt handling was effectively: isr = ISR_reg & enabled; if (bank->level_mask) level_mask = bank->level_mask & enabled; else level_mask = 0; edge = isr & ~level_mask; When bank->level_mask is zero, level_mask will be computed as zero anyway, so the if() statement is redundant. We are then left with: isr = ISR_reg & enabled; level_mask = bank->level_mask & enabled; edge = isr & ~level_mask; This can be simplified further to: isr = ISR_reg & enabled; edge = isr & ~bank->level_mask; since the second mask with 'enabled' is redundant. Improve the associated comment as well. Signed-off-by: Russell King Signed-off-by: Grygorii Strashko Tested-by: Tony Lindgren Signed-off-by: Linus Walleij drivers/gpio/gpio-omap.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit c030a9c96b8e429405f103113f26f330fb58417e Author: Russell King Date: Mon Jun 10 20:10:46 2019 +0300 gpio: omap: remove remainder of list management Commit c4791bc6e3a6 ("gpio: omap: drop omap_gpio_list") removed the list head and addition to the list head of each gpio bank, but failed to remove the list_del() call and the node inside struct gpio_bank. Remove these too. Fixes: c4791bc6e3a6 ("gpio: omap: drop omap_gpio_list") Signed-off-by: Russell King Signed-off-by: Grygorii Strashko Tested-by: Tony Lindgren Signed-off-by: Linus Walleij drivers/gpio/gpio-omap.c | 2 -- 1 file changed, 2 deletions(-) commit 64ea3e9094a1f13b96c33244a3fb3a0f45690bd2 Author: Russell King Date: Mon Jun 10 20:10:45 2019 +0300 gpio: omap: fix lack of irqstatus_raw0 for OMAP4 Commit 384ebe1c2849 ("gpio/omap: Add DT support to GPIO driver") added the register definition tables to the gpio-omap driver. Subsequently to that commit, commit 4e962e8998cc ("gpio/omap: remove cpu_is_omapxxxx() checks from *_runtime_resume()") added definitions for irqstatus_raw* registers to the legacy OMAP4 definitions, but missed the DT definitions. This causes an unintentional change of behaviour for the 1.101 errata workaround on OMAP4 platforms. Fix this oversight. Fixes: 4e962e8998cc ("gpio/omap: remove cpu_is_omapxxxx() checks from *_runtime_resume()") Signed-off-by: Russell King Signed-off-by: Grygorii Strashko Tested-by: Tony Lindgren Signed-off-by: Linus Walleij drivers/gpio/gpio-omap.c | 2 ++ 1 file changed, 2 insertions(+) commit c859e0d479b3b4f6132fc12637c51e01492f31f6 Author: Russell King Date: Mon Jun 10 20:10:44 2019 +0300 gpio: omap: ensure irq is enabled before wakeup Documentation states: NOTE: There must be a correlation between the wake-up enable and interrupt-enable registers. If a GPIO pin has a wake-up configured on it, it must also have the corresponding interrupt enabled (on one of the two interrupt lines). Ensure that this condition is always satisfied by enabling the detection events after enabling the interrupt, and disabling the detection before disabling the interrupt. This ensures interrupt/wakeup events can not happen until both the wakeup and interrupt enables correlate. If we do any clearing, clear between the interrupt enable/disable and trigger setting. Signed-off-by: Russell King Signed-off-by: Grygorii Strashko Tested-by: Tony Lindgren Signed-off-by: Linus Walleij drivers/gpio/gpio-omap.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit a66d955e910ab0e598d7a7450cbe6139f52befe7 Author: Pavankumar Kondeti Date: Mon Jun 3 10:01:03 2019 +0530 cpu/hotplug: Abort disabling secondary CPUs if wakeup is pending When "deep" suspend is enabled, all CPUs except the primary CPU are frozen via CPU hotplug one by one. After all secondary CPUs are unplugged the wakeup pending condition is evaluated and if pending the suspend operation is aborted and the secondary CPUs are brought up again. CPU hotplug is a slow operation, so it makes sense to check for wakeup pending in the freezer loop before bringing down the next CPU. This improves the system suspend abort latency significantly. [ tglx: Massaged changelog and improved printk message ] Signed-off-by: Pavankumar Kondeti Signed-off-by: Thomas Gleixner Cc: "Rafael J. Wysocki" Cc: Len Brown Cc: Pavel Machek Cc: Josh Poimboeuf Cc: Peter Zijlstra Cc: Konrad Rzeszutek Wilk Cc: iri Kosina Cc: Mukesh Ojha Cc: linux-pm@vger.kernel.org Link: https://lkml.kernel.org/r/1559536263-16472-1-git-send-email-pkondeti@codeaurora.org kernel/cpu.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 1be451d993170d6933c8aa5d80585595f149805f Author: Florian Westphal Date: Wed Jun 12 10:30:58 2019 +0200 xfrm: fix bogus WARN_ON with ipv6 net/xfrm/xfrm_input.c:378:17: warning: this statement may fall through [-Wimplicit-fallthrough=] skb->protocol = htons(ETH_P_IPV6); ... the fallthrough then causes a bogus WARN_ON(). Reported-by: Stephen Rothwell Fixes: 4c203b0454b ("xfrm: remove eth_proto value from xfrm_state_afinfo") Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert net/xfrm/xfrm_input.c | 1 + 1 file changed, 1 insertion(+) commit 6baac53e03c31a9612c8919da7b9ae4b34ba6f2a Author: Daniel Smith Date: Fri May 24 02:09:13 2019 +0700 platform/x86: touchscreen_dmi: Add info for the CHUWI Hi10 Plus tablet. Added touch screen info for CHUWI Hi10 Plus tablet. Signed-off-by: Daniel Smith Signed-off-by: Andy Shevchenko drivers/platform/x86/touchscreen_dmi.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 0bfcd24b39c29dbaba81a188ca364563866e6ecc Author: Vadim Pasternak Date: Thu May 23 16:41:52 2019 +0000 platform/mellanox: mlxreg-hotplug: Add devm_free_irq call to remove flow Add devm_free_irq() call to mlxreg-hotplug remove() for clean release of devices irq resource. Fix debugobjects warning triggered by rmmod It prevents of use-after-free memory, related to mlxreg_hotplug_work_handler. Issue has been reported as debugobjects warning triggered by 'rmmod mlxtreg-hotplug' flow, while running kernel with CONFIG_DEBUG_OBJECTS* options. [ 2489.623551] ODEBUG: free active (active state 0) object type: work_struct hint: mlxreg_hotplug_work_handler+0x0/0x7f0 [mlxreg_hotplug] [ 2489.637097] WARNING: CPU: 5 PID: 3924 at lib/debugobjects.c:328 debug_print_object+0xfe/0x180 [ 2489.637165] RIP: 0010:debug_print_object+0xfe/0x180 ? [ 2489.637214] Call Trace: [ 2489.637225] __debug_check_no_obj_freed+0x25e/0x320 [ 2489.637231] kfree+0x82/0x110 [ 2489.637238] release_nodes+0x33c/0x4e0 [ 2489.637242] ? devres_remove_group+0x1b0/0x1b0 [ 2489.637247] device_release_driver_internal+0x146/0x270 [ 2489.637251] driver_detach+0x73/0xe0 [ 2489.637254] bus_remove_driver+0xa1/0x170 [ 2489.637261] __x64_sys_delete_module+0x29e/0x320 [ 2489.637265] ? __ia32_sys_delete_module+0x320/0x320 [ 2489.637268] ? blkcg_exit_queue+0x20/0x20 [ 2489.637273] ? task_work_run+0x7d/0x100 [ 2489.637278] ? exit_to_usermode_loop+0x5b/0xf0 [ 2489.637281] do_syscall_64+0x73/0x160 [ 2489.637287] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 2489.637290] RIP: 0033:0x7f95c3596fd7 The difference in release flow with and with no devm_free_irq is listed below: bus: 'platform': remove driver mlxreg-hotplug mlxreg_hotplug_remove(start) -> devm_free_irq (with new code) mlxreg_hotplug_remove (end) release_nodes (start) mlxreg-hotplug: DEVRES REL devm_hwmon_release (8 bytes) device: 'hwmon3': device_unregister PM: Removing info for No Bus:hwmon3 mlxreg-hotplug: DEVRES REL devm_kzalloc_release (88 bytes) mlxreg-hotplug: DEVRES REL devm_kzalloc_release (6 bytes) mlxreg-hotplug: DEVRES REL devm_kzalloc_release (5 bytes) mlxreg-hotplug: DEVRES REL devm_kzalloc_release (5 bytes) mlxreg-hotplug: DEVRES REL devm_kzalloc_release (5 bytes) mlxreg-hotplug: DEVRES REL devm_kzalloc_release (5 bytes) mlxreg-hotplug: DEVRES REL devm_kzalloc_release (5 bytes) mlxreg-hotplug: DEVRES REL devm_kzalloc_release (5 bytes) mlxreg-hotplug: DEVRES REL devm_kzalloc_release (5 bytes) mlxreg-hotplug: DEVRES REL devm_kzalloc_release (5 bytes) mlxreg-hotplug: DEVRES REL devm_kzalloc_release (5 bytes) mlxreg-hotplug: DEVRES REL devm_kzalloc_release (5 bytes) mlxreg-hotplug: DEVRES REL devm_irq_release (16 bytes) (no new code) mlxreg-hotplug: DEVRES REL devm_kzalloc_release (1376 bytes) ------------[ cut here ]------------ (no new code): ODEBUG: free active (active state 0) object type: work_struct hint: mlxreg_hotplug_work_handler release_nodes(end) driver: 'mlxreg-hotplug': driver_release Fixes: 1f976f6978bf ("platform/x86: Move Mellanox platform hotplug driver to platform/mellanox") Signed-off-by: Vadim Pasternak Signed-off-by: Andy Shevchenko drivers/platform/mellanox/mlxreg-hotplug.c | 1 + 1 file changed, 1 insertion(+) commit fa882fc80dc8bf6ed24c0a85e73c17d62d2b1754 Author: Vadim Pasternak Date: Wed Jun 5 07:51:03 2019 +0000 platform/x86: mlx-platform: Fix parent device in i2c-mux-reg device registration Fix the issue found while running kernel with the option CONFIG_DEBUG_TEST_DRIVER_REMOVE. Driver 'mlx-platform' registers 'i2c_mlxcpld' device and then registers few underlying 'i2c-mux-reg' devices: priv->pdev_i2c = platform_device_register_simple("i2c_mlxcpld", nr, NULL, 0); ... for (i = 0; i < ARRAY_SIZE(mlxplat_mux_data); i++) { priv->pdev_mux[i] = platform_device_register_resndata( &mlxplat_dev->dev, "i2c-mux-reg", i, NULL, 0, &mlxplat_mux_data[i], sizeof(mlxplat_mux_data[i])); But actual parent of "i2c-mux-reg" device is priv->pdev_i2c->dev and not mlxplat_dev->dev. Patch fixes parent device parameter in a call to platform_device_register_resndata() for "i2c-mux-reg". It solves the race during initialization flow while 'i2c_mlxcpld.1' is removing after probe, while 'i2c-mux-reg.0' is still in probing flow: 'i2c_mlxcpld.1' flow: probe -> remove -> probe. 'i2c-mux-reg.0' flow: probe -> ... [ 12:621096] Registering platform device 'i2c_mlxcpld.1'. Parent at platform [ 12:621117] device: 'i2c_mlxcpld.1': device_add [ 12:621155] bus: 'platform': add device i2c_mlxcpld.1 [ 12:621384] Registering platform device 'i2c-mux-reg.0'. Parent at mlxplat [ 12:621395] device: 'i2c-mux-reg.0': device_add [ 12:621425] bus: 'platform': add device i2c-mux-reg.0 [ 12:621806] Registering platform device 'i2c-mux-reg.1'. Parent at mlxplat [ 12:621828] device: 'i2c-mux-reg.1': device_add [ 12:621892] bus: 'platform': add device i2c-mux-reg.1 [ 12:621906] bus: 'platform': add driver i2c_mlxcpld [ 12:621996] bus: 'platform': driver_probe_device: matched device i2c_mlxcpld.1 with driver i2c_mlxcpld [ 12:622003] bus: 'platform': really_probe: probing driver i2c_mlxcpld with device i2c_mlxcpld.1 [ 12:622100] i2c_mlxcpld i2c_mlxcpld.1: no default pinctrl state [ 12:622293] device: 'i2c-1': device_add [ 12:627280] bus: 'i2c': add device i2c-1 [ 12:627692] device: 'i2c-1': device_add [ 12.629639] bus: 'platform': add driver i2c-mux-reg [ 12.629718] bus: 'platform': driver_probe_device: matched device i2c-mux-reg.0 with driver i2c-mux-reg [ 12.629723] bus: 'platform': really_probe: probing driver i2c-mux-reg with device i2c-mux-reg.0 [ 12.629818] i2c-mux-reg i2c-mux-reg.0: no default pinctrl state [ 12.629981] platform i2c-mux-reg.0: Driver i2c-mux-reg requests probe deferral [ 12.629986] platform i2c-mux-reg.0: Added to deferred list [ 12.629992] bus: 'platform': driver_probe_device: matched device i2c-mux-reg.1 with driver i2c-mux-reg [ 12.629997] bus: 'platform': really_probe: probing driver i2c-mux-reg with device i2c-mux-reg.1 [ 12.630091] i2c-mux-reg i2c-mux-reg.1: no default pinctrl state [ 12.630247] platform i2c-mux-reg.1: Driver i2c-mux-reg requests probe deferral [ 12.630252] platform i2c-mux-reg.1: Added to deferred list [ 12.640892] devices_kset: Moving i2c-mux-reg.0 to end of list [ 12.640900] platform i2c-mux-reg.0: Retrying from deferred list [ 12.640911] bus: 'platform': driver_probe_device: matched device i2c-mux-reg.0 with driver i2c-mux-reg [ 12.640919] bus: 'platform': really_probe: probing driver i2c-mux-reg with device i2c-mux-reg.0 [ 12.640999] i2c-mux-reg i2c-mux-reg.0: no default pinctrl state [ 12.641177] platform i2c-mux-reg.0: Driver i2c-mux-reg requests probe deferral [ 12.641187] platform i2c-mux-reg.0: Added to deferred list [ 12.641198] devices_kset: Moving i2c-mux-reg.1 to end of list [ 12.641219] platform i2c-mux-reg.1: Retrying from deferred list [ 12.641237] bus: 'platform': driver_probe_device: matched device i2c-mux-reg.1 with driver i2c-mux-reg [ 12.641247] bus: 'platform': really_probe: probing driver i2c-mux-reg with device i2c-mux-reg.1 [ 12.641331] i2c-mux-reg i2c-mux-reg.1: no default pinctrl state [ 12.641465] platform i2c-mux-reg.1: Driver i2c-mux-reg requests probe deferral [ 12.641469] platform i2c-mux-reg.1: Added to deferred list [ 12.646427] device: 'i2c-1': device_add [ 12.646647] bus: 'i2c': add device i2c-1 [ 12.647104] device: 'i2c-1': device_add [ 12.669231] devices_kset: Moving i2c-mux-reg.0 to end of list [ 12.669240] platform i2c-mux-reg.0: Retrying from deferred list [ 12.669258] bus: 'platform': driver_probe_device: matched device i2c-mux-reg.0 with driver i2c-mux-reg [ 12.669263] bus: 'platform': really_probe: probing driver i2c-mux-reg with device i2c-mux-reg.0 [ 12.669343] i2c-mux-reg i2c-mux-reg.0: no default pinctrl state [ 12.669585] device: 'i2c-2': device_add [ 12.669795] bus: 'i2c': add device i2c-2 [ 12.670201] device: 'i2c-2': device_add [ 12.671427] i2c i2c-1: Added multiplexed i2c bus 2 [ 12.671514] device: 'i2c-3': device_add [ 12.671724] bus: 'i2c': add device i2c-3 [ 12.672136] device: 'i2c-3': device_add [ 12.673378] i2c i2c-1: Added multiplexed i2c bus 3 [ 12.673472] device: 'i2c-4': device_add [ 12.673676] bus: 'i2c': add device i2c-4 [ 12.674060] device: 'i2c-4': device_add [ 12.675861] i2c i2c-1: Added multiplexed i2c bus 4 [ 12.675941] device: 'i2c-5': device_add [ 12.676150] bus: 'i2c': add device i2c-5 [ 12.676550] device: 'i2c-5': device_add [ 12.678103] i2c i2c-1: Added multiplexed i2c bus 5 [ 12.678193] device: 'i2c-6': device_add [ 12.678395] bus: 'i2c': add device i2c-6 [ 12.678774] device: 'i2c-6': device_add [ 12.679969] i2c i2c-1: Added multiplexed i2c bus 6 [ 12.680065] device: 'i2c-7': device_add [ 12.680275] bus: 'i2c': add device i2c-7 [ 12.680913] device: 'i2c-7': device_add [ 12.682506] i2c i2c-1: Added multiplexed i2c bus 7 [ 12.682600] device: 'i2c-8': device_add [ 12.682808] bus: 'i2c': add device i2c-8 [ 12.683189] device: 'i2c-8': device_add [ 12.683907] device: 'i2c-1': device_unregister [ 12.683945] device: 'i2c-1': device_unregister [ 12.684387] device: 'i2c-1': device_create_release [ 12.684536] bus: 'i2c': remove device i2c-1 [ 12.686019] i2c i2c-8: Failed to create compatibility class link [ 12.686086] ------------[ cut here ]------------ [ 12.686087] can't create symlink to mux device [ 12.686224] Workqueue: events deferred_probe_work_func [ 12.686135] WARNING: CPU: 7 PID: 436 at drivers/i2c/i2c-mux.c:416 i2c_mux_add_adapter+0x729/0x7d0 [i2c_mux] [ 12.686232] RIP: 0010:i2c_mux_add_adapter+0x729/0x7d0 [i2c_mux] [ 0x190/0x190 [i2c_mux] [ 12.686300] ? i2c_mux_alloc+0xac/0x110 [i2c_mux] [ 12.686306] ? i2c_mux_reg_set+0x200/0x200 [i2c_mux_reg] [ 12.686313] i2c_mux_reg_probe+0x22c/0x731 [i2c_mux_reg] [ 12.686322] ? i2c_mux_reg_deselect+0x60/0x60 [i2c_mux_reg] [ 12.686346] platform_drv_probe+0xa8/0x110 [ 12.686351] really_probe+0x185/0x720 [ 12.686358] driver_probe_device+0xdf/0x1f0 ... [ 12.686522] i2c i2c-1: Added multiplexed i2c bus 8 [ 12.686621] device: 'i2c-9': device_add [ 12.686626] kobject_add_internal failed for i2c-9 (error: -2 parent: i2c-1) [ 12.694729] i2c-core: adapter 'i2c-1-mux (chan_id 8)': can't register device (-2) [ 12.705726] i2c i2c-1: failed to add mux-adapter 8 as bus 9 (error=-2) [ 12.714494] device: 'i2c-8': device_unregister [ 12.714537] device: 'i2c-8': device_unregister Fixes: 6613d18e9038 ("platform/x86: mlx-platform: Move module from arch/x86") Signed-off-by: Vadim Pasternak Signed-off-by: Andy Shevchenko drivers/platform/x86/mlx-platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 89ae3a07362585dc0856bae5605b0ec77b984ec8 Author: Mathew King Date: Mon May 20 16:41:24 2019 -0600 platform/x86: intel-vbtn: Report switch events when event wakes device When a switch event, such as tablet mode/laptop mode or docked/undocked, wakes a device make sure that the value of the swich is reported. Without when a device is put in tablet mode from laptop mode when it is suspended or vice versa the device will wake up but mode will be incorrect. Tested by suspending a device in laptop mode and putting it in tablet mode, the device resumes and is in tablet mode. When suspending the device in tablet mode and putting it in laptop mode the device resumes and is in laptop mode. Signed-off-by: Mathew King Reviewed-by: Jett Rink Reviewed-by: Mario Limonciello Signed-off-by: Andy Shevchenko drivers/platform/x86/intel-vbtn.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 1dd93f873d8ed8e5b228d1ae324b1f3c1e94bfa8 Author: Hans de Goede Date: Wed Jun 12 09:02:02 2019 +0200 platform/x86: asus-wmi: Only Tell EC the OS will handle display hotkeys from asus_nb_wmi Commit 78f3ac76d9e5 ("platform/x86: asus-wmi: Tell the EC the OS will handle the display off hotkey") causes the backlight to be permanently off on various EeePC laptop models using the eeepc-wmi driver (Asus EeePC 1015BX, Asus EeePC 1025C). The asus_wmi_set_devstate(ASUS_WMI_DEVID_BACKLIGHT, 2, NULL) call added by that commit is made conditional in this commit and only enabled in the quirk_entry structs in the asus-nb-wmi driver fixing the broken display / backlight on various EeePC laptop models. Cc: João Paulo Rechi Vita Fixes: 78f3ac76d9e5 ("platform/x86: asus-wmi: Tell the EC the OS will handle the display off hotkey") Signed-off-by: Hans de Goede Signed-off-by: Andy Shevchenko drivers/platform/x86/asus-nb-wmi.c | 8 ++++++++ drivers/platform/x86/asus-wmi.c | 2 +- drivers/platform/x86/asus-wmi.h | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) commit f6192c664e217eeb8ee4661c3d9dd22765d6c4a7 Merge: 8a0098c05a27 79499bb11db5 Author: Tony Lindgren Date: Wed Jun 12 01:54:11 2019 -0700 Merge commit '79499bb11db508' into fixes commit 4e6d2739407aaf693cca2569eb58408228d2d3b0 Author: Lubomir Rintel Date: Wed May 29 10:34:05 2019 +0200 Platform: OLPC: Add a config menu category for XO 1.75 Randy Dunlap says: drivers/platform/olpc/Kconfig needs to use "menuconfig" like all of the other Kconfig files in drivers/platform/ so that its menu is listed in the correct place in *config interfaces. Otherwise he's sad. Reported-by: Randy Dunlap Signed-off-by: Lubomir Rintel Acked-by: Randy Dunlap Signed-off-by: Andy Shevchenko drivers/platform/olpc/Kconfig | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit af21f32c78e0f3446e50bd01dbd041f4082d5fda Author: Lubomir Rintel Date: Wed May 29 10:34:04 2019 +0200 Platform: OLPC: Require CONFIG_POWER_SUPPLY for XO-1.75 EC ERROR: "power_supply_put" [drivers/platform/olpc/olpc-xo175-ec.ko] undefined! ERROR: "power_supply_changed" [drivers/platform/olpc/olpc-xo175-ec.ko] undefined! ERROR: "power_supply_get_by_name" [drivers/platform/olpc/olpc-xo175-ec.ko] undefined! Adding the dependency seems like a more reasonable thing compared to ifdef-ing the bits, as if one has an XO-1.75 they almost certainly want a baterry and AC adapter support. Reported-by: Randy Dunlap Signed-off-by: Lubomir Rintel Acked-by: Randy Dunlap Signed-off-by: Andy Shevchenko drivers/platform/olpc/Kconfig | 1 + 1 file changed, 1 insertion(+) commit fd43f16cca951b5eea6703f5f98381cf4883f86c Author: Lubomir Rintel Date: Wed May 29 10:34:03 2019 +0200 Platform: OLPC: Fix olpc_xo175_ec_cmd() return value Reset the ret variable to make sure it olpc_xo175_ec_cmd() ends up returning zero on success. Fixes: 0c3d931b3ab9 ("Platform: OLPC: Add XO-1.75 EC driver") Signed-off-by: Lubomir Rintel Signed-off-by: Andy Shevchenko drivers/platform/olpc/olpc-xo175-ec.c | 1 + 1 file changed, 1 insertion(+) commit 0e51833042fccfe882ef3e85a346252550d26c22 Author: Minwoo Im Date: Sun Jun 2 20:21:17 2019 +0900 genirq/affinity: Remove unused argument from [__]irq_build_affinity_masks() The *affd argument is neither used in irq_build_affinity_masks() nor __irq_build_affinity_masks(). Remove it. Signed-off-by: Minwoo Im Signed-off-by: Thomas Gleixner Reviewed-by: Ming Lei Cc: Minwoo Im Cc: linux-block@vger.kernel.org Link: https://lkml.kernel.org/r/20190602112117.31839-1-minwoo.im.dev@gmail.com kernel/irq/affinity.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 699785f5d898965408430e841d10cd1cb2c02a77 Author: Daniel Lezcano Date: Mon May 27 22:55:21 2019 +0200 genirq/timings: Add selftest for next event computation The circular buffers are now validated with selftests. The next interrupt index algorithm which is the hardest part to validate needs extra coverage. Add a selftest which uses the intervals stored in the arrays and insert all the values except the last one. The next event computation must return the same value as the last element which was not inserted. Signed-off-by: Daniel Lezcano Signed-off-by: Thomas Gleixner Cc: andriy.shevchenko@linux.intel.com Link: https://lkml.kernel.org/r/20190527205521.12091-9-daniel.lezcano@linaro.org kernel/irq/timings.c | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) commit f52da98d900e18a250cb14ca426d4041ea7002db Author: Daniel Lezcano Date: Mon May 27 22:55:20 2019 +0200 genirq/timings: Add selftest for irqs circular buffer After testing the per cpu interrupt circular event, make sure the per interrupt circular buffer usage is correct. Add tests to validate the interrupt circular buffer. Signed-off-by: Daniel Lezcano Signed-off-by: Thomas Gleixner Cc: andriy.shevchenko@linux.intel.com Link: https://lkml.kernel.org/r/20190527205521.12091-8-daniel.lezcano@linaro.org kernel/irq/timings.c | 139 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 139 insertions(+) commit 6aed82de719b424bd5548aa4179e95f34fd779ab Author: Daniel Lezcano Date: Mon May 27 22:55:19 2019 +0200 genirq/timings: Add selftest for circular array Due to the complexity of the code and the difficulty to debug it, add some selftests to the framework in order to spot issues or regression at boot time when the runtime testing is enabled for this subsystem. This tests the circular buffer at the limits and validates: - the encoding / decoding of the values - the macro to browse the irq timings circular buffer - the function to push data in the circular buffer Signed-off-by: Daniel Lezcano Signed-off-by: Thomas Gleixner Cc: andriy.shevchenko@linux.intel.com Link: https://lkml.kernel.org/r/20190527205521.12091-7-daniel.lezcano@linaro.org kernel/irq/Makefile | 3 ++ kernel/irq/timings.c | 119 +++++++++++++++++++++++++++++++++++++++++++++++++++ lib/Kconfig.debug | 8 ++++ 3 files changed, 130 insertions(+) commit 23aa3b9a6b7d5029c1f124426bc5ba4430dcc29c Author: Daniel Lezcano Date: Mon May 27 22:55:18 2019 +0200 genirq/timings: Encapsulate storing function For the next patches providing the selftest, it is required to insert interval values directly in the buffer in order to check the correctness of the code. Encapsulate the code doing that in a always inline function in order to reuse it in the test code. No functional changes. Signed-off-by: Daniel Lezcano Signed-off-by: Thomas Gleixner Cc: andriy.shevchenko@linux.intel.com Link: https://lkml.kernel.org/r/20190527205521.12091-6-daniel.lezcano@linaro.org kernel/irq/timings.c | 53 +++++++++++++++++++++++++++++++++------------------- 1 file changed, 34 insertions(+), 19 deletions(-) commit df025e47e4e34b779af2cc72c350877be7104ef3 Author: Daniel Lezcano Date: Mon May 27 22:55:17 2019 +0200 genirq/timings: Encapsulate timings push For the next patches providing the selftest, it is required to artificially insert timings value in the circular buffer in order to check the correctness of the code. Encapsulate the common code between the future test code and the current code with an always-inline tag. No functional change. Signed-off-by: Daniel Lezcano Signed-off-by: Thomas Gleixner Cc: andriy.shevchenko@linux.intel.com Link: https://lkml.kernel.org/r/20190527205521.12091-5-daniel.lezcano@linaro.org kernel/irq/internals.h | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) commit 3c2e79f4cef7938125b356e7f5c8fd038212619a Author: Daniel Lezcano Date: Mon May 27 22:55:16 2019 +0200 genirq/timings: Optimize the period detection speed With a minimal period and if there is a period which is a multiple of it but lesser than the max period then it will be detected before and the minimal period will be never reached. 1 2 1 2 1 2 1 2 1 2 1 2 <-----> <-----> <-----> <-> <-> <-> <-> <-> <-> In that case, the minimum period is 2 and the maximum period is 5. That means all repeating pattern of 2 will be detected as repeating pattern of 4, it is pointless to go up to 2 when searching for the period as it will always fail. Remove one loop iteration by increasing the minimal period to 3. Signed-off-by: Daniel Lezcano Signed-off-by: Thomas Gleixner Cc: andriy.shevchenko@linux.intel.com Link: https://lkml.kernel.org/r/20190527205521.12091-4-daniel.lezcano@linaro.org kernel/irq/timings.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2840eef0513c518faeb8a0ab8d07268c6285cdd0 Author: Daniel Lezcano Date: Mon May 27 22:55:15 2019 +0200 genirq/timings: Fix timings buffer inspection It appears the index beginning computation is not correct, the current code does: i = (irqts->count & IRQ_TIMINGS_MASK) - 1 If irqts->count is equal to zero, we end up with an index equal to -1, but that does not happen because the function checks against zero before and returns in such case. However, if irqts->count is a multiple of IRQ_TIMINGS_SIZE, the resulting & bit op will be zero and leads also to a -1 index. Re-introduce the iteration loop belonging to the previous variance code which was correct. Fixes: bbba0e7c5cda "genirq/timings: Add array suffix computation code" Signed-off-by: Daniel Lezcano Signed-off-by: Thomas Gleixner Cc: andriy.shevchenko@linux.intel.com Link: https://lkml.kernel.org/r/20190527205521.12091-3-daniel.lezcano@linaro.org kernel/irq/timings.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) commit 619c1baa91b2820eae9ff5d89eb525df81ea7a5a Author: Daniel Lezcano Date: Mon May 27 22:55:14 2019 +0200 genirq/timings: Fix next event index function The current code is luckily working with most of the interval samples testing but actually it fails to correctly detect pattern repetition breaking at the end of the buffer. Narrowing down the bug has been a real pain because of the pointers, so the routine is rewrittne by using indexes instead. Fixes: bbba0e7c5cda "genirq/timings: Add array suffix computation code" Signed-off-by: Daniel Lezcano Signed-off-by: Thomas Gleixner Cc: andriy.shevchenko@linux.intel.com Link: https://lkml.kernel.org/r/20190527205521.12091-2-daniel.lezcano@linaro.org kernel/irq/timings.c | 51 ++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 42 insertions(+), 9 deletions(-) commit 123b2ffc376e1b3e9e015c75175b61e88a8b8518 Author: Lu Baolu Date: Wed Jun 12 08:28:51 2019 +0800 iommu/vt-d: Consolidate domain_init() to avoid duplication The domain_init() and md_domain_init() do almost the same job. Consolidate them to avoid duplication. Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 123 +++++++++++++------------------------------- 1 file changed, 36 insertions(+), 87 deletions(-) commit 16c9e29e12e8edbdf437001f46cf3f557aca80e8 Author: Sai Praneeth Prakhya Date: Wed Jun 12 08:28:50 2019 +0800 iommu/vt-d: Cleanup after delegating DMA domain to generic iommu [No functional changes] 1. Starting with commit df4f3c603aeb ("iommu/vt-d: Remove static identity map code") there are no callers for iommu_prepare_rmrr_dev() but the implementation of the function still exists, so remove it. Also, as a ripple effect remove get_domain_for_dev() and iommu_prepare_identity_map() because they aren't being used either. 2. Remove extra new line in couple of places. Signed-off-by: Sai Praneeth Prakhya Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 55 --------------------------------------------- 1 file changed, 55 deletions(-) commit d5692d4af08cde48ee98968aeb62077e2f6c50d5 Author: Lu Baolu Date: Wed Jun 12 08:28:49 2019 +0800 iommu/vt-d: Fix suspicious RCU usage in probe_acpi_namespace_devices() The drhd and device scope list should be iterated with the iommu global lock held. Otherwise, a suspicious RCU usage message will be displayed. [ 3.695886] ============================= [ 3.695917] WARNING: suspicious RCU usage [ 3.695950] 5.2.0-rc2+ #2467 Not tainted [ 3.695981] ----------------------------- [ 3.696014] drivers/iommu/intel-iommu.c:4569 suspicious rcu_dereference_check() usage! [ 3.696069] other info that might help us debug this: [ 3.696126] rcu_scheduler_active = 2, debug_locks = 1 [ 3.696173] no locks held by swapper/0/1. [ 3.696204] stack backtrace: [ 3.696241] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.2.0-rc2+ #2467 [ 3.696370] Call Trace: [ 3.696404] dump_stack+0x85/0xcb [ 3.696441] intel_iommu_init+0x128c/0x13ce [ 3.696478] ? kmem_cache_free+0x16b/0x2c0 [ 3.696516] ? __fput+0x14b/0x270 [ 3.696550] ? __call_rcu+0xb7/0x300 [ 3.696583] ? get_max_files+0x10/0x10 [ 3.696631] ? set_debug_rodata+0x11/0x11 [ 3.696668] ? e820__memblock_setup+0x60/0x60 [ 3.696704] ? pci_iommu_init+0x16/0x3f [ 3.696737] ? set_debug_rodata+0x11/0x11 [ 3.696770] pci_iommu_init+0x16/0x3f [ 3.696805] do_one_initcall+0x5d/0x2e4 [ 3.696844] ? set_debug_rodata+0x11/0x11 [ 3.696880] ? rcu_read_lock_sched_held+0x6b/0x80 [ 3.696924] kernel_init_freeable+0x1f0/0x27c [ 3.696961] ? rest_init+0x260/0x260 [ 3.696997] kernel_init+0xa/0x110 [ 3.697028] ret_from_fork+0x3a/0x50 Fixes: fa212a97f3a36 ("iommu/vt-d: Probe DMA-capable ACPI name space devices") Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 2 ++ 1 file changed, 2 insertions(+) commit 5679582c2fad11733ba65c12d127f9d703390e55 Author: Lu Baolu Date: Wed Jun 12 08:28:48 2019 +0800 iommu/vt-d: Allow DMA domain attaching to rmrr locked device We don't allow a device to be assigned to user level when it is locked by any RMRR's. Hence, intel_iommu_attach_device() will return error if a domain of type IOMMU_DOMAIN_UNMANAGED is about to attach to a device locked by rmrr. But this doesn't apply to a domain of type other than IOMMU_DOMAIN_UNMANAGED. This adds a check to fix this. Fixes: fa954e6831789 ("iommu/vt-d: Delegate the dma domain to upper layer") Signed-off-by: Lu Baolu Reported-and-tested-by: Qian Cai Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6a8c6748b94b0968a2f72d4bd2231eae703c0b13 Author: Lu Baolu Date: Wed Jun 12 08:28:47 2019 +0800 iommu/vt-d: Don't enable iommu's which have been ignored The iommu driver will ignore some iommu units if there's no device under its scope or those devices have been explicitly set to bypass the DMA translation. Don't enable those iommu units, otherwise the devices under its scope won't work. Fixes: d8190dc638866 ("iommu/vt-d: Enable DMA remapping after rmrr mapped") Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit c57b260a7d7d60dfbcf794dd9836c1d9fdbf5434 Author: Lu Baolu Date: Wed Jun 12 08:28:46 2019 +0800 iommu/vt-d: Set domain type for a private domain Otherwise, domain_get_iommu() will be broken. Fixes: 942067f1b6b97 ("iommu/vt-d: Identify default domains replaced with private") Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 2 ++ 1 file changed, 2 insertions(+) commit f4c63ea91c6f6d9a1a3062071ff6cc4910ebb8a9 Author: Lu Baolu Date: Wed Jun 12 08:28:45 2019 +0800 iommu/vt-d: Don't return error when device gets right domain If a device gets a right domain in add_device ops, it shouldn't return error. Fixes: 942067f1b6b97 ("iommu/vt-d: Identify default domains replaced with private") Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 6 ------ 1 file changed, 6 deletions(-) commit 1c5c59fbad20a63954de07687e4a29af18d1be12 Author: Eric Auger Date: Mon Jun 3 08:53:36 2019 +0200 iommu/vt-d: Differentiate relaxable and non relaxable RMRRs Now we have a new IOMMU_RESV_DIRECT_RELAXABLE reserved memory region type, let's report USB and GFX RMRRs as relaxable ones. We introduce a new device_rmrr_is_relaxable() helper to check whether the rmrr belongs to the relaxable category. This allows to have a finer reporting at IOMMU API level of reserved memory regions. This will be exploitable by VFIO to define the usable IOVA range and detect potential conflicts between the guest physical address space and host reserved regions. Signed-off-by: Eric Auger Reviewed-by: Lu Baolu Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 54 ++++++++++++++++++++++++++++++++------------- 1 file changed, 39 insertions(+), 15 deletions(-) commit adfd373820906d376c8b643f1a279ac809605b6b Author: Eric Auger Date: Mon Jun 3 08:53:35 2019 +0200 iommu: Introduce IOMMU_RESV_DIRECT_RELAXABLE reserved memory regions Introduce a new type for reserved region. This corresponds to directly mapped regions which are known to be relaxable in some specific conditions, such as device assignment use case. Well known examples are those used by USB controllers providing PS/2 keyboard emulation for pre-boot BIOS and early BOOT or RMRRs associated to IGD working in legacy mode. Since commit c875d2c1b808 ("iommu/vt-d: Exclude devices using RMRRs from IOMMU API domains") and commit 18436afdc11a ("iommu/vt-d: Allow RMRR on graphics devices too"), those regions are currently considered "safe" with respect to device assignment use case which requires a non direct mapping at IOMMU physical level (RAM GPA -> HPA mapping). Those RMRRs currently exist and sometimes the device is attempting to access it but this has not been considered an issue until now. However at the moment, iommu_get_group_resv_regions() is not able to make any difference between directly mapped regions: those which must be absolutely enforced and those like above ones which are known as relaxable. This is a blocker for reporting severe conflicts between non relaxable RMRRs (like MSI doorbells) and guest GPA space. With this new reserved region type we will be able to use iommu_get_group_resv_regions() to enumerate the IOVA space that is usable through the IOMMU API without introducing regressions with respect to existing device assignment use cases (USB and IGD). Signed-off-by: Eric Auger Signed-off-by: Joerg Roedel Documentation/ABI/testing/sysfs-kernel-iommu_groups | 9 +++++++++ drivers/iommu/iommu.c | 12 +++++++----- include/linux/iommu.h | 6 ++++++ 3 files changed, 22 insertions(+), 5 deletions(-) commit 3855ba2d834d8f7727b7f992ff781fa66cc09f96 Author: Eric Auger Date: Mon Jun 3 08:53:34 2019 +0200 iommu/vt-d: Handle PCI bridge RMRR device scopes in intel_iommu_get_resv_regions In the case the RMRR device scope is a PCI-PCI bridge, let's check the device belongs to the PCI sub-hierarchy. Fixes: 0659b8dc45a6 ("iommu/vt-d: Implement reserved region get/put callbacks") Signed-off-by: Eric Auger Reviewed-by: Lu Baolu Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e143fd4598ddf7401d3699957cd59ceb5426d53d Author: Eric Auger Date: Mon Jun 3 08:53:33 2019 +0200 iommu/vt-d: Handle RMRR with PCI bridge device scopes When reading the vtd specification and especially the Reserved Memory Region Reporting Structure chapter, it is not obvious a device scope element cannot be a PCI-PCI bridge, in which case all downstream ports are likely to access the reserved memory region. Let's handle this case in device_has_rmrr. Fixes: ea2447f700ca ("intel-iommu: Prevent devices with RMRRs from being placed into SI Domain") Signed-off-by: Eric Auger Reviewed-by: Lu Baolu Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b9a7f9816483b19360b92e9b8c91bea2f9f30308 Author: Eric Auger Date: Mon Jun 3 08:53:32 2019 +0200 iommu/vt-d: Introduce is_downstream_to_pci_bridge helper Several call sites are about to check whether a device belongs to the PCI sub-hierarchy of a candidate PCI-PCI bridge. Introduce an helper to perform that check. Signed-off-by: Eric Auger Reviewed-by: Lu Baolu Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 37 +++++++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 8 deletions(-) commit 5f64ce5411b467f1cfea6c63e2494c22b773582b Author: Eric Auger Date: Mon Jun 3 08:53:31 2019 +0200 iommu/vt-d: Duplicate iommu_resv_region objects per device list intel_iommu_get_resv_regions() aims to return the list of reserved regions accessible by a given @device. However several devices can access the same reserved memory region and when building the list it is not safe to use a single iommu_resv_region object, whose container is the RMRR. This iommu_resv_region must be duplicated per device reserved region list. Let's remove the struct iommu_resv_region from the RMRR unit and allocate the iommu_resv_region directly in intel_iommu_get_resv_regions(). We hold the dmar_global_lock instead of the rcu-lock to allow sleeping. Fixes: 0659b8dc45a6 ("iommu/vt-d: Implement reserved region get/put callbacks") Signed-off-by: Eric Auger Reviewed-by: Lu Baolu Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) commit ad0834dedaa15c3a176f783c0373f836e44b4700 Author: Eric Auger Date: Mon Jun 3 08:53:30 2019 +0200 iommu: Fix a leak in iommu_insert_resv_region In case we expand an existing region, we unlink this latter and insert the larger one. In that case we should free the original region after the insertion. Also we can immediately return. Fixes: 6c65fb318e8b ("iommu: iommu_get_group_resv_regions") Signed-off-by: Eric Auger Signed-off-by: Joerg Roedel drivers/iommu/iommu.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 0e5aa23282f8e6ee38c18f67ddfdaaa32d3df86b Author: Yangtao Li Date: Fri Jun 7 13:42:53 2019 -0400 hrtimer: Remove unused header include seq_file.h does not need to be included, so remove it. Signed-off-by: Yangtao Li Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20190607174253.27403-1-tiny.windzz@gmail.com kernel/time/hrtimer.c | 1 - 1 file changed, 1 deletion(-) commit bf3255b3cfe2d06280340dbac3f44b65d3ee6da3 Author: Jean-Philippe Brucker Date: Mon Jun 3 15:57:49 2019 +0100 iommu: Add recoverable fault reporting Some IOMMU hardware features, for example PCI PRI and Arm SMMU Stall, enable recoverable I/O page faults. Allow IOMMU drivers to report PRI Page Requests and Stall events through the new fault reporting API. The consumer of the fault can be either an I/O page fault handler in the host, or a guest OS. Once handled, the fault must be completed by sending a page response back to the IOMMU. Add an iommu_page_response() function to complete a page fault. There are two ways to extend the userspace API: * Add a field to iommu_page_response and a flag to iommu_page_response::flags describing the validity of this field. * Introduce a new iommu_page_response_X structure with a different version number. The kernel must then support both versions. Signed-off-by: Jacob Pan Signed-off-by: Jean-Philippe Brucker Signed-off-by: Joerg Roedel drivers/iommu/iommu.c | 94 +++++++++++++++++++++++++++++++++++++++++++++- include/linux/iommu.h | 19 ++++++++++ include/uapi/linux/iommu.h | 35 +++++++++++++++++ 3 files changed, 146 insertions(+), 2 deletions(-) commit 0c830e6b32826311fc2b9ea1f4679be0f4ef0933 Author: Jacob Pan Date: Mon Jun 3 15:57:48 2019 +0100 iommu: Introduce device fault report API Traditionally, device specific faults are detected and handled within their own device drivers. When IOMMU is enabled, faults such as DMA related transactions are detected by IOMMU. There is no generic reporting mechanism to report faults back to the in-kernel device driver or the guest OS in case of assigned devices. This patch introduces a registration API for device specific fault handlers. This differs from the existing iommu_set_fault_handler/ report_iommu_fault infrastructures in several ways: - it allows to report more sophisticated fault events (both unrecoverable faults and page request faults) due to the nature of the iommu_fault struct - it is device specific and not domain specific. The current iommu_report_device_fault() implementation only handles the "shoot and forget" unrecoverable fault case. Handling of page request faults or stalled faults will come later. Signed-off-by: Jacob Pan Signed-off-by: Ashok Raj Signed-off-by: Jean-Philippe Brucker Signed-off-by: Eric Auger Signed-off-by: Joerg Roedel drivers/iommu/iommu.c | 146 ++++++++++++++++++++++++++++++++++++++++++++++++-- include/linux/iommu.h | 29 ++++++++++ 2 files changed, 172 insertions(+), 3 deletions(-) commit 4e32348ba5269aac1165f496b78189201568dd8c Author: Jacob Pan Date: Mon Jun 3 15:57:47 2019 +0100 iommu: Introduce device fault data Device faults detected by IOMMU can be reported outside the IOMMU subsystem for further processing. This patch introduces a generic device fault data structure. The fault can be either an unrecoverable fault or a page request, also referred to as a recoverable fault. We only care about non internal faults that are likely to be reported to an external subsystem. Signed-off-by: Jacob Pan Signed-off-by: Jean-Philippe Brucker Signed-off-by: Liu, Yi L Signed-off-by: Ashok Raj Signed-off-by: Eric Auger Signed-off-by: Joerg Roedel include/linux/iommu.h | 39 +++++++++++++++ include/uapi/linux/iommu.h | 118 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 157 insertions(+) commit ec6bc2e9e81b8805390851d7c7c907b0ed08b646 Author: Jacob Pan Date: Mon Jun 3 15:57:46 2019 +0100 driver core: Add per device iommu param DMA faults can be detected by IOMMU at device level. Adding a pointer to struct device allows IOMMU subsystem to report relevant faults back to the device driver for further handling. For direct assigned device (or user space drivers), guest OS holds responsibility to handle and respond per device IOMMU fault. Therefore we need fault reporting mechanism to propagate faults beyond IOMMU subsystem. There are two other IOMMU data pointers under struct device today, here we introduce iommu_param as a parent pointer such that all device IOMMU data can be consolidated here. The idea was suggested here by Greg KH and Joerg. The name iommu_param is chosen here since iommu_data has been used. Suggested-by: Greg Kroah-Hartman Reviewed-by: Greg Kroah-Hartman Signed-off-by: Jacob Pan Link: https://lkml.org/lkml/2017/10/6/81 Signed-off-by: Joerg Roedel include/linux/device.h | 3 +++ 1 file changed, 3 insertions(+) commit 1ff30dd85e63bbf4c83805d8830b85ef0824d271 Author: Thomas Zimmermann Date: Tue Jun 11 13:57:16 2019 +0200 drm: Reverse lock order in pan_display_legacy() Acquiring drm_client_dev.modeset_mutex after the locks in drm_fb_helper.dev creates a deadlock with drm_setup_crtcs() as shown below: [ 4.959319] fbcon: radeondrmfb (fb0) is primary device [ 4.993952] Console: switching to colour frame buffer device 240x67 [ 4.994040] [ 4.994041] ====================================================== [ 4.994041] WARNING: possible circular locking dependency detected [ 4.994042] 5.2.0-rc4-1-default+ #39 Tainted: G E [ 4.994043] ------------------------------------------------------ [ 4.994043] systemd-udevd/369 is trying to acquire lock: [ 4.994044] 00000000fb622acb (&client->modeset_mutex){+.+.}, at: drm_fb_helper_pan_display+0x103/0x1f0 [drm_kms_helper] [ 4.994055] [ 4.994055] but task is already holding lock: [ 4.994055] 0000000028767ae4 (crtc_ww_class_mutex){+.+.}, at: drm_modeset_lock+0x42/0xf0 [drm] [ 4.994072] [ 4.994072] which lock already depends on the new lock. [ 4.994072] [ 4.994072] [ 4.994072] the existing dependency chain (in reverse order) is: [ 4.994073] [ 4.994073] -> #3 (crtc_ww_class_mutex){+.+.}: [ 4.994076] lock_acquire+0x9e/0x170 [ 4.994079] __ww_mutex_lock.constprop.18+0x97/0xf40 [ 4.994080] ww_mutex_lock+0x30/0x90 [ 4.994091] drm_modeset_lock+0x42/0xf0 [drm] [ 4.994102] drm_modeset_lock_all_ctx+0x1f/0xe0 [drm] [ 4.994113] drm_modeset_lock_all+0x5e/0x1a0 [drm] [ 4.994163] intel_modeset_init+0x60b/0xda0 [i915] .. [ 4.994253] [ 4.994253] -> #2 (crtc_ww_class_acquire){+.+.}: [ 4.994255] lock_acquire+0x9e/0x170 [ 4.994270] drm_modeset_acquire_init+0xcc/0x100 [drm] [ 4.994280] drm_modeset_lock_all+0x44/0x1a0 [drm] [ 4.994320] intel_modeset_init+0x60b/0xda0 [i915] .. [ 4.994403] [ 4.994403] -> #1 (&dev->mode_config.mutex){+.+.}: [ 4.994405] lock_acquire+0x9e/0x170 [ 4.994408] __mutex_lock+0x62/0x8c0 [ 4.994413] drm_setup_crtcs+0x17c/0xc50 [drm_kms_helper] [ 4.994418] __drm_fb_helper_initial_config_and_unlock+0x34/0x530 [drm_kms_helper] [ 4.994450] radeon_fbdev_init+0x110/0x130 [radeon] .. [ 4.994535] [ 4.994535] -> #0 (&client->modeset_mutex){+.+.}: [ 4.994537] __lock_acquire+0xa85/0xe90 [ 4.994538] lock_acquire+0x9e/0x170 [ 4.994540] __mutex_lock+0x62/0x8c0 [ 4.994545] drm_fb_helper_pan_display+0x103/0x1f0 [drm_kms_helper] [ 4.994547] fb_pan_display+0x92/0x120 [ 4.994549] bit_update_start+0x1a/0x40 [ 4.994550] fbcon_switch+0x392/0x580 [ 4.994552] redraw_screen+0x12c/0x220 [ 4.994553] do_bind_con_driver.cold.30+0xe1/0x10d [ 4.994554] do_take_over_console+0x113/0x190 [ 4.994555] do_fbcon_takeover+0x58/0xb0 [ 4.994557] notifier_call_chain+0x47/0x70 [ 4.994558] blocking_notifier_call_chain+0x44/0x60 [ 4.994559] register_framebuffer+0x231/0x310 [ 4.994564] __drm_fb_helper_initial_config_and_unlock+0x2fd/0x530 [drm_kms_helper] [ 4.994590] radeon_fbdev_init+0x110/0x130 [radeon] .. This problem was introduced in d81294afe drm/fb-helper: Remove drm_fb_helper_crtc Reversing the lock ordering in pan_display_legacy() fixes the issue. Fixes: d81294afeecd ("drm/fb-helper: Remove drm_fb_helper_crtc") Cc: Noralf Trønnes Cc: Sam Ravnborg Cc: David Airlie Cc: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: dri-devel@lists.freedesktop.org Signed-off-by: Thomas Zimmermann Suggested-by: Daniel Vetter Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190611115716.7052-1-tzimmermann@suse.de drivers/gpu/drm/drm_fb_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 441f72821496d9e8cab397aa75fd65f223678654 Author: Peter Robinson Date: Sat Jun 1 08:07:18 2019 +0100 ARM: dts: imx6sx-udoo-neo: add bluetooth config to uart3 This updates the WL1831 bluetooth to use the serial serdev driver interface. Signed-off-by: Peter Robinson Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6sx-udoo-neo-extended.dts | 4 ++++ arch/arm/boot/dts/imx6sx-udoo-neo-full.dts | 4 ++++ arch/arm/boot/dts/imx6sx-udoo-neo.dtsi | 24 ++++++++++-------------- 3 files changed, 18 insertions(+), 14 deletions(-) commit b1368b58ac64400482e1f095d7c9236f4c941fd8 Author: Peter Robinson Date: Sat Jun 1 08:07:17 2019 +0100 ARM: dts: imx6sx-udoo-neo: enable i2c-2 and i2c-4 for onboard sensors The i2c2 bus has a external plug which enables the easy connection of external "bricks" with sensors of various kinds, while i2c4 on the Extended/Full boards has a pair of on board motion sensors, accelerometer and magnetometer on one chip and gyroscope on another so it makes sense to enable these i2c buses for use. Tested on UDOO Neo Full. Signed-off-by: Peter Robinson Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6sx-udoo-neo-extended.dts | 4 ++++ arch/arm/boot/dts/imx6sx-udoo-neo-full.dts | 4 ++++ arch/arm/boot/dts/imx6sx-udoo-neo.dtsi | 26 ++++++++++++++++++++++++++ 3 files changed, 34 insertions(+) commit 8fd4f28775b0160ded27a3a526cac44bf13f32ff Author: Peter Robinson Date: Sat Jun 1 08:07:16 2019 +0100 ARM: dts: imx6sx-udoo: Use the correct style for SPDX License Identifier Use the SPDX License Identifier for GPL-2.0+ OR X11 Signed-off-by: Peter Robinson Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6sx-udoo-neo-basic.dts | 39 +------------------------- arch/arm/boot/dts/imx6sx-udoo-neo-extended.dts | 39 +------------------------- arch/arm/boot/dts/imx6sx-udoo-neo-full.dts | 39 +------------------------- arch/arm/boot/dts/imx6sx-udoo-neo.dtsi | 39 +------------------------- 4 files changed, 4 insertions(+), 152 deletions(-) commit 8f62581f820d32eec9698e477ddff21ebfbe0541 Merge: e3630fd9aa2a 2cdc9c200de7 Author: Tony Lindgren Date: Wed Jun 12 00:57:27 2019 -0700 Merge branch 'baltos' into omap-for-v5.3/dt commit 2cdc9c200de7b320d2b36ed2212ef92d34764366 Author: Yegor Yefremov Date: Tue Jun 11 16:13:38 2019 +0200 ARM: dts: am335x-baltos: add support for MMC1 CD pin Baltos 5221/3220 devices provide CD signal on GPIO2_18. Baltos 2110 device provides CD signal on GPIO1_15. Signed-off-by: Yegor Yefremov Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-baltos-ir2110.dts | 12 ++++++++++++ arch/arm/boot/dts/am335x-baltos-ir3220.dts | 12 ++++++++++++ arch/arm/boot/dts/am335x-baltos-ir5221.dts | 11 +++++++++++ 3 files changed, 35 insertions(+) commit 79499bb11db50877862331960260f981ec49668d Author: Yegor Yefremov Date: Tue Jun 11 11:30:45 2019 +0200 ARM: dts: am335x-baltos: Fix PHY mode for ethernet The PHY must add both tx and rx delay and not only on the tx clock. Signed-off-by: Yegor Yefremov Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-baltos-ir2110.dts | 2 +- arch/arm/boot/dts/am335x-baltos-ir3220.dts | 2 +- arch/arm/boot/dts/am335x-baltos-ir5221.dts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 74a36e4a038b417bb579e86bb769fddf674ca1a1 Merge: 9d373acadaf6 edc1ef3ff342 Author: Linus Walleij Date: Wed Jun 12 09:47:15 2019 +0200 Merge branch 'ib-snps-reset-gpio' into devel commit edc1ef3ff34202e6ffdd51644356bca033d729f8 Author: Martin Blumenstingl Date: Mon Jun 10 19:05:23 2019 +0200 gpio: of: parse stmmac PHY reset line specific active-low property The stmmac driver currently ignores the GPIO flags which are passed via devicetree because it operates with legacy GPIO numbers instead of GPIO descriptors. stmmac assumes that the GPIO is "active HIGH" by default. This can be overwritten by setting "snps,reset-active-low" to make the reset line "active LOW". Recent Amlogic SoCs (G12A which includes S905X2 and S905D2 as well as G12B which includes S922X) use GPIOZ_14 or GPIOZ_15 for the PHY reset line. These GPIOs are special because they are marked as "3.3V input tolerant open drain" pins which means they can only drive the pin output LOW (to reset the PHY) or to switch to input mode (to take the PHY out of reset). The GPIO subsystem already supports this with the GPIO_OPEN_DRAIN and GPIO_OPEN_SOURCE flags in the devicetree bindings. Add the stmmac PHY reset line specific active low parsing to gpiolib-of so stmmac can be ported to GPIO descriptors while being backwards compatible with device trees which use the "old" way of specifying the polarity. Signed-off-by: Martin Blumenstingl Reviewed-by: Linus Walleij Signed-off-by: Linus Walleij drivers/gpio/gpiolib-of.c | 6 ++++++ 1 file changed, 6 insertions(+) commit c204436506fc42c16fdf2263b7e0c3e2cb0e4357 Merge: 78b99577b393 a229105d7a1e Author: Linus Walleij Date: Wed Jun 12 09:19:31 2019 +0200 Merge branch 'ib-qcom-acpi' into devel commit a229105d7a1ee1f9e078afe44497cab482a8aba8 Author: Lee Jones Date: Mon Jun 10 09:42:09 2019 +0100 pinctrl: qcom: sdm845: Provide ACPI support This patch provides basic support for booting with ACPI instead of the currently supported Device Tree. When doing so there are a couple of differences which we need to taken into consideration. Firstly, the SDM850 ACPI tables omit information pertaining to the 4 reserved GPIOs on the platform. If Linux attempts to touch/ initialise any of these lines, the firmware will restart the platform. Secondly, when booting with ACPI, it is expected that the firmware will set-up things like; Regulators, Clocks, Pin Functions, etc in their ideal configuration. Thus, the possible Pin Functions available to this platform are not advertised when providing the higher GPIOD/Pinctrl APIs with pin information. Signed-off-by: Lee Jones Reviewed-by: Bjorn Andersson Signed-off-by: Linus Walleij drivers/pinctrl/qcom/Kconfig | 2 +- drivers/pinctrl/qcom/pinctrl-sdm845.c | 36 ++++++++++++++++++++++++++++++++++- 2 files changed, 36 insertions(+), 2 deletions(-) commit 4c0efbfb2669aa99e43e5deee30f39afd69cad65 Author: Lee Jones Date: Mon Jun 10 09:42:08 2019 +0100 pinctrl: msm: Add ability for drivers to supply a reserved GPIO list When booting MSM based platforms with Device Tree or some ACPI implementations, it is possible to provide a list of reserved pins via the 'gpio-reserved-ranges' and 'gpios' properties respectively. However some ACPI tables are not populated with this information, thus it has to come from a knowledgable device driver instead. Here we provide the MSM common driver with additional support to parse this informtion and correctly populate the widely used 'valid_mask'. Signed-off-by: Lee Jones Reviewed-by: Bjorn Andersson Signed-off-by: Linus Walleij drivers/pinctrl/qcom/pinctrl-msm.c | 18 ++++++++++++++++++ drivers/pinctrl/qcom/pinctrl-msm.h | 1 + 2 files changed, 19 insertions(+) commit b314dd49a28a38997aa8f472d02f0631a830d37a Author: Youngmin Nam Date: Mon Jun 10 16:47:07 2019 +0900 vsprintf: fix data type of variable in string_nocheck() This patch fixes data type of precision with int. The precision is declared as signed int in struct printf_spec. Link: http://lkml.kernel.org/r/040301d51f60$b4959100$1dc0b300$@samsung.com To: To: To: To: Signed-off-by: Youngmin Nam Reviewed-by: Sergey Senozhatsky Signed-off-by: Petr Mladek lib/vsprintf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 78b99577b3934e3e787fe0c52aa1b59442c8bbb5 Author: Masahiro Yamada Date: Mon Jun 10 00:09:53 2019 +0900 pinctrl: remove unused pin_is_valid() This function was used by pin_request() to pointlessly double-check the pin validity, and it was the only user ever. Since commit d2f6a1c6fb0e ("pinctrl: remove double pin validity check."), no one has ever used it. Signed-off-by: Masahiro Yamada Signed-off-by: Linus Walleij drivers/pinctrl/core.c | 23 ----------------------- include/linux/pinctrl/pinctrl.h | 10 ---------- 2 files changed, 33 deletions(-) commit 6cadafb310866b95f1ca956eaebbe3076adc0886 Author: Masahiro Yamada Date: Sun Jun 9 23:55:37 2019 +0900 pinctrl: remove unneeded initializer for list_for_each_entry() iterator The iterator is initialized in list_for_each_entry(). Signed-off-by: Masahiro Yamada Signed-off-by: Linus Walleij drivers/pinctrl/core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ee7668bc68a2385b35bfe01da319069f05605565 Author: Yannick Fertré Date: Mon May 27 12:21:39 2019 +0200 drm/stm: dsi: add power on/off phy ops These new physical operations are helpful to power_on/off the dsi wrapper. If the dsi wrapper is powered in video mode, the display controller (ltdc) register access will hang when DSI fifos are full. Signed-off-by: Yannick Fertré Acked-by: Philippe Cornu Tested-by: Philippe Cornu Reviewed-by: Andrzej Hajda Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/1558952499-15418-3-git-send-email-yannick.fertre@st.com drivers/gpu/drm/stm/dw_mipi_dsi-stm.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) commit a3e69b86cf04b7c0b624572c181678ea74e83400 Author: Yannick Fertré Date: Mon May 27 12:21:38 2019 +0200 drm/bridge/synopsys: dsi: add power on/off optional phy ops Add power on & off optional physical operation functions, helpful to program specific registers of the DSI physical part. Signed-off-by: Yannick Fertré Reviewed-by: Philippe Cornu Tested-by: Philippe Cornu Reviewed-by: Andrzej Hajda Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/1558952499-15418-2-git-send-email-yannick.fertre@st.com drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 8 ++++++++ include/drm/bridge/dw_mipi_dsi.h | 2 ++ 2 files changed, 10 insertions(+) commit 693e824452e572f4663306a4f033b5ca0c6f0821 Author: Bjorn Andersson Date: Fri May 3 16:24:42 2019 -0700 arm64: dts: qcom: msm8996: Stop using legacy clock names MDSS and its friends complain about the DTS is using legacy clock names, update these to silence the warnings. Reviewed-by: Niklas Cassel Reviewed-by: Vinod Koul Signed-off-by: Bjorn Andersson arch/arm64/boot/dts/qcom/msm8996.dtsi | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 73db2714234a5ff1c8fc3377656479f7380463af Author: Niklas Cassel Date: Tue Jun 4 14:29:31 2019 +0200 arm64: dts: msm8996: fix PSCI entry-latency-us The current entry-latency-us is too short. The proper way to convert between the device tree properties from the vendor tree to the upstream PSCI device tree properties is: entry-latency-us = qcom,time-overhead - qcom,latency-us which gives entry-latency-us = 210 - 80 = 130 Fixes: f6aee7af59b6 ("arm64: dts: qcom: msm8996: Add PSCI cpuidle low power states") Signed-off-by: Niklas Cassel Signed-off-by: Bjorn Andersson arch/arm64/boot/dts/qcom/msm8996.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c3083c80b52c4e29b65ed838d2e66a91b13a3152 Author: Amit Kucheria Date: Fri May 24 14:32:06 2019 +0200 arm64: dts: qcom: msm8998: Add PSCI cpuidle low power states Add device bindings for cpuidle states for cpu devices. [marc: rebase, fix arm,psci-suspend-param, fix entry-latency-us] Acked-by: Daniel Lezcano Signed-off-by: Amit Kucheria Signed-off-by: Marc Gonzalez Signed-off-by: Bjorn Andersson arch/arm64/boot/dts/qcom/msm8998.dtsi | 50 +++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) commit e76c367217fbfc226fde47bddb7f5d65a07321cf Author: Sibi Sankar Date: Tue Jun 11 21:45:36 2019 -0700 arm64: dts: qcom: sdm845: Add Q6V5 MSS node This patch adds Q6V5 MSS remoteproc node for SDM845 SoCs. Reviewed-by: Douglas Anderson Reviewed-by: Vinod Koul Signed-off-by: Sibi Sankar Signed-off-by: Bjorn Andersson arch/arm64/boot/dts/qcom/sdm845.dtsi | 58 ++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) commit a79774387195194d17e037786e67ff9feb5c1d78 Author: Bjorn Andersson Date: Tue Jun 11 21:45:35 2019 -0700 arm64: dts: qcom: Add AOSS QMP node The AOSS QMP provides a number of power domains, used for QDSS and PIL, add the node for this. Tested-by: Sibi Sankar Reviewed-by: Sibi Sankar Reviewed-by: Vinod Koul Signed-off-by: Bjorn Andersson arch/arm64/boot/dts/qcom/sdm845.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 2209481409b7abada0e952f4c797e074f4bf3abb Author: Bjorn Andersson Date: Tue Jun 11 21:45:34 2019 -0700 soc: qcom: Add AOSS QMP driver The Always On Subsystem (AOSS) Qualcomm Messaging Protocol (QMP) driver is used to communicate with the AOSS for certain side-channel requests, that are not available through the RPMh interface. The communication is a very simple synchronous mechanism of messages being written in message RAM and a doorbell in the AOSS is rung. As the AOSS has processed the message length is cleared and an interrupt is fired by the AOSS as acknowledgment. The driver exposes the QDSS clock as a clock and the low-power state associated with the remoteprocs in the system as a set of power-domains. Reviewed-by: Douglas Anderson Reviewed-by: Vinod Koul Tested-by: Sai Prakash Ranjan Signed-off-by: Bjorn Andersson drivers/soc/qcom/Kconfig | 12 ++ drivers/soc/qcom/Makefile | 1 + drivers/soc/qcom/qcom_aoss.c | 480 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 493 insertions(+) commit 8ad2b4b371bcfe7069ee28ad18d722e1240a0a97 Author: Bjorn Andersson Date: Tue Jun 11 21:45:33 2019 -0700 dt-bindings: soc: qcom: Add AOSS QMP binding Add binding for the QMP based side-channel communication mechanism to the AOSS, which is used to control resources not exposed through the RPMh interface. Reviewed-by: Rob Herring Reviewed-by: Vinod Koul Signed-off-by: Bjorn Andersson .../devicetree/bindings/soc/qcom/qcom,aoss-qmp.txt | 81 ++++++++++++++++++++++ include/dt-bindings/power/qcom-aoss-qmp.h | 14 ++++ 2 files changed, 95 insertions(+) commit 83eb5cfcd5e35967d5e136d1266378933372a41a Author: YueHaibing Date: Wed Jun 12 12:19:54 2019 +0800 dmaengine: dw-edma: Fix build error without CONFIG_PCI_MSI If CONFIG_PCI_MSI is not set, building with CONFIG_DW_EDMA fails: drivers/dma/dw-edma/dw-edma-core.c: In function dw_edma_irq_request: drivers/dma/dw-edma/dw-edma-core.c:784:21: error: implicit declaration of function pci_irq_vector; did you mean rcu_irq_enter? [-Werror=implicit-function-declaration] err = request_irq(pci_irq_vector(to_pci_dev(dev), 0), ^~~~~~~~~~~~~~ Reported-by: Hulk Robot Fixes: e63d79d1ffcd ("dmaengine: Add Synopsys eDMA IP core driver") Signed-off-by: YueHaibing Reported-by: Randy Dunlap Signed-off-by: Vinod Koul drivers/dma/dw-edma/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 1ac19ad799f880af58b9a8a4321334f6f6fc72e6 Author: Srinivas Kandagatla Date: Fri Feb 8 17:55:10 2019 +0000 qcom: apr: Make apr callbacks in non-atomic context APR communication with DSP is not atomic in nature. Its request-response type. Trying to pretend that these are atomic and invoking apr client callbacks directly under atomic/irq context has endless issues with soundcard. It makes more sense to convert these to nonatomic calls. This also coverts all the dais to be nonatomic. All the callbacks are now invoked as part of rx work queue. Signed-off-by: Srinivas Kandagatla Reviewed-by: Bjorn Andersson Signed-off-by: Bjorn Andersson drivers/soc/qcom/apr.c | 74 ++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 69 insertions(+), 5 deletions(-) commit 568465c3fb914f4f65f7148a29f45e9ddb105b09 Author: Martin Blumenstingl Date: Sat Jun 8 21:04:11 2019 +0200 arm64: dts: meson: g12a: add the GPIO interrupt controller GPIO interrupts are used for the external Ethernet RGMII PHY interrupt line. Add the GPIO interrupt controller so we can describe that connection in the dts files. Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) commit cbdc666f3e842b01d4537933e0a64f1e7cf17017 Author: Kamal Heib Date: Thu May 30 16:18:17 2019 +0300 RDMA/ipoib: Remove check for ETH_SS_TEST The default action for unlisted tests is "not-supported", so given that ipoib doesn't support ETH_SS_TEST, there is no need to check for it in the case statements, just let it get caught by the default: case. Fixes: e3614bc9dc44 ("IB/ipoib: Add readout of statistics using ethtool") Signed-off-by: Kamal Heib Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib_ethtool.c | 2 -- 1 file changed, 2 deletions(-) commit e4998f48ea310e32c3ecbd89a19d90fadee05af7 Author: Neil Armstrong Date: Fri Jun 7 16:36:18 2019 +0200 arm64: dts: meson-g12a-x96-max: bump bluetooth bus speed to 2Mbaud/s Setting to 2Mbaud/s is the nominal bus speed for common usages. Signed-off-by: Neil Armstrong Acked-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts | 1 + 1 file changed, 1 insertion(+) commit dff60019d9920b3d7c1c74f87e1b0aa16508be00 Author: Neil Armstrong Date: Fri Jun 7 16:36:17 2019 +0200 arm64: dts: meson-g12a-sei510: bump bluetooth bus speed to 2Mbaud/s Setting to 2Mbaud/s is the nominal bus speed for common usages. Signed-off-by: Neil Armstrong Acked-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts | 1 + 1 file changed, 1 insertion(+) commit 524595ec62e85413ab0e3a6d9667320dd7e120a4 Author: Neil Armstrong Date: Fri Jun 7 16:36:16 2019 +0200 arm64: dts: meson-g12a-x96-max: add 32k clock to bluetooth node The 32k low power clock is necessary for the bluetooth part of the combo module to initialize correctly, simply add the same clock we use for the sdio pwrseq. Signed-off-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts | 2 ++ 1 file changed, 2 insertions(+) commit faf438e0669fd8e1c81ad5bf9d5efb6eda94eafe Author: Neil Armstrong Date: Fri Jun 7 16:36:15 2019 +0200 arm64: dts: meson-g12a-sei510: add 32k clock to bluetooth node The 32k low power clock is necessary for the bluetooth part of the combo module to initialize correctly, simply add the same clock we use for the sdio pwrseq. Signed-off-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts | 2 ++ 1 file changed, 2 insertions(+) commit 5f57a09e96d61fda6834aaf26ff0ae3fa9fe7e49 Author: Neil Armstrong Date: Fri Jun 7 16:47:35 2019 +0200 arm64: dts: meson-g12a-sei510: Enable Wifi SDIO module The SEI510 embeds an AP6398S SDIO module, let's add the corresponding SDIO, PWM clock and mmc-pwrseq nodes. Acked-by: Martin Blumenstingl Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts | 50 +++++++++++++++++++++++ 1 file changed, 50 insertions(+) commit b497ad38202b8701f2e0fdbffc6e7f7023b1ebe7 Author: Neil Armstrong Date: Fri Jun 7 16:47:34 2019 +0200 arm64: dts: meson-g12a-x96-max: Enable Wifi SDIO Module The X96 Max embeds an AP6398S SDIO module, let's add the corresponding SDIO, PWM clock and mmc-pwrseq nodes. Reviewed-by: Martin Blumenstingl Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts | 50 ++++++++++++++++++++++ 1 file changed, 50 insertions(+) commit 45380009f78685d67881316dcc426fecd34f9ba9 Author: Guillaume La Roque Date: Fri Jun 7 16:47:33 2019 +0200 arm64: dts: meson-g12a-x96-max: add support for sdcard and emmc Add nodes to support SDCard and onboard eMMC on the X96 Max. Signed-off-by: Guillaume La Roque Reviewed-by: Martin Blumenstingl Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit 8a6b3ca2d361f2ff6e4412d2c07171ed8e2ee2b1 Author: Jerome Brunet Date: Mon Jun 3 12:03:54 2019 +0200 arm64: dts: meson: g12a: add SDIO controller The Amlogic G12A SDIO Controller has a bug preventing direct DDR access, add the port A (SDIO) pinctrl and controller nodes and mark this specific controller with the amlogic,dram-access-quirk property. Signed-off-by: Jerome Brunet Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 37 +++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit c35f6dc5c3777182b4d43df5c4a17870ae62de33 Author: Neil Armstrong Date: Mon Jun 3 11:10:08 2019 +0200 arm64: dts: meson: Add minimal support for Odroid-N2 This patch adds basic support for : - Amlogic G12B, which is very similar to G12A - The HardKernel Odroid-N2 based on the S922X SoC The Amlogic G12B SoC is very similar with the G12A SoC, sharing most of the features and architecture, but with these differences : - The first CPU cluster only has 2xCortex-A53 instead of 4 - G12B has a second cluster of 4xCortex-A73 - Both cluster can achieve 2GHz instead of 1,8GHz for G12A - CPU Clock architecture is difference, thus needing a different compatible to handle this slight difference - Supports a MIPI CSI input - Embeds a Mali-G52 instead of a Mali-G31, but integration is the same Actual support is done in the same way as for the GXM support, including the G12A dtsi and redefining the CPU clusters. Unlike GXM, the first cluster is different, thus needing to remove the last 2 cpu nodes of the first cluster. Signed-off-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Tested-by: Anand Moon [khilman: add vin-supply for vcc_v5 as suggested by Anand Moon] Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/Makefile | 1 + .../boot/dts/amlogic/meson-g12b-odroid-n2.dts | 290 +++++++++++++++++++++ arch/arm64/boot/dts/amlogic/meson-g12b.dtsi | 82 ++++++ 3 files changed, 373 insertions(+) commit 3113784003dd7ca287fe082ca87969d4de721907 Author: Neil Armstrong Date: Mon Jun 3 11:10:07 2019 +0200 dt-bindings: arm: amlogic: add Odroid-N2 binding Add compatible for the Amlogic G12B (S922X) SoC based Odroid-N2 SBC from HardKernel. Signed-off-by: Neil Armstrong Reviewed-by: Rob Herring Reviewed-by: Martin Blumenstingl Signed-off-by: Kevin Hilman Documentation/devicetree/bindings/arm/amlogic.yaml | 2 ++ 1 file changed, 2 insertions(+) commit b365c124f1ef921125e6c355b5d16a7d165138c4 Author: Neil Armstrong Date: Mon Jun 3 11:10:06 2019 +0200 dt-bindings: arm: amlogic: add G12B bindings Add compatible for the Amlogic G12B SoC, sharing most of the features and architecture with the G12A SoC. Signed-off-by: Neil Armstrong Reviewed-by: Rob Herring Reviewed-by: Martin Blumenstingl Signed-off-by: Kevin Hilman Documentation/devicetree/bindings/arm/amlogic.yaml | 4 ++++ 1 file changed, 4 insertions(+) commit ec066d8f9e380ebdfb547fc0d3f2785c95aa3551 Author: Neil Armstrong Date: Mon May 27 15:22:00 2019 +0200 arm64: dts: meson-gxbb-vega-s95: add ethernet PHY interrupt Add the external ethernet PHY interrupt on the Vega S95 board. Suggested-by: Christian Hewitt Signed-off-by: Neil Armstrong Acked-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi | 3 +++ 1 file changed, 3 insertions(+) commit b07a11dbdfeb9431e1e386dac7b1a099bcaf5f6a Author: Neil Armstrong Date: Mon May 27 15:21:59 2019 +0200 arm64: dts: meson-gxbb-vega-s95: fix WiFi/BT module support Fix the SDIO WiFi support and add proper Bluetooth support on the Vega S95 board. Suggested-by: Christian Hewitt Signed-off-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit f1ef6262d1d3f228781089ee2f9b8a5ab5acdeec Author: Neil Armstrong Date: Mon May 27 15:21:58 2019 +0200 arm64: dts: meson-gxbb-vega-s95: enable SARADC Add SARARC node and associated regulator to support reading the ADC inputs on the Vega S95 Suggested-by: Christian Hewitt Signed-off-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 8d6dbe5be8ba85bda18860fd4ef2fe603de7c132 Author: Neil Armstrong Date: Mon May 27 15:21:57 2019 +0200 arm64: dts: meson-gxbb-vega-s95: enable CEC Add CEC nodes to support CEC communication on Vega S95 Suggested-by: Christian Hewitt Signed-off-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit 954b67dfe6cdf446ba21d7f217dad6d450b5a964 Author: Neil Armstrong Date: Mon May 27 15:21:56 2019 +0200 arm64: dts: meson-gxbb-vega-s95: add HDMI nodes Add HDMI nodes to support graphics on Vega S95 Suggested-by: Christian Hewitt Signed-off-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Signed-off-by: Kevin Hilman .../boot/dts/amlogic/meson-gxbb-vega-s95.dtsi | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 41112431e5c9e635884cb72aa8c10e1b31615265 Author: Neil Armstrong Date: Mon May 27 15:21:55 2019 +0200 arm64: dts: meson-gxbb-vega-s95: fix regulators Align the regulator names with other GXBB SoCS for upcoming SARADC support and SDIO/SDCard fixes. Also fix how regulators are passed to MMC controllers & USB. Suggested-by: Christian Hewitt Signed-off-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Signed-off-by: Kevin Hilman .../boot/dts/amlogic/meson-gxbb-vega-s95.dtsi | 34 +++++++++++++--------- 1 file changed, 21 insertions(+), 13 deletions(-) commit 55c2440dd0bbc42b243f610a4182d81aef4fd0af Author: Christian Hewitt Date: Mon May 27 15:21:54 2019 +0200 arm64: dts: meson-gxbb-wetek: enable bluetooth This enables Bluetooth support for the following models: AP6335 in the WeTek Hub rev1 - BCM4335C0.hcd AP6255 in the WeTek Hub rev2 - BCM4345C0.hcd AP6330 in the WeTek Play 2 - BCM4330B1.hcd Signed-off-by: Christian Hewitt Signed-off-by: Neil Armstrong Acked-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit dfa8b3cd14dad613c848ecaaa1f39b39ebfeca14 Author: Christian Hewitt Date: Mon May 27 15:21:53 2019 +0200 arm64: dts: meson-gxbb-wetek: enable SARADC Enable SARADC on Wetek Boards. Signed-off-by: Christian Hewitt Signed-off-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 33344e2111a3a07097a66f339ad213b047ccdfd2 Author: Christian Hewitt Date: Mon May 27 15:21:52 2019 +0200 arm64: dts: meson-gxm-khadas-vim2: fix Bluetooth support - Remove serial1 alias - Add support for uart_A rts/cts - Add bluetooth uart_A subnode qith shutdown gpio Fixes: b8b74dda3908 ("ARM64: dts: meson-gxm: Add support for Khadas VIM2") Signed-off-by: Christian Hewitt Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 0afd24c2fb61bd5163bab08ea1ee54d60d3ea37e Author: Christian Hewitt Date: Mon May 27 15:21:51 2019 +0200 arm64: dts: meson-gxm-khadas-vim2: fix gpio-keys-polled node Fix DTC warnings: meson-gxm-khadas-vim2.dtb: Warning (avoid_unnecessary_addr_size): /gpio-keys-polled: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property Fixes: b8b74dda3908 ("ARM64: dts: meson-gxm: Add support for Khadas VIM2") Signed-off-by: Christian Hewitt Signed-off-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Tested-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit e8e7037cb6f6c18c32ad74bfc873695802c4ece8 Author: Neil Armstrong Date: Mon May 27 15:00:43 2019 +0200 arm64: dts: meson-g12a-x96-max: Add Gigabit Ethernet Support Enable the network interface of the X96 Mac using an external Realtek RTL8211F gigabit PHY, needing the same broken-eee properties as the previous Amlogic SoC generations. Signed-off-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 1b2f377b51289aa23a8ee9f0cd954ae1798364da Author: Neil Armstrong Date: Mon May 27 14:50:59 2019 +0200 arm64: dts: meson: g12a: Add hwrng node The Amlogic G12A has the hwrng module at the end of an unknown "EFUSE" bus. The hwrng is not enabled on the vendor G12A DTs, but is enabled on next generation SM1 SoC family sharing the exact same memory mapping. Let's add the "EFUSE" bus and the hwrng node. This hwrng has been checked with the rng-tools rngtest FIPS tool : rngtest: starting FIPS tests... rngtest: bits received from input: 1630240032 rngtest: FIPS 140-2 successes: 81436 rngtest: FIPS 140-2 failures: 76 rngtest: FIPS 140-2(2001-10-10) Monobit: 10 rngtest: FIPS 140-2(2001-10-10) Poker: 6 rngtest: FIPS 140-2(2001-10-10) Runs: 26 rngtest: FIPS 140-2(2001-10-10) Long run: 34 rngtest: FIPS 140-2(2001-10-10) Continuous run: 0 rngtest: input channel speed: (min=3.784; avg=5687.521; max=19073.486)Mibits/s rngtest: FIPS tests speed: (min=47.684; avg=52.348; max=52.835)Mibits/s rngtest: Program run time: 30000987 microseconds Signed-off-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 9d63f5d1386ec4e34f3614f547592da85a8c4cc8 Author: Jerome Brunet Date: Fri May 24 15:08:17 2019 +0200 arm64: dts: meson: add dwmac-3.70a to ethmac compatible list After discussing with Amlogic, the Synopsys GMAC version used by the gx and axg family is the 3.70a. Set this is in DT Signed-off-by: Jerome Brunet Reviewed-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 4 +++- arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) commit 47b65cb8b525ac4729fea4cd1585749d443dc093 Author: Neil Armstrong Date: Mon May 20 15:48:16 2019 +0200 arm64: dts: meson: g12a: add drive strength for eth pins With the X96 Max board using an external Gigabit Ethernet PHY, add the same driver strength to the Ethernet pins as the vendor tree. Signed-off-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit d9b9640b8d5072e7f4234e58730dc3b6926a2ffa Author: Neil Armstrong Date: Mon May 20 15:48:15 2019 +0200 arm64: dts: meson: g12a: add drive-strength hdmi ddc pins With the default boot settings, the DDC drive strength is too weak, set the driver-strengh to 4mA to avoid errors on the DDC line. Signed-off-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 1 + 1 file changed, 1 insertion(+) commit a1abafb6ccbcf99865b0e1e150e7ebe7d8ec22e8 Author: Jerome Brunet Date: Mon May 20 15:14:01 2019 +0200 arm64: dts: meson: sei510: add network support Enable the network interface of the SEI510 which use the internal PHY. Tested-by: Kevin Hilman Signed-off-by: Jerome Brunet Acked-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts | 7 +++++++ 1 file changed, 7 insertions(+) commit de0386015130be280f17b3277f25a1feb921f519 Author: Jerome Brunet Date: Mon May 20 15:14:00 2019 +0200 arm64: dts: meson: u200: add internal network The u200 is the main mother board for the S905D2. It can provide both the internal and external network. However, by default the resistance required for the external RGMII bus are not fitted, so enable the internal PHY. Signed-off-by: Jerome Brunet Acked-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts | 7 +++++++ 1 file changed, 7 insertions(+) commit 280c17df8fbf0000ba53cb741ee822d9662f8c9e Author: Jerome Brunet Date: Mon May 20 15:13:59 2019 +0200 arm64: dts: meson: g12a: add mdio multiplexer Add the g12a mdio multiplexer which allows to connect to either an external phy through the SoC pins or the internal 10/100 phy Signed-off-by: Jerome Brunet Acked-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 32 +++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 3293252f11ae1f534c9290281439017e7d5448f5 Author: Jerome Brunet Date: Mon May 20 15:13:58 2019 +0200 arm64: dts: meson: g12a: add ethernet pinctrl definitions Add the ethernet pinctrl settings for RMII, RGMII and internal phy leds Signed-off-by: Jerome Brunet Reviewed-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 37 +++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit f23a4704ee596c0b1534a018b856b3dea4ee81a0 Merge: a466a8675e00 3ff46efbcd90 Author: Kevin Hilman Date: Tue Jun 11 15:49:43 2019 -0700 Merge tag 'clk-meson-5.2-1-fixes' of https://github.com/BayLibre/clk-meson into v5.3/dt64 MPLL50M DT bindings typo fix Meson9 VPU typo fixes # gpg: Signature made Tue 11 Jun 2019 05:02:13 AM PDT # gpg: using RSA key F4E159AE18F3F56D5F1BB71BE6FC0F1C37F2DA85 # gpg: Good signature from "Jerome Brunet " [full] # gpg: aka "Jerome Brunet " [full] # gpg: aka "Jerome Brunet " [full] * tag 'clk-meson-5.2-1-fixes' of https://github.com/BayLibre/clk-meson: clk: meson: meson8b: fix a typo in the VPU parent names array variable clk: meson: fix MPLL 50M binding id typo commit 65eb3e4c142603b6b75618c4588d7748079ff3b6 Author: Krzysztof Kozlowski Date: Tue Jun 4 09:54:51 2019 +0200 MIPS: configs: Remove useless UEVENT_HELPER_PATH Remove the CONFIG_UEVENT_HELPER_PATH because: 1. It is disabled since commit 1be01d4a5714 ("driver: base: Disable CONFIG_UEVENT_HELPER by default") as its dependency (UEVENT_HELPER) was made default to 'n', 2. It is not recommended (help message: "This should not be used today [...] creates a high system load") and was kept only for ancient userland, 3. Certain userland specifically requests it to be disabled (systemd README: "Legacy hotplug slows down the system and confuses udev"). Signed-off-by: Krzysztof Kozlowski Acked-by: Geert Uytterhoeven Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: Florian Fainelli Cc: bcm-kernel-feedback-list@broadcom.com Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org arch/mips/configs/ar7_defconfig | 1 - arch/mips/configs/ath25_defconfig | 1 - arch/mips/configs/ath79_defconfig | 1 - arch/mips/configs/bcm63xx_defconfig | 1 - arch/mips/configs/bigsur_defconfig | 1 - arch/mips/configs/bmips_be_defconfig | 1 - arch/mips/configs/bmips_stb_defconfig | 1 - arch/mips/configs/cavium_octeon_defconfig | 1 - arch/mips/configs/ci20_defconfig | 1 - arch/mips/configs/cobalt_defconfig | 1 - arch/mips/configs/fuloong2e_defconfig | 1 - arch/mips/configs/ip27_defconfig | 1 - arch/mips/configs/ip32_defconfig | 1 - arch/mips/configs/lemote2f_defconfig | 1 - arch/mips/configs/loongson1b_defconfig | 1 - arch/mips/configs/loongson1c_defconfig | 1 - arch/mips/configs/loongson3_defconfig | 1 - arch/mips/configs/malta_defconfig | 1 - arch/mips/configs/malta_kvm_defconfig | 1 - arch/mips/configs/malta_kvm_guest_defconfig | 1 - arch/mips/configs/maltaup_xpa_defconfig | 1 - arch/mips/configs/mips_paravirt_defconfig | 1 - arch/mips/configs/omega2p_defconfig | 1 - arch/mips/configs/pnx8335_stb225_defconfig | 1 - arch/mips/configs/qi_lb60_defconfig | 1 - arch/mips/configs/rb532_defconfig | 1 - arch/mips/configs/rt305x_defconfig | 1 - arch/mips/configs/sb1250_swarm_defconfig | 1 - arch/mips/configs/tb0219_defconfig | 1 - arch/mips/configs/tb0226_defconfig | 1 - arch/mips/configs/tb0287_defconfig | 1 - arch/mips/configs/vocore2_defconfig | 1 - arch/mips/configs/xway_defconfig | 1 - 33 files changed, 33 deletions(-) commit cf910de5c3c2d8d19aaf47c1d9c7b243942ed577 Author: Krzysztof Kozlowski Date: Mon Jun 3 21:19:34 2019 +0200 MIPS: config: Remove left-over BACKLIGHT_LCD_SUPPORT The CONFIG_BACKLIGHT_LCD_SUPPORT was removed in commit 8c5dc8d9f19c ("video: backlight: Remove useless BACKLIGHT_LCD_SUPPORT kernel symbol"). Options protected by CONFIG_BACKLIGHT_LCD_SUPPORT are now available directly. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: James Hartley Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org arch/mips/configs/gpr_defconfig | 1 - arch/mips/configs/lemote2f_defconfig | 1 - arch/mips/configs/pistachio_defconfig | 1 - arch/mips/configs/qi_lb60_defconfig | 1 - 4 files changed, 4 deletions(-) commit 017105478bb58fa63331a27927567e3990094dcd Author: Lubomir Rintel Date: Tue Jun 11 09:20:14 2019 +0200 MIPS: ralink: Switch pinmux.h to SPDX header The original license text had a typo ("publishhed") which would be likely to confuse automated licensing auditing tools. Let's just switch to SPDX instead of fixing the wording. Signed-off-by: Lubomir Rintel Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org arch/mips/include/asm/mach-ralink/pinmux.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 4f85c9566cc10e85fa9337456e354e5321c815d0 Author: Geert Uytterhoeven Date: Fri Jun 7 13:36:40 2019 +0200 MIPS: ftrace: Reword prepare_ftrace_return() comment block Improve the comment block for prepare_ftrace_return(). Signed-off-by: Geert Uytterhoeven Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: Steven Rostedt Cc: Ingo Molnar Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org arch/mips/kernel/ftrace.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit d171df6b73bb2e20d54d53a497cb405c0c902579 Author: Geert Uytterhoeven Date: Fri Jun 7 13:33:43 2019 +0200 memory: jz4780-nemc: Grammar s/the its/its/ Signed-off-by: Geert Uytterhoeven Signed-off-by: Paul Burton Cc: Greg Kroah-Hartman Cc: Jiri Kosina Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org drivers/memory/jz4780-nemc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 56a171e5dcb8d7d91c4571a62f28ae2b1e40f95f Author: Paul Cercueil Date: Tue Jun 4 16:30:17 2019 +0200 memory: jz4780-nemc: Reduce size of const array The maximum value found in that array is 15, there's no need to store these values as uint32_t, a uint8_t is enough. Signed-off-by: Paul Cercueil Signed-off-by: Paul Burton drivers/memory/jz4780-nemc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fcbc3b104d822e6bad6cde1f33067b525ded6364 Author: Paul Cercueil Date: Tue Jun 4 16:30:18 2019 +0200 memory: jz4780_nemc: Add support for the JZ4740 Add support for the JZ4740 SoC from Ingenic. Signed-off-by: Paul Cercueil Reviewed-by: Boris Brezillon Signed-off-by: Paul Burton drivers/memory/jz4780-nemc.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) commit d7d14ccfe29a0eeecca3b2ca33fa15184a19888a Author: Paul Cercueil Date: Tue Jun 4 16:30:15 2019 +0200 dt-bindings: memory: jz4780: Add compatible string for JZ4740 SoC Add a compatible string to support the memory controller built into the JZ4740 SoC from Ingenic. Signed-off-by: Paul Cercueil Reviewed-by: Boris Brezillon Reviewed-by: Rob Herring Signed-off-by: Paul Burton .../devicetree/bindings/memory-controllers/ingenic,jz4780-nemc.txt | 1 + 1 file changed, 1 insertion(+) commit ffa7546283c4514cf372e53f16c9354fd9af7e3a Author: Paul Cercueil Date: Tue Jun 4 16:30:16 2019 +0200 memory: Kconfig: Drop dependency on MACH_JZ4780 for jz4780 Depending on MACH_JZ4780 prevent us from creating a generic kernel that works on more than one MIPS board. Instead, we just depend on MIPS being set. Signed-off-by: Paul Cercueil Reviewed-by: Boris Brezillon Signed-off-by: Paul Burton drivers/memory/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1323c3b72a987de57141cabc44bf9cd83656bc70 Author: Paul Cercueil Date: Tue Jun 4 18:33:11 2019 +0200 MIPS: lb60: Fix pin mappings The pin mappings introduced in commit 636f8ba67fb6 ("MIPS: JZ4740: Qi LB60: Add pinctrl configuration for several drivers") are completely wrong. The pinctrl driver name is incorrect, and the function and group fields are swapped. Fixes: 636f8ba67fb6 ("MIPS: JZ4740: Qi LB60: Add pinctrl configuration for several drivers") Cc: Signed-off-by: Paul Cercueil Reviewed-by: Linus Walleij Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: od@zcrc.me Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org arch/mips/jz4740/board-qi_lb60.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 885895a8eae60bfcb9fbc6b91b35c5b930834011 Author: Doug Berger Date: Fri May 31 10:31:29 2019 -0700 ARM: bcm: Enable PINCTRL for ARCH_BRCMSTB ARCH_BRCMSTB needs to use the BCM2835 pin controller for chips like BCM7211 which adopted that pin controller for GPIO. Signed-off-by: Doug Berger Signed-off-by: Florian Fainelli arch/arm/mach-bcm/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 933b9609d33567804c1fd9de70c4ee34c43791c1 Author: Jim Quinlan Date: Fri May 31 10:27:03 2019 -0700 ARM: bcm: Enable ARCH_HAS_RESET_CONTROLLER for ARCH_BRCMSTB Allow the use of reset controllers on ARCH_BRCMSTB such as the recently introduced RESET_BRCMSTB driver. Signed-off-by: Jim Quinlan Signed-off-by: Florian Fainelli arch/arm/mach-bcm/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 25529edef561ca51dadcbb6e97b1c40d2dbc5bae Merge: 09bfa5f6833a 11e1bbc116a7 Author: Jacek Anaszewski Date: Tue Jun 11 23:46:37 2019 +0200 Merge tag 'ti-lmu-led-drivers' into for-next Merge immutable branch between LEDs, MFD and REGULATOR due to TI LMU LED support rework and introduction of two new drivers with DT bindings. * tag 'ti-lmu-led-drivers': leds: lm36274: Introduce the TI LM36274 LED driver dt-bindings: leds: Add LED bindings for the LM36274 regulator: lm363x: Add support for LM36274 mfd: ti-lmu: Add LM36274 support to the ti-lmu dt-bindings: mfd: Add lm36274 bindings to ti-lmu leds: lm3697: Introduce the lm3697 driver mfd: ti-lmu: Remove support for LM3697 dt-bindings: ti-lmu: Modify dt bindings for the LM3697 leds: TI LMU: Add common code for TI LMU devices dt-bindings: mfd: LMU: Add ti,brightness-resolution dt-bindings: mfd: LMU: Add the ramp up/down property commit d1c5947ec6789b7d72cd7365f4e37ec326dbd9b6 Author: YueHaibing Date: Tue Jun 11 21:48:15 2019 +0800 security: Make capability_hooks static Fix sparse warning: security/commoncap.c:1347:27: warning: symbol 'capability_hooks' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: James Morris security/commoncap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e39afe3d6dbd908d8fd189571a3c1561088a86c2 Author: Leon Romanovsky Date: Tue May 28 14:37:29 2019 +0300 RDMA: Convert CQ allocations to be under core responsibility Ensure that CQ is allocated and freed by IB/core and not by drivers. Signed-off-by: Leon Romanovsky Acked-by: Gal Pressman Reviewed-by: Dennis Dalessandro Tested-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/core/cq.c | 28 +++++++----- drivers/infiniband/core/device.c | 1 + drivers/infiniband/core/uverbs_cmd.c | 15 ++++--- drivers/infiniband/core/uverbs_std_types_cq.c | 19 +++++--- drivers/infiniband/core/verbs.c | 32 ++++++++----- drivers/infiniband/hw/bnxt_re/ib_verbs.c | 20 +++------ drivers/infiniband/hw/bnxt_re/ib_verbs.h | 7 ++- drivers/infiniband/hw/bnxt_re/main.c | 1 + drivers/infiniband/hw/cxgb3/iwch_provider.c | 43 ++++++++---------- drivers/infiniband/hw/cxgb4/cq.c | 27 +++++------ drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 5 +-- drivers/infiniband/hw/cxgb4/provider.c | 1 + drivers/infiniband/hw/efa/efa.h | 5 +-- drivers/infiniband/hw/efa/efa_main.c | 1 + drivers/infiniband/hw/efa/efa_verbs.c | 48 ++++++-------------- drivers/infiniband/hw/hns/hns_roce_cq.c | 23 ++++------ drivers/infiniband/hw/hns/hns_roce_device.h | 6 +-- drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 21 +++++---- drivers/infiniband/hw/hns/hns_roce_main.c | 1 + drivers/infiniband/hw/i40iw/i40iw_verbs.c | 33 ++++++-------- drivers/infiniband/hw/mlx4/cq.c | 25 ++++------- drivers/infiniband/hw/mlx4/main.c | 1 + drivers/infiniband/hw/mlx4/mlx4_ib.h | 5 +-- drivers/infiniband/hw/mlx5/cq.c | 32 +++++-------- drivers/infiniband/hw/mlx5/main.c | 21 +++++---- drivers/infiniband/hw/mlx5/mlx5_ib.h | 5 +-- drivers/infiniband/hw/mthca/mthca_provider.c | 36 +++++++-------- drivers/infiniband/hw/nes/nes_verbs.c | 60 +++++++++---------------- drivers/infiniband/hw/ocrdma/ocrdma_main.c | 1 + drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 29 +++++------- drivers/infiniband/hw/ocrdma/ocrdma_verbs.h | 5 +-- drivers/infiniband/hw/qedr/main.c | 1 + drivers/infiniband/hw/qedr/verbs.c | 28 ++++-------- drivers/infiniband/hw/qedr/verbs.h | 5 +-- drivers/infiniband/hw/usnic/usnic_ib.h | 4 ++ drivers/infiniband/hw/usnic/usnic_ib_main.c | 1 + drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 18 +++----- drivers/infiniband/hw/usnic/usnic_ib_verbs.h | 5 +-- drivers/infiniband/hw/vmw_pvrdma/pvrdma_cq.c | 34 +++++--------- drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c | 1 + drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.h | 5 +-- drivers/infiniband/sw/rdmavt/cq.c | 51 +++++++-------------- drivers/infiniband/sw/rdmavt/cq.h | 5 +-- drivers/infiniband/sw/rdmavt/vt.c | 1 + drivers/infiniband/sw/rxe/rxe_pool.c | 1 + drivers/infiniband/sw/rxe/rxe_verbs.c | 30 +++++-------- drivers/infiniband/sw/rxe/rxe_verbs.h | 2 +- include/rdma/ib_verbs.h | 6 +-- 48 files changed, 318 insertions(+), 437 deletions(-) commit a52c8e2469c30cf7ac453d624aed9c168b23d1af Author: Leon Romanovsky Date: Tue May 28 14:37:28 2019 +0300 RDMA: Clean destroy CQ in drivers do not return errors Like all other destroy commands, .destroy_cq() call is not supposed to fail. In all flows, the attempt to return earlier caused to memory leaks. This patch converts .destroy_cq() to do not return any errors. Signed-off-by: Leon Romanovsky Acked-by: Gal Pressman Acked-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/core/cq.c | 5 +-- drivers/infiniband/core/verbs.c | 3 +- drivers/infiniband/hw/bnxt_re/ib_verbs.c | 13 ++----- drivers/infiniband/hw/bnxt_re/ib_verbs.h | 2 +- drivers/infiniband/hw/cxgb3/cxio_hal.c | 6 ++-- drivers/infiniband/hw/cxgb3/cxio_hal.h | 2 +- drivers/infiniband/hw/cxgb3/iwch_provider.c | 3 +- drivers/infiniband/hw/cxgb4/cq.c | 13 +++---- drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 2 +- drivers/infiniband/hw/efa/efa.h | 2 +- drivers/infiniband/hw/efa/efa_verbs.c | 9 ++--- drivers/infiniband/hw/hns/hns_roce_cq.c | 48 ++++++++++++------------- drivers/infiniband/hw/hns/hns_roce_device.h | 4 +-- drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 14 ++------ drivers/infiniband/hw/i40iw/i40iw_verbs.c | 3 +- drivers/infiniband/hw/mlx4/cq.c | 4 +-- drivers/infiniband/hw/mlx4/mlx4_ib.h | 2 +- drivers/infiniband/hw/mlx5/cq.c | 4 +-- drivers/infiniband/hw/mlx5/mlx5_ib.h | 2 +- drivers/infiniband/hw/mthca/mthca_provider.c | 4 +-- drivers/infiniband/hw/nes/nes_utils.c | 4 +-- drivers/infiniband/hw/nes/nes_verbs.c | 30 +++++----------- drivers/infiniband/hw/ocrdma/ocrdma_hw.c | 8 ++--- drivers/infiniband/hw/ocrdma/ocrdma_hw.h | 2 +- drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 6 ++-- drivers/infiniband/hw/ocrdma/ocrdma_verbs.h | 2 +- drivers/infiniband/hw/qedr/verbs.c | 20 ++--------- drivers/infiniband/hw/qedr/verbs.h | 2 +- drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 4 +-- drivers/infiniband/hw/usnic/usnic_ib_verbs.h | 2 +- drivers/infiniband/hw/vmw_pvrdma/pvrdma_cq.c | 6 +--- drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.h | 2 +- drivers/infiniband/sw/rdmavt/cq.c | 6 +--- drivers/infiniband/sw/rdmavt/cq.h | 2 +- drivers/infiniband/sw/rxe/rxe_verbs.c | 3 +- include/rdma/ib_verbs.h | 2 +- 36 files changed, 81 insertions(+), 165 deletions(-) commit 147b308e6a63a0572b750b1dc9b8b6fc33997e4b Author: Leon Romanovsky Date: Tue May 28 14:37:27 2019 +0300 RDMA/nes: Avoid memory allocation during CQ destroy The memory allocation call can fail and cause to early return from nes_desotroy_cq() function. This situation will cause to memory leak of struct nes_cq. Rewrite function to avoid memory allocation. Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/nes/nes_verbs.c | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) commit 522d47cff1128fa0a1edbdf47eb211633a171ab8 Author: Lucas De Marchi Date: Mon Jun 10 14:48:47 2019 -0700 drm/i915/skl: use ranges for voltage level lookup Like was done for ICL, let's convert the voltage level lookup to use frequency ranges rather than individual frequencies. For deciding the voltage, the individual value doesn't really matter. Signed-off-by: Lucas De Marchi Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190610214847.9865-1-lucas.demarchi@intel.com drivers/gpu/drm/i915/intel_cdclk.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) commit 63b1700b40d63a1369c0bc756d579bc242c658d7 Author: Lucas De Marchi Date: Mon Jun 10 14:48:34 2019 -0700 drm/i915/cnl: use ranges for voltage level lookup Like was done for ICL, let's convert the voltage level lookup to use frequency ranges rather than individual frequencies. For deciding the voltage, the individual value doesn't really matter. Signed-off-by: Lucas De Marchi Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190610214834.9789-1-lucas.demarchi@intel.com drivers/gpu/drm/i915/intel_cdclk.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 4f338ac0b2fa59ef0c10cb828a82922e1c39aa64 Author: Lucas De Marchi Date: Mon Jun 10 14:48:19 2019 -0700 drm/i915/icl: use ranges for voltage level lookup Spec shows voltage level 0 as 307.2, 312, or lower and suggests to use range checks. Prepare for having other frequencies in these ranges by not comparing the exact frequency. v2: invert checks by comparing biggest cdclk first (suggested by Ville) Signed-off-by: Lucas De Marchi Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190610214819.9703-1-lucas.demarchi@intel.com drivers/gpu/drm/i915/intel_cdclk.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) commit 498ad39368865dfdbf15d3516c43694947074b88 Author: Zhao Yakui Date: Tue Apr 30 11:45:25 2019 +0800 x86/acrn: Use HYPERVISOR_CALLBACK_VECTOR for ACRN guest upcall vector Use the HYPERVISOR_CALLBACK_VECTOR to notify an ACRN guest. Co-developed-by: Jason Chen CJ Signed-off-by: Jason Chen CJ Signed-off-by: Zhao Yakui Signed-off-by: Borislav Petkov Reviewed-by: Thomas Gleixner Cc: Andy Lutomirski Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/1559108037-18813-4-git-send-email-yakui.zhao@intel.com arch/x86/Kconfig | 1 + arch/x86/entry/entry_64.S | 5 +++++ arch/x86/include/asm/acrn.h | 11 +++++++++++ arch/x86/kernel/cpu/acrn.c | 30 ++++++++++++++++++++++++++++++ 4 files changed, 47 insertions(+) commit ec7972c99fffb4d2739f286ce9b544a71aa1d05f Author: Zhao Yakui Date: Tue Apr 30 11:45:24 2019 +0800 x86: Add support for Linux guests on an ACRN hypervisor ACRN is an open-source hypervisor maintained by The Linux Foundation. It is built for embedded IOT with small footprint and real-time features. Add ACRN guest support so that it allows Linux to be booted under the ACRN hypervisor. This adds only the barebones implementation. [ bp: Massage commit message and help text. ] Co-developed-by: Jason Chen CJ Signed-off-by: Jason Chen CJ Signed-off-by: Zhao Yakui Signed-off-by: Borislav Petkov Reviewed-by: Thomas Gleixner Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/1559108037-18813-3-git-send-email-yakui.zhao@intel.com arch/x86/Kconfig | 10 ++++++++++ arch/x86/include/asm/hypervisor.h | 1 + arch/x86/kernel/cpu/Makefile | 1 + arch/x86/kernel/cpu/acrn.c | 39 +++++++++++++++++++++++++++++++++++++++ arch/x86/kernel/cpu/hypervisor.c | 4 ++++ 5 files changed, 55 insertions(+) commit 758a0a4d60ab8a5bfed1e8365c6faa00d8b8dbd5 Merge: 46088059aaa0 9ed431c1d7cf Author: David S. Miller Date: Tue Jun 11 12:22:27 2019 -0700 Merge branch 'tls-add-support-for-kernel-driven-resync-and-nfp-RX-offload' Jakub Kicinski says: ==================== tls: add support for kernel-driven resync and nfp RX offload This series adds TLS RX offload for NFP and completes the offload by providing resync strategies. When TLS data stream looses segments or experiences reorder NIC can no longer perform in line offload. Resyncs provide information about placement of records in the stream so that offload can resume. Existing TLS resync mechanisms are not a great fit for the NFP. In particular the TX resync is hard to implement for packet-centric NICs. This patchset adds an ability to perform TX resync in a way similar to the way initial sync is done - by calling down to the driver when new record is created after driver indicated sync had been lost. Similarly on the RX side, we try to wait for a gap in the stream and send record information for the next record. This works very well for RPC workloads which are the primary focus at this time. ==================== Signed-off-by: David S. Miller commit 9ed431c1d7cf8c394aa7562ca6b84f3eeb8c78a8 Author: Jakub Kicinski Date: Mon Jun 10 21:40:10 2019 -0700 nfp: tls: make use of kernel-driven TX resync When TCP stream gets out of sync (driver stops receiving skbs with expected TCP sequence numbers) request a TX resync from the kernel. We try to distinguish retransmissions from missed transmissions by comparing the sequence number to expected - if it's further than the expected one - we probably missed packets. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/crypto/crypto.h | 1 - drivers/net/ethernet/netronome/nfp/crypto/tls.c | 21 +++++++++++++-------- drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 8 +++++--- 3 files changed, 18 insertions(+), 12 deletions(-) commit 50180074099fcda752d9d56282d23242b126ebc9 Author: Jakub Kicinski Date: Mon Jun 10 21:40:09 2019 -0700 net/tls: add kernel-driven resync mechanism for TX TLS offload drivers keep track of TCP seq numbers to make sure the packets are fed into the HW in order. When packets get dropped on the way through the stack, the driver will get out of sync and have to use fallback encryption, but unless TCP seq number is resynced it will never match the packets correctly (or even worse - use incorrect record sequence number after TCP seq wraps). Existing drivers (mlx5) feed the entire record on every out-of-order event, allowing FW/HW to always be in sync. This patch adds an alternative, more akin to the RX resync. When driver sees a frame which is past its expected sequence number the stream must have gotten out of order (if the sequence number is smaller than expected its likely a retransmission which doesn't require resync). Driver will ask the stack to perform TX sync before it submits the next full record, and fall back to software crypto until stack has performed the sync. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller Documentation/networking/tls-offload.rst | 35 +++++++++++++++++++++++++++++++- include/net/tls.h | 23 +++++++++++++++++++++ net/tls/tls_device.c | 27 ++++++++++++++++++++++++ 3 files changed, 84 insertions(+), 1 deletion(-) commit eeb2efaf36c75753f9028de3500669bddfac81a8 Author: Jakub Kicinski Date: Mon Jun 10 21:40:08 2019 -0700 net/tls: generalize the resync callback Currently only RX direction is ever resynced, however, TX may also get out of sequence if packets get dropped on the way to the driver. Rename the resync callback and add a direction parameter. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.c | 9 ++++++--- drivers/net/ethernet/netronome/nfp/crypto/tls.c | 9 ++++++--- include/net/tls.h | 5 +++-- net/tls/tls_device.c | 5 +++-- 4 files changed, 18 insertions(+), 10 deletions(-) commit c0a4948e1ddab4d90b535c2c5488d85a3db76305 Author: Jakub Kicinski Date: Mon Jun 10 21:40:07 2019 -0700 nfp: tls: enable TLS RX offload Set ethtool TLS RX feature based on NIC capabilities, and enable TLS RX when connections are added for decryption. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/crypto/crypto.h | 5 +++++ drivers/net/ethernet/netronome/nfp/crypto/tls.c | 25 ++++++++++++++++------ drivers/net/ethernet/netronome/nfp/nfp_net.h | 2 ++ 3 files changed, 26 insertions(+), 6 deletions(-) commit cad228a3760c1a6314cfdd4cd250626f3d72d670 Author: Dirk van der Merwe Date: Mon Jun 10 21:40:06 2019 -0700 nfp: tls: implement RX TLS resync Enable kernel-controlled RX resync and propagate TLS connection RX resync from kernel TLS to firmware. Signed-off-by: Dirk van der Merwe Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/crypto/tls.c | 32 +++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit e2c7114a12363eef7c3104ce223a0084d1800458 Author: Jakub Kicinski Date: Mon Jun 10 21:40:05 2019 -0700 nfp: add async version of mailbox communication Some control messages must be sent from atomic context. The mailbox takes sleeping locks and uses a waitqueue so add a "posted" version of communication. Trylock the semaphore and if that's successful kick of the device communication. The device communication will be completed from a workqueue, which will also release the semaphore. If locks are taken queue the message and return. Schedule a different workqueue to take the semaphore and run the communication. Note that the there are currently no atomic users which would actually need the return value, so all replies to posted messages are just freed. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/ccm.h | 8 +- drivers/net/ethernet/netronome/nfp/ccm_mbox.c | 175 +++++++++++++++++++-- drivers/net/ethernet/netronome/nfp/nfp_net.h | 14 ++ .../net/ethernet/netronome/nfp/nfp_net_common.c | 40 ++++- 4 files changed, 215 insertions(+), 22 deletions(-) commit d7053e0433c2f6a53c049548500f6037c955b2c9 Author: Jakub Kicinski Date: Mon Jun 10 21:40:04 2019 -0700 nfp: rename nfp_ccm_mbox_alloc() We need the name nfp_ccm_mbox_alloc() for allocating the mailbox communication channel itself. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/ccm.h | 4 ++-- drivers/net/ethernet/netronome/nfp/ccm_mbox.c | 4 ++-- drivers/net/ethernet/netronome/nfp/crypto/tls.c | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) commit 5bcb5c7e981b7b144b3bb23c108f57e29ae809a0 Author: Dirk van der Merwe Date: Mon Jun 10 21:40:03 2019 -0700 nfp: tls: set skb decrypted flag Firmware indicates when a packet has been decrypted by reusing the currently unused BPF flag. Transfer this information into the skb and provide a statistic of all decrypted segments. Signed-off-by: Dirk van der Merwe Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net.h | 4 +++- drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 9 +++++++++ drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c | 18 ++++++++++-------- 3 files changed, 22 insertions(+), 9 deletions(-) commit f953d33ba1225d68cf8790b4706d8c4410b15926 Author: Jakub Kicinski Date: Mon Jun 10 21:40:02 2019 -0700 net/tls: add kernel-driven TLS RX resync TLS offload device may lose sync with the TCP stream if packets arrive out of order. Drivers can currently request a resync at a specific TCP sequence number. When a record is found starting at that sequence number kernel will inform the device of the corresponding record number. This requires the device to constantly scan the stream for a known pattern (constant bytes of the header) after sync is lost. This patch adds an alternative approach which is entirely under the control of the kernel. Kernel tracks records it had to fully decrypt, even though TLS socket is in TLS_HW mode. If multiple records did not have any decrypted parts - it's a pretty strong indication that the device is out of sync. We choose the min number of fully encrypted records to be 2, which should hopefully be more than will get retransmitted at a time. After kernel decides the device is out of sync it schedules a resync request. If the TCP socket is empty the resync gets performed immediately. If socket is not empty we leave the record parser to resync when next record comes. Before resync in message parser we peek at the TCP socket and don't attempt the sync if the socket already has some of the next record queued. On resync failure (encrypted data continues to flow in) we retry with exponential backoff, up to once every 128 records (with a 16k record thats at most once every 2M of data). Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller Documentation/networking/tls-offload.rst | 19 ++++++ include/net/tls.h | 34 +++++++++- net/tls/tls_device.c | 105 +++++++++++++++++++++++++++---- net/tls/tls_sw.c | 2 +- 4 files changed, 145 insertions(+), 15 deletions(-) commit fe58a5a02cd9f49d5868539b4146ec1e5e5176e4 Author: Jakub Kicinski Date: Mon Jun 10 21:40:01 2019 -0700 net/tls: rename handle_device_resync() handle_device_resync() doesn't describe the function very well. The function checks if resync should be issued upon parsing of a new record. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller include/net/tls.h | 2 +- net/tls/tls_device.c | 2 +- net/tls/tls_sw.c | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) commit 89fec474fa1ab2c754e48d29e1081a2c2bd22dc6 Author: Jakub Kicinski Date: Mon Jun 10 21:40:00 2019 -0700 net/tls: pass record number as a byte array TLS offload code casts record number to a u64. The buffer should be aligned to 8 bytes, but its actually a __be64, and the rest of the TLS code treats it as big int. Make the offload callbacks take a byte array, drivers can make the choice to do the ugly cast if they want to. Prepare for copying the record number onto the stack by defining a constant for max size of the byte array. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.c | 3 ++- include/net/tls.h | 5 +++-- net/tls/tls_device.c | 12 +++++++++--- net/tls/tls_sw.c | 8 ++++---- 4 files changed, 18 insertions(+), 10 deletions(-) commit 4967373959cd8a437df92413ea932e638a0518b1 Author: Jakub Kicinski Date: Mon Jun 10 21:39:59 2019 -0700 net/tls: simplify seq calculation in handle_device_resync() We subtract "TLS_HEADER_SIZE - 1" from req_seq, then if they match we add the same constant to seq. Just add it to seq, and we don't have to touch req_seq. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller net/tls/tls_device.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit ecca25029473bee6e98ce062e76b7310904bbdd1 Author: Zhao Yakui Date: Tue Apr 30 11:45:23 2019 +0800 x86/Kconfig: Add new X86_HV_CALLBACK_VECTOR config symbol Add a special Kconfig symbol X86_HV_CALLBACK_VECTOR so that the guests using the hypervisor interrupt callback counter can select and thus enable that counter. Select it when xen or hyperv support is enabled. No functional changes. Signed-off-by: Zhao Yakui Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Reviewed-by: Thomas Gleixner Cc: Boris Ostrovsky Cc: Frederic Weisbecker Cc: Haiyang Zhang Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Juergen Gross Cc: "K. Y. Srinivasan" Cc: linux-hyperv@vger.kernel.org Cc: Nicolai Stange Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Sasha Levin Cc: Stefano Stabellini Cc: Stephen Hemminger Cc: Thomas Gleixner Cc: x86-ml Cc: xen-devel@lists.xenproject.org Link: https://lkml.kernel.org/r/1559108037-18813-2-git-send-email-yakui.zhao@intel.com arch/x86/Kconfig | 3 +++ arch/x86/include/asm/hardirq.h | 2 +- arch/x86/kernel/irq.c | 2 +- arch/x86/xen/Kconfig | 1 + drivers/hv/Kconfig | 1 + 5 files changed, 7 insertions(+), 2 deletions(-) commit 46088059aaa0ec2143a1005bfc58d2a7c741b93f Author: Mao Wenan Date: Tue Jun 11 09:32:13 2019 +0800 packet: remove unused variable 'status' in __packet_lookup_frame_in_block The variable 'status' in __packet_lookup_frame_in_block() is never used since introduction in commit f6fb8f100b80 ("af-packet: TPACKET_V3 flexible buffer implementation."), we can remove it. Signed-off-by: Mao Wenan Signed-off-by: David S. Miller net/packet/af_packet.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit f7a8fb1ff1e581f610c3d06cf30d09a52263794c Author: Taehee Yoo Date: Mon Jun 10 02:19:06 2019 +0900 net: openvswitch: remove unnecessary ASSERT_OVSL in ovs_vport_del() ASSERT_OVSL() in ovs_vport_del() is unnecessary because ovs_vport_del() is only called by ovs_dp_detach_port() and ovs_dp_detach_port() calls ASSERT_OVSL() too. Signed-off-by: Taehee Yoo Reviewed-by: Greg Rose Signed-off-by: David S. Miller net/openvswitch/vport.c | 2 -- 1 file changed, 2 deletions(-) commit abf9979f7ef34eea0d610885b7335ee4d6df05f9 Author: Taehee Yoo Date: Mon Jun 10 02:05:30 2019 +0900 net: netlink: make netlink_walk_start() void return type netlink_walk_start() needed to return an error code because of rhashtable_walk_init(). but that was converted to rhashtable_walk_enter() and it is a void type function. so now netlink_walk_start() doesn't need any return value. Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller net/netlink/af_netlink.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) commit e28799e52a0a7188374679184a32ca24921ff40e Author: Stefano Brivio Date: Thu Jun 6 22:15:09 2019 +0200 selftests: pmtu: Introduce list_flush_ipv6_exception test case This test checks that route exceptions can be successfully listed and flushed using ip -6 route {list,flush} cache. Signed-off-by: Stefano Brivio Signed-off-by: David S. Miller tools/testing/selftests/net/pmtu.sh | 51 ++++++++++++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) commit d2cac68e0d9b038da7207c0b63e1399c4f9f60c4 Author: Krzysztof Kozlowski Date: Tue Feb 12 18:50:52 2019 +0100 ARM: dts: exynos: Add ADC node to Exynos5410 and Odroid XU Move the ADC from exynos5420.dtsi to a shared file between Exynos5410 and Exynos542x: exynos54xx.dtsi. Enable the ADC on Odroid XU board. Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos5410-odroidxu.dts | 5 +++++ arch/arm/boot/dts/exynos5410.dtsi | 6 ++++++ arch/arm/boot/dts/exynos5420.dtsi | 18 ++++++------------ arch/arm/boot/dts/exynos54xx.dtsi | 9 +++++++++ 4 files changed, 26 insertions(+), 12 deletions(-) commit 4aa095ea329d76aeb2ae043e0d1ed96049d47940 Author: Florian Fainelli Date: Tue Jun 11 10:58:25 2019 -0700 swiotlb: Return consistent SWIOTLB segments/nr_tbl With a specifically contrived memory layout where there is no physical memory available to the kernel below the 4GB boundary, we will fail to perform the initial swiotlb_init() call and set no_iotlb_memory to true. There are drivers out there that call into swiotlb_nr_tbl() to determine whether they can use the SWIOTLB. With the right DMA_BIT_MASK() value for these drivers (say 64-bit), they won't ever need to hit swiotlb_tbl_map_single() so this can go unoticed and we would be possibly lying about those drivers. Signed-off-by: Florian Fainelli Signed-off-by: Konrad Rzeszutek Wilk kernel/dma/swiotlb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 0bfaffbf4cc6f380a83eabc679c0d6eb307cf6e4 Author: Florian Fainelli Date: Tue Jun 11 10:58:24 2019 -0700 swiotlb: Group identical cleanup in swiotlb_cleanup() Avoid repeating the zeroing of global swiotlb variables in two locations and introduce swiotlb_cleanup() to do that. Signed-off-by: Florian Fainelli Signed-off-by: Konrad Rzeszutek Wilk kernel/dma/swiotlb.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit b8a84365bbff0f860c5dc5795405430d92d68966 Author: Lubomir Rintel Date: Wed May 29 10:34:02 2019 +0200 Platform: OLPC: Make olpc_dt_compatible_match() static __init Addresses a kbuild warning: >> WARNING: vmlinux.o(.text+0x3b764): Section mismatch in reference from the function olpc_dt_compatible_match() to the function .init.text:olpc_dt_getproperty() Signed-off-by: Lubomir Rintel Reported-by: kbuild test robot Fixes: a7a9bacb9a32 (x86/platform/olpc: Use a correct version when making up a battery node) Signed-off-by: Andy Shevchenko arch/x86/platform/olpc/olpc_dt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cdaf018c54bd957d5ee00b1b8c3c74e18138ee6e Author: YueHaibing Date: Tue May 28 17:28:06 2019 +0800 Platform: OLPC: Add INPUT dependencies Building with CONFIG_INPUT set to m: drivers/platform/olpc/olpc-xo175-ec.o: In function `olpc_xo175_ec_complete': olpc-xo175-ec.c:(.text+0x75d): undefined reference to `input_event' olpc-xo175-ec.c:(.text+0x76f): undefined reference to `input_event' olpc-xo175-ec.c:(.text+0x787): undefined reference to `input_event' olpc-xo175-ec.c:(.text+0x799): undefined reference to `input_event' drivers/platform/olpc/olpc-xo175-ec.o: In function `olpc_xo175_ec_probe': olpc-xo175-ec.c:(.text+0x8d5): undefined reference to `devm_input_allocate_device' olpc-xo175-ec.c:(.text+0x910): undefined reference to `input_set_capability' olpc-xo175-ec.c:(.text+0x91c): undefined reference to `input_register_device' This patch add INPUT dependencies to fix this. Reported-by: Hulk Robot Fixes: 0c3d931b3ab9 ("Platform: OLPC: Add XO-1.75 EC driver") Signed-off-by: YueHaibing Signed-off-by: Andy Shevchenko drivers/platform/olpc/Kconfig | 1 + 1 file changed, 1 insertion(+) commit ad04ca76c6536c7a3176b7413fde20fa3318b7bf Author: YueHaibing Date: Tue May 28 17:28:05 2019 +0800 Platform: OLPC: Fix build error without CONFIG_SPI Fix gcc build error while CONFIG_SPI is not set drivers/platform/olpc/olpc-xo175-ec.o: In function `olpc_xo175_ec_remove': olpc-xo175-ec.c:(.text+0x190): undefined reference to `spi_slave_abort' drivers/platform/olpc/olpc-xo175-ec.o: In function `olpc_xo175_ec_send_command': olpc-xo175-ec.c:(.text+0x374): undefined reference to `spi_async' drivers/platform/olpc/olpc-xo175-ec.o: In function `olpc_xo175_ec_cmd': olpc-xo175-ec.c:(.text+0x8a0): undefined reference to `spi_slave_abort' drivers/platform/olpc/olpc-xo175-ec.o: In function `olpc_xo175_ec_spi_driver_init': olpc-xo175-ec.c:(.init.text+0x14): undefined reference to `__spi_register_driver' We should depends on CONFIG_SPI_SLAVE other than directly select it. Reported-by: Hulk Robot Fixes: 0c3d931b3ab9 ("Platform: OLPC: Add XO-1.75 EC driver") Signed-off-by: YueHaibing Signed-off-by: Andy Shevchenko drivers/platform/olpc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 465ab9e02aacb0588748690b27f7f3f837b74567 Author: Oak Zeng Date: Mon Jun 10 14:44:07 2019 -0500 drm/amdkfd: Add device to topology after it is completely inited We can't have devices that are not completely initialized in kfd topology. Otherwise it is a race condition when user access not completely initialized device. This also addresses a kfd_topology_add_device accessing NULL dqm pointer issue. Signed-off-by: Oak Zeng Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_device.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 1ae99eab34f90c3a5319c79a910e6b71313a9aab Author: Oak Zeng Date: Mon Jun 10 15:22:35 2019 -0500 drm/amdkfd: Initialize HSA_CAP_ATS_PRESENT capability in topology codes Move HSA_CAP_ATS_PRESENT initialization logic from kfd iommu codes to kfd topology codes. This removes kfd_iommu_device_init's dependency on kfd_topology_add_device. Also remove duplicate code setting the same. Signed-off-by: Oak Zeng Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_iommu.c | 10 +--------- drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 11 +++++++++-- 2 files changed, 10 insertions(+), 11 deletions(-) commit f77dac6cd62e5d4bcadd740620af1218bfb54cc6 Author: Oak Zeng Date: Thu Jun 6 13:19:06 2019 -0500 drm/amdkfd: Fix sdma queue allocate race condition SDMA queue allocation requires the dqm lock at it modify the global dqm members. Move up the dqm_lock so sdma queue allocation is enclosed in the critical section. Move mqd allocation out of critical section to avoid circular lock dependency. Signed-off-by: Oak Zeng Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 26 ++++++++++------------ 1 file changed, 12 insertions(+), 14 deletions(-) commit 06b89b38f3cc518a761164f9f958a9607bbb3587 Author: Oak Zeng Date: Mon Jun 3 21:44:55 2019 -0500 drm/amdkfd: Fix a circular lock dependency The idea to break the circular lock dependency is to move allocate_mqd out of dqm lock protection. See callstack #1 below. [ 59.510149] [drm] Initialized amdgpu 3.30.0 20150101 for 0000:04:00.0 on minor 0 [ 513.604034] ====================================================== [ 513.604205] WARNING: possible circular locking dependency detected [ 513.604375] 4.18.0-kfd-root #2 Tainted: G W [ 513.604530] ------------------------------------------------------ [ 513.604699] kswapd0/611 is trying to acquire lock: [ 513.604840] 00000000d254022e (&dqm->lock_hidden){+.+.}, at: evict_process_queues_nocpsch+0x26/0x140 [amdgpu] [ 513.605150] but task is already holding lock: [ 513.605307] 00000000961547fc (&anon_vma->rwsem){++++}, at: page_lock_anon_vma_read+0xe4/0x250 [ 513.605540] which lock already depends on the new lock. [ 513.605747] the existing dependency chain (in reverse order) is: [ 513.605944] -> #4 (&anon_vma->rwsem){++++}: [ 513.606106] __vma_adjust+0x147/0x7f0 [ 513.606231] __split_vma+0x179/0x190 [ 513.606353] mprotect_fixup+0x217/0x260 [ 513.606553] do_mprotect_pkey+0x211/0x380 [ 513.606752] __x64_sys_mprotect+0x1b/0x20 [ 513.606954] do_syscall_64+0x50/0x1a0 [ 513.607149] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 513.607380] -> #3 (&mapping->i_mmap_rwsem){++++}: [ 513.607678] rmap_walk_file+0x1f0/0x280 [ 513.607887] page_referenced+0xdd/0x180 [ 513.608081] shrink_page_list+0x853/0xcb0 [ 513.608279] shrink_inactive_list+0x33b/0x700 [ 513.608483] shrink_node_memcg+0x37a/0x7f0 [ 513.608682] shrink_node+0xd8/0x490 [ 513.608869] balance_pgdat+0x18b/0x3b0 [ 513.609062] kswapd+0x203/0x5c0 [ 513.609241] kthread+0x100/0x140 [ 513.609420] ret_from_fork+0x24/0x30 [ 513.609607] -> #2 (fs_reclaim){+.+.}: [ 513.609883] kmem_cache_alloc_trace+0x34/0x2e0 [ 513.610093] reservation_object_reserve_shared+0x139/0x300 [ 513.610326] ttm_bo_init_reserved+0x291/0x480 [ttm] [ 513.610567] amdgpu_bo_do_create+0x1d2/0x650 [amdgpu] [ 513.610811] amdgpu_bo_create+0x40/0x1f0 [amdgpu] [ 513.611041] amdgpu_bo_create_reserved+0x249/0x2d0 [amdgpu] [ 513.611290] amdgpu_bo_create_kernel+0x12/0x70 [amdgpu] [ 513.611584] amdgpu_ttm_init+0x2cb/0x560 [amdgpu] [ 513.611823] gmc_v9_0_sw_init+0x400/0x750 [amdgpu] [ 513.612491] amdgpu_device_init+0x14eb/0x1990 [amdgpu] [ 513.612730] amdgpu_driver_load_kms+0x78/0x290 [amdgpu] [ 513.612958] drm_dev_register+0x111/0x1a0 [ 513.613171] amdgpu_pci_probe+0x11c/0x1e0 [amdgpu] [ 513.613389] local_pci_probe+0x3f/0x90 [ 513.613581] pci_device_probe+0x102/0x1c0 [ 513.613779] driver_probe_device+0x2a7/0x480 [ 513.613984] __driver_attach+0x10a/0x110 [ 513.614179] bus_for_each_dev+0x67/0xc0 [ 513.614372] bus_add_driver+0x1eb/0x260 [ 513.614565] driver_register+0x5b/0xe0 [ 513.614756] do_one_initcall+0xac/0x357 [ 513.614952] do_init_module+0x5b/0x213 [ 513.615145] load_module+0x2542/0x2d30 [ 513.615337] __do_sys_finit_module+0xd2/0x100 [ 513.615541] do_syscall_64+0x50/0x1a0 [ 513.615731] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 513.615963] -> #1 (reservation_ww_class_mutex){+.+.}: [ 513.616293] amdgpu_amdkfd_alloc_gtt_mem+0xcf/0x2c0 [amdgpu] [ 513.616554] init_mqd+0x223/0x260 [amdgpu] [ 513.616779] create_queue_nocpsch+0x4d9/0x600 [amdgpu] [ 513.617031] pqm_create_queue+0x37c/0x520 [amdgpu] [ 513.617270] kfd_ioctl_create_queue+0x2f9/0x650 [amdgpu] [ 513.617522] kfd_ioctl+0x202/0x350 [amdgpu] [ 513.617724] do_vfs_ioctl+0x9f/0x6c0 [ 513.617914] ksys_ioctl+0x66/0x70 [ 513.618095] __x64_sys_ioctl+0x16/0x20 [ 513.618286] do_syscall_64+0x50/0x1a0 [ 513.618476] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 513.618695] -> #0 (&dqm->lock_hidden){+.+.}: [ 513.618984] __mutex_lock+0x98/0x970 [ 513.619197] evict_process_queues_nocpsch+0x26/0x140 [amdgpu] [ 513.619459] kfd_process_evict_queues+0x3b/0xb0 [amdgpu] [ 513.619710] kgd2kfd_quiesce_mm+0x1c/0x40 [amdgpu] [ 513.620103] amdgpu_amdkfd_evict_userptr+0x38/0x70 [amdgpu] [ 513.620363] amdgpu_mn_invalidate_range_start_hsa+0xa6/0xc0 [amdgpu] [ 513.620614] __mmu_notifier_invalidate_range_start+0x70/0xb0 [ 513.620851] try_to_unmap_one+0x7fc/0x8f0 [ 513.621049] rmap_walk_anon+0x121/0x290 [ 513.621242] try_to_unmap+0x93/0xf0 [ 513.621428] shrink_page_list+0x606/0xcb0 [ 513.621625] shrink_inactive_list+0x33b/0x700 [ 513.621835] shrink_node_memcg+0x37a/0x7f0 [ 513.622034] shrink_node+0xd8/0x490 [ 513.622219] balance_pgdat+0x18b/0x3b0 [ 513.622410] kswapd+0x203/0x5c0 [ 513.622589] kthread+0x100/0x140 [ 513.622769] ret_from_fork+0x24/0x30 [ 513.622957] other info that might help us debug this: [ 513.623354] Chain exists of: &dqm->lock_hidden --> &mapping->i_mmap_rwsem --> &anon_vma->rwsem [ 513.623900] Possible unsafe locking scenario: [ 513.624189] CPU0 CPU1 [ 513.624397] ---- ---- [ 513.624594] lock(&anon_vma->rwsem); [ 513.624771] lock(&mapping->i_mmap_rwsem); [ 513.625020] lock(&anon_vma->rwsem); [ 513.625253] lock(&dqm->lock_hidden); [ 513.625433] *** DEADLOCK *** [ 513.625783] 3 locks held by kswapd0/611: [ 513.625967] #0: 00000000f14edf84 (fs_reclaim){+.+.}, at: __fs_reclaim_acquire+0x5/0x30 [ 513.626309] #1: 00000000961547fc (&anon_vma->rwsem){++++}, at: page_lock_anon_vma_read+0xe4/0x250 [ 513.626671] #2: 0000000067b5cd12 (srcu){....}, at: __mmu_notifier_invalidate_range_start+0x5/0xb0 [ 513.627037] stack backtrace: [ 513.627292] CPU: 0 PID: 611 Comm: kswapd0 Tainted: G W 4.18.0-kfd-root #2 [ 513.627632] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 [ 513.627990] Call Trace: [ 513.628143] dump_stack+0x7c/0xbb [ 513.628315] print_circular_bug.isra.37+0x21b/0x228 [ 513.628581] __lock_acquire+0xf7d/0x1470 [ 513.628782] ? unwind_next_frame+0x6c/0x4f0 [ 513.628974] ? lock_acquire+0xec/0x1e0 [ 513.629154] lock_acquire+0xec/0x1e0 [ 513.629357] ? evict_process_queues_nocpsch+0x26/0x140 [amdgpu] [ 513.629587] __mutex_lock+0x98/0x970 [ 513.629790] ? evict_process_queues_nocpsch+0x26/0x140 [amdgpu] [ 513.630047] ? evict_process_queues_nocpsch+0x26/0x140 [amdgpu] [ 513.630309] ? evict_process_queues_nocpsch+0x26/0x140 [amdgpu] [ 513.630562] evict_process_queues_nocpsch+0x26/0x140 [amdgpu] [ 513.630816] kfd_process_evict_queues+0x3b/0xb0 [amdgpu] [ 513.631057] kgd2kfd_quiesce_mm+0x1c/0x40 [amdgpu] [ 513.631288] amdgpu_amdkfd_evict_userptr+0x38/0x70 [amdgpu] [ 513.631536] amdgpu_mn_invalidate_range_start_hsa+0xa6/0xc0 [amdgpu] [ 513.632076] __mmu_notifier_invalidate_range_start+0x70/0xb0 [ 513.632299] try_to_unmap_one+0x7fc/0x8f0 [ 513.632487] ? page_lock_anon_vma_read+0x68/0x250 [ 513.632690] rmap_walk_anon+0x121/0x290 [ 513.632875] try_to_unmap+0x93/0xf0 [ 513.633050] ? page_remove_rmap+0x330/0x330 [ 513.633239] ? rcu_read_unlock+0x60/0x60 [ 513.633422] ? page_get_anon_vma+0x160/0x160 [ 513.633613] shrink_page_list+0x606/0xcb0 [ 513.633800] shrink_inactive_list+0x33b/0x700 [ 513.633997] shrink_node_memcg+0x37a/0x7f0 [ 513.634186] ? shrink_node+0xd8/0x490 [ 513.634363] shrink_node+0xd8/0x490 [ 513.634537] balance_pgdat+0x18b/0x3b0 [ 513.634718] kswapd+0x203/0x5c0 [ 513.634887] ? wait_woken+0xb0/0xb0 [ 513.635062] kthread+0x100/0x140 [ 513.635231] ? balance_pgdat+0x3b0/0x3b0 [ 513.635414] ? kthread_delayed_work_timer_fn+0x80/0x80 [ 513.635626] ret_from_fork+0x24/0x30 [ 513.636042] Evicting PASID 32768 queues [ 513.936236] Restoring PASID 32768 queues [ 524.708912] Evicting PASID 32768 queues [ 524.999875] Restoring PASID 32768 queues Signed-off-by: Oak Zeng Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit 8636e53c4715d0fb92980d39e070c2c897b5a96e Author: Oak Zeng Date: Mon Jun 3 21:25:52 2019 -0500 drm/amdkfd: Separate mqd allocation and initialization Introduce a new mqd allocation interface and split the original init_mqd function into two functions: allocate_mqd and init_mqd. Also renamed uninit_mqd to free_mqd. This is preparation work to fix a circular lock dependency. Signed-off-by: Oak Zeng Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 40 +++++----- drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c | 16 ++-- drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.c | 4 +- drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.h | 18 +++-- drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c | 78 +++++++------------ drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c | 78 +++++++------------ drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c | 88 ++++++++-------------- 7 files changed, 129 insertions(+), 193 deletions(-) commit d39b7737346328b66c46c54be973c5b3c176fc67 Author: Oak Zeng Date: Fri May 31 16:05:59 2019 -0500 drm/amdkfd: Refactor create_queue_nocpsch This is prepare work to fix a circular lock dependency. No logic change Signed-off-by: Oak Zeng Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 171 +++++++-------------- 1 file changed, 57 insertions(+), 114 deletions(-) commit 2ff528190f5cc8b326260ee030cf2eda73bdb78d Author: Oak Zeng Date: Mon Jun 3 12:28:13 2019 -0500 drm/amdkfd: Only load sdma mqd when queue is active Also calls load_mqd with current->mm struct. The mm struct is used to read back user wptr of the queue. Signed-off-by: Oak Zeng Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit eec0b4cf92b0d7c2892008daf4e13b5fafaf7a20 Author: Oak Zeng Date: Fri May 31 15:07:42 2019 -0500 drm/amdkfd: Only initialize sdma vm for sdma queues Don't do the same for compute queues Signed-off-by: Oak Zeng Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 66c45500bfdc6a7f1c143767dfbc8fc8f9435e73 Author: Philip Yang Date: Wed May 29 09:52:16 2019 -0400 drm/amdgpu: use new HMM APIs and helpers HMM provides new APIs and helps in kernel 5.2-rc1 to simplify driver path. The old hmm APIs are deprecated and will be removed in future. Below are changes in driver: 1. Change hmm_vma_fault to hmm_range_register and hmm_range_fault which supports range with multiple vmas, remove the multiple vmas handle path and data structure. 2. Change hmm_vma_range_done to hmm_range_unregister. 3. Use default flags to avoid pre-fill pfn arrays. 4. Use new hmm_device_ helpers. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 152 ++++++++++++++------------------ 2 files changed, 68 insertions(+), 85 deletions(-) commit 27c9130baef5438b6cebdce3014afe8f751b390b Author: Douglas Anderson Date: Tue Jun 4 13:42:07 2019 -0700 drm/rockchip: dw_hdmi: Handle suspend/resume On Rockchip rk3288-based Chromebooks when you do a suspend/resume cycle: 1. You lose the ability to detect an HDMI device being plugged in. 2. If you're using the i2c bus built in to dw_hdmi then it stops working. Let's call the core dw-hdmi's suspend/resume functions to restore things. NOTE: in downstream Chrome OS (based on kernel 3.14) we used the "late/early" versions of suspend/resume because we found that the VOP was sometimes resuming before dw_hdmi and then calling into us before we were fully resumed. For now I have gone back to the normal suspend/resume because I can't reproduce the problems. Signed-off-by: Douglas Anderson Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190604204207.168085-2-dianders@chromium.org drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 99d02ed523dcaf5be0c6a778708df2779cfb3ed6 Author: Douglas Anderson Date: Tue Jun 4 13:42:06 2019 -0700 drm: bridge: dw-hdmi: Add hook for resume On Rockchip rk3288-based Chromebooks when you do a suspend/resume cycle: 1. You lose the ability to detect an HDMI device being plugged in. 2. If you're using the i2c bus built in to dw_hdmi then it stops working. Let's add a hook to the core dw-hdmi driver so that we can call it in dw_hdmi-rockchip in the next commit. NOTE: the exact set of steps I've done here in resume come from looking at the normal dw_hdmi init sequence in upstream Linux plus the sequence that we did in downstream Chrome OS 3.14. Testing show that it seems to work, but if an extra step is needed or something here is not needed we could improve it. As part of this change we'll refactor the hardware init bits of dw-hdmi to happen all in one function and all at the same time. Since we need to init the interrupt mutes before we request the IRQ, this means moving the hardware init earlier in the function, but there should be no problems with that. Also as part of this we now unconditionally init the "i2c" parts of dw-hdmi, but again that ought to be fine. Signed-off-by: Douglas Anderson Reviewed-by: Laurent Pinchart Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190604204207.168085-1-dianders@chromium.org drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 48 +++++++++++++++++++------------ include/drm/bridge/dw_hdmi.h | 2 ++ 2 files changed, 31 insertions(+), 19 deletions(-) commit 8252562d5270c13e6123a5939d0db1bbf04327a1 Author: Dan Carpenter Date: Sat Jun 8 12:23:57 2019 +0300 drm/amdgpu: Fix bounds checking in amdgpu_ras_is_supported() The "block" variable can be set by the user through debugfs, so it can be quite large which leads to shift wrapping here. This means we report a "block" as supported when it's not, and that leads to array overflows later on. This bug is not really a security issue in real life, because debugfs is generally root only. Fixes: 36ea1bd2d084 ("drm/amdgpu: add debugfs ctrl node") Signed-off-by: Dan Carpenter Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h | 2 ++ 1 file changed, 2 insertions(+) commit 9c5ab937b15f87523dd057ba05b9869331283286 Author: Kent Russell Date: Tue Jun 11 08:33:49 2019 -0400 drm/amdgpu: Add CHIP_VEGAM to amdgpu_amdkfd_device_probe We have the rest of the support in the kerne, but we don't actually boot KFD on the device without this change Signed-off-by: Kent Russell Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 1 + 1 file changed, 1 insertion(+) commit 4a39ec6ac5f36ff6df7e1f603ea445bd858047fa Author: Trigger Huang Date: Tue Jun 11 18:32:14 2019 +0800 drm/amdgpu: fix pm_load_smu_firmware for SR-IOV For SR-IOV VF, powerplay may not be supported, in this case, error '-EINVAL' should not be returned. Signed-off-by: Trigger Huang Reviewed-by: Prike Liang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 3 +++ 1 file changed, 3 insertions(+) commit 233d87a579b8adcc6da5823fa507ecb6675e7562 Author: Samson Tam Date: Tue May 28 14:44:40 2019 -0400 drm/amd/display: set link->dongle_max_pix_clk to 0 on a disconnect [Why] Found issue in EDID Emulation where if we connect a display using a passive HDMI-DP dongle, disconnect it and then try to emulate a display using DP, we could not see 4K modes. This was because on a disconnect, dongle_max_pix_clk was still set so when we emulate using DP, in dc_link_validate_mode_timing(), it would think we were still using a dongle and limit the modes we support. [How] In dc_link_detect(), set dongle_max_pix_clk to 0 when we detect a hotplug out ( if new_connection_type = dc_connection_none ). Signed-off-by: Samson Tam Reviewed-by: Jun Lei Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 6 ++++++ 1 file changed, 6 insertions(+) commit a1651530a3bacf1d796fdb7bc587faef9f305d36 Author: Su Sung Chung Date: Thu May 30 14:59:03 2019 -0400 drm/amd/display: make clk_mgr call enable_pme_wa refactor a code so we will call clk_mgr's enable_pme_wa function so we can use pme_wa for future asics. This way we don't need to worry about different ASIC since clk_mgr already have that information Signed-off-by: Su Sung Chung Reviewed-by: Eric Yang Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher .../drm/amd/display/dc/clk_mgr/dcn10/rv1_clk_mgr.c | 14 ++++++++++++ .../amd/display/dc/dce110/dce110_hw_sequencer.c | 25 ++++++---------------- 2 files changed, 20 insertions(+), 19 deletions(-) commit 16b6253a083707734bf05b4377095e9c9f2102cc Author: abdoulaye berthe Date: Mon May 27 11:38:26 2019 -0400 drm/amd/display: Do not grant POST_LT_ADJ when TPS4 is used [Description] The spec does not allow POST_LT_ADJ_GRANTED to be set when TPS4 is used. Signed-off-by: abdoulaye berthe Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 56 +++++++++++++----------- 1 file changed, 31 insertions(+), 25 deletions(-) commit 3de5aa81c5065abd31bf981483c4c6caa97e8798 Author: SivapiriyanKumarasamy Date: Tue May 28 16:36:42 2019 -0400 drm/amd/display: S3 Resume time increase after decoupling DPMS from fast boot [Why] We incorrectly began powering down the display at boot/resume whenever fast boot was not possible. This should not be done in the case where there exists a stream for the eDP since this implies that we want to turn it on. [How] Add check for eDP stream to decide whether to power off edp. Signed-off-by: SivapiriyanKumarasamy Reviewed-by: Anthony Koo Acked-by: Bhawanpreet Lakha Acked-by: Reza Amini Signed-off-by: Alex Deucher .../amd/display/dc/dce110/dce110_hw_sequencer.c | 35 ++++++++++++++++------ 1 file changed, 26 insertions(+), 9 deletions(-) commit c08264876f4da8b0ee16ab1a070cb405186ef28a Author: Wesley Chalmers Date: Wed May 29 14:38:53 2019 -0400 drm/amd/display: Use stream opp_id instead of hubp [WHY] By the time output csc matrix is being programmed, stream connection to OPP has been established, but this information has not been relayed back to HUBP. Signed-off-by: Wesley Chalmers Reviewed-by: Anthony Koo Acked-by: Bhawanpreet Lakha Acked-by: Krunoslav Kovac Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 910954da2c0538598c8ac65deedeed52a112a5b7 Author: Harmanprit Tatla Date: Mon May 27 14:22:30 2019 -0400 drm/amd/display: Gamma logic limitations causing unintended use of RAM over ROM. [Why] Our existing logic in deciding whether to use RAM or ROM depends on whether we are dealing with an identity gamma ramp. [How] In addition to the is_identity flag a new is_logical_identity flag has been added. The is_identity flag now denotes whether the OS gamma is an RGB256 identity and the new logical identity will inidicate that the given gamma ramp regardless of its type is identity. Signed-off-by: Harmanprit Tatla Reviewed-by: Krunoslav Kovac Acked-by: Anthony Koo Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 4 ++++ drivers/gpu/drm/amd/display/modules/color/color_gamma.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) commit 9ed43ef84d9d1e668acdf43c95510fb7b11f8d71 Author: Thomas Lim Date: Mon Apr 29 16:05:42 2019 -0400 drm/amd/display: Add Underflow Asserts to dc [Why] For debugging underflow issues it can be useful to have asserts when the underflow initially occurs. [How] Read the underflow status registers after actions that have a high risk of causing underflow and assert that no underflow occurred. If underflow occurred, clear the bit. Signed-off-by: Thomas Lim Reviewed-by: Eric Yang Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 1 + .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 32 +++++++++++++++++++++- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.h | 2 ++ .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 4 ++- drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 1 + 5 files changed, 38 insertions(+), 2 deletions(-) commit 11cd74cdb98aa6f4d6f54a0082dd28e0d4743746 Author: Dmytro Laktyushkin Date: Wed May 22 18:05:41 2019 -0400 drm/amd/display: move vmid determination logic out of dc Currently vmid is decided internally inside dc. This makes it difficult to use vmid use with external components. This change moves vmid logic outside dc and allowing vmid to be passed in as a parameter to DC. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Charlene Liu Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/Makefile | 4 +- drivers/gpu/drm/amd/display/dc/core/dc_vm_helper.c | 123 --------------------- drivers/gpu/drm/amd/display/dc/dc.h | 1 + drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 2 + drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c | 3 +- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 3 +- drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h | 3 +- drivers/gpu/drm/amd/display/dc/inc/hw/vmid.h | 1 + drivers/gpu/drm/amd/display/dc/inc/vm_helper.h | 16 +-- 9 files changed, 13 insertions(+), 143 deletions(-) commit acbf7faaf925a5843d128dfbd30daaaab2de42f7 Author: Jordan Lazare Date: Mon May 27 12:07:19 2019 -0400 drm/amd/display: Remove superflous error message [Why] VBios sometimes reports incorrect object type as encoder instead of connector [How] Change error message to debug message Signed-off-by: Jordan Lazare Reviewed-by: Harry Wentland Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cca738e8735b8bfe0577427c120c61fdf30408ca Author: Chris Park Date: Fri May 24 16:40:30 2019 -0400 drm/amd/display: Clean up scdc_test_data struct These are no longer needed, Also added RESERVED bits. Signed-off-by: Chris Park Reviewed-by: Charlene Liu Acked-by: Bhawanpreet Lakha Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 1 - drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c | 14 ++++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) commit 70bcf2bc5203e358e5e2ac30718caea53204dfe9 Author: Aric Cyr Date: Mon May 27 11:27:11 2019 -0400 drm/amd/display: 3.2.35 Signed-off-by: Aric Cyr Reviewed-by: Aric Cyr Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7f9c24a0fc436e0745cd3eb9c9b4638b22d710c9 Author: Aric Cyr Date: Mon May 27 11:11:17 2019 -0400 drm/amd/display: 3.2.34 Signed-off-by: Aric Cyr Reviewed-by: Aric Cyr Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0d44494af174c316422c4d4897f8bcf654b44505 Author: Krunoslav Kovac Date: Mon May 27 10:57:24 2019 -0400 drm/amd/display: fix gamma logic breaking driver unload Using this logic breaks driver unload, this is a temporary fix a followup patch will properly fix this Signed-off-by: Krunoslav Kovac Reviewed-by: Aric Cyr Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/modules/color/color_gamma.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit abe882a39a9c8c7b95839451088268fcbf2b14fa Author: Anthony Koo Date: Wed May 22 21:17:38 2019 -0400 drm/amd/display: fix issue with eDP not detected on driver load [Why] HPD not going to be high if Panel VDD is off And all AUX transaction will fail :( [How] 1. Power on VDD before attempting detection if it isn't already on 2. Improve the robustness by having a retry mechanism on the first DPCD read after VDD on. If a particular board always holds HPD high incorrectly, the AUX access may fail, so we can retry in those scenarios. This change would only improve logic since it prevents AUX failure leading to bad resolution on internal panel. 3. We should never need to re-detect internal panel, so logic is re-arranged a bit to skip earlier. Signed-off-by: Anthony Koo Reviewed-by: Jun Lei Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 42 ++++++++++++++++++++------- 1 file changed, 32 insertions(+), 10 deletions(-) commit 7cd4b70091a5cfa1f58d3a529535304a116acc95 Author: Nicholas Kazlauskas Date: Thu May 9 12:14:58 2019 -0400 drm/amd/display: Rework CRTC color management [Why] To prepare for the upcoming DRM plane color management properties we need to correct a lot of wrong behavior and assumptions made for CRTC color management. The documentation added by this commit in amdgpu_dm_color explains how the HW color pipeline works and its limitations with the DRM interface. The current implementation does the following wrong: - Implicit sRGB DGM when no CRTC DGM is set - Implicit sRGB RGM when no CRTC RGM is set - No way to specify a non-linear DGM matrix that produces correct output - No way to specify a correct RGM when a linear DGM is used We had workarounds for passing kms_color tests but not all of the behavior we had wrong was covered by these tests (especially when it comes to non-linear DGM). Testing both DGM and RGM at the same time isn't something kms_color tests well either. [How] The specifics for how color management works in AMDGPU and the new behavior can be found by reading the documentation added to amdgpu_dm_color.c from this patch. All of the incorrect cases from the old implementation have been addressed for the atomic interface, but there still a few TODOs for the legacy one. Note: this does cause regressions for kms_color@pipe-a-ctm-* over HDMI. The result looks correct from visual inspection but the CRC no longer matches. For reference, the test was previously doing the following: linear degamma -> CTM -> sRGB regamma -> RGB to YUV (709) -> ... Now the test is doing: linear degamma -> CTM -> linear regamma -> RGB to YUV (709) -> ... Signed-off-by: Nicholas Kazlauskas Reviewed-by: Sun peng Li Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 32 +- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 10 +- .../drm/amd/display/amdgpu_dm/amdgpu_dm_color.c | 473 ++++++++++++++------- 3 files changed, 356 insertions(+), 159 deletions(-) commit 1760bd06c8e94e1b184139ae35201856403638cf Author: Wesley Chalmers Date: Thu May 23 11:54:12 2019 -0400 drm/amd/display: Use macro for invalid OPP ID [WHY] This is meant to make it clearer that 0xf is not a valid OPP ID, and that code making use of OPP IDs should not accept this value. Signed-off-by: Wesley Chalmers Reviewed-by: Charlene Liu Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c | 4 ++-- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 4 ++-- drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) commit c7c7192c56d20a56b843f62506d212fe3fe518b0 Author: Charlene Liu Date: Thu May 23 15:27:43 2019 -0400 drm/amd/display: add audio related regs Signed-off-by: Charlene Liu Reviewed-by: Chris Park Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_audio.c | 4 +--- drivers/gpu/drm/amd/display/dc/dce/dce_audio.h | 7 +++++++ 2 files changed, 8 insertions(+), 3 deletions(-) commit f09220041851d585a26063ff13a0cd1d2afc0629 Author: Derek Lai Date: Wed May 22 14:49:23 2019 +0800 drm/amd/display: add i2c_hw_Status check to make sure as HW I2c in use 1. Add i2c_hw_Status check to make sure when HW i2c is in use. 2. Don't reset HW engine in is_hw_busy() and instead do this in process_transaction() because SW i2c does not check if hw i2c is in use Signed-off-by: Derek Lai Reviewed-by: Charlene Liu Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_i2c_hw.c | 65 +++++++++++++++---------- drivers/gpu/drm/amd/display/dc/dce/dce_i2c_hw.h | 5 ++ 2 files changed, 43 insertions(+), 27 deletions(-) commit 0bfb01ce90c69825ddd8d84d77df11d47d263fd3 Author: Eric Bernstein Date: Mon Jun 3 10:55:41 2019 -0400 drm/amd/display: Dont aser if DP_DPHY_INTERNAL_CTRL No need to assert just return Signed-off-by: Eric Bernstein Reviewed-by: Charlene Liu Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_link_encoder.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 620ab8aa248f6f18f2bdb3d40746cfc141290dd8 Author: Aric Cyr Date: Fri May 17 18:40:19 2019 -0400 drm/amd/display: 3.2.33 Signed-off-by: Aric Cyr Reviewed-by: Aric Cyr Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 327e4f12104e01b2ebd995178d09438ec6c86858 Author: Charlene Liu Date: Thu May 16 22:52:46 2019 -0400 drm/amd/display: add some math functions for dcn_calc_math Implement floor, ceil, and fabs Signed-off-by: Charlene Liu Reviewed-by: Charlene Liu Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calc_math.c | 20 ++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/calcs/dcn_calc_math.h | 3 +++ drivers/gpu/drm/amd/display/dc/dml/dml_inline_defs.h | 8 ++++++++ 3 files changed, 31 insertions(+) commit 6e5155ae6b66054db35d8f3c64f9863b9d0466c1 Author: Nicholas Kazlauskas Date: Tue May 14 09:19:01 2019 -0400 drm/amd/display: Copy stream updates onto streams [Why] Almost every function in DC that works with stream state expects that the current state on the stream is the one that it should be writing out. These functions are typically triggered by specifying a particular stream update - but the actual contents of the stream update itself are ignored, leaving it to the DM to actually update the stream state itself. The problem with doing this in DM is a matter of timing. On Linux most of this is incorrectly done in atomic check, when we actually want it to be done during atomic commit tail while access to DC is locked. To give an example, a commit requesting to modify color management state for DM could come in, be rejected, but still have modified the actual system state for the stream since it's shared memory. The next time color management gets programmed it'll use the rejected color management info - which might not even still be around if it's a custom transfer function. So a reasonable place to perform this is within DC itself and this is the model that's currently in use for surface updates. DC can even compare the current system state to the incoming surface update to determine update level, something that can't currnetly be done with the framework for stream updates. [How] Duplicate the framework used for surface updates for stream updates as well. Copy all the updates after checking the update type. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Harry Wentland Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 69 ++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) commit 53c81fc7875bc2dca358485dac3999e14ec91a00 Author: Wesley Chalmers Date: Thu May 16 12:40:25 2019 -0400 drm/amd/display: Update link rate from DPCD 10 [WHY] Some panels return a link rate of 0 (unknown) in DPCD 0. In this case, an appropriate mode cannot be set, and certain panels will show corruption as they are forced to use a mode they do not support. [HOW] Read DPCD 10 in the case where supported link rate from DPCD 0 is unknown, and pass that value on to the reported link rate. This re-introduces behaviour present in previous versions that appears to have been accidentally removed. Signed-off-by: Wesley Chalmers Reviewed-by: Anthony Koo Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 540c122924bd260c5124534d16bd75c0b62f5856 Author: Tao.Huang Date: Mon May 6 16:26:54 2019 +0800 drm/amd/display: fix resource saving missing when power state switch Signed-off-by: Tao.Huang Reviewed-by: Jun Lei Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit c3e50f89006cca9c422c9b3cf83c6dd84bc91f52 Author: Nicholas Kazlauskas Date: Thu Jun 6 08:53:12 2019 -0400 drm/amd/display: Set default ABM level to module parameter [Why] The module parameter to specify the default ABM level is now defined, so hook it up in DM. [How] On connector reset specify the default level. DC will program this as part of the modeset since it gets passed onto the stream in dm_update_crtc_state. It's only set for eDP connectors, but it doesn't matter if this is specified for connectors or hardware that doesn't support ABM. It's DC's responsibility to check that ABM can be set or adjusted, and DC does check that the DMCU firmware is running and if there's backlight control available. Signed-off-by: Nicholas Kazlauskas Reviewed-by: David Francis Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +++ 1 file changed, 3 insertions(+) commit ad4de27f48f0b2411f4a703db557a8d8c91b3a50 Author: Nicholas Kazlauskas Date: Thu Jun 6 08:44:37 2019 -0400 drm/amdgpu: Add module parameter for specifying default ABM level [Why] It's non trivial to configure or specify an ABM reduction level for userspace outside of X. There is also no method to specify the default ABM value at boot time. A parameter should be added to configure this. [How] Expose a module parameter that can specify the default ABM level to use for eDP connectors on DC enabled hardware that loads the DMCU firmware. The default is still disabled (0), but levels can range from 1-4. Levels control how much the backlight can be reduced, with being the least amount of reduction and four being the most reduction. Signed-off-by: Nicholas Kazlauskas Reviewed-by: David Francis Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) commit ae1589f669b5e2c557a6edc9599fc1f424003b70 Author: Monk Liu Date: Fri Jun 7 18:56:18 2019 +0800 drm/amdgpu: drop the incorrect soft_reset for SRIOV It's incorrect to do soft reset for SRIOV, when GFX hang the WREG would stuck there becuase it goes KIQ way. the GPU reset counter is incorrect: always increase twice for each timedout Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit df0a8064be4f5903daed43328f35a2325a9b4086 Author: James Zhu Date: Fri Jun 7 12:19:05 2019 -0400 drm/amdgpu: Add GDS clearing workaround in later init for gfx9 Since Hardware bug, GDS exist ECC error after cold boot up, adding GDS clearing workaround in later init for gfx9. Signed-off-by: James Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 49 +++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) commit 37fb6e8a96fbc9c809c58f9490267ffe7101ac33 Author: Nicholas Kazlauskas Date: Fri Jun 7 11:16:55 2019 -0400 drm/amd/display: Enable fast plane updates when state->allow_modeset = true [Why] Whenever the a modeset is allowed (but not neccessarily required) we currently recreate all the planes in the state. Most IGT tests and legacy IOCTLs create atomic commits with this flag set, so the pipes are often unnecessarily reprogrammed. Poor performance and stuttering can occur when many of these commits are frequently issued. This flag was needed when the appropriate conditions for checking whether the planes needed a reset were not in place, but should_reset_plane should cover everything needed now. [How] Drop the check for state->allow_modeset in should_reset_plane. All planes on a CRTC should reset in the following conditions: - The CRTC needs a modeset - The CRTC degamma changes - Planes are added or removed to the CRTC These conditions are all covered in should_reset_plane. We still can't drop the format change check in should_reset_plane since fill_dc_plane_info_and_addr isn't called when validating the state, so we can't tell if a FULL update is needed or not. Signed-off-by: Nicholas Kazlauskas Reviewed-by: David Francis Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 8 -------- 1 file changed, 8 deletions(-) commit 01933ba42d3d9fd0917573a752b81267ec231849 Author: Nicholas Kazlauskas Date: Wed Jun 5 12:33:59 2019 -0400 drm/amd/display: Use current connector state if NULL when checking bpc [Why] The old logic for checking which output depth to use relied on using the current connector state rather than the new proposed state. This was a problem when performing atomic commits since we weren't verifying it against the incoming max_requested_bpc. But switching this to only use the new state and not the current state breaks filtering modes - it'll always assume that the maximum bpc supported by the display is in use, which will cause certain modes like 1440p@144Hz to be filtered even when using 8bpc. [How] Still use the connector->state if we aren't passed an explicit state. This will respect the max_bpc the user currently has when filtering modes. Also remember to reset the default max_requested_bpc to 8 whenever connector reset is called to retain old behavior when using the new property. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110845 Signed-off-by: Nicholas Kazlauskas Acked-by: Alex Deucher Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++++ 1 file changed, 4 insertions(+) commit b4559a16467a13a12a660f31edec1801e2a5b16b Author: Tom St Denis Date: Tue Jun 4 09:36:57 2019 -0400 drm/amd/amdgpu: remove vram_page_split kernel option (v3) This option is no longer needed. The default code paths are now the only option. v2: Add HPAGE support and a default for non contiguous maps v3: Misread 512 pages as MiB ... Signed-off-by: Tom St Denis Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 ------- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 8 -------- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 14 +++++++++----- 4 files changed, 9 insertions(+), 21 deletions(-) commit f04bee34d6e35df26cbb2d65e801adfd0d8fe20d Author: Nicholas Kazlauskas Date: Tue Jun 4 15:21:14 2019 -0400 drm/amd/display: Always allocate initial connector state state [Why] Unlike our regular connectors, MST connectors don't start off with an initial connector state. This causes a NULL pointer dereference to occur when attaching the bpc property since it tries to modify the connector state. We need an initial connector state on the connector to avoid the crash. [How] Use our reset helper to allocate an initial state and reset the values to their defaults. We were already doing this before, just not for MST connectors. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 4b7ef85cc65e7ae137c43a0269365289f1b5ee68 Author: Nicholas Kazlauskas Date: Mon Jun 3 13:44:37 2019 -0400 drm/amd/display: Add connector debugfs for "output_bpc" [Why] This will be useful for verifying whether we enter the correct output color depth from IGT. [How] Locks the connector and associated CRTC if available and outputs the current and maximum output bpc values. Example: cat /sys/kernel/debug/dri/0/DP-1/output_bpc Current: 8 Maximum: 10 v2: Drop unneeded connector status check Signed-off-by: Nicholas Kazlauskas Reviewed-by: David Francis Signed-off-by: Alex Deucher .../drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 71 +++++++++++++++++++++- 1 file changed, 69 insertions(+), 2 deletions(-) commit 80f41f84ae2c99ff2fd88163f2293f86c3c68af1 Author: Prike Liang Date: Mon May 27 16:05:50 2019 +0800 drm/amd/amdgpu: add RLC firmware to support raven1 refresh Use SMU firmware version to indentify the raven1 refresh device and then load homologous RLC FW. Signed-off-by: Prike Liang Suggested-by: Huang Rui Reviewed-by: Huang Rui Reviewed-by: Evan Quan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 12 +++--------- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 15 +++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_pm.h | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 12 +++++++++++- 4 files changed, 30 insertions(+), 10 deletions(-) commit efa0bf86a59cbe920b8c75074aa1a38535d6e05d Author: Chengming Gui Date: Mon May 13 17:41:19 2019 +0800 drm/amd/powerplay: add set_power_profile_mode for raven1_refresh add gfxoff_state_changed_by_workload to control gfxoff when set power_profile_mode Signed-off-by: Chengming Gui Reviewed-by: Huang Rui Reviewed-by: Evan Quan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 1 + drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c | 31 ++++++++++++++++++++--- drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 1 + 3 files changed, 30 insertions(+), 3 deletions(-) commit e0301317acfed896c3bcbcbdf33f67f55c9d602b Author: Trigger Huang Date: Mon Jun 3 16:48:17 2019 +0800 drm/amdgpu: Hardcode reg access using L1 security Under Vega10 SR-IOV VF, L1 register access mode should be enabled by default as the non-security VF will no longer be supported. Signed-off-by: Trigger Huang Reviewed-by: Emily Deng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit e038b9016aa88a9e1429f1b016644c509b8e58a6 Author: Shirish S Date: Tue Jun 4 21:25:03 2019 +0530 drm/amdgpu/{uvd,vcn}: fetch ring's read_ptr after alloc [What] readptr read always returns zero, since most likely these blocks are either power or clock gated. [How] fetch rptr after amdgpu_ring_alloc() which informs the power management code that the block is about to be used and hence the gating is turned off. Signed-off-by: Louis Li Signed-off-by: Shirish S Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 4 +++- drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 5 ++++- drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 5 ++++- 3 files changed, 11 insertions(+), 3 deletions(-) commit 91c9c23e430852d4c927202e0a767bcdb688ef44 Author: Louis Li Date: Sat May 25 06:39:47 2019 +0800 drm/amdgpu: fix ring test failure issue during s3 in vce 3.0 (V2) [What] vce ring test fails consistently during resume in s3 cycle, due to mismatch read & write pointers. On debug/analysis its found that rptr to be compared is not being correctly updated/read, which leads to this failure. Below is the failure signature: [drm:amdgpu_vce_ring_test_ring] *ERROR* amdgpu: ring 12 test failed [drm:amdgpu_device_ip_resume_phase2] *ERROR* resume of IP block failed -110 [drm:amdgpu_device_resume] *ERROR* amdgpu_device_ip_resume failed (-110). [How] fetch rptr appropriately, meaning move its read location further down in the code flow. With this patch applied the s3 failure is no more seen for >5k s3 cycles, which otherwise is pretty consistent. V2: remove reduntant fetch of rptr Signed-off-by: Louis Li Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 77866d54167766371f408b9046c343229bc32304 Author: Jay Cornwall Date: Tue Jun 19 10:17:30 2018 -0500 drm/amdkfd: Implement queue priority controls for gfx9 Ported from gfx8, no changes in register setup. Signed-off-by: Jay Cornwall Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 0ccbc7cdf54d855f48a023464c207e9d5ca2b6f1 Author: Oak Zeng Date: Tue Feb 7 15:40:14 2017 -0600 drm/amdkfd: CP queue priority controls Translate queue priority into pipe priority and write to MQDs. The priority values are used to perform queue and pipe arbitration. Signed-off-by: Oak Zeng Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.c | 20 ++++++++++++++++++++ drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.h | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c | 12 +++++++++--- drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c | 12 +++++++++--- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 11 +++++++++++ 5 files changed, 50 insertions(+), 7 deletions(-) commit c7e68a697c7cd7fd25ee536d02a8dcf81a2e7d1c Author: Guennadi Liakhovetski Date: Tue Jun 11 19:09:07 2019 +0200 ALSA: hda: fix a mask for unsolicited event tags Response tag only occupies 6 bits, not 7. This bug is harmless, since the value has just been shifted to the right by 26 bits, so this is only a cosmetic fix. Signed-off-by: Guennadi Liakhovetski Signed-off-by: Takashi Iwai sound/pci/hda/hda_jack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bb2d2128a54c48355249b56cbc898a89e76ba7a1 Author: Felix Kuehling Date: Wed May 1 18:20:13 2019 -0400 drm/amdkfd: Simplify eviction state logic Always mark evicted queues with q->properties.is_evicted = true, even queues that are inactive for other reason. This simplifies maintaining the eviction state as it doesn't require updating is_evicted when other queue activation conditions change. On the other hand, we now need to check those other queue activation conditions whenever an evicted queues is restored. To minimize code duplication, move the queue activation check into a macro so it can be maintained in one central place. Signed-off-by: Felix Kuehling Reviewed-by: Philip Cox Acked-by: Alex Deucher Signed-off-by: Alex Deucher .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 84 +++++++++++----------- drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c | 15 +--- drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c | 10 +-- drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c | 10 +-- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 5 ++ 5 files changed, 56 insertions(+), 68 deletions(-) commit 052af915d826b33588749566145c9417fcfc7246 Author: James Zhu Date: Tue Jun 4 12:49:02 2019 -0400 drm/amdgpu: Fixed missing to clear some EDC count EDC counts are related to instance and se. They are not the same for different type of EDC. EDC clearing are changed to base on individual EDC's instance and SE number. Signed-off-by: James Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 85 +++++++++++++++++------------------ drivers/gpu/drm/amd/amdgpu/soc15.h | 2 + 2 files changed, 42 insertions(+), 45 deletions(-) commit 59648d6954cd3539f9b7e599b14d8b0cdcf41279 Author: Nicholas Kazlauskas Date: Fri May 31 12:05:26 2019 -0400 drm/amd/display: Add back missing hw translate init for DCN1_01 [Why] DCN_VERSION_1_01 is no longer handled in the dal_hw_translate_init switch since it was inadvertently dropped in the patch that removed the unnecessary DCN1_01 guards. This caused numerous regressions on DCN1_01 when loading the driver. [How] Add it back. Fixes: 97df424fe7a7 ("drm/amd/display: Drop DCN1_01 guards") Signed-off-by: Nicholas Kazlauskas Acked-by: Alex Deucher Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/gpio/hw_translate.c | 1 + 1 file changed, 1 insertion(+) commit 7e93094945016492f6cb3660b2960d4b027eab51 Author: Nicholas Kazlauskas Date: Tue Jun 11 11:54:05 2019 -0500 drm/amd/display: Don't set mode_changed=false if the stream was removed [Why] When switching from vt to desktop with EDID emulation we can receive an atomic commit such that we have a crtc where mode_changed = true. During the dm_update_crtc_state disable pass we remove the stream from the context and free it on the dm_new_crtc_state. During the enable pass we compare the new provisional stream to the dm_old_crtc_state->stream and determine that the stream is unchanged and no scaling has been changed. Following this, new_crtc_state->mode_changed is then set to false. The connectors haven't changed and the CRTC active state hasn't changed so drm_atomic_crtc_needs_modeset returns false, so we jump to skip_modeset and we hit: BUG_ON(dm_new_crtc_state->stream == NULL); ...since the old stream is gone from the context and the new stream is also still NULL. [How] Ensure that we still a stream to reuse before checking if we can reuse the old stream without a full modeset. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 55c2e5a1600cfa9bb7afb445318d6ba1730251a5 Author: Christian König Date: Fri May 10 16:09:48 2019 +0200 drm/amdgpu: stop removing BOs from the LRU v3 This avoids OOM situations when we have lots of threads submitting at the same time. v3: apply this to the whole driver, not just CS Signed-off-by: Christian König Reviewed-by: Chunming Zhou Tested-by: Pierre-Eric Pelloux-Prayer Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) commit 94de7349f78d1c598c852eef07c9f3097bad84f9 Author: Christian König Date: Thu May 16 10:25:35 2019 +0200 drm/amdgpu: create GDS, GWS and OA in system domain And only move them in on validation. This allows for better control when multiple processes are fighting over those resources. Signed-off-by: Christian König Reviewed-by: Chunming Zhou Tested-by: Pierre-Eric Pelloux-Prayer Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit a3e7738d577162557e03176aed1594746fc2388e Author: Christian König Date: Fri May 17 09:31:44 2019 +0200 drm/amdgpu: drop some validation failure messages The messages about amdgpu_cs_list_validate are duplicated because the caller will complain into the logs as well and we can also get interrupted by a signal here. Also fix the the caller to not report -EAGAIN from validation. Signed-off-by: Christian König Reviewed-by: Chunming Zhou Tested-by: Pierre-Eric Pelloux-Prayer Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 5a6bfe0960c4352aedfa14a948795d8a55fdd9bb Author: Hawking Zhang Date: Fri May 31 22:53:38 2019 +0800 drm/amdgpu/psp: udpate ta_ras interface header ras ta interface header need to be updated to match with latest ta fw updates Signed-off-by: Hawking Zhang Reviewed-by: James Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/ta_ras_if.h | 108 ++++++++++++++++++--------------- 1 file changed, 59 insertions(+), 49 deletions(-) commit 0b40deeef6d94ac21f4cdee4b1cda94a69c54ff9 Author: Russell King Date: Sat May 4 13:35:12 2019 +0100 ARM: riscpc: enable chained scatterlist support There's no reason why we can't enable chained scatterlist for RiscPC, we already support chained scatterlists in the IOMD DMA support code. Signed-off-by: Russell King arch/arm/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 05002cf1779ace3b0e1ed6a8cd6c67876fd47d9d Author: Russell King Date: Tue May 21 16:30:38 2019 +0100 ARM: riscpc: reduce IRQ handling code Reduce the amount of IRQ handling code that RiscPC requires; there's no need for this duplication if we place the virtual iomem base address for each bank directly in the irq_data structure. Provide helpers to get the base address, and setup the base address and register mask. Signed-off-by: Russell King arch/arm/mach-rpc/irq.c | 133 +++++++++++++++++------------------------------- 1 file changed, 47 insertions(+), 86 deletions(-) commit 12290cc462c24deee503e84e87dea622b40ea15d Author: Russell King Date: Tue May 21 15:31:42 2019 +0100 ARM: riscpc: move RiscPC assembly files from arch/arm/lib to mach-rpc Move the assembly files for RiscPC from arch/arm/lib to mach-rpc so that we contain RiscPC bits in one subdirectory. Signed-off-by: Russell King MAINTAINERS | 2 +- arch/arm/lib/Makefile | 1 - arch/arm/mach-rpc/Makefile | 3 ++- arch/arm/{lib/ecard.S => mach-rpc/ecard-loader.S} | 0 arch/arm/{lib => mach-rpc}/floppydma.S | 0 arch/arm/{lib => mach-rpc}/io-acorn.S | 0 6 files changed, 3 insertions(+), 3 deletions(-) commit e579201a832cb796a474ef743d131eff2730cfa7 Author: Russell King Date: Sat Apr 27 23:06:03 2019 +0100 ARM: riscpc: parse video information from tagged list Correctly parse the video information from the tagged list, so that we end up with the right bytes-per-char values. When booting with a tagged list rather than a param block, this allows the decompressor to display its messages during boot on the screen. (Boot loaders normally pass a param block on this platform, but the latest boot loader version recently released does not.) Signed-off-by: Russell King arch/arm/mach-rpc/include/mach/uncompress.h | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) commit 1eac59d731ca7ead31f57ea2b8c82e0ba117f6cf Author: Russell King Date: Wed May 1 12:10:42 2019 +0100 ARM: riscpc: add ecard quirk for Atomwide 3port serial card Atomwide 3port serial cards seem to leave their interrupts active when exiting RISC OS, resulting in an interrupt storm during boot, and the expansion card interrupt being disabled. Avoid this by manually disabling the interrupt on each serial port via a custom quirk function. Signed-off-by: Russell King arch/arm/mach-rpc/ecard.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) commit 4e8c120de9268fc26f583268b9d22e7d37c4595f Author: Kieran Bingham Date: Wed May 15 11:39:12 2019 -0400 media: fdp1: Support M3N and E3 platforms New Gen3 R-Car platforms incorporate the FDP1 with an updated version register. No code change is required to support these targets, but they will currently report an error stating that the device can not be identified. Update the driver to match against the new device types. Signed-off-by: Kieran Bingham Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar_fdp1.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit a8a3e813963c291de39206191a845cbe4b8fc4c7 Author: Wolfram Sang Date: Sat Jun 8 06:55:48 2019 -0400 media: i2c: mt9p031: simplify getting the adapter of a client We have a dedicated pointer for that, so use it. Much easier to read and less computation involved. Signed-off-by: Wolfram Sang Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/mt9p031.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 11a087f484bf15ff65f0a9f277aa5a61fd07ed2a Author: Oliver Neukum Date: Tue Apr 30 08:28:14 2019 -0400 media: uvcvideo: Fix access to uninitialized fields on probe error We need to check whether this work we are canceling actually is initialized. Signed-off-by: Oliver Neukum Reported-by: syzbot+2e1ef9188251d9cc7944@syzkaller.appspotmail.com Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/uvc/uvc_ctrl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 675e2f20b1139633876cdc8f621065fcbd582be9 Author: Torleiv Sundre Date: Sun Apr 28 01:21:13 2019 -0400 media: uvcvideo: Include streaming interface number in debugfs dir name uvcvideo creates a debugfs directory based on the device bus number and device number. If a device contains more than one uvc function, the creation of the second and following debugfs directories will fail and print an info message like this: "uvcvideo: Unable to create debugfs 3-2 directory." This patch includes the uvc streaming interface number in the debugfs directory name, to make sure it is unique. The directory name format is changed from "-" to "--" Signed-off-by: Torleiv Sundre Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/uvc/uvc_debugfs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 5800571960234f9d1f1011bf135799b2014d4268 Merge: d17589afa970 d1fdb6d8f6a4 Author: Mauro Carvalho Chehab Date: Tue Jun 11 12:09:28 2019 -0400 Merge tag 'v5.2-rc4' into media/master There are some conflicts due to SPDX changes. We also have more patches being merged via media tree touching them. So, let's merge back from upstream and address those. Linux 5.2-rc4 * tag 'v5.2-rc4': (767 commits) Linux 5.2-rc4 MAINTAINERS: Karthikeyan Ramasubramanian is MIA i2c: xiic: Add max_read_len quirk lockref: Limit number of cmpxchg loop retries uaccess: add noop untagged_addr definition x86/insn-eval: Fix use-after-free access to LDT entry kbuild: use more portable 'command -v' for cc-cross-prefix s390/unwind: correct stack switching during unwind block, bfq: add weight symlink to the bfq.weight cgroup parameter cgroup: let a symlink too be created with a cftype file drm/nouveau/secboot/gp10[2467]: support newer FW to fix SEC2 failures on some boards drm/nouveau/secboot: enable loading of versioned LS PMU/SEC2 ACR msgqueue FW drm/nouveau/secboot: split out FW version-specific LS function pointers drm/nouveau/secboot: pass max supported FW version to LS load funcs drm/nouveau/core: support versioned firmware loading drm/nouveau/core: pass subdev into nvkm_firmware_get, rather than device block: free sched's request pool in blk_cleanup_queue pktgen: do not sleep with the thread lock held. net: mvpp2: Use strscpy to handle stat strings net: rds: fix memory leak in rds_ib_flush_mr_pool ... Signed-off-by: Mauro Carvalho Chehab commit ecf79e7ca1565e4d36482aa4d2950bc397313425 Author: Daniel Vetter Date: Tue Jun 11 13:28:59 2019 +0200 drm/fb: document dirty helper better Apparently little known fact that there's no need to hand-roll your own anymore. Cc'ing a bunch of driver people who might want to know this too. v2: s/none/known/ (Chris Wilson) Cc: Rob Clark Cc: Sebastian Reichel Cc: Tomi Valkeinen Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: Gerd Hoffmann Cc: David Lechner Cc: Noralf Trønnes Cc: Hans de Goede Reviewed-by: Noralf Trønnes Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190611112859.16375-1-daniel.vetter@ffwll.ch include/drm/drm_framebuffer.h | 3 +++ 1 file changed, 3 insertions(+) commit d17589afa97061440c0a161775672a8a7bfa9d12 Author: Hans Verkuil Date: Mon Mar 25 07:27:45 2019 -0400 media: vicodec: improve handling of ENC_CMD_STOP/START Correctly handle stopping and restarting the encoder, keeping track of the stop and drain states. In addition it adds correct handling of corner cases, allowing v4l2-compliance to pass. Unfortunately, the code is getting to be quite complicated, so we need to work on better codec support in v4l2-mem2mem.c to simplify drivers. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vicodec/vicodec-core.c | 150 +++++++++++++++++++++----- 1 file changed, 122 insertions(+), 28 deletions(-) commit 3b6813d6f52d18674e5bbfcf7ff4bcec15569144 Author: Hans Verkuil Date: Thu Jun 6 06:00:30 2019 -0400 media: vicodec: stateless codecs do not have EOS and SOURCE_CHANGE events Return an error when attempting to subscribe to those events for a stateless codec. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vicodec/vicodec-core.c | 2 ++ 1 file changed, 2 insertions(+) commit 8307f0ab0331ad8b8bb8af85df372e6bfda688e7 Author: Hans Verkuil Date: Tue May 7 05:30:24 2019 -0400 media: vicodec: use correct sizeimage value when draining After a resolution change is detected, q_data->sizeimage is updated to the new format, but buf_prepare is still draining buffers that need to use the old pre-resolution-change value. So store the sizeimage value in q_data->vb2_sizeimage in queue_setup and use that in buf_prepare. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vicodec/vicodec-core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit fbbbb2cd0b39acba0720354d4beb98f39b69a29f Author: Hans Verkuil Date: Sat Mar 30 10:11:38 2019 -0400 media: vicodec: set KEY/PFRAME flag when decoding Set V4L2_BUF_FLAG_P/KEYFRAME after decoding a frame. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vicodec/vicodec-core.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 358387d34bea5965f8330ebb71df649af587bf5f Author: Hans Verkuil Date: Wed Mar 20 07:31:39 2019 -0400 media: vicodec: add V4L2_CID_MIN_BUFFERS_FOR_OUTPUT The stateful encoder requires the presence of this control. Since a single buffer is sufficient for vicodec, we just set this control to 1. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vicodec/vicodec-core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit efec9c815e5da15fe671fe7b3a0ea5575067b4b5 Author: Hans Verkuil Date: Fri Mar 15 11:04:24 2019 -0400 media: vicodec: pass on enc output format to capture side Setting the encoder output format to e.g. 1920x1080 will set the crop rectangle to 1920x1088, the coded resolution to 1920x1088 and the capture coded resolution and sizeimage to 1920x1088 as well. Note that this might change, since the encoder spec is still in flux with respect to how this should behave. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vicodec/vicodec-core.c | 53 ++++++++++++++++++++++----- 1 file changed, 43 insertions(+), 10 deletions(-) commit 518f6b9a145a6994ce3838d8a917abd71ad98b70 Author: Hans Verkuil Date: Thu Jun 6 05:23:42 2019 -0400 media: vicodec: fix initial stateless sizeimage value The initial sizeimage value was wrong for the stateless decoder. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vicodec/vicodec-core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d421ba0c165f711a80f0ec29af4b2cff17f3a1c3 Author: Hans Verkuil Date: Wed Mar 13 10:48:15 2019 -0400 media: vicodec: always return a valid format. Rather than returning width/height values of 0, just default to a format. Formats in V4L2 are always supposed to be valid, there is no concept of an invalid format. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vicodec/vicodec-core.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) commit e5bc0e1ddd1cd3328297f255e215b3ca55f4fbc8 Author: Hans Verkuil Date: Sat Mar 30 10:27:36 2019 -0400 media: vicodec: move v4l2_ctrl_request_complete after spin_unlock v4l2_ctrl_request_complete can sleep, so can't be called while a spinlock is held. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vicodec/vicodec-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 22670e77724d9141267c2db8f557b43575220bf7 Author: Maxime Jourdan Date: Thu Jun 6 12:05:12 2019 -0400 media: MAINTAINERS: Add meson video decoder Add an entry for the meson video decoder for amlogic SoCs. Signed-off-by: Maxime Jourdan Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) commit 3e7f51bd96077acad6acd7b45668f65b44233c4e Author: Maxime Jourdan Date: Thu Jun 6 12:05:11 2019 -0400 media: meson: add v4l2 m2m video decoder driver Amlogic SoCs feature a powerful video decoder unit able to decode many formats, with a performance of usually up to 4k60. This is a driver for this IP that is based around the v4l2 m2m framework. It features decoding for: - MPEG 1 - MPEG 2 Supported SoCs are: GXBB (S905), GXL (S905X/W/D), GXM (S912) There is also a hardware bitstream parser (ESPARSER) that is handled here. Signed-off-by: Maxime Jourdan Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/Kconfig | 2 + drivers/staging/media/Makefile | 1 + drivers/staging/media/meson/vdec/Kconfig | 11 + drivers/staging/media/meson/vdec/Makefile | 8 + drivers/staging/media/meson/vdec/TODO | 8 + drivers/staging/media/meson/vdec/codec_mpeg12.c | 210 +++++ drivers/staging/media/meson/vdec/codec_mpeg12.h | 14 + drivers/staging/media/meson/vdec/dos_regs.h | 98 ++ drivers/staging/media/meson/vdec/esparser.c | 324 +++++++ drivers/staging/media/meson/vdec/esparser.h | 32 + drivers/staging/media/meson/vdec/vdec.c | 1098 ++++++++++++++++++++++ drivers/staging/media/meson/vdec/vdec.h | 267 ++++++ drivers/staging/media/meson/vdec/vdec_1.c | 230 +++++ drivers/staging/media/meson/vdec/vdec_1.h | 14 + drivers/staging/media/meson/vdec/vdec_helpers.c | 449 +++++++++ drivers/staging/media/meson/vdec/vdec_helpers.h | 83 ++ drivers/staging/media/meson/vdec/vdec_platform.c | 101 ++ drivers/staging/media/meson/vdec/vdec_platform.h | 30 + 18 files changed, 2980 insertions(+) commit a1ccca0e84243c8aa39f4700cecc200b36c6b50f Author: Maxime Jourdan Date: Thu Jun 6 12:05:10 2019 -0400 media: dt-bindings: media: add Amlogic Video Decoder Bindings Add documentation for the meson vdec dts node. Signed-off-by: Maxime Jourdan Reviewed-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../devicetree/bindings/media/amlogic,vdec.txt | 71 ++++++++++++++++++++++ 1 file changed, 71 insertions(+) commit 73c699ffe53868d9fc1bd50445ad2c5041f379e3 Author: Maxime Ripard Date: Sat May 25 15:41:38 2019 +0200 dt-bindings: vendor: Add a bunch of vendors Add all the missing vendors used in Allwinner DTS. Signed-off-by: Maxime Ripard Signed-off-by: Rob Herring .../devicetree/bindings/vendor-prefixes.yaml | 58 ++++++++++++++++++++++ 1 file changed, 58 insertions(+) commit 4dbf4f44cf8363603cb7e205620aec7255d3508c Author: Takashi Sakamoto Date: Tue Jun 11 22:21:18 2019 +0900 ALSA: dice: code refactoring for pcm.hw_params/hw_free callbacks The pairs of pcm.hw_params callbacks and .hw_free callbacks for both direction have no differences. This commit unifies the pairs. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/dice/dice-pcm.c | 54 ++++++------------------------------------ 1 file changed, 7 insertions(+), 47 deletions(-) commit d5553026b53a246861d00221a6beb3674a30df03 Author: Takashi Sakamoto Date: Tue Jun 11 22:21:17 2019 +0900 ALSA: dice: update isochronous resources when starting packet streaming after bus-reset After bus reset, isochronous resource manager releases all of allocated isochronous resources. The nodes to transfer isochronous packet should request reallocation of the resources. However, between the bus-reset and invocation of 'struct fw_driver.update' handler, ALSA PCM application can detect this situation by XRUN because the target device cancelled to transmit packets once bus-reset occurs. Due to the above mechanism, ALSA fireface driver just stops packet streaming in the update handler, thus pcm.prepare handler should request the reallocation. This commit requests the reallocation in pcm.prepare callback when bus generation is changed. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/dice/dice-stream.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 3cd2c2d780a23e8b847c9ec22e8bc9dd6e685cbe Author: Takashi Sakamoto Date: Tue Jun 11 22:21:16 2019 +0900 ALSA: dice: reserve/release isochronous resources in pcm.hw_params/hw_free callbacks Once allocated, isochronous resources are available for packet streaming, even if the streaming is cancelled. For this reason, current implementation handles allocation of the resources and starting packet streaming at the same time. However, this brings complicated procedure to start packet streaming. This commit separates the allocation and starting. The allocation is done in pcm.hw_params callback and available till pcm.hw_free callback. Even if any XRUN occurs, pcm.prepare callback is done to restart packet streaming without releasing/allocating the resources. There are two points to stop packet streaming; in pcm.hw_params and pcm.prepare callbacks. The former point is a case that packet streaming is already started for any MIDI substream then packet streaming is requested with different sampling transfer frequency for any PCM substream. The latter point is cases of any XRUN or packet queueing error. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/dice/dice-midi.c | 10 +- sound/firewire/dice/dice-pcm.c | 26 +++-- sound/firewire/dice/dice-stream.c | 218 ++++++++++++++++++++------------------ sound/firewire/dice/dice.h | 4 +- 4 files changed, 143 insertions(+), 115 deletions(-) commit c738aed136a74e9fafd90e5c8a0b13bf068a39f7 Author: Takashi Sakamoto Date: Tue Jun 11 22:21:15 2019 +0900 ALSA: dice: code refactoring to keep isochronous resources This commit is a part of preparation to perform allocation/release of isochronous resources in pcm.hw_params/hw_free callbacks. This commit adds a helper function to allocate isochronous resources, separated from operations to start packet streaming, I note that some dice-based devices have two pair of endpoints for isochronous packet straeming. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/dice/dice-stream.c | 133 +++++++++++++++++++++----------------- 1 file changed, 74 insertions(+), 59 deletions(-) commit b3480638a52adeeb133759fca0a0f89ce403e8ba Author: Takashi Sakamoto Date: Tue Jun 11 22:21:14 2019 +0900 ALSA: dice: code refactoring to stop packet streaming This commit is a part of preparation to perform allocation/release of isochronous resources in pcm.hw_params/hw_free callbacks. There're three points to finish packet streaming but no helper functions for common operations for it. This commit adds a helper function for operations to finish packet streaming. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/dice/dice-stream.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) commit 478f3a56dcbc991b5d1d0e72666b0b32bae5e0a8 Author: Takashi Sakamoto Date: Tue Jun 11 22:21:13 2019 +0900 ALSA: firewire-digi00x: code refactoring for pcm.hw_params/hw_free callbacks The pairs of pcm.hw_params callbacks and .hw_free callbacks for both direction have no differences. This commit unifies the pairs. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/digi00x/digi00x-pcm.c | 55 +++++------------------------------- 1 file changed, 7 insertions(+), 48 deletions(-) commit 24bb77b3fff442cab2a6f4227ffcf40fd713816f Author: Takashi Sakamoto Date: Tue Jun 11 22:21:12 2019 +0900 ALSA: firewire-digi00x: update isochronous resources when starting packet streaming after bus-reset After bus reset, isochronous resource manager releases all of allocated isochronous resources. The nodes to transfer isochronous packet should request reallocation of the resources. However, between the bus-reset and invocation of 'struct fw_driver.update' handler, ALSA PCM application can detect this situation by XRUN because the target device cancelled to transmit packets once bus-reset occurs. Due to the above mechanism, ALSA fireface driver just stops packet streaming in the update handler, thus pcm.prepare handler should request the reallocation. This commit requests the reallocation in pcm.prepare callback when bus generation is changed. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/digi00x/digi00x-stream.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit ae8ffbb26512bbfd3f929e34c85880f620ecb6eb Author: Takashi Sakamoto Date: Tue Jun 11 22:21:11 2019 +0900 ALSA: firewire-digi00x: reserve/release isochronous resources in pcm.hw_params/hw_free callbacks Once allocated, isochronous resources are available for packet streaming, even if the streaming is cancelled. For this reason, current implementation handles allocation of the resources and starting packet streaming at the same time. However, this brings complicated procedure to start packet streaming. This commit separates the allocation and starting. The allocation is done in pcm.hw_params callback and available till pcm.hw_free callback. Even if any XRUN occurs, pcm.prepare callback is done to restart packet streaming without releasing/allocating the resources. There are two points to stop packet streaming; in pcm.hw_params and pcm.prepare callbacks. The former point is a case that packet streaming is already started for any MIDI substream then packet streaming is requested with different sampling transfer frequency for any PCM substream. The latter point is cases of any XRUN or packet queueing error. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/digi00x/digi00x-midi.c | 10 ++-- sound/firewire/digi00x/digi00x-pcm.c | 28 +++++++---- sound/firewire/digi00x/digi00x-stream.c | 82 ++++++++++++++++++--------------- sound/firewire/digi00x/digi00x.h | 4 +- 4 files changed, 73 insertions(+), 51 deletions(-) commit ad3065054761c86d3284315b67512a70f5ae0c04 Author: Takashi Sakamoto Date: Tue Jun 11 22:21:10 2019 +0900 ALSA: firewire-digi00x: code refactoring to keep isochronous resources This commit is a part of preparation to perform allocation/release of isochronous resources in pcm.hw_params/hw_free callbacks. All of models in Digidesign Digi00x family have the same formation of data channels in isochronous packet for both directions. This commit simplifies allocation of isochronous resources in this point. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/digi00x/digi00x-stream.c | 42 ++++++++++++++------------------- 1 file changed, 18 insertions(+), 24 deletions(-) commit 638e19fc46afceb65f6bfff65b2164fbb3324cb3 Author: Takashi Sakamoto Date: Tue Jun 11 22:21:09 2019 +0900 ALSA: firewire-digi00x: simplify error path to begin streaming session This commit is a part of preparation to perform allocation/release of isochronous resources in pcm.hw_params/hw_free callbacks. The caller of begin_session() calls finish_session() in its error path, thus no need to call finish_session() in error path of begin_session(). This commit simplifies error path of begin_session(). Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/digi00x/digi00x-stream.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit d18b0a6e42f7d4fca64f34ea0b76a312be632d7a Author: Takashi Sakamoto Date: Tue Jun 11 22:21:08 2019 +0900 ALSA: firewire-digi00x: code refactoring to finish streaming session This commit is a part of preparation to perform allocation/release of isochronous resources in pcm.hw_params/hw_free callbacks. The operation to finish packet streaming corresponds to stopping isochronous contexts. This commit applies code refactoring to move codes to stop into a helper function to finish the session. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/digi00x/digi00x-stream.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) commit 6bc9322936f240d96b1a76d87a9f308456bf31bf Author: Takashi Sakamoto Date: Tue Jun 11 22:21:07 2019 +0900 ALSA: firewire-digi00x: refactoring to move timing of registration for isochronous channel This commit is a part of preparation to perform allocation/release of isochronous resources in pcm.hw_params/hw_free callbacks. The registration of isochronous channels is done just after allocation of isochronous resources. This commit separates the registration just before starting packet streaming. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/digi00x/digi00x-stream.c | 41 +++++++++++++++------------------ 1 file changed, 19 insertions(+), 22 deletions(-) commit 09a32cb7b45f7431e824b4778c89e4614dd841d0 Author: Tvrtko Ursulin Date: Tue Jun 11 13:23:50 2019 +0100 drm/i915: Make GuC GGTT reservation work on ggtt These functions operate on ggtt so make them take that directly as parameter. At the same time move the USES_GUC conditional down to intel_guc_reserve_ggtt_top for symmetry with intel_guc_reserved_gtt_size. v2: * Rename and move functions to be static in i915_gem_gtt.c (Michal) v3: * Add comment explaining reason for reservation, add assert and fix error message. (Michal) v4: * Fix checkpatch error. Signed-off-by: Tvrtko Ursulin Cc: Michal Wajdeczko Reviewed-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20190611122350.15060-1-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/i915_gem_gtt.c | 43 +++++++++++++++++++++++++++++++------ drivers/gpu/drm/i915/intel_guc.c | 27 ----------------------- drivers/gpu/drm/i915/intel_guc.h | 2 -- 3 files changed, 36 insertions(+), 36 deletions(-) commit 9937e16b2820d141df2ba9845c19d3b7bc31fd7b Author: Tvrtko Ursulin Date: Tue Jun 11 12:00:43 2019 +0100 drm/i915/guc: Move intel_guc_reserved_gtt_size to intel_wopcm_guc_size Reduces pointer chasing and gets more to the point. v2: * Tidy whitespace. * Tidy comment. (Michal) Signed-off-by: Tvrtko Ursulin Suggested-by: Michal Wajdeczko Cc: Michal Wajdeczko Reviewed-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20190611110044.7742-1-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/i915_gem_gtt.c | 2 +- drivers/gpu/drm/i915/intel_guc.c | 17 ----------------- drivers/gpu/drm/i915/intel_guc.h | 1 - drivers/gpu/drm/i915/intel_wopcm.h | 15 +++++++++++++++ 4 files changed, 16 insertions(+), 19 deletions(-) commit 068b053dca0e2ab40b3d953b102a178654eec282 Author: Yazen Ghannam Date: Fri Jun 7 20:18:06 2019 +0000 x86/MCE: Determine MCA banks' init state properly The OS is expected to write all bits to MCA_CTL for each bank, thus enabling error reporting in all banks. However, some banks may be unused in which case the registers for such banks are Read-as-Zero/Writes-Ignored. Also, the OS may avoid setting some control bits because of quirks, etc. A bank can be considered uninitialized if the MCA_CTL register returns zero. This is because either the OS did not write anything or because the hardware is enforcing RAZ/WI for the bank. Set a bank's init value based on if the control bits are set or not in hardware. Return an error code in the sysfs interface for uninitialized banks. Do a final bank init check in a separate function which is not part of any user-controlled code flows. This is so a user may enable/disable a bank during runtime without having to restart their system. [ bp: Massage a bit. Discover bank init state at boot. ] Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: "linux-edac@vger.kernel.org" Cc: Thomas Gleixner Cc: Tony Luck Cc: "x86@kernel.org" Link: https://lkml.kernel.org/r/20190607201752.221446-6-Yazen.Ghannam@amd.com arch/x86/kernel/cpu/mce/core.c | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit c7d314f386e987be8b51eeb7dd947756ae23f6b6 Author: Yazen Ghannam Date: Fri Jun 7 20:18:05 2019 +0000 x86/MCE: Make the number of MCA banks a per-CPU variable The number of MCA banks is provided per logical CPU. Historically, this number has been the same across all CPUs, but this is not an architectural guarantee. Future AMD systems may have MCA bank counts that vary between logical CPUs in a system. This issue was partially addressed in 006c077041dc ("x86/mce: Handle varying MCA bank counts") by allocating structures using the maximum number of MCA banks and by saving the maximum MCA bank count in a system as the global count. This means that some extra structures are allocated. Also, this means that CPUs will spend more time in the #MC and other handlers checking extra MCA banks. Thus, define the number of MCA banks as a per-CPU variable. [ bp: Make mce_num_banks an unsigned int. ] Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: "linux-edac@vger.kernel.org" Cc: Thomas Gleixner Cc: Tony Luck Cc: "x86@kernel.org" Link: https://lkml.kernel.org/r/20190607201752.221446-5-Yazen.Ghannam@amd.com arch/x86/kernel/cpu/mce/amd.c | 19 ++++++++-------- arch/x86/kernel/cpu/mce/core.c | 45 +++++++++++++++++++++----------------- arch/x86/kernel/cpu/mce/internal.h | 2 +- 3 files changed, 36 insertions(+), 30 deletions(-) commit 95d057f54664f3c6e8f650faf5690b82b30a9e52 Author: Yazen Ghannam Date: Fri Jun 7 20:18:04 2019 +0000 x86/MCE/AMD: Don't cache block addresses on SMCA systems On legacy systems, the addresses of the MCA_MISC* registers need to be recursively discovered based on a Block Pointer field in the registers. On Scalable MCA systems, the register space is fixed, and particular addresses can be derived by regular offsets for bank and register type. This fixed address space includes the MCA_MISC* registers. MCA_MISC0 is always available for each MCA bank. MCA_MISC1 through MCA_MISC4 are considered available if MCA_MISC0[BlkPtr]=1. Cache the value of MCA_MISC0[BlkPtr] for each bank and per CPU. This needs to be done only during init. The values should be saved per CPU to accommodate heterogeneous SMCA systems. Redo smca_get_block_address() to directly return the block addresses. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: "linux-edac@vger.kernel.org" Cc: Thomas Gleixner Cc: Tony Luck Cc: "x86@kernel.org" Link: https://lkml.kernel.org/r/20190607201752.221446-4-Yazen.Ghannam@amd.com arch/x86/kernel/cpu/mce/amd.c | 73 ++++++++++++++++++++++--------------------- 1 file changed, 37 insertions(+), 36 deletions(-) commit b4914508f1fe0eca1cd011b6026ff762a1aa62d5 Author: Yazen Ghannam Date: Fri Jun 7 20:18:04 2019 +0000 x86/MCE: Make mce_banks a per-CPU array Current AMD systems have unique MCA banks per logical CPU even though the type of the banks may all align to the same bank number. Each CPU will have control of a set of MCA banks in the hardware and these are not shared with other CPUs. For example, bank 0 may be the Load-Store Unit on every logical CPU, but each bank 0 is a unique structure in the hardware. In other words, there isn't a *single* Load-Store Unit at MCA bank 0 that all logical CPUs share. This idea extends even to non-core MCA banks. For example, CPU0 and CPU4 may see a Unified Memory Controller at bank 15, but each CPU is actually seeing a unique hardware structure that is not shared with other CPUs. Because the MCA banks are all unique hardware structures, it would be good to control them in a more granular way. For example, if there is a known issue with the Floating Point Unit on CPU5 and a user wishes to disable an error type on the Floating Point Unit, then it would be good to do this only for CPU5 rather than all CPUs. Also, future AMD systems may have heterogeneous MCA banks. Meaning the bank numbers may not necessarily represent the same types between CPUs. For example, bank 20 visible to CPU0 may be a Unified Memory Controller and bank 20 visible to CPU4 may be a Coherent Slave. So granular control will be even more necessary should the user wish to control specific MCA banks. Split the device attributes from struct mce_bank leaving only the MCA bank control fields. Make struct mce_banks[] per_cpu in order to have more granular control over individual MCA banks in the hardware. Allocate the device attributes statically based on the maximum number of MCA banks supported. The sysfs interface will use as many as needed per CPU. Currently, this is set to mca_cfg.banks, but will be changed to a per_cpu bank count in a future patch. Allocate the MCA control bits statically. This is in order to avoid locking warnings when memory is allocated during secondary CPUs' init sequences. Also, remove the now unnecessary return values from __mcheck_cpu_mce_banks_init() and __mcheck_cpu_cap_init(). Redo the sysfs store/show functions to handle the per_cpu mce_banks[]. [ bp: s/mce_banks_percpu/mce_banks_array/g ] [ Locking issue reported by ] Reported-by: kernel test robot Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: "linux-edac@vger.kernel.org" Cc: Thomas Gleixner Cc: Tony Luck Cc: "x86@kernel.org" Link: https://lkml.kernel.org/r/20190607201752.221446-3-Yazen.Ghannam@amd.com arch/x86/kernel/cpu/mce/core.c | 76 ++++++++++++++++++++++++++---------------- 1 file changed, 48 insertions(+), 28 deletions(-) commit 95fdce6b24f3526c2bd1aad15978d238b79da6bd Author: Yazen Ghannam Date: Fri Jun 7 20:18:03 2019 +0000 x86/MCE: Make struct mce_banks[] static The struct mce_banks[] array is only used in mce/core.c so move its definition there and make it static. Also, change the "init" field to bool type. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: linux-edac Cc: Thomas Gleixner Cc: Tony Luck Cc: "x86@kernel.org" Link: https://lkml.kernel.org/r/20190607201752.221446-2-Yazen.Ghannam@amd.com arch/x86/kernel/cpu/mce/core.c | 11 ++++++++++- arch/x86/kernel/cpu/mce/internal.h | 10 ---------- 2 files changed, 10 insertions(+), 11 deletions(-) commit ce25600842f3f45587344301e09d0a92549335d0 Author: Noralf Trønnes Date: Sat Jun 8 17:26:57 2019 +0200 drm/todo: Add bootsplash entry Ease entry for anyone wanting to pick up the bootsplash work by providing a couple of pointers. v2: Add Sam as contact (Sam) Signed-off-by: Noralf Trønnes Reviewed-by: Paul Kocialkowski Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20190608152657.36613-6-noralf@tronnes.org Documentation/gpu/todo.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit cf13909aee054f5aa667d4b9da0ac7df4f6c1327 Author: Noralf Trønnes Date: Sat Jun 8 17:26:55 2019 +0200 drm/fb-helper: Move out modeset config code No functional changes, just moving code as-is and fixing includes. Signed-off-by: Noralf Trønnes Reviewed-by: Maxime Ripard Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20190608152657.36613-4-noralf@tronnes.org drivers/gpu/drm/drm_client_modeset.c | 707 ++++++++++++++++++++++++++++++++++- drivers/gpu/drm/drm_fb_helper.c | 692 ---------------------------------- include/drm/drm_client.h | 5 +- 3 files changed, 702 insertions(+), 702 deletions(-) commit aafa9e0668720a663eb47f25d863a84160eead7b Author: Noralf Trønnes Date: Sat Jun 8 17:26:54 2019 +0200 drm/fb-helper: Prepare to move out modeset config code This prepares the modeset code so it can be moved out as-is in the next patch. v3: Remove stray newline Signed-off-by: Noralf Trønnes Reviewed-by: Maxime Ripard Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20190608152657.36613-3-noralf@tronnes.org drivers/gpu/drm/drm_fb_helper.c | 62 +++++++++++++++++++++++++++++------------ include/drm/drm_fb_helper.h | 4 --- 2 files changed, 44 insertions(+), 22 deletions(-) commit e5852bee90d6cb7d9bd2c635c056e7746f137e06 Author: Noralf Trønnes Date: Sat Jun 8 17:26:53 2019 +0200 drm/fb-helper: Remove drm_fb_helper_connector All drivers add all their connectors so there's no need to keep around an array of available connectors. Instead we just put the useable (not writeback) connectors in a temporary array using drm_client_for_each_connector_iter() everytime we probe the outputs. Other places where it's necessary to look at the connectors, we just iterate over them using the same iterator function. Rename functions which signature is changed since they will be moved to drm_client in a later patch. v6: Improve commit message (Sam Ravnborg) Signed-off-by: Noralf Trønnes Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20190608152657.36613-2-noralf@tronnes.org Documentation/gpu/todo.rst | 4 + drivers/gpu/drm/drm_fb_helper.c | 506 +++++++++++++--------------------------- include/drm/drm_client.h | 15 ++ include/drm/drm_fb_helper.h | 80 ++----- 4 files changed, 197 insertions(+), 408 deletions(-) commit b744c3bcff5a18ac1f355224eec1c453aab066a2 Author: Gustavo A. R. Silva Date: Tue Jun 4 18:16:16 2019 -0500 irqchip/qcom: Use struct_size() in devm_kzalloc() One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct foo { int stuff; struct boo entry[]; }; size = sizeof(struct foo) + count * sizeof(struct boo); instance = devm_kzalloc(dev, size, GFP_KERNEL); Instead of leaving these open-coded and prone to type mistakes, we can now use the new struct_size() helper: instance = devm_kzalloc(dev, struct_size(instance, entry, count), GFP_KERNEL); Notice that, in this case, variable alloc_sz is not necessary, hence it is removed. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Marc Zyngier drivers/irqchip/qcom-irq-combiner.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 85e27ed7b6bdd541e08fdd29479b5aeccf777c4f Author: Miquel Raynal Date: Tue May 28 11:03:10 2019 +0200 arm64: dts: marvell: armada-7040-db: Add USB current regulators Armada 7040-db USB ports deliver 500mA by default while they could deliver up to 900mA (usually, for USB3 devices). The board embeds a GPIO controlled regulator on each port which can be configured to deliver each amount of current. Add a vin-supply property to the USB3 Vbus nodes for this purpose. The regulator will be automatically 'enabled', ie. set to limit at 900mA instead of 500mA. Suggested-by: Alex Leibovich Signed-off-by: Miquel Raynal Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-7040-db.dts | 28 ++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 561564bea3248293398dc32ec36da40fb71faed0 Merge: 34c8a892ec5e 1bb418bffdd6 Author: Daniel Vetter Date: Tue Jun 11 13:29:33 2019 +0200 Merge tag 'omapdrm-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux into drm-next omapdrm changes for 5.3 - Add support for DSI command mode displays Signed-off-by: Daniel Vetter From: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/a709f57d-6909-8550-3932-d84e0b5bc3ef@ti.com commit e85c9c90b4316131c94e2297e08ea337586c0471 Author: Guo Ren Date: Thu Jun 6 15:37:33 2019 +0800 irqchip/irq-csky-mpintc: Remove unnecessary loop in interrupt handler csky_mpintc_handler() ->handle_domain_irq() ->irq_exit() ->invoke_softirq() ->__do_softirq() ->local_irq_enable() If new interrupt coming, it'll get into interrupt trap before return to csky_mpintc_handler(). So there is no need loop in csky_mpintc_handler. Signed-off-by: Guo Ren Cc: Marc Zyngier Signed-off-by: Marc Zyngier drivers/irqchip/irq-csky-mpintc.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit dc96f45074a55f307d9618ebd444991fc643836c Author: Guo Ren Date: Thu Jun 6 15:37:32 2019 +0800 dt-bindings: interrupt-controller: Update csky mpintc Add trigger type setting for csky,mpintc. The driver also could support #interrupt-cells <1> and it wouldn't invalidate existing DTs. Here we only show the complete format. Signed-off-by: Guo Ren Reviewed-by: Rob Herring Cc: Marc Zyngier Signed-off-by: Marc Zyngier .../bindings/interrupt-controller/csky,mpintc.txt | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit 648f835a028f4f7f031a89bc099e363d4292e5b9 Author: Guo Ren Date: Thu Jun 6 15:37:31 2019 +0800 irqchip/irq-csky-mpintc: Add triger type Support 4 triger types: - IRQ_TYPE_LEVEL_HIGH - IRQ_TYPE_LEVEL_LOW - IRQ_TYPE_EDGE_RISING - IRQ_TYPE_EDGE_FALLING All of above could be set in DeviceTree file and it still compatible with the old DeviceTree format. Signed-off-by: Guo Ren Cc: Marc Zyngier Signed-off-by: Marc Zyngier drivers/irqchip/irq-csky-mpintc.c | 78 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 77 insertions(+), 1 deletion(-) commit 332bbefe14e8b9cd77cfa3b0db5089d98ed6c3cc Author: Gregory CLEMENT Date: Fri May 17 23:31:51 2019 +0200 MAINTAINERS: mvebu: Add git entry While there was a git repository used for the mvebu subsystem since many years, it was not documented. let's add it. Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) commit 17c88892094973acd7176b794eff21abf24779fc Author: Geert Uytterhoeven Date: Fri Jun 7 11:58:56 2019 +0200 irqchip/renesas-irqc: Use proper irq_chip name and parent The irq_chip .name field should contain the device's class (not instance) name, while .parent_device should point to the device itself. Signed-off-by: Geert Uytterhoeven Signed-off-by: Marc Zyngier drivers/irqchip/irq-renesas-irqc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ec93b94ac16a9ad1521ea1fcedc4747ae724a8aa Author: Geert Uytterhoeven Date: Fri Jun 7 11:58:55 2019 +0200 irqchip/renesas-intc-irqpin: Use proper irq_chip name and parent The irq_chip .name field should contain the device's class (not instance) name, while .parent_device should point to the device itself. Signed-off-by: Geert Uytterhoeven Signed-off-by: Marc Zyngier drivers/irqchip/irq-renesas-intc-irqpin.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c64a9e804ccf86eb202bfd1c6a8c5233c75a0431 Author: Xingyu Chen Date: Sat Jun 8 21:04:10 2019 +0200 irqchip/meson-gpio: Add support for Meson-G12A SoC The Meson-G12A SoC uses the same GPIO interrupt controller IP block as the other Meson SoCs, A totle of 100 pins can be spied on, which is the sum of: - 223:100 undefined (no interrupt) - 99:97 3 pins on bank GPIOE - 96:77 20 pins on bank GPIOX - 76:61 16 pins on bank GPIOA - 60:53 8 pins on bank GPIOC - 52:37 16 pins on bank BOOT - 36:28 9 pins on bank GPIOH - 27:12 16 pins on bank GPIOZ - 11:0 12 pins in the AO domain Signed-off-by: Xingyu Chen Signed-off-by: Jianxin Pan Signed-off-by: Martin Blumenstingl Signed-off-by: Marc Zyngier drivers/irqchip/irq-meson-gpio.c | 1 + 1 file changed, 1 insertion(+) commit 5028bd68155985d3d9bc1af570349d7c56608897 Author: Xingyu Chen Date: Sat Jun 8 21:04:09 2019 +0200 dt-bindings: interrupt-controller: New binding for Meson-G12A SoC Update the dt-binding document to support new compatible string for the GPIO interrupt controller which found in Amlogic's Meson-G12A SoC. Signed-off-by: Xingyu Chen Signed-off-by: Jianxin Pan Signed-off-by: Martin Blumenstingl Signed-off-by: Marc Zyngier .../devicetree/bindings/interrupt-controller/amlogic,meson-gpio-intc.txt | 1 + 1 file changed, 1 insertion(+) commit 02d7e0417f6e3cde7678b13497f51f314e38b5dc Author: Geert Uytterhoeven Date: Fri Jun 7 11:50:36 2019 +0200 irqchip: Enable compile-testing for Renesas drivers Enable compile-testing for all Renesas interrupt controller drivers, except for RENESAS_H8300H_INTC. The latter relies on a function (ctrl_bclr()) that is not available on other architectures. Signed-off-by: Geert Uytterhoeven Acked-by: Yoshinori Sato Signed-off-by: Marc Zyngier drivers/irqchip/Kconfig | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit 90b4c55586155cf13bbafbd4e55327f89681859d Author: Zeev Zilberman Date: Mon Jun 10 13:52:01 2019 +0300 irqchip/gic-v2m: Add support for Amazon Graviton variant of GICv3+GICv2m Add support for Amazon Graviton custom variant of GICv2m, where the message is encoded using the MSI message address, as opposed to standard GICv2m, where the SPI number is encoded in the MSI message data. In addition, the Graviton flavor of GICv2m is used along GICv3 (and not GICv2). Co-developed-by: Benjamin Herrenschmidt Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Zeev Zilberman Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v2m.c | 85 +++++++++++++++++++++++++++------- drivers/irqchip/irq-gic-v3.c | 3 ++ include/linux/irqchip/arm-gic-common.h | 5 ++ include/linux/irqchip/arm-gic.h | 3 -- 4 files changed, 76 insertions(+), 20 deletions(-) commit 88bb346dd63b65e5cb4922466cffbbb27d24f08d Author: Wang Xuerui Date: Sat Jun 8 17:23:24 2019 +0800 HID: uclogic: Add support for Ugee Rainbow CV720 Add support for Ugee Rainbow CV720 to hid-uclogic. Signed-off-by: Wang Xuerui Reviewed-by: Nikolai Kondrashov Signed-off-by: Benjamin Tissoires drivers/hid/hid-ids.h | 1 + drivers/hid/hid-uclogic-core.c | 2 ++ drivers/hid/hid-uclogic-params.c | 2 ++ 3 files changed, 5 insertions(+) commit ab53497b57573e0a1b2b5349651108fd69c28a2e Author: Chris Wilson Date: Tue Jun 11 10:12:38 2019 +0100 drm/i915: Rename i915_hw_ppgtt to i915_ppgtt Keeping the _hw_ in there does not help to distinguish it from its only brethren i915_ggtt, so drop it. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20190611091238.15808-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gem/i915_gem_context.c | 8 +-- drivers/gpu/drm/i915/gem/selftests/huge_pages.c | 12 ++-- drivers/gpu/drm/i915/gem/selftests/mock_context.c | 2 +- drivers/gpu/drm/i915/gt/intel_lrc.c | 4 +- drivers/gpu/drm/i915/gt/intel_ringbuffer.c | 5 +- drivers/gpu/drm/i915/gvt/scheduler.c | 6 +- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_gem_gtt.c | 78 +++++++++++------------ drivers/gpu/drm/i915/i915_gem_gtt.h | 28 ++++---- drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 6 +- drivers/gpu/drm/i915/selftests/mock_gtt.c | 6 +- drivers/gpu/drm/i915/selftests/mock_gtt.h | 4 +- 12 files changed, 78 insertions(+), 83 deletions(-) commit e568ac3874be7dcef3da0cc3bd6b91ca9dd14aa0 Author: Chris Wilson Date: Tue Jun 11 10:12:37 2019 +0100 drm/i915: Pull kref into i915_address_space Make the kref common to both derived structs (i915_ggtt and i915_ppgtt) so that we can safely reference count an abstract ctx->vm address space. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20190611091238.15808-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gem/i915_gem_client_blt.c | 4 +- drivers/gpu/drm/i915/gem/i915_gem_context.c | 132 +++++++++++---------- drivers/gpu/drm/i915/gem/i915_gem_context_types.h | 6 +- drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 4 +- drivers/gpu/drm/i915/gem/i915_gem_object_blt.c | 4 +- drivers/gpu/drm/i915/gem/i915_gem_userptr.c | 6 +- drivers/gpu/drm/i915/gem/selftests/huge_pages.c | 26 ++-- .../gpu/drm/i915/gem/selftests/i915_gem_context.c | 36 +++--- drivers/gpu/drm/i915/gem/selftests/mock_context.c | 3 +- drivers/gpu/drm/i915/gt/intel_lrc.c | 9 +- drivers/gpu/drm/i915/gt/intel_ringbuffer.c | 26 ++-- drivers/gpu/drm/i915/gt/selftest_hangcheck.c | 7 +- drivers/gpu/drm/i915/gt/selftest_lrc.c | 2 +- drivers/gpu/drm/i915/gt/selftest_workarounds.c | 10 +- drivers/gpu/drm/i915/gvt/scheduler.c | 8 +- drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/i915_drv.h | 6 - drivers/gpu/drm/i915/i915_gem_gtt.c | 35 +++--- drivers/gpu/drm/i915/i915_gem_gtt.h | 27 +++-- drivers/gpu/drm/i915/i915_gpu_error.c | 2 +- drivers/gpu/drm/i915/i915_trace.h | 2 +- drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 10 +- drivers/gpu/drm/i915/selftests/i915_request.c | 3 +- drivers/gpu/drm/i915/selftests/i915_vma.c | 4 +- drivers/gpu/drm/i915/selftests/igt_spinner.c | 5 +- drivers/gpu/drm/i915/selftests/mock_gtt.c | 1 - 26 files changed, 188 insertions(+), 192 deletions(-) commit 861bee5adc8be511a93e949a338d35974fbdf10b Author: Stefan Sauer Date: Mon Jun 10 11:51:46 2019 +0200 ALSA: usb-audio: Enable .product_name override for Emagic, Unitor 8. The Emagic Unitor 8 does not provide iManufacturer and iProduct fields in its device descriptor. These fields are used by alsa to make build the device name. Thus uncomment the .product-name in the quirks-table. Without this change the device shows up as 'USB Device 0x86a:0x01'. Output of lsusb and amidi: https://gist.github.com/ensonic/7820a102e91f31575be355da2b6b33bc Signed-off-by: Stefan Sauer Signed-off-by: Takashi Iwai sound/usb/quirks-table.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dbb7bbcc8ad248b1ab05bd27dfdb587ef4023dab Author: Alan Mikhak Date: Thu May 23 14:57:27 2019 -0700 PCI: endpoint: Clear BAR before freeing its space Associated pci_epf_bar structure is needed in pci_epc_clear_bar() to clear a BAR correctly but it is reset in pci_epf_free_space() (that is called first) which results in pci_epc_clear_bar() failure. Reorder the pci_epc_clear_bar()/pci_epf_free_space() calls execution to fix the issue. Signed-off-by: Alan Mikhak [lorenzo.pieralisi@arm.com: reworded the commit log] Signed-off-by: Lorenzo Pieralisi Acked-by: Kishon Vijay Abraham I drivers/pci/endpoint/functions/pci-epf-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3041a643613a2530ade35a9ae97709a9da4c0c72 Author: Alan Mikhak Date: Thu May 23 14:55:40 2019 -0700 PCI: endpoint: Skip odd BAR when skipping 64bit BAR Always skip odd BAR when skipping 64bit BARs in pci_epf_test_set_bar() and pci_epf_test_alloc_space() otherwise pci_epf_test_set_bar() will call pci_epc_set_bar() on an odd loop index when skipping reserved 64bit BAR. Moreover, pci_epf_test_alloc_space() will call pci_epf_alloc_space() on bind for an odd loop index when BAR is 64bit but leaks on subsequent unbind by not calling pci_epf_free_space(). Signed-off-by: Alan Mikhak Signed-off-by: Lorenzo Pieralisi Acked-by: Kishon Vijay Abraham I Reviewed-by: Paul Walmsley drivers/pci/endpoint/functions/pci-epf-test.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) commit f16fb16ed16c7f561e9c41c9ae4107c7f6aa553c Author: Alan Mikhak Date: Thu May 23 14:47:59 2019 -0700 PCI: endpoint: Allocate enough space for fixed size BAR PCI endpoint test function code should honor the .bar_fixed_size parameter from underlying endpoint controller drivers or results may be unexpected. In pci_epf_test_alloc_space(), check if BAR being used for test register space is a fixed size BAR. If so, allocate the required fixed size. Signed-off-by: Alan Mikhak Signed-off-by: Lorenzo Pieralisi Acked-by: Kishon Vijay Abraham I drivers/pci/endpoint/functions/pci-epf-test.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit db7a62482d2f6a63f36f30f62c4cbf1e53035719 Author: Alan Mikhak Date: Thu May 23 14:45:44 2019 -0700 PCI: endpoint: Set endpoint controller pointer to NULL Set endpoint controller pointer to NULL in pci_epc_remove_epf() to avoid -EBUSY on subsequent call to pci_epc_add_epf(). Add a check for NULL endpoint function pointer. Signed-off-by: Alan Mikhak Signed-off-by: Lorenzo Pieralisi Acked-by: Kishon Vijay Abraham I drivers/pci/endpoint/pci-epc-core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 49f621fe3c798fe9361e7a303783d091cbb551f9 Author: Takashi Sakamoto Date: Sun Jun 2 16:12:59 2019 +0900 ALSA: fireface: code refactoring for pcm.hw_params/hw_free callbacks The pairs of pcm.hw_params callbacks and .hw_free callbacks for both direction have no differences. This commit unifies the pairs. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/fireface/ff-pcm.c | 55 +++++----------------------------------- 1 file changed, 7 insertions(+), 48 deletions(-) commit f55e2a897962a55e15cc881ee86ee23f4817dffd Author: Takashi Sakamoto Date: Sun Jun 2 16:12:58 2019 +0900 ALSA: fireface: minor code refactoring to finish streaming session The operation to finish packet streaming corresponds to stopping isochronous contexts. This commit applies code refactoring to move codes to stop into a helper function to finish the session. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/fireface/ff-stream.c | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) commit b88f4d7c3812e3f3f746895cc4475b02c530303e Author: Takashi Sakamoto Date: Sun Jun 2 16:12:57 2019 +0900 ALSA: fireface: update isochronous resources when starting packet streaming after bus-reset After bus reset, isochronous resource manager releases all of allocated isochronous resources. The nodes to restart packet streaming should request reallocation of the resources. However, between the bus-reset and invocation of 'struct fw_driver.update' handler, ALSA PCM application can detect this situation by XRUN because the target device cancelled to transmit packets once bus-reset occurs. Due to the above mechanism, ALSA fireface driver just stops packet streaming in the update handler, thus pcm.prepare handler should request the reallocation. This commit requests the reallocation in pcm.prepare callback when bus generation is changed. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/fireface/ff-protocol-former.c | 34 ++++++++++++++++++++-------- sound/firewire/fireface/ff-protocol-latter.c | 11 +++++++++ sound/firewire/fireface/ff-stream.c | 5 +--- 3 files changed, 36 insertions(+), 14 deletions(-) commit 55162d2bb0e86b2d0f87a82713b1e7ee761bf8a8 Author: Takashi Sakamoto Date: Sun Jun 2 16:12:56 2019 +0900 ALSA: fireface: reserve/release isochronous resources in pcm.hw_params/hw_free callbacks Once allocated, isochronous resources are available for packet streaming, even if the streaming is cancelled. For this reason, current implementation handles allocation of the resources and starting packet streaming at the same time. However, this brings complicated procedure to start packet streaming. This commit separates the allocation and starting. The allocation is done in pcm.hw_params callback and available till pcm.hw_free callback. Even if any XRUN occurs, pcm.prepare callback is done to restart packet streaming for allocated the resources. There are two points to stop packet streaming; in pcm.hw_params and pcm.prepare callbacks. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/fireface/ff-pcm.c | 18 +++++++--- sound/firewire/fireface/ff-stream.c | 67 +++++++++++++++++++++++-------------- sound/firewire/fireface/ff.h | 2 ++ 3 files changed, 57 insertions(+), 30 deletions(-) commit 60aec494b389ae518b9fe8812bce953440c33123 Author: Takashi Sakamoto Date: Sun Jun 2 16:12:55 2019 +0900 ALSA: fireface: support allocate_resources operation in latter protocol This commit is a part of preparation to perform allocation/release of isochronous channels in pcm.hw_params/hw_free callbacks. This commit implements allocate_resources callback for the protocol specific to latter models. The encoded values of constant table is split into several condition statements to separate the operation to configure sampling transfer frequency from the operation to configure the number of data channels in rx packet. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/fireface/ff-protocol-latter.c | 113 +++++++++++++-------------- 1 file changed, 56 insertions(+), 57 deletions(-) commit 75be43d97f55977ef34e2d59968a79aad8337199 Author: Takashi Sakamoto Date: Sun Jun 2 16:12:54 2019 +0900 ALSA: fireface: support allocate_resources operation in ff400 protocol This commit is a part of preparation to perform allocation/release of isochronous channels in pcm.hw_params/hw_free callbacks. This commit implements allocate_resources callback for ff400 protocol. In this callback, sampling transfer frequency is configured to the device as well. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/fireface/ff-protocol-former.c | 36 +++++++++++++--------------- 1 file changed, 16 insertions(+), 20 deletions(-) commit ca8159a8e66fc78328d522f0d84d0518695d1290 Author: Takashi Sakamoto Date: Sun Jun 2 16:12:53 2019 +0900 ALSA: fireface: support allocate_resources operation in ff800 protocol This commit is a part of preparation to perform allocation/release of isochronous channels in pcm.hw_params/hw_free callbacks. This commit implements allocate_resources callback for ff800 protocol. As I noted in commit fc716397a5c7 ("ALSA: fireface: add support for packet streaming on Fireface 800"), this unit allocates isochronous resources for tx stream voluntarily. Therefore, this commit is to maintain isochronous rsources for rx stream. In the callback, sampling transfer frequency is configured to the device as well. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/fireface/ff-protocol-former.c | 46 +++++++++++++--------------- 1 file changed, 22 insertions(+), 24 deletions(-) commit 47b87c8ed072b6d0fd54f1751ad0184e7c8e20e5 Author: Takashi Sakamoto Date: Sun Jun 2 16:12:52 2019 +0900 ALSA: fireface: add protocol-specific operation to allocate isochronous resources This commit is a part of preparation to perform allocation/release of isochronous channels in pcm.hw_params/hw_free callbacks. In ALSA fireface driver, the allocation of isochronous resources is programmed in each implementation of protocol. This commit adds protocol-specific operation for the allocation separated from the operation to begin session. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/fireface/ff-stream.c | 4 ++++ sound/firewire/fireface/ff.h | 1 + 2 files changed, 5 insertions(+) commit d8f291b7b84c4d5eb7a250a4f56cc44ed5bef3cf Author: Takashi Sakamoto Date: Sun Jun 2 16:12:51 2019 +0900 ALSA: firewire-tascam: code refactoring for pcm.hw_params/hw_free callbacks The pairs of pcm.hw_params callbacks and .hw_free callbacks for both direction have no differences. This commit unifies the pairs. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/tascam/tascam-pcm.c | 55 +++++--------------------------------- 1 file changed, 7 insertions(+), 48 deletions(-) commit ece92831f0fa49f6b7bab0843c096293eab1b113 Author: Takashi Sakamoto Date: Sun Jun 2 16:12:50 2019 +0900 ALSA: firewire-tascam: minor code refactoring to finish streaming session The operation to finish packet streaming corresponds to stopping isochronous contexts. This commit applies code refactoring to move codes to stop into a helper function to finish the session. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/tascam/tascam-stream.c | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) commit a0c049a647fbf55e8e6338a5c1e9316f6fbeabb2 Author: Takashi Sakamoto Date: Sun Jun 2 16:12:49 2019 +0900 ALSA: firewire-tascam: update isochronous resources when starting packet streaming after bus reset After bus reset, isochronous resource manager releases all of allocated isochronous resources. The nodes to restart packet streaming should request reallocation of the resources. However, between the bus-reset and invocation of 'struct fw_driver.update' handler, ALSA PCM application can detect this situation by XRUN because the target device cancelled to transmit packets once bus-reset occurs. Due to the above mechanism, ALSA firewire-tascam driver just stops packet streaming in the update handler, thus pcm.prepare handler should request the reallocation. This commit requests the reallocation in pcm.prepare callback when bus generation is changed. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/tascam/tascam-stream.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 07b266424df51894efd6d42e6de169d229559bec Author: Takashi Sakamoto Date: Sun Jun 2 16:12:48 2019 +0900 ALSA: firewire-tascam: reserve/release isochronous resources in pcm.hw_params/hw_free callbacks Once allocated, isochronous resources are available for packet streaming, even if the streaming is cancelled. For this reason, current implementation handles allocation of the resources and starting packet streaming at the same time. However, this brings complicated procedure to start packet streaming. This commit separates the allocation and starting. The allocation is done in pcm.hw_params callback and available till pcm.hw_free callback. Even if any XRUN occurs, pcm.prepare callback is done to restart packet streaming for allocated the resources. There are two points to stop packet streaming; in pcm.hw_params and pcm.prepare callbacks. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/tascam/tascam-pcm.c | 22 +++++++--- sound/firewire/tascam/tascam-stream.c | 79 +++++++++++++++++++++-------------- sound/firewire/tascam/tascam.h | 2 + 3 files changed, 66 insertions(+), 37 deletions(-) commit a364af2eecfa3f5927460cda18e7e84881b8392f Author: Takashi Sakamoto Date: Sun Jun 2 16:12:47 2019 +0900 ALSA: firewire-tascam: code refactoring for release of isochronous resources This commit is a part of preparation to perform allocation/release of isochronous channels in pcm.hw_params/hw_free callbacks. This commit obsoletes a helper function to release isochronous resources for both direction. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/tascam/tascam-stream.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit 810b37ff294d67c75cd608184a5a834f1fc3117f Author: Takashi Sakamoto Date: Sun Jun 2 16:12:46 2019 +0900 ALSA: firewire-tascam: code refactoring for reservation of isochronous resources This commit is a part of preparation to perform allocation/release of isochronous channels in pcm.hw_params/hw_free callbacks. This commit applies minor code refactoring for a helper function to allocate isochronous resources. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/tascam/tascam-stream.c | 38 +++++++++++++++-------------------- 1 file changed, 16 insertions(+), 22 deletions(-) commit 2ef0b7cf161ccbdcce907e5b1bb9df4c0f6941e8 Author: Takashi Sakamoto Date: Sun Jun 2 16:12:45 2019 +0900 ALSA: firewire-tascam: code refactoring for registration of isochronous channels This commit is a part of preparation to perform allocation/release of isochronous channels in pcm.hw_params/hw_free callbacks. The registration of isochronous channels is done just after allocation of isochronous resources. This commit separates the registration just before starting packet streaming. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/tascam/tascam-stream.c | 84 +++++++++++++++++------------------ 1 file changed, 40 insertions(+), 44 deletions(-) commit d670d44582841cdd17a6d73f6d57027f14b31302 Author: YueHaibing Date: Sat Jun 1 04:12:14 2019 +0000 ALSA: lx6464es - Remove set but not used variables 'orun_mask, urun_mask' Fixes gcc '-Wunused-but-set-variable' warning: sound/pci/lx6464es/lx_core.c: In function 'lx_interrupt_handle_async_events': sound/pci/lx6464es/lx_core.c:990:6: warning: variable 'urun_mask' set but not used [-Wunused-but-set-variable] sound/pci/lx6464es/lx_core.c:989:6: warning: variable 'orun_mask' set but not used [-Wunused-but-set-variable] They are never used, so can be removed. Signed-off-by: YueHaibing Signed-off-by: Takashi Iwai sound/pci/lx6464es/lx_core.c | 5 ----- 1 file changed, 5 deletions(-) commit eda91833f099277998814105c77b5b12cbfab6db Author: Neil Armstrong Date: Tue May 28 10:07:58 2019 +0200 clk: meson: g12a: mark fclk_div3 as critical On Amlogic Meson G12b platform, the fclk_div3 seems to be necessary for the system to operate correctly. Disabling it cause the entire system to freeze, including peripherals. Let's mark this clock as critical, fixing boot on G12b platforms. Signed-off-by: Neil Armstrong Signed-off-by: Jerome Brunet drivers/clk/meson/g12a.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit d43628e9bca69e02efba5041d4bd26d013637e0c Author: Neil Armstrong Date: Tue May 28 10:07:57 2019 +0200 clk: meson: g12a: Add support for G12B CPUB clocks Update the Meson G12A Clock driver to support the Amlogic G12B SoC. G12B clock driver is very close, the main differences are : - the clock tree is duplicated for the both clusters, and the SYS_PLL are swapped between the clusters - G12B has additional clocks like for CSI an other components Here only the cpu clock tree is handled. Reviewed-by: Martin Blumenstingl Signed-off-by: Neil Armstrong Signed-off-by: Jerome Brunet drivers/clk/meson/g12a.c | 822 +++++++++++++++++++++++++++++++++++++++++++++-- drivers/clk/meson/g12a.h | 40 ++- 2 files changed, 831 insertions(+), 31 deletions(-) commit 1360952c96ccd394c118c66b968acd534b189e27 Merge: ad517d5298cf 7391d7f4b069 Author: Jerome Brunet Date: Tue Jun 11 11:26:09 2019 +0200 Merge branch 'v5.3/dt' into v5.3/drivers commit 7391d7f4b0690a98c5bf6a113c33400e2d29d9f8 Author: Neil Armstrong Date: Tue May 28 10:07:56 2019 +0200 dt-bindings: clk: meson: add g12b periph clock controller bindings Update the documentation to support clock driver for the Amlogic G12B SoC. G12B clock driver is very close, the main differences are : - the clock tree is duplicated for the both clusters, and the SYS_PLL are swapped between the clusters - G12B has additional clocks like for CSI an other components Reviewed-by: Rob Herring Reviewed-by: Martin Blumenstingl Signed-off-by: Neil Armstrong Signed-off-by: Jerome Brunet Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.txt | 1 + 1 file changed, 1 insertion(+) commit ad517d5298cf47ba1a2a92587a3287113baeec0a Author: Guillaume La Roque Date: Fri Apr 12 12:02:21 2019 +0200 clk: meson-g12a: add temperature sensor clocks Add the TS clocks used by two temperature sensors Reviewed-by: Martin Blumenstingl Signed-off-by: Guillaume La Roque Signed-off-by: Jerome Brunet [fixed commit description] drivers/clk/meson/g12a.c | 31 +++++++++++++++++++++++++++++++ drivers/clk/meson/g12a.h | 3 ++- 2 files changed, 33 insertions(+), 1 deletion(-) commit 4e231cbbcbf9bfbe4c867bfadb81f6f2f40c8e8f Merge: 174806aa9a8e 6e47ef34db57 Author: Jerome Brunet Date: Tue Jun 11 11:20:28 2019 +0200 Merge branch 'v5.3/dt' into v5.3/drivers commit 6e47ef34db571e3eebda46ddaddae00d369df5f9 Author: Guillaume La Roque Date: Fri Apr 12 12:02:20 2019 +0200 dt-bindings: clk: g12a-clkc: add Temperature Sensor clock IDs Add clock ids used by the temperature sensors of the G12A Socs Reviewed-by: Martin Blumenstingl Acked-by: Rob Herring Signed-off-by: Guillaume La Roque Signed-off-by: Jerome Brunet [fixed commit message] include/dt-bindings/clock/g12a-clkc.h | 1 + 1 file changed, 1 insertion(+) commit 174806aa9a8e051d3757ee5e673a3966221e4c3c Author: Martin Blumenstingl Date: Mon May 20 22:03:19 2019 +0200 clk: meson: meson8b: add the cts_i958 clock Add the cts_i958 clock to control the clock source of the spdif output block. It is used to select whether the clock source of the spdif output is cts_amclk (when data are taken from i2s buffer) or the cts_mclk_i958 (when data are taken from the spdif buffer). The setup for this clock is identical to GXBB, so this ports commit 7eaa44f6207fb6 ("clk: meson: gxbb: add cts_i958 clock") to the Meson8/Meson8b/Meson8m2 clock driver. Signed-off-by: Martin Blumenstingl Signed-off-by: Jerome Brunet drivers/clk/meson/meson8b.c | 24 ++++++++++++++++++++++++ drivers/clk/meson/meson8b.h | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) commit c39c24c1cae2476629c83e63afb19c3ff8987abf Author: Martin Blumenstingl Date: Mon May 20 22:03:18 2019 +0200 clk: meson: meson8b: add the cts_mclk_i958 clocks Add the SPDIF master clock also referred as cts_mclk_i958. The setup for this clock is identical to GXBB, so this ports commit 3c277c247eabeb ("clk: meson: gxbb: add cts_mclk_i958") to the Meson8/Meson8b/Meson8m2 clock driver. Signed-off-by: Martin Blumenstingl Signed-off-by: Jerome Brunet drivers/clk/meson/meson8b.c | 65 +++++++++++++++++++++++++++++++++++++++++++++ drivers/clk/meson/meson8b.h | 5 +++- 2 files changed, 69 insertions(+), 1 deletion(-) commit f278f05e748cdce3d7994c5de7cc2f02cc185f65 Author: Martin Blumenstingl Date: Mon May 20 22:03:17 2019 +0200 clk: meson: meson8b: add the cts_amclk clocks Add the I2S master clock also referred as cts_amclk. The setup for this clock is identical to GXBB, so this ports commit 4087bd4b21702d ("clk: meson: gxbb: add cts_amclk") to the Meson8/Meson8b/Meson8m2 clock driver. Signed-off-by: Martin Blumenstingl Signed-off-by: Jerome Brunet drivers/clk/meson/meson8b.c | 65 +++++++++++++++++++++++++++++++++++++++++++++ drivers/clk/meson/meson8b.h | 5 +++- 2 files changed, 69 insertions(+), 1 deletion(-) commit 4c7c965903ffb8d91ba1552d2dcaa41a5711d15e Merge: a9f7b1993b70 a987be182c30 Author: Jerome Brunet Date: Tue Jun 11 11:01:32 2019 +0200 Merge branch 'v5.3/dt' into v5.3/drivers commit a987be182c309f565a2d3545f2e9c9a4f8d07a4d Author: Martin Blumenstingl Date: Mon May 20 22:03:16 2019 +0200 dt-bindings: clock: meson8b: add the audio clocks The audio controllers on Meson8, Meson8b and Meson8m2 use similar (potentially the same) audio clocks as GXBB, GXL and GXM. Add the CLKID_CTS_AMCLK, CLKID_CTS_MCLK_I958 and CLKID_CTS_I958 clock IDs so they can be used for the audio controllers. Signed-off-by: Martin Blumenstingl Signed-off-by: Jerome Brunet include/dt-bindings/clock/meson8b-clkc.h | 3 +++ 1 file changed, 3 insertions(+) commit dbcbabf7da921f98beefb4a6f4b91eb62d072076 Author: YueHaibing Date: Sat May 25 22:09:08 2019 +0800 HID: logitech-dj: fix return value of logi_dj_recv_query_hidpp_devices We should return 'retval' as the correct return value instead of always zero. Fixes: 74808f9115ce ("HID: logitech-dj: add support for non unifying receivers") Signed-off-by: YueHaibing Reviewed-by: Hans de Goede Signed-off-by: Benjamin Tissoires drivers/hid/hid-logitech-dj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5e2ac390fbd08b2a462db66cef2663e4db0d5191 Merge: 89cceaa93917 4c587c196d82 Author: Daniel Borkmann Date: Tue Jun 11 10:36:03 2019 +0200 Merge branch 'bpf-libbpf-num-cpus' Hechao Li says: ==================== Getting number of possible CPUs is commonly used for per-CPU BPF maps and perf_event_maps. Add a new API libbpf_num_possible_cpus() that helps user with per-CPU related operations and remove duplicate implementations in bpftool and selftests. v2: Save errno before calling pr_warning in case it is changed. v3: Make sure libbpf_num_possible_cpus never returns 0 so that user only has to check if ret value < 0. v4: Fix error code when reading 0 bytes from possible CPU file. v5: Fix selftests compliation issue. v6: Split commit to reuse libbpf_num_possible_cpus() into two commits: One commit to remove bpf_util.h from test BPF C programs. One commit to reuse libbpf_num_possible_cpus() in bpftools and bpf_util.h. ==================== Signed-off-by: Daniel Borkmann commit 4c587c196d8237169405cbb2195669dbc00fd72b Author: Hechao Li Date: Mon Jun 10 17:56:52 2019 -0700 bpf: use libbpf_num_possible_cpus internally Use the newly added bpf_num_possible_cpus() in bpftool and selftests and remove duplicate implementations. Signed-off-by: Hechao Li Signed-off-by: Daniel Borkmann tools/bpf/bpftool/common.c | 53 ++++------------------------------ tools/testing/selftests/bpf/bpf_util.h | 37 ++++-------------------- 2 files changed, 10 insertions(+), 80 deletions(-) commit ebb886078bae29bd60eba3157dc6edae4bbed3a1 Author: Hechao Li Date: Mon Jun 10 17:56:51 2019 -0700 selftests/bpf: remove bpf_util.h from BPF C progs Though currently there is no problem including bpf_util.h in kernel space BPF C programs, in next patch in this stack, I will reuse libbpf_num_possible_cpus() in bpf_util.h thus include libbpf.h in it, which will cause BPF C programs compile error. Therefore I will first remove bpf_util.h from all test BPF programs. This can also make it clear that bpf_util.h is a user-space utility while bpf_helpers.h is a kernel space utility. Signed-off-by: Hechao Li Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/bpf_endian.h | 1 + tools/testing/selftests/bpf/progs/sockmap_parse_prog.c | 1 - tools/testing/selftests/bpf/progs/sockmap_tcp_msg_prog.c | 2 +- tools/testing/selftests/bpf/progs/sockmap_verdict_prog.c | 1 - tools/testing/selftests/bpf/progs/test_sysctl_prog.c | 5 ++++- 5 files changed, 6 insertions(+), 4 deletions(-) commit 6446b3155521aab37f5a2b99ac264803ea7dced8 Author: Hechao Li Date: Mon Jun 10 17:56:50 2019 -0700 bpf: add a new API libbpf_num_possible_cpus() Adding a new API libbpf_num_possible_cpus() that helps user with per-CPU map operations. Signed-off-by: Hechao Li Signed-off-by: Daniel Borkmann tools/lib/bpf/libbpf.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++++ tools/lib/bpf/libbpf.h | 16 ++++++++++++++ tools/lib/bpf/libbpf.map | 1 + 3 files changed, 74 insertions(+) commit 89cceaa939171fafa153d4bf637b39e396bbd785 Author: Hechao Li Date: Mon Jun 10 17:43:07 2019 -0700 selftests/bpf : clean up feature/ when make clean An error "implicit declaration of function 'reallocarray'" can be thrown with the following steps: $ cd tools/testing/selftests/bpf $ make clean && make CC= $ make clean && make CC= The cause is that the feature folder generated by GCC 4.8.5 is not removed, leaving feature-reallocarray being 1, which causes reallocarray not defined when re-compliing with GCC 7.x. This diff adds feature folder to EXTRA_CLEAN to avoid this problem. v2: Rephrase the commit message. Signed-off-by: Hechao Li Acked-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit dae335bcae86cab8f5e1df32d9c0ec200585a92d Author: Clément Péron Date: Mon May 27 22:14:59 2019 +0200 arm64: defconfig: enable Allwinner DMA drivers Allwinner sun6i DMA drivers is used on A64 and H6 boards. Enable it as a module. Signed-off-by: Clément Péron Signed-off-by: Maxime Ripard arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 34c8a892ec5e23133e1f0e56e56b9190567283ca Merge: 396f9acaffd8 cb5f15b711d3 Author: Daniel Vetter Date: Tue Jun 11 10:08:48 2019 +0200 Merge tag 'du-next-20190608-2' of git://linuxtv.org/pinchartl/media into drm-next R-Car DU changes for v5.3: - R8A774A1 SoC support - LVDS dual-link mode support - Support for additional formats - Misc fixes Signed-off-by: Daniel Vetter From: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/20190608134652.GE4786@pendragon.ideasonboard.com commit 2980ba6ae8ca558ff06155f17cf7139256e7d9ac Author: Heiko Carstens Date: Mon Jun 10 17:22:38 2019 +0200 s390/kdump: get rid of compile warning Move the CONFIG_CRASH_DUMP ifdef to get rid of this: arch/s390/kernel/machine_kexec.c:146:22: warning: 'do_start_kdump' defined but not used [-Wunused-function] Signed-off-by: Heiko Carstens arch/s390/kernel/machine_kexec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit eec0a43ddd3667bec3d1dfccb75df69ba6fce331 Author: Vasily Gorbik Date: Sun Jun 9 14:37:57 2019 +0200 RAID/s390: remove invalid 'r' inline asm operand modifier gcc silently ignores unsupported inline asm operand modifiers, effectively turning '%r0' into '%0', but upcoming clang 9 complains about them: lib/raid6/s390vx8.c:63:16: error: invalid operand in inline asm: 'VLM $2,$3,0,${1:r}' asm volatile ("VLM %2,%3,0,%r1" ^ Clean up what look like a typo 'r' inline asm operand modifier usage. Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens lib/raid6/s390vx.uc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a20aa857e0c207c27d4b2c98af7d97539faf2cc5 Author: Mauro Carvalho Chehab Date: Sat Jun 8 23:27:17 2019 -0300 s390: include/asm/debug.h add kerneldoc markups Instead of keeping the documentation inside s390dbf.rst, move them to arch/s390/include/asm/debug.h, using standard kernel-doc markups. Keeping the documentation close to the code helps to keep it updated. It also makes easier to document other stuff inside debug.h, as all it needs is to add kernel-doc markups inside it, as the file will be already be included at the produced documentation. - Those were converted to kerneldoc using this script specially designed to parse ths file, and manually editted: Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Heiko Carstens Documentation/s390/s390dbf.rst | 672 +---------------------------------------- arch/s390/include/asm/debug.h | 231 ++++++++++++++ 2 files changed, 232 insertions(+), 671 deletions(-) commit 8b4a503d659b32cae8266aeb306f7fd6717e6a53 Author: Mauro Carvalho Chehab Date: Sat Jun 8 23:27:16 2019 -0300 docs: s390: convert docs to ReST and rename to *.rst Convert all text files with s390 documentation to ReST format. Tried to preserve as much as possible the original document format. Still, some of the files required some work in order for it to be visible on both plain text and after converted to html. The conversion is actually: - add blank lines and identation in order to identify paragraphs; - fix tables markups; - add some lists markups; - mark literal blocks; - adjust title markups. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Heiko Carstens Documentation/admin-guide/kernel-parameters.txt | 4 +- Documentation/driver-api/s390-drivers.rst | 4 +- Documentation/s390/{3270.txt => 3270.rst} | 85 +- Documentation/s390/{cds.txt => cds.rst} | 368 +-- Documentation/s390/{CommonIO => common_io.rst} | 49 +- Documentation/s390/{DASD => dasd.rst} | 33 +- .../s390/{Debugging390.txt => debugging390.rst} | 2419 ++++++++++++-------- .../s390/{driver-model.txt => driver-model.rst} | 179 +- Documentation/s390/index.rst | 30 + .../s390/{monreader.txt => monreader.rst} | 85 +- Documentation/s390/{qeth.txt => qeth.rst} | 36 +- Documentation/s390/s390dbf.rst | 803 +++++++ Documentation/s390/s390dbf.txt | 667 ------ Documentation/s390/text_files.rst | 11 + Documentation/s390/{vfio-ap.txt => vfio-ap.rst} | 499 ++-- Documentation/s390/{vfio-ccw.txt => vfio-ccw.rst} | 92 +- Documentation/s390/{zfcpdump.txt => zfcpdump.rst} | 2 + MAINTAINERS | 4 +- arch/s390/Kconfig | 4 +- arch/s390/include/asm/debug.h | 4 +- drivers/s390/char/zcore.c | 2 +- 21 files changed, 3118 insertions(+), 2262 deletions(-) commit dc3988f40fdf7a51bd5480c3383372f463e4dfa9 Author: Mauro Carvalho Chehab Date: Sat Jun 8 23:27:15 2019 -0300 docs: Debugging390.txt: convert table to ascii artwork The first bit/value table inside the document is very hard to read and won't fit ReST format. Also, some columns aren't properly aligned. Convert it to a nice ascii artwork table with makes it easier to read as plain text and is compatible with ReST format parser on Sphinx. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Heiko Carstens Documentation/s390/Debugging390.txt | 210 ++++++++++++++++++++---------------- 1 file changed, 120 insertions(+), 90 deletions(-) commit 9ff3a5c88e1f1ab17a31402b96d45abe14aab9d7 Author: David Riley Date: Mon Jun 10 14:18:10 2019 -0700 drm/virtio: Add memory barriers for capset cache. After data is copied to the cache entry, atomic_set is used indicate that the data is the entry is valid without appropriate memory barriers. Similarly the read side was missing the corresponding memory barriers. Signed-off-by: David Riley Link: http://patchwork.freedesktop.org/patch/msgid/20190610211810.253227-5-davidriley@chromium.org Signed-off-by: Gerd Hoffmann drivers/gpu/drm/virtio/virtgpu_ioctl.c | 3 +++ drivers/gpu/drm/virtio/virtgpu_vq.c | 2 ++ 2 files changed, 5 insertions(+) commit c7cebffea2c7086850e4affeb9f232d34ae30f11 Author: Andrii Nakryiko Date: Mon Jun 10 10:46:55 2019 -0700 selftests/bpf: fix constness of source arg for bpf helpers Fix signature of bpf_probe_read and bpf_probe_write_user to mark source pointer as const. This causes warnings during compilation for applications relying on those helpers. Signed-off-by: Andrii Nakryiko Acked-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/bpf_helpers.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0ed3cc4abc10dc71f67a40e0c4b2c5c85e6aec82 Author: Jakub Kicinski Date: Fri Jun 7 10:11:16 2019 -0700 samples: bpf: don't run probes at the local make stage Quentin reports that commit 07c3bbdb1a9b ("samples: bpf: print a warning about headers_install") is producing the false positive when make is invoked locally, from the samples/bpf/ directory. When make is run locally it hits the "all" target, which will recursively invoke make through the full build system. Speed up the "local" run which doesn't actually build anything, and avoid false positives by skipping all the probes if not in kbuild environment (cover both the new warning and the BTF probes). Reported-by: Quentin Monnet Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Signed-off-by: Alexei Starovoitov samples/bpf/Makefile | 3 +++ 1 file changed, 3 insertions(+) commit ab1b3a957de3fa92e75b3ba7bd842263ecebf495 Merge: 4ecabd55c904 10a13bb40e54 Author: Alexei Starovoitov Date: Mon Jun 10 23:31:48 2019 -0700 Merge branch 'xskmap-lookup' Jonathan Lemon says: ==================== Currently, the AF_XDP code uses a separate map in order to determine if an xsk is bound to a queue. Have the xskmap lookup return a XDP_SOCK pointer on the kernel side, which the verifier uses to extract relevant values. Patches: 1 - adds XSK_SOCK type 2 - sync bpf.h with tools 3 - add tools selftest 4 - update lib/bpf, removing qidconf v4->v5: - xskmap lookup now returns XDP_SOCK type instead of pointer to element. - no changes lib/bpf/xsk.c v3->v4: - Clarify error handling path. v2->v3: - Use correct map type. ==================== Acked-by: Björn Töpel Signed-off-by: Alexei Starovoitov commit 10a13bb40e541d8cb1d5f36403aae3a0f1a2ee58 Author: Jonathan Lemon Date: Thu Jun 6 13:59:43 2019 -0700 libbpf: remove qidconf and better support external bpf programs. Use the recent change to XSKMAP bpf_map_lookup_elem() to test if there is a xsk present in the map instead of duplicating the work with qidconf. Fix things so callers using XSK_LIBBPF_FLAGS__INHIBIT_PROG_LOAD bypass any internal bpf maps, so xsk_socket__{create|delete} works properly. Clean up error handling path. Signed-off-by: Jonathan Lemon Acked-by: Song Liu Tested-by: Björn Töpel Signed-off-by: Alexei Starovoitov tools/lib/bpf/xsk.c | 103 ++++++++++++++-------------------------------------- 1 file changed, 28 insertions(+), 75 deletions(-) commit 940e7be34ab3d04b7e0b6dd57bdbda1d225c3d8c Author: Jonathan Lemon Date: Thu Jun 6 13:59:42 2019 -0700 tools/bpf: Add bpf_map_lookup_elem selftest for xskmap Check that bpf_map_lookup_elem lookup and structure access operats correctly. Signed-off-by: Jonathan Lemon Acked-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/verifier/sock.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 91eda5998c313282b5acfcc0b5133556382d0737 Author: Jonathan Lemon Date: Thu Jun 6 13:59:41 2019 -0700 bpf/tools: sync bpf.h Sync uapi/linux/bpf.h Signed-off-by: Jonathan Lemon Acked-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov tools/include/uapi/linux/bpf.h | 4 ++++ 1 file changed, 4 insertions(+) commit fada7fdc83c0bf8755956bff707c42b609223301 Author: Jonathan Lemon Date: Thu Jun 6 13:59:40 2019 -0700 bpf: Allow bpf_map_lookup_elem() on an xskmap Currently, the AF_XDP code uses a separate map in order to determine if an xsk is bound to a queue. Instead of doing this, have bpf_map_lookup_elem() return a xdp_sock. Rearrange some xdp_sock members to eliminate structure holes. Remove selftest - will be added back in later patch. Signed-off-by: Jonathan Lemon Acked-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov include/linux/bpf.h | 8 +++++ include/net/xdp_sock.h | 4 +-- include/uapi/linux/bpf.h | 4 +++ kernel/bpf/verifier.c | 26 ++++++++++++-- kernel/bpf/xskmap.c | 7 ++++ net/core/filter.c | 40 ++++++++++++++++++++++ .../selftests/bpf/verifier/prevent_map_lookup.c | 15 -------- 7 files changed, 85 insertions(+), 19 deletions(-) commit 0bb06cac060dd033153277a0d9dab9fd8aa455a2 Author: Eric Biggers Date: Tue May 28 12:59:08 2019 -0700 fscrypt: remove unnecessary includes of ratelimit.h These should have been removed during commit 544d08fde258 ("fscrypt: use a common logging function"), but I missed them. Signed-off-by: Eric Biggers fs/crypto/fname.c | 1 - fs/crypto/hooks.c | 1 - fs/crypto/keyinfo.c | 1 - 3 files changed, 3 deletions(-) commit 47b757fba2a382d5f818d1884fe87c4014818088 Author: Sam Ravnborg Date: Mon Jun 10 00:07:57 2019 +0200 drm/amd: drop use of drmP.h in remaining files With this commit drm/amd/ has no longer any uses of the deprecated drmP.h header file. Signed-off-by: Sam Ravnborg Reviewed-by: Alex Deucher Cc: "Christian König" Cc: "David (ChunMing) Zhou" Cc: David Airlie Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190609220757.10862-11-sam@ravnborg.org drivers/gpu/drm/amd/amdgpu/atombios_crtc.c | 2 +- drivers/gpu/drm/amd/amdgpu/atombios_dp.c | 2 +- drivers/gpu/drm/amd/amdgpu/atombios_encoders.c | 4 +++- drivers/gpu/drm/amd/amdgpu/atombios_i2c.c | 2 +- drivers/gpu/drm/amd/amdgpu/cik.c | 3 ++- drivers/gpu/drm/amd/amdgpu/cik_ih.c | 4 +++- drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 4 +++- drivers/gpu/drm/amd/amdgpu/cz_ih.c | 4 +++- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 5 ++++- drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 5 ++++- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 7 ++++++- drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 5 ++++- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 4 +++- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 4 +++- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 3 ++- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 3 ++- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 5 ++++- drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 5 ++++- drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 5 ++++- drivers/gpu/drm/amd/amdgpu/iceland_ih.c | 4 +++- drivers/gpu/drm/amd/amdgpu/kv_dpm.c | 1 - drivers/gpu/drm/amd/amdgpu/kv_smc.c | 1 - drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 4 +++- drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 2 +- drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 5 +++-- drivers/gpu/drm/amd/amdgpu/si.c | 3 ++- drivers/gpu/drm/amd/amdgpu/si_dma.c | 2 +- drivers/gpu/drm/amd/amdgpu/si_dpm.c | 4 +++- drivers/gpu/drm/amd/amdgpu/si_ih.c | 4 +++- drivers/gpu/drm/amd/amdgpu/si_smc.c | 2 +- drivers/gpu/drm/amd/amdgpu/soc15.c | 3 ++- drivers/gpu/drm/amd/amdgpu/tonga_ih.c | 4 +++- drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 2 +- drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c | 1 - drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/vega10_ih.c | 4 +++- drivers/gpu/drm/amd/amdgpu/vi.c | 4 +++- 43 files changed, 96 insertions(+), 44 deletions(-) commit fdf2f6c56e5e289c7d7e726b676aba25643b39a0 Author: Sam Ravnborg Date: Mon Jun 10 00:07:56 2019 +0200 drm/amd: drop use of drmP.h in amdgpu/amdgpu* Drop use of drmP.h in all files named amdgpu* in drm/amd/amdgpu/ Fix fallout. Signed-off-by: Sam Ravnborg Reviewed-by: Alex Deucher Cc: "Christian König" Cc: "David (ChunMing) Zhou" Cc: David Airlie Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190609220757.10862-10-sam@ravnborg.org drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_afmt.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 +++- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 7 +++++-- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 4 +++- drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 +++- drivers/gpu/drm/amd/amdgpu/amdgpu_encoders.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 14 +++++++------- drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 4 +++- drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 5 ++++- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 6 +++++- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 4 +++- drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_ioc32.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 5 ++++- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 5 ++++- drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_pll.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 5 ++++- drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c | 2 -- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_sa.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_test.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_trace_points.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 5 +++-- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 1 - 55 files changed, 95 insertions(+), 64 deletions(-) commit 09d21852a6f3bd8f96c0eb2d7bd9a3b8706f8bcd Author: Sam Ravnborg Date: Mon Jun 10 00:07:55 2019 +0200 drm/amd: drop use of drmP.h in display/ Drop all uses of drmP.h in drm/amd/display/. Fix fallout. Signed-off-by: Sam Ravnborg Reviewed-by: Alex Deucher Cc: "Christian König" Cc: "David (ChunMing) Zhou" Cc: David Airlie Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190609220757.10862-9-sam@ravnborg.org drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 +++- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 1 - drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c | 2 -- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c | 1 - drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c | 1 - 5 files changed, 3 insertions(+), 6 deletions(-) commit 9fdd91aa8cf43043690a41589e75359b4d837b92 Author: Sam Ravnborg Date: Mon Jun 10 00:07:54 2019 +0200 drm/amd: drop use of drmP.h in powerplay/ Delete the only include of drmP.h in powerplay/. Signed-off-by: Sam Ravnborg Reviewed-by: Alex Deucher Cc: "Christian König" Cc: "David (ChunMing) Zhou" Cc: David Airlie Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190609220757.10862-8-sam@ravnborg.org drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 831583c309105cfcfbbbb4b3875b09e5209d2b99 Author: Sam Ravnborg Date: Mon Jun 10 00:07:53 2019 +0200 drm/amd: drop use of drmP.h from all header files Drop use of the deprecated drmP.h header file from all amd header files. This makes it a more smooth process to get rid of drmP.h in the .c files. Added include files and forwards as appropriate. Signed-off-by: Sam Ravnborg Reviewed-by: Alex Deucher Cc: "Christian König" Cc: "David (ChunMing) Zhou" Cc: David Airlie Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190609220757.10862-7-sam@ravnborg.org drivers/gpu/drm/amd/amdgpu/amdgpu_sched.h | 5 ++++- drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 2 -- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 5 ++++- 3 files changed, 8 insertions(+), 4 deletions(-) commit 841d0023338c902e91ffa5c5954fd58dd9912e87 Author: Sam Ravnborg Date: Mon Jun 10 00:07:52 2019 +0200 drm/amd: drop use of drmP.h in atom.h Drop use of the deprecated drmP.h header from atom.h Fix fallout in various files. Signed-off-by: Sam Ravnborg Reviewed-by: Alex Deucher Cc: "Christian König" Cc: "David (ChunMing) Zhou" Cc: David Airlie Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190609220757.10862-6-sam@ravnborg.org drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 1 + drivers/gpu/drm/amd/amdgpu/atom.h | 3 ++- drivers/gpu/drm/amd/display/dc/bios/bios_parser.c | 2 ++ drivers/gpu/drm/amd/display/dc/core/dc_link.c | 2 ++ drivers/gpu/drm/amd/display/dc/dce/dce_abm.c | 2 ++ drivers/gpu/drm/amd/powerplay/hwmgr/smu_helper.c | 3 +++ drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 4 +++- 7 files changed, 15 insertions(+), 2 deletions(-) commit f867723b41f871c88388462c007976bb9a4c72da Author: Sam Ravnborg Date: Mon Jun 10 00:07:51 2019 +0200 drm/amd: drop use of drmP.h in amdgpu.h Delete the unused drmP.h from amdgpu.h. Fix fallout in various files. Signed-off-by: Sam Ravnborg Reviewed-by: Alex Deucher Cc: "Christian König" Cc: "David (ChunMing) Zhou" Cc: David Airlie Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190609220757.10862-5-sam@ravnborg.org drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c | 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 4 ++++ drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 2 ++ drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 4 ++++ drivers/gpu/drm/amd/amdgpu/psp_v10_0.c | 3 +++ drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 2 ++ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c | 1 + drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 4 +++- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 1 + drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 1 + drivers/gpu/drm/amd/powerplay/hwmgr/vega10_processpptables.c | 1 + drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c | 1 + drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c | 1 + drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c | 2 ++ drivers/gpu/drm/amd/powerplay/smumgr/smu10_smumgr.c | 2 ++ drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c | 1 + drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c | 2 ++ 19 files changed, 38 insertions(+), 3 deletions(-) commit 4fc4dca8320e46b067037496fde3a6d95381d60f Author: Sam Ravnborg Date: Mon Jun 10 00:07:50 2019 +0200 drm/amd: drop use of drmp.h in os_types.h Drop use of the deprecated drmP.h from display/dc/os_types.h Fix all fallout after this change. Most of the fixes was adding a missing include of vmalloc.h. Signed-off-by: Sam Ravnborg Reviewed-by: Alex Deucher Cc: "Christian König" Cc: "David (ChunMing) Zhou" Cc: David Airlie Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190609220757.10862-4-sam@ravnborg.org drivers/gpu/drm/amd/display/dc/basics/vector.c | 2 ++ drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 2 ++ drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c | 2 ++ drivers/gpu/drm/amd/display/dc/core/dc.c | 2 ++ drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c | 2 ++ drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 3 +++ drivers/gpu/drm/amd/display/dc/core/dc_sink.c | 2 ++ drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 1 + drivers/gpu/drm/amd/display/dc/core/dc_surface.c | 2 ++ drivers/gpu/drm/amd/display/dc/dce/dce_audio.c | 2 ++ drivers/gpu/drm/amd/display/dc/dce/dce_aux.c | 1 + drivers/gpu/drm/amd/display/dc/dce/dce_clk_mgr.c | 2 ++ drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c | 2 ++ drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c | 1 + drivers/gpu/drm/amd/display/dc/dce/dce_ipp.c | 2 ++ drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 1 + drivers/gpu/drm/amd/display/dc/dce/dce_opp.c | 2 ++ drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c | 3 +++ drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.c | 1 + drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c | 2 ++ drivers/gpu/drm/amd/display/dc/dce112/dce112_compressor.c | 1 + drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c | 2 ++ drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c | 2 ++ drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c | 2 ++ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_clk_mgr.c | 2 ++ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_ipp.c | 2 ++ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_link_encoder.c | 1 + drivers/gpu/drm/amd/display/dc/dcn10/dcn10_opp.c | 2 ++ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 2 ++ drivers/gpu/drm/amd/display/dc/gpio/gpio_base.c | 2 ++ drivers/gpu/drm/amd/display/dc/gpio/gpio_service.c | 2 ++ drivers/gpu/drm/amd/display/dc/gpio/hw_ddc.c | 1 + drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c | 2 ++ drivers/gpu/drm/amd/display/dc/gpio/hw_hpd.c | 2 ++ drivers/gpu/drm/amd/display/dc/irq/dce110/irq_service_dce110.c | 2 ++ drivers/gpu/drm/amd/display/dc/irq/dce120/irq_service_dce120.c | 2 ++ drivers/gpu/drm/amd/display/dc/irq/dce80/irq_service_dce80.c | 2 ++ drivers/gpu/drm/amd/display/dc/irq/dcn10/irq_service_dcn10.c | 2 ++ drivers/gpu/drm/amd/display/dc/irq/irq_service.c | 2 ++ drivers/gpu/drm/amd/display/dc/os_types.h | 8 +++++--- drivers/gpu/drm/amd/display/dc/virtual/virtual_link_encoder.c | 2 ++ drivers/gpu/drm/amd/display/dc/virtual/virtual_stream_encoder.c | 2 ++ drivers/gpu/drm/amd/display/modules/color/color_gamma.c | 3 +++ drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 2 ++ 44 files changed, 86 insertions(+), 3 deletions(-) commit c366be543c5ea35f4d4103f5ee69f052ce2bffe1 Author: Sam Ravnborg Date: Mon Jun 10 00:07:49 2019 +0200 drm/amd: drop dependencies on drm_os_linux.h Fix so no files in drm/amd/ depends on the deprecated drm_os_linux.h header file. It was done manually: - remove drm_os_linux.h from drmP.h - fix all build errros Signed-off-by: Sam Ravnborg Reviewed-by: Alex Deucher Cc: "Christian König" Cc: "David (ChunMing) Zhou" Cc: David Airlie Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190609220757.10862-3-sam@ravnborg.org drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 4 +++- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 17 ++++++++++------- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 8 ++++---- drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 5 ++++- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 5 ++++- drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 5 ++++- drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 5 ++++- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 4 +++- drivers/gpu/drm/amd/amdgpu/si_dma.c | 2 +- drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 2 +- drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c | 4 +++- drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 4 ++-- drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c | 2 ++ drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 2 ++ drivers/gpu/drm/amd/display/dc/dc_helper.c | 3 +++ drivers/gpu/drm/amd/display/dc/dce/dce_aux.c | 2 ++ drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c | 2 ++ drivers/gpu/drm/amd/display/dc/dce/dce_i2c_hw.c | 3 +++ drivers/gpu/drm/amd/display/dc/dce/dce_i2c_sw.c | 3 +++ drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 2 ++ drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c | 2 ++ .../gpu/drm/amd/display/dc/dce110/dce110_compressor.c | 2 ++ .../gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 3 +++ .../drm/amd/display/dc/dce110/dce110_opp_regamma_v.c | 2 ++ .../gpu/drm/amd/display/dc/dce110/dce110_transform_v.c | 2 ++ .../gpu/drm/amd/display/dc/dce112/dce112_compressor.c | 2 ++ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubbub.c | 2 ++ .../gpu/drm/amd/display/dc/dcn10/dcn10_link_encoder.c | 2 ++ .../gpu/drm/amd/display/dc/dcn10/dcn10_stream_encoder.c | 1 + drivers/gpu/drm/amd/display/dc/gpio/hw_ddc.c | 2 ++ 36 files changed, 90 insertions(+), 28 deletions(-) commit 656600efd67b9b185bc1c85ec68d9420c2bbb812 Author: Sam Ravnborg Date: Mon Jun 10 00:07:48 2019 +0200 drm: fix build errors with drm_print.h drm_print.h requires to fix build when macros are used. Pull in the header file in drm_print.h so users do not have to do it. Signed-off-by: Sam Ravnborg Reviewed-by: Alex Deucher Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190609220757.10862-2-sam@ravnborg.org include/drm/drm_print.h | 2 ++ 1 file changed, 2 insertions(+) commit 04c41bcb862bbec1fb225243ecf07a3219593f81 Author: Arnaldo Carvalho de Melo Date: Mon Jun 10 15:37:45 2019 -0300 perf trace: Skip unknown syscalls when expanding strace like syscall groups We have $INSTALL_DIR/share/perf-core/strace/groups/string files with syscalls that should be selected when 'string' is used, meaning, in this case, syscalls that receive as one of its arguments a string, like a pathname. But those were first selected and tested on x86_64, and end up failing in architectures where some of those syscalls are not available, like the 'access' syscall on arm64, which makes using 'perf trace -e string' in such archs to fail. Since this the routine doing the validation is used only when reading such files, do not fail when some syscall is not found in the syscalltbl, instead just use pr_debug() to register that in case people are suspicious of problems. Now using 'perf trace -e string' should work on arm64, selecting only the syscalls that have a string and are available on that architecture. Reported-by: Leo Yan Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Jiri Olsa Cc: Martin KaFai Lau Cc: Mathieu Poirier Cc: Mike Leach Cc: Namhyung Kim Cc: Song Liu Cc: Suzuki K Poulose Cc: Yonghong Song Link: https://lkml.kernel.org/r/20190610184754.GU21245@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-trace.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) commit 180ca71cf1be6030ba7eb4515bf2224c07b62631 Author: Thomas Richter Date: Wed May 22 08:43:25 2019 +0200 perf report: Support s390 diag event display on x86 Perf report fails to display s390 specific event numbered bd000 on an x86 platform. For example on s390 this works without error: [root@m35lp76 perf]# uname -m s390x [root@m35lp76 perf]# ./perf record -e rbd000 -- find / >/dev/null [ perf record: Woken up 3 times to write data ] [ perf record: Captured and wrote 0.549 MB perf.data ] [root@m35lp76 perf]# ./perf report -D --stdio > /dev/null [root@m35lp76 perf]# Transfering this perf.data file to an x86 platform and executing the same report command produces: [root@f29 perf]# uname -m x86_64 [root@f29 perf]# ./perf report -i ~/perf.data.m35lp76 --stdio interpreting bpf_prog_info from systems with endianity is not yet supported interpreting btf from systems with endianity is not yet supported 0x8c890 [0x8]: failed to process type: 68 Error: failed to process sample Event bd000 generates auxiliary data which is stored in big endian format in the perf data file. This error is caused by missing endianess handling on the x86 platform when the data is displayed. Fix this by handling s390 auxiliary event data depending on the local platform endianness. Output after on x86: [root@f29 perf]# ./perf report -D -i ~/perf.data.m35lp76 --stdio > /dev/null interpreting bpf_prog_info from systems with endianity is not yet supported interpreting btf from systems with endianity is not yet supported [root@f29 perf]# Committer notes: Fix build breakage on older systems, such as CentOS:6 where using nesting calls to the endian.h macros end up redefining local variables: util/s390-cpumsf.c: In function 's390_cpumsf_trailer_show': util/s390-cpumsf.c:333: error: declaration of '__v' shadows a previous local util/s390-cpumsf.c:333: error: shadowed declaration is here util/s390-cpumsf.c:333: error: declaration of '__x' shadows a previous local util/s390-cpumsf.c:333: error: shadowed declaration is here util/s390-cpumsf.c:334: error: declaration of '__v' shadows a previous local util/s390-cpumsf.c:334: error: shadowed declaration is here util/s390-cpumsf.c:334: error: declaration of '__x' shadows a previous local util/s390-cpumsf.c:334: error: shadowed declaration is here [perfbuilder@455a63ef60dc perf]$ gcc -v |& tail -1 gcc version 4.4.7 20120313 (Red Hat 4.4.7-23) (GCC) [perfbuilder@455a63ef60dc perf]$ Since there are several uses of be64toh(te->flags) Introduce a variable to hold that and then use it, avoiding this case that causes the above problems: - local.bsdes = be16toh((be64toh(te->flags) >> 16 & 0xffff)); + local.bsdes = be16toh((flags >> 16 & 0xffff)); Its the same construct used in s390_cpumsf_diag_show() where we have a 'word' variable that is used just once, s390_cpumsf_basic_show() has lots of uses and also uses a variable to hold the result of be16toh(). Some of those temp variables needed to be converted from 'unsigned long' to 'unsigned long long' so as to build on 32-bit arches such as debian:experimental-x-mipsel, the android NDK ones and fedora:24-x-ARC-uClibc. Signed-off-by: Thomas Richter Reviewed-by: Hendrik Brueckner Cc: Heiko Carstens Cc: Hendrik Brueckner Cc: Martin Schwidefsky Link: http://lkml.kernel.org/r/20190522064325.25596-1-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/s390-cpumsf.c | 96 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 78 insertions(+), 18 deletions(-) commit 515f0453752e3daba7c47d37d9172a66509a56fd Author: Uros Bizjak Date: Thu Jun 6 22:00:44 2019 +0200 x86/resctrl: Use _ASM_BX to avoid ifdeffery Use the _ASM_BX macro which expands to either %rbx or %ebx, depending on the 32-bit or 64-bit config selected. Signed-off-by: Uros Bizjak Signed-off-by: Borislav Petkov Acked-by: Reinette Chatre Cc: Fenghua Yu Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/20190606200044.5730-1-ubizjak@gmail.com arch/x86/kernel/cpu/resctrl/pseudo_lock.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit c182615f3ea31eb4df6133beb0d62d8ff7b83e08 Author: Sam Ravnborg Date: Sat Jun 8 10:02:41 2019 +0200 drm/radeon: drop use of drmP.h (2/2) Drop use of drmP.h in remaining .c files. To ease review a little the drmP.h removal was divided in two commits. Signed-off-by: Sam Ravnborg Reviewed-by: Alex Deucher Cc: "Christian König" Cc: "David (ChunMing) Zhou" Cc: David Airlie Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190608080241.4958-8-sam@ravnborg.org drivers/gpu/drm/radeon/atombios_crtc.c | 7 +++++-- drivers/gpu/drm/radeon/atombios_dp.c | 2 +- drivers/gpu/drm/radeon/atombios_encoders.c | 14 +++++++++----- drivers/gpu/drm/radeon/atombios_i2c.c | 2 +- drivers/gpu/drm/radeon/btc_dpm.c | 16 +++++++++------- drivers/gpu/drm/radeon/ci_dpm.c | 14 ++++++++------ drivers/gpu/drm/radeon/ci_smc.c | 2 +- drivers/gpu/drm/radeon/cik.c | 14 +++++++++----- drivers/gpu/drm/radeon/cik_sdma.c | 2 +- drivers/gpu/drm/radeon/cypress_dpm.c | 11 ++++++----- drivers/gpu/drm/radeon/dce3_1_afmt.c | 2 +- drivers/gpu/drm/radeon/dce6_afmt.c | 2 +- drivers/gpu/drm/radeon/evergreen.c | 16 ++++++++++------ drivers/gpu/drm/radeon/evergreen_cs.c | 2 +- drivers/gpu/drm/radeon/evergreen_dma.c | 2 +- drivers/gpu/drm/radeon/evergreen_hdmi.c | 2 +- drivers/gpu/drm/radeon/kv_dpm.c | 10 ++++++---- drivers/gpu/drm/radeon/kv_smc.c | 1 - drivers/gpu/drm/radeon/ni.c | 17 ++++++++++------- drivers/gpu/drm/radeon/ni_dma.c | 2 +- drivers/gpu/drm/radeon/ni_dpm.c | 16 +++++++++------- drivers/gpu/drm/radeon/r100.c | 26 ++++++++++++++++---------- drivers/gpu/drm/radeon/r200.c | 2 +- drivers/gpu/drm/radeon/r300.c | 16 +++++++++++----- drivers/gpu/drm/radeon/r420.c | 16 +++++++++++----- drivers/gpu/drm/radeon/r520.c | 2 +- drivers/gpu/drm/radeon/r600.c | 14 ++++++++++---- drivers/gpu/drm/radeon/r600_cs.c | 2 +- drivers/gpu/drm/radeon/r600_dma.c | 2 +- drivers/gpu/drm/radeon/r600_dpm.c | 1 - drivers/gpu/drm/radeon/r600_hdmi.c | 2 +- drivers/gpu/drm/radeon/rs400.c | 7 ++++++- drivers/gpu/drm/radeon/rs600.c | 10 ++++++---- drivers/gpu/drm/radeon/rs690.c | 6 ++++-- drivers/gpu/drm/radeon/rs780_dpm.c | 12 +++++++----- drivers/gpu/drm/radeon/rv515.c | 11 ++++++++--- drivers/gpu/drm/radeon/rv6xx_dpm.c | 1 - drivers/gpu/drm/radeon/rv730_dpm.c | 1 - drivers/gpu/drm/radeon/rv740_dpm.c | 1 - drivers/gpu/drm/radeon/rv770.c | 12 ++++++++---- drivers/gpu/drm/radeon/rv770_dma.c | 2 +- drivers/gpu/drm/radeon/rv770_dpm.c | 1 - drivers/gpu/drm/radeon/rv770_smc.c | 2 +- drivers/gpu/drm/radeon/si.c | 16 ++++++++++------ drivers/gpu/drm/radeon/si_dma.c | 2 +- drivers/gpu/drm/radeon/si_dpm.c | 14 ++++++++------ drivers/gpu/drm/radeon/si_smc.c | 2 +- drivers/gpu/drm/radeon/sumo_dpm.c | 1 - drivers/gpu/drm/radeon/sumo_smc.c | 1 - drivers/gpu/drm/radeon/trinity_dpm.c | 10 ++++++---- drivers/gpu/drm/radeon/trinity_smc.c | 1 - drivers/gpu/drm/radeon/uvd_v1_0.c | 2 +- drivers/gpu/drm/radeon/uvd_v2_2.c | 2 +- drivers/gpu/drm/radeon/uvd_v3_1.c | 1 - drivers/gpu/drm/radeon/uvd_v4_2.c | 2 +- drivers/gpu/drm/radeon/vce_v1_0.c | 2 +- drivers/gpu/drm/radeon/vce_v2_0.c | 2 +- 57 files changed, 216 insertions(+), 147 deletions(-) commit f91831274e6ed2e6f7514dd16f20816f6753057d Author: Sam Ravnborg Date: Sat Jun 8 10:02:40 2019 +0200 drm/radeon: drop use of drmP.h (1/2) Drop use of drmP.h in all .c files named radeon*c. To ease review a little drmP.h removal was divided in two commits. Signed-off-by: Sam Ravnborg Reviewed-by: Alex Deucher Cc: "Christian König" Cc: "David (ChunMing) Zhou" Cc: David Airlie Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190608080241.4958-7-sam@ravnborg.org drivers/gpu/drm/radeon/radeon_acpi.c | 13 ++++++++----- drivers/gpu/drm/radeon/radeon_agp.c | 8 ++++++-- drivers/gpu/drm/radeon/radeon_asic.c | 10 ++++++---- drivers/gpu/drm/radeon/radeon_atombios.c | 5 ++++- drivers/gpu/drm/radeon/radeon_audio.c | 2 +- drivers/gpu/drm/radeon/radeon_benchmark.c | 2 +- drivers/gpu/drm/radeon/radeon_bios.c | 12 ++++++++---- drivers/gpu/drm/radeon/radeon_clocks.c | 9 ++++++--- drivers/gpu/drm/radeon/radeon_combios.c | 5 ++++- drivers/gpu/drm/radeon/radeon_connectors.c | 2 +- drivers/gpu/drm/radeon/radeon_cs.c | 10 ++++++++-- drivers/gpu/drm/radeon/radeon_cursor.c | 4 +++- drivers/gpu/drm/radeon/radeon_device.c | 18 +++++++++++------ drivers/gpu/drm/radeon/radeon_display.c | 21 ++++++++++++-------- drivers/gpu/drm/radeon/radeon_dp_auxch.c | 2 +- drivers/gpu/drm/radeon/radeon_dp_mst.c | 5 +++-- drivers/gpu/drm/radeon/radeon_drv.c | 19 +++++++++++------- drivers/gpu/drm/radeon/radeon_encoders.c | 5 ++++- drivers/gpu/drm/radeon/radeon_fb.c | 13 +++++++------ drivers/gpu/drm/radeon/radeon_fence.c | 6 ++++-- drivers/gpu/drm/radeon/radeon_gart.c | 5 ++++- drivers/gpu/drm/radeon/radeon_gem.c | 7 ++++++- drivers/gpu/drm/radeon/radeon_i2c.c | 5 ++++- drivers/gpu/drm/radeon/radeon_ib.c | 5 ++++- drivers/gpu/drm/radeon/radeon_irq_kms.c | 14 +++++++++---- drivers/gpu/drm/radeon/radeon_kms.c | 17 ++++++++++------ drivers/gpu/drm/radeon/radeon_legacy_crtc.c | 9 ++++++--- drivers/gpu/drm/radeon/radeon_legacy_encoders.c | 11 ++++++++--- drivers/gpu/drm/radeon/radeon_legacy_tv.c | 4 +++- drivers/gpu/drm/radeon/radeon_mn.c | 2 +- drivers/gpu/drm/radeon/radeon_object.c | 9 ++++++--- drivers/gpu/drm/radeon/radeon_pm.c | 17 ++++++++++------ drivers/gpu/drm/radeon/radeon_prime.c | 8 +++++--- drivers/gpu/drm/radeon/radeon_ring.c | 6 +++++- drivers/gpu/drm/radeon/radeon_sa.c | 2 +- drivers/gpu/drm/radeon/radeon_semaphore.c | 2 +- drivers/gpu/drm/radeon/radeon_sync.c | 1 - drivers/gpu/drm/radeon/radeon_test.c | 2 +- drivers/gpu/drm/radeon/radeon_trace_points.c | 2 +- drivers/gpu/drm/radeon/radeon_ttm.c | 26 ++++++++++++++++--------- drivers/gpu/drm/radeon/radeon_ucode.c | 2 +- drivers/gpu/drm/radeon/radeon_uvd.c | 2 +- drivers/gpu/drm/radeon/radeon_vce.c | 2 +- drivers/gpu/drm/radeon/radeon_vm.c | 2 +- 44 files changed, 221 insertions(+), 112 deletions(-) commit 88f489d26b0438ea29ad4fd9e0bcc61f668ed020 Author: Sam Ravnborg Date: Sat Jun 8 10:02:39 2019 +0200 drm/radeon: prepare header files for drmP.h removal While removing drmP.h from all .c files the list of header files are also sorted alphabetically. To allow this adjust the header files to pull in the dependencies they needed to allow this. Signed-off-by: Sam Ravnborg Reviewed-by: Alex Deucher Cc: "Christian König" Cc: "David (ChunMing) Zhou" Cc: David Airlie Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190608080241.4958-6-sam@ravnborg.org drivers/gpu/drm/radeon/btc_dpm.h | 3 +++ drivers/gpu/drm/radeon/ci_dpm.h | 1 + drivers/gpu/drm/radeon/clearstate_cayman.h | 2 ++ drivers/gpu/drm/radeon/clearstate_ci.h | 2 ++ drivers/gpu/drm/radeon/clearstate_si.h | 2 ++ drivers/gpu/drm/radeon/r100_track.h | 2 ++ drivers/gpu/drm/radeon/r600_dpm.h | 2 ++ drivers/gpu/drm/radeon/radeon_trace.h | 4 +++- drivers/gpu/drm/radeon/rv770_dpm.h | 1 + drivers/gpu/drm/radeon/sumo_dpm.h | 1 + 10 files changed, 19 insertions(+), 1 deletion(-) commit 2ed9aa0ff3bd9fc5e58eb87e0a4c1fe82c9f0598 Author: Sam Ravnborg Date: Sat Jun 8 10:02:38 2019 +0200 drm/radeon: drop drmP.h from header files To ease conversion of .c files drop include of drmP.h from all header files. And fix-up build errors caused by this. Signed-off-by: Sam Ravnborg Reviewed-by: Alex Deucher Cc: "Christian König" Cc: "David (ChunMing) Zhou" Cc: David Airlie Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190608080241.4958-5-sam@ravnborg.org drivers/gpu/drm/radeon/atom.c | 2 ++ drivers/gpu/drm/radeon/atom.h | 1 - drivers/gpu/drm/radeon/radeon_trace.h | 2 -- 3 files changed, 2 insertions(+), 3 deletions(-) commit 0e1a351d90c87a7d67786d47e466186e27b7d77a Author: Sam Ravnborg Date: Sat Jun 8 10:02:37 2019 +0200 drm/radeon: drop dependency on drm_os_linux.h The drm_os_linux.h header file is deprecated. Drop all uses of symbols from this file. All macros are just opencoded. A few adjustments to include files was required as the obsolete drm_os_linux.h included these headers. Signed-off-by: Sam Ravnborg Reviewed-by: Alex Deucher Cc: "Christian König" Cc: "David (ChunMing) Zhou" Cc: David Airlie Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190608080241.4958-4-sam@ravnborg.org drivers/gpu/drm/radeon/cik.c | 4 ++-- drivers/gpu/drm/radeon/cik_sdma.c | 4 ++-- drivers/gpu/drm/radeon/r100.c | 10 +++++----- drivers/gpu/drm/radeon/r300.c | 2 +- drivers/gpu/drm/radeon/r520.c | 2 +- drivers/gpu/drm/radeon/r600.c | 4 ++-- drivers/gpu/drm/radeon/r600_dma.c | 4 ++-- drivers/gpu/drm/radeon/radeon_fence.c | 10 +++++++--- drivers/gpu/drm/radeon/radeon_vce.c | 2 +- drivers/gpu/drm/radeon/rs400.c | 4 ++-- drivers/gpu/drm/radeon/rs600.c | 3 +++ drivers/gpu/drm/radeon/rv515.c | 2 +- drivers/gpu/drm/radeon/uvd_v1_0.c | 2 +- 13 files changed, 30 insertions(+), 23 deletions(-) commit a7d469cc99b16cfda51d1c8a5ea250119c3e220a Author: Sam Ravnborg Date: Sat Jun 8 10:02:36 2019 +0200 drm: drm_debugfs.h self-contained While removing drmP.h from drm/radeon a few files ended up including drm_debugfs.h as the first file. This failed build due to missing dependencies in drm_debugfs.h. Add the missing include files. Signed-off-by: Sam Ravnborg Reviewed-by: Alex Deucher Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190608080241.4958-3-sam@ravnborg.org include/drm/drm_debugfs.h | 2 ++ 1 file changed, 2 insertions(+) commit 75f3f70f0462f443283e66d8448bed9330073178 Author: Sam Ravnborg Date: Sat Jun 8 10:02:35 2019 +0200 drm: drm_crtc.h self-contained While removing drmP.h from drm/radeon a few files ended up including drm_crtc.h as the first file. This failed build due to a missing dependency in drm_crtc.h. Add the missing include file. Signed-off-by: Sam Ravnborg Reviewed-by: Alex Deucher Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190608080241.4958-2-sam@ravnborg.org include/drm/drm_crtc.h | 1 + 1 file changed, 1 insertion(+) commit 5a949b38839e284b1307540c56b03caf57da9736 Author: Kairui Song Date: Mon Jun 10 15:36:17 2019 +0800 x86/kexec: Add the ACPI NVS region to the ident map With the recent addition of RSDP parsing in the decompression stage, a kexec-ed kernel now needs ACPI tables to be covered by the identity mapping. And in commit 6bbeb276b71f ("x86/kexec: Add the EFI system tables and ACPI tables to the ident map") the ACPI tables memory region was added to the ident map. But some machines have only an ACPI NVS memory region and the ACPI tables are located in that region. In such case, the kexec-ed kernel will still fail when trying to access ACPI tables if they're not mapped. So add the NVS memory region to the ident map as well. [ bp: Massage. ] Fixes: 6bbeb276b71f ("x86/kexec: Add the EFI system tables and ACPI tables to the ident map") Suggested-by: Junichi Nomura Signed-off-by: Kairui Song Signed-off-by: Borislav Petkov Tested-by: Junichi Nomura Cc: Baoquan He Cc: Chao Fan Cc: Dave Young Cc: Dirk van der Merwe Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: kexec@lists.infradead.org Cc: Lianbo Jiang Cc: "Rafael J. Wysocki" Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/20190610073617.19767-1-kasong@redhat.com arch/x86/kernel/machine_kexec_64.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit 7a15414252ae4f1d450462d83f883b2d9d8036ee Author: Jason Gunthorpe Date: Wed Jun 5 14:39:26 2019 -0300 RDMA: Move owner into struct ib_device_ops This more closely follows how other subsytems work, with owner being a member of the structure containing the function pointers. Signed-off-by: Jason Gunthorpe Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/device.c | 4 ++++ drivers/infiniband/core/uverbs_main.c | 6 +++--- drivers/infiniband/hw/bnxt_re/main.c | 2 +- drivers/infiniband/hw/cxgb3/iwch_provider.c | 2 +- drivers/infiniband/hw/cxgb4/provider.c | 2 +- drivers/infiniband/hw/efa/efa_main.c | 2 +- drivers/infiniband/hw/hfi1/verbs.c | 2 +- drivers/infiniband/hw/hns/hns_roce_main.c | 2 +- drivers/infiniband/hw/i40iw/i40iw_verbs.c | 2 +- drivers/infiniband/hw/mlx4/main.c | 2 +- drivers/infiniband/hw/mlx5/main.c | 2 +- drivers/infiniband/hw/mthca/mthca_provider.c | 3 +-- drivers/infiniband/hw/nes/nes_verbs.c | 2 +- drivers/infiniband/hw/ocrdma/ocrdma_main.c | 2 +- drivers/infiniband/hw/qedr/main.c | 2 +- drivers/infiniband/hw/qib/qib_verbs.c | 2 +- drivers/infiniband/hw/usnic/usnic_ib_main.c | 2 +- drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c | 2 +- drivers/infiniband/sw/rxe/rxe_verbs.c | 2 +- include/rdma/ib_verbs.h | 2 +- 20 files changed, 25 insertions(+), 22 deletions(-) commit 72c6ec18eb6161c8fc672ae96ec5c77df4d07405 Author: Jason Gunthorpe Date: Wed Jun 5 14:39:25 2019 -0300 RDMA: Move uverbs_abi_ver into struct ib_device_ops No reason for every driver to emit code to set this, just make it part of the driver's existing static const ops structure. Signed-off-by: Jason Gunthorpe Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/device.c | 2 ++ drivers/infiniband/core/uverbs_main.c | 2 +- drivers/infiniband/hw/bnxt_re/ib_verbs.c | 6 +++--- drivers/infiniband/hw/bnxt_re/main.c | 2 +- drivers/infiniband/hw/cxgb3/iwch_provider.c | 2 +- drivers/infiniband/hw/cxgb4/provider.c | 2 +- drivers/infiniband/hw/efa/efa_main.c | 2 +- drivers/infiniband/hw/hns/hns_roce_main.c | 2 +- drivers/infiniband/hw/i40iw/i40iw_verbs.c | 2 ++ drivers/infiniband/hw/mlx4/main.c | 15 ++++++++------- drivers/infiniband/hw/mlx5/main.c | 2 +- drivers/infiniband/hw/mthca/mthca_provider.c | 2 +- drivers/infiniband/hw/nes/nes_verbs.c | 2 ++ drivers/infiniband/hw/ocrdma/ocrdma_main.c | 2 +- drivers/infiniband/hw/qedr/main.c | 2 +- drivers/infiniband/hw/usnic/usnic_ib_main.c | 2 +- drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c | 2 +- drivers/infiniband/sw/rdmavt/vt.c | 3 ++- drivers/infiniband/sw/rxe/rxe_verbs.c | 2 +- include/rdma/ib_verbs.h | 2 +- 20 files changed, 33 insertions(+), 25 deletions(-) commit b9560a419bfd498279333387817adcf5faef2825 Author: Jason Gunthorpe Date: Wed Jun 5 14:39:24 2019 -0300 RDMA: Move driver_id into struct ib_device_ops No reason for every driver to emit code to set this, just make it part of the driver's existing static const ops structure. Signed-off-by: Jason Gunthorpe Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/device.c | 12 +++++++++--- drivers/infiniband/core/uverbs_uapi.c | 2 +- drivers/infiniband/hw/bnxt_re/main.c | 3 ++- drivers/infiniband/hw/cxgb3/iwch_provider.c | 3 ++- drivers/infiniband/hw/cxgb4/provider.c | 3 ++- drivers/infiniband/hw/efa/efa_main.c | 3 ++- drivers/infiniband/hw/hfi1/verbs.c | 4 +++- drivers/infiniband/hw/hns/hns_roce_main.c | 3 ++- drivers/infiniband/hw/i40iw/i40iw_verbs.c | 3 ++- drivers/infiniband/hw/mlx4/main.c | 3 ++- drivers/infiniband/hw/mlx5/main.c | 3 ++- drivers/infiniband/hw/mthca/mthca_provider.c | 3 ++- drivers/infiniband/hw/nes/nes_verbs.c | 3 ++- drivers/infiniband/hw/ocrdma/ocrdma_main.c | 3 ++- drivers/infiniband/hw/qedr/main.c | 3 ++- drivers/infiniband/hw/qib/qib_verbs.c | 4 +++- drivers/infiniband/hw/usnic/usnic_ib_main.c | 3 ++- drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c | 3 ++- drivers/infiniband/sw/rdmavt/vt.c | 3 +-- drivers/infiniband/sw/rxe/rxe_verbs.c | 3 ++- include/rdma/ib_verbs.h | 3 ++- include/rdma/rdma_vt.h | 2 +- 22 files changed, 50 insertions(+), 25 deletions(-) commit 51bd6f291583684f495ea498984dfc22049d7fd2 Author: Asmaa Mnebhi Date: Mon Jun 10 14:57:02 2019 -0400 Add support for IPMB driver Support receiving IPMB requests on a Satellite MC from the BMC. Once a response is ready, this driver will send back a response to the BMC via the IPMB channel. Signed-off-by: Asmaa Mnebhi Acked-by: vadimp@mellanox.com Message-Id: <319690553a0da2a1e80b400941341081b383e5f1.1560192707.git.Asmaa@mellanox.com> [Move the config option to outside the ipmi msghandler, as it's not dependent on that. Fixed one small whitespace issue.] Signed-off-by: Corey Minyard Documentation/IPMB.txt | 103 +++++++++++ drivers/char/ipmi/Kconfig | 8 + drivers/char/ipmi/Makefile | 1 + drivers/char/ipmi/ipmb_dev_int.c | 364 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 476 insertions(+) commit a8cff4c8283af35546339c9ada5a90a70fe4a075 Author: Chris Wilson Date: Mon Jun 10 15:54:30 2019 +0100 drm/i915: Promote i915->mm.obj_lock to be irqsafe The intent is to be able to update the mm.lists from inside an irqsoff section (e.g. from a softirq rcu workqueue), ergo we need to make the i915->mm.obj_lock irqsafe. v2: can_discard_pages() ensures we are shrinkable v3: Beware shadowing of 'flags' Fixes: 3b4fa9640ccd ("drm/i915: Track the purgeable objects on a separate eviction list") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110869 Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20190610145430.17717-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gem/i915_gem_domain.c | 23 ++++++++++------- drivers/gpu/drm/i915/gem/i915_gem_object.c | 12 ++++++--- drivers/gpu/drm/i915/gem/i915_gem_pages.c | 16 +++++++++--- drivers/gpu/drm/i915/gem/i915_gem_shrinker.c | 38 +++++++++++++++------------- drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 5 ++-- drivers/gpu/drm/i915/i915_debugfs.c | 10 +++++--- drivers/gpu/drm/i915/i915_gem.c | 8 ++++-- drivers/gpu/drm/i915/i915_vma.c | 17 ++++++++----- 8 files changed, 80 insertions(+), 49 deletions(-) commit 8a07aa4e9b7b0222129c07afff81634a884b2866 Author: Thomas Richter Date: Thu May 23 10:25:21 2019 +0200 perf report: Fix OOM error in TUI mode on s390 Debugging a OOM error using the TUI interface revealed this issue on s390: [tmricht@m83lp54 perf]$ cat /proc/kallsyms |sort .... 00000001119b7158 B radix_tree_node_cachep 00000001119b8000 B __bss_stop 00000001119b8000 B _end 000003ff80002850 t autofs_mount [autofs4] 000003ff80002868 t autofs_show_options [autofs4] 000003ff80002a98 t autofs_evict_inode [autofs4] .... There is a huge gap between the last kernel symbol __bss_stop/_end and the first kernel module symbol autofs_mount (from autofs4 module). After reading the kernel symbol table via functions: dso__load() +--> dso__load_kernel_sym() +--> dso__load_kallsyms() +--> __dso_load_kallsyms() +--> symbols__fixup_end() the symbol __bss_stop has a start address of 1119b8000 and an end address of 3ff80002850, as can be seen by this debug statement: symbols__fixup_end __bss_stop start:0x1119b8000 end:0x3ff80002850 The size of symbol __bss_stop is 0x3fe6e64a850 bytes! It is the last kernel symbol and fills up the space until the first kernel module symbol. This size kills the TUI interface when executing the following code: process_sample_event() hist_entry_iter__add() hist_iter__report_callback() hist_entry__inc_addr_samples() symbol__inc_addr_samples(symbol = __bss_stop) symbol__cycles_hist() annotated_source__alloc_histograms(..., symbol__size(sym), ...) This function allocates memory to save sample histograms. The symbol_size() marco is defined as sym->end - sym->start, which results in above value of 0x3fe6e64a850 bytes and the call to calloc() in annotated_source__alloc_histograms() fails. The histgram memory allocation might fail, make this failure no-fatal and continue processing. Output before: [tmricht@m83lp54 perf]$ ./perf --debug stderr=1 report -vvvvv \ -i ~/slow.data 2>/tmp/2 [tmricht@m83lp54 perf]$ tail -5 /tmp/2 __symbol__inc_addr_samples(875): ENOMEM! sym->name=__bss_stop, start=0x1119b8000, addr=0x2aa0005eb08, end=0x3ff80002850, func: 0 problem adding hist entry, skipping event 0x938b8 [0x8]: failed to process type: 68 [Cannot allocate memory] [tmricht@m83lp54 perf]$ Output after: [tmricht@m83lp54 perf]$ ./perf --debug stderr=1 report -vvvvv \ -i ~/slow.data 2>/tmp/2 [tmricht@m83lp54 perf]$ tail -5 /tmp/2 symbol__inc_addr_samples map:0x1597830 start:0x110730000 end:0x3ff80002850 symbol__hists notes->src:0x2aa2a70 nr_hists:1 symbol__inc_addr_samples sym:unlink_anon_vmas src:0x2aa2a70 __symbol__inc_addr_samples: addr=0x11094c69e 0x11094c670 unlink_anon_vmas: period++ [addr: 0x11094c69e, 0x2e, evidx=0] => nr_samples: 1, period: 526008 [tmricht@m83lp54 perf]$ There is no error about failed memory allocation and the TUI interface shows all entries. Signed-off-by: Thomas Richter Reviewed-by: Hendrik Brueckner Cc: Heiko Carstens Cc: Hendrik Brueckner Link: http://lkml.kernel.org/r/90cb5607-3e12-5167-682d-978eba7dafa8@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/annotate.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 53fe307dfd309e425b171f6272d64296a54f4dff Author: Thomas Richter Date: Tue Jun 4 07:35:04 2019 +0200 perf test 6: Fix missing kvm module load for s390 Command # perf test -Fv 6 fails with error running test 100 'kvm-s390:kvm_s390_create_vm' failed to parse event 'kvm-s390:kvm_s390_create_vm', err -1, str 'unknown tracepoint' event syntax error: 'kvm-s390:kvm_s390_create_vm' \___ unknown tracepoint when the kvm module is not loaded or not built in. Fix this by adding a valid function which tests if the module is loaded. Loaded modules (or builtin KVM support) have a directory named /sys/kernel/debug/tracing/events/kvm-s390 for this tracepoint. Check for existence of this directory. Signed-off-by: Thomas Richter Reviewed-by: Christian Borntraeger Cc: Heiko Carstens Cc: Hendrik Brueckner Link: http://lkml.kernel.org/r/20190604053504.43073-1-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/parse-events.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit a77a05e2337df1347f4de96bfa313db7008fe8bd Author: Adrian Hunter Date: Tue Jun 4 16:00:17 2019 +0300 perf time-utils: Add support for multiple explicit time intervals Currently only a single explicit time range is accepted. Add support for multiple ranges separated by spaces, which requires the string to be quoted. Update the time utils test accordingly. Signed-off-by: Adrian Hunter Cc: Jin Yao Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190604130017.31207-20-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-diff.txt | 8 ++-- tools/perf/Documentation/perf-report.txt | 3 +- tools/perf/Documentation/perf-script.txt | 3 +- tools/perf/tests/time-utils-test.c | 17 ++++++++ tools/perf/util/time-utils.c | 74 +++++++++++++++++++++++++++++--- 5 files changed, 94 insertions(+), 11 deletions(-) commit e39a12cbd2496edb4cab0f99efb0d217c55ba273 Author: Adrian Hunter Date: Tue Jun 4 16:00:16 2019 +0300 perf tests: Add a test for time-utils Test time ranges work as expected. Committer testing: $ perf test "time utils" 59: time utils : Ok $ perf test -v "time utils" 59: time utils : --- start --- test child forked, pid 31711 parse_nsec_time("0") 0 parse_nsec_time("1") 1000000000 parse_nsec_time("0.000000001") 1 parse_nsec_time("1.000000001") 1000000001 parse_nsec_time("123456.123456") 123456123456000 parse_nsec_time("1234567.123456789") 1234567123456789 parse_nsec_time("18446744073.709551615") 18446744073709551615 perf_time__parse_str("1234567.123456789,1234567.123456789") start time 1234567123456789, end time 1234567123456789 perf_time__parse_str("1234567.123456789,1234567.123456790") start time 1234567123456789, end time 1234567123456790 perf_time__parse_str("1234567.123456789,") start time 1234567123456789, end time 0 perf_time__parse_str(",1234567.123456789") start time 0, end time 1234567123456789 perf_time__parse_str("0,1234567.123456789") start time 0, end time 1234567123456789 perf_time__parse_for_ranges("1234567.123456789,1234567.123456790") start time 1234567123456789, end time 1234567123456790 perf_time__parse_for_ranges("10%/1") first_sample_time 7654321000000000 last_sample_time 7654321000000100 start time 0: 7654321000000000, end time 0: 7654321000000009 perf_time__parse_for_ranges("10%/2") first_sample_time 7654321000000000 last_sample_time 7654321000000100 start time 0: 7654321000000010, end time 0: 7654321000000019 perf_time__parse_for_ranges("10%/1,10%/2") first_sample_time 11223344000000000 last_sample_time 11223344000000100 start time 0: 11223344000000000, end time 0: 11223344000000009 start time 1: 11223344000000010, end time 1: 11223344000000019 perf_time__parse_for_ranges("10%/1,10%/3,10%/10") first_sample_time 11223344000000000 last_sample_time 11223344000000100 start time 0: 11223344000000000, end time 0: 11223344000000009 start time 1: 11223344000000020, end time 1: 11223344000000029 start time 2: 11223344000000090, end time 2: 11223344000000100 test child finished with 0 ---- end ---- time utils: Ok $ Signed-off-by: Adrian Hunter Tested-by: Arnaldo Carvalho de Melo Cc: Jin Yao Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190604130017.31207-19-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/Build | 1 + tools/perf/tests/builtin-test.c | 4 + tools/perf/tests/tests.h | 1 + tools/perf/tests/time-utils-test.c | 234 +++++++++++++++++++++++++++++++++++++ 4 files changed, 240 insertions(+) commit 929afa0092d0ea6be2fbd0ac087319092595eba6 Author: Adrian Hunter Date: Tue Jun 4 16:00:15 2019 +0300 perf time-utils: Make perf_time__parse_for_ranges() more logical Explicit time ranges never contain a percent sign whereas percentage ranges always do, so it is possible to call the correct parser. Signed-off-by: Adrian Hunter Cc: Jin Yao Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190604130017.31207-18-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/time-utils.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 2a8afddc084a5f5f933382758dd2767ed8a69f77 Author: Adrian Hunter Date: Tue Jun 4 16:00:14 2019 +0300 perf time-utils: Simplify perf_time__parse_for_ranges() error paths slightly Simplify perf_time__parse_for_ranges() error paths slightly. Signed-off-by: Adrian Hunter Cc: Jin Yao Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190604130017.31207-17-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/time-utils.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 0ccc69ba0af46e3371c8cefb506aaf9f0e4f554c Author: Adrian Hunter Date: Tue Jun 4 16:00:13 2019 +0300 perf time-utils: Fix --time documentation Correct some punctuation and spelling and correct the format to show that the time resolution is nanoseconds not microseconds. Signed-off-by: Adrian Hunter Cc: Jin Yao Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190604130017.31207-16-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-diff.txt | 6 +++--- tools/perf/Documentation/perf-report.txt | 6 +++--- tools/perf/Documentation/perf-script.txt | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) commit b16bfeb3db1b50273e95f539953c337be759500d Author: Adrian Hunter Date: Tue Jun 4 16:00:12 2019 +0300 perf time-utils: Prevent percentage time range overlap Prevent percentage time range overlap. This is only a 1 nanosecond change but makes the results more logical e.g. a sample cannot be in both the first 10% and the second 20%. Note, there is a later patch that adds a test for time-utils. Signed-off-by: Adrian Hunter Cc: Jin Yao Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190604130017.31207-15-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/time-utils.c | 3 +++ 1 file changed, 3 insertions(+) commit c763242a5e742f8fefda0bb6cfdf6a5a34ae5e10 Author: Adrian Hunter Date: Tue Jun 4 16:00:11 2019 +0300 perf time-utils: Factor out set_percent_time() Factor out set_percent_time() so it can be reused. Signed-off-by: Adrian Hunter Cc: Jin Yao Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190604130017.31207-14-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/time-utils.c | 39 ++++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 21 deletions(-) commit f79a7689d99366aee9f89d785bca6c52ed6b76eb Author: Adrian Hunter Date: Tue Jun 4 16:00:10 2019 +0300 perf time-utils: Treat time ranges consistently Currently, options allow only 1 explicit (non-percentage) time range. In preparation for adding support for multiple explicit time ranges, treat time ranges consistently. Instead of treating some time ranges as inclusive and some as excluding the end time, treat all time ranges as inclusive. This is only a 1 nanosecond change but is necessary to treat multiple explicit time ranges in a consistent manner. Note, there is a later patch that adds a test for time-utils. Signed-off-by: Adrian Hunter Cc: Jin Yao Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190604130017.31207-13-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/time-utils.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 2c47db90ed71af9c12d5600dbcef864761d76b3d Author: Adrian Hunter Date: Tue Jun 4 16:00:09 2019 +0300 perf intel-pt: Add support for efficient time interval filtering Set up time ranges for efficient time interval filtering using the new "fast forward" facility. Because decoding is done in time order, intel_pt_time_filter() needs to look only at the next start or end timestamp - refer intel_pt_next_time(). Signed-off-by: Adrian Hunter Cc: Jin Yao Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190604130017.31207-12-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt.c | 208 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 208 insertions(+) commit da9000ae35027fb7305b8cad0b37df71937ad578 Author: Adrian Hunter Date: Tue Jun 4 16:00:08 2019 +0300 perf intel-pt: Add support for lookahead Implement the lookahead callback to let the decoder access subsequent buffers. intel_pt_lookahead() manages the buffer lifetime and calls the decoder for each buffer until the decoder returns a non-zero value. Signed-off-by: Adrian Hunter Cc: Jin Yao Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190604130017.31207-11-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt.c | 59 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) commit e96f7df8807615b96af59f8f8bc6263a7adc27b7 Author: Adrian Hunter Date: Tue Jun 4 16:00:07 2019 +0300 perf intel-pt: Factor out intel_pt_get_buffer() Factor out intel_pt_get_buffer() so it can be reused. Signed-off-by: Adrian Hunter Cc: Jin Yao Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190604130017.31207-10-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt.c | 60 ++++++++++++++++++++++++++++------------------ 1 file changed, 37 insertions(+), 23 deletions(-) commit a7fa19f5a255cc8970202d5c54092089a01fc042 Author: Adrian Hunter Date: Tue Jun 4 16:00:06 2019 +0300 perf intel-pt: Add intel_pt_fast_forward() Intel PT decoding is done in time order. In order to support efficient time interval filtering, add a facility to "fast forward" towards a particular timestamp. That involves finding the right buffer, stepping to that buffer, and then stepping forward PSBs. Because decoding must begin at a PSB, "fast forward" stops at the last PSB that has a timestamp before the target timestamp. Signed-off-by: Adrian Hunter Cc: Jin Yao Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190604130017.31207-9-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo .../perf/util/intel-pt-decoder/intel-pt-decoder.c | 130 +++++++++++++++++++++ .../perf/util/intel-pt-decoder/intel-pt-decoder.h | 2 + 2 files changed, 132 insertions(+) commit 6c1f0b18ac3361837dbe53e794e28096285fb4f0 Author: Adrian Hunter Date: Tue Jun 4 16:00:05 2019 +0300 perf intel-pt: Add reposition parameter to intel_pt_get_data() When the decoder gets the next trace buffer, some state is reset if the buffer is not consecutive to the previous buffer. Add a parameter 'reposition' so that can be done also to support a "fast forward" facility. Signed-off-by: Adrian Hunter Cc: Jin Yao Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190604130017.31207-8-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt-decoder/intel-pt-decoder.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 6492e5f013d9975d68528150edadead91e97a78a Author: Adrian Hunter Date: Tue Jun 4 16:00:04 2019 +0300 perf intel-pt: Factor out intel_pt_reposition() Factor out intel_pt_reposition() so it can be reused. Signed-off-by: Adrian Hunter Cc: Jin Yao Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190604130017.31207-7-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt-decoder/intel-pt-decoder.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit e72b52a2cfdea5cb0279b2d63a36d78b8c2134de Author: Adrian Hunter Date: Tue Jun 4 16:00:03 2019 +0300 perf intel-pt: Factor out intel_pt_8b_tsc() Factor out intel_pt_8b_tsc() so it can be reused. Signed-off-by: Adrian Hunter Cc: Jin Yao Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190604130017.31207-6-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo .../perf/util/intel-pt-decoder/intel-pt-decoder.c | 26 ++++++++++++++-------- 1 file changed, 17 insertions(+), 9 deletions(-) commit 4d678e9039b075f9418600dc87ec5e61cfb57115 Author: Adrian Hunter Date: Tue Jun 4 16:00:02 2019 +0300 perf intel-pt: Add lookahead callback Add a callback function to enable the decoder to lookahead at subsequent trace buffers. This will be used to implement a "fast forward" facility which will be needed to support efficient time interval filtering. Signed-off-by: Adrian Hunter Cc: Jin Yao Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190604130017.31207-5-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt-decoder/intel-pt-decoder.c | 2 ++ tools/perf/util/intel-pt-decoder/intel-pt-decoder.h | 3 +++ 2 files changed, 5 insertions(+) commit 4885c90c5e84926cfb083c58d8b6d70d1b1ac7cf Author: Adrian Hunter Date: Tue Jun 4 16:00:01 2019 +0300 perf report: Set perf time interval in itrace_synth_ops Instruction trace decoders can optimize output based on what time intervals will be filtered, so pass that information in itrace_synth_ops. Signed-off-by: Adrian Hunter Cc: Jin Yao Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190604130017.31207-4-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-report.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 400ae9818fe64899cea921a89c7078e0df9e41ea Author: Adrian Hunter Date: Tue Jun 4 16:00:00 2019 +0300 perf script: Set perf time interval in itrace_synth_ops Instruction trace decoders can optimize output based on what time intervals will be filtered, so pass that information in itrace_synth_ops. Signed-off-by: Adrian Hunter Cc: Jin Yao Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190604130017.31207-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-script.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 33526f362b019f0a17c6b522eb3b07017dba98a7 Author: Adrian Hunter Date: Tue Jun 4 15:59:59 2019 +0300 perf auxtrace: Add perf time interval to itrace_synth_ops Instruction trace decoders can optimize output based on what time intervals will be filtered, so pass that information in itrace_synth_ops. Signed-off-by: Adrian Hunter Cc: Jin Yao Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190604130017.31207-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/auxtrace.h | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit 87407fa58b6645cecd24102f58476b8dd7ce778d Author: Leo Yan Date: Fri Jun 7 22:35:08 2019 +0800 perf config: Update default value for llvm.clang-bpf-cmd-template The clang bpf cmdline template has defined default value in the file tools/perf/util/llvm-utils.c, which has been changed for several times. This patch updates the documentation to reflect the latest default value for the configuration llvm.clang-bpf-cmd-template. Signed-off-by: Leo Yan Cc: Alexander Shishkin Cc: Alexei Starovoitov Cc: Andi Kleen Cc: Daniel Borkmann Cc: Jiri Olsa Cc: Mark Drayton Cc: Martin KaFai Lau Cc: Namhyung Kim Cc: Song Liu Cc: Yonghong Song Cc: bpf@vger.kernel.org Cc: netdev@vger.kernel.org Fixes: d35b168c3dcd ("perf bpf: Give precedence to bpf header dir") Fixes: cb76371441d0 ("perf llvm: Allow passing options to llc in addition to clang") Fixes: 1b16fffa389d ("perf llvm-utils: Add bpf include path to clang command line") Link: http://lkml.kernel.org/r/20190607143508.18141-1-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-config.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 965e176f3c4ae260f21606e19dc3a58d66d8f605 Author: Arnaldo Carvalho de Melo Date: Fri Jun 7 15:14:27 2019 -0300 perf cs-etm: Remove duplicate GENMASK() define, use linux/bits.h instead Suzuki noticed that this should be more useful in a generic header, and after looking I noticed we have it already in our copy of include/linux/bits.h in tools/include, so just use it, test built on x86-64 and ubuntu 19.04 with: perfbuilder@46646c9e848e:/$ aarch64-linux-gnu-gcc --version |& head -1 aarch64-linux-gnu-gcc (Ubuntu/Linaro 8.3.0-6ubuntu1) 8.3.0 perfbuilder@46646c9e848e:/$ Suggested-by: Suzuki K Poulose Link: https://lkml.kernel.org/r/68c1c548-33cd-31e8-100d-7ffad008c7b2@arm.com Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Leo Yan Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org, Link: https://lkml.kernel.org/n/tip-69pd3mqvxdlh2shddsc7yhyv@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/cs-etm.h | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit e45c48a9a4d20ebc7b639a62c3ef8f4b08007027 Author: Mathieu Poirier Date: Wed Jun 5 10:16:33 2019 -0600 perf cs-etm: Properly set the value of 'old' and 'head' in snapshot mode This patch adds the necessary intelligence to properly compute the value of 'old' and 'head' when operating in snapshot mode. That way we can get the latest information in the AUX buffer and be compatible with the generic AUX ring buffer mechanic. Tester notes: > Leo, have you had the chance to test/review this one? Suzuki? Sure. I applied this patch on the perf/core branch (with latest commit 3e4fbf36c1e3 'perf augmented_raw_syscalls: Move reading filename to the loop') and passed testing with below steps: # perf record -e cs_etm/@tmc_etr0/ -S -m,64 --per-thread ./sort & [1] 19097 Bubble sorting array of 30000 elements # kill -USR2 19097 # kill -USR2 19097 # kill -USR2 19097 [ perf record: Woken up 4 times to write data ] [ perf record: Captured and wrote 0.753 MB perf.data ] Signed-off-by: Mathieu Poirier Tested-by: Leo Yan Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20190605161633.12245-1-mathieu.poirier@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/arm/util/cs-etm.c | 127 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 123 insertions(+), 4 deletions(-) commit 36edfb940195b62c79bc8b148720c8275659a8c7 Author: Arnaldo Carvalho de Melo Date: Thu Jun 6 17:03:18 2019 -0300 perf data: Fix perf.data documentation for HEADER_CPU_TOPOLOGY The 'die' info isn't in the same array as core and socket ids, and we missed the 'dies' string list, that comes right after the 'core' + 'socket' id variable length array, followed by the VLA for the dies. Cc: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Peter Zijlstra Fixes: c9cb12c5ba08 ("perf header: Add die information in CPU topology") Link: https://lkml.kernel.org/n/tip-nubi6mxp2n8ofvlx7ph6k3h6@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf.data-file-format.txt | 29 ++++++++++++++++------ 1 file changed, 22 insertions(+), 7 deletions(-) commit 0ccdb8407a4660f6dbc5977bc060917d2c3e7986 Author: Kan Liang Date: Tue Jun 4 15:50:44 2019 -0700 perf tools: Apply new CPU topology sysfs attributes The existing "thread_siblings" and "thread_siblings_list" attribute will be deprecated. Use the new CPU topology sysfs attributes, "core_cpus" and "core_cpus_list", which are synonymous with the deprecated attributes. Check the new name first. If not available, use the deprecated name to be compatible with old kernel. Signed-off-by: Kan Liang Reviewed-by: Jiri Olsa Cc: Andi Kleen Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1559688644-106558-5-git-send-email-kan.liang@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/cputopo.c | 8 +++++++- tools/perf/util/smt.c | 8 ++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) commit e05a899718f094e2c87d99115c5b1191405a9fd0 Author: Kan Liang Date: Tue Jun 4 15:50:43 2019 -0700 perf header: Rename "sibling cores" to "sibling sockets" The "sibling cores" actually shows the sibling CPUs of a socket. The name "sibling cores" is very misleading. Rename "sibling cores" to "sibling sockets" Signed-off-by: Kan Liang Reviewed-by: Jiri Olsa Cc: Andi Kleen Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1559688644-106558-4-git-send-email-kan.liang@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf.data-file-format.txt | 2 +- tools/perf/util/header.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit db5742b6849ed7f01d764e6755b8ab2b422f29b2 Author: Kan Liang Date: Tue Jun 4 15:50:42 2019 -0700 perf stat: Support per-die aggregation It is useful to aggregate counts per die. E.g. Uncore becomes die-scope on Xeon Cascade Lake-AP. Introduce a new option "--per-die" to support per-die aggregation. The global id for each core has been changed to socket + die id + core id. The global id for each die is socket + die id. Add die information for per-core aggregation. The output of per-core aggregation will be changed from "S0-C0" to "S0-D0-C0". Any scripts which rely on the output format of per-core aggregation probably be broken. For 'perf stat record/report', there is no die information when processing the old perf.data. The per-die result will be the same as per-socket. Committer notes: Renamed 'die' variable to 'die_id' to fix the build in some systems: CC /tmp/build/perf/builtin-script.o cc1: warnings being treated as errors builtin-stat.c: In function 'perf_env__get_die': builtin-stat.c:963: error: declaration of 'die' shadows a global declaration util/util.h:19: error: shadowed declaration is here mv: cannot stat `/tmp/build/perf/.builtin-stat.o.tmp': No such file or directory Signed-off-by: Kan Liang Reviewed-by: Jiri Olsa Cc: Andi Kleen Cc: Peter Zijlstra Link: https://lkml.kernel.org/n/tip-bsnhx7vgsuu6ei307mw60mbj@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-stat.txt | 10 ++++ tools/perf/builtin-stat.c | 87 +++++++++++++++++++++++++++++++--- tools/perf/util/cpumap.c | 57 +++++++++++++++++++--- tools/perf/util/cpumap.h | 9 +++- tools/perf/util/stat-display.c | 29 ++++++++++-- tools/perf/util/stat-shadow.c | 1 + tools/perf/util/stat.c | 1 + tools/perf/util/stat.h | 1 + 8 files changed, 177 insertions(+), 18 deletions(-) commit 0bd79f915c68ca3372696fee2dfe3c4bde9997a3 Author: Douglas Anderson Date: Mon Jun 10 10:52:34 2019 -0700 drm/bridge/synopsys: dw-hdmi: Fix unwedge crash when no pinctrl entries In commit 50f9495efe30 ("drm/bridge/synopsys: dw-hdmi: Add "unwedge" for ddc bus") I stupidly used IS_ERR() to check for whether we have an "unwedge" pinctrl state even though on most flows through the driver the unwedge state will just be NULL. Fix it so that we consistently use NULL for no unwedge state. Fixes: 50f9495efe30 ("drm/bridge/synopsys: dw-hdmi: Add "unwedge" for ddc bus") Cc: Douglas Anderson Cc: Sean Paul Cc: Andrzej Hajda Cc: Laurent Pinchart Cc: Daniel Vetter Cc: Neil Armstrong Cc: Jonas Karlman Cc: Jernej Skrabec Cc: Sam Ravnborg Reported-by: Erico Nunes Signed-off-by: Douglas Anderson Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190610175234.196844-1-dianders@chromium.org drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 71f49a8bf5c592413edb5c8839ec0e6d754db3e1 Author: Sean Young Date: Tue Jun 4 07:19:30 2019 -0400 media: ttpci: use rc-core for the IR receiver The IR protocol can now only be set via the rc protocols sysfs file rather than via module parameters or a custom procfs file. So, it is no longer necessary to periodically check for protocol changes. The IR_RCMM protocol does not decode the Philips RC-MM protocol (12, 24 or 32 bit variants) or any protocol rc-core can encode, so this is marked RC_PROTO_UNKNOWN. Tested on Technotrend/Hauppauge WinTV Nexus-S rev2.1, which comes with a small black hauppauge remote. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ttpci/av7110.c | 14 +- drivers/media/pci/ttpci/av7110.h | 21 +- drivers/media/pci/ttpci/av7110_ir.c | 423 ++++++++------------------------ drivers/media/rc/keymaps/rc-hauppauge.c | 1 + 4 files changed, 112 insertions(+), 347 deletions(-) commit eb5005df886b3989dde5378064cc23315f769290 Author: Tobias Klausmann Date: Wed May 29 14:02:06 2019 -0400 media: stv090x: Implement probe/remove for stv090x Move common code into a new function. This provides the needed functionality to use dvb_module_probe() instead of dvb_attach()! [mchehab+samsung@kernel.org: fix an out of order error return code] Signed-off-by: Tobias Klausmann Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/stv090x.c | 198 +++++++++++++++++++++-------- drivers/media/dvb-frontends/stv090x.h | 3 + drivers/media/dvb-frontends/stv090x_priv.h | 2 +- 3 files changed, 150 insertions(+), 53 deletions(-) commit 3c8f4cd271c486844e8eccebaf6714d913180ecc Author: Tobias Klausmann Date: Wed May 29 12:56:33 2019 -0400 media: stv6110x: Implement probe/remove for stv6110x Refactor out the common parts of stv6110x_probe() and stv6110x_attach() into separate functions. This provides the needed functionality to use dvb_module_probe() instead of dvb_attach()! Signed-off-by: Tobias Klausmann Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/stv6110x.c | 135 +++++++++++++++++++++++----- drivers/media/dvb-frontends/stv6110x.h | 3 + drivers/media/dvb-frontends/stv6110x_priv.h | 3 +- 3 files changed, 118 insertions(+), 23 deletions(-) commit 2659417876d58d58ec53a586d174f4fa18cc5352 Author: Fabio Estevam Date: Wed Jun 5 16:53:33 2019 -0400 media: Revert "media: staging/imx: Allow driver to build if COMPILE_TEST is enabled" Commit 020bc7354a6e ("media: staging/imx: Allow driver to build if COMPILE_TEST is enabled") incorrectly assumed that the imx media driver had no build time dependency with IMX_IPUV3_CORE. Building on x86_64 without IMX_IPUV3_CORE causes lots of build errors such as: All these definitions come from the imx ipu3 core driver, so make sure that imx media depends on IMX_IPUV3_CORE. This reverts commit 020bc7354a6ebec980e0aedf5bedf57b42f93aca. Reported-by: Randy Dunlap Signed-off-by: Fabio Estevam Acked-by: Randy Dunlap Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f0d2b7a8915a00917207dd23aaf8554d7bf777b0 Author: Boris Brezillon Date: Wed Jun 5 12:46:25 2019 -0400 media: v4l2: Fix the _MPLANE format check in v4l_enum_fmt() CAP_M2M_MPLANE means the device supports _MPLANE formats for both capture and output. Adjust the check to avoid EINVAL errors on such devices. Reported-by: Maxime Jourdan Signed-off-by: Boris Brezillon Reviewed-by: Tomasz Figa Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-ioctl.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit acae8b36cded0ee62038dedd0a44d54d5d673a96 Author: Kan Liang Date: Tue Jun 4 15:50:41 2019 -0700 perf header: Add die information in CPU topology With the new CPUID.1F, a new level type of CPU topology, 'die', is introduced. The 'die' information in CPU topology should be added in perf header. To be compatible with old perf.data, the patch checks the section size before reading the die information. The new info is added at the end of the cpu_topology section, the old perf tool ignores the extra data. It never reads data crossing the section boundary. The new perf tool with the patch can be used on legacy kernel. Add a new function has_die_topology() to check if die topology information is supported by kernel. The function only check X86 and CPU 0. Assuming other CPUs have same topology. Use similar method for core and socket to support die id and sibling dies string. Signed-off-by: Kan Liang Reviewed-by: Jiri Olsa Cc: Andi Kleen Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1559688644-106558-2-git-send-email-kan.liang@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf.data-file-format.txt | 9 ++- tools/perf/util/cputopo.c | 76 +++++++++++++++-- tools/perf/util/cputopo.h | 2 + tools/perf/util/env.c | 1 + tools/perf/util/env.h | 3 + tools/perf/util/header.c | 94 ++++++++++++++++++++-- 6 files changed, 172 insertions(+), 13 deletions(-) commit b74d8686a18b36adecc710597198d5ef2dd5ef14 Author: Kan Liang Date: Tue Jun 4 15:50:40 2019 -0700 perf cpumap: Retrieve die id information There is no function to retrieve die id information of a given CPU. Add cpu_map__get_die_id() to retrieve die id information. Signed-off-by: Kan Liang Reviewed-by: Jiri Olsa Cc: Andi Kleen Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1559688644-106558-1-git-send-email-kan.liang@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/cpumap.c | 7 +++++++ tools/perf/util/cpumap.h | 1 + 2 files changed, 8 insertions(+) commit 21fe8dc1191a1528f6732e471f45d370a5c48045 Author: Mathieu Poirier Date: Fri May 24 11:35:08 2019 -0600 perf cs-etm: Add support for CPU-wide trace scenarios Add support for CPU-wide trace scenarios by correlating range packets with timestamp packets. That way range packets received on different ETMQ/traceID channels can be processed and synthesized in chronological order. Signed-off-by: Mathieu Poirier Tested-by: Leo Yan Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20190524173508.29044-18-mathieu.poirier@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/cs-etm.c | 254 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 246 insertions(+), 8 deletions(-) commit 675f302fc261fc2af738397cdfb139bae3c58a18 Author: Mathieu Poirier Date: Fri May 24 11:35:07 2019 -0600 perf cs-etm: Add notion of time to decoding code This patch deals with timestamp packets received from the decoding library in order to give the front end packet processing loop a handle on the time instruction conveyed by range packets have been executed at. Signed-off-by: Mathieu Poirier Tested-by: Leo Yan Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20190524173508.29044-17-mathieu.poirier@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/cs-etm-decoder/cs-etm-decoder.c | 111 +++++++++++++++++++++++- tools/perf/util/cs-etm.c | 19 ++++ tools/perf/util/cs-etm.h | 17 ++++ 3 files changed, 143 insertions(+), 4 deletions(-) commit 0a6be300eb7b9f6630d565e213a904e5c75a86c0 Author: Mathieu Poirier Date: Fri May 24 11:35:06 2019 -0600 perf cs-etm: Linking PE contextID with perf thread mechanic Link contextID packets received from the decoder with the perf tool thread mechanic so that we know the specifics of the process currently executing. Signed-off-by: Mathieu Poirier Tested-by: Leo Yan Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20190524173508.29044-16-mathieu.poirier@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/cs-etm-decoder/cs-etm-decoder.c | 20 ++++++++++++++++ tools/perf/util/cs-etm.c | 32 ++++++++++++++++++++----- tools/perf/util/cs-etm.h | 10 ++++++++ 3 files changed, 56 insertions(+), 6 deletions(-) commit c152d4d49a358224d73cb7ce7cc6090676b04931 Author: Mathieu Poirier Date: Fri May 24 11:35:05 2019 -0600 perf cs-etm: Add support for multiple traceID queues When operating in CPU-wide trace mode with a source/sink topology of N:1 packets with multiple traceID will end up in the same cs_etm_queue. In order to properly decode packets they need to be split in different queues, i.e one queue per traceID. As such add support for multiple traceID per cs_etm_queue by adding a new cs_etm_traceid_queue every time a new traceID is discovered in the trace stream. Signed-off-by: Mathieu Poirier Tested-by: Leo Yan Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20190524173508.29044-15-mathieu.poirier@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.config | 3 ++ tools/perf/util/cs-etm.c | 131 ++++++++++++++++++++++++++++++++++++--------- 2 files changed, 110 insertions(+), 24 deletions(-) commit af21577c05a746579c4c084d51d7f0661def128c Author: Mathieu Poirier Date: Fri May 24 11:35:04 2019 -0600 perf cs-etm: Use traceID aware memory callback API When working with CPU-wide traces different traceID may be found in the same stream. As such we need to use the decoder callback that provides the traceID in order to know the thread context being decoded. Signed-off-by: Mathieu Poirier Tested-by: Leo Yan Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20190524173508.29044-14-mathieu.poirier@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/cs-etm-decoder/cs-etm-decoder.c | 14 ++++----- tools/perf/util/cs-etm-decoder/cs-etm-decoder.h | 3 +- tools/perf/util/cs-etm.c | 41 +++++++++++++++++-------- 3 files changed, 36 insertions(+), 22 deletions(-) commit 0abb868bbcbcf9f86e67bcbfaea7dcaba5a72ac0 Author: Mathieu Poirier Date: Fri May 24 11:35:03 2019 -0600 perf cs-etm: Move tid/pid to traceid_queue The tid/pid fields of structure cs_etm_queue are CPU dependent and as such need to be part of the cs_etm_traceid_queue in order to support CPU-wide trace scenarios. Signed-off-by: Mathieu Poirier Tested-by: Leo Yan Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20190524173508.29044-13-mathieu.poirier@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/cs-etm.c | 44 ++++++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 18 deletions(-) commit 3c21d7d813c55fa1688c2223fe15a1c5cb14a559 Author: Mathieu Poirier Date: Fri May 24 11:35:02 2019 -0600 perf cs-etm: Move thread to traceid_queue The thread field of structure cs_etm_queue is CPU dependent and as such need to be part of the cs_etm_traceid_queue in order to support CPU-wide trace scenarios. Signed-off-by: Mathieu Poirier Tested-by: Leo Yan Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20190524173508.29044-12-mathieu.poirier@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/cs-etm.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 6672559307d07f6b58bfd1b4b4cb44a247f51365 Author: Mathieu Poirier Date: Fri May 24 11:35:01 2019 -0600 perf cs-etm: Get rid of unused cpu in struct cs_etm_queue Nowadays the synthesize code is using the packet's cpu information, making cs_etm_queue::cpu useless. As such simply remove it. Signed-off-by: Mathieu Poirier Tested-by: Leo Yan Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20190524173508.29044-11-mathieu.poirier@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/cs-etm.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit c7bfa2fd0da966bf83061102fbe1e7b974e81764 Author: Mathieu Poirier Date: Fri May 24 11:35:00 2019 -0600 perf cs-etm: Introduce the concept of trace ID queues In an ideal world there is one CPU per cs_etm_queue and as such, one trace ID per cs_etm_queue. In the real world CoreSight topologies allow multiple CPUs to use the same sink, which translates to multiple trace IDs per cs_etm_queue. To deal with this a new cs_etm_traceid_queue structure is introduced to enclose all the information related to a single trace ID, allowing a cs_etm_queue to handle traces generated by any number of CPUs. Signed-off-by: Mathieu Poirier Tested-by: Leo Yan Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20190524173508.29044-10-mathieu.poirier@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/cs-etm-decoder/cs-etm-decoder.c | 4 +- tools/perf/util/cs-etm.c | 360 ++++++++++++++---------- tools/perf/util/cs-etm.h | 15 +- 3 files changed, 234 insertions(+), 145 deletions(-) commit 882f4874ad74c528c3437c9c8783310b073323a1 Author: Mathieu Poirier Date: Fri May 24 11:34:59 2019 -0600 perf cs-etm: Fix indentation in function cs_etm__process_decoder_queue() Fixing wrong indentation of the while() loop - no change of functionality. Signed-off-by: Mathieu Poirier Tested-by: Leo Yan Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Fixes: 3fa0e83e2948 ("perf cs-etm: Modularize main packet processing loop") Link: http://lkml.kernel.org/r/20190524173508.29044-9-mathieu.poirier@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/cs-etm.c | 108 +++++++++++++++++++++++------------------------ 1 file changed, 54 insertions(+), 54 deletions(-) commit 5f7cb03555c651cfb702d27c816559696ac734f3 Author: Mathieu Poirier Date: Fri May 24 11:34:58 2019 -0600 perf cs-etm: Move packet queue out of decoder structure The decoder needs to work with more than one traceID queue if we want to support CPU-wide scenarios with N:1 source/sink topologies. As such move the packet buffer and related fields out of the decoder structure and into the cs_etm_queue structure. Signed-off-by: Mathieu Poirier Tested-by: Leo Yan Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20190524173508.29044-8-mathieu.poirier@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/cs-etm-decoder/cs-etm-decoder.c | 129 ++++++++++-------------- tools/perf/util/cs-etm-decoder/cs-etm-decoder.h | 36 +------ tools/perf/util/cs-etm.c | 37 ++++++- tools/perf/util/cs-etm.h | 53 ++++++++++ 4 files changed, 144 insertions(+), 111 deletions(-) commit 3470d48a4ef30c554934d4a188a97a53656bff57 Author: Mathieu Poirier Date: Fri May 24 11:34:57 2019 -0600 perf cs-etm: Refactor error path in cs_etm_decoder__new() There is no point in having two different error goto statement since the openCSD API to free a decoder handles NULL pointers. As such function cs_etm_decoder__free() can be called to deal with all aspect of freeing decoder memory. Signed-off-by: Mathieu Poirier Tested-by: Leo Yan Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20190524173508.29044-7-mathieu.poirier@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/cs-etm-decoder/cs-etm-decoder.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit e0d170fa9a5c6dfc29fb8f900497d8c5ec29c6e7 Author: Mathieu Poirier Date: Fri May 24 11:34:56 2019 -0600 perf cs-etm: Add handling of switch-CPU-wide events Add handling of SWITCH-CPU-WIDE events in order to add the tid/pid of the incoming process to the perf tools machine infrastructure. This information is later retrieved when a contextID packet is found in the trace stream. Signed-off-by: Mathieu Poirier Tested-by: Leo Yan Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20190524173508.29044-6-mathieu.poirier@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/cs-etm.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit a465f3c3e3e6da729c645ea17615d4ae673588bf Author: Mathieu Poirier Date: Fri May 24 11:34:55 2019 -0600 perf cs-etm: Add handling of itrace start events Add handling of ITRACE events in order to add the tid/pid of the executing process to the perf tools machine infrastructure. This information is later retrieved when a contextID packet is found in the trace stream. Signed-off-by: Mathieu Poirier Tested-by: Leo Yan Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20190524173508.29044-5-mathieu.poirier@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/cs-etm.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit e5993c42e8bb8dd90eb81a05fb58d5aa243325dd Author: Mathieu Poirier Date: Fri May 24 11:34:54 2019 -0600 perf cs-etm: Configure SWITCH_EVENTS in CPU-wide mode Ask the perf core to generate an event when processes are swapped in/out of context. That way proper action can be taken by the decoding code when faced with such event. Signed-off-by: Mathieu Poirier Tested-by: Leo Yan Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20190524173508.29044-4-mathieu.poirier@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/arm/util/cs-etm.c | 3 +++ 1 file changed, 3 insertions(+) commit 1c839a5a4061bf4554430037b04a115efc9dd8a1 Author: Mathieu Poirier Date: Fri May 24 11:34:53 2019 -0600 perf cs-etm: Configure timestamp generation in CPU-wide mode When operating in CPU-wide mode tracers need to generate timestamps in order to correlate the code being traced on one CPU with what is executed on other CPUs. Signed-off-by: Mathieu Poirier Tested-by: Leo Yan Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20190524173508.29044-3-mathieu.poirier@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/arm/util/cs-etm.c | 57 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) commit 3399ad9ac234364396f75531203c38be5d2872c7 Author: Mathieu Poirier Date: Fri May 24 11:34:52 2019 -0600 perf cs-etm: Configure contextID tracing in CPU-wide mode When operating in CPU-wide mode being notified of contextID changes is required so that the decoding mechanic is aware of the process context switch. Signed-off-by: Mathieu Poirier Reviewed-by: Suzuki Poulouse Tested-by: Leo Yan Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20190524173508.29044-2-mathieu.poirier@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/arm/util/cs-etm.c | 126 ++++++++++++++++++++++++++++++++------ tools/perf/util/cs-etm.h | 12 ++++ 2 files changed, 119 insertions(+), 19 deletions(-) commit 10981c8012bc9ad4119420716a5dccfe8043b596 Author: Jiri Olsa Date: Fri May 17 13:33:47 2019 +0200 perf evsel: Remove superfluous nthreads system_wide setup in alloc_fd() It's already setup in the only caller of this method in perf_evsel__open(), right before calling perf_evsel__alloc_fd(), no need to do it again. Also it's better to have it out of the function before we move it to libperf. Signed-off-by: Jiri Olsa Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-1k8lhyjxfk7o8v4g3r7eyjc9@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/evsel.c | 3 --- 1 file changed, 3 deletions(-) commit 53651b28cfb637ef604abc189d877948d1af39bb Author: yuzhoujian Date: Thu May 30 14:29:22 2019 +0100 perf record: Add support to collect callchains from kernel or user space only One can just record callchains in the kernel or user space with this new options. We can use it together with "--all-kernel" options. This two options is used just like print_stack(sys) or print_ustack(usr) for systemtap. Shown below is the usage of this new option combined with "--all-kernel" options: 1. Configure all used events to run in kernel space and just collect kernel callchains. $ perf record -a -g --all-kernel --kernel-callchains 2. Configure all used events to run in kernel space and just collect user callchains. $ perf record -a -g --all-kernel --user-callchains Committer notes: Improved documentation to state that asking for kernel callchains really is asking for excluding user callchains, and vice versa. Further mentioned that using both won't get both, but nothing, as both will be excluded. Signed-off-by: yuzhoujian Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: David Ahern Cc: Milian Wolff Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/1559222962-22891-1-git-send-email-ufo19890607@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-record.txt | 11 +++++++++++ tools/perf/builtin-record.c | 4 ++++ tools/perf/perf.h | 2 ++ tools/perf/util/evsel.c | 4 ++++ 4 files changed, 21 insertions(+) commit 22d4621987faf651fee92c532a3eaba9a0e31ba0 Author: Arnaldo Carvalho de Melo Date: Thu Jun 6 10:56:55 2019 -0300 perf config: Bail out when a handler returns failure for a key-value pair So perf_config() uses: int ret = 0; perf_config_set__for_each_entry(config_set, section, item) { ... ret = fn(); if (ret < 0) break; } return ret; Expecting that that break will imediatelly go to function exit to return that error value (ret). The problem is that perf_config_set__for_each_entry() expands into two nested for() loops, one traversing the sections in a config and the second the items in each of those sections, so we have to change that 'break' to a goto label right before that final 'return ret'. With that, for instance 'perf trace' now correctly bails out when a event that is requested to be added via its 'trace.add_events' ~/.perfconfig entry gets rejected by the kernel BPF verifier: # perf trace ls event syntax error: '/home/acme/git/perf/tools/perf/examples/bpf/augmented_raw_syscalls.o' \___ Kernel verifier blocks program loading (add -v to see detail) Run 'perf list' for a list of valid events Error: wrong config key-value pair trace.add_events=/home/acme/git/perf/tools/perf/examples/bpf/augmented_raw_syscalls.o # While before it would continue and explode later, when trying to find maps that would have been in place had that augmented_raw_syscalls.o precompiled BPF proggie been accepted by the, humm, bast... rigorous kernel BPF verifier 8-) Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Jiri Olsa Cc: Martin KaFai Lau Cc: Mathieu Poirier Cc: Mike Leach Cc: Namhyung Kim Cc: Song Liu Cc: Suzuki Poulouse Cc: Taeung Song Cc: Yonghong Song Fixes: 8a0a9c7e9146 ("perf config: Introduce new init() and exit()") Link: https://lkml.kernel.org/n/tip-qvqxfk9d0rn1l7lcntwiezrr@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/config.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 012749caf9419f22636891259b664c6dd383e897 Author: Leo Yan Date: Thu Jun 6 10:38:59 2019 -0300 perf trace: Exit when failing to build eBPF program On my Juno board with ARM64 CPUs, perf trace command reports the eBPF program building failure but the command will not exit and continue to run. If we define an eBPF event in config file, the event will be parsed with below flow: perf_config() `> trace__config() `> parse_events_option() `> parse_events__scanner() `-> parse_events_parse() `> parse_events_load_bpf() `> llvm__compile_bpf() Though the low level functions return back error values when detect eBPF building failure, but parse_events_option() returns 1 for this case and trace__config() passes 1 to perf_config(); perf_config() doesn't treat the returned value 1 as failure and it continues to parse other configurations. Thus the perf command continues to run even without enabling eBPF event successfully. This patch changes error handling in trace__config(), when it detects failure it will return -1 rather than directly pass error value (1); finally, perf_config() will directly bail out and perf will exit for this case. Committer notes: Simplified the patch to just check directly the return of parse_events_option() and it it is non-zero, change err from its initial zero value to -1. Signed-off-by: Leo Yan Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Jiri Olsa Cc: Martin KaFai Lau Cc: Mathieu Poirier Cc: Mike Leach Cc: Namhyung Kim Cc: Song Liu Cc: Suzuki Poulouse Cc: Yonghong Song Fixes: ac96287cae08 ("perf trace: Allow specifying a set of events to add in perfconfig") Link: https://lkml.kernel.org/n/tip-x4i63f5kscykfok0hqim3zma@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-trace.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit a1a8e4a85cf7daff8b26c7b8698442ef677b4f97 Author: Jason Gunthorpe Date: Mon Jun 10 15:02:01 2019 -0300 rdma: Delete the ib_ucm module This has been marked CONFIG_BROKEN for over a year now with no complaints. Delete the whole thing for good. The module provided the /dev/infiniband/ucmX interface. Signed-off-by: Jason Gunthorpe drivers/infiniband/Kconfig | 11 - drivers/infiniband/core/Makefile | 3 - drivers/infiniband/core/ucm.c | 1350 -------------------------------------- include/uapi/rdma/ib_user_cm.h | 326 --------- 4 files changed, 1690 deletions(-) commit 4343f61103cdb8ccd6f3d5dd7168f1176a1cee37 Merge: aef9752274f4 d1fdb6d8f6a4 Author: Mark Brown Date: Mon Jun 10 18:52:53 2019 +0100 Merge tag 'v5.2-rc4' into spi-5.3 Linux 5.2-rc4 commit 48debfd736d5cb5d26f973d71ec3933f12f9b61c Merge: 948622f9840a cab14d1087d9 Author: David S. Miller Date: Mon Jun 10 10:44:57 2019 -0700 Merge branch 'net-Enable-nexthop-objects-with-IPv4-and-IPv6-routes' David Ahern says: ==================== net: Enable nexthop objects with IPv4 and IPv6 routes This is the final set of the initial nexthop object work. When I started this idea almost 2 years ago, it took 18 seconds to inject 700k+ IPv4 routes with 1 hop and about 28 seconds for 4-paths. Some of that time was due to inefficiencies in 'ip', but most of it was kernel side with excessive synchronize_rcu calls in ipv4, and redundant processing validating a nexthop spec (device, gateway, encap). Worse, the time increased dramatically as the number of legs in the routes increased; for example, taking over 72 seconds for 16-path routes. After this set, with increased dirty memory limits (fib_sync_mem sysctl), an improved ip and nexthop objects a full internet fib (743,799 routes based on a pull in January 2019) can be pushed to the kernel in 4.3 seconds. Even better, the time to insert is "almost" constant with increasing number of paths. The 'almost constant' time is due to expanding the nexthop definitions when generating notifications. A follow on patch will be sent adding a sysctl that allows an admin to avoid the nexthop expansion and truly get constant route insert time regardless of the number of paths in a route! (Useful once all programs used for a deployment that care about routes understand nexthop objects). To be clear, 'ip' is used for benchmarking for no other reason than 'ip -batch' is a trivial to use for the tests. FRR, for example, better manages nexthops and route changes and the way those are pushed to the kernel and thus will have less userspace processing times than 'ip -batch'. Patches 1-10 iterate over fib6_nh with a nexthop invoke a processing function per fib6_nh. Prior to nexthop objects, a fib6_info referenced a single fib6_nh. Multipath routes were added as separate fib6_info for each leg of the route and linked as siblings: f6i -> sibling -> sibling ... -> sibling | | +--------- multipath route ---------+ With nexthop objects a single fib6_info references an external nexthop which may have a series of fib6_nh: f6i ---> nexthop ---> fib6_nh ... fib6_nh making IPv6 routes similar to IPv4. The side effect is that a single fib6_info now indirectly references a series of fib6_nh so the code needs to walk each entry and call the local, per-fib6_nh processing function. Patches 11 and 13 wire up use of nexthops with fib entries for IPv4 and IPv6. With these commits you can actually use nexthops with routes. Patch 12 is an optimization for IPv4 when using nexthops in the most predominant use case (no metrics). Patches 14 handles replace of a nexthop config. Patches 15-18 add update pmtu and redirect tests to use both old and new routing. Patches 19 and 20 add new tests for the nexthop infrastructure. The first is single nexthop is used by multiple prefixes to communicate with remote hosts. This is on top of the functional tests already committed. The second verifies multipath selection. v4 - changed return to 'goto out' in patch 9 since the rcu_read_lock is held (noticed by Wei) v3 - removed found arg in patch 7 and changed rt6_nh_remove_exception_rt to return 1 when a match is found for an exception v2 - changed ++i to i++ in patches 1 and 14 as noticed by DaveM - improved commit message for patch 14 (nexthop replace) - removed the skip_fib argument to remove_nexthop; vestige of an older design ==================== Reviewed-By: Wei Wang Signed-off-by: David S. Miller commit cab14d1087d9be915a7174e47d1f2b9fa4c78ab4 Author: David Ahern Date: Sat Jun 8 14:53:41 2019 -0700 selftests: Add version of router_multipath.sh using nexthop objects Add a version of router_multipath.sh that uses nexthop objects for routes. Ido requested a version that does not cause regressions with mlxsw testing since it does not support nexthop objects yet. Signed-off-by: David Ahern Signed-off-by: David S. Miller .../selftests/net/forwarding/router_mpath_nh.sh | 359 +++++++++++++++++++++ 1 file changed, 359 insertions(+) commit 735ab2f65dced1f5285c50dc6dcb39dadf9eb6ad Author: David Ahern Date: Sat Jun 8 14:53:40 2019 -0700 selftests: Add test with multiple prefixes using single nexthop Add tests where multiple FIB entries use the same nexthop object. Generate per-cpu cached routes for each by running ping on each cpu, and then generate exceptions unique to each prefix (remote host) with different mtus. Signed-off-by: David Ahern Signed-off-by: David S. Miller .../selftests/net/fib_nexthop_multiprefix.sh | 290 +++++++++++++++++++++ 1 file changed, 290 insertions(+) commit 622946d9186e132d36a3e92b94bbdf375637d9bd Author: David Ahern Date: Sat Jun 8 14:53:39 2019 -0700 selftests: icmp_redirect: Add support for routing via nexthop objects Add a second pass to icmp_redirect.sh to use nexthop objects for routes. Signed-off-by: David Ahern Signed-off-by: David S. Miller tools/testing/selftests/net/icmp_redirect.sh | 49 ++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) commit 438a9a856ba481a2e56a1acf6edcbe05b6484237 Author: David Ahern Date: Sat Jun 8 14:53:38 2019 -0700 selftests: pmtu: Add support for routing via nexthop objects Add routing setup using nexthop objects and repeat tests with old and new routing. Signed-off-by: David Ahern Reviewed-by: Stefano Brivio Signed-off-by: David S. Miller tools/testing/selftests/net/pmtu.sh | 158 ++++++++++++++++++++++++++++-------- 1 file changed, 126 insertions(+), 32 deletions(-) commit f4ca0c341ce03e4a170c4d4535dc6f8e86a8b5e3 Author: David Ahern Date: Sat Jun 8 14:53:37 2019 -0700 selftests: pmtu: Move route installs to a new function Move the route add commands to a new function called setup_routing_old. The '_old' refers to the classic way of installing routes. Signed-off-by: David Ahern Reviewed-by: Stefano Brivio Signed-off-by: David S. Miller tools/testing/selftests/net/pmtu.sh | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) commit 243781dba7907d0f61b4f6da50c2f6f9ecc43186 Author: David Ahern Date: Sat Jun 8 14:53:36 2019 -0700 selftests: pmtu: Move running of test into a new function Move the block of code that runs a test and prints the verdict to a new function, run_test. Signed-off-by: David Ahern Reviewed-by: Stefano Brivio Signed-off-by: David S. Miller tools/testing/selftests/net/pmtu.sh | 63 +++++++++++++++++++++---------------- 1 file changed, 36 insertions(+), 27 deletions(-) commit 7bf4796dd09984ad1612877a82d0d139c70ae27f Author: David Ahern Date: Sat Jun 8 14:53:35 2019 -0700 nexthops: add support for replace Add support for atomically upating a nexthop config. When updating a nexthop, walk the lists of associated fib entries and verify the new config is valid. Replace is done by swapping nh_info for single nexthops - new config is applied to old nexthop struct, and old config is moved to new nexthop struct. For nexthop groups the same applies but for nh_group. In addition for groups the nh_parent reference needs to be updated. The old config is released by calling __remove_nexthop on the 'new' nexthop which now has the old config. This is done to avoid messing around with the list_heads that track which fib entries are using the nexthop. After the swap of config data, bump the sequence counters for FIB entries to invalidate any dst entries and send notifications to userspace. The notifications include the new nexthop spec as well as any fib entries using the updated nexthop struct. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv4/nexthop.c | 219 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 214 insertions(+), 5 deletions(-) commit 5b98324ebe29f4494b0fc45bde2d47ee716518fd Author: David Ahern Date: Sat Jun 8 14:53:34 2019 -0700 ipv6: Allow routes to use nexthop objects Add support for RTA_NH_ID attribute to allow a user to specify a nexthop id to use with a route. fc_nh_id is added to fib6_config to hold the value passed in the RTA_NH_ID attribute. If a nexthop id is given, the gateway, device, encap and multipath attributes can not be set. Update ip6_route_del to check metric and protocol before nexthop specs. If fc_nh_id is set, then it must match the id in the route entry. Since IPv6 allows delete of a cached entry (an exception), add ip6_del_cached_rt_nh to cycle through all of the fib6_nh in a fib entry if it is using a nexthop. Signed-off-by: David Ahern Signed-off-by: David S. Miller include/net/ip6_fib.h | 1 + net/ipv6/route.c | 89 ++++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 82 insertions(+), 8 deletions(-) commit 6c48ea5fe639ab7e7b3eb5d8e8b324b13188bf10 Author: David Ahern Date: Sat Jun 8 14:53:33 2019 -0700 ipv4: Optimization for fib_info lookup with nexthops Be optimistic about re-using a fib_info when nexthop id is given and the route does not use metrics. Avoids a memory allocation which in most cases is expected to be freed anyways. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv4/fib_semantics.c | 71 ++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 65 insertions(+), 6 deletions(-) commit 493ced1ac47c48bb86d9d4e8e87df8592be85a0e Author: David Ahern Date: Sat Jun 8 14:53:32 2019 -0700 ipv4: Allow routes to use nexthop objects Add support for RTA_NH_ID attribute to allow a user to specify a nexthop id to use with a route. fc_nh_id is added to fib_config to hold the value passed in the RTA_NH_ID attribute. If a nexthop id is given, the gateway, device, encap and multipath attributes can not be set. Update fib_nh_match to check ids on a route delete. Signed-off-by: David Ahern Signed-off-by: David S. Miller include/net/ip_fib.h | 1 + net/ipv4/fib_frontend.c | 19 +++++++++++++++++++ net/ipv4/fib_semantics.c | 15 +++++++++++++++ 3 files changed, 35 insertions(+) commit 2d44234bf9ed45ba1b91e4bcc929ab15f8b6a901 Author: David Ahern Date: Sat Jun 8 14:53:31 2019 -0700 ipv6: Handle all fib6_nh in a nexthop in mtu updates Use nexthop_for_each_fib6_nh to call fib6_nh_mtu_change for each fib6_nh in a nexthop for rt6_mtu_change_route. For __ip6_rt_update_pmtu, we need to find the nexthop that correlates to the device and gateway in the rt6_info. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv6/route.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) commit 49d5b8ef20d091d71a7fe019d71d0b2dd73a5b99 Author: David Ahern Date: Sat Jun 8 14:53:30 2019 -0700 ipv6: Handle all fib6_nh in a nexthop in rt6_do_redirect Use nexthop_for_each_fib6_nh and fib6_nh_find_match to find the fib6_nh in a nexthop that correlates to the device and gateway in the rt6_info. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv6/route.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) commit c55c89884d3d0686aa8b6ec7525c2561383e9490 Author: David Ahern Date: Sat Jun 8 14:53:29 2019 -0700 ipv6: Handle all fib6_nh in a nexthop in __ip6_route_redirect Add a hook in __ip6_route_redirect to handle a nexthop struct in a fib6_info. Use nexthop_for_each_fib6_nh and fib6_nh_redirect_match to call ip6_redirect_nh_match for each fib6_nh looking for a match. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv6/route.c | 39 +++++++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) commit e659ba31d806fbb523a2b78f092bfe9708f2a121 Author: David Ahern Date: Sat Jun 8 14:53:28 2019 -0700 ipv6: Handle all fib6_nh in a nexthop in exception handling Add a hook in rt6_flush_exceptions, rt6_remove_exception_rt, rt6_update_exception_stamp_rt, and rt6_age_exceptions to handle nexthop struct in a fib6_info. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv6/route.c | 111 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 108 insertions(+), 3 deletions(-) commit 2c170e075375f7421a8007d3993f55f3eb89760b Author: David Ahern Date: Sat Jun 8 14:53:27 2019 -0700 ipv6: Handle all fib6_nh in a nexthop in fib6_info_uses_dev Add a hook in fib6_info_uses_dev to handle nexthop struct in a fib6_info. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv6/route.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit a1b7a1f06c78390e912692c0da40f4234ee83a4f Author: David Ahern Date: Sat Jun 8 14:53:26 2019 -0700 ipv6: Handle all fib6_nh in a nexthop in rt6_nlmsg_size Add a hook in rt6_nlmsg_size to handle nexthop struct in a fib6_info. rt6_nh_nlmsg_size is used to sum the space needed for all nexthops in the fib entry. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv6/route.c | 49 +++++++++++++++++++++++++++++++++++++------------ 1 file changed, 37 insertions(+), 12 deletions(-) commit 17a5984eee6ca57ace04285f574dd1efa0e8dd0f Author: David Ahern Date: Sat Jun 8 14:53:25 2019 -0700 ipv6: Handle all fib6_nh in a nexthop in __find_rr_leaf Add a hook in __find_rr_leaf to handle nexthop struct in a fib6_info. nexthop_for_each_fib6_nh is used to walk each fib6_nh in a nexthop and call find_match. On a match, use the fib6_nh saved in the callback arg to setup fib6_result. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv6/route.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 2 deletions(-) commit 962b68038351396ae218560c2f5b7af3e54d304c Author: David Ahern Date: Sat Jun 8 14:53:24 2019 -0700 ipv6: Handle all fib6_nh in a nexthop in rt6_device_match Add a hook in rt6_device_match to handle nexthop struct in a fib6_info. The new rt6_nh_dev_match uses nexthop_for_each_fib6_nh to walk each fib6_nh in a nexthop and call __rt6_device_match. On match, rt6_nh_dev_match returns the fib6_nh and rt6_device_match uses it to setup fib6_result. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv6/route.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 2 deletions(-) commit 2ab75bfb17e2cf3159033e91ebf2eb11efc1f0d3 Author: David Ahern Date: Sat Jun 8 14:53:23 2019 -0700 ipv6: Handle all fib6_nh in a nexthop in fib6_drop_pcpu_from Use nexthop_for_each_fib6_nh to walk all fib6_nh in a nexthop when dropping 'from' reference in pcpu routes. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv6/ip6_fib.c | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) commit f88c9aa12fd0cff9cbb74b490350e6f0fac68296 Author: David Ahern Date: Sat Jun 8 14:53:22 2019 -0700 nexthops: Add ipv6 helper to walk all fib6_nh in a nexthop struct IPv6 has traditionally had a single fib6_nh per fib6_info. With nexthops we can have multiple fib6_nh associated with a fib6_info. Add a nexthop helper to invoke a callback for each fib6_nh in a 'struct nexthop'. If the callback returns non-0, the loop is stopped and the return value passed to the caller. Signed-off-by: David Ahern Signed-off-by: David S. Miller include/net/nexthop.h | 4 ++++ net/ipv4/nexthop.c | 31 +++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) commit e137d34f94ebcb6508d7c8614ac045583fffbe2a Author: Chunfeng Yun Date: Mon Jun 10 10:52:29 2019 +0800 Revert "usb: mtu3: fix up undefined reference to usb_debug_root" It's not needed after [1] is applied, because usb_debug_root is created by usb common core but not usbcore now. [1] 812086d362a1 ("USB: move usb debugfs directory creation to the usb common core") Signed-off-by: Chunfeng Yun Signed-off-by: Greg Kroah-Hartman drivers/usb/mtu3/mtu3_debugfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ba3684f99f1b25d2a30b6956d02d339d7acb9799 Author: Jorge Ramirez-Ortiz Date: Mon Jun 10 19:23:08 2019 +0200 tty: serial: msm_serial: avoid system lockup condition The function msm_wait_for_xmitr can be taken with interrupts disabled. In order to avoid a potential system lockup - demonstrated under stress testing conditions on SoC QCS404/5 - make sure we wait for a bounded amount of time. Tested on SoC QCS404. Signed-off-by: Jorge Ramirez-Ortiz Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/msm_serial.c | 4 ++++ 1 file changed, 4 insertions(+) commit 948622f9840ad8d5c979c3c82505d1ee9e1f8b11 Author: YueHaibing Date: Mon Jun 10 23:19:08 2019 +0800 tcp: Make tcp_fastopen_alloc_ctx static Fix sparse warning: net/ipv4/tcp_fastopen.c:75:29: warning: symbol 'tcp_fastopen_alloc_ctx' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: YueHaibing Acked-by: Jason Baron Signed-off-by: David S. Miller net/ipv4/tcp_fastopen.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 00fa28390c787e1a4643ef04d6615a1bec9afdb7 Merge: a248384e6420 145a40e87e0b Author: David S. Miller Date: Mon Jun 10 10:37:34 2019 -0700 Merge branch 'r8169-improve-handling-of-chip-specific-configuration' Heiner Kallweit says: ==================== r8169: improve handling of chip-specific configuration This series improves and simplifies handling of chip-specific configuration. ==================== Signed-off-by: David S. Miller commit 145a40e87e0bcab4ed03d9bad793963590e5b70d Author: Heiner Kallweit Date: Mon Jun 10 18:25:29 2019 +0200 r8169: remove struct rtl_cfg_info Simplify the code by removing struct rtl_cfg_info. Only info we need per PCI ID is whether it supports GBit or not. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169_main.c | 56 +++++++++++-------------------- 1 file changed, 19 insertions(+), 37 deletions(-) commit 9fa0a8e1e15aa23da625ff2259afdd512aa048ec Author: Heiner Kallweit Date: Mon Jun 10 18:24:25 2019 +0200 r8169: remove member coalesce_info from struct rtl_cfg_info To prepare removal of struct rtl_cfg_info, set the coalesce config based on the chip version number. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169_main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 6c19156e29957ae5defbba12fd73b2a11da0854e Author: Heiner Kallweit Date: Mon Jun 10 18:23:30 2019 +0200 r8169: remove callback hw_start from struct rtl_cfg_info After the latest changes we don't need separate functions rtl_hw_start_8168 and rtl_hw_start_8101 any longer. This allows us to simplify the code. For this change we need to move rtl_hw_start() and rtl_hw_start_8169(). rtl_hw_start_8169() is unchanged. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169_main.c | 117 ++++++++++++++---------------- 1 file changed, 53 insertions(+), 64 deletions(-) commit bc73241e29cc93822513071589b3eb6c5671c567 Author: Heiner Kallweit Date: Mon Jun 10 18:22:33 2019 +0200 r8169: rename CPCMD_QUIRK_MASK and apply it on all chip versions CPCMD_QUIRK_MASK isn't specific to certain chip versions. The vendor driver applies this mask to all 8168 versions. Therefore remove QUIRK from the mask name and apply it on all chip versions. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169_main.c | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) commit ec9a40881732c834fe7ffe224981a35043e6a725 Author: Heiner Kallweit Date: Mon Jun 10 18:21:50 2019 +0200 r8169: improve setting interrupt mask So far several places in the code deal with setting the interrupt mask for the respective chip versions. Improve this by having one function for this only. In addition don't set RxFIFOOver for all 8101 chip versions like in the vendor driver. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169_main.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 993f5d11a9631face2bb597826b86f476a9b915b Author: Takashi Iwai Date: Mon May 20 11:26:45 2019 +0200 firmware: Use kvmalloc for page tables This is a minor optimization to use kvmalloc() variant for allocating the page table for the SG-buffer. They aren't so big in general, so kmalloc() would fit often better. Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman drivers/base/firmware_loader/fallback.c | 7 ++++--- drivers/base/firmware_loader/main.c | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) commit 8f58570b98c090a4544ef9eaea1f419706672845 Author: Takashi Iwai Date: Mon May 20 11:26:44 2019 +0200 firmware: Unify the paged buffer release helper Use a common helper to release the paged buffer resources. This is rather a preparation for the upcoming decompression support. Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman drivers/base/firmware_loader/fallback.c | 8 +------- drivers/base/firmware_loader/firmware.h | 6 ++++++ drivers/base/firmware_loader/main.c | 27 ++++++++++++++++++--------- 3 files changed, 25 insertions(+), 16 deletions(-) commit ddaf29fd9bb6a8192153bc097615765d202b0ab3 Author: Takashi Iwai Date: Mon May 20 11:26:43 2019 +0200 firmware: Free temporary page table after vmapping Once after performing vmap() to map the S/G pages, our own page table becomes superfluous since the pages can be released via vfree() automatically. Let's change the buffer release code and discard the page table array for saving some memory. Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman drivers/base/firmware_loader/fallback.c | 7 ++++++- drivers/base/firmware_loader/main.c | 6 +++--- 2 files changed, 9 insertions(+), 4 deletions(-) commit db1b5bc047b3cadaedab3826bba82c3d9e023c4b Author: Rautkoski Kimmo EXT Date: Fri May 24 09:19:22 2019 +0000 serial: 8250: Fix TX interrupt handling condition Interrupt handler checked THRE bit (transmitter holding register empty) in LSR to detect if TX fifo is empty. In case when there is only receive interrupts the TX handling got called because THRE bit in LSR is set when there is no transmission (FIFO empty). TX handling caused TX stop, which in RS-485 half-duplex mode actually resets receiver FIFO. This is not desired during reception because of possible data loss. The fix is to check if THRI is set in IER in addition of the TX fifo status. THRI in IER is set when TX is started and cleared when TX is stopped. This ensures that TX handling is only called when there is really transmission on going and an interrupt for THRE and not when there are only RX interrupts. Signed-off-by: Kimmo Rautkoski Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_port.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 707aeea13a9c85520262e11899d86df3c4b48262 Author: Borut Seljak Date: Fri Jun 7 12:53:06 2019 +0200 serial: stm32: fix a recursive locking in stm32_config_rs485 Remove spin_lock_irqsave in stm32_config_rs485, it cause recursive locking. Already locked in uart_set_rs485_config. Fixes: 1bcda09d291081 ("serial: stm32: add support for RS485 hardware control mode") Signed-off-by: Borut Seljak Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/stm32-usart.c | 3 --- 1 file changed, 3 deletions(-) commit 87bb008c77a326855def246bf877e651d1fa74aa Author: Thierry Reding Date: Wed Jun 5 10:51:42 2019 +0200 tty: serial: 8250-of: Do not warn on deferred probe Deferred probe is an expected return value for clk_get() on many platforms. The driver deals with it properly, so there's no need to output a warning that may potentially confuse users. Signed-off-by: Thierry Reding Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_of.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit f5a9e5f7dd8c5ff0c32e6f86d56955aab64d6057 Author: Fabio Estevam Date: Tue Jun 4 00:31:39 2019 -0300 serial: imx: Use dev_info() instead of pr_info() dev_info() is more appropriate for printing messages inside drivers, so switch to dev_info(). Signed-off-by: Fabio Estevam Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9edaf50b373d3fe94e360af16f7c0d024d9567bb Author: Fabio Estevam Date: Tue Jun 4 00:31:38 2019 -0300 serial: fsl_lpuart: Use dev_info() instead of printk() dev_info() is more appropriate for printing messages inside drivers, so switch to dev_info(). Signed-off-by: Fabio Estevam Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/fsl_lpuart.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9315ad99ed5bc3865cef0da56e705549cd04fe7e Author: Claire Chang Date: Mon May 27 16:31:50 2019 +0800 uart: mediatek: support Rx in-band wakeup In order to support Rx in-band wakeup, we need to enable irq wake on an edge sensitive interrupt of Rx pin before suspend and disable it when resuming. This interrupt is used only as wake source to resume the system when suspended. Note that the sent character will be lost as the controller is actually suspended. We use this to support wakeup on bluetooth. Bluetooth will repeatedly send 0xFD to wakeup host. Once host detects Rx falling, an interrupt is triggered, and the system leaves sleep state. Then, the bluetooth driver will send 0xFC to bluetooth and bluetooth can start to send normal HCI packets. Signed-off-by: Claire Chang Reviewed-by: Nicolas Boichat Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_mtk.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 277375b864e8147975b064b513f491e2a910e66a Author: Shubhrajyoti Datta Date: Fri May 24 14:41:29 2019 +0530 serial: uartps: Add a timeout to the tx empty wait In case the cable is not connected then the target gets into an infinite wait for tx empty. Add a timeout to the tx empty wait. Reported-by: Jean-Francois Dagenais Signed-off-by: Shubhrajyoti Datta Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/xilinx_uartps.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 107475685abfdee504bb0ef4824f15797f6d2d4d Author: Shubhrajyoti Datta Date: Fri May 24 14:41:28 2019 +0530 serial: uartps: Move the spinlock after the read of the tx empty Currently we are doing a read of the status register. Move the spinlock after that as the reads need not be spinlock protected. This patch prevents relaxing the cpu with spinlock held. Signed-off-by: Shubhrajyoti Datta Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/xilinx_uartps.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 1f74dfa803e3e82978d45b36a70926256344399e Author: Long Cheng Date: Thu May 23 15:35:09 2019 +0800 serial: 8250-mtk: modify uart DMA rx Modify uart rx and complete for DMA Signed-off-by: Long Cheng Reviewed-by: Vinod Koul Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_mtk.c | 49 ++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 29 deletions(-) commit c7ad9ba0611c53cfe194223db02e3bca015f0674 Author: Kefeng Wang Date: Fri May 31 21:37:33 2019 +0800 tty/serial: digicolor: Fix digicolor-usart already registered warning When modprobe/rmmod/modprobe module, if platform_driver_register() fails, the kernel complained, proc_dir_entry 'driver/digicolor-usart' already registered WARNING: CPU: 1 PID: 5636 at fs/proc/generic.c:360 proc_register+0x19d/0x270 Fix this by adding uart_unregister_driver() when platform_driver_register() fails. Reported-by: Hulk Robot Signed-off-by: Kefeng Wang Acked-by: Baruch Siach Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/digicolor-usart.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 929ffa4ade6ccc0059368ff55ca7b866b178ca47 Author: YueHaibing Date: Tue May 28 17:04:49 2019 +0800 serial: stm32: Make stm32_get_databits static Fix sparse warning: drivers/tty/serial/stm32-usart.c:603:14: warning: symbol 'stm32_get_databits' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/stm32-usart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c70669ecef4e34af8913108fae4b8a9b1dc63fa1 Author: Bich Hemon Date: Tue Jun 4 10:55:12 2019 +0200 serial: stm32: select pinctrl state in each suspend/resume function Select either pinctrl sleep state in suspend function or default state in resume function. Signed-off-by: Bich Hemon Signed-off-by: Erwan Le Ray Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/stm32-usart.c | 4 ++++ 1 file changed, 4 insertions(+) commit b0c35cb59f7b640f455fa426074fea155296a37c Author: Kefeng Wang Date: Fri May 31 23:23:24 2019 +0800 misc: mic: scif: fix potential double free of scif_dev _scif_init() free scif_dev in the free_sdev erro path, but _scif_exit will free it again when module exit, it cause BUG_ON issue, kernel BUG at mm/slub.c:3944! invalid opcode: 0000 [#1] SMP KASAN PTI Set scif_dev to NULL in scif_destroy_scifdev() to fix it. Cc: Sudeep Dutt Cc: Ashutosh Dixit Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Reported-by: Hulk Robot Signed-off-by: Kefeng Wang Signed-off-by: Greg Kroah-Hartman drivers/misc/mic/scif/scif_main.c | 1 + 1 file changed, 1 insertion(+) commit 2f0f2441b4a10948e2ec042b48fef13680387f7c Author: Jonathan Corbet Date: Fri May 24 14:57:40 2019 -0600 slimbus: fix kerneldoc comments The kerneldoc comments in drivers/slimbus/stream.c were not properly formatted, leading to a distinctly unsatisfying "no structured comments found" warning in the docs build. Sprinkle some asterisks around so that the comments will be properly recognized. Signed-off-by: Jonathan Corbet Signed-off-by: Greg Kroah-Hartman drivers/slimbus/stream.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit f4d57d838c48ebb123f9032cca0e5697c457868f Author: Chris Wilson Date: Mon Jun 10 11:36:10 2019 +0100 drm/i915: Allow interrupts when taking the timeline->mutex Before we commit ourselves to writing commands into the ringbuffer and submitting the request, allow signals to interrupt acquisition of the timeline mutex. We allow ourselves to be interrupted at any time later if we need to block for space in the ring, anyway. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190610103610.19883-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gt/intel_context.h | 5 +++-- drivers/gpu/drm/i915/i915_request.c | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) commit a248384e6420ebda63f788d33fac1c0a081e57a8 Author: Varun Prakash Date: Mon Jun 10 18:36:34 2019 +0530 cxgb4/libcxgb/cxgb4i/cxgbit: enable eDRAM page pods for iSCSI Page pods are used for direct data placement, this patch enables eDRAM page pods if firmware supports this feature. Signed-off-by: Varun Prakash Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 57 ++++++++++++++++++++++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h | 1 + drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h | 3 ++ drivers/net/ethernet/chelsio/libcxgb/libcxgb_ppm.c | 47 +++++++++++++++--- drivers/net/ethernet/chelsio/libcxgb/libcxgb_ppm.h | 7 +-- drivers/scsi/cxgbi/cxgb3i/cxgb3i.c | 10 ++-- drivers/scsi/cxgbi/cxgb4i/cxgb4i.c | 17 +++++-- drivers/scsi/cxgbi/libcxgbi.c | 15 +++--- drivers/scsi/cxgbi/libcxgbi.h | 9 ++-- drivers/target/iscsi/cxgbit/cxgbit_ddp.c | 6 ++- 10 files changed, 142 insertions(+), 30 deletions(-) commit ba217a44f815ae06226461ab74a9df09b35e5a5f Merge: ad3a9ee0b623 9bea6897cc43 Author: David S. Miller Date: Mon Jun 10 09:12:53 2019 -0700 Merge branch 'mvpp2-stats' Maxime Chevallier says: ==================== net: mvpp2: Add extra ethtool stats This series adds support for more ethtool counters in PPv2 : - Per port counters, including one indicating the classifier drops - Per RXQ and per TXQ counters The first 2 patches perform some light rework and renaming, and the 3rd adds the extra counters. ==================== Signed-off-by: David S. Miller commit 9bea6897cc43922fc17dd281409fa55c8f3d1f16 Author: Maxime Chevallier Date: Mon Jun 10 10:55:29 2019 +0200 net: mvpp2: Add support for more ethtool counters Besides the MIB counters, some other useful counters can be exposed to the user. This commit adds support for : - Per-port counters, that indicate FIFO drops and classifier drops, - Per-rxq counters, - Per-txq counters Signed-off-by: Maxime Chevallier Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 18 ++++ drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 132 ++++++++++++++++++++---- 2 files changed, 132 insertions(+), 18 deletions(-) commit f9fa96b980b93b89ccfe2dc25981da52a9283aa7 Author: Maxime Chevallier Date: Mon Jun 10 10:55:28 2019 +0200 net: mvpp2: Rename mvpp2_ethtool_counters to mvpp2_ethtool_mib_counters Since we'll be adding support for other kind of internal counters, make clear that the currently supported counters are the MIB counters. Signed-off-by: Maxime Chevallier Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 6410c1391a9c25ddedea7d66e9479603345546ed Author: Maxime Chevallier Date: Mon Jun 10 10:55:27 2019 +0200 net: mvpp2: Only clear the stat counters at port init When first configuring a port on PPv2, we want to clear the internal counters so that we don't get values from previous boot stages. However, we can't really clear these counters when resetting the MAC, since there are valid reasons to do so while the port is being used, such as when reconfiguring the interface mode with the PHY. Signed-off-by: Maxime Chevallier Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 11dc8b4011f50b0b207bc53d7882de04068360eb Merge: a5e112e6424a c596687a008b Author: Tejun Heo Date: Mon Jun 10 09:12:39 2019 -0700 Merge branch 'for-5.2-fixes' into for-5.3 commit a3fe2605a60d1d038e9a50cc3cd8a76bb48790b5 Author: Hariprasad Kelam Date: Sun Jun 9 08:37:52 2019 +0530 USB: sisusbvga: Remove unneeded variable Remove unneeded variable ret in function sisusb_set_default_mode. Change return type of sisusb_set_default_mode from int to void as it never fails. Issue identified by coccicheck Signed-off-by: Hariprasad Kelam ----- changes in v2: Change return type of sisusb_set_default_mode from int to void as it never fails changes in v3: Update changelog ---- Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/sisusbvga/sisusb.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 3300a661a97ebcd10ddb5c1c149f22a171e7098a Author: Deepak Mishra Date: Sun Jun 9 18:01:43 2019 +0530 staging: rtl8712: removed unused variables from struct _adapter This patch removed following unused member variables from struct _adapter IsrContent, xmitThread, evtThread, recvThread Signed-off-by: Deepak Mishra Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/drv_types.h | 4 ---- 1 file changed, 4 deletions(-) commit cc96550b698eb1fec29a3d0be1bd572264d6e04d Author: Deepak Mishra Date: Sun Jun 9 18:01:42 2019 +0530 staging: rtl8712: Fixed CamelCase cmdThread rename to cmd_thread This patch renames CamelCase cmdThread to cmd_thread in struct _adapter in drv_types.h and in os_intfs.c This was reported by checkpatch.pl Signed-off-by: Deepak Mishra Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/drv_types.h | 2 +- drivers/staging/rtl8712/os_intfs.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit 43dfe7df06a9175a704af11bd848769432824665 Author: Deepak Mishra Date: Sun Jun 9 18:01:41 2019 +0530 staging: rtl8712: Removed redundant code from function oid_rt_pro_write_register_hdl In function oid_rt_pro_write_register_hdl, Adapter->ImrContent is assigned with RegRWStruct->value but Adapter->ImrContent is never used anywhere else. So those lines has no impact and are removed removed. As that was the only place where ImrContent was used, so the member variable is removed from the structure _adapter Signed-off-by: Deepak Mishra Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/drv_types.h | 1 - drivers/staging/rtl8712/rtl871x_mp_ioctl.c | 5 ----- 2 files changed, 6 deletions(-) commit 906ad742fdbfc451520af37ff3b1e6fc85c3f898 Author: Deepak Mishra Date: Sun Jun 9 18:01:40 2019 +0530 staging: rtl8712: Fixed CamelCase for EepromAddressSize This patch renames CamelCase EepromAddressSizefrom to eeprom_address_size in struct _adapter and in related files drv_types.h, rtl871x_eeprom.c, usb_intf.c This was reported by checkpatch.pl Signed-off-by: Deepak Mishra Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/drv_types.h | 2 +- drivers/staging/rtl8712/rtl871x_eeprom.c | 6 +++--- drivers/staging/rtl8712/usb_intf.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit 2af0ada29f8428bff6a53919d8993fbe2da00423 Author: Hariprasad Kelam Date: Sun Jun 9 18:20:24 2019 +0530 staging: rtl8723bs: provide spaces around unary operators This patch fixes below issues reported by checkpatch CHECK: spaces preferred around that '-' (ctx:VxV) + skb_copy_bits(pfile->pkt, pfile->buf_len-pfile->pkt_len, rmem, len); CHECK: spaces preferred around that '*' (ctx:VxV) +#define WMM_XMIT_THRESHOLD (NR_XMITFRAME*2/5) ^ CHECK: spaces preferred around that '/' (ctx:VxV) +#define WMM_XMIT_THRESHOLD (NR_XMITFRAME*2/5) ^ CHECK: spaces preferred around that '/' (ctx:VxV) + if (pxmitpriv->free_xmitframe_cnt > (NR_XMITFRAME/4)) { ^ Signed-off-by: Hariprasad Kelam Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/xmit_linux.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 045e1ee01da7b81eda8ff2c7f766e59201e18baf Author: Hariprasad Kelam Date: Sun Jun 9 18:19:53 2019 +0530 staging: rtl8723bs: fix issue "Using comparison to true is error prone" this patch fixes below issue reported by checkpatch CHECK: Using comparison to true is error prone + if (res == true) Signed-off-by: Hariprasad Kelam Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/xmit_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9254695963a2380d7e8d66a135847ac6a83bba65 Author: Hariprasad Kelam Date: Sun Jun 9 18:18:51 2019 +0530 staging: rtl8723bs: fix warning comparison to NULL This patch fixes below issue reported by checkpatch CHECK: Comparison to NULL could be written "!pxmitbuf->pallocated_buf" + if (pxmitbuf->pallocated_buf == NULL) Signed-off-by: Hariprasad Kelam Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/xmit_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 117e9dcf74d5dca0a8dad1f22daa38dc542a9f12 Author: Hariprasad Kelam Date: Sun Jun 9 17:53:39 2019 +0530 staging: rtl8723bs: hal: move common code to macro In halbtc8723b2ant_TdmaDurationAdjust function,below piece of code is repeated many times. halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, val); pCoexDm->psTdmaDuAdjType = val; So replace the same with "HAL_BTC8723B2ANT_DMA_DURATION_ADJUST" MACRO. Signed-off-by: Hariprasad Kelam ----- changes in v2: clean the changelog with proper indent ----- Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/HalBtc8723b2Ant.c | 742 ++++++++++-------------- 1 file changed, 291 insertions(+), 451 deletions(-) commit f398bbde9e97769630c101ddc032a9b253d97df0 Author: Tvrtko Ursulin Date: Mon Jun 10 13:57:06 2019 +0100 drm/i915: Make read_subslice_reg take engine The function operates on the render engine so make the input reflect it. v2: * Pass engine to read_subslice_reg. (Chris) * Drop inline from read_subslice_reg. Signed-off-by: Tvrtko Ursulin Suggested-by: Rodrigo Vivi Cc: Chris Wilson Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190610125706.26110-1-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/gt/intel_engine_cs.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit 6caed5c938f6f316b837e55fd78bb9041362327e Author: Tvrtko Ursulin Date: Mon Jun 10 13:06:08 2019 +0100 drm/i915: Remove I915_READ64 and I915_READ64_32x2 Now that all their users are gone we can remove the macros and accompanying duplicated comment. Signed-off-by: Tvrtko Ursulin Suggested-by: Jani Nikula Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190610120608.15477-6-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/i915_drv.h | 18 ------------------ 1 file changed, 18 deletions(-) commit 1cea02dbca840491800abf68f1e2c34d3e0c473a Author: Tvrtko Ursulin Date: Mon Jun 10 13:06:07 2019 +0100 drm/i915: Convert intel_read_wm_latency to uncore mmio accessors More implicit dev_priv removal. Signed-off-by: Tvrtko Ursulin Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190610120608.15477-5-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/intel_pm.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 7f1502d9961477c40ea4c93c9f59f342867ebe2e Author: Tvrtko Ursulin Date: Mon Jun 10 13:06:06 2019 +0100 drm/i915: Convert gem_record_fences to uncore mmio accessors More implicit dev_priv removal. Signed-off-by: Tvrtko Ursulin Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190610120608.15477-4-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/i915_gpu_error.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 8500f14b6398d35779acc6ad8b76dbbec2487a8b Author: Tvrtko Ursulin Date: Mon Jun 10 13:06:05 2019 +0100 drm/i915: Convert icl_get_stolen_reserved to uncore mmio accessors More removal of implicit dev_priv. Signed-off-by: Tvrtko Ursulin Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190610120608.15477-3-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8ed3a623048246918f5bd47e0e08a71cb773b154 Author: Tvrtko Ursulin Date: Mon Jun 10 13:06:04 2019 +0100 drm/i915: Convert i915_reg_read_ioctl to use explicit mmio accessors No excuse for code located in intel_uncore.c to not use intel_uncore_ helpers. Signed-off-by: Tvrtko Ursulin Suggested-by: Jani Nikula Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190610120608.15477-2-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/intel_uncore.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) commit 4d94961d7f283880e2ae453209cdf067010ddd2e Author: Tvrtko Ursulin Date: Mon Jun 10 13:06:03 2019 +0100 drm/i915: Eliminate unused mmio accessors On the path of removing mmio accessors with implicit dev_priv, easy first step is to remove all such unused macros. Signed-off-by: Tvrtko Ursulin Suggested-by: Jani Nikula Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190610120608.15477-1-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/i915_drv.h | 4 ---- 1 file changed, 4 deletions(-) commit a98daf5c5d1bbd859d2f4c282985242ba78fb6c5 Author: Simon Sandström Date: Mon Jun 10 10:44:32 2019 +0200 staging: kpc2000: remove unnecessary debug prints in kpc_dma_driver.c Debug prints that are used only to inform about function entry or exit can be removed as ftrace can be used to get this information. Signed-off-by: Simon Sandström Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c | 4 ---- 1 file changed, 4 deletions(-) commit 7cb0163aa2739fa527fa0859864c54aad2789575 Author: Simon Sandström Date: Mon Jun 10 10:44:31 2019 +0200 staging: kpc2000: remove unnecessary debug prints in fileops.c Debug prints that are used only to inform about function entry or exit can be removed as ftrace can be used to get this information. Signed-off-by: Simon Sandström Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc_dma/fileops.c | 17 ----------------- 1 file changed, 17 deletions(-) commit 39547bc5e81a78836acb97db3179da691986143e Author: Simon Sandström Date: Mon Jun 10 10:44:30 2019 +0200 staging: kpc2000: remove unnecessary debug prints in dma.c Debug prints that are used only to inform about function entry or exit can be removed as ftrace can be used to get this information. Signed-off-by: Simon Sandström Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc_dma/dma.c | 4 ---- 1 file changed, 4 deletions(-) commit fef138203b9ebf401907ff0c716026429438c847 Author: Simon Sandström Date: Mon Jun 10 10:44:29 2019 +0200 staging: kpc2000: remove unnecessary debug prints in core.c Debug prints that are used only to inform about function entry or exit can be removed as ftrace can be used to get this information. Signed-off-by: Simon Sandström Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/core.c | 6 ------ 1 file changed, 6 deletions(-) commit ac6ab6da5b49b63c58d2d1ef111751d272e77738 Author: Simon Sandström Date: Mon Jun 10 10:44:28 2019 +0200 staging: kpc2000: remove unnecessary debug prints in cell_probe.c Debug prints that are used only to inform about function entry or exit can be removed as ftrace can be used to get this information. Signed-off-by: Simon Sandström Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/cell_probe.c | 5 ----- 1 file changed, 5 deletions(-) commit 991661e673f6150ebadf1236fd0013ccea082707 Author: Naoto Kobayashi Date: Mon Jun 10 14:43:14 2019 +0900 staging: kpc2000: remove extra white space in kpc2000_spi.c Since whitespace should not appear between asterisk and variable name in a declaration statement, remove it and fix checkpatch.pl error "foo * bar" should be "foo *bar". Signed-off-by: Naoto Kobayashi Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ee3095c194c59a7a9978bfba707021cd05daf9ec Author: Wolfram Sang Date: Sat Jun 8 12:55:51 2019 +0200 misc: fsa9480: simplify getting the adapter of a client We have a dedicated pointer for that, so use it. Much easier to read and less computation involved. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/misc/fsa9480.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3cc2decc6a08ecd71f95ec259b3c008f239eb185 Author: Wolfram Sang Date: Sat Jun 8 12:55:53 2019 +0200 misc: tsl2550: simplify getting the adapter of a client We have a dedicated pointer for that, so use it. Much easier to read and less computation involved. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/misc/tsl2550.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1a0911a06c238a3ae7dfcd4ea309b0a280c4e5ff Author: Wolfram Sang Date: Sat Jun 8 12:55:52 2019 +0200 misc: isl29003: simplify getting the adapter of a client We have a dedicated pointer for that, so use it. Much easier to read and less computation involved. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman drivers/misc/isl29003.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ef4a8d90b7f495a5b32375e33d5d2fd763a6a18c Author: Wolfram Sang Date: Thu Jun 6 13:35:37 2019 +0200 mmc: sdhi: remove unneeded initialization Bools are initialized to 'false' by default. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Signed-off-by: Ulf Hansson drivers/mmc/host/renesas_sdhi_core.c | 1 - 1 file changed, 1 deletion(-) commit 6a6869869a37e61ec0521653bacc8f39dfaae0e2 Author: Wolfram Sang Date: Thu Jun 6 13:35:36 2019 +0200 mmc: sdhi: improve quirk descriptions Quirks show up in new SoCs as well, so the naming should be generic. Describe them by what they do. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Signed-off-by: Ulf Hansson drivers/mmc/host/renesas_sdhi_core.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 07649d955043232ed3617b92977f2383cc17299f Merge: 00a9584eadf3 97bf85b6ec9e Author: Ulf Hansson Date: Mon Jun 10 17:12:20 2019 +0200 Merge branch 'fixes' into next commit 00a9584eadf39b12dac7495250dc508c6b106f81 Author: Thierry Reding Date: Tue Jun 4 17:34:46 2019 +0200 sdhci: tegra: Do not log error message on deferred probe Recent changes have made it much more likely that clocks are not available, when the SDHCI driver is first probed. However, that is a situation that the driver can cope with just fine. To avoid confusion, don't output an error when this happens. Signed-off-by: Thierry Reding Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-tegra.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 5f2f4e0da2b5d4f4a188480c13f40c848a5f7d15 Author: Baolin Wang Date: Tue Jun 4 16:14:28 2019 +0800 mmc: sdhci-sprd: Add PHY DLL delay configuration Set the PHY DLL delay for each timing mode, which is used to sample the clock accurately and make the clock more stable. Signed-off-by: Baolin Wang Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-sprd.c | 51 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit c8ff5351b598cd722c9cf8a84259887bd1af2e0e Author: Baolin Wang Date: Tue Jun 4 16:14:27 2019 +0800 dt-bindings: mmc: sprd: Add PHY DLL delay documentation Introduce some PHY DLL delays properties to help to sample the PHY clock. Signed-off-by: Baolin Wang Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/sdhci-sprd.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 87a395c27bfab5048413ea18287f0f9453e3e31a Author: Baolin Wang Date: Tue Jun 4 16:14:26 2019 +0800 mmc: sdhci-sprd: Enable PHY DLL to make clock stable For the Spreadtrum SD host controller, when we changed the clock to be more than 52M, we should enable the PHY DLL which is used to track the clock frequency to make the clock work more stable. Otherwise deviation may occur of the higher clock. Signed-off-by: Baolin Wang Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-sprd.c | 44 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) commit 494c11e1a5366d3f5adb2cb2b677b5b0bcf08e3b Author: Baolin Wang Date: Tue Jun 4 16:14:25 2019 +0800 mmc: sdhci-sprd: Add HS400 enhanced strobe mode Add HS400 enhanced strobe mode support for Spreadtrum SD host controller. Signed-off-by: Baolin Wang Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-sprd.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 7486831d7d6aebcf851f9a4bbe65080351d5c9fb Author: Baolin Wang Date: Tue Jun 4 16:14:24 2019 +0800 mmc: sdhci-sprd: Implement the get_max_timeout_count() interface Implement the get_max_timeout_count() interface to set the Spredtrum SD host controller actual maximum timeout count. Signed-off-by: Baolin Wang Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-sprd.c | 7 +++++++ 1 file changed, 7 insertions(+) commit ebd88a38dbf91c496ec1167c1d9a4eaf095dd704 Author: Baolin Wang Date: Tue Jun 4 16:14:23 2019 +0800 mmc: sdhci-sprd: Add optional gate clock support For the Spreadtrum SC9860 platform, we should enable another gate clock '2x_enable' to make the SD host controller work well. Signed-off-by: Baolin Wang Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-sprd.c | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) commit 334eb9bcb94f6e02d96268b76dd270a399643176 Author: Baolin Wang Date: Tue Jun 4 16:14:22 2019 +0800 dt-bindings: mmc: sprd: Add another optional clock documentation For some Spreadtrum platforms like SC9860 platform, we should enable another gate clock '2x_enable' to make the SD host controller work well. Thus add documentation for this optional clock. Signed-off-by: Baolin Wang Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/sdhci-sprd.txt | 1 + 1 file changed, 1 insertion(+) commit 1d94717ddcc7bca9482b8a2f22cd2cac7ce2ca50 Author: Baolin Wang Date: Tue Jun 4 16:14:21 2019 +0800 mmc: sdhci-sprd: Check the enable clock's return value correctly Missed to check the enable clock's return value, fix it. Signed-off-by: Baolin Wang Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-sprd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 90298dc353bc1327d59da30d4b1e4d50d5513033 Author: Colin Ian King Date: Fri May 31 12:32:23 2019 +0100 mmc: sdhci-pci: remove redundant check of slots == 0 The calculation of slots results in a value in the range 1..8 and so slots can never be zero. The check for slots == 0 is always going to be false, hence it is redundant and can be removed. Addresses-Coverity: ("Logically dead code") Signed-off-by: Colin Ian King Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-pci-core.c | 2 -- 1 file changed, 2 deletions(-) commit ca4570a4c2d3be309ff4b8976efa7c8291ca6b6d Author: Maxime Ripard Date: Wed May 29 09:23:44 2019 +0200 dt-bindings: mmc: sun4i: Add YAML schemas Switch the DT binding to a YAML schema to enable the DT validation. Reviewed-by: Rob Herring Signed-off-by: Maxime Ripard Signed-off-by: Ulf Hansson .../bindings/mmc/allwinner,sun4i-a10-mmc.yaml | 98 ++++++++++++++++++++++ .../devicetree/bindings/mmc/sunxi-mmc.txt | 52 ------------ 2 files changed, 98 insertions(+), 52 deletions(-) commit f9b7989859dd005ffcd8aea5a9c862f61cda9cd8 Author: Maxime Ripard Date: Wed May 29 09:23:43 2019 +0200 dt-bindings: mmc: Add YAML schemas for the generic MMC options The MMC controllers have a bunch of generic options that are needed in a device tree. Add a YAML schemas for those. Reviewed-by: Rob Herring Signed-off-by: Maxime Ripard Signed-off-by: Ulf Hansson .../devicetree/bindings/mmc/mmc-controller.yaml | 374 +++++++++++++++++++++ Documentation/devicetree/bindings/mmc/mmc.txt | 178 +--------- 2 files changed, 375 insertions(+), 177 deletions(-) commit 7e24e28b79b3df4fb1db40f26c46e0a3480eede4 Author: Faiz Abbas Date: Tue May 28 15:29:28 2019 +0530 mmc: sdhci_am654: Print error message if the DLL fails to lock Print an error message and return if DLL fails to lock. Signed-off-by: Faiz Abbas Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci_am654.c | 5 +++++ 1 file changed, 5 insertions(+) commit 8023cf2634b051ff53739a035a0c1bef3cbb389c Author: Faiz Abbas Date: Tue May 28 15:29:27 2019 +0530 mmc: sdhci_am654: Improve whitespace utilisation with regmap_*() calls Line wrapping with the regmap_*() functions is way more conservative than required by the 80 character rule. Expand the function calls out to use less number of lines. Signed-off-by: Faiz Abbas Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci_am654.c | 34 +++++++++++++--------------------- 1 file changed, 13 insertions(+), 21 deletions(-) commit 65f1a0d39c289bb6fc85635528cd36c4b07f560e Author: Wang Hai Date: Wed May 15 22:37:25 2019 +0800 memstick: Fix error cleanup path of memstick_init If bus_register fails. On its error handling path, it has cleaned up what it has done. There is no need to call bus_unregister again. Otherwise, if bus_unregister is called, issues such as null-ptr-deref will arise. Syzkaller report this: kobject_add_internal failed for memstick (error: -12 parent: bus) BUG: KASAN: null-ptr-deref in sysfs_remove_file_ns+0x1b/0x40 fs/sysfs/file.c:467 Read of size 8 at addr 0000000000000078 by task syz-executor.0/4460 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0xa9/0x10e lib/dump_stack.c:113 __kasan_report+0x171/0x18d mm/kasan/report.c:321 kasan_report+0xe/0x20 mm/kasan/common.c:614 sysfs_remove_file_ns+0x1b/0x40 fs/sysfs/file.c:467 sysfs_remove_file include/linux/sysfs.h:519 [inline] bus_remove_file+0x6c/0x90 drivers/base/bus.c:145 remove_probe_files drivers/base/bus.c:599 [inline] bus_unregister+0x6e/0x100 drivers/base/bus.c:916 ? 0xffffffffc1590000 memstick_init+0x7a/0x1000 [memstick] do_one_initcall+0xb9/0x3b5 init/main.c:914 do_init_module+0xe0/0x330 kernel/module.c:3468 load_module+0x38eb/0x4270 kernel/module.c:3819 __do_sys_finit_module+0x162/0x190 kernel/module.c:3909 do_syscall_64+0x72/0x2a0 arch/x86/entry/common.c:298 entry_SYSCALL_64_after_hwframe+0x49/0xbe Fixes: baf8532a147d ("memstick: initial commit for Sony MemoryStick support") Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: Ulf Hansson drivers/memstick/core/memstick.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit acdc8e71d9bb0bdef66b002f8baf8af3147df00c Author: Neil Armstrong Date: Mon May 27 14:43:06 2019 +0200 mmc: meson-gx: add dram-access-quirk On the Amlogic G12A SoC family, (only) the SDIO controller fails to access the data from DRAM, leading to a broken controller. But each MMC controller has 1,5KiB of SRAM after the registers, that can be used as bounce buffer to avoid direct DRAM access from the integrated DMAs (this SRAM may be used by the boot ROM when DRAM is not yet initialized). The quirk is to disable the chained descriptor for this controller, and use this SRAM memory zone as buffer for the bounce buffer fallback mode. The performance hit hasn't been evaluated, but the fix has been tested using a WiFi AP6398S SDIO module, and the iperf3 Bandwidth measurement gave 55.2 Mbits/sec over a 63 Hours long test, with the SDIO ios set as High-Speed at 50MHz clock. It gave 170 Mbits/sec as SDR104 and 200MHz clock. Reviewed-by: Kevin Hilman Tested-by: Guillaume La Roque Signed-off-by: Neil Armstrong Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 70 ++++++++++++++++++++++++++++++++--------- 1 file changed, 55 insertions(+), 15 deletions(-) commit 5a46b6fa0f33c2ca7a8432a0a48e1bf4a71fcc9f Author: Neil Armstrong Date: Mon May 27 14:43:05 2019 +0200 dt-bindings: mmc: meson-gx: add dram-access-quirk property On the Amlogic G12A SoC family, (only) the SDIO controller has a bug which makes any DRAM access from the MMC controller fail. Add the amlogic,dram-access-quirk property so signal this particular controller has this bug and needs a quirk to work properly. Reviewed-by: Martin Blumenstingl Signed-off-by: Neil Armstrong Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/amlogic,meson-gx.txt | 4 ++++ 1 file changed, 4 insertions(+) commit 754aee559160fe6a9d7debe9f1ad07d060e6ae93 Author: Neil Armstrong Date: Mon May 20 16:36:46 2019 +0200 mmc: meson-gx-mmc: update with SPDX Licence identifier Signed-off-by: Neil Armstrong Acked-by: Kevin Hilman Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) commit 7ff213193310ef8d0ee5f04f79d791210787ac2c Author: Niklas Söderlund Date: Thu Apr 11 00:22:40 2019 +0200 mmc: tmio: move runtime PM enablement to the driver implementations Both the Renesas and Uniphier implementations perform actions which affect runtime PM before calling into the core tmio_mmc_host_probe() which enabled runtime PM. Move pm_runtime_enable() from the core and tmio_mmc_host_probe() into each drivers probe() so it can be called before any clocks or other resources are switched on. Reported-by: Geert Uytterhoeven Signed-off-by: Niklas Söderlund Acked-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/renesas_sdhi_core.c | 6 ++++++ drivers/mmc/host/tmio_mmc.c | 5 +++++ drivers/mmc/host/tmio_mmc_core.c | 11 +++++++++-- drivers/mmc/host/uniphier-sd.c | 3 +++ 4 files changed, 23 insertions(+), 2 deletions(-) commit fdc4e755f6c516e526dd9396b6eb05712c44fb65 Author: Kamlesh Gurudasani Date: Wed May 8 01:22:29 2019 +0530 mmc: android-goldfish: Drop pointer to mmc_host from goldfish_mmc_host The driver for android-goldfish uses a pointer to get from the private goldfish_mmc_host structure to the generic mmc_host structure. However the latter is always immediately preceding the former in memory, so compute its address with a subtraction (which is cheaper than a dereference) and drop the superfluous pointer. No functional change intended. Signed-off-by: Kamlesh Gurudasani Signed-off-by: Ulf Hansson drivers/mmc/host/android-goldfish.c | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) commit c946feaabbdd05b949756cd209ac3937f98aa148 Author: Dinh Nguyen Date: Mon Apr 29 12:33:02 2019 -0500 ARM: dts: arria10: Add EMAC OCP reset property Add the EMAC's OCP reset property on Arria10. The OCP reset bits are also needed to correctly bring the EMACs out of reset correctly. Signed-off-by: Dinh Nguyen arch/arm/boot/dts/socfpga_arria10.dtsi | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit d9b9f805ee2b63a9d0297c11e168cb303f15f717 Author: Alan Tull Date: Wed Apr 24 10:39:15 2019 -0500 ARM: dts: socfpga: add ltc2497 on arria10 devkit Add the two ltc2497 devices that are on the SoCFPGA Arria10 Socdk board at addresses 0x14 and 0x16. Signed-off-by: Alan Tull Signed-off-by: Dinh Nguyen arch/arm/boot/dts/socfpga_arria10_socdk.dtsi | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit aef9752274f4045b0dab577e113da63c96832f77 Author: Gustavo A. R. Silva Date: Fri Jun 7 13:48:45 2019 -0500 spi: Use struct_size() helper One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct spi_replaced_transfers { ... struct spi_transfer inserted_transfers[]; }; Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. So, replace the following form: insert * sizeof(struct spi_transfer) + sizeof(struct spi_replaced_transfers) with: struct_size(rxfer, inserted_transfers, insert) This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Mark Brown drivers/spi/spi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d17adf7d3f5be74bdfda89ceed7bff3910ffb6d4 Author: Linus Walleij Date: Sun Jun 9 13:05:13 2019 +0200 regulator: max77802: Drop unused includes This driver does not use any symbols from no so just drop the includes. Cc: Javier Martinez Canillas Signed-off-by: Linus Walleij Signed-off-by: Mark Brown drivers/regulator/max77802-regulator.c | 2 -- 1 file changed, 2 deletions(-) commit 6b96092a6bfa65566dda2f5a68a559a743b8d132 Author: Wolfram Sang Date: Sat Jun 8 12:56:04 2019 +0200 regulator: max8952: simplify getting the adapter of a client We have a dedicated pointer for that, so use it. Much easier to read and less computation involved. Signed-off-by: Wolfram Sang Signed-off-by: Mark Brown drivers/regulator/max8952.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 960f428ca0a04a59e74639571126245a3efc4bcf Author: Jerome Brunet Date: Mon Jun 10 14:53:44 2019 +0200 ASoC: meson: axg-card: fix null pointer dereference in clean up When using modern dai_link style, we must first make sure the struct snd_soc_dai_link_component exists before accessing its members. In case of early probe deferral, some of the '.cpus' or '.codecs' may not have been allocated yet. Check this before calling of_node_put() on the structure member. Fixes: c84836d7f650 ("ASoC: meson: axg-card: use modern dai_link style") Cc: Kuninori Morimoto Signed-off-by: Jerome Brunet Signed-off-by: Mark Brown sound/soc/meson/axg-card.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 9d373acadaf676e3733ba57c7294ec60e9a358a9 Author: Phil Reid Date: Mon Jun 10 17:50:11 2019 +0800 gpio: altera: Allocate irq_chip dynamically Keeping the irq_chip definition static shares it with multiple instances of the altera gpiochip in the system. This is bad and now we get this warning from gpiolib core: "detected irqchip that is shared with multiple gpiochips: please fix the driver." Hence, move the irq_chip definition from being driver static into the struct altera_gpio_chips. So a unique irq_chip is used for each gpiochip instance. Signed-off-by: Phil Reid Signed-off-by: Linus Walleij drivers/gpio/gpio-altera.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) commit 1ebd06871b57a632b6624fbd4b680dc7dd8a1283 Author: Robert Hancock Date: Fri Jun 7 11:04:16 2019 -0600 gpio: xilinx: convert from OF GPIO to standard devm APIs This driver was using the OF GPIO helper API, but barely used any of its features and it cost more code than it saved. Also, the OF GPIO code is now deprecated. Convert it to use a more standard setup and use devm APIs for initialization to avoid the need for a remove function. Our rationale for this change is that we are using the Xilinx GPIO with resources injected using the MFD core rather than on the device tree itself. Using platform rather than OF-specific resources allows this to work for free. Signed-off-by: Robert Hancock Acked-by: Michal Simek Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 1 - drivers/gpio/gpio-xilinx.c | 90 +++++++++++++++++++--------------------------- 2 files changed, 36 insertions(+), 55 deletions(-) commit 0f2692f7f2820aff5ebbda9723ddd63e800819cb Author: YueHaibing Date: Tue May 28 22:29:12 2019 +0800 staging: fieldbus: Fix build error without CONFIG_REGMAP_MMIO Fix gcc build error while CONFIG_REGMAP_MMIO is not set drivers/staging/fieldbus/anybuss/arcx-anybus.o: In function `controller_probe': arcx-anybus.c: undefined reference to `__devm_regmap_init_mmio_clk' Select REGMAP_MMIO to fix it. Reported-by: Hulk Robot Fixes: 2411a336c8ce ("staging: fieldbus: arcx-anybus: change custom -> mmio regmap") Signed-off-by: YueHaibing Reviewed-by: Sven Van Asbroeck Signed-off-by: Greg Kroah-Hartman drivers/staging/fieldbus/anybuss/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 1bb418bffdd6f95a41e8e59be63933bc84fde13c Author: Sebastian Reichel Date: Thu May 23 22:07:56 2019 +0200 drm/omap: add support for manually updated displays This adds the required infrastructure for manually updated displays, such as DSI command mode panels. While those panels often support partial updates we currently always do a full refresh. The display will be refreshed when something calls the dirty callback, such as libdrm's drmModeDirtyFB(). This is currently being done at least by the kernel console and Xorg (with modesetting driver) in their default configuration. Weston does not implement this and the fbdev backend does not work (display will not update). Weston's DRM backend uses double buffering and the page flip will also trigger a display refresh. Signed-off-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_crtc.c | 114 ++++++++++++++++++++++++++++++++++-- drivers/gpu/drm/omapdrm/omap_crtc.h | 1 + drivers/gpu/drm/omapdrm/omap_fb.c | 19 ++++++ 3 files changed, 129 insertions(+), 5 deletions(-) commit 47103a80f55a6b7f5a51f1e9a4886e532cdfa4e2 Author: Sebastian Reichel Date: Thu May 23 22:07:55 2019 +0200 drm/omap: add framedone interrupt support This prepares framedone interrupt handling for manual display update support. Acked-by: Pavel Machek Tested-by: Tony Lindgren Tested-by: Pavel Machek Signed-off-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_crtc.c | 48 +++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/omapdrm/omap_crtc.h | 1 + drivers/gpu/drm/omapdrm/omap_irq.c | 25 +++++++++++++++++++ drivers/gpu/drm/omapdrm/omap_irq.h | 1 + 4 files changed, 75 insertions(+) commit ad9df7d91b4a6e8f4b20c2bf539ac09b3b2ad6eb Author: Sebastian Reichel Date: Thu May 23 22:07:54 2019 +0200 drm/omap: don't check dispc timings for DSI While most display types only forward their VM to the DISPC, this is not true for DSI. DSI calculates the VM for DISPC based on its own, but it's not identical. Actually the DSI VM is not even a valid DISPC VM making this check fail. Let's restore the old behaviour and avoid checking the DISPC VM for DSI here. Fixes: 7c27fa57ef31 ("drm/omap: Call dispc timings check operation directly") Acked-by: Pavel Machek Tested-by: Tony Lindgren Tested-by: Pavel Machek Signed-off-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_crtc.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit 81f2ca24999ad7552cf3389ae88bd71acbd82d1c Author: Sebastian Reichel Date: Thu May 23 22:07:53 2019 +0200 drm/omap: use DRM_DEBUG_DRIVER instead of CORE This macro is only used by omapdrm, which should print debug messages using the DRIVER category instead of the default CORE category. Acked-by: Pavel Machek Tested-by: Tony Lindgren Tested-by: Pavel Machek Signed-off-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_drv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f2f5f77a22c1b3d99c79245e32f40f2782f603ca Author: Kefeng Wang Date: Tue Apr 23 15:50:01 2019 +0800 drm/omap: Use dev_get_drvdata() Using dev_get_drvdata directly. Cc: Tomi Valkeinen Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Kefeng Wang Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit 9a671c214531e3cbfe46188c76c917132a36fe99 Author: Emil Velikov Date: Wed May 22 16:02:18 2019 +0100 drm/omap: remove open-coded drm_invalid_op() Cc: Tomi Valkeinen Signed-off-by: Emil Velikov Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_drv.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) commit 1ee2db22dbadd3eba4d9b8f66778ee76bde2b6b1 Author: Thomas Meyer Date: Mon May 27 22:41:15 2019 +0200 drm/omap: Make sure device_id tables are NULL terminated Make sure (of/i2c/platform)_device_id tables are NULL terminated. Signed-off-by: Thomas Meyer Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/omapdss-boot-init.c | 1 + 1 file changed, 1 insertion(+) commit 7fae8a9ced742f364604a88a53084f471cc9c6e5 Author: Linus Walleij Date: Sun Jun 9 01:11:38 2019 +0200 fmc: Decouple from Linux GPIO subsystem FMC has its own GPIO handling, the inclusion of is only to reuse some flags that we can just as well provide using local defines. Cc: Federico Vaga Cc: Pat Riehecky Acked-by: Alessandro Rubini Signed-off-by: Linus Walleij drivers/fmc/fmc-trivial.c | 1 - include/linux/fmc.h | 18 ++++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) commit c8a53b2db0aec40d8b217936e1b7f3d840c50390 Author: Jason Gunthorpe Date: Thu May 23 10:36:46 2019 -0300 mm/hmm: Hold a mmgrab from hmm to mm So long as a struct hmm pointer exists, so should the struct mm it is linked too. Hold the mmgrab() as soon as a hmm is created, and mmdrop() it once the hmm refcount goes to zero. Since mmdrop() (ie a 0 kref on struct mm) is now impossible with a !NULL mm->hmm delete the hmm_hmm_destroy(). Signed-off-by: Jason Gunthorpe Reviewed-by: Jérôme Glisse Reviewed-by: John Hubbard Reviewed-by: Ralph Campbell Reviewed-by: Ira Weiny Reviewed-by: Christoph Hellwig Tested-by: Philip Yang include/linux/hmm.h | 3 --- kernel/fork.c | 1 - mm/hmm.c | 22 ++++------------------ 3 files changed, 4 insertions(+), 22 deletions(-) commit e36acfe6c86d13eec62321e1e86a1ce287e52e7d Author: Jason Gunthorpe Date: Thu May 23 09:41:19 2019 -0300 mm/hmm: Use hmm_mirror not mm as an argument for hmm_range_register Ralph observes that hmm_range_register() can only be called by a driver while a mirror is registered. Make this clear in the API by passing in the mirror structure as a parameter. This also simplifies understanding the lifetime model for struct hmm, as the hmm pointer must be valid as part of a registered mirror so all we need in hmm_register_range() is a simple kref_get. Suggested-by: Ralph Campbell Signed-off-by: Jason Gunthorpe Reviewed-by: John Hubbard Reviewed-by: Ralph Campbell Reviewed-by: Ira Weiny Reviewed-by: Christoph Hellwig Tested-by: Philip Yang drivers/gpu/drm/nouveau/nouveau_svm.c | 2 +- include/linux/hmm.h | 7 ++++--- mm/hmm.c | 13 ++++--------- 3 files changed, 9 insertions(+), 13 deletions(-) commit 9b604722059039a1a3ff69fb8dfd024264046024 Author: Mark Rutland Date: Mon Jun 10 13:41:07 2019 +0100 arm64: mm: avoid redundant READ_ONCE(*ptep) In set_pte_at(), we read the old pte value so that it can be passed into checks for racy hw updates. These checks are only performed for CONFIG_DEBUG_VM, and the value is not used otherwise. Since we read the pte value with READ_ONCE(), the compiler cannot elide the redundant read for !CONFIG_DEBUG_VM kernels. Let's ameliorate matters by moving the read and the checks into a helper, __check_racy_pte_update(), which only performs the read when the value will be used. This also allows us to reformat the conditions for clarity. Acked-by: Will Deacon Signed-off-by: Mark Rutland Signed-off-by: Catalin Marinas arch/arm64/include/asm/pgtable.h | 47 +++++++++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 17 deletions(-) commit 45450f36e569e5162957df488b0174c9a952e1b0 Author: Keerthy Date: Mon Apr 29 10:14:35 2019 +0530 soc: ti: pm33xx: Add a print while entering RTC only mode with DDR in self-refresh Currently there is no way to distinguish if the SoC entered DS0 mode or the RTC only mode. Hence add a print before entering the RTC only mode. Signed-off-by: Keerthy Signed-off-by: Tony Lindgren drivers/soc/ti/pm33xx.c | 1 + 1 file changed, 1 insertion(+) commit 9037829ca29e53e885c0e4ec0a9d203ec5fa77d8 Author: YueHaibing Date: Sat Apr 13 22:17:44 2019 +0800 ARM: OMAP2+: Make some variables static Fix sparse warnings: arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c:532:25: warning: symbol 'am33xx_gpio_hwmod_class' was not declared. Should it be static? arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c:542:19: warning: symbol 'am33xx_gpio1_hwmod' was not declared. Should it be static? arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c:562:19: warning: symbol 'am33xx_gpio2_hwmod' was not declared. Should it be static? arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c:582:19: warning: symbol 'am33xx_gpio3_hwmod' was not declared. Should it be static? Signed-off-by: YueHaibing Signed-off-by: Tony Lindgren arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e3630fd9aa2a11d0dd12b92e7d51299f9b547d64 Author: Teresa Remmet Date: Fri May 24 15:20:03 2019 +0200 ARM: dts: Add support for phyBOARD-REGOR-AM335x Adding support for phyBOARD-REGOR-AM335x: - CAN - UART0 / UART2 - RS485 - USB device - i2c RTC - SD - ethernet0 RMII - ethernet1 MII - Digital I/Os Signed-off-by: Teresa Remmet Signed-off-by: Tony Lindgren .../devicetree/bindings/arm/omap/omap.txt | 3 + arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/am335x-regor-rdk.dts | 24 +++ arch/arm/boot/dts/am335x-regor.dtsi | 223 +++++++++++++++++++++ 4 files changed, 251 insertions(+) commit 4dc020c507551a68d334bd93c7ca1312c487958d Author: Teresa Remmet Date: Fri May 24 15:20:02 2019 +0200 ARM: dts: am335x-pcm-953: Remove eth phy delay Default values fit better than these historical settings. Hardware layout had been adapted accordingly already in alpha stage. They did not cause problems for a long time. Removed values now. Signed-off-by: Teresa Remmet Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-pcm-953.dtsi | 16 ---------------- 1 file changed, 16 deletions(-) commit 267247d3d2dfd8e9d3a3dd4aebeee8f157cd7cd3 Author: Teresa Remmet Date: Fri May 24 15:20:01 2019 +0200 ARM: dts: am335x-pcm-953: Update user led names Rename user led nodes to match the phytec user leds name scheme. Signed-off-by: Teresa Remmet Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-pcm-953.dtsi | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 66fa560004b40842f090e4c167a10394ca579071 Author: Teresa Remmet Date: Fri May 24 15:20:00 2019 +0200 ARM: dts: am335x-phycore-som: Enable gpmc node in dts files As nand flash is not always the primary storage device any more disable it in the phycore-som include file. Enable it the device tree files where it is populated. Signed-off-by: Teresa Remmet Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-phycore-rdk.dts | 4 ++++ arch/arm/boot/dts/am335x-phycore-som.dtsi | 2 +- arch/arm/boot/dts/am335x-wega-rdk.dts | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) commit 65604db5792bc02e197dc6d23426157ac93138cf Author: Daniel Schultz Date: Fri May 24 15:19:59 2019 +0200 ARM: dts: am335x-phycore-som: Add emmc node The phyCORE-AM335x EMMC modules have an EMMC populated and are based on the phyCORE-AM335x R2 SOM. Therefore, the EMMC node will be added to the phycore-som devce tree but is by default disabled. Signed-off-by: Daniel Schultz Signed-off-by: Teresa Remmet Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-phycore-som.dtsi | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 81ec03f5d912bc339496a901195c206d70c0586e Author: Teresa Remmet Date: Fri May 24 15:19:58 2019 +0200 ARM: dts: am335x phytec boards: Remove regulator node Move regulators directly to the root node like most am335x boards do. Signed-off-by: Teresa Remmet Signed-off-by: Tony Lindgren arch/arm/boot/dts/am335x-phycore-som.dtsi | 18 +++++++----------- arch/arm/boot/dts/am335x-wega.dtsi | 16 ++++++---------- 2 files changed, 13 insertions(+), 21 deletions(-) commit 566734534f56186a089103bef82725a1a75178ac Author: Adam Ford Date: Fri May 10 15:22:56 2019 -0500 ARM: dts: Add LCD type 28 support to LogicPD Torpedo DM3730 devkit There are two LCD device released by Logic PD for the Torpedo, type 15 and Type 28. The stock dts file supports the older LCD, so this patch enables support for the newer one. For details between these different LCD's see https://support.logicpd.com/DesktopModules/Bring2mind/DMX/Download.aspx?portalid=0&EntryId=2777 Signed-off-by: Adam Ford [tony@atomide.com: removed extra blank line for checkpatch] Signed-off-by: Tony Lindgren .../boot/dts/logicpd-torpedo-37xx-devkit-28.dts | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 4e23be473e3063a9d3bc06bb0aee89885fffab0e Author: Tony Lindgren Date: Mon Jun 10 04:48:05 2019 -0700 bus: ti-sysc: Add support for module specific reset quirks Some older interconnect target modules need module internal clock toggling quirks to reset properly. We've been doing this in the platform code earlier, but need to be able to it directly in the ti-sysc driver when we no longer rely on on the platform code. Let's add reset handling for 1-wire, i2c and watchdog. Later on we can add more modules like msdi and dss as they get tested. For dra7 pcie, we should be able to just use the rstctrl reset driver when available. Signed-off-by: Tony Lindgren drivers/bus/ti-sysc.c | 129 ++++++++++++++++++++++++++++++++-- include/linux/platform_data/ti-sysc.h | 3 + 2 files changed, 127 insertions(+), 5 deletions(-) commit fe03d4745675cbd678cb8c50d951df0abafdcaee Author: Jozsef Kadlecsik Date: Mon Jun 10 13:00:24 2019 +0200 Update my email address It's better to use my kadlec@netfilter.org email address in the source code. I might not be able to use kadlec@blackhole.kfki.hu in the future. Signed-off-by: Jozsef Kadlecsik Signed-off-by: Jozsef Kadlecsik CREDITS | 2 +- MAINTAINERS | 2 +- include/linux/jhash.h | 2 +- include/linux/netfilter/ipset/ip_set.h | 2 +- include/linux/netfilter/ipset/ip_set_counter.h | 2 +- include/linux/netfilter/ipset/ip_set_skbinfo.h | 2 +- include/linux/netfilter/ipset/ip_set_timeout.h | 2 +- include/uapi/linux/netfilter/ipset/ip_set.h | 2 +- net/ipv4/netfilter/iptable_raw.c | 2 +- net/ipv4/netfilter/nf_nat_h323.c | 2 +- net/ipv6/netfilter/ip6table_raw.c | 2 +- net/netfilter/ipset/ip_set_bitmap_gen.h | 2 +- net/netfilter/ipset/ip_set_bitmap_ip.c | 4 ++-- net/netfilter/ipset/ip_set_bitmap_ipmac.c | 4 ++-- net/netfilter/ipset/ip_set_bitmap_port.c | 4 ++-- net/netfilter/ipset/ip_set_core.c | 4 ++-- net/netfilter/ipset/ip_set_getport.c | 2 +- net/netfilter/ipset/ip_set_hash_gen.h | 2 +- net/netfilter/ipset/ip_set_hash_ip.c | 4 ++-- net/netfilter/ipset/ip_set_hash_ipmark.c | 2 +- net/netfilter/ipset/ip_set_hash_ipport.c | 4 ++-- net/netfilter/ipset/ip_set_hash_ipportip.c | 4 ++-- net/netfilter/ipset/ip_set_hash_ipportnet.c | 4 ++-- net/netfilter/ipset/ip_set_hash_mac.c | 4 ++-- net/netfilter/ipset/ip_set_hash_net.c | 4 ++-- net/netfilter/ipset/ip_set_hash_netiface.c | 4 ++-- net/netfilter/ipset/ip_set_hash_netnet.c | 2 +- net/netfilter/ipset/ip_set_hash_netport.c | 4 ++-- net/netfilter/ipset/ip_set_hash_netportnet.c | 2 +- net/netfilter/ipset/ip_set_list_set.c | 4 ++-- net/netfilter/nf_conntrack_h323_main.c | 2 +- net/netfilter/nf_conntrack_proto_tcp.c | 2 +- net/netfilter/xt_iprange.c | 4 ++-- net/netfilter/xt_set.c | 4 ++-- 34 files changed, 49 insertions(+), 49 deletions(-) commit 11921796f4799ca9c61c4b22cc54d84aa69f8a35 Author: Stefano Brivio Date: Sun May 26 23:14:06 2019 +0200 ipset: Fix memory accounting for hash types on resize If a fresh array block is allocated during resize, the current in-memory set size should be increased by the size of the block, not replaced by it. Before the fix, adding entries to a hash set type, leading to a table resize, caused an inconsistent memory size to be reported. This becomes more obvious when swapping sets with similar sizes: # cat hash_ip_size.sh #!/bin/sh FAIL_RETRIES=10 tries=0 while [ ${tries} -lt ${FAIL_RETRIES} ]; do ipset create t1 hash:ip for i in `seq 1 4345`; do ipset add t1 1.2.$((i / 255)).$((i % 255)) done t1_init="$(ipset list t1|sed -n 's/Size in memory: \(.*\)/\1/p')" ipset create t2 hash:ip for i in `seq 1 4360`; do ipset add t2 1.2.$((i / 255)).$((i % 255)) done t2_init="$(ipset list t2|sed -n 's/Size in memory: \(.*\)/\1/p')" ipset swap t1 t2 t1_swap="$(ipset list t1|sed -n 's/Size in memory: \(.*\)/\1/p')" t2_swap="$(ipset list t2|sed -n 's/Size in memory: \(.*\)/\1/p')" ipset destroy t1 ipset destroy t2 tries=$((tries + 1)) if [ ${t1_init} -lt 10000 ] || [ ${t2_init} -lt 10000 ]; then echo "FAIL after ${tries} tries:" echo "T1 size ${t1_init}, after swap ${t1_swap}" echo "T2 size ${t2_init}, after swap ${t2_swap}" exit 1 fi done echo "PASS" # echo -n 'func hash_ip4_resize +p' > /sys/kernel/debug/dynamic_debug/control # ./hash_ip_size.sh [ 2035.018673] attempt to resize set t1 from 10 to 11, t 00000000fe6551fa [ 2035.078583] set t1 resized from 10 (00000000fe6551fa) to 11 (00000000172a0163) [ 2035.080353] Table destroy by resize 00000000fe6551fa FAIL after 4 tries: T1 size 9064, after swap 71128 T2 size 71128, after swap 9064 Reported-by: NOYB Fixes: 9e41f26a505c ("netfilter: ipset: Count non-static extension memory for userspace") Signed-off-by: Stefano Brivio Signed-off-by: Jozsef Kadlecsik net/netfilter/ipset/ip_set_hash_gen.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b1732e1638925a2b60b5b453b25f59bf4e79e010 Author: Jozsef Kadlecsik Date: Mon Jun 10 12:58:26 2019 +0200 netfilter: ipset: Fix error path in set_target_v3_checkentry() Fix error path and release the references properly. Signed-off-by: Jozsef Kadlecsik net/netfilter/xt_set.c | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) commit 13c6ba1f855415cf3b9c58ea926ae8858050ec1c Author: Jozsef Kadlecsik Date: Mon Jun 10 12:50:00 2019 +0200 netfilter: ipset: Fix the last missing check of nla_parse_deprecated() In dump_init() the outdated comment was incorrect and we had a missing validation check of nla_parse_deprecated(). Signed-off-by: Jozsef Kadlecsik net/netfilter/ipset/ip_set_core.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit f4f5748bfec94cf418e49bf05f0c81a1b9ebc950 Author: Aditya Pakki Date: Mon Jun 10 12:47:37 2019 +0200 netfilter: ipset: fix a missing check of nla_parse When nla_parse fails, we should not use the results (the first argument). The fix checks if it fails, and if so, returns its error code upstream. Signed-off-by: Aditya Pakki Signed-off-by: Jozsef Kadlecsik net/netfilter/ipset/ip_set_core.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit f0cb839084efdf99328bed393f12f2e5c258ce8d Author: Florent Fourcot Date: Mon Jun 10 12:42:56 2019 +0200 netfilter: ipset: merge uadd and udel functions Both functions are using exactly the same code, except the command value passed to call_ad function. Signed-off-by: Florent Fourcot Signed-off-by: Jozsef Kadlecsik net/netfilter/ipset/ip_set_core.c | 71 +++++++++++---------------------------- 1 file changed, 20 insertions(+), 51 deletions(-) commit 24c509b2e2f1661ce9500fc7e32647113e62d7e3 Author: Florent Fourcot Date: Mon Jun 10 12:28:58 2019 +0200 netfilter: ipset: remove useless memset() calls One of the memset call is buggy: it does not erase full array, but only pointer size. Moreover, after a check, first step of nla_parse_nested/nla_parse is to erase tb array as well. We can remove both calls safely. Signed-off-by: Florent Fourcot Signed-off-by: Jozsef Kadlecsik net/netfilter/ipset/ip_set_core.c | 2 -- 1 file changed, 2 deletions(-) commit bf210f6c9e6fd8dc0d154ad18f741f20e64a3fce Author: Lionel Landwerlin Date: Sun Jun 2 01:58:45 2019 +0300 drm/i915/perf: fix whitelist on Gen10+ Gen10 added an additional NOA_WRITE register (high bits) and we forgot to whitelist it for userspace. Fixes: 95690a02fb5d96 ("drm/i915/perf: enable perf support on CNL") Signed-off-by: Lionel Landwerlin Reviewed-by: Kenneth Graunke Link: https://patchwork.freedesktop.org/patch/msgid/20190601225845.12600-1-lionel.g.landwerlin@intel.com drivers/gpu/drm/i915/i915_perf.c | 1 + drivers/gpu/drm/i915/i915_reg.h | 1 + 2 files changed, 2 insertions(+) commit 3aa6be30da899619c44aa654313ba66eb44e7291 Author: Gwendal Grignou Date: Mon Jun 3 11:34:01 2019 -0700 mfd: cros_ec: Update I2S API Improve I2S API. Rename ec_response_codec_gain into ec_codec_i2s_gain, update caller accordlingly. Signed-off-by: Gwendal Grignou Acked-by: Enric Balletbo i Serra Acked-by: Benson Leung Reviewed-by: Fabien Lahoudere Signed-off-by: Lee Jones include/linux/mfd/cros_ec_commands.h | 44 ++++++++++++++++-------------------- sound/soc/codecs/cros_ec_codec.c | 8 +++---- 2 files changed, 24 insertions(+), 28 deletions(-) commit 2f2e6d14866e34b0982460760f770265215f08c5 Author: Gwendal Grignou Date: Mon Jun 3 11:34:00 2019 -0700 mfd: cros_ec: Add Management API entry points Add commands for test and management. Add command space for future development. Signed-off-by: Gwendal Grignou Acked-by: Enric Balletbo i Serra Acked-by: Benson Leung Reviewed-by: Fabien Lahoudere Signed-off-by: Lee Jones include/linux/mfd/cros_ec_commands.h | 113 +++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) commit cc3a032fd7128d03715c655ad66a263b6d518071 Author: Gwendal Grignou Date: Mon Jun 3 11:33:59 2019 -0700 mfd: cros_ec: Add SKU ID and Secure storage API Add API to store SKU, Cros board information in EC flash memory. Add API to store security data in EC. Signed-off-by: Gwendal Grignou Acked-by: Enric Balletbo i Serra Acked-by: Benson Leung Reviewed-by: Fabien Lahoudere Signed-off-by: Lee Jones include/linux/mfd/cros_ec_commands.h | 107 +++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) commit a0d50b31cee948de1be0ad14b78127a00530f43e Author: Gwendal Grignou Date: Mon Jun 3 11:33:58 2019 -0700 mfd: cros_ec: Add API for rwsig Add command to retrieve signature of image stored in the RW memory slot(s). Signed-off-by: Gwendal Grignou Acked-by: Enric Balletbo i Serra Acked-by: Benson Leung Reviewed-by: Fabien Lahoudere Signed-off-by: Lee Jones include/linux/mfd/cros_ec_commands.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit da038d6ee7a4e791eba6b1954a6c49f4f2856786 Author: Gwendal Grignou Date: Mon Jun 3 11:33:57 2019 -0700 mfd: cros_ec: Add API for Fingerprint support Add API for fingerprint sensor presented by embedded controller. Signed-off-by: Gwendal Grignou Acked-by: Enric Balletbo i Serra Acked-by: Benson Leung Reviewed-by: Fabien Lahoudere Signed-off-by: Lee Jones include/linux/mfd/cros_ec_commands.h | 228 +++++++++++++++++++++++++++++++++++ 1 file changed, 228 insertions(+) commit 6f9d485ca4c5d3ac223a1e49f604192be12e0676 Author: Gwendal Grignou Date: Mon Jun 3 11:33:56 2019 -0700 mfd: cros_ec: Add API for Touchpad support Add API to control touchpad presented by Embedded Controller. Signed-off-by: Gwendal Grignou Acked-by: Enric Balletbo i Serra Acked-by: Benson Leung Reviewed-by: Fabien Lahoudere Signed-off-by: Lee Jones include/linux/mfd/cros_ec_commands.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit d90a4121bf98d959a01306599b370d8f883a0737 Author: Gwendal Grignou Date: Mon Jun 3 11:33:55 2019 -0700 mfd: cros_ec: Add API for EC-EC communication Allow EC to talk to other ECs that are not presented to the host. Neeed when EC are present in detachable keyboard. Signed-off-by: Gwendal Grignou Acked-by: Enric Balletbo i Serra Acked-by: Benson Leung Reviewed-by: Fabien Lahoudere Signed-off-by: Lee Jones include/linux/mfd/cros_ec_commands.h | 95 ++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) commit a47bc8a4e88b35d9ea97ecd773cd7e0688b3322a Author: Gwendal Grignou Date: Mon Jun 3 11:33:54 2019 -0700 mfd: cros_ec: Add I2C passthru protection API Prevent direct i2c access to device behind EC when not in development mode. Signed-off-by: Gwendal Grignou Acked-by: Enric Balletbo i Serra Acked-by: Benson Leung Reviewed-by: Fabien Lahoudere Signed-off-by: Lee Jones include/linux/mfd/cros_ec_commands.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 77c48c76ad91cf774df26c6e5c74c76842943802 Author: Gwendal Grignou Date: Mon Jun 3 11:33:53 2019 -0700 mfd: cros_ec: Add Smart Battery Firmware update API Add API to update battery firmware. Signed-off-by: Gwendal Grignou Acked-by: Enric Balletbo i Serra Acked-by: Benson Leung Reviewed-by: Fabien Lahoudere Signed-off-by: Lee Jones include/linux/mfd/cros_ec_commands.h | 73 ++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) commit b92be99f37427fbc5deb6cb1a246f096e302f92d Author: Gwendal Grignou Date: Mon Jun 3 11:33:52 2019 -0700 mfd: cros_ec: Add Hibernate API Add support for controlling hibernation of the Embedded Controller. Signed-off-by: Gwendal Grignou Acked-by: Enric Balletbo i Serra Acked-by: Benson Leung Reviewed-by: Fabien Lahoudere Signed-off-by: Lee Jones include/linux/mfd/cros_ec_commands.h | 72 +++++++++++++++++++++++++++++++++++- 1 file changed, 70 insertions(+), 2 deletions(-) commit fd5372848a6fab0f4ec80c554f384cb1a8c19bb7 Author: Gwendal Grignou Date: Mon Jun 3 11:33:51 2019 -0700 mfd: cros_ec: Add API for keyboard testing Add command to allow keyboard testing in factory. Signed-off-by: Gwendal Grignou Acked-by: Enric Balletbo i Serra Acked-by: Benson Leung Reviewed-by: Fabien Lahoudere Signed-off-by: Lee Jones include/linux/mfd/cros_ec_commands.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit e16efdf12105d921b44b78a0012acf2487f3245b Author: Gwendal Grignou Date: Mon Jun 3 11:33:50 2019 -0700 mfd: cros_ec: Complete Power and USB PD API Improve API for USB Powe delivery and power management. Signed-off-by: Gwendal Grignou Acked-by: Enric Balletbo i Serra Acked-by: Benson Leung Reviewed-by: Fabien Lahoudere Signed-off-by: Lee Jones include/linux/mfd/cros_ec_commands.h | 236 +++++++++++++++++++++++++++++++++-- 1 file changed, 228 insertions(+), 8 deletions(-) commit 170309b438a3826b09401a84f3de911db5b627a7 Author: Gwendal Grignou Date: Mon Jun 3 11:33:49 2019 -0700 mfd: cros_ec: Fix temperature API Improve API to retrieve temperature information. Signed-off-by: Gwendal Grignou Acked-by: Enric Balletbo i Serra Acked-by: Benson Leung Reviewed-by: Fabien Lahoudere Signed-off-by: Lee Jones include/linux/mfd/cros_ec_commands.h | 64 ++++++++++++++++++++++++++++++++---- 1 file changed, 57 insertions(+), 7 deletions(-) commit 716bf50ea8b19c397e9d86238c6e7b307cbac3f5 Author: Gwendal Grignou Date: Mon Jun 3 11:33:48 2019 -0700 mfd: cros_ec: Add fingerprint API Add support for fingerprint sensors managed by embedded controller. Signed-off-by: Gwendal Grignou Acked-by: Enric Balletbo i Serra Acked-by: Benson Leung Reviewed-by: Fabien Lahoudere Signed-off-by: Lee Jones include/linux/mfd/cros_ec_commands.h | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit 784dd15c930fd65576200bee225a2796e363c342 Author: Gwendal Grignou Date: Mon Jun 3 11:33:47 2019 -0700 mfd: cros_ec: Fix event processing API Improve API between EC and Host to report events. Signed-off-by: Gwendal Grignou Acked-by: Enric Balletbo i Serra Acked-by: Benson Leung Reviewed-by: Fabien Lahoudere Signed-off-by: Lee Jones include/linux/mfd/cros_ec_commands.h | 87 +++++++++++++++++++++++++++++++----- 1 file changed, 76 insertions(+), 11 deletions(-) commit a517bb4bb8c15e6f427496b9bb7eba89f0b96bbb Author: Gwendal Grignou Date: Mon Jun 3 11:33:46 2019 -0700 mfd: cros_ec: Complete MEMS sensor API Add new command for batched mode, add support for more sensors. Signed-off-by: Gwendal Grignou Acked-by: Enric Balletbo i Serra Acked-by: Benson Leung Reviewed-by: Fabien Lahoudere Signed-off-by: Lee Jones include/linux/mfd/cros_ec_commands.h | 464 ++++++++++++++++++++++++++++++----- 1 file changed, 406 insertions(+), 58 deletions(-) commit 2908c4ed296ee2107c03503328eb951d5bc58211 Author: Gwendal Grignou Date: Mon Jun 3 11:33:45 2019 -0700 mfd: cros_ec: Add EC transport protocol v4 Introduce a new transport procotol between EC and host. Signed-off-by: Gwendal Grignou Acked-by: Enric Balletbo i Serra Acked-by: Benson Leung Reviewed-by: Fabien Lahoudere Signed-off-by: Lee Jones include/linux/mfd/cros_ec_commands.h | 143 ++++++++++++++++++++++++++++++++++- 1 file changed, 141 insertions(+), 2 deletions(-) commit 03f6896aeb5bd03b95d29a0f22b3820773d97b9d Author: Gwendal Grignou Date: Mon Jun 3 11:33:44 2019 -0700 mfd: cros_ec: Expand hash API Improve API to verify EC image signature. Signed-off-by: Gwendal Grignou Acked-by: Enric Balletbo i Serra Acked-by: Benson Leung Reviewed-by: Fabien Lahoudere Signed-off-by: Lee Jones include/linux/mfd/cros_ec_commands.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit de83db57d7343a201f2ef0204929015ba268e098 Author: Gwendal Grignou Date: Mon Jun 3 11:33:43 2019 -0700 mfd: cros_ec: Add lightbar v2 API New API split commands, improve EC command latency. Signed-off-by: Gwendal Grignou Acked-by: Enric Balletbo i Serra Acked-by: Benson Leung Reviewed-by: Fabien Lahoudere Signed-off-by: Lee Jones include/linux/mfd/cros_ec_commands.h | 124 +++++++++++++++++++++++++++++++++-- 1 file changed, 120 insertions(+), 4 deletions(-) commit 89193a04fce5b869eaf20a330deebcde0dd6806f Author: Gwendal Grignou Date: Mon Jun 3 11:33:42 2019 -0700 mfd: cros_ec: Add PWM_SET_DUTY API Add API for fan control. Signed-off-by: Gwendal Grignou Acked-by: Enric Balletbo i Serra Acked-by: Benson Leung Reviewed-by: Fabien Lahoudere Signed-off-by: Lee Jones include/linux/mfd/cros_ec_commands.h | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) commit 3c46ae6160aff70e01bd180dd3ddcccf09fcf901 Author: Gwendal Grignou Date: Mon Jun 3 11:33:41 2019 -0700 mfd: cros_ec: Add Flash V2 commands API Added for supporting larger embedded controller flash. Signed-off-by: Gwendal Grignou Acked-by: Enric Balletbo i Serra Acked-by: Benson Leung Reviewed-by: Fabien Lahoudere Signed-off-by: Lee Jones include/linux/mfd/cros_ec_commands.h | 150 ++++++++++++++++++++++++++++++++++- 1 file changed, 147 insertions(+), 3 deletions(-) commit fd3bbf4a47445a47b95d03f501651df0054ce117 Author: Gwendal Grignou Date: Mon Jun 3 11:33:40 2019 -0700 mfd: cros_ec: Remove zero-size structs Empty structure size is different between C and C++. To prevent clang warning when compiling this include file in C++ programs, remove empty structures. Signed-off-by: Gwendal Grignou Acked-by: Enric Balletbo i Serra Acked-by: Benson Leung Reviewed-by: Fabien Lahoudere Signed-off-by: Lee Jones include/linux/mfd/cros_ec_commands.h | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) commit e849b87487fb2ee448318d54381608f99ce2d4e0 Author: Gwendal Grignou Date: Mon Jun 3 11:33:39 2019 -0700 mfd: cros_ec: move HDMI CEC API definition Move near the end of file. Signed-off-by: Gwendal Grignou Acked-by: Enric Balletbo i Serra Acked-by: Benson Leung Reviewed-by: Fabien Lahoudere Signed-off-by: Lee Jones include/linux/mfd/cros_ec_commands.h | 148 ++++++++++++++++++----------------- 1 file changed, 75 insertions(+), 73 deletions(-) commit ce86c87d73512c8ac71b9b5335c8b830c7ac9491 Author: Gwendal Grignou Date: Mon Jun 3 11:33:38 2019 -0700 mfd: cros_ec: Update ACPI interface definition Add more fields and improve API when EC presents data through ACPI memory space. Signed-off-by: Gwendal Grignou Acked-by: Enric Balletbo i Serra Acked-by: Benson Leung Reviewed-by: Fabien Lahoudere Signed-off-by: Lee Jones include/linux/mfd/cros_ec_commands.h | 419 ++++++++++++++++++++++++----------- 1 file changed, 293 insertions(+), 126 deletions(-) commit 9e81656063776b38f8fa8ffd7a5a2d4d42bdd2b4 Author: Gwendal Grignou Date: Mon Jun 3 11:33:37 2019 -0700 mfd: cros_ec: use BIT macro Replace (1 << ...) with BIT(). Signed-off-by: Gwendal Grignou Acked-by: Enric Balletbo i Serra Acked-by: Benson Leung Reviewed-by: Fabien Lahoudere Signed-off-by: Lee Jones include/linux/mfd/cros_ec_commands.h | 110 +++++++++++++++++------------------ 1 file changed, 55 insertions(+), 55 deletions(-) commit ff8343328bb91f9f1e211f4ab65ba5eb5bc6d3dc Author: Gwendal Grignou Date: Mon Jun 3 11:33:36 2019 -0700 mfd: cros_ec: Define commands as 4-digit UPPER CASE hex values This change is required for compilation of embedded controller firmware to work properly (See CONFIG_HOSTCMD_SECTION_SORTED). Signed-off-by: Gwendal Grignou Acked-by: Enric Balletbo i Serra Acked-by: Benson Leung Reviewed-by: Fabien Lahoudere Signed-off-by: Lee Jones include/linux/mfd/cros_ec_commands.h | 235 ++++++++++++++++++++--------------- 1 file changed, 136 insertions(+), 99 deletions(-) commit 6f72c3f9bbdf08fde3b328c8bafbe8d667590b4e Author: Gwendal Grignou Date: Mon Jun 3 11:33:35 2019 -0700 mfd: cros_ec: add ec_align macros To reduce code and improve performance of the embedded controller firmware, pragma __aligned(2) or __aligned(4) are used when alignment to 16 or 32 bit boundary is expected. Define all ec_align to packed when compiling kernel. Signed-off-by: Gwendal Grignou Acked-by: Enric Balletbo i Serra Acked-by: Benson Leung Reviewed-by: Fabien Lahoudere Signed-off-by: Lee Jones include/linux/mfd/cros_ec_commands.h | 442 +++++++++++++++++++---------------- 1 file changed, 238 insertions(+), 204 deletions(-) commit df95a3bdf8f1fe110a50873f8f24eb2675b73d35 Author: Gwendal Grignou Date: Mon Jun 3 11:33:34 2019 -0700 mfd: cros_ec: set comments properly Fix comments syntax and spelling errors. Signed-off-by: Gwendal Grignou Acked-by: Enric Balletbo i Serra Acked-by: Benson Leung Reviewed-by: Fabien Lahoudere Signed-off-by: Lee Jones include/linux/mfd/cros_ec_commands.h | 65 ++++++++++++++++++++++-------------- 1 file changed, 40 insertions(+), 25 deletions(-) commit c9f69d8b170c2044013bf0248300d25a068f3fb5 Author: Gwendal Grignou Date: Mon Jun 3 11:33:33 2019 -0700 mfd: cros_ec: Zero BUILD_ macro Defined out build macro used when compiling embedded controller firmware. Signed-off-by: Gwendal Grignou Acked-by: Enric Balletbo i Serra Acked-by: Benson Leung Reviewed-by: Fabien Lahoudere Signed-off-by: Lee Jones include/linux/mfd/cros_ec_commands.h | 5 +++++ 1 file changed, 5 insertions(+) commit 2769bd79a9154b933cc774ee773dd78b04d2be60 Author: Gwendal Grignou Date: Mon Jun 3 11:33:32 2019 -0700 mfd: cros_ec: Update license term Update to SPDX-License-Identifier, GPL-2.0 Signed-off-by: Gwendal Grignou Acked-by: Enric Balletbo i Serra Acked-by: Benson Leung Reviewed-by: Fabien Lahoudere Signed-off-by: Lee Jones include/linux/mfd/cros_ec_commands.h | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) commit 6a8cc66ffe0fc87b0df10405ceb107f64795c28b Author: Tvrtko Ursulin Date: Fri Jun 7 12:59:32 2019 +0100 drm/i915: Move i915_check_and_clear_faults to intel_reset.c The code is logically about reset so it makes sense. It also enables making i915_clear_error_registers static. Signed-off-by: Tvrtko Ursulin Suggested-by: Chris Wilson Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190607115932.20271-1-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/gt/intel_reset.c | 69 +++++++++++++++++++++++++++++++++-- drivers/gpu/drm/i915/gt/intel_reset.h | 3 +- drivers/gpu/drm/i915/i915_gem_gtt.c | 63 -------------------------------- drivers/gpu/drm/i915/i915_gem_gtt.h | 1 - 4 files changed, 67 insertions(+), 69 deletions(-) commit cf20b411bb02dc2a55b38d75c5f493ffecd85c66 Author: Geert Uytterhoeven Date: Fri Jun 7 13:31:18 2019 +0200 drm/i915: Grammar s/the its/its/ Fix the grammar. Signed-off-by: Geert Uytterhoeven Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190607113118.14645-1-geert+renesas@glider.be drivers/gpu/drm/i915/intel_dpll_mgr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fe333389ccce1f1e9c0807ee904fba0ca79fa3a9 Author: Geert Uytterhoeven Date: Fri Jun 7 13:30:39 2019 +0200 dmaengine: Grammar s/the its/its/, s/need/needs/ Signed-off-by: Geert Uytterhoeven Signed-off-by: Vinod Koul drivers/dma/dmaengine.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f4a9fe97ea5a08c13a842637abf9b2d6b4edf35d Author: Alexandru Ardelean Date: Thu Jun 6 13:53:44 2019 +0300 dmaengine: axi-dmac: update license header The change replaces the old license information in the comment header with the new SPDX license specifier. As well as bumping the year range from 2013-2015 to 2013-2019. The latter also reflects recent changes that were added to the driver. Signed-off-by: Alexandru Ardelean Signed-off-by: Vinod Koul drivers/dma/dma-axi-dmac.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 28635f6cd78e7fb4e632e0e43ca7e3e81a8c7b58 Author: Gustavo Pimentel Date: Tue Jun 4 15:29:27 2019 +0200 MAINTAINERS: Add Synopsys eDMA IP driver maintainer Add Synopsys eDMA IP driver maintainer. This driver aims to support Synopsys eDMA IP and is normally distributed along with Synopsys PCIe EndPoint IP (depends of the use and licensing agreement). Signed-off-by: Gustavo Pimentel Cc: Vinod Koul Cc: Joao Pinto Signed-off-by: Vinod Koul MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) commit 41aaff2a2ac01c5f5415f9de9cd7015ac2b8d569 Author: Gustavo Pimentel Date: Tue Jun 4 15:29:26 2019 +0200 dmaengine: Add Synopsys eDMA IP PCIe glue-logic Synopsys eDMA IP is normally distributed along with Synopsys PCIe EndPoint IP (depends of the use and licensing agreement). This IP requires some basic configurations, such as: - eDMA registers BAR - eDMA registers offset - eDMA registers size - eDMA linked list memory BAR - eDMA linked list memory offset - eDMA linked list memory size - eDMA data memory BAR - eDMA data memory offset - eDMA data memory size - eDMA version - eDMA mode - IRQs available for eDMA As a working example, PCIe glue-logic will attach to a Synopsys PCIe EndPoint IP prototype kit (Vendor ID = 0x16c3, Device ID = 0xedda), which has built-in an eDMA IP with this default configuration: - eDMA registers BAR = 0 - eDMA registers offset = 0x00001000 (4 Kbytes) - eDMA registers size = 0x00002000 (8 Kbytes) - eDMA linked list memory BAR = 2 - eDMA linked list memory offset = 0x00000000 (0 Kbytes) - eDMA linked list memory size = 0x00800000 (8 Mbytes) - eDMA data memory BAR = 2 - eDMA data memory offset = 0x00800000 (8 Mbytes) - eDMA data memory size = 0x03800000 (56 Mbytes) - eDMA version = 0 - eDMA mode = EDMA_MODE_UNROLL - IRQs = 1 This driver can be compile as built-in or external module in kernel. To enable this driver just select DW_EDMA_PCIE option in kernel configuration, however it requires and selects automatically DW_EDMA option too. Signed-off-by: Gustavo Pimentel Cc: Vinod Koul Cc: Dan Williams Cc: Russell King Cc: Lorenzo Pieralisi Cc: Joao Pinto Signed-off-by: Gustavo Pimentel Signed-off-by: Vinod Koul drivers/dma/dw-edma/Kconfig | 9 ++ drivers/dma/dw-edma/Makefile | 1 + drivers/dma/dw-edma/dw-edma-pcie.c | 229 +++++++++++++++++++++++++++++++++++++ 3 files changed, 239 insertions(+) commit 1f418f46503d72594bbe6407d97fd2ae1ce15ee6 Author: Gustavo Pimentel Date: Tue Jun 4 15:29:25 2019 +0200 PCI: Add Synopsys endpoint EDDA Device ID Create and add Synopsys Endpoint EDDA Device ID to PCI ID list, since this ID is now being use on two different drivers (pci_endpoint_test.ko and dw-edma-pcie.ko). Signed-off-by: Gustavo Pimentel Acked-by: Bjorn Helgaas Cc: Kishon Vijay Abraham I Cc: Bjorn Helgaas Cc: Lorenzo Pieralisi Cc: Joao Pinto Signed-off-by: Vinod Koul drivers/misc/pci_endpoint_test.c | 2 +- include/linux/pci_ids.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit 305aebeff8795cbf03b3f117e74bb702c130ae4c Author: Gustavo Pimentel Date: Tue Jun 4 15:29:24 2019 +0200 dmaengine: Add Synopsys eDMA IP version 0 debugfs support Add Synopsys eDMA IP version 0 debugfs support to assist any debug in the future. Creates a file system structure composed by folders and files that mimic the IP register map (this files are read only) to ease any debug. To enable this feature is necessary to select DEBUG_FS option on kernel configuration. Small output example: (eDMA IP version 0, unroll, 1 write + 1 read channels) % mount -t debugfs none /sys/kernel/debug/ % tree /sys/kernel/debug/dw-edma-core:0/ dw-edma/ ├── version ├── mode ├── wr_ch_cnt ├── rd_ch_cnt └── registers     ├── ctrl_data_arb_prior     ├── ctrl     ├── write     │   ├── engine_en     │   ├── doorbell     │   ├── ch_arb_weight_low     │   ├── ch_arb_weight_high     │   ├── int_status     │   ├── int_mask     │   ├── int_clear     │   ├── err_status     │   ├── done_imwr_low     │   ├── done_imwr_high     │   ├── abort_imwr_low     │   ├── abort_imwr_high     │   ├── ch01_imwr_data     │   ├── ch23_imwr_data     │   ├── ch45_imwr_data     │   ├── ch67_imwr_data     │   ├── linked_list_err_en     │   ├── engine_chgroup     │   ├── engine_hshake_cnt_low     │   ├── engine_hshake_cnt_high     │   ├── ch0_pwr_en     │   ├── ch1_pwr_en     │   ├── ch2_pwr_en     │   ├── ch3_pwr_en     │   ├── ch4_pwr_en     │   ├── ch5_pwr_en     │   ├── ch6_pwr_en     │   ├── ch7_pwr_en     │   └── channel:0     │       ├── ch_control1     │       ├── ch_control2     │       ├── transfer_size     │       ├── sar_low     │       ├── sar_high     │       ├── dar_high     │       ├── llp_low     │       └── llp_high     └── read         ├── engine_en         ├── doorbell         ├── ch_arb_weight_low         ├── ch_arb_weight_high         ├── int_status         ├── int_mask         ├── int_clear         ├── err_status_low         ├── err_status_high         ├── done_imwr_low         ├── done_imwr_high         ├── abort_imwr_low         ├── abort_imwr_high         ├── ch01_imwr_data         ├── ch23_imwr_data         ├── ch45_imwr_data         ├── ch67_imwr_data         ├── linked_list_err_en         ├── engine_chgroup         ├── engine_hshake_cnt_low         ├── engine_hshake_cnt_high         ├── ch0_pwr_en         ├── ch1_pwr_en         ├── ch2_pwr_en         ├── ch3_pwr_en         ├── ch4_pwr_en         ├── ch5_pwr_en         ├── ch6_pwr_en         ├── ch7_pwr_en         └── channel:0             ├── ch_control1             ├── ch_control2             ├── transfer_size             ├── sar_low             ├── sar_high             ├── dar_high             ├── llp_low             └── llp_high Signed-off-by: Gustavo Pimentel Cc: Vinod Koul Cc: Dan Williams Cc: Andy Shevchenko Cc: Russell King Cc: Joao Pinto Signed-off-by: Vinod Koul drivers/dma/dw-edma/Makefile | 3 +- drivers/dma/dw-edma/dw-edma-v0-core.c | 2 + drivers/dma/dw-edma/dw-edma-v0-debugfs.c | 310 +++++++++++++++++++++++++++++++ drivers/dma/dw-edma/dw-edma-v0-debugfs.h | 27 +++ 4 files changed, 341 insertions(+), 1 deletion(-) commit 7e4b8a4fbe2cecab0959e862604803d063f50029 Author: Gustavo Pimentel Date: Tue Jun 4 15:29:23 2019 +0200 dmaengine: Add Synopsys eDMA IP version 0 support Add support for the eDMA IP version 0 driver for both register maps (legacy and unroll). The legacy register mapping was the initial implementation, which consisted in having all registers belonging to channels multiplexed, which could be change anytime (which could led a race-condition) by view port register (access to only one channel available each time). This register mapping is not very effective and efficient in a multithread environment, which has led to the development of unroll registers mapping, which consists of having all channels registers accessible any time by spreading all channels registers by an offset between them. This version supports a maximum of 16 independent channels (8 write + 8 read), which can run simultaneously. Implements a scatter-gather transfer through a linked list, where the size of linked list depends on the allocated memory divided equally among all channels. Each linked list descriptor can transfer from 1 byte to 4 Gbytes and is alignmented to DWORD. Both SAR (Source Address Register) and DAR (Destination Address Register) are alignmented to byte. Signed-off-by: Gustavo Pimentel Cc: Vinod Koul Cc: Dan Williams Cc: Andy Shevchenko Cc: Russell King Cc: Joao Pinto Signed-off-by: Vinod Koul drivers/dma/dw-edma/Makefile | 3 +- drivers/dma/dw-edma/dw-edma-core.c | 1 + drivers/dma/dw-edma/dw-edma-v0-core.c | 352 ++++++++++++++++++++++++++++++++++ drivers/dma/dw-edma/dw-edma-v0-core.h | 28 +++ drivers/dma/dw-edma/dw-edma-v0-regs.h | 158 +++++++++++++++ 5 files changed, 541 insertions(+), 1 deletion(-) commit e63d79d1ffcd2201a2dbff1d7a1184b8f3ec74cf Author: Gustavo Pimentel Date: Tue Jun 4 15:29:22 2019 +0200 dmaengine: Add Synopsys eDMA IP core driver Add Synopsys PCIe Endpoint eDMA IP core driver to kernel. This IP is generally distributed with Synopsys PCIe Endpoint IP (depends of the use and licensing agreement). This core driver, initializes and configures the eDMA IP using vma-helpers functions and dma-engine subsystem. This driver can be compile as built-in or external module in kernel. To enable this driver just select DW_EDMA option in kernel configuration, however it requires and selects automatically DMA_ENGINE and DMA_VIRTUAL_CHANNELS option too. In order to transfer data from point A to B as fast as possible this IP requires a dedicated memory space containing linked list of elements. All elements of this linked list are continuous and each one describes a data transfer (source and destination addresses, length and a control variable). For the sake of simplicity, lets assume a memory space for channel write 0 which allows about 42 elements. +---------+ | Desc #0 |-+ +---------+ | V +----------+ | Chunk #0 |-+ | CB = 1 | | +----------+ +-----+ +-----------+ +-----+ +----------+ +->| Burst #0 |->| ... |->| Burst #41 |->| llp | | +----------+ +-----+ +-----------+ +-----+ V +----------+ | Chunk #1 |-+ | CB = 0 | | +-----------+ +-----+ +-----------+ +-----+ +----------+ +->| Burst #42 |->| ... |->| Burst #83 |->| llp | | +-----------+ +-----+ +-----------+ +-----+ V +----------+ | Chunk #2 |-+ | CB = 1 | | +-----------+ +-----+ +------------+ +-----+ +----------+ +->| Burst #84 |->| ... |->| Burst #125 |->| llp | | +-----------+ +-----+ +------------+ +-----+ V +----------+ | Chunk #3 |-+ | CB = 0 | | +------------+ +-----+ +------------+ +-----+ +----------+ +->| Burst #126 |->| ... |->| Burst #129 |->| llp | +------------+ +-----+ +------------+ +-----+ Legend: - Linked list, also know as Chunk - Linked list element*, also know as Burst *CB*, also know as Change Bit, it's a control bit (and typically is toggled) that allows to easily identify and differentiate between the current linked list and the previous or the next one. - LLP, is a special element that indicates the end of the linked list element stream also informs that the next CB should be toggle On every last Burst of the Chunk (Burst #41, Burst #83, Burst #125 or even Burst #129) is set some flags on their control variable (RIE and LIE bits) that will trigger the send of "done" interruption. On the interruptions callback, is decided whether to recycle the linked list memory space by writing a new set of Bursts elements (if still exists Chunks to transfer) or is considered completed (if there is no Chunks available to transfer). On scatter-gather transfer mode, the client will submit a scatter-gather list of n (on this case 130) elements, that will be divide in multiple Chunks, each Chunk will have (on this case 42) a limited number of Bursts and after transferring all Bursts, an interrupt will be triggered, which will allow to recycle the all linked list dedicated memory again with the new information relative to the next Chunk and respective Burst associated and repeat the whole cycle again. On cyclic transfer mode, the client will submit a buffer pointer, length of it and number of repetitions, in this case each burst will correspond directly to each repetition. Each Burst can describes a data transfer from point A(source) to point B(destination) with a length that can be from 1 byte up to 4 GB. Since dedicated the memory space where the linked list will reside is limited, the whole n burst elements will be organized in several Chunks, that will be used later to recycle the dedicated memory space to initiate a new sequence of data transfers. The whole transfer is considered has completed when it was transferred all bursts. Currently this IP has a set well-known register map, which includes support for legacy and unroll modes. Legacy mode is version of this register map that has multiplexer register that allows to switch registers between all write and read channels and the unroll modes repeats all write and read channels registers with an offset between them. This register map is called v0. The IP team is creating a new register map more suitable to the latest PCIe features, that very likely will change the map register, which this version will be called v1. As soon as this new version is released by the IP team the support for this version in be included on this driver. According to the logic, patches 1, 2 and 3 should be squashed into 1 unique patch, but for the sake of simplicity of review, it was divided in this 3 patches files. Signed-off-by: Gustavo Pimentel Cc: Vinod Koul Cc: Dan Williams Cc: Andy Shevchenko Cc: Russell King Cc: Joao Pinto Signed-off-by: Vinod Koul drivers/dma/Kconfig | 2 + drivers/dma/Makefile | 1 + drivers/dma/dw-edma/Kconfig | 9 + drivers/dma/dw-edma/Makefile | 4 + drivers/dma/dw-edma/dw-edma-core.c | 936 +++++++++++++++++++++++++++++++++++++ drivers/dma/dw-edma/dw-edma-core.h | 165 +++++++ include/linux/dma/edma.h | 47 ++ 7 files changed, 1164 insertions(+) commit c57984478ba97dd3b0ea00933a1bb08a35abda11 Author: Jani Nikula Date: Thu Jun 6 15:22:03 2019 +0300 drm/i915/frontbuffer: remove obsolete comment about mark busy/idle This no longer exists. Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190606122203.13416-4-jani.nikula@intel.com drivers/gpu/drm/i915/intel_frontbuffer.c | 6 ------ 1 file changed, 6 deletions(-) commit f59d6414a6d105bd3e8e1650f236af40d7633894 Author: Jani Nikula Date: Thu Jun 6 15:22:02 2019 +0300 drm/i915: move more atomic plane declarations to intel_atomic_plane.h Some function declarations in intel_drv.h were missed when intel_atomic_plane.h was created. Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190606122203.13416-3-jani.nikula@intel.com drivers/gpu/drm/i915/intel_atomic_plane.h | 16 ++++++++++++++++ drivers/gpu/drm/i915/intel_drv.h | 12 ------------ 2 files changed, 16 insertions(+), 12 deletions(-) commit a6617183b7d2799a507a73095bb2f885f31906cb Author: Jani Nikula Date: Thu Jun 6 15:22:01 2019 +0300 drm/i915: remove some unused declarations from intel_drv.h intel_mark_busy(), intel_mark_idle(), and skl_cdclk_get_vco() no longer exist. Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190606122203.13416-2-jani.nikula@intel.com drivers/gpu/drm/i915/intel_drv.h | 3 --- 1 file changed, 3 deletions(-) commit d13616db8bac1fa1b2efa814c6a4b14e52d2144e Author: Jani Nikula Date: Thu Jun 6 15:22:00 2019 +0300 drm/i915: move pm related declarations to intel_pm.h Move more missed declarations from i915_drv.h to intel_pm.h. Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190606122203.13416-1-jani.nikula@intel.com drivers/gpu/drm/i915/i915_drv.h | 10 ---------- drivers/gpu/drm/i915/i915_irq.c | 1 + drivers/gpu/drm/i915/intel_pm.h | 9 +++++++++ 3 files changed, 10 insertions(+), 10 deletions(-) commit 90af27317b63403bce3874566b71883fc1e1f459 Author: Gustavo A. R. Silva Date: Mon Jun 3 09:53:35 2019 -0500 i2c: mux: pinctrl: use flexible-array member and struct_size() helper Update the code to use a flexible array member instead of a pointer in structure i2c_mux_pinctrl and use the struct_size() helper. Also, make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes, in particular in the context in which this code is being used. So, replace the following form: sizeof(*mux) + num_names * sizeof(*mux->states) with: struct_size(mux, states, num_names) This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Peter Rosin drivers/i2c/muxes/i2c-mux-pinctrl.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d9a183bfd29d44c927b3920ae49ba2f682793976 Author: Linus Walleij Date: Sat Jun 1 18:59:31 2019 +0200 i2c: mux: arb-gpio: Rewrite to use GPIO descriptors Instead of complex code picking GPIOs out of the device tree and keeping track of polarity for each GPIO line, use descriptors and pull polarity handling into the gpiolib. We look for "our-claim" and "their-claim" since the gpiolib code will try e.g. "our-claim-gpios" and "our-claim-gpio" in turn to locate these GPIO lines from the device tree. Cc: Krzysztof Kozlowski Cc: Marek Szyprowski Cc: Doug Anderson Signed-off-by: Linus Walleij Tested-by: Marek Szyprowski Reviewed-by: Douglas Anderson Signed-off-by: Peter Rosin drivers/i2c/muxes/i2c-arb-gpio-challenge.c | 79 ++++++++++-------------------- 1 file changed, 27 insertions(+), 52 deletions(-) commit 1f3b69b6b939d870c22182d29e1b357ba6c9a0ed Author: Gustavo A. R. Silva Date: Wed May 29 11:20:14 2019 -0500 i2c: mux: Use struct_size() in devm_kzalloc() One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct foo { int stuff; struct boo entry[]; }; instance = devm_kzalloc(dev, sizeof(struct foo) + count * sizeof(struct boo), GFP_KERNEL); Instead of leaving these open-coded and prone to type mistakes, we can now use the new struct_size() helper: instance = devm_kzalloc(dev, struct_size(instance, entry, count), GFP_KERNEL); This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Peter Rosin drivers/i2c/i2c-mux.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7c04efc8d2efa6476cc4fc1228c1e20bdc4129ad Author: Krzysztof Kozlowski Date: Tue Jun 4 09:56:20 2019 +0200 sh: configs: Remove useless UEVENT_HELPER_PATH Remove the CONFIG_UEVENT_HELPER_PATH because: 1. It is disabled since commit 1be01d4a5714 ("driver: base: Disable CONFIG_UEVENT_HELPER by default") as its dependency (UEVENT_HELPER) was made default to 'n', 2. It is not recommended (help message: "This should not be used today [...] creates a high system load") and was kept only for ancient userland, 3. Certain userland specifically requests it to be disabled (systemd README: "Legacy hotplug slows down the system and confuses udev"). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Yoshinori Sato arch/sh/configs/ap325rxa_defconfig | 1 - arch/sh/configs/apsh4a3a_defconfig | 1 - arch/sh/configs/apsh4ad0a_defconfig | 1 - arch/sh/configs/cayman_defconfig | 1 - arch/sh/configs/dreamcast_defconfig | 1 - arch/sh/configs/ecovec24-romimage_defconfig | 1 - arch/sh/configs/ecovec24_defconfig | 1 - arch/sh/configs/edosk7760_defconfig | 1 - arch/sh/configs/espt_defconfig | 1 - arch/sh/configs/hp6xx_defconfig | 1 - arch/sh/configs/kfr2r09-romimage_defconfig | 1 - arch/sh/configs/kfr2r09_defconfig | 1 - arch/sh/configs/landisk_defconfig | 1 - arch/sh/configs/lboxre2_defconfig | 1 - arch/sh/configs/magicpanelr2_defconfig | 1 - arch/sh/configs/microdev_defconfig | 1 - arch/sh/configs/migor_defconfig | 1 - arch/sh/configs/polaris_defconfig | 1 - arch/sh/configs/r7780mp_defconfig | 1 - arch/sh/configs/r7785rp_defconfig | 1 - arch/sh/configs/rsk7201_defconfig | 1 - arch/sh/configs/rsk7203_defconfig | 1 - arch/sh/configs/rsk7264_defconfig | 1 - arch/sh/configs/rsk7269_defconfig | 1 - arch/sh/configs/rts7751r2d1_defconfig | 1 - arch/sh/configs/rts7751r2dplus_defconfig | 1 - arch/sh/configs/sdk7780_defconfig | 1 - arch/sh/configs/sdk7786_defconfig | 1 - arch/sh/configs/se7206_defconfig | 1 - arch/sh/configs/se7343_defconfig | 1 - arch/sh/configs/se7712_defconfig | 1 - arch/sh/configs/se7721_defconfig | 1 - arch/sh/configs/se7722_defconfig | 1 - arch/sh/configs/se7724_defconfig | 1 - arch/sh/configs/sh03_defconfig | 1 - arch/sh/configs/sh2007_defconfig | 1 - arch/sh/configs/sh7710voipgw_defconfig | 1 - arch/sh/configs/sh7724_generic_defconfig | 1 - arch/sh/configs/sh7757lcr_defconfig | 1 - arch/sh/configs/sh7763rdp_defconfig | 1 - arch/sh/configs/sh7770_generic_defconfig | 1 - arch/sh/configs/sh7785lcr_32bit_defconfig | 1 - arch/sh/configs/sh7785lcr_defconfig | 1 - arch/sh/configs/shx3_defconfig | 1 - arch/sh/configs/titan_defconfig | 1 - arch/sh/configs/ul2_defconfig | 1 - arch/sh/configs/urquell_defconfig | 1 - 47 files changed, 47 deletions(-) commit 7ddf79a103958ff7e529a3bc0c5b3d1e9cbc22c7 Author: Wang Shilong Date: Mon Jun 10 00:13:32 2019 -0400 ext4: only set project inherit bit for directory It doesn't make any sense to have project inherit bits for regular files, even though this won't cause any problem, but it is better fix this. Signed-off-by: Wang Shilong Signed-off-by: Theodore Ts'o Reviewed-by: Darrick J. Wong Reviewed-by: Andreas Dilger fs/ext4/ext4.h | 3 ++- fs/ext4/ioctl.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) commit ad3a9ee0b623da60b6a3b77573b448ca10d40117 Author: Mao Wenan Date: Sun Jun 9 15:11:26 2019 +0800 ocelot: remove unused variable 'rc' in vcap_cmd() Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/mscc/ocelot_ace.c: In function ‘vcap_cmd’: drivers/net/ethernet/mscc/ocelot_ace.c:108:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable] int rc; ^ It's never used since introduction in commit b596229448dd ("net: mscc: ocelot: Add support for tcam") Signed-off-by: Mao Wenan Signed-off-by: David S. Miller drivers/net/ethernet/mscc/ocelot_ace.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c67b85558ff20cb1ff20874461d12af456bee5d0 Author: Eric Dumazet Date: Sat Jun 8 17:58:51 2019 -0700 ipv6: tcp: send consistent autoflowlabel in TIME_WAIT state In case autoflowlabel is in action, skb_get_hash_flowi6() derives a non zero skb->hash to the flowlabel. If skb->hash is zero, a flow dissection is performed. Since all TCP skbs sent from ESTABLISH state inherit their skb->hash from sk->sk_txhash, we better keep a copy of sk->sk_txhash into the TIME_WAIT socket. After this patch, ACK or RST packets sent on behalf of a TIME_WAIT socket have the flowlabel that was previously used by the flow. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/inet_timewait_sock.h | 1 + net/ipv4/tcp_minisocks.c | 1 + net/ipv6/tcp_ipv6.c | 13 ++++++++++--- 3 files changed, 12 insertions(+), 3 deletions(-) commit 6566cd3690c19759b57757b171e9d605bd38432b Merge: 283da99af1d8 c05ec3d4d7df Author: David S. Miller Date: Sun Jun 9 20:06:54 2019 -0700 Merge branch 'RGMII-delays-for-SJA1105-DSA-driver' Vladimir Oltean says: ==================== RGMII delays for SJA1105 DSA driver This patchset configures the Tunable Delay Lines of the SJA1105 P/Q/R/S switches. These add a programmable phase offset on the RGMII RX and TX clock signals and get used by the driver for fixed-link interfaces that use the rgmii-id, rgmii-txid or rgmii-rxid phy-modes. Tested on a board where RGMII delays were already set up, by adding MAC-side delays on the RGMII interface towards a BCM5464R PHY and noticing that the MAC now reports SFD, preamble, FCS etc. errors. Conflicts trivially in drivers/net/dsa/sja1105/sja1105_spi.c with https://patchwork.ozlabs.org/project/netdev/list/?series=112614&state=* which must be applied first. ==================== Signed-off-by: David S. Miller commit c05ec3d4d7df57ff286917f7fb54aec6fa4691c5 Author: Vladimir Oltean Date: Sat Jun 8 19:12:28 2019 +0300 net: dsa: sja1105: Add RGMII delay support for P/Q/R/S chips As per the DT phy-mode specification, RGMII delays are applied by the MAC when there is no PHY present on the link. Signed-off-by: Vladimir Oltean Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/sja1105/sja1105.h | 1 + drivers/net/dsa/sja1105/sja1105_clocking.c | 98 +++++++++++++++++++++++++++++- drivers/net/dsa/sja1105/sja1105_spi.c | 5 ++ 3 files changed, 102 insertions(+), 2 deletions(-) commit b5b0c7f41e73cdca59dcfc05d32c5a8be54e1546 Author: Vladimir Oltean Date: Sat Jun 8 19:12:27 2019 +0300 net: dsa: sja1105: Remove duplicate rgmii_pad_mii_tx from regs The pad_mii_tx registers point to the same memory region but were unused. So convert to using these for RGMII I/O cell configuration, as they bear a shorter name. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller drivers/net/dsa/sja1105/sja1105.h | 2 +- drivers/net/dsa/sja1105/sja1105_clocking.c | 2 +- drivers/net/dsa/sja1105/sja1105_spi.c | 6 ++---- 3 files changed, 4 insertions(+), 6 deletions(-) commit 283da99af1d8981b1fa075e9d002222b284fea0c Author: Vladimir Oltean Date: Sat Jun 8 16:53:56 2019 +0300 net: phy: broadcom: Add genphy_suspend and genphy_resume for BCM5464 This puts the quad PHY ports in power-down mode when the PHY transitions to the PHY_HALTED state. It is likely that all the other PHYs support the BMCR_PDOWN bit, but I only have the BCM5464R to test. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/broadcom.c | 2 ++ 1 file changed, 2 insertions(+) commit a274ce0f311040ce188c53340c93120f52649519 Merge: de47c5d8e11d 8400cff60b47 Author: David S. Miller Date: Sun Jun 9 19:58:59 2019 -0700 Merge branch 'Rethink-PHYLINK-callbacks-for-SJA1105-DSA' Vladimir Oltean says: ==================== Rethink PHYLINK callbacks for SJA1105 DSA This patchset implements phylink_mac_link_up and phylink_mac_link_down, while also removing the code that was modifying the EGRESS and INGRESS MAC settings for STP and replacing them with the "inhibit TX" functionality. ==================== Signed-off-by: David S. Miller commit 8400cff60b472cc1c698b932e8b93d3bb900c5a0 Author: Vladimir Oltean Date: Sat Jun 8 16:03:44 2019 +0300 net: dsa: sja1105: Rethink the PHYLINK callbacks The first fact that needs to be stated is that the per-MAC settings in SJA1105 called EGRESS and INGRESS do *not* disable egress and ingress on the MAC. They only prevent non-link-local traffic from being sent/received on this port. So instead of having .phylink_mac_config essentially mess with the STP state and force it to DISABLED/BLOCKING (which also brings useless complications in sja1105_static_config_reload), simply add the .phylink_mac_link_down and .phylink_mac_link_up callbacks which inhibit TX at the MAC level, while leaving RX essentially enabled. Also stop from trying to put the link down in .phylink_mac_config, which is incorrect. Signed-off-by: Vladimir Oltean Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/sja1105/sja1105_main.c | 114 ++++++++++++--------------------- 1 file changed, 40 insertions(+), 74 deletions(-) commit d114fb04163f32f6986ca8aa11bff06d5c58d27b Author: Vladimir Oltean Date: Sat Jun 8 16:03:43 2019 +0300 net: dsa: sja1105: Export the sja1105_inhibit_tx function This will be used to stop egress traffic in .phylink_mac_link_up. Signed-off-by: Vladimir Oltean Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/sja1105/sja1105.h | 2 ++ drivers/net/dsa/sja1105/sja1105_spi.c | 14 ++++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) commit 1fd4a173f027125a3e761832ae077449eb70e2d8 Author: Vladimir Oltean Date: Sat Jun 8 16:03:42 2019 +0300 net: dsa: sja1105: Update some comments about PHYLIB Since the driver is now using PHYLINK exclusively, it makes sense to remove all references to it and replace them with PHYLINK. Signed-off-by: Vladimir Oltean Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/sja1105/Kconfig | 2 +- drivers/net/dsa/sja1105/sja1105_main.c | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) commit c44d05358ebfd24d51dad9b2291731df5a11ba62 Author: Vladimir Oltean Date: Sat Jun 8 16:03:41 2019 +0300 net: dsa: sja1105: Use SPEED_{10, 100, 1000, UNKNOWN} macros This is a cosmetic patch that replaces the link speed numbers used in the driver with the corresponding ethtool macros. Signed-off-by: Vladimir Oltean Suggested-by: Andrew Lunn Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/sja1105/sja1105_main.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit de47c5d8e11dda678e4354eeb4235e58e92f7cd2 Author: Hariprasad Kelam Date: Sat Jun 8 14:30:50 2019 +0530 af_key: make use of BUG_ON macro fix below warnings reported by coccicheck net/key/af_key.c:932:2-5: WARNING: Use BUG_ON instead of if condition followed by BUG. net/key/af_key.c:948:2-5: WARNING: Use BUG_ON instead of if condition followed by BUG. Signed-off-by: Hariprasad Kelam Signed-off-by: David S. Miller net/key/af_key.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 392096736a06bc9d8f2b42fd4bb1a44b245b9fed Author: Eric Dumazet Date: Fri Jun 7 12:23:48 2019 -0700 ipv6: tcp: fix potential NULL deref in tcp_v6_send_reset() syzbot found a crash in tcp_v6_send_reset() caused by my latest change. Problem is that if an skb has been queued to socket prequeue, skb_dst(skb)->dev can not anymore point to the device. Fortunately in this case the socket pointer is not NULL. A similar issue has been fixed in commit 0f85feae6b71 ("tcp: fix more NULL deref after prequeue changes"), I should have known better. Fixes: 323a53c41292 ("ipv6: tcp: enable flowlabel reflection in some RST packets") Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David S. Miller net/ipv6/tcp_ipv6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e8a492cd539457b8f616f6db9b62b50cd5b9a980 Merge: 9e49fe4d6e17 6dcdd884e2a4 Author: David S. Miller Date: Sun Jun 9 19:40:10 2019 -0700 Merge branch 'Avoid-local_irq_save-and-use-napi_alloc_frag-where-possible' Sebastian Andrzej says: ==================== Avoid local_irq_save() and use napi_alloc_frag() where possible The first two patches remove local_irq_save() around `netdev_alloc_cache' which does not work on -RT. Besides helping -RT it whould benefit the users of the function since they can avoid disabling interrupts and save a few cycles. The remaining patches are from a time when I tried to remove `netdev_alloc_cache' but then noticed that we still have non-NAPI drivers using netdev_alloc_skb() and I dropped that idea. Using napi_alloc_frag() over netdev_alloc_frag() would skip the not required local_bh_disable() around the allocation. v1…v2: - 1/7 + 2/7 use now "(in_irq() || irqs_disabled())" instead just "irqs_disabled()" to align with __dev_kfree_skb_any(). Pointed out by Eric Dumazet. - 6/7 has a typo less. Pointed out by Sergei Shtylyov. - 3/7 + 4/7 added acks from Ioana Radulescu. ==================== Signed-off-by: David S. Miller commit 6dcdd884e2a4bb57b0ed3654ff28974ae17d2a08 Author: Sebastian Andrzej Siewior Date: Fri Jun 7 21:20:40 2019 +0200 net: hwbm: Make the hwbm_pool lock a mutex Based on review, `lock' is only acquired in hwbm_pool_add() which is invoked via ->probe(), ->resume() and ->ndo_change_mtu(). Based on this the lock can become a mutex and there is no need to disable interrupts during the procedure. Now that the lock is a mutex, hwbm_pool_add() no longer invokes hwbm_pool_refill() in an atomic context so we can pass GFP_KERNEL to hwbm_pool_refill() and remove the `gfp' argument from hwbm_pool_add(). Cc: Thomas Petazzoni Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 2 +- drivers/net/ethernet/marvell/mvneta_bm.c | 4 ++-- include/net/hwbm.h | 6 +++--- net/core/hwbm.c | 15 +++++++-------- 4 files changed, 13 insertions(+), 14 deletions(-) commit 49eef82dcd5498718ad49305514c56a2c3b7dee0 Author: Sebastian Andrzej Siewior Date: Fri Jun 7 21:20:39 2019 +0200 tg3: Use napi_alloc_frag() tg3_alloc_rx_data() uses netdev_alloc_frag() for skb allocation. All callers of tg3_alloc_rx_data() either hold tp->lock (which is held with BH disabled) or run in NAPI context. Use napi_alloc_frag() for skb allocations. Cc: Siva Reddy Kallam Cc: Prashant Sreedharan Cc: Michael Chan Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/tg3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3a89aae4b49e2df99fff112cdd055f1a67971623 Author: Sebastian Andrzej Siewior Date: Fri Jun 7 21:20:38 2019 +0200 bnx2x: Use napi_alloc_frag() SKB allocation via bnx2x_frag_alloc() is always performed in NAPI context. Preemptible context passes GFP_KERNEL and bnx2x_frag_alloc() uses then __get_free_page() for the allocation. Use napi_alloc_frag() for memory allocation. Cc: Ariel Elior Cc: Sudarsana Kalluru Cc: GR-everest-linux-l2@marvell.com Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 90bc6d4b5466009d4a5c8d3a18dbf72b0f5ec807 Author: Sebastian Andrzej Siewior Date: Fri Jun 7 21:20:37 2019 +0200 dpaa2-eth: Use napi_alloc_frag() The driver is using netdev_alloc_frag() for allocation in the ->ndo_start_xmit() path. That one is always invoked in a BH disabled region so we could also use napi_alloc_frag(). Use napi_alloc_frag() for skb allocation. Cc: Ioana Radulescu Acked-by: Ioana Radulescu Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: David S. Miller drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f9dae5554aed4d55ab82a344f9fa698423ffac95 Author: Sebastian Andrzej Siewior Date: Fri Jun 7 21:20:36 2019 +0200 dpaa2-eth: Remove preempt_disable() from seed_pool() According to the comment, the preempt_disable() statement is required due to synchronisation in napi_alloc_frag(). The awful truth is that local_bh_disable() is required because otherwise the NAPI poll callback can be invoked while the open function setup buffers. This isn't unlikely since the dpaa2 provides multiple devices. The usage of napi_alloc_frag() has been removed in commit 27c874867c4e9 ("dpaa2-eth: Use a single page per Rx buffer") which means that the comment is not accurate and the preempt_disable() statement is not required. Remove the outdated comment and the no longer required preempt_disable(). Cc: Ioana Radulescu Acked-by: Ioana Radulescu Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: David S. Miller drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 9 --------- 1 file changed, 9 deletions(-) commit 92dcabd7a0ea0fd88d414f39092132f848652772 Author: Sebastian Andrzej Siewior Date: Fri Jun 7 21:20:35 2019 +0200 net: Don't disable interrupts in __netdev_alloc_skb() __netdev_alloc_skb() can be used from any context and is used by NAPI and non-NAPI drivers. Non-NAPI drivers use it in interrupt context and NAPI drivers use it during initial allocation (->ndo_open() or ->ndo_change_mtu()). Some NAPI drivers share the same function for the initial allocation and the allocation in their NAPI callback. The interrupts are disabled in order to ensure locked access from every context to `netdev_alloc_cache'. Let __netdev_alloc_skb() check if interrupts are disabled. If they are, use `netdev_alloc_cache'. Otherwise disable BH and use `napi_alloc_cache.page'. The IRQ check is cheaper compared to disabling & enabling interrupts and memory allocation with disabled interrupts does not work on -RT. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: David S. Miller net/core/skbuff.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 7ba7aeabbaba484347cc98fbe9045769ca0d118d Author: Sebastian Andrzej Siewior Date: Fri Jun 7 21:20:34 2019 +0200 net: Don't disable interrupts in napi_alloc_frag() netdev_alloc_frag() can be used from any context and is used by NAPI and non-NAPI drivers. Non-NAPI drivers use it in interrupt context and NAPI drivers use it during initial allocation (->ndo_open() or ->ndo_change_mtu()). Some NAPI drivers share the same function for the initial allocation and the allocation in their NAPI callback. The interrupts are disabled in order to ensure locked access from every context to `netdev_alloc_cache'. Let netdev_alloc_frag() check if interrupts are disabled. If they are, use `netdev_alloc_cache' otherwise disable BH and invoke __napi_alloc_frag() for the allocation. The IRQ check is cheaper compared to disabling & enabling interrupts and memory allocation with disabled interrupts does not work on -RT. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: David S. Miller net/core/skbuff.c | 49 +++++++++++++++++++++++-------------------------- 1 file changed, 23 insertions(+), 26 deletions(-) commit 9e49fe4d6e17a38e8168effee181f001d2d22a5a Merge: 5270041d342d 2158e856f56b Author: David S. Miller Date: Sun Jun 9 19:25:59 2019 -0700 Merge branch 'SFP-polling-fixes' Robert Hancock says: ==================== SFP polling fixes This has an updated version of an earlier patch to ensure that SFP operations are stopped during shutdown, and another patch suggested by Russell King to address a potential concurrency issue with SFP state checks. ==================== Signed-off-by: David S. Miller commit 2158e856f56bb762ef90f3ec244d41a519826f75 Author: Robert Hancock Date: Fri Jun 7 10:42:36 2019 -0600 net: sfp: add mutex to prevent concurrent state checks sfp_check_state can potentially be called by both a threaded IRQ handler and delayed work. If it is concurrently called, it could result in incorrect state management. Add a st_mutex to protect the state - this lock gets taken outside of code that checks and handle state changes, and the existing sm_mutex nests inside of it. Suggested-by: Russell King Signed-off-by: Robert Hancock Signed-off-by: David S. Miller drivers/net/phy/sfp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 257c25598584f9f7aaccbcd7b9a6faf23aec3156 Author: Robert Hancock Date: Fri Jun 7 10:42:35 2019 -0600 net: sfp: Stop SFP polling and interrupt handling during shutdown SFP device polling can cause problems during the shutdown process if the parent devices of the network controller have been shut down already. This problem was seen on the iMX6 platform with PCIe devices, where accessing the device after the bus is shut down causes a hang. Free any acquired GPIO interrupts and stop all delayed work in the SFP driver during the shutdown process, so that we ensure that no pending operations are still occurring after the SFP shutdown completes. Signed-off-by: Robert Hancock Signed-off-by: David S. Miller drivers/net/phy/sfp.c | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) commit 02b016ca7f99229ae6227e7b2fc950c4e140d74a Author: Theodore Ts'o Date: Sun Jun 9 22:04:33 2019 -0400 ext4: enforce the immutable flag on open files According to the chattr man page, "a file with the 'i' attribute cannot be modified..." Historically, this was only enforced when the file was opened, per the rest of the description, "... and the file can not be opened in write mode". There is general agreement that we should standardize all file systems to prevent modifications even for files that were opened at the time the immutable flag is set. Eventually, a change to enforce this at the VFS layer should be landing in mainline. Until then, enforce this at the ext4 level to prevent xfstests generic/553 from failing. Signed-off-by: Theodore Ts'o Cc: "Darrick J. Wong" Cc: stable@kernel.org fs/ext4/file.c | 4 ++++ fs/ext4/inode.c | 11 +++++++++++ 2 files changed, 15 insertions(+) commit 2e53840362771c73eb0a5ff71611507e64e8eecd Author: Darrick J. Wong Date: Sun Jun 9 21:41:41 2019 -0400 ext4: don't allow any modifications to an immutable file Don't allow any modifications to a file that's marked immutable, which means that we have to flush all the writable pages to make the readonly and we have to check the setattr/setflags parameters more closely. Signed-off-by: Darrick J. Wong Signed-off-by: Theodore Ts'o Cc: stable@kernel.org fs/ext4/ioctl.c | 46 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) commit 5270041d342de6f1e6a3b6634c1ceaa67d1f87ea Author: Dan Carpenter Date: Fri Jun 7 18:31:07 2019 +0300 nexthop: off by one in nexthop_mpath_select() The nhg->nh_entries[] array is allocated in nexthop_grp_alloc() and it has nhg->num_nh elements so this check should be >= instead of >. Fixes: 430a049190de ("nexthop: Add support for nexthop groups") Signed-off-by: Dan Carpenter Reviewed-by: David Ahern Signed-off-by: David S. Miller include/net/nexthop.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 90b8b7e755db648de7f1d17e3729dd7154a046a0 Merge: 517a772c6c65 f887e54ce349 Author: David S. Miller Date: Sun Jun 9 13:36:01 2019 -0700 Merge branch 'bonding-clean-up-and-standarize-logging-printks' Jarod Wilson says: ==================== bonding: clean up and standarize logging printks This set improves a few somewhat terse bonding debug messages, fixes some errors in others, and then standarizes the majority of them, using new slave_* printk macros that wrap around netdev_* to ensure both master and slave information is provided consistently, where relevant. This set proves very useful in debugging issues on hosts with multiple bonds. I've run an array of LNST tests over this set, creating and destroying quite a few different bonds of the course of testing, fixed the little gotchas here and there, and everything looks stable and reasonable to me, but I can't guarantee I've tested every possible message and scenario to catch every possible "slave could be NULL" case. ==================== Signed-off-by: David S. Miller commit f887e54ce34906c266b30b8fca0907d3151ac925 Author: Jarod Wilson Date: Fri Jun 7 10:59:32 2019 -0400 bonding/options: convert to using slave printk macros All of these printk instances benefit from having both master and slave device information included, so convert to using a standardized macro format and remove redundant information. Suggested-by: Joe Perches CC: Jay Vosburgh CC: Veaceslav Falico CC: Andy Gospodarek CC: netdev@vger.kernel.org Signed-off-by: Jarod Wilson Signed-off-by: David S. Miller drivers/net/bonding/bond_options.c | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) commit 7ea2e4232d9be4ac583ec29d2d4333b2fb654b42 Author: Jarod Wilson Date: Fri Jun 7 10:59:31 2019 -0400 bonding/alb: convert to using slave printk macros All of these printk instances benefit from having both master and slave device information included, so convert to using a standardized macro format and remove redundant information. Suggested-by: Joe Perches CC: Jay Vosburgh CC: Veaceslav Falico CC: Andy Gospodarek CC: netdev@vger.kernel.org Signed-off-by: Jarod Wilson Signed-off-by: David S. Miller drivers/net/bonding/bond_alb.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit 17720981964ac5dd2a501c2e8a63da21046eb89b Author: Jarod Wilson Date: Fri Jun 7 10:59:30 2019 -0400 bonding/802.3ad: convert to using slave printk macros All of these printk instances benefit from having both master and slave device information included, so convert to using a standardized macro format and remove redundant information. Suggested-by: Joe Perches CC: Jay Vosburgh CC: Veaceslav Falico CC: Andy Gospodarek CC: netdev@vger.kernel.org Signed-off-by: Jarod Wilson Signed-off-by: David S. Miller drivers/net/bonding/bond_3ad.c | 222 +++++++++++++++++++++-------------------- 1 file changed, 116 insertions(+), 106 deletions(-) commit e2a7420df2e01370b40e4cf7b85ab9a885c6d755 Author: Jarod Wilson Date: Fri Jun 7 10:59:29 2019 -0400 bonding/main: convert to using slave printk macros All of these printk instances benefit from having both master and slave device information included, so convert to using a standardized macro format and remove redundant information. Suggested-by: Joe Perches CC: Jay Vosburgh CC: Veaceslav Falico CC: Andy Gospodarek CC: netdev@vger.kernel.org Signed-off-by: Jarod Wilson Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 306 ++++++++++++++++++---------------------- 1 file changed, 139 insertions(+), 167 deletions(-) commit 5237ff79b23901a5326f8e986667976861370445 Author: Jarod Wilson Date: Fri Jun 7 10:59:28 2019 -0400 bonding: add slave_foo printk macros Where possible, we generally want both the bond master and the relevant slave information in message output. Standardize the format using new slave_* printk macros. Suggested-by: Joe Perches CC: Jay Vosburgh CC: Veaceslav Falico CC: Andy Gospodarek CC: netdev@vger.kernel.org Signed-off-by: Jarod Wilson Signed-off-by: David S. Miller include/net/bonding.h | 9 +++++++++ 1 file changed, 9 insertions(+) commit f43b6530265a9cd14c39f00b0cc635405f02ae89 Author: Jarod Wilson Date: Fri Jun 7 10:59:27 2019 -0400 bonding: fix error messages in bond_do_fail_over_mac Passing the bond name again to debug output when referencing slave is wrong. We're trying to set the bond's MAC to that of the new_active slave, so adjust the error message slightly and pass in the slave's name, not the bond's. Then we're trying to set the MAC on the old active slave, but putting the new active slave's name in the output. While we're at it, clarify the error messages so you know which one actually triggered. CC: Jay Vosburgh CC: Veaceslav Falico CC: Andy Gospodarek CC: netdev@vger.kernel.org Signed-off-by: Jarod Wilson Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 75466dce4d72a12cff3785bcd5d589c17224c5e4 Author: Jarod Wilson Date: Fri Jun 7 10:59:26 2019 -0400 bonding: improve event debug usability Seeing bonding debug log data along the lines of "event: 5" is a bit spartan, and often requires a lookup table if you don't remember what every event is. Make use of netdev_cmd_to_name for an improved debugging experience, so for the prior example, you'll see: "bond_netdev_event received NETDEV_REGISTER" instead (both are prefixed with the device for which the event pertains). CC: Jay Vosburgh CC: Veaceslav Falico CC: Andy Gospodarek CC: netdev@vger.kernel.org Signed-off-by: Jarod Wilson Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 517a772c6c654eff3739c2e7ca3ecf3f895550ab Author: Fabio Estevam Date: Fri Jun 7 09:14:18 2019 -0300 net: fec_main: Use dev_err() instead of pr_err() dev_err() is more appropriate for printing error messages inside drivers, so switch to dev_err(). Signed-off-by: Fabio Estevam Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fec_main.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit c976507441eebdfe65d21f3bfc76c8114f5ab980 Author: Nirranjan Kirubaharan Date: Fri Jun 7 04:56:45 2019 -0700 cxgb4: Set initial IRQ affinity hints Spread initial IRQ affinity hints across the device node CPUs, for nic queue and uld queue IRQs, to load balance and avoid all interrupts on CPU0. Signed-off-by: Nirranjan Kirubaharan Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 7 +++- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 56 +++++++++++++++++++++---- drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c | 21 +++++++--- 3 files changed, 69 insertions(+), 15 deletions(-) commit 632d1a4840c4c5e992e8095320bd0a1dddb466ad Merge: 900d96e418dc 9b2f3477d1ed Author: David S. Miller Date: Sun Jun 9 13:20:59 2019 -0700 Merge branch 'hns3-next' Huazhong Tan says: ==================== net: hns3: some code optimizations & cleanups & bugfixes This patch-set includes code optimizations, cleanups and bugfixes for the HNS3 ethernet controller driver. [patch 1/12] logs more detail error info for ROCE RAS errors. [patch 2/12] fixes a wrong size issue for mailbox responding. [patch 3/12] makes HW GRO handing compliant with SW one. [patch 4/12] refactors hns3_get_new_int_gl. [patch 5/12] adds handling for VF's over_8bd_nfe_err. [patch 6/12 - 12/12] adds some code optimizations and cleanups, to make the code more readable and compliant with some static code analysis tools, these modifications do not change the logic of the code. Change log: V1->V2: fixes comment from David Miller. ==================== Signed-off-by: David S. Miller commit 9b2f3477d1edbb1bc52e78cb935976b10380b801 Author: Weihang Li Date: Fri Jun 7 10:03:13 2019 +0800 net: hns3: fix some coding style issues This patch fixes some coding style issues reported by some static code analysis tools and code review, such as modify some comments, rename some variables, log some errors in detail, and fixes some alignment errors. BTW, these cleanups do not change the logic of code. Signed-off-by: Weihang Li Signed-off-by: Peng Li Signed-off-by: Yonglong Liu Signed-off-by: HuiSong Li Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3_dcbnl.c | 12 ++-- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 73 +++++++++------------- drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 6 ++ .../ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c | 10 +-- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c | 15 +++-- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 70 ++++++++------------- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 22 ++++--- .../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 18 ++---- 8 files changed, 96 insertions(+), 130 deletions(-) commit 63cbf7a9414291597ec2fd1d8bc5040a2711f1e7 Author: Yufeng Mo Date: Fri Jun 7 10:03:12 2019 +0800 net: hns3: some modifications to simplify and optimize code This patch deletes some redundant code and refactors some bloated functions. Signed-off-by: Yufeng Mo Signed-off-by: Weihang Li Signed-off-by: Yonglong Liu Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 32 +++---- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 82 +++++++++++------- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c | 2 +- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 99 ++++++++++++---------- .../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 25 +++--- 5 files changed, 130 insertions(+), 110 deletions(-) commit 3caf772bcea18a3c5045113aaa119dd2dd81f98f Author: Yufeng Mo Date: Fri Jun 7 10:03:11 2019 +0800 net: hns3: refactor PF/VF RSS hash key configuration In order to make it more readable, this patch modifies PF/VF's RSS hash key configuring function. Signed-off-by: Yufeng Mo Signed-off-by: Jian Shen Signed-off-by: Weihang Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 15 +++++++-------- drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 15 +++++++-------- 2 files changed, 14 insertions(+), 16 deletions(-) commit b37ce5876d7f3fc24dc7ef7e32cd271f7b9500f4 Author: Yufeng Mo Date: Fri Jun 7 10:03:10 2019 +0800 net: hns3: use macros instead of magic numbers This patch adds some macros instead of magic numbers in serval places Signed-off-by: Yufeng Mo Signed-off-by: Weihang Li Signed-off-by: Yunsheng Lin Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 5 +- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 5 ++ .../ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c | 10 ++-- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 53 ++++++++++++++-------- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h | 2 + .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 20 +++++--- .../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 11 +++-- .../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h | 3 ++ 8 files changed, 75 insertions(+), 34 deletions(-) commit e91e388ca737d45018425a92ce7035064b590bc6 Author: Jian Shen Date: Fri Jun 7 10:03:09 2019 +0800 net: hns3: small changes for magic numbers In order to improve readability, this patch uses macros to replace some magic numbers, and adds some comments for some others. Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 118 +++++++++++---------- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h | 24 +++-- 2 files changed, 79 insertions(+), 63 deletions(-) commit b69c97373769eb3d0a2e0137d8f0f6df40becf04 Author: Yonglong Liu Date: Fri Jun 7 10:03:08 2019 +0800 net: hns3: delete the redundant user NIC codes Since HNAE3_CLIENT_UNIC and HNAE3_DEV_UNIC is not used any more, this patch removes the redundant codes. Signed-off-by: Yonglong Liu Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hnae3.c | 21 ++++--------- drivers/net/ethernet/hisilicon/hns3/hnae3.h | 7 ----- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 1 - .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 34 ++++------------------ .../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 16 ---------- 5 files changed, 10 insertions(+), 69 deletions(-) commit 0cd8618298cc390309ddaf2549d30218418f739b Author: Weihang Li Date: Fri Jun 7 10:03:07 2019 +0800 net: hns3: trigger VF reset if a VF has an over_8bd_nfe_err We trigger PF reset when a RAS error of NIC named over_8bd_nfe_err occurred before. But it is possible that a VF causes that error, it's reasonable to trigger VF reset instead of PF reset in this case. This patch add detection of vf_id if a over_8bd_nfe_err occurs, if vf_id is 0, we trigger PF reset. Otherwise, we will trigger VF reset on the VF with error. Signed-off-by: Weihang Li Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 17 +++++ .../net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c | 79 ++++++++++++++++++++++ .../net/ethernet/hisilicon/hns3/hns3pf/hclge_err.h | 3 +- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c | 2 +- 4 files changed, 99 insertions(+), 2 deletions(-) commit 4a43caf5b74f80749f4e76edd151244ce59f0a47 Author: Yunsheng Lin Date: Fri Jun 7 10:03:06 2019 +0800 net: hns3: refactor hns3_get_new_int_gl function This patch adds a new hns3_get_new_flow_lvl function to calculate the packet flow level, which is used to decide the interrupt coalescence parameter, in order to make the flow level calculation code more readable and make the future calculation ajdustment easier. Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 77 +++++++++++++++---------- 1 file changed, 45 insertions(+), 32 deletions(-) commit d5970dc73f1c12a07f89b427799ca8b0b6c30b97 Author: Yunsheng Lin Date: Fri Jun 7 10:03:05 2019 +0800 net: hns3: replace numa_node_id with numa_mem_id for buffer reusing This patch replaces numa_node_id with numa_mem_id when doing buffer reusing checking, because the buffer still can be reused when the buffer is from the nearest node and the local node has no memory attached. Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e2ee1c5a5944231a79cf6d64c2a703ea08a2e411 Author: Yunsheng Lin Date: Fri Jun 7 10:03:04 2019 +0800 net: hns3: make HW GRO handling compliant with SW GRO Currently when a GRO packet is assembled by HW, the checksum is modified to reflect the entire packet by HW and skb->ip_summed is set to CHECKSUM_UNNECESSARY, which is not compliant with SW GRO. This patch sets up skb's network and transport header, sets the GRO packet's checksum according to pseudo header and set the skb->ip_summed to CHECKSUM_PARTIAL. This patch also use gso_size to distinguish GRO packet from normal packet, use eth_type_vlan to check the VLAN type and set the SKB_GSO_TCP_FIXEDID according to BD info during HW GRO info processing. Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 44 +++++++++++++++++-------- 1 file changed, 30 insertions(+), 14 deletions(-) commit f5d20e396abf7f8b665b05bf906079084426681a Author: Zhongzhu Liu Date: Fri Jun 7 10:03:03 2019 +0800 net: hns3: fix wrong size of mailbox responding data According to user manual, the maximum size of mailbox responding data is 8 bytes, the macro HCLGE_MBX_MAX_RESP_DATA_SIZE should be defined as 8 instead of 16. Fixes: 9194d18b0577 ("net: hns3: fix the problem that the supported port is empty") Signed-off-by: Zhongzhu Liu Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hclge_mbx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 238882c8e034f40fbaa14c7ace36f3ed8e8bfad4 Author: Xiaofei Tan Date: Fri Jun 7 10:03:02 2019 +0800 net: hns3: log detail error info of ROCEE ECC and AXI errors This patch logs detail error info of ROCEE ECC and AXI errors for debug purpose, and remove unnecessary reset for ROCEE overflow errors. Signed-off-by: Xiaofei Tan Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 2 + .../net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c | 81 ++++++++++++++++++++-- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_err.h | 1 + 3 files changed, 77 insertions(+), 7 deletions(-) commit 900d96e418dcc237dbe1ace8f4ff6101e9136b13 Merge: 8d94a8733c94 a3047a81ba13 Author: David S. Miller Date: Sun Jun 9 12:53:07 2019 -0700 Merge branch 'net-ethernet-ti-netcp-update-and-enable-cpts-support' Grygorii Strashko says: ==================== net: ethernet: ti: netcp: update and enable cpts support The Keystone 2 66AK2HK/E/L 1G Ethernet Switch Subsystems contains The Common Platform Time Sync (CPTS) module which is in general compatible with CPTS module found on TI AM3/4/5 SoCs. So, the basic support for Keystone 2 CPTS is available by default, but not documented and has never been enabled inconfig files. The Keystone 2 CPTS module supports also some additional features like time sync reference (RFTCLK) clock selection through CPTS_RFTCLK_SEL register (offset: x08) in CPTS module, which can modelled as multiplexer clock (this was discussed some time ago [1]). This series adds missed binding documentation for Keystone 2 66AK2HK/E/L CPTS module and enables CPTS for TI Keystone 2 66AK2HK/E/L SoCs with possiblity to select CPTS reference clock. Patch 1: adds the CPTS binding documentation. CPTS bindings are defined in the way that allows CPTS properties to be grouped under "cpts" sub-node. It also defines "cpts-refclk-mux" clock for CPTS RFTCLK selection. Patches 2-3: implement CPTS properties grouping under "cpts" sub-node with backward compatibility support. Patch 4: adds support for time sync reference (RFTCLK) clock selection from DT by adding support for "cpts-refclk-mux" multiplexer clock. Patches 5-9: DT CPTS nodes update for TI Keystone 2 66AK2HK/E/L SoCs. Patch 10: enables CPTS for TI Keystone 2 66AK2HK/E/L SoCs. I grouped all patches in one series for better illustration of the changes, but in general Pateches 1-4 are netdev matarieal (first) and other patches are platform specific. Series can be found at: git@git.ti.com:~gragst/ti-linux-kernel/gragsts-ti-linux-kernel.git branch: net-next-k2e-cpts-refclk Changes in v2: - do reverse christmas tree in cpts_of_mux_clk_setup() - add ack from Richard Cochran v1: https://lkml.org/lkml/2019/6/1/77 [1] https://www.spinics.net/lists/netdev/msg408931.html ==================== Signed-off-by: David S. Miller commit a3047a81ba1359dc6b02b9dcebc4161800de2c47 Author: Grygorii Strashko Date: Thu Jun 6 19:30:41 2019 +0300 net: ethernet: ti: cpts: add support for ext rftclk selection Some CPTS instances, which can be found on KeyStone 2 1G Ethernet Switch Subsystems, can control an external multiplexer that selects one of up to 32 clocks as time sync reference (RFTCLK) clock. This feature can be configured through CPTS_RFTCLK_SEL register (offset: x08) in CPTS module and can be represented as multiplexer clock. Hence, introduce support for optional cpts-refclk-mux clock, which, once defined will allow to select required CPTS RFTCLK by using assigned-clock-parents DT property in board files. Signed-off-by: Grygorii Strashko Acked-by: Richard Cochran Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpts.c | 79 +++++++++++++++++++++++++++++++++++++++++- drivers/net/ethernet/ti/cpts.h | 2 +- 2 files changed, 79 insertions(+), 2 deletions(-) commit c8ad14514302e68992899b42fea21dedce0d135e Author: Grygorii Strashko Date: Thu Jun 6 19:30:40 2019 +0300 net: ethernet: ti: netcp_ethss: add support for child cpts node Allow to place CPTS properties in the child "cpts" DT node. For backward compatibility - roll-back and read CPTS DT properties from parent node if "cpts" node is not present. Signed-off-by: Grygorii Strashko Acked-by: Richard Cochran Signed-off-by: David S. Miller drivers/net/ethernet/ti/netcp_ethss.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 8a6389a515f406a89a1a69c267fbc712cdd9e8e9 Author: Grygorii Strashko Date: Thu Jun 6 19:30:39 2019 +0300 net: ethernet: ti: cpts: use devm_get_clk_from_child Use devm_get_clk_from_child() instead of devm_clk_get() and this way allow to group CPTS DT properties in sub-node for better code readability and maintenance. Roll-back to devm_clk_get() if devm_get_clk_from_child() fails for backward compatibility. Signed-off-by: Grygorii Strashko Acked-by: Richard Cochran Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpts.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 12775af50549121ade8efbdcf3612b867188ea0b Author: Grygorii Strashko Date: Thu Jun 6 19:30:38 2019 +0300 dt-bindings: doc: net: keystone-netcp: document cpts The Keystone 2 66AK2HK/E/L 1G Ethernet Switch Subsystems contains The Common Platform Time Sync (CPTS) module which is in general compatible with CPTS module found on "legacy" TI AM3/4/5 SoCs. So, the basic support for Keystone 2 CPTS is available by default, but not documented. The Keystone 2 CPTS module supports also some additional features like time sync reference (RFTCLK) clock selection through CPTS_RFTCLK_SEL register (offset: x08) in CPTS module, which is modelled as multiplexer clock. This patch adds missed binding documentation for Keystone 2 66AK2HK/E/L CPTS module. Signed-off-by: Grygorii Strashko Acked-by: Richard Cochran Signed-off-by: David S. Miller .../devicetree/bindings/net/keystone-netcp.txt | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit fe0da9c09b2dc448ff781d1426ecb36d145ce51b Author: Amir Goldstein Date: Wed Jun 5 08:04:51 2019 -0700 fuse: copy_file_range needs to strip setuid bits and update timestamps Like ->write_iter(), we update mtime and strip setuid of dst file before copy and like ->read_iter(), we update atime of src file after copy. Signed-off-by: Amir Goldstein Acked-by: Miklos Szeredi Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/fuse/file.c | 5 +++++ 1 file changed, 5 insertions(+) commit 5dae222a5ff0c269730393018a5539cc970a4726 Author: Amir Goldstein Date: Wed Jun 5 08:04:50 2019 -0700 vfs: allow copy_file_range to copy across devices We want to enable cross-filesystem copy_file_range functionality where possible, so push the "same superblock only" checks down to the individual filesystem callouts so they can make their own decisions about cross-superblock copy offload and fallack to generic_copy_file_range() for cross-superblock copy. [Amir] We do not call ->remap_file_range() in case the files are not on the same sb and do not call ->copy_file_range() in case the files do not belong to the same filesystem driver. This changes behavior of the copy_file_range(2) syscall, which will now allow cross filesystem in-kernel copy. CIFS already supports cross-superblock copy, between two shares to the same server. This functionality will now be available via the copy_file_range(2) syscall. Cc: Steve French Signed-off-by: Dave Chinner Signed-off-by: Amir Goldstein Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/ceph/file.c | 4 +++- fs/cifs/cifsfs.c | 2 +- fs/fuse/file.c | 5 ++++- fs/nfs/nfs4file.c | 5 ++++- fs/read_write.c | 18 ++++++++++++------ 5 files changed, 24 insertions(+), 10 deletions(-) commit 8c3f406c097b83846c7d18438a905b49d17ae528 Author: Amir Goldstein Date: Wed Jun 5 08:04:50 2019 -0700 xfs: use file_modified() helper Note that by using the helper, the order of calling file_remove_privs() after file_update_mtime() in xfs_file_aio_write_checks() has changed. Signed-off-by: Amir Goldstein Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_file.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) commit e38f7f53c35213b1cbce70eee5de7ced17f40d4a Author: Amir Goldstein Date: Wed Jun 5 08:04:49 2019 -0700 vfs: introduce file_modified() helper The combination of file_remove_privs() and file_update_mtime() is quite common in filesystem ->write_iter() methods. Modelled after the helper file_accessed(), introduce file_modified() and use it from generic_remap_file_range_prep(). Note that the order of calling file_remove_privs() before file_update_mtime() in the helper was matched to the more common order by filesystems and not the current order in generic_remap_file_range_prep(). Signed-off-by: Amir Goldstein Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/inode.c | 20 ++++++++++++++++++++ fs/read_write.c | 21 +++------------------ include/linux/fs.h | 2 ++ 3 files changed, 25 insertions(+), 18 deletions(-) commit 96e6e8f4a68df2d94800311163faa67124df24e5 Author: Amir Goldstein Date: Wed Jun 5 08:04:49 2019 -0700 vfs: add missing checks to copy_file_range Like the clone and dedupe interfaces we've recently fixed, the copy_file_range() implementation is missing basic sanity, limits and boundary condition tests on the parameters that are passed to it from userspace. Create a new "generic_copy_file_checks()" function modelled on the generic_remap_checks() function to provide this missing functionality. [Amir] Shorten copy length instead of checking pos_in limits because input file size already abides by the limits. Signed-off-by: Dave Chinner Signed-off-by: Amir Goldstein Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/read_write.c | 3 ++- include/linux/fs.h | 3 +++ mm/filemap.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 58 insertions(+), 1 deletion(-) commit 646955cd5425dd8fed8205cbb1b4373c222d028e Author: Amir Goldstein Date: Wed Jun 5 08:04:48 2019 -0700 vfs: remove redundant checks from generic_remap_checks() The access limit checks on input file range in generic_remap_checks() are redundant because the input file size is guaranteed to be within limits and pos+len are already checked to be within input file size. Beyond the fact that the check cannot fail, if it would have failed, it could return -EFBIG for input file range error. There is no precedent for that. -EFBIG is returned in syscalls that would change file length. With that call removed, we can fold generic_access_check_limits() into generic_write_check_limits(). Signed-off-by: Amir Goldstein Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong mm/filemap.c | 33 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 21 deletions(-) commit a31713517dac0862a3f0ec9006df9160ce022b0c Author: Amir Goldstein Date: Wed Jun 5 08:04:48 2019 -0700 vfs: introduce generic_file_rw_checks() Factor out helper with some checks on in/out file that are common to clone_file_range and copy_file_range. Suggested-by: Darrick J. Wong Signed-off-by: Amir Goldstein Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/read_write.c | 38 +++++++++++--------------------------- include/linux/fs.h | 1 + mm/filemap.c | 24 ++++++++++++++++++++++++ 3 files changed, 36 insertions(+), 27 deletions(-) commit 64bf5ff58dff757253cf2142542672de4b21cd1a Author: Dave Chinner Date: Wed Jun 5 08:04:47 2019 -0700 vfs: no fallback for ->copy_file_range Now that we have generic_copy_file_range(), remove it as a fallback case when offloads fail. This puts the responsibility for executing fallbacks on the filesystems that implement ->copy_file_range and allows us to add operational validity checks to generic_copy_file_range(). Rework vfs_copy_file_range() to call a new do_copy_file_range() helper to execute the copying callout, and move calls to generic_file_copy_range() into filesystem methods where they currently return failures. [Amir] overlayfs is not responsible of executing the fallback. It is the responsibility of the underlying filesystem. Signed-off-by: Dave Chinner Signed-off-by: Amir Goldstein Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/ceph/file.c | 21 ++++++++++++++++++--- fs/cifs/cifsfs.c | 4 ++++ fs/fuse/file.c | 21 ++++++++++++++++++--- fs/nfs/nfs4file.c | 20 +++++++++++++++++--- fs/read_write.c | 25 ++++++++++++++++--------- 5 files changed, 73 insertions(+), 18 deletions(-) commit f16acc9d9b3761ae5e45219c9302f99e20919829 Author: Dave Chinner Date: Wed Jun 5 08:04:47 2019 -0700 vfs: introduce generic_copy_file_range() Right now if vfs_copy_file_range() does not use any offload mechanism, it falls back to calling do_splice_direct(). This fails to do basic sanity checks on the files being copied. Before we start adding this necessarily functionality to the fallback path, separate it out into generic_copy_file_range(). generic_copy_file_range() has the same prototype as ->copy_file_range() so that filesystems can use it in their custom ->copy_file_range() method if they so choose. Signed-off-by: Dave Chinner Signed-off-by: Amir Goldstein Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/read_write.c | 35 ++++++++++++++++++++++++++++++++--- include/linux/fs.h | 3 +++ 2 files changed, 35 insertions(+), 3 deletions(-) commit f652e66fcca07e59f207bcca27c5566193feabd5 Author: Masahiro Yamada Date: Sun Jun 9 23:43:13 2019 +0900 pinctrl: add include guard to pinctrl-state.h Signed-off-by: Masahiro Yamada Signed-off-by: Linus Walleij include/linux/pinctrl/pinctrl-state.h | 5 +++++ 1 file changed, 5 insertions(+) commit 110036b4f4db61f59cc478ecb9c34e2503b60c34 Author: Wolfram Sang Date: Sat Jun 8 12:56:09 2019 +0200 rtc: rx8025: simplify getting the adapter of a client We have a dedicated pointer for that, so use it. Much easier to read and less computation involved. Signed-off-by: Wolfram Sang Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rx8025.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9d085c54202dec9abcf401eb77013ea8603f5188 Author: Wolfram Sang Date: Sat Jun 8 12:56:08 2019 +0200 rtc: rx8010: simplify getting the adapter of a client We have a dedicated pointer for that, so use it. Much easier to read and less computation involved. Signed-off-by: Wolfram Sang Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rx8010.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5cb172694a010c9ec786f6ecc2290369f7271108 Author: Wolfram Sang Date: Sat Jun 8 12:56:07 2019 +0200 rtc: rv8803: simplify getting the adapter of a client We have a dedicated pointer for that, so use it. Much easier to read and less computation involved. Signed-off-by: Wolfram Sang Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rv8803.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e5108df402f7729381538720de41da4f178eae3b Author: Wolfram Sang Date: Sat Jun 8 12:56:06 2019 +0200 rtc: m41t80: simplify getting the adapter of a client We have a dedicated pointer for that, so use it. Much easier to read and less computation involved. Signed-off-by: Wolfram Sang Signed-off-by: Alexandre Belloni drivers/rtc/rtc-m41t80.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 55c24316223ba43361dd4be5321a8cd103402e30 Author: Wolfram Sang Date: Sat Jun 8 12:56:05 2019 +0200 rtc: fm3130: simplify getting the adapter of a client We have a dedicated pointer for that, so use it. Much easier to read and less computation involved. Signed-off-by: Wolfram Sang Signed-off-by: Alexandre Belloni drivers/rtc/rtc-fm3130.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 427231bc6d585befe09ea793776f0ba4d032c3f8 Author: Chris Wilson Date: Sun Jun 9 12:00:02 2019 +0100 dma-fence: Signal all callbacks from dma_fence_release() This is an illegal scenario, to free the fence whilst there are pending callbacks. Currently, we emit a WARN and then cast aside the callbacks leaving them dangling. Alternatively, we could set an error on the fence and then signal fence so that any dependency chains from the fence can be tidied up, and if they care they can check for the error. Signed-off-by: Chris Wilson Reviewed-by: Gustavo Padovan Link: https://patchwork.freedesktop.org/patch/msgid/20190609110002.31915-1-chris@chris-wilson.co.uk drivers/dma-buf/dma-fence.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) commit 09bfa5f6833a62bd6669d3ba7f83105181287b92 Author: Wolfram Sang Date: Sat Jun 8 12:55:44 2019 +0200 leds: leds-tca6507: simplify getting the adapter of a client We have a dedicated pointer for that, so use it. Much easier to read and less computation involved. Signed-off-by: Wolfram Sang Acked-by: Pavel Machek Signed-off-by: Jacek Anaszewski drivers/leds/leds-tca6507.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c57d9bd29f63996b301fe92190713e39730d6ca Author: Wolfram Sang Date: Sat Jun 8 12:55:43 2019 +0200 leds: leds-pca955x: simplify getting the adapter of a client We have a dedicated pointer for that, so use it. Much easier to read and less computation involved. Signed-off-by: Wolfram Sang Acked-by: Pavel Machek Signed-off-by: Jacek Anaszewski drivers/leds/leds-pca955x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 130b5fb3738c93e0407f7df8f104deb828e6d67b Author: Harold André Date: Sun Jun 9 12:58:46 2019 +0200 Staging: ralink-gdma: fixed a brace coding style issue Fixed a coding style issue. Signed-off-by: Harold André Signed-off-by: Greg Kroah-Hartman drivers/staging/ralink-gdma/ralink-gdma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 58462a443563138907c7595200e1afc59aa90b99 Author: Hao Xu Date: Sat Jun 8 15:27:47 2019 +0800 staging: kpc2000: kpc2000_i2c: add space after , add space after , for #define outb_p(d,a) writeq(d,(void *)a) Signed-off-by: Hao Xu Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 546cbac4ab54e12397252d10f4179b2528c09417 Author: Hao Xu Date: Sat Jun 8 15:27:46 2019 +0800 staging: kpc2000: kpc2000_i2c: void* -> void * modify void* to void * for #define inb_p(a) readq((void*)a) and #define outb_p(d,a) writeq(d,(void*)a) Signed-off-by: Hao Xu Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000_i2c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 800c16c8a927b8fc732d5d0dd821b6c96738cf14 Author: Hariprasad Kelam Date: Sat Jun 8 15:19:18 2019 +0530 staging: erofs: make use of DBG_BUGON DBG_BUGON is introduced and it could only crash when EROFS_FS_DEBUG (EROFS developping feature) is on. replace BUG_ON with DBG_BUGON. Signed-off-by: Hariprasad Kelam Reviewed-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman drivers/staging/erofs/unzip_vle.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 308f9df30bc49b5b0002c9664863f5b5e0ad9265 Author: Hariprasad Kelam Date: Sat Jun 8 15:09:37 2019 +0530 staging: erofs: fix warning Comparison to bool fix below warnings reported by coccicheck drivers/staging/erofs/unzip_vle.c:332:11-18: WARNING: Comparison to bool Signed-off-by: Hariprasad Kelam Reviewed-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman drivers/staging/erofs/unzip_vle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5555ebbbac822b4fa28db2be15aaf98b3c21af26 Author: Colin Ian King Date: Sat Jun 8 12:50:31 2019 +0100 staging: fsl-dpaa2/ethsw: fix memory leak of switchdev_work In the default event case switchdev_work is being leaked because nothing is queued for work. Fix this by kfree'ing switchdev_work before returning NOTIFY_DONE. Addresses-Coverity: ("Resource leak") Fixes: 44baaa43d7cc ("staging: fsl-dpaa2/ethsw: Add Freescale DPAA2 Ethernet Switch driver") Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 1 + 1 file changed, 1 insertion(+) commit 7a58b4abc7744da76b7a3c25589103705ea0df2f Author: Nishka Dasgupta Date: Fri Jun 7 19:40:03 2019 +0530 staging: rtl8188eu: core: Replace function rtw_free_network_nolock() Remove function rtw_free_network_nolock, as all it does is call _rtw_free_network_nolock, and rename _rtw_free_network_nolock to rtw_free_network_nolock. Keep the new rtw_free_network_nolock a static function and remove the old version from the header file. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_mlme.c | 9 ++------- drivers/staging/rtl8188eu/include/rtw_mlme.h | 3 --- 2 files changed, 2 insertions(+), 10 deletions(-) commit 4087a2faa4d86cdec3907e0a1aa7fd7279fdbdb2 Author: Nishka Dasgupta Date: Fri Jun 7 11:22:09 2019 +0530 staging: rtl8712: usb_halinit.c: Remove p from variable names Remove leading 'p' from the names of the following pointer variables: - padapter - precvbuf - pintfhdl - pregistrypriv - precvpriv. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/usb_halinit.c | 288 +++++++++++++++++----------------- 1 file changed, 144 insertions(+), 144 deletions(-) commit 2370b876fc5e36c38fe495562ee00b851fc536f9 Author: Nishka Dasgupta Date: Fri Jun 7 11:22:08 2019 +0530 staging: rtl8712: usb_ops.c: Remove leading p from variable names Remove leading 'p' from the names of the following pointer variables: - pintfhdl - pintf_hdl (renamed to intfhdl in keeping with the convention in other functions) - poption - pops - pintfpriv. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/usb_ops.c | 84 +++++++++++++++++++-------------------- 1 file changed, 42 insertions(+), 42 deletions(-) commit 3f35d9022761e43514c7f4c4608c919d7a6da9a4 Author: Nishka Dasgupta Date: Fri Jun 7 11:22:06 2019 +0530 staging: rtl8712: xmit_linux.c: Remove leading p from variable names Remove leading p from the names of the following pointer variables: - padapter - pxmitpriv - pnetdev - pxmitframe. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/xmit_linux.c | 50 ++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 25 deletions(-) commit a78e4b1f25f2ee618481ed0668c3cf78352c9a24 Author: Nishka Dasgupta Date: Fri Jun 7 11:15:38 2019 +0530 staging: rtl8712: recv_linux.c: Remove leading p from variable names Remove leading p from the following pointer variable names: - padapter - pmlmepriv - precv_frame - precvpriv - pfree_recv_queue - pattrib. Issue found with Coccinelle Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/recv_linux.c | 50 ++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 25 deletions(-) commit 286570fbdf4cc91c1d8a0b0149eca2b156e4708e Author: Nishka Dasgupta Date: Fri Jun 7 11:12:36 2019 +0530 staging: rtl8712: hal_init.c: Remove leading p from variable names Remove the leading p from the following pointer variable names: - padapter - pusb_intf - ppmappedfw - praw - pfwpriv - pdvobj - pregpriv - pmappedfw (not in the same scope as ppmappedfw) - ptmpchar - ppayload - ptx_desc Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/hal_init.c | 174 ++++++++++++++++++------------------- 1 file changed, 87 insertions(+), 87 deletions(-) commit 4769aae357bac70ba1f55a6bd7faa4315bb482f6 Author: Shobhit Kukreti Date: Thu Jun 6 20:10:52 2019 -0700 staging: rtl8723bs: Fix Unneeded variable: "ret". Return "0" coccicheck reported Unneeded variable ret at rtl8723bs/core/rtw_ap.c:1400. Function "rtw_acl_remove_sta" always returns 0. Modified return type of the function to void. Signed-off-by: Shobhit Kukreti Reviewed-by: Bastien Nocera Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_ap.c | 4 +--- drivers/staging/rtl8723bs/include/rtw_ap.h | 2 +- drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 3 ++- 3 files changed, 4 insertions(+), 5 deletions(-) commit a7dd567eb6f223544a69bd5fb91567396df82f82 Author: Shobhit Kukreti Date: Thu Jun 6 07:35:40 2019 -0700 staging: rtl8723bs: Resolve "(foo*)" should be "(foo *)" error reported by checkpatch Cleaned up the code to remove the error "(foo*)" should be "(foo *)" reported by checkpatch from the file rtl8723bs/os_dep/ioctl_linux.c Signed-off-by: Shobhit Kukreti Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 32 +++++++++++++------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 7bce355180a82961e1fbc06e62ee0aba9053bad0 Author: Maxime Desroches Date: Fri Jun 7 01:59:45 2019 -0400 Staging: vc04_services : vchiq_core: Fix a brace issue Remove braces in a single line if statement in the vchiq_core.c file Signed-off-by: Maxime Desroches Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 23529cbe91569a12374e6008f8c7d173f3243f08 Author: Daniele Ceraolo Spurio Date: Thu Jun 6 15:42:25 2019 -0700 drm/i915/wopcm: update default size for gen11+ The size has been increased to 2MB starting from Gen11. GuC and HuC FWs fit in 1MB so we were fine even with the legacy define, but let's still move to the correct one before the blobs grow to avoid being caught off guard in the future. v2: return early if the platform doesn't have GuC, fix nits (Michal) Bspec: 12690 Signed-off-by: Daniele Ceraolo Spurio Cc: Michal Wajdeczko Reviewed-by: Michal Wajdeczko Reviewed-by: Stuart Summers [ickle: use SZ consistently] Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190606224225.14287-2-daniele.ceraolospurio@intel.com drivers/gpu/drm/i915/intel_wopcm.c | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) commit 33ec6c9eb35e6bcf60b5a134d8e8e1ed836a0bc1 Author: Daniele Ceraolo Spurio Date: Thu Jun 6 15:42:24 2019 -0700 drm/i915/guc: always use Command Transport Buffers Now that we've moved the Gen9 GuC blobs to version 32 we have CTB support on all gens, so no need to restrict the usage to Gen11+. Note that MMIO communication is still required for CTB initialization. v2: fix commit message nits (Michal) Signed-off-by: Daniele Ceraolo Spurio Cc: Michal Wajdeczko Reviewed-by: Michal Wajdeczko Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190606224225.14287-1-daniele.ceraolospurio@intel.com drivers/gpu/drm/i915/i915_drv.h | 1 - drivers/gpu/drm/i915/i915_pci.c | 1 - drivers/gpu/drm/i915/intel_device_info.h | 1 - drivers/gpu/drm/i915/intel_guc.c | 45 +++++--------------------------- drivers/gpu/drm/i915/intel_guc.h | 1 - drivers/gpu/drm/i915/intel_guc_ct.c | 14 ---------- drivers/gpu/drm/i915/intel_uc.c | 19 +++----------- 7 files changed, 10 insertions(+), 72 deletions(-) commit 8f3220a806545442f6f26195bc491520f5276e7c Author: Christian Brauner Date: Sat May 25 11:37:43 2019 +0200 arch: wire-up clone3() syscall Wire up the clone3() call on all arches that don't require hand-rolled assembly. Some of the arches look like they need special assembly massaging and it is probably smarter if the appropriate arch maintainers would do the actual wiring. Arches that are wired-up are: - x86{_32,64} - arm{64} - xtensa Signed-off-by: Christian Brauner Acked-by: Arnd Bergmann Cc: Kees Cook Cc: David Howells Cc: Andrew Morton Cc: Oleg Nesterov Cc: Adrian Reber Cc: Linus Torvalds Cc: Al Viro Cc: Florian Weimer Cc: linux-api@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: x86@kernel.org arch/arm/tools/syscall.tbl | 1 + arch/arm64/include/asm/unistd.h | 2 +- arch/arm64/include/asm/unistd32.h | 2 ++ arch/microblaze/kernel/syscalls/syscall.tbl | 1 + arch/x86/entry/syscalls/syscall_32.tbl | 1 + arch/x86/entry/syscalls/syscall_64.tbl | 1 + arch/xtensa/kernel/syscalls/syscall.tbl | 1 + include/uapi/asm-generic/unistd.h | 4 +++- 8 files changed, 11 insertions(+), 2 deletions(-) commit 7f192e3cd316ba58c88dfa26796cf77789dd9872 Author: Christian Brauner Date: Sat May 25 11:36:41 2019 +0200 fork: add clone3 This adds the clone3 system call. As mentioned several times already (cf. [7], [8]) here's the promised patchset for clone3(). We recently merged the CLONE_PIDFD patchset (cf. [1]). It took the last free flag from clone(). Independent of the CLONE_PIDFD patchset a time namespace has been discussed at Linux Plumber Conference last year and has been sent out and reviewed (cf. [5]). It is expected that it will go upstream in the not too distant future. However, it relies on the addition of the CLONE_NEWTIME flag to clone(). The only other good candidate - CLONE_DETACHED - is currently not recyclable as we have identified at least two large or widely used codebases that currently pass this flag (cf. [2], [3], and [4]). Given that CLONE_PIDFD grabbed the last clone() flag the time namespace is effectively blocked. clone3() has the advantage that it will unblock this patchset again. In general, clone3() is extensible and allows for the implementation of new features. The idea is to keep clone3() very simple and close to the original clone(), specifically, to keep on supporting old clone()-based workloads. We know there have been various creative proposals how a new process creation syscall or even api is supposed to look like. Some people even going so far as to argue that the traditional fork()+exec() split should be abandoned in favor of an in-kernel version of spawn(). Independent of whether or not we personally think spawn() is a good idea this patchset has and does not want to have anything to do with this. One stance we take is that there's no real good alternative to clone()+exec() and we need and want to support this model going forward; independent of spawn(). The following requirements guided clone3(): - bump the number of available flags - move arguments that are currently passed as separate arguments in clone() into a dedicated struct clone_args - choose a struct layout that is easy to handle on 32 and on 64 bit - choose a struct layout that is extensible - give new flags that currently need to abuse another flag's dedicated return argument in clone() their own dedicated return argument (e.g. CLONE_PIDFD) - use a separate kernel internal struct kernel_clone_args that is properly typed according to current kernel conventions in fork.c and is different from the uapi struct clone_args - port _do_fork() to use kernel_clone_args so that all process creation syscalls such as fork(), vfork(), clone(), and clone3() behave identical (Arnd suggested, that we can probably also port do_fork() itself in a separate patchset.) - ease of transition for userspace from clone() to clone3() This very much means that we do *not* remove functionality that userspace currently relies on as the latter is a good way of creating a syscall that won't be adopted. - do not try to be clever or complex: keep clone3() as dumb as possible In accordance with Linus suggestions (cf. [11]), clone3() has the following signature: /* uapi */ struct clone_args { __aligned_u64 flags; __aligned_u64 pidfd; __aligned_u64 child_tid; __aligned_u64 parent_tid; __aligned_u64 exit_signal; __aligned_u64 stack; __aligned_u64 stack_size; __aligned_u64 tls; }; /* kernel internal */ struct kernel_clone_args { u64 flags; int __user *pidfd; int __user *child_tid; int __user *parent_tid; int exit_signal; unsigned long stack; unsigned long stack_size; unsigned long tls; }; long sys_clone3(struct clone_args __user *uargs, size_t size) clone3() cleanly supports all of the supported flags from clone() and thus all legacy workloads. The advantage of sticking close to the old clone() is the low cost for userspace to switch to this new api. Quite a lot of userspace apis (e.g. pthreads) are based on the clone() syscall. With the new clone3() syscall supporting all of the old workloads and opening up the ability to add new features should make switching to it for userspace more appealing. In essence, glibc can just write a simple wrapper to switch from clone() to clone3(). There has been some interest in this patchset already. We have received a patch from the CRIU corner for clone3() that would set the PID/TID of a restored process without /proc/sys/kernel/ns_last_pid to eliminate a race. /* User visible differences to legacy clone() */ - CLONE_DETACHED will cause EINVAL with clone3() - CSIGNAL is deprecated It is superseeded by a dedicated "exit_signal" argument in struct clone_args freeing up space for additional flags. This is based on a suggestion from Andrei and Linus (cf. [9] and [10]) /* References */ [1]: b3e5838252665ee4cfa76b82bdf1198dca81e5be [2]: https://dxr.mozilla.org/mozilla-central/source/security/sandbox/linux/SandboxFilter.cpp#343 [3]: https://git.musl-libc.org/cgit/musl/tree/src/thread/pthread_create.c#n233 [4]: https://sources.debian.org/src/blcr/0.8.5-2.3/cr_module/cr_dump_self.c/?hl=740#L740 [5]: https://lore.kernel.org/lkml/20190425161416.26600-1-dima@arista.com/ [6]: https://lore.kernel.org/lkml/20190425161416.26600-2-dima@arista.com/ [7]: https://lore.kernel.org/lkml/CAHrFyr5HxpGXA2YrKza-oB-GGwJCqwPfyhD-Y5wbktWZdt0sGQ@mail.gmail.com/ [8]: https://lore.kernel.org/lkml/20190524102756.qjsjxukuq2f4t6bo@brauner.io/ [9]: https://lore.kernel.org/lkml/20190529222414.GA6492@gmail.com/ [10]: https://lore.kernel.org/lkml/CAHk-=whQP-Ykxi=zSYaV9iXsHsENa+2fdj-zYKwyeyed63Lsfw@mail.gmail.com/ [11]: https://lore.kernel.org/lkml/CAHk-=wieuV4hGwznPsX-8E0G2FKhx3NjZ9X3dTKh5zKd+iqOBw@mail.gmail.com/ Suggested-by: Linus Torvalds Signed-off-by: Christian Brauner Acked-by: Arnd Bergmann Acked-by: Serge Hallyn Cc: Kees Cook Cc: Pavel Emelyanov Cc: Jann Horn Cc: David Howells Cc: Andrew Morton Cc: Oleg Nesterov Cc: Adrian Reber Cc: Linus Torvalds Cc: Andrei Vagin Cc: Al Viro Cc: Florian Weimer Cc: linux-api@vger.kernel.org arch/x86/ia32/sys_ia32.c | 12 ++- include/linux/sched/task.h | 17 +++- include/linux/syscalls.h | 4 + include/uapi/linux/sched.h | 16 ++++ kernel/fork.c | 201 ++++++++++++++++++++++++++++++++++----------- 5 files changed, 199 insertions(+), 51 deletions(-) commit 0154ec71d597692a0d0682b19eac4b3adfb7f3dc Merge: 9c3cef54c50d d1fdb6d8f6a4 Author: Greg Kroah-Hartman Date: Sun Jun 9 09:11:21 2019 +0200 Merge 5.2-rc4 into char-misc-next We want the char/misc driver fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit a94a48b1614118ea6898cf5d4340675f7f6cc976 Author: Masahiro Yamada Date: Mon May 27 23:37:25 2019 +0900 unicore32: rename unicore32_defconfig to defconfig Since the initial support of unicore32, it has always had a single defconfig. Rename it to 'defconfig', which is now the standard name when arch has just a single defconfig file. Signed-off-by: Masahiro Yamada arch/unicore32/Makefile | 3 +-- arch/unicore32/configs/{unicore32_defconfig => defconfig} | 0 2 files changed, 1 insertion(+), 2 deletions(-) commit bd305f259cd33f6cd550e479d0a0a856cd8b7941 Author: Masahiro Yamada Date: Mon May 27 23:37:24 2019 +0900 kconfig: make arch/*/configs/defconfig the default of KBUILD_DEFCONFIG Until recently, if KBUILD_DEFCONFIG was not set by the arch Makefile, the default path arch/*/defconfig was used. The last users of the default are gone by the following commits: - Commit f3e20ad67b4c ("s390: move arch/s390/defconfig to arch/s390/configs/defconfig") - Commit 986a13769c4b ("alpha: move arch/alpha/defconfig to arch/alpha/configs/defconfig") Let's set arch/*/configs/defconfig as a new default. This saves KBUILD_DEFCONFIG for some architectures. Signed-off-by: Masahiro Yamada Acked-by: Catalin Marinas arch/alpha/Makefile | 2 -- arch/arm64/Makefile | 2 -- arch/csky/Makefile | 1 - arch/nds32/Makefile | 2 -- arch/riscv/Makefile | 2 -- arch/s390/Makefile | 2 -- scripts/kconfig/Makefile | 4 ++++ 7 files changed, 4 insertions(+), 11 deletions(-) commit 5533397d1ec83d749067794f54283890e38ff0c1 Author: Masahiro Yamada Date: Mon May 27 23:37:23 2019 +0900 kconfig: add static qualifier to expand_string() Now expand_string() is only used in preprocess.c Signed-off-by: Masahiro Yamada scripts/kconfig/lkc_proto.h | 1 - scripts/kconfig/preprocess.c | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) commit b6f7e9f7050b9f8e5fe60d86e05c0740295a54bf Author: Masahiro Yamada Date: Mon May 27 23:37:22 2019 +0900 kconfig: require the argument of --defconfig Currently, the argument for --defconfig is optional. If the argument is not passed, the hard-coded default arch/$(ARCH)/defconfig is used. It no longer happens in Linux since the last users of the default are gone by the following commits: - Commit f3e20ad67b4c ("s390: move arch/s390/defconfig to arch/s390/configs/defconfig") - Commit 986a13769c4b ("alpha: move arch/alpha/defconfig to arch/alpha/configs/defconfig") I want to kill the Linux-specific directory path embedded in the Kconfig binary. The --savedefconfig (reverse operation of --defconfig) requires an argument, so it should not hurt to do likewise for --defconfig. Signed-off-by: Masahiro Yamada scripts/kconfig/conf.c | 4 +--- scripts/kconfig/confdata.c | 17 ----------------- scripts/kconfig/lkc.h | 1 - 3 files changed, 1 insertion(+), 21 deletions(-) commit e0a2668665a5f59e210f09385cd2d29833e5f9fa Author: Masahiro Yamada Date: Mon May 27 23:37:21 2019 +0900 kconfig: remove always false ifeq ($(KBUILD_DEFCONFIG,) conditional With the following two commits applied, all the arch Makefiles define KBUILD_DEFCONFIG. - Commit f3e20ad67b4c ("s390: move arch/s390/defconfig to arch/s390/configs/defconfig") - Commit 986a13769c4b ("alpha: move arch/alpha/defconfig to arch/alpha/configs/defconfig") The first conditional in the defconfig rule is always false. Signed-off-by: Masahiro Yamada scripts/kconfig/Makefile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 869ee58b82680dae6e0b1d4b37e8c36561b2d2d6 Author: Mathieu Malaterre Date: Wed May 29 10:04:34 2019 +0200 kbuild: Remove -Waggregate-return from scripts/Makefile.extrawarn It makes little sense to pass -Waggregate-return these days since large part of the linux kernel rely on returning struct(s). For instance: ../include/linux/timekeeping.h: In function 'show_uptime': ../include/linux/ktime.h:91:34: error: function call has aggregate value [-Werror=aggregate-return] #define ktime_to_timespec64(kt) ns_to_timespec64((kt)) ^~~~~~~~~~~~~~~~~~~~~~ ../include/linux/timekeeping.h:166:8: note: in expansion of macro 'ktime_to_timespec64' *ts = ktime_to_timespec64(ktime_get_coarse_boottime()); Remove this warning from W=2 completely. Signed-off-by: Mathieu Malaterre Signed-off-by: Masahiro Yamada scripts/Makefile.extrawarn | 1 - 1 file changed, 1 deletion(-) commit 4b2c7ea8a62963cb808307fc54a55540771a1e3a Author: Andy Gross Date: Sat Jun 8 23:15:47 2019 -0500 arm64: dts: qcom-qcs404: Add reset-cells to GCC node This patch adds a reset-cells property to the gcc controller on the QCS404. Without this in place, we get warnings like the following if nodes reference a gcc reset: arch/arm64/boot/dts/qcom/qcs404.dtsi:261.38-310.5: Warning (resets_property): /soc@0/remoteproc@b00000: Missing property '#reset-cells' in node /soc@0/clock-controller@1800000 or bad phandle (referred from resets[0]) also defined at arch/arm64/boot/dts/qcom/qcs404-evb.dtsi:82.18-84.3 DTC arch/arm64/boot/dts/qcom/qcs404-evb-4000.dtb arch/arm64/boot/dts/qcom/qcs404.dtsi:261.38-310.5: Warning (resets_property): /soc@0/remoteproc@b00000: Missing property '#reset-cells' in node /soc@0/clock-controller@1800000 or bad phandle (referred from resets[0]) also defined at arch/arm64/boot/dts/qcom/qcs404-evb.dtsi:82.18-84.3 Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/qcs404.dtsi | 1 + 1 file changed, 1 insertion(+) commit 15061c3edde48127948f09607ea3603e7409fda9 Author: Leo Yan Date: Wed May 8 10:18:57 2019 +0800 ARM: dts: qcom-msm8974: Update coresight DT bindings CoreSight DT bindings have been updated, thus the old compatible strings are obsolete and the drivers will report warning if DTS uses these obsolete strings. This patch switches to the new bindings for CoreSight dynamic funnel, so can dismiss warning during initialisation. Cc: Andy Gross Cc: David Brown Cc: Mathieu Poirier Cc: Suzuki K Poulose Signed-off-by: Leo Yan Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-msm8974.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e32d07b2e4c82b0136ace3272e19596f77ac2469 Author: Leo Yan Date: Wed May 8 10:18:54 2019 +0800 ARM: dts: qcom-apq8064: Update coresight DT bindings CoreSight DT bindings have been updated, thus the old compatible strings are obsolete and the drivers will report warning if DTS uses these obsolete strings. This patch switches to the new bindings for CoreSight dynamic funnel and static replicator, so can dismiss warning during initialisation. Cc: Andy Gross Cc: David Brown Cc: Mathieu Poirier Cc: Suzuki K Poulose Signed-off-by: Leo Yan Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-apq8064.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b422b03a3889bc255ffefba4e5bde8ce4e464728 Author: Leo Yan Date: Wed May 8 10:19:00 2019 +0800 arm64: dts: qcom-msm8916: Update coresight DT bindings CoreSight DT bindings have been updated, thus the old compatible strings are obsolete and the drivers will report warning if DTS uses these obsolete strings. This patch switches to the new bindings for CoreSight dynamic funnel, so can dismiss warning during initialisation. Cc: Andy Gross Cc: David Brown Cc: Mathieu Poirier Cc: Suzuki K Poulose Signed-off-by: Leo Yan Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/msm8916.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8d94a8733c949ef93d4e530d914dc7953056de3c Merge: a6cdeeb16bff a602afd200f5 Author: David S. Miller Date: Sat Jun 8 15:20:40 2019 -0700 Merge branch 'PTP-support-for-the-SJA1105-DSA-driver' Vladimir Oltean says: ==================== PTP support for the SJA1105 DSA driver This patchset adds the following: - A timecounter/cyclecounter based PHC for the free-running timestamping clock of this switch. - A state machine implemented in the DSA tagger for SJA1105, which keeps track of metadata follow-up Ethernet frames (the switch's way of transmitting RX timestamps). Clock manipulations on the actual hardware PTP clock will have to be implemented anyway, for the TTEthernet block and the time-based ingress policer. v3 patchset can be found at: https://lkml.org/lkml/2019/6/4/954 Changes from v3: - Made it compile with the SJA1105 DSA driver and PTP driver as modules. - Reworked/simplified/fixed some issues in 03/17 (dsa_8021q_remove_header) and added an ASCII image that illustrates the transformation that is taking place. - Removed a useless check for sja1105_is_link_local from 16/17 (RX timestamping) which also made previous 08/17 patch ("Move sja1105_is_link_local to include/linux") useless and therefore dropped. v2 patchset can be found at: https://lkml.org/lkml/2019/6/2/146 Changes from v2: - Broke previous 09/10 patch (timestamping) into multiple smaller patches. - Every patch in the series compiles. v1 patchset can be found at: https://lkml.org/lkml/2019/5/28/1093 Changes from v1: - Removed the addition of the DSA .can_timestamp callback. - Waiting for meta frames is done completely inside the tagger, and all frames emitted on RX are already partially timestamped. - Added a global data structure for the tagger common to all ports. - Made PTP work with ports in standalone mode, by limiting use of the DMAC-mangling "incl_srcpt" mode only when ports are bridged, aka when the DSA master is already promiscuous and can receive anything. Also changed meta frames to be sent at the 01-80-C2-00-00-0E DMAC. - Made some progress w.r.t. observed negative path delay. Apparently it only appears when the delay mechanism is the delay request-response (end-to-end) one. If peer delay is used (-P), the path delay is positive and appears reasonable for an 1000Base-T link (485 ns in steady state). SJA1105 as PTP slave (OC) with E2E path delay: ptp4l[55.600]: master offset 8 s2 freq +83677 path delay -2390 ptp4l[56.600]: master offset 17 s2 freq +83688 path delay -2391 ptp4l[57.601]: master offset 6 s2 freq +83682 path delay -2391 ptp4l[58.601]: master offset -1 s2 freq +83677 path delay -2391 SJA1105 as PTP slave (OC) with P2P path delay: ptp4l[48.343]: master offset 5 s2 freq +83715 path delay 484 ptp4l[48.468]: master offset -3 s2 freq +83705 path delay 485 ptp4l[48.593]: master offset 0 s2 freq +83708 path delay 485 ptp4l[48.718]: master offset 1 s2 freq +83710 path delay 485 ptp4l[48.844]: master offset 1 s2 freq +83710 path delay 485 ptp4l[48.969]: master offset -5 s2 freq +83702 path delay 485 ptp4l[49.094]: master offset 3 s2 freq +83712 path delay 485 ptp4l[49.219]: master offset 4 s2 freq +83714 path delay 485 ptp4l[49.344]: master offset -5 s2 freq +83702 path delay 485 ptp4l[49.469]: master offset 3 s2 freq +83713 path delay 487 ==================== Signed-off-by: David S. Miller commit a602afd200f557a5cc67dd5e7fa8ad5bfa5c98f8 Author: Vladimir Oltean Date: Sat Jun 8 15:04:43 2019 +0300 net: dsa: sja1105: Expose PTP timestamping ioctls to userspace This enables the PTP support towards userspace applications such as linuxptp. The switches can timestamp only trapped multicast MAC frames, and therefore only the profiles of 1588 over L2 are supported. TX timestamping can be enabled per port, but RX timestamping is enabled globally. As long as RX timestamping is enabled, the switch will emit metadata follow-up frames that will be processed by the tagger. It may be a problem that linuxptp does not restore the RX timestamping settings when exiting. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller drivers/net/dsa/sja1105/sja1105_main.c | 96 ++++++++++++++++++++++++++++++++++ drivers/net/dsa/sja1105/sja1105_ptp.c | 6 ++- 2 files changed, 100 insertions(+), 2 deletions(-) commit f3097be21bf17ae8785eea009cbc424f16611d9a Author: Vladimir Oltean Date: Sat Jun 8 15:04:42 2019 +0300 net: dsa: sja1105: Add a state machine for RX timestamping Meta frame reception relies on the hardware keeping its promise that it will send no other traffic towards the CPU port between a link-local frame and a meta frame. Otherwise there is no other way to associate the meta frame with the link-local frame it's holding a timestamp of. The receive function is made stateful, and buffers a timestampable frame until its meta frame arrives, then merges the two, drops the meta and releases the link-local frame up the stack. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller drivers/net/dsa/sja1105/sja1105_main.c | 62 +++++++++++++++++ include/linux/dsa/sja1105.h | 7 ++ net/dsa/tag_sja1105.c | 121 ++++++++++++++++++++++++++++++++- 3 files changed, 189 insertions(+), 1 deletion(-) commit 08fde09a0d1fd1391bdf828de3607c00193e6528 Author: Vladimir Oltean Date: Sat Jun 8 15:04:41 2019 +0300 net: dsa: sja1105: Increase priority of CPU-trapped frames Without noticing any particular issue, this patch ensures that management traffic is treated with the maximum priority on RX by the switch. This is generally desirable, as the driver keeps a state machine that waits for metadata follow-up frames as soon as a management frame is received. Increasing the priority helps expedite the reception (and further reconstruction) of the RX timestamp to the driver after the MAC has generated it. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller drivers/net/dsa/sja1105/sja1105_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 844d7edc6a34ae3a8236f1306e4f2615c8db1eac Author: Vladimir Oltean Date: Sat Jun 8 15:04:40 2019 +0300 net: dsa: sja1105: Add a global sja1105_tagger_data structure This will be used to keep state for RX timestamping. It is global because the switch serializes timestampable and meta frames when trapping them towards the CPU port (lower port indices have higher priority) and therefore having one state machine per port would create unnecessary complications. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller drivers/net/dsa/sja1105/sja1105.h | 1 + drivers/net/dsa/sja1105/sja1105_main.c | 5 +++++ include/linux/dsa/sja1105.h | 15 +++++++++++++++ 3 files changed, 21 insertions(+) commit e53e18a6fe4d3ae04c28ca2327ef7e7656cb07ce Author: Vladimir Oltean Date: Sat Jun 8 15:04:39 2019 +0300 net: dsa: sja1105: Receive and decode meta frames This adds support in the tagger for understanding the source port and switch id of meta frames. Their timestamp is also extracted but not used yet - this needs to be done in a state machine that modifies the previously received timestampable frame - will be added in a follow-up patch. Also take the opportunity to: - Remove a comment in sja1105_filter made obsolete by e8d67fa5696e ("net: dsa: sja1105: Don't store frame type in skb->cb") - Reorder the checks in sja1105_filter to optimize for the most likely scenario first: regular traffic. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller net/dsa/tag_sja1105.c | 44 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 3 deletions(-) commit 79fa7061397a372256b466d62a0a81690b512d5f Author: Vladimir Oltean Date: Sat Jun 8 15:04:38 2019 +0300 net: dsa: sja1105: Make sja1105_is_link_local not match meta frames Although meta frames are configured to be sent at SJA1105_META_DMAC (01-80-C2-00-00-0E) which is a multicast MAC address that would also be trapped by the switch to the CPU, were it to receive it on a front-panel port, meta frames are conceptually not link-local frames, they only carry their RX timestamps. The choice of sending meta frames at a multicast DMAC is a pragmatic one, to avoid installing an extra entry to the DSA master port's multicast MAC filter. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller net/dsa/tag_sja1105.c | 2 ++ 1 file changed, 2 insertions(+) commit 24c01949e5552418a692b848e387dd6e79988b96 Author: Vladimir Oltean Date: Sat Jun 8 15:04:37 2019 +0300 net: dsa: sja1105: Add support for the AVB Parameters Table This table is used to program the switch to emit "meta" follow-up Ethernet frames (which contain partial RX timestamps) after each link-local frame that was trapped to the CPU port through MAC filtering. This includes PTP frames. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller drivers/net/dsa/sja1105/sja1105_dynamic_config.c | 2 + drivers/net/dsa/sja1105/sja1105_main.c | 36 +++++++++++++++ drivers/net/dsa/sja1105/sja1105_static_config.c | 59 ++++++++++++++++++++++++ drivers/net/dsa/sja1105/sja1105_static_config.h | 10 ++++ 4 files changed, 107 insertions(+) commit d3f9b90bf19fad05889e4bead7dc1b336da56118 Author: Vladimir Oltean Date: Sat Jun 8 15:04:36 2019 +0300 net: dsa: sja1105: Build a minimal understanding of meta frames Meta frames are sent on the CPU port by the switch if RX timestamping is enabled. They contain a partial timestamp of the previous frame. They are Ethernet frames with the Ethernet header constructed out of: - SJA1105_META_DMAC - SJA1105_META_SMAC - ETH_P_SJA1105_META The Ethernet payload will be decoded in a follow-up patch. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller include/linux/dsa/sja1105.h | 11 +++++++++++ net/dsa/tag_sja1105.c | 15 +++++++++++++++ 2 files changed, 26 insertions(+) commit 47ed985e97f513b7746270e8c5d1f3a3f959b2da Author: Vladimir Oltean Date: Sat Jun 8 15:04:35 2019 +0300 net: dsa: sja1105: Add logic for TX timestamping On TX, timestamping is performed synchronously from the port_deferred_xmit worker thread. In management routes, the switch is requested to take egress timestamps (again partial), which are reconstructed and appended to a clone of the skb that was just sent. The cloning is done by DSA and we retrieve the pointer from the structure that DSA keeps in skb->cb. Then these clones are enqueued to the socket's error queue for application-level processing. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller drivers/net/dsa/sja1105/sja1105.h | 10 ++++ drivers/net/dsa/sja1105/sja1105_main.c | 55 ++++++++++++++++- drivers/net/dsa/sja1105/sja1105_ptp.c | 106 +++++++++++++++++++++++++++++++++ drivers/net/dsa/sja1105/sja1105_ptp.h | 17 ++++++ drivers/net/dsa/sja1105/sja1105_spi.c | 14 +++++ include/linux/dsa/sja1105.h | 1 + 6 files changed, 201 insertions(+), 2 deletions(-) commit bb77f36ac21d226b8ae4311daceb983be764f746 Author: Vladimir Oltean Date: Sat Jun 8 15:04:34 2019 +0300 net: dsa: sja1105: Add support for the PTP clock The design of this PHC driver is influenced by the switch's behavior w.r.t. timestamping. It exposes two PTP counters, one free-running (PTPTSCLK) and the other offset- and frequency-corrected in hardware through PTPCLKVAL, PTPCLKADD and PTPCLKRATE. The MACs can sample either of these for frame timestamps. However, the user manual warns that taking timestamps based on the corrected clock is less than useful, as the switch can deliver corrupted timestamps in a variety of circumstances. Therefore, this PHC uses the free-running PTPTSCLK together with a timecounter/cyclecounter structure that translates it into a software time domain. Thus, the settime/adjtime and adjfine callbacks are hardware no-ops. The timestamps (introduced in a further patch) will also be translated to the correct time domain before being handed over to the userspace PTP stack. The introduction of a second set of PHC operations that operate on the hardware PTPCLKVAL/PTPCLKADD/PTPCLKRATE in the future is somewhat unavoidable, as the TTEthernet core uses the corrected PTP time domain. However, the free-running counter + timecounter structure combination will suffice for now, as the resulting timestamps yield a sub-50 ns synchronization offset in steady state using linuxptp. For this patch, in absence of frame timestamping, the operations of the switch PHC were tested by syncing it to the system time as a local slave clock with: phc2sys -s CLOCK_REALTIME -c swp2 -O 0 -m -S 0.01 Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller drivers/net/dsa/sja1105/Kconfig | 7 + drivers/net/dsa/sja1105/Makefile | 1 + drivers/net/dsa/sja1105/sja1105.h | 18 ++ drivers/net/dsa/sja1105/sja1105_main.c | 7 + drivers/net/dsa/sja1105/sja1105_ptp.c | 296 +++++++++++++++++++++++++++++++++ drivers/net/dsa/sja1105/sja1105_ptp.h | 47 ++++++ drivers/net/dsa/sja1105/sja1105_spi.c | 19 +++ 7 files changed, 395 insertions(+) commit 28e8fb3e91c9f3e8c461d6eaba31ccdb1bb1931d Author: Vladimir Oltean Date: Sat Jun 8 15:04:33 2019 +0300 net: dsa: sja1105: Export symbols for upcoming PTP driver These are needed for the situation where the switch driver and the PTP driver are both built as modules. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller drivers/net/dsa/sja1105/sja1105_spi.c | 2 ++ drivers/net/dsa/sja1105/sja1105_static_config.c | 3 +++ 2 files changed, 5 insertions(+) commit 42824463d38d273194376051d7883724aea1b0ac Author: Vladimir Oltean Date: Sat Jun 8 15:04:32 2019 +0300 net: dsa: sja1105: Limit use of incl_srcpt to bridge+vlan mode The incl_srcpt setting makes the switch mangle the destination MACs of multicast frames trapped to the CPU - a primitive tagging mechanism that works even when we cannot use the 802.1Q software features. The downside is that the two multicast MAC addresses that the switch traps for L2 PTP (01-80-C2-00-00-0E and 01-1B-19-00-00-00) quickly turn into a lot more, as the switch encodes the source port and switch id into bytes 3 and 4 of the MAC. The resulting range of MAC addresses would need to be installed manually into the DSA master port's multicast MAC filter, and even then, most devices might not have a large enough MAC filtering table. As a result, only limit use of incl_srcpt to when it's strictly necessary: when under a VLAN filtering bridge. This fixes PTP in non-bridged mode (standalone ports). Otherwise, PTP frames, as well as metadata follow-up frames holding RX timestamps won't be received because they will be blocked by the master port's MAC filter. Linuxptp doesn't help, because it only requests the addition of the unmodified PTP MACs to the multicast filter. This issue is not seen in bridged mode because the master port is put in promiscuous mode when the slave ports are enslaved to a bridge. Therefore, there is no downside to having the incl_srcpt mechanism active there. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/sja1105/sja1105_main.c | 9 +++++++-- net/dsa/tag_sja1105.c | 18 +++++++++++------- 2 files changed, 18 insertions(+), 9 deletions(-) commit f9a1a7646c0d8351a2529b221c4f5fa46b384ee6 Author: Vladimir Oltean Date: Sat Jun 8 15:04:31 2019 +0300 net: dsa: sja1105: Reverse TPID and TPID2 >From reading the P/Q/R/S user manual, it appears that TPID is used by the switch for detecting S-tags and TPID2 for C-tags. Their meaning is not clear from the E/T manual. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/sja1105/sja1105_main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 070ca3bb95e2cd3add9b521251774ec5dd1c544d Author: Vladimir Oltean Date: Sat Jun 8 15:04:30 2019 +0300 net: dsa: sja1105: Move sja1105_change_tpid into sja1105_vlan_filtering This is a cosmetic patch, pre-cursor to making another change to the General Parameters Table (incl_srcpt) which does not logically pertain to the sja1105_change_tpid function name, but not putting it there would otherwise create a need of resetting the switch twice. So simply move the existing code into the .port_vlan_filtering callback, where the incl_srcpt change will be added as well. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/sja1105/sja1105_main.c | 42 +++++++++++++++++----------------- 1 file changed, 21 insertions(+), 21 deletions(-) commit d461933638ae9fa49ad22f60a40de5b3ed414912 Author: Vladimir Oltean Date: Sat Jun 8 15:04:29 2019 +0300 net: dsa: tag_8021q: Create helper function for removing VLAN header This removes the existing implementation from tag_sja1105, which was partially incorrect (it was not changing the MAC header offset, thereby leaving it to point 4 bytes earlier than it should have). This overwrites the VLAN tag by moving the Ethernet source and destination MACs 4 bytes to the right. Then skb->data (assumed to be pointing immediately after the EtherType) is temporarily pushed to the beginning of the new Ethernet header, the new Ethernet header offset and length are recorded, then skb->data is moved back to where it was. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller include/linux/dsa/8021q.h | 16 ++++++------- net/dsa/tag_8021q.c | 57 ++++++++++++++++++++++++++++++----------------- net/dsa/tag_sja1105.c | 19 ++++++++-------- 3 files changed, 53 insertions(+), 39 deletions(-) commit 5e3f847a02aabfecea519d7b2fd48f4d6f551be6 Author: Vladimir Oltean Date: Sat Jun 8 15:04:28 2019 +0300 net: dsa: Add teardown callback for drivers This is helpful for e.g. draining per-driver (not per-port) tagger queues. Signed-off-by: Vladimir Oltean Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller include/net/dsa.h | 1 + net/dsa/dsa2.c | 3 +++ 2 files changed, 4 insertions(+) commit 146d442c2357539589da14d374a25c9a82eb7f1e Author: Vladimir Oltean Date: Sat Jun 8 15:04:27 2019 +0300 net: dsa: Keep a pointer to the skb clone for TX timestamping For drivers that use deferred_xmit for PTP frames (such as sja1105), there is no need to perform matching between PTP frames and their egress timestamps, since the sending process can be serialized. In that case, it makes sense to have the pointer to the skb clone that DSA made directly in the skb->cb. It will be used for pushing the egress timestamp back in the application socket's error queue. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/slave.c | 3 +++ 1 file changed, 3 insertions(+) commit b640fbad2d8fe120c761f61eb6c96f05047100cd Author: Mauro Carvalho Chehab Date: Fri Jun 7 15:54:36 2019 -0300 docs: pci: fix broken links due to conversion from pci.txt to pci.rst Some documentation files were still pointing to the old place. Fixes: 229b4e0728e0 ("Documentation: PCI: convert pci.txt to reST") Signed-off-by: Mauro Carvalho Chehab Acked-by: Paul E. McKenney Signed-off-by: Jonathan Corbet Documentation/memory-barriers.txt | 2 +- Documentation/translations/ko_KR/memory-barriers.txt | 2 +- drivers/scsi/hpsa.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) commit 5c437fa29561f5809ef114ba3a5e80556cc43fb3 Author: Mauro Carvalho Chehab Date: Fri Jun 7 15:54:35 2019 -0300 docs: fs: fix broken links to vfs.txt with was renamed to vfs.rst A recent documentation conversion renamed this file but forgot to update the links. Fixes: af96c1e304f7 ("docs: filesystems: vfs: Convert vfs.txt to RST") Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/filesystems/porting | 10 +++++----- include/linux/dcache.h | 4 ++-- include/linux/fs.h | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) commit 9915ec28ec7fc79f0f30ebbba5d19bfa17eb7f03 Author: Mauro Carvalho Chehab Date: Fri Jun 7 15:54:34 2019 -0300 docs: isdn: remove hisax references from kernel-parameters.txt The hisax driver got removed on 85993b8c9786 ("isdn: remove hisax driver"), but a left-over was kept at kernel-parameters.txt. Fixes: 85993b8c9786 ("isdn: remove hisax driver") Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/admin-guide/kernel-parameters.txt | 3 --- 1 file changed, 3 deletions(-) commit cb1aaebea8d79860181559d7b5d482aea63db113 Author: Mauro Carvalho Chehab Date: Fri Jun 7 15:54:32 2019 -0300 docs: fix broken documentation links Mostly due to x86 and acpi conversion, several documentation links are still pointing to the old file. Fix them. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Wolfram Sang Reviewed-by: Sven Van Asbroeck Reviewed-by: Bhupesh Sharma Acked-by: Mark Brown Signed-off-by: Jonathan Corbet Documentation/acpi/dsd/leds.txt | 2 +- Documentation/admin-guide/kernel-parameters.rst | 6 +++--- Documentation/admin-guide/kernel-parameters.txt | 16 ++++++++-------- Documentation/admin-guide/ras.rst | 2 +- Documentation/devicetree/bindings/net/fsl-enetc.txt | 7 +++---- .../devicetree/bindings/pci/amlogic,meson-pcie.txt | 2 +- .../bindings/regulator/qcom,rpmh-regulator.txt | 2 +- Documentation/devicetree/booting-without-of.txt | 2 +- Documentation/driver-api/gpio/board.rst | 2 +- Documentation/driver-api/gpio/consumer.rst | 2 +- Documentation/firmware-guide/acpi/enumeration.rst | 2 +- Documentation/firmware-guide/acpi/method-tracing.rst | 2 +- Documentation/i2c/instantiating-devices | 2 +- Documentation/sysctl/kernel.txt | 4 ++-- Documentation/translations/zh_CN/process/4.Coding.rst | 2 +- Documentation/x86/x86_64/5level-paging.rst | 2 +- Documentation/x86/x86_64/boot-options.rst | 4 ++-- Documentation/x86/x86_64/fake-numa-for-cpusets.rst | 2 +- MAINTAINERS | 4 ++-- arch/arm/Kconfig | 2 +- arch/arm64/kernel/kexec_image.c | 2 +- arch/x86/Kconfig | 14 +++++++------- arch/x86/Kconfig.debug | 2 +- arch/x86/boot/header.S | 2 +- arch/x86/entry/entry_64.S | 2 +- arch/x86/include/asm/bootparam_utils.h | 2 +- arch/x86/include/asm/page_64_types.h | 2 +- arch/x86/include/asm/pgtable_64_types.h | 2 +- arch/x86/kernel/cpu/microcode/amd.c | 2 +- arch/x86/kernel/kexec-bzimage64.c | 2 +- arch/x86/kernel/pci-dma.c | 2 +- arch/x86/mm/tlb.c | 2 +- arch/x86/platform/pvh/enlighten.c | 2 +- drivers/acpi/Kconfig | 10 +++++----- drivers/net/ethernet/faraday/ftgmac100.c | 2 +- drivers/staging/fieldbus/Documentation/fieldbus_dev.txt | 4 ++-- drivers/vhost/vhost.c | 2 +- include/acpi/acpi_drivers.h | 2 +- include/linux/fs_context.h | 2 +- include/linux/lsm_hooks.h | 2 +- mm/Kconfig | 2 +- security/Kconfig | 2 +- tools/include/linux/err.h | 2 +- tools/objtool/Documentation/stack-validation.txt | 4 ++-- 44 files changed, 70 insertions(+), 71 deletions(-) commit 1eecbcdca2bd8d96881cace19ad105dc0f0263f5 Author: Mauro Carvalho Chehab Date: Fri Jun 7 15:54:31 2019 -0300 docs: move protection-keys.rst to the core-api book This document is used by multiple architectures: $ echo $(git grep -l pkey_mprotect arch|cut -d'/' -f 2|sort|uniq) alpha arm arm64 ia64 m68k microblaze mips parisc powerpc s390 sh sparc x86 xtensa So, let's move it to the core book and adjust the links to it accordingly. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/core-api/index.rst | 1 + Documentation/{x86 => core-api}/protection-keys.rst | 0 Documentation/x86/index.rst | 1 - arch/powerpc/Kconfig | 2 +- arch/x86/Kconfig | 2 +- tools/testing/selftests/x86/protection_keys.c | 2 +- 6 files changed, 4 insertions(+), 4 deletions(-) commit 14b767430a58046bfef8ff9b9f12854e20343092 Author: Mauro Carvalho Chehab Date: Fri Jun 7 15:54:29 2019 -0300 docs: net: dpio-driver.rst: fix two codeblock warnings Documentation/networking/device_drivers/freescale/dpaa2/dpio-driver.rst:43: WARNING: Definition list ends without a blank line; unexpected unindent. Documentation/networking/device_drivers/freescale/dpaa2/dpio-driver.rst:63: WARNING: Unexpected indentation. looking for now-outdated files... none found Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet .../networking/device_drivers/freescale/dpaa2/dpio-driver.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c6fff4d3b2f467dd62ee8c69e49c8a8795fe7400 Author: Mauro Carvalho Chehab Date: Fri Jun 7 15:54:30 2019 -0300 docs: net: sja1105.rst: fix table format There's a table there with produces two warnings when built with Sphinx: Documentation/networking/dsa/sja1105.rst:91: WARNING: Block quote ends without a blank line; unexpected unindent. Documentation/networking/dsa/sja1105.rst:91: WARNING: Block quote ends without a blank line; unexpected unindent. It will still produce a table, but the html output is wrong, as it won't interpret the second line as the continuation for the first ones, because identation doesn't match. After the change, the output looks a way better and we got rid of two warnings. Signed-off-by: Mauro Carvalho Chehab Acked-by: Vladimir Oltean Signed-off-by: Jonathan Corbet Documentation/networking/dsa/sja1105.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 43415f13276f09623b1b61376c6f2e43f71bedbb Author: Mauro Carvalho Chehab Date: Fri Jun 7 15:54:28 2019 -0300 docs: security: core.rst: Fix several warnings Multi-line literal markups only work when they're idented at the same level, with is not the case here: Documentation/security/keys/core.rst:1597: WARNING: Inline literal start-string without end-string. Documentation/security/keys/core.rst:1597: WARNING: Inline emphasis start-string without end-string. Documentation/security/keys/core.rst:1597: WARNING: Inline emphasis start-string without end-string. Documentation/security/keys/core.rst:1598: WARNING: Inline emphasis start-string without end-string. Documentation/security/keys/core.rst:1598: WARNING: Inline emphasis start-string without end-string. Documentation/security/keys/core.rst:1600: WARNING: Inline literal start-string without end-string. Documentation/security/keys/core.rst:1600: WARNING: Inline emphasis start-string without end-string. Documentation/security/keys/core.rst:1600: WARNING: Inline emphasis start-string without end-string. Documentation/security/keys/core.rst:1600: WARNING: Inline emphasis start-string without end-string. Documentation/security/keys/core.rst:1600: WARNING: Inline emphasis start-string without end-string. Documentation/security/keys/core.rst:1666: WARNING: Inline literal start-string without end-string. Documentation/security/keys/core.rst:1666: WARNING: Inline emphasis start-string without end-string. Documentation/security/keys/core.rst:1666: WARNING: Inline emphasis start-string without end-string. Documentation/security/keys/core.rst:1666: WARNING: Inline emphasis start-string without end-string. Fix it by using a code-block instead. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/security/keys/core.rst | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 6ad8b21652ec26a5ad51ffc91470e15c19156548 Author: Mauro Carvalho Chehab Date: Fri Jun 7 15:54:27 2019 -0300 docs: security: trusted-encrypted.rst: fix code-block tag The code-block tag is at the wrong place, causing those warnings: Documentation/security/keys/trusted-encrypted.rst:112: WARNING: Literal block expected; none found. Documentation/security/keys/trusted-encrypted.rst:121: WARNING: Unexpected indentation. Documentation/security/keys/trusted-encrypted.rst:122: WARNING: Block quote ends without a blank line; unexpected unindent. Documentation/security/keys/trusted-encrypted.rst:123: WARNING: Block quote ends without a blank line; unexpected unindent. Signed-off-by: Mauro Carvalho Chehab Acked-by: James Morris Acked-by: Jarkko Sakkinen Signed-off-by: Jonathan Corbet Documentation/security/keys/trusted-encrypted.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ea0ad8763b17395fc611f6d91d1de389ec0cc584 Author: Mauro Carvalho Chehab Date: Fri Jun 7 15:54:25 2019 -0300 docs: it: license-rules.rst: get rid of warnings There's a wrong identation on a code block, and it tries to use a reference that was not defined at the Italian translation. Documentation/translations/it_IT/process/license-rules.rst:329: WARNING: Literal block expected; none found. Documentation/translations/it_IT/process/license-rules.rst:332: WARNING: Unexpected indentation. Documentation/translations/it_IT/process/license-rules.rst:339: WARNING: Block quote ends without a blank line; unexpected unindent. Documentation/translations/it_IT/process/license-rules.rst:341: WARNING: Unexpected indentation. Documentation/translations/it_IT/process/license-rules.rst:305: WARNING: Unknown target name: "metatags". Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Federico Vaga Signed-off-by: Jonathan Corbet .../translations/it_IT/process/license-rules.rst | 28 +++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) commit d0727cc650f38243c0ac63fd8c91bfd63e3e2578 Author: Mauro Carvalho Chehab Date: Fri Jun 7 15:54:24 2019 -0300 docs: zh_CN: avoid duplicate citation references Documentation/process/management-style.rst:35: WARNING: duplicate label decisions, other instance in Documentation/translations/zh_CN/process/management-style.rst Documentation/process/programming-language.rst:37: WARNING: duplicate citation c-language, other instance in Documentation/translations/zh_CN/process/programming-language.rst Documentation/process/programming-language.rst:38: WARNING: duplicate citation gcc, other instance in Documentation/translations/zh_CN/process/programming-language.rst Documentation/process/programming-language.rst:39: WARNING: duplicate citation clang, other instance in Documentation/translations/zh_CN/process/programming-language.rst Documentation/process/programming-language.rst:40: WARNING: duplicate citation icc, other instance in Documentation/translations/zh_CN/process/programming-language.rst Documentation/process/programming-language.rst:41: WARNING: duplicate citation gcc-c-dialect-options, other instance in Documentation/translations/zh_CN/process/programming-language.rst Documentation/process/programming-language.rst:42: WARNING: duplicate citation gnu-extensions, other instance in Documentation/translations/zh_CN/process/programming-language.rst Documentation/process/programming-language.rst:43: WARNING: duplicate citation gcc-attribute-syntax, other instance in Documentation/translations/zh_CN/process/programming-language.rst Documentation/process/programming-language.rst:44: WARNING: duplicate citation n2049, other instance in Documentation/translations/zh_CN/process/programming-language.rst Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet .../zh_CN/process/management-style.rst | 4 +- .../zh_CN/process/programming-language.rst | 59 +++++++++++++++++----- 2 files changed, 47 insertions(+), 16 deletions(-) commit f672febc3d132ea0487c63367455124dfa39e30f Author: Mauro Carvalho Chehab Date: Fri Jun 7 15:54:23 2019 -0300 docs: amd-memory-encryption.rst get rid of warnings Get rid of those warnings: Documentation/virtual/kvm/amd-memory-encryption.rst:244: WARNING: Citation [white-paper] is not referenced. Documentation/virtual/kvm/amd-memory-encryption.rst:246: WARNING: Citation [amd-apm] is not referenced. Documentation/virtual/kvm/amd-memory-encryption.rst:247: WARNING: Citation [kvm-forum] is not referenced. For references that aren't mentioned at the text by adding an explicit reference to them. Signed-off-by: Mauro Carvalho Chehab Acked-by: Paolo Bonzini Signed-off-by: Jonathan Corbet Documentation/virtual/kvm/amd-memory-encryption.rst | 3 +++ 1 file changed, 3 insertions(+) commit 27c054d2939f1a46a4da62732e71c140e664afb9 Author: Mauro Carvalho Chehab Date: Fri Jun 7 15:54:22 2019 -0300 docs: mark orphan documents as such Sphinx doesn't like orphan documents: Documentation/accelerators/ocxl.rst: WARNING: document isn't included in any toctree Documentation/arm/stm32/overview.rst: WARNING: document isn't included in any toctree Documentation/arm/stm32/stm32f429-overview.rst: WARNING: document isn't included in any toctree Documentation/arm/stm32/stm32f746-overview.rst: WARNING: document isn't included in any toctree Documentation/arm/stm32/stm32f769-overview.rst: WARNING: document isn't included in any toctree Documentation/arm/stm32/stm32h743-overview.rst: WARNING: document isn't included in any toctree Documentation/arm/stm32/stm32mp157-overview.rst: WARNING: document isn't included in any toctree Documentation/gpu/msm-crash-dump.rst: WARNING: document isn't included in any toctree Documentation/interconnect/interconnect.rst: WARNING: document isn't included in any toctree Documentation/laptops/lg-laptop.rst: WARNING: document isn't included in any toctree Documentation/powerpc/isa-versions.rst: WARNING: document isn't included in any toctree Documentation/virtual/kvm/amd-memory-encryption.rst: WARNING: document isn't included in any toctree Documentation/virtual/kvm/vcpu-requests.rst: WARNING: document isn't included in any toctree So, while they aren't on any toctree, add :orphan: to them, in order to silent this warning. Signed-off-by: Mauro Carvalho Chehab Acked-by: Andrew Donnellan Signed-off-by: Jonathan Corbet Documentation/accelerators/ocxl.rst | 2 ++ Documentation/arm/stm32/overview.rst | 2 ++ Documentation/arm/stm32/stm32f429-overview.rst | 2 ++ Documentation/arm/stm32/stm32f746-overview.rst | 2 ++ Documentation/arm/stm32/stm32f769-overview.rst | 2 ++ Documentation/arm/stm32/stm32h743-overview.rst | 2 ++ Documentation/arm/stm32/stm32mp157-overview.rst | 2 ++ Documentation/gpu/msm-crash-dump.rst | 2 ++ Documentation/interconnect/interconnect.rst | 2 ++ Documentation/laptops/lg-laptop.rst | 2 ++ Documentation/powerpc/isa-versions.rst | 2 ++ 11 files changed, 22 insertions(+) commit d857a3ffd3d609d1c822b255d4fe4db8b3464e34 Author: Mauro Carvalho Chehab Date: Fri Jun 7 15:54:21 2019 -0300 docs: bpf: get rid of two warnings Documentation/bpf/btf.rst:154: WARNING: Unexpected indentation. Documentation/bpf/btf.rst:163: WARNING: Unexpected indentation. Signed-off-by: Mauro Carvalho Chehab Acked-by: Song Liu Signed-off-by: Jonathan Corbet Documentation/bpf/btf.rst | 2 ++ 1 file changed, 2 insertions(+) commit 2e03e3a42c961b709926ba5f7c42c09ea6bfb8c1 Author: Mauro Carvalho Chehab Date: Fri Jun 7 15:54:20 2019 -0300 docs: mm: numaperf.rst: get rid of a build warning When building it, it gets this warning: Documentation/admin-guide/mm/numaperf.rst:168: WARNING: Footnote [1] is not referenced. The problem is that this is not really a reference, as it is not mentioned within the documentation. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/admin-guide/mm/numaperf.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 065efe27872ca942b53b9f11d5b3f534a9c33857 Author: Mauro Carvalho Chehab Date: Fri Jun 7 15:54:19 2019 -0300 docs: zh_CN: get rid of basic_profiling.txt Changeset 5700d1974818 ("docs: Get rid of the "basic profiling" guide") removed an old basic-profiling.txt file that was not updated over the last 11 years and won't reflect the post-perf era. It makes no sense to keep its translation, so get rid of it too. Fixes: 5700d1974818 ("docs: Get rid of the "basic profiling" guide") Signed-off-by: Mauro Carvalho Chehab Acked-by: Alex Shi Signed-off-by: Jonathan Corbet .../translations/zh_CN/basic_profiling.txt | 71 ---------------------- 1 file changed, 71 deletions(-) commit 8b01caee99fb07218908c0ac9be8c758878f33f9 Author: Mauro Carvalho Chehab Date: Fri Jun 7 15:54:18 2019 -0300 isdn: mISDN: remove a bogus reference to a non-existing doc The mISDN driver was added on those commits: 960366cf8dbb ("Add mISDN DSP") 1b2b03f8e514 ("Add mISDN core files") 04578dd330f1 ("Define AF_ISDN and PF_ISDN") e4ac9bc1f668 ("Add mISDN driver") None of them added a Documentation/isdn/mISDN.cert file. Also, whatever were supposed to be written there on that time, probably doesn't make any sense nowadays, as I doubt isdn would have any massive changes. So, let's just get rid of the broken reference, in order to shut up a warning produced by ./scripts/documentation-file-ref-check. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet drivers/isdn/mISDN/dsp_core.c | 2 -- 1 file changed, 2 deletions(-) commit 671c30957e78a822917cf0b04c4592e9813f7f9b Author: Mauro Carvalho Chehab Date: Fri Jun 7 15:54:17 2019 -0300 ABI: sysfs-devices-system-cpu: point to the right docs The cpuidle doc was split on two, one at the admin guide and another one at the driver API guide. Instead of pointing to a non-existent file, point to both (admin guide being the first one). Signed-off-by: Mauro Carvalho Chehab Acked-by: Rafael J. Wysocki Signed-off-by: Jonathan Corbet Documentation/ABI/testing/sysfs-devices-system-cpu | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 09afc797f3629f722df6a90ca6eb944013133c7a Author: Borislav Petkov Date: Sat Apr 20 22:06:43 2019 +0200 RAS/CEC: Add copyright Signed-off-by: Borislav Petkov drivers/ras/cec.c | 3 +++ 1 file changed, 3 insertions(+) commit 60fd42d26cc7ec8847598da50ebf27e3c9647d7b Author: Tony Luck Date: Mon May 6 13:13:22 2019 +0200 RAS/CEC: Add CONFIG_RAS_CEC_DEBUG and move CEC debug features there The pfn and array files in (debugfs)/ras/cec are intended for debugging the CEC code itself. They are not needed on production systems, so the default setting for this CONFIG option is "n". [ bp: Have it with less ifdeffery by using IS_ENABLED(). ] Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov arch/x86/ras/Kconfig | 10 ++++++++++ drivers/ras/cec.c | 26 ++++++++++++++------------ 2 files changed, 24 insertions(+), 12 deletions(-) commit f57518cd56e2919afbcef3839122a75e291c7f85 Author: Borislav Petkov Date: Sat Apr 20 23:01:03 2019 +0200 RAS/CEC: Dump the different array element sections When dumping the array elements, print them in the following format: [ PFN | generation in binary | count ] to be perfectly clear what all those sections are. Signed-off-by: Borislav Petkov Cc: Tony Luck Cc: linux-edac drivers/ras/cec.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit b8b5ca6600dec2a4f1e50ca9d3cf9e1d032870cd Author: Borislav Petkov Date: Sat Apr 20 21:30:11 2019 +0200 RAS/CEC: Rename count_threshold to action_threshold ... which is the better, more-fitting name anyway. Tony: - make action_threshold u64 due to debugfs accessors expecting u64. - rename the remaining: s/count_threshold/action_threshold/g Co-developed-by: Tony Luck Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov Cc: linux-edac drivers/ras/cec.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 9632a3299bb1897f01c6a485ff035b20e61d7ae1 Author: Borislav Petkov Date: Sun Apr 21 21:41:45 2019 +0200 RAS/CEC: Sanity-check array on every insertion Check the elements order in the array after every insertion. Signed-off-by: Borislav Petkov Cc: Tony Luck Cc: linux-edac drivers/ras/cec.c | 37 +++++++++++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 6 deletions(-) commit d0e375e8f26edd2e577e3afa9d952f91037cbd87 Author: Borislav Petkov Date: Sat Apr 20 21:39:24 2019 +0200 RAS/CEC: Fix potential memory leak Free the array page if a failure is encountered while creating the debugfs nodes. Signed-off-by: Borislav Petkov Cc: Tony Luck Cc: linux-edac drivers/ras/cec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 5cc6b16ea1313d05956b55e83a1f753c604282a8 Author: Borislav Petkov Date: Sat Apr 20 21:33:08 2019 +0200 RAS/CEC: Do not set decay value on error When the value requested doesn't match the allowed (min,max) range, the @data buffer should not be modified with the invalid value because reading "decay_interval" shows it otherwise as if the previous write succeeded. Move the data write after the check. Signed-off-by: Borislav Petkov Cc: Tony Luck Cc: linux-edac drivers/ras/cec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit de0e0624d86ff9fc512dedb297f8978698abf21a Author: Borislav Petkov Date: Sat Apr 20 14:06:37 2019 +0200 RAS/CEC: Check count_threshold unconditionally The count_threshold should be checked unconditionally, after insertion too, so that a count_threshold value of 1 can cause an immediate offlining. I.e., offline the page on the *first* error encountered. Add comments to make it clear what cec_add_elem() does, while at it. Reported-by: WANG Chao Signed-off-by: Borislav Petkov Cc: Tony Luck Cc: linux-edac@vger.kernel.org Link: https://lkml.kernel.org/r/20190418034115.75954-3-chao.wang@ucloud.cn drivers/ras/cec.c | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) commit 6d8e294bf5f0e85c34e8b14b064e2965f53f38b0 Author: Borislav Petkov Date: Sat Apr 20 12:53:05 2019 +0200 RAS/CEC: Fix pfn insertion When inserting random PFNs for debugging the CEC through (debugfs)/ras/cec/pfn, depending on the return value of pfn_set(), multiple values get inserted per a single write. That is because simple_attr_write() interprets a retval of 0 as success and claims the whole input. However, pfn_set() returns the cec_add_elem() value, which, if > 0 and smaller than the whole input length, makes glibc continue issuing the write syscall until there's input left: pfn_set simple_attr_write debugfs_attr_write full_proxy_write vfs_write ksys_write do_syscall_64 entry_SYSCALL_64_after_hwframe leading to those repeated calls. Return 0 to fix that. Signed-off-by: Borislav Petkov Cc: Tony Luck Cc: linux-edac drivers/ras/cec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit aec3925f093d3ac880c53ec03ea28ef8608b0a52 Author: Noralf Trønnes Date: Fri May 31 16:01:13 2019 +0200 drm/fb-helper: Move out commit code Move the modeset commit code to drm_client_modeset. No changes except exporting API. v7: Export drm_client_panel_rotation() (Gerd Hoffmann) v2: Move to drm_client_modeset.c instead of drm_client.c Signed-off-by: Noralf Trønnes Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20190531140117.37751-5-noralf@tronnes.org drivers/gpu/drm/drm_client_modeset.c | 288 +++++++++++++++++++++++++++++++++++ drivers/gpu/drm/drm_fb_helper.c | 282 ---------------------------------- include/drm/drm_client.h | 4 + 3 files changed, 292 insertions(+), 282 deletions(-) commit eade2a17ddc56771ccd0052056c15e31f9fae943 Author: Noralf Trønnes Date: Fri May 31 16:01:12 2019 +0200 drm/fb-helper: Prepare to move out commit code This makes the necessary changes so the commit code can be moved out to drm_client as-is in the next patch. It's split up to ease review. Signed-off-by: Noralf Trønnes Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20190531140117.37751-4-noralf@tronnes.org drivers/gpu/drm/drm_fb_helper.c | 122 ++++++++++++++++++++++++++-------------- 1 file changed, 81 insertions(+), 41 deletions(-) commit df73789514554761ebdd87f2426938696a2442a2 Author: Noralf Trønnes Date: Fri May 31 16:01:10 2019 +0200 drm/atomic: Move __drm_atomic_helper_disable_plane/set_config() Prepare for moving drm_fb_helper modesetting code to drm_client. drm_client will be linked to drm.ko, so move __drm_atomic_helper_disable_plane() and __drm_atomic_helper_set_config() out of drm_kms_helper.ko. While at it, fix two checkpatch complaints: - WARNING: Block comments use a trailing */ on a separate line - CHECK: Alignment should match open parenthesis v7: Declare drm_mode_set and drm_plane_state Signed-off-by: Noralf Trønnes Reviewed-by: Daniel Vetter Reviewed-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20190531140117.37751-2-noralf@tronnes.org drivers/gpu/drm/drm_atomic.c | 168 ++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/drm_atomic_helper.c | 164 ----------------------------------- drivers/gpu/drm/drm_crtc_internal.h | 7 ++ include/drm/drm_atomic_helper.h | 4 - 4 files changed, 175 insertions(+), 168 deletions(-) commit d6e561df50b5a7e33273f66f97bf2b4ff25f13b4 Author: Geert Uytterhoeven Date: Fri Jun 7 13:06:12 2019 +0200 dt-bindings: pinctrl: pic32: Spelling s/configuraion/configuration/ Signed-off-by: Geert Uytterhoeven Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/microchip,pic32-pinctrl.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4c06a42e826d5bb24408c528aba2c13528225071 Author: Wolfram Sang Date: Sat Jun 8 12:56:13 2019 +0200 usb: typec: tcpm: fusb302: simplify getting the adapter of a client We have a dedicated pointer for that, so use it. Much easier to read and less computation involved. Signed-off-by: Wolfram Sang Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/tcpm/fusb302.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit cb5f15b711d3ace7b29369657487f1281a4a5eac Author: Laurent Pinchart Date: Thu Mar 28 07:31:32 2019 +0200 drm: rcar-du: Add support for missing 16-bit RGB1555 formats Add support for the DRM_FORMAT_RGBA5551, DRM_FORMAT_RGBX5551, DRM_FORMAT_ABGR1555, DRM_FORMAT_XBGR1555, DRM_FORMAT_BGRA5551 and DRM_FORMAT_BGRX5551 formats to the DU driver. Those formats are only available on Gen3. Signed-off-by: Laurent Pinchart Acked-by: Sakari Ailus Reviewed-by: Jacopo Mondi Acked-by: Daniel Vetter drivers/gpu/drm/rcar-du/rcar_du_kms.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit e158dbb0e6b6ffb331abdacb38d78a740f004c5e Author: Laurent Pinchart Date: Thu Mar 28 07:31:32 2019 +0200 drm: rcar-du: Add support for missing 16-bit RGB4444 formats Add support for the DRM_FORMAT_RGBA4444, DRM_FORMAT_RGBX4444, DRM_FORMAT_ABGR4444, DRM_FORMAT_XBGR4444, DRM_FORMAT_BGRA4444 and DRM_FORMAT_BGRX4444 formats to the DU driver. Those formats are only available on Gen3. Signed-off-by: Laurent Pinchart Acked-by: Sakari Ailus Reviewed-by: Jacopo Mondi Acked-by: Daniel Vetter drivers/gpu/drm/rcar-du/rcar_du_kms.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 329972a9db8a9004f32600ff24a8ae356dd52226 Author: Laurent Pinchart Date: Thu Mar 28 07:31:32 2019 +0200 drm: rcar-du: Add support for missing 32-bit RGB formats Add support for the DRM_FORMAT_RGBA8888, DRM_FORMAT_RGBX8888, DRM_FORMAT_ABGR8888 and DRM_FORMAT_XBGR8888 formats to the DU driver. Those formats are only available on Gen3. Signed-off-by: Laurent Pinchart Acked-by: Sakari Ailus Reviewed-by: Jacopo Mondi Acked-by: Daniel Vetter drivers/gpu/drm/rcar-du/rcar_du_kms.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 6be306bee7dd80905329769292e21b5e2d166b8f Author: Hans de Goede Date: Wed Jun 5 20:17:35 2019 +0200 drm/i915/dsi: Read back pclk set by GOP and use that as pclk (v3) The GOP sometimes initializes the pclk at a (slightly) different frequency then the pclk which we've calculated. This commit makes the DSI code read-back the pclk set by the GOP and if that is within a reasonable margin of the calculated pclk, uses that instead. This fixes the first modeset being a full modeset instead of a fast modeset on systems where the GOP pclk is different. Changes in v2: -Use intel_encoder_current_mode() to get the pclk setup by the GOP Changes in v3: -Back to the readback approach, skipping the dsi_pll.ctrl / .dev checks in intel_pipe_config_compare() when adjust is set leads to: [drm:pipe_config_err [i915]] *ERROR* mismatch in dsi_pll.ctrl (...) [drm:pipe_config_err [i915]] *ERROR* mismatch in dsi_pll.div (...) -Do the readback and pclk overriding from vlv_dsi_init(), rather then from intel_dsi_vbt_init() as the vbt code should not be touching the hw Reviewed-by: Ville Syrjälä Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20190605181735.7020-3-hdegoede@redhat.com drivers/gpu/drm/i915/vlv_dsi.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) commit 2def5ae7d7fb8578b53b0f8595d8ec90b8eb1aeb Author: Hans de Goede Date: Wed Jun 5 20:17:34 2019 +0200 drm/i915/dsi: Move vlv/icl_dphy_param_init call out of intel_dsi_vbt_init (v2) The vlv/icl_dphy_param_init calls do various calculations to set dphy parameters based on the pclk. Move the calling of vlv/icl_dphy_param_init to vlv_dsi_init to give vlv_dsi_init a chance to tweak the pclk before these calculations are done. Changes in v2: -Also moves the icl and vlv specific dphy_param_init functions from the generic intel_dsi_vbt.c file into the icl_ and vlv_dsi.c specific files. Note icl_dphy_param_init() and vlv_dphy_param_init() are only moved, otherwise they are completely unchanged. Reviewed-by: Ville Syrjälä Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20190605181735.7020-2-hdegoede@redhat.com drivers/gpu/drm/i915/icl_dsi.c | 108 ++++++++++++++ drivers/gpu/drm/i915/intel_dsi.h | 1 + drivers/gpu/drm/i915/intel_dsi_vbt.c | 282 +---------------------------------- drivers/gpu/drm/i915/vlv_dsi.c | 170 +++++++++++++++++++++ 4 files changed, 280 insertions(+), 281 deletions(-) commit 0e29eb9d9160685a1c18534f05a28a260fbfadd5 Author: Hans de Goede Date: Wed Jun 5 20:17:33 2019 +0200 drm/i915/dsi: Move logging of DSI VBT parameters to a helper function This is a preparation patch for moving the calling of *_dphy_param_init() out of intel_dsi_vbt_init. Reviewed-by: Ville Syrjälä Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20190605181735.7020-1-hdegoede@redhat.com drivers/gpu/drm/i915/intel_dsi_vbt.c | 77 ++++++++++++++++++++---------------- 1 file changed, 42 insertions(+), 35 deletions(-) commit 13c12f693001c301420c53ae94c252ea6bb08765 Author: Luís Ferreira Date: Tue Apr 2 17:04:30 2019 +0100 iio: accel: add missing sensor for some 2-in-1 based ultrabooks Some ultrabooks, like Teclast F6 Pro, use KIOX010A sensor on display and KIOX020A sensor on keyboard base, to detect tablet mode or screen orientation. Signed-off-by: Luís Ferreira Signed-off-by: Jonathan Cameron drivers/iio/accel/kxcjk-1013.c | 1 + 1 file changed, 1 insertion(+) commit 26207c7e787248bba8b8cee8bb6db36ecc7c0a13 Author: Fabien Lahoudere Date: Thu May 23 11:07:37 2019 +0200 docs: iio: add precision about sampling_frequency_available The documentation give some exemple on what format can be expected from sampling_frequency_available sysfs attribute Signed-off-by: Fabien Lahoudere Signed-off-by: Jonathan Cameron Documentation/ABI/testing/sysfs-bus-iio | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit d711a3c7dc829c91048276db09b2794ad84498af Author: Eddie James Date: Mon May 20 21:13:34 2019 -0500 iio: dps310: Add pressure sensing capability The DPS310 supports measurement of pressure, so support that in the driver. Use background measurement like the temperature sensing and default to lowest precision and lowest measurement rate. Signed-off-by: Eddie James Signed-off-by: Jonathan Cameron drivers/iio/pressure/dps310.c | 363 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 337 insertions(+), 26 deletions(-) commit 6ca6366220ed285e29ee22f4cf5c68a0397cb005 Author: Sven Schnelle Date: Wed Jun 5 22:32:22 2019 +0200 parisc: add dynamic ftrace This patch implements dynamic ftrace for PA-RISC. The required mcount call sequences can get pretty long, so instead of patching the whole call sequence out of the functions, we are using -fpatchable-function-entry from gcc. This puts a configurable amount of NOPS before/at the start of the function. Taking do_sys_open() as example, which would look like this when the call is patched out: 1036b248: 08 00 02 40 nop 1036b24c: 08 00 02 40 nop 1036b250: 08 00 02 40 nop 1036b254: 08 00 02 40 nop 1036b258 : 1036b258: 08 00 02 40 nop 1036b25c: 08 03 02 41 copy r3,r1 1036b260: 6b c2 3f d9 stw rp,-14(sp) 1036b264: 08 1e 02 43 copy sp,r3 1036b268: 6f c1 01 00 stw,ma r1,80(sp) When ftrace gets enabled for this function the kernel will patch these NOPs to: 1036b248: 10 19 57 20
1036b24c: 6f c1 00 80 stw,ma r1,40(sp) 1036b250: 48 21 3f d1 ldw -18(r1),r1 1036b254: e8 20 c0 02 bv,n r0(r1) 1036b258 : 1036b258: e8 3f 1f df b,l,n .-c,r1 1036b25c: 08 03 02 41 copy r3,r1 1036b260: 6b c2 3f d9 stw rp,-14(sp) 1036b264: 08 1e 02 43 copy sp,r3 1036b268: 6f c1 01 00 stw,ma r1,80(sp) So the first NOP in do_sys_open() will be patched to jump backwards into some minimal trampoline code which pushes a stackframe, saves r1 which holds the return address, loads the address of the real ftrace function, and branches to that location. For 64 Bit things are getting a bit more complicated (and longer) because we must make sure that the address of ftrace location is 8 byte aligned, and the offset passed to ldd for fetching the address is 8 byte aligned as well. Note that gcc has a bug which misplaces the function label, and needs a patch to make dynamic ftrace work. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90751 for details. Signed-off-by: Sven Schnelle Signed-off-by: Helge Deller arch/parisc/Kconfig | 2 + arch/parisc/Makefile | 18 ++++++ arch/parisc/include/asm/ftrace.h | 15 ++++- arch/parisc/kernel/Makefile | 9 +-- arch/parisc/kernel/entry.S | 64 +++++++++++++++++++ arch/parisc/kernel/ftrace.c | 129 +++++++++++++++++++++++++++++++++++--- arch/parisc/kernel/module.c | 20 +++++- arch/parisc/kernel/module.lds | 7 +++ arch/parisc/kernel/vmlinux.lds.S | 2 + arch/parisc/mm/fixmap.c | 4 +- include/asm-generic/vmlinux.lds.h | 7 +++ 11 files changed, 259 insertions(+), 18 deletions(-) commit 2809b392a62ae307da058a52d451b2fc3ce4de7e Author: Sven Schnelle Date: Wed Jun 5 22:32:21 2019 +0200 compiler.h: add CC_USING_PATCHABLE_FUNCTION_ENTRY This can be used for architectures implementing dynamic ftrace via -fpatchable-function-entry. Signed-off-by: Sven Schnelle Signed-off-by: Helge Deller include/linux/compiler_types.h | 2 ++ 1 file changed, 2 insertions(+) commit 6183d68b8b01e3a0182044da2e8787c2c88d84f5 Author: Sven Schnelle Date: Wed Jun 5 22:32:20 2019 +0200 parisc: use pr_debug() in kernel/module.c Instead of using our own version, switch to the generic pr_() calls. Signed-off-by: Sven Schnelle Signed-off-by: Helge Deller arch/parisc/kernel/module.c | 44 +++++++++++++++++++------------------------- 1 file changed, 19 insertions(+), 25 deletions(-) commit e4eab1ce1f679507c02ea48e6b6edaef33f8fee3 Author: Sven Schnelle Date: Wed Jun 5 22:32:19 2019 +0200 parisc: add WARN_ON() to clear_fixmap Calling clear_fixmap() on an already cleared fixed mapping is a bad thing to do. Add a WARN_ON() to catch such issues. Signed-off-by: Sven Schnelle Signed-off-by: Helge Deller arch/parisc/mm/fixmap.c | 3 +++ 1 file changed, 3 insertions(+) commit 7e923369b1ec92af5f048d2146b44f9132abe1ad Author: Sven Schnelle Date: Wed Jun 5 22:32:18 2019 +0200 parisc: add spinlock to patch function If multiple CPUs are patching code we need the spinlock to protect against parallel fixmap maps/unmap calls. Signed-off-by: Sven Schnelle Signed-off-by: Helge Deller arch/parisc/kernel/patch.c | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) commit 4e87ace902cf0d401376cac89bb6a5239e57fe9f Author: Sven Schnelle Date: Wed Jun 5 22:32:17 2019 +0200 parisc: add support for patching multiple words add patch_text_multiple() which allows to patch multiple text words in memory. This can be used to copy functions. Signed-off-by: Sven Schnelle Signed-off-by: Helge Deller arch/parisc/include/asm/patch.h | 4 ++- arch/parisc/kernel/patch.c | 75 ++++++++++++++++++++++++++++++++--------- 2 files changed, 62 insertions(+), 17 deletions(-) commit 8e8fddab0d0acdefb1ad76852d954b2bbaa3896d Author: Laurent Pinchart Date: Tue Mar 5 00:10:28 2019 +0200 drm: rcar-du: Skip LVDS1 output on Gen3 when using dual-link LVDS mode In dual-link LVDS mode, the LVDS1 encoder is used as a companion for LVDS0, and both encoders transmit data from DU0. The LVDS1 output of DU1 can't be used in that case, don't create an encoder and connector for it. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Tested-by: Jacopo Mondi Acked-by: Sam Ravnborg Reviewed-by: Kieran Bingham drivers/gpu/drm/rcar-du/rcar_du_encoder.c | 12 ++++++++++++ drivers/gpu/drm/rcar-du/rcar_du_kms.c | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) commit fa440d870358fd01eeedd212a1ad918a3b2771d5 Author: Laurent Pinchart Date: Mon Mar 4 21:34:46 2019 +0200 drm: rcar-du: lvds: Add support for dual-link mode In dual-link mode the LVDS0 encoder transmits even-numbered pixels, and sends odd-numbered pixels to the LVDS1 encoder for transmission on a separate link. To implement support for this mode of operation, determine if the LVDS connection operates in dual-link mode by querying the next device in the pipeline, locate the companion encoder, and control it directly through its bridge operations. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Tested-by: Jacopo Mondi Acked-by: Sam Ravnborg Reviewed-by: Kieran Bingham drivers/gpu/drm/rcar-du/rcar_lvds.c | 107 +++++++++++++++++++++++++++++++----- drivers/gpu/drm/rcar-du/rcar_lvds.h | 5 ++ 2 files changed, 99 insertions(+), 13 deletions(-) commit 968328496b0fbee42abb6fae98ba0dc720bda977 Author: Laurent Pinchart Date: Wed Mar 6 22:57:02 2019 +0200 drm: rcar-du: lvds: Remove LVDS double-enable checks The DRM core and DU driver guarantee that the LVDS bridge will not be double-enabled or double-disabled. Remove the corresponding unnecessary checks. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Tested-by: Jacopo Mondi Acked-by: Sam Ravnborg Reviewed-by: Kieran Bingham drivers/gpu/drm/rcar-du/rcar_lvds.c | 19 ------------------- 1 file changed, 19 deletions(-) commit f54b4df6b14fb5858bec605aee4356a2e801dddb Author: Laurent Pinchart Date: Mon Mar 4 23:51:18 2019 +0200 dt-bindings: display: renesas: lvds: Add renesas,companion property Add a new optional renesas,companion property to point to the companion LVDS encoder. This is used to support dual-link operation where the main LVDS encoder splits even-numbered and odd-numbered pixels between the two LVDS encoders. The new property doesn't control the mode of operation, it only describes the relationship between the master and companion LVDS encoders. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Tested-by: Jacopo Mondi Acked-by: Sam Ravnborg Reviewed-by: Kieran Bingham .../bindings/display/bridge/renesas,lvds.txt | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit 1ddf2d4ad898e5e793681680489fc4c1173d2d42 Author: Laurent Pinchart Date: Mon Mar 4 21:56:07 2019 +0200 drm: bridge: thc63: Report input bus mode through bridge timings Set a drm_bridge_timings in the drm_bridge, and use it to report the input bus mode (single-link or dual-link). The other fields of the timings structure are kept to 0 as they do not apply to LVDS buses. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Tested-by: Jacopo Mondi Acked-by: Sam Ravnborg Reviewed-by: Kieran Bingham drivers/gpu/drm/bridge/thc63lvd1024.c | 54 ++++++++++++++++++++++++++++------- 1 file changed, 43 insertions(+), 11 deletions(-) commit 3cb120814eb956d3673e00a419cb6cc6a82c15fe Author: Laurent Pinchart Date: Mon Mar 4 21:47:51 2019 +0200 dt-bindings: display: bridge: thc63lvd1024: Document dual-link operation The THC63LVD1024 LVDS decoder can operate in two modes, single-link or dual-link. In dual-link mode both input ports are used to carry even- and odd-numbered pixels separately. Document this in the DT bindings, along with the related rules governing port and usage. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Reviewed-by: Rob Herring Tested-by: Jacopo Mondi Acked-by: Sam Ravnborg Reviewed-by: Kieran Bingham .../devicetree/bindings/display/bridge/thine,thc63lvd1024.txt | 6 ++++++ 1 file changed, 6 insertions(+) commit b0a6b94027c85857f768a586cbcf1e96ee1d04ae Author: Laurent Pinchart Date: Mon Mar 4 23:05:34 2019 +0200 drm: bridge: Add dual_link field to the drm_bridge_timings structure Extend the drm_bridge_timings structure with a new dual_link field to indicate that the bridge's input bus carries data on two separate physical links. The first use case is LVDS dual-link mode where even- and odd-numbered pixels are transferred on separate LVDS links. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Tested-by: Jacopo Mondi Acked-by: Sam Ravnborg include/drm/drm_bridge.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit 66659d9d09628591e334b6a6d605166580c8e710 Author: Kieran Bingham Date: Fri May 17 22:20:49 2019 +0100 drm: rcar-du: writeback: include interface header The new writeback feature exports functions so that they can integrate into the rcar_du_kms module. The interface functions are defined in the rcar_du_writeback header, but it is not included in the object file itself leading to compiler warnings for missing prototypes. Include the header as appropriate. Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart drivers/gpu/drm/rcar-du/rcar_du_writeback.c | 1 + 1 file changed, 1 insertion(+) commit 62e2da682a0a3874291bc7874d7e5a043f99cf6d Author: Biju Das Date: Fri Apr 12 13:38:05 2019 +0100 drm: rcar-du: lvds: Add r8a774a1 support The LVDS encoders on RZ/G2M SoC is similar to R-Car M3-W. Add support for RZ/G2M (R8A774A1) SoC to the LVDS encoder driver. Signed-off-by: Biju Das Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart drivers/gpu/drm/rcar-du/rcar_lvds.c | 1 + 1 file changed, 1 insertion(+) commit d31349a50415adee26486fbec90a08cc954d0082 Author: Biju Das Date: Fri Apr 12 13:38:04 2019 +0100 drm: rcar-du: Add R8A774A1 support Add support for the R8A774A1 DU (which is very similar to the R8A7796 DU except that it lacks TCON and CMM); it has one RGB output, one LVDS output and one HDMI output. Signed-off-by: Biju Das Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart drivers/gpu/drm/rcar-du/rcar_du_drv.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 07c7c6bfbe03192263cc5c9550199a189cabd558 Author: Biju Das Date: Fri Apr 12 13:38:03 2019 +0100 dt-bindings: display: renesas: lvds: Document r8a774a1 bindings Document the RZ/G2M (R8A774A1) LVDS bindings. Signed-off-by: Biju Das Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt | 1 + 1 file changed, 1 insertion(+) commit 2acd1d1f219946e292aa85a9e3dff35e4bb78237 Author: Biju Das Date: Fri Apr 12 13:38:02 2019 +0100 dt-bindings: display: renesas: du: Document the r8a774a1 bindings Document the RZ/G2M (R8A774A1) SoC in the R-Car DU bindings. Signed-off-by: Biju Das Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart Documentation/devicetree/bindings/display/renesas,du.txt | 2 ++ 1 file changed, 2 insertions(+) commit 6bd1eb6c5d449ecf2e6db4aec1381cd5033f742f Merge: 9d130f91a4cb 992968d78626 Author: Linus Walleij Date: Sat Jun 8 01:32:19 2019 +0200 Merge tag 'sh-pfc-for-v5.3-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel pinctrl: sh-pfc: Updates for v5.3 - Add more checks for pinctrl table validation, - Add TPU (Timer Pulse Unit / PWM) pin groups on R-Car H3, M3-W, and M3-N, - Rework description of pins without GPIO functionality, - Small fixes and cleanups. commit 9d130f91a4cb8671a1fca3731f4427905e4c4cfc Author: Linus Walleij Date: Sun Jun 2 23:08:28 2019 +0200 pinctrl: nomadik: Fix SPDX tags Some files were missing the appropriate SPDX tags so fixed it up. Signed-off-by: Linus Walleij drivers/pinctrl/nomadik/Kconfig | 2 ++ drivers/pinctrl/nomadik/pinctrl-ab8500.c | 5 +---- drivers/pinctrl/nomadik/pinctrl-ab8505.c | 5 +---- drivers/pinctrl/nomadik/pinctrl-abx500.c | 6 +----- drivers/pinctrl/nomadik/pinctrl-nomadik.c | 5 +---- 5 files changed, 6 insertions(+), 17 deletions(-) commit d32aa74555575a0692f4e06fe39a673a1877eff6 Author: Gustavo A. R. Silva Date: Thu Jun 6 18:11:44 2019 -0500 pinctrl: tb10x: Use flexible-array member and struct_size() helper Update the code to use a flexible array member instead of a pointer in structure tb10x_pinctrl and use the struct_size() helper: struct tb10x_pinctrl { ... struct tb10x_of_pinfunc pinfuncs[]; }; Also, make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. So, replace the following form: sizeof(struct tb10x_pinctrl) + of_get_child_count(of_node) * sizeof(struct tb10x_of_pinfunc) with: struct_size(state, pinfuncs, of_get_child_count(of_node)) This code was detected with the help of Coccinelle. Reviewed-by: Kees Cook Signed-off-by: Gustavo A. R. Silva Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-tb10x.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 76c4c597b2ef59900933fca8893428f0555afaab Author: Hongwei Zhang Date: Tue Jun 4 17:53:32 2019 -0400 pinctrl: aspeed: Add SGPM pinmux Add SGPM pinmux to ast2500-pinctrl function and group, to prepare for supporting SGPIO in AST2500 SoC. Signed-off-by: Hongwei Zhang Reviewed-by: Andrew Jeffery Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/pinctrl-aspeed.txt | 2 +- drivers/pinctrl/aspeed/pinctrl-aspeed-g5.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) commit 53a5372ce326116f3e3d3f1d701113b2542509f4 Author: Bjorn Andersson Date: Tue Jun 4 00:19:59 2019 -0700 pinctrl: qcom: sdm845: Expose ufs_reset as gpio The ufs_reset pin is expected to be wired to the reset pin of the primary UFS memory but is pretty much just a general purpose output pinr Reorder the pins and expose it as gpio 150, so that the UFS driver can toggle it. Signed-off-by: Bjorn Andersson Signed-off-by: Linus Walleij .../devicetree/bindings/pinctrl/qcom,sdm845-pinctrl.txt | 2 +- drivers/pinctrl/qcom/pinctrl-sdm845.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) commit 9f1e3c5966e582322142b6f49fe054caa4f72e58 Author: Manivannan Sadhasivam Date: Mon Jun 3 13:04:21 2019 +0530 pinctrl: Add drive strength support for BM1880 SoC Add drive strength support for Bitmain BM1880 SoC. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-bm1880.c | 290 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 287 insertions(+), 3 deletions(-) commit 7ea6a2edbfd0a98f729f6f4705535bc53ec1a89f Author: Manivannan Sadhasivam Date: Mon Jun 3 13:04:20 2019 +0530 dt-bindings: pinctrl: Document drive strength settings for BM1880 SoC Document drive strength settings for Bitmain BM1880 SoC. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Linus Walleij .../devicetree/bindings/pinctrl/bitmain,bm1880-pinctrl.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) commit f38b5069234937ae818d6a39fd4dc03d003b5565 Author: Young Xiao <92siuyang@gmail.com> Date: Wed May 29 10:43:58 2019 +0800 pinctrl: ns2: Fix potential NULL dereference platform_get_resource() may fail and return NULL, so we should better check it's return value to avoid a NULL pointer dereference a bit later in the code. Signed-off-by: Young Xiao <92siuyang@gmail.com> Reviewed-by: Ray Jui Signed-off-by: Linus Walleij drivers/pinctrl/bcm/pinctrl-ns2-mux.c | 2 ++ 1 file changed, 2 insertions(+) commit 3a11cf2217520e3c827a24c6d5f648fa45845787 Author: Anson Huang Date: Thu May 30 11:13:57 2019 +0800 dt-bindings: imx: Correct pinfunc head file path for i.MX8MM The i.MX8MM pinfunc head file is located in DT folder, correct it. Signed-off-by: Anson Huang Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/fsl,imx8mm-pinctrl.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6c99d348fde78dc05d3acc05f1af4d85574c663c Author: Linus Walleij Date: Sun Jun 2 23:11:19 2019 +0200 pinctrl: u300: Fix SPDX tags Some files were missing the appropriate SPDX tags so fixed it up. Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-coh901.c | 2 +- drivers/pinctrl/pinctrl-u300.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit fc8938d445d5ca861c5a76098512ab6dd67f6d80 Author: Keerthy Date: Thu Jun 6 15:26:17 2019 +0530 dt-bindings: gpio: davinci: Add k3 am654 compatible The patch adds k3 am654 compatible, specific properties and an example. Signed-off-by: Keerthy Signed-off-by: Linus Walleij .../devicetree/bindings/gpio/gpio-davinci.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 6a4d8b6bd279320baade9c88adc6776836bee49a Author: Keerthy Date: Wed Jun 5 13:32:58 2019 +0530 gpio: davinci: Add new compatible for K3 AM654 SoCs Add new compatible for K3 AM654 SoCs. Signed-off-by: Keerthy Signed-off-by: Linus Walleij drivers/gpio/gpio-davinci.c | 1 + 1 file changed, 1 insertion(+) commit 6eeea326b3892864eaa852005d45bc8bc5dd6577 Author: Keerthy Date: Wed Jun 5 11:25:19 2019 +0530 gpio: Davinci: Add K3 dependencies Add K3 dependencies to enable the driver on K3 platforms. Signed-off-by: Keerthy Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 36c0551976d580de85958b0de93a4f6a7159a176 Author: Keerthy Date: Wed Jun 5 13:32:57 2019 +0530 gpio: davinci: Fix the compiler warning with ARM64 config enabled Fix the compiler warning with ARM64 config enabled as the current mask assumes 32 bit by default. Signed-off-by: Keerthy Signed-off-by: Linus Walleij drivers/gpio/gpio-davinci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 095561f476abb09c2495b1e0a45a5ebb50a33b27 Author: Oliver O'Halloran Date: Thu Jun 6 21:52:20 2019 +1000 i2c: fsi: Create busses for all ports Currently we only create an I2C bus for the ports listed in the device-tree for that master. There's no real reason for this since we can discover the number of ports the master supports by looking at the port_max field of the status register. This patch re-works the bus add logic so that we always create buses for each port, unless the bus is marked as unavailable in the DT. This is useful since it ensures that all the buses provided by the CFAM I2C master are accessible to debug tools. Signed-off-by: Oliver O'Halloran Reviewed-by: Eddie James Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-fsi.c | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) commit 19b07cb4a187fe5d72519491fc2d11a3a7af1219 Author: Pali Rohár Date: Thu Jun 6 20:18:45 2019 +0200 i2c: i801: Register optional lis3lv02d I2C device on Dell machines Dell platform team told us that some (DMI whitelisted) Dell Latitude machines have ST microelectronics accelerometer at I2C address 0x29. Presence of that ST microelectronics accelerometer is verified by existence of SMO88xx ACPI device which represent that accelerometer. Unfortunately ACPI device does not specify I2C address. This patch registers lis3lv02d device for selected Dell Latitude machines at I2C address 0x29 after detection. And for Dell Vostro V131 machine at I2C address 0x1d which was manually detected. Finally commit a7ae81952cda ("i2c: i801: Allow ACPI SystemIO OpRegion to conflict with PCI BAR") allowed to use i2c-i801 driver on Dell machines so lis3lv02d correctly initialize accelerometer. Tested on Dell Latitude E6440. Signed-off-by: Pali Rohár Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-i801.c | 117 ++++++++++++++++++++++++++++++++++++ drivers/platform/x86/dell-smo8800.c | 1 + 2 files changed, 118 insertions(+) commit f0e4cd948b918d5277cd141eaf8d2ab79b0c78b2 Author: Ajay Gupta Date: Fri Jun 7 09:34:23 2019 -0700 usb: typec: ucsi: ccg: add runtime pm workaround Cypress USB Type-C CCGx controller firmware version 3.1.10 (which is being used in many NVIDIA GPU cards) has known issue of not triggering interrupt when a USB device is hot plugged to runtime resume the controller. If any GPU card gets latest kernel with runtime pm support but does not get latest fixed firmware then also it should continue to work and therefore a workaround is required to check for any connector change event. The workaround is that i2c bus driver will call pm_request_resume() to runtime resume ucsi_ccg driver. CCG driver will call the ISR for any connector change event for NVIDIA GPU card and only if it has old CCG firmware with the known issue. Signed-off-by: Ajay Gupta Acked-by: Heikki Krogerus Signed-off-by: Wolfram Sang drivers/usb/typec/ucsi/ucsi_ccg.c | 80 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 76 insertions(+), 4 deletions(-) commit 9f2e244d0a39eb437f98324ac315e605e48636db Author: Ajay Gupta Date: Fri Jun 7 09:34:22 2019 -0700 i2c: nvidia-gpu: resume ccgx i2c client Cypress USB Type-C CCGx controller firmware version 3.1.10 (which is being used in many NVIDIA GPU cards) has known issue of not triggering interrupt when a USB device is hot plugged to runtime resume the controller. If any GPU card gets latest kernel with runtime pm support but does not get latest fixed firmware then also it should continue to work and therefore a workaround is required to check for any connector change event The workaround is to request runtime resume of i2c client which is UCSI Cypress CCGx driver. CCG driver will call the ISR for any connector change event only if NVIDIA GPU has old CCG firmware with the known issue. Signed-off-by: Ajay Gupta Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-nvidia-gpu.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit a94ecde41f7e51e2742e53b5f151aee662c54d39 Author: Ajay Gupta Date: Fri Jun 7 09:34:21 2019 -0700 usb: typec: ucsi: ccg: enable runtime pm support The change enables runtime pm support to UCSI CCG driver. Added ucsi_resume() function to enable notification after system reusme. Exported both ucsi_resume() and ucsi_send_command() symbols in ucsi.c for modular build. Signed-off-by: Ajay Gupta Acked-by: Heikki Krogerus Signed-off-by: Wolfram Sang drivers/usb/typec/ucsi/ucsi.c | 10 ++++++++++ drivers/usb/typec/ucsi/ucsi.h | 1 + drivers/usb/typec/ucsi/ucsi_ccg.c | 38 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+) commit d4a4f927e4ddcf70320b03a6a687d55839721f7b Author: Ajay Gupta Date: Fri Jun 7 09:34:20 2019 -0700 i2c: nvidia-gpu: add runtime pm support Enable runtime pm support with autosuspend delay of three second. This is to make sure I2C client device Cypress CCGx has completed all transaction. Signed-off-by: Ajay Gupta Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-nvidia-gpu.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) commit cb7302fbe365cd079b7481720daf04e5e1925ac0 Author: Ajay Gupta Date: Fri Jun 7 09:34:19 2019 -0700 i2c: nvidia-gpu: refactor master_xfer Added a local variable "send_stop" to simplify "goto" statements. The "send_stop" handles below two case 1) When first i2c start fails and so i2c stop is not sent before exiting 2) When i2c stop failed after all transfers and we do not need to send another stop before exiting. Signed-off-by: Ajay Gupta Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-nvidia-gpu.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) commit e5bbbff5b7d7e76ccfe922a014ba628c558eff2f Author: Bjorn Andersson Date: Wed May 8 15:39:22 2019 -0700 clk: gcc-qcs404: Add PCIe resets Enabling PCIe requires several of the PCIe related resets from GCC, so add them all. Reviewed-by: Niklas Cassel Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Reviewed-by: Vinod Koul Signed-off-by: Stephen Boyd drivers/clk/qcom/gcc-qcs404.c | 7 +++++++ include/dt-bindings/clock/qcom,gcc-qcs404.h | 7 +++++++ 2 files changed, 14 insertions(+) commit 5923ea6c2ce626f0aa8a547d5b7e5fce705dd3dc Author: Linus Walleij Date: Fri Apr 26 14:40:18 2019 +0200 gpio: pass lookup and descriptor flags to request_own When a gpio_chip wants to request a descriptor from itself using gpiochip_request_own_desc() it needs to be able to specify fully how to use the descriptor, notably line inversion semantics. The workaround in the gpiolib.c can be removed and cases (such as SPI CS) where we need at times to request a GPIO with line inversion semantics directly on a chip for workarounds, can be fully supported with this call. Fix up some users of the API that weren't really using the last flag to set up the line as input or output properly but instead just calling direction setting explicitly after requesting the line. Cc: Martin Sperl Signed-off-by: Linus Walleij arch/arm/mach-omap1/ams-delta-fiq.c | 4 +++- arch/arm/mach-omap1/board-ams-delta.c | 5 +++-- drivers/gpio/gpio-mvebu.c | 11 ++++------- drivers/gpio/gpiolib-acpi.c | 6 +++--- drivers/gpio/gpiolib.c | 31 ++++++++++--------------------- drivers/hid/hid-cp2112.c | 7 +++++-- drivers/memory/omap-gpmc.c | 4 +++- include/linux/gpio/driver.h | 4 +++- 8 files changed, 34 insertions(+), 38 deletions(-) commit 0aa3ebffc43cb8974f2fca92d07b9ebeba0f67c1 Author: Mauro Carvalho Chehab Date: Wed May 29 20:23:47 2019 -0300 docs: gpio: driver.rst: fix a bad tag With ReST, [foo]_ means a reference to foo, causing this warning: Documentation/driver-api/gpio/driver.rst:419: WARNING: Unknown target name: "devm". Fix it by using a literal for the name. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Linus Walleij Documentation/driver-api/gpio/driver.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f02fba3aa8feeee0a9f9c82c6db2ae9dda7825cd Author: Bjorn Andersson Date: Fri May 3 17:17:36 2019 -0700 clk: qcom: gdsc: WARN when failing to toggle Failing to toggle a GDSC as the driver core is attaching the power-domain to a device will cause a silent probe deferral. Provide an explicit warning to the developer, in order to reduce the amount of time it takes to debug this. Signed-off-by: Bjorn Andersson Reviewed-by: Jeffrey Hugo Tested-by: Jeffrey Hugo Reviewed-by: Marc Gonzalez Signed-off-by: Stephen Boyd drivers/clk/qcom/gdsc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit afcafe07af0e0aeddbf40e163663fdf319c34739 Author: Matthew Wilcox Date: Wed Feb 20 16:21:05 2019 -0800 ucma: Convert ctx_idr to XArray Signed-off-by: Matthew Wilcox Signed-off-by: Jason Gunthorpe drivers/infiniband/core/ucma.c | 58 +++++++++++++++++------------------------- 1 file changed, 24 insertions(+), 34 deletions(-) commit 4dfd5321cf0a22bc43dd215d80d362895e0deb36 Author: Matthew Wilcox Date: Wed Feb 20 16:21:04 2019 -0800 ucma: Convert multicast_idr to XArray Signed-off-by: Matthew Wilcox Signed-off-by: Jason Gunthorpe drivers/infiniband/core/ucma.c | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) commit 6c0215f5d9f2a1fa5cab2ca320a41d9f19cfa80c Author: Mauro Carvalho Chehab Date: Fri Jun 7 15:54:33 2019 -0300 ASoC: dt-bindings: fix some broken links from txt->yaml conversion Some new files got converted to yaml, but references weren't updated accordingly. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Mark Brown Documentation/devicetree/bindings/media/st,stm32-dcmi.txt | 2 +- Documentation/devicetree/bindings/sound/st,stm32-i2s.txt | 2 +- Documentation/devicetree/bindings/sound/st,stm32-sai.txt | 2 +- MAINTAINERS | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit be411411279ba989d187af07fe65a8b84b533c97 Author: YueHaibing Date: Sat May 25 22:25:35 2019 +0800 clk: mmp: frac: Remove set but not used variable 'prev_rate' Fixes gcc '-Wunused-but-set-variable' warning: drivers/clk/mmp/clk-frac.c: In function clk_factor_set_rate: drivers/clk/mmp/clk-frac.c:81:16: warning: variable prev_rate set but not used [-Wunused-but-set-variable] It's never used and can be removed. Signed-off-by: YueHaibing Signed-off-by: Stephen Boyd drivers/clk/mmp/clk-frac.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit da6a5dda5e843f0a8904c2d171d585ae360f415e Author: YueHaibing Date: Wed May 29 17:39:37 2019 +0800 clk: ti: Remove unused functions They are not used any more since commit 7558562a70fb ("clk: ti: Drop legacy clk-3xxx-legacy code") Reported-by: Hulk Robot Suggested-by: Tero Kristo Signed-off-by: YueHaibing Signed-off-by: Stephen Boyd drivers/clk/ti/divider.c | 85 ------------------------------------------------ drivers/clk/ti/gate.c | 30 ----------------- drivers/clk/ti/mux.c | 31 ------------------ 3 files changed, 146 deletions(-) commit 60e9c3703c77b476565de337c676f6655bb2a8de Author: Philippe Mazenauer Date: Thu Jun 6 10:54:30 2019 -0700 clk: mediatek: mt8516: Remove unused variable Variable 'ddrphycfg_parents' is defined static and initialized, but not used in the file. ../drivers/clk/mediatek/clk-mt8516.c:234:27: warning: ‘ddrphycfg_parents’ defined but not used [-Wunused-const-variable=] static const char * const ddrphycfg_parents[] __initconst = { ^~~~~~~~~~~~~~~~~ Signed-off-by: Philippe Mazenauer Signed-off-by: Stephen Boyd drivers/clk/mediatek/clk-mt8516.c | 5 ----- 1 file changed, 5 deletions(-) commit 13ad1948d90d139437257d73622735d0f075777e Author: Paul Cercueil Date: Thu May 2 23:25:02 2019 +0200 clk: ingenic/jz4725b: Fix "pll half" divider not read/written properly The code was setting the bit 21 of the CPCCR register to use a divider of 2 for the "pll half" clock, and clearing the bit to use a divider of 1. This is the opposite of how this register field works: a cleared bit means that the /2 divider is used, and a set bit means that the divider is 1. Restore the correct behaviour using the newly introduced .div_table field. Signed-off-by: Paul Cercueil Signed-off-by: Stephen Boyd drivers/clk/ingenic/jz4725b-cgu.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 74054c413ae8c36a5529e7891c2450a747667753 Author: Paul Cercueil Date: Thu May 2 23:25:01 2019 +0200 clk: ingenic/jz4725b: Fix incorrect dividers for main clocks The main clocks (cclk, hclk, pclk, mclk, ipu) were using incorrect dividers, and thus reported an incorrect rate. Signed-off-by: Paul Cercueil Signed-off-by: Stephen Boyd drivers/clk/ingenic/jz4725b-cgu.c | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) commit 44b06a76ad330f327fe2366472a83d7d1d06d86e Author: Paul Cercueil Date: Thu May 2 23:25:00 2019 +0200 clk: ingenic/jz4770: Fix incorrect dividers for main clocks The main clocks (cclk, h0clk, h1clk, h2clk, c1clk, pclk) were using incorrect dividers, and thus reported an incorrect rate. Signed-off-by: Paul Cercueil Signed-off-by: Stephen Boyd drivers/clk/ingenic/jz4770-cgu.c | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) commit 2a1a703635a01a98d36cd5c8079dd49c1e006cf6 Author: Paul Cercueil Date: Thu May 2 23:24:59 2019 +0200 clk: ingenic/jz4740: Fix incorrect dividers for main clocks The main clocks (cclk, hclk, pclk, mclk, lcd) were using incorrect dividers, and thus reported an incorrect rate. Signed-off-by: Paul Cercueil Signed-off-by: Stephen Boyd drivers/clk/ingenic/jz4740-cgu.c | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) commit a9fa2893fcc64bd32cbc46bfb7aa09bde8175987 Author: Paul Cercueil Date: Thu May 2 23:24:58 2019 +0200 clk: ingenic: Add support for divider tables Some clocks provided on Ingenic SoCs have dividers, whose hardware value as written in the register cannot be expressed as an affine function to the actual divider value. For instance, for the CPU clock on the JZ4770, the dividers are coded as follows: ------------------ | Bits | Div | ------------------ | 0 0 0 | 1 | | 0 0 1 | 2 | | 0 1 0 | 3 | | 0 1 1 | 4 | | 1 0 0 | 6 | | 1 0 1 | 8 | | 1 1 0 | 12 | ------------------ To support this setup, we introduce a new field in the ingenic_cgu_div_info structure that allows to specify the divider table. Signed-off-by: Paul Cercueil Signed-off-by: Stephen Boyd drivers/clk/ingenic/cgu.c | 41 +++++++++++++++++++++++++++++++++++------ drivers/clk/ingenic/cgu.h | 3 +++ 2 files changed, 38 insertions(+), 6 deletions(-) commit 11e1bbc116a75d4a93122ea0a3b2be814922d864 Author: Dan Murphy Date: Wed Jun 5 07:56:34 2019 -0500 leds: lm36274: Introduce the TI LM36274 LED driver Introduce the LM36274 LED driver. This driver uses the ti-lmu MFD driver to probe this LED driver. The driver configures only the LED registers and enables the outputs according to the config file. The driver utilizes the TI LMU (Lighting Management Unit) LED common framework to set the brightness bits. Signed-off-by: Dan Murphy Acked-by: Pavel Machek Signed-off-by: Jacek Anaszewski drivers/leds/Kconfig | 8 +++ drivers/leds/Makefile | 1 + drivers/leds/leds-lm36274.c | 172 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 181 insertions(+) commit 04f4dc1bc5f0f64640026497f97e2f3c063f7831 Author: Dan Murphy Date: Wed Jun 5 07:56:33 2019 -0500 dt-bindings: leds: Add LED bindings for the LM36274 Add the LM36274 LED specific bindings. Signed-off-by: Dan Murphy Reviewed-by: Rob Herring Acked-by: Pavel Machek Signed-off-by: Jacek Anaszewski .../devicetree/bindings/leds/leds-lm36274.txt | 85 ++++++++++++++++++++++ 1 file changed, 85 insertions(+) commit 9bcb8940f4c0c58d2bec66e72e019ed58e602b95 Author: Gustavo A. R. Silva Date: Tue Jun 4 10:42:22 2019 -0500 RDMA/ucma: Use struct_size() helper Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Jason Gunthorpe drivers/infiniband/core/ucma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 4f18904c78495ec16e271ee507709c626e61a62a Author: Lijun Ou Date: Fri May 31 18:28:03 2019 +0800 RDMA/hns: Bugfix for filling the sge of srq When user post recv a srq with multiple sges, the hardware will get the last correct sge and count the sge numbers according to the specific identifier with lkey. For example, when the driver fills the sges with every wr less than the max sge that the user configured when creating srq, the hardware will stop getting the sge according to the specific lkey in the sge. However, it will always end with the first sge in the current post srq recv interface implementation. Fixes: c7bcb13442e1 ("RDMA/hns: Add SRQ support for hip08 kernel mode") Signed-off-by: Lijun Ou Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a6cdeeb16bff89c8486324f53577db058cbe81ba Merge: 96524ea4be04 1e1d92636954 Author: David S. Miller Date: Fri Jun 7 11:00:14 2019 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Some ISDN files that got removed in net-next had some changes done in mainline, take the removals. Signed-off-by: David S. Miller commit 78a89463a31ce463a4b968553f57ff9932a0697f Author: Lecopzer Chen Date: Thu May 9 18:31:16 2019 +0800 Documentation: {u,k}probes: add tracing_on before tracing After following the document step by step, the `cat trace` can't be worked without enabling tracing_on and might mislead newbies about the functionality. Signed-off-by: Lecopzer Chen Acked-by: Masami Hiramatsu Signed-off-by: Jonathan Corbet Documentation/trace/kprobetrace.rst | 6 ++++++ Documentation/trace/uprobetracer.rst | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) commit fa027328a1c93d72031e6cc6b4a7eee967fd7406 Author: Colin Ian King Date: Fri May 31 10:21:01 2019 +0100 RDMA/hns: fix inverted logic of readl read and shift A previous change incorrectly changed the inverted logic and logically negated the readl rather than the shifted readl result. Fix this by adding in missing parentheses around the expression that needs to be logically negated. Addresses-Coverity: ("Logically dead code") Fixes: 669cefb654cb ("RDMA/hns: Remove jiffies operation in disable interrupt context") Signed-off-by: Colin Ian King Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hns/hns_roce_hem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f81d086095f230b4e2821059ff72e80e78a669d1 Merge: a188339ca5a3 aad03a66f902 Author: Stephen Boyd Date: Fri Jun 7 10:56:05 2019 -0700 Merge tag 'clk-renesas-for-v5.3-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into clk-renesas Pull Renesas clk driver updates from Geert Uytterhoeven: - Add TPU (Timer Pulse Unit / PWM) clocks on R-Car H3, M3-W, and M3-N - Add CMM (Color Management Module) clocks on R-Car M3-W - Add Clock Domain support on RZ/N1 * tag 'clk-renesas-for-v5.3-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers: clk: renesas: r9a06g032: Add clock domain support dt-bindings: clock: renesas: r9a06g032-sysctrl: Document power Domains clk: renesas: mstp: Remove error messages on out-of-memory conditions clk: renesas: cpg-mssr: Remove error messages on out-of-memory conditions clk: renesas: cpg-mssr: Use genpd of_node instead of local copy clk: renesas: r8a7796: Add CMM clocks clk: renesas: r8a779{5|6|65}: Add TPU clock commit 462e5a521ab73f7762583add73cbab1662612beb Author: George G. Davis Date: Wed Jun 5 16:30:10 2019 -0400 treewide: trivial: fix s/poped/popped/ typo Fix a couple of s/poped/popped/ typos. Signed-off-by: George G. Davis Acked-by: Steven Rostedt (VMware) Acked-by: Masami Hiramatsu Signed-off-by: Jonathan Corbet Documentation/arm/mem_alignment | 2 +- arch/x86/kernel/kprobes/core.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 9d61944356590c40b13f6b1f99df84260e4db0c1 Author: Shiyang Ruan Date: Thu May 9 11:05:49 2019 +0800 Documentation: xfs: Fix typo In "Y+P" of this line, there are two non-ASCII characters(0xd9 0x8d) following behind the 'Y'. Shown as a small '=' under the '+' in VIM and a '賺' in webpage[1]. I think it's a mistake and remove these strange characters. [1]: https://www.kernel.org/doc/Documentation/filesystems/xfs-delayed-logging-design.txt Signed-off-by: Shiyang Ruan Signed-off-by: Jonathan Corbet Documentation/filesystems/xfs-delayed-logging-design.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bca29283dcc058739c41d2fd9110d8ebc3e0f5e8 Author: Ville Syrjälä Date: Wed Apr 10 20:09:41 2019 +0300 drm/i915/sdvo: Actually print the reason why the SDVO command failed It's much easier to figure out why the SDVO encoder refuses to cooperate if we can see what status we got back. v2: Zero initialize only the first character, not the whole buffer Signed-off-by: Ville Syrjälä Reviewed-by: Chris Wilson #v1 Link: https://patchwork.freedesktop.org/patch/msgid/20190410170941.28142-1-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_sdvo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 7f668346e70fcf1b7b56a9c31fba5070d210995b Author: Ville Syrjälä Date: Tue Apr 9 17:40:53 2019 +0300 drm/i915/sdvo: Don't write stack garbage into the hbuf Pass the length returned by hdmi_infoframe_pack_only() to intel_sdvo_write_infoframe() so that we don't end up writing stack garbage into the hbuf. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190409144054.24561-7-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_sdvo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 700bbf83eabd26f918a783f69ed2a85fcb28bf7f Author: Ville Syrjälä Date: Tue Apr 9 17:40:52 2019 +0300 drm/i915/sdvo: Don't unpack stack garbage Pass the length returned by intel_sdvo_read_infoframe() to hdmi_infoframe_unpack() so that we don't try to unpack any leftover stack garbage. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190409144054.24561-6-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_sdvo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b5716a4efe5cbaabcea2027656367ac5ba5addf9 Author: Ville Syrjälä Date: Wed Apr 10 20:08:35 2019 +0300 drm/i915/sdvo: Check that we have space for the infoframe Before we go writing the infoframe let's make sure we have the space for it. Not that it really matters since the write loop would just terminate early in that case. v2: Check after the debug print and ++ (Chris) Signed-off-by: Ville Syrjälä Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190410170835.18867-1-ville.syrjala@linux.intel.com Reviewed-by: Radhakrishna Sripada drivers/gpu/drm/i915/intel_sdvo.c | 3 +++ 1 file changed, 3 insertions(+) commit dd6090f8780a213dfcb6ba5718c4e1057d69cb0c Author: Ville Syrjälä Date: Tue Apr 9 17:40:50 2019 +0300 drm/i915: Rename SDVO_AUDIO_ENABLE to HDMI_AUDIO_ENABLE The "audio enable" bit on the SDVO/HDMI control register is only meant for HDMI. Audio is never delivered over the SDVO bus. Rename the define to reflect this fact. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190409144054.24561-4-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/i915_reg.h | 2 +- drivers/gpu/drm/i915/intel_hdmi.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) commit 3d9cf48b2ca257f1a249b347236098c3cf9d54f1 Author: Shiyang Ruan Date: Thu May 9 15:40:49 2019 +0800 Documentation: nvdimm: Fix typo Remove the extra 'we '. Signed-off-by: Shiyang Ruan Signed-off-by: Jonathan Corbet Documentation/nvdimm/nvdimm.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bed0918d64ca28169d55bd138ed20f09e288303e Author: Federico Vaga Date: Thu May 30 22:14:55 2019 +0200 doc:it_IT: documentation alignment Documentation alignment for the following changes: a700767a7682 (doc/docs-next) docs: requirements.txt: recommend Sphinx 1.7.9 Signed-off-by: Federico Vaga Signed-off-by: Jonathan Corbet Documentation/translations/it_IT/doc-guide/sphinx.rst | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit 165915c17d681c61962251728d72ecdabe95518e Author: Federico Vaga Date: Thu May 30 22:14:54 2019 +0200 doc:it_IT: fix file references Fix italian translation file references based on `scripts/documentation-file-ref-check` output. Signed-off-by: Federico Vaga Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet .../translations/it_IT/admin-guide/kernel-parameters.rst | 12 ++++++++++++ Documentation/translations/it_IT/process/adding-syscalls.rst | 2 +- Documentation/translations/it_IT/process/coding-style.rst | 2 +- Documentation/translations/it_IT/process/howto.rst | 2 +- Documentation/translations/it_IT/process/magic-number.rst | 2 +- .../translations/it_IT/process/stable-kernel-rules.rst | 4 ++-- 6 files changed, 18 insertions(+), 6 deletions(-) commit 54002b56b04bc83f8961c8751f6bfef07461d587 Author: Bjorn Helgaas Date: Thu May 30 16:59:14 2019 -0500 scripts/sphinx-pre-install: fix "dependenties" typo Fix typo ("dependenties" for "dependencies"). Signed-off-by: Bjorn Helgaas Signed-off-by: Jonathan Corbet scripts/sphinx-pre-install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dc49a56bd43bb04982e64b44436831da801d0237 Author: Ville Syrjälä Date: Tue Apr 9 17:40:49 2019 +0300 drm/i915/sdvo: Implement proper HDMI audio support for SDVO Our SDVO audio support is pretty bogus. We can't push audio over the SDVO bus, so trying to enable audio in the SDVO control register doesn't do anything. In fact it looks like the SDVO encoder will always mix in the audio coming over HDA, and there's no (at least documented) way to disable that from our side. So HDMI audio does work currently on gen4 but only by luck really. On gen3 it got broken by the referenced commit. And what has always been missing on every platform is the ELD. To pass the ELD to the audio driver we need to write it to magic buffer in the SDVO encoder hardware which then gets pulled out via HDA in the other end. Ie. pretty much the same thing we had for native HDMI before we started to just pass the ELD between the drivers. This sort of explains why we even have that silly hardware buffer with native HDMI. $ cat /proc/asound/card0/eld#1.0 -monitor_present 0 -eld_valid 0 +monitor_present 1 +eld_valid 1 +monitor_name LG TV +connection_type HDMI +... This also fixes our state readout since we can now query the SDVO encoder about the state of the "ELD valid" and "presence detect" bits. As mentioned those don't actually control whether audio gets sent over the HDMI cable, but it's the best we can do. And with the state checker appeased we can re-enable HDMI audio for gen3. Cc: stable@vger.kernel.org Cc: Daniel Vetter Cc: zardam@gmail.com Tested-by: zardam@gmail.com Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108976 Fixes: de44e256b92c ("drm/i915/sdvo: Shut up state checker with hdmi cards on gen3") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190409144054.24561-3-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak drivers/gpu/drm/i915/intel_sdvo.c | 58 +++++++++++++++++++++++++++------- drivers/gpu/drm/i915/intel_sdvo_regs.h | 3 ++ 2 files changed, 50 insertions(+), 11 deletions(-) commit 889aa9ca930602a0e860cfb89e467c2a7a729b1b Author: Luca Ceresoli Date: Fri May 31 16:30:16 2019 +0200 docs: clk: fix struct syntax The clk_foo_ops struct example has syntax errors. Fix it so it can be copy-pasted and used more easily. Signed-off-by: Luca Ceresoli Signed-off-by: Jonathan Corbet Documentation/driver-api/clk.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit cc54d5e8d816d374360b5e8911edacd955040c63 Author: Ville Syrjälä Date: Tue Apr 9 17:40:48 2019 +0300 drm/i915/sdvo: Fix AVI infoframe TX rate readout The AVI infoframe readout code currently issues a SDVO_CMD_GET_HBUF_TXRATE before SDVO_CMD_SET_HBUF_INDEX, which is not the correct order for these two operations. So far this wasn't a problem since we left the index pointing at the AVI infoframe buffer at the end of the modeset. However once we start to write to other buffers (namely ELD) that is no longer going to be true. Fix up the order so that we always read out the TX rate for the correct buffer. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190409144054.24561-2-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_sdvo.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit b1663d7e3a7961fc45262fd68a89253f2803036c Author: Mauro Carvalho Chehab Date: Tue Jun 4 09:26:27 2019 -0300 docs: Kbuild/Makefile: allow check for missing docs at build time While this doesn't make sense for production Kernels, in order to avoid regressions when documents are touched, let's add a check target at the make file. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/Kconfig | 13 +++++++++++++ Documentation/Makefile | 5 +++++ Kconfig | 2 ++ scripts/documentation-file-ref-check | 9 +++++++++ 4 files changed, 29 insertions(+) commit 3f9564e680efb2092dfb826e2f768920c9eb203b Author: Geert Uytterhoeven Date: Fri Jun 7 13:29:51 2019 +0200 KVM: arm/arm64: Always capitalize ITS All but one reference is capitalized. Fix the remaining one. Signed-off-by: Geert Uytterhoeven Signed-off-by: Jonathan Corbet Documentation/virtual/kvm/devices/arm-vgic-its.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6fb44c439eda692f94cf60aad55f130a34204ece Author: Geert Uytterhoeven Date: Fri Jun 7 13:08:42 2019 +0200 Documentation: net: dsa: Grammar s/the its/its/ Signed-off-by: Geert Uytterhoeven Reviewed-by: Andrew Lunn Signed-off-by: Jonathan Corbet Documentation/networking/dsa/dsa.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e47cf0c958775700c74223a1f21a8b3457c57069 Author: Geert Uytterhoeven Date: Fri Jun 7 13:07:29 2019 +0200 Documentation: tee: Grammar s/the its/its/ Signed-off-by: Geert Uytterhoeven Signed-off-by: Jonathan Corbet Documentation/tee.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e0cef9ff6315d48a4dfd39da09ca770e242f9cb5 Author: Aurelien Thierry Date: Fri Jun 7 10:07:02 2019 +0200 Documentation: fix typo CLOCK_MONONOTNIC_COARSE Fix typo in documentation file timekeeping.rst: CLOCK_MONONOTNIC_COARSE should be CLOCK_MONOTONIC_COARSE. Signed-off-by: Aurelien Thierry Signed-off-by: Jonathan Corbet Documentation/core-api/timekeeping.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4241d516b0041ae55092fb12739e12184427de5d Author: Helen Koike Date: Tue Jun 4 15:27:19 2019 -0300 Documentation/dm-init: fix multi device example The example in the docs regarding multiple device-mappers is invalid (it has a wrong number of arguments), it's a left over from previous versions of the patch. Replace the example with an valid and tested one. Signed-off-by: Helen Koike Reviewed-by: Stephen Boyd Signed-off-by: Jonathan Corbet Documentation/device-mapper/dm-init.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 99d2b938672944831035bef50c68a6e948e93abf Author: Yoshihiro Shimoda Date: Fri Jun 7 16:47:13 2019 +0900 Documentation: DMA-API: fix a function name of max_mapping_size The exported function name is dma_max_mapping_size(), not dma_direct_max_mapping_size() so that this patch fixes the function name in the documentation. Fixes: 133d624b1cee ("dma: Introduce dma_max_mapping_size()") Signed-off-by: Yoshihiro Shimoda Signed-off-by: Jonathan Corbet Documentation/DMA-API.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bcef5b7215681250c4bf8961dfe15e9e4fef97d0 Author: Bart Van Assche Date: Wed May 29 09:38:31 2019 -0700 RDMA/srp: Accept again source addresses that do not have a port number The function srp_parse_in() is used both for parsing source address specifications and for target address specifications. Target addresses must have a port number. Having to specify a port number for source addresses is inconvenient. Make sure that srp_parse_in() supports again parsing addresses with no port number. Cc: Fixes: c62adb7def71 ("IB/srp: Fix IPv6 address parsing") Signed-off-by: Bart Van Assche Signed-off-by: Jason Gunthorpe drivers/infiniband/ulp/srp/ib_srp.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) commit 633fbb06cbb34cb37117a298c4316ad9d54a7a63 Author: Kamal Heib Date: Wed May 29 16:55:45 2019 +0300 RDMA/ipoib: implement ethtool .get_link() callback Add support for reporting link state for ipoib net devices. $ ip l set dev mlx4_ib0 up $ ethtool mlx4_ib0 | grep Link Link detected: yes $ ip l set dev mlx4_ib0 down $ ethtool mlx4_ib0 | grep Link Link detected: no Signed-off-by: Kamal Heib Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/ulp/ipoib/ipoib_ethtool.c | 1 + 1 file changed, 1 insertion(+) commit 0779935938b1b6f492f019764bc7dda77bb08ec9 Author: Sylwester Nawrocki Date: Fri Jun 7 17:49:26 2019 +0200 ASoC: Remove erroneous soc_cleanup_card_resources() call When soc_init_dai_link() call at the beginning of snd_soc_instantiate_card function fails soc_cleanup_card_resources() and then snd_soc_dapm_free() gets called with an incompletely initialized card->dapm. In particular card->dapm.card is NULL and it gets dereferenced in dapm_free_widgets(). Also dapm->list is invalid and there is an invalid pointer dereference from list_del(). The function call stack (deferred probing) on Chromebook Snow where this issue has shown up in today's -next is: snd_soc_dapm_free soc_cleanup_card_resources snd_soc_instantiate_card snd_soc_register_card devm_snd_soc_register_card snow_probe In patch 70fc53734e71 "ASoC: core: move DAI pre-links initiation to snd_soc_instantiate_card" there is an soc_cleanup_platform() call instead of soc_cleanup_card_resources() as in current -next. soc_cleanup_platform got renamed to soc_cleanup_legacy, then removed in commit adb76b5b9c47 "ASoC: soc-core: remove legacy style dai_link". It seems in merge conflict resolution the soc_cleanup_platform() call got renamed to soc_cleanup_card_resources(), instead of being removed. Correct this by removing an unnecessary soc_cleanup_card_resources() call. Fixes: a8e992342ce4 ("Merge branch 'asoc-5.2' into asoc-5.3") Reported-by: Marek Szyprowski Suggested-by: Tzung-Bi Shih Signed-off-by: Sylwester Nawrocki Signed-off-by: Mark Brown sound/soc/soc-core.c | 1 - 1 file changed, 1 deletion(-) commit d99004d7201aa653658ff2390d6e516567c96ebc Author: Daniel Vetter Date: Thu Jun 6 23:15:44 2019 +0200 drm/crc-debugfs: Also sprinkle irqrestore over early exits I. was. blind. Caught with vkms, which has some really slow crc computation function. Fixes: 1882018a70e0 ("drm/crc-debugfs: User irqsafe spinlock in drm_crtc_add_crc_entry") Cc: Rodrigo Siqueira Cc: Tomeu Vizoso Cc: Emil Velikov Cc: Benjamin Gaignard Cc: Ville Syrjälä Reviewed-by: Emil Velikov Reviewed-by: Benjamin Gaignard Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190606211544.5389-1-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_debugfs_crc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6d7c3cde93c1d9ac0b37f78ec3f2ff052159a242 Author: Jason Gunthorpe Date: Wed May 22 16:52:52 2019 -0300 mm/hmm: fix use after free with struct hmm in the mmu notifiers mmu_notifier_unregister_no_release() is not a fence and the mmu_notifier system will continue to reference hmm->mn until the srcu grace period expires. Resulting in use after free races like this: CPU0 CPU1 __mmu_notifier_invalidate_range_start() srcu_read_lock hlist_for_each () // mn == hmm->mn hmm_mirror_unregister() hmm_put() hmm_free() mmu_notifier_unregister_no_release() hlist_del_init_rcu(hmm-mn->list) mn->ops->invalidate_range_start(mn, range); mm_get_hmm() mm->hmm = NULL; kfree(hmm) mutex_lock(&hmm->lock); Use SRCU to kfree the hmm memory so that the notifiers can rely on hmm existing. Get the now-safe hmm struct through container_of and directly check kref_get_unless_zero to lock it against free. Signed-off-by: Jason Gunthorpe Reviewed-by: Ira Weiny Reviewed-by: John Hubbard Reviewed-by: Ralph Campbell Reviewed-by: Christoph Hellwig Tested-by: Philip Yang include/linux/hmm.h | 1 + mm/hmm.c | 23 +++++++++++++++++------ 2 files changed, 18 insertions(+), 6 deletions(-) commit 38f300410f3e15b6fec76c8d8baed7111b5ea4e4 Author: Ville Syrjälä Date: Mon Jun 3 17:25:00 2019 +0300 drm/i915: Fix per-pixel alpha with CCS We forgot to set .has_alpha=true for the A+CCS formats when the code started to consult .has_alpha. This manifests as A+CCS being treated as X+CCS which means no per-pixel alpha blending. Fix the format list appropriately. Cc: stable@vger.kernel.org Cc: Maarten Lankhorst Cc: Matt Roper Cc: Heinrich Fink Reported-by: Heinrich Fink Tested-by: Heinrich Fink Fixes: b20815255693 ("drm/i915: Add plane alpha blending support, v2.") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190603142500.25680-1-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_display.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 0502a1af95a1a5611493052da1a56403b3a5f6fe Author: Ville Syrjälä Date: Tue Jun 4 17:02:14 2019 +0300 drm/i915: Drop pointless WARN_ON intel_dp_link_down() is static and it's only called from the pre-ddi DP functions, so having a WARN_ON(HAS_DDI) in there is quite pointless. Remove it. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190604140214.9947-2-ville.syrjala@linux.intel.com Reviewed-by: Manasi Navare drivers/gpu/drm/i915/intel_dp.c | 3 --- 1 file changed, 3 deletions(-) commit 97068c1b905d6f3d901b0afc8360e98a5dbea2fb Author: Ville Syrjälä Date: Tue Jun 4 17:02:13 2019 +0300 drm/i915: Move intel_dp->prepare_link_train assignment into ddi code It's a bit silly to go through intel_dp.c to assign the prepare_link_train vfunc for ddi platforms when we can just assign it directly from intel_ddi.c. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190604140214.9947-1-ville.syrjala@linux.intel.com Reviewed-by: Manasi Navare drivers/gpu/drm/i915/intel_ddi.c | 5 ++++- drivers/gpu/drm/i915/intel_ddi.h | 1 - drivers/gpu/drm/i915/intel_dp.c | 4 ---- 3 files changed, 4 insertions(+), 6 deletions(-) commit 4745224b45097d333358bce298aea2137246183c Author: Anshuman Khandual Date: Fri Jun 7 14:43:06 2019 +0530 arm64/mm: Refactor __do_page_fault() __do_page_fault() is over complicated with multiple goto statements. This cleans up the code flow and while there drops local variable vm_fault_t. Reviewed-by: Mark Rutland Signed-off-by: Anshuman Khandual Cc: Will Deacon Cc: James Morse Cc: Andrey Konovalov Cc: Christoph Hellwig Signed-off-by: Catalin Marinas arch/arm64/mm/fault.c | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) commit c49bd02f4c7412f0182252ae2ef6e916ca4ff359 Author: Anshuman Khandual Date: Fri Jun 7 14:43:05 2019 +0530 arm64/mm: Document write abort detection from ESR This patch adds an is_write_abort() wrapper and documents the detection of the abort type on cache maintenance operations. Cc: Will Deacon Cc: James Morse Cc: Andrey Konovalov Acked-by: Mark Rutland Signed-off-by: Anshuman Khandual [catalin.marinas@arm.com: only keep the is_write_abort() wrapper] Signed-off-by: Catalin Marinas arch/arm64/mm/fault.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 382d8dfe8b1b4eb3b3f9f830ef52b58780290d32 Author: Colin Ian King Date: Mon Jun 3 15:21:02 2019 +0100 drm/bridge: sii902x: fix comparision of u32 with less than zero The less than check for the variable num_lanes is always going to be false because the variable is a u32. Fix this by making num_lanes an int and also make loop index i an int too. Addresses-Coverity: ("Unsigned compared against 0") Fixes: ff5781634c41 ("drm/bridge: sii902x: Implement HDMI audio support") Signed-off-by: Colin Ian King Acked-by: Jyri Sarha Reviewed-by: Andrzej Hajda Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190603142102.27191-1-colin.king@canonical.com drivers/gpu/drm/bridge/sii902x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 955f03a7d0738bd373d69f76191b9a66adb3255c Author: Dan Carpenter Date: Fri Jun 7 10:27:04 2019 +0300 drm/bridge: sii902x: re-order conditions to prevent out of bounds read This should check that "i" is within bounds before checking reading from the array. Fixes: ff5781634c41 ("drm/bridge: sii902x: Implement HDMI audio support") Signed-off-by: Dan Carpenter Reviewed-by: Andrzej Hajda Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190607072704.GA25229@mwanda drivers/gpu/drm/bridge/sii902x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 35ab6cfbf21178d4dd93d1fe4cb1416c1d6b566d Author: Yannick Fertré Date: Mon Jun 3 10:32:02 2019 +0200 drm/stm: support runtime power management This patch enables runtime power management (runtime PM) support for the display controller. pm_runtime_enable() and pm_runtime_disable() are added during ltdc load and unload respectively. pm_runtime_get_sync() and pm_runtime_put_sync() are added for ltdc register access. Signed-off-by: Yannick Fertré Acked-by: Philippe Cornu Signed-off-by: Benjamin Gaignard Link: https://patchwork.freedesktop.org/patch/msgid/1559550722-14091-1-git-send-email-yannick.fertre@st.com drivers/gpu/drm/stm/drv.c | 43 +++++++++++++++++++++++------ drivers/gpu/drm/stm/ltdc.c | 67 +++++++++++++++++++++++++++++++++++----------- 2 files changed, 86 insertions(+), 24 deletions(-) commit 630bec0c16ee0a003d5f1f55f228b7a495c1d938 Author: Yannick Fertré Date: Mon Jun 3 10:31:34 2019 +0200 drm/stm: ltdc: No message if probe Print display controller hardware version in debug mode only. Signed-off-by: Yannick Fertré Acked-by: Philippe Cornu Signed-off-by: Benjamin Gaignard Link: https://patchwork.freedesktop.org/patch/msgid/1559550694-14042-1-git-send-email-yannick.fertre@st.com drivers/gpu/drm/stm/ltdc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0f5a5712ad1e3b8472b1c1459681dadad9277067 Author: Bartlomiej Zolnierkiewicz Date: Fri Jun 7 14:38:07 2019 +0200 video: fbdev: pvr2fb: add COMPILE_TEST support Add COMPILE_TEST support to pvr2fb driver for better compile testing coverage. While at it: - mark pvr2fb_interrupt() and pvr2fb_common_init() with __maybe_unused tag (to silence build warnings when !SH_DREAMCAST) - convert mmio_base in struct pvr2fb_par to 'void __iomem *' from 'unsigned long' (needed to silence build warnings on ARM). - split pvr2_get_param() on pvr2_get_param_name() and pvr2_get_param_val() (needed to silence build warnings on x86). Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/Kconfig | 3 ++- drivers/video/fbdev/pvr2fb.c | 61 ++++++++++++++++++++++++-------------------- 2 files changed, 36 insertions(+), 28 deletions(-) commit db7f2cb965cb792752236673b72990a429d1e0fd Author: Bartlomiej Zolnierkiewicz Date: Fri Jun 7 14:38:07 2019 +0200 video: fbdev: pvr2fb: remove function prototypes Reorder code a bit and then remove no longer needed function prototypes. Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/pvr2fb.c | 141 +++++++++++++++++++------------------------ 1 file changed, 61 insertions(+), 80 deletions(-) commit 66019bc26d2bc9a549a71ec0b4e51f24f5db2fcf Author: Bartlomiej Zolnierkiewicz Date: Fri Jun 7 14:38:07 2019 +0200 video: fbdev: cyber2000fb: remove superfluous CONFIG_PCI ifdef This is a PCI driver and FB_CYBER2000 depends on PCI in Kconfig so there is no need to check for PCI inside the driver code. Cc: Russell King Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/cyber2000fb.c | 5 ----- 1 file changed, 5 deletions(-) commit 767ceabc6cc6c9deec436bdeb1d16569c85afa2f Author: Bartlomiej Zolnierkiewicz Date: Fri Jun 7 14:38:07 2019 +0200 video: fbdev: da8xx-fb: add COMPILE_TEST support Add COMPILE_TEST support to da8xx-fb driver for better compile testing coverage. Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 552ccf6b259d290c0c8a149de8c114a818aa7edc Author: Bartlomiej Zolnierkiewicz Date: Fri Jun 7 14:38:07 2019 +0200 video: fbdev: gbefb: add COMPILE_TEST support Add COMPILE_TEST support to gbefb driver for better compile testing coverage. While at it convert bogus udelay() calls to mdelay() (needed to build driver on ARM) and remove dead x86 specific code. Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/Kconfig | 3 ++- drivers/video/fbdev/gbefb.c | 19 +++++++------------ 2 files changed, 9 insertions(+), 13 deletions(-) commit f0bab2e3f67507e5ed2458cb842ddedd1b39ab0a Author: Bartlomiej Zolnierkiewicz Date: Fri Jun 7 14:38:06 2019 +0200 video: fbdev: pxa168fb: add COMPILE_TEST support Add COMPILE_TEST support to pxa168fb driver for better compile testing coverage. Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b90b279e87a3cbc55b6976554dc432afdf670124 Author: Bartlomiej Zolnierkiewicz Date: Fri Jun 7 14:38:06 2019 +0200 video: fbdev: imxfb: add COMPILE_TEST support Add COMPILE_TEST support to imxfb driver for better compile testing coverage. Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: Uwe Kleine-König Cc: NXP Linux Team Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 59c1ad914ef2d3470f74c626ece9521dbc9645a3 Author: Bartlomiej Zolnierkiewicz Date: Fri Jun 7 14:38:06 2019 +0200 video: fbdev: atmel_lcdfb: add COMPILE_TEST support Add COMPILE_TEST support to atmel_lcdfb driver for better compile testing coverage. While at it fix improper use of UL (to silence build warnings on x86_64). Cc: Ludovic Desroches Acked-by: Alexandre Belloni Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/Kconfig | 3 ++- drivers/video/fbdev/atmel_lcdfb.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) commit 7e801d63fd3af98f1d86de6aeb8da72cb61661d8 Author: Bartlomiej Zolnierkiewicz Date: Fri Jun 7 14:38:06 2019 +0200 video: fbdev: atafb: remove superfluous function prototypes No need for them. Reviewed-by: Geert Uytterhoeven Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/atafb.c | 21 --------------------- 1 file changed, 21 deletions(-) commit e0b29902483b02cb17af723db2941f7c7e5b4d78 Author: Christoph Hellwig Date: Fri Jun 7 14:38:06 2019 +0200 au1200fb: fix DMA API abuse Virtual addresses return from dma(m)_alloc_attrs are opaque in what backs then, and drivers must not poke into them. Similarly caching modes are not supposed to be directly set by the driver. Switch the driver to use the generic DMA API mmap helper to avoid these problems. Signed-off-by: Christoph Hellwig Tested-by: Manuel Lauss Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/au1200fb.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) commit f225f1393f034e17281274180626086276da766c Author: Fabio Estevam Date: Fri Jun 7 14:38:06 2019 +0200 video: fbdev: mxsfb: Remove driver There is a DRM version of the mxsfb driver for quite some time at drivers/gpu/drm/mxsfb/, so there is no need to keep maintaining the fbdev version any longer. Remove the fbdev mxsfb driver in favour of the DRM version. Signed-off-by: Fabio Estevam Cc: Shawn Guo Cc: Pengutronix Kernel Team Cc: NXP Linux Team Acked-by: Marek Vasut Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/Kconfig | 13 +- drivers/video/fbdev/Makefile | 1 - drivers/video/fbdev/mxsfb.c | 1036 ------------------------------------------ 3 files changed, 1 insertion(+), 1049 deletions(-) commit 25a7d03dae3ac8dcc3fa00cc0ec17935eb08260d Author: Geert Uytterhoeven Date: Fri Jun 7 13:26:40 2019 +0200 regulator: cpcap: Spelling s/configuraion/configuration/ Signed-off-by: Geert Uytterhoeven Signed-off-by: Mark Brown drivers/regulator/cpcap-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6445500b43129baac36c56d629cf1dd9e1104167 Author: Vitor Soares Date: Thu Jun 6 17:12:02 2019 +0200 regmap: add i3c bus support Add basic support for i3c bus. This is a simple implementation that only give support for SDR Read and Write commands. Signed-off-by: Vitor Soares Signed-off-by: Mark Brown drivers/base/regmap/Kconfig | 6 +++- drivers/base/regmap/Makefile | 1 + drivers/base/regmap/regmap-i3c.c | 60 ++++++++++++++++++++++++++++++++++++++++ include/linux/regmap.h | 20 ++++++++++++++ 4 files changed, 86 insertions(+), 1 deletion(-) commit 59ab3f4060fc90e4196c6ea4813a8b7512bf200b Author: Dmitry Osipenko Date: Wed Jun 5 15:26:13 2019 +0300 rtc: tegra: Drop MODULE_ALIAS RTC driver was converted to OF driver long time ago. The MODULE_ALIAS macro has no effect for the OF drivers since the alias is overridden by the drivers core to follow the OF naming convention of the driver's alias, which is based on the device-tree matching name. $ cat /sys/devices/soc0/7000e000.rtc/modalias of:NrtcT(null)Cnvidia,tegra20-rtc Signed-off-by: Dmitry Osipenko Acked-by: Thierry Reding Signed-off-by: Alexandre Belloni drivers/rtc/rtc-tegra.c | 1 - 1 file changed, 1 deletion(-) commit ef8a4757a6dbb2d406d7ba3a10a513f16f49ed2d Author: Srinivas Kandagatla Date: Thu Jun 6 13:42:42 2019 +0100 ASoC: msm8916-wcd-digital: Add sidetone support This patch adds sidetone support via one of the 3 RX Mix paths using IIR1 and IIR2. IIR1 can be feed by any Decimators or RX paths, and IIRx can also be looped back to RX mixers to provide sidetone functionality. Two IIR filters are used for Side tone equalization and each filter is 5 stage. Signed-off-by: Srinivas Kandagatla Signed-off-by: Mark Brown sound/soc/codecs/msm8916-wcd-digital.c | 282 +++++++++++++++++++++++++++++++++ 1 file changed, 282 insertions(+) commit f6e903db89bce04426e9ec6bc9c3d5e0cce382b9 Author: Tvrtko Ursulin Date: Fri Jun 7 09:45:21 2019 +0100 drm/i915: Tidy intel_execlists_submission_init Get to uncore from the engine for better logic organization and use already available i915 everywhere. Signed-off-by: Tvrtko Ursulin Suggested-by: Rodrigo Vivi Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190607084521.16845-2-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/gt/intel_lrc.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit dbc651836372a7b3aaebe2f924db872c5d0804df Author: Tvrtko Ursulin Date: Fri Jun 7 09:45:20 2019 +0100 drm/i915: Convert some more bits to use engine mmio accessors Remove a couple dev_priv locals as a consequence. Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190607084521.16845-1-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/gt/intel_lrc.c | 27 +++++++++++++-------------- drivers/gpu/drm/i915/i915_gem_gtt.c | 5 +++-- drivers/gpu/drm/i915/i915_gpu_error.c | 2 +- drivers/gpu/drm/i915/i915_reg.h | 2 +- drivers/gpu/drm/i915/intel_guc_submission.c | 4 ++-- 5 files changed, 20 insertions(+), 20 deletions(-) commit bcc726bea2cd9a3f222736a038e6b1a952bcb426 Author: Tvrtko Ursulin Date: Fri Jun 7 09:25:57 2019 +0100 drm/i915: Unexport i915_gem_init/fini_aliasing_ppgtt These two are only used from within i915_gem_gtt.c and can trivially be made static. Signed-off-by: Tvrtko Ursulin Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20190607082557.31670-5-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/i915_gem_gtt.c | 8 ++++---- drivers/gpu/drm/i915/i915_gem_gtt.h | 3 --- 2 files changed, 4 insertions(+), 7 deletions(-) commit f736ae1b10319b087bc10c59b3a2eecec56db533 Author: Tvrtko Ursulin Date: Fri Jun 7 09:25:56 2019 +0100 drm/i915: Extract engine fault reset to a helper Just tidying the flow a bit. Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190607082557.31670-4-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/gt/intel_reset.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 77a302e04312118067ae790b6fc7e51eff403d86 Author: Tvrtko Ursulin Date: Fri Jun 7 11:15:35 2019 +0100 drm/i915: Make Gen6/7 RING_FAULT_REG access engine centric Similar to earlier conversions, eliminate the implicit dev_priv by introducing some helpers which take the engine parameter (since the register itself is per engine). v2: * Always use parentheses in macro arguments. Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190607101535.767-1-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/gt/intel_engine.h | 18 ++++++++++++++++++ drivers/gpu/drm/i915/gt/intel_reset.c | 6 ++---- drivers/gpu/drm/i915/i915_gem_gtt.c | 2 +- drivers/gpu/drm/i915/i915_gpu_error.c | 2 +- 4 files changed, 22 insertions(+), 6 deletions(-) commit 7c53c48d01a3401724ae1d58c6e707562f5437b1 Author: Tvrtko Ursulin Date: Fri Jun 7 09:25:54 2019 +0100 drm/i915: Tidy engine mask types in hangcheck We can use intel_engine_mask_t to align with the rest of the codebase. Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190607082557.31670-2-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/gt/intel_hangcheck.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b61ea001b2df056ca2088ee8c3bf5c9fd01593c4 Author: Tvrtko Ursulin Date: Fri Jun 7 09:25:53 2019 +0100 drm/i915: Reset only affected engines when handling error capture Pass down the engine mask to i915_clear_error_registers so only affected engines can be reset on the Gen6/7 path. Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190607082557.31670-1-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/gt/intel_reset.c | 7 ++++--- drivers/gpu/drm/i915/gt/intel_reset.h | 3 ++- drivers/gpu/drm/i915/i915_gem_gtt.c | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) commit fb6dda8349ea0a6a68a743b6cb636261f4489983 Author: Long Cheng Date: Sat Apr 27 11:36:32 2019 +0800 dt-bindings: dma: uart: rename binding The filename matches mtk-uart-apdma.c. So using "mtk-uart-apdma.txt" should be better. And add some property. Signed-off-by: Long Cheng Reviewed-by: Rob Herring Signed-off-by: Vinod Koul .../devicetree/bindings/dma/8250_mtk_dma.txt | 33 ------------- .../devicetree/bindings/dma/mtk-uart-apdma.txt | 54 ++++++++++++++++++++++ 2 files changed, 54 insertions(+), 33 deletions(-) commit 9135408c3ace4f7201407b1ef79079c30340743e Author: Long Cheng Date: Sat Apr 27 11:36:30 2019 +0800 dmaengine: mediatek: Add MediaTek UART APDMA support Add 8250 UART APDMA to support MediaTek UART. If MediaTek UART is enabled by SERIAL_8250_MT6577, and we can enable this driver to offload the UART device moving bytes. Signed-off-by: Long Cheng Signed-off-by: Sean Wang Signed-off-by: Vinod Koul drivers/dma/mediatek/Kconfig | 11 + drivers/dma/mediatek/Makefile | 1 + drivers/dma/mediatek/mtk-uart-apdma.c | 666 ++++++++++++++++++++++++++++++++++ 3 files changed, 678 insertions(+) commit 8e01076afd97521d992e13fb89fb59a6e48fbeec Author: Odin Ugedal Date: Fri Jun 7 01:49:10 2019 +0200 arm64: Fix comment after #endif The config value used in the if was changed in b433dce056d3814dc4b33e5a8a533d6401ffcfb0, but the comment on the corresponding end was not changed. Signed-off-by: Odin Ugedal Signed-off-by: Catalin Marinas arch/arm64/mm/mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3f1f22d8009035a641a359a09239bcc6ffac7bb9 Author: Tero Kristo Date: Tue May 28 16:10:23 2019 +0300 clk: keystone: sci-clk: extend clock IDs to 32 bits Currently, the clock identifiers are limited to 255. To support future SoCs, this muse be extended to 32 bits, which should provide way more than enough space. Basic support for extending the clock API is going to be implemented in the firmware driver, but there are some minor changes that need to be done on the clock driver side first. Acked-by: Santosh Shilimkar Signed-off-by: Tero Kristo drivers/clk/keystone/sci-clk.c | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) commit 8e48b33f9def0cef429c102c5b4b2dad8ef1d684 Author: Tero Kristo Date: Tue May 28 16:10:22 2019 +0300 clk: keystone: sci-clk: probe clocks from DT instead of firmware Probing all the available clocks from the PM firmware takes quite a lot of time, increasing boot time. Instead, implement functionality that parses only the used clocks from DT, and registers these to clock core. This way, the boot time is greatly improved. Additionally, provide a Kconfig option for parsing all the clocks from firmware, if someone requires this. It is mostly useful as a debugging functionality if we want to inspect the whole clock tree. Acked-by: Santosh Shilimkar Signed-off-by: Tero Kristo drivers/clk/keystone/Kconfig | 11 ++++ drivers/clk/keystone/sci-clk.c | 130 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 141 insertions(+) commit 4bfce5aba9023c56cf9fb3882d7055c07979e971 Author: Tero Kristo Date: Tue May 28 16:10:21 2019 +0300 clk: keystone: sci-clk: split out the fw clock parsing to own function This makes it both easier to see what the probe does, and also makes it possible to add alternative implementations for the clock data source. Acked-by: Santosh Shilimkar Signed-off-by: Tero Kristo drivers/clk/keystone/sci-clk.c | 68 +++++++++++++++++++++++++----------------- 1 file changed, 41 insertions(+), 27 deletions(-) commit 96488c09b0f4315acdf6ec41873ada28289dcba5 Author: Tero Kristo Date: Tue May 28 16:10:20 2019 +0300 clk: keystone: sci-clk: cut down the clock name length There is no need to store the full node name to the individual clocks, as this will just consome memory and make the clock debug entries unnecessary long. Just shorten this to "clk" for now. Acked-by: Santosh Shilimkar Signed-off-by: Tero Kristo drivers/clk/keystone/sci-clk.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 8d1b73dd25ff92c3fa9807a20c22fa2b44c07336 Author: Gustavo A. R. Silva Date: Thu Jun 6 13:18:53 2019 -0500 kernel: module: Use struct_size() helper One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct module_sect_attrs { ... struct module_sect_attr attrs[0]; }; Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. So, replace the following form: sizeof(*sect_attrs) + nloaded * sizeof(sect_attrs->attrs[0] with: struct_size(sect_attrs, attrs, nloaded) This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Jessica Yu kernel/module.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit bc7b488b1d1c71dc4c5182206911127bc6c410d6 Author: Lucas De Marchi Date: Wed Jun 5 16:55:35 2019 -0700 drm/i915/dmc: protect against reading random memory While loading the DMC firmware we were double checking the headers made sense, but in no place we checked that we were actually reading memory we were supposed to. This could be wrong in case the firmware file is truncated or malformed. Before this patch: # ls -l /lib/firmware/i915/icl_dmc_ver1_07.bin -rw-r--r-- 1 root root 25716 Feb 1 12:26 icl_dmc_ver1_07.bin # truncate -s 25700 /lib/firmware/i915/icl_dmc_ver1_07.bin # modprobe i915 # dmesg| grep -i dmc [drm:intel_csr_ucode_init [i915]] Loading i915/icl_dmc_ver1_07.bin [drm] Finished loading DMC firmware i915/icl_dmc_ver1_07.bin (v1.7) i.e. it loads random data. Now it fails like below: [drm:intel_csr_ucode_init [i915]] Loading i915/icl_dmc_ver1_07.bin [drm:csr_load_work_fn [i915]] *ERROR* Truncated DMC firmware, rejecting. i915 0000:00:02.0: Failed to load DMC firmware i915/icl_dmc_ver1_07.bin. Disabling runtime power management. i915 0000:00:02.0: DMC firmware homepage: https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/i915 Before reading any part of the firmware file, validate the input first. Fixes: eb805623d8b1 ("drm/i915/skl: Add support to load SKL CSR firmware.") Cc: stable@vger.kernel.org Signed-off-by: Lucas De Marchi Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20190605235535.17791-1-lucas.demarchi@intel.com drivers/gpu/drm/i915/intel_csr.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 5ffff4415f9eeae834960226770963e2947e17eb Author: Neil Armstrong Date: Mon Apr 29 09:52:38 2019 +0200 drm/meson: Add support for XBGR8888 & ABGR8888 formats Add missing XBGR8888 & ABGR8888 formats variants from the primary plane. Fixes: bbbe775ec5b5 ("drm: Add support for Amlogic Meson Graphic Controller") Signed-off-by: Neil Armstrong Reviewed-by: Kevin Hilman Link: https://patchwork.freedesktop.org/patch/msgid/20190429075238.7884-1-narmstrong@baylibre.com drivers/gpu/drm/meson/meson_plane.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit fd311d880c76dec61fdc6f4b1f3b6653bb189029 Author: Neil Armstrong Date: Mon Apr 29 09:52:47 2019 +0200 drm/meson: Add zpos immutable property to planes Add immutable zpos property to primary and overlay planes to specify the current fixed zpos position. Fixes: f9a2348196d1 ("drm/meson: Support Overlay plane for video rendering") Signed-off-by: Neil Armstrong Reviewed-by: Kevin Hilman Link: https://patchwork.freedesktop.org/patch/msgid/20190429075247.7946-1-narmstrong@baylibre.com drivers/gpu/drm/meson/meson_overlay.c | 3 +++ drivers/gpu/drm/meson/meson_plane.c | 3 +++ 2 files changed, 6 insertions(+) commit 04310324c6f482921c071444833e70fe861b73d9 Author: Julian Wiedmann Date: Mon Jun 3 07:47:04 2019 +0200 s390/qdio: handle PENDING state for QEBSM devices When a CQ-enabled device uses QEBSM for SBAL state inspection, get_buf_states() can return the PENDING state for an Output Queue. get_outbound_buffer_frontier() isn't prepared for this, and any PENDING buffer will permanently stall all further completion processing on this Queue. This isn't a concern for non-QEBSM devices, as get_buf_states() for such devices will manually turn PENDING buffers into EMPTY ones. Fixes: 104ea556ee7f ("qdio: support asynchronous delivery of storage blocks") Signed-off-by: Julian Wiedmann Signed-off-by: Heiko Carstens drivers/s390/cio/qdio_main.c | 1 + 1 file changed, 1 insertion(+) commit 6887560c039f13c21d7fa6df363c4db0f3e12fa2 Author: Heiko Carstens Date: Thu Jun 6 16:37:56 2019 +0200 s390/jump_label: remove unused structure definition Signed-off-by: Heiko Carstens arch/s390/kernel/jump_label.c | 5 ----- 1 file changed, 5 deletions(-) commit b0bb8fbd49af94c946837c4e15d84ff9ff6f0796 Author: Heiko Carstens Date: Tue Jun 4 13:10:51 2019 +0200 s390/boot: disable address-of-packed-member warning Get rid of gcc9 warnings like this: arch/s390/boot/ipl_report.c: In function 'find_bootdata_space': arch/s390/boot/ipl_report.c:42:26: warning: taking address of packed member of 'struct ipl_rb_components' may result in an unaligned pointer value [-Waddress-of-packed-member] 42 | for_each_rb_entry(comp, comps) | ^~~~~ This is effectively the s390 variant of commit 20c6c1890455 ("x86/boot: Disable the address-of-packed-member compiler warning"). Reviewed-by: Vasily Gorbik Signed-off-by: Heiko Carstens arch/s390/Makefile | 1 + 1 file changed, 1 insertion(+) commit 34c636a0c15729ce77ab7b4aa968587098b76577 Author: Sebastian Ott Date: Tue Jun 4 13:51:36 2019 +0200 s390/cio: fix kdoc for tiqdio_thinint_handler Add missing parameter description to fix the following warning: drivers/s390/cio/qdio_thinint.c:183: warning: Function parameter or member 'floating' not described in 'tiqdio_thinint_handler' Signed-off-by: Sebastian Ott Signed-off-by: Heiko Carstens drivers/s390/cio/qdio_thinint.c | 1 + 1 file changed, 1 insertion(+) commit e1ab11012e1cc981b43219580e010a20ec8df7d8 Author: Harald Freudenberger Date: Wed Jun 5 07:19:54 2019 +0200 s390/zcrypt: support special flagged EP11 cprbs Within an EP11 cprb there exists a byte field flags. Bit 0x20 of this field indicates a special cprb. A special cprb triggers special handling in the firmware below the OS layer. However, a special cprb also needs to have the S bit in GPR0 set when NQAP is called. This was not the case for EP11 cprbs and this patch now introduces the code to support this. Signed-off-by: Harald Freudenberger Signed-off-by: Heiko Carstens drivers/s390/crypto/zcrypt_msgtype6.c | 4 ++++ 1 file changed, 4 insertions(+) commit bae0aae2f8f971e95182deab11f56a79018ba89b Author: Masahiro Yamada Date: Tue Jun 4 17:29:47 2019 +0900 s390: fix unrecognized __aligned() in uapi header __aligned() is a shorthand that is only available in the kernel space because it is defined in include/linux/compiler_attributes.h, which is not exported to the user space. Detected by compile-testing exported headers. ./usr/include/asm/runtime_instr.h:60:37: error: expected declaration specifiers or ‘...’ before numeric constant } __attribute__((packed)) __aligned(8); ^ Signed-off-by: Masahiro Yamada Signed-off-by: Heiko Carstens arch/s390/include/uapi/asm/runtime_instr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 10400c401754b6bc79839335c9a927a9f352639f Author: Krzysztof Kozlowski Date: Tue Jun 4 09:58:57 2019 +0200 s390/configs: remove useless UEVENT_HELPER_PATH Remove the CONFIG_UEVENT_HELPER_PATH because: 1. It is disabled since commit 1be01d4a5714 ("driver: base: Disable CONFIG_UEVENT_HELPER by default") as its dependency (UEVENT_HELPER) was made default to 'n', 2. It is not recommended (help message: "This should not be used today [...] creates a high system load") and was kept only for ancient userland, 3. Certain userland specifically requests it to be disabled (systemd README: "Legacy hotplug slows down the system and confuses udev"). Signed-off-by: Krzysztof Kozlowski Acked-by: Geert Uytterhoeven Signed-off-by: Heiko Carstens arch/s390/configs/defconfig | 1 - arch/s390/configs/zfcpdump_defconfig | 1 - 2 files changed, 2 deletions(-) commit 3e8eb22faee179798530b6a3d2639629fcf9d580 Author: Heiko Carstens Date: Mon Jun 3 15:22:25 2019 +0200 s390: enforce CONFIG_HOTPLUG_CPU x86 and powerpc (partially) enforce already CONFIG_HOTPLUG_CPU. On s390 it is enabled on all distributions by default since ages. The only exception is our zfcpdump kernel. However to simplify testing, enforce HOTPLUG_CPU. This was suggested by Paul McKenney, since his rcutorture test environments for CONFIG_SMP=y only support HOTPLUG_CPU=y. Suggested-by: Paul E. McKenney Acked-by: Christian Borntraeger Signed-off-by: Heiko Carstens arch/s390/Kconfig | 5 ----- arch/s390/include/asm/smp.h | 5 ----- arch/s390/kernel/smp.c | 19 ------------------- 3 files changed, 29 deletions(-) commit 67626fadd26977aca76d3540b80ce99233399cdf Author: Heiko Carstens Date: Mon Jun 3 14:25:18 2019 +0200 s390: enforce CONFIG_SMP There never have been distributions that shiped with CONFIG_SMP=n for s390. In addition the kernel currently doesn't even compile with CONFIG_SMP=n for s390. Most likely it wouldn't even work, even if we fix the compile error, since nobody tests it, since there is no use case that I can think of. Therefore simply enforce CONFIG_SMP and get rid of some more or less unused code. Reviewed-by: Christian Borntraeger Signed-off-by: Heiko Carstens arch/s390/Kconfig | 25 ++----------------------- arch/s390/include/asm/ctl_reg.h | 9 ++------- arch/s390/include/asm/percpu.h | 2 +- arch/s390/include/asm/smp.h | 30 ------------------------------ arch/s390/include/asm/spinlock.h | 4 ---- arch/s390/include/asm/tlbflush.h | 17 ----------------- arch/s390/kernel/Makefile | 2 +- arch/s390/kernel/dumpstack.c | 2 -- arch/s390/kernel/entry.S | 4 ---- arch/s390/kernel/setup.c | 2 -- arch/s390/kernel/swsusp.S | 2 -- arch/s390/lib/Makefile | 3 +-- 12 files changed, 7 insertions(+), 95 deletions(-) commit 92aae4ce84275036977468379484012545afb31a Author: Flavio Suligoi Date: Fri May 24 16:45:45 2019 +0200 mtd: spi-nor: change "error reading JEDEC id" from dbg to err In case of SPI error during the reading of the nor Id, the probe fails without any error message related to the JEDEC Id reading procedure. Signed-off-by: Flavio Suligoi Signed-off-by: Tudor Ambarus drivers/mtd/spi-nor/spi-nor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 21ed90acd1786880129eeae9d6718b5fc8663c36 Author: Andrey Smirnov Date: Sun May 12 20:33:26 2019 -0700 mtd: spi-nor: Add Micron MT25QL02 support Add an entry for Micron MT25QL02 which is a 3V variant of already supported MT25QU02. Testing was done on a ZII VF610 Dev Board (rev. B). Signed-off-by: Cory Tusar Signed-off-by: Andrey Smirnov Cc: Chris Healy Cc: Marek Vasut Cc: Tudor Ambarus Cc: linux-mtd@lists.infradead.org Cc: linux-kernel@vger.kernel.org [tudor.ambarus@microchip.com: order entry alphabetically, wrap to 80 chars limit] Signed-off-by: Tudor Ambarus drivers/mtd/spi-nor/spi-nor.c | 3 +++ 1 file changed, 3 insertions(+) commit df6bd6c002a4dee73d274a87ef1c0e36f21d2583 Author: Ludovic Barre Date: Tue May 7 11:16:38 2019 +0200 mtd: spi-nor: stm32: remove the driver as it was replaced by spi-stm32-qspi.c There's a new driver using the SPI memory interface of the SPI framework at spi/spi-stm32-qspi.c, which can be used together with m25p80.c to replace the functionality of this SPI NOR driver. The "new" driver uses the same dt properties and not affects the legacy compatibility. Signed-off-by: Ludovic Barre Signed-off-by: Tudor Ambarus .../devicetree/bindings/mtd/stm32-quadspi.txt | 43 -- drivers/mtd/spi-nor/Kconfig | 7 - drivers/mtd/spi-nor/Makefile | 1 - drivers/mtd/spi-nor/stm32-quadspi.c | 720 --------------------- 4 files changed, 771 deletions(-) commit b170b5d5e8a39ee41365c874ba6f035f07d22bfd Author: Abel Vesa Date: Wed May 29 12:26:49 2019 +0000 clk: imx6sll: Switch to clk_hw based API Switch the entire clk-imx6sll driver to clk_hw based API. This allows us to move closer to a clear split between consumer and provider clk APIs. Signed-off-by: Abel Vesa Reviewed-by: Stephen Boyd Signed-off-by: Shawn Guo drivers/clk/imx/clk-imx6sll.c | 430 ++++++++++++++++++++++-------------------- 1 file changed, 222 insertions(+), 208 deletions(-) commit bce5b921502fb621a4b4a37c870fa8736a70ef35 Author: Abel Vesa Date: Wed May 29 12:26:48 2019 +0000 clk: imx7d: Switch to clk_hw based API Switch the entire clk-imx7d driver to clk_hw based API. This allows us to move closer to a clear split between consumer and provider clk APIs. Signed-off-by: Abel Vesa Reviewed-by: Stephen Boyd Signed-off-by: Shawn Guo drivers/clk/imx/clk-imx7d.c | 983 ++++++++++++++++++++++---------------------- 1 file changed, 499 insertions(+), 484 deletions(-) commit 1487b60dc2d2c3f0194690a44a8544d91645853c Author: Abel Vesa Date: Wed May 29 12:26:47 2019 +0000 clk: imx6ul: Switch to clk_hw based API Switch the entire clk-imx6ul driver to clk_hw based API. This allows us to move closer to a clear split between consumer and provider clk APIs. Signed-off-by: Abel Vesa Reviewed-by: Stephen Boyd Signed-off-by: Shawn Guo drivers/clk/imx/clk-imx6ul.c | 574 ++++++++++++++++++++++--------------------- 1 file changed, 290 insertions(+), 284 deletions(-) commit f1541e15e38ec3ae22d7190378c0be009d5ccae4 Author: Abel Vesa Date: Wed May 29 12:26:47 2019 +0000 clk: imx6sx: Switch to clk_hw based API Switch the entire clk-imx6sx driver to clk_hw based API. This allows us to move closer to a clear split between consumer and provider clk APIs. Signed-off-by: Abel Vesa Reviewed-by: Stephen Boyd Signed-off-by: Shawn Guo drivers/clk/imx/clk-imx6sx.c | 654 ++++++++++++++++++++++--------------------- 1 file changed, 334 insertions(+), 320 deletions(-) commit 992b703b5b389725c244977360a653648de3de2f Author: Abel Vesa Date: Wed May 29 12:26:46 2019 +0000 clk: imx6q: Switch to clk_hw based API Switch the entire clk-imx6q driver to clk_hw based API. Add imx6q_obtain_fixed_clk_hw helper to clean up the registration of the clocks that are either found in device tree or are assigned a fixed zero rate. This switch allows us to move closer to a clear split between consumer and provider clk APIs. Signed-off-by: Abel Vesa Reviewed-by: Stephen Boyd Signed-off-by: Shawn Guo drivers/clk/imx/clk-imx6q.c | 759 +++++++++++++++++++++++--------------------- 1 file changed, 392 insertions(+), 367 deletions(-) commit 3a1d8fe6f445b131572688346a1945bf97201aab Author: Abel Vesa Date: Wed May 29 12:26:46 2019 +0000 clk: imx6sl: Switch to clk_hw based API Switch the entire clk-imx6sl driver to clk_hw based API. This allows us to move closer to a clear split between consumer and provider clk APIs. Signed-off-by: Abel Vesa Reviewed-by: Stephen Boyd Signed-off-by: Shawn Guo drivers/clk/imx/clk-imx6sl.c | 404 ++++++++++++++++++++++--------------------- 1 file changed, 209 insertions(+), 195 deletions(-) commit eccf8dfd0052c1a68495ee4f530a1e1e6aac4d57 Author: Abel Vesa Date: Wed May 29 12:26:45 2019 +0000 clk: imx: Switch wrappers to clk_hw based API Switch all the wrappers to clk_hw based API and rename them to indicate that. Add macros for clk based legacy users. This allows us to move closer to a clear split between consumer and provider clk APIs. Signed-off-by: Abel Vesa Reviewed-by: Stephen Boyd Signed-off-by: Shawn Guo drivers/clk/imx/clk.h | 91 ++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 65 insertions(+), 26 deletions(-) commit 3ead0f1e5fae0892da0891373f1e6aed527ac708 Author: Abel Vesa Date: Wed May 29 12:26:44 2019 +0000 clk: imx: clk-fixup-mux: Switch to clk_hw based API Switch the imx_clk_fixup_mux function to clk_hw based API, rename accordingly and add a macro for clk based legacy. a macro for clk based legacy. This allows us to move closer to a clear split between consumer and provider clk APIs. Signed-off-by: Abel Vesa Reviewed-by: Stephen Boyd Signed-off-by: Shawn Guo drivers/clk/imx/clk-fixup-mux.c | 15 ++++++++++----- drivers/clk/imx/clk.h | 3 +++ 2 files changed, 13 insertions(+), 5 deletions(-) commit 2597b39ed1f5d2b8d079e64c309a766dce4ea26b Author: Abel Vesa Date: Wed May 29 12:26:44 2019 +0000 clk: imx: clk-fixup-div: Switch to clk_hw based API Switch the imx_clk_fixup_divider function to clk_hw based API, rename accordingly and add a macro for clk based legacy. This allows us to move closer to a clear split between consumer and provider clk APIs. Signed-off-by: Abel Vesa Reviewed-by: Stephen Boyd Signed-off-by: Shawn Guo drivers/clk/imx/clk-fixup-div.c | 15 ++++++++++----- drivers/clk/imx/clk.h | 7 +++++-- 2 files changed, 15 insertions(+), 7 deletions(-) commit dfc148b32a795293e032dcc1bbe52829f07c2fe4 Author: Abel Vesa Date: Wed May 29 12:26:43 2019 +0000 clk: imx: clk-gate-exclusive: Switch to clk_hw based API Switch the imx_clk_gate_exclusive function to clk_hw based API, rename accordingly and add a macro for clk based legacy. This allows us to move closer to a clear split between consumer and provider clk APIs. Signed-off-by: Abel Vesa Reviewed-by: Stephen Boyd Signed-off-by: Shawn Guo drivers/clk/imx/clk-gate-exclusive.c | 17 +++++++++++------ drivers/clk/imx/clk.h | 5 ++++- 2 files changed, 15 insertions(+), 7 deletions(-) commit 995087c91e9c2d0e7f312e6f5cc320b9847265c9 Author: Abel Vesa Date: Wed May 29 12:26:43 2019 +0000 clk: imx: clk-pfd: Switch to clk_hw based API Switch the imx_clk_pfd function to clk_hw based API, rename accordingly and add a macro for clk based legacy. This allows us to move closer to a clear split between consumer and provider clk APIs. Signed-off-by: Abel Vesa Reviewed-by: Stephen Boyd Signed-off-by: Shawn Guo drivers/clk/imx/clk-pfd.c | 14 +++++++++----- drivers/clk/imx/clk.h | 5 ++++- 2 files changed, 13 insertions(+), 6 deletions(-) commit e5674a4d076299a94f0a0bf15cc08ca8baeaaa0e Author: Abel Vesa Date: Wed May 29 12:26:43 2019 +0000 clk: imx: clk-pllv3: Switch to clk_hw based API Switch the imx_clk_hw_pllv3 function to clk_hw based API, rename accordingly and add a macro for clk based legacy. This allows us to move closer to a clear split between consumer and provider clk APIs. Signed-off-by: Abel Vesa Reviewed-by: Stephen Boyd Signed-off-by: Shawn Guo drivers/clk/imx/clk-pllv3.c | 14 +++++++++----- drivers/clk/imx/clk.h | 5 ++++- 2 files changed, 13 insertions(+), 6 deletions(-) commit 1f9aec966256618974dc27fe5eacf361c1da56a5 Author: Abel Vesa Date: Wed May 29 12:26:42 2019 +0000 clk: imx: clk-gate2: Switch to clk_hw based API Switch the clk_register_gate2 function to clk_hw based API, rename accordingly and add a macro for clk based legacy. This allows us to move closer to a clear split between consumer and provider clk APIs. Signed-off-by: Abel Vesa Reviewed-by: Stephen Boyd Signed-off-by: Shawn Guo drivers/clk/imx/clk-gate2.c | 14 +++++++++----- drivers/clk/imx/clk.h | 7 ++++++- 2 files changed, 15 insertions(+), 6 deletions(-) commit 2bc7e9dc1c19bfb88b9245b22d5703fb5aaf72de Author: Abel Vesa Date: Wed May 29 12:26:42 2019 +0000 clk: imx: clk-cpu: Switch to clk_hw based API Switch the clk_cpu clock registering function to clk_hw based API and add a macro for clk based legacy. This allows us to move closer to a clear split between consumer and provider clk APIs. Signed-off-by: Abel Vesa Reviewed-by: Stephen Boyd Signed-off-by: Shawn Guo drivers/clk/imx/clk-cpu.c | 14 +++++++++----- drivers/clk/imx/clk.h | 5 ++++- 2 files changed, 13 insertions(+), 6 deletions(-) commit dd1a6c0d339b3141bdaec5a5517798dc5384384a Author: Abel Vesa Date: Wed May 29 12:26:42 2019 +0000 clk: imx: clk-busy: Switch to clk_hw based API Switch all the clk_busy clock registering functions to clk_hw based API. Keep around some clk based wrappers to be used by older imx platforms. This allows us to move closer to a clear split of consumer and provider clk APIs. Signed-off-by: Abel Vesa Reviewed-by: Stephen Boyd Signed-off-by: Shawn Guo drivers/clk/imx/clk-busy.c | 30 ++++++++++++++++++++---------- drivers/clk/imx/clk.h | 11 +++++++++-- 2 files changed, 29 insertions(+), 12 deletions(-) commit f5697226f90ecbb05640ecef8d0daaf2cc04c127 Author: Abel Vesa Date: Wed May 29 12:26:40 2019 +0000 clk: imx6q: Do not reparent uninitialized IMX6QDL_CLK_PERIPH2 clock The clock is registered later than these two re-parentings. Signed-off-by: Abel Vesa Reviewed-by: Stephen Boyd Signed-off-by: Shawn Guo drivers/clk/imx/clk-imx6q.c | 8 -------- 1 file changed, 8 deletions(-) commit fa7574740cdfef5b4d65a48bab04cef5637827f8 Author: Abel Vesa Date: Wed May 29 12:26:39 2019 +0000 clk: imx6sx: Do not reparent to unregistered IMX6SX_CLK_AXI The clock IMX6SX_CLK_AXI is not registered at all. Signed-off-by: Abel Vesa Reviewed-by: Stephen Boyd Signed-off-by: Shawn Guo drivers/clk/imx/clk-imx6sx.c | 2 -- 1 file changed, 2 deletions(-) commit a4a4069f4523a9ec6ee2741b9f3f3243b65594ba Author: Abel Vesa Date: Wed May 29 12:26:39 2019 +0000 clk: imx: Add imx_obtain_fixed_clock clk_hw based variant In order to move to clk_hw based API, imx_obtain_fixed_clock_hw is added. The end goal here is to have all the clk providers use the clk_hw based API. Signed-off-by: Abel Vesa Reviewed-by: Stephen Boyd Signed-off-by: Shawn Guo drivers/clk/imx/clk.c | 11 +++++++++++ drivers/clk/imx/clk.h | 3 +++ 2 files changed, 14 insertions(+) commit 5b933e28d8b1fbdc7fbac4bfc569f3b152c3dd59 Author: Peng Fan Date: Fri May 31 15:56:38 2019 +0800 clk: imx: imx8mm: correct audio_pll2_clk to audio_pll2_out There is no audio_pll2_clk registered, it should be audio_pll2_out. Cc: Fixes: ba5625c3e272 ("clk: imx: Add clock driver support for imx8mm") Signed-off-by: Peng Fan Signed-off-by: Shawn Guo drivers/clk/imx/clk-imx8mm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4ecabd55c90469629460f035f4bf4c8ae3d2743b Author: Roman Gushchin Date: Thu Jun 6 13:30:12 2019 -0700 bpf: allow CGROUP_SKB programs to use bpf_skb_cgroup_id() helper Currently bpf_skb_cgroup_id() is not supported for CGROUP_SKB programs. An attempt to load such a program generates an error like this: libbpf: 0: (b7) r6 = 0 ... 9: (85) call bpf_skb_cgroup_id#79 unknown func bpf_skb_cgroup_id#79 There are no particular reasons for denying it, and we have some use cases where it might be useful. So let's add it to the list of allowed helpers. Signed-off-by: Roman Gushchin Cc: Yonghong Song Cc: Alexei Starovoitov Cc: Daniel Borkmann Acked-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann net/core/filter.c | 4 ++++ 1 file changed, 4 insertions(+) commit 7355965da22b8d9ebac8bce4b776399fb0bb9d32 Author: Daniel Vetter Date: Thu Jun 6 10:44:04 2019 +0200 drm/vkms: Forward timer right after drm_crtc_handle_vblank In commit def35e7c592616bc09be328de8795e5e624a3cf8 Author: Shayenne Moura Date: Wed Jan 30 14:06:36 2019 -0200 drm/vkms: Bugfix extra vblank frame we fixed the vblank counter to give accurate results outside of drm_crtc_handle_vblank, which fixed bugs around vblank timestamps being off-by-one and causing the vblank counter to jump when it shouldn't. The trouble is that this completely broke crc generation. Shayenne and Rodrigo tracked this down to the vblank timestamp going backwards in time somehow. Which then resulted in an underflow in drm_vblank.c code, which resulted in all kinds of things breaking really badly. The reason for this is that once we've called drm_crtc_handle_vblank and the hrtimer isn't forwarded yet, we're returning a vblank timestamp in the past. This race is really hard to hit since it's small, except when you enable crc generation: In that case there's a call to drm_crtc_accurate_vblank right in-betwen, so we're guaranteed to hit the bug. The fix is to roll the hrtimer forward _before_ we do the vblank processing (which has a side-effect of incrementing the vblank counter), and we always subtract one frame from the hrtimer - since now it's always one frame in the future. To make sure we don't hit this again also add a WARN_ON checking for whether our timestamp is somehow moving into the past, which is never should. This also aligns more with how real hw works: 1. first all registers are updated with the new timestamp/vblank counter values. 2. then an interrupt is generated 3. kernel interrupt handler eventually fires. So doing this aligns vkms closer with what drm_vblank.c expects. Document this also in a comment. Cc: Shayenne Moura Cc: Rodrigo Siqueira Signed-off-by: Daniel Vetter Tested-by: Rodrigo Siqueira Reviewed-by: Rodrigo Siqueira Signed-off-by: Rodrigo Siqueira Link: https://patchwork.freedesktop.org/patch/msgid/20190606084404.12014-1-daniel.vetter@ffwll.ch drivers/gpu/drm/vkms/vkms_crtc.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) commit 1ae752bf390c84250b702bd7d983c94d6eda42e2 Author: Rodrigo Siqueira Date: Fri Mar 15 13:11:42 2019 -0300 drm/vkms: Remove useless call to drm_connector_register/unregister() The function vkms_output_init() is invoked during the module initialization, and it handles the creation/configuration of the vkms essential elements (e.g., connectors, encoder, etc). Among the initializations, this function tries to initialize a connector and register it by calling drm_connector_register(). However, inside the drm_connector_register(), at the beginning of this function there is the following validation: if (!connector->dev->registered) return 0; In this sense, invoke drm_connector_register() after initializing the connector has no effect because the register field is false. The connector register happens when drm_dev_register() is invoked; the same issue exists with drm_connector_unregister(). Therefore, this commit removes the unnecessary call to drm_connector_register() and drm_connector_unregister(). Changes since v2: * Remove unnecessary call to drm_connector_unregister() * Remove unused label Signed-off-by: Rodrigo Siqueira Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190315161142.23gfu32lueyqrmyq@smtp.gmail.com drivers/gpu/drm/vkms/vkms_output.c | 10 ---------- 1 file changed, 10 deletions(-) commit 072a551fd5cff2329ad151c7c25b7958afc0f149 Author: Jeffrey Hugo Date: Tue May 28 09:47:40 2019 -0700 dt-bindings: clock: Document gpucc for msm8998 The GPU for msm8998 has its own clock controller. Document it. Signed-off-by: Jeffrey Hugo Signed-off-by: Stephen Boyd .../devicetree/bindings/clock/qcom,gpucc.txt | 4 ++- include/dt-bindings/clock/qcom,gpucc-msm8998.h | 29 ++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) commit 96524ea4be04683bb3ad8ebaedcbe3a6e34302de Merge: 40ae25505fe8 f5203a3d9b25 Author: David S. Miller Date: Thu Jun 6 16:24:30 2019 -0700 Merge branch 'Xilinx-axienet-driver-updates' Robert Hancock says: ==================== Xilinx axienet driver updates (v5) This is a series of enhancements and bug fixes in order to get the mainline version of this driver into a more generally usable state, including on x86 or ARM platforms. It also converts the driver to use the phylink API in order to provide support for SFP modules. Changes since v4: -Use reverse christmas tree variable order ==================== Signed-off-by: David S. Miller commit f5203a3d9b25fa28a40bfc27c05a4020c6430f06 Author: Robert Hancock Date: Thu Jun 6 16:28:24 2019 -0600 net: axienet: convert to phylink API Convert this driver to use the phylink API rather than the legacy PHY API. This allows for better support for SFP modules connected using a 1000BaseX or SGMII interface. Signed-off-by: Robert Hancock Signed-off-by: David S. Miller drivers/net/ethernet/xilinx/Kconfig | 2 +- drivers/net/ethernet/xilinx/xilinx_axienet.h | 5 +- drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 286 ++++++++++++++-------- 3 files changed, 192 insertions(+), 101 deletions(-) commit 28ef9ebdb64c6f45079d8be45ab47bd0c62d078c Author: Robert Hancock Date: Thu Jun 6 16:28:23 2019 -0600 net: axienet: make use of axistream-connected attribute optional Currently the axienet driver requires the use of a second devicetree node, referenced by an axistream-connected attribute on the Ethernet device node, which contains the resources for the AXI DMA block used by the device. This setup is problematic for a use case we have where the Ethernet and DMA cores are behind a PCIe to AXI bridge and the memory resources for the nodes are injected into the platform devices using the multifunction device subsystem - it's not easily possible for the driver to obtain the platform-level resources from the linked device. In order to simplify that usage model, and simplify the overall use of this driver in general, allow for all of the resources to be kept on one node where the resources are retrieved using platform device APIs rather than device-tree-specific ones. The previous usage setup is still supported if the axistream-connected attribute is specified. Signed-off-by: Robert Hancock Signed-off-by: David S. Miller drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 43 +++++++++++++++-------- 1 file changed, 28 insertions(+), 15 deletions(-) commit a1765c1850be90f621fb69751ccaa3370cf60571 Author: Robert Hancock Date: Thu Jun 6 16:28:22 2019 -0600 net: axienet: document axistream-connected attribute The axienet driver requires the use of an axistream-connected attribute, but this isn't documented in the devicetree bindings. Document how this attribute is supposed to be used, including the upcoming change to make the usage of this attribute optional. Signed-off-by: Robert Hancock Signed-off-by: David S. Miller .../devicetree/bindings/net/xilinx_axienet.txt | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit 3b09a3fb35079106fd490241bdc8e0c31434be00 Author: Robert Hancock Date: Thu Jun 6 16:28:21 2019 -0600 net: axienet: Fix MDIO bus parent node detection This driver was previously using the parent node of the specified PHY node as the device node to register the MDIO bus on. Andrew Lunn pointed out this is wrong as the PHY node is potentially not even underneath the MDIO bus for the current device instance. Find the MDIO node explicitly by looking it up by name under the controller's device node instead. This could potentially break existing device trees if they don't use "mdio" as the name for the MDIO bus, but I did not find any with various searches and Xilinx's examples all use mdio as the name so it seems like this should be relatively safe. Signed-off-by: Robert Hancock Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a4ebb2997c10f3e8b7b2de27c0f2cf3e4123ed09 Author: Robert Hancock Date: Thu Jun 6 16:28:20 2019 -0600 net: axienet: document device tree mdio child node The mdio child node for the MDIO bus is generally required when using this driver but was not documented other than being shown in the example. Document it as an optional (but usually required) parameter. Signed-off-by: Robert Hancock Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/xilinx_axienet.txt | 3 +++ 1 file changed, 3 insertions(+) commit 70c50265c46b7f44823313b87e7e3a3808489c5d Author: Robert Hancock Date: Thu Jun 6 16:28:19 2019 -0600 net: axienet: stop interface during shutdown On some platforms, such as iMX6 with PCIe devices, crashes or hangs can occur if the axienet device continues to perform DMA transfers after parent devices/busses have been shut down. Shut down the axienet interface during its shutdown callback in order to avoid this. Signed-off-by: Robert Hancock Signed-off-by: David S. Miller drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit d05a9ed5c3a7739b7ece9ea81617c6fc74de10f0 Author: Robert Hancock Date: Thu Jun 6 16:28:18 2019 -0600 net: axienet: Make missing MAC address non-fatal Failing initialization on a missing MAC address property is excessive. We can just fall back to using a random MAC instead, which at least leaves the interface in a functioning state. Signed-off-by: Robert Hancock Signed-off-by: David S. Miller drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 7de44285c1f69ccfbe8be1d6a16fcd956681fee6 Author: Robert Hancock Date: Thu Jun 6 16:28:17 2019 -0600 net: axienet: Fix race condition causing TX hang It is possible that the interrupt handler fires and frees up space in the TX ring in between checking for sufficient TX ring space and stopping the TX queue in axienet_start_xmit. If this happens, the queue wake from the interrupt handler will occur before the queue is stopped, causing a lost wakeup and the adapter's transmit hanging. To avoid this, after stopping the queue, check again whether there is sufficient space in the TX ring. If so, wake up the queue again. Signed-off-by: Robert Hancock Signed-off-by: David S. Miller drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) commit 522856cefaf09d1a06ddc02535c7e1e81730c278 Author: Robert Hancock Date: Thu Jun 6 16:28:16 2019 -0600 net: axienet: Add optional support for Ethernet core interrupt Previously this driver only handled interrupts from the DMA RX and TX blocks, not from the Ethernet core itself. Add optional support for the Ethernet core interrupt, which is used to detect rx_missed and framing errors signalled by the hardware. In order to use this interrupt, a third interrupt needs to be specified in the device tree. Signed-off-by: Robert Hancock Signed-off-by: David S. Miller .../devicetree/bindings/net/xilinx_axienet.txt | 3 +- drivers/net/ethernet/xilinx/xilinx_axienet.h | 1 + drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 49 ++++++++++++++++++++++ 3 files changed, 52 insertions(+), 1 deletion(-) commit 9cbc1b6834dc6a6877271c829e9396dc2f26ae76 Author: Robert Hancock Date: Thu Jun 6 16:28:15 2019 -0600 net: axienet: Support shared interrupts Specify IRQF_SHARED to support shared interrupts. If the interrupt handler is called and the device is not indicating an interrupt, just return IRQ_NONE rather than spewing error messages. Signed-off-by: Robert Hancock Signed-off-by: David S. Miller drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 867d03bc238f62fcd28f287b9da8af5e483baeab Author: Robert Hancock Date: Thu Jun 6 16:28:14 2019 -0600 net: axienet: Add DMA registers to ethtool register dump These registers are important for troubleshooting the state of the DMA cores. Signed-off-by: Robert Hancock Signed-off-by: David S. Miller drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 8b09ca823ffb4eee44cc1e41af2935e511eb98f1 Author: Robert Hancock Date: Thu Jun 6 16:28:13 2019 -0600 net: axienet: Make RX/TX ring sizes configurable Add support for setting the RX and TX ring sizes for this driver using ethtool. Also increase the default RX ring size as the previous default was far too low for good performance in some configurations. Signed-off-by: Robert Hancock Signed-off-by: David S. Miller drivers/net/ethernet/xilinx/xilinx_axienet.h | 2 + drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 90 ++++++++++++++++------- 2 files changed, 67 insertions(+), 25 deletions(-) commit 489d4d7713d1cad40b1049720b44d08f53918b30 Author: Robert Hancock Date: Thu Jun 6 16:28:12 2019 -0600 net: axienet: Cleanup DMA device reset and halt process The Xilinx DMA blocks each have their own reset register, but they both reset the entire DMA engine, so only one of them needs to be reset. Also, when stopping the device, we need to not just command the DMA blocks to stop, but wait for them to stop, and trigger a device reset to ensure that they are completely stopped. Signed-off-by: Robert Hancock Signed-off-by: David S. Miller drivers/net/ethernet/xilinx/xilinx_axienet.h | 2 + drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 54 +++++++++++++++++------ 2 files changed, 42 insertions(+), 14 deletions(-) commit 7789e9ed0591bab4d8a419bf3b9b18327d75128f Author: Robert Hancock Date: Thu Jun 6 16:28:11 2019 -0600 net: axienet: Re-initialize MDIO registers properly after reset The MDIO clock divisor register setting was only applied on the initial startup when the driver was loaded. However, this setting is cleared when the device is reset, such as would occur when the interface was taken down and brought up again, and so the MDIO bus would be non-functional afterwards. Split up the MDIO bus setup and enable into separate functions and re-enable the bus after a device reset, to ensure that the MDIO registers are set properly. This also allows us to remove direct access to MDIO registers in xilinx_axienet_main.c and centralize them all in xilinx_axienet_mdio.c. Also, lock the MDIO bus lock around the device reset process, to avoid MDIO accesses from occurring while the MDIO is disabled during the reset. Signed-off-by: Robert Hancock Signed-off-by: David S. Miller drivers/net/ethernet/xilinx/xilinx_axienet.h | 3 +- drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 38 +++++++--------- drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c | 54 +++++++++++++++++------ 3 files changed, 57 insertions(+), 38 deletions(-) commit e7a3d116fa6fd1b898f6d7421a07f01fa38394b9 Author: Robert Hancock Date: Thu Jun 6 16:28:10 2019 -0600 net: axienet: fix teardown order of MDIO bus Since the MDIO is is brought up before the netdev is registered, it should be torn down after the netdev is removed. Otherwise, PHY accesses can potentially access freed MDIO bus references and cause a crash. Signed-off-by: Robert Hancock Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 09a0354cadec267be7f5249c89eb998b3474263a Author: Robert Hancock Date: Thu Jun 6 16:28:09 2019 -0600 net: axienet: Use clock framework to get device clock rate This driver was previously always calculating the MDIO clock divisor (from AXI bus clock to MDIO bus clock) based on the CPU clock frequency, assuming that it is the same as the AXI bus frequency, but that simplistic method only works on the MicroBlaze platform. Add support for specifying the clock used for the device in the device tree using the clock framework. If the clock is specified then it will be used when calculating the clock divisor. The previous CPU clock detection method is left for backward compatibility if no clock is specified. Signed-off-by: Robert Hancock Signed-off-by: David S. Miller .../devicetree/bindings/net/xilinx_axienet.txt | 6 +++ drivers/net/ethernet/xilinx/xilinx_axienet.h | 5 +- drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 23 +++++++++- drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c | 53 ++++++++++++---------- 4 files changed, 59 insertions(+), 28 deletions(-) commit 2190cd1974abbafeeb17ce654e679c5d646842e1 Author: Robert Hancock Date: Thu Jun 6 16:28:08 2019 -0600 net: axienet: add X86 and ARM as supported platforms This driver should now build on (at least) X86 and ARM platforms, so add them as supported platforms for the driver in Kconfig. Signed-off-by: Robert Hancock Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/xilinx/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 88a972d74ea9172a156cdffb6bb30fbb4b1e27c6 Author: Robert Hancock Date: Thu Jun 6 16:28:07 2019 -0600 net: axienet: fix MDIO bus naming The MDIO bus for this driver was being named using the result of of_address_to_resource on a node which may not have any resource on it, but the return value of that call was not checked so it was using some random value in the bus name. Change to name the MDIO bus based on the resource start of the actual Ethernet register block. Signed-off-by: Robert Hancock Signed-off-by: David S. Miller drivers/net/ethernet/xilinx/xilinx_axienet.h | 2 ++ drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 1 + drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c | 11 +++++------ 3 files changed, 8 insertions(+), 6 deletions(-) commit d85f5f3e4eb38300642d2b54c5740b351c0bdcc5 Author: Robert Hancock Date: Thu Jun 6 16:28:06 2019 -0600 net: axienet: Use standard IO accessors This driver was using in_be32 and out_be32 IO accessors which do not exist on most platforms. Also, the use of big-endian accessors does not seem correct as this hardware is accessed over an AXI bus which, to the extent it has an endian-ness, is little-endian. Switch to standard ioread32/iowrite32 accessors. Signed-off-by: Robert Hancock Signed-off-by: David S. Miller drivers/net/ethernet/xilinx/xilinx_axienet.h | 4 ++-- drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 23e6b2dc93630b60a6c33bd2a1289686bc33e272 Author: Robert Hancock Date: Thu Jun 6 16:28:05 2019 -0600 net: axienet: Fix casting of pointers to u32 This driver was casting skb pointers to u32 and storing them as such in the DMA buffer descriptor, which is obviously broken on 64-bit. The area of the buffer descriptor being used is not accessed by the hardware and has sufficient room for a 32 or 64-bit pointer, so just store the skb pointer as such. Signed-off-by: Robert Hancock Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/xilinx/xilinx_axienet.h | 11 +++------- drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 26 ++++++++++++----------- 2 files changed, 17 insertions(+), 20 deletions(-) commit 860690a93ef23b567f781c1b631623e27190f101 Author: Erin Lo Date: Tue May 21 11:40:01 2019 +0800 clk: mediatek: Remove MT8183 unused clock Remove MT8183 sspm clock Signed-off-by: Erin Lo Signed-off-by: Stephen Boyd drivers/clk/mediatek/clk-mt8183.c | 19 ------------------- 1 file changed, 19 deletions(-) commit 0fd4939ac100fe9e3645b846619d970ef6be2ade Author: Fabien Parent Date: Thu May 2 14:18:43 2019 +0200 clk: mediatek: add audsys clock driver for MT8516 Add audsys clock driver for MediaTek MT8516 SoC. Signed-off-by: Fabien Parent Signed-off-by: Stephen Boyd drivers/clk/mediatek/Kconfig | 6 ++++ drivers/clk/mediatek/Makefile | 1 + drivers/clk/mediatek/clk-mt8516-aud.c | 65 +++++++++++++++++++++++++++++++++++ 3 files changed, 72 insertions(+) commit 3d8b6e9c774ff57ad2860f79abd9cdb8f29ecaf8 Author: Fabien Parent Date: Thu May 2 14:18:42 2019 +0200 dt-bindings: mediatek: audsys: add support for MT8516 Add AUDSYS device tree bindings documentation for MediaTek MT8516 SoC. Signed-off-by: Fabien Parent Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd .../bindings/arm/mediatek/mediatek,audsys.txt | 1 + include/dt-bindings/clock/mt8516-clk.h | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) commit 9aa0cae1d458278a75008885654a0e240020598c Author: Dinh Nguyen Date: Thu May 16 17:30:00 2019 -0500 arm64: dts: stratix10: use the "altr,socfpga-stmmac-a10-s10" binding Because of register and bits difference for setting PHY modes, PTP reference clock, and FPGA signalling, the Stratix10 SoC needs to use the "altr,socfpga-stmmac-a10-s10" binding to set the correct modes. On Stratix10, each EMAC has its own register for PHY modes, and they all have the same offset, thus we can use the 2nd parameter to specify the offsets for the FPGA signal bits. Signed-off-by: Dinh Nguyen arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit cca3731e026a6b540bf651c6f59d37bd4e4198a0 Author: Dinh Nguyen Date: Thu May 16 17:07:50 2019 -0500 ARM: dts: socfpga: use the "altr,socfpga-stmmac-a10-s10" binding Because of register and bits difference for setting PHY modes, PTP reference clock, and FPGA signalling, the Arria10 SoC needs to use the "altr,socfpga-stmmac-a10-s10" binding to set the correct modes. On Arria10, each EMAC has its own register for PHY modes, and they all have the same offset, thus we can use the 2nd parameter to specify the offsets for the FPGA signal bits. Signed-off-by: Dinh Nguyen arch/arm/boot/dts/socfpga_arria10.dtsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit a8e992342ce4cd173d437d0aa4eecc9e30489f72 Merge: adb76b5b9c47 04268bf2757a Author: Mark Brown Date: Thu Jun 6 22:44:24 2019 +0100 Merge branch 'asoc-5.2' into asoc-5.3 commit 169a126c6e88a99578a309a9021f314b5d532c5f Author: Jean-Philippe Brucker Date: Tue Jan 15 12:19:59 2019 +0000 iommu/virtio: Add event queue The event queue offers a way for the device to report access faults from endpoints. It is implemented on virtqueue #1. Whenever the host needs to signal a fault, it fills one of the buffers offered by the guest and interrupts it. Tested-by: Bharat Bhushan Tested-by: Eric Auger Reviewed-by: Eric Auger Signed-off-by: Jean-Philippe Brucker Signed-off-by: Michael S. Tsirkin drivers/iommu/virtio-iommu.c | 115 +++++++++++++++++++++++++++++++++++--- include/uapi/linux/virtio_iommu.h | 19 +++++++ 2 files changed, 125 insertions(+), 9 deletions(-) commit 2a5a314874450decec244923209ce6ba97e3ed93 Author: Jean-Philippe Brucker Date: Tue Jan 15 12:19:58 2019 +0000 iommu/virtio: Add probe request When the device offers the probe feature, send a probe request for each device managed by the IOMMU. Extract RESV_MEM information. When we encounter a MSI doorbell region, set it up as a IOMMU_RESV_MSI region. This will tell other subsystems that there is no need to map the MSI doorbell in the virtio-iommu, because MSIs bypass it. Tested-by: Bharat Bhushan Tested-by: Eric Auger Reviewed-by: Eric Auger Signed-off-by: Jean-Philippe Brucker Signed-off-by: Michael S. Tsirkin drivers/iommu/virtio-iommu.c | 157 ++++++++++++++++++++++++++++++++++++-- include/uapi/linux/virtio_iommu.h | 36 +++++++++ 2 files changed, 187 insertions(+), 6 deletions(-) commit edcd69ab9a323b7ac7a86e1c44b6c9c46598391f Author: Jean-Philippe Brucker Date: Tue Jan 15 12:19:57 2019 +0000 iommu: Add virtio-iommu driver The virtio IOMMU is a para-virtualized device, allowing to send IOMMU requests such as map/unmap over virtio transport without emulating page tables. This implementation handles ATTACH, DETACH, MAP and UNMAP requests. The bulk of the code transforms calls coming from the IOMMU API into corresponding virtio requests. Mappings are kept in an interval tree instead of page tables. A little more work is required for modular and x86 support, so for the moment the driver depends on CONFIG_VIRTIO=y and CONFIG_ARM64. Tested-by: Bharat Bhushan Tested-by: Eric Auger Reviewed-by: Eric Auger Signed-off-by: Jean-Philippe Brucker Signed-off-by: Michael S. Tsirkin MAINTAINERS | 7 + drivers/iommu/Kconfig | 11 + drivers/iommu/Makefile | 1 + drivers/iommu/virtio-iommu.c | 916 ++++++++++++++++++++++++++++++++++++++ include/uapi/linux/virtio_ids.h | 1 + include/uapi/linux/virtio_iommu.h | 106 +++++ 6 files changed, 1042 insertions(+) commit 59b099a6c75e4ddceeaf9676422d8d91d0049755 Author: Jean-Philippe Brucker Date: Tue Jan 15 12:19:56 2019 +0000 PCI: OF: Initialize dev->fwnode appropriately For PCI devices that have an OF node, set the fwnode as well. This way drivers that rely on fwnode don't need the special case described by commit f94277af03ea ("of/platform: Initialise dev->fwnode appropriately"). Acked-by: Bjorn Helgaas Signed-off-by: Jean-Philippe Brucker Signed-off-by: Michael S. Tsirkin drivers/pci/of.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit fb709b5e1cca55d88a1d089fd935021310ce129b Author: Jean-Philippe Brucker Date: Tue Jan 15 12:19:55 2019 +0000 of: Allow the iommu-map property to omit untranslated devices In PCI root complex nodes, the iommu-map property describes the IOMMU that translates each endpoint. On some platforms, the IOMMU itself is presented as a PCI endpoint (e.g. AMD IOMMU and virtio-iommu). This isn't supported by the current OF driver, which expects all endpoints to have an IOMMU. Allow the iommu-map property to have gaps. Relaxing of_map_rid() also allows the msi-map property to have gaps, which is invalid since MSIs always reach an MSI controller. In that case pci_msi_setup_msi_irqs() will return an error when attempting to find the device's MSI domain. Reviewed-by: Rob Herring Signed-off-by: Jean-Philippe Brucker Signed-off-by: Michael S. Tsirkin drivers/of/base.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 6c9e92ef8bdde13398caae1989b0292524d6475e Author: Jean-Philippe Brucker Date: Tue Jan 15 12:19:54 2019 +0000 dt-bindings: virtio: Add virtio-pci-iommu node Some systems implement virtio-iommu as a PCI endpoint. The operating system needs to discover the relationship between IOMMU and masters long before the PCI endpoint gets probed. Add a PCI child node to describe the virtio-iommu device. The virtio-pci-iommu is conceptually split between a PCI programming interface and a translation component on the parent bus. The latter doesn't have a node in the device tree. The virtio-pci-iommu node describes both, by linking the PCI endpoint to "iommus" property of DMA master nodes and to "iommu-map" properties of bus nodes. Reviewed-by: Rob Herring Reviewed-by: Eric Auger Signed-off-by: Jean-Philippe Brucker Signed-off-by: Michael S. Tsirkin Documentation/devicetree/bindings/virtio/iommu.txt | 66 ++++++++++++++++++++++ 1 file changed, 66 insertions(+) commit 8447d84e35f2c3b2e76f80319d0b547a9521bafa Author: Jean-Philippe Brucker Date: Tue Jan 15 12:19:53 2019 +0000 dt-bindings: virtio-mmio: Add IOMMU description The nature of a virtio-mmio node is discovered by the virtio driver at probe time. However the DMA relation between devices must be described statically. When a virtio-mmio node is a virtio-iommu device, it needs an "#iommu-cells" property as specified by bindings/iommu/iommu.txt. Otherwise, the virtio-mmio device may perform DMA through an IOMMU, which requires an "iommus" property. Describe these requirements in the device-tree bindings documentation. Reviewed-by: Rob Herring Reviewed-by: Eric Auger Signed-off-by: Jean-Philippe Brucker Signed-off-by: Michael S. Tsirkin Documentation/devicetree/bindings/virtio/mmio.txt | 30 +++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 0b4a7092ffe568a55bf8f3cefdf79ff666586d91 Author: Michael S. Tsirkin Date: Thu Jun 6 17:17:36 2019 -0400 vhost: fix clang build warning Clang warns: drivers/vhost/vhost.c:2085:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined] #if VHOST_ARCH_CAN_ACCEL_UACCESS ^ drivers/vhost/vhost.h:98:38: note: expanded from macro 'VHOST_ARCH_CAN_ACCEL_UACCESS' #define VHOST_ARCH_CAN_ACCEL_UACCESS defined(CONFIG_MMU_NOTIFIER) && \ ^ It's being pedantic for the sake of portability, but the fix is easy enough. Rework the definition of VHOST_ARCH_CAN_ACCEL_UACCESS to expand to a constant. Fixes: 7f466032dc9e ("vhost: access vq metadata through kernel virtual address") Link: https://github.com/ClangBuiltLinux/linux/issues/508 Signed-off-by: Michael S. Tsirkin Reviewed-by: Nathan Chancellor Tested-by: Nathan Chancellor drivers/vhost/vhost.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 3e582c6e911ffe6c90b9f90324bdf85fc728d0c3 Author: Leilk Liu Date: Wed Jun 5 11:07:04 2019 +0800 spi: mediatek: add SPI_LSB_FIRST support this patch add SPI_LSB_FIRST feature support. Signed-off-by: Leilk Liu Signed-off-by: Mark Brown drivers/spi/spi-mt65xx.c | 15 ++++++--------- include/linux/platform_data/spi-mt65xx.h | 2 -- 2 files changed, 6 insertions(+), 11 deletions(-) commit 40ae25505fe834648ce4aa70b073ee934942bfdb Author: Dinh Nguyen Date: Wed Jun 5 10:05:51 2019 -0500 net: stmmac: socfpga: fix phy and ptp_ref setup for Arria10/Stratix10 On the Arria10, Agilex, and Stratix10 SoC, there are a few differences from the Cyclone5 and Arria5: - The emac PHY setup bits are in separate registers. - The PTP reference clock select mask is different. - The register to enable the emac signal from FPGA is different. Thus, this patch creates a separate function for setting the phy modes on Arria10/Agilex/Stratix10. The separation is based a new DTS binding: "altr,socfpga-stmmac-a10-s10". Signed-off-by: Dinh Nguyen Signed-off-by: David S. Miller .../net/ethernet/stmicro/stmmac/dwmac-socfpga.c | 117 ++++++++++++++++++--- 1 file changed, 104 insertions(+), 13 deletions(-) commit b637e0856a6248230e53b5465ab0751f27fdf320 Author: Dinh Nguyen Date: Wed Jun 5 10:05:50 2019 -0500 dt-bindings: socfpga-dwmac: add "altr, socfpga-stmmac-a10-s10" binding Add the "altr,socfpga-stmmac-a10-s10" binding for Arria10/Agilex/Stratix10 implementation of the stmmac ethernet controller. On the Arria10, Agilex, and Stratix10 SoCs, there are a few differences from the Cyclone5 and Arria5: - The emac PHY setup bits are in separate registers. - The PTP reference clock select mask is different. - The register to enable the emac signal from FPGA is different. Because of these differences, the dwmac-socfpga glue logic driver will use this new binding to set the appropriate bits for PHY, PTP reference clock, and signal from FPGA. Signed-off-by: Dinh Nguyen Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/socfpga-dwmac.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit adb76b5b9c4740a11f6ad6c68764515961ae8ade Author: Kuninori Morimoto Date: Thu Jun 6 13:22:19 2019 +0900 ASoC: soc-core: remove legacy style dai_link All drivers switched to modern style dai_link (= struct snd_soc_dai_link_component). Let's remove legacy style dai_link. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/soc.h | 65 ++------------------ sound/soc/soc-core.c | 165 +++------------------------------------------------ 2 files changed, 12 insertions(+), 218 deletions(-) commit e1684073ef2142c241375487b1e158abe169ce61 Author: Kuninori Morimoto Date: Thu Jun 6 13:22:14 2019 +0900 ASoC: Intel: sof_rt5682: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/boards/sof_rt5682.c | 57 ++++++++++++++++++++++--------------- 1 file changed, 34 insertions(+), 23 deletions(-) commit 02c31963d156025be6264d88ee42f78091112ca5 Author: Kuninori Morimoto Date: Thu Jun 6 13:22:09 2019 +0900 ASoC: Intel: glk_rt5682_max98357a: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/intel/boards/glk_rt5682_max98357a.c | 137 +++++++++++++++----------- 1 file changed, 77 insertions(+), 60 deletions(-) commit a78959f407e66b2f74fb72b47b252f4ed8b1671e Author: Kuninori Morimoto Date: Thu Jun 6 13:22:04 2019 +0900 ASoC: Intel: skl_hda_dsp_common: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/intel/boards/skl_hda_dsp_common.c | 66 +++++++++++++++++----------- sound/soc/intel/boards/skl_hda_dsp_generic.c | 4 +- 2 files changed, 43 insertions(+), 27 deletions(-) commit 2bfa8c35d90c2f3f6fc1814d37bc80f13246a762 Author: Kuninori Morimoto Date: Thu Jun 6 13:21:51 2019 +0900 ASoC: Intel: skl-pcm: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 318796d854ff57ec9a60fd002f8514ed872a4f0e Author: Kuninori Morimoto Date: Thu Jun 6 13:21:46 2019 +0900 ASoC: Intel: skl_nau88l25_max98357a: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/intel/boards/skl_nau88l25_max98357a.c | 120 ++++++++++++++---------- 1 file changed, 68 insertions(+), 52 deletions(-) commit 9cb56a5ceefaa8d4b8d69d6a4a5d9d0c7964374a Author: Kuninori Morimoto Date: Thu Jun 6 13:21:41 2019 +0900 ASoC: Intel: skl_rt286: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/boards/skl_rt286.c | 118 ++++++++++++++++++++----------------- 1 file changed, 65 insertions(+), 53 deletions(-) commit 502a522b7b8b98bd453ef948dbe47eddc787826c Author: Kuninori Morimoto Date: Thu Jun 6 13:21:36 2019 +0900 ASoC: Intel: skl_nau88l25_ssm4567: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/boards/skl_nau88l25_ssm4567.c | 132 ++++++++++++++------------ 1 file changed, 69 insertions(+), 63 deletions(-) commit 27eb6c7cb9027c4f0bb3a1b98659c1376b91d46c Author: Kuninori Morimoto Date: Thu Jun 6 13:21:31 2019 +0900 ASoC: Intel: kbl_da7219_max98357a: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/intel/boards/kbl_da7219_max98357a.c | 114 +++++++++++++++----------- 1 file changed, 66 insertions(+), 48 deletions(-) commit bf2a8ebd07f7d69d20cf2310b61357026a418c20 Author: Kuninori Morimoto Date: Thu Jun 6 13:21:26 2019 +0900 ASoC: Intel: kbl_da7219_max98927: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/intel/boards/kbl_da7219_max98927.c | 212 ++++++++++++--------------- 1 file changed, 90 insertions(+), 122 deletions(-) commit 42ac21b9b17dfa7dba9a481d0716d50f535fdd5d Author: Kuninori Morimoto Date: Thu Jun 6 13:21:22 2019 +0900 ASoC: Intel: kbl_rt5663_rt5514_max98927: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown .../soc/intel/boards/kbl_rt5663_rt5514_max98927.c | 126 +++++++++++---------- 1 file changed, 64 insertions(+), 62 deletions(-) commit 00c3cfb041a44f2d2f53492af9badbe7e409bed8 Author: Kuninori Morimoto Date: Thu Jun 6 13:21:17 2019 +0900 ASoC: Intel: kbl_rt5663_max98927: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/boards/kbl_rt5663_max98927.c | 184 +++++++++++++-------------- 1 file changed, 85 insertions(+), 99 deletions(-) commit 168bfa962ed22b0fa44ea0d6cf1875cb917a5270 Author: Kuninori Morimoto Date: Thu Jun 6 13:21:12 2019 +0900 ASoC: Intel: kbl_rt5660: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/intel/boards/kbl_rt5660.c | 83 +++++++++++++++++++++---------------- 1 file changed, 47 insertions(+), 36 deletions(-) commit 5ae4641f5a2b2d83adfb51988961ab76f94fd51e Author: Kuninori Morimoto Date: Thu Jun 6 13:21:07 2019 +0900 ASoC: Intel: cht_bsw_nau8824: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/intel/boards/cht_bsw_nau8824.c | 41 +++++++++++++++++++------------- 1 file changed, 25 insertions(+), 16 deletions(-) commit a61142bb0aa04ccc26409d91ad9060fbe2f1b926 Author: Kuninori Morimoto Date: Thu Jun 6 13:21:01 2019 +0900 ASoC: Intel: cht_bsw_rt5672: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/boards/cht_bsw_rt5672.c | 39 ++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 15 deletions(-) commit 099cc65855598efc1f9fe1f33d00cccface5d568 Author: Kuninori Morimoto Date: Thu Jun 6 13:20:54 2019 +0900 ASoC: Intel: cht_bsw_max98090_ti: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/intel/boards/cht_bsw_max98090_ti.c | 32 +++++++++++++++++----------- 1 file changed, 20 insertions(+), 12 deletions(-) commit 75909d7e2e264f848cf112f7ccb15f9254e1e7af Author: Kuninori Morimoto Date: Thu Jun 6 13:20:48 2019 +0900 ASoC: Intel: cht_bsw_rt5645: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/boards/cht_bsw_rt5645.c | 43 ++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 17 deletions(-) commit e7a712889b299ea4a28c58605baa827396ce973e Author: Kuninori Morimoto Date: Thu Jun 6 13:20:44 2019 +0900 ASoC: Intel: bytcr_rt5640: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_rt5640.c | 44 ++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 16 deletions(-) commit 01fee62a27c1c66ce916d09e74aaf4eab071096f Author: Kuninori Morimoto Date: Thu Jun 6 13:20:39 2019 +0900 ASoC: Intel: bytcr_rt5651: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_rt5651.c | 41 +++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 16 deletions(-) commit 196c52e13eb5ce1c53d6c3a38227b5ca3032d496 Author: Kuninori Morimoto Date: Thu Jun 6 13:20:34 2019 +0900 ASoC: Intel: bytcht_cx2072x: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/intel/boards/bytcht_cx2072x.c | 37 ++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 14 deletions(-) commit fb1d4861f28e750739f73a59067ea18cadbc56c3 Author: Kuninori Morimoto Date: Thu Jun 6 13:20:30 2019 +0900 ASoC: Intel: bytcht_da7213: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/intel/boards/bytcht_da7213.c | 37 +++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 14 deletions(-) commit 020aa5c7d42bf9cba171d1e6b4a0196226e4e03d Merge: ca72efb6bdc7 51a5e563298d Author: David S. Miller Date: Thu Jun 6 14:13:40 2019 -0700 Merge branch 'nfp-tls-add-basic-TX-offload' Jakub Kicinski says: ==================== nfp: tls: add basic TX offload This series adds initial TLS offload support to the nfp driver. Only TX side is added for now. We need minor adjustments to the core tls code: - expose the per-skb fallback helper; - grow the driver context slightly; - add a helper to get to the driver state more easily. We only support TX offload for now, and only if all packets keep coming in order. For retransmissions we use the aforementioned software fallback, and in case there are local drops we completely give up on given TCP stream. This will obviously be improved soon, this patch set is the minimal, functional yet easily reviewable chunk. ==================== Signed-off-by: David S. Miller commit 51a5e563298db5c61930fdc23f2269d7cbb0142f Author: Jakub Kicinski Date: Wed Jun 5 14:11:43 2019 -0700 nfp: tls: add basic statistics Count TX TLS packets: successes, out of order, and dropped due to missing record info. Make sure the RX and TX completion statistics don't share cache lines with TX ones as much as possible. With TLS stats they are no longer reasonably aligned. Signed-off-by: Dirk van der Merwe Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/crypto/tls.c | 6 ++++- drivers/net/ethernet/netronome/nfp/nfp_net.h | 23 +++++++++++++--- .../net/ethernet/netronome/nfp/nfp_net_common.c | 31 +++++++++++++++++----- .../net/ethernet/netronome/nfp/nfp_net_ethtool.c | 16 +++++++++-- 4 files changed, 64 insertions(+), 12 deletions(-) commit 1f35a56cf586a515a102a77679eae0d7d2c173b0 Author: Dirk van der Merwe Date: Wed Jun 5 14:11:42 2019 -0700 nfp: tls: add/delete TLS TX connections This patch adds the functionality to add and delete TLS connections on the NFP, received from the kernel TLS callbacks. Make use of the common control message (CCM) infrastructure to propagate the kernel state to firmware. Signed-off-by: Dirk van der Merwe Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/crypto/tls.c | 300 +++++++++++++++++++++++- drivers/net/ethernet/netronome/nfp/nfp_net.h | 5 +- 2 files changed, 303 insertions(+), 2 deletions(-) commit c3991d397f2a4d86100c533d0d92fb518319c278 Author: Dirk van der Merwe Date: Wed Jun 5 14:11:41 2019 -0700 nfp: tls: add datapath support for TLS TX Prepend connection handle to each transmitted TLS packet. For each connection, the driver tracks the next sequence number expected. If an out of order packet is observed, the driver calls into the TLS kernel code to reencrypt that particular skb. Signed-off-by: Dirk van der Merwe Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/crypto/crypto.h | 7 +++ drivers/net/ethernet/netronome/nfp/nfp_net.h | 2 + .../net/ethernet/netronome/nfp/nfp_net_common.c | 56 ++++++++++++++++++++++ 3 files changed, 65 insertions(+) commit b9727d7f957d68febb3b5f68d4be270ee6fb57e7 Author: Dirk van der Merwe Date: Wed Jun 5 14:11:40 2019 -0700 net/tls: export TLS per skb encryption While offloading TLS connections, drivers need to handle the case where out of order packets need to be transmitted. Other drivers obtain the entire TLS record for the specific skb to provide as context to hardware for encryption. However, other designs may also want to keep the hardware state intact and perform the out of order encryption entirely on the host. To achieve this, export the already existing software encryption fallback path so drivers could access this. Signed-off-by: Dirk van der Merwe Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller include/net/tls.h | 1 + net/tls/tls_device_fallback.c | 6 ++++++ 2 files changed, 7 insertions(+) commit 2e361176ea01c4b2f90b17c2264a2a794050c3f3 Author: Jakub Kicinski Date: Wed Jun 5 14:11:39 2019 -0700 net/tls: simplify driver context retrieval Currently drivers have to ensure the alignment of their tls state structure, which leads to unnecessary layers of getters and encapsulated structures in each driver. Simplify all this by marking the driver state as aligned (driver_state members are currently aligned, so no hole is added, besides ALIGN in TLS_OFFLOAD_CONTEXT_SIZE_RX/TX would reserve this extra space, anyway.) With that we can add a common accessor to the core. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller include/net/tls.h | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) commit 2d6b51c6924c1bba8e4948dc4a2dbc96bf685b97 Author: Jakub Kicinski Date: Wed Jun 5 14:11:38 2019 -0700 net/tls: split the TLS_DRIVER_STATE_SIZE and bump TX to 16 bytes 8 bytes of driver state has been enough so far, but for drivers which have to store 8 byte handle it's no longer practical to store the state directly in the context. Drivers generally don't need much extra state on RX side, while TX side has to be tracking TCP sequence numbers. Split the lengths of max driver state size on RX and TX. The struct tls_offload_context_tx currently stands at 616 bytes and struct tls_offload_context_rx stands at 368 bytes. Upcoming work will consume extra 8 bytes in both for kernel-driven resync. This means that we can bump TX side to 16 bytes and still fit into the same number of cache lines but on RX side we would be 8 bytes over. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller include/net/tls.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 5584c0f82501ad8637953ee2a4d3e6ea29b2f0b3 Author: Jakub Kicinski Date: Wed Jun 5 14:11:37 2019 -0700 nfp: prepare for more TX metadata prepend Subsequent patches will add support for more TX metadata fields. Prepare for this by handling an additional double word - firmware handle as metadata type 7. Signed-off-by: Dirk van der Merwe Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller .../net/ethernet/netronome/nfp/nfp_net_common.c | 44 +++++++++++++++++----- drivers/net/ethernet/netronome/nfp/nfp_net_ctrl.h | 1 + 2 files changed, 35 insertions(+), 10 deletions(-) commit 232eeb1f84eb2d481aad50471eff4766dcfd0e3a Author: Jakub Kicinski Date: Wed Jun 5 14:11:36 2019 -0700 nfp: add tls init code Add FW ABI defines and code for basic init of TLS offload. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller drivers/net/ethernet/netronome/Kconfig | 1 + drivers/net/ethernet/netronome/nfp/Makefile | 5 + drivers/net/ethernet/netronome/nfp/ccm.h | 4 + drivers/net/ethernet/netronome/nfp/crypto/crypto.h | 16 +++ drivers/net/ethernet/netronome/nfp/crypto/fw.h | 82 +++++++++++++ drivers/net/ethernet/netronome/nfp/crypto/tls.c | 127 +++++++++++++++++++++ drivers/net/ethernet/netronome/nfp/nfp_net.h | 1 + .../net/ethernet/netronome/nfp/nfp_net_common.c | 10 +- drivers/net/ethernet/netronome/nfp/nfp_net_ctrl.h | 1 + 9 files changed, 245 insertions(+), 2 deletions(-) commit d9d2d4c54fd7f5e7a7f4fda01ef53ec237ed57da Author: Jakub Kicinski Date: Wed Jun 5 14:11:35 2019 -0700 nfp: parse crypto opcode TLV Parse TLV containing a bitmask of supported crypto operations. The TLV contains a capability bitmask (supported operations) and enabled bitmask. Each operation describes the crypto protocol quite exhaustively (protocol, AEAD, direction). Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_ctrl.c | 11 +++++++++++ drivers/net/ethernet/netronome/nfp/nfp_net_ctrl.h | 10 ++++++++++ 2 files changed, 21 insertions(+) commit d3e4dfe060cc818262425b8606b502f79c3d9116 Author: Jakub Kicinski Date: Wed Jun 5 14:11:34 2019 -0700 nfp: add support for sending control messages via mailbox FW may prefer to handle some communication via a mailbox or the vNIC may simply not have a control queue (VFs). Add a way of exchanging ccm-compatible messages via a mailbox. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/Makefile | 1 + drivers/net/ethernet/netronome/nfp/ccm.c | 3 - drivers/net/ethernet/netronome/nfp/ccm.h | 44 +- drivers/net/ethernet/netronome/nfp/ccm_mbox.c | 591 +++++++++++++++++++++ drivers/net/ethernet/netronome/nfp/nfp_net.h | 10 + .../net/ethernet/netronome/nfp/nfp_net_common.c | 4 + drivers/net/ethernet/netronome/nfp/nfp_net_ctrl.h | 1 + 7 files changed, 646 insertions(+), 8 deletions(-) commit a68634893fca765f4914ca32c142028891be6935 Author: Jakub Kicinski Date: Wed Jun 5 14:11:33 2019 -0700 nfp: parse the mailbox cmsg TLV Parse the mailbox TLV. When control message queue is not available we can fall back to passing the control messages via the vNIC mailbox. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_ctrl.c | 4 ++++ drivers/net/ethernet/netronome/nfp/nfp_net_ctrl.h | 8 ++++++++ 2 files changed, 12 insertions(+) commit 3ed77bf76624ea0892c95d7818d9b85f3cd1b472 Author: Jakub Kicinski Date: Wed Jun 5 14:11:32 2019 -0700 nfp: make bar_lock a semaphore We will need to release the bar lock from a workqueue so move from a mutex to a semaphore. This lock should not be too hot. Unfortunately semaphores don't have lockdep support. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net.h | 7 ++++--- drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 8 +------- 2 files changed, 5 insertions(+), 10 deletions(-) commit 76581af254d8f64e342ca583242a6f0d4beeaefd Author: Jakub Kicinski Date: Wed Jun 5 14:11:31 2019 -0700 nfp: count all failed TX attempts as errors Currently if we need to modify the head of the skb and allocation fails we would free the skb and not increment the error counter. Make sure all errors are counted. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 365a8a586afb7ee4e6736ab7b5020502e121e69d Author: Kuninori Morimoto Date: Thu Jun 6 13:20:25 2019 +0900 ASoC: Intel: bytcht_nocodec: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/intel/boards/bytcht_nocodec.c | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) commit 143029dbb8c9800bbcd4f74d91769590fafeca52 Author: Kuninori Morimoto Date: Thu Jun 6 13:20:20 2019 +0900 ASoC: Intel: bytcht_es8316: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/intel/boards/bytcht_es8316.c | 38 ++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 15 deletions(-) commit 0034172031aa695911cc2c2db2a3cd76ebff6cf4 Author: Kuninori Morimoto Date: Thu Jun 6 13:20:15 2019 +0900 ASoC: Intel: byt-max98090: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/intel/boards/byt-max98090.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 6bf449c4c49a90ea973fb9b17418a79c53598b11 Author: Kuninori Morimoto Date: Thu Jun 6 13:20:10 2019 +0900 ASoC: Intel: byt-rt5640: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/intel/boards/byt-rt5640.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 5895eb75edf0f49274b8898c62c9013de5ba68fb Author: Kuninori Morimoto Date: Thu Jun 6 13:20:05 2019 +0900 ASoC: Intel: bxt_rt298: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/boards/bxt_rt298.c | 135 +++++++++++++++++++++---------------- 1 file changed, 77 insertions(+), 58 deletions(-) commit 56b2f3187419b1fed17d4d1cb051ffdce2fcbbcb Author: Kuninori Morimoto Date: Thu Jun 6 13:20:00 2019 +0900 ASoC: Intel: bxt_da7219_max98357a: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/intel/boards/bxt_da7219_max98357a.c | 140 +++++++++++++++----------- 1 file changed, 80 insertions(+), 60 deletions(-) commit 4c3db473f77ddb8a632c4b66a35ae1855de3a1b7 Author: Kuninori Morimoto Date: Thu Jun 6 13:19:40 2019 +0900 ASoC: Intel: broadwell: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/intel/boards/broadwell.c | 46 +++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 20 deletions(-) commit 77b365b8e99d0ddb6a62fe3e93ebbbe14a2734ab Author: Kuninori Morimoto Date: Thu Jun 6 13:19:35 2019 +0900 ASoC: Intel: haswell: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/intel/boards/haswell.c | 46 +++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 20 deletions(-) commit 3f6c2a2e9abe1ac636a49ad96dfbb42ce8d39be9 Author: Kuninori Morimoto Date: Thu Jun 6 13:19:30 2019 +0900 ASoC: Intel: bdw-rt5677: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/intel/boards/bdw-rt5677.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) commit 7ba06110de2628137554cf4da849ef08f255f385 Author: Kuninori Morimoto Date: Thu Jun 6 13:19:24 2019 +0900 ASoC: sof: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sof/nocodec.c | 21 +++++++++++++++++---- sound/soc/sof/topology.c | 20 +++++++++----------- 2 files changed, 26 insertions(+), 15 deletions(-) commit 0467d8ef0f61c91774f49a2d287b4d6fe58d5bdb Author: Kuninori Morimoto Date: Thu Jun 6 13:19:19 2019 +0900 ASoC: vc4: vc4_htmi: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown drivers/gpu/drm/vc4/vc4_hdmi.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit 23b946ce2808bd4f1bfca1bae1fafbf552be18a4 Author: Kuninori Morimoto Date: Thu Jun 6 13:19:14 2019 +0900 ASoC: soc-topology: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/soc-topology.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) commit f60adf38514183b897301cdf616ef8bf5ef34094 Author: Kuninori Morimoto Date: Thu Jun 6 13:19:10 2019 +0900 ASoC: tegra: tegra_max98090: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/tegra/tegra_max98090.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit ec7687d9a10a40dfc34d2d8f546b63195eebdad3 Author: Kuninori Morimoto Date: Thu Jun 6 13:19:05 2019 +0900 ASoC: tegra: tegra_wm9712: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/tegra/tegra_wm9712.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 5e703b906e195bc278d4f88609ea84da8c43cd93 Author: Kuninori Morimoto Date: Thu Jun 6 13:19:01 2019 +0900 ASoC: tegra: tegra_wm8903: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/tegra/tegra_wm8903.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 5a44ad1e587a3ff8d4d92340543327b4245dc7fa Author: Kuninori Morimoto Date: Thu Jun 6 13:18:56 2019 +0900 ASoC: tegra: tegra_rt5640: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/tegra/tegra_rt5640.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit f4d9dd95f31bef764aaa857dbaa0b3ad2aa98298 Author: Kuninori Morimoto Date: Thu Jun 6 13:18:51 2019 +0900 ASoC: tegra: tegra_sgtl5000: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/tegra/tegra_sgtl5000.c | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) commit af297e6f2c6731373a270537b00956c816a43aa7 Author: Kuninori Morimoto Date: Thu Jun 6 13:18:46 2019 +0900 ASoC: tegra: tegra_alc5632: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/tegra/tegra_alc5632.c | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) commit 706e20515ef6a370afb31ac49f897c2d2459011a Author: Kuninori Morimoto Date: Thu Jun 6 13:18:41 2019 +0900 ASoC: tegra: trimslice: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/tegra/trimslice.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit efefce542260fb9c26634fa01582aabc72166259 Author: Kuninori Morimoto Date: Thu Jun 6 13:18:36 2019 +0900 ASoC: tegra: tegra_wm8753: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/tegra/tegra_wm8753.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 9b4f646a3aed26f4cb7f310013d1dda61aab9b47 Author: Kuninori Morimoto Date: Thu Jun 6 13:18:30 2019 +0900 ASoC: tegra: tegra_rt5677: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/tegra/tegra_rt5677.c | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) commit f4010b4c8b382c2acb024fd91e2734323e457f98 Author: Kuninori Morimoto Date: Thu Jun 6 13:18:25 2019 +0900 ASoC: txx9: txx9aclc-generic: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/txx9/txx9aclc-generic.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 950d10e879d4a263ca10ab1ff9657a258208e7b9 Author: Kuninori Morimoto Date: Thu Jun 6 13:18:19 2019 +0900 ASoC: sunxi: sun4i-codec: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sunxi/sun4i-codec.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit 8ad8d81a0ff66f48a28a6fc795524085ce999111 Author: Kuninori Morimoto Date: Thu Jun 6 13:18:14 2019 +0900 ASoC: ux500: mop500: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/ux500/mop500.c | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) commit a39bb1b740c95d8f0029b280266744897453e8ee Author: Kuninori Morimoto Date: Thu Jun 6 13:18:06 2019 +0900 ASoC: sirf: sirf-audio: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sirf/sirf-audio.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 8d6975ea3627d3aff2c9c8bb6b6eb84cddef0e07 Author: Kuninori Morimoto Date: Thu Jun 6 13:18:01 2019 +0900 ASoC: rockchip: rockchip_max98090: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/rockchip/rockchip_max98090.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 0209bf2b2a765cd5c705a1f97e8f57895e3b9821 Author: Kuninori Morimoto Date: Thu Jun 6 13:17:37 2019 +0900 ASoC: rockchip: rockchip_rt5645: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/rockchip/rockchip_rt5645.c | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) commit e0d129d4cac049ff21861f5a73506786e34e7f5a Author: Kuninori Morimoto Date: Thu Jun 6 13:17:31 2019 +0900 ASoC: rockchip: rk3288_hdmi_analog: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/rockchip/rk3288_hdmi_analog.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) commit ca72efb6bdc733006f335ca12ca615395077a873 Author: Robert Hancock Date: Tue Jun 4 16:15:01 2019 -0600 net: phy: Add detection of 1000BaseX link mode support Add 1000BaseX to the link modes which are detected based on the MII_ESTATUS register as per 802.3 Clause 22. This allows PHYs which support 1000BaseX to work properly with drivers using phylink. Previously 1000BaseX support was not detected, and if that was the only mode the PHY indicated support for, phylink would refuse to attach it due to the list of supported modes being empty. Signed-off-by: Robert Hancock Signed-off-by: David S. Miller drivers/net/phy/phy_device.c | 3 +++ include/uapi/linux/mii.h | 2 ++ 2 files changed, 5 insertions(+) commit 96a239b7af0f4d502f7a577bd0df9acb715a9ca6 Author: Kuninori Morimoto Date: Thu Jun 6 13:17:10 2019 +0900 ASoC: rockchip: rk3399_gru_sound: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/rockchip/rk3399_gru_sound.c | 51 +++++++++++++++++++++++++++-------- 1 file changed, 40 insertions(+), 11 deletions(-) commit 98b232ca9e0e7fb0f3be80653f647c8ce369556d Author: Kuninori Morimoto Date: Thu Jun 6 13:17:04 2019 +0900 ASoC: qcom: apq8016_sbc: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/qcom/apq8016_sbc.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit 1e36ea360ab98e9c20329a3d9364705d1347e411 Author: Kuninori Morimoto Date: Thu Jun 6 13:16:58 2019 +0900 ASoC: qcom: common: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/qcom/common.c | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) commit fa350b770b57d6e17b73d259bfec7e40099f7261 Author: Kuninori Morimoto Date: Thu Jun 6 13:16:51 2019 +0900 ASoC: qcom: storm: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/qcom/storm.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 26d8d4b21f9ec7ed2a2e236b048961554ea9bbeb Author: Kuninori Morimoto Date: Thu Jun 6 13:16:44 2019 +0900 ASoC: nuc900: nuc900-audio: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/nuc900/nuc900-audio.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 49cb448846f57227a9758dc71a19ce1e24ddbbdd Author: Kuninori Morimoto Date: Thu Jun 6 13:16:37 2019 +0900 ASoC: mxs: mxs-sgtl5000: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/mxs/mxs-sgtl5000.c | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) commit c84836d7f6509141d5be31cc7a1028228fe0545a Author: Kuninori Morimoto Date: Thu Jun 6 13:16:32 2019 +0900 ASoC: meson: axg-card: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/meson/axg-card.c | 57 ++++++++++++++++++++++++++++++++++------------ 1 file changed, 42 insertions(+), 15 deletions(-) commit 7c5cbcfe966b4952ab69a1f6c8f06806d9396e9d Author: Kuninori Morimoto Date: Thu Jun 6 13:16:26 2019 +0900 ASoC: jz4740: qi_lb60: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/jz4740/qi_lb60.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 79782e283ed3df04bfb77129091f1d6726987f1e Author: Kuninori Morimoto Date: Thu Jun 6 13:16:20 2019 +0900 ASoC: fsl: imx-audmix: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/fsl/imx-audmix.c | 45 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 35 insertions(+), 10 deletions(-) commit 61c29313cb812a6de3dc7bfd7baa3d20cf7e3e83 Author: Kuninori Morimoto Date: Thu Jun 6 13:16:14 2019 +0900 ASoC: fsl: pcm030-audio-fabric: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/fsl/pcm030-audio-fabric.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit 8a147e503dd622fe744759bf6199b2a6da45e893 Author: Kuninori Morimoto Date: Thu Jun 6 13:16:08 2019 +0900 ASoC: fsl: imx-mc13783: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/fsl/imx-mc13783.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 3026ef68d2c508c9c7c88378907c015710eaf90b Author: Kuninori Morimoto Date: Thu Jun 6 13:16:02 2019 +0900 ASoC: fsl: imx-sgtl5000: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/fsl/imx-sgtl5000.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) commit 3219d9c734627cdf9beee3fd2d136e8fbacb5fcd Author: Kuninori Morimoto Date: Thu Jun 6 13:15:54 2019 +0900 ASoC: fsl: eukrea-tlv320: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/fsl/eukrea-tlv320.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit 35f6d3025fa8bd75048ccaff5e51ea5446177c24 Author: Kuninori Morimoto Date: Thu Jun 6 13:15:32 2019 +0900 ASoC: fsl: imx-es8328: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/fsl/imx-es8328.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) commit 6aa7b4091d0bd3866d42e368ef32674aa1c155cc Author: Kuninori Morimoto Date: Thu Jun 6 13:15:25 2019 +0900 ASoC: fsl: mpc8610_hpcd/p1022_ds/p1022_rdk: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. mpc8610_hpcd/p1022_ds/p1022_rdk are sharing fsl_asoc_get_dma_channel() which setups platform. We need to update these by 1 patch. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/fsl/fsl_utils.c | 2 +- sound/soc/fsl/mpc8610_hpcd.c | 33 ++++++++++++++++++++++++++++----- sound/soc/fsl/p1022_ds.c | 36 ++++++++++++++++++++++++++++++------ sound/soc/fsl/p1022_rdk.c | 35 +++++++++++++++++++++++++++++------ 4 files changed, 88 insertions(+), 18 deletions(-) commit 893f195104142c0f83e60a91ccada2653bccee2a Author: Kuninori Morimoto Date: Thu Jun 6 13:15:11 2019 +0900 ASoC: fsl: fsl-asoc-card: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/fsl/fsl-asoc-card.c | 47 ++++++++++++++++++++++++++++--------------- 1 file changed, 31 insertions(+), 16 deletions(-) commit c90cf3d3fb4aee7717eba73f16924394022990bd Author: Kuninori Morimoto Date: Thu Jun 6 13:14:59 2019 +0900 ASoC: fsl: wm1133-ev1: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/fsl/wm1133-ev1.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 7ca8d923511ac3e17ae92b7cbfa12308dce1ed96 Author: Kuninori Morimoto Date: Thu Jun 6 13:14:50 2019 +0900 ASoC: fsl: phycore-ac97: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/fsl/phycore-ac97.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 22bda69c650247008a7c3a1035d239194cb95bde Author: Kuninori Morimoto Date: Thu Jun 6 13:14:44 2019 +0900 ASoC: fsl: mx27vis-aic32x4: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/fsl/mx27vis-aic32x4.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 8337ef4f48876dc4ea9d869a6983c659f65f55bb Author: Kuninori Morimoto Date: Thu Jun 6 13:14:38 2019 +0900 ASoC: fsl: imx-spdif: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/fsl/imx-spdif.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit cf8c3ec87c7259749d079e767b285af5677b411d Author: Kuninori Morimoto Date: Thu Jun 6 13:14:32 2019 +0900 ASoC: fsl: efika-audio-fabric: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/fsl/efika-audio-fabric.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) commit 40989980bf4b9483ad2fb99c58324123a8c74c92 Author: Kuninori Morimoto Date: Thu Jun 6 13:14:28 2019 +0900 ASoC: cirrus: snappercl15: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/cirrus/snappercl15.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit cda80e05c648ff5b702ddbbbf1cd170cc00dba02 Author: Kuninori Morimoto Date: Thu Jun 6 13:14:22 2019 +0900 ASoC: cirrus: simone: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/cirrus/simone.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 5e883ff15fc079a8004a104209e2ecb14e5b4bb0 Author: Kuninori Morimoto Date: Thu Jun 6 13:14:18 2019 +0900 ASoC: cirrus: edb93xx: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/cirrus/edb93xx.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit fc4b060a8c6357b2ee22fe21f261f2fb77d41706 Author: Kuninori Morimoto Date: Thu Jun 6 13:14:13 2019 +0900 ASoC: au1x: db1200: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/au1x/db1200.c | 50 +++++++++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 20 deletions(-) commit 34592f7ecb4e0b1c79ab5669ed3fcbee0ae4b835 Author: Kuninori Morimoto Date: Thu Jun 6 13:14:09 2019 +0900 ASoC: au1x: db1000: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/au1x/db1000.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 3d14a1df7d301eb12592297c4b4ec0a00d76b0f2 Author: Kuninori Morimoto Date: Thu Jun 6 13:14:04 2019 +0900 ASoC: atmel: atmel-classd: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/atmel/atmel-classd.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit f62da10aba7cc7971dace102ad5cc129e4dfbd94 Author: Kuninori Morimoto Date: Thu Jun 6 13:14:00 2019 +0900 ASoC: atmel: atmel-pdmic: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/atmel/atmel-pdmic.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit 079878be6fea4e5671e9fb9020985e4f2b45289c Author: Kuninori Morimoto Date: Thu Jun 6 13:13:55 2019 +0900 ASoC: atmel: atmel-wm8904: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/atmel/atmel_wm8904.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 1199dd99ddf699dd81c764016b8b6a9fd599d0d4 Author: Kuninori Morimoto Date: Thu Jun 6 13:13:51 2019 +0900 ASoC: atmel: tse850-pcm5142: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/atmel/tse850-pcm5142.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit d83923c576f985e8442734d4d89f72af7661fec2 Author: Kuninori Morimoto Date: Thu Jun 6 13:13:46 2019 +0900 ASoC: atmel: sam9g20_wm8731: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/atmel/sam9g20_wm8731.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit 35617d8262c49a1d63a36ef291c5b1a8fdc86bc8 Author: Kuninori Morimoto Date: Thu Jun 6 13:13:42 2019 +0900 ASoC: atmel: sam9x5_wm8731: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/atmel/sam9x5_wm8731.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit ed00d6ccde62a7deafdfbf22d37725945890e536 Author: Kuninori Morimoto Date: Thu Jun 6 13:13:38 2019 +0900 ASoC: atmel: mikroe-proto: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Tested-by: Codrin Ciubotariu Signed-off-by: Mark Brown sound/soc/atmel/mikroe-proto.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit 19913c163e219376e543e8138ca4f05670ee9f4a Author: Kuninori Morimoto Date: Thu Jun 6 13:13:33 2019 +0900 ASoC: amd: acp-rt5645: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/amd/acp-rt5645.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit 48696d0a6d8e5bd2c9e03b70e93f9cf0db31705f Author: Kuninori Morimoto Date: Thu Jun 6 13:13:29 2019 +0900 ASoC: amd: acp-da7219-max98357a: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/amd/acp-da7219-max98357a.c | 42 +++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 20 deletions(-) commit f9aaa1929b2e828d87aee9adb003cd19fbf18f57 Author: Kuninori Morimoto Date: Thu Jun 6 13:13:24 2019 +0900 ASoC: sh: sh7760-ac97: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/sh7760-ac97.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 4f209c5142dcdd4db29f734d652fba4d2ab6da71 Author: Kuninori Morimoto Date: Thu Jun 6 13:13:20 2019 +0900 ASoC: sh: migor: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/migor.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit c3e2a4af64cb74ea66abca1c80aa38b0c9d15567 Author: Kuninori Morimoto Date: Thu Jun 6 13:13:15 2019 +0900 ASoC: ti: rx51: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/ti/rx51.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit d6db366a411c7e3ecc13096c58a290593be7a804 Author: Kuninori Morimoto Date: Thu Jun 6 13:13:11 2019 +0900 ASoC: ti: omap-twl4030: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/ti/omap-twl4030.c | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) commit bc9dfc4cb1d817726774c1ab57c8f866a5e109db Author: Kuninori Morimoto Date: Thu Jun 6 13:13:06 2019 +0900 ASoC: ti: omap-abe-twl6040: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/ti/omap-abe-twl6040.c | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) commit 3b785a63ee3d2bc9eb6473ca9490d5a268c88c3e Author: Kuninori Morimoto Date: Thu Jun 6 13:13:02 2019 +0900 ASoC: ti: omap-hdmi: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/ti/omap-hdmi.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit de3582fec0aacdca484d68ca693e255f2617d8ec Author: Kuninori Morimoto Date: Thu Jun 6 13:12:57 2019 +0900 ASoC: ti: davinci-evm: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/ti/davinci-evm.c | 105 +++++++++++++++++++++++++++++---------------- 1 file changed, 67 insertions(+), 38 deletions(-) commit 77723f1c262f39b4d82eb5fda7ac045c0aea8e3d Author: Kuninori Morimoto Date: Thu Jun 6 13:12:52 2019 +0900 ASoC: ti: omap3pandora: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/ti/omap3pandora.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit acb9a2d52e2c4839c7fcfb72c06ab437eed9cc92 Author: Kuninori Morimoto Date: Thu Jun 6 13:12:48 2019 +0900 ASoC: ti: ams-delta: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/ti/ams-delta.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 5cffc237432d47084add97e42f13dbd055c107a8 Author: Kuninori Morimoto Date: Thu Jun 6 13:12:43 2019 +0900 ASoC: ti: osk5912: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/ti/osk5912.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 789bc177f828d37506ee11a92ff88e3065d572d7 Author: Florian Fainelli Date: Thu May 9 13:29:56 2019 -0700 clk: bcm: Allow CLK_BCM2835 for ARCH_BRCMSTB ARCH_BRCMSTB needs to use the BCM2835 clock driver for chips like BCM7211 which adopted that clock controller, make that possible and the driver default to be enabled for ARCH_BRCMSTB. Signed-off-by: Florian Fainelli Reviewed-by: Eric Anholt Signed-off-by: Stephen Boyd drivers/clk/bcm/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f7554cb47ef1edf9c0000c5a96897cc9bd1f054b Author: Kuninori Morimoto Date: Thu Jun 6 13:12:39 2019 +0900 ASoC: ti: n810: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/ti/n810.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 1d17821f79ae0fe6960231d38aaac66eed707b5f Author: Kuninori Morimoto Date: Thu Jun 6 13:12:34 2019 +0900 ASoC: kirkwood: armada-370-db: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/kirkwood/armada-370-db.c | 42 ++++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 15 deletions(-) commit 8ba9c5cbe9f27808346927bf173b263e2552f80f Author: Kuninori Morimoto Date: Thu Jun 6 13:12:29 2019 +0900 ASoC: pxa: poodle: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/pxa/poodle.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 196a521a3c86eb627004cf6b420cd7b2f6c587a0 Author: Kuninori Morimoto Date: Thu Jun 6 13:12:25 2019 +0900 ASoC: pxa: spitz: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/pxa/spitz.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit cc7b2401cd93a884813af224cc24c8d8f31f39cd Author: Kuninori Morimoto Date: Thu Jun 6 13:12:20 2019 +0900 ASoC: pxa: tosa: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/pxa/tosa.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 0d246384cae61ad45940cacf3960bed29f1cd30c Author: Kuninori Morimoto Date: Thu Jun 6 13:12:16 2019 +0900 ASoC: pxa: ttc-dkb: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/pxa/ttc-dkb.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit dca012bb860239f90931f5943f4a3e6a4c1ddad3 Author: Kuninori Morimoto Date: Thu Jun 6 13:12:11 2019 +0900 ASoC: pxa: z2: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/pxa/z2.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 1129efb0a390c7f00a4e0b70ddc4c8d4860ead39 Author: Kuninori Morimoto Date: Thu Jun 6 13:12:06 2019 +0900 ASoC: pxa: zylonite: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/pxa/zylonite.c | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) commit 5d59f12a19e6cb96a1a72fac2b0d73ab8435b167 Author: Florian Fainelli Date: Thu May 9 13:29:55 2019 -0700 clk: bcm: Make BCM2835 clock drivers selectable Make the BCM2835 clock driver selectable by other architectures/platforms. ARCH_BRCMSTB will be selecting that driver in the next commit since new chips like 7211 use the same CPRMAN clock controller that this driver supports. Signed-off-by: Florian Fainelli Reviewed-by: Eric Anholt Signed-off-by: Stephen Boyd drivers/clk/bcm/Kconfig | 9 +++++++++ drivers/clk/bcm/Makefile | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) commit ef15331de2e4e660361b3a72569011793d3a3d9c Author: Kuninori Morimoto Date: Thu Jun 6 13:12:01 2019 +0900 ASoC: pxa: palm27x: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/pxa/palm27x.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit a94112f5bd0b4b05ba727491c3d96dfb4c702823 Author: Kuninori Morimoto Date: Thu Jun 6 13:11:56 2019 +0900 ASoC: pxa: mioa701_wm9713: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/pxa/mioa701_wm9713.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 018252749ce4cf683ad5164fe47ca00d5c567234 Author: Kuninori Morimoto Date: Thu Jun 6 13:11:51 2019 +0900 ASoC: pxa: magician: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/pxa/magician.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) commit 76359b17c38d513743a151b3cf747a5867dd6216 Author: Kuninori Morimoto Date: Thu Jun 6 13:11:46 2019 +0900 ASoC: pxa: imote2: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/pxa/imote2.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 08baa54ee7d15981aaa4176abd04a6d4206920cb Author: Kuninori Morimoto Date: Thu Jun 6 13:11:41 2019 +0900 ASoC: pxa: hx4700: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/pxa/hx4700.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit d7d8e1b14c165fc4c32037521af736669c454e02 Author: Kuninori Morimoto Date: Thu Jun 6 13:11:18 2019 +0900 ASoC: pxa: em-x270: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/pxa/em-x270.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 32b787a0ce77221f809b42b4cb21b176a0422068 Author: Kuninori Morimoto Date: Thu Jun 6 13:11:12 2019 +0900 ASoC: pxa: e800_wm9712: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/pxa/e800_wm9712.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit f78ced5147dc8dd64053bb905787c332bc195543 Author: Kuninori Morimoto Date: Thu Jun 6 13:11:06 2019 +0900 ASoC: pxa: e750_wm9705: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/pxa/e750_wm9705.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 312989a1ed69564bf6b9d329ce60e39c8487c32a Author: Kuninori Morimoto Date: Thu Jun 6 13:11:01 2019 +0900 ASoC: pxa: e740_wm9705: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/pxa/e740_wm9705.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 432895f4f6d916eed93a6e434adc3c67655de2d2 Author: Kuninori Morimoto Date: Thu Jun 6 13:10:56 2019 +0900 ASoC: pxa: corgi: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/pxa/corgi.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit b63eec7443b16c760ee76a887ed3b715a163580e Author: Kuninori Morimoto Date: Thu Jun 6 13:10:51 2019 +0900 ASoC: pxa: brownstone: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/pxa/brownstone.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 9423082951be26bd60d9fc1133d2ea9014aade6b Author: Kuninori Morimoto Date: Thu Jun 6 13:10:46 2019 +0900 ASoC: samsung: jive_wm8750: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/samsung/jive_wm8750.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit e28d6e02889c7448b470e55ea8440b65fd2ddf75 Author: Kuninori Morimoto Date: Thu Jun 6 13:10:41 2019 +0900 ASoC: samsung: littlemill: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/samsung/littlemill.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit 7989919453afbaa997a848285ee1a3b940f11e4d Author: Kuninori Morimoto Date: Thu Jun 6 13:10:36 2019 +0900 ASoC: samsung: lowland: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/samsung/lowland.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) commit 0391b03374ceb8a4f40e13e1c5780d694488228d Author: Kuninori Morimoto Date: Thu Jun 6 13:10:32 2019 +0900 ASoC: samsung: neo1973_wm8753: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/samsung/neo1973_wm8753.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 3cddda10c25f4627a43f3db9314a9c79c5a60ce1 Author: Kuninori Morimoto Date: Thu Jun 6 13:10:26 2019 +0900 ASoC: samsung: odroid: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/samsung/odroid.c | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) commit 400127a12ae36fe61e2740a96c7bad4755c43d65 Author: Kuninori Morimoto Date: Thu Jun 6 13:10:21 2019 +0900 ASoC: samsung: rx1950_uda1380: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/samsung/rx1950_uda1380.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 1c0f3edbcabd014b70473937199467af3e1339c5 Author: Kuninori Morimoto Date: Thu Jun 6 13:10:16 2019 +0900 ASoC: samsung: s3c24xx_simtec_hermes: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/samsung/s3c24xx_simtec_hermes.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit fba1384c3bff25de469a9dcb970a27669e540f42 Author: Kuninori Morimoto Date: Thu Jun 6 13:10:11 2019 +0900 ASoC: samsung: s3c24xx_simtec_tlv320aic23: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit bb5e4a032488f6257fc9cb942dbbd06e2e9af226 Author: Kuninori Morimoto Date: Thu Jun 6 13:10:06 2019 +0900 ASoC: samsung: s3c24xx_uda134x: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/samsung/s3c24xx_uda134x.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit a259926056dde250bcb34f015dd9eb72d4709b69 Author: Kuninori Morimoto Date: Thu Jun 6 13:10:01 2019 +0900 ASoC: samsung: smartq_wm8987: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/samsung/smartq_wm8987.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit db1623faa43264fe4ef2234cdc555c0623b77482 Author: Kuninori Morimoto Date: Thu Jun 6 13:09:56 2019 +0900 ASoC: samsung: snow: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/samsung/snow.c | 40 ++++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 14 deletions(-) commit 3f60911771a10a8f87e56e61deb501a054c2ea0c Author: Kuninori Morimoto Date: Thu Jun 6 13:09:50 2019 +0900 ASoC: samsung: speyside: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/samsung/speyside.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) commit f1d26f2b947ea6cc3265b0e3c0a265c57a43f945 Author: Kuninori Morimoto Date: Thu Jun 6 13:09:44 2019 +0900 ASoC: samsung: tm2_wm5110: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/samsung/tm2_wm5110.c | 42 ++++++++++++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 12 deletions(-) commit 19bca225e7202710529a14e916a783b1aa42720b Author: Kuninori Morimoto Date: Thu Jun 6 13:09:36 2019 +0900 ASoC: samsung: tobermory: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/samsung/tobermory.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 930f74a171f5f3a5acc551568c6a1515344ceef1 Author: Kuninori Morimoto Date: Thu Jun 6 13:09:30 2019 +0900 ASoC: samsung: arndale_rt5631: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/samsung/arndale_rt5631.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) commit 88dd84a196ef69eb33baf555b74687de192f34a5 Author: Kuninori Morimoto Date: Thu Jun 6 13:09:25 2019 +0900 ASoC: samsung: h1940_uda1380: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/samsung/h1940_uda1380.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit e076cc1d9b0567962d48f67fcf5431237ce0ba10 Author: Kuninori Morimoto Date: Thu Jun 6 13:09:19 2019 +0900 ASoC: samsung: smdk_spdif: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/samsung/smdk_spdif.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 245139b2c25c62225577fd7b7a6125bf6f9717d4 Author: Kuninori Morimoto Date: Thu Jun 6 13:09:12 2019 +0900 ASoC: samsung: smdk_wm8994pcm: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/samsung/smdk_wm8994pcm.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 2f8ea84e3a8c9d57a6c893088a3f6145c96d72ee Author: Kuninori Morimoto Date: Thu Jun 6 13:09:06 2019 +0900 ASoC: samsung: smdk_wm8994: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/samsung/smdk_wm8994.c | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) commit 10601860559d4d2765ff2ccebb3d6a1df4a41c4f Author: Kuninori Morimoto Date: Thu Jun 6 13:09:01 2019 +0900 ASoC: samsung: smdk_wm8580: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/samsung/smdk_wm8580.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 5af5e7609af5e1e82bc6fdc617e0b1f5ef3be5e3 Author: Kuninori Morimoto Date: Thu Jun 6 13:08:55 2019 +0900 ASoC: samsung: bells: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/samsung/bells.c | 87 +++++++++++++++++++++++++++++------------------ 1 file changed, 54 insertions(+), 33 deletions(-) commit fa284fd002477d5e96bd96f638fbebd65316a750 Author: Kuninori Morimoto Date: Thu Jun 6 13:08:49 2019 +0900 ASoC: mediatek: mt8183-mt6358-ts3a227-max98357: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown .../mt8183/mt8183-mt6358-ts3a227-max98357.c | 168 +++++++++++++-------- 1 file changed, 106 insertions(+), 62 deletions(-) commit 4b99064229b426260d6873e865cd9f6732074f6f Author: Kuninori Morimoto Date: Thu Jun 6 13:08:43 2019 +0900 ASoC: mediatek: mt8183-da7219-max98357: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c | 182 ++++++++++++--------- 1 file changed, 107 insertions(+), 75 deletions(-) commit 1fcd25641d440495b26518c97fd6e3665a7df135 Author: Kuninori Morimoto Date: Thu Jun 6 13:08:38 2019 +0900 ASoC: mediatek: mt8173-rt5650-rt5514: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c | 51 ++++++++++++------------ 1 file changed, 26 insertions(+), 25 deletions(-) commit 05ab66178cb27ee795aa458b43818d2caa2d3953 Author: Kuninori Morimoto Date: Thu Jun 6 13:08:23 2019 +0900 ASoC: mediatek: mt8173-rt5650-rt5676: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c | 85 +++++++++++++----------- 1 file changed, 48 insertions(+), 37 deletions(-) commit 166b3f052d3e6b7afd3759797cbd4e4d5fdaef17 Author: Kuninori Morimoto Date: Thu Jun 6 13:08:16 2019 +0900 ASoC: mediatek: mt8173-rt5650: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/mediatek/mt8173/mt8173-rt5650.c | 74 +++++++++++++++++-------------- 1 file changed, 41 insertions(+), 33 deletions(-) commit 1ea15792bc477e100ac2340b7db3c69c95423d23 Author: Kuninori Morimoto Date: Thu Jun 6 13:08:11 2019 +0900 ASoC: mediatek: mt8173-max98090: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/mediatek/mt8173/mt8173-max98090.c | 34 +++++++++++++++++++---------- 1 file changed, 22 insertions(+), 12 deletions(-) commit 4ddabddabf410a261ecbd8177f6e307bdae70d12 Author: Kuninori Morimoto Date: Thu Jun 6 13:08:04 2019 +0900 ASoC: mediatek: mt2701-cs42448: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/mediatek/mt2701/mt2701-cs42448.c | 95 ++++++++++++++++++++---------- 1 file changed, 65 insertions(+), 30 deletions(-) commit b664e06d530eba6c5f2f1a9571c2bc78e9fb783f Author: Kuninori Morimoto Date: Thu Jun 6 13:07:57 2019 +0900 ASoC: mediatek: mt2701-wm8960: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/mediatek/mt2701/mt2701-wm8960.c | 34 ++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 12 deletions(-) commit 9ded5f71114bcf935051db12f0ad1abe4ef497b1 Author: Kuninori Morimoto Date: Thu Jun 6 13:07:49 2019 +0900 ASoC: mediatek: mt6797-mt6351: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/mediatek/mt6797/mt6797-mt6351.c | 115 ++++++++++++++++++++---------- 1 file changed, 76 insertions(+), 39 deletions(-) commit 587c984427bf7d031a2a4b693dfb24a51cd660b2 Author: Kuninori Morimoto Date: Thu Jun 6 13:07:42 2019 +0900 ASoC: soc.h: add sound dai_link connection macro Modern style dai_link requests CPU/Codec/Platform component pointer array and its size, but it will be very verbose code. To avoid such scene, this patch adds dai_link connection macro. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/soc.h | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++++ sound/soc/soc-core.c | 7 +++++ 2 files changed, 95 insertions(+) commit f107294c6422e772773b53dbf802186175b6289e Author: Kuninori Morimoto Date: Thu Jun 6 13:07:35 2019 +0900 ASoC: simple-card: support snd_soc_dai_link_component style for cpu ASoC supports modern style dai_link (= snd_soc_dai_link_component) for CPU. legacy style dai_link (= cpu_dai_name, cpu_name, cpu_of_node) are no longer needed. This patch switches to modern style. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/simple_card_utils.h | 20 ++++++------------ sound/soc/generic/audio-graph-card.c | 30 +++++++-------------------- sound/soc/generic/simple-card-utils.c | 21 ++++++------------- sound/soc/generic/simple-card.c | 39 +++++++++++++---------------------- 4 files changed, 34 insertions(+), 76 deletions(-) commit 08a5841e3a109f9ea7bfa9c64109aefa95a318c7 Author: Kuninori Morimoto Date: Thu Jun 6 13:07:22 2019 +0900 ASoC: soc-core: use snd_soc_dai_link_component for CPU current ALSA SoC is starting to support modern style dai_linke (= struct snd_soc_dai_link_component) which is mainly used for multipul DAI/component connection. Now Codec has full multi-codec support, Platform is using modern style but still for single Platform. Only CPU is not yet supporting modern style yet. If we could support it for CPU, we can switch to modern style dai_link on all CPU/Codec/Platform, and remove legacy style from ALSA SoC. Multi-CPU will be supported in the future. This patch is initial support for modern style for CPU Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/soc.h | 4 +++ sound/soc/soc-core.c | 83 +++++++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 73 insertions(+), 14 deletions(-) commit 64429a8711e121e5d5d93d970c5ed3492332dd18 Author: Shuming Fan Date: Thu Jun 6 14:22:32 2019 +0800 ASoC: rt1011: fix warning reported by kbuild test robot and minor issue This patch fixes following issues: - warning: this decimal constant is unsigned only in ISO C90 - sparse: incorrect type in assignment - check if value.integer.value is zero for "R0 Load Mode" control Signed-off-by: Shuming Fan Signed-off-by: Mark Brown sound/soc/codecs/rt1011.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 83a6edbb8fe928e801b9b6cab13e81109b185918 Author: Nathan Chancellor Date: Wed Jun 5 22:12:27 2019 -0700 ASoC: rt1011: Mark format integer literals as unsigned Clang warns: sound/soc/codecs/rt1011.c:1291:12: warning: integer literal is too large to be represented in type 'long', interpreting as 'unsigned long' per C89; this literal will have type 'long long' in C99 onwards [-Wc99-compat] format = 2147483648; /* 2^24 * 128 */ ^ sound/soc/codecs/rt1011.c:2123:13: warning: integer literal is too large to be represented in type 'long', interpreting as 'unsigned long' per C89; this literal will have type 'long long' in C99 onwards [-Wc99-compat] format = 2147483648; /* 2^24 * 128 */ ^ 2 warnings generated. Mark the integer literals as unsigned explicitly so that if the kernel does ever bump the C standard it uses, the behavior is consitent. Fixes: d6e65bb7ff0d ("ASoC: rt1011: Add RT1011 amplifier driver") Link: https://github.com/ClangBuiltLinux/linux/issues/506 Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Signed-off-by: Mark Brown sound/soc/codecs/rt1011.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9b1ae605c8e295836050fa6eaf720131db2fac73 Author: Kuehling, Felix Date: Fri May 10 19:53:24 2019 +0000 mm/hmm: Only set FAULT_FLAG_ALLOW_RETRY for non-blocking Don't set this flag by default in hmm_vma_do_fault. It is set conditionally just a few lines below. Setting it unconditionally can lead to handle_mm_fault doing a non-blocking fault, returning -EBUSY and unlocking mmap_sem unexpectedly. Signed-off-by: Felix Kuehling Reviewed-by: Jérôme Glisse Signed-off-by: Jason Gunthorpe mm/hmm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 789c2af88f24d1db983aae49b5c4561e6e02ff5b Author: Philip Yang Date: Thu May 23 16:32:31 2019 -0400 mm/hmm: support automatic NUMA balancing While the page is migrating by NUMA balancing, HMM failed to detect this condition and still return the old page. Application will use the new page migrated, but driver pass the old page physical address to GPU, this crash the application later. Use pte_protnone(pte) to return this condition and then hmm_vma_do_fault will allocate new page. Signed-off-by: Philip Yang Signed-off-by: Felix Kuehling Reviewed-by: Jérôme Glisse Signed-off-by: Jason Gunthorpe mm/hmm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 085ea25064a9169eba5f2ed6484c111ab0f3ee79 Author: Ralph Campbell Date: Mon May 6 16:29:39 2019 -0700 mm/hmm: clean up some coding style and comments There are no functional changes, just some coding style clean ups and minor comment changes. Cc: John Hubbard Cc: Ira Weiny Cc: Dan Williams Cc: Arnd Bergmann Cc: Balbir Singh Cc: Dan Carpenter Cc: Matthew Wilcox Cc: Souptick Joarder Cc: Andrew Morton Signed-off-by: Ralph Campbell Reviewed-by: Jérôme Glisse Signed-off-by: Jason Gunthorpe include/linux/hmm.h | 71 +++++++++++++++++++++++++++-------------------------- mm/hmm.c | 62 ++++++++++++++++++++++++---------------------- 2 files changed, 68 insertions(+), 65 deletions(-) commit 2076e5c0451ca943ff8ecc6def7239c84c77e070 Author: Ralph Campbell Date: Mon May 6 16:29:38 2019 -0700 mm/hmm: update HMM documentation Update the HMM documentation to reflect the latest API and make a few minor wording changes. Cc: John Hubbard Cc: Ira Weiny Cc: Dan Williams Cc: Arnd Bergmann Cc: Balbir Singh Cc: Dan Carpenter Cc: Matthew Wilcox Cc: Souptick Joarder Cc: Andrew Morton Signed-off-by: Ralph Campbell Reviewed-by: Jérôme Glisse Signed-off-by: Jason Gunthorpe Documentation/vm/hmm.rst | 141 +++++++++++++++++++++++++---------------------- include/linux/hmm.h | 7 ++- 2 files changed, 78 insertions(+), 70 deletions(-) commit 1c2308f0f03fdbbc674f53450eaa76943e0506f0 Author: Jason Gunthorpe Date: Mon May 27 17:02:21 2019 -0300 mm/hmm.c: suppress compilation warnings when CONFIG_HUGETLB_PAGE is not set gcc reports that several variables are defined but not used. For the first hunk CONFIG_HUGETLB_PAGE the entire if block is already protected by pud_huge() which is forced to 0. None of the stuff under the ifdef causes compilation problems as it is already stubbed out in the header files. For the second hunk the dummy huge_page_shift macro doesn't touch the argument, so just inline the argument. Link: http://lkml.kernel.org/r/20190522195151.GA23955@ziepe.ca Signed-off-by: Jason Gunthorpe Reviewed-by: Andrew Morton Reviewed-by: Ira Weiny Signed-off-by: Andrew Morton mm/hmm.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit bff5e8071533e8a298a060ff4a257eb5e818661b Author: Dan Murphy Date: Wed Jun 5 07:56:32 2019 -0500 regulator: lm363x: Add support for LM36274 Adding regulator support for the LM36274 backlight driver. This device can leverage this existing code as the functionality and registers are common enough between the LM36274 and the LM363x series of devices. Signed-off-by: Dan Murphy Acked-by: Mark Brown Acked-by: Pavel Machek Signed-off-by: Jacek Anaszewski drivers/regulator/Kconfig | 2 +- drivers/regulator/lm363x-regulator.c | 78 ++++++++++++++++++++++++++++++++++-- 2 files changed, 75 insertions(+), 5 deletions(-) commit 9c523efb749de01f0ec172d1160bb6ef8d1620a4 Author: Dan Murphy Date: Wed Jun 5 07:56:31 2019 -0500 mfd: ti-lmu: Add LM36274 support to the ti-lmu Add the LM36274 register support to the ti-lmu MFD driver. Signed-off-by: Dan Murphy Acked-by: Lee Jones Acked-by: Pavel Machek Signed-off-by: Jacek Anaszewski drivers/mfd/Kconfig | 5 ++--- drivers/mfd/ti-lmu.c | 14 ++++++++++++++ include/linux/mfd/ti-lmu-register.h | 23 +++++++++++++++++++++++ include/linux/mfd/ti-lmu.h | 4 ++++ 4 files changed, 43 insertions(+), 3 deletions(-) commit 4665743276c3e8efaa4da54eabe8f54b2f99e335 Author: Dan Murphy Date: Wed Jun 5 07:56:30 2019 -0500 dt-bindings: mfd: Add lm36274 bindings to ti-lmu Add the LM36274 backlight driver with regulator support. This is a multi-function device for backlight applications. Backlight properties will be documented in it's a supplemental bindings document. Regulator support is documented in the regulator/lm363x-regulator.txt http://www.ti.com/lit/ds/symlink/lm36274.pdf Signed-off-by: Dan Murphy Reviewed-by: Rob Herring Acked-by: Lee Jones Acked-by: Pavel Machek Signed-off-by: Jacek Anaszewski Documentation/devicetree/bindings/mfd/ti-lmu.txt | 54 ++++++++++++++++++++++++ 1 file changed, 54 insertions(+) commit 39f82358485123cbc602ecb5040a95d6e4edaf27 Author: YueHaibing Date: Thu Jun 6 22:46:49 2019 +0800 net: mscc: ocelot: remove unused variable 'vcap_data_t' Fix sparse warning: drivers/net/ethernet/mscc/ocelot_ace.c:96:3: warning: symbol 'vcap_data_t' was not declared. Should it be static? 'vcap_data_t' never used so can be removed Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: David S. Miller drivers/net/ethernet/mscc/ocelot_ace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4c34282fb7d7a1d47a4d901554b574ea6b256cd5 Author: Martin Blumenstingl Date: Sat May 25 20:42:53 2019 +0200 clk: pwm: implement the .get_duty_cycle callback Commit 9fba738a53dda2 ("clk: add duty cycle support") added support for getting and setting the duty cycle of a clock. This implements the get_duty_cycle callback for PWM based clocks so the duty cycle is shown in the debugfs output (/sys/kernel/debug/clk/clk_summary). Signed-off-by: Martin Blumenstingl Signed-off-by: Stephen Boyd drivers/clk/clk-pwm.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 5b51ae969e3d8ab0134ee3c98a769ad6d2cc2e24 Author: Borislav Petkov Date: Fri May 17 15:45:08 2019 +0200 x86/boot: Call get_rsdp_addr() after console_init() ... so that early debugging output from the RSDP parsing code can be visible and collected. Suggested-by: Dave Young Signed-off-by: Borislav Petkov Cc: Baoquan He Cc: Chao Fan Cc: Jun'ichi Nomura Cc: Kairui Song Cc: kexec@lists.infradead.org Cc: x86@kernel.org arch/x86/boot/compressed/misc.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 8e44c7840479edacc4a03d396c8d214576c8d411 Author: Borislav Petkov Date: Tue Apr 30 20:38:34 2019 +0200 Revert "x86/boot: Disable RSDP parsing temporarily" TODO: - ask dyoung and Dirk van der Merwe to test again. This reverts commit 36f0c423552dacaca152324b8e9bda42a6d88865. Now that the required fixes are in place, reenable early RSDP parsing. Signed-off-by: Borislav Petkov Cc: Baoquan He Cc: Chao Fan Cc: Dave Hansen Cc: "H. Peter Anvin" Cc: indou.takao@jp.fujitsu.com Cc: Ingo Molnar Cc: Juergen Gross Cc: kasong@redhat.com Cc: Kees Cook Cc: "Kirill A. Shutemov" Cc: msys.mizuma@gmail.com Cc: Thomas Gleixner Cc: Tom Lendacky Cc: x86-ml arch/x86/boot/compressed/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0a23ebc66a46786769dd68bfdaa3102345819b9c Author: Junichi Nomura Date: Thu Apr 11 15:49:32 2019 +0200 x86/boot: Use efi_setup_data for searching RSDP on kexec-ed kernels Commit 3a63f70bf4c3a ("x86/boot: Early parse RSDP and save it in boot_params") broke kexec boot on EFI systems. efi_get_rsdp_addr() in the early parsing code tries to search RSDP from the EFI tables but that will crash because the table address is virtual when the kernel was booted by kexec (set_virtual_address_map() has run in the first kernel and cannot be run again in the second kernel). In the case of kexec, the physical address of EFI tables is provided via efi_setup_data in boot_params, which is set up by kexec(1). Factor out the table parsing code and use different pointers depending on whether the kernel is booted by kexec or not. [ bp: Massage. ] Fixes: 3a63f70bf4c3a ("x86/boot: Early parse RSDP and save it in boot_params") Signed-off-by: Jun'ichi Nomura Signed-off-by: Borislav Petkov Tested-by: Dirk van der Merwe Cc: Chao Fan Cc: Dave Young Link: https://lkml.kernel.org/r/20190408231011.GA5402@jeru.linux.bs1.fc.nec.co.jp arch/x86/boot/compressed/acpi.c | 143 ++++++++++++++++++++++++++++++---------- 1 file changed, 107 insertions(+), 36 deletions(-) commit a19a0582363b9a5f8ba812f34f1b8df394898780 Author: Fabio Estevam Date: Thu Jun 6 09:40:33 2019 -0300 net: fec: Do not use netdev messages too early When a valid MAC address is not found the current messages are shown: fec 2188000.ethernet (unnamed net_device) (uninitialized): Invalid MAC address: 00:00:00:00:00:00 fec 2188000.ethernet (unnamed net_device) (uninitialized): Using random MAC address: aa:9f:25:eb:7e:aa Since the network device has not been registered at this point, it is better to use dev_err()/dev_info() instead, which will provide cleaner log messages like these: fec 2188000.ethernet: Invalid MAC address: 00:00:00:00:00:00 fec 2188000.ethernet: Using random MAC address: aa:9f:25:eb:7e:aa Tested on a imx6dl-pico-pi board. Signed-off-by: Fabio Estevam Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fec_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6bbeb276b71f06c5267bfd154629b1bec82e7136 Author: Kairui Song Date: Mon Apr 29 08:23:18 2019 +0800 x86/kexec: Add the EFI system tables and ACPI tables to the ident map Currently, only the whole physical memory is identity-mapped for the kexec kernel and the regions reserved by firmware are ignored. However, the recent addition of RSDP parsing in the decompression stage and especially: 33f0df8d843d ("x86/boot: Search for RSDP in the EFI tables") which tries to access EFI system tables and to dig out the RDSP address from there, becomes a problem because in certain configurations, they might not be mapped in the kexec'ed kernel's address space. What is more, this problem doesn't appear on all systems because the kexec kernel uses gigabyte pages to build the identity mapping. And the EFI system tables and ACPI tables can, depending on the system configuration, end up being mapped as part of all physical memory, if they share the same 1 GB area with the physical memory. Therefore, make sure they're always mapped. [ bp: productize half-baked patch: - rewrite commit message. - correct the map_acpi_tables() function name in the !ACPI case. ] Signed-off-by: Kairui Song Signed-off-by: Baoquan He Signed-off-by: Borislav Petkov Tested-by: Dirk van der Merwe Cc: dyoung@redhat.com Cc: fanc.fnst@cn.fujitsu.com Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: j-nomura@ce.jp.nec.com Cc: kexec@lists.infradead.org Cc: "Kirill A. Shutemov" Cc: Lianbo Jiang Cc: Tetsuo Handa Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/20190429002318.GA25400@MiWiFi-R3L-srv arch/x86/kernel/machine_kexec_64.c | 75 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) commit fe1e0713bbe84c6796b01d50a55ce4e324141161 Author: Litao jiao Date: Thu Jun 6 17:57:58 2019 +0800 vxlan: Use FDB_HASH_SIZE hash_locks to reduce contention The monolithic hash_lock could cause huge contention when inserting/deletiing vxlan_fdbs into the fdb_head. Use FDB_HASH_SIZE hash_locks to protect insertions/deletions of vxlan_fdbs into the fdb_head hash table. Suggested-by: David S. Miller Signed-off-by: Litao jiao Signed-off-by: David S. Miller drivers/net/vxlan.c | 92 ++++++++++++++++++++++++++++++++++------------------- include/net/vxlan.h | 2 +- 2 files changed, 60 insertions(+), 34 deletions(-) commit 4daa95af7f1c78fa6f8e2a92dc7d52c46443974e Author: Colin Ian King Date: Thu Jun 6 09:40:39 2019 +0100 ipv6: fix spelling mistake: "wtih" -> "with" There is a spelling mistake in a NL_SET_ERR_MSG message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller net/ipv6/route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 355f948adf3aedb1b2f1644ce5bbefe39177e28a Author: Heiner Kallweit Date: Thu Jun 6 07:49:17 2019 +0200 r8169: silence sparse warning in rtl8169_start_xmit The opts[] array is of type u32. Therefore remove the wrong cpu_to_le32(). The opts[] array members are converted to little endian later when being assigned to the respective descriptor fields. This is not a new issue, it just popped up due to r8169.c having been renamed and more thoroughly checked. Due to the renaming this patch applies to net-next only. Reported-by: kbuild test robot Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3bb936f5b92a0a6b6f4d16d834243e2f62521349 Author: Amadeusz Sławiński Date: Wed Jun 5 15:45:53 2019 +0200 ASoC: core: Tell codec that jack is being removed When component is being removed we should disable jack, otherwise some codecs will try to trigger interrupt using freed structures. Signed-off-by: Amadeusz Sławiński Signed-off-by: Mark Brown sound/soc/soc-core.c | 1 + 1 file changed, 1 insertion(+) commit 619c15f7fac98fbeaae02d76a5529f5026a2b6d7 Author: Maxime Ripard Date: Wed Jun 5 12:08:01 2019 +0200 ASoC: sun4i-i2s: Change SR and WSS computation The current computation for the SR (sample resolution) and the WSS (word slot size) register parameters is based on a switch returning the matching parameters for a given params width. Later SoCs (A83t, H3, A64) changed that calculation, which was loosely the same with an offset. Therefore, an offset was added to adjust those parameters. However, the calculation is a bit less trivial than initially thought. Indeed, while we assumed that SR and WSS were always the same, on older SoCs, SR will max at 24 (since those SoCs do not support 32 bits formats), but the word size can be 32. Newer SoCs can also support a much larger range (8 bits to 32 bits, by increments of 4) of size than the older SoCs could. Finally, the A64 and A83t were never adjusted to have that offset in the first place, and were therefore broken from that point of view. In order to fix all those issues, let's introduce two functions, get_wss and get_sr, with their respective implementations for all the SoCs supported so far. Fixes: 21faaea1343f ("ASoC: sun4i-i2s: Add support for A83T") Fixes: 66ecce332538 ("ASoC: sun4i-i2s: Add compatibility with A64 codec I2S") Signed-off-by: Maxime Ripard Signed-off-by: Mark Brown sound/soc/sunxi/sun4i-i2s.c | 71 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 55 insertions(+), 16 deletions(-) commit 58d494669f36d0b61b7ec42c232877167ed3f5ce Author: Andy Shevchenko Date: Wed Jun 5 19:51:13 2019 +0300 docs/core-api: Add integer power functions to the list Some times integer power functions, such as int_sqrt(), are needed, but there is nothing about them in the generated documentation. Fill the gap by adding a reference to the corresponding exported functions. Signed-off-by: Andy Shevchenko Acked-by: Mike Rapoport Signed-off-by: Jonathan Corbet Documentation/core-api/kernel-api.rst | 9 +++++++++ 1 file changed, 9 insertions(+) commit b422124758c19db06c4c30c4abb8f57bf18995b9 Author: Andy Shevchenko Date: Wed Jun 5 19:39:44 2019 +0300 docs/core-api: Add string helpers API to the list Some times string helpers are needed, but there is nothing about them in the generated documentation. Fill the gap by adding a reference to string_helpers.c exported functions. Signed-off-by: Andy Shevchenko Acked-by: Mike Rapoport Signed-off-by: Jonathan Corbet Documentation/core-api/kernel-api.rst | 3 +++ 1 file changed, 3 insertions(+) commit 9c3cef54c50d93871eaa46c28a06de8bd03fab63 Author: Peter Zijlstra Date: Thu Jun 6 11:34:28 2019 +0200 VMCI: Fixup atomic64_t abuse The VMCI driver is abusing atomic64_t and atomic_t, there is no actual atomic RmW operations around. Rewrite the code to use a regular u64 with READ_ONCE() and WRITE_ONCE() and a cast to 'unsigned long'. This fully preserves whatever broken there was (it's not endian-safe for starters, and also looks to be missing ordering). Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Greg Kroah-Hartman include/linux/vmw_vmci_defs.h | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) commit 9cd9e749e99c2d939202c01f449deb5f6a9b5bfa Merge: 18e1572419d6 ee5dc0491c38 Author: Jonathan Corbet Date: Thu Jun 6 09:46:52 2019 -0600 Merge branch 'vfs' into docs-next Work from Tobin Harding: Here is an updated version of the VFS doc conversion. This series in no way represents a final point for the VFS documentation rather it is a small step towards getting VFS docs updated. This series does not update the content of vfs.txt, only does formatting. commit ee5dc0491c38ae4e4e583d7532d470754bb173f6 Author: Tobin C. Harding Date: Tue Jun 4 10:26:56 2019 +1000 docs: filesystems: vfs: Render method descriptions Currently vfs.rst does not render well into HTML the method descriptions for VFS data structures. We can improve the HTML output by putting the description string on a new line following the method name. Suggested-by: Jonathan Corbet Signed-off-by: Tobin C. Harding Signed-off-by: Jonathan Corbet Documentation/filesystems/vfs.rst | 1147 +++++++++++++++++++++---------------- 1 file changed, 642 insertions(+), 505 deletions(-) commit 5e2f97a93f7043f2a95caebceea1ac5f9adf8ff9 Author: Sam Ravnborg Date: Wed Jun 5 15:48:35 2019 +0200 drm/sti: drop use of drmP.h Stop using the deprecated drmP.h header file. Replaced with relevant forwards or headers files. Header files sorted in all files touched. Build tested with allyesconfig, allmodconfig for a number of architectures. Signed-off-by: Sam Ravnborg Cc: Benjamin Gaignard Cc: Vincent Abriou Cc: David Airlie Cc: Daniel Vetter Signed-off-by: Benjamin Gaignard Link: https://patchwork.freedesktop.org/patch/msgid/20190605134835.25112-2-sam@ravnborg.org drivers/gpu/drm/sti/sti_awg_utils.c | 2 ++ drivers/gpu/drm/sti/sti_awg_utils.h | 2 +- drivers/gpu/drm/sti/sti_compositor.c | 5 ++++- drivers/gpu/drm/sti/sti_crtc.c | 4 +++- drivers/gpu/drm/sti/sti_crtc.h | 6 ++++-- drivers/gpu/drm/sti/sti_cursor.c | 2 ++ drivers/gpu/drm/sti/sti_cursor.h | 3 +++ drivers/gpu/drm/sti/sti_drv.c | 11 ++++++----- drivers/gpu/drm/sti/sti_drv.h | 5 +++-- drivers/gpu/drm/sti/sti_dvo.c | 3 ++- drivers/gpu/drm/sti/sti_gdp.c | 4 ++++ drivers/gpu/drm/sti/sti_gdp.h | 5 +++++ drivers/gpu/drm/sti/sti_hda.c | 6 +++++- drivers/gpu/drm/sti/sti_hdmi.c | 5 ++++- drivers/gpu/drm/sti/sti_hdmi.h | 4 +++- drivers/gpu/drm/sti/sti_hdmi_tx3g4c28phy.c | 2 ++ drivers/gpu/drm/sti/sti_hqvdp.c | 8 +++++++- drivers/gpu/drm/sti/sti_mixer.c | 4 ++++ drivers/gpu/drm/sti/sti_mixer.h | 7 ++++++- drivers/gpu/drm/sti/sti_plane.c | 4 +++- drivers/gpu/drm/sti/sti_plane.h | 1 - drivers/gpu/drm/sti/sti_tvout.c | 6 +++++- drivers/gpu/drm/sti/sti_vid.c | 4 +++- drivers/gpu/drm/sti/sti_vtg.c | 4 +++- drivers/gpu/drm/sti/sti_vtg.h | 1 + 25 files changed, 85 insertions(+), 23 deletions(-) commit d0a178095c5fbbd25454c20e49bc3a7d70ecb769 Author: Tomas Winkler Date: Thu Jun 6 16:31:08 2019 +0300 mei: docs: update mei documentation The mei driver went via multiple changes, update the documentation and fix formatting. Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman Documentation/driver-api/mei/mei.rst | 96 +++++++++++++++++++++++------------- 1 file changed, 61 insertions(+), 35 deletions(-) commit ac543d7145bf3ad13f67a087196e6879e6993aac Author: Chris Wilson Date: Fri May 31 12:32:45 2019 +0100 drm/i915: Report an earlier wedged event when suspending the engines On i915_gem_load_power_context() we do care whether or not we succeed in completing the switch back to the kernel context (via idling the engines). Currently, we detect if an error occurs while we wait, but we do not report one if it occurred beforehand (and the status of the switch is undefined). Check the current terminally wedged status on entering the wait, and report it after flushing the requests, as if it had occurred during our own wait. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110824 Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190531113245.30042-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gem/i915_gem_pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0e3743d870711ae4daf1e7170c8d9381564e244d Author: Mariusz Bialonczyk Date: Sat May 25 10:45:38 2019 +0200 w1: ds2805: rename w1_family struct, fixing c-p typo The ds2805 has a structure named: w1_family_2d, which surely comes from a w1_ds2431 module. This commit fixes this name to prevent confusion and mark a correct family name. Signed-off-by: Mariusz Bialonczyk Signed-off-by: Greg Kroah-Hartman drivers/w1/slaves/w1_ds2805.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit aacd152ecd7b18af5d2d96dea9e7284c1c93abea Author: Mariusz Bialonczyk Date: Thu May 30 09:51:25 2019 +0200 w1: ds2413: fix state byte comparision This commit is fixing a smatch warning: drivers/w1/slaves/w1_ds2413.c:61 state_read() warn: impossible condition '(*buf == 255) => ((-128)-127 == 255)' by creating additional u8 variable for the bus reading and comparision Reported-by: kbuild test robot Reported-by: Dan Carpenter Cc: Dan Carpenter Fixes: 3856032a0628 ("w1: ds2413: when the slave is not responding during read, select it again") Signed-off-by: Mariusz Bialonczyk Signed-off-by: Greg Kroah-Hartman drivers/w1/slaves/w1_ds2413.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 2f57b95caf8f6db7a1295fc9940f91184ced912b Author: Lukasz Luba Date: Tue Jan 15 17:12:16 2019 +0100 clk: samsung: add new clocks for DMC for Exynos5422 SoC This patch provides support for clocks needed for Dynamic Memory Controller in Exynos5422 SoC. It adds CDREX base register addresses, new DIV, MUX and GATE entries. Acked-by: Chanwoo Choi Acked-by: Krzysztof Kozlowski Signed-off-by: Lukasz Luba Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk-exynos5420.c | 61 ++++++++++++++++++++++++++++++++---- 1 file changed, 55 insertions(+), 6 deletions(-) commit 8b4a7acf7b30c811c5cd8b70b615ca8f9efe86cc Author: Lukasz Luba Date: Wed Jun 5 18:54:00 2019 +0200 clk: samsung: add BPLL rate table for Exynos 5422 SoC Add new table rate for BPLL for Exynos5422 SoC supporting Dynamic Memory Controller frequencies for driver's DRAM timings. Acked-by: Chanwoo Choi Acked-by: Krzysztof Kozlowski Signed-off-by: Lukasz Luba Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk-exynos5420.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit cc9bdecf4b8d20b3d3d0f8a6cb3e577548b5539f Author: Lukasz Luba Date: Wed Jun 5 18:53:58 2019 +0200 clk: samsung: add needed IDs for DMC clocks in Exynos5420 Define new IDs for clocks used by Dynamic Memory Controller in Exynos5422 SoC. Acked-by: Rob Herring Acked-by: Chanwoo Choi Acked-by: Krzysztof Kozlowski Signed-off-by: Lukasz Luba Signed-off-by: Sylwester Nawrocki include/dt-bindings/clock/exynos5420.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit 7433f1fb8ec8fe40d069215ae431d5c33235bfb5 Author: Biju Das Date: Thu May 30 15:57:46 2019 +0100 arm64: dts: renesas: Add HiHope RZ/G2M sub board support The HiHope RZ/G2M sub board sits below the HiHope RZ/G2M main board. This patch also adds ethernet support along with a dtsi common to both HiHope RZ/G2M and RZ/G2N sub boards. Signed-off-by: Biju Das Reviewed-by: Chris Paterson Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/Makefile | 1 + arch/arm64/boot/dts/renesas/hihope-common.dtsi | 2 + arch/arm64/boot/dts/renesas/hihope-rzg2-ex.dtsi | 55 ++++++++++++++++++++++ .../boot/dts/renesas/r8a774a1-hihope-rzg2m-ex.dts | 15 ++++++ 4 files changed, 73 insertions(+) commit 871c13a443de63c18c26f5ad725da58fc8e19f13 Author: Biju Das Date: Thu May 30 15:57:45 2019 +0100 arm64: dts: renesas: hihope-common: Add pincontrol support to scif2/scif clock This patch adds pincontrol support to scif2/scif clock. Signed-off-by: Biju Das Reviewed-by: Chris Paterson Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/hihope-common.dtsi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 438419ebd3f86221390e481f84db61fd7c5aa2b9 Author: Biju Das Date: Thu May 30 15:57:44 2019 +0100 arm64: dts: renesas: Add HiHope RZ/G2M main board support Basic support for the HiHope RZ/G2M main board: - Memory, - Main crystal, - Serial console This patch also includes a dtsi common to both HiHope RZ/G2M and RZ/G2N main boards. Signed-off-by: Biju Das Reviewed-by: Chris Paterson Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/Makefile | 1 + arch/arm64/boot/dts/renesas/hihope-common.dtsi | 33 ++++++++++++++++++++++ .../boot/dts/renesas/r8a774a1-hihope-rzg2m.dts | 26 +++++++++++++++++ 3 files changed, 60 insertions(+) commit 3bde449f0bf10e2660ad2858a0334f0eccf21a1c Author: Ville Syrjälä Date: Wed May 29 14:02:04 2019 +0300 drm/edid: Ignore "DFP 1.x" bit for EDID 1.2 and earlier From VESA EDID implementation guide v1.0: "For EDID version 1 revision 2 or earlier data structures when offset 14h bit 7 is set to one, the value of bits 6-0 are undefined, and therefore cannot be interpreted to mean anything." And since EDID 1.4 redefines that bit let's consult it only for EDID 1.3. Cc: Mario Kleiner Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190529110204.2384-2-ville.syrjala@linux.intel.com Reviewed-by: Alex Deucher Reviewed-by: Mario Kleiner drivers/gpu/drm/drm_edid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7e706da35a458f4b0d4c565c7b71023d8bfe279b Author: Tomas Winkler Date: Mon Jun 3 12:14:06 2019 +0300 mei: docs: fix broken links in iamt documentation. The iAMT documentation moved from http:// https://, and LMS is moved to github.com Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman Documentation/driver-api/mei/iamt.rst | 105 ++++++++++++++++------------------ 1 file changed, 50 insertions(+), 55 deletions(-) commit 0475afd2a5dee99defdb7b030c09ba202ea3c64a Author: Tomas Winkler Date: Mon Jun 3 12:14:05 2019 +0300 mei: docs: add hdcp documentation 1. Add a short ducumentation for MEI HDCP driver, and fix DOC comments in drivers/misc/mei/hdcp/mei_hdcp.c Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman Documentation/driver-api/mei/hdcp.rst | 32 +++++++++++++++++++++++++ Documentation/driver-api/mei/mei-client-bus.rst | 1 + drivers/misc/mei/hdcp/mei_hdcp.c | 11 ++++----- 3 files changed, 37 insertions(+), 7 deletions(-) commit 4e3d3b784ae7cd86ace2776c01be99ddfd378801 Author: Tomas Winkler Date: Mon Jun 3 12:14:04 2019 +0300 mei: docs: add a short description for nfc behind mei Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman Documentation/driver-api/mei/index.rst | 2 +- Documentation/driver-api/mei/mei-client-bus.rst | 7 +++++++ Documentation/driver-api/mei/nfc.rst | 28 +++++++++++++++++++++++++ 3 files changed, 36 insertions(+), 1 deletion(-) commit 6080e0cff2bf7108d3f2855a7177b1f7f1830035 Author: Tomas Winkler Date: Mon Jun 3 12:14:03 2019 +0300 mei: docs: update mei client bus documentation. The mei client bus API has changed significantly from time it was documented, and had required update. Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman Documentation/driver-api/mei/mei-client-bus.rst | 162 +++++++++++++----------- 1 file changed, 85 insertions(+), 77 deletions(-) commit 815d0f26c104873eb829e24510383d4d098417dd Author: Tomas Winkler Date: Mon Jun 3 12:14:01 2019 +0300 mei: docs: move iamt docs to a iamt.rst file Move intel amt documentation to a seprate file. Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman Documentation/driver-api/mei/iamt.rst | 106 +++++++++++++++++++++++++++++++++ Documentation/driver-api/mei/index.rst | 1 + Documentation/driver-api/mei/mei.rst | 100 ------------------------------- 3 files changed, 107 insertions(+), 100 deletions(-) commit 7e527e11d672e90f1a3dc8de84e0bfaccda15bba Author: Tomas Winkler Date: Mon Jun 3 12:14:00 2019 +0300 mei: docs: move documentation under driver-api Move mei driver documentation under Documentation/driver-api/ Perform some minimal formating changes to produce correct sphinx rendering and add index.rst Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman Documentation/driver-api/index.rst | 1 + Documentation/driver-api/mei/index.rst | 22 ++++ .../mei/mei-client-bus.rst} | 135 +++++++++++---------- .../mei/mei.txt => driver-api/mei/mei.rst} | 30 ++--- MAINTAINERS | 2 +- 5 files changed, 104 insertions(+), 86 deletions(-) commit 382d2af64e7d7083eefcc8c7e6c780634174ce87 Author: Ville Syrjälä Date: Wed May 29 14:02:03 2019 +0300 drm/edid: Clean up DRM_EDID_DIGITAL_* flags Give the "DFP 1.x" bit a proper name, and clean up the rest of the bits defines as well. Cc: Mario Kleiner Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190529110204.2384-1-ville.syrjala@linux.intel.com Reviewed-by: Alex Deucher Reviewed-by: Mario Kleiner drivers/gpu/drm/drm_edid.c | 2 +- include/drm/drm_edid.h | 32 +++++++++++++++++--------------- 2 files changed, 18 insertions(+), 16 deletions(-) commit 17dcc588d42b3e24a8482c60759201f138700ec0 Author: Geordan Neukum Date: Wed Jun 5 01:09:13 2019 +0000 staging: kpc2000: kpc_spi: remove unnecessary cast in [read|write]_reg() The kpc_spi driver unnecessarily casts from a (u64 __iomem *) to a (void *) when invoking readq and writeq which both take a (void __iomem *) arg. There is no need for this cast, and it actually harms us by discarding the sparse cookie, __iomem. Make the driver stop performing this casting operation. Signed-off-by: Geordan Neukum Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000_spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fbf476ea29cc7294586dcf0b89f22593458deb0d Author: Geordan Neukum Date: Wed Jun 5 01:09:12 2019 +0000 staging: kpc2000: kpc_spi: remove unnecessary ulong repr of i/o addr The kpc_spi driver stashes off an unsigned long representation of the i/o mapping returned by devm_ioremap_nocache(). This is unnecessary, as the only use of the unsigned long repr is to eventually be re-cast to an (u64 __iomem *). Instead of casting the (void __iomem *) to an (unsigned long) then a (u64 __iomem *), just remove this intermediate step. As this intermediary is no longer used, also remove it from its structure. Signed-off-by: Geordan Neukum Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000_spi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 77a91f4b68b09774ab4608348557efaf262a6428 Author: Geordan Neukum Date: Wed Jun 5 01:09:11 2019 +0000 staging: kpc2000: kpc_spi: remove unnecessary struct member chip_select The structure kp_spi_controller_state, defined in the kpc2000_spi driver, contains a member named chip_select which is never used after initialization. Therefore, it should be removed for simplicity's sake. Signed-off-by: Geordan Neukum Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000_spi.c | 2 -- 1 file changed, 2 deletions(-) commit dafcc4a54672875a155fb8272528820150043781 Author: Geordan Neukum Date: Wed Jun 5 01:09:10 2019 +0000 staging: kpc2000: kpc_spi: remove unnecessary struct member word_len The structure kp_spi_controller_state, defined in the kpc2000_spi driver, contains a member named word_len which is never used after initialization. Therefore, it should be removed for simplicity's sake. Signed-off-by: Geordan Neukum Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000_spi.c | 3 --- 1 file changed, 3 deletions(-) commit d06ad04b7d8720c7793fc06d808e66ce8d3999f9 Author: Geordan Neukum Date: Wed Jun 5 01:09:09 2019 +0000 staging: kpc2000: kpc_spi: remove unnecessary struct member pin_dir The structure kpc_spi, defined in in the kpc2000_spi driver, contains a member named pin_dir which is never used after initialization. Therefore, it should be removed for simplicity's sake. Signed-off-by: Geordan Neukum Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000_spi.c | 2 -- 1 file changed, 2 deletions(-) commit 8b37865055fe26c33f01823b2a1bfa1b7c526152 Author: Geordan Neukum Date: Wed Jun 5 01:09:08 2019 +0000 staging: kpc2000: kpc_spi: remove unnecessary struct member phys The structure kp_spi_controller_state, defined in the kpc2000_spi driver, contains a member named phys which is never used after initialization. Therefore, it should be removed for simplicity's sake. Signed-off-by: Geordan Neukum Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000_spi.c | 2 -- 1 file changed, 2 deletions(-) commit fa6a80ca5a6052d07ca9582759116bcea0dd9ad6 Author: Fabio Estevam Date: Wed Jun 5 18:54:22 2019 -0300 staging: kpc2000: Use '%zu' for printing 'size_t' type In order to print a 'size_t' type the '%zu' specifier needs to be used. Change it accordingly in order to fix the following build warning: drivers/staging/kpc2000/kpc_dma/fileops.c:57:35: warning: format '%ld' expects argument of type 'long int', but argument 8 has type 'size_t {aka unsigned int}' [-Wformat=] Reported-by: Build bot for Mark Brown Signed-off-by: Fabio Estevam Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc_dma/fileops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 89a237aa84c7047cafba99f5dc81983ed0c40704 Author: Fabio Estevam Date: Wed Jun 5 18:54:21 2019 -0300 staging: kpc2000: Use '%llx' for printing 'long long int' type In order to print a 'long long int' type the 'llx' specifier needs to be used. Change it accordingly in order to fix the following build warning: drivers/staging/kpc2000/kpc2000/core.c:245:4: warning: format '%lx' expects argument of type 'long unsigned int', but argument 4 has type 'long long int' [-Wformat=] Reported-by: Build bot for Mark Brown Signed-off-by: Fabio Estevam Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/core.c | 2 +- drivers/staging/kpc2000/kpc2000/pcie.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 7942b209ade7c0671a228e4b9b7519d4c79c6e71 Author: Valerio Genovese Date: Wed Jun 5 18:55:16 2019 +0200 staging: staging: kpc2000: kpc_dma: fix symbol 'kpc_dma_add_device' was not declared. This was reported by sparse: drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c:39:7: warning: symbol 'kpc_dma_add_device ' was not declared. Should it be static? Signed-off-by: Valerio Genovese Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 259c20b38d285caf5187a183789ba13cafa0e8df Author: George G. Davis Date: Wed Jun 5 16:30:11 2019 -0400 staging: most: trivial: fix a couple of typos Fix the following typos: "comoponent" -> "component" "communiction" -> "communication" Cc: Jiri Kosina Signed-off-by: George G. Davis Signed-off-by: Greg Kroah-Hartman drivers/staging/most/Documentation/ABI/configfs-most.txt | 16 ++++++++-------- drivers/staging/most/Documentation/driver_usage.txt | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) commit 15c1843d70a456a1c6eede3c5014be68a915ca08 Author: Nishka Dasgupta Date: Tue Jun 4 12:59:24 2019 +0530 staging: rtl8712: Replace function r8712_free_network_queue Remove function r8712_free_network_queue, as it does nothing but call _free_network queue; rename _free_network_queue to r8712_free_network_queue to enable continued functionality; change the type of r8712_free_network_queue (formerly _free_network_queue) from static to non-static to match the type of the old r8712_free_network_queue. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_mlme.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit ca039163d8ddf3e00e6602b66c21f9b089884e6e Author: Nishka Dasgupta Date: Tue Jun 4 13:39:10 2019 +0530 staging: rtl8188eu: core: Remove initialisation of return variable Remove initialisation of return variable as it is never used. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dfa6cbbf3c35dcbc05268f43f77886087003d9ab Author: Hariprasad Kelam Date: Mon Jun 3 23:22:24 2019 +0530 staging: rtl8723bs: hal: fix error "do not initialise globals to 0" this patch fixes below Errors reported by checkpatch ERROR: do not initialise globals to 0 +u8 g_fwdl_chksum_fail = 0; ERROR: do not initialise globals to 0 +u8 g_fwdl_wintint_rdy_fail = 0; Signed-off-by: Hariprasad Kelam Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c1c7830cc717e1b45a65d626c89074737351b479 Author: Simon Sandström Date: Tue Jun 4 00:29:16 2019 +0200 staging: kpc2000: fix incorrect code comment in core.c Step 11 was removed from kp2000_pcie_probe in a previous commit but the comment was not changed to reflect this, so do it now. Signed-off-by: Simon Sandström Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a1ceab8b925199fd30ca777215957f374d3366a5 Author: Simon Sandström Date: Tue Jun 4 00:29:15 2019 +0200 staging: kpc2000: use sizeof(var) in kzalloc call Fixes checkpatch.pl warning "Prefer kzalloc(sizeof(*pcard)...) over kzalloc(sizeof(struct kp2000_device)...)". Signed-off-by: Simon Sandström Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a12cae870afc084b9d6bfb7d805a92d61392c418 Author: Simon Sandström Date: Tue Jun 4 00:29:14 2019 +0200 staging: kpc2000: remove unnecessary include in core.c Fixes checkpatch.pl warning "Use #include instead of ". Signed-off-by: Simon Sandström Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/core.c | 1 - 1 file changed, 1 deletion(-) commit 745cde4ef6e3e32cb13312c346626f2bc4ebf6e2 Author: Simon Sandström Date: Tue Jun 4 00:29:13 2019 +0200 staging: kpc2000: use __func__ in debug messages in core.c Fixes checkpatch.pl warning "Prefer using '"%s...", __func__' to using '', this function's name, in a string". Signed-off-by: Simon Sandström Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/core.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 5298be4877f39b1cd926adeed58a424996999193 Author: Simon Sandström Date: Tue Jun 4 00:29:12 2019 +0200 staging: kpc2000: remove unnecessary oom message in core.c Fixes checkpatch.pl warning "Possible unnecessary 'out of memory' message". Signed-off-by: Simon Sandström Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/core.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 1c10f069407417ffa1c4b3f508ea1ab5425e1e7c Author: Simon Sandström Date: Tue Jun 4 00:29:11 2019 +0200 staging: kpc2000: remove unnecessary parentheses in core.c Fixes checkpatch.pl check "Unnecessary parentheses around pdev->dev.kobj". Signed-off-by: Simon Sandström Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 636928fc127549658ac6bfaae2c106d68195a063 Author: Simon Sandström Date: Tue Jun 4 00:29:10 2019 +0200 staging: kpc2000: simplify comparisons to NULL in core.c Fixes checkpatch.pl warnings "Comparison to NULL could be written [...]" and "Comparisons should place the constant on the right side of the test". Signed-off-by: Simon Sandström Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/core.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 1fe2d6f94f96e35f0d71721eb899f5f72d5b68bd Author: Chris Wilson Date: Tue Jun 4 16:24:08 2019 +0100 drm/i915: Skip context_barrier emission for unused contexts The intent was to skip unused HW contexts by checking ce->state. However, this only works for execlists where the ppGTT pointers is stored inside the HW context. For gen7, the ppGTT is alongside the logical state and must be updated on all active engines but, crucially, only on active engines. As we need different checks, and to keep context_barrier_task() agnostic, pass in the predicate. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110836 Fixes: 62c8e423450d ("drm/i915: Skip unused contexts for context_barrier_task()") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Mika Kuoppala Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190604152408.24468-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gem/i915_gem_context.c | 15 ++++++++++++++- drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c | 19 +++++++++++++++---- 2 files changed, 29 insertions(+), 5 deletions(-) commit 155ab8836caa69579a97a02ccafee929091170b5 Author: Chris Wilson Date: Thu Jun 6 12:23:20 2019 +0100 drm/i915: Move object close under its own lock Use i915_gem_object_lock() to guard the LUT and active reference to allow us to break free of struct_mutex for handling GEM_CLOSE. Testcase: igt/gem_close_race Testcase: igt/gem_exec_parallel Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20190606112320.9704-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gem/i915_gem_context.c | 80 +++++++++++++---------- drivers/gpu/drm/i915/gem/i915_gem_context_types.h | 12 +--- drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 25 ++++--- drivers/gpu/drm/i915/gem/i915_gem_object.c | 38 ++++++----- drivers/gpu/drm/i915/gem/i915_gem_object_types.h | 1 - drivers/gpu/drm/i915/gem/selftests/mock_context.c | 1 - drivers/gpu/drm/i915/i915_drv.h | 4 +- drivers/gpu/drm/i915/i915_gem.c | 1 + drivers/gpu/drm/i915/i915_gem_gtt.c | 1 + drivers/gpu/drm/i915/i915_timeline.c | 13 ++-- drivers/gpu/drm/i915/i915_vma.c | 48 +++++++++----- drivers/gpu/drm/i915/i915_vma.h | 17 +++-- drivers/gpu/drm/i915/selftests/mock_gem_device.c | 1 + 13 files changed, 139 insertions(+), 103 deletions(-) commit 913f36b6242a52cec5c1b366dbcc3adf4f99eeb9 Author: Maxime Ripard Date: Sat May 25 15:03:29 2019 +0200 ARM: dts: sun8i: r40: Change the RTC compatible Unlike what's being reported in the device tree so far, the RTC in the R40 is quite different from the H3. Indeed it doesn't have the internal oscillator output, and it has only a single interrupt. Let's add a compatible for it. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-r40.dtsi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 33e877f347779dbd4f0e22ca3921e0e6773d4766 Author: Maxime Ripard Date: Thu May 23 15:20:49 2019 +0200 ARM: dts: sun8i: v3s: Add external crystals accuracy The V3s datasheet mandates oscillators accuracy to be within 50ppm. Let's add that accuracy to their device tree nodes. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-v3s.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 65a4a40215a9488c5dd04c9f2e313cd36c9475fa Author: Maxime Ripard Date: Sat May 25 15:09:19 2019 +0200 ARM: dts: sun8i: v3s: Fix the RTC node For some reason, while the v3s has a dedicated compatible in the RTC binding, the one actually used was the A31's. However, it turns out that the controller is pretty different (which justified the compatible). Let's use the proper compatible, and use the proper binding description as well. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-v3s.dtsi | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 562b9526ee0c1956e4c2c77e73297ac617b2991c Author: Maxime Ripard Date: Thu May 23 15:20:49 2019 +0200 ARM: dts: sun6i: Add external crystals accuracy The A31 datasheet mandates oscillators accuracy to be within 50ppm. Let's add that accuracy to their device tree nodes. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun6i-a31.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit b9cb524971245fe4e3b3e8f721985036df853bc5 Author: Maxime Ripard Date: Thu May 23 15:20:36 2019 +0200 ARM: dts: sun6i: Fix RTC node The RTC node doesn't match what is described in the binding for historical reasons. Let's add the proper description. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun6i-a31.dtsi | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 7d2129310b8c1f22850d56b1725447aef88d8b1f Author: Douglas Anderson Date: Tue Jun 4 15:31:59 2019 -0700 clk: rockchip: Remove 48 MHz PLL rate from rk3288 The 48 MHz PLL rate is not present in the downstream chromeos-3.14 tree. Looking at history, it was originally removed in ("CHROMIUM: clk: rockchip: expand more clocks support") with no explanation. Much of that patch was later reverted in ("CHROMIUM: clk: rockchip: Revert more questionable PLL rates"), but that patch left in the removal of 48 MHz. What I wrote in that patch: > Note that the original change also removed the rate (48000000, 1, > 64, 32) from the table. I have no idea why that was squashed in > there, but that rate was invalid anyway (it appears to have an out > of bounds NO). I'm not putting that rate in. Reading the TRM I see that NO is defined as - NO: 1, 2-16 (even only) ...and furthermore only 4 bits are assigned for NO-1, which means that the highest NO we could even represent is 16. Signed-off-by: Douglas Anderson Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-rk3288.c | 1 - 1 file changed, 1 deletion(-) commit f2f2bb60d998abde10de7e483ef9e17639892450 Author: Hans de Goede Date: Fri May 24 14:57:59 2019 +0200 drm: panel-orientation-quirks: Add quirk for GPD MicroPC GPD has done it again, make a nice device (good), use way too generic DMI strings (bad) and use a portrait screen rotated 90 degrees (ugly). Because of the too generic DMI strings this entry is also doing bios-date matching, so the gpd_micropc data struct may very well need to be updated with some extra bios-dates in the future. Acked-by: Maxime Ripard Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20190524125759.14131-2-hdegoede@redhat.com drivers/gpu/drm/drm_panel_orientation_quirks.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 6dab9102dd7b144e5723915438e0d6c473018cd0 Author: Hans de Goede Date: Fri May 24 14:57:58 2019 +0200 drm: panel-orientation-quirks: Add quirk for GPD pocket2 GPD has done it again, make a nice device (good), use way too generic DMI strings (bad) and use a portrait screen rotated 90 degrees (ugly). Because of the too generic DMI strings this entry is also doing bios-date matching, so the gpd_pocket2 data struct may very well need to be updated with some extra bios-dates in the future. Changes in v2: -Add one more known BIOS date to the list of BIOS dates Cc: Jurgen Kramer Reported-by: Jurgen Kramer Acked-by: Maxime Ripard Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20190524125759.14131-1-hdegoede@redhat.com drivers/gpu/drm/drm_panel_orientation_quirks.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit b8925b7c2f867df6ce3e20deb4b3e2b9b32b20ff Author: Matthias Kaehlcke Date: Wed Jun 5 13:43:19 2019 -0700 ARM: dts: rockchip: Split GPIO keys for veyron into multiple devices With a single device DT overrides can become messy, especially when keys are added or removed. Multiple devices also allow to enable/disable wakeup per key/group. Signed-off-by: Matthias Kaehlcke [used actual switch+event constants in new lid-switch entry] Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288-veyron-chromebook.dtsi | 27 ++++++++++-------- arch/arm/boot/dts/rk3288-veyron-minnie.dts | 38 +++++++++++++------------ arch/arm/boot/dts/rk3288-veyron-pinky.dts | 2 +- arch/arm/boot/dts/rk3288-veyron.dtsi | 4 +-- 4 files changed, 38 insertions(+), 33 deletions(-) commit cd6386087d826b9421ed97b778676f4177ffdfbd Author: Douglas Anderson Date: Thu May 2 15:53:36 2019 -0700 ARM: dts: rockchip: Add HDMI i2c unwedging for rk3288-veyron Veyron uses the builtin i2c controller that's part of dw-hdmi. Hook up the unwedging feature. Signed-off-by: Douglas Anderson Reviewed-by: Sean Paul Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288-veyron.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c077d9d717dc481a6a95f9ef2562ef6bda74fbdf Author: Douglas Anderson Date: Thu May 2 15:53:35 2019 -0700 ARM: dts: rockchip: Add unwedge pinctrl entries for dw_hdmi on rk3288 This adds the "unwedge" pinctrl entries introduced by a recent dw_hdmi change that can unwedge the dw_hdmi i2c bus in some cases. It's expected that any boards using this would add: pinctrl-names = "default", "unwedge"; pinctrl-0 = <&hdmi_ddc>; pinctrl-1 = <&hdmi_ddc_unwedge>; Note that this isn't added by default because some boards may choose to mux i2c5 for their DDC bus (if that is more tested for them). Signed-off-by: Douglas Anderson Reviewed-by: Sean Paul Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) commit bf09924f21767e6bb7cb3aae48c48c2c2ab8261a Author: Douglas Anderson Date: Thu May 2 15:53:34 2019 -0700 ARM: dts: rockchip: Switch to builtin HDMI DDC bus on rk3288-veyron Downstream Chrome OS kernels use the builtin DDC bus from dw_hdmi on veyron. This is the only way to get them to negotiate HDCP. Although HDCP isn't currently all supported upstream, it still seems like it makes sense to use dw_hdmi's builtin I2C. Maybe eventually we can get HDCP negotiation working. Signed-off-by: Douglas Anderson Reviewed-by: Sean Paul Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288-veyron.dtsi | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit d6624cc7502127c0e8e7c86bcf151850f1765bd3 Author: Maxime Ripard Date: Tue May 28 22:30:36 2019 +0200 rtc: sun6i: Add R40 compatible The R40 has a quite different RTC, with only a single interrupt line, but two clock outputs. Let's add a compatible. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Signed-off-by: Alexandre Belloni drivers/rtc/rtc-sun6i.c | 1 + 1 file changed, 1 insertion(+) commit f5a336496e0f9aacb451b3b72eb44f78b3fe604c Author: Maxime Ripard Date: Tue May 28 22:30:35 2019 +0200 dt-bindings: rtc: sun6i: Add the R40 RTC compatible The R40 has a pretty different RTC compared to the other SoCs we've encountered so far, the most important difference being that it now has only a single interrupt, compared to the previous SoCs having two. Let's add a compatible for that. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Signed-off-by: Alexandre Belloni .../bindings/rtc/allwinner,sun6i-a31-rtc.yaml | 25 +++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) commit 5a0797599b472d6fa35bed483e67c02c380ef041 Author: Maxime Ripard Date: Tue May 28 22:30:34 2019 +0200 dt-bindings: rtc: Convert Allwinner A31 RTC to a schema The newer Allwinner SoCs have an embedded RTC supported in Linux, with a matching Device Tree binding. Now that we have the DT validation in place, let's convert the device tree bindings for that controller over to a YAML schemas. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Signed-off-by: Alexandre Belloni .../bindings/rtc/allwinner,sun6i-a31-rtc.yaml | 115 +++++++++++++++++++++ .../devicetree/bindings/rtc/sun6i-rtc.txt | 46 --------- 2 files changed, 115 insertions(+), 46 deletions(-) commit 36e63ef3582b7cf68ad21fea056a278f9ccef6eb Author: Maxime Ripard Date: Tue May 28 22:30:33 2019 +0200 dt-bindings: rtc: Convert Allwinner A10 RTC to a schema The older Allwinner SoCs have an embedded RTC supported in Linux, with a matching Device Tree binding. Now that we have the DT validation in place, let's convert the device tree bindings for that controller over to a YAML schemas. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Signed-off-by: Alexandre Belloni .../bindings/rtc/allwinner,sun4i-a10-rtc.yaml | 43 ++++++++++++++++++++++ .../devicetree/bindings/rtc/sunxi-rtc.txt | 17 --------- 2 files changed, 43 insertions(+), 17 deletions(-) commit 43390e0710fdfe4bd7793570c45d9092ed93da1b Author: Maxime Ripard Date: Tue May 28 22:30:32 2019 +0200 dt-bindings: rtc: Move trivial RTC over to a schemas of their own The RTC generic bindings has a bunch of devices that have a pretty simple binding, with just compatible, reg and optional interrupts properties. This is exactly what the trivial devices YAML schema has been created for, except that they can also have the start-year property, but not any other generic RTC property. Let's create a schema with those constraints. Signed-off-by: Maxime Ripard Signed-off-by: Alexandre Belloni Documentation/devicetree/bindings/rtc/rtc.txt | 39 --------- .../devicetree/bindings/rtc/trivial-rtc.yaml | 92 ++++++++++++++++++++++ 2 files changed, 92 insertions(+), 39 deletions(-) commit 7bdcb8e0454af9f1b3cd16239ae87c9d00f7a134 Author: Maxime Ripard Date: Tue May 28 22:30:31 2019 +0200 dt-bindings: rtc: Add YAML schemas for the generic RTC bindings The real time clocks have a bunch of generic properties that are needed in a device tree. Add a YAML schemas for those. Signed-off-by: Maxime Ripard Signed-off-by: Alexandre Belloni Documentation/devicetree/bindings/rtc/rtc.txt | 34 +----------------- Documentation/devicetree/bindings/rtc/rtc.yaml | 50 ++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 33 deletions(-) commit 16e6427c88c5b7e7b6612f6c286d5f71d659e5be Author: wenxu Date: Sun Jun 2 21:49:26 2019 +0800 netfilter: ipv6: Fix undefined symbol nf_ct_frag6_gather CONFIG_NETFILTER=m and CONFIG_NF_DEFRAG_IPV6 is not set ERROR: "nf_ct_frag6_gather" [net/ipv6/ipv6.ko] undefined! Fixes: c9bb6165a16e ("netfilter: nf_conntrack_bridge: fix CONFIG_IPV6=y") Reported-by: kbuild test robot Signed-off-by: wenxu Signed-off-by: Pablo Neira Ayuso net/ipv6/netfilter.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 1882018a70e06376234133e69ede9dd743b4dbd9 Author: Daniel Vetter Date: Wed Jun 5 21:45:56 2019 +0200 drm/crc-debugfs: User irqsafe spinlock in drm_crtc_add_crc_entry We can be called from any context, we need to be prepared. Noticed this while hacking on vkms, which calls this function from a normal worker. Which really upsets lockdep. Cc: Rodrigo Siqueira Cc: Tomeu Vizoso Cc: Emil Velikov Cc: Benjamin Gaignard Reviewed-by: Benjamin Gaignard Reviewed-by: Ville Syrjälä Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190605194556.16744-1-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_debugfs_crc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 800037e815b91d8c9ad67906d18129e79a2cfcba Author: Fabrizio Castro Date: Fri May 31 16:58:53 2019 +0100 arm64: dts: renesas: r8a774a1: Add operating points The RZ/G2M (a.k.a. r8a774a1) comes with two clusters of processors, similarly to the r8a7796. The first cluster is made of A57s, the second cluster is made of A53s. The operating points for the cluster with the A57s are: Frequency | Voltage -----------|--------- 500 MHz | 0.82V 1.0 GHz | 0.82V 1.5 GHz | 0.82V The operating points for the cluster with the A53s are: Frequency | Voltage -----------|--------- 800 MHz | 0.82V 1.0 GHz | 0.82V 1.2 GHz | 0.82V This patch adds the definitions for the operating points to the SoC specific DT. Signed-off-by: Fabrizio Castro Reviewed-by: Chris Paterson Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a774a1.dtsi | 48 +++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit 70c6d23ea70c19e5166e4e87d9240f8a4d89d8b2 Author: Simon Horman Date: Thu May 23 16:25:44 2019 +0200 arm64: dts: renesas: r8a77990: Add dynamic power coefficient Describe the dynamic power coefficient of A53 CPUs. Based on work by Gaku Inami and others. Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77990.dtsi | 1 + 1 file changed, 1 insertion(+) commit 8fa7d18f9ee2dc20b5ad430e9b0c5336619f05e4 Author: Dien Pham Date: Thu May 23 16:25:43 2019 +0200 arm64: dts: renesas: r8a77990: Create thermal zone to support IPA Setup a thermal zone driven by SoC temperature sensor. Create passive trip points and bind them to CPUFreq cooling device that supports power extension. In R-Car Gen3, IPA is supported for only one channel Reason: Currently, IPA controls base on only CPU temperature. And only one thermal channel is assembled closest CPU cores is selected as target of IPA. If other channels are used, IPA controlling is not properly. A single cooling device is described for all A53 CPUs as this reflects that physically there is only one cooling device present. This patch improves on an earlier version by: * Omitting cooling-max-level and cooling-min-level properties which are no longer present in mainline as of v4.17 * Removing an unused trip-point0 node sub-property from the trips property. * Defers adding dynamic-power-coefficient properties to a separate patch as these are properties of the CPU. The long signed-off by chain below reflects many revisions, mainly internal, that this patch has been through. Signed-off-by: Dien Pham Signed-off-by: Takeshi Kihara Signed-off-by: Yoshihiro Kaneko Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77990.dtsi | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit eb2cd8c259d4593d6a75118f4671bcf9f5e11365 Author: Simon Horman Date: Thu May 23 16:25:42 2019 +0200 arm64: dts: renesas: r8a77965: Add dynamic power coefficient Describe the dynamic power coefficient of A57 and A53 CPUs. Based on work by Gaku Inami and others. Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77965.dtsi | 1 + 1 file changed, 1 insertion(+) commit 7ec67eddfb8e1657d151bfb3eb69c6d3a58ffe06 Author: Dien Pham Date: Thu May 23 16:25:41 2019 +0200 arm64: dts: renesas: r8a77965: Create thermal zone to support IPA Setup a thermal zone driven by SoC temperature sensor. Create passive trip points and bind them to CPUFreq cooling device that supports power extension. In R-Car Gen3, IPA is supported for only one channel (on H3/M3/M3N SoCs, it is channel THS3). Reason: Currently, IPA controls base on only CPU temperature. And only one thermal channel is assembled closest CPU cores is selected as target of IPA. If other channels are used, IPA controlling is not properly. The A57 cooling device supports 5 cooling states which can be categorised as follows: 0 & 1) boost (clocking up) 2) default 3 & 4) cooling (clocking down) Currently the thermal framework assumes that the default is the minimum, or in other words there is no provision for handling boost states. So this patch only describes the upper 3 states, default and cooling. A single cooling device is described for all A57 CPUs and a separate cooling device is described for all A53 CPUs. This reflects that physically there is only one cooling device present for each type of CPU. This patch improves on an earlier version by: * Omitting cooling-max-level and cooling-min-level properties which are no longer present in mainline as of v4.17 * Removing an unused trip-point0 node sub-property from the trips property. * Using cooling-device indexes such that maximum refers to maximum cooling rather than the inverse. * Defers adding dynamic-power-coefficient properties to a separate patch as these are properties of the CPU. The long signed-off by chain below reflects many revisions, mainly internal, that this patch has been through. Signed-off-by: Dien Pham Signed-off-by: An Huynh Signed-off-by: Takeshi Kihara Signed-off-by: Yoshihiro Kaneko Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77965.dtsi | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 9fed1b89c0cdc11645cdb102b9d58598829e319d Author: Simon Horman Date: Thu May 23 16:25:40 2019 +0200 arm64: dts: renesas: r8a7796: Add dynamic power coefficient Describe the dynamic power coefficient of A57 and A53 CPUs. Based on work by Gaku Inami and others. Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7796.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 81022ecd2720a5bf2c7163e6cc3fcfe51bf23ce0 Author: Dien Pham Date: Thu May 23 16:25:39 2019 +0200 arm64: dts: renesas: r8a7796: Create thermal zone to support IPA Setup a thermal zone driven by SoC temperature sensor. Create passive trip points and bind them to CPUFreq cooling device that supports power extension. In R-Car Gen3, IPA is supported for only one channel (on H3/M3/M3N SoCs, it is channel THS3). Reason: Currently, IPA controls base on only CPU temperature. And only one thermal channel is assembled closest CPU cores is selected as target of IPA. If other channels are used, IPA controlling is not properly. The A57 cooling device supports 5 cooling states which can be categorised as follows: 0 & 1) boost (clocking up) 2) default 3 & 4) cooling (clocking down) Currently the thermal framework assumes that the default is the minimum, or in other words there is no provision for handling boost states. So this patch only describes the upper 3 states, default and cooling. A single cooling device is described for all A57 CPUs and a separate cooling device is described for all A53 CPUs. This reflects that physically there is only one cooling device present for each type of CPU. This patch improves on an earlier version by: * Omitting cooling-max-level and cooling-min-level properties which are no longer present in mainline as of v4.17 * Removing an unused trip-point0 node sub-property from the trips property. * Using cooling-device indexes such that maximum refers to maximum cooling rather than the inverse. * Defers adding dynamic-power-coefficient properties to a separate patch as these are properties of the CPU. The long signed-off by chain below reflects many revisions, mainly internal, that this patch has been through. Signed-off-by: Dien Pham Signed-off-by: Hien Dang Signed-off-by: An Huynh Signed-off-by: Takeshi Kihara Signed-off-by: Yoshihiro Kaneko Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7796.dtsi | 44 +++++++++++--------------------- 1 file changed, 15 insertions(+), 29 deletions(-) commit 47e1714ab93da6936bc662fe4a19a2c183d5b1a1 Author: Simon Horman Date: Thu May 23 16:25:38 2019 +0200 arm64: dts: renesas: r8a7795: Add dynamic power coefficient Describe the dynamic power coefficient of A57 and A53 CPUs. Based on work by Gaku Inami and others. Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 15d8cd83b7ef889f45375c7a3e106e429e874602 Author: Dien Pham Date: Thu May 23 16:25:37 2019 +0200 arm64: dts: renesas: r8a7795: Create thermal zone to support IPA Setup a thermal zone driven by SoC temperature sensor. Create passive trip points and bind them to CPUFreq cooling device that supports power extension. In R-Car Gen3, IPA is supported for only one channel (on H3/M3/M3N SoCs, it is channel THS3). Reason: Currently, IPA controls base on only CPU temperature. And only one thermal channel is assembled closest CPU cores is selected as target of IPA. If other channels are used, IPA controlling is not properly. The A5 cooling device supports 5 cooling states which can be categorised as follows: 0 & 1) boost (clocking up) 2) default 3 & 4) cooling (clocking down) Currently the thermal framework assumes that the default is the minimum, or in other words there is no provision for handling boost states. So this patch only describes the upper 3 states, default and cooling. A single cooling device is described for all A57 CPUs and a separate cooling device is described for all A53 CPUs. This reflects that physically there is only one cooling device present for each type of CPU. This patch improves on an earlier version by: * Omitting cooling-max-level and cooling-min-level properties which are no longer present in mainline as of v4.17 * Removing an unused trip-point0 node sub-property from the trips property. * Using cooling-device indexes such that maximum refers to maximum cooling rather than the inverse. * Defers adding dynamic-power-coefficient properties to a separate patch as these are properties of the CPU. The long signed-off by chain below reflects many revisions, mainly internal, that this patch has been through. Signed-off-by: Dien Pham Signed-off-by: Keita Kobayashi Signed-off-by: Gaku Inami Signed-off-by: Hien Dang Signed-off-by: An Huynh Signed-off-by: Takeshi Kihara Signed-off-by: Yoshihiro Kaneko Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795.dtsi | 52 +++++++++----------------------- 1 file changed, 15 insertions(+), 37 deletions(-) commit 7794bd7ed709abe042fed6e0a09712d8cd55b589 Author: Yoshihiro Shimoda Date: Thu May 23 20:06:56 2019 +0900 arm64: dts: renesas: Revise usb2_phy nodes and phys properties Since the commit 233da2c9ec22 ("dt-bindings: phy: rcar-gen3-phy-usb2: Revise #phy-cells property") revised the #phy-cells, this patch follows the updated document for R-Car Gen3 and RZ/A2 SoCs. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a774a1.dtsi | 14 +++++++------- arch/arm64/boot/dts/renesas/r8a774c0.dtsi | 8 ++++---- arch/arm64/boot/dts/renesas/r8a7795.dtsi | 28 ++++++++++++++-------------- arch/arm64/boot/dts/renesas/r8a7796.dtsi | 14 +++++++------- arch/arm64/boot/dts/renesas/r8a77965.dtsi | 14 +++++++------- arch/arm64/boot/dts/renesas/r8a77990.dtsi | 8 ++++---- arch/arm64/boot/dts/renesas/r8a77995.dtsi | 8 ++++---- 7 files changed, 47 insertions(+), 47 deletions(-) commit 90d4fa39d028f2e46c57c3d0e1b759e5287d98b7 Author: Takeshi Kihara Date: Wed Nov 21 08:08:08 2018 -0800 arm64: dts: renesas: ebisu: Remove renesas, no-ether-link property It is incorrect to specify the no-ether-link property for the AVB device on the Ebisu board. This is because the property should only be used when a board does not provide a proper AVB_LINK signal. However, the Ebisu board does provide this signal. As per 87c059e9c39d ("arm64: dts: renesas: salvator-x: Remove renesas, no-ether-link property") this fixes a bug: Steps to reproduce: - start AVB TX stream (Using aplay via MSE), - disconnect+reconnect the eth cable, - after a reconnection the eth connection goes iteratively up/down without user interaction, - this may heal after some seconds or even stay for minutes. As the documentation specifies, the "renesas,no-ether-link" option should be used when a board does not provide a proper AVB_LINK signal. There is no need for this option enabled on RCAR H3/M3 Salvator-X/XS and ULCB starter kits since the AVB_LINK is correctly handled by HW. Choosing to keep or remove the "renesas,no-ether-link" option will have impact on the code flow in the following ways: - keeping this option enabled may lead to unexpected behavior since the RX & TX are enabled/disabled directly from adjust_link function without any HW interrogation, - removing this option, the RX & TX will only be enabled/disabled after HW interrogation. The HW check is made through the LMON pin in PSR register which specifies AVB_LINK signal value (0 - at low level; 1 - at high level). In conclusion, the present change is also a safety improvement because it removes the "renesas,no-ether-link" option leading to a proper way of detecting the link state based on HW interrogation and not on software heuristic. Fixes: 8441ef643d7d ("arm64: dts: renesas: r8a77990: ebisu: Enable EthernetAVB") Signed-off-by: Takeshi Kihara [simon: updated changelog] Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts | 1 - 1 file changed, 1 deletion(-) commit 11290c09e29600f45684113d78209d1df1c22aba Author: Robin Murphy Date: Tue May 21 17:44:26 2019 +0100 arm64: dts: renesas: r8a774c0: Clean up CPU compatibles Apparently this DTS crossed over with commit 31af04cd60d3 ("arm64: dts: Remove inconsistent use of 'arm,armv8' compatible string") and missed out on the cleanup, so put it right. Signed-off-by: Robin Murphy Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a774c0.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b31b43c92daee8628c60b411452b1b17acdac580 Author: Magnus Damm Date: Sat May 18 19:04:06 2019 +0900 arm64: dts: renesas: Use ip=on for bootargs Convert bootargs from ip=dhcp to ip=on Signed-off-by: Magnus Damm Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a774c0-cat874.dts | 2 +- arch/arm64/boot/dts/renesas/r8a77970-eagle.dts | 2 +- arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts | 2 +- arch/arm64/boot/dts/renesas/r8a77995-draak.dts | 2 +- arch/arm64/boot/dts/renesas/salvator-common.dtsi | 2 +- arch/arm64/boot/dts/renesas/ulcb.dtsi | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) commit 9d79b2f1aed4909988ecd8b370c7919856639699 Author: Fabrizio Castro Date: Fri May 17 10:26:28 2019 +0100 dt-bindings: Add vendor prefix for HopeRun Add "Jiangsu HopeRun Software Co., Ltd." to the list of devicetree vendor prefixes as "hoperun". Website: http://www.hoperun.com/en Signed-off-by: Fabrizio Castro Reviewed-by: Chris Paterson Reviewed-by: Rob Herring Signed-off-by: Simon Horman Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 02af9f90941b6cce5fb672ee058c142adcc11a2f Author: Geert Uytterhoeven Date: Thu May 2 14:32:18 2019 +0200 soc: renesas: Enable RZ/A1 IRQC on RZ/A1H and RZ/A2M Auto-enable support for the RZ/A1 Interrupt Controller when configuring a kernel which supports RZ/A1H or RZ/A2M SoCs. Keep selects sorted while at it. This is similar to how interrupt controllers for other Renesas SoCs are enabled. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman drivers/soc/renesas/Kconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit affa22b5f0f7e9caf61887671abe38819737bf16 Author: Jani Nikula Date: Wed Jun 5 12:56:57 2019 +0300 drm/i915: fix documentation build warnings Just a straightforward bag of fixes for a clean htmldocs build. Reviewed-by: Mika Kuoppala Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190605095657.23601-2-jani.nikula@intel.com Documentation/gpu/i915.rst | 6 ------ drivers/gpu/drm/i915/i915_reg.h | 2 +- drivers/gpu/drm/i915/i915_vma.h | 2 ++ drivers/gpu/drm/i915/intel_guc_fwif.h | 2 ++ drivers/gpu/drm/i915/intel_runtime_pm.c | 2 -- 5 files changed, 5 insertions(+), 9 deletions(-) commit 8a6f43d4d92d730dbe20fb84b72563be87d61446 Author: Jani Nikula Date: Wed Jun 5 12:56:56 2019 +0300 Documentation/i915: Fix kernel-doc references to moved gem files The error messages could be more descriptive, but fix these caused by file moves: WARNING: kernel-doc './scripts/kernel-doc -rst -enable-lineno -internal ./drivers/gpu/drm/i915/i915_gem_shrinker.c' failed with return code 2 WARNING: kernel-doc './scripts/kernel-doc -rst -enable-lineno -function User command execution ./drivers/gpu/drm/i915/i915_gem_execbuffer.c' failed with return code 1 WARNING: kernel-doc './scripts/kernel-doc -rst -enable-lineno -internal ./drivers/gpu/drm/i915/i915_gem_tiling.c' failed with return code 2 WARNING: kernel-doc './scripts/kernel-doc -rst -enable-lineno -function buffer object tiling ./drivers/gpu/drm/i915/i915_gem_tiling.c' failed with return code 1 Fixes: 10be98a77c55 ("drm/i915: Move more GEM objects under gem/") Cc: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190605095657.23601-1-jani.nikula@intel.com Documentation/gpu/i915.rst | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 1a1e5c0f5b84cdfd15735ba1fb0fe4c0da1c831c Author: Thomas Zimmermann Date: Tue Jun 4 13:13:30 2019 +0200 drm: Ignore drm_gem_vram_mm_funcs in generated documentation The documentation tools interpret drm_gem_vram_mm_funcs as function and there appears to be no way of inline-documenting constants. This results in a warning by 'make htmldocs'. For now, removing drm_gem_vram_mm_funcs from generated documentation works around the issue. Signed-off-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20190604111330.25324-1-tzimmermann@suse.de Fixes: 5c9dcacfe566 ("drm: Add default instance for VRAM MM callback functions") Signed-off-by: Gerd Hoffmann drivers/gpu/drm/drm_gem_vram_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5934ce998faf33277cc19522609577be835e80b1 Author: David Riley Date: Wed Jun 5 16:44:22 2019 -0700 drm/virtio: Fix cache entry creation race. virtio_gpu_cmd_get_capset would check for the existence of an entry under lock. If it was not found, it would unlock and call virtio_gpu_cmd_get_capset to create a new entry. The new entry would be added it to the list without checking if it was added by another task during the period where the lock was not held resulting in duplicate entries. Compounding this issue, virtio_gpu_cmd_capset_cb would stop iterating after find the first matching entry. Multiple callbacks would modify the first entry, but any subsequent entries and their associated waiters would eventually timeout since they don't become valid, also wasting memory along the way. Signed-off-by: David Riley Link: http://patchwork.freedesktop.org/patch/msgid/20190605234423.11348-3-davidriley@chromium.org Signed-off-by: Gerd Hoffmann drivers/gpu/drm/virtio/virtgpu_vq.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) commit 676a905b09d533ab3a30da753dba4f2daee97402 Author: David Riley Date: Wed Jun 5 16:44:21 2019 -0700 drm/virtio: Wake up all waiters when capset response comes in. If multiple callers occur simultaneously, wake them all up. Signed-off-by: David Riley Link: http://patchwork.freedesktop.org/patch/msgid/20190605234423.11348-2-davidriley@chromium.org Signed-off-by: Gerd Hoffmann drivers/gpu/drm/virtio/virtgpu_vq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7fdf478a43869bee27e1b50955830f6ebc730b67 Author: David Riley Date: Wed Jun 5 16:44:20 2019 -0700 drm/virtio: Ensure cached capset entries are valid before copying. virtio_gpu_get_caps_ioctl could return success with invalid data if a second caller to the function occurred after the entry was created in virtio_gpu_cmd_get_capset but prior to the virtio_gpu_cmd_capset_cb callback being called. This could leak contents of memory as well since the caps_cache allocation is done without zeroing. Signed-off-by: David Riley Link: http://patchwork.freedesktop.org/patch/msgid/20190605234423.11348-1-davidriley@chromium.org Signed-off-by: Gerd Hoffmann drivers/gpu/drm/virtio/virtgpu_ioctl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 812086d362a1d589d2b2e10957254ac13e83522b Author: Greg Kroah-Hartman Date: Wed Jun 5 14:44:40 2019 +0200 USB: move usb debugfs directory creation to the usb common core The USB gadget subsystem wants to use the USB debugfs root directory, so move it to the common "core" USB code so that it is properly initialized and removed as needed. In order to properly do this, we need to load the common code before the usb core code, when everything is linked into the kernel, so reorder the link order of the code. Also as the usb common code has the possibility of the led trigger logic to be merged into it, handle the build option properly by only having one module init/exit function and have the common code initialize the led trigger if needed. Reported-by: Chunfeng Yun Cc: Felipe Balbi Tested-by: Chunfeng Yun Signed-off-by: Greg Kroah-Hartman drivers/usb/Makefile | 3 +-- drivers/usb/common/common.c | 21 +++++++++++++++++++++ drivers/usb/common/common.h | 14 ++++++++++++++ drivers/usb/common/led.c | 9 +++------ drivers/usb/core/usb.c | 10 ++++------ 5 files changed, 43 insertions(+), 14 deletions(-) commit 0e016249f6877eb279da6369f182e4c9efe88cab Author: Hariprasad Kelam Date: Wed Jun 5 19:48:42 2019 +0530 usb: host: u132-hcd: remove unneeded variable frame This patch fixes below issue reported by coccicheck drivers/usb/host/u132-hcd.c:2557:6-11: Unneeded variable: "frame". Return "0" on line 2560 Signed-off-by: Hariprasad Kelam Signed-off-by: Greg Kroah-Hartman drivers/usb/host/u132-hcd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7545b6c2087f4ef0287c8c9b7eba6a728c67ff8e Author: Eric Biggers Date: Fri May 31 11:12:30 2019 -0700 crypto: chacha20poly1305 - fix atomic sleep when using async algorithm Clear the CRYPTO_TFM_REQ_MAY_SLEEP flag when the chacha20poly1305 operation is being continued from an async completion callback, since sleeping may not be allowed in that context. This is basically the same bug that was recently fixed in the xts and lrw templates. But, it's always been broken in chacha20poly1305 too. This was found using syzkaller in combination with the updated crypto self-tests which actually test the MAY_SLEEP flag now. Reproducer: python -c 'import socket; socket.socket(socket.AF_ALG, 5, 0).bind( ("aead", "rfc7539(cryptd(chacha20-generic),poly1305-generic)"))' Kernel output: BUG: sleeping function called from invalid context at include/crypto/algapi.h:426 in_atomic(): 1, irqs_disabled(): 0, pid: 1001, name: kworker/2:2 [...] CPU: 2 PID: 1001 Comm: kworker/2:2 Not tainted 5.2.0-rc2 #5 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-20181126_142135-anatol 04/01/2014 Workqueue: crypto cryptd_queue_worker Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x4d/0x6a lib/dump_stack.c:113 ___might_sleep kernel/sched/core.c:6138 [inline] ___might_sleep.cold.19+0x8e/0x9f kernel/sched/core.c:6095 crypto_yield include/crypto/algapi.h:426 [inline] crypto_hash_walk_done+0xd6/0x100 crypto/ahash.c:113 shash_ahash_update+0x41/0x60 crypto/shash.c:251 shash_async_update+0xd/0x10 crypto/shash.c:260 crypto_ahash_update include/crypto/hash.h:539 [inline] poly_setkey+0xf6/0x130 crypto/chacha20poly1305.c:337 poly_init+0x51/0x60 crypto/chacha20poly1305.c:364 async_done_continue crypto/chacha20poly1305.c:78 [inline] poly_genkey_done+0x15/0x30 crypto/chacha20poly1305.c:369 cryptd_skcipher_complete+0x29/0x70 crypto/cryptd.c:279 cryptd_skcipher_decrypt+0xcd/0x110 crypto/cryptd.c:339 cryptd_queue_worker+0x70/0xa0 crypto/cryptd.c:184 process_one_work+0x1ed/0x420 kernel/workqueue.c:2269 worker_thread+0x3e/0x3a0 kernel/workqueue.c:2415 kthread+0x11f/0x140 kernel/kthread.c:255 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:352 Fixes: 71ebc4d1b27d ("crypto: chacha20poly1305 - Add a ChaCha20-Poly1305 AEAD construction, RFC7539") Cc: # v4.2+ Cc: Martin Willi Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu crypto/chacha20poly1305.c | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) commit 4bb02dbd31d7430200db0e8dfb96f9d716351627 Author: YueHaibing Date: Fri May 31 20:17:49 2019 +0800 crypto: atmel-i2c - Fix build error while CRC16 set to m If CRYPTO_DEV_ATMEL_ECC is set m, which select CRC16 to m, while CRYPTO_DEV_ATMEL_SHA204A is set to y, building fails. drivers/crypto/atmel-i2c.o: In function 'atmel_i2c_checksum': atmel-i2c.c:(.text+0x16): undefined reference to 'crc16' Add CRC16 dependency to CRYPTO_DEV_ATMEL_SHA204A Reported-by: Hulk Robot Fixes: da001fb651b0 ("crypto: atmel-i2c - add support for SHA204A random number generator") Signed-off-by: YueHaibing Signed-off-by: Herbert Xu drivers/crypto/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 385cfc84a5a80e4b1b692a3e67c018d51631abde Author: Iuliana Prodan Date: Fri May 31 14:06:34 2019 +0300 crypto: caam - disable some clock checks for iMX7ULP Disabled the check and set of 'mem' and 'emi_slow' clocks, since these are not available for iMX7ULP. Signed-off-by: Iuliana Prodan Reviewed-by: Horia Geantă Signed-off-by: Herbert Xu drivers/crypto/caam/ctrl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit ed527b13d800dd515a9e6c582f0a73eca65b2e1b Author: Ard Biesheuvel Date: Fri May 31 10:13:06 2019 +0200 crypto: caam - limit output IV to CBC to work around CTR mode DMA issue The CAAM driver currently violates an undocumented and slightly controversial requirement imposed by the crypto stack that a buffer referred to by the request structure via its virtual address may not be modified while any scatterlists passed via the same request structure are mapped for inbound DMA. This may result in errors like alg: aead: decryption failed on test 1 for gcm_base(ctr-aes-caam,ghash-generic): ret=74 alg: aead: Failed to load transform for gcm(aes): -2 on non-cache coherent systems, due to the fact that the GCM driver passes an IV buffer by virtual address which shares a cacheline with the auth_tag buffer passed via a scatterlist, resulting in corruption of the auth_tag when the IV is updated while the DMA mapping is live. Since the IV that is returned to the caller is only valid for CBC mode, and given that the in-kernel users of CBC (such as CTS) don't trigger the same issue as the GCM driver, let's just disable the output IV generation for all modes except CBC for the time being. Fixes: 854b06f76879 ("crypto: caam - properly set IV after {en,de}crypt") Cc: Horia Geanta Cc: Iuliana Prodan Reported-by: Sascha Hauer Cc: Signed-off-by: Ard Biesheuvel Reviewed-by: Horia Geanta Signed-off-by: Herbert Xu drivers/crypto/caam/caamalg.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 49d22167f826134e579179aa2217c74647e62015 Author: Herbert Xu Date: Fri May 31 14:39:51 2019 +0800 crypto: atmel - Fix sparse endianness warnings The param2 member in atmel_i2c_cmd is supposed to be little-endian but was marked as u16. This patch changes it to a __le16 which reveals a missing endian swap in atmel_i2c_init_read_cmd. Another missing little-endian marking is also added in atmel_i2c_checksum. Fixes: 11105693fa05 ("crypto: atmel-ecc - introduce Microchip...") Reported-by: kbuild test robot Signed-off-by: Herbert Xu drivers/crypto/atmel-i2c.c | 4 ++-- drivers/crypto/atmel-i2c.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) commit 20a0f9761343fba9b25ea46bd3a3e5e533d974f8 Author: Eric Biggers Date: Thu May 30 10:53:08 2019 -0700 crypto: lrw - use correct alignmask Commit c778f96bf347 ("crypto: lrw - Optimize tweak computation") incorrectly reduced the alignmask of LRW instances from '__alignof__(u64) - 1' to '__alignof__(__be32) - 1'. However, xor_tweak() and setkey() assume that the data and key, respectively, are aligned to 'be128', which has u64 alignment. Fix the alignmask to be at least '__alignof__(be128) - 1'. Fixes: c778f96bf347 ("crypto: lrw - Optimize tweak computation") Cc: # v4.20+ Cc: Ondrej Mosnacek Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu crypto/lrw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5c6bc4dfa515738149998bb0db2481a4fdead979 Author: Eric Biggers Date: Thu May 30 10:50:39 2019 -0700 crypto: ghash - fix unaligned memory access in ghash_setkey() Changing ghash_mod_init() to be subsys_initcall made it start running before the alignment fault handler has been installed on ARM. In kernel builds where the keys in the ghash test vectors happened to be misaligned in the kernel image, this exposed the longstanding bug that ghash_setkey() is incorrectly casting the key buffer (which can have any alignment) to be128 for passing to gf128mul_init_4k_lle(). Fix this by memcpy()ing the key to a temporary buffer. Don't fix it by setting an alignmask on the algorithm instead because that would unnecessarily force alignment of the data too. Fixes: 2cdc6899a88e ("crypto: ghash - Add GHASH digest algorithm for GCM") Reported-by: Peter Robinson Cc: stable@vger.kernel.org Signed-off-by: Eric Biggers Tested-by: Peter Robinson Signed-off-by: Herbert Xu crypto/ghash-generic.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 67882e76492483bafa9b1b1648bb031e9abe5185 Author: Nikolay Borisov Date: Thu May 30 09:52:57 2019 +0300 crypto: xxhash - Implement xxhash support xxhash is currently implemented as a self-contained module in /lib. This patch enables that module to be used as part of the generic kernel crypto framework. It adds a simple wrapper to the 64bit version. I've also added test vectors (with help from Nick Terrell). The upstream xxhash code is tested by running hashing operation on random 222 byte data with seed values of 0 and a prime number. The upstream test suite can be found at https://github.com/Cyan4973/xxHash/blob/cf46e0c/xxhsum.c#L664 Essentially hashing is run on data of length 0,1,14,222 with the aforementioned seed values 0 and prime 2654435761. The particular random 222 byte string was provided to me by Nick Terrell by reading /dev/random and the checksums were calculated by the upstream xxsum utility with the following bash script: dd if=/dev/random of=TEST_VECTOR bs=1 count=222 for a in 0 1; do for l in 0 1 14 222; do for s in 0 2654435761; do echo algo $a length $l seed $s; head -c $l TEST_VECTOR | ~/projects/kernel/xxHash/xxhsum -H$a -s$s done done done This produces output as follows: algo 0 length 0 seed 0 02cc5d05 stdin algo 0 length 0 seed 2654435761 02cc5d05 stdin algo 0 length 1 seed 0 25201171 stdin algo 0 length 1 seed 2654435761 25201171 stdin algo 0 length 14 seed 0 c1d95975 stdin algo 0 length 14 seed 2654435761 c1d95975 stdin algo 0 length 222 seed 0 b38662a6 stdin algo 0 length 222 seed 2654435761 b38662a6 stdin algo 1 length 0 seed 0 ef46db3751d8e999 stdin algo 1 length 0 seed 2654435761 ac75fda2929b17ef stdin algo 1 length 1 seed 0 27c3f04c2881203a stdin algo 1 length 1 seed 2654435761 4a15ed26415dfe4d stdin algo 1 length 14 seed 0 3d33dc700231dfad stdin algo 1 length 14 seed 2654435761 ea5f7ddef9a64f80 stdin algo 1 length 222 seed 0 5f3d3c08ec2bef34 stdin algo 1 length 222 seed 2654435761 6a9df59664c7ed62 stdin algo 1 is xx64 variant, algo 0 is the 32 bit variant which is currently not hooked up. Signed-off-by: Nikolay Borisov Reviewed-by: Eric Biggers Signed-off-by: Herbert Xu crypto/Kconfig | 8 ++++ crypto/Makefile | 1 + crypto/testmgr.c | 7 ++++ crypto/testmgr.h | 106 +++++++++++++++++++++++++++++++++++++++++++++++ crypto/xxhash_generic.c | 108 ++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 230 insertions(+) commit d9d67c87ad37218be65f4cea3ecd7e0312735e78 Author: Stephan Müller Date: Wed May 29 21:24:25 2019 +0200 crypto: jitter - update implementation to 2.1.2 The Jitter RNG implementation is updated to comply with upstream version 2.1.2. The change covers the following aspects: * Time variation measurement is conducted over the LFSR operation instead of the XOR folding * Invcation of stuck test during initialization * Removal of the stirring functionality and the Von-Neumann unbiaser as the LFSR using a primitive and irreducible polynomial generates an identical distribution of random bits This implementation was successfully used in FIPS 140-2 validations as well as in German BSI evaluations. This kernel implementation was tested as follows: * The unchanged kernel code file jitterentropy.c is compiled as part of user space application to generate raw unconditioned noise data. That data is processed with the NIST SP800-90B non-IID test tool to verify that the kernel code exhibits an equal amount of noise as the upstream Jitter RNG version 2.1.2. * Using AF_ALG with the libkcapi tool of kcapi-rng the Jitter RNG was output tested with dieharder to verify that the output does not exhibit statistical weaknesses. The following command was used: kcapi-rng -n "jitterentropy_rng" -b 100000000000 | dieharder -a -g 200 * The unchanged kernel code file jitterentropy.c is compiled as part of user space application to test the LFSR implementation. The LFSR is injected a monotonically increasing counter as input and the output is fed into dieharder to verify that the LFSR operation does not exhibit statistical weaknesses. * The patch was tested on the Muen separation kernel which returns a more coarse time stamp to verify that the Jitter RNG does not cause regressions with its initialization test considering that the Jitter RNG depends on a high-resolution timer. Tested-by: Reto Buerki Signed-off-by: Stephan Mueller Signed-off-by: Herbert Xu crypto/jitterentropy-kcapi.c | 5 - crypto/jitterentropy.c | 305 ++++++++++++------------------------------- 2 files changed, 82 insertions(+), 228 deletions(-) commit d8ea98aa3cd4646945a2a9b647c2502b1e2dcdec Author: Eric Biggers Date: Tue May 28 09:40:55 2019 -0700 crypto: testmgr - test the shash API For hash algorithms implemented using the "shash" algorithm type, test both the ahash and shash APIs, not just the ahash API. Testing the ahash API already tests the shash API indirectly, which is normally good enough. However, there have been corner cases where there have been shash bugs that don't get exposed through the ahash API. So, update testmgr to test the shash API too. This would have detected the arm64 SHA-1 and SHA-2 bugs for which fixes were just sent out (https://patchwork.kernel.org/patch/10964843/ and https://patchwork.kernel.org/patch/10965089/): alg: shash: sha1-ce test failed (wrong result) on test vector 0, cfg="init+finup aligned buffer" alg: shash: sha224-ce test failed (wrong result) on test vector 0, cfg="init+finup aligned buffer" alg: shash: sha256-ce test failed (wrong result) on test vector 0, cfg="init+finup aligned buffer" This also would have detected the bugs fixed by commit 307508d10729 ("crypto: crct10dif-generic - fix use via crypto_shash_digest()") and commit dec3d0b1071a ("crypto: x86/crct10dif-pcl - fix use via crypto_shash_digest()"). Signed-off-by: Eric Biggers Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu crypto/testmgr.c | 402 +++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 335 insertions(+), 67 deletions(-) commit 6bd934de1e393466b319d29c4427598fda096c57 Author: Elena Petrova Date: Tue May 28 15:35:06 2019 +0100 crypto: arm64/sha2-ce - correct digest for empty data in finup The sha256-ce finup implementation for ARM64 produces wrong digest for empty input (len=0). Expected: the actual digest, result: initial value of SHA internal state. The error is in sha256_ce_finup: for empty data `finalize` will be 1, so the code is relying on sha2_ce_transform to make the final round. However, in sha256_base_do_update, the block function will not be called when len == 0. Fix it by setting finalize to 0 if data is empty. Fixes: 03802f6a80b3a ("crypto: arm64/sha2-ce - move SHA-224/256 ARMv8 implementation to base layer") Cc: stable@vger.kernel.org Signed-off-by: Elena Petrova Reviewed-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm64/crypto/sha2-ce-glue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1d4aaf16defa86d2665ae7db0259d6cb07e2091f Author: Elena Petrova Date: Tue May 28 13:41:52 2019 +0100 crypto: arm64/sha1-ce - correct digest for empty data in finup The sha1-ce finup implementation for ARM64 produces wrong digest for empty input (len=0). Expected: da39a3ee..., result: 67452301... (initial value of SHA internal state). The error is in sha1_ce_finup: for empty data `finalize` will be 1, so the code is relying on sha1_ce_transform to make the final round. However, in sha1_base_do_update, the block function will not be called when len == 0. Fix it by setting finalize to 0 if data is empty. Fixes: 07eb54d306f4 ("crypto: arm64/sha1-ce - move SHA-1 ARMv8 implementation to base layer") Cc: stable@vger.kernel.org Signed-off-by: Elena Petrova Reviewed-by: Ard Biesheuvel Signed-off-by: Herbert Xu arch/arm64/crypto/sha1-ce-glue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3b2614cb864d4114250f043ce6ff94e152198ae5 Author: Iuliana Prodan Date: Tue May 28 12:52:11 2019 +0300 crypto: caam - strip input without changing crypto request For rsa and pkcs1pad, CAAM expects an input of modulus size. For this we strip the leading zeros in case the size is more than modulus. This commit avoids modifying the crypto request while stripping zeros from input, to comply with the crypto API requirement. This is done by adding a fixup input pointer and length. Signed-off-by: Iuliana Prodan Reviewed-by: Horia Geanta Signed-off-by: Herbert Xu drivers/crypto/caam/caampkc.c | 39 ++++++++++++++++++++++++++------------- drivers/crypto/caam/caampkc.h | 7 ++++++- 2 files changed, 32 insertions(+), 14 deletions(-) commit c3725f7ccc8cae1fb71e97768f03bfbd846f7827 Author: Iuliana Prodan Date: Tue May 28 12:52:10 2019 +0300 crypto: caam - fix pkcs1pad(rsa-caam, sha256) failure because of invalid input The problem is with the input data size sent to CAAM for encrypt/decrypt. Pkcs1pad is failing due to pkcs1 padding done in SW starting with0x01 instead of 0x00 0x01. CAAM expects an input of modulus size. For this we strip the leading zeros in case the size is more than modulus or pad the input with zeros until the modulus size is reached. Signed-off-by: Iuliana Prodan Reviewed-by: Horia Geantă Signed-off-by: Herbert Xu drivers/crypto/caam/caampkc.c | 89 ++++++++++++++++++++++++++++++++++--------- drivers/crypto/caam/caampkc.h | 2 + 2 files changed, 74 insertions(+), 17 deletions(-) commit 89332590427235680236b9470e851afc49b3caa1 Author: Antoine Tenart Date: Mon May 27 16:51:06 2019 +0200 crypto: inside-secure - do not rely on the hardware last bit for result descriptors When performing a transformation the hardware is given result descriptors to save the result data. Those result descriptors are batched using a 'first' and a 'last' bit. There are cases were more descriptors than needed are given to the engine, leading to the engine only using some of them, and not setting the last bit on the last descriptor we gave. This causes issues were the driver and the hardware aren't in sync anymore about the number of result descriptors given (as the driver do not give a pool of descriptor to use for any transformation, but a pool of descriptors to use *per* transformation). This patch fixes it by attaching the number of given result descriptors to the requests, and by using this number instead of the 'last' bit found on the descriptors to process them. Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel_cipher.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) commit 583d7e195f48753c5da8cc75a8ed332cad7287b0 Author: Antoine Tenart Date: Mon May 27 16:51:05 2019 +0200 crypto: inside-secure - fix use of the SG list Replace sg_nents_for_len by sg_nents when DMA mapping/unmapping buffers and when looping over the SG entries. This fix cases where the SG entries aren't used fully, which would in such cases led to using fewer SG entries than needed (and thus the engine wouldn't have access to the full input data and the result would be wrong). Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel_cipher.c | 39 ++++++++------------------ drivers/crypto/inside-secure/safexcel_hash.c | 3 +- 2 files changed, 12 insertions(+), 30 deletions(-) commit 082ec2d48467b61aa89783e954645ec441714c4e Author: Antoine Tenart Date: Mon May 27 16:51:04 2019 +0200 crypto: inside-secure - add support for HMAC updates This patch adds support for HMAC updates in the Inside Secure SafeXcel crypto engine driver. Updates were supported for hash algorithms, but were never enabled for HMAC ones. This fixes boot time test issues. Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel.h | 2 +- drivers/crypto/inside-secure/safexcel_hash.c | 58 ++++++++++++++++++---------- 2 files changed, 38 insertions(+), 22 deletions(-) commit 57660b11d5adbb18182e9388b83b7fb214c4e1a1 Author: Antoine Tenart Date: Mon May 27 16:51:03 2019 +0200 crypto: inside-secure - implement IV retrieval This patch adds support for retrieving intermediate IV from the crypto engine when using the CBC block mode with AES and (3)DES. The retrieved IV is copied to the request IV buffer, as requested by the kernel crypto API. This fix boot tests added by commit 8efd972ef96a ("crypto: testmgr - support checking skcipher output IV"). Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel.h | 8 ++++ drivers/crypto/inside-secure/safexcel_cipher.c | 52 ++++++++++++++++++++++---- 2 files changed, 53 insertions(+), 7 deletions(-) commit ccd65a206a5025cf953a2e4f37e894921b131a5c Author: Antoine Tenart Date: Mon May 27 16:51:02 2019 +0200 crypto: inside-secure - fix queued len computation This patch fixes the queued len computation, which could theoretically be wrong if req->len[1] - req->processed[1] > 1. Be future-proof here, and fix it. Fixes: b460edb6230a ("crypto: inside-secure - sha512 support") Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel_hash.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit b926213d6fede9c9427d7c12eaf7d9f0895deb4e Author: Antoine Tenart Date: Mon May 27 16:51:01 2019 +0200 crypto: inside-secure - fix zeroing of the request in ahash_exit_inv A request is zeroed in safexcel_ahash_exit_inv(). This request total size is EIP197_AHASH_REQ_SIZE while the memset zeroing it uses sizeof(struct ahash_request), which happens to be less than EIP197_AHASH_REQ_SIZE. This patch fixes it. Fixes: f6beaea30487 ("crypto: inside-secure - authenc(hmac(sha256), cbc(aes)) support") Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel_hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aa52428698aeb1c1d4ebb7c3e9de3e7bdce25704 Author: Antoine Tenart Date: Mon May 27 16:51:00 2019 +0200 crypto: inside-secure - unify cache reset This patch unify the way the cache related data is zeroed when the cache buffer is DMA unmapped. It should not change the driver behaviour, but improves the code safety and readability. Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel_hash.c | 2 ++ 1 file changed, 2 insertions(+) commit 97a1440d12947293ff3f0eb9b649052927a55ed8 Author: Antoine Tenart Date: Mon May 27 16:50:59 2019 +0200 crypto: inside-secure - enable context reuse The context given to the crypto engine can be reused over time. While the driver was designed to allow this, the feature wasn't enabled in the hardware engine. This patch enables it. Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel.c | 6 ++++++ drivers/crypto/inside-secure/safexcel.h | 7 +++++++ drivers/crypto/inside-secure/safexcel_ring.c | 3 +++ 3 files changed, 16 insertions(+) commit 082a9d0918d2aae48dc3b836a8e3ca6aa53d2495 Author: Antoine Tenart Date: Mon May 27 16:50:58 2019 +0200 crypto: inside-secure - change returned error when a descriptor reports an error This patch changes the error reported by the Inside Secure SafeXcel driver when a result descriptor reports an error, from -EIO to -EINVAL, as this is what the crypto framework expects. This was found while running the crypto extra tests. Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 942d849d32d0126442bdf7a4052bb46fbf23a3c6 Author: Antoine Tenart Date: Mon May 27 16:50:57 2019 +0200 crypto: inside-secure - improve the result error format when displayed The result descriptors contain errors, which are represented as a bitmap. This patch updates the error message to not treat the error as a decimal value, but as an hexadecimal one. This helps in knowing the value does not have a direct meaning (the set bits themselves have). Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 709ecc101aea53d3625b688697b7c9dc4235716d Author: Antoine Tenart Date: Mon May 27 16:50:56 2019 +0200 crypto: inside-secure - remove useless check When sending an ahash request, the code checks for the extra variable not to be 0. This check is useless as the extra variable can't be 0 at this point (it is checked on the line just before). This patch does not modify the driver behaviour in any way. Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel_hash.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) commit 0733eabadc90f148dd96e1d41c8a644312a6ab18 Author: Antoine Tenart Date: Mon May 27 16:50:55 2019 +0200 crypto: inside-secure - fix coding style for a condition This cosmetic patch fixes a cosmetic issue with if brackets. Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit dd4306a6f398f49b60bd061d426e5e115234b8cc Author: Antoine Tenart Date: Mon May 27 16:50:54 2019 +0200 crypto: inside-secure - move comment This cosmetic patch moves a comment before the condition it is related to. The patch does not change the driver behaviour in any way. Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel_hash.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit cb9877b8a8fb57f12e9d461cbbd1509074f4ce7a Author: Antoine Tenart Date: Mon May 27 16:50:53 2019 +0200 crypto: inside-secure - remove empty line Cosmetic patch removing an empty line in the skcipher token creation routine. Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel_cipher.c | 1 - 1 file changed, 1 deletion(-) commit 4f518e802ccad30c9dccc895f2294398757b87c0 Author: Florian Westphal Date: Fri May 3 17:46:19 2019 +0200 xfrm: remove type and offload_type map from xfrm_state_afinfo Only a handful of xfrm_types exist, no need to have 512 pointers for them. Reduces size of afinfo struct from 4k to 120 bytes on 64bit platforms. Also, the unregister function doesn't need to return an error, no single caller does anything useful with it. Just place a WARN_ON() where needed instead. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert include/net/xfrm.h | 16 +++-- net/ipv4/ah4.c | 3 +- net/ipv4/esp4.c | 3 +- net/ipv4/esp4_offload.c | 4 +- net/ipv4/ipcomp.c | 3 +- net/ipv4/xfrm4_tunnel.c | 3 +- net/ipv6/ah6.c | 4 +- net/ipv6/esp6.c | 3 +- net/ipv6/esp6_offload.c | 4 +- net/ipv6/ipcomp6.c | 3 +- net/ipv6/mip6.c | 6 +- net/xfrm/xfrm_state.c | 179 ++++++++++++++++++++++++++++++++++-------------- 12 files changed, 150 insertions(+), 81 deletions(-) commit 4c203b0454b5b6bfafe2c4ab1b5472d4a7a8a0f2 Author: Florian Westphal Date: Fri May 3 17:46:18 2019 +0200 xfrm: remove eth_proto value from xfrm_state_afinfo xfrm_prepare_input needs to lookup the state afinfo backend again to fetch the address family ethernet protocol value. There are only two address families, so a switch statement is simpler. While at it, use u8 for family and proto and remove the owner member -- its not used anywhere. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert include/net/xfrm.h | 6 ++---- net/ipv4/xfrm4_state.c | 2 -- net/ipv6/xfrm6_state.c | 2 -- net/xfrm/xfrm_input.c | 24 ++++++++++++------------ 4 files changed, 14 insertions(+), 20 deletions(-) commit 3aaf3915a31aac83523d2de0191a480d3ad1e747 Author: Florian Westphal Date: Fri May 3 17:46:17 2019 +0200 xfrm: remove state and template sort indirections from xfrm_state_afinfo No module dependency, placing this in xfrm_state.c avoids need for an indirection. This also removes the state spinlock -- I don't see why we would need to hold it during sorting. This in turn allows to remove the 'net' argument passed to xfrm_tmpl_sort. Last, remove the EXPORT_SYMBOL, there are no modular callers. For the CONFIG_IPV6=m case, vmlinux size increase is about 300 byte. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert include/net/xfrm.h | 18 +++---- net/ipv6/xfrm6_state.c | 98 ------------------------------------ net/xfrm/xfrm_policy.c | 2 +- net/xfrm/xfrm_state.c | 132 +++++++++++++++++++++++++++++++++++++++---------- 4 files changed, 113 insertions(+), 137 deletions(-) commit 396f9acaffd87e44b8b02bc60f06dc949b832b7e Merge: 141de1d46fc8 72a14e9b23d0 Author: Dave Airlie Date: Thu Jun 6 13:47:40 2019 +1000 Merge branch 'drm-next-5.3' of git://people.freedesktop.org/~agd5f/linux into drm-next amdgpu: - Revert timeline support until KHR is ready - Various driver reload fixes - Refactor clock handling in DC - Aux fixes for DC - Bandwidth calculation updates for DC - Fix documentation due to file rename - RAS fix - Fix race in late_init ttm: - Allow for better forward progress when there is heavy memory contention Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20190606032537.6939-1-alexander.deucher@amd.com commit 72a14e9b23d0a5a68f8504a2ecaf26788a11a14d Author: Alex Deucher Date: Wed Jun 5 09:54:27 2019 -0500 Revert "drm/amdgpu: add DRIVER_SYNCOBJ_TIMELINE to amdgpu" This reverts commit 8d8a5a64a8904ea32bbf7292b89c11156d64f9a1. Wait until KHR exposes the VLK support. Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ae96e8d7b6f437a0cece42c2e834d64c8f22234c Author: Christian König Date: Tue Jun 4 17:07:10 2019 +0200 drm/ttm: fix ttm_bo_unreserve Since we now keep BOs on the LRU we need to explicitely remove them from the LRU now after they are pinned. Signed-off-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher include/drm/ttm/ttm_bo_driver.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 621b325aa8b2c3d3ec9ef8a95d5581e74d5568f2 Author: Alex Deucher Date: Fri May 31 11:34:57 2019 -0500 drm/amdgpu/display: Drop some new CONFIG_DRM_AMD_DC_DCN1_01 guards These got added back by subsequent merges accidently. Reviewed-by: Harry Wentland Reviewed-by: Nicholas Kazlauskas Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 -- drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c | 4 ---- 2 files changed, 6 deletions(-) commit beff74bc6e0fa910454fecb3fdc3843b1bfdafb9 Author: Alex Deucher Date: Tue May 28 14:17:25 2019 -0500 drm/amdgpu: fix a race in GPU reset with IB test (v2) Split late_init into two functions, one (do_late_init) which just does the hw init, and late_init which calls do_late_init and schedules the IB test work. Call do_late_init in the GPU reset code to run the init code, but not schedule the IB test code. The IB test code is called directly in the gpu reset code so no need to run the IB tests in a separate work thread. If we do, we end up racing. v2: Rework late_init. Pull out the mgpu fan boost and xgmi pstate code into late_init so they get called in all cases. rename the late_init worker thread to delayed work since it's just the IB tests now which can happen later. Schedule the work at init and resume time. It's not needed at reset time because the IB tests are called directly. Reviewed-by: Christian König Cc: Xinhui Pan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 116 +++++++++++++++-------------- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 +- 3 files changed, 61 insertions(+), 59 deletions(-) commit c53e4db71276bf257b09010935a04bdafddd458e Author: xinhui pan Date: Fri May 17 10:27:44 2019 +0800 drm/amdgpu: cancel late_init_work before gpu reset gpu reset will run late_init and schedule the late_init_work. if we keep triggering gpu reset in a short time, there are potenial races. Signed-off-by: xinhui pan Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++ 1 file changed, 2 insertions(+) commit fbebaa72992ee14068bfbba51bc55da4aef2c606 Author: Mauro Carvalho Chehab Date: Wed May 29 20:23:42 2019 -0300 gpu: amdgpu: fix broken amdgpu_dma_buf.c references This file was renamed, but docs weren't updated accordingly. WARNING: kernel-doc './scripts/kernel-doc -rst -enable-lineno -function PRIME Buffer Sharing ./drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c' failed with return code 1 WARNING: kernel-doc './scripts/kernel-doc -rst -enable-lineno -internal ./drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c' failed with return code 2 Fixes: 2fbd6f94accdbb223a ("drm/amdgpu: rename amdgpu_prime.[ch] into amdgpu_dma_buf.[ch]") Reviewed-by: Christian König Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Alex Deucher Documentation/gpu/amdgpu.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e6abacabb5acb6315e0e9560b2cb50a4d55b6e09 Author: Leonard Crestez Date: Wed Jun 5 13:37:06 2019 +0300 cpufreq: Switch imx7d to imx-cpufreq-dt for speed grading This driver can handle speed grading bits on imx7d just like on imx8mq and imx8mm. Signed-off-by: Leonard Crestez Signed-off-by: Viresh Kumar drivers/cpufreq/cpufreq-dt-platdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7d5f589a522889d3fd56ad0c43961b90d07b4a93 Author: Leonard Crestez Date: Wed Jun 5 13:37:05 2019 +0300 cpufreq: imx-cpufreq-dt: Remove global platform match list This is not currently needed, instead a platform device is always created from SOC-specific code. We can use of_machine_is_compatible for per-SOC behavior instead. Suggested-by: Viresh Kumar Signed-off-by: Leonard Crestez Signed-off-by: Viresh Kumar drivers/cpufreq/imx-cpufreq-dt.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) commit b4e3e54a46a6dd973909eb4957f8e9e484e5a229 Author: Anson Huang Date: Thu Jun 6 10:39:36 2019 +0800 arm64: dts: imx8mm: Move gic node into soc node GIC is inside of SoC from architecture perspective, it should be located inside of soc node in DT. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mm.dtsi | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 141de1d46fc8bbab8cdddcd894f8ee1b8c4e8662 Merge: 91c1ead6aee2 f5b07b04e5f0 Author: Dave Airlie Date: Thu Jun 6 12:16:17 2019 +1000 Merge tag 'drm-misc-next-2019-06-05' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for v5.3: UAPI Changes: Cross-subsystem Changes: - Add devicetree bindings for new panels. - Convert allwinner's DT bindings to a schema. - Drop video/hdmi static functions from kernel docs. - Discard old fence when reserving space in reservation_object_get_fences_rcu. Core Changes: - Add missing -ENOMEM handling in edid loading. - Fix null pointer deref in scheduler. - Header cleanups, making them self-contained. - Remove drmP.h inclusion from core. - Fix make htmldocs warning in scheduler and HDR metadata. - Fix a few warnings in the uapi header and add a doc section for it. - Small MST sideband error handling fix. - Clarify userspace review requirements. - Clarify implicit/explicit fencing in docs. - Flush output polling on shutdown. Driver Changes: - Small cleanups to stm. - Add new driver for ST-Ericsson MCDE - Kconfig fix for meson HDMI. - Add support for Armadeus ST0700 Adapt panel. - Add KOE tx14d24vm1bpa panel. - Update timings for st7701. - Fix compile error in mcde. - Big series of tc358767 fixes, and enabling support for IRQ and HPD handling. - Assorted fixes to sii902x, and implementing HDMI audio support. - Enable HDR metadata support on amdgpu. - Assorted fixes to atmel-hlcdc, and add sam9x60 LCD controller support. Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/6c43ffa9-11ff-5354-d772-c20fd4d1e3d9@linux.intel.com commit ec01147a4bceabe092e569874582644625e6ad42 Merge: e736bf72af56 50a8accf1062 Author: David S. Miller Date: Wed Jun 5 19:05:01 2019 -0700 Merge branch 'tcp-flowlabel' Eric Dumazet says: ==================== ipv6: tcp: more control on RST flowlabels First patch allows to reflect incoming IPv6 flowlabel on RST packets sent when no socket could handle the packet. Second patch makes sure we send the same flowlabel for RST or ACK packets on behalf of TIME_WAIT sockets. ==================== Signed-off-by: David S. Miller commit 50a8accf10627b343109a9c9d5c361751bf753b0 Author: Eric Dumazet Date: Wed Jun 5 07:55:10 2019 -0700 ipv6: tcp: send consistent flowlabel in TIME_WAIT state After commit 1d13a96c74fc ("ipv6: tcp: fix flowlabel value in ACK messages"), we stored in tw_flowlabel the flowlabel, in the case ACK packets needed to be sent on behalf of a TIME_WAIT socket. We can use the same field so that RST packets sent from TIME_WAIT state also use a consistent flowlabel. Signed-off-by: Eric Dumazet Cc: Florent Fourcot Signed-off-by: David S. Miller net/ipv6/tcp_ipv6.c | 2 ++ 1 file changed, 2 insertions(+) commit 323a53c41292a0d7efc8748856c623324c8d7c21 Author: Eric Dumazet Date: Wed Jun 5 07:55:09 2019 -0700 ipv6: tcp: enable flowlabel reflection in some RST packets When RST packets are sent because no socket could be found, it makes sense to use flowlabel_reflect sysctl to decide if a reflection of the flowlabel is requested. This extends commit 22b6722bfa59 ("ipv6: Add sysctl for per namespace flow label reflection"), for some TCP RST packets. In order to provide full control of this new feature, flowlabel_reflect becomes a bitmask. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller Documentation/networking/ip-sysctl.txt | 20 +++++++++++++++----- net/ipv6/af_inet6.c | 2 +- net/ipv6/sysctl_net_ipv6.c | 3 +++ net/ipv6/tcp_ipv6.c | 13 ++++++++++--- 4 files changed, 29 insertions(+), 9 deletions(-) commit e736bf72af568d0a04f186e1c5dde6789b19c35e Author: Gustavo A. R. Silva Date: Wed Jun 5 09:45:16 2019 -0500 lib: objagg: Use struct_size() in kzalloc() One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct objagg_stats { ... struct objagg_obj_stats_info stats_info[]; }; size = sizeof(*objagg_stats) + sizeof(objagg_stats->stats_info[0]) * count; instance = kzalloc(size, GFP_KERNEL); Instead of leaving these open-coded and prone to type mistakes, we can now use the new struct_size() helper: instance = kzalloc(struct_size(instance, stats_info, count), GFP_KERNEL); Notice that, in this case, variable alloc_size is not necessary, hence it is removed. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Acked-by: Jiri Pirko Signed-off-by: David S. Miller lib/objagg.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 8b5e07d7ee95e3c22cb301731f87d95f58639591 Author: Zhiqiang Liu Date: Wed Jun 5 18:49:49 2019 +0800 inet_connection_sock: remove unused parameter of reqsk_queue_unlink func small cleanup: "struct request_sock_queue *queue" parameter of reqsk_queue_unlink func is never used in the func, so we can remove it. Signed-off-by: Zhiqiang Liu Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/inet_connection_sock.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 7f466032dc9e5a61217f22ea34b2df932786bbfc Author: Jason Wang Date: Fri May 24 04:12:18 2019 -0400 vhost: access vq metadata through kernel virtual address It was noticed that the copy_to/from_user() friends that was used to access virtqueue metdata tends to be very expensive for dataplane implementation like vhost since it involves lots of software checks, speculation barriers, hardware feature toggling (e.g SMAP). The extra cost will be more obvious when transferring small packets since the time spent on metadata accessing become more significant. This patch tries to eliminate those overheads by accessing them through direct mapping of those pages. Invalidation callbacks is implemented for co-operation with general VM management (swap, KSM, THP or NUMA balancing). We will try to get the direct mapping of vq metadata before each round of packet processing if it doesn't exist. If we fail, we will simplely fallback to copy_to/from_user() friends. This invalidation and direct mapping access are synchronized through spinlock and RCU. All matedata accessing through direct map is protected by RCU, and the setup or invalidation are done under spinlock. This method might does not work for high mem page which requires temporary mapping so we just fallback to normal copy_to/from_user() and may not for arch that has virtual tagged cache since extra cache flushing is needed to eliminate the alias. This will result complex logic and bad performance. For those archs, this patch simply go for copy_to/from_user() friends. This is done by ruling out kernel mapping codes through ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE. Note that this is only done when device IOTLB is not enabled. We could use similar method to optimize IOTLB in the future. Tests shows at most about 23% improvement on TX PPS when using virtio-user + vhost_net + xdp1 + TAP on 2.6GHz Broadwell: SMAP on | SMAP off Before: 5.2Mpps | 7.1Mpps After: 6.4Mpps | 8.2Mpps Cc: Andrea Arcangeli Cc: James Bottomley Cc: Christoph Hellwig Cc: David Miller Cc: Jerome Glisse Cc: linux-mm@kvack.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-parisc@vger.kernel.org Signed-off-by: Jason Wang Signed-off-by: Michael S. Tsirkin drivers/vhost/vhost.c | 515 +++++++++++++++++++++++++++++++++++++++++++++++++- drivers/vhost/vhost.h | 38 ++++ 2 files changed, 550 insertions(+), 3 deletions(-) commit 99ae52edeba17c78753695e0d94d49c5f9e9a803 Author: Sebastian Andrzej Siewior Date: Wed May 29 17:42:29 2019 +0200 ARM: imx6: cpuidle: Use raw_spinlock_t The idle call back is invoked with disabled interrupts and requires raw_spinlock_t locks to work. Signed-off-by: Sebastian Andrzej Siewior Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/mach-imx/cpuidle-imx6q.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 2bd229df5e2ecbc13909f71dbd196fced1d533ca Author: Heiner Kallweit Date: Tue Jun 4 23:02:34 2019 +0200 net: phy: remove state PHY_FORCING In the early days of phylib we had a functionality that changed to the next lower speed in fixed mode if no link was established after a certain period of time. This functionality has been removed years ago, and state PHY_FORCING isn't needed any longer. Instead we can go from UP to RUNNING or NOLINK directly (same as in autoneg mode). Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/phy/phy.c | 26 ++------------------------ include/linux/phy.h | 11 ----------- 2 files changed, 2 insertions(+), 35 deletions(-) commit 07c3bbdb1a9b2046631a2a2950a0c16e10cfcab3 Author: Jakub Kicinski Date: Wed Jun 5 16:47:22 2019 -0700 samples: bpf: print a warning about headers_install It seems like periodically someone posts patches to "fix" header includes. The issue is that samples expect the include path to have the uAPI headers (from usr/) first, and then tools/ headers, so that locally installed uAPI headers take precedence. This means that if users didn't run headers_install they will see all sort of strange compilation errors, e.g.: HOSTCC samples/bpf/test_lru_dist samples/bpf/test_lru_dist.c:39:8: error: redefinition of ‘struct list_head’ struct list_head { ^~~~~~~~~ In file included from samples/bpf/test_lru_dist.c:9:0: ../tools/include/linux/types.h:69:8: note: originally defined here struct list_head { ^~~~~~~~~ Try to detect this situation, and print a helpful warning. v2: just use HOSTCC (Jiong). Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Acked-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann samples/bpf/Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) commit fe3475af3bdf38fac78787ec2fe9eedaf2518188 Author: Zhu Yanjun Date: Mon Jun 3 00:28:01 2019 -0400 net: rds: add per rds connection cache statistics The variable cache_allocs is to indicate how many frags (KiB) are in one rds connection frag cache. The command "rds-info -Iv" will output the rds connection cache statistics as below: " RDS IB Connections: LocalAddr RemoteAddr Tos SL LocalDev RemoteDev 1.1.1.14 1.1.1.14 58 255 fe80::2:c903:a:7a31 fe80::2:c903:a:7a31 send_wr=256, recv_wr=1024, send_sge=8, rdma_mr_max=4096, rdma_mr_size=257, cache_allocs=12 " This means that there are about 12KiB frag in this rds connection frag cache. Since rds.h in rds-tools is not related with the kernel rds.h, the change in kernel rds.h does not affect rds-tools. rds-info in rds-tools 2.0.5 and 2.0.6 is tested with this commit. It works well. Signed-off-by: Zhu Yanjun Signed-off-by: David S. Miller include/uapi/linux/rds.h | 2 ++ net/rds/ib.c | 2 ++ 2 files changed, 4 insertions(+) commit dceebd4c927427669fa285b7d972a8156e2ef233 Merge: 478db1f1fce3 ee326fd01e79 Author: David S. Miller Date: Wed Jun 5 17:03:14 2019 -0700 Merge branch 'dwmac-mediatek' Biao Huang says: ==================== complete dwmac-mediatek driver and fix flow control issue Changes in v2: patch#1: there is no extra action in mediatek_dwmac_remove, remove it v1: This series mainly complete dwmac-mediatek driver: 1. add power on/off operations for dwmac-mediatek. 2. disable rx watchdog to reduce rx path reponding time. 3. change the default value of tx-frames from 25 to 1, so ptp4l will test pass by default. and also fix the issue that flow control won't be disabled any more once being enabled. ==================== Signed-off-by: David S. Miller commit ee326fd01e79dfa42014d55931260b68b9fa3273 Author: Biao Huang Date: Mon Jun 3 09:58:06 2019 +0800 net: stmmac: dwmac4: fix flow control issue Current dwmac4_flow_ctrl will not clear GMAC_RX_FLOW_CTRL_RFE/GMAC_RX_FLOW_CTRL_RFE bits, so MAC hw will keep flow control on although expecting flow control off by ethtool. Add codes to fix it. Fixes: 477286b53f55 ("stmmac: add GMAC4 core support") Signed-off-by: Biao Huang Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit d2facb4b3983425f6776c24dd678a82dbe673773 Author: Biao Huang Date: Mon Jun 3 09:58:05 2019 +0800 net: stmmac: modify default value of tx-frames the default value of tx-frames is 25, it's too late when passing tstamp to stack, then the ptp4l will fail: ptp4l -i eth0 -f gPTP.cfg -m ptp4l: selected /dev/ptp0 as PTP clock ptp4l: port 1: INITIALIZING to LISTENING on INITIALIZE ptp4l: port 0: INITIALIZING to LISTENING on INITIALIZE ptp4l: port 1: link up ptp4l: timed out while polling for tx timestamp ptp4l: increasing tx_timestamp_timeout may correct this issue, but it is likely caused by a driver bug ptp4l: port 1: send peer delay response failed ptp4l: port 1: LISTENING to FAULTY on FAULT_DETECTED (FT_UNSPECIFIED) ptp4l tests pass when changing the tx-frames from 25 to 1 with ethtool -C option. It should be fine to set tx-frames default value to 1, so ptp4l will pass by default. Signed-off-by: Biao Huang Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 792232390b891a97500eb3cccd54d0c7ca8e4981 Author: Biao Huang Date: Mon Jun 3 09:58:04 2019 +0800 net: stmmac: dwmac-mediatek: disable rx watchdog disable rx watchdog for dwmac-mediatek, then the hw will issue a rx interrupt once receiving a packet, so the responding time for rx path will be reduced. Signed-off-by: Biao Huang Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c | 1 + 1 file changed, 1 insertion(+) commit 5aa070dc504989368881bdfc3ca4c2b29d22b520 Author: Biao Huang Date: Mon Jun 3 09:58:03 2019 +0800 net: stmmac: dwmac-mediatek: enable Ethernet power domain add Ethernet power on/off operations in init/exit flow. Signed-off-by: Biao Huang Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 478db1f1fce3aaed226173ddd1adadd7744018c6 Author: Enrico Weigelt Date: Wed Jun 5 23:19:13 2019 +0200 drivers: net: vxlan: drop unneeded likely() call around IS_ERR() IS_ERR() already calls unlikely(), so this extra likely() call around the !IS_ERR() is not needed. Signed-off-by: Enrico Weigelt Signed-off-by: David S. Miller drivers/net/vxlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 26f8113cc720b6362432cb8b9ed61dc913418b0c Author: Enrico Weigelt Date: Wed Jun 5 23:11:34 2019 +0200 net: ipv6: drop unneeded likely() call around IS_ERR() IS_ERR() already calls unlikely(), so this extra unlikely() call around IS_ERR() is not needed. Signed-off-by: Enrico Weigelt Signed-off-by: David S. Miller net/ipv6/inet6_hashtables.c | 2 +- net/ipv6/udp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 88e235b80c2ad9117e153f2651857142d2d65db9 Author: Enrico Weigelt Date: Wed Jun 5 23:09:05 2019 +0200 net: ipv4: drop unneeded likely() call around IS_ERR() IS_ERR() already calls unlikely(), so this extra unlikely() call around IS_ERR() is not needed. Signed-off-by: Enrico Weigelt Signed-off-by: David S. Miller net/ipv4/fib_semantics.c | 2 +- net/ipv4/inet_hashtables.c | 2 +- net/ipv4/udp.c | 2 +- net/ipv4/udp_offload.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit b90f5aa4d6268e81dd1fd51e5ef89d2892bf040d Author: Enrico Weigelt Date: Wed Jun 5 23:06:40 2019 +0200 net: openvswitch: drop unneeded likely() call around IS_ERR() IS_ERR() already calls unlikely(), so this extra likely() call around the !IS_ERR() is not needed. Signed-off-by: Enrico Weigelt Signed-off-by: David S. Miller net/openvswitch/datapath.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4546e44ca2ec6fa3ca971ab6de3ef382f17ed544 Author: Enrico Weigelt Date: Wed Jun 5 22:58:50 2019 +0200 net: socket: drop unneeded likely() call around IS_ERR() IS_ERR() already calls unlikely(), so this extra likely() call around the !IS_ERR() is not needed. Signed-off-by: Enrico Weigelt Signed-off-by: David S. Miller net/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 856e6d9f9dd223dea978f1300f7c26903b9f9f6d Author: Gustavo A. R. Silva Date: Wed Jun 5 15:38:27 2019 -0500 nfp: flower: use struct_size() helper One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct nfp_tun_active_tuns { ... struct route_ip_info { __be32 ipv4; __be32 egress_port; __be32 extra[2]; } tun_info[]; }; Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. So, replace the following form: sizeof(struct nfp_tun_active_tuns) + sizeof(struct route_ip_info) * count with: struct_size(payload, tun_info, count) This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Acked-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/tunnel_conf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 80598e6230c7091e8377e97dc8678ca06a936f2a Author: Lihong Yang Date: Wed Jun 5 12:45:16 2019 -0700 i40e: Check and set the PF driver state first in i40e_ndo_set_vf_mac The PF driver state flag __I40E_VIRTCHNL_OP_PENDING needs to be checked and set at the beginning of i40e_ndo_set_vf_mac. Otherwise, if there are error conditions before it, the flag will be cleared unexpectedly by this function to cause potential race conditions. Hence move the check to the top of this function. Signed-off-by: Lihong Yang Signed-off-by: Jeff Kirsher Signed-off-by: David S. Miller drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 745b32c1a3faddbc5b96aade83c677454401f2e6 Author: Lihong Yang Date: Wed Jun 5 12:45:15 2019 -0700 i40e: Do not check VF state in i40e_ndo_get_vf_config The VF configuration returned in i40e_ndo_get_vf_config is already stored by the PF. There is no dependency on any specific state of the VF to return the configuration. Drop the check against I40E_VF_STATE_INIT since it is not needed. Signed-off-by: Lihong Yang Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher Signed-off-by: David S. Miller drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 55426f47d05ecf51bd8dff97fb8b4f73c0382577 Merge: 11694b03616b 20d437ee8f48 Author: David S. Miller Date: Wed Jun 5 16:44:14 2019 -0700 Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 10GbE Intel Wired LAN Driver Updates 2019-06-05 This series contains updates to mainly ixgbe, with a few updates to i40e, net, ice and hns2 driver. Jan adds support for tracking each queue pair for whether or not AF_XDP zero copy is enabled. Also updated the ixgbe driver to use the netdev-provided umems so that we do not need to contain these structures in our own adapter structure. William Tu provides two fixes for AF_XDP statistics which were causing incorrect counts. Jake reduces the PTP transmit timestamp timeout from 15 seconds to 1 second, which is still well after the maximum expected delay. Also fixes an issues with the PTP SDP pin setup which was not properly aligning on a full second, so updated the code to account for the cyclecounter multiplier and simplify the code to make the intent of the calculations more clear. Updated the function header comments to help with the code documentation. Added support for SDP/PPS output for x550 devices, which is slightly different than x540 devices that currently have this support. Anirudh adds a new define for Link Layer Discovery Protocol to the networking core, so that drivers do not have to create and use their own definitions. In addition, update all the drivers currently defining their own LLDP define to use the new networking core define. ==================== Signed-off-by: David S. Miller commit b7143860634387a6bc2ca537a79caf9522e4f1a8 Author: Matt Roper Date: Wed Jun 5 14:18:32 2019 -0700 drm/i915/ehl: Support HBR3 on EHL combo PHY Unlike ICL, EHL's combo PHYs can support HBR3 data rates. Note that this just extends the upper limit; we will continue to honor the max data rate specified in the VBT in cases where it is lower than HBR3. Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20190605211832.23945-1-matthew.d.roper@intel.com Reviewed-by: Manasi Navare drivers/gpu/drm/i915/intel_dp.c | 1 + 1 file changed, 1 insertion(+) commit feebcaeac79ad86fb289ef55fa92f4a97ab8314e Author: Jason Wang Date: Fri May 24 04:12:17 2019 -0400 vhost: factor out setting vring addr and num Factoring vring address and num setting which needs special care for accelerating vq metadata accessing. Signed-off-by: Jason Wang Signed-off-by: Michael S. Tsirkin drivers/vhost/vhost.c | 177 +++++++++++++++++++++++++++++--------------------- 1 file changed, 103 insertions(+), 74 deletions(-) commit 4942e8254d93b31ea14cf63a9dfd10a8112caafa Author: Jason Wang Date: Fri May 24 04:12:16 2019 -0400 vhost: introduce helpers to get the size of metadata area To avoid code duplication since it will be used by kernel VA prefetching. Signed-off-by: Jason Wang Signed-off-by: Michael S. Tsirkin drivers/vhost/vhost.c | 51 +++++++++++++++++++++++++++++++++------------------ 1 file changed, 33 insertions(+), 18 deletions(-) commit 9b5e830b7120847da6c636af2d101f8380e73fa0 Author: Jason Wang Date: Fri May 24 04:12:15 2019 -0400 vhost: rename vq_iotlb_prefetch() to vq_meta_prefetch() Rename the function to be more accurate since it actually tries to prefetch vq metadata address in IOTLB. And this will be used by following patch to prefetch metadata virtual addresses. Signed-off-by: Jason Wang Signed-off-by: Michael S. Tsirkin drivers/vhost/net.c | 4 ++-- drivers/vhost/vhost.c | 4 ++-- drivers/vhost/vhost.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit 7b5d753ebc22c5b6935a70ce9a857dc6220784f8 Author: Jason Wang Date: Fri May 24 04:12:14 2019 -0400 vhost: fine grain userspace memory accessors This is used to hide the metadata address from virtqueue helpers. This will allow to implement a vmap based fast accessing to metadata. Signed-off-by: Jason Wang Signed-off-by: Michael S. Tsirkin drivers/vhost/vhost.c | 94 +++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 77 insertions(+), 17 deletions(-) commit 1ab5d1385af40272ca44a5cd38af7e13da6ed847 Author: Jason Wang Date: Fri May 24 04:12:13 2019 -0400 vhost: generalize adding used elem Use one generic vhost_copy_to_user() instead of two dedicated accessor. This will simplify the conversion to fine grain accessors. About 2% improvement of PPS were seen during vitio-user txonly test. Signed-off-by: Jason Wang Signed-off-by: Michael S. Tsirkin drivers/vhost/vhost.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit 20d437ee8f4899573e6ea76c06ef0206e98bccb6 Author: Kangjie Lu Date: Fri Mar 8 21:31:23 2019 -0600 net: ixgbevf: fix a missing check of ixgbevf_write_msg_read_ack If ixgbevf_write_msg_read_ack fails, return its error code upstream Signed-off-by: Kangjie Lu Tested-by: Andrew Bowers Reviewed-by: Mukesh Ojha Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbevf/vf.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit cd4583206990a52ce414d5d700216029112d9051 Author: Jacob Keller Date: Fri Apr 12 08:33:19 2019 -0700 ixgbe: implement support for SDP/PPS output on X550 hardware Similar to the X540 hardware, enable support for generating a 1pps output signal on SDP0. This support is slightly different to the X540 hardware, because of the register layout changes. First, the system time register is now represented in 'cycles' and 'billions of cycles'. Second, we need to also program the TSSDP register, as well as the ESDP register. Third, the clock output uses only FREQOUT, instead of a full 64bit value for the output clock period. Finally, we have to use the ST0 bit instead of the SYNCLK bit in the TSAUXC register. This support should work even for the hardware with a higher frequency clock, as it carefully takes into account the multiply and shift of the cycle counter used. We also set the pps configuration to 1, since we now support generating a pulse per second output. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c | 99 ++++++++++++++++++++++++++- drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 14 +++- 2 files changed, 108 insertions(+), 5 deletions(-) commit 7efffc64435e51a5fc21baee5988769538aabc63 Author: Anirudh Venkataramanan Date: Thu Apr 11 09:11:36 2019 -0700 net: hns3: Use LLDP ethertype define ETH_P_LLDP Remove references to HCLGE_MAC_ETHERTYPE_LLDP and use ETH_P_LLDP instead. Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 1 - drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) commit 3aea173622483264170f7b7eabfd965467d6da0c Author: Jeff Kirsher Date: Wed Jun 5 11:14:02 2019 -0700 ice: Use LLDP ethertype define ETH_P_LLDP Instead of using a local define for the LLDP ethertype, use the kernel define ETH_P_LLDP. Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice_lib.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit f0843b681a9887187ca2a60c883b6da4fd71c616 Author: Anirudh Venkataramanan Date: Thu Apr 11 09:11:35 2019 -0700 ixgbe: Use LLDP ethertype define ETH_P_LLDP Remove references to IXGBE_ETH_P_LLD and use ETH_P_LLDP instead. Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe.h | 2 -- drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) commit af7364e4caf676458df72293054dcc193499a162 Author: Anirudh Venkataramanan Date: Thu Apr 11 09:11:34 2019 -0700 i40e: Use LLDP ethertype define ETH_P_LLDP Remove references to I40E_ETH_P_LLDP and use ETH_P_LLDP instead. Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 2 -- drivers/net/ethernet/intel/i40e/i40e_debugfs.c | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) commit c54c2c72b2b90a3ba61b8cad032a578ce2bf5b35 Author: Anirudh Venkataramanan Date: Thu Apr 11 09:11:33 2019 -0700 net: Add a define for LLDP ethertype Add a new define ETH_P_LLDP for Link Layer Discovery Protocol (LLDP) ethertype. Suggested-by: Bruce Allan Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher include/uapi/linux/if_ether.h | 1 + 1 file changed, 1 insertion(+) commit c3e9297c8ac943c75d5a51738593a3aa2333f586 Author: Jacob Keller Date: Mon Apr 8 16:52:02 2019 -0700 ixgbe: add a kernel documentation comment for ixgbe_ptp_get_ts_config This function was missing a documentation comment. Add one now. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 8b057955af8712c5b4d23a0c472170150ee8db18 Author: Jacob Keller Date: Mon Apr 8 16:52:01 2019 -0700 ixgbe: use 'cc' instead of 'hw_cc' for local variable The ixgbe_ptp.c file sometimes uses hw_cc as the local variable for the cycle counter in ixgbe_ptp_read_X550. However, we use just 'cc' as a local variable for this by convention else where in the file. Convert this lone usage of 'hw_cc' into just the shorter 'cc' name to match the other read functions in the file. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 68d9676fc04eeb1b7d8a2c1bca56458e4cc74e3f Author: Jacob Keller Date: Mon Apr 8 16:51:59 2019 -0700 ixgbe: fix PTP SDP pin setup on X540 hardware The function ixgbe_ptp_setup_sdp_X540 attempts to program a software defined pin, in order to generate a pulse-per-second output on SDP 0. It does work to generate the output, but does not align the output on the full second. Additionally, it does not take into account the cyclecounter multiplier. This leads to somewhat confusing code which is likely to be incorrect if blindly copied to another hardware type. Update this code to account for the cyclecounter multiplier, and to directly use timecounter_read. This change ensures that the SDP output will align properly on a full second, and makes the intent of the calculations a bit more clear. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c | 71 ++++++++++++++++------------ 1 file changed, 42 insertions(+), 29 deletions(-) commit 8fd70994028025b64888ee0e6ee4762cac72f11a Author: Jacob Keller Date: Mon Apr 8 16:51:58 2019 -0700 ixgbe: reduce PTP Tx timestamp timeout to 1 second Previously we waited for a whole 15 seconds before we cleared the Tx timestamp state. This is astronomically long compared to the worst case timings expected by our devices. In addition, this is longer than the wait in ptp4l when it detects a fault (caused by missing Tx timestamps). Thus, reduce the timer to only 1 second, which is well after the maximum expected delay. This should reduce user frustration when a timestamp does get dropped for some reason. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1bc1ffb04070d2791d8bc384635094aab7138e98 Author: William Tu Date: Thu Apr 4 09:36:55 2019 -0700 ixgbe: fix AF_XDP tx packet count The total_packets count at ixgbe_clean_xdp_tx_irq is always zero when testing with xdpsock -t -N. Set the gso_segs to 1 to make the tx packet count correct. Signed-off-by: William Tu Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 1 + 1 file changed, 1 insertion(+) commit 30d5703bceb0c118ef934918074768620efa93e6 Author: William Tu Date: Thu Apr 4 09:36:54 2019 -0700 ixgbe: fix AF_XDP tx byte count The tx bytecount is done twice. When running './xdpsock -t -N -i eth3' and 'ip -s link show dev eth3' The avg packet size is 120 instead of 60. So remove the extra one. Signed-off-by: William Tu Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 1 - 1 file changed, 1 deletion(-) commit 9ba095a628f77e4c8093cbb2da6f88cf43e55502 Author: Jan Sokolowski Date: Fri Mar 22 14:16:38 2019 -0700 ixgbe: remove umem from adapter As current implementation of netdev already contains and provides umems for us, we no longer have the need to contain these structures in ixgbe_adapter. Refactor the code to operate on netdev-provided umems. Signed-off-by: Jan Sokolowski Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe.h | 11 ++-- drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 79 +++++----------------------- 2 files changed, 19 insertions(+), 71 deletions(-) commit d49e286d354e75710cc9d100197de1161a8b809e Author: Jan Sokolowski Date: Fri Mar 22 14:16:37 2019 -0700 ixgbe: add tracking of AF_XDP zero-copy state for each queue pair Here, we add a bitmap to the ixgbe_adapter that tracks if a certain queue pair has been "zero-copy enabled" via the ndo_bpf. The bitmap is used in ixgbe_xsk_umem, and enables zero-copy if and only if XDP is enabled, the corresponding qid in the bitmap is set, and the umem is non-NULL; Signed-off-by: Jan Sokolowski Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe.h | 1 + drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 6 ++++++ drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 5 ++++- 3 files changed, 11 insertions(+), 1 deletion(-) commit edadd68031e5b7c1ba0c413a9549dce62a02844c Author: Hans Verkuil Date: Wed Jun 5 10:32:11 2019 -0400 media: MAINTAINERS: update email address Use hverkuil-cisco@xs4all.nl instead of hans.verkuil@cisco.com. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 6aace2f89f785482efecbec3d61dfa41e0a64f9c Author: Hans Verkuil Date: Wed Jun 5 10:31:06 2019 -0400 media: Documentation: update email address Use hverkuil-cisco@xs4all.nl instead of hans.verkuil@cisco.com. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/ABI/testing/debugfs-cec-error-inj | 2 +- Documentation/media/uapi/cec/cec-api.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 6e2980cc68d0dfac1c734fae887754c1cb9904a0 Author: Kefeng Wang Date: Wed Jun 5 09:08:20 2019 -0400 media: pvrusb2: fix null-ptr-deref in class_unregister() The class_ptr will be NULL if pvr2_sysfs_class_create() fails in pvr_init(), when call pvr2_sysfs_class_destroy(), it will lead to null-ptr-deref, fix it. Reported-by: Hulk Robot Signed-off-by: Kefeng Wang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/pvrusb2/pvrusb2-sysfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7aac98494d1d932cde053861ce0c12ca5ab3f762 Author: Neil Armstrong Date: Wed Jun 5 08:20:15 2019 -0400 media: platform: ao-cec-g12a: remove spin_lock_irqsave() locking in meson_ao_cec_g12a_read/write Since locking is handled by regmap, the spin_lock_irqsave() in the meson_ao_cec_g12a_read/write() regmap callbacks is not needed. Fixes: b7778c46683c ("media: platform: meson: Add Amlogic Meson G12A AO CEC Controller driver") Signed-off-by: Neil Armstrong Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/meson/ao-cec-g12a.c | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) commit 2ac36fd57453047e1677768b359dedf1f641681e Author: Fabio Estevam Date: Sat Jun 1 13:51:40 2019 -0400 media: imx7-media-csi: Remove unneeded error message In case of ioremap failure, the core code will take care of printing the error message, so there is no need for having a local error message in the driver. Signed-off-by: Fabio Estevam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 9e5fa4e1e5b5b0a43e4d123a2e3345c59456d612 Author: Fabio Estevam Date: Sat Jun 1 13:51:39 2019 -0400 media: imx7-media-csi: Use u32 for storing register reads The CSI registers are 32-bit, so using u32 type is more suitable for storing the values from register reads. Switch from 'unsigned long' to 'u32' type. Signed-off-by: Fabio Estevam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 345162044fa6d344007cbd822722a129be579d97 Author: Fabio Estevam Date: Sat Jun 1 13:51:38 2019 -0400 media: imx7-media-csi: Use functions instead of macros Currently there is a macro for reading and another macro for writing to the CSI registers. Functions can do parameter type checking, which leads to a safer code, so switch from macro to function implementation. Signed-off-by: Fabio Estevam Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 2b0287ef1d9e9a86517d481d270ac160a8c31651 Author: Jae Hyun Yoo Date: Fri May 31 18:15:47 2019 -0400 media: aspeed: use different delays for triggering VE H/W reset In case of watchdog timeout detected while doing mode detection, it's better triggering video engine hardware reset immediately so this commit fixes code for the case. Other than the case, it will trigger video engine hardware reset after RESOLUTION_CHANGE_DELAY. Signed-off-by: Jae Hyun Yoo Reviewed-by: Eddie James Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/aspeed-video.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 99914b61156041123a547da9a8132e7cc44e4e40 Author: Jae Hyun Yoo Date: Fri May 31 18:15:46 2019 -0400 media: aspeed: remove source buffer allocation before mode detection Mode detection doesn't require source buffer allocation so this commit removes that. Signed-off-by: Jae Hyun Yoo Reviewed-by: Eddie James Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/aspeed-video.c | 37 +++++------------------------------ 1 file changed, 5 insertions(+), 32 deletions(-) commit 68b65879e81608b4fcb216e34ca083f048c84676 Author: Jae Hyun Yoo Date: Fri May 31 18:15:45 2019 -0400 media: aspeed: refine interrupt handling logic There are cases that interrupt bits are cleared by a 500ms delayed work which causes unnecessary irq calls. Also, the current interrupt handler returns IRQ_HANDLED always but it should return IRQ_NONE if there is any unhandled interrupt. So this commit refines the interrupt handling logic to fix these issues. Signed-off-by: Jae Hyun Yoo Reviewed-by: Andrew Jeffery Reviewed-by: Eddie James Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/aspeed-video.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit f8a02b37e2188590bdc116ee0bcdf25907f5bfb8 Author: Jae Hyun Yoo Date: Fri May 31 18:15:44 2019 -0400 media: aspeed: remove checking of VE_INTERRUPT_CAPTURE_COMPLETE VE_INTERRUPT_CAPTURE_COMPLETE and VE_INTERRUPT_COMP_COMPLETE are not set at the same time but the current interrupt handling mechanism of this driver doesn't clear the interrupt flag until both two are set, and this behavior causes unnecessary interrupt handler calls. In fact, this driver provides JPEG format only so taking care of the VE_INTERRUPT_COMP_COMPLETE is enough for getting compressed image frame so this commit gets rid of the VE_INTERRUPT_CAPTURE_COMPLETE checking logic to simplify the logic. Handling of VE_INTERRUPT_CAPTURE_COMPLETE could be added back later when it's actually needed. Signed-off-by: Jae Hyun Yoo Reviewed-by: Eddie James Reviewed-by: Andrew Jeffery Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/aspeed-video.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 084b6790cf356a662c473825cb945e829ee90e8a Author: Jae Hyun Yoo Date: Fri May 31 18:15:43 2019 -0400 media: aspeed: reduce noisy log printing outs Currently, this driver prints out too much log messages when a mode change happens, video turned off by screen saver and etc. Actually, all cases are reported to user space properly. Also, these are not critical errors but recoverable things, so this commit changes the log level of some noisy printing outs. Signed-off-by: Jae Hyun Yoo Reviewed-by: Eddie James Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/aspeed-video.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit c8b996ca28d0a8a5dfb423fef6d7ffce7279b19b Author: Jae Hyun Yoo Date: Fri May 31 18:15:42 2019 -0400 media: aspeed: remove IRQF_SHARED flag Video Engine has a dedicated interrupt line so this driver doesn't need to use IRQF_SHARED flag so remove it. Also, it'd be good for following what Thomas recommended in the IRQF_ONESHOT support patch like below: "Note that for now IRQF_ONESHOT cannot be used with IRQF_SHARED to avoid complex accounting mechanisms." Signed-off-by: Jae Hyun Yoo Reviewed-by: Eddie James Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/aspeed-video.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 12ae1c1bf5db2f33fcd9092a96f630291c4b181a Author: Jae Hyun Yoo Date: Fri May 31 18:15:41 2019 -0400 media: aspeed: change irq to threaded irq Differently from other Aspeed drivers, this driver calls clock control APIs in interrupt context. Since ECLK is coupled with a reset bit in clk-aspeed module, aspeed_clk_enable will make 10ms of busy waiting delay for triggering the reset and it will eventually disturb other drivers' interrupt handling. To fix this issue, this commit changes this driver's irq to threaded irq so that the delay can be happened in a thread context. Signed-off-by: Jae Hyun Yoo Reviewed-by: Eddie James Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/aspeed-video.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 7b74dc0caa307a350e5710d51472af5b7858de05 Author: Jae Hyun Yoo Date: Fri May 31 18:15:40 2019 -0400 media: aspeed: refine clock control logic Currently, this driver calls clk_prepare and clk_unprepare from interrupt context too but these should be called from sleepable context only. To fix this issue, this commit splits out clk_enable/disable and clk_prepare/unprepare, and it places clk_prepare/unprepare calls into the module probe/remove function. Signed-off-by: Jae Hyun Yoo Reviewed-by: Eddie James Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/aspeed-video.c | 38 ++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) commit 50f9495efe308eb25fd921ea7c8c8143ddeeae30 Author: Douglas Anderson Date: Thu May 2 15:53:33 2019 -0700 drm/bridge/synopsys: dw-hdmi: Add "unwedge" for ddc bus See the PhD thesis in the comments in this patch for details, but to summarize this adds a hacky "unwedge" feature to the dw_hdmi i2c bus to workaround what appears to be a hardware errata. This relies on a pinctrl entry to help change around muxing to perform the unwedge. NOTE that the specific TV this was tested on was the "Samsung UN40HU6950FXZA" and the specific port was the "STB" port. Signed-off-by: Douglas Anderson Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190502225336.206885-2-dianders@chromium.org drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 116 +++++++++++++++++++++++++----- 1 file changed, 100 insertions(+), 16 deletions(-) commit c60362500149608bc535c9cb80d42ddd03f8152a Author: Douglas Anderson Date: Thu May 2 15:53:32 2019 -0700 dt-bindings: drm/bridge/synopsys: dw-hdmi: Add "unwedge" for ddc bus In certain situations it was seen that we could wedge up the DDC bus on the HDMI adapter on rk3288. The only way to unwedge was to mux one of the pins over to GPIO output-driven-low temporarily and then quickly mux back. Full details can be found in the patch ("drm/bridge/synopsys: dw-hdmi: Add "unwedge" for ddc bus"). Since unwedge requires remuxing the pins, we first need to add to the bindings so that we can specify what state the pins should be in for unwedging. Reviewed-by: Rob Herring Signed-off-by: Douglas Anderson Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190502225336.206885-1-dianders@chromium.org .../devicetree/bindings/display/rockchip/dw_hdmi-rockchip.txt | 7 +++++++ 1 file changed, 7 insertions(+) commit 9698ed4d4a2993ce54b9f7d71a2891e972caa117 Author: Jae Hyun Yoo Date: Fri May 31 18:15:39 2019 -0400 media: aspeed: fix a kernel warning on clk control Video engine clock control can be double disabled and eventually it causes a kernel warning with stack dump printing out like below: [ 515.540498] ------------[ cut here ]------------ [ 515.545174] WARNING: CPU: 0 PID: 1310 at drivers/clk/clk.c:684 clk_core_unprepare+0x13c/0x170 [ 515.553806] vclk-gate already unprepared [ 515.557841] CPU: 0 PID: 1310 Comm: obmc-ikvm Tainted: G W 5.0.6-df66fbc97853fbba90a0bfa44de32f3d5f7602b4 #1 [ 515.568973] Hardware name: Generic DT based system [ 515.573777] Backtrace: [ 515.576272] [<80107cdc>] (dump_backtrace) from [<80107f10>] (show_stack+0x20/0x24) [ 515.583930] r7:803a5614 r6:00000009 r5:00000000 r4:9d88fe1c [ 515.589712] [<80107ef0>] (show_stack) from [<80690184>] (dump_stack+0x20/0x28) [ 515.597053] [<80690164>] (dump_stack) from [<80116044>] (__warn.part.3+0xb4/0xdc) [ 515.604557] [<80115f90>] (__warn.part.3) from [<801160d8>] (warn_slowpath_fmt+0x6c/0x90) [ 515.612734] r6:000002ac r5:8080befc r4:80a07008 [ 515.617463] [<80116070>] (warn_slowpath_fmt) from [<803a5614>] (clk_core_unprepare+0x13c/0x170) [ 515.626167] r3:8080cdf4 r2:8080bfc0 [ 515.629834] r7:98d682a8 r6:9d8a9200 r5:9e5151a0 r4:97abd620 [ 515.635530] [<803a54d8>] (clk_core_unprepare) from [<803a76a4>] (clk_unprepare+0x34/0x3c) [ 515.643812] r5:9e5151a0 r4:97abd620 [ 515.647529] [<803a7670>] (clk_unprepare) from [<804f36ec>] (aspeed_video_off+0x38/0x50) [ 515.655539] r5:9e5151a0 r4:9e504000 [ 515.659242] [<804f36b4>] (aspeed_video_off) from [<804f4358>] (aspeed_video_release+0x90/0x114) [ 515.668036] r5:9e5044b0 r4:9e504000 [ 515.671643] [<804f42c8>] (aspeed_video_release) from [<804d302c>] (v4l2_release+0xd4/0xe8) [ 515.679999] r7:98d682a8 r6:9d087810 r5:9d8a9200 r4:9e504318 [ 515.685695] [<804d2f58>] (v4l2_release) from [<80236454>] (__fput+0x98/0x1c4) [ 515.692914] r5:9e51b608 r4:9d8a9200 [ 515.696597] [<802363bc>] (__fput) from [<802365e8>] (____fput+0x18/0x1c) [ 515.703315] r9:80a0700c r8:801011e4 r7:00000000 r6:80a64b9c r5:9d8e35a0 r4:9d8e38dc [ 515.711167] [<802365d0>] (____fput) from [<80131ca4>] (task_work_run+0x7c/0xa0) [ 515.718596] [<80131c28>] (task_work_run) from [<80106884>] (do_work_pending+0x4a8/0x578) [ 515.726777] r7:801011e4 r6:80a07008 r5:9d88ffb0 r4:ffffe000 [ 515.732466] [<801063dc>] (do_work_pending) from [<8010106c>] (slow_work_pending+0xc/0x20) [ 515.740727] Exception stack(0x9d88ffb0 to 0x9d88fff8) [ 515.745840] ffa0: 00000000 76f18094 00000000 00000000 [ 515.754122] ffc0: 00000007 00176778 7eda4c20 00000006 00000000 00000000 48e20fa4 00000000 [ 515.762386] ffe0: 00000002 7eda4b08 00000000 48f91efc 80000010 00000007 [ 515.769097] r10:00000000 r9:9d88e000 r8:801011e4 r7:00000006 r6:7eda4c20 r5:00176778 [ 515.777006] r4:00000007 [ 515.779558] ---[ end trace 12c04aadef8afbbb ]--- [ 515.784176] ------------[ cut here ]------------ [ 515.788817] WARNING: CPU: 0 PID: 1310 at drivers/clk/clk.c:825 clk_core_disable+0x18c/0x204 [ 515.797161] eclk-gate already disabled [ 515.800916] CPU: 0 PID: 1310 Comm: obmc-ikvm Tainted: G W 5.0.6-df66fbc97853fbba90a0bfa44de32f3d5f7602b4 #1 [ 515.811945] Hardware name: Generic DT based system [ 515.816730] Backtrace: [ 515.819210] [<80107cdc>] (dump_backtrace) from [<80107f10>] (show_stack+0x20/0x24) [ 515.826782] r7:803a5900 r6:00000009 r5:00000000 r4:9d88fe04 [ 515.832454] [<80107ef0>] (show_stack) from [<80690184>] (dump_stack+0x20/0x28) [ 515.839687] [<80690164>] (dump_stack) from [<80116044>] (__warn.part.3+0xb4/0xdc) [ 515.847170] [<80115f90>] (__warn.part.3) from [<801160d8>] (warn_slowpath_fmt+0x6c/0x90) [ 515.855247] r6:00000339 r5:8080befc r4:80a07008 [ 515.859868] [<80116070>] (warn_slowpath_fmt) from [<803a5900>] (clk_core_disable+0x18c/0x204) [ 515.868385] r3:8080cdd0 r2:8080c00c [ 515.871957] r7:98d682a8 r6:9d8a9200 r5:97abd560 r4:97abd560 [ 515.877615] [<803a5774>] (clk_core_disable) from [<803a59a0>] (clk_core_disable_lock+0x28/0x34) [ 515.886301] r7:98d682a8 r6:9d8a9200 r5:97abd560 r4:a0000013 [ 515.891960] [<803a5978>] (clk_core_disable_lock) from [<803a7714>] (clk_disable+0x2c/0x30) [ 515.900216] r5:9e5151a0 r4:9e515f60 [ 515.903816] [<803a76e8>] (clk_disable) from [<804f36f8>] (aspeed_video_off+0x44/0x50) [ 515.911656] [<804f36b4>] (aspeed_video_off) from [<804f4358>] (aspeed_video_release+0x90/0x114) [ 515.920341] r5:9e5044b0 r4:9e504000 [ 515.923921] [<804f42c8>] (aspeed_video_release) from [<804d302c>] (v4l2_release+0xd4/0xe8) [ 515.932184] r7:98d682a8 r6:9d087810 r5:9d8a9200 r4:9e504318 [ 515.937851] [<804d2f58>] (v4l2_release) from [<80236454>] (__fput+0x98/0x1c4) [ 515.944980] r5:9e51b608 r4:9d8a9200 [ 515.948559] [<802363bc>] (__fput) from [<802365e8>] (____fput+0x18/0x1c) [ 515.955257] r9:80a0700c r8:801011e4 r7:00000000 r6:80a64b9c r5:9d8e35a0 r4:9d8e38dc [ 515.963008] [<802365d0>] (____fput) from [<80131ca4>] (task_work_run+0x7c/0xa0) [ 515.970333] [<80131c28>] (task_work_run) from [<80106884>] (do_work_pending+0x4a8/0x578) [ 515.978421] r7:801011e4 r6:80a07008 r5:9d88ffb0 r4:ffffe000 [ 515.984086] [<801063dc>] (do_work_pending) from [<8010106c>] (slow_work_pending+0xc/0x20) [ 515.992247] Exception stack(0x9d88ffb0 to 0x9d88fff8) [ 515.997296] ffa0: 00000000 76f18094 00000000 00000000 [ 516.005473] ffc0: 00000007 00176778 7eda4c20 00000006 00000000 00000000 48e20fa4 00000000 [ 516.013642] ffe0: 00000002 7eda4b08 00000000 48f91efc 80000010 00000007 [ 516.020257] r10:00000000 r9:9d88e000 r8:801011e4 r7:00000006 r6:7eda4c20 r5:00176778 [ 516.028072] r4:00000007 [ 516.030606] ---[ end trace 12c04aadef8afbbc ]--- To prevent this issue, this commit adds clock status checking logic into the Aspeed video engine driver. Signed-off-by: Jae Hyun Yoo Reviewed-by: Eddie James Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/aspeed-video.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit dbb9fcc8c2d8d4ea1104f51d4947a8a8199a2cb5 Author: Fabien Dessenne Date: Fri May 31 05:18:15 2019 -0400 media: stm32-dcmi: fix irq = 0 case Manage the irq = 0 case, where we shall return an error. Fixes: b5b5a27bee58 ("media: stm32-dcmi: return appropriate error codes during probe") Signed-off-by: Fabien Dessenne Reported-by: Pavel Machek Acked-by: Pavel Machek Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/stm32/stm32-dcmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4f62e840f827a31d42db91f8ffb9a01420488589 Author: Hans Verkuil Date: Wed Jun 5 07:16:21 2019 -0400 media: cxusb: Revert "media: cxusb: add raw mode support for, Medion MD95700" This patch shouldn't have been included in the pull request as it adds a non-standard raw mode that is for debugging only. So revert commit ead14a70754f8d7f5dbcb0553c7f11eb0fc4a6ac. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/cxusb-analog.c | 190 ++++++------------------------- drivers/media/usb/dvb-usb/cxusb.h | 4 - drivers/media/v4l2-core/v4l2-ioctl.c | 3 +- 3 files changed, 34 insertions(+), 163 deletions(-) commit eb42ac1b411ccad9bfe65dbeb65acc243981bbdb Author: Shobhit Kukreti Date: Tue Jun 4 21:49:58 2019 -0400 media: platform: Fix Warning of Unneeded Semicolon reported by coccicheck fixed the warning in the files below drivers/media/platform/pxa_camera.c:1391:2-3: Unneeded semicolon drivers/media/platform/qcom/venus/vdec_ctrls.c:78:2-3: Unneeded semicolon drivers/media/platform/sti/c8sectpfe/c8sectpfe-dvb.c:146:3-4: Unneeded semicolon Signed-off-by: Shobhit Kukreti Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/pxa_camera.c | 2 +- drivers/media/platform/qcom/venus/vdec_ctrls.c | 2 +- drivers/media/platform/sti/c8sectpfe/c8sectpfe-dvb.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) commit d4ec9550e4b2d2e357a46fdc65d8ef3d4d15984c Author: Colin Ian King Date: Tue Jun 4 10:55:15 2019 -0400 media: vivid: fix incorrect assignment operation when setting video mode The assigment of FB_VMODE_NONINTERLACE to var->vmode should be a bit-wise or of FB_VMODE_NONINTERLACE instead of an assignment, otherwise the previous clearing of the FB_VMODE_MASK bits of var->vmode makes no sense and is redundant. Addresses-Coverity: ("Unused value") Fixes: ad4e02d5081d ("[media] vivid: add a simple framebuffer device for overlay testing") Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vivid/vivid-osd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0c6280b3c353868a1a40596585db43af756b0617 Author: Yunfei Dong Date: Tue Jun 4 05:37:37 2019 -0400 media: mtk-vcodec: support single-buffer frames MT8183 will use a multi-planar format backed by a single buffer. Adapt the existing code to be able to handle such frames instead of assuming each frame is backed by two buffers. Co-developed-by: Alexandre Courbot [acourbot: refactor, cleanup and split] Signed-off-by: Yunfei Dong Signed-off-by: Alexandre Courbot Signed-off-by: Hans Verkuil [hverkuil-cisco@xs4all.nl: fix checkpatch alignment warning] Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 0a7ff71e223fbf8d22a6db156a67482c77d5121a Author: Alexandre Courbot Date: Tue Jun 4 05:37:36 2019 -0400 media: mtk-vcodec: constify formats Formats are read-only internal memory structures, so make them const. Signed-off-by: Alexandre Courbot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c | 19 ++++++++++--------- drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h | 2 +- drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c | 19 ++++++++++--------- 3 files changed, 21 insertions(+), 19 deletions(-) commit 11694b03616b2a03cd7e3f0897d4d086c7fbc4b5 Author: Fabio Estevam Date: Wed Jun 5 10:10:35 2019 -0300 net: fec_ptp: Use dev_err() instead of pr_err() dev_err() is more appropriate for printing error messages inside drivers, so switch to dev_err(). Signed-off-by: Fabio Estevam Acked-by: Fugang Duan Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fec_ptp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e88e17fd40efc4a9d7fe6182d61b8ded34d0bc37 Merge: d28d66e5a92d 8197f9d2468d Author: David S. Miller Date: Wed Jun 5 11:41:59 2019 -0700 Merge branch 'r8169-factor-out-firmware-handling' Heiner Kallweit says: ==================== r8169: factor out firmware handling Let's factor out firmware handling into a separate source code file. This simplifies reading the code and makes clearer what the interface between driver and firmware handling is. v2: - fix small whitespace issue in patch 2 ==================== Signed-off-by: David S. Miller commit 8197f9d2468d5c55e865423203c5e8262b550b93 Author: Heiner Kallweit Date: Wed Jun 5 08:02:31 2019 +0200 r8169: factor out firmware handling Let's factor out firmware handling into a separate source code file. This simplifies reading the code and makes clearer what the interface between driver and firmware handling is. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/Makefile | 2 +- drivers/net/ethernet/realtek/r8169_firmware.c | 231 ++++++++++++++++++++++++ drivers/net/ethernet/realtek/r8169_firmware.h | 39 +++++ drivers/net/ethernet/realtek/r8169_main.c | 243 +------------------------- 4 files changed, 274 insertions(+), 241 deletions(-) commit 25e992a4603cd5284127e2a6fda6b05bd58d12ed Author: Heiner Kallweit Date: Wed Jun 5 07:59:57 2019 +0200 r8169: rename r8169.c to r8169_main.c In preparation of factoring out firmware handling rename r8169.c to r8169_main.c. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/Makefile | 1 + drivers/net/ethernet/realtek/{r8169.c => r8169_main.c} | 0 2 files changed, 1 insertion(+) commit d28d66e5a92de81199d21b696df707068361a4e7 Author: Randy Dunlap Date: Tue Jun 4 22:52:10 2019 -0700 net: ethernet: mediatek: fix mtk_eth_soc build errors & warnings Fix build errors in Mediatek mtk_eth_soc driver. It looks like these 3 source files were meant to be linked together since 2 of them are library-like functions, but they are currently being built as 3 loadable modules. Fixes these build errors: WARNING: modpost: missing MODULE_LICENSE() in drivers/net/ethernet/mediatek/mtk_eth_path.o WARNING: modpost: missing MODULE_LICENSE() in drivers/net/ethernet/mediatek/mtk_sgmii.o ERROR: "mtk_sgmii_init" [drivers/net/ethernet/mediatek/mtk_eth_soc.ko] undefined! ERROR: "mtk_setup_hw_path" [drivers/net/ethernet/mediatek/mtk_eth_soc.ko] undefined! ERROR: "mtk_sgmii_setup_mode_force" [drivers/net/ethernet/mediatek/mtk_eth_soc.ko] undefined! ERROR: "mtk_sgmii_setup_mode_an" [drivers/net/ethernet/mediatek/mtk_eth_soc.ko] undefined! ERROR: "mtk_w32" [drivers/net/ethernet/mediatek/mtk_eth_path.ko] undefined! ERROR: "mtk_r32" [drivers/net/ethernet/mediatek/mtk_eth_path.ko] undefined! This changes the loadable module name from mtk_eth_soc to mtk_eth. I didn't see a way to leave it as mtk_eth_soc. Reported-by: kbuild test robot Signed-off-by: Randy Dunlap Cc: Sean Wang Cc: John Crispin Cc: Felix Fietkau Cc: Nelson Chang Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7f1d39efa66f1fbb3d22244b46198e23499a75a3 Author: Sam Ravnborg Date: Wed Jun 5 16:13:21 2019 +0200 drm/r128: drop use of drmP.h Drop use of the deprecated drmP.h header file. Replace it with relevant include files. Sort include files in files touched. Signed-off-by: Sam Ravnborg Reviewed-by: Daniel Vetter Cc: David Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20190605141321.17819-3-sam@ravnborg.org drivers/gpu/drm/r128/r128_cce.c | 12 ++++++++++-- drivers/gpu/drm/r128/r128_drv.c | 9 ++++++--- drivers/gpu/drm/r128/r128_drv.h | 6 ++++++ drivers/gpu/drm/r128/r128_state.c | 9 ++++++++- 4 files changed, 30 insertions(+), 6 deletions(-) commit 3c1aa3b3872788f0cc567d7d9046039b95654a51 Author: Sam Ravnborg Date: Wed Jun 5 16:13:20 2019 +0200 drm/r128: drop drm_os_linux dependencies Drop use of drm_os_linux macros. Simple 1:1 replacements of - DRM_UDELAY - DRM_CURRENTPID - DRM_READ - DRM_WRITE With this change we do not need to introduce the deprecated drm_os_linux.h header when we drop use of drmP.h. Signed-off-by: Sam Ravnborg Reviewed-by: Daniel Vetter Cc: David Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20190605141321.17819-2-sam@ravnborg.org drivers/gpu/drm/r128/r128_cce.c | 16 ++++++++-------- drivers/gpu/drm/r128/r128_drv.h | 10 +++++----- drivers/gpu/drm/r128/r128_state.c | 16 ++++++++-------- 3 files changed, 21 insertions(+), 21 deletions(-) commit ac0ac2102003d1990a44e17b97721e6909c1dc82 Author: Sam Ravnborg Date: Wed Jun 5 16:03:14 2019 +0200 drm/savage: drop use of drmP.h Drop use of the deprecated drmP.h header file. Replace it with the necessary includes of other headers. Signed-off-by: Sam Ravnborg Reviewed-by: Daniel Vetter Cc: David Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20190605140313.13629-3-sam@ravnborg.org drivers/gpu/drm/savage/savage_bci.c | 8 +++++++- drivers/gpu/drm/savage/savage_drv.c | 9 +++++---- drivers/gpu/drm/savage/savage_drv.h | 4 ++++ drivers/gpu/drm/savage/savage_state.c | 9 ++++++++- 4 files changed, 24 insertions(+), 6 deletions(-) commit 87158992d39adca39dcff7a224aaaed4e6aff276 Author: Sam Ravnborg Date: Wed Jun 5 16:03:13 2019 +0200 drm/savage: drop use of drm_os_linux Drop use of macros from the deprecated drm_os_linux header. Simple 1:1 replacements of - DRM_UDELAY - DRM_CURRENTPID - DRM_READ - DRM_WRITE With this change we do not need to introduce the deprecated drm_os_linux.h header when we drop use of drmP.h. Signed-off-by: Sam Ravnborg Reviewed-by: Daniel Vetter Cc: David Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20190605140313.13629-2-sam@ravnborg.org drivers/gpu/drm/savage/savage_bci.c | 17 ++++++++++------- drivers/gpu/drm/savage/savage_drv.h | 6 ++++-- 2 files changed, 14 insertions(+), 9 deletions(-) commit 1b36d506fc82c7615852eca149c6a533a5260a00 Author: Sam Ravnborg Date: Wed Jun 5 15:55:39 2019 +0200 drm/sis: drop drmP.h use Drop use of the deprecated drmP.h header. Repalced with relevant header files and sorted header files in all files touched. Replaced DRM_{READ,WRITE} to avoid the drm_os_linux header. Build tested with allyesconfig, allmodconfig on various architectures. Signed-off-by: Sam Ravnborg Reviewed-by: Daniel Vetter Cc: David Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20190605135539.12940-2-sam@ravnborg.org drivers/gpu/drm/sis/sis_drv.c | 8 +++++--- drivers/gpu/drm/sis/sis_drv.h | 10 ++++------ drivers/gpu/drm/sis/sis_mm.c | 7 +++++-- 3 files changed, 14 insertions(+), 11 deletions(-) commit 9293e39c5d7ffc2f48bd96c12dc66d396016a084 Author: Alexandre Courbot Date: Tue Jun 4 05:37:33 2019 -0400 media: mtk-vcodec: replace GPLv2 with SPDX Replace the GPLv2 boilerplate with the corresponding SPDX reference. Signed-off-by: Alexandre Courbot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c | 15 +-------------- drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.h | 15 +-------------- drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c | 15 +-------------- drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_pm.c | 14 +------------- drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_pm.h | 14 +------------- drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h | 15 +-------------- drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c | 15 +-------------- drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.h | 15 +-------------- drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c | 15 +-------------- drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_pm.c | 14 +------------- drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_pm.h | 14 +------------- drivers/media/platform/mtk-vcodec/mtk_vcodec_intr.c | 14 +------------- drivers/media/platform/mtk-vcodec/mtk_vcodec_intr.h | 14 +------------- drivers/media/platform/mtk-vcodec/mtk_vcodec_util.c | 15 +-------------- drivers/media/platform/mtk-vcodec/mtk_vcodec_util.h | 15 +-------------- drivers/media/platform/mtk-vcodec/vdec/vdec_h264_if.c | 14 +------------- drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_if.c | 15 +-------------- drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_if.c | 16 +--------------- drivers/media/platform/mtk-vcodec/vdec_drv_base.h | 14 +------------- drivers/media/platform/mtk-vcodec/vdec_drv_if.c | 15 +-------------- drivers/media/platform/mtk-vcodec/vdec_drv_if.h | 15 +-------------- drivers/media/platform/mtk-vcodec/vdec_ipi_msg.h | 15 +-------------- drivers/media/platform/mtk-vcodec/vdec_vpu_if.c | 14 +------------- drivers/media/platform/mtk-vcodec/vdec_vpu_if.h | 14 +------------- drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c | 17 +---------------- drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c | 16 +--------------- drivers/media/platform/mtk-vcodec/venc_drv_base.h | 17 +---------------- drivers/media/platform/mtk-vcodec/venc_drv_if.c | 17 +---------------- drivers/media/platform/mtk-vcodec/venc_drv_if.h | 17 +---------------- drivers/media/platform/mtk-vcodec/venc_ipi_msg.h | 17 +---------------- drivers/media/platform/mtk-vcodec/venc_vpu_if.c | 15 +-------------- drivers/media/platform/mtk-vcodec/venc_vpu_if.h | 15 +-------------- 32 files changed, 32 insertions(+), 450 deletions(-) commit b76bfa6d7f5a2e09672b100a4c476cdb47b3967b Author: Fabio Estevam Date: Fri May 31 13:45:06 2019 -0400 media: imx7-mipi-csis: Remove extra blank line Checkpatch reports an extra blank line, so remove such unneeded line. Signed-off-by: Fabio Estevam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-mipi-csis.c | 1 - 1 file changed, 1 deletion(-) commit 7acc1f91bfb29509fd41144392aa9c761944e78b Author: Fabio Estevam Date: Fri May 31 13:45:05 2019 -0400 media: imx7-mipi-csis: Remove unneeded 'ret' initialization There is no need for initializing the 'ret' variable as it will be assigned at: ret = mipi_csis_parse_dt(pdev, state); Remove the unneeded initialization. Signed-off-by: Fabio Estevam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-mipi-csis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2b393f91c651c16d5c09f5c7aa689e58a79df34e Author: Fabio Estevam Date: Fri May 31 13:45:04 2019 -0400 media: imx7-mipi-csis: Propagate the error if clock enabling fails Currently the return value from clk_bulk_prepare_enable() is checked, but it is not propagate it in the case of failure. Fix it and also move the error message to the caller of mipi_csis_clk_enable(). Signed-off-by: Fabio Estevam Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-mipi-csis.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit f086f67485c5c126bcec4b0e96ac7319a2e59ab8 Author: Sudeep Holla Date: Thu May 23 10:06:18 2019 +0100 arm64: ptrace: add support for syscall emulation Add PTRACE_SYSEMU and PTRACE_SYSEMU_SINGLESTEP support on arm64. We don't need any special handling for PTRACE_SYSEMU_SINGLESTEP. It's quite difficult to generalize handling PTRACE_SYSEMU cross architectures and avoid calls to tracehook_report_syscall_entry twice. Different architecture have different mechanism to indicate NO_SYSCALL and trying to generalise adds more code for no gain. Cc: Will Deacon Signed-off-by: Sudeep Holla Signed-off-by: Catalin Marinas arch/arm64/include/asm/thread_info.h | 5 ++++- arch/arm64/kernel/ptrace.c | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) commit fd3866381be2681395e398c511699fd61a098609 Author: Sudeep Holla Date: Thu May 23 10:06:17 2019 +0100 arm64: add PTRACE_SYSEMU{,SINGLESTEP} definations to uapi headers x86 and um use 31 and 32 for PTRACE_SYSEMU and PTRACE_SYSEMU_SINGLESTEP while powerpc uses different value maybe for legacy reasons. Though handling of PTRACE_SYSEMU can be made architecture independent, it's hard to make these definations generic. To add to this existing mess few architectures like arm, c6x and sh use 31 for PTRACE_GETFDPIC (get the ELF fdpic loadmap address). It's not possible to move the definations to generic headers. So we unfortunately have to duplicate the same defination to ARM64 if we need to support PTRACE_SYSEMU and PTRACE_SYSEMU_SINGLESTEP. Cc: Will Deacon Signed-off-by: Sudeep Holla Signed-off-by: Catalin Marinas arch/arm64/include/uapi/asm/ptrace.h | 3 +++ 1 file changed, 3 insertions(+) commit 15532fd6f57c297c45ef3f5c17d2fbcdcc8092e4 Author: Sudeep Holla Date: Thu May 23 10:06:15 2019 +0100 ptrace: move clearing of TIF_SYSCALL_EMU flag to core While the TIF_SYSCALL_EMU is set in ptrace_resume independent of any architecture, currently only powerpc and x86 unset the TIF_SYSCALL_EMU flag in ptrace_disable which gets called from ptrace_detach. Let's move the clearing of TIF_SYSCALL_EMU flag to __ptrace_unlink which gets executed from ptrace_detach and also keep it along with or close to clearing of TIF_SYSCALL_TRACE. Cc: Paul Mackerras Cc: Michael Ellerman Cc: Thomas Gleixner Cc: Ingo Molnar Acked-by: Oleg Nesterov Signed-off-by: Sudeep Holla Signed-off-by: Catalin Marinas arch/powerpc/kernel/ptrace.c | 1 - arch/x86/kernel/ptrace.c | 3 --- kernel/ptrace.c | 3 +++ 3 files changed, 3 insertions(+), 4 deletions(-) commit 3c1b9ac753e99005d7ee0a883d6e5b577ba32aa9 Author: André Almeida Date: Thu May 30 09:19:56 2019 -0400 media: vimc: Remove or modify stream checks Change the way subdevices check if the stream is running. Verify the stream pointer instead of src_frame. This makes easier to get rid of the void* and u8* that points to frames in the subdevices structs. Remove checks that s_stream does on subdevices. They are redundant since the Media Controller Framework doesn't allow two streaming on the same media pipeline at the same time. Signed-off-by: André Almeida Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vimc/vimc-debayer.c | 5 +---- drivers/media/platform/vimc/vimc-scaler.c | 7 ++----- drivers/media/platform/vimc/vimc-sensor.c | 6 +----- 3 files changed, 4 insertions(+), 14 deletions(-) commit 84060c65a8fa14ea9974a8f15b8280517b869cdd Author: Stanimir Varbanov Date: Thu May 30 05:33:12 2019 -0400 media: media/doc: Allow sizeimage to be set by v4l clients This changes v4l2_pix_format and v4l2_plane_pix_format sizeimage field description to allow v4l clients to set bigger image size in case of variable length compressed data. Presently s5p-mfc and mtk-vcodec codec drivers use that. Lets make it obvious in the documentation. Signed-off-by: Stanimir Varbanov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/pixfmt-v4l2-mplane.rst | 15 ++++++++++++++- Documentation/media/uapi/v4l/pixfmt-v4l2.rst | 13 ++++++++++++- 2 files changed, 26 insertions(+), 2 deletions(-) commit 2c1c55252647abd989b94f725b190c700312d053 Author: Hans de Goede Date: Fri May 24 19:40:27 2019 +0200 drm/i915/dsi: Use a fuzzy check for burst mode clock check Prior to this commit we fail to init the DSI panel on the GPD MicroPC: https://www.indiegogo.com/projects/gpd-micropc-6-inch-handheld-industry-laptop#/ The problem is intel_dsi_vbt_init() failing with the following error: *ERROR* Burst mode freq is less than computed The pclk in the VBT panel modeline is 70000, together with 24 bpp and 4 lines this results in a bitrate value of 70000 * 24 / 4 = 420000. But the target_burst_mode_freq in the VBT is 418000. This commit works around this problem by adding an intel_fuzzy_clock_check when target_burst_mode_freq < bitrate and setting target_burst_mode_freq to bitrate when that checks succeeds, fixing the panel not working. Cc: stable@vger.kernel.org Reviewed-by: Ville Syrjälä Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20190524174028.21659-2-hdegoede@redhat.com drivers/gpu/drm/i915/intel_display.c | 2 +- drivers/gpu/drm/i915/intel_drv.h | 1 + drivers/gpu/drm/i915/intel_dsi_vbt.c | 11 +++++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) commit e96a8819a6c4fc578809ba79d64abca57145acb7 Author: Marc Gonzalez Date: Wed Jun 5 07:59:10 2019 -0400 media: docs: fix minor typos Fix minor typos in the DVB demux documentation. Signed-off-by: Marc Gonzalez Signed-off-by: Mauro Carvalho Chehab Documentation/media/kapi/dtv-core.rst | 6 +++--- include/media/dvbdev.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) commit 81bc8c03e1b06a79df6a855ccf55af44965dbdba Author: YueHaibing Date: Thu May 30 16:49:32 2019 +0800 platform/chrome: cros_ec: Make some symbols static Fix sparse warning: drivers/platform/chrome/cros_ec_debugfs.c:256:30: warning: symbol 'cros_ec_console_log_fops' was not declared. Should it be static? drivers/platform/chrome/cros_ec_debugfs.c:265:30: warning: symbol 'cros_ec_pdinfo_fops' was not declared. Should it be static? drivers/platform/chrome/cros_ec_lightbar.c:550:24: warning: symbol 'cros_ec_lightbar_attr_group' was not declared. Should it be static? drivers/platform/chrome/cros_ec_sysfs.c:338:24: warning: symbol 'cros_ec_attr_group' was not declared. Should it be static? drivers/platform/chrome/cros_ec_vbc.c:104:24: warning: symbol 'cros_ec_vbc_attr_group' was not declared. Should it be static? drivers/platform/chrome/cros_ec_lpc.c:408:25: warning: symbol 'cros_ec_lpc_pm_ops' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: YueHaibing Reviewed-by: Benson Leung Signed-off-by: Enric Balletbo i Serra drivers/platform/chrome/cros_ec_debugfs.c | 4 ++-- drivers/platform/chrome/cros_ec_lightbar.c | 2 +- drivers/platform/chrome/cros_ec_lpc.c | 2 +- drivers/platform/chrome/cros_ec_sysfs.c | 2 +- drivers/platform/chrome/cros_ec_vbc.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) commit 79e3f1d3db3d99ac7ae4f29b00da545df231a5a7 Author: Raul E Rangel Date: Mon Jun 3 12:16:49 2019 -0600 platform/chrome: wilco_ec: Add version sysfs entries Add the ability to extract version information from the EC. Example Output: $ cd /sys/bus/platform/devices/GOOG000C:00 $ tail build_date build_revision version model_number ==> build_date <== 04/25/19 ==> build_revision <== d2592cae0 ==> version <== 00.00.14 ==> model_number <== 08B6 Signed-off-by: Raul E Rangel Reviewed-by: Nick Crews Signed-off-by: Enric Balletbo i Serra Documentation/ABI/testing/sysfs-platform-wilco-ec | 31 +++++++++ drivers/platform/chrome/wilco_ec/sysfs.c | 79 +++++++++++++++++++++++ 2 files changed, 110 insertions(+) commit 9ff4d4e08ba8471f6c4cae05544f1802f6aab828 Author: Mauro Carvalho Chehab Date: Tue Jun 4 10:41:20 2019 -0400 media: dvb: tag deprecated DVB APIs as such There are three headers at DVB that should not be used on future projects: audio.h, osd.h and video.h. While this is already clear at the docs, make clear also at the headers that those files should not be used on future drivers. Signed-off-by: Mauro Carvalho Chehab include/uapi/linux/dvb/audio.h | 4 +++- include/uapi/linux/dvb/osd.h | 4 +++- include/uapi/linux/dvb/video.h | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) commit e9ca90074c26c50c16805fb54de45d1b46a0f1e5 Author: Masahiro Yamada Date: Tue Jun 4 07:13:34 2019 -0400 media: do not use C++ style comments in uapi headers Linux kernel tolerates C++ style comments these days. Actually, the SPDX License tags for .c files start with //. On the other hand, uapi headers are written in more strict C, where the C++ comment style is forbidden. [mchehab+samsung@kernel.org: fix a checkpatch --strict warning] Signed-off-by: Masahiro Yamada Signed-off-by: Mauro Carvalho Chehab include/uapi/linux/dvb/audio.h | 2 +- include/uapi/linux/dvb/osd.h | 170 ++++++++++++++++++++++++----------------- 2 files changed, 103 insertions(+), 69 deletions(-) commit 64ae0e71c60dc4bd3a59ae709b807f96f68df495 Author: Anders Roxell Date: Tue Jun 4 18:57:39 2019 -0700 mm/zsmalloc.c: remove unused variable The variable 'entry' is no longer used and the compiler rightly complains that it should be removed. ../mm/zsmalloc.c: In function `zs_pool_stat_create': ../mm/zsmalloc.c:648:17: warning: unused variable `entry' [-Wunused-variable] struct dentry *entry; ^~~~~ Rework to remove the unused variable. Link: http://lkml.kernel.org/r/20190604065826.26064-1-anders.roxell@linaro.org Fixes: 4268509a36a7 ("zsmalloc: no need to check return value of debugfs_create functions") Signed-off-by: Anders Roxell Cc: Minchan Kim Cc: Sergey Senozhatsky Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman mm/zsmalloc.c | 2 -- 1 file changed, 2 deletions(-) commit f36e664516b02c7f54bbd3094bab047d54bb5488 Author: Petr Mladek Date: Fri May 31 09:41:47 2019 +0200 livepatch: Use static buffer for debugging messages under rq lock The err_buf array uses 128 bytes of stack space. Move it off the stack by making it static. It's safe to use a shared buffer because klp_try_switch_task() is called under klp_mutex. Acked-by: Miroslav Benes Acked-by: Josh Poimboeuf Reviewed-by: Kamalesh Babulal Signed-off-by: Petr Mladek kernel/livepatch/transition.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit dea87bfb7b280e8b14519eb6b5e8bafbbf4c66f2 Author: Arnaldo Carvalho de Melo Date: Wed Jun 5 10:53:06 2019 -0300 perf trace: Associate more argument names with the filename beautifier For instance, the rename* family uses "oldname", "newname", so check if "name" is at the end and treat it as a filename. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-wjy7j4bk06g7atzwoz1mid24@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-trace.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 8195168e877948bb9a943ce11ad3e6ee71014bd5 Author: Arnaldo Carvalho de Melo Date: Wed Jun 5 10:34:47 2019 -0300 perf trace: Consume the augmented_raw_syscalls payload To support the SCA_FILENAME beautifier in more than one syscall arg, as needed for syscalls such as the rename* family, we need to, after processing one such arg, bump the augmented pointers so that the next augmented arg don't reuse data for the previous augmented arguments. Cc: Adrian Hunter Cc: Brendan Gregg Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-4e4cmzyjxb3wkonfo1x9a27y@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-trace.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit f3b0d8793c1619074d0ece2e1a7f64ea37eaf394 Author: Thierry Reding Date: Wed Jun 5 10:48:01 2019 +0200 drm/tegra: dpaux: Make VDD supply optional The VDD supply is only needed to supply power to eDP panels connected to DPAUX. Technically that supply should be dealt with in the panel driver, but for backwards-compatibility we need to keep this around anyway. Also as a bit of background: the reason for why this supply is attached to DPAUX is to make sure the panel is properly powered early on so that it can generate a hotplug pulse at the appropriate time. This may no longer be required given the support for deferred fbdev setup that was "recently" introduced in DRM/KMS. Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/dpaux.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit bbad640709fd43ff77b8838c409c977c0b28430c Author: Thierry Reding Date: Wed Jun 5 10:46:46 2019 +0200 drm/tegra: Use GPIO descriptor API The legacy GPIO API has long been deprecated. Move the driver over to the descriptor-based API, which allows us to get rid of some boilerplate while at it. Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/drm.h | 3 +-- drivers/gpu/drm/tegra/output.c | 52 +++++++++++++++--------------------------- 2 files changed, 20 insertions(+), 35 deletions(-) commit 31fa25f100ec0ce25ccf61d1468928c64d1c2fd9 Author: Thierry Reding Date: Wed Jun 5 10:47:16 2019 +0200 gpu: host1x: Do not link logical devices to DT nodes Logical devices created by the host1x bus infrastructure don't need to be associated with a device tree node. Doing so will cause the driver core to attempt to hook up IOMMU operations and fail because it is not a real device. However, for backwards-compatibility, we need to provide various OF_* uevent variables that were previously provided by of_device_uevent() and which are parsed by libdrm in userspace when querying the available devices. Do this by implementing a uevent callback for the host1x bus. Signed-off-by: Thierry Reding drivers/gpu/host1x/bus.c | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) commit 1e390478cfb527e34c9ab89ba57212cb05c33c51 Author: Thierry Reding Date: Wed Jun 5 10:46:05 2019 +0200 gpu: host1x: Increase maximum DMA segment size Recent versions of the DMA API debug code have started to warn about violations of the maximum DMA segment size. This is because the segment size defaults to 64 KiB, which can easily be exceeded in large buffer allocations such as used in DRM/KMS for framebuffers. Technically the Tegra SMMU and ARM SMMU don't have a maximum segment size (they map individual pages irrespective of whether they are contiguous or not), so the choice of 4 MiB is a bit arbitrary here. The maximum segment size is a 32-bit unsigned integer, though, so we can't set it to the correct maximum size, which would be the size of the aperture. Signed-off-by: Thierry Reding drivers/gpu/host1x/bus.c | 3 +++ include/linux/host1x.h | 2 ++ 2 files changed, 5 insertions(+) commit 4bb923e8075f3acbe2e422e9bfd0235b21d3e643 Author: Thierry Reding Date: Tue Jun 4 17:31:50 2019 +0200 gpu: host1x: Do not output error message for deferred probe When deferring probe, avoid logging a confusing error message. While at it, make the error message more informational. Reviewed-by: Daniel Vetter Signed-off-by: Thierry Reding drivers/gpu/host1x/dev.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 279ab04dbea1370d2eac0f854270369ccaef8a44 Author: Jiri Olsa Date: Fri May 31 15:13:21 2019 +0200 perf jvmti: Address gcc string overflow warning for strncpy() We are getting false positive gcc warning when we compile with gcc9 (9.1.1): CC jvmti/libjvmti.o In file included from /usr/include/string.h:494, from jvmti/libjvmti.c:5: In function ‘strncpy’, inlined from ‘copy_class_filename.constprop’ at jvmti/libjvmti.c:166:3: /usr/include/bits/string_fortified.h:106:10: error: ‘__builtin_strncpy’ specified bound depends on the length of the source argument [-Werror=stringop-overflow=] 106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ jvmti/libjvmti.c: In function ‘copy_class_filename.constprop’: jvmti/libjvmti.c:165:26: note: length computed here 165 | size_t file_name_len = strlen(file_name); | ^~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors As per Arnaldo's suggestion use strlcpy(), which does the same thing and keeps gcc silent. Suggested-by: Arnaldo Carvalho de Melo Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Ben Gainey Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/r/20190531131321.GB1281@krava Signed-off-by: Arnaldo Carvalho de Melo tools/perf/jvmti/libjvmti.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9b925365569eb4e845c006fdc254257e78fc12a4 Author: Hans Verkuil Date: Tue May 28 04:34:37 2019 -0400 media: vicodec: use new v4l2_m2m_ioctl_try_en/decoder_cmd funcs Use the new helper functions for the try_de/decoder_cmd ioctls. Signed-off-by: Hans Verkuil Reviewed-by: Tomasz Figa Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vicodec/vicodec-core.c | 35 +++------------------------ 1 file changed, 4 insertions(+), 31 deletions(-) commit ef732d5e2813ff5ef30cdb280b2d133e74213555 Author: Hans Verkuil Date: Wed May 29 02:45:59 2019 -0400 media: v4l2-mem2mem: add try_en/decoder_cmd ioctl helpers Most if not all codecs will need to implement these ioctls and it is expected to be the same for all codecs. So add this to the core v4l2-mem2mem framework so that this code can easily be reused. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-mem2mem.c | 29 +++++++++++++++++++++++++++++ include/media/v4l2-mem2mem.h | 4 ++++ 2 files changed, 33 insertions(+) commit ad2220aa4591f3a25705b2d44f8a518d19346433 Author: Hans Verkuil Date: Tue Jun 4 05:39:41 2019 -0400 media: staging/media: set device_caps in struct video_device Instead of filling in the struct v4l2_capability device_caps field, fill in the struct video_device device_caps field. That way the V4L2 core knows what the capabilities of the video device are. But this only really works if all drivers use this, so convert all staging/media drivers in this patch. Signed-off-by: Hans Verkuil Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/bcm2048/radio-bcm2048.c | 7 ++----- drivers/staging/media/davinci_vpfe/vpfe_video.c | 9 +++++---- drivers/staging/media/omap4iss/iss_video.c | 11 +++++------ 3 files changed, 12 insertions(+), 15 deletions(-) commit 602bce09fb43ca6fc41f1bdcba155b839b5e7f38 Author: Arnaldo Carvalho de Melo Date: Tue Jun 4 16:04:34 2019 -0300 perf augmented_raw_syscalls: Move reading filename to the loop Almost there, next step is to copy more than one filename payload. Probably to read syscall arg structs, etc we'll need just a variation of this that will decide what to use, if probe_read_str() or plain probe_read for structs, i.e. fixed size. Cc: Adrian Hunter Cc: Brendan Gregg Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-uf6u0pld6xe4xuo16f04owlz@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/examples/bpf/augmented_raw_syscalls.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit deaf4da48a67f73eb7d5d1802c14eaf58d33f2da Author: Arnaldo Carvalho de Melo Date: Tue Jun 4 15:57:28 2019 -0300 perf augmented_raw_syscalls: Change helper to consider just the augmented_filename part So that we can use it for multiple args, baby steps not to step into the verifier toes. In the process make sure we handle -EFAULT from bpf_prog_read_str(), as this really is needed now that we'll handle more than one augmented argument, i.e. if there is failure, then we have the argument that fails have: (size = 0, err = -EFAULT, value = [] ) followed by the next, lets say that worked for a second pathname: (size = 4, err = 0, value = "/tmp" ) So we can skip the first while telling the user about the problem and then process the second. Cc: Adrian Hunter Cc: Brendan Gregg Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-deyvqi39um6gp6hux6jovos8@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/examples/bpf/augmented_raw_syscalls.c | 46 +++++++++++++++++------- 1 file changed, 33 insertions(+), 13 deletions(-) commit b0b48b487de64525b08d03de456333939d6e912d Author: Hans Verkuil Date: Tue Jun 4 07:19:57 2019 -0400 media: vc04_services/bcm2835-camera: set device_caps in struct video_device Instead of filling in the struct v4l2_capability device_caps field, fill in the struct video_device device_caps field. That way the V4L2 core knows what the capabilities of the video device are. But this only really works if all drivers use this, so convert this driver accordingly. Signed-off-by: Hans Verkuil Acked-by: Greg Kroah-Hartman Signed-off-by: Mauro Carvalho Chehab drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 0c95a7ff76fb1c5bb614e6ee438fce06d1b957c8 Author: Arnaldo Carvalho de Melo Date: Tue Jun 4 15:31:28 2019 -0300 perf augmented_raw_syscalls: Move the probe_read_str to a separate function One more step into copying multiple filenames to support syscalls like rename*. Cc: Adrian Hunter Cc: Brendan Gregg Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-xdqtjexdyp81oomm1rkzeifl@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/examples/bpf/augmented_raw_syscalls.c | 27 ++++++++++++++++-------- 1 file changed, 18 insertions(+), 9 deletions(-) commit 4cae8675ea798b141ccdeea0a5b3f46a1e4605eb Author: Arnaldo Carvalho de Melo Date: Mon Jun 3 16:52:46 2019 -0300 perf augmented_raw_syscalls: Tell which args are filenames and how many bytes to copy Since we know what args are strings from reading the syscall descriptions in tracefs and also already mark such args to be beautified using the syscall_arg__scnprintf_filename() helper, all we need is to fill in this info in the 'syscalls' BPF map we were using to state which syscalls the user is interested in, i.e. the syscall filter. Right now just set that with PATH_MAX and unroll the syscall arg in the BPF program, as the verifier isn't liking something clang generates when unrolling the loop. This also makes the augmented_raw_syscalls.c program support all arches, since we removed that set of defines with the hard coded syscall numbers, all should be automatically set for all arches, with the syscall id mapping done correcly. Doing baby steps here, i.e. just the first string arg for a syscall is printed, syscalls with more than one, say, the various rename* syscalls, need further work, but lets get first something that the BPF verifier accepts before increasing the complexity To test it, something like: # perf trace -e string -e /home/acme/git/perf/tools/perf/examples/bpf/augmented_raw_syscalls.c With: # cat ~/.perfconfig [llvm] dump-obj = true clang-opt = -g [trace] #add_events = /home/acme/git/perf/tools/perf/examples/bpf/augmented_raw_syscalls.c show_zeros = yes show_duration = no no_inherit = yes show_timestamp = no show_arg_names = no args_alignment = 40 show_prefix = yes # That commented add_events line is needed for developing this augmented_raw_syscalls.c BPF program, as if we add it via the 'add_events' mechanism so as to shorten the 'perf trace' command lines, then we end up not setting up the -v option which precludes us having access to the bpf verifier log :-\ Cc: Adrian Hunter Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Daniel Borkmann Cc: Jesper Dangaard Brouer Cc: Jiri Olsa Cc: Leo Yan Cc: Namhyung Kim Cc: Song Liu Cc: Yonghong Song Link: https://lkml.kernel.org/n/tip-dn863ya0cbsqycxuy0olvbt1@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-trace.c | 31 +++ tools/perf/examples/bpf/augmented_raw_syscalls.c | 232 +++++++---------------- 2 files changed, 95 insertions(+), 168 deletions(-) commit 80b3fb64a55a7e4ba1ef8f9a7e87fbe1a26dc709 Author: Adrian Hunter Date: Mon May 20 14:37:28 2019 +0300 perf scripts python: exported-sql-viewer.py: Select find text when find bar is activated The user probably wants to replace the find text, so select the find text when the find bar is activated. That is fairly standard behaviour for search text entry. Entering text will replace the current text, but using edit keys (arrows, home, end etc) cancels the selection and enables editing. Signed-off-by: Adrian Hunter Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190520113728.14389-23-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/scripts/python/exported-sql-viewer.py | 1 + 1 file changed, 1 insertion(+) commit b3b660792e049c7ef4a40c4caa7008efd4777b3c Author: Adrian Hunter Date: Mon May 20 14:37:27 2019 +0300 perf scripts python: exported-sql-viewer.py: Add IPC information to Call Tree Enhance the call tree to display IPC information if it is available. Committer testing: [acme@quaco adrian.hunter]$ python ~acme/libexec/perf-core/scripts/python/exported-sql-viewer.py ~/c/adrian.hunter/simple-retpoline.db Reports -> Call Tree, then expand a few trees, then select with the mouse and press control+C (copy): Call Path Object Call Time Time Time(%) Insn Insn Cyc Cyc IPC Branch Branch ▼ simple-retpolin (ns) Cnt Cnt(%) Cnt Cnt(%) Count Count(%) ▼ 23003:23003 ▼ _start ld-2.28.so 112195670 218295 100.0 127746 100.0 207320 100.0 0.62 13046 100.0 ▶ unknown unknown 112195987 3202 1.5 0 0.0 0 0.0 0 1 0.0 ▶ _dl_start ld-2.28.so 112199189 188471 86.3 123394 96.6 180007 86.8 0.69 12529 96.0 ▼ _dl_init ld-2.28.so 112387660 13406 6.1 3207 2.5 14868 7.2 0.22 327 2.5 ▶ call_init.part.0 ld-2.28.so 112387773 117 0.9 70 2.2 639 4.3 0.11 3 0.9 ▶ call_init.part.0 ld-2.28.so 112387890 13129 97.9 3103 96.8 14100 94.8 0.22 315 96.3 ▶ call_init.part.0 ld-2.28.so 112401020 0 0.0 0 0.0 0 0.0 0 2 0.6 ▼ _start simple-retpol 112401066 12899 5.9 1142 0.9 11561 5.6 0.10 184 1.4 ▶ unknown unknown 112401388 846 6.6 0 0.0 0 0.0 0 1 0.5 ▼ __libc_start_main libc-2.28.so 112402344 11621 90.1 1129 98.9 10350 89.5 0.11 181 98.4 ▶ __cxa_atexit libc-2.28.so 112402360 2302 19.8 101 8.9 1817 17.6 0.06 13 7.2 ▶ __libc_csu_init simple-retpol 112404673 121 1.0 43 3.8 340 3.3 0.13 8 4.4 ▶ _setjmp libc-2.28.so 112404794 74 0.6 46 4.1 206 2.0 0.22 4 2.2 ▼ main simple-retpol 112404892 44 0.4 23 2.0 126 1.2 0.18 12 6.6 ▼ foo simple-retpol 112404892 19 43.2 12 52.2 55 43.7 0.22 5 41.7 bar simple-retpol 112404896 12 63.2 3 25.0 34 61.8 0.09 1 20.0 ▼ foo simple-retpol 112404911 25 56.8 11 47.8 71 56.3 0.15 5 41.7 ▶ bar simple-retpol 112404924 10 40.0 3 27.3 27 38.0 0.11 1 20.0 ▶ exit libc-2.28.so 112404936 9029 77.7 878 77.8 7765 75.0 0.11 139 76.8 Signed-off-by: Adrian Hunter Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190520113728.14389-22-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/scripts/python/exported-sql-viewer.py | 69 +++++++++++++++++++----- 1 file changed, 56 insertions(+), 13 deletions(-) commit 38a846d47f3d2fe6783e2df7bc5c2415239e6a63 Author: Adrian Hunter Date: Mon May 20 14:37:26 2019 +0300 perf scripts python: exported-sql-viewer.py: Add IPC information to Call Graph Graph Enhance the call graph to display IPC information if it is available. Committer testing: [acme@quaco adrian.hunter]$ python ~acme/libexec/perf-core/scripts/python/exported-sql-viewer.py ~/c/adrian.hunter/simple-retpoline.db Reports -> Context Sensitive Callgraph, then expand a few trees, then select with the mouse and press control+C: Call Path Object Count Time(ns) Time(%) Insn Insn Cyc Cyc IPC Branch Branch ▼ simple-retpolin Cnt Cnt(%) Cnt Cnt(%) Cnt Cnt(%) ▼ 23003:23003 ▼ _start ld-2.28.so 1 218295 100.0 127746 100.0 207320 100.0 0.62 13046 100.0 ▶ unknown unknown 1 3202 1.5 0 0.0 0 0.0 0 1 0.0 ▶ _dl_start ld-2.28.so 1 188471 86.3 123394 96.6 180007 86.8 0.69 12529 96.0 ▶ _dl_init ld-2.28.so 1 13406 6.1 3207 2.5 14868 7.2 0.22 327 2.5 ▼ _start simple-retpoline 1 12899 5.9 1142 0.9 11561 5.6 0.10 184 1.4 ▶ unknown unknown 1 846 6.6 0 0.0 0 0.0 0 1 0.5 ▼ __libc_start_main libc-2.28.so 1 11621 90.1 1129 98.9 10350 89.5 0.11 181 98.4 ▶ __cxa_atexit libc-2.28.so 1 2302 19.8 101 8.9 1817 17.6 0.06 13 7.2 ▶ __libc_csu_init simple-retpoline 1 121 1.0 43 3.8 340 3.3 0.13 8 4.4 ▼ _setjmp libc-2.28.so 1 74 0.6 46 4.1 206 2.0 0.22 4 2.2 ▼ __sigsetjmp libc-2.28.so 1 74 100.0 46 100.0 206 100.0 0.22 3 75.0 ▶ __sigjmp_save libc-2.28.so 1 0 0.0 0 0.0 0 0.0 0 1 33.3 ▼ main simple-retpoline 1 44 0.4 23 2.0 126 1.2 0.18 12 6.6 ▼ foo simple-retpoline 2 44 100.0 23 100.0 126 100.0 0.18 10 83.3 bar simple-retpoline 2 22 50.0 6 26.1 61 48.4 0.10 2 20.0 ▶ exit libc-2.28.so 1 9029 77.7 878 77.8 7765 75.0 0.11 139 76.8 Signed-off-by: Adrian Hunter Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190520113728.14389-21-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/scripts/python/exported-sql-viewer.py | 69 +++++++++++++++++++----- 1 file changed, 56 insertions(+), 13 deletions(-) commit 4a0979d4b4feee67a7f9a5605b5bfae3b0a2b6a9 Author: Adrian Hunter Date: Mon May 20 14:37:25 2019 +0300 perf scripts python: exported-sql-viewer.py: Add CallGraphModelParams Add a parameter to call graph and call tree, to determine whether IPC information is available. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190520113728.14389-20-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/scripts/python/exported-sql-viewer.py | 73 +++++++++++++----------- 1 file changed, 41 insertions(+), 32 deletions(-) commit 530e22fd5c6d2c572b1bbdda23eafa01a005fce0 Author: Adrian Hunter Date: Mon May 20 14:37:24 2019 +0300 perf scripts python: exported-sql-viewer.py: Add IPC information to the Branch reports Enhance the "All branches" and "Selected branches" reports to display IPC information if it is available. Committer testing: So, testing this I noticed that it all starts with the left arrow in every line, that should mean there is some tree there, i.e. look at all those ▶ symbols: Reports -> All Branches: Time CPU Command PID TID Branch Type In Tx Insn Cnt Cyc Cnt IPC Branch ▶ 187836112195670 7 simple-retpolin 23003 23003 trace begin No 0 0 0 0 unknown (unknown) -> 7f6f33d4f110 +_start (ld-2.28.so) ▶ 187836112195987 7 simple-retpolin 23003 23003 trace end No 0 883 0 7f6f33d4f110 _start (ld-2.28.so) -> 0 unknown +(unknown) ▶ 187836112199189 7 simple-retpolin 23003 23003 trace begin No 0 0 0 0 unknown (unknown) -> 7f6f33d4f110 +_start (ld-2.28.so) ▶ 187836112199189 7 simple-retpolin 23003 23003 call No 0 0 0 7f6f33d4f113 _start+0x3 (ld-2.28.so) -> 7f6f33d4ff50 +_dl_start (ld-2.28.so) ▶ 187836112199544 7 simple-retpolin 23003 23003 trace end No 17 996 0.02 7f6f33d4ff73 _dl_start+0x23 (ld-2.28.so) -> 0 +unknown (unknown) ▶ 187836112200939 7 simple-retpolin 23003 23003 trace begin No 0 0 0 0 unknown (unknown) -> 7f6f33d4ff73 +_dl_start+0x23 (ld-2.28.so) ▶ 187836112201229 7 simple-retpolin 23003 23003 trace end No 1 816 0.00 7f6f33d4ff7a _dl_start+0x2a (ld-2.28.so) -> 0 +unknown (unknown) ▶ 187836112203500 7 simple-retpolin 23003 23003 trace begin No 0 0 0 0 unknown (unknown) -> 7f6f33d4ff7a +_dl_start+0x2a (ld-2.28.so) But if you click on it, that ▶ disappears and a new click doesn't make it reappear, looks buggy, minor oddity, reported to Adrian. Reports -> Selected Branches, then ask for branches in the ld-2.28.so DSO: Time CPU Command PID TID Branch Type In Tx Insn Cnt Cyc Cnt IPC Branch ▶ 187836112195987 7 simple-retpolin 23003 23003 trace end No 0 883 0 7f6f33d4f110 _start (ld-2.28.so) -> 0 unknown (unknown) ▶ 187836112199189 7 simple-retpolin 23003 23003 trace begin No 0 0 0 0 unknown (unknown) -> 7f6f33d4f110 _start (ld-2.28.so) ▶ 187836112199189 7 simple-retpolin 23003 23003 call No 0 0 0 7f6f33d4f113 _start+0x3 (ld-2.28.so) -> 7f6f33d4ff50 _dl_start (ld-2.28.so) ▶ 187836112199544 7 simple-retpolin 23003 23003 trace end No 17 996 0.02 7f6f33d4ff73 _dl_start+0x23 (ld-2.28.so) -> 0 unknown (unknown) ▶ 187836112200939 7 simple-retpolin 23003 23003 trace begin No 0 0 0 0 unknown (unknown) -> 7f6f33d4ff73 _dl_start+0x23 (ld-2.28.so) ▶ 187836112201229 7 simple-retpolin 23003 23003 trace end No 1 816 0.00 7f6f33d4ff7a _dl_start+0x2a (ld-2.28.so) -> 0 unknown (unknown) ▶ 187836112203500 7 simple-retpolin 23003 23003 trace begin No 0 0 0 0 unknown (unknown) -> 7f6f33d4ff7a _dl_start+0x2a (ld-2.28.so) ▶ 187836112203528 7 simple-retpolin 23003 23003 unconditional jump No 0 0 0 7f6f33d4ffe7 _dl_start+0x97 (ld-2.28.so) -> 7f6f33d5000b _dl_start+0xbb (ld-2.28.so) ▶ 187836112203528 7 simple-retpolin 23003 23003 conditional jump No 0 0 0 7f6f33d5000f _dl_start+0xbf (ld-2.28.so) -> 7f6f33d4fffb _dl_start+0xab (ld-2.28.so) ▶ 187836112203528 7 simple-retpolin 23003 23003 conditional jump No 0 0 0 7f6f33d5000f _dl_start+0xbf (ld-2.28.so) -> 7f6f33d4fffb _dl_start+0xab (ld-2.28.so) ▶ 187836112203539 7 simple-retpolin 23003 23003 conditional jump No 0 0 0 7f6f33d50025 _dl_start+0xd5 (ld-2.28.so) -> 7f6f33d50210 _dl_start+0x2c0 (ld-2.28.so) ▶ 187836112203539 7 simple-retpolin 23003 23003 conditional jump No 0 0 0 7f6f33d5021a _dl_start+0x2ca (ld-2.28.so) -> 7f6f33d50360 _dl_start+0x410 (ld-2.28.so) ▶ 187836112203539 7 simple-retpolin 23003 23003 unconditional jump No 0 0 0 7f6f33d50377 _dl_start+0x427 (ld-2.28.so) -> 7f6f33d4ffff _dl_start+0xaf (ld-2.28.so) ▶ 187836112203539 7 simple-retpolin 23003 23003 conditional jump No 0 0 0 7f6f33d5000f _dl_start+0xbf (ld-2.28.so) -> 7f6f33d4fffb _dl_start+0xab (ld-2.28.so) ▶ 187836112203562 7 simple-retpolin 23003 23003 conditional jump No 0 0 0 7f6f33d5000f _dl_start+0xbf (ld-2.28.so) -> 7f6f33d4fffb _dl_start+0xab (ld-2.28.so) Signed-off-by: Adrian Hunter Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190520113728.14389-19-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/scripts/python/exported-sql-viewer.py | 102 ++++++++++++++++++----- 1 file changed, 83 insertions(+), 19 deletions(-) commit ec7f448e2b2e13d1629300c5881cb3b5e0a99c2f Author: Adrian Hunter Date: Mon May 20 14:37:23 2019 +0300 perf scripts python: export-to-postgresql.py: Export IPC information Export cycle and instruction counts on samples and calls tables. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190520113728.14389-18-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/scripts/python/export-to-postgresql.py | 36 +++++++++++++++-------- 1 file changed, 24 insertions(+), 12 deletions(-) commit 64adadb3f9dbaaae3d14ea75fa71a3b877cbe82e Author: Adrian Hunter Date: Mon May 20 14:37:22 2019 +0300 perf scripts python: export-to-sqlite.py: Export IPC information Export cycle and instruction counts on samples and calls tables. Committer testing: First runs some workload collecting intel_pt with the 'cyc' ter just for userspace: [root@quaco adrian.hunter]# perf record -o simple-retpoline.perf.data -e intel_pt/cyc/u ./simple-retpoline [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.035 MB simple-retpoline.perf.data ] [root@quaco adrian.hunter]# Then use the export-to-sqlite.py script to see if the changes in this cset don't make it to break and if the changes in the db schema are the ones expected: [root@quaco adrian.hunter]# perf script -i simple-retpoline.perf.data --itrace=be -s ~acme/libexec/perf-core/scripts/python/export-to-sqlite.py simple-retpoline.db branches calls 2019-05-31 11:50:46.942710 Creating database ... 2019-05-31 11:50:46.949663 Writing records... 2019-05-31 11:50:47.224033 Adding indexes 2019-05-31 11:50:47.231599 Done [root@quaco adrian.hunter]# Now lets use the db: [root@quaco adrian.hunter]# sqlite3 simple-retpoline.db SQLite version 3.26.0 2018-12-01 12:34:55 Enter ".help" for usage hints. sqlite> .schema samples CREATE TABLE samples (id integer NOT NULL PRIMARY KEY,evsel_id bigint,machine_id bigint,thread_id bigint,comm_id bigint,dso_id bigint,symbol_id bigint,sym_offset bigint,ip bigint,time bigint,cpuinteger,to_dso_id bigint,to_symbol_id bigint,to_sym_offset bigint,to_ip bigint,branch_type integer,in_tx boolean,call_path_id bigint,insn_count bigint,cyc_count bigint); sqlite> Cool, the 'insn_count' and 'cyc_count' are there, now lets see if we can use them in a query: sqlite> select insn_count,cyc_count from samples where cyc_count > 1500 and insn_count < 10; 6|1507 sqlite> select insn_count,cyc_count from samples where cyc_count > 1500; 118|2210 140|1516 3783|1861 132|1521 6|1507 sqlite> Seems to work :-) Signed-off-by: Adrian Hunter Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190520113728.14389-17-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/scripts/python/export-to-sqlite.py | 36 ++++++++++++++++++--------- 1 file changed, 24 insertions(+), 12 deletions(-) commit 52a2ab6fa99df9288f2c8c7f461b815550b9b366 Author: Adrian Hunter Date: Mon May 20 14:37:21 2019 +0300 perf db-export: Export IPC information Export cycle and instruction counts on samples and call-returns. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190520113728.14389-16-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/scripting-engines/trace-event-python.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 1159facee97fe184a434db3086604c7572fd7dfa Author: Adrian Hunter Date: Mon May 20 14:37:20 2019 +0300 perf db-export: Add brief documentation Add brief documentation to explain how the database export maintains backward and forward compatibility. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190520113728.14389-15-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/db-export.txt | 41 ++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit 003ccdc7165accee073ce261fc670f64cc98d0f7 Author: Adrian Hunter Date: Mon May 20 14:37:19 2019 +0300 perf thread-stack: Accumulate IPC information Cycle and instruction counts are added to the stack. The IPC of a function and all functions it calls, is also recorded. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190520113728.14389-14-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/thread-stack.c | 14 ++++++++++++++ tools/perf/util/thread-stack.h | 4 ++++ 2 files changed, 18 insertions(+) commit 5db47f43ccbbdee8c48f76ace4c287187a28b87f Author: Adrian Hunter Date: Mon May 20 14:37:18 2019 +0300 perf intel-pt: Document IPC usage Add brief documentation about instructions-per-cycle (IPC) information derived from Intel PT. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190520113728.14389-13-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/intel-pt.txt | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 3f05516758bef438cef7adc47599f8b8faad7c3a Author: Adrian Hunter Date: Mon May 20 14:37:17 2019 +0300 perf intel-pt: Accumulate cycle count from TSC/TMA/MTC packets When CYC packets are not available, it is still possible to count cycles using TSC/TMA/MTC timestamps. As the timestamp increments in TSC ticks, convert to CPU cycles using the current core-to-bus ratio. Do not accumulate cycles when control flow packet generation is not enabled, nor when time has been "lost", typically due to mwait, which is indicated by a TSC/TMA packet that is not part of PSB+. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190520113728.14389-12-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo .../perf/util/intel-pt-decoder/intel-pt-decoder.c | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit f3c98c4b5ac831f29b1cc19fa84d3c8401f846d6 Author: Adrian Hunter Date: Mon May 20 14:37:16 2019 +0300 perf intel-pt: Re-factor TIP cases in intel_pt_walk_to_ip To make it easier to add new code for different TIP cases, separate each case. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190520113728.14389-11-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo .../perf/util/intel-pt-decoder/intel-pt-decoder.c | 23 ++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) commit 9bc668e3bca8fadc50d5a121a1992a72ada0d3f4 Author: Adrian Hunter Date: Mon May 20 14:37:15 2019 +0300 perf intel-pt: Record when decoding PSB+ packets In preparation for using MTC packets to count cycles, record whether decoding is between a PSB and PSBEND packets. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190520113728.14389-10-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo .../perf/util/intel-pt-decoder/intel-pt-decoder.c | 41 ++++++++++++++++------ 1 file changed, 31 insertions(+), 10 deletions(-) commit 68fb45bf175e702aec6668c776050e5dbd2a6f1f Author: Adrian Hunter Date: Mon May 20 14:37:14 2019 +0300 perf script: Add output of IPC ratio Add field 'ipc' to display instructions-per-cycle. Example: perf record -e intel_pt/cyc/u ls perf script --insn-trace --xed -F+ipc,-dso,-cpu,-tid ls 2670177.697113434: 7f0dfdbcd090 _start+0x0 mov %rsp, %rdi IPC: 0.00 (1/877) ls 2670177.697113434: 7f0dfdbcd093 _start+0x3 callq 0x7f0dfdbce030 ls 2670177.697113434: 7f0dfdbce030 _dl_start+0x0 pushq %rbp ls 2670177.697113434: 7f0dfdbce031 _dl_start+0x1 mov %rsp, %rbp ls 2670177.697113434: 7f0dfdbce034 _dl_start+0x4 pushq %r15 ls 2670177.697113434: 7f0dfdbce036 _dl_start+0x6 pushq %r14 ls 2670177.697113434: 7f0dfdbce038 _dl_start+0x8 pushq %r13 ls 2670177.697113434: 7f0dfdbce03a _dl_start+0xa pushq %r12 ls 2670177.697113434: 7f0dfdbce03c _dl_start+0xc mov %rdi, %r12 ls 2670177.697113434: 7f0dfdbce03f _dl_start+0xf pushq %rbx ls 2670177.697113434: 7f0dfdbce040 _dl_start+0x10 sub $0x38, %rsp ls 2670177.697113434: 7f0dfdbce044 _dl_start+0x14 rdtsc ls 2670177.697113434: 7f0dfdbce046 _dl_start+0x16 mov %eax, %eax ls 2670177.697113434: 7f0dfdbce048 _dl_start+0x18 shl $0x20, %rdx ls 2670177.697113434: 7f0dfdbce04c _dl_start+0x1c or %rax, %rdx ls 2670177.697114471: 7f0dfdbce04f _dl_start+0x1f movq 0x27e22(%rip), %rax IPC: 0.00 (15/1685) ls 2670177.697116177: 7f0dfdbce056 _dl_start+0x26 movq %rdx, 0x27683(%rip) IPC: 0.00 (1/881) Note, the IPC values are low due to page faults at the beginning of execution. The additional cycles are due to the time to enter the kernel, not the actual kernel page fault handler. Signed-off-by: Adrian Hunter Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190520113728.14389-9-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-script.txt | 5 ++++- tools/perf/builtin-script.c | 23 ++++++++++++++++++++++- 2 files changed, 26 insertions(+), 2 deletions(-) commit 5b1dc0fd1da06d6e89f1ca8736cfe0ee84e34cc7 Author: Adrian Hunter Date: Mon May 20 14:37:13 2019 +0300 perf intel-pt: Add support for samples to contain IPC ratio Copy the incremental instruction count and cycle count onto 'instructions' and 'branches' samples. Because Intel PT does not update the cycle count on every branch or instruction, the incremental values will often be zero. When there are values, they will be the number of instructions and number of cycles since the last update, and thus represent the average IPC since the last IPC value. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190520113728.14389-8-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 61d276f428a11f0e4ce5203462fa488e6570684f Author: Adrian Hunter Date: Mon May 20 14:37:12 2019 +0300 perf tools: Add IPC information to perf_sample Add counts of instructions and cycles, in order to represent instructions-per-cycle (IPC). Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190520113728.14389-7-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/event.h | 2 ++ 1 file changed, 2 insertions(+) commit 7b4b4f83881e11b1fe5d8743953f81addb0871de Author: Adrian Hunter Date: Mon May 20 14:37:11 2019 +0300 perf intel-pt: Accumulate cycle count from CYC packets In preparation for providing instructions-per-cycle (IPC) information, accumulate cycle count from CYC packets. Although CYC packets are optional (requires config term 'cyc' to enable cycle-accurate mode when recording), the simplest way to count cycles is with CYC packets. The first complication is that cycles must be counted only when also counting instructions. That means when control flow packet generation is enabled i.e. between TIP.PGE and TIP.PGD packets. Also, sampling the cycle count follows the same rules as sampling the timestamp, that is, not before the instruction to which the decoder is walking is reached. In addition, the cycle count is not accurate for any but the first branch of a TNT packet. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190520113728.14389-6-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt-decoder/intel-pt-decoder.c | 14 +++++++++++++- tools/perf/util/intel-pt-decoder/intel-pt-decoder.h | 1 + 2 files changed, 14 insertions(+), 1 deletion(-) commit 948e9dc8bb266649a618ac974010292bf36fb213 Author: Adrian Hunter Date: Mon May 20 14:37:10 2019 +0300 perf intel-pt: Factor out intel_pt_update_sample_time To eliminate some duplication and make the code more understandable, factor out intel_pt_update_sample_time. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190520113728.14389-5-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt-decoder/intel-pt-decoder.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit d194d8fccf610a3f5cdfa94f2bbbe6b89e11a295 Author: Alexey Budankov Date: Thu May 30 22:03:36 2019 +0300 perf record: Allow mixing --user-regs with --call-graph=dwarf When DWARF stacks were requested and at the same time that the user specifies a register set using the --user-regs option the full register context was being captured on samples: $ perf record -g --call-graph dwarf,1024 --user-regs=IP,SP,BP -- stack_test2.g.O3 188143843893585 0x6b48 [0x4f8]: PERF_RECORD_SAMPLE(IP, 0x4002): 23828/23828: 0x401236 period: 1363819 addr: 0x7ffedbdd51ac ... FP chain: nr:0 ... user regs: mask 0xff0fff ABI 64-bit .... AX 0x53b .... BX 0x7ffedbdd3cc0 .... CX 0xffffffff .... DX 0x33d3a .... SI 0x7f09b74c38d0 .... DI 0x0 .... BP 0x401260 .... SP 0x7ffedbdd3cc0 .... IP 0x401236 .... FLAGS 0x20a .... CS 0x33 .... SS 0x2b .... R8 0x7f09b74c3800 .... R9 0x7f09b74c2da0 .... R10 0xfffffffffffff3ce .... R11 0x246 .... R12 0x401070 .... R13 0x7ffedbdd5db0 .... R14 0x0 .... R15 0x0 ... ustack: size 1024, offset 0xe0 . data_src: 0x5080021 ... thread: stack_test2.g.O:23828 ...... dso: /root/abudanko/stacks/stack_test2.g.O3 I.e. the --user-regs=IP,SP,BP was being ignored, being overridden by the needs of --call-graph=dwarf. After applying the change in this patch the sample data contains the user specified register, but making sure that at least the minimal set of register needed for DWARF unwinding (DWARF_MINIMAL_REGS) is requested. The user is warned that DWARF unwinding may not work if extra registers end up being needed. -g call-graph dwarf,K full_regs --user-regs=user_regs user_regs -g call-graph dwarf,K --user-regs=user_regs user_regs + DWARF_MINIMAL_REGS $ perf record -g --call-graph dwarf,1024 --user-regs=BP -- ls WARNING: The use of --call-graph=dwarf may require all the user registers, specifying a subset with --user-regs may render DWARF unwinding unreliable, so the minimal registers set (IP, SP) is explicitly forced. arch COPYING Documentation include Kbuild lbuild MAINTAINERS modules.builtin Module.symvers perf.data.old scripts System.map virt block CREDITS drivers init Kconfig lib Makefile modules.builtin.modinfo net README security tools vmlinux certs crypto fs ipc kernel LICENSES mm modules.order perf.data samples sound usr vmlinux.o [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.030 MB perf.data (10 samples) ] 188368474305373 0x5e40 [0x470]: PERF_RECORD_SAMPLE(IP, 0x4002): 23839/23839: 0x401236 period: 1260507 addr: 0x7ffd3d85e96c ... FP chain: nr:0 ... user regs: mask 0x1c0 ABI 64-bit .... BP 0x401260 .... SP 0x7ffd3d85cc20 .... IP 0x401236 ... ustack: size 1024, offset 0x58 . data_src: 0x5080021 Committer notes: Detected build failures on arches where PERF_REGS_ is not available, such as debian:experimental-x-{mips,mips64,mipsel}, fedora 24 and 30 for ARC uClibc and glibc, reported to Alexey that provided a patch moving the DWARF_MINIMAL_REGS from evsel.c to util/perf_regs.h, where it is guarded by an HAVE_PERF_REGS_SUPPORT ifdef. Committer testing: # perf record --user-regs=bp,ax -a sleep 1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 1.955 MB perf.data (1773 samples) ] # perf script -F+uregs | grep AX: | head -5 perf 1719 [000] 181.272398: 1 cycles: ffffffffba06a7c4 native_write_msr+0x4 (/lib/modules/5.2.0-rc1+/build/vmlinux) ABI:2 AX:0xffffffffffffffda BP:0x7ffef828fb00 perf 1719 [000] 181.272402: 1 cycles: ffffffffba06a7c4 native_write_msr+0x4 (/lib/modules/5.2.0-rc1+/build/vmlinux) ABI:2 AX:0xffffffffffffffda BP:0x7ffef828fb00 perf 1719 [000] 181.272403: 8 cycles: ffffffffba06a7c4 native_write_msr+0x4 (/lib/modules/5.2.0-rc1+/build/vmlinux) ABI:2 AX:0xffffffffffffffda BP:0x7ffef828fb00 perf 1719 [000] 181.272405: 181 cycles: ffffffffba06a7c6 native_write_msr+0x6 (/lib/modules/5.2.0-rc1+/build/vmlinux) ABI:2 AX:0xffffffffffffffda BP:0x7ffef828fb00 perf 1719 [000] 181.272406: 4405 cycles: ffffffffba06a7c4 native_write_msr+0x4 (/lib/modules/5.2.0-rc1+/build/vmlinux) ABI:2 AX:0xffffffffffffffda BP:0x7ffef828fb00 # perf record --call-graph=dwarf --user-regs=bp,ax -a sleep 1 WARNING: The use of --call-graph=dwarf may require all the user registers, specifying a subset with --user-regs may render DWARF unwinding unreliable, so the minimal registers set (IP, SP) is explicitly forced. [ perf record: Woken up 55 times to write data ] [ perf record: Captured and wrote 24.184 MB perf.data (2841 samples) ] [root@quaco ~]# perf script --hide-call-graph -F+uregs | grep AX: | head -5 perf 1729 [000] 211.268006: 1 cycles: ffffffffba06a7c4 native_write_msr+0x4 (/lib/modules/5.2.0-rc1+/build/vmlinux) ABI:2 AX:0xffffffffffffffda BP:0x7ffc8679abb0 SP:0x7ffc8679ab78 IP:0x7fa75223a0db perf 1729 [000] 211.268014: 1 cycles: ffffffffba06a7c4 native_write_msr+0x4 (/lib/modules/5.2.0-rc1+/build/vmlinux) ABI:2 AX:0xffffffffffffffda BP:0x7ffc8679abb0 SP:0x7ffc8679ab78 IP:0x7fa75223a0db perf 1729 [000] 211.268017: 5 cycles: ffffffffba06a7c4 native_write_msr+0x4 (/lib/modules/5.2.0-rc1+/build/vmlinux) ABI:2 AX:0xffffffffffffffda BP:0x7ffc8679abb0 SP:0x7ffc8679ab78 IP:0x7fa75223a0db perf 1729 [000] 211.268020: 48 cycles: ffffffffba06a7c6 native_write_msr+0x6 (/lib/modules/5.2.0-rc1+/build/vmlinux) ABI:2 AX:0xffffffffffffffda BP:0x7ffc8679abb0 SP:0x7ffc8679ab78 IP:0x7fa75223a0db perf 1729 [000] 211.268024: 490 cycles: ffffffffba00e471 intel_bts_enable_local+0x21 (/lib/modules/5.2.0-rc1+/build/vmlinux) ABI:2 AX:0xffffffffffffffda BP:0x7ffc8679abb0 SP:0x7ffc8679ab78 IP:0x7fa75223a0db # Signed-off-by: Alexey Budankov Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/e7fd37b1-af22-0d94-a0dc-5895e803bbfe@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/evsel.c | 9 ++++++++- tools/perf/util/perf_regs.h | 4 ++++ 2 files changed, 12 insertions(+), 1 deletion(-) commit e5f177a578edf4501d0758bfa922cd0b0f9d0e9d Author: Leo Yan Date: Thu May 30 17:38:01 2019 +0800 perf symbols: Remove unused variable 'err' Variable 'err' is defined but never used in function symsrc__init(), remove it and directly return -1 at the end of the function. Signed-off-by: Leo Yan Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20190530093801.20510-1-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/symbol-elf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 0da6ae94e4102fa145149dd0878b266c932507aa Author: Arnaldo Carvalho de Melo Date: Wed May 29 15:50:50 2019 -0300 perf data: Document directory format header: HEADER_DIR_FORMAT We forgot to update the perf.data file format document for the HEADER_DIR_FORMAT header, do it now from comments in the patch introducing it. Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Andi Kleen Cc: Chong Jiang Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Simon Que Fixes: 258031c017c3 ("perf header: Add DIR_FORMAT feature to describe directory data") Link: https://lkml.kernel.org/n/tip-jbrzb7ijb5al33gi8br6f9rr@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf.data-file-format.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit a9de7cfc7663882e98ec3b2ecf35c546a013b956 Author: Arnaldo Carvalho de Melo Date: Wed May 29 15:43:51 2019 -0300 perf data: Document clockid header: HEADER_CLOCKID We forgot to update the perf.data file format document for the HEADER_CLOCKID header, do it now from comments in the patch introducing it. Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Andi Kleen Cc: Chong Jiang Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Simon Que Fixes: cf7905165fee ("perf record: Encode -k clockid frequency into Perf trace") Link: https://lkml.kernel.org/n/tip-slhnjp06027j3ae17qqetzxj@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf.data-file-format.txt | 6 ++++++ 1 file changed, 6 insertions(+) commit 835fbf126ce0a359626bc59b8da4e7601f01fc87 Author: Arnaldo Carvalho de Melo Date: Wed May 29 15:35:03 2019 -0300 perf data: Document memory topology header: HEADER_MEM_TOPOLOGY We forgot to update the perf.data file format document for the HEADER_MEM_TOPOLOGY header, do it now from comments in the patch introducing it. Cc: Adrian Hunter Cc: Andi Kleen Cc: Chong Jiang Cc: Jiri Olsa Cc: Namhyung Kim Cc: Simon Que Fixes: e2091cedd51b ("perf tools: Add MEM_TOPOLOGY feature to perf data file") Link: https://lkml.kernel.org/n/tip-h5lcm1nbe9ztxwm61gmadd56@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf.data-file-format.txt | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 8e21be4f815ca8edfee1decd87f298f92123f719 Author: Song Liu Date: Mon May 20 23:44:06 2019 -0700 perf data: Add description of header HEADER_BPF_PROG_INFO and HEADER_BPF_BTF This patch addes description of HEADER_BPF_PROG_INFO and HEADER_BPF_BTF to perf.data-file-format.txt. Requested-by: Arnaldo Carvalho de Melo Signed-off-by: Song Liu Cc: Jiri Olsa Cc: Peter Zijlstra Fixes: 606f972b1361 ("perf bpf: Save bpf_prog_info information as headers to perf.data") Link: http://lkml.kernel.org/r/20190521064406.2498925-1-songliubraving@fb.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf.data-file-format.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 1397e3ec0cff0110a1d9c1b1d5fd2c79bfe72fc9 Author: Hans Verkuil Date: Tue Jun 4 07:19:55 2019 -0400 media: usb/gadget/f_uvc: set device_caps in struct video_device Instead of filling in the struct v4l2_capability device_caps field, fill in the struct video_device device_caps field. That way the V4L2 core knows what the capabilities of the video device are. But this only really works if all drivers use this, so convert this UVC gadget driver. Signed-off-by: Hans Verkuil Reviewed-by: Laurent Pinchart Acked-by: Felipe Balbi Signed-off-by: Mauro Carvalho Chehab drivers/usb/gadget/function/f_uvc.c | 1 + drivers/usb/gadget/function/uvc_v4l2.c | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) commit 372332b111b7cf5642d80ad927ef80dcb3a66a84 Author: Hans Verkuil Date: Tue Jun 4 07:19:54 2019 -0400 media: rtl2832_sdr: set device_caps in struct video_device Instead of filling in the struct v4l2_capability device_caps field, fill in the struct video_device device_caps field. That way the V4L2 core knows what the capabilities of the video device are. But this only really works if all drivers use this, so convert this SDR driver in this patch. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/rtl2832_sdr.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit b467ec063ec56900e1ebba4d5aeb50b0a7cb0ef8 Author: Maxime Ripard Date: Mon May 27 12:02:19 2019 +0200 dt-bindings: clk: Convert Allwinner CCU to a schema The Allwinner SoCs have a clocks controller supported in Linux, with a matching Device Tree binding. Now that we have the DT validation in place, let's convert the device tree bindings for that controller over to a YAML schemas. Signed-off-by: Maxime Ripard .../bindings/clock/allwinner,sun4i-a10-ccu.yaml | 141 +++++++++++++++++++++ .../devicetree/bindings/clock/sunxi-ccu.txt | 62 --------- 2 files changed, 141 insertions(+), 62 deletions(-) commit 8c3854d03bd7b86e8f36e6d9b07b4a6bc20deccd Author: Hans Verkuil Date: Tue Jun 4 07:19:53 2019 -0400 media: media/usb: set device_caps in struct video_device Instead of filling in the struct v4l2_capability device_caps field, fill in the struct video_device device_caps field. That way the V4L2 core knows what the capabilities of the video device are. But this only really works if all drivers use this, so convert all usb drivers in this patch. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/airspy/airspy.c | 6 ++--- drivers/media/usb/au0828/au0828-video.c | 21 +++++++++--------- drivers/media/usb/cpia2/cpia2_v4l.c | 9 ++------ drivers/media/usb/cx231xx/cx231xx-video.c | 28 +++++++++++------------ drivers/media/usb/em28xx/em28xx-video.c | 32 +++++++++++++-------------- drivers/media/usb/go7007/go7007-v4l2.c | 15 +++++-------- drivers/media/usb/gspca/gspca.c | 6 ++--- drivers/media/usb/hackrf/hackrf.c | 14 +++++------- drivers/media/usb/hdpvr/hdpvr-video.c | 5 ++--- drivers/media/usb/msi2500/msi2500.c | 5 ++--- drivers/media/usb/pvrusb2/pvrusb2-v4l2.c | 17 +++++--------- drivers/media/usb/pwc/pwc-if.c | 2 ++ drivers/media/usb/pwc/pwc-v4l.c | 3 --- drivers/media/usb/s2255/s2255drv.c | 5 ++--- drivers/media/usb/stk1160/stk1160-v4l.c | 7 ++---- drivers/media/usb/stkwebcam/stk-webcam.c | 6 ++--- drivers/media/usb/tm6000/tm6000-video.c | 20 ++++++++--------- drivers/media/usb/usbtv/usbtv-video.c | 5 ++--- drivers/media/usb/usbvision/usbvision-video.c | 20 ++++++++--------- drivers/media/usb/zr364xx/zr364xx.c | 7 ++---- 20 files changed, 100 insertions(+), 133 deletions(-) commit f41c615310d2f4f20f6259ae254bc058f61ced6d Author: Jani Nikula Date: Fri May 31 16:15:03 2019 +0300 drm/i915/bios: add an enum for BDB block IDs Better grouping, better semantics for find_section(). No functional changes. Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/192cc8a45cb5c36ccbde25a725df135793a4263f.1559308269.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_bios.c | 4 +- drivers/gpu/drm/i915/intel_vbt_defs.h | 71 ++++++++++++++++++----------------- 2 files changed, 38 insertions(+), 37 deletions(-) commit b77f9525a658c0c519ae8c18b8e4fd256900b1a2 Author: Jani Nikula Date: Fri May 31 16:15:02 2019 +0300 drm/i915/bios: add more LFP options Add new fields in the LFP block. No functional changes. Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/9a7f41aab894d7e96d8ad4776cf14f94cfd17d04.1559308269.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_vbt_defs.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 1434e1f613e855e4cef825b97abaa585840a5677 Author: Jani Nikula Date: Fri May 31 16:15:01 2019 +0300 drm/i915/bios: add VBT swing bit to child device definition New bit to look in another BDB block for more. No functional changes. Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/7ab46e3f53fd2c12cb60b9eabbebb65b27004a9e.1559308269.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_vbt_defs.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 843444ed13012c356246740926d96d7a5f9103fd Author: Jani Nikula Date: Fri May 31 16:15:00 2019 +0300 drm/i915/bios: sort BDB block definitions using block ID Make it easier to find the right blocks. No functional changes. Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/56e1989940d83a670d087d531b7b6aa5dc4c0228.1559308269.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_vbt_defs.h | 372 +++++++++++++++++----------------- 1 file changed, 186 insertions(+), 186 deletions(-) commit e83ce3005db16243e1085925251fd0776bb60d09 Author: Hans Verkuil Date: Tue Jun 4 07:19:52 2019 -0400 media: media/radio: set device_caps in struct video_device Instead of filling in the struct v4l2_capability device_caps field, fill in the struct video_device device_caps field. That way the V4L2 core knows what the capabilities of the video device are. But this only really works if all drivers use this, so convert all radio drivers in this patch. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/radio/dsbr100.c | 3 +-- drivers/media/radio/radio-cadet.c | 5 ++--- drivers/media/radio/radio-isa.c | 4 +--- drivers/media/radio/radio-keene.c | 3 +-- drivers/media/radio/radio-ma901.c | 3 +-- drivers/media/radio/radio-miropcm20.c | 4 ++-- drivers/media/radio/radio-mr800.c | 5 ++--- drivers/media/radio/radio-raremono.c | 3 +-- drivers/media/radio/radio-sf16fmi.c | 3 +-- drivers/media/radio/radio-si476x.c | 21 ++++++++------------- drivers/media/radio/radio-tea5764.c | 3 +-- drivers/media/radio/radio-tea5777.c | 5 ++--- drivers/media/radio/radio-timb.c | 3 +-- drivers/media/radio/radio-wl1273.c | 12 ++++-------- drivers/media/radio/si470x/radio-si470x-i2c.c | 7 +++---- drivers/media/radio/si470x/radio-si470x-usb.c | 6 +++--- drivers/media/radio/si4713/radio-platform-si4713.c | 4 +--- drivers/media/radio/si4713/radio-usb-si4713.c | 4 +--- drivers/media/radio/tea575x.c | 7 +++---- drivers/media/radio/wl128x/fmdrv_v4l2.c | 10 +++------- 20 files changed, 42 insertions(+), 73 deletions(-) commit 0d9ce162cf46c99628cc5da9510b959c7976735b Author: Junaid Shahid Date: Thu Jan 3 17:14:28 2019 -0800 kvm: Convert kvm_lock to a mutex It doesn't seem as if there is any particular need for kvm_lock to be a spinlock, so convert the lock to a mutex so that sleepable functions (in particular cond_resched()) can be called while holding it. Signed-off-by: Junaid Shahid Signed-off-by: Paolo Bonzini Documentation/virtual/kvm/locking.txt | 4 +--- arch/s390/kvm/kvm-s390.c | 4 ++-- arch/x86/kvm/mmu.c | 4 ++-- arch/x86/kvm/x86.c | 14 +++++++------- include/linux/kvm_host.h | 2 +- virt/kvm/kvm_main.c | 30 +++++++++++++++--------------- 6 files changed, 28 insertions(+), 30 deletions(-) commit 1ae4de23eddef465104277e79fa669bec7b3d288 Author: Uros Bizjak Date: Sun Jun 2 21:11:56 2019 +0200 KVM: VMX: remove unneeded 'asm volatile ("")' from vmcs_write64 __vmcs_writel uses volatile asm, so there is no need to insert another one between the first and the second call to __vmcs_writel in order to prevent unwanted code moves for 32bit targets. Signed-off-by: Uros Bizjak Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/ops.h | 1 - 1 file changed, 1 deletion(-) commit b3ffd74a2f6fbec131eff6d81bc7a6dbbac57bc7 Author: Gustavo A. R. Silva Date: Fri May 31 14:24:53 2019 -0500 KVM: irqchip: Use struct_size() in kzalloc() One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct foo { int stuff; struct boo entry[]; }; instance = kzalloc(sizeof(struct foo) + count * sizeof(struct boo), GFP_KERNEL); Instead of leaving these open-coded and prone to type mistakes, we can now use the new struct_size() helper: instance = kzalloc(struct_size(instance, entry, count), GFP_KERNEL); This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Paolo Bonzini virt/kvm/irqchip.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 5a253552a5108bcabc2eb4e5b2b86262232f17e7 Author: Jan Beulich Date: Mon May 27 02:45:44 2019 -0600 x86/kvm/VMX: drop bad asm() clobber from nested_vmx_check_vmentry_hw() While upstream gcc doesn't detect conflicts on cc (yet), it really should, and hence "cc" should not be specified for asm()-s also having "=@cc" outputs. (It is quite pointless anyway to specify a "cc" clobber in x86 inline assembly, since the compiler assumes it to be always clobbered, and has no means [yet] to suppress this behavior.) Signed-off-by: Jan Beulich Fixes: bbc0b8239257 ("KVM: nVMX: Capture VM-Fail via CC_{SET,OUT} in nested early checks") Reviewed-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx/nested.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fb89f4ea7feb1e605f8f405d256c56d8ad69125c Author: Andrew Jones Date: Mon May 27 16:31:41 2019 +0200 kvm: selftests: introduce aarch64_vcpu_add_default This is the same as vm_vcpu_add_default, but it also takes a kvm_vcpu_init struct pointer. Signed-off-by: Andrew Jones Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/include/aarch64/processor.h | 2 ++ tools/testing/selftests/kvm/lib/aarch64/processor.c | 9 +++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) commit f5dd4ccf5552d71a817d0ec97481e4a71425a038 Author: Andrew Jones Date: Mon May 27 16:31:40 2019 +0200 kvm: selftests: introduce aarch64_vcpu_setup This allows aarch64 tests to run on more targets, such as the Arm simulator that doesn't like KVM_ARM_TARGET_GENERIC_V8. And it also allows aarch64 tests to provide vcpu features in struct kvm_vcpu_init. Additionally it drops the unused memslot parameters. Signed-off-by: Andrew Jones Signed-off-by: Paolo Bonzini .../testing/selftests/kvm/include/aarch64/processor.h | 2 ++ tools/testing/selftests/kvm/lib/aarch64/processor.c | 19 +++++++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) commit 837ec79b4cf4ec89d814166a71a7d679dda04736 Author: Paolo Bonzini Date: Tue Jun 4 19:13:46 2019 +0200 kvm: selftests: hide vcpu_setup in processor code This removes the processor-dependent arguments from vm_vcpu_add. Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/include/kvm_util.h | 3 +- .../testing/selftests/kvm/lib/aarch64/processor.c | 32 ++++++++++++---------- tools/testing/selftests/kvm/lib/kvm_util.c | 9 ++---- .../testing/selftests/kvm/lib/kvm_util_internal.h | 2 -- tools/testing/selftests/kvm/lib/x86_64/processor.c | 5 ++-- tools/testing/selftests/kvm/x86_64/evmcs_test.c | 2 +- .../selftests/kvm/x86_64/kvm_create_max_vcpus.c | 2 +- tools/testing/selftests/kvm/x86_64/smm_test.c | 2 +- tools/testing/selftests/kvm/x86_64/state_test.c | 2 +- 9 files changed, 28 insertions(+), 31 deletions(-) commit 231dcffc234f13ce5a0816dfecf2603543ef1d36 Author: Jani Nikula Date: Fri May 31 16:14:59 2019 +0300 drm/i915/bios: add BDB block comments before definitions Use the comments verbatim from the spec to help find the right block. No functional changes. Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/52c32be96bd605d7a9f94accbd4dbe7718849f93.1559308269.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_vbt_defs.h | 57 ++++++++++++++++++++++++++++++----- 1 file changed, 50 insertions(+), 7 deletions(-) commit f87f6599c8436b7e963df7a6dcedc253b4b37cd6 Author: Jani Nikula Date: Fri May 31 16:14:58 2019 +0300 drm/i915/bios: reserve struct bdb_ prefix for BDB blocks Don't use bdb_ prefixes for structs within blocks. Add a new bdb struct for SDVO panel DTDs for completeness. Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/cd062ced1bbbe07e087212b42c83e5ac64a22a49.1559308269.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_bios.c | 12 ++++++------ drivers/gpu/drm/i915/intel_vbt_defs.h | 20 ++++++++++++-------- 2 files changed, 18 insertions(+), 14 deletions(-) commit aafe16e38df2bbc021b0e4992ab4efee09303a6e Author: Jani Nikula Date: Fri May 31 16:14:57 2019 +0300 drm/i915/bios: remove unused, obsolete VBT definitions We've carried this baggage for more than a decade. Time to let it go. Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/00058e6507aa7a62fce1d2a6de223cbbfabb204b.1559308269.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_vbt_defs.h | 180 ---------------------------------- 1 file changed, 180 deletions(-) commit 932cd15431567c72ccc6874e60ebe2095daf345c Author: Jani Nikula Date: Fri May 31 16:14:56 2019 +0300 drm/i915/bios: clean up VBT port info debug logging Change the order, add some stylistic touches, and add LSPCON. Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/3c9aaedcacaeaca24b2a35bf2af680dd118823d4.1559308269.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_bios.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit a7475e5dae8e69e7b28bee5d98fb808bc6d426a2 Author: Jani Nikula Date: Fri May 31 16:14:55 2019 +0300 drm/i915/bios: use port info child pointer to determine LSPCON presence Avoid iterating the child devices. This should be a non-functional change, but theoretically this might enable LSPCON on some extra ports with buggy VBTs. Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/4bbaff16abb3461ccb67abf1537f68bb50823390.1559308269.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_bios.c | 52 +++++---------------------------------- drivers/gpu/drm/i915/intel_bios.h | 2 +- 2 files changed, 7 insertions(+), 47 deletions(-) commit c72deaa47f453fc698f7ac2bb87fd09ad96696de Author: Jani Nikula Date: Fri May 31 16:14:54 2019 +0300 drm/i915/bios: use port info child pointer to determine HPD invert Avoid iterating the child devices. Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/841c226efa424701161dd9f1793e0cf96b45a07c.1559308269.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_bios.c | 39 ++++++--------------------------------- drivers/gpu/drm/i915/intel_bios.h | 2 +- 2 files changed, 7 insertions(+), 34 deletions(-) commit cc21f01137a48919c1c5a443b341380ed3ea799a Author: Jani Nikula Date: Fri May 31 16:14:53 2019 +0300 drm/i915/bios: refactor DDC pin and AUX CH sanitize functions Add separate functions to get the port by DDC pin and AUX channel. Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/a8b4afc08dd03e08c1403531e7f5ab33d777b1db.1559308269.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_bios.c | 48 +++++++++++++++++++++++++++------------ 1 file changed, 34 insertions(+), 14 deletions(-) commit 7679f9b8f6ee393ad204c6b2e09c7ae44a15a7c7 Author: Jani Nikula Date: Fri May 31 16:14:52 2019 +0300 drm/i915/bios: store child device pointer in DDI port info This allows us to avoid iterating the child devices in some cases. Also replace the presence bit with child device being non-NULL, and set the child device pointer last to allow us to take advantage of it in follow-up work. Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/ceccb75d637af3134d0328d67cbd6623932f94db.1559308269.git.jani.nikula@intel.com drivers/gpu/drm/i915/i915_drv.h | 4 +++- drivers/gpu/drm/i915/intel_bios.c | 10 +++++----- 2 files changed, 8 insertions(+), 6 deletions(-) commit 36a0f92020dc8794d3aa69b7fb4c5d2bf99b0099 Author: Jani Nikula Date: Fri May 31 16:14:51 2019 +0300 drm/i915/bios: make child device order the priority order Make the child device order the priority order in sanitizing DDC pin and AUX CH. First come, first served. Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/34ab98880386a095422521ad39f4c080eeb3989a.1559308269.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_bios.c | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) commit 84204fb6f2906e9234b7ff5ba8f9e6bcaae702cb Author: Luca Weiss Date: Tue Jun 4 19:21:54 2019 +0200 arm64: dts: allwinner: a64: Add lradc node Add a node describing the KEYADC on the A64. Signed-off-by: Luca Weiss Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 355fb0e54e85316fedd2f688fc62917cc4a5bb81 Author: Luca Weiss Date: Tue Jun 4 19:21:53 2019 +0200 dt-bindings: input: sun4i-lradc-keys: Add A64 compatible Add the A64 compatible with a fallback to the A83T compatible. Signed-off-by: Luca Weiss Signed-off-by: Maxime Ripard Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt | 1 + 1 file changed, 1 insertion(+) commit f167675486c37b88620d344fbb12d06e34f11d47 Author: Ondrej Jirman Date: Tue Jun 4 17:40:36 2019 +0200 clk: sunxi-ng: sun50i-h6-r: Fix incorrect W1 clock gate register The current code defines W1 clock gate to be at 0x1cc, overlaying it with the IR gate. Clock gate for r-apb1-w1 is at 0x1ec. This fixes issues with IR receiver causing interrupt floods on H6 (because interrupt flags can't be cleared, due to IR module's bus being disabled). Fixes: b7c7b05065aa77ae ("clk: sunxi-ng: add support for H6 PRCM CCU") Signed-off-by: Ondrej Jirman Acked-by: Clément Péron Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu-sun50i-h6-r.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7e98b7b542a456582ea3029be857cc99a3b19bd5 Author: Boris Brezillon Date: Tue Jun 4 03:06:25 2019 -0400 media: v4l2: Get rid of ->vidioc_enum_fmt_vid_{cap, out}_mplane Support for multiplanar and singleplanar formats is mutually exclusive, at least in practice. In our attempt to unify support for support for mplane and !mplane in v4l, let's get rid of the ->vidioc_enum_fmt_{vid,out}_cap_mplane() hooks and call ->vidioc_enum_fmt_{vid,out}_cap() instead. Signed-off-by: Boris Brezillon Reviewed-by: Sylwester Nawrocki [hverkuil-cisco@xs4all.nl: fix typos: pirv -> priv and prov -> priv] Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/intel/ipu3/ipu3-cio2.c | 2 +- drivers/media/platform/exynos-gsc/gsc-core.c | 2 +- drivers/media/platform/exynos-gsc/gsc-core.h | 2 +- drivers/media/platform/exynos-gsc/gsc-m2m.c | 10 +++++----- drivers/media/platform/exynos4-is/fimc-capture.c | 6 +++--- drivers/media/platform/exynos4-is/fimc-isp-video.c | 6 +++--- drivers/media/platform/exynos4-is/fimc-lite.c | 6 +++--- drivers/media/platform/exynos4-is/fimc-m2m.c | 8 ++++---- drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c | 4 ++-- drivers/media/platform/mtk-mdp/mtk_mdp_m2m.c | 18 +++++++++--------- drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c | 12 ++++++------ drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c | 12 ++++++------ drivers/media/platform/qcom/camss/camss-video.c | 2 +- drivers/media/platform/qcom/venus/vdec.c | 4 ++-- drivers/media/platform/qcom/venus/venc.c | 4 ++-- drivers/media/platform/rcar_fdp1.c | 4 ++-- drivers/media/platform/rcar_jpu.c | 4 ++-- drivers/media/platform/renesas-ceu.c | 2 +- drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 12 ++++++------ drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 12 ++++++------ drivers/media/platform/ti-vpe/vpe.c | 4 ++-- drivers/media/platform/vicodec/vicodec-core.c | 2 -- drivers/media/platform/vivid/vivid-core.c | 6 ++---- drivers/media/platform/vivid/vivid-vid-common.c | 20 -------------------- drivers/media/platform/vivid/vivid-vid-common.h | 2 -- drivers/media/v4l2-core/v4l2-dev.c | 2 -- drivers/media/v4l2-core/v4l2-ioctl.c | 21 +++++++++++---------- drivers/staging/media/ipu3/ipu3-v4l2.c | 4 ++-- .../staging/media/rockchip/vpu/rockchip_vpu_v4l2.c | 12 ++++++------ include/media/v4l2-ioctl.h | 14 ++------------ 30 files changed, 91 insertions(+), 128 deletions(-) commit 1ddc8a9732fb869e01363fc7b71d6ec684264ed9 Author: Boris Brezillon Date: Tue Jun 4 03:06:24 2019 -0400 media: v4l2: Make sure all drivers set _MPLANE caps in vdev->device_caps This is needed if we want the core to be able to check _MPLANE support without having to call the ->vidioc_querycap() hook. Signed-off-by: Boris Brezillon Reviewed-by: Laurent Pinchart Reviewed-by: Sylwester Nawrocki Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/exynos-gsc/gsc-m2m.c | 4 ++-- drivers/media/platform/exynos4-is/common.c | 5 +---- drivers/media/platform/exynos4-is/common.h | 3 +-- drivers/media/platform/exynos4-is/fimc-capture.c | 4 ++-- drivers/media/platform/exynos4-is/fimc-isp-video.c | 3 ++- drivers/media/platform/exynos4-is/fimc-lite.c | 4 +--- drivers/media/platform/exynos4-is/fimc-m2m.c | 4 ++-- drivers/media/platform/rcar_jpu.c | 6 ++++-- drivers/media/platform/s5p-mfc/s5p_mfc.c | 2 ++ drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 7 ------- drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 7 ------- drivers/media/platform/ti-vpe/vpe.c | 3 +-- 12 files changed, 18 insertions(+), 34 deletions(-) commit e46817472a1d7da32e8f265f9469a4e2fa39c60f Author: Florian Westphal Date: Fri May 3 17:46:16 2019 +0200 xfrm: remove init_flags indirection from xfrm_state_afinfo There is only one implementation of this function; just call it directly. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert include/net/xfrm.h | 1 - net/ipv4/xfrm4_state.c | 8 -------- net/xfrm/xfrm_state.c | 17 +++-------------- 3 files changed, 3 insertions(+), 23 deletions(-) commit 5c1b9ab3ec81992bef9a8605b8b281b41577b475 Author: Florian Westphal Date: Fri May 3 17:46:15 2019 +0200 xfrm: remove init_temprop indirection from xfrm_state_afinfo same as previous patch: just place this in the caller, no need to have an indirection for a structure initialization. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert include/net/xfrm.h | 4 ---- net/ipv4/xfrm4_state.c | 16 ---------------- net/ipv6/xfrm6_state.c | 16 ---------------- net/xfrm/xfrm_state.c | 27 ++++++++++++++++++++------- 4 files changed, 20 insertions(+), 43 deletions(-) commit bac9593515c653e9ec05df9e303cdf1b969854d4 Author: Florian Westphal Date: Fri May 3 17:46:14 2019 +0200 xfrm: remove init_tempsel indirection from xfrm_state_afinfo Simple initialization, handle it in the caller. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert include/net/xfrm.h | 2 -- net/ipv4/xfrm4_state.c | 19 ----------------- net/ipv6/xfrm6_state.c | 21 ------------------- net/xfrm/xfrm_state.c | 56 +++++++++++++++++++++++++++++++++++++++++++------- 4 files changed, 49 insertions(+), 49 deletions(-) commit 3633e5116dfb01f98de4c88daf2c673c52290755 Author: Swati Sharma Date: Wed May 29 15:20:52 2019 +0530 drm/i915: Enable intel_color_get_config() In this patch, intel_color_get_config() is enabled and support for read_luts() will be added platform by platform incrementally in the follow-up patches. v4: -Renamed intel_get_color_config to intel_color_get_config [Jani] -Added the user early on such that support for get_color_config() can be added platform by platform incrementally [Jani] v5: -Incorrect place for calling intel_color_get_config() in haswell_get_pipe_config() [Ville] v6: -Renamed intel_color_read_luts() to intel_color_get_config() [Jani and Ville] Signed-off-by: Swati Sharma Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1559123462-7343-3-git-send-email-swati2.sharma@intel.com drivers/gpu/drm/i915/intel_display.c | 4 ++++ 1 file changed, 4 insertions(+) commit 2740e81aad0f6e3ce48fea03a4cf4a4f36a717b8 Author: Swati Sharma Date: Wed May 29 15:20:51 2019 +0530 drm/i915: Introduce vfunc read_luts() to create hw lut In this patch, a vfunc read_luts() is introduced to create a hw lut i.e. lut having values read from gamma/degamma registers which will later be used to compare with sw lut to validate gamma/degamma lut values. v3: -Rebase v4: -Renamed intel_get_color_config to intel_color_get_config [Jani] -Wrapped get_color_config() [Jani] v5: -Renamed intel_color_get_config() to intel_color_read_luts() -Renamed get_color_config to read_luts v6: -Renamed intel_color_read_luts() back to intel_color_get_config() [Jani and Ville] Signed-off-by: Swati Sharma Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1559123462-7343-2-git-send-email-swati2.sharma@intel.com drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/intel_color.c | 8 ++++++++ drivers/gpu/drm/i915/intel_color.h | 1 + 3 files changed, 10 insertions(+) commit cf2b5010f41638e36d8adca8476f4baee64a8996 Author: Suwan Kim Date: Tue Jun 4 00:02:11 2019 +0900 usbip: Replace unused kvec array with single variable in vhci_send_cmd_unlink() vhci_send_cmd_unlink() declears kvec array of size 3 but it actually uses just one element of the array. So, remove kvec array and replace it with single kvec variable. Signed-off-by: Suwan Kim Acked-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/vhci_tx.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit e60e982375244026ca46feeba0fb5bb4d51b5a67 Author: Yoshihiro Shimoda Date: Wed Jun 5 15:16:22 2019 +0900 usb: renesas_usbhs: remove controlling PWEN/EXTLP support Controlling PWMEN/EXTLP (named as "has_otg") was supported in v3.2, but the last user (kzm9g) was removed by the commit 30f8925a57d8ad49 ("ARM: shmobile: Remove legacy board code for KZM-A9-GT"). So, this patch remove it. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Greg Kroah-Hartman drivers/usb/renesas_usbhs/common.c | 4 ---- include/linux/usb/renesas_usbhs.h | 1 - 2 files changed, 5 deletions(-) commit 32a6cfdfd168982cd7cd2898372da5eb49e56daf Author: Yoshihiro Shimoda Date: Wed Jun 5 15:16:21 2019 +0900 usb: renesas_usbhs: remove sudmac support SUDMAC feature was supported in v3.10, but was never used by any platform. So, this patch removes it. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Greg Kroah-Hartman drivers/usb/renesas_usbhs/fifo.c | 6 +----- include/linux/usb/renesas_usbhs.h | 1 - 2 files changed, 1 insertion(+), 6 deletions(-) commit ef513be0a9057cc6baf5d29566aaaefa214ba344 Author: Jim Lin Date: Mon Jun 3 18:53:44 2019 +0800 usb: xhci: Add Clear_TT_Buffer USB 2.0 specification chapter 11.17.5 says "as part of endpoint halt processing for full-/low-speed endpoints connected via a TT, the host software must use the Clear_TT_Buffer request to the TT to ensure that the buffer is not in the busy state". In our case, a full-speed speaker (ConferenceCam) is behind a high- speed hub (ConferenceCam Connect), sometimes once we get STALL on a request we may continue to get STALL with the folllowing requests, like Set_Interface. Here we invoke usb_hub_clear_tt_buffer() to send Clear_TT_Buffer request to the hub of the device for the following Set_Interface requests to the device to get ACK successfully. Signed-off-by: Jim Lin Acked-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 27 ++++++++++++++++++++++++++- drivers/usb/host/xhci.c | 21 +++++++++++++++++++++ drivers/usb/host/xhci.h | 5 +++++ 3 files changed, 52 insertions(+), 1 deletion(-) commit 4998f1efd1904dd21697aeeead270e3eb97691dd Author: Jim Lin Date: Mon Jun 3 18:53:43 2019 +0800 usb: Add devaddr in struct usb_device The Clear_TT_Buffer request sent to the hub includes the address of the LS/FS child device in wValue field. usb_hub_clear_tt_buffer() uses udev->devnum to set the address wValue. This won't work for devices connected to xHC. For other host controllers udev->devnum is the same as the address of the usb device, chosen and set by usb core. With xHC the controller hardware assigns the address, and won't be the same as devnum. Here we add devaddr in "struct usb_device" for usb_hub_clear_tt_buffer() to use. Signed-off-by: Jim Lin Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hub.c | 4 +++- drivers/usb/host/xhci.c | 2 ++ include/linux/usb.h | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) commit bcc8737ddcaad43acbb9ccf768f1be9c61bd493f Author: Mauro Carvalho Chehab Date: Tue Jun 4 11:17:42 2019 -0300 Documentation/i915: Fix references to renamed files WARNING: kernel-doc './scripts/kernel-doc -rst -enable-lineno -function Hardware workarounds ./drivers/gpu/drm/i915/intel_workarounds.c' failed with return code 1 WARNING: kernel-doc './scripts/kernel-doc -rst -enable-lineno -function Logical Rings, Logical Ring Contexts and Execlists ./drivers/gpu/drm/i915/intel_lrc.c' failed with return code 1 WARNING: kernel-doc './scripts/kernel-doc -rst -enable-lineno -internal ./drivers/gpu/drm/i915/intel_lrc.c' failed with return code 2 Fixes: 112ed2d31a46 ("drm/i915: Move GraphicsTechnology files under gt/") Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/bd7dd29b9fb2101c954c8cfb2c3b4efc7d277045.1559656538.git.mchehab+samsung@kernel.org Documentation/gpu/i915.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 86ddd8ad2fc34c7c302251a5e95c7afe1bfc80c3 Author: Anson Huang Date: Wed May 29 14:50:56 2019 +0800 ARM: dts: imx7d-sdb: Make SW2's voltage fixed On i.MX7D SDB board, SW2 supplies a lot of peripheral devices, its voltage should be fixed at 1.8V. The commit 43967d9b5a7c ("ARM: dts: imx7d-sdb: Assign corresponding power supply for LDOs") assigns SW2 as the supplier of vdd1p0d, and when its comsumers pcie-phy/mipi-phy try to set the vdd1p0d to 1.0V, regulator core will also set SW2 to its best(min) voltage to 1.5V, and it will lead to board reset. This patch makes SW2's voltage fixed at 1.8V to avoid this issue. Fixes: 43967d9b5a7c ("ARM: dts: imx7d-sdb: Assign corresponding power supply for LDOs") Reported-by: Leonard Crestez Signed-off-by: Anson Huang Reviewed-by: Leonard Crestez Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7d-sdb.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a656622a22d66548af9a7b6d9a284679553fccff Author: Fabio Estevam Date: Tue May 28 16:00:23 2019 -0300 arm64: dts: imx8mm: Move usbphy out of soc node usbphy nodes do not have any register properties and thus shouldn't be placed inside the bus. Move usbphy nodes from soc node to root node in order to fix the following build warnings with W=1: arch/arm64/boot/dts/freescale/imx8mm.dtsi:681.27-687.6: Warning (simple_bus_reg): /soc/bus@32c00000/usbphynop1: missing or empty reg/ranges property arch/arm64/boot/dts/freescale/imx8mm.dtsi:710.27-716.6: Warning (simple_bus_reg): /soc/bus@32c00000/usbphynop2: missing or empty reg/ranges property Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mm.dtsi | 32 +++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 10c7420738e68313ced2450deb7f74314d0c8534 Author: Fabio Estevam Date: Wed Jun 5 17:12:29 2019 +0800 arm64: dts: imx8mm: Pass the 'ranges' property Pass the 'ranges' property for each one of the AIPS bus in order to fix the following build warnings: arch/arm64/boot/dts/freescale/imx8mm.dtsi:209.23-388.5: Warning (unit_address_vs_reg): /soc/bus@30000000: node has a unit name, but no reg property arch/arm64/boot/dts/freescale/imx8mm.dtsi:390.23-439.5: Warning (unit_address_vs_reg): /soc/bus@30400000: node has a unit name, but no reg property arch/arm64/boot/dts/freescale/imx8mm.dtsi:441.23-658.5: Warning (unit_address_vs_reg): /soc/bus@30800000: node has a unit name, but no reg property arch/arm64/boot/dts/freescale/imx8mm.dtsi:660.23-724.5: Warning (unit_address_vs_reg): /soc/bus@32c00000: node has a unit name, but no reg property This also aligns with imx8mq.dtsi. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mm.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 951c1d37f691027f149bbc58bbf0c207450a3654 Author: Fabio Estevam Date: Tue May 28 16:00:21 2019 -0300 arm64: dts: imx8mm: Pass a unit name for the 'soc' node The 'soc' name needs a unit name to match its 'ranges' property. Pass the unit name in order to fix the following dtc build warning with W=1: arch/arm64/boot/dts/freescale/imx8mm.dtsi:203.6-754.4: Warning (unit_address_vs_reg): /soc: node has a reg or ranges property, but no unit name This also aligns with imx8mq.dtsi. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mm.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a01194d7565a8b77a4c546ef6038b4dc3d938079 Author: Angus Ainslie (Purism) Date: Tue May 28 09:11:01 2019 -0700 arm64: dts: fsl: imx8mq: add the snvs power key node Add a node for the snvs power key, "disabled" by default. Signed-off-by: Angus Ainslie (Purism) Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mq.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 4b013bb2d3a4a3104360746d2326d1408d179e72 Author: Gurchetan Singh Date: Tue Jun 4 16:44:28 2019 -0700 drm/virtio: use u64_to_user_ptr macro Other DRM drivers use it too. Signed-off-by: Gurchetan Singh Link: http://patchwork.freedesktop.org/patch/msgid/20190604234428.23252-1-gurchetansingh@chromium.org Signed-off-by: Gerd Hoffmann drivers/gpu/drm/virtio/virtgpu_ioctl.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit a5b8687869247c70ae114415d440798b01d8b952 Author: Vivek Gautam Date: Mon May 27 15:56:16 2019 +0530 drm/panel: truly: Add additional delay after pulling down reset gpio MTP SDM845 panel seems to need additional delay to bring panel to a workable state. Running modetest without this change displays blurry artifacts. Signed-off-by: Vivek Gautam Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20190527102616.28315-1-vivek.gautam@codeaurora.org drivers/gpu/drm/panel/panel-truly-nt35597.c | 1 + 1 file changed, 1 insertion(+) commit 846137c6a1dba3a7768acb026c45120be5c8cdc1 Author: Thierry Reding Date: Mon May 27 12:35:05 2019 +0200 arm64: tegra: Add pin control states for I2C on Tegra186 Two of the Tegra I2C controllers share pads with the DPAUX controllers. In order for the I2C controllers to use these pads, they have to be set into I2C mode. Use the I2C and off pin control states defined in the DT nodes for DPAUX as "default" and "idle" states, respectively. This ensures that the I2C controller driver can properly configure the pins when it needs to perform I2C transactions. Acked-by: Jon Hunter Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra186.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit 5298166d47a695002d08d3b4d433206e0ba16762 Author: Joseph Lo Date: Wed Jun 5 10:26:40 2019 +0800 arm64: tegra: Add CPU cache topology for Tegra186 Tegra186 has two CPU clusters with its own cache hierarchy. This patch adds them with the cache information of each of the CPUs. Signed-off-by: Joseph Lo Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra186.dtsi | 60 ++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) commit c4502cc3a15ac70a24ed0d0bf4de5fb4cffb726f Author: Thierry Reding Date: Tue Jun 4 17:29:12 2019 +0200 arm64: tegra: Add VCC supply for GPIO expanders on Jetson TX2 The GPIO expanders on Jetson TX2 are powered by the VDD_1V8 and VDD_3V3_SYS supplies, respectively. Model this in device tree so that the correct supplies are referenced. Reviewed-by: Jon Hunter Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra186-p2771-0000.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 1210d1e6bad1e7ccccb19627b880a50d7c15dd51 Author: Nick Crews Date: Tue May 21 13:20:45 2019 -0600 platform/chrome: wilco_ec: Add telemetry char device interface The Wilco Embedded Controller is able to send telemetry data which is useful for enterprise applications. A daemon running on the OS sends a command to the EC via a write() to a char device, and can read the response with a read(). The write() request is verified by the driver to ensure that it is performing only one of the whitelisted commands, and that no extraneous data is being transmitted to the EC. The response is passed directly back to the reader with no modification. The character device will appear as /dev/wilco_telemN, where N is some small non-negative integer, starting with 0. Only one process may have the file descriptor open at a time. The calling userspace program needs to keep the device file descriptor open between the calls to write() and read() in order to preserve the response. Up to 32 bytes will be available for reading. For testing purposes, try requesting the EC's firmware build date, by sending the WILCO_EC_TELEM_GET_VERSION command with argument index=3. i.e. write [0x38, 0x00, 0x03] to the device node. An ASCII string of the build date is returned. Signed-off-by: Nick Crews Signed-off-by: Enric Balletbo i Serra drivers/platform/chrome/wilco_ec/Kconfig | 7 + drivers/platform/chrome/wilco_ec/Makefile | 2 + drivers/platform/chrome/wilco_ec/core.c | 13 + drivers/platform/chrome/wilco_ec/debugfs.c | 2 +- drivers/platform/chrome/wilco_ec/telemetry.c | 450 +++++++++++++++++++++++++++ include/linux/platform_data/wilco-ec.h | 2 + 6 files changed, 475 insertions(+), 1 deletion(-) commit f0b2835f05c3ff05816b5717b9a920d82954938a Author: Thierry Reding Date: Tue Jun 4 17:38:38 2019 +0200 soc/tegra: fuse: Do not log error message on deferred probe Recent changes have made it much more probable that clocks are not available yet when the FUSE driver is first probed. However, that is a situation that the driver can cope with just fine. To avoid confusion, don't output an error when this happens. Signed-off-by: Thierry Reding drivers/soc/tegra/fuse/fuse-tegra.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 6e6de3dee51a439f76eb73c22ae2ffd2c9384712 Author: Prarit Bhargava Date: Wed May 29 07:26:25 2019 -0400 kernel/module.c: Only return -EEXIST for modules that have finished loading Microsoft HyperV disables the X86_FEATURE_SMCA bit on AMD systems, and linux guests boot with repeated errors: amd64_edac_mod: Unknown symbol amd_unregister_ecc_decoder (err -2) amd64_edac_mod: Unknown symbol amd_register_ecc_decoder (err -2) amd64_edac_mod: Unknown symbol amd_report_gart_errors (err -2) amd64_edac_mod: Unknown symbol amd_unregister_ecc_decoder (err -2) amd64_edac_mod: Unknown symbol amd_register_ecc_decoder (err -2) amd64_edac_mod: Unknown symbol amd_report_gart_errors (err -2) The warnings occur because the module code erroneously returns -EEXIST for modules that have failed to load and are in the process of being removed from the module list. module amd64_edac_mod has a dependency on module edac_mce_amd. Using modules.dep, systemd will load edac_mce_amd for every request of amd64_edac_mod. When the edac_mce_amd module loads, the module has state MODULE_STATE_UNFORMED and once the module load fails and the state becomes MODULE_STATE_GOING. Another request for edac_mce_amd module executes and add_unformed_module() will erroneously return -EEXIST even though the previous instance of edac_mce_amd has MODULE_STATE_GOING. Upon receiving -EEXIST, systemd attempts to load amd64_edac_mod, which fails because of unknown symbols from edac_mce_amd. add_unformed_module() must wait to return for any case other than MODULE_STATE_LIVE to prevent a race between multiple loads of dependent modules. Signed-off-by: Prarit Bhargava Signed-off-by: Barret Rhoden Cc: David Arcari Cc: Jessica Yu Cc: Heiko Carstens Signed-off-by: Jessica Yu kernel/module.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 34abf69732c7c3a79ae286da0c14a716ec45720d Author: Thierry Reding Date: Tue Jun 4 17:41:15 2019 +0200 soc/tegra: pmc: Add comments clarifying wake events Add some comments to clarify the purpose of the wake event support implemented in the PMC driver. Reviewed-by: Jon Hunter Signed-off-by: Thierry Reding drivers/soc/tegra/pmc.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 03b3c21cb3e69e01008a8151b95fe32ffee30610 Author: Thierry Reding Date: Mon May 27 12:19:23 2019 +0200 soc/tegra: pmc: Avoid crash for non-wake IRQs For interrupts that are not wakeup sources but that may end up getting mapped through the PMC as interrupt parent (this can happen for GPIOs), return early in order to avoid a subsequent crash from an out-of-bounds access to the register region. Reported-by: Bitan Biswas Reviewed-by: Jon Hunter Signed-off-by: Thierry Reding drivers/soc/tegra/pmc.c | 3 +++ 1 file changed, 3 insertions(+) commit 77226d97725034542caadf97a4bb9969d5838ee8 Author: Thierry Reding Date: Mon May 27 12:15:12 2019 +0200 soc/tegra: pmc: Fail to allocate more than one wake IRQ The code currently doesn't support allocating more than one wake IRQ at a time. Detect this situation and error out. Also make sure to output a warning when that happens to help track down callers. Reviewed-by: Jon Hunter Signed-off-by: Thierry Reding drivers/soc/tegra/pmc.c | 3 +++ 1 file changed, 3 insertions(+) commit 57aa1bc7d17e6f50d430306ef30a898caa4f388a Author: Chuanhua Han Date: Tue May 28 20:45:06 2019 +0800 arm64: dts: ls1028a: fix watchdog device node ls1028a platform uses sp805 watchdog, and use 1/16 platform clock as timer clock, this patch fix device tree node. Signed-off-by: Chuanhua Han Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) commit f5b07b04e5f090a85d1e96938520f2b2b58e4a8e Author: Chris Wilson Date: Tue Jun 4 13:53:23 2019 +0100 dma-buf: Discard old fence_excl on retrying get_fences_rcu for realloc If we have to drop the seqcount & rcu lock to perform a krealloc, we have to restart the loop. In doing so, be careful not to lose track of the already acquired exclusive fence. Fixes: fedf54132d24 ("dma-buf: Restart reservation_object_get_fences_rcu() after writes") Signed-off-by: Chris Wilson Cc: Daniel Vetter Cc: Maarten Lankhorst Cc: Christian König Cc: Alex Deucher Cc: Sumit Semwal Cc: stable@vger.kernel.org #v4.10 Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20190604125323.21396-1-chris@chris-wilson.co.uk drivers/dma-buf/reservation.c | 4 ++++ 1 file changed, 4 insertions(+) commit 3cdf65300ff77c70d365888fcc097a2b18173303 Author: Peng Ma Date: Fri May 24 15:30:22 2019 +0800 arm64: dts: ls1028a: Enable sata. Change the sata node to enable sata. Signed-off-by: Peng Ma Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls1028a-qds.dts | 4 ++++ arch/arm64/boot/dts/freescale/fsl-ls1028a-rdb.dts | 4 ++++ 2 files changed, 8 insertions(+) commit ef9ed87e82483edf63d3be6bc0518ff98ca8835c Author: Peng Fan Date: Fri May 24 14:39:13 2019 +0800 arm64: dts: imx: add i.MX8QXP ocotp support Add i.MX8QXP ocotp node Cc: Rob Herring Cc: Mark Rutland Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Cc: Anson Huang Cc: Daniel Baluta Cc: devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Reviewed-by: Dong Aisheng Signed-off-by: Peng Fan Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit db9693aa76a161e3e62dba066fec1502b135eb43 Author: Anson Huang Date: Sun May 12 10:10:35 2019 +0000 arm64: dts: imx8qxp: Move watchdog node into scu node i.MX system controller watchdog has pretimeout function which depends on i.MX SCU driver, so it should be a subnode of SCU. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 4c396a604a57da8f883a8b3368d83181680d6907 Author: Anson Huang Date: Fri May 24 13:51:01 2019 +0800 soc: imx: soc-imx8: Correct return value of error handle Current implementation of i.MX8 SoC driver returns -ENODEV for all cases of error during initialization, this is incorrect. This patch fixes them using correct return value according to different errors. Signed-off-by: Anson Huang Reviewed-by: Leonard Crestez Signed-off-by: Shawn Guo drivers/soc/imx/soc-imx8.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit d8dfab0f4d0669ae299511e3ab3e79f312476f75 Author: Anson Huang Date: Fri May 24 13:51:00 2019 +0800 soc: imx: soc-imx8: Avoid unnecessary of_node_put() in error handling of_node_put() is called after of_match_node() successfully called, then in the following error handling, of_node_put() is called again which is unnecessary, this patch adjusts the location of of_node_put() to avoid such scenario. Signed-off-by: Anson Huang Reviewed-by: Leonard Crestez Signed-off-by: Shawn Guo drivers/soc/imx/soc-imx8.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2a99283cb7c1ef1bc61770a2a20ef88693687443 Merge: 3dd7400b4194 7358fd800c0e Author: David S. Miller Date: Tue Jun 4 20:07:57 2019 -0700 Merge branch 'net-dsa-mv88e6xxx-support-for-mv88e6250' Rasmus Villemoes says: ==================== net: dsa: mv88e6xxx: support for mv88e6250 This adds support for the mv88e6250 chip. Initially based on the mv88e6240, this time around, I've been through each ->ops callback and checked that it makes sense, either replacing with a 6250 specific variant or dropping it if no equivalent functionality seems to exist for the 6250. Along the way, I found a few oddities in the existing code, mostly sent as separate patches/questions. The one relevant to the 6250 is the ieee_pri_map callback, where the existing mv88e6085_g1_ieee_pri_map() is actually wrong for many of the existing users. I've put the mv88e6250_g1_ieee_pri_map() patch first in case some of the existing chips get switched over to use that and it is deemed important enough for -stable. v4: - fix style issue in 1/10 - add Andrew's reviewed-by to 1,6,7,8,9,10. v3: - rebase on top of net-next/master - add reviewed-bys to patches unchanged from v2 (2,3,4,5) - add 6250-specific ->ieee_pri_map, ->port_set_speed, ->port_link_state (1,6,7) - in addition, use mv88e6065_phylink_validate for ->phylink_validate, and don't implement ->port_get_cmode, ->port_set_jumbo_size, ->port_disable_learn_limit, ->rmu_disable - drop ptp support - add patch adding the compatible string to the DT binding (9) - add small refactoring patch (10) v2: - rebase on top of net-next/master - add reviewed-by to two patches unchanged from v1 (2,3) - add separate watchdog_ops ==================== Signed-off-by: David S. Miller commit 7358fd800c0e0a4feda388d2194379c5c3903a84 Author: Rasmus Villemoes Date: Tue Jun 4 07:34:35 2019 +0000 net: dsa: mv88e6xxx: refactor mv88e6352_g1_reset The new mv88e6250_g1_reset() is identical to mv88e6352_g1_reset() except for the call of mv88e6352_g1_wait_ppu_polling(), so refactor the 6352 version in term of the 6250 one. No functional change. Reviewed-by: Andrew Lunn Signed-off-by: Rasmus Villemoes Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/global1.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) commit dabde0dac12481c055d2d0ef6686c5789a1a3499 Author: Rasmus Villemoes Date: Tue Jun 4 07:34:33 2019 +0000 dt-bindings: net: dsa: marvell: add "marvell,mv88e6250" compatible string The mv88e6250 has port_base_addr 0x8 or 0x18 (depending on configuration pins), so it constitutes a new family and hence needs its own compatible string. Reviewed-by: Andrew Lunn Signed-off-by: Rasmus Villemoes Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/dsa/marvell.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 1f71836f5d96e4c87fad16db86d324bee47e1d30 Author: Rasmus Villemoes Date: Tue Jun 4 07:34:32 2019 +0000 net: dsa: mv88e6xxx: add support for mv88e6250 This adds support for the Marvell 88E6250. I've checked that each member in the ops-structure makes sense, and basic switchdev functionality works fine. It uses the new dual_chip option, and since its port registers start at SMI address 0x08 or 0x18 (i.e., always sw_addr + 0x08), we need to introduce a new compatible string in order for the auto-identification in mv88e6xxx_detect() to work. The chip has four per port 16-bits statistics registers, two of which correspond to the existing "sw_in_filtered" and "sw_out_filtered" (but at offsets 0x13 and 0x10 rather than 0x12 and 0x13, because why should this be easy...). Wiring up those four statistics seems to require introducing a STATS_TYPE_PORT_6250 bit or similar, which seems a tad ugly, so for now this just allows access to the STATS_TYPE_BANK0 ones. The chip does have ptp support, and the existing mv88e6352_{gpio,avb,ptp}_ops at first glance seem like they would work out-of-the-box, but for simplicity (and lack of testing) I'm eliding this. Reviewed-by: Andrew Lunn Signed-off-by: Rasmus Villemoes Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 81 +++++++++++++++++++++++++++++++++++++ drivers/net/dsa/mv88e6xxx/chip.h | 2 + drivers/net/dsa/mv88e6xxx/global1.c | 19 +++++++++ drivers/net/dsa/mv88e6xxx/global1.h | 1 + drivers/net/dsa/mv88e6xxx/port.h | 1 + 5 files changed, 104 insertions(+) commit ce91c45321e81c7ec1a41555c05a1fb14acfc076 Author: Rasmus Villemoes Date: Tue Jun 4 07:34:30 2019 +0000 net: dsa: mv88e6xxx: implement port_link_state for mv88e6250 The mv88e6250 has a rather different way of reporting the link, speed and duplex status. A simple difference is that the link bit is bit 12 rather than bit 11 of the port status register. It gets more complicated for speed and duplex, which do not have separate fields. Instead, there's a four-bit PortMode field, and decoding that depends on whether it's a phy or mii port. For the phy ports, only four of the 16 values have defined meaning; the rest are called "reserved", so returning {SPEED,DUPLEX}_UNKNOWN seems reasonable. For the mii ports, most possible values are documented (0x3 and 0x5 are reserved), but I'm unable to make sense of them all. Since the bits simply reflect the Px_MODE[3:0] configuration pins, just support the subset that I'm certain about. Support for other setups can be added later. Reviewed-by: Andrew Lunn Signed-off-by: Rasmus Villemoes Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/port.c | 65 ++++++++++++++++++++++++++++++++++++++++ drivers/net/dsa/mv88e6xxx/port.h | 12 ++++++++ 2 files changed, 77 insertions(+) commit a528e5be6b5f8026eda029b03340dcfa23c70824 Author: Rasmus Villemoes Date: Tue Jun 4 07:34:29 2019 +0000 net: dsa: mv88e6xxx: implement port_set_speed for mv88e6250 The data sheet also mentions the possibility of selecting 200 Mbps for the MII ports (ports 5 and 6) by setting the ForceSpd field to 0x2 (aka MV88E6065_PORT_MAC_CTL_SPEED_200). However, there's a note that "actual speed is determined by bit 8 above", and flipping back a page, one finds that bits 13:8 are reserved... So without further information on what bit 8 means, let's stick to supporting just 10 and 100 Mbps on all ports. Reviewed-by: Andrew Lunn Signed-off-by: Rasmus Villemoes Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/port.c | 12 ++++++++++++ drivers/net/dsa/mv88e6xxx/port.h | 1 + 2 files changed, 13 insertions(+) commit 855cdfde54315762763fb833ad952355119dd3b0 Author: Rasmus Villemoes Date: Tue Jun 4 07:34:28 2019 +0000 net: dsa: mv88e6xxx: implement watchdog_ops for mv88e6250 The MV88E6352_G2_WDOG_CTL_* bits almost, but not quite, describe the watchdog control register on the mv88e6250. Among those actually referenced in the code, only QC_ENABLE differs (bit 6 rather than bit 5). Reviewed-by: Andrew Lunn Reviewed-by: Vivien Didelot Signed-off-by: Rasmus Villemoes Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/global2.c | 26 ++++++++++++++++++++++++++ drivers/net/dsa/mv88e6xxx/global2.h | 14 ++++++++++++++ 2 files changed, 40 insertions(+) commit bec8e572528195b5138dcf2976d3831e5decdac6 Author: Rasmus Villemoes Date: Tue Jun 4 07:34:27 2019 +0000 net: dsa: mv88e6xxx: implement vtu_getnext and vtu_loadpurge for mv88e6250 These are almost identical to the 6185 variants, but have fewer bits for the FID. Bit 10 of the VTU_OP register (offset 0x05) is the VidPolicy bit, which one should probably preserve in mv88e6xxx_g1_vtu_op(), instead of always writing a 0. However, on the 6352 family, that bit is located at bit 12 in the VTU FID register (offset 0x02), and is always unconditionally cleared by the mv88e6xxx_g1_vtu_fid_write() function. Since nothing in the existing driver seems to know or care about that bit, it seems reasonable to not add the boilerplate to preserve it for the 6250 (which would require adding a chip-specific vtu_op function, or adding chip-quirks to the existing one). Reviewed-by: Andrew Lunn Reviewed-by: Vivien Didelot Signed-off-by: Rasmus Villemoes Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/global1.h | 4 +++ drivers/net/dsa/mv88e6xxx/global1_vtu.c | 58 +++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) commit 7b83df0dcf8477433dec3df308f101d9910d80c7 Author: Rasmus Villemoes Date: Tue Jun 4 07:34:25 2019 +0000 net: dsa: mv88e6xxx: prepare mv88e6xxx_g1_atu_op() for the mv88e6250 All the currently supported chips have .num_databases either 256 or 4096, so this patch does not change behaviour for any of those. The mv88e6250, however, has .num_databases == 64, and it does not put the upper two bits in ATU control 13:12, but rather in ATU Operation 9:8. So change the logic to prepare for supporting mv88e6250. Reviewed-by: Andrew Lunn Reviewed-by: Vivien Didelot Signed-off-by: Rasmus Villemoes Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/global1_atu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit f30a19b828c645cdde1e7a7733dce1cab8bcb25a Author: Rasmus Villemoes Date: Tue Jun 4 07:34:24 2019 +0000 net: dsa: mv88e6xxx: introduce support for two chips using direct smi addressing The 88e6250 (as well as 6220, 6071, 6070, 6020) do not support multi-chip (indirect) addressing. However, one can still have two of them on the same mdio bus, since the device only uses 16 of the 32 possible addresses, either addresses 0x00-0x0F or 0x10-0x1F depending on the ADDR4 pin at reset [since ADDR4 is internally pulled high, the latter is the default]. In order to prepare for supporting the 88e6250 and friends, introduce mv88e6xxx_info::dual_chip to allow having a non-zero sw_addr while still using direct addressing. Reviewed-by: Vivien Didelot Reviewed-by: Andrew Lunn Signed-off-by: Rasmus Villemoes Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.h | 6 ++++++ drivers/net/dsa/mv88e6xxx/smi.c | 25 ++++++++++++++++++++++++- 2 files changed, 30 insertions(+), 1 deletion(-) commit df63b0d95ec59f47df3a8beaeb75557c4bc49c00 Author: Rasmus Villemoes Date: Tue Jun 4 07:34:23 2019 +0000 net: dsa: mv88e6xxx: add mv88e6250_g1_ieee_pri_map Quite a few of the existing supported chips that use mv88e6085_g1_ieee_pri_map as ->ieee_pri_map (including, incidentally, mv88e6085 itself) actually have a reset value of 0xfa50 in the G1_IEEE_PRI register. The data sheet for the mv88e6095, however, does describe a reset value of 0xfa41. So rather than changing the value in the existing callback, introduce a new variant with the 0xfa50 value. That will be used by the upcoming mv88e6250, and existing chips can be switched over one by one, preferably double-checking both the data sheet and actual hardware in each case - if anybody actually feels this is important enough to care. Reviewed-by: Andrew Lunn Signed-off-by: Rasmus Villemoes Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/global1.c | 6 ++++++ drivers/net/dsa/mv88e6xxx/global1.h | 2 ++ 2 files changed, 8 insertions(+) commit 3dd7400b419409b1551f7f01764b1f3160feda90 Author: Ronak Doshi Date: Mon Jun 3 23:58:38 2019 -0700 vmxnet3: turn off lro when rxcsum is disabled Currently, when rx csum is disabled, vmxnet3 driver does not turn off lro, which can cause performance issues if user does not turn off lro explicitly. This patch adds fix_features support which is used to turn off LRO whenever RXCSUM is disabled. Signed-off-by: Ronak Doshi Acked-by: Rishi Mehta Signed-off-by: David S. Miller drivers/net/vmxnet3/vmxnet3_drv.c | 1 + drivers/net/vmxnet3/vmxnet3_ethtool.c | 10 ++++++++++ drivers/net/vmxnet3/vmxnet3_int.h | 7 +++++-- 3 files changed, 16 insertions(+), 2 deletions(-) commit 9ec49a7e58fb028f23ce6bb6a6a91384811c1dcc Merge: 7dd73168e273 dbcc4fa718ee Author: David S. Miller Date: Tue Jun 4 19:26:50 2019 -0700 Merge branch 'net-add-struct-nexthop-to-fib-info' David Ahern says: ==================== net: add struct nexthop to fib{6}_info Set 10 of 11 to improve route scalability via support for nexthops as standalone objects for fib entries. https://lwn.net/Articles/763950/ This sets adds 'struct nexthop' to fib_info and fib6_info. IPv4 already handles multiple fib_nh entries in a single fib_info, so the conversion to use a nexthop struct is fairly mechanical. IPv6 using a nexthop struct with a fib6_info impacts a lot of core logic which is built around the assumption of a single, builtin fib6_nh per fib6_info. To make this easier to review, this set adds nexthop to fib6_info and adds checks in most places fib6_info is used. The next set finishes the IPv6 conversion, walking through the places that need to consider all fib6_nh within a nexthop struct. Offload drivers - mlx5, mlxsw and rocker - are changed to fail FIB entries using nexthop objects. That limitation can be removed once the drivers are updated to properly support separate nexthops. This set starts by adding accessors for fib_nh and fib_nhs in a fib_info. This makes it easier to extract the number of nexthops in the fib entry and a specific fib_nh once the entry references a struct nexthop. Patch 2 converts more of IPv4 code to use fib_nh_common allowing a struct nexthop to use a fib6_nh with an IPv4 entry. Patches 3 and 4 add 'struct nexthop' to fib{6}_info and update references to both take a different path when it is set. New exported functions are added to the nexthop code to validate a nexthop struct when configured for use with a fib entry. IPv4 is allowed to use a nexthop with either v4 or v6 entries. IPv6 is limited to v6 entries only. In both cases list_heads track the fib entries using a nexthop struct for fast correlation on events (e.g., device events or nexthop events like delete or replace). The last 3 patches add hooks to drivers listening for FIB notificationas. All 3 of them reject the routes as unsupported, returning an error message to the user via extack. For mlxsw at least this is a stop gap measure until the driver is updated for proper support. Functional tests for nexthops have already been committed. Those tests will be active after the next patch set which makes the code paths created by this set and the next one live. Existing code paths moved to the else branch of 'if (f{6}i->nh)' checks are covered by existing tests under selftests/net. v3 - remove ip6_create_rt_rcu from ip6_pol_route in patch 4 and use pcpu routes for REJECT routes with the blackhole nexthop (request from Wei) v2 - no code changes from v1 - commit messages for first 4 patches updated ==================== Signed-off-by: David S. Miller commit dbcc4fa718eed0fd392eb098631f33af04014d63 Author: David Ahern Date: Mon Jun 3 20:19:55 2019 -0700 rocker: Fail attempts to use routes with nexthop objects Fail attempts to use nexthop objects with routes until support can be properly added. Signed-off-by: David Ahern Signed-off-by: David S. Miller drivers/net/ethernet/rocker/rocker_main.c | 4 ++++ 1 file changed, 4 insertions(+) commit 6a87afc072c37880ae60fa3dfb74cc252038fac1 Author: David Ahern Date: Mon Jun 3 20:19:54 2019 -0700 mlx5: Fail attempts to use routes with nexthop objects Fail attempts to use nexthop objects with routes until support can be properly added. Signed-off-by: David Ahern Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/lag_mp.c | 4 ++++ 1 file changed, 4 insertions(+) commit 54250805d8e436d46ca391219802f2a23b948e8d Author: David Ahern Date: Mon Jun 3 20:19:53 2019 -0700 mlxsw: Fail attempts to use routes with nexthop objects Fail attempts to use nexthop objects with routes until support can be properly added. Signed-off-by: David Ahern Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit f88d8ea67fbdbac7a64bfa6ed9a2ba27bb822f74 Author: David Ahern Date: Mon Jun 3 20:19:52 2019 -0700 ipv6: Plumb support for nexthop object in a fib6_info Add struct nexthop and nh_list list_head to fib6_info. nh_list is the fib6_info side of the nexthop <-> fib_info relationship. Since a fib6_info referencing a nexthop object can not have 'sibling' entries (the old way of doing multipath routes), the nh_list is a union with fib6_siblings. Add f6i_list list_head to 'struct nexthop' to track fib6_info entries using a nexthop instance. Update __remove_nexthop_fib to walk f6_list and delete fib entries using the nexthop. Add a few nexthop helpers for use when a nexthop is added to fib6_info: - nexthop_fib6_nh - return first fib6_nh in a nexthop object - fib6_info_nh_dev moved to nexthop.h and updated to use nexthop_fib6_nh if the fib6_info references a nexthop object - nexthop_path_fib6_result - similar to ipv4, select a path within a multipath nexthop object. If the nexthop is a blackhole, set fib6_result type to RTN_BLACKHOLE, and set the REJECT flag Update the fib6_info references to check for nh and take a different path as needed: - rt6_qualify_for_ecmp - if a fib entry uses a nexthop object it can NOT be coalesced with other fib entries into a multipath route - rt6_duplicate_nexthop - use nexthop_cmp if either fib6_info references a nexthop - addrconf (host routes), RA's and info entries (anything configured via ndisc) does not use nexthop objects - fib6_info_destroy_rcu - put reference to nexthop object - fib6_purge_rt - drop fib6_info from f6i_list - fib6_select_path - update to use the new nexthop_path_fib6_result when fib entry uses a nexthop object - rt6_device_match - update to catch use of nexthop object as a blackhole and set fib6_type and flags. - ip6_route_info_create - don't add space for fib6_nh if fib entry is going to reference a nexthop object, take a reference to nexthop object, disallow use of source routing - rt6_nlmsg_size - add space for RTA_NH_ID - add rt6_fill_node_nexthop to add nexthop data on a dump As with ipv4, most of the changes push existing code into the else branch of whether the fib entry uses a nexthop object. Update the nexthop code to walk f6i_list on a nexthop deleted to remove fib entries referencing it. Signed-off-by: David Ahern Signed-off-by: David S. Miller include/net/ip6_fib.h | 11 ++-- include/net/ip6_route.h | 13 ++++- include/net/nexthop.h | 50 ++++++++++++++++ net/ipv4/nexthop.c | 44 ++++++++++++++ net/ipv6/addrconf.c | 5 ++ net/ipv6/ip6_fib.c | 22 +++++-- net/ipv6/ndisc.c | 3 +- net/ipv6/route.c | 148 +++++++++++++++++++++++++++++++++++++++++------- 8 files changed, 260 insertions(+), 36 deletions(-) commit 4c7e8084fd467ddb2b0e6c6011f9c1064afb7e56 Author: David Ahern Date: Mon Jun 3 20:19:51 2019 -0700 ipv4: Plumb support for nexthop object in a fib_info Add 'struct nexthop' and nh_list list_head to fib_info. nh_list is the fib_info side of the nexthop <-> fib_info relationship. Add fi_list list_head to 'struct nexthop' to track fib_info entries using a nexthop instance. Add __remove_nexthop_fib and add it to __remove_nexthop to walk the new list_head and mark those fib entries as dead when the nexthop is deleted. Add a few nexthop helpers for use when a nexthop is added to fib_info: - nexthop_cmp to determine if 2 nexthops are the same - nexthop_path_fib_result to select a path for a multipath 'struct nexthop' - nexthop_fib_nhc to select a specific fib_nh_common within a multipath 'struct nexthop' Update existing fib_info_nhc to use nexthop_fib_nhc if a fib_info uses a 'struct nexthop', and mark fib_info_nh as only used for the non-nexthop case. Update the fib_info functions to check for fi->nh and take a different path as needed: - free_fib_info_rcu - put the nexthop object reference - fib_release_info - remove the fib_info from the nexthop's fi_list - nh_comp - use nexthop_cmp when either fib_info references a nexthop object - fib_info_hashfn - use the nexthop id for the hashing vs the oif of each fib_nh in a fib_info - fib_nlmsg_size - add space for the RTA_NH_ID attribute - fib_create_info - verify nexthop reference can be taken, verify nexthop spec is valid for fib entry, and add fib_info to fi_list for a nexthop - fib_select_multipath - use the new nexthop_path_fib_result to select a path when nexthop objects are used - fib_table_lookup - if the 'struct nexthop' is a blackhole nexthop, treat it the same as a fib entry using 'blackhole' The bulk of the changes are in fib_semantics.c and most of that is moving the existing change_nexthops into an else branch. Update the nexthop code to walk fi_list on a nexthop deleted to remove fib entries referencing it. Signed-off-by: David Ahern Signed-off-by: David S. Miller include/net/ip_fib.h | 4 ++ include/net/nexthop.h | 48 ++++++++++++++++ net/ipv4/fib_semantics.c | 142 +++++++++++++++++++++++++++++++++++------------ net/ipv4/fib_trie.c | 7 +++ net/ipv4/nexthop.c | 64 +++++++++++++++++++++ 5 files changed, 229 insertions(+), 36 deletions(-) commit dcb1ecb50edf8219c3bd851de35897fb024c423b Author: David Ahern Date: Mon Jun 3 20:19:50 2019 -0700 ipv4: Prepare for fib6_nh from a nexthop object Convert more IPv4 code to use fib_nh_common over fib_nh to enable routes to use a fib6_nh based nexthop. In the end, only code not using a nexthop object in a fib_info should directly access fib_nh in a fib_info without checking the famiy and going through fib_nh_common. Those functions will be marked when it is not directly evident. Signed-off-by: David Ahern Signed-off-by: David S. Miller include/net/ip_fib.h | 15 +++++++++---- net/ipv4/fib_frontend.c | 12 +++++------ net/ipv4/fib_rules.c | 4 ++-- net/ipv4/fib_semantics.c | 55 +++++++++++++++++++++++++++++++++--------------- net/ipv4/fib_trie.c | 15 +++++++------ net/ipv4/nexthop.c | 3 ++- net/ipv4/route.c | 2 +- 7 files changed, 69 insertions(+), 37 deletions(-) commit 5481d73f81549e2a05cbbb49867a9a560c5292df Author: David Ahern Date: Mon Jun 3 20:19:49 2019 -0700 ipv4: Use accessors for fib_info nexthop data Use helpers to access fib_nh and fib_nhs fields of a fib_info. Drop the fib_dev macro which is an alias for the first nexthop. Replacements: fi->fib_dev --> fib_info_nh(fi, 0)->fib_nh_dev fi->fib_nh --> fib_info_nh(fi, 0) fi->fib_nh[i] --> fib_info_nh(fi, i) fi->fib_nhs --> fib_info_num_path(fi) where fib_info_nh(fi, i) returns fi->fib_nh[nhsel] and fib_info_num_path returns fi->fib_nhs. Move the existing fib_info_nhc to nexthop.h and define the new ones there. A later patch adds a check if a fib_info uses a nexthop object, and defining the helpers in nexthop.h avoid circular header dependencies. After this all remaining open coded references to fi->fib_nhs and fi->fib_nh are in: - fib_create_info and helpers used to lookup an existing fib_info entry, and - the netdev event functions fib_sync_down_dev and fib_sync_up. The latter two will not be reused for nexthops, and the fib_create_info will be updated to handle a nexthop in a fib_info. Signed-off-by: David Ahern Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/lag_mp.c | 29 ++++++---- .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 19 ++++--- drivers/net/ethernet/rocker/rocker_ofdpa.c | 25 +++++--- include/net/ip_fib.h | 6 -- include/net/nexthop.h | 15 +++++ net/core/filter.c | 3 +- net/ipv4/fib_frontend.c | 11 ++-- net/ipv4/fib_lookup.h | 1 + net/ipv4/fib_rules.c | 8 ++- net/ipv4/fib_semantics.c | 66 ++++++++++++---------- net/ipv4/fib_trie.c | 26 +++++---- net/ipv4/route.c | 3 +- 12 files changed, 132 insertions(+), 80 deletions(-) commit 7dd73168e273938b9e9bb42ca51b0c27d807992b Author: David Ahern Date: Mon Jun 3 18:37:03 2019 -0700 ipv6: Always allocate pcpu memory in a fib6_nh A recent commit had an unintended side effect with reject routes: rt6i_pcpu is expected to always be initialized for all fib6_info except the null entry. The commit mentioned below skips it for reject routes and ends up leaking references to the loopback device. For example, ip netns add foo ip -netns foo li set lo up ip -netns foo -6 ro add blackhole 2001:db8:1::1 ip netns exec foo ping6 2001:db8:1::1 ip netns del foo ends up spewing: unregister_netdevice: waiting for lo to become free. Usage count = 3 The fib_nh_common_init is not needed for reject routes (no ipv4 caching or encaps), so move the alloc_percpu_gfp after it and adjust the goto label. Fixes: f40b6ae2b612 ("ipv6: Move pcpu cached routes to fib6_nh") Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv6/route.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit cbb32079149dbf557fa3f7bab8fa3c5fec857da7 Author: Claudiu Beznea Date: Thu Apr 25 12:36:39 2019 +0000 drm/atmel-hlcdc: revert shift by 8 Revert shift by 8 of state->base.alpha. This introduced a regression on planes. Fixes: 7f73c10b256b ("drm/atmel-hclcdc: Convert to the new generic alpha property") Cc: Maxime Ripard Signed-off-by: Claudiu Beznea Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/1556195748-11106-7-git-send-email-claudiu.beznea@microchip.com drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1e0071819400205894c034174f7c4627820ca64e Author: Xue Chaojing Date: Tue Jun 4 01:16:08 2019 +0000 hinic: add LRO support This patch adds LRO support for the HiNIC driver. Reported-by: kbuild test robot Reviewed-by: Jesse Brandeburg Signed-off-by: Xue Chaojing Reviewed-by: Jesse Brandeburg Signed-off-by: David S. Miller drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c | 2 + drivers/net/ethernet/huawei/hinic/hinic_hw_dev.h | 8 +- drivers/net/ethernet/huawei/hinic/hinic_hw_io.c | 60 +++++++++++ .../net/ethernet/huawei/hinic/hinic_hw_qp_ctxt.h | 5 + drivers/net/ethernet/huawei/hinic/hinic_hw_wqe.h | 22 +++- drivers/net/ethernet/huawei/hinic/hinic_main.c | 61 ++++++++++- drivers/net/ethernet/huawei/hinic/hinic_port.c | 114 +++++++++++++++++++++ drivers/net/ethernet/huawei/hinic/hinic_port.h | 41 ++++++++ drivers/net/ethernet/huawei/hinic/hinic_rx.c | 46 +++++++-- drivers/net/ethernet/huawei/hinic/hinic_rx.h | 2 + 10 files changed, 348 insertions(+), 13 deletions(-) commit 600bb0318c18e9616d97ad123caaa7c5f7bf222c Merge: b20ac8da76ed 8b6912a50193 Author: David S. Miller Date: Tue Jun 4 14:49:38 2019 -0700 Merge branch 'bond-mpls' Ariel Levkovich says: ==================== Support MPLS features in bonding and vlan net devices Netdevice HW MPLS features are not passed from device driver's netdevice to upper netdevice, specifically VLAN and bonding netdevice which are created by the kernel when needed. This prevents enablement and usage of HW offloads, such as TSO and checksumming for MPLS tagged traffic when running via VLAN or bonding interface. The patches introduce changes to the initialization steps of the VLAN and bonding netdevices to inherit the MPLS features from lower netdevices to allow the HW offloads. ==================== Signed-off-by: David S. Miller commit 8b6912a5019356d7adb1b8a146c9eef5e679bf98 Author: Ariel Levkovich Date: Mon Jun 3 22:36:47 2019 +0000 net: vlan: Inherit MPLS features from parent device During the creation of the VLAN interface net device, the various device features and offloads are being set based on the parent device's features. The code initiates the basic, vlan and encapsulation features but doesn't address the MPLS features set and they remain blank. As a result, all device offloads that have significant performance effect are disabled for MPLS traffic going via this VLAN device such as checksumming and TSO. This patch makes sure that MPLS features are also set for the VLAN device based on the parent which will allow HW offloads of checksumming and TSO to be performed on MPLS tagged packets. Signed-off-by: Ariel Levkovich Signed-off-by: David S. Miller net/8021q/vlan_dev.c | 1 + 1 file changed, 1 insertion(+) commit 2e770b507ccde8eedc129946e4b78ceed0a22df2 Author: Ariel Levkovich Date: Mon Jun 3 22:36:46 2019 +0000 net: bonding: Inherit MPLS features from slave devices When setting the bonding interface net device features, the kernel code doesn't address the slaves' MPLS features and doesn't inherit them. Therefore, HW offloads that enhance performance such as checksumming and TSO are disabled for MPLS tagged traffic flowing via the bonding interface. The patch add the inheritance of the MPLS features from the slave devices with a similar logic to setting the bonding device's VLAN and encapsulation features. CC: Jay Vosburgh CC: Veaceslav Falico CC: Andy Gospodarek Signed-off-by: Ariel Levkovich Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit e2435ead7633f3127b5236b9e29d4aa600343c1b Author: Sandeep Sheriker Mallikarjun Date: Thu Apr 25 12:36:35 2019 +0000 drm: atmel-hlcdc: add sam9x60 LCD controller Add the LCD controller for SAM9X60. Signed-off-by: Sandeep Sheriker Mallikarjun [claudiu.beznea@microchip.com: add fixed_clksrc option to atmel_hlcdc_dc_sam9x60] Signed-off-by: Claudiu Beznea Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/1556195748-11106-6-git-send-email-claudiu.beznea@microchip.com drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 101 +++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) commit 262d67e73f9a920a20bd75278761400404a82de0 Author: Sandeep Sheriker Mallikarjun Date: Thu Apr 25 12:36:30 2019 +0000 drm: atmel-hlcdc: enable sys_clk during initalization. For SAM9X60 SoC, sys_clk is through lcd_gclk clock source and this needs to be enabled before enabling lcd_clk. Signed-off-by: Sandeep Sheriker Mallikarjun [claudiu.beznea@microchip.com: add fixed_clksrc checks] Signed-off-by: Claudiu Beznea Reviewed-by: Sam Ravnborg Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/1556195748-11106-5-git-send-email-claudiu.beznea@microchip.com drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit b20ac8da76ed529a3912debb8b074a6323545944 Merge: 7e7d199e05f8 fb0f886fa265 Author: David S. Miller Date: Tue Jun 4 14:33:50 2019 -0700 Merge branch 'net-tls-small-general-improvements' Jakub Kicinski says: ==================== net/tls: small general improvements This series cleans up and improves the tls code, mostly the offload parts. First a slight performance optimization - avoiding unnecessary re- -encryption of records in patch 1. Next patch 2 makes the code more resilient by checking for errors in skb_copy_bits(). Next commit removes a warning which can be triggered in normal operation, (especially for devices explicitly making use of the fallback path). Next two paths change the condition checking around the call to tls_device_decrypted() to make it easier to extend. Remaining commits are centered around reorganizing struct tls_context for better cache utilization. ==================== Signed-off-by: David S. Miller commit fb0f886fa265f265ad126fc7cd7e8ec51e2f770f Author: Jakub Kicinski Date: Mon Jun 3 15:17:05 2019 -0700 net/tls: don't pass version to tls_advance_record_sn() All callers pass prot->version as the last parameter of tls_advance_record_sn(), yet tls_advance_record_sn() itself needs a pointer to prot. Pass prot from callers. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller include/net/tls.h | 10 +++------- net/tls/tls_device.c | 2 +- net/tls/tls_sw.c | 9 ++++----- 3 files changed, 8 insertions(+), 13 deletions(-) commit f0aaa2c975617da78b80feebc87e74dba9ec1f53 Author: Jakub Kicinski Date: Mon Jun 3 15:17:04 2019 -0700 net/tls: reorganize struct tls_context struct tls_context is slightly badly laid out. If we reorder things right we can save 16 bytes (320 -> 304) but also make all fast path data fit into two cache lines (one read only and one read/write, down from four cache lines). Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller include/net/tls.h | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) commit 9cd81988cce195598e04fd8290fea873052bb7bd Author: Jakub Kicinski Date: Mon Jun 3 15:17:03 2019 -0700 net/tls: use version from prot ctx->prot holds the same information as per-direction contexts. Almost all code gets TLS version from this structure, convert the last two stragglers, this way we can improve the cache utilization by moving the per-direction data into cold cache lines. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller net/tls/tls_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1fe275d434ad4ff2d576f9a770eb4c192153ea1d Author: Jakub Kicinski Date: Mon Jun 3 15:17:02 2019 -0700 net/tls: don't re-check msg decrypted status in tls_device_decrypted() tls_device_decrypted() is only called from decrypt_skb_update(), when ctx->decrypted == false, there is no need to re-check the bit. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller net/tls/tls_device.c | 4 ---- 1 file changed, 4 deletions(-) commit b9d8fec927ef3cd157e6a0956f5ec89f6891ed27 Author: Jakub Kicinski Date: Mon Jun 3 15:17:01 2019 -0700 net/tls: don't look for decrypted frames on non-offloaded sockets If the RX config of a TLS socket is SW, there is no point iterating over the fragments and checking if frame is decrypted. It will always be fully encrypted. Note that in fully encrypted case the function doesn't actually touch any offload-related state, so it's safe to call for TLS_SW, today. Soon we will introduce code which can only be called for offloaded contexts. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller net/tls/tls_sw.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 87b11e0638c3dbf029a7c9020f8a779062db58fc Author: Jakub Kicinski Date: Mon Jun 3 15:17:00 2019 -0700 net/tls: remove false positive warning It's possible that TCP stack will decide to retransmit a packet right when that packet's data gets acked, especially in presence of packet reordering. This means that packets may be in flight, even though tls_device code has already freed their record state. Make fill_sg_in() and in turn tls_sw_fallback() not generate a warning in that case, and quietly proceed to drop such frames. Make the exit path from tls_sw_fallback() drop monitor friendly, for users to be able to troubleshoot dropped retransmissions. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller Documentation/networking/tls-offload.rst | 19 ------------------- net/tls/tls_device_fallback.c | 6 ++++-- 2 files changed, 4 insertions(+), 21 deletions(-) commit aeb11ff0dc46be309ba000af7e608f8d3695fd6e Author: Jakub Kicinski Date: Mon Jun 3 15:16:59 2019 -0700 net/tls: check return values from skb_copy_bits() and skb_store_bits() In light of recent bugs, we should make a better effort of checking return values. In theory none of the functions should fail today. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller net/tls/tls_device.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit da29e4b466e6916a52e0e2f60054f855c324a9c2 Author: Jakub Kicinski Date: Mon Jun 3 15:16:58 2019 -0700 net/tls: fully initialize the msg wrapper skb If strparser gets cornered into starting a new message from an sk_buff which already has frags, it will allocate a new skb to become the "wrapper" around the fragments of the message. This new skb does not inherit any metadata fields. In case of TLS offload this may lead to unnecessarily re-encrypting the message, as skb->decrypted is not set for the wrapper skb. Try to be conservative and copy all fields of old skb strparser's user may reasonably need. Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Reviewed-by: Simon Horman Signed-off-by: David S. Miller include/linux/skbuff.h | 1 + net/core/skbuff.c | 25 +++++++++++++++++++++++++ net/strparser/strparser.c | 8 ++------ 3 files changed, 28 insertions(+), 6 deletions(-) commit e1dc68a4b149d47536cd001d0d0abadbb62d37bd Author: Claudiu Beznea Date: Thu Apr 25 12:36:16 2019 +0000 drm: atmel-hlcdc: avoid initializing cfg with zero Remove cfg initialization with zero and read state with drm_crtc_state_to_atmel_hlcdc_crtc_state() so that cfg to be initialized with state's output_mode. Signed-off-by: Claudiu Beznea Reviewed-by: Sam Ravnborg Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/1556195748-11106-3-git-send-email-claudiu.beznea@microchip.com drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit a6eca2abdd4297ec635e8f7a573ef070be2824d7 Author: Claudiu Beznea Date: Thu Apr 25 12:36:09 2019 +0000 drm: atmel-hlcdc: add config option for clock selection SAM9x60 LCD Controller has no option to select clock source as previous controllers have. To be able to use the same driver even for this LCD controller add a config option to know if controller supports this. Signed-off-by: Claudiu Beznea Reviewed-by: Sam Ravnborg Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/1556195748-11106-2-git-send-email-claudiu.beznea@microchip.com drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 12 +++++++----- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h | 2 ++ 2 files changed, 9 insertions(+), 5 deletions(-) commit 7e7d199e05f80735864efcb5b306fefd98039a58 Author: Nathan Chancellor Date: Mon Jun 3 13:49:53 2019 -0700 net: mscc: ocelot: Fix some struct initializations Clang warns: drivers/net/ethernet/mscc/ocelot_ace.c:335:37: warning: suggest braces around initialization of subobject [-Wmissing-braces] struct ocelot_vcap_u64 payload = { 0 }; ^ {} drivers/net/ethernet/mscc/ocelot_ace.c:336:28: warning: suggest braces around initialization of subobject [-Wmissing-braces] struct vcap_data data = { 0 }; ^ {} drivers/net/ethernet/mscc/ocelot_ace.c:683:37: warning: suggest braces around initialization of subobject [-Wmissing-braces] struct ocelot_ace_rule del_ace = { 0 }; ^ {} drivers/net/ethernet/mscc/ocelot_ace.c:743:28: warning: suggest braces around initialization of subobject [-Wmissing-braces] struct vcap_data data = { 0 }; ^ {} 4 warnings generated. One way to fix these warnings is to add additional braces like Clang suggests; however, there has been a bit of push back from some maintainers[1][2], who just prefer memset as it is unambiguous, doesn't depend on a particular compiler version[3], and properly initializes all subobjects. Do that here so there are no more warnings. [1]: https://lore.kernel.org/lkml/022e41c0-8465-dc7a-a45c-64187ecd9684@amd.com/ [2]: https://lore.kernel.org/lkml/20181128.215241.702406654469517539.davem@davemloft.net/ [3]: https://lore.kernel.org/lkml/20181116150432.2408a075@redhat.com/ Fixes: b596229448dd ("net: mscc: ocelot: Add support for tcam") Link: https://github.com/ClangBuiltLinux/linux/issues/505 Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Signed-off-by: David S. Miller drivers/net/ethernet/mscc/ocelot_ace.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit d3e6e285fff3494a5c12154c8e7d79f5181d3ddc Author: Florian Westphal Date: Mon Jun 3 22:41:44 2019 +0200 net: ipv4: fix rcu lockdep splat due to wrong annotation syzbot triggered following splat when strict netlink validation is enabled: net/ipv4/devinet.c:1766 suspicious rcu_dereference_check() usage! This occurs because we hold RTNL mutex, but no rcu read lock. The second call site holds both, so just switch to the _rtnl variant. Reported-by: syzbot+bad6e32808a3a97b1515@syzkaller.appspotmail.com Fixes: 2638eb8b50cf ("net: ipv4: provide __rcu annotation for ifa_list") Signed-off-by: Florian Westphal Signed-off-by: David S. Miller net/ipv4/devinet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ae95f9c1a5601b3dd40d72436ef835b5bbb429a7 Merge: 712246bc93cb fc4c93f145d7 Author: David S. Miller Date: Tue Jun 4 14:21:41 2019 -0700 Merge branch 'net-expose-flash-update-status-to-user' Jiri Pirko says: ==================== expose flash update status to user When user is flashing device using devlink, he currenly does not see any information about what is going on, percentages, etc. Drivers, for example mlxsw and mlx5, have notion about the progress and what is happening. This patchset exposes this progress information to userspace. Example output for existing flash command: $ devlink dev flash pci/0000:01:00.0 file firmware.bin Preparing to flash Flashing 100% Flashing done See this console recording which shows flashing FW on a Mellanox Spectrum device: https://asciinema.org/a/247926 Please see individual patches for changelog. v2->v3 only adds tags and the last selftest patch ==================== Signed-off-by: David S. Miller commit fc4c93f145d7812fa3a93d688492041684993fbb Author: Jiri Pirko Date: Tue Jun 4 15:40:44 2019 +0200 selftests: add basic netdevsim devlink flash testing Utilizes the devlink flash code. Suggested-by: Jakub Kicinski Signed-off-by: Jiri Pirko Acked-by: Jakub Kicinski Signed-off-by: David S. Miller .../selftests/drivers/net/netdevsim/devlink.sh | 53 ++++++++++++++++++++++ 1 file changed, 53 insertions(+) commit fa4dfc4a94da180a5ab7e91a501fed86352abfd4 Author: Jiri Pirko Date: Tue Jun 4 15:40:43 2019 +0200 netdevsim: implement fake flash updating with notifications Signed-off-by: Jiri Pirko Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/netdevsim/dev.c | 44 +++++++++++++++++++++++++++++++++++++++ drivers/net/netdevsim/netdevsim.h | 1 + 2 files changed, 45 insertions(+) commit 8f1956f1132eb27d627c7f4d4d7508433287c590 Author: Jiri Pirko Date: Tue Jun 4 15:40:42 2019 +0200 mlxsw: Implement flash update status notifications Implement mlxfw status_notify op by passing notification down to devlink. Also notify about flash update begin and end. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit 5853c41823ddbf1910fc1e43e46830ec6f4958c0 Author: Jiri Pirko Date: Tue Jun 4 15:40:41 2019 +0200 mlxfw: Introduce status_notify op and call it to notify about the status Add new op status_notify which is called to update the user about flashing status. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxfw/mlxfw.h | 4 ++++ drivers/net/ethernet/mellanox/mlxfw/mlxfw_fsm.c | 24 ++++++++++++++++++++++++ 2 files changed, 28 insertions(+) commit 191ed2024de9fcfaab24106f9dbf7e544b07d633 Author: Jiri Pirko Date: Tue Jun 4 15:40:40 2019 +0200 devlink: allow driver to update progress of flash update Introduce a function to be called from drivers during flash. It sends notification to userspace about flash update progress. Signed-off-by: Jiri Pirko Reviewed-by: Jakub Kicinski Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller include/net/devlink.h | 8 ++++ include/uapi/linux/devlink.h | 5 +++ net/core/devlink.c | 102 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 115 insertions(+) commit 44f18db5c16a83c0aeb039cc5df2d467460a2794 Author: Jiri Pirko Date: Tue Jun 4 15:40:39 2019 +0200 mlxfw: Propagate error messages through extack Currently the error messages are printed to dmesg. Propagate them also to directly to user doing the flashing through extack. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/fw.c | 6 ++-- drivers/net/ethernet/mellanox/mlx5/core/main.c | 2 +- .../net/ethernet/mellanox/mlx5/core/mlx5_core.h | 3 +- drivers/net/ethernet/mellanox/mlxfw/mlxfw.h | 7 +++-- drivers/net/ethernet/mellanox/mlxfw/mlxfw_fsm.c | 33 +++++++++++++++------- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 10 ++++--- 6 files changed, 41 insertions(+), 20 deletions(-) commit 9c8bca2637b8441a18bb846a1d74293cb990724e Author: Jiri Pirko Date: Tue Jun 4 15:40:38 2019 +0200 mlx5: Move firmware flash implementation to devlink Benefit from the devlink flash update implementation and ethtool fallback to it and move firmware flash implementation there. Signed-off-by: Jiri Pirko Acked-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 -- .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 35 ---------------------- .../ethernet/mellanox/mlx5/core/ipoib/ethtool.c | 9 ------ drivers/net/ethernet/mellanox/mlx5/core/main.c | 20 +++++++++++++ 4 files changed, 20 insertions(+), 46 deletions(-) commit a9d204a644cd9f57a71e6188b7806af0c58b24fc Author: Jiri Pirko Date: Tue Jun 4 15:40:37 2019 +0200 mlxsw: Move firmware flash implementation to devlink Benefit from the devlink flash update implementation and ethtool fallback to it and move firmware flash implementation there. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/core.c | 15 ++++++++ drivers/net/ethernet/mellanox/mlxsw/core.h | 3 ++ drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 49 ++++++++++++-------------- 3 files changed, 41 insertions(+), 26 deletions(-) commit 2cd4737bc850225de426a8dbee7a7a312a4f5304 Author: Mimi Zohar Date: Tue Apr 30 08:34:44 2019 -0400 ima: prevent a file already mmap'ed write to be mmap'ed execute The kernel calls deny_write_access() to prevent a file already opened for write from being executed and also prevents files being executed from being opened for write. For some reason this does not extend to files being mmap'ed execute. From an IMA perspective, measuring/appraising the integrity of a file being mmap'ed shared execute, without first making sure the file cannot be modified, makes no sense. This patch prevents files, in policy, already mmap'ed shared write, from being mmap'ed execute. Signed-off-by: Mimi Zohar security/integrity/ima/ima_main.c | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) commit 1d1b5490b91c932a75188e9acf76ead68d6e9741 Author: Chris Wilson Date: Tue Jun 4 16:38:30 2019 +0100 drm/i915/gtt: Replace struct_mutex serialisation for allocation Instead of relying on the caller holding struct_mutex across the allocation, push the allocation under a tree of spinlocks stored inside the page tables. Not only should this allow us to avoid struct_mutex here, but it will allow multiple users to lock independent ranges for concurrent allocations, and operate independently. This is vital for pushing the GTT manipulation into a background thread where dependency on struct_mutex is verboten, and for allowing other callers to avoid struct_mutex altogether. v2: Restore lost GEM_BUG_ON for removing too many PTE from gen6_ppgtt_clear_range. Signed-off-by: Chris Wilson Cc: Matthew Auld Cc: Mika Kuoppala Reviewed-by: Joonas Lahtinen Acked-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190604153830.19096-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 213 +++++++++++++++++++++++++----------- drivers/gpu/drm/i915/i915_gem_gtt.h | 9 +- 2 files changed, 153 insertions(+), 69 deletions(-) commit d85b2ad35a2ab320b9c0530992ee532f10a6aeb2 Author: Douglas Anderson Date: Fri May 24 16:33:09 2019 -0700 ARM: dts: rockchip: Add pin names for rk3288-veyron jaq, mickey, speedy This is like commit 0ca87bd5baa6 ("ARM: dts: rockchip: Add pin names for rk3288-veyron-jerry") and commit ca3516b32cd9 ("ARM: dts: rockchip: Add pin names for rk3288-veyron-minnie") but for 3 more veyron boards. A few notes: - While there is most certainly duplication between all the veyron boards, it still feels like it is sane to just have each board have a full list of its pin names. The format of "gpio-line-names" does not lend itself to one-off overriding and besides it seems sane to more fully match schematic names. Also note that the extra duplication here is only in source code and is unlikely to ever change (since these boards are shipped). Duplication in the .dtb files is unavoidable. - veyron-jaq and veyron-mighty are very closely related and so I have shared a single list for them both with comments on how they are different. This is just a typo fix on one of the boards, a possible missing signal on one of the boards (or perhaps I was never given the most recent schematics?) and dealing with the fact that one of the two boards has full sized SD. Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288-veyron-jaq.dts | 207 +++++++++++++++++++++++++++++ arch/arm/boot/dts/rk3288-veyron-mickey.dts | 151 +++++++++++++++++++++ arch/arm/boot/dts/rk3288-veyron-speedy.dts | 207 +++++++++++++++++++++++++++++ 3 files changed, 565 insertions(+) commit 15b3cd8ef46ad1b100e0d3c7e38774f330726820 Author: Ben Hutchings Date: Tue Jun 4 19:00:39 2019 +0100 Revert "consolemap: Fix a memory leaking bug in drivers/tty/vt/consolemap.c" This reverts commit 84ecc2f6eb1cb12e6d44818f94fa49b50f06e6ac. con_insert_unipair() is working with a sparse 3-dimensional array: - p->uni_pgdir[] is the top layer - p1 points to a middle layer - p2 points to a bottom layer If it needs to allocate a new middle layer, and then fails to allocate a new bottom layer, it would previously free only p2, and now it frees both p1 and p2. But since the new middle layer was already registered in the top layer, it was not leaked. However, if it looks up an *existing* middle layer and then fails to allocate a bottom layer, it now frees both p1 and p2 but does *not* free any other bottom layers under p1. So it *introduces* a memory leak. The error path also cleared the wrong index in p->uni_pgdir[], introducing a use-after-free. Signed-off-by: Ben Hutchings Fixes: 84ecc2f6eb1c ("consolemap: Fix a memory leaking bug in drivers/tty/vt/consolemap.c") Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/consolemap.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 712246bc93cb076c191f8a9169003f92434ad286 Author: Dinh Nguyen Date: Mon Jun 3 09:44:18 2019 -0500 net: stmmac: socfpga: add RMII phy mode Add option for enabling RMII phy mode. Reviewed-by: Florian Fainelli Signed-off-by: Wei Liang Lim Signed-off-by: Dinh Nguyen Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c | 3 +++ 1 file changed, 3 insertions(+) commit a6e5afa1bbca0e0e2e903bfcf344ff406973d798 Merge: 014da2a58fd9 93647594d8f5 Author: David S. Miller Date: Tue Jun 4 11:49:20 2019 -0700 Merge branch 'FDB-updates-for-SJA1105-DSA-driver' Vladimir Oltean says: ==================== FDB updates for SJA1105 DSA driver This patch series adds: - FDB switchdev support for the second generation of switches (P/Q/R/S). I could test/code these now that I got a board with a SJA1105Q. - Management route support for SJA1105 P/Q/R/S. This is needed to send PTP/STP/management frames over the CPU port. - Logic to hide private DSA VLANs from the 'bridge fdb' commands. The new FDB code was also tested and still works on SJA1105T. ==================== Signed-off-by: David S. Miller commit 93647594d8f5272ae43322b8e44fe8addb23719e Author: Vladimir Oltean Date: Mon Jun 3 00:16:01 2019 +0300 net: dsa: sja1105: Hide the dsa_8021q VLANs from the bridge fdb command TX VLANs and RX VLANs are an internal implementation detail of DSA for frame tagging. They work by installing special VLANs on switch ports in the operating modes where no behavior change w.r.t. VLANs can be observed by the user. Therefore it makes sense to hide these VLANs in the 'bridge fdb' command, as well as translate the pvid into the RX VID and TX VID on 'bridge fdb add' and 'bridge fdb del' commands. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller drivers/net/dsa/sja1105/sja1105_main.c | 37 ++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit 7752e937f185a24d8e33dea067726079418574e3 Author: Vladimir Oltean Date: Mon Jun 3 00:15:54 2019 +0300 net: dsa: sja1105: Unset port from forwarding mask unconditionally on fdb_del This is a cosmetic patch that simplifies the code by removing a redundant check. A logical AND-with-zero performed on a zero is still zero. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller drivers/net/dsa/sja1105/sja1105_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1da73821343c7d733de96de0a44d6d807bda98ce Author: Vladimir Oltean Date: Mon Jun 3 00:15:45 2019 +0300 net: dsa: sja1105: Add FDB operations for P/Q/R/S series This adds support for manipulating the L2 forwarding database (dump, add, delete) for the second generation of NXP SJA1105 switches. At the moment only FDB entries installed statically through 'bridge fdb' are visible in the dump callback - the dynamically learned ones are still under investigation. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller drivers/net/dsa/sja1105/sja1105.h | 5 ++ drivers/net/dsa/sja1105/sja1105_main.c | 89 +++++++++++++++++++++++++++++++++- 2 files changed, 92 insertions(+), 2 deletions(-) commit 2a7e7409298d5e0a51e7ff23dc0befc6fdef69d1 Author: Vladimir Oltean Date: Mon Jun 3 00:15:33 2019 +0300 net: dsa: sja1105: Add P/Q/R/S management route support via dynamic interface Management routes are one-shot FDB rules installed on the CPU port for sending link-local traffic. They are a prerequisite for STP, PTP etc to work. Also make a note that removing a management route was not supported on the previous generation of switches. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller drivers/net/dsa/sja1105/sja1105_dynamic_config.c | 40 +++++++++++++++++++++++- drivers/net/dsa/sja1105/sja1105_main.c | 2 ++ 2 files changed, 41 insertions(+), 1 deletion(-) commit def846042f13cb0feabb86375e824c648543700a Author: Vladimir Oltean Date: Mon Jun 3 00:11:59 2019 +0300 net: dsa: sja1105: Make dynamic_config_read return -ENOENT if not found Conceptually, if an entry is not found in the requested hardware table, it is not an invalid request - so change the error returned appropriately. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller drivers/net/dsa/sja1105/sja1105_dynamic_config.c | 2 +- drivers/net/dsa/sja1105/sja1105_main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 10c3be6526f58221cfcdd1773aa5382e3630000b Author: Vladimir Oltean Date: Mon Jun 3 00:11:58 2019 +0300 net: dsa: sja1105: Add P/Q/R/S support for dynamic L2 lookup operations These are needed in order to implement the switchdev FDB callbacks. Compared to the E/T generation, not only the ABI (bit offsets) is different, but also the introduction of the HOSTCMD field which permits O(1) TCAM search for an FDB entry. Make use of the newly introduce OP_SEARCH to permit that. It will be used while adding and deleting an FDB entry (to see whether it exists or not). Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller drivers/net/dsa/sja1105/sja1105_dynamic_config.c | 54 ++++++++++++++++++++++-- 1 file changed, 50 insertions(+), 4 deletions(-) commit 9dfa69118f12d6c67d34f90bfd9a825a908d5f60 Author: Vladimir Oltean Date: Mon Jun 3 00:11:57 2019 +0300 net: dsa: sja1105: Make room for P/Q/R/S FDB operations The DSA callbacks were written with the E/T (first generation) in mind, which is quite different. For P/Q/R/S completely new implementations need to be provided, which are held as function pointers in the priv->info structure. We are taking a slightly roundabout way for this (a function from sja1105_main.c reads a structure defined in sja1105_spi.c that points to a function defined in sja1105_main.c), but it is what it is. The FDB dump callback works for both families, hence no function pointer for that. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller drivers/net/dsa/sja1105/sja1105.h | 15 ++++++- drivers/net/dsa/sja1105/sja1105_dynamic_config.c | 2 +- drivers/net/dsa/sja1105/sja1105_main.c | 56 ++++++++++++++++++------ drivers/net/dsa/sja1105/sja1105_spi.c | 12 +++++ 4 files changed, 69 insertions(+), 16 deletions(-) commit 90c96cca351a0d0bfd24a56a516e046a23684677 Author: Vladimir Oltean Date: Mon Jun 3 00:11:56 2019 +0300 net: dsa: sja1105: Plug in support for TCAM searches via the dynamic interface Only a single dynamic configuration table of the SJA1105 P/Q/R/S supports this operation: the FDB. To keep the existing structure in place (sja1105_dynamic_config_read and sja1105_dynamic_config_write) and not introduce any new function, a convention is made for sja1105_dynamic_config_read that a negative index argument denotes a search for the entry provided as argument. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller drivers/net/dsa/sja1105/sja1105_dynamic_config.c | 36 +++++++++++++++++++++++- drivers/net/dsa/sja1105/sja1105_dynamic_config.h | 3 ++ 2 files changed, 38 insertions(+), 1 deletion(-) commit 9c5098d91dfe32ee420bedec7980197f9e6e2bce Author: Vladimir Oltean Date: Mon Jun 3 00:11:55 2019 +0300 net: dsa: sja1105: Add missing L2 Forwarding Table definitions for P/Q/R/S This appends to the L2 Forwarding and L2 Forwarding Parameters tables (originally added for first-generation switches) the bits that are new in the second generation. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller drivers/net/dsa/sja1105/sja1105_static_config.c | 18 +++++++++++++---- drivers/net/dsa/sja1105/sja1105_static_config.h | 26 +++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 4 deletions(-) commit afad12a0f0ba63f906a02902fa1d29d6d3b32491 Author: Vladimir Oltean Date: Mon Jun 3 00:11:54 2019 +0300 net: dsa: sja1105: Fix bit offsets of index field from L2 lookup entries This was inadvertently copied from the SJA1105 E/T structure and not tested. Cross-checking with the P/Q/R/S documentation (UM11040) makes it immediately obvious what the correct bit offsets for this field are. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller drivers/net/dsa/sja1105/sja1105_dynamic_config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 31b31120d7b0ceede56971f8541d46af4d148e5b Author: Vladimir Oltean Date: Mon Jun 3 00:11:53 2019 +0300 net: dsa: sja1105: Shim declaration of struct sja1105_dyn_cmd This structure is merely an implementation detail and should be hidden from the sja1105_dynamic_config.h header, which provides to the rest of the driver an abstract access to the dynamic configuration interface of the switch. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller drivers/net/dsa/sja1105/sja1105_dynamic_config.c | 8 ++++++++ drivers/net/dsa/sja1105/sja1105_dynamic_config.h | 8 +------- 2 files changed, 9 insertions(+), 7 deletions(-) commit 2c7c5d3d392d4a9e19e16f2bde76d70e0af741ed Author: Andrew Jones Date: Mon May 27 14:30:06 2019 +0200 kvm: selftests: ucall improvements Make sure we complete the I/O after determining we have a ucall, which is I/O. Also allow the *uc parameter to optionally be NULL. It's quite possible that a test case will only care about the return value, like for example when looping on a check for UCALL_DONE. Signed-off-by: Andrew Jones Reviewed-by: Peter Xu Signed-off-by: Paolo Bonzini tools/testing/selftests/kvm/dirty_log_test.c | 3 +-- tools/testing/selftests/kvm/lib/ucall.c | 19 +++++++++++++------ 2 files changed, 14 insertions(+), 8 deletions(-) commit 511a8556e3342af6a46eb9477936b29aa983f154 Author: Wanpeng Li Date: Tue May 21 14:06:54 2019 +0800 KVM: X86: Emulate MSR_IA32_MISC_ENABLE MWAIT bit MSR IA32_MISC_ENABLE bit 18, according to SDM: | When this bit is set to 0, the MONITOR feature flag is not set (CPUID.01H:ECX[bit 3] = 0). | This indicates that MONITOR/MWAIT are not supported. | | Software attempts to execute MONITOR/MWAIT will cause #UD when this bit is 0. | | When this bit is set to 1 (default), MONITOR/MWAIT are supported (CPUID.01H:ECX[bit 3] = 1). The CPUID.01H:ECX[bit 3] ought to mirror the value of the MSR bit, CPUID.01H:ECX[bit 3] is a better guard than kvm_mwait_in_guest(). kvm_mwait_in_guest() affects the behavior of MONITOR/MWAIT, not its guest visibility. This patch implements toggling of the CPUID bit based on guest writes to the MSR. Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Sean Christopherson Cc: Liran Alon Cc: Konrad Rzeszutek Wilk Signed-off-by: Wanpeng Li [Fixes for backwards compatibility - Paolo] Signed-off-by: Paolo Bonzini arch/x86/include/uapi/asm/kvm.h | 9 +++++---- arch/x86/kvm/cpuid.c | 10 ++++++++++ arch/x86/kvm/x86.c | 10 +++++++++- 3 files changed, 24 insertions(+), 5 deletions(-) commit b51700632e0e53254733ff706e5bdca22d19dbe5 Author: Wanpeng Li Date: Tue May 21 14:06:53 2019 +0800 KVM: X86: Provide a capability to disable cstate msr read intercepts Allow guest reads CORE cstate when exposing host CPU power management capabilities to the guest. PKG cstate is restricted to avoid a guest to get the whole package information in multi-tenant scenario. Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Sean Christopherson Cc: Liran Alon Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini Documentation/virtual/kvm/api.txt | 1 + arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/vmx/vmx.c | 6 ++++++ arch/x86/kvm/x86.c | 5 ++++- arch/x86/kvm/x86.h | 5 +++++ include/uapi/linux/kvm.h | 4 +++- tools/include/uapi/linux/kvm.h | 4 +++- 7 files changed, 23 insertions(+), 3 deletions(-) commit 8ffdaa7f491961efb4d02d3c8d806e9a60105adb Author: Wanpeng Li Date: Tue May 21 14:06:52 2019 +0800 KVM: Documentation: Add disable pause exits to KVM_CAP_X86_DISABLE_EXITS Commit b31c114b (KVM: X86: Provide a capability to disable PAUSE intercepts) forgot to add the KVM_X86_DISABLE_EXITS_PAUSE into api doc. This patch adds it. Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Sean Christopherson Cc: Liran Alon Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini Documentation/virtual/kvm/api.txt | 1 + 1 file changed, 1 insertion(+) commit 4d22c17c17d228b7f43e51293c7bb7dac87dea40 Author: Xiaoyao Li Date: Fri Apr 19 10:16:24 2019 +0800 kvm: x86: refine kvm_get_arch_capabilities() 1. Using X86_FEATURE_ARCH_CAPABILITIES to enumerate the existence of MSR_IA32_ARCH_CAPABILITIES to avoid using rdmsrl_safe(). 2. Since kvm_get_arch_capabilities() is only used in this file, making it static. Signed-off-by: Xiaoyao Li Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 1 - arch/x86/kvm/x86.c | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) commit f257d6dcda0187693407e0c2e5dab69bdab3223f Author: Sean Christopherson Date: Fri Apr 19 22:18:17 2019 -0700 KVM: Directly return result from kvm_arch_check_processor_compat() Add a wrapper to invoke kvm_arch_check_processor_compat() so that the boilerplate ugliness of checking virtualization support on all CPUs is hidden from the arch specific code. x86's implementation in particular is quite heinous, as it unnecessarily propagates the out-param pattern into kvm_x86_ops. While the x86 specific issue could be resolved solely by changing kvm_x86_ops, make the change for all architectures as returning a value directly is prettier and technically more robust, e.g. s390 doesn't set the out param, which could lead to subtle breakage in the (highly unlikely) scenario where the out-param was not pre-initialized by the caller. Opportunistically annotate svm_check_processor_compat() with __init. Signed-off-by: Sean Christopherson Reviewed-by: Cornelia Huck Signed-off-by: Paolo Bonzini arch/mips/kvm/mips.c | 4 ++-- arch/powerpc/kvm/powerpc.c | 4 ++-- arch/s390/include/asm/kvm_host.h | 1 - arch/s390/kvm/kvm-s390.c | 5 +++++ arch/x86/include/asm/kvm_host.h | 2 +- arch/x86/kvm/svm.c | 4 ++-- arch/x86/kvm/vmx/vmx.c | 8 ++++---- arch/x86/kvm/x86.c | 4 ++-- include/linux/kvm_host.h | 2 +- virt/kvm/arm/arm.c | 4 ++-- virt/kvm/kvm_main.c | 9 ++++++--- 11 files changed, 27 insertions(+), 20 deletions(-) commit 0532dd52dfec0cf774188d3e692d50c197bc4210 Author: Suthikulpanit, Suravee Date: Fri May 3 06:38:53 2019 -0700 kvm: svm/avic: Do not send AVIC doorbell to self AVIC doorbell is used to notify a running vCPU that interrupts has been injected into the vCPU AVIC backing page. Current logic checks only if a VCPU is running before sending a doorbell. However, the doorbell is not necessary if the destination CPU is itself. Add logic to check currently running CPU before sending doorbell. Signed-off-by: Suravee Suthikulpanit Reviewed-by: Alexander Graf Signed-off-by: Paolo Bonzini arch/x86/kvm/svm.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit b6c4bc659c6f3b7f2b6c3a330ae36f1cfd69d73e Author: Wanpeng Li Date: Mon May 20 16:18:09 2019 +0800 KVM: LAPIC: Optimize timer latency further Advance lapic timer tries to hidden the hypervisor overhead between the host emulated timer fires and the guest awares the timer is fired. However, it just hidden the time between apic_timer_fn/handle_preemption_timer -> wait_lapic_expire, instead of the real position of vmentry which is mentioned in the orignial commit d0659d946be0 ("KVM: x86: add option to advance tscdeadline hrtimer expiration"). There is 700+ cpu cycles between the end of wait_lapic_expire and before world switch on my haswell desktop. This patch tries to narrow the last gap(wait_lapic_expire -> world switch), it takes the real overhead time between apic_timer_fn/handle_preemption_timer and before world switch into consideration when adaptively tuning timer advancement. The patch can reduce 40% latency (~1600+ cycles to ~1000+ cycles on a haswell desktop) for kvm-unit-tests/tscdeadline_latency when testing busy waits. Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Sean Christopherson Cc: Liran Alon Reviewed-by: Sean Christopherson Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 3 ++- arch/x86/kvm/lapic.h | 2 +- arch/x86/kvm/svm.c | 4 ++++ arch/x86/kvm/vmx/vmx.c | 4 ++++ arch/x86/kvm/x86.c | 3 --- 5 files changed, 11 insertions(+), 5 deletions(-) commit ec0671d5684aca3326269439398e47790f1c6e7e Author: Wanpeng Li Date: Mon May 20 16:18:08 2019 +0800 KVM: LAPIC: Delay trace_kvm_wait_lapic_expire tracepoint to after vmexit wait_lapic_expire() call was moved above guest_enter_irqoff() because of its tracepoint, which violated the RCU extended quiescent state invoked by guest_enter_irqoff()[1][2]. This patch simply moves the tracepoint below guest_exit_irqoff() in vcpu_enter_guest(). Snapshot the delta before VM-Enter, but trace it after VM-Exit. This can help us to move wait_lapic_expire() just before vmentry in the later patch. [1] Commit 8b89fe1f6c43 ("kvm: x86: move tracepoints outside extended quiescent state") [2] https://patchwork.kernel.org/patch/7821111/ Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Liran Alon Suggested-by: Sean Christopherson Signed-off-by: Wanpeng Li [Track whether wait_lapic_expire was called, and do not invoke the tracepoint if not. - Paolo] Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 14 +++++++------- arch/x86/kvm/lapic.h | 1 + arch/x86/kvm/x86.c | 7 +++++++ 3 files changed, 15 insertions(+), 7 deletions(-) commit 84ea3acaa01fb90861b341038998e27a5198e1a0 Author: Wanpeng Li Date: Mon May 20 16:18:05 2019 +0800 KVM: LAPIC: Extract adaptive tune timer advancement logic Extract adaptive tune timer advancement logic to a single function. Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Sean Christopherson Cc: Liran Alon Signed-off-by: Wanpeng Li [Rename new function. - Paolo] Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 57 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 33 insertions(+), 24 deletions(-) commit 8f38302c0be2d2daf3b40f7d2142ec77e35d209e Author: Vitaly Kuznetsov Date: Tue Jun 4 18:09:39 2019 +0200 KVM/nSVM: properly map nested VMCB Commit 8c5fbf1a7231 ("KVM/nSVM: Use the new mapping API for mapping guest memory") broke nested SVM completely: kvm_vcpu_map()'s second parameter is GFN so vmcb_gpa needs to be converted with gpa_to_gfn(), not the other way around. Fixes: 8c5fbf1a7231 ("KVM/nSVM: Use the new mapping API for mapping guest memory") Signed-off-by: Vitaly Kuznetsov Reviewed-by: Sean Christopherson Signed-off-by: Paolo Bonzini arch/x86/kvm/svm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f3ecb59dd49f1742b97df6ba071aaa3d031154ac Author: Kai Huang Date: Fri May 3 03:08:53 2019 -0700 kvm: x86: Fix reserved bits related calculation errors caused by MKTME Intel MKTME repurposes several high bits of physical address as 'keyID' for memory encryption thus effectively reduces platform's maximum physical address bits. Exactly how many bits are reduced is configured by BIOS. To honor such HW behavior, the repurposed bits are reduced from cpuinfo_x86->x86_phys_bits when MKTME is detected in CPU detection. Similarly, AMD SME/SEV also reduces physical address bits for memory encryption, and cpuinfo->x86_phys_bits is reduced too when SME/SEV is detected, so for both MKTME and SME/SEV, boot_cpu_data.x86_phys_bits doesn't hold physical address bits reported by CPUID anymore. Currently KVM treats bits from boot_cpu_data.x86_phys_bits to 51 as reserved bits, but it's not true anymore for MKTME, since MKTME treats those reduced bits as 'keyID', but not reserved bits. Therefore boot_cpu_data.x86_phys_bits cannot be used to calculate reserved bits anymore, although we can still use it for AMD SME/SEV since SME/SEV treats the reduced bits differently -- they are treated as reserved bits, the same as other reserved bits in page table entity [1]. Fix by introducing a new 'shadow_phys_bits' variable in KVM x86 MMU code to store the effective physical bits w/o reserved bits -- for MKTME, it equals to physical address reported by CPUID, and for SME/SEV, it is boot_cpu_data.x86_phys_bits. Note that for the physical address bits reported to guest should remain unchanged -- KVM should report physical address reported by CPUID to guest, but not boot_cpu_data.x86_phys_bits. Because for Intel MKTME, there's no harm if guest sets up 'keyID' bits in guest page table (since MKTME only works at physical address level), and KVM doesn't even expose MKTME to guest. Arguably, for AMD SME/SEV, guest is aware of SEV thus it should adjust boot_cpu_data.x86_phys_bits when it detects SEV, therefore KVM should still reports physcial address reported by CPUID to guest. Reviewed-by: Sean Christopherson Signed-off-by: Kai Huang Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) commit 7b6f8a06e482960ba6ab06faba51c8f3727a5c7b Author: Kai Huang Date: Fri May 3 03:08:52 2019 -0700 kvm: x86: Move kvm_set_mmio_spte_mask() from x86.c to mmu.c As a prerequisite to fix several SPTE reserved bits related calculation errors caused by MKTME, which requires kvm_set_mmio_spte_mask() to use local static variable defined in mmu.c. Also move call site of kvm_set_mmio_spte_mask() from kvm_arch_init() to kvm_mmu_module_init() so that kvm_set_mmio_spte_mask() can be static. Reviewed-by: Sean Christopherson Signed-off-by: Kai Huang Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 31 +++++++++++++++++++++++++++++++ arch/x86/kvm/x86.c | 31 ------------------------------- 2 files changed, 31 insertions(+), 31 deletions(-) commit 3b295cb1a411d9c82bbfaa66bc17a8508716ed07 Author: Chris Wilson Date: Mon Jun 3 14:58:57 2019 +0100 drm: Flush output polling on shutdown We need to mark the output polling as disabled to prevent concurrent irqs from queuing new work as shutdown the probe -- causing that work to execute after we have freed the structs: <4> [341.846490] DEBUG_LOCKS_WARN_ON(mutex_is_locked(lock)) <4> [341.846497] WARNING: CPU: 3 PID: 3300 at kernel/locking/mutex-debug.c:103 mutex_destroy+0x49/0x50 <4> [341.846508] Modules linked in: i915(-) vgem thunderbolt snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic mei_hdcp x86_pkg_temp_thermal coretemp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_hda_codec snd_hwdep snd_hda_core snd_pcm mcs7830 btusb usbnet btrtl mii btbcm btintel bluetooth ecdh_generic ecc mei_me mei prime_numbers i2c_hid pinctrl_sunrisepoint pinctrl_intel [last unloaded: i915] <4> [341.846546] CPU: 3 PID: 3300 Comm: i915_module_loa Tainted: G U 5.2.0-rc2-CI-CI_DRM_6175+ #1 <4> [341.846553] Hardware name: Dell Inc. XPS 13 9360/0823VW, BIOS 2.9.0 07/09/2018 <4> [341.846560] RIP: 0010:mutex_destroy+0x49/0x50 <4> [341.846565] Code: 00 00 5b c3 e8 a8 9f 3b 00 85 c0 74 ed 8b 05 3e 55 23 01 85 c0 75 e3 48 c7 c6 00 d0 08 82 48 c7 c7 a8 aa 07 82 e8 e7 08 fa ff <0f> 0b eb cc 0f 1f 00 48 b8 11 11 11 11 11 11 11 11 48 89 76 20 48 <4> [341.846578] RSP: 0018:ffffc900006cfdb0 EFLAGS: 00010286 <4> [341.846583] RAX: 0000000000000000 RBX: ffff88826759a168 RCX: 0000000000000000 <4> [341.846589] RDX: 0000000000000002 RSI: 0000000000000000 RDI: ffffffff8112844c <4> [341.846595] RBP: ffff8882708fa548 R08: 0000000000000000 R09: 0000000000039600 <4> [341.846601] R10: 0000000000000000 R11: 0000000000000ce4 R12: ffffffffa07de1e0 <4> [341.846607] R13: 0000000000000000 R14: 0000000000000000 R15: ffffffffa07de2d0 <4> [341.846613] FS: 00007f62b5ae0e40(0000) GS:ffff888276380000(0000) knlGS:0000000000000000 <4> [341.846620] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 <4> [341.846626] CR2: 000055a4e064f4a0 CR3: 0000000266b16006 CR4: 00000000003606e0 <4> [341.846632] Call Trace: <4> [341.846639] drm_fb_helper_fini.part.17+0xb3/0x100 <4> [341.846682] intel_fbdev_fini+0x20/0x80 [i915] <4> [341.846722] intel_modeset_cleanup+0x9a/0x140 [i915] <4> [341.846750] i915_driver_unload+0xa3/0x100 [i915] <4> [341.846778] i915_pci_remove+0x19/0x30 [i915] <4> [341.846784] pci_device_remove+0x36/0xb0 <4> [341.846790] device_release_driver_internal+0xd3/0x1b0 <4> [341.846795] driver_detach+0x3f/0x80 <4> [341.846800] bus_remove_driver+0x53/0xd0 <4> [341.846805] pci_unregister_driver+0x25/0xa0 <4> [341.846843] i915_exit+0x16/0x1c [i915] <4> [341.846849] __se_sys_delete_module+0x162/0x210 <4> [341.846855] ? trace_hardirqs_off_thunk+0x1a/0x1c <4> [341.846859] ? do_syscall_64+0xd/0x1c0 <4> [341.846864] do_syscall_64+0x55/0x1c0 <4> [341.846869] entry_SYSCALL_64_after_hwframe+0x49/0xbe <4> [341.846875] RIP: 0033:0x7f62b51871b7 <4> [341.846881] Code: 73 01 c3 48 8b 0d d1 8c 2c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 b0 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d a1 8c 2c 00 f7 d8 64 89 01 48 <4> [341.846897] RSP: 002b:00007ffe7a227138 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0 <4> [341.846904] RAX: ffffffffffffffda RBX: 00007ffe7a2272b0 RCX: 00007f62b51871b7 <4> [341.846910] RDX: 0000000000000001 RSI: 0000000000000800 RDI: 0000557cd6b55948 <4> [341.846916] RBP: 0000557cd6b558e0 R08: 0000557cd6b5594c R09: 00007ffe7a227160 <4> [341.846922] R10: 00007ffe7a226134 R11: 0000000000000206 R12: 0000000000000000 <4> [341.846927] R13: 00007ffe7a227820 R14: 0000000000000000 R15: 0000000000000000 <4> [341.846936] irq event stamp: 3547847 <4> [341.846940] hardirqs last enabled at (3547847): [] _raw_spin_unlock_irqrestore+0x4c/0x60 <4> [341.846949] hardirqs last disabled at (3547846): [] _raw_spin_lock_irqsave+0xd/0x50 <4> [341.846957] softirqs last enabled at (3547376): [] __do_softirq+0x33a/0x4b9 <4> [341.846966] softirqs last disabled at (3547367): [] irq_exit+0xa9/0xc0 <4> [341.846973] WARNING: CPU: 3 PID: 3300 at kernel/locking/mutex-debug.c:103 mutex_destroy+0x49/0x50 <4> [341.846980] ---[ end trace ba94ca8952ba970e ]--- <7> [341.866547] [drm:intel_dp_detect [i915]] MST support? port A: no, sink: no, modparam: yes <7> [341.890480] [drm:drm_add_display_info] non_desktop set to 0 <7> [341.890530] [drm:drm_add_edid_modes] ELD: no CEA Extension found <7> [341.890537] [drm:drm_add_display_info] non_desktop set to 0 <7> [341.890578] [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:86:eDP-1] probed modes : <7> [341.890589] [drm:drm_mode_debug_printmodeline] Modeline "3200x1800": 60 373250 3200 3248 3280 3360 1800 1803 1808 1852 0x48 0xa <7> [341.890602] [drm:drm_mode_debug_printmodeline] Modeline "3200x1800": 48 298600 3200 3248 3280 3360 1800 1803 1808 1852 0x40 0xa <4> [341.890628] general protection fault: 0000 [#1] PREEMPT SMP PTI <4> [341.890636] CPU: 0 PID: 508 Comm: kworker/0:4 Tainted: G U W 5.2.0-rc2-CI-CI_DRM_6175+ #1 <4> [341.890646] Hardware name: Dell Inc. XPS 13 9360/0823VW, BIOS 2.9.0 07/09/2018 <4> [341.890655] Workqueue: events output_poll_execute <4> [341.890663] RIP: 0010:drm_setup_crtcs+0x13e/0xbe0 <4> [341.890669] Code: 00 41 8b 44 24 58 85 c0 0f 8e f9 01 00 00 44 8b 6c 24 20 44 8b 74 24 28 31 db 31 ed 49 8b 44 24 60 48 63 d5 44 89 ee 83 c5 01 <48> 8b 04 d0 44 89 f2 48 8b 38 48 8b 87 88 01 00 00 48 8b 40 20 e8 <4> [341.890686] RSP: 0018:ffffc9000033fd40 EFLAGS: 00010202 <4> [341.890692] RAX: 6b6b6b6b6b6b6b6b RBX: 0000000000000002 RCX: 0000000000000000 <4> [341.890700] RDX: 0000000000000001 RSI: 0000000000000c80 RDI: 00000000ffffffff <4> [341.890707] RBP: 0000000000000002 R08: 0000000000000000 R09: 0000000000000000 <4> [341.890715] R10: 0000000000000c80 R11: 0000000000000000 R12: ffff888267599fe8 <4> [341.890722] R13: 0000000000000c80 R14: 0000000000000708 R15: 0000000000000007 <4> [341.890730] FS: 0000000000000000(0000) GS:ffff888276200000(0000) knlGS:0000000000000000 <4> [341.890739] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 <4> [341.890745] CR2: 000055a4e064f4a0 CR3: 000000026d234003 CR4: 00000000003606f0 <4> [341.890752] Call Trace: <4> [341.890760] drm_fb_helper_hotplug_event.part.24+0x89/0xb0 <4> [341.890768] drm_kms_helper_hotplug_event+0x21/0x30 <4> [341.890774] output_poll_execute+0x9d/0x1a0 <4> [341.890782] process_one_work+0x245/0x610 <4> [341.890790] worker_thread+0x37/0x380 <4> [341.890796] ? process_one_work+0x610/0x610 <4> [341.890802] kthread+0x119/0x130 <4> [341.890808] ? kthread_park+0x80/0x80 <4> [341.890815] ret_from_fork+0x3a/0x50 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109964 Signed-off-by: Chris Wilson Reviewed-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20190603135910.15979-2-chris@chris-wilson.co.uk drivers/gpu/drm/drm_probe_helper.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 9fe51603d953419b8da74f455269eca8e6b84228 Author: Qian Cai Date: Mon Jun 3 16:28:35 2019 -0400 ACPI: OSL: Make a W=1 kernel-doc warning go away It appears that kernel-doc does not understand the return type *__ref, drivers/acpi/osl.c:306: warning: cannot understand function prototype: 'void __iomem *__ref acpi_os_map_iomem(acpi_physical_address phys, acpi_size size) Signed-off-by: Qian Cai [ rjw: Subject ] Signed-off-by: Rafael J. Wysocki drivers/acpi/osl.c | 4 ++-- include/acpi/acpi_io.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit be1038846b8063c448baf5ddcdc2387241c4133e Author: Mauro Carvalho Chehab Date: Tue Jun 4 11:17:47 2019 -0300 docs: soundwire: locking: fix tags for a code-block There's an ascii artwork at Example 1 whose code-block is not properly idented, causing those warnings. Documentation/driver-api/soundwire/locking.rst:50: WARNING: Inconsistent literal block quoting. Documentation/driver-api/soundwire/locking.rst:51: WARNING: Line block ends without a blank line. Documentation/driver-api/soundwire/locking.rst:55: WARNING: Inline substitution_reference start-string without end-string. Documentation/driver-api/soundwire/locking.rst:56: WARNING: Line block ends without a blank line. Signed-off-by: Mauro Carvalho Chehab Acked-by: Pierre-Louis Bossart Signed-off-by: Vinod Koul Documentation/driver-api/soundwire/locking.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 04507c0a9385cc8280f794a36bfff567c8cc1042 Author: Abhishek Goel Date: Wed May 29 04:30:33 2019 -0500 cpupower : frequency-set -r option misses the last cpu in related cpu list To set frequency on specific cpus using cpupower, following syntax can be used : cpupower -c #i frequency-set -f #f -r While setting frequency using cpupower frequency-set command, if we use '-r' option, it is expected to set frequency for all cpus related to cpu #i. But it is observed to be missing the last cpu in related cpu list. This patch fixes the problem. Signed-off-by: Abhishek Goel Reviewed-by: Thomas Renninger Signed-off-by: Shuah Khan tools/power/cpupower/utils/cpufreq-set.c | 2 ++ 1 file changed, 2 insertions(+) commit bd59ffb23b9de82d2ad3d2cd752520de245780c6 Author: Nick Black Date: Thu Apr 18 15:12:52 2019 -0400 cpupower: correct spelling of interval Fix up multiple instances of "intervall" to correct "interval" (all save one Italian instance). Signed-off-by: Nick Black Signed-off-by: Shuah Khan tools/power/cpupower/man/cpupower-monitor.1 | 2 +- tools/power/cpupower/po/cs.po | 2 +- tools/power/cpupower/po/de.po | 2 +- tools/power/cpupower/po/fr.po | 2 +- tools/power/cpupower/po/it.po | 2 +- tools/power/cpupower/po/pt.po | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) commit 6685699e4ef5e9903d5c8bc6c2e6e13b931c98e1 Author: Colin Ian King Date: Tue Jun 4 09:21:46 2019 +0100 bpf: remove redundant assignment to err The variable err is assigned with the value -EINVAL that is never read and it is re-assigned a new value later on. The assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Acked-by: Jesper Dangaard Brouer Signed-off-by: Daniel Borkmann kernel/bpf/devmap.c | 2 +- kernel/bpf/xskmap.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 2ed99339e92186cbfe1813e732996e19611216c0 Author: Colin Ian King Date: Mon Jun 3 14:36:53 2019 +0100 bpf: hbm: fix spelling mistake "notifcations" -> "notificiations" There is a spelling mistake in the help information, fix this. Signed-off-by: Colin Ian King Acked-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann samples/bpf/hbm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b0823ee35cf9bc6b9a5403c12f12bd3e0b490045 Author: Masahisa Kojima Date: Tue Jun 4 14:12:57 2019 +0900 spi: Add spi driver for Socionext SynQuacer platform This patch adds support for controller found on synquacer platforms. Signed-off-by: Masahisa Kojima Signed-off-by: Jassi Brar Reviewed-by: Ard Biesheuvel Signed-off-by: Mark Brown drivers/spi/Kconfig | 10 + drivers/spi/Makefile | 1 + drivers/spi/spi-synquacer.c | 822 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 833 insertions(+) commit 6d72a49ff3f6bb0932718c132b75351aedc9458e Author: Masahisa Kojima Date: Tue Jun 4 14:12:56 2019 +0900 spi: Add DT bindings for Synquacer This patch adds documentation for Device-Tree bindings for the Socionext Synquacer spi driver. Signed-off-by: Masahisa Kojima Signed-off-by: Jassi Brar Reviewed-by: Rob Herring Signed-off-by: Mark Brown .../devicetree/bindings/spi/spi-synquacer.txt | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 6acf0ed57b8c30f57cba1e3d4fd56e37480affc3 Author: Masahisa Kojima Date: Tue Jun 4 14:12:55 2019 +0900 MAINTAINERS: Add entry for Synquacer SPI driver Add entry for the Synquacer spi driver and DT bindings. Signed-off-by: Masahisa Kojima Signed-off-by: Jassi Brar Signed-off-by: Mark Brown MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) commit 616810360043183a9db73e39f5aadbe48952c383 Author: Anshuman Khandual Date: Mon Jun 3 12:11:23 2019 +0530 arm64/mm: Drop task_struct argument from __do_page_fault() The task_struct argument is not getting used in __do_page_fault(). Hence just drop it and use current or cuurent->mm instead where ever required. This does not change any functionality. Signed-off-by: Anshuman Khandual Cc: Will Deacon Cc: Mark Rutland Cc: James Morse Cc: Andrey Konovalov Signed-off-by: Catalin Marinas arch/arm64/mm/fault.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit a0509313d5dea0a27a5968f04bd556d05e6349fd Author: Anshuman Khandual Date: Mon Jun 3 12:11:22 2019 +0530 arm64/mm: Drop mmap_sem before calling __do_kernel_fault() There is an inconsistency between down_read_trylock() success and failure paths while dealing with kernel access for non exception table areas where it calls __do_kernel_fault(). In case of failure it just bails out without holding mmap_sem but when it succeeds it does so while holding mmap_sem. Fix this inconsistency by just dropping mmap_sem in success path as well. __do_kernel_fault() calls die_kernel_fault() which then calls show_pte(). show_pte() in this path might become bit more unreliable without holding mmap_sem. But there are already instances [1] in do_page_fault() where die_kernel_fault() gets called without holding mmap_sem. show_pte() can be made more robust independently but in a later patch. [1] Conditional block for (is_ttbr0_addr && is_el1_permission_fault) Signed-off-by: Anshuman Khandual Cc: Will Deacon Cc: Mark Rutland Cc: James Morse Cc: Andrey Konovalov Signed-off-by: Catalin Marinas arch/arm64/mm/fault.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 9b8e8b893ff52264df2b54a6820ae3c4bb820624 Author: Peter Ujfalusi Date: Tue Jun 4 14:12:49 2019 +0300 ASoC: pcm3168a: Implement set_tdm_slot callback Initially we only going to care about the slot_width as for example DSP_A/B needs 32 bclk per slots and to be able to use TDM mode the codec (and CPU) needs to use DSP_A/B modes. Signed-off-by: Peter Ujfalusi Signed-off-by: Mark Brown sound/soc/codecs/pcm3168a.c | 60 +++++++++++++++++++++++++++++++++++++++------ 1 file changed, 52 insertions(+), 8 deletions(-) commit 52194513ba1388443a067cee9606d6fe27e7650e Author: YueHaibing Date: Wed May 29 23:04:37 2019 +0800 ASoC: mediatek: Make some symbols static Fix sparse warnings: sound/soc/mediatek/common/mtk-btcvsd.c:410:5: warning: symbol 'mtk_btcvsd_write_to_bt' was not declared. Should it be static? sound/soc/mediatek/common/mtk-btcvsd.c:698:9: warning: symbol 'mtk_btcvsd_snd_read' was not declared. Should it be static? sound/soc/mediatek/common/mtk-btcvsd.c:779:9: warning: symbol 'mtk_btcvsd_snd_write' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Mark Brown sound/soc/mediatek/common/mtk-btcvsd.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 190d9e0332ab43b28cbb1856fc73ed7fafbfad7c Author: YueHaibing Date: Sat May 25 20:32:04 2019 +0800 ASoC: cx2072x: remove set but not used variable 'is_right_j ' Fixes gcc '-Wunused-but-set-variable' warning: sound/soc/codecs/cx2072x.c: In function cx2072x_config_i2spcm: sound/soc/codecs/cx2072x.c:679:6: warning: variable is_right_j set but not used [-Wunused-but-set-variable] It's never used and can be removed. Signed-off-by: YueHaibing Reviewed-by: Takashi Iwai Signed-off-by: Mark Brown sound/soc/codecs/cx2072x.c | 2 -- 1 file changed, 2 deletions(-) commit d6e65bb7ff0d360c4c5462c3d0b237f2a07e5312 Author: Shuming Fan Date: Tue May 28 12:30:17 2019 +0800 ASoC: rt1011: Add RT1011 amplifier driver This is the initial amplifier driver for rt1011. Signed-off-by: Shuming Fan Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/rt1011.txt | 32 + sound/soc/codecs/Kconfig | 6 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/rt1011.c | 2241 ++++++++++++++++++++ sound/soc/codecs/rt1011.h | 672 ++++++ 5 files changed, 2953 insertions(+) commit 18e1572419d69f8d45248cccabc40352a3e281d6 Author: Jonathan Corbet Date: Tue Jun 4 07:55:49 2019 -0600 docs: Completely fix the remote build tree case My previous fix miserably failed to catch all of the invocations of "./scripts/sphinx-pre-install", so we got build errors. Try again with more caffeine. Reported-by: kbuild test robot Signed-off-by: Jonathan Corbet Documentation/Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 01de1776f62e6437ccd207181ec503e8a56e6128 Author: Anshuman Khandual Date: Sun May 5 09:45:12 2019 +0530 arm64/mm: Identify user instruction aborts We don't currently set the FAULT_FLAG_INSTRUCTION mm flag for EL0 instruction aborts. This has no functional impact, as we don't override arch_vma_access_permitted(), and the default implementation always returns true. However, it would be helpful to provide the flag so that it can be consumed by tracepoints such as dax_pmd_fault. This patch sets the FAULT_FLAG_INSTRUCTION flag for EL0 instruction aborts. Signed-off-by: Anshuman Khandual Cc: Will Deacon Cc: Mark Rutland Signed-off-by: Catalin Marinas arch/arm64/mm/fault.c | 1 + 1 file changed, 1 insertion(+) commit 87dedf7c61ab07d7fe53bcf93103d2d845d804d8 Author: Anshuman Khandual Date: Mon May 27 12:33:29 2019 +0530 arm64/mm: Change BUG_ON() to VM_BUG_ON() in [pmd|pud]_set_huge() There are no callers for the functions which will pass unaligned physical addresses. Hence just change these BUG_ON() checks into VM_BUG_ON() which gets compiled out unless CONFIG_VM_DEBUG is enabled. Signed-off-by: Anshuman Khandual Cc: Will Deacon Cc: Mark Rutland Cc: Ard Biesheuvel Signed-off-by: Catalin Marinas arch/arm64/mm/mmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 59ec84eca57ab33107f1cd712a183ff5f9e234d8 Author: Chris Wilson Date: Tue Jun 4 13:00:22 2019 +0100 drm/i915: Use unchecked uncore writes to flush the GTT As the GTT is outside of the powerwell, we can simplify flushing the GGTT writes by using an unchecked mmio write and post. v2: s/unc/uncore/ Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20190604120022.20472-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 1c8242c3a4b2c1fc36c72c5f479058629f772b65 Author: Chris Wilson Date: Tue Jun 4 13:00:21 2019 +0100 drm/i915: Use unchecked writes for setting up the fences As the fence registers are not part of the engine powerwells, we do not need to fiddle with forcewake in order to update a fence. Avoid using the heavyweight debug checking normal mmio writes as the checking dominates the selftest runtime and is superfluous! In the process, retire the I915_WRITE() implicit macro with the new intel_uncore_write interface. v2: s/unc/uncore/ Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20190604120022.20472-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_fence_reg.c | 123 +++++++++++++++++------------- 1 file changed, 68 insertions(+), 55 deletions(-) commit 87d1372d1da3c5b3ec06c70a50811093d41c671e Author: Chris Wilson Date: Tue Jun 4 13:00:20 2019 +0100 drm/i915/selftests: Flush partial-tiling object once We only need to flush the object once prior to starting the partial tiling test as inside the test we explicitly maintain coherency. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20190604120022.20472-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) commit 2e6aee5af330e8b4ccfdfcdb3fedcb385d052d78 Author: Liu Song Date: Sat Jun 1 10:08:08 2019 +0800 arm64: kernel: use aff3 instead of aff2 in comment Should use aff3 instead of aff2 in comment. Signed-off-by: Liu Song Signed-off-by: Catalin Marinas arch/arm64/kernel/sleep.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 27e6e7d63fc2b43334ce79070a727a9ca6e58700 Author: Julien Grall Date: Thu May 30 12:30:58 2019 +0100 arm64/cpufeature: Convert hook_lock to raw_spin_lock_t in cpu_enable_ssbs() cpu_enable_ssbs() is called via stop_machine() as part of the cpu_enable callback. A spin lock is used to ensure the hook is registered before the rest of the callback is executed. On -RT spin_lock() may sleep. However, all the callees in stop_machine() are expected to not sleep. Therefore a raw_spin_lock() is required here. Given this is already done under stop_machine() and the work done under the lock is quite small, the latency should not increase too much. Signed-off-by: Julien Grall Signed-off-by: Catalin Marinas arch/arm64/kernel/cpufeature.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 10d75f5428fd866df36a846a3007bd39bba9c1cf Author: Ville Syrjälä Date: Fri May 17 22:31:32 2019 +0300 drm/i915: Fix plane state dumps Stop dumping plane->state for planes. That is the old state most of the time and dumping stale information only serves to confuse people. Instead dump the new state just for the planes included in the operation. For now we'll include only the planes for the modeset/fastset pipes in the dumps. But probably we want to dump them all eventually, just not quite sure how to present that information nicely to the user. And while at it let's dump a few more interesting bits from the state. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190517193132.8140-14-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_display.c | 84 +++++++++++++++++++----------------- 1 file changed, 45 insertions(+), 39 deletions(-) commit 926878fba5d8ea9f141e60b846336b4de1a0aaf3 Author: Ville Syrjälä Date: Fri May 17 22:31:31 2019 +0300 drm/i915: Make state dumpers take a const state Constify a bunch of the arguments of various state dumping functions. Makes it clear they don't mutate the states. And fix up some indent fails while at it. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190517193132.8140-13-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_display.c | 20 +++++++++++--------- drivers/gpu/drm/i915/intel_dpll_mgr.c | 16 ++++++++-------- drivers/gpu/drm/i915/intel_dpll_mgr.h | 2 +- 3 files changed, 20 insertions(+), 18 deletions(-) commit 2833920d0ea07f67959940547eb4e6cdccc0f9a4 Author: Ville Syrjälä Date: Fri May 17 22:31:30 2019 +0300 drm/i915: Dump failed crtc states during atomic check Currently we're only dumping the failed crtc state if intel_modeset_pipe_config() fails. Let's do the state dump if anything else fails afterwards. The downside is that we lose the immediate knowledge which crtc caused the failure (unless a lower level function indicates it with an additional debug print) but having the full state dumped seems like something that could be beneficial. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190517193132.8140-12-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_display.c | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) commit 64f6dbabf79ad99f073f3eb9d33481001100ef43 Author: Ville Syrjälä Date: Fri May 17 22:31:29 2019 +0300 drm/i915: Include crtc_state.active in crtc state dumps Currently we're not dumping out whether the crtc is actually active or in dpms off state. Let's include that in the dumps. And while at it compress out a few lines from the state dump. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190517193132.8140-11-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_display.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit a0e701041c958a6667e9bdd050f06ffb2d4de1da Author: Ville Syrjälä Date: Fri May 17 22:31:28 2019 +0300 drm/i915: Move state dump to the end of atomic_check() Currently we're dumping the crtc states before they have been fully calculated. Move the dumping to the end of .atomic_check() so we get a fully up to date dump. Let's also do the dump for fully disabled pipes, but we'll limit that to just saying that the pipe is disabled since the rest of the state is going to be nonsense in that case. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190517193132.8140-10-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_display.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit 9a86a07c7e942c25954b9f71010af9aa6cad3997 Author: Ville Syrjälä Date: Fri May 17 22:31:27 2019 +0300 drm/i915: Use intel_ types in intel_atomic_check() Switch to using intel_ types instead of drm_ types. Avoids ugly casts and nasty aliasing variables with different types. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190517193132.8140-9-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_display.c | 68 +++++++++++++++++------------------- 1 file changed, 32 insertions(+), 36 deletions(-) commit 5643dd9c7af4afc1ade0040ee9e23e34eea37973 Author: Ville Syrjälä Date: Fri May 17 22:31:26 2019 +0300 drm/i915: Use intel_ types in intel_modeset_checks() Switch to using intel_ types instead of drm_ types. Avoids ugly casts and nasty aliasing variables with different types. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190517193132.8140-8-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_display.c | 77 ++++++++++++++++++------------------ 1 file changed, 38 insertions(+), 39 deletions(-) commit f239b7998507419a46815d6df8c17bdddc04d8c3 Author: Ville Syrjälä Date: Fri May 17 22:31:25 2019 +0300 drm/i915: Don't pass the crtc to intel_modeset_pipe_config() We already pass the crtc's state to intel_modeset_pipe_config() so passing the crtc as well is redundant. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190517193132.8140-7-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_display.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1b9994c789779fb53ca60e11fb6e67dac77d08d2 Author: Ville Syrjälä Date: Fri May 17 22:31:24 2019 +0300 drm/i915: Don't pass the crtc to intel_dump_pipe_config() We already pass the crtc's state to intel_dump_pipe_config() so passing the crtc as well is redundant. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190517193132.8140-6-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_display.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) commit bca0bfa31c1baccf4a3b7987241ab2cf85596b83 Author: Ville Syrjälä Date: Fri May 17 22:31:23 2019 +0300 drm/i915: Use intel_ types in haswell_mode_set_planes_workaround() Pass around intel_atomic_state rather than drm_atomic_state. This avoids some extra casts and annoing aliasing variables. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190517193132.8140-5-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_display.c | 40 ++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 22 deletions(-) commit c3b1e6c67dd2d03ba326c7b47e72869a0624d1eb Author: Ville Syrjälä Date: Fri May 17 22:31:22 2019 +0300 drm/i915: Use intel_ types in intel_modeset_clear_plls() Pass around intel_atomic_state rather than drm_atomic_state. This avoids some extra casts and annoing aliasing variables. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190517193132.8140-4-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_display.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) commit 85829eb5ee1afc673befcf9ab8a4043e72df4ad2 Author: Ville Syrjälä Date: Fri May 17 22:31:21 2019 +0300 drm/i915: Pass intel_atomic state to check_digital_port_conflicts() Pass around intel_atomic_state rather than drm_atomic_state. This avoids some extra casts and annoing aliasing variables. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190517193132.8140-3-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_display.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 3d51b48fd16bd5b103613e94da95f87296e716f3 Author: Ville Syrjälä Date: Fri May 17 22:31:20 2019 +0300 drm/i915: Clean up cdclk vfunc assignments Thanks to using the short names for platoforms all the cdclk vfunc assignemtns now fit within 80 cols. Remove the extra line wraps. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190517193132.8140-2-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_cdclk.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit 8b67896e3ba1c0c783a970a80a0ab1677ccf8f3a Author: Ville Syrjälä Date: Fri May 17 22:31:19 2019 +0300 drm/i915: Pass intel_atomic_state to cdclk funcs Pass around intel_atomic_state rather than drm_atomic_state. This avoids some extra casts and annoing aliasing variables. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190517193132.8140-1-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/intel_cdclk.c | 167 ++++++++++++++++------------------- drivers/gpu/drm/i915/intel_display.c | 2 +- 3 files changed, 79 insertions(+), 92 deletions(-) commit 7d09888ead1d90c4950c1c92b67946a214dfb91a Author: Oleg Vasilev Date: Mon May 20 18:06:42 2019 +0300 drm/i915: add i2c symlink under hdmi connector Currently, the i2c adapter is available only under DP connectors. Add i2c symlink under hdmi connector pointing to i2c adapter in order to make this behaviour consistent. The initial motivation was to make igt i2c subtest patch [1] work on all connectors. [1]: https://patchwork.freedesktop.org/series/60357/ v2: - Moved symlink remove to unregister (Ville) - Clarified commit message (Jani) - Changed WARN to DRM_ERROR (Jani) - Minor codestyle changes proposed by Jani v3: added blank line Cc: Arkadiusz Hiler Cc: Imre Deak Cc: Ville Syrjälä Cc: Jani Nikula Signed-off-by: Oleg Vasilev Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190520150642.3477-1-oleg.vasilev@intel.com drivers/gpu/drm/i915/intel_hdmi.c | 41 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) commit 45fa7c3838715b34ccea661e4b7b261d91668b17 Author: Akash Gajjar Date: Wed May 29 00:16:58 2019 +0530 arm64: dts: rockchip: add WiFi+BT support on ROCK Pi4 board Rock Pi 4 has a on board AP6256 WiFi/BT Module. enable wifi and bluetooth support on Rock Pi 4 board. Signed-off-by: Akash Gajjar Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dts | 97 +++++++++++++++++++++++ 1 file changed, 97 insertions(+) commit c432a29d3fc9ee928caeca2f5cf68b3aebfa6817 Author: Helen Koike Date: Mon Jun 3 11:22:15 2019 -0300 arm64: dts: rockchip: fix isp iommu clocks and power domain isp iommu requires wrapper variants of the clocks. noc variants are always on and using the wrapper variants will activate {A,H}CLK_ISP{0,1} due to the hierarchy. Tested using the pending isp patch set (which is not upstream yet). Without this patch, streaming from the isp stalls. Also add the respective power domain and remove the "disabled" status. Refer: RK3399 TRM v1.4 Fig. 2-4 RK3399 Clock Architecture Diagram RK3399 TRM v1.4 Fig. 8-1 RK3399 Power Domain Partition Signed-off-by: Helen Koike Tested-by: Manivannan Sadhasivam Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9dbf05bd8ae5b436b02c9845a350dec11c788a73 Author: John Keeping Date: Mon Jun 3 15:34:35 2019 +0100 ARM: dts: rockchip: fix pwm-cells for rk3288's pwm3 This is the same as the other PWMs on this SoC and uses 3 cells. Signed-off-by: John Keeping Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 753469a23b42d0c4a2b28de35826af74a4d554ab Merge: fc20f0c1d7d4 9b6e57e5a516 Author: Heiko Carstens Date: Tue Jun 4 15:04:53 2019 +0200 Merge tag 'vfio-ccw-20190603' of https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/vfio-ccw into features various vfio-ccw fixes (ccw translation, state machine) commit fc20f0c1d7d4c67cab0788c3920aa82a48f43cfe Author: Martin Schwidefsky Date: Thu Feb 14 16:41:53 2019 +0100 s390/disassembler: update opcode table Sync with binutils and add a couple of missing instructions. Signed-off-by: Martin Schwidefsky Signed-off-by: Heiko Carstens arch/s390/kernel/dis.c | 5 ++--- arch/s390/tools/opcodes.txt | 51 ++++++++++++++++++++++++++++++++++++++------- 2 files changed, 46 insertions(+), 10 deletions(-) commit 567b722347239484d0b9ab0b42aeb24c1fe6b4e4 Author: Alexandre Ghiti Date: Thu Apr 4 02:19:56 2019 -0400 s390/mm: mmap base does not depend on ADDR_NO_RANDOMIZE personality randomize_stack_top() checks for current task flag PF_RANDOMIZE in order to use stack randomization and PF_RANDOMIZE is set when ADDR_NO_RANDOMIZE is unset, so no need to check for ADDR_NO_RANDOMIZE in stack_maxrandom_size. [heiko.carstens@de.ibm.com]: See also commit 01578e36163c ("x86/elf: Remove the unnecessary ADDR_NO_RANDOMIZE checks") Signed-off-by: Alexandre Ghiti Signed-off-by: Heiko Carstens arch/s390/mm/mmap.c | 2 -- 1 file changed, 2 deletions(-) commit 8b96d9712abcfdf6b5061610f1d187e23413eb0f Author: Enrico Weigelt, metux IT consult Date: Wed Mar 6 21:32:01 2019 +0100 s390/Kconfig: pedantic cleanups Formatting of Kconfig files doesn't look so pretty, so just take damp cloth and clean it up. Signed-off-by: Enrico Weigelt, metux IT consult Signed-off-by: Heiko Carstens arch/s390/Kconfig | 2 +- drivers/s390/block/Kconfig | 2 +- drivers/s390/char/Kconfig | 15 +++++++-------- drivers/s390/net/Kconfig | 8 ++++---- 4 files changed, 13 insertions(+), 14 deletions(-) commit dbe1c16be381cb52c80fd7b40fcd05ae538d751b Author: Masahiro Yamada Date: Fri May 31 11:46:51 2019 +0900 s390/purgatory: update .gitignore Since commit 4c0f032d4963 ("s390/purgatory: Omit use of bin2c"), kexec-purgatory.c is not generated. purgatory and purgatory.lds are generated files, so should be ignored by git. Signed-off-by: Masahiro Yamada Signed-off-by: Heiko Carstens arch/s390/purgatory/.gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 10077c9f2dae1afabab2808a0326ecf3e8e5a82c Author: Masahiro Yamada Date: Fri May 17 16:54:27 2019 +0900 s390: drop meaningless 'targets' from tools Makefile 'targets' should be specified to include .*.cmd files to evaluate if_changed or friends. Here, facility-defs.h and dis-defs.h are generated by filechk. Because filechk does not generate .*.cmd file, the 'targets' addition is meaningless. The filechk correctly updates the target when its content is changed. Signed-off-by: Masahiro Yamada Signed-off-by: Heiko Carstens arch/s390/tools/Makefile | 1 - 1 file changed, 1 deletion(-) commit c3bce92531ac4f4ed18008545d54b15f2166ddb4 Author: Masahiro Yamada Date: Fri May 17 16:54:26 2019 +0900 s390: drop redundant directory creation from tools Makefile As you can see in scripts/Kbuild.include, the filechk creates the parent directory of the target as needed. This Makefile does not need to explicitly create the directory. Signed-off-by: Masahiro Yamada Signed-off-by: Heiko Carstens arch/s390/tools/Makefile | 3 --- 1 file changed, 3 deletions(-) commit f1090b61a76f4af523418a4ff3de4324ae72ec47 Author: Masahiro Yamada Date: Fri May 17 16:54:25 2019 +0900 s390: drop unneeded -Wall addition from tools Makefile The top level Makefile adds -Wall globally for all host tools: KBUILD_HOSTCFLAGS := -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 \ I see two "-Wall" added for compiling these tools. Of course, it is allowed to pass the same option multiple times, but we do not need to do so. Signed-off-by: Masahiro Yamada Signed-off-by: Heiko Carstens arch/s390/tools/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e888f7419dff260202e586421b44cb526a600cc2 Author: Masahiro Yamada Date: Fri May 17 16:54:24 2019 +0900 s390: do not pass $(LINUXINCLUDE) to gen_opcode_table.c I guess HOSTCFLAGS_gen_opcode_table.o was blindly copied from HOSTCFLAGS_gen_facilities.o The reason of adding $(LINUXINCLUDE) to HOSTCFLAGS_gen_facilities.o is because gen_facilities.c references some CONFIG options. (Kbuild does not cater to this for host tools automatically.) On the other hand, gen_opcode_table.c does not reference CONFIG options at all. So, there is no good reason to pass $(LINUXINCLUDE). Signed-off-by: Masahiro Yamada Signed-off-by: Heiko Carstens arch/s390/tools/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 31885a8dad16a319a394d82807c3b708882b50a1 Author: xiaolinkui Date: Fri May 17 15:15:17 2019 +0800 s390/idal: use struct_size() in kmalloc() Use the new struct_size() helper to keep code simple. Signed-off-by: xiaolinkui Signed-off-by: Heiko Carstens arch/s390/include/asm/idals.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit a646ef398e72a2ac40bea974808ffcf1bea4e7f4 Author: Martin Schwidefsky Date: Fri May 17 12:50:43 2019 +0200 s390/jump_label: replace stop_machine with smp_call_function The use of stop_machine to replace the mask bits of the jump label branch is a very heavy-weight operation. This is in fact not necessary, the mask of the branch can simply be updated, followed by a signal processor to all the other CPUs to force them to pick up the modified instruction. Signed-off-by: Martin Schwidefsky [heiko.carstens@de.ibm.com]: Change jump_label_make_nop() so we get brcl 0,offset instead of brcl 0,0. This makes sure that only the mask part of the instruction gets changed when updated. Signed-off-by: Heiko Carstens arch/s390/kernel/jump_label.c | 18 +++++------------- arch/s390/mm/maccess.c | 9 +++++---- 2 files changed, 10 insertions(+), 17 deletions(-) commit 0c1f14ed12262f45a3af1d588e4d7bd12438b8f5 Author: Miles Chen Date: Wed May 29 00:08:20 2019 +0800 arm64: mm: make CONFIG_ZONE_DMA32 configurable This change makes CONFIG_ZONE_DMA32 defuly y and allows users to overwrite it only when CONFIG_EXPERT=y. For the SoCs that do not need CONFIG_ZONE_DMA32, this is the first step to manage all available memory by a single zone(normal zone) to reduce the overhead of multiple zones. The change also fixes a build error when CONFIG_NUMA=y and CONFIG_ZONE_DMA32=n. arch/arm64/mm/init.c:195:17: error: use of undeclared identifier 'ZONE_DMA32' max_zone_pfns[ZONE_DMA32] = PFN_DOWN(max_zone_dma_phys()); Change since v1: 1. only expose CONFIG_ZONE_DMA32 when CONFIG_EXPERT=y 2. remove redundant IS_ENABLED(CONFIG_ZONE_DMA32) Cc: Robin Murphy Signed-off-by: Miles Chen Signed-off-by: Catalin Marinas arch/arm64/Kconfig | 3 ++- arch/arm64/mm/init.c | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) commit f7f0097af67c3c119f6dc7046234630e77f4877e Author: Anshuman Khandual Date: Mon May 27 09:28:15 2019 +0530 arm64/mm: Simplify protection flag creation for kernel huge mappings Even though they have got the same value, PMD_TYPE_SECT and PUD_TYPE_SECT get used for kernel huge mappings. But before that first the table bit gets cleared using leaf level PTE_TABLE_BIT. Though functionally they are same, we should use page table level specific macros to be consistent as per the MMU specifications. Create page table level specific wrappers for kernel huge mapping entries and just drop mk_sect_prot() which does not have any other user. Signed-off-by: Anshuman Khandual Cc: Will Deacon Cc: Mark Rutland Signed-off-by: Catalin Marinas arch/arm64/include/asm/pgtable.h | 9 +++++++-- arch/arm64/mm/mmu.c | 8 ++------ 2 files changed, 9 insertions(+), 8 deletions(-) commit 7b8c87b297a7c1b3badabc1d054b6e0b758952df Author: Shaokun Zhang Date: Tue May 28 10:16:54 2019 +0800 arm64: cacheinfo: Update cache_line_size detected from DT or PPTT cache_line_size is derived from CTR_EL0.CWG field and is called mostly for I/O device drivers. For some platforms like the HiSilicon Kunpeng920 server SoC, cache line sizes are different between L1/2 cache and L3 cache while L1 cache line size is 64-byte and L3 is 128-byte, but CTR_EL0.CWG is misreporting using L1 cache line size. We shall correct the right value which is important for I/O performance. Let's update the cache line size if it is detected from DT or PPTT information. Cc: Will Deacon Cc: Jeremy Linton Cc: Zhenfa Qiu Reported-by: Zhenfa Qiu Suggested-by: Catalin Marinas Reviewed-by: Sudeep Holla Signed-off-by: Shaokun Zhang Signed-off-by: Catalin Marinas arch/arm64/include/asm/cache.h | 6 +----- arch/arm64/kernel/cacheinfo.c | 11 +++++++++++ 2 files changed, 12 insertions(+), 5 deletions(-) commit 9a83c84c3a491cbe7fc9dea3c43e26a8e67204d2 Author: Shaokun Zhang Date: Tue May 28 10:16:53 2019 +0800 drivers: base: cacheinfo: Add variable to record max cache line size Add coherency_max_size variable to record the maximum cache line size for different cache levels. If it is available, we will synchronize it as cache line size, otherwise we will use CTR_EL0.CWG reporting in cache_line_size() for arm64. Cc: "Rafael J. Wysocki" Cc: Jeremy Linton Cc: Will Deacon Reviewed-by: Sudeep Holla Reviewed-by: Greg Kroah-Hartman Signed-off-by: Shaokun Zhang Signed-off-by: Catalin Marinas drivers/base/cacheinfo.c | 5 +++++ include/linux/cacheinfo.h | 2 ++ 2 files changed, 7 insertions(+) commit 2fe5575f36cacaab860ed9822eb6b2ea7b6a52ba Author: Jernej Skrabec Date: Mon May 27 22:14:57 2019 +0200 dmaengine: sun6i: Add support for H6 DMA H6 DMA has more than 32 supported DRQs, which means that configuration register is slightly rearranged. It also needs additional clock to be enabled. Add support for it. Signed-off-by: Jernej Skrabec Signed-off-by: Clément Péron Acked-by: Maxime Ripard Signed-off-by: Vinod Koul drivers/dma/sun6i-dma.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit 802440bdf3b78721402f12495dffbb25522119bf Author: Jernej Skrabec Date: Mon May 27 22:14:56 2019 +0200 dmaengine: sun6i: Add a quirk for setting mode fields H6 DMA has mode fields in different position than any other currently supported DMA controller. Add a quirk for that. Signed-off-by: Jernej Skrabec Signed-off-by: Clément Péron Acked-by: Maxime Ripard Signed-off-by: Vinod Koul drivers/dma/sun6i-dma.c | 46 +++++++++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 19 deletions(-) commit 67f34055118cb6dcdfeea9e1980309afa80b2b7c Author: Jernej Skrabec Date: Mon May 27 22:14:55 2019 +0200 dmaengine: sun6i: Add a quirk for setting DRQ fields H6 DMA has more than 32 possible DRQs. That means that current maximum of 31 DRQs is not enough anymore. Add a quirk which will set source and destination DRQ number. Signed-off-by: Jernej Skrabec Signed-off-by: Clément Péron Acked-by: Maxime Ripard Signed-off-by: Vinod Koul drivers/dma/sun6i-dma.c | 48 ++++++++++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 20 deletions(-) commit 43a90fc76a3ebe0ce3315725c7f0fa832df50c8e Author: Jernej Skrabec Date: Mon May 27 22:14:54 2019 +0200 dmaengine: sun6i: Add a quirk for additional mbus clock H6 DMA controller needs additional mbus clock to be enabled. Add a quirk for it and handle it accordingly. Signed-off-by: Jernej Skrabec Signed-off-by: Clément Péron Acked-by: Maxime Ripard Signed-off-by: Vinod Koul drivers/dma/sun6i-dma.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) commit f48d14c218ccaaf7c22f84582d4bdb5fa2234c76 Author: Jernej Skrabec Date: Mon May 27 22:14:53 2019 +0200 dt-bindings: arm64: allwinner: h6: Add binding for DMA controller DMA in H6 is similar to other DMA controller, except it is first which supports more than 32 request sources and has 16 channels. It also needs additional clock to be enabled. Signed-off-by: Jernej Skrabec Reviewed-by: Rob Herring Signed-off-by: Clément Péron Acked-by: Maxime Ripard Signed-off-by: Vinod Koul Documentation/devicetree/bindings/dma/sun6i-dma.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 6dcdefcde413c1068b394eeabdfdf6a85213ebe2 Author: Julien Grall Date: Tue May 21 18:21:39 2019 +0100 arm64/fpsimd: Don't disable softirq when touching FPSIMD/SVE state When the kernel is compiled with CONFIG_KERNEL_MODE_NEON, some part of the kernel may be able to use FPSIMD/SVE. This is for instance the case for crypto code. Any use of FPSIMD/SVE in the kernel are clearly marked by using the function kernel_neon_{begin, end}. Furthermore, this can only be used when may_use_simd() returns true. The current implementation of may_use_simd() allows softirq to use FPSIMD/SVE unless it is currently in use (i.e kernel_neon_busy is true). When in use, softirqs usually fall back to a software method. At the moment, as a softirq may use FPSIMD/SVE, softirqs are disabled when touching the FPSIMD/SVE context. This has the drawback to disable all softirqs even if they are not using FPSIMD/SVE. Since a softirq is supposed to check may_use_simd() anyway before attempting to use FPSIMD/SVE, there is limited reason to keep softirq disabled when touching the FPSIMD/SVE context. Instead, we can simply disable preemption and mark the FPSIMD/SVE context as in use by setting CPU's fpsimd_context_busy flag. Two new helpers {get, put}_cpu_fpsimd_context are introduced to mark the area using FPSIMD/SVE context and they are used to replace local_bh_{disable, enable}. The functions kernel_neon_{begin, end} are also re-implemented to use the new helpers. Additionally, double-underscored versions of the helpers are provided to called when preemption is already disabled. These are only relevant on paths where irqs are disabled anyway, so they are not needed for correctness in the current code. Let's use them anyway though: this marks critical sections clearly and will help to avoid mistakes during future maintenance. The change has been benchmarked on Linux 5.1-rc4 with defconfig. On Juno2: * hackbench 100 process 1000 (10 times) * .7% quicker On ThunderX 2: * hackbench 1000 process 1000 (20 times) * 3.4% quicker Reviewed-by: Dave Martin Acked-by: Marc Zyngier Signed-off-by: Julien Grall Signed-off-by: Catalin Marinas arch/arm64/include/asm/simd.h | 10 ++-- arch/arm64/kernel/fpsimd.c | 124 ++++++++++++++++++++++++++++-------------- 2 files changed, 89 insertions(+), 45 deletions(-) commit 54b8c7cbc57c1ce21f4e35101f2609092c4af49a Author: Julien Grall Date: Tue May 21 18:21:38 2019 +0100 arm64/fpsimd: Introduce fpsimd_save_and_flush_cpu_state() and use it The only external user of fpsimd_save() and fpsimd_flush_cpu_state() is the KVM FPSIMD code. A following patch will introduce a mechanism to acquire owernship of the FPSIMD/SVE context for performing context management operations. Rather than having to export the new helpers to get/put the context, we can just introduce a new function to combine fpsimd_save() and fpsimd_flush_cpu_state(). This has also the advantage to remove any external call of fpsimd_save() and fpsimd_flush_cpu_state(), so they can be turned static. Lastly, the new function can also be used in the PM notifier. Reviewed-by: Dave Martin Acked-by: Marc Zyngier Signed-off-by: Julien Grall Signed-off-by: Catalin Marinas arch/arm64/include/asm/fpsimd.h | 4 +--- arch/arm64/kernel/fpsimd.c | 17 +++++++++++++---- arch/arm64/kvm/fpsimd.c | 4 +--- 3 files changed, 15 insertions(+), 10 deletions(-) commit 6fa9b41f6f15d79666e1fbcb7a8c122bea58d9cb Author: Julien Grall Date: Tue May 21 18:21:37 2019 +0100 arm64/fpsimd: Remove the prototype for sve_flush_cpu_state() The function sve_flush_cpu_state() has been removed in commit 21cdd7fd76e3 ("KVM: arm64: Remove eager host SVE state saving"). So remove the associated prototype in asm/fpsimd.h. Reviewed-by: Dave Martin Acked-by: Marc Zyngier Signed-off-by: Julien Grall Signed-off-by: Catalin Marinas arch/arm64/include/asm/fpsimd.h | 1 - 1 file changed, 1 deletion(-) commit dc161064beb83c668e0f85766b92b1e7ed186e58 Author: Dmitry Osipenko Date: Thu May 30 00:43:55 2019 +0300 dmaengine: tegra-apb: Error out if DMA_PREP_INTERRUPT flag is unset Apparently driver was never tested with DMA_PREP_INTERRUPT flag being unset since it completely disables interrupt handling instead of skipping the callbacks invocations, hence putting channel into unusable state. The flag is always set by all of kernel drivers that use APB DMA, so let's error out in otherwise case for consistency. It won't be difficult to support that case properly if ever will be needed. Signed-off-by: Dmitry Osipenko Acked-by: Jon Hunter Signed-off-by: Vinod Koul drivers/dma/tegra20-apb-dma.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 8343ba2d4820b1738bbb7cb40ec18ea0a3b0b331 Author: Christian Borntraeger Date: Fri May 24 12:27:01 2019 +0200 KVM: selftests: enable pgste option for the linker on s390 To avoid testcase failures we need to enable the pgstes. This can be done with /proc/sys/vm/allocate_pgste or with a linker option that creates an S390_PGSTE program header. Reviewed-by: Thomas Huth Reviewed-by: David Hildenbrand Signed-off-by: Christian Borntraeger [Fixed as outlined by kernel test robot ] tools/testing/selftests/kvm/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 49fe9a5d16386310b15abcfe47343c26c3cc05f2 Author: Thomas Huth Date: Thu May 23 18:43:09 2019 +0200 KVM: selftests: Move kvm_create_max_vcpus test to generic code There is nothing x86-specific in the test apart from the VM_MODE_P52V48_4K which we can now replace with VM_MODE_DEFAULT. Thus let's move the file to the main folder and enable it for aarch64 and s390x, too. Reviewed-by: Andrew Jones Reviewed-by: David Hildenbrand Signed-off-by: Thomas Huth Message-Id: <20190523164309.13345-10-thuth@redhat.com> Signed-off-by: Christian Borntraeger tools/testing/selftests/kvm/Makefile | 4 +++- tools/testing/selftests/kvm/{x86_64 => }/kvm_create_max_vcpus.c | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) commit ee1563f42856f756c72bb0924109432d566c9efa Author: Thomas Huth Date: Thu May 23 18:43:07 2019 +0200 KVM: selftests: Add the sync_regs test for s390x The test is an adaption of the same test for x86. Note that there are some differences in the way how s390x deals with the kvm_valid_regs in struct kvm_run, so some of the tests had to be removed. Also this test is not using the ucall() interface on s390x yet (which would need some work to be usable on s390x), so it simply drops out of the VM with a diag 0x501 breakpoint instead. Signed-off-by: Thomas Huth Message-Id: <20190523164309.13345-8-thuth@redhat.com> Signed-off-by: Christian Borntraeger MAINTAINERS | 1 + tools/testing/selftests/kvm/Makefile | 2 + tools/testing/selftests/kvm/s390x/sync_regs_test.c | 151 +++++++++++++++++++++ 3 files changed, 154 insertions(+) commit edf54478d83eb0ca4174a2c9c01682c1d01cbe7d Author: Thomas Huth Date: Thu May 23 18:43:06 2019 +0200 KVM: selftests: Add processor code for s390x Code that takes care of basic CPU setup, page table walking, etc. Signed-off-by: Thomas Huth Message-Id: <20190523164309.13345-7-thuth@redhat.com> Signed-off-by: Christian Borntraeger MAINTAINERS | 1 + tools/testing/selftests/kvm/Makefile | 1 + .../selftests/kvm/include/s390x/processor.h | 22 ++ tools/testing/selftests/kvm/lib/s390x/processor.c | 286 +++++++++++++++++++++ 4 files changed, 310 insertions(+) commit da2a2d601c2d95bedf23b896bd409d53c92c04ad Author: Thomas Huth Date: Thu May 23 18:43:05 2019 +0200 KVM: selftests: Align memory region addresses to 1M on s390x On s390x, there is a constraint that memory regions have to be aligned to 1M (or running the VM will fail). Introduce a new "alignment" variable in the vm_userspace_mem_region_add() function which now can be used for both, huge page and s390x alignment requirements. Signed-off-by: Thomas Huth Message-Id: <20190523164309.13345-6-thuth@redhat.com> Signed-off-by: Christian Borntraeger [prepare for THP as outlined by Andrew Jones] tools/testing/selftests/kvm/lib/kvm_util.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) commit fe85ec86fcd5998389274b6e12977bcf8509d3e0 Author: Thomas Huth Date: Thu May 23 18:43:04 2019 +0200 KVM: selftests: Introduce a VM_MODE_DEFAULT macro for the default bits This will be required later for tests like the kvm_create_max_vcpus test that do not use the vm_create_default() function. Reviewed-by: Andrew Jones Signed-off-by: Thomas Huth Message-Id: <20190523164309.13345-5-thuth@redhat.com> Signed-off-by: Christian Borntraeger tools/testing/selftests/kvm/include/kvm_util.h | 6 ++++++ tools/testing/selftests/kvm/lib/aarch64/processor.c | 2 +- tools/testing/selftests/kvm/lib/x86_64/processor.c | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) commit a9c788f07347cf5dfcbe4bf77bf0f3a2a04c89f1 Author: Thomas Huth Date: Thu May 23 18:43:02 2019 +0200 KVM: selftests: Guard struct kvm_vcpu_events with __KVM_HAVE_VCPU_EVENTS The struct kvm_vcpu_events code is only available on certain architectures (arm, arm64 and x86). To be able to compile kvm_util.c also for other architectures, we have to fence the code with __KVM_HAVE_VCPU_EVENTS. Reviewed-by: David Hildenbrand Reviewed-by: Andrew Jones Signed-off-by: Thomas Huth Message-Id: <20190523164309.13345-3-thuth@redhat.com> Signed-off-by: Christian Borntraeger tools/testing/selftests/kvm/include/kvm_util.h | 2 ++ tools/testing/selftests/kvm/lib/kvm_util.c | 2 ++ 2 files changed, 4 insertions(+) commit c983d805a7bb253b9015bc2c03bc8827031ce590 Author: Peng Ma Date: Wed May 22 03:21:03 2019 +0000 dmaengine: fsl-qdma: Continue to clear register on error When an error occurs we should clean the error register then to return Signed-off-by: Peng Ma [vkoul: change patch title] Signed-off-by: Vinod Koul drivers/dma/fsl-qdma.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 8f95adcf3a5aabb7a416d3c03c561acd580df213 Author: Peng Ma Date: Wed May 22 03:21:02 2019 +0000 dmaengine: fsl-qdma: fixed the source/destination descriptor format CMD of Source/Destination descriptor format should be lower of struct fsl_qdma_engine number data address. Signed-off-by: Peng Ma Signed-off-by: Vinod Koul drivers/dma/fsl-qdma.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 67ceef2a1dd0f2bfdd8501fd8e85ec307c2e7f7b Author: Uma Shankar Date: Mon Jun 3 18:38:50 2019 +0530 video/hdmi: Dropped static functions from kernel doc Dropped static functions from kernel documentation. v2: Dropped the comments altogether for static functions, as the definitions seems self explanatory. Suggested-by: Daniel Vetter Signed-off-by: Uma Shankar Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1559567330-25182-4-git-send-email-uma.shankar@intel.com drivers/video/hdmi.c | 30 ------------------------------ 1 file changed, 30 deletions(-) commit a09db883e5d938b525a86a4630fc04f98ff1063d Author: Uma Shankar Date: Tue Jun 4 16:47:02 2019 +0530 drm: Fix docbook warnings in hdr metadata helper structures Fixes the following warnings: ./include/drm/drm_mode_config.h:841: warning: Incorrect use of kernel-doc format: * hdr_output_metadata_property: Connector property containing hdr ./include/drm/drm_mode_config.h:918: warning: Function parameter or member 'hdr_output_metadata_property' not described in 'drm_mode_config' ./include/drm/drm_connector.h:1251: warning: Function parameter or member 'hdr_output_metadata' not described in 'drm_connector' ./include/drm/drm_connector.h:1251: warning: Function parameter or member 'hdr_sink_metadata' not described in 'drm_connector' Also adds some property documentation for HDR Metadata Connector Property in connector property create function. v2: Fixed Sean Paul's review comments. v3: Fixed Daniel Vetter's review comments, added the UAPI structure definition section in kernel docs. v4: Fixed Daniel Vetter's review comments. v5: Added structure member references as per Daniel's suggestion. Cc: Shashank Sharma Cc: Ville Syrjä Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Cc: Bartlomiej Zolnierkiewicz Cc: "Ville Syrjä" Cc: Hans Verkuil Cc: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org Reviewed-by: Sean Paul (v1) Signed-off-by: Uma Shankar [danvet: Fix up markup: () for functions, & for structs. Style guide also recommends to prepend struct for structures.] Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1559647022-7336-1-git-send-email-uma.shankar@intel.com drivers/gpu/drm/drm_connector.c | 40 ++++++++++++++++++++++ include/drm/drm_connector.h | 1 + include/drm/drm_mode_config.h | 4 +-- include/linux/hdmi.h | 12 +++++++ include/uapi/drm/drm_mode.h | 74 ++++++++++++++++++++++++++++++++++++++++- 5 files changed, 128 insertions(+), 3 deletions(-) commit 5c9e4d8c844a2d31b6d1a4a892c0def4e12e8a8c Author: Russell King Date: Wed Aug 31 08:49:52 2016 +0100 ARM: sa1100/neponset: convert serial to use gpiod APIs Convert the serial modem control signals to use the gpiod APIs rather than the private platform callbacks. Signed-off-by: Russell King arch/arm/mach-sa1100/neponset.c | 109 +++++++++++----------------------------- 1 file changed, 28 insertions(+), 81 deletions(-) commit cf56ffaa51a794749f2faa619eb5156a84308a18 Author: Russell King Date: Wed Aug 31 08:49:52 2016 +0100 ARM: sa1100/hackkit: remove empty serial mctrl functions Remove the empty serial modem control signal functions from hackkit as these are unnecessary - the core code can copes fine without these. Signed-off-by: Russell King arch/arm/mach-sa1100/hackkit.c | 48 ------------------------------------------ 1 file changed, 48 deletions(-) commit 88a4c748ba10a7006fc2eabb1a4ff22a705dd4b7 Author: Russell King Date: Wed Aug 31 08:49:52 2016 +0100 ARM: sa1100/badge4: remove commented out modem control initialisers Remove the commented out modem control initialisers. These are doing nothing useful. Signed-off-by: Russell King arch/arm/mach-sa1100/badge4.c | 2 -- 1 file changed, 2 deletions(-) commit 3fae166e6799fc51c8e262d9ce48452be12bf5f2 Author: Russell King Date: Wed Aug 31 08:49:52 2016 +0100 ARM: sa1100/h3xxx: convert serial to gpiod APIs Convert the iPAQ H3xxx serial modem control signals to use the gpiod APIs rather than custom callbacks into platform code. Acked-by: Linus Walleij Signed-off-by: Russell King arch/arm/mach-sa1100/h3xxx.c | 64 ++++++++------------------------------------ 1 file changed, 11 insertions(+), 53 deletions(-) commit 59f06d674f380644fb85b14a1eb7259ef291eb7b Author: Russell King Date: Wed Aug 31 08:49:52 2016 +0100 ARM: sa1100/assabet: convert serial to gpiod APIs Convert the Assabet serial modem control signals to use the gpiod APIs rather than custom callbacks into platform code. Signed-off-by: Russell King arch/arm/mach-sa1100/assabet.c | 91 +++++++++++++----------------------------- 1 file changed, 28 insertions(+), 63 deletions(-) commit 0faf70ca948a506b7fbd1a245b46b0eeae628702 Author: Russell King Date: Fri May 31 16:21:28 2019 +0100 serial: sa1100: add note about modem control signals As suggested by Uwe, add a note indicating that the modem control signals do not support interrupts, which precludes the driver from using mctrl_gpio_init(). Suggested-by: Uwe Kleine-König Signed-off-by: Russell King drivers/tty/serial/sa1100.c | 4 ++++ 1 file changed, 4 insertions(+) commit d9d03e2c90553b5e329fc8c753211ab81ad43786 Author: Russell King Date: Wed Aug 31 08:49:52 2016 +0100 serial: sa1100: add support for mctrl gpios Add support for the generic mctrl gpio helper. This will allow us to convert several board files to use the gpiod tables to assign GPIOs to serial ports, rather than needing to have private function callbacks. If the generic mctrl gpio helper fails, ignore the mctrl gpios rather than preventing the (possibly console) serial port from being created. Acked-by: Greg Kroah-Hartman Acked-by: Linus Walleij Signed-off-by: Russell King drivers/tty/serial/Kconfig | 1 + drivers/tty/serial/sa1100.c | 42 ++++++++++++++++++++++++++++++++++++++---- 2 files changed, 39 insertions(+), 4 deletions(-) commit 309aa926364dd61663869ce068344569fb63a716 Author: Uma Shankar Date: Mon Jun 3 18:38:48 2019 +0530 drm: ADD UAPI structure definition section in kernel doc Add a new section for UAPI structure and helper definitions in kernel docbook. Suggested-by: Daniel Vetter Signed-off-by: Uma Shankar Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1559567330-25182-2-git-send-email-uma.shankar@intel.com Documentation/gpu/drm-uapi.rst | 9 +++++++++ 1 file changed, 9 insertions(+) commit d81294afeecdacc8d84804ba0bcb3d39e64d0f27 Author: Noralf Trønnes Date: Fri May 31 16:01:11 2019 +0200 drm/fb-helper: Remove drm_fb_helper_crtc struct drm_fb_helper_crtc is now just a wrapper around drm_mode_set so use that directly instead and attach it as a modeset array onto drm_client_dev. drm_fb_helper will use this array to store its modesets which means it will always initialize a drm_client, but it will not register the client (callbacks) unless it's the generic fbdev emulation. Code will later be moved to drm_client, so add code there in a new file drm_client_modeset.c with MIT license to match drm_fb_helper.c. The modeset connector array size is hardcoded for the cloned case to avoid having to pass in a value from the driver. A value of 8 is chosen to err on the safe side. This means that the max connector argument for drm_fb_helper_init() and drm_fb_helper_fbdev_setup() isn't used anymore, a todo entry for this is added. In pan_display_atomic() restore_fbdev_mode_force() is used instead of restore_fbdev_mode_atomic() because that one will later become internal to drm_client_modeset. Locking order: 1. drm_fb_helper->lock 2. drm_master_internal_acquire 3. drm_client_dev->modeset_mutex v6: Improve commit message (Sam Ravnborg) v3: - Use full drm_client_init/release for the modesets (Daniel Vetter) - drm_client_for_each_modeset: use lockdep_assert_held (Daniel Vetter) - Hook up to Documentation/gpu/drm-client.rst (Daniel Vetter) v2: - Add modesets array to drm_client (Daniel Vetter) - Use a new file for the modeset code (Daniel Vetter) - File has to be MIT licensed (Emmanuel Vadot) - Add copyrights from drm_fb_helper.c Signed-off-by: Noralf Trønnes Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20190531140117.37751-3-noralf@tronnes.org Documentation/gpu/drm-client.rst | 3 + Documentation/gpu/todo.rst | 3 + drivers/gpu/drm/Makefile | 2 +- drivers/gpu/drm/drm_client.c | 10 +- drivers/gpu/drm/drm_client_modeset.c | 104 ++++++++++++ drivers/gpu/drm/drm_fb_helper.c | 299 +++++++++++++++-------------------- include/drm/drm_client.h | 30 ++++ include/drm/drm_fb_helper.h | 8 - 8 files changed, 273 insertions(+), 186 deletions(-) commit aad03a66f902e18bab612870261bde647fdbda2c Author: Gareth Williams Date: Tue May 28 12:54:27 2019 +0100 clk: renesas: r9a06g032: Add clock domain support There are several clocks on the r9a06g032 which are currently not enabled in their drivers that can be delegated to clock domain system for power management. Therefore add support for clock domain functionality to the r9a06g032 clock driver. Signed-off-by: Gareth Williams Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r9a06g032-clocks.c | 227 +++++++++++++++++++++++---------- 1 file changed, 158 insertions(+), 69 deletions(-) commit af9422a85721f7afa8d5ad3442b5de5549a23e84 Author: Gareth Williams Date: Tue May 28 12:54:26 2019 +0100 dt-bindings: clock: renesas: r9a06g032-sysctrl: Document power Domains The driver is gaining power domain support, so add the new property to the DT binding and update the examples. Signed-off-by: Gareth Williams Signed-off-by: Geert Uytterhoeven .../devicetree/bindings/clock/renesas,r9a06g032-sysctrl.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 992968d78626031a264d847e25f8f9810b9a1b50 Author: Geert Uytterhoeven Date: Mon Mar 25 13:53:35 2019 +0100 pinctrl: sh-pfc: Remove obsolete SH_PFC_PIN_NAMED*() macros Now all Renesas pin control drivers have been converted to use the new non-GPIO helper macros, SH_PFC_PIN_NAMED() and SH_PFC_PIN_NAMED_CFG() are no longer used. Remove them. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund drivers/pinctrl/sh-pfc/sh_pfc.h | 16 ---------------- 1 file changed, 16 deletions(-) commit 25491559322e435c47731fd65f0dd9fb88a0b213 Author: Geert Uytterhoeven Date: Wed Jan 16 12:19:59 2019 +0100 pinctrl: sh-pfc: sh73a0: Use new macros for non-GPIO pins Update the SH-Mobile AG5 pin control driver to use the new macros for describing pins without GPIO functionality. This replaces the use of physical pin numbers on the SH-Mobile AG5 SoC (in 34x34 BGA package) by symbolic enum values, referring to signal names. Note that the user-visible names of these pins are still based on pin numbers instead of signal names, to preserve DT backwards compatibility. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund drivers/pinctrl/sh-pfc/pfc-sh73a0.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit 7ad549ffcbd78f838441ee35fefe713b8a35daa7 Author: Geert Uytterhoeven Date: Tue Jan 15 19:59:59 2019 +0100 pinctrl: sh-pfc: r8a77990: Use new macros for non-GPIO pins Update the R-Car E3 pin control driver to use the new macros for describing pins without GPIO functionality. This replaces the use of physical pin numbers on the R-Car E3 SoC (in 25x25 FCBGA package) by symbolic enum values, referring to signal names. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund drivers/pinctrl/sh-pfc/pfc-r8a77990.c | 87 +++++++++++++++++------------------ 1 file changed, 41 insertions(+), 46 deletions(-) commit 5da89cedce5c5b9d728b334c0183211fbe2ddd0b Author: Geert Uytterhoeven Date: Tue Jan 15 14:01:27 2019 +0100 pinctrl: sh-pfc: r8a77965: Use new macros for non-GPIO pins Update the R-Car M3-N pin control driver to use the new macros for describing pins without GPIO functionality. This replaces the use of physical pin numbers on the R-Car M3-N SiP (in 39x39 BGA package) by symbolic enum values, referring to signal names. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Tested-by: Niklas Söderlund drivers/pinctrl/sh-pfc/pfc-r8a77965.c | 307 +++++++++++++++++----------------- 1 file changed, 151 insertions(+), 156 deletions(-) commit 168e18fd6cac03279ab728d78b1b2d04c8262973 Author: Geert Uytterhoeven Date: Tue Jan 15 14:00:52 2019 +0100 pinctrl: sh-pfc: r8a7796: Use new macros for non-GPIO pins Update the R-Car M3-W pin control driver to use the new macros for describing pins without GPIO functionality. This replaces the use of physical pin numbers on the R-Car M3-W SiP (in 39x39 BGA package) by symbolic enum values, referring to signal names. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Tested-by: Niklas Söderlund drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 307 +++++++++++++++++------------------ 1 file changed, 151 insertions(+), 156 deletions(-) commit 42ee6c3395465cea948a462b4605fc7fa53e3704 Author: Geert Uytterhoeven Date: Tue Jan 15 14:00:12 2019 +0100 pinctrl: sh-pfc: r8a7795: Use new macros for non-GPIO pins Update the R-Car H3 ES2.0 and later pin control driver to use the new macros for describing pins without GPIO functionality. This replaces the use of physical pin numbers on the R-Car H3 ES2.0 SiP (in 39x39 BGA package) by symbolic enum values, referring to signal names. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Tested-by: Niklas Söderlund drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 313 +++++++++++++++++------------------ 1 file changed, 154 insertions(+), 159 deletions(-) commit 4f062bcb5889722efcaf71eed280439e976a112d Author: Geert Uytterhoeven Date: Tue Jan 15 13:43:13 2019 +0100 pinctrl: sh-pfc: r8a7795-es1: Use new macros for non-GPIO pins Update the R-Car H3 ES1.x pin control driver to use the new macros for describing pins without GPIO functionality. This replaces the use of physical pin numbers on the R-Car H3 ES1.x SiP (in 39x39 BGA package) by symbolic enum values, referring to signal names. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c | 333 +++++++++++++++---------------- 1 file changed, 163 insertions(+), 170 deletions(-) commit 2404187c84201ebc2a4eeb2075c4b4ee8e496851 Author: Geert Uytterhoeven Date: Wed Jan 16 11:03:00 2019 +0100 pinctrl: sh-pfc: r8a7790: Use new macros for non-GPIO pins Update the R-Car H2 pin control driver to use the new macros for describing pins without GPIO functionality. This replaces the use of physical pin numbers on the R-Car H2 SoC (in 31x31 FCBGA package) by symbolic enum values, referring to signal names. Note that the user-visible names of these pins are still based on pin numbers instead of signal names, to preserve DT backwards compatibility. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund drivers/pinctrl/sh-pfc/pfc-r8a7790.c | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) commit 8eba07d3d95172f65ffc2eea805ae1f456d11f4f Author: Geert Uytterhoeven Date: Wed Jan 16 12:01:14 2019 +0100 pinctrl: sh-pfc: r8a7778: Use new macros for non-GPIO pins Update the R-Car M1A pin control driver to use the new macros for describing pins without GPIO functionality. This replaces the use of physical pin numbers on the R-Car M1A SoC (in 25x25 FCBGA package) by symbolic enum values, referring to signal names. Note that the user-visible names of these pins are still based on pin numbers instead of signal names, to preserve DT backwards compatibility. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund drivers/pinctrl/sh-pfc/pfc-r8a7778.c | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) commit 587a9b5dada9baff296182210ffd39bbfef4cb78 Author: Geert Uytterhoeven Date: Wed Jan 16 12:37:22 2019 +0100 pinctrl: sh-pfc: emev2: Use new macros for non-GPIO pins Update the EMMA Mobile EV2 pin control driver to use the new macros for describing pins without GPIO functionality. This replaces the use of physical pin numbers on the EMMA Mobile EV2 SoC (in 23x23 BGA package) by symbolic enum values, referring to signal names. Note that the user-visible names of these pins are still based on pin numbers instead of signal names, to preserve DT backwards compatibility. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund drivers/pinctrl/sh-pfc/pfc-emev2.c | 70 ++++++++++++++++++-------------------- 1 file changed, 34 insertions(+), 36 deletions(-) commit 4818f448986dd8d0e28b648be5f99c3f29abe6bf Author: Geert Uytterhoeven Date: Thu Mar 21 18:58:51 2019 +0100 pinctrl: sh-pfc: Add new non-GPIO helper macros Add new macros for describing pins without GPIO functionality: - NOGP_ALL() expands to a list of PIN_id values, to be used for generating symbolic enum values, - PINMUX_NOGP_ALL() expands to a list of sh_pfc_pin entries, to list all pins and their capabilities. Both macros depend on an SoC-specific CPU_ALL_NOGP() macro, to be provided by each individual SoC pin control driver. The new macros offer two advantages over the existing SH_PFC_PIN_NAMED() and SH_PFC_PIN_NAMED_CFG() macros: 1. They do not rely on PIN_NUMBER() macros and physical pin numbering, hence do not suffer from pin numbering confusion among different SoC/SiP packages. 2. They are similar in spirit to the existing scheme for handling pins with GPIO functionality. Note that internal to the driver, non-GPIO pins use a sequential numbering scheme which starts after the highest GPIO pin number in use. This value is calculated automatically, using two new helper macros, for systems with either 32-port bank (GP port style) or linear (PORT style) pin space. Sample expansion: GP_LAST = sizeof(union { char dummy[0] __attribute__((deprecated, deprecated)); char GP_0_0[(0 * 32) + 0] __attribute__((deprecated, deprecated)); char GP_0_1[(0 * 32) + 1] __attribute__((deprecated, deprecated)); ... char GP_7_3[(7 * 32) + 3] __attribute__((deprecated, deprecated)); }) Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund drivers/pinctrl/sh-pfc/sh_pfc.h | 56 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) commit 0f7ece0d1434002d853b74461e43e3a88524dfcf Author: Geert Uytterhoeven Date: Mon May 27 11:24:16 2019 +0200 clk: renesas: mstp: Remove error messages on out-of-memory conditions pm_clk_create() and pm_clk_add_clk() can fail only when running out of memory. Hence there is no need to print error messages on failure, as the memory allocation core already takes care of that. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Reviewed-by: Niklas Söderlund drivers/clk/renesas/clk-mstp.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit ed04e6288ac59a59a2e9265194a6be892f708c66 Author: Geert Uytterhoeven Date: Mon May 27 11:26:42 2019 +0200 clk: renesas: cpg-mssr: Remove error messages on out-of-memory conditions pm_clk_create() and pm_clk_add_clk() can fail only when running out of memory. Hence there is no need to print error messages on failure, as the memory allocation core already takes care of that. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Reviewed-by: Niklas Söderlund drivers/clk/renesas/renesas-cpg-mssr.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit f243220e674c61ae6434209e25c25c12cada4e4e Author: Geert Uytterhoeven Date: Mon May 27 10:55:26 2019 +0200 clk: renesas: cpg-mssr: Use genpd of_node instead of local copy Since commit 6a0ae73d95956f7e ("PM / Domain: Add support to parse domain's OPP table"), of_genpd_add_provider_simple() fills in the dev.of_node field in the generic_pm_domain structure. Hence cpg_mssr_is_pm_clk() can use that instead of its own copy in the driver-private cpg_mssr_clk_domain structure. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Reviewed-by: Niklas Söderlund drivers/clk/renesas/renesas-cpg-mssr.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 79b4df6827fe23eb7d0b4335d80c746dfda9b44a Author: Daniele Ceraolo Spurio Date: Fri May 31 15:24:09 2019 -0700 drm/i915: move more defs in intel_display_power.h Move over structures, enums and macros from intel_display.h and i915_drv.h to have all the display PM defines in the same header. Signed-off-by: Daniele Ceraolo Spurio Cc: Imre Deak Cc: Ville Syrjälä Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190531222409.9177-3-daniele.ceraolospurio@intel.com drivers/gpu/drm/i915/i915_drv.h | 110 ----------------- drivers/gpu/drm/i915/intel_display.h | 82 ------------ drivers/gpu/drm/i915/intel_display_power.h | 192 +++++++++++++++++++++++++++++ 3 files changed, 192 insertions(+), 192 deletions(-) commit 7645b19d9bdd13ef3e32ab3a040b017f9d71f911 Author: Daniele Ceraolo Spurio Date: Fri May 31 15:24:08 2019 -0700 drm/i915: extract intel_display_power.h/c from intel_runtime_pm.h/c Keep all the device-level PM management in intel_runtime_pm.h/c and move all the display specific bits into their own file. Also add the new header to Makefile.header-test. Apart from the giant code move, the only difference is with the intel_runtime__raw() functions, which are now exposed in the header. The _put() version is also not conditionally compiled anymore since it is ok to always pass the wakeref taken from the _get() to __intel_runtime_pm_put (it is -1 if tracking is disabled). Suggested-by: Chris Wilson Signed-off-by: Daniele Ceraolo Spurio Cc: Chris Wilson Cc: Imre Deak Cc: Ville Syrjälä Cc: Jani Nikula Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190531222409.9177-2-daniele.ceraolospurio@intel.com drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/intel_display_power.c | 4611 ++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_display_power.h | 96 + drivers/gpu/drm/i915/intel_runtime_pm.c | 4791 +--------------------------- drivers/gpu/drm/i915/intel_runtime_pm.h | 83 +- 7 files changed, 4811 insertions(+), 4773 deletions(-) commit 16a3c637f0742ec41bb69978e0d7b606a22a9c54 Author: Fabio Estevam Date: Mon Jun 3 20:46:28 2019 -0300 remoteproc: imx: Fix typo in "failed" There are several places where "failed" is spelled incorrectly. Fix them all. Reviewed-by: Oleksij Rempel Signed-off-by: Fabio Estevam Signed-off-by: Bjorn Andersson drivers/remoteproc/imx_rproc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 0aa25820aa2f5a7b9978696f801c092a8f40ad23 Author: Fabio Estevam Date: Mon Jun 3 20:46:27 2019 -0300 remoteproc: imx: Broaden the Kconfig selection logic Besides i.MX6SX and i.MX7D, there are other i.MX devices that contain Cortex M4 and could make use of the imx remoteproc driver, such as i.MX7ULP, i.MX8M, etc. Instead of adding new SoC entries in the Kconfig logic, make it broader by using the more generic ARCH_MXC, which encompasses all the 32-bit and 64-bit i.MX devices. Reviewed-by: Oleksij Rempel Signed-off-by: Fabio Estevam Signed-off-by: Bjorn Andersson drivers/remoteproc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4c5681fcc684c762b09435de3e82ffeee7769d21 Author: Florian Fainelli Date: Wed May 22 11:45:47 2019 -0700 cpufreq: brcmstb-avs-cpufreq: Fix types for voltage/frequency What we read back from the register is going to be capped at 32-bits, and cpufreq_freq_table.frequency is an unsigned int. Avoid any possible value truncation by using the appropriate return value. Fixes: de322e085995 ("cpufreq: brcmstb-avs-cpufreq: AVS CPUfreq driver for Broadcom STB SoCs") Signed-off-by: Florian Fainelli Acked-by: Markus Mayer Signed-off-by: Viresh Kumar drivers/cpufreq/brcmstb-avs-cpufreq.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 22a26cc6a51ef73dcfeb64c50513903f6b2d53d8 Author: Florian Fainelli Date: Wed May 22 11:45:46 2019 -0700 cpufreq: brcmstb-avs-cpufreq: Fix initial command check There is a logical error in brcm_avs_is_firmware_loaded() whereby if the firmware returns -EINVAL, we will be reporting this as an error. The comment is correct, the code was not. Fixes: de322e085995 ("cpufreq: brcmstb-avs-cpufreq: AVS CPUfreq driver for Broadcom STB SoCs") Signed-off-by: Florian Fainelli Acked-by: Markus Mayer Signed-off-by: Viresh Kumar drivers/cpufreq/brcmstb-avs-cpufreq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 014da2a58fd9ac3e48014d7c3a78c8baacd90e27 Merge: 6e36d77c83c6 47ad5931add8 Author: David S. Miller Date: Mon Jun 3 15:38:43 2019 -0700 Merge branch 'r8169-make-firmware-handling-code-ready-to-be-factored-out' Heiner Kallweit says: ==================== r8169: make firmware handling code ready to be factored out This series contains the final steps to make firmware handling code ready to be factored out into a separate source code file. ==================== Signed-off-by: David S. Miller commit 47ad5931add8732bd8659ec50b242e8a6c82ee88 Author: Heiner Kallweit Date: Mon Jun 3 21:26:31 2019 +0200 r8169: add rtl_fw_request_firmware and rtl_fw_release_firmware Add rtl_fw_request_firmware and rtl_fw_release_firmware which will be part of the API when factoring out the firmware handling code. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169.c | 58 +++++++++++++++++++++--------------- 1 file changed, 34 insertions(+), 24 deletions(-) commit 4edb00f391d3501bef95a62769faf05eb73eb406 Author: Heiner Kallweit Date: Mon Jun 3 21:25:43 2019 +0200 r8169: make rtl_fw_format_ok and rtl_fw_data_ok more independent In preparation of factoring out the firmware handling code avoid any usage of struct rtl8169_private internals. As part of it we can inline rtl_check_firmware. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169.c | 58 ++++++++++++------------------------ 1 file changed, 19 insertions(+), 39 deletions(-) commit 2956870e0ae392c45e0cad70768aecb8b846b3d9 Author: Heiner Kallweit Date: Mon Jun 3 21:24:38 2019 +0200 r8169: simplify rtl_fw_write_firmware Similar to rtl_fw_data_ok() we can simplify the code by moving incrementing the index to the for loop initialization. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) commit 0a616b327db0676bdf55df0b532406a3fd29a75a Author: Heiner Kallweit Date: Mon Jun 3 21:23:43 2019 +0200 r8169: add enum rtl_fw_opcode Replace the firmware opcode defines with a proper enum. The BUG() in rtl_fw_write_firmware() can be removed because the call to rtl_fw_data_ok() ensures all opcodes are valid. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) commit 6e36d77c83c6afbeef72becf0e879b89f15745ff Merge: b7034146756b 00ea6e5fda9d Author: David S. Miller Date: Mon Jun 3 15:32:50 2019 -0700 Merge branch 'hns3-next' Huazhong Tan says: ==================== code optimizations & bugfixes for HNS3 driver This patch-set includes code optimizations and bugfixes for the HNS3 ethernet controller driver. [patch 1/10] removes the redundant core reset type [patch 2/10 - 3/10] fixes two VLAN related issues [patch 4/10] fixes a TM issue [patch 5/10 - 10/10] includes some patches related to RAS & MSI-X error Change log: V1->V2: removes two patches which needs to change HNS's infiniband driver as well, they will be upstreamed later with the infiniband's one. ==================== Signed-off-by: David S. Miller commit 00ea6e5fda9d2be1c6af50aa4ebdeecc3149a758 Author: Weihang Li Date: Mon Jun 3 10:09:22 2019 +0800 net: hns3: delay and separate enabling of NIC and ROCE HW errors All RAS and MSI-X should be enabled just in the final stage of HNS3 initialization. It means that they should be enabled in hclge_init_xxx_client_instance instead of hclge_ae_dev(). Especially MSI-X, if it is enabled before opening vector0 IRQ, there are some chances that a MSI-X error will cause failure on initialization of NIC client instane. So this patch delays enabling of HW errors. Otherwise, we also separate enabling of ROCE RAS from NIC, because it's not reasonable to enable ROCE RAS if we even don't have a ROCE driver. Signed-off-by: Weihang Li Signed-off-by: Peng Li Signed-off-by: Huazhong tan Signed-off-by: David S. Miller .../net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c | 9 +---- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_err.h | 3 +- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 45 +++++++++++++++------- 3 files changed, 36 insertions(+), 21 deletions(-) commit 7832f0bd9fa4bd2224be2f8be854315119523df1 Author: Weihang Li Date: Mon Jun 3 10:09:21 2019 +0800 net: hns3: add opcode about query and clear RAS & MSI-X to special opcode There are four commands being used to query and clear RAS and MSI-X interrupts status. They should be contained in array of special opcodes because these commands have several descriptors, and we need to judge return value in the first descriptor rather than the last one as other opcodes. In addition, we shouldn't set the NEXT_FLAG of first descriptor. This patch fixes above issues. Signed-off-by: Weihang Li Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c | 6 +++++- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c | 16 ---------------- 2 files changed, 5 insertions(+), 17 deletions(-) commit 36701aee36f99a9a8036a4aa3dc909ba81192f52 Author: Weihang Li Date: Mon Jun 3 10:09:20 2019 +0800 net: hns3: remove setting bit of reset_requests when handling mac tunnel interrupts We shouldn't set HNAE3_NONE_RESET bit of the variable that represents a reset request during handling of MSI-X errors, or may cause issue when trigger reset. Signed-off-by: Weihang Li Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c | 1 - 1 file changed, 1 deletion(-) commit 6aa5d07d83f44e72bf6e01e539bb81316bbf0fac Author: Weihang Li Date: Mon Jun 3 10:09:19 2019 +0800 net: hns3: add handling of two bits in MAC tunnel interrupts LINK_UP and LINK_DOWN are two bits of MAC tunnel interrupts, but previous HNS3 driver didn't handle them. If they were enabled, value of these two bits will change during link down and link up, which will cause HNS3 driver keep receiving IRQ but can't handle them. This patch adds handling of these two bits of interrupts, we will record and clear them as what we do to other MAC tunnel interrupts. Signed-off-by: Weihang Li Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c | 2 +- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit 594a81b39525f0a17e92c2e0b167ae1400650380 Author: Weihang Li Date: Mon Jun 3 10:09:18 2019 +0800 net: hns3: set ops to null when unregister ad_dev The hclge/hclgevf and hns3 module can be unloaded independently, when hclge/hclgevf unloaded firstly, the ops of ae_dev should be set to NULL, otherwise it will cause an use-after-free problem. Fixes: 38caee9d3ee8 ("net: hns3: Add support of the HNAE3 framework") Signed-off-by: Weihang Li Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hnae3.c | 2 ++ 1 file changed, 2 insertions(+) commit 661262bc3e0ecc9a1aed39c6b2a99766da2c22e2 Author: Weihang Li Date: Mon Jun 3 10:09:17 2019 +0800 net: hns3: add a check to pointer in error_detected and slot_reset If we add a VF without loading hclgevf.ko and then there is a RAS error occurs, PCIe AER will call error_detected and slot_reset of all functions, and will get a NULL pointer when we check ad_dev->ops->handle_hw_ras_error. This will cause a call trace and failures on handling of follow-up RAS errors. This patch check ae_dev and ad_dev->ops at first to solve above issues. Signed-off-by: Weihang Li Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit d9ea156297b7c2db49bf3cda11043a5ce410142f Author: Yunsheng Lin Date: Mon Jun 3 10:09:16 2019 +0800 net: hns3: set the port shaper according to MAC speed This patch sets the port shaper according to the MAC speed as suggested by hardware user manual. Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b524b38ff6320f58f5d0e95640eec82fae850887 Author: Jian Shen Date: Mon Jun 3 10:09:15 2019 +0800 net: hns3: fix VLAN filter restore issue after reset In orginal codes, the driver only restore VLAN filter entries for PF after reset, the VLAN entries of VF will lose in this case. This patch fixes it by recording VLAN IDs for each function when add VLAN, and restore the VLAN IDs after reset. Fixes: 681ec3999b3d ("net: hns3: fix for vlan table lost problem when resetting") Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hnae3.h | 3 ++ drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 34 ++---------------- drivers/net/ethernet/hisilicon/hns3/hns3_enet.h | 1 - .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 42 +++++++++++++++++++--- 4 files changed, 43 insertions(+), 37 deletions(-) commit 81a9255e476e556f9d3ed1b53d85904882c29555 Author: Jian Shen Date: Mon Jun 3 10:09:14 2019 +0800 net: hns3: don't configure new VLAN ID into VF VLAN table when it's full VF VLAN table can only support no more than 256 VLANs. When user adds too many VLANs, the VF VLAN table will be full, and firmware will close the VF VLAN table for the function. When VF VLAN table is full, and user keeps adding new VLANs, it's unnecessary to configure the VF VLAN table, because it will always fail, and print warning message. The worst case is adding 4K VLANs, and doing reset, it will take much time to restore these VLANs, which may cause VF reset fail by timeout. Fixes: 6c251711b37f ("net: hns3: Disable vf vlan filter when vf vlan table is full") Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 8 ++++++++ drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h | 1 + 2 files changed, 9 insertions(+) commit 56b5866168f0b92173aadab4ac0f6d38696f7047 Author: Huazhong Tan Date: Mon Jun 3 10:09:13 2019 +0800 net: hns3: remove redundant core reset Since core reset is similar to the global reset, so this patch removes it and uses global reset to replace it. Signed-off-by: Huazhong Tan Signed-off-by: Peng Li Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hnae3.h | 1 - .../net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c | 24 +++++++++---------- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 28 ---------------------- 3 files changed, 12 insertions(+), 41 deletions(-) commit 677092c39b14f4845b72cb16faab77155d8c8f6e Author: Neil Armstrong Date: Mon May 27 15:38:55 2019 +0200 ARM: dts: meson8b: update with SPDX Licence identifier While the text specifies "of the GPL or the X11 license" the actual license text matches the MIT license as specified at [0] [0] https://spdx.org/licenses/MIT.html Signed-off-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson8b.dtsi | 42 +----------------------------------------- 1 file changed, 1 insertion(+), 41 deletions(-) commit 5a9ae235161e3dbab9ff0ce887601c475aa668c3 Author: Neil Armstrong Date: Mon May 27 15:38:54 2019 +0200 ARM: dts: meson8b-odroidc1: update with SPDX Licence identifier While the text specifies "of the GPL or the X11 license" the actual license text matches the MIT license as specified at [0] [0] https://spdx.org/licenses/MIT.html Signed-off-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson8b-odroidc1.dts | 42 +--------------------------------- 1 file changed, 1 insertion(+), 41 deletions(-) commit 47305093e21a632be14009613b438d23cb5ffb58 Author: Neil Armstrong Date: Mon May 27 15:38:53 2019 +0200 ARM: dts: meson8b-mxq: update with SPDX Licence identifier While the text specifies "of the GPL or the X11 license" the actual license text matches the MIT license as specified at [0] [0] https://spdx.org/licenses/MIT.html Signed-off-by: Neil Armstrong Acked-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson8b-mxq.dts | 42 +-------------------------------------- 1 file changed, 1 insertion(+), 41 deletions(-) commit 41e359ed7f1bba3c1dd9ae4134b45f2a15146d8a Author: Neil Armstrong Date: Mon May 27 15:38:52 2019 +0200 ARM: dts: meson8: update with SPDX Licence identifier While the text specifies "of the GPL or the X11 license" the actual license text matches the MIT license as specified at [0] [0] https://spdx.org/licenses/MIT.html Signed-off-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson8.dtsi | 42 +----------------------------------------- 1 file changed, 1 insertion(+), 41 deletions(-) commit 699b98904efcf0ae9c5f8ec0331a68458c60e10f Author: Neil Armstrong Date: Mon May 27 15:38:51 2019 +0200 ARM: dts: meson8-minix-neo-x8: update with SPDX Licence identifier While the text specifies "of the GPL or the X11 license" the actual license text matches the MIT license as specified at [0] [0] https://spdx.org/licenses/MIT.html Signed-off-by: Neil Armstrong Acked-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson8-minix-neo-x8.dts | 39 +------------------------------ 1 file changed, 1 insertion(+), 38 deletions(-) commit 68b3f115137ac4f1b045ba01e376d05d1dce7e5b Author: Neil Armstrong Date: Mon May 27 15:38:50 2019 +0200 ARM: dts: meson6: update with SPDX Licence identifier While the text specifies "of the GPL or the X11 license" the actual license text matches the MIT license as specified at [0] [0] https://spdx.org/licenses/MIT.html Signed-off-by: Neil Armstrong Acked-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson6.dtsi | 44 +------------------------------------------ 1 file changed, 1 insertion(+), 43 deletions(-) commit 504420a041773e8b012ca4b61eb006a439ce3530 Author: Neil Armstrong Date: Mon May 27 15:38:49 2019 +0200 ARM: dts: meson6-atv1200: update with SPDX Licence identifier While the text specifies "of the GPL or the X11 license" the actual license text matches the MIT license as specified at [0] [0] https://spdx.org/licenses/MIT.html Signed-off-by: Neil Armstrong Acked-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson6-atv1200.dts | 44 +----------------------------------- 1 file changed, 1 insertion(+), 43 deletions(-) commit 19bda0c5b799b67a067d902d324cf2710474af8b Author: Neil Armstrong Date: Mon May 27 15:38:48 2019 +0200 ARM: dts: meson: update with SPDX Licence identifier While the text specifies "of the GPL or the X11 license" the actual license text matches the MIT license as specified at [0] [0] https://spdx.org/licenses/MIT.html Signed-off-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson.dtsi | 44 +------------------------------------------- 1 file changed, 1 insertion(+), 43 deletions(-) commit b7034146756b9e91cc059b19df7fe4defd4d7de7 Author: Eric Dumazet Date: Sun Jun 2 11:24:18 2019 -0700 net: fix use-after-free in kfree_skb_list syzbot reported nasty use-after-free [1] Lets remove frag_list field from structs ip_fraglist_iter and ip6_fraglist_iter. This seens not needed anyway. [1] : BUG: KASAN: use-after-free in kfree_skb_list+0x5d/0x60 net/core/skbuff.c:706 Read of size 8 at addr ffff888085a3cbc0 by task syz-executor303/8947 CPU: 0 PID: 8947 Comm: syz-executor303 Not tainted 5.2.0-rc2+ #12 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x172/0x1f0 lib/dump_stack.c:113 print_address_description.cold+0x7c/0x20d mm/kasan/report.c:188 __kasan_report.cold+0x1b/0x40 mm/kasan/report.c:317 kasan_report+0x12/0x20 mm/kasan/common.c:614 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:132 kfree_skb_list+0x5d/0x60 net/core/skbuff.c:706 ip6_fragment+0x1ef4/0x2680 net/ipv6/ip6_output.c:882 __ip6_finish_output+0x577/0xaa0 net/ipv6/ip6_output.c:144 ip6_finish_output+0x38/0x1f0 net/ipv6/ip6_output.c:156 NF_HOOK_COND include/linux/netfilter.h:294 [inline] ip6_output+0x235/0x7f0 net/ipv6/ip6_output.c:179 dst_output include/net/dst.h:433 [inline] ip6_local_out+0xbb/0x1b0 net/ipv6/output_core.c:179 ip6_send_skb+0xbb/0x350 net/ipv6/ip6_output.c:1796 ip6_push_pending_frames+0xc8/0xf0 net/ipv6/ip6_output.c:1816 rawv6_push_pending_frames net/ipv6/raw.c:617 [inline] rawv6_sendmsg+0x2993/0x35e0 net/ipv6/raw.c:947 inet_sendmsg+0x141/0x5d0 net/ipv4/af_inet.c:802 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:671 ___sys_sendmsg+0x803/0x920 net/socket.c:2292 __sys_sendmsg+0x105/0x1d0 net/socket.c:2330 __do_sys_sendmsg net/socket.c:2339 [inline] __se_sys_sendmsg net/socket.c:2337 [inline] __x64_sys_sendmsg+0x78/0xb0 net/socket.c:2337 do_syscall_64+0xfd/0x680 arch/x86/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x44add9 Code: e8 7c e6 ff ff 48 83 c4 18 c3 0f 1f 80 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 1b 05 fc ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f826f33bce8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00000000006e7a18 RCX: 000000000044add9 RDX: 0000000000000000 RSI: 0000000020000240 RDI: 0000000000000005 RBP: 00000000006e7a10 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006e7a1c R13: 00007ffcec4f7ebf R14: 00007f826f33c9c0 R15: 20c49ba5e353f7cf Allocated by task 8947: save_stack+0x23/0x90 mm/kasan/common.c:71 set_track mm/kasan/common.c:79 [inline] __kasan_kmalloc mm/kasan/common.c:489 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:462 kasan_slab_alloc+0xf/0x20 mm/kasan/common.c:497 slab_post_alloc_hook mm/slab.h:437 [inline] slab_alloc_node mm/slab.c:3269 [inline] kmem_cache_alloc_node+0x131/0x710 mm/slab.c:3579 __alloc_skb+0xd5/0x5e0 net/core/skbuff.c:199 alloc_skb include/linux/skbuff.h:1058 [inline] __ip6_append_data.isra.0+0x2a24/0x3640 net/ipv6/ip6_output.c:1519 ip6_append_data+0x1e5/0x320 net/ipv6/ip6_output.c:1688 rawv6_sendmsg+0x1467/0x35e0 net/ipv6/raw.c:940 inet_sendmsg+0x141/0x5d0 net/ipv4/af_inet.c:802 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:671 ___sys_sendmsg+0x803/0x920 net/socket.c:2292 __sys_sendmsg+0x105/0x1d0 net/socket.c:2330 __do_sys_sendmsg net/socket.c:2339 [inline] __se_sys_sendmsg net/socket.c:2337 [inline] __x64_sys_sendmsg+0x78/0xb0 net/socket.c:2337 do_syscall_64+0xfd/0x680 arch/x86/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 8947: save_stack+0x23/0x90 mm/kasan/common.c:71 set_track mm/kasan/common.c:79 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:451 kasan_slab_free+0xe/0x10 mm/kasan/common.c:459 __cache_free mm/slab.c:3432 [inline] kmem_cache_free+0x86/0x260 mm/slab.c:3698 kfree_skbmem net/core/skbuff.c:625 [inline] kfree_skbmem+0xc5/0x150 net/core/skbuff.c:619 __kfree_skb net/core/skbuff.c:682 [inline] kfree_skb net/core/skbuff.c:699 [inline] kfree_skb+0xf0/0x390 net/core/skbuff.c:693 kfree_skb_list+0x44/0x60 net/core/skbuff.c:708 __dev_xmit_skb net/core/dev.c:3551 [inline] __dev_queue_xmit+0x3034/0x36b0 net/core/dev.c:3850 dev_queue_xmit+0x18/0x20 net/core/dev.c:3914 neigh_direct_output+0x16/0x20 net/core/neighbour.c:1532 neigh_output include/net/neighbour.h:511 [inline] ip6_finish_output2+0x1034/0x2550 net/ipv6/ip6_output.c:120 ip6_fragment+0x1ebb/0x2680 net/ipv6/ip6_output.c:863 __ip6_finish_output+0x577/0xaa0 net/ipv6/ip6_output.c:144 ip6_finish_output+0x38/0x1f0 net/ipv6/ip6_output.c:156 NF_HOOK_COND include/linux/netfilter.h:294 [inline] ip6_output+0x235/0x7f0 net/ipv6/ip6_output.c:179 dst_output include/net/dst.h:433 [inline] ip6_local_out+0xbb/0x1b0 net/ipv6/output_core.c:179 ip6_send_skb+0xbb/0x350 net/ipv6/ip6_output.c:1796 ip6_push_pending_frames+0xc8/0xf0 net/ipv6/ip6_output.c:1816 rawv6_push_pending_frames net/ipv6/raw.c:617 [inline] rawv6_sendmsg+0x2993/0x35e0 net/ipv6/raw.c:947 inet_sendmsg+0x141/0x5d0 net/ipv4/af_inet.c:802 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:671 ___sys_sendmsg+0x803/0x920 net/socket.c:2292 __sys_sendmsg+0x105/0x1d0 net/socket.c:2330 __do_sys_sendmsg net/socket.c:2339 [inline] __se_sys_sendmsg net/socket.c:2337 [inline] __x64_sys_sendmsg+0x78/0xb0 net/socket.c:2337 do_syscall_64+0xfd/0x680 arch/x86/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff888085a3cbc0 which belongs to the cache skbuff_head_cache of size 224 The buggy address is located 0 bytes inside of 224-byte region [ffff888085a3cbc0, ffff888085a3cca0) The buggy address belongs to the page: page:ffffea0002168f00 refcount:1 mapcount:0 mapping:ffff88821b6f63c0 index:0x0 flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea00027bbf88 ffffea0002105b88 ffff88821b6f63c0 raw: 0000000000000000 ffff888085a3c080 000000010000000c 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888085a3ca80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888085a3cb00: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc >ffff888085a3cb80: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ^ ffff888085a3cc00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888085a3cc80: fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc Fixes: 0feca6190f88 ("net: ipv6: add skbuff fraglist splitter") Fixes: c8b17be0b7a4 ("net: ipv4: add skbuff fraglist splitter") Signed-off-by: Eric Dumazet Cc: Pablo Neira Ayuso Acked-by: Pablo Neira Ayuso Signed-off-by: David S. Miller include/net/ip.h | 1 - include/net/ipv6.h | 1 - net/ipv4/ip_output.c | 5 ++--- net/ipv6/ip6_output.c | 5 ++--- net/ipv6/netfilter.c | 2 +- 5 files changed, 5 insertions(+), 9 deletions(-) commit d94f60e3dfa0ac72aaa82352652ed76cece4d9ab Author: Martin Blumenstingl Date: Fri May 24 20:19:36 2019 +0200 ARM: dts: meson8b: mxq: improve support for the TRONFY MXQ S805 The TRONFY MXQ comes with either 1GB or 2GB RAM. Both variants share (like most boards based on Amlogic reference designs): - 10/100 PHY (IC Plus IP101GR) with GPIOH_4 being the reset line and GPIOH_3 the interrupt line - SD card slot with the card detection GPIO at CARD_6 - VCCK is generated by PWM_C with a period of 1148ns and XTAL as input clock - USB OTG exposed on one of the USB-A connectors - 4-port USB hub with 3 ports exposed to the outside There seem the multiple board revision out there according to various forum posts: - storage: eMMC or NAND flash - wifi: Ampak AP6210 or Realtek 8189 Add support for the following functionality: - SoC temperature (hwmon) - changing the CPU voltage - Ethernet connectivity - SD card - USB Signed-off-by: Martin Blumenstingl Tested-by: hexdump Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson8b-mxq.dts | 139 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 139 insertions(+) commit a2928d28643e3c064ff41397281d20c445525032 Author: Heiner Kallweit Date: Sun Jun 2 10:53:49 2019 +0200 r8169: use paged versions of phylib MDIO access functions Use paged versions of phylib MDIO access functions to simplify the code. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169.c | 105 +++++++++++------------------------ 1 file changed, 33 insertions(+), 72 deletions(-) commit bd8d7d9088289ba099721e7c696d988842b6cc24 Author: YueHaibing Date: Sat Jun 1 16:06:05 2019 +0800 qed: Fix build error without CONFIG_DEVLINK Fix gcc build error while CONFIG_DEVLINK is not set drivers/net/ethernet/qlogic/qed/qed_main.o: In function `qed_remove': qed_main.c:(.text+0x1eb4): undefined reference to `devlink_unregister' Select DEVLINK to fix this. Reported-by: Hulk Robot Fixes: 24e04879abdd ("qed: Add qed devlink parameters table") Signed-off-by: YueHaibing Acked-by: Michal Kalderon  Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 5472c3c6a5f0573a609f77adce8ed1bd54233c7a Author: Eric Dumazet Date: Fri May 31 19:17:33 2019 -0700 tcp: use this_cpu_read(*X) instead of *this_cpu_ptr(X) this_cpu_read(*X) is slightly faster than *this_cpu_ptr(X) Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_ipv4.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 046386ca0c48cca1d91563db63a8eb0aff71f2b7 Author: Eric Dumazet Date: Fri May 31 19:09:02 2019 -0700 ipv4: icmp: use this_cpu_read() in icmp_sk() this_cpu_read(*X) is faster than *this_cpu_ptr(X) Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/icmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c353071ad0a2ef754fcba4153098e3cdc5ca516e Author: Eric Dumazet Date: Fri May 31 18:11:25 2019 -0700 ipv6: use this_cpu_read() in rt6_get_pcpu_route() this_cpu_read(*X) is faster than *this_cpu_ptr(X) Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/route.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 4ebcfd9a9fbc44375ef73c938b1a23dbd10fd8a2 Merge: 2789c14d198a afdede615094 Author: David S. Miller Date: Mon Jun 3 15:00:00 2019 -0700 Merge branch 'Add-MT7629-ethernet-support' Sean Wang says: ==================== Add MT7629 ethernet support MT7629 inlcudes two sets of SGMIIs used for external switch or PHY, and embedded switch (ESW) via GDM1, GePHY via GMAC2, so add several patches in the series to make the code base common with the old SoCs. The patch 1, 3 and 6, adds extension for SGMII to have the hardware configured for 1G, 2.5G and AN to fit the capability of the target PHY. In patch 6 could be an example showing how to use these configurations for underlying PHY speed to match up the link speed of the target PHY. The patch 4 is used for automatically configured the hardware path from GMACx to the target PHY by the description in deviceetree topology to determine the proper value for the corresponding MUX. The patch 2 and 5 is for the update for MT7629 including dt-binding document and its driver. ==================== Signed-off-by: David S. Miller commit afdede615094924aadbf2ba1a9ce21a2f9d78722 Author: Sean Wang Date: Sat Jun 1 08:03:15 2019 +0800 arm64: dts: mt7622: Enlarge the SGMII register range Enlarge the SGMII register range and using 2.5G force mode on default. Signed-off-by: Sean Wang Signed-off-by: David S. Miller arch/arm64/boot/dts/mediatek/mt7622.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d438e29891cbdc153aa64cdedcb6e8ae8b6a606c Author: Sean Wang Date: Sat Jun 1 08:03:14 2019 +0800 net: ethernet: mediatek: Add MT7629 ethernet support Add ethernet support to MT7629 SoC Signed-off-by: Sean Wang Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 14 ++++++++++++-- drivers/net/ethernet/mediatek/mtk_eth_soc.h | 19 +++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) commit 7093f9d80c7cb82f47628d6477fd4dc252d21a10 Author: Sean Wang Date: Sat Jun 1 08:03:13 2019 +0800 net: ethernet: mediatek: Integrate hardware path from GMAC to PHY variants All path route on various SoCs all would be managed in common function mtk_setup_hw_path that is determined by the both applied devicetree regarding the path between GMAC and the target PHY or switch by the capability of target SoC in the runtime. Signed-off-by: Sean Wang Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/Makefile | 3 +- drivers/net/ethernet/mediatek/mtk_eth_path.c | 323 +++++++++++++++++++++++++++ drivers/net/ethernet/mediatek/mtk_eth_soc.c | 70 ++---- drivers/net/ethernet/mediatek/mtk_eth_soc.h | 123 ++++++++-- 4 files changed, 450 insertions(+), 69 deletions(-) commit 9ffee4a8276c734956b8eab19d1c9b0ecb6b79c5 Author: Sean Wang Date: Sat Jun 1 08:03:12 2019 +0800 net: ethernet: mediatek: Extend SGMII related functions Add SGMII related logic into a separate file, and also provides options for forcing 1G, 2.5, AN mode for the target PHY, that can be determined from SGMII node in DTS. Signed-off-by: Sean Wang Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/Makefile | 2 +- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 75 +++++++++++--------- drivers/net/ethernet/mediatek/mtk_eth_soc.h | 39 +++++++++-- drivers/net/ethernet/mediatek/mtk_sgmii.c | 105 ++++++++++++++++++++++++++++ 4 files changed, 184 insertions(+), 37 deletions(-) commit 3277fc683ae57f15b646b500c216e380821231c8 Author: Sean Wang Date: Sat Jun 1 08:03:11 2019 +0800 dt-bindings: net: mediatek: Add support for MediaTek MT7629 SoC Add binding document for the ethernet on MT7629 SoC. Signed-off-by: Sean Wang Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/mediatek-net.txt | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit fa0e5158c26ea63e1ac45befeda4d03e02f00d44 Author: Sean Wang Date: Sat Jun 1 08:03:10 2019 +0800 dt-bindings: clock: mediatek: Add an extra required property to sgmiisys add an extra required property "mediatek,physpeed" to sgmiisys to determine link speed to match up the capability of the target PHY. Signed-off-by: Sean Wang Signed-off-by: David S. Miller Documentation/devicetree/bindings/arm/mediatek/mediatek,sgmiisys.txt | 2 ++ 1 file changed, 2 insertions(+) commit 2789c14d198a4890f4c61ac5bf7cb02a14a6f99e Author: Eric Dumazet Date: Fri May 31 15:27:00 2019 -0700 ipv6: icmp: use this_cpu_read() in icmpv6_sk() In general, this_cpu_read(*X) is faster than *this_cpu_ptr(X) Also remove the inline attibute, totally useless. Signed-off-by: Eric Dumazet Cc: Kefeng Wang Signed-off-by: David S. Miller net/ipv6/icmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fa85999f492e227b373c20db22acfa993d770e4b Author: Edward Cree Date: Fri May 31 22:47:21 2019 +0100 flow_offload: include linux/kernel.h from flow_offload.h flow_stats_update() uses max_t, so ensure we have that defined. Signed-off-by: Edward Cree Signed-off-by: David S. Miller include/net/flow_offload.h | 1 + 1 file changed, 1 insertion(+) commit 1cc26450a855aa35a6d515be14c539944d5f9648 Author: Stanislav Fomichev Date: Fri May 31 14:05:06 2019 -0700 flow_dissector: remove unused FLOW_DISSECTOR_F_STOP_AT_L3 flag This flag is not used by any caller, remove it. Signed-off-by: Stanislav Fomichev Signed-off-by: David S. Miller include/net/flow_dissector.h | 5 ++--- net/core/flow_dissector.c | 10 +--------- 2 files changed, 3 insertions(+), 12 deletions(-) commit 6c018b738a11eb6e56b20e21e362af28dc19e0a6 Merge: e2821fc86aae ca6c7df00a89 Author: David S. Miller Date: Mon Jun 3 13:42:56 2019 -0700 Merge tag 'mlx5-updates-2019-05-31' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2019-05-31 This series provides some updates to mlx5 core and netdevice driver. 1) use __netdev_tx_sent_queue() to improve performance under GSO workload 2) Allow matching only enc_key_id/enc_dst_port for decapsulation action 3) Geneve support: This patchset adds support for GENEVE tunnel encap/decap flows offload: encapsulating layer 2 Ethernet frames within layer 4 UDP datagrams. The driver supports 6081 destination UDP port number, which is the default IANA-assigned port. Encap: ConnectX-5 inserts the header (w/ or w/o Geneve TLV options) that is provided by the mlx5 driver to the outgoing packet. Decap: Geneve header is matched and the packet is decapsulated. Notes about decap flows with Geneve TLV Options: - Support offloading of 32-bit options data only - At any given time, only one combination of class/type parameters can be offloaded, but the same class/type combination can have many different flows offloaded with different 32-bit option data - Options with value of 0 can't be offloaded Managing Geneve TLV options: Matching (on receive) is done by ConnectX-5 flex parser. Geneve TLV options are managed using General Object of type “Geneve TLV Options”. When the first flow with a certain class/type values is requested to be offloaded, the driver creates a FW object with FW command (Geneve TLV Options general object) and starts counting the number of flows using this object. During this time, any request with a different class/type values will fail to be offloaded. Once the refcount reaches 0, the driver destroys the TLV options general object, and can now offload a flow with any class/type parameters. Geneve TLV Options object is added to core device. It is currently used to manage Geneve TLV options general object allocation in FW and its reference counting only. In the future it will also be used for managing geneve ports by registering callbacks for ndo_udp_tunnel_add/del. TC tunnel code refactoring: As a preparation for Geneve code, the TC tunnel code in mlx5 was rearranged in a modular way, so that it would be easier to add future tunnels: - Defined tc tunnel object with the fields and callbacks that any tunnel must implement. - Define tc UDP tunnel object for UDP tunnels, such as VXLAN - Move each tunnel code (GRE, VXLAN) to its own separate file - Rewrite tc tunnel implementation in a general way – using only the objects and their callbacks. 4) Termination tables: Actions in tables set with the termination flag are guaranteed to terminate the action list. Thus, potential looping functionality (e.g. haripin) can safely be executed without potential loops. ==================== Signed-off-by: David S. Miller commit e2821fc86aae9c44affc771bfcf09be5c54fa24e Merge: cfd10888986e 1e9c3fbad83a Author: David S. Miller Date: Mon Jun 3 13:30:38 2019 -0700 Merge branch 'ena-next' Sameeh Jubran says: ==================== Extending the ena driver to support new features and enhance performance This patchset introduces the following: * add support for changing the inline header size (max_header_size) for applications with overlay and nested headers * enable automatic fallback to polling mode for admin queue when interrupt is not available or missed * add good checksum counter for Rx ethtool statistics * update ena.txt * some minor code clean-up * some performance enhancements with doorbell calculations Differences from V1: * net: ena: add handling of llq max tx burst size (1/11): * fixed christmas tree issue * net: ena: ethtool: add extra properties retrieval via get_priv_flags (2/11): * replaced snprintf with strlcpy * dropped confusing error message * added more details to the commit message ==================== Signed-off-by: David S. Miller commit 1e9c3fbad83a70e0b00806df3f4dd2db0bc04cc4 Author: Sameeh Jubran Date: Mon Jun 3 17:43:29 2019 +0300 net: ena: use dev_info_once instead of static variable Signed-off-by: Sameeh Jubran Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_netdev.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit d2eecc6ee8c92053797513e34931334dd0e85e18 Author: Sameeh Jubran Date: Mon Jun 3 17:43:28 2019 +0300 net: ena: add good checksum counter Add a new statistics to ETHTOOL to specify if the device calculated and validated the Rx csum. Signed-off-by: Evgeny Shmeilin Signed-off-by: Sameeh Jubran Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_ethtool.c | 3 ++- drivers/net/ethernet/amazon/ena/ena_netdev.c | 3 +++ drivers/net/ethernet/amazon/ena/ena_netdev.h | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) commit d91860989dd4bce582ed6c3647a0d41d6fd895b3 Author: Sameeh Jubran Date: Mon Jun 3 17:43:27 2019 +0300 net: ena: optimise calculations for CQ doorbell This patch initially checks if CQ doorbell is needed before proceeding with the calculations. Signed-off-by: Igor Chauskin Signed-off-by: Sameeh Jubran Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_eth_com.h | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit cdf449eccc5946d5dd4145b38347874a7423c50d Author: Sameeh Jubran Date: Mon Jun 3 17:43:26 2019 +0300 net: ena: add support for changing max_header_size in LLQ mode Up until now the driver always used a single setting for the sizes of the different parts of the llq entry - 128 for entry size, 2 for descriptors before header and 96 for maximum header size. The current code makes sure that the parts of the llq entry are compatible with each other and with the initial llq entry size given by the device. This commit changes this code to support any llq entry size Signed-off-by: Arthur Kiyanovski Signed-off-by: Sameeh Jubran Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_com.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit a4e262cde3cda4491ce666e7c5270954c4d926b9 Author: Sameeh Jubran Date: Mon Jun 3 17:43:25 2019 +0300 net: ena: allow automatic fallback to polling mode Enable fallback to polling mode for Admin queue when identified a command response arrival without an accompanying MSI-X interrupt Signed-off-by: Igor Chauskin Signed-off-by: Sameeh Jubran Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_com.c | 34 +++++++++++++++++++++++-------- drivers/net/ethernet/amazon/ena/ena_com.h | 14 +++++++++++++ 2 files changed, 39 insertions(+), 9 deletions(-) commit adf671ccd2aa067cd9786d6337dfe4a3d2cc2e8f Author: Sameeh Jubran Date: Mon Jun 3 17:43:24 2019 +0300 net: ena: documentation: update ena.txt Small cosmetic changes to ena.txt Signed-off-by: Sameeh Jubran Signed-off-by: David S. Miller Documentation/networking/device_drivers/amazon/ena.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 9cb9c0de266f1ea52f01589f2f4019f163c01cd1 Author: Sameeh Jubran Date: Mon Jun 3 17:43:23 2019 +0300 net: ena: add newline at the end of pr_err prints Some pr_err prints lacked '\n' in the end. Added where missing. Signed-off-by: Arthur Kiyanovski Signed-off-by: Sameeh Jubran Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_com.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 83b9240428a66da3c8e24e719b985d533cf58067 Author: Sameeh Jubran Date: Mon Jun 3 17:43:22 2019 +0300 net: ena: arrange ena_probe() function variables in reverse christmas tree Reverse christmas tree arrangement is when strings are written from longer to shorter with each line. Most of our functions are abiding this arrangement but this function does not. In this commit we arrange the variables of ena_probe() in reverse christmas tree. Signed-off-by: Arthur Kiyanovski Signed-off-by: Sameeh Jubran Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_netdev.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit f917249833c7a00ea8be39b1bcb3ec8ef3aea45f Author: Sameeh Jubran Date: Mon Jun 3 17:43:21 2019 +0300 net: ena: replace free_tx/rx_ids union with single free_ids field in ena_ring struct ena_ring holds a union of free_rx_ids and free_tx_ids. Both of the above fields mean the exact same thing and are used exactly the same way. Furthermore, these fields are always used with a prefix of the type of ring. So for tx it will be tx_ring->free_tx_ids, and for rx it will be rx_ring->free_rx_ids, which shows how redundant the "_tx" and "_rx" parts are. Furthermore still, this may lead to confusing code like where tx_ring->free_rx_ids which works correctly but looks like a mess. This commit removes the aforementioned redundancy by replacing the free_rx/tx_ids union with a single free_ids field. It also changes a single goto label name from err_free_tx_ids: to err_tx_free_ids: for consistency with the above new notation. Signed-off-by: Arthur Kiyanovski Signed-off-by: Sameeh Jubran Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_netdev.c | 48 ++++++++++++++-------------- drivers/net/ethernet/amazon/ena/ena_netdev.h | 11 +++---- 2 files changed, 28 insertions(+), 31 deletions(-) commit 315c28d2b714f2c52c0b22f38dbf9b44f8f0c9e4 Author: Arthur Kiyanovski Date: Mon Jun 3 17:43:20 2019 +0300 net: ena: ethtool: add extra properties retrieval via get_priv_flags This commit adds a mechanism for exposing different device properties via ethtool's priv_flags. The strings are provided by the device and copied to user space through the driver. In this commit we: Add commands, structs and defines necessary for handling extra properties Add functions for: Allocation/destruction of a buffer for extra properties strings. Retreival of extra properties strings and flags from the network device. Handle the allocation of a buffer for extra properties strings. * Initialize buffer with extra properties strings from the network device at driver startup. Use ethtool's get_priv_flags to expose extra properties of the ENA device Signed-off-by: Arthur Kiyanovski Signed-off-by: Sameeh Jubran Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_admin_defs.h | 16 +++++ drivers/net/ethernet/amazon/ena/ena_com.c | 56 ++++++++++++++++++ drivers/net/ethernet/amazon/ena/ena_com.h | 32 ++++++++++ drivers/net/ethernet/amazon/ena/ena_ethtool.c | 75 ++++++++++++++++++++---- drivers/net/ethernet/amazon/ena/ena_netdev.c | 14 +++++ drivers/net/ethernet/amazon/ena/ena_netdev.h | 2 + 6 files changed, 184 insertions(+), 11 deletions(-) commit 05d62ca218f8425c70389d0416c15bd0d455b416 Author: Sameeh Jubran Date: Mon Jun 3 17:43:19 2019 +0300 net: ena: add handling of llq max tx burst size There is a maximum TX burst size that the ENA device can handle. It is exposed by the device to the driver and the driver needs to comply with it to avoid bugs. In this commit we: 1. Add ena_com_is_doorbell_needed(), which calculates the number of llq entries that will be used to hold a packet, and will return true if they exceed the number of allowed entries in a burst. If the function returns true, a doorbell needs to be invoked to send this packet in the next burst. 2. Follow the available entries in the current burst: - Every doorbell a new burst begins - With each write of an llq entry, the available entries in the current burst are decreased by 1. Signed-off-by: Arthur Kiyanovski Signed-off-by: Sameeh Jubran Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_admin_defs.h | 5 +++ drivers/net/ethernet/amazon/ena/ena_com.c | 7 ++++ drivers/net/ethernet/amazon/ena/ena_com.h | 2 + drivers/net/ethernet/amazon/ena/ena_eth_com.c | 28 +++++-------- drivers/net/ethernet/amazon/ena/ena_eth_com.h | 53 ++++++++++++++++++++++++ drivers/net/ethernet/amazon/ena/ena_netdev.c | 7 ++++ 6 files changed, 85 insertions(+), 17 deletions(-) commit 4d3aed70902f299ff2ed7048ef44f0d4d573d786 Author: Daniel Rosenberg Date: Wed May 29 17:49:06 2019 -0700 f2fs: Add option to limit required GC for checkpoint=disable This extends the checkpoint option to allow checkpoint=disable:%u[%] This allows you to specify what how much of the disk you are willing to lose access to while mounting with checkpoint=disable. If the amount lost would be higher, the mount will return -EAGAIN. This can be given as a percent of total space, or in blocks. Currently, we need to run garbage collection until the amount of holes is smaller than the OVP space. With the new option, f2fs can mark space as unusable up front instead of requiring garbage collection until the number of holes is small enough. Signed-off-by: Daniel Rosenberg Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim Documentation/ABI/testing/sysfs-fs-f2fs | 8 +++++ Documentation/filesystems/f2fs.txt | 19 ++++++++++- fs/f2fs/f2fs.h | 6 +++- fs/f2fs/segment.c | 17 ++++++++-- fs/f2fs/super.c | 59 +++++++++++++++++++++------------ fs/f2fs/sysfs.c | 16 +++++++++ 6 files changed, 99 insertions(+), 26 deletions(-) commit a4c3ecaaadac5693f555cfef1c9eecf4c39df818 Author: Daniel Rosenberg Date: Wed May 29 17:49:05 2019 -0700 f2fs: Fix accounting for unusable blocks Fixes possible underflows when dealing with unusable blocks. Signed-off-by: Daniel Rosenberg Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 9a9aecaad92d4fba0e2682ca6897d3a5aeabf123 Author: Daniel Rosenberg Date: Wed May 29 17:49:04 2019 -0700 f2fs: Fix root reserved on remount On a remount, you can currently set root reserved if it was not previously set. This can cause an underflow if reserved has been set to a very high value, since then root reserved + current reserved could be greater than user_block_count. inc_valid_block_count later subtracts out these values from user_block_count, causing an underflow. Signed-off-by: Daniel Rosenberg Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/super.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ae4ad7ea09d32ff1b6fb908ff12f8c1bd5241b29 Author: Daniel Rosenberg Date: Wed May 29 17:49:03 2019 -0700 f2fs: Lower threshold for disable_cp_again The existing threshold for allowable holes at checkpoint=disable time is too high. The OVP space contains reserved segments, which are always in the form of free segments. These must be subtracted from the OVP value. The current threshold is meant to be the maximum value of holes of a single type we can have and still guarantee that we can fill the disk without failing to find space for a block of a given type. If the disk is full, ignoring current reserved, which only helps us, the amount of unused blocks is equal to the OVP area. Of that, there are reserved segments, which must be free segments, and the rest of the ovp area, which can come from either free segments or holes. The maximum possible amount of holes is OVP-reserved. Now, consider the disk when mounting with checkpoint=disable. We must be able to fill all available free space with either data or node blocks. When we start with checkpoint=disable, holes are locked to their current type. Say we have H of one type of hole, and H+X of the other. We can fill H of that space with arbitrary typed blocks via SSR. For the remaining H+X blocks, we may not have any of a given block type left at all. For instance, if we were to fill the disk entirely with blocks of the type with fewer holes, the H+X blocks of the opposite type would not be used. If H+X > OVP-reserved, there would be more holes than could possibly exist, and we would have failed to find a suitable block earlier on, leading to a crash in update_sit_entry. If H+X <= OVP-reserved, then the holes end up effectively masked by the OVP region in this case. Signed-off-by: Daniel Rosenberg Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 3559c3270aa3b8ac9afa3eac25f0c4e5bfb701b4 Author: Suzuki K Poulose Date: Mon Jun 3 16:49:28 2019 +0100 drivers: ipmi: Drop device reference Drop the reference to a device found via bus_find_device() Cc: Corey Minyard Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Signed-off-by: Suzuki K Poulose Message-Id: <1559577023-558-3-git-send-email-suzuki.poulose@arm.com> [Moved the put_device() to after the platform_device_unregister(), for better style.] Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_si_platform.c | 1 + 1 file changed, 1 insertion(+) commit 9f532d26c75cee9b195e960a6208258ecdc1ee51 Author: Krzysztof Kozlowski Date: Mon Apr 29 19:36:20 2019 +0200 ARM: exynos_defconfig: Trim and reorganize with savedefconfig Trim and reorganize the defconfig with savedefconfig on latest linux-next. The ARCH_EXYNOS3 is removed because it become the default. Signed-off-by: Krzysztof Kozlowski arch/arm/configs/exynos_defconfig | 62 +++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 35 deletions(-) commit 091c12e1f50cce93b1af90e56cad88787ec86dfb Author: Ranjani Sridharan Date: Mon Jun 3 11:18:20 2019 -0500 ASoC: SOF: debug: add new debugfs entries for IPC flood test Add a couple of new debugfs entries "ipc_flood_count" and "ipc_flood_duration_ms" that can be used to execute the IPC flood test. "ipc_flood_count" floods the DSP with the number of test IPCs specified and ipc_flood_duration_ms floods the DSP with test IPC's for the duration(in ms) specified. The test stats such as average, min and max IPC response times are logged in the dmesg and saved in the debugfs entry cache buffer. Signed-off-by: Ranjani Sridharan Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/sof/Kconfig | 8 ++ sound/soc/sof/debug.c | 243 +++++++++++++++++++++++++++++++++++++++++++++++ sound/soc/sof/sof-priv.h | 6 +- 3 files changed, 256 insertions(+), 1 deletion(-) commit 53b22d25ec36cebc2f5888a0bd5fba84b05f3dee Author: Ranjani Sridharan Date: Mon Jun 3 11:18:19 2019 -0500 ASoC: SOF: ipc: Introduce SOF_IPC_GLB_TEST_MSG IPC command Add a new class of IPC command along with the first test type, IPC_FLOOD, which will be used for flooding the DSP with IPCs. Signed-off-by: Ranjani Sridharan Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown include/sound/sof/header.h | 6 +++++- sound/soc/sof/ipc.c | 9 +++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) commit e3adc9495ab26fc4bfe29253d4e7aad47dab2307 Author: Bard liao Date: Mon Jun 3 11:18:17 2019 -0500 ASoC: SOF: send time stamp to FW for alignment Timer will be reset when DSP is powered down. So the time stamp of trace log will be reset after resume. Send time stamp to FW can align the time stamp and avoid reset time stamp in trace log. Signed-off-by: Bard liao Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown include/sound/sof/header.h | 1 + include/sound/sof/trace.h | 10 ++++++++++ include/uapi/sound/sof/abi.h | 2 +- sound/soc/sof/trace.c | 16 +++++++++++++--- 4 files changed, 25 insertions(+), 4 deletions(-) commit a529819d8876fd469f58e630ed015c4a4620ee75 Merge: 663580695611 14104eb6a351 Author: Mark Brown Date: Mon Jun 3 18:38:15 2019 +0100 Merge branch 'asoc-5.2' into asoc-5.3 commit cfd10888986e75758d2ab2e0f473b884e37e3abb Author: Rasmus Villemoes Date: Mon Jun 3 08:04:09 2019 +0000 net: dsa: mv88e6xxx: make mv88e6xxx_g1_stats_wait static mv88e6xxx_g1_stats_wait has no users outside global1.c, so make it static. Signed-off-by: Rasmus Villemoes Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/global1.c | 2 +- drivers/net/dsa/mv88e6xxx/global1.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) commit 989f405aba0265d4d8ed25cb4dc22bc77158d585 Author: Rasmus Villemoes Date: Mon Jun 3 07:52:46 2019 +0000 net: dsa: mv88e6xxx: fix comments and macro names in mv88e6390_g1_mgmt_rsvd2cpu The macros have an extraneous '800' (after 0180C2 there should be just six nibbles, with X representing one), while the comments have interchanged c2 and 80 and an extra :00. Signed-off-by: Rasmus Villemoes Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/global1.c | 16 ++++++++-------- drivers/net/dsa/mv88e6xxx/global1.h | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) commit 663580695611b9c3837cdf596de2194234f0fbd5 Author: Jaska Uimonen Date: Mon Jun 3 11:18:21 2019 -0500 ASoC: SOF: topology: add support for mux/demux component Add enumerations to support mux/demux processing component. Signed-off-by: Jaska Uimonen Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown include/sound/sof/topology.h | 3 +++ sound/soc/sof/topology.c | 2 ++ 2 files changed, 5 insertions(+) commit 3594bfa265da38dcfbab2312ddaff39711b98857 Author: Jorge Ramirez-Ortiz Date: Fri May 31 16:46:36 2019 +0200 spi: qup: remove unnecessary goto Remove unnecessary condition check and associated goto. Signed-off-by: Jorge Ramirez-Ortiz Signed-off-by: Mark Brown drivers/spi/spi-qup.c | 4 ---- 1 file changed, 4 deletions(-) commit 5cbb1515e75c0b8d328ddce0f5e4ff636334373c Author: Linus Walleij Date: Sat Jun 1 01:08:51 2019 +0200 regulator: bd718x7: Drop unused include This driver does not use any symbols from so just drop the include. Cc: Matti Vaittinen Signed-off-by: Linus Walleij Acked-By: Matti Vaittinen Signed-off-by: Mark Brown drivers/regulator/bd718x7-regulator.c | 1 - 1 file changed, 1 deletion(-) commit 532e9334eb38de50d75b6a0e94832ee9d9975743 Author: Linus Walleij Date: Sat Jun 1 01:06:08 2019 +0200 regulator: bd70528: Drop unused include This driver does not use any symbols from so just drop the include. Cc: Matti Vaittinen Signed-off-by: Linus Walleij Acked-By: Matti Vaittinen Signed-off-by: Mark Brown drivers/regulator/bd70528-regulator.c | 1 - 1 file changed, 1 deletion(-) commit 60b909e413dab4d131a6629dce1fb2177d3cc918 Author: Linus Walleij Date: Sat Jun 1 01:02:52 2019 +0200 regulator: arizona-micsupp: Delete unused include This driver uses no symbols from so just drop this include. Signed-off-by: Linus Walleij Acked-by: Charles Keepax Signed-off-by: Mark Brown drivers/regulator/arizona-micsupp.c | 1 - 1 file changed, 1 deletion(-) commit f7b0bc5eafa44941ddf92df6f46dd82cbfacec3e Author: Nick Crews Date: Thu May 23 17:06:24 2019 -0600 platform/chrome: wilco_ec: Add event handling The Wilco Embedded Controller can create custom events that are not handled as standard ACPI objects. These events can contain information about changes in EC controlled features, such as errors and events in the dock or display. For example, an event is triggered if the dock is plugged into a display incorrectly. These events are needed for telemetry and diagnostics reasons, and for possibly alerting the user. These events are triggered by the EC with an ACPI Notify(0x90), and then the BIOS reads the event buffer from EC RAM via an ACPI method. When the OS receives these events via ACPI, it passes them along to this driver. The events are put into a queue which can be read by a userspace daemon via a char device that implements read() and poll(). The event queue acts as a circular buffer of size 64, so if there are no userspace consumers the kernel will not run out of memory. The char device will appear at /dev/wilco_event{n}, where n is some small non-negative integer, starting from 0. Standard ACPI events such as the battery getting plugged/unplugged can also come through this path, but they are dealt with via other paths, and are ignored here. To test, you can tail the binary data with $ cat /dev/wilco_event0 | hexdump -ve '1/1 "%x\n"' and then create an event by plugging/unplugging the battery. Signed-off-by: Nick Crews Signed-off-by: Enric Balletbo i Serra drivers/platform/chrome/wilco_ec/Kconfig | 9 + drivers/platform/chrome/wilco_ec/Makefile | 2 + drivers/platform/chrome/wilco_ec/event.c | 541 ++++++++++++++++++++++++++++++ 3 files changed, 552 insertions(+) commit a893ef9b8bba6a1ba262d9afa04012fcab334c34 Author: Pan Xiuli Date: Mon Jun 3 11:18:14 2019 -0500 ASoC: SOF: soundwire: add initial soundwire support Add soundwire dai type and update ABI version. Signed-off-by: Pan Xiuli Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown include/sound/sof/dai.h | 1 + include/uapi/sound/sof/abi.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit 09a173a63fbb89762712a4ec48722ba98d4e1bcc Author: Pierre-Louis Bossart Date: Mon Jun 3 11:20:31 2019 -0500 ASoC: SOF: Intel: ipc: don't check for HIPCCTL register value The HIPCCTL register controls the IPC interrupts. It can be set or cleared to mask or enable these interrupts, but it makes no sense to read and test its fields in an interrupt (which can only executed if its fields are set). Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/sof/intel/cnl.c | 5 +---- sound/soc/sof/intel/hda-ipc.c | 8 ++------ 2 files changed, 3 insertions(+), 10 deletions(-) commit 66e65339b824a597a8c750ddf993af17c847dce6 Author: Pierre-Louis Bossart Date: Mon Jun 3 11:20:30 2019 -0500 ASoC: SOF: Intel: hda-ipc: re-enable IPC IRQ at end of handler Align with Skylake driver and enable the IRQ at end of handler, instead of at beginning. Also add an error log if we have nothing to do in this handler. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/sof/intel/hda-ipc.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit 5dbeb8287421984a09c92a79c503f8bd41cf3fe7 Author: Pierre-Louis Bossart Date: Mon Jun 3 11:20:29 2019 -0500 ASoC: SOF: Intel: hda-ipc: read all IPC registers first Align with hardware recommended sequences, and read all IPC registers before doing any other actions. Playing with BUSY and DONE bits may invalidate values. The values read may not actually be necessary but at least this provides a snapshot of the IPC registers with no consistency issues. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/sof/intel/hda-ipc.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 3f58521bc81455bdfec2a44febf25ace8988a47f Author: Pierre-Louis Bossart Date: Mon Jun 3 11:20:28 2019 -0500 ASoC: SOF: Intel: cnl-ipc: re-enable IPC IRQ at end of handler Align with Skylake driver and enable the IRQ at end of handler, instead of at beginning. Also add an error log if we have nothing to do in this handler. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/sof/intel/cnl.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit ddbe9223393e4d067f010de65a05c9a6cb7790c1 Author: Pierre-Louis Bossart Date: Mon Jun 3 11:20:27 2019 -0500 ASoC: SOF: Intel: cnl-ipc: move code around for clarity Move all register access to cnl_ipc_host_done() No functionality change. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/sof/intel/cnl.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit c24b1b7279398c9140a8130b4c20db0c06d5dfc4 Author: Pierre-Louis Bossart Date: Mon Jun 3 11:20:26 2019 -0500 ASoC: SOF: Intel: cnl-ipc: read all IPC registers first Align with hardware recommended sequences, and read all IPC registers before doing any other actions. Playing with BUSY and DONE bits may invalidate values. The values read may not actually be necessary but at least this provides a snapshot of the IPC registers with no consistency issues. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/sof/intel/cnl.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 6fbbc18ead0f4f64a722f7e325046e5860d2c52b Author: Daniel Baluta Date: Mon Jun 3 11:20:25 2019 -0500 ASoC: SOF: Do not send cmd via SHIM register We use shim registers only to notify the other side that a message was sent. The actual information for the message is transmitted via mailbox. cmd information inside shim register is not used by the DSP, so we remove it to avoid confusion. Signed-off-by: Daniel Baluta Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/sof/intel/byt.c | 5 +---- sound/soc/sof/intel/cnl.c | 4 +--- sound/soc/sof/intel/hda-ipc.c | 4 +--- 3 files changed, 3 insertions(+), 10 deletions(-) commit 5c9714f637365a84e05f0532cd9ae00c65b70dc1 Author: Ranjani Sridharan Date: Mon Jun 3 11:18:18 2019 -0500 ASoC: SOF: add mode parameter for snd_sof_debugfs_buf_item Add mode parameter for snd_sof_debugfs_buf_item() to specify the mode while creating debugfs entries. Signed-off-by: Ranjani Sridharan Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/sof/debug.c | 4 ++-- sound/soc/sof/loader.c | 4 ++-- sound/soc/sof/sof-priv.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit 9d563eb95b81f32b9ffa4255033717484d50d06b Author: Krzysztof Kozlowski Date: Fri May 31 12:34:02 2019 +0200 Revert "ASoC: core: use component driver name as component name" Using component driver as a name is not unique and it breaks audio in certain configurations, e.g. Hardkernel Odroid XU3 board where following components are registered: - "3830000.i2s" with driver name "snd_dmaengine_pcm" - "3830000.i2s-sec" with driver name "snd_dmaengine_pcm" - "3830000.i2s" with driver name "samsung-i2s" This reverts commit b19671d6caf1ac393681864d5d85dda9fa99a448. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Mark Brown sound/soc/soc-core.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 1d9c95c1896256a64e3a8d825f9e78cc79d29ebb Author: Olivier Moysan Date: Mon Jun 3 10:16:34 2019 +0200 ASoC: stm32: sai: manage identification registers Add support of identification registers in STM32 SAI. Signed-off-by: Olivier Moysan Signed-off-by: Mark Brown sound/soc/stm/stm32_sai.c | 44 +++++++++++++++++++++++++++++++---- sound/soc/stm/stm32_sai.h | 54 ++++++++++++++++++++++++++++++++----------- sound/soc/stm/stm32_sai_sub.c | 14 ++++++----- 3 files changed, 88 insertions(+), 24 deletions(-) commit 201d355c15c170d16741d43b865d5c0ab88a0afc Author: Anshuman Khandual Date: Tue May 21 09:36:27 2019 +0530 arm64/mm: Move PTE_VALID from SW defined to HW page table entry definitions PTE_VALID signifies that the last level page table entry is valid and it is MMU recognized while walking the page table. This is not a software defined PTE bit and should not be listed like one. Just move it to appropriate header file. Signed-off-by: Anshuman Khandual Cc: Will Deacon Cc: Steve Capper Cc: Suzuki Poulose Cc: James Morse Signed-off-by: Catalin Marinas arch/arm64/include/asm/pgtable-hwdef.h | 1 + arch/arm64/include/asm/pgtable-prot.h | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) commit 441a627806873c1b63d06dea4391e79c88b8e496 Author: Anshuman Khandual Date: Tue May 21 09:05:03 2019 +0530 arm64/hugetlb: Use macros for contiguous huge page sizes Replace all open encoded contiguous huge page size computations with available macro encodings CONT_PTE_SIZE and CONT_PMD_SIZE. There are other instances where these macros are used in the file and this change makes it consistently use the same mnemonic. Signed-off-by: Anshuman Khandual Cc: Will Deacon Cc: Steve Capper Cc: Mark Rutland Signed-off-by: Catalin Marinas arch/arm64/mm/hugetlbpage.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 318759b4737c3b3789e2fd64d539f437d52386f5 Author: Eric W. Biederman Date: Mon Jun 3 10:23:58 2019 -0500 signal/x86: Move tsk inside of CONFIG_MEMORY_FAILURE in do_sigbus Stephen Rothwell reported: > After merging the userns tree, today's linux-next build (i386 defconfig) > produced this warning: > > arch/x86/mm/fault.c: In function 'do_sigbus': > arch/x86/mm/fault.c:1017:22: warning: unused variable 'tsk' [-Wunused-variable] > struct task_struct *tsk = current; > ^~~ > > Introduced by commit > > 351b6825b3a9 ("signal: Explicitly call force_sig_fault on current") > > The remaining used of "tsk" are protected by CONFIG_MEMORY_FAILURE. So do the obvious thing and move tsk inside of CONFIG_MEMORY_FAILURE to prevent introducing new warnings into the build. Signed-off-by: "Eric W. Biederman" arch/x86/mm/fault.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 1b94f47793b1b1c4149d8192fa7b859fffd0e7ea Author: Daniel Vetter Date: Mon Jun 3 16:28:48 2019 +0200 drm/docs: More links for implicit/explicit fencing. drm_atomic_set_fence_for_plane() contains the main discussion from a driver pov, link to that from more places. Cc: Pekka Paalanen Reviewed-by: Pekka Paalanen Signed-off-by: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190603142848.26487-1-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_gem_framebuffer_helper.c | 6 ++++++ include/drm/drm_plane.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) commit 00954566464a46dbfd747aaeace281dc9eb00361 Author: Tomasz Maciej Nowak Date: Mon May 27 13:16:14 2019 +0200 arm64: dts: armada-3720-espressobin: correct spi node The manufacturer of this board, ships it with various SPI NOR chips and increments U-Boot bootloader version along the time. There is no way to tell which is placed on the board since no revision bump takes place. This creates two issues. The first, cosmetic. Since the NOR chip may differ, there's message on boot stating that kernel expected w25q32dw and found different one. To correct this, remove optional device-specific compatible string. Being here lets replace bogus "spi-flash" compatible string with proper one. The second is linked to partitions layout, it changed after commit: 81e7251252 ("arm64: mvebu: config: move env to the end of the 4MB boot device") in Marvells downstream U-Boot fork [1], shifting environment location to the end of boot device. Since the new boards will have U-Boot with this change, it'll lead to improper results writing or reading from these partitions. We can't tell if users will update bootloader to recent version provided on manufacturer website, so lets drop partitons layout. 1. https://github.com/MarvellEmbeddedProcessors/u-boot-marvell.git Signed-off-by: Tomasz Maciej Nowak Signed-off-by: Gregory CLEMENT .../arm64/boot/dts/marvell/armada-3720-espressobin.dts | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) commit 0864c9ce8fe83eadfd21b08e98997111d091660c Author: Maxime Ripard Date: Mon Jun 3 07:32:50 2019 -0400 media: dt-bindings: Fix vendor-prefixes YAML Commit 8df39e16877f ("media: dt-bindings: media: Add vendor prefix for allegro") introduced a new devicetree binding vendors, however with an improper syntax making the resulting YAML impossible to parse. Let's fix this. Fixes: 8df39e16877f ("media: dt-bindings: media: Add vendor prefix for allegro") Signed-off-by: Maxime Ripard Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c89b41343862cabcbe3cc85c6c7b675cdd939a29 Author: Dan Carpenter Date: Fri May 31 10:20:49 2019 -0400 media: staging/imx: fix two NULL vs IS_ERR() bugs The imx_media_pipeline_pad() function return NULL pointers on error, it never returns error pointers. Fixes: 3ef46bc97ca2 ("media: staging/imx: Improve pipeline searching") Signed-off-by: Dan Carpenter Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx-media-csi.c | 4 ++-- drivers/staging/media/imx/imx7-media-csi.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 9f7406d6b56b4b71a12480b68221755ea7b3e0ee Author: Neil Armstrong Date: Fri May 31 06:33:15 2019 -0400 media: platform: ao-cec-g12a: disable regmap fast_io for cec bus regmap With fast_io enabled, spinlock_irq is used for read/write operations, thus leading to : BUG: sleeping function called from invalid context at [snip]/ao-cec-g12a.c:379 in_atomic(): 1, irqs_disabled(): 128, pid: 1451, name: irq/14-ff800280 [snip] Call trace: dump_backtrace+0x0/0x180 show_stack+0x14/0x1c dump_stack+0xa8/0xe0 ___might_sleep+0xf4/0x104 __might_sleep+0x4c/0x80 meson_ao_cec_g12a_read+0x7c/0x164 regmap_read+0x16c/0x1b0 meson_ao_cec_g12a_irq_thread+0xcc/0x200 irq_thread_fn+0x2c/0x60 irq_thread+0x14c/0x1fc kthread+0x11c/0x12c ret_from_fork+0x10/0x18 Simply remove fast_io to use mutexes instead. Fixes: b7778c46683c ("media: platform: meson: Add Amlogic Meson G12A AO CEC Controller driver") Signed-off-by: Neil Armstrong Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/meson/ao-cec-g12a.c | 1 - 1 file changed, 1 deletion(-) commit 7f9d5ac8e1e5af43a899110ddaa0b0c9374d1909 Author: Colin Ian King Date: Thu May 30 14:59:24 2019 -0400 media: cx23885: remove redundant assignment to err The variable err is assigned with a value that is never read and it is re-assigned a new value later on. The assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/cx23885/cx23885-dvb.c | 2 -- 1 file changed, 2 deletions(-) commit e867110a9a3241196613816d5bfd4688ebac15bb Author: Hans Verkuil Date: Thu May 30 02:45:48 2019 -0400 media: dvb-usb/cxusb-analog.c: fix coccinelle warning, use ktime.h This patch fixes a coccinelle warning and includes ktime.h instead of timekeeping.h. The first includes the latter, but the latter doesn't exist before 3.17, causing problems for our compat build. It's easier to just use ktime.h instead. coccinelle warnings: (new ones prefixed by >>) >> drivers/media/usb/dvb-usb/cxusb-analog.c:1498:41-42: WARNING: Use ARRAY_SIZE Signed-off-by: Hans Verkuil Reported-by: kbuild test robot Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/cxusb-analog.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d8cc5cf08b1152b5c8064f6ae549bf3fee61ca85 Author: Konstantin Porotchkin Date: Tue May 21 16:37:49 2019 +0200 arm64: dts: marvell: Disable AP I2C on Armada-8040-DB While AP I2C bus was available to users in early revisions of the SoC, this is not the case anymore since eMMC was connected to the AP. Most users do not have access to this I2C bus so do not enable it in the board device tree. As there are three I2C buses enabled on this board, add an alias to be sure the two other buses keep their initial numbering. Signed-off-by: Konstantin Porotchkin [: Reword commit message, add alias] Signed-off-by: Miquel Raynal Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-8040-db.dts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit fe7f7f229f0705301f6ff44d56375217f0a573f4 Author: Miquel Raynal Date: Tue May 21 16:25:04 2019 +0200 arm64: dts: marvell: Enable AP806 thermal throttling with CPUfreq Avoid critical temperatures in the AP806 by adding the relevant trip points/cooling-maps using CPUfreq as cooling device. So far, when the temperature reaches 100°C in the thermal IP of the AP806 (close enough from the 2/4 cores) an overheat interrupt is raised. The thermal core then shutdowns the system to avoid damaging the hardware. Adding CPUfreq as a cooling device could help avoiding such very critical situation. For that, we enable thermal throttling by defining, for each CPU, two trip points with the corresponding cooling 'intensity'. CPU0 and CPU1 are in the same cluster and are driven by the same clock. Same applies for CPU2 and CPU3, if available. So changing the frequency of one will also change the frequency of the other one, hence the use of two cooling devices per core. The heat map is as follow: - Below 85°C: the cluster runs at the highest frequency (e.g: 1200MHz). - Between 85°C and 95°C: there are two trip points at half (e.g: 600MHz) and a third (e.g: 400MHz) of the highest frequency. - Above 95°C the cluster runs at a quarter of the highest frequency (e.g: 300MHz). - At 100°C the platform is shutdown. Suggested-by: Omri Itach Signed-off-by: Miquel Raynal Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-ap806-dual.dtsi | 2 + arch/arm64/boot/dts/marvell/armada-ap806-quad.dtsi | 5 + arch/arm64/boot/dts/marvell/armada-ap806.dtsi | 110 +++++++++++++++++++-- 3 files changed, 107 insertions(+), 10 deletions(-) commit c9c2c27d7ceca8c2856c5008f2002bddb384f518 Author: Greg Kroah-Hartman Date: Tue Apr 16 15:46:55 2019 +0200 debugfs: make debugfs_create_u32_array() return void The single user of debugfs_create_u32_array() does not care about the return value of it, so make it return void as there is no need to do anything with the return value. Signed-off-by: Greg Kroah-Hartman Documentation/filesystems/debugfs.txt | 2 +- fs/debugfs/file.c | 14 ++++---------- include/linux/debugfs.h | 12 +++++------- 3 files changed, 10 insertions(+), 18 deletions(-) commit b172733dd1c0e098c0931549db3f18e94a5bbc01 Author: Miquel Raynal Date: Tue May 21 16:25:03 2019 +0200 arm64: dts: marvell: Change core numbering in AP806 thermal-node When adding thermal nodes, the CPUs have been named from 1 to 4 while usually everywhere else they are referred as 0-3. Let's change this to be consistent with later changes when we will use CPUfreq and CPU phandles as cooling devices to avoid inconsistencies in the nodes numbering. Signed-off-by: Miquel Raynal Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-ap806.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 36b7ee4dce9e519cf87917eccbaabb53638fdf03 Author: Greg Kroah-Hartman Date: Fri Jan 4 14:25:20 2019 +0100 btrfs: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Chris Mason Cc: Josef Bacik Cc: David Sterba Cc: linux-btrfs@vger.kernel.org Signed-off-by: Greg Kroah-Hartman fs/btrfs/sysfs.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit b232d4ed92eafb0d31adc01ee7a86c1309394418 Author: Nicholas Kazlauskas Date: Tue May 28 15:08:36 2019 -0400 drm/amd/display: Only force modesets when toggling HDR [Why] We can issue HDR static metadata as part of stream updates for non-modesets as long as we force a modeset when entering or exiting HDR. This avoids unnecessary blanking for simple metadata updates. [How] When changing scaling and abm for the stream also check if HDR has changed and send the stream update. This will only happen in non-modeset cases. Cc: Harry Wentland Signed-off-by: Nicholas Kazlauskas Signed-off-by: Harry Wentland Reviewed-by: Harry Wentland Link: https://patchwork.freedesktop.org/patch/msgid/20190528190836.10738-3-nicholas.kazlauskas@amd.com drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 34 +++++++++++++++++++---- 1 file changed, 28 insertions(+), 6 deletions(-) commit 88694af9e4d1feaf635c23844833960f8958af78 Author: Nicholas Kazlauskas Date: Tue May 28 15:08:35 2019 -0400 drm/amd/display: Expose HDR output metadata for supported connectors [Why] For userspace to send static HDR metadata to the display we need to attach the property on the connector and send it to DC. [How] The property is attached to HDMI and DP connectors. Since the metadata isn't actually available when creating the connector this isn't a property we can dynamically support based on the extension block being available or not. When the HDR metadata is changed a modeset will be forced for now. We need to switch from 8bpc to 10bpc in most cases anyway, and we want to fully exit HDR mode when userspace gives us a NULL metadata, so this isn't completely unnecessary. The requirement can later be reduced to just entering and exiting HDR or switching max bpc. Cc: Harry Wentland Signed-off-by: Nicholas Kazlauskas Signed-off-by: Harry Wentland Reviewed-by: Harry Wentland Link: https://patchwork.freedesktop.org/patch/msgid/20190528190836.10738-2-nicholas.kazlauskas@amd.com drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 125 ++++++++++++++++++++++ 1 file changed, 125 insertions(+) commit 188ea2fc99b73b579d65003dae57e0bdb640ba3e Author: Baruch Siach Date: Mon May 20 07:08:21 2019 +0300 arm64: dts: marvell: clearfog-gt-8k: set SFP power limit The Clearfog GT-8K board is capable of supplying power up to 2W to SFP modules. Make that explicit in the device-tree. Without this property current kernel does not allow SFP modules that require more than 1W. Signed-off-by: Baruch Siach Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-8040-clearfog-gt-8k.dts | 1 + 1 file changed, 1 insertion(+) commit a9a9da47f8e6c1fe24c8bfe36c7f5ee6fc3700a1 Author: Greg Kroah-Hartman Date: Tue Apr 16 16:15:54 2019 +0200 mailbox: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Jassi Brar Signed-off-by: Greg Kroah-Hartman drivers/mailbox/bcm-flexrm-mailbox.c | 28 +++++----------------------- drivers/mailbox/bcm-pdc-mailbox.c | 8 ++------ 2 files changed, 7 insertions(+), 29 deletions(-) commit 1c769fc41ac574e4957a6a874334eed1631e5f59 Author: Greg Kroah-Hartman Date: Tue Jan 22 16:21:48 2019 +0100 gcov: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Also delete the dentry variable as it is never needed. Acked-by: Peter Oberparleiter Signed-off-by: Greg Kroah-Hartman kernel/gcov/fs.c | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) commit 0fc811e5d7f9095f4a5732a34a19eff49fcb3ad6 Author: Greg Kroah-Hartman Date: Tue Jan 22 15:35:38 2019 +0100 x86: kdebugfs: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: Signed-off-by: Greg Kroah-Hartman arch/x86/kernel/kdebugfs.c | 60 +++++++++------------------------------------- 1 file changed, 11 insertions(+), 49 deletions(-) commit 519e96ee114ff70e420111b39d884153250626dd Author: Greg Kroah-Hartman Date: Tue Jan 22 15:35:41 2019 +0100 x86: platform: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: Signed-off-by: Greg Kroah-Hartman arch/x86/platform/atom/punit_atom_debug.c | 23 ++++------------------- arch/x86/platform/intel-quark/imr.c | 14 ++++---------- arch/x86/platform/intel/iosf_mbi.c | 21 +++------------------ arch/x86/platform/uv/tlb_uv.c | 15 ++------------- 4 files changed, 13 insertions(+), 60 deletions(-) commit 5dd82ba9e2d6112c8c9a1d92ad244171a5f4755b Author: Greg Kroah-Hartman Date: Tue Jan 22 15:35:40 2019 +0100 x86: mm: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Dave Hansen Cc: Andy Lutomirski Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: x86@kernel.org Signed-off-by: Greg Kroah-Hartman arch/x86/mm/debug_pagetables.c | 35 +++++++---------------------------- 1 file changed, 7 insertions(+), 28 deletions(-) commit d3446b266a8c72a7bbc94b65f5fc6d206be77d24 Author: Heinrich Schuchardt Date: Fri May 17 18:11:23 2019 +0200 arm64: dts: marvell: mcbin: enlarge PCI memory window Running a graphics adapter on the MACCHIATObin fails due to an insufficiently sized memory window. Enlarge the memory window for the PCIe slot to 512 MiB. With the patch I am able to use a GT710 graphics adapter with 1 GB onboard memory. These are the mapped memory areas that the graphics adapter is actually using: Region 0: Memory at cc000000 (32-bit, non-prefetchable) [size=16M] Region 1: Memory at c0000000 (64-bit, prefetchable) [size=128M] Region 3: Memory at c8000000 (64-bit, prefetchable) [size=32M] Region 5: I/O ports at 1000 [size=128] Expansion ROM at ca000000 [disabled] [size=512K] Signed-off-by: Heinrich Schuchardt Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 0e5447626bed837604b21adf3e5cd903db78321e Author: Ash Hughes Date: Fri May 17 01:17:05 2019 +0100 ARM: dts: armada: netgear-rn104: Add LCD to RN104 dts. Adds the LCD on the rn104 to its dts file. Signed-off-by: Ash Hughes Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-370-netgear-rn104.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 2e96e04d25caaca8039ba9561e7e02ee8a192553 Author: Christoph Hellwig Date: Sun Apr 28 13:57:39 2019 -0500 MIPS: use the generic uncached segment support in dma-direct Stop providing the arch alloc/free hooks and just expose the segment offset instead. Signed-off-by: Christoph Hellwig Acked-by: Paul Burton arch/mips/Kconfig | 1 + arch/mips/include/asm/page.h | 3 --- arch/mips/jazz/jazzdma.c | 6 ------ arch/mips/mm/dma-noncoherent.c | 26 +++++++++----------------- 4 files changed, 10 insertions(+), 26 deletions(-) commit c30700db9eaabb35e0b123301df35a6846e6b6b4 Author: Christoph Hellwig Date: Mon Jun 3 08:43:51 2019 +0200 dma-direct: provide generic support for uncached kernel segments A few architectures support uncached kernel segments. In that case we get an uncached mapping for a given physica address by using an offset in the uncached segement. Implement support for this scheme in the generic dma-direct code instead of duplicating it in arch hooks. Signed-off-by: Christoph Hellwig arch/Kconfig | 8 ++++++++ include/linux/dma-noncoherent.h | 3 +++ kernel/dma/direct.c | 17 +++++++++++++++-- 3 files changed, 26 insertions(+), 2 deletions(-) commit 67f30ad19c4b329dbe47e1563b2017203bd02e34 Author: Christoph Hellwig Date: Sun Apr 28 13:47:05 2019 -0500 au1100fb: fix DMA API abuse Virtual addresses return from dma(m)_alloc_coherent are opaque in what backs then, and drivers must not poke into them. Switch the driver to use the generic DMA API mmap helper to avoid these games. Signed-off-by: Christoph Hellwig Acked-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/au1100fb.c | 24 ++++-------------------- drivers/video/fbdev/au1100fb.h | 1 + 2 files changed, 5 insertions(+), 20 deletions(-) commit e58cfbfb32d1b9bcc8dd5e0c8801c8d518bc51f3 Author: Christoph Hellwig Date: Sun Apr 28 13:34:59 2019 -0500 MIPS: remove the _dma_cache_wback_inv export This export is not used in modular code, which is a good thing as everyone should use the proper DMA API instead. Signed-off-by: Christoph Hellwig Acked-by: Paul Burton arch/mips/mm/cache.c | 2 -- 1 file changed, 2 deletions(-) commit 2d7a3dc3e24f43504b1f25eae8195e600f4cce8b Author: Laurentiu Tudor Date: Wed May 29 13:28:43 2019 +0300 USB: drop HCD_LOCAL_MEM flag With the addition of the local memory allocator, the HCD_LOCAL_MEM flag can be dropped and the checks against it replaced with a check for the localmem_pool ptr being initialized. Signed-off-by: Laurentiu Tudor Tested-by: Fredrik Noring Reviewed-by: Greg Kroah-Hartman Signed-off-by: Christoph Hellwig drivers/usb/core/buffer.c | 8 +++----- drivers/usb/core/hcd.c | 15 ++++++--------- drivers/usb/host/ehci-hcd.c | 2 +- drivers/usb/host/fotg210-hcd.c | 2 +- drivers/usb/host/ohci-hcd.c | 2 +- drivers/usb/host/ohci-sm501.c | 5 +++-- drivers/usb/host/ohci-tmio.c | 2 +- drivers/usb/host/uhci-hcd.c | 2 +- include/linux/usb/hcd.h | 1 - 9 files changed, 17 insertions(+), 22 deletions(-) commit 7d99532955d4649ba1417fb5a80252e0ce40f1e2 Author: Laurentiu Tudor Date: Wed May 29 13:28:42 2019 +0300 usb: host: ohci-tmio: init genalloc for local memory In preparation for dropping the existing "coherent" dma mem declaration APIs, replace the current dma_declare_coherent_memory() based mechanism with the creation of a genalloc pool that will be used in the OHCI subsystem as replacement for the DMA APIs. Signed-off-by: Laurentiu Tudor Reviewed-by: Greg Kroah-Hartman Signed-off-by: Christoph Hellwig drivers/usb/host/ohci-tmio.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 7d9e6f5aebe8c03f1a5199ca5c30f0c53042af23 Author: Laurentiu Tudor Date: Wed May 29 13:28:41 2019 +0300 usb: host: ohci-sm501: init genalloc for local memory In preparation for dropping the existing "coherent" dma mem declaration APIs, replace the current dma_declare_coherent_memory() based mechanism with the creation of a genalloc pool that will be used in the OHCI subsystem as replacement for the DMA APIs. Signed-off-by: Laurentiu Tudor Reviewed-by: Greg Kroah-Hartman Signed-off-by: Christoph Hellwig drivers/usb/host/ohci-sm501.c | 47 ++++++++++++++++++------------------------- 1 file changed, 20 insertions(+), 27 deletions(-) commit b0310c2f09bbe8aebefb97ed67949a3a7092aca6 Author: Laurentiu Tudor Date: Wed May 29 13:28:40 2019 +0300 USB: use genalloc for USB HCs with local memory For HCs that have local memory, replace the current DMA API usage with a genalloc generic allocator to manage the mappings for these devices. To help users, introduce a new HCD API, usb_hcd_setup_local_mem() that will setup up the genalloc backing up the device local memory. It will be used in subsequent patches. This is in preparation for dropping the existing "coherent" dma mem declaration APIs. The current implementation was relying on a short circuit in the DMA API that in the end, was acting as an allocator for these type of devices. Signed-off-by: Laurentiu Tudor Tested-by: Fredrik Noring Reviewed-by: Greg Kroah-Hartman Signed-off-by: Christoph Hellwig drivers/usb/Kconfig | 1 + drivers/usb/core/buffer.c | 9 +++++++++ drivers/usb/core/hcd.c | 36 ++++++++++++++++++++++++++++++++++++ drivers/usb/host/ohci-hcd.c | 23 ++++++++++++++++++----- drivers/usb/host/ohci-mem.c | 35 +++++++++++++++++++++++++++++++---- drivers/usb/host/ohci.h | 2 ++ include/linux/usb/hcd.h | 5 +++++ 7 files changed, 102 insertions(+), 9 deletions(-) commit da83a722959a82733c3ca60030cc364ca2318c5a Author: Fredrik Noring Date: Wed May 29 13:28:39 2019 +0300 lib/genalloc: add gen_pool_dma_zalloc() for zeroed DMA allocations gen_pool_dma_zalloc() is a zeroed memory variant of gen_pool_dma_alloc(). Also document the return values of both, and indicate NULL as a "%NULL" constant. Signed-off-by: Fredrik Noring Reviewed-by: Greg Kroah-Hartman Signed-off-by: Christoph Hellwig include/linux/genalloc.h | 1 + lib/genalloc.c | 29 ++++++++++++++++++++++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) commit dd3dcede9fa0a0b661ac1f24843f4a1b1317fdb6 Author: Nicolin Chen Date: Wed May 29 17:54:25 2019 -0700 dma-contiguous: fix !CONFIG_DMA_CMA version of dma_{alloc, free}_contiguous() Commit fdaeec198ada ("dma-contiguous: add dma_{alloc,free}_contiguous() helpers") adds a pair of new helper functions so as to abstract code in the dma-direct (and other places in the future), however it breaks QEMU boot feature using x86_64 defconfig. That's because x86_64 defconfig has CONFIG_DMA_CMA=n so those two newly introduced helper functions are empty in their !CONFIG_DMA_CMA version, while previously the platform independent dma-direct code had fallback alloc_pages_node() and __free_pages(). So this patch fixes it by adding alloc_pages_node() and __free_pages() in the !CONFIG_DMA_CMA version of the two helper functions. Tested with below QEMU command: qemu-system-x86_64 -m 512m \ -drive file=images/x86_64/rootfs.ext4,format=raw,if=ide \ -append 'console=ttyS0 root=/dev/sda' -nographic \ -kernel arch/x86_64/boot/bzImage with the rootfs from the below link: https://github.com/ClangBuiltLinux/continuous-integration/raw/master/images/x86_64/rootfs.ext4 Fixes: fdaeec198ada ("dma-contiguous: add dma_{alloc,free}_contiguous() helpers") Reported-by: Nathan Chancellor Signed-off-by: Nicolin Chen Signed-off-by: Christoph Hellwig include/linux/dma-contiguous.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit bd2e75633c8012fc8a7431c82fda66237133bf7e Author: Nicolin Chen Date: Thu May 23 21:06:33 2019 -0700 dma-contiguous: use fallback alloc_pages for single pages The addresses within a single page are always contiguous, so it's not so necessary to always allocate one single page from CMA area. Since the CMA area has a limited predefined size of space, it may run out of space in heavy use cases, where there might be quite a lot CMA pages being allocated for single pages. However, there is also a concern that a device might care where a page comes from -- it might expect the page from CMA area and act differently if the page doesn't. This patch tries to use the fallback alloc_pages path, instead of one-page size allocations from the global CMA area in case that a device does not have its own CMA area. This'd save resources from the CMA global area for more CMA allocations, and also reduce CMA fragmentations resulted from trivial allocations. Signed-off-by: Nicolin Chen Tested-by: dann frazier Signed-off-by: Christoph Hellwig kernel/dma/contiguous.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit b1d2dc009dece4cd7e629419b52266ba51960a6b Author: Nicolin Chen Date: Thu May 23 21:06:32 2019 -0700 dma-contiguous: add dma_{alloc,free}_contiguous() helpers Both dma_alloc_from_contiguous() and dma_release_from_contiguous() are very simply implemented, but requiring callers to pass certain parameters like count and align, and taking a boolean parameter to check __GFP_NOWARN in the allocation flags. So every function call duplicates similar work: unsigned long order = get_order(size); size_t count = size >> PAGE_SHIFT; page = dma_alloc_from_contiguous(dev, count, order, gfp & __GFP_NOWARN); [...] dma_release_from_contiguous(dev, page, size >> PAGE_SHIFT); Additionally, as CMA can be used only in the context which permits sleeping, most of callers do a gfpflags_allow_blocking() check and a corresponding fallback allocation of normal pages upon any false result: if (gfpflags_allow_blocking(flag)) page = dma_alloc_from_contiguous(); if (!page) page = alloc_pages(); [...] if (!dma_release_from_contiguous(dev, page, count)) __free_pages(page, get_order(size)); So this patch simplifies those function calls by abstracting these operations into the two new functions: dma_{alloc,free}_contiguous. As some callers of dma_{alloc,release}_from_contiguous() might be complicated, this patch just implements these two new functions to kernel/dma/direct.c only as an initial step. Suggested-by: Christoph Hellwig Signed-off-by: Nicolin Chen Tested-by: dann frazier Signed-off-by: Christoph Hellwig include/linux/dma-contiguous.h | 13 ++++++++++++ kernel/dma/contiguous.c | 47 ++++++++++++++++++++++++++++++++++++++++++ kernel/dma/direct.c | 24 ++++----------------- 3 files changed, 64 insertions(+), 20 deletions(-) commit db0487abd641db12a74a413067519a741e01dc57 Author: Greg Kroah-Hartman Date: Tue Jan 22 15:41:12 2019 +0100 arm: dump: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Russell King Cc: Jinbum Park Cc: linux-arm-kernel@lists.infradead.org Reviewed-by: Kees Cook Acked-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman arch/arm/include/asm/ptdump.h | 9 +++------ arch/arm/mm/dump.c | 4 ++-- arch/arm/mm/ptdump_debugfs.c | 8 ++------ 3 files changed, 7 insertions(+), 14 deletions(-) commit 30ed997a878ec34f4e2fab9f417cbfd401743a29 Author: Greg Kroah-Hartman Date: Tue Jan 22 15:41:14 2019 +0100 arm: omap2: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Kevin Hilman Cc: Russell King Cc: linux-omap@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Acked-by: Tony Lindgren Signed-off-by: Greg Kroah-Hartman arch/arm/mach-omap2/pm-debug.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit d5ddd5a51726f46d9f2a119c461ab28ca09b9e69 Author: Greg Kroah-Hartman Date: Tue Jan 22 15:41:13 2019 +0100 arm: omap1: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Paul Walmsley Cc: Aaro Koskinen Cc: Russell King Cc: Kevin Hilman Cc: linux-omap@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Acked-by: Tony Lindgren Signed-off-by: Greg Kroah-Hartman arch/arm/mach-omap1/clock.c | 63 +++++++++------------------------------------ arch/arm/mach-omap1/pm.c | 7 ++--- 2 files changed, 14 insertions(+), 56 deletions(-) commit ad09137631e6e5acfaf288f3ba3f4b3a9f855d16 Author: Greg Kroah-Hartman Date: Tue Jan 22 15:35:42 2019 +0100 x86: xen: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Boris Ostrovsky Cc: Stefano Stabellini Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: Cc: Reviewed-by: Juergen Gross Signed-off-by: Greg Kroah-Hartman arch/x86/xen/debugfs.c | 7 +------ arch/x86/xen/p2m.c | 3 --- 2 files changed, 1 insertion(+), 9 deletions(-) commit 2d146b924ec3c0873f06308d149684dc1105d9a3 Author: Greg Kroah-Hartman Date: Tue Jan 22 16:21:07 2019 +0100 backing-dev: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. And as the return value does not matter at all, no need to save the dentry in struct backing_dev_info, so delete it. Cc: Andrew Morton Cc: Anders Roxell Cc: Arnd Bergmann Cc: Michal Hocko Cc: linux-mm@kvack.org Reviewed-by: Sebastian Andrzej Siewior Signed-off-by: Greg Kroah-Hartman include/linux/backing-dev-defs.h | 1 - mm/backing-dev.c | 24 +++++------------------- 2 files changed, 5 insertions(+), 20 deletions(-) commit c4e41349a85c52456fea4903dde459302d54c67c Author: Greg Kroah-Hartman Date: Tue Jan 22 16:21:11 2019 +0100 mm: cleancache: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: linux-mm@kvack.org Acked-by: Konrad Rzeszutek Wilk Signed-off-by: Greg Kroah-Hartman mm/cleancache.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8c0fd1fa64c6120f3f02d4e8d8949e7599530286 Author: Greg Kroah-Hartman Date: Tue Jan 22 16:21:46 2019 +0100 kprobes: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: "Naveen N. Rao" Cc: Anil S Keshavamurthy Cc: "David S. Miller" Acked-by: Masami Hiramatsu Signed-off-by: Greg Kroah-Hartman kernel/kprobes.c | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) commit 4aa3b1f67d3dbac6864095273bc3466d2099ad05 Author: Greg Kroah-Hartman Date: Tue Jan 22 16:21:44 2019 +0100 fail_function: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Kees Cook Cc: Josef Bacik Cc: Thomas Gleixner Cc: "Naveen N. Rao" Cc: zhong jiang Acked-by: Masami Hiramatsu Signed-off-by: Greg Kroah-Hartman kernel/fail_function.c | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) commit 03eb2a08fccc49f93587666e4e1a14ce00df955a Author: Greg Kroah-Hartman Date: Tue Jan 22 15:50:30 2019 +0100 sh: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Yoshinori Sato Cc: Rich Felker Cc: Signed-off-by: Greg Kroah-Hartman arch/sh/kernel/kdebugfs.c | 3 --- arch/sh/mm/asids-debugfs.c | 11 +++-------- arch/sh/mm/cache-debugfs.c | 20 ++++---------------- arch/sh/mm/pmb.c | 9 ++------- arch/sh/mm/tlb-debugfs.c | 20 ++++---------------- 5 files changed, 13 insertions(+), 50 deletions(-) commit 2fcc6e202a9d45f1556365ee4f4de973e1c834ec Author: Greg Kroah-Hartman Date: Tue Jan 22 16:21:10 2019 +0100 hwpoison-inject: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Naoya Horiguchi Cc: linux-mm@kvack.org Signed-off-by: Greg Kroah-Hartman mm/hwpoison-inject.c | 67 +++++++++++++++++----------------------------------- 1 file changed, 22 insertions(+), 45 deletions(-) commit 282401df902465186ff6ed5a7ba4894c589553f2 Author: Greg Kroah-Hartman Date: Tue Jan 22 16:21:12 2019 +0100 mm: kmemleak: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Catalin Marinas Cc: linux-mm@kvack.org Signed-off-by: Greg Kroah-Hartman mm/kmemleak.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 4268509a36a79a6e449a4937d88bb4d21f8b2078 Author: Greg Kroah-Hartman Date: Tue Jan 22 16:21:09 2019 +0100 zsmalloc: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Minchan Kim Cc: Nitin Gupta Cc: Sergey Senozhatsky Cc: linux-mm@kvack.org Signed-off-by: Greg Kroah-Hartman mm/zsmalloc.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) commit 3e6f176f304ee8effec698ebaff6b7baecb5e1e6 Author: Greg Kroah-Hartman Date: Tue Jan 22 16:21:41 2019 +0100 blktrace: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Jens Axboe Cc: Steven Rostedt Cc: Ingo Molnar Cc: linux-block@vger.kernel.org Signed-off-by: Greg Kroah-Hartman kernel/trace/blktrace.c | 6 ------ 1 file changed, 6 deletions(-) commit 6a54cd872f50ef3b090fdd53d1b67f5b43e97315 Author: Greg Kroah-Hartman Date: Tue Jan 22 16:21:40 2019 +0100 trace: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Steven Rostedt Cc: Ingo Molnar Signed-off-by: Greg Kroah-Hartman kernel/trace/trace.c | 4 ---- 1 file changed, 4 deletions(-) commit de2fadf566cb9277bea22993ed95cc5177280251 Author: Greg Kroah-Hartman Date: Tue Jan 22 16:21:08 2019 +0100 zswap: ignore debugfs_create_dir() return value When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Seth Jennings Cc: linux-mm@kvack.org Acked-by: Dan Streetman Signed-off-by: Greg Kroah-Hartman mm/zswap.c | 2 -- 1 file changed, 2 deletions(-) commit 32adeab3e3b5bc01ebb7746600e7c734482230d7 Author: YueHaibing Date: Wed May 29 23:09:39 2019 +0800 usb: phy: mv-usb: Remove set but not used variable 'phy' Fixes gcc '-Wunused-but-set-variable' warning: drivers/usb/phy/phy-mv-usb.c: In function mv_otg_work: drivers/usb/phy/phy-mv-usb.c:404:18: warning: variable phy set but not used [-Wunused-but-set-variable] It's no used since commit e47d92545c29 ("usb: move the OTG state from the USB PHY to the OTG structure") Signed-off-by: YueHaibing Signed-off-by: Greg Kroah-Hartman drivers/usb/phy/phy-mv-usb.c | 2 -- 1 file changed, 2 deletions(-) commit 8e4c5d31e9eebc0e6cc225fb8f7cd87e5446d4f2 Author: Hariprasad Kelam Date: Sat May 25 23:01:47 2019 +0530 usb: ftdi-elan: fix possible condition with no effect (if == else) fix below warning reported by coccicheck ./drivers/usb/misc/ftdi-elan.c:2026:11-13: WARNING: possible condition with no effect (if == else) Signed-off-by: Hariprasad Kelam Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/ftdi-elan.c | 7 ------- 1 file changed, 7 deletions(-) commit 53cdff30fc333718b6470c9604636b7b6f47542a Author: YueHaibing Date: Sat May 25 22:38:08 2019 +0800 USB: ohci-spear: Remove set but not used variable 'ohci' Fixes gcc '-Wunused-but-set-variable' warning: drivers/usb/host/ohci-spear.c: In function spear_ohci_hcd_drv_probe: drivers/usb/host/ohci-spear.c:38:19: warning: variable ohci set but not used [-Wunused-but-set-variable] It is never used since commit 1cc6ac59ffaa ("USB: OHCI: make ohci-spear a separate driver") Signed-off-by: YueHaibing Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ohci-spear.c | 3 --- 1 file changed, 3 deletions(-) commit c8a93dcd0cbd341ce1b6d5e6671566d5fba76d68 Author: Greg Kroah-Hartman Date: Fri May 24 10:30:40 2019 +0200 USB: atm: ueagle-atm.c: remove redundant license text Now that we have the correct SPDX tag for the ueagle-atm.c file, the wall of "boiler-plate" text is not needed. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Thomas Gleixner Cc: Matthieu CASTET Cc: Stanislaw Gruszka Cc: Damien Bergamini Cc: Duncan Sands Signed-off-by: Greg Kroah-Hartman drivers/usb/atm/ueagle-atm.c | 46 +------------------------------------------- 1 file changed, 1 insertion(+), 45 deletions(-) commit 5e456a9263da2adc95d2744e2add5835f298d08d Author: Greg Kroah-Hartman Date: Fri May 24 10:30:39 2019 +0200 USB: atm: ueagle-atm.c: fix SPDX tag to be BSD2 Thomas rightly points out that I got the BSD clause count wrong for this driver, it should be 2, not 3 based on the text in the license here, so fix that up. He also raises the question that the license text points to a v2 only license, yet the text in the header says "or later". Given that the text in the header says "or later" and all of the other USB atm drivers are licensed in that way, I am going to leave the string as-is for that mark. Reported-by: Thomas Gleixner Cc: Matthieu CASTET Cc: Stanislaw Gruszka Cc: Damien Bergamini Cc: Duncan Sands Signed-off-by: Greg Kroah-Hartman drivers/usb/atm/ueagle-atm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5a1d99b11b1b1fe249581e24d95208d3671f8f14 Author: YueHaibing Date: Tue May 28 21:43:05 2019 +0800 usb: ohci-s3c2410: Remove set but not used variable 'hcd' Fixes gcc '-Wunused-but-set-variable' warning: drivers/usb/host/ohci-s3c2410.c: In function s3c2410_hcd_oc: drivers/usb/host/ohci-s3c2410.c:296:18: warning: variable hcd set but not used [-Wunused-but-set-variable] It is never used, so can be removed. Signed-off-by: YueHaibing Reviewed-by: Krzysztof Kozlowski Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ohci-s3c2410.c | 2 -- 1 file changed, 2 deletions(-) commit 6dade7ad8876a1dee84b3e321e6bf44dd2156217 Author: Colin Ian King Date: Fri May 31 14:53:47 2019 +0100 usb: cdc-wdm: remove redundant assignment to rv The variable rv is assigned with a value that is never read and it is re-assigned a new value on the next statement. The assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/usb/class/cdc-wdm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2e5a359e4a816c3a93db18e3789b5ec739f5ee18 Author: YueHaibing Date: Tue May 28 21:38:49 2019 +0800 usb: host: ohci-st: Remove set but not used variable 'ohci' Fixes gcc '-Wunused-but-set-variable' warning: drivers/usb/host/ohci-st.c: In function st_ohci_platform_probe: drivers/usb/host/ohci-st.c:135:19: warning: variable ohci set but not used [-Wunused-but-set-variable] It's never used, so can be removed. Signed-off-by: YueHaibing Acked-by: Patrice Chotard Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ohci-st.c | 2 -- 1 file changed, 2 deletions(-) commit 05387733ed57b6a971fc88f77cc6522eaafd46f2 Author: YueHaibing Date: Tue May 28 21:45:29 2019 +0800 usb: host: ehci-st: Remove set but not used variable 'ehci' Fixes gcc '-Wunused-but-set-variable' warning: drivers/usb/host/ehci-st.c: In function st_ehci_platform_probe: drivers/usb/host/ehci-st.c:155:19: warning: variable ehci set but not used [-Wunused-but-set-variable] It is never used, so can be removed. Signed-off-by: YueHaibing Acked-by: Patrice Chotard Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ehci-st.c | 2 -- 1 file changed, 2 deletions(-) commit 15f5276a2fb1ad70d7a8e6321dd751c3d081e422 Author: Anson Huang Date: Fri May 24 01:52:36 2019 +0000 soc: imx: Add SCU SoC info driver support Add i.MX SCU SoC info driver to support i.MX8QXP SoC, introduce driver dependency into Kconfig as CONFIG_IMX_SCU must be selected to support i.MX SCU SoC driver, also need to use platform driver model to make sure IMX_SCU driver is probed before i.MX SCU SoC driver. With this patch, SoC info can be read from sysfs: i.mx8qxp-mek# cat /sys/devices/soc0/family Freescale i.MX i.mx8qxp-mek# cat /sys/devices/soc0/soc_id 0x2 i.mx8qxp-mek# cat /sys/devices/soc0/machine Freescale i.MX8QXP MEK i.mx8qxp-mek# cat /sys/devices/soc0/revision 1.1 Signed-off-by: Anson Huang Reviewed-by: Abel Vesa Reviewed-by: Dong Aisheng Signed-off-by: Shawn Guo drivers/soc/imx/Kconfig | 9 +++ drivers/soc/imx/Makefile | 1 + drivers/soc/imx/soc-imx-scu.c | 144 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 154 insertions(+) commit 7acc77d20892fefc546edd22ea62829423a771ef Author: Michael Straube Date: Sun Jun 2 10:28:00 2019 +0200 staging: rtl8188eu: remove ODM_PhyStatusQuery() wrapper Function ODM_PhyStatusQuery() is just a wrapper around ODM_PhyStatusQuery_92CSeries(). Rename ODM_PhyStatusQuery_92CSeries() to ODM_PhyStatusQuery() and remove the wrapper. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/odm_hwconfig.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) commit d7255ba4d648a6da72b740f69c615a61247b1633 Author: Nishka Dasgupta Date: Fri May 31 23:02:26 2019 +0530 staging: vt6655: Change return type of function and remove variable Remove return variable bResult from function CARDbRadioPowerOff and change the return type of the function to void as it always returns true and the return value is never stored nor checked when called. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/card.c | 8 ++------ drivers/staging/vt6655/card.h | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) commit ee598a61ec75a57c71531e76a29a7e7ff54e8573 Author: Michael Straube Date: Sun Jun 2 18:35:28 2019 +0200 staging: rtl8188eu: remove unused definitions from ieee80211.h MGMT_QUEUE_NUM, ETH_TYPE_LEN and PAYLOAD_TYPE_LEN are defined but not used in the driver code, so remove them. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/ieee80211.h | 5 ----- 1 file changed, 5 deletions(-) commit 14f252e821ba55292763fd53c5432ccfaa9e8160 Author: Michael Straube Date: Sun Jun 2 18:35:27 2019 +0200 staging: rtl8188eu: remove redundant definition of ETH_ALEN ETH_ALEN is defined in linux/if_ether.h which is included by osdep_service.h, so remove the redundant definition from ieee80211.h. osdep_service.h:33:#include etherdevice.h:25:#include Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/ieee80211.h | 1 - 1 file changed, 1 deletion(-) commit 677b993a574957975c95c1f01a06d695161e9832 Author: Geordan Neukum Date: Sun Jun 2 15:58:37 2019 +0000 staging: kpc2000: kpc_spi: use devm_* API to manage mapped I/O space The kpc_spi driver does not unmap its I/O space upon error cases in the probe() function or upon remove(). Make the driver clean up after itself more maintainably by migrating to using the managed resource API. Signed-off-by: Geordan Neukum Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000_spi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1914e9ebd362af679a4bf384e7960d47788d27e1 Author: Geordan Neukum Date: Sun Jun 2 15:58:36 2019 +0000 staging: kpc2000: kpc_spi: remove function kp_spi_bytes_per_word() The static function kp_spi_bytes_per_word() is defined in kpc2000_spi.c, but it is completely unused. As this function is unused, it can and should be removed. Signed-off-by: Geordan Neukum Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000_spi.c | 14 -------------- 1 file changed, 14 deletions(-) commit 66594e3f48cc868abd0955d16bb661170674bda2 Author: Geordan Neukum Date: Sun Jun 2 15:58:35 2019 +0000 staging: kpc2000: kpc_spi: remove fifo_depth from kp_spi struct The kp_spi structure contains a member 'fifo_depth'. This member is never used. Therefore, it should be removed. Signed-off-by: Geordan Neukum Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000_spi.c | 1 - 1 file changed, 1 deletion(-) commit 32ed45068c7e79947da72f7a61800bae1dd39596 Author: Geordan Neukum Date: Sun Jun 2 15:58:34 2019 +0000 staging: kpc2000: kpc_spi: column-align switch and subordinate cases The linux style guide prescribes that switch statements and their subordinate case labels should be column-aligned rather than double-indenting the case label. Make kpc2000_spi.c follow the desired style with respect to switch/case alignment. Signed-off-by: Geordan Neukum Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000_spi.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 4d632cdbdd28aedf884f67e6cc61364ea4ded7d4 Author: Geordan Neukum Date: Sun Jun 2 15:58:33 2019 +0000 staging: kpc2000: kpc_spi: Remove unnecessary consecutive newlines The kpc2000_spi.c file contains instances of unnecessary consecutive newlines which negatively impact the readability of the file. Remove all unnecessary consecutive newlines. Signed-off-by: Geordan Neukum Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000_spi.c | 13 ------------- 1 file changed, 13 deletions(-) commit fc3e78dfcf52efdf56663cee66068286a8950e03 Author: Nishka Dasgupta Date: Fri May 31 02:25:31 2019 +0530 staging: rtl8712: Replace function r8712_init_mlme_priv Delete r8712_init_mlme_priv as it does nothing except call _init_mlme_priv, and rename _init_mlme_priv to r8712_init_mlme_priv. Change the type of the new r8712_init_mlme_priv (formerly _init_mlme_priv) to (non-static) int, from static sint. Signed-off-by: Nishka Dasgupta Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_mlme.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 7ec3ff690ddcb83c438fea75c81baab63432fbb7 Author: Nishka Dasgupta Date: Fri May 31 02:33:59 2019 +0530 staging: rtl8712: ieee80211.c: Remove leading p from variable names Remove leading p from the names of the following pointer variables: - pregistrypriv - pdev_network - pie - pbuf. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/ieee80211.c | 50 ++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 25 deletions(-) commit 313cca245d4b85189b3fc7e75e4fef837b2ed4e2 Author: Colin Ian King Date: Fri May 31 14:39:26 2019 +0100 staging: vc04_services: remove redundant assignment to pointer service Pointer service is being set to NULL however this value is never read and so the assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit a31f13af7da9c47ebbbc0d8d1161952bac9b09ed Author: Jeremy Sowden Date: Fri May 31 11:52:31 2019 +0100 staging: kpc2000: removed misc device. Now that all the card information is available via sysfs, the misc device is no longer necessary. Removed it. Signed-off-by: Jeremy Sowden Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/core.c | 127 +-------------------------------- drivers/staging/kpc2000/kpc2000/pcie.h | 2 - 2 files changed, 2 insertions(+), 127 deletions(-) commit eb1a5c64729d636fc1ff13939001bc49c9b67613 Author: Jeremy Sowden Date: Fri May 31 11:52:30 2019 +0100 staging: kpc2000: export more device attributes via sysfs. Added more read-only device attributes in order to expose all the information about the hardware which is available by calling read() or ioct() on the misc device associated with it. Signed-off-by: Jeremy Sowden Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/core.c | 57 ++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) commit 888dc273ea4e7ca332a6f73d10dfc8f2b212c803 Merge: 324e8f5f5d9d f2c7c76c5d0a Author: Greg Kroah-Hartman Date: Mon Jun 3 13:53:20 2019 +0200 Merge 5.2-rc3 into tty-next We want the tty/serial fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit d98010817a26eba8d4d1e8a639e0b7d7f042308a Author: Colin Ian King Date: Fri May 31 13:05:59 2019 +0100 phy: qcom-qusb2: fix missing assignment of ret when calling clk_prepare_enable The error return from the call to clk_prepare_enable is not being assigned to variable ret even though ret is being used to check if the call failed. Fix this by adding in the missing assignment. Addresses-Coverity: ("Logically dead code") Fixes: 891a96f65ac3 ("phy: qcom-qusb2: Add support for runtime PM") Signed-off-by: Colin Ian King Signed-off-by: Kishon Vijay Abraham I drivers/phy/qualcomm/phy-qcom-qusb2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 69fbb3f47327d959830c94bf31893972b8c8f700 Author: Kefeng Wang Date: Thu May 30 03:25:49 2019 -0400 media: wl128x: Fix some error handling in fm_v4l2_init_video_device() X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected The fm_v4l2_init_video_device() forget to unregister v4l2/video device in the error path, it could lead to UAF issue, eg, BUG: KASAN: use-after-free in atomic64_read include/asm-generic/atomic-instrumented.h:836 [inline] BUG: KASAN: use-after-free in atomic_long_read include/asm-generic/atomic-long.h:28 [inline] BUG: KASAN: use-after-free in __mutex_unlock_slowpath+0x92/0x690 kernel/locking/mutex.c:1206 Read of size 8 at addr ffff8881e84a7c70 by task v4l_id/3659 CPU: 1 PID: 3659 Comm: v4l_id Not tainted 5.1.0 #8 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1ubuntu1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0xa9/0x10e lib/dump_stack.c:113 print_address_description+0x65/0x270 mm/kasan/report.c:187 kasan_report+0x149/0x18d mm/kasan/report.c:317 atomic64_read include/asm-generic/atomic-instrumented.h:836 [inline] atomic_long_read include/asm-generic/atomic-long.h:28 [inline] __mutex_unlock_slowpath+0x92/0x690 kernel/locking/mutex.c:1206 fm_v4l2_fops_open+0xac/0x120 [fm_drv] v4l2_open+0x191/0x390 [videodev] chrdev_open+0x20d/0x570 fs/char_dev.c:417 do_dentry_open+0x700/0xf30 fs/open.c:777 do_last fs/namei.c:3416 [inline] path_openat+0x7c4/0x2a90 fs/namei.c:3532 do_filp_open+0x1a5/0x2b0 fs/namei.c:3563 do_sys_open+0x302/0x490 fs/open.c:1069 do_syscall_64+0x9f/0x450 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f8180c17c8e ... Allocated by task 3642: set_track mm/kasan/common.c:87 [inline] __kasan_kmalloc.constprop.3+0xa0/0xd0 mm/kasan/common.c:497 fm_drv_init+0x13/0x1000 [fm_drv] do_one_initcall+0xbc/0x47d init/main.c:901 do_init_module+0x1b5/0x547 kernel/module.c:3456 load_module+0x6405/0x8c10 kernel/module.c:3804 __do_sys_finit_module+0x162/0x190 kernel/module.c:3898 do_syscall_64+0x9f/0x450 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 3642: set_track mm/kasan/common.c:87 [inline] __kasan_slab_free+0x130/0x180 mm/kasan/common.c:459 slab_free_hook mm/slub.c:1429 [inline] slab_free_freelist_hook mm/slub.c:1456 [inline] slab_free mm/slub.c:3003 [inline] kfree+0xe1/0x270 mm/slub.c:3958 fm_drv_init+0x1e6/0x1000 [fm_drv] do_one_initcall+0xbc/0x47d init/main.c:901 do_init_module+0x1b5/0x547 kernel/module.c:3456 load_module+0x6405/0x8c10 kernel/module.c:3804 __do_sys_finit_module+0x162/0x190 kernel/module.c:3898 do_syscall_64+0x9f/0x450 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Add relevant unregister functions to fix it. Cc: Hans Verkuil Reported-by: Hulk Robot Signed-off-by: Kefeng Wang Signed-off-by: Mauro Carvalho Chehab drivers/media/radio/wl128x/fmdrv_v4l2.c | 3 +++ 1 file changed, 3 insertions(+) commit 2de03c11171544bd23e18539f65b3b561d57ff76 Merge: e314a7c92b32 f2c7c76c5d0a Author: Joerg Roedel Date: Mon Jun 3 13:00:40 2019 +0200 Merge tag 'v5.2-rc3' into x86/vt-d Linux 5.2-rc3 commit fff9b6c7d26943a8eb32b58364b7ec6b9369746a Author: Peter Zijlstra Date: Fri May 24 13:52:31 2019 +0200 Documentation/atomic_t.txt: Clarify pure non-rmw usage Clarify that pure non-RMW usage of atomic_t is pointless, there is nothing 'magical' about atomic_set() / atomic_read(). This is something that seems to confuse people, because I happen upon it semi-regularly. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Greg Kroah-Hartman Acked-by: Will Deacon Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20190524115231.GN2623@hirez.programming.kicks-ass.net Signed-off-by: Ingo Molnar Documentation/atomic_t.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 6a6a9d5fb9f26d2c2127497f3a42adbeb5ccc2a4 Author: Mark Rutland Date: Wed May 22 14:22:50 2019 +0100 locking/atomic, s390/pci: Remove redundant casts Now that atomic64_read() returns s64 consistently, we don't need to explicitly cast its return value. Drop the redundant casts. Signed-off-by: Mark Rutland Signed-off-by: Peter Zijlstra (Intel) Cc: Heiko Carstens Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Will Deacon Cc: aou@eecs.berkeley.edu Cc: arnd@arndb.de Cc: bp@alien8.de Cc: catalin.marinas@arm.com Cc: davem@davemloft.net Cc: fenghua.yu@intel.com Cc: herbert@gondor.apana.org.au Cc: ink@jurassic.park.msu.ru Cc: jhogan@kernel.org Cc: linux@armlinux.org.uk Cc: mattst88@gmail.com Cc: mpe@ellerman.id.au Cc: palmer@sifive.com Cc: paul.burton@mips.com Cc: paulus@samba.org Cc: ralf@linux-mips.org Cc: rth@twiddle.net Cc: tony.luck@intel.com Cc: vgupta@synopsys.com Link: https://lkml.kernel.org/r/20190522132250.26499-19-mark.rutland@arm.com Signed-off-by: Ingo Molnar arch/s390/pci/pci_debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2af7a0f91c3a645ec9f1cd68e41472021746db35 Author: Mark Rutland Date: Wed May 22 14:22:49 2019 +0100 locking/atomic, crypto/nx: Remove redundant casts Now that atomic64_read() returns s64 consistently, we don't need to explicitly cast its return value. Drop the redundant casts. Signed-off-by: Mark Rutland Signed-off-by: Peter Zijlstra (Intel) Cc: Herbert Xu Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Will Deacon Cc: aou@eecs.berkeley.edu Cc: arnd@arndb.de Cc: bp@alien8.de Cc: catalin.marinas@arm.com Cc: davem@davemloft.net Cc: fenghua.yu@intel.com Cc: heiko.carstens@de.ibm.com Cc: ink@jurassic.park.msu.ru Cc: jhogan@kernel.org Cc: linux@armlinux.org.uk Cc: mattst88@gmail.com Cc: mpe@ellerman.id.au Cc: palmer@sifive.com Cc: paul.burton@mips.com Cc: paulus@samba.org Cc: ralf@linux-mips.org Cc: rth@twiddle.net Cc: tony.luck@intel.com Cc: vgupta@synopsys.com Link: https://lkml.kernel.org/r/20190522132250.26499-18-mark.rutland@arm.com Signed-off-by: Ingo Molnar drivers/crypto/nx/nx-842-pseries.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3724921396dd1a07c93e3516b8d7c9ff570d17a9 Author: Mark Rutland Date: Wed May 22 14:22:48 2019 +0100 locking/atomic: Use s64 for atomic64_t on 64-bit Now that all architectures use 64 consistently as the base type for the atomic64 API, let's have the CONFIG_64BIT definition of atomic64_t use s64 as the underlying type for atomic64_t, rather than long, matching the generated headers. On architectures where atomic64_read(v) is READ_ONCE(v->counter), this patch will cause the return type of atomic64_read() to be s64. As of this patch, the atomic64 API can be relied upon to consistently return s64 where a value rather than boolean condition is returned. This should make code more robust, and simpler, allowing for the removal of casts previously required to ensure consistent types. Signed-off-by: Mark Rutland Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Will Deacon Cc: aou@eecs.berkeley.edu Cc: arnd@arndb.de Cc: bp@alien8.de Cc: catalin.marinas@arm.com Cc: davem@davemloft.net Cc: fenghua.yu@intel.com Cc: heiko.carstens@de.ibm.com Cc: herbert@gondor.apana.org.au Cc: ink@jurassic.park.msu.ru Cc: jhogan@kernel.org Cc: linux@armlinux.org.uk Cc: mattst88@gmail.com Cc: mpe@ellerman.id.au Cc: palmer@sifive.com Cc: paul.burton@mips.com Cc: paulus@samba.org Cc: ralf@linux-mips.org Cc: rth@twiddle.net Cc: tony.luck@intel.com Cc: vgupta@synopsys.com Link: https://lkml.kernel.org/r/20190522132250.26499-17-mark.rutland@arm.com Signed-off-by: Ingo Molnar include/linux/types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 79c53a83d7a31a5b5c7bafce4f0723bebf26836a Author: Mark Rutland Date: Wed May 22 14:22:47 2019 +0100 locking/atomic, x86: Use s64 for atomic64 As a step towards making the atomic64 API use consistent types treewide, let's have the x86 atomic64 implementation use s64 as the underlying type for atomic64_t, rather than long or long long, matching the generated headers. Note that the x86 arch_atomic64 implementation is already wrapped by the generic instrumented atomic64 implementation, which uses s64 consistently. Otherwise, there should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Signed-off-by: Peter Zijlstra (Intel) Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Russell King Cc: Thomas Gleixner Cc: Will Deacon Cc: aou@eecs.berkeley.edu Cc: arnd@arndb.de Cc: catalin.marinas@arm.com Cc: davem@davemloft.net Cc: fenghua.yu@intel.com Cc: heiko.carstens@de.ibm.com Cc: herbert@gondor.apana.org.au Cc: ink@jurassic.park.msu.ru Cc: jhogan@kernel.org Cc: mattst88@gmail.com Cc: mpe@ellerman.id.au Cc: palmer@sifive.com Cc: paul.burton@mips.com Cc: paulus@samba.org Cc: ralf@linux-mips.org Cc: rth@twiddle.net Cc: tony.luck@intel.com Cc: vgupta@synopsys.com Link: https://lkml.kernel.org/r/20190522132250.26499-16-mark.rutland@arm.com Signed-off-by: Ingo Molnar arch/x86/include/asm/atomic64_32.h | 66 ++++++++++++++++++-------------------- arch/x86/include/asm/atomic64_64.h | 38 +++++++++++----------- 2 files changed, 51 insertions(+), 53 deletions(-) commit 04e8851af767153c0878cc79ce30c0d8806eec43 Author: Mark Rutland Date: Wed May 22 14:22:46 2019 +0100 locking/atomic, sparc: Use s64 for atomic64 As a step towards making the atomic64 API use consistent types treewide, let's have the sparc atomic64 implementation use s64 as the underlying type for atomic64_t, rather than long, matching the generated headers. As atomic64_read() depends on the generic defintion of atomic64_t, this still returns long. This will be converted in a subsequent patch. Otherwise, there should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Signed-off-by: Peter Zijlstra (Intel) Cc: David S. Miller Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Will Deacon Cc: aou@eecs.berkeley.edu Cc: arnd@arndb.de Cc: bp@alien8.de Cc: catalin.marinas@arm.com Cc: fenghua.yu@intel.com Cc: heiko.carstens@de.ibm.com Cc: herbert@gondor.apana.org.au Cc: ink@jurassic.park.msu.ru Cc: jhogan@kernel.org Cc: linux@armlinux.org.uk Cc: mattst88@gmail.com Cc: mpe@ellerman.id.au Cc: palmer@sifive.com Cc: paul.burton@mips.com Cc: paulus@samba.org Cc: ralf@linux-mips.org Cc: rth@twiddle.net Cc: tony.luck@intel.com Cc: vgupta@synopsys.com Link: https://lkml.kernel.org/r/20190522132250.26499-15-mark.rutland@arm.com Signed-off-by: Ingo Molnar arch/sparc/include/asm/atomic_64.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 0ca94800762e8a2f7037c9b02ba74aff8016dd82 Author: Mark Rutland Date: Wed May 22 14:22:45 2019 +0100 locking/atomic, s390: Use s64 for atomic64 As a step towards making the atomic64 API use consistent types treewide, let's have the s390 atomic64 implementation use s64 as the underlying type for atomic64_t, rather than long, matching the generated headers. As atomic64_read() depends on the generic defintion of atomic64_t, this still returns long. This will be converted in a subsequent patch. The s390-internal __atomic64_*() ops are also used by the s390 bitops, and expect pointers to long. Since atomic64_t::counter will be converted to s64 in a subsequent patch, pointes to this are explicitly cast to pointers to long when passed to __atomic64_*() ops. Otherwise, there should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Signed-off-by: Peter Zijlstra (Intel) Cc: Heiko Carstens Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Will Deacon Cc: aou@eecs.berkeley.edu Cc: arnd@arndb.de Cc: bp@alien8.de Cc: catalin.marinas@arm.com Cc: davem@davemloft.net Cc: fenghua.yu@intel.com Cc: herbert@gondor.apana.org.au Cc: ink@jurassic.park.msu.ru Cc: jhogan@kernel.org Cc: linux@armlinux.org.uk Cc: mattst88@gmail.com Cc: mpe@ellerman.id.au Cc: palmer@sifive.com Cc: paul.burton@mips.com Cc: paulus@samba.org Cc: ralf@linux-mips.org Cc: rth@twiddle.net Cc: tony.luck@intel.com Cc: vgupta@synopsys.com Link: https://lkml.kernel.org/r/20190522132250.26499-14-mark.rutland@arm.com Signed-off-by: Ingo Molnar arch/s390/include/asm/atomic.h | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) commit 0754211847d7a228f1c34a49fd122979dfd19a1a Author: Mark Rutland Date: Wed May 22 14:22:44 2019 +0100 locking/atomic, riscv: Use s64 for atomic64 As a step towards making the atomic64 API use consistent types treewide, let's have the RISC-V atomic64 implementation use s64 as the underlying type for atomic64_t, rather than long, matching the generated headers. As atomic64_read() depends on the generic defintion of atomic64_t, this still returns long on 64-bit. This will be converted in a subsequent patch. Otherwise, there should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Palmer Dabbelt Cc: Albert Ou Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Will Deacon Cc: arnd@arndb.de Cc: bp@alien8.de Cc: catalin.marinas@arm.com Cc: davem@davemloft.net Cc: fenghua.yu@intel.com Cc: heiko.carstens@de.ibm.com Cc: herbert@gondor.apana.org.au Cc: ink@jurassic.park.msu.ru Cc: jhogan@kernel.org Cc: linux@armlinux.org.uk Cc: mattst88@gmail.com Cc: mpe@ellerman.id.au Cc: paul.burton@mips.com Cc: paulus@samba.org Cc: ralf@linux-mips.org Cc: rth@twiddle.net Cc: tony.luck@intel.com Cc: vgupta@synopsys.com Link: https://lkml.kernel.org/r/20190522132250.26499-13-mark.rutland@arm.com Signed-off-by: Ingo Molnar arch/riscv/include/asm/atomic.h | 44 +++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 21 deletions(-) commit 33e42ef571979fe6601ac838d338eb599d842a6d Author: Mark Rutland Date: Wed May 22 14:22:43 2019 +0100 locking/atomic, riscv: Fix atomic64_sub_if_positive() offset argument Presently the riscv implementation of atomic64_sub_if_positive() takes a 32-bit offset value rather than a 64-bit offset value as it should do. Thus, if called with a 64-bit offset, the value will be unexpectedly truncated to 32 bits. Fix this by taking the offset as a long rather than an int. Signed-off-by: Mark Rutland Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Palmer Dabbelt Cc: Albert Ou Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Will Deacon Cc: arnd@arndb.de Cc: bp@alien8.de Cc: catalin.marinas@arm.com Cc: davem@davemloft.net Cc: fenghua.yu@intel.com Cc: heiko.carstens@de.ibm.com Cc: herbert@gondor.apana.org.au Cc: ink@jurassic.park.msu.ru Cc: jhogan@kernel.org Cc: linux@armlinux.org.uk Cc: mattst88@gmail.com Cc: mpe@ellerman.id.au Cc: paul.burton@mips.com Cc: paulus@samba.org Cc: ralf@linux-mips.org Cc: rth@twiddle.net Cc: tony.luck@intel.com Cc: vgupta@synopsys.com Link: https://lkml.kernel.org/r/20190522132250.26499-12-mark.rutland@arm.com Signed-off-by: Ingo Molnar arch/riscv/include/asm/atomic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8cd8de59748ba71b476d1b7101f9ecaccd5cb8c2 Author: Mark Rutland Date: Wed May 22 14:22:42 2019 +0100 locking/atomic, powerpc: Use s64 for atomic64 As a step towards making the atomic64 API use consistent types treewide, let's have the powerpc atomic64 implementation use s64 as the underlying type for atomic64_t, rather than long, matching the generated headers. As atomic64_read() depends on the generic defintion of atomic64_t, this still returns long on 64-bit. This will be converted in a subsequent patch. Otherwise, there should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Michael Ellerman Cc: Linus Torvalds Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Will Deacon Cc: aou@eecs.berkeley.edu Cc: arnd@arndb.de Cc: bp@alien8.de Cc: catalin.marinas@arm.com Cc: davem@davemloft.net Cc: fenghua.yu@intel.com Cc: heiko.carstens@de.ibm.com Cc: herbert@gondor.apana.org.au Cc: ink@jurassic.park.msu.ru Cc: jhogan@kernel.org Cc: linux@armlinux.org.uk Cc: mattst88@gmail.com Cc: palmer@sifive.com Cc: paul.burton@mips.com Cc: ralf@linux-mips.org Cc: rth@twiddle.net Cc: tony.luck@intel.com Cc: vgupta@synopsys.com Link: https://lkml.kernel.org/r/20190522132250.26499-11-mark.rutland@arm.com Signed-off-by: Ingo Molnar arch/powerpc/include/asm/atomic.h | 44 +++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 22 deletions(-) commit d184cf1a449ca4cb0d86f3dd82c3337c645ea6c0 Author: Mark Rutland Date: Wed May 22 14:22:41 2019 +0100 locking/atomic, mips: Use s64 for atomic64 As a step towards making the atomic64 API use consistent types treewide, let's have the mips atomic64 implementation use s64 as the underlying type for atomic64_t, rather than long or __s64, matching the generated headers. As atomic64_read() depends on the generic defintion of atomic64_t, this still returns long on 64-bit. This will be converted in a subsequent patch. Otherwise, there should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Signed-off-by: Peter Zijlstra (Intel) Cc: James Hogan Cc: Linus Torvalds Cc: Paul Burton Cc: Peter Zijlstra Cc: Ralf Baechle Cc: Thomas Gleixner Cc: Will Deacon Cc: aou@eecs.berkeley.edu Cc: arnd@arndb.de Cc: bp@alien8.de Cc: catalin.marinas@arm.com Cc: davem@davemloft.net Cc: fenghua.yu@intel.com Cc: heiko.carstens@de.ibm.com Cc: herbert@gondor.apana.org.au Cc: ink@jurassic.park.msu.ru Cc: linux@armlinux.org.uk Cc: mattst88@gmail.com Cc: mpe@ellerman.id.au Cc: palmer@sifive.com Cc: paulus@samba.org Cc: rth@twiddle.net Cc: tony.luck@intel.com Cc: vgupta@synopsys.com Link: https://lkml.kernel.org/r/20190522132250.26499-10-mark.rutland@arm.com Signed-off-by: Ingo Molnar arch/mips/include/asm/atomic.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit d84e28d250150adc6526dcce4ca089e2b57430f3 Author: Mark Rutland Date: Wed May 22 14:22:40 2019 +0100 locking/atomic, ia64: Use s64 for atomic64 As a step towards making the atomic64 API use consistent types treewide, let's have the ia64 atomic64 implementation use s64 as the underlying type for atomic64_t, rather than long or __s64, matching the generated headers. As atomic64_read() depends on the generic defintion of atomic64_t, this still returns long. This will be converted in a subsequent patch. Otherwise, there should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Signed-off-by: Peter Zijlstra (Intel) Cc: Fenghua Yu Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tony Luck Cc: Will Deacon Cc: aou@eecs.berkeley.edu Cc: arnd@arndb.de Cc: bp@alien8.de Cc: catalin.marinas@arm.com Cc: davem@davemloft.net Cc: heiko.carstens@de.ibm.com Cc: herbert@gondor.apana.org.au Cc: ink@jurassic.park.msu.ru Cc: jhogan@kernel.org Cc: linux@armlinux.org.uk Cc: mattst88@gmail.com Cc: mpe@ellerman.id.au Cc: palmer@sifive.com Cc: paul.burton@mips.com Cc: paulus@samba.org Cc: ralf@linux-mips.org Cc: rth@twiddle.net Cc: vgupta@synopsys.com Link: https://lkml.kernel.org/r/20190522132250.26499-9-mark.rutland@arm.com Signed-off-by: Ingo Molnar arch/ia64/include/asm/atomic.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 16f18688af7ea6c65f6daa3efb4661415e2e6041 Author: Mark Rutland Date: Wed May 22 14:22:39 2019 +0100 locking/atomic, arm64: Use s64 for atomic64 As a step towards making the atomic64 API use consistent types treewide, let's have the arm64 atomic64 implementation use s64 as the underlying type for atomic64_t, rather than long, matching the generated headers. As atomic64_read() depends on the generic defintion of atomic64_t, this still returns long. This will be converted in a subsequent patch. Note that in arch_atomic64_dec_if_positive(), the x0 variable is left as long, as this variable is also used to hold the pointer to the atomic64_t. Otherwise, there should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Signed-off-by: Peter Zijlstra (Intel) Cc: Catalin Marinas Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Will Deacon Cc: aou@eecs.berkeley.edu Cc: arnd@arndb.de Cc: bp@alien8.de Cc: davem@davemloft.net Cc: fenghua.yu@intel.com Cc: heiko.carstens@de.ibm.com Cc: herbert@gondor.apana.org.au Cc: ink@jurassic.park.msu.ru Cc: jhogan@kernel.org Cc: linux@armlinux.org.uk Cc: mattst88@gmail.com Cc: mpe@ellerman.id.au Cc: palmer@sifive.com Cc: paul.burton@mips.com Cc: paulus@samba.org Cc: ralf@linux-mips.org Cc: rth@twiddle.net Cc: tony.luck@intel.com Cc: vgupta@synopsys.com Link: https://lkml.kernel.org/r/20190522132250.26499-8-mark.rutland@arm.com Signed-off-by: Ingo Molnar arch/arm64/include/asm/atomic_ll_sc.h | 20 ++++++++++---------- arch/arm64/include/asm/atomic_lse.h | 34 +++++++++++++++++----------------- 2 files changed, 27 insertions(+), 27 deletions(-) commit ef4cdc09260e2b0576423ca708e245e7549aa8e0 Author: Mark Rutland Date: Wed May 22 14:22:38 2019 +0100 locking/atomic, arm: Use s64 for atomic64 As a step towards making the atomic64 API use consistent types treewide, let's have the arm atomic64 implementation use s64 as the underlying type for atomic64_t, rather than long long, matching the generated headers. Otherwise, there should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Russell King Cc: Thomas Gleixner Cc: Will Deacon Cc: aou@eecs.berkeley.edu Cc: arnd@arndb.de Cc: bp@alien8.de Cc: catalin.marinas@arm.com Cc: davem@davemloft.net Cc: fenghua.yu@intel.com Cc: heiko.carstens@de.ibm.com Cc: herbert@gondor.apana.org.au Cc: ink@jurassic.park.msu.ru Cc: jhogan@kernel.org Cc: mattst88@gmail.com Cc: mpe@ellerman.id.au Cc: palmer@sifive.com Cc: paul.burton@mips.com Cc: paulus@samba.org Cc: ralf@linux-mips.org Cc: rth@twiddle.net Cc: tony.luck@intel.com Cc: vgupta@synopsys.com Link: https://lkml.kernel.org/r/20190522132250.26499-7-mark.rutland@arm.com Signed-off-by: Ingo Molnar arch/arm/include/asm/atomic.h | 50 +++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 26 deletions(-) commit 16fbad086976574b99ea7019c0504d0194e95dc3 Author: Mark Rutland Date: Wed May 22 14:22:37 2019 +0100 locking/atomic, arc: Use s64 for atomic64 As a step towards making the atomic64 API use consistent types treewide, let's have the arc atomic64 implementation use s64 as the underlying type for atomic64_t, rather than u64, matching the generated headers. Otherwise, there should be no functional change as a result of this patch. Acked-By: Vineet Gupta Signed-off-by: Mark Rutland Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Will Deacon Cc: aou@eecs.berkeley.edu Cc: arnd@arndb.de Cc: bp@alien8.de Cc: catalin.marinas@arm.com Cc: davem@davemloft.net Cc: fenghua.yu@intel.com Cc: heiko.carstens@de.ibm.com Cc: herbert@gondor.apana.org.au Cc: ink@jurassic.park.msu.ru Cc: jhogan@kernel.org Cc: linux@armlinux.org.uk Cc: mattst88@gmail.com Cc: mpe@ellerman.id.au Cc: palmer@sifive.com Cc: paul.burton@mips.com Cc: paulus@samba.org Cc: ralf@linux-mips.org Cc: rth@twiddle.net Cc: tony.luck@intel.com Link: https://lkml.kernel.org/r/20190522132250.26499-6-mark.rutland@arm.com Signed-off-by: Ingo Molnar arch/arc/include/asm/atomic.h | 41 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 21 deletions(-) commit 0203fdc160a8c8d8651a3b79aa453ec36cfbd867 Author: Mark Rutland Date: Wed May 22 14:22:36 2019 +0100 locking/atomic, alpha: Use s64 for atomic64 As a step towards making the atomic64 API use consistent types treewide, let's have the alpha atomic64 implementation use s64 as the underlying type for atomic64_t, rather than long, matching the generated headers. As atomic64_read() depends on the generic defintion of atomic64_t, this still returns long. This will be converted in a subsequent patch. Otherwise, there should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Signed-off-by: Peter Zijlstra (Intel) Cc: Ivan Kokshaysky Cc: Linus Torvalds Cc: Matt Turner Cc: Peter Zijlstra Cc: Richard Henderson Cc: Thomas Gleixner Cc: Will Deacon Cc: aou@eecs.berkeley.edu Cc: arnd@arndb.de Cc: bp@alien8.de Cc: catalin.marinas@arm.com Cc: davem@davemloft.net Cc: fenghua.yu@intel.com Cc: heiko.carstens@de.ibm.com Cc: herbert@gondor.apana.org.au Cc: jhogan@kernel.org Cc: linux@armlinux.org.uk Cc: mpe@ellerman.id.au Cc: palmer@sifive.com Cc: paul.burton@mips.com Cc: paulus@samba.org Cc: ralf@linux-mips.org Cc: tony.luck@intel.com Cc: vgupta@synopsys.com Link: https://lkml.kernel.org/r/20190522132250.26499-5-mark.rutland@arm.com Signed-off-by: Ingo Molnar arch/alpha/include/asm/atomic.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 9255813d5841e158f033e0d83d455bffdae009a4 Author: Mark Rutland Date: Wed May 22 14:22:35 2019 +0100 locking/atomic: Use s64 for atomic64 As a step towards making the atomic64 API use consistent types treewide, let's have the generic atomic64 implementation use s64 as the underlying type for atomic64_t, rather than long long, matching the generated headers. Otherwise, there should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Signed-off-by: Peter Zijlstra (Intel) Acked-by: Arnd Bergmann Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Will Deacon Cc: aou@eecs.berkeley.edu Cc: bp@alien8.de Cc: catalin.marinas@arm.com Cc: davem@davemloft.net Cc: fenghua.yu@intel.com Cc: heiko.carstens@de.ibm.com Cc: herbert@gondor.apana.org.au Cc: ink@jurassic.park.msu.ru Cc: jhogan@kernel.org Cc: linux@armlinux.org.uk Cc: mattst88@gmail.com Cc: mpe@ellerman.id.au Cc: palmer@sifive.com Cc: paul.burton@mips.com Cc: paulus@samba.org Cc: ralf@linux-mips.org Cc: rth@twiddle.net Cc: tony.luck@intel.com Cc: vgupta@synopsys.com Link: https://lkml.kernel.org/r/20190522132250.26499-4-mark.rutland@arm.com Signed-off-by: Ingo Molnar include/asm-generic/atomic64.h | 20 ++++++++++---------- lib/atomic64.c | 32 ++++++++++++++++---------------- 2 files changed, 26 insertions(+), 26 deletions(-) commit 982164d62a4b2097c0db28ae7c31fc905af26bb8 Author: Mark Rutland Date: Wed May 22 14:22:34 2019 +0100 locking/atomic, s390/pci: Prepare for atomic64_read() conversion The return type of atomic64_read() varies by architecture. It may return long (e.g. powerpc), long long (e.g. arm), or s64 (e.g. x86_64). This is somewhat painful, and mandates the use of explicit casts in some cases (e.g. when printing the return value). To ameliorate matters, subsequent patches will make the atomic64 API consistently use s64. As a preparatory step, this patch updates the s390 pci debug code to treat the return value of atomic64_read() as s64, using an explicit cast. This cast will be removed once the s64 conversion is complete. Signed-off-by: Mark Rutland Signed-off-by: Peter Zijlstra (Intel) Cc: Heiko Carstens Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Will Deacon Cc: aou@eecs.berkeley.edu Cc: arnd@arndb.de Cc: bp@alien8.de Cc: catalin.marinas@arm.com Cc: davem@davemloft.net Cc: fenghua.yu@intel.com Cc: herbert@gondor.apana.org.au Cc: ink@jurassic.park.msu.ru Cc: jhogan@kernel.org Cc: linux@armlinux.org.uk Cc: mattst88@gmail.com Cc: mpe@ellerman.id.au Cc: palmer@sifive.com Cc: paul.burton@mips.com Cc: paulus@samba.org Cc: ralf@linux-mips.org Cc: rth@twiddle.net Cc: tony.luck@intel.com Cc: vgupta@synopsys.com Link: https://lkml.kernel.org/r/20190522132250.26499-3-mark.rutland@arm.com Signed-off-by: Ingo Molnar arch/s390/pci/pci_debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 90fde663aed0a1c27e50dd1bf3f121141b2fe9f2 Author: Mark Rutland Date: Wed May 22 14:22:33 2019 +0100 locking/atomic, crypto/nx: Prepare for atomic64_read() conversion The return type of atomic64_read() varies by architecture. It may return long (e.g. powerpc), long long (e.g. arm), or s64 (e.g. x86_64). This is somewhat painful, and mandates the use of explicit casts in some cases (e.g. when printing the return value). To ameliorate matters, subsequent patches will make the atomic64 API consistently use s64. As a preparatory step, this patch updates the nx-842 code to treat the return value of atomic64_read() as s64, using explicit casts. These casts will be removed once the s64 conversion is complete. Signed-off-by: Mark Rutland Signed-off-by: Peter Zijlstra (Intel) Cc: Herbert Xu Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Will Deacon Cc: aou@eecs.berkeley.edu Cc: arnd@arndb.de Cc: bp@alien8.de Cc: catalin.marinas@arm.com Cc: davem@davemloft.net Cc: fenghua.yu@intel.com Cc: heiko.carstens@de.ibm.com Cc: ink@jurassic.park.msu.ru Cc: jhogan@kernel.org Cc: linux@armlinux.org.uk Cc: mattst88@gmail.com Cc: mpe@ellerman.id.au Cc: palmer@sifive.com Cc: paul.burton@mips.com Cc: paulus@samba.org Cc: ralf@linux-mips.org Cc: rth@twiddle.net Cc: tony.luck@intel.com Cc: vgupta@synopsys.com Link: https://lkml.kernel.org/r/20190522132250.26499-2-mark.rutland@arm.com Signed-off-by: Ingo Molnar drivers/crypto/nx/nx-842-pseries.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 24811637dbfd07c69da7e9db586d35d17e6afca3 Author: Peter Zijlstra Date: Mon May 27 10:23:26 2019 +0200 locking/lock_events: Use raw_cpu_{add,inc}() for stats Instead of playing silly games with CONFIG_DEBUG_PREEMPT toggling between this_cpu_*() and __this_cpu_*() use raw_cpu_*(), which is exactly what we want here. Signed-off-by: Peter Zijlstra (Intel) Acked-by: Linus Torvalds Cc: Borislav Petkov Cc: Davidlohr Bueso Cc: H. Peter Anvin Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tim Chen Cc: Waiman Long Cc: Will Deacon Cc: huang ying Link: https://lkml.kernel.org/r/20190527082326.GP2623@hirez.programming.kicks-ass.net Signed-off-by: Ingo Molnar kernel/locking/lock_events.h | 45 ++++---------------------------------------- 1 file changed, 4 insertions(+), 41 deletions(-) commit d9349850e188b8b59e5322fda17ff389a1c0cd7d Author: Imre Deak Date: Fri May 24 23:15:09 2019 +0300 locking/lockdep: Fix merging of hlocks with non-zero references The sequence static DEFINE_WW_CLASS(test_ww_class); struct ww_acquire_ctx ww_ctx; struct ww_mutex ww_lock_a; struct ww_mutex ww_lock_b; struct ww_mutex ww_lock_c; struct mutex lock_c; ww_acquire_init(&ww_ctx, &test_ww_class); ww_mutex_init(&ww_lock_a, &test_ww_class); ww_mutex_init(&ww_lock_b, &test_ww_class); ww_mutex_init(&ww_lock_c, &test_ww_class); mutex_init(&lock_c); ww_mutex_lock(&ww_lock_a, &ww_ctx); mutex_lock(&lock_c); ww_mutex_lock(&ww_lock_b, &ww_ctx); ww_mutex_lock(&ww_lock_c, &ww_ctx); mutex_unlock(&lock_c); (*) ww_mutex_unlock(&ww_lock_c); ww_mutex_unlock(&ww_lock_b); ww_mutex_unlock(&ww_lock_a); ww_acquire_fini(&ww_ctx); (**) will trigger the following error in __lock_release() when calling mutex_release() at **: DEBUG_LOCKS_WARN_ON(depth <= 0) The problem is that the hlock merging happening at * updates the references for test_ww_class incorrectly to 3 whereas it should've updated it to 4 (representing all the instances for ww_ctx and ww_lock_[abc]). Fix this by updating the references during merging correctly taking into account that we can have non-zero references (both for the hlock that we merge into another hlock or for the hlock we are merging into). Signed-off-by: Imre Deak Signed-off-by: Peter Zijlstra (Intel) Cc: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Will Deacon Link: https://lkml.kernel.org/r/20190524201509.9199-2-imre.deak@intel.com Signed-off-by: Ingo Molnar kernel/locking/lockdep.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 8c8889d8eaf4501ae4aaf870b6f8f55db5d5109a Author: Imre Deak Date: Fri May 24 23:15:08 2019 +0300 locking/lockdep: Fix OOO unlock when hlocks need merging The sequence static DEFINE_WW_CLASS(test_ww_class); struct ww_acquire_ctx ww_ctx; struct ww_mutex ww_lock_a; struct ww_mutex ww_lock_b; struct mutex lock_c; struct mutex lock_d; ww_acquire_init(&ww_ctx, &test_ww_class); ww_mutex_init(&ww_lock_a, &test_ww_class); ww_mutex_init(&ww_lock_b, &test_ww_class); mutex_init(&lock_c); ww_mutex_lock(&ww_lock_a, &ww_ctx); mutex_lock(&lock_c); ww_mutex_lock(&ww_lock_b, &ww_ctx); mutex_unlock(&lock_c); (*) ww_mutex_unlock(&ww_lock_b); ww_mutex_unlock(&ww_lock_a); ww_acquire_fini(&ww_ctx); triggers the following WARN in __lock_release() when doing the unlock at *: DEBUG_LOCKS_WARN_ON(curr->lockdep_depth != depth - 1); The problem is that the WARN check doesn't take into account the merging of ww_lock_a and ww_lock_b which results in decreasing curr->lockdep_depth by 2 not only 1. Note that the following sequence doesn't trigger the WARN, since there won't be any hlock merging. ww_acquire_init(&ww_ctx, &test_ww_class); ww_mutex_init(&ww_lock_a, &test_ww_class); ww_mutex_init(&ww_lock_b, &test_ww_class); mutex_init(&lock_c); mutex_init(&lock_d); ww_mutex_lock(&ww_lock_a, &ww_ctx); mutex_lock(&lock_c); mutex_lock(&lock_d); ww_mutex_lock(&ww_lock_b, &ww_ctx); mutex_unlock(&lock_d); ww_mutex_unlock(&ww_lock_b); ww_mutex_unlock(&ww_lock_a); mutex_unlock(&lock_c); ww_acquire_fini(&ww_ctx); In general both of the above two sequences are valid and shouldn't trigger any lockdep warning. Fix this by taking the decrement due to the hlock merging into account during lock release and hlock class re-setting. Merging can't happen during lock downgrading since there won't be a new possibility to merge hlocks in that case, so add a WARN if merging still happens then. Signed-off-by: Imre Deak Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Will Deacon Cc: ville.syrjala@linux.intel.com Link: https://lkml.kernel.org/r/20190524201509.9199-1-imre.deak@intel.com Signed-off-by: Ingo Molnar kernel/locking/lockdep.c | 41 +++++++++++++++++++++++++++++------------ 1 file changed, 29 insertions(+), 12 deletions(-) commit da38e9ec9c2d0ebec1499b5961baffd08f8ca062 Author: Geert Uytterhoeven Date: Mon May 27 13:52:53 2019 +0200 iommu/ipmmu-vmsa: Add suspend/resume support During PSCI system suspend, R-Car Gen3 SoCs are powered down, and all IPMMU state is lost. Hence after s2ram, devices wired behind an IPMMU, and configured to use it, will see their DMA operations hang. To fix this, restore all IPMMU contexts, and re-enable all active micro-TLBs during system resume. Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Signed-off-by: Joerg Roedel drivers/iommu/ipmmu-vmsa.c | 47 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) commit 892db541cc68eb39d7813af34f33ce74a0014a1d Author: Geert Uytterhoeven Date: Mon May 27 13:52:52 2019 +0200 iommu/ipmmu-vmsa: Extract hardware context initialization ipmmu_domain_init_context() takes care of (1) initializing the software domain, and (2) initializing the hardware context for the domain. Extract the code to initialize the hardware context into a new subroutine ipmmu_domain_setup_context(), to prepare for later reuse. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Signed-off-by: Joerg Roedel drivers/iommu/ipmmu-vmsa.c | 91 ++++++++++++++++++++++++---------------------- 1 file changed, 48 insertions(+), 43 deletions(-) commit b7f3f047aea47d82aeb251fb38a694e6d890d139 Author: Geert Uytterhoeven Date: Mon May 27 13:52:51 2019 +0200 iommu/ipmmu-vmsa: Move num_utlbs to SoC-specific features The maximum number of micro-TLBs per IPMMU instance is not fixed, but depends on the SoC type. Hence move it from struct ipmmu_vmsa_device to struct ipmmu_features, and set up the correct value for both R-Car Gen2 and Gen3 SoCs. Note that currently no code uses this value. Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart Reviewed-by: Simon Horman Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Signed-off-by: Joerg Roedel drivers/iommu/ipmmu-vmsa.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit b43e0d8a458cf267c98f914a4e0a4cafe2e8fd76 Author: Geert Uytterhoeven Date: Mon May 27 13:52:50 2019 +0200 iommu/ipmmu-vmsa: Make IPMMU_CTX_MAX unsigned Make the IPMMU_CTX_MAX constant unsigned, to match the type of ipmmu_features.number_of_contexts. This allows to use plain min() instead of type-casting min_t(). Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart Reviewed-by: Simon Horman Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Signed-off-by: Joerg Roedel drivers/iommu/ipmmu-vmsa.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 82576aa8af49a1aa31909a8500b972084582a118 Author: Geert Uytterhoeven Date: Mon May 27 13:52:49 2019 +0200 iommu/ipmmu-vmsa: Prepare to handle 40-bit error addresses On R-Car Gen3, the faulting virtual address is a 40-bit address, and comprised of two registers. Read the upper address part, and combine both parts, when running on a 64-bit system. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Signed-off-by: Joerg Roedel drivers/iommu/ipmmu-vmsa.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 80eaa9f558134a31c10dddb156d347b9c983290e Author: Geert Uytterhoeven Date: Mon May 27 13:52:48 2019 +0200 iommu/ipmmu-vmsa: Link IOMMUs and devices in sysfs As of commit 7af9a5fdb9e0ca33 ("iommu/ipmmu-vmsa: Use iommu_device_sysfs_add()/remove()"), IOMMU devices show up under /sys/class/iommu/, but their "devices" subdirectories are empty. Likewise, devices tied to an IOMMU do not have an "iommu" backlink. Make sure all links are created, on both arm32 and arm64. Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Signed-off-by: Joerg Roedel drivers/iommu/ipmmu-vmsa.c | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) commit 1b961423158caaae49d3900b7c9c37477bbfa9b3 Author: Nathan Chancellor Date: Wed May 29 01:15:32 2019 -0700 iommu/dma: Fix condition check in iommu_dma_unmap_sg Clang warns: drivers/iommu/dma-iommu.c:897:6: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses] if (!(attrs & DMA_ATTR_SKIP_CPU_SYNC) == 0) ^ ~~ drivers/iommu/dma-iommu.c:897:6: note: add parentheses after the '!' to evaluate the comparison first if (!(attrs & DMA_ATTR_SKIP_CPU_SYNC) == 0) ^ ( ) drivers/iommu/dma-iommu.c:897:6: note: add parentheses around left hand side expression to silence this warning if (!(attrs & DMA_ATTR_SKIP_CPU_SYNC) == 0) ^ ( ) 1 warning generated. Judging from the rest of the commit and the conditional in iommu_dma_map_sg, either if (!(attrs & DMA_ATTR_SKIP_CPU_SYNC)) or if ((attrs & DMA_ATTR_SKIP_CPU_SYNC) == 0) was intended, not a combination of the two. I personally think that the former is easier to understand so use that. Fixes: 06d60728ff5c ("iommu/dma: move the arm64 wrappers to common code") Link: https://github.com/ClangBuiltLinux/linux/issues/497 Signed-off-by: Nathan Chancellor Reviewed-by: Robin Murphy Reviewed-by: Christoph Hellwig Signed-off-by: Joerg Roedel drivers/iommu/dma-iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9b6e57e5a51696171de990b3c41bd53d4b8ab8ac Author: Eric Farman Date: Thu May 16 18:14:03 2019 +0200 s390/cio: Remove vfio-ccw checks of command codes If the CCW being processed is a No-Operation, then by definition no data is being transferred. Let's fold those checks into the normal CCW processors, rather than skipping out early. Likewise, if the CCW being processed is a "test" (a category defined here as an opcode that contains zero in the lowest four bits) then no special processing is necessary as far as vfio-ccw is concerned. These command codes have not been valid since the S/370 days, meaning they are invalid in the same way as one that ends in an eight [1] or an otherwise valid command code that is undefined for the device type in question. Considering that, let's just process "test" CCWs like any other CCW, and send everything to the hardware. [1] POPS states that a x08 is a TIC CCW, and that having any high-order bits enabled is invalid for format-1 CCWs. For format-0 CCWs, the high-order bits are ignored. Signed-off-by: Eric Farman Message-Id: <20190516161403.79053-4-farman@linux.ibm.com> Acked-by: Farhan Ali Signed-off-by: Cornelia Huck drivers/s390/cio/vfio_ccw_cp.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 453eac312445ecf9027d9bd49781b62b04140960 Author: Eric Farman Date: Thu May 16 18:14:02 2019 +0200 s390/cio: Allow zero-length CCWs in vfio-ccw It is possible that a guest might issue a CCW with a length of zero, and will expect a particular response. Consider this chain: Address Format-1 CCW -------- ----------------- 0 33110EC0 346022CC 33177468 1 33110EC8 CF200000 3318300C CCW[0] moves a little more than two pages, but also has the Suppress Length Indication (SLI) bit set to handle the expectation that considerably less data will be moved. CCW[1] also has the SLI bit set, and has a length of zero. Once vfio-ccw does its magic, the kernel issues a start subchannel on behalf of the guest with this: Address Format-1 CCW -------- ----------------- 0 021EDED0 346422CC 021F0000 1 021EDED8 CF240000 3318300C Both CCWs were converted to an IDAL and have the corresponding flags set (which is by design), but only the address of the first data address is converted to something the host is aware of. The second CCW still has the address used by the guest, which happens to be (A) (probably) an invalid address for the host, and (B) an invalid IDAW address (doubleword boundary, etc.). While the I/O fails, it doesn't fail correctly. In this example, we would receive a program check for an invalid IDAW address, instead of a unit check for an invalid command. To fix this, revert commit 4cebc5d6a6ff ("vfio: ccw: validate the count field of a ccw before pinning") and allow the individual fetch routines to process them like anything else. We'll make a slight adjustment to our allocation of the pfn_array (for direct CCWs) or IDAL (for IDAL CCWs) memory, so that we have room for at least one address even though no guest memory will be pinned and thus the IDAW will not be populated with a host address. Signed-off-by: Eric Farman Message-Id: <20190516161403.79053-3-farman@linux.ibm.com> Acked-by: Farhan Ali Signed-off-by: Cornelia Huck drivers/s390/cio/vfio_ccw_cp.c | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) commit 5d87fbf70fb4f4be695a3052aa8b2883be026ce7 Author: Eric Farman Date: Thu May 16 18:14:01 2019 +0200 s390/cio: Don't pin vfio pages for empty transfers The skip flag of a CCW offers the possibility of data not being transferred, but is only meaningful for certain commands. Specifically, it is only applicable for a read, read backward, sense, or sense ID CCW and will be ignored for any other command code (SA22-7832-11 page 15-64, and figure 15-30 on page 15-75). (A sense ID is xE4, while a sense is x04 with possible modifiers in the upper four bits. So we will cover the whole "family" of sense CCWs.) For those scenarios, since there is no requirement for the target address to be valid, we should skip the call to vfio_pin_pages() and rely on the IDAL address we have allocated/built for the channel program. The fact that the individual IDAWs within the IDAL are invalid is fine, since they aren't actually checked in these cases. Set pa_nr to zero when skipping the pfn_array_pin() call, since it is defined as the number of pages pinned and is used to determine whether to call vfio_unpin_pages() upon cleanup. The pfn_array_pin() routine returns the number of pages that were pinned, but now might be skipped for some CCWs. Thus we need to calculate the expected number of pages ourselves such that we are guaranteed to allocate a reasonable number of IDAWs, which will provide a valid address in CCW.CDA regardless of whether the IDAWs are filled in with pinned/translated addresses or not. Signed-off-by: Eric Farman Message-Id: <20190516161403.79053-2-farman@linux.ibm.com> Acked-by: Farhan Ali Signed-off-by: Cornelia Huck drivers/s390/cio/vfio_ccw_cp.c | 55 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 50 insertions(+), 5 deletions(-) commit c34a12e6a3df3aae8cb6f47baf0d14ef0fbecf7f Author: Eric Farman Date: Wed May 15 01:42:45 2019 +0200 s390/cio: Initialize the host addresses in pfn_array Let's initialize the host address to something that is invalid, rather than letting it default to zero. This just makes it easier to notice when a pin operation has failed or been skipped. Signed-off-by: Eric Farman Message-Id: <20190514234248.36203-5-farman@linux.ibm.com> Reviewed-by: Farhan Ali Signed-off-by: Cornelia Huck drivers/s390/cio/vfio_ccw_cp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e4f3f18b12324e2c140b97f93e3259eee9696d11 Author: Eric Farman Date: Wed May 15 01:42:44 2019 +0200 s390/cio: Split pfn_array_alloc_pin into pieces The pfn_array_alloc_pin routine is doing too much. Today, it does the alloc of the pfn_array struct and its member arrays, builds the iova address lists out of a contiguous piece of guest memory, and asks vfio to pin the resulting pages. Let's effectively revert a significant portion of commit 5c1cfb1c3948 ("vfio: ccw: refactor and improve pfn_array_alloc_pin()") such that we break pfn_array_alloc_pin() into its component pieces, and have one routine that allocates/populates the pfn_array structs, and another that actually pins the memory. In the future, we will be able to handle scenarios where pinning memory isn't actually appropriate. Signed-off-by: Eric Farman Message-Id: <20190514234248.36203-4-farman@linux.ibm.com> Reviewed-by: Farhan Ali Signed-off-by: Cornelia Huck drivers/s390/cio/vfio_ccw_cp.c | 64 ++++++++++++++++++++++++++++++------------ 1 file changed, 46 insertions(+), 18 deletions(-) commit 4e31d6aecfbbe63cf09b8fe48572d20d2062c406 Author: Eric Farman Date: Wed May 15 01:42:43 2019 +0200 s390/cio: Set vfio-ccw FSM state before ioeventfd Otherwise, the guest can believe it's okay to start another I/O and bump into the non-idle state. This results in a cc=2 (with the asynchronous CSCH/HSCH code) returned to the guest, which is unfortunate since everything is otherwise working normally. Signed-off-by: Eric Farman Reviewed-by: Pierre Morel Message-Id: <20190514234248.36203-3-farman@linux.ibm.com> Reviewed-by: Farhan Ali Signed-off-by: Cornelia Huck drivers/s390/cio/vfio_ccw_drv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 15f0eb3d6a62b22b27449329f04ee9aa0d218c6a Author: Eric Farman Date: Wed May 15 01:42:42 2019 +0200 s390/cio: Update SCSW if it points to the end of the chain Per the POPs [1], when processing an interrupt the SCSW.CPA field of an IRB generally points to 8 bytes after the last CCW that was executed (there are exceptions, but this is the most common behavior). In the case of an error, this points us to the first un-executed CCW in the chain. But in the case of normal I/O, the address points beyond the end of the chain. While the guest generally only cares about this when possibly restarting a channel program after error recovery, we should convert the address even in the good scenario so that we provide a consistent, valid, response upon I/O completion. [1] Figure 16-6 in SA22-7832-11. The footnotes in that table also state that this is true even if the resulting address is invalid or protected, but moving to the end of the guest chain should not be a surprise. Signed-off-by: Eric Farman Message-Id: <20190514234248.36203-2-farman@linux.ibm.com> Reviewed-by: Farhan Ali Signed-off-by: Cornelia Huck drivers/s390/cio/vfio_ccw_cp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 3384c78631dd722c2cdc5c57fbdd39fc1b5a9f2d Merge: 6a9f4efe78af eb876fbc248e Author: Ingo Molnar Date: Mon Jun 3 11:58:45 2019 +0200 Merge branch 'x86/topology' into perf/core, to prepare for new patches Signed-off-by: Ingo Molnar commit 6a9f4efe78af6069a11946c64d3d4c86cb42046b Author: Jiri Olsa Date: Sun May 12 17:55:18 2019 +0200 perf/x86: Use update attribute groups for default attributes Using the new pmu::update_attrs attribute group for default attributes - freeze_on_smi, allow_tsx_force_abort. Signed-off-by: Jiri Olsa Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Greg Kroah-Hartman Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20190512155518.21468-10-jolsa@kernel.org Signed-off-by: Ingo Molnar arch/x86/events/core.c | 34 ---------------------------------- arch/x86/events/intel/core.c | 9 +++++---- arch/x86/events/perf_event.h | 3 --- 3 files changed, 5 insertions(+), 41 deletions(-) commit b657688069a24c3c81b6de22e0e57e1785d9211f Author: Jiri Olsa Date: Sun May 12 17:55:17 2019 +0200 perf/x86/intel: Use update attributes for skylake format Using the new pmu::update_attrs attribute group for skylake specific format attributes. Signed-off-by: Jiri Olsa Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Greg Kroah-Hartman Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20190512155518.21468-9-jolsa@kernel.org Signed-off-by: Ingo Molnar arch/x86/events/intel/core.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 3ea40ac77261530b2c96734b99c0c9f1dc1d729d Author: Jiri Olsa Date: Sun May 12 17:55:16 2019 +0200 perf/x86: Use update attribute groups for extra format Using the new pmu::update_attrs attribute group for extra "format" directory. Signed-off-by: Jiri Olsa Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Greg Kroah-Hartman Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20190512155518.21468-8-jolsa@kernel.org Signed-off-by: Ingo Molnar arch/x86/events/intel/core.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit 1f157286829c78c0bd8e495951a5c098d88e3d1a Author: Jiri Olsa Date: Sun May 12 17:55:15 2019 +0200 perf/x86: Use update attribute groups for caps Using the new pmu::update_attrs attribute group for "caps" directory. Signed-off-by: Jiri Olsa Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Greg Kroah-Hartman Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20190512155518.21468-7-jolsa@kernel.org Signed-off-by: Ingo Molnar arch/x86/events/core.c | 8 -------- arch/x86/events/intel/core.c | 25 ++++++++++++++++++++----- arch/x86/events/perf_event.h | 1 - 3 files changed, 20 insertions(+), 14 deletions(-) commit 3d5672735b2348f5b13679a27f90c0847d22125d Author: Jiri Olsa Date: Sun May 12 17:55:14 2019 +0200 perf/x86: Add is_visible attribute_group callback for base events We dont need to pre-filter out unsupported base events, we can just use its group's is_visible function to do this. Signed-off-by: Jiri Olsa Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Greg Kroah-Hartman Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20190512155518.21468-6-jolsa@kernel.org Signed-off-by: Ingo Molnar arch/x86/events/core.c | 53 ++++++++++++++------------------------------------ 1 file changed, 15 insertions(+), 38 deletions(-) commit baa0c83363c7aafb04734acf4ac252be8e13bd88 Author: Jiri Olsa Date: Sun May 12 17:55:13 2019 +0200 perf/x86: Use the new pmu::update_attrs attribute group Using the new pmu::update_attrs attribute group to create detected events for x86_pmu. Moving the topdown/memory/tsx attributes to separate attribute groups with specific is_visible functions. Signed-off-by: Jiri Olsa Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Greg Kroah-Hartman Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20190512155518.21468-5-jolsa@kernel.org Signed-off-by: Ingo Molnar arch/x86/events/core.c | 10 ++---- arch/x86/events/intel/core.c | 86 +++++++++++++++++++++++++------------------- arch/x86/events/perf_event.h | 2 +- 3 files changed, 52 insertions(+), 46 deletions(-) commit 21b0dbc5e8b050e40a93a1f8cdef277502a4fc90 Author: Jiri Olsa Date: Sun May 12 17:55:12 2019 +0200 perf/x86: Get rid of x86_pmu::event_attrs Nobody is using that. Signed-off-by: Jiri Olsa Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Greg Kroah-Hartman Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20190512155518.21468-4-jolsa@kernel.org Signed-off-by: Ingo Molnar arch/x86/events/core.c | 3 --- arch/x86/events/perf_event.h | 1 - 2 files changed, 4 deletions(-) commit f3a3a8257e5a1a5e67cbb1afdbc4c1c6a26f1b22 Author: Jiri Olsa Date: Sun May 12 17:55:11 2019 +0200 perf/core: Add attr_groups_update into struct pmu Adding attr_update attribute group into pmu, to allow having multiple attribute groups for same group name. This will allow us to update "events" or "format" directories with attributes that depend on various HW conditions. For example having group_format_extra group that updates "format" directory only if pmu version is 2 and higher: static umode_t exra_is_visible(struct kobject *kobj, struct attribute *attr, int i) { return x86_pmu.version >= 2 ? attr->mode : 0; } static struct attribute_group group_format_extra = { .name = "format", .is_visible = exra_is_visible, }; Signed-off-by: Jiri Olsa Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Greg Kroah-Hartman Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20190512155518.21468-3-jolsa@kernel.org Signed-off-by: Ingo Molnar include/linux/perf_event.h | 1 + kernel/events/core.c | 6 ++++++ 2 files changed, 7 insertions(+) commit aac1f7f95f115d5a5329be05b80022e72df7d080 Author: Jiri Olsa Date: Sun May 12 17:55:10 2019 +0200 sysfs: Add sysfs_update_groups function Adding sysfs_update_groups function to update multiple groups. sysfs_update_groups - given a directory kobject, create a bunch of attribute groups @kobj: The kobject to update the group on @groups: The attribute groups to update, NULL terminated This function update a bunch of attribute groups. If an error occurs when updating a group, all previously updated groups will be removed together with already existing (not updated) attributes. Signed-off-by: Jiri Olsa Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Greg Kroah-Hartman Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Linus Torvalds Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20190512155518.21468-2-jolsa@kernel.org Signed-off-by: Ingo Molnar fs/sysfs/group.c | 54 +++++++++++++++++++++++++++++++++++++-------------- include/linux/sysfs.h | 8 ++++++++ 2 files changed, 47 insertions(+), 15 deletions(-) commit 6e86d3db5f8fb69eea76cc496c3c3da19c855aa9 Author: Gayatri Kammela Date: Fri May 10 17:03:11 2019 -0700 perf/x86/intel/uncore: Add new IMC PCI IDs for KabyLake, AmberLake and WhiskeyLake CPUs AmberLake and WhiskeyLake have same client uncore events as KabyLake. Thus add the PCI IDs for AmberLake Y processor lines, for WhiskeyLake U processor lines and for KabyLake, add H processor line and workstation. Platform Device ID ================================ AML Y 2 Core 590Ch KBL H 4 Core 5910h KBL 4 Core WorkStation 5918h WHL U 4 Core 3ED0h WHL U 4 Core 3E34h WHL U 2 Core 3E35h AML Y 4 Core 590Dh Signed-off-by: Gayatri Kammela Signed-off-by: Peter Zijlstra (Intel) Cc: Charles Prestopine Cc: Kan Liang Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20190511000311.20733-2-gayatri.kammela@intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/uncore_snb.c | 43 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) commit 76a16b217a7f086c1c7c2d5f52efddb0c855b278 Author: Gayatri Kammela Date: Fri May 10 17:03:10 2019 -0700 perf/x86/intel/uncore: Add tabs to Uncore IMC PCI IDs Improve code readability by adding tabs after #define macros Signed-off-by: Gayatri Kammela Signed-off-by: Peter Zijlstra (Intel) Cc: Charles Prestopine Cc: Kan Liang Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20190511000311.20733-1-gayatri.kammela@intel.com Signed-off-by: Ingo Molnar arch/x86/events/intel/uncore_snb.c | 42 +++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 21 deletions(-) commit 9fd2e48b9ae17978b2c2a98c055c774d5d90bce8 Author: Song Liu Date: Tue May 7 09:15:45 2019 -0700 perf/core: Allow non-privileged uprobe for user processes Currently, non-privileged user could only use uprobe with kernel.perf_event_paranoid = -1 However, setting perf_event_paranoid to -1 leaks other users' processes to non-privileged uprobes. To introduce proper permission control of uprobes, we are building the following system: A daemon with CAP_SYS_ADMIN is in charge to create uprobes via tracefs; Users asks the daemon to create uprobes; Then user can attach uprobe only to processes owned by the user. This patch allows non-privileged user to attach uprobe to processes owned by the user. The following example shows how to use uprobe with non-privileged user. This is based on Brendan's blog post [1] 1. Create uprobe with root: sudo perf probe -x 'readline%return +0($retval):string' 2. Then non-root user can use the uprobe as: perf record -vvv -e probe_bash:readline__return -p sleep 20 perf script [1] http://www.brendangregg.com/blog/2015-06-28/linux-ftrace-uprobe.html Signed-off-by: Song Liu Signed-off-by: Peter Zijlstra (Intel) Cc: Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20190507161545.788381-1-songliubraving@fb.com Signed-off-by: Ingo Molnar kernel/events/core.c | 4 ++-- kernel/trace/trace_uprobe.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit f7b6a8b30cedaa64ba18d80f1fb3404274281639 Merge: b33fb3cf6f5e f2c7c76c5d0a Author: Ingo Molnar Date: Mon Jun 3 11:56:35 2019 +0200 Merge tag 'v5.2-rc3' into perf/core, to pick up fixes Signed-off-by: Ingo Molnar commit e314a7c92b3217e893cbe03b944c7afc9cbd3e4c Author: Qian Cai Date: Fri May 31 16:16:02 2019 -0400 iommu/vt-d: Fix a variable set but not used The commit "iommu/vt-d: Delegate the dma domain to upper layer" left an unused variable, drivers/iommu/intel-iommu.c: In function 'disable_dmar_iommu': drivers/iommu/intel-iommu.c:1652:23: warning: variable 'domain' set but not used [-Wunused-but-set-variable] Signed-off-by: Qian Cai Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 4 ---- 1 file changed, 4 deletions(-) commit bf998b98f5bce4ebc97b3980016f54fabb7a4958 Author: Yuyang Du Date: Mon May 6 16:19:39 2019 +0800 locking/lockdep: Remove !dir in lock irq usage check In mark_lock_irq(), the following checks are performed: ---------------------------------- | -> | unsafe | read unsafe | |----------------------------------| | safe | F B | F* B* | |----------------------------------| | read safe | F? B* | - | ---------------------------------- Where: F: check_usage_forwards B: check_usage_backwards *: check enabled by STRICT_READ_CHECKS ?: check enabled by the !dir condition From checking point of view, the special F? case does not make sense, whereas it perhaps is made for peroformance concern. As later patch will address this issue, remove this exception, which makes the checks consistent later. With STRICT_READ_CHECKS = 1 which is default, there is no functional change. Signed-off-by: Yuyang Du Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bvanassche@acm.org Cc: frederic@kernel.org Cc: ming.lei@redhat.com Cc: will.deacon@arm.com Link: https://lkml.kernel.org/r/20190506081939.74287-24-duyuyang@gmail.com Signed-off-by: Ingo Molnar kernel/locking/lockdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4d56330df22dd9dd9a24f147014f60ee4c914fb8 Author: Yuyang Du Date: Mon May 6 16:19:38 2019 +0800 locking/lockdep: Adjust new bit cases in mark_lock The new bit can be any possible lock usage except it is garbage, so the cases in switch can be made simpler. Warn early on if wrong usage bit is passed without taking locks. No functional change. Signed-off-by: Yuyang Du Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bvanassche@acm.org Cc: frederic@kernel.org Cc: ming.lei@redhat.com Cc: will.deacon@arm.com Link: https://lkml.kernel.org/r/20190506081939.74287-23-duyuyang@gmail.com Signed-off-by: Ingo Molnar kernel/locking/lockdep.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) commit 091806515124b20f8cff7927b4b7ff399483b109 Author: Yuyang Du Date: Mon May 6 16:19:37 2019 +0800 locking/lockdep: Consolidate lock usage bit initialization Lock usage bit initialization is consolidated into one function mark_usage(). Trivial readability improvement. No functional change. Signed-off-by: Yuyang Du Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bvanassche@acm.org Cc: frederic@kernel.org Cc: ming.lei@redhat.com Cc: will.deacon@arm.com Link: https://lkml.kernel.org/r/20190506081939.74287-22-duyuyang@gmail.com Signed-off-by: Ingo Molnar kernel/locking/lockdep.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) commit 68e9dc29f8f42c79d2a3755223ed910ce36b4ae2 Author: Yuyang Du Date: Mon May 6 16:19:36 2019 +0800 locking/lockdep: Check redundant dependency only when CONFIG_LOCKDEP_SMALL As Peter has put it all sound and complete for the cause, I simply quote: "It (check_redundant) was added for cross-release (which has since been reverted) which would generate a lot of redundant links (IIRC) but having it makes the reports more convoluted -- basically, if we had an A-B-C relation, then A-C will not be added to the graph because it is already covered. This then means any report will include B, even though a shorter cycle might have been possible." This would increase the number of direct dependencies. For a simple workload (make clean; reboot; make vmlinux -j8), the data looks like this: CONFIG_LOCKDEP_SMALL: direct dependencies: 6926 !CONFIG_LOCKDEP_SMALL: direct dependencies: 9052 (+30.7%) Suggested-by: Peter Zijlstra (Intel) Signed-off-by: Yuyang Du Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bvanassche@acm.org Cc: frederic@kernel.org Cc: ming.lei@redhat.com Cc: will.deacon@arm.com Link: https://lkml.kernel.org/r/20190506081939.74287-21-duyuyang@gmail.com Signed-off-by: Ingo Molnar kernel/locking/lockdep.c | 4 ++++ 1 file changed, 4 insertions(+) commit 8c2c2b449aa50463ba4cc1f33cdfc98750ed03ab Author: Yuyang Du Date: Mon May 6 16:19:35 2019 +0800 locking/lockdep: Refactorize check_noncircular and check_redundant These two functions now handle different check results themselves. A new check_path function is added to check whether there is a path in the dependency graph. No functional change. Signed-off-by: Yuyang Du Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bvanassche@acm.org Cc: frederic@kernel.org Cc: ming.lei@redhat.com Cc: will.deacon@arm.com Link: https://lkml.kernel.org/r/20190506081939.74287-20-duyuyang@gmail.com Signed-off-by: Ingo Molnar kernel/locking/lockdep.c | 118 +++++++++++++++++++++++++++++------------------ 1 file changed, 74 insertions(+), 44 deletions(-) commit b4adfe8e05f15d7e73309c93c2c337df7eb5278f Author: Yuyang Du Date: Mon May 6 16:19:34 2019 +0800 locking/lockdep: Remove unused argument in __lock_release The @nested is not used in __release_lock so remove it despite that it is not used in lock_release in the first place. Signed-off-by: Yuyang Du Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bvanassche@acm.org Cc: frederic@kernel.org Cc: ming.lei@redhat.com Cc: will.deacon@arm.com Link: https://lkml.kernel.org/r/20190506081939.74287-19-duyuyang@gmail.com Signed-off-by: Ingo Molnar kernel/locking/lockdep.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4609c4f963f353613812f999bb027aac795bcde8 Author: Yuyang Du Date: Mon May 6 16:19:33 2019 +0800 locking/lockdep: Remove redundant argument in check_deadlock In check_deadlock(), the third argument read comes from the second argument hlock so that it can be removed. No functional change. Signed-off-by: Yuyang Du Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bvanassche@acm.org Cc: frederic@kernel.org Cc: ming.lei@redhat.com Cc: will.deacon@arm.com Link: https://lkml.kernel.org/r/20190506081939.74287-18-duyuyang@gmail.com Signed-off-by: Ingo Molnar kernel/locking/lockdep.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1ac4ba5ed0114bcc146d5743d97df414af25c524 Author: Yuyang Du Date: Mon May 6 16:19:32 2019 +0800 locking/lockdep: Add explanation to lock usage rules in lockdep design doc The irq usage and lock dependency rules that if violated a deacklock may happen are explained in more detail. Signed-off-by: Yuyang Du Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bvanassche@acm.org Cc: frederic@kernel.org Cc: ming.lei@redhat.com Cc: will.deacon@arm.com Link: https://lkml.kernel.org/r/20190506081939.74287-17-duyuyang@gmail.com Signed-off-by: Ingo Molnar Documentation/locking/lockdep-design.txt | 33 ++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) commit 154f185e9c0f6c50ac8e901630e14aa5b36f9414 Author: Yuyang Du Date: Mon May 6 16:19:31 2019 +0800 locking/lockdep: Update comments on dependency search The breadth-first search is implemented as flat-out non-recursive now, but the comments are still describing it as recursive, update the comments in that regard. Signed-off-by: Yuyang Du Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bvanassche@acm.org Cc: frederic@kernel.org Cc: ming.lei@redhat.com Cc: will.deacon@arm.com Link: https://lkml.kernel.org/r/20190506081939.74287-16-duyuyang@gmail.com Signed-off-by: Ingo Molnar kernel/locking/lockdep.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit 77a806922cfdebcf3ae89d31a8b592a7f7fbe537 Author: Yuyang Du Date: Mon May 6 16:19:30 2019 +0800 locking/lockdep: Avoid constant checks in __bfs by using offset reference In search of a dependency in the lock graph, there is contant checks for forward or backward search. Directly reference the field offset of the struct that differentiates the type of search to avoid those checks. No functional change. Signed-off-by: Yuyang Du Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bvanassche@acm.org Cc: frederic@kernel.org Cc: ming.lei@redhat.com Cc: will.deacon@arm.com Link: https://lkml.kernel.org/r/20190506081939.74287-15-duyuyang@gmail.com Signed-off-by: Ingo Molnar kernel/locking/lockdep.c | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) commit c1661325597f68bc9e632c4fa9c86983d56fba4f Author: Yuyang Du Date: Mon May 6 16:19:29 2019 +0800 locking/lockdep: Change the return type of __cq_dequeue() With the change, we can slightly adjust the code to iterate the queue in BFS search, which simplifies the code. No functional change. Signed-off-by: Yuyang Du Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bvanassche@acm.org Cc: frederic@kernel.org Cc: ming.lei@redhat.com Cc: will.deacon@arm.com Link: https://lkml.kernel.org/r/20190506081939.74287-14-duyuyang@gmail.com Signed-off-by: Ingo Molnar kernel/locking/lockdep.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit aa4807719e076bfb2dee9c96adf2c648e47d472f Author: Yuyang Du Date: Mon May 6 16:19:28 2019 +0800 locking/lockdep: Change type of the element field in circular_queue The element field is an array in struct circular_queue to keep track of locks in the search. Making it the same type as the locks avoids type cast. Also fix a typo and elaborate the comment above struct circular_queue. No functional change. Signed-off-by: Yuyang Du Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Bart Van Assche Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: frederic@kernel.org Cc: ming.lei@redhat.com Cc: will.deacon@arm.com Link: https://lkml.kernel.org/r/20190506081939.74287-13-duyuyang@gmail.com Signed-off-by: Ingo Molnar kernel/locking/lockdep.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) commit 31a490e5c54f5499aa744f8524611e2a4b19f8ba Author: Yuyang Du Date: Mon May 6 16:19:27 2019 +0800 locking/lockdep: Update comment A leftover comment is removed. While at it, add more explanatory comments. Such a trivial patch! Signed-off-by: Yuyang Du Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bvanassche@acm.org Cc: frederic@kernel.org Cc: ming.lei@redhat.com Cc: will.deacon@arm.com Link: https://lkml.kernel.org/r/20190506081939.74287-12-duyuyang@gmail.com Signed-off-by: Ingo Molnar kernel/locking/lockdep.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 0b9fc8ecfa30000c8900da7adbbef23438de9ec0 Author: Yuyang Du Date: Mon May 6 16:19:26 2019 +0800 locking/lockdep: Remove unused argument in validate_chain() and check_deadlock() The lockdep_map argument in them is not used, remove it. Signed-off-by: Yuyang Du Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Bart Van Assche Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: frederic@kernel.org Cc: ming.lei@redhat.com Cc: will.deacon@arm.com Link: https://lkml.kernel.org/r/20190506081939.74287-11-duyuyang@gmail.com Signed-off-by: Ingo Molnar kernel/locking/lockdep.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 01bb6f0af992a1e6b7797d92fd31a7864872e347 Author: Yuyang Du Date: Mon May 6 16:19:25 2019 +0800 locking/lockdep: Change the range of class_idx in held_lock struct held_lock->class_idx is used to point to the class of the held lock. The index is shifted by 1 to make index 0 mean no class, which results in class index shifting back and forth but is not worth doing so. The reason is: (1) there will be no "no-class" held_lock to begin with, and (2) index 0 seems to be used for error checking, but if something wrong indeed happened, the index can't be counted on to distinguish it as that something won't set the class_idx to 0 on purpose to tell us it is wrong. Therefore, change the index to start from 0. This saves a lot of back-and-forth shifts and a class slot back to lock_classes. Since index 0 is now used for lock class, we change the initial chain key to -1 to avoid key collision, which is due to the fact that __jhash_mix(0, 0, 0) = 0. Actually, the initial chain key can be any arbitrary value other than 0. In addition, a bitmap is maintained to keep track of the used lock classes, and we check the validity of the held lock against that bitmap. Signed-off-by: Yuyang Du Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bvanassche@acm.org Cc: frederic@kernel.org Cc: ming.lei@redhat.com Cc: will.deacon@arm.com Link: https://lkml.kernel.org/r/20190506081939.74287-10-duyuyang@gmail.com Signed-off-by: Ingo Molnar include/linux/lockdep.h | 14 ++++++------ kernel/locking/lockdep.c | 59 ++++++++++++++++++++++++++++++++---------------- 2 files changed, 46 insertions(+), 27 deletions(-) commit f6ec8829ac9d59b637366c13038f15d6f6156fe1 Author: Yuyang Du Date: Mon May 6 16:19:24 2019 +0800 locking/lockdep: Define INITIAL_CHAIN_KEY for chain keys to start with Chain keys are computed using Jenkins hash function, which needs an initial hash to start with. Dedicate a macro to make this clear and configurable. A later patch changes this initial chain key. Signed-off-by: Yuyang Du Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bvanassche@acm.org Cc: frederic@kernel.org Cc: ming.lei@redhat.com Cc: will.deacon@arm.com Link: https://lkml.kernel.org/r/20190506081939.74287-9-duyuyang@gmail.com Signed-off-by: Ingo Molnar include/linux/lockdep.h | 1 + init/init_task.c | 2 +- kernel/locking/lockdep.c | 18 +++++++++--------- 3 files changed, 11 insertions(+), 10 deletions(-) commit e196e479a3b844da6e6e71e0d2a8694040cb4e52 Author: Yuyang Du Date: Mon May 6 16:19:23 2019 +0800 locking/lockdep: Use lockdep_init_task for task initiation consistently Despite that there is a lockdep_init_task() which does nothing, lockdep initiates tasks by assigning lockdep fields and does so inconsistently. Fix this by using lockdep_init_task(). Signed-off-by: Yuyang Du Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bvanassche@acm.org Cc: frederic@kernel.org Cc: ming.lei@redhat.com Cc: will.deacon@arm.com Link: https://lkml.kernel.org/r/20190506081939.74287-8-duyuyang@gmail.com Signed-off-by: Ingo Molnar include/linux/lockdep.h | 7 ++++++- init/init_task.c | 2 ++ kernel/fork.c | 3 --- kernel/locking/lockdep.c | 11 ++++++++--- 4 files changed, 16 insertions(+), 7 deletions(-) commit d16dbd1b8a29bb9f8aca2c2f3bd1a0d2b7621126 Author: Yuyang Du Date: Mon May 6 16:19:22 2019 +0800 locking/lockdep: Update obsolete struct field description The lock_chain struct definition has outdated comment, update it and add struct member description. Signed-off-by: Yuyang Du Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bvanassche@acm.org Cc: frederic@kernel.org Cc: ming.lei@redhat.com Cc: will.deacon@arm.com Link: https://lkml.kernel.org/r/20190506081939.74287-7-duyuyang@gmail.com Signed-off-by: Ingo Molnar include/linux/lockdep.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 834494b28024b39d45aea6bcc642b0fe94fe2503 Author: Yuyang Du Date: Mon May 6 16:19:21 2019 +0800 locking/lockdep: Print the right depth for chain key collision Since chains are separated by IRQ context, so when printing a chain the depth should be consistent with it. Signed-off-by: Yuyang Du Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bvanassche@acm.org Cc: frederic@kernel.org Cc: ming.lei@redhat.com Cc: will.deacon@arm.com Link: https://lkml.kernel.org/r/20190506081939.74287-6-duyuyang@gmail.com Signed-off-by: Ingo Molnar kernel/locking/lockdep.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit e7a38f63ba50dc95426dd50c43383dfecaa35d7f Author: Yuyang Du Date: Mon May 6 16:19:20 2019 +0800 locking/lockdep: Remove useless conditional macro Since #defined(CONFIG_PROVE_LOCKING) is used in the scope of #ifdef CONFIG_PROVE_LOCKING, it can be removed. Signed-off-by: Yuyang Du Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bvanassche@acm.org Cc: frederic@kernel.org Cc: ming.lei@redhat.com Cc: will.deacon@arm.com Link: https://lkml.kernel.org/r/20190506081939.74287-5-duyuyang@gmail.com Signed-off-by: Ingo Molnar kernel/locking/lockdep.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c52478f4f38ace598475413a08dba9b9fd827eaf Author: Yuyang Du Date: Mon May 6 16:19:19 2019 +0800 locking/lockdep: Adjust lock usage bit character checks The lock usage bit characters are defined and determined with tricks. Add some explanation to make it a bit clearer, then adjust the logic to check the usage, which optimizes the code a bit. No functional change. Signed-off-by: Yuyang Du Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bvanassche@acm.org Cc: frederic@kernel.org Cc: ming.lei@redhat.com Cc: will.deacon@arm.com Link: https://lkml.kernel.org/r/20190506081939.74287-4-duyuyang@gmail.com Signed-off-by: Ingo Molnar kernel/locking/lockdep.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) commit c01fbbc83f42748b3ed094497933601e6c9e0a03 Author: Yuyang Du Date: Mon May 6 16:19:18 2019 +0800 locking/lockdep: Add description and explanation in lockdep design doc More words are added to lockdep design document regarding key concepts, which should help people without lockdep experience read and understand lockdep reports. Signed-off-by: Yuyang Du Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bvanassche@acm.org Cc: frederic@kernel.org Cc: ming.lei@redhat.com Cc: will.deacon@arm.com Link: https://lkml.kernel.org/r/20190506081939.74287-3-duyuyang@gmail.com Signed-off-by: Ingo Molnar Documentation/locking/lockdep-design.txt | 79 ++++++++++++++++++++++++-------- 1 file changed, 61 insertions(+), 18 deletions(-) commit f7c1c6b36a3874d3a7987fb3af829d5b0d75bda7 Author: Yuyang Du Date: Mon May 6 16:19:17 2019 +0800 locking/lockdep: Change all print_*() return type to void Since none of the print_*() function's return value is necessary, change their return type to void. No functional change. In cases where an invariable return value is used, this change slightly improves readability, i.e.: print_x(); return 0; is definitely better than: return print_x(); /* where print_x() always returns 0 */ Signed-off-by: Yuyang Du Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bvanassche@acm.org Cc: frederic@kernel.org Cc: ming.lei@redhat.com Cc: will.deacon@arm.com Link: https://lkml.kernel.org/r/20190506081939.74287-2-duyuyang@gmail.com Signed-off-by: Ingo Molnar kernel/locking/lockdep.c | 209 ++++++++++++++++++++++++----------------------- 1 file changed, 108 insertions(+), 101 deletions(-) commit 26b73da3604cc1a6596406d136b14d1a01c3676f Merge: 5ca584d935c3 f2c7c76c5d0a Author: Ingo Molnar Date: Mon Jun 3 11:50:18 2019 +0200 Merge tag 'v5.2-rc3' into locking/core, to pick up fixes Signed-off-by: Ingo Molnar commit af75d1a9a9f75bf030c2f35705f1ff6d226f96fe Author: Dietmar Eggemann Date: Mon May 27 07:21:15 2019 +0100 sched/fair: Remove sgs->sum_weighted_load Since sg_lb_stats::sum_weighted_load is now identical with sg_lb_stats::group_load remove it and replace its use case (calculating load per task) with the latter. Signed-off-by: Dietmar Eggemann Signed-off-by: Peter Zijlstra (Intel) Acked-by: Rik van Riel Acked-by: Vincent Guittot Cc: Frederic Weisbecker Cc: Linus Torvalds Cc: Morten Rasmussen Cc: Patrick Bellasi Cc: Peter Zijlstra Cc: Quentin Perret Cc: Thomas Gleixner Cc: Valentin Schneider Link: https://lkml.kernel.org/r/20190527062116.11512-7-dietmar.eggemann@arm.com Signed-off-by: Ingo Molnar kernel/sched/fair.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 0e1fef63d92d61ed561e504c3a078a827a0f9bfe Author: Dietmar Eggemann Date: Mon May 27 07:21:14 2019 +0100 sched/core: Remove sd->*_idx The sched domain per rq load index files also disappear from the /proc/sys/kernel/sched_domain/cpuX/domainY directories. Signed-off-by: Dietmar Eggemann Signed-off-by: Peter Zijlstra (Intel) Acked-by: Rik van Riel Cc: Frederic Weisbecker Cc: Linus Torvalds Cc: Morten Rasmussen Cc: Patrick Bellasi Cc: Peter Zijlstra Cc: Quentin Perret Cc: Thomas Gleixner Cc: Valentin Schneider Cc: Vincent Guittot Link: https://lkml.kernel.org/r/20190527062116.11512-6-dietmar.eggemann@arm.com Signed-off-by: Ingo Molnar include/linux/sched/topology.h | 5 ----- kernel/sched/debug.c | 25 ++++++++++--------------- kernel/sched/topology.c | 10 ---------- 3 files changed, 10 insertions(+), 30 deletions(-) commit 55627e3cd22c315c4a02fe3bbbb7234ec439cb1d Author: Dietmar Eggemann Date: Mon May 27 07:21:13 2019 +0100 sched/core: Remove rq->cpu_load[] The per rq load array values also disappear from the cpu#X sections in /proc/sched_debug. Signed-off-by: Dietmar Eggemann Signed-off-by: Peter Zijlstra (Intel) Acked-by: Rik van Riel Cc: Frederic Weisbecker Cc: Linus Torvalds Cc: Morten Rasmussen Cc: Patrick Bellasi Cc: Peter Zijlstra Cc: Quentin Perret Cc: Thomas Gleixner Cc: Valentin Schneider Cc: Vincent Guittot Link: https://lkml.kernel.org/r/20190527062116.11512-5-dietmar.eggemann@arm.com Signed-off-by: Ingo Molnar kernel/sched/core.c | 6 +----- kernel/sched/debug.c | 5 ----- kernel/sched/sched.h | 2 -- 3 files changed, 1 insertion(+), 12 deletions(-) commit 3d8d53554405952993bb0279ef3ebebc51740074 Author: Dietmar Eggemann Date: Mon May 27 07:21:12 2019 +0100 sched/debug: Remove sd->*_idx range on sysctl This reverts: commit 201c373e8e48 ("sched/debug: Limit sd->*_idx range on sysctl") Load indexes (sd->*_idx) are no longer needed without rq->cpu_load[]. The range check for load indexes can be removed as well. Get rid of it before the rq->cpu_load[] since it uses CPU_LOAD_IDX_MAX. At the same time, fix the following coding style issues detected by scripts/checkpatch.pl: ERROR: space prohibited before that ',' ERROR: space prohibited before that close parenthesis ')' Signed-off-by: Dietmar Eggemann Signed-off-by: Peter Zijlstra (Intel) Acked-by: Rik van Riel Cc: Frederic Weisbecker Cc: Linus Torvalds Cc: Morten Rasmussen Cc: Patrick Bellasi Cc: Peter Zijlstra Cc: Quentin Perret Cc: Thomas Gleixner Cc: Valentin Schneider Cc: Vincent Guittot Link: https://lkml.kernel.org/r/20190527062116.11512-4-dietmar.eggemann@arm.com Signed-off-by: Ingo Molnar kernel/sched/debug.c | 37 ++++++++++++++----------------------- 1 file changed, 14 insertions(+), 23 deletions(-) commit 1c1b8a7b03ef50f80f5d0c871ee261c04a6c967e Author: Dietmar Eggemann Date: Mon May 27 07:21:11 2019 +0100 sched/fair: Replace source_load() & target_load() with weighted_cpuload() With LB_BIAS disabled, source_load() & target_load() return weighted_cpuload(). Replace both with calls to weighted_cpuload(). The function to obtain the load index (sd->*_idx) for an sd, get_sd_load_idx(), can be removed as well. Finally, get rid of the sched feature LB_BIAS. Signed-off-by: Dietmar Eggemann Signed-off-by: Peter Zijlstra (Intel) Acked-by: Rik van Riel Cc: Frederic Weisbecker Cc: Linus Torvalds Cc: Morten Rasmussen Cc: Patrick Bellasi Cc: Peter Zijlstra Cc: Quentin Perret Cc: Thomas Gleixner Cc: Valentin Schneider Cc: Vincent Guittot Link: https://lkml.kernel.org/r/20190527062116.11512-3-dietmar.eggemann@arm.com Signed-off-by: Ingo Molnar kernel/sched/fair.c | 90 +++---------------------------------------------- kernel/sched/features.h | 1 - 2 files changed, 4 insertions(+), 87 deletions(-) commit 5e83eafbfd3b351537c0d74467fc43e8a88f4ae4 Author: Dietmar Eggemann Date: Mon May 27 07:21:10 2019 +0100 sched/fair: Remove the rq->cpu_load[] update code With LB_BIAS disabled, there is no need to update the rq->cpu_load[idx] any more. Signed-off-by: Dietmar Eggemann Signed-off-by: Peter Zijlstra (Intel) Acked-by: Rik van Riel Cc: Frederic Weisbecker Cc: Linus Torvalds Cc: Morten Rasmussen Cc: Patrick Bellasi Cc: Peter Zijlstra Cc: Quentin Perret Cc: Thomas Gleixner Cc: Valentin Schneider Cc: Vincent Guittot Link: https://lkml.kernel.org/r/20190527062116.11512-2-dietmar.eggemann@arm.com Signed-off-by: Ingo Molnar include/linux/sched/nohz.h | 8 -- kernel/sched/core.c | 1 - kernel/sched/fair.c | 255 --------------------------------------------- kernel/sched/sched.h | 6 -- kernel/time/tick-sched.c | 2 - 5 files changed, 272 deletions(-) commit f2bedc4705659216bd60948029ad8dfedf923ad9 Author: Dietmar Eggemann Date: Wed Apr 24 09:45:56 2019 +0100 sched/fair: Remove rq->load The CFS class is the only one maintaining and using the CPU wide load (rq->load(.weight)). The last use case of the CPU wide load in CFS's set_next_entity() can be replaced by using the load of the CFS class (rq->cfs.load(.weight)) instead. Signed-off-by: Dietmar Eggemann Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20190424084556.604-1-dietmar.eggemann@arm.com Signed-off-by: Ingo Molnar kernel/sched/debug.c | 2 -- kernel/sched/fair.c | 7 ++----- kernel/sched/sched.h | 2 -- 3 files changed, 2 insertions(+), 9 deletions(-) commit 3bd3706251ee8ab67e69d9340ac2abdca217e733 Author: Sebastian Andrzej Siewior Date: Tue Apr 23 16:26:36 2019 +0200 sched/core: Provide a pointer to the valid CPU mask In commit: 4b53a3412d66 ("sched/core: Remove the tsk_nr_cpus_allowed() wrapper") the tsk_nr_cpus_allowed() wrapper was removed. There was not much difference in !RT but in RT we used this to implement migrate_disable(). Within a migrate_disable() section the CPU mask is restricted to single CPU while the "normal" CPU mask remains untouched. As an alternative implementation Ingo suggested to use: struct task_struct { const cpumask_t *cpus_ptr; cpumask_t cpus_mask; }; with t->cpus_ptr = &t->cpus_mask; In -RT we then can switch the cpus_ptr to: t->cpus_ptr = &cpumask_of(task_cpu(p)); in a migration disabled region. The rules are simple: - Code that 'uses' ->cpus_allowed would use the pointer. - Code that 'modifies' ->cpus_allowed would use the direct mask. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Thomas Gleixner Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lkml.kernel.org/r/20190423142636.14347-1-bigeasy@linutronix.de Signed-off-by: Ingo Molnar arch/ia64/kernel/mca.c | 2 +- arch/mips/include/asm/switch_to.h | 4 +-- arch/mips/kernel/mips-mt-fpaff.c | 2 +- arch/mips/kernel/traps.c | 6 ++--- arch/powerpc/platforms/cell/spufs/sched.c | 2 +- arch/x86/kernel/cpu/resctrl/pseudo_lock.c | 2 +- drivers/infiniband/hw/hfi1/affinity.c | 6 ++--- drivers/infiniband/hw/hfi1/sdma.c | 3 +-- drivers/infiniband/hw/qib/qib_file_ops.c | 7 +++--- fs/proc/array.c | 4 +-- include/linux/sched.h | 5 ++-- init/init_task.c | 3 ++- kernel/cgroup/cpuset.c | 2 +- kernel/fork.c | 2 ++ kernel/sched/core.c | 40 +++++++++++++++--------------- kernel/sched/cpudeadline.c | 4 +-- kernel/sched/cpupri.c | 4 +-- kernel/sched/deadline.c | 6 ++--- kernel/sched/fair.c | 34 ++++++++++++------------- kernel/sched/rt.c | 4 +-- kernel/trace/trace_hwlat.c | 2 +- lib/smp_processor_id.c | 2 +- samples/trace_events/trace-events-sample.c | 2 +- 23 files changed, 75 insertions(+), 73 deletions(-) commit be6dc3291e0fc19e6c8cc8f231968ab9b51f5abf Author: Heikki Krogerus Date: Fri May 31 17:15:47 2019 +0300 platform/x86: intel_cht_int33fe: Replacing the old connections with references Replacing the old connection descriptions with software node references. Supplying the USB connector also a reference to the DisplayPort while at it. Signed-off-by: Heikki Krogerus Reviewed-by: Andy Shevchenko Reviewed-by: Hans de Goede Tested-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/platform/x86/intel_cht_int33fe.c | 47 +++++++++++++++++++------------- 1 file changed, 28 insertions(+), 19 deletions(-) commit 62499330f7bb0904b2d798dbb55e4afe4e7b1541 Author: Heikki Krogerus Date: Fri May 31 17:15:46 2019 +0300 platform/x86: intel_cht_int33fe: Supply fwnodes for the external dependencies Supplying also external devices, the DisplayPort connector and the USB role switch, software fwnodes. After this the driver has access to all the components tied to the USB Type-C connector and can start creating software node references to actually associate them with the USB Type-C connector device. Signed-off-by: Heikki Krogerus Reviewed-by: Andy Shevchenko Reviewed-by: Hans de Goede Tested-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/platform/x86/intel_cht_int33fe.c | 128 ++++++++++++++++++++++++++++++- 1 file changed, 125 insertions(+), 3 deletions(-) commit 9338aacf01466d6f43c73b2182d5a42228fe63d7 Author: Heikki Krogerus Date: Fri May 31 17:15:45 2019 +0300 platform/x86: intel_cht_int33fe: Provide fwnode for the USB connector In ACPI, and now also in DT, the USB connectors usually have their own device nodes. In case of USB Type-C, those connector (port) nodes are child nodes of the controller or PHY device, in our case the fusb302. The software fwnodes allow us to create a similar child node for fusb302 that represents the connector also on Intel CHT. This makes it possible replace the fusb302 specific device properties which were deprecated with the common USB connector properties that tcpm.c is able to use directly. Signed-off-by: Heikki Krogerus Reviewed-by: Andy Shevchenko Reviewed-by: Hans de Goede Tested-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/platform/x86/intel_cht_int33fe.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 4ed89a005a97c5e729548567810f9d766efbb0d6 Author: Heikki Krogerus Date: Fri May 31 17:15:44 2019 +0300 platform/x86: intel_cht_int33fe: Provide software nodes for the devices Software nodes provide two features that we will need later. 1) Software nodes can have references to other software nodes. 2) Software nodes can exist before a device entry is created. Signed-off-by: Heikki Krogerus Reviewed-by: Andy Shevchenko Reviewed-by: Hans de Goede Tested-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/platform/x86/intel_cht_int33fe.c | 54 +++++++++++++++++++++++++++----- 1 file changed, 46 insertions(+), 8 deletions(-) commit 80b915c11dbd4a13fc31ce879ad910277f89e7a7 Author: Heikki Krogerus Date: Fri May 31 17:15:43 2019 +0300 platform/x86: intel_cht_int33fe: Remove unused fusb302 device property Device property "fcs,max-sink-microwatt" is not used in fusb302.c, so dropping it. Signed-off-by: Heikki Krogerus Reviewed-by: Andy Shevchenko Reviewed-by: Hans de Goede Tested-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/platform/x86/intel_cht_int33fe.c | 1 - 1 file changed, 1 deletion(-) commit d84af483033d56d466d67c1a76a0028e3be6300d Author: Heikki Krogerus Date: Fri May 31 17:15:42 2019 +0300 platform/x86: intel_cht_int33fe: Register max17047 in its own function To make the probe function a bit more nicer looking, moving the registration of max17047 to its own function. Signed-off-by: Heikki Krogerus Reviewed-by: Andy Shevchenko Reviewed-by: Hans de Goede Tested-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/platform/x86/intel_cht_int33fe.c | 62 +++++++++++++++++--------------- 1 file changed, 33 insertions(+), 29 deletions(-) commit 3370db35193b241ba5836a66df6ec1a559108389 Author: Heikki Krogerus Date: Fri May 31 17:15:41 2019 +0300 usb: typec: Registering real device entries for the muxes Registering real device entries (struct device) for the mode muxes as well as for the orientation switches. The Type-C mux code was deliberately attempting to avoid creation of separate device entries for the orientation switch and the mode switch (alternate modes) because they are not physical devices. They are functions of a single physical multiplexer/demultiplexer switch device. Unfortunately because of the dependency we still have on the underlying mux device driver, we had to put in hacks like the one in the commit 3e3b81965cbf ("usb: typec: mux: Take care of driver module reference counting") to make sure the driver does not disappear from underneath us. Even with those hacks we were still left with a potential NUll pointer dereference scenario, so just creating the device entries, and letting the core take care of the dependencies. No more hacks needed. Signed-off-by: Heikki Krogerus Reviewed-by: Andy Shevchenko Tested-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/platform/x86/intel_cht_int33fe.c | 4 +- drivers/usb/typec/bus.h | 15 ++ drivers/usb/typec/class.c | 17 ++- drivers/usb/typec/mux.c | 238 ++++++++++++++++++++++--------- drivers/usb/typec/mux/pi3usb30532.c | 46 +++--- include/linux/usb/typec_mux.h | 62 ++++---- 6 files changed, 259 insertions(+), 123 deletions(-) commit fde777791eb83f6c5845b81af89de6be60a2b2ce Author: Heikki Krogerus Date: Fri May 31 17:15:40 2019 +0300 device connection: Find connections also by checking the references We can also use this API to find named references that the device nodes have by using fwnode_property_get_reference_args() function. Signed-off-by: Heikki Krogerus Tested-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/base/devcon.c | 26 ++++++++++++++++++++++++++ drivers/usb/roles/class.c | 2 +- 2 files changed, 27 insertions(+), 1 deletion(-) commit 83b34afb6b79c69f5478a7249451cab858af97d6 Author: Heikki Krogerus Date: Fri May 31 17:15:39 2019 +0300 device property: Introduce fwnode_find_reference() In most cases the references that the drivers look for don't have any arguments. This introduces a wrapper function for fwnode_property_get_reference_args() that looks for references by using only the name and index. Signed-off-by: Heikki Krogerus Tested-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/base/property.c | 24 ++++++++++++++++++++++++ include/linux/property.h | 4 ++++ 2 files changed, 28 insertions(+) commit ee48cef6c3917092eeee230caaa508d0e487c288 Author: Heikki Krogerus Date: Fri May 31 17:15:38 2019 +0300 ACPI / property: Don't limit named child node matching to data nodes There is no reason why we should limit the use of fwnode_get_named_child_node() to data nodes only. Signed-off-by: Heikki Krogerus Tested-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/acpi/property.c | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) commit dad9bb017865ae794b6cdfac40d60b1466a09195 Author: Heikki Krogerus Date: Fri May 31 17:15:37 2019 +0300 driver core: Add helper device_find_child_by_name() It looks like the child device is often matched with a name. This introduces a helper that does it automatically. Signed-off-by: Heikki Krogerus Acked-by: Greg Kroah-Hartman Tested-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/base/core.c | 28 ++++++++++++++++++++++++++++ include/linux/device.h | 2 ++ 2 files changed, 30 insertions(+) commit b06184acf751fa52a3763e4fadfd2807e9703acd Author: Heikki Krogerus Date: Fri May 31 17:15:36 2019 +0300 software node: Add software_node_get_reference_args() This makes it possible to support drivers that use fwnode_property_get_reference_args() function. Signed-off-by: Heikki Krogerus Tested-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/base/swnode.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ include/linux/property.h | 28 ++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+) commit c959d0c231f7063b14d766cfecc1fe90c2ab5061 Author: Heikki Krogerus Date: Fri May 31 17:15:35 2019 +0300 software node: Use kobject name when finding child nodes by name Using the kobject name of the node instead of a device property "name" in software_node_get_named_child_node(). Signed-off-by: Heikki Krogerus Tested-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/base/swnode.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 80488a6b1d3c3509b69d38d7c5ac7615889ea7e0 Author: Heikki Krogerus Date: Fri May 31 17:15:34 2019 +0300 software node: Add support for static node descriptors Until now the software nodes could only be created dynamically with fwnode_create_software_node() function. This introduces struct software_node data structure, which makes it possible to describe the software nodes also statically. The statically described software nodes can be registered with a new function fwnode_register_software_node(). This also adds a helper fwnode_register_software_nodes() which makes it possible to register an array of struct software_nodes, i.e. multiple nodes at the same time. There is no difference between statically described and dynamically allocated software nodes. Even the registration does not differ, except that during node creation the device properties are only copied if the node is created dynamically. With statically described nodes, the property entries in the descriptor (struct software_node) are assigned directly to the new software node that is being created without any copies. Signed-off-by: Heikki Krogerus Tested-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/base/swnode.c | 256 +++++++++++++++++++++++++++++++++++------------ include/linux/property.h | 19 ++++ 2 files changed, 212 insertions(+), 63 deletions(-) commit 3df85a1ae51f6b256982fe9d17c2dc5bfb4cc402 Author: Heikki Krogerus Date: Fri May 31 17:15:33 2019 +0300 software node: Simplify software_node_release() function It's possible to release the node ID immediately when fwnode_remove_software_node() is called, no need to wait for software_node_release() with that. Signed-off-by: Heikki Krogerus Tested-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/base/swnode.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit a79969868a308b3cc7abda02e1526d37dacdee27 Author: Heikki Krogerus Date: Fri May 31 17:15:32 2019 +0300 software node: Allow node creation without properties Software nodes are not forced to have device properties. Adding check to property_entries_dup() to make it possible to create software nodes that don't have any properties. Signed-off-by: Heikki Krogerus Tested-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/base/swnode.c | 3 +++ 1 file changed, 3 insertions(+) commit f67d667213ba03db66230735d354f2a286c1cbda Author: Geert Uytterhoeven Date: Mon May 20 09:13:03 2019 +0200 m68k: defconfig: Update defconfigs for v5.2-rc1 Actual changes: +# CONFIG_BACKLIGHT_CLASS_DEVICE is not set +CONFIG_CRYPTO_ECRDSA=m -CONFIG_CRYPTO_STREEBOG=m -CONFIG_INET_XFRM_MODE_BEET=m -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m +# CONFIG_LCD_CLASS_DEVICE is not set -CONFIG_NFT_CHAIN_ROUTE_IPV4=m -CONFIG_NFT_CHAIN_ROUTE_IPV6=m +CONFIG_TEST_STRSCPY=m -# CONFIG_UEVENT_HELPER is not set Signed-off-by: Geert Uytterhoeven arch/m68k/configs/amiga_defconfig | 17 +++++++---------- arch/m68k/configs/apollo_defconfig | 17 +++++++---------- arch/m68k/configs/atari_defconfig | 17 +++++++---------- arch/m68k/configs/bvme6000_defconfig | 17 +++++++---------- arch/m68k/configs/hp300_defconfig | 17 +++++++---------- arch/m68k/configs/mac_defconfig | 17 +++++++---------- arch/m68k/configs/multi_defconfig | 17 +++++++---------- arch/m68k/configs/mvme147_defconfig | 17 +++++++---------- arch/m68k/configs/mvme16x_defconfig | 17 +++++++---------- arch/m68k/configs/q40_defconfig | 17 +++++++---------- arch/m68k/configs/sun3_defconfig | 17 +++++++---------- arch/m68k/configs/sun3x_defconfig | 17 +++++++---------- 12 files changed, 84 insertions(+), 120 deletions(-) commit cfc1ce7e5212b19423d38ed2035318a35f983309 Author: Uma Shankar Date: Thu May 30 01:29:03 2019 +0530 drm: Fixed doc warnings in drm uapi header Fixed doc warnings in drm uapi header. All the UAPI structures are now documented in kernel doc. Signed-off-by: Uma Shankar Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1559159944-21103-4-git-send-email-uma.shankar@intel.com include/uapi/drm/drm_mode.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 848d56dddad8a3a052a983d2f47b739d0492b8b1 Author: Uma Shankar Date: Thu May 30 01:29:01 2019 +0530 drm: Drop a redundant unused variable Drop a redundant and unused variable "hdr_output_metadata" from drm_connector. Suggested-by: Daniel Vetter Signed-off-by: Uma Shankar Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1559159944-21103-2-git-send-email-uma.shankar@intel.com include/drm/drm_connector.h | 2 -- 1 file changed, 2 deletions(-) commit 5da28d740548f88e360b9e97fc88ef4562225e57 Author: Alexander Filippov Date: Fri May 31 12:09:50 2019 +0300 ARM: dts: aspeed: Add YADRO VESNIN BMC VESNIN is an OpenPower machine with an Aspeed 2400 BMC SoC manufactured by YADRO. Signed-off-by: Alexander Filippov Reviewed-by: Andrew Jeffery Signed-off-by: Joel Stanley arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/aspeed-bmc-opp-vesnin.dts | 224 ++++++++++++++++++++++++++++ 2 files changed, 225 insertions(+) commit e33df4ca87174f6e97a28c8e7efc65e7250c3b8c Author: Daniel Vetter Date: Tue May 21 10:48:49 2019 +0200 drm/doc: More fine-tuning on userspace review requirements With Eric's patch commit ba6e798ecf320716780bb6a6088a8d17dcba1d49 Author: Eric Anholt Date: Wed Apr 24 11:56:17 2019 -0700 drm/doc: Document expectation that userspace review looks at kernel uAPI. there's been concerns raised that we expect userspace people to do in-depth kernel patch review. That's not reasonable, same way kernel people can't review all the userspace we have. Try to clarify expectations a bit more. Cc: Eric Anholt Cc: Pekka Paalanen Cc: contact@emersion.fr Cc: wayland-devel@lists.freedesktop.org Acked-by: Eric Anholt Reviewed-by: Simon Ser Reviewed-by: Pekka Paalanen Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190521084849.27452-1-daniel.vetter@ffwll.ch Documentation/gpu/drm-uapi.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 036eb5c6d532a0fa1cea854814628be625809c4e Author: YueHaibing Date: Sat Jun 1 07:43:38 2019 +0000 cpufreq: armada-37xx: Remove set but not used variable 'freq' Fixes gcc '-Wunused-but-set-variable' warning: drivers/cpufreq/armada-37xx-cpufreq.c: In function 'armada37xx_cpufreq_avs_setup': drivers/cpufreq/armada-37xx-cpufreq.c:260:28: warning: variable 'freq' set but not used [-Wunused-but-set-variable] It's never used since introduction in commit 1c3528232f4b ("cpufreq: armada-37xx: Add AVS support") Signed-off-by: YueHaibing Signed-off-by: Viresh Kumar drivers/cpufreq/armada-37xx-cpufreq.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit c2147585cce028e46a0ea8b24be3a11716ee6e4f Author: Leonard Crestez Date: Wed May 29 11:52:08 2019 +0000 cpufreq: imx-cpufreq-dt: Fix no OPPs available on unfused parts Early samples without fuses written report "0 0" which means consumer segment and minimum speed grading. According to datasheet the minimum speed grade is not supported for consumer parts so all OPPs are disabled which results in stack dumps later on. Fix by clamping minimum consumer speed grade to 1 on imx8mm and imx8mq. Fixes: 4d28ba1d62c4 ("cpufreq: Add imx-cpufreq-dt driver") Signed-off-by: Leonard Crestez [ Viresh: s/minumum/minimum/ in patch and log ] Signed-off-by: Viresh Kumar drivers/cpufreq/imx-cpufreq-dt.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 23004ec330925e6834c8ddac00e3dd12eb5fb345 Merge: 4c1d2fc7d56c f2c7c76c5d0a Author: Greg Kroah-Hartman Date: Mon Jun 3 07:27:16 2019 +0200 Merge 5.2-rc3 into staging-next We need the staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 119a7fdfeecefa5a4062256ac2dcd3b69eaa8414 Merge: 086ebf92aa79 f2c7c76c5d0a Author: Greg Kroah-Hartman Date: Mon Jun 3 07:25:25 2019 +0200 Merge 5.2-rc3 into usb-next we want the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit b33bc2b878e05c5dd4e20682328c3addb4787ac9 Author: David Ahern Date: Fri May 31 12:44:09 2019 -0600 nexthop: Add entry to MAINTAINERS Add entry to MAINTAINERS file for new nexthop code. Signed-off-by: David Ahern Signed-off-by: David S. Miller MAINTAINERS | 9 +++++++++ 1 file changed, 9 insertions(+) commit 201d8d5e0d627a6f5f7b9688ead6793d991832ed Merge: 0b12c73a81b3 87945b6d8be5 Author: David S. Miller Date: Sun Jun 2 18:15:38 2019 -0700 Merge branch 'r8169-replace-several-function-pointers-with-direct-calls' Heiner Kallweit says: ==================== r8169: replace several function pointers with direct calls This series removes most function pointers from struct rtl8169_private and uses direct calls instead. This simplifies the code and avoids the penalty of indirect calls in times of retpoline. ==================== Signed-off-by: David S. Miller commit 87945b6d8be5256f4abdcf86fe7ced6baf104a4d Author: Heiner Kallweit Date: Fri May 31 19:55:11 2019 +0200 r8169: avoid tso csum function indirection Replace indirect call to tso_csum with direct calls. To do this we have to move rtl_chip_supports_csum_v2(). Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169.c | 46 ++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 25 deletions(-) commit 485bb1b3fac5e2e8f60c59544136085134b3c8f3 Author: Heiner Kallweit Date: Fri May 31 19:54:03 2019 +0200 r8169: remove struct jumbo_ops The jumbo_ops are used in just one place, so we can simplify the code and avoid the penalty of indirect calls in times of retpoline. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169.c | 96 ++++++++++++++---------------------- 1 file changed, 36 insertions(+), 60 deletions(-) commit 5f9505235bb96075a033d0021058bc2aa77b94ac Author: Heiner Kallweit Date: Fri May 31 19:53:28 2019 +0200 r8169: remove struct mdio_ops The mdio_ops are used in just one place, so we can simplify the code and avoid the penalty of indirect calls in times of retpoline. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169.c | 59 ++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 33 deletions(-) commit 0b12c73a81b312f1f44ab3968b684f58f9bdbda7 Author: Heiner Kallweit Date: Fri May 31 19:17:15 2019 +0200 r8169: improve r8169_csum_workaround Use helper skb_is_gso() and simplify access to tx_dropped. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit db4bad07371b53dbce34e8ae54d4aa93096841d6 Author: Heiner Kallweit Date: Fri May 31 19:14:44 2019 +0200 net: ethernet: improve eth_platform_get_mac_address pci_device_to_OF_node(to_pci_dev(dev)) is the same as dev->of_node, so we can simplify the code. In addition add an empty line before the return statement. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller net/ethernet/eth.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit feb3cf2e5ecc5840e27f328e0ce666a0f728f1a3 Merge: b9f88982750d 2638eb8b50cf Author: David S. Miller Date: Sun Jun 2 18:08:47 2019 -0700 Merge branch 'ifa_list-RCU' Florian Westphal says: ==================== net: add rcu annotations for ifa_list v3: fix typo in patch1 commit message All other patches are unchanged. v2: remove ifa_list iteration in afs instead of conversion Eric Dumazet reported following problem: It looks that unless RTNL is held, accessing ifa_list needs proper RCU protection. indev->ifa_list can be changed under us by another cpu (which owns RTNL) [..] A proper rcu_dereference() with an happy sparse support would require adding __rcu attribute. This patch series does that: add __rcu to the ifa_list pointers. That makes sparse complain, so the series also adds the required rcu_assign_pointer/dereference helpers where needed. All patches except the last one are preparation work. Two new macros are introduced for in_ifaddr walks. Last patch adds the __rcu annotations and the assign_pointer/dereference helper calls. This patch is a bit large, but I found no better way -- other approaches (annotate-first or add helpers-first) all result in mid-series sparse warnings. This series is submitted vs. net-next rather than net for several reasons: 1. Its (mostly) compile-tested only 2. 3rd patch changes behaviour wrt. secondary addresses (see changelog) 3. The problem exists for a very long time (2004), so it doesn't seem to be urgent to fix this -- rcu use to free ifa_list predates the git era. ==================== Signed-off-by: David S. Miller commit 2638eb8b50cfc16240e0bb080b9afbf541a9b39d Author: Florian Westphal Date: Fri May 31 18:27:09 2019 +0200 net: ipv4: provide __rcu annotation for ifa_list ifa_list is protected by rcu, yet code doesn't reflect this. Add the __rcu annotations and fix up all places that are now reported by sparse. I've done this in the same commit to not add intermediate patches that result in new warnings. Reported-by: Eric Dumazet Signed-off-by: Florian Westphal Signed-off-by: David S. Miller drivers/infiniband/hw/i40iw/i40iw_utils.c | 12 ++-- drivers/infiniband/hw/nes/nes.c | 8 ++- drivers/infiniband/hw/usnic/usnic_ib_main.c | 15 +++-- drivers/net/ethernet/via/via-velocity.h | 2 +- drivers/net/plip/plip.c | 4 +- drivers/net/vmxnet3/vmxnet3_drv.c | 19 ++++-- drivers/net/wireless/ath/ath6kl/cfg80211.c | 4 +- drivers/net/wireless/marvell/mwifiex/cfg80211.c | 2 +- drivers/staging/isdn/hysdn/hysdn_net.c | 6 +- include/linux/inetdevice.h | 21 ++---- net/core/netpoll.c | 10 ++- net/core/pktgen.c | 8 ++- net/ipv4/devinet.c | 88 ++++++++++++++++--------- net/mac80211/main.c | 4 +- net/netfilter/nf_nat_redirect.c | 12 ++-- 15 files changed, 134 insertions(+), 81 deletions(-) commit cb8f1478cea68bc9c9bca8bded9617d9b0b7beb6 Author: Florian Westphal Date: Fri May 31 18:27:08 2019 +0200 drivers: use in_dev_for_each_ifa_rtnl/rcu Like previous patches, use the new iterator macros to avoid sparse warnings once proper __rcu annotations are added. Compile tested only. Signed-off-by: Florian Westphal Signed-off-by: David S. Miller drivers/infiniband/core/roce_gid_mgmt.c | 5 +++-- drivers/infiniband/hw/cxgb4/cm.c | 9 +++++++-- drivers/infiniband/hw/i40iw/i40iw_cm.c | 7 +++++-- drivers/infiniband/hw/i40iw/i40iw_main.c | 6 ++++-- drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c | 8 +++++--- drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 5 +++-- drivers/net/wan/hdlc_cisco.c | 11 +++++------ 7 files changed, 32 insertions(+), 19 deletions(-) commit cd5a411dbaeb9fd70e2a8241a74b6f52a1a572ca Author: Florian Westphal Date: Fri May 31 18:27:07 2019 +0200 net: use new in_dev_ifa iterators Use in_dev_for_each_ifa_rcu/rtnl instead. This prevents sparse warnings once proper __rcu annotations are added. Signed-off-by: Florian Westphal t di# Last commands done (6 commands done): Signed-off-by: David S. Miller net/ipv4/fib_frontend.c | 24 +++++++++++++++++------- net/ipv4/igmp.c | 5 +++-- net/ipv6/addrconf.c | 4 +--- net/sctp/protocol.c | 2 +- net/smc/smc_clc.c | 11 +++++++---- 5 files changed, 29 insertions(+), 17 deletions(-) commit b8d19572367bb019f77bbc921ef6bf965f1c8b22 Author: Florian Westphal Date: Fri May 31 18:27:06 2019 +0200 netfilter: use in_dev_for_each_ifa_rcu Netfilter hooks are always running under rcu read lock, use the new iterator macro so sparse won't complain once we add proper __rcu annotations. Signed-off-by: Florian Westphal Signed-off-by: David S. Miller net/ipv4/netfilter/nf_tproxy_ipv4.c | 9 +++++++-- net/netfilter/nf_conntrack_broadcast.c | 9 +++++++-- net/netfilter/nfnetlink_osf.c | 5 ++--- 3 files changed, 16 insertions(+), 7 deletions(-) commit d519e8708b06a6ec9e6d7f67175649fd624558f5 Author: Florian Westphal Date: Fri May 31 18:27:05 2019 +0200 devinet: use in_dev_for_each_ifa_rcu in more places This also replaces spots that used for_primary_ifa(). for_primary_ifa() aborts the loop on the first secondary address seen. Replace it with either the rcu or rtnl variant of in_dev_for_each_ifa(), but two places will now also consider secondary addresses too: inet_addr_onlink() and inet_ifa_byprefix(). I do not understand why they should ignore secondary addresses. Why would a secondary address not be considered 'on link'? When matching a prefix, why ignore a matching secondary address? Other places get converted as well, but gain "->flags & SECONDARY" check. Signed-off-by: Florian Westphal Signed-off-by: David S. Miller net/ipv4/devinet.c | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) commit ef11db3310e272d3d8dbe8739e0770820dd20e52 Author: Florian Westphal Date: Fri May 31 18:27:04 2019 +0200 net: inetdevice: provide replacement iterators for in_ifaddr walk The ifa_list is protected either by rcu or rtnl lock, but the current iterators do not account for this. This adds two iterators as replacement, a later patch in the series will update them with the needed rcu/rtnl_dereference calls. Its not done in this patch yet to avoid sparse warnings -- the fields lack the proper __rcu annotation. Signed-off-by: Florian Westphal Signed-off-by: David S. Miller include/linux/inetdevice.h | 10 +++++++++- net/ipv4/devinet.c | 31 ++++++++++++++++--------------- 2 files changed, 25 insertions(+), 16 deletions(-) commit 35ebfc22fe991cf5a01680a43ee238dfc16fe4c1 Author: Florian Westphal Date: Fri May 31 18:27:03 2019 +0200 afs: do not send list of client addresses David Howells says: I'm told that there's not really any point populating the list. Current OpenAFS ignores it, as does AuriStor - and IBM AFS 3.6 will do the right thing. The list is actually useless as it's the client's view of the world, not the servers, so if there's any NAT in the way its contents are invalid. Further, it doesn't support IPv6 addresses. On that basis, feel free to make it an empty list and remove all the interface enumeration. V1 of this patch reworked the function to use a new helper for the ifa_list iteration to avoid sparse warnings once the proper __rcu annotations get added in struct in_device later. But, in light of the above, just remove afs_get_ipv4_interfaces. Compile tested only. Cc: David Howells Cc: linux-afs@lists.infradead.org Signed-off-by: Florian Westphal Tested-by: David Howells Signed-off-by: David S. Miller fs/afs/Makefile | 1 - fs/afs/cmservice.c | 24 +----------------------- fs/afs/internal.h | 15 --------------- fs/afs/netdevices.c | 48 ------------------------------------------------ 4 files changed, 1 insertion(+), 87 deletions(-) commit b9f88982750d5c28b3c55ab8b802ecfa62a0bbd2 Author: Colin Ian King Date: Fri May 31 14:27:38 2019 +0100 qed: remove redundant assignment to rc The variable rc is assigned with a value that is never read and it is re-assigned a new value later on. The assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_sp_commands.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8a7e8ff8ce8ae7d34ed979f41b572bfe7cab421c Merge: 57f041027909 6d97985072dc Author: David S. Miller Date: Sun Jun 2 17:48:58 2019 -0700 Merge tag 'isdn-removal' of https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground Arnd Bergmann says: ==================== isdn: deprecate non-mISDN drivers When isdn4linux came up in the context of another patch series, I remembered that we had discussed removing it a while ago. It turns out that the suggestion from Karsten Keil wa to remove I4L in 2018 after the last public ISDN networks are shut down. This has happened now (with a very small number of exceptions), so I guess it's time to try again. We currently have three ISDN stacks in the kernel: the original isdn4linux (with the hisax driver), the newer CAPI (with four drivers), and finally the mISDN stack (supporting roughly the same hardware as hisax). As far as I can tell, anyone using ISDN with mainline kernel drivers in the past few years uses mISDN, and this is typically used for voice-only PBX installations that don't require a public network. The older stacks support additional features for data networks, but those typically make no sense any more if there is no network to connect to. My proposal for this time is to kill off isdn4linux entirely, as it seems to have been unusable for quite a while. This code has been abandoned for many years and it does cause problems for treewide maintenance as it tends to do everything that we try to stop doing. Birger Harzenetter mentioned that is is still using i4l in order to make use of the 'divert' feature that is not part of mISDN, but has otherwise moved on to mISDN for normal operation, like apparently everyone else. CAPI in turn is not quite as obsolete, but two of the drivers (avm and hysdn) don't seem to be used at all, while another one (gigaset) will stop being maintained as Paul Bolle is no longer able to test it after the network gets shut down in September. All three are now moved into drivers/staging to let others speak up in case there are remaining users. This leaves Bluetooth CMTP as the only remaining user of CAPI, but Marcel Holtmann wishes to keep maintaining it. For the discussion on version 1, see [2] Unfortunately, Karsten Keil as the maintainer has not participated in the discussion. Arnd [1] https://patchwork.kernel.org/patch/8484861/#17900371 [2] https://listserv.isdn4linux.de/pipermail/isdn4linux/2019-April/thread.html ==================== Signed-off-by: David S. Miller commit 8b74ae41f1eee9fbf7a69cf6b2faf9b207f3449e Author: Peter Robinson Date: Sat Jun 1 08:12:18 2019 +0100 gpio: pca953x: Add support for the TI TCA9539 The TI TCA9539 is a variant of the PCA953x GPIO expander, with 16 GPIOs and interrupt functionality. Signed-off-by: Peter Robinson Signed-off-by: Linus Walleij drivers/gpio/gpio-pca953x.c | 1 + 1 file changed, 1 insertion(+) commit 57f0410279096095e013b08b5e8e44d0ea2098d6 Merge: 6345266a9989 fe3490e6107e Author: David S. Miller Date: Sun Jun 2 13:49:49 2019 -0700 Merge branch 'mscc-ocelot-tc-flower' Horatiu Vultur says: ==================== Add hw offload of TC flower on MSCC Ocelot This patch series enables hardware offload for flower filter used in traffic controller on MSCC Ocelot board. v2->v3 changes: - remove the check for shared blocks v1->v2 changes: - when declaring variables use reverse christmas tree ==================== Signed-off-by: David S. Miller commit fe3490e6107e10da90dee09cade35e6f4b558294 Author: Horatiu Vultur Date: Fri May 31 09:16:57 2019 +0200 net: mscc: ocelot: Hardware ofload for tc flower filter Hardware offload of port filtering are now supported via tc command using flower filter. ACL rules are used to enable the hardware offload. The following keys are supported: vlan_id vlan_prio dst_mac/src_mac for non IP frames dst_ip/src_ip dst_port/src_port The following actions are supported: trap drop These filters are supported only on the ingress schedulare. Add: tc qdisc add dev eth3 ingress tc filter ad dev eth3 parent ffff: ip_proto ip flower \ ip_proto tcp dst_port 80 action drop Signed-off-by: Horatiu Vultur Signed-off-by: David S. Miller drivers/net/ethernet/mscc/Makefile | 2 +- drivers/net/ethernet/mscc/ocelot_ace.h | 5 + drivers/net/ethernet/mscc/ocelot_flower.c | 357 ++++++++++++++++++++++++++++++ drivers/net/ethernet/mscc/ocelot_tc.c | 16 +- 4 files changed, 373 insertions(+), 7 deletions(-) commit b596229448dd2a263cdc4906e60b1b2249777ee4 Author: Horatiu Vultur Date: Fri May 31 09:16:56 2019 +0200 net: mscc: ocelot: Add support for tcam Add ACL support using the TCAM. Using ACL it is possible to create rules in hardware to filter/redirect frames. Signed-off-by: Horatiu Vultur Signed-off-by: David S. Miller arch/mips/boot/dts/mscc/ocelot.dtsi | 5 +- drivers/net/ethernet/mscc/Makefile | 2 +- drivers/net/ethernet/mscc/ocelot.c | 13 + drivers/net/ethernet/mscc/ocelot.h | 8 + drivers/net/ethernet/mscc/ocelot_ace.c | 777 +++++++++++++++++++++++++++++++ drivers/net/ethernet/mscc/ocelot_ace.h | 227 +++++++++ drivers/net/ethernet/mscc/ocelot_board.c | 1 + drivers/net/ethernet/mscc/ocelot_regs.c | 11 + drivers/net/ethernet/mscc/ocelot_s2.h | 64 +++ drivers/net/ethernet/mscc/ocelot_vcap.h | 403 ++++++++++++++++ 10 files changed, 1508 insertions(+), 3 deletions(-) commit 6345266a9989287336ff6a2843cd3b033cda85a1 Author: David Ahern Date: Thu May 30 12:06:36 2019 -0700 selftests: Add test cases for nexthop objects Add functional test cases for nexthop objects. Signed-off-by: David Ahern Signed-off-by: David S. Miller tools/testing/selftests/net/fib_nexthops.sh | 1026 +++++++++++++++++++++++++++ 1 file changed, 1026 insertions(+) commit 5213d7efc8ec26ed8938dce75427eff9275a62d9 Author: Ruslan Babayev Date: Tue May 28 16:02:32 2019 -0700 i2c: acpi: export i2c_acpi_find_adapter_by_handle This allows drivers to lookup i2c adapters on ACPI based systems similar to of_get_i2c_adapter_by_node() with DT based systems. Signed-off-by: Ruslan Babayev Reviewed-by: Andrew Lunn Signed-off-by: Wolfram Sang drivers/i2c/i2c-core-acpi.c | 3 ++- include/linux/i2c.h | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) commit 9e6b5648bbc4cd48fab62cecbb81e9cc3c6e7e88 Author: Sven Eckelmann Date: Sun Jun 2 10:57:31 2019 +0200 batman-adv: Fix duplicated OGMs on NETDEV_UP The state of slave interfaces are handled differently depending on whether the interface is up or not. All active interfaces (IFF_UP) will transmit OGMs. But for B.A.T.M.A.N. IV, also non-active interfaces are scheduling (low TTL) OGMs on active interfaces. The code which setups and schedules the OGMs must therefore already be called when the interfaces gets added as slave interface and the transmit function must then check whether it has to send out the OGM or not on the specific slave interface. But the commit f0d97253fb5f ("batman-adv: remove ogm_emit and ogm_schedule API calls") moved the setup code from the enable function to the activate function. The latter is called either when the added slave was already up when batadv_hardif_enable_interface processed the new interface or when a NETDEV_UP event was received for this slave interfac. As result, each NETDEV_UP would schedule a new OGM worker for the interface and thus OGMs would be send a lot more than expected. Fixes: f0d97253fb5f ("batman-adv: remove ogm_emit and ogm_schedule API calls") Reported-by: Linus Lüssing Tested-by: Linus Lüssing Acked-by: Marek Lindner Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/bat_iv_ogm.c | 4 ++-- net/batman-adv/hard-interface.c | 3 +++ net/batman-adv/types.h | 3 +++ 3 files changed, 8 insertions(+), 2 deletions(-) commit a3bf9fbdad600b1e4335dd90979f8d6072e4f602 Author: Greg Kurz Date: Wed May 15 12:05:01 2019 +0200 powerpc/pseries: Fix xive=off command line On POWER9, if the hypervisor supports XIVE exploitation mode, the guest OS will unconditionally requests for the XIVE interrupt mode even if XIVE was deactivated with the kernel command line xive=off. Later on, when the spapr XIVE init code handles xive=off, it disables XIVE and tries to fall back on the legacy mode XICS. This discrepency causes a kernel panic because the hypervisor is configured to provide the XIVE interrupt mode to the guest : kernel BUG at arch/powerpc/sysdev/xics/xics-common.c:135! ... NIP xics_smp_probe+0x38/0x98 LR xics_smp_probe+0x2c/0x98 Call Trace: xics_smp_probe+0x2c/0x98 (unreliable) pSeries_smp_probe+0x40/0xa0 smp_prepare_cpus+0x62c/0x6ec kernel_init_freeable+0x148/0x448 kernel_init+0x2c/0x148 ret_from_kernel_thread+0x5c/0x68 Look for xive=off during prom_init and don't ask for XIVE in this case. One exception though: if the host only supports XIVE, we still want to boot so we ignore xive=off. Similarly, have the spapr XIVE init code to looking at the interrupt mode negotiated during CAS, and ignore xive=off if the hypervisor only supports XIVE. Fixes: eac1e731b59e ("powerpc/xive: guest exploitation of the XIVE interrupt controller") Cc: stable@vger.kernel.org # v4.20 Reported-by: Pavithra R. Prakash Signed-off-by: Greg Kurz Reviewed-by: Cédric Le Goater Signed-off-by: Michael Ellerman arch/powerpc/kernel/prom_init.c | 16 ++++++++++++- arch/powerpc/sysdev/xive/spapr.c | 52 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 66 insertions(+), 2 deletions(-) commit 02c5f5394918b9b47ff4357b1b18335768cd867d Author: Greg Kurz Date: Fri Apr 19 17:34:13 2019 +0200 powerpc/powernv/npu: Fix reference leak Since 902bdc57451c, get_pci_dev() calls pci_get_domain_bus_and_slot(). This has the effect of incrementing the reference count of the PCI device, as explained in drivers/pci/search.c: * Given a PCI domain, bus, and slot/function number, the desired PCI * device is located in the list of PCI devices. If the device is * found, its reference count is increased and this function returns a * pointer to its data structure. The caller must decrement the * reference count by calling pci_dev_put(). If no device is found, * %NULL is returned. Nothing was done to call pci_dev_put() and the reference count of GPU and NPU PCI devices rockets up. A natural way to fix this would be to teach the callers about the change, so that they call pci_dev_put() when done with the pointer. This turns out to be quite intrusive, as it affects many paths in npu-dma.c, pci-ioda.c and vfio_pci_nvlink2.c. Also, the issue appeared in 4.16 and some affected code got moved around since then: it would be problematic to backport the fix to stable releases. All that code never cared for reference counting anyway. Call pci_dev_put() from get_pci_dev() to revert to the previous behavior. Fixes: 902bdc57451c ("powerpc/powernv/idoa: Remove unnecessary pcidev from pci_dn") Cc: stable@vger.kernel.org # v4.16 Signed-off-by: Greg Kurz Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/npu-dma.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit c806a6fde1c29e7419afcf94d761827a19c5ffe7 Author: Mathieu Malaterre Date: Thu May 23 12:25:20 2019 +0200 powerpc: Remove variable ‘path’ since not used In commit eab00a208eb6 ("powerpc: Move `path` variable inside DEBUG_PROM") DEBUG_PROM sentinels were added to silence a warning (treated as error with W=1): arch/powerpc/kernel/prom_init.c:1388:8: error: variable ‘path’ set but not used [-Werror=unused-but-set-variable] Rework the original patch and simplify the code, by removing the variable ‘path’ completely. Fix line over 90 characters. Suggested-by: Michael Ellerman Signed-off-by: Mathieu Malaterre Signed-off-by: Michael Ellerman arch/powerpc/kernel/prom_init.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit 89d87bcba2874d824affb7842bb3960cb6f5be05 Author: Frederic Barrat Date: Thu May 23 14:28:04 2019 +0200 powerpc/powernv: Show checkstop reason for NPU2 HMIs If the kernel is notified of an HMI caused by the NPU2, it's currently not being recognized and it logs the default message: Unknown Malfunction Alert of type 3 The NPU on Power 9 has 3 Fault Isolation Registers, so that's a lot of possible causes, but we should at least log that it's an NPU problem and report which FIR and which bit were raised if opal gave us the information. Signed-off-by: Frederic Barrat Signed-off-by: Michael Ellerman arch/powerpc/include/asm/opal-api.h | 1 + arch/powerpc/platforms/powernv/opal-hmi.c | 40 +++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) commit 1549c42deff5f3ffff326ae295ae58165e5c5830 Author: Stewart Smith Date: Fri May 24 15:09:56 2019 +1000 powerpc/powernv: Update firmware archaeology around OPAL_HANDLE_HMI The first machines to ship with OPAL firmware all got firmware updates that have the new call, but just in case someone is foolish enough to believe the first 4 months of firmware is the best, we keep this code around. Comment is updated to not refer to late 2014 as recent or the future. Signed-off-by: Stewart Smith Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/opal.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) commit efa9ace68e487ddd29c2b4d6dd23242158f1f607 Author: Gen Zhang Date: Sun May 26 10:42:40 2019 +0800 powerpc/pseries/dlpar: Fix a missing check in dlpar_parse_cc_property() In dlpar_parse_cc_property(), 'prop->name' is allocated by kstrdup(). kstrdup() may return NULL, so it should be checked and handle error. And prop should be freed if 'prop->name' is NULL. Signed-off-by: Gen Zhang Signed-off-by: Michael Ellerman arch/powerpc/platforms/pseries/dlpar.c | 4 ++++ 1 file changed, 4 insertions(+) commit 860dbce3d8dd90cb9e909c58fa79808766243651 Merge: 1b496469d0c0 3ab4436f688c Author: Yoshinori Sato Date: Sun Jun 2 15:46:11 2019 +0900 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux commit c1e9e01d423334f1647c3a746f2e451dfb6044fb Merge: 0462eaacee49 29930e314da3 Author: David S. Miller Date: Sat Jun 1 16:21:19 2019 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next Pablo Neira Ayuso says: ==================== Netfilter/IPVS updates for net-next The following patchset container Netfilter/IPVS update for net-next: 1) Add UDP tunnel support for ICMP errors in IPVS. Julian Anastasov says: This patchset is a followup to the commit that adds UDP/GUE tunnel: "ipvs: allow tunneling with gue encapsulation". What we do is to put tunnel real servers in hash table (patch 1), add function to lookup tunnels (patch 2) and use it to strip the embedded tunnel headers from ICMP errors (patch 3). 2) Extend xt_owner to match for supplementary groups, from Lukasz Pawelczyk. 3) Remove unused oif field in flow_offload_tuple object, from Taehee Yoo. 4) Release basechain counters from workqueue to skip synchronize_rcu() call. From Florian Westphal. 5) Replace skb_make_writable() by skb_ensure_writable(). Patchset from Florian Westphal. 6) Checksum support for gue encapsulation in IPVS, from Jacky Hu. ==================== Signed-off-by: David S. Miller commit 138f79db15eaa02cff713cbef25de416b1e16375 Author: YueHaibing Date: Tue May 28 17:13:04 2019 +0800 pinctrl: bcm2835: Fix build error without CONFIG_OF drivers/pinctrl/bcm/pinctrl-bcm2835.c: In function bcm2835_pctl_dt_node_to_map: drivers/pinctrl/bcm/pinctrl-bcm2835.c:720:8: error: implicit declaration of function pinconf_generic_dt_node_to_map_all; drivers/pinctrl/bcm/pinctrl-bcm2835.c: In function bcm2835_pinctrl_probe: drivers/pinctrl/bcm/pinctrl-bcm2835.c:1022:15: error: struct gpio_chip has no member named of_node pc->gpio_chip.of_node = np; Reported-by: Hulk Robot Fixes: 0de704955ee4 ("pinctrl: bcm2835: Add support for generic pinctrl binding") Signed-off-by: YueHaibing Signed-off-by: Linus Walleij drivers/pinctrl/bcm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a3094fc1a15eff0f69f6fdc335b1b21081b27a74 Author: Anson Huang Date: Tue Apr 9 05:00:07 2019 +0000 rtc: imx-sc: add rtc alarm support Add i.MX system controller RTC alarm support, the RTC alarm is implemented via SIP(silicon provider) runtime service call and ARM-Trusted-Firmware will communicate with system controller via MU(message unit) IPC to set RTC alarm. When RTC alarm fires, system controller will generate a common MU irq event and notify system controller RTC driver to handle the irq event. Signed-off-by: Anson Huang Reviewed-by: Dong Aisheng Signed-off-by: Alexandre Belloni drivers/rtc/rtc-imx-sc.c | 87 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) commit 42ca37ca476249ef01186a7c69a6b6c860e72c29 Author: Michał Mirosław Date: Sat May 25 11:12:55 2019 +0200 rtc: tps65910: fix typo in register name in read_alarm() Fix an obvious typo: in read_alarm() call we should read alarm setting (starting at ALARM_SECONDS register) and not current time. Signed-off-by: Michał Mirosław Signed-off-by: Alexandre Belloni drivers/rtc/rtc-tps65910.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c3f0795e42513bff1cc1ab55a893d1c3dbf60b4 Author: Michał Mirosław Date: Sat May 25 11:12:51 2019 +0200 rtc: tps65910: remove superfluous Kconfig dependency TPS65910 entry is already under 'if RTC_CLASS' - remove superfluous dependency. Signed-off-by: Michał Mirosław Signed-off-by: Alexandre Belloni drivers/rtc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3e483e59c79601ea682aa67f9805da79716efab0 Author: Thierry Reding Date: Mon May 27 12:13:59 2019 +0200 rtc: tegra: Turn into regular driver Drivers registered with module_platform_driver_probe() are considered non-hotpluggable, which among other things means that they don't support deferred probe. However, recent changes in how the ARM SMMU works have required the BPMP (which is the clock provider on Tegra186 and later) be bound to the SMMU, which in turn means that the BPMP driver can defer probe and hence clocks become available much later than they used to. For most other drivers this is not a problem because they already properly support deferred probe, but rtc-tegra is the odd one out that now fails to probe and will therefore never be registered. Fix this by making the driver a regular driver that supports unloading and deferred probe. Signed-off-by: Thierry Reding Signed-off-by: Alexandre Belloni drivers/rtc/rtc-tegra.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c6af561a4ad0971c79faee397fa02fa085018fa3 Author: Thierry Reding Date: Mon May 27 12:13:58 2019 +0200 rtc: tegra: Use consistent variable names and types Many of the variables have redundant prefixes or suffixes. Drop all of them where not necessary for context. Also make sure to use data types consistently. For instance, values read from 32-bit register accessors should be stored in u32. Signed-off-by: Thierry Reding Signed-off-by: Alexandre Belloni drivers/rtc/rtc-tegra.c | 118 ++++++++++++++++++++++++------------------------ 1 file changed, 58 insertions(+), 60 deletions(-) commit a2d29238bc6005511d5bef0b9c9ddd935b18251b Author: Thierry Reding Date: Mon May 27 12:13:57 2019 +0200 rtc: tegra: checkpatch and miscellaneous cleanups This set of changes fixes some checkpatch warnings as well as a number of punctuation and padding inconsistencies. Signed-off-by: Thierry Reding Signed-off-by: Alexandre Belloni drivers/rtc/rtc-tegra.c | 154 +++++++++++++++++++++++++----------------------- 1 file changed, 79 insertions(+), 75 deletions(-) commit 489b64d663255a525b49285336102177b646710e Author: Linus Walleij Date: Sat Jun 1 19:53:31 2019 +0200 pinctrl: stm32: Add links to consumers Using STM32 as guinea pig after Alex's initial positive test to see if this is something we should encourage in general and make default behaviour. Cc: Benjamin Gaignard Cc: Alexandre Torgue Signed-off-by: Linus Walleij drivers/pinctrl/stm32/pinctrl-stm32.c | 1 + 1 file changed, 1 insertion(+) commit 5ca1b1c5cd980216859b8f9e7724fb468f57dbeb Author: Nicolas Boichat Date: Wed May 8 15:33:31 2019 +0800 pinctrl: mediatek: mt8183: Add pm_ops Setting this up will configure wake from suspend properly, and wake only for the interrupts that are setup in wake_mask, not all interrupts. Signed-off-by: Nicolas Boichat Acked-by: Sean Wang Signed-off-by: Linus Walleij drivers/pinctrl/mediatek/pinctrl-mt8183.c | 1 + 1 file changed, 1 insertion(+) commit 5c0904488a20429e3de41d11f1d1adf28635e362 Author: Nicolas Boichat Date: Wed May 8 15:33:30 2019 +0800 pinctrl: mediatek: Add pm_ops to pinctrl-paris pinctrl variants that include pinctrl-paris.h (and not pinctrl-mtk-common.h) also need to use pm_ops to setup wake mask properly, so copy over the pm_ops from common to paris variant. It is not easy to merge the 2 copies (or move mtk_eint_suspend/resume to mtk-eint.c), as we need to dereference pctrl->eint, and struct mtk_pinctrl *pctl has a different structure definition for v1 and v2 (which is what paris variant uses). Signed-off-by: Nicolas Boichat Acked-by: Sean Wang Signed-off-by: Linus Walleij drivers/pinctrl/mediatek/pinctrl-paris.c | 19 +++++++++++++++++++ drivers/pinctrl/mediatek/pinctrl-paris.h | 2 ++ 2 files changed, 21 insertions(+) commit fcae009397cd7c3c144e58e98027c97746559656 Author: Neil Armstrong Date: Mon May 20 16:41:08 2019 +0200 dt-bindings: gpio: meson8b-gpio: update with SPDX Licence identifier Signed-off-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Signed-off-by: Linus Walleij include/dt-bindings/gpio/meson8b-gpio.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 03b30dff6d539a973fe10a863df4be00c9ca26f2 Author: Neil Armstrong Date: Mon May 20 16:41:07 2019 +0200 dt-bindings: gpio: meson8-gpio: update with SPDX Licence identifier Signed-off-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Signed-off-by: Linus Walleij include/dt-bindings/gpio/meson8-gpio.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit eb5790db6a2818c58dd378afeb77db9407546655 Author: Neil Armstrong Date: Mon May 20 16:41:06 2019 +0200 dt-bindings: gpio: meson-gxl-gpio: update with SPDX Licence identifier Signed-off-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Signed-off-by: Linus Walleij include/dt-bindings/gpio/meson-gxl-gpio.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 06c789a784c09b89422d93b439624de21bb7dc33 Author: Neil Armstrong Date: Mon May 20 16:41:05 2019 +0200 dt-bindings: gpio: meson-gxbb-gpio: update with SPDX Licence identifier Signed-off-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Signed-off-by: Linus Walleij include/dt-bindings/gpio/meson-gxbb-gpio.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit e0cdd3a095f9a933ff74e89e5fc625e4c2f3a7f0 Author: Neil Armstrong Date: Mon May 20 16:41:04 2019 +0200 pinctrl: meson: update with SPDX Licence identifier Signed-off-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Signed-off-by: Linus Walleij drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 8 +------- drivers/pinctrl/meson/pinctrl-meson-gxl.c | 8 +------- drivers/pinctrl/meson/pinctrl-meson.c | 8 +------- drivers/pinctrl/meson/pinctrl-meson.h | 8 +------- drivers/pinctrl/meson/pinctrl-meson8-pmx.c | 8 +------- drivers/pinctrl/meson/pinctrl-meson8-pmx.h | 8 +------- drivers/pinctrl/meson/pinctrl-meson8.c | 8 +------- drivers/pinctrl/meson/pinctrl-meson8b.c | 8 +------- 8 files changed, 8 insertions(+), 56 deletions(-) commit 6143842823df676bfc0011c39862361dd0389b46 Author: Krishna Yarlagadda Date: Thu May 16 17:23:13 2019 +0530 pinctrl: tegra: Add Tegra194 pinmux driver Tegra194 has PCIE L5 rst and clkreq pins which need to be controlled dynamically at runtime. This driver supports change pinmux for these pins. Pinmux for rest of the pins is set statically by bootloader and will not be changed by this driver Signed-off-by: Krishna Yarlagadda Signed-off-by: Suresh Mangipudi Tested-by: Vidya Sagar Signed-off-by: Linus Walleij drivers/pinctrl/tegra/Kconfig | 4 + drivers/pinctrl/tegra/Makefile | 1 + drivers/pinctrl/tegra/pinctrl-tegra194.c | 170 +++++++++++++++++++++++++++++++ 3 files changed, 175 insertions(+) commit b4e18ba27e22f63098759afab3d804a5a06489c2 Author: Krishna Yarlagadda Date: Thu May 16 17:23:12 2019 +0530 pinctrl: tegra: Support 32 bit register access Tegra194 chip has 32 bit pinctrl registers. Existing register defines in header are only 16 bit. Modified common pinctrl-tegra driver to support 32 bit registers of Tegra 194 and later chips. Signed-off-by: Krishna Yarlagadda Signed-off-by: Linus Walleij drivers/pinctrl/tegra/pinctrl-tegra.c | 8 ++++---- drivers/pinctrl/tegra/pinctrl-tegra.h | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) commit 2585a584f8444e10a5a9e234c0c38b81dfe4370a Author: Krishna Yarlagadda Date: Thu May 16 17:23:11 2019 +0530 pinctrl: Add Tegra194 pinctrl DT bindings Add binding doc for Tegra 194 pinctrl driver. Signed-off-by: Krishna Yarlagadda Tested-by: Vidya Sagar Reviewed-by: Rob Herring Signed-off-by: Linus Walleij .../bindings/pinctrl/nvidia,tegra194-pinmux.txt | 107 +++++++++++++++++++++ 1 file changed, 107 insertions(+) commit 912348b64d091a53c6c25c2a5486bae966f8b379 Author: Imre Deak Date: Fri May 31 11:26:26 2019 +0300 drm/i915/icl: Ensure port A combo PHY HW state is correct Make sure the HW state of the port A combo PHY is correct wrt. the IREFGEN setting. This will force a reprogramming during init or a WARN during uninit if the setting is incorrect. On my ICL RVP I haven't seen this check failing and leading to a forced reinit/WARN, but let's add it still for consistency. Cc: Ville Syrjälä Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190531082626.30640-1-imre.deak@intel.com drivers/gpu/drm/i915/intel_combo_phy.c | 4 ++++ 1 file changed, 4 insertions(+) commit 0462eaacee493f7e2d87551a35d38be93ca723f8 Merge: 33aae28285b7 cd5385029f1d Author: David S. Miller Date: Fri May 31 21:21:18 2019 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Alexei Starovoitov says: ==================== pull-request: bpf-next 2019-05-31 The following pull-request contains BPF updates for your *net-next* tree. Lots of exciting new features in the first PR of this developement cycle! The main changes are: 1) misc verifier improvements, from Alexei. 2) bpftool can now convert btf to valid C, from Andrii. 3) verifier can insert explicit ZEXT insn when requested by 32-bit JITs. This feature greatly improves BPF speed on 32-bit architectures. From Jiong. 4) cgroups will now auto-detach bpf programs. This fixes issue of thousands bpf programs got stuck in dying cgroups. From Roman. 5) new bpf_send_signal() helper, from Yonghong. 6) cgroup inet skb programs can signal CN to the stack, from Lawrence. 7) miscellaneous cleanups, from many developers. ==================== Signed-off-by: David S. Miller commit cd5385029f1d2e6879b78fff1a7b15514004af17 Author: Alan Maguire Date: Fri May 31 18:47:14 2019 +0100 selftests/bpf: measure RTT from xdp using xdping xdping allows us to get latency estimates from XDP. Output looks like this: ./xdping -I eth4 192.168.55.8 Setting up XDP for eth4, please wait... XDP setup disrupts network connectivity, hit Ctrl+C to quit Normal ping RTT data [Ignore final RTT; it is distorted by XDP using the reply] PING 192.168.55.8 (192.168.55.8) from 192.168.55.7 eth4: 56(84) bytes of data. 64 bytes from 192.168.55.8: icmp_seq=1 ttl=64 time=0.302 ms 64 bytes from 192.168.55.8: icmp_seq=2 ttl=64 time=0.208 ms 64 bytes from 192.168.55.8: icmp_seq=3 ttl=64 time=0.163 ms 64 bytes from 192.168.55.8: icmp_seq=8 ttl=64 time=0.275 ms 4 packets transmitted, 4 received, 0% packet loss, time 3079ms rtt min/avg/max/mdev = 0.163/0.237/0.302/0.054 ms XDP RTT data: 64 bytes from 192.168.55.8: icmp_seq=5 ttl=64 time=0.02808 ms 64 bytes from 192.168.55.8: icmp_seq=6 ttl=64 time=0.02804 ms 64 bytes from 192.168.55.8: icmp_seq=7 ttl=64 time=0.02815 ms 64 bytes from 192.168.55.8: icmp_seq=8 ttl=64 time=0.02805 ms The xdping program loads the associated xdping_kern.o BPF program and attaches it to the specified interface. If run in client mode (the default), it will add a map entry keyed by the target IP address; this map will store RTT measurements, current sequence number etc. Finally in client mode the ping command is executed, and the xdping BPF program will use the last ICMP reply, reformulate it as an ICMP request with the next sequence number and XDP_TX it. After the reply to that request is received we can measure RTT and repeat until the desired number of measurements is made. This is why the sequence numbers in the normal ping are 1, 2, 3 and 8. We XDP_TX a modified version of ICMP reply 4 and keep doing this until we get the 4 replies we need; hence the networking stack only sees reply 8, where we have XDP_PASSed it upstream since we are done. In server mode (-s), xdping simply takes ICMP requests and replies to them in XDP rather than passing the request up to the networking stack. No map entry is required. xdping can be run in native XDP mode (the default, or specified via -N) or in skb mode (-S). A test program test_xdping.sh exercises some of these options. Note that native XDP does not seem to XDP_TX for veths, hence -N is not tested. Looking at the code, it looks like XDP_TX is supported so I'm not sure if that's expected. Running xdping in native mode for ixgbe as both client and server works fine. Changes since v4 - close fds on cleanup (Song Liu) Changes since v3 - fixed seq to be __be16 (Song Liu) - fixed fd checks in xdping.c (Song Liu) Changes since v2 - updated commit message to explain why seq number of last ICMP reply is 8 not 4 (Song Liu) - updated types of seq number, raddr and eliminated csum variable in xdpclient/xdpserver functions as it was not needed (Song Liu) - added XDPING_DEFAULT_COUNT definition and usage specification of default/max counts (Song Liu) Changes since v1 - moved from RFC to PATCH - removed unused variable in ipv4_csum() (Song Liu) - refactored ICMP checks into icmp_check() function called by client and server programs and reworked client and server programs due to lack of shared code (Song Liu) - added checks to ensure that SKB and native mode are not requested together (Song Liu) Signed-off-by: Alan Maguire Acked-by: Song Liu Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/.gitignore | 1 + tools/testing/selftests/bpf/Makefile | 5 +- tools/testing/selftests/bpf/progs/xdping_kern.c | 184 +++++++++++++++++ tools/testing/selftests/bpf/test_xdping.sh | 99 +++++++++ tools/testing/selftests/bpf/xdping.c | 258 ++++++++++++++++++++++++ tools/testing/selftests/bpf/xdping.h | 13 ++ 6 files changed, 558 insertions(+), 2 deletions(-) commit 33aae28285b73e013f7f697a61f569c5b48c6650 Merge: 587a7126779b fdad1d54d2c8 Author: David S. Miller Date: Fri May 31 17:13:19 2019 -0700 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2019-05-31 This series contains updates to the iavf driver. Nathan Chancellor converts the use of gnu_printf to printf. Aleksandr modifies the driver to limit the number of RSS queues to the number of online CPUs in order to avoid creating misconfigured RSS queues. Gustavo A. R. Silva converts a couple of instances where sizeof() can be replaced with struct_size(). Alice makes the remaining changes to the iavf driver to cleanup all the old "i40evf" references in the driver to iavf, including the file names that still contained the old driver reference. There was no functional changes made, just cosmetic to reduce any confusion going forward now that the iavf driver is the virtual function driver for both i40e and ice drivers. ==================== Signed-off-by: David S. Miller commit c231c22a989af95fae3e75cac9d4511e0fe79377 Author: Jiong Wang Date: Thu May 30 21:23:18 2019 +0100 bpf: doc: update answer for 32-bit subregister question There has been quite a few progress around the two steps mentioned in the answer to the following question: Q: BPF 32-bit subregister requirements This patch updates the answer to reflect what has been done. v2: - Add missing full stop. (Song Liu) - Minor tweak on one sentence. (Song Liu) v1: - Integrated rephrase from Quentin and Jakub Reviewed-by: Quentin Monnet Reviewed-by: Jakub Kicinski Signed-off-by: Jiong Wang Acked-by: Song Liu Signed-off-by: Alexei Starovoitov Documentation/bpf/bpf_design_QA.rst | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) commit d168286d773ca7d5f9e8de8765216557839579d8 Merge: 576240cfaf20 c85d69135a91 Author: Alexei Starovoitov Date: Fri May 31 16:52:56 2019 -0700 Merge branch 'map-charge-cleanup' Roman Gushchin says: ==================== During my work on memcg-based memory accounting for bpf maps I've done some cleanups and refactorings of the existing memlock rlimit-based code. It makes it more robust, unifies size to pages conversion, size checks and corresponding error codes. Also it adds coverage for cgroup local storage and socket local storage maps. It looks like some preliminary work on the mm side might be required to start working on the memcg-based accounting, so I'm sending these patches as a separate patchset. ==================== Signed-off-by: Alexei Starovoitov commit c85d69135a9175c50a823d04d62d932312d037b3 Author: Roman Gushchin Date: Wed May 29 18:03:59 2019 -0700 bpf: move memory size checks to bpf_map_charge_init() Most bpf map types doing similar checks and bytes to pages conversion during memory allocation and charging. Let's unify these checks by moving them into bpf_map_charge_init(). Signed-off-by: Roman Gushchin Acked-by: Song Liu Signed-off-by: Alexei Starovoitov include/linux/bpf.h | 2 +- kernel/bpf/arraymap.c | 8 +------- kernel/bpf/cpumap.c | 5 +---- kernel/bpf/devmap.c | 5 +---- kernel/bpf/hashtab.c | 7 +------ kernel/bpf/local_storage.c | 5 +---- kernel/bpf/lpm_trie.c | 7 +------ kernel/bpf/queue_stack_maps.c | 4 ---- kernel/bpf/reuseport_array.c | 10 ++-------- kernel/bpf/stackmap.c | 8 +------- kernel/bpf/syscall.c | 9 +++++++-- kernel/bpf/xskmap.c | 5 +---- net/core/bpf_sk_storage.c | 4 +--- net/core/sock_map.c | 8 +------- 14 files changed, 20 insertions(+), 67 deletions(-) commit b936ca643ade11f265fa10e5fb71c20d9c5243f1 Author: Roman Gushchin Date: Wed May 29 18:03:58 2019 -0700 bpf: rework memlock-based memory accounting for maps In order to unify the existing memlock charging code with the memcg-based memory accounting, which will be added later, let's rework the current scheme. Currently the following design is used: 1) .alloc() callback optionally checks if the allocation will likely succeed using bpf_map_precharge_memlock() 2) .alloc() performs actual allocations 3) .alloc() callback calculates map cost and sets map.memory.pages 4) map_create() calls bpf_map_init_memlock() which sets map.memory.user and performs actual charging; in case of failure the map is destroyed 1) bpf_map_free_deferred() calls bpf_map_release_memlock(), which performs uncharge and releases the user 2) .map_free() callback releases the memory The scheme can be simplified and made more robust: 1) .alloc() calculates map cost and calls bpf_map_charge_init() 2) bpf_map_charge_init() sets map.memory.user and performs actual charge 3) .alloc() performs actual allocations 1) .map_free() callback releases the memory 2) bpf_map_charge_finish() performs uncharge and releases the user The new scheme also allows to reuse bpf_map_charge_init()/finish() functions for memcg-based accounting. Because charges are performed before actual allocations and uncharges after freeing the memory, no bogus memory pressure can be created. In cases when the map structure is not available (e.g. it's not created yet, or is already destroyed), on-stack bpf_map_memory structure is used. The charge can be transferred with the bpf_map_charge_move() function. Signed-off-by: Roman Gushchin Acked-by: Song Liu Signed-off-by: Alexei Starovoitov include/linux/bpf.h | 5 +++- kernel/bpf/arraymap.c | 10 +++++-- kernel/bpf/cpumap.c | 8 +++-- kernel/bpf/devmap.c | 13 ++++---- kernel/bpf/hashtab.c | 11 +++---- kernel/bpf/local_storage.c | 9 ++++-- kernel/bpf/lpm_trie.c | 5 ++-- kernel/bpf/queue_stack_maps.c | 9 ++++-- kernel/bpf/reuseport_array.c | 9 ++++-- kernel/bpf/stackmap.c | 30 +++++++++++-------- kernel/bpf/syscall.c | 69 +++++++++++++++++++++---------------------- kernel/bpf/xskmap.c | 9 +++--- net/core/bpf_sk_storage.c | 8 +++-- net/core/sock_map.c | 5 ++-- 14 files changed, 112 insertions(+), 88 deletions(-) commit 3539b96e041c06e4317082816d90ec09160aeb11 Author: Roman Gushchin Date: Wed May 29 18:03:57 2019 -0700 bpf: group memory related fields in struct bpf_map_memory Group "user" and "pages" fields of bpf_map into the bpf_map_memory structure. Later it can be extended with "memcg" and other related information. The main reason for a such change (beside cosmetics) is to pass bpf_map_memory structure to charging functions before the actual allocation of bpf_map. Signed-off-by: Roman Gushchin Acked-by: Song Liu Signed-off-by: Alexei Starovoitov include/linux/bpf.h | 10 +++++++--- kernel/bpf/arraymap.c | 2 +- kernel/bpf/cpumap.c | 4 ++-- kernel/bpf/devmap.c | 4 ++-- kernel/bpf/hashtab.c | 4 ++-- kernel/bpf/local_storage.c | 2 +- kernel/bpf/lpm_trie.c | 4 ++-- kernel/bpf/queue_stack_maps.c | 2 +- kernel/bpf/reuseport_array.c | 2 +- kernel/bpf/stackmap.c | 4 ++-- kernel/bpf/syscall.c | 19 ++++++++++--------- kernel/bpf/xskmap.c | 4 ++-- net/core/bpf_sk_storage.c | 2 +- net/core/sock_map.c | 4 ++-- 14 files changed, 36 insertions(+), 31 deletions(-) commit d50836cda698f6966e63c2c7f718d7c2f687ec8a Author: Roman Gushchin Date: Wed May 29 18:03:56 2019 -0700 bpf: add memlock precharge for socket local storage Socket local storage maps lack the memlock precharge check, which is performed before the memory allocation for most other bpf map types. Let's add it in order to unify all map types. Signed-off-by: Roman Gushchin Acked-by: Song Liu Signed-off-by: Alexei Starovoitov net/core/bpf_sk_storage.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit ffc8b144d5d056dd0ab8d995c7345cdd6a589fc7 Author: Roman Gushchin Date: Wed May 29 18:03:55 2019 -0700 bpf: add memlock precharge check for cgroup_local_storage Cgroup local storage maps lack the memlock precharge check, which is performed before the memory allocation for most other bpf map types. Let's add it in order to unify all map types. Signed-off-by: Roman Gushchin Acked-by: Song Liu Signed-off-by: Alexei Starovoitov kernel/bpf/local_storage.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 576240cfaf206ea7d08ae7421088a788d861212d Merge: 399dc65e9ca0 d58c6f7212f4 Author: Alexei Starovoitov Date: Fri May 31 16:41:30 2019 -0700 Merge branch 'propagate-cn-to-tcp' Lawrence Brakmo says: ==================== This patchset adds support for propagating congestion notifications (cn) to TCP from cgroup inet skb egress BPF programs. Current cgroup skb BPF programs cannot trigger TCP congestion window reductions, even when they drop a packet. This patch-set adds support for cgroup skb BPF programs to send congestion notifications in the return value when the packets are TCP packets. Rather than the current 1 for keeping the packet and 0 for dropping it, they can now return: NET_XMIT_SUCCESS (0) - continue with packet output NET_XMIT_DROP (1) - drop packet and do cn NET_XMIT_CN (2) - continue with packet output and do cn -EPERM - drop packet Finally, HBM programs are modified to collect and return more statistics. There has been some discussion regarding the best place to manage bandwidths. Some believe this should be done in the qdisc where it can also be managed with a BPF program. We believe there are advantages for doing it with a BPF program in the cgroup/skb callback. For example, it reduces overheads in the cases where there is on primary workload and one or more secondary workloads, where each workload is running on its own cgroupv2. In this scenario, we only need to throttle the secondary workloads and there is no overhead for the primary workload since there will be no BPF program attached to its cgroup. Regardless, we agree that this mechanism should not penalize those that are not using it. We tested this by doing 1 byte req/reply RPCs over loopback. Each test consists of 30 sec of back-to-back 1 byte RPCs. Each test was repeated 50 times with a 1 minute delay between each set of 10. We then calculated the average RPCs/sec over the 50 tests. We compare upstream with upstream + patchset and no BPF program as well as upstream + patchset and a BPF program that just returns ALLOW_PKT. Here are the results: upstream 80937 RPCs/sec upstream + patches, no BPF program 80894 RPCs/sec upstream + patches, BPF program 80634 RPCs/sec These numbers indicate that there is no penalty for these patches The use of congestion notifications improves the performance of HBM when using Cubic. Without congestion notifications, Cubic will not decrease its cwnd and HBM will need to drop a large percentage of the packets. The following results are obtained for rate limits of 1Gbps, between two servers using netperf, and only one flow. We also show how reducing the max delayed ACK timer can improve the performance when using Cubic. Command used was: ./do_hbm_test.sh -l -D --stats -N -r= [--no_cn] [dctcp] \ -s= where: is 1000 --no_cn specifies no cwr notifications dctcp uses dctcp Cubic DCTCP Lim, DA Mbps cwnd cred drops Mbps cwnd cred drops -------- ---- ---- ---- ----- ---- ---- ---- ----- 1G, 40 35 462 -320 67% 995 1 -212 0.05% 1G, 40,cn 736 9 -78 0.07 995 1 -212 0.05 1G, 5,cn 941 2 -189 0.13 995 1 -212 0.05 Notes: --no_cn has no effect with DCTCP Lim = rate limit DA = maximum delay ack timer cred = credit in packets drops = % packets dropped v1->v2: Insures that only BPF_CGROUP_INET_EGRESS can return values 2 and 3 New egress values apply to all protocols, not just TCP Cleaned up patch 4, Update BPF_CGROUP_RUN_PROG_INET_EGRESS callers Removed changes to __tcp_transmit_skb (patch 5), no longer needed Removed sample use of EDT v2->v3: Removed the probe timer related changes v3->v4: Replaced preempt_enable_no_resched() by preempt_enable() in BPF_PROG_CGROUP_INET_EGRESS_RUN_ARRAY() macro ==================== Acked-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov commit d58c6f7212f4eda59ca94cbfbaa785dde7675456 Author: brakmo Date: Tue May 28 16:59:40 2019 -0700 bpf: Add more stats to HBM Adds more stats to HBM, including average cwnd and rtt of all TCP flows, percents of packets that are ecn ce marked and distribution of return values. Signed-off-by: Lawrence Brakmo Signed-off-by: Alexei Starovoitov samples/bpf/hbm.c | 33 +++++++++++++++++++++++ samples/bpf/hbm.h | 6 +++++ samples/bpf/hbm_kern.h | 66 ++++++++++++++++++++++++++++++++++++++++++++-- samples/bpf/hbm_out_kern.c | 22 ++++++++++------ 4 files changed, 117 insertions(+), 10 deletions(-) commit ffd81558d56c611b1e93f856c77f42046a2deab5 Author: brakmo Date: Tue May 28 16:59:39 2019 -0700 bpf: Add cn support to hbm_out_kern.c Update hbm_out_kern.c to support returning cn notifications. Also updates relevant files to allow disabling cn notifications. Signed-off-by: Lawrence Brakmo Signed-off-by: Alexei Starovoitov samples/bpf/do_hbm_test.sh | 10 +++++++--- samples/bpf/hbm.c | 18 +++++++++++++++--- samples/bpf/hbm.h | 3 ++- samples/bpf/hbm_out_kern.c | 26 +++++++++++++++++++++----- 4 files changed, 45 insertions(+), 12 deletions(-) commit 956fe2190820df3a6ee530204e059da508159319 Author: brakmo Date: Tue May 28 16:59:38 2019 -0700 bpf: Update BPF_CGROUP_RUN_PROG_INET_EGRESS calls Update BPF_CGROUP_RUN_PROG_INET_EGRESS() callers to support returning congestion notifications from the BPF programs. Signed-off-by: Lawrence Brakmo Signed-off-by: Alexei Starovoitov net/ipv4/ip_output.c | 34 +++++++++++++++++++++++----------- net/ipv6/ip6_output.c | 26 +++++++++++++++++--------- 2 files changed, 40 insertions(+), 20 deletions(-) commit e7a3160d092aa4dd7fb2ef23335cb3a98400aec6 Author: brakmo Date: Tue May 28 16:59:37 2019 -0700 bpf: Update __cgroup_bpf_run_filter_skb with cn For egress packets, __cgroup_bpf_fun_filter_skb() will now call BPF_PROG_CGROUP_INET_EGRESS_RUN_ARRAY() instead of PROG_CGROUP_RUN_ARRAY() in order to propagate congestion notifications (cn) requests to TCP callers. For egress packets, this function can return: NET_XMIT_SUCCESS (0) - continue with packet output NET_XMIT_DROP (1) - drop packet and notify TCP to call cwr NET_XMIT_CN (2) - continue with packet output and notify TCP to call cwr -EPERM - drop packet For ingress packets, this function will return -EPERM if any attached program was found and if it returned != 1 during execution. Otherwise 0 is returned. Signed-off-by: Lawrence Brakmo Signed-off-by: Alexei Starovoitov kernel/bpf/cgroup.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) commit 5cf1e91456301f8c4f6bbc63ff76cff12f92f31b Author: brakmo Date: Tue May 28 16:59:36 2019 -0700 bpf: cgroup inet skb programs can return 0 to 3 Allows cgroup inet skb programs to return values in the range [0, 3]. The second bit is used to deterine if congestion occurred and higher level protocol should decrease rate. E.g. TCP would call tcp_enter_cwr() The bpf_prog must set expected_attach_type to BPF_CGROUP_INET_EGRESS at load time if it uses the new return values (i.e. 2 or 3). The expected_attach_type is currently not enforced for BPF_PROG_TYPE_CGROUP_SKB. e.g Meaning the current bpf_prog with expected_attach_type setting to BPF_CGROUP_INET_EGRESS can attach to BPF_CGROUP_INET_INGRESS. Blindly enforcing expected_attach_type will break backward compatibility. This patch adds a enforce_expected_attach_type bit to only enforce the expected_attach_type when it uses the new return value. Signed-off-by: Lawrence Brakmo Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov include/linux/filter.h | 3 ++- kernel/bpf/syscall.c | 12 ++++++++++++ kernel/bpf/verifier.c | 16 +++++++++++++--- 3 files changed, 27 insertions(+), 4 deletions(-) commit 1f52f6c0b0e846908e9c1082dab1b3f7088b82ac Author: brakmo Date: Tue May 28 16:59:35 2019 -0700 bpf: Create BPF_PROG_CGROUP_INET_EGRESS_RUN_ARRAY Create new macro BPF_PROG_CGROUP_INET_EGRESS_RUN_ARRAY() to be used by __cgroup_bpf_run_filter_skb for EGRESS BPF progs so BPF programs can request cwr for TCP packets. Current cgroup skb programs can only return 0 or 1 (0 to drop the packet. This macro changes the behavior so the low order bit indicates whether the packet should be dropped (0) or not (1) and the next bit is used for congestion notification (cn). Hence, new allowed return values of CGROUP EGRESS BPF programs are: 0: drop packet 1: keep packet 2: drop packet and call cwr 3: keep packet and call cwr This macro then converts it to one of NET_XMIT values or -EPERM that has the effect of dropping the packet with no cn. 0: NET_XMIT_SUCCESS skb should be transmitted (no cn) 1: NET_XMIT_DROP skb should be dropped and cwr called 2: NET_XMIT_CN skb should be transmitted and cwr called 3: -EPERM skb should be dropped (no cn) Note that when more than one BPF program is called, the packet is dropped if at least one of programs requests it be dropped, and there is cn if at least one program returns cn. Signed-off-by: Lawrence Brakmo Signed-off-by: Alexei Starovoitov include/linux/bpf.h | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) commit 587a7126779b32a6c8983ae567d987c1a0c7a5dc Author: Colin Ian King Date: Thu May 30 20:04:38 2019 +0100 xen-netback: remove redundant assignment to err The variable err is assigned with the value -ENOMEM that is never read and it is re-assigned a new value later on. The assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Acked-by: Wei Liu Signed-off-by: David S. Miller drivers/net/xen-netback/interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6f43e5252833f346be429e9cf6946fb8a1977d73 Author: Colin Ian King Date: Thu May 30 16:57:54 2019 +0100 nexthop: remove redundant assignment to err The variable err is initialized with a value that is never read and err is reassigned a few statements later. This initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Reviewed-by: David Ahern Signed-off-by: David S. Miller net/ipv4/nexthop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9d93a3f5a0c0d0f79aebc597d47c7cedc852aeb5 Author: Jens Axboe Date: Wed May 15 13:53:07 2019 -0600 io_uring: punt short reads to async context We can encounter a short read when we're doing buffered reads and the data is partially cached. Right now we just return the short read, but that forces the application to read that CQE, then issue another SQE to finish the read. That read will not be cached, and hence will result in an async punt. It's more efficient to do that async punt from within the kernel, as that will the not need two round trips more to the kernel. Signed-off-by: Jens Axboe fs/io_uring.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 87e5e6dab6c2a21fab2620f37786276d202e2ce0 Author: Jens Axboe Date: Tue May 14 16:02:22 2019 -0600 uio: make import_iovec()/compat_import_iovec() return bytes on success Currently these functions return < 0 on error, and 0 for success. Change that so that we return < 0 on error, but number of bytes for success. Some callers already treat the return value that way, others need a slight tweak. Signed-off-by: Jens Axboe fs/aio.c | 9 +++++---- fs/io_uring.c | 16 ++++++++-------- fs/splice.c | 8 ++++---- include/linux/uio.h | 4 ++-- lib/iov_iter.c | 15 ++++++++------- net/compat.c | 3 ++- net/socket.c | 3 ++- 7 files changed, 31 insertions(+), 27 deletions(-) commit 0ff9848067b7b950a4ed70de7f5028600a2157e3 Author: Ke Wu Date: Thu May 30 12:22:08 2019 -0700 security/loadpin: Allow to exclude specific file types Linux kernel already provide MODULE_SIG and KEXEC_VERIFY_SIG to make sure loaded kernel module and kernel image are trusted. This patch adds a kernel command line option "loadpin.exclude" which allows to exclude specific file types from LoadPin. This is useful when people want to use different mechanisms to verify module and kernel image while still use LoadPin to protect the integrity of other files kernel loads. Signed-off-by: Ke Wu Reviewed-by: James Morris [kees: fix array size issue reported by Coverity via Colin Ian King] Signed-off-by: Kees Cook Documentation/admin-guide/LSM/LoadPin.rst | 10 +++++++ security/loadpin/loadpin.c | 48 +++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) commit d82b4b26218d359eeba3f401c9fc649388641b1a Author: Chris Wilson Date: Thu May 30 21:35:00 2019 +0100 drm/i915: Report all objects with allocated pages to the shrinker Currently, we try to report to the shrinker the precise number of objects (pages) that are available to be reaped at this moment. This requires searching all objects with allocated pages to see if they fulfill the search criteria, and this count is performed quite frequently. (The shrinker tries to free ~128 pages on each invocation, before which we count all the objects; counting takes longer than unbinding the objects!) If we take the pragmatic view that with sufficient desire, all objects are eventually reapable (they become inactive, or no longer used as framebuffer etc), we can simply return the count of pinned pages maintained during get_pages/put_pages rather than walk the lists every time. The downside is that we may (slightly) over-report the number of objects/pages we could shrink and so penalize ourselves by shrinking more than required. This is mitigated by keeping the order in which we shrink objects such that we avoid penalizing active and frequently used objects, and if memory is so tight that we need to free them we would need to anyway. v2: Only expose shrinkable objects to the shrinker; a small reduction in not considering stolen and foreign objects. v3: Restore the tracking from a "backup" copy from before the gem/ split Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20190530203500.26272-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gem/i915_gem_domain.c | 3 +- drivers/gpu/drm/i915/gem/i915_gem_object.c | 33 ++++------------ drivers/gpu/drm/i915/gem/i915_gem_pages.c | 20 +++++++--- drivers/gpu/drm/i915/gem/i915_gem_shrinker.c | 28 +++----------- drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 2 +- drivers/gpu/drm/i915/i915_debugfs.c | 58 ++-------------------------- drivers/gpu/drm/i915/i915_drv.h | 7 ++-- drivers/gpu/drm/i915/i915_gem.c | 23 +++++------ drivers/gpu/drm/i915/i915_vma.c | 16 ++++++-- 9 files changed, 62 insertions(+), 128 deletions(-) commit 3b4fa9640ccded07fff6d563d3ac1b2f3f111d97 Author: Chris Wilson Date: Thu May 30 21:34:59 2019 +0100 drm/i915: Track the purgeable objects on a separate eviction list Currently the purgeable objects, I915_MADV_DONTNEED, are mixed in the normal bound/unbound lists. Every shrinker pass starts with an attempt to purge from this set of unneeded objects, which entails us doing a walk over both lists looking for any candidates. If there are none, and since we are shrinking we can reasonably assume that the lists are full!, this becomes a very slow futile walk. If we separate out the purgeable objects into own list, this search then becomes its own phase that is preferentially handled during shrinking. Instead the cost becomes that we then need to filter the purgeable list if we want to distinguish between bound and unbound objects. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20190530203500.26272-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gem/i915_gem_domain.c | 14 +++++++++----- drivers/gpu/drm/i915/gem/i915_gem_object.c | 11 ++++++++++- drivers/gpu/drm/i915/gem/i915_gem_pm.c | 1 + drivers/gpu/drm/i915/gem/i915_gem_shmem.c | 4 +--- drivers/gpu/drm/i915/gem/i915_gem_shrinker.c | 22 ++++++++++------------ drivers/gpu/drm/i915/i915_drv.h | 16 ++++++++++------ drivers/gpu/drm/i915/i915_gem.c | 20 ++++++++++++++++++-- drivers/gpu/drm/i915/i915_vma.c | 3 ++- 8 files changed, 61 insertions(+), 30 deletions(-) commit ca6c7df00a89206f142365091c689059fc0b67bf Author: Erez Alfasi Date: Tue May 14 13:55:22 2019 +0300 net/mlx5e: TX, Improve performance under GSO workload __netdev_tx_sent_queue() was introduced by: commit 3e59020abf0f ("net: bql: add __netdev_tx_sent_queue()") BQL counters should be updated without flipping/caring about BQL status, if the current skb has xmit_more set. Using __netdev_tx_sent_queue() avoids messing with BQL stop flag, increases performance on GSO workload by keeping doorbells to the minimum required and also sparing atomic operations. Signed-off-by: Erez Alfasi Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 10caabdaad5ace85577a453da97d1f8d3b944427 Author: Oz Shlomo Date: Thu Apr 18 16:45:29 2019 +0300 net/mlx5e: Use termination table for VLAN push actions HW does not support push VLAN action in the RX direction (packets arriving from the wire). The FW works around this limitation by haripining the packet. The hairpin workaround applies only when the push VLAN action is specified in a termination table, assuring that there are no actions following the haripin. Instantiate termination table for push VLAN actions. Re-use identical terminating tables for increased HW cache efficiency. Signed-off-by: Oz Shlomo Reviewed-by: Paul Blakey Reviewed-by: Eli Britstein Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/Makefile | 3 +- drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 22 ++ .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 15 +- .../mellanox/mlx5/core/eswitch_offloads_termtbl.c | 277 +++++++++++++++++++++ 4 files changed, 315 insertions(+), 2 deletions(-) commit 9272e3df3023aa53256cc53a9e4e62ee715575a7 Author: Yevgeny Kliteynik Date: Thu Apr 4 03:37:36 2019 +0300 net/mlx5e: Geneve, Add support for encap/decap flows offload Add HW offloading support for flows with Geneve encap/decap. Notes about decap flows with Geneve TLV Options: - Support offloading of 32-bit options data only - At any given time, only one combination of class/type parameters can be offloaded, but the same class/type combination can have many different flows offloaded with different 32-bit option data - Options with value of 0 can't be offloaded Reviewed-by: Oz Shlomo Signed-off-by: Yevgeny Kliteynik Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/Makefile | 3 +- .../net/ethernet/mellanox/mlx5/core/en/tc_tun.c | 3 + .../net/ethernet/mellanox/mlx5/core/en/tc_tun.h | 2 + .../ethernet/mellanox/mlx5/core/en/tc_tun_geneve.c | 335 +++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 23 +- 5 files changed, 363 insertions(+), 3 deletions(-) commit d386939a327d2f1c9e918ee843087124eee0efda Author: Yevgeny Kliteynik Date: Sun Apr 14 17:50:01 2019 +0300 net/mlx5e: Rearrange tc tunnel code in a modular way Rearrange tc tunnel code so that it would be easy to add future tunnels: - Define tc tunnel object with the fields and callbacks that any tunnel must implement. - Define tc UDP tunnel object for UDP tunnels, such as VXLAN - Move each tunnel code (GRE, VXLAN) to its own separate file - Rewrite tc tunnel implementation in a general way - using only the objects and their callbacks. Reviewed-by: Oz Shlomo Signed-off-by: Yevgeny Kliteynik Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/Makefile | 2 +- .../net/ethernet/mellanox/mlx5/core/en/tc_tun.c | 281 ++++++--------------- .../net/ethernet/mellanox/mlx5/core/en/tc_tun.h | 39 ++- .../ethernet/mellanox/mlx5/core/en/tc_tun_gre.c | 95 +++++++ .../ethernet/mellanox/mlx5/core/en/tc_tun_vxlan.c | 151 +++++++++++ drivers/net/ethernet/mellanox/mlx5/core/en_rep.h | 3 +- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 10 +- 7 files changed, 373 insertions(+), 208 deletions(-) commit 1f6da30697d0e102f5ed983a2a4942df9875195a Author: Yevgeny Kliteynik Date: Tue Feb 12 13:31:00 2019 +0200 net/mlx5e: Geneve, Keep tunnel info as pointer to the original struct In mlx5e encap entry structure, IP tunnel info data structure is copied by value. This approach worked till now, but it breaks when there are encapsulation options, such as in case of Geneve. These options are stored in the structure that is allocated adjacent to the IP tunnel info struct, and not pointed at by any field in that struct. Therefore, when copying the struct by value, we loose the address of the original struct and can't get to the encapsulation options. Fix the problem by storing the pointer to the tunnel info data instead. Reviewed-by: Oz Shlomo Signed-off-by: Yevgeny Kliteynik Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c | 15 ++++++++------- drivers/net/ethernet/mellanox/mlx5/core/en_rep.h | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 14 +++++++------- 3 files changed, 16 insertions(+), 15 deletions(-) commit 0ccc171ea6a2fa34a6b898329c0a447c84e27057 Author: Yevgeny Kliteynik Date: Wed Jan 30 17:21:55 2019 +0200 net/mlx5: Geneve, Manage Geneve TLV options Use Geneve TLV Options object to manage the flex parser matching on the 32-bit options data. When the first flow with a certain class/type values is requested to be offloaded, create a FW object with FW command (Geneve TLV Options general object) and start counting the number of flows using this object. During this time, any request with a different class/type values will fail to be offloaded. Once the refcount reaches 0, destroy the TLV options general object, and can now offload a flow with any class/type parameters. Geneve TLV Options object is added to core device. It is currently used to manage Geneve TLV options general object allocation in FW and its reference counting only. In the future it will also be used for managing geneve ports by registering callbacks for ndo_udp_tunnel_add/del. Reviewed-by: Oz Shlomo Signed-off-by: Yevgeny Kliteynik Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/Makefile | 3 +- .../net/ethernet/mellanox/mlx5/core/lib/geneve.c | 157 +++++++++++++++++++++ .../net/ethernet/mellanox/mlx5/core/lib/geneve.h | 33 +++++ drivers/net/ethernet/mellanox/mlx5/core/main.c | 4 + include/linux/mlx5/driver.h | 2 + 5 files changed, 198 insertions(+), 1 deletion(-) commit d4a18e16c570fd84ef6cba9933803cf01a7b71e2 Author: Yevgeny Kliteynik Date: Wed Jan 30 15:52:35 2019 +0200 net/mlx5e: Enable setting multiple match criteria for flow group When filling in flow spec match criteria, to allow previous modifications of the match criteria, use "|=" rather than "=". Tunnel options are parsed before the match criteria of the offloaded flow are being set. If the the flow that we're about to offload has encapsulation options, the flow group might need to match on additional criteria. For Geneve, an additional flow group matching parameter should be used - misc3. The appropriate bit in the match criteria is set while parsing the tunnel options, so the criteria value shouldn't be overwritten. This is a pre-step for supporting Geneve TLV options offload. Reviewed-by: Oz Shlomo Signed-off-by: Yevgeny Kliteynik Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) commit d1bda7eecd88e3d10e44541d675c07564f4f6938 Author: Tonghao Zhang Date: Mon May 6 11:28:37 2019 -0700 net/mlx5e: Allow matching only enc_key_id/enc_dst_port for decapsulation action In some case, we don't care the enc_src_ip and enc_dst_ip, and if we don't match the field enc_src_ip and enc_dst_ip, we can use fewer flows in hardware when revice the tunnel packets. For example, the tunnel packets may be sent from different hosts, we must offload one rule for each host. $ tc filter add dev vxlan0 protocol ip parent ffff: prio 1 \ flower dst_mac 00:11:22:33:44:00 \ enc_src_ip Host0_IP enc_dst_ip 2.2.2.100 \ enc_dst_port 4789 enc_key_id 100 \ action tunnel_key unset action mirred egress redirect dev eth0_1 $ tc filter add dev vxlan0 protocol ip parent ffff: prio 1 \ flower dst_mac 00:11:22:33:44:00 \ enc_src_ip Host1_IP enc_dst_ip 2.2.2.100 \ enc_dst_port 4789 enc_key_id 100 \ action tunnel_key unset action mirred egress redirect dev eth0_1 If we support flows which only match the enc_key_id and enc_dst_port, a flow can process the packets sent to VM which (mac 00:11:22:33:44:00). $ tc filter add dev vxlan0 protocol ip parent ffff: prio 1 \ flower dst_mac 00:11:22:33:44:00 \ enc_dst_port 4789 enc_key_id 100 \ action tunnel_key unset action mirred egress redirect dev eth0_1 Signed-off-by: Tonghao Zhang Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 27 +++++++------------------ 1 file changed, 7 insertions(+), 20 deletions(-) commit 9b81d5a9945bc696c2e653757778e79495b164a1 Author: Vu Pham Date: Thu Apr 4 18:27:33 2019 +0300 net/mlx5e: Generalize vport type in vport representor Beside the special vports (PF/uplink/ecpf), the rest of the vports are similar. Remove vf_ prefix from function and variable names. This patch does not change any functionality. Signed-off-by: Vu Pham Reviewed-by: Parav Pandit Reviewed-by: Bodong Wang Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 52 ++++++++++-------------- 1 file changed, 21 insertions(+), 31 deletions(-) commit 7fe4d43eccde0dc83131aca206e07e00673f43aa Merge: b4b12b0d2f02 8693115af4c2 Author: Saeed Mahameed Date: Fri May 31 12:37:24 2019 -0700 Merge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux This series provides some low level updates for mlx5 driver needed for both rdma and netdev trees. 1) Termination flow steering table bits and hardware definitions. 2) Introduce the core dump HW access registers definitions. 3) Refactor and cleans-up VF representors functions handlers. 4) Renames host_params bits to function_changed bits and add the support for eswitch functions change event in the eswitch general case. (for both legacy and switchdev modes). 5) Potential error pointer dereference in error handling Signed-off-by: Saeed Mahameed commit 6912378d54a593dc8469f0ee18135ea62de48c50 Merge: b4b12b0d2f02 54f70b3ba364 Author: David S. Miller Date: Fri May 31 12:37:46 2019 -0700 Merge branch 'phylink-sfp-updates' Russell King says: ==================== phylink/sfp updates This is a series of updates to phylink and sfp: - Remove an unused net device argument from the phylink MII ioctl emulation code. - add support for using interrupts when using a GPIO for link status tracking, rather than polling it at one second intervals. This reduces the need to wakeup the CPU every second. - add support to the MII ioctl API to read and write Clause 45 PHY registers. I don't know how desirable this is for mainline, but I have used this facility extensively to investigate the Marvell 88x3310 PHY. A recent illustration of use for this was debugging the PHY-without-firmware problem recently reported. - add mandatory attach/detach methods for the upstream side of sfp bus code, which will allow us to remove the "netdev" structure from the SFP layers. - remove the "netdev" structure from the SFP upstream registration calls, which simplifies PHY to SFP links. ==================== Signed-off-by: David S. Miller commit 54f70b3ba364f19291dc8b9cb096b02a00fb4461 Author: Russell King Date: Tue May 28 10:57:39 2019 +0100 net: sfp: remove sfp-bus use of netdevs The sfp-bus code now no longer has any use for the network device structure, so remove its use. Signed-off-by: Russell King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/phylink.c | 3 +-- drivers/net/phy/sfp-bus.c | 10 +++------- include/linux/sfp.h | 6 ++---- 3 files changed, 6 insertions(+), 13 deletions(-) commit 320587e6eac960591077b90271f40bfad24d6155 Author: Russell King Date: Tue May 28 10:57:34 2019 +0100 net: sfp: add mandatory attach/detach methods for sfp buses Add attach and detach methods for SFP buses, which will allow us to get rid of the netdev storage in sfp-bus. Signed-off-by: Russell King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/phylink.c | 16 ++++++++++++++++ drivers/net/phy/sfp-bus.c | 4 ++-- include/linux/sfp.h | 6 ++++++ 3 files changed, 24 insertions(+), 2 deletions(-) commit cdea04c24616416f8239d86a1012d924fb6f0d30 Author: Russell King Date: Tue May 28 10:57:29 2019 +0100 net: phy: allow Clause 45 access via mii ioctl Allow userspace to generate Clause 45 MII access cycles via phylib. This is useful for tools such as mii-diag to be able to inspect Clause 45 PHYs. Reviewed-by: Florian Fainelli Signed-off-by: Russell King Signed-off-by: David S. Miller drivers/net/phy/phy.c | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) commit 7b3b0e89bcf3acb56bf59666122226de0913a8b4 Author: Russell King Date: Tue May 28 10:57:23 2019 +0100 net: phylink: support for link gpio interrupt Add support for using GPIO interrupts with a fixed-link GPIO rather than polling the GPIO every second and invoking the phylink resolution. This avoids unnecessary calls to mac_config(). Reviewed-by: Florian Fainelli Signed-off-by: Russell King Signed-off-by: David S. Miller drivers/net/phy/phylink.c | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) commit 7fdc455eef205ca580d38fed376efc7bc81f98cd Author: Russell King Date: Tue May 28 10:57:18 2019 +0100 net: phylink: remove netdev from phylink mii ioctl emulation The netdev used in the phylink ioctl emulation is never used, so let's remove it. Signed-off-by: Russell King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/phylink.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 8693115af4c24d92b971ad895c5f329761ed5d38 Author: Parav Pandit Date: Wed May 29 22:50:41 2019 +0000 {IB,net}/mlx5: Constify rep ops functions pointers Currently for every representor type and for every single vport, representer function pointers copy is stored even though they don't change from one to other vport. Additionally priv data entry for the rep is not passed during registration, but its copied. It is used (set and cleared) by the user of the reps. As we want to scale vports, to simplify and also to split constants from data, 1. Rename mlx5_eswitch_rep_if to mlx5_eswitch_rep_ops as to match _ops prefix with other standard netdev, ibdev ops. 2. Constify the IB and Ethernet rep ops structure. 3. Instead of storing copy of all rep function pointers, store copy per eswitch rep type. 4. Split data and function pointers to mlx5_eswitch_rep_ops and mlx5_eswitch_rep_data. Signed-off-by: Parav Pandit Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed drivers/infiniband/hw/mlx5/ib_rep.c | 19 ++++++----- drivers/infiniband/hw/mlx5/ib_rep.h | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 15 +++++---- drivers/net/ethernet/mellanox/mlx5/core/en_rep.h | 2 +- drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 1 + .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 38 ++++++++++------------ include/linux/mlx5/eswitch.h | 20 +++++++----- 7 files changed, 49 insertions(+), 48 deletions(-) commit c94ff7487754dd23159a8dc47466c0cc82121ebd Author: Parav Pandit Date: Wed May 29 22:50:39 2019 +0000 {IB, net}/mlx5: No need to typecast from void* to mlx5_ib_dev* Avoid typecasting from void* to mlx5_ib_dev* or mlx5e_rep_priv* as it is not needed. Signed-off-by: Parav Pandit Signed-off-by: Saeed Mahameed drivers/infiniband/hw/mlx5/ib_rep.h | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_rep.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 6706a3b94f890145ca09797f748d2b30e1414fd3 Author: Vu Pham Date: Wed May 29 22:50:37 2019 +0000 net/mlx5: E-Switch, Honor eswitch functions changed event cap Whenever device supports eswitch functions changed event, honor such device setting. Do not limit it to ECPF. Signed-off-by: Parav Pandit Signed-off-by: Vu Pham Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eq.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 13 +++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 6 +++--- include/linux/mlx5/mlx5_ifc.h | 4 +++- 4 files changed, 20 insertions(+), 5 deletions(-) commit cd56f929e6a547180f889a4def370bdd6d48d223 Author: Vu Pham Date: Wed May 29 22:50:34 2019 +0000 net/mlx5: E-Switch, Replace host_params event with functions_changed event To support sriov on a E-Switch manager, num_vfs are queried to the firmware whenever E-Switch manager is notified by esw_functions_changed event. Replace host_params event with esw_functions_changed event that reflects more appropriate naming. While at it, also correct num_vfs type from int to u16 as expected by the function mlx5_esw_query_functions(). Signed-off-by: Vu Pham Reviewed-by: Parav Pandit Reviewed-by: Bodong Wang Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 4 +- drivers/net/ethernet/mellanox/mlx5/core/ecpf.c | 27 --------- drivers/net/ethernet/mellanox/mlx5/core/ecpf.h | 4 -- drivers/net/ethernet/mellanox/mlx5/core/eq.c | 3 +- drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 32 +++++++++- drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 6 +- .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 69 +++++++++++++--------- drivers/net/ethernet/mellanox/mlx5/core/events.c | 4 +- include/linux/mlx5/device.h | 2 +- include/linux/mlx5/mlx5_ifc.h | 6 +- 10 files changed, 86 insertions(+), 71 deletions(-) commit c6d4e45d3b44b71227588c2f76615380b3961f96 Author: Eli Britstein Date: Wed May 29 22:50:29 2019 +0000 net/mlx5: Introduce termination table bits Termination table is a flow table with a termination flag. The flag allows the firmware to assume that the the specified actions are the last actions list. This assumption allows the FW to safely perform potential looping logic (e.g. hairpin). Introduce the bits for this attribute. Signed-off-by: Eli Britstein Reviewed-by: Oz Shlomo Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c | 3 +++ include/linux/mlx5/fs.h | 1 + include/linux/mlx5/mlx5_ifc.h | 6 ++++-- 3 files changed, 8 insertions(+), 2 deletions(-) commit 0b9055a112fd86c07b9d4857b61019485ec6526f Author: Moshe Shemesh Date: Wed May 29 22:50:24 2019 +0000 net/mlx5: Add core dump register access HW bits Add Firmware core dump registers and HW definitions. Signed-off-by: Moshe Shemesh Signed-off-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed include/linux/mlx5/driver.h | 1 + include/linux/mlx5/mlx5_ifc.h | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) commit 97545b10221ad14b046dba135a37f4e98a560697 Author: Lijun Ou Date: Thu May 30 23:55:53 2019 +0800 RDMA/hns: Bugfix for posting multiple srq work request When the user submits more than 32 work request to a srq queue at a time, it needs to find the corresponding number of entries in the bitmap in the idx queue. However, the original lookup function named ffs only processes 32 bits of the array element, When the number of srq wqe issued exceeds 32, the ffs will only process the lower 32 bits of the elements, it will not be able to get the correct wqe index for srq wqe. Signed-off-by: Xi Wang Signed-off-by: Lijun Ou Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hns/hns_roce_device.h | 2 +- drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 34 +++++++++++++++-------------- drivers/infiniband/hw/hns/hns_roce_srq.c | 15 +++---------- 3 files changed, 22 insertions(+), 29 deletions(-) commit a5e112e6424adb77d953eac20e6936b952fd6b32 Author: Tejun Heo Date: Mon May 13 12:37:17 2019 -0700 cgroup: add cgroup_parse_float() cgroup already uses floating point for percent[ile] numbers and there are several controllers which want to take them as input. Add a generic parse helper to handle inputs. Update the interface convention documentation about the use of percentage numbers. While at it, also clarify the default time unit. Signed-off-by: Tejun Heo Documentation/admin-guide/cgroup-v2.rst | 6 +++++ include/linux/cgroup.h | 2 ++ kernel/cgroup/cgroup.c | 43 +++++++++++++++++++++++++++++++++ 3 files changed, 51 insertions(+) commit b4b12b0d2f02613101a7a667ef7b7cc8d388e597 Merge: c9bb6165a16e 036e34310931 Author: David S. Miller Date: Fri May 31 10:49:43 2019 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net The phylink conflict was between a bug fix by Russell King to make sure we have a consistent PHY interface mode, and a change in net-next to pull some code in phylink_resolve() into the helper functions phylink_mac_link_{up,down}() On the dp83867 side it's mostly overlapping changes, with the 'net' side removing a condition that was supposed to trigger for RGMII but because of how it was coded never actually could trigger. Signed-off-by: David S. Miller commit 724cf0aecb0d839b0b5865901b02a742dcfa6ea4 Author: Doug Berger Date: Fri May 31 10:34:38 2019 -0700 arm64: Enable PINCTRL for ARCH_BRCMSTB ARCH_BRCMSTB needs to use the BCM2835 pin controller for chips like BCM7211 which adopted that pin controller for GPIO. Signed-off-by: Doug Berger Signed-off-by: Florian Fainelli arch/arm64/Kconfig.platforms | 1 + 1 file changed, 1 insertion(+) commit 809eec694a7b7e0381e7d205df3374b953ca31c1 Author: Jim Quinlan Date: Fri May 31 10:22:03 2019 -0700 arm64: Enable ARCH_HAS_RESET_CONTROLLER for ARCH_BRCMSTB Allow the use of reset controllers on ARCH_BRCMSTB such as the recently introduced RESET_BRCMSTB driver. Signed-off-by: Jim Quinlan Signed-off-by: Florian Fainelli arch/arm64/Kconfig.platforms | 1 + 1 file changed, 1 insertion(+) commit c9bb6165a16e6d5498981a6c777b94a78e74462b Author: Pablo Neira Ayuso Date: Fri May 31 11:15:26 2019 +0200 netfilter: nf_conntrack_bridge: fix CONFIG_IPV6=y This patch fixes a few problems with CONFIG_IPV6=y and CONFIG_NF_CONNTRACK_BRIDGE=m: In file included from net/netfilter/utils.c:5: include/linux/netfilter_ipv6.h: In function 'nf_ipv6_br_defrag': include/linux/netfilter_ipv6.h:110:9: error: implicit declaration of function 'nf_ct_frag6_gather'; did you mean 'nf_ct_attach'? [-Werror=implicit-function-declaration] And these too: net/ipv6/netfilter.c:242:2: error: unknown field 'br_defrag' specified in initializer net/ipv6/netfilter.c:243:2: error: unknown field 'br_fragment' specified in initializer This patch includes an original chunk from wenxu. Fixes: 764dd163ac92 ("netfilter: nf_conntrack_bridge: add support for IPv6") Reported-by: Stephen Rothwell Reported-by: Yuehaibing Reported-by: kbuild test robot Reported-by: wenxu Signed-off-by: Pablo Neira Ayuso Signed-off-by: wenxu Signed-off-by: David S. Miller include/linux/netfilter_ipv6.h | 2 ++ net/ipv6/netfilter.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) commit 29930e314da3833437a2ddc7b17f6a954f38d8fb Author: Jacky Hu Date: Thu May 30 08:16:40 2019 +0800 ipvs: add checksum support for gue encapsulation Add checksum support for gue encapsulation with the tun_flags parameter, which could be one of the values below: IP_VS_TUNNEL_ENCAP_FLAG_NOCSUM IP_VS_TUNNEL_ENCAP_FLAG_CSUM IP_VS_TUNNEL_ENCAP_FLAG_REMCSUM Signed-off-by: Jacky Hu Signed-off-by: Julian Anastasov Signed-off-by: Simon Horman Signed-off-by: Pablo Neira Ayuso include/net/ip_vs.h | 2 + include/uapi/linux/ip_vs.h | 7 ++ net/netfilter/ipvs/ip_vs_ctl.c | 11 +++- net/netfilter/ipvs/ip_vs_xmit.c | 143 +++++++++++++++++++++++++++++++++++----- 4 files changed, 146 insertions(+), 17 deletions(-) commit 2cf6bffc49dae26edd12af6b57c8c780590380bf Author: Florian Westphal Date: Thu May 23 15:44:12 2019 +0200 netfilter: replace skb_make_writable with skb_ensure_writable This converts all remaining users and then removes skb_make_writable. Suggested-by: Daniel Borkmann Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/linux/netfilter.h | 5 ----- net/netfilter/core.c | 22 ---------------------- net/netfilter/nf_synproxy_core.c | 2 +- net/netfilter/nfnetlink_queue.c | 2 +- net/netfilter/xt_DSCP.c | 8 ++++---- 5 files changed, 6 insertions(+), 33 deletions(-) commit fb2eb1c131f8526905a83bd98fd2d4e7c9f950a0 Author: Florian Westphal Date: Thu May 23 15:44:11 2019 +0200 netfilter: tcpmss, optstrip: prefer skb_ensure_writable This also changes optstrip to only make the tcp header writeable rather than the entire packet. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/xt_TCPMSS.c | 2 +- net/netfilter/xt_TCPOPTSTRIP.c | 28 +++++++++++++--------------- 2 files changed, 14 insertions(+), 16 deletions(-) commit 8e03707f118cd2f8dc993b01dd15e78da147a29e Author: Florian Westphal Date: Thu May 23 15:44:10 2019 +0200 netfilter: xt_HL: prefer skb_ensure_writable Also, make the argument to be only the needed size of the header we're altering, no need to pull in the full packet into linear area. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/xt_HL.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7418ee4c8810e4ad74fb05a8b8d4cf406738ac81 Author: Florian Westphal Date: Thu May 23 15:44:09 2019 +0200 netfilter: nf_tables: prefer skb_ensure_writable .. so skb_make_writable can be removed. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_exthdr.c | 3 ++- net/netfilter/nft_payload.c | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) commit 3862c6a91a431337ead5685d647b83f5a82f7705 Author: Florian Westphal Date: Thu May 23 15:44:08 2019 +0200 netfilter: ipv4: prefer skb_ensure_writable .. so skb_make_writable can be removed soon. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/ipv4/netfilter/arpt_mangle.c | 2 +- net/ipv4/netfilter/ipt_ECN.c | 4 ++-- net/ipv4/netfilter/nf_nat_h323.c | 2 +- net/ipv4/netfilter/nf_nat_snmp_basic_main.c | 2 +- net/netfilter/nf_nat_sip.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) commit 86f045385462597e96f5481198a6c60d18d109ca Author: Florian Westphal Date: Thu May 23 15:44:07 2019 +0200 netfilter: conntrack, nat: prefer skb_ensure_writable like previous patches -- convert conntrack to use the core helper. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_proto_sctp.c | 2 +- net/netfilter/nf_conntrack_seqadj.c | 4 ++-- net/netfilter/nf_nat_helper.c | 4 ++-- net/netfilter/nf_nat_proto.c | 24 ++++++++++++------------ 4 files changed, 17 insertions(+), 17 deletions(-) commit ec0974df357f94385070c242ee0a280f4e3cc12d Author: Florian Westphal Date: Thu May 23 15:44:06 2019 +0200 netfilter: ipvs: prefer skb_ensure_writable It does the same thing, use it instead so we can remove skb_make_writable. Signed-off-by: Florian Westphal Acked-by: Simon Horman Signed-off-by: Pablo Neira Ayuso net/netfilter/ipvs/ip_vs_app.c | 4 ++-- net/netfilter/ipvs/ip_vs_core.c | 4 ++-- net/netfilter/ipvs/ip_vs_ftp.c | 4 ++-- net/netfilter/ipvs/ip_vs_proto_sctp.c | 4 ++-- net/netfilter/ipvs/ip_vs_proto_tcp.c | 4 ++-- net/netfilter/ipvs/ip_vs_proto_udp.c | 4 ++-- net/netfilter/ipvs/ip_vs_xmit.c | 12 ++++++------ 7 files changed, 18 insertions(+), 18 deletions(-) commit c1a8311679014a79b04c039e32bde34fb68952fd Author: Florian Westphal Date: Thu May 23 15:44:05 2019 +0200 netfilter: bridge: convert skb_make_writable to skb_ensure_writable Back in the day, skb_ensure_writable did not exist. By now, both functions have the same precondition: I. skb_make_writable will test in this order: 1. wlen > skb->len -> error 2. if not cloned and wlen <= headlen -> OK 3. If cloned and wlen bytes of clone writeable -> OK After those checks, skb is either not cloned but needs to pull from nonlinear area, or writing to head would also alter data of another clone. In both cases skb_make_writable will then call __pskb_pull_tail, which will kmalloc a new memory area to use for skb->head. IOW, after successful skb_make_writable call, the requested length is in linear area and can be modified, even if skb was cloned. II. skb_ensure_writable will do this instead: 1. call pskb_may_pull. This handles case 1 above. After this, wlen is in linear area, but skb might be cloned. 2. return if skb is not cloned 3. return if wlen byte of clone are writeable. 4. fully copy the skb. So post-conditions are the same: *len bytes are writeable in linear area without altering any payload data of a clone, all header pointers might have been changed. Only differences are that skb_ensure_writable is in the core, whereas skb_make_writable lives in netfilter core and the inverted return value. skb_make_writable returns 0 on error, whereas skb_ensure_writable returns negative value. For the normal cases performance is similar: A. skb is not cloned and in linear area: pskb_may_pull is inline helper, so neither function copies. B. skb is cloned, write is in linear area and clone is writeable: both funcions return with step 3. This series removes skb_make_writable from the kernel. While at it, pass the needed value instead, its less confusing that way: There is no special-handling of "0-length" argument in either skb_make_writable or skb_ensure_writable. bridge already makes sure ethernet header is in linear area, only purpose of the make_writable() is is to copy skb->head in case of cloned skbs. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/bridge/netfilter/ebt_dnat.c | 2 +- net/bridge/netfilter/ebt_redirect.c | 2 +- net/bridge/netfilter/ebt_snat.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 53315ac660b09f8128cd086e3ea0ed5ed5081d55 Author: Florian Westphal Date: Wed May 22 23:35:11 2019 +0200 netfilter: nf_tables: free base chain counters from worker No need to use synchronize_rcu() here, just swap the two pointers and have the release occur from work queue after commit has completed. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) commit 5e2ad02e9001fd99cae3c14e52f67bb976e9bee3 Author: Taehee Yoo Date: Thu May 16 04:02:31 2019 +0900 netfilter: nf_flow_table: remove unnecessary variable in flow_offload_tuple The oifidx in the struct flow_offload_tuple is not used anymore. Signed-off-by: Taehee Yoo Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_flow_table.h | 2 -- net/netfilter/nf_flow_table_core.c | 1 - 2 files changed, 3 deletions(-) commit ea6cc2fd8a2b89ab6dcd096ba6dbc1ecbdf26564 Author: Lukasz Pawelczyk Date: Fri May 10 13:46:22 2019 +0200 netfilter: xt_owner: Add supplementary groups option The XT_OWNER_SUPPL_GROUPS flag causes GIDs specified with XT_OWNER_GID to be also checked in the supplementary groups of a process. f_cred->group_info cannot be modified during its lifetime and f_cred holds a reference to it so it's safe to use. Signed-off-by: Lukasz Pawelczyk Signed-off-by: Pablo Neira Ayuso include/uapi/linux/netfilter/xt_owner.h | 7 ++++--- net/netfilter/xt_owner.c | 23 ++++++++++++++++++++--- 2 files changed, 24 insertions(+), 6 deletions(-) commit 6c01edd395a7cc7bb82333e953992eb0e76b1c35 Author: Jonathan Corbet Date: Fri May 31 10:02:11 2019 -0600 docs: look for sphinx-pre-install in the source tree Recent makefile changes included an invocation of ./scripts/sphinx-pre-install. Unfortunately, that fails when a separate build directory is in use with: /bin/bash: ./scripts/sphinx-pre-install: No such file or directory Use $(srctree) to fully specify the location of this script. Signed-off-by: Jonathan Corbet Documentation/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 508f744c0de38f517a94cc2d0bf8e118271b9645 Author: Julian Anastasov Date: Sun May 5 15:14:40 2019 +0300 ipvs: strip udp tunnel headers from icmp errors Recognize UDP tunnels in received ICMP errors and properly strip the tunnel headers. GUE is what we have for now. Signed-off-by: Julian Anastasov Signed-off-by: Simon Horman Signed-off-by: Pablo Neira Ayuso net/netfilter/ipvs/ip_vs_core.c | 60 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) commit 2aa3c9f48bc28ca0effd9877e010ad54c8a630e5 Author: Julian Anastasov Date: Sun May 5 15:14:39 2019 +0300 ipvs: add function to find tunnels Add ip_vs_find_tunnel() to match tunnel headers by family, address and optional port. Use it to properly find the tunnel real server used in received ICMP errors. Signed-off-by: Julian Anastasov Signed-off-by: Simon Horman Signed-off-by: Pablo Neira Ayuso include/net/ip_vs.h | 3 +++ net/netfilter/ipvs/ip_vs_core.c | 8 ++++++++ net/netfilter/ipvs/ip_vs_ctl.c | 29 +++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+) commit 1da40ab6caf924633116582c4c86939c486f20db Author: Julian Anastasov Date: Sun May 5 15:14:38 2019 +0300 ipvs: allow rs_table to contain different real server types Before now rs_table was used only for NAT real servers. Change it to allow TUN real severs from different types, possibly hashed with different port key. Signed-off-by: Julian Anastasov Signed-off-by: Simon Horman Signed-off-by: Pablo Neira Ayuso include/net/ip_vs.h | 3 +++ net/netfilter/ipvs/ip_vs_ctl.c | 43 ++++++++++++++++++++++++++++++++++-------- 2 files changed, 38 insertions(+), 8 deletions(-) commit 0f257b09531b47baa8dd5bb4aa213a602f1f308c Author: Chunming Zhou Date: Tue May 7 19:45:31 2019 +0800 drm/amd/display: use ttm_eu_reserve_buffers instead of amdgpu_bo_reserve v2 add ticket for display bo, so that it can preempt busy bo. v2: fix stupid rebase error Signed-off-by: Chunming Zhou Reviewed-by: Christian König Tested-by: Pierre-Eric Pelloux-Prayer Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) commit d367bd2a5e2b12cb9135b30df94af8211196e8cf Author: Christian König Date: Wed May 22 09:51:47 2019 +0200 drm/ttm: fix busy memory to fail other user v10 BOs on the LRU might be blocked during command submission and cause OOM situations. Avoid this by blocking for the first busy BO not locked by the same ticket as the BO we are searching space for. v10: completely start over with the patch since we didn't handled a whole bunch of corner cases. Signed-off-by: Christian König Reviewed-by: Chunming Zhou Tested-by: Pierre-Eric Pelloux-Prayer Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_bo.c | 77 +++++++++++++++++++++++++++++++++++++------- 1 file changed, 66 insertions(+), 11 deletions(-) commit 224ee02a9d73cb687bc5432a969247689678290c Author: Christian König Date: Mon May 13 17:58:23 2019 +0200 drm/ttm: immediately move BOs to the new LRU v3 Move BOs which are currently in a lower domain to the new LRU before allocating backing space while validating. This makes sure that we always have enough entries on the LRU to allow for other processes to wait for an operation to complete. v2: generalize the test v3: fix rebase error Signed-off-by: Christian König Reviewed-by: Chunming Zhou Tested-by: Pierre-Eric Pelloux-Prayer Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_bo.c | 42 ++++++++++++++++++++++++++++++++---------- 1 file changed, 32 insertions(+), 10 deletions(-) commit 4c5ac9487c155eded34b5b34af7caa1e3b98d161 Author: Christian König Date: Mon May 13 17:34:29 2019 +0200 drm/ttm: cleanup ttm_bo_mem_space We tried this once before, but that turned out to be more complicated than thought. With all the right prerequisites it looks like we can do this now. Signed-off-by: Christian König Acked-by: Chunming Zhou Tested-by: Pierre-Eric Pelloux-Prayer Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_bo.c | 127 ++++++++++++++++++++++--------------------- 1 file changed, 66 insertions(+), 61 deletions(-) commit af1dac01a701a7cfc511d28c32ab5159c3c78c78 Author: Christian König Date: Mon May 13 15:42:52 2019 +0200 drm/ttm: remove manual placement preference If drivers don't prefer a system memory placement they should not but it into the placement list first. Signed-off-by: Christian König Acked-by: Chunming Zhou Tested-by: Pierre-Eric Pelloux-Prayer Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_bo.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit b2f7a6161972a4ccd19ea14ea8d9afbdbda5c51d Author: Christian König Date: Mon May 13 15:36:08 2019 +0200 drm/ttm: return immediately in case of a signal When a signal arrives we should return immediately for handling it and not try other placements first. Signed-off-by: Christian König Acked-by: Chunming Zhou Tested-by: Pierre-Eric Pelloux-Prayer Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_bo.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 6e58ab7ac7fac61acd7705a8abf1632462c1512a Author: Christian König Date: Fri May 10 14:15:08 2019 +0200 drm/ttm: Make LRU removal optional v2 We are already doing this for DMA-buf imports and also for amdgpu VM BOs for quite a while now. If this doesn't run into any problems we are probably going to stop removing BOs from the LRU altogether. v2: drop BUG_ON from ttm_bo_add_to_lru Signed-off-by: Christian König Reviewed-by: Chunming Zhou Tested-by: Pierre-Eric Pelloux-Prayer Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 9 +++++---- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 4 ++-- drivers/gpu/drm/qxl/qxl_release.c | 2 +- drivers/gpu/drm/radeon/radeon_gem.c | 2 +- drivers/gpu/drm/radeon/radeon_object.c | 2 +- drivers/gpu/drm/ttm/ttm_bo.c | 23 ++++++++++++----------- drivers/gpu/drm/ttm/ttm_execbuf_util.c | 20 ++++++++++++-------- drivers/gpu/drm/virtio/virtgpu_ioctl.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | 3 ++- drivers/gpu/drm/vmwgfx/vmwgfx_validation.h | 2 +- include/drm/ttm/ttm_bo_driver.h | 5 ++++- include/drm/ttm/ttm_execbuf_util.h | 3 ++- 14 files changed, 46 insertions(+), 35 deletions(-) commit 526c654a8a0641d4289bf65effde4d6095bd8384 Author: Emily Deng Date: Fri May 31 17:35:27 2019 +0800 drm/amdgpu/display: Fix reload driver error Issue: Will have follow error when reload driver: [ 3986.567739] sysfs: cannot create duplicate filename '/devices/pci0000:00/0000:00:07.0/drm_dp_aux_dev' [ 3986.567743] CPU: 6 PID: 1767 Comm: modprobe Tainted: G OE 5.0.0-rc1-custom #1 [ 3986.567745] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Ubuntu-1.8.2-1ubuntu1 04/01/2014 [ 3986.567746] Call Trace: ...... [ 3986.567808] drm_dp_aux_register_devnode+0xdc/0x140 [drm_kms_helper] ...... [ 3986.569081] kobject_add_internal failed for drm_dp_aux_dev with -EEXIST, don't try to register things with the same name in the same directory. Reproduce sequences: 1.modprobe amdgpu 2.modprobe -r amdgpu 3.modprobe amdgpu Root cause: When unload driver, it doesn't unregister aux. v2: Don't use has_aux Signed-off-by: Emily Deng Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit bdb50274d06a1b2445006b9f7458142f7055d081 Author: Emily Deng Date: Fri May 31 17:30:39 2019 +0800 drm/amdgpu/sriov: Correct some register program method For the VF, some registers only could be programmed with RLC. Signed-off-by: Emily Deng Reviewed-by: Trigger Huang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 10 +++++----- drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) commit 443e902eeef96f3bed54a7067c50a07f06074373 Author: Oak Zeng Date: Tue May 28 14:51:49 2019 -0500 drm/amdkfd: Return proper error code for gws alloc API Signed-off-by: Oak Zeng Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 6 +++--- drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit 4fd334122399a133ddaee8ef865eb10a1cf8000f Author: Aric Cyr Date: Thu May 16 18:43:54 2019 -0400 drm/amd/display: program manual trigger only for bottom most pipe [Why] We only want to manual trigger end-of-frame when the bottom-most pipe is flipped to prevent overlays from ending the frame too early. [How] Check that the manual trigger is only firing on bottom plane. Signed-off-by: Aric Cyr Reviewed-by: Jun Lei Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 6ad34adeaec5b56a5ba90e90099cabf1c1fe9dd2 Author: Krunoslav Kovac Date: Thu May 16 11:14:55 2019 -0400 drm/amd/display: CS_TFM_1D only applied post EOTF [Why] There's some unnecessary mem allocation for CS_TFM_ID. What's worse, it depends on LUT size and since it's 4K for CS_TFM_1D, it is 16x bigger than in regular case when it's actually needed. This leads to some crashes in stress conditions. [How] Skip ramp combining designed for RGB256 and DXGI gamma with CS_TFM_1D. Signed-off-by: Krunoslav Kovac Reviewed-by: Aric Cyr Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/modules/color/color_gamma.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7316c4ad299663a16ca9ce13e5e817b4ca760809 Author: Nicholas Kazlauskas Date: Wed May 1 10:26:09 2019 -0400 drm/amd/display: Reset planes for color management changes [Why] For commits with allow_modeset=false and CRTC degamma changes the planes aren't reset. This results in incorrect rendering. [How] Reset the planes when color management has changed on the CRTC. Technically this will include regamma changes as well, but it doesn't really after legacy userspace since those commit with allow_modeset=true. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Harry Wentland Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++++ 1 file changed, 4 insertions(+) commit e25228b02e4833e5b0fdd262801a2ae6cc72b39d Author: Eryk Brol Date: Wed May 15 15:12:41 2019 -0400 drm/amd/display: Increase Backlight Gain Step Size [Why] Some backlight tests fail due to backlight settling taking too long. This happens because the step size used to change backlight levels is too small. [How] 1. Change the size of the backlight gain step size 2. Change how DMCU firmware gets the step size value so that it is passed in by driver during DMCU initn Signed-off-by: Eryk Brol Reviewed-by: Jun Lei Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c | 3 +++ drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.h | 2 ++ 2 files changed, 5 insertions(+) commit 8633d96d3ca14b37dffe303281c1dff320b422fb Author: Anthony Koo Date: Wed May 15 16:39:23 2019 -0400 drm/amd/display: fix issues with bad AUX reply on some displays [Why] Some displays take some time to power up AUX CH once they are put into D3 state via write to DPCD 600h=2. Interestingly enough, some display may simply NACK, but some might also ACK with a bunch of 0s, which can cause issues with receiver cap retrieval. Note that not all DPCD address return 0s, but in particular it has been observed on some higher DPCD address such as DPCD 2200h, etc. [How] Based on spec, receiver will monitor differential signal while in D3 and AUX CH is in low power mode. When detected, it may allow up to 1 ms to power up AUX CH and reply. If we read Sink power state D3, we should add 1 ms delay to satisfy this spec requirement. Signed-off-by: Anthony Koo Reviewed-by: Wenjing Liu Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit c5c07cb5435e75b1b7837dc142bebfa3f9c6a524 Author: Eric Bernstein Date: Wed May 8 16:08:39 2019 -0400 drm/amd/display: Refactor DIO stream encoder * Pull duplicate audio_clock_info struct to stream_encoder.h * Generalize sec_gsp7* to sec_gsp_pps* * Expose enc1 and enc2 stream encoder audio funcs Signed-off-by: Eric Bernstein Reviewed-by: Charlene Liu Reviewed-by: Dmytro Laktyushkin Acked-by: Leo Li Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dce/dce_stream_encoder.c | 13 ------------- .../drm/amd/display/dc/dcn10/dcn10_stream_encoder.c | 21 ++++----------------- .../drm/amd/display/dc/dcn10/dcn10_stream_encoder.h | 17 +++++++++++++++++ .../gpu/drm/amd/display/dc/inc/hw/stream_encoder.h | 13 +++++++++++++ 4 files changed, 34 insertions(+), 30 deletions(-) commit ff1232a9052e693060f257ef2cc32c8168a79bdc Author: Daniel He Date: Wed May 15 11:38:37 2019 +0800 drm/amd/display: Modified AUX_DPHY_RX_CONTROL0 [Description] This is cause by failing to read link caps from driver. Signed-off-by: Daniel He Reviewed-by: Charlene Liu Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_link_encoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d7644091300a3d77fa7ab5364bb5f81f2cf2908e Author: Ilya Bakoulin Date: Fri Apr 12 16:47:08 2019 -0400 drm/amd/display: Add writeback_config to VBA vars Adding writeback_config enum to vba_vars_st, replacing old flag. Initialize to dm_normal. Signed-off-by: Ilya Bakoulin Reviewed-by: Charlene Liu Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/display_mode_enums.h | 6 ++++++ 1 file changed, 6 insertions(+) commit baa1fd7f32f23118f067b5af79b53998a617ef17 Author: Eric Yang Date: Wed May 8 19:06:30 2019 -0400 drm/amd/display: Refactor clk_mgr functions [Why] Some HW specific implementations can be pulled out into clk_mgr.c. [How] * Pull get_active_display_cnt out to clk_mgr. * Pull out shared logic in set_dispclk and set_dprefclk Signed-off-by: Eric Yang Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c | 25 ++++++++++ .../drm/amd/display/dc/clk_mgr/dcn10/rv1_clk_mgr.c | 25 +--------- .../dc/clk_mgr/dcn10/rv1_clk_mgr_vbios_smu.c | 58 +++++++++++----------- drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr.h | 5 ++ .../drm/amd/display/dc/inc/hw/clk_mgr_internal.h | 4 ++ 5 files changed, 65 insertions(+), 52 deletions(-) commit 961ea20155d79794ec581861680c6926be299898 Author: Eric Yang Date: Wed Apr 10 16:31:08 2019 -0400 drm/amd/display: Fix type of pp_smu_wm_set_range struct [why] Value read from SMU is 16 bits, not 32. [How] Fix type, and add wm_type enum in preparation for future interfaces. Signed-off-by: Eric Yang Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dm_pp_smu.h | 31 +++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) commit 44ab1aa84ae6fa73b9a05c0c611b0e3d2ba05917 Author: Anthony Koo Date: Fri May 10 14:57:48 2019 -0400 drm/amd/display: do not power on eDP power rail early [Why] Modern Standby may toggle display adapter state between D0 and D3 state unpredictably. But events that cause transition to D0 are not always resulting in a display light up scenario. Modern eDP panels should be able to power on panel logic quickly upon VDD going high. Based on spec, the T3 time between VDD on and HPD high can be between 0 and 80 ms. Doing any tricky sorts of optimization by powering on panel VDD early during D0 transition on can negatively impact other features due to unnecessary power drain and toggling when final system state does not intend for the panel to be lit up. We need OEMs to source higher end panels that have T3 time close to 0 if they want quick S3/Modern Standby resume times. [How] Remove panel VDD power on in init_hw Signed-off-by: Anthony Koo Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 3 --- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 3 --- 2 files changed, 6 deletions(-) commit 4b0ab7dd37a3beec35699f2a821d0474bd269c2d Author: Su Sung Chung Date: Fri May 10 15:16:45 2019 -0400 drm/amd/display: fix crash on setmode when mode is close to bw limit [why] during It's possible to call dcn_validate_bandwidth with no plane. In that case, as we are only intersted in if output timing is supported or not, even if we cannot support native resolution, we still want to support lower resolution if it is valid [how] if there exist no surface, make viewport/rec_out size at max 1080p. It is already known that 1080p x 6(max # of pipes) is supported, so if we fail validation, it is because of the stream Signed-off-by: Su Sung Chung Reviewed-by: Dmytro Laktyushkin Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 88147df0308ede3e72a2edefbb9b705e9b63932b Author: Su Sung Chung Date: Wed May 1 16:54:56 2019 -0400 drm/amd/display: fix calculation of total_data_read_bandwidth [why] by adding fast_validate flag, we are skipping some portion of dcn_validate_bandwidth code that is not necessary for mode validation. However we have a bug where it does not calculate v->total_data_read_bandwidth, which is one of the factors determines the result of the validation, and therefore report false positive during mode validation. [how] add calculation of v->total_data_read_bandwidth outside of the region that is guarded by fast_validate flag Signed-off-by: Su Sung Chung Reviewed-by: Dmytro Laktyushkin Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 39 +++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) commit b8b205ab2b418e6162e270383472f444caa556ae Author: Aric Cyr Date: Fri May 10 17:01:01 2019 -0400 drm/amd/display: 3.2.32 Signed-off-by: Aric Cyr Reviewed-by: Aric Cyr Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fe798de53a7a5e2ef9cf7bf5b075f32903d4eec1 Author: Chris Park Date: Fri May 10 13:34:30 2019 -0400 drm/amd/display: Move link functions from dc to dc_link [Why] link-specific functions should reside in dc_link.c [How] Move them there. Signed-off-by: Chris Park Reviewed-by: Charlene Liu Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 122 ------------------------- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 127 +++++++++++++++++++++++++- 2 files changed, 126 insertions(+), 123 deletions(-) commit 8e0546d6c4b10217f0504473448810648d2b18e2 Author: Jun Lei Date: Thu May 9 15:32:27 2019 -0400 drm/amd/display: Add min_dcfclk_mhz field to bb overrides Add min_dcfclk_mhz to bounding box overrides. Signed-off-by: Jun Lei Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 1 + 1 file changed, 1 insertion(+) commit 9b93eb475aa9e7ad856780886cb3c435b6176b76 Author: Eric Yang Date: Tue May 7 12:47:37 2019 -0400 drm/amd/display: move clk_mgr files to right place [Why] Better organization [How] Move clk_mgr files under dc/clk_mgr Signed-off-by: Eric Yang Reviewed-by: Yongqiang Sun Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/Makefile | 1 + drivers/gpu/drm/amd/display/dc/Makefile | 2 +- drivers/gpu/drm/amd/display/dc/clk_mgr/Makefile | 75 ++++++++++++++++++++++ .../amd/display/dc/{dcn10 => clk_mgr}/clk_mgr.c | 13 ++-- .../dc/{dce => clk_mgr/dce100}/dce_clk_mgr.c | 13 +++- .../dc/{dce => clk_mgr/dce100}/dce_clk_mgr.h | 0 .../dc/{dce => clk_mgr/dce110}/dce110_clk_mgr.c | 2 +- .../dc/{dce => clk_mgr/dce110}/dce110_clk_mgr.h | 0 .../dc/{dce => clk_mgr/dce112}/dce112_clk_mgr.c | 4 +- .../dc/{dce => clk_mgr/dce112}/dce112_clk_mgr.h | 0 .../dc/{dce => clk_mgr/dce120}/dce120_clk_mgr.c | 6 +- .../dc/{dce => clk_mgr/dce120}/dce120_clk_mgr.h | 0 .../display/dc/{ => clk_mgr}/dcn10/rv1_clk_mgr.c | 4 +- .../display/dc/{ => clk_mgr}/dcn10/rv1_clk_mgr.h | 0 .../dc/{ => clk_mgr}/dcn10/rv1_clk_mgr_clk.c | 2 +- .../dc/{ => clk_mgr}/dcn10/rv1_clk_mgr_clk.h | 0 .../dc/{ => clk_mgr}/dcn10/rv1_clk_mgr_vbios_smu.c | 0 .../dc/{ => clk_mgr}/dcn10/rv1_clk_mgr_vbios_smu.h | 0 .../display/dc/{ => clk_mgr}/dcn10/rv2_clk_mgr.c | 2 +- .../display/dc/{ => clk_mgr}/dcn10/rv2_clk_mgr.h | 0 drivers/gpu/drm/amd/display/dc/dce/Makefile | 2 +- drivers/gpu/drm/amd/display/dc/dcn10/Makefile | 1 - 22 files changed, 106 insertions(+), 21 deletions(-) commit 70d9e8cb8b4439dcfd42bee08831ffb1c02a4805 Author: Paul Hsieh Date: Tue May 7 17:58:58 2019 +0800 drm/amd/display: disable PSR/ABM before destroy DMCU struct [Why] 1. DMCU is not running on some platform but driver still send ABM command. It may cause assert due to DMCU is not alive. 2. To make sure PSR disable when driver disable [How] 1. Add dmcu_is_running in ABM struct, driver can check this flag to determine driver should send ABM command or not. 2. Send PSR disable command when destroy PSR Signed-off-by: Paul Hsieh Reviewed-by: Anthony Koo Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_abm.c | 13 ++++++++++++- drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c | 3 +++ drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 5 +++++ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 3 +++ drivers/gpu/drm/amd/display/dc/inc/hw/abm.h | 2 +- 5 files changed, 24 insertions(+), 2 deletions(-) commit e63e2491ad92036e844230b6373ae07923552f6c Author: Eryk Brol Date: Tue Apr 23 11:53:52 2019 -0400 drm/amd/display: Ensure DRR triggers in BP [Why] In the previous implementation DRR event sometimes came in during FP2 region which is a keep-out zone. This would cause the frame not to latch until the next frame which resulted in heavy flicker. To fix this we need to make sure that it triggers in the BP. [How] 1. Remove DRR programming during flip 2. Setup manual trigger for DRR event and trigger it after surface programming is complete Signed-off-by: Eryk Brol Reviewed-by: Aric Cyr Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 24 ++++++++++++---- drivers/gpu/drm/amd/display/dc/core/dc.c | 23 ++++++++++------ drivers/gpu/drm/amd/display/dc/dc_stream.h | 1 - .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 4 +-- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c | 32 ++++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.h | 31 +++++++++++++++++---- .../drm/amd/display/dc/inc/hw/timing_generator.h | 3 ++ 7 files changed, 96 insertions(+), 22 deletions(-) commit 313a9a21ff46d22ded2cfa8df8f3742227549627 Author: Krunoslav Kovac Date: Fri Mar 15 16:25:41 2019 -0400 drm/amd/display: Add GSL source select registers GSL is a form of locking that can be used to synchronize pipes in a pipe-split configurations when async flip is used. Add the registers here. Signed-off-by: Krunoslav Kovac Reviewed-by: Tony Cheng Acked-by: Aric Cyr Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 0a32df9cfdb3f48ef77ed821f1b4a3154a234a6e Author: Eryk Brol Date: Wed May 8 09:08:03 2019 -0400 drm/amd/display: Disable audio stream only if it's currently enabled [Why] Previously there were 2 consecutive calls being made to disable audio stream. The first one disabled the audio stream, and the second one went through and also tried to disable the audio stream causing BACO entry issues due to the ASIC appearing busy. [How] 1. Add a status field to the audio struct which stores enabled/disabled info 2. In the calls to enable/disable audio stream check if we're already in the desired state before executing the function Signed-off-by: Eryk Brol Reviewed-by: Jun Lei Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 10 ++++++++++ drivers/gpu/drm/amd/display/dc/inc/hw/audio.h | 1 + 2 files changed, 11 insertions(+) commit b1432fcbdbea5de6e4ec2e1b2fa2b3c13ade4785 Author: Wenjing Liu Date: Tue May 7 15:18:44 2019 -0400 drm/amd/display: assign new stream id in dc_copy_stream [why] stream id should uniquely identify an instance of stream. the copy constructor should be treated as a new stream instance. [how] assign a new stream id in this copy constructor. Signed-off-by: Wenjing Liu Reviewed-by: Jun Lei Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 3 +++ 1 file changed, 3 insertions(+) commit a7f90cbc0ee416ffcb2097583bf5364ffc3818bb Author: Eric Yang Date: Tue May 7 17:29:11 2019 -0400 drm/amd/display: Move CLK_BASE_INNER macro This macro is specificly used by RV1. Move it to the appropriate location. Signed-off-by: Eric Yang Reviewed-by: Aric Cyr Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/rv1_clk_mgr_clk.c | 4 ++++ drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr_internal.h | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) commit 48ea75f99a58d81acfc99bc8d76f5f5107a4f226 Author: Gary Kattan Date: Fri Feb 22 12:51:18 2019 -0800 drm/amd/display: Implement CM dealpha and bias interfaces Add vtable entries for de-alpha and bias color management interfaces. Move piece-wise transfer function registers to a helper list for future reuse. Signed-off-by: Gary Kattan Reviewed-by: Nevenko Stupar Acked-by: Leo Li Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dcn10/dcn10_cm_common.h | 31 ++++++++++++---------- drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h | 17 ++++++++++++ 2 files changed, 34 insertions(+), 14 deletions(-) commit 821c65596b6832263081d308d642f314956bef23 Author: Hugo Hu Date: Fri May 3 15:36:29 2019 +0800 drm/amd/display: Don't use ROM for output TF if GAMMA_CS_TFM_1D We can’t use hardcoded SRGB ROM for output TF if we have GAMMA_CS_TFM_1D (unless we know 1D LUT is identity), so we never want to return here early. We apply the LUT part of ColorTransform3x4 only in apply_lut_1d() which is called near the end of that function. Signed-off-by: Hugo Hu Reviewed-by: Krunoslav Kovac Acked-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/modules/color/color_gamma.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit dc88b4a684d284a200c0ecfd8d87179d6f6c89a3 Author: Eric Yang Date: Mon Apr 22 19:39:35 2019 -0400 drm/amd/display: make clk mgr soc specific [Why] First step of refactoring clk mgr to better handle different ways of handling clock operations. Clock operation policies are soc specific and not just DCN vesion specific. It is not a hw resource, should not be in the resource pool. [How] Change clock manager creation to be based on HW internal ID, rename clock manager members to be more clear. Move clock manager out of resource. Signed-off-by: Eric Yang Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/calcs/dcn_calc_auto.h | 1 + drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 3 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 10 + drivers/gpu/drm/amd/display/dc/core/dc_link.c | 1 + drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 2 +- drivers/gpu/drm/amd/display/dc/dc.h | 2 + drivers/gpu/drm/amd/display/dc/dce/Makefile | 2 +- .../gpu/drm/amd/display/dc/dce/dce110_clk_mgr.c | 276 ++++++++ .../gpu/drm/amd/display/dc/dce/dce110_clk_mgr.h | 44 ++ .../gpu/drm/amd/display/dc/dce/dce112_clk_mgr.c | 239 +++++++ .../gpu/drm/amd/display/dc/dce/dce112_clk_mgr.h | 39 ++ .../gpu/drm/amd/display/dc/dce/dce120_clk_mgr.c | 145 +++++ .../gpu/drm/amd/display/dc/dce/dce120_clk_mgr.h | 34 + drivers/gpu/drm/amd/display/dc/dce/dce_clk_mgr.c | 719 +++------------------ drivers/gpu/drm/amd/display/dc/dce/dce_clk_mgr.h | 173 +---- .../gpu/drm/amd/display/dc/dce/dce_clock_source.c | 1 + .../amd/display/dc/dce100/dce100_hw_sequencer.c | 9 +- .../drm/amd/display/dc/dce100/dce100_resource.c | 28 - .../amd/display/dc/dce110/dce110_hw_sequencer.c | 5 +- .../drm/amd/display/dc/dce110/dce110_resource.c | 27 - .../drm/amd/display/dc/dce112/dce112_resource.c | 28 - .../drm/amd/display/dc/dce120/dce120_resource.c | 20 +- .../gpu/drm/amd/display/dc/dce80/dce80_resource.c | 47 -- drivers/gpu/drm/amd/display/dc/dcn10/Makefile | 3 +- drivers/gpu/drm/amd/display/dc/dcn10/clk_mgr.c | 112 ++++ .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 20 +- .../display/dc/dcn10/dcn10_hw_sequencer_debug.c | 2 +- .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 33 +- .../dc/dcn10/{dcn10_clk_mgr.c => rv1_clk_mgr.c} | 218 +++---- drivers/gpu/drm/amd/display/dc/dcn10/rv1_clk_mgr.h | 31 + .../gpu/drm/amd/display/dc/dcn10/rv1_clk_mgr_clk.c | 75 +++ .../gpu/drm/amd/display/dc/dcn10/rv1_clk_mgr_clk.h | 29 + .../amd/display/dc/dcn10/rv1_clk_mgr_vbios_smu.c | 124 ++++ .../amd/display/dc/dcn10/rv1_clk_mgr_vbios_smu.h | 32 + drivers/gpu/drm/amd/display/dc/dcn10/rv2_clk_mgr.c | 43 ++ .../dc/dcn10/{dcn10_clk_mgr.h => rv2_clk_mgr.h} | 13 +- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 2 - drivers/gpu/drm/amd/display/dc/inc/dcn_calcs.h | 2 +- drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr.h | 32 +- .../drm/amd/display/dc/inc/hw/clk_mgr_internal.h | 208 ++++++ drivers/gpu/drm/amd/display/dc/inc/resource.h | 2 + drivers/gpu/drm/amd/display/include/dal_asic_id.h | 11 +- 43 files changed, 1674 insertions(+), 1175 deletions(-) commit 789142eb8bae10ad17872f08b2bd08b8d24743ae Author: Emily Deng Date: Wed May 29 16:15:52 2019 +0800 drm/amdgpu:Fix the unpin warning about csb buffer As it will destroy clear_state_obj, and also will unpin it in the gfx_v9_0_sw_fini, so don't need to call amdgpu_bo_free_kernel in gfx_v9_0_sw_fini, or it will have unpin warning. Signed-off-by: Emily Deng Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit efb426d581288c40263829dda43a7229f1125e06 Author: xinhui pan Date: Tue May 28 14:47:31 2019 +0800 drm/amdgpu: ras injection use gpu address injection need a valid gpu address. Signed-off-by: xinhui pan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 747bf88c61772ec1e670ee04f4db6af15398c2ef Author: Oded Gabbay Date: Fri May 31 18:25:20 2019 +0300 habanalabs: add WARN in case of bad MMU mapping This patch checks if an MMU mapping is erroneous in that the physical address that is being mapped is NOT divisible by the page size. If that thing happens, then the H/W will issue a transaction which will be translated to a wrong address, because part of the address will not be taken (the remainder of address/page size). Because the physical address is being handled by the driver, a WARN is suitable here as it implies a bug in the driver code itself and not a user bug. Signed-off-by: Oded Gabbay drivers/misc/habanalabs/mmu.c | 4 ++++ 1 file changed, 4 insertions(+) commit 6ef72bc036bcb4c8ad5ef9bd73a71ad2e6538026 Author: Bjorn Andersson Date: Wed May 1 17:14:06 2019 -0700 phy: qcom: Add Qualcomm PCIe2 PHY driver The Qualcomm PCIe2 PHY is based on design from Synopsys and found in several different platforms where the QMP PHY isn't used. Reviewed-by: Niklas Cassel Signed-off-by: Bjorn Andersson Signed-off-by: Kishon Vijay Abraham I drivers/phy/qualcomm/Kconfig | 8 + drivers/phy/qualcomm/Makefile | 1 + drivers/phy/qualcomm/phy-qcom-pcie2.c | 331 ++++++++++++++++++++++++++++++++++ 3 files changed, 340 insertions(+) commit 96ef07f79ae8644ab9c277e3f2f4fb04a54be43d Author: Bjorn Andersson Date: Wed May 1 17:14:05 2019 -0700 dt-bindings: phy: Add binding for Qualcomm PCIe2 PHY The Qualcomm PCIe2 PHY is a Synopsys based PCIe PHY found in a number of Qualcomm platforms, add a binding to describe this. Signed-off-by: Bjorn Andersson Reviewed-by: Rob Herring Signed-off-by: Kishon Vijay Abraham I .../devicetree/bindings/phy/qcom-pcie2-phy.txt | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit ff5781634c41167bb1d8f9620fba1c9c833780ec Author: Jyri Sarha Date: Mon May 27 16:47:57 2019 +0300 drm/bridge: sii902x: Implement HDMI audio support Implement HDMI audio support by using ASoC HDMI codec. The commit implements the necessary callbacks and configuration for the HDMI codec and registers a virtual platform device for the codec to attach. Signed-off-by: Jyri Sarha Reviewed-by: Andrzej Hajda Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/ef6895d016554b1e0c8b388d4993bcd6a3699341.1558964241.git.jsarha@ti.com drivers/gpu/drm/bridge/sii902x.c | 469 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 463 insertions(+), 6 deletions(-) commit 3f18021f43a3503e43759fc158e938045cdd7219 Author: Jyri Sarha Date: Mon May 27 16:47:56 2019 +0300 dt-bindings: display: sii902x: Add HDMI audio bindings The sii902x chip family supports also HDMI audio. Add binding for describing the necessary i2s and mclk wiring for it. Signed-off-by: Jyri Sarha Reviewed-by: Rob Herring Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/f790277fabc45f987f90075dd842368705226a84.1558964241.git.jsarha@ti.com .../devicetree/bindings/display/bridge/sii902x.txt | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit 9ed99f613fb27a1b68ccd725adcb2b33bd64db70 Author: Jyri Sarha Date: Mon May 27 16:47:55 2019 +0300 dt-bindings: display: sii902x: Remove trailing white space Remove trailing white space from sii902x display bridge binding. Signed-off-by: Jyri Sarha Reviewed-by: Laurent Pinchart Reviewed-by: Rob Herring Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/f1f2ef82c4e8ecea920c408bd4e569f5ed27d20a.1558964241.git.jsarha@ti.com Documentation/devicetree/bindings/display/bridge/sii902x.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8dbfc5b65023b67397aca28e8adb25c819f6398c Author: Jyri Sarha Date: Mon May 27 16:47:54 2019 +0300 drm/bridge: sii902x: pixel clock unit is 10kHz instead of 1kHz The pixel clock unit in the first two registers (0x00 and 0x01) of sii9022 is 10kHz, not 1kHz as in struct drm_display_mode. Division by 10 fixes the issue. Signed-off-by: Jyri Sarha Reviewed-by: Andrzej Hajda Reviewed-by: Laurent Pinchart Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/1a2a8eae0b9d6333e7a5841026bf7fd65c9ccd09.1558964241.git.jsarha@ti.com drivers/gpu/drm/bridge/sii902x.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit bceee9bb894887ac38fae0f3f784dad4302114fd Author: Jyri Sarha Date: Mon May 27 16:47:53 2019 +0300 drm/bridge: sii902x: Set output mode to HDMI or DVI according to EDID Set output mode to HDMI or DVI according to EDID HDMI signature. Signed-off-by: Jyri Sarha Reviewed-by: Andrzej Hajda Reviewed-by: Laurent Pinchart Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/c42838073b83185a5cf9949caab3c70ee093b791.1558964241.git.jsarha@ti.com drivers/gpu/drm/bridge/sii902x.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 9fba099b7a84308922017cd6ca1c4c8b4954cb99 Author: Tomi Valkeinen Date: Mon May 27 16:47:52 2019 +0300 drm/bridge: sii902x: add input_bus_flags The driver always sets InputBusFmt:EDGE to 0 (falling edge). Add drm_bridge_timings's input_bus_flags to reflect that the bridge samples on falling edges. Signed-off-by: Tomi Valkeinen Signed-off-by: Jyri Sarha Reviewed-by: Andrzej Hajda Reviewed-by: Laurent Pinchart Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/deb02a1fd508c514472a4e660092f301e6681361.1558964241.git.jsarha@ti.com drivers/gpu/drm/bridge/sii902x.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 423997fffeaf87cbc410e80cc66343dd880d1eef Author: Tomi Valkeinen Date: Tue May 28 11:27:47 2019 +0300 dt-bindings: tc358767: add HPD support Add DT property for defining the pin used for HPD. Signed-off-by: Tomi Valkeinen Cc: devicetree@vger.kernel.org Cc: Rob Herring Reviewed-by: Rob Herring Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-25-tomi.valkeinen@ti.com Documentation/devicetree/bindings/display/bridge/toshiba,tc358767.txt | 1 + 1 file changed, 1 insertion(+) commit f25ee5017e4fe520dbef1a001d60e3a678846508 Author: Tomi Valkeinen Date: Tue May 28 11:27:46 2019 +0300 drm/bridge: tc358767: add IRQ and HPD support Add support for interrupt and hotplug handling. Both are optional. Signed-off-by: Tomi Valkeinen Reviewed-by: Andrzej Hajda Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-24-tomi.valkeinen@ti.com drivers/gpu/drm/bridge/tc358767.c | 163 +++++++++++++++++++++++++++++++++----- 1 file changed, 145 insertions(+), 18 deletions(-) commit af9526f262c06dbce34684f5ba7c17cf81b27359 Author: Tomi Valkeinen Date: Tue May 28 11:27:45 2019 +0300 drm/bridge: tc358767: add GPIO & interrupt registers Add GPIO and interrupt related registers for HPD work. Mark INTSTS_G and GPIOI as volatile. Signed-off-by: Tomi Valkeinen Reviewed-by: Andrzej Hajda Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-23-tomi.valkeinen@ti.com drivers/gpu/drm/bridge/tc358767.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 3231573065ad4f4ecc5c9147b24f29f846dc0c2f Author: Tomi Valkeinen Date: Tue May 28 11:27:44 2019 +0300 drm/bridge: tc358767: read display_props in get_modes() We need to know the link bandwidth to filter out modes we cannot support, so we need to have read the display props before doing the filtering. To ensure we have up to date display props, call tc_get_display_props() in the beginning of tc_connector_get_modes(). Signed-off-by: Tomi Valkeinen Reviewed-by: Andrzej Hajda Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-22-tomi.valkeinen@ti.com drivers/gpu/drm/bridge/tc358767.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 46648a3cec2d5e1bf6af1919f5f79505fcbf3af8 Author: Tomi Valkeinen Date: Tue May 28 11:27:43 2019 +0300 drm/bridge: tc358767: copy the mode data, instead of storing the pointer In tc_bridge_mode_set callback, we store the pointer to the given drm_display_mode, and use the mode later. Storing a pointer in such a way looks very suspicious to me, and I have observed odd issues where the timings were apparently (at least mostly) zero. Do a copy of the drm_display_mode instead to ensure we don't refer to freed/modified data. Signed-off-by: Tomi Valkeinen Reviewed-by: Andrzej Hajda Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-21-tomi.valkeinen@ti.com drivers/gpu/drm/bridge/tc358767.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 0cdb42f313e0c6fa928d2ba55f6d200f615005bc Author: Tomi Valkeinen Date: Tue May 28 11:27:42 2019 +0300 drm/bridge: tc358767: remove tc_connector_best_encoder drm_connector_helper_funcs.best_encoder is only needed when the connector can have more than one encoder, and that is never the case here. So remove tc_connector_best_encoder. Signed-off-by: Tomi Valkeinen Reviewed-by: Andrzej Hajda Reviewed-by: Laurent Pinchart Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-20-tomi.valkeinen@ti.com drivers/gpu/drm/bridge/tc358767.c | 9 --------- 1 file changed, 9 deletions(-) commit 4647a64fd56abc13da1b86550aeed74cb771c3a1 Author: Tomi Valkeinen Date: Tue May 28 11:27:41 2019 +0300 drm/bridge: tc358767: use bridge mode_valid We have tc_connector_mode_valid() to filter out videomdoes that the tc358767 cannot support. As it is a bridge limitation, change the code to use drm_bridge_funcs's mode_valid instead. Signed-off-by: Tomi Valkeinen Reviewed-by: Andrzej Hajda Reviewed-by: Laurent Pinchart Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-19-tomi.valkeinen@ti.com drivers/gpu/drm/bridge/tc358767.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 2792c152a84577eb7df569ce0ef92102ca2c8fdf Author: Tomi Valkeinen Date: Tue May 28 11:27:40 2019 +0300 drm/bridge: tc358767: remove check for video mode in link enable tc_main_link_enable() checks if videomode has been set, and fails if there's no videomode. As tc_main_link_enable() no longer depends on the videomode, we can drop the check. Also, while tc_stream_enable() does depend on the videomode, we can expect that a mode has been set before drm_bridge_funcs.enable is called, so we don't need the check there either. Signed-off-by: Tomi Valkeinen Reviewed-by: Andrzej Hajda Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-18-tomi.valkeinen@ti.com drivers/gpu/drm/bridge/tc358767.c | 4 ---- 1 file changed, 4 deletions(-) commit f9538357760b08cd4c25eefa2d882adae3c9afb2 Author: Tomi Valkeinen Date: Tue May 28 11:27:39 2019 +0300 drm/bridge: tc358767: clean-up link training The current link training code does unnecessary retry-loops, and does extra writes to the registers. It is easier to follow the flow and ensure it's similar to Toshiba's documentation if we deal with LT inside tc_main_link_enable() function. This patch adds tc_wait_link_training() which handles waiting for the LT phase to finish, and does the necessary LT register setups in tc_main_link_enable, without extra loops. Signed-off-by: Tomi Valkeinen Reviewed-by: Andrzej Hajda Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-17-tomi.valkeinen@ti.com drivers/gpu/drm/bridge/tc358767.c | 136 +++++++++++++++++--------------------- 1 file changed, 60 insertions(+), 76 deletions(-) commit 0bf25146511334e5add88f6700aef4309b7e4b55 Author: Tomi Valkeinen Date: Tue May 28 11:27:38 2019 +0300 drm/bridge: tc358767: cleanup LT result check The driver has a loop after ending link training, where it reads the DPCD link status and prints an error if that status is not ok. The loop is unnecessary, as far as I can understand from DP specs, so let's remove it. We can also print the more specific errors to help debugging. Signed-off-by: Tomi Valkeinen Reviewed-by: Andrzej Hajda Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-16-tomi.valkeinen@ti.com drivers/gpu/drm/bridge/tc358767.c | 62 ++++++++++++++++++++++----------------- 1 file changed, 35 insertions(+), 27 deletions(-) commit 0776a269d725e6ce17ae5ea033e1925be861e2f1 Author: Tomi Valkeinen Date: Tue May 28 11:27:37 2019 +0300 drm/bridge: tc358767: use more reliable seq when finishing LT At the end of the link training, two steps have to be taken: 1) tc358767's LT mode is disabled by a write to DP0_SRCCTRL, and 2) Remove LT flag in DPCD 0x102. Toshiba's documentation tells to first write the DPCD, then modify DP0_SRCCTRL. In my testing this often causes issues, and the link disconnects right after those steps. If I reverse the steps, it works every time. There's a chance that this is DP sink specific, though, but as my testing shows this sequence to be much more reliable, let's change it. Signed-off-by: Tomi Valkeinen Reviewed-by: Andrzej Hajda Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-15-tomi.valkeinen@ti.com drivers/gpu/drm/bridge/tc358767.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 31b4c8848a89be23b6706a86fc413f93115a6a1e Author: Tomi Valkeinen Date: Tue May 28 11:27:36 2019 +0300 drm/bridge: tc358767: remove unnecessary msleep For some reason the driver has a msleep(100) after writing to DP_PHY_CTRL. Toshiba's documentation doesn't suggest any delay is needed, and I have not seen any issues with the sleep removed. Drop it, as msleep(100) is a rather big one. Signed-off-by: Tomi Valkeinen Reviewed-by: Andrzej Hajda Reviewed-by: Andrey Gusakov Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-14-tomi.valkeinen@ti.com drivers/gpu/drm/bridge/tc358767.c | 1 - 1 file changed, 1 deletion(-) commit 67bca92fa83089e7091e7210777b2f9ea17e5f87 Author: Tomi Valkeinen Date: Tue May 28 11:27:35 2019 +0300 drm/bridge: tc358767: ensure DP is disabled before LT Link training will sometimes fail if the DP link is enabled when tc_main_link_enable() is called. The driver makes sure the DP link is disabled when the DP output is disabled, and we never enable the DP without first disabling it, so this should never happen. However, as the HW behavior seems to be somewhat random if DP link has erroneously been left enabled, let's add a WARN_ON() for the case and set DP0CTL to 0. Signed-off-by: Tomi Valkeinen Reviewed-by: Andrzej Hajda Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-13-tomi.valkeinen@ti.com drivers/gpu/drm/bridge/tc358767.c | 4 ++++ 1 file changed, 4 insertions(+) commit 1c928267b187a59ce96972a3102acb9ba72890e1 Author: Tomi Valkeinen Date: Tue May 28 11:27:34 2019 +0300 drm/bridge: tc358767: disable only video stream in tc_stream_disable Currently the code writes 0 to DP0CTL in tc_stream_disable(), which disables the whole DP link instead of just the video stream. We always disable the link and the stream together from tc_bridge_disable(), so this doesn't cause any issues. Nevertheless, fix this by only clearing VID_EN in tc_stream_disable to stop the video stream while keeping the link enabled. Signed-off-by: Tomi Valkeinen Reviewed-by: Andrzej Hajda Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-12-tomi.valkeinen@ti.com drivers/gpu/drm/bridge/tc358767.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit cb3263b2df976b104b85362a306d9d72dea0ef95 Author: Tomi Valkeinen Date: Tue May 28 11:27:33 2019 +0300 drm/bridge: tc358767: add link disable function Currently we have tc_main_link_setup(), which configures and enabled the link, but we have no counter-part for disabling the link. Add tc_main_link_disable, and rename tc_main_link_setup to tc_main_link_enable. Signed-off-by: Tomi Valkeinen Reviewed-by: Andrzej Hajda Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-11-tomi.valkeinen@ti.com drivers/gpu/drm/bridge/tc358767.c | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) commit bb24836869a74410fd0a83cfda5381b1f5bd5975 Author: Tomi Valkeinen Date: Tue May 28 11:27:32 2019 +0300 drm/bridge: tc358767: move PXL PLL enable/disable to stream enable/disable We set up the PXL PLL inside tc_main_link_setup. This is unnecessary, and makes tc_main_link_setup depend on the video-mode, which should not be the case. As PXL PLL is used only for the video stream (and only when using the HW test pattern), let's move the PXL PLL setup into tc_stream_enable. Also, currently the PXL PLL is only disabled if the driver if removed. Let's disable the PXL PLL when the stream is disabled. Signed-off-by: Tomi Valkeinen Reviewed-by: Andrzej Hajda Reviewed-by: Laurent Pinchart Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-10-tomi.valkeinen@ti.com drivers/gpu/drm/bridge/tc358767.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 80d57245063f8cb133a50943a021a8789460101e Author: Tomi Valkeinen Date: Tue May 28 11:27:31 2019 +0300 drm/bridge: tc358767: split stream enable/disable It is nicer to have enable/disable functions instead of set(bool enable) style function. Split tc_main_link_stream into tc_stream_enable and tc_stream_disable. Signed-off-by: Tomi Valkeinen Reviewed-by: Andrzej Hajda Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-9-tomi.valkeinen@ti.com drivers/gpu/drm/bridge/tc358767.c | 81 ++++++++++++++++++++++----------------- 1 file changed, 45 insertions(+), 36 deletions(-) commit 5761a259aa9efc61b3253675643a87b3092e90b5 Author: Tomi Valkeinen Date: Tue May 28 11:27:30 2019 +0300 drm/bridge: tc358767: move video stream setup to tc_main_link_stream The driver currently sets the video stream registers in tc_main_link_setup. One should be able to establish the DP link without any video stream, so a more logical place is to configure the stream in the tc_main_link_stream. So move them there. Signed-off-by: Tomi Valkeinen Reviewed-by: Andrzej Hajda Reviewed-by: Laurent Pinchart Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-8-tomi.valkeinen@ti.com drivers/gpu/drm/bridge/tc358767.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit ca342386a9b3a47b3ed30c9a89e74c9ca6152cc6 Author: Tomi Valkeinen Date: Tue May 28 11:27:29 2019 +0300 drm/bridge: tc358767: cleanup aux_link_setup The driver sets up AUX link at probe time, but, for some reason, also sets the main link's number of lanes using tc->link.base.num_lanes. This is not needed nor correct, as the number of lanes has not been decided yet. The number of lanes will be set later during main link setup. Modify aux_link_setup so that it does not use tc->link, and thus makes aux setup independent of the link probing. Signed-off-by: Tomi Valkeinen Reviewed-by: Andrzej Hajda Reviewed-by: Laurent Pinchart Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-7-tomi.valkeinen@ti.com drivers/gpu/drm/bridge/tc358767.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit ab947eb65a3191a0bc24ce18e226b2eae1e395ee Author: Tomi Valkeinen Date: Tue May 28 11:27:28 2019 +0300 drm/bridge: tc358767: remove unused swing & preemp swing and preemp fields are not used. Remove them. Signed-off-by: Tomi Valkeinen Reviewed-by: Andrzej Hajda Reviewed-by: Laurent Pinchart Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-6-tomi.valkeinen@ti.com drivers/gpu/drm/bridge/tc358767.c | 2 -- 1 file changed, 2 deletions(-) commit e5607637c46161c597863f020429f7894c83a7de Author: Tomi Valkeinen Date: Tue May 28 11:27:27 2019 +0300 drm/bridge: tc358767: cleanup spread & scrambler_dis Minor cleanups: - Use bool for boolean fields - Use DP_MAX_DOWNSPREAD_0_5 instead of BIT(0) - debug print down-spread and scrambler status Signed-off-by: Tomi Valkeinen Reviewed-by: Andrzej Hajda Reviewed-by: Laurent Pinchart Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-5-tomi.valkeinen@ti.com drivers/gpu/drm/bridge/tc358767.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 4b30bf41e11fdd40751872a9c01714ac03d51370 Author: Tomi Valkeinen Date: Tue May 28 11:27:26 2019 +0300 drm/bridge: tc358767: fix ansi 8b10b use DP always uses ANSI 8B10B encoding. Some monitors (old?) may not have the ANSI 8B10B bit set in DPCD, even if it should always be set. The tc358767 driver currently respects that flag, and turns the encoding off if the monitor does not have the bit set, which then results in the monitor not working. This patch makes the driver to always use ANSI 8B10B encoding, and drops the 'coding8b10b' field which is no longer used. Signed-off-by: Tomi Valkeinen Reviewed-by: Andrzej Hajda Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-4-tomi.valkeinen@ti.com drivers/gpu/drm/bridge/tc358767.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit c28d14849d374c89ae17134a5bc4a3818fe72467 Author: Tomi Valkeinen Date: Tue May 28 11:27:25 2019 +0300 drm/bridge: tc358767: reset voltage-swing & pre-emphasis We need to reset DPCD voltage-swing & pre-emphasis before starting the link training, as otherwise tc358767 will use the previous values as minimums. Signed-off-by: Tomi Valkeinen Reviewed-by: Andrzej Hajda Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-3-tomi.valkeinen@ti.com drivers/gpu/drm/bridge/tc358767.c | 7 +++++++ 1 file changed, 7 insertions(+) commit bfb6e014c45f84b3bab1842a04907c10c3d63f95 Author: Tomi Valkeinen Date: Tue May 28 11:27:24 2019 +0300 drm/bridge: tc358767: fix tc_aux_get_status error handling tc_aux_get_status() does not report AUX_TIMEOUT correctly, as it only checks the AUX_TIMEOUT if aux is still busy. Fix this by always checking for AUX_TIMEOUT. Signed-off-by: Tomi Valkeinen Reviewed-by: Andrzej Hajda Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-2-tomi.valkeinen@ti.com drivers/gpu/drm/bridge/tc358767.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 7ef5ef5cdead61b8bc17493aae565962611a2918 Author: Jani Nikula Date: Mon May 6 16:48:01 2019 +0300 drm/i915: add force_probe module parameter to replace alpha_support The i915.alpha_support module parameter has caused some confusion along the way. Add new i915.force_probe parameter to specify PCI IDs of devices to probe, when the devices are recognized but not automatically probed by the driver. The name is intended to reflect what the parameter effectively does, avoiding any overloaded semantics of "alpha" and "support". The parameter supports "" to disable, ",[,...]" to enable force probe for one or more devices, and "*" to enable force probe for all known devices. Also add new CONFIG_DRM_I915_FORCE_PROBE config option to replace the DRM_I915_ALPHA_SUPPORT option. This defaults to "*" if DRM_I915_ALPHA_SUPPORT=y. Instead of replacing i915.alpha_support immediately, let the two coexist for a while, with a deprecation message, for a transition period. Cc: Joonas Lahtinen Cc: Rodrigo Vivi Reviewed-by: Rodrigo Vivi Acked-by: Joonas Lahtinen Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190506134801.28751-1-jani.nikula@intel.com drivers/gpu/drm/i915/Kconfig | 29 +++++++++++------- drivers/gpu/drm/i915/i915_drv.h | 2 -- drivers/gpu/drm/i915/i915_params.c | 7 +++-- drivers/gpu/drm/i915/i915_params.h | 1 + drivers/gpu/drm/i915/i915_pci.c | 51 ++++++++++++++++++++++++++++---- drivers/gpu/drm/i915/intel_device_info.h | 2 +- 6 files changed, 72 insertions(+), 20 deletions(-) commit fd1e194f4869dca12ee0cba7c25621d436030a9e Author: Colin Ian King Date: Fri May 31 11:32:01 2019 +0100 drm/i915: fix use of uninitialized pointer vaddr The assignment of err is using the incorrect pointer vaddr that has not been initialized. Fix this by using the correct pointer obj instead. Addresses-Coverity: ("Uninitialized pointer read") Fixes: 6501aa4e3a45 ("drm/i915: add in-kernel blitter client") Signed-off-by: Colin Ian King Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190531103201.10124-1-colin.king@canonical.com drivers/gpu/drm/i915/gem/selftests/i915_gem_object_blt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e3023bf80639afc6603f9633eb301845421b8917 Author: Linus Walleij Date: Thu Dec 13 15:22:47 2018 +0100 gpio: of: Handle the Freescale SPI CS The Freescale SPI chipselects are special: while everyone else is using "cs-gpios" the Freescale platforms just use "gpios". Fix this by responding with "gpios" when asking for "cs-gpios" in a freescale device node, so we hide this pecularity from the SPI core. Signed-off-by: Linus Walleij drivers/gpio/gpiolib-of.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit e046b64b1547e2dc1ac27e0a5ac57e55213e16f1 Author: Takashi Iwai Date: Fri May 31 11:47:24 2019 +0200 ALSA: hda/ca0132: Use struct_size() For code simplification and safety, use struct_size() macro for calculating the dsp_image_seg object size. Signed-off-by: Takashi Iwai sound/pci/hda/patch_ca0132.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1fbf9d81429af2a7333b72877cc01af1a7612d35 Author: Chris Wilson Date: Thu May 30 13:13:11 2019 +0100 drm/i915: Make default value for i915.mmio_debug a compile time option The normal behaviour is to periodically check for a mmio access error, and once detected enable mmio access checking. However this is useless if the error only occurs once during module load, and so we may miss such errors in CI. To allow ourselves to catch them, allow CI to opt into always enabling mmio debugging. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20190530121311.6794-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/Kconfig.debug | 14 ++++++++++++++ drivers/gpu/drm/i915/i915_params.h | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) commit a2d4560f0be9a48cd342992fbec0688ea05d564b Author: Takashi Iwai Date: Fri May 31 11:46:49 2019 +0200 ALSA: hda: Use struct_size() For code simplification and safety, use struct_size() macro for calculating the hda_conn_list object size with the variable array. Signed-off-by: Takashi Iwai sound/pci/hda/hda_codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 65be9580885e4c14af1448b5bac95517c52a7ad3 Author: Takashi Iwai Date: Fri May 31 11:44:44 2019 +0200 ALSA: control: Use struct_size() For code simplification and safety, use struct_size() macro for calculating the snd_kcontrol object size with the variable array. Signed-off-by: Takashi Iwai sound/core/control.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 51a0daf64dee78dacaecc7bec3d36e0b2f49c7a1 Author: Oleksandr Tyshchenko Date: Wed May 29 19:05:00 2019 +0300 ARM: mach-shmobile: Don't init CNTVOFF/counter if PSCI is available If PSCI is available then most likely we are running on PSCI-enabled U-Boot which, we assume, has already taken care of resetting CNTVOFF and updating counter module before switching to non-secure mode and we don't need to. As the psci_smp_available() helper always returns false if CONFIG_SMP is disabled, it can't be used safely as an indicator of PSCI usage. For that reason, we check for the mandatory PSCI operation to be available. Please note, an extra check to prevent secure_cntvoff_init() from being called for secondary CPUs in headsmp-apmu.S is not needed, as SMP code for APMU based system is not executed if PSCI is in use. Signed-off-by: Oleksandr Tyshchenko Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/mach-shmobile/setup-rcar-gen2.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 6d97985072dc270032dc7a08631080bfd6253e82 Author: Arnd Bergmann Date: Sat Apr 20 22:28:45 2019 +0200 isdn: move capi drivers to staging I tried to find any indication of whether the capi drivers are still in use, and have not found anything from a long time ago. With public ISDN networks almost completely shut down over the past 12 months, there is very little you can actually do with this hardware. The main remaining use case would be to connect ISDN voice phones to an in-house installation with Asterisk or LCR, but anyone trying this in turn seems to be using either the mISDN driver stack, or out-of-tree drivers from the hardware vendors. I may of course have missed something, so I would suggest moving these three drivers (avm, hysdn, gigaset) into drivers/staging/ just in case someone still uses them. If nobody complains, we can remove them entirely in six months, or otherwise move the core code and any drivers that are still needed back into drivers/isdn. As Paul Bolle notes, he is still testing the gigaset driver as long as he can, but the Dutch ISDN network will be shut down in September 2019, which puts an end to that. Marcel Holtmann still maintains the Bluetooth CMTP profile and wants to keep that alive, so the actual CAPI subsystem code remains in place for now, after all other drivers are gone, CMTP and CAPI can be merged into a single driver directory. Cc: Marcel Holtmann Cc: Paul Bolle Signed-off-by: Arnd Bergmann MAINTAINERS | 20 +++++++++++------ drivers/isdn/Kconfig | 25 ---------------------- drivers/isdn/Makefile | 2 -- drivers/isdn/capi/Kconfig | 20 +++++++++++++++++ drivers/isdn/capi/Makefile | 2 ++ drivers/isdn/hardware/Kconfig | 8 ------- drivers/isdn/hardware/Makefile | 1 - drivers/staging/Kconfig | 2 ++ drivers/staging/Makefile | 1 + drivers/staging/isdn/Kconfig | 12 +++++++++++ drivers/staging/isdn/Makefile | 8 +++++++ drivers/staging/isdn/TODO | 22 +++++++++++++++++++ .../{isdn/hardware => staging/isdn}/avm/Kconfig | 0 .../{isdn/hardware => staging/isdn}/avm/Makefile | 0 .../{isdn/hardware => staging/isdn}/avm/avm_cs.c | 0 .../{isdn/hardware => staging/isdn}/avm/avmcard.h | 0 drivers/{isdn/hardware => staging/isdn}/avm/b1.c | 0 .../{isdn/hardware => staging/isdn}/avm/b1dma.c | 0 .../{isdn/hardware => staging/isdn}/avm/b1isa.c | 0 .../{isdn/hardware => staging/isdn}/avm/b1pci.c | 0 .../{isdn/hardware => staging/isdn}/avm/b1pcmcia.c | 0 drivers/{isdn/hardware => staging/isdn}/avm/c4.c | 0 .../{isdn/hardware => staging/isdn}/avm/t1isa.c | 0 .../{isdn/hardware => staging/isdn}/avm/t1pci.c | 0 drivers/{ => staging}/isdn/gigaset/Kconfig | 0 drivers/{ => staging}/isdn/gigaset/Makefile | 0 drivers/{ => staging}/isdn/gigaset/asyncdata.c | 0 drivers/{ => staging}/isdn/gigaset/bas-gigaset.c | 0 drivers/{ => staging}/isdn/gigaset/capi.c | 0 drivers/{ => staging}/isdn/gigaset/common.c | 0 drivers/{ => staging}/isdn/gigaset/dummyll.c | 0 drivers/{ => staging}/isdn/gigaset/ev-layer.c | 0 drivers/{ => staging}/isdn/gigaset/gigaset.h | 0 drivers/{ => staging}/isdn/gigaset/interface.c | 0 drivers/{ => staging}/isdn/gigaset/isocdata.c | 0 drivers/{ => staging}/isdn/gigaset/proc.c | 0 drivers/{ => staging}/isdn/gigaset/ser-gigaset.c | 0 drivers/{ => staging}/isdn/gigaset/usb-gigaset.c | 0 drivers/{ => staging}/isdn/hysdn/Kconfig | 0 drivers/{ => staging}/isdn/hysdn/Makefile | 0 drivers/{ => staging}/isdn/hysdn/boardergo.c | 0 drivers/{ => staging}/isdn/hysdn/boardergo.h | 0 drivers/{ => staging}/isdn/hysdn/hycapi.c | 0 drivers/{ => staging}/isdn/hysdn/hysdn_boot.c | 0 drivers/{ => staging}/isdn/hysdn/hysdn_defs.h | 0 drivers/{ => staging}/isdn/hysdn/hysdn_init.c | 0 drivers/{ => staging}/isdn/hysdn/hysdn_net.c | 0 drivers/{ => staging}/isdn/hysdn/hysdn_pof.h | 0 drivers/{ => staging}/isdn/hysdn/hysdn_procconf.c | 0 drivers/{ => staging}/isdn/hysdn/hysdn_proclog.c | 0 drivers/{ => staging}/isdn/hysdn/hysdn_sched.c | 0 drivers/{ => staging}/isdn/hysdn/ince1pc.h | 0 52 files changed, 81 insertions(+), 42 deletions(-) commit 99c2aa151a7182c58f9477a376304c538d9cc5ab Author: Arnd Bergmann Date: Thu Apr 18 22:57:08 2019 +0200 isdn: hdlc: move into mISDN The last remnant of the isdn4linux interface is now the isdnhdlc support, used by the netjet driver. Move it next to that driver. Signed-off-by: Arnd Bergmann drivers/isdn/Makefile | 1 - drivers/isdn/hardware/mISDN/Kconfig | 7 +++++-- drivers/isdn/hardware/mISDN/Makefile | 2 ++ drivers/isdn/{i4l => hardware/mISDN}/isdnhdlc.c | 2 +- .../linux/isdn/hdlc.h => drivers/isdn/hardware/mISDN/isdnhdlc.h | 0 drivers/isdn/hardware/mISDN/netjet.c | 2 +- drivers/isdn/i4l/Makefile | 6 ------ 7 files changed, 9 insertions(+), 11 deletions(-) commit 9c3c0c2048149d946d7f3ebdcbe70e2946750bfb Author: Arnd Bergmann Date: Thu Apr 18 22:43:36 2019 +0200 isdn: remove isdn4linux With all isdn4linux hardware drivers gone, this is only a wrapper around CAPI to support old user space. However, from looking at the mailing list, it seems that the last time anyone asked about it was in 2014, when the upgrade from a linux-2.4 installation failed, and mISDN was suggested as a replacement. The largest public ISDN network (Deutsche Telekom) was supposed to be shut down 2018, which must have drastically reduced the number of legacy installations. When we last discussed removing i4l in 2016, Karsten Keil suggested revisiting this in 2018. I guess this is overdue. Link: http://listserv.isdn4linux.de/pipermail/isdn4linux/2014-October/006165.html Link: https://patchwork.kernel.org/patch/8484861/#17900371 Link: https://listserv.isdn4linux.de/pipermail/isdn4linux/2019-April/thread.html Signed-off-by: Arnd Bergmann Documentation/isdn/INTERFACE | 759 ------- Documentation/isdn/INTERFACE.fax | 163 -- Documentation/isdn/README | 599 ------ Documentation/isdn/README.FAQ | 26 - Documentation/isdn/README.audio | 138 -- Documentation/isdn/README.concap | 259 --- Documentation/isdn/README.diversion | 127 -- Documentation/isdn/README.fax | 45 - Documentation/isdn/README.hfc-pci | 41 - Documentation/isdn/README.syncppp | 58 - Documentation/isdn/README.x25 | 184 -- Documentation/isdn/syncPPP.FAQ | 224 --- Documentation/process/changes.rst | 16 +- MAINTAINERS | 2 - drivers/isdn/Kconfig | 26 - drivers/isdn/Makefile | 2 - drivers/isdn/capi/Kconfig | 9 - drivers/isdn/capi/capidrv.c | 2525 ----------------------- drivers/isdn/capi/capidrv.h | 140 -- drivers/isdn/divert/Makefile | 10 - drivers/isdn/divert/divert_init.c | 82 - drivers/isdn/divert/divert_procfs.c | 336 ---- drivers/isdn/divert/isdn_divert.c | 846 -------- drivers/isdn/divert/isdn_divert.h | 132 -- drivers/isdn/i4l/Kconfig | 127 -- drivers/isdn/i4l/Makefile | 14 - drivers/isdn/i4l/isdn_audio.c | 711 ------- drivers/isdn/i4l/isdn_audio.h | 44 - drivers/isdn/i4l/isdn_bsdcomp.c | 930 --------- drivers/isdn/i4l/isdn_common.c | 2368 ---------------------- drivers/isdn/i4l/isdn_common.h | 47 - drivers/isdn/i4l/isdn_concap.c | 99 - drivers/isdn/i4l/isdn_concap.h | 11 - drivers/isdn/i4l/isdn_net.c | 3198 ----------------------------- drivers/isdn/i4l/isdn_net.h | 151 -- drivers/isdn/i4l/isdn_ppp.c | 3046 ---------------------------- drivers/isdn/i4l/isdn_ppp.h | 41 - drivers/isdn/i4l/isdn_tty.c | 3756 ----------------------------------- drivers/isdn/i4l/isdn_tty.h | 120 -- drivers/isdn/i4l/isdn_ttyfax.c | 1123 ----------- drivers/isdn/i4l/isdn_ttyfax.h | 17 - drivers/isdn/i4l/isdn_v110.c | 625 ------ drivers/isdn/i4l/isdn_v110.h | 29 - drivers/isdn/i4l/isdn_x25iface.c | 332 ---- drivers/isdn/i4l/isdn_x25iface.h | 30 - drivers/isdn/isdnloop/Makefile | 6 - drivers/isdn/isdnloop/isdnloop.c | 1528 -------------- drivers/isdn/isdnloop/isdnloop.h | 112 -- include/linux/concap.h | 112 -- include/linux/isdn.h | 473 ----- include/linux/isdn_divertif.h | 35 - include/linux/isdn_ppp.h | 194 -- include/linux/isdnif.h | 505 ----- include/linux/wanrouter.h | 11 - include/uapi/linux/isdn.h | 144 -- include/uapi/linux/isdn_divertif.h | 31 - include/uapi/linux/isdn_ppp.h | 68 - include/uapi/linux/isdnif.h | 57 - include/uapi/linux/wanrouter.h | 18 - 59 files changed, 2 insertions(+), 26860 deletions(-) commit 85993b8c9786fb24975dbcabebb1c75790d4fb6a Author: Arnd Bergmann Date: Thu Apr 18 22:47:35 2019 +0200 isdn: remove hisax driver With the decline of ISDN, this seems to have become almost completely obsolete, and even in the past years before that, almost all remaining users appear to have used mISDN instead. Birger Harzenetter noted that he is still using i4l/hisax to take advantage of the 'divert' driver for call diversion, but otherwise uses mISDN on the same hardware. This is a rare edge case as far as I can tell, but we are still breaking an actively used work flow (see https://xkcd.com/1172/). We debated moving i4l/hisax to staging as an intermediate step, but as he is not likely to change the setup, and that would just delay breaking this use case. The alternatives here are to stay on stable kernels < 5.2, to create an external driver repository for isdn4linux, or to add divert functionality to mISDN. Cc: Birger Harzenetter Signed-off-by: Arnd Bergmann Documentation/isdn/HiSax.cert | 96 -- Documentation/isdn/README.HiSax | 659 ------- drivers/isdn/Makefile | 1 - drivers/isdn/hisax/Kconfig | 423 ----- drivers/isdn/hisax/Makefile | 60 - drivers/isdn/hisax/amd7930_fn.c | 794 --------- drivers/isdn/hisax/amd7930_fn.h | 37 - drivers/isdn/hisax/arcofi.c | 131 -- drivers/isdn/hisax/arcofi.h | 27 - drivers/isdn/hisax/asuscom.c | 423 ----- drivers/isdn/hisax/avm_a1.c | 307 ---- drivers/isdn/hisax/avm_a1p.c | 267 --- drivers/isdn/hisax/avm_pci.c | 904 ---------- drivers/isdn/hisax/avma1_cs.c | 162 -- drivers/isdn/hisax/bkm_a4t.c | 358 ---- drivers/isdn/hisax/bkm_a8.c | 433 ----- drivers/isdn/hisax/bkm_ax.h | 119 -- drivers/isdn/hisax/callc.c | 1792 ------------------- drivers/isdn/hisax/config.c | 1993 --------------------- drivers/isdn/hisax/diva.c | 1282 -------------- drivers/isdn/hisax/elsa.c | 1245 -------------- drivers/isdn/hisax/elsa_cs.c | 218 --- drivers/isdn/hisax/elsa_ser.c | 659 ------- drivers/isdn/hisax/enternow_pci.c | 420 ----- drivers/isdn/hisax/fsm.c | 161 -- drivers/isdn/hisax/fsm.h | 61 - drivers/isdn/hisax/gazel.c | 691 -------- drivers/isdn/hisax/hfc4s8s_l1.c | 1584 ----------------- drivers/isdn/hisax/hfc4s8s_l1.h | 89 - drivers/isdn/hisax/hfc_2bds0.c | 1078 ------------ drivers/isdn/hisax/hfc_2bds0.h | 128 -- drivers/isdn/hisax/hfc_2bs0.c | 591 ------- drivers/isdn/hisax/hfc_2bs0.h | 60 - drivers/isdn/hisax/hfc_pci.c | 1755 ------------------- drivers/isdn/hisax/hfc_pci.h | 235 --- drivers/isdn/hisax/hfc_sx.c | 1517 ---------------- drivers/isdn/hisax/hfc_sx.h | 196 --- drivers/isdn/hisax/hfc_usb.c | 1608 ----------------- drivers/isdn/hisax/hfc_usb.h | 208 --- drivers/isdn/hisax/hfcscard.c | 261 --- drivers/isdn/hisax/hisax.h | 1352 --------------- drivers/isdn/hisax/hisax_cfg.h | 66 - drivers/isdn/hisax/hisax_debug.h | 80 - drivers/isdn/hisax/hisax_fcpcipnp.c | 1024 ----------- drivers/isdn/hisax/hisax_fcpcipnp.h | 58 - drivers/isdn/hisax/hisax_if.h | 66 - drivers/isdn/hisax/hisax_isac.c | 895 ---------- drivers/isdn/hisax/hisax_isac.h | 46 - drivers/isdn/hisax/hscx.c | 277 --- drivers/isdn/hisax/hscx.h | 41 - drivers/isdn/hisax/hscx_irq.c | 294 ---- drivers/isdn/hisax/icc.c | 680 -------- drivers/isdn/hisax/icc.h | 72 - drivers/isdn/hisax/ipac.h | 29 - drivers/isdn/hisax/ipacx.c | 913 ---------- drivers/isdn/hisax/ipacx.h | 162 -- drivers/isdn/hisax/isac.c | 681 -------- drivers/isdn/hisax/isac.h | 70 - drivers/isdn/hisax/isar.c | 1910 --------------------- drivers/isdn/hisax/isar.h | 222 --- drivers/isdn/hisax/isdnl1.c | 930 ---------- drivers/isdn/hisax/isdnl1.h | 32 - drivers/isdn/hisax/isdnl2.c | 1839 -------------------- drivers/isdn/hisax/isdnl2.h | 25 - drivers/isdn/hisax/isdnl3.c | 594 ------- drivers/isdn/hisax/isdnl3.h | 42 - drivers/isdn/hisax/isurf.c | 305 ---- drivers/isdn/hisax/ix1_micro.c | 316 ---- drivers/isdn/hisax/jade.c | 305 ---- drivers/isdn/hisax/jade.h | 134 -- drivers/isdn/hisax/jade_irq.c | 238 --- drivers/isdn/hisax/l3_1tr6.c | 932 ---------- drivers/isdn/hisax/l3_1tr6.h | 164 -- drivers/isdn/hisax/l3dss1.c | 3227 ----------------------------------- drivers/isdn/hisax/l3dss1.h | 124 -- drivers/isdn/hisax/l3ni1.c | 3182 ---------------------------------- drivers/isdn/hisax/l3ni1.h | 136 -- drivers/isdn/hisax/lmgr.c | 50 - drivers/isdn/hisax/mic.c | 235 --- drivers/isdn/hisax/netjet.c | 985 ----------- drivers/isdn/hisax/netjet.h | 69 - drivers/isdn/hisax/niccy.c | 380 ----- drivers/isdn/hisax/nj_s.c | 294 ---- drivers/isdn/hisax/nj_u.c | 258 --- drivers/isdn/hisax/q931.c | 1513 ---------------- drivers/isdn/hisax/s0box.c | 260 --- drivers/isdn/hisax/saphir.c | 296 ---- drivers/isdn/hisax/sedlbauer.c | 873 ---------- drivers/isdn/hisax/sedlbauer_cs.c | 209 --- drivers/isdn/hisax/sportster.c | 267 --- drivers/isdn/hisax/st5481.h | 529 ------ drivers/isdn/hisax/st5481_b.c | 380 ----- drivers/isdn/hisax/st5481_d.c | 780 --------- drivers/isdn/hisax/st5481_init.c | 221 --- drivers/isdn/hisax/st5481_usb.c | 659 ------- drivers/isdn/hisax/tei.c | 465 ----- drivers/isdn/hisax/teleint.c | 334 ---- drivers/isdn/hisax/teles0.c | 364 ---- drivers/isdn/hisax/teles3.c | 498 ------ drivers/isdn/hisax/teles_cs.c | 201 --- drivers/isdn/hisax/telespci.c | 349 ---- drivers/isdn/hisax/w6692.c | 1085 ------------ drivers/isdn/hisax/w6692.h | 184 -- drivers/isdn/i4l/Kconfig | 2 - 104 files changed, 56236 deletions(-) commit 8e6c8aa3b52e573a6db1f58b2ba9a9106a012963 Author: Arnd Bergmann Date: Thu Apr 18 22:45:09 2019 +0200 isdn: gigaset: remove i4l support isdn4linux is getting removed, and the gigaset driver can still use the CAPI support, so this can all go away. Signed-off-by: Arnd Bergmann Documentation/isdn/README.gigaset | 36 +- drivers/isdn/gigaset/Kconfig | 9 - drivers/isdn/gigaset/Makefile | 10 +- drivers/isdn/gigaset/i4l.c | 695 -------------------------------------- 4 files changed, 15 insertions(+), 735 deletions(-) commit fdad1d54d2c8ca784f8f9d04340ea942b92aaa85 Author: Alice Michael Date: Wed Apr 17 15:17:37 2019 -0700 iavf: update comments and file checks to match iavf Some small things were missed with recent name changes from i40e to iavf. Having a separate patch allows to correct the small misses in one place. Signed-off-by: Alice Michael Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/iavf/iavf_client.c | 4 ++-- drivers/net/ethernet/intel/iavf/iavf_common.c | 2 +- drivers/net/ethernet/intel/iavf/iavf_trace.h | 4 ++-- drivers/net/ethernet/intel/iavf/iavf_virtchnl.c | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) commit 53b79907f5f7c657cc57722fc5d105c0b5e3e431 Author: Alice Michael Date: Wed Apr 17 15:17:36 2019 -0700 iavf: rename i40e_device to iavf_device Renaming remaining defines from i40e to iavf Signed-off-by: Alice Michael Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/iavf/iavf.h | 4 ++-- drivers/net/ethernet/intel/iavf/iavf_client.c | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) commit db950599f0decf88233366fbfc8b70c4682941fd Author: Alice Michael Date: Wed Apr 17 15:17:35 2019 -0700 iavf: change remaining i40e defines to be iavf There were a couple of erroneously missed i40e names to update to iavf left after the larger chunks. Updated them separately so now they should all be aligned as iavf. Signed-off-by: Alice Michael Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/iavf/iavf_adminq.c | 96 +++++++++++++-------------- drivers/net/ethernet/intel/iavf/iavf_adminq.h | 4 +- drivers/net/ethernet/intel/iavf/iavf_type.h | 2 +- 3 files changed, 51 insertions(+), 51 deletions(-) commit cc0ea2db4e39cb6f888617562365eed244681e21 Author: Alice Michael Date: Wed Apr 17 15:17:34 2019 -0700 iavf: rename iavf_client.h defines to match driver name The defines in iavf_client.h were still vastly i40e, and they should be iavf. Signed-off-by: Alice Michael Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/iavf/iavf.h | 2 +- drivers/net/ethernet/intel/iavf/iavf_client.c | 84 ++++++++++----------- drivers/net/ethernet/intel/iavf/iavf_client.h | 104 +++++++++++++------------- 3 files changed, 95 insertions(+), 95 deletions(-) commit 8821b3fa0c1bca1395800d57ad42a867e2a88dff Author: Alice Michael Date: Wed Apr 17 15:17:33 2019 -0700 iavf: rename iavf_status structure flags rename the flags inside of iavf_status from I40E_* to IAVF_* Signed-off-by: Alice Michael Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/iavf/iavf_adminq.c | 42 ++-- drivers/net/ethernet/intel/iavf/iavf_adminq.h | 2 +- drivers/net/ethernet/intel/iavf/iavf_client.c | 6 +- drivers/net/ethernet/intel/iavf/iavf_common.c | 266 ++++++++++++------------ drivers/net/ethernet/intel/iavf/iavf_main.c | 38 ++-- drivers/net/ethernet/intel/iavf/iavf_status.h | 134 ++++++------ drivers/net/ethernet/intel/iavf/iavf_virtchnl.c | 2 +- 7 files changed, 245 insertions(+), 245 deletions(-) commit 7af36e321482552881be405665ac5e965c85e044 Author: Alice Michael Date: Wed Apr 17 15:17:32 2019 -0700 iavf: replace i40e variables with iavf Update the old variables and flags marked as i40e to match the iavf name of the driver. Signed-off-by: Alice Michael Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/iavf/iavf_adminq.c | 80 +-- drivers/net/ethernet/intel/iavf/iavf_adminq.h | 72 +-- drivers/net/ethernet/intel/iavf/iavf_adminq_cmd.h | 656 +++++++++++----------- drivers/net/ethernet/intel/iavf/iavf_common.c | 182 +++--- drivers/net/ethernet/intel/iavf/iavf_ethtool.c | 12 +- drivers/net/ethernet/intel/iavf/iavf_main.c | 18 +- drivers/net/ethernet/intel/iavf/iavf_prototype.h | 14 +- drivers/net/ethernet/intel/iavf/iavf_txrx.c | 12 +- drivers/net/ethernet/intel/iavf/iavf_type.h | 2 +- drivers/net/ethernet/intel/iavf/iavf_virtchnl.c | 16 +- 10 files changed, 531 insertions(+), 533 deletions(-) commit f2d1315895ca5a4747abd3f6ece66fc25613405a Author: Chris Wilson Date: Thu May 30 09:23:58 2019 +0100 drm/i915: Drop check for non-NULL entry in llist_for_each_entry_safe Since the next entry is an offset from a pointer, it can not be NULL. For simplicity, drop the extra conditional before calling cond_resched() Reported-by: Dan Carpenter Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20190530082358.13663-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gem/i915_gem_object.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 47bc28d7ee6d8378ba4451c43885cb3241302243 Author: Janusz Krzysztofik Date: Thu May 30 15:31:05 2019 +0200 drm/i915: Split off pci_driver.remove() tail to drm_driver.release() In order to support driver hot unbind, some cleanup operations, now performed on PCI driver remove, must be called later, after all device file descriptors are closed. Split out those operations from the tail of pci_driver.remove() callback and put them into drm_driver.release() which is called as soon as all references to the driver are put. As a result, those cleanups will be now run on last drm_dev_put(), either still called from pci_driver.remove() if all device file descriptors are already closed, or on last drm_release() file operation. Signed-off-by: Janusz Krzysztofik Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190530133105.30467-1-janusz.krzysztofik@linux.intel.com drivers/gpu/drm/i915/i915_drv.c | 17 +++++++++++++---- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_gem.c | 10 +++++++++- 3 files changed, 23 insertions(+), 5 deletions(-) commit 2674700c4c0ec3bdeb1cd0ff4bf51ede2bc51c16 Author: Bartosz Golaszewski Date: Tue May 21 11:03:06 2019 +0200 gpio: max732x: use devm_gpiochip_add_data() We can simplify the code a bit with a resource managed variant of gpiochip_add_data(). Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-max732x.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 375b94246761816e2637fc8afd454d2b158213f7 Author: Bartosz Golaszewski Date: Tue May 21 11:03:05 2019 +0200 gpio: max732x: use i2c_new_dummy_device() We now have a resource managed version of i2c_new_dummy_device() that also returns an actual error code instead of a NULL-pointer. Use it in the max732x GPIO driver and simplify code in the process. Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-max732x.c | 37 ++++++++++++++----------------------- 1 file changed, 14 insertions(+), 23 deletions(-) commit 8764c4ca5049d3ae7984a528a428a3f6881a2216 Author: Bartosz Golaszewski Date: Tue May 28 17:46:01 2019 +0200 gpio: em: use the managed version of gpiochip_add_data() Use the managed variant of gpiochip_add_data() and remove the call to gpiochip_remove(). Cc: Geert Uytterhoeven Signed-off-by: Bartosz Golaszewski Reviewed-by: Geert Uytterhoeven drivers/gpio/gpio-em.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 4bee435742828041c9ecaf5ce0e4fd86213a6099 Author: Daniel Baluta Date: Wed May 15 14:42:28 2019 +0000 arm64: dts: imx8mm: Add SAI nodes i.MX8MM has 5 SAI instances with the following base addresses according to RM. SAI1 base address: 3001_0000h SAI2 base address: 3002_0000h SAI3 base address: 3003_0000h SAI5 base address: 3005_0000h SAI6 base address: 3006_0000h Signed-off-by: Daniel Baluta Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mm.dtsi | 66 +++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) commit 881b54c7e9d97e36b08fa40d46377b3b983e4095 Author: Anson Huang Date: Fri May 24 13:44:06 2019 +0800 arm64: dts: imx8mq: add clock for SNVS RTC node i.MX8MQ has clock gate for SNVS module, add clock info to SNVS RTC node for clock management. Signed-off-by: Anson Huang Reviewed-by: Leonard Crestez Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mq.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit d650fb40b3e214dede23c834481ff0674abdf676 Author: Alice Michael Date: Wed Apr 17 15:17:31 2019 -0700 iavf: rename i40e functions to be iavf Update the old i40e function names to be iavf Signed-off-by: Alice Michael Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/iavf/iavf_adminq.c | 6 +++--- drivers/net/ethernet/intel/iavf/iavf_prototype.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) commit 80754bbc0711b45b265ce6028faca2af126a567f Author: Sergey Nemov Date: Wed Apr 17 15:17:30 2019 -0700 iavf: change iavf_status_code to iavf_status Instead of typedefing the enum iavf_status_code with iavf_status, just shorten the enum itself and get rid of typedef. Signed-off-by: Sergey Nemov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/iavf/iavf.h | 2 +- drivers/net/ethernet/intel/iavf/iavf_adminq.c | 67 ++++++++++++------------ drivers/net/ethernet/intel/iavf/iavf_alloc.h | 17 +++--- drivers/net/ethernet/intel/iavf/iavf_client.c | 6 +-- drivers/net/ethernet/intel/iavf/iavf_common.c | 53 ++++++++++--------- drivers/net/ethernet/intel/iavf/iavf_main.c | 20 +++---- drivers/net/ethernet/intel/iavf/iavf_osdep.h | 1 - drivers/net/ethernet/intel/iavf/iavf_prototype.h | 52 +++++++++--------- drivers/net/ethernet/intel/iavf/iavf_status.h | 2 +- drivers/net/ethernet/intel/iavf/iavf_virtchnl.c | 14 ++--- 10 files changed, 121 insertions(+), 113 deletions(-) commit 8be454c91ec04c844859457d7190d997ab7a3597 Author: Alice Michael Date: Wed Apr 17 15:17:29 2019 -0700 iavf: Rename i40e_adminq* files to iavf_adminq* With the rename of the iavf driver, there were some files that were missed in renaming. Update these to be iavf as well. Signed-off-by: Alice Michael Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/iavf/Makefile | 2 +- drivers/net/ethernet/intel/iavf/{i40e_adminq.c => iavf_adminq.c} | 2 +- drivers/net/ethernet/intel/iavf/{i40e_adminq.h => iavf_adminq.h} | 2 +- .../net/ethernet/intel/iavf/{i40e_adminq_cmd.h => iavf_adminq_cmd.h} | 0 drivers/net/ethernet/intel/iavf/iavf_common.c | 2 +- drivers/net/ethernet/intel/iavf/iavf_type.h | 2 +- 6 files changed, 5 insertions(+), 5 deletions(-) commit 53462f0f4772c1e81786df1261e2009b44fed9f2 Author: Gustavo A. R. Silva Date: Fri Mar 29 16:38:50 2019 -0700 iavf: iavf_client: use struct_size() helper One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct foo { int stuff; struct boo entry[]; }; size = sizeof(struct foo) + count * sizeof(struct boo); Instead of leaving these open-coded and prone to type mistakes, we can now use the new struct_size() helper: size = struct_size(instance, entry, count); This code was detected with the help of Coccinelle. Signed-off-by: "Gustavo A. R. Silva" Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/iavf/iavf_client.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 06665619cc8897d55eab5679b0927069dc345c19 Author: Gustavo A. R. Silva Date: Fri Mar 29 16:38:48 2019 -0700 iavf: use struct_size() in kzalloc() One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct foo { int stuff; struct boo entry[]; }; size = sizeof(struct foo) + count * sizeof(struct boo); instance = kzalloc(size, GFP_KERNEL) Instead of leaving these open-coded and prone to type mistakes, we can now use the new struct_size() helper: instance = kzalloc(struct_size(instance, entry, count), GFP_KERNEL) Notice that, in this case, variable bufsz is not necessary, hence it is removed. This code was detected with the help of Coccinelle. Signed-off-by: "Gustavo A. R. Silva" Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/iavf/iavf_main.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 6b6b49b56a6c4333509f15d8861ee6b2c6878bd2 Author: Aleksandr Loktionov Date: Fri Mar 29 12:48:50 2019 -0700 iavf: Limiting RSS queues to CPUs Limiting RSS queues number to online CPUs number in order to avoid issues with creating misconfigured RSS queues. Signed-off-by: Aleksandr Loktionov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/iavf/iavf_virtchnl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9ae9d9bfb72ce43ab5851da55dd17c5f64e87151 Author: Gustavo A. R. Silva Date: Wed May 29 11:30:52 2019 -0500 eeprom: at24: use struct_size() in devm_kzalloc() One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct foo { int stuff; struct boo entry[]; }; size = sizeof(struct foo) + count * sizeof(struct boo); instance = devm_kzalloc(dev, size, GFP_KERNEL); Instead of leaving these open-coded and prone to type mistakes, we can now use the new struct_size() helper: instance = devm_kzalloc(dev, struct_size(instance, entry, count), GFP_KERNEL); Notice that, in this case, variable at24_size is not necessary, hence it is removed. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Bartosz Golaszewski drivers/misc/eeprom/at24.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit a8806581241b69b3ae3199f47412c04de854c53a Author: YueHaibing Date: Wed May 29 22:59:54 2019 +0800 eeprom: at24: Remove set but not used variable 'addr' Fixes gcc '-Wunused-but-set-variable' warning: drivers/misc/eeprom/at24.c: In function at24_make_dummy_client: drivers/misc/eeprom/at24.c:514:21: warning: variable addr set but not used [-Wunused-but-set-variable] It's not used since commit e7308628d0ae ("eeprom: at24: use devm_i2c_new_dummy_device()") Signed-off-by: YueHaibing Signed-off-by: Bartosz Golaszewski drivers/misc/eeprom/at24.c | 2 -- 1 file changed, 2 deletions(-) commit 3dc215416673f9ba8f136aafbb0069ed9ebff376 Author: Nathan Chancellor Date: Wed Jan 9 21:21:57 2019 -0700 iavf: Use printf instead of gnu_printf for iavf_debug_d Clang warns: In file included from drivers/net/ethernet/intel/iavf/iavf_main.c:4: In file included from drivers/net/ethernet/intel/iavf/iavf.h:37: In file included from drivers/net/ethernet/intel/iavf/iavf_type.h:8: drivers/net/ethernet/intel/iavf/iavf_osdep.h:49:18: warning: 'format' attribute argument not supported: gnu_printf [-Wignored-attributes] __attribute__ ((format(gnu_printf, 3, 4))); ^ 1 warning generated. We can convert from gnu_printf to printf without any side effects for two reasons: 1. All iavf_debug instances use standard printf formats, as pointed out by Miguel Ojeda at the below link, meaning gnu_printf is not strictly required. 2. However, GCC has aliased printf to gnu_printf on Linux since at least 2010 based on git history. From gcc/c-family/c-format.c: /* Attributes such as "printf" are equivalent to those such as "gnu_printf" unless this is overridden by a target. */ static const target_ovr_attr gnu_target_overrides_format_attributes[] = { { "gnu_printf", "printf" }, { "gnu_scanf", "scanf" }, { "gnu_strftime", "strftime" }, { "gnu_strfmon", "strfmon" }, { NULL, NULL } }; The mentioned override only happens on Windows (mingw32). Changing from gnu_printf to printf is a no-op for GCC and stops Clang from warning. Link: https://github.com/ClangBuiltLinux/linux/issues/111 Suggested-by: Miguel Ojeda Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/iavf/iavf_osdep.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4c1d2fc7d56cf87a0d399be69e08d5aef73802eb Author: Benjamin Sherman Date: Thu May 30 23:53:48 2019 +0000 staging: mt7621-dma: sizeof via pointer dereference Pass the size of a struct into kzalloc by pointer dereference. This complies with the Linux kernel coding style and removes the possibility for a bug if the pointer's type is changed. Signed-off-by: Benjamin Sherman Signed-off-by: Greg Kroah-Hartman drivers/staging/mt7621-dma/mtk-hsdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 91c1ead6aee22d4595f50ba66070b94a4a8f84a9 Merge: 14ee642c2ab0 cf401e2856b2 Author: Dave Airlie Date: Fri May 31 09:33:29 2019 +1000 Merge branch 'drm-next-5.3' of git://people.freedesktop.org/~agd5f/linux into drm-next New stuff for 5.3: - Add new thermal sensors for vega asics - Various RAS fixes - Add sysfs interface for memory interface utilization - Use HMM rather than mmu notifier for user pages - Expose xgmi topology via kfd - SR-IOV fixes - Fixes for manual driver reload - Add unique identifier for vega asics - Clean up user fence handling with UVD/VCE/VCN blocks - Convert DC to use core bpc attribute rather than a custom one - Add GWS support for KFD - Vega powerplay improvements - Add CRC support for DCE 12 - SR-IOV support for new security policy - Various cleanups From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20190529220944.14464-1-alexander.deucher@amd.com commit bf0349df0004c98a241192a209066423693d2fa5 Author: Florian Fainelli Date: Thu May 30 15:55:46 2019 -0700 arm64: Enable BCM7038_L1_IRQ for ARCH_BRCMSTB ARCH_BRCMSTB makes use of the irq-bcm7038-l1.c irqchip driver, enable it. Signed-off-by: Florian Fainelli arch/arm64/Kconfig.platforms | 1 + 1 file changed, 1 insertion(+) commit 9595aee2a389be5dfa9a0121a14e8fba70f17278 Author: Changbin Du Date: Tue May 14 22:47:34 2019 +0800 Documentation: PCI: convert endpoint/pci-test-howto.txt to reST Convert plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Signed-off-by: Changbin Du Signed-off-by: Bjorn Helgaas Reviewed-by: Mauro Carvalho Chehab Documentation/PCI/endpoint/index.rst | 1 + .../{pci-test-howto.txt => pci-test-howto.rst} | 81 +++++++++++++++------- 2 files changed, 56 insertions(+), 26 deletions(-) commit bf2c2658d4b6baed13c274da7091428772b5cb03 Author: Changbin Du Date: Tue May 14 22:47:33 2019 +0800 Documentation: PCI: convert endpoint/pci-test-function.txt to reST Convert plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Signed-off-by: Changbin Du Signed-off-by: Bjorn Helgaas Reviewed-by: Mauro Carvalho Chehab Documentation/PCI/endpoint/index.rst | 1 + ...pci-test-function.txt => pci-test-function.rst} | 84 +++++++++++++--------- 2 files changed, 51 insertions(+), 34 deletions(-) commit d4518e4ac64cae18f953f8a433359ea1face4b52 Author: Changbin Du Date: Tue May 14 22:47:32 2019 +0800 Documentation: PCI: convert endpoint/pci-endpoint-cfs.txt to reST Convert plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Signed-off-by: Changbin Du Signed-off-by: Bjorn Helgaas Reviewed-by: Mauro Carvalho Chehab Documentation/PCI/endpoint/index.rst | 1 + .../{pci-endpoint-cfs.txt => pci-endpoint-cfs.rst} | 99 ++++++++++++---------- 2 files changed, 57 insertions(+), 43 deletions(-) commit d8946fc38517755a2d9535a04c3f6a8d3a331eee Author: Changbin Du Date: Tue May 14 22:47:31 2019 +0800 Documentation: PCI: convert endpoint/pci-endpoint.txt to reST Convert plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Signed-off-by: Changbin Du Signed-off-by: Bjorn Helgaas Reviewed-by: Mauro Carvalho Chehab Documentation/PCI/endpoint/index.rst | 10 +++ .../{pci-endpoint.txt => pci-endpoint.rst} | 92 +++++++++++++--------- Documentation/PCI/index.rst | 1 + 3 files changed, 65 insertions(+), 38 deletions(-) commit 4e37f055a92e4a813b29fb196a05a6a826abb790 Author: Changbin Du Date: Tue May 14 22:47:30 2019 +0800 Documentation: PCI: convert pcieaer-howto.txt to reST Convert plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Signed-off-by: Changbin Du Signed-off-by: Bjorn Helgaas Reviewed-by: Mauro Carvalho Chehab Documentation/PCI/index.rst | 1 + .../PCI/{pcieaer-howto.txt => pcieaer-howto.rst} | 156 +++++++++++++-------- 2 files changed, 101 insertions(+), 56 deletions(-) commit 8a01fa64348aaaf54b3eef9728bfe2654e7bdd88 Author: Changbin Du Date: Tue May 14 22:47:29 2019 +0800 Documentation: PCI: convert pci-error-recovery.txt to reST Convert plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Signed-off-by: Changbin Du Signed-off-by: Bjorn Helgaas Reviewed-by: Mauro Carvalho Chehab Documentation/PCI/index.rst | 1 + ...i-error-recovery.txt => pci-error-recovery.rst} | 287 +++++++++++---------- MAINTAINERS | 4 +- 3 files changed, 152 insertions(+), 140 deletions(-) commit b66357f32fb9a68bb9f2126a894d3b9bbc4e821c Author: Changbin Du Date: Tue May 14 22:47:28 2019 +0800 Documentation: PCI: convert acpi-info.txt to reST Convert plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Signed-off-by: Changbin Du Signed-off-by: Bjorn Helgaas Cc: Mauro Carvalho Chehab Documentation/PCI/{acpi-info.txt => acpi-info.rst} | 15 ++++++++++----- Documentation/PCI/index.rst | 1 + 2 files changed, 11 insertions(+), 5 deletions(-) commit 3b9bae029b60ee0fa6d6205e0debfad4482434a7 Author: Changbin Du Date: Tue May 14 22:47:27 2019 +0800 Documentation: PCI: convert MSI-HOWTO.txt to reST Convert plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Signed-off-by: Changbin Du Signed-off-by: Bjorn Helgaas Reviewed-by: Mauro Carvalho Chehab Documentation/PCI/index.rst | 1 + Documentation/PCI/{MSI-HOWTO.txt => msi-howto.rst} | 85 +++++++++++++--------- 2 files changed, 52 insertions(+), 34 deletions(-) commit 4d2c729c62328d6841111d98396374476367ae83 Author: Changbin Du Date: Tue May 14 22:47:26 2019 +0800 Documentation: PCI: convert pci-iov-howto.txt to reST Convert plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Signed-off-by: Changbin Du Signed-off-by: Bjorn Helgaas Reviewed-by: Mauro Carvalho Chehab Documentation/PCI/index.rst | 1 + .../PCI/{pci-iov-howto.txt => pci-iov-howto.rst} | 161 ++++++++++++--------- 2 files changed, 94 insertions(+), 68 deletions(-) commit 2e6422444894685a8a3135f7b982aa026dc0f74c Author: Changbin Du Date: Tue May 14 22:47:25 2019 +0800 Documentation: PCI: convert PCIEBUS-HOWTO.txt to reST Convert plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Signed-off-by: Changbin Du Signed-off-by: Bjorn Helgaas Reviewed-by: Mauro Carvalho Chehab Documentation/PCI/index.rst | 1 + .../PCI/{PCIEBUS-HOWTO.txt => picebus-howto.rst} | 140 ++++++++++++--------- 2 files changed, 82 insertions(+), 59 deletions(-) commit 229b4e0728e0a6ddca2645e73696d5b104fbbbfb Author: Changbin Du Date: Tue May 14 22:47:24 2019 +0800 Documentation: PCI: convert pci.txt to reST Convert plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Move the description of struct pci_driver and struct pci_device_id into in-source comments. Signed-off-by: Changbin Du [bhelgaas: fix kernel-doc warnings related to moving descriptions to linux/pci.h, fix "space tab" whitespace errors in mod_devicetable.h] Signed-off-by: Bjorn Helgaas Reviewed-by: Mauro Carvalho Chehab Documentation/PCI/index.rst | 2 + Documentation/PCI/{pci.txt => pci.rst} | 356 ++++++++++++++------------------- include/linux/mod_devicetable.h | 29 ++- include/linux/pci.h | 48 ++++- 4 files changed, 222 insertions(+), 213 deletions(-) commit 7b3ed2a137b077bc0967352088b0adb6049eed20 Merge: 84a32edec480 2f2da36ebf42 Author: David S. Miller Date: Thu May 30 15:17:05 2019 -0700 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 100GbE Intel Wired LAN Driver Updates 2019-05-30 This series contains updates to ice driver only. Brett continues his work with interrupt handling by fixing an issue where were writing to the incorrect register to disable all VF interrupts. Tony consolidates the unicast and multicast MAC filters into a single new function. Anirudh adds support for virtual channel vector mapping to receive and transmit queues. This uses a bitmap to associate indicated queues with the specified vector. Makes several cosmetic code cleanups, as well as update the driver to align with the current specification for managing MAC operation codes (opcodes). Paul adds support for Forward Error Correction (FEC) and also adds the ethtool get and set handlers to modify FEC parameters. Bruce cleans up the driver code to fix a number of issues, such as, reducing the scope of some local variables, reduce the number of de-references by changing a local variable and reorder the code to remove unnecessary "goto's". Dave adds switch rules to be able to handle LLDP packets and in the process, fix a couple of issues found, like stop treating DCBx state of "not started" as an error and stop hard coding the filter information flag to transmit. Jacob updates the driver to allow for more granular debugging by developers by using a distinct separate bit for dumping firmware logs. ==================== Signed-off-by: David S. Miller commit 84a32edec48056131c91bebb706c2a0a5976a1a1 Author: Kevin 'ldir' Darbyshire-Bryant Date: Thu May 30 17:10:43 2019 +0000 net: sched: act_ctinfo: minor size optimisation Since the new parameter block is initialised to 0 by kzmalloc we don't need to mask & clear unused operational mode bits, they are already unset. Drop the pointless code. Signed-off-by: Kevin Darbyshire-Bryant Signed-off-by: David S. Miller net/sched/act_ctinfo.c | 4 ---- 1 file changed, 4 deletions(-) commit 655887fe39273cb3c86d25b245bce25a85935f82 Merge: 8e2ea3ea9625 97b33bdf9bdd Author: David S. Miller Date: Thu May 30 15:02:33 2019 -0700 Merge branch 'complex-c45-phys' Heiner Kallweit says: ==================== net: phy: improve handling of more complex C45 PHY's This series tries to address few problematic aspects raised by Russell. Concrete example is the Marvell 88x3310, the changes should be helpful for other complex C45 PHY's too. v2: - added patch enabling interrupts also if phylib state machine isn't started - removed patch dealing with the double link status read This one needs little bit more thinking and will go separately. ==================== Signed-off-by: David S. Miller commit 97b33bdf9bddb6bebc2e87148df3e30aa7a13b2d Author: Heiner Kallweit Date: Thu May 30 15:11:06 2019 +0200 net: phy: export phy_queue_state_machine We face the issue that link change interrupt and link status may be reported by different PHY layers. As a result the link change interrupt may occur before the link status changes. Export phy_queue_state_machine to allow PHY drivers to specify a delay between link status change interrupt and link status check. v2: - change jiffies parameter type to unsigned long Signed-off-by: Heiner Kallweit Suggested-by: Russell King Acked-by: Russell King Signed-off-by: David S. Miller drivers/net/phy/phy.c | 8 +++++--- include/linux/phy.h | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) commit 49644e68f472c6480e015253fa4d7448c6cfa2aa Author: Heiner Kallweit Date: Thu May 30 15:10:06 2019 +0200 net: phy: add callback for custom interrupt handler to struct phy_driver The phylib interrupt handler handles link change events only currently. However PHY drivers may want to use other interrupt sources too, e.g. to report temperature monitoring events. Therefore add a callback to struct phy_driver allowing PHY drivers to implement a custom interrupt handler. Signed-off-by: Heiner Kallweit Suggested-by: Russell King - ARM Linux admin Acked-by: Russell King Signed-off-by: David S. Miller drivers/net/phy/phy.c | 9 +++++++-- include/linux/phy.h | 3 +++ 2 files changed, 10 insertions(+), 2 deletions(-) commit 07b0928918c694c845a387cc16256a8b63ced4fc Author: Heiner Kallweit Date: Thu May 30 15:09:15 2019 +0200 net: phy: enable interrupts when PHY is attached already This patch is a step towards allowing PHY drivers to handle more interrupt sources than just link change. E.g. several PHY's have built-in temperature monitoring and can raise an interrupt if a temperature threshold is exceeded. We may be interested in such interrupts also if the phylib state machine isn't started. Therefore move enabling interrupts to phy_request_interrupt(). v2: - patch added to series Signed-off-by: Heiner Kallweit Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/phy.c | 36 ++++++++++++++++++++++-------------- drivers/net/phy/phy_device.c | 2 +- include/linux/phy.h | 1 + 3 files changed, 24 insertions(+), 15 deletions(-) commit 8e2ea3ea962535c64800e82e03e3e1b6cfd9c64f Author: Michal Kalderon Date: Thu May 30 15:20:40 2019 +0300 qed: Fix static checker warning In some cases abs_ppfid could be printed without being initialized. Fixes: 79284adeb99e ("qed: Add llh ppfid interface and 100g support for offload protocols") Reported-by: Dan Carpenter Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dev.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit e70c7aad7a95f4f9fd3f00caef1a1ceb57a4b5a4 Author: Ioana Ciornei Date: Thu May 30 09:09:07 2019 +0300 net: dsa: Add error path handling in dsa_tree_setup() In case a call to dsa_tree_setup() fails, an attempt to cleanup is made by calling dsa_tree_remove_switch(), which should take care of removing/unregistering any resources previously allocated. This does not happen because it is conditioned by dst->setup being true, which is set only after _all_ setup steps were performed successfully. This is especially interesting when the internal MDIO bus is registered but afterwards, a port setup fails and the mdiobus_unregister() is never called. This leads to a BUG_ON() complaining about the fact that it's trying to free an MDIO bus that's still registered. Add proper error handling in all functions branching from dsa_tree_setup(). Signed-off-by: Ioana Ciornei Reported-by: kernel test robot Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller net/dsa/dsa2.c | 89 +++++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 66 insertions(+), 23 deletions(-) commit 47546208657f28007f41574c2d27a3fe760f987d Author: Eric Biggers Date: Wed May 29 14:01:52 2019 -0700 keys: Reuse keyring_index_key::desc_len in lookup_user_key() When lookup_user_key() checks whether the key is possessed, it should use the key's existing index_key including the 'desc_len' field, rather than recomputing the 'desc_len'. This doesn't change the behavior; this way is just simpler and faster. Signed-off-by: Eric Biggers Signed-off-by: David Howells Reviewed-by: James Morris security/keys/process_keys.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit f7f1394576563b7096fe858fb178bcaedfa0b245 Author: David Howells Date: Mon May 20 21:51:43 2019 +0100 keys: Grant Link permission to possessers of request_key auth keys Grant Link permission to the possessers of request_key authentication keys, thereby allowing a daemon that is servicing upcalls to arrange things such that only the necessary auth key is passed to the actual service program and not all the daemon's pending auth keys. Signed-off-by: David Howells Reviewed-by: James Morris security/keys/request_key_auth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ed0ac5c7ec3763e3261c48e3c5d4b7528b60fd85 Author: David Howells Date: Mon May 20 21:51:50 2019 +0100 keys: Add a keyctl to move a key between keyrings Add a keyctl to atomically move a link to a key from one keyring to another. The key must exist in "from" keyring and a flag can be given to cause the operation to fail if there's a matching key already in the "to" keyring. This can be done with: keyctl(KEYCTL_MOVE, key_serial_t key, key_serial_t from_keyring, key_serial_t to_keyring, unsigned int flags); The key being moved must grant Link permission and both keyrings must grant Write permission. flags should be 0 or KEYCTL_MOVE_EXCL, with the latter preventing displacement of a matching key from the "to" keyring. Signed-off-by: David Howells Documentation/security/keys/core.rst | 21 +++++++ include/linux/key.h | 5 ++ include/uapi/linux/keyctl.h | 3 + security/keys/compat.c | 3 + security/keys/internal.h | 3 + security/keys/keyctl.c | 52 +++++++++++++++++ security/keys/keyring.c | 108 +++++++++++++++++++++++++++++++++++ 7 files changed, 195 insertions(+) commit 1b0b807dd7469e36b761f5bb4ee40b61331aeee8 Merge: 25e94115aee6 ce8843abfa67 Author: David S. Miller Date: Thu May 30 14:39:25 2019 -0700 Merge branch 'r8169-fw' Heiner Kallweit says: ==================== r8169: decouple firmware handling code from actual driver code These two patches are a step towards eventually factoring out firmware handling code to a separate source file. ==================== Signed-off-by: David S. Miller commit ce8843abfa674350bf0f4f1b88d8e50a59401a46 Author: Heiner Kallweit Date: Wed May 29 21:15:06 2019 +0200 r8169: decouple rtl_phy_write_fw from actual driver code This patch is a further step towards decoupling firmware handling from the actual driver code. Firmware can be for PHY and/or MAC, and two pairs of read/write functions are needed for handling PHY firmware and MAC firmware respectively. Pass these functions via struct rtl_fw and avoid the ugly switching of mdio_ops behind the back of rtl_writephy(). Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169.c | 48 +++++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 20 deletions(-) commit e95a7f30e1261f03487b15a8bd55bb812ceaa18b Author: Heiner Kallweit Date: Wed May 29 21:13:58 2019 +0200 r8169: improve rtl_fw_format_ok Simplify the function a little bit and use strscpy() where appropriate. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) commit 25e94115aee6dc8fb088a57945974d334eb72575 Author: Heiner Kallweit Date: Wed May 29 20:52:03 2019 +0200 r8169: enable WoL speed down on more chip versions Call the pll power down function also for chip versions 02..06 and 13..15. The MAC can't be powered down on these chip versions, but at least they benefit from the speed-down power-saving if WoL is enabled. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169.c | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) commit c3e933a5b8c19145d14e207e0ecf220f1d6cfda1 Author: Matteo Croce Date: Wed May 29 17:39:41 2019 +0200 sctp: deduplicate identical skb_checksum_ops The same skb_checksum_ops struct is defined twice in two different places, leading to code duplication. Declare it as a global variable into a common header instead of allocating it on the stack on each function call. bloat-o-meter reports a slight code shrink. add/remove: 1/1 grow/shrink: 0/10 up/down: 128/-1282 (-1154) Function old new delta sctp_csum_ops - 128 +128 crc32c_csum_ops 16 - -16 sctp_rcv 6616 6583 -33 sctp_packet_pack 4542 4504 -38 nf_conntrack_sctp_packet 4980 4926 -54 execute_masked_set_action 6453 6389 -64 tcf_csum_sctp 575 428 -147 sctp_gso_segment 1292 1126 -166 sctp_csum_check 579 412 -167 sctp_snat_handler 957 772 -185 sctp_dnat_handler 1321 1132 -189 l4proto_manip_pkt 2536 2313 -223 Total: Before=359297613, After=359296459, chg -0.00% Reviewed-by: Xin Long Signed-off-by: Matteo Croce Acked-by: Neil Horman Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller include/net/sctp/checksum.h | 12 +++++++----- net/sctp/offload.c | 7 +------ 2 files changed, 8 insertions(+), 11 deletions(-) commit 2544af0344bae65c51e350663ce95110445d7ec8 Author: Matteo Croce Date: Wed May 29 17:13:48 2019 +0200 net: avoid indirect calls in L4 checksum calculation Commit 283c16a2dfd3 ("indirect call wrappers: helpers to speed-up indirect calls of builtin") introduces some macros to avoid doing indirect calls. Use these helpers to remove two indirect calls in the L4 checksum calculation for devices which don't have hardware support for it. As a test I generate packets with pktgen out to a dummy interface with HW checksumming disabled, to have the checksum calculated in every sent packet. The packet rate measured with an i7-6700K CPU and a single pktgen thread raised from 6143 to 6608 Kpps, an increase by 7.5% Suggested-by: Davide Caratti Signed-off-by: Matteo Croce Signed-off-by: David S. Miller net/core/skbuff.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 5ee907f70e8eaf03cef1876a43d5a2bf6405a9f2 Author: YueHaibing Date: Wed May 29 22:34:32 2019 +0800 net: dsa: sja1105: Make static_config_check_memory_size static Fix sparse warning: drivers/net/dsa/sja1105/sja1105_static_config.c:446:1: warning: symbol 'static_config_check_memory_size' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: YueHaibing Acked-by: Vladimir Oltean Signed-off-by: David S. Miller drivers/net/dsa/sja1105/sja1105_static_config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit df593ee23e05cdda16c8c995e5818779431bb29f Author: David Howells Date: Thu May 30 11:37:39 2019 +0100 keys: Hoist locking out of __key_link_begin() Hoist the locking of out of __key_link_begin() and into its callers. This is necessary to allow the upcoming key_move() operation to correctly order taking of the source keyring semaphore, the destination keyring semaphore and the keyring serialisation lock. Signed-off-by: David Howells security/keys/internal.h | 2 ++ security/keys/key.c | 27 ++++++++++++---- security/keys/keyring.c | 78 +++++++++++++++++++++++++++------------------ security/keys/request_key.c | 7 +++- 4 files changed, 76 insertions(+), 38 deletions(-) commit 41384136608c1cd6ef0ccb7d58d78775b2ddb035 Merge: d48ecb40b5b5 af9573be674e Author: David S. Miller Date: Thu May 30 14:18:18 2019 -0700 Merge branch 'connection-tracking-support-for-bridge' Pablo Neira Ayuso says: ==================== connection tracking support for bridge This patchset adds native connection tracking support for the bridge. Patch #1 and #2 extract code from IPv4/IPv6 fragmentation core and introduce the fraglist splitter. That splits a skbuff fraglist into independent fragments. Patch #3 and #4 also extract code from IPv4/IPv6 fragmentation core and introduce the skbuff into fragments transformer. This can be used by linearized skbuffs (eg. coming from nfqueue and ct helpers) as well as cloned skbuffs (that are either seen either with taps or with bridge port flooding). Patch #5 moves the specific IPCB() code from these new fragment splitter/transformer APIs into the IPv4 stack. The bridge has a different control buffer layout and it starts using this new APIs in this patchset. Patch #6 adds basic infrastructure that allows to register bridge conntrack support. Patch #7 adds bridge conntrack support (only for IPv4 in this patch). Patch #8 adds IPv6 support for the bridge conntrack support. Patch #9 registers the IPv4/IPv6 conntrack hooks in case the bridge conntrack is used to deal with local traffic, ie. prerouting -> input bridge hook path. This cover the bridge interface has a IP address scenario. Before this patchset, only chance for people to do stateful filtering is to use the `br_netfilter` emulation layer, that turns bridge frame into IPv4/IPv6 packets and inject them into the IPv4/IPv6 hooks. Apparently, this module allows users to use iptables and all of its feature-set from the bridge, including stateful filtering. However, this approach is flawed in many aspects that have been discussed many times. This is a step forward to deprecate `br_netfilter'. v2: Fix English typo in commit message. v3: Fix another English typo in commit message. ==================== Signed-off-by: David S. Miller commit af9573be674e6aed893ad649c76d55c39a2f6420 Author: Pablo Neira Ayuso Date: Wed May 29 13:25:39 2019 +0200 netfilter: nf_conntrack_bridge: register inet conntrack for bridge This patch enables IPv4 and IPv6 conntrack from the bridge to deal with local traffic. Hence, packets that are passed up to the local input path are confirmed later on from the {ipv4,ipv6}_confirm() hooks. For packets leaving the IP stack (ie. output path), fragmentation occurs after the inet postrouting hook. Therefore, the bridge local out and postrouting bridge hooks see fragments with conntrack objects, which is inconsistent. In this case, we could defragment again from the bridge output hook, but this is expensive. The recommended filtering spot for outgoing locally generated traffic leaving through the bridge interface is to use the classic IPv4/IPv6 output hook, which comes earlier. Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller net/netfilter/nf_conntrack_proto.c | 58 +++++++++++++++++++++++++++----------- 1 file changed, 42 insertions(+), 16 deletions(-) commit 764dd163ac922f8683b5bcd3007251ce7b26cd33 Author: Pablo Neira Ayuso Date: Wed May 29 13:25:38 2019 +0200 netfilter: nf_conntrack_bridge: add support for IPv6 br_defrag() and br_fragment() indirections are added in case that IPv6 support comes as a module, to avoid pulling innecessary dependencies in. The new fraglist iterator and fragment transformer APIs are used to implement the refragmentation code. Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller include/linux/netfilter_ipv6.h | 50 ++++++++++++ net/bridge/netfilter/nf_conntrack_bridge.c | 59 +++++++++++++- net/ipv6/netfilter.c | 123 +++++++++++++++++++++++++++++ 3 files changed, 230 insertions(+), 2 deletions(-) commit 3c171f496ef57774f8e5d509923372549734877f Author: Pablo Neira Ayuso Date: Wed May 29 13:25:37 2019 +0200 netfilter: bridge: add connection tracking system This patch adds basic connection tracking support for the bridge, including initial IPv4 support. This patch register two hooks to deal with the bridge forwarding path, one from the bridge prerouting hook to call nf_conntrack_in(); and another from the bridge postrouting hook to confirm the entry. The conntrack bridge prerouting hook defragments packets before passing them to nf_conntrack_in() to look up for an existing entry, otherwise a new entry is allocated and it is attached to the skbuff. The conntrack bridge postrouting hook confirms new conntrack entries, ie. if this is the first packet seen, then it adds the entry to the hashtable and (if needed) it refragments the skbuff into the original fragments, leaving the geometry as is if possible. Exceptions are linearized skbuffs, eg. skbuffs that are passed up to nfqueue and conntrack helpers, as well as cloned skbuff for the local delivery (eg. tcpdump), also in case of bridge port flooding (cloned skbuff too). The packet defragmentation is done through the ip_defrag() call. This forces us to save the bridge control buffer, reset the IP control buffer area and then restore it after call. This function also bumps the IP fragmentation statistics, it would be probably desiderable to have independent statistics for the bridge defragmentation/refragmentation. The maximum fragment length is stored in the control buffer and it is used to refragment the skbuff from the postrouting path. The new fraglist splitter and fragment transformer APIs are used to implement the bridge refragmentation code. The br_ip_fragment() function drops the packet in case the maximum fragment size seen is larger than the output port MTU. This patchset follows the principle that conntrack should not drop packets, so users can do it through policy via invalid state matching. Like br_netfilter, there is no refragmentation for packets that are passed up for local delivery, ie. prerouting -> input path. There are calls to nf_reset() already in several spots in the stack since time ago already, eg. af_packet, that show that skbuff fraglist handling from the netif_rx path is supported already. The helpers are called from the postrouting hook, before confirmation, from there we may see packet floods to bridge ports. Then, although unlikely, this may result in exercising the helpers many times for each clone. It would be good to explore how to pass all the packets in a list to the conntrack hook to do this handle only once for this case. Thanks to Florian Westphal for handing me over an initial patchset version to add support for conntrack bridge. Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller include/net/netfilter/nf_conntrack_bridge.h | 7 + include/net/netfilter/nf_conntrack_core.h | 3 + net/bridge/br_device.c | 1 + net/bridge/br_private.h | 1 + net/bridge/netfilter/Kconfig | 14 ++ net/bridge/netfilter/Makefile | 3 + net/bridge/netfilter/nf_conntrack_bridge.c | 378 ++++++++++++++++++++++++++++ net/netfilter/nf_conntrack_proto.c | 7 +- 8 files changed, 410 insertions(+), 4 deletions(-) commit d035f19f59c5bca2fda2faa43b5e9fe09dfb7884 Author: Pablo Neira Ayuso Date: Wed May 29 13:25:36 2019 +0200 netfilter: nf_conntrack: allow to register bridge support This patch adds infrastructure to register and to unregister bridge support for the conntrack module via nf_ct_bridge_register() and nf_ct_bridge_unregister(). Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller include/net/netfilter/nf_conntrack.h | 1 + include/net/netfilter/nf_conntrack_bridge.h | 13 ++++++ net/netfilter/nf_conntrack_proto.c | 61 +++++++++++++++++++++++++++-- 3 files changed, 72 insertions(+), 3 deletions(-) commit 19c3401a917b98dac47bca5d657cab01674b2fe4 Author: Pablo Neira Ayuso Date: Wed May 29 13:25:35 2019 +0200 net: ipv4: place control buffer handling away from fragmentation iterators Deal with the IPCB() area away from the iterators. The bridge codebase has its own control buffer layout, move specific IP control buffer handling into the IPv4 codepath. Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller net/ipv4/ip_output.c | 55 +++++++++++++++++++++++++++++++++++----------------- 1 file changed, 37 insertions(+), 18 deletions(-) commit 8a6a1f17640198f7daa5cfcce9a74e3674ce3b00 Author: Pablo Neira Ayuso Date: Wed May 29 13:25:34 2019 +0200 net: ipv6: split skbuff into fragments transformer This patch exposes a new API to refragment a skbuff. This allows you to split either a linear skbuff or to force the refragmentation of an existing fraglist using a different mtu. The API consists of: * ip6_frag_init(), that initializes the internal state of the transformer. * ip6_frag_next(), that allows you to fetch the next fragment. This function internally allocates the skbuff that represents the fragment, it pushes the IPv6 header, and it also copies the payload for each fragment. The ip6_frag_state object stores the internal state of the splitter. This code has been extracted from ip6_fragment(). Symbols are also exported to allow to reuse this iterator from the bridge codepath to build its own refragmentation routine by reusing the existing codebase. Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller include/net/ipv6.h | 19 ++++++ net/ipv6/ip6_output.c | 183 +++++++++++++++++++++++++++++--------------------- 2 files changed, 126 insertions(+), 76 deletions(-) commit 065ff79f8881e6267f4c29abb476d697eb87bfba Author: Pablo Neira Ayuso Date: Wed May 29 13:25:33 2019 +0200 net: ipv4: split skbuff into fragments transformer This patch exposes a new API to refragment a skbuff. This allows you to split either a linear skbuff or to force the refragmentation of an existing fraglist using a different mtu. The API consists of: * ip_frag_init(), that initializes the internal state of the transformer. * ip_frag_next(), that allows you to fetch the next fragment. This function internally allocates the skbuff that represents the fragment, it pushes the IPv4 header, and it also copies the payload for each fragment. The ip_frag_state object stores the internal state of the splitter. This code has been extracted from ip_do_fragment(). Symbols are also exported to allow to reuse this iterator from the bridge codepath to build its own refragmentation routine by reusing the existing codebase. Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller include/net/ip.h | 16 +++++ net/ipv4/ip_output.c | 200 ++++++++++++++++++++++++++++----------------------- 2 files changed, 128 insertions(+), 88 deletions(-) commit 0feca6190f88a1b7c9a9b9cdf41824e3ea4ba02c Author: Pablo Neira Ayuso Date: Wed May 29 13:25:32 2019 +0200 net: ipv6: add skbuff fraglist splitter This patch adds the skbuff fraglist split iterator. This API provides an iterator to transform the fraglist into single skbuff objects, it consists of: * ip6_fraglist_init(), that initializes the internal state of the fraglist iterator. * ip6_fraglist_prepare(), that restores the IPv6 header on the fragment. * ip6_fraglist_next(), that retrieves the fragment from the fraglist and updates the internal state of the iterator to point to the next fragment in the fraglist. The ip6_fraglist_iter object stores the internal state of the iterator. This code has been extracted from ip6_fragment(). Symbols are also exported to allow to reuse this iterator from the bridge codepath to build its own refragmentation routine by reusing the existing codebase. Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller include/net/ipv6.h | 25 ++++++++++ net/ipv6/ip6_output.c | 132 +++++++++++++++++++++++++++++--------------------- 2 files changed, 102 insertions(+), 55 deletions(-) commit c8b17be0b7a45d707fc202c11d257c25bc3952b8 Author: Pablo Neira Ayuso Date: Wed May 29 13:25:31 2019 +0200 net: ipv4: add skbuff fraglist splitter This patch adds the skbuff fraglist splitter. This API provides an iterator to transform the fraglist into single skbuff objects, it consists of: * ip_fraglist_init(), that initializes the internal state of the fraglist splitter. * ip_fraglist_prepare(), that restores the IPv4 header on the fragments. * ip_fraglist_next(), that retrieves the fragment from the fraglist and it updates the internal state of the splitter to point to the next fragment skbuff in the fraglist. The ip_fraglist_iter object stores the internal state of the iterator. This code has been extracted from ip_do_fragment(). Symbols are also exported to allow to reuse this iterator from the bridge codepath to build its own refragmentation routine by reusing the existing codebase. Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller include/net/ip.h | 23 ++++++++++++++ net/ipv4/ip_output.c | 88 ++++++++++++++++++++++++++++++++-------------------- 2 files changed, 78 insertions(+), 33 deletions(-) commit d8210b1132db57100ddf5e47b5ce89d7d1b7f55d Author: Hariprasad Kelam Date: Thu May 30 23:28:00 2019 +0530 staging: rtl8723bs: core: fix warning Comparison to NULL this patch fixes "Comparison to NULL" warnings reported by checkpatch Signed-off-by: Hariprasad Kelam Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_xmit.c | 54 +++++++++++++++---------------- 1 file changed, 27 insertions(+), 27 deletions(-) commit 543c4f49ba05d9350b055efe6d1e611d0002a2cd Author: Nishka Dasgupta Date: Wed May 29 19:01:54 2019 +0530 staging: rtl8712: Remove initialisations Remove initialisations of multiple variables as these initial values are never used. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_mp.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit db622e05cdbe11ff908268c8eb4bffb972daedb7 Author: Nishka Dasgupta Date: Wed May 29 18:54:57 2019 +0530 staging: rtl8712: Remove return variable of different type The local return variable ret may be replaced directly by its value, especially since its type (uint) is not the same as the function's return type (int). Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit eb2b3edfd427d11e9553aaf772b40fb18e42fbba Author: Nishka Dasgupta Date: Wed May 29 18:45:31 2019 +0530 staging: rts5208: Remove negations Previously return variable fake_para was being negated before return. For simplification, fake_para can be changed to valid_para, which is returned without negation (corresponding values swapped accordingly). Further, the function names check_sd_current_prior and check_sd_speed_prior can be changed to valid_sd_current_prior and valid_sd_speed_prior respectively for greater clarity on the purpose of the functions. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/rtsx_chip.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 8fe0260030b8e6c944fceb452a6a36fc1c7daf87 Author: Nishka Dasgupta Date: Wed May 29 18:38:35 2019 +0530 staging: octeon-usb: Remove return variable Remove return variable result and return the value directly. Issue found using Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/octeon-usb/octeon-hcd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 1f816787b6606e42929a22ca2976f9804aaa1dd0 Author: Hariprasad Kelam Date: Sat May 25 22:50:00 2019 +0530 Staging: rtl8723bs: hal: fix warning possible condition with no effect (if == else) this patch fixes below coccicheck warning ./drivers/staging/rtl8723bs/hal/odm_DIG.c:499:1-3: WARNING: possible condition with no effect (if == else) Signed-off-by: Hariprasad Kelam Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/odm_DIG.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit ca6ea423d2bbdd1d42fe71cbefb4c9635caecd12 Author: YueHaibing Date: Sat May 25 22:36:40 2019 +0800 staging: rtl8723bs: hal: Remove set but not used variable 'no_res' and 'phal' Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c: In function xmit_xmitframes: drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c:205:5: warning: variable no_res set but not used [-Wunused-but-set-variable] drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c: In function rtl8723bs_free_xmit_priv: drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c:640:23: warning: variable phal set but not used [-Wunused-but-set-variable] They are never used and can be removed. Signed-off-by: YueHaibing Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 371ec021a4921f79c7b232626682b0dc16aaf808 Author: Hariprasad Kelam Date: Sat May 25 00:11:05 2019 +0530 staging: rtl8723bs: core: rtw_ap: fix Unneeded variable: "ret". Return "0" Function "rtw_sta_flush" always returns 0 value. So change return type of rtw_sta_flush from int to void. Same thing applies for rtw_hostapd_sta_flush Signed-off-by: Hariprasad Kelam ----- Changes v2 - change return type of rtw_sta_flush Changes v3 - fix indentaion issue Changes v4 - prepare patch on linux-next Changes v5 - cleanup subject and commit message Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_ap.c | 7 ++----- drivers/staging/rtl8723bs/include/rtw_ap.h | 2 +- drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 4 ++-- drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 7 +++---- 4 files changed, 8 insertions(+), 12 deletions(-) commit 1b96f846db31e18e062ae4eb9e22ae58d6588c2f Author: Tianzheng Li Date: Fri May 24 13:31:05 2019 +0200 staging/gasket: Fix string split This patch removes unnecessary quoted string splits. Co-developed-by: Jie Zhang Signed-off-by: Jie Zhang Signed-off-by: Tianzheng Li Signed-off-by: Greg Kroah-Hartman drivers/staging/gasket/gasket_core.c | 6 ++---- drivers/staging/gasket/gasket_ioctl.c | 3 +-- drivers/staging/gasket/gasket_page_table.c | 14 ++++++-------- 3 files changed, 9 insertions(+), 14 deletions(-) commit 0fce66606ef91ff23b69217dfa0f10e2704e1224 Author: Nishka Dasgupta Date: Fri May 24 14:28:42 2019 +0530 staging: ks7010: Remove initialisation in ks7010_sdio.c As the initial value of the return variable result is never used, it can be removed. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks7010_sdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ef7eef9291c5882dfbec34cc33257db4333912e Author: Nishka Dasgupta Date: Fri May 24 13:48:21 2019 +0530 staging: ks7010: Merge multiple return variables in ks_hostif.c The function hostif_data_request had two return variables, ret and result. When ret is assigned a value, in all cases (except one) this assignment is followed immediately by a goto to the end of the function. In the last case, the goto takes effect only if ret < 0; however, if ret >= 0 then this value of ret is not needed in the remainder of that branch. On the other hand result is used (assigned a value and returned) only in those branches where ret >= 0 or ret has not been used at all. As the values of ret and result are not both required at the same point in any branch, result can be removed and its occurrences replaced with ret. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit a7048b38ae443abe06141b75f842b73371c2a0fe Author: Nishka Dasgupta Date: Fri May 24 13:33:30 2019 +0530 staging: ks7010: Remove initialisation in ks_hostif.c The initial value of return variable result is never used, so it can be removed. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_hostif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f5a4c0188cbbb4219acb7bf14d7c81a4fb0656d4 Author: Simon Sandström Date: Wed May 29 21:42:22 2019 +0200 staging: kpc2000: replace bogus variable name in core.c "struct kp2000_regs temp" has nothing to do with temperatures, so replace it with the more proper name "regs". Signed-off-by: Simon Sandström Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/core.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 8dd3355a229e2a14d7daa4e282b87000a0997d39 Author: Simon Sandström Date: Fri May 24 13:08:02 2019 +0200 staging: kpc2000: remove extra spaces in core.c Fixes checkpatch.pl error "foo __init bar" should be "foo __init bar" and "foo __exit bar" should be "foo __exit bar". Signed-off-by: Simon Sandström Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 26c12642338b1d2cecae85e51439139ce7ff04aa Author: Simon Sandström Date: Fri May 24 13:08:00 2019 +0200 staging: kpc2000: remove extra blank line in core.c Fixes checkpatch.pl check "Please don't use multiple blank lines". Signed-off-by: Simon Sandström Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/core.c | 1 - 1 file changed, 1 deletion(-) commit 299672a74856fd840a3b3f207064480d5e4dc91d Author: Geordan Neukum Date: Sun May 26 01:18:34 2019 +0000 staging: kpc2000: kpc_i2c: Use devm_* API to manage mapped I/O space The kpc_i2c driver does not unmap its I/O space upon error cases in the probe() function or upon remove(). Make the driver clean up after itself more maintainably by using the managed resource API. Signed-off-by: Geordan Neukum Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000_i2c.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e621c8a108ede08e6ff66524b4a4f756f66e5eeb Author: Geordan Neukum Date: Sun May 26 01:18:33 2019 +0000 staging: kpc2000: kpc_i2c: fail probe if unable to map I/O space The kpc2000 driver does not verify whether or not mapping the I/O space succeeded during probe time. Make the driver verify that the mapping operation was successful before potentially using that area in the future. Signed-off-by: Geordan Neukum Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000_i2c.c | 2 ++ 1 file changed, 2 insertions(+) commit 4ff740315aee92ec19add0193cef976e532e34dc Author: Geordan Neukum Date: Sun May 26 01:18:32 2019 +0000 staging: kpc2000: kpc_i2c: fail probe if unable to get I/O resource The kpc_i2c driver attempts to map its I/O space without verifying whether or not the result of platform_get_resource() is NULL. Make the driver check that platform_get_resource did not return NULL before attempting to use the value returned to map an I/O space. Signed-off-by: Geordan Neukum Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000_i2c.c | 3 +++ 1 file changed, 3 insertions(+) commit 091971897e84b518cc8902af1c70632930b1d2da Author: Geordan Neukum Date: Sun May 26 01:18:31 2019 +0000 staging: kpc2000: kpc_i2c: Use drvdata instead of platform_data The kpc_i2c driver stashes private state data in the platform_data member of its device structure. In general, the platform_data structure is used for passing data to the driver during probe() rather than as a storage area for runtime state data. Instead, use the drvdata member for all state info meant to be accessible in driver callbacks. Signed-off-by: Geordan Neukum Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000_i2c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 73d56b83910ac7c7afcaa7d7cb3c92c9b53fee1c Author: Geordan Neukum Date: Sun May 26 01:18:30 2019 +0000 staging: kpc2000: kpc_i2c: Remove unnecessary consecutive newlines The kpc2000_i2c.c file contains instances of unnecessary consecutive newlines which impact the readability of the file. Remove these unnecessary newlines. Signed-off-by: Geordan Neukum Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000_i2c.c | 5 ----- 1 file changed, 5 deletions(-) commit c5164e568cd75b70382103b108b5bc0d74e0617c Author: Geordan Neukum Date: Sun May 26 01:18:29 2019 +0000 staging: kpc2000: kpc_i2c: Use BIT macro rather than manual bit shifting The FEATURES_* symbols use bit shifting of the style (1 << k) in order to assign a certain meaning to the value of inividual bits being set in the value of a given variable. Instead, use the BIT() macro in order to improve readability and maintain consistency with the rest of the kernel. Signed-off-by: Geordan Neukum Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000_i2c.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 935d47e209cc5e7e93bcf789a22ddbe6fc67864d Author: Geordan Neukum Date: Sun May 26 01:18:28 2019 +0000 staging: kpc2000: kpc_i2c: Remove pldev from i2c_device structure The i2c_device structure contains a member used to stash a pointer to a platform_device. The driver contains no cases of this member being used after initialization. Remove the unnecessary struct member and the initialization of this member in the sole instance where the driver creates a variable of type: struct i2c_device. Signed-off-by: Geordan Neukum Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000_i2c.c | 2 -- 1 file changed, 2 deletions(-) commit f82ce45273d4d8173243f08b943c9c371385c105 Author: Geordan Neukum Date: Sun May 26 01:18:27 2019 +0000 staging: kpc2000: kpc_i2c: Remove unused rw_sem In pi2c_probe, a rw_sem is initialized and stashed off in the i2c_device private runtime state struct. This rw_sem is never used after initialization. Remove the rw_sem and cleanup unneeded header inclusion. Signed-off-by: Geordan Neukum Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000_i2c.c | 3 --- 1 file changed, 3 deletions(-) commit 46144c1391574f0164def0ca3aa20a6361e4effb Author: Mao Wenan Date: Tue May 28 16:02:14 2019 +0800 staging: kpc2000: replace white spaces with tabs for kpc2000_spi.c There are multiple wrong formats in kpc2000_spi.c, is time to do clean work for it. Signed-off-by: Mao Wenan Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000_spi.c | 722 +++++++++++++++++----------------- 1 file changed, 361 insertions(+), 361 deletions(-) commit 9164f336311863d3e9f80840f4a1cce2aee293bd Author: Mao Wenan Date: Tue May 28 16:02:13 2019 +0800 staging: kpc2000: report error status to spi core There is an error condition that's not reported to the spi core in kp_spi_transfer_one_message(). It should restore status value to m->status, and return it in error path. Signed-off-by: Mao Wenan Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000_spi.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 4a932d90b1541a0862be61371658b8f28b3b792e Author: Nishka Dasgupta Date: Wed May 29 18:41:53 2019 +0530 staging: kpc2000: Change to use DIV_ROUND_UP Use macro DIV_ROUND_UP instead of an equivalent sequence of operations. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc_dma/fileops.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 1d14a95b5839cfd3b50687b6c309d8c1986bf643 Author: Simon Sandström Date: Fri May 24 22:30:57 2019 +0200 staging: kpc2000: fix typo in Kconfig Fixes two minor typos in kpc2000's Kconfig: s/Kaktronics/Daktronics Signed-off-by: Simon Sandström Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dafb1c3a08653235ad63e396c9fa004178389453 Author: Hariprasad Kelam Date: Sun May 26 12:43:22 2019 +0530 staging: speakup: serialio: fix warning linux/serial.h is included more than once fix below warning reported by includecheck ./drivers/staging/speakup/serialio.h: linux/serial.h is included more than once. Signed-off-by: Hariprasad Kelam Reviewed-by: Samuel Thibault Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/serialio.h | 3 --- 1 file changed, 3 deletions(-) commit fe6d98750cf04597af36cbd775eede4afe0d3730 Author: Gao Xiang Date: Tue May 28 11:19:43 2019 +0800 staging: erofs: fix i_blocks calculation For compressed files, i_blocks should not be calculated by using i_size. use i_u.compressed_blocks instead. In addition, i_blocks was miscalculated for non-compressed files previously, fix it as well. Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Greg Kroah-Hartman drivers/staging/erofs/inode.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 89f27eded5b63c697287050d9ef5c713cde0af98 Author: Gao Xiang Date: Tue May 28 11:19:42 2019 +0800 staging: erofs: support statx statx() has already been supported in commit a528d35e8bfc ("statx: Add a system call to make enhanced file info available"), user programs can get more useful attributes. Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Greg Kroah-Hartman drivers/staging/erofs/inode.c | 20 ++++++++++++++++++++ drivers/staging/erofs/internal.h | 2 ++ drivers/staging/erofs/namei.c | 1 + 3 files changed, 23 insertions(+) commit d48ecb40b5b5a156ae3658dc336bfc29ea502eb6 Merge: 5b5d331a2c93 10fbcdd12aa2 Author: David S. Miller Date: Thu May 30 13:41:26 2019 -0700 Merge branch 'add-TFO-backup-key' Jason Baron says: ==================== add TFO backup key Christoph, Igor, and I have worked on an API that facilitates TFO key rotation. This is a follow up to the series that Christoph previously posted, with an API that meets both of our use-cases. Here's a link to the previous work: https://patchwork.ozlabs.org/cover/1013753/ Changes in v2: -spelling fixes in ip-sysctl.txt (Jeremy Sowden) -re-base to latest net-next ==================== Signed-off-by: David S. Miller commit 10fbcdd12aa24fdb4b357a39abc03686d15f04fd Author: Jason Baron Date: Wed May 29 12:34:01 2019 -0400 selftests/net: add TFO key rotation selftest Demonstrate how the primary and backup TFO keys can be rotated while minimizing the number of client cookies that are rejected. Signed-off-by: Jason Baron Signed-off-by: Christoph Paasch Acked-by: Yuchung Cheng Signed-off-by: David S. Miller tools/testing/selftests/net/.gitignore | 1 + tools/testing/selftests/net/Makefile | 2 + .../selftests/net/tcp_fastopen_backup_key.c | 336 +++++++++++++++++++++ .../selftests/net/tcp_fastopen_backup_key.sh | 55 ++++ 4 files changed, 394 insertions(+) commit 2dc7e48dee68219dd8921824473306036ea45152 Author: Jason Baron Date: Wed May 29 12:34:00 2019 -0400 Documentation: ip-sysctl.txt: Document tcp_fastopen_key Add docs for /proc/sys/net/ipv4/tcp_fastopen_key Signed-off-by: Jason Baron Signed-off-by: Christoph Paasch Cc: Jeremy Sowden Acked-by: Yuchung Cheng Signed-off-by: David S. Miller Documentation/networking/ip-sysctl.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit aa1236cdfa898dc4d41cdae8e69d401a2cc7f7f5 Author: Jason Baron Date: Wed May 29 12:33:59 2019 -0400 tcp: add support for optional TFO backup key to net.ipv4.tcp_fastopen_key Add the ability to add a backup TFO key as: # echo "x-x-x-x,x-x-x-x" > /proc/sys/net/ipv4/tcp_fastopen_key The key before the comma acks as the primary TFO key and the key after the comma is the backup TFO key. This change is intended to be backwards compatible since if only one key is set, userspace will simply read back that single key as follows: # echo "x-x-x-x" > /proc/sys/net/ipv4/tcp_fastopen_key # cat /proc/sys/net/ipv4/tcp_fastopen_key x-x-x-x Signed-off-by: Jason Baron Signed-off-by: Christoph Paasch Acked-by: Yuchung Cheng Signed-off-by: David S. Miller net/ipv4/sysctl_net_ipv4.c | 95 ++++++++++++++++++++++++++++++++++------------ 1 file changed, 71 insertions(+), 24 deletions(-) commit 0f1ce0236865e89798c6b610ff2142982f216417 Author: Jason Baron Date: Wed May 29 12:33:58 2019 -0400 tcp: add support to TCP_FASTOPEN_KEY for optional backup key Add support for get/set of an optional backup key via TCP_FASTOPEN_KEY, in addition to the current 'primary' key. The primary key is used to encrypt and decrypt TFO cookies, while the backup is only used to decrypt TFO cookies. The backup key is used to maximize successful TFO connections when TFO keys are rotated. Currently, TCP_FASTOPEN_KEY allows a single 16-byte primary key to be set. This patch now allows a 32-byte value to be set, where the first 16 bytes are used as the primary key and the second 16 bytes are used for the backup key. Similarly, for getsockopt(), we can receive a 32-byte value as output if requested. If a 16-byte value is used to set the primary key via TCP_FASTOPEN_KEY, then any previously set backup key will be removed. Signed-off-by: Jason Baron Signed-off-by: Christoph Paasch Acked-by: Yuchung Cheng Signed-off-by: David S. Miller net/ipv4/tcp.c | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) commit 9092a76d3cf8638467b09bbb4f409094349b2b53 Author: Jason Baron Date: Wed May 29 12:33:57 2019 -0400 tcp: add backup TFO key infrastructure We would like to be able to rotate TFO keys while minimizing the number of client cookies that are rejected. Currently, we have only one key which can be used to generate and validate cookies, thus if we simply replace this key clients can easily have cookies rejected upon rotation. We propose having the ability to have both a primary key and a backup key. The primary key is used to generate as well as to validate cookies. The backup is only used to validate cookies. Thus, keys can be rotated as: 1) generate new key 2) add new key as the backup key 3) swap the primary and backup key, thus setting the new key as the primary We don't simply set the new key as the primary key and move the old key to the backup slot because the ip may be behind a load balancer and we further allow for the fact that all machines behind the load balancer will not be updated simultaneously. We make use of this infrastructure in subsequent patches. Suggested-by: Igor Lubashev Signed-off-by: Jason Baron Signed-off-by: Christoph Paasch Acked-by: Yuchung Cheng Signed-off-by: David S. Miller include/net/tcp.h | 41 ++++++++++- include/uapi/linux/snmp.h | 1 + net/ipv4/proc.c | 1 + net/ipv4/sysctl_net_ipv4.c | 2 +- net/ipv4/tcp.c | 3 +- net/ipv4/tcp_fastopen.c | 172 +++++++++++++++++++++++++++++++-------------- 6 files changed, 162 insertions(+), 58 deletions(-) commit 483642e5ea1dfa517cb7dba606d8b66ef2dd7791 Author: Christoph Paasch Date: Wed May 29 12:33:56 2019 -0400 tcp: introduce __tcp_fastopen_cookie_gen_cipher() Restructure __tcp_fastopen_cookie_gen() to take a 'struct crypto_cipher' argument and rename it as __tcp_fastopen_cookie_gen_cipher(). Subsequent patches will provide different ciphers based on which key is being used for the cookie generation. Signed-off-by: Christoph Paasch Signed-off-by: Jason Baron Acked-by: Yuchung Cheng Signed-off-by: David S. Miller net/ipv4/tcp_fastopen.c | 73 +++++++++++++++++++++++++------------------------ 1 file changed, 37 insertions(+), 36 deletions(-) commit 5b5d331a2c933268eae8da85df43279878392772 Merge: 18a49727083a e4e93d6d8651 Author: David S. Miller Date: Thu May 30 12:59:53 2019 -0700 Merge branch 'mlxsw-Hardware-monitoring-enhancements' Ido Schimmel says: ==================== mlxsw: Hardware monitoring enhancements This patchset from Vadim provides various hardware monitoring related improvements for mlxsw. Patch #1 allows querying firmware version from the switch driver when the underlying bus is I2C. This is useful for baseboard management controller (BMC) systems that communicate with the ASIC over I2C. Patch #2 improves driver's performance over I2C by utilizing larger transactions sizes, if possible. Patch #3 re-orders driver's initialization sequence to enforce a specific firmware version before new firmware features are utilized. This is a prerequisite for patches #4-#6. Patches #4-#6 expose the temperature of inter-connect devices (gearboxes) that are present in Mellanox SN3800 systems and split 2x50Gb/s lanes to 4x25Gb/s lanes. Patches #7-#8 reduce the transaction size when reading SFP modules temperatures, which is crucial when working over I2C. ==================== Signed-off-by: David S. Miller commit e4e93d6d8651139d47dc947f75e55797d5ce186b Author: Vadim Pasternak Date: Wed May 29 11:47:22 2019 +0300 mlxsw: core: Reduce buffer size in transactions for SFP modules temperature readout Obtain SFP modules temperatures through MTMP register instead of MTBR register, because the first one utilizes shorter transaction buffer size for request. It improves performance in case low frequency interface (I2C) is used for communication with a chip. Signed-off-by: Vadim Pasternak Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/core_env.c | 27 ++++--------- drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c | 34 ++++------------ drivers/net/ethernet/mellanox/mlxsw/core_thermal.c | 46 +++++++++------------- 3 files changed, 33 insertions(+), 74 deletions(-) commit 984aec75212899e9b18010088428554c2d9bc4d8 Author: Vadim Pasternak Date: Wed May 29 11:47:21 2019 +0300 mlxsw: core: Extend the index size for temperature sensors readout Extend sensor index size for Management Temperature Bulk Register (MTBR) and Management Temperature Register (MTMP) upto 12 bits in order to align registers description with new version of PRM document. Add define for base sensor index for SFP modules temperature reading for MTMP register. Signed-off-by: Vadim Pasternak Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 2e265a8b6c09407ac719cff5ad13a94bcd1ed911 Author: Vadim Pasternak Date: Wed May 29 11:47:20 2019 +0300 mlxsw: core: Extend hwmon interface with inter-connect temperature attributes Add new attributes to hwmon object for exposing inter-connects temperature input, highest, reset_history temperatures and label. Temperatures are read from Management Temperature Register. The number of inter-connect devices is read from Management General Peripheral Information Register. Signed-off-by: Vadim Pasternak Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c | 101 +++++++++++++++++++++-- 1 file changed, 96 insertions(+), 5 deletions(-) commit 7e9561ed0bff5a8a38101bd929b72915b4620345 Author: Vadim Pasternak Date: Wed May 29 11:47:19 2019 +0300 mlxsw: reg: Add Management General Peripheral Information Register Add MGPIR - Management General Peripheral Information Register, which allows software to query the hardware and firmware general information of peripheral entities as Gearboxes etc. Signed-off-by: Vadim Pasternak Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 52 +++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) commit ae5746783681fa7416b1e17547bb37637f190b34 Author: Vadim Pasternak Date: Wed May 29 11:47:18 2019 +0300 mlxsw: reg: Extend sensor index field size of Management Temperature Register Extend the size of sensor_index field of MTMP (Management Temperature Register), from 8 to 12 bits due to hardware change. Add define for sensor index for Gear Box (inter-connects) temperature reading. Signed-off-by: Vadim Pasternak Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 961cf99a074f55e1d6deded7590226f6cfca9fb6 Author: Ido Schimmel Date: Wed May 29 11:47:17 2019 +0300 mlxsw: core: Re-order initialization sequence The driver core first registers with the hwmon and thermal subsystems and only then proceeds to initialize the switch driver (e.g., mlxsw_spectrum). It is only during the last stage that the current firmware version is validated and a newer one flashed, if necessary. The above means that if a new firmware feature is utilized by the hwmon/thermal code, the driver will not be able to load. Solve this by re-ordering initializing the switch driver before registering with the hwmon and thermal subsystems. Signed-off-by: Ido Schimmel Reported-by: Shalom Toledo Acked-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/core.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 3029a693beda5bff599feccc3beb9df1e141c786 Author: Vadim Pasternak Date: Wed May 29 11:47:16 2019 +0300 mlxsw: i2c: Allow flexible setting of I2C transactions size Current implementation uses fixed size of I2C data transaction buffer. Allow to set size of I2C transactions according to I2C physical adapter capability. For that purpose adapter read and write size is obtained from the I2C physical adapter and buffer size is set according to the minimum of these two values. If adapter does not provide such info, default buffer size is to be used. It allows to improve performance of I2C access to silicon when long size transactions are used. Signed-off-by: Vadim Pasternak Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/i2c.c | 64 ++++++++++++++++++++++--------- 1 file changed, 46 insertions(+), 18 deletions(-) commit 9bbd7efbc055b31b0e836936da94791c8890af4b Author: Vadim Pasternak Date: Wed May 29 11:47:15 2019 +0300 mlxsw: i2c: Extend initialization with querying firmware info Extend initialization flow with query request for firmware info in order to obtain firmware version info. This info is to be provided to minimal driver to support ethtool get_drvinfo() interface. Signed-off-by: Vadim Pasternak Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/i2c.c | 12 ++++++++++++ drivers/net/ethernet/mellanox/mlxsw/minimal.c | 18 ++++++++++++++++++ 2 files changed, 30 insertions(+) commit 18a49727083a5a4e949f122aa392fefc8791df77 Merge: 32707c4dfa20 aeb4a5e8b350 Author: David S. Miller Date: Thu May 30 12:59:07 2019 -0700 Merge branch 'net-stmmac-selftests-Two-fixes' Jose Abreu says: ==================== net: stmmac: selftests: Two fixes Two fixes reported by kbuild. ==================== Signed-off-by: David S. Miller commit aeb4a5e8b350d481dcb082ac9a102e0fea3f4065 Author: Jose Abreu Date: Wed May 29 10:30:26 2019 +0200 net: stmmac: selftests: Use kfree_skb() instead of kfree() kfree_skb() shall be used instead of kfree(). Fix it. Fixes: 091810dbded9 ("net: stmmac: Introduce selftests support") Reported-by: kbuild test robot Reported-by: Dan Carpenter Signed-off-by: Jose Abreu Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2d135dea53fa7e8c9a20ccbac9857e3b9a926f9f Author: Jose Abreu Date: Wed May 29 10:30:25 2019 +0200 net: stmmac: selftests: Fix sparse warning Variable shall be __be16. Fix it. Fixes: 091810dbded9 ("net: stmmac: Introduce selftests support") Reported-by: kbuild test robot Signed-off-by: Jose Abreu Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a49773064bc2284bf7fe57c3492897135f65a37c Author: Liu Song Date: Thu May 30 15:15:57 2019 -0400 jbd2: fix typo in comment of journal_submit_inode_data_buffers delayed/dealyed Signed-off-by: Liu Song Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara fs/jbd2/commit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 893bffa99441326ad8044578cb7faa61a24934a8 Author: Krzysztof Kozlowski Date: Mon Feb 18 18:32:58 2019 +0100 ARM: dts: exynos: Raise maximum buck regulator voltages on Arndale Octa Raise the buck 1-7 regulators voltages to allow cpufreq choosing them and to fix warnings during boot: core: _opp_supported_by_regulators: OPP minuV: 1250000 maxuV: 1250000, not supported by regulator cpu cpu0: _opp_add: OPP not supported by regulators (1800000000) The maximum value is now in sync with other Exynos5420 boards with S2MPS11 PMIC (SMDK5420, Odroid XU3 family). This also matches the values used in old patches done by Linaro Samsung team. Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos5420-arndale-octa.dts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit a41041ff31f2ff4353ca807db6feecbebacf43bb Author: Krzysztof Kozlowski Date: Mon Apr 29 19:35:24 2019 +0200 ARM: dts: exynos: Move CPU OPP tables out of SoC node on Exynos5420 The cpus node is a top-level node, not inside the soc. Therefore its OPP tables should be there as well. This also fixes the DTC warnings like: arch/arm/boot/dts/exynos5420.dtsi:46.37-109.5: Warning simple_bus_reg): /soc/opp_table0: missing or empty reg/ranges property Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos5420.dtsi | 216 +++++++++++++++++++------------------- 1 file changed, 109 insertions(+), 107 deletions(-) commit 7821ce417ec730a80d46ad0a513a84692433a5e8 Author: Gaowei Pu Date: Thu May 30 15:08:34 2019 -0400 jbd2: fix some print format mistakes There are some print format mistakes in debug messages. Fix them. Signed-off-by: Gaowei Pu Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara fs/jbd2/journal.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 0cca82ec3455783d1f2decee2b09c4c7fd07dfa3 Author: Krzysztof Kozlowski Date: Mon Apr 29 19:36:19 2019 +0200 ARM: exynos: Make ARCH_EXYNOS3 a default option By default for ARMv7 Exynos platform we select all flavors. One kernel image simplifies testing and maintenance. However Exynos3 was not selected by default so far (thus it was not present in multi_v7 kernel). Signed-off-by: Krzysztof Kozlowski arch/arm/mach-exynos/Kconfig | 1 + 1 file changed, 1 insertion(+) commit c25b84c008264e5ec7fae113a3729442eee31fea Author: Maxime Ripard Date: Mon May 27 14:09:10 2019 +0200 dt-bindings: display: Convert Allwinner DSI to a schema The Allwinner SoCs have a MIPI-DSI and MIPI-D-PHY controllers supported in Linux, with a matching Device Tree binding. Now that we have the DT validation in place, let's convert the device tree bindings for that controller over to a YAML schemas. Signed-off-by: Maxime Ripard Reviewed-by: Chen-Yu Tsai Link: https://patchwork.freedesktop.org/patch/msgid/20190527120910.18964-1-maxime.ripard@bootlin.com .../display/allwinner,sun6i-a31-mipi-dsi.yaml | 100 +++++++++++++++++++++ .../bindings/display/sunxi/sun6i-dsi.txt | 93 ------------------- .../phy/allwinner,sun6i-a31-mipi-dphy.yaml | 57 ++++++++++++ 3 files changed, 157 insertions(+), 93 deletions(-) commit 32707c4dfa20b01d6a3c8d2797daa52bfc188add Author: Herbert Xu Date: Wed May 29 13:40:26 2019 +0800 inet: frags: Remove unnecessary smp_store_release/READ_ONCE The smp_store_release call in fqdir_exit cannot protect the setting of fqdir->dead as claimed because its memory barrier is only guaranteed to be one-way and the barrier precedes the setting of fqdir->dead. IOW it doesn't provide any barriers between fq->dir and the following hash table destruction. In fact, the code is safe anyway because call_rcu does provide both the memory barrier as well as a guarantee that when the destruction work starts executing all RCU readers will see the updated value for fqdir->dead. Therefore this patch removes the unnecessary smp_store_release call as well as the corresponding READ_ONCE on the read-side in order to not confuse future readers of this code. Comments have been added in their places. Signed-off-by: Herbert Xu Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/inet_fragment.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 5080e28d94a27e182e323854a9ba2a0718e9e3bf Author: YueHaibing Date: Wed May 29 10:59:06 2019 +0800 net: mvpp2: cls: Remove unnessesary check in mvpp2_ethtool_cls_rule_ins Fix smatch warning: drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c:1236 mvpp2_ethtool_cls_rule_ins() warn: unsigned 'info->fs.location' is never less than zero. 'info->fs.location' is u32 type, never less than zero. Signed-off-by: YueHaibing Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit cac2a301c02a9b178842e22df34217da7854e588 Author: Dan Carpenter Date: Thu May 30 11:20:24 2019 +0300 RDMA/uverbs: check for allocation failure in uapi_add_elm() If the kzalloc() fails then we should return ERR_PTR(-ENOMEM). In the current code it's possible that the kzalloc() fails and the radix_tree_insert() inserts the NULL pointer successfully and we return the NULL "elm" pointer to the caller. That results in a NULL pointer dereference. Fixes: 9ed3e5f44772 ("IB/uverbs: Build the specs into a radix tree at runtime") Signed-off-by: Dan Carpenter Signed-off-by: Jason Gunthorpe drivers/infiniband/core/uverbs_uapi.c | 2 ++ 1 file changed, 2 insertions(+) commit 9737070c6823dc23a2a53fbffb3ebcceee9c96c1 Author: Jisheng Zhang Date: Wed May 29 02:26:07 2019 +0000 net: stmmac: Switch to devm_alloc_etherdev_mqs Make use of devm_alloc_etherdev_mqs() to simplify the code. Signed-off-by: Jisheng Zhang Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 6fe1a9b9b6542d460099395492d029bb6c6c2f5e Author: Gustavo A. R. Silva Date: Wed May 29 10:15:28 2019 -0500 IB/hfi1: Use struct_size() helper Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes, in particular in the context in which this code is being used. So, replace the following form: sizeof(struct opa_port_status_rsp) + num_vls * sizeof(struct _vls_pctrs) with: struct_size(rsp, vls, num_vls) and so on... Also, notice that variable size is unnecessary, hence it is removed. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Reviewed-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hfi1/mad.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 829ca44ecf60e9b6f83d0161a6ef10c1304c5060 Author: Gustavo A. R. Silva Date: Wed May 29 10:13:26 2019 -0500 IB/qib: Use struct_size() helper Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes, in particular in the context in which this code is being used. So, replace the following form: sizeof(*pkt) + sizeof(pkt->addr[0])*n with: struct_size(pkt, addr, n) Also, notice that variable size is unnecessary, hence it is removed. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Reviewed-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/qib/qib_user_sdma.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 34755f596110fb85f4c5b5fbe56aeb86042074bc Author: Gustavo A. R. Silva Date: Wed May 29 10:12:48 2019 -0500 IB/rdmavt: Use struct_size() helper Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes, in particular in the context in which this code is being used. So, replace the following form: sizeof(struct rvt_sge) * init_attr->cap.max_send_sge + sizeof(struct rvt_swqe) with: struct_size(swq, sg_list, init_attr->cap.max_send_sge) and so on... Also, notice that variable size is unnecessary, hence it is removed. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Reviewed-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe drivers/infiniband/sw/rdmavt/qp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 621ccc6cc5f8d6730b740d31d4818227866c93c9 Author: David S. Miller Date: Thu May 30 11:36:15 2019 -0700 tua6100: Avoid build warnings. Rename _P to _P_VAL and _R to _R_VAL to avoid global namespace conflicts: drivers/media/dvb-frontends/tua6100.c: In function ‘tua6100_set_params’: drivers/media/dvb-frontends/tua6100.c:79: warning: "_P" redefined #define _P 32 In file included from ./include/acpi/platform/aclinux.h:54, from ./include/acpi/platform/acenv.h:152, from ./include/acpi/acpi.h:22, from ./include/linux/acpi.h:34, from ./include/linux/i2c.h:17, from drivers/media/dvb-frontends/tua6100.h:30, from drivers/media/dvb-frontends/tua6100.c:32: ./include/linux/ctype.h:14: note: this is the location of the previous definition #define _P 0x10 /* punct */ Signed-off-by: David S. Miller drivers/media/dvb-frontends/tua6100.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 3b87cc6feccbf472402e4733120e86fb2233ed5c Merge: 517f4c49aafc 7ce236fafd0b Author: David S. Miller Date: Thu May 30 11:27:47 2019 -0700 Merge branch 'Enable-SFP-on-ACPI-based-systems' Ruslan Babayev says: ==================== Enable SFP on ACPI based systems Changes: v2: - more descriptive commit body v3: - made 'i2c_acpi_find_adapter_by_handle' static inline v4: - don't initialize i2c_adapter to NULL. Instead see below... - handle the case of neither DT nor ACPI present as invalid. - alphabetical includes. - use has_acpi_companion(). - use the same argument name in i2c_acpi_find_adapter_by_handle() in both stubbed and non-stubbed cases. ==================== Signed-off-by: David S. Miller commit 7ce236fafd0b4e279abf3e8b15ba9ad3e49d1440 Author: Ruslan Babayev Date: Tue May 28 16:02:33 2019 -0700 net: phy: sfp: enable i2c-bus detection on ACPI based systems Lookup I2C adapter using the "i2c-bus" device property on ACPI based systems similar to how it's done with DT. An example DSD describing an SFP on an ACPI based system: Device (SFP0) { Name (_HID, "PRP0001") Name (_CRS, ResourceTemplate() { GpioIo(Exclusive, PullDefault, 0, 0, IoRestrictionNone, "\\_SB.PCI0.RP01.GPIO", 0, ResourceConsumer) { 0, 1, 2, 3, 4 } }) Name (_DSD, Package () { ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), Package () { Package () { "compatible", "sff,sfp" }, Package () { "i2c-bus", \_SB.PCI0.RP01.I2C.MUX.CH0 }, Package () { "maximum-power-milliwatt", 1000 }, Package () { "tx-disable-gpios", Package () { ^SFP0, 0, 0, 1} }, Package () { "reset-gpio", Package () { ^SFP0, 0, 1, 1} }, Package () { "mod-def0-gpios", Package () { ^SFP0, 0, 2, 1} }, Package () { "tx-fault-gpios", Package () { ^SFP0, 0, 3, 0} }, Package () { "los-gpios", Package () { ^SFP0, 0, 4, 1} }, }, }) } Device (PHY0) { Name (_HID, "PRP0001") Name (_DSD, Package () { ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), Package () { Package () { "compatible", "ethernet-phy-ieee802.3-c45" }, Package () { "sfp", \_SB.PCI0.RP01.SFP0 }, Package () { "managed", "in-band-status" }, Package () { "phy-mode", "sgmii" }, }, }) } Signed-off-by: Ruslan Babayev Cc: xe-linux-external@cisco.com Acked-by: Russell King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/sfp.c | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) commit 1e91a2e5d827e643cbabad66d133f155a7fcb0de Author: Ruslan Babayev Date: Tue May 28 16:02:32 2019 -0700 i2c: acpi: export i2c_acpi_find_adapter_by_handle This allows drivers to lookup i2c adapters on ACPI based systems similar to of_get_i2c_adapter_by_node() with DT based systems. Signed-off-by: Ruslan Babayev Cc: xe-linux-external@cisco.com Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/i2c/i2c-core-acpi.c | 3 ++- include/linux/i2c.h | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) commit 2f2da36ebf42ef73a4591870b805f5ad0fbc10d5 Author: Anirudh Venkataramanan Date: Tue Apr 16 10:35:03 2019 -0700 ice: Trivial cosmetic changes This patch mostly capitalizes abbreviations in code comments. Fixed some typos and removed some unnecessary newlines as well. Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice_adminq_cmd.h | 4 +-- drivers/net/ethernet/intel/ice/ice_common.c | 6 ++-- drivers/net/ethernet/intel/ice/ice_controlq.c | 2 +- drivers/net/ethernet/intel/ice/ice_controlq.h | 2 +- drivers/net/ethernet/intel/ice/ice_dcb.c | 14 ++++---- drivers/net/ethernet/intel/ice/ice_dcb_lib.c | 12 +++---- drivers/net/ethernet/intel/ice/ice_ethtool.c | 2 +- drivers/net/ethernet/intel/ice/ice_lib.c | 4 +-- drivers/net/ethernet/intel/ice/ice_main.c | 42 ++++++++++++------------ drivers/net/ethernet/intel/ice/ice_txrx.c | 8 ++--- drivers/net/ethernet/intel/ice/ice_type.h | 2 +- drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c | 9 +++-- 12 files changed, 53 insertions(+), 54 deletions(-) commit 072efdf8bf4cd07527b03bce78a433d6ed21dccf Author: Anirudh Venkataramanan Date: Tue Apr 16 10:35:02 2019 -0700 ice: Recognize higher speeds In ice_print_link_msg, add cases for 50GB and 100GB speeds. This results in the right speed being reported on load, instead of "Unknownbps". When VF link if forced (in ice_set_pfe_link_forced), report max speed 100GB. Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice_main.c | 6 ++++++ drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) commit 4f70daa081423ec91e1bcc0a9a21c69cbdd36854 Author: Jacob Keller Date: Tue Apr 16 10:35:01 2019 -0700 ice: Use a different ICE_DBG bit for firmware log messages Replace the use of the ICE_DBG_AQ_MSG bit when dumping firmware logging messages with a separate distinct type ICE_DBG_FW_LOG. This is useful so that developers may enable ICE_DBG_FW_LOG and get firmware logging messages, without also dumping AdminQ messages at the same time. Signed-off-by: Jacob Keller Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice_common.c | 6 +++--- drivers/net/ethernet/intel/ice/ice_type.h | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) commit ed14245ab7593a6565a1b5f050a9bec88cae39f5 Author: Anirudh Venkataramanan Date: Tue Apr 16 10:35:00 2019 -0700 ice: Update function header Add some details to the function header for ice_deinit_hw. Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice_common.c | 4 ++++ 1 file changed, 4 insertions(+) commit 49c6e41b0d1fa9d14b1c20c71eb85f8f1dd12518 Author: Anirudh Venkataramanan Date: Tue Apr 16 10:34:59 2019 -0700 ice: Move define for ICE_AQC_DRIVER_UNLOADING The define describing the bits for the struct field should be below the field itself. Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice_adminq_cmd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 62f4dafc182f34c0e889aeab543ecacc47582c1a Author: Anirudh Venkataramanan Date: Tue Apr 16 10:34:58 2019 -0700 ice: Align to updated AQ command formats The current specification has updates to the command formats for manage MAC opcodes (opcodes 0x0107 and 0x0108) and get PHY caps (opcode 0x0600). Update the code to reflect this. Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice_adminq_cmd.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 91d7a5908774285da1eb32f24a596b771512f73c Author: Anirudh Venkataramanan Date: Tue Apr 16 10:34:57 2019 -0700 ice: Use continue instead of an else block For style consistency, use continue instead of an else block in ice_pf_dcb_recfg. Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice_dcb_lib.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 8be92a76c3e998af76c73ce9349d2e0bbf8782e5 Author: Preethi Banala Date: Tue Apr 16 10:34:56 2019 -0700 ice: Change minimum descriptor count value for Tx/Rx rings Change minimum number of descriptor count from 32 to 64. This is to have a feature parity with previous Intel NIC drivers. Signed-off-by: Preethi Banala Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2e0e62285c1c8d9d0c295eec610e2f966d71b97c Author: Dave Ertman Date: Tue Apr 16 10:34:55 2019 -0700 ice: Add switch rules to handle LLDP packets Add call to configure dropping egress LLDP packets in ice_vsi_setup and remove the rule in ice_vsi_release. Add calls to add/remove rule to route LLDP packets to default VSI when FW LLDP engine is disabled/enabled and remove rule if applied during ice_vsi_release. In the function ice_add_eth_mac(), there is a line that hard codes the filter info flag to TX. This is incorrect as this flag will be set by the calling function that built the list of filters to add. So remove the hard coded value. This patch also contains a fix to stop treating the DCBx state of "Not Started" as an error state that kicks DCB in SW mode. This will address having non-cabled interfaces automatically go into SW mode with the FW engine running. Signed-off-by: Dave Ertman Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice_dcb_lib.c | 4 +- drivers/net/ethernet/intel/ice/ice_ethtool.c | 11 +++++ drivers/net/ethernet/intel/ice/ice_lib.c | 73 +++++++++++++++++++++++++++- drivers/net/ethernet/intel/ice/ice_lib.h | 2 + drivers/net/ethernet/intel/ice/ice_switch.c | 5 +- 5 files changed, 89 insertions(+), 6 deletions(-) commit 839d05e413856bd686a33b59294d4e8238169320 Author: Paul Moore Date: Thu May 30 12:53:42 2019 -0400 audit: remove the BUG() calls in the audit rule comparison functions The audit_data_to_entry() function ensures that the operator is valid so we can get rid of these BUG() calls. We keep the "return 0" just so the system behaves in a sane-ish manner should something go horribly wrong. Signed-off-by: Paul Moore Acked-by: Richard Guy Briggs kernel/auditfilter.c | 3 --- 1 file changed, 3 deletions(-) commit 36af5f407bbb2da6dd9809dd6f173dd377b57d74 Author: Chao Yu Date: Tue May 28 17:23:33 2019 +0800 f2fs: fix sparse warning make C=2 CHECKFLAGS="-D__CHECK_ENDIAN__" CHECK dir.c dir.c:842:50: warning: cast from restricted __le32 CHECK node.c node.c:2759:40: warning: restricted __le32 degrades to integer Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/dir.c | 4 ++-- fs/f2fs/node.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit a700767a7682d9bd237e927253274859aee075e7 Author: Mauro Carvalho Chehab Date: Wed May 29 20:09:32 2019 -0300 docs: requirements.txt: recommend Sphinx 1.7.9 As discussed at the linux-doc ML, while we'll still support version 1.3, it is time to recommend a more modern version. So, let's switch the minimal requirements to Sphinx 1.7.9, as it has the "-jauto" flag, with makes a lot faster when building documentation. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/doc-guide/sphinx.rst | 17 ++++++++--------- Documentation/sphinx/requirements.txt | 4 ++-- 2 files changed, 10 insertions(+), 11 deletions(-) commit cf08508d21ffae5aea6c7dcb771ebd28612c6120 Author: Mauro Carvalho Chehab Date: Wed May 29 20:09:31 2019 -0300 docs: by default, build docs a lot faster with Sphinx >= 1.7 Since Sphinx version 1.7, it is possible to use "-jauto" in order to speedup documentation builds. On older versions, while -j was already supported, one would need to set the number of threads manually. So, if SPHINXOPTS is not provided, add -jauto, in order to speed up the build. That makes it *a lot* times faster than without -j. If one really wants to slow things down, it can just use: make SPHINXOPTS=-j1 htmldocs Signed-off-by: Mauro Carvalho Chehab [ jc: fixed perl magic to determine sphinx version ] Signed-off-by: Jonathan Corbet Documentation/Makefile | 2 ++ 1 file changed, 2 insertions(+) commit 0ca862e6f1c7e58e4eb9758fdb09255e6104d6a0 Author: Mauro Carvalho Chehab Date: Wed May 29 20:09:30 2019 -0300 scripts/documentation-file-ref-check: teach about .txt -> .yaml renames At DT, files are being renamed to jason. Teach the script how to handle such renames when used in fix mode. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet scripts/documentation-file-ref-check | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit 4904aeed9f686c90dba72980f0067ac1a7dbbfb6 Author: Mauro Carvalho Chehab Date: Wed May 29 20:09:29 2019 -0300 scripts/documentation-file-ref-check: improve tools ref handling There's a false positive on perf/util: tools/perf/util/s390-cpumsf.c: Documentation/perf.data-file-format.txt The file is there at tools/perf/Documentation/, but the logic with detects relative documentation references inside tools is not capable of detecting it. So, improve it. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet scripts/documentation-file-ref-check | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aeaacbfed853c17b8ac5e73c21f54d7f0805d899 Author: Mauro Carvalho Chehab Date: Wed May 29 20:09:28 2019 -0300 scripts/documentation-file-ref-check: exclude false-positives There are at least two cases where a documentation file was gone for good, but the text still mentions it: 1) drivers/vhost/vhost.c: the reference for Documentation/virtual/lguest/lguest.c is just to give credits to the original work that vhost replaced; 2) Documentation/scsi/scsi_mid_low_api.txt: It gives credit and mentions the old Documentation/Configure.help file that used to be part of Kernel 2.4.x As we don't want to keep the script to keep pinpoint to those every time, let's add a logic at the script to allow it to ignore valid false-positives like the above. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet scripts/documentation-file-ref-check | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 9e78e7fc0b20bcc0d5599f71d297b6fa1a2e7c5f Author: Mauro Carvalho Chehab Date: Wed May 29 20:09:27 2019 -0300 scripts/documentation-file-ref-check: better handle translations Only seek for translation renames inside the translation directory. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet scripts/documentation-file-ref-check | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 9b88ad5464af1bf7228991f1c46a9a13484790a4 Author: Mauro Carvalho Chehab Date: Wed May 29 20:09:26 2019 -0300 scripts/sphinx-pre-install: always check if version is compatible with build Call the script every time a make docs target is selected, on a simplified check mode. With this change, the script will set two vars: $min_version - obtained from `needs_sphinx` var inside conf.py (currently, '1.3') $rec_version - obtained from sphinx/requirements.txt. With those changes, a target like "make htmldocs" will do: 1) If no sphinx-build/sphinx-build3 is found, it will run the script on normal mode as before, checking for all system dependencies and providing install hints for the needed programs and will abort the build; 2) If no sphinx-build/sphinx-build3 is found, but there is a sphinx_${VER}/bin/activate file, and if ${VER} >= $min_version (string comparation), it will run in full mode, and will recommend to activate the virtualenv. If there are multiple virtualenvs, it will string sort the versions, recommending the highest version and will abort the build; 3) If Sphinx is detected but has a version lower than $min_version, it will run in full mode - with will recommend creating a virtual env using sphinx/requirements.txt, and will abort the build. 4) If Sphinx is detected and version is lower than $rec_version, it will run in full mode and will recommend creating a virtual env using sphinx/requirements.txt. In this case, it **won't** abort the build. 5) If Sphinx is detected and version is equal or righer than $rec_version it will return just after detecting the version ("quick mode"), not checking if are there any missing dependencies. Just like before, if one wants to install Sphinx from the distro, it has to call the script manually and use `--no-virtualenv` argument to get the hints for his OS: You should run: sudo dnf install -y python3-sphinx python3-sphinx_rtd_theme While here, add a small help for the three optional arguments for the script. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/Makefile | 5 +++++ scripts/sphinx-pre-install | 40 +++++++++++++++++++++++++++------------- 2 files changed, 32 insertions(+), 13 deletions(-) commit c4c562defedb7634a717293a5192071983e79781 Author: Mauro Carvalho Chehab Date: Wed May 29 20:09:25 2019 -0300 scripts/sphinx-pre-install: get rid of RHEL7 explicity check RHEL8 was already launched. This test won't get it, and will do the wrong thing. Ok, we could fix it, but now we check Sphinx version to ensure that it matches the minimal (1.3), so there's no need for an explicit check there. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet scripts/sphinx-pre-install | 13 ------------- 1 file changed, 13 deletions(-) commit 44f42165177e6c32f3a6aaceeaf7d9cd1c95595f Author: Mauro Carvalho Chehab Date: Wed May 29 20:09:24 2019 -0300 scripts/sphinx-pre-install: make activate hint smarter It is possible that multiple Sphinx virtualenvs are installed on a given kernel tree. Change the logic to get the latest version of those, as this is probably what the user wants. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet scripts/sphinx-pre-install | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) commit 81621f976176704bd6f443159691e60e1eea2544 Author: Sahitya Tummala Date: Fri May 24 14:38:39 2019 +0530 f2fs: fix f2fs_show_options to show nodiscard mount option Fix f2fs_show_options to show nodiscard mount option. Signed-off-by: Sahitya Tummala Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/super.c | 2 ++ 1 file changed, 2 insertions(+) commit 9227d5227b8db354d386f592f159eaa44db1c0b8 Author: Sahitya Tummala Date: Thu May 23 09:49:17 2019 +0530 f2fs: add error prints for debugging mount failure Add error prints to get more details on the mount failure. Signed-off-by: Sahitya Tummala Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 6 +++++- fs/f2fs/super.c | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) commit c854f4d681365498f53ba07843a16423625aa7e9 Author: Chao Yu Date: Sat May 25 23:07:25 2019 +0800 f2fs: fix to do sanity check on segment bitmap of LFS curseg As Jungyeon Reported in bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=203233 - Reproduces gcc poc_13.c ./run.sh f2fs - Kernel messages F2FS-fs (sdb): Bitmap was wrongly set, blk:4608 kernel BUG at fs/f2fs/segment.c:2133! RIP: 0010:update_sit_entry+0x35d/0x3e0 Call Trace: f2fs_allocate_data_block+0x16c/0x5a0 do_write_page+0x57/0x100 f2fs_do_write_node_page+0x33/0xa0 __write_node_page+0x270/0x4e0 f2fs_sync_node_pages+0x5df/0x670 f2fs_write_checkpoint+0x364/0x13a0 f2fs_sync_fs+0xa3/0x130 f2fs_do_sync_file+0x1a6/0x810 do_fsync+0x33/0x60 __x64_sys_fsync+0xb/0x10 do_syscall_64+0x43/0x110 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The testcase fails because that, in fuzzed image, current segment was allocated with LFS type, its .next_blkoff should point to an unused block address, but actually, its bitmap shows it's not. So during allocation, f2fs crash when setting bitmap. Introducing sanity_check_curseg() to check such inconsistence of current in-used segment. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit 4d11d13e27762413399ab6f8dc49d30911cac17a Author: Jaegeuk Kim Date: Thu May 2 20:08:40 2019 -0700 f2fs: add missing sysfs entries in documentation This patch cleans up documentation to cover missing sysfs entries. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim Documentation/filesystems/f2fs.txt | 89 ++++++++++++++++++++++++++++++++++---- 1 file changed, 80 insertions(+), 9 deletions(-) commit b9c1c26739ec2d4b4fb70207a0a9ad6747e43f4c Author: Jan Kara Date: Thu May 30 11:56:23 2019 -0400 ext4: gracefully handle ext4_break_layouts() failure during truncate ext4_break_layouts() may fail e.g. due to a signal being delivered. Thus we need to handle its failure gracefully and not by taking the filesystem down. Currently ext4_break_layouts() failure is rare but it may become more common once RDMA uses layout leases for handling long-term page pins for DAX mappings. To handle the failure we need to move ext4_break_layouts() earlier during setattr handling before we do hard to undo changes such as modifying inode size. To be able to do that we also have to move some other checks which are better done without holding i_mmap_sem earlier. Reported-and-tested-by: Ira Weiny Reviewed-by: Ira Weiny Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o fs/ext4/inode.c | 66 ++++++++++++++++++++++++++++++--------------------------- 1 file changed, 35 insertions(+), 31 deletions(-) commit 970c43d1783539b75a5e234ff5e51fc5c888112f Author: Zhu Yingjiang Date: Fri May 24 14:09:25 2019 -0500 ASoC: SOF: Intel: hda: use the defined ppcap functions There are already defined ppcap and ppcap interrupt functions, use the already defined functions for easy code read. Fixes: 8a300c8fb17 ("ASoC: SOF: Intel: Add HDA controller for Intel DSP") Reviewed-by: Takashi Iwai Signed-off-by: Zhu Yingjiang Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/sof/intel/hda.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 64adde31c8e996a6db6f7a1a4131180e363aa9f2 Author: Niklas Cassel Date: Wed May 29 11:43:52 2019 +0200 PCI: qcom: Ensure that PERST is asserted for at least 100 ms Currently, there is only a 1 ms sleep after asserting PERST. Reading the datasheets for different endpoints, some require PERST to be asserted for 10 ms in order for the endpoint to perform a reset, others require it to be asserted for 50 ms. Several SoCs using this driver uses PCIe Mini Card, where we don't know what endpoint will be plugged in. The PCI Express Card Electromechanical Specification r2.0, section 2.2, "PERST# Signal" specifies: "On power up, the deassertion of PERST# is delayed 100 ms (TPVPERL) from the power rails achieving specified operating limits." Add a sleep of 100 ms before deasserting PERST, in order to ensure that we are compliant with the spec. Fixes: 82a823833f4e ("PCI: qcom: Add Qualcomm PCIe controller driver") Signed-off-by: Niklas Cassel Signed-off-by: Lorenzo Pieralisi Acked-by: Stanimir Varbanov Cc: stable@vger.kernel.org # 4.5+ drivers/pci/controller/dwc/pcie-qcom.c | 2 ++ 1 file changed, 2 insertions(+) commit 79b3b7c4a396b9fa1963ac70e853998633e8151d Merge: e13ef82a9ab8 1f2675f66558 Author: Mark Brown Date: Thu May 30 16:47:43 2019 +0100 Merge branch 'asoc-5.2' into asoc-5.3 commit e13ef82a9ab83dd21d8dd43ef9f5e8bf5b101106 Author: Pierre-Louis Bossart Date: Thu May 30 06:50:15 2019 -0500 ASoC: SOF: add COMPILE_TEST for PCI options Add COMPILE_TEST and use IS_ENABLED(CONFIG_PCI) to sort out cross-compilation issues. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/sof/Kconfig | 2 +- sound/soc/sof/intel/hda.c | 13 +++++++++++-- sound/soc/sof/sof-pci-dev.c | 4 ++++ 3 files changed, 16 insertions(+), 3 deletions(-) commit 8fe751d8fd5cbf19e9d7852c5b7d8ed818be1934 Author: Pierre-Louis Bossart Date: Thu May 30 06:50:14 2019 -0500 ASoC: Intel: boards: Add COMPILE_TEST for new machine drivers We recently added COMPILE_TEST but new machine drivers were not updated. Fix. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/boards/Kconfig | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 0d365acbbe295a67df5e1dc1e3661dc37390dd58 Author: Pierre-Louis Bossart Date: Thu May 30 06:50:13 2019 -0500 ASoC: Intel: boards: remove dependency on asm/platform_sst_audio.h This is not needed. Probably a copy/paste that was never removed. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/boards/bytcht_cx2072x.c | 1 - sound/soc/intel/boards/bytcht_da7213.c | 1 - sound/soc/intel/boards/bytcht_es8316.c | 1 - 3 files changed, 3 deletions(-) commit 2c79eeb1aaf2bf0a6d9bb4732596f7dc147cab4d Author: Randy Dunlap Date: Thu May 30 06:50:12 2019 -0500 ASoc: fix sound/soc/intel/skylake/slk-ssp-clk.c build error on IA64 skl-ssp-clk.c does not build on IA64 because the driver uses the common clock interface, so make the driver depend on COMMON_CLK. Fixes this build error: ../sound/soc/intel/skylake/skl-ssp-clk.c:26:16: error: field 'hw' has incomplete type struct clk_hw hw; ^~ [Corrections for SKL support by Pierre Bossart] Reported-by: kbuild test robot Signed-off-by: Randy Dunlap Signed-off-by: Pierre-Louis Bossart Cc: Mark Brown Cc: Liam Girdwood Cc: Jie Yang Cc: alsa-devel@alsa-project.org Signed-off-by: Mark Brown sound/soc/intel/Kconfig | 9 +++++++++ 1 file changed, 9 insertions(+) commit 536cfd2f375d36f4316c0b93bb9e0eaf78e0ef6c Author: Pierre-Louis Bossart Date: Thu May 30 06:50:11 2019 -0500 ASoC: Intel: use common helpers to detect CPUs We have duplicated code in multiple locations (atom, machine drivers, SOF) to detect Baytrail, Cherrytrail and other SOCs. This is not very elegant, and introduces dependencies on CONFIG_X86 that prevent COMPILE_TEST from working. Add common helpers to provide same functionality in a cleaner way. This will also help support the DMI-based quirks being introduced to handle SOF/SST autodetection. Reviewed-by: Takashi Iwai Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/atom/sst/sst_acpi.c | 65 +-------------- sound/soc/intel/boards/bxt_da7219_max98357a.c | 11 +-- sound/soc/intel/boards/bytcht_es8316.c | 12 +-- sound/soc/intel/boards/bytcr_rt5640.c | 16 +--- sound/soc/intel/boards/bytcr_rt5651.c | 17 +--- sound/soc/intel/boards/cht_bsw_rt5645.c | 16 +--- sound/soc/intel/boards/sof_rt5682.c | 11 +-- sound/soc/intel/common/soc-intel-quirks.h | 115 ++++++++++++++++++++++++++ sound/soc/sof/sof-acpi-dev.c | 57 +------------ 9 files changed, 135 insertions(+), 185 deletions(-) commit f499edf9fa90f184af9f457fd0912a788754af25 Author: Curtis Malainey Date: Wed May 29 12:30:48 2019 -0700 ASoC: rt5677: Add missing voice activation register definitions Most of the voice activation definitions were missing, they will be needed for when hotwording is added. Also the source bits are only 2 wide not 3 and needed to be corrected. Signed-off-by: Curtis Malainey Signed-off-by: Mark Brown sound/soc/codecs/rt5677.h | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) commit c7ddfd3514f2702a70e9ff86504cafa856dd16b2 Author: Ley Foon Tan Date: Wed Apr 24 12:57:15 2019 +0800 PCI: altera-msi: Allow building as module Altera MSI IP is a soft IP and is only available after an FPGA image (with design containing it) is programmed. Make driver modulable to support use case FPGA image is programmed the after kernel has booted, so that the driver can be loaded upon request. Signed-off-by: Ley Foon Tan Signed-off-by: Lorenzo Pieralisi drivers/pci/controller/Kconfig | 2 +- drivers/pci/controller/pcie-altera-msi.c | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) commit ec15c4d0d5d2e431169fbdf6c6bcf0c8ff71ef22 Author: Ley Foon Tan Date: Wed Apr 24 12:57:14 2019 +0800 PCI: altera: Allow building as module Altera PCIe Rootport IP is a soft IP and is only available after an FPGA image (whose design contains it) is programmed. Make driver modulable to support use cases when FPGA image is programmed after the kernel has booted, so that the driver can be loaded upon request. Signed-off-by: Ley Foon Tan Signed-off-by: Lorenzo Pieralisi drivers/pci/controller/Kconfig | 2 +- drivers/pci/controller/pcie-altera.c | 28 ++++++++++++++++++++++++++-- 2 files changed, 27 insertions(+), 3 deletions(-) commit 76002d8b48c4b08c9bd414517dd295e132ad910b Author: Alex Williamson Date: Wed May 1 11:00:16 2019 -0600 PCI: Return error if cannot probe VF Commit 0e7df22401a3 ("PCI: Add sysfs sriov_drivers_autoprobe to control VF driver binding") allows the user to specify that drivers for VFs of a PF should not be probed, but it actually causes pci_device_probe() to return success back to the driver core in this case. Therefore by all sysfs appearances the device is bound to a driver, the driver link from the device exists as does the device link back from the driver, yet the driver's probe function is never called on the device. We also fail to do any sort of cleanup when we're prohibited from probing the device, the IRQ setup remains in place and we even hold a device reference. Instead, abort with errno before any setup or references are taken when pci_device_can_probe() prevents us from trying to probe the device. Link: https://lore.kernel.org/lkml/155672991496.20698.4279330795743262888.stgit@gimli.home Fixes: 0e7df22401a3 ("PCI: Add sysfs sriov_drivers_autoprobe to control VF driver binding") Signed-off-by: Alex Williamson Signed-off-by: Bjorn Helgaas drivers/pci/pci-driver.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit eb0f68cb7042fd5cff0d6b57966a93049fb2495b Author: David Howells Date: Thu May 30 14:19:20 2019 +0100 keys: Break bits out of key_unlink() Break bits out of key_unlink() into helper functions so that they can be used in implementing key_move(). Signed-off-by: David Howells security/keys/keyring.c | 88 +++++++++++++++++++++++++++++++++++++------------ 1 file changed, 67 insertions(+), 21 deletions(-) commit 3be59f74512e37f4d4243a5d0831970e2a009206 Author: David Howells Date: Thu May 30 11:40:24 2019 +0100 keys: Change keyring_serialise_link_sem to a mutex Change keyring_serialise_link_sem to a mutex as it's only ever write-locked. Signed-off-by: David Howells security/keys/keyring.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit c42eaffa16568a538f12dfebd99624659992913a Author: Changbin Du Date: Tue May 14 22:47:23 2019 +0800 Documentation: add Linux PCI to Sphinx TOC tree Add index.rst for PCI subsystem. More docs will be added later. Signed-off-by: Changbin Du Signed-off-by: Bjorn Helgaas Documentation/PCI/index.rst | 9 +++++++++ Documentation/index.rst | 1 + 2 files changed, 10 insertions(+) commit b8e65c1939ffa49384f2a2dca2057b5a1c8c365a Author: Sudeep Holla Date: Wed May 29 14:48:51 2019 +0100 ARM: dts: vexpress: set the right partition type for NOR flash We should set up the partitions in the right way so we will find out what is in the flash. The ARM Firmware Suite now has its own compatible and proper device tree bindings to trigger discovery of the flash contents, and Linux supports handling the new type of AFS partitions. Based on commit 7f8e78ca90e2 ("arm64: dts: juno: set the right partition type for NOR flash") Cc: Liviu Dudau Cc: Lorenzo Pieralisi Reviewed-by: Linus Walleij Signed-off-by: Sudeep Holla arch/arm/boot/dts/vexpress-v2m-rs1.dtsi | 3 +++ arch/arm/boot/dts/vexpress-v2m.dtsi | 3 +++ 2 files changed, 6 insertions(+) commit 6f3710f1f65fdc0da2b042ea6a9a738ddd146d4e Author: Sudeep Holla Date: Wed May 29 14:29:45 2019 +0100 arm: dts: vexpress-v2p-ca15_a7: disable NOR flash node by default Accessing the NOR flash memory from the kernel will disrupt CPU sleep/ idles states and CPU hotplugging. We need to disable this DT node by default. Setups that want to access the flash can modify this entry to enable the flash again but also ensuring to disable CPU idle states and CPU hotplug. The platform firmware assumes the flash is always in read mode while Linux kernel driver leaves NOR flash in "read id" mode after initialization. If it gets used actively, it can be in some other state. So far we had not seen this issue as the NOR flash drivers in kernel were not enabled by default. However it was enable in multi_v7 config by Commit 5f068190cc10 ("ARM: multi_v7_defconfig: Enable support for CFI NOR FLASH") So, let's mark the NOR flash disabled so that the platform can boot again. This based on: Commit 980bbff018f6 ("ARM64: juno: disable NOR flash node by default") Cc: Liviu Dudau Cc: Lorenzo Pieralisi Reviewed-by: Linus Walleij Signed-off-by: Sudeep Holla arch/arm/boot/dts/vexpress-v2m-rs1.dtsi | 2 +- arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) commit 96c0dad2f9de50f79216aacf304dcb9bcab9d01b Author: Chen-Yu Tsai Date: Mon May 20 17:06:37 2019 +0200 ARM: dts: sun8i: a83t: Add device node for CSI (Camera Sensor Interface) The A83T SoC has a camera sensor interface (known as CSI in Allwinner lingo), which is similar to the one found on the A64 and H3. The only difference seems to be that support of MIPI CSI through a connected MIPI CSI-2 bridge. Add a device node for it, and pinctrl nodes for the commonly used MCLK and 8-bit parallel interface. The property /omit-if-no-ref/ is added to the pinctrl nodes to keep the device tree blob size down if they are unused. Signed-off-by: Chen-Yu Tsai Signed-off-by: Ondrej Jirman Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a83t.dtsi | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit bdd33cb6e24f4fc5a6d281ec81d2764698432117 Author: Maxime Ripard Date: Sat May 25 15:41:40 2019 +0200 ARM: dts: gr8-evb: Fix RTC vendor For some reason, the RTC vendor is reported to be phg, while the part is actually made by the much more known NXP. Fix that. Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun5i-gr8-evb.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ae683c816d9f4aadec3eaf1da69a04c07ca9fd3f Author: Maxime Ripard Date: Sat May 25 15:41:39 2019 +0200 ARM: dts: sun7i: icnova-swac: Fix the model vendor Even though the SWAC is just a baseboard to the icnova SoM, the vendor of the baseboard somehow ended up with the board name instead of the vendor name. Fix that. Signed-off-by: Maxime Ripard Documentation/devicetree/bindings/arm/sunxi.yaml | 2 +- arch/arm/boot/dts/sun7i-a20-icnova-swac.dts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) commit dfe8173dfd25206de396592930589770eed48fcb Author: Maxime Ripard Date: Sat May 25 15:40:03 2019 +0200 ARM: dts: sun8i: a711: Change LRADC node names to avoid warnings One of the usage of the LRADC is to implement buttons. The bindings define that we should have one subnode per button, with their associated voltage as a property. However, there was no reg property but we still used the voltage associated to the button as the unit-address, which eventually generated warnings in DTC. Rename the node names to avoid those warnings. Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dc1f73802bd76bea60b9c93eb24a1d26472d2723 Author: Chengguang Xu Date: Thu May 30 18:10:42 2019 +0800 ext2: add missing brelse() in ext2_new_inode() There is a missing brelse of bitmap_bh in an error path of ext2_new_inode(). Signed-off-by: Chengguang Xu Signed-off-by: Jan Kara fs/ext2/ialloc.c | 1 + 1 file changed, 1 insertion(+) commit 6501aa4e3a45075360e72784a48fcd5c32a4eb24 Author: Matthew Auld Date: Wed May 29 13:31:08 2019 +0100 drm/i915: add in-kernel blitter client The plan is to use the blitter engine for async object clearing when using local memory, but before we can move the worker to get_pages() we have to first tame some more of our struct_mutex usage. With this in mind we should be able to upstream the object clearing as some selftests, which should serve as a guinea pig for the ongoing locking rework and upcoming async get_pages() framework. Signed-off-by: Matthew Auld Cc: CQ Tang Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190529123108.24422-2-matthew.auld@intel.com drivers/gpu/drm/i915/Makefile | 2 + drivers/gpu/drm/i915/gem/i915_gem_client_blt.c | 306 +++++++++++++++++++++ drivers/gpu/drm/i915/gem/i915_gem_client_blt.h | 21 ++ drivers/gpu/drm/i915/gem/i915_gem_object_blt.c | 109 ++++++++ drivers/gpu/drm/i915/gem/i915_gem_object_blt.h | 24 ++ .../drm/i915/gem/selftests/i915_gem_client_blt.c | 127 +++++++++ .../drm/i915/gem/selftests/i915_gem_object_blt.c | 110 ++++++++ drivers/gpu/drm/i915/gt/intel_gpu_commands.h | 1 + .../gpu/drm/i915/selftests/i915_live_selftests.h | 2 + 9 files changed, 702 insertions(+) commit 0a4a6e74e7335d8c29eed70398505b5396695cc4 Author: Matthew Auld Date: Wed May 29 13:31:07 2019 +0100 drm/i915/gtt: grab wakeref in gen6_alloc_va_range Some steps in gen6_alloc_va_range require the HW to be awake, so ideally we should be grabbing the wakeref ourselves and not relying on the caller already holding it for us. Suggested-by: Chris Wilson Signed-off-by: Matthew Auld Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190529123108.24422-1-matthew.auld@intel.com drivers/gpu/drm/i915/i915_gem_gtt.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit c304b8d2f9aa7971863bfce4885581a6b5f0f311 Author: Kefeng Wang Date: Sat May 25 19:55:42 2019 +0800 clk: samsung: exynos5433: Use of_clk_get_parent_count() Use of_clk_get_parent_count() instead of open coding. Reviewed-by: Andrzej Hajda Acked-by: Chanwoo Choi Signed-off-by: Kefeng Wang Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk-exynos5433.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c86ccfba17289a7795e6bf8528c2824508fe86f8 Merge: 968e8e9fde25 ee8829dc609c Author: Takashi Iwai Date: Thu May 30 11:01:18 2019 +0200 Merge branch 'topic/hda-polling-mode' into for-next A follow-up fix for the HD-audio previous polling mode changes. Signed-off-by: Takashi Iwai commit ee8829dc609c5c4a425b4a65fbb4cd56fb82f1f4 Author: Bard Liao Date: Thu May 30 04:59:00 2019 +0800 ALSA: hda: fix: lock reg_lock before calling snd_hdac_bus_update_rirb The patch is to fix commit 5e13cf6cd64c (ALSA: hda: add polling mode in snd_hdac_bus_get_response) spin_lock_irq should be called before snd_hdac_bus_update_rirb. Fixes: 5e13cf6cd64c ("ALSA: hda: add polling mode in snd_hdac_bus_get_response") Signed-off-by: Bard Liao Signed-off-by: Takashi Iwai sound/hda/hdac_controller.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b33fb3cf6f5e039dea4a85a708a2c86f8a323575 Merge: 849e96f30068 14f1cfd4f7b4 Author: Ingo Molnar Date: Thu May 30 09:47:57 2019 +0200 Merge tag 'perf-core-for-mingo-5.3-20190529' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: BPF: Jiri Olsa: - Preserve eBPF maps when loading kcore. - Fix up DSO name padding in 'perf script --call-trace', as BPF DSO names are much larger than what we used to have there. - Add --show-bpf-events to 'perf script'. perf trace: Arnaldo Carvalho de Melo: - Add string table generators and beautify arguments for the new fspick, fsmount, fsconfig, fsopen, move_mount and open_tree syscalls, as well as new values for arguments of clone and sync_file_range syscalls. perf version: Arnaldo Carvalho de Melo: - Append 12 git SHA chars to the version string. Namespaces: Namhyung Kim: - Add missing --namespaces option to 'perf top', to generate and process namespace events, just like present for 'perf record'. Intel PT: Andrian Hunter: - Fix itrace defaults for 'perf script', not using the 'use_browser' variable to figure out what options are better for 'script' and 'report' - Allow root fixing up buildid cache permissions in the perf-with-kcore.sh script when sharing that cache with another user. - Improve sync_switch, a facility used to synchronize decoding of HW traces more closely with the point in the kerne where a context switch took place, by processing the PERF_RECORD_CONTEXT_SWITCH "in" metadata records too. - Make the exported-sql-viewer.py GUI also support pyside2, which upgrades from qt4 used in pyside to qt5. Use the argparser module for more easily addition of new command line args. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 0adb0c99594b73844cf9a5714faa6553ea04ba04 Author: Ard Biesheuvel Date: Fri May 24 18:26:51 2019 +0200 dt-bindings: move Atmel ECC508A I2C crypto processor to trivial-devices Move the binding for the discrete Atmel I2C Elliptic Curve h/w crypto module to trivial-devices.yaml, as it doesn't belong in atmel-crypto which describes unrelated on-SoC peripherals. Signed-off-by: Ard Biesheuvel Reviewed-by: Rob Herring Signed-off-by: Herbert Xu Documentation/devicetree/bindings/crypto/atmel-crypto.txt | 13 ------------- Documentation/devicetree/bindings/trivial-devices.yaml | 2 ++ 2 files changed, 2 insertions(+), 13 deletions(-) commit 2af8c8927ebb474eb2af4ab3b8d7e92c3844b43f Author: Ard Biesheuvel Date: Fri May 24 18:26:50 2019 +0200 dt-bindings: add Atmel SHA204A I2C crypto processor Add a compatible string for the Atmel SHA204A I2C crypto processor. Signed-off-by: Ard Biesheuvel Reviewed-by: Rob Herring Signed-off-by: Herbert Xu Documentation/devicetree/bindings/trivial-devices.yaml | 2 ++ 1 file changed, 2 insertions(+) commit da001fb651b00e1deeaf24767dd691ae8152a4f5 Author: Ard Biesheuvel Date: Fri May 24 18:26:49 2019 +0200 crypto: atmel-i2c - add support for SHA204A random number generator The Linaro/96boards Secure96 mezzanine contains (among other things) an Atmel SHA204A symmetric crypto processor. This chip implements a number of different functionalities, but one that is highly useful for many different 96boards platforms is the random number generator. So let's implement a driver for the SHA204A, and for the time being, implement support for the random number generator only. Reviewed-by: Linus Walleij Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu drivers/crypto/Kconfig | 14 ++++ drivers/crypto/Makefile | 1 + drivers/crypto/atmel-i2c.c | 15 ++++ drivers/crypto/atmel-i2c.h | 10 +++ drivers/crypto/atmel-sha204a.c | 171 +++++++++++++++++++++++++++++++++++++++++ 5 files changed, 211 insertions(+) commit c34a320176a59445d76783e5ee043d6ecd22d011 Author: Ard Biesheuvel Date: Fri May 24 18:26:48 2019 +0200 crypto: atmel-ecc - factor out code that can be shared In preparation of adding support for the random number generator in Atmel atsha204a devices, refactor the existing atmel-ecc driver (which drives hardware that is closely related) so we can share the basic I2C and command queuing routines. Reviewed-by: Linus Walleij Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu drivers/crypto/Kconfig | 4 + drivers/crypto/Makefile | 1 + drivers/crypto/atmel-ecc.c | 406 ++-------------------------- drivers/crypto/atmel-i2c.c | 349 ++++++++++++++++++++++++ drivers/crypto/{atmel-ecc.h => atmel-i2c.h} | 80 +++++- 5 files changed, 451 insertions(+), 389 deletions(-) commit 3c756aa346dfac5ae6b7fe81cb1c6380a20b1e41 Author: Ard Biesheuvel Date: Fri May 24 18:26:47 2019 +0200 crypto: atmel-ecc - add support for ACPI probing on non-AT91 platforms The Atmel/Microchip EC508A is a I2C device that could be wired into any platform, and is being used on the Linaro/96boards Secure96 mezzanine adapter. This means it could be found on any platform, even on ones that use ACPI enumeration (via PRP0001 devices). So update the code to enable this use case. This involves tweaking the bus rate discovery code to take ACPI probing into account, which records the maximum bus rate as a property of the slave device. For the atmel-ecc code, this means that the effective bus rate should never exceed the maximum rate, unless we are dealing with buggy firmware. Nonetheless, let's just use the existing plumbing to discover the bus rate and keep the existing logic intact. Signed-off-by: Ard Biesheuvel Reviewed-by: Linus Walleij Signed-off-by: Herbert Xu drivers/crypto/Kconfig | 1 - drivers/crypto/atmel-ecc.c | 13 ++++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) commit 4befedc045367c359de8ba021120fcf3bf797992 Author: Ard Biesheuvel Date: Fri May 24 18:26:46 2019 +0200 i2c: acpi: permit bus speed to be discovered after enumeration Currently, the I2C ACPI enumeration code only permits the max bus rate to be discovered before enumerating the slaves on the bus. In some cases, drivers for slave devices may require this information, e.g., some ATmel crypto drivers need to generate a so-called wake token of a fixed duration, regardless of the bus rate. So tweak the code so i2c_acpi_lookup_speed() is able to obtain this information after enumeration as well. Acked-by: Mika Westerberg Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu drivers/i2c/i2c-core-acpi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 8a82451bd04f57bfde8915f289fc2d1f9457abae Author: Sascha Hauer Date: Thu May 23 10:50:30 2019 +0200 crypto: caam - print messages in caam_dump_sg at debug level caam_dump_sg() is only compiled in when DEBUG is defined, hence the messages are debug messages. Remove the @level argument from caam_dump_sg() and print all messages at debug level. Signed-off-by: Sascha Hauer Signed-off-by: Herbert Xu drivers/crypto/caam/caamalg.c | 8 ++++---- drivers/crypto/caam/caamalg_qi.c | 2 +- drivers/crypto/caam/caamalg_qi2.c | 4 ++-- drivers/crypto/caam/error.c | 8 ++++---- drivers/crypto/caam/error.h | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) commit 6e005503199b9bf1b385949c05897fd6567b5af4 Author: Sascha Hauer Date: Thu May 23 10:50:29 2019 +0200 crypto: caam - print debug messages at debug level The CAAM driver used to put its debug messages inside #ifdef DEBUG and then prints the messages at KERN_ERR level. Replace this with proper functions printing at KERN_DEBUG level. The #ifdef DEBUG gets unnecessary when the right functions are used. This replaces: - print_hex_dump(KERN_ERR ...) inside #ifdef DEBUG with print_hex_dump_debug(...) - dev_err() inside #ifdef DEBUG with dev_dbg() - printk(KERN_ERR ...) inside #ifdef DEBUG with dev_dbg() Some parts of the driver use these functions already, so it is only consequent to use the debug function consistently. Signed-off-by: Sascha Hauer Signed-off-by: Herbert Xu drivers/crypto/caam/caamalg.c | 145 ++++++++++-------------- drivers/crypto/caam/caamalg_desc.c | 116 ++++++++----------- drivers/crypto/caam/caamalg_qi.c | 45 +++----- drivers/crypto/caam/caamhash.c | 225 +++++++++++++++---------------------- drivers/crypto/caam/caamrng.c | 22 ++-- drivers/crypto/caam/key_gen.c | 28 ++--- drivers/crypto/caam/sg_sw_sec4.h | 8 +- 7 files changed, 236 insertions(+), 353 deletions(-) commit 32f75e67f3457479d79bc5c26b0eb4e2bc150cf0 Author: Sascha Hauer Date: Thu May 23 10:50:28 2019 +0200 crypto: caam - remove unused defines The CAAM driver defines its own debug() macro, but it is unused. Remove it. Signed-off-by: Sascha Hauer Reviewed-by: Horia Geantă Signed-off-by: Herbert Xu drivers/crypto/caam/caamalg.c | 7 ------- drivers/crypto/caam/caamhash.c | 8 -------- 2 files changed, 15 deletions(-) commit f6b99b6e18657aa1222b0c51ad20ac674e764281 Author: Sascha Hauer Date: Thu May 23 10:50:27 2019 +0200 crypto: caam - print IV only when non NULL Since eaed71a44ad9 ("crypto: caam - add ecb(*) support") the IV can be NULL, so only dump it when it's non NULL as designated by the ivsize variable. Fixes: eaed71a44ad9 ("crypto: caam - add ecb(*) support") Signed-off-by: Sascha Hauer Signed-off-by: Herbert Xu drivers/crypto/caam/caamalg.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit ff455ad9a7f850daf874114e8d38c04aab9f39a2 Author: Herbert Xu Date: Thu May 23 14:35:30 2019 +0800 crypto: ixp4xx - Fix cross-compile errors due to type mismatch This patch changes multiple uses of u32s to dma_addr_t where the physical address is used. This fixes COMPILE_TEST errors on 64-bit platforms. Signed-off-by: Herbert Xu drivers/crypto/ixp4xx_crypto.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit ff9f902cce5dc59392f5d0f9dc7f9979a565feb1 Author: Christophe Leroy Date: Tue May 21 13:34:22 2019 +0000 crypto: talitos - use SPDX-License-Identifier This patch drops the license text and replaces it with an SPDX-License-Identifier tag. Signed-off-by: Christophe Leroy Signed-off-by: Herbert Xu drivers/crypto/talitos.c | 15 +-------------- drivers/crypto/talitos.h | 25 +------------------------ 2 files changed, 2 insertions(+), 38 deletions(-) commit 89b32dfe008caa9c14ed42cdba656b6d1b753550 Author: Christophe Leroy Date: Tue May 21 13:34:21 2019 +0000 crypto: talitos - use IS_ENABLED() in has_ftr_sec1() This patch rewrites has_ftr_sec1() using IS_ENABLED() instead of #ifdefs Signed-off-by: Christophe Leroy Signed-off-by: Herbert Xu drivers/crypto/talitos.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit fbb8d46e161644a13b81337f1235cd419e046318 Author: Christophe Leroy Date: Tue May 21 13:34:20 2019 +0000 Revert "crypto: talitos - export the talitos_submit function" There is no other file using talitos_submit in the kernel tree, so it doesn't need to be exported nor made global. This reverts commit 865d506155b117edc7e668ced373030ce7108ce9. Signed-off-by: Christophe Leroy Fixes: 865d506155b1 ("crypto: talitos - export the talitos_submit function") Signed-off-by: Herbert Xu drivers/crypto/talitos.c | 11 +++++------ drivers/crypto/talitos.h | 6 ------ 2 files changed, 5 insertions(+), 12 deletions(-) commit e345177ded17611e36c067751d63d64bf106cb54 Author: Christophe Leroy Date: Tue May 21 13:34:19 2019 +0000 crypto: talitos - fix AEAD processing. This driver is working well in 'simple cases', but as soon as more exotic SG lists are provided (dst different from src, auth part not in a single SG fragment, ...) there are wrong results, overruns, etc ... This patch cleans up the AEAD processing by: - Simplifying the location of 'out of line' ICV - Never using 'out of line' ICV on encryp - Always using 'out of line' ICV on decrypt - Forcing the generation of a SG table on decrypt Signed-off-by: Christophe Leroy Fixes: aeb4c132f33d ("crypto: talitos - Convert to new AEAD interface") Signed-off-by: Herbert Xu drivers/crypto/talitos.c | 158 ++++++++++++++++------------------------------- drivers/crypto/talitos.h | 2 +- 2 files changed, 55 insertions(+), 105 deletions(-) commit c9cca7034b34a2d82e9a03b757de2485c294851c Author: Christophe Leroy Date: Tue May 21 13:34:18 2019 +0000 crypto: talitos - Align SEC1 accesses to 32 bits boundaries. The MPC885 reference manual states: SEC Lite-initiated 8xx writes can occur only on 32-bit-word boundaries, but reads can occur on any byte boundary. Writing back a header read from a non-32-bit-word boundary will yield unpredictable results. In order to ensure that, cra_alignmask is set to 3 for SEC1. Signed-off-by: Christophe Leroy Fixes: 9c4a79653b35 ("crypto: talitos - Freescale integrated security engine (SEC) driver") Signed-off-by: Herbert Xu drivers/crypto/talitos.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit eae55a586c3c8b50982bad3c3426e9c9dd7a0075 Author: Christophe Leroy Date: Tue May 21 13:34:17 2019 +0000 crypto: talitos - properly handle split ICV. The driver assumes that the ICV is as a single piece in the last element of the scatterlist. This assumption is wrong. This patch ensures that the ICV is properly handled regardless of the scatterlist layout. Fixes: 9c4a79653b35 ("crypto: talitos - Freescale integrated security engine (SEC) driver") Signed-off-by: Christophe Leroy Signed-off-by: Herbert Xu drivers/crypto/talitos.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) commit 4bbfb839259a9c96a0be872e16f7471b7136aee5 Author: Christophe Leroy Date: Tue May 21 13:34:15 2019 +0000 crypto: talitos - HMAC SNOOP NO AFEU mode requires SW icv checking. In that mode, hardware ICV verification is not supported. Signed-off-by: Christophe Leroy Fixes: 7405c8d7ff97 ("crypto: talitos - templates for AEAD using HMAC_SNOOP_NO_AFEU") Signed-off-by: Herbert Xu drivers/crypto/talitos.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7ede4c36cf7c6516986ee9d75b197c8bf73ea96f Author: Christophe Leroy Date: Tue May 21 13:34:14 2019 +0000 crypto: talitos - Do not modify req->cryptlen on decryption. For decrypt, req->cryptlen includes the size of the authentication part while all functions of the driver expect cryptlen to be the size of the encrypted data. As it is not expected to change req->cryptlen, this patch implements local calculation of cryptlen. Signed-off-by: Christophe Leroy Fixes: 9c4a79653b35 ("crypto: talitos - Freescale integrated security engine (SEC) driver") Signed-off-by: Herbert Xu drivers/crypto/talitos.c | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) commit d84cc9c9524ec5973a337533e6d8ccd3e5f05f2b Author: Christophe Leroy Date: Tue May 21 13:34:13 2019 +0000 crypto: talitos - fix ECB algs ivsize ECB's ivsize must be 0. Signed-off-by: Christophe Leroy Fixes: 5e75ae1b3cef ("crypto: talitos - add new crypto modes") Signed-off-by: Herbert Xu drivers/crypto/talitos.c | 3 --- 1 file changed, 3 deletions(-) commit ee483d32ee1a1a7f7d7e918fbc350c790a5af64a Author: Christophe Leroy Date: Tue May 21 13:34:12 2019 +0000 crypto: talitos - check data blocksize in ablkcipher. When data size is not a multiple of the alg's block size, the SEC generates an error interrupt and dumps the registers. And for NULL size, the SEC does just nothing and the interrupt is awaited forever. This patch ensures the data size is correct before submitting the request to the SEC engine. Signed-off-by: Christophe Leroy Fixes: 4de9d0b547b9 ("crypto: talitos - Add ablkcipher algorithms") Signed-off-by: Herbert Xu drivers/crypto/talitos.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit b9a05b6041cb9810a291315569b2af0d63c3680a Author: Christophe Leroy Date: Tue May 21 13:34:11 2019 +0000 crypto: talitos - fix CTR alg blocksize CTR has a blocksize of 1. Signed-off-by: Christophe Leroy Fixes: 5e75ae1b3cef ("crypto: talitos - add new crypto modes") Signed-off-by: Herbert Xu drivers/crypto/talitos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1ba34e71e9e56ac29a52e0d42b6290f3dc5bfd90 Author: Christophe Leroy Date: Tue May 21 13:34:10 2019 +0000 crypto: talitos - check AES key size Although the HW accepts any size and silently truncates it to the correct length, the extra tests expects EINVAL to be returned when the key size is not valid. Signed-off-by: Christophe Leroy Fixes: 4de9d0b547b9 ("crypto: talitos - Add ablkcipher algorithms") Signed-off-by: Herbert Xu drivers/crypto/talitos.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit b8fbdc2bc4e71b62646031d5df5f08aafe15d5ad Author: Christophe Leroy Date: Tue May 21 13:34:09 2019 +0000 crypto: talitos - reduce max key size for SEC1 SEC1 doesn't support SHA384/512, so it doesn't require longer keys. This patch reduces the max key size when the driver is built for SEC1 only. Signed-off-by: Christophe Leroy Fixes: 03d2c5114c95 ("crypto: talitos - Extend max key length for SHA384/512-HMAC and AEAD") Signed-off-by: Herbert Xu drivers/crypto/talitos.c | 4 ++++ 1 file changed, 4 insertions(+) commit a1a42f84011fae6ff08441a91aefeb7febc984fc Author: Christophe Leroy Date: Tue May 21 13:34:08 2019 +0000 crypto: talitos - rename alternative AEAD algos. The talitos driver has two ways to perform AEAD depending on the HW capability. Some HW support both. It is needed to give them different names to distingish which one it is for instance when a test fails. Signed-off-by: Christophe Leroy Fixes: 7405c8d7ff97 ("crypto: talitos - templates for AEAD using HMAC_SNOOP_NO_AFEU") Cc: stable@vger.kernel.org Signed-off-by: Herbert Xu drivers/crypto/talitos.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 5e99a0a7a9468a18efec66ee97f1e34886e55550 Author: Eric Biggers Date: Mon May 20 09:55:15 2019 -0700 crypto: algapi - remove crypto_tfm_in_queue() Remove the crypto_tfm_in_queue() function, which is unused. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu crypto/algapi.c | 13 ------------- include/crypto/algapi.h | 7 ------- include/crypto/internal/hash.h | 6 ------ 3 files changed, 26 deletions(-) commit 84ede58dfcd1db6f04f71dd3ccd5328271b346da Author: Eric Biggers Date: Mon May 20 09:54:46 2019 -0700 crypto: hash - remove CRYPTO_ALG_TYPE_DIGEST Remove the unnecessary constant CRYPTO_ALG_TYPE_DIGEST, which has the same value as CRYPTO_ALG_TYPE_HASH. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu Documentation/crypto/architecture.rst | 4 +--- crypto/cryptd.c | 2 +- include/linux/crypto.h | 1 - 3 files changed, 2 insertions(+), 5 deletions(-) commit 3e56e168638b3e7147902c3b7257a57ea573a30e Author: Eric Biggers Date: Mon May 20 09:53:58 2019 -0700 crypto: cryptd - move kcrypto_wq into cryptd kcrypto_wq is only used by cryptd, so move it into cryptd.c and change the workqueue name from "crypto" to "cryptd". Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu crypto/Kconfig | 5 ----- crypto/Makefile | 2 -- crypto/cryptd.c | 24 +++++++++++++++----- crypto/crypto_wq.c | 40 ---------------------------------- drivers/crypto/cavium/cpt/cptvf_algs.c | 1 - include/crypto/crypto_wq.h | 8 ------- 6 files changed, 19 insertions(+), 61 deletions(-) commit e590e1321c13ae736bd0e0da48a61a58ef084875 Author: Eric Biggers Date: Mon May 20 09:53:43 2019 -0700 crypto: gf128mul - make unselectable by user There's no reason for users to select CONFIG_CRYPTO_GF128MUL, since it's just some helper functions, and algorithms that need it select it. Remove the prompt string so that it's not shown to users. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu crypto/Kconfig | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 87804144cb7ad09126f1d16e205a7d6b4bc35404 Author: Eric Biggers Date: Mon May 20 09:52:07 2019 -0700 crypto: echainiv - change to 'default n' echainiv is the only algorithm or template in the crypto API that is enabled by default. But there doesn't seem to be a good reason for it. And it pulls in a lot of stuff as dependencies, like AEAD support and a "NIST SP800-90A DRBG" including HMAC-SHA256. The commit which made it default 'm', commit 3491244c6298 ("crypto: echainiv - Set Kconfig default to m"), mentioned that it's needed for IPsec. However, later commit 32b6170ca59c ("ipv4+ipv6: Make INET*_ESP select CRYPTO_ECHAINIV") made the IPsec kconfig options select it. So, remove the 'default m'. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu crypto/Kconfig | 1 - 1 file changed, 1 deletion(-) commit c8a3315a5f691cc4be16421aeb0608495c9a33ba Author: Eric Biggers Date: Mon May 20 09:49:46 2019 -0700 crypto: make all templates select CRYPTO_MANAGER The "cryptomgr" module is required for templates to be used. Many templates select it, but others don't. Make all templates select it. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu crypto/Kconfig | 8 ++++++++ 1 file changed, 8 insertions(+) commit 929d34cac156a55bf9e5a88a1fa5191be1fcdc35 Author: Eric Biggers Date: Mon May 20 09:48:29 2019 -0700 crypto: testmgr - make extra tests depend on cryptomgr The crypto self-tests are part of the "cryptomgr" module, which can technically be disabled (though it rarely is). If you do so, currently you can still enable CRYPTO_MANAGER_EXTRA_TESTS, which doesn't make sense since in that case testmgr.c isn't compiled at all. Fix it by making it CRYPTO_MANAGER_EXTRA_TESTS depend on CRYPTO_MANAGER2, like CRYPTO_MANAGER_DISABLE_TESTS already does. Fixes: 5b2706a4d459 ("crypto: testmgr - introduce CONFIG_CRYPTO_MANAGER_EXTRA_TESTS") Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu crypto/Kconfig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e944eab37a72bf171647d691dda4614f7151191f Author: Eric Biggers Date: Mon May 20 09:47:19 2019 -0700 crypto: testmgr - fix length truncation with large page size On PowerPC with CONFIG_CRYPTO_MANAGER_EXTRA_TESTS=y, there is sometimes a crash in generate_random_aead_testvec(). The problem is that the generated test vectors use data lengths of up to about 2 * PAGE_SIZE, which is 128 KiB on PowerPC; however, the data length fields in the test vectors are 'unsigned short', so the lengths get truncated. Fix this by changing the relevant fields to 'unsigned int'. Fixes: 40153b10d91c ("crypto: testmgr - fuzz AEADs against their generic implementation") Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu crypto/testmgr.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 2621a8699e81c0a4f17d7b98ef22f1f89975a7b5 Author: Eric Biggers Date: Mon May 20 09:44:48 2019 -0700 crypto: vmx - convert to skcipher API Convert the VMX implementations of AES-CBC, AES-CTR, and AES-XTS from the deprecated "blkcipher" API to the "skcipher" API. As part of this, I moved the skcipher_request for the fallback algorithm off the stack and into the request context of the parent algorithm. I tested this in a PowerPC VM with CONFIG_CRYPTO_MANAGER_EXTRA_TESTS=y. Signed-off-by: Eric Biggers Tested-by: Michael Ellerman Signed-off-by: Herbert Xu drivers/crypto/vmx/aes_cbc.c | 183 +++++++++++++++-------------------------- drivers/crypto/vmx/aes_ctr.c | 165 ++++++++++++++++--------------------- drivers/crypto/vmx/aes_xts.c | 175 +++++++++++++++++---------------------- drivers/crypto/vmx/aesp8-ppc.h | 2 - drivers/crypto/vmx/vmx.c | 72 ++++++++-------- 5 files changed, 252 insertions(+), 345 deletions(-) commit 1fa0a7dcf7599f318e10e42ae66a0fe670fdc7bd Author: Eric Biggers Date: Mon May 20 09:42:32 2019 -0700 crypto: vmx - convert to SPDX license identifiers Remove the boilerplate license text and replace it with the equivalent SPDX license identifier. Signed-off-by: Eric Biggers Reviewed-by: Michael Ellerman Signed-off-by: Herbert Xu drivers/crypto/vmx/aes.c | 14 +------------- drivers/crypto/vmx/aes_cbc.c | 14 +------------- drivers/crypto/vmx/aes_ctr.c | 14 +------------- drivers/crypto/vmx/aes_xts.c | 14 +------------- drivers/crypto/vmx/vmx.c | 14 +------------- 5 files changed, 5 insertions(+), 65 deletions(-) commit 1a9e93722967cb3a6b3834973cbca91f38ba791e Author: Neil Armstrong Date: Mon May 20 15:59:19 2019 +0200 hwrng: meson - update with SPDX Licence identifier Signed-off-by: Neil Armstrong Signed-off-by: Herbert Xu drivers/char/hw_random/meson-rng.c | 52 +------------------------------------- 1 file changed, 1 insertion(+), 51 deletions(-) commit 092a33d403120594e71dbcba4d72d99de7bb897a Author: Bruce Allan Date: Tue Apr 16 10:34:54 2019 -0700 ice: Cleanup ice_update_link_info Do not allocate memory for the Get PHY Abilities command data buffer when it is not necessary, change one local variable to another to reduce the number of de-references, reduce the scope of some local variables, and reorder the code and change exit points to get rid of an unnecessary goto label. Signed-off-by: Bruce Allan Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice_common.c | 35 +++++++++++++++-------------- 1 file changed, 18 insertions(+), 17 deletions(-) commit d31530e83e6325fa05b9f12f58df32826444e843 Author: Akeem G Abodunrin Date: Tue Apr 16 10:34:53 2019 -0700 ice: Use right type for ice_cfg_vsi_lan return ice_cfg_vsi_lan returns a value of type enum ice_status. So use a local of the same type to capture the return value. Signed-off-by: Akeem G Abodunrin Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice_lib.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit f776b3acb047e8f9a347001ae65b679c47437751 Author: Paul Greenwalt Date: Tue Apr 16 10:34:52 2019 -0700 ice: Add support for Forward Error Correction (FEC) This patch adds driver support for Forward Error Correction (FEC) and ethtool handlers to set/get FEC params. Signed-off-by: Paul Greenwalt Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice_adminq_cmd.h | 4 + drivers/net/ethernet/intel/ice/ice_common.c | 70 ++++++++ drivers/net/ethernet/intel/ice/ice_common.h | 6 +- drivers/net/ethernet/intel/ice/ice_ethtool.c | 216 ++++++++++++++++++++++++ drivers/net/ethernet/intel/ice/ice_main.c | 47 +++++- drivers/net/ethernet/intel/ice/ice_type.h | 9 + 6 files changed, 349 insertions(+), 3 deletions(-) commit 047e52c0e8ae5066f3f84fd93371b2bfa3d4c30b Author: Anirudh Venkataramanan Date: Tue Apr 16 10:34:51 2019 -0700 ice: Add support for virtchnl_vector_map.[rxq|txq]_map Add support for virtchnl_vector_map.[rxq|txq]_map to use bitmap to associate indicated queues with the specified vector. This support is needed since the Windows AVF driver calls VIRTCHNL_OP_CONFIG_IRQ_MAP for each vector and used the bitmap to indicate the associated queues. Updated ice_vc_dis_qs_msg to not subtract one from virtchnl_irq_map_info.num_vectors, and changed the VSI vector index to the vector id. This change supports the Windows AVF driver which maps one vector at a time and sets num_vectors to one. Using vectors_id to index the vector array . Add check for vector_id zero, and return VIRTCHNL_STATUS_ERR_PARAM if vector_id is zero and there are rings associated with that vector. Vector_id zero is for the OICR. Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice_lib.c | 108 +++++++++++++++-------- drivers/net/ethernet/intel/ice/ice_lib.h | 8 ++ drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c | 43 +++++++-- 3 files changed, 115 insertions(+), 44 deletions(-) commit 561f4379019f5a3ead431d0a60e70f71aa081902 Author: Tony Nguyen Date: Tue Apr 16 10:34:50 2019 -0700 ice: Introduce ice_init_mac_fltr and move ice_napi_del Consolidate adding unicast and broadcast MAC filters in a single new function ice_init_mac_fltr. Move ice_napi_del to ice_lib.c Signed-off-by: Tony Nguyen Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice_lib.c | 15 +++++ drivers/net/ethernet/intel/ice/ice_lib.h | 2 + drivers/net/ethernet/intel/ice/ice_main.c | 106 +++++++++++++++++------------- 3 files changed, 79 insertions(+), 44 deletions(-) commit 72ecb896e465c383850231e94fbc3ee726b63af8 Author: Brett Creeley Date: Tue Apr 16 10:30:52 2019 -0700 ice: Use GLINT_DYN_CTL to disable VF's interrupts Currently in ice_free_vf_res() we are writing to the VFINT_DYN_CTLN register in the PF's function space to disable all VF's interrupts. This is incorrect because this register is only for use in the VF's function space. This becomes obvious when seeing that the valid indices used for the VFINT_DYN_CTLN register is from 0-63, which is the maximum number of interrupts for a VF (not including the OICR interrupt). Fix this by writing to the GLINT_DYN_CTL register for each VF. We can do this because we keep track of each VF's first_vector_idx inside of the PF's function space and the number of interrupts given to each VF. Also in ice_free_vfs() we were disabling Rx/Tx queues after calling pci_disable_sriov(). One part of disabling the Tx queues causes the PF driver to trigger a software interrupt, which causes the VF's napi routine to run. This doesn't currently work because pci_disable_sriov() causes iavf_remove() to be called which disables interrupts. Fix this by disabling Rx/Tx queues prior to pci_disable_sriov(). Signed-off-by: Brett Creeley Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c | 41 ++++++++---------------- 1 file changed, 13 insertions(+), 28 deletions(-) commit 517f4c49aafce3d2c3ac54ae0bb36f2c76e57fe8 Author: Marek Vasut Date: Tue May 28 20:15:41 2019 +0200 net: phy: tja11xx: Switch to HWMON_CHANNEL_INFO() The HWMON_CHANNEL_INFO macro simplifies the code, reduces the likelihood of errors, and makes the code easier to read. Signed-off-by: Marek Vasut Cc: Andrew Lunn Cc: Florian Fainelli Cc: Guenter Roeck Cc: Heiner Kallweit Cc: Jean Delvare Cc: linux-hwmon@vger.kernel.org Reviewed-by: Guenter Roeck Signed-off-by: David S. Miller drivers/net/phy/nxp-tja11xx.c | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) commit 02caceded0691a31a21b62011da8dae0d3aec85b Author: Ivan Khoronzhuk Date: Tue May 28 20:45:19 2019 +0300 net: ethernet: ti: cpsw: correct .ndo_open error path It's found while review and probably never happens, but real number of queues is set per device, and error path should be per device. So split error path based on usage_count. Signed-off-by: Ivan Khoronzhuk Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 6faaffb3b1ce0b136ad217e941f8d436794d24f9 Merge: 24ec483cec98 af7cd0366ee9 Author: David S. Miller Date: Wed May 29 21:48:54 2019 -0700 Merge branch 'Decoupling-PHYLINK-from-struct-net_device' Ioana Ciornei says: ==================== Decoupling PHYLINK from struct net_device Following two separate discussion threads in: https://www.spinics.net/lists/netdev/msg569087.html and: https://www.spinics.net/lists/netdev/msg570450.html Previous RFC patch set: https://www.spinics.net/lists/netdev/msg571995.html PHYLINK was reworked in order to accept multiple operation types, PHYLINK_NETDEV and PHYLINK_DEV, passed through a phylink_config structure alongside the corresponding struct device. One of the main concerns expressed in the RFC was that using notifiers to signal the corresponding phylink_mac_ops would break PHYLINK's API unity and that it would become harder to grep for its users. Using the current approach, we maintain a common API for all users. Also, printing useful information in PHYLINK, when decoupled from a net_device, is achieved using dev_err&co on the struct device received (in DSA's case is the device corresponding to the dsa_switch). PHYLIB (which PHYLINK uses) was reworked to the extent that it does not crash when connecting to a PHY and the net_device pointer is NULL. Lastly, DSA has been reworked in its way that it handles PHYs for ports that lack a net_device (CPU and DSA ports). For these, it was previously using PHYLIB and is now using the PHYLINK_DEV operation type. Previously, a driver that wanted to support PHY operations on CPU/DSA ports has to implement .adjust_link(). This patch set not only gives drivers the options to use PHYLINK uniformly but also urges them to convert to it. For compatibility, the old code is kept but it will be removed once all drivers switch over. The patchset was tested on the NXP LS1021A-TSN board having the following Ethernet layout: https://lkml.org/lkml/2019/5/5/279 The CPU port was moved from the internal RGMII fixed-link (enet2 -> switch port 4) to an external loopback Cat5 cable between the enet1 port and the front-facing swp2 SJA1105 port. In this mode, both the master and the CPU port have an attached PHY which detects link change events: [ 49.105426] fsl-gianfar soc:ethernet@2d50000 eth1: Link is Down [ 50.305486] sja1105 spi0.1: Link is Down [ 53.265596] fsl-gianfar soc:ethernet@2d50000 eth1: Link is Up - 1Gbps/Full - flow control off [ 54.466304] sja1105 spi0.1: Link is Up - 1Gbps/Full - flow control off Changes in v2: - fixed sparse warnings - updated 'Documentation/ABI/testing/sysfs-class-net-phydev' ==================== Signed-off-by: David S. Miller commit af7cd0366ee994e8b35985d407261dc0ed9dfb4d Author: Vladimir Oltean Date: Tue May 28 20:38:17 2019 +0300 net: dsa: sja1105: Fix broken fixed-link interfaces on user ports PHYLIB and PHYLINK handle fixed-link interfaces differently. PHYLIB wraps them in a software PHY ("pseudo fixed link") phydev construct such that .adjust_link driver callbacks see an unified API. Whereas PHYLINK simply creates a phylink_link_state structure and passes it to .mac_config. At the time the driver was introduced, DSA was using PHYLIB for the CPU/cascade ports (the ones with no net devices) and PHYLINK for everything else. As explained below: commit aab9c4067d2389d0adfc9c53806437df7b0fe3d5 Author: Florian Fainelli Date: Thu May 10 13:17:36 2018 -0700 net: dsa: Plug in PHYLINK support Drivers that utilize fixed links for user-facing ports (e.g: bcm_sf2) will need to implement phylink_mac_ops from now on to preserve functionality, since PHYLINK *does not* create a phy_device instance for fixed links. In the above patch, DSA guards the .phylink_mac_config callback against a NULL phydev pointer. Therefore, .adjust_link is not called in case of a fixed-link user port. This patch fixes the situation by converting the driver from using .adjust_link to .phylink_mac_config. This can be done now in a unified fashion for both slave and CPU/cascade ports because DSA now uses PHYLINK for all ports. Signed-off-by: Vladimir Oltean Signed-off-by: Ioana Ciornei Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/sja1105/sja1105_main.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 0e27921816ad99f78140e0c61ddf2bc515cc7e22 Author: Ioana Ciornei Date: Tue May 28 20:38:16 2019 +0300 net: dsa: Use PHYLINK for the CPU/DSA ports For DSA switches that do not have an .adjust_link callback, aka those who transitioned totally to the PHYLINK-compliant API, use PHYLINK to drive the CPU/DSA ports. The PHYLIB usage and .adjust_link are kept but deprecated, and users are asked to transition from it. The reason why we can't do anything for them is because PHYLINK does not wrap the fixed-link state behind a phydev object, so we cannot wrap .phylink_mac_config into .adjust_link unless we fabricate a phy_device structure. For these ports, the newly introduced PHYLINK_DEV operation type is used and the dsa_switch device structure is passed to PHYLINK for printing purposes. The handling of the PHYLINK_NETDEV and PHYLINK_DEV PHYLINK instances is common from the perspective of the driver. Signed-off-by: Ioana Ciornei Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/port.c | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 63 insertions(+), 6 deletions(-) commit 77373d49de22e836cf58ddbe7689d6b4b5046539 Author: Ioana Ciornei Date: Tue May 28 20:38:15 2019 +0300 net: dsa: Move the phylink driver calls into port.c In order to have a common handling of PHYLINK for the slave and non-user ports, the DSA core glue logic (between PHYLINK and the driver) must use an API that does not rely on a struct net_device. These will also be called by the CPU-port-handling code in a further patch. Signed-off-by: Ioana Ciornei Suggested-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/dsa_priv.h | 17 +++++++++ net/dsa/port.c | 100 +++++++++++++++++++++++++++++++++++++++++++++++++++++ net/dsa/slave.c | 96 +------------------------------------------------- 3 files changed, 118 insertions(+), 95 deletions(-) commit 17091180b1521ee9b4455d75ab61b35bc0b216ff Author: Ioana Ciornei Date: Tue May 28 20:38:14 2019 +0300 net: phylink: Add phylink_{printk, err, warn, info, dbg} macros With the latest addition to the PHYLINK infrastructure, we are faced with a decision on when to print necessary info using the struct net_device and when with the struct device. Add a series of macros that encapsulate this decision and replace all uses of netdev_err&co with phylink_err. Signed-off-by: Ioana Ciornei Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/phylink.c | 137 ++++++++++++++++++++++++++-------------------- 1 file changed, 77 insertions(+), 60 deletions(-) commit 43de61959b999279bafb031c0c9bdf0f6cd1c501 Author: Ioana Ciornei Date: Tue May 28 20:38:13 2019 +0300 net: phylink: Add PHYLINK_DEV operation type In the PHYLINK_DEV operation type, the PHYLINK infrastructure can work without an attached net_device. For printing usecases, instead, a struct device * should be passed to PHYLINK using the phylink_config structure. Also, netif_carrier_* calls ar guarded by the presence of a valid net_device. When using the PHYLINK_DEV operation type, we cannot check link status using the netif_carrier_ok() API so instead, keep an internal state of the MAC and call mac_link_{down,up} only when the link changed. Signed-off-by: Ioana Ciornei Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/phylink.c | 25 ++++++++++++++++++++----- include/linux/phylink.h | 1 + 2 files changed, 21 insertions(+), 5 deletions(-) commit 44cc27e43fa3b8977373915a8e7f515a9d263343 Author: Ioana Ciornei Date: Tue May 28 20:38:12 2019 +0300 net: phylink: Add struct phylink_config to PHYLINK API The phylink_config structure will encapsulate a pointer to a struct device and the operation type requested for this instance of PHYLINK. This patch does not make any functional changes, it just transitions the PHYLINK internals and all its users to the new API. A pointer to a phylink_config structure will be passed to phylink_create() instead of the net_device directly. Also, the same phylink_config pointer will be passed back to all phylink_mac_ops callbacks instead of the net_device. Using this mechanism, a PHYLINK user can get the original net_device using a structure such as 'to_net_dev(config->dev)' or directly the structure containing the phylink_config using a container_of call. At the moment, only the PHYLINK_NETDEV is defined as a valid operation type for PHYLINK. In this mode, a valid reference to a struct device linked to the original net_device should be passed to PHYLINK through the phylink_config structure. This API changes is mainly driven by the necessity of adding a new operation type in PHYLINK that disconnects the phy_device from the net_device and also works when the net_device is lacking. Signed-off-by: Ioana Ciornei Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Reviewed-by: Maxime Chevallier Tested-by: Maxime Chevallier Signed-off-by: David S. Miller Documentation/networking/sfp-phylink.rst | 5 ++- drivers/net/ethernet/marvell/mvneta.c | 36 ++++++++++------ drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 1 + drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 43 +++++++++++-------- drivers/net/phy/phylink.c | 26 ++++++++---- include/linux/phylink.h | 56 ++++++++++++++++--------- include/net/dsa.h | 2 + net/dsa/slave.c | 31 ++++++++------ 8 files changed, 128 insertions(+), 72 deletions(-) commit 27755ff88c0ecbca46bbba1202766c0ce54a3af2 Author: Ioana Ciornei Date: Tue May 28 20:38:11 2019 +0300 net: phylink: Add phylink_mac_link_{up, down} wrapper functions This is a cosmetic patch that reduces the clutter in phylink_resolve around calling the .mac_link_up/.mac_link_down driver callbacks. In a further patch this logic will be extended to emit notifications in case a net device does not exist. Signed-off-by: Ioana Ciornei Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/phylink.c | 50 ++++++++++++++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 18 deletions(-) commit c920f745f45d4610e08943690301b8055fb5e834 Author: Ioana Ciornei Date: Tue May 28 20:38:10 2019 +0300 net: phy: Add phy_standalone sysfs entry Export a phy_standalone device attribute that is meant to give the indication that this PHY lacks an attached_dev and its corresponding sysfs link. The attribute will be created only when the phy_attach_direct() function will be called with a NULL net_device. Signed-off-by: Ioana Ciornei Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller Documentation/ABI/testing/sysfs-class-net-phydev | 8 ++++++++ drivers/net/phy/phy_device.c | 22 ++++++++++++++++++++++ 2 files changed, 30 insertions(+) commit 82c76aca81187b3d28a6fb3062f6916450ce955e Author: Ioana Ciornei Date: Tue May 28 20:38:09 2019 +0300 net: phy: Check against net_device being NULL In general, we don't want MAC drivers calling phy_attach_direct with the net_device being NULL. Add checks against this in all the functions calling it: phy_attach() and phy_connect_direct(). Signed-off-by: Ioana Ciornei Suggested-by: Andrew Lunn Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/phy_device.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 2db2d9d1ac37222cd9cd9b59bfd7f9cea3bd2457 Author: Ioana Ciornei Date: Tue May 28 20:38:08 2019 +0300 net: phy: Guard against the presence of a netdev A prerequisite for PHYLIB to work in the absence of a struct net_device is to not access pointers to it. Changes are needed in the following areas: - Printing: In some places netdev_err was replaced with phydev_err. - Incrementing reference count to the parent MDIO bus driver: If there is no net device, then the reference count should definitely be incremented since there is no chance that it was an Ethernet driver who registered the MDIO bus. - Sysfs links are not created in case there is no attached_dev. - No netif_carrier_off is done if there is no attached_dev. Signed-off-by: Ioana Ciornei Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/phy_device.c | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) commit 53cfca2d6b934b456f89ce2ecfdf0b08593384f1 Author: Vladimir Oltean Date: Tue May 28 20:38:07 2019 +0300 net: phy: Add phy_sysfs_create_links helper function This is a cosmetic patch that wraps the operation of creating sysfs links between the netdev->phydev and the phydev->attached_dev. This is needed to keep the indentation level in check in a follow-up patch where this function will be guarded against the existence of a phydev->attached_dev. Signed-off-by: Vladimir Oltean Signed-off-by: Ioana Ciornei Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/phy_device.c | 43 ++++++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 17 deletions(-) commit 24ec483cec981618f8a4782a36d1e3f319d42cad Author: Kevin 'ldir' Darbyshire-Bryant Date: Tue May 28 17:03:50 2019 +0000 net: sched: Introduce act_ctinfo action ctinfo is a new tc filter action module. It is designed to restore information contained in firewall conntrack marks to other packet fields and is typically used on packet ingress paths. At present it has two independent sub-functions or operating modes, DSCP restoration mode & skb mark restoration mode. The DSCP restore mode: This mode copies DSCP values that have been placed in the firewall conntrack mark back into the IPv4/v6 diffserv fields of relevant packets. The DSCP restoration is intended for use and has been found useful for restoring ingress classifications based on egress classifications across links that bleach or otherwise change DSCP, typically home ISP Internet links. Restoring DSCP on ingress on the WAN link allows qdiscs such as but by no means limited to CAKE to shape inbound packets according to policies that are easier to set & mark on egress. Ingress classification is traditionally a challenging task since iptables rules haven't yet run and tc filter/eBPF programs are pre-NAT lookups, hence are unable to see internal IPv4 addresses as used on the typical home masquerading gateway. Thus marking the connection in some manner on egress for later restoration of classification on ingress is easier to implement. Parameters related to DSCP restore mode: dscpmask - a 32 bit mask of 6 contiguous bits and indicate bits of the conntrack mark field contain the DSCP value to be restored. statemask - a 32 bit mask of (usually) 1 bit length, outside the area specified by dscpmask. This represents a conditional operation flag whereby the DSCP is only restored if the flag is set. This is useful to implement a 'one shot' iptables based classification where the 'complicated' iptables rules are only run once to classify the connection on initial (egress) packet and subsequent packets are all marked/restored with the same DSCP. A mask of zero disables the conditional behaviour ie. the conntrack mark DSCP bits are always restored to the ip diffserv field (assuming the conntrack entry is found & the skb is an ipv4/ipv6 type) e.g. dscpmask 0xfc000000 statemask 0x01000000 |----0xFC----conntrack mark----000000---| | Bits 31-26 | bit 25 | bit24 |~~~ Bit 0| | DSCP | unused | flag |unused | |-----------------------0x01---000000---| | | | | ---| Conditional flag v only restore if set |-ip diffserv-| | 6 bits | |-------------| The skb mark restore mode (cpmark): This mode copies the firewall conntrack mark to the skb's mark field. It is completely the functional equivalent of the existing act_connmark action with the additional feature of being able to apply a mask to the restored value. Parameters related to skb mark restore mode: mask - a 32 bit mask applied to the firewall conntrack mark to mask out bits unwanted for restoration. This can be useful where the conntrack mark is being used for different purposes by different applications. If not specified and by default the whole mark field is copied (i.e. default mask of 0xffffffff) e.g. mask 0x00ffffff to mask out the top 8 bits being used by the aforementioned DSCP restore mode. |----0x00----conntrack mark----ffffff---| | Bits 31-24 | | | DSCP & flag| some value here | |---------------------------------------| | | v |------------skb mark-------------------| | | | | zeroed | | |---------------------------------------| Overall parameters: zone - conntrack zone control - action related control (reclassify | pipe | drop | continue | ok | goto chain ) Signed-off-by: Kevin Darbyshire-Bryant Reviewed-by: Toke Høiland-Jørgensen Acked-by: Cong Wang Signed-off-by: David S. Miller include/net/tc_act/tc_ctinfo.h | 28 +++ include/uapi/linux/pkt_cls.h | 1 + include/uapi/linux/tc_act/tc_ctinfo.h | 34 +++ net/sched/Kconfig | 17 ++ net/sched/Makefile | 1 + net/sched/act_ctinfo.c | 396 ++++++++++++++++++++++++++++++ tools/testing/selftests/tc-testing/config | 1 + 7 files changed, 478 insertions(+) commit a6851c613fd7fccc5d1f28d5d8a0cbe9b0f4e8cc Author: Heiner Kallweit Date: Tue May 28 18:43:46 2019 +0200 r8169: remove 1000/Half from supported modes MAC on the GBit versions supports 1000/Full only, however the PHY partially claims to support 1000/Half. So let's explicitly remove this mode. Signed-off-by: Heiner Kallweit Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 2c1d029a017f23e912f5d549ad8a2d84428a5017 Author: Joergen Andreasen Date: Tue May 28 14:49:17 2019 +0200 net: mscc: ocelot: Implement port policers via tc command Hardware offload of matchall classifier and police action are now supported via the tc command. Supported police parameters are: rate and burst. Example: Add: tc qdisc add dev eth3 handle ffff: ingress tc filter add dev eth3 parent ffff: prio 1 handle 2 \ matchall skip_sw \ action police rate 100Mbit burst 10000 Show: tc -s -d qdisc show dev eth3 tc -s -d filter show dev eth3 ingress Delete: tc filter del dev eth3 parent ffff: prio 1 tc qdisc del dev eth3 handle ffff: ingress Signed-off-by: Joergen Andreasen Signed-off-by: David S. Miller drivers/net/ethernet/mscc/Makefile | 2 +- drivers/net/ethernet/mscc/ocelot.c | 13 +- drivers/net/ethernet/mscc/ocelot.h | 3 + drivers/net/ethernet/mscc/ocelot_police.c | 227 ++++++++++++++++++++++++++++++ drivers/net/ethernet/mscc/ocelot_police.h | 22 +++ drivers/net/ethernet/mscc/ocelot_tc.c | 174 +++++++++++++++++++++++ drivers/net/ethernet/mscc/ocelot_tc.h | 22 +++ 7 files changed, 460 insertions(+), 3 deletions(-) commit 980ef4d22a95a3cd84a9b8ffaa7b81b391d173c6 Author: Mimi Zohar Date: Wed Apr 24 13:05:46 2019 -0400 x86/ima: check EFI SetupMode too Checking "SecureBoot" mode is not sufficient, also check "SetupMode". Fixes: 399574c64eaf ("x86/ima: retry detecting secure boot mode") Reported-by: Matthew Garrett Signed-off-by: Mimi Zohar arch/x86/kernel/ima_arch.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 02e03c897a96d42c3cb6c31bce8ba635ef19a55c Author: Sibi Sankar Date: Mon May 13 15:50:14 2019 +0530 soc: qcom: rpmpd: Add MSM8998 power-domains Add the shared cx/mx and sensor sub-system's cx and mx power-domains found on MSM8998. Reviewed-by: Jeffrey Hugo Reviewed-by: Vinod Koul Signed-off-by: Sibi Sankar Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross drivers/soc/qcom/rpmpd.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit dec9a05a147e4988e1f743c0d0a1389a0552e322 Author: Sibi Sankar Date: Mon May 13 15:50:13 2019 +0530 dt-bindings: power: Add rpm power domain bindings for msm8998 Add RPM power domain bindings for the msm8998 family of SoC Reviewed-by: Rob Herring Reviewed-by: Jeffrey Hugo Reviewed-by: Vinod Koul Signed-off-by: Sibi Sankar Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross Documentation/devicetree/bindings/power/qcom,rpmpd.txt | 1 + include/dt-bindings/power/qcom-rpmpd.h | 12 ++++++++++++ 2 files changed, 13 insertions(+) commit 7dbed2a7462efc53f1791c3acd31f23bbb77b6e7 Author: Bjorn Andersson Date: Mon May 13 15:50:11 2019 +0530 soc: qcom: rpmpd: Add QCS404 power-domains Add the shared cx/mx and the low-power-island's cx and mx power-domains found on QCS404. Reviewed-by: Jeffrey Hugo Reviewed-by: Vinod Koul Signed-off-by: Bjorn Andersson [sibi: Fixup corner/vfc with vlfl/vfl] Signed-off-by: Sibi Sankar Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross drivers/soc/qcom/rpmpd.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) commit 0cb93b1503c19f19966402c3ed841626ac9db266 Author: Bjorn Andersson Date: Mon May 13 15:50:10 2019 +0530 dt-bindings: power: Add rpm power domain bindings for qcs404 Add RPM power domain bindings for the qcs404 family of SoC Reviewed-by: Rob Herring Reviewed-by: Jeffrey Hugo Reviewed-by: Vinod Koul Signed-off-by: Bjorn Andersson [sibis: Add supported rpmpd states for qcs404] Signed-off-by: Sibi Sankar Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross .../devicetree/bindings/power/qcom,rpmpd.txt | 1 + include/dt-bindings/power/qcom-rpmpd.h | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) commit 1f010d1efdf6ffa13b5dfa9ac4257bc4c3112105 Author: Bjorn Andersson Date: Mon May 13 15:50:09 2019 +0530 soc: qcom: rpmpd: Modify corner defining macros QCS404 uses individual resource type magic for each power-domain, so adjust the macros slightly to make them reusable for this. Reviewed-by: Jeffrey Hugo Reviewed-by: Vinod Koul Signed-off-by: Bjorn Andersson [sibi: Extend rpmpd corner pair to a generic rpmpd pair] Signed-off-by: Sibi Sankar Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross drivers/soc/qcom/rpmpd.c | 38 +++++++++++++++++--------------------- 1 file changed, 17 insertions(+), 21 deletions(-) commit fe546c54423f1294f247fb3502748186d685e78c Author: Sibi Sankar Date: Mon May 13 15:50:08 2019 +0530 soc: qcom: rpmpd: Add support to set rpmpd state to max rpmpd max state varies across SoCs and SoC families, add support in the driver to make it SoC/SoC family specific Reviewed-by: Jeffrey Hugo Reviewed-by: Vinod Koul Signed-off-by: Sibi Sankar Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross drivers/soc/qcom/rpmpd.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 8b3344422f097debe52296b87a39707d56ca3abe Author: Sibi Sankar Date: Mon May 13 15:50:07 2019 +0530 soc: qcom: rpmpd: fixup rpmpd set performance state Remoteproc q6v5-mss calls set_performance_state with INT_MAX on rpmpd. This is currently ignored since it is greater than the max supported state. Fixup rpmpd state to max if the required state is greater than all the supported states. Fixes: 075d3db8d10d ("soc: qcom: rpmpd: Add support for get/set performance state") Reviewed-by: Marc Gonzalez Reviewed-by: Vinod Koul Reviewed-by: Jeffrey Hugo Signed-off-by: Sibi Sankar Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross drivers/soc/qcom/rpmpd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b157d73ed0af6f901a59e25e095b46a7cb8bd397 Author: Vinod Koul Date: Tue Mar 26 10:51:39 2019 +0530 MAINTAINER: Fix Qualcomm ETHQOS ethernet DT file Commit 83c177aea4c3: ("MAINTAINER: Add entry for Qualcomm ETHQOS ethernet driver") added incorrect filename for DT binding, fix the same. Fixes: 83c177aea4c3 ("MAINTAINER: Add entry for Qualcomm ETHQOS ethernet driver") Reported-By: Joe Perches Reviewed-by: Amit Kucheria Reviewed-by: Mukesh Ojha Signed-off-by: Vinod Koul Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f82682f4043f7de8af0bfe74dcf434b3f890669b Author: Amit Kucheria Date: Fri Mar 29 14:17:59 2019 +0530 MAINTAINERS: fix typo in file name Commit e31f941cf977 ("MAINTAINERS: update list of qcom drivers") had a typo in the filename, replace the underscore with dash. Fixes: e31f941cf977 ("MAINTAINERS: update list of qcom drivers") Reported-by: Joe Perches Signed-off-by: Amit Kucheria Reviewed-by: Vinod Koul Reviewed-by: Mukesh Ojha Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 460f13cab09813ea32d190c903fb439e155c32e2 Author: Sibi Sankar Date: Mon May 13 15:50:15 2019 +0530 arm64: dts: qcom: msm8998: Add rpmpd node Add the rpmpd node on the msm8998 and define the available levels. Reviewed-by: Jeffrey Hugo Reviewed-by: Vinod Koul Signed-off-by: Sibi Sankar [bjorn: dropped use of level defines, to allow merging in parallel] Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/msm8998.dtsi | 51 +++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit 11f61210d7ca0140919a8b36176f51e748b3ea19 Author: Bjorn Andersson Date: Mon May 13 15:50:12 2019 +0530 arm64: dts: qcom: qcs404: Add rpmpd node Add the rpmpd node on the qcs404 and define the available levels. Reviewed-by: Jeffrey Hugo Reviewed-by: Vinod Koul Signed-off-by: Bjorn Andersson [sibis: fixup available levels] Signed-off-by: Sibi Sankar [bjorn: dropped use of level defines, to allow merging in parallel] Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/qcs404.dtsi | 55 ++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) commit 67779ca2ed23c48b85683c75e94b5d75139f5b9d Author: Bjorn Andersson Date: Thu May 9 21:34:19 2019 -0700 arm64: dts: qcom: qcs404: Move lpass and q6 into soc Although we don't describe lpass and wcss with all the details needed to control them in a Trustzone-less environment, move them under soc in order to tidy up the structure and prepare for describing them fully. Reviewed-by: Vinod Koul Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/qcs404.dtsi | 126 ++++++++++++++++++----------------- 1 file changed, 64 insertions(+), 62 deletions(-) commit f4dd04a836c79a9e7d78272ff3a1d474707acde0 Author: Bjorn Andersson Date: Thu May 9 21:34:18 2019 -0700 arm64: dts: qcom: qcs404: Fully describe the CDSP Add all the properties needed to describe the CDSP for both the Trustzone and non-Trustzone based remoteproc case, allowing any child devices to be described once by just overriding the compatible to match the firmware available on the board. Reviewed-by: Vinod Koul Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/qcs404.dtsi | 82 ++++++++++++++++++++++-------------- 1 file changed, 51 insertions(+), 31 deletions(-) commit 560ad5e7e1b5d03052ba402a66667fd7d879d10b Author: Bjorn Andersson Date: Thu May 9 21:34:17 2019 -0700 arm64: dts: qcom: qcs404: Add TCSR node The bus halt registers in TCSR are referenced as a syscon device, add these so that we can reference them from the remoteproc nodes. Reviewed-by: Vinod Koul Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/qcs404.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit 644875660cd26bdb85dd60575fb6731972071243 Author: Bjorn Andersson Date: Thu May 9 21:34:16 2019 -0700 arm64: dts: qcom: qcs404-evb: Mark CDSP clocks protected With the Trustzone based CDSP remoteproc driver these clocks are controlled elsewhere and as they are not enabled by anything in Linux the clock framework will turn them off during lateinit. This results in issues either to later start the CDSP, using the Trustzone interface, or if the CDSP is already running it will crash. Reviewed-by: Vinod Koul Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/qcs404-evb.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit 9bbd0836c34fff3193000183d2bc13292d94264c Author: Raju P.L.S.S.S.N Date: Tue May 21 15:05:18 2019 +0530 arm64: dts: qcom: sdm845: Add PSCI cpuidle low power states Add device bindings for cpuidle states for cpu devices. Cc: Acked-by: Daniel Lezcano Reviewed-by: Evan Green Signed-off-by: Raju P.L.S.S.S.N [amit: rename the idle-states to more generic names and fixups] Signed-off-by: Amit Kucheria Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/sdm845.dtsi | 78 ++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) commit 2aefca8017fafa7852db8962273be28d90dec009 Author: Amit Kucheria Date: Tue May 21 15:05:19 2019 +0530 arm64: dts: msm8996: Add proper capacity scaling for the cpus msm8996 features 4 cpus - 2 in each cluster. However, all cpus implement the same microarchitecture and the two clusters only differ in the maximum frequency attainable by the CPUs. Add capacity-dmips-mhz property to allow the topology code to determine the actual capacity by taking into account the highest frequency for each CPU. Acked-by: Daniel Lezcano Suggested-by: Daniel Lezcano Signed-off-by: Amit Kucheria Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/msm8996.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit f6aee7af59b62a6f8a75ef57825556d14aee9b67 Author: Amit Kucheria Date: Tue May 21 15:05:16 2019 +0530 arm64: dts: qcom: msm8996: Add PSCI cpuidle low power states Add device bindings for cpuidle states for cpu devices. msm8996 features 4 cpus - 2 in each cluster. However, all cpus implement the same microarchitecture and the two clusters only differ in the maximum frequency attainable by the CPUs. Acked-by: Daniel Lezcano Signed-off-by: Amit Kucheria Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/msm8996.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 4c9e5dfb45e840f74e295242cdd12f7c33a6dd7f Author: Amit Kucheria Date: Tue May 21 15:05:14 2019 +0530 arm64: dts: qcom: msm8916: Use more generic idle state names Instead of using Qualcomm-specific terminology, use generic node names for the idle states that are easier to understand. Move the description into the "idle-state-name" property. Acked-by: Daniel Lezcano Reviewed-by: Niklas Cassel Signed-off-by: Amit Kucheria Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/msm8916.dtsi | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 4742ab860618955aa3d601e678f71fc7fbbd8c6b Author: Amit Kucheria Date: Tue May 21 15:05:13 2019 +0530 arm64: dts: qcom: msm8916: Add entry-method property for the idle-states node The idle-states binding documentation[1] mentions that the 'entry-method' property is required on 64-bit platforms and must be set to "psci". [1] Documentation/devicetree/bindings/arm/idle-states.txt (see idle-states node) Acked-by: Daniel Lezcano Reviewed-by: Niklas Cassel Signed-off-by: Amit Kucheria Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/msm8916.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 0b0c339081996be01543ca2a8c8bcc82aa134155 Author: Bjorn Andersson Date: Sun Mar 24 10:20:15 2019 -0700 arm64: dts: qcom: qcs404: Add turingcc node Add a node describing the Turing Clock Controller of the QCS404. Given the default access restriction the node is left disabled. Reviewed-by: Vinod Koul Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/qcs404.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 45ea8f32b03164c282e96287066398801e02cb6c Author: Niklas Cassel Date: Tue May 21 15:05:15 2019 +0530 arm64: dts: qcom: qcs404: Add PSCI cpuidle low power states Add device bindings for cpuidle states for cpu devices. Acked-by: Daniel Lezcano Reviewed-by: Vinod Koul Signed-off-by: Niklas Cassel [amit: rename the idle-states to more generic names and fixups] Signed-off-by: Amit Kucheria Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/qcs404.dtsi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 3fdeaee951aa908963f371ba15c49e04f7d970be Author: Jordan Crouse Date: Tue Mar 12 12:13:42 2019 -0600 arm64: dts: sdm845: Add zap shader region for GPU Some Adreno GPU targets require a special zap shader to bring the GPU out of secure mode. Define a region to allocate and store the zap shader. Signed-off-by: Jordan Crouse [bjorn: Rebase ontop of recent reserved-memory patch] Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/sdm845.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit c79800103eb187526087bca6009727b476a384c0 Author: Jordan Crouse Date: Wed Jan 16 11:03:29 2019 -0700 arm64: dts: sdm845: Add gpu and gmu device nodes Add the nodes to describe the Adreno GPU and GMU devices for sdm845. Reviewed-by: Douglas Anderson Tested-by: Douglas Anderson Signed-off-by: Jordan Crouse [bjorn: Added required gx power-domain] Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/sdm845.dtsi | 123 +++++++++++++++++++++++++++++++++++ 1 file changed, 123 insertions(+) commit 9000a55bedb44f8fbb03bdf072dbd0657fc92a44 Author: Bjorn Andersson Date: Fri Apr 26 12:10:25 2019 -0700 arm64: dts: qcom: sdm845-mtp: Make USB1 peripheral The MTP is a "mobile reference device", as such the default operation is to use fastboot to boot/flash software onto it and the common case is thereby that we boot with a USB cable connected downstream from a PC or a hub. And without support for the PMI8998 charger block VBUS will not be driven by the device. Switch to peripheral until we can enable OTG. Reviewed-by: Jeffrey Hugo Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/sdm845-mtp.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f6ddca1c11b82117b34f19a62f6c2607c3117192 Author: Niklas Cassel Date: Thu Apr 25 13:34:29 2019 +0200 arm64: dts: qcom: qcs404-evb: increase s3 max voltage Increase s3 max voltage in accordance to QCS404 CPR Fusing Guide Rev 6.0 Signed-off-by: Niklas Cassel Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/qcs404-evb.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 887b528c958f40b064d53edd0bfa9fea3a69eccd Author: Niklas Cassel Date: Thu Apr 25 14:34:01 2019 +0200 arm64: dts: qcom: qcs404-evb: fix l3 min voltage The current l3 min voltage level is not supported by the regulator (the voltage is not a multiple of the regulator step size), so a driver requesting this exact voltage would fail, see discussion in: https://patchwork.kernel.org/comment/22461199/ It was agreed upon to set a min voltage level that is a multiple of the regulator step size. There was actually a patch sent that did this: https://patchwork.kernel.org/patch/10819313/ However, the commit 331ab98f8c4a ("arm64: dts: qcom: qcs404: Fix voltages l3") that was applied is not identical to that patch. Signed-off-by: Niklas Cassel Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/qcs404-evb.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 32d3060d769b70db504697ce314d6a444904f00d Author: Amit Kucheria Date: Wed Mar 20 19:09:58 2019 +0530 arm64: dts: qcom: pms405: Rename adc outputs as per schematics The adc outputs shouldn't contain information about their configuration e.g. 100K pull-up, but just reflect the name of the signal in the schematics. Making them labels also allows us to overwrite their configuration in board-specific DTs. Sort them by order as used in adc5_chans_rev2, while we're at it. Signed-off-by: Amit Kucheria Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/pms405.dtsi | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 7c2d4811d11547123bada3330fa2ad9f7ed240af Author: Amit Kucheria Date: Wed Mar 20 19:09:57 2019 +0530 arm64: dts: qcom: pms405: calibrate the VADC correctly Set the qcom,ratiometric property to make the VADC use the VDD reference (1.875V) and GND for channel calibration of the temperature channels instead of 1.25V. Allow a 200us delay between the AMUX configuration and ADC starting conversion using qcom,hw-settle-time as described in documentation. Fixes: 041b9a7b9fdb ("arm64: dts: pms405: Export PMIC temperature to thermal framework") Signed-off-by: Amit Kucheria Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/pms405.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit 14d27be1529c6ee5a4a966687b3b672c5588700d Author: Amit Kucheria Date: Mon May 13 17:08:33 2019 +0530 arm64: dts: sdm845: Fix up CPU topology SDM845 implements ARM's Dynamiq architecture that allows the big and LITTLE cores to exist in a single cluster sharing the L3 cache. Fix the cpu-map to put all cpus into a single cluster. Reviewed-by: Sudeep Holla Reviewed-by: Stephen Boyd Signed-off-by: Amit Kucheria Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/sdm845.dtsi | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 6d1238aa3395cf2a56f1f82a506a95348e0d3b14 Author: Vinod Koul Date: Thu May 2 17:43:06 2019 +0530 arm64: dts: qcom: qcs404-evb: Fix typo Fix the typo "dreive-strength" and use correct property drive-strength Fixes: 7241ab944da3 ("arm64: dts: qcom: qcs404: Add sdcc1 node") Signed-off-by: Vinod Koul Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/qcs404-evb.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3a2b37b09f74c0bc1d8745e1f9c5985d4bccb78f Author: Evan Green Date: Thu Mar 21 10:17:57 2019 -0700 arm64: dts: msm8996: Add UFS PHY reset controller Add the reset controller for the UFS controller, and wire it up so that the UFS PHY can initialize itself without relying on implicit sequencing between the two drivers. Reviewed-by: Stephen Boyd Signed-off-by: Evan Green Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/msm8996.dtsi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit fbdc60b2a7871ccb59f35b0fba2dd82251f8bd70 Author: Charles Keepax Date: Wed May 29 10:46:05 2019 +0100 extcon: arizona: Correct error handling on regmap_update_bits_check Ensure the case when regmap_update_bits_check fails and the change variable is not updated is handled correctly. Signed-off-by: Charles Keepax Signed-off-by: Chanwoo Choi drivers/extcon/extcon-arizona.c | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) commit 399dc65e9ca0c35c8ceea7130b25e7be8f229a52 Author: Andrii Nakryiko Date: Wed May 29 10:36:11 2019 -0700 libbpf: reduce unnecessary line wrapping There are a bunch of lines of code or comments that are unnecessary wrapped into multi-lines. Fix that without violating any code guidelines. Acked-by: Song Liu Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann tools/lib/bpf/libbpf.c | 52 ++++++++++++++++---------------------------------- 1 file changed, 16 insertions(+), 36 deletions(-) commit 76e1022b9653b5b5254e2f99ac467354b9c08de6 Author: Andrii Nakryiko Date: Wed May 29 10:36:10 2019 -0700 libbpf: typo and formatting fixes A bunch of typo and formatting fixes. Acked-by: Song Liu Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann tools/lib/bpf/libbpf.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 7e8c328c4e96a0fc68d9f1264656683f7f1e12c1 Author: Andrii Nakryiko Date: Wed May 29 10:36:09 2019 -0700 libbpf: simplify two pieces of logic Extra check for type is unnecessary in first case. Extra zeroing is unnecessary, as snprintf guarantees that it will zero-terminate string. Acked-by: Song Liu Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann tools/lib/bpf/libbpf.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit fba01a0689a98613f5ee3b1569fd9321f3fde7bd Author: Andrii Nakryiko Date: Wed May 29 10:36:08 2019 -0700 libbpf: use negative fd to specify missing BTF 0 is a valid FD, so it's better to initialize it to -1, as is done in other places. Also, technically, BTF type ID 0 is valid (it's a VOID type), so it's more reliable to check btf_fd, instead of btf_key_type_id, to determine if there is any BTF associated with a map. Acked-by: Song Liu Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann tools/lib/bpf/libbpf.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit f102154d3158c8fe9713f03bd3492f9cb8409a5e Author: Andrii Nakryiko Date: Wed May 29 10:36:07 2019 -0700 libbpf: fix error code returned on corrupted ELF All of libbpf errors are negative, except this one. Fix it. Acked-by: Song Liu Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann tools/lib/bpf/libbpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c51829bb6e921337014d9ac3712b0b7e8cae9f3d Author: Andrii Nakryiko Date: Wed May 29 10:36:06 2019 -0700 libbpf: check map name retrieved from ELF Validate there was no error retrieving symbol name corresponding to a BPF map. Acked-by: Song Liu Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann tools/lib/bpf/libbpf.c | 5 +++++ 1 file changed, 5 insertions(+) commit 12ef5634a855eb642b4d28781526fbd830aa7f7a Author: Andrii Nakryiko Date: Wed May 29 10:36:05 2019 -0700 libbpf: simplify endianness check Rewrite endianness check to use "more canonical" way, using compiler-defined macros, similar to few other places in libbpf. It also is more obvious and shorter. Acked-by: Song Liu Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann tools/lib/bpf/libbpf.c | 37 ++++++++++++------------------------- 1 file changed, 12 insertions(+), 25 deletions(-) commit be5c5d4e9d8cbdd7fcdcbc45e86e34bc0bd1cefd Author: Andrii Nakryiko Date: Wed May 29 10:36:04 2019 -0700 libbpf: preserve errno before calling into user callback pr_warning ultimately may call into user-provided callback function, which can clobber errno value, so we need to save it before that. Acked-by: Song Liu Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann tools/lib/bpf/libbpf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8ca990ce0d402d5aaf05f7a33ff025fcbcbb5f93 Author: Andrii Nakryiko Date: Wed May 29 10:36:03 2019 -0700 libbpf: fix detection of corrupted BPF instructions section Ensure that size of a section w/ BPF instruction is exactly a multiple of BPF instruction size. Signed-off-by: Andrii Nakryiko Acked-by: Song Liu Signed-off-by: Daniel Borkmann tools/lib/bpf/libbpf.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit af96c1e304f7051bf2ee64c9957724bdace05c58 Author: Tobin C. Harding Date: Wed May 15 10:29:13 2019 +1000 docs: filesystems: vfs: Convert vfs.txt to RST vfs.txt is currently stale. If we convert it to RST this is a good first step in the process of getting the VFS documentation up to date. This patch does the following (all as a single patch so as not to introduce any new SPHINX build warnings) - Use '.. code-block:: c' for C code blocks and indent the code blocks. - Use double backticks for struct member descriptions. - Fix a couple of build warnings by guarding pointers (*) with double backticks .e.g ``*ptr``. - Add vfs to Documentation/filesystems/index.rst The member descriptions paragraph indentation was not touched. It is not pretty but these do not cause build warnings. These descriptions all need updating anyways so leave it as it is for now. Signed-off-by: Tobin C. Harding Signed-off-by: Jonathan Corbet Documentation/filesystems/index.rst | 1 + Documentation/filesystems/{vfs.txt => vfs.rst} | 579 +++++++++++++------------ 2 files changed, 299 insertions(+), 281 deletions(-) commit 1b44ae63deae020e172866871bd14a76376e0f8b Author: Tobin C. Harding Date: Wed May 15 10:29:12 2019 +1000 docs: filesystems: vfs: Convert spaces to tabs There are bunch of places with 8 spaces, in preparation for correctly indenting all code snippets (during conversion to RST) change these to use tabspaces. This patch is whitespace only. Convert instances of 8 consecutive spaces to a single tabspace. Signed-off-by: Tobin C. Harding Signed-off-by: Jonathan Corbet Documentation/filesystems/vfs.txt | 124 +++++++++++++++++++------------------- 1 file changed, 62 insertions(+), 62 deletions(-) commit e66b045715457ca6e18fce2b2fc61dd8af2e2440 Author: Tobin C. Harding Date: Wed May 15 10:29:11 2019 +1000 docs: filesystems: vfs: Fix pre-amble indentation Currently file pre-amble contains custom indentation. RST is not going to like this, lets left-align the text. Put the copyright notices in a list in preparation for converting document to RST. Tested-by: Randy Dunlap Signed-off-by: Tobin C. Harding Signed-off-by: Jonathan Corbet Documentation/filesystems/vfs.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 099c5c7a3fba0c4686090075c6d214355aa67e47 Author: Tobin C. Harding Date: Wed May 15 10:29:10 2019 +1000 docs: filesystems: vfs: Use SPDX identifier Currently the licence is indicated via a custom string. We have SPDX license identifiers now for this task. Use SPDX license identifier matching current license string. Tested-by: Randy Dunlap Signed-off-by: Tobin C. Harding Signed-off-by: Jonathan Corbet Documentation/filesystems/vfs.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 90ac11a844f8859d5f960fb530190a9690a9a19b Author: Tobin C. Harding Date: Wed May 15 10:29:09 2019 +1000 docs: filesystems: vfs: Use correct initial heading Kernel RST has a preferred heading adornment scheme. Currently all the heading adornments follow this scheme except the document heading. Use correct heading adornment for initial heading. Tested-by: Randy Dunlap Signed-off-by: Tobin C. Harding Signed-off-by: Jonathan Corbet Documentation/filesystems/vfs.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit e04c83cd53b59e422157c4cea0cdc4e2f33fe305 Author: Tobin C. Harding Date: Wed May 15 10:29:08 2019 +1000 docs: filesystems: vfs: Use uniform spacing around headings Currently spacing before and after headings is non-uniform. Use two blank lines before a heading and one after the heading. Use uniform spacing around headings. Tested-by: Randy Dunlap Signed-off-by: Tobin C. Harding Signed-off-by: Jonathan Corbet Documentation/filesystems/vfs.txt | 9 +++++++++ 1 file changed, 9 insertions(+) commit 90caa781f6402a08b4e602fab7017baa3cee3a28 Author: Tobin C. Harding Date: Wed May 15 10:29:07 2019 +1000 docs: filesystems: vfs: Use 72 character column width In preparation for conversion to RST format use the kernels favoured documentation column width. If we are going to do this we might as well do it thoroughly. Just do the paragraphs (not the indented stuff), the rest will be done during indentation fix up patch. This patch is whitespace only, no textual changes. Use 72 character column width for all paragraph sections. Tested-by: Randy Dunlap Signed-off-by: Tobin C. Harding Signed-off-by: Jonathan Corbet Documentation/filesystems/vfs.txt | 198 +++++++++++++++++++------------------- 1 file changed, 97 insertions(+), 101 deletions(-) commit 4ee33ea403ac7c1f2b04534132ebb9c3c5095b56 Author: Tobin C. Harding Date: Wed May 15 10:29:06 2019 +1000 docs: filesystems: vfs: Use uniform space after period. Currently sometimes document has a single space after a period and sometimes it has double. Whichever we use it should be uniform. Use double space after period, be uniform. Tested-by: Randy Dunlap Signed-off-by: Tobin C. Harding Signed-off-by: Jonathan Corbet Documentation/filesystems/vfs.txt | 246 +++++++++++++++++++------------------- 1 file changed, 123 insertions(+), 123 deletions(-) commit 50c1f43a37d006ac24755397614b00064a8f293a Author: Tobin C. Harding Date: Wed May 15 10:29:05 2019 +1000 docs: filesystems: vfs: Remove space before tab Currently the file has a bunch of spaces before tabspaces. This is a nuisance when patching the file because they show up whenever we touch these lines. Let's just fix them all now in preparation for doing the RST conversion. Remove spaces before tabspaces. Tested-by: Randy Dunlap Signed-off-by: Tobin C. Harding Signed-off-by: Jonathan Corbet Documentation/filesystems/vfs.txt | 78 +++++++++++++++++++-------------------- 1 file changed, 39 insertions(+), 39 deletions(-) commit 7da33a8f87a4ee47f9eb96d67e01696b85111429 Merge: a3e2f6ad8961 e89e899f3e32 Author: David S. Miller Date: Wed May 29 14:51:23 2019 -0700 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 100GbE Intel Wired LAN Driver Updates 2019-05-29 This series contains updates to ice driver only. Bruce cleans up white space issues and fixes complaints about using bitop assignments using operands of different sizes. Anirudh cleans up code that is no longer needed now that the firmware supports the functionality. Adds support for ethtool selftestto the ice driver, which includes testing link, interrupts, eeprom, registers and packet loopback. Also, cleaned up duplicate code. Tony implements support for toggling receive VLAN filter via ethtool. Brett bumps up the minimum receive descriptor count per queue to resolve dropped packets. Refactored the interrupt tracking for the ice driver to resolve issues seen with the co-existence of features and SR-IOV, so instead of having a hardware IRQ tracker and a software IRQ tracker, simply use one tracker. Also adds a helper function to trigger software interrupts. Mitch changes how Malicious Driver Detection (MDD) events are handled, to ensure all VFs checked for MDD events and just log the event instead of disabling the VF, which was preventing proper release of resources if the VF is rebooted or the VF driver reloaded. Dave cleans up a redundant call to register LLDP MIB change events. Dan adds support to retrieve the current setting of firmware logging from the hardware to properly initialize the hardware structure. ==================== Signed-off-by: David S. Miller commit cf401e2856b27b2deeada498eab864e2a50cf219 Author: Colin Ian King Date: Wed May 29 16:07:34 2019 +0100 drm/amdkfd: fix null pointer dereference on dev The pointer dev is set to null yet it is being dereferenced when checking dev->dqm->sched_policy. Fix this by performing the check on dev->dqm->sched_policy after dev has been assigned and null checked. Also remove the redundant null assignment to dev. Addresses-Coverity: ("Explicit null dereference") Fixes: 1a058c337676 ("drm/amdkfd: New IOCTL to allocate queue GWS") Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 93285c01977729a2e046e065e4b99791b966130c Author: Zhenzhong Duan Date: Tue May 21 10:32:08 2019 +0800 doc: kernel-parameters.txt: fix documentation of nmi_watchdog parameter The default behavior of hardlockup depends on the config of CONFIG_BOOTPARAM_HARDLOCKUP_PANIC. Fix the description of nmi_watchdog to make it clear. Suggested-by: Steven Rostedt (VMware) Signed-off-by: Zhenzhong Duan Reviewed-by: Joel Fernandes (Google) Acked-by: Ingo Molnar Acked-by: Steven Rostedt (VMware) Cc: Thomas Gleixner Cc: Kees Cook Cc: Greg Kroah-Hartman Cc: linux-doc@vger.kernel.org Signed-off-by: Jonathan Corbet Documentation/admin-guide/kernel-parameters.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit fe4ec72cca500b2f97ffa0429b4cd57f67e0821d Author: Masanari Iida Date: Tue May 21 21:30:00 2019 +0900 docs: tracing: Fix typos in histogram.rst This patch fixes some spelling typos in histogram.rst Signed-off-by: Masanari Iida Acked-by: Steven Rostedt (VMware) Signed-off-by: Jonathan Corbet Documentation/trace/histogram.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 42f6ebd827832e62a37350ffad776ea785a2486b Author: Mauro Carvalho Chehab Date: Thu May 23 07:43:43 2019 -0300 docs: cdomain.py: get rid of a warning since version 1.8 There's a new warning about a deprecation function. Add a logic at cdomain.py to avoid that. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/sphinx/cdomain.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 9fd165379eff957ec3a9f5059c9d5ed05e02e61a Author: David Howells Date: Wed May 22 13:30:56 2019 +0100 keys: sparse: Fix kdoc mismatches Fix some kdoc argument description mismatches reported by sparse and give keyring_restrict() a description. Signed-off-by: David Howells Reviewed-by: James Morris cc: Mat Martineau security/keys/keyring.c | 10 +++++++--- security/keys/request_key.c | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) commit 7936d16df9a56c993c23385ea9c2785127f81711 Author: David Howells Date: Wed May 22 14:09:29 2019 +0100 keys: sparse: Fix incorrect RCU accesses Fix a pair of accesses that should be using RCU protection. rcu_dereference_protected() is needed to access task_struct::real_parent. current_cred() should be used to access current->cred. Signed-off-by: David Howells Reviewed-by: James Morris security/keys/keyctl.c | 3 ++- security/keys/request_key_auth.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) commit a3e2f6ad8961f78bf89e9caf3ff82cf5bc306511 Author: YueHaibing Date: Tue May 28 17:10:40 2019 +0800 net: stmmac: Fix build error without CONFIG_INET Fix gcc build error while CONFIG_INET is not set drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.o: In function `__stmmac_test_loopback': stmmac_selftests.c:(.text+0x8ec): undefined reference to `ip_send_check' stmmac_selftests.c:(.text+0xacc): undefined reference to `udp4_hwcsum' Add CONFIG_INET dependency to fix this. Reported-by: Hulk Robot Fixes: 091810dbded9 ("net: stmmac: Introduce selftests support") Signed-off-by: YueHaibing Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 3b6471c7becd06325eb5e701cc2602b2edbbc7b6 Author: Christophe JAILLET Date: Sun Aug 20 12:49:01 2017 -0400 media: Staging: media: Release the correct resource in an error handling path 'res' is reassigned several times in the function and if we 'goto error_unmap', its value is not the returned value of 'request_mem_region()' anymore. Introduce a new 'struct resource *' variable (i.e. res2) to keep a pointer to the right resource, if needed in the error handling path. Fixes: 4b4eda001704 ("Staging: media: Unmap and release region obtained by ioremap_nocache") Signed-off-by: Christophe JAILLET Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/davinci_vpfe/dm365_ipipe.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 05a7c22c2f681bf7458bec21eb76e91e6b8713ca Author: Arvind Yadav Date: Tue Aug 15 07:23:42 2017 -0400 media: omap3isp: constify platform_device_id platform_device_id are not supposed to change at runtime. All functions working with platform_device_id provided by work with const platform_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/omap3isp/isp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2bd4290f6b7895e73916788bbdf56f32d3767097 Author: Diwakar Sharma Date: Thu Jul 27 13:01:23 2017 -0400 media: staging: media: davinci_vpfe: use __func__ for function names Checkpatch reported warnings for use of embedded function names. Use __func__ instead of embedded function names. [mchehab+samsung@kernel.org: rebased on the top of upstream] Signed-off-by: Diwakar Sharma Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit dd9a00ab9c3e14effc3f34b43e04504d05676fc9 Author: Sakari Ailus Date: Mon Feb 20 10:22:18 2017 -0500 media: omap3isp: Call video_unregister_device() unconditionally video_unregister_device() can be called on a never or an already unregistered device. Drop the redundant check. Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/omap3isp/ispvideo.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 814434984a5d2063ac15d7ff9a46075600ff1805 Author: Sakari Ailus Date: Thu Jul 13 11:23:44 2017 -0400 media: omap3isp: Don't rely on devm for memory resource management devm functions are fine for managing resources that are directly related to the device at hand and that have no other dependencies. However, a process holding a file handle to a device created by a driver for a device may result in the file handle left behind after the device is long gone. This will result in accessing released (and potentially reallocated) memory. Instead, manage the memory resources in the driver. Releasing the resources can be later on bound to e.g. by releasing a reference. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/omap3isp/isp.c | 16 +++++++++++----- drivers/media/platform/omap3isp/isph3a_aewb.c | 24 +++++++++++++++++------- drivers/media/platform/omap3isp/isph3a_af.c | 24 +++++++++++++++++------- drivers/media/platform/omap3isp/isphist.c | 11 +++++++---- drivers/media/platform/omap3isp/ispstat.c | 2 ++ 5 files changed, 54 insertions(+), 23 deletions(-) commit f42292040d31922ee4e4ea68e2f287fbc3bb2053 Author: Arushi Singhal Date: Wed Mar 29 11:13:20 2017 -0400 media: staging: media: davinci_vpfe: Replace a bit shift This patch replaces bit shifting on 1 with the BIT(x) macro. This was done with coccinelle: @@ constant c; @@ -1 << c +BIT(c) [mchehab+samsung@kernel.org: rebase on the top of upstream] Signed-off-by: Arushi Singhal Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/omap3isp/ispstat.c | 2 +- drivers/staging/media/davinci_vpfe/dm365_isif.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) commit 6995a659101bd4effa41cebb067f9dc18d77520d Author: Shailendra Verma Date: Thu Nov 24 23:57:34 2016 -0500 media: staging: media: davinci_vpfe: - Fix for memory leak if decoder initialization fails. Fix to avoid possible memory leak if the decoder initialization got failed.Free the allocated memory for file handle object before return in case decoder initialization fails. Signed-off-by: Shailendra Verma Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/davinci_vpfe/vpfe_video.c | 3 +++ 1 file changed, 3 insertions(+) commit 279758f8001f0014b15656a4ef130a20852f6df6 Author: Herbert Xu Date: Tue May 28 15:02:31 2019 +0800 rhashtable: Add rht_ptr_rcu and improve rht_ptr This patch moves common code between rht_ptr and rht_ptr_exclusive into __rht_ptr. It also adds a new helper rht_ptr_rcu exclusively for the RCU case. This way rht_ptr becomes a lock-only construct so we can use the lighter rcu_dereference_protected primitive. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller include/linux/rhashtable.h | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) commit af64935213c42245e7937af0e4a359e1be7946b2 Author: Jisheng Zhang Date: Tue May 28 07:02:07 2019 +0000 net: stmmac: use dev_info() before netdev is registered Before the netdev is registered, calling netdev_info() will emit something as "(unnamed net device) (uninitialized)", looks confusing. Before this patch: [ 3.155028] stmmaceth f7b60000.ethernet (unnamed net_device) (uninitialized): device MAC address 52:1a:55:18:9e:9d After this patch: [ 3.155028] stmmaceth f7b60000.ethernet: device MAC address 52:1a:55:18:9e:9d Signed-off-by: Jisheng Zhang Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1b3855aba812389ba4baa8221b90ed694dd1f3f7 Author: Colin Ian King Date: Tue May 28 07:52:17 2019 +0100 qed: fix spelling mistake "inculde" -> "include" There is a spelling mistake in a DP_INFO message. Fix it. Signed-off-by: Colin Ian King Acked-by: Michal Kalderon  Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3616862882134690f888501d2cbaca4bfd951242 Author: Masahiro Yamada Date: Fri May 24 13:51:11 2019 +0900 MIPS: replace MBIT_ULL() with BIT_ULL() Commit 8bd9cb51daac ("locking/atomics, asm-generic: Move some macros from to a new file") moved BIT_ULL() into . It only includes , so there is no longer "include file recursion hell". Signed-off-by: Masahiro Yamada Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: James Hogan Cc: Huacai Chen Cc: linux-kernel@vger.kernel.org Cc: Ralf Baechle arch/mips/include/asm/cpu.h | 125 +++++++++++++++++++++----------------------- 1 file changed, 60 insertions(+), 65 deletions(-) commit 501b125a29f7cd8983960c5f3c80b337b1359cc3 Author: Quentin Monnet Date: Wed May 29 15:26:41 2019 +0100 libbpf: prevent overwriting of log_level in bpf_object__load_progs() There are two functions in libbpf that support passing a log_level parameter for the verifier for loading programs: bpf_object__load_xattr() and bpf_prog_load_xattr(). Both accept an attribute object containing the log_level, and apply it to the programs to load. It turns out that to effectively load the programs, the latter function eventually relies on the former. This was not taken into account when adding support for log_level in bpf_object__load_xattr(), and the log_level passed to bpf_prog_load_xattr() later gets overwritten with a zero value, thus disabling verifier logs for the program in all cases: bpf_prog_load_xattr() // prog->log_level = attr1->log_level; -> bpf_object__load() // attr2->log_level = 0; -> bpf_object__load_xattr() // -> bpf_object__load_progs() // prog->log_level = attr2->log_level; Fix this by OR-ing the log_level in bpf_object__load_progs(), instead of overwriting it. v2: Fix commit log description (confusion on function names in v1). Fixes: 60276f984998 ("libbpf: add bpf_object__load_xattr() API function to pass log_level") Reported-by: Alexei Starovoitov Signed-off-by: Quentin Monnet Signed-off-by: Daniel Borkmann tools/lib/bpf/libbpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d8fd3722207f154b53c80eee2cf4977c3fc25a92 Author: Imre Deak Date: Fri May 24 00:24:33 2019 +0300 drm/mst: Fix MST sideband up-reply failure handling Fix the breakage resulting in the stacktrace below, due to tx queue being full when trying to send an up-reply. txmsg->seqno is -1 in this case leading to a corruption of the mstb object by txmsg->dst->tx_slots[txmsg->seqno] = NULL; in process_single_up_tx_qlock(). [ +0,005162] [drm:process_single_tx_qlock [drm_kms_helper]] set_hdr_from_dst_qlock: failed to find slot [ +0,000015] [drm:drm_dp_send_up_ack_reply.constprop.19 [drm_kms_helper]] failed to send msg in q -11 [ +0,000939] BUG: kernel NULL pointer dereference, address: 00000000000005a0 [ +0,006982] #PF: supervisor write access in kernel mode [ +0,005223] #PF: error_code(0x0002) - not-present page [ +0,005135] PGD 0 P4D 0 [ +0,002581] Oops: 0002 [#1] PREEMPT SMP NOPTI [ +0,004359] CPU: 1 PID: 1200 Comm: kworker/u16:3 Tainted: G U 5.2.0-rc1+ #410 [ +0,008433] Hardware name: Intel Corporation Ice Lake Client Platform/IceLake U DDR4 SODIMM PD RVP, BIOS ICLSFWR1.R00.3175.A00.1904261428 04/26/2019 [ +0,013323] Workqueue: i915-dp i915_digport_work_func [i915] [ +0,005676] RIP: 0010:queue_work_on+0x19/0x70 [ +0,004372] Code: ff ff ff 0f 1f 40 00 66 2e 0f 1f 84 00 00 00 00 00 41 56 49 89 f6 41 55 41 89 fd 41 54 55 53 48 89 d3 9c 5d fa e8 e7 81 0c 00 48 0f ba 2b 00 73 31 45 31 e4 f7 c5 00 02 00 00 74 13 e8 cf 7f [ +0,018750] RSP: 0018:ffffc900007dfc50 EFLAGS: 00010006 [ +0,005222] RAX: 0000000000000046 RBX: 00000000000005a0 RCX: 0000000000000001 [ +0,007133] RDX: 000000000001b608 RSI: 0000000000000000 RDI: ffffffff82121972 [ +0,007129] RBP: 0000000000000202 R08: 0000000000000000 R09: 0000000000000001 [ +0,007129] R10: 0000000000000000 R11: 0000000000000000 R12: ffff88847bfa5096 [ +0,007131] R13: 0000000000000010 R14: ffff88849c08f3f8 R15: 0000000000000000 [ +0,007128] FS: 0000000000000000(0000) GS:ffff88849dc80000(0000) knlGS:0000000000000000 [ +0,008083] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ +0,005749] CR2: 00000000000005a0 CR3: 0000000005210006 CR4: 0000000000760ee0 [ +0,007128] PKRU: 55555554 [ +0,002722] Call Trace: [ +0,002458] drm_dp_mst_handle_up_req+0x517/0x540 [drm_kms_helper] [ +0,006197] ? drm_dp_mst_hpd_irq+0x5b/0x9c0 [drm_kms_helper] [ +0,005764] drm_dp_mst_hpd_irq+0x5b/0x9c0 [drm_kms_helper] [ +0,005623] ? intel_dp_hpd_pulse+0x205/0x370 [i915] [ +0,005018] intel_dp_hpd_pulse+0x205/0x370 [i915] [ +0,004836] i915_digport_work_func+0xbb/0x140 [i915] [ +0,005108] process_one_work+0x245/0x610 [ +0,004027] worker_thread+0x37/0x380 [ +0,003684] ? process_one_work+0x610/0x610 [ +0,004184] kthread+0x119/0x130 [ +0,003240] ? kthread_park+0x80/0x80 [ +0,003668] ret_from_fork+0x24/0x50 Cc: Lyude Paul Cc: Dave Airlie Signed-off-by: Imre Deak Reviewed-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190523212433.9058-1-imre.deak@intel.com drivers/gpu/drm/drm_dp_mst_topology.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 835706214875de6e6f8b9d01ceeed17b20622677 Author: Andrew F. Davis Date: Fri Mar 29 13:34:27 2019 -0400 media: videobuf-dma-contig: Use size of buffer in mmap not vma size The size of the vma can be larger than the size of the backing buffer. Use the buffer size over vma size to prevent exposing extra memory to userspace. Signed-off-by: Andrew F. Davis Reviewed-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/videobuf-dma-contig.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 6211e44a4dfc2a12c5d40984ab876537bf0d0830 Author: Young Xiao <92siuyang@gmail.com> Date: Tue May 28 08:38:13 2019 -0400 media: cx231xx-dvb: fix memory leak in dvb_fini() In dvb_init(), dev->dvb is allocated by kzalloc. Therefore, it must be freed being set to NULL. Signed-off-by: Young Xiao <92siuyang@gmail.com> Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/cx231xx/cx231xx-dvb.c | 1 + 1 file changed, 1 insertion(+) commit 0547858b00bf2e895ee7c6ede7b376450e217171 Author: Sean Young Date: Thu May 23 06:01:51 2019 -0400 media: em28xx: use usb_to_input_id() rather than handrolling it This also populates the version member correctly. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-input.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 6bd914bc05f378071f9fa975ce91fbf9a4a5e224 Author: Sean Young Date: Thu May 23 05:31:11 2019 -0400 media: em28xx: use common code for decoding nec scancodes Tested on WinTV-HVR-930C. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-input.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) commit 5c1c695307b61bc0a86ff3a188da669220c7c9df Author: Sean Young Date: Thu May 23 04:48:11 2019 -0400 media: em28xx: give RC device proper name Give the RC device the name of the board rather than "1-2:1.0 IR". Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/em28xx/em28xx-input.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit d0f29d4980cdf18295e34d0a57788ad6663cbf88 Author: Andrey Grodzovsky Date: Wed May 29 10:29:40 2019 -0400 drm/sched: Fix make htmldocs warnings. Document the missing parameters. Reviewed-by: Alex Deucher Signed-off-by: Andrey Grodzovsky Signed-off-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/1559140180-6762-1-git-send-email-andrey.grodzovsky@amd.com drivers/gpu/drm/scheduler/sched_main.c | 2 ++ 1 file changed, 2 insertions(+) commit 81cb4203a5fec7d3f8cf4f145e8e7077b2dcbc78 Author: Alan Mikhak Date: Thu May 23 14:18:01 2019 -0700 tools: PCI: Fix compiler warning in pcitest Fix the following compiler warning in pcitest: pcitest.c: In function main: pcitest.c:214:4: warning: too many arguments for format [-Wformat-extra-args] "usage: %s [options]\n" Fixes: fbca0b284bd0 ("tools: PCI: Add 'h' in optstring of getopt()") Signed-off-by: Alan Mikhak Signed-off-by: Lorenzo Pieralisi Reviewed-by: Paul Walmsley tools/pci/pcitest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8a5e0af240e07dd3d4897eb8ff52aab757da7fab Author: Alan Mikhak Date: Thu May 23 14:18:00 2019 -0700 tools: PCI: Fix broken pcitest compilation pcitest is currently broken due to the following compiler error and related warning. Fix by changing the run_test() function signature to return an integer result. pcitest.c: In function run_test: pcitest.c:143:9: warning: return with a value, in function returning void return (ret < 0) ? ret : 1 - ret; /* return 0 if test succeeded */ pcitest.c: In function main: pcitest.c:232:9: error: void value not ignored as it ought to be return run_test(test); Fixes: fef31ecaaf2c ("tools: PCI: Fix compilation warnings") Signed-off-by: Alan Mikhak Signed-off-by: Lorenzo Pieralisi Reviewed-by: Paul Walmsley tools/pci/pcitest.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2367d00e2ca3dfda1b30f89d854cb1669b941e7f Author: Gal Pressman Date: Tue May 28 15:46:18 2019 +0300 RDMA/efa: Remove unused includes Remove leftover includes that are no longer used from the driver. Reviewed-by: Firas JahJah Reviewed-by: Yossi Leybovich Signed-off-by: Gal Pressman Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/efa/efa.h | 2 -- drivers/infiniband/hw/efa/efa_com_cmd.c | 1 - 2 files changed, 3 deletions(-) commit 4d50e084c560fa952e235d092cf53c86d8bf4b7b Author: Gal Pressman Date: Tue May 28 15:46:17 2019 +0300 RDMA/efa: Use rdma block iterator in chunk list creation When creating the chunks list the rdma_for_each_block() iterator is used in order to iterate over the payload in EFA_CHUNK_PAYLOAD_SIZE (device defined) strides. Reviewed-by: Firas JahJah Reviewed-by: Yossi Leybovich Reviewed-by: Shiraz Saleem Signed-off-by: Gal Pressman Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/efa/efa_verbs.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) commit e0e3f39759151fb1b445a0dbc5d6a14f3e1732aa Author: Gal Pressman Date: Tue May 28 15:46:15 2019 +0300 RDMA/efa: Remove unneeded admin commands abort flow The admin commands abort flow is buggy (use-after-free) and not really necessary as it is guaranteed that after ib_unregister_device() is called there are no user verbs threads running in parallel, delete it. Suggested-by: Jason Gunthorpe Reviewed-by: Firas JahJah Reviewed-by: Yossi Leybovich Signed-off-by: Gal Pressman Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/efa/efa_com.c | 74 +------------------------------------ drivers/infiniband/hw/efa/efa_com.h | 1 - 2 files changed, 1 insertion(+), 74 deletions(-) commit 255efcaeb623dd9777523b98d29aa5a0792d9245 Author: Gal Pressman Date: Tue May 28 15:46:14 2019 +0300 RDMA/efa: Use kvzalloc instead of kzalloc with fallback Use kvzalloc which attempts to allocate a physically continuous buffer and fallbacks to virtually continuous on failure instead of open coding it in the driver. The is_vmalloc_addr function is used to determine whether the buffer is physically continuous or not (which determines direct vs indirect MR registration mode). Suggested-by: Jason Gunthorpe Reviewed-by: Firas JahJah Reviewed-by: Yossi Leybovich Signed-off-by: Gal Pressman Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/efa/efa_verbs.c | 46 ++++++++++++++++------------------- 1 file changed, 21 insertions(+), 25 deletions(-) commit 67021ae0bbe941dca6605efab52089bcbf245fb5 Author: Bjorn Andersson Date: Tue May 28 17:57:10 2019 -0700 PCI: qcom: Add QCS404 PCIe controller support The QCS404 platform contains a PCIe version 2.4.0 controller and a Qualcomm PCIe2 PHY. The driver already supports version 2.4.0, for the IPQ4019, but this support touches clocks and resets related to the PHY as well and there's no upstream driver for the PHY. On QCS404 we must initialize the PHY, so a separate PHY driver is implemented to take care of this and the controller driver is updated to not require the PHY related resources. This is done by relying on the fact that operations in both the clock and reset framework are NOPs when passed NULL, so we can isolate this change to only the qcom_pcie_get_resources_2_4_0() function. For QCS404 we also need to enable the AHB (iface) clock, in order to access the register space of the controller, but as this is not part of the IPQ4019 DT binding this is only added for new users of the 2.4.0 controller. Signed-off-by: Bjorn Andersson Signed-off-by: Lorenzo Pieralisi Reviewed-by: Niklas Cassel Reviewed-by: Vinod Koul Acked-by: Stanimir Varbanov drivers/pci/controller/dwc/pcie-qcom.c | 64 ++++++++++++++++++++-------------- 1 file changed, 38 insertions(+), 26 deletions(-) commit 29a50257a9d6d16320bc5e2fc1b15e0f2b2eb7cf Author: Bjorn Andersson Date: Tue May 28 17:57:09 2019 -0700 dt-bindings: PCI: qcom: Add QCS404 to the binding The Qualcomm QCS404 platform contains a PCIe controller, add this to the Qualcomm PCI binding document. The controller is the same version as the one used in IPQ4019, but the PHY part is described separately, hence the difference in clocks and resets. Signed-off-by: Bjorn Andersson Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Reviewed-by: Vinod Koul .../devicetree/bindings/pci/qcom,pcie.txt | 25 ++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) commit 5aa180974e4d53f397f7d02bbce2c1105e8e538b Author: Bjorn Andersson Date: Tue May 28 17:57:08 2019 -0700 PCI: qcom: Use clk bulk API for 2.4.0 controllers Before introducing the QCS404 platform, which uses the same PCIe controller as IPQ4019, migrate this to use the bulk clock API, in order to make the error paths slighly cleaner. Signed-off-by: Bjorn Andersson Signed-off-by: Lorenzo Pieralisi Reviewed-by: Niklas Cassel Reviewed-by: Vinod Koul Acked-by: Stanimir Varbanov drivers/pci/controller/dwc/pcie-qcom.c | 53 ++++++++++------------------------ 1 file changed, 16 insertions(+), 37 deletions(-) commit 5f5e4eb4fb2d6c09db18dc431a0c4a3b11ff5bae Author: Dennis Dalessandro Date: Fri May 24 11:44:58 2019 -0400 IB/hfi1: Remove extra brackets from an if A recent patch to hfi1 left behind a checkpatch error. Fixes: fb24ea52f78e ("drivers: Remove explicit invocations of mmiowb()") Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hfi1/pio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7f5f228008e4d6f59212b0ee693cbc36212096ba Author: Chris Wilson Date: Wed May 29 10:34:07 2019 +0100 drm/i915/gtt: Avoid overflowing the WC stash An interesting issue cropped with making the pagetables be allocated and freed concurrently (i.e. removing their grandeous struct_mutex guard) was that we would overflow the page stash. This happens when we have multiple allocators grabbing WC pages such that we fill the vm's local page stash and then when we free another page, the page stash is already full and we overflow. The fix is quite simple: to check for a full page stash before adding another. This results in us keeping a vm local page stash around for much longer, which is both a blessing and a curse. Signed-off-by: Chris Wilson Cc: Matthew Auld Cc: Joonas Lahtinen Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20190529093407.31697-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit c6e2d2c7ca4e6d09bc07ab5ced2e687cc842a860 Author: Marek Vasut Date: Wed May 29 12:24:51 2019 +0200 spidev: Add M53Menlo CPLD compatible Add compatible string for Menlosystems CPLD present on the M53Menlo board. This CPLD is used to communicate with various custom sensors. Signed-off-by: Marek Vasut To: linux-spi@vger.kernel.org Cc: Mark Brown Signed-off-by: Mark Brown drivers/spi/spidev.c | 1 + 1 file changed, 1 insertion(+) commit b19671d6caf1ac393681864d5d85dda9fa99a448 Author: Tzung-Bi Shih Date: Wed May 29 14:22:14 2019 +0800 ASoC: core: use component driver name as component name fmt_single_name() uses device name to determine component name. If multiple components bind to the same device, the debugfs creation in soc_init_component_debugfs() would fail due to duplicated entity names. Name provided by component driver is unique enough to represent each component. Use component driver name as the component name to avoid name duplication. Signed-off-by: Tzung-Bi Shih Signed-off-by: Mark Brown sound/soc/soc-core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 7cda6223503d592f980a222811355ab07611b821 Author: Shengjiu Wang Date: Wed May 29 11:30:02 2019 +0800 ASoC: cs42xx8: Fix build error with CONFIG_GPIOLIB is not set config: x86_64-randconfig-x000201921-201921 compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: make ARCH=x86_64 sound/soc/codecs/cs42xx8.c: In function ‘cs42xx8_probe’: sound/soc/codecs/cs42xx8.c:472:25: error: implicit declaration of function ‘devm_gpiod_get_optional’; did you mean ‘devm_clk_get_optional’? [-Werror=implicit-function-declaration] cs42xx8->gpiod_reset = devm_gpiod_get_optional(dev, "reset", ^~~~~~~~~~~~~~~~~~~~~~~ devm_clk_get_optional sound/soc/codecs/cs42xx8.c:473:8: error: ‘GPIOD_OUT_HIGH’ undeclared (first use in this function); did you mean ‘GPIOF_INIT_HIGH’? GPIOD_OUT_HIGH); ^~~~~~~~~~~~~~ GPIOF_INIT_HIGH sound/soc/codecs/cs42xx8.c:473:8: note: each undeclared identifier is reported only once for each function it appears in sound/soc/codecs/cs42xx8.c:477:2: error: implicit declaration of function ‘gpiod_set_value_cansleep’; did you mean ‘gpio_set_value_cansleep’? [-Werror=implicit-function-declaration] gpiod_set_value_cansleep(cs42xx8->gpiod_reset, 0); ^~~~~~~~~~~~~~~~~~~~~~~~ gpio_set_value_cansleep Fixes: bfe95dfa4dac ("ASoC: cs42xx8: Add reset gpio handling") Reported-by: kbuild test robot Signed-off-by: Shengjiu Wang Signed-off-by: Mark Brown sound/soc/codecs/cs42xx8.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 17fc24875da1bef4650cf007edae3b2e26d2fa4e Author: Pierre-Louis Bossart Date: Tue May 28 11:28:22 2019 -0500 ASoC: Intel: sof-rt5682: fix undefined references with Baytrail-only support The sof-rt5682 machine driver supports both legacy Baytrail devices and more recent ApolloLake/CometLake platforms. When only Baytrail is selected, the compilation fails with the following errors: ERROR: "hdac_hdmi_jack_port_init" [sound/soc/intel/boards/snd-soc-sof_rt5682.ko] undefined! ERROR: "hdac_hdmi_jack_init" [sound/soc/intel/boards/snd-soc-sof_rt5682.ko] undefined! Fix by selecting SND_SOC_HDAC_HDMI unconditionally. The code for HDMI support is not reachable on Baytrail so this change has no functional impact. Fixes: f70abd75b7c6 ("ASoC: Intel: add sof-rt5682 machine driver") Reported-by: kbuild test robot Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/boards/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a54988113985ca22e414e132054f234fc8a92604 Author: Gen Zhang Date: Wed May 29 09:53:05 2019 +0800 wcd9335: fix a incorrect use of kstrndup() In wcd9335_codec_enable_dec(), 'widget_name' is allocated by kstrndup(). However, according to doc: "Note: Use kmemdup_nul() instead if the size is known exactly." So we should use kmemdup_nul() here instead of kstrndup(). Signed-off-by: Gen Zhang Signed-off-by: Mark Brown sound/soc/codecs/wcd9335.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8c03d845b86c5fc916cac9027eb5109e771e884f Author: Chen-Yu Tsai Date: Mon May 20 11:06:36 2019 -0400 media: sun6i: Support A83T variant The A83T SoC has a camera sensor interface (known as CSI in Allwinner lingo), which is similar to the one found on the A64 and H3. The only difference seems to be that support of MIPI CSI through a connected MIPI CSI-2 bridge. Add support for this variant. Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c | 1 + 1 file changed, 1 insertion(+) commit 0a0c2a9262a145570751111603d1f0385ce1a443 Author: Chen-Yu Tsai Date: Mon May 20 11:06:35 2019 -0400 media: dt-bindings: media: sun6i-csi: Add compatible string for A83T variant The A83T SoC has a camera sensor interface (known as CSI in Allwinner lingo), which is similar to the one found on the A64 and H3. The only difference seems to be that support of MIPI CSI through a connected MIPI CSI-2 bridge. Add a compatible string for this variant. Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab Documentation/devicetree/bindings/media/sun6i-csi.txt | 1 + 1 file changed, 1 insertion(+) commit d3844b9df9cb5f7bff074d0ec7f40e41c5200f4a Author: Shawn Tu Date: Sun May 26 22:26:05 2019 -0400 media: ov8856: modify register to fix test pattern modify registers to fix bayer order in test pattern mode Signed-off-by: Shawn Tu Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov8856.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 17f61abb9bbd83bcaa5b44caf8ad16337bd209be Author: Sakari Ailus Date: Tue Feb 19 09:17:02 2019 -0500 media: staging: imgu: Drop support for other page sizes The hardware only supports 4ki pages; drop support for other sizes. Signed-off-by: Sakari Ailus Tested-by: Rajmohan Mani Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/ipu3/ipu3-dmamap.c | 15 ++---- drivers/staging/media/ipu3/ipu3-mmu.c | 88 ++++++-------------------------- drivers/staging/media/ipu3/ipu3-mmu.h | 5 +- 3 files changed, 22 insertions(+), 86 deletions(-) commit 3efcbe3e42862e577dc8c12f974021231626a8ee Author: Sakari Ailus Date: Tue Feb 19 09:32:06 2019 -0500 media: staging: imgu: Address compiler / checker warnings in MMU code Address C compiler, sparse and smatch warnings and little style issues in the IMGU MMU code. Signed-off-by: Sakari Ailus Tested-by: Rajmohan Mani Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/ipu3/ipu3-mmu.c | 39 +++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) commit 0ace8734f40564ae9405df9f12f0fde6cd7fa7e8 Author: Sakari Ailus Date: Mon Feb 18 11:33:54 2019 -0500 media: staging: imgu: Remove redundant checks Remove redundant checks for less than zero on unsigned variables. Signed-off-by: Sakari Ailus Tested-by: Rajmohan Mani Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/ipu3/ipu3-css-fw.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit c9d52c114a9fcc61c30512c7f810247a9f2812af Author: Sakari Ailus Date: Mon Feb 18 11:29:13 2019 -0500 media: staging: imgu: Address a compiler warning on alignment Address a compiler warnings on alignment of struct ipu3_uapi_awb_fr_config_s by adding __attribute__((aligned(32))) to a struct member of that type as well. Signed-off-by: Sakari Ailus Tested-by: Rajmohan Mani Reviewed-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/ipu3/include/intel-ipu3.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ceaac6dc5b7ae80830b8694c81d7f3a2406617ed Author: Jonas Karlman Date: Tue May 28 13:02:31 2019 -0400 media: rockchip/vpu: Add support for MPEG-2 decoding on RK3288 Add necessary bits to support MPEG2 decoding on RK3288. Signed-off-by: Jonas Karlman Signed-off-by: Boris Brezillon Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/rockchip/vpu/Makefile | 1 + drivers/staging/media/rockchip/vpu/rk3288_vpu_hw.c | 59 ++++- .../media/rockchip/vpu/rk3288_vpu_hw_mpeg2_dec.c | 261 +++++++++++++++++++++ .../staging/media/rockchip/vpu/rk3288_vpu_regs.h | 1 + .../staging/media/rockchip/vpu/rockchip_vpu_hw.h | 1 + 5 files changed, 322 insertions(+), 1 deletion(-) commit 879dee56a40c72b917d8eae170cb1f30f7030aa8 Author: Jonas Karlman Date: Tue May 28 13:02:30 2019 -0400 media: rockchip/vpu: Add MPEG2 decoding support to RK3399 Add the necessary bits to support MPEG2 decoding on RK3399. Signed-off-by: Jonas Karlman Signed-off-by: Boris Brezillon Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/rockchip/vpu/Makefile | 1 + drivers/staging/media/rockchip/vpu/rk3399_vpu_hw.c | 59 ++++- .../media/rockchip/vpu/rk3399_vpu_hw_mpeg2_dec.c | 267 +++++++++++++++++++++ .../staging/media/rockchip/vpu/rockchip_vpu_hw.h | 1 + 4 files changed, 327 insertions(+), 1 deletion(-) commit 7cdedc3f45ccd4b6d92b6d60c4e7fadef61a57a4 Author: Jonas Karlman Date: Tue May 28 13:02:29 2019 -0400 media: rockchip/vpu: Add infra to support MPEG-2 decoding Only adds structs and helpers to allow supporting MPEG-2 decoding on rockchip SoCs. Support for RK3399 and RK3288 will be added in separate commits Signed-off-by: Jonas Karlman Signed-off-by: Ezequiel Garcia Signed-off-by: Boris Brezillon Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/rockchip/vpu/Makefile | 3 +- drivers/staging/media/rockchip/vpu/rockchip_vpu.h | 12 +++++ .../staging/media/rockchip/vpu/rockchip_vpu_drv.c | 30 +++++++++++ .../staging/media/rockchip/vpu/rockchip_vpu_hw.h | 14 +++++ .../media/rockchip/vpu/rockchip_vpu_mpeg2.c | 61 ++++++++++++++++++++++ 5 files changed, 119 insertions(+), 1 deletion(-) commit 6d9a39cffc1e812758a8e1a7f657fe70b84dde5f Author: Ezequiel Garcia Date: Tue May 28 13:02:28 2019 -0400 media: rockchip/vpu: Add support for non-standard controls Rework the way controls are registered by the driver, so it can support non-standard controls, such as those used by stateless codecs. Signed-off-by: Ezequiel Garcia Signed-off-by: Boris Brezillon Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/rockchip/vpu/rk3288_vpu_hw.c | 2 +- drivers/staging/media/rockchip/vpu/rk3399_vpu_hw.c | 2 +- drivers/staging/media/rockchip/vpu/rockchip_vpu.h | 17 +++++++- .../staging/media/rockchip/vpu/rockchip_vpu_drv.c | 51 +++++++++++++++++----- 4 files changed, 59 insertions(+), 13 deletions(-) commit 8c3dc73d41f5ca9a22d58a060a27c4c2bc598179 Author: Ezequiel Garcia Date: Tue May 28 13:02:27 2019 -0400 media: rockchip/vpu: Add decoder boilerplate This commit adds the needed boilerplate code to support the VPU in decoding operation. Two v4l2 interfaces are exposed, one for encoding and one for decoding, but a single m2m device is shared by them, so jobs are properly serialized. Signed-off-by: Ezequiel Garcia Signed-off-by: Boris Brezillon Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/rockchip/vpu/Kconfig | 1 + drivers/staging/media/rockchip/vpu/rockchip_vpu.h | 42 ++++- .../staging/media/rockchip/vpu/rockchip_vpu_drv.c | 169 +++++++++++++++++---- .../staging/media/rockchip/vpu/rockchip_vpu_v4l2.c | 29 +++- 4 files changed, 203 insertions(+), 38 deletions(-) commit 953aaa1492c538c98d3e018b68f9cbc143174e10 Author: Boris Brezillon Date: Tue May 28 13:02:26 2019 -0400 media: rockchip/vpu: Prepare things to support decoders The code in rockchip_vpu_v4l2 was hardcoded for encoder support. Modify it more generic to support the decoder case so that we can re-use the same vb2/v4l2 ops for both devices. Co-developed-by: Ezequiel Garcia Signed-off-by: Ezequiel Garcia Signed-off-by: Boris Brezillon Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/rockchip/vpu/rockchip_vpu.h | 6 + .../staging/media/rockchip/vpu/rockchip_vpu_v4l2.c | 491 ++++++++++++--------- 2 files changed, 295 insertions(+), 202 deletions(-) commit 4aa807ef41d8dd7a54bf5bcb0216e6672e0b6b53 Author: Boris Brezillon Date: Tue May 28 13:02:25 2019 -0400 media: rockchip/vpu: Provide a helper to reset both src and dst formats When initializing a context, the core wants to reset both src and dst formats. Right now the order doesn't matter, but if we want to have a valid default width/height on the non-coded/raw format side (src in case of encoders, dst in case of decoders), we need to reset those formats in the right order: first the coded-format side, then the other, such that width and height on the raw format side can be taken from the coded format. Let's provide a helper that will reset both formats and make sure this is done in the right order. Signed-off-by: Boris Brezillon Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c | 3 +-- drivers/staging/media/rockchip/vpu/rockchip_vpu_v4l2.c | 14 ++++++++++---- drivers/staging/media/rockchip/vpu/rockchip_vpu_v4l2.h | 5 +---- 3 files changed, 12 insertions(+), 10 deletions(-) commit c65227fd2aac55f40f3b400e4a225e5846e3b47a Author: Boris Brezillon Date: Tue May 28 13:02:24 2019 -0400 media: rockchip/vpu: Move encoder logic to a common place The V4L2/VB2 implementation for the encoder and decoder logic are very similar, so let's rename rockchip_vpu_enc.c file into rockchip_vpu_v4l2.c and remove the _enc_ part in objects/functions exposed in rockchip_vpu_v4l2.h. We also rename the enc_queue_init() function (in rockchip_vpu_drv.c) queue_init() since it will be used to initialize both type of queues. The implementation itself will be patched to support the decoding case when decoder support is added. Suggested-by: Ezequiel Garcia Signed-off-by: Boris Brezillon Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/rockchip/vpu/Makefile | 2 +- drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c | 14 +++++++------- .../vpu/{rockchip_vpu_enc.c => rockchip_vpu_v4l2.c} | 14 +++++++------- drivers/staging/media/rockchip/vpu/rockchip_vpu_v4l2.h | 12 ++++++------ 4 files changed, 21 insertions(+), 21 deletions(-) commit 2a51558c8c7f8275b16db918bf3a33108bc0cd2d Author: Oded Gabbay Date: Wed May 29 17:58:38 2019 +0300 habanalabs: remove DMA mask hack for Goya This patch removes the non-standard DMA mask setting for Goya. Now that the device CPU goes through the MMU, we are not limited to allocating the CPU accessible memory area in the address space of under 39 bits. Therefore, we don't need to set the DMA masking twice during initialization, a practice that is not working on POWER architecture. The patch sets the DMA mask to 48 bits once during the initialization. The address of the CPU accessible memory area is configured to the MMU and the matching VA is given to the device CPU. Signed-off-by: Oded Gabbay drivers/misc/habanalabs/goya/goya.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) commit 8c06082041e4254a017df58a177a14ac855ee98e Author: Boris Brezillon Date: Tue May 28 13:02:23 2019 -0400 media: rockchip/vpu: Rename rockchip_vpu_common.h into rockchip_vpu_v4l2.h We're about to add prototypes for the vb2/v4l2 helpers shared by the encoder/decoder logic in this file, so let's pick a name that reflects that (rockchip_vpu_common.h was a bit to generic). Suggested-by: Ezequiel Garcia Signed-off-by: Boris Brezillon Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/rockchip/vpu/rk3288_vpu_hw_jpeg_enc.c | 2 +- drivers/staging/media/rockchip/vpu/rk3399_vpu_hw_jpeg_enc.c | 2 +- drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c | 2 +- drivers/staging/media/rockchip/vpu/rockchip_vpu_enc.c | 2 +- .../rockchip/vpu/{rockchip_vpu_common.h => rockchip_vpu_v4l2.h} | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) commit 7d47b45dc590999094d67571aa9cfec77f648d44 Author: Ezequiel Garcia Date: Tue May 28 13:02:22 2019 -0400 media: rockchip/vpu: Support the Request API Introduce support for the Request API. Although the JPEG encoder does not mandate using the Request API, it's perfectly possible to use it, if the application wants to. Signed-off-by: Ezequiel Garcia Signed-off-by: Boris Brezillon Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../media/rockchip/vpu/rk3399_vpu_hw_jpeg_enc.c | 6 ++++++ drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c | 7 +++++++ drivers/staging/media/rockchip/vpu/rockchip_vpu_enc.c | 19 +++++++++++++++++++ 3 files changed, 32 insertions(+) commit b1c6cc64dd140df856ef9a3265a22772bf819f88 Author: Ezequiel Garcia Date: Tue May 28 13:02:21 2019 -0400 media: rockchip/vpu: Open-code media controller register In preparation to support decoders, using a single memory-to-memory device, we need to roll our own media controller entities registration. To do that, we define a rockchip_vpu_func object that embeds the video_device object plus all the elements that are needed to attach this vdev to the media device. Signed-off-by: Ezequiel Garcia Signed-off-by: Boris Brezillon Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/rockchip/vpu/rockchip_vpu.h | 39 +++- .../staging/media/rockchip/vpu/rockchip_vpu_drv.c | 207 ++++++++++++++++++--- 2 files changed, 215 insertions(+), 31 deletions(-) commit f09415f507c478a0916647b3af62720c8fab0d53 Author: Oded Gabbay Date: Wed May 29 17:52:04 2019 +0300 habanalabs: set Goya CPU to use ASIC MMU This patch configures the Goya CPU to actually go through the MMU for translation. The configuration is done after the configuration of the relevant MMU mappings. Signed-off-by: Oded Gabbay drivers/misc/habanalabs/goya/goya.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) commit 0a4f091c12b3eacfbae361ee86427b2c766e37a3 Author: Boris Brezillon Date: Tue May 28 13:02:20 2019 -0400 media: rockchip/vpu: Use v4l2_apply_frmsize_constraints() where appropriate Use the v4l2_apply_frmsize_constraints() helper instead of open-coding it. Signed-off-by: Boris Brezillon Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../staging/media/rockchip/vpu/rockchip_vpu_enc.c | 44 +++++++--------------- 1 file changed, 14 insertions(+), 30 deletions(-) commit 32cddf9c94d81c4cd3c63fd1fe8ea9b98feac7e5 Author: Boris Brezillon Date: Tue May 28 13:02:18 2019 -0400 media: v4l2-common: Add an helper to apply frmsize constraints The rockchip VPU driver is open-coding this logic which seems pretty generic. Let's provide an helper to apply the min/max and alignment constraints on width/height. Signed-off-by: Boris Brezillon Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-common.c | 27 +++++++++++++++++++++++++++ include/media/v4l2-common.h | 2 ++ 2 files changed, 29 insertions(+) commit ce57a82f8a8dfd9c6eef3b99bf9b3677933210c0 Author: Boris Brezillon Date: Tue May 28 13:02:17 2019 -0400 media: v4l2-common: Fix v4l2_fill_pixfmt[_mp]() prototypes Width/height and 4CC formats are expressed using u32 types everywhere, let's fix the v4l2_fill_pixfmt[_mp]() prototypes to do the same. Signed-off-by: Boris Brezillon Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-common.c | 5 +++-- include/media/v4l2-common.h | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) commit 64b42d8eee9b57d1329eeb338c3c30171a14cdbd Author: Hans Verkuil Date: Wed May 29 04:22:15 2019 -0400 media: cec-adap: fix regression in ping sanity check Commit b6c96e156825 inadvertently also dropped the 'msg->len > 1' test from the preceding sanity check. This caused compliance test failures. Fixes: b6c96e156825 ("media: cec: allow any initiator for Ping and Image/Text View On") Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/cec/cec-adap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 50710eeefbc1ed25375942aad0c4d1eb4af0f330 Author: Kefeng Wang Date: Mon May 27 08:14:55 2019 -0400 media: saa7164: fix remove_proc_entry warning if saa7164_proc_create() fails, saa7164_fini() will trigger a warning, name 'saa7164' WARNING: CPU: 1 PID: 6311 at fs/proc/generic.c:672 remove_proc_entry+0x1e8/0x3a0 ? remove_proc_entry+0x1e8/0x3a0 ? try_stop_module+0x7b/0x240 ? proc_readdir+0x70/0x70 ? rcu_read_lock_sched_held+0xd7/0x100 saa7164_fini+0x13/0x1f [saa7164] __x64_sys_delete_module+0x30c/0x480 ? __ia32_sys_delete_module+0x480/0x480 ? __x64_sys_clock_gettime+0x11e/0x1c0 ? __x64_sys_timer_create+0x1a0/0x1a0 ? trace_hardirqs_off_caller+0x40/0x180 ? do_syscall_64+0x18/0x450 do_syscall_64+0x9f/0x450 entry_SYSCALL_64_after_hwframe+0x49/0xbe Fix it by checking the return of proc_create_single() before calling remove_proc_entry(). Signed-off-by: Kefeng Wang Signed-off-by: Hans Verkuil [hverkuil-cisco@xs4all.nl: use 0444 instead of S_IRUGO] [hverkuil-cisco@xs4all.nl: use pr_info instead of KERN_INFO] Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/saa7164/saa7164-core.c | 33 +++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) commit 518fa4e0e0da97ea2e17c95ab57647ce748a96e2 Author: Hans Verkuil Date: Mon May 27 05:31:13 2019 -0400 media: mc-device.c: don't memset __user pointer contents You can't memset the contents of a __user pointer. Instead, call copy_to_user to copy links.reserved (which is zeroed) to the user memory. This fixes this sparse warning: SPARSE:drivers/media/mc/mc-device.c drivers/media/mc/mc-device.c:521:16: warning: incorrect type in argument 1 (different address spaces) Fixes: f49308878d720 ("media: media_device_enum_links32: clean a reserved field") Signed-off-by: Hans Verkuil Reviewed-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/mc/mc-device.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 3e6a515ff4d40b690511a250ceb11a6e1eba4081 Author: Hans Verkuil Date: Mon May 27 05:11:32 2019 -0400 media: media-ioc-enum-links.rst: fix incorrect reserved field documentation The reserved field array for struct media_link_desc has length 2, not 4. And the reserved field array of struct media_links_enum was never documented at all. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/mediactl/media-ioc-enum-links.rst | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit a89e9b8abf82725e4ac96100e07c8104dbe8a240 Author: Eric W. Biederman Date: Wed May 15 10:11:09 2019 -0500 signal: Remove the signal number and task parameters from force_sig_info force_sig_info always delivers to the current task and the signal parameter always matches info.si_signo. So remove those parameters to make it a simpler less error prone interface, and to make it clear that none of the callers are doing anything clever. This guarantees that force_sig_info will not grow any new buggy callers that attempt to call force_sig on a non-current task, or that pass an signal number that does not match info.si_signo. Signed-off-by: "Eric W. Biederman" include/linux/ptrace.h | 2 +- include/linux/sched/signal.h | 2 +- kernel/seccomp.c | 2 +- kernel/signal.c | 14 +++++++------- 4 files changed, 10 insertions(+), 10 deletions(-) commit 59c0e696a6c0fe6a8d718a43aecd72347db6a7f0 Author: Eric W. Biederman Date: Thu Feb 7 11:01:20 2019 -0600 signal: Factor force_sig_info_to_task out of force_sig_info All callers of force_sig_info pass info.si_signo in for the signal by definition as well as in practice. Further all callers of force_sig_info except force_sig_fault_to_task pass current as the target task to force_sig_info. Factor out a static force_sig_info_to_task that force_sig_fault_to_task can call. This prepares the way for force_sig_info to have it's task and signal parameters removed. Signed-off-by: "Eric W. Biederman" kernel/signal.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit ffafd23b2cf14093b559c3e33b427058ce8aa577 Author: Eric W. Biederman Date: Tue May 14 19:17:47 2019 -0500 signal: Generate the siginfo in force_sig In preparation for removing the special case in force_sig_info for only having a signal number generate an appropriate siginfo in force_sig the last caller of force_sig_info that does not pass a filled out siginfo. Signed-off-by: "Eric W. Biederman" kernel/signal.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 8ad23dea808042ffb8bb1b45111af6ddc1bac5d3 Author: Eric W. Biederman Date: Wed May 15 22:23:32 2019 -0500 signal: Move the computation of force into send_signal and correct it. Forcing a signal or not allowing a pid namespace init to ignore SIGKILL or SIGSTOP is more cleanly computed in send_signal. There are two cases where we don't allow a pid namespace init to ignore SIGKILL or SIGSTOP. If the sending process is from an ancestor pid namespace and as such is effectively the god to the target process, and if the it is the kernel that is sending the signal, not another application. It is known that a process is from an ancestor pid namespace if it can see it's target but it's target does not have a pid for the sender in it's pid namespace. It is know that a signal is sent from the kernel if si_code is set to SI_KERNEL or info is SEND_SIG_PRIV (which ultimately generates a signal with si_code == SI_KERNEL). The only signals that matter are SIGKILL and SIGSTOP neither of which can really be caught, and both of which always have a siginfo layout that includes si_uid and si_pid. Therefore we never need to worry about forcing a signal when si_pid and si_uid are absent. So handle the two special cases of info and the case when si_pid and si_uid are present. Signed-off-by: "Eric W. Biederman" kernel/signal.c | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) commit 8917bef336f5301edd616cfa97b97d0319fd0496 Author: Eric W. Biederman Date: Wed May 15 22:56:17 2019 -0500 signal: Properly set TRACE_SIGNAL_LOSE_INFO in __send_signal Any time siginfo is not stored in the signal queue information is lost. Therefore set TRACE_SIGNAL_LOSE_INFO every time the code does not allocate a signal queue entry, and a queue overflow abort is not triggered. Fixes: ba005e1f4172 ("tracepoint: Add signal loss events") Signed-off-by: "Eric W. Biederman" kernel/signal.c | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) commit 2e1661d2673667d886cd40ad9f414cb6db48d8da Author: Eric W. Biederman Date: Thu May 23 11:04:24 2019 -0500 signal: Remove the task parameter from force_sig_fault As synchronous exceptions really only make sense against the current task (otherwise how are you synchronous) remove the task parameter from from force_sig_fault to make it explicit that is what is going on. The two known exceptions that deliver a synchronous exception to a stopped ptraced task have already been changed to force_sig_fault_to_task. The callers have been changed with the following emacs regular expression (with obvious variations on the architectures that take more arguments) to avoid typos: force_sig_fault[(]\([^,]+\)[,]\([^,]+\)[,]\([^,]+\)[,]\W+current[)] -> force_sig_fault(\1,\2,\3) Signed-off-by: "Eric W. Biederman" arch/alpha/kernel/traps.c | 2 +- arch/alpha/mm/fault.c | 4 ++-- arch/arc/kernel/traps.c | 2 +- arch/arc/mm/fault.c | 4 ++-- arch/arm/kernel/ptrace.c | 2 +- arch/arm/kernel/traps.c | 2 +- arch/arm/mm/alignment.c | 2 +- arch/arm/mm/fault.c | 2 +- arch/arm64/kernel/traps.c | 2 +- arch/c6x/kernel/traps.c | 2 +- arch/csky/abiv1/alignment.c | 2 +- arch/csky/abiv2/fpu.c | 2 +- arch/csky/kernel/traps.c | 2 +- arch/csky/mm/fault.c | 4 ++-- arch/hexagon/kernel/traps.c | 2 +- arch/hexagon/mm/vm_fault.c | 4 ++-- arch/ia64/kernel/brl_emu.c | 6 ++--- arch/ia64/kernel/traps.c | 18 +++++++------- arch/ia64/kernel/unaligned.c | 2 +- arch/ia64/mm/fault.c | 2 +- arch/m68k/kernel/traps.c | 4 ++-- arch/m68k/mm/fault.c | 4 ++-- arch/microblaze/kernel/exceptions.c | 2 +- arch/microblaze/mm/fault.c | 2 +- arch/mips/kernel/traps.c | 12 +++++----- arch/mips/mm/fault.c | 4 ++-- arch/nds32/kernel/fpu.c | 2 +- arch/nds32/kernel/traps.c | 4 ++-- arch/nds32/mm/fault.c | 4 ++-- arch/nios2/kernel/traps.c | 2 +- arch/openrisc/kernel/traps.c | 8 +++---- arch/openrisc/mm/fault.c | 4 ++-- arch/parisc/kernel/traps.c | 14 +++++------ arch/parisc/kernel/unaligned.c | 4 ++-- arch/parisc/math-emu/driver.c | 2 +- arch/parisc/mm/fault.c | 2 +- arch/powerpc/kernel/process.c | 2 +- arch/powerpc/kernel/traps.c | 4 ++-- arch/powerpc/mm/fault.c | 2 +- arch/powerpc/platforms/cell/spufs/fault.c | 9 ++++--- arch/riscv/kernel/traps.c | 4 ++-- arch/s390/kernel/traps.c | 6 ++--- arch/s390/mm/fault.c | 6 ++--- arch/sh/kernel/hw_breakpoint.c | 2 +- arch/sh/kernel/traps_32.c | 4 ++-- arch/sh/math-emu/math.c | 2 +- arch/sh/mm/fault.c | 2 +- arch/sparc/kernel/process_64.c | 2 +- arch/sparc/kernel/sys_sparc_32.c | 2 +- arch/sparc/kernel/sys_sparc_64.c | 2 +- arch/sparc/kernel/traps_32.c | 4 ++-- arch/sparc/kernel/traps_64.c | 39 ++++++++++++++----------------- arch/sparc/mm/fault_32.c | 2 +- arch/sparc/mm/fault_64.c | 2 +- arch/um/kernel/ptrace.c | 3 +-- arch/um/kernel/trap.c | 12 ++++------ arch/unicore32/kernel/traps.c | 2 +- arch/unicore32/mm/fault.c | 2 +- arch/x86/entry/vsyscall/vsyscall_64.c | 2 +- arch/x86/kernel/ptrace.c | 2 +- arch/x86/kernel/traps.c | 4 ++-- arch/x86/kernel/umip.c | 2 +- arch/x86/mm/fault.c | 7 +++--- arch/xtensa/kernel/traps.c | 2 +- arch/xtensa/mm/fault.c | 4 ++-- include/linux/sched/signal.h | 3 +-- kernel/signal.c | 5 ++-- 67 files changed, 137 insertions(+), 151 deletions(-) commit 91ca180dbdd687d45fe4aab055b02d29c91b90df Author: Eric W. Biederman Date: Wed Feb 6 16:39:13 2019 -0600 signal: Use force_sig_fault_to_task for the two calls that don't deliver to current In preparation for removing the task parameter from force_sig_fault introduce force_sig_fault_to_task and use it for the two cases where it matters. On mips force_fcr31_sig calls force_sig_fault and is called on either the current task, or a task that is suspended and is being switched to by the scheduler. This is safe because the task being switched to by the scheduler is guaranteed to be suspended. This ensures that task->sighand is stable while the signal is delivered to it. On parisc user_enable_single_step calls force_sig_fault and is in turn called by ptrace_request. The function ptrace_request always calls user_enable_single_step on a child that is stopped for tracing. The child being traced and not reaped ensures that child->sighand is not NULL, and that the child will not change child->sighand. Signed-off-by: "Eric W. Biederman" arch/mips/kernel/traps.c | 2 +- arch/parisc/kernel/ptrace.c | 6 +++--- include/linux/sched/signal.h | 4 ++++ kernel/signal.c | 12 +++++++++++- 4 files changed, 19 insertions(+), 5 deletions(-) commit 351b6825b3a9f70bab080fba67aec104ff9a41d6 Author: Eric W. Biederman Date: Thu Feb 7 09:25:08 2019 -0600 signal: Explicitly call force_sig_fault on current Update the calls of force_sig_fault that pass in a variable that is set to current earlier to explicitly use current. This is to make the next change that removes the task parameter from force_sig_fault easier to verify. Signed-off-by: "Eric W. Biederman" arch/arc/kernel/traps.c | 2 +- arch/arc/mm/fault.c | 4 ++-- arch/arm/mm/fault.c | 2 +- arch/mips/mm/fault.c | 4 ++-- arch/nds32/kernel/traps.c | 2 +- arch/nds32/mm/fault.c | 4 ++-- arch/openrisc/mm/fault.c | 4 ++-- arch/riscv/kernel/traps.c | 2 +- arch/sh/math-emu/math.c | 2 +- arch/unicore32/mm/fault.c | 2 +- arch/x86/kernel/ptrace.c | 2 +- arch/x86/kernel/traps.c | 4 ++-- arch/x86/kernel/umip.c | 2 +- arch/x86/mm/fault.c | 6 +++--- 14 files changed, 21 insertions(+), 21 deletions(-) commit ec74e9205e064af6a7076faabe649335acc78b69 Author: Eric W. Biederman Date: Thu Feb 7 10:05:12 2019 -0600 signal/unicore32: Remove tsk parameter from __do_user_fault The __do_user_fault function is always called with tsk == current. Make that obvious by removing the tsk parameter. This makes it clear that __do_user_fault calls force_sig_fault on the current task. Signed-off-by: "Eric W. Biederman" arch/unicore32/mm/fault.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit fd65cc848e3f50281eb163e2d54f1e33f28e15bf Author: Eric W. Biederman Date: Tue Feb 5 19:39:11 2019 -0600 signal/arm: Remove tsk parameter from __do_user_fault The __do_user_fault function is always called with tsk == current. Make that obvious by removing the tsk parameter. This makes it clear that __do_user_fault calls force_sig_fault on the current task. Signed-off-by: "Eric W. Biederman" arch/arm/mm/fault.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit e9a06509113619938d35181e79e92e370dfd3e00 Author: Eric W. Biederman Date: Tue Feb 5 19:35:42 2019 -0600 signal/arm: Remove tsk parameter from ptrace_break The ptrace_break function is always called with tsk == current. Make that obvious by removing the tsk parameter. This also makes it clear that ptrace_break calls force_sig_fault on the current task. Signed-off-by: "Eric W. Biederman" arch/arm/include/asm/traps.h | 2 +- arch/arm/kernel/ptrace.c | 6 +++--- arch/arm/kernel/traps.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit 07bd88a9a5dd452986385bf858ee185f8db1e94c Author: Eric W. Biederman Date: Tue Feb 5 19:23:17 2019 -0600 signal/nds32: Remove tsk parameter from send_sigtrap The send_sigtrap function is always called with tsk == current. Make that obvious by removing the tsk parameter. This also makes it clear that send_sigtrap always calls force_sig_fault on the current task. Signed-off-by: "Eric W. Biederman" arch/nds32/kernel/traps.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 6f25a967646aa3204d78eb03f72798169bb18607 Author: Eric W. Biederman Date: Tue Feb 5 19:10:48 2019 -0600 signal/riscv: Remove tsk parameter from do_trap The do_trap function is always called with tsk == current. Make that obvious by removing the tsk parameter. This also makes it clear that do_trap calls force_sig_fault on the current task. Signed-off-by: "Eric W. Biederman" arch/riscv/include/asm/bug.h | 2 +- arch/riscv/kernel/traps.c | 7 ++++--- arch/riscv/mm/fault.c | 6 +++--- 3 files changed, 8 insertions(+), 7 deletions(-) commit e1656829719f9e8005ae281984b5624fc2604ad3 Author: Eric W. Biederman Date: Tue Feb 5 18:38:15 2019 -0600 signal/sh: Remove tsk parameter from force_sig_info_fault The force_sig_info_fault function is always called with tsk == current. Make that explicit by removing the tsk parameter. This also makes it clear that the sh force_sig_info_fault passes current into force_sig_fault. Signed-off-by: "Eric W. Biederman" arch/sh/mm/fault.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 9d631759818b9e53795ddaea2d3e807a485cd294 Author: Eric W. Biederman Date: Tue Feb 5 18:35:08 2019 -0600 signal/um: Remove task parameter from send_sigtrap The send_sigtrap function is always called with task == current. Make that explicit by removing the task parameter. This also makes it clear that the uml send_sigtrap passes current into force_sig_fault. Signed-off-by: "Eric W. Biederman" arch/um/kernel/ptrace.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 28d42ea14e489047caeaa89496a3ad7e0ae6a49f Author: Eric W. Biederman Date: Tue Feb 5 18:25:11 2019 -0600 signal/x86: Remove task parameter from send_sigtrap The send_sigtrap function is always called with task == current. Make that explicit by removing the task parameter. This also makes it clear that the x86 send_sigtrap passes current into force_sig_fault. Reviewed-by: Thomas Gleixner Signed-off-by: "Eric W. Biederman" arch/x86/include/asm/ptrace.h | 3 +-- arch/x86/kernel/ptrace.c | 7 ++++--- arch/x86/kernel/traps.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) commit 95b5a8b83e06ccc44feff2c0cfb1881468596e7c Author: Oded Gabbay Date: Wed May 29 17:30:04 2019 +0300 habanalabs: add MMU mappings for Goya CPU This patch adds the necessary MMU mappings for the Goya CPU to access the device DRAM and the host memory. The first 256MB of the device DRAM is being mapped. That's where the F/W is running. The 2MB area located on the host memory for the purpose of communication between the driver and the device CPU is also being mapped. Signed-off-by: Oded Gabbay drivers/misc/habanalabs/debugfs.c | 7 +- drivers/misc/habanalabs/goya/goya.c | 126 +++++++++++++++++++++++++++++++++-- drivers/misc/habanalabs/goya/goyaP.h | 12 ++-- drivers/misc/habanalabs/habanalabs.h | 6 +- 4 files changed, 137 insertions(+), 14 deletions(-) commit 15b5c5b1dce9bc19a0f00697ce64ecd819cfd109 Author: Wen Yang Date: Mon May 6 03:05:17 2019 -0400 media: mtk-vcodec: fix leaked of_node references The call to of_find_device_by_node returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings: drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_pm.c:60:3-9: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 38, but without a corresponding object release within this function. drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_pm.c:63:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 38, but without a corresponding object release within this function. drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_pm.c:72:3-9: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 38, but without a corresponding object release within this function. Signed-off-by: Wen Yang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c8d0ccfd73dab35f60cb4f27d9fb7eb07c104e77 Author: Wen Yang Date: Mon May 6 03:05:16 2019 -0400 media: mtk-vpu: fix leaked of_node references The call to of_parse_phandle returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings: drivers/media/platform/mtk-vpu/mtk_vpu.c:477:1-7: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 464, but without a corresponding object release within this function. Signed-off-by: Wen Yang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mtk-vpu/mtk_vpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 10a34367ce097d5cd62ea526f5bcc809f99b5eb3 Author: Mauro Carvalho Chehab Date: Tue May 28 17:42:56 2019 -0400 media: cx25840: Address several coding style issues As we did a major change on this file, let's take the moment to cleanup several coding style issues on it. This patch was partially done with the help of two tools: ./scripts/checkpatch.pl --fix-inplace --strict astyle --indent=tab=8 --style=linux But manually adjusted in order to fit our style. Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/cx25840/cx25840-core.c | 915 ++++++++++++++++++++----------- drivers/media/i2c/cx25840/cx25840-core.h | 15 +- include/media/drv-intf/cx25840.h | 33 +- 3 files changed, 619 insertions(+), 344 deletions(-) commit 63f9fa925e021a832d706a7781e7b9c750909368 Author: Mauro Carvalho Chehab Date: Tue May 28 17:42:57 2019 -0400 media: cxusb: fix several coding style issues As this driver had a major change, let's take the opportunity and do some coding style cleanup, in order to make it compliant with Kernel's style. This patch was partially done with the help of two tools: ./scripts/checkpatch.pl --fix-inplace --strict astyle --indent=tab=8 --style=linux But manually adjusted in order to fit our style. Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/cxusb.c | 365 ++++++++++++++++++++++---------------- drivers/media/usb/dvb-usb/cxusb.h | 8 +- 2 files changed, 217 insertions(+), 156 deletions(-) commit e9ad78bc0c548104bf612c20a7cfdea9b93a0059 Author: Mauro Carvalho Chehab Date: Tue May 28 16:12:53 2019 -0400 media: cxusb-analog: Fix some coding style issues This is a new file, so the best moment to make it to follow Kernel coding style is now. This patch was partially generated with: ./scripts/checkpatch.pl --fix-inplace --strict -f drivers/media/usb/dvb-usb/cxusb-analog.c And manually checked and adjusted to avoid any warnings. Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/cxusb-analog.c | 67 ++++++++++++++++---------------- 1 file changed, 34 insertions(+), 33 deletions(-) commit a10f361d176ce53c72d5b1b2e2913a1a222ee393 Author: Jani Nikula Date: Wed May 29 11:21:50 2019 +0300 Revert "drm/i915: Expand subslice mask" This reverts commit 1ac159e23c2c ("drm/i915: Expand subslice mask"), which kills ICL due to GEM_BUG_ON() sanity checks before CI even gets a chance to do anything. The commit exposes an issue in commit 1e40d4aea57b ("drm/i915/cnl: Implement WaProgramMgsrForCorrectSliceSpecificMmioReads"), which will also need to be addressed. There's a proposed fix [1], but considering the seeming uncertainty with the fix as well as the size of the regressing commit (in this context, the one that actually brings down ICL), this warrants a revert to get ICL working, and gives us time to get all of this right without rushing. Even if this means shooting the messenger. <3>[ 9.426327] intel_sseu_get_subslices:46 GEM_BUG_ON(slice >= sseu->max_slices) <4>[ 9.426355] ------------[ cut here ]------------ <2>[ 9.426357] kernel BUG at drivers/gpu/drm/i915/gt/intel_sseu.c:46! <4>[ 9.426371] invalid opcode: 0000 [#1] PREEMPT SMP NOPTI <4>[ 9.426377] CPU: 1 PID: 364 Comm: systemd-udevd Not tainted 5.2.0-rc2-CI-CI_DRM_6159+ #1 <4>[ 9.426385] Hardware name: Intel Corporation Ice Lake Client Platform/IceLake U DDR4 SODIMM PD RVP TLC, BIOS ICLSFWR1.R00.3183.A00.1905020411 05/02/2019 <4>[ 9.426444] RIP: 0010:intel_sseu_get_subslices+0x8a/0xe0 [i915] <4>[ 9.426452] Code: d5 76 b7 e0 48 8b 35 9d 24 21 00 49 c7 c0 07 f0 72 a0 b9 2e 00 00 00 48 c7 c2 00 8e 6d a0 48 c7 c7 a5 14 5b a0 e8 36 3c be e0 <0f> 0b 48 c7 c1 80 d5 6f a0 ba 30 00 00 00 48 c7 c6 00 8e 6d a0 48 <4>[ 9.426468] RSP: 0018:ffffc9000037b9c8 EFLAGS: 00010282 <4>[ 9.426475] RAX: 000000000000000f RBX: 0000000000000000 RCX: 0000000000000000 <4>[ 9.426482] RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffff88849e346f98 <4>[ 9.426490] RBP: ffff88848a200000 R08: 0000000000000004 R09: ffff88849d50b000 <4>[ 9.426497] R10: 0000000000000000 R11: ffff88849e346f98 R12: ffff88848a209e78 <4>[ 9.426505] R13: 0000000003000000 R14: ffff88848a20b1a8 R15: 0000000000000000 <4>[ 9.426513] FS: 00007f73d5ae8680(0000) GS:ffff88849fc80000(0000) knlGS:0000000000000000 <4>[ 9.426521] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 <4>[ 9.426527] CR2: 0000561417b01260 CR3: 0000000494764003 CR4: 0000000000760ee0 <4>[ 9.426535] PKRU: 55555554 <4>[ 9.426538] Call Trace: <4>[ 9.426585] wa_init_mcr+0xd5/0x110 [i915] <4>[ 9.426597] ? lock_acquire+0xa6/0x1c0 <4>[ 9.426645] icl_gt_workarounds_init+0x21/0x1a0 [i915] <4>[ 9.426694] ? i915_driver_load+0xfcf/0x18a0 [i915] <4>[ 9.426739] gt_init_workarounds+0x14c/0x230 [i915] <4>[ 9.426748] ? _raw_spin_unlock_irq+0x24/0x50 <4>[ 9.426789] intel_gt_init_workarounds+0x1b/0x30 [i915] <4>[ 9.426835] i915_driver_load+0xfd7/0x18a0 [i915] <4>[ 9.426843] ? lock_acquire+0xa6/0x1c0 <4>[ 9.426850] ? __pm_runtime_resume+0x4f/0x80 <4>[ 9.426857] ? _raw_spin_unlock_irqrestore+0x4c/0x60 <4>[ 9.426863] ? _raw_spin_unlock_irqrestore+0x4c/0x60 <4>[ 9.426870] ? lockdep_hardirqs_on+0xe3/0x1b0 <4>[ 9.426915] i915_pci_probe+0x29/0xa0 [i915] <4>[ 9.426923] pci_device_probe+0x9e/0x120 <4>[ 9.426930] really_probe+0xea/0x3c0 <4>[ 9.426936] driver_probe_device+0x10b/0x120 <4>[ 9.426942] device_driver_attach+0x4a/0x50 <4>[ 9.426948] __driver_attach+0x97/0x130 <4>[ 9.426954] ? device_driver_attach+0x50/0x50 <4>[ 9.426960] bus_for_each_dev+0x74/0xc0 <4>[ 9.426966] bus_add_driver+0x13f/0x210 <4>[ 9.426971] ? 0xffffffffa083b000 <4>[ 9.426976] driver_register+0x56/0xe0 <4>[ 9.426982] ? 0xffffffffa083b000 <4>[ 9.426987] do_one_initcall+0x58/0x300 <4>[ 9.426994] ? do_init_module+0x1d/0x1f6 <4>[ 9.427001] ? rcu_read_lock_sched_held+0x6f/0x80 <4>[ 9.427007] ? kmem_cache_alloc_trace+0x261/0x290 <4>[ 9.427014] do_init_module+0x56/0x1f6 <4>[ 9.427020] load_module+0x24d1/0x2990 <4>[ 9.427032] ? __se_sys_finit_module+0xd3/0xf0 <4>[ 9.427037] __se_sys_finit_module+0xd3/0xf0 <4>[ 9.427047] do_syscall_64+0x55/0x1c0 <4>[ 9.427053] entry_SYSCALL_64_after_hwframe+0x49/0xbe <4>[ 9.427059] RIP: 0033:0x7f73d5609839 <4>[ 9.427064] Code: 00 f3 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 1f f6 2c 00 f7 d8 64 89 01 48 <4>[ 9.427082] RSP: 002b:00007ffdf34477b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 <4>[ 9.427091] RAX: ffffffffffffffda RBX: 00005559fd5d7b40 RCX: 00007f73d5609839 <4>[ 9.427099] RDX: 0000000000000000 RSI: 00007f73d52e8145 RDI: 000000000000000f <4>[ 9.427106] RBP: 00007f73d52e8145 R08: 0000000000000000 R09: 00007ffdf34478d0 <4>[ 9.427114] R10: 000000000000000f R11: 0000000000000246 R12: 0000000000000000 <4>[ 9.427121] R13: 00005559fd5c90f0 R14: 0000000000020000 R15: 00005559fd5d7b40 <4>[ 9.427131] Modules linked in: i915(+) mei_hdcp x86_pkg_temp_thermal coretemp snd_hda_intel crct10dif_pclmul crc32_pclmul snd_hda_codec snd_hwdep e1000e snd_hda_core ghash_clmulni_intel ptp snd_pcm cdc_ether usbnet mii pps_core mei_me mei prime_numbers btusb btrtl btbcm btintel bluetooth ecdh_generic ecc <4>[ 9.427254] ---[ end trace af3eeb543bd66e66 ]--- [1] http://patchwork.freedesktop.org/patch/msgid/20190528200655.11605-1-chris@chris-wilson.co.uk References: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6159/fi-icl-u2/pstore0-1517155098_Oops_1.log References: 1e40d4aea57b ("drm/i915/cnl: Implement WaProgramMgsrForCorrectSliceSpecificMmioReads") Fixes: 1ac159e23c2c ("drm/i915: Expand subslice mask") Cc: Chris Wilson Cc: Daniele Ceraolo Spurio Cc: Joonas Lahtinen Cc: Lionel Landwerlin Cc: Manasi Navare Cc: Michel Thierry Cc: Mika Kuoppala Cc: Oscar Mateo Cc: Stuart Summers Cc: Tvrtko Ursulin Cc: Yunwei Zhang Acked-by: Daniel Vetter Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190529082150.31526-1-jani.nikula@intel.com drivers/gpu/drm/i915/gt/intel_engine_cs.c | 24 +----- drivers/gpu/drm/i915/gt/intel_engine_types.h | 30 +++---- drivers/gpu/drm/i915/gt/intel_hangcheck.c | 3 +- drivers/gpu/drm/i915/gt/intel_sseu.c | 47 +---------- drivers/gpu/drm/i915/gt/intel_sseu.h | 27 +----- drivers/gpu/drm/i915/gt/intel_workarounds.c | 2 +- drivers/gpu/drm/i915/i915_debugfs.c | 40 +++++---- drivers/gpu/drm/i915/i915_drv.c | 6 +- drivers/gpu/drm/i915/i915_gpu_error.c | 5 +- drivers/gpu/drm/i915/i915_query.c | 10 ++- drivers/gpu/drm/i915/intel_device_info.c | 122 +++++++++++++++------------ 11 files changed, 116 insertions(+), 200 deletions(-) commit 5a433fccafc73e1361f65c4423b0099bbd18f67f Author: Mauro Carvalho Chehab Date: Wed May 29 09:43:02 2019 -0400 media: staging: allegro: cleanup two warnings Sparse complains about two issues when building with i386 and COMPILE_TEST: drivers/staging/media/allegro-dvt/allegro-core.c:1849:36: warning: constant 0xffffffff00000000UL is so big it is unsigned long long drivers/staging/media/allegro-dvt/allegro-core.c:865:24: error: incompatible types in comparison expression (different type sizes) Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/allegro-dvt/allegro-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 578a3ab12705aae0101f590d3a77ecafe22f9453 Author: Hans Verkuil Date: Wed May 29 08:46:32 2019 -0400 media: allegro-dvt: fix build failure nal-h264.h is a local header, not a global one. Use "" instead of <>. Fixed this compile error: CC drivers/staging/media/allegro-dvt/nal-h264.o drivers/staging/media/allegro-dvt/nal-h264.c:24:10: fatal error: nal-h264.h: No such file or directory #include ^~~~~~~~~~~~ Signed-off-by: Hans Verkuil Reviewed-by: Michael Tretter Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/allegro-dvt/nal-h264.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e672db03ab0e43e41ab6f8b2156a10d6e40f243d Author: Stanislav Fomichev Date: Tue May 28 14:14:44 2019 -0700 bpf: tracing: properly use bpf_prog_array api Now that we don't have __rcu markers on the bpf_prog_array helpers, let's use proper rcu_dereference_protected to obtain array pointer under mutex. Cc: Steven Rostedt Cc: Ingo Molnar Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann kernel/trace/bpf_trace.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit dbcc1ba26e43bd32cb308e50ac4cb4a29d2f5967 Author: Stanislav Fomichev Date: Tue May 28 14:14:43 2019 -0700 bpf: cgroup: properly use bpf_prog_array api Now that we don't have __rcu markers on the bpf_prog_array helpers, let's use proper rcu_dereference_protected to obtain array pointer under mutex. We also don't need __rcu annotations on cgroup_bpf.inactive since it's not read/updated concurrently. v4: * drop cgroup_rcu_xyz wrappers and use rcu APIs directly; presumably should be more clear to understand which mutex/refcount protects each particular place v3: * amend cgroup_rcu_dereference to include percpu_ref_is_dying; cgroup_bpf is now reference counted and we don't hold cgroup_mutex anymore in cgroup_bpf_release v2: * replace xchg with rcu_swap_protected Cc: Roman Gushchin Signed-off-by: Stanislav Fomichev Acked-by: Roman Gushchin Signed-off-by: Daniel Borkmann include/linux/bpf-cgroup.h | 2 +- kernel/bpf/cgroup.c | 28 +++++++++++++++++----------- 2 files changed, 18 insertions(+), 12 deletions(-) commit 02205d2ed6fe26a8f4fd9e9cec251d1dc7f79316 Author: Stanislav Fomichev Date: Tue May 28 14:14:42 2019 -0700 bpf: media: properly use bpf_prog_array api Now that we don't have __rcu markers on the bpf_prog_array helpers, let's use proper rcu_dereference_protected to obtain array pointer under mutex. Cc: linux-media@vger.kernel.org Cc: Mauro Carvalho Chehab Cc: Sean Young Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann drivers/media/rc/bpf-lirc.c | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) commit 54e9c9d4b506b611228890752d1cfa960e0965e1 Author: Stanislav Fomichev Date: Tue May 28 14:14:41 2019 -0700 bpf: remove __rcu annotations from bpf_prog_array Drop __rcu annotations and rcu read sections from bpf_prog_array helper functions. They are not needed since all existing callers call those helpers from the rcu update side while holding a mutex. This guarantees that use-after-free could not happen. In the next patches I'll fix the callers with missing rcu_dereference_protected to make sparse/lockdep happy, the proper way to use these helpers is: struct bpf_prog_array __rcu *progs = ...; struct bpf_prog_array *p; mutex_lock(&mtx); p = rcu_dereference_protected(progs, lockdep_is_held(&mtx)); bpf_prog_array_length(p); bpf_prog_array_copy_to_user(p, ...); bpf_prog_array_delete_safe(p, ...); bpf_prog_array_copy_info(p, ...); bpf_prog_array_copy(p, ...); bpf_prog_array_free(p); mutex_unlock(&mtx); No functional changes! rcu_dereference_protected with lockdep_is_held should catch any cases where we update prog array without a mutex (I've looked at existing call sites and I think we hold a mutex everywhere). Motivation is to fix sparse warnings: kernel/bpf/core.c:1803:9: warning: incorrect type in argument 1 (different address spaces) kernel/bpf/core.c:1803:9: expected struct callback_head *head kernel/bpf/core.c:1803:9: got struct callback_head [noderef] * kernel/bpf/core.c:1877:44: warning: incorrect type in initializer (different address spaces) kernel/bpf/core.c:1877:44: expected struct bpf_prog_array_item *item kernel/bpf/core.c:1877:44: got struct bpf_prog_array_item [noderef] * kernel/bpf/core.c:1901:26: warning: incorrect type in assignment (different address spaces) kernel/bpf/core.c:1901:26: expected struct bpf_prog_array_item *existing kernel/bpf/core.c:1901:26: got struct bpf_prog_array_item [noderef] * kernel/bpf/core.c:1935:26: warning: incorrect type in assignment (different address spaces) kernel/bpf/core.c:1935:26: expected struct bpf_prog_array_item *[assigned] existing kernel/bpf/core.c:1935:26: got struct bpf_prog_array_item [noderef] * v2: * remove comment about potential race; that can't happen because all callers are in rcu-update section Cc: Roman Gushchin Acked-by: Roman Gushchin Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann include/linux/bpf.h | 12 ++++++------ kernel/bpf/core.c | 37 +++++++++++++------------------------ 2 files changed, 19 insertions(+), 30 deletions(-) commit fe937ea12ec83da6c6bbbdb54a03062155318d0e Author: Alan Maguire Date: Wed May 29 10:48:14 2019 +0100 selftests/bpf: fix compilation error for flow_dissector.c When building the tools/testing/selftest/bpf subdirectory, (running both a local directory "make" and a "make -C tools/testing/selftests/bpf") I keep hitting the following compilation error: prog_tests/flow_dissector.c: In function ‘create_tap’: prog_tests/flow_dissector.c:150:38: error: ‘IFF_NAPI’ undeclared (first use in this function) .ifr_flags = IFF_TAP | IFF_NO_PI | IFF_NAPI | IFF_NAPI_FRAGS, ^ prog_tests/flow_dissector.c:150:38: note: each undeclared identifier is reported only once for each function it appears in prog_tests/flow_dissector.c:150:49: error: ‘IFF_NAPI_FRAGS’ undeclared Adding include/uapi/linux/if_tun.h to tools/include/uapi/linux resolves the problem and ensures the compilation of the file does not depend on having up-to-date kernel headers locally. Signed-off-by: Alan Maguire Signed-off-by: Daniel Borkmann tools/include/uapi/linux/if_tun.h | 114 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) commit 7aa2227affb510c609954000943e4bdce06d112c Author: Oded Gabbay Date: Wed May 29 15:27:48 2019 +0300 habanalabs: initialize MMU context for driver This patch initializes the MMU structures for the kernel context. This is needed before we can configure mappings for the kernel context. Signed-off-by: Oded Gabbay drivers/misc/habanalabs/context.c | 7 +++++++ drivers/misc/habanalabs/mmu.c | 10 ++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) commit 0c1f845772e5d6d1b1739cb938403527bc6b29e1 Author: Chris Wilson Date: Tue May 28 16:40:53 2019 +0100 drm/i915: Avoid refcount_inc on known zero count In intel_wakeref_auto, we use refcount_inc_not_zero to detect the first use and initialise the timer. On doing so, we have to avoid using refcount_inc on that zero count as the debug code flags that as an error: refcount_t: increment on 0; use-after-free. Rearrange the code so that if we know the count is 0 and we are initialising, we explicitly set it to 1. Fixes: b27e35ae5b18 ("drm/i915: Keep user GGTT alive for a minimum of 250ms") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190528154053.22004-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_wakeref.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 707947247e9517b94af5661b504467765edf16c3 Author: Hans Verkuil Date: Thu Apr 4 09:15:00 2019 -0400 media: videobuf2-vmalloc: get_userptr: buffers are always writable In vb2_vmalloc_get_userptr() the framevector is created with the 'write' argument set to false when vb2_create_framevec() is called for OUTPUT buffers. So the pages are marked as read-only. However, userspace will write to these buffers since it will fill in the data to output. Since get_userptr is only called if the userptr of the queued buffer has changed since the last time that same buffer was queued, this will fail when the buffer contents is updated and the buffer is queued again. E.g., userspace fills buffer 1 with the output video and queues it. The first time get_userptr is called and the pages are grabbed and pinned in memory and marked read-only. The second time buffer 1 is filled with different video data and queued again. Since the userptr hasn't changed the get_userptr() callback isn't called again. Since the pages were marked as read-only the new contents isn't updated. Just always call vb2_create_framevec() with FOLL_WRITE to always allow writing to the buffers. Using USERPTR streaming with OUTPUT devices is almost never done. And when it is done it is via v4l2-compliance and a driver like vim2m. But since v4l2-compliance doesn't actually inspect the capture buffer and compare it to the original output buffer, this issue was never noticed. But the vicodec driver actually needs to parse the bitstream in the OUTPUT buffers and any errors there will be immediately noticed. So this time v4l2-compliance failed the USERPTR streaming test. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/common/videobuf2/videobuf2-dma-contig.c | 3 +-- drivers/media/common/videobuf2/videobuf2-dma-sg.c | 3 +-- drivers/media/common/videobuf2/videobuf2-memops.c | 9 ++------- drivers/media/common/videobuf2/videobuf2-vmalloc.c | 3 +-- include/media/videobuf2-memops.h | 3 +-- 5 files changed, 6 insertions(+), 15 deletions(-) commit 37d68ce5274fac8bb0a225f9005492bc53bd2393 Author: Oded Gabbay Date: Wed May 29 14:43:04 2019 +0300 habanalabs: de-couple MMU and VM module initialization This patch initializes the MMU S/W structures before the VM S/W structures, instead of doing that as part of the VM S/W initialization. This is done because we need to configure some MMU mappings for the kernel context, before the VM is initialized. The VM initialization can't be moved earlier because it depends on the size of the DRAM, which is retrieved from the device CPU. Communication with the device CPU will require the MMU mappings to be configured and hence the de-coupling. Signed-off-by: Oded Gabbay drivers/misc/habanalabs/device.c | 23 ++++++++++++++++++++--- drivers/misc/habanalabs/memory.c | 13 +------------ drivers/misc/habanalabs/mmu.c | 6 +----- 3 files changed, 22 insertions(+), 20 deletions(-) commit 0b28d26b9dfa1f4010a8d84c1cb727de41be60d6 Author: Oded Gabbay Date: Wed May 29 14:24:51 2019 +0300 habanalabs: initialize device CPU queues after MMU init This patch changes the order of H/W IP initializations. The MMU needs to be initialized before the device CPU queues, because the CPU will go through the ASIC MMU in order to reach the host memory (where the queues are located). Signed-off-by: Oded Gabbay drivers/misc/habanalabs/asid.c | 2 +- drivers/misc/habanalabs/device.c | 22 ++++++------- drivers/misc/habanalabs/goya/goya.c | 64 ++++++++++++++++--------------------- 3 files changed, 40 insertions(+), 48 deletions(-) commit 97a1aa00c178589a62b973848cfb40132793a1ec Author: Oded Gabbay Date: Thu Jun 6 15:13:10 2019 +0300 docs/habanalabs: update text for some entries in sysfs This patch updates the description of some entries in sysfs for the habanalabs driver. Signed-off-by: Oded Gabbay Documentation/ABI/testing/sysfs-driver-habanalabs | 42 +++++++++++++---------- 1 file changed, 24 insertions(+), 18 deletions(-) commit 29a7aad59de25e56c82e6a3a9f8023d2e8a8423a Author: Oded Gabbay Date: Thu Jun 6 09:28:45 2019 +0300 habanalabs: add rate-limit to an error message This patch changes the print of an error message about mis-configuration of the debug infrastructure to be rate-limited, to prevent flooding of kernel log, as these configuration requests can come at a high rate. Signed-off-by: Oded Gabbay drivers/misc/habanalabs/habanalabs_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 56e53806dc9eb9acdb914f59708ce1d815f3f86c Author: Oded Gabbay Date: Tue Jun 4 15:07:11 2019 +0300 habanalabs: remove simulator dedicated code This patch removes two code sections in the common code that contain code which is only relevant for simulator support (which is not upstreamed). This removal saves the need to update this code upstream, which is not needed anyway. Signed-off-by: Oded Gabbay drivers/misc/habanalabs/device.c | 7 ------- drivers/misc/habanalabs/sysfs.c | 4 ---- 2 files changed, 11 deletions(-) commit 5c823ae188ebc3e12c9fe3cecf08136aa91c8ce9 Author: Dalit Ben Zoor Date: Thu May 30 08:46:02 2019 +0000 habanalabs: restore unsecured registers default values unsecured registers can be changed by the user, and hence should be restored to their default values in context switch Signed-off-by: Dalit Ben Zoor Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/goya/goya.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit 9c46f7b10fff02f7d7f042b6628d0b48b7a1b66d Author: Dalit Ben Zoor Date: Thu May 30 08:46:02 2019 +0000 habanalabs: clear sobs and monitors in context switch On context switch we need to ensure that each user is not be affected by other user, so we need to clear sync objects and monitors in context switch instead of in restore_phase_topology function. Signed-off-by: Dalit Ben Zoor Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/goya/goya.c | 7 +++++++ 1 file changed, 7 insertions(+) commit a513f9a7eca5aa92634f9cf422c60e2d411cc3a4 Author: Dalit Ben Zoor Date: Thu May 30 08:46:01 2019 +0000 habanalabs: make tpc registers secured Set protection bits for some tpc registers that should to be secured. Signed-off-by: Dalit Ben Zoor Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/goya/goya_security.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 81a04d2e9091832710549176db0e46d1a666f9ae Author: Dan Carpenter Date: Wed May 29 14:03:55 2019 +0300 drm/i915: selftest_lrc: Check the correct variable We should check "request[n]" instead of just "request". Fixes: 78e41ddd2198 ("drm/i915: Apply an execution_mask to the virtual_engine") Signed-off-by: Dan Carpenter Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190529110355.GA19119@mwanda drivers/gpu/drm/i915/gt/selftest_lrc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 878344de61d0d5f351a1b84fce009a321be3eb45 Author: Michael Tretter Date: Tue May 28 13:11:20 2019 -0400 media: allegro: add SPS/PPS nal unit writer The allegro hardware encoder does not write SPS/PPS nal units into the encoded video stream. Therefore, we need to write the units in software. The implementation follows Rec. ITU-T H.264 (04/2017) to allow to convert between a C struct and the RBSP representation of the SPS and PPS nal units. The allegro driver writes the nal units into the v4l2 capture buffer in front of the actual video data which is written at an offset by the IP core. The remaining gap is filled with a filler nal unit. [hverkuil-cisco@xs4all.nl: added missing @dev description for nal_h264_read_sps()] [mchehab+samsung@kernel.org: removed uneeded "-ccflags-y $(src)" from Makefile] Signed-off-by: Michael Tretter Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/allegro-dvt/Makefile | 3 +- drivers/staging/media/allegro-dvt/allegro-core.c | 181 ++++ drivers/staging/media/allegro-dvt/nal-h264.c | 1001 ++++++++++++++++++++++ drivers/staging/media/allegro-dvt/nal-h264.h | 208 +++++ 4 files changed, 1392 insertions(+), 1 deletion(-) commit f20387dfd065693ba7ea2788a2f893bf653c9cb8 Author: Michael Tretter Date: Tue May 28 13:11:19 2019 -0400 media: allegro: add Allegro DVT video IP core driver Add a V4L2 mem-to-mem driver for Allegro DVT video IP cores as found in the EV family of the Xilinx ZynqMP SoC. The Zynq UltraScale+ Device Technical Reference Manual uses the term VCU (Video Codec Unit) for the encoder, decoder and system integration block. This driver takes care of interacting with the MicroBlaze MCU that controls the actual IP cores. The IP cores and MCU are integrated in the FPGA. The xlnx_vcu driver is responsible for configuring the clocks and providing information about the codec configuration. The driver currently only supports the H.264 video encoder. Signed-off-by: Michael Tretter Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 7 + drivers/staging/media/Kconfig | 2 + drivers/staging/media/Makefile | 1 + drivers/staging/media/allegro-dvt/Kconfig | 16 + drivers/staging/media/allegro-dvt/Makefile | 4 + drivers/staging/media/allegro-dvt/TODO | 4 + drivers/staging/media/allegro-dvt/allegro-core.c | 2851 ++++++++++++++++++++++ 7 files changed, 2885 insertions(+) commit 8df39e16877ffa7a055a2c35c86df69c37ad73a9 Author: Michael Tretter Date: Tue May 28 13:11:18 2019 -0400 media: dt-bindings: media: Add vendor prefix for allegro Add vendor prefix for Allegro DVT, a provider of H.264/AVC, H.265/HEVC, AVS2, VP9 and AV1 compliance test suites and H.264/AVC, H.265/HEVC, and VP9 encoder, codec and decoder hardware (RTL) IPs. Signed-off-by: Michael Tretter Reviewed-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) commit 156fa8845a5715199d1bb56f8bde4b403de33946 Author: Michael Tretter Date: Tue May 28 13:11:17 2019 -0400 media: dt-bindings: media: document allegro-dvt bindings Add device-tree bindings for the Allegro DVT video IP core found on the Xilinx ZynqMP EV family. Signed-off-by: Michael Tretter Reviewed-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../devicetree/bindings/media/allegro.txt | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) commit 26989c2725a571ef74cb5ac8f9badb8de113147e Author: Hans Verkuil Date: Tue May 28 13:11:16 2019 -0400 media: videobuf2-v4l2: set last_buffer_dequeued in dqbuf last_buffer_dequeued was set to true in __fill_v4l2_buffer, but this is called for qbuf as well. Move it to vb2_dqbuf. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/common/videobuf2/videobuf2-v4l2.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 6eb9b758e307481b116704fc5ea9f9fe84d7094b Author: Maxime Ripard Date: Fri May 24 05:20:31 2019 -0400 media: cedrus: Add H264 decoding support Introduce some basic H264 decoding support in cedrus. So far, only the baseline profile videos have been tested, and some more advanced features used in higher profiles are not even implemented. Reviewed-by: Jernej Skrabec Reviewed-by: Paul Kocialkowski Signed-off-by: Maxime Ripard Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/sunxi/cedrus/Makefile | 3 +- drivers/staging/media/sunxi/cedrus/cedrus.c | 31 ++ drivers/staging/media/sunxi/cedrus/cedrus.h | 38 +- drivers/staging/media/sunxi/cedrus/cedrus_dec.c | 13 + drivers/staging/media/sunxi/cedrus/cedrus_h264.c | 576 ++++++++++++++++++++++ drivers/staging/media/sunxi/cedrus/cedrus_hw.c | 4 + drivers/staging/media/sunxi/cedrus/cedrus_regs.h | 91 ++++ drivers/staging/media/sunxi/cedrus/cedrus_video.c | 9 + 8 files changed, 763 insertions(+), 2 deletions(-) commit 67e84a98af6505d78be9e1a383fadd8de2f9fed0 Author: Maxime Ripard Date: Fri May 24 05:20:30 2019 -0400 media: pixfmt: Add H264_SLICE_RAW format documentation The H264_SLICE_RAW format introduced before is meant for stateless decoders that will need the H264 parsed slice data without the start code. Let's document it. Signed-off-by: Maxime Ripard Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/pixfmt-compressed.rst | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit f183ec61cc2fcaab88d1ace56101224afb79d2b3 Author: Maxime Ripard Date: Fri May 24 05:20:29 2019 -0400 media: pixfmt: Add H264 Slice format The H264_SLICE_RAW format is meant to hold the parsed slice data without the start code. This will be needed by stateless decoders. Signed-off-by: Maxime Ripard Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-ioctl.c | 1 + include/media/h264-ctrls.h | 197 +++++++++++++++++++++++++++++++++++ 2 files changed, 198 insertions(+) commit 1f0545d3ed1df3a915546cee60b56f855962ed69 Author: Pawel Osciak Date: Fri May 24 05:20:28 2019 -0400 media: uapi: Add H264 low-level decoder API compound controls. Stateless video codecs will require both the H264 metadata and slices in order to be able to decode frames. This introduces the definitions for the structures used to pass the metadata from the userspace to the kernel. [hverkuil-cisco@xs4all.nl: add space after . in ".For"] [hverkuil-cisco@xs4all.nl: sync v4l2_ctrl_h264_decode_params struct layout with header] Co-developed-by: Maxime Ripard Reviewed-by: Paul Kocialkowski Reviewed-by: Tomasz Figa Signed-off-by: Pawel Osciak Signed-off-by: Guenter Roeck Signed-off-by: Maxime Ripard Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/biblio.rst | 9 + Documentation/media/uapi/v4l/ext-ctrls-codec.rst | 569 ++++++++++++++++++++++ Documentation/media/uapi/v4l/vidioc-queryctrl.rst | 30 ++ Documentation/media/videodev2.h.rst.exceptions | 5 + drivers/media/v4l2-core/v4l2-ctrls.c | 42 ++ include/media/v4l2-ctrls.h | 13 +- 6 files changed, 667 insertions(+), 1 deletion(-) commit 9d7a1bed070675aac32afc8c4352c74a52a22e4e Author: Jernej Skrabec Date: Sat May 18 13:44:15 2019 -0400 media: cedrus: Allow different mod clock rates Some VPU variants may run at higher clock speeds. They actually need extra speed to be capable of decoding more complex codecs like HEVC or bigger image sizes (4K). Expand variant structure with mod_rate information. Signed-off-by: Jernej Skrabec Acked-by: Maxime Ripard Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/sunxi/cedrus/cedrus.c | 11 ++++++++--- drivers/staging/media/sunxi/cedrus/cedrus.h | 1 + drivers/staging/media/sunxi/cedrus/cedrus_hw.c | 2 +- drivers/staging/media/sunxi/cedrus/cedrus_hw.h | 2 -- 4 files changed, 10 insertions(+), 6 deletions(-) commit b65f1e6546655569ac6c76b4d26c87470dc3f933 Author: Philipp Zabel Date: Fri Apr 12 11:51:34 2019 -0400 media: coda: use v4l2_m2m_buf_copy_metadata Use v4l2_m2m2_buf_copy_metadata to let BIT encoder contexts copy buffer field, timestamp, timestamp flags, and optionally timecode. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-bit.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 7edd18b64a16722a2059c2334657de01be810806 Author: Philipp Zabel Date: Fri Apr 12 11:51:33 2019 -0400 media: coda: add lockdep asserts coda_command_sync, coda_hw_reset, and __coda_start_decoding all expect to be called under the coda_mutex device lock. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-bit.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 8a8621ba0135f47c7d65b413d1cb9141b9422c96 Author: Philipp Zabel Date: Mon May 27 08:20:11 2019 -0400 media: coda: add decoder MPEG-2 profile and level controls The MPEG-2 decoder firmware reports profile and level indication that can be used to set V4L2 MPEG-2 profile and level controls Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/Makefile | 2 +- drivers/media/platform/coda/coda-common.c | 25 ++++++++++++++++++ drivers/media/platform/coda/coda-mpeg2.c | 44 +++++++++++++++++++++++++++++++ drivers/media/platform/coda/coda.h | 6 +++++ 4 files changed, 76 insertions(+), 1 deletion(-) commit 5902bca94ae05316ec7feab9b84cb07ffa5c1175 Author: Philipp Zabel Date: Wed Apr 24 06:43:47 2019 -0400 media: v4l2-ctrl: add MPEG-2 profile and level controls Add MPEG-2 CID definitions for profiles and levels defined in ITU-T Rec. H.262. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/ext-ctrls-codec.rst | 56 ++++++++++++++++++++++++ drivers/media/v4l2-core/v4l2-ctrls.c | 23 ++++++++++ include/uapi/linux/v4l2-controls.h | 18 ++++++++ 3 files changed, 97 insertions(+) commit 23e0b8c65e8e40b8b579084d80cc78130f661fe3 Author: Philipp Zabel Date: Mon May 27 08:19:22 2019 -0400 media: coda: add decoder MPEG-4 profile and level controls The MPEG-4 decoder firmware reports profile and level indication values that can be used to update V4L2 MPEG-4 profile and level controls. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/Makefile | 2 +- drivers/media/platform/coda/coda-common.c | 23 +++++++++++++++ drivers/media/platform/coda/coda-mpeg4.c | 49 +++++++++++++++++++++++++++++++ drivers/media/platform/coda/coda.h | 5 ++++ 4 files changed, 78 insertions(+), 1 deletion(-) commit e89e899f3e3213a98ccf60d832f37ecef7000a5b Author: Brett Creeley Date: Tue Apr 16 10:30:51 2019 -0700 ice: Add a helper to trigger software interrupt Add a new function ice_trigger_sw_intr to trigger interrupts. Signed-off-by: Brett Creeley Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice_lib.c | 24 ++++++++++++++++++------ drivers/net/ethernet/intel/ice/ice_lib.h | 2 ++ drivers/net/ethernet/intel/ice/ice_main.c | 14 +++++--------- 3 files changed, 25 insertions(+), 15 deletions(-) commit 3a9e32bb069435dc11e3c1b4aa7ebeda23b23e32 Author: Md Fahad Iqbal Polash Date: Tue Apr 16 10:30:50 2019 -0700 ice: Configure RSS LUT key only if RSS is enabled Call ice_vsi_cfg_rss_lut_key only if RSS is enabled. Signed-off-by: Md Fahad Iqbal Polash Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice_lib.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 11fe1b3a3872cd3506ba873d47674b0d47a2c34b Author: Dan Nowlin Date: Tue Apr 16 10:30:49 2019 -0700 ice: Add ice_get_fw_log_cfg to init FW logging In order to initialize the current status of the FW logging, this patch adds ice_get_fw_log_cfg. The function retrieves the current setting of the FW logging from HW and updates the ice_hw structure accordingly. Signed-off-by: Dan Nowlin Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice_adminq_cmd.h | 1 + drivers/net/ethernet/intel/ice/ice_common.c | 48 +++++++++++++++++++++++++ 2 files changed, 49 insertions(+) commit 1eb11036a380810433423ba43cc41aa0e0f989b4 Author: Anirudh Venkataramanan Date: Tue Apr 16 10:30:48 2019 -0700 ice: Minor cleanup in ice_switch.h Remove duplicate define for ICE_INVAL_Q_HANDLE. Move defines to the top of the file. Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice_switch.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 91aed40da3d5ac94ea7a41cb9e2440d1c1b068c9 Author: Dave Ertman Date: Tue Apr 16 10:30:47 2019 -0700 ice: Remove redundant and premature event config In the path for re-enabling FW LLDP engine, there is a call to register for LLDP MIB change events. This call is redundant, in that the call to ice_pf_dcb_cfg will already register the driver for these events. Also, the call as it stands now is too early in the flow before before DCB is configured. Remove the redundant call. Signed-off-by: Dave Ertman Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice_ethtool.c | 6 ------ 1 file changed, 6 deletions(-) commit 4cc82aaa74f425aeab826f35bd27d5faaae6522e Author: Mitch Williams Date: Tue Apr 16 10:30:46 2019 -0700 ice: Change message level Change the message level of the MTU change log message from debug to info. Signed-off-by: Mitch Williams Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 23c0112246b454e408fb0579b3f9089353d4d327 Author: Mitch Williams Date: Tue Apr 16 10:30:45 2019 -0700 ice: Check all VFs for MDD activity, don't disable Don't use the mdd_detected variable as an exit condition for this loop; the first VF to NOT have an MDD event will cause the loop to terminate. Instead just look at all of the VFs, but don't disable them. This prevents proper release of resources if the VFs are rebooted or the VF driver reloaded. Instead, just log a message and call out repeat offenders. To make it clear what we are doing, use a differently-named variable in the loop. Signed-off-by: Mitch Williams Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice_main.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) commit cbe66bfee6a0b781a7b334003f6d48a92a601164 Author: Brett Creeley Date: Tue Apr 16 10:30:44 2019 -0700 ice: Refactor interrupt tracking Currently we have two MSI-x (IRQ) trackers, one for OS requested MSI-x entries (sw_irq_tracker) and one for hardware MSI-x vectors (hw_irq_tracker). Generally the sw_irq_tracker has less entries than the hw_irq_tracker because the hw_irq_tracker has entries equal to the max allowed MSI-x per PF and the sw_irq_tracker is mainly the minimum (non SR-IOV portion of the vectors, kernel granted IRQs). All of the non SR-IOV portions of the driver (i.e. LAN queues, RDMA queues, OICR, etc.) take at least one of each type of tracker resource. SR-IOV only grabs entries from the hw_irq_tracker. There are a few issues with this approach that can be seen when doing any kind of device reconfiguration (i.e. ethtool -L, SR-IOV, etc.). One of them being, any time the driver creates an ice_q_vector and associates it to a LAN queue pair it will grab and use one entry from the hw_irq_tracker and one from the sw_irq_tracker. If the indices on these does not match it will cause a Tx timeout, which will cause a reset and then the indices will match up again and traffic will resume. The mismatched indices come from the trackers not being the same size and/or the search_hint in the two trackers not being equal. Another reason for the refactor is the co-existence of features with SR-IOV. If SR-IOV is enabled and the interrupts are taken from the end of the sw_irq_tracker then other features can no longer use this space because the hardware has now given the remaining interrupts to SR-IOV. This patch reworks how we track MSI-x vectors by removing the hw_irq_tracker completely and instead MSI-x resources needed for SR-IOV are determined all at once instead of per VF. This can be done because when creating VFs we know how many are wanted and how many MSI-x vectors each VF needs. This also allows us to start using MSI-x resources from the end of the PF's allowed MSI-x vectors so we are less likely to use entries needed for other features (i.e. RDMA, L2 Offload, etc). This patch also reworks the ice_res_tracker structure by removing the search_hint and adding a new member - "end". Instead of having a search_hint we will always search from 0. The new member, "end", will be used to manipulate the end of the ice_res_tracker (specifically sw_irq_tracker) during runtime based on MSI-x vectors needed by SR-IOV. In the normal case, the end of ice_res_tracker will be equal to the ice_res_tracker's num_entries. The sriov_base_vector member was added to the PF structure. It is used to represent the starting MSI-x index of all the needed MSI-x vectors for all SR-IOV VFs. Depending on how many MSI-x are needed, SR-IOV may have to take resources from the sw_irq_tracker. This is done by setting the sw_irq_tracker->end equal to the pf->sriov_base_vector. When all SR-IOV VFs are removed then the sw_irq_tracker->end is reset back to sw_irq_tracker->num_entries. The sriov_base_vector, along with the VF's number of MSI-x (pf->num_vf_msix), vf_id, and the base MSI-x index on the PF (pf->hw.func_caps.common_cap.msix_vector_first_id), is used to calculate the first HW absolute MSI-x index for each VF, which is used to write to the VPINT_ALLOC[_PCI] and GLINT_VECT2FUNC registers to program the VFs MSI-x PCI configuration bits. Also, the sriov_base_vector is used along with VF's num_vf_msix, vf_id, and q_vector->v_idx to determine the MSI-x register index (used for writing to GLINT_DYN_CTL) within the PF's space. Interrupt changes removed any references to hw_base_vector, hw_oicr_idx, and hw_irq_tracker. Only sw_base_vector, sw_oicr_idx, and sw_irq_tracker variables remain. Change all of these by removing the "sw_" prefix to help avoid confusion with these variables and their use. Signed-off-by: Brett Creeley Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice.h | 21 ++- drivers/net/ethernet/intel/ice/ice_ethtool.c | 5 +- drivers/net/ethernet/intel/ice/ice_lib.c | 179 +++++++--------------- drivers/net/ethernet/intel/ice/ice_main.c | 82 +++------- drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c | 186 ++++++++++++++++++++--- drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h | 8 + 6 files changed, 263 insertions(+), 218 deletions(-) commit 0e674aeb0b7790424716b6ab15d9502e2776c339 Author: Anirudh Venkataramanan Date: Tue Apr 16 10:30:43 2019 -0700 ice: Add handler for ethtool selftest This patch adds a handler for ethtool selftest. Selftest includes testing link, interrupts, eeprom, registers and packet loopback. Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice.h | 8 + drivers/net/ethernet/intel/ice/ice_adminq_cmd.h | 23 + drivers/net/ethernet/intel/ice/ice_common.c | 23 + drivers/net/ethernet/intel/ice/ice_common.h | 5 + drivers/net/ethernet/intel/ice/ice_ethtool.c | 592 ++++++++++++++++++++++++ drivers/net/ethernet/intel/ice/ice_hw_autogen.h | 4 + drivers/net/ethernet/intel/ice/ice_lib.c | 44 +- drivers/net/ethernet/intel/ice/ice_main.c | 33 +- drivers/net/ethernet/intel/ice/ice_nvm.c | 31 ++ drivers/net/ethernet/intel/ice/ice_status.h | 1 + drivers/net/ethernet/intel/ice/ice_type.h | 1 + 11 files changed, 752 insertions(+), 13 deletions(-) commit 4770533f71de8d1891795d92b55633d82a80f882 Author: Geert Uytterhoeven Date: Mon May 27 14:04:12 2019 +0200 irqchip/renesas-irqc: Convert to managed initializations Simplify error handling by converting the driver to use managed allocations and initializations. Note that platform_get_resource() and ioremap_nocache() are combined in devm_platform_ioremap_resource(). Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Marc Zyngier drivers/irqchip/irq-renesas-irqc.c | 54 +++++++++++--------------------------- 1 file changed, 15 insertions(+), 39 deletions(-) commit 000e20c510819fa209b4fd37d5038e41f9885e0e Author: Geert Uytterhoeven Date: Mon May 27 14:04:11 2019 +0200 irqchip/renesas-irqc: Replace irqc_priv.pdev by irqc_priv.dev Nothing really uses irqc_priv.pdev, all users need irqc_priv.pdev->dev. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Marc Zyngier drivers/irqchip/irq-renesas-irqc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 9ae48bc03b261b7a8101606bc6b780973bb076fa Author: Geert Uytterhoeven Date: Mon May 27 14:04:10 2019 +0200 irqchip/renesas-irqc: Add helper variable dev = &pdev->dev The probe function uses "&pdev->dev" a lot, hence add a shorthand for that. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Marc Zyngier drivers/irqchip/irq-renesas-irqc.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 5adb6cd1cd1f5537b62d7b09c19c2fd4fe9abbb2 Author: Geert Uytterhoeven Date: Mon May 27 14:04:09 2019 +0200 irqchip/renesas-irqc: Remove error messages on out-of-memory conditions There is no need to print error messages if kzalloc() or ioremap_nocache() fail, as the memory allocation core already takes care of that. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Marc Zyngier drivers/irqchip/irq-renesas-irqc.c | 2 -- 1 file changed, 2 deletions(-) commit ce5adf5bbbc89cfa11239b27f8d17eec0bfbb1c1 Author: Geert Uytterhoeven Date: Mon May 27 14:04:08 2019 +0200 irqchip/renesas-irqc: Remove unneeded inclusion of The driver never used spinlocks, and thus does not need to include . Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Marc Zyngier drivers/irqchip/irq-renesas-irqc.c | 1 - 1 file changed, 1 deletion(-) commit a644ccb819bcf3e4038064fb601b2a07ccd0c315 Author: Geert Uytterhoeven Date: Mon May 27 14:17:11 2019 +0200 irqchip: Add Renesas RZ/A1 Interrupt Controller driver Add a driver for the Renesas RZ/A1 Interrupt Controller. This supports using up to 8 external interrupts on RZ/A1, with configurable sense select. NMI edge select is not yet supported. Signed-off-by: Geert Uytterhoeven Tested-by: Chris Brandt Reviewed-by: Simon Horman Signed-off-by: Marc Zyngier drivers/irqchip/Kconfig | 4 + drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-renesas-rza1.c | 283 +++++++++++++++++++++++++++++++++++++ 3 files changed, 288 insertions(+) commit 5e27a314a11f7fa53795282eea59a024fd3020ba Author: Geert Uytterhoeven Date: Mon May 27 14:17:10 2019 +0200 dt-bindings: interrupt-controller: Add Renesas RZ/A1 Interrupt Controller Add DT bindings for the Renesas RZ/A1 Interrupt Controller. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Reviewed-by: Rob Herring Signed-off-by: Marc Zyngier .../interrupt-controller/renesas,rza1-irqc.txt | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) commit f3d705d506a2afa6c21c2c728783967e80863b31 Author: Ard Biesheuvel Date: Tue May 28 15:36:47 2019 +0200 gpio: mb86s7x: Enable ACPI support Make the mb86s7x GPIO block discoverable via ACPI. In addition, add support for ACPI GPIO interrupts routed via platform interrupts, by wiring the two together via the to_irq() gpiochip callback. Reviewed-by: Linus Walleij Reviewed-by: Mika Westerberg Signed-off-by: Ard Biesheuvel Signed-off-by: Marc Zyngier drivers/gpio/gpio-mb86s7x.c | 51 ++++++++++++++++++++++++++++++++++++++------- 1 file changed, 44 insertions(+), 7 deletions(-) commit 4b6f3ecabfba46b086ae80a9d6cea2bb4ab60237 Author: Brett Creeley Date: Tue Apr 16 10:30:42 2019 -0700 ice: Don't call ice_cfg_itr() for SR-IOV ice_cfg_itr() sets the ITR granularity and default ITR values for the PF's interrupt vectors. For VF's this will be done in the AVF driver flow. Fix this by not calling ice_cfg_itr() for SR-IOV. Signed-off-by: Brett Creeley Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice_lib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1aec6e1b0886569c5c6e92d6d5fc25e6779e7f23 Author: Brett Creeley Date: Tue Apr 16 10:30:41 2019 -0700 ice: Set minimum default Rx descriptor count to 512 Currently we set the default number of Rx descriptors per queue to the system's page size divided by the number of bytes per descriptor. For 4K page size systems this is resulting in 128 Rx descriptors per queue. This is causing more dropped packets than desired in the default configuration. Fix this by setting the minimum default Rx descriptor count per queue to 512. Signed-off-by: Brett Creeley Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice.h | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit e65e9e1566f769362a228e4772d74ac43ad83e98 Author: Bruce Allan Date: Tue Apr 16 10:30:40 2019 -0700 ice: Resolve static analysis warning Some static analysis tools can complain when doing a bitop assignment using operands of different sizes. Fix that. Signed-off-by: Bruce Allan Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice_txrx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 3171948e94758177bbd88af2941220c8920c28aa Author: Tony Nguyen Date: Tue Apr 16 10:30:39 2019 -0700 ice: Implement toggling ethtool rx-vlan-filter Implement the toggling of rx-vlan-filter; enable|disable VLAN pruning based on on|off, respectively. Signed-off-by: Tony Nguyen Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice_main.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 588d511f89c889d301903a8232188d7a1fe7ba93 Author: Anirudh Venkataramanan Date: Tue Apr 16 10:30:38 2019 -0700 ice: Remove direct write for GLLAN_RCTL_0 Clear PXE mode AQ call (opcode 0x0110) is now supported in FW. So remove the direct register write to GLLAN_RCTL_0. Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice_common.c | 3 --- 1 file changed, 3 deletions(-) commit 95f8e8b931fe42c67ea513e410f46e26acdd95f0 Author: Bruce Allan Date: Tue Apr 16 10:24:39 2019 -0700 ice: Fix LINE_SPACING style issue Fix a checkpatch "LINE_SPACING: Please don't use multiple blank lines" issue that has snuck in to the code. Signed-off-by: Bruce Allan Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice_common.c | 1 - 1 file changed, 1 deletion(-) commit 2e2f08d02dd282751e8d329f373dd85d49ae7f90 Author: Chris Wilson Date: Tue May 28 08:53:54 2019 +0100 drm/i915: Take a runtime pm wakeref for atomic commits Before we start prepping the system for an atomic modeset, wake the device up. We then keep track of this wakeref until we complete the atomic commit, so we hold keep the device awake for all potential HW access, and do not allow the device to sleep with a pending modeset. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110771 Signed-off-by: Chris Wilson Cc: Ville Syrjälä Cc: Maarten Lankhorst Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190528075354.22341-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_display.c | 5 +++++ drivers/gpu/drm/i915/intel_drv.h | 2 ++ 2 files changed, 7 insertions(+) commit fcdf445ff42f036d22178b49cf64e92d527c1330 Author: Gen Zhang Date: Tue May 28 10:18:51 2019 +0800 clk-sunxi: fix a missing-check bug in sunxi_divs_clk_setup() In sunxi_divs_clk_setup(), 'derived_name' is allocated by kstrndup(). It returns NULL when fails. 'derived_name' should be checked. Signed-off-by: Gen Zhang Signed-off-by: Maxime Ripard drivers/clk/sunxi/clk-sunxi.c | 2 ++ 1 file changed, 2 insertions(+) commit 9fbbbb7b8d637f7ca1d5c4e23452bf450c7cb05f Author: Maxime Ripard Date: Sat May 25 15:44:24 2019 +0200 ARM: dts: sunxi: h3/h5: Fix GPIO regulator state array Even though it translates to the same thing down to the binary level, we should have an array of 2 number cells to describe each voltage state, which in turns create a validation warning. Let's fix this. Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts | 3 +-- arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 3 +-- arch/arm/boot/dts/sun8i-h3-orangepi-one.dts | 3 +-- arch/arm/boot/dts/sunxi-bananapi-m2-plus-v1.2.dtsi | 3 +-- arch/arm64/boot/dts/allwinner/sun50i-h5-emlid-neutis-n5-devboard.dts | 3 +-- arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts | 3 +-- 6 files changed, 6 insertions(+), 12 deletions(-) commit 5f49c38a80b94fc27ecd91f0e50949c3525688f1 Author: Priit Laes Date: Tue May 28 09:35:44 2019 +0300 ARM: dts: sun7i: olimex-lime2: Enable ac and power supplies Lime2 has battery connector so enable these supplies. Signed-off-by: Priit Laes Reviewed-by: Paul Kocialkowski Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts | 8 ++++++++ 1 file changed, 8 insertions(+) commit 1167187f2759e6b4d264418b6fba687e01800f98 Merge: 36f18439ea16 9adebac37e7d Author: David S. Miller Date: Wed May 29 00:01:30 2019 -0700 Merge branch 'qed-Fix-inifinite-spinning-of-PTP-poll-thread' Sudarsana Reddy Kalluru says: ==================== qed*: Fix inifinite spinning of PTP poll thread. The patch series addresses an error scenario in the PTP Tx implementation. Please consider applying it to net-next. ==================== Signed-off-by: David S. Miller commit 9adebac37e7d26c5cd73776a0279574afe3f410b Author: Sudarsana Reddy Kalluru Date: Mon May 27 20:21:33 2019 -0700 qede: Handle infinite driver spinning for Tx timestamp. In PTP Tx implementation, driver kept scheduling a poll thread until the timestamp is available. In the error scenarios (e.g. app requesting the timestamp for non-ptp packet), this thread kept waiting for the timestamp forever. This patch add changes to report such scenario as an error and terminate the thread. Added a timeout of 2 seconds i.e., max time to wait for Tx timestamp. Added a stat value ptp_skip_txts for reporting the number of packets for which Tx timestamping is skipped. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qede/qede.h | 2 ++ drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 1 + drivers/net/ethernet/qlogic/qede/qede_main.c | 3 ++ drivers/net/ethernet/qlogic/qede/qede_ptp.c | 37 ++++++++++++++++++++----- 4 files changed, 36 insertions(+), 7 deletions(-) commit 24c6203bb986d1b3c8ae8176fbfde907d35d6328 Author: Sudarsana Reddy Kalluru Date: Mon May 27 20:21:32 2019 -0700 qed: Reduce the severity of ptp debug message. PTP Tx implementation continuously polls for the availability of timestamp. Reducing the severity of a debug message in this path to avoid filling up the syslog buffer with this message, especially in the error scenarios. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_ptp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 36f18439ea16ebb670720602bfbf47c95a6691d4 Author: Gustavo A. R. Silva Date: Mon May 27 13:38:55 2019 -0500 macvlan: Replace strncpy() by strscpy() The strncpy() function is being deprecated. Replace it by the safer strscpy() and fix the following Coverity warning: "Calling strncpy with a maximum size argument of 16 bytes on destination array ifrr.ifr_ifrn.ifrn_name of size 16 bytes might leave the destination string unterminated." Notice that, unlike strncpy(), strscpy() always null-terminates the destination string. Addresses-Coverity-ID: 1445537 ("Buffer not null terminated") Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller drivers/net/macvlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit be1b5b788829bbfa1cc794fbaa715957f0cce779 Merge: c38e57aecbb4 62a5b8429e99 Author: David S. Miller Date: Tue May 28 23:24:44 2019 -0700 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 1GbE Intel Wired LAN Driver Updates 2019-05-28 This series contains updates to e1000e, igb and igc. Feng adds additional information on a warning message when a read of a hardware register fails. Gustavo A. R. Silva fixes up two "fall through" code comments so that the checkers can actually determine that we did comment that the case statement is falling through to the next case. Sasha does some cleanup on the igc driver by removing duplicate white space and removed a unneeded workaround for igc. Adds support for flow control to the igc driver. Konstantin Khlebnikov reverts a previous fix which was causing a false positive for a hardware hang. Provides a fix so that when link is lost the packets in the transmit queue are flushed and wakes the transmit queue when the NIC is ready to send packets. ==================== Signed-off-by: David S. Miller commit c38e57aecbb4244b1ada82b059a0b79dde7309f9 Merge: 602e0f295a91 430a049190de Author: David S. Miller Date: Tue May 28 21:37:30 2019 -0700 Merge branch 'net-API-and-initial-implementation-for-nexthop-objects' David Ahern says: ==================== net: API and initial implementation for nexthop objects This set contains the API and initial implementation for nexthops as standalone objects. Patch 1 contains the UAPI and updates to selinux struct. Patch 2 contains the barebones code for nexthop commands, rbtree maintenance and notifications. Patch 3 then adds support for IPv4 gateways along with handling of netdev events. Patch 4 adds support for IPv6 gateways. Patch 5 has the implementation of the encap attributes. Patch 6 adds support for nexthop groups. At the end of this set, nexthop objects can be created and deleted and userspace can monitor nexthop events, but ipv4 and ipv6 routes can not use them yet. Once the nexthop struct is defined, follow on sets add it to fib{6}_info and handle it within the respective code before routes can be inserted using them. ==================== Signed-off-by: David S. Miller commit 430a049190de3c9e219f43084de9f1122da04570 Author: David Ahern Date: Fri May 24 14:43:08 2019 -0700 nexthop: Add support for nexthop groups Allow the creation of nexthop groups which reference other nexthop objects to create multipath routes: +--------------+ +------------+ +--------------+ | | nh nh_grp --->| nh_grp_entry |-+ +------------+ +---------|----+ ^ | | +------------+ +----------------+ +--->| nh, weight | nh_parent +------------+ A group entry points to a nexthop with a weight for that hop within the group. The nexthop has a list_head, grp_list, for tracking which groups it is a member of and the group entry has a reference back to the parent. The grp_list is used when a nexthop is deleted - to efficiently remove it from groups using it. If a nexthop group spec is given, no other attributes can be set. Each nexthop id in a group spec must already exist. Similar to single nexthops, the specification of a nexthop group can be updated so that data is managed with rcu locking. Add path selection function to account for multiple paths and add ipv{4,6}_good_nh helpers to know that if a neighbor entry exists it is in a good state. Update NETDEV event handling to rebalance multipath nexthop groups if a nexthop is deleted due to a link event (down or unregister). When a nexthop is removed any groups using it are updated. Groups using a nexthop a tracked via a grp_list. Nexthop dumps can be limited to groups only by adding NHA_GROUPS to the request. Signed-off-by: David Ahern Signed-off-by: David S. Miller include/net/nexthop.h | 98 +++++++++- net/ipv4/nexthop.c | 504 +++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 578 insertions(+), 24 deletions(-) commit b513bd035f4044aa2667fb01418918523a049b9c Author: David Ahern Date: Fri May 24 14:43:07 2019 -0700 nexthop: Add support for lwt encaps Add support for NHA_ENCAP and NHA_ENCAP_TYPE. Leverages the existing code for lwtunnel within fib_nh_common, so the only change needed is handling the attributes in the nexthop code. Signed-off-by: David Ahern Signed-off-by: David S. Miller include/net/nexthop.h | 3 +++ net/ipv4/nexthop.c | 37 ++++++++++++++++++++++++++++++++++++- 2 files changed, 39 insertions(+), 1 deletion(-) commit 53010f991a9f5e4ed2db705ddde6ff32709192a2 Author: David Ahern Date: Fri May 24 14:43:06 2019 -0700 nexthop: Add support for IPv6 gateways Handle IPv6 gateway in a nexthop spec. If nh_family is set to AF_INET6, NHA_GATEWAY is expected to be an IPv6 address. Add ipv6 option to gw in nh_config to hold the address, add fib6_nh to nh_info to leverage the ipv6 initialization and cleanup code. Update nh_fill_node to dump the v6 address. Signed-off-by: David Ahern Signed-off-by: David S. Miller include/net/nexthop.h | 3 +++ net/ipv4/nexthop.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) commit 597cfe4fc3390a055f42546c254e48601b37009f Author: David Ahern Date: Fri May 24 14:43:05 2019 -0700 nexthop: Add support for IPv4 nexthops Add support for IPv4 nexthops. If nh_family is set to AF_INET, then NHA_GATEWAY is expected to be an IPv4 address. Register for netdev events to be notified of admin up/down changes as well as deletes. A hash table is used to track nexthop per devices to quickly convert device events to the affected nexthops. Signed-off-by: David Ahern Signed-off-by: David S. Miller include/net/nexthop.h | 5 ++ net/ipv4/nexthop.c | 208 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 213 insertions(+) commit ab84be7e54fc3d9b248285f1a14067558d858819 Author: David Ahern Date: Fri May 24 14:43:04 2019 -0700 net: Initial nexthop code Barebones start point for nexthops. Implementation for RTM commands, notifications, management of rbtree for holding nexthops by id, and kernel side data structures for nexthops and nexthop config. Nexthops are maintained in an rbtree sorted by id. Similar to routes, nexthops are configured per namespace using netns_nexthop struct added to struct net. Nexthop notifications are sent when a nexthop is added or deleted, but NOT if the delete is due to a device event or network namespace teardown (which also involves device events). Applications are expected to use the device down event to flush nexthops and any routes used by the nexthops. Signed-off-by: David Ahern Signed-off-by: David S. Miller include/net/net_namespace.h | 2 + include/net/netns/nexthop.h | 18 ++ include/net/nexthop.h | 88 ++++++ net/ipv4/Makefile | 2 +- net/ipv4/nexthop.c | 722 ++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 831 insertions(+), 1 deletion(-) commit 65ee00a9409f751188a8cdc0988167858eb4a536 Author: David Ahern Date: Fri May 24 14:43:03 2019 -0700 net: nexthop uapi New UAPI for nexthops as standalone objects: - defines netlink ancillary header, struct nhmsg - RTM commands for nexthop objects, RTM_*NEXTHOP, - RTNLGRP for nexthop notifications, RTNLGRP_NEXTHOP, - Attributes for creating nexthops, NHA_* - Attribute for route specs to specify a nexthop by id, RTA_NH_ID. The nexthop attributes and semantics follow the route and RTA ones for device, gateway and lwt encap. Unique to nexthop objects are a blackhole and a group which contains references to other nexthop objects. With the exception of blackhole and group, nexthop objects MUST contain a device. Gateway and encap are optional. Nexthop groups can only reference other pre-existing nexthops by id. If the NHA_ID attribute is present that id is used for the nexthop. If not specified, one is auto assigned. Dump requests can include attributes: - NHA_GROUPS to return only nexthop groups, - NHA_MASTER to limit dumps to nexthops with devices enslaved to the given master (e.g., VRF) - NHA_OIF to limit dumps to nexthops using given device nlmsg_route_perms in selinux code is updated for the new RTM comands. Signed-off-by: David Ahern Signed-off-by: David S. Miller include/uapi/linux/nexthop.h | 56 ++++++++++++++++++++++++++++++++++++++++++ include/uapi/linux/rtnetlink.h | 10 ++++++++ security/selinux/nlmsgtab.c | 5 +++- 3 files changed, 70 insertions(+), 1 deletion(-) commit 602e0f295a91813c9a15938f2a292b9c60a416d9 Merge: 66350023d575 49f971bd3085 Author: David S. Miller Date: Tue May 28 17:39:01 2019 -0700 Merge branch 'hns3-next' Huazhong Tan says: ==================== code optimizations & bugfixes for HNS3 driver This patch-set includes code optimizations and bugfixes for the HNS3 ethernet controller driver. [patch 1/12] fixes a compile warning reported by kbuild test robot. [patch 2/12] fixes HNS3_RXD_GRO_SIZE_M macro definition error. [patch 3/12] adds a debugfs command to dump firmware information. [patch 4/12 - 10/12] adds some code optimizaions and cleanups for reset and driver unloading. [patch 11/12 - 12/12] adds two bugfixes. ==================== Signed-off-by: David S. Miller commit 49f971bd308571fe466687227130a7082b662d0e Author: Huazhong Tan Date: Tue May 28 17:03:02 2019 +0800 net: hns3: fix a memory leak issue for hclge_map_unmap_ring_to_vf_vector When hclge_bind_ring_with_vector() fails, hclge_map_unmap_ring_to_vf_vector() returns the error directly, so nobody will free the memory allocated by hclge_get_ring_chain_from_mbx(). So hclge_free_vector_ring_chain() should be called no matter hclge_bind_ring_with_vector() fails or not. Fixes: 84e095d64ed9 ("net: hns3: Change PF to add ring-vect binding & resetQ to mailbox") Signed-off-by: Huazhong Tan Signed-off-by: Peng Li Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 0d2f68c7bcf4c7bbdd6f810f7b6e658f43d4461e Author: Huazhong Tan Date: Tue May 28 17:03:01 2019 +0800 net: hns3: adjust hns3_uninit_phy()'s location in the hns3_client_uninit() hns3_uninit_phy() should be called before checking HNS3_NIC_STATE_INITED flags, otherwise when this checking fails, there is nobody to call hns3_uninit_phy(). Fixes: c8a8045b2d0a ("net: hns3: Fix NULL deref when unloading driver") Signed-off-by: Huazhong Tan Signed-off-by: Peng Li Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit acfc3d55b7326ff280f1aa64b6d93755619071b3 Author: Huazhong Tan Date: Tue May 28 17:03:00 2019 +0800 net: hns3: stop schedule reset service while unloading driver When unloading driver, the reset task should not be scheduled anymore. If disable IRQ before cancel ongoing reset task, the IRQ may be re-enabled by the reset task. This patch uses HCLGE_STATE_REMOVING/HCLGEVF_STATE_REMOVING flag to indicate that the driver is unloading, and we should stop new coming reset service to be scheduled, otherwise, reset service will access some resource which has been freed by unloading. Signed-off-by: Huazhong Tan Signed-off-by: Peng Li Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 4 +++- drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 4 +++- drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) commit ada13ee3db7b8959d7df81265a2633f987a0a13c Author: Huazhong Tan Date: Tue May 28 17:02:59 2019 +0800 net: hns3: add handshake with hardware while doing reset When reset happens, the hardware reset should begin after the driver has finished its preparatory work, otherwise it may cause some hardware error. Before Hardware's reset, it will wait for the driver to write bit HCLGE_NIC_CMQ_ENABLE of register HCLGE_NIC_CSQ_DEPTH_REG to 1, while the driver finishes its preparatory work will do that. BTW, since some cases this register will be cleared, so it needs some sync time before driver's writing. Signed-off-by: Huazhong Tan Signed-off-by: Peng Li Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c | 6 ++---- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 10 ++++++++-- drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_cmd.c | 2 -- drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 7 ++++++- 4 files changed, 16 insertions(+), 9 deletions(-) commit 1db58f86975a1f978b71b727ed9951ec53698fc0 Author: Huazhong Tan Date: Tue May 28 17:02:58 2019 +0800 net: hns3: modify hclgevf_init_client_instance() hclgevf_init_client_instance() is a little bloated and there is some duplicated code. This patch adds some cleanup for it. Signed-off-by: Huazhong Tan Signed-off-by: Peng Li Signed-off-by: David S. Miller .../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 79 ++++++++++++++-------- 1 file changed, 50 insertions(+), 29 deletions(-) commit 994e04f16e5a50ef14f4353f4bd68ad48a0bcb79 Author: Huazhong Tan Date: Tue May 28 17:02:57 2019 +0800 net: hns3: modify hclge_init_client_instance() hclge_init_client_instance() is a little bloated and there is some duplicated code. This patch adds some cleanup for it. Signed-off-by: Huazhong Tan Signed-off-by: Peng Li Signed-off-by: David S. Miller .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 90 +++++++++++++--------- 1 file changed, 53 insertions(+), 37 deletions(-) commit 25d1817c4e5020b850b8bc383401ceff3cbc6e31 Author: Huazhong Tan Date: Tue May 28 17:02:56 2019 +0800 net: hns3: use HCLGEVF_STATE_NIC_REGISTERED to indicate VF NIC client has registered When VF NIC client's init_instance() succeeds, it means this client has been registered successfully, so we use HCLGEVF_STATE_NIC_REGISTERED to indicate that. And before calling VF NIC client's uninit_instance(), we clear this state. So any operation of VF NIC client from HCLGEVF is not allowed if this state is not set. Signed-off-by: Huazhong Tan Signed-off-by: Peng Li Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 7 +++++++ drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h | 1 + 2 files changed, 8 insertions(+) commit 2a0bfc36183cb4eb5f1212faafbc93876a9a2088 Author: Huazhong Tan Date: Tue May 28 17:02:55 2019 +0800 net: hns3: use HCLGE_STATE_ROCE_REGISTERED to indicate PF ROCE client has registered When PF ROCE client's init_instance() succeeds, it means this client has been registered successfully, so we use HCLGE_STATE_ROCE_REGISTERED to indicate that. And before calling PF ROCE client's uninit_instance(), we clear this state. So any operation of the ROCE client from HCLGE is not allowed if this state is not set. Signed-off-by: Huazhong Tan Signed-off-by: Peng Li Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 8 +++++++- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) commit bd9109c9b1f3c34529fe43a4ede46e72d237361b Author: Huazhong Tan Date: Tue May 28 17:02:54 2019 +0800 net: hns3: use HCLGE_STATE_NIC_REGISTERED to indicate PF NIC client has registered When PF NIC client's init_instance() succeeds, it means this client has been registered successfully, so we use HCLGE_STATE_NIC_REGISTERED to indicate that. And before calling PF NIC client's uninit_instance(), we clear this state. So any operation of PF NIC client from HCLGE is not allowed if this state is not set. Signed-off-by: Huazhong Tan Signed-off-by: Peng Li Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 6 ++++++ drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h | 1 + 2 files changed, 7 insertions(+) commit 33a90e2f20e6c455889a0f41857692221172a5ae Author: Zhongzhu Liu Date: Tue May 28 17:02:53 2019 +0800 net: hns3: add support for dump firmware statistics by debugfs This patch prints firmware statistics information. debugfs command: echo dump m7 info > cmd estuary:/dbg/hns3/0000:7d:00.0$ echo dump m7 info > cmd [ 172.577240] hns3 0000:7d:00.0: 0x00000000 0x00000000 0x00000000 [ 172.583471] hns3 0000:7d:00.0: 0x00000000 0x00000000 0x00000000 [ 172.589552] hns3 0000:7d:00.0: 0x00000030 0x00000000 0x00000000 [ 172.595632] hns3 0000:7d:00.0: 0x00000000 0x00000000 0x00000000 estuary:/dbg/hns3/0000:7d:00.0$ Signed-off-by: Zhongzhu Liu Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c | 1 + .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 8 +++ .../ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c | 57 ++++++++++++++++++++++ 3 files changed, 66 insertions(+) commit eff858c178fcc513e620bb803b4e3bfb9727856c Author: Yunsheng Lin Date: Tue May 28 17:02:52 2019 +0800 net: hns3: fix for HNS3_RXD_GRO_SIZE_M macro According to hardware user menual, the GRO_SIZE is 14 bits width, the HNS3_RXD_GRO_SIZE_M is 10 bits width now, which may cause hardware GRO received packet error problem. Fixes: a6d53b97a2e7 ("net: hns3: Adds GRO params to SKB for the stack") Signed-off-by: Yunsheng Lin Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3_enet.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4c1522765ca84e45d147557bf7f19e85e40c81e0 Author: Jian Shen Date: Tue May 28 17:02:51 2019 +0800 net: hns3: fix compile warning without CONFIG_RFS_ACCEL The ifdef condition of function hclge_add_fd_entry_by_arfs() is unnecessary. It may cause compile warning when CONFIG_RFS_ACCEL is not chosen. This patch fixes it by removing the ifdef condition. Fixes: d93ed94fbeaf ("net: hns3: add aRFS support for PF") Reported-by: kbuild test robot Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 2 -- 1 file changed, 2 deletions(-) commit 66350023d57560b2ead168af098fc507e58d8e6a Author: Xue Chaojing Date: Mon May 27 22:10:05 2019 +0000 hinic: fix a bug in set rx mode in set_rx_mode, __dev_mc_sync and netdev_for_each_mc_addr will repeatedly set the multicast mac address. so we delete this loop. Signed-off-by: Xue Chaojing Signed-off-by: David S. Miller drivers/net/ethernet/huawei/hinic/hinic_main.c | 4 ---- 1 file changed, 4 deletions(-) commit 2e56571d820d46d9d54c1ae0e113a91d1c07814f Merge: 3fb321fde22d dc93f46bc4e0 Author: David S. Miller Date: Tue May 28 17:22:15 2019 -0700 Merge branch 'inet-frags-followup' Eric Dumazet says: ==================== inet: frags: followup to 'inet-frags-avoid-possible-races-at-netns-dismantle' Latest patch series ('inet-frags-avoid-possible-races-at-netns-dismantle') brought another syzbot report shown in the third patch changelog. While fixing the issue, I had to call inet_frags_fini() later in IPv6 and ilowpan. Also I believe a completion is needed to ensure proper dismantle at module removal. ==================== Signed-off-by: David S. Miller commit dc93f46bc4e00899eaf4579962cfac8cf2f9966d Author: Eric Dumazet Date: Mon May 27 16:56:49 2019 -0700 inet: frags: fix use-after-free read in inet_frag_destroy_rcu As caught by syzbot [1], the rcu grace period that is respected before fqdir_rwork_fn() proceeds and frees fqdir is not enough to prevent inet_frag_destroy_rcu() being run after the freeing. We need a proper rcu_barrier() synchronization to replace the one we had in inet_frags_fini() We also have to fix a potential problem at module removal : inet_frags_fini() needs to make sure that all queued work queues (fqdir_rwork_fn) have completed, otherwise we might call kmem_cache_destroy() too soon and get another use-after-free. [1] BUG: KASAN: use-after-free in inet_frag_destroy_rcu+0xd9/0xe0 net/ipv4/inet_fragment.c:201 Read of size 8 at addr ffff88806ed47a18 by task swapper/1/0 CPU: 1 PID: 0 Comm: swapper/1 Not tainted 5.2.0-rc1+ #2 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x172/0x1f0 lib/dump_stack.c:113 print_address_description.cold+0x7c/0x20d mm/kasan/report.c:188 __kasan_report.cold+0x1b/0x40 mm/kasan/report.c:317 kasan_report+0x12/0x20 mm/kasan/common.c:614 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:132 inet_frag_destroy_rcu+0xd9/0xe0 net/ipv4/inet_fragment.c:201 __rcu_reclaim kernel/rcu/rcu.h:222 [inline] rcu_do_batch kernel/rcu/tree.c:2092 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2310 [inline] rcu_core+0xba5/0x1500 kernel/rcu/tree.c:2291 __do_softirq+0x25c/0x94c kernel/softirq.c:293 invoke_softirq kernel/softirq.c:374 [inline] irq_exit+0x180/0x1d0 kernel/softirq.c:414 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x13b/0x550 arch/x86/kernel/apic/apic.c:1068 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:806 RIP: 0010:native_safe_halt+0xe/0x10 arch/x86/include/asm/irqflags.h:61 Code: ff ff 48 89 df e8 f2 95 8c fa eb 82 e9 07 00 00 00 0f 00 2d e4 45 4b 00 f4 c3 66 90 e9 07 00 00 00 0f 00 2d d4 45 4b 00 fb f4 90 55 48 89 e5 41 57 41 56 41 55 41 54 53 e8 8e 18 42 fa e8 99 RSP: 0018:ffff8880a98e7d78 EFLAGS: 00000282 ORIG_RAX: ffffffffffffff13 RAX: 1ffffffff1164e11 RBX: ffff8880a98d4340 RCX: 0000000000000000 RDX: dffffc0000000000 RSI: 0000000000000006 RDI: ffff8880a98d4bbc RBP: ffff8880a98e7da8 R08: ffff8880a98d4340 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000001 R13: ffffffff88b27078 R14: 0000000000000001 R15: 0000000000000000 arch_cpu_idle+0xa/0x10 arch/x86/kernel/process.c:571 default_idle_call+0x36/0x90 kernel/sched/idle.c:94 cpuidle_idle_call kernel/sched/idle.c:154 [inline] do_idle+0x377/0x560 kernel/sched/idle.c:263 cpu_startup_entry+0x1b/0x20 kernel/sched/idle.c:354 start_secondary+0x34e/0x4c0 arch/x86/kernel/smpboot.c:267 secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:243 Allocated by task 8877: save_stack+0x23/0x90 mm/kasan/common.c:71 set_track mm/kasan/common.c:79 [inline] __kasan_kmalloc mm/kasan/common.c:489 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:462 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:503 kmem_cache_alloc_trace+0x151/0x750 mm/slab.c:3555 kmalloc include/linux/slab.h:547 [inline] kzalloc include/linux/slab.h:742 [inline] fqdir_init include/net/inet_frag.h:115 [inline] ipv6_frags_init_net+0x48/0x460 net/ipv6/reassembly.c:513 ops_init+0xb3/0x410 net/core/net_namespace.c:130 setup_net+0x2d3/0x740 net/core/net_namespace.c:316 copy_net_ns+0x1df/0x340 net/core/net_namespace.c:439 create_new_namespaces+0x400/0x7b0 kernel/nsproxy.c:107 unshare_nsproxy_namespaces+0xc2/0x200 kernel/nsproxy.c:206 ksys_unshare+0x440/0x980 kernel/fork.c:2692 __do_sys_unshare kernel/fork.c:2760 [inline] __se_sys_unshare kernel/fork.c:2758 [inline] __x64_sys_unshare+0x31/0x40 kernel/fork.c:2758 do_syscall_64+0xfd/0x680 arch/x86/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 17: save_stack+0x23/0x90 mm/kasan/common.c:71 set_track mm/kasan/common.c:79 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:451 kasan_slab_free+0xe/0x10 mm/kasan/common.c:459 __cache_free mm/slab.c:3432 [inline] kfree+0xcf/0x220 mm/slab.c:3755 fqdir_rwork_fn+0x33/0x40 net/ipv4/inet_fragment.c:154 process_one_work+0x989/0x1790 kernel/workqueue.c:2269 worker_thread+0x98/0xe40 kernel/workqueue.c:2415 kthread+0x354/0x420 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 The buggy address belongs to the object at ffff88806ed47a00 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 24 bytes inside of 512-byte region [ffff88806ed47a00, ffff88806ed47c00) The buggy address belongs to the page: page:ffffea0001bb51c0 refcount:1 mapcount:0 mapping:ffff8880aa400940 index:0x0 flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea000282a788 ffffea0001bb53c8 ffff8880aa400940 raw: 0000000000000000 ffff88806ed47000 0000000100000006 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88806ed47900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88806ed47980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88806ed47a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88806ed47a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88806ed47b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb Fixes: 3c8fc8782044 ("inet: frags: rework rhashtable dismantle") Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David S. Miller include/net/inet_frag.h | 3 +++ net/ipv4/inet_fragment.c | 20 ++++++++++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) commit ae7352d384a552d8c799c242e74a934809990a71 Author: Eric Dumazet Date: Mon May 27 16:56:48 2019 -0700 inet: frags: call inet_frags_fini() after unregister_pernet_subsys() Both IPv6 and 6lowpan are calling inet_frags_fini() too soon. inet_frags_fini() is dismantling a kmem_cache, that might be needed later when unregister_pernet_subsys() eventually has to remove frags queues from hash tables and free them. This fixes potential use-after-free, and is a prereq for the following patch. Fixes: d4ad4d22e7ac ("inet: frags: use kmem_cache for inet_frag_queue") Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ieee802154/6lowpan/reassembly.c | 2 +- net/ipv6/reassembly.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 6b73d19711d0989cbdcd19c61faa0f79a1a5e466 Author: Eric Dumazet Date: Mon May 27 16:56:47 2019 -0700 inet: frags: uninline fqdir_init() fqdir_init() is not fast path and is getting bigger. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/inet_frag.h | 20 +------------------- net/ipv4/inet_fragment.c | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 19 deletions(-) commit 3fb321fde22ddc3adc83e1f690b1fad9dfbd24ef Author: Willem de Bruijn Date: Mon May 27 16:47:51 2019 -0400 selftests/net: ipv6 flowlabel Test the IPv6 flowlabel control and datapath interfaces: Acquire and release the right to use flowlabels with socket option IPV6_FLOWLABEL_MGR. Then configure flowlabels on send and read them on recv with cmsg IPV6_FLOWINFO. Also verify auto-flowlabel if not explicitly set. This helped identify the issue fixed in commit 95c169251bf73 ("ipv6: invert flowlabel sharing check in process and user mode") Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller tools/testing/selftests/net/.gitignore | 2 + tools/testing/selftests/net/Makefile | 4 +- tools/testing/selftests/net/ipv6_flowlabel.c | 229 +++++++++++++++++++++++ tools/testing/selftests/net/ipv6_flowlabel.sh | 21 +++ tools/testing/selftests/net/ipv6_flowlabel_mgr.c | 199 ++++++++++++++++++++ 5 files changed, 453 insertions(+), 2 deletions(-) commit cbe9e835946fc792b061d51527c6f006a10419e6 Author: Camelia Groza Date: Mon May 27 18:21:31 2019 +0300 enetc: Enable TC offloading with mqprio Add support to configure multiple prioritized TX traffic classes with mqprio. Configure one BD ring per TC for the moment, one netdev queue per TC. Signed-off-by: Camelia Groza Signed-off-by: Claudiu Manoil Signed-off-by: David S. Miller drivers/net/ethernet/freescale/enetc/enetc.c | 56 +++++++++++++++++++++++++ drivers/net/ethernet/freescale/enetc/enetc.h | 3 ++ drivers/net/ethernet/freescale/enetc/enetc_hw.h | 12 +++++- drivers/net/ethernet/freescale/enetc/enetc_pf.c | 1 + drivers/net/ethernet/freescale/enetc/enetc_vf.c | 1 + 5 files changed, 72 insertions(+), 1 deletion(-) commit 7f3343234c0b9c2f3e64b4a82f666034f6c5b479 Merge: c7ae09253cb8 56aaa114f091 Author: David S. Miller Date: Tue May 28 17:09:15 2019 -0700 Merge branch 'stmmac-SPDX' Neil Armstrong says: ==================== net: stmmac: dwmac-meson: update with SPDX Licence identifier Update the SPDX Licence identifier for the Amlogic Meson6 and Meson8 dwmac glue drivers. ==================== Signed-off-by: David S. Miller commit 56aaa114f0910775320a4b261a3faea67cca3d77 Author: Neil Armstrong Date: Mon May 27 15:46:23 2019 +0200 net: stmmac: dwmac-meson8b: update with SPDX Licence identifier Signed-off-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit f87845cf0f892d8f4b5aaa9117b2cb0a2f255666 Author: Neil Armstrong Date: Mon May 27 15:46:22 2019 +0200 net: stmmac: dwmac-meson: update with SPDX Licence identifier Signed-off-by: Neil Armstrong Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac-meson.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 62a5b8429e99246cd81678774d2de1a67738be9b Author: Sasha Neftin Date: Sun Apr 21 11:17:23 2019 +0300 igc: Cleanup the redundant code The default flow control settings for the i225 device is both 'rx' and 'tx' pause frames. There is no depend on the NVM value. This patch comes to fix this and clean up the driver code. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igc/igc_mac.c | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) commit 0373ad4d051cdc491e9627d4a66d00b258b6cd80 Author: Sasha Neftin Date: Thu Apr 18 10:11:08 2019 +0300 igc: Add flow control support This change adds flow control settings. This is required to enable the legacy flow control support. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igc/igc_defines.h | 3 +++ drivers/net/ethernet/intel/igc/igc_main.c | 21 +++++++++++++++++++++ 2 files changed, 24 insertions(+) commit d17ba0f616a08f597d9348c372d89b8c0405ccf3 Author: Konstantin Khlebnikov Date: Wed Apr 17 11:13:20 2019 +0300 e1000e: start network tx queue only when link is up Driver does not want to keep packets in Tx queue when link is lost. But present code only reset NIC to flush them, but does not prevent queuing new packets. Moreover reset sequence itself could generate new packets via netconsole and NIC falls into endless reset loop. This patch wakes Tx queue only when NIC is ready to send packets. This is proper fix for problem addressed by commit 0f9e980bf5ee ("e1000e: fix cyclic resets at link up with active tx"). Signed-off-by: Konstantin Khlebnikov Suggested-by: Alexander Duyck Tested-by: Joseph Yasi Tested-by: Aaron Brown Tested-by: Oleksandr Natalenko Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/e1000e/netdev.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit caff422ea81e144842bc44bab408d85ac449377b Author: Konstantin Khlebnikov Date: Wed Apr 17 11:13:16 2019 +0300 Revert "e1000e: fix cyclic resets at link up with active tx" This reverts commit 0f9e980bf5ee1a97e2e401c846b2af989eb21c61. That change cased false-positive warning about hardware hang: e1000e: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/Tx IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready e1000e 0000:00:1f.6 eth0: Detected Hardware Unit Hang: TDH <0> TDT <1> next_to_use <1> next_to_clean <0> buffer_info[next_to_clean]: time_stamp next_to_watch <0> jiffies next_to_watch.status <0> MAC Status <40080080> PHY Status <7949> PHY 1000BASE-T Status <0> PHY Extended Status <3000> PCI Status <10> e1000e: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/Tx Besides warning everything works fine. Original issue will be fixed property in following patch. Signed-off-by: Konstantin Khlebnikov Reported-by: Joseph Yasi Link: https://bugzilla.kernel.org/show_bug.cgi?id=203175 Tested-by: Joseph Yasi Tested-by: Aaron Brown Tested-by: Oleksandr Natalenko Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/e1000e/netdev.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 16ecd8d9af269129ebfccf0c95cf44a9d6f43723 Author: Sasha Neftin Date: Mon Apr 15 14:10:35 2019 +0300 igc: Remove the obsolete workaround Enables a resend request after the completion timeout workaround is not relevant for i225 device. This patch is clean code relevant this workaround. Minor cosmetic fixes, replace the 'spaces' with 'tabs' Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igc/igc_base.c | 49 ---------------------------- drivers/net/ethernet/intel/igc/igc_defines.h | 12 ++----- 2 files changed, 3 insertions(+), 58 deletions(-) commit 796bfb103516500af6f9f2495a36764fcd7cb4ea Author: Sasha Neftin Date: Thu Apr 4 13:26:53 2019 +0300 igc: Clean up unused pointers Few function pointers from phy_operations structure were unused. This patch cleans those. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igc/igc_hw.h | 3 --- 1 file changed, 3 deletions(-) commit ae586f0b39d508f400fdfa8139ebac96c72c1f86 Author: Sasha Neftin Date: Wed Apr 3 16:58:04 2019 +0300 igc: Fix double definitions Collision threshold and threshold's shift has been defined twice. This patch comes to fix that. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igc/igc_defines.h | 3 --- 1 file changed, 3 deletions(-) commit 42277cedbaf40baef50fd4866b448eb791616b0a Author: Gustavo A. R. Silva Date: Fri Mar 29 16:38:46 2019 -0700 igb: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warning: drivers/net/ethernet/intel/igb/e1000_82575.c: In function ‘igb_get_invariants_82575’: drivers/net/ethernet/intel/igb/e1000_82575.c:636:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (igb_sgmii_uses_mdio_82575(hw)) { ^ drivers/net/ethernet/intel/igb/e1000_82575.c:642:2: note: here case E1000_CTRL_EXT_LINK_MODE_PCIE_SERDES: ^~~~ Warning level 3 was used: -Wimplicit-fallthrough=3 Notice that, in this particular case, the code comment is modified in accordance with what GCC is expecting to find. This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough. Signed-off-by: "Gustavo A. R. Silva" Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/e1000_82575.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b7b3ad7aaf4f5b7ef2561ae3462b2efbfbe23b12 Author: Gustavo A. R. Silva Date: Fri Mar 29 16:38:45 2019 -0700 igb: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warning: drivers/net/ethernet/intel/igb/igb_main.c: In function ‘__igb_notify_dca’: drivers/net/ethernet/intel/igb/igb_main.c:6694:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (dca_add_requester(dev) == 0) { ^ drivers/net/ethernet/intel/igb/igb_main.c:6701:2: note: here case DCA_PROVIDER_REMOVE: ^~~~ Warning level 3 was used: -Wimplicit-fallthrough=3 Notice that, in this particular case, the code comment is modified in accordance with what GCC is expecting to find. This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough. Signed-off-by: "Gustavo A. R. Silva" Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/igb_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 47e16692b26bf58420385be76d5aa17af383d4e2 Author: Feng Tang Date: Wed Feb 13 10:41:54 2019 +0800 igb/igc: warn when fatal read failure happens Failed in read the HW register is very serious for igb/igc driver, as its hw_addr will be set to NULL and cause the adapter be seen as "REMOVED". We saw the error only a few times in the MTBF test for suspend/resume, but can hardly get any useful info to debug. Adding WARN() so that we can get the necessary information about where and how it happens, and use it for root causing and fixing this "PCIe link lost issue" This affects igb, igc. Signed-off-by: Feng Tang Tested-by: Aaron Brown Acked-by: Sasha Neftin Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/igb_main.c | 1 + drivers/net/ethernet/intel/igc/igc_main.c | 1 + 2 files changed, 2 insertions(+) commit 0223fad3c98a9588c159a35dda2ef6e68ca27e3f Author: Richard Guy Briggs Date: Wed May 22 17:52:02 2019 -0400 audit: enforce op for string fields The field operator is ignored on several string fields. WATCH, DIR, PERM and FILETYPE field operators are completely ignored and meaningless since the op is not referenced in audit_filter_rules(). Range and bitwise operators are already addressed in ghak73. Honour the operator for WATCH, DIR, PERM, FILETYPE fields as is done in the EXE field. Please see github issue https://github.com/linux-audit/audit-kernel/issues/114 Signed-off-by: Richard Guy Briggs Signed-off-by: Paul Moore kernel/auditsc.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit 14f1cfd4f7b4794e2f9d2ae214bcf049654b0b5c Author: Adrian Hunter Date: Fri Apr 12 14:38:30 2019 +0300 perf intel-pt: Rationalize intel_pt_sync_switch()'s use of next_tid Returning 1 from intel_pt_sync_switch() causes the current tid to be set. That negates the need to keep next_tid anymore. Rationalize the code to that effect. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190412113830.4126-9-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c7b4f15ff79b539fed4c382e52e988548081bc9d Author: Adrian Hunter Date: Fri Apr 12 14:38:29 2019 +0300 perf intel-pt: Improve sync_switch by processing PERF_RECORD_SWITCH* in events sync_switch is a facility to synchronize decoding more closely with the point in the kernel when the context actually switched. Improve it by processing "context switch in" events. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190412113830.4126-8-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt.c | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) commit 3cd3216dbb421244b96b992f193e778a3baa2220 Author: Adrian Hunter Date: Fri Apr 12 14:38:27 2019 +0300 perf scripts python: export-to-postgresql.py: Add support for pyside2 pyside2 is the future for pyside support. Note pyside use Qt4 whereas pyside2 uses Qt5. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190412113830.4126-6-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/scripts/python/export-to-postgresql.py | 43 ++++++++++++++++++----- 1 file changed, 34 insertions(+), 9 deletions(-) commit bfb3170e2481b76a4f8aae94176e45d681a37f3e Author: Adrian Hunter Date: Fri Apr 12 14:38:26 2019 +0300 perf scripts python: export-to-sqlite.py: Add support for pyside2 pyside2 is the future for pyside support. Note pyside use Qt4 whereas pyside2 uses Qt5. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190412113830.4126-5-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/scripts/python/export-to-sqlite.py | 44 +++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 6 deletions(-) commit df8ea22a8fd9e4e8502f4fa917622801e1b4d09e Author: Adrian Hunter Date: Fri Apr 12 14:38:25 2019 +0300 perf scripts python: exported-sql-viewer.py: Add support for pyside2 pyside2 is the future for pyside support. Note pyside use Qt4 whereas pyside2 uses Qt5. Committer testing: On a system with just: # rpm -qa| grep -i pyside python2-pyside-1.2.4-7.fc29.x86_64 # Running: $ python ~acme/libexec/perf-core/scripts/python/exported-sql-viewer.py ~/c/adrian.hunter/simple-retpoline.db & [1] 7438 Makes it use the pyside 1 files: $ grep -i pyside /proc/7438/maps | cut -d ' ' -f 6- | sort -u /usr/lib64/libpyside-python2.7.so.1.2.4 /usr/lib64/python2.7/site-packages/PySide/QtCore.so /usr/lib64/python2.7/site-packages/PySide/QtGui.so /usr/lib64/python2.7/site-packages/PySide/QtSql.so $ rpm -qf /usr/lib64/libpyside-python2.7.so.1.2.4 python2-pyside-1.2.4-7.fc29.x86_64 $ To get PySide2 I guess one needs to do: $ pip install PySide2 But thats a 142MiB download I can't do right now, perhaps before pushing upstream... Signed-off-by: Adrian Hunter Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190412113830.4126-4-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/scripts/python/exported-sql-viewer.py | 28 ++++++++++++++++++------ 1 file changed, 21 insertions(+), 7 deletions(-) commit 1ed7f47fd3af3c09d2cd64d1aff1c5b96d238111 Author: Adrian Hunter Date: Fri Apr 12 14:38:24 2019 +0300 perf scripts python: exported-sql-viewer.py: Use argparse module for argument parsing The argparse module makes it easier to add new arguments. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190412113830.4126-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/scripts/python/exported-sql-viewer.py | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) commit c6aba1bf258ff1ce201f112dafe1bdde601573dd Author: Adrian Hunter Date: Fri Apr 12 14:38:23 2019 +0300 perf scripts python: exported-sql-viewer.py: Change python2 to python Now that there is also support for python3, there is no need to specify python2 explicitly. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190412113830.4126-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/scripts/python/exported-sql-viewer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2d45ef7033ec90104ae8e4c3996227bdad24dc76 Author: Arnaldo Carvalho de Melo Date: Mon May 20 11:04:08 2019 -0300 perf top: Lower message level for failure on synthesizing events for pre-existing BPF programs Move it from being a pr_warning() to a pr_debug(). Also capitalize BPF and explain what gets missing when we're not able to synthesize these events: we'll not be able to resolve symbols, etc. Reported-by: Ingo Molnar Cc: Adrian Hunter Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Daniel Borkmann Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Martin KaFai Lau Cc: Namhyung Kim Cc: Song Liu Cc: Wang Nan Cc: Yonghong Song Link: https://lkml.kernel.org/n/tip-whpnfnw6xtd939odgt9bw9as@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-top.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7952fa3b54bf6834dca22a21363c7caf78525720 Author: Arnaldo Carvalho de Melo Date: Tue May 28 17:36:46 2019 -0300 perf python: Remove -fstack-protector-strong if clang doesn't have it Some distros put -fstack-protector-strong in the compiler flags to be used to build python extensions, but then, the clang version in that distro doesn't know about that, only gcc does. Check if that is the case and remove it from the set of options used to build the python binding with clang. Case at hand: oraclelinux:7 $ head -2 /etc/os-release NAME="Oracle Linux Server" VERSION="7.6" $ grep stack-protector /usr/lib64/python2.7/_sysconfigdata.py | head -1 | cut -c-120 'CFLAGS': '-fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --para $ gcc version 4.8.5 20150623 (Red Hat 4.8.5-36.0.1) (GCC) clang version 3.4.2 (tags/RELEASE_34/dot2-final) clang: error: unknown argument: '-fstack-protector-strong' clang: error: unknown argument: '-fstack-protector-strong' error: command 'clang' failed with exit status 1 cp: cannot stat '/tmp/build/perf/python_ext_build/lib/perf*.so': No such file or directory make[2]: *** [/tmp/build/perf/python/perf.so] Error 1 Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-brmp2415zxpbhz45etkgjoma@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/setup.py | 2 ++ 1 file changed, 2 insertions(+) commit da2019633f0b5c105ce658aada333422d8cb28fe Author: Arnaldo Carvalho de Melo Date: Tue May 28 16:02:56 2019 -0300 perf annotate TUI browser: Do not use member from variable within its own initialization Some compilers will complain when using a member of a struct to initialize another member, in the same struct initialization. For instance: debian:8 Debian clang version 3.5.0-10 (tags/RELEASE_350/final) (based on LLVM 3.5.0) oraclelinux:7 clang version 3.4.2 (tags/RELEASE_34/dot2-final) Produce: ui/browsers/annotate.c:104:12: error: variable 'ops' is uninitialized when used within its own initialization [-Werror,-Wuninitialized] (!ops.current_entry || ^~~ 1 error generated. So use an extra variable, initialized just before that struct, to have the value used in the expressions used to init two of the struct members. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Fixes: c298304bd747 ("perf annotate: Use a ops table for annotation_line__write()") Link: https://lkml.kernel.org/n/tip-f9nexro58q62l3o9hez8hr0i@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/annotate.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 34b65affe18daad31fed83e50d1f3b817786a2b7 Author: Donald Yandt Date: Tue May 28 09:41:28 2019 -0400 perf machine: Return NULL instead of null-terminating /proc/version array Return NULL instead of null-terminating version char array when fgets fails due to end-of-file or error. Signed-off-by: Donald Yandt Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Yanmin Zhang Fixes: 30ba5b0e66c8 ("perf machine: Null-terminate version char array upon fgets(/proc/version) error") Link: http://lkml.kernel.org/r/20190528134128.30841-1-donald.yandt@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/machine.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 80ec26d110c5c5a81b60c444db851e5734dee09a Author: Arnaldo Carvalho de Melo Date: Fri May 24 15:50:18 2019 -0300 perf version: Append 12 git SHA chars to the version string Bumping it from just 4: Before: $ perf -v perf version 5.2.rc1.g80978f $ After: $ perf -v perf version 5.2.rc1.g80978fc864c5 $ Requested-by: Ingo Molnar Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-p4yun2nxlo7eeeohyx5v4kw7@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/PERF-VERSION-GEN | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8201787cbb723a20bf262ecb41b74962ad27e659 Author: Jiri Olsa Date: Wed May 8 15:20:09 2019 +0200 perf script: Remove superfluous BPF event titles There's no need to display "ksymbol event with" text for the PERF_RECORD_KSYMBOL event and "bpf event with" test for the PERF_RECORD_BPF_EVENT event. Remove it so it also goes along with other side-band events display. Before: # perf script --show-bpf-events ... swapper 0 [000] 0.000000: PERF_RECORD_KSYMBOL ksymbol event with addr ffffffffc0ef971d len 229 type 1 flags 0x0 name bpf_prog_2a142ef67aaad174 swapper 0 [000] 0.000000: PERF_RECORD_BPF_EVENT bpf event with type 1, flags 0, id 36 After: # perf script --show-bpf-events ... swapper 0 [000] 0.000000: PERF_RECORD_KSYMBOL addr ffffffffc0ef971d len 229 type 1 flags 0x0 name bpf_prog_2a142ef67aaad174 swapper 0 [000] 0.000000: PERF_RECORD_BPF_EVENT type 1, flags 0, id 36 Signed-off-by: Jiri Olsa Acked-by: Song Liu Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stanislav Fomichev Link: http://lkml.kernel.org/r/20190508132010.14512-12-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/event.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 490c8cc949eca14bfdbee0ad1cd1c6d3ddf46b77 Author: Jiri Olsa Date: Wed May 8 15:20:08 2019 +0200 perf script: Add --show-bpf-events to show eBPF related events Add the --show-bpf-events command line option to show the eBPF related events: PERF_RECORD_KSYMBOL PERF_RECORD_BPF_EVENT Usage: # perf record -a ... # perf script --show-bpf-events ... swapper 0 [000] 0.000000: PERF_RECORD_KSYMBOL ksymbol event with addr ffffffffc0ef971d len 229 type 1 flags 0x0 name bpf_prog_2a142ef67aaad174 swapper 0 [000] 0.000000: PERF_RECORD_BPF_EVENT bpf event with type 1, flags 0, id 36 ... Committer testing: # perf script --show-bpf-events | egrep -i 'PERF_RECORD_(BPF|KSY)' 0 PERF_RECORD_KSYMBOL ksymbol event with addr ffffffffc029a6c3 len 229 type 1 flags 0x0 name bpf_prog_7be49e3934a125ba 0 PERF_RECORD_BPF_EVENT bpf event with type 1, flags 0, id 47 0 PERF_RECORD_KSYMBOL ksymbol event with addr ffffffffc029c1ae len 229 type 1 flags 0x0 name bpf_prog_2a142ef67aaad174 0 PERF_RECORD_BPF_EVENT bpf event with type 1, flags 0, id 48 0 PERF_RECORD_KSYMBOL ksymbol event with addr ffffffffc02ddd1c len 229 type 1 flags 0x0 name bpf_prog_7be49e3934a125ba 0 PERF_RECORD_BPF_EVENT bpf event with type 1, flags 0, id 49 0 PERF_RECORD_KSYMBOL ksymbol event with addr ffffffffc02dfc11 len 229 type 1 flags 0x0 name bpf_prog_2a142ef67aaad174 0 PERF_RECORD_BPF_EVENT bpf event with type 1, flags 0, id 50 0 PERF_RECORD_KSYMBOL ksymbol event with addr ffffffffc045da0a len 229 type 1 flags 0x0 name bpf_prog_7be49e3934a125ba 0 PERF_RECORD_BPF_EVENT bpf event with type 1, flags 0, id 51 0 PERF_RECORD_KSYMBOL ksymbol event with addr ffffffffc04ef4b4 len 229 type 1 flags 0x0 name bpf_prog_2a142ef67aaad174 0 PERF_RECORD_BPF_EVENT bpf event with type 1, flags 0, id 52 0 PERF_RECORD_KSYMBOL ksymbol event with addr ffffffffc09e15da len 229 type 1 flags 0x0 name bpf_prog_7be49e3934a125ba 0 PERF_RECORD_BPF_EVENT bpf event with type 1, flags 0, id 53 0 PERF_RECORD_KSYMBOL ksymbol event with addr ffffffffc0d2b1a3 len 229 type 1 flags 0x0 name bpf_prog_2a142ef67aaad174 0 PERF_RECORD_BPF_EVENT bpf event with type 1, flags 0, id 54 0 PERF_RECORD_KSYMBOL ksymbol event with addr ffffffffc0fd9850 len 381 type 1 flags 0x0 name bpf_prog_819967866022f1e1_sys_enter 0 PERF_RECORD_BPF_EVENT bpf event with type 1, flags 0, id 179 0 PERF_RECORD_KSYMBOL ksymbol event with addr ffffffffc0feb1ec len 191 type 1 flags 0x0 name bpf_prog_c1bd85c092d6e4aa_sys_exit 0 PERF_RECORD_BPF_EVENT bpf event with type 1, flags 0, id 180 ^C[root@quaco pt]# perf evlist intel_pt//ku dummy:u # Signed-off-by: Jiri Olsa Acked-by: Song Liu Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stanislav Fomichev Link: http://lkml.kernel.org/r/20190508132010.14512-11-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-script.txt | 3 +++ tools/perf/builtin-script.c | 42 ++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) commit 4f600bcf657d4d0476d0d96cb38077a72b8fb2af Author: Jiri Olsa Date: Wed May 8 15:20:07 2019 +0200 perf tests: Add map_groups__merge_in test Add map_groups__merge_in test to test the map_groups__merge_in function usage - merging kcore maps into existing eBPF maps. Committer testing: # perf test merge 59: map_groups__merge_in : Ok # perf test -v merge 59: map_groups__merge_in : --- start --- test child forked, pid 8349 test child finished with 0 ---- end ---- map_groups__merge_in: Ok # Signed-off-by: Jiri Olsa Acked-by: Song Liu Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stanislav Fomichev Link: http://lkml.kernel.org/r/20190508132010.14512-10-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/Build | 1 + tools/perf/tests/builtin-test.c | 4 ++ tools/perf/tests/map_groups.c | 120 ++++++++++++++++++++++++++++++++++++++++ tools/perf/tests/tests.h | 1 + tools/perf/util/map_groups.h | 2 + tools/perf/util/symbol.c | 2 +- 6 files changed, 129 insertions(+), 1 deletion(-) commit 1c4924220c96392d17e0222c113509fd7b9a0854 Author: Jiri Olsa Date: Wed May 8 15:20:05 2019 +0200 perf script: Pad DSO name for --call-trace Pad the DSO name in --call-trace so we don't have the indent screwed by different DSO name lengths, as now for kernel there's also BPF code displayed. # perf-with-kcore record pt -e intel_pt//ku -- sleep 1 # perf-core/perf-with-kcore script pt --call-trace Before: sleep 3660 [16] 57036.806464404: ([kernel.kallsyms]) kretprobe_perf_func sleep 3660 [16] 57036.806464404: ([kernel.kallsyms]) trace_call_bpf sleep 3660 [16] 57036.806464404: ([kernel.kallsyms]) __x86_indirect_thunk_rax sleep 3660 [16] 57036.806464404: ([kernel.kallsyms]) __x86_indirect_thunk_rax sleep 3660 [16] 57036.806464725: (bpf_prog_da4fe6b3d2c29b25_trace_return) bpf_get_current_pid_tgid sleep 3660 [16] 57036.806464725: (bpf_prog_da4fe6b3d2c29b25_trace_return) bpf_ktime_get_ns sleep 3660 [16] 57036.806464725: ([kernel.kallsyms]) __x86_indirect_thunk_rax sleep 3660 [16] 57036.806464725: ([kernel.kallsyms]) __x86_indirect_thunk_rax sleep 3660 [16] 57036.806465045: (bpf_prog_da4fe6b3d2c29b25_trace_return) __htab_map_lookup_elem sleep 3660 [16] 57036.806465366: ([kernel.kallsyms]) memcmp sleep 3660 [16] 57036.806465687: (bpf_prog_da4fe6b3d2c29b25_trace_return) bpf_probe_read sleep 3660 [16] 57036.806465687: ([kernel.kallsyms]) probe_kernel_read sleep 3660 [16] 57036.806465687: ([kernel.kallsyms]) __check_object_size sleep 3660 [16] 57036.806465687: ([kernel.kallsyms]) check_stack_object sleep 3660 [16] 57036.806465687: ([kernel.kallsyms]) copy_user_enhanced_fast_string sleep 3660 [16] 57036.806465687: (bpf_prog_da4fe6b3d2c29b25_trace_return) bpf_probe_read sleep 3660 [16] 57036.806465687: ([kernel.kallsyms]) probe_kernel_read sleep 3660 [16] 57036.806465687: ([kernel.kallsyms]) __check_object_size sleep 3660 [16] 57036.806465687: ([kernel.kallsyms]) check_stack_object sleep 3660 [16] 57036.806465687: ([kernel.kallsyms]) copy_user_enhanced_fast_string sleep 3660 [16] 57036.806466008: (bpf_prog_da4fe6b3d2c29b25_trace_return) bpf_get_current_uid_gid sleep 3660 [16] 57036.806466008: ([kernel.kallsyms]) from_kgid sleep 3660 [16] 57036.806466008: ([kernel.kallsyms]) from_kuid sleep 3660 [16] 57036.806466008: (bpf_prog_da4fe6b3d2c29b25_trace_return) bpf_perf_event_output sleep 3660 [16] 57036.806466328: ([kernel.kallsyms]) perf_event_output sleep 3660 [16] 57036.806466328: ([kernel.kallsyms]) perf_prepare_sample sleep 3660 [16] 57036.806466328: ([kernel.kallsyms]) perf_misc_flags sleep 3660 [16] 57036.806466328: ([kernel.kallsyms]) __x86_indirect_thunk_rax sleep 3660 [16] 57036.806466328: ([kernel.kallsyms]) __x86_indirect_thunk_rax sleep 3660 [16] 57036.806466328: ([kvm]) kvm_is_in_guest sleep 3660 [16] 57036.806466649: ([kernel.kallsyms]) __perf_event_header__init_id.isra.0 sleep 3660 [16] 57036.806466649: ([kernel.kallsyms]) perf_output_begin After: sleep 3660 [16] 57036.806464404: ([kernel.kallsyms] ) kretprobe_perf_func sleep 3660 [16] 57036.806464404: ([kernel.kallsyms] ) trace_call_bpf sleep 3660 [16] 57036.806464404: ([kernel.kallsyms] ) __x86_indirect_thunk_rax sleep 3660 [16] 57036.806464404: ([kernel.kallsyms] ) __x86_indirect_thunk_rax sleep 3660 [16] 57036.806464725: (bpf_prog_da4fe6b3d2c29b25_trace_return ) bpf_get_current_pid_tgid sleep 3660 [16] 57036.806464725: (bpf_prog_da4fe6b3d2c29b25_trace_return ) bpf_ktime_get_ns sleep 3660 [16] 57036.806464725: ([kernel.kallsyms] ) __x86_indirect_thunk_rax sleep 3660 [16] 57036.806464725: ([kernel.kallsyms] ) __x86_indirect_thunk_rax sleep 3660 [16] 57036.806465045: (bpf_prog_da4fe6b3d2c29b25_trace_return ) __htab_map_lookup_elem sleep 3660 [16] 57036.806465366: ([kernel.kallsyms] ) memcmp sleep 3660 [16] 57036.806465687: (bpf_prog_da4fe6b3d2c29b25_trace_return ) bpf_probe_read sleep 3660 [16] 57036.806465687: ([kernel.kallsyms] ) probe_kernel_read sleep 3660 [16] 57036.806465687: ([kernel.kallsyms] ) __check_object_size sleep 3660 [16] 57036.806465687: ([kernel.kallsyms] ) check_stack_object sleep 3660 [16] 57036.806465687: ([kernel.kallsyms] ) copy_user_enhanced_fast_string sleep 3660 [16] 57036.806465687: (bpf_prog_da4fe6b3d2c29b25_trace_return ) bpf_probe_read sleep 3660 [16] 57036.806465687: ([kernel.kallsyms] ) probe_kernel_read sleep 3660 [16] 57036.806465687: ([kernel.kallsyms] ) __check_object_size sleep 3660 [16] 57036.806465687: ([kernel.kallsyms] ) check_stack_object sleep 3660 [16] 57036.806465687: ([kernel.kallsyms] ) copy_user_enhanced_fast_string sleep 3660 [16] 57036.806466008: (bpf_prog_da4fe6b3d2c29b25_trace_return ) bpf_get_current_uid_gid sleep 3660 [16] 57036.806466008: ([kernel.kallsyms] ) from_kgid sleep 3660 [16] 57036.806466008: ([kernel.kallsyms] ) from_kuid sleep 3660 [16] 57036.806466008: (bpf_prog_da4fe6b3d2c29b25_trace_return ) bpf_perf_event_output sleep 3660 [16] 57036.806466328: ([kernel.kallsyms] ) perf_event_output sleep 3660 [16] 57036.806466328: ([kernel.kallsyms] ) perf_prepare_sample sleep 3660 [16] 57036.806466328: ([kernel.kallsyms] ) perf_misc_flags sleep 3660 [16] 57036.806466328: ([kernel.kallsyms] ) __x86_indirect_thunk_rax sleep 3660 [16] 57036.806466328: ([kernel.kallsyms] ) __x86_indirect_thunk_rax Signed-off-by: Jiri Olsa Acked-by: Song Liu Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stanislav Fomichev Link: http://lkml.kernel.org/r/20190508132010.14512-8-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/linux/kernel.h | 1 + tools/lib/vsprintf.c | 19 +++++++++++++++++++ tools/perf/builtin-script.c | 1 + tools/perf/util/map.c | 6 ++++++ tools/perf/util/symbol_conf.h | 1 + 5 files changed, 28 insertions(+) commit 6c398d723a6a6d27485e701ae21e50304ec95595 Author: Jiri Olsa Date: Wed May 8 15:20:02 2019 +0200 perf dso: Add BPF DSO read and size hooks Add BPF related code into DSO reading paths to return size (bpf_size) and read the BPF code (bpf_read). Signed-off-by: Jiri Olsa Acked-by: Song Liu Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stanislav Fomichev Link: http://lkml.kernel.org/r/20190508132010.14512-5-jolsa@kernel.org [ Use uintptr_t when casting from u64 to u8 pointers ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/dso.c | 49 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) commit cacddfe7b0804752528e8100461266ec33dc6b64 Author: Jiri Olsa Date: Wed May 8 15:20:01 2019 +0200 perf dso: Simplify dso_cache__read function There's no need for the while loop now, also we can connect two (ret > 0) condition legs together. Signed-off-by: Jiri Olsa Acked-by: Song Liu Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Cc: Stanislav Fomichev Link: http://lkml.kernel.org/r/20190508132010.14512-4-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/dso.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit ea5db1bd5a04b865bc86bb8e3267c27939dfb5ee Author: Jiri Olsa Date: Wed May 8 15:20:00 2019 +0200 perf dso: Separate generic code in dso_cache__read Move the file specific code in the dso_cache__read function to a separate file_read function. I'll add BPF specific code in the following patches. Signed-off-by: Jiri Olsa Acked-by: Song Liu Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stanislav Fomichev Link: http://lkml.kernel.org/r/20190508132010.14512-3-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/dso.c | 48 +++++++++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 21 deletions(-) commit 5523769ee15f27a1bc2009346736b22cb907bff8 Author: Jiri Olsa Date: Wed May 8 15:19:59 2019 +0200 perf dso: Separate generic code in dso__data_file_size() Moving file specific code in dso__data_file_size function into separate file_size function. I'll add bpf specific code in following patches. Signed-off-by: Jiri Olsa Acked-by: Song Liu Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stanislav Fomichev Link: http://lkml.kernel.org/r/20190508132010.14512-2-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/dso.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit 7cb10a08df98e643b87d4bc8422e50e9c43b5c60 Author: Namhyung Kim Date: Mon May 27 15:11:49 2019 +0900 perf tools: Remove const from thread read accessors The namespaces and comm fields of a thread are protected by rwsem and require write access for it. So it ended up using a cast to remove the const qualifier. Let's get rid of the const then. Signed-off-by: Namhyung Kim Suggested-by: Arnaldo Carvalho de Melo Cc: Hari Bathini Cc: Jiri Olsa Cc: Krister Johansen Link: http://lkml.kernel.org/r/20190527061149.168640-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/hist.c | 2 +- tools/perf/util/thread.c | 12 ++++++------ tools/perf/util/thread.h | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) commit a0c0a4ac021b017e385d0328541ccfebeef165fc Author: Namhyung Kim Date: Wed May 22 14:32:50 2019 +0900 perf top: Add --namespaces option Since 'perf record' already have this option, let's have it for 'perf top' as well. Signed-off-by: Namhyung Kim Cc: Hari Bathini Cc: Jiri Olsa Cc: Krister Johansen Link: http://lkml.kernel.org/r/20190522053250.207156-4-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-top.txt | 5 +++++ tools/perf/builtin-top.c | 5 +++++ 2 files changed, 10 insertions(+) commit a9a187a749f95dda24302aae5c9a0b6b9ee74c99 Author: Arnaldo Carvalho de Melo Date: Tue May 21 21:47:07 2019 -0300 perf trace: Beautify 'sync_file_range' arguments Use existing beautifiers for the first arg, fd, assigned using the heuristic that looks for syscall arg names and associates SCA_FD with 'fd' named argumes, and wire up the recently introduced sync_file_range flags table generator. Now it should be possible to just use: perf trace -e sync_file_range As root and see all sync_file_range syscalls with its args beautified. Doing a syscall strace like session looking for this syscall, then run postgresql's initdb command: # perf trace -e sync_file_range initdb/1332 sync_file_range(6, 0, 0, SYNC_FILE_RANGE_WRITE) = 0 initdb/1332 sync_file_range(6, 0, 0, SYNC_FILE_RANGE_WRITE) = 0 initdb/1332 sync_file_range(5, 0, 0, SYNC_FILE_RANGE_WRITE) = 0 initdb/1332 sync_file_range(5, 0, 0, SYNC_FILE_RANGE_WRITE) = 0 initdb/1332 sync_file_range(5, 0, 0, SYNC_FILE_RANGE_WRITE) = 0 initdb/1332 sync_file_range(5, 0, 0, SYNC_FILE_RANGE_WRITE) = 0 initdb/1332 sync_file_range(5, 0, 0, SYNC_FILE_RANGE_WRITE) = 0 initdb/1332 sync_file_range(5, 0, 0, SYNC_FILE_RANGE_WRITE) = 0 initdb/1332 sync_file_range(5, 0, 0, SYNC_FILE_RANGE_WRITE) = 0 initdb/1332 sync_file_range(5, 0, 0, SYNC_FILE_RANGE_WRITE) = 0 initdb/1332 sync_file_range(7, 0, 0, SYNC_FILE_RANGE_WRITE) = 0 initdb/1332 sync_file_range(6, 0, 0, SYNC_FILE_RANGE_WRITE) = 0 initdb/1332 sync_file_range(7, 0, 0, SYNC_FILE_RANGE_WRITE) = 0 initdb/1332 sync_file_range(6, 0, 0, SYNC_FILE_RANGE_WRITE) = 0 initdb/1332 sync_file_range(5, 0, 0, SYNC_FILE_RANGE_WRITE) = 0 initdb/1332 sync_file_range(5, 0, 0, SYNC_FILE_RANGE_WRITE) = 0 initdb/1332 sync_file_range(5, 0, 0, SYNC_FILE_RANGE_WRITE) = 0 initdb/1332 sync_file_range(5, 0, 0, SYNC_FILE_RANGE_WRITE) = 0 initdb/1332 sync_file_range(4, 0, 0, SYNC_FILE_RANGE_WRITE) = 0 initdb/1332 sync_file_range(4, 0, 0, SYNC_FILE_RANGE_WRITE) = 0 ^C # Cc: Adrian Hunter Cc: Amir Goldstein Cc: Brendan Gregg Cc: Jiri Olsa Cc: Linus Torvalds Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-8tqy34xhpg8gwnaiv74xy93w@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.perf | 12 ++++++++++-- tools/perf/builtin-trace.c | 2 ++ tools/perf/trace/beauty/Build | 1 + tools/perf/trace/beauty/beauty.h | 3 +++ tools/perf/trace/beauty/sync_file_range.c | 31 +++++++++++++++++++++++++++++++ 5 files changed, 47 insertions(+), 2 deletions(-) commit 8ef6d74e1dd5ac830fa8b7943255ad9a44a94914 Author: Arnaldo Carvalho de Melo Date: Tue May 21 21:43:39 2019 -0300 perf beauty: Add generator for sync_file_range's 'flags' arg values $ tools/perf/trace/beauty/sync_file_range.sh static const char *sync_file_range_flags[] = { [ilog2(1) + 1] = "WAIT_BEFORE", [ilog2(2) + 1] = "WRITE", [ilog2(4) + 1] = "WAIT_AFTER", }; $ When all are the above are present, then we have something called SYNC_FILE_RANGE_WRITE_AND_WAIT, that will be special cased in the upcoming scnprintf beautifier for this flags arg. Cc: Adrian Hunter Cc: Amir Goldstein Cc: Brendan Gregg Cc: Jiri Olsa Cc: Linus Torvalds Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-uf2vd7bc8fkz65j7yit8dh84@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/trace/beauty/sync_file_range.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit ee364dcdcd008530883efc0e690fc8e85622f9b5 Author: Arnaldo Carvalho de Melo Date: Tue May 21 16:51:08 2019 -0300 perf trace beauty clone: Handle CLONE_PIDFD In addition to the older flags. This will allow something like this to be implemented in 'perf trace" perf trace -e clone/PIDFD in flags/ I.e. ask for strace like tracing, system wide, looking for 'clone' syscalls that have the CLONE_PIDFD bit set in the 'flags' arg. For now we'll just see PIDFD if it is set in the 'flags' arg. Cc: Christian Brauner Cc: Adrian Hunter Cc: Brendan Gregg Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-drq9h7s8gcv8b87064fp6lb0@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/trace/beauty/clone.c | 1 + 1 file changed, 1 insertion(+) commit f6af095668b7799a7514378824dcc74869df3994 Author: Arnaldo Carvalho de Melo Date: Tue May 21 16:34:03 2019 -0300 perf trace: Beautify 'fsmount' arguments Use existing beautifiers for the first arg, fd, assigned using the heuristic that looks for syscall arg names and associates SCA_FD with 'fd' named argumes, and wire up the recently introduced fsmount attr_flags table generator. Now it should be possible to just use: perf trace -e fsmount As root and see all fsmount syscalls with its args beautified. # cat sys_fsmount.c #define _GNU_SOURCE /* See feature_test_macros(7) */ #include #include /* For SYS_xxx definitions */ #define __NR_fsmount 432 #define MOUNT_ATTR_RDONLY 0x00000001 /* Mount read-only */ #define MOUNT_ATTR_NOSUID 0x00000002 /* Ignore suid and sgid bits */ #define MOUNT_ATTR_NODEV 0x00000004 /* Disallow access to device special files */ #define MOUNT_ATTR_NOEXEC 0x00000008 /* Disallow program execution */ #define MOUNT_ATTR__ATIME 0x00000070 /* Setting on how atime should be updated */ #define MOUNT_ATTR_RELATIME 0x00000000 /* - Update atime relative to mtime/ctime. */ #define MOUNT_ATTR_NOATIME 0x00000010 /* - Do not update access times. */ #define MOUNT_ATTR_STRICTATIME 0x00000020 /* - Always perform atime updates */ #define MOUNT_ATTR_NODIRATIME 0x00000080 /* Do not update directory access times */ static inline int sys_fsmount(int fs_fd, int flags, int attr_flags) { syscall(__NR_fsmount, fs_fd, flags, attr_flags); } int main(int argc, char *argv[]) { int attr_flags = 0, fs_fd = 0; sys_fsmount(fs_fd++, 0, attr_flags); attr_flags |= MOUNT_ATTR_RDONLY; sys_fsmount(fs_fd++, 1, attr_flags); attr_flags |= MOUNT_ATTR_NOSUID; sys_fsmount(fs_fd++, 0, attr_flags); attr_flags |= MOUNT_ATTR_NODEV; sys_fsmount(fs_fd++, 1, attr_flags); attr_flags |= MOUNT_ATTR_NOEXEC; sys_fsmount(fs_fd++, 0, attr_flags); attr_flags |= MOUNT_ATTR_NOATIME; sys_fsmount(fs_fd++, 1, attr_flags); attr_flags |= MOUNT_ATTR_STRICTATIME; sys_fsmount(fs_fd++, 0, attr_flags); attr_flags |= MOUNT_ATTR_NODIRATIME; sys_fsmount(fs_fd++, 0, attr_flags); return 0; } # # perf trace -e fsmount ./sys_fsmount fsmount(0, 0, MOUNT_ATTR_RELATIME) = -1 EINVAL (Invalid argument) fsmount(1, FSMOUNT_CLOEXEC, MOUNT_ATTR_RDONLY|MOUNT_ATTR_RELATIME) = -1 EINVAL (Invalid argument) fsmount(2, 0, MOUNT_ATTR_RDONLY|MOUNT_ATTR_NOSUID|MOUNT_ATTR_RELATIME) = -1 EINVAL (Invalid argument) fsmount(3, FSMOUNT_CLOEXEC, MOUNT_ATTR_RDONLY|MOUNT_ATTR_NOSUID|MOUNT_ATTR_NODEV|MOUNT_ATTR_RELATIME) = -1 EBADF (Bad file descriptor) fsmount(4, 0, MOUNT_ATTR_RDONLY|MOUNT_ATTR_NOSUID|MOUNT_ATTR_NODEV|MOUNT_ATTR_NOEXEC|MOUNT_ATTR_RELATIME) = -1 EBADF (Bad file descriptor) fsmount(5, FSMOUNT_CLOEXEC, MOUNT_ATTR_RDONLY|MOUNT_ATTR_NOSUID|MOUNT_ATTR_NODEV|MOUNT_ATTR_NOEXEC|MOUNT_ATTR_NOATIME) = -1 EBADF (Bad file descriptor) fsmount(6, 0, MOUNT_ATTR_RDONLY|MOUNT_ATTR_NOSUID|MOUNT_ATTR_NODEV|MOUNT_ATTR_NOEXEC|MOUNT_ATTR_NOATIME|MOUNT_ATTR_STRICTATIME) = -1 EINVAL (Invalid argument) fsmount(7, 0, MOUNT_ATTR_RDONLY|MOUNT_ATTR_NOSUID|MOUNT_ATTR_NODEV|MOUNT_ATTR_NOEXEC|MOUNT_ATTR_NOATIME|MOUNT_ATTR_STRICTATIME|MOUNT_ATTR_NODIRATIME) = -1 EINVAL (Invalid argument) # Cc: Adrian Hunter Cc: Al Viro Cc: Brendan Gregg Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-w71uge0sfo6ns9uclhwtthca@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.perf | 8 ++++++++ tools/perf/builtin-trace.c | 12 ++++++++++++ tools/perf/trace/beauty/Build | 1 + tools/perf/trace/beauty/beauty.h | 3 +++ tools/perf/trace/beauty/fsmount.c | 34 ++++++++++++++++++++++++++++++++++ 5 files changed, 58 insertions(+) commit f5b91dbba1a51d30a3fe78a5c6096392fa99471e Author: Arnaldo Carvalho de Melo Date: Thu May 23 18:05:03 2019 -0300 perf trace: Introduce syscall_arg__scnprintf_strarray_flags So that one can just define a strarray and process it as a set of flags, similar to syscall_arg__scnprintf_strarray() with plain arrays. Cc: Adrian Hunter Cc: Brendan Gregg Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-nnt25wkpkow2w0yefhi6sb7q@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-trace.c | 5 +++++ tools/perf/trace/beauty/beauty.h | 3 +++ 2 files changed, 8 insertions(+) commit 3637c64731a78ebe81fba0c282208a860c839307 Author: Arnaldo Carvalho de Melo Date: Tue May 21 15:57:16 2019 -0300 perf beauty: Add generator for fsmount's 'attr_flags' arg values $ tools/perf/trace/beauty/fsmount.sh static const char *fsmount_attr_flags[] = { [ilog2(0x00000001) + 1] = "RDONLY", [ilog2(0x00000002) + 1] = "NOSUID", [ilog2(0x00000004) + 1] = "NODEV", [ilog2(0x00000008) + 1] = "NOEXEC", [ilog2(0x00000010) + 1] = "NOATIME", [ilog2(0x00000020) + 1] = "STRICTATIME", [ilog2(0x00000080) + 1] = "NODIRATIME", } MOUNT_ATTR__ATIME and MOUNT_ATTR_RELATIME will be special cased in the fsmount__scnprintf_flags() beautifier. Cc: Adrian Hunter Cc: Al Viro Cc: Brendan Gregg Cc: David Howells Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-sl24d7m2ge82mfmrbaf1mb0s@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/trace/beauty/fsmount.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit dcc6fd64f2e9448ccc1c3e1ccd46a9ff5286b861 Author: Arnaldo Carvalho de Melo Date: Tue May 21 15:36:44 2019 -0300 perf trace: Beautify 'fsconfig' arguments Use existing beautifiers for the first arg, fd, assigned using the heuristic that looks for syscall arg names and associates SCA_FD with 'fd' named argumes, and wire up the recently introduced fsconfig cmd table generator. Now it should be possible to just use: perf trace -e fsconfig As root and see all fsconfig syscalls with its args beautified, more work needed to look at the command and according to it handle the 'key', 'value' and 'aux' args, using the 'fcntl' and 'futex' beautifiers as a starting point to see how to suppress sets of these last three args that may not be used by the 'cmd' arg, etc. # cat sys_fsconfig.c #define _GNU_SOURCE /* See feature_test_macros(7) */ #include #include /* For SYS_xxx definitions */ #include #define __NR_fsconfig 431 enum fsconfig_command { FSCONFIG_SET_FLAG = 0, /* Set parameter, supplying no value */ FSCONFIG_SET_STRING = 1, /* Set parameter, supplying a string value */ FSCONFIG_SET_BINARY = 2, /* Set parameter, supplying a binary blob value */ FSCONFIG_SET_PATH = 3, /* Set parameter, supplying an object by path */ FSCONFIG_SET_PATH_EMPTY = 4, /* Set parameter, supplying an object by (empty) path */ FSCONFIG_SET_FD = 5, /* Set parameter, supplying an object by fd */ FSCONFIG_CMD_CREATE = 6, /* Invoke superblock creation */ FSCONFIG_CMD_RECONFIGURE = 7, /* Invoke superblock reconfiguration */ }; static inline int sys_fsconfig(int fd, int cmd, const char *key, const void *value, int aux) { syscall(__NR_fsconfig, fd, cmd, key, value, aux); } int main(int argc, char *argv[]) { int fd = 0, aux = 0; open("/foo", 0); sys_fsconfig(fd++, FSCONFIG_SET_FLAG, "/foo1", "/bar1", aux++); sys_fsconfig(fd++, FSCONFIG_SET_STRING, "/foo2", "/bar2", aux++); sys_fsconfig(fd++, FSCONFIG_SET_BINARY, "/foo3", "/bar3", aux++); sys_fsconfig(fd++, FSCONFIG_SET_PATH, "/foo4", "/bar4", aux++); sys_fsconfig(fd++, FSCONFIG_SET_PATH_EMPTY, "/foo5", "/bar5", aux++); sys_fsconfig(fd++, FSCONFIG_SET_FD, "/foo6", "/bar6", aux++); sys_fsconfig(fd++, FSCONFIG_CMD_CREATE, "/foo7", "/bar7", aux++); sys_fsconfig(fd++, FSCONFIG_CMD_RECONFIGURE, "/foo8", "/bar8", aux++); return 0; } # trace -e fsconfig ./sys_fsconfig fsconfig(0, FSCONFIG_SET_FLAG, 0x40201b, 0x402015, 0) = -1 EINVAL (Invalid argument) fsconfig(1, FSCONFIG_SET_STRING, 0x402027, 0x402021, 1) = -1 EINVAL (Invalid argument) fsconfig(2, FSCONFIG_SET_BINARY, 0x402033, 0x40202d, 2) = -1 EINVAL (Invalid argument) fsconfig(3, FSCONFIG_SET_PATH, 0x40203f, 0x402039, 3) = -1 EBADF (Bad file descriptor) fsconfig(4, FSCONFIG_SET_PATH_EMPTY, 0x40204b, 0x402045, 4) = -1 EBADF (Bad file descriptor) fsconfig(5, FSCONFIG_SET_FD, 0x402057, 0x402051, 5) = -1 EINVAL (Invalid argument) fsconfig(6, FSCONFIG_CMD_CREATE, 0x402063, 0x40205d, 6) = -1 EINVAL (Invalid argument) fsconfig(7, FSCONFIG_CMD_RECONFIGURE, 0x40206f, 0x402069, 7) = -1 EINVAL (Invalid argument) # Cc: Adrian Hunter Cc: Al Viro Cc: Brendan Gregg Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-fb04b76cm59zfuv1wzu40uxy@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.perf | 8 ++++++++ tools/perf/builtin-trace.c | 6 ++++++ 2 files changed, 14 insertions(+) commit d35293004a5e40c330ae5bf3667d716e702fe94a Author: Arnaldo Carvalho de Melo Date: Tue May 21 15:07:43 2019 -0300 perf beauty: Add generator for fsconfig's 'cmd' arg values $ tools/perf/trace/beauty/fsconfig.sh static const char *fsconfig_cmds[] = { [0] = "SET_FLAG", [1] = "SET_STRING", [2] = "SET_BINARY", [3] = "SET_PATH", [4] = "SET_PATH_EMPTY", [5] = "SET_FD", [6] = "CMD_CREATE", [7] = "CMD_RECONFIGURE", }; $ Cc: Adrian Hunter Cc: Al Viro Cc: Brendan Gregg Cc: David Howells Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-u721396rkqmawmt91dwwsntu@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/trace/beauty/fsconfig.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 693bd3949be6c73218e3666d85e37841d678ea7b Author: Arnaldo Carvalho de Melo Date: Mon May 20 16:24:15 2019 -0300 perf trace: Beautify 'fspick' arguments Use existing beautifiers for the first 2 args (dfd, path) and wire up the recently introduced fspick flags table generator. Now it should be possible to just use: perf trace -e fspick As root and see all move_mount syscalls with its args beautified, either using the vfs_getname perf probe method or using the augmented_raw_syscalls.c eBPF helper to get the pathnames, the other args should work in all cases, i.e. all that is needed can be obtained directly from the raw_syscalls:sys_enter tracepoint args. # cat sys_fspick.c #define _GNU_SOURCE /* See feature_test_macros(7) */ #include #include /* For SYS_xxx definitions */ #include #define __NR_fspick 433 #define FSPICK_CLOEXEC 0x00000001 #define FSPICK_SYMLINK_NOFOLLOW 0x00000002 #define FSPICK_NO_AUTOMOUNT 0x00000004 #define FSPICK_EMPTY_PATH 0x00000008 static inline int sys_fspick(int fd, const char *path, int flags) { syscall(__NR_fspick, fd, path, flags); } int main(int argc, char *argv[]) { int flags = 0, fd = 0; open("/foo", 0); sys_fspick(fd++, "/foo1", flags); flags |= FSPICK_CLOEXEC; sys_fspick(fd++, "/foo2", flags); flags |= FSPICK_SYMLINK_NOFOLLOW; sys_fspick(fd++, "/foo3", flags); flags |= FSPICK_NO_AUTOMOUNT; sys_fspick(fd++, "/foo4", flags); flags |= FSPICK_EMPTY_PATH; return sys_fspick(fd++, "/foo5", flags); } # perf trace -e fspick ./sys_fspick LLVM: dumping /home/acme/git/perf/tools/perf/examples/bpf/augmented_raw_syscalls.o fspick(0, "/foo1", 0) = -1 ENOENT (No such file or directory) fspick(1, "/foo2", FSPICK_CLOEXEC) = -1 ENOENT (No such file or directory) fspick(2, "/foo3", FSPICK_CLOEXEC|FSPICK_SYMLINK_NOFOLLOW) = -1 ENOENT (No such file or directory) fspick(3, "/foo4", FSPICK_CLOEXEC|FSPICK_SYMLINK_NOFOLLOW|FSPICK_NO_AUTOMOUNT) = -1 ENOENT (No such file or directory) fspick(4, "/foo5", FSPICK_CLOEXEC|FSPICK_SYMLINK_NOFOLLOW|FSPICK_NO_AUTOMOUNT|FSPICK_EMPTY_PATH) = -1 ENOENT (No such file or directory) # Cc: Adrian Hunter Cc: Al Viro Cc: Brendan Gregg Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-erau5xjtt8wvgnhvdbchstuk@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.perf | 8 ++++++++ tools/perf/builtin-trace.c | 4 ++++ tools/perf/examples/bpf/augmented_raw_syscalls.c | 2 ++ tools/perf/trace/beauty/Build | 1 + tools/perf/trace/beauty/beauty.h | 3 +++ tools/perf/trace/beauty/fspick.c | 24 ++++++++++++++++++++++++ 6 files changed, 42 insertions(+) commit a1c729a5f62c090ba3c510142a6685a1989cc24b Author: Arnaldo Carvalho de Melo Date: Mon May 20 16:17:55 2019 -0300 perf beauty: Add generator for fspick's 'flags' arg values $ tools/perf/trace/beauty/fspick.sh static const char *fspick_flags[] = { [ilog2(0x00000001) + 1] = "CLOEXEC", [ilog2(0x00000002) + 1] = "SYMLINK_NOFOLLOW", [ilog2(0x00000004) + 1] = "NO_AUTOMOUNT", [ilog2(0x00000008) + 1] = "EMPTY_PATH", }; $ Cc: Adrian Hunter Cc: Al Viro Cc: Brendan Gregg Cc: David Howells Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-8i16btocq1ax2u6542ya79t5@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/trace/beauty/fspick.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 566e30229e1f4be67c4771afc057152d62016c9c Author: Arnaldo Carvalho de Melo Date: Mon May 20 14:58:03 2019 -0300 perf trace: Beautify 'move_mount' arguments Use existing beautifiers for the first 4 args (to/from fds, pathnames) and wire up the recently introduced move_mount flags table generator. Now it should be possible to just use: perf trace -e move_mount As root and see all move_mount syscalls with its args beautified, except for the filenames, that need work in the augmented_raw_syscalls.c eBPF helper to pass more than one, see comment in the augmented_raw_syscalls.c source code, the other args should work in all cases, i.e. all that is needed can be obtained directly from the raw_syscalls:sys_enter tracepoint args. Running without the strace "skin" (.perfconfig setting output formatting switches to look like strace output + BPF to collect strings, as we still need to support collecting multiple string args for the same syscall, like with move_mount): # cat sys_move_mount.c #define _GNU_SOURCE /* See feature_test_macros(7) */ #include #include /* For SYS_xxx definitions */ #define __NR_move_mount 429 #define MOVE_MOUNT_F_SYMLINKS 0x00000001 /* Follow symlinks on from path */ #define MOVE_MOUNT_F_AUTOMOUNTS 0x00000002 /* Follow automounts on from path */ #define MOVE_MOUNT_F_EMPTY_PATH 0x00000004 /* Empty from path permitted */ #define MOVE_MOUNT_T_SYMLINKS 0x00000010 /* Follow symlinks on to path */ #define MOVE_MOUNT_T_AUTOMOUNTS 0x00000020 /* Follow automounts on to path */ #define MOVE_MOUNT_T_EMPTY_PATH 0x00000040 /* Empty to path permitted */ static inline int sys_move_mount(int from_fd, const char *from_pathname, int to_fd, const char *to_pathname, int flags) { syscall(__NR_move_mount, from_fd, from_pathname, to_fd, to_pathname, flags); } int main(int argc, char *argv[]) { int flags = 0, from_fd = 0, to_fd = 100; sys_move_mount(from_fd++, "/foo", to_fd++, "bar", flags); flags |= MOVE_MOUNT_F_SYMLINKS; sys_move_mount(from_fd++, "/foo1", to_fd++, "bar1", flags); flags |= MOVE_MOUNT_F_AUTOMOUNTS; sys_move_mount(from_fd++, "/foo2", to_fd++, "bar2", flags); flags |= MOVE_MOUNT_F_EMPTY_PATH; sys_move_mount(from_fd++, "/foo3", to_fd++, "bar3", flags); flags |= MOVE_MOUNT_T_SYMLINKS; sys_move_mount(from_fd++, "/foo4", to_fd++, "bar4", flags); flags |= MOVE_MOUNT_T_AUTOMOUNTS; sys_move_mount(from_fd++, "/foo5", to_fd++, "bar5", flags); flags |= MOVE_MOUNT_T_EMPTY_PATH; return sys_move_mount(from_fd++, "/foo6", to_fd++, "bar6", flags); } # mv ~/.perfconfig ~/.perfconfig.OFF # perf trace -e move_mount ./sys_move_mount 0.000 ( 0.009 ms): sys_move_mount/28971 move_mount(from_pathname: 0x402010, to_dfd: 100, to_pathname: 0x402015) = -1 ENOENT (No such file or directory) 0.011 ( 0.003 ms): sys_move_mount/28971 move_mount(from_dfd: 1, from_pathname: 0x40201e, to_dfd: 101, to_pathname: 0x402019, flags: F_SYMLINKS) = -1 ENOENT (No such file or directory) 0.016 ( 0.002 ms): sys_move_mount/28971 move_mount(from_dfd: 2, from_pathname: 0x402029, to_dfd: 102, to_pathname: 0x402024, flags: F_SYMLINKS|F_AUTOMOUNTS) = -1 ENOENT (No such file or directory) 0.020 ( 0.002 ms): sys_move_mount/28971 move_mount(from_dfd: 3, from_pathname: 0x402034, to_dfd: 103, to_pathname: 0x40202f, flags: F_SYMLINKS|F_AUTOMOUNTS|F_EMPTY_PATH) = -1 ENOENT (No such file or directory) 0.023 ( 0.002 ms): sys_move_mount/28971 move_mount(from_dfd: 4, from_pathname: 0x40203f, to_dfd: 104, to_pathname: 0x40203a, flags: F_SYMLINKS|F_AUTOMOUNTS|F_EMPTY_PATH|T_SYMLINKS) = -1 ENOENT (No such file or directory) 0.027 ( 0.002 ms): sys_move_mount/28971 move_mount(from_dfd: 5, from_pathname: 0x40204a, to_dfd: 105, to_pathname: 0x402045, flags: F_SYMLINKS|F_AUTOMOUNTS|F_EMPTY_PATH|T_SYMLINKS|T_AUTOMOUNTS) = -1 ENOENT (No such file or directory) 0.031 ( 0.017 ms): sys_move_mount/28971 move_mount(from_dfd: 6, from_pathname: 0x402055, to_dfd: 106, to_pathname: 0x402050, flags: F_SYMLINKS|F_AUTOMOUNTS|F_EMPTY_PATH|T_SYMLINKS|T_AUTOMOUNTS|T_EMPTY_PATH) = -1 ENOENT (No such file or directory) # Cc: Adrian Hunter Cc: Al Viro Cc: Brendan Gregg Cc: David Howells Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-83rim8g4k0s4gieieh5nnlck@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.perf | 8 ++++++++ tools/perf/builtin-trace.c | 6 ++++++ tools/perf/examples/bpf/augmented_raw_syscalls.c | 11 +++++++++++ tools/perf/trace/beauty/Build | 1 + tools/perf/trace/beauty/beauty.h | 3 +++ tools/perf/trace/beauty/move_mount.c | 24 ++++++++++++++++++++++++ 6 files changed, 53 insertions(+) commit eefa09b499d12883f2fad46f93379101c8da6fec Author: Arnaldo Carvalho de Melo Date: Mon May 20 14:16:49 2019 -0300 perf beauty: Add generator for 'move_mount' flags argument $ tools/perf/trace/beauty/move_mount_flags.sh static const char *move_mount_flags[] = { [ilog2(0x00000001) + 1] = "F_SYMLINKS", [ilog2(0x00000002) + 1] = "F_AUTOMOUNTS", [ilog2(0x00000004) + 1] = "F_EMPTY_PATH", [ilog2(0x00000010) + 1] = "T_SYMLINKS", [ilog2(0x00000020) + 1] = "T_AUTOMOUNTS", [ilog2(0x00000040) + 1] = "T_EMPTY_PATH", }; $ Will be wired up to the 'perf trace' arg in a followup patch. Cc: Adrian Hunter Cc: Al Viro Cc: Brendan Gregg Cc: David Howells Cc: Jiri Olsa Cc: Luis Cláudio Gonçalves Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-px7v33suw1k2ehst52l7bwa3@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/trace/beauty/move_mount_flags.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 8a70c6b162e3112ce87b40b1705da5c4e7566ac8 Author: Arnaldo Carvalho de Melo Date: Thu May 23 13:21:36 2019 -0300 perf augmented_raw_syscalls: Fix up comment Cut'n'paste error, the second comment is about the syscalls that have as its second arg a string. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-zo5s6rloy42u41acsf6q3pvi@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/examples/bpf/augmented_raw_syscalls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fb5a88d4131a9ee8bec3f4bb7c034d7a4e9cf5ea Author: Jiri Olsa Date: Wed May 8 15:20:06 2019 +0200 perf tools: Preserve eBPF maps when loading kcore We need to preserve eBPF maps even if they are covered by kcore, because we need to access eBPF dso for source data. Add the map_groups__merge_in function to do that. It merges a map into map_groups by splitting the new map within the existing map regions. Suggested-by: Adrian Hunter Signed-off-by: Jiri Olsa Acked-by: Song Liu Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stanislav Fomichev Link: http://lkml.kernel.org/r/20190508132010.14512-9-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/symbol.c | 97 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 93 insertions(+), 4 deletions(-) commit 8529f2e67313fb623da7ce81bc14cf12ccc0e12f Author: Jiri Olsa Date: Wed May 8 15:20:04 2019 +0200 perf machine: Keep zero in pgoff BPF map With pgoff set to zero, the map__map_ip function will return BPF addresses based from 0, which is what we need when we read the data from a BPF DSO. Adding BPF symbols with mapped IP addresses as well. Signed-off-by: Jiri Olsa Acked-by: Song Liu Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stanislav Fomichev Link: http://lkml.kernel.org/r/20190508132010.14512-7-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/machine.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a2d8a1585e35444789c1c8cf7e2e51fb15589880 Author: Adrian Hunter Date: Mon May 20 14:37:09 2019 +0300 perf intel-pt: Fix itrace defaults for perf script intel-pt documentation Fix intel-pt documentation to reflect the change of itrace defaults for perf script. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Cc: stable@vger.kernel.org Fixes: 4eb068157121 ("perf script: Make itrace script default to all calls") Link: http://lkml.kernel.org/r/20190520113728.14389-4-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/intel-pt.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 355200e0f6a9ce14771625014aa469f5ecbd8977 Author: Adrian Hunter Date: Mon May 20 14:37:08 2019 +0300 perf auxtrace: Fix itrace defaults for perf script Commit 4eb068157121 ("perf script: Make itrace script default to all calls") does not work for the case when '--itrace' only is used, because default_no_sample is not being passed. Example: Before: $ perf record -e intel_pt/cyc/u ls $ perf script --itrace > cmp1.txt $ perf script --itrace=cepwx > cmp2.txt $ diff -sq cmp1.txt cmp2.txt Files cmp1.txt and cmp2.txt differ After: $ perf script --itrace > cmp1.txt $ perf script --itrace=cepwx > cmp2.txt $ diff -sq cmp1.txt cmp2.txt Files cmp1.txt and cmp2.txt are identical Signed-off-by: Adrian Hunter Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: stable@vger.kernel.org Fixes: 4eb068157121 ("perf script: Make itrace script default to all calls") Link: http://lkml.kernel.org/r/20190520113728.14389-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/auxtrace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 26f19c2eb7e54015564ff133b91983a74e84541b Author: Adrian Hunter Date: Mon May 20 14:37:07 2019 +0300 perf intel-pt: Fix itrace defaults for perf script Commit 4eb068157121 ("perf script: Make itrace script default to all calls") does not work because 'use_browser' is being used to determine whether to default to periodic sampling (i.e. better for perf report). The result is that nothing but CBR events display for perf script when no --itrace option is specified. Fix by using 'default_no_sample' and 'inject' instead. Example: Before: $ perf record -e intel_pt/cyc/u ls $ perf script > cmp1.txt $ perf script --itrace=cepwx > cmp2.txt $ diff -sq cmp1.txt cmp2.txt Files cmp1.txt and cmp2.txt differ After: $ perf script > cmp1.txt $ perf script --itrace=cepwx > cmp2.txt $ diff -sq cmp1.txt cmp2.txt Files cmp1.txt and cmp2.txt are identical Signed-off-by: Adrian Hunter Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: stable@vger.kernel.org # v4.20+ Fixes: 90e457f7be08 ("perf tools: Add Intel PT support") Link: http://lkml.kernel.org/r/20190520113728.14389-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a685c7a4a25c80f1f022b55830f2d894ee8847eb Author: Adrian Hunter Date: Fri Apr 12 14:38:28 2019 +0300 perf-with-kcore.sh: Always allow fix_buildid_cache_permissions The user's buildid cache may contain entries added by root even if root has its own home directory (e.g. by using perfconfig to specify the same buildid dir), so remove that validation. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20190412113830.4126-7-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/perf-with-kcore.sh | 5 ----- 1 file changed, 5 deletions(-) commit 43b98d876f89dce732f50b71607b6d2bbb8d8e6a Author: Geert Uytterhoeven Date: Mon May 27 13:57:42 2019 +0200 genirq/irqdomain: Remove WARN_ON() on out-of-memory condition There is no need to print a backtrace when memory allocation fails, as the memory allocation core already takes care of that. Signed-off-by: Geert Uytterhoeven Signed-off-by: Thomas Gleixner Cc: Marc Zyngier Link: https://lkml.kernel.org/r/20190527115742.2693-1-geert+renesas@glider.be kernel/irq/irqdomain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ead14a70754f8d7f5dbcb0553c7f11eb0fc4a6ac Author: Maciej S. Szmigiero Date: Mon Apr 29 12:16:59 2019 -0400 media: cxusb: add raw mode support for Medion MD95700 This adds raw (unprocessed) BT.656 stream capturing support for the analog part of Medion 95700. It can be enabled by setting CXUSB_EXTENDEDMODE_CAPTURE_RAW flag in parm.capture.extendedmode passed to VIDIOC_S_PARM. Signed-off-by: Maciej S. Szmigiero Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/cxusb-analog.c | 190 +++++++++++++++++++++++++------ drivers/media/usb/dvb-usb/cxusb.h | 4 + drivers/media/v4l2-core/v4l2-ioctl.c | 3 +- 3 files changed, 163 insertions(+), 34 deletions(-) commit e478d40540544e229c843fe0c698ebc7d0ca07e6 Author: Maciej S. Szmigiero Date: Mon Apr 29 12:16:58 2019 -0400 media: cxusb: add analog mode support for Medion MD95700 This patch adds support for analog part of Medion 95700 in the cxusb driver. What works: * Video capture at various sizes with sequential fields, * Input switching (TV Tuner, Composite, S-Video), * TV and radio tuning, * Video standard switching and auto detection, * Radio mode switching (stereo / mono), * Unplugging while capturing, * DVB / analog coexistence. What does not work yet: * Audio, * VBI, * Picture controls. Signed-off-by: Maciej S. Szmigiero Signed-off-by: Hans Verkuil [hverkuil-cisco@xs4all.nl: remove left-over commented-out debug message] Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/Kconfig | 16 +- drivers/media/usb/dvb-usb/Makefile | 3 + drivers/media/usb/dvb-usb/cxusb-analog.c | 1845 ++++++++++++++++++++++++++++++ drivers/media/usb/dvb-usb/cxusb.c | 2 - drivers/media/usb/dvb-usb/cxusb.h | 106 ++ 5 files changed, 1968 insertions(+), 4 deletions(-) commit d525e5c2f1b7f3bf198aeb56b039a682de4b00df Author: Maciej S. Szmigiero Date: Mon Apr 29 12:16:57 2019 -0400 media: cxusb: implement Medion MD95700 digital / analog coexistence This patch prepares cxusb driver for supporting the analog part of Medion 95700 (previously only the digital - DVB - mode was supported). Specifically, it adds support for: * switching the device between analog and digital modes of operation, * enforcing that only one mode is active at the same time due to hardware limitations. Actual implementation of the analog mode will be provided by the next commit. Signed-off-by: Maciej S. Szmigiero Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/cxusb.c | 449 +++++++++++++++++++++++++++---- drivers/media/usb/dvb-usb/cxusb.h | 48 ++++ drivers/media/usb/dvb-usb/dvb-usb-dvb.c | 5 +- drivers/media/usb/dvb-usb/dvb-usb-init.c | 13 + drivers/media/usb/dvb-usb/dvb-usb.h | 10 + 5 files changed, 472 insertions(+), 53 deletions(-) commit f560201102035ba9def2fc21827dd34690dd126e Author: Jiri Kosina Date: Tue May 28 21:31:49 2019 +0200 cpu/hotplug: Fix notify_cpu_starting() reference in bringup_wait_for_ap() bringup_wait_for_ap() comment references cpu_notify_starting(), but the function is actually called notify_cpu_starting(). Fix that. Signed-off-by: Jiri Kosina Signed-off-by: Thomas Gleixner Cc: Josh Poimboeuf Cc: Peter Zijlstra Link: https://lkml.kernel.org/r/nycvar.YFH.7.76.1905282128100.1962@cbobk.fhfr.pm kernel/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 65efeca0a6411139fc1956805f6334f3decc3c1b Author: Maciej S. Szmigiero Date: Mon Apr 29 12:16:56 2019 -0400 media: cx25840: set_fmt operation should clamp out-of-range picture sizes According to V4L2 API set_fmt subdev operation should not return an error on out-of-range picture sizes, the values should be clamped instead to the supported range. The cx25840 datasheet says that the chip is capable of scaling down the picture width and height, respectively, 16 and 8 times. These values agree with what the old implementation enforced. Signed-off-by: Maciej S. Szmigiero Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/cx25840/cx25840-core.c | 59 ++++++++++++++++++++++---------- 1 file changed, 40 insertions(+), 19 deletions(-) commit e81a9076b4d60351bd574bc1c353793301427635 Author: Maciej S. Szmigiero Date: Mon Apr 29 12:16:55 2019 -0400 media: cx25840: add pin to pad mapping and output format configuration This commit adds pin to pad mapping and output format configuration support in CX2584x-series chips to cx25840 driver. This functionality is then used to allow disabling ivtv-specific hacks and configuration values (called a "generic mode"), so cx25840 driver can be used for other devices not needing them without risking compatibility problems. Signed-off-by: Maciej S. Szmigiero Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/cx25840/cx25840-core.c | 414 ++++++++++++++++++++++++++++++- drivers/media/i2c/cx25840/cx25840-core.h | 15 ++ drivers/media/i2c/cx25840/cx25840-vbi.c | 4 + include/media/drv-intf/cx25840.h | 77 +++++- 4 files changed, 500 insertions(+), 10 deletions(-) commit 394e9a14c63d58e0f45323629a3f9ce1e5bf0215 Author: Emily Deng Date: Tue May 28 10:17:04 2019 +0800 drm/amdgpu: Need to set the baco cap before baco reset For passthrough, after rebooted the VM, driver will do a baco reset before doing other driver initialization during loading driver. For doing the baco reset, it will first check the baco reset capability. So first need to set the cap from the vbios information or baco reset won't be enabled. Signed-off-by: Emily Deng Reviewed-by: Evan Quan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 24 ++++++++++------------ drivers/gpu/drm/amd/amdgpu/soc15.c | 3 ++- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 4 ++++ .../amd/powerplay/hwmgr/vega10_processpptables.c | 24 ++++++++++++++++++++++ .../amd/powerplay/hwmgr/vega10_processpptables.h | 1 + 5 files changed, 42 insertions(+), 14 deletions(-) commit d55f33da541324c7f41156dd6d045b8b450de230 Author: Alex Deucher Date: Fri May 17 09:21:13 2019 -0500 drm/amdgpu/soc15: skip reset on init Not necessary on soc15 and breaks driver reload on server cards. Acked-by: Amber Lin Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc15.c | 5 +++++ 1 file changed, 5 insertions(+) commit 8d8a5a64a8904ea32bbf7292b89c11156d64f9a1 Author: Chunming Zhou Date: Tue May 28 10:46:04 2019 +0800 drm/amdgpu: add DRIVER_SYNCOBJ_TIMELINE to amdgpu Reviewed-by: Christian König Signed-off-by: Chunming Zhou Reviewed-by: Flora Cui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 023509737140b9518c36fb77887e2e22be22a150 Author: Oak Zeng Date: Fri May 10 09:44:17 2019 -0500 drm/amdkfd: PM4 packets change to support GWS Add a field in map_queues packet to indicate whether this is a gws control queue. Only one queue per process can be gws control queue. Change num_gws field in map_process packet to 7 bits Signed-off-by: Oak Zeng Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue_v9.c | 1 + drivers/gpu/drm/amd/amdkfd/kfd_pm4_headers_ai.h | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) commit 1a058c3376765ee31d65e28cbbb9d4ff15120056 Author: Oak Zeng Date: Mon May 6 22:11:14 2019 -0500 drm/amdkfd: New IOCTL to allocate queue GWS Add a new kfd ioctl to allocate queue GWS. Queue GWS is released on queue destroy. Signed-off-by: Oak Zeng Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 27 +++++++++++++++++++++++++++ include/uapi/linux/kfd_ioctl.h | 20 +++++++++++++++++++- 2 files changed, 46 insertions(+), 1 deletion(-) commit eb82da1dc4429c026a165f419f8c76d7bbdcf26f Author: Oak Zeng Date: Mon May 6 21:31:52 2019 -0500 drm/amdkfd: Add function to set queue gws Add functions in process queue manager to set/unset queue gws. Also set process's number of gws used. Currently only one queue in process can use and use all gws. Signed-off-by: Oak Zeng Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 6 +++ .../gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 57 ++++++++++++++++++++++ 2 files changed, 63 insertions(+) commit 71efab6a30ab392af6a3fe1ce06bcf25c82ff3cb Author: Oak Zeng Date: Wed May 8 16:14:45 2019 -0500 drm/amdgpu: Add function to add/remove gws to kfd process GWS bo is shared between all kfd processes. Add function to add gws to kfd process's bo list so gws can be evicted from and restored for process. Signed-off-by: Oak Zeng Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 2 + drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 103 +++++++++++++++++++++-- 2 files changed, 100 insertions(+), 5 deletions(-) commit e09d4fc8db949715848b2d4567ad47e6b8cf0a1b Author: Oak Zeng Date: Mon May 6 13:52:12 2019 -0500 drm/amdkfd: Allocate gws on device initialization On device initialization, KFD allocates all (64) gws which is shared by all KFD processes. Signed-off-by: Oak Zeng Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_device.c | 14 +++++++++++++- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 3 +++ 2 files changed, 16 insertions(+), 1 deletion(-) commit ca66fb8fbb9b9690591b4e85707a4f31cb042adf Author: Oak Zeng Date: Mon May 6 09:48:37 2019 -0500 drm/amdgpu: Add interface to alloc gws from amdgpu Add amdgpu_amdkfd interface to alloc and free gws from amdgpu Signed-off-by: Oak Zeng Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 34 ++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 2 ++ 2 files changed, 36 insertions(+) commit 29e764621bbcd4a93745cf1b9fd5a2f5f45c3f72 Author: Oak Zeng Date: Fri May 3 09:10:38 2019 -0500 drm/amdkfd: Add gws number to kfd topology node properties Add amdgpu_amdkfd interface to get num_gws and add num_gws to /sys/class/kfd/kfd/topology/nodes/x/properties. Only report num_gws if MEC FW support GWS barriers. Currently it is determined by a module parameter which will be replaced with MEC FW version check when firmware is ready. Signed-off-by: Oak Zeng Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 7 +++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 10 ++++++++++ drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 5 +++++ drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 5 +++++ drivers/gpu/drm/amd/amdkfd/kfd_topology.h | 1 + 6 files changed, 29 insertions(+) commit d33ea570bd20f7ac7abea4f56f1df299e179356b Author: Oak Zeng Date: Thu May 23 17:12:41 2019 -0500 drm/amdkfd: Use kfd fd to mmap mmio TTM doesn't support CPU mapping of sg type bo (under which mmio bo is created). Switch mmaping of mmio page to kfd device file. Signed-off-by: Oak Zeng Acked-by: Christian Konig Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 45 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 1 + 2 files changed, 46 insertions(+) commit c8bdf2b63e5b6b31b3b4826b8e87c0c2f6b650ff Author: Emily Deng Date: Mon May 27 11:12:51 2019 +0800 drm/amdgpu: fix unload driver fail dc_destroy should be called amdgpu_cgs_destroy_device, as it will use cgs context to read or write registers. Signed-off-by: Emily Deng Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 763549a3cf121d59d5e9ad078ae71d94be9be748 Author: Maciej S. Szmigiero Date: Mon Apr 29 12:16:54 2019 -0400 media: cx25840: implement g_std operation This commit implements g_std operation in cx25840 driver by returning the last set video standard. Signed-off-by: Maciej S. Szmigiero Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/cx25840/cx25840-core.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 60acc4ab1127a1bb3e4e33ca13b3ed82489c7ea4 Author: Maciej S. Szmigiero Date: Mon Apr 29 12:16:53 2019 -0400 media: cx25840: g_std operation really implements querystd operation cx25840 driver g_std operation queries the currently detected video signal, however this is what querystd operation should do, so let's rename the handler. None of the existing cx25840 driver users ever called the g_std operation, one of them calls querystd on each of its subdevs but then the result is only used to implement VIDIOC_QUERYSTD (as it should). Signed-off-by: Maciej S. Szmigiero Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/cx25840/cx25840-core.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit ccf7a31f1ed96ee211f660c488d49a85f586417c Author: Maciej S. Szmigiero Date: Mon Apr 29 12:16:52 2019 -0400 media: cx25840: don't open-code cx25840_reset() inside cx25840_load_fw() cx25840_load_fw() does the same thing as cx25840_reset(), only keeps "is_initialized" flag so any further invocation of this function besides the first one is a NOP. Let's just call cx25840_reset() directly from cx25840_load_fw() instead of open coding it there. While we are at it, let's also improve comments about cx25840_load_fw() so they are current and in the proper style (one of them even referred to a non-existing cx25840 init operation). Signed-off-by: Maciej S. Szmigiero Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/cx25840/cx25840-core.c | 70 ++++++++++++++++---------------- include/media/drv-intf/cx25840.h | 28 ++++++++----- 2 files changed, 51 insertions(+), 47 deletions(-) commit c7ae09253cb8a11342d7d363591f6edf2a26552b Author: Madalin Bucur Date: Mon May 27 15:32:12 2019 +0300 fsl/fman: include IPSEC SPI in the Keygen extraction The keygen extracted fields are used as input for the hash that determines the incoming frames distribution. Adding IPSEC SPI so different IPSEC flows can be distributed to different CPUs. Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fman/fman_keygen.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1ac159e23c2c033f1fcbf7d60286b90335a4e9b2 Author: Stuart Summers Date: Fri May 24 08:40:22 2019 -0700 drm/i915: Expand subslice mask Currently, the subslice_mask runtime parameter is stored as an array of subslices per slice. Expand the subslice mask array to better match what is presented to userspace through the I915_QUERY_TOPOLOGY_INFO ioctl. The index into this array is then calculated: slice * subslice stride + subslice index / 8 v2: fix spacing in set_sseu_info args use set_sseu_info to initialize sseu data when building device status in debugfs rename variables in intel_engine_types.h to avoid checkpatch warnings v3: update headers in intel_sseu.h v4: add const to some sseu_dev_info variables use sseu->eu_stride for EU stride calculations v5: address review comments from Tvrtko and Daniele v6: remove extra space in intel_sseu_get_subslices return the correct subslice enable in for_each_instdone add GEM_BUG_ON to ensure user doesn't pass invalid ss_mask size use printk formatted string for subslice mask v7: remove string.h header and rebase Cc: Daniele Ceraolo Spurio Cc: Lionel Landwerlin Acked-by: Lionel Landwerlin Reviewed-by: Daniele Ceraolo Spurio Signed-off-by: Stuart Summers Signed-off-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20190524154022.13575-6-stuart.summers@intel.com drivers/gpu/drm/i915/gt/intel_engine_cs.c | 24 +++++- drivers/gpu/drm/i915/gt/intel_engine_types.h | 30 +++---- drivers/gpu/drm/i915/gt/intel_hangcheck.c | 3 +- drivers/gpu/drm/i915/gt/intel_sseu.c | 47 ++++++++++- drivers/gpu/drm/i915/gt/intel_sseu.h | 27 +++++- drivers/gpu/drm/i915/gt/intel_workarounds.c | 2 +- drivers/gpu/drm/i915/i915_debugfs.c | 40 ++++----- drivers/gpu/drm/i915/i915_drv.c | 6 +- drivers/gpu/drm/i915/i915_gpu_error.c | 5 +- drivers/gpu/drm/i915/i915_query.c | 10 +-- drivers/gpu/drm/i915/intel_device_info.c | 122 ++++++++++++--------------- 11 files changed, 200 insertions(+), 116 deletions(-) commit 0040fd19e7285f096523c14daef131a81468a6ea Author: Stuart Summers Date: Fri May 24 08:40:21 2019 -0700 drm/i915: Refactor sseu helper functions Move functions to intel_sseu.h and remove inline qualifier. Additionally, ensure these are all prefixed with intel_sseu_* to match the convention of other functions in i915. v2: fix spacing from checkpatch warning v3: squash helper function changes into a single patch break 80 character line to fix checkpatch warning move get/set_eus helpers to intel_device_info.c v4: Remove intel_ prefix from static functions in intel_device_info.c and correctly copy changes to stride calculation in those functions. Acked-by: Jani Nikula Cc: Daniele Ceraolo Spurio Reviewed-by: Daniele Ceraolo Spurio Signed-off-by: Stuart Summers Signed-off-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20190524154022.13575-5-stuart.summers@intel.com drivers/gpu/drm/i915/gt/intel_sseu.c | 17 +++++++++ drivers/gpu/drm/i915/gt/intel_sseu.h | 10 +++--- drivers/gpu/drm/i915/i915_debugfs.c | 4 +-- drivers/gpu/drm/i915/i915_drv.c | 2 +- drivers/gpu/drm/i915/intel_device_info.c | 60 ++++++++++++++++++++++++++------ drivers/gpu/drm/i915/intel_device_info.h | 44 ----------------------- 6 files changed, 74 insertions(+), 63 deletions(-) commit 39cb46751e2fbb72e0698f80e339db1fd4e1f50e Author: Fabio Estevam Date: Sat May 4 10:40:27 2019 -0400 media: imx7-media-csi: Change imx7_csi_enable() to void imx7_csi_enable() always return 0 and its return value is never checked, so convert it to void. Signed-off-by: Fabio Estevam Tested-by: Rui Miguel Silva Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit b5ab1abe8df2cf38c94ffee46f0c8a377e01edb2 Author: Stuart Summers Date: Fri May 24 08:40:20 2019 -0700 drm/i915: Move calculation of subslices per slice to new function Add a new function to return the number of subslices per slice to consolidate code usage. v2: rebase on changes to move sseu struct to intel_sseu.h v3: add intel_* prefix to sseu_subslices_per_slice Cc: Daniele Ceraolo Spurio Reviewed-by: Daniele Ceraolo Spurio Signed-off-by: Stuart Summers Signed-off-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20190524154022.13575-4-stuart.summers@intel.com drivers/gpu/drm/i915/gt/intel_sseu.h | 6 ++++++ drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/intel_device_info.c | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) commit ddfb2982ecc4766932fb62868861d5913c5447e3 Author: Fabio Estevam Date: Sat May 4 10:40:26 2019 -0400 media: imx7-media-csi: Check the return value from clk_prepare_enable() clk_prepare_enable() may fail, so we should better check its return value and propagate it in the case of error. Signed-off-by: Fabio Estevam Tested-by: Rui Miguel Silva Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 964fcacddff4f0fd141a4c9d6fbd996e21cee6eb Author: Fabio Estevam Date: Sat May 4 10:40:24 2019 -0400 media: imx7-media-csi: Remove unneeded break Remove unneeded 'break' right after the 'return' statement as pointed out by checkpatch. Signed-off-by: Fabio Estevam Tested-by: Rui Miguel Silva Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 1 - 1 file changed, 1 deletion(-) commit 7af5b077514269268bc76d3c3384c9ead679eaca Author: Maxime Chevallier Date: Mon May 27 13:52:01 2019 +0200 net: mvpp2: cls: Check RSS table index validity when creating a context Make sure we don't use an out-of-bound index for the per-port RSS context array. As of today, the global context creation in mvpp22_rss_context_create will prevent us from reaching this case, but we should still make sure we are using a sane value anyway. Reported-by: kbuild test robot Reported-by: Dan Carpenter Signed-off-by: Maxime Chevallier Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c | 3 +++ 1 file changed, 3 insertions(+) commit 59e45933b13f12a76a48b7ab591b5b0abfc4e4df Author: Fabio Estevam Date: Sat May 4 10:40:23 2019 -0400 media: imx7-media-csi: Propagate the correct error for devm_request_irq() In the case of devm_request_irq() failure, let's propagate the real error code instead of a fake one. Signed-off-by: Fabio Estevam Tested-by: Rui Miguel Silva Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 1 - 1 file changed, 1 deletion(-) commit 135a63b68250b8ab2ed854f0c907d5ff2a56f09e Author: Stuart Summers Date: Fri May 24 08:40:19 2019 -0700 drm/i915: Add macro for SSEU stride calculation Subslice stride and EU stride are calculated multiple times in i915_query. Move this calculation to a macro to reduce code duplication. v2: update headers in intel_sseu.h v3: use GEN_SSEU_STRIDE for stride calculations in intel_sseu.h apply s/bits/max_entries/ to GEN_SSEU_STRIDE parameter Cc: Daniele Ceraolo Spurio Reviewed-by: Daniele Ceraolo Spurio Signed-off-by: Stuart Summers Signed-off-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20190524154022.13575-3-stuart.summers@intel.com drivers/gpu/drm/i915/gt/intel_sseu.h | 2 ++ drivers/gpu/drm/i915/i915_query.c | 17 ++++++++--------- drivers/gpu/drm/i915/intel_device_info.h | 9 +++------ 3 files changed, 13 insertions(+), 15 deletions(-) commit b761151f40d5ecd4fcbaf9ebd9c16fe3a1a2e96c Author: Fabio Estevam Date: Sat May 4 10:40:22 2019 -0400 media: imx7-media-csi: Propagate the correct error for platform_get_irq() In the case of platform_get_irq() failure, let's propagate the real error code instead of a fake one. Signed-off-by: Fabio Estevam Tested-by: Rui Miguel Silva Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 55be6fd2742ab54a13460c929ac2c40a04ce7d7d Author: Fabio Estevam Date: Sat May 4 10:40:21 2019 -0400 media: imx7-media-csi: Use devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify the code a bit. While at it, propagate the real error value in case of devm_platform_ioremap_resource() failure. Signed-off-by: Fabio Estevam Tested-by: Rui Miguel Silva Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 434d40df057c57af57c1d1312a11c0bda1b6923a Author: Fabio Estevam Date: Sat May 4 10:40:20 2019 -0400 media: imx7-media-csi: Acquire a single clock As per the i.MX7D Reference Manual only the MCLK is used for the CSI block, so only handle this single clock. Signed-off-by: Fabio Estevam Tested-by: Rui Miguel Silva Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-media-csi.c | 51 +++++------------------------- 1 file changed, 8 insertions(+), 43 deletions(-) commit bd41ca49a2735eb2f016a3fa4fe9716b56b55d71 Author: Stuart Summers Date: Fri May 24 08:40:18 2019 -0700 drm/i915: Use local variable for SSEU info in GETPARAM ioctl In the GETPARAM ioctl handler, use a local variable to consolidate usage of SSEU runtime info. v2: add const to sseu_dev_info variable Cc: Daniele Ceraolo Spurio Reviewed-by: Daniele Ceraolo Spurio Signed-off-by: Stuart Summers Signed-off-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20190524154022.13575-2-stuart.summers@intel.com drivers/gpu/drm/i915/i915_drv.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 87562287444d085ca644c9f724c05bc5ec8d45e5 Author: Steve Longerbeam Date: Fri May 10 17:50:12 2019 -0400 media: staging/imx: Don't set driver data for v4l2_dev The media device is already available via multiple methods, there is no need to set driver data for v4l2_dev to the media device. In imx_media_link_notify(), get media device from link->graph_obj.mdev. In imx_media_capture_device_register(), get media device from v4l2_dev->mdev. Signed-off-by: Steve Longerbeam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx-media-capture.c | 5 +++-- drivers/staging/media/imx/imx-media-dev-common.c | 7 ++----- 2 files changed, 5 insertions(+), 7 deletions(-) commit 3ef46bc97ca2c918b7657a08220c7340a9bb07a2 Author: Steve Longerbeam Date: Fri May 10 17:50:11 2019 -0400 media: staging/imx: Improve pipeline searching Export find_pipeline_pad(), renaming to imx_media_pipeline_pad(), and extend its functionality to allow searching for video devices in the enabled pipeline in addition to sub-devices. As part of this: - Rename imx_media_find_mipi_csi2_channel() to imx_media_pipeline_csi2_channel(). - Remove imx_media_find_upstream_pad(), it is redundant now. - Rename imx_media_find_upstream_subdev() to imx_media_pipeline_subdev() with an additional boolean argument for searching upstream or downstream. - Add imx_media_pipeline_video_device() which is analogous to imx_media_pipeline_subdev() but searches for video devices. - Remove imxmd pointer arg from all of the functions above, it was never used in those functions. With that change the i.MX5/6 CSI, VDIC, and IC sub-devices no longer require the media_device. Signed-off-by: Steve Longerbeam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx-ic-common.c | 4 +- drivers/staging/media/imx/imx-ic-prp.c | 4 +- drivers/staging/media/imx/imx-ic.h | 1 - drivers/staging/media/imx/imx-media-csi.c | 13 +-- drivers/staging/media/imx/imx-media-fim.c | 4 - drivers/staging/media/imx/imx-media-internal-sd.c | 5 +- drivers/staging/media/imx/imx-media-utils.c | 128 ++++++++++++---------- drivers/staging/media/imx/imx-media-vdic.c | 5 +- drivers/staging/media/imx/imx-media.h | 20 ++-- drivers/staging/media/imx/imx7-media-csi.c | 2 +- 10 files changed, 93 insertions(+), 93 deletions(-) commit 6b8952db064480544a03d76601006f3eb9e89383 Author: Steve Longerbeam Date: Fri May 10 17:50:10 2019 -0400 media: staging/imx: Re-organize modules Re-organize modules, and which objects are linked into those modules, so that: - imx6-media (renamed from imx-media) is the media driver module for imx5/6 only, and has no symbol exports. - imx6-media-csi (renamed from imx-media-csi) is the subdev driver module for imx5/6 CSI. It is now linked direcly with imx-media-fim, since only the imx5/6 CSI makes use of the frame interval monitor. - imx-media-common now only contains common code between imx5/6 and imx7 media drivers. It contains imx-media-utils, imx-media-of, imx-media-dev-common, and imx-media-capture. In order to acheive that, some functions common to imx5/6 and imx7 have been moved out of imx-media-dev.c and into imx-media-dev-common.c. Signed-off-by: Steve Longerbeam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/Makefile | 14 +- drivers/staging/media/imx/imx-media-dev-common.c | 345 ++++++++++++++++++++++- drivers/staging/media/imx/imx-media-dev.c | 340 +--------------------- drivers/staging/media/imx/imx-media-fim.c | 5 - drivers/staging/media/imx/imx-media-of.c | 3 + drivers/staging/media/imx/imx-media.h | 16 +- drivers/staging/media/imx/imx7-media-csi.c | 4 +- 7 files changed, 369 insertions(+), 358 deletions(-) commit 523759c7bfd5207dbf800f1daa1bd10453dd0c4c Author: Steve Longerbeam Date: Fri May 10 17:50:09 2019 -0400 media: staging/imx: Remove capture_device_set_format Don't propagate the source pad format to the connected capture device. It's now the responsibility of userspace to call VIDIOC_S_FMT on the capture device to ensure the capture format and compose rectangle are compatible with the connected source. To check this, validate the capture format with the source before streaming starts. Signed-off-by: Steve Longerbeam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx-ic-prpencvf.c | 16 +----- drivers/staging/media/imx/imx-media-capture.c | 71 ++++++++++++++++++--------- drivers/staging/media/imx/imx-media-csi.c | 16 +----- drivers/staging/media/imx/imx-media.h | 2 - drivers/staging/media/imx/imx7-media-csi.c | 17 +------ 5 files changed, 55 insertions(+), 67 deletions(-) commit 5ca584d935c32906d114924dc0e1dbfcbb13fdb2 Author: Waiman Long Date: Tue May 28 12:03:45 2019 -0400 futex: Consolidate duplicated timer setup code Add a new futex_setup_timer() helper function to consolidate all the hrtimer_sleeper setup code. Signed-off-by: Waiman Long Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: Darren Hart Cc: Davidlohr Bueso Link: https://lkml.kernel.org/r/20190528160345.24017-1-longman@redhat.com kernel/futex.c | 69 +++++++++++++++++++++++++++++++++------------------------- 1 file changed, 39 insertions(+), 30 deletions(-) commit 225dc4909f38985d4d0bd63e3b4e4df4e8cf7834 Author: Steve Longerbeam Date: Fri May 10 17:50:08 2019 -0400 media: Revert "media: imx: Set capture compose rectangle in capture_device_set_format" Revert this commit, as imx_media_capture_device_set_format() will be removed. The arguments to mx_media_mbus_fmt_to_pix_fmt() and imx_media_capture_device_set_format() in imx7_csi_set_fmt() are also reverted. This reverts commit 5964cbd8692252615370b77eb96764dd70c2f837. Signed-off-by: Steve Longerbeam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx-ic-prpencvf.c | 5 ++--- drivers/staging/media/imx/imx-media-capture.c | 24 ++++++++++++------------ drivers/staging/media/imx/imx-media-csi.c | 5 ++--- drivers/staging/media/imx/imx-media-utils.c | 20 +++++--------------- drivers/staging/media/imx/imx-media.h | 6 ++---- drivers/staging/media/imx/imx7-media-csi.c | 5 ++--- 6 files changed, 25 insertions(+), 40 deletions(-) commit 3e80d125b5075ed66a208cdcb1581e8d414ffd63 Author: Steve Longerbeam Date: Fri May 10 17:50:07 2019 -0400 media: staging/imx: Move add_video_device into capture_device_register Move imx_media_add_video_device() into imx_media_capture_device_register(). Also the former has no error conditions to convert to void. Signed-off-by: Steve Longerbeam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx-ic-prpencvf.c | 5 ----- drivers/staging/media/imx/imx-media-capture.c | 3 +++ drivers/staging/media/imx/imx-media-csi.c | 7 +------ drivers/staging/media/imx/imx-media-utils.c | 9 ++++----- drivers/staging/media/imx/imx-media.h | 4 ++-- drivers/staging/media/imx/imx7-media-csi.c | 12 +----------- 6 files changed, 11 insertions(+), 29 deletions(-) commit 34ff38745b166f317530c05ac881aafc20c33041 Author: Steve Longerbeam Date: Fri May 10 17:50:06 2019 -0400 media: staging/imx: Pass device to alloc/free_dma_buf Allocate and free a DMA coherent buffer in imx_media_alloc/free_dma_buf() from the given device. This allows DMA alloc and free using a device that is backed by real hardware, which for the imx5/6/7 CSI is the CSI unit, and for the internal IPU sub-devices, is the parent IPU. Signed-off-by: Steve Longerbeam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx-ic-prpencvf.c | 18 +++++++++--------- drivers/staging/media/imx/imx-media-csi.c | 6 +++--- drivers/staging/media/imx/imx-media-utils.c | 13 ++++++------- drivers/staging/media/imx/imx-media.h | 4 ++-- drivers/staging/media/imx/imx7-media-csi.c | 4 ++-- 5 files changed, 22 insertions(+), 23 deletions(-) commit 6d01b7ff523375e22db5d2c37a18bdf332376b2f Author: Steve Longerbeam Date: Fri May 10 17:50:05 2019 -0400 media: staging/imx: Switch to sync registration for IPU subdevs Because the IPU sub-devices VDIC and IC are not present in the device-tree, platform devices were created for them instead. This allowed these sub-devices to be added to the media device's async notifier and registered asynchronously along with the other sub-devices that do have a device-tree presence (CSI and devices external to the IPU and SoC). But that approach isn't really necessary. The IPU sub-devices don't actually require a backing device (sd->dev is allowed to be NULL). And that approach can't get around the fact that the IPU sub-devices are not part of a device hierarchy, which makes it awkward to retrieve the parent IPU of these devices. By registering them synchronously, they can be registered from the CSI async bound notifier, so the init function for them can be given the CSI subdev, who's dev->parent is the IPU. That is a somewhat cleaner way to retrieve the parent IPU. So convert to synchronous registration for the VDIC and IC task sub-devices, at the time a CSI sub-device is bound. There is no longer a backing device for them (sd->dev is NULL), but that's ok. Also set the VDIC/IC sub-device owner as the IPU, so that a reference can be taken on the IPU module. Since the VDIC and IC task drivers are no longer platform drivers, they are now statically linked to imx-media module. Signed-off-by: Steve Longerbeam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/Makefile | 6 +- drivers/staging/media/imx/imx-ic-common.c | 70 ++--- drivers/staging/media/imx/imx-ic-prp.c | 34 +-- drivers/staging/media/imx/imx-ic-prpencvf.c | 70 +++-- drivers/staging/media/imx/imx-ic.h | 7 +- drivers/staging/media/imx/imx-media-capture.c | 7 +- drivers/staging/media/imx/imx-media-csi.c | 2 +- drivers/staging/media/imx/imx-media-dev.c | 121 +------- drivers/staging/media/imx/imx-media-internal-sd.c | 356 ++++++++++------------ drivers/staging/media/imx/imx-media-of.c | 38 +-- drivers/staging/media/imx/imx-media-vdic.c | 85 ++---- drivers/staging/media/imx/imx-media.h | 67 ++-- drivers/staging/media/imx/imx7-media-csi.c | 3 +- 13 files changed, 327 insertions(+), 539 deletions(-) commit 411c59881c776cfc6a5d4c72fa7675dfd5674818 Author: Steve Longerbeam Date: Fri May 10 17:50:04 2019 -0400 media: Revert "media: staging/imx: add media device to capture register" The imx6-specific subdevs that register a capture device will no longer hold a reference to the media device, so this commit must be reverted. This reverts commit 16204b8a1c1af77725533b77936e6c73953486ae. Signed-off-by: Steve Longerbeam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx-ic-prpencvf.c | 2 +- drivers/staging/media/imx/imx-media-capture.c | 6 +++--- drivers/staging/media/imx/imx-media-csi.c | 2 +- drivers/staging/media/imx/imx-media.h | 3 +-- drivers/staging/media/imx/imx7-media-csi.c | 2 +- 5 files changed, 7 insertions(+), 8 deletions(-) commit 5858bdad4d0d0fc18bf29f34c3ac836e0b59441f Author: Hongjie Fang Date: Wed May 22 10:02:53 2019 +0800 fscrypt: don't set policy for a dead directory The directory may have been removed when entering fscrypt_ioctl_set_policy(). If so, the empty_dir() check will return error for ext4 file system. ext4_rmdir() sets i_size = 0, then ext4_empty_dir() reports an error because 'inode->i_size < EXT4_DIR_REC_LEN(1) + EXT4_DIR_REC_LEN(2)'. If the fs is mounted with errors=panic, it will trigger a panic issue. Add the check IS_DEADDIR() to fix this problem. Fixes: 9bd8212f981e ("ext4 crypto: add encryption policy and password salt support") Cc: # v4.1+ Signed-off-by: Hongjie Fang Signed-off-by: Eric Biggers fs/crypto/policy.c | 2 ++ 1 file changed, 2 insertions(+) commit be8a4b2d319994af690e0f636a3a7be9dd43184d Author: Ville Syrjälä Date: Mon May 13 16:39:04 2019 +0300 drm/i915: Add debugs for the C8 vs. legacy LUT case Leave a hint in dmesg when we reject a configuration attempting to use C8 planes without the legacy LUT loaded. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190513133904.20374-3-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_color.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 638d87c4a70e497465cc489e03310de39efa0f82 Author: Ville Syrjälä Date: Mon May 13 16:39:03 2019 +0300 drm/i915: Update pipe gamma enable bits when C8 planes are getting enabled/disabled When the first C8 plane gets enabled, or the last one gets disabled we may need to enable/disable the pipe gamma for the other active planes. Check for that and run through the normal intel_color_check() path. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190513133904.20374-2-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_display.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 338c993f9aa2078e03c909464e963a31e086df69 Author: Geert Uytterhoeven Date: Mon May 27 14:27:51 2019 +0200 PM / clk: Remove error message on out-of-memory condition There is no need to print an error message if kstrdup() fails, as the memory allocation core already takes care of that. Note that commit 59d84ca8c46a93ad ("PM / OPP / clk: Remove unnecessary OOM message") already removed similar error messages, but this one was forgotten. Signed-off-by: Geert Uytterhoeven Signed-off-by: Rafael J. Wysocki drivers/base/power/clock_ops.c | 2 -- 1 file changed, 2 deletions(-) commit 7e186d9de9290d57c90751ea252135f425f49e6e Author: Kefeng Wang Date: Mon May 27 20:05:35 2019 +0800 drivers: base: power: clock_ops: Use of_clk_get_parent_count() Use of_clk_get_parent_count() instead of open coding. Reviewed-by: Geert Uytterhoeven Signed-off-by: Kefeng Wang Signed-off-by: Rafael J. Wysocki drivers/base/power/clock_ops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 32865e3e010f0ea81e518878e9a6b1492ff07281 Author: Lenny Szubowicz Date: Thu May 2 16:00:52 2019 -0400 ACPI / LPIT: Correct LPIT end address for lpit_process() Correct the LPIT end address which is passed into lpit_process() and the end address limit test in lpit_process(). The LPI state descriptor subtables follow the fixed sized acpi_lpit_header up to the end of the LPIT. The last LPI state descriptor can end at exactly the end of the LPIT. Note that this is a fix to a latent problem. Although incorrect, the unpatched version works because the passed in end address is just slightly beyond the actual end of the LPIT and the size of the ACPI LPIT header is smaller than the size of the only currently defined LPI state descriptor, acpi_lpit_native. Signed-off-by: Lenny Szubowicz Reviewed-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki drivers/acpi/acpi_lpit.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit b1954bbf1272e64a68aef745b10e2380ad84be01 Author: Masahiro Yamada Date: Wed May 1 22:53:05 2019 +0900 ACPI: tools: Exclude tools/* from .gitignore patterns tools/power/acpi/.gitignore has the following entries: acpidbg acpidump ec They are intended to ignore the following build artifacts: tools/power/acpi/acpidbg tools/power/acpi/acpidump tools/power/acpi/ec However, those .gitignore entries are effective not only for the current directory, but also for any sub-directories. So, from the point of .gitignore grammar, the following check-in directories are also considered to be ignored: tools/power/acpi/tools/acpidbg tools/power/acpi/tools/acpidump tools/power/acpi/tools/ec As the manual gitignore(5) says "Files already tracked by Git are not affected", this is not a problem as far as Git is concerned. However, Git is not the only program that parses .gitignore because .gitignore is useful to distinguish build artifacts from source files. For example, tar(1) supports the --exclude-vcs-ignore option. As of writing, this option does not work perfectly, but it intends to create a tarball excluding files specified by .gitignore. The issue can be prevented by prefixing the pattern with a slash; the leading slash means the specified pattern is relative to the current directory. Do that for the "include" directory too for consistency and extra safety. Signed-off-by: Masahiro Yamada [ rjw: Subject & changelog ] Signed-off-by: Rafael J. Wysocki tools/power/acpi/.gitignore | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 6e4b73bcd1519d50680d92ba74887c80c4e59140 Author: Eric Biggers Date: Mon May 20 09:29:52 2019 -0700 ext4: encrypt only up to last block in ext4_bio_write_page() As an optimization, don't encrypt blocks fully beyond i_size, since those definitely won't need to be written out. Also add a comment. This is in preparation for allowing encryption on ext4 filesystems with blocksize != PAGE_SIZE. This is based on work by Chandan Rajendra. Reviewed-by: Chandan Rajendra Signed-off-by: Eric Biggers fs/ext4/page-io.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit ec39a36867440995c9675b2800f5ddaeb51b024e Author: Chandan Rajendra Date: Mon May 20 09:29:51 2019 -0700 ext4: decrypt only the needed block in __ext4_block_zero_page_range() In __ext4_block_zero_page_range(), only decrypt the block that actually needs to be decrypted, rather than assuming blocksize == PAGE_SIZE and decrypting the whole page. This is in preparation for allowing encryption on ext4 filesystems with blocksize != PAGE_SIZE. Signed-off-by: Chandan Rajendra (EB: rebase onto previous changes, improve the commit message, and use bh_offset()) Signed-off-by: Eric Biggers fs/ext4/inode.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 0b578f358a6a7afee2ddc48dd39c2972726187de Author: Chandan Rajendra Date: Mon May 20 09:29:50 2019 -0700 ext4: decrypt only the needed blocks in ext4_block_write_begin() In ext4_block_write_begin(), only decrypt the blocks that actually need to be decrypted (up to two blocks which intersect the boundaries of the region that will be written to), rather than assuming blocksize == PAGE_SIZE and decrypting the whole page. This is in preparation for allowing encryption on ext4 filesystems with blocksize != PAGE_SIZE. Signed-off-by: Chandan Rajendra (EB: rebase onto previous changes, improve the commit message, and move the check for encrypted inode) Signed-off-by: Eric Biggers fs/ext4/inode.c | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) commit 7e0785fce14f75976a80b241d732e210e380923e Author: Chandan Rajendra Date: Mon May 20 09:29:49 2019 -0700 ext4: clear BH_Uptodate flag on decryption error If decryption fails, ext4_block_write_begin() can return with the page's buffer_head marked with the BH_Uptodate flag. This commit clears the BH_Uptodate flag in such cases. Signed-off-by: Chandan Rajendra Signed-off-by: Eric Biggers fs/ext4/inode.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit ffceeefb337b3ba9da36633072490caa96289345 Author: Eric Biggers Date: Mon May 20 09:29:48 2019 -0700 fscrypt: decrypt only the needed blocks in __fscrypt_decrypt_bio() In __fscrypt_decrypt_bio(), only decrypt the blocks that actually comprise the bio, rather than assuming blocksize == PAGE_SIZE and decrypting the entirety of every page used in the bio. This is in preparation for allowing encryption on ext4 filesystems with blocksize != PAGE_SIZE. This is based on work by Chandan Rajendra. Reviewed-by: Chandan Rajendra Signed-off-by: Eric Biggers fs/crypto/bio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit aa8bc1ac6ef32a332671ca25e06cfd277a3839a5 Author: Eric Biggers Date: Mon May 20 09:29:47 2019 -0700 fscrypt: support decrypting multiple filesystem blocks per page Rename fscrypt_decrypt_page() to fscrypt_decrypt_pagecache_blocks() and redefine its behavior to decrypt all filesystem blocks in the given region of the given page, rather than assuming that the region consists of just one filesystem block. Also remove the 'inode' and 'lblk_num' parameters, since they can be retrieved from the page as it's already assumed to be a pagecache page. This is in preparation for allowing encryption on ext4 filesystems with blocksize != PAGE_SIZE. This is based on work by Chandan Rajendra. Reviewed-by: Chandan Rajendra Signed-off-by: Eric Biggers fs/crypto/bio.c | 3 +-- fs/crypto/crypto.c | 46 ++++++++++++++++++++++++++++++++-------------- fs/ext4/inode.c | 7 +++---- include/linux/fscrypt.h | 12 ++++++------ 4 files changed, 42 insertions(+), 26 deletions(-) commit 41adbcb7267b0060682576d523956160b5c617bd Author: Eric Biggers Date: Mon May 20 09:29:46 2019 -0700 fscrypt: introduce fscrypt_decrypt_block_inplace() Currently fscrypt_decrypt_page() does one of two logically distinct things depending on whether FS_CFLG_OWN_PAGES is set in the filesystem's fscrypt_operations: decrypt a pagecache page in-place, or decrypt a filesystem block in-place in any page. Currently these happen to share the same implementation, but this conflates the notion of blocks and pages. It also makes it so that all callers have to provide inode and lblk_num, when fscrypt could determine these itself for pagecache pages. Therefore, move the FS_CFLG_OWN_PAGES behavior into a new function fscrypt_decrypt_block_inplace(). This mirrors fscrypt_encrypt_block_inplace(). This is in preparation for allowing encryption on ext4 filesystems with blocksize != PAGE_SIZE. Reviewed-by: Chandan Rajendra Signed-off-by: Eric Biggers fs/crypto/crypto.c | 31 +++++++++++++++++++++++++++---- fs/ubifs/crypto.c | 7 ++++--- include/linux/fscrypt.h | 11 +++++++++++ 3 files changed, 42 insertions(+), 7 deletions(-) commit 930d453995bdf4a0000bd162dfd4b70c6d7329f8 Author: Eric Biggers Date: Mon May 20 09:29:45 2019 -0700 fscrypt: handle blocksize < PAGE_SIZE in fscrypt_zeroout_range() Adjust fscrypt_zeroout_range() to encrypt a block at a time rather than a page at a time, so that it works when blocksize < PAGE_SIZE. This isn't optimized for performance, but then again this function already wasn't optimized for performance. As a future optimization, we could submit much larger bios here. This is in preparation for allowing encryption on ext4 filesystems with blocksize != PAGE_SIZE. This is based on work by Chandan Rajendra. Reviewed-by: Chandan Rajendra Signed-off-by: Eric Biggers fs/crypto/bio.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 53bc1d854c64c20d967dab15b111baca02a6d99e Author: Eric Biggers Date: Mon May 20 09:29:44 2019 -0700 fscrypt: support encrypting multiple filesystem blocks per page Rename fscrypt_encrypt_page() to fscrypt_encrypt_pagecache_blocks() and redefine its behavior to encrypt all filesystem blocks from the given region of the given page, rather than assuming that the region consists of just one filesystem block. Also remove the 'inode' and 'lblk_num' parameters, since they can be retrieved from the page as it's already assumed to be a pagecache page. This is in preparation for allowing encryption on ext4 filesystems with blocksize != PAGE_SIZE. This is based on work by Chandan Rajendra. Reviewed-by: Chandan Rajendra Signed-off-by: Eric Biggers fs/crypto/crypto.c | 67 ++++++++++++++++++++++++++++--------------------- fs/ext4/page-io.c | 4 +-- fs/f2fs/data.c | 5 ++-- include/linux/fscrypt.h | 17 +++++++------ 4 files changed, 53 insertions(+), 40 deletions(-) commit 03569f2fb8e734f281379767de674e23c38b0b14 Author: Eric Biggers Date: Mon May 20 09:29:43 2019 -0700 fscrypt: introduce fscrypt_encrypt_block_inplace() fscrypt_encrypt_page() behaves very differently depending on whether the filesystem set FS_CFLG_OWN_PAGES in its fscrypt_operations. This makes the function difficult to understand and document. It also makes it so that all callers have to provide inode and lblk_num, when fscrypt could determine these itself for pagecache pages. Therefore, move the FS_CFLG_OWN_PAGES behavior into a new function fscrypt_encrypt_block_inplace(). This is in preparation for allowing encryption on ext4 filesystems with blocksize != PAGE_SIZE. Reviewed-by: Chandan Rajendra Signed-off-by: Eric Biggers fs/crypto/crypto.c | 50 ++++++++++++++++++++++++++++++------------------- fs/ubifs/crypto.c | 12 ++++++------ include/linux/fscrypt.h | 13 +++++++++++++ 3 files changed, 50 insertions(+), 25 deletions(-) commit eeacfdc68a104967162dfcba60f53f6f5b62a334 Author: Eric Biggers Date: Mon May 20 09:29:42 2019 -0700 fscrypt: clean up some BUG_ON()s in block encryption/decryption Replace some BUG_ON()s with WARN_ON_ONCE() and returning an error code, and move the check for len divisible by FS_CRYPTO_BLOCK_SIZE into fscrypt_crypt_block() so that it's done for both encryption and decryption, not just encryption. Reviewed-by: Chandan Rajendra Signed-off-by: Eric Biggers fs/crypto/crypto.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit f47fcbb2b578bdb213d9ac5875aab56a2034d466 Author: Eric Biggers Date: Mon May 20 09:29:41 2019 -0700 fscrypt: rename fscrypt_do_page_crypto() to fscrypt_crypt_block() fscrypt_do_page_crypto() only does a single encryption or decryption operation, with a single logical block number (single IV). So it actually operates on a filesystem block, not a "page" per se. To reflect this, rename it to fscrypt_crypt_block(). Reviewed-by: Chandan Rajendra Signed-off-by: Eric Biggers fs/crypto/bio.c | 6 +++--- fs/crypto/crypto.c | 24 ++++++++++++------------ fs/crypto/fscrypt_private.h | 11 +++++------ 3 files changed, 20 insertions(+), 21 deletions(-) commit 2a415a0257314cb2e49fb9ac4c6770837112f261 Author: Eric Biggers Date: Mon May 20 09:29:40 2019 -0700 fscrypt: remove the "write" part of struct fscrypt_ctx Now that fscrypt_ctx is not used for writes, remove the 'w' fields. Reviewed-by: Chandan Rajendra Signed-off-by: Eric Biggers fs/crypto/bio.c | 11 +++++------ fs/crypto/crypto.c | 14 +++++++------- include/linux/fscrypt.h | 7 ++----- 3 files changed, 14 insertions(+), 18 deletions(-) commit d2d0727b1654e11563f181f4d3d48b9275514480 Author: Eric Biggers Date: Mon May 20 09:29:39 2019 -0700 fscrypt: simplify bounce page handling Currently, bounce page handling for writes to encrypted files is unnecessarily complicated. A fscrypt_ctx is allocated along with each bounce page, page_private(bounce_page) points to this fscrypt_ctx, and fscrypt_ctx::w::control_page points to the original pagecache page. However, because writes don't use the fscrypt_ctx for anything else, there's no reason why page_private(bounce_page) can't just point to the original pagecache page directly. Therefore, this patch makes this change. In the process, it also cleans up the API exposed to filesystems that allows testing whether a page is a bounce page, getting the pagecache page from a bounce page, and freeing a bounce page. Reviewed-by: Chandan Rajendra Signed-off-by: Eric Biggers fs/crypto/bio.c | 38 +++------------- fs/crypto/crypto.c | 104 +++++++++++++++----------------------------- fs/crypto/fscrypt_private.h | 4 +- fs/ext4/page-io.c | 36 ++++++--------- fs/f2fs/data.c | 12 +++-- include/linux/fscrypt.h | 38 +++++++++++----- 6 files changed, 84 insertions(+), 148 deletions(-) commit 9bec226d8c79fcbc95817b082557f72a79d182f5 Author: Hans Verkuil Date: Mon May 27 04:43:29 2019 -0400 media: v4l2-pci-skeleton.c: fix doc warning Document the 'field' field to fix this warning: samples/v4l/v4l2-pci-skeleton.c:80: warning: Function parameter or member 'field' not described in 'skeleton' Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab samples/v4l/v4l2-pci-skeleton.c | 1 + 1 file changed, 1 insertion(+) commit 5d2e73a5f80a5b5aff3caf1ec6d39b5b3f54b26e Author: Vandana BN Date: Wed May 22 04:34:15 2019 -0400 media: usb:zr364xx:Fix KASAN:null-ptr-deref Read in zr364xx_vidioc_querycap SyzKaller hit the null pointer deref while reading from uninitialized udev->product in zr364xx_vidioc_querycap(). ================================================================== BUG: KASAN: null-ptr-deref in read_word_at_a_time+0xe/0x20 include/linux/compiler.h:274 Read of size 1 at addr 0000000000000000 by task v4l_id/5287 CPU: 1 PID: 5287 Comm: v4l_id Not tainted 5.1.0-rc3-319004-g43151d6 #6 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0xe8/0x16e lib/dump_stack.c:113 kasan_report.cold+0x5/0x3c mm/kasan/report.c:321 read_word_at_a_time+0xe/0x20 include/linux/compiler.h:274 strscpy+0x8a/0x280 lib/string.c:207 zr364xx_vidioc_querycap+0xb5/0x210 drivers/media/usb/zr364xx/zr364xx.c:706 v4l_querycap+0x12b/0x340 drivers/media/v4l2-core/v4l2-ioctl.c:1062 __video_do_ioctl+0x5bb/0xb40 drivers/media/v4l2-core/v4l2-ioctl.c:2874 video_usercopy+0x44e/0xf00 drivers/media/v4l2-core/v4l2-ioctl.c:3056 v4l2_ioctl+0x14e/0x1a0 drivers/media/v4l2-core/v4l2-dev.c:364 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:509 [inline] do_vfs_ioctl+0xced/0x12f0 fs/ioctl.c:696 ksys_ioctl+0xa0/0xc0 fs/ioctl.c:713 __do_sys_ioctl fs/ioctl.c:720 [inline] __se_sys_ioctl fs/ioctl.c:718 [inline] __x64_sys_ioctl+0x74/0xb0 fs/ioctl.c:718 do_syscall_64+0xcf/0x4f0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f3b56d8b347 Code: 90 90 90 48 8b 05 f1 fa 2a 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 90 90 90 90 90 90 90 90 90 90 b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d c1 fa 2a 00 31 d2 48 29 c2 64 RSP: 002b:00007ffe005d5d68 EFLAGS: 00000202 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f3b56d8b347 RDX: 00007ffe005d5d70 RSI: 0000000080685600 RDI: 0000000000000003 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000400884 R13: 00007ffe005d5ec0 R14: 0000000000000000 R15: 0000000000000000 ================================================================== For this device udev->product is not initialized and accessing it causes a NULL pointer deref. The fix is to check for NULL before strscpy() and copy empty string, if product is NULL Reported-by: syzbot+66010012fd4c531a1a96@syzkaller.appspotmail.com Signed-off-by: Vandana BN Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/zr364xx/zr364xx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 75417060e95c1c4fd916458389ba68d883da99c8 Author: Hariprasad Kelam Date: Sat May 18 13:38:52 2019 -0400 media: staging: media: imx: fix Unneeded variable: "ret". Return "0" fix below warning reported by coccichec drivers/staging/media/imx/imx-media-capture.c:617:5-8: Unneeded variable: "ret". Return "0" on line 630 Signed-off-by: Hariprasad Kelam Reviewed-by: Fabio Estevam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx-media-capture.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit fe97d64d72586827f422a5aa49a4b7fb5cbb6932 Author: Niklas Söderlund Date: Fri May 17 20:46:54 2019 -0400 media: vimc: Remove unneeded return statement in vimc_sen_s_stream() The other subdevice implementations in vimc (debayer and scaler) which share their code structure with the sensor do not have an explicit return statement at the end of the s_stream(0) code path. Align the sensor subdevice by dropping the return statement. Signed-off-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vimc/vimc-sensor.c | 1 - 1 file changed, 1 deletion(-) commit ee1c71a8e1456ab53fe667281d855849edf26a4d Author: Helen Koike Date: Fri May 17 13:20:11 2019 -0400 media: vimc: fix component match compare If the system has other devices being registered in the component framework, the compare function will be called with a device that doesn't belong to vimc. This device is not necessarily a platform_device, nor have a platform_data (which causes a NULL pointer dereference error) and if it does have a pdata, it is not necessarily type of struct vimc_platform_data. So casting to any of these types is wrong. Instead of expecting a given pdev with a given pdata, just expect for the device it self. vimc-core is the one who creates them, we know in advance exactly which object to expect in the match. Fixes: 4a29b7090749 ("[media] vimc: Subdevices as modules") Signed-off-by: Helen Koike Reviewed-by: Boris Brezillon Tested-by: Boris Brezillon Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vimc/vimc-core.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 3e0f724346e96daae7792262c6767449795ac3b5 Author: sumitg Date: Fri May 17 09:53:42 2019 -0400 media: v4l2-core: fix use-after-free error Fixing use-after-free within __v4l2_ctrl_handler_setup(). Memory is being freed with kfree(new_ref) for duplicate control reference entry but ctrl->cluster pointer is still referring to freed duplicate entry resulting in error on access. Change done to update cluster pointer only when new control reference is added. ================================================================== BUG: KASAN: use-after-free in __v4l2_ctrl_handler_setup+0x388/0x428 Read of size 8 at addr ffffffc324e78618 by task systemd-udevd/312 Allocated by task 312: Freed by task 312: The buggy address belongs to the object at ffffffc324e78600 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 24 bytes inside of 64-byte region [ffffffc324e78600, ffffffc324e78640) The buggy address belongs to the page: page:ffffffbf0c939e00 count:1 mapcount:0 mapping: (null) index:0xffffffc324e78f80 flags: 0x4000000000000100(slab) raw: 4000000000000100 0000000000000000 ffffffc324e78f80 000000018020001a raw: 0000000000000000 0000000100000001 ffffffc37040fb80 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffffffc324e78500: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffffffc324e78580: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffffffc324e78600: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffffffc324e78680: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ffffffc324e78700: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc ================================================================== Suggested-by: Hans Verkuil Signed-off-by: Sumit Gupta Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-ctrls.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 0c310868826eb10b724a21dcd05e19768b6fc3a8 Author: Niklas Söderlund Date: Wed May 15 20:35:38 2019 -0400 media: rcar-csi2: Fix coccinelle warning for PTR_ERR_OR_ZERO() Use the PTR_ERR_OR_ZERO() macro instead of construct: if (IS_ERR(foo)) return PTR_ERR(foo); return 0; Fixes: 3ae854cafd76 ("rcar-csi2: Use standby mode instead of resetting") Reported-by: kbuild test robot Signed-off-by: Niklas Söderlund Reviewed-by: Ulrich Hecht Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar-vin/rcar-csi2.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 20059cbbf981ca954be56f7963ae494d18e2dda1 Author: Kefeng Wang Date: Mon May 13 03:18:29 2019 -0400 media: vim2m: fix two double-free issues vim2m_device_release() will be called by video_unregister_device() to release various objects. There are two double-free issue, 1. dev->m2m_dev will be freed twice in error_m2m path/vim2m_device_release 2. the error_v4l2 and error_free path in vim2m_probe() will release same objects, since vim2m_device_release has done. Fixes: ea6c7e34f3b2 ("media: vim2m: replace devm_kzalloc by kzalloc") Cc: Laurent Pinchart Reported-by: Hulk Robot Signed-off-by: Kefeng Wang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vim2m.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit debb0dd644ce4f304240b37faa360c7cc0b89d7c Author: Oliver Neukum Date: Thu May 9 04:59:30 2019 -0400 media: pwc: convert to BIT macro This converts the driver to using the BIT macro to increase readability Signed-off-by: Oliver Neukum Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/pwc/pwc.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit d0a3a4b2189904955b6b52c06f986b5e021811a7 Merge: 37b54aed123f d5506591d54b Author: Alexei Starovoitov Date: Tue May 28 09:30:03 2019 -0700 Merge branch 'cgroup-auto-detach' Roman Gushchin says: ==================== This patchset implements a cgroup bpf auto-detachment functionality: bpf programs are detached as soon as possible after removal of the cgroup, without waiting for the release of all associated resources. Patches 2 and 3 are required to implement a corresponding kselftest in patch 4. v5: 1) rebase v4: 1) release cgroup bpf data using a workqueue 2) add test_cgroup_attach to .gitignore v3: 1) some minor changes and typo fixes v2: 1) removed a bogus check in patch 4 2) moved buf[len] = 0 in patch 2 ==================== Signed-off-by: Alexei Starovoitov commit d5506591d54b915aaa9d489c9289af2cc88f47a4 Author: Roman Gushchin Date: Sat May 25 09:37:42 2019 -0700 selftests/bpf: add auto-detach test Add a kselftest to cover bpf auto-detachment functionality. The test creates a cgroup, associates some resources with it, attaches a couple of bpf programs and deletes the cgroup. Then it checks that bpf programs are going away in 5 seconds. Expected output: $ ./test_cgroup_attach #override:PASS #multi:PASS #autodetach:PASS test_cgroup_attach:PASS On a kernel without auto-detaching: $ ./test_cgroup_attach #override:PASS #multi:PASS #autodetach:FAIL test_cgroup_attach:FAIL Signed-off-by: Roman Gushchin Acked-by: Yonghong Song Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/test_cgroup_attach.c | 98 +++++++++++++++++++++++- 1 file changed, 97 insertions(+), 1 deletion(-) commit 596092ef8beaa73891da4f406446b283cc566cdb Author: Roman Gushchin Date: Sat May 25 09:37:41 2019 -0700 selftests/bpf: enable all available cgroup v2 controllers Enable all available cgroup v2 controllers when setting up the environment for the bpf kselftests. It's required to properly test the bpf prog auto-detach feature. Also it will generally increase the code coverage. Signed-off-by: Roman Gushchin Acked-by: Yonghong Song Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/cgroup_helpers.c | 57 ++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) commit ba0c0cc05dda2c56e23c88e4610ce2ac65ff86ec Author: Roman Gushchin Date: Sat May 25 09:37:40 2019 -0700 selftests/bpf: convert test_cgrp2_attach2 example into kselftest Convert test_cgrp2_attach2 example into a proper test_cgroup_attach kselftest. It's better because we do run kselftest on a constant basis, so there are better chances to spot a potential regression. Also make it slightly less verbose to conform kselftests output style. Output example: $ ./test_cgroup_attach #override:PASS #multi:PASS test_cgroup_attach:PASS Signed-off-by: Roman Gushchin Acked-by: Yonghong Song Signed-off-by: Alexei Starovoitov samples/bpf/Makefile | 2 - tools/testing/selftests/bpf/.gitignore | 1 + tools/testing/selftests/bpf/Makefile | 3 +- .../testing/selftests/bpf/test_cgroup_attach.c | 50 ++++++++++++++-------- 4 files changed, 36 insertions(+), 20 deletions(-) commit 4bfc0bb2c60e2f4cc8eb60f03cf8dfa72336272a Author: Roman Gushchin Date: Sat May 25 09:37:39 2019 -0700 bpf: decouple the lifetime of cgroup_bpf from cgroup itself Currently the lifetime of bpf programs attached to a cgroup is bound to the lifetime of the cgroup itself. It means that if a user forgets (or intentionally avoids) to detach a bpf program before removing the cgroup, it will stay attached up to the release of the cgroup. Since the cgroup can stay in the dying state (the state between being rmdir()'ed and being released) for a very long time, it leads to a waste of memory. Also, it blocks a possibility to implement the memcg-based memory accounting for bpf objects, because a circular reference dependency will occur. Charged memory pages are pinning the corresponding memory cgroup, and if the memory cgroup is pinning the attached bpf program, nothing will be ever released. A dying cgroup can not contain any processes, so the only chance for an attached bpf program to be executed is a live socket associated with the cgroup. So in order to release all bpf data early, let's count associated sockets using a new percpu refcounter. On cgroup removal the counter is transitioned to the atomic mode, and as soon as it reaches 0, all bpf programs are detached. Because cgroup_bpf_release() can block, it can't be called from the percpu ref counter callback directly, so instead an asynchronous work is scheduled. The reference counter is not socket specific, and can be used for any other types of programs, which can be executed from a cgroup-bpf hook outside of the process context, had such a need arise in the future. Signed-off-by: Roman Gushchin Cc: jolsa@redhat.com Signed-off-by: Alexei Starovoitov include/linux/bpf-cgroup.h | 11 +++++++++-- include/linux/cgroup.h | 18 ++++++++++++++++++ kernel/bpf/cgroup.c | 41 +++++++++++++++++++++++++++++++++++++---- kernel/cgroup/cgroup.c | 11 ++++++++--- 4 files changed, 72 insertions(+), 9 deletions(-) commit eff73de2b1600ad8230692f00bc0ab49b166512a Author: Oliver Neukum Date: Thu May 9 04:57:09 2019 -0400 media: cpia2_usb: first wake up, then free in disconnect Kasan reported a use after free in cpia2_usb_disconnect() It first freed everything and then woke up those waiting. The reverse order is correct. Fixes: 6c493f8b28c67 ("[media] cpia2: major overhaul to get it in a working state again") Signed-off-by: Oliver Neukum Reported-by: syzbot+0c90fc937c84f97d0aa6@syzkaller.appspotmail.com Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/cpia2/cpia2_usb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a82c3149ad8b4a84f9737a633250815d5cf0cc5e Author: Steve Longerbeam Date: Fri May 3 19:45:07 2019 -0400 media: docs-rst: Clarify older field vs. first transmitted field Add a paragraph to make it more clear that video equipment will transmit fields in the same order the fields were captured, and replace some of the "is transmitted first" language with "is the older field", since the latter is the important info for motion compensation applications. Signed-off-by: Steve Longerbeam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/v4l/field-order.rst | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 0783525fff6e524532fd613f788e6ce14edba89d Author: Hans Verkuil Date: Fri May 3 10:22:49 2019 -0400 media: vicodec: correctly support unbinding of the driver Unbinding the driver while streaming caused the driver to hang. The cause of this was failing to use the v4l2_device release function and the use of devm_kmalloc for the state structure. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vicodec/vicodec-core.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) commit bfe819509f4eb58288796e1d3aefd7d18cc6d9af Author: Boris Brezillon Date: Fri May 3 07:42:21 2019 -0400 media: v4l2: Initialize mpeg slice controls Make sure the default value at least passes the std_validate() tests. Signed-off-by: Boris Brezillon Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-ctrls.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) commit 2b4116290c20707bd92b7afe9f03b32cb9f76167 Author: Ezequiel Garcia Date: Thu May 2 18:00:45 2019 -0400 media: coda: Clear the interrupt reason This commit clears the interrupt reason (INT_REASON) register on the interrupt handler. Without this clearing, the CODA hardware has been observed to get completely stalled on CODA980 variants, requiring a pretty deep hardware reset. The datasheet specifies that the INT_REASON register is set by the CODA hardware, and should be cleared by the host. While the CODA versions that are currently supported by this driver don't seem to need this change, it's a really small change, so it seems a wise thing to do to avoid hitting some rare race-condition in the hardware. Reviewed-by: Philipp Zabel Signed-off-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-bit.c | 1 + 1 file changed, 1 insertion(+) commit 1405bc55e617e3e03339dc2d23423b84d9bd039d Author: Ezequiel Garcia Date: Thu May 2 18:00:44 2019 -0400 media: coda: Replace the threaded interrupt with a hard interrupt The current interrupt handler is doing very little, and not doing any non-atomic operations. Pretty much all it does is accessing a couple registers, taking a couple spinlocks and then signalling a completion. There is no reason this should be a threaded interrupt handler, so move the handler to regular hard interrupt context. Reviewed-by: Philipp Zabel Signed-off-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 766b9b168f6c75c350dd87c3e0bc6a9b322f0013 Author: Ezequiel Garcia Date: Thu May 2 18:00:43 2019 -0400 media: coda: Remove unbalanced and unneeded mutex unlock The mutex unlock in the threaded interrupt handler is not paired with any mutex lock. Remove it. This bug has been here for a really long time, so it applies to any stable repo. Reviewed-by: Philipp Zabel Signed-off-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-bit.c | 1 - 1 file changed, 1 deletion(-) commit ddfef32a33869c34931d1bf9d7758a979ed6289e Author: Ezequiel Garcia Date: Thu May 2 18:00:42 2019 -0400 media: coda: Print a nicer device registered message This is just a cosmetic change to print a more descriptive message, to distinguish decoder from encoder: So, instead of printing coda 2040000.vpu: codec registered as /dev/video[4-5] With this change, the driver now prints coda 2040000.vpu: encoder registered as /dev/video4 coda 2040000.vpu: decoder registered as /dev/video5 Signed-off-by: Ezequiel Garcia Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-common.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 1753c7c4367aa1201e1e5d0a601897ab33444af1 Author: Andrey Konovalov Date: Thu May 2 12:09:26 2019 -0400 media: pvrusb2: use a different format for warnings When the pvrusb2 driver detects that there's something wrong with the device, it prints a warning message. Right now those message are printed in two different formats: 1. ***WARNING*** message here 2. WARNING: message here There's an issue with the second format. Syzkaller recognizes it as a message produced by a WARN_ON(), which is used to indicate a bug in the kernel. However pvrusb2 prints those warnings to indicate an issue with the device, not the bug in the kernel. This patch changes the pvrusb2 driver to consistently use the first warning message format. This will unblock syzkaller testing of this driver. Reported-by: syzbot+af8f8d2ac0d39b0ed3a0@syzkaller.appspotmail.com Reported-by: syzbot+170a86bf206dd2c6217e@syzkaller.appspotmail.com Signed-off-by: Andrey Konovalov Reviewed-by: Greg Kroah-Hartman Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/pvrusb2/pvrusb2-hdw.c | 4 ++-- drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c | 6 +++--- drivers/media/usb/pvrusb2/pvrusb2-std.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) commit c612e54fca55d9380c1378eaa623d74ed89b62db Author: Hans Verkuil Date: Thu May 2 09:42:31 2019 -0400 media: move drivers/media/media-* to drivers/media/mc/mc-* It is really weird that the media controller sources are all top-level in drivers/media. It is a bit of a left-over from long ago when most media sources were all at the top-level. At some point we reorganized the directory structure, but the media-*.c sources where never moved to their own directory. So create a new mc directory and move all sources there. Also rename the prefix from media- to mc-. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/Kconfig | 34 +--------------------- drivers/media/Makefile | 13 ++------- drivers/media/mc/Kconfig | 33 +++++++++++++++++++++ drivers/media/mc/Makefile | 10 +++++++ .../mc-dev-allocator.c} | 0 drivers/media/{media-device.c => mc/mc-device.c} | 0 drivers/media/{media-devnode.c => mc/mc-devnode.c} | 0 drivers/media/{media-entity.c => mc/mc-entity.c} | 0 drivers/media/{media-request.c => mc/mc-request.c} | 0 9 files changed, 46 insertions(+), 44 deletions(-) commit 03006bd0880ad23600eff76f7c6b7eb8c87fe3d7 Author: Rui Miguel Silva Date: Tue Apr 30 18:25:23 2019 -0400 media: imx7_mipi_csis: fix racy entity pads init Setting the media entity pads after the async register subdev can be racy with probe complete callback. So, make sure that the media pads are initialized before the probe complete is called. For that move the media entity pads initialization to the registered subdev internal operation. Signed-off-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx7-mipi-csis.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit 6002e0be75715a3698af89b79fe3829414bf1441 Author: Boris Brezillon Date: Thu Apr 25 03:12:26 2019 -0400 media: rockchip/vpu: Remove a useless test vdev is guaranteed to be equal to vpu->vfd_enc thanks a test done a few lines above. Remove this useless test. Signed-off-by: Boris Brezillon Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 9d4e1f745d5888b386a807792a3814e8f23eacdc Author: Ezequiel Garcia Date: Thu Apr 25 03:12:25 2019 -0400 media: rockchip/vpu: Cleanup JPEG bounce buffer management In order to make the code more generic, introduce a pair of start/stop codec operations, and use them to allocate and release the JPEG bounce buffer. Signed-off-by: Ezequiel Garcia Signed-off-by: Boris Brezillon Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/rockchip/vpu/rk3288_vpu_hw.c | 2 ++ .../media/rockchip/vpu/rk3288_vpu_hw_jpeg_enc.c | 4 +-- drivers/staging/media/rockchip/vpu/rk3399_vpu_hw.c | 2 ++ .../media/rockchip/vpu/rk3399_vpu_hw_jpeg_enc.c | 4 +-- drivers/staging/media/rockchip/vpu/rockchip_vpu.h | 12 ++++----- .../staging/media/rockchip/vpu/rockchip_vpu_drv.c | 9 +++++-- .../staging/media/rockchip/vpu/rockchip_vpu_enc.c | 23 ++++++----------- .../staging/media/rockchip/vpu/rockchip_vpu_hw.h | 28 +++++++++++++++++++++ .../staging/media/rockchip/vpu/rockchip_vpu_jpeg.c | 29 ++++++++++++++++++++++ 9 files changed, 84 insertions(+), 29 deletions(-) commit 0b3b094ac9a7bb1fcf5d694f3ec981e6864a63d3 Author: Jan Kara Date: Wed May 15 16:28:34 2019 +0200 fanotify: Disallow permission events for proc filesystem Proc filesystem has special locking rules for various files. Thus fanotify which opens files on event delivery can easily deadlock against another process that waits for fanotify permission event to be handled. Since permission events on /proc have doubtful value anyway, just disallow them. Link: https://lore.kernel.org/linux-fsdevel/20190320131642.GE9485@quack2.suse.cz/ Reviewed-by: Amir Goldstein Signed-off-by: Jan Kara fs/notify/fanotify/fanotify_user.c | 22 ++++++++++++++++++++++ fs/proc/root.c | 2 +- include/linux/fs.h | 1 + 3 files changed, 24 insertions(+), 1 deletion(-) commit 92cd4307baf3f08a9bdc5105aa427815a3e1d5d1 Author: Ezequiel Garcia Date: Thu Apr 25 03:12:24 2019 -0400 media: rockchip/vpu: Cleanup macroblock alignment We need to make the macrobock alignment generic, in order to support multiple codecs. Signed-off-by: Ezequiel Garcia Signed-off-by: Boris Brezillon Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../staging/media/rockchip/vpu/rockchip_vpu_enc.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) commit 365f3bfc5f4b4bd9a3fa2b2573b881794199e22a Author: Ezequiel Garcia Date: Thu Apr 25 03:12:23 2019 -0400 media: rockchip/vpu: Use v4l2_m2m_buf_copy_metadata Use the recently introduced v4l2_m2m_buf_copy_metadata helper and get rid of some code. Signed-off-by: Ezequiel Garcia Signed-off-by: Boris Brezillon Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit cf760c4b6020cd6e4015465e7b39d69286296cc2 Author: Ezequiel Garcia Date: Thu Apr 25 03:12:22 2019 -0400 media: rockchip/vpu: Use pixel format helpers Now that we've introduced the pixel format helpers, use them in vpu driver, and get rid of the internal helpers. Signed-off-by: Ezequiel Garcia Signed-off-by: Boris Brezillon Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../staging/media/rockchip/vpu/rockchip_vpu_enc.c | 91 +--------------------- 1 file changed, 2 insertions(+), 89 deletions(-) commit 4914425e28fb90c39fa986016373845de5453e97 Author: Hans Verkuil Date: Wed Apr 24 05:37:49 2019 -0400 media: coda/venus/s5p_mfc: fix control typo These two slice modes used by the V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE control had a silly typo: V4L2_MPEG_VIDEO_MULTI_SICE_MODE_MAX_MB V4L2_MPEG_VIDEO_MULTI_SICE_MODE_MAX_BYTES SICE should be SLICE. Rename these enum values, keeping the old ones (under #ifndef __KERNEL__) for backwards compatibility reasons. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-bit.c | 4 ++-- drivers/media/platform/coda/coda-common.c | 2 +- drivers/media/platform/qcom/venus/venc_ctrls.c | 2 +- drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 2 +- drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c | 4 ++-- drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c | 8 ++++---- include/uapi/linux/v4l2-controls.h | 5 +++++ 7 files changed, 16 insertions(+), 11 deletions(-) commit 354ea05d0276384045fabbfd62ccd2d985defa9e Author: Paul E. McKenney Date: Sat May 25 12:36:53 2019 -0700 rcutorture: Upper case solves the case of the vanishing NULL pointer Various security techniques can obfuscate pointer printouts on the console. Unfortunately, rcutorture relies on either "null" or all zeroes to identify the last few statistics printouts at the end of the test. These need to be identified because failing to do so will results in false-positive complaints about grace-period hangs. This commit therefore prints the "ver:" in capitals ("VER:") when the RCU-protected pointer has been set to NULL, which causes rcutorture's parse-console.sh script to correctly ignore these lines. Signed-off-by: Paul E. McKenney kernel/rcu/rcutorture.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8997e6311ed6cb95be34409bc6b4a11c7a84ac35 Author: Paul E. McKenney Date: Wed May 22 08:52:18 2019 -0700 torture: Suppress propagating trace_printk() warning When trace_printk() is used, a message including "BUG" is printed to the console, which fools the rcutorture scripting into believing that the corresponding test scenario failed. This commit therefore filters out this particular instance of "BUG", thus avoiding the false-positive test-failure report. Signed-off-by: Paul E. McKenney tools/testing/selftests/rcutorture/bin/parse-console.sh | 1 + 1 file changed, 1 insertion(+) commit 34aa34b818407bd475786cf160f7838b7a485e87 Author: Paul E. McKenney Date: Thu May 16 16:15:16 2019 -0700 rcutorture: Dump trace buffer for callback pipe drain failures Signed-off-by: Paul E. McKenney kernel/rcu/rcutorture.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit b93c765fda30cadae6aafb9d32a30f9391dc0b41 Author: Paul E. McKenney Date: Sat May 11 20:18:00 2019 -0700 torture: Add --trust-make to suppress "make clean" The current rcutorture scripts unconditionally do "make clean", which is a good way of getting the needed testing done despite any imperfections in Makefile dependency tracking. However, this can be a bit irritating when repeatedly running a single scenario after small changes, for example, when debugging a problem that affects only a single scenario. This commit therefore adds a --trust-make argument that suppresses the "make clean". Even when using ccache, this speeds up kernel builds by up to almost an order of magnitude on my laptop. Reported-by: Peter Zijlstra Signed-off-by: Paul E. McKenney tools/testing/selftests/rcutorture/bin/configinit.sh | 5 ++++- tools/testing/selftests/rcutorture/bin/kvm.sh | 6 ++++++ tools/testing/selftests/rcutorture/bin/parse-build.sh | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) commit 7225c0777271bb489ad6fb095aa10985ad138a81 Author: Paul E. McKenney Date: Sat May 11 17:59:52 2019 -0700 torture: Make --cpus override idleness calculations Currently, rcutorture will use relatively few CPUs to build the kernel on a busy system, which is often as it should be. However, if the user has used the --cpus argument to dedicate a specified number of CPUs to this torture test, it would be good if the kernel build also made use of them. This commit therefore changes the cpus2use.sh script to use --cpus when specified and to do the idleness calculations otherwise. Signed-off-by: Paul E. McKenney tools/testing/selftests/rcutorture/bin/cpus2use.sh | 5 +++++ tools/testing/selftests/rcutorture/bin/kvm.sh | 3 +++ 2 files changed, 8 insertions(+) commit 6dc82595ef0839a45c26075612f304979b6c92c2 Author: Paul E. McKenney Date: Fri May 10 21:31:52 2019 -0700 torture: Run kernel build in source directory For historical reasons, rcutorture places its build products in a tools/testing/selftests/rcutorture/b1 directory using the O= kbuild command-line argument. However, doing this requires that the source directory be pristine: Not just "make clean" pristine, but instead "make mrproper" (or, equivalently, "make distclean") pristine. Therefore, rcutorture executes a "make mrproper" before each build. Unfortunately, "make mrproper" has the side effect of removing pretty much everything, including tags files and cscope databases, which can be inconvenient to people whose workflow centers around a single source tree. This commit therefore makes rcutorture do the build directly in the source directory, removing the need for "make mrproper". This works because all needed build products are moved to their proper place in the "res" directory immediately after the build completes, so that multiple rcutorture kernels can still run concurrently. Reported-by: Peter Zijlstra Signed-off-by: Paul E. McKenney .../testing/selftests/rcutorture/bin/configinit.sh | 36 ++++++---------------- .../testing/selftests/rcutorture/bin/kvm-build.sh | 9 +++--- .../selftests/rcutorture/bin/kvm-test-1-run.sh | 21 +++++-------- tools/testing/selftests/rcutorture/bin/kvm.sh | 3 +- 4 files changed, 22 insertions(+), 47 deletions(-) commit cd6cb7c8a509b1e785fa67e2eb6bd5003198ac39 Author: Paul E. McKenney Date: Wed May 1 13:26:11 2019 -0700 torture: Add function graph-tracing cheat sheet Signed-off-by: Paul E. McKenney tools/testing/selftests/rcutorture/bin/kvm.sh | 2 ++ 1 file changed, 2 insertions(+) commit 7dedfd4335f7b795d12191d03626212ff71e52aa Author: Paul E. McKenney Date: Wed Apr 24 04:39:10 2019 -0700 torture: Capture qemu output Currently qemu output appears on standard output, but is inaccessible later on. This commit therefore captures this output and causes kvm-recheck.sh to output this output if QEMU gave a non-zero non-137 exit code. (And exit code of 137 indicates that QEMU was killed, in which case we want to know about the hang rather than the fact that QEMU was killed.) Signed-off-by: Paul E. McKenney tools/testing/selftests/rcutorture/bin/kvm-recheck.sh | 10 +++++++++- tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) commit a6fda6dab93c2c06ef4b8cb4b9258df6674d2438 Author: Sebastian Andrzej Siewior Date: Wed Apr 24 09:34:46 2019 +0200 rcutorture: Tweak kvm options In one of my rcutorture tests the TSC clocksource got marked unstable due to a large difference in the TSC value. I'm not sure if the guest run for a long time with disabled interrupts or if the host was very busy and didn't schedule the guest for some time. I took a look on the qemu/KVM options and decided to update the options: - Use kvm{32|64} as CPU. We could probably use `host' (like ARM does) for maximum available features but since we don't run any userland I'm not sure if it makes any difference. - Drop the "noapic" option. There is no history why the APIC was disabled, I see no reason for it. Once old qemu versions fade away, we can add "x2apic=on,tsc-deadline=on,hypervisor=on,tsc_adjust=on". - Additional config options. It ensures that the kernel knowns that it runs as a kvm guest and can use virt devices like the kvm-clock as clocksource. The kvm-clock was the main motivation here. - I didn't add a random HW device. It would make the random device ready earlier (not it doesn't complete the initialisation at all) but I doubt that there is any need for this. Signed-off-by: Sebastian Andrzej Siewior [ paulmck: The world is not quite ready for CONFIG_PARAVIRT_SPINLOCKS=y and x2apic, so they are omitted for the time being. ] Signed-off-by: Paul E. McKenney tools/testing/selftests/rcutorture/bin/functions.sh | 13 ++++++++++++- tools/testing/selftests/rcutorture/configs/rcu/CFcommon | 3 +++ 2 files changed, 15 insertions(+), 1 deletion(-) commit c682db558e6eec10a711b0a6bcb8c35fd15f6a39 Author: Paul E. McKenney Date: Fri Apr 19 07:38:27 2019 -0700 rcutorture: Add trivial RCU implementation I have been showing off a trivial RCU implementation for non-preemptive environments for some time now: #define rcu_read_lock() #define rcu_read_unlock() #define rcu_dereference(p) READ_ONCE(p) #define rcu_assign_pointer(p, v) smp_store_release(&(p), (v)) void synchronize_rcu(void) { int cpu; for_each_online_cpu(cpu) sched_setaffinity(current->pid, cpumask_of(cpu)); } Trivial or not, as the old saying goes, "if it ain't tested, it don't work!". This commit therefore adds a "trivial" flavor to rcutorture and a corresponding TRIVIAL test scenario. This variant does not handle CPU hotplug, which is unconditionally enabled on x86 for post-v5.1-rc3 kernels, which is why the TRIVIAL.boot says "rcutorture.onoff_interval=0". This commit actually does handle CONFIG_PREEMPT=y kernels, but only because it turns back the Linux-kernel clock in order to provide these alternative definitions (or the moral equivalent thereof): #define rcu_read_lock() preempt_disable() #define rcu_read_unlock() preempt_enable() In CONFIG_PREEMPT=n kernels without debugging, these are equivalent to empty macros give or take a compiler barrier. However, the have been successfully tested with actual empty macros as well. Signed-off-by: Paul E. McKenney [ paulmck: Fix symbol issue reported by kbuild test robot . ] [ paulmck: Work around sched_setaffinity() issue noted by Andrea Parri. ] [ paulmck: Add rcutorture.shuffle_interval=0 to TRIVIAL.boot to fix interaction with shuffler task noted by Peter Zijlstra. ] Tested-by: Andrea Parri kernel/rcu/rcu.h | 5 +++ kernel/rcu/rcutorture.c | 45 +++++++++++++++++++++- kernel/rcu/update.c | 13 +++++++ .../selftests/rcutorture/configs/rcu/TRIVIAL | 14 +++++++ .../selftests/rcutorture/configs/rcu/TRIVIAL.boot | 3 ++ 5 files changed, 79 insertions(+), 1 deletion(-) commit 3432d765c59ba026de49bd4f1f0c2adeff0e7a16 Author: Paul E. McKenney Date: Mon Apr 15 14:50:05 2019 -0700 rcutorture: Halt forward-progress checks at end of run Once removed, an rcu_torture element can be deferred-freed by a chain of call_rcu() invocations, with each callback invoking another round of call_rcu() until either a fixed number of call_rcu() invocations have been chained or until the test ends. This means that if the test ends, some of the rcu_torture elements will be "stranded" partway through the deferred-free process, which results in false-positive warnings from rcu_torture_writer() due to lack of forward progress should the test end just at the end of a stutter interval. This commit therefore suppresses rcu_torture_writer()'s forward-progress checks when the test ends in order to avoid these false-positive reports.. Reported-by: Sebastian Andrzej Siewior Signed-off-by: Paul E. McKenney kernel/rcu/rcutorture.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ab21f6081f7bc09a0918ef888de795d59a907c1a Author: Paul E. McKenney Date: Sun Apr 14 18:30:22 2019 -0700 rcutorture: Give the scheduler a chance on PREEMPT && NO_HZ_FULL kernels In !PREEMPT kernels, cond_resched() is a no-op. In NO_HZ_FULL kernels, in-kernel execution (such as that of rcutorture's kthreads) might extend indefinitely without the scheduler gaining the aid of a scheduling-clock interrupt. This combination can make the interaction of an rcutorture forward-progress test and a CPU-hotplug stop_machine operation make less forward progress than one might like. Additionally, Sebastian Siewior notes that NO_HZ_FULL kernels have a scheduler check upon return to userspace execution, which suggests that in-kernel emulation of tight userspace loops containing system calls doing call_rcu() might also need explicit checks in the PREEMPT && NO_HZ_FULL case. This commit therefore introduces a rcu_torture_fwd_prog_cond_resched() function that explicitly invokes schedule() in such kernels whenever need_resched() returns true, while retaining use of cond_resched() for kernels that are either !PREEMPT or !NO_HZ_FULL. Signed-off-by: Paul E. McKenney kernel/rcu/rcutorture.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit 52b23be7ee023d7f1b67e7a20443ef352c7b5d2d Author: Paul E. McKenney Date: Sat Apr 13 15:41:49 2019 -0700 rcutorture: Exempt TREE01 from forward-progress testing Because TREE01 can end up running more vCPUs that physical CPUs, hammering these shortchanged CPUs with tight loops containing call_rcu() invocations seems a bit like overkill. This commit therefore exempts TREE01 from rcutorture's forward-progress testing. Signed-off-by: Paul E. McKenney tools/testing/selftests/rcutorture/configs/rcu/TREE01.boot | 1 + 1 file changed, 1 insertion(+) commit 5eabea594b4ce9ba0fbd8618bd3bf01aa9f48af7 Author: Paul E. McKenney Date: Fri Apr 12 09:02:46 2019 -0700 rcutorture: Exempt tasks RCU from timely draining of grace periods After the end of each stutter pause interval, the rcu_torture_writer() kthread checks to be sure that all prior callbacks have completed so that all the test structures have been freed. This works fine except for tasks RCU, in which grace periods can take one good long time. This commit therefore exempts tasks RCU from this check. Signed-off-by: Paul E. McKenney kernel/rcu/rcutorture.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 2456a8562b296453b4cdce8b6928e3f91e39fefc Author: Paul E. McKenney Date: Thu Apr 11 14:51:13 2019 -0700 rcutorture: Provide rudimentary Makefile This commit provides a rudimentary Makefile that runs a 10-minute rcutorture test on scenario TREE01. This must be run on a system capable of spawning virtual machines and with everything installed to permit building Linux kernels. Reported-by: Shuah Khan Signed-off-by: Paul E. McKenney tools/testing/selftests/rcutorture/Makefile | 3 +++ 1 file changed, 3 insertions(+) commit 63b29eaed6f57c27639b2954ac1f202409840abf Author: Paul E. McKenney Date: Thu Apr 11 13:31:57 2019 -0700 torture: Make kvm-find-errors.sh and kvm-recheck.sh provide exit status This commit causes both kvm-find-errors.sh and kvm-recheck.sh to provide an exit status based on whether or not errors were located. In the case of kvm-recheck.sh, this will be the error status of the last run. This change allows these commands to be used in scripting and Makefiles to automatically report failed rcutorture runs. Signed-off-by: Paul E. McKenney tools/testing/selftests/rcutorture/bin/kvm-find-errors.sh | 3 +++ tools/testing/selftests/rcutorture/bin/kvm-recheck.sh | 3 +++ 2 files changed, 6 insertions(+) commit ff3bf92d90d396e51eb78c5ecde11a994ab7a179 Author: Paul E. McKenney Date: Tue Apr 9 14:44:49 2019 -0700 torture: Allow inter-stutter interval to be specified Currently, the inter-stutter interval is the same as the stutter duration, that is, whatever number of jiffies is passed into torture_stutter_init(). This has worked well for quite some time, but the addition of forward-progress testing to rcutorture can delay processes for several seconds, which can triple the time that they are stuttered. This commit therefore adds a second argument to torture_stutter_init() that specifies the inter-stutter interval. While locktorture preserves the current behavior, rcutorture uses the RCU CPU stall warning interval to provide a wider inter-stutter interval. Signed-off-by: Paul E. McKenney include/linux/torture.h | 2 +- kernel/locking/locktorture.c | 2 +- kernel/rcu/rcutorture.c | 5 ++++- kernel/torture.c | 6 ++++-- 4 files changed, 10 insertions(+), 5 deletions(-) commit e8516c64fe97e27a28fd5bc65b616508ae0020cf Author: Paul E. McKenney Date: Tue Apr 9 11:06:32 2019 -0700 rcutorture: Fix stutter_wait() return value and freelist checks The stutter_wait() function is supposed to return true if it actually waits and false otherwise, but it instead unconditionally returns false. Which hides a bug in rcu_torture_writer() that fails to account for the fact that one of the rcu_tortures[] array elements will normally be referenced by rcu_torture_current, and thus not be on the freelist. This commit therefore corrects the stutter_wait() return value and adds a check for rcu_torture_current to rcu_torture_writer()'s check that things get freed after everything goes quiescent. In addition, this commit causes torture_stutter() to give a bit more than one second (instead of only one jiffy) warning of the end of the stutter interval. Finally, this commit disables long-delay readers and aggressive update-side forward-progress checks while forward-progress testing is in flight. Reported-by: Sebastian Andrzej Siewior Signed-off-by: Paul E. McKenney kernel/rcu/rcutorture.c | 16 ++++++++++++---- kernel/torture.c | 17 +++++++++++++---- 2 files changed, 25 insertions(+), 8 deletions(-) commit 140e53f20b159722903f0c87358bcd809aa9767e Author: Paul E. McKenney Date: Tue Apr 9 10:08:18 2019 -0700 rcutorture: Add cond_resched() to forward-progress free-up loop The rcu_torture_fwd_prog_cbfree() function frees callbacks used during rcutorture's call_rcu() forward-progress test, but does so in a tight loop. This could cause problems given a very long list of callbacks to be freed, and actual testing produces lists with as many as 25M callbacks. This commit therefore adds a cond_resched() to this loop. While in the area, this commit also rearranges the lock releases to look a bit more sane. Signed-off-by: Paul E. McKenney kernel/rcu/rcutorture.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit dd064c35991435efc4da2a6c551601f6e80f2611 Author: Joel Fernandes (Google) Date: Tue Mar 26 15:24:11 2019 -0400 rcutorture: Add cpu0 to the set of CPUs to add jitter jitter.sh currently does not add CPU0 to the list of CPUs for adding of jitter. Let us add it to this list even when it is not hot-pluggable. Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney tools/testing/selftests/rcutorture/bin/jitter.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit e0e2147c1a6a722f6b2e359c5132a825ecb8a420 Author: Joel Fernandes (Google) Date: Tue Mar 26 15:24:10 2019 -0400 rcutorture: Select from only online CPUs The rcutorture jitter.sh script selects a random CPU but does not check if it is offline or online. This leads to taskset errors many times. On my machine, hyper threading is disabled so half the cores are offline causing taskset errors a lot of times. Let us fix this by checking from only the online CPUs on the system. Cc: rcu@vger.kernel.org Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney tools/testing/selftests/rcutorture/bin/jitter.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 89da3b94bb97417ca2c5b0ce3a28643819030247 Author: Oleg Nesterov Date: Thu Apr 25 18:50:55 2019 +0200 rcu/sync: Simplify the state machine With this patch rcu_sync has a single state variable and the transition rules become really simple: GP_IDLE - owned by the first rcu_sync_enter() which moves it to GP_ENTER - owned by rcu-callback which moves it to GP_PASSED - owned by the last rcu_sync_exit() which moves it to GP_EXIT - and this is the only "nontrivial" state. rcu-callback moves it back to GP_IDLE unless another enter() comes before a GP pass. If rcu-callback is invoked before the next rcu_sync_exit() it must see gp_count incremented by that enter() and set GP_PASSED. Otherwise, if the next rcu_sync_exit() wins the race, it will move it to GP_REPLAY - owned by rcu-callback which moves it to GP_EXIT Signed-off-by: Oleg Nesterov [ paulmck: While here, apply READ_ONCE() and WRITE_ONCE() to ->gp_state. ] [ paulmck: Tweaks to make htmldocs happy. (Reported by kbuild test robot.) ] Signed-off-by: Paul E. McKenney include/linux/rcu_sync.h | 4 +- kernel/rcu/sync.c | 165 +++++++++++++++++++++++++++-------------------- 2 files changed, 96 insertions(+), 73 deletions(-) commit 3f2947b78151ec938dc06aea4ba0e11e56becdff Author: Oleg Nesterov Date: Tue Apr 23 18:32:41 2019 +0200 locking/percpu-rwsem: Add DEFINE_PERCPU_RWSEM(), use it to initialize cgroup_threadgroup_rwsem Turn DEFINE_STATIC_PERCPU_RWSEM() into __DEFINE_PERCPU_RWSEM() with the additional "is_static" argument to introduce DEFINE_PERCPU_RWSEM(). Change cgroup.c to use DEFINE_PERCPU_RWSEM(cgroup_threadgroup_rwsem). Signed-off-by: Oleg Nesterov Reviewed-by: Ingo Molnar Signed-off-by: Paul E. McKenney include/linux/percpu-rwsem.h | 8 ++++++-- kernel/cgroup/cgroup.c | 3 +-- 2 files changed, 7 insertions(+), 4 deletions(-) commit 2bf1acc299c9757932ef8c6edfaacca6d08302b1 Author: Oleg Nesterov Date: Tue Apr 23 17:21:02 2019 +0200 uprobes: Use DEFINE_STATIC_PERCPU_RWSEM() to initialize dup_mmap_sem Use DEFINE_STATIC_PERCPU_RWSEM() to initialize dup_mmap_sem. Signed-off-by: Oleg Nesterov Reviewed-by: Ingo Molnar Signed-off-by: Paul E. McKenney kernel/events/uprobes.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 95bf33b55ff4465399bad843f1d8d618c8baf1f3 Author: Oleg Nesterov Date: Tue Apr 23 14:07:24 2019 +0200 rcu/sync: Kill rcu_sync_type/gp_type Now that the RCU flavors have been consolidated, rcu_sync_type makes no sense because none of internal update functions aside from .held() depend on gp_type. This commit therefore removes this field and consolidates the relevant code. Signed-off-by: Oleg Nesterov [ paulmck: Added RCU and RCU-bh checks to rcu_sync_is_idle(). ] [ paulmck: And applied subsequent feedback from Oleg Nesterov. ] Signed-off-by: Paul E. McKenney include/linux/percpu-rwsem.h | 2 +- include/linux/rcu_sync.h | 36 ++++++++-------------------- kernel/locking/percpu-rwsem.c | 2 +- kernel/rcu/sync.c | 55 ++++--------------------------------------- 4 files changed, 17 insertions(+), 78 deletions(-) commit 11b000457f4638cf2a9e6794d31636d2d3174842 Author: Jiang Biao Date: Tue Apr 23 09:22:56 2019 +0800 rcu: Make __call_srcu static Because __call_srcu() is not used outside kernel/rcu/srcutree.c, this commit makes it static. Signed-off-by: Jiang Biao Signed-off-by: Paul E. McKenney kernel/rcu/srcutree.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 056b89e7e699742cc060ce722d3f26effe51b4aa Author: Joel Fernandes (Google) Date: Thu Apr 11 16:24:21 2019 -0400 module: Make srcu_struct ptr array as read-only Since commit title ("srcu: Allocate per-CPU data for DEFINE_SRCU() in modules"), modules that call DEFINE_{STATIC,}SRCU will have a new array of srcu_struct pointers, which is used by srcu code to initialize and clean up these structures and save valuable per-cpu reserved space. There is no reason for this array of pointers to be writable, and can cause security or other hidden bugs. Mark these are read-only after the module init has completed. Tested with the following diff to ensure array not writable: (diff is a bit reduced to avoid patch command getting confused) a/kernel/module.c b/kernel/module.c -3506,6 +3506,14 static noinline int do_init_module [snip] rcu_assign_pointer(mod->kallsyms, &mod->core_kallsyms); #endif module_enable_ro(mod, true); + + if (mod->srcu_struct_ptrs) { + // Check if srcu_struct_ptrs access is possible + char x = *(char *)mod->srcu_struct_ptrs; + *(char *)mod->srcu_struct_ptrs = 0; + *(char *)mod->srcu_struct_ptrs = x; + } + mod_tree_remove_init(mod); disable_ro_nx(&mod->init_layout); module_arch_freeing_init(mod); Cc: Rasmus Villemoes Cc: paulmck@linux.vnet.ibm.com Cc: rostedt@goodmis.org Cc: mathieu.desnoyers@efficios.com Cc: rcu@vger.kernel.org Cc: kernel-hardening@lists.openwall.com Cc: kernel-team@android.com Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney include/linux/srcutree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 54e6c11b9e74fd780e52f95c3eed313e0f4e6b7e Author: Joel Fernandes (Google) Date: Sun Apr 7 20:47:19 2019 -0400 srcu: Remove unused vmlinux srcu linker entries The SRCU for modules optimization (commit title "srcu: Allocate per-CPU data for DEFINE_SRCU() in modules") introduced vmlinux linker entries which is unused since it applies only to the built-in vmlinux. So remove it to prevent any space usage due to the 8 byte alignment it added. vmlinux.lds.h has no effect on module loading and is not used for building the module object, so the changes were not needed in the first place since the optimization is specific to modules. Tested with SRCU torture_type and rcutorture. Put prints in module loader to confirm it is able to find and initialize the srcu structures. Cc: Josh Triplett Cc: Steven Rostedt Cc: Mathieu Desnoyers Cc: Lai Jiangshan Cc: kernel-team@android.com Cc: paulmck@linux.vnet.ibm.com Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney include/asm-generic/vmlinux.lds.h | 4 ---- 1 file changed, 4 deletions(-) commit fe15b50cdeeebd9248bf27e3c31278668f08bc04 Author: Paul E. McKenney Date: Fri Apr 5 16:15:00 2019 -0700 srcu: Allocate per-CPU data for DEFINE_SRCU() in modules Adding DEFINE_SRCU() or DEFINE_STATIC_SRCU() to a loadable module requires that the size of the reserved region be increased, which is not something we want to be doing all that often. One approach would be to require that loadable modules define an srcu_struct and invoke init_srcu_struct() from their module_init function and cleanup_srcu_struct() from their module_exit function. However, this is more than a bit user unfriendly. This commit therefore creates an ___srcu_struct_ptrs linker section, and pointers to srcu_struct structures created by DEFINE_SRCU() and DEFINE_STATIC_SRCU() within a module are placed into that module's ___srcu_struct_ptrs section. The required init_srcu_struct() and cleanup_srcu_struct() functions are then automatically invoked as needed when that module is loaded and unloaded, thus allowing modules to continue to use DEFINE_SRCU() and DEFINE_STATIC_SRCU() while avoiding the need to increase the size of the reserved region. Many of the algorithms and some of the code was cheerfully cherry-picked from other code making use of linker sections, perhaps most notably from tracepoints. All bugs are nevertheless the sole property of the author. Suggested-by: Mathieu Desnoyers [ paulmck: Use __section() and use "default" in srcu_module_notify()'s "switch" statement as suggested by Joel Fernandes. ] Signed-off-by: Paul E. McKenney Tested-by: Joel Fernandes (Google) include/asm-generic/vmlinux.lds.h | 4 +++ include/linux/module.h | 5 +++ include/linux/srcutree.h | 14 +++++++-- kernel/module.c | 5 +++ kernel/rcu/srcutree.c | 65 +++++++++++++++++++++++++++++++++++++++ 5 files changed, 90 insertions(+), 3 deletions(-) commit 714b6904e23e1c37f262a4cd02b34d0f1863e227 Author: Paul E. McKenney Date: Thu Apr 11 07:12:18 2019 -0700 doc: Remove ".vnet" from paulmck email addresses Signed-off-by: Paul E. McKenney Documentation/core-api/circular-buffers.rst | 2 +- Documentation/memory-barriers.txt | 2 +- Documentation/translations/ko_KR/memory-barriers.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit d5a9a8c3bc8068f2e5dfba30150ac09b596b461a Author: Paul E. McKenney Date: Wed Apr 10 17:01:39 2019 -0700 rcu: Set a maximum limit for back-to-back callback invocation Currently, if a CPU has more than 10,000 callbacks pending, it will increase rdp->blimit to LONG_MAX. If you are lucky, LONG_MAX is only about two billion, but this is still a bit too many callbacks to invoke back-to-back while otherwise ignoring the world. This commit therefore sets a maximum limit of DEFAULT_MAX_RCU_BLIMIT, which is set to 10,000, for rdp->blimit. Reported-by: Sebastian Andrzej Siewior Signed-off-by: Paul E. McKenney kernel/rcu/tree.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 12edff045bc6dd3ab1565cc02fa4841803c2a633 Author: Paul E. McKenney Date: Tue Apr 9 07:48:18 2019 -0700 rcu: Make kfree_rcu() ignore NULL pointers This commit makes the kfree_rcu() macro's semantics be consistent with the likes of kfree() by adding a check for NULL pointers, so that kfree_rcu(NULL, ...) is a no-op. Reported-by: Andriy Shevchenko Reported-by: Christoph Hellwig Signed-off-by: Paul E. McKenney Reviewed-by: Andriy Shevchenko include/linux/rcupdate.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 3ae976a7e3e87438b8439a01aeb79d4866b1c444 Author: Neeraj Upadhyay Date: Fri Mar 29 16:57:08 2019 +0530 rcu: Correctly unlock root node in rcu_check_gp_start_stall() On systems whose rcu_node tree has only one node, the rcu_check_gp_start_stall() function's values of rnp and rnp_root will be identical. In this case, it clearly does not make sense to release both rnp->lock and rnp_root->lock, but that is exactly what this function does in the last early exit. This commit therefore unlocks only rnp->lock when rnp and rnp_root are equal. Signed-off-by: Neeraj Upadhyay Reviewed-by: Mukesh Ojha Signed-off-by: Paul E. McKenney kernel/rcu/tree_stall.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit cd6d17b4a4646d4bf2568f3a4de13a5a13e2ed28 Author: Neeraj Upadhyay Date: Fri Mar 29 15:25:52 2019 +0530 rcu: Dump specified number of blocked tasks The dump_blkd_tasks() function dumps at most 10 blocked tasks, ignoring the value of the ncheck parameter. This commit therefore substitutes the value of ncheck for the hard-coded value of 10. Because all callers currently pass 10 as the number, this patch does not change behavior, but it is clearly an accident waiting to happen. Signed-off-by: Neeraj Upadhyay Reviewed-by: Mukesh Ojha Signed-off-by: Paul E. McKenney kernel/rcu/tree_plugin.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 588759a39145e18dd808341861d45d44383778b5 Author: Zhenzhong Duan Date: Sun Apr 14 11:11:03 2019 +0800 doc: Fixup definition of rcupdate.rcu_task_stall_timeout A positive value of rcupdate.rcu_task_stall_timeout is an interval in seconds rather than jiffies. Signed-off-by: Zhenzhong Duan Signed-off-by: Paul E. McKenney Documentation/RCU/stallwarn.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit de1dbcee433ccff3e0a37698c65b40542c9d4cf1 Author: Joel Fernandes (Google) Date: Fri Mar 29 10:05:55 2019 -0400 doc/rcuref: Document real world examples in kernel Document similar real world examples in the kernel corresponding to the second and third code snippets. Also correct an issue in release_referenced() in the code snippet example. Cc: oleg@redhat.com Cc: jannh@google.com Signed-off-by: Joel Fernandes (Google) [ paulmck: Do a bit of wordsmithing. ] Signed-off-by: Paul E. McKenney Documentation/RCU/rcuref.txt | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) commit 7b7c5676a877c4e66083888d87d52e4a0d0c2e82 Author: Biju Das Date: Thu May 16 09:59:26 2019 +0100 arm64: dts: renesas: cat874: Add BT support This patch enables BT support for the CAT874 board. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a774c0-cat874.dts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit b263b0067d727ffb230bd8ac75a6a3f9ff448f0f Author: Biju Das Date: Thu May 16 09:59:25 2019 +0100 arm64: dts: renesas: cat874: Add WLAN support This patch enables WLAN support for the CAT874 board. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a774c0-cat874.dts | 38 +++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit b20eb4c1f0261eebe6e1b9221c0d6e4048837778 Author: Bartosz Golaszewski Date: Mon May 20 09:10:42 2019 +0200 eeprom: at24: drop unnecessary label If we move the nvmem registration above the pm enable calls and the test read, we can drop the error label and make the code more readable as there's now only a single place where we must call pm_runtime_disable() in error path. Signed-off-by: Bartosz Golaszewski drivers/misc/eeprom/at24.c | 43 ++++++++++++++++++------------------------- 1 file changed, 18 insertions(+), 25 deletions(-) commit e7308628d0ae5c90d2895d0f3e6030c390431ca6 Author: Bartosz Golaszewski Date: Mon May 20 09:10:41 2019 +0200 eeprom: at24: use devm_i2c_new_dummy_device() Now that it's upstream, use the resource managed version of i2c_new_dummy_device(). Signed-off-by: Bartosz Golaszewski Reviewed-by: Wolfram Sang drivers/misc/eeprom/at24.c | 38 +++++++++----------------------------- 1 file changed, 9 insertions(+), 29 deletions(-) commit f0b635627395223d3c60a3105372b4349e04772f Author: Jiang Biao Date: Tue Apr 23 09:21:55 2019 +0800 rcu: Remove unused rdp local from synchronize_rcu_expedited() Because rdp is initialized but never used in synchronize_rcu_expedited(), this commit removes it. Signed-off-by: Jiang Biao Signed-off-by: Paul E. McKenney kernel/rcu/tree_exp.h | 2 -- 1 file changed, 2 deletions(-) commit 1bb336443cde1154600bd147a45a30baa59c57db Author: Paul E. McKenney Date: Wed Mar 27 15:51:25 2019 -0700 rcu: Rename rcu_data's ->deferred_qs to ->exp_deferred_qs The rcu_data structure's ->deferred_qs field is used to indicate that the current CPU is blocking an expedited grace period (perhaps a future one). Given that it is used only for expedited grace periods, its current name is misleading, so this commit renames it to ->exp_deferred_qs. Signed-off-by: Paul E. McKenney kernel/rcu/tree.h | 2 +- kernel/rcu/tree_exp.h | 8 ++++---- kernel/rcu/tree_plugin.h | 14 +++++++------- 3 files changed, 12 insertions(+), 12 deletions(-) commit eddded80121f2a7bda810f65bf7cb648a709ed11 Author: Joel Fernandes (Google) Date: Tue Mar 26 15:24:09 2019 -0400 rcu: Add checks for dynticks counters in rcu_is_cpu_rrupt_from_idle() It would be good to combine the dynticks and dynticks_nesting counters in order to simplify the code. Unfortunately, there are concerns about usermode upcalls appearing to RCU as half of an interrupt, as Byungchul learned [1]. The "half" in "half interrupt" is due to an unpaired rcu_irq_enter(): Normally, each rcu_irq_enter() has a later call to rcu_irq_exit(). Out of an abundance of caution, Paul added warnings [2] in the RCU code which if not fired by 2021 will be interpreted as meaning that this half-interrupt scenario cannot happen any more, thus permitting simplification of this code. In the meantime, this commit makes the following changes: (1) Combining these two counters requires that rcu_rrupt_from_idle() is invoked only from hard-interrupt contexts as discussed here [3]. This commit therefore adds the required lockdep_assert_in_irq() to check this constraint. (2) Furthermore, rcu_rrupt_from_idle() is not explicit about how it is using the counters which can lead to weird future bugs. This commit therefore adds comments indicating the meaning and use of each counter. (3) Lastly, this commit checks for counter underflows as another check that half interrupts don't occur. (Previously, the function would simply return true upon underflow.) All these checks checks are NOOPs if PROVE_LOCKING (and thus PROVE_RCU) are disabled. [1] https://lore.kernel.org/patchwork/patch/952349/ [2] Commit e11ec65cc8d6 ("rcu: Add warning to detect half-interrupts") [3] https://lore.kernel.org/lkml/20190312150514.GB249405@google.com/ Cc: byungchul.park@lge.com Cc: kernel-team@android.com Cc: rcu@vger.kernel.org Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney kernel/rcu/tree.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit 715ed72801ff4d0dd9938e36513a01a57e13740a Author: Geert Uytterhoeven Date: Mon May 27 14:40:51 2019 +0200 gpio: em: Return early on error in em_gio_probe() em_gio_probe() uses managed initializations for everything but creating the IRQ domain. Hence in most failure cases, no cleanup needs to be performed at all. Make this clearer for the casual reviewer by returning early, instead of jumping to an out-of-sight label. Signed-off-by: Geert Uytterhoeven Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-em.c | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) commit 4c411ce35b866a351bca76b1d853eabdfa58998e Author: Geert Uytterhoeven Date: Mon May 27 14:40:50 2019 +0200 gpio: em: Remove error messages on out-of-memory conditions There is no need to print error messages when memory allocations or related operations fail, as the core will take care of that. Change the returned error codes to -ENOMEM to match the failure cause while at it. Signed-off-by: Geert Uytterhoeven Signed-off-by: Bartosz Golaszewski drivers/gpio/gpio-em.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 1e0566fd4a81bac04aed6af818e6938e6c71d389 Merge: 2c41cc0be07b cd6c84d8f0cd Author: Mauro Carvalho Chehab Date: Tue May 28 11:21:51 2019 -0400 Merge tag 'v5.2-rc2' into patchwork Merge back from upstream into media tree, as there are some patches merged upstream that has pontential of causing conflicts (one actually rised a conflict already). Linux 5.2-rc2 * tag 'v5.2-rc2': (377 commits) Linux 5.2-rc2 random: fix soft lockup when trying to read from an uninitialized blocking pool tracing: Silence GCC 9 array bounds warning ext4: fix dcache lookup of !casefolded directories locking/lock_events: Use this_cpu_add() when necessary KVM: x86: fix return value for reserved EFER tools/kvm_stat: fix fields filter for child events KVM: selftests: Wrap vcpu_nested_state_get/set functions with x86 guard kvm: selftests: aarch64: compile with warnings on kvm: selftests: aarch64: fix default vm mode kvm: selftests: aarch64: dirty_log_test: fix unaligned memslot size KVM: s390: fix memory slot handling for KVM_SET_USER_MEMORY_REGION KVM: x86/pmu: do not mask the value that is written to fixed PMUs KVM: x86/pmu: mask the result of rdpmc according to the width of the counters x86/kvm/pmu: Set AMD's virt PMU version to 1 KVM: x86: do not spam dmesg with VMCS/VMCB dumps kvm: Check irqchip mode before assign irqfd kvm: svm/avic: fix off-by-one in checking host APIC ID KVM: selftests: do not blindly clobber registers in guest asm KVM: selftests: Remove duplicated TEST_ASSERT in hyperv_cpuid.c ... commit 0031e38adf38779acce5737f4905b9f60750b674 Author: Alan Stern Date: Mon Apr 22 12:18:09 2019 -0400 tools/memory-model: Add data-race detection This patch adds data-race detection to the Linux-Kernel Memory Model. As part of this effort, support is added for: compiler barriers (the barrier() function), and a new Preserved Program Order term: (addr ; [Plain] ; wmb) Data races are marked with a special Flag warning in herd. It is not guaranteed that the model will provide accurate predictions when a data race is present. The patch does not include documentation for the data-race detection facility. The basic design has been explained in various emails, and a separate documentation patch will be submitted later. This work is based on an earlier formulation of data races for the LKMM by Andrea Parri. Signed-off-by: Alan Stern Reviewed-by: Andrea Parri Signed-off-by: Paul E. McKenney tools/memory-model/linux-kernel.bell | 1 + tools/memory-model/linux-kernel.cat | 50 +++++++++++++++++++++++++++++++++++- tools/memory-model/linux-kernel.def | 1 + 3 files changed, 51 insertions(+), 1 deletion(-) commit d1a84ab190137cc2a980b6979b1f2790d51b2d87 Author: Alan Stern Date: Mon Apr 22 12:17:58 2019 -0400 tools/memory-model: Add definitions of plain and marked accesses This patch adds definitions for marked and plain accesses to the Linux-Kernel Memory Model. It also modifies the definitions of the existing parts of the model (including the cumul-fence, prop, hb, pb, and rb relations) so as to make them apply only to marked accesses. Signed-off-by: Alan Stern Reviewed-by: Andrea Parri Signed-off-by: Paul E. McKenney tools/memory-model/linux-kernel.bell | 5 +++++ tools/memory-model/linux-kernel.cat | 16 +++++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) commit 4494dd58fbb477e54c129c1d8ef477aad433eba0 Author: Alan Stern Date: Mon Apr 22 12:17:45 2019 -0400 tools/memory-model: Prepare for data-race detection This patch makes some slight alterations to linux-kernel.cat in preparation for adding support for data-race detection to the Linux-Kernel Memory Model. The definitions of relations involved in Acquire, Release, and unlock-lock ordering are moved up earlier in the source file. The rmb relation is factored through the new R4rmb class: the class of reads to which rmb will apply. The definition of the fence relation is moved earlier, and it is split up into read- and write-fences (rmb and wmb) and all the others. This should not make any functional changes. Signed-off-by: Alan Stern Reviewed-by: Andrea Parri Signed-off-by: Paul E. McKenney tools/memory-model/linux-kernel.cat | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit cb23eae3ecf5bd0eb94b0fdcc94ad95d3cb30796 Author: Sam Ravnborg Date: Sun May 26 20:05:32 2019 +0200 drm/panel: drop drmP.h usage Drop use of the deprecated drmP.h header file. While touching the list of include files: - Divide include files in blocks of linux/* video/* drm/* etc. Be consistent in the order of the blocks - Sort individual blocks of include files Signed-off-by: Sam Ravnborg Reviewed-by: Linus Walleij Cc: Thierry Reding Cc: Linus Walleij Cc: Stefan Mavrodiev Cc: David Airlie Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190526180532.1641-3-sam@ravnborg.org drivers/gpu/drm/panel/panel-arm-versatile.c | 6 ++++-- drivers/gpu/drm/panel/panel-ilitek-ili9322.c | 9 +++++---- drivers/gpu/drm/panel/panel-innolux-p079zca.c | 9 ++++++--- drivers/gpu/drm/panel/panel-jdi-lt070me05000.c | 8 +++++--- drivers/gpu/drm/panel/panel-kingdisplay-kd097d04.c | 9 ++++++--- drivers/gpu/drm/panel/panel-lg-lg4573.c | 9 ++++++--- drivers/gpu/drm/panel/panel-lvds.c | 7 +++---- drivers/gpu/drm/panel/panel-olimex-lcd-olinuxino.c | 8 ++++---- drivers/gpu/drm/panel/panel-orisetech-otm8009a.c | 11 ++++++++--- drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c | 7 ++++--- drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c | 4 ++-- drivers/gpu/drm/panel/panel-raydium-rm68200.c | 5 ++++- drivers/gpu/drm/panel/panel-samsung-ld9040.c | 10 +++++++--- drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c | 10 +++++++--- drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c | 11 ++++++++--- drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c | 12 ++++++++---- drivers/gpu/drm/panel/panel-seiko-43wvf1g.c | 10 ++++++---- drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c | 7 ++++--- drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c | 7 ++++--- drivers/gpu/drm/panel/panel-simple.c | 9 +++++---- drivers/gpu/drm/panel/panel-sitronix-st7789v.c | 10 +++++++--- drivers/gpu/drm/panel/panel-truly-nt35597.c | 12 ++++++++---- 22 files changed, 121 insertions(+), 69 deletions(-) commit 90fd6ba63a0e4e7784aaa1a1757d5a9ef8cd7bc6 Author: Sam Ravnborg Date: Sun May 26 20:05:31 2019 +0200 drm/panel: panel-innolux: drop unused variable The num_supplies variable is not used, delete it. Build tested. Signed-off-by: Sam Ravnborg Reviewed-by: Linus Walleij Cc: Thierry Reding Cc: David Airlie Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190526180532.1641-2-sam@ravnborg.org drivers/gpu/drm/panel/panel-innolux-p079zca.c | 1 - 1 file changed, 1 deletion(-) commit 891100dfa2d6eeca6913b45c883b72efee7c229b Author: Neil Armstrong Date: Mon May 27 15:41:24 2019 +0200 spi: spi-meson-spifc: update with SPDX Licence identifier Signed-off-by: Neil Armstrong Signed-off-by: Mark Brown drivers/spi/spi-meson-spifc.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit 635bdb7a3e1fe1531573ff87b92c2506adafe7f7 Author: Geert Uytterhoeven Date: Mon May 27 14:19:35 2019 +0200 spi: sh-msiof: Reduce delays in sh_msiof_modify_ctr_wait() While the Hardware User Manual does not document the maximum time needed for modifying bits in the MSIOF Control Register, experiments on R-Car Gen2/Gen3 and SH-Mobile AG5 revealed the following typical modification times for the various bits: - CTR.TXE and CTR.RXE: no delay, - CTR.TSCKE: less than 10 ns, - CTR.TFSE: up to a few hundred ns (depending on SPI transfer clock, i.e. less for faster transfers). There are no reasons to believe these figures are different for SH-MobileR2 SoCs (SH7723/SH7724). Hence the minimum busy-looping delay of 10 µs is excessive. Reduce the delay per loop iteration from 10 to 1 us, and the maximum delay from 1000 to 100 µs. Signed-off-by: Geert Uytterhoeven Signed-off-by: Mark Brown drivers/spi/spi-sh-msiof.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cbafbd1dcc04ffe6c24225d0262b71c569631def Author: Dmitry Osipenko Date: Fri May 24 18:10:34 2019 +0300 regulator: max77620: Support Maxim 77663 Add support for Maxim 77663. Signed-off-by: Dmitry Osipenko Signed-off-by: Mark Brown drivers/regulator/max77620-regulator.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) commit 99a12c766e20f76eb47819fd56ff60b2010048c6 Author: Clément Péron Date: Mon May 27 22:06:24 2019 +0200 ASoC: sun4i-spdif: Add support for H6 SoC Allwinner H6 has a different mapping for the fifo register controller. Actually only the fifo TX bit is used in the drivers. Use the freshly introduced quirks to make this drivers compatible with the Allwinner H6. Signed-off-by: Clément Péron Acked-by: Maxime Ripard Signed-off-by: Mark Brown sound/soc/sunxi/sun4i-spdif.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit f6a86b436b265888a0be92e29ceaf0494101e277 Author: Clément Péron Date: Mon May 27 22:06:23 2019 +0200 ASoC: sun4i-spdif: Add TX fifo bit flush quirks Allwinner H6 has a different bit to flush the TX FIFO. Add a quirks to prepare introduction of H6 SoC. Signed-off-by: Clément Péron Acked-by: Maxime Ripard Signed-off-by: Mark Brown sound/soc/sunxi/sun4i-spdif.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit ae9cccc30f6c088dd6ead63e990407e37cd9437b Author: Clément Péron Date: Mon May 27 22:06:22 2019 +0200 ASoC: sun4i-spdif: Move quirks to the top The quirks are actually defines in the middle of the file with short explanation. Move this at the top and add a section to have coherency with sun4i-i2s. Signed-off-by: Clément Péron Acked-by: Maxime Ripard Signed-off-by: Mark Brown sound/soc/sunxi/sun4i-spdif.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 9aa37874d1930da139a08f4db1eff5d305f2ddc8 Author: Colin Ian King Date: Sat May 25 21:32:44 2019 +0100 ASoC: cx2072x: fix spelling mistake "configued" -> "configured" There is a spelling mistake in a dev_err error message. Fit it. Signed-off-by: Colin Ian King Reviewed-by: Takashi Iwai Signed-off-by: Mark Brown sound/soc/codecs/cx2072x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit be0461048b60066eaba9046178fb96e78579af21 Author: Colin Ian King Date: Fri May 24 23:25:51 2019 +0100 ASoC: cx2072x: fix integer overflow on unsigned int multiply In the case where frac_div larger than 96 the result of an unsigned multiplication overflows an unsigned int. For example, this can happen when the sample_rate is 192000 and pll_input is 122. Fix this by casing the first term of the mutiply to a u64. Also remove the extraneous parentheses around the expression. Addresses-Coverity: ("Unintentional integer overflow") Fixes: a497a4363706 ("ASoC: Add support for Conexant CX2072X CODEC") Signed-off-by: Colin Ian King Reviewed-by: Takashi Iwai Signed-off-by: Mark Brown sound/soc/codecs/cx2072x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eb5b12843b067d685a8d7a191b928b07934b2d02 Author: Maxime Ripard Date: Fri May 24 14:57:59 2019 +0200 dt-bindings: sound: sun4i-i2s: Document that the RX channel can be missing The A83t and compatibles controllers don't have any reception capabilities on some instances of the controllers, even though it was never documented as such in the binding before. Therefore, on those controllers, we don't have the option to set an RX DMA channel. This was already done in the DTSI, but the binding itself was never updated. Let's add a special case in the schemas. Signed-off-by: Maxime Ripard Reviewed-by: Rob Herring Signed-off-by: Mark Brown .../bindings/sound/allwinner,sun4i-a10-i2s.yaml | 52 +++++++++++++++++----- 1 file changed, 42 insertions(+), 10 deletions(-) commit 0a0ca8e94ca36d2153c2fbea69a31f792bfc5831 Author: Maxime Ripard Date: Fri May 24 14:57:58 2019 +0200 dt-bindings: sound: Convert Allwinner I2S binding to YAML The Allwinner SoCs feature an I2S controller across multiple SoC generations. However, earlier generations were a bit simpler than the subsequent ones, and for example would always have RX and TX capabilities, and no reset lines. Signed-off-by: Maxime Ripard Reviewed-by: Rob Herring Signed-off-by: Mark Brown .../bindings/sound/allwinner,sun4i-a10-i2s.yaml | 100 +++++++++++++++++++++ .../devicetree/bindings/sound/sun4i-i2s.txt | 45 ---------- 2 files changed, 100 insertions(+), 45 deletions(-) commit ec9025e5d3c5b5f2027fa74be6afdaad9908b546 Author: Kai Vehmanen Date: Fri May 24 14:23:06 2019 -0500 ASoC: SOF: force end-of-file for debugfs trace at suspend Current trace implementation gets out of sync when sof device is put to suspend. The debugfs file handle is kept open, but firmware will reset its state. After resume, debugfs client's read offset will not be synchronized to firmware and this may result in traces read in incorrect order and/or stale data being read after resume. Add logic to signal end-of-file to read() when firmware tracing has ended, and all trace data has been read. This allows debugfs client to capture all trace data, and reopen the trace file to ensure proper synchronization with firmware after reopening the node. Signed-off-by: Kai Vehmanen Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/sof/sof-priv.h | 2 ++ sound/soc/sof/trace.c | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+) commit f627b0524ccf993b646bd56f9bdacc973c8c39cc Author: Kai Vehmanen Date: Fri May 24 14:23:05 2019 -0500 ASoC: SOF: trace: remove code duplication in sof_wait_trace_avail() Move duplicated code in sof_wait_trace_avail() to a helper function. Signed-off-by: Kai Vehmanen Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/sof/trace.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) commit b11c5b5e573968d69aa9fec7507de7aa8fbf76e6 Author: Gustavo A. R. Silva Date: Thu May 23 10:58:00 2019 -0500 ASoC: SOF: Use struct_size() in kmemdup() Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes, in particular in the context in which this code is being used. So, replace code of the following form: sizeof(*w) + sizeof(struct sof_ipc_window_elem) * w->num_windows with: struct_size(w, window, w->num_windows) Notice that variable size is unnecessary, hence it is removed. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Mark Brown sound/soc/sof/loader.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 99afc8df8b6f2d039b1ab20d879e4721068a6c34 Author: Maxime Jourdan Date: Mon May 27 18:38:09 2019 +0200 ASoC: max98357a: Show KConfig entry The SEI510 board features a standalone MAX98357A codec. Add a tristate prompt to allow selecting the codec. Signed-off-by: Maxime Jourdan Signed-off-by: Mark Brown sound/soc/codecs/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b2045303147254d01b1db90a83e5df3832c4264b Author: Clément Péron Date: Mon May 27 22:06:21 2019 +0200 dt-bindings: sound: sun4i-spdif: Add Allwinner H6 compatible Allwinner H6 has a SPDIF controller with an increase of the fifo size and a sligher difference in memory mapping compare to H3/A64. This make it not compatible with the previous generation. Introduce a specific bindings for H6 SoC. Signed-off-by: Clément Péron Reviewed-by: Rob Herring Acked-by: Maxime Ripard Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-spdif.yaml | 1 + 1 file changed, 1 insertion(+) commit 41f4fadb34af8cdcd7c1e7b4118b8db14d06849e Author: Gustavo A. R. Silva Date: Fri May 24 11:10:51 2019 -0500 ASoC: SOF: topology: Use struct_size() helper Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes, in particular in the context in which this code is being used. So, replace the following form: sizeof(struct sof_ipc_ctrl_data) + sizeof(struct sof_ipc_ctrl_value_chan) * le32_to_cpu(mc->num_channels) with: struct_size(scontrol->control_data, chanv, le32_to_cpu(mc->num_channels)) and so on... This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Mark Brown sound/soc/sof/topology.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 9b33d2e526c53b0339ddba8b875bb8b8b3a11207 Author: Colin Ian King Date: Fri May 24 22:44:19 2019 +0100 ASoC: cx2072x: remove redundant assignment to pulse_len Variable pulse_len is being initialized to 1 however this value is never read and pulse_len is being re-assigned later in a switch statement. Clean up the code by removing the redundant initialization. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Reviewed-by: Takashi Iwai Signed-off-by: Mark Brown sound/soc/codecs/cx2072x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6cc070bdf07c8f6d5955d43da0560c9e5fd203b1 Author: Dan Carpenter Date: Fri May 3 15:28:39 2019 +0300 net/mlx5: potential error pointer dereference in error handling The error handling was a bit flipped around. If the mlx5_create_flow_group() function failed then it would have resulted in dereferencing "fg" when it was an error pointer. Fixes: 80f09dfc237f ("net/mlx5: Eswitch, enable RoCE loopback traffic") Signed-off-by: Dan Carpenter Signed-off-by: Leon Romanovsky drivers/net/ethernet/mellanox/mlx5/core/rdma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3d090a36c8c845b77ddea7e3cf9a219650fe322c Author: Ard Biesheuvel Date: Tue May 28 15:36:46 2019 +0200 irqchip/exiu: Implement ACPI support Expose the existing EXIU hierarchical irqchip domain code to permit the interrupt controller to be used as the irqchip component of a GPIO controller on ACPI systems, or as the target of ordinary interrupt resources. Reviewed-by: Mika Westerberg Signed-off-by: Ard Biesheuvel Signed-off-by: Marc Zyngier drivers/irqchip/irq-sni-exiu.c | 76 +++++++++++++++++++++++++++++++++++++----- 1 file changed, 68 insertions(+), 8 deletions(-) commit 0444638c0f0641c5239197f0c00a4293949d071e Author: Ard Biesheuvel Date: Tue May 28 15:36:45 2019 +0200 irqchip/exiu: Preparatory refactor for ACPI support In preparation of adding support for EXIU controller devices described via ACPI, split the DT init function in a DT specific and a generic part, where the latter will be reused for ACPI support later. Signed-off-by: Ard Biesheuvel Signed-off-by: Marc Zyngier drivers/irqchip/irq-sni-exiu.c | 66 +++++++++++++++++++++++++++--------------- 1 file changed, 43 insertions(+), 23 deletions(-) commit 621dc2fdcea1496ddd472c297d42e8d6642b05bc Author: Ard Biesheuvel Date: Tue May 28 15:36:44 2019 +0200 acpi/irq: Implement helper to create hierachical domains ACPI permits arbitrary producer->consumer interrupt links to be described in AML, which means a topology such as the following is perfectly legal: Device (EXIU) { Name (_HID, "SCX0008") Name (_UID, Zero) Name (_CRS, ResourceTemplate () { ... }) } Device (GPIO) { Name (_HID, "SCX0007") Name (_UID, Zero) Name (_CRS, ResourceTemplate () { Memory32Fixed (ReadWrite, SYNQUACER_GPIO_BASE, SYNQUACER_GPIO_SIZE) Interrupt (ResourceConsumer, Edge, ActiveHigh, ExclusiveAndWake, 0, "\\_SB.EXIU") { 7, } }) ... } The EXIU in this example is the external interrupt unit as can be found on Socionext SynQuacer based platforms, which converts a block of 32 SPIs from arbitrary polarity/trigger into level-high, with a separate set of config/mask/unmask/clear controls. The existing DT based driver in drivers/irqchip/irq-sni-exiu.c models this as a hierarchical domain stacked on top of the GIC's irqdomain. Since the GIC is modeled as a DT node as well, obtaining a reference to this irqdomain is easily done by going through the parent link. On ACPI systems, however, the GIC is not modeled as an object in the namespace, and so device objects cannot refer to it directly. So in order to obtain the irqdomain reference when driving the EXIU in ACPI mode, we need a helper that implicitly grabs the default domain as the parent of the hierarchy for interrupts allocated out of the global GSI pool. Reviewed-by: Mika Westerberg Reviewed-by: Lorenzo Pieralisi Signed-off-by: Ard Biesheuvel Signed-off-by: Marc Zyngier drivers/acpi/irq.c | 26 ++++++++++++++++++++++++++ include/linux/acpi.h | 7 +++++++ 2 files changed, 33 insertions(+) commit f34e1176df34b87e88eb65cd730255c913f92f8c Author: Weitao Hou Date: Mon May 20 13:09:48 2019 +0800 iommu/vt-d: Fix typo in SVM code comment Fix 'acccess' to 'access'. Signed-off-by: Weitao Hou Signed-off-by: Joerg Roedel include/linux/intel-svm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 86b3de60a0b634cdcef82d0a2091bc5444a00020 Author: Steven Rostedt (VMware) Date: Tue May 28 09:36:19 2019 -0400 ring-buffer: Remove HAVE_64BIT_ALIGNED_ACCESS Commit c19fa94a8fed ("Add HAVE_64BIT_ALIGNED_ACCESS") added the config for architectures that required 64bit aligned access for all 64bit words. As the ftrace ring buffer stores data on 4 byte alignment, this config option was used to force it to store data on 8 byte alignment to make sure the data being stored and written directly into the ring buffer was 8 byte aligned as it would cause issues trying to write an 8 byte word on a 4 not 8 byte aligned memory location. But with the removal of the metag architecture, which was the only architecture to use this, there is no architecture supported by Linux that requires 8 byte aligne access for all 8 byte words (4 byte alignment is good enough). Removing this config can simplify the code a bit. Signed-off-by: Steven Rostedt (VMware) arch/Kconfig | 16 ---------------- kernel/trace/ring_buffer.c | 17 ++++------------- 2 files changed, 4 insertions(+), 29 deletions(-) commit c1ddcf1cc9add03d775ba787b942729a4b87e7a6 Author: YueHaibing Date: Thu Nov 8 11:57:33 2018 +0000 iommu/amd: Add missed 'tag' to error msg in iommu_print_event Fixes gcc '-Wunused-but-set-variable' warning: drivers/iommu/amd_iommu.c: In function 'iommu_print_event': drivers/iommu/amd_iommu.c:550:33: warning: variable 'tag' set but not used [-Wunused-but-set-variable] It was introduced in e7f63ffc1bf1 ("iommu/amd: Update logging information for new event type") seems just missed in the error message, add it as suggested by Joerg. Signed-off-by: YueHaibing Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ec2e93cf1910d4517bb68cd67f2925665c5ef005 Author: Jia-Ju Bai Date: Sat May 4 17:10:00 2019 +0800 b43: Avoid possible double calls to b43_one_core_detach() In b43_request_firmware(), when ieee80211_register_hw() fails, b43_one_core_detach() is called. In b43_bcma_remove() and b43_ssb_remove(), b43_one_core_detach() is called again. In this case, null-pointer dereferences and double-free problems can occur when the driver is removed. To fix this bug, the call to b43_one_core_detach() in b43_request_firmware() is deleted. This bug is found by a runtime fuzzing tool named FIZZER written by us. Signed-off-by: Jia-Ju Bai Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/b43/main.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit aeffda6b10f8d4cf1c5bb10eac30a7a47f7ce184 Author: Colin Ian King Date: Tue May 14 22:14:06 2019 +0100 libertas: fix spelling mistake "Donwloading" -> "Downloading" There is are two spelling mistakes in lbtf_deb_usb2 messages, fix these. Signed-off-by: Colin Ian King Reviewed-by: Mukesh Ojha Signed-off-by: Kalle Valo drivers/net/wireless/marvell/libertas/if_usb.c | 2 +- drivers/net/wireless/marvell/libertas_tf/if_usb.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit dfbe36197dbc44fd26ff131598d64248a1398dba Author: YueHaibing Date: Sat May 25 22:48:44 2019 +0800 rtlwifi: btcoex: remove unused function exhalbtc_stack_operation_notify There is no callers in tree, so can be removed. Signed-off-by: YueHaibing Signed-off-by: Kalle Valo .../realtek/rtlwifi/btcoexist/halbtcoutsrc.c | 24 ---------------------- .../realtek/rtlwifi/btcoexist/halbtcoutsrc.h | 1 - 2 files changed, 25 deletions(-) commit d477a4856aecdfebcfe047b445f2ba702a42497a Author: YueHaibing Date: Sat May 25 22:46:34 2019 +0800 rtlwifi: btcoex: Remove set but not used variable 'len' and 'asso_type_v2' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.c: In function rtl_btc_btmpinfo_notify: drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.c:319:17: warning: variable len set but not used [-Wunused-but-set-variable] drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c: In function exhalbtc_connect_notify: drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c:1581:16: warning: variable asso_type_v2 set but not used [-Wunused-but-set-variable] 'len' is never used since commit 6aad6075ccd5 ("rtlwifi: Add BT_MP_INFO to c2h handler.") so can be removed. 'asso_type_v2' is not used since introduction in commit 0843e98a3b9a ("rtlwifi: btcoex: add assoc type v2 to connection notify") Signed-off-by: YueHaibing Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c | 11 +++-------- drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.c | 3 +-- 2 files changed, 4 insertions(+), 10 deletions(-) commit 3e42a66dfd15532792cfda8e6b5791e8d28d52b0 Author: YueHaibing Date: Sat May 25 22:43:32 2019 +0800 rtlwifi: rtl8821ae: Remove set but not used variables 'cur_txokcnt' and 'b_last_is_cur_rdl_state' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/realtek/rtlwifi/rtl8821ae/dm.c: In function rtl8821ae_dm_check_rssi_monitor: drivers/net/wireless/realtek/rtlwifi/rtl8821ae/dm.c:658:6: warning: variable cur_txokcnt set but not used [-Wunused-but-set-variable] drivers/net/wireless/realtek/rtlwifi/rtl8821ae/dm.c: In function rtl8821ae_dm_check_edca_turbo: drivers/net/wireless/realtek/rtlwifi/rtl8821ae/dm.c:2657:7: warning: variable b_last_is_cur_rdl_state set but not used [-Wunused-but-set-variable] They are never used so can be removed. Signed-off-by: YueHaibing Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/rtl8821ae/dm.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit f7fbb03f2169c1a4aae227bc21965b0579e0faf4 Author: Larry Finger Date: Mon May 20 12:23:59 2019 -0500 rtlwifi: rtl8821ae: Convert inline routines to little-endian words In this step, the read/write routines for the descriptors are converted to use __le32 quantities, thus a lot of casts can be removed. Callback routines still use the 8-bit arrays, but these are changed within the specified routine. The macro that cleared a descriptor has now been converted into an inline routine. Signed-off-by: Larry Finger Signed-off-by: Kalle Valo .../net/wireless/realtek/rtlwifi/rtl8821ae/dm.c | 3 +- .../net/wireless/realtek/rtlwifi/rtl8821ae/trx.c | 51 ++-- .../net/wireless/realtek/rtlwifi/rtl8821ae/trx.h | 310 ++++++++++----------- 3 files changed, 185 insertions(+), 179 deletions(-) commit bd421dab75151eaeea83a5145108bfacd0e1613a Author: Larry Finger Date: Mon May 20 12:23:58 2019 -0500 rtlwifi: rtl8821ae: Convert macros that set descriptor As a first step in the conversion, the macros that set the RX and TX descriptors are converted to static inline routines, and the names are changed from upper to lower case. To minimize the changes in a given step, the input descriptor information is left as as a byte array (u8 *), even though it should be a little-endian word array (__le32 *). That will be changed later. Signed-off-by: Larry Finger Signed-off-by: Kalle Valo .../net/wireless/realtek/rtlwifi/rtl8821ae/dm.c | 2 +- .../net/wireless/realtek/rtlwifi/rtl8821ae/trx.c | 208 ++++---- .../net/wireless/realtek/rtlwifi/rtl8821ae/trx.h | 539 ++++++++++++++------- 3 files changed, 474 insertions(+), 275 deletions(-) commit f5678bfe1cdc0a2b51c0ebd3adf1ac1b57aa5f64 Author: Larry Finger Date: Mon May 20 12:23:57 2019 -0500 rtlwifi: rtl8821ae: Replace local bit manipulation macros This driver uses a set of local macros to manipulate the RX and TX descriptors, which are all little-endian quantities. These macros are replaced by the bitfield macros le32p_replace_bits() and le32_get_bits(). In several places, the macros operated on an entire 32-bit word. In these cases, a direct read or replacement is used. Signed-off-by: Larry Finger Signed-off-by: Kalle Valo .../net/wireless/realtek/rtlwifi/rtl8821ae/trx.h | 252 ++++++++++----------- drivers/net/wireless/realtek/rtlwifi/wifi.h | 1 + 2 files changed, 127 insertions(+), 126 deletions(-) commit 7ffe556230b87ef4f252fb97bf87302526fe499d Author: Larry Finger Date: Mon May 20 12:23:56 2019 -0500 rtlwifi: rtl8821ae: Remove unused GET_XXX and SET_XXX descriptor macros As the first step in converting from macros that get/set information in the RX and TX descriptors, unused macros are being removed. Signed-off-by: Larry Finger Signed-off-by: Kalle Valo .../net/wireless/realtek/rtlwifi/rtl8821ae/trx.h | 157 +-------------------- 1 file changed, 2 insertions(+), 155 deletions(-) commit 80429a86e3d904be33991a2b9f29fa3b9983fb3a Author: Ping-Ke Shih Date: Fri May 10 16:03:33 2019 +0800 rtlwifi: 8192de: use le32 to access cckswing tables The cckswing tables cckswing_table_ch1ch13 and cckswing_table_ch14 are u8 array in little-endian order. To compare four u8 value with register u32 value, cast the value to cpu order. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo .../net/wireless/realtek/rtlwifi/rtl8192de/dm.c | 36 +++++++++------------- 1 file changed, 14 insertions(+), 22 deletions(-) commit 0e7d38132bf8fbf6651add139ef506106d91ab29 Author: Ping-Ke Shih Date: Fri May 10 16:03:32 2019 +0800 rtlwifi: 8192de: Fix used uninitialized variables in power tracking ofdm_index_old[] is the index of ofdmswing_table[], and used to indicate initial value of ROFDM0_X{A,B}TXIQIMBALANCE in rtl8192de_phy_reg_2tarray[] table, and the initial value is corresponding to calibration thermal value written in efuse, namely rtlefuse->eeprom_thermalmeter. Then, local variable ofdm_index_old[] save to rtlpriv->dm.ofdm_index[] for operational use. If thermal value (temperature) is increasing, output TX power is lower. So, we calculate the delta between current and calibration thermal value, then add power to yield expected and the same output TX power. Thus, ofdm_index[] should be initialized as rtlpriv->dm.ofdm_index[], and shift to proper index depends on delta of thermal value. Then, new power value ofdmswing_table[ofdm_index[]] is written to register. Reported-by: Colin Ian King Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/rtl8192de/dm.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 8a7db8b66b40eac8bdeffb35c73fe252462d04a0 Author: Ping-Ke Shih Date: Fri May 10 16:03:31 2019 +0800 rtlwifi: 8192de: make tables to be 'static const' This can reduce code size 264 bytes, and make code more readable. text data bss dec hex filename Before: 13586 0 16 13602 3522 rtl8192de/dm.o After: 13322 0 16 13338 341a rtl8192de/dm.o Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/rtl8192de/dm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 3bde4ed3da38cf20953e91d9a8bfc7b92735b18c Author: Ping-Ke Shih Date: Fri May 10 16:03:30 2019 +0800 rtlwifi: 8192de: Reduce indentation and fix coding style This commit doesn't change logic at all. Since indentation is lower, the wrapped statements can be put in single line that will become more readable. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo .../net/wireless/realtek/rtlwifi/rtl8192de/dm.c | 640 ++++++++++----------- 1 file changed, 303 insertions(+), 337 deletions(-) commit c11c75ec784e8b6e29ce147cd53f6e98584743c2 Author: Christian Lamparter Date: Fri May 24 23:33:08 2019 +0200 p54: Support boottime in scan results This patch fixes an issue with wpa_supplicant dropping all scan results because their where considered to be "too old" (e.g.: "skip - scan result not recent enough (121056.086325 seconds too old)") which is very weird because this looks like that the scan results have been received before a scan started. This is due to the inaccuracy of the default timing mechanism for calculating the BSS entry age. Signed-off-by: Christian Lamparter Signed-off-by: Kalle Valo drivers/net/wireless/intersil/p54/txrx.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 1645ab931998b39aed5761f095956f0b10a6362f Author: Christian Lamparter Date: Sat May 18 22:05:48 2019 +0200 p54: fix crash during initialization This patch fixes a crash that got introduced when the mentioned patch replaced the direct list_head access with skb_peek_tail(). When the device is starting up, there are no entries in the queue, so previously to "Use skb_peek_tail() instead..." the target_skb would end up as the tail and head pointer which then could be used by __skb_queue_after to fill the empty queue. With skb_peek_tail() in its place will instead just return NULL which then causes a crash in the __skb_queue_after(). | BUG: unable to handle kernel NULL pointer dereference at 000000 | #PF error: [normal kernel read fault] | PGD 0 P4D 0 | Oops: 0000 [#1] SMP PTI | CPU: 0 PID: 12 Comm: kworker/0:1 Tainted: GO 5.1.0-rc7-wt+ #218 | Hardware name: MSI MS-7816/Z87-G43 (MS-7816), BIOS V1.11 05/09/2015 | Workqueue: events request_firmware_work_func | RIP: 0010:p54_tx_pending+0x10f/0x1b0 [p54common] | Code: 78 06 80 78 28 00 74 6d <48> 8b 07 49 89 7c 24 08 49 89 04 24 4 | RSP: 0018:ffffa81c81927d90 EFLAGS: 00010086 | RAX: ffff9bbaaf131048 RBX: 0000000000020670 RCX: 0000000000020264 | RDX: ffff9bbaa976d660 RSI: 0000000000000202 RDI: 0000000000000000 | RBP: ffff9bbaa976d620 R08: 00000000000006c0 R09: ffff9bbaa976d660 | R10: 0000000000000000 R11: ffffe8480dbc5900 R12: ffff9bbb45e87700 | R13: ffff9bbaa976d648 R14: ffff9bbaa976d674 R15: ffff9bbaaf131048 | FS: 0000000000000000(0000) GS:ffff9bbb5ec00000(0000) knlGS:00000 | CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 | CR2: 0000000000000000 CR3: 00000003695fc003 CR4: 00000000001606f0 | Call Trace: | p54_download_eeprom+0xbe/0x120 [p54common] | p54_read_eeprom+0x7f/0xc0 [p54common] | p54u_load_firmware_cb+0xe0/0x160 [p54usb] | request_firmware_work_func+0x42/0x80 | process_one_work+0x1f5/0x3f0 | worker_thread+0x28/0x3c0 Cc: stable@vger.kernel.org Fixes: e3554197fc8f ("p54: Use skb_peek_tail() instead of direct head pointer accesses.") Signed-off-by: Christian Lamparter Signed-off-by: Kalle Valo drivers/net/wireless/intersil/p54/txrx.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit bbfab331e3abd9fa8767eea6bf5c4684cdd4b934 Author: Neo Jou Date: Tue May 21 17:12:20 2019 +0800 brcmfmac: use strlcpy() instead of strcpy() The function strcpy() is inherently not safe. Though the function works without problems here, it would be better to use other safer function, e.g. strlcpy(), to replace strcpy() still. Signed-off-by: Neo Jou Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b07e1ae2ce53a60af67009ef199603a588003e07 Author: Weitao Hou Date: Mon May 20 20:28:25 2019 +0800 brcmfmac: fix typos in code comments fix lengh to length Signed-off-by: Weitao Hou Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 885a93cf31106808cd3ded7c5e01e35fa495fdc5 Author: Arend van Spriel Date: Thu May 16 14:04:11 2019 +0200 brcm80211: select WANT_DEV_COREDUMP conditionally for brcmfmac CONFIG_BRCMDBG selects WANT_DEV_COREDUMP but is only used by brcmfmac so reflect that in the Kconfig. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9ff8614a3dbede823c34f084929ed4a40b779394 Author: Arend van Spriel Date: Thu May 16 14:04:10 2019 +0200 brcmfmac: use separate Kconfig file for brcmfmac The number of Kconfig items related to brcmfmac is considerable and upcoming changes will add some more so it seems good idea to have a separate Kconfig file for brcmfmac. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/Kconfig | 50 +--------------------- .../wireless/broadcom/brcm80211/brcmfmac/Kconfig | 50 ++++++++++++++++++++++ 2 files changed, 51 insertions(+), 49 deletions(-) commit daeccac2d5e7a6179ffff63e40b4a59bc3376a05 Author: Arend van Spriel Date: Thu May 16 14:04:09 2019 +0200 brcmfmac: switch source files to using SPDX license identifier With ISC license text in place under the LICENSES folder switch to using the SPDX license identifier to refer to the ISC license. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/Makefile | 14 ++------------ .../net/wireless/broadcom/brcm80211/brcmfmac/Makefile | 14 ++------------ drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcdc.c | 13 +------------ drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcdc.h | 13 +------------ .../net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 13 +------------ .../net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c | 13 +------------ .../net/wireless/broadcom/brcm80211/brcmfmac/btcoex.h | 13 +------------ drivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h | 13 +------------ .../net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 13 +------------ .../net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h | 13 +------------ drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c | 13 +------------ drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.h | 13 +------------ .../net/wireless/broadcom/brcm80211/brcmfmac/common.c | 13 +------------ .../net/wireless/broadcom/brcm80211/brcmfmac/common.h | 16 +++------------- .../wireless/broadcom/brcm80211/brcmfmac/commonring.c | 16 +++------------- .../wireless/broadcom/brcm80211/brcmfmac/commonring.h | 16 +++------------- drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 13 +------------ drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h | 13 +------------ drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.c | 13 +------------ drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h | 13 +------------ drivers/net/wireless/broadcom/brcm80211/brcmfmac/dmi.c | 13 +------------ .../net/wireless/broadcom/brcm80211/brcmfmac/feature.c | 13 +------------ .../net/wireless/broadcom/brcm80211/brcmfmac/feature.h | 13 +------------ .../net/wireless/broadcom/brcm80211/brcmfmac/firmware.c | 13 +------------ .../net/wireless/broadcom/brcm80211/brcmfmac/firmware.h | 13 +------------ .../net/wireless/broadcom/brcm80211/brcmfmac/flowring.c | 16 +++------------- .../net/wireless/broadcom/brcm80211/brcmfmac/flowring.h | 16 +++------------- drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.c | 13 +------------ drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.h | 13 +------------ drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil.c | 13 +------------ drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil.h | 13 +------------ .../wireless/broadcom/brcm80211/brcmfmac/fwil_types.h | 13 +------------ .../net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c | 13 +------------ .../net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.h | 14 +------------- .../net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c | 16 +++------------- .../net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.h | 16 +++------------- drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c | 13 +------------ drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.h | 13 +------------ drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 13 +------------ drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.h | 13 +------------ drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 16 +++------------- drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.h | 16 +++------------- drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.c | 13 +------------ drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.h | 13 +------------ drivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.c | 13 +------------ drivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.h | 13 +------------ drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 13 +------------ drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h | 13 +------------ .../wireless/broadcom/brcm80211/brcmfmac/tracepoint.c | 13 +------------ .../wireless/broadcom/brcm80211/brcmfmac/tracepoint.h | 13 +------------ drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 13 +------------ drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.h | 13 +------------ .../net/wireless/broadcom/brcm80211/brcmfmac/vendor.c | 13 +------------ .../net/wireless/broadcom/brcm80211/brcmfmac/vendor.h | 13 +------------ 54 files changed, 74 insertions(+), 658 deletions(-) commit f843863d6d10a4e4fba2af2afe80a495a35a8f1d Author: Arend van Spriel Date: Thu May 16 14:04:08 2019 +0200 brcmsmac: switch phy source files to using SPDX license identifier With ISC license text in place under the LICENSES folder switch to using the SPDX license identifier to refer to the ISC license. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c | 13 +------------ .../net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_hal.h | 13 +------------ .../net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_int.h | 13 +------------ .../net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c | 13 +------------ .../net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.h | 13 +------------ .../net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c | 13 +------------ .../wireless/broadcom/brcm80211/brcmsmac/phy/phy_qmath.c | 13 +------------ .../wireless/broadcom/brcm80211/brcmsmac/phy/phy_qmath.h | 13 +------------ .../wireless/broadcom/brcm80211/brcmsmac/phy/phy_radio.h | 13 +------------ .../net/wireless/broadcom/brcm80211/brcmsmac/phy/phyreg_n.h | 13 +------------ .../wireless/broadcom/brcm80211/brcmsmac/phy/phytbl_lcn.c | 13 +------------ .../wireless/broadcom/brcm80211/brcmsmac/phy/phytbl_lcn.h | 13 +------------ .../net/wireless/broadcom/brcm80211/brcmsmac/phy/phytbl_n.c | 13 +------------ .../net/wireless/broadcom/brcm80211/brcmsmac/phy/phytbl_n.h | 13 +------------ 14 files changed, 14 insertions(+), 168 deletions(-) commit afe06f8220351e7340e01acad09eb43592905053 Author: Arend van Spriel Date: Thu May 16 14:04:06 2019 +0200 brcmutil: switch source files to using SPDX license identifier With ISC license text in place under the LICENSES folder switch to using the SPDX license identifier to refer to the ISC license. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmutil/Makefile | 13 +------------ drivers/net/wireless/broadcom/brcm80211/brcmutil/d11.c | 13 +------------ drivers/net/wireless/broadcom/brcm80211/brcmutil/utils.c | 13 +------------ 3 files changed, 3 insertions(+), 36 deletions(-) commit 7e5677de8e0cc0f98ca0763524e4c4840499e62e Author: Arend van Spriel Date: Thu May 16 14:04:05 2019 +0200 brcm80211: switch common header files to using SPDX license identifier With ISC license text in place under the LICENSES folder switch to using the SPDX license identifier to refer to the ISC license. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h | 13 +------------ drivers/net/wireless/broadcom/brcm80211/include/brcmu_d11.h | 13 +------------ .../net/wireless/broadcom/brcm80211/include/brcmu_utils.h | 13 +------------ .../net/wireless/broadcom/brcm80211/include/brcmu_wifi.h | 13 +------------ .../net/wireless/broadcom/brcm80211/include/chipcommon.h | 13 +------------ drivers/net/wireless/broadcom/brcm80211/include/defs.h | 13 +------------ drivers/net/wireless/broadcom/brcm80211/include/soc.h | 13 +------------ 7 files changed, 7 insertions(+), 84 deletions(-) commit 22a7fc15cf1e742884fdc11a236fcd755225b4f0 Author: Tony Lindgren Date: Mon May 27 04:51:57 2019 -0700 ARM: dts: Drop legacy custom hwmods property for omap4 mmc With recent ti-sysc driver changes, we can now finally probe most modules without needing the custom ti,hwmods property. Let's drop it for omap4 MMC as we can test that for runtime PM for core retention idle mode for wlcore WLAN. Cc: devicetree@vger.kernel.org Cc: Rob Herring Tested-by: Keerthy Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap4-l4.dtsi | 5 ----- 1 file changed, 5 deletions(-) commit b6a53c4c872ab6870eb455d10a6f7ff0d99b1b1f Author: Tony Lindgren Date: Mon May 27 04:51:57 2019 -0700 bus: ti-sysc: Detect uarts also on omap34xx Looks like we currently only detect UART on omap36xx, let's also add support for omap34xx. And let's also fix the SWSUP mode, it should be SWSUP_SIDLE for omap3, not SWSUP_SIDLE_ACT like for omap4 and later. Note that we are still booting omap3 for most part without ti-sysc, so no need to treat this change as a fix. Tested-by: Keerthy Signed-off-by: Tony Lindgren drivers/bus/ti-sysc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit bd80c674f82650b6b9a5c6ee33ed5956ddd475b0 Author: Tony Lindgren Date: Mon May 27 04:51:57 2019 -0700 ARM: dts: Drop legacy custom hwmods property for omap4 uart With recent ti-sysc driver changes, we can now finally probe most modules without needing the custom ti,hwmods property. Let's start with omap4 uart as we can test that for runtime PM for core retention idle mode. Cc: devicetree@vger.kernel.org Cc: Rob Herring Tested-by: Keerthy Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap4-l4.dtsi | 4 ---- 1 file changed, 4 deletions(-) commit ea5a2e4d54675b06991ef3452e8e51ce6519a8db Author: Tony Lindgren Date: Mon May 27 04:51:56 2019 -0700 bus: ti-sysc: Do rstctrl reset handling in two phases We need to deassert rstctrl resets before enabling clocks to avoid clock "failed to enable" errors. For asserting rstctrl reset, the clocks need to be enabled. As the reset controller status is not available for arrays, let's use devm_reset_control_get_optional() so we can get the status after reset. Note that depends on a proper PRM rstctrl driver, so far I've only tested this with earlier reset-simple patches. Tested-by: Keerthy Signed-off-by: Tony Lindgren drivers/bus/ti-sysc.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) commit 8383e25994efadbd76cf6db7b19776cb8931e5da Author: Tony Lindgren Date: Mon May 27 04:51:56 2019 -0700 bus: ti-sysc: Add support for disabling module without legacy mode We must not assert reset for modules with no child device drivers until in runtime_suspend. Otherwise register access will fail without legacy mode helping us. Let's add a flag for disable_on_idle and move the reset driver handling to runtime suspend and resume. We can then also use the disable_on_idle flag to reconfigure sysconfig register for PM modes requesting it. Let's also make the other flags use bitfield while at it instead of bool. Tested-by: Keerthy Signed-off-by: Tony Lindgren drivers/bus/ti-sysc.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit 6e09f497eb911c61fc8dde04ce8482fc2615355e Author: Tony Lindgren Date: Mon May 27 04:51:55 2019 -0700 bus: ti-sysc: Set ENAWAKEUP if available Some modules have ENAWAKEUP bit that we need to configure when not relying on platform data callbacks. Tested-by: Keerthy Signed-off-by: Tony Lindgren drivers/bus/ti-sysc.c | 5 +++++ 1 file changed, 5 insertions(+) commit fb685f1c190ec8c085e499f138752b2b0a2836de Author: Tony Lindgren Date: Mon May 27 04:51:55 2019 -0700 bus: ti-sysc: Handle swsup idle mode quirks Some modules have idlemodes wired, but not completely functional. We have quirks for SWSUP_SIDLE and SWSUP_SIDLE_ACT to manage interconnect target modules without hardware support, but we've been only using them so far in legacy mode. Let's add support for SWSUP quirks in non-legacy mode too. Tested-by: Keerthy Signed-off-by: Tony Lindgren drivers/bus/ti-sysc.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) commit ae9ae12e9daa1e2139c3ff729d60f3c16d6e9b61 Author: Tony Lindgren Date: Mon May 27 04:51:54 2019 -0700 bus: ti-sysc: Handle clockactivity for enable and disable Modules with clockactivity need it configured during enable. Tested-by: Keerthy Signed-off-by: Tony Lindgren drivers/bus/ti-sysc.c | 7 +++++++ 1 file changed, 7 insertions(+) commit eec26555ae9bf69da8bfe90cacdbc85d7a23391b Author: Tony Lindgren Date: Mon May 27 04:51:54 2019 -0700 bus: ti-sysc: Enable interconnect target module autoidle bit on enable For interconnect target modules with autoidle bit wired, we need to manage it for enable and disable. Tested-by: Keerthy Signed-off-by: Tony Lindgren drivers/bus/ti-sysc.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit bd808f9a442301e493fe0bb3168774b4da7bb605 Author: Tony Lindgren Date: Mon May 27 04:51:54 2019 -0700 bus: ti-sysc: Allow QUIRK_LEGACY_IDLE even if legacy_mode is not set We need to specify QUIRK_LEGACY_IDLE for device drivers that still have pm_runtime_irq_safe() set like 8250. Tested-by: Keerthy Signed-off-by: Tony Lindgren drivers/bus/ti-sysc.c | 3 --- 1 file changed, 3 deletions(-) commit e0db94fe87dacd72be0699adcc29e321db7f1689 Author: Tony Lindgren Date: Mon May 27 04:51:53 2019 -0700 bus: ti-sysc: Make OCP reset work for sysstatus and sysconfig reset bits We've had minimal OCP softreset support in ti-sysc interconnect target module driver only used for MCAN driver so far. But it turns out that MCAN has the sysstatus register resetdone bit inverted compared to most other modules. Let's make OCP softreset work for other typical cases with reset status in sysstatus or sysconfig register so we can use the new functions for sysc_enable_module() and sysc_disable_module() without "ti,hwmods" property in the following patches. Tested-by: Keerthy Signed-off-by: Tony Lindgren drivers/bus/ti-sysc.c | 72 ++++++++++++++++++++++++++--------- include/linux/platform_data/ti-sysc.h | 1 + 2 files changed, 55 insertions(+), 18 deletions(-) commit 5aa912953611e5ec2443d97713ee55730dc2afdc Author: Tony Lindgren Date: Mon May 27 04:51:53 2019 -0700 bus: ti-sysc: Support 16-bit writes too We need to also support 16-bit writes for i2c in addition to the reads when we start configuring the sysconfig register for reset and idle modes. Note that only i2c revision register has LO and HI registers, so let's add a check also for 16-bit register read. This change is currently cosmetic and does not affect anything until we enable the module specific quirk handling for i2c reset and enable later on. Signed-off-by: Tony Lindgren drivers/bus/ti-sysc.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) commit 2b2f7def058a5386838ef4dba70a860285f79e66 Author: Tony Lindgren Date: Mon May 27 04:51:53 2019 -0700 bus: ti-sysc: Add support for missing clockdomain handling We need to let ti-sysc driver manage clockdomain autoidle for the duration of of reset, enable and idle. And we need to do it before we enable the clock and after we disable it. Currently we are still relying on platform callbacks indirectly managing clockdomain autoidle. But I noticed that for device tree only probed drivers it now happens only after we enabling the clocks and before we disable the clocks, while it should be the other way around. So far I have not noticed any issues with this though. Let's add new ti_sysc_clkdm_deny_idle() and ti_sysc_clkdm_allow_idle() functions for ti-sysc driver to use to manage clockdomains directly via platform data callbacks. Note that we can implement the clockdomain functions in pdata-quirks.c as for probing devices without "ti,hwmods" custom property we don't need to use the other platform data callbacks. Let's do this in one patch as there's is still an unlikely chance we may need to apply this as a fix for v5.2 for dropping legacy platform data for some devices. We also do have the option of adding back the platform data if needed in case of trouble. Tested-by: Keerthy Signed-off-by: Tony Lindgren arch/arm/mach-omap2/omap_hwmod.c | 39 ++--------- arch/arm/mach-omap2/pdata-quirks.c | 60 ++++++++++++++++ drivers/bus/ti-sysc.c | 127 +++++++++++++++++++++++++++------- include/linux/platform_data/ti-sysc.h | 8 +++ 4 files changed, 174 insertions(+), 60 deletions(-) commit 1a28ed213696b379a64540ce1a879a07e36b44db Author: Johannes Berg Date: Tue May 28 14:18:07 2019 +0200 nl80211: fill all policy .type entries For old commands, it's fine to have .type = NLA_UNSPEC and it behaves the same as NLA_MIN_LEN. However, for new commands with strict validation this is no longer true, and for policy export to userspace these are also ignored. Fix up the remaining ones that don't have a type. Signed-off-by: Johannes Berg net/wireless/nl80211.c | 78 ++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 57 insertions(+), 21 deletions(-) commit a3b0c66c5928acff34fb40745451e1369a21e4fa Author: Yan-Hsuan Chuang Date: Fri May 3 19:53:35 2019 +0800 rtw88: more descriptions about LPS The LPS represents Leisure Power Save. When enabled, firmware will be in charge of turning radio off between beacons. Also firmware should turn on the radio when beacon is coming, and the data queued should be transmitted in TBTT period. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtw88/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0d7882950c73de464c3d95ae5e4038059dcd46c8 Author: Yan-Hsuan Chuang Date: Fri May 3 19:53:33 2019 +0800 rtw88: pci: check if queue mapping exceeds size of ac_to_hwq Dump warning messages when we get a q_mapping larger than the AC numbers. And pick BE queue as default. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtw88/pci.c | 2 ++ 1 file changed, 2 insertions(+) commit 82dea406c50946b9653dd80ec6f39a8d6f43ed89 Author: Yan-Hsuan Chuang Date: Fri May 3 19:53:32 2019 +0800 rtw88: pci: use ieee80211_ac_numbers instead of 0-3 AC numbers are defined as enum in mac80211, use them instead of bare 0-3 indexing. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtw88/pci.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c017cf6b1a5c7a218f7171bb8061132d9a23a918 Author: Chris Wilson Date: Tue May 28 10:29:56 2019 +0100 drm/i915: Drop the deferred active reference An old optimisation to reduce the number of atomics per batch sadly relies on struct_mutex for coordination. In order to remove struct_mutex from serialising object/context closing, always taking and releasing an active reference on first use / last use greatly simplifies the locking. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20190528092956.14910-15-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gem/i915_gem_context.c | 2 +- drivers/gpu/drm/i915/gem/i915_gem_object.c | 13 +----------- drivers/gpu/drm/i915/gem/i915_gem_object.h | 24 +--------------------- drivers/gpu/drm/i915/gem/i915_gem_object_types.h | 8 -------- drivers/gpu/drm/i915/gem/selftests/huge_pages.c | 3 +-- .../drm/i915/gem/selftests/i915_gem_coherency.c | 4 ++-- .../gpu/drm/i915/gem/selftests/i915_gem_context.c | 11 +++++----- drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c | 2 +- drivers/gpu/drm/i915/gt/intel_engine_cs.c | 2 +- drivers/gpu/drm/i915/gt/intel_ringbuffer.c | 3 +-- drivers/gpu/drm/i915/gt/selftest_hangcheck.c | 9 +------- drivers/gpu/drm/i915/gt/selftest_workarounds.c | 3 --- drivers/gpu/drm/i915/gvt/scheduler.c | 2 +- drivers/gpu/drm/i915/i915_gem_batch_pool.c | 2 +- drivers/gpu/drm/i915/i915_gem_render_state.c | 2 +- drivers/gpu/drm/i915/i915_vma.c | 15 ++++++-------- drivers/gpu/drm/i915/selftests/i915_request.c | 8 -------- drivers/gpu/drm/i915/selftests/igt_spinner.c | 9 +------- 18 files changed, 26 insertions(+), 96 deletions(-) commit 754f7a0b2a13fa601c4ea494f726214c07b81e08 Author: Chris Wilson Date: Tue May 28 10:29:55 2019 +0100 drm/i915: Rename intel_context.active to .inflight Rename the engine this HW context is currently active upon (that we are flying upon) to disambiguate between the mixture of different active terms (and prevent conflict in future patches). Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190528092956.14910-14-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gt/intel_context_types.h | 2 +- drivers/gpu/drm/i915/gt/intel_lrc.c | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) commit 446e2d16a131ed2319ba92d9aa61db5164aa25d2 Author: Chris Wilson Date: Tue May 28 10:29:54 2019 +0100 drm/i915: Move GEM client throttling to its own file Continuing the decluttering of i915_gem.c by moving the client self throttling into its own file. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190528092956.14910-13-chris@chris-wilson.co.uk drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/gem/i915_gem_throttle.c | 73 ++++++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_drv.h | 6 --- drivers/gpu/drm/i915/i915_gem.c | 58 ---------------------- 4 files changed, 74 insertions(+), 64 deletions(-) commit 3f43c8767ed7d32a0fcd3f531eda6808e4de4f4e Author: Chris Wilson Date: Tue May 28 10:29:53 2019 +0100 drm/i915: Move GEM object busy checking to its own file Continuing the decluttering of i915_gem.c by moving the object busy checking into its own file. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190528092956.14910-12-chris@chris-wilson.co.uk drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/gem/i915_gem_busy.c | 138 +++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_gem.c | 128 ---------------------------- 3 files changed, 139 insertions(+), 128 deletions(-) commit d45a1a533499d3ef1f3d9b750de93306f0c3dbe8 Author: Chris Wilson Date: Tue May 28 10:29:52 2019 +0100 drm/i915: Move GEM object waiting to its own file Continuing the decluttering of i915_gem.c by moving the object wait decomposition into its own file. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190528092956.14910-11-chris@chris-wilson.co.uk drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/gem/i915_gem_object.h | 8 + drivers/gpu/drm/i915/gem/i915_gem_wait.c | 277 +++++++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_drv.h | 7 - drivers/gpu/drm/i915/i915_gem.c | 254 -------------------------- drivers/gpu/drm/i915/i915_utils.h | 10 -- 6 files changed, 286 insertions(+), 271 deletions(-) commit 6951e5893b4821f68a48022842f67c3033ca7b30 Author: Chris Wilson Date: Tue May 28 10:29:51 2019 +0100 drm/i915: Move GEM object domain management from struct_mutex to local Use the per-object local lock to control the cache domain of the individual GEM objects, not struct_mutex. This is a huge leap forward for us in terms of object-level synchronisation; execbuffers are coordinated using the ww_mutex and pread/pwrite is finally fully serialised again. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20190528092956.14910-10-chris@chris-wilson.co.uk drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/gem/i915_gem_clflush.c | 4 +- drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 10 +- drivers/gpu/drm/i915/gem/i915_gem_domain.c | 70 ++++++------ drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 123 ++++++++++++++------- drivers/gpu/drm/i915/gem/i915_gem_fence.c | 96 ++++++++++++++++ drivers/gpu/drm/i915/gem/i915_gem_object.c | 2 + drivers/gpu/drm/i915/gem/i915_gem_object.h | 14 +++ drivers/gpu/drm/i915/gem/i915_gem_pm.c | 7 +- drivers/gpu/drm/i915/gem/selftests/huge_pages.c | 12 +- .../drm/i915/gem/selftests/i915_gem_coherency.c | 12 ++ .../gpu/drm/i915/gem/selftests/i915_gem_context.c | 20 ++++ drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c | 6 + drivers/gpu/drm/i915/gem/selftests/i915_gem_phys.c | 4 +- drivers/gpu/drm/i915/gt/selftest_hangcheck.c | 4 + drivers/gpu/drm/i915/gt/selftest_lrc.c | 2 + drivers/gpu/drm/i915/gt/selftest_workarounds.c | 6 + drivers/gpu/drm/i915/gvt/cmd_parser.c | 2 + drivers/gpu/drm/i915/gvt/scheduler.c | 8 +- drivers/gpu/drm/i915/i915_cmd_parser.c | 23 ++-- drivers/gpu/drm/i915/i915_gem.c | 122 +++++++++++--------- drivers/gpu/drm/i915/i915_gem_gtt.c | 5 +- drivers/gpu/drm/i915/i915_gem_render_state.c | 2 + drivers/gpu/drm/i915/i915_vma.c | 8 +- drivers/gpu/drm/i915/i915_vma.h | 12 ++ drivers/gpu/drm/i915/intel_display.c | 5 + drivers/gpu/drm/i915/intel_guc_log.c | 6 +- drivers/gpu/drm/i915/intel_overlay.c | 25 +++-- drivers/gpu/drm/i915/intel_uc_fw.c | 6 +- drivers/gpu/drm/i915/selftests/i915_request.c | 4 + drivers/gpu/drm/i915/selftests/i915_vma.c | 2 + drivers/gpu/drm/i915/selftests/igt_spinner.c | 2 + 32 files changed, 445 insertions(+), 180 deletions(-) commit 37d63f8fdb4941b6a82ef9e59bee62a494225c7e Author: Chris Wilson Date: Tue May 28 10:29:50 2019 +0100 drm/i915: Pull scatterlist utils out of i915_gem.h Out scatterlist utility routines can be pulled out of i915_gem.h for a bit more decluttering. v2: Push I915_GTT_PAGE_SIZE out of i915_scatterlist itself and into the caller. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20190528092956.14910-9-chris@chris-wilson.co.uk drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 1 + drivers/gpu/drm/i915/gem/i915_gem_internal.c | 1 + drivers/gpu/drm/i915/gem/i915_gem_pages.c | 1 + drivers/gpu/drm/i915/gem/i915_gem_phys.c | 1 + drivers/gpu/drm/i915/gem/i915_gem_shmem.c | 1 + drivers/gpu/drm/i915/gem/i915_gem_userptr.c | 1 + .../gpu/drm/i915/gem/selftests/huge_gem_object.c | 2 + .../gpu/drm/i915/gem/selftests/i915_gem_dmabuf.c | 1 + drivers/gpu/drm/i915/i915_drv.h | 110 ------------------ drivers/gpu/drm/i915/i915_gem.c | 30 +---- drivers/gpu/drm/i915/i915_gem_fence_reg.c | 2 + drivers/gpu/drm/i915/i915_gem_gtt.c | 3 +- drivers/gpu/drm/i915/i915_gem_gtt.h | 4 +- drivers/gpu/drm/i915/i915_gpu_error.c | 1 + drivers/gpu/drm/i915/i915_scatterlist.c | 39 +++++++ drivers/gpu/drm/i915/i915_scatterlist.h | 127 +++++++++++++++++++++ drivers/gpu/drm/i915/selftests/i915_vma.c | 1 + drivers/gpu/drm/i915/selftests/scatterlist.c | 3 +- 19 files changed, 188 insertions(+), 142 deletions(-) commit 10be98a77c558f8cfb823cd2777171fbb35040f6 Author: Chris Wilson Date: Tue May 28 10:29:49 2019 +0100 drm/i915: Move more GEM objects under gem/ Continuing the theme of separating out the GEM clutter. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190528092956.14910-8-chris@chris-wilson.co.uk drivers/gpu/drm/i915/Makefile | 26 ++++++------- drivers/gpu/drm/i915/Makefile.header-test | 2 - drivers/gpu/drm/i915/{ => gem}/i915_gem_clflush.c | 24 ++---------- drivers/gpu/drm/i915/gem/i915_gem_clflush.h | 20 ++++++++++ drivers/gpu/drm/i915/{ => gem}/i915_gem_context.c | 27 ++----------- drivers/gpu/drm/i915/{ => gem}/i915_gem_context.h | 22 +---------- .../drm/i915/{ => gem}/i915_gem_context_types.h | 0 drivers/gpu/drm/i915/{ => gem}/i915_gem_dmabuf.c | 27 ++----------- .../gpu/drm/i915/{ => gem}/i915_gem_execbuffer.c | 30 +++------------ drivers/gpu/drm/i915/{ => gem}/i915_gem_internal.c | 30 +++++---------- drivers/gpu/drm/i915/gem/i915_gem_object.c | 10 ++++- drivers/gpu/drm/i915/{ => gem}/i915_gem_pm.c | 2 +- drivers/gpu/drm/i915/{ => gem}/i915_gem_pm.h | 0 drivers/gpu/drm/i915/{ => gem}/i915_gem_shrinker.c | 23 +---------- drivers/gpu/drm/i915/{ => gem}/i915_gem_stolen.c | 31 ++++----------- drivers/gpu/drm/i915/{ => gem}/i915_gem_tiling.c | 30 +++------------ drivers/gpu/drm/i915/{ => gem}/i915_gem_userptr.c | 27 ++----------- drivers/gpu/drm/i915/{ => gem}/i915_gemfs.c | 22 +---------- drivers/gpu/drm/i915/gem/i915_gemfs.h | 16 ++++++++ .../drm/i915/{ => gem}/selftests/huge_gem_object.c | 22 +---------- .../gpu/drm/i915/gem/selftests/huge_gem_object.h | 27 +++++++++++++ .../gpu/drm/i915/{ => gem}/selftests/huge_pages.c | 35 ++++++----------- .../i915/{ => gem}/selftests/i915_gem_coherency.c | 26 ++----------- .../i915/{ => gem}/selftests/i915_gem_context.c | 40 ++++++------------- .../drm/i915/{ => gem}/selftests/i915_gem_dmabuf.c | 26 ++----------- drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c | 2 +- .../drm/i915/{ => gem}/selftests/i915_gem_object.c | 28 +++----------- .../drm/i915/{ => gem}/selftests/igt_gem_utils.c | 6 +-- .../drm/i915/{ => gem}/selftests/igt_gem_utils.h | 0 .../drm/i915/{ => gem}/selftests/mock_context.c | 24 ++---------- drivers/gpu/drm/i915/gem/selftests/mock_context.h | 24 ++++++++++++ .../gpu/drm/i915/{ => gem}/selftests/mock_dmabuf.c | 22 +---------- drivers/gpu/drm/i915/gem/selftests/mock_dmabuf.h | 22 +++++++++++ .../drm/i915/{ => gem}/selftests/mock_gem_object.h | 7 +++- drivers/gpu/drm/i915/gt/intel_context.c | 4 +- drivers/gpu/drm/i915/gt/intel_engine_cs.c | 3 ++ drivers/gpu/drm/i915/gt/intel_lrc.c | 2 + drivers/gpu/drm/i915/gt/intel_lrc.h | 14 ++++--- drivers/gpu/drm/i915/gt/intel_reset.c | 2 + drivers/gpu/drm/i915/gt/intel_ringbuffer.c | 3 ++ drivers/gpu/drm/i915/gt/intel_workarounds.c | 1 + drivers/gpu/drm/i915/gt/mock_engine.c | 3 +- drivers/gpu/drm/i915/gt/selftest_hangcheck.c | 6 ++- drivers/gpu/drm/i915/gt/selftest_lrc.c | 7 +++- drivers/gpu/drm/i915/gt/selftest_workarounds.c | 6 ++- drivers/gpu/drm/i915/gvt/mmio_context.c | 1 + drivers/gpu/drm/i915/gvt/scheduler.c | 5 ++- drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/i915_drv.c | 1 + drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_gem.c | 11 ++---- drivers/gpu/drm/i915/i915_gem_clflush.h | 36 ----------------- drivers/gpu/drm/i915/i915_gem_evict.c | 2 + drivers/gpu/drm/i915/i915_gemfs.h | 34 ---------------- drivers/gpu/drm/i915/i915_globals.c | 2 +- drivers/gpu/drm/i915/i915_gpu_error.c | 2 + drivers/gpu/drm/i915/i915_perf.c | 2 + drivers/gpu/drm/i915/i915_request.c | 3 ++ drivers/gpu/drm/i915/intel_display.c | 1 - drivers/gpu/drm/i915/intel_guc_submission.c | 2 + drivers/gpu/drm/i915/intel_overlay.c | 2 + drivers/gpu/drm/i915/selftests/huge_gem_object.h | 45 ---------------------- drivers/gpu/drm/i915/selftests/i915_active.c | 4 +- drivers/gpu/drm/i915/selftests/i915_gem.c | 8 ++-- drivers/gpu/drm/i915/selftests/i915_gem_evict.c | 8 ++-- drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 5 ++- drivers/gpu/drm/i915/selftests/i915_request.c | 6 ++- drivers/gpu/drm/i915/selftests/i915_timeline.c | 4 +- drivers/gpu/drm/i915/selftests/i915_vma.c | 5 ++- drivers/gpu/drm/i915/selftests/igt_flush_test.c | 6 ++- drivers/gpu/drm/i915/selftests/igt_spinner.c | 3 +- drivers/gpu/drm/i915/selftests/igt_spinner.h | 9 ++--- drivers/gpu/drm/i915/selftests/intel_guc.c | 3 +- drivers/gpu/drm/i915/selftests/mock_context.h | 42 -------------------- drivers/gpu/drm/i915/selftests/mock_dmabuf.h | 41 -------------------- drivers/gpu/drm/i915/selftests/mock_gem_device.c | 5 ++- drivers/gpu/drm/i915/selftests/mock_request.c | 2 +- 77 files changed, 338 insertions(+), 697 deletions(-) commit f0e4a06397526d3352a3c80b0575ac22ab24da94 Author: Chris Wilson Date: Tue May 28 10:29:48 2019 +0100 drm/i915: Move GEM domain management to its own file Continuing the decluttering of i915_gem.c, that of the read/write domains, perhaps the biggest of GEM's follies? Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20190528092956.14910-7-chris@chris-wilson.co.uk drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/gem/i915_gem_domain.c | 782 +++++++++++++++++++++ drivers/gpu/drm/i915/gem/i915_gem_object.h | 29 + drivers/gpu/drm/i915/gvt/cmd_parser.c | 4 +- drivers/gpu/drm/i915/gvt/scheduler.c | 6 +- drivers/gpu/drm/i915/i915_cmd_parser.c | 8 +- drivers/gpu/drm/i915/i915_drv.h | 26 - drivers/gpu/drm/i915/i915_gem.c | 777 +------------------- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 4 +- drivers/gpu/drm/i915/i915_gem_render_state.c | 4 +- drivers/gpu/drm/i915/selftests/huge_pages.c | 4 +- .../gpu/drm/i915/selftests/i915_gem_coherency.c | 8 +- drivers/gpu/drm/i915/selftests/i915_gem_context.c | 8 +- 13 files changed, 839 insertions(+), 822 deletions(-) commit b414fcd5be0b0045635ba18efbe04ed662d86fe8 Author: Chris Wilson Date: Tue May 28 10:29:47 2019 +0100 drm/i915: Move mmap and friends to its own file Continuing the decluttering of i915_gem.c, now the turn of do_mmap and the faulthandlers Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20190528092956.14910-6-chris@chris-wilson.co.uk drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/gem/i915_gem_mman.c | 507 ++++++++++++++++++ drivers/gpu/drm/i915/gem/i915_gem_object.c | 56 ++ drivers/gpu/drm/i915/gem/i915_gem_object.h | 7 + drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c | 503 ++++++++++++++++++ drivers/gpu/drm/i915/i915_drv.h | 1 - drivers/gpu/drm/i915/i915_gem.c | 564 +-------------------- drivers/gpu/drm/i915/i915_gem_tiling.c | 2 +- drivers/gpu/drm/i915/selftests/i915_gem_object.c | 487 ------------------ .../gpu/drm/i915/selftests/i915_live_selftests.h | 1 + 10 files changed, 1090 insertions(+), 1039 deletions(-) commit f033428db28bdff19105e6050de77f857dabf5b8 Author: Chris Wilson Date: Tue May 28 10:29:46 2019 +0100 drm/i915: Move phys objects to its own file Continuing the decluttering of i915_gem.c, this time the legacy physical object. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20190528092956.14910-5-chris@chris-wilson.co.uk drivers/gpu/drm/i915/Makefile | 2 + drivers/gpu/drm/i915/gem/i915_gem_object.h | 11 +- drivers/gpu/drm/i915/gem/i915_gem_object_types.h | 2 + drivers/gpu/drm/i915/gem/i915_gem_pages.c | 521 +++++++++++++++ drivers/gpu/drm/i915/gem/i915_gem_phys.c | 211 ++++++ drivers/gpu/drm/i915/gem/i915_gem_shmem.c | 61 ++ drivers/gpu/drm/i915/gem/selftests/i915_gem_phys.c | 80 +++ drivers/gpu/drm/i915/i915_drv.h | 2 - drivers/gpu/drm/i915/i915_gem.c | 712 +-------------------- drivers/gpu/drm/i915/i915_gem_shrinker.c | 59 +- drivers/gpu/drm/i915/selftests/i915_gem_object.c | 54 -- .../gpu/drm/i915/selftests/i915_mock_selftests.h | 1 + 12 files changed, 895 insertions(+), 821 deletions(-) commit 8475355f7a2645a022288301c03555c31fb4de17 Author: Chris Wilson Date: Tue May 28 10:29:45 2019 +0100 drm/i915: Move shmem object setup to its own file Split the plain old shmem object into its own file to start decluttering i915_gem.c v2: Lose the confusing, hysterical raisins, suffix of _gtt. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20190528092956.14910-4-chris@chris-wilson.co.uk drivers/gpu/drm/i915/Makefile | 3 +- drivers/gpu/drm/i915/gem/i915_gem_object.c | 298 ++++++++ drivers/gpu/drm/i915/gem/i915_gem_object.h | 41 +- drivers/gpu/drm/i915/gem/i915_gem_shmem.c | 511 ++++++++++++++ drivers/gpu/drm/i915/gt/intel_lrc.c | 4 +- drivers/gpu/drm/i915/gt/intel_ringbuffer.c | 2 +- drivers/gpu/drm/i915/gvt/cmd_parser.c | 21 +- drivers/gpu/drm/i915/i915_drv.h | 10 - drivers/gpu/drm/i915/i915_gem.c | 826 +---------------------- drivers/gpu/drm/i915/i915_perf.c | 2 +- drivers/gpu/drm/i915/intel_fbdev.c | 2 +- drivers/gpu/drm/i915/intel_guc.c | 2 +- drivers/gpu/drm/i915/intel_uc_fw.c | 3 +- drivers/gpu/drm/i915/selftests/huge_pages.c | 6 +- drivers/gpu/drm/i915/selftests/i915_gem_dmabuf.c | 8 +- drivers/gpu/drm/i915/selftests/i915_gem_object.c | 4 +- 16 files changed, 882 insertions(+), 861 deletions(-) commit 98932149aeb992398a58f6361a86a91f9bfc0b04 Author: Chris Wilson Date: Tue May 28 10:29:44 2019 +0100 drm/i915: Move object->pages API to i915_gem_object.[ch] Currently the code for manipulating the pages on an object is still residing in i915_gem.c, move it to i915_gem_object.c Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20190528092956.14910-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/Makefile | 4 +- drivers/gpu/drm/i915/{ => gem}/i915_gem_object.c | 0 drivers/gpu/drm/i915/{ => gem}/i915_gem_object.h | 132 ++++++++++++++++++++- drivers/gpu/drm/i915/i915_drv.h | 141 +---------------------- drivers/gpu/drm/i915/i915_globals.c | 2 +- drivers/gpu/drm/i915/i915_vma.h | 2 +- drivers/gpu/drm/i915/intel_frontbuffer.h | 2 +- 7 files changed, 143 insertions(+), 140 deletions(-) commit afa1308596c9dbb8526efd21335ea45aaaafdbe4 Author: Chris Wilson Date: Tue May 28 10:29:43 2019 +0100 drm/i915: Pull GEM ioctls interface to its own file Declutter i915_drv/gem.h by moving the ioctl API into its own header. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20190528092956.14910-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gem/i915_gem_ioctls.h | 52 ++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_drv.c | 1 + drivers/gpu/drm/i915/i915_drv.h | 38 ---------------------- drivers/gpu/drm/i915/i915_gem.c | 1 + drivers/gpu/drm/i915/i915_gem_execbuffer.c | 1 + drivers/gpu/drm/i915/i915_gem_tiling.c | 3 ++ drivers/gpu/drm/i915/i915_gem_userptr.c | 12 ++++--- 7 files changed, 66 insertions(+), 42 deletions(-) commit 5e5d2e209e085be73a83f342798eae68f58e7674 Author: Chris Wilson Date: Tue May 28 10:29:42 2019 +0100 drm/i915: Split GEM object type definition to its own header For convenience in avoiding inline spaghetti, keep the type definition as a separate header. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Acked-by: Rodrigo Vivi Acked-by: Jani Nikula Acked-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20190528092956.14910-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/gem/Makefile | 1 + drivers/gpu/drm/i915/gem/Makefile.header-test | 16 ++ drivers/gpu/drm/i915/gem/i915_gem_object_types.h | 285 ++++++++++++++++++++++ drivers/gpu/drm/i915/gt/intel_engine_types.h | 1 + drivers/gpu/drm/i915/i915_drv.h | 3 +- drivers/gpu/drm/i915/i915_gem_batch_pool.h | 3 +- drivers/gpu/drm/i915/i915_gem_gtt.h | 1 + drivers/gpu/drm/i915/i915_gem_object.h | 295 +---------------------- 9 files changed, 312 insertions(+), 294 deletions(-) commit 7f6cafb959fc4994b1c65b4433ff14aa4b14802a Author: Chris Wilson Date: Tue May 28 10:00:01 2019 +0100 drm/i915: Kill the undead intel_context.c zombie It was moved over to gt/ but the backmerge brought it back from the dead. Signed-off-by: Chris Wilson Cc: Jani Nikula Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190528090001.17248-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_context.c | 270 ----------------------------------- 1 file changed, 270 deletions(-) commit 153969fd952d81ab8f57574f9be1a90b0a0fa791 Author: Linus Walleij Date: Tue May 21 03:38:25 2019 +0200 ARM: versatile: Drop CLCD platform data The Versatile family no longer makes any use of the CLCD platform data, we have moved over all users to the DRM driver that has built-in handling of the displays. Delete the old auxdata. Signed-off-by: Linus Walleij arch/arm/mach-versatile/versatile_dt.c | 157 --------------------- include/linux/platform_data/video-clcd-versatile.h | 28 ---- 2 files changed, 185 deletions(-) commit 8de9336f4b928e498e4e3ea50e12bf40acb95e5b Author: Leo Yan Date: Wed May 8 10:18:56 2019 +0800 ARM: dts: vexpress-v2p-ca15_a7: update coresight DT bindings CoreSight DT bindings have been updated, thus the old compatible strings are obsolete and the drivers will report warning if DTS uses these obsolete strings. This patch switches to the new bindings for CoreSight dynamic funnel and static replicator, so can dismiss warning during initialisation. Cc: Liviu Dudau Cc: Lorenzo Pieralisi Reviewed-by: Mathieu Poirier Acked-by: Suzuki K Poulose Signed-off-by: Leo Yan Signed-off-by: Sudeep Holla arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7f8e78ca90e257e5fc8c1f34be309637fab688cd Author: Linus Walleij Date: Tue May 28 10:58:13 2019 +0200 arm64: dts: juno: set the right partition type for NOR flash We do not normally access the flash on the Juno, as this will disturb other aspects of the system, but if we choose to do so anyways, we should set up the partitions in the right way so we will find out what is in the flash. The ARM Firmware Suite now has its own compatible and proper device tree bindings to trigger discovery of the flash contents, and Linux supports handling the new type of AFS partitions. Signed-off-by: Linus Walleij Signed-off-by: Sudeep Holla arch/arm64/boot/dts/arm/juno-motherboard.dtsi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit f37fdc1d6b2c17c0b0ff19bec01971190ee54f40 Author: Leo Yan Date: Wed May 8 10:18:59 2019 +0800 arm64: dts: juno: update coresight DT bindings CoreSight DT bindings have been updated, thus the old compatible strings are obsolete and the drivers will report warning if DTS uses these obsolete strings. This patch switches to the new bindings for CoreSight dynamic funnel, so can dismiss warning during initialisation. Cc: Liviu Dudau Cc: Lorenzo Pieralisi Reviewed-by: Mathieu Poirier Acked-by: Suzuki K Poulose Signed-off-by: Leo Yan Signed-off-by: Sudeep Holla arch/arm64/boot/dts/arm/juno-base.dtsi | 6 +++--- arch/arm64/boot/dts/arm/juno-cs-r1r2.dtsi | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) commit b7bedf31252a94fb741691d2b4a3220bcdcaf9ba Author: Uma Shankar Date: Fri May 17 21:49:09 2019 +0530 drm/i915: Attach HDR metadata property to connector Attach HDR metadata property to connector object. v2: Rebase v3: Updated the property name as per updated name while creating hdr metadata property v4: Added platform check as suggested by Ville. Signed-off-by: Uma Shankar Reviewed-by: Shashank Sharma Reviewed-by: Maarten Lankhorst Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/1558109949-3309-1-git-send-email-uma.shankar@intel.com drivers/gpu/drm/i915/intel_hdmi.c | 4 ++++ 1 file changed, 4 insertions(+) commit b37f588e4f689d186675575227020e4dfbcafec8 Author: Uma Shankar Date: Thu May 16 19:40:17 2019 +0530 drm/i915: Add state readout for DRM infoframe Added state readout for DRM infoframe and enabled state validation for DRM infoframe. v2: Addressed Ville's review comments and dropped the unused drm infoframe read at intel_hdmi_init. v3: Removed a redundant platform check as per Ville's comment. Signed-off-by: Uma Shankar Reviewed-by: Maarten Lankhorst Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/1558015817-12025-13-git-send-email-uma.shankar@intel.com drivers/gpu/drm/i915/intel_ddi.c | 3 +++ drivers/gpu/drm/i915/intel_display.c | 1 + 2 files changed, 4 insertions(+) commit 5a0200f69dfd36e8316c4fab7a5036f35329b22c Author: Uma Shankar Date: Sat May 18 16:09:27 2019 +0530 drm/i915: Write HDR infoframe and send to panel Enable writing of HDR metadata infoframe to panel. The data will be provid by usersapace compositors, based on blending policies and passsed to driver through a blob property. v2: Rebase v3: Fixed a warning message v4: Addressed Shashank's review comments v5: Rebase. Added infoframe calculation in compute config. v6: Addressed Shashank's review comment. Added HDR metadata support from GEN10 onwards as per Shashank's recommendation. v7: Addressed Shashank's review comments v8: Added Shashank's RB. v9: Addressed Ville's review comments. v10: Removed a redundant check as core already handles it, as per Ville's comment. v11: Added the metadata available check to avoid failure in compute_config. Signed-off-by: Uma Shankar Reviewed-by: Shashank Sharma Reviewed-by: Maarten Lankhorst Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/1558175967-22068-1-git-send-email-uma.shankar@intel.com drivers/gpu/drm/i915/intel_drv.h | 1 + drivers/gpu/drm/i915/intel_hdmi.c | 43 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) commit 44b42ebfccfd9d6ef377a25e99ae0085b071e868 Author: Ville Syrjälä Date: Fri May 17 21:52:25 2019 +0530 drm/i915: Enable infoframes on GLK+ for HDR This patch enables infoframes on GLK+ to be used to send HDR metadata to HDMI sink. v2: Addressed Shashank's review comment. v3: Addressed Shashank's review comment. v4: Added Shashank's RB. v5: Dropped hdr_metadata_change check while modeset, as per Ville's suggestion. v6: Removed an unused and duplicate bit defintion, as per Ville's comment. Signed-off-by: Ville Syrjälä Signed-off-by: Uma Shankar Reviewed-by: Shashank Sharma [mlankhorst: Reorder patch series] Reviewed-by: Maarten Lankhorst Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/1558110145-3422-1-git-send-email-uma.shankar@intel.com drivers/gpu/drm/i915/i915_reg.h | 5 ++++- drivers/gpu/drm/i915/intel_hdmi.c | 19 +++++++++++++++---- 2 files changed, 19 insertions(+), 5 deletions(-) commit c0560fab6d3798cb4a54529cdce0e91a64e978fb Author: Uma Shankar Date: Thu May 16 19:40:15 2019 +0530 drm/i915: Add DRM Infoframe handling for BYT/CHT BYT/CHT doesn't support DRM Infoframe. This caused a WARN_ON due to a missing CASE while executing intel_hdmi_infoframes_enabled function. This patch fixes the same. Signed-off-by: Uma Shankar Reviewed-by: Maarten Lankhorst Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/1558015817-12025-11-git-send-email-uma.shankar@intel.com drivers/gpu/drm/i915/intel_hdmi.c | 2 ++ 1 file changed, 2 insertions(+) commit 86beaea131009a6c0473dad83a87bbb3ec803f9d Author: Uma Shankar Date: Thu May 16 19:40:14 2019 +0530 drm/i915: Enabled Modeset when HDR Infoframe changes This patch enables modeset whenever HDR metadata needs to be updated to sink. v2: Addressed Shashank's review comments. v3: Added Shashank's RB. v4: Addressed Ville's review comments. v5: Addressed Ville's review comments. Signed-off-by: Ville Syrjälä Signed-off-by: Uma Shankar Reviewed-by: Shashank Sharma [mlankhorst: Fix up commit message, reorder] Reviewed-by: Maarten Lankhorst Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/1558015817-12025-10-git-send-email-uma.shankar@intel.com drivers/gpu/drm/i915/intel_atomic.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 37b54aed123faa19eb21d7ef2534756c5a152a7c Author: Daniel T. Lee Date: Thu May 23 16:24:48 2019 +0900 samples/bpf: fix a couple of style issues in bpf_load This commit fixes a few style problems in samples/bpf/bpf_load.c: - Magic string use of 'DEBUGFS' - Useless zero initialization of a global variable - Minor style fix with whitespace Signed-off-by: Daniel T. Lee Acked-by: Yonghong Song Signed-off-by: Daniel Borkmann samples/bpf/bpf_load.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 486d3f22c0cab818ba6b4324fd8eda643d5f16b2 Author: Stanislav Fomichev Date: Fri May 24 15:28:56 2019 -0700 selftests/bpf: fail test_tunnel.sh if subtests fail Right now test_tunnel.sh always exits with success even if some of the subtests fail. Since the output is very verbose, it's hard to spot the issues with subtests. Let's fail the script if any subtest fails. Signed-off-by: Stanislav Fomichev Acked-by: Yonghong Song Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/test_tunnel.sh | 32 ++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit c9e0c8d91ead25b073193b5478deeaf3fd60a10a Author: Michal Wajdeczko Date: Mon May 27 18:36:12 2019 +0000 drm/i915/huc: Define HuC firmware version for Icelake Define HuC firmware version for Icelake. v2: 8.4.3238 is now available Signed-off-by: Michal Wajdeczko Cc: Daniele Ceraolo Spurio Cc: Joonas Lahtinen Cc: Anusha Srivatsa Cc: Tony Ye Reviewed-by: Tony Ye Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190527183613.17076-17-michal.wajdeczko@intel.com drivers/gpu/drm/i915/intel_huc_fw.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit f4cc89992056f1a09bb9de5fb91f277aeb326641 Author: Michal Wajdeczko Date: Mon May 27 18:36:11 2019 +0000 drm/i915/guc: Define GuC firmware version for Icelake Define GuC firmware version for Icelake. Signed-off-by: Michal Wajdeczko Cc: Daniele Ceraolo Spurio Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Anusha Srivatsa Reviewed-by: Anusha Srivatsa Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190527183613.17076-16-michal.wajdeczko@intel.com drivers/gpu/drm/i915/intel_guc_fw.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit a18c3d5e4e420ebb45083e5d0761cca321c80f01 Author: Michal Wajdeczko Date: Mon May 27 18:36:10 2019 +0000 drm/i915/guc: Enable GuC CTB communication on Gen11 Gen11 GuC firmware expects H2G command messages to be sent over CTB (command transport buffers). Signed-off-by: Michal Wajdeczko Cc: Daniele Ceraolo Spurio Cc: Joonas Lahtinen Cc: John Spotswood Reviewed-by: Daniele Ceraolo Spurio Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190527183613.17076-15-michal.wajdeczko@intel.com drivers/gpu/drm/i915/i915_pci.c | 1 + 1 file changed, 1 insertion(+) commit 440f136bd3b7b30a27254d810179a9853e8a8ee6 Author: Michal Wajdeczko Date: Mon May 27 18:36:09 2019 +0000 drm/i915/guc: Update GuC CTB response definition Current GuC firmwares identify response message in a different way. v2: update comments for other H2G bits (Daniele) Signed-off-by: Michal Wajdeczko Cc: Daniele Ceraolo Spurio Cc: Kelvin Gardiner Cc: John Spotswood Reviewed-by: Daniele Ceraolo Spurio Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190527183613.17076-14-michal.wajdeczko@intel.com drivers/gpu/drm/i915/intel_guc_ct.c | 2 +- drivers/gpu/drm/i915/intel_guc_fwif.h | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) commit 54c52a8412501fe84bccc28bd443a29cdd3f84a1 Author: Oscar Mateo Date: Mon May 27 18:36:08 2019 +0000 drm/i915/guc: Correctly handle GuC interrupts on Gen11 Starting Gen11 GuC shares interrupt registers with SG unit instead of PM. But for now we don't care about SG interrupts. v2: (Chris) v3: rebased (Michal) v4: more bspec pages, use macros, update commit msg (Michal Wi) Bspec: 19820, 19840, 19841, 20176 Signed-off-by: Oscar Mateo Signed-off-by: Michal Wajdeczko Cc: Tvrtko Ursulin Cc: Daniele Ceraolo Spurio Cc: Joonas Lahtinen Reviewed-by: Michał Winiarski Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190527183613.17076-13-michal.wajdeczko@intel.com drivers/gpu/drm/i915/i915_irq.c | 53 +++++++++++++++++++++++++++++++++++- drivers/gpu/drm/i915/i915_irq.h | 3 ++ drivers/gpu/drm/i915/i915_reg.h | 4 +++ drivers/gpu/drm/i915/intel_guc.c | 3 ++ drivers/gpu/drm/i915/intel_guc_reg.h | 18 ++++++++++++ 5 files changed, 80 insertions(+), 1 deletion(-) commit 1e83e7a66d139e0568a395d9b4bbdee97c5e881b Author: Oscar Mateo Date: Mon May 27 18:36:07 2019 +0000 drm/i915/guc: Create vfuncs for the GuC interrupts control functions Controlling and handling of the GuC interrupts is Gen specific. Create virtual functions to avoid redundant runtime Gen checks. Gen-specific versions of these functions will follow. v2: move vfuncs to struct guc (Daniele) v3: rebased Signed-off-by: Oscar Mateo Signed-off-by: Michal Wajdeczko Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: Daniele Ceraolo Spurio Cc: Joonas Lahtinen Reviewed-by: Daniele Ceraolo Spurio Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190527183613.17076-12-michal.wajdeczko@intel.com drivers/gpu/drm/i915/i915_irq.c | 6 +++--- drivers/gpu/drm/i915/intel_guc.c | 8 ++++++-- drivers/gpu/drm/i915/intel_guc.h | 8 +++++++- drivers/gpu/drm/i915/intel_uc.c | 21 ++++++++++++++++++--- 4 files changed, 34 insertions(+), 9 deletions(-) commit 7c5ae251b048edc540a1dd245654fcc79f63a531 Author: Michal Wajdeczko Date: Mon May 27 18:36:06 2019 +0000 drm/i915/huc: New HuC status register for Gen11 Gen11 defines new register for checking HuC authentication status. Look into the right register and bit. v2: use reg/mask/value instead of dedicated functions (Daniele) BSpec: 19686 Signed-off-by: Michal Wajdeczko Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Tony Ye Cc: Vinay Belgaumkar Cc: John Spotswood Cc: Anusha Srivatsa Reviewed-by: Daniele Ceraolo Spurio Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190527183613.17076-11-michal.wajdeczko@intel.com drivers/gpu/drm/i915/intel_guc_reg.h | 3 +++ drivers/gpu/drm/i915/intel_huc.c | 26 +++++++++++++++++++------- drivers/gpu/drm/i915/intel_huc.h | 7 +++++++ 3 files changed, 29 insertions(+), 7 deletions(-) commit 2d4ed3a988e6b1ff9729d0edd74bf4890571253e Author: Michal Wajdeczko Date: Mon May 27 18:36:05 2019 +0000 drm/i915/guc: New GuC scratch registers for Gen11 Gen11 adds new set of scratch registers that can be used for MMIO based Host-to-Guc communication. Due to limited number of these registers it is expected that host will use them only for command transport buffers (CTB) communication setup if one is available. Bspec: 21044 Signed-off-by: Michal Wajdeczko Cc: Daniele Ceraolo Spurio Cc: Joonas Lahtinen Cc: Rodrigo Vivi Reviewed-by: Daniele Ceraolo Spurio Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190527183613.17076-10-michal.wajdeczko@intel.com drivers/gpu/drm/i915/intel_guc.c | 12 +++++++++--- drivers/gpu/drm/i915/intel_guc_reg.h | 3 +++ 2 files changed, 12 insertions(+), 3 deletions(-) commit 4a1f9dc119163677427fe03231af3bb0bf5adb4b Author: Michal Wajdeczko Date: Mon May 27 18:36:04 2019 +0000 drm/i915/guc: New GuC interrupt register for Gen11 Gen11 defines new more flexible Host-to-GuC interrupt register. Now the host can write any 32-bit payload to trigger an interrupt and GuC can additionally read this payload from the register. Current GuC firmware ignores the payload so we just write 0. Bspec: 21043 Signed-off-by: Michal Wajdeczko Cc: Daniele Ceraolo Spurio Cc: Joonas Lahtinen Cc: Rodrigo Vivi Reviewed-by: Daniele Ceraolo Spurio Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190527183613.17076-9-michal.wajdeczko@intel.com drivers/gpu/drm/i915/intel_guc.c | 14 +++++++++++++- drivers/gpu/drm/i915/intel_guc_reg.h | 1 + 2 files changed, 14 insertions(+), 1 deletion(-) commit afac50928403360f481a965b9bbc97bbd06f789f Author: Michal Wajdeczko Date: Mon May 27 18:36:03 2019 +0000 drm/i915/huc: Define HuC firmware version for Geminilake Define HuC firmware version for Geminilake. Signed-off-by: Michal Wajdeczko Cc: Daniele Ceraolo Spurio Cc: Joonas Lahtinen Cc: Anusha Srivatsa Cc: Tony Ye Reviewed-by: Anusha Srivatsa Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190527183613.17076-8-michal.wajdeczko@intel.com drivers/gpu/drm/i915/intel_huc_fw.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 415e7f0a7b89758c752da3f61794614e25939e1b Author: Michal Wajdeczko Date: Mon May 27 18:36:02 2019 +0000 drm/i915/guc: Define GuC firmware version for Geminilake Define GuC firmware version for Geminilake. Signed-off-by: Michal Wajdeczko Cc: Daniele Ceraolo Spurio Cc: Anusha Srivatsa Reviewed-by: Anusha Srivatsa Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190527183613.17076-7-michal.wajdeczko@intel.com drivers/gpu/drm/i915/intel_guc_fw.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit e958cc908792d0a433c9abf9bf47e97648e4c204 Author: Michal Wajdeczko Date: Mon May 27 18:36:01 2019 +0000 drm/i915/guc: Always ask GuC to update power domain states With newer GuC firmware it is always ok to ask GuC to update power domain states. Make it an unconditional initialization step. Signed-off-by: Michal Wajdeczko Cc: Daniele Ceraolo Spurio Cc: John Spotswood Reviewed-by: Daniele Ceraolo Spurio Reviewed-by: John Spotswood Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190527183613.17076-6-michal.wajdeczko@intel.com drivers/gpu/drm/i915/intel_guc_submission.c | 4 ---- drivers/gpu/drm/i915/intel_uc.c | 8 ++++---- 2 files changed, 4 insertions(+), 8 deletions(-) commit 386e300fe9fae7e6a15014a1dba28e44f55a8e73 Author: Michal Wajdeczko Date: Mon May 27 18:36:00 2019 +0000 drm/i915/guc: Reset GuC ADS during sanitize GuC stores some data in there, which might be stale after a reset. Reinitialize whole ADS in case any part of it was corrupted during previous GuC run. v2: s/reinit/init, update functions descriptions (Tomek/Michal) v3: reset ADS right before fw upload Signed-off-by: Michal Wajdeczko Cc: Daniele Ceraolo Spurio Cc: MichaĹ Winiarski Cc: Tomasz Lis Reviewed-by: Tomasz Lis #v2 Reviewed-by: MichaĹ Winiarski #v2 Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190527183613.17076-5-michal.wajdeczko@intel.com drivers/gpu/drm/i915/intel_guc_ads.c | 90 +++++++++++++++++++++++------------- drivers/gpu/drm/i915/intel_guc_ads.h | 1 + drivers/gpu/drm/i915/intel_uc.c | 4 +- 3 files changed, 63 insertions(+), 32 deletions(-) commit ffd5ce22faa4d07a07085b497717d7650f72fd5f Author: Michal Wajdeczko Date: Mon May 27 18:35:59 2019 +0000 drm/i915/guc: Updates for GuC 32.0.3 firmware New GuC 32.0.3 firmware made many changes around its ABI that require driver updates: * FW release version numbering schema now includes patch number * FW release version encoding in CSS header * Boot parameters * Suspend/resume protocol * Sample-forcewake command * Additional Data Structures (ADS) This commit is a squash of patches 3-8 from series [1]. [1] https://patchwork.freedesktop.org/series/58760/ Signed-off-by: Michal Wajdeczko Cc: Joonas Lahtinen Cc: Daniele Ceraolo Spurio Cc: Rodrigo Vivi Cc: Anusha Srivatsa Cc: Jeff Mcgee Cc: John Spotswood Cc: Tvrtko Ursulin Cc: Tomasz Lis Acked-by: Daniele Ceraolo Spurio # numbering schema Acked-by: Daniele Ceraolo Spurio # ccs heaser Acked-by: Daniele Ceraolo Spurio # boot params Acked-by: John Spotswood # suspend/resume Acked-by: Daniele Ceraolo Spurio # sample-forcewake Acked-by: John Spotswood # sample-forcewake Acked-by: Daniele Ceraolo Spurio # ADS Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190527183613.17076-4-michal.wajdeczko@intel.com drivers/gpu/drm/i915/gt/intel_engine.h | 2 + drivers/gpu/drm/i915/gt/intel_engine_cs.c | 9 +- drivers/gpu/drm/i915/intel_guc.c | 88 ++++++-------- drivers/gpu/drm/i915/intel_guc_ads.c | 95 +++++++++------ drivers/gpu/drm/i915/intel_guc_fw.c | 75 ++++++------ drivers/gpu/drm/i915/intel_guc_fwif.h | 191 ++++++++++++++---------------- drivers/gpu/drm/i915/intel_uc_fw.c | 20 ++-- 7 files changed, 237 insertions(+), 243 deletions(-) commit a2904ade3dc28cf1a1b7deded41f4369f75e664c Author: Michal Wajdeczko Date: Mon May 27 18:35:58 2019 +0000 drm/i915/guc: Don't allow GuC submission Due to the upcoming changes to the GuC ABI interface, we must disable GuC submission mode until final ABI will be available on all GuC firmwares. To avoid regressions on systems configured to run with no longer supported configuration "enable_guc=3" or "enable_guc=1" clear GuC submission bit. v2: force switch to non-GuC submission mode v3: use GEM_BUG_ON (Joonas) Signed-off-by: Michal Wajdeczko Cc: Joonas Lahtinen Cc: Chris Wilson Cc: Rodrigo Vivi Cc: Daniele Ceraolo Spurio Cc: John Spotswood Cc: Vinay Belgaumkar Cc: Tony Ye Cc: Anusha Srivatsa Cc: Jeff Mcgee Cc: Antonio Argenziano Cc: Sujaritha Sundaresan Cc: Martin Peres Acked-by: Martin Peres Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190527183613.17076-3-michal.wajdeczko@intel.com drivers/gpu/drm/i915/intel_uc.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit cc80b2ef24898dc62242e194270200b01ca758d1 Author: Michal Wajdeczko Date: Mon May 27 18:35:57 2019 +0000 drm/i915/guc: Change platform default GuC mode Today our most desired GuC configuration is to only enable HuC if it is available (as we need authenticated HuC firmware to enable all media codecs on the hardware) and we really don't care about having GuC submission enabled. Change platform default GuC mode to match our goal, but note that we still don't change default modparam value (GuC/HuC disabled). v2: add why HuC is so important (Joonas) Signed-off-by: Michal Wajdeczko Cc: Joonas Lahtinen Cc: Chris Wilson Cc: Rodrigo Vivi Cc: Daniele Ceraolo Spurio Cc: John Spotswood Cc: Vinay Belgaumkar Cc: Tony Ye Cc: Anusha Srivatsa Cc: Jeff Mcgee Cc: Antonio Argenziano Cc: Sujaritha Sundaresan Acked-by: Tony Ye Reviewed-by: Sujaritha Sundaresan Reviewed-by: Joonas Lahtinen Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190527183613.17076-2-michal.wajdeczko@intel.com drivers/gpu/drm/i915/intel_uc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 463910a5dd63655ce3bdbb9171ad40a31a044fe7 Merge: d98363b510ce 55d778076b03 Author: Daniel Borkmann Date: Tue May 28 11:05:43 2019 +0200 Merge branch 'bpf-bpftool-dbg-output' Quentin Monnet says: ==================== This series adds an option to bpftool to make it print additional information via libbpf and the kernel verifier when attempting to load programs. A new API function is added to libbpf in order to pass the log_level from bpftool with the bpf_object__* part of the API. Options for a finer control over the log levels to use for libbpf and the verifier could be added in the future, if desired. v3: - Fix and clarify commit logs. v2: - Do not add distinct options for libbpf and verifier logs, just keep the one that sets all log levels to their maximum. Rename the option. - Do not offer a way to pick desired log levels. The choice is "use the option to print all logs" or "stick with the defaults". - Do not export BPF_LOG_* flags to user header. - Update all man pages (most bpftool operations use libbpf and may print libbpf logs). Verifier logs are only used when attempting to load programs for now, so bpftool-prog.rst and bpftool.rst remain the only pages updated in that regard. Previous discussion available at: https://lore.kernel.org/bpf/20190523105426.3938-1-quentin.monnet@netronome.com/ https://lore.kernel.org/bpf/20190429095227.9745-1-quentin.monnet@netronome.com/ ==================== Acked-by: Yonghong Song Signed-off-by: Daniel Borkmann commit 55d778076b0354b088a9a16d9ff584c887e17f42 Author: Quentin Monnet Date: Fri May 24 11:36:48 2019 +0100 tools: bpftool: make -d option print debug output from verifier The "-d" option is used to require all logs available for bpftool. So far it meant telling libbpf to print even debug-level information. But there is another source of info that can be made more verbose: when we attemt to load programs with bpftool, we can pass a log_level parameter to the verifier in order to control the amount of information that is printed to the console. Reuse the "-d" option to print all information the verifier can tell. At this time, this means logs related to BPF_LOG_LEVEL1, BPF_LOG_LEVEL2 and BPF_LOG_STATS. As mentioned in the discussion on the first version of this set, these macros are internal to the kernel (include/linux/bpf_verifier.h) and are not meant to be part of the stable user API, therefore we simply use the related constants to print whatever we can at this time, without trying to tell users what is log_level1 or what is statistics. Verifier logs are only used when loading programs for now (In the future: for loading BTF objects with bpftool? Although libbpf does not currently offer to print verifier info at debug level if no error occurred when loading BTF objects), so bpftool.rst and bpftool-prog.rst are the only man pages to get the update. v3: - Add details on log level and BTF loading at the end of commit log. v2: - Remove the possibility to select the log levels to use (v1 offered a combination of "log_level1", "log_level2" and "stats"). - The macros from kernel header bpf_verifier.h are not used (and therefore not moved to UAPI header). - In v1 this was a distinct option, but is now merged in the only "-d" switch to activate libbpf and verifier debug-level logs all at the same time. Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski Signed-off-by: Daniel Borkmann tools/bpf/bpftool/Documentation/bpftool-prog.rst | 5 +++-- tools/bpf/bpftool/Documentation/bpftool.rst | 5 +++-- tools/bpf/bpftool/main.c | 2 ++ tools/bpf/bpftool/main.h | 1 + tools/bpf/bpftool/prog.c | 27 +++++++++++++++--------- 5 files changed, 26 insertions(+), 14 deletions(-) commit 60276f9849988d3d3a54943c9ec27222c5819dae Author: Quentin Monnet Date: Fri May 24 11:36:47 2019 +0100 libbpf: add bpf_object__load_xattr() API function to pass log_level libbpf was recently made aware of the log_level attribute for programs, used to specify the level of information expected to be dumped by the verifier. Function bpf_prog_load_xattr() got support for this log_level parameter. But some applications using libbpf rely on another function to load programs, bpf_object__load(), which does accept any parameter for log level. Create an API function based on bpf_object__load(), but accepting an "attr" object as a parameter. Then add a log_level field to that object, so that applications calling the new bpf_object__load_xattr() can pick the desired log level. v3: - Rewrite commit log. v2: - We are in a new cycle, bump libbpf extraversion number. Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski Signed-off-by: Daniel Borkmann tools/lib/bpf/Makefile | 2 +- tools/lib/bpf/libbpf.c | 20 +++++++++++++++++--- tools/lib/bpf/libbpf.h | 6 ++++++ tools/lib/bpf/libbpf.map | 1 + 4 files changed, 25 insertions(+), 4 deletions(-) commit 775bc8ada89b376b4bbbce31aba47f4117fe1d9c Author: Quentin Monnet Date: Fri May 24 11:36:46 2019 +0100 tools: bpftool: add -d option to get debug output from libbpf libbpf has three levels of priority for output messages: warn, info, debug. By default, debug output is not printed to the console. Add a new "--debug" (short name: "-d") option to bpftool to print libbpf logs for all three levels. Internally, we simply use the function provided by libbpf to replace the default printing function by one that prints logs regardless of their level. v2: - Remove the possibility to select the log-levels to use (v1 offered a combination of "warn", "info" and "debug"). - Rename option and offer a short name: -d|--debug. - Add option description to all bpftool manual pages (instead of bpftool-prog.rst only), as all commands use libbpf. Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski Signed-off-by: Daniel Borkmann tools/bpf/bpftool/Documentation/bpftool-btf.rst | 4 ++++ tools/bpf/bpftool/Documentation/bpftool-cgroup.rst | 4 ++++ tools/bpf/bpftool/Documentation/bpftool-feature.rst | 4 ++++ tools/bpf/bpftool/Documentation/bpftool-map.rst | 4 ++++ tools/bpf/bpftool/Documentation/bpftool-net.rst | 4 ++++ tools/bpf/bpftool/Documentation/bpftool-perf.rst | 4 ++++ tools/bpf/bpftool/Documentation/bpftool-prog.rst | 4 ++++ tools/bpf/bpftool/Documentation/bpftool.rst | 3 +++ tools/bpf/bpftool/bash-completion/bpftool | 2 +- tools/bpf/bpftool/main.c | 14 +++++++++++++- 10 files changed, 45 insertions(+), 2 deletions(-) commit d98363b510ce9938a19b07fe3c02357d8c65d52a Author: Hariprasad Kelam Date: Sat May 25 14:32:57 2019 +0530 libbpf: fix warning that PTR_ERR_OR_ZERO can be used Fix below warning reported by coccicheck: /tools/lib/bpf/libbpf.c:3461:1-3: WARNING: PTR_ERR_OR_ZERO can be used Signed-off-by: Hariprasad Kelam Acked-by: Yonghong Song Signed-off-by: Daniel Borkmann tools/lib/bpf/libbpf.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 92bd6820f2b11c2decdd92e1f9020e804dbc2ed1 Author: Chang-Hsien Tsai Date: Sun May 26 10:32:11 2019 +0000 bpf: style fix in while(!feof()) loop Use fgets() as the while loop condition. Signed-off-by: Chang-Hsien Tsai Acked-by: Yonghong Song Signed-off-by: Daniel Borkmann tools/bpf/bpftool/xlated_dumper.c | 4 +--- tools/testing/selftests/bpf/trace_helpers.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) commit e1afb70252a8614e1ef7aec05ff1b84fd324b782 Author: Yonghong Song Date: Sat May 25 11:57:53 2019 -0700 bpf: check signal validity in nmi for bpf_send_signal() helper Commit 8b401f9ed244 ("bpf: implement bpf_send_signal() helper") introduced bpf_send_signal() helper. If the context is nmi, the sending signal work needs to be deferred to irq_work. If the signal is invalid, the error will appear in irq_work and it won't be propagated to user. This patch did an early check in the helper itself to notify user invalid signal, as suggested by Daniel. Suggested-by: Daniel Borkmann Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann kernel/trace/bpf_trace.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 0d97dacc46d9af2daba1af224747d452bd988365 Author: Andrii Nakryiko Date: Sat May 25 17:01:01 2019 -0700 bpftool: auto-complete BTF IDs for btf dump Auto-complete BTF IDs for `btf dump id` sub-command. List of possible BTF IDs is scavenged from loaded BPF programs that have associated BTFs, as there is currently no API in libbpf to fetch list of all BTFs in the system. Suggested-by: Quentin Monnet Signed-off-by: Andrii Nakryiko Reviewed-by: Quentin Monnet Signed-off-by: Daniel Borkmann tools/bpf/bpftool/bash-completion/bpftool | 9 +++++++++ 1 file changed, 9 insertions(+) commit 910f38bed9439e765f7e240edfe32b5f04ad92f5 Author: Rob Herring Date: Mon May 13 19:50:33 2019 -0500 dt-bindings: gpio: Convert Arm PL061 to json-schema Convert the Arm PL061 GPIO controller binding to json-schema format. As I'm the author for all but the gpio-ranges line, make the schema dual GPL/BSD license. Cc: Bartosz Golaszewski Cc: linux-gpio@vger.kernel.org Signed-off-by: Rob Herring Signed-off-by: Linus Walleij .../devicetree/bindings/gpio/pl061-gpio.txt | 10 ---- .../devicetree/bindings/gpio/pl061-gpio.yaml | 69 ++++++++++++++++++++++ 2 files changed, 69 insertions(+), 10 deletions(-) commit 919c46c89bff432f45994259d28d774212cf6e8d Author: Luca Ceresoli Date: Fri May 10 11:03:39 2019 +0200 Documentation: gpio: remove duplicated lines The 'default (active high)' lines are repeated twice. Avoid people stare at their screens looking for differences. Signed-off-by: Luca Ceresoli Reviewed-by: Bartosz Golaszewski Signed-off-by: Linus Walleij Documentation/driver-api/gpio/consumer.rst | 2 -- 1 file changed, 2 deletions(-) commit 315c1a8ebd74386e629fe03b220117a00a22afc0 Author: Linus Walleij Date: Thu May 23 11:49:47 2019 +0200 gpio: ixp4xx: Use irq_domain_translate_twocell() Use standard functions. Eventually we will be able to drop all checks and just assign irq_domain_translate_twocell() to this callback. Cc: Brian Masney Signed-off-by: Linus Walleij drivers/gpio/gpio-ixp4xx.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 4b3d50062ce06530adc27224a1e10f087d0c9caf Author: Linus Walleij Date: Thu May 23 10:17:36 2019 +0200 gpio: Fix minor grammar errors in documentation This fixes up some of my own mistakes when I stressed to refresh the documentation. Signed-off-by: Linus Walleij Documentation/driver-api/gpio/driver.rst | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit db9477f8b549b12943f513c18c7b10acd7d97e6e Author: Linus Walleij Date: Thu May 23 08:54:19 2019 +0200 gpio: Update Kconfig text for GPIO_SYSFS This feature is deprecated, it is helpful to inform users about this. I'm resisting the temptation to add "depends on BROKEN" to this, but saving that for later. Reviewed-by: Bartosz Golaszewski Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 663ba742d2fe2eb1bcf40261fc8532d793c9d0a0 Author: Andrey Smirnov Date: Sun Apr 28 22:49:48 2019 -0700 gpio: vf610: Use PTR_ERR_OR_ZERO() in vf610_gpio_probe() Simplify error checking code by replacing multiple ERR macros with a call to PTR_ERR_OR_ZERO. No functional change intended. Signed-off-by: Andrey Smirnov Cc: Chris Healy Cc: linux-gpio@vger.kernel.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Bartosz Golaszewski Signed-off-by: Linus Walleij drivers/gpio/gpio-vf610.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 1eaf5faab18cd55a3658e0c7517654325f59a793 Author: Chengguang Xu Date: Tue May 28 10:59:47 2019 +0800 ext2: optimize ext2_xattr_get() Since xattr entry names are sorted, we don't have to continue when current entry name is greater than target. Signed-off-by: Chengguang Xu Signed-off-by: Jan Kara fs/ext2/xattr.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit d561d4dd4f560e4d97bf665c5eeab7ac9fe8aca3 Author: Chengguang Xu Date: Tue May 28 10:59:46 2019 +0800 ext2: introduce new helper for xattr entry comparison Introduce new helper ext2_xattr_cmp_entry() for xattr entry comparison. Signed-off-by: Chengguang Xu Signed-off-by: Jan Kara fs/ext2/xattr.c | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) commit 9bb1d7a6bcde2e45ecb29967b77e6716e155c252 Author: Chengguang Xu Date: Tue May 28 10:59:45 2019 +0800 ext2: merge xattr next entry check to ext2_xattr_entry_valid() We have introduced ext2_xattr_entry_valid() for xattr entry sanity check, so it's better to do relevant things in one place. Signed-off-by: Chengguang Xu Signed-off-by: Jan Kara fs/ext2/xattr.c | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) commit df4f3c603aeb6dd40b74b93bf2db6d9c3213d4e1 Author: Lu Baolu Date: Sat May 25 13:41:36 2019 +0800 iommu/vt-d: Remove static identity map code The code to prepare the static identity map for various reserved memory ranges in intel_iommu_init() is duplicated with the default domain mechanism now. Remove it to avoid duplication. Signed-off-by: James Sewart Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 144 +------------------------------------------- 1 file changed, 1 insertion(+), 143 deletions(-) commit b7297783c2bb6fa7bd557842657bed7e95220978 Author: Lu Baolu Date: Sat May 25 13:41:35 2019 +0800 iommu/vt-d: Remove duplicated code for device hotplug The iommu generic code has handled the device hotplug cases. Remove the duplicated code. Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 34 ---------------------------------- 1 file changed, 34 deletions(-) commit 0e31a7266508487bd48bfc5507a3369b797300b1 Author: Lu Baolu Date: Sat May 25 13:41:34 2019 +0800 iommu/vt-d: Remove startup parameter from device_def_domain_type() It isn't used anywhere. Remove it to make code concise. Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 4ec066c7b1476e0ca66a7acdb575627a5d1a1ee6 Author: Lu Baolu Date: Sat May 25 13:41:33 2019 +0800 iommu/vt-d: Cleanup get_valid_domain_for_dev() Previously, get_valid_domain_for_dev() is used to retrieve the DMA domain which has been attached to the device or allocate one if no domain has been attached yet. As we have delegated the DMA domain management to upper layer, this function is used purely to allocate a private DMA domain if the default domain doesn't work for ths device. Cleanup the code for readability. Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 18 ++++++++---------- include/linux/intel-iommu.h | 1 - 2 files changed, 8 insertions(+), 11 deletions(-) commit 8af46c784ecfe8929f66b5eaae987f6874953226 Author: Lu Baolu Date: Sat May 25 13:41:32 2019 +0800 iommu/vt-d: Implement is_attach_deferred iommu ops entry As a domain is now attached to a device earlier, we should implement the is_attach_deferred call-back and use it to defer the domain attach from iommu driver init to device driver init when iommu is pre-enabled in kdump kernel. Suggested-by: Tom Murphy Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit fa212a97f3a366adcb2046c565e7c978ab067c73 Author: Lu Baolu Date: Sat May 25 13:41:31 2019 +0800 iommu/vt-d: Probe DMA-capable ACPI name space devices Some platforms may support ACPI name-space enumerated devices that are capable of generating DMA requests. Platforms which support DMA remapping explicitly declares any such DMA-capable ACPI name-space devices in the platform through ACPI Name-space Device Declaration (ANDD) structure and enumerate them through the Device Scope of the appropriate remapping hardware unit. Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit 98b2fffb5e274d73e47d495da2caf213cfa28fc8 Author: Lu Baolu Date: Sat May 25 13:41:30 2019 +0800 iommu/vt-d: Handle 32bit device with identity default domain The iommu driver doesn't know whether the bit width of a PCI device is sufficient for access to the whole system memory. Hence, the driver checks this when the driver calls into the dma APIs. If a device is using an identity domain, but the bit width is less than the system requirement, we need to use a dma domain instead. This also applies after we delegated the domain life cycle management to the upper layer. Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 55 ++++++++++++++++++--------------------------- 1 file changed, 22 insertions(+), 33 deletions(-) commit 942067f1b6b97b1e97cd073b0e2815bc499656db Author: Lu Baolu Date: Sat May 25 13:41:29 2019 +0800 iommu/vt-d: Identify default domains replaced with private When we put a device into an iommu group, the group's default domain will be attached to the device. There are some corner cases where the type (identity or dma) of the default domain doesn't work for the device and the request of a new default domain results in failure (e.x. multiple devices have already existed in the group). In order to be compatible with the past, we used a private domain. Mark the private domains and disallow some iommu apis (map/unmap/iova_to_phys) on them. Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 64 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 63 insertions(+), 1 deletion(-) commit fa954e683178949e3c50a7d40c176e7b951bb22d Author: Lu Baolu Date: Sat May 25 13:41:28 2019 +0800 iommu/vt-d: Delegate the dma domain to upper layer This allows the iommu generic layer to allocate a dma domain and attach it to a device through the iommu api's. With all types of domains being delegated to upper layer, we can remove an internal flag which was used to distinguish domains mananged internally or externally. Signed-off-by: James Sewart Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 74 ++++++++++++--------------------------------- 1 file changed, 19 insertions(+), 55 deletions(-) commit 4de354ec2f0c0529980ea4aa9fc4f35b296d3de8 Author: Lu Baolu Date: Sat May 25 13:41:27 2019 +0800 iommu/vt-d: Delegate the identity domain to upper layer This allows the iommu generic layer to allocate an identity domain and attach it to a device. Hence, the identity domain is delegated to upper layer. As a side effect, iommu_identity_mapping can't be used to check the existence of identity domains any more. Signed-off-by: James Sewart Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 90 +++++++++++++++++++++++++++++---------------- 1 file changed, 58 insertions(+), 32 deletions(-) commit f273a453b740772beef4ccb7220cb930176ab38b Author: Lu Baolu Date: Sat May 25 13:41:26 2019 +0800 iommu/vt-d: Add device_def_domain_type() helper This helper returns the default domain type that the device requires. Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 40 +++++++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 13 deletions(-) commit d8190dc638866fe5811d4b45b3af6f34b3f5870f Author: Lu Baolu Date: Sat May 25 13:41:25 2019 +0800 iommu/vt-d: Enable DMA remapping after rmrr mapped The rmrr devices require identity map of the rmrr regions before enabling DMA remapping. Otherwise, there will be a window during which DMA from/to the rmrr regions will be blocked. In order to alleviate this, we move enabling DMA remapping after all rmrr regions get mapped. Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit d850c2ee5fe2259968e3889624ad22ea15cb4a38 Author: Lu Baolu Date: Sat May 25 13:41:24 2019 +0800 iommu/vt-d: Expose ISA direct mapping region via iommu_get_resv_regions To support mapping ISA region via iommu_group_create_direct_mappings, make sure its exposed by iommu_get_resv_regions. Signed-off-by: James Sewart Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 2491b544ff3aa9717d427033206fa793be53429d Merge: b27e35ae5b18 14ee642c2ab0 Author: Jani Nikula Date: Tue May 28 11:07:59 2019 +0300 Merge drm/drm-next into drm-intel-next-queued Get the HDR dependencies originally merged via drm-misc. Sync up all i915 changes applied via other trees. And get v5.2-rc2 as the baseline. Signed-off-by: Jani Nikula commit 7f58351a7c57d2a7f15c89683b7a1d2d4fb38066 Author: Chengguang Xu Date: Tue May 28 13:32:31 2019 +0800 ext2: code cleanup for ext2_preread_inode() Calling bdi_rw_congested() instead of calling bdi_read_congested() and bdi_write_congested(). Signed-off-by: Chengguang Xu Signed-off-by: Jan Kara fs/ext2/ialloc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 968e8e9fde25ae34afd7af7e5766776526b8c467 Merge: 213ed4b8079d f23a09eea1e7 Author: Takashi Iwai Date: Tue May 28 09:42:23 2019 +0200 Merge branch 'topic/line6-cleanup' into for-next Pull LINE6 driver cleanups and fixes. Signed-off-by: Takashi Iwai commit 5e343fbb7176a082dec8632f72999aba82f0e720 Author: Przemyslaw Gaj Date: Tue Apr 16 09:36:15 2019 +0100 dt-bindings: i3c: Document dropped support for I2C 10 bit devices Because this patch series dropped support for 10 bit I2C devices, I'm documenting this. Signed-off-by: Przemyslaw Gaj Signed-off-by: Boris Brezillon Documentation/devicetree/bindings/i3c/i3c.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 88c50322449a4dea8687ed155968d19cfc763393 Author: Przemyslaw Gaj Date: Tue Apr 16 09:36:14 2019 +0100 i3c: Drop support for I2C 10 bit addresing This patch drops support for I2C devices with 10 bit addressing. When I2C device with 10 bit address is defined in DT, I3C master registration fails. Address space for I2C devices has been reduced and ->i2c_funcs() hook has been removed. Because this patch series dropped support for 10 bit I2C devices, support is also dropped in Cadence I3C master driver and Synopsys DesignWare I3C master driver. Signed-off-by: Przemyslaw Gaj Signed-off-by: Boris Brezillon drivers/i3c/master.c | 21 ++++++++++++++------- drivers/i3c/master/dw-i3c-master.c | 6 ------ drivers/i3c/master/i3c-master-cdns.c | 10 +--------- include/linux/i3c/master.h | 5 +---- 4 files changed, 16 insertions(+), 26 deletions(-) commit 4672b1d65fc9b5a5ded911fbebb4853b892d5d89 Merge: cf57fdc8e42b 14ee642c2ab0 Author: Maarten Lankhorst Date: Tue May 28 09:38:59 2019 +0200 Merge remote-tracking branch 'drm/drm-next' into drm-misc-next This picks up rc2 for us as well. Signed-off-by: Maarten Lankhorst commit a3ce17d1495b65d62fceb2c7a704bb97133c5de9 Author: Chaitanya Tata Date: Wed May 1 18:25:24 2019 +0530 cfg80211: Handle bss expiry during connection If the BSS is expired during connection, the connect result will trigger a kernel warning. Ideally cfg80211 should hold the BSS before the connection is attempted, but as the BSSID is not known in case of auth/assoc MLME offload (connect op) it doesn't. For those drivers without the connect op cfg80211 holds down the reference so it wil not be removed from list. Fix this by removing the warning and silently adding the BSS back to the bss list which is return by the driver (with proper BSSID set) or in case the BSS is already added use that. The requirements for drivers are documented in the API's. Signed-off-by: Chaitanya Tata [formatting fixes, keep old timestamp] Signed-off-by: Johannes Berg include/net/cfg80211.h | 15 +++++++++++---- net/wireless/core.h | 4 ++++ net/wireless/scan.c | 12 +++++++----- net/wireless/sme.c | 32 ++++++++++++++++++++++++++++---- 4 files changed, 50 insertions(+), 13 deletions(-) commit b27e35ae5b1804078cfd177082429eea9de01885 Author: Chris Wilson Date: Mon May 27 12:51:14 2019 +0100 drm/i915: Keep user GGTT alive for a minimum of 250ms Do not allow runtime pm autosuspend to remove userspace GGTT mmaps too quickly. For example, igt sets the autosuspend delay to 0, and so we immediately attempt to perform runtime suspend upon releasing the wakeref. Unfortunately, that involves tearing down GGTT mmaps as they require an active device. Override the autosuspend for GGTT mmaps, by keeping the wakeref around for 250ms after populating the PTE for a fresh mmap. v2: Prefer refcount_t for its under/overflow error detection v3: Flush the user runtime autosuspend prior to system system. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190527115114.13448-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/Kconfig.profile | 14 ++++++++ drivers/gpu/drm/i915/i915_drv.h | 3 ++ drivers/gpu/drm/i915/i915_gem.c | 7 ++++ drivers/gpu/drm/i915/i915_gem_pm.c | 1 + drivers/gpu/drm/i915/intel_wakeref.c | 63 ++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_wakeref.h | 31 ++++++++++++++++++ 6 files changed, 119 insertions(+) commit cf57fdc8e42bd88dae1213a2bbe683d4b6c2190b Author: Benjamin Gaignard Date: Mon May 27 13:58:30 2019 +0200 drm/stm: ltdc: restore calls to clk_{enable/disable} Restore calls to clk_{enable/disable} deleted after applying the wrong version of the patch Fixes: fd6905fca4f0 ("drm/stm: ltdc: remove clk_round_rate comment") Signed-off-by: Benjamin Gaignard Acked-by: Philippe Cornu Signed-off-by: Benjamin Gaignard Link: https://patchwork.freedesktop.org/patch/msgid/20190527115830.15836-1-benjamin.gaignard@st.com drivers/gpu/drm/stm/ltdc.c | 2 ++ 1 file changed, 2 insertions(+) commit 7c80eb1c7e2b8420477fbc998971d62a648035d9 Author: Jeremy Sowden Date: Sat May 25 19:09:35 2019 +0100 af_key: fix leaks in key_pol_get_resp and dump_sp. In both functions, if pfkey_xfrm_policy2msg failed we leaked the newly allocated sk_buff. Free it on error. Fixes: 55569ce256ce ("Fix conversion between IPSEC_MODE_xxx and XFRM_MODE_xxx.") Reported-by: syzbot+4f0529365f7f2208d9f0@syzkaller.appspotmail.com Signed-off-by: Jeremy Sowden Signed-off-by: Steffen Klassert net/key/af_key.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit b38ff4075a80b4da5cb2202d7965332ca0efb213 Author: Anirudh Gupta Date: Tue May 21 20:59:47 2019 +0530 xfrm: Fix xfrm sel prefix length validation Family of src/dst can be different from family of selector src/dst. Use xfrm selector family to validate address prefix length, while verifying new sa from userspace. Validated patch with this command: ip xfrm state add src 1.1.6.1 dst 1.1.6.2 proto esp spi 4260196 \ reqid 20004 mode tunnel aead "rfc4106(gcm(aes))" \ 0x1111016400000000000000000000000044440001 128 \ sel src 1011:1:4::2/128 sel dst 1021:1:4::2/128 dev Port5 Fixes: 07bf7908950a ("xfrm: Validate address prefix lengths in the xfrm selector.") Signed-off-by: Anirudh Gupta Acked-by: Herbert Xu Signed-off-by: Steffen Klassert net/xfrm/xfrm_user.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit f23a09eea1e7947611d985d8cd13d55428ff0af8 Author: Takashi Iwai Date: Tue May 28 09:05:31 2019 +0200 ALSA: line6: Use container_of() ... instead of unconditional cast. Signed-off-by: Takashi Iwai sound/usb/line6/pod.c | 12 +++++++----- sound/usb/line6/podhd.c | 8 +++++--- sound/usb/line6/toneport.c | 14 +++++++------- sound/usb/line6/variax.c | 10 ++++++---- 4 files changed, 25 insertions(+), 19 deletions(-) commit fd86575fe5d0ac9b15ad52760243245fcd57fd92 Author: Fabio Estevam Date: Mon May 27 15:37:14 2019 -0300 drm/damage-helper: Use NULL instead of 0 The 'clips' member is a pointer, so assign NULL instead of 0. This fixes the following sparse warning: drivers/gpu/drm/drm_damage_helper.c:289:31: warning: Using plain integer as NULL pointer Signed-off-by: Fabio Estevam Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190527183714.11168-1-festevam@gmail.com drivers/gpu/drm/drm_damage_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit be8fd484e9c23e49ffe1d163c8d32c8c7b745941 Author: Takashi Iwai Date: Wed May 8 15:56:29 2019 +0200 ALSA: line6: Drop superfluous timer helper function Now all timer usages in line6 drivers are gone, we can get rid of some helper macro and function that became superfluous. Signed-off-by: Takashi Iwai sound/usb/line6/driver.c | 11 ----------- sound/usb/line6/driver.h | 9 --------- 2 files changed, 20 deletions(-) commit 6ea53391c04ebc84ff62e2df20f75d65f727f4e8 Author: Takashi Iwai Date: Wed May 8 15:55:36 2019 +0200 ALSA: line6: variax: Rewrite complex timer & work combo with a delayed work Variax driver had a very complex and staged startup sequence using multiple timers and a work. This patch simplifies the procedure to a single delayed work. Now the startup stage consists of: - VARIAX_STARTUP_VERSIONREQ: requesting the version and the message handler raises up to the next stage upon receiving the reply. The request is repeated until a reply arrives. - VARIAX_STARTUP_ACTIVATE: does activation, and queue for the next stage. - VARIAX_STARTUP_SETUP: registers the card. Signed-off-by: Takashi Iwai sound/usb/line6/variax.c | 128 +++++++++++++---------------------------------- 1 file changed, 35 insertions(+), 93 deletions(-) commit a91c1da77c99f1552c58a4451fc8972336627a53 Author: Takashi Iwai Date: Wed May 8 15:31:00 2019 +0200 ALSA: line6: podhd: Rewrite complex timer & work combo with a delayed work POD HD driver had a complex staged startup sequence with both timer and work. This patch simplifies it to a single delayed work with a single stage. Signed-off-by: Takashi Iwai sound/usb/line6/podhd.c | 74 ++++++------------------------------------------- 1 file changed, 8 insertions(+), 66 deletions(-) commit 516d3d1bedd34b2008f3530e4957ef97d449d5f7 Author: Takashi Iwai Date: Wed May 8 15:24:00 2019 +0200 ALSA: line6: pod: Rewrite complex timer & work combo with a delayed work The POD driver had a complex staged startup procedure using both timer and work. This patch simplifies it via a single delayed work with the reduced stages. Now basically only two intermediate stages: - POD_STARTUP_VERSIONREQ: requesting the version information and the process_message callback triggers the next stage, - POD_STARTUP_SETUP: registering the actual card object. Signed-off-by: Takashi Iwai sound/usb/line6/pod.c | 96 +++++++++++++++------------------------------------ 1 file changed, 27 insertions(+), 69 deletions(-) commit 213ed4b8079d933b794d4c72e9aedaf56577177f Merge: 98e3e43b599d 64ca9d9fcb3e Author: Takashi Iwai Date: Tue May 28 07:53:38 2019 +0200 Merge branch 'topic/hda-polling-mode' into for-next Pull the HD-audio polling mode changes, moving the stuff into HD-audio core for re-using it in ASoC. Signed-off-by: Takashi Iwai commit 64ca9d9fcb3e3c86b1417e3d17a90b43dd660f81 Author: Bard Liao Date: Mon May 27 00:58:36 2019 +0800 ASoC: SOF: Force polling mode on CFL and CNL There is a workaround in legacy HDA codec for too long time respone with CFL machine. We need the same workaround on SOF driver. The same issue is also seen on CNL machine. Signed-off-by: Bard Liao Signed-off-by: Takashi Iwai sound/soc/sof/intel/hda.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 5e13cf6cd64c6a4c15a4426e6f1683093a495d9a Author: Bard Liao Date: Mon May 27 00:58:35 2019 +0800 ALSA: hda: add polling mode in snd_hdac_bus_get_response Polling mode is useful if a machine somehow missed an expected IRQ. Signed-off-by: Bard Liao Signed-off-by: Takashi Iwai sound/hda/hdac_controller.c | 2 ++ 1 file changed, 2 insertions(+) commit 8af42130b50c4d38f48fa82f3f7be4606d01f595 Author: Bard Liao Date: Mon May 27 00:58:34 2019 +0800 ALSA: hda: move polling_mode flag to struct hdac_bus polling mode is a useful function in the get_response function. Move polling_mode flag from struct azx to struct hdac_bus so people can implement polling mode in their own get_response function without adding a polling_mode flag in their local chip structure. Signed-off-by: Bard Liao Signed-off-by: Takashi Iwai include/sound/hdaudio.h | 3 +++ sound/pci/hda/hda_controller.c | 12 ++++++------ sound/pci/hda/hda_controller.h | 2 -- sound/pci/hda/hda_intel.c | 2 +- 4 files changed, 10 insertions(+), 9 deletions(-) commit bd2956e40edf2160f5c1a623d6d6c6ab7f8cd831 Author: Bard Liao Date: Mon May 27 00:58:33 2019 +0800 ALSA: hda: assign polling_mode after azx_bus_init We will move the polling_mode flag from struct azx to struct hdac_bus, and the flag should be assigned after bus init. Signed-off-by: Bard Liao Signed-off-by: Takashi Iwai sound/pci/hda/hda_intel.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 3e3ebed3fef4878e6f1680ff98088db1a9688831 Author: Christophe Leroy Date: Mon May 13 10:00:15 2019 +0000 powerpc/lib: only build ldstfp.o when CONFIG_PPC_FPU is set The entire code in ldstfp.o is enclosed into #ifdef CONFIG_PPC_FPU, so there is no point in building it when this config is not selected. Fixes: cd64d1697cf0 ("powerpc: mtmsrd not defined") Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman arch/powerpc/lib/Makefile | 3 ++- arch/powerpc/lib/ldstfp.S | 4 ---- 2 files changed, 2 insertions(+), 5 deletions(-) commit f8e0d0fddf87f26aed576983f752329de4c0900f Author: Christophe Leroy Date: Mon May 13 10:00:14 2019 +0000 powerpc/lib: fix redundant inclusion of quad.o quad.o is only for PPC64, and already included in obj64-y, so it doesn't have to be in obj-y Fixes: 31bfdb036f12 ("powerpc: Use instruction emulation infrastructure to handle alignment faults") Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman arch/powerpc/lib/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 00b0cdbbc87fb4b531a0d75f4004ed3d89999b80 Author: YueHaibing Date: Sat May 4 18:27:20 2019 +0800 ocxl: Make ocxl_remove() static Fix sparse warning: drivers/misc/ocxl/pci.c:44:6: warning: symbol 'ocxl_remove' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: YueHaibing Acked-by: Andrew Donnellan Signed-off-by: Michael Ellerman drivers/misc/ocxl/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d667edc01bedcd23988ef69f851e7cc26cc3c67f Author: YueHaibing Date: Sat May 4 18:24:27 2019 +0800 powerpc/mm: Make some symbols static that can be Noticed by sparse. Signed-off-by: YueHaibing Signed-off-by: Michael Ellerman arch/powerpc/mm/book3s64/hash_native.c | 2 +- arch/powerpc/mm/book3s64/hash_utils.c | 2 +- arch/powerpc/mm/book3s64/radix_pgtable.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit b02f6b6b711b13f609e73ebb01b516cf080d9a0f Author: YueHaibing Date: Sun May 26 09:19:02 2019 -0700 Input: tca8418 - remove set but not used variable 'max_keys' Fixes gcc '-Wunused-but-set-variable' warning: drivers/input/keyboard/tca8418_keypad.c: In function tca8418_keypad_probe: drivers/input/keyboard/tca8418_keypad.c:269:24: warning: variable max_keys set but not used [-Wunused-but-set-variable] It's not used since commit 16ff7cb1848a ("Input: tca8418-keypad - switch to using managed resources") Signed-off-by: YueHaibing Signed-off-by: Dmitry Torokhov drivers/input/keyboard/tca8418_keypad.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit b89a9f2f709a6ebeafb31069d87a1248022fc396 Author: YueHaibing Date: Sun May 26 09:17:45 2019 -0700 Input: synaptics-rmi4 - remove set but not used variable 'sensor_flags' Fixes gcc '-Wunused-but-set-variable' warning: drivers/input/rmi4/rmi_f12.c: In function rmi_f12_read_sensor_tuning: drivers/input/rmi4/rmi_f12.c:76:6: warning: variable sensor_flags set but not used [-Wunused-but-set-variable] It's not used since introduction in commit b43d2c1e9353 ("Input: synaptics-rmi4 - add support for F12") Signed-off-by: YueHaibing Signed-off-by: Dmitry Torokhov drivers/input/rmi4/rmi_f12.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 66f4c7765ad336c49243a4fd78de502fba5e9188 Author: Benjamin Tissoires Date: Mon May 27 18:45:29 2019 -0700 Input: elantech - remove P52 and P72 from SMBus blacklist Both now works correctly over SMBus. Let's use this driver so we can update all five fingers every 8ms. Signed-off-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov drivers/input/mouse/elantech.c | 4 ---- 1 file changed, 4 deletions(-) commit 140a79523e0a149b2501593e86fdb9cf7633b325 Author: Benjamin Tissoires Date: Mon May 27 18:44:40 2019 -0700 Input: elan_i2c - handle physical middle button Some models have a middle button, we should export it as well. Signed-off-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov drivers/input/mouse/elan_i2c_core.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 3abcc5329aecda19be1b9f91af51a257d23ccfe3 Author: Benjamin Tissoires Date: Mon May 27 18:43:49 2019 -0700 Input: elantech/SMBus - export all capabilities from the PS/2 node The recent touchpads might not have all the information regarding the characteristics through the I2C port. On some Lenovo t480s, this results in the touchpad not being detected as a clickpad, and on the Lenovo P52, this results in a failure while fetching the resolution through I2C. We need to imitate the Windows behavior: fetch the data under PS/2, and limit the querries under I2C. This patch prepares this by exporting the info from PS/2. Signed-off-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov drivers/input/mouse/elantech.c | 47 +++++++++++++++++++++++++++++++++++++----- drivers/input/mouse/elantech.h | 2 ++ 2 files changed, 44 insertions(+), 5 deletions(-) commit e3a9a12906887aab3465bb34a1a5e436287b185d Author: Benjamin Tissoires Date: Mon May 27 18:42:48 2019 -0700 Input: elan_i2c - do not query the info if they are provided See the previous patch for a long explanation. TL;DR: the P52 and the t480s from Lenovo can't rely on I2C to fetch the information, so we need it from PS/2. Signed-off-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov drivers/input/mouse/elan_i2c_core.c | 56 +++++++++++++++++++++++++++++-------- 1 file changed, 44 insertions(+), 12 deletions(-) commit 303b3cf95ed322ab781cafe4c279e58755d3d8ee Author: Benjamin Tissoires Date: Mon May 27 18:41:57 2019 -0700 dt-bindings: add more optional properties for elan_i2c touchpads Some new touchpads IC are connected through PS/2 and I2C. On some of these new IC, the I2C part doesn't have all of the information available. We need to be able to forward the touchpad parameters from PS/2 and thus, we need those new optional properties. Signed-off-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov Documentation/devicetree/bindings/input/elan_i2c.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) commit fd1cf11f7130977d44fc19bf7ced63a4b6f1fc30 Author: Benjamin Tissoires Date: Mon May 27 18:33:33 2019 -0700 Input: elantech - detect middle button based on firmware version Looks like the new generation of Lenovo machine also need to be added to the PnPID whitelist. This is definitively not going to scale, as there is nothing that tells us currently if a touchpad supports a true physical middle button. Consider that all new touchpads that are not clickpads (so matching ETP_NEW_IC_SMBUS_HOST_NOTIFY) are handling 3 physical buttons. Signed-off-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov drivers/input/mouse/elantech.c | 18 ++++++------------ drivers/input/mouse/elantech.h | 1 + 2 files changed, 7 insertions(+), 12 deletions(-) commit 88463497dd1f64eef9f21c6bbd19acabd0d8f88e Author: Benjamin Tissoires Date: Mon May 27 18:24:47 2019 -0700 Input: elantech - add helper function elantech_is_buttonpad() We check for this bit all over the code, better have it defined once for all. Signed-off-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov drivers/input/mouse/elantech.c | 93 ++++++++++++++++++++++-------------------- 1 file changed, 49 insertions(+), 44 deletions(-) commit 37548659bb223563797584c752274b81326d3f3c Author: Benjamin Tissoires Date: Mon May 27 18:24:28 2019 -0700 Input: elantech - query the min/max information beforehand too For the latest generation of Elantech touchpads, we need to forward the min/max information from PS/2 to SMBus. Prepare this work by fetching the information before creating the SMBus companion device. Signed-off-by: Benjamin Tissoires Signed-off-by: Dmitry Torokhov drivers/input/mouse/elantech.c | 160 +++++++++++++++++++---------------------- drivers/input/mouse/elantech.h | 5 ++ 2 files changed, 79 insertions(+), 86 deletions(-) commit c114dc5e5bb3e6b7cf72005ea2fc0a54097cab19 Merge: b62f97634aa9 7c7da40da164 Author: Dmitry Torokhov Date: Mon May 27 18:48:01 2019 -0700 Merge branch 'for-linus' into next Sync up with 'for-linus' branch to avoid merge conflicts with following patches to Elan touchpad drivers. commit 14ee642c2ab0a3d8a1ded11fade692d8b77172b9 Merge: 88cd7a2c1b29 c0a74c732568 Author: Dave Airlie Date: Tue May 28 09:03:58 2019 +1000 Merge tag 'drm-intel-next-2019-05-24' of git://anongit.freedesktop.org/drm/drm-intel into drm-next Features: - Engine discovery query (Tvrtko) - Support for DP YCbCr4:2:0 outputs (Gwan-gyeong) - HDCP revocation support, refactoring (Ramalingam) - Remove DRM_AUTH from IOCTLs which also have DRM_RENDER_ALLOW (Christian König) - Asynchronous display power disabling (Imre) - Perma-pin uC firmware and re-enable global reset (Fernando) - GTT remapping for display, for bigger fb size and stride (Ville) - Enable pipe HDR mode on ICL if only HDR planes are used (Ville) - Kconfig to tweak the busyspin durations for i915_wait_request (Chris) - Allow multiple user handles to the same VM (Chris) - GT/GEM runtime pm improvements using wakerefs (Chris) - Gen 4&5 render context support (Chris) - Allow userspace to clone contexts on creation (Chris) - SINGLE_TIMELINE flags for context creation (Chris) - Allow specification of parallel execbuf (Chris) Refactoring: - Header refactoring (Jani) - Move GraphicsTechnology files under gt/ (Chris) - Sideband code refactoring (Chris) Fixes: - ICL DSI state readout and checker fixes (Vandita) - GLK DSI picture corruption fix (Stanislav) - HDMI deep color fixes (Clinton, Aditya) - Fix driver unbinding from a device in use (Janusz) - Fix clock gating with pipe scaling (Radhakrishna) - Disable broken FBC on GLK (Daniel Drake) - Miscellaneous GuC fixes (Michal) - Fix MG PHY DP register programming (Imre) - Add missing combo PHY lane power setup (Imre) - Workarounds for early ICL VBT issues (Imre) - Fix fastset vs. pfit on/off on HSW EDP transcoder (Ville) - Add readout and state check for pch_pfit.force_thru (Ville) - Miscellaneous display fixes and refactoring (Ville) - Display workaround fixes (Ville) - Enable audio even if ELD is bogus (Ville) - Fix use-after-free in reporting create.size (Chris) - Sideband fixes to avoid BYT hard lockups (Chris) - Workaround fixes and improvements (Chris) Maintainer shortcomings: - Failure to adequately describe and give credit for all changes (Jani) Signed-off-by: Dave Airlie From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87sgt3n45z.fsf@intel.com commit ea996974589e7987eb463d8a7c404358244755ea Author: John Hubbard Date: Fri May 24 18:45:22 2019 -0700 RDMA: Convert put_page() to put_user_page*() For infiniband code that retains pages via get_user_pages*(), release those pages via the new put_user_page(), or put_user_pages*(), instead of put_page() This is a tiny part of the second step of fixing the problem described in [1]. The steps are: 1) Provide put_user_page*() routines, intended to be used for releasing pages that were pinned via get_user_pages*(). 2) Convert all of the call sites for get_user_pages*(), to invoke put_user_page*(), instead of put_page(). This involves dozens of call sites, and will take some time. 3) After (2) is complete, use get_user_pages*() and put_user_page*() to implement tracking of these pages. This tracking will be separate from the existing struct page refcounting. 4) Use the tracking and identification of these pages, to implement special handling (especially in writeback paths) when the pages are backed by a filesystem. Again, [1] provides details as to why that is desirable. [1] https://lwn.net/Articles/753027/ : "The Trouble with get_user_pages()" Reviewed-by: Jan Kara Reviewed-by: Dennis Dalessandro Reviewed-by: Ira Weiny Reviewed-by: Jérôme Glisse Acked-by: Jason Gunthorpe Tested-by: Ira Weiny Signed-off-by: John Hubbard Signed-off-by: Jason Gunthorpe drivers/infiniband/core/umem.c | 7 ++++--- drivers/infiniband/core/umem_odp.c | 10 +++++----- drivers/infiniband/hw/hfi1/user_pages.c | 11 ++++------- drivers/infiniband/hw/mthca/mthca_memfree.c | 6 +++--- drivers/infiniband/hw/qib/qib_user_pages.c | 11 ++++------- drivers/infiniband/hw/qib/qib_user_sdma.c | 6 +++--- drivers/infiniband/hw/usnic/usnic_uiom.c | 7 ++++--- 7 files changed, 27 insertions(+), 31 deletions(-) commit cfcc048ca76e4927f163f178f59d557588ba32f7 Author: YueHaibing Date: Sat May 25 20:57:37 2019 +0800 IB/hfi1: Remove set but not used variables 'offset' and 'fspsn' Fixes gcc '-Wunused-but-set-variable' warning: drivers/infiniband/hw/hfi1/tid_rdma.c: In function tid_rdma_rcv_error: drivers/infiniband/hw/hfi1/tid_rdma.c:2029:7: warning: variable offset set but not used [-Wunused-but-set-variable] drivers/infiniband/hw/hfi1/tid_rdma.c: In function hfi1_rc_rcv_tid_rdma_ack: drivers/infiniband/hw/hfi1/tid_rdma.c:4555:35: warning: variable fspsn set but not used [-Wunused-but-set-variable] 'offset' is never used since introduction in commit d0d564a1caac ("IB/hfi1: Add functions to receive TID RDMA READ request") 'fspsn' is never used since introduciotn in commit 9e93e967f7b4 ("IB/hfi1: Add a function to receive TID RDMA ACK packet") Signed-off-by: YueHaibing Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hfi1/tid_rdma.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 88cd7a2c1b29f61a2a3fab76216a43f3b779e0cd Merge: cd6c84d8f0cd 909fa3321d34 Author: Dave Airlie Date: Tue May 28 08:25:46 2019 +1000 Merge tag 'drm-misc-next-2019-05-24' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for v5.3, try #2: UAPI Changes: - Add HDR source metadata property. - Make drm.h compile on GNU/kFreeBSD by including stdint.h - Clarify how the userspace reviewer has to review new kernel UAPI. - Clarify that for using new UAPI, merging to drm-next or drm-misc-next should be enough. Cross-subsystem Changes: - video/hdmi: Add unpack function for DRM infoframes. - Device tree bindings: * Updating a property for Mali Midgard GPUs * Updating a property for STM32 DSI panel * Adding support for FriendlyELEC HD702E 800x1280 panel * Adding support for Evervision VGG804821 800x480 5.0" WVGA TFT panel * Adding support for the EDT ET035012DM6 3.5" 320x240 QVGA 24-bit RGB TFT. * Adding support for Three Five displays TFC S9700RTWV43TR-01B 800x480 panel with resistive touch found on TI's AM335X-EVM. * Adding support for EDT ETM0430G0DH6 480x272 panel. - Add OSD101T2587-53TS driver with DT bindings. - Add Samsung S6E63M0 panel driver with DT bindings. - Add VXT VL050-8048NT-C01 800x480 panel with DT bindings. - Dma-buf: - Make mmap callback actually optional. - Documentation updates. - Fix debugfs refcount inbalance. - Remove unused sync_dump function. - Fix device tree bindings in drm-misc-next after a botched merge. Core Changes: - Add support for HDR infoframes and related EDID parsing. - Remove prime sg_table caching, now done inside dma-buf. - Add shiny new drm_gem_vram helpers for simple VRAM drivers; with some fixes to the new API on top. - Small fix to job cleanup without timeout handler. - Documentation fixes to drm_fourcc. - Replace lookups of drm_format with struct drm_format_info; remove functions that become obsolete by this conversion. - Remove double include in bridge/panel.c and some drivers. - Remove drmP.h include from drm/edid and drm/dp. - Fix null pointer deref in drm_fb_helper_hotplug_event(). - Remove most members from drm_fb_helper_crtc, only mode_set is kept. - Remove race of fb helpers with userspace; only restore mode when userspace is not master. - Move legacy setup from drm_file.c to drm_legacy_misc.c - Rework scheduler job destruction. - drm/bus was removed, remove from TODO. - Add __drm_atomic_helper_crtc_reset() to subclass crtc_state, and convert some drivers to use it (conversion is not complete yet). - Bump vblank timeout wait to 100 ms for atomic. - Docbook fix for drm_hdmi_infoframe_set_hdr_metadata. Driver Changes: - sun4i: Use DRM_GEM_CMA_VMAP_DRIVER_OPS instead of definining manually. - v3d: Small cleanups, adding support for compute shaders, reservation/synchronization fixes and job management refactoring, fixes MMU and debugfs. - lima: Fix null pointer in irq handler on startup, set default timeout for scheduled jobs. - stm/ltdc: Assorted fixes and adding FB modifier support. - amdgpu: Avoid hw reset if guilty job was already signaled. - virtio: Add seqno to fences, add trace events, use correct flags for fence allocation. - Convert AST, bochs, mgag200, vboxvideo, hisilicon to the new drm_gem_vram API. - sun6i_mipi_dsi: Support DSI GENERIC_SHORT_WRITE_2 transfers. - bochs: Small fix to use PTR_RET_OR_ZERO and driver unload. - gma500: header fixes - cirrus: Remove unused files. - mediatek: Fix compiler warning after merging the HDR series. - vc4: Rework binner bo handling. Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/052875a5-27ba-3832-60c2-193d950afdff@linux.intel.com commit b0d60bfbb60cef1efd699a65e29a94487f8c7b1f Author: Jonathan Corbet Date: Fri May 24 14:52:01 2019 -0600 kernel-doc: always name missing kerneldoc sections The "no structured comments found" warning is not particularly useful if there are several invocations, one of which is looking for something wrong. So if something specific has been requested, make it clear that it's the one we weren't able to find. Signed-off-by: Jonathan Corbet scripts/kernel-doc | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 2a3d923f87303b2d49c6cfb7bf6a25144a1ce265 Author: Lijun Ou Date: Fri May 24 23:29:36 2019 +0800 RDMA/hns: Replace magic numbers with #defines This patch makes the code more readable by removing magic numbers. Signed-off-by: Xi Wang Signed-off-by: Lijun Ou Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hns/hns_roce_db.c | 8 ++-- drivers/infiniband/hw/hns/hns_roce_device.h | 37 +++++++++++++--- drivers/infiniband/hw/hns/hns_roce_hem.c | 18 ++++---- drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 2 +- drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 65 ++++++++++++++++------------- drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 4 ++ drivers/infiniband/hw/hns/hns_roce_main.c | 7 ++-- drivers/infiniband/hw/hns/hns_roce_mr.c | 43 ++++++++++--------- 8 files changed, 115 insertions(+), 69 deletions(-) commit 669cefb654cb69b280e31380f5fc7e3b5755b0cd Author: Lang Cheng Date: Fri May 24 15:31:23 2019 +0800 RDMA/hns: Remove jiffies operation in disable interrupt context In some functions, the jiffies operation is unnecessary, and we can control delay using mdelay and udelay functions only. Especially, in hns_roce_v1_clear_hem, the function calls spin_lock_irqsave, the context disables interrupt, so we can not use jiffies and msleep functions. Signed-off-by: Lang Cheng Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hns/hns_roce_hem.c | 21 +++++++++++---------- drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 19 ++++++++++--------- 2 files changed, 21 insertions(+), 19 deletions(-) commit 780f33962ef27d7f27c6b47a55593c6ffd357922 Author: Lang Cheng Date: Fri May 24 15:31:22 2019 +0800 RDMA/hns: Move spin_lock_irqsave to the correct place When hip08 set gid, it will call spin_unlock_bh when send cmq. if main.ko call spin_lock_irqsave firstly, and the kernel is before commit f71b74bca637 ("irq/softirqs: Use lockdep to assert IRQs are disabled/enabled"), it will cause WARN_ON_ONCE because of calling spin_unlock_bh in disable context. In fact, the spin_lock_irqsave in main.ko is only used for hip06, and should be placed in hns_roce_hw_v1.c. hns_roce_hw_v2.c uses its own spin_unlock_bh and does not need main.ko manage spin_lock. Signed-off-by: Lang Cheng Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 5 +++++ drivers/infiniband/hw/hns/hns_roce_main.c | 10 ---------- 2 files changed, 5 insertions(+), 10 deletions(-) commit 0502849d0bb133b492eed24fd270441e652c84cc Author: Lijun Ou Date: Fri May 24 15:31:21 2019 +0800 RDMA/hns: Update CQE specifications According to hip08 UM, the maximum number of CQEs supported by each CQ is 4M. Signed-off-by: Lijun Ou Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8ffb813255c422f4d05be227ab4443cb6054a078 Author: Yixian Liu Date: Fri May 24 15:31:20 2019 +0800 RDMA/hns: Remove unnecessary print message in aeq There is no need to print when communication is established, especially while lots of qp used by application. Signed-off-by: Yixian Liu Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 1 - 1 file changed, 1 deletion(-) commit 12cb084d0dd87c36db88a2c659e4083fed0ab571 Author: Paul Cercueil Date: Wed May 22 19:05:16 2019 +0200 i2c: jz4780: Drop dependency on MACH_JZ4780 Depending on MACH_JZ4780 prevent us from creating a generic kernel that works on more than one MIPS board. Instead, we just depend on MIPS being set. Signed-off-by: Paul Cercueil Signed-off-by: Wolfram Sang drivers/i2c/busses/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c1fee0c4a2ad63147a9260939114a0f78537d051 Author: Neil Armstrong Date: Mon May 20 16:01:33 2019 +0200 i2c: meson: update with SPDX Licence identifier Signed-off-by: Neil Armstrong Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-meson.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 80e406865b8ca22c4dadb1357e4bcbcc8fe9d57f Author: Kamal Dasu Date: Thu May 9 14:04:36 2019 -0700 i2c: Allow selecting BCM2835 I2C controllers on ARCH_BRCMSTB ARCH_BRCMSTB platforms have the BCM2835 I2C controllers, allow selecting the i2c-bcm2835 driver on such platforms. Signed-off-by: Kamal Dasu Signed-off-by: Florian Fainelli Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang drivers/i2c/busses/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c245d94ed106c4ebb8a4bc1d08b78e3c39c38afb Author: Rayagonda Kokatanur Date: Thu May 9 09:51:48 2019 +0530 i2c: iproc: Add multi byte read-write support for slave mode Add multiple byte read-write support for slave mode. Signed-off-by: Rayagonda Kokatanur Signed-off-by: Srinath Mannam Reviewed-by: Ray Jui Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-bcm-iproc.c | 117 +++++++++++++++++-------------------- 1 file changed, 53 insertions(+), 64 deletions(-) commit a4b5363a51fc78fad89368ae5b7c504bcb10f66d Author: Anson Huang Date: Sun May 5 03:31:55 2019 +0000 i2c: imx: Use __maybe_unused instead of #if CONFIG_PM Use __maybe_unused for runtime PM related functions instead of #if CONFIG_PM to simply the code. Signed-off-by: Anson Huang Reviewed-by: Dong Aisheng Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-imx.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit f70baa7ee3d1b5a9e66ac7549e31641a656f23c1 Author: Nirranjan Kirubaharan Date: Thu May 23 00:05:39 2019 -0700 iw_cxgb4: Fix qpid leak Add await in destroy_qp() so that all references to qp are dereferenced and qp is freed in destroy_qp() itself. This ensures freeing of all QPs before invocation of dealloc_ucontext(), which prevents loss of in use qpids stored in the ucontext. Signed-off-by: Nirranjan Kirubaharan Reviewed-by: Potnuri Bharat Teja Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 4 +-- drivers/infiniband/hw/cxgb4/qp.c | 48 ++++++++++++---------------------- 2 files changed, 19 insertions(+), 33 deletions(-) commit c457d9cf256e942138a54a2e80349ee7fe20c391 Author: Ville Syrjälä Date: Fri May 24 18:36:14 2019 +0300 drm/i915: Make sure we have enough memory bandwidth on ICL ICL has so many planes that it can easily exceed the maximum effective memory bandwidth of the system. We must therefore check that we don't exceed that limit. The algorithm is very magic number heavy and lacks sufficient explanation for now. We also have no sane way to query the memory clock and timings, so we must rely on a combination of raw readout from the memory controller and hardcoded assumptions. The memory controller values obviously change as the system jumps between the different SAGV points, so we try to stabilize it first by disabling SAGV for the duration of the readout. The utilized bandwidth is tracked via a device wide atomic private object. That is actually not robust because we can't afford to enforce strict global ordering between the pipes. Thus I think I'll need to change this to simply chop up the available bandwidth between all the active pipes. Each pipe can then do whatever it wants as long as it doesn't exceed its budget. That scheme will also require that we assume that any number of planes could be active at any time. TODO: make it robust and deal with all the open questions v2: Sleep longer after disabling SAGV v3: Poll for the dclk to get raised (seen it take 250ms!) If the system has 2133MT/s memory then we pointlessly wait one full second :( v4: Use the new pcode interface to get the qgv points rather that using hardcoded numbers v5: Move the pcode stuff into intel_bw.c (Matt) s/intel_sagv_info/intel_qgv_info/ Do the NV12/P010 as per spec for now (Matt) s/IS_ICELAKE/IS_GEN11/ v6: Ignore bandwidth limits if the pcode query fails Signed-off-by: Ville Syrjälä Reviewed-by: Matt Roper Acked-by: Clint Taylor Link: https://patchwork.freedesktop.org/patch/msgid/20190524153614.32410-1-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/i915_drv.c | 2 + drivers/gpu/drm/i915/i915_drv.h | 8 + drivers/gpu/drm/i915/i915_reg.h | 3 + drivers/gpu/drm/i915/intel_atomic_plane.c | 27 ++ drivers/gpu/drm/i915/intel_atomic_plane.h | 2 + drivers/gpu/drm/i915/intel_bw.c | 421 ++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_bw.h | 47 ++++ drivers/gpu/drm/i915/intel_display.c | 40 ++- drivers/gpu/drm/i915/intel_drv.h | 2 + 10 files changed, 552 insertions(+), 1 deletion(-) commit d284d5145eb8760b592e64249c1cd85c440fe90f Author: Ville Syrjälä Date: Tue May 21 19:40:24 2019 +0300 drm/i915: Make sandybridge_pcode_read() deal with the second data register The pcode mailbox has two data registers. So far we've only ever used the one, but that's about to change. Expose the second data register to the callers of sandybridge_pcode_read(). Signed-off-by: Ville Syrjälä Reviewed-by: Clint Taylor Reviewed-by: Radhakrishna Sripada Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20190521164025.30225-1-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/i915_debugfs.c | 4 ++-- drivers/gpu/drm/i915/intel_pm.c | 12 +++++++----- drivers/gpu/drm/i915/intel_sideband.c | 15 +++++++++------ drivers/gpu/drm/i915/intel_sideband.h | 3 ++- 4 files changed, 20 insertions(+), 14 deletions(-) commit cae626b97851afc2219e7607183a9a23cbba3bef Author: Leon Romanovsky Date: Mon May 20 09:54:32 2019 +0300 RDMA/cxgb4: Don't expose DMA addresses Change unconditional print of DMA address to be printed with special printk format type specifier. Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/cxgb4/cq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 34d568930b87e0dd32c5dbe83a835959f2fc6107 Author: Leon Romanovsky Date: Mon May 20 09:54:31 2019 +0300 RDMA/cxgb4: Use sizeof() notation Convert various sizeof call sites to be written in standard format sizeof(). Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/cxgb4/cm.c | 21 +++++++++------- drivers/infiniband/hw/cxgb4/cq.c | 8 +++--- drivers/infiniband/hw/cxgb4/device.c | 9 +++---- drivers/infiniband/hw/cxgb4/mem.c | 5 ++-- drivers/infiniband/hw/cxgb4/provider.c | 1 - drivers/infiniband/hw/cxgb4/qp.c | 46 ++++++++++++++++------------------ drivers/infiniband/hw/cxgb4/resource.c | 16 ++++++------ 7 files changed, 53 insertions(+), 53 deletions(-) commit a80287c8130552a837eb61e1ba14844bf2d03156 Author: Leon Romanovsky Date: Mon May 20 09:54:30 2019 +0300 RDMA/cxgb3: Delete and properly mark unimplemented resize CQ function Resize CQ implementation was guarded by undeclared "notyet" define while cxgb3 was added to the kernel. Twelve years later, this call is still unimplemented, so safely delete it and fix improper return error code when .resize_cq() is not implemented. Fixes: b038ced7b370 ("RDMA/cxgb3: Add driver for Chelsio T3 RNIC") Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/cxgb3/cxio_hal.c | 14 ------ drivers/infiniband/hw/cxgb3/cxio_hal.h | 1 - drivers/infiniband/hw/cxgb3/iwch_provider.c | 68 ----------------------------- 3 files changed, 83 deletions(-) commit 0ddf8f6267ecefc07dace11be8a9d258061c36e1 Author: Leon Romanovsky Date: Mon May 20 09:54:29 2019 +0300 RDMA/cxgb3: Don't expose DMA addresses DMA addresses like all other kernel addresses should be printed with special %p* formatter. It is needed to allow control of exposure of such information through a dedicated knob. Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/cxgb3/cxio_hal.c | 6 +++--- drivers/infiniband/hw/cxgb3/iwch_provider.c | 13 +++++++------ 2 files changed, 10 insertions(+), 9 deletions(-) commit d34d37d5a102a016c63f904d1ff0284637759cc2 Author: Leon Romanovsky Date: Mon May 20 09:54:28 2019 +0300 RDMA/cxgb3: Use sizeof() notation instead of plain sizeof sizeof(a), sizeof a and sizeof (a) are all valid notations, but first is more readable format recommended by checkpatch.pl. Let's canonize it in cxgb3 drivers, so latter patches won't emit checkpatch warnings. As part of this change, a redundant memset() was removed. Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/cxgb3/cxio_hal.c | 4 ++-- drivers/infiniband/hw/cxgb3/iwch_cm.c | 2 +- drivers/infiniband/hw/cxgb3/iwch_provider.c | 24 +++++++++++------------- 3 files changed, 14 insertions(+), 16 deletions(-) commit cec4f328c929f72ad634e8f385b589bd6eac80e5 Author: Y.b. Lu Date: Mon May 27 03:55:20 2019 +0000 enetc: fix le32/le16 degrading to integer warnings Fix blow sparse warning introduced by a previous patch. - restricted __le32 degrades to integer - restricted __le16 degrades to integer Fixes: d39823121911 ("enetc: add hardware timestamping support") Signed-off-by: Yangbo Lu Signed-off-by: David S. Miller drivers/net/ethernet/freescale/enetc/enetc.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 0500c04ea14a4143edf902d087079c4e7b2f0229 Author: Sam Ravnborg Date: Sun May 26 19:35:35 2019 +0200 drm: drop use of drmP.h in drm/* The use of the drmP.h header file is deprecated. Remove use from all files in drm/* so people do not look there and follow a bad example. Build tested allyesconfig,allmodconfig on x86, arm etc. Including alpha that is as always more challenging than the rest. Signed-off-by: Sam Ravnborg Acked-by: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20190526173535.32701-8-sam@ravnborg.org drivers/gpu/drm/ati_pcigart.c | 5 ++++- drivers/gpu/drm/drm_agpsupport.c | 11 +++++++++-- drivers/gpu/drm/drm_atomic.c | 9 +++++++-- drivers/gpu/drm/drm_atomic_helper.c | 11 +++++++---- drivers/gpu/drm/drm_atomic_state_helper.c | 7 ++++--- drivers/gpu/drm/drm_auth.c | 10 ++++++++-- drivers/gpu/drm/drm_blend.c | 9 ++++++--- drivers/gpu/drm/drm_bufs.c | 21 ++++++++++++++++----- drivers/gpu/drm/drm_client.c | 2 +- drivers/gpu/drm/drm_color_mgmt.c | 8 ++++++-- drivers/gpu/drm/drm_context.c | 8 +++++++- drivers/gpu/drm/drm_crtc_helper.c | 14 ++++++++------ drivers/gpu/drm/drm_debugfs.c | 13 ++++++++----- drivers/gpu/drm/drm_debugfs_crc.c | 9 ++++++++- drivers/gpu/drm/drm_dma.c | 6 +++++- drivers/gpu/drm/drm_drv.c | 9 ++++++--- drivers/gpu/drm/drm_dumb_buffers.c | 4 +++- drivers/gpu/drm/drm_encoder.c | 4 +++- drivers/gpu/drm/drm_fb_helper.c | 19 ++++++++++++------- drivers/gpu/drm/drm_file.c | 11 +++++++---- drivers/gpu/drm/drm_flip_work.c | 6 ++++-- drivers/gpu/drm/drm_fourcc.c | 2 +- drivers/gpu/drm/drm_framebuffer.c | 13 +++++++++---- drivers/gpu/drm/drm_gem.c | 8 ++++++-- drivers/gpu/drm/drm_gem_cma_helper.c | 11 ++++++----- drivers/gpu/drm/drm_gem_framebuffer_helper.c | 1 - drivers/gpu/drm/drm_hashtab.c | 10 +++++++--- drivers/gpu/drm/drm_ioc32.c | 9 ++++++--- drivers/gpu/drm/drm_ioctl.c | 22 ++++++++++++++-------- drivers/gpu/drm/drm_irq.c | 13 +++++++++---- drivers/gpu/drm/drm_kms_helper_common.c | 3 ++- drivers/gpu/drm/drm_lease.c | 15 ++++++++++----- drivers/gpu/drm/drm_legacy_misc.c | 7 ++++++- drivers/gpu/drm/drm_lock.c | 8 ++++++-- drivers/gpu/drm/drm_memory.c | 9 +++++++-- drivers/gpu/drm/drm_mm.c | 9 +++++---- drivers/gpu/drm/drm_mode_config.c | 6 +++++- drivers/gpu/drm/drm_mode_object.c | 9 +++++++-- drivers/gpu/drm/drm_modes.c | 7 +++++-- drivers/gpu/drm/drm_modeset_lock.c | 2 +- drivers/gpu/drm/drm_of.c | 5 +++-- drivers/gpu/drm/drm_pci.c | 11 ++++++++--- drivers/gpu/drm/drm_plane_helper.c | 9 +++++---- drivers/gpu/drm/drm_prime.c | 7 +++++-- drivers/gpu/drm/drm_print.c | 7 ++++++- drivers/gpu/drm/drm_probe_helper.c | 7 ++++--- drivers/gpu/drm/drm_property.c | 7 ++++++- drivers/gpu/drm/drm_rect.c | 4 +++- drivers/gpu/drm/drm_scatter.c | 9 +++++++-- drivers/gpu/drm/drm_scdc_helper.c | 2 +- drivers/gpu/drm/drm_simple_kms_helper.c | 5 +++-- drivers/gpu/drm/drm_syncobj.c | 13 +++++++++---- drivers/gpu/drm/drm_sysfs.c | 15 +++++++++++---- drivers/gpu/drm/drm_trace_points.c | 3 ++- drivers/gpu/drm/drm_vblank.c | 12 +++++++++--- drivers/gpu/drm/drm_vm.c | 14 +++++++++++++- drivers/gpu/drm/drm_vma_manager.c | 6 +++--- drivers/gpu/drm/drm_vram_mm_helper.c | 4 +++- drivers/gpu/drm/drm_writeback.c | 6 ++++-- 59 files changed, 356 insertions(+), 150 deletions(-) commit 34112deddb43c37812f2a8836555754099efb9f2 Author: Sam Ravnborg Date: Sun May 26 19:35:34 2019 +0200 drm: make drm_trace.h self-contained Do not require users of drm_trace.h to include other files just to let it build Signed-off-by: Sam Ravnborg Acked-by: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20190526173535.32701-7-sam@ravnborg.org drivers/gpu/drm/drm_trace.h | 2 ++ 1 file changed, 2 insertions(+) commit b8d1148892bae9c44c02486bbc0ae85bd2082a55 Author: Sam Ravnborg Date: Sun May 26 19:35:33 2019 +0200 drm: make drm_legacy.h self-contained Do not require users of drm_legacy.h to include other files just to let it build Signed-off-by: Sam Ravnborg Acked-by: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20190526173535.32701-6-sam@ravnborg.org drivers/gpu/drm/drm_legacy.h | 4 ++++ 1 file changed, 4 insertions(+) commit 7a44fdce421edd686b56efaa752502de8763ca38 Author: Sam Ravnborg Date: Sun May 26 19:35:32 2019 +0200 drm: make drm_internal.h self-contained Do not require users of drm_internal.h to include other files just to let it build Signed-off-by: Sam Ravnborg Acked-by: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20190526173535.32701-5-sam@ravnborg.org drivers/gpu/drm/drm_internal.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 1dccccba19a5582294636b4e8916145aade19eb5 Author: Sam Ravnborg Date: Sun May 26 19:35:31 2019 +0200 drm: make drm_crtc_internal.h self-contained Do not require users of drm_crtc_internal.h to include other files just to let it build Signed-off-by: Sam Ravnborg Acked-by: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20190526173535.32701-4-sam@ravnborg.org drivers/gpu/drm/drm_crtc_internal.h | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) commit cbe932a38dc67f4c5c2fa6ffc4e7f4efa27c06f7 Author: Sam Ravnborg Date: Sun May 26 19:35:30 2019 +0200 drm: make drm/drm_legacy.h self-contained Do not require users of include/drm/drm_legacy.h to include other files just to let it build. Signed-off-by: Sam Ravnborg Acked-by: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20190526173535.32701-3-sam@ravnborg.org include/drm/drm_legacy.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 2197f55f462dc776312fada027d45d52bd12749c Author: Sam Ravnborg Date: Sun May 26 19:35:29 2019 +0200 drm: make drm/drm_auth.h self contained Do not require users of include/drm/drm_auth.h to include other files just to let it build. Signed-off-by: Sam Ravnborg Acked-by: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20190526173535.32701-2-sam@ravnborg.org include/drm/drm_auth.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit a84cc69eb53715d37242a21ada398b0d8cd316fc Author: Christoph Hellwig Date: Mon May 20 09:29:48 2019 +0200 arm64: trim includes in dma-mapping.c With most of the previous functionality now elsewhere a lot of the headers included in this file are not needed. Signed-off-by: Christoph Hellwig Acked-by: Catalin Marinas Signed-off-by: Joerg Roedel arch/arm64/mm/dma-mapping.c | 10 ---------- 1 file changed, 10 deletions(-) commit b5f75a3639ff3b547e4eee7671e4321a429747a6 Author: Christoph Hellwig Date: Mon May 20 09:29:47 2019 +0200 arm64: switch copyright boilerplace to SPDX in dma-mapping.c Signed-off-by: Christoph Hellwig Acked-by: Robin Murphy Reviewed-by: Mukesh Ojha Acked-by: Catalin Marinas Signed-off-by: Joerg Roedel arch/arm64/mm/dma-mapping.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) commit a9f4d93dbeb6f5ccb50c6362ba944afe34cb8f12 Author: Christoph Hellwig Date: Mon May 20 09:29:46 2019 +0200 iommu/dma: Switch copyright boilerplace to SPDX Signed-off-by: Christoph Hellwig Acked-by: Robin Murphy Signed-off-by: Joerg Roedel drivers/iommu/dma-iommu.c | 13 +------------ include/linux/dma-iommu.h | 13 +------------ 2 files changed, 2 insertions(+), 24 deletions(-) commit e6475eb010fae28a2550faf9f2f12dc13ab2931a Author: Christoph Hellwig Date: Mon May 20 09:29:45 2019 +0200 iommu/dma: Don't depend on CONFIG_DMA_DIRECT_REMAP For entirely dma coherent architectures there is no requirement to ever remap dma coherent allocation. Move all the remap and pool code under IS_ENABLED() checks and drop the Kconfig dependency. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy Signed-off-by: Joerg Roedel drivers/iommu/Kconfig | 1 - drivers/iommu/dma-iommu.c | 16 +++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) commit efd9f10b70689fdeacadc95b6e0ea6dc311fa64f Author: Christoph Hellwig Date: Mon May 20 09:29:44 2019 +0200 iommu/dma: Refactor iommu_dma_mmap Inline __iommu_dma_mmap_pfn into the main function, and use the fact that __iommu_dma_get_pages return NULL for remapped contigous allocations to simplify the code flow a bit. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy Signed-off-by: Joerg Roedel drivers/iommu/dma-iommu.c | 46 +++++++++++----------------------------------- 1 file changed, 11 insertions(+), 35 deletions(-) commit 3fb3378bb1eb2905065211ab51a7bcc2c5e7bd29 Author: Christoph Hellwig Date: Mon May 20 09:29:43 2019 +0200 iommu/dma: Refactor iommu_dma_get_sgtable Inline __iommu_dma_get_sgtable_page into the main function, and use the fact that __iommu_dma_get_pages return NULL for remapped contigous allocations to simplify the code flow a bit. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy Signed-off-by: Joerg Roedel drivers/iommu/dma-iommu.c | 45 +++++++++++++++++---------------------------- 1 file changed, 17 insertions(+), 28 deletions(-) commit ee1ef05d02b03118e4c197e1193329f5b64246b7 Author: Christoph Hellwig Date: Mon May 20 09:29:42 2019 +0200 iommu/dma: Refactor iommu_dma_alloc, part 2 All the logic in iommu_dma_alloc that deals with page allocation from the CMA or page allocators can be split into a self-contained helper, and we can than map the result of that or the atomic pool allocation with the iommu later. This also allows reusing __iommu_dma_free to tear down the allocations and MMU mappings when the IOMMU mapping fails. Based on a patch from Robin Murphy. Signed-off-by: Christoph Hellwig Signed-off-by: Joerg Roedel drivers/iommu/dma-iommu.c | 65 +++++++++++++++++++++++++---------------------- 1 file changed, 35 insertions(+), 30 deletions(-) commit 9ad5d6eddcb0fa7c227c0612011221e715e8ef49 Author: Robin Murphy Date: Mon May 20 09:29:41 2019 +0200 iommu/dma: Cleanup variable naming in iommu_dma_alloc Most importantly clear up the size / iosize confusion. Also rename addr to cpu_addr to match the surrounding code and make the intention a little more clear. Signed-off-by: Robin Murphy [hch: split from a larger patch] Signed-off-by: Christoph Hellwig Signed-off-by: Joerg Roedel drivers/iommu/dma-iommu.c | 45 ++++++++++++++++++++++----------------------- 1 file changed, 22 insertions(+), 23 deletions(-) commit 8553f6e65240ea0c2ae970eeba18e4d3a47230aa Author: Robin Murphy Date: Mon May 20 09:29:40 2019 +0200 iommu/dma: Split iommu_dma_free Most of it can double up to serve the failure cleanup path for iommu_dma_alloc(). Signed-off-by: Robin Murphy Signed-off-by: Joerg Roedel drivers/iommu/dma-iommu.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 9a4ab94afcc4738d65ecfdff726a4a14abde1b98 Author: Christoph Hellwig Date: Mon May 20 09:29:39 2019 +0200 iommu/dma: Merge the CMA and alloc_pages allocation paths Instead of having a separate code path for the non-blocking alloc_pages and CMA allocations paths merge them into one. There is a slight behavior change here in that we try the page allocator if CMA fails. This matches what dma-direct and other iommu drivers do and will be needed to use the dma-iommu code on architectures without DMA remapping later on. Signed-off-by: Christoph Hellwig Signed-off-by: Joerg Roedel drivers/iommu/dma-iommu.c | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) commit 8680aa5a58abfe6087a3d8248c02232d3e05dc80 Author: Robin Murphy Date: Mon May 20 09:29:38 2019 +0200 iommu/dma: Don't remap CMA unnecessarily Always remapping CMA allocations was largely a bodge to keep the freeing logic manageable when it was split between here and an arch wrapper. Now that it's all together and streamlined, we can relax that limitation. Signed-off-by: Robin Murphy Signed-off-by: Christoph Hellwig Signed-off-by: Joerg Roedel drivers/iommu/dma-iommu.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit 072bebc0691737a6b44c648b4c59501a0cd25357 Author: Robin Murphy Date: Mon May 20 09:29:37 2019 +0200 iommu/dma: Refactor iommu_dma_alloc Shuffle around the self-contained atomic and non-contiguous cases to return early and get out of the way of the CMA case that we're about to work on next. Signed-off-by: Robin Murphy [hch: slight changes to the code flow] Signed-off-by: Christoph Hellwig Signed-off-by: Joerg Roedel drivers/iommu/dma-iommu.c | 60 +++++++++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 30 deletions(-) commit bcf4b9c4c2ee0f00d9e273b19419416a20cce9a4 Author: Robin Murphy Date: Mon May 20 09:29:36 2019 +0200 iommu/dma: Refactor iommu_dma_free The freeing logic was made particularly horrible by part of it being opaque to the arch wrapper, which led to a lot of convoluted repetition to ensure each path did everything in the right order. Now that it's all private, we can pick apart and consolidate the logically-distinct steps of freeing the IOMMU mapping, the underlying pages, and the CPU remap (if necessary) into something much more manageable. Signed-off-by: Robin Murphy [various cosmetic changes to the code flow] Signed-off-by: Christoph Hellwig Signed-off-by: Joerg Roedel drivers/iommu/dma-iommu.c | 73 +++++++++++++++++++++-------------------------- 1 file changed, 33 insertions(+), 40 deletions(-) commit aa8ba2275705aa47df9f52e13c5126688c478966 Author: Christoph Hellwig Date: Mon May 20 09:29:35 2019 +0200 iommu/dma: Remove __iommu_dma_free We only have a single caller of this function left, so open code it there. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy Signed-off-by: Joerg Roedel drivers/iommu/dma-iommu.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) commit 21b95aaf5f2212764d37b7569f3829a295e4042c Author: Christoph Hellwig Date: Mon May 20 09:29:34 2019 +0200 iommu/dma: Refactor the page array remapping allocator Move the call to dma_common_pages_remap into __iommu_dma_alloc and rename it to iommu_dma_alloc_remap. This creates a self-contained helper for remapped pages allocation and mapping. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy Signed-off-by: Joerg Roedel drivers/iommu/dma-iommu.c | 54 +++++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 28 deletions(-) commit 4c360acee9298d048921bec3e21c4183d06cb43a Author: Robin Murphy Date: Mon May 20 09:29:33 2019 +0200 iommu/dma: Factor out remapped pages lookup Since we duplicate the find_vm_area() logic a few times in places where we only care aboute the pages, factor out a helper to abstract it. Signed-off-by: Robin Murphy [hch: don't warn when not finding a region, as we'll rely on that later] Signed-off-by: Christoph Hellwig Signed-off-by: Joerg Roedel drivers/iommu/dma-iommu.c | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) commit 796a08cf16054ef93783ca8ab4aec2469c3307c1 Author: Robin Murphy Date: Mon May 20 09:29:32 2019 +0200 iommu/dma: Squash __iommu_dma_{map,unmap}_page helpers The remaining internal callsites don't care about having prototypes compatible with the relevant dma_map_ops callbacks, so the extra level of indirection just wastes space and complictaes things. Signed-off-by: Robin Murphy Signed-off-by: Christoph Hellwig Signed-off-by: Joerg Roedel drivers/iommu/dma-iommu.c | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) commit b61d271e59d7fd679ad9922ce5f16c116c0f8e94 Author: Robin Murphy Date: Mon May 20 09:29:31 2019 +0200 iommu/dma: Move domain lookup into __iommu_dma_{map,unmap} Most of the callers don't care, and the couple that do already have the domain to hand for other reasons are in slow paths where the (trivial) overhead of a repeated lookup will be utterly immaterial. Signed-off-by: Robin Murphy [hch: dropped the hunk touching iommu_dma_get_msi_page to avoid a conflict with another series] Signed-off-by: Christoph Hellwig Signed-off-by: Joerg Roedel drivers/iommu/dma-iommu.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) commit 92aec09cc87975f66d3a84001876693d9ac6073b Author: Christoph Hellwig Date: Mon May 20 09:29:30 2019 +0200 iommu/dma: Move __iommu_dma_map Moving this function up to its unmap counterpart helps to keep related code together for the following changes. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy Signed-off-by: Joerg Roedel drivers/iommu/dma-iommu.c | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) commit 06d60728ff5c01795ac0bad66a5c42e3e78dcb6b Author: Christoph Hellwig Date: Mon May 20 09:29:29 2019 +0200 iommu/dma: move the arm64 wrappers to common code There is nothing really arm64 specific in the iommu_dma_ops implementation, so move it to dma-iommu.c and keep a lot of symbols self-contained. Note the implementation does depend on the DMA_DIRECT_REMAP infrastructure for now, so we'll have to make the DMA_IOMMU support depend on it, but this will be relaxed soon. Signed-off-by: Christoph Hellwig Acked-by: Robin Murphy Signed-off-by: Joerg Roedel arch/arm64/mm/dma-mapping.c | 394 +------------------------------------------ drivers/iommu/Kconfig | 1 + drivers/iommu/dma-iommu.c | 398 ++++++++++++++++++++++++++++++++++++++++---- include/linux/dma-iommu.h | 42 +---- 4 files changed, 378 insertions(+), 457 deletions(-) commit 23f88e0a7e9f084e91a40cc90a15968fb1e5d506 Author: Christoph Hellwig Date: Mon May 20 09:29:28 2019 +0200 iommu/dma: Use for_each_sg in iommu_dma_alloc arch_dma_prep_coherent can handle physically contiguous ranges larger than PAGE_SIZE just fine, which means we don't need a page-based iterator. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy Signed-off-by: Joerg Roedel drivers/iommu/dma-iommu.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit af751d4308a7c80434b5f40fd44288d33dc1962f Author: Christoph Hellwig Date: Mon May 20 09:29:27 2019 +0200 iommu/dma: Remove the flush_page callback We now have a arch_dma_prep_coherent architecture hook that is used for the generic DMA remap allocator, and we should use the same interface for the dma-iommu code. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy Acked-by: Catalin Marinas Signed-off-by: Joerg Roedel arch/arm64/mm/dma-mapping.c | 8 +------- drivers/iommu/dma-iommu.c | 8 +++----- include/linux/dma-iommu.h | 3 +-- 3 files changed, 5 insertions(+), 14 deletions(-) commit 185da893fab1caa458c47f032a6f53717dbae2eb Author: Christoph Hellwig Date: Mon May 20 09:29:26 2019 +0200 iommu/dma: Cleanup dma-iommu.h No need for a __KERNEL__ guard outside uapi and add a missing comment describing the #else cpp statement. Last but not least include instead of the asm version, which is frowned upon. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy Signed-off-by: Joerg Roedel include/linux/dma-iommu.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 73bcbdc9fa8d88db2d26d06885fb180cfe478f80 Author: James Sewart Date: Sat May 25 13:41:23 2019 +0800 iommu/vt-d: Implement apply_resv_region iommu ops entry Used by iommu.c before creating identity mappings for reserved ranges to ensure dma-ops won't ever remap these ranges. Signed-off-by: James Sewart Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 7423e01741dd6a5f1255f589145313f0fb1c8cbe Author: Lu Baolu Date: Sat May 25 13:41:22 2019 +0800 iommu: Add API to request DMA domain for device Normally during iommu probing a device, a default doamin will be allocated and attached to the device. The domain type of the default domain is statically defined, which results in a situation where the allocated default domain isn't suitable for the device due to some limitations. We already have API iommu_request_dm_for_dev() to replace a DMA domain with an identity one. This adds iommu_request_dma_domain_for_dev() to request a dma domain if an allocated identity domain isn't suitable for the device in question. Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel drivers/iommu/iommu.c | 36 +++++++++++++++++++++++++----------- include/linux/iommu.h | 6 ++++++ 2 files changed, 31 insertions(+), 11 deletions(-) commit 4361ccac2810553d6cfaa6860bd4bd65f4742ed2 Author: Imre Deak Date: Fri May 24 20:35:32 2019 +0300 drm/i915/icl: Fix AUX-B HW not done issue w/o AUX-A Atm AUX-B transfers can fail with the following error if AUX-A is not enabled: [ 594.594108] [drm:intel_dp_aux_xfer [i915]] dp_aux_ch timeout status 0x7c2003ff [ 594.615854] [drm:intel_dp_aux_xfer [i915]] *ERROR* dp aux hw did not signal timeout! [ 594.632851] [drm:intel_dp_aux_xfer [i915]] *ERROR* dp aux hw did not signal timeout! [ 594.632915] [drm:intel_dp_aux_xfer [i915]] *ERROR* dp_aux_ch not done status 0xac2003ff [ 594.641786] ------------[ cut here ]------------ [ 594.641790] dp_aux_ch not started status 0xac2003ff [ 594.641874] WARNING: CPU: 4 PID: 1366 at drivers/gpu/drm/i915/intel_dp.c:1268 intel_dp_aux_xfer+0x232/0x890 [i915] Ville noticed this issue already earlier and managed to work around it by keeping AUX-A always powered whenever AUX-B was used. He also reported the issue to HW folks and they have now root caused the problem and updated BSpec with a fix (see internal BSpec/Index/21257, HSD/1607152412). I noticed the same error - even with the WA being applied - while doing AUX transfers with Chamelium being connected with a DP cable to the source but letting Chamelium imitate an unplug. This is probably some unstandard way on Chamelium's behalf of disconnecting itself from the AUX pins. For instance it could still pull on the AUX pins which would prevent the source from detecting AUX timeouts in the proper way, leading to the ERRORs or WARNs seen in the logs in the Reference: bug below. In case I disconnect the sink properly (the cable itself, not via the Chamelium unplug xmlrpc command) then the AUX timeout signaling works properly and so there won't be any ERRORs/WARNs emitted. Reference: https://bugs.freedesktop.org/show_bug.cgi?id=110718 Cc: Ville Syrjälä Reported-by: Ville Syrjälä Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190524173532.6444-1-imre.deak@intel.com drivers/gpu/drm/i915/i915_reg.h | 3 +++ drivers/gpu/drm/i915/intel_combo_phy.c | 6 ++++++ 2 files changed, 9 insertions(+) commit f8eac9011b6be56acfb5d1d0dfd5ee30082a12ee Author: Eric W. Biederman Date: Tue Feb 5 18:14:19 2019 -0600 signal: Remove task parameter from force_sig_mceerr All of the callers pass current into force_sig_mceer so remove the task parameter to make this obvious. This also makes it clear that force_sig_mceerr passes current into force_sig_info. Signed-off-by: "Eric W. Biederman" arch/arm64/kernel/traps.c | 2 +- arch/parisc/mm/fault.c | 2 +- arch/powerpc/mm/fault.c | 3 +-- arch/x86/mm/fault.c | 2 +- include/linux/sched/signal.h | 2 +- kernel/signal.c | 4 ++-- mm/memory-failure.c | 2 +- 7 files changed, 8 insertions(+), 9 deletions(-) commit 3cf5d076fb4d48979f382bc9452765bf8b79e740 Author: Eric W. Biederman Date: Thu May 23 10:17:27 2019 -0500 signal: Remove task parameter from force_sig All of the remaining callers pass current into force_sig so remove the task parameter to make this obvious and to make misuse more difficult in the future. This also makes it clear force_sig passes current into force_sig_info. Signed-off-by: "Eric W. Biederman" arch/alpha/kernel/signal.c | 4 ++-- arch/arc/kernel/process.c | 2 +- arch/arc/kernel/signal.c | 2 +- arch/arm/kernel/signal.c | 4 ++-- arch/arm64/kernel/traps.c | 2 +- arch/c6x/kernel/signal.c | 2 +- arch/csky/kernel/signal.c | 4 +--- arch/h8300/kernel/ptrace_h.c | 4 ++-- arch/h8300/kernel/ptrace_s.c | 2 +- arch/h8300/kernel/signal.c | 2 +- arch/hexagon/kernel/signal.c | 2 +- arch/hexagon/kernel/traps.c | 10 ++++----- arch/ia64/kernel/signal.c | 2 +- arch/ia64/kernel/traps.c | 6 +++--- arch/m68k/kernel/signal.c | 4 ++-- arch/m68k/kernel/traps.c | 16 +++++++-------- arch/microblaze/kernel/signal.c | 2 +- arch/mips/kernel/branch.c | 18 ++++++++--------- arch/mips/kernel/kprobes.c | 2 +- arch/mips/kernel/signal.c | 8 ++++---- arch/mips/kernel/signal_n32.c | 4 ++-- arch/mips/kernel/signal_o32.c | 8 ++++---- arch/mips/kernel/traps.c | 36 ++++++++++++++++----------------- arch/mips/kernel/unaligned.c | 20 +++++++++--------- arch/mips/sgi-ip22/ip22-berr.c | 2 +- arch/mips/sgi-ip22/ip28-berr.c | 2 +- arch/mips/sgi-ip27/ip27-berr.c | 2 +- arch/mips/sgi-ip32/ip32-berr.c | 2 +- arch/nds32/kernel/signal.c | 2 +- arch/nds32/kernel/traps.c | 6 +++--- arch/nios2/kernel/signal.c | 2 +- arch/openrisc/kernel/signal.c | 2 +- arch/openrisc/kernel/traps.c | 4 ++-- arch/parisc/kernel/signal.c | 2 +- arch/powerpc/kernel/signal_32.c | 6 +++--- arch/powerpc/kernel/signal_64.c | 2 +- arch/powerpc/platforms/cell/spufs/run.c | 2 +- arch/riscv/kernel/signal.c | 2 +- arch/s390/kernel/compat_signal.c | 4 ++-- arch/s390/kernel/signal.c | 4 ++-- arch/sh/kernel/cpu/sh2a/fpu.c | 2 +- arch/sh/kernel/cpu/sh4/fpu.c | 2 +- arch/sh/kernel/cpu/sh5/fpu.c | 4 +--- arch/sh/kernel/ptrace_64.c | 4 ++-- arch/sh/kernel/signal_32.c | 4 ++-- arch/sh/kernel/signal_64.c | 4 ++-- arch/sh/kernel/traps.c | 4 ++-- arch/sh/kernel/traps_32.c | 8 +++----- arch/sh/kernel/traps_64.c | 2 +- arch/sparc/kernel/process_64.c | 2 +- arch/sparc/kernel/signal32.c | 4 ++-- arch/sparc/kernel/signal_32.c | 4 ++-- arch/sparc/kernel/signal_64.c | 6 +++--- arch/sparc/kernel/traps_64.c | 2 +- arch/sparc/mm/fault_32.c | 2 +- arch/um/kernel/exec.c | 2 +- arch/um/kernel/tlb.c | 4 ++-- arch/um/kernel/trap.c | 2 +- arch/unicore32/kernel/signal.c | 2 +- arch/x86/entry/vsyscall/vsyscall_64.c | 2 +- arch/x86/kernel/cpu/mce/core.c | 2 +- arch/x86/kernel/signal.c | 2 +- arch/x86/kernel/traps.c | 4 ++-- arch/x86/kernel/uprobes.c | 2 +- arch/x86/kernel/vm86_32.c | 2 +- arch/x86/mm/mpx.c | 2 +- arch/x86/um/signal.c | 4 ++-- arch/xtensa/kernel/signal.c | 2 +- arch/xtensa/kernel/traps.c | 6 +++--- drivers/misc/lkdtm/bugs.c | 2 +- include/linux/sched/signal.h | 2 +- include/linux/syscalls.h | 2 +- kernel/events/uprobes.c | 4 ++-- kernel/rseq.c | 2 +- kernel/signal.c | 6 +++--- security/safesetid/lsm.c | 4 ++-- 76 files changed, 160 insertions(+), 166 deletions(-) commit cb44c9a0ab21a9ae4dfcabac1ed8e38aa872d1af Author: Eric W. Biederman Date: Tue May 21 10:03:48 2019 -0500 signal: Remove task parameter from force_sigsegv The function force_sigsegv is always called on the current task so passing in current is redundant and not passing in current makes this fact obvious. This also makes it clear force_sigsegv always calls force_sig on the current task. Signed-off-by: "Eric W. Biederman" arch/arc/kernel/process.c | 2 +- arch/ia64/kernel/signal.c | 6 +++--- arch/nios2/kernel/signal.c | 2 +- arch/sparc/kernel/signal32.c | 4 ++-- arch/sparc/kernel/signal_64.c | 2 +- arch/um/kernel/skas/mmu.c | 2 +- arch/um/kernel/trap.c | 2 +- arch/unicore32/kernel/signal.c | 2 +- fs/exec.c | 2 +- include/linux/sched/signal.h | 2 +- kernel/rseq.c | 2 +- kernel/signal.c | 6 ++++-- 12 files changed, 18 insertions(+), 16 deletions(-) commit 72abe3bcf0911d69b46c1e8bdb5612675e0ac42c Author: Eric W. Biederman Date: Wed May 15 12:33:50 2019 -0500 signal/cifs: Fix cifs_put_tcp_session to call send_sig instead of force_sig The locking in force_sig_info is not prepared to deal with a task that exits or execs (as sighand may change). The is not a locking problem in force_sig as force_sig is only built to handle synchronous exceptions. Further the function force_sig_info changes the signal state if the signal is ignored, or blocked or if SIGNAL_UNKILLABLE will prevent the delivery of the signal. The signal SIGKILL can not be ignored and can not be blocked and SIGNAL_UNKILLABLE won't prevent it from being delivered. So using force_sig rather than send_sig for SIGKILL is confusing and pointless. Because it won't impact the sending of the signal and and because using force_sig is wrong, replace force_sig with send_sig. Cc: Namjae Jeon Cc: Jeff Layton Cc: Steve French Fixes: a5c3e1c725af ("Revert "cifs: No need to send SIGKILL to demux_thread during umount"") Fixes: e7ddee9037e7 ("cifs: disable sharing session and tcon and add new TCP sharing code") Signed-off-by: "Eric W. Biederman" fs/cifs/connect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f9070dc94542093fd516ae4ccea17ef46a4362c5 Author: Eric W. Biederman Date: Wed May 15 12:29:52 2019 -0500 signal/pid_namespace: Fix reboot_pid_ns to use send_sig not force_sig The locking in force_sig_info is not prepared to deal with a task that exits or execs (as sighand may change). The is not a locking problem in force_sig as force_sig is only built to handle synchronous exceptions. Further the function force_sig_info changes the signal state if the signal is ignored, or blocked or if SIGNAL_UNKILLABLE will prevent the delivery of the signal. The signal SIGKILL can not be ignored and can not be blocked and SIGNAL_UNKILLABLE won't prevent it from being delivered. So using force_sig rather than send_sig for SIGKILL is confusing and pointless. Because it won't impact the sending of the signal and and because using force_sig is wrong, replace force_sig with send_sig. Cc: Daniel Lezcano Cc: Serge Hallyn Cc: Oleg Nesterov Fixes: cf3f89214ef6 ("pidns: add reboot_pid_ns() to handle the reboot syscall") Signed-off-by: "Eric W. Biederman" kernel/pid_namespace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1dfd1711de2952fd1bfeea7152bd1687a4eea771 Author: Eric W. Biederman Date: Wed May 15 12:23:03 2019 -0500 signal/bpfilter: Fix bpfilter_kernl to use send_sig not force_sig The locking in force_sig_info is not prepared to deal with a task that exits or execs (as sighand may change). As force_sig is only built to handle synchronous exceptions. Further the function force_sig_info changes the signal state if the signal is ignored, or blocked or if SIGNAL_UNKILLABLE will prevent the delivery of the signal. The signal SIGKILL can not be ignored and can not be blocked and SIGNAL_UNKILLABLE won't prevent it from being delivered. So using force_sig rather than send_sig for SIGKILL is pointless. Because it won't impact the sending of the signal and and because using force_sig is wrong, replace force_sig with send_sig. Cc: Alexei Starovoitov Cc: David S. Miller Fixes: d2ba09c17a06 ("net: add skeleton of bpfilter kernel module") Signed-off-by: "Eric W. Biederman" net/bpfilter/bpfilter_kern.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fee109901f392a96189bd84a41845535a52bd94d Author: Eric W. Biederman Date: Tue Feb 5 17:25:02 2019 -0600 signal/drbd: Use send_sig not force_sig The drbd module exclusively sends signals to kernel threads it creates with kthread_create. These kernel threads do not block or ignore signals (only flush signals after they have been delivered), nor can drbd threads possibly be pid namespace init processes so the extra work that force_sig performs that send_sig does not is unnecessary. Further force_sig is for delivering synchronous signals (aka exceptions). The locking in force_sig is not prepared to deal with running processes, as tsk->sighand may change during exec for a running process. In short it is not only unnecessary for drbd to use force_sig it is semantically wrong. With drbd using send_sig it becomes easier to maintain force_sig as only synchronous signals need to be considered. Cc: Philipp Reisner Cc: Lars Ellenberg Cc: drbd-dev@lists.linbit.com Signed-off-by: "Eric W. Biederman" drivers/block/drbd/drbd_int.h | 2 +- drivers/block/drbd/drbd_main.c | 2 +- drivers/block/drbd/drbd_nl.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 82e10af2248d2d09c99834613f1b47d5002dc379 Author: Eric W. Biederman Date: Thu May 16 10:55:21 2019 -0500 signal/arm64: Use force_sig not force_sig_fault for SIGKILL I don't think this is userspace visible but SIGKILL does not have any si_codes that use the fault member of the siginfo union. Correct this the simple way and call force_sig instead of force_sig_fault when the signal is SIGKILL. The two know places where synchronous SIGKILL are generated are do_bad_area and fpsimd_save. The call paths to force_sig_fault are: do_bad_area arm64_force_sig_fault force_sig_fault force_signal_inject arm64_notify_die arm64_force_sig_fault force_sig_fault Which means correcting this in arm64_force_sig_fault is enough to ensure the arm64 code is not misusing the generic code, which could lead to maintenance problems later. Cc: stable@vger.kernel.org Cc: Dave Martin Cc: James Morse Cc: Will Deacon Acked-by: Will Deacon Fixes: af40ff687bc9 ("arm64: signal: Ensure si_code is valid for all fault signals") Signed-off-by: "Eric W. Biederman" arch/arm64/kernel/traps.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 57274ea25736496ee019a5c40479855b21888839 Author: Lu Baolu Date: Tue May 21 15:27:35 2019 +0800 iommu: Use right function to get group for device The iommu_group_get_for_dev() will allocate a group for a device if it isn't in any group. This isn't the use case in iommu_request_dm_for_dev(). Let's use iommu_group_get() instead. Fixes: d290f1e70d85a ("iommu: Introduce iommu_request_dm_for_dev()") Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel drivers/iommu/iommu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit dd5142ca5d24bcdb22e40add842d50a59ffa769e Author: Sai Praneeth Prakhya Date: Fri May 24 16:40:17 2019 -0700 iommu/vt-d: Add debugfs support to show scalable mode DMAR table internals A DMAR table walk would typically follow the below process. 1. Bus number is used to index into root table which points to a context table. 2. Device number and Function number are used together to index into context table which then points to a pasid directory. 3. PASID[19:6] is used to index into PASID directory which points to a PASID table. 4. PASID[5:0] is used to index into PASID table which points to all levels of page tables. Whenever a user opens the file "/sys/kernel/debug/iommu/intel/dmar_translation_struct", the above described DMAR table walk is performed and the contents of the table are dumped into the file. The dump could be handy while dealing with devices that use PASID. Example of such dump: cat /sys/kernel/debug/iommu/intel/dmar_translation_struct (Please note that because of 80 char limit, entries that should have been in the same line are broken into different lines) IOMMU dmar0: Root Table Address: 0x436f7c000 B.D.F Root_entry Context_entry PASID PASID_table_entry 00:0a.0 0x0000000000000000:0x000000044dd3f001 0x0000000000100000:0x0000000435460e1d 0 0x000000044d6e1089:0x0000000000000003:0x0000000000000001 00:0a.0 0x0000000000000000:0x000000044dd3f001 0x0000000000100000:0x0000000435460e1d 1 0x0000000000000049:0x0000000000000001:0x0000000003c0e001 Note that the above format is followed even for legacy DMAR table dump which doesn't support PASID and hence in such cases PASID is defaulted to -1 indicating that PASID and it's related fields are invalid. Cc: Joerg Roedel Cc: Ashok Raj Cc: Lu Baolu Cc: Sohil Mehta Cc: David Woodhouse Cc: Jacob Pan Cc: Andy Shevchenko Reviewed-by: Lu Baolu Reviewed-by: Andy Shevchenko Signed-off-by: Sai Praneeth Prakhya Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu-debugfs.c | 78 +++++++++++++++++++++++++++++++++++-- 1 file changed, 75 insertions(+), 3 deletions(-) commit cdd3a2499d30695730b22dc025c00b9b28884c6b Author: Sai Praneeth Prakhya Date: Fri May 24 16:40:16 2019 -0700 iommu/vt-d: Introduce macros useful for dumping DMAR table A scalable mode DMAR table walk would involve looking at bits in each stage of walk, like, 1. Is PASID enabled in the context entry? 2. What's the size of PASID directory? 3. Is the PASID directory entry present? 4. Is the PASID table entry present? 5. Number of PASID table entries? Hence, add these macros that will later be used during this walk. Apart from adding new macros, move existing macros (like pasid_pde_is_present(), get_pasid_table_from_pde() and pasid_supported()) to appropriate header files so that they could be reused. Cc: Joerg Roedel Cc: Ashok Raj Cc: Lu Baolu Cc: Sohil Mehta Cc: David Woodhouse Cc: Jacob Pan Cc: Andy Shevchenko Reviewed-by: Lu Baolu Reviewed-by: Andy Shevchenko Signed-off-by: Sai Praneeth Prakhya Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 6 +----- drivers/iommu/intel-pasid.c | 17 ----------------- drivers/iommu/intel-pasid.h | 26 ++++++++++++++++++++++++++ include/linux/intel-iommu.h | 6 ++++++ 4 files changed, 33 insertions(+), 22 deletions(-) commit ea09506c363e90ef0b7532fdcf187bb67281a5e6 Author: Sai Praneeth Prakhya Date: Fri May 24 16:40:15 2019 -0700 iommu/vt-d: Modify the format of intel DMAR tables dump Presently, "/sys/kernel/debug/iommu/intel/dmar_translation_struct" file dumps DMAR tables in the below format IOMMU dmar2: Root Table Address:4362cc000 Root Table Entries: Bus: 0 H: 0 L: 4362f0001 Context Table Entries for Bus: 0 Entry B:D.F High Low 160 00:14.0 102 4362ef001 184 00:17.0 302 435ec4001 248 00:1f.0 202 436300001 This format has few short comings like 1. When extended for dumping scalable mode DMAR table it will quickly be very clumsy, making it unreadable. 2. It has information like the Bus number and Entry which are basically part of B:D.F, hence are a repetition and are not so useful. So, change it to a new format which could be easily extended to dump scalable mode DMAR table. The new format looks as below: IOMMU dmar2: Root Table Address: 0x436f7d000 B.D.F Root_entry Context_entry 00:14.0 0x0000000000000000:0x0000000436fbd001 0x0000000000000102:0x0000000436fbc001 00:17.0 0x0000000000000000:0x0000000436fbd001 0x0000000000000302:0x0000000436af4001 00:1f.0 0x0000000000000000:0x0000000436fbd001 0x0000000000000202:0x0000000436fcd001 Cc: Joerg Roedel Cc: Ashok Raj Cc: Lu Baolu Cc: Sohil Mehta Cc: David Woodhouse Cc: Jacob Pan Cc: Andy Shevchenko Reviewed-by: Lu Baolu Reviewed-by: Andy Shevchenko Signed-off-by: Sai Praneeth Prakhya Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu-debugfs.c | 65 +++++++++++++++++++++++-------------- 1 file changed, 41 insertions(+), 24 deletions(-) commit f780a8dc196db1c41b5da21ecfa27e83ee5fb776 Author: Lukasz Odzioba Date: Mon May 20 15:41:28 2019 +0200 iommu/vt-d: Remove unnecessary rcu_read_locks We use RCU's for rarely updated lists like iommus, rmrr, atsr units. I'm not sure why domain_remove_dev_info() in domain_exit() was surrounded by rcu_read_lock. Lock was present before refactoring in d160aca527, but it was related to rcu list, not domain_remove_dev_info function. dmar_remove_one_dev_info() doesn't touch any of those lists, so it doesn't require a lock. In fact it is called 6 times without it anyway. Fixes: d160aca5276d ("iommu/vt-d: Unify domain->iommu attach/detachment") Signed-off-by: Lukasz Odzioba Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 4 ---- 1 file changed, 4 deletions(-) commit 889ca18093423af7bf224416fe7548a7e13e82fc Merge: f4aa80129ff7 9e7251fa3897 Author: Kalle Valo Date: Mon May 27 15:15:29 2019 +0300 Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git patches for 5.3. Major changes: ath10k * enable SDIO support, first one being QCA6174 hw3.2 commit 591d4dc4729004e98509efd1d23b8d8bf0111182 Author: Jani Nikula Date: Fri May 24 21:52:53 2019 +0300 drm/i915: make REG_BIT() and REG_GENMASK() work with variables REG_BIT() and REG_GENMASK() were intended to work with both constant expressions and otherwise, with the former having extra compile time checks for the bit ranges. Incredibly, the result of __builtin_constant_p() is not an integer constant expression when given a non-constant expression, leading to errors in BUILD_BUG_ON_ZERO(). Replace __builtin_constant_p() with the __is_constexpr() magic spell. Reported-by: Ville Syrjala Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190524185253.1088-1-jani.nikula@intel.com drivers/gpu/drm/i915/i915_reg.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2dbbcce1f8dd3cd3cbb95717fd73d771a6c60718 Author: Colin Ian King Date: Sat May 11 13:41:35 2019 +0100 iommu/amd: Remove redundant assignment to variable npages The variable npages is being initialized however this is never read and later it is being reassigned to a new value. The initialization is redundant and hence can be removed. Addresses-Coverity: ("Unused Value") Signed-off-by: Colin Ian King Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d7af4d987dfa31c5d715e940a447ea959f89e575 Author: Jacob Pan Date: Wed May 8 12:22:46 2019 -0700 iommu/vt-d: Fix bind svm with multiple devices If multiple devices try to bind to the same mm/PASID, we need to set up first level PASID entries for all the devices. The current code does not consider this case which results in failed DMA for devices after the first bind. Signed-off-by: Jacob Pan Reported-by: Mike Campin Signed-off-by: Joerg Roedel drivers/iommu/intel-svm.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit cc8baffe176197645ed674b38cef1d8548769a69 Author: Christopher Bostic Date: Mon May 20 21:13:33 2019 -0500 iio: dps310: Temperature measurement errata Add a manufacturer's suggested workaround to deal with early revisions of chip that don't indicate correct temperature. Readings can be in the ~60C range when they should be in the ~20's. Signed-off-by: Christopher Bostic Signed-off-by: Joel Stanley Signed-off-by: Eddie James Signed-off-by: Jonathan Cameron drivers/iio/pressure/dps310.c | 52 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 50 insertions(+), 2 deletions(-) commit ba6ec48e76bcd405c47d90b4497ddbcd4c9a578f Author: Joel Stanley Date: Mon May 20 21:13:32 2019 -0500 iio: Add driver for Infineon DPS310 The DPS310 is a temperature and pressure sensor. It can be accessed over i2c and SPI, but this driver only supports polling over i2c. Signed-off-by: Eddie James Signed-off-by: Joel Stanley Signed-off-by: Jonathan Cameron MAINTAINERS | 6 + drivers/iio/pressure/Kconfig | 11 + drivers/iio/pressure/Makefile | 1 + drivers/iio/pressure/dps310.c | 468 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 486 insertions(+) commit c2df2201b6933e927de24742a314ba2e0d13efd2 Author: Colin Ian King Date: Fri May 24 22:26:27 2019 +0100 drm/i915/gtt: set err to -ENOMEM on memory allocation failure Currently when the allocation of ppgtt->work fails the error return path via err_free returns an uninitialized value in err. Fix this by setting err to the appropriate error return of -ENOMEM. Addresses-Coverity: ("Uninitialized scalar variable") Fixes: d3622099c76f ("drm/i915/gtt: Always acquire struct_mutex for gen6_ppgtt_cleanup") Signed-off-by: Colin Ian King Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190524212627.24256-1-colin.king@canonical.com drivers/gpu/drm/i915/i915_gem_gtt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d5a5e4ec5b415e63dee9dd76653377455572ac09 Author: Todd Brandt Date: Tue May 14 10:53:59 2019 -0700 Add README and update pm-graph and sleepgraph docs Config/man page/README files: - include README in the pm-graph folder - add more detail to the example config to describe more options - update the sleepgraph man page to document the new arguments Signed-off-by: Todd Brandt [ rjw: Subject ] Signed-off-by: Rafael J. Wysocki tools/power/pm-graph/README | 552 ++++++++++++++++++++++++++++++++ tools/power/pm-graph/config/example.cfg | 26 ++ tools/power/pm-graph/sleepgraph.8 | 16 +- 3 files changed, 592 insertions(+), 2 deletions(-) commit 45dd0a42b90bed6cb8c63e7f88f62bf5662c2413 Author: Todd Brandt Date: Tue May 14 10:53:58 2019 -0700 Update to pm-graph 5.4 bootgraph: - dmesg log format has changed, update parser in two places - fix prints in preparation for upgrade to python3 sleepgraph: - fix prints in preparation for upgrade to python3 - add new trace events and kprobes to cover freeze more completely - add new -ftop callgraph trace over suspend_devices_and_enter - add -wifi option to check if a wifi connection is active - add -skipkprobe option to suppress unwanted kprobes in dev mode - add kernel params and sysinfo to the log output - don't crash if /dev/mem is throwing IO errors, ignore FPDT and DMI - fix kprobe length calculation when calls are recursive - add several new kernel issue definitions for USB, ACPI, ATA, etc - enable turbostat output to be read from stdout instead of from file - add BIOS call data to the timeline from acpi_ps_execute_method kprobe Signed-off-by: Todd Brandt Signed-off-by: Rafael J. Wysocki tools/power/pm-graph/bootgraph.py | 8 +- tools/power/pm-graph/sleepgraph.py | 491 ++++++++++++++++++++++++++----------- 2 files changed, 347 insertions(+), 152 deletions(-) commit 7673896a40693506db49c1e9f9c3a4a8c7e357c5 Author: Todd Brandt Date: Tue May 14 10:53:57 2019 -0700 Update to pm-graph 5.3 sleepgraph: - add support for parsing kernel issues from timeline dmesg logs - with -summary, generate a summary-issues.html for kernel issues found - with -summary, generate a summary-devices.html for device callback times - when recreating a timeline, use -o to set the output html filename - capture mcelog data when hardware errors occur and store in log - add -turbostat option to capture power data during freeze Signed-off-by: Todd Brandt Signed-off-by: Rafael J. Wysocki tools/power/pm-graph/sleepgraph.py | 496 ++++++++++++++++++++++++++++--------- 1 file changed, 379 insertions(+), 117 deletions(-) commit e618795367df99c463f5e4e0ddee9612fcce6b06 Author: Colin Ian King Date: Sat May 25 21:42:28 2019 +0100 dt-bindings: pinctrl: fix spelling mistakes in pinctl documentation The spelling of configured is incorrect in the documentation. Fix it. Signed-off-by: Colin Ian King Reviewed-by: Bjorn Andersson Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/qcom,apq8084-pinctrl.txt | 6 +++--- Documentation/devicetree/bindings/pinctrl/qcom,ipq8074-pinctrl.txt | 6 +++--- Documentation/devicetree/bindings/pinctrl/qcom,mdm9615-pinctrl.txt | 6 +++--- Documentation/devicetree/bindings/pinctrl/qcom,msm8916-pinctrl.txt | 6 +++--- Documentation/devicetree/bindings/pinctrl/qcom,msm8960-pinctrl.txt | 6 +++--- Documentation/devicetree/bindings/pinctrl/qcom,msm8994-pinctrl.txt | 6 +++--- Documentation/devicetree/bindings/pinctrl/qcom,msm8996-pinctrl.txt | 6 +++--- Documentation/devicetree/bindings/pinctrl/qcom,msm8998-pinctrl.txt | 6 +++--- Documentation/devicetree/bindings/pinctrl/qcom,qcs404-pinctrl.txt | 6 +++--- Documentation/devicetree/bindings/pinctrl/qcom,sdm660-pinctrl.txt | 6 +++--- Documentation/devicetree/bindings/pinctrl/qcom,sdm845-pinctrl.txt | 6 +++--- 11 files changed, 33 insertions(+), 33 deletions(-) commit 5c27de1df85066f2801f1ec406e641fdde178151 Author: Hans de Goede Date: Fri May 24 18:35:18 2019 +0200 drm/i915/dsi: Call drm_connector_cleanup on vlv_dsi_init error exit path If we exit vlv_dsi_init() because we failed to find a fixed_mode, then we've already called drm_connector_init() and we should call drm_connector_cleanup() to unregister the connector object. Reviewed-by: Ville Syrjälä Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20190524163518.17545-1-hdegoede@redhat.com drivers/gpu/drm/i915/vlv_dsi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 5b969bd1d9cdfc8200f3dccf07a0270eaa2f2bbd Author: Alexandru Ardelean Date: Mon May 27 09:55:18 2019 +0300 dmaengine: axi-dmac: assign `copy_align` property The `copy_align` property is a generic property that describes alignment for DMA memcpy & sg ops. It serves mostly an informational purpose, and can be used in DMA tests, to pass the info to know what alignment to expect. Signed-off-by: Alexandru Ardelean Signed-off-by: Vinod Koul drivers/dma/dma-axi-dmac.c | 2 ++ 1 file changed, 2 insertions(+) commit a5b20600a67a9b78a63e8d5b0c59327ddf636064 Author: Lars-Peter Clausen Date: Mon May 27 09:55:17 2019 +0300 dmaengine: axi-dmac: Discover length alignment requirement Starting with version 4.1.a the AXI-DMAC is capable of reporting the required length alignment. The LSBs that are required to be set for alignment will always read back as set from the transfer length register. It is not possible to clear them by writing a 0. This means the driver can discover the length alignment requirement by writing 0 to that register and reading back the value. Since the DMA will support length alignment requirements that are different from the address alignment requirement track both of them independently. For older versions of the peripheral assume that the length alignment requirement is equal to the address alignment requirement. Signed-off-by: Lars-Peter Clausen Signed-off-by: Alexandru Ardelean Signed-off-by: Vinod Koul drivers/dma/dma-axi-dmac.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) commit d27ac2e02bf256d4e824e7c1e1e1afa2b96cefcc Author: Alexandru Ardelean Date: Mon May 27 09:55:16 2019 +0300 include: fpga: adi-axi-common.h: add common regs & defs header The AXI HDL cores provided for Analog Devices reference designs all share some common base registers (e.g. version register at address 0x00). To reduce duplication for this, a common header is added to define these registers as well as bitfields & macros to work with these registers. Signed-off-by: Alexandru Ardelean Signed-off-by: Vinod Koul include/linux/fpga/adi-axi-common.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 7b11ef9653d2520540df708f92949f06ed8a42e2 Author: Weitao Hou Date: Sun May 26 15:13:24 2019 +0800 dmaengine: stm32: use to_platform_device() Use to_platform_device() instead of open-coding it. Signed-off-by: Weitao Hou Signed-off-by: Vinod Koul drivers/dma/stm32-dmamux.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit d7f3f7d847044a111d4abadf9c69aa54d0d05167 Author: Sumit Garg Date: Wed May 8 15:44:09 2019 +0530 MAINTAINERS: Add mailing list for the TEE subsystem Add a mailing list for patch reviews and discussions related to TEE subsystem. Suggested-by: Daniel Thompson Signed-off-by: Sumit Garg Signed-off-by: Jens Wiklander MAINTAINERS | 3 +++ 1 file changed, 3 insertions(+) commit c54d86641fe774154b7742b765e3e2f8affcb7e6 Author: Baolin Wang Date: Mon May 20 19:32:21 2019 +0800 dmaengine: sh: usb-dmac: Let the core do the device node validation Let the DMA engine core do the device node validation instead of drivers. Signed-off-by: Baolin Wang Signed-off-by: Vinod Koul drivers/dma/sh/usb-dmac.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 1dc1b29aa15ead508142bb109ef52686213d07f4 Author: Baolin Wang Date: Mon May 20 19:32:20 2019 +0800 dmaengine: sh: rcar-dmac: Let the core do the device node validation Let the DMA engine core do the device node validation instead of drivers. Signed-off-by: Baolin Wang Signed-off-by: Vinod Koul drivers/dma/sh/rcar-dmac.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit caf5e3e6e14d0b7df5c404683ff5d4fce4733a99 Author: Baolin Wang Date: Mon May 20 19:32:19 2019 +0800 dmaengine: mxs-dma: Let the core do the device node validation Let the DMA engine core do the device node validation instead of drivers. Signed-off-by: Baolin Wang Signed-off-by: Vinod Koul drivers/dma/mxs-dma.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 1d967195fd456ae0e5425ee39611455de32dc9de Author: Baolin Wang Date: Mon May 20 19:32:18 2019 +0800 dmaengine: mmp_tdma: Let the core do the device node validation Let the DMA engine core do the device node validation instead of drivers. Signed-off-by: Baolin Wang Signed-off-by: Vinod Koul drivers/dma/mmp_tdma.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit c88ba7b940f8ec9b50216a69db4ddfa1af58a98c Author: Baolin Wang Date: Mon May 20 19:32:17 2019 +0800 dmaengine: dma-jz4780: Let the core do the device node validation Let the DMA engine core do the device node validation instead of drivers. Signed-off-by: Baolin Wang Signed-off-by: Vinod Koul drivers/dma/dma-jz4780.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 990c0b53bf6599a9c9c7df1529dde681dee6cf64 Author: Baolin Wang Date: Mon May 20 19:32:16 2019 +0800 dmaengine: imx-sdma: Let the core do the device node validation Let the DMA engine core do the device node validation instead of drivers. Signed-off-by: Baolin Wang Signed-off-by: Vinod Koul drivers/dma/imx-sdma.c | 9 ++------- include/linux/platform_data/dma-imx.h | 1 - 2 files changed, 2 insertions(+), 8 deletions(-) commit 37c0afeb41f1c6061b8c5fec1eeec36117bd1193 Author: Baolin Wang Date: Mon May 20 19:32:15 2019 +0800 soc: tegra: fuse: Use dma_request_channel instead of __dma_request_channel() The __dma_request_channel() prototype has been changed to help to do device node validation, thus we can use dma_request_channel() instead of __dma_request_channel() to keep kernel bisectable. Signed-off-by: Baolin Wang Signed-off-by: Vinod Koul drivers/soc/tegra/fuse/fuse-tegra20.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f5151311c3f37f6edc85b2253ccf6d3e2a4c4c26 Author: Baolin Wang Date: Mon May 20 19:32:14 2019 +0800 dmaengine: Add matching device node validation in __dma_request_channel() When user try to request one DMA channel by __dma_request_channel(), it won't validate if it is the correct DMA device to request, that will lead each DMA engine driver to validate the correct device node in their filter function if it is necessary. Thus we can add the matching device node validation in the DMA engine core, to remove all of device node validation in the drivers. Tested-by: Peter Ujfalusi Signed-off-by: Baolin Wang Signed-off-by: Vinod Koul drivers/dma/dmaengine.c | 10 ++++++++-- drivers/dma/of-dma.c | 4 ++-- include/linux/dmaengine.h | 12 ++++++++---- 3 files changed, 18 insertions(+), 8 deletions(-) commit 432732b801c82b139f8ca72e3b284fb999ac40d2 Author: Pierre-Louis Bossart Date: Wed May 22 14:47:31 2019 -0500 soundwire: intel_init: add checks on link numbers Add mask to correctly read the SoundWire SHIM LCAP register. Only bits 2..0 are meaningful, the rest is about link synchronization and stream channel mapping. Without this mask, the hardware information would always be larger than whatever the BIOS would report. Also trap the case with zero links. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Vinod Koul drivers/soundwire/intel_init.c | 4 ++++ 1 file changed, 4 insertions(+) commit 27f14331a7d434ff860b3d23c2379cf1fb814a3c Author: Pierre-Louis Bossart Date: Wed May 22 14:47:30 2019 -0500 soundwire: fix typo in comments Copy/paste of sdw_intel_res Signed-off-by: Pierre-Louis Bossart Signed-off-by: Vinod Koul drivers/soundwire/intel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 121f436137eeef7858c34184ae183da9def8545a Author: Pierre-Louis Bossart Date: Wed May 22 14:47:29 2019 -0500 soundwire: Intel: add log for number of PCM and PDM PDIs This information will be reflected in debugfs but it's easier to see as a dmesg log. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Vinod Koul drivers/soundwire/intel.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 2d35526df9b17db9a1e04d8eda538a44541dde66 Author: Pierre-Louis Bossart Date: Wed May 22 14:47:28 2019 -0500 soundwire: cadence_master: check the number of bidir PDIs There is an assumption that the first two PDIs are reserved for Bulk, so we need to make sure the number of bidir PDIs is indeed larger than two. If the configuration provided is incorrect, this could lead to allocating a huge amount of memory. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Vinod Koul drivers/soundwire/cadence_master.c | 2 ++ 1 file changed, 2 insertions(+) commit a78b32d9c36bd25f96a1fe2e610712e119c86afb Author: Pierre-Louis Bossart Date: Wed May 22 14:47:27 2019 -0500 soundwire: cadence_master: log Slave status mask on errors The Slave status mask exposes 4 sticky bits. When the device loses sync, the IP will report two status but the log will only show that the device lost sync. The status mask has all the information needed so let's report it instead. Also change the resolution of the mask, using 64 bits is not needed when you need 4. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Vinod Koul drivers/soundwire/cadence_master.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit eb7df4c86e2802383ac69b3f4f4d88b0b503a986 Author: Pierre-Louis Bossart Date: Wed May 22 14:47:26 2019 -0500 soundwire: cadence_master: use rate_limited dynamic debug When commands start failing, e.g. due to a bad electrical connection or bus conflicts, the dmesg log is flooded. This should not happen for production devices but it's quite frequent when bringing-up a new platform. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Vinod Koul drivers/soundwire/cadence_master.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 8acbbfec280f1ee72ebeec407e39aa0d1b879b59 Author: Pierre-Louis Bossart Date: Wed May 22 14:47:25 2019 -0500 soundwire: rename/clarify MIPI DisCo properties The existing definitions are ambiguous and possibly misleading. For DP0, 'flow-control' is only relevant for the BRA protocol and should not be confused with async modes explicitly not supported for DP0, add prefix to follow MIPI DisCo definition The use of 'device_interrupts' is also questionable. The MIPI SoundWire spec defines Slave-, DP0- and DPN-level implementation-defined interrupts. Using the 'device' prefix in the last two cases is misleading, not only is the term 'device' overloaded but these properties are only valid at the DP0 and DPn levels. Rename to follow the MIPI definitions, no need to be creative here. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Vinod Koul drivers/soundwire/bus.c | 2 +- drivers/soundwire/mipi_disco.c | 6 +++--- drivers/soundwire/stream.c | 6 +++--- include/linux/soundwire/sdw.h | 13 +++++++------ 4 files changed, 14 insertions(+), 13 deletions(-) commit f6686a7d026dc00cecca2d2cefb7f75bb2f84801 Author: Pierre-Louis Bossart Date: Wed May 22 14:47:24 2019 -0500 soundwire: clarify comment The MIPI DisCo spec refers to dynamic frame shape, not to dynamic shape. Clarify. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Vinod Koul include/linux/soundwire/sdw.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 53d2e9c3773478d00d1851cc048d7ef9e60c7b6d Author: Pierre-Louis Bossart Date: Wed May 22 14:47:23 2019 -0500 soundwire: mipi-disco: fix clock stop modes Fix support for clock_stop_mode0 and 1. The existing code uses a bitmask between enums, one of which being zero. Or-ing with zero is not very useful in general...Fix by or-ing with a BIT dependent on the enum value. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Vinod Koul drivers/soundwire/mipi_disco.c | 4 ++-- include/linux/soundwire/sdw.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 3424305b8be456a8e23c951b8c9aebad0c765ff7 Author: Pierre-Louis Bossart Date: Wed May 22 14:47:22 2019 -0500 soundwire: rename 'freq' fields Rename all fields with 'freq' as 'clk_freq' to follow the MIPI specification and avoid confusion between bus clock and audio clocks. No functionality change. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Vinod Koul drivers/soundwire/bus.c | 4 ++-- drivers/soundwire/intel.c | 11 ++++++----- drivers/soundwire/mipi_disco.c | 23 ++++++++++++----------- drivers/soundwire/stream.c | 2 +- include/linux/soundwire/sdw.h | 12 ++++++------ 5 files changed, 27 insertions(+), 25 deletions(-) commit 446701d1d161f04aa107903bfe7ec14e1f6cd17f Author: Pierre-Louis Bossart Date: Wed May 22 14:47:21 2019 -0500 soundwire: mipi-disco: remove master_count property for masters The master_count is only defined for a Controller or a Slave in the MIPI DisCo for SoundWire document. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Vinod Koul include/linux/soundwire/sdw.h | 2 -- 1 file changed, 2 deletions(-) commit 53f3c097375c94e87b41227ebdff83c4f4e3af41 Author: Pierre-Louis Bossart Date: Wed May 22 14:47:20 2019 -0500 soundwire: remove master data port properties The SoundWire and DisCo specifications do not define Master data ports or related properties. Data ports are only defined for Slave devices, so remove the unused member in properties. Credits: this patch is based on an earlier internal contribution by Vinod Koul, Sanyog Kale, Shreyas Nc and Hardik Shah. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Vinod Koul include/linux/soundwire/sdw.h | 2 -- 1 file changed, 2 deletions(-) commit 8242c59315b7b40ac97e1274d715665569992ff4 Author: Pierre-Louis Bossart Date: Wed May 22 14:47:19 2019 -0500 soundwire: add port-related definitions Somehow previous header files did not include definition for sink/source, flow and grouping. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Vinod Koul include/linux/soundwire/sdw.h | 53 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) commit eadc0049e1ac391a4ffccac34cc4ccd2afebb48b Author: Pierre-Louis Bossart Date: Wed May 22 14:47:18 2019 -0500 soundwire: mipi_disco: fix master/link error The MIPI DisCo specification for SoundWire defines the "mipi-sdw-link-N-subproperties" for slaves and "mipi-sdw-master-N-subproperties" for controllers. This is a mistake that was not identified until now. Existing Intel DSDT tables use 'link' everywhere, and the MIPI spec will be updated to deprecate "mipi-sdw-master-N-subproperties" Fix to parse firmware information on existing devices. If we ever see a system with 'master-N-subproperties' I guess we'll have to try both. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Vinod Koul drivers/soundwire/mipi_disco.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6f11586f4896ee448262747788a0a3faf0fe9066 Author: Pierre-Louis Bossart Date: Wed May 22 14:47:17 2019 -0500 soundwire: intel: filter SoundWire controller device search The convention is that the SoundWire controller device is a child of the HDAudio controller. However there can be more than one child exposed in the DSDT table, and the current namespace walk returns the last (incorrect) device. Intel documentation states that bits 28..31 of the _ADR field represent the link type, with SoundWire assigned the value 4. Add a filter and terminate early when a valid _ADR is provided, otherwise keep iterating to find the next child. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Vinod Koul drivers/soundwire/intel_init.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) commit e9588eb9316ec3c6212ea6e6c31e2d0d91d67c2f Author: Heiner Kallweit Date: Sat May 25 21:14:39 2019 +0200 r8169: remove support for RTL_GIGA_MAC_VER_01 RTL_GIGA_MAC_VER_01 is RTL8169, the ancestor of the chip family. It didn't have an internal PHY and I've never seen it in the wild. What isn't there doesn't need to be maintained, so let's remove support for it. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169.c | 43 ++++++++---------------------------- 1 file changed, 9 insertions(+), 34 deletions(-) commit fcb40e161aa77df13c6c7a744726e92b4a24734c Author: Heiner Kallweit Date: Sat May 25 20:57:42 2019 +0200 r8169: improve RTL8168d PHY initialization Certain parts of the PHY initialization are the same for sub versions 1 and 2 of RTL8168d. So let's factor this out to simplify the code. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169.c | 153 ++++++++++++----------------------- 1 file changed, 52 insertions(+), 101 deletions(-) commit 37347efaa32938f313d5f93daf1a421d2bc2653a Merge: f4aa80129ff7 76719ee25db9 Author: David S. Miller Date: Sun May 26 22:19:39 2019 -0700 Merge branch 'r8169-small-improvements' Heiner Kallweit says: ==================== r8169: small improvements Series with small improvements. ==================== Signed-off-by: David S. Miller commit 76719ee25db93caa9b8b37f0b9838bfd3e24d817 Author: Heiner Kallweit Date: Sat May 25 20:45:04 2019 +0200 r8169: change type of member mac_version in rtl8169_private Use the appropriate enum type for member mac_version. And don't assign a fixed value to RTL_GIGA_MAC_NONE, there's no benefit in it. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 7160be2de59a9c45ffb18e62974289a0a7ab5232 Author: Heiner Kallweit Date: Sat May 25 20:44:01 2019 +0200 r8169: remove unneeded return statement in rtl_hw_init_8168g Remove not needed return statement. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 29ec0482c139298d8b33aab4bde4dbdb5836fc9e Author: Heiner Kallweit Date: Sat May 25 20:43:25 2019 +0200 r8169: remove rtl_hw_init_8168ep rtl_hw_init_8168ep() can be removed, this simplifies the code. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit f4aa80129ff71909380ee0bde8be36c5cc031d4c Author: YueHaibing Date: Sat May 25 20:45:10 2019 +0800 cxgb4: Make t4_get_tp_e2c_map static Fix sparse warning: drivers/net/ethernet/chelsio/cxgb4/t4_hw.c:6216:14: warning: symbol 't4_get_tp_e2c_map' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 99513cfa16c6f54471f522d897ce48dbe4f2bb43 Author: David Ahern Date: Fri May 24 16:37:07 2019 -0700 selftest: Fixes for icmp_redirect test I was really surprised that the IPv6 mtu exception followed by redirect test was passing as nothing about the code suggests it should. The problem is actually with the logic in the test script. Fix the test cases as follows: 1. add debug function to dump the initial and redirect gateway addresses for ipv6. This is shown only in verbose mode. It helps verify the output of 'route get'. 2. fix the check_exception logic for the reset case to make sure that for IPv4 neither mtu nor redirect appears in the 'route get' output. For IPv6, make sure mtu is not present and the gateway is the initial R1 lladdr. 3. fix the reset logic by using a function to delete the routes added by initial_route_*. This format works better for the nexthop version of the tests. While improving the test cases, go ahead and ensure that forwarding is disabled since IPv6 redirect requires it. Also, runs with kernel debugging enabled sometimes show a failure with one of the ipv4 tests, so spread the pings over longer time interval. The end result is that 2 tests now show failures: TEST: IPv6: mtu exception plus redirect [FAIL] and the VRF version. This is a bug in the IPv6 logic that will need to be fixed separately. Redirect followed by MTU works because __ip6_rt_update_pmtu hits the 'if (!rt6_cache_allowed_for_pmtu(rt6))' path and updates the mtu on the exception rt6_info. MTU followed by redirect does not have this logic. rt6_do_redirect creates a new exception and then rt6_insert_exception removes the old one which has the MTU exception. Fixes: ec8105352869 ("selftests: Add redirect tests") Signed-off-by: David Ahern Signed-off-by: David S. Miller tools/testing/selftests/net/icmp_redirect.sh | 46 +++++++++++++++++++++++----- 1 file changed, 38 insertions(+), 8 deletions(-) commit df80152265cd8d3c61f4f7b9146f28967930fcc4 Author: Colin Ian King Date: Fri May 24 22:56:58 2019 +0100 ipv4: remove redundant assignment to n The pointer n is being assigned a value however this value is never read in the code block and the end of the code block continues to the next loop iteration. Clean up the code by removing the redundant assignment. Fixes: 1bff1a0c9bbda ("ipv4: Add function to send route updates") Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Reviewed-by: David Ahern Signed-off-by: David S. Miller net/ipv4/fib_trie.c | 1 - 1 file changed, 1 deletion(-) commit 18de65d9e71a2ea20b9a7b4efbfcc5baa4f0d252 Author: Jan Kotas Date: Thu Apr 4 09:12:21 2019 +0100 soundwire: cdns: Fix compilation error on arm64 On arm64 the cadence_master.c file doesn't compile. readl and writel are undefined. This patch fixes that by including io.h. Signed-off-by: Jan Kotas Reviewed-by: Mukesh Ojha Signed-off-by: Vinod Koul drivers/soundwire/cadence_master.c | 1 + 1 file changed, 1 insertion(+) commit 476cc6c964a92a67aeec1597d6d40f5bbbdf1b03 Author: Heiner Kallweit Date: Fri May 24 22:24:19 2019 +0200 net: phy: bcm87xx: improve bcm87xx_config_init and feature detection PHY drivers don't have to and shouldn't fiddle with phylib internals. Most of the code in bcm87xx_config_init() can be removed because phylib takes care. In addition I replaced usage of PHY_10GBIT_FEC_FEATURES with an implementation of the get_features callback. PHY_10GBIT_FEC_FEATURES is used by this driver only and it's questionable whether there will be any other PHY supporting this mode only. Having said that in one of the next kernel versions we may decide to remove it. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/phy/bcm87xx.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) commit 8fb91c3550c4666d4c37b5494b1c68aa9c3284a5 Merge: ddf6ddb057f2 3c8fc8782044 Author: David S. Miller Date: Sun May 26 14:08:05 2019 -0700 Merge branch 'inet-frags-avoid-possible-races-at-netns-dismantle' Eric Dumazet says: ==================== inet: frags: avoid possible races at netns dismantle This patch series fixes a race happening on netns dismantle with frag queues. While rhashtable_free_and_destroy() is running, concurrent timers might run inet_frag_kill() and attempt rhashtable_remove_fast() calls. This is not allowed by rhashtable logic. Since I do not want to add expensive synchronize_rcu() calls in the netns dismantle path, I had to no longer inline netns_frags structures, but dynamically allocate them. The ten first patches make this preparation, so that the last patch clearly shows the fix. As this patch series is not exactly trivial, I chose to target 5.3. We will backport it once soaked a bit. ==================== Signed-off-by: David S. Miller commit 3c8fc87820446ce5b948dc17648509340102b818 Author: Eric Dumazet Date: Fri May 24 09:03:40 2019 -0700 inet: frags: rework rhashtable dismantle syszbot found an interesting use-after-free [1] happening while IPv4 fragment rhashtable was destroyed at netns dismantle. While no insertions can possibly happen at the time a dismantling netns is destroying this rhashtable, timers can still fire and attempt to remove elements from this rhashtable. This is forbidden, since rhashtable_free_and_destroy() has no synchronization against concurrent inserts and deletes. Add a new fqdir->dead flag so that timers do not attempt a rhashtable_remove_fast() operation. We also have to respect an RCU grace period before starting the rhashtable_free_and_destroy() from process context, thus we use rcu_work infrastructure. This is a refinement of a prior rough attempt to fix this bug : https://marc.info/?l=linux-netdev&m=153845936820900&w=2 Since the rhashtable cleanup is now deferred to a work queue, netns dismantles should be slightly faster. [1] BUG: KASAN: use-after-free in __read_once_size include/linux/compiler.h:194 [inline] BUG: KASAN: use-after-free in rhashtable_last_table+0x162/0x180 lib/rhashtable.c:212 Read of size 8 at addr ffff8880a6497b70 by task kworker/0:0/5 CPU: 0 PID: 5 Comm: kworker/0:0 Not tainted 5.2.0-rc1+ #2 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events rht_deferred_worker Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x172/0x1f0 lib/dump_stack.c:113 print_address_description.cold+0x7c/0x20d mm/kasan/report.c:188 __kasan_report.cold+0x1b/0x40 mm/kasan/report.c:317 kasan_report+0x12/0x20 mm/kasan/common.c:614 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:132 __read_once_size include/linux/compiler.h:194 [inline] rhashtable_last_table+0x162/0x180 lib/rhashtable.c:212 rht_deferred_worker+0x111/0x2030 lib/rhashtable.c:411 process_one_work+0x989/0x1790 kernel/workqueue.c:2269 worker_thread+0x98/0xe40 kernel/workqueue.c:2415 kthread+0x354/0x420 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 Allocated by task 32687: save_stack+0x23/0x90 mm/kasan/common.c:71 set_track mm/kasan/common.c:79 [inline] __kasan_kmalloc mm/kasan/common.c:489 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:462 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:503 __do_kmalloc_node mm/slab.c:3620 [inline] __kmalloc_node+0x4e/0x70 mm/slab.c:3627 kmalloc_node include/linux/slab.h:590 [inline] kvmalloc_node+0x68/0x100 mm/util.c:431 kvmalloc include/linux/mm.h:637 [inline] kvzalloc include/linux/mm.h:645 [inline] bucket_table_alloc+0x90/0x480 lib/rhashtable.c:178 rhashtable_init+0x3f4/0x7b0 lib/rhashtable.c:1057 inet_frags_init_net include/net/inet_frag.h:109 [inline] ipv4_frags_init_net+0x182/0x410 net/ipv4/ip_fragment.c:683 ops_init+0xb3/0x410 net/core/net_namespace.c:130 setup_net+0x2d3/0x740 net/core/net_namespace.c:316 copy_net_ns+0x1df/0x340 net/core/net_namespace.c:439 create_new_namespaces+0x400/0x7b0 kernel/nsproxy.c:107 unshare_nsproxy_namespaces+0xc2/0x200 kernel/nsproxy.c:206 ksys_unshare+0x440/0x980 kernel/fork.c:2692 __do_sys_unshare kernel/fork.c:2760 [inline] __se_sys_unshare kernel/fork.c:2758 [inline] __x64_sys_unshare+0x31/0x40 kernel/fork.c:2758 do_syscall_64+0xfd/0x680 arch/x86/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 7: save_stack+0x23/0x90 mm/kasan/common.c:71 set_track mm/kasan/common.c:79 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:451 kasan_slab_free+0xe/0x10 mm/kasan/common.c:459 __cache_free mm/slab.c:3432 [inline] kfree+0xcf/0x220 mm/slab.c:3755 kvfree+0x61/0x70 mm/util.c:460 bucket_table_free+0x69/0x150 lib/rhashtable.c:108 rhashtable_free_and_destroy+0x165/0x8b0 lib/rhashtable.c:1155 inet_frags_exit_net+0x3d/0x50 net/ipv4/inet_fragment.c:152 ipv4_frags_exit_net+0x73/0x90 net/ipv4/ip_fragment.c:695 ops_exit_list.isra.0+0xaa/0x150 net/core/net_namespace.c:154 cleanup_net+0x3fb/0x960 net/core/net_namespace.c:553 process_one_work+0x989/0x1790 kernel/workqueue.c:2269 worker_thread+0x98/0xe40 kernel/workqueue.c:2415 kthread+0x354/0x420 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 The buggy address belongs to the object at ffff8880a6497b40 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 48 bytes inside of 1024-byte region [ffff8880a6497b40, ffff8880a6497f40) The buggy address belongs to the page: page:ffffea0002992580 refcount:1 mapcount:0 mapping:ffff8880aa400ac0 index:0xffff8880a64964c0 compound_mapcount: 0 flags: 0x1fffc0000010200(slab|head) raw: 01fffc0000010200 ffffea0002916e88 ffffea000218fe08 ffff8880aa400ac0 raw: ffff8880a64964c0 ffff8880a6496040 0000000100000005 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a6497a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a6497a80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff8880a6497b00: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ^ ffff8880a6497b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a6497c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb Fixes: 648700f76b03 ("inet: frags: use rhashtables for reassembly units") Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David S. Miller include/net/inet_frag.h | 4 ++++ net/ipv4/inet_fragment.c | 49 ++++++++++++++++++++++++++++++++++++------------ 2 files changed, 41 insertions(+), 12 deletions(-) commit 4907abc605e328d61bee56e4e89db4f56ade2090 Author: Eric Dumazet Date: Fri May 24 09:03:39 2019 -0700 net: dynamically allocate fqdir structures Following patch will add rcu grace period before fqdir rhashtable destruction, so we need to dynamically allocate fqdir structures to not force expensive synchronize_rcu() calls in netns dismantle path. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/inet_frag.h | 17 ++++++++++++++--- include/net/netns/ieee802154_6lowpan.h | 2 +- include/net/netns/ipv4.h | 2 +- include/net/netns/ipv6.h | 4 ++-- net/ieee802154/6lowpan/reassembly.c | 24 +++++++++++++----------- net/ipv4/inet_fragment.c | 1 + net/ipv4/ip_fragment.c | 32 ++++++++++++++++---------------- net/ipv4/proc.c | 4 ++-- net/ipv6/netfilter/nf_conntrack_reasm.c | 27 ++++++++++++++------------- net/ipv6/proc.c | 4 ++-- net/ipv6/reassembly.c | 24 ++++++++++++------------ 11 files changed, 78 insertions(+), 63 deletions(-) commit a39aca678a0626941aa99c18c1c452ca758e7865 Author: Eric Dumazet Date: Fri May 24 09:03:38 2019 -0700 net: add a net pointer to struct fqdir fqdir will soon be dynamically allocated. We need to reach the struct net pointer from fqdir, so add it, and replace the various container_of() constructs by direct access to the new field. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/inet_frag.h | 5 ++++- net/ieee802154/6lowpan/reassembly.c | 2 +- net/ipv4/ip_fragment.c | 20 +++++++------------- net/ipv6/netfilter/nf_conntrack_reasm.c | 6 ++---- net/ipv6/reassembly.c | 8 +++----- 5 files changed, 17 insertions(+), 24 deletions(-) commit 9cce45f22ceedf639cbb5fb5dfe612a278d36b58 Author: Eric Dumazet Date: Fri May 24 09:03:37 2019 -0700 net: rename inet_frags_init_net() to fdir_init() And pass an extra parameter, since we will soon dynamically allocate fqdir structures. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/inet_frag.h | 3 ++- net/ieee802154/6lowpan/reassembly.c | 3 +-- net/ipv4/ip_fragment.c | 3 +-- net/ipv6/netfilter/nf_conntrack_reasm.c | 3 +-- net/ipv6/reassembly.c | 3 +-- 5 files changed, 6 insertions(+), 9 deletions(-) commit d2dfd43598f3ce5441daabc7b352cdfea811e021 Author: Eric Dumazet Date: Fri May 24 09:03:36 2019 -0700 ieee820154: 6lowpan: no longer reference init_net in lowpan_frags_ns_ctl_table (struct net *)->ieee802154_lowpan.fqdir will soon be a pointer, so make sure lowpan_frags_ns_ctl_table[] does not reference init_net. lowpan_frags_ns_sysctl_register() can perform the needed initialization for all netns. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ieee802154/6lowpan/reassembly.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit 3bb13dd4cae022aab8bb7605bb5e3cc97e7523e0 Author: Eric Dumazet Date: Fri May 24 09:03:35 2019 -0700 netfilter: ipv6: nf_defrag: no longer reference init_net in nf_ct_frag6_sysctl_table (struct net *)->nf_frag.fqdir will soon be a pointer, so make sure nf_ct_frag6_sysctl_table[] does not reference init_net. nf_ct_frag6_sysctl_register() can perform the needed initialization for all netns. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/netfilter/nf_conntrack_reasm.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) commit 8668d0e2bfdfe3ab85c3bbc45ad2e60ed2dca71c Author: Eric Dumazet Date: Fri May 24 09:03:34 2019 -0700 ipv6: no longer reference init_net in ip6_frags_ns_ctl_table[] (struct net *)->ipv6.fqdir will soon be a pointer, so make sure ip6_frags_ns_ctl_table[] does not reference init_net. ip6_frags_ns_ctl_register() can perform the needed initialization for all netns. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/reassembly.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit 8dfdb31335ee5aa99c30bbfd37294844a7ffb648 Author: Eric Dumazet Date: Fri May 24 09:03:33 2019 -0700 ipv4: no longer reference init_net in ip4_frags_ns_ctl_table[] (struct net *)->ipv4.fqdir will soon be a pointer, so make sure ip4_frags_ns_ctl_table[] does not reference init_net. ip4_frags_ns_ctl_register() can perform the needed initialization for all netns. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/ip_fragment.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit 803fdd99684714b3cdcbed4364473d41abbd6afe Author: Eric Dumazet Date: Fri May 24 09:03:32 2019 -0700 net: rename struct fqdir fields Rename the @frags fields from structs netns_ipv4, netns_ipv6, netns_nf_frag and netns_ieee802154_lowpan to @fqdir Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/netns/ieee802154_6lowpan.h | 2 +- include/net/netns/ipv4.h | 2 +- include/net/netns/ipv6.h | 4 +-- net/ieee802154/6lowpan/reassembly.c | 36 +++++++++++------------ net/ipv4/ip_fragment.c | 52 ++++++++++++++++----------------- net/ipv4/proc.c | 4 +-- net/ipv6/netfilter/nf_conntrack_reasm.c | 40 ++++++++++++------------- net/ipv6/proc.c | 4 +-- net/ipv6/reassembly.c | 40 ++++++++++++------------- 9 files changed, 92 insertions(+), 92 deletions(-) commit 89fb900514d1623cf6019848f39d0557a3d31890 Author: Eric Dumazet Date: Fri May 24 09:03:31 2019 -0700 net: rename inet_frags_exit_net() to fqdir_exit() Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/inet_frag.h | 2 +- net/ieee802154/6lowpan/reassembly.c | 4 ++-- net/ipv4/inet_fragment.c | 4 ++-- net/ipv4/ip_fragment.c | 4 ++-- net/ipv6/netfilter/nf_conntrack_reasm.c | 4 ++-- net/ipv6/reassembly.c | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) commit 6ce3b4dcee4f96a5000d3f790403eb6997e3d553 Author: Eric Dumazet Date: Fri May 24 09:03:30 2019 -0700 inet: rename netns_frags to fqdir 1) struct netns_frags is renamed to struct fqdir This structure is really holding many frag queues in a hash table. 2) (struct inet_frag_queue)->net field is renamed to fqdir since net is generally associated to a 'struct net' pointer in networking stack. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/inet_frag.h | 29 +++++++++--------- include/net/netns/ieee802154_6lowpan.h | 2 +- include/net/netns/ipv4.h | 2 +- include/net/netns/ipv6.h | 4 +-- net/ieee802154/6lowpan/reassembly.c | 2 +- net/ipv4/inet_fragment.c | 52 ++++++++++++++++----------------- net/ipv4/ip_fragment.c | 20 ++++++------- net/ipv6/netfilter/nf_conntrack_reasm.c | 4 +-- net/ipv6/reassembly.c | 6 ++-- 9 files changed, 61 insertions(+), 60 deletions(-) commit ddf6ddb057f22445837df4d01bd966995d4426f7 Author: Marek Vasut Date: Fri May 24 16:22:28 2019 +0200 net: phy: tja11xx: Add TJA11xx PHY driver Add driver for the NXP TJA1100 and TJA1101 PHYs. These PHYs are special BroadRReach 100BaseT1 PHYs used in automotive. Signed-off-by: Marek Vasut Cc: Andrew Lunn Cc: Florian Fainelli Cc: Guenter Roeck Cc: Heiner Kallweit Cc: Jean Delvare Cc: linux-hwmon@vger.kernel.org Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/Kconfig | 6 + drivers/net/phy/Makefile | 1 + drivers/net/phy/nxp-tja11xx.c | 423 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 430 insertions(+) commit b25ba113dd3f08190c43b5afc9f87d9f185e2896 Merge: 18e8817126d2 f438bfe9d4fe Author: David S. Miller Date: Sun May 26 13:24:56 2019 -0700 Merge branch 'net-hns3-add-aRFS-feature-and-fix-FEC-bugs-for-HNS3-driver' Huazhong Tan says: ==================== net: hns3: add aRFS feature and fix FEC bugs for HNS3 driver This patchset adds some new features support and fixes some bugs: [Patch 1/4 - 3/4] adds support for aRFS [Patch 4/4] fix FEC configuration issue ==================== Signed-off-by: David S. Miller commit f438bfe9d4fe2e491505abfbf04d7c506e00d146 Author: Jian Shen Date: Fri May 24 19:19:48 2019 +0800 net: hns3: fix for FEC configuration The FEC capbility may be changed with port speed changes. Driver needs to read the active FEC mode, and update FEC capability when port speed changes. Fixes: 7e6ec9148a1d ("net: hns3: add support for FEC encoding control") Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 7 +++++++ 1 file changed, 7 insertions(+) commit d93ed94fbeaf3bf5ed16b57574dbb48ab7f7e41a Author: Jian Shen Date: Fri May 24 19:19:47 2019 +0800 net: hns3: add aRFS support for PF This patch adds aRFS support for PF. The aRFS rules are also stored in the hardware flow director table, Use the existing filter management functions to insert TCPv4/UDPv4/TCPv6/UDPv6 flow director filters. To avoid rule conflict, once user adds flow director rules with ethtool, the aRFS will be disabled, and clear exist aRFS rules. Once all user configure rules were removed, aRFS can work again. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hnae3.h | 4 + drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 31 ++++ .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 200 +++++++++++++++++++++ .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h | 3 + 4 files changed, 238 insertions(+) commit 4412288757064b664499af9becd028c949cd53e3 Author: Jian Shen Date: Fri May 24 19:19:46 2019 +0800 net: hns3: refine the flow director handle In order to be compatible with aRFS rules, this patch adds spin_lock for flow director rule adding, deleting, querying, and packages the rule configuration. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 131 ++++++++++++++++----- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h | 13 ++ 2 files changed, 112 insertions(+), 32 deletions(-) commit ffab9691bcb2fe2594f4c38bfceb4d9685b93b87 Author: Jian Shen Date: Fri May 24 19:19:45 2019 +0800 net: hns3: initialize CPU reverse mapping Allocate CPU rmap and add entry for each irq. CPU rmap is used in aRFS to get the queue number of the rx completion interrupts. In additional, remove the calling of irq_set_affinity_notifier() in hns3_nic_init_irq(), because we have registered notifier in irq_cpu_rmap_add() for each vector, otherwise it may cause use-after-free issue. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 77 +++++++++++++++---------- 1 file changed, 48 insertions(+), 29 deletions(-) commit 18e8817126d2551fb9b0f90ceb6e130efc2196ca Merge: 9b3c520e9628 d51b6ce441d3 Author: David S. Miller Date: Sun May 26 13:22:50 2019 -0700 Merge branch 'ath79-add-ag71xx-support' Oleksij Rempel says: ==================== MIPS: ath79: add ag71xx support 2019.05.24 v6: - ag71xx: remove double union - ag71xx: reverse Christmas tree for all functions - ag71xx: add Reviewed-by: Andrew Lunn 2019.05.20 v5: - ag71xx: remove MII_CMD_WRITE, the name is confusing. It is actually disables MII_CMD_READ. - ag71xx: rework ag71xx_mdio_mii_read/write - ag71xx: set proper mask for the addr in ag71xx_mdio_mii_read/write - Kconfig: remove MDIO_BITBANG - ag71xx: ./scripts/checkpatch.pl it. 2019.05.19 v4: - DT: define eth and mdio clocks - ag71xx: remove module parameters - ag71xx: return proper error value on mdio_read/write - ag71xx: use proper mdio clock registration - ag71xx: add ag71xx_dma_wait_stop() for ag71xx_dma_reset() - ag71xx: remove ag71xx_speed_str() - ag71xx: use phydev->link/sped/duplex instead of ag-> variants - ag71xx: use WARN() instead of BUG() - ag71xx: drop big part of ag71xx_phy_link_adjust() - ag71xx: drop most of ag71xx_do_ioctl() - ag71xx: register eth clock - ag71xx: remove AG71XX_ETH0_NO_MDIO quirk. 2019.04.22 v3: - ag71xx: use phy_modes() instead of ag71xx_get_phy_if_mode_name() - ag71xx: remove .ndo_poll_controller support - ag71xx: unregister_netdev before disconnecting phy. 2019.04.18 v2: - ag71xx: add list of openwrt authors - ag71xx: remove redundant PHY_POLL assignment - ag71xx: use phy_attached_info instead of netif_info - ag71xx: remove redundant netif_carrier_off() on .stop. - DT: use "ethernet" instead of "eth" This patch series provide ethernet support for many Atheros/QCA MIPS based SoCs. I reworked ag71xx driver which was previously maintained within OpenWRT repository. So far, following changes was made to make upstreaming easier: - everything what can be some how used in user space was removed. Most of it was debug functionality. - most of deficetree bindings was removed. Not every thing made sense and most of it is SoC specific, so it is possible to detect it by compatible. - mac and mdio parts are merged in to one driver. It makes easier to maintaine SoC specific quirks. ==================== Signed-off-by: David S. Miller commit d51b6ce441d356369387d20bc1de5f2edb0ab71e Author: Oleksij Rempel Date: Fri May 24 13:12:24 2019 +0200 net: ethernet: add ag71xx driver Add support for Atheros/QCA AR7XXX/AR9XXX/QCA95XX built-in ethernet mac support Reviewed-by: Andrew Lunn Signed-off-by: Oleksij Rempel Signed-off-by: David S. Miller drivers/net/ethernet/atheros/Kconfig | 10 +- drivers/net/ethernet/atheros/Makefile | 1 + drivers/net/ethernet/atheros/ag71xx.c | 1898 +++++++++++++++++++++++++++++++++ 3 files changed, 1908 insertions(+), 1 deletion(-) commit 7ff836f064e2c814a7504c91a4464eea45d475bd Author: Oleksij Rempel Date: Fri May 24 13:12:23 2019 +0200 MIPS: ath79: ar9331: add Ethernet nodes Add ethernet nodes supported by ag71xx driver. Signed-off-by: Oleksij Rempel Signed-off-by: David S. Miller arch/mips/boot/dts/qca/ar9331.dtsi | 26 ++++++++++++++++++++++++++ arch/mips/boot/dts/qca/ar9331_dpt_module.dts | 8 ++++++++ 2 files changed, 34 insertions(+) commit 462409365b698a62a93ddf834b6221e28b76652a Author: Oleksij Rempel Date: Fri May 24 13:12:22 2019 +0200 dt-bindings: net: add qca,ar71xx.txt documentation Add binding documentation for Atheros/QCA networking IP core used in many routers. Signed-off-by: Oleksij Rempel Reviewed-by: Rob Herring Signed-off-by: David S. Miller .../devicetree/bindings/net/qca,ar71xx.txt | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit 9b3c520e96289e0a5566d2869ba6d9c4e1f2b0aa Merge: cecd7582a631 a9b02c615b0f Author: David S. Miller Date: Sun May 26 13:04:12 2019 -0700 Merge branch 'qed-Improve-performance-on-100G-link-for-offload-protocols' Michal Kalderon says: ==================== qed*: Improve performance on 100G link for offload protocols This patch series modifies the current implementation of PF selection. The refactoring of the llh code enables setting additional filters (mac / protocol) per PF, and improves performance for offload protocols (RoCE, iWARP, iSCSI, fcoe) on 100G link (was capped at 90G per single PF). Improved performance on 100G link is achieved by configuring engine affinty to each PF. The engine affinity is read from the Management FW and hw is configured accordingly. A new hw resource called PPFID is exposed and an API is introduced to utilize it. This additional resource enables setting the affinity of a PF and providing more classification rules per PF. qedr,qedi,qedf are also modified as part of the series. Without the changes functionality is broken. v1 --> v2 --------- - Remove iWARP module parameter. Instead use devlink param infrastructure for setting the iwarp_cmt mode. Additional patch added to the series for adding the devlink support. - Fix kbuild test robot warning on qed_llh_filter initialization. - Remove comments inside function calls ==================== Signed-off-by: David S. Miller commit a9b02c615b0f92e3e8ad3245581fd7e1bbdc3db0 Author: Chad Dupuis Date: Sun May 26 15:22:30 2019 +0300 qedf: Use hwfns and affin_hwfn_idx to get MSI-X vector index to use MSI-X vector index is determined using qed device information and affinity to use. Signed-off-by: Chad Dupuis Signed-off-by: Saurav Kashyap Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller drivers/scsi/qedf/qedf_main.c | 39 ++++++++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 11 deletions(-) commit 2bfbc570586e4045cb09214af477223f732a0523 Author: Manish Rangankar Date: Sun May 26 15:22:29 2019 +0300 qedi: Use hwfns and affin_hwfn_idx to get MSI-X vector index MSI-X vector index is determined using qed device information and affinity to use. Signed-off-by: Manish Rangankar Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller drivers/scsi/qedi/qedi_main.c | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) commit 13b99d3d39074eb88507ebb9dd4fa147a63bc53a Author: Manish Rangankar Date: Sun May 26 15:22:28 2019 +0300 Revert "scsi: qedi: Allocate IRQs based on msix_cnt" Always request for number of irqs equals to number of queues. This reverts commit 1a291bce5eaf5374627d337157544aa6499ce34a. Signed-off-by: Manish Rangankar Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller drivers/scsi/qedi/qedi_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3576e99e08217f291290ac62431c7e330ac111c4 Author: Michal Kalderon Date: Sun May 26 15:22:27 2019 +0300 qed*: Add iWARP 100g support Add iWARP engine affinity setting for supporting iWARP over 100g. iWARP cannot be distinguished by the LLH from L2, hence the engine division will affect L2 as well. For this reason we add a parameter to devlink to determine the engine division. Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller drivers/infiniband/hw/qedr/main.c | 13 +++++++++++++ drivers/net/ethernet/qlogic/qed/qed_rdma.c | 31 ++++++++++++++++++++++++++++++ include/linux/qed/qed_rdma_if.h | 2 ++ 3 files changed, 46 insertions(+) commit 24e04879abdd7afb73a64a6dd64d7b51d924d0e3 Author: Michal Kalderon Date: Sun May 26 15:22:26 2019 +0300 qed: Add qed devlink parameters table The table currently contains a single parameter for configuring whether iWARP should be enabled on a 100g device. Enabling iWARP on a 100g device impacts L2 performance and is therefore not enabled by default. Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed.h | 3 + drivers/net/ethernet/qlogic/qed/qed_main.c | 110 +++++++++++++++++++++++++++++ 2 files changed, 113 insertions(+) commit 8366d520019f366fabd6c7a13032bdcd837e18d4 Author: Michal Kalderon Date: Sun May 26 15:22:25 2019 +0300 qed: Set the doorbell address correctly In 100g mode the doorbell bar is united for both engines. Set the correct offset in the hwfn so that the doorbell returned for RoCE is in the affined hwfn. Signed-off-by: Ariel Elior Signed-off-by: Denis Bolotin Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dev.c | 29 ++++++++++++++++++----------- drivers/net/ethernet/qlogic/qed/qed_rdma.c | 2 +- 2 files changed, 19 insertions(+), 12 deletions(-) commit 443473d2f3a53100cfde67415feddde2b8781732 Author: Michal Kalderon Date: Sun May 26 15:22:24 2019 +0300 qedr: Change the MSI-X vectors selection to be based on affined engine Use the msix vectors of the affined hwfn and not the leading one. Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller drivers/infiniband/hw/qedr/main.c | 9 +++++++-- drivers/infiniband/hw/qedr/qedr.h | 2 ++ drivers/net/ethernet/qlogic/qed/qed_ll2.c | 4 ++-- 3 files changed, 11 insertions(+), 4 deletions(-) commit 7e50769caaea9ab046c8c370918f092d242fb6e8 Author: Michal Kalderon Date: Sun May 26 15:22:23 2019 +0300 qed: Modify offload protocols to use the affined engine To enable 100g support for offload protocols each PF gets a dedicated engine to work on from the MFW. This patch modifies the code to use the affined hwfn instead of the leading one. The offload protocols require the ll2 to be opened on both engines, and not just the affined hwfn. Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_fcoe.c | 26 +- drivers/net/ethernet/qlogic/qed/qed_iscsi.c | 35 ++- drivers/net/ethernet/qlogic/qed/qed_ll2.c | 378 +++++++++++++++++----------- drivers/net/ethernet/qlogic/qed/qed_rdma.c | 23 +- 4 files changed, 273 insertions(+), 189 deletions(-) commit 08eb1fb0f77b0036568d2228f3425f2595d671bb Author: Michal Kalderon Date: Sun May 26 15:22:22 2019 +0300 qed*: Change hwfn used for sb initialization When initializing status blocks use the affined hwfn instead of the leading one for RDMA / Storage Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller drivers/infiniband/hw/qedr/main.c | 3 +- drivers/net/ethernet/qlogic/qed/qed_main.c | 47 ++++++++++++++++------------ drivers/net/ethernet/qlogic/qede/qede_main.c | 3 +- include/linux/qed/qed_if.h | 10 +++++- 4 files changed, 40 insertions(+), 23 deletions(-) commit 79284adeb99ef4f83af51a3ef9b520bc8e6d55f9 Author: Michal Kalderon Date: Sun May 26 15:22:21 2019 +0300 qed: Add llh ppfid interface and 100g support for offload protocols This patch refactors the current llh implementation. It exposes a hw resource called ppfid (port-pfid) and implements an API for configuring the resource. Default configuration which was used until now limited the number of filters per PF and did not support engine affinity per protocol. The new API enables allocating more filter rules per PF and enables affinitizing protocol packets to a certain engine which enables full 100g protocol offload support. Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed.h | 21 +- drivers/net/ethernet/qlogic/qed/qed_dev.c | 1246 +++++++++++++++++++----- drivers/net/ethernet/qlogic/qed/qed_dev_api.h | 97 +- drivers/net/ethernet/qlogic/qed/qed_hsi.h | 16 +- drivers/net/ethernet/qlogic/qed/qed_iwarp.c | 24 +- drivers/net/ethernet/qlogic/qed/qed_iwarp.h | 4 +- drivers/net/ethernet/qlogic/qed/qed_ll2.c | 28 +- drivers/net/ethernet/qlogic/qed/qed_mcp.c | 65 ++ drivers/net/ethernet/qlogic/qed/qed_mcp.h | 16 + drivers/net/ethernet/qlogic/qed/qed_rdma.c | 19 +- drivers/net/ethernet/qlogic/qed/qed_reg_addr.h | 6 + 11 files changed, 1203 insertions(+), 339 deletions(-) commit 83bf76e3528ace34c28f8033bfa3d2e3ec9861aa Author: Michal Kalderon Date: Sun May 26 15:22:20 2019 +0300 qed: Modify api for performing a dmae to another PF This patch modifies the dmae API to enable performing a dmae operation to another PF. This enables sharing between the llh entries between PFs and thus increasing the amount of filters per PF under certain configurations. The llh entries require using the dmae since the memory is widebus, which requires atomicity in access. Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_cxt.c | 5 +-- drivers/net/ethernet/qlogic/qed/qed_debug.c | 2 +- drivers/net/ethernet/qlogic/qed/qed_dev_api.h | 16 +++++++--- drivers/net/ethernet/qlogic/qed/qed_hw.c | 44 ++++++++++++++------------ drivers/net/ethernet/qlogic/qed/qed_init_ops.c | 9 +++--- drivers/net/ethernet/qlogic/qed/qed_int.c | 8 ++--- drivers/net/ethernet/qlogic/qed/qed_l2.c | 4 +-- drivers/net/ethernet/qlogic/qed/qed_sriov.c | 3 +- 8 files changed, 52 insertions(+), 39 deletions(-) commit bc4054b55f14f33fdeb8c2d51eef4eaf5e4e1862 Author: Rodrigo Ribeiro Date: Fri May 24 00:29:50 2019 -0300 staging: iio: adis16240: add of_match_table entry This patch adds of_match_table entry in device driver in order to enable spi fallback probing. Signed-off-by: Rodrigo Ribeiro Reviewed-by: Marcelo Schmitt Signed-off-by: Jonathan Cameron drivers/staging/iio/accel/adis16240.c | 1 + 1 file changed, 1 insertion(+) commit 094c52dbaf0a9aae5cef59eaa17cf257aa76bd74 Author: João Seckler Date: Sat May 18 19:27:33 2019 -0300 staging: iio: ad7746: add device tree support Add a of_device_id struct variable and subsequent call to MODULE_DEVICE_TABLE macro to support device tree. Signed-off-by: João Seckler Signed-off-by: Lucas Oshiro Co-developed-by: Lucas Oshiro Signed-off-by: Jonathan Cameron drivers/staging/iio/cdc/ad7746.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit ed83144e6d71bc0ac56805388bdd04949beb1be7 Author: Lucas Oshiro Date: Sat May 18 18:44:34 2019 -0300 staging: iio: adis16240: add device to module device table Add a of_device_id struct and MODULE_DEVICE_TABLE call, in order to add device-tree support for this driver. Signed-off-by: Lucas Oshiro Signed-off-by: Rodrigo Ribeiro Co-developed-by: Rodrigo Ribeiro Signed-off-by: Jonathan Cameron drivers/staging/iio/accel/adis16240.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 82e1506339bd899e41e7d86b008a341426d85f27 Author: Bárbara Fernandes Date: Sat May 18 19:43:33 2019 -0300 staging: iio: adt7316: create of_device_id array Create structure of type of_device_id in order to register all devices the driver is able to manage. Signed-off-by: Bárbara Fernandes Signed-off-by: Wilson Sales Co-developed-by: Wilson Sales Acked-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron drivers/staging/iio/addac/adt7316-spi.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 1916ebfdfbacd3fa9a6fce72032cf612375c1183 Author: YueHaibing Date: Sat May 25 22:19:41 2019 +0800 leds: max77650: Remove set but not used variable 'parent' Fixes gcc '-Wunused-but-set-variable' warning: drivers/leds/leds-max77650.c: In function max77650_led_probe: drivers/leds/leds-max77650.c:67:17: warning: variable parent set but not used [-Wunused-but-set-variable] It is never used and can be removed. Signed-off-by: YueHaibing Signed-off-by: Jacek Anaszewski drivers/leds/leds-max77650.c | 2 -- 1 file changed, 2 deletions(-) commit 433068aa88cc1046db0adf0d158d98f59d846bbc Author: Pavel Machek Date: Sun May 26 09:38:55 2019 +0200 leds: avoid flush_work in atomic context It turns out that various triggers use led_blink_setup() from atomic context, so we can't do a flush_work there. Flush is still needed for slow LEDs, but we can move it to sysfs code where it is safe. WARNING: inconsistent lock state 5.2.0-rc1 #1 Tainted: G W -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. swapper/1/0 [HC0[0]:SC1[1]:HE1:SE0] takes: 000000006e30541b ((work_completion)(&led_cdev->set_brightness_work)){+.?.}, at: +__flush_work+0x3b/0x38a {SOFTIRQ-ON-W} state was registered at: lock_acquire+0x146/0x1a1 __flush_work+0x5b/0x38a flush_work+0xb/0xd led_blink_setup+0x1e/0xd3 led_blink_set+0x3f/0x44 tpt_trig_timer+0xdb/0x106 ieee80211_mod_tpt_led_trig+0xed/0x112 Fixes: 0db37915d912 ("leds: avoid races with workqueue") Signed-off-by: Pavel Machek Tested-by: Hugh Dickins Signed-off-by: Jacek Anaszewski drivers/leds/led-core.c | 5 ----- drivers/leds/trigger/ledtrig-timer.c | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) commit b361797f3d0b5accf23af848a089589fb8ce5f80 Author: Maxime Ripard Date: Sat May 25 15:41:37 2019 +0200 dt-bindings: vendor: Fix simtek vendor compatible In the text file, simtek didn't have any description and apparently this confused the conversion script. Fix the simtek entry and add a proper description. Signed-off-by: Maxime Ripard Signed-off-by: Rob Herring Documentation/devicetree/bindings/vendor-prefixes.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8e2c67f9960d32edcd16c846c947b2a05dad32ad Author: Maxime Ripard Date: Sat May 25 15:41:36 2019 +0200 dt-bindings: vendor: Escape single quote Single quotes need to be escaped in YAML, make sure it's the case. Signed-off-by: Maxime Ripard Signed-off-by: Rob Herring Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d1db9ad57f9051548a7ba687255906e969dbda75 Author: Thiago Estrela Date: Sat May 18 19:42:13 2019 -0300 staging: iio: adis16203: Add of_device_id table Accomplish device tree compatibility to driver ADIS16203 by adding of_device_id table and making a subsequent call to MODULE_DEVICE_TABLE. Signed-off-by: Thiago Estrela Signed-off-by: Tiago Napoli Co-developed-by: Tiago Napoli Signed-off-by: Pedro Sousa Co-developed-by: Pedro Sousa Reviewed-by: Matheus Tavares Reviewed-by: Marcelo Schmitt Signed-off-by: Jonathan Cameron drivers/staging/iio/accel/adis16203.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 266233967c23b701930ff28a2227301fa623acef Author: João Victor Marques de Oliveira Date: Sat May 18 19:47:20 2019 -0300 staging: iio: ad9834: add of_device_id table Add a of_device_id struct array of_match_table variable and subsequent call to MODULE_DEVICE_TABLE macro to enable explicit device tree support. Co-developed-by: Thiago L. A. Miller Signed-off-by: Thiago L. A. Miller Co-developed-by: Osvaldo M. Yasuda Signed-off-by: Osvaldo M. Yasuda Signed-off-by: João Victor Marques de Oliveira Signed-off-by: Jonathan Cameron drivers/staging/iio/frequency/ad9834.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 0bae068509717712071193e5465a9ecc3c20e135 Author: Bárbara Fernandes Date: Sat May 18 19:41:36 2019 -0300 staging: iio: cdc: ad7150: create macro for capacitance channels Create macro for capacitance channels in order to remove the repeated code and improve its readability. Signed-off-by: Bárbara Fernandes Signed-off-by: Wilson Sales Co-developed-by: Wilson Sales Signed-off-by: Jonathan Cameron drivers/staging/iio/cdc/ad7150.c | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) commit 182c58ab2e5b654c2ffd1e959311173cb3bc70b1 Author: Sam Ravnborg Date: Sun May 26 13:36:24 2019 +0200 drm/mcde: Fix compile problems Some further compile problems appeared while merging the patch, fix them up. Signed-off-by: Sam Ravnborg Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20190526113624.6702-1-linus.walleij@linaro.org drivers/gpu/drm/mcde/mcde_display.c | 2 +- drivers/gpu/drm/mcde/mcde_dsi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 95b608044fe0ea128133fdf6ee4c999d5165f7af Author: Sam Ravnborg Date: Sun May 19 20:36:36 2019 +0200 drm/bridge: drop drmP.h usage Drop use of the deprecated drmP.h header file. While touching the list of include files: - Divide include files in blocks of linux/* drm/* etc. - Sort individual blocks of include files - Remove duplicated header file v2: - Be consistent in the order of the include blocks (Laurent) Signed-off-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Cc: Andrzej Hajda Cc: David Airlie Cc: Daniel Vetter Cc: Peter Senna Tschudin Cc: Martin Donnelly Cc: Martyn Welch Link: https://patchwork.freedesktop.org/patch/msgid/20190519183636.19588-1-sam@ravnborg.org drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 8 +++---- drivers/gpu/drm/bridge/analogix-anx78xx.c | 8 +++---- drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 18 +++++++-------- drivers/gpu/drm/bridge/dumb-vga-dac.c | 2 +- drivers/gpu/drm/bridge/lvds-encoder.c | 10 ++++---- .../drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c | 3 ++- drivers/gpu/drm/bridge/nxp-ptn3460.c | 3 ++- drivers/gpu/drm/bridge/panel.c | 2 +- drivers/gpu/drm/bridge/parade-ps8622.c | 3 ++- drivers/gpu/drm/bridge/sii902x.c | 3 ++- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 27 +++++++++++----------- drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 9 +++++--- drivers/gpu/drm/bridge/tc358764.c | 14 +++++++---- drivers/gpu/drm/bridge/thc63lvd1024.c | 10 ++++---- drivers/gpu/drm/bridge/ti-sn65dsi86.c | 18 ++++++++------- drivers/gpu/drm/bridge/ti-tfp410.c | 4 ++-- 16 files changed, 80 insertions(+), 62 deletions(-) commit 54e6a745aad30ba82bbea5b0e9869e42a39cbbc3 Author: Sam Ravnborg Date: Sun May 19 20:36:35 2019 +0200 drm/bridge: make dw_mipi_dsi.h self-contained To allow users to include dw_mipi_dsi.h without pulling in dependencies make dw_mipi_dsi.h self-contained. Use forward declarations when possible. v2: - Drop forward declarations of local structs (Laurent) - Add include of drm_modes.h (Laurent) Signed-off-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Cc: Andrzej Hajda Cc: David Airlie Cc: Daniel Vetter Cc: Peter Senna Tschudin Cc: Martin Donnelly Cc: Martyn Welch Link: https://patchwork.freedesktop.org/patch/msgid/20190519183636.19588-2-sam@ravnborg.org include/drm/bridge/dw_mipi_dsi.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit a124692b698b00026a58d89831ceda2331b2e1d0 Author: Cheng Jian Date: Sat May 4 19:39:39 2019 +0800 ftrace: Enable trampoline when rec count returns back to one Custom trampolines can only be enabled if there is only a single ops attached to it. If there's only a single callback registered to a function, and the ops has a trampoline registered for it, then we can call the trampoline directly. This is very useful for improving the performance of ftrace and livepatch. If more than one callback is registered to a function, the general trampoline is used, and the custom trampoline is not restored back to the direct call even if all the other callbacks were unregistered and we are back to one callback for the function. To fix this, set FTRACE_FL_TRAMP flag if rec count is decremented to one, and the ops that left has a trampoline. Testing After this patch : insmod livepatch_unshare_files.ko cat /sys/kernel/debug/tracing/enabled_functions unshare_files (1) R I tramp: 0xffffffffc0000000(klp_ftrace_handler+0x0/0xa0) ->ftrace_ops_assist_func+0x0/0xf0 echo unshare_files > /sys/kernel/debug/tracing/set_ftrace_filter echo function > /sys/kernel/debug/tracing/current_tracer cat /sys/kernel/debug/tracing/enabled_functions unshare_files (2) R I ->ftrace_ops_list_func+0x0/0x150 echo nop > /sys/kernel/debug/tracing/current_tracer cat /sys/kernel/debug/tracing/enabled_functions unshare_files (1) R I tramp: 0xffffffffc0000000(klp_ftrace_handler+0x0/0xa0) ->ftrace_ops_assist_func+0x0/0xf0 Link: http://lkml.kernel.org/r/1556969979-111047-1-git-send-email-cj.chengjian@huawei.com Signed-off-by: Cheng Jian Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) commit b6399cc789341fc49a0603fb7d388a4e50aca212 Author: Steven Rostedt (VMware) Date: Thu May 23 19:50:34 2019 -0400 tracing/kprobe: Do not run kprobe boot tests if kprobe_event is on cmdline When having kprobe trace event start up tests enabled and adding a kprobe_event on the kernel command line, it produced the following: trace_kprobe: Testing kprobe tracing: WARNING: CPU: 5 PID: 1 at kernel/trace/trace_kprobe.c:1724 kprobe_trace_self_tests_init+0x32d/0x36b Modules linked in: CPU: 5 PID: 1 Comm: swapper/0 Not tainted 5.2.0-rc1-test+ #249 Hardware name: Hewlett-Packard HP Compaq Pro 6300 SFF/339A, BIOS K01 v03.03 07/14/2016 RIP: 0010:kprobe_trace_self_tests_init+0x32d/0x36b Code: b7 e8 4f 8d a2 fe 85 c0 74 10 0f 0b 48 c7 c7 c8 1b 0d b7 ff c3 e8 19 af 99 fe 48 c7 c7 40 93 27 b7 e8 7f 1a a5 fe 85 c0 74 10 <0f> 0b 48 c7 c7 f8 1b 0d b7 ff c3 e8 f9 ae 9 a0 fe 85 RSP: 0018:ffffb36e40653e08 EFLAGS: 00010286 RAX: 00000000fffffff0 RBX: 0000000000000000 RCX: ffffb36e40653d5c RDX: 0000000000000000 RSI: ffffffffb72776e0 RDI: 0000000000000246 RBP: ffff98414fe58ff8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: ffff98415d8aa940 R12: 0000000000000000 R13: ffffffffb737c1b0 R14: 0000000000000000 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff98415ea80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f959ce741b8 CR3: 000000011a210002 CR4: 00000000001606e0 Call Trace: ? init_kprobe_trace+0x19e/0x19e ? do_early_param+0x8e/0x8e do_one_initcall+0x6f/0x2b4 ? do_early_param+0x8e/0x8e kernel_init_freeable+0x21d/0x2c6 ? rest_init+0x146/0x146 kernel_init+0xa/0x10a ret_from_fork+0x3a/0x50 ---[ end trace 488430c083a4c956 ]--- As with the trace events, if a trace event is set on the kernel command line, the trace events start up tests are suspended. The kprobe start up tests should do the same when a kprobe is enabled on the kernel command line. Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_kprobe.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit b3015fe41d9af7515a7b7b6f7f8f172d193fb3a6 Author: Steven Rostedt (VMware) Date: Thu May 23 19:40:17 2019 -0400 tracing: Make a separate config for trace event self tests The trace event self tests enable loop through *all* events, enables each one, one at a time, runs some code to trigger various events (not necessarily the same events), and checks if anything went wrong. The issue is that trace events are usually the least likely start up test to cause a problem, but they take the longest to run (because there are so many events). When one of the other tests trigger a bug, the trace event start up tests causes the bisect to take much longer, because it takes 10s of seconds to get through the trace event tests. By making them a separate config (even though they are enabled by default if start up tests are set), it is possible to turn them off and still run the other tracing start up tests much quicker. Signed-off-by: Steven Rostedt (VMware) kernel/trace/Kconfig | 12 +++++++++++- kernel/trace/trace_events.c | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) commit 970988e19eb0a0dc24fe14bf91972019e48336e2 Author: Masami Hiramatsu Date: Wed May 22 17:32:35 2019 +0900 tracing/kprobe: Add kprobe_event= boot parameter Add kprobe_event= boot parameter to define kprobe events at boot time. The definition syntax is similar to tracefs/kprobe_events interface, but use ',' and ';' instead of ' ' and '\n' respectively. e.g. kprobe_event=p,vfs_read,$arg1,$arg2 This puts a probe on vfs_read with argument1 and 2, and enable the new event. Link: http://lkml.kernel.org/r/155851395498.15728.830529496248543583.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) Documentation/admin-guide/kernel-parameters.txt | 13 ++++++ Documentation/trace/kprobetrace.rst | 14 +++++++ kernel/trace/trace_kprobe.c | 54 +++++++++++++++++++++++++ 3 files changed, 81 insertions(+) commit b5f8b32c93b21c457a958d2a6bf938dab41bac4e Author: Masami Hiramatsu Date: Wed May 22 17:32:27 2019 +0900 kprobes: Initialize kprobes at postcore_initcall Initialize kprobes at postcore_initcall level instead of module_init since kprobes is not a module, and it depends on only subsystems initialized in core_initcall. This will allow ftrace kprobe event to add new events when it is initializing because ftrace kprobe event is initialized at later initcall level. Link: http://lkml.kernel.org/r/155851394736.15728.13626739508905120098.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) kernel/kprobes.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 539b75b2b9eece3fc6da5672d4b67440d5e454a9 Author: Masami Hiramatsu Date: Wed May 22 17:27:52 2019 +0900 tracing/kprobe: Cast user-space address correctly Cast user-space address correctly to pass to probe_user_read(). Reported-by: kbuild test robot Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_kprobe.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 87a90956eeab260a469a51897bfda27b28adf67d Author: Masami Hiramatsu Date: Wed May 22 17:27:44 2019 +0900 uaccess: Add a prototype of non-static __probe_user_read() Declare a prototype of non-static __probe_user_read() as same as __probe_kernel_read() at uaccess.h. Reported-by: kbuild test robot Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) include/linux/uaccess.h | 1 + 1 file changed, 1 insertion(+) commit f08367b3643b5340f9d9ea07808ddd72b74beb30 Author: Matthias Kaehlcke Date: Thu May 23 12:26:28 2019 -0700 tracing: Use correct function name in trace_filter_add_remove_task() comment The comment of trace_filter_add_remove_task() refers to the function as 'trace_pid_filter_add_remove_task', use the correct name. Link: http://lkml.kernel.org/r/20190523192628.134406-1-mka@chromium.org Signed-off-by: Matthias Kaehlcke Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1e032f7cfa141b4424827b0ecb0ea899f84e182e Author: Masami Hiramatsu Date: Wed May 15 14:39:05 2019 +0900 perf-probe: Add user memory access attribute support Add user memory access attribute for kprobe event arguments. If a given 'local variable' is in user-space, User can specify memory access method by '@user' suffix. This is not only for string but also for data structure. If we access a field of data structure in user memory from kernel on some arch, it will fail. e.g. perf probe -a "sched_setscheduler param->sched_priority" This will fail to access the "param->sched_priority" because the param is __user pointer. Instead, we can now specify @user suffix for such argument. perf probe -a "sched_setscheduler param->sched_priority@user" Note that kernel memory access with "@user" must always fail on any arch. Link: http://lkml.kernel.org/r/155789874562.26965.10836126971405890891.stgit@devnote2 Acked-by: Ingo Molnar Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) tools/perf/Documentation/perf-probe.txt | 3 ++- tools/perf/util/probe-event.c | 11 +++++++++++ tools/perf/util/probe-event.h | 2 ++ tools/perf/util/probe-file.c | 7 +++++++ tools/perf/util/probe-file.h | 1 + tools/perf/util/probe-finder.c | 19 ++++++++++++------- 6 files changed, 35 insertions(+), 8 deletions(-) commit bdf2b8cbf076568f7d17dc62467348d409142298 Author: Masami Hiramatsu Date: Wed May 15 14:38:54 2019 +0900 selftests/ftrace: Add user-memory access syntax testcase Add a user-memory access syntax testcase which checks new user-memory access syntax and ustring type. Link: http://lkml.kernel.org/r/155789873385.26965.9557271156179140676.stgit@devnote2 Acked-by: Ingo Molnar Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) .../ftrace/test.d/kprobe/kprobe_args_user.tc | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit e65f7ae7f4da56622ecf8f1eaed333b9a13f9435 Author: Masami Hiramatsu Date: Wed May 15 14:38:42 2019 +0900 tracing/probe: Support user-space dereference Support user-space dereference syntax for probe event arguments to dereference the data-structure or array in user-space. The syntax is just adding 'u' before an offset value. +|-u() e.g. +u8(%ax), +u0(+0(%si)) For example, if you probe do_sched_setscheduler(pid, policy, param) and record param->sched_priority, you can add new probe as below; p do_sched_setscheduler priority=+u0($arg3) Note that kprobe event provides this and it doesn't change the dereference method automatically because we do not know whether the given address is in userspace or kernel on some archs. So as same as "ustring", this is an option for user, who has to carefully choose the dereference method. Link: http://lkml.kernel.org/r/155789872187.26965.4468456816590888687.stgit@devnote2 Acked-by: Ingo Molnar Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) Documentation/trace/kprobetrace.rst | 27 ++++++++++++++++++++++----- Documentation/trace/uprobetracer.rst | 10 ++++++---- kernel/trace/trace.c | 5 +++-- kernel/trace/trace_kprobe.c | 6 ++++++ kernel/trace/trace_probe.c | 25 ++++++++++++++++++------- kernel/trace/trace_probe.h | 2 ++ kernel/trace/trace_probe_tmpl.h | 22 +++++++++++++++++----- kernel/trace/trace_uprobe.c | 7 +++++++ 8 files changed, 81 insertions(+), 23 deletions(-) commit 88903c464321cdbc2d473c24cbf311f576cf05bc Author: Masami Hiramatsu Date: Wed May 15 14:38:30 2019 +0900 tracing/probe: Add ustring type for user-space string Add "ustring" type for fetching user-space string from kprobe event. User can specify ustring type at uprobe event, and it is same as "string" for uprobe. Note that probe-event provides this option but it doesn't choose the correct type automatically since we have not way to decide the address is in user-space or not on some arch (and on some other arch, you can fetch the string by "string" type). So user must carefully check the target code (e.g. if you see __user on the target variable) and use this new type. Link: http://lkml.kernel.org/r/155789871009.26965.14167558859557329331.stgit@devnote2 Acked-by: Ingo Molnar Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) Documentation/trace/kprobetrace.rst | 9 ++++++-- kernel/trace/trace.c | 2 +- kernel/trace/trace_kprobe.c | 42 ++++++++++++++++++++++++++++++++++--- kernel/trace/trace_probe.c | 14 ++++++++++--- kernel/trace/trace_probe.h | 1 + kernel/trace/trace_probe_tmpl.h | 14 ++++++++++++- kernel/trace/trace_uprobe.c | 12 +++++++++++ 7 files changed, 84 insertions(+), 10 deletions(-) commit 3d7081822f7f9eab867d9bcc8fd635208ec438e0 Author: Masami Hiramatsu Date: Wed May 15 14:38:18 2019 +0900 uaccess: Add non-pagefault user-space read functions Add probe_user_read(), strncpy_from_unsafe_user() and strnlen_unsafe_user() which allows caller to access user-space in IRQ context. Current probe_kernel_read() and strncpy_from_unsafe() are not available for user-space memory, because it sets KERNEL_DS while accessing data. On some arch, user address space and kernel address space can be co-exist, but others can not. In that case, setting KERNEL_DS means given address is treated as a kernel address space. Also strnlen_user() is only available from user context since it can sleep if pagefault is enabled. To access user-space memory without pagefault, we need these new functions which sets USER_DS while accessing the data. Link: http://lkml.kernel.org/r/155789869802.26965.4940338412595759063.stgit@devnote2 Acked-by: Ingo Molnar Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) include/linux/uaccess.h | 14 ++++++ mm/maccess.c | 122 +++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 130 insertions(+), 6 deletions(-) commit 2d8d8fac3b4eab035dcd0068e1f5a746a697fbb3 Author: Masami Hiramatsu Date: Wed May 15 14:38:06 2019 +0900 x86/uaccess: Allow access_ok() in irq context if pagefault_disabled WARN_ON_IN_IRQ() assumes that the access_ok() and following user memory access can sleep. But this assumption is not always correct; when the pagefault is disabled, following memory access will just returns -EFAULT and never sleep. Add pagefault_disabled() check in WARN_ON_ONCE() so that it can ignore the case we call it with disabling pagefault. For this purpose, this modified pagefault_disabled() as an inline function. Link: http://lkml.kernel.org/r/155789868664.26965.7932665824135793317.stgit@devnote2 Acked-by: Ingo Molnar Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) arch/x86/include/asm/uaccess.h | 4 +++- include/linux/uaccess.h | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) commit 0c9f23797925069f9ce267c97e488e293f647c69 Author: Steven Rostedt (VMware) Date: Mon May 20 09:38:11 2019 -0400 x86/ftrace: Make enable parameter bool where applicable The code modification functions have an "enable" parameter that is an "int" but used as a boolean. Switch its type to "bool" to remove the ambiguity that "int" causes. Link: http://lkml.kernel.org/r/e1429923d9eda92a3cf5ee9e33c7eacce539781d.1558115654.git.naveen.n.rao@linux.vnet.ibm.com Reported-by: "Naveen N. Rao" Signed-off-by: Steven Rostedt (VMware) arch/x86/kernel/ftrace.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7375dca1647fa978310f2d706ddbff537f72110b Author: Steven Rostedt (VMware) Date: Mon May 20 09:26:24 2019 -0400 ftrace: Make enable and update parameters bool when applicable The code modification functions have "enable" and "update" variables that are sometimes "int" but used as "bool". Remove the ambiguity and make them "bool" when they are only used for true or false values. Link: http://lkml.kernel.org/r/e1429923d9eda92a3cf5ee9e33c7eacce539781d.1558115654.git.naveen.n.rao@linux.vnet.ibm.com Reported-by: "Naveen N. Rao" Signed-off-by: Steven Rostedt (VMware) include/linux/ftrace.h | 4 ++-- kernel/trace/ftrace.c | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) commit cecd7582a63168a3e214097bd8b869c02c966f8f Merge: 6dca9360a9d7 141347730c7f Author: David S. Miller Date: Sat May 25 16:38:16 2019 -0700 Merge branch 'net-mvpp2-Classifier-updates-RSS' Maxime Chevallier says: ==================== net: mvpp2: Classifier updates, RSS Here is a set of updates for the PPv2 classifier, the main feature being the support for steering to RSS contexts, to leverage all the available RSS tables in the controller. The first two patches are non-critical fixes for the classifier, the first one prevents us from allocating too much room to store the classification rules, the second one configuring the C2 engine as suggested by the PPv2 functionnal specs. Patches 3 to 5 introduce support for RSS contexts in mvpp2, allowing us to steer traffic to dedicated RSS tables. ==================== Signed-off-by: David S. Miller commit 141347730c7f88ea77bfece9f089115d5d4d8266 Author: Maxime Chevallier Date: Fri May 24 12:05:54 2019 +0200 net: mvpp2: cls: Support steering to RSS contexts When steering to an RXQ, we can perform an extra RSS step to assign a queue from an RSS table. This is done by setting the RSS_EN attribute in the C2 engine. In that case, the RXQ that is assigned is the global RSS context id, that is then translated to an RSS table using the RXQ2RSS table. An example using ethtool to steer to RXQ 2 and 3 would be : ethtool -X eth0 weight 0 0 1 1 context new (This would print the allocated context id, let's say it's 1) ethtool -N eth0 flow-type udp4 dst-port 1234 context 1 loc 0 The hash parameters are the ones that are globally configured for RSS : ethtool -N eth0 rx-flow-hash udp4 sdfn When an RSS context is removed while there are active classification rules using this context, these rules are removed. Signed-off-by: Maxime Chevallier Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c | 58 ++++++++++++++++++++++++-- 1 file changed, 54 insertions(+), 4 deletions(-) commit c561da68038a738f30eca21456534c2d1872d13d Author: Maxime Chevallier Date: Fri May 24 12:05:53 2019 +0200 net: mvpp2: cls: Extract the RSS context when parsing the ethtool rule ethtool_rx_flow_rule_create takes into parameter the ethtool flow spec, which doesn't contain the rss context id. We therefore need to extract it ourself before parsing the ethtool rule. The FLOW_RSS flag is only set in info->fs.flow_type, and not info->flow_type. Signed-off-by: Maxime Chevallier Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 895586d5dc32ef1017830ee6a4162e6f158b99f3 Author: Maxime Chevallier Date: Fri May 24 12:05:52 2019 +0200 net: mvpp2: cls: Use RSS contexts to handle RSS tables The PPv2 controller has 8 RSS tables that are shared across all ports on a given PPv2 instance. The previous implementation allocated one table per port, leaving others unused. By using RSS contexts, we can make use of multiple RSS tables per port, one being the default table (always id 0), the other ones being used as destinations for flow steering, in the same way as rx rings. This commit introduces RSS contexts management in the PPv2 driver. We always reserve one table per port, allocated when the port is probed. The global table list is stored in the struct mvpp2, as it's a global resource. Each port then maintains a list of indices in that global table, that way each port can have it's own numbering scheme starting from 0. One limitation that seems unavoidable is that the hashing parameters are shared across all RSS contexts for a given port. Hashing parameters for ctx 0 will be applied to all contexts. Signed-off-by: Maxime Chevallier Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 16 +- drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c | 200 +++++++++++++++++++++--- drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.h | 15 +- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 65 ++++++-- 4 files changed, 255 insertions(+), 41 deletions(-) commit e8486ca9a12ca71174ddcd2059be385ea7d33064 Author: Maxime Chevallier Date: Fri May 24 12:05:51 2019 +0200 net: mvpp2: cls: Bypass C2 internals FIFOs at init The C2 TCAM has internal FIFOs that are only useful for the built-in self-tests. Disable these FIFOS at init, as recommended in the functionnal specs. Suggested-by: Alan Winkowski Signed-off-by: Maxime Chevallier Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 2 ++ drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c | 6 ++++++ 2 files changed, 8 insertions(+) commit ae8e1d5e5651f66e1d6a33c51df0425cea61d2f5 Author: Maxime Chevallier Date: Fri May 24 12:05:50 2019 +0200 net: mvpp2: cls: Use the correct number of rules in various places As of today, the classification offload implementation only supports 4 different rules to be offloaded. This number has been hardcoded in the rule insertion function, and the wrong define is being used elsewhere. Use the correct #define everywhere to make sure we always check for the correct number of rules. Signed-off-by: Maxime Chevallier Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 2 +- drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c | 4 ++-- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 023d066a0d0a87696c04b0de2ceae53063d0b655 Author: David Howells Date: Mon Mar 25 16:38:28 2019 +0000 vfs: Kill sget_userns() Kill sget_userns(), folding it into sget() as that's the only remaining user. Signed-off-by: David Howells cc: linux-fsdevel@vger.kernel.org fs/super.c | 54 ++++++++++++++++-------------------------------------- include/linux/fs.h | 5 ----- 2 files changed, 16 insertions(+), 43 deletions(-) commit db2c246a091efe2e49aeb3fe0cf6ed2affbddf37 Author: David Howells Date: Mon Mar 25 16:38:26 2019 +0000 vfs: Use sget_fc() for pseudo-filesystems Signed-off-by: David Howells cc: linux-fsdevel@vger.kernel.org Signed-off-by: Al Viro fs/libfs.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) commit 8d9e46d80777b484f8f0945c317ad618224d7811 Author: Al Viro Date: Sat May 11 11:43:59 2019 -0400 fold mount_pseudo_xattr() into pseudo_fs_get_tree() ... now that all other callers are gone Signed-off-by: Al Viro fs/libfs.c | 88 +++++++++++++++++++++--------------------------------- include/linux/fs.h | 13 -------- 2 files changed, 34 insertions(+), 67 deletions(-) commit 389e22fb46eb1f48b089060c30030790e7a41033 Author: David Howells Date: Mon Mar 25 16:38:25 2019 +0000 vfs: Convert btrfs_test to use the new mount API Convert the btrfs_test filesystem to the new internal mount API as the old one will be obsoleted and removed. This allows greater flexibility in communication of mount parameters between userspace, the VFS and the filesystem. See Documentation/filesystems/mount_api.txt for more information. Signed-off-by: David Howells Acked-by: David Sterba cc: Chris Mason cc: Josef Bacik cc: linux-btrfs@vger.kernel.org Signed-off-by: Al Viro fs/btrfs/tests/btrfs-tests.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 99558d203ceab980d74066daac4050609f5eccf4 Author: David Howells Date: Mon Mar 25 16:38:25 2019 +0000 vfs: Convert virtio_balloon to use the new mount API Convert the virtio_balloon filesystem to the new internal mount API as the old one will be obsoleted and removed. This allows greater flexibility in communication of mount parameters between userspace, the VFS and the filesystem. See Documentation/filesystems/mount_api.txt for more information. Signed-off-by: David Howells cc: "Michael S. Tsirkin" cc: Jason Wang cc: virtualization@lists.linux-foundation.org Signed-off-by: Al Viro drivers/virtio/virtio_balloon.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 219e69639070438c969e7da282f513595b00f9d8 Author: David Howells Date: Mon Mar 25 16:38:25 2019 +0000 vfs: Convert ocxlflash to use the new mount API Convert the ocxlflash filesystem to the new internal mount API as the old one will be obsoleted and removed. This allows greater flexibility in communication of mount parameters between userspace, the VFS and the filesystem. See Documentation/filesystems/mount_api.txt for more information. Signed-off-by: David Howells Acked-by: Matthew R. Ochs cc: "Manoj N. Kumar" cc: Uma Krishnan cc: "James E.J. Bottomley" cc: "Martin K. Petersen" cc: linux-scsi@vger.kernel.org Signed-off-by: Al Viro drivers/scsi/cxlflash/ocxl_hw.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) commit 52418c8f0073d6641411caf0a24740ed58436b21 Author: David Howells Date: Mon Mar 25 16:38:24 2019 +0000 vfs: Convert cxl to use the new mount API Convert the cxl filesystem to the new internal mount API as the old one will be obsoleted and removed. This allows greater flexibility in communication of mount parameters between userspace, the VFS and the filesystem. See Documentation/filesystems/mount_api.txt for more information. Signed-off-by: David Howells Acked-by: Andrew Donnellan Acked-by: Frederic Barrat cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Al Viro drivers/misc/cxl/api.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b06f973fe713f6d89addaa4b8fc5897612e5fefb Author: David Howells Date: Mon Mar 25 16:38:24 2019 +0000 vfs: Convert ia64 perfmon to use the new mount API Convert the ia64 perfmon filesystem to the new internal mount API as the old one will be obsoleted and removed. This allows greater flexibility in communication of mount parameters between userspace, the VFS and the filesystem. See Documentation/filesystems/mount_api.txt for more information. Signed-off-by: David Howells cc: Tony Luck cc: Fenghua Yu cc: linux-ia64@vger.kernel.org Signed-off-by: Al Viro arch/ia64/kernel/perfmon.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 4a457910a8d77a2142098c1b694da33b8fc16c8a Author: David Howells Date: Mon Mar 25 16:38:24 2019 +0000 vfs: Convert drm to use the new mount API Convert the drm filesystem to the new internal mount API as the old one will be obsoleted and removed. This allows greater flexibility in communication of mount parameters between userspace, the VFS and the filesystem. See Documentation/filesystems/mount_api.txt for more information. Signed-off-by: David Howells Acked-by: Daniel Vetter cc: David Airlie cc: dri-devel@lists.freedesktop.org Signed-off-by: Al Viro drivers/gpu/drm/drm_drv.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 75d4e06f049ffb059fdf7e81c0c4c9fab2ba60e4 Author: David Howells Date: Mon Mar 25 16:38:24 2019 +0000 vfs: Convert dax to use the new mount API Convert the dax filesystem to the new internal mount API as the old one will be obsoleted and removed. This allows greater flexibility in communication of mount parameters between userspace, the VFS and the filesystem. See Documentation/filesystems/mount_api.txt for more information. Signed-off-by: David Howells cc: Dan Williams cc: Vishal Verma cc: Keith Busch cc: Dave Jiang cc: linux-nvdimm@lists.01.org Signed-off-by: Al Viro drivers/dax/super.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit fba9be49701a8e89a691beffb11bfa97df8f0c9f Author: David Howells Date: Mon Mar 25 16:38:24 2019 +0000 vfs: Convert sockfs to use the new mount API Convert the sockfs filesystem to the new internal mount API as the old one will be obsoleted and removed. This allows greater flexibility in communication of mount parameters between userspace, the VFS and the filesystem. See Documentation/filesystems/mount_api.txt for more information. Signed-off-by: David Howells cc: netdev@vger.kernel.org Signed-off-by: Al Viro net/socket.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit ea8157ab2ae5e914dd427e5cfab533b6da3819cd Author: David Howells Date: Tue May 21 07:55:45 2019 +0100 zsfold: Convert zsfold to use the new mount API Convert the zsfold filesystem to the new internal mount API as the old one will be obsoleted and removed. This allows greater flexibility in communication of mount parameters between userspace, the VFS and the filesystem. See Documentation/filesystems/mount_api.txt for more information. Signed-off-by: David Howells include/uapi/linux/magic.h | 1 + mm/z3fold.c | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) commit 8e9231f819e32d8efb53b0f17f293bab74bed8ce Author: David Howells Date: Mon Mar 25 16:38:23 2019 +0000 vfs: Convert zsmalloc to use the new mount API Convert the zsmalloc filesystem to the new internal mount API as the old one will be obsoleted and removed. This allows greater flexibility in communication of mount parameters between userspace, the VFS and the filesystem. See Documentation/filesystems/mount_api.txt for more information. Signed-off-by: David Howells cc: Minchan Kim cc: Nitin Gupta cc: Sergey Senozhatsky cc: linux-mm@kvack.org Signed-off-by: Al Viro mm/zsmalloc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4fa7ec5db7e731a3db26b9647f39b0595f74347d Author: David Howells Date: Mon Mar 25 16:38:23 2019 +0000 vfs: Convert pipe to use the new mount API Convert the pipe filesystem to the new internal mount API as the old one will be obsoleted and removed. This allows greater flexibility in communication of mount parameters between userspace, the VFS and the filesystem. See Documentation/filesystems/mount_api.txt for more information. Signed-off-by: David Howells cc: linux-fsdevel@vger.kernel.org Signed-off-by: Al Viro fs/pipe.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 059b20d9da69d3a9bfb7ab00d1e5a3114a31c822 Author: David Howells Date: Mon Mar 25 16:38:23 2019 +0000 vfs: Convert nsfs to use the new mount API Convert the nsfs filesystem to the new internal mount API as the old one will be obsoleted and removed. This allows greater flexibility in communication of mount parameters between userspace, the VFS and the filesystem. See Documentation/filesystems/mount_api.txt for more information. Signed-off-by: David Howells cc: Eric W. Biederman cc: linux-fsdevel@vger.kernel.org Signed-off-by: Al Viro fs/nsfs.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 9030d16eb8adcbf9e80d20b909856c6fdabfdec4 Author: David Howells Date: Mon Mar 25 16:38:23 2019 +0000 vfs: Convert bdev to use the new mount API Convert the bdev filesystem to the new internal mount API as the old one will be obsoleted and removed. This allows greater flexibility in communication of mount parameters between userspace, the VFS and the filesystem. See Documentation/filesystems/mount_api.txt for more information. Signed-off-by: David Howells cc: Jens Axboe cc: linux-fsdevel@vger.kernel.org Signed-off-by: Al Viro fs/block_dev.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 33cada40b51f083d8508e66f96c646640f773835 Author: David Howells Date: Mon Mar 25 16:38:23 2019 +0000 vfs: Convert anon_inodes to use the new mount API Convert the anon_inodes filesystem to the new internal mount API as the old one will be obsoleted and removed. This allows greater flexibility in communication of mount parameters between userspace, the VFS and the filesystem. See Documentation/filesystems/mount_api.txt for more information. Signed-off-by: David Howells cc: linux-fsdevel@vger.kernel.org Signed-off-by: Al Viro fs/anon_inodes.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 52db59df17c0cd3ee4071a75a8509287a662abac Author: David Howells Date: Mon Mar 25 16:38:23 2019 +0000 vfs: Convert aio to use the new mount API Convert the aio filesystem to the new internal mount API as the old one will be obsoleted and removed. This allows greater flexibility in communication of mount parameters between userspace, the VFS and the filesystem. See Documentation/filesystems/mount_api.txt for more information. Signed-off-by: David Howells cc: Benjamin LaHaise cc: linux-aio@kvack.org Signed-off-by: Al Viro fs/aio.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 31d6d5ce53400d6dc58e29ddd8dc184b3ba89d66 Author: David Howells Date: Mon Mar 25 16:38:23 2019 +0000 vfs: Provide a mount_pseudo-replacement for the new mount API Provide a function, init_pseudo(), that provides a common infrastructure for converting pseudo-filesystems that can never be mountable. [AV: once all users of mount_pseudo_xattr() get converted, it will be folded into pseudo_fs_get_tree()] Signed-off-by: David Howells cc: linux-fsdevel@vger.kernel.org fs/libfs.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++ include/linux/pseudo_fs.h | 16 ++++++++++++++++ 2 files changed, 62 insertions(+) commit c80fa7c8301c10ad10d997b9e86b4aeac5923b3e Author: David Howells Date: Mon Mar 25 16:38:23 2019 +0000 vfs: Provide sb->s_iflags settings in fs_context struct Provide a field in the fs_context struct through which bits in the sb->s_iflags superblock field can be set. Signed-off-by: David Howells cc: linux-fsdevel@vger.kernel.org fs/super.c | 1 + include/linux/fs_context.h | 1 + 2 files changed, 2 insertions(+) commit 7cdfa44227b0d8842d46a775cebe4311150cb8f2 Author: David Howells Date: Mon Mar 25 16:38:22 2019 +0000 vfs: Fix refcounting of filenames in fs_parser Fix an overput in which filename_lookup() unconditionally drops a ref to the filename it was given, but this isn't taken account of in the caller, fs_lookup_param(). Addresses-Coverity-ID: 1443811 ("Use after free") Signed-off-by: David Howells fs/fs_parser.c | 1 + 1 file changed, 1 insertion(+) commit c3aabf0780a506225b53bfe2b5177dd5dfec093d Author: Al Viro Date: Mon May 13 12:57:22 2019 -0400 move mount_capable() further out Call graph of vfs_get_tree(): vfs_fsconfig_locked() # neither kernmount, nor submount do_new_mount() # neither kernmount, nor submount fc_mount() afs_mntpt_do_automount() # submount mount_one_hugetlbfs() # kernmount pid_ns_prepare_proc() # kernmount mq_create_mount() # kernmount vfs_kern_mount() simple_pin_fs() # kernmount vfs_submount() # submount kern_mount() # kernmount init_mount_tree() btrfs_mount() nfs_do_root_mount() The first two need the check (unconditionally). init_mount_tree() is setting rootfs up; any capability checks make zero sense for that one. And btrfs_mount()/ nfs_do_root_mount() have the checks already done in their callers. IOW, we can shift mount_capable() handling into the two callers - one in the normal case of mount(2), another - in fsconfig(2) handling of FSCONFIG_CMD_CREATE. I.e. the syscalls that set a new filesystem up. Signed-off-by: Al Viro fs/fsopen.c | 2 ++ fs/namespace.c | 2 ++ fs/super.c | 6 ------ 3 files changed, 4 insertions(+), 6 deletions(-) commit 059338aae33165179352a26b58d815801072c87d Author: Al Viro Date: Sun May 12 18:16:04 2019 -0400 move mount_capable() calls to vfs_get_tree() sget_fc() is called only from ->get_tree() instances and the only instance not calling it is legacy_get_tree(), which calls mount_capable() directly. In all sget_fc() callers the checks could be moved to the very beginning of ->get_tree() - ->user_ns is not changed in between. So lifting the checks to the only caller of ->get_tree() is OK. Signed-off-by: Al Viro fs/fs_context.c | 5 ----- fs/super.c | 12 ++++++------ 2 files changed, 6 insertions(+), 11 deletions(-) commit d5f68d330c156774bf69059e434b5d8acea3b92e Author: Al Viro Date: Mon May 13 12:33:22 2019 -0400 cpuset: move mount -t cpuset logics into cgroup.c ... and get rid of the weird dances in ->get_tree() - that logics can be easily handled in ->init_fs_context(). Signed-off-by: Al Viro kernel/cgroup/cgroup.c | 47 ++++++++++++++++++++++++++++++++++++++ kernel/cgroup/cpuset.c | 61 +------------------------------------------------- 2 files changed, 48 insertions(+), 60 deletions(-) commit 46cf047a945c7a53cb2dc9353a87a9a4e3e778cd Author: Al Viro Date: Sun May 12 18:10:24 2019 -0400 procfs: set ->user_ns before calling ->get_tree() here it's even simpler than in mqueue - pid_ns_prepare_proc() does everything needed anyway. Signed-off-by: Al Viro fs/proc/root.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 709a643da8b8c5fc823e1870d8227ca0eeb51311 Author: Al Viro Date: Sun May 12 17:46:05 2019 -0400 mqueue: set ->user_ns before ->get_tree() ... so that we could lift the capability checks into ->get_tree() caller Signed-off-by: Al Viro ipc/mqueue.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 20284ab7427ffac514faf44fd9eb50e5745f4474 Author: Al Viro Date: Sun May 12 17:31:45 2019 -0400 switch mount_capable() to fs_context now both callers of mount_capable() have access to fs_context; the only difference is that for sget_fc() we have the possibility of fc->global being true, while for legacy_get_tree() it's guaranteed to be impossible. Unify to more generic variant... Signed-off-by: Al Viro fs/fs_context.c | 2 +- fs/internal.h | 2 +- fs/super.c | 11 +++++++---- 3 files changed, 9 insertions(+), 6 deletions(-) commit fd912087f4a897cfdf8274f8085c501742638be2 Author: Al Viro Date: Sun May 12 17:23:30 2019 -0400 legacy_get_tree(): pass fc->user_ns to mount_capable() guaranteed to be equal to current_user_ns() here - it has not been changed since alloc_fs_context() (nothing in legacy methods changes it) and since we don't have SB_SUBMOUNT, that must've been FS_CONTEXT_FOR_MOUNT. And in that case we have fc->user_ns set to fc->cred->user_ns, i.e. current_cred()->user_ns, i.e. current_user_ns() Signed-off-by: Al Viro fs/fs_context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2527b284defaeadf74829b0b0bd3207ca7f165eb Author: Al Viro Date: Sun May 12 17:09:01 2019 -0400 move the capability checks from sget_userns() to legacy_get_tree() 1) all call chains leading to sget_userns() pass through ->mount() instances. 2) none of ->mount() instances is ever called directly - the only call site is legacy_get_tree() 3) all remaining ->mount() instances end up calling sget_userns() IOW, we might as well do the capability checks just before calling ->mount(). As for the arguments passed to mount_capable(), in case of call chains to sget_userns() going through sget(), we either don't call mount_capable() at all, or pass current_user_ns() to it. The call chains going through mount_pseudo_xattr() don't call mount_capable() at all (SB_KERNMOUNT in flags on those). That could've been split into smaller steps (lifting the checks into sget(), then callers of sget(), then all the way to the entries of every ->mount() out there, then to the sole caller), but that would be too much churn for little benefit... Signed-off-by: Al Viro fs/fs_context.c | 5 +++++ fs/internal.h | 2 ++ fs/super.c | 4 ---- 3 files changed, 7 insertions(+), 4 deletions(-) commit bb7b6b2bbdb827e68cd506c8f5e3ba13215cccb2 Author: David Howells Date: Mon Mar 25 16:38:28 2019 +0000 vfs: Kill mount_ns() Kill mount_ns() as it has been replaced by vfs_get_super() in the new mount API. Signed-off-by: David Howells cc: linux-fsdevel@vger.kernel.org Signed-off-by: Al Viro fs/super.c | 38 -------------------------------------- include/linux/fs.h | 3 --- 2 files changed, 41 deletions(-) commit 96a374a35f822e53cad3b011dd5fbadec1b1473f Author: David Howells Date: Mon Mar 25 16:38:27 2019 +0000 vfs: Convert nfsctl to use the new mount API Convert the nfsctl filesystem to the new internal mount API as the old one will be obsoleted and removed. This allows greater flexibility in communication of mount parameters between userspace, the VFS and the filesystem. See Documentation/filesystems/mount_api.txt for more information. Signed-off-by: David Howells cc: "J. Bruce Fields" cc: Jeff Layton cc: linux-nfs@vger.kernel.org fs/nfsd/nfsctl.c | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) commit b9662f3103546005b9cc01862bb1031fe5e99ff9 Author: David Howells Date: Mon Mar 25 16:38:28 2019 +0000 vfs: Convert rpc_pipefs to use the new mount API Convert the rpc_pipefs filesystem to the new internal mount API as the old one will be obsoleted and removed. This allows greater flexibility in communication of mount parameters between userspace, the VFS and the filesystem. See Documentation/filesystems/mount_api.txt for more information. Signed-off-by: David Howells cc: Trond Myklebust cc: Anna Schumaker cc: "J. Bruce Fields" cc: Jeff Layton cc: linux-nfs@vger.kernel.org net/sunrpc/rpc_pipe.c | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) commit 0ce0cf12fc4c6a089717ff613d76457052cf4303 Author: Al Viro Date: Sun May 12 15:42:48 2019 -0400 consolidate the capability checks in sget_{fc,userns}() ... into a common helper - mount_capable(type, userns) Signed-off-by: Al Viro fs/super.c | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) commit feb8ae43a7b33148028829b1b1691b28c874c952 Author: Al Viro Date: Sun May 12 13:18:42 2019 -0400 start massaging the checks in sget_...(): move to sget_userns() there are 3 remaining callers of sget_userns() - sget(), mount_ns() and mount_pseudo_xattr(). Extra check in sget() is conditional upon mount being neither KERNMOUNT nor SUBMOUNT, the identical one in mount_ns() - upon being not KERNMOUNT; mount_pseudo_xattr() has no such checks at all. However, mount_ns() is never used with SUBMOUNT and mount_pseudo_xattr() is used only for KERNMOUNT, so both would be fine with the same logics as currently done in sget(), allowing to consolidate the entire thing in sget_userns() itself. That's not where these checks will end up in the long run, though - the whole reason why they'd been done so deep in the bowels of mount(2) was that there had been no way for a filesystem to specify which userns to look at until it has entered ->mount(). Now there is a place where filesystem could override the defaults - ->init_fs_context(). Which allows to pull the checks out into the callers of vfs_get_tree(). That'll take quite a bit of massage, but that mess is possible to tease apart. Signed-off-by: Al Viro fs/super.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit f7a9945184100b531f0de3b12c617a349236dd8a Author: Al Viro Date: Sun May 12 12:42:58 2019 -0400 no need to protect against put_user_ns(NULL) it's a no-op Signed-off-by: Al Viro arch/x86/kernel/cpu/resctrl/rdtgroup.c | 3 +-- fs/sysfs/mount.c | 3 +-- kernel/cgroup/cgroup.c | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) commit 1f58bb18f6f28d1df0b7144d90bc90ee5672416d Author: Al Viro Date: Mon May 20 13:44:57 2019 +0100 mount_pseudo(): drop 'name' argument, switch to d_make_root() Once upon a time we used to set ->d_name of e.g. pipefs root so that d_path() on pipes would work. These days it's completely pointless - dentries of pipes are not even connected to pipefs root. However, mount_pseudo() had set the root dentry name (passed as the second argument) and callers kept inventing names to pass to it. Including those that didn't *have* any non-root dentries to start with... All of that had been pointless for about 8 years now; it's time to get rid of that cargo-culting... Signed-off-by: Al Viro arch/ia64/kernel/perfmon.c | 2 +- drivers/dax/super.c | 2 +- drivers/gpu/drm/drm_drv.c | 6 +----- drivers/misc/cxl/api.c | 3 +-- drivers/scsi/cxlflash/ocxl_hw.c | 3 +-- drivers/virtio/virtio_balloon.c | 3 +-- fs/aio.c | 3 +-- fs/anon_inodes.c | 4 ++-- fs/block_dev.c | 2 +- fs/btrfs/tests/btrfs-tests.c | 2 +- fs/libfs.c | 12 +++--------- fs/nsfs.c | 2 +- fs/pipe.c | 2 +- include/linux/fs.h | 6 +++--- mm/z3fold.c | 2 +- mm/zsmalloc.c | 2 +- net/socket.c | 2 +- 17 files changed, 22 insertions(+), 36 deletions(-) commit 71d8d1531e0904e08adf1540e191bd707dfd73da Author: Joel Fernandes (Google) Date: Tue Mar 26 15:24:08 2019 -0400 lockdep: Add assertion to check if in an interrupt In rcu_rrupt_from_idle, we want to check if it is called from within an interrupt, but want to do such checking only for debug builds. lockdep already tracks when we enter an interrupt. Let us expose it as an assertion macro so it can be used to assert this. Suggested-by: Steven Rostedt Cc: kernel-team@android.com Cc: rcu@vger.kernel.org Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney include/linux/lockdep.h | 7 +++++++ 1 file changed, 7 insertions(+) commit e015a341122024198f57d1f0498a776523137e94 Author: Paul E. McKenney Date: Wed Mar 27 10:03:12 2019 -0700 rcu: Avoid self-IPI in sync_sched_exp_online_cleanup() The sync_sched_exp_online_cleanup() is invoked at online time to handle the case where the start of an expedited grace period ran concurrently with a CPU being taken offline and then immediately being placed online. It checks to see if RCU needs an expedited quiescent state from the incoming CPU, sending it an IPI if so. However, it is quite possible that sync_sched_exp_online_cleanup() is running on that CPU, in which case it is considerably less overhead to simply request the quiescent state locally instead of simulating a self-IPI. This commit therefore places the last few lines of rcu_exp_handler() into a new rcu_exp_need_qs() function, which is invoked both by rcu_exp_handler() and by sync_sched_exp_online_cleanup() in the self-IPI case. This also reduces the rcu_exp_handler() function's state space by removing the direct call that this smp_call_function_single() uses to emulate the requested self-IPI. This in turn will allow tighter error checking in rcu_is_cpu_rrupt_from_idle(). Signed-off-by: Paul E. McKenney Reviewed-by: Joel Fernandes (Google) kernel/rcu/tree_exp.h | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) commit b9ad4d6ed18e23b0ff6a824b925a1278625d5345 Author: Paul E. McKenney Date: Wed Mar 27 09:09:47 2019 -0700 rcu: Avoid self-IPI in sync_rcu_exp_select_node_cpus() Although sync_rcu_exp_select_node_cpus() treats the current CPU as being in a quiescent state, it might well migrate to some other CPU before reaching the smp_call_function_single(), which could then result in an unnecessary simulated self-IPI. This commit therefore instead simply refuses to invoke smp_call_function_single() on the current CPU, which causes the later rcu_report_exp_cpu_mult() to report this CPU's quiescent state with less overhead. This also reduces the rcu_exp_handler() function's state space by removing the direct call that this smp_call_function_single() uses to emulate the requested self-IPI. Signed-off-by: Paul E. McKenney [ paulmck: Use get_cpu() instead of preempt_disable() per Joel Fernandes. ] kernel/rcu/tree_exp.h | 5 +++++ 1 file changed, 5 insertions(+) commit 43e903ad3e0843d03da15d8eaffb5ada22966c76 Author: Paul E. McKenney Date: Mon Mar 25 08:36:03 2019 -0700 rcu: Inline invoke_rcu_callbacks() into its sole remaining caller This commit saves a few lines of code by inlining invoke_rcu_callbacks() into its sole remaining caller. Signed-off-by: Paul E. McKenney kernel/rcu/tree.c | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) commit 0864f057b050bc6dd68106b3185e02db5140012d Author: Paul E. McKenney Date: Thu Apr 4 12:19:25 2019 -0700 rcu: Use irq_work to get scheduler's attention in clean context When rcu_read_unlock_special() is invoked with interrupts disabled, is either not in an interrupt handler or is not using RCU_SOFTIRQ, is not the first RCU read-side critical section in the chain, and either there is an expedited grace period in flight or this is a NO_HZ_FULL kernel, the end of the grace period can be unduly delayed. The reason for this is that it is not safe to do wakeups in this situation. This commit fixes this problem by using the irq_work subsystem to force a later interrupt handler in a clean environment. Because set_tsk_need_resched(current) and set_preempt_need_resched() are invoked prior to this, the scheduler will force a context switch upon return from this interrupt (though perhaps at the end of any interrupted preempt-disable or BH-disable region of code), which will invoke rcu_note_context_switch() (again in a clean environment), which will in turn give RCU the chance to report the deferred quiescent state. Of course, by then this task might be within another RCU read-side critical section. But that will be detected at that time and reporting will be further deferred to the outermost rcu_read_unlock(). See rcu_preempt_need_deferred_qs() and rcu_preempt_deferred_qs() for more details on the checking. Suggested-by: Peter Zijlstra Signed-off-by: Paul E. McKenney kernel/rcu/tree.h | 2 ++ kernel/rcu/tree_plugin.h | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+) commit 385b599e8c04fa843c4d7f785478827cc512d720 Author: Paul E. McKenney Date: Mon Apr 1 15:12:47 2019 -0700 rcu: Allow rcu_read_unlock_special() to raise_softirq() if in_irq() When running in an interrupt handler, raise_softirq() and raise_softirq_irqoff() have extremely low overhead: They simply set a bit in a per-CPU mask, which is checked upon exit from that interrupt handler. Therefore, if rcu_read_unlock_special() is invoked within an interrupt handler and RCU_SOFTIRQ is in use, this commit make use of raise_softirq_irqoff() even if there is no expedited grace period in flight and even if this is not a nohz_full CPU. Signed-off-by: Paul E. McKenney kernel/rcu/tree_plugin.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 25102de65fdd246eb6801114ce6dfa3a076bb678 Author: Paul E. McKenney Date: Mon Apr 1 14:12:50 2019 -0700 rcu: Only do rcu_read_unlock_special() wakeups if expedited Currently, rcu_read_unlock_special() will do wakeups whenever it is safe to do so. However, wakeups are expensive, and they are only really needed when the just-ended RCU read-side critical section is blocking an expedited grace period (in which case speed is of the essence) or on a nohz_full CPU (where it might be a good long time before an interrupt arrives). This commit therefore checks for these conditions, and does the expensive wakeups only if doing so would be useful. Note it can be rather expensive to determine whether or not the current task (as opposed to the current CPU) is blocking the current expedited grace period. Doing so requires traversing the ->blkd_tasks list, which can be quite long. This commit therefore cheats: If the current task is on a given ->blkd_tasks list, and some task on that list is blocking the current expedited grace period, the code assumes that the current task is blocking that expedited grace period. Reported-by: Peter Zijlstra Signed-off-by: Paul E. McKenney kernel/rcu/tree_plugin.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 23634ebc1d946f19eb112d4455c1d84948875e31 Author: Paul E. McKenney Date: Sun Mar 24 15:25:51 2019 -0700 rcu: Check for wakeup-safe conditions in rcu_read_unlock_special() When RCU core processing is offloaded from RCU_SOFTIRQ to the rcuc kthreads, a full and unconditional wakeup is required to initiate RCU core processing. In contrast, when RCU core processing is carried out by RCU_SOFTIRQ, a raise_softirq() suffices. Of course, there are situations where raise_softirq() does a full wakeup, but these do not occur with normal usage of rcu_read_unlock(). The reason that full wakeups can be problematic is that the scheduler sometimes invokes rcu_read_unlock() with its pi or rq locks held, which can of course result in deadlock in CONFIG_PREEMPT=y kernels when rcu_read_unlock() invokes the scheduler. Scheduler invocations can happen in the following situations: (1) The just-ended reader has been subjected to RCU priority boosting, in which case rcu_read_unlock() must deboost, (2) Interrupts were disabled across the call to rcu_read_unlock(), so the quiescent state must be deferred, requiring a wakeup of the rcuc kthread corresponding to the current CPU. Now, the scheduler may hold one of its locks across rcu_read_unlock() only if preemption has been disabled across the entire RCU read-side critical section, which in the days prior to RCU flavor consolidation meant that rcu_read_unlock() never needed to do wakeups. However, this is no longer the case for any but the first rcu_read_unlock() following a condition (e.g., preempted RCU reader) requiring special rcu_read_unlock() attention. For example, an RCU read-side critical section might be preempted, but preemption might be disabled across the rcu_read_unlock(). The rcu_read_unlock() must defer the quiescent state, and therefore leaves the task queued on its leaf rcu_node structure. If a scheduler interrupt occurs, the scheduler might well invoke rcu_read_unlock() with one of its locks held. However, the preempted task is still queued, so rcu_read_unlock() will attempt to defer the quiescent state once more. When RCU core processing is carried out by RCU_SOFTIRQ, this works just fine: The raise_softirq() function simply sets a bit in a per-CPU mask and the RCU core processing will be undertaken upon return from interrupt. Not so when RCU core processing is carried out by the rcuc kthread: In this case, the required wakeup can result in deadlock. The initial solution to this problem was to use set_tsk_need_resched() and set_preempt_need_resched() to force a future context switch, which allows rcu_preempt_note_context_switch() to report the deferred quiescent state to RCU's core processing. Unfortunately for expedited grace periods, there can be a significant delay between the call for a context switch and the actual context switch. This commit therefore introduces a ->deferred_qs flag to the task_struct structure's rcu_special structure. This flag is initially false, and is set to true by the first call to rcu_read_unlock() requiring special attention, then finally reset back to false when the quiescent state is finally reported. Then rcu_read_unlock() attempts full wakeups only when ->deferred_qs is false, that is, on the first rcu_read_unlock() requiring special attention. Note that a chain of RCU readers linked by some other sort of reader may find that a later rcu_read_unlock() is once again able to do a full wakeup, courtesy of an intervening preemption: rcu_read_lock(); /* preempted */ local_irq_disable(); rcu_read_unlock(); /* Can do full wakeup, sets ->deferred_qs. */ rcu_read_lock(); local_irq_enable(); preempt_disable() rcu_read_unlock(); /* Cannot do full wakeup, ->deferred_qs set. */ rcu_read_lock(); preempt_enable(); /* preempted, >deferred_qs reset. */ local_irq_disable(); rcu_read_unlock(); /* Can again do full wakeup, sets ->deferred_qs. */ Such linked RCU readers do not yet seem to appear in the Linux kernel, and it is probably best if they don't. However, RCU needs to handle them, and some variations on this theme could make even raise_softirq() unsafe due to the possibility of its doing a full wakeup. This commit therefore also avoids invoking raise_softirq() when the ->deferred_qs set flag is set. Signed-off-by: Paul E. McKenney Cc: Sebastian Andrzej Siewior include/linux/sched.h | 2 +- kernel/rcu/tree_plugin.h | 19 ++++++++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) commit 48d07c04b4cc1dc1221965312f58fd84926212fe Author: Sebastian Andrzej Siewior Date: Wed Mar 20 22:13:33 2019 +0100 rcu: Enable elimination of Tree-RCU softirq processing Some workloads need to change kthread priority for RCU core processing without affecting other softirq work. This commit therefore introduces the rcutree.use_softirq kernel boot parameter, which moves the RCU core work from softirq to a per-CPU SCHED_OTHER kthread named rcuc. Use of SCHED_OTHER approach avoids the scalability problems that appeared with the earlier attempt to move RCU core processing to from softirq to kthreads. That said, kernels built with RCU_BOOST=y will run the rcuc kthreads at the RCU-boosting priority. Note that rcutree.use_softirq=0 must be specified to move RCU core processing to the rcuc kthreads: rcutree.use_softirq=1 is the default. Reported-by: Thomas Gleixner Tested-by: Mike Galbraith Signed-off-by: Sebastian Andrzej Siewior [ paulmck: Adjust for invoke_rcu_callbacks() only ever being invoked from RCU core processing, in contrast to softirq->rcuc transition in old mainline RCU priority boosting. ] [ paulmck: Avoid wakeups when scheduler might have invoked rcu_read_unlock() while holding rq or pi locks, also possibly fixing a pre-existing latent bug involving raise_softirq()-induced wakeups. ] Signed-off-by: Paul E. McKenney Documentation/admin-guide/kernel-parameters.txt | 6 ++ kernel/rcu/tree.c | 138 +++++++++++++++++++++--- kernel/rcu/tree.h | 2 +- kernel/rcu/tree_plugin.h | 134 +++-------------------- 4 files changed, 146 insertions(+), 134 deletions(-) commit 6dca9360a9d7a15cef215cea4a55575dbfd2ebdd Author: Gustavo A. R. Silva Date: Thu May 23 17:56:53 2019 -0500 flow_offload: use struct_size() in kzalloc() One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct foo { int stuff; struct boo entry[]; }; instance = kzalloc(sizeof(struct foo) + count * sizeof(struct boo), GFP_KERNEL); Instead of leaving these open-coded and prone to type mistakes, we can now use the new struct_size() helper: instance = kzalloc(struct_size(instance, entry, count), GFP_KERNEL); This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller net/core/flow_offload.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 6bc4544021f82283f0949f94494011730ecdd084 Author: Linus Lüssing Date: Tue May 7 06:08:26 2019 +0200 batman-adv: mcast: shorten multicast tt/tvlv worker spinlock section It is not necessary to hold the mla_lock spinlock during the whole multicast tt/tvlv worker callback. Just holding it during the checks and updates of the bat_priv stored multicast flags and mla_list is enough. Therefore this patch splits batadv_mcast_mla_tvlv_update() in two: batadv_mcast_mla_flags_get() at the beginning of the worker to gather and calculate the new multicast flags, which does not need any locking as it neither reads from nor writes to bat_priv->mcast. And batadv_mcast_mla_flags_update() at the end of the worker which commits the newly calculated flags and lists to bat_priv->mcast and therefore needs the lock. Signed-off-by: Linus Lüssing Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/multicast.c | 272 +++++++++++++++++++++------------------- net/batman-adv/soft-interface.c | 5 - net/batman-adv/types.h | 38 +++--- 3 files changed, 164 insertions(+), 151 deletions(-) commit 68a600de9afc2134aa24d0cce539b98a0acb68b1 Author: Sven Eckelmann Date: Fri May 24 20:11:17 2019 +0200 batman-adv: Use includes instead of fwdecls While it can be slightly beneficial for the build performance to use forward declarations instead of includes, the handling of them together with changes in the included headers makes it unnecessary complicated and fragile. Just replace them with actual includes since some parts (hwmon, ..) of the kernel even request avoidance of forward declarations and net/ is mostly not using them in *.c file. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/bat_algo.h | 7 +++---- net/batman-adv/bat_v.c | 3 +-- net/batman-adv/bat_v_elp.h | 4 ++-- net/batman-adv/bat_v_ogm.h | 3 +-- net/batman-adv/bridge_loop_avoidance.h | 9 ++++----- net/batman-adv/debugfs.h | 4 ++-- net/batman-adv/distributed-arp-table.h | 7 +++---- net/batman-adv/fragmentation.h | 3 +-- net/batman-adv/gateway_client.h | 9 ++++----- net/batman-adv/gateway_common.h | 3 +-- net/batman-adv/hard-interface.h | 5 ++--- net/batman-adv/hash.h | 3 +-- net/batman-adv/icmp_socket.h | 3 +-- net/batman-adv/main.h | 9 ++++----- net/batman-adv/multicast.h | 6 +++--- net/batman-adv/netlink.c | 3 +-- net/batman-adv/netlink.h | 3 +-- net/batman-adv/network-coding.h | 9 ++++----- net/batman-adv/originator.h | 7 +++---- net/batman-adv/routing.h | 3 +-- net/batman-adv/send.h | 3 +-- net/batman-adv/soft-interface.c | 1 + net/batman-adv/soft-interface.h | 7 +++---- net/batman-adv/sysfs.h | 5 ++--- net/batman-adv/tp_meter.h | 3 +-- net/batman-adv/translation-table.h | 9 ++++----- net/batman-adv/tvlv.h | 3 +-- net/batman-adv/types.h | 6 ++++-- 28 files changed, 60 insertions(+), 80 deletions(-) commit 47d4522dd5130361d463b47f0e9a687c4b6697c2 Author: Sven Eckelmann Date: Fri May 24 16:51:29 2019 +0200 batman-adv: Add missing include for atomic functions main.h is using atomic_add_unless and log.h atomic_read. The main header linux/atomic.h should be included for these files. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/log.h | 1 + net/batman-adv/main.h | 1 + 2 files changed, 2 insertions(+) commit e1928752988bd95316676fea234475327726e22d Author: Sven Eckelmann Date: Fri May 24 16:28:50 2019 +0200 batman-adv: Fix includes for *_MAX constants The commit 54d50897d544 ("linux/kernel.h: split *_MAX and *_MIN macros into ") moved the U32_MAX/INT_MAX/ULONG_MAX from linux/kernel.h to linux/limits.h. Adjust the includes accordingly. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/gateway_common.c | 1 + net/batman-adv/hard-interface.c | 1 + net/batman-adv/netlink.c | 1 + net/batman-adv/sysfs.c | 1 + net/batman-adv/tp_meter.c | 1 + 5 files changed, 5 insertions(+) commit 6cdd4e60f7b793981eca32aa414be9b510173202 Author: Jagan Teki Date: Mon May 13 00:18:27 2019 +0530 drm/panel: st7701: Swap vertical front and back porch timings Vertical front and back porch values on existing driver are swapped. The existing timings are still working as expected, but to make sure it can compatible with techstar ts8550b bsp timings this patch swap the same values. Signed-off-by: Jagan Teki Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20190512184827.13905-1-jagan@amarulasolutions.com drivers/gpu/drm/panel/panel-sitronix-st7701.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 14bf60c416b7cfbb82c286925cd8fc25e8f3810b Author: Lukasz Majewski Date: Wed May 15 18:06:12 2019 +0200 drm/panel: simple: Add KOE tx14d24vm1bpa display support (320x240) This commit adds support for KOE's 5.7" display. Signed-off-by: Lukasz Majewski Reviewed-by: Rob Herring Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20190515160612.6529-1-lukma@denx.de drivers/gpu/drm/panel/panel-simple.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit acfb0b85cdcedff76ecc4c683a90c794afe35b71 Author: Lukasz Majewski Date: Wed May 15 18:04:28 2019 +0200 dt-bindings: display/panel: Add KOE tx14d24vm1bpa display description This commit adds documentation entry description for KOE's 5.7" display. Signed-off-by: Lukasz Majewski Reviewed-by: Rob Herring Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20190515160428.6114-1-lukma@denx.de .../bindings/display/panel/koe,tx14d24vm1bpa.txt | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit c479450f61c7f1f248c9a54aedacd2a6ca521ff8 Author: Sébastien Szymanski Date: Tue May 7 17:27:12 2019 +0200 drm/panel: Add support for Armadeus ST0700 Adapt This patch adds support for the Armadeus ST0700 Adapt. It comes with a Santek ST0700I5Y-RBSLW 7.0" WVGA (800x480) TFT and an adapter board so that it can be connected on the TFT header of Armadeus Dev boards. Cc: stable@vger.kernel.org # v4.19 Reviewed-by: Rob Herring Signed-off-by: Sébastien Szymanski Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20190507152713.27494-1-sebastien.szymanski@armadeus.com .../display/panel/armadeus,st0700-adapt.txt | 9 +++++++ drivers/gpu/drm/panel/panel-simple.c | 29 ++++++++++++++++++++++ 2 files changed, 38 insertions(+) commit d9a6f413f8c7bd56295098f8b1bf8331af923490 Author: Matteo Croce Date: Fri May 24 21:59:12 2019 +0200 samples: bpf: add ibumad sample to .gitignore This commit adds ibumad to .gitignore which is currently ommited from the ignore file. Signed-off-by: Matteo Croce Signed-off-by: Alexei Starovoitov samples/bpf/.gitignore | 1 + 1 file changed, 1 insertion(+) commit 198ae936efdba33cf5e5cfb28986c9376179fd23 Merge: a08acd118d5c 0b4de1ff19bf Author: Alexei Starovoitov Date: Fri May 24 18:58:59 2019 -0700 Merge branch 'optimize-zext' Jiong Wang says: ==================== v9: - Split patch 5 in v8. make bpf uapi header file sync a separate patch. (Alexei) v8: - For stack slot read, mark them as REG_LIVE_READ64. (Alexei) - Change DEF_NOT_SUBREG from -1 to 0. (Alexei) - Rebased on top of latest bpf-next. v7: - Drop the first patch in v6, the one adding 32-bit return value and argument type. (Alexei) - Rename bpf_jit_hardware_zext to bpf_jit_needs_zext. (Alexei) - Use mov32 with imm == 1 to indicate it is zext. (Alexei) - JIT back-ends peephole next insn to optimize out unnecessary zext inserted by verifier. (Alexei) - Testing: + patch set tested (bpf selftest) on x64 host with llvm 9.0 no regression observed no both JIT and interpreter modes. + patch set tested (bpf selftest) on x32 host. By Yanqing Wang, thanks! no regression observed on both JIT and interpreter modes. + patch set tested (bpf selftest) on RV64 host with llvm 9.0, By Björn Töpel, thanks! no regression observed before and after this set with JIT_ALWAYS_ON. test_progs_32 also enabled as LLVM 9.0 is used by Björn. + cross compiled the other affected targets, arm, PowerPC, SPARC, S390. v6: - Fixed s390 kbuild test robot error. (kbuild) - Make comment style in backends patches more consistent. v5: - Adjusted several test_verifier helpers to make them works on hosts w and w/o hardware zext. (Naveen) - Make sure zext flag not set when verifier by-passed, for example, libtest_bpf.ko. (Naveen) - Conservatively mark bpf main return value as 64-bit. (Alexei) - Make sure read flag is either READ64 or READ32, not the mix of both. (Alexei) - Merged patch 1 and 2 in v4. (Alexei) - Fixed kbuild test robot warning on NFP. (kbuild) - Proposed new BPF_ZEXT insn to have optimal code-gen for various JIT back-ends. - Conservately set zext flags for patched-insn. - Fixed return value zext for helper function calls. - Also adjusted test_verifier scalability unit test to avoid triggerring too many insn patch which will hang computer. - re-tested on x86 host with llvm 9.0, no regression on test_verifier, test_progs, test_progs_32. - re-tested offload target (nfp), no regression on local testsuite. v4: - added the two missing fixes which addresses two Jakub's reviewes in v3. - rebase on top of bpf-next. v3: - remove redundant check in "propagate_liveness_reg". (Jakub) - add extra check in "mark_reg_read" to prune more search. (Jakub) - re-implemented "prog_flags" passing mechanism, removed use of global switch inside libbpf. - enabled high 32-bit randomization beyond "test_verifier" and "test_progs". Now it should have been enabled for all possible tests. Re-run all tests, haven't noticed regression. - remove RFC tag. v2: - rebased on top of bpf-next master. - added comments for what is sub-register def index. (Edward, Alexei) - removed patch 1 which turns bit mask from enum to macro. (Alexei) - removed sysctl/bpf_jit_32bit_opt. (Alexei) - merged sub-register def insn index into reg state. (Alexei) - change test methodology (Alexei): + instead of simple unit tests on x86_64 for which this optimization doesn't enabled due to there is hardware support, poison high 32-bit for whose def identified as safe to do so. this could let the correctness of this patch set checked when daily bpf selftest ran which delivers very stressful test on host machine like x86_64. + hi32 poisoning is gated by a new BPF_F_TEST_RND_HI32 prog flags. + BPF_F_TEST_RND_HI32 is enabled for all tests of "test_progs" and "test_verifier", the latter needs minor tweak on two unit tests, please see the patch for the change. + introduced a new global variable "libbpf_test_mode" into libbpf. once it is set to true, it will set BPF_F_TEST_RND_HI32 for all the later PROG_LOAD syscall, the goal is to easy the enable of hi32 poison on exsiting testsuite. we could also introduce new APIs, for example "bpf_prog_test_load", then use -Dbpf_prog_load=bpf_prog_test_load to migrate tests under test_progs, but there are several load APIs, and such new API need some change on struture like "struct bpf_prog_load_attr". + removed old unit tests. it is based on insn scan and requires quite a few test_verifier generic code change. given hi32 randomization could offer good test coverage, the unit tests doesn't add much extra test value. - enhanced register width check ("is_reg64") when record sub-register write, now, it returns more accurate width. - Re-run all tests under "test_progs" and "test_verifier" on x86_64, no regression. Fixed a couple of bugs exposed: 1. ctx field size transformation was not taken into account. 2. insn patch could cause lost of original aux data which is important for ctx field conversion. 3. return value for propagate_liveness was wrong and caused regression on processed insn number. 4. helper call arg wasn't handled properly that path prune may cause 64-bit read info in pruned path lost. - Re-run Cilium bpf prog for processed-insn-number benchmarking, no regression. v1: - Fixed the missing handling on callee-saved for bpf-to-bpf call, sub-register defs therefore moved to frame state. (Jakub Kicinski) - Removed redundant "cross_reg". (Jakub Kicinski) - Various coding styles & grammar fixes. (Jakub Kicinski, Quentin Monnet) eBPF ISA specification requires high 32-bit cleared when low 32-bit sub-register is written. This applies to destination register of ALU32 etc. JIT back-ends must guarantee this semantic when doing code-gen. x86_64 and AArch64 ISA has the same semantics, so the corresponding JIT back-end doesn't need to do extra work. However, 32-bit arches (arm, x86, nfp etc.) and some other 64-bit arches (PowerPC, SPARC etc) need to do explicit zero extension to meet this requirement, otherwise code like the following will fail. u64_value = (u64) u32_value ... other uses of u64_value This is because compiler could exploit the semantic described above and save those zero extensions for extending u32_value to u64_value, these JIT back-ends are expected to guarantee this through inserting extra zero extensions which however could be a significant increase on the code size. Some benchmarks show there could be ~40% sub-register writes out of total insns, meaning at least ~40% extra code-gen. One observation is these extra zero extensions are not always necessary. Take above code snippet for example, it is possible u32_value will never be casted into a u64, the value of high 32-bit of u32_value then could be ignored and extra zero extension could be eliminated. This patch implements this idea, insns defining sub-registers will be marked when the high 32-bit of the defined sub-register matters. For those unmarked insns, it is safe to eliminate high 32-bit clearnace for them. Algo ==== We could use insn scan based static analysis to tell whether one sub-register def doesn't need zero extension. However, using such static analysis, we must do conservative assumption at branching point where multiple uses could be introduced. So, for any sub-register def that is active at branching point, we need to mark it as needing zero extension. This could introducing quite a few false alarms, for example ~25% on Cilium bpf_lxc. It will be far better to use dynamic data-flow tracing which verifier fortunately already has and could be easily extend to serve the purpose of this patch set. - Split read flags into READ32 and READ64. - Record index of insn that does sub-register write. Keep the index inside reg state and update it during verifier insn walking. - A full register read on a sub-register marks its definition insn as needing zero extension on dst register. A new sub-register write overrides the old one. - When propagating read64 during path pruning, also mark any insn defining a sub-register that is read in the pruned path as full-register. Benchmark ========= - I estimate the JITed image could be 10% ~ 30% smaller on these affected arches (nfp, arm, x32, risv, ppc, sparc, s390), depending on the prog. - For Cilium bpf_lxc, there is ~11500 insns in the compiled binary (use latest LLVM snapshot, and with -mcpu=v3 -mattr=+alu32 enabled), 4460 of them has sub-register writes (~40%). Calculated by: cat dump | grep -P "\tw" | wc -l (ALU32) cat dump | grep -P "r.*=.*u32" | wc -l (READ_W) cat dump | grep -P "r.*=.*u16" | wc -l (READ_H) cat dump | grep -P "r.*=.*u8" | wc -l (READ_B) After this patch set enabled, > 25% of those 4460 could be identified as doesn't needing zero extension on the destination, and the percentage could go further up to more than 50% with some follow up optimizations based on the infrastructure offered by this set. This leads to significant save on JITed image. ==================== Signed-off-by: Alexei Starovoitov commit 0b4de1ff19bf878eb38f4f668ee15c9b9eed4240 Author: Jiong Wang Date: Fri May 24 23:25:28 2019 +0100 nfp: bpf: eliminate zero extension code-gen This patch eliminate zero extension code-gen for instructions including both alu and load/store. The only exception is for ctx load, because offload target doesn't go through host ctx convert logic so we do customized load and ignores zext flag set by verifier. Cc: Jakub Kicinski Reviewed-by: Jakub Kicinski Signed-off-by: Jiong Wang Signed-off-by: Alexei Starovoitov drivers/net/ethernet/netronome/nfp/bpf/jit.c | 115 +++++++++++++--------- drivers/net/ethernet/netronome/nfp/bpf/main.h | 2 + drivers/net/ethernet/netronome/nfp/bpf/verifier.c | 12 +++ 3 files changed, 81 insertions(+), 48 deletions(-) commit 66d0d5a854a6625974e7de4b874e7934988b0ef8 Author: Jiong Wang Date: Fri May 24 23:25:27 2019 +0100 riscv: bpf: eliminate zero extension code-gen Cc: Björn Töpel Acked-by: Björn Töpel Tested-by: Björn Töpel Signed-off-by: Jiong Wang Signed-off-by: Alexei Starovoitov arch/riscv/net/bpf_jit_comp.c | 43 ++++++++++++++++++++++++++++++------------- 1 file changed, 30 insertions(+), 13 deletions(-) commit 836256bf5f379c298ffa99f62e329d9f40f060ac Author: Jiong Wang Date: Fri May 24 23:25:26 2019 +0100 x32: bpf: eliminate zero extension code-gen Cc: Wang YanQing Tested-by: Wang YanQing Signed-off-by: Jiong Wang Signed-off-by: Alexei Starovoitov arch/x86/net/bpf_jit_comp32.c | 83 +++++++++++++++++++++++++++++-------------- 1 file changed, 56 insertions(+), 27 deletions(-) commit 3e2a33cf7e68b95c3afe11e967769341f6dc987d Author: Jiong Wang Date: Fri May 24 23:25:25 2019 +0100 sparc: bpf: eliminate zero extension code-gen Cc: David S. Miller Signed-off-by: Jiong Wang Signed-off-by: Alexei Starovoitov arch/sparc/net/bpf_jit_comp_64.c | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) commit 591006b9e754ca723e3deabeccdf56eb531f0b94 Author: Jiong Wang Date: Fri May 24 23:25:24 2019 +0100 s390: bpf: eliminate zero extension code-gen Cc: Martin Schwidefsky Cc: Heiko Carstens Signed-off-by: Jiong Wang Signed-off-by: Alexei Starovoitov arch/s390/net/bpf_jit_comp.c | 41 ++++++++++++++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 7 deletions(-) commit a4c927733e74bb39f9964d8f451e717f8cf6d6cf Author: Jiong Wang Date: Fri May 24 23:25:23 2019 +0100 powerpc: bpf: eliminate zero extension code-gen Cc: Naveen N. Rao Cc: Sandipan Das Signed-off-by: Jiong Wang Signed-off-by: Alexei Starovoitov arch/powerpc/net/bpf_jit_comp64.c | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) commit 163541e6ba3426b21884af5a2f498c9d2ce77f00 Author: Jiong Wang Date: Fri May 24 23:25:22 2019 +0100 arm: bpf: eliminate zero extension code-gen Cc: Shubham Bansal Signed-off-by: Jiong Wang Signed-off-by: Alexei Starovoitov arch/arm/net/bpf_jit_32.c | 42 +++++++++++++++++++++++++++++++----------- 1 file changed, 31 insertions(+), 11 deletions(-) commit 9d120b4127e8df04ee665241916056b0156b37c7 Author: Jiong Wang Date: Fri May 24 23:25:21 2019 +0100 selftests: bpf: enable hi32 randomization for all tests The previous libbpf patch allows user to specify "prog_flags" to bpf program load APIs. To enable high 32-bit randomization for a test, we need to set BPF_F_TEST_RND_HI32 in "prog_flags". To enable such randomization for all tests, we need to make sure all places are passing BPF_F_TEST_RND_HI32. Changing them one by one is not convenient, also, it would be better if a test could be switched to "normal" running mode without code change. Given the program load APIs used across bpf selftests are mostly: bpf_prog_load: load from file bpf_load_program: load from raw insns A test_stub.c is implemented for bpf seltests, it offers two functions for testing purpose: bpf_prog_test_load bpf_test_load_program The are the same as "bpf_prog_load" and "bpf_load_program", except they also set BPF_F_TEST_RND_HI32. Given *_xattr functions are the APIs to customize any "prog_flags", it makes little sense to put these two functions into libbpf. Then, the following CFLAGS are passed to compilations for host programs: -Dbpf_prog_load=bpf_prog_test_load -Dbpf_load_program=bpf_test_load_program They migrate the used load APIs to the test version, hence enable high 32-bit randomization for these tests without changing source code. Besides all these, there are several testcases are using "bpf_prog_load_attr" directly, their call sites are updated to pass BPF_F_TEST_RND_HI32. Signed-off-by: Jiong Wang Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/Makefile | 10 +++--- .../selftests/bpf/prog_tests/bpf_verif_scale.c | 1 + tools/testing/selftests/bpf/test_sock_addr.c | 1 + tools/testing/selftests/bpf/test_sock_fields.c | 1 + tools/testing/selftests/bpf/test_socket_cookie.c | 1 + tools/testing/selftests/bpf/test_stub.c | 40 ++++++++++++++++++++++ tools/testing/selftests/bpf/test_verifier.c | 2 +- 7 files changed, 51 insertions(+), 5 deletions(-) commit f3b55abb6d5a522228e136c3bc4a9a716d5d8a54 Author: Jiong Wang Date: Fri May 24 23:25:20 2019 +0100 selftests: bpf: adjust several test_verifier helpers for insn insertion - bpf_fill_ld_abs_vlan_push_pop: Prevent zext happens inside PUSH_CNT loop. This could happen because of BPF_LD_ABS (32-bit def) + BPF_JMP (64-bit use), or BPF_LD_ABS + EXIT (64-bit use of R0). So, change BPF_JMP to BPF_JMP32 and redefine R0 at exit path to cut off the data-flow from inside the loop. - bpf_fill_jump_around_ld_abs: Jump range is limited to 16 bit. every ld_abs is replaced by 6 insns, but on arches like arm, ppc etc, there will be one BPF_ZEXT inserted to extend the error value of the inlined ld_abs sequence which then contains 7 insns. so, set the dividend to 7 so the testcase could work on all arches. - bpf_fill_scale1/bpf_fill_scale2: Both contains ~1M BPF_ALU32_IMM which will trigger ~1M insn patcher call because of hi32 randomization later when BPF_F_TEST_RND_HI32 is set for bpf selftests. Insn patcher is not efficient that 1M call to it will hang computer. So , change to BPF_ALU64_IMM to avoid hi32 randomization. Signed-off-by: Jiong Wang Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/test_verifier.c | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) commit 046561981b948e07df096a8402f9efc80bc784d9 Author: Jiong Wang Date: Fri May 24 23:25:19 2019 +0100 libbpf: add "prog_flags" to bpf_program/bpf_prog_load_attr/bpf_load_program_attr libbpf doesn't allow passing "prog_flags" during bpf program load in a couple of load related APIs, "bpf_load_program_xattr", "load_program" and "bpf_prog_load_xattr". It makes sense to allow passing "prog_flags" which is useful for customizing program loading. Reviewed-by: Jakub Kicinski Signed-off-by: Jiong Wang Signed-off-by: Alexei Starovoitov tools/lib/bpf/bpf.c | 1 + tools/lib/bpf/bpf.h | 1 + tools/lib/bpf/libbpf.c | 3 +++ tools/lib/bpf/libbpf.h | 1 + 4 files changed, 6 insertions(+) commit d6c2308c742a655f4598364ab331959639aae166 Author: Jiong Wang Date: Fri May 24 23:25:18 2019 +0100 bpf: verifier: randomize high 32-bit when BPF_F_TEST_RND_HI32 is set This patch randomizes high 32-bit of a definition when BPF_F_TEST_RND_HI32 is set. Suggested-by: Alexei Starovoitov Signed-off-by: Jiong Wang Signed-off-by: Alexei Starovoitov kernel/bpf/verifier.c | 68 ++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 57 insertions(+), 11 deletions(-) commit 9ce33e337facc678a9578f256752e39643dedf21 Author: Jiong Wang Date: Fri May 24 23:25:17 2019 +0100 tools: bpf: sync uapi header bpf.h Sync new bpf prog load flag "BPF_F_TEST_RND_HI32" to tools/. Signed-off-by: Jiong Wang Signed-off-by: Alexei Starovoitov tools/include/uapi/linux/bpf.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit c240eff63a1cf1c4edc768e0cfc374811c02f069 Author: Jiong Wang Date: Fri May 24 23:25:16 2019 +0100 bpf: introduce new bpf prog load flags "BPF_F_TEST_RND_HI32" x86_64 and AArch64 perhaps are two arches that running bpf testsuite frequently, however the zero extension insertion pass is not enabled for them because of their hardware support. It is critical to guarantee the pass correction as it is supposed to be enabled at default for a couple of other arches, for example PowerPC, SPARC, arm, NFP etc. Therefore, it would be very useful if there is a way to test this pass on for example x86_64. The test methodology employed by this set is "poisoning" useless bits. High 32-bit of a definition is randomized if it is identified as not used by any later insn. Such randomization is only enabled under testing mode which is gated by the new bpf prog load flags "BPF_F_TEST_RND_HI32". Suggested-by: Alexei Starovoitov Signed-off-by: Jiong Wang Signed-off-by: Alexei Starovoitov include/uapi/linux/bpf.h | 18 ++++++++++++++++++ kernel/bpf/syscall.c | 4 +++- 2 files changed, 21 insertions(+), 1 deletion(-) commit a4b1d3c1ddf6cb441187b6c130a473c16a05a356 Author: Jiong Wang Date: Fri May 24 23:25:15 2019 +0100 bpf: verifier: insert zero extension according to analysis result After previous patches, verifier will mark a insn if it really needs zero extension on dst_reg. It is then for back-ends to decide how to use such information to eliminate unnecessary zero extension code-gen during JIT compilation. One approach is verifier insert explicit zero extension for those insns that need zero extension in a generic way, JIT back-ends then do not generate zero extension for sub-register write at default. However, only those back-ends which do not have hardware zero extension want this optimization. Back-ends like x86_64 and AArch64 have hardware zero extension support that the insertion should be disabled. This patch introduces new target hook "bpf_jit_needs_zext" which returns false at default, meaning verifier zero extension insertion is disabled at default. A back-end could override this hook to return true if it doesn't have hardware support and want verifier insert zero extension explicitly. Offload targets do not use this native target hook, instead, they could get the optimization results using bpf_prog_offload_ops.finalize. NOTE: arches could have diversified features, it is possible for one arch to have hardware zero extension support for some sub-register write insns but not for all. For example, PowerPC, SPARC have zero extended loads, but not for alu32. So when verifier zero extension insertion enabled, these JIT back-ends need to peephole insns to remove those zero extension inserted for insn that actually has hardware zero extension support. The peephole could be as simple as looking the next insn, if it is a special zero extension insn then it is safe to eliminate it if the current insn has hardware zero extension support. Reviewed-by: Jakub Kicinski Signed-off-by: Jiong Wang Signed-off-by: Alexei Starovoitov include/linux/bpf.h | 1 + include/linux/filter.h | 1 + kernel/bpf/core.c | 9 +++++++++ kernel/bpf/verifier.c | 41 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 52 insertions(+) commit 7d134041a89610ae552501fc88652805addcdee4 Author: Jiong Wang Date: Fri May 24 23:25:14 2019 +0100 bpf: introduce new mov32 variant for doing explicit zero extension The encoding for this new variant is based on BPF_X format. "imm" field was 0 only, now it could be 1 which means doing zero extension unconditionally .code = BPF_ALU | BPF_MOV | BPF_X .dst_reg = DST .src_reg = SRC .imm = 1 We use this new form for doing zero extension for which verifier will guarantee SRC == DST. Implications on JIT back-ends when doing code-gen for BPF_ALU | BPF_MOV | BPF_X: 1. No change if hardware already does zero extension unconditionally for sub-register write. 2. Otherwise, when seeing imm == 1, just generate insns to clear high 32-bit. No need to generate insns for the move because when imm == 1, dst_reg is the same as src_reg at the moment. Interpreter doesn't need change as well. It is doing unconditionally zero extension for mov32 already. One helper macro BPF_ZEXT_REG is added to help creating zero extension insn using this new mov32 variant. One helper function insn_is_zext is added for checking one insn is an zero extension on dst. This will be widely used by a few JIT back-ends in later patches in this set. Signed-off-by: Jiong Wang Signed-off-by: Alexei Starovoitov include/linux/filter.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit b325fbca4b136886885e51f4d36e2adab76596e3 Author: Jiong Wang Date: Fri May 24 23:25:13 2019 +0100 bpf: verifier: mark patched-insn with sub-register zext flag Patched insns do not go through generic verification, therefore doesn't has zero extension information collected during insn walking. We don't bother analyze them at the moment, for any sub-register def comes from them, just conservatively mark it as needing zero extension. Signed-off-by: Jiong Wang Signed-off-by: Alexei Starovoitov kernel/bpf/verifier.c | 37 +++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) commit 5327ed3d44b754f5cc51d5b3f18e442eaebacff5 Author: Jiong Wang Date: Fri May 24 23:25:12 2019 +0100 bpf: verifier: mark verified-insn with sub-register zext flag eBPF ISA specification requires high 32-bit cleared when low 32-bit sub-register is written. This applies to destination register of ALU32 etc. JIT back-ends must guarantee this semantic when doing code-gen. x86_64 and AArch64 ISA has the same semantics, so the corresponding JIT back-end doesn't need to do extra work. However, 32-bit arches (arm, x86, nfp etc.) and some other 64-bit arches (PowerPC, SPARC etc) need to do explicit zero extension to meet this requirement, otherwise code like the following will fail. u64_value = (u64) u32_value ... other uses of u64_value This is because compiler could exploit the semantic described above and save those zero extensions for extending u32_value to u64_value, these JIT back-ends are expected to guarantee this through inserting extra zero extensions which however could be a significant increase on the code size. Some benchmarks show there could be ~40% sub-register writes out of total insns, meaning at least ~40% extra code-gen. One observation is these extra zero extensions are not always necessary. Take above code snippet for example, it is possible u32_value will never be casted into a u64, the value of high 32-bit of u32_value then could be ignored and extra zero extension could be eliminated. This patch implements this idea, insns defining sub-registers will be marked when the high 32-bit of the defined sub-register matters. For those unmarked insns, it is safe to eliminate high 32-bit clearnace for them. Algo: - Split read flags into READ32 and READ64. - Record index of insn that does sub-register write. Keep the index inside reg state and update it during verifier insn walking. - A full register read on a sub-register marks its definition insn as needing zero extension on dst register. A new sub-register write overrides the old one. - When propagating read64 during path pruning, also mark any insn defining a sub-register that is read in the pruned path as full-register. Reviewed-by: Jakub Kicinski Signed-off-by: Jiong Wang Signed-off-by: Alexei Starovoitov include/linux/bpf_verifier.h | 14 +++- kernel/bpf/verifier.c | 173 +++++++++++++++++++++++++++++++++++++++---- 2 files changed, 171 insertions(+), 16 deletions(-) commit 7c71650f9a3640464dd907bd7a6510cc7ea02ba6 Author: Stephen Boyd Date: Tue May 14 13:40:53 2019 -0700 of/fdt: Mark initial_boot_params as __ro_after_init The FDT pointer, i.e. initial_boot_params, shouldn't be changed after init. It's only set by boot code and then the only user of the FDT is the raw sysfs reading API. Mark this pointer with __ro_after_init so that the pointer can't be changed after init. Cc: Hsin-Yi Wang Signed-off-by: Stephen Boyd Signed-off-by: Rob Herring drivers/of/fdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9b4d2b635bd0cf8dfc45223f66fd85792fd2dc7b Author: Stephen Boyd Date: Tue May 14 13:40:52 2019 -0700 of/fdt: Remove dead code and mark functions with __init Some functions in here are never called, and others are only called during __init. Remove the dead code and some dead exports for functions that don't exist (I'm looking at you of_fdt_get_string!). Mark some functions with __init so we can throw them away after we boot up and poke at the FDT blob too. Cc: Hsin-Yi Wang Signed-off-by: Stephen Boyd Signed-off-by: Rob Herring drivers/of/fdt.c | 37 +++++-------------------------------- include/linux/of_fdt.h | 11 ----------- 2 files changed, 5 insertions(+), 43 deletions(-) commit 253a41c6fbadd1305e25f84ffc455f2b4d57439c Author: Stephen Boyd Date: Tue May 14 13:40:51 2019 -0700 dt-bindings: Remove Linuxisms from common-properties binding We shouldn't reference Linux kernel functions or Linux itself in proper bindings. It's OK to reference functions in the kernel when explaining examples, but otherwise we shouldn't reference functions to describe what the binding means. Cc: Hsin-Yi Wang Signed-off-by: Stephen Boyd Signed-off-by: Rob Herring Documentation/devicetree/bindings/common-properties.txt | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit a08acd118d5ca7f6e745ef81cfc6cbadacb56462 Merge: 5420f3207759 16f0efc3b463 Author: Daniel Borkmann Date: Fri May 24 23:26:49 2019 +0200 Merge branch 'bpf-send-sig' Yonghong Song says: ==================== This patch tries to solve the following specific use case. Currently, bpf program can already collect stack traces through kernel function get_perf_callchain() when certain events happens (e.g., cache miss counter or cpu clock counter overflows). But such stack traces are not enough for jitted programs, e.g., hhvm (jited php). To get real stack trace, jit engine internal data structures need to be traversed in order to get the real user functions. bpf program itself may not be the best place to traverse the jit engine as the traversing logic could be complex and it is not a stable interface either. Instead, hhvm implements a signal handler, e.g. for SIGALARM, and a set of program locations which it can dump stack traces. When it receives a signal, it will dump the stack in next such program location. This patch implements bpf_send_signal() helper to send a signal to hhvm in real time, resulting in intended stack traces. Patch #1 implemented the bpf_send_helper() in the kernel. Patch #2 synced uapi header bpf.h to tools directory. Patch #3 added a self test which covers tracepoint and perf_event bpf programs. Changelogs: v4 => v5: . pass the "current" task struct to irq_work as well since the current task struct may change between nmi and subsequent irq_work_interrupt. Discovered by Daniel. v3 => v4: . fix one typo and declare "const char *id_path = ..." to avoid directly use the long string in the func body in Patch #3. v2 => v3: . change the standalone test to be part of prog_tests. RFC v1 => v2: . previous version allows to send signal to an arbitrary pid. This version just sends the signal to current task to avoid unstable pid and potential races between sending signals and task state changes for the pid. ==================== Signed-off-by: Daniel Borkmann commit 16f0efc3b46352018c297bbdb2c405e7d8a63095 Author: Yonghong Song Date: Thu May 23 14:47:47 2019 -0700 tools/bpf: add selftest in test_progs for bpf_send_signal() helper The test covered both nmi and tracepoint perf events. $ ./test_progs ... test_send_signal_tracepoint:PASS:tracepoint 0 nsec ... test_send_signal_common:PASS:tracepoint 0 nsec ... test_send_signal_common:PASS:perf_event 0 nsec ... test_send_signal:OK Acked-by: Andrii Nakryiko Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/bpf_helpers.h | 1 + .../testing/selftests/bpf/prog_tests/send_signal.c | 198 +++++++++++++++++++++ .../selftests/bpf/progs/test_send_signal_kern.c | 51 ++++++ 3 files changed, 250 insertions(+) commit edaccf8985305967c22903a78283c8c837ea48dd Author: Yonghong Song Date: Thu May 23 14:47:46 2019 -0700 tools/bpf: sync bpf uapi header bpf.h to tools directory The bpf uapi header include/uapi/linux/bpf.h is sync'ed to tools/include/uapi/linux/bpf.h. Acked-by: Andrii Nakryiko Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann tools/include/uapi/linux/bpf.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit 8b401f9ed2441ad9e219953927a842d24ed051fc Author: Yonghong Song Date: Thu May 23 14:47:45 2019 -0700 bpf: implement bpf_send_signal() helper This patch tries to solve the following specific use case. Currently, bpf program can already collect stack traces through kernel function get_perf_callchain() when certain events happens (e.g., cache miss counter or cpu clock counter overflows). But such stack traces are not enough for jitted programs, e.g., hhvm (jited php). To get real stack trace, jit engine internal data structures need to be traversed in order to get the real user functions. bpf program itself may not be the best place to traverse the jit engine as the traversing logic could be complex and it is not a stable interface either. Instead, hhvm implements a signal handler, e.g. for SIGALARM, and a set of program locations which it can dump stack traces. When it receives a signal, it will dump the stack in next such program location. Such a mechanism can be implemented in the following way: . a perf ring buffer is created between bpf program and tracing app. . once a particular event happens, bpf program writes to the ring buffer and the tracing app gets notified. . the tracing app sends a signal SIGALARM to the hhvm. But this method could have large delays and causing profiling results skewed. This patch implements bpf_send_signal() helper to send a signal to hhvm in real time, resulting in intended stack traces. Acked-by: Andrii Nakryiko Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann include/uapi/linux/bpf.h | 17 +++++++++++- kernel/trace/bpf_trace.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+), 1 deletion(-) commit 5420f3207759cd618a7b8a04a4eb5fc1c12b35cb Merge: c87f60a77db2 90eea4086d5e Author: Alexei Starovoitov Date: Fri May 24 14:05:58 2019 -0700 Merge branch 'btf2c-converter' Andrii Nakryiko says: ==================== This patch set adds BTF-to-C dumping APIs to libbpf, allowing to output a subset of BTF types as a compilable C type definitions. This is useful by itself, as raw BTF output is not easy to inspect and comprehend. But it's also a big part of BPF CO-RE (compile once - run everywhere) initiative aimed at allowing to write relocatable BPF programs, that won't require on-the-host kernel headers (and would be able to inspect internal kernel structures, not exposed through kernel headers). This patch set consists of three groups of patches and one pre-patch, with the BTF-to-C dumper API depending on the first two groups. Pre-patch #1 fixes issue with libbpf_internal.h. btf__parse_elf() API patches: - patch #2 adds btf__parse_elf() API to libbpf, allowing to load BTF and/or BTF.ext from ELF file; - patch #3 utilizies btf__parse_elf() from bpftool for `btf dump file` command; - patch #4 switches test_btf.c to use btf__parse_elf() to check for presence of BTF data in object file. libbpf's internal hashmap patches: - patch #5 adds resizeable non-thread safe generic hashmap to libbpf; - patch #6 adds tests for that hashmap; - patch #7 migrates btf_dedup()'s dedup_table to use hashmap w/ APPEND. BTF-to-C dumper API patches: - patch #8 adds btf_dump APIs with all the logic for laying out type definitions in correct order and emitting C syntax for them; - patch #9 adds lots of tests for common and quirky parts of C type system; - patch #10 adds support for C-syntax btf dumping to bpftool; - patch #11 updates bpftool documentation to mention C-syntax dump option; - patch #12 update bash-completion for btf dump sub-command. v2->v3: - fix bpftool-btf.rst formatting (Quentin); - simplify bash autocompletion script (Quentin); - better error message in btf dump (Quentin); v1->v2: - removed unuseful file header (Jakub); - removed inlines in .c (Jakub); - added 'format {c|raw}' keyword/option (Jakub); - re-use i var for iteration in btf_dump_c() (Jakub); - bumped libbpf version to 0.0.4; v0->v1: - fix bug in hashmap__for_each_bucket_entry() not handling empty hashmap; - removed `btf dump`-specific libbpf logging hook up (Quentin has more generic patchset); - change btf__parse_elf() to always load .BTF and return it as a result, with .BTF.ext being optional and returned through struct btf_ext** arg (Alexei); - endianness check to use __BYTE_ORDER__ (Alexei); - bool:1 to __u8:1 in type_aux_state (Alexei); - added HASHMAP_APPEND strategy to hashmap, changed hashmap__for_each_key_entry() to also check for key equality during iteration (multimap iteration for key); - added new tests for empty hashmap and hashmap as a multimap; - tried to clarify weak/strong dependency ordering comments (Alexei) - btf dump test's expected output - support better commenting aproach (Alexei); - added bash-completion for a new "c" option (Alexei). ==================== Signed-off-by: Alexei Starovoitov commit 90eea4086d5ed31936889a44d536bf77afa4ca8a Author: Andrii Nakryiko Date: Fri May 24 11:59:07 2019 -0700 bpftool: update bash-completion w/ new c option for btf dump Add bash completion for new C btf dump option. Cc: Quentin Monnet Signed-off-by: Andrii Nakryiko Reviewed-by: Quentin Monnet Signed-off-by: Alexei Starovoitov tools/bpf/bpftool/bash-completion/bpftool | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit 220ba451124e275ff548bec33b0dc01e40895b06 Author: Andrii Nakryiko Date: Fri May 24 11:59:06 2019 -0700 bpftool/docs: add description of btf dump C option Document optional **c** option for btf dump subcommand. Cc: Quentin Monnet Signed-off-by: Andrii Nakryiko Reviewed-by: Quentin Monnet Signed-off-by: Alexei Starovoitov tools/bpf/bpftool/Documentation/bpftool-btf.rst | 35 ++++++++++++++----------- 1 file changed, 20 insertions(+), 15 deletions(-) commit 2119f2189df1836d28909fe5a90b3d93638ecf65 Author: Andrii Nakryiko Date: Fri May 24 11:59:05 2019 -0700 bpftool: add C output format option to btf dump subcommand Utilize new libbpf's btf_dump API to emit BTF as a C definitions. Acked-by: Jakub Kicinski Signed-off-by: Andrii Nakryiko Reviewed-by: Quentin Monnet Signed-off-by: Alexei Starovoitov tools/bpf/bpftool/btf.c | 75 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 73 insertions(+), 2 deletions(-) commit 2d2a3ad872f884d618f11e1a2028cff862503dcd Author: Andrii Nakryiko Date: Fri May 24 11:59:04 2019 -0700 selftests/bpf: add btf_dump BTF-to-C conversion tests Add new test_btf_dump set of tests, validating BTF-to-C conversion correctness. Tests rely on clang to generate BTF from provided C test cases. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/.gitignore | 1 + tools/testing/selftests/bpf/Makefile | 3 +- .../bpf/progs/btf_dump_test_case_bitfields.c | 92 +++++++++ .../bpf/progs/btf_dump_test_case_multidim.c | 35 ++++ .../bpf/progs/btf_dump_test_case_namespacing.c | 73 +++++++ .../bpf/progs/btf_dump_test_case_ordering.c | 63 ++++++ .../bpf/progs/btf_dump_test_case_packing.c | 75 +++++++ .../bpf/progs/btf_dump_test_case_padding.c | 111 ++++++++++ .../bpf/progs/btf_dump_test_case_syntax.c | 229 +++++++++++++++++++++ tools/testing/selftests/bpf/test_btf_dump.c | 143 +++++++++++++ 10 files changed, 824 insertions(+), 1 deletion(-) commit 351131b51c7a27daf0fbdce80b619b8d130374c6 Author: Andrii Nakryiko Date: Fri May 24 11:59:03 2019 -0700 libbpf: add btf_dump API for BTF-to-C conversion BTF contains enough type information to allow generating valid compilable C header w/ correct layout of structs/unions and all the typedef/enum definitions. This patch adds a new "object" - btf_dump to facilitate dumping BTF as valid C. btf_dump__dump_type() is the main API which takes care of dumping out (through user-provided printf-like callback function) C definitions for given type ID and it's required dependencies. This allows for not just dumping out entirety of BTF types, but also selective filtering based on user-provided criterias w/ minimal set of dependent types. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov tools/lib/bpf/Build | 4 +- tools/lib/bpf/btf.h | 17 + tools/lib/bpf/btf_dump.c | 1336 ++++++++++++++++++++++++++++++++++++++++++++++ tools/lib/bpf/libbpf.map | 3 + 4 files changed, 1359 insertions(+), 1 deletion(-) commit 2fc3fc0bcdcc5429947d1e5ed8f6f0a77ba80997 Author: Andrii Nakryiko Date: Fri May 24 11:59:02 2019 -0700 libbpf: switch btf_dedup() to hashmap for dedup table Utilize libbpf's hashmap as a multimap fof dedup_table implementation. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov tools/lib/bpf/btf.c | 201 ++++++++++++++++++++++------------------------------ 1 file changed, 85 insertions(+), 116 deletions(-) commit 5d04ec687cf98bc6e8073c646994736a46ed4e24 Author: Andrii Nakryiko Date: Fri May 24 11:59:01 2019 -0700 selftests/bpf: add tests for libbpf's hashmap Test all APIs for internal hashmap implementation. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/.gitignore | 1 + tools/testing/selftests/bpf/Makefile | 2 +- tools/testing/selftests/bpf/test_hashmap.c | 382 +++++++++++++++++++++++++++++ 3 files changed, 384 insertions(+), 1 deletion(-) commit e3b924224028c6fc31545e3812eecbe2ddbf35f6 Author: Andrii Nakryiko Date: Fri May 24 11:59:00 2019 -0700 libbpf: add resizable non-thread safe internal hashmap There is a need for fast point lookups inside libbpf for multiple use cases (e.g., name resolution for BTF-to-C conversion, by-name lookups in BTF for upcoming BPF CO-RE relocation support, etc). This patch implements simple resizable non-thread safe hashmap using single linked list chains. Four different insert strategies are supported: - HASHMAP_ADD - only add key/value if key doesn't exist yet; - HASHMAP_SET - add key/value pair if key doesn't exist yet; otherwise, update value; - HASHMAP_UPDATE - update value, if key already exists; otherwise, do nothing and return -ENOENT; - HASHMAP_APPEND - always add key/value pair, even if key already exists. This turns hashmap into a multimap by allowing multiple values to be associated with the same key. Most useful read API for such hashmap is hashmap__for_each_key_entry() iteration. If hashmap__find() is still used, it will return last inserted key/value entry (first in a bucket chain). For HASHMAP_SET and HASHMAP_UPDATE, old key/value pair is returned, so that calling code can handle proper memory management, if necessary. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov tools/lib/bpf/Build | 2 +- tools/lib/bpf/hashmap.c | 229 ++++++++++++++++++++++++++++++++++++++++++++++++ tools/lib/bpf/hashmap.h | 173 ++++++++++++++++++++++++++++++++++++ 3 files changed, 403 insertions(+), 1 deletion(-) commit 9db324314d29442c8bb8212dd40a3bb26f86c1c9 Author: Andrii Nakryiko Date: Fri May 24 11:58:59 2019 -0700 selftests/bpf: use btf__parse_elf to check presence of BTF/BTF.ext Switch test_btf.c to rely on btf__parse_elf to check presence of BTF and BTF.ext data, instead of implementing its own ELF parsing. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/test_btf.c | 71 +++++++--------------------------- 1 file changed, 13 insertions(+), 58 deletions(-) commit 58650cc47382af7d87282f53a5b508ac4bf734af Author: Andrii Nakryiko Date: Fri May 24 11:58:58 2019 -0700 bpftool: use libbpf's btf__parse_elf API Use btf__parse_elf() API, provided by libbpf, instead of implementing ELF parsing by itself. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov tools/bpf/bpftool/btf.c | 117 ++++-------------------------------------------- 1 file changed, 8 insertions(+), 109 deletions(-) commit e6c64855fd7ad565d87b2bd617f4a50d3bdad82f Author: Andrii Nakryiko Date: Fri May 24 11:58:57 2019 -0700 libbpf: add btf__parse_elf API to load .BTF and .BTF.ext Loading BTF and BTF.ext from ELF file is a common need. Instead of requiring every user to re-implement it, let's provide this API from libbpf itself. It's mostly copy/paste from `bpftool btf dump` implementation, which will be switched to libbpf's version in next patch. btf__parse_elf allows to load BTF and optionally BTF.ext. This is also useful for tests that need to load/work with BTF, loaded from test ELF files. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov tools/lib/bpf/btf.c | 128 +++++++++++++++++++++++++++++++++++++++++++++++ tools/lib/bpf/btf.h | 2 + tools/lib/bpf/libbpf.map | 5 ++ 3 files changed, 135 insertions(+) commit 1d7a08b3bdaec1e25ba7979ff598272b7e34318f Author: Andrii Nakryiko Date: Fri May 24 11:58:56 2019 -0700 libbpf: ensure libbpf.h is included along libbpf_internal.h libbpf_internal.h expects a bunch of stuff defined in libbpf.h to be defined. This patch makes sure that libbpf.h is always included. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov tools/lib/bpf/libbpf_internal.h | 2 ++ 1 file changed, 2 insertions(+) commit 3f715b147a6c5245ee25d7334f4053c339feef98 Author: Jonathan Corbet Date: Fri May 24 15:05:41 2019 -0600 docs: No structured comments in include/linux/interconnect.h Remove the kernel-doc directive for this file, since there's nothing there and it generates a warning. Signed-off-by: Jonathan Corbet Documentation/interconnect/interconnect.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit dea20be5063c97bdac48e81ee2a85975f14885ed Author: Jonathan Corbet Date: Fri May 24 15:03:39 2019 -0600 docs: no structured comments in fs/file_table.c Remove the kernel-doc directive, since there are only warnings to be found there. Signed-off-by: Jonathan Corbet Documentation/filesystems/api-summary.rst | 3 --- 1 file changed, 3 deletions(-) commit 3aef4472665695be7cbdd2cc274814f56d36e4ef Author: Jonathan Corbet Date: Fri May 24 15:01:30 2019 -0600 docs: No structured comments in target_core_device.c Documentation/driver-api/target.rst is seeking kerneldoc comments in drivers/target/target_core_device.c, but no such comments exist. Take out the kernel-doc directive and eliminate one warning from the build. Signed-off-by: Jonathan Corbet Documentation/driver-api/target.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d698a388146c5ba72e7cf7e79f13932f2046bf29 Author: Krishna Reddy Date: Wed May 22 16:17:11 2019 +0530 of: reserved-memory: ignore disabled memory-region nodes Ignore disabled nodes in the memory-region nodes list and continue to initialize the rest of enabled nodes. Check if the "reserved-memory" node is available and if it's not available, return 0 to ignore the "reserved-memory" node and continue parsing with next node in memory-region nodes list. Signed-off-by: Krishna Reddy Signed-off-by: Puneet Saxena Signed-off-by: Rob Herring drivers/of/of_reserved_mem.c | 3 +++ 1 file changed, 3 insertions(+) commit 2496f17772f757ba7a58c2abc1cdfdaf7cca29fb Author: Maxime Ripard Date: Thu May 23 10:14:15 2019 +0200 dt-bindings: Add vendor prefix for Espressif Add Espressif Systems DT vendor prefix. That prefix has been used for quite some time for WiFi chips, but has never been documented. Signed-off-by: Maxime Ripard Signed-off-by: Rob Herring Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) commit c87f60a77db2c01770ef9c6ea792a1d39c3594ff Author: Michal Rostecki Date: Thu May 23 14:53:55 2019 +0200 samples: bpf: Do not define bpf_printk macro The bpf_printk macro was moved to bpf_helpers.h which is included in all example programs. Signed-off-by: Michal Rostecki Signed-off-by: Alexei Starovoitov samples/bpf/hbm_kern.h | 11 ++--------- samples/bpf/tcp_basertt_kern.c | 7 ------- samples/bpf/tcp_bufs_kern.c | 7 ------- samples/bpf/tcp_clamp_kern.c | 7 ------- samples/bpf/tcp_cong_kern.c | 7 ------- samples/bpf/tcp_iw_kern.c | 7 ------- samples/bpf/tcp_rwnd_kern.c | 7 ------- samples/bpf/tcp_synrto_kern.c | 7 ------- samples/bpf/tcp_tos_reflect_kern.c | 7 ------- samples/bpf/xdp_sample_pkts_kern.c | 7 ------- 10 files changed, 2 insertions(+), 72 deletions(-) commit 37739d1b4fe744da9c2f342224000ae7fbb5c063 Author: Michal Rostecki Date: Thu May 23 14:53:54 2019 +0200 selftests: bpf: Move bpf_printk to bpf_helpers.h bpf_printk is a macro which is commonly used to print out debug messages in BPF programs and it was copied in many selftests and samples. Since all of them include bpf_helpers.h, this change moves the macro there. Signed-off-by: Michal Rostecki Signed-off-by: Alexei Starovoitov tools/testing/selftests/bpf/bpf_helpers.h | 8 ++++++++ tools/testing/selftests/bpf/progs/sockmap_parse_prog.c | 7 ------- tools/testing/selftests/bpf/progs/sockmap_tcp_msg_prog.c | 7 ------- tools/testing/selftests/bpf/progs/sockmap_verdict_prog.c | 7 ------- tools/testing/selftests/bpf/progs/test_lwt_seg6local.c | 7 ------- tools/testing/selftests/bpf/progs/test_xdp_noinline.c | 7 ------- tools/testing/selftests/bpf/test_sockmap_kern.h | 7 ------- 7 files changed, 8 insertions(+), 42 deletions(-) commit 22942498ccebf13b076859f8746be161dc0c6d89 Merge: 33a74bf42873 a976ca79e23f Author: David S. Miller Date: Fri May 24 13:45:57 2019 -0700 Merge branch 'net-stmmac-Improvements-and-Selftests' Jose Abreu says: ==================== net: stmmac: Improvements and Selftests [ Thanks to the introducion of selftests this series ended up being a misc of improvements and the selftests additions per-se. ] This introduces selftests support in stmmac driver. We add 9 basic sanity checks and MAC loopback support for all cores within the driver. This way more tests can easily be added in the future and can be run in virtually any MAC/GMAC/QoS/XGMAC platform. Having this we can find regressions and missing features in the driver while at the same time we can check if the IP is correctly working. We have been using this for some time now and I do have more tests to submit in the feature. My experience is that although writing the tests adds more development time, the gain results are obvious. I let this feature optional within the driver under a Kconfig option. ==================== Signed-off-by: David S. Miller commit a976ca79e23f13bff79c14e7266cea4a0ea51e67 Author: Jose Abreu Date: Fri May 24 10:20:26 2019 +0200 net: stmmac: Prevent missing interrupts when running NAPI When we trigger NAPI we are disabling interrupts but in case we receive or send a packet in the meantime, as interrupts are disabled, we will miss this event. Trigger both NAPI instances (RX and TX) when at least one event happens so that we don't miss any interrupts. Signed-off-by: Jose Abreu Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 +++ 1 file changed, 3 insertions(+) commit 0620ec6c62a5a07625b65f699adc5d1b90394ee6 Author: Jose Abreu Date: Fri May 24 10:20:25 2019 +0200 net: stmmac: dwmac4/5: Clear unused address entries In case we don't use a given address entry we need to clear it because it could contain previous values that are no longer valid. Found out while running stmmac selftests. Signed-off-by: Jose Abreu Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit eaabcd9e4ec369061a300c00ccc40dde9bc11044 Author: Jose Abreu Date: Fri May 24 10:20:24 2019 +0200 net: stmmac: dwxgmac2: Do not disable whole RX in dma_stop_rx() We don't need to disable the whole RX when dma_stop_rx() is called because there may be the need of just disabling 1 DMA channel. This is also needed for stmmac Flow Control selftest. Signed-off-by: Jose Abreu Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c | 4 ---- 1 file changed, 4 deletions(-) commit a8b91b30d11dbcbab074a39a6dccabe19aa70715 Author: Jose Abreu Date: Fri May 24 10:20:23 2019 +0200 net: stmmac: dwmac4/5: Do not disable whole RX in dma_stop_rx() We don't need to disable the whole RX when dma_stop_rx() is called because there may be the need of just disabling 1 DMA channel. This is also needed for stmmac Flow Control selftest. Signed-off-by: Jose Abreu Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c | 4 ---- 1 file changed, 4 deletions(-) commit f9c5f7d783852eff099ee0a940652899ad028385 Author: Jose Abreu Date: Fri May 24 10:20:22 2019 +0200 net: stmmac: dwmac4/5: Fix Hash Filter In order for hash filter to work we need to set the HPF bit. Fout out while running stmmac selftests Signed-off-by: Jose Abreu Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac4.h | 1 + drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 2 ++ 2 files changed, 3 insertions(+) commit 9463c445590091202659cdfdd44b236acadfbd84 Author: Jose Abreu Date: Fri May 24 10:20:21 2019 +0200 net: stmmac: dwmac1000: Clear unused address entries In case we don't use a given address entry we need to clear it because it could contain previous values that are no longer valid. Found out while running stmmac selftests. Signed-off-by: Jose Abreu Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 09261426198370665b82e0be892fb6e495dcac6e Author: Jose Abreu Date: Fri May 24 10:20:20 2019 +0200 net: stmmac: dwmac1000: Fix Hash Filter In order for hash filter to work we need to set the HPF bit. Found out while running stmmac selftests. Signed-off-by: Jose Abreu Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c | 1 + 1 file changed, 1 insertion(+) commit 091810dbded96c2af81f645e386e4262553e3493 Author: Jose Abreu Date: Fri May 24 10:20:19 2019 +0200 net: stmmac: Introduce selftests support We add support for selftests on stmmac driver with 9 basic sanity checks for now: - MAC Loopback - PHY Loopback - MMC Counters - EEE - Hash Filter Multicast - Perfect Filter Unicast - Multicast Filter All - Unicast Filter All - Flow Control This allows for fast tracking of regressions in the driver and helps in spotting mis-configuration of HW. Changes from v1: - Fix build error as module (David) - Check for link status before running tests Changes from RFC v2: - Return proper error code in stmmac_test_mmc (Corentin) - Use only 1 MMC counter in stmmac_test_mmc (Alexandre) Changes from RFC v1: - Change test_loopback to test_mac_loopback (Andrew) - Change timeout to retries (Andrew) - Add MC/UC filter tests (Andrew) - Only test in offline mode (Andrew) - Do not call phy_loopback twice (Alexandre) Signed-off-by: Jose Abreu Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Cc: Corentin Labbe Cc: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/Kconfig | 9 + drivers/net/ethernet/stmicro/stmmac/Makefile | 2 + drivers/net/ethernet/stmicro/stmmac/stmmac.h | 22 + .../net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 6 + .../net/ethernet/stmicro/stmmac/stmmac_selftests.c | 850 +++++++++++++++++++++ 5 files changed, 889 insertions(+) commit 8c5f48d99de21ef7591051985e602a3204619260 Author: Jose Abreu Date: Fri May 24 10:20:18 2019 +0200 net: stmmac: dwxgmac2: Also pass control frames while in promisc mode In order for the selftests to run the Flow Control selftest we need to also pass pause frames to the stack. Pass this type of frames while in promiscuous mode. Signed-off-by: Jose Abreu Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h | 1 + drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit 2b783e613d7664eaecab229bd2783f657d1bf382 Author: Jose Abreu Date: Fri May 24 10:20:17 2019 +0200 net: stmmac: dwmac4/5: Also pass control frames while in promisc mode In order for the selftests to run the Flow Control selftest we need to also pass pause frames to the stack. Pass this type of frames while in promiscuous mode. Signed-off-by: Jose Abreu Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac4.h | 1 + drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit 52ef6d9240e53d22c0c136c5320e7864812da717 Author: Jose Abreu Date: Fri May 24 10:20:16 2019 +0200 net: stmmac: dwmac1000: Also pass control frames while in promisc mode In order for the selftests to run the Flow Control selftest we need to also pass pause frames to the stack. Pass this type of frames while in promiscuous mode. Signed-off-by: Jose Abreu Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac1000.h | 1 + drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit 3b1dd2c50016fab237a2916164576d7725e6e40c Author: Jose Abreu Date: Fri May 24 10:20:15 2019 +0200 net: stmmac: Switch MMC functions to HWIF callbacks XGMAC has a different MMC module. Lets use HWIF callbacks for MMC module so that correct callbacks are automatically selected. Signed-off-by: Jose Abreu Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/common.h | 1 + drivers/net/ethernet/stmicro/stmmac/hwif.c | 9 +++++++++ drivers/net/ethernet/stmicro/stmmac/hwif.h | 17 +++++++++++++++++ drivers/net/ethernet/stmicro/stmmac/mmc.h | 4 ---- drivers/net/ethernet/stmicro/stmmac/mmc_core.c | 13 ++++++++++--- drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 2 +- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ++-- 7 files changed, 40 insertions(+), 10 deletions(-) commit 8edb12713ee82eab3614bd216b13f5a244da9fbf Author: Corentin Labbe Date: Fri May 24 10:20:14 2019 +0200 net: ethernet: stmmac: dwmac-sun8i: Enable control of loopback This patch enable use of set_mac_loopback in dwmac-sun8i Signed-off-by: Corentin Labbe Signed-off-by: Jose Abreu Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 84c8df164906d130e9c00a68e33d811cf37b8ba1 Author: Jose Abreu Date: Fri May 24 10:20:13 2019 +0200 net: stmmac: dwxgmac2: Add MAC loopback support In preparation for the addition of stmmac selftests we implement the MAC loopback callback in dwxgmac2 core. Signed-off-by: Jose Abreu Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h | 1 + drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c | 13 +++++++++++++ 2 files changed, 14 insertions(+) commit 4ce84f4da7c4722bccc9c772d7ecc21b2f1c75e5 Author: Jose Abreu Date: Fri May 24 10:20:12 2019 +0200 net: stmmac: dwmac4/5: Add MAC loopback support In preparation for the addition of stmmac selftests we implement the MAC loopback callback in dwmac4/5 cores. Signed-off-by: Jose Abreu Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac4.h | 1 + drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 15 +++++++++++++++ 2 files changed, 16 insertions(+) commit cbc195152149e3ffa3420182023570ddd0c08670 Author: Jose Abreu Date: Fri May 24 10:20:11 2019 +0200 net: stmmac: dwmac1000: Add MAC loopback support In preparation for the addition of stmmac selftests we implement the MAC loopback callback in dwmac1000 core. Signed-off-by: Jose Abreu Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 0a05a7a315b13d4e6e7e12c1763200eeec5dd7ac Author: Jose Abreu Date: Fri May 24 10:20:10 2019 +0200 net: stmmac: dwmac100: Add MAC loopback support In preparation for the addition of stmmac selftests we implement the MAC loopback callback in dwmac100 core. Signed-off-by: Jose Abreu Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac100_core.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 48435bc3b330b84eed095174d214c48df6124ac8 Author: Jose Abreu Date: Fri May 24 10:20:09 2019 +0200 net: stmmac: Add MAC loopback callback to HWIF In preparation for the addition of selftests support for stmmac we add a new callback to HWIF that can be used to set the controller in loopback mode. Signed-off-by: Jose Abreu Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Cc: Corentin Labbe Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/hwif.h | 4 ++++ 1 file changed, 4 insertions(+) commit 41ce14e39bbe0683a2d49385ee8a8cb0b1d010eb Author: Jonathan Corbet Date: Fri May 24 14:43:42 2019 -0600 docs: Do not seek kerneldoc comments in hw-consumer.h There are no kerneldoc comments here, so looking for them just yields a warning in the docs build. Signed-off-by: Jonathan Corbet Documentation/driver-api/iio/hw-consumer.rst | 1 - 1 file changed, 1 deletion(-) commit 5c1d824cda9f6059ee5fb6cc83cd4f47c85cf215 Author: Dan Murphy Date: Mon May 6 14:16:14 2019 -0500 leds: lm3697: Introduce the lm3697 driver Introduce the lm3697 LED driver for backlighting and display. Datasheet location: http://www.ti.com/lit/ds/symlink/lm3697.pdf Signed-off-by: Dan Murphy Signed-off-by: Jacek Anaszewski drivers/leds/Kconfig | 8 + drivers/leds/Makefile | 1 + drivers/leds/leds-lm3697.c | 395 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 404 insertions(+) commit b86b9ba55a2e0d1013db26084385d83dd7d0b475 Author: Dan Murphy Date: Mon May 6 14:16:13 2019 -0500 mfd: ti-lmu: Remove support for LM3697 Remove support for the LM3697 from the ti-lmu driver in favor of a dedicated LED driver. Signed-off-by: Dan Murphy Acked-by: Lee Jones Signed-off-by: Jacek Anaszewski drivers/mfd/Kconfig | 2 +- drivers/mfd/ti-lmu.c | 17 -------------- include/linux/mfd/ti-lmu-register.h | 44 ------------------------------------- include/linux/mfd/ti-lmu.h | 1 - 4 files changed, 1 insertion(+), 63 deletions(-) commit 1372bbe66a59528e65d10ae67416835d3ec2452e Author: Dan Murphy Date: Mon May 6 14:16:12 2019 -0500 dt-bindings: ti-lmu: Modify dt bindings for the LM3697 The LM3697 is a single function LED driver. The single function LED driver needs to reside in the LED directory as a dedicated LED driver and not as a MFD device. The device does have common brightness and ramp features and those can be accomodated by a TI LMU framework. The LM3697 dt binding needs to be moved from the ti-lmu.txt and a dedicated LED dt binding needs to be added. The new LM3697 LED dt binding will then reside in the Documentation/devicetree/bindings/leds directory and follow the current LED and general bindings guidelines. Signed-off-by: Dan Murphy Reviewed-by: Rob Herring Acked-by: Lee Jones Signed-off-by: Jacek Anaszewski .../devicetree/bindings/leds/leds-lm3697.txt | 73 ++++++++++++++++++++++ Documentation/devicetree/bindings/mfd/ti-lmu.txt | 27 +------- 2 files changed, 74 insertions(+), 26 deletions(-) commit 3fce8e1eb9945c2771360542b71ff717460ba4d7 Author: Dan Murphy Date: Mon May 6 14:16:11 2019 -0500 leds: TI LMU: Add common code for TI LMU devices Create a TI LMU common framework for TI LMU devices that share common features. Currently the runtime ramp and brightness setting have been identified as common features with common register settings. This work is derived from Milo Kims TI LMU MFD code. Signed-off-by: Dan Murphy Acked-by: Pavel Machek Signed-off-by: Jacek Anaszewski drivers/leds/Kconfig | 9 +++ drivers/leds/Makefile | 1 + drivers/leds/leds-ti-lmu-common.c | 156 +++++++++++++++++++++++++++++++++++++ include/linux/leds-ti-lmu-common.h | 47 +++++++++++ 4 files changed, 213 insertions(+) commit 33a74bf4287389ff43147ee34bb177151c1b9ad5 Merge: af5136f95045 ce64c1f77a9d Author: David S. Miller Date: Fri May 24 13:39:34 2019 -0700 Merge branch 'net-phy-add-interface-mode-PHY_INTERFACE_MODE_USXGMII' Heiner Kallweit says: ==================== net: phy: add interface mode PHY_INTERFACE_MODE_USXGMII Add support for interface mode USXGMII. On Freescale boards LS1043A and LS1046A a warning may pop up now because mode xgmii should be changed to usxgmii (as the used Aquantia PHY doesn't support XGMII). ==================== Signed-off-by: David S. Miller commit ce64c1f77a9d66c3ea86e1ceb444c980ecb03b7d Author: Heiner Kallweit Date: Thu May 23 20:09:08 2019 +0200 net: phy: aquantia: add USXGMII support and warn if XGMII mode is set So far we didn't support mode USXGMII, and in order to not break few boards mode XGMII was accepted for the AQR107 family even though it doesn't support XGMII. Add USXGMII support to the Aquantia PHY driver and warn if XGMII mode is set. v2: - add warning if XGMII mode is set Signed-off-by: Heiner Kallweit Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/aquantia_main.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 79b647a0c0d52a03feb8b39a6311b01bb2bf87a8 Author: Heiner Kallweit Date: Thu May 23 20:07:56 2019 +0200 dt-bindings: net: document new usxgmii phy mode Add new interface mode USXGMII to binding documentation. Signed-off-by: Heiner Kallweit Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/ethernet.txt | 1 + 1 file changed, 1 insertion(+) commit 4618d6719743b60f1da4b8112c4518ee46110b94 Author: Heiner Kallweit Date: Thu May 23 20:06:49 2019 +0200 net: phy: add interface mode PHY_INTERFACE_MODE_USXGMII Add support for interface mode PHY_INTERFACE_MODE_USXGMII. Signed-off-by: Heiner Kallweit Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller include/linux/phy.h | 3 +++ 1 file changed, 3 insertions(+) commit af5136f95045b6c4bb8a53d2f288a905c3bd6f25 Author: Willem de Bruijn Date: Thu May 23 13:48:46 2019 -0400 selftests/net: SO_TXTIME with ETF and FQ The SO_TXTIME API enables packet tranmission with delayed delivery. This is currently supported by the ETF and FQ packet schedulers. Evaluate the interface with both schedulers. Install the scheduler and send a variety of packets streams: without delay, with one delayed packet, with multiple ordered delays and with reordering. Verify that packets are released by the scheduler in expected order. The ETF qdisc requires a timestamp in the future on every packet. It needs a delay on the qdisc else the packet is dropped on dequeue for having a delivery time in the past. The test value is experimentally derived. ETF requires clock_id CLOCK_TAI. It checks this base and drops for non-conformance. The FQ qdisc expects clock_id CLOCK_MONOTONIC, the base used by TCP as of commit fb420d5d91c1 ("tcp/fq: move back to CLOCK_MONOTONIC"). Within a flow there is an expecation of ordered delivery, as shown by delivery times of test 4. The FQ qdisc does not require all packets to have timestamps and does not drop for non-conformance. The large (msec) delays are chosen to avoid flakiness. Output: SO_TXTIME ipv6 clock monotonic payload:a delay:28 expected:0 (us) SO_TXTIME ipv4 clock monotonic payload:a delay:38 expected:0 (us) SO_TXTIME ipv6 clock monotonic payload:a delay:40 expected:0 (us) SO_TXTIME ipv4 clock monotonic payload:a delay:33 expected:0 (us) SO_TXTIME ipv6 clock monotonic payload:a delay:10120 expected:10000 (us) SO_TXTIME ipv4 clock monotonic payload:a delay:10102 expected:10000 (us) [.. etc ..] OK. All tests passed Changes v1->v2: update commit message output Signed-off-by: Willem de Bruijn Acked-by: Eric Dumazet Acked-by: Vinicius Costa Gomes Signed-off-by: David S. Miller tools/testing/selftests/net/.gitignore | 1 + tools/testing/selftests/net/Makefile | 3 +- tools/testing/selftests/net/config | 2 + tools/testing/selftests/net/so_txtime.c | 296 +++++++++++++++++++++++++++++++ tools/testing/selftests/net/so_txtime.sh | 31 ++++ 5 files changed, 332 insertions(+), 1 deletion(-) commit e8d4f892bb245702ee23abfcd28eb98b5eca6c86 Author: Jonathan Corbet Date: Fri May 24 14:31:50 2019 -0600 docs: Fix a misdirected kerneldoc directive The stratix10 service layer documentation tried to include a kerneldoc comments for a nonexistent struct; leading to a "no structured comments found" message. Switch it to stratix10_svc_command_config_type, which appears at that spot in the sequence and was not included. Signed-off-by: Jonathan Corbet Documentation/driver-api/firmware/other_interfaces.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a80886e4e083bcaa95196959fe2d2fb0dca4ab90 Merge: daeceb2df3df ec8105352869 Author: David S. Miller Date: Fri May 24 13:26:44 2019 -0700 Merge branch 'ipv6-Move-exceptions-to-fib6_nh-and-make-it-optional-in-a-fib6_info' David Ahern says: ==================== ipv6: Move exceptions to fib6_nh and make it optional in a fib6_info Patches 1 and 4 move pcpu and exception caches from fib6_info to fib6_nh. With respect to the current FIB entries this is only a movement from one struct to another contained within the first. Patch 2 refactors the core logic of fib6_drop_pcpu_from into a helper that is invoked per fib6_nh. Patch 3 refactors exception handling in a similar way - creating a bunch of helpers that can be invoked per fib6_nh with the goal of making patch 4 easier to review as well as creating the code needed for nexthop objects. Patch 5 makes a fib6_nh at the end of a fib6_info an array similar to IPv4 and its fib_info. For the current fib entry model, all fib6_info will have a fib6_nh allocated for it. Patch 6 refactors ip6_route_del moving the code for deleting an exception entry into a new function. Patch 7 adds tests for redirect route exceptions. The new test was written against 5.1 (before any of the nexthop refactoring). It and the pmtu.sh selftest exercise the exception code paths - from creating exceptions to cleaning them up on device delete. All tests pass without any rcu locking or memleak warnings. ==================== Signed-off-by: David S. Miller commit ec8105352869766569f657464c8a78d7bc0e2406 Author: David Ahern Date: Wed May 22 20:28:01 2019 -0700 selftests: Add redirect tests Add test for ICMP redirects and exception processing. Test is setup for later addition of tests using nexthop objects for routing. Signed-off-by: David Ahern Signed-off-by: David S. Miller tools/testing/selftests/net/icmp_redirect.sh | 455 +++++++++++++++++++++++++++ 1 file changed, 455 insertions(+) commit 0fa6efc54780412c3fbd6f6e61a5dfb4ca9bb59c Author: David Ahern Date: Wed May 22 20:28:00 2019 -0700 ipv6: Refactor ip6_route_del for cached routes Move the removal of cached routes to a helper, ip6_del_cached_rt, that can be invoked per nexthop. Rename the existig ip6_del_cached_rt to __ip6_del_cached_rt since it is called by ip6_del_cached_rt. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv6/route.c | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) commit 1cf844c747d5424abe76f7b599c00b1ac17d3fce Author: David Ahern Date: Wed May 22 20:27:59 2019 -0700 ipv6: Make fib6_nh optional at the end of fib6_info Move fib6_nh to the end of fib6_info and make it an array of size 0. Pass a flag to fib6_info_alloc indicating if the allocation needs to add space for a fib6_nh. The current code path always has a fib6_nh allocated with a fib6_info; with nexthop objects they will be separate. Signed-off-by: David Ahern Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 31 ++--- include/net/ip6_fib.h | 6 +- include/net/ip6_route.h | 4 +- net/ipv6/addrconf.c | 6 +- net/ipv6/ip6_fib.c | 18 +-- net/ipv6/ndisc.c | 8 +- net/ipv6/route.c | 134 ++++++++++----------- 7 files changed, 106 insertions(+), 101 deletions(-) commit cc5c073a693fa6ed7a207b0436114f68cce72434 Author: David Ahern Date: Wed May 22 20:27:58 2019 -0700 ipv6: Move exception bucket to fib6_nh Similar to the pcpu routes exceptions are really per nexthop, so move rt6i_exception_bucket from fib6_info to fib6_nh. To avoid additional increases to the size of fib6_nh for a 1-bit flag, use the lowest bit in the allocated memory pointer for the flushed flag. Add helpers for retrieving the bucket pointer to mask off the flag. The cleanup of the exception bucket is moved to fib6_nh_release. fib6_nh_flush_exceptions can now be called from 2 contexts: 1. deleting a fib entry 2. deleting a fib6_nh For 1., fib6_nh_flush_exceptions is called for a specific fib6_info that is getting deleted. All exceptions in the cache using the entry are deleted. For 2, the fib6_nh itself is getting destroyed so fib6_nh_flush_exceptions is called for a NULL fib6_info which means flush all entries. The pmtu.sh selftest exercises the affected code paths - from creating exceptions to cleaning them up on device delete. All tests pass without any rcu locking or memleak warnings. Signed-off-by: David Ahern Signed-off-by: David S. Miller include/net/ip6_fib.h | 8 +-- net/ipv6/ip6_fib.c | 6 -- net/ipv6/route.c | 185 +++++++++++++++++++++++++++++++++----------------- 3 files changed, 126 insertions(+), 73 deletions(-) commit c0b220cf7d80eb8a36ae9f12cae6df4577a6814e Author: David Ahern Date: Wed May 22 20:27:57 2019 -0700 ipv6: Refactor exception functions Before moving exception bucket from fib6_info to fib6_nh, refactor rt6_flush_exceptions, rt6_remove_exception_rt, rt6_mtu_change_route, and rt6_update_exception_stamp_rt. In all 3 cases, move the primary logic into a new helper that starts with fib6_nh_. The latter 3 functions still take a fib6_info; this will be changed to fib6_nh in the next patch. In the case of rt6_mtu_change_route, move the fib6_metric_locked out as a standalone check - no need to call the new function if the fib entry has the mtu locked. Also, add fib6_info to rt6_mtu_change_arg as a way of passing the fib entry to the new helper. No functional change intended. The goal here is to make the next patch easier to review by moving existing lookup logic for each to new helpers. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv6/route.c | 134 +++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 86 insertions(+), 48 deletions(-) commit 7d88d8b5570b6adba39289487138cff38f84336d Author: David Ahern Date: Wed May 22 20:27:56 2019 -0700 ipv6: Refactor fib6_drop_pcpu_from Move the existing pcpu walk in fib6_drop_pcpu_from to a new helper, __fib6_drop_pcpu_from, that can be invoked per fib6_nh with a reference to the from entries that need to be evicted. If the passed in 'from' is non-NULL then only entries associated with that fib6_info are removed (e.g., case where fib entry is deleted); if the 'from' is NULL are entries are flushed (e.g., fib6_nh is deleted). For fib6_info entries with builtin fib6_nh (ie., current code) there is no change in behavior. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv6/ip6_fib.c | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) commit f40b6ae2b612446dc970d7b51eeec47bd1619f82 Author: David Ahern Date: Wed May 22 20:27:55 2019 -0700 ipv6: Move pcpu cached routes to fib6_nh rt6_info are specific instances of a fib entry and are tied to a device and gateway - ie., a nexthop. Before nexthop objects, IPv6 fib entries have separate fib6_info for each nexthop in a multipath route, so the location of the pcpu cache in the fib6_info struct worked. However, with nexthop objects a fib6_info can point to a set of nexthops (yet another alignment of ipv6 with ipv4). Accordingly, the pcpu cache needs to be moved to the fib6_nh struct so the cached entries are local to the nexthop specification used to create the rt6_info. Initialization and free of the pcpu entries moved to fib6_nh_init and fib6_nh_release. Change in location only, from fib6_info down to fib6_nh; no other functional change intended. Signed-off-by: David Ahern Signed-off-by: David S. Miller include/net/ip6_fib.h | 3 ++- net/ipv6/addrconf.c | 6 +++--- net/ipv6/ip6_fib.c | 34 ++++++---------------------------- net/ipv6/route.c | 29 +++++++++++++++++++++++++++-- 4 files changed, 38 insertions(+), 34 deletions(-) commit a5f6f88c3d1a453dd35cbaac2870f5fae866ad2e Author: Jonathan Corbet Date: Fri May 24 14:22:36 2019 -0600 docs: Do not seek comments in kernel/rcu/tree_plugin.h There are no kerneldoc comments in this file, so do not attempt to include them in the docs build. Signed-off-by: Jonathan Corbet Documentation/core-api/kernel-api.rst | 2 -- Documentation/driver-api/basics.rst | 3 --- 2 files changed, 5 deletions(-) commit e9a804d7a428432d8ad0bc7984f459daf0cc4da3 Author: Christian Mauderer Date: Mon May 13 21:33:07 2019 +0200 leds: spi-byte: add single byte SPI LED driver This driver adds support for simple SPI based LED controller which use only one byte for setting the brightness. Signed-off-by: Christian Mauderer Acked-by: Pavel Machek Signed-off-by: Jacek Anaszewski drivers/leds/Kconfig | 10 +++ drivers/leds/Makefile | 1 + drivers/leds/leds-spi-byte.c | 161 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 172 insertions(+) commit e7c787cb2697ee4c101109bf21b4fc397cea150b Author: Christian Mauderer Date: Mon May 13 21:33:06 2019 +0200 dt-bindings: leds: Add binding for spi-byte LED. This patch adds the binding documentation for a simple SPI based LED controller which use only one byte for setting the brightness. Signed-off-by: Christian Mauderer Reviewed-by: Rob Herring Signed-off-by: Jacek Anaszewski .../devicetree/bindings/leds/leds-spi-byte.txt | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit daeceb2df3dfb16f936bc169b0e768bdedc6367f Merge: dfb569f2b96e 49401003e260 Author: David S. Miller Date: Fri May 24 13:16:33 2019 -0700 Merge branch 'ENETC-support-hardware-timestamping' Y.b. Lu says: ==================== ENETC: support hardware timestamping This patch-set is to support hardware timestamping for ENETC and also to add ENETC 1588 timer device tree node for ls1028a. Because the ENETC RX BD ring dynamic allocation has not been supported and it is too expensive to use extended RX BDs if timestamping is not used, a Kconfig option is used to enable extended RX BDs in order to support hardware timestamping. This option will be removed once RX BD ring dynamic allocation is implemented. ==================== Signed-off-by: David S. Miller commit 49401003e260736fa05a999e570bd21c770b3db4 Author: Y.b. Lu Date: Thu May 23 02:33:41 2019 +0000 arm64: dts: fsl: ls1028a: add ENETC 1588 timer node Add ENETC 1588 timer node which is ENETC PF 4 (Physiscal Function 4). Signed-off-by: Yangbo Lu Signed-off-by: David S. Miller arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit ad8288b89d4f02d184391457cf655e5f68943341 Author: Y.b. Lu Date: Thu May 23 02:33:37 2019 +0000 dt-binding: ptp_qoriq: support ENETC PTP compatible Add a new compatible for ENETC PTP. Signed-off-by: Yangbo Lu Signed-off-by: David S. Miller Documentation/devicetree/bindings/ptp/ptp-qoriq.txt | 1 + 1 file changed, 1 insertion(+) commit 41514737ecaa603a5127cdccdc5f17ef11b9b3dc Author: Y.b. Lu Date: Thu May 23 02:33:33 2019 +0000 enetc: add get_ts_info interface for ethtool This patch is to add get_ts_info interface for ethtool to support getting timestamping capability. Signed-off-by: Yangbo Lu Signed-off-by: David S. Miller drivers/net/ethernet/freescale/enetc/enetc.h | 3 +++ .../net/ethernet/freescale/enetc/enetc_ethtool.c | 31 ++++++++++++++++++++++ drivers/net/ethernet/freescale/enetc/enetc_ptp.c | 5 ++++ 3 files changed, 39 insertions(+) commit d398231219116da5697bbe090e478dd68a2259ed Author: Y.b. Lu Date: Thu May 23 02:33:29 2019 +0000 enetc: add hardware timestamping support This patch is to add hardware timestamping support for ENETC. On Rx, timestamping is enabled for all frames. On Tx, we only instruct the hardware to timestamp the frames marked accordingly by the stack. Because the RX BD ring dynamic allocation has not been supported and it is too expensive to use extended RX BDs if timestamping is not used, a Kconfig option is used to enable extended RX BDs in order to support hardware timestamping. This option will be removed once RX BD ring dynamic allocation is implemented. Signed-off-by: Yangbo Lu Signed-off-by: Claudiu Manoil Signed-off-by: David S. Miller drivers/net/ethernet/freescale/enetc/Kconfig | 10 ++ drivers/net/ethernet/freescale/enetc/enetc.c | 158 +++++++++++++++++++++++- drivers/net/ethernet/freescale/enetc/enetc.h | 12 +- drivers/net/ethernet/freescale/enetc/enetc_hw.h | 13 ++ drivers/net/ethernet/freescale/enetc/enetc_pf.c | 1 + drivers/net/ethernet/freescale/enetc/enetc_vf.c | 1 + 6 files changed, 189 insertions(+), 6 deletions(-) commit 1f48d056287d58f425c4f36705764f2ba802feba Author: Sven Van Asbroeck Date: Fri May 24 15:10:13 2019 -0400 MAINTAINERS: Add entry for anybuss drivers Add myself as the maintainer of the anybuss bus driver, and its client drivers. Signed-off-by: Sven Van Asbroeck Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 5 +++++ 1 file changed, 5 insertions(+) commit 49e352af1edbc83a639b050fef10678d8f5a742c Author: Sven Van Asbroeck Date: Fri May 24 15:10:12 2019 -0400 MAINTAINERS: Add entry for fieldbus subsystem Add myself as the maintainer of the fieldbus subsystem. Signed-off-by: Sven Van Asbroeck Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 6 ++++++ 1 file changed, 6 insertions(+) commit 381e9760ee87ba53df882c4affadfcc07bdf3bc2 Author: Stephen Boyd Date: Fri May 10 11:01:51 2019 -0700 firmware: google: coreboot: Drop unnecessary headers These headers aren't used by the files they're included in, so drop them. The memconsole file uses memremap() though, so include io.h there so that the include is explicit. Cc: Wei-Ning Huang Cc: Julius Werner Cc: Brian Norris Cc: Samuel Holland Cc: Guenter Roeck Signed-off-by: Stephen Boyd Reviewed-by: Julius Werner Reviewed-by: Samuel Holland Signed-off-by: Greg Kroah-Hartman drivers/firmware/google/coreboot_table.h | 1 - drivers/firmware/google/memconsole-coreboot.c | 1 + drivers/firmware/google/memconsole.c | 1 - drivers/firmware/google/vpd_decode.c | 2 -- 4 files changed, 1 insertion(+), 4 deletions(-) commit b4cdeb785ea482ebfe6f8d12242620edf4fbf11c Author: Stephen Boyd Date: Fri May 10 11:01:50 2019 -0700 firmware: google: memconsole: Drop global func pointer We can store this function pointer directly in the bin_attribute structure's private field. Do this to save one global pointer. Cc: Wei-Ning Huang Cc: Julius Werner Cc: Brian Norris Cc: Samuel Holland Cc: Guenter Roeck Signed-off-by: Stephen Boyd Reviewed-by: Julius Werner Reviewed-by: Samuel Holland Signed-off-by: Greg Kroah-Hartman drivers/firmware/google/memconsole.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit e07f100993c6d411c4886ba37b2047322e302917 Author: Stephen Boyd Date: Fri May 10 11:01:49 2019 -0700 firmware: google: memconsole: Drop __iomem on memremap memory memremap() doesn't return __iomem marked memory, so drop the marking here. This makes static analysis tools like sparse happy again. Cc: Wei-Ning Huang Cc: Julius Werner Cc: Brian Norris Cc: Samuel Holland Cc: Guenter Roeck Signed-off-by: Stephen Boyd Reviewed-by: Julius Werner Reviewed-by: Samuel Holland Signed-off-by: Greg Kroah-Hartman drivers/firmware/google/memconsole-coreboot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b0503584a82814c05951b792d0177e052da2db6f Author: Stephen Boyd Date: Fri May 10 14:24:53 2019 -0700 firmware: google: memconsole: Use devm_memremap() Use the devm version of memremap so that we can delete the unmapping code in driver remove, but more importantly so that we can unmap this memory region if memconsole_sysfs_init() errors out for some reason. Cc: Wei-Ning Huang Cc: Julius Werner Cc: Brian Norris Cc: Samuel Holland Cc: Guenter Roeck Signed-off-by: Stephen Boyd Reviewed-by: Julius Werner Reviewed-by: Samuel Holland Signed-off-by: Greg Kroah-Hartman drivers/firmware/google/memconsole-coreboot.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 354635039d935dba16ba35054b27dd6671fd3d14 Author: Stephen Boyd Date: Fri May 10 11:01:47 2019 -0700 firmware: google: Add a module_coreboot_driver() macro and use it Remove some boiler plate code we have in three drivers with a single line each time. This also gets us a free assignment of the driver .owner field, making these drivers work better as modules. Cc: Wei-Ning Huang Cc: Julius Werner Cc: Brian Norris Cc: Samuel Holland Cc: Guenter Roeck Signed-off-by: Stephen Boyd Reviewed-by: Julius Werner Reviewed-by: Samuel Holland Signed-off-by: Greg Kroah-Hartman drivers/firmware/google/coreboot_table.h | 10 ++++++++++ drivers/firmware/google/framebuffer-coreboot.c | 14 +------------- drivers/firmware/google/memconsole-coreboot.c | 14 +------------- drivers/firmware/google/vpd.c | 14 +------------- 4 files changed, 13 insertions(+), 39 deletions(-) commit 7ef0b1524417743e6861490420225affe451486b Author: Chengguang Xu Date: Thu May 2 20:15:05 2019 +0800 chardev: set variable ret to -EBUSY before checking minor range overlap When allocating dynamic major, the minor range overlap check in __register_chrdev_region() will not fail, so actually there is no real case to passing non negative error code to caller. However, set variable ret to -EBUSY before checking minor range overlap will avoid false-positive warning from code analyzing tool(like Smatch) and also make the code more easy to understand. Suggested-by: Dan Carpenter Signed-off-by: Chengguang Xu Signed-off-by: Greg Kroah-Hartman fs/char_dev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 17aa207e6e08b0bcf92cf7b473fae9a70e325dbe Author: YueHaibing Date: Sat Apr 27 00:48:16 2019 +0800 counter: 104-quad-8: Make quad8_ops static Fix sparse warning: drivers/counter/104-quad-8.c:836:26: warning: symbol 'quad8_ops' was not declared. Should it be static? Signed-off-by: YueHaibing Acked-by: William Breathitt Gray Signed-off-by: Greg Kroah-Hartman drivers/counter/104-quad-8.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 31641e34e8a3da5735d3cc901fb986bf6df28b6f Author: Jean Delvare Date: Mon May 6 15:16:56 2019 +0200 eeprom: ee1004: Deal with nack on page selection Some EE1004 implementations will not properly ack page selection commands. They still set the page correctly, so there is no actual error. Deal with this case gracefully by checking the currently selected page after we receive a nack. If the page is set right then we can continue. Signed-off-by: Jean Delvare Tested-by: Jarkko Nikula Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman drivers/misc/eeprom/ee1004.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 5d458751749abda241b7d0a16136c3d49080cf07 Author: Jean Delvare Date: Mon May 6 15:15:39 2019 +0200 eeprom: ee1004: Move selected page detection to a separate function No functional change, this is in preparation for future needs. Signed-off-by: Jean Delvare Tested-by: Jarkko Nikula Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman drivers/misc/eeprom/ee1004.c | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) commit e9e08a07385e08f1a7f85c5d1e345c21c9564963 Author: Nick Desaulniers Date: Wed May 15 11:24:41 2019 -0700 lkdtm: support llvm-objcopy With CONFIG_LKDTM=y and make OBJCOPY=llvm-objcopy, llvm-objcopy errors: llvm-objcopy: error: --set-section-flags=.text conflicts with --rename-section=.text=.rodata Rather than support setting flags then renaming sections vs renaming then setting flags, it's simpler to just change both at the same time via --rename-section. Adding the load flag is required for GNU objcopy to mark .rodata Type as PROGBITS after the rename. This can be verified with: $ readelf -S drivers/misc/lkdtm/rodata_objcopy.o ... Section Headers: [Nr] Name Type Address Offset Size EntSize Flags Link Info Align ... [ 1] .rodata PROGBITS 0000000000000000 00000040 0000000000000004 0000000000000000 A 0 0 4 ... Which shows that .text is now renamed .rodata, the alloc flag A is set, the type is PROGBITS, and the section is not flagged as writeable W. Cc: stable@vger.kernel.org Link: https://sourceware.org/bugzilla/show_bug.cgi?id=24554 Link: https://github.com/ClangBuiltLinux/linux/issues/448 Reported-by: Nathan Chancellor Suggested-by: Alan Modra Suggested-by: Jordan Rupprect Suggested-by: Kees Cook Acked-by: Kees Cook Reviewed-by: Nathan Chancellor Signed-off-by: Nick Desaulniers Signed-off-by: Greg Kroah-Hartman drivers/misc/lkdtm/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 3856032a0628e6b94badb9131a706dda185e071d Author: Mariusz Bialonczyk Date: Wed May 22 12:40:53 2019 +0200 w1: ds2413: when the slave is not responding during read, select it again The protocol is not allowing to obtain a byte of 0xff for PIO_ACCESS_READ call. It is very likely that the slave was not addressed properly and it is just not respoding (leaving the bus in logic high state) during the read of sampled PIO value. We cannot just call w1_reset_resume_command() because the problem will persist, instead try selecting (addressing) the slave again. Signed-off-by: Mariusz Bialonczyk Signed-off-by: Greg Kroah-Hartman drivers/w1/slaves/w1_ds2413.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit c50d09a86172073f55ebac0b92ad5a75907d64e7 Author: Mariusz Bialonczyk Date: Mon May 20 09:05:56 2019 +0200 w1: ds2413: add retry support to state_read() The state_read() was calling PIO_ACCESS_READ once and bail out if it failed for this first time. This commit is improving this to trying more times before it give up, similarly as the write call is currently doing. Signed-off-by: Mariusz Bialonczyk Signed-off-by: Greg Kroah-Hartman drivers/w1/slaves/w1_ds2413.c | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) commit ae2ee27aa985232f66421d7cd1c7f4b87c7dba7d Author: Mariusz Bialonczyk Date: Mon May 20 09:05:55 2019 +0200 w1: ds2413: output_write() cosmetic fixes / simplify Make the output_write simpler. Based on Jean-Francois Dagenais code from: 49695ac46861 ("w1: ds2408: reset on output_write retry with readback") Signed-off-by: Mariusz Bialonczyk Signed-off-by: Greg Kroah-Hartman drivers/w1/slaves/w1_ds2413.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit b576ff902f8a050eb5b5ba9a016cb9212f730b05 Author: Andrey Grodzovsky Date: Wed May 22 09:57:23 2019 -0400 drm/sched: Fix static checker warning for potential NULL ptr Reviewed-by: Christian König Signed-off-by: Andrey Grodzovsky Signed-off-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/1558533443-7795-1-git-send-email-andrey.grodzovsky@amd.com drivers/gpu/drm/scheduler/sched_main.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit ae29783d3333b828cdc3f9276e110db1a2f7cc4c Author: Nadav Amit Date: Thu Apr 25 04:54:45 2019 -0700 vmw_balloon: Split refused pages The hypervisor might refuse to inflate pages. While the balloon driver handles this scenario correctly, a refusal to inflate a 2MB pages might cause the same page to be allocated again later just for its inflation to be refused again. This wastes energy and time. To avoid this situation, split the 2MB page to 4KB pages, and then try to inflate each one individually. Most of the 4KB pages out of the 2MB should be inflated successfully, and the balloon is likely to prevent the scenario of repeated refused inflation. Reviewed-by: Xavier Deguillard Signed-off-by: Nadav Amit Signed-off-by: Greg Kroah-Hartman drivers/misc/vmw_balloon.c | 63 ++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 52 insertions(+), 11 deletions(-) commit 5d1a86ecf328586fbedf7b66595ac3c7039eb8c8 Author: Nadav Amit Date: Thu Apr 25 04:54:44 2019 -0700 vmw_balloon: Add memory shrinker Add a shrinker to the VMware balloon to prevent out-of-memory events. We reuse the deflate logic for this matter. Deadlocks should not happen, as no memory allocation is performed while the locks of the communication (batch/page) and page-list are taken. In the unlikely event in which the configuration semaphore is taken for write we bail out and fail gracefully (causing processes to be killed). Once the shrinker is called, inflation is postponed for few seconds. The timeout is updated without any lock, but this should not cause any races, as it is written and read atomically. This feature is disabled by default, since it might cause performance degradation. Reviewed-by: Xavier Deguillard Signed-off-by: Nadav Amit Signed-off-by: Greg Kroah-Hartman drivers/misc/vmw_balloon.c | 133 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 131 insertions(+), 2 deletions(-) commit 83a8afa72e9c0a200d9d400ce83a0cb5193b0e3d Author: Nadav Amit Date: Thu Apr 25 04:54:43 2019 -0700 vmw_balloon: Compaction support Add support for compaction for VMware balloon. Since unlike the virtio balloon, we also support huge-pages, which are not going through compaction, we keep these pages in vmballoon and handle this list separately. We use the same lock to protect both lists, as this lock is not supposed to be contended. Doing so also eliminates the need for the page_size lists. We update the accounting as needed to reflect inflation, deflation and migration to be reflected in vmstat. Since VMware balloon now provides statistics for inflation, deflation and migration in vmstat, select MEMORY_BALLOON in Kconfig. Reviewed-by: Xavier Deguillard Signed-off-by: Nadav Amit Signed-off-by: Greg Kroah-Hartman drivers/misc/Kconfig | 1 + drivers/misc/vmw_balloon.c | 301 +++++++++++++++++++++++++++++++++++++++------ 2 files changed, 264 insertions(+), 38 deletions(-) commit 418a3ab1e7785799193c0f8628cd0f01c00a03ae Author: Nadav Amit Date: Thu Apr 25 04:54:42 2019 -0700 mm/balloon_compaction: List interfaces Introduce interfaces for ballooning enqueueing and dequeueing of a list of pages. These interfaces reduce the overhead of storing and restoring IRQs by batching the operations. In addition they do not panic if the list of pages is empty. Cc: Jason Wang Cc: linux-mm@kvack.org Cc: virtualization@lists.linux-foundation.org Acked-by: Michael S. Tsirkin Reviewed-by: Xavier Deguillard Signed-off-by: Nadav Amit Signed-off-by: Greg Kroah-Hartman include/linux/balloon_compaction.h | 4 ++ mm/balloon_compaction.c | 144 +++++++++++++++++++++++++++---------- 2 files changed, 110 insertions(+), 38 deletions(-) commit 687685a3f246756a2a8c0d45820be42066ffce05 Author: Naveen Kumar Parna Date: Fri May 17 10:20:07 2019 +0530 bsr: "foo * bar" should be "foo *bar" Fixed the checkpatch error. Used "foo *bar" instead of "foo * bar" Signed-off-by: Naveen Kumar Parna Signed-off-by: Greg Kroah-Hartman drivers/char/bsr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7256d7f401bdc9d3bd37c5de5f9b5f4f7e2de511 Author: Naveen Kumar Parna Date: Wed May 15 21:47:46 2019 +0530 bsr: do not use assignment in if condition checkpatch.pl does not like assignment in if condition Signed-off-by: Naveen Kumar Parna Reviewed-by: Mukesh Ojha Signed-off-by: Greg Kroah-Hartman drivers/char/bsr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9f1f1a2dab38d4ce87a13565cf4dc1b73bef3a5f Author: Gen Zhang Date: Fri May 24 10:32:22 2019 +0800 drm/edid: Fix a missing-check bug in drm_load_edid_firmware() In drm_load_edid_firmware(), fwstr is allocated by kstrdup(). And fwstr is dereferenced in the following codes. However, memory allocation functions such as kstrdup() may fail and returns NULL. Dereferencing this null pointer may cause the kernel go wrong. Thus we should check this kstrdup() operation. Further, if kstrdup() returns NULL, we should return ERR_PTR(-ENOMEM) to the caller site. Signed-off-by: Gen Zhang Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190524023222.GA5302@zhanggen-UX430UQ drivers/gpu/drm/drm_edid_load.c | 2 ++ 1 file changed, 2 insertions(+) commit 74abc2210e105f0fffe59c35d2329201f1b4310e Author: Tom St Denis Date: Fri May 24 09:21:54 2019 -0400 drm/amd/doc: Add RAS documentation to guide Acked-by: Slava Abramov Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Documentation/gpu/amdgpu.rst | 11 +++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) commit 1c1e53f7f2ce191e6787d3d0648fe8ce7088ceaa Author: Tom St Denis Date: Fri May 24 09:15:17 2019 -0400 drm/amd/doc: Add XGMI sysfs documentation Acked-by: Slava Abramov Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Documentation/gpu/amdgpu.rst | 9 +++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 28 ++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) commit f1e5e913028669c2bbac6664b8f01cb124349692 Author: Yogesh Mohan Marimuthu Date: Fri May 17 15:46:58 2019 +0530 drm/amdgpu: sort probed modes before adding common modes [Why] There are monitors which can have more than one preferred mode set. There are chances in these monitors that if common modes are added in function amdgpu_dm_connector_add_common_modes(), these common modes can be calculated with different preferred mode than the one used in function decide_crtc_timing_for_drm_display_mode(). The preferred mode can be different because after common modes are added, the mode list is sorted and this changes the order of preferred modes in the list. The first mode in the list with preferred flag set is selected as preferred mode. Due to this the preferred mode selected varies. If same preferred mode is not selected in common mode calculation and crtc timing, then during mode set instead of setting preferred timing, common mode timing will be applied which can cause "out of range" message in the monitor with monitor blanking out. [How] Sort the modes before adding common modes. The same sorting function is called during common mode addition and deciding crtc timing. Signed-off-by: Yogesh Mohan Marimuthu Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit c0a74c732568ad347f7b3de281922808dab30504 Author: Jani Nikula Date: Fri May 24 20:35:22 2019 +0300 drm/i915: Update DRIVER_DATE to 20190524 Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_drv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 42ba01fc30e6f84e7433879052474e716237ab33 Author: Nicholas Kazlauskas Date: Wed May 22 12:00:55 2019 -0400 drm/amd/display: Use new connector state when getting color depth [Why] The current state on the connector is queried when getting the max bpc rather than the new state. This means that a new max bpc value can only currently take effect on the commit *after* it changes. The new state should be passed in instead. [How] Pass down the dm_state as drm state to where we do color depth lookup. The passed in state can still be NULL when called from amdgpu_dm_connector_mode_valid, so make sure that we have reasonable defaults in place. That should probably be addressed at some point. This change now (correctly) causes a modeset to occur when changing the max bpc for a connector. v2: Drop extra TODO. Cc: Leo Li Cc: Harry Wentland Signed-off-by: Nicholas Kazlauskas Acked-by: Alex Deucher Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 27 +++++++++++++---------- 1 file changed, 15 insertions(+), 12 deletions(-) commit 1825fd34e8ed026911c6de6d7be7bd2d1ff8101a Author: Nicholas Kazlauskas Date: Wed May 22 12:00:54 2019 -0400 drm/amd/display: Switch the custom "max bpc" property to the DRM prop [Why] The custom "max bpc" property was added to limit color depth while the DRM one was still being merged. It's been a few kernel versions since then and this TODO was still sticking around. [How] Attach the DRM max bpc property to the connector and drop all of our custom property management. Set the max bpc to 8 by default since DRM defaults to the max in the range which would be 16 in this case. No behavioral changes are intended with this patch, it should just be a refactor. v2: Don't force 8bpc when no state is given Cc: Leo Li Cc: Harry Wentland Signed-off-by: Nicholas Kazlauskas Acked-by: Alex Deucher Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 4 ---- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 2 -- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 29 ++++++++++------------- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 1 - 4 files changed, 12 insertions(+), 24 deletions(-) commit a7517677085413ff69d0c9038b0aadc2e7954143 Author: Chengming Gui Date: Tue May 21 15:57:21 2019 +0800 drm/amd/powerplay: Fix code error for translating int type to bool type correctly Fix code error to support value < 0 or > 1. Signed-off-by: Chengming Gui Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fb2dbfd2427e82ae63742f667cda19f1af6b77c2 Author: Kent Russell Date: Wed May 15 08:35:29 2019 -0400 drm/amdgpu: Add Unique Identifier sysfs file unique_id v2 Add a file that provides a Unique ID for the GPU. This will persist across machines and is guaranteed to be unique. This is only available for GFX9 and newer, so older ASICs will not have this file in the sysfs pool v2: Store it in adev for ASICs that don't have a hwmgr Reviewed-by: Alex Deucher Signed-off-by: Kent Russell Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 32 ++++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 9 ++++++ drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c | 10 +++++++ drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 10 +++++++ 5 files changed, 63 insertions(+) commit 460960587ae80802c76384b0580ed9c89e6e4bb7 Author: Amber Lin Date: Thu Feb 14 16:02:26 2019 -0500 drm/amdkfd: Add domain number into gpu_id A multi-socket server can have multiple PCIe segments so BFD is not enough to distingush each GPU. Also add domain number into account when generating gpu_id. Signed-off-by: Amber Lin Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit ed81cd6e0e9f37c6aca6d96194307b995f3b5f30 Author: Kent Russell Date: Thu Mar 21 08:08:17 2019 -0400 drm/amdkfd: Add VegaM support Add the VegaM information to KFD Signed-off-by: Kent Russell Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 5 +++++ drivers/gpu/drm/amd/amdkfd/kfd_device.c | 20 ++++++++++++++++++++ .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 1 + drivers/gpu/drm/amd/amdkfd/kfd_flat_memory.c | 1 + drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c | 1 + drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c | 1 + drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 1 + 7 files changed, 30 insertions(+) commit 32cce8bc86032cc0c24086d6ce3ccf8e05e686cf Author: Felix Kuehling Date: Tue Apr 23 23:32:56 2019 -0400 drm/amdkfd: Fix a circular lock dependency Fix a circular lock dependency exposed under userptr memory pressure. The DQM lock is the only one taken inside the MMU notifier. We need to make sure that no reclaim is done under this lock, and that no other locks are taken under which reclaim is possible. Signed-off-by: Felix Kuehling Reviewed-by: Philip Yang Signed-off-by: Alex Deucher .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 33 +++++++++++++++++++--- 1 file changed, 29 insertions(+), 4 deletions(-) commit 16631afff224475134124fb1982ba80365ec5640 Author: Oak Zeng Date: Thu Feb 14 10:25:42 2019 -0600 drm/amdkfd: Delete alloc_format field from map_queue struct Alloc format was never really supported by MEC FW. FW always does one per pipe allocation. Signed-off-by: Oak Zeng Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue_v9.c | 2 -- drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue_vi.c | 2 -- drivers/gpu/drm/amd/amdkfd/kfd_pm4_headers_ai.h | 7 +------ drivers/gpu/drm/amd/amdkfd/kfd_pm4_headers_vi.h | 7 +------ 4 files changed, 2 insertions(+), 16 deletions(-) commit 14568cf6583e9d82ee21129293dda68ef6a7af9e Author: Oak Zeng Date: Fri Feb 8 10:56:42 2019 -0600 drm/amdkfd: Expose sdma engine numbers to topology Expose available numbers of both SDMA queue types in the topology. Signed-off-by: Oak Zeng Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 7 +++++++ drivers/gpu/drm/amd/amdkfd/kfd_topology.h | 2 ++ 2 files changed, 9 insertions(+) commit 1b4670f6983156526c286723465fdf805070b45d Author: Oak Zeng Date: Thu Feb 7 14:02:27 2019 -0600 drm/amdkfd: Introduce XGMI SDMA queue type Existing QUEUE_TYPE_SDMA means PCIe optimized SDMA queues. Introduce a new QUEUE_TYPE_SDMA_XGMI, which is optimized for non-PCIe transfer such as XGMI. Signed-off-by: Oak Zeng Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 2 + drivers/gpu/drm/amd/amdkfd/kfd_device.c | 15 +++ .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 123 +++++++++++++++------ .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.h | 3 + drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue_v9.c | 2 + drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue_vi.c | 2 + drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c | 3 +- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 4 +- .../gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 10 +- include/uapi/linux/kfd_ioctl.h | 7 +- 10 files changed, 132 insertions(+), 39 deletions(-) commit 065e4bdfa1f3ab2884c110394d8b7e7ebe3b988c Author: Oak Zeng Date: Fri Feb 8 15:44:35 2019 -0600 drm/amdkfd: Fix sdma queue map issue Previous codes assumes there are two sdma engines. This is not true e.g., Raven only has 1 SDMA engine. Fix the issue by using sdma engine number info in device_info. Signed-off-by: Oak Zeng Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) commit e78579aab7c3e112b85bf92d76432b917c841b5b Author: Yong Zhao Date: Mon Jan 14 17:36:26 2019 -0500 drm/amdkfd: Move sdma_queue_id calculation into allocate_sdma_queue() This avoids duplicated code. Signed-off-by: Yong Zhao Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 29 ++++++++-------------- 1 file changed, 11 insertions(+), 18 deletions(-) commit 0803e7a9e850f9d6397c594d6c6deac9b2b6d696 Author: Oak Zeng Date: Tue Nov 27 23:50:12 2018 -0600 drm/amdkfd: Allocate hiq and sdma mqd from mqd trunk Instead of allocat hiq and sdma mqd from sub-allocator, allocate them from a mqd trunk pool. This is done for all asics Signed-off-by: Oak Zeng Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.c | 49 ++++++++++++++++++++++++ drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.h | 7 ++++ drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c | 20 ++++------ drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c | 22 ++++------- drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c | 22 ++++------- 5 files changed, 80 insertions(+), 40 deletions(-) commit d1f8f0d17d40f05d45c6c15b8fabbec978d92380 Author: Oak Zeng Date: Tue Nov 27 22:55:50 2018 -0600 drm/amdkfd: Move non-sdma mqd allocation out of init_mqd This is preparation work to introduce more mqd allocation scheme Signed-off-by: Oak Zeng Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c | 20 ++++++++-- drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c | 51 +++++++++++++++--------- drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c | 18 +++++++-- 3 files changed, 64 insertions(+), 25 deletions(-) commit e73390d181103a19e1111ec2f25559a0570e9fe0 Author: Oak Zeng Date: Tue Nov 27 22:08:25 2018 -0600 drm/amdkfd: Fix a potential memory leak Free mqd_mem_obj it GTT buffer allocation for MQD+control stack fails. Signed-off-by: Oak Zeng Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 11614c36bc8f4fd22ff91e6150ac63e8bfce33b5 Author: Oak Zeng Date: Tue Nov 27 21:58:54 2018 -0600 drm/amdkfd: Allocate MQD trunk for HIQ and SDMA MEC FW for some new asic requires all SDMA MQDs to be in a continuous trunk of memory right after HIQ MQD. Add a field in device queue manager to hold the HIQ/SDMA MQD memory object and allocate MQD trunk on device queue manager initialization. Signed-off-by: Oak Zeng Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 32 ++++++++++++++++++++++ .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.h | 1 + 2 files changed, 33 insertions(+) commit 6c6cde557a8ee2400b169b37ec146cb67518befd Author: Oak Zeng Date: Wed Dec 5 10:56:41 2018 -0600 drm/amdkfd: Add mqd size in mqd manager struct Also initialize mqd size on mqd manager initialization Signed-off-by: Oak Zeng Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.h | 1 + drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c | 4 ++++ drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c | 4 ++++ drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c | 4 ++++ 4 files changed, 13 insertions(+) commit fdfa090bc90f34543b8efd05b05a143ae6d52406 Author: Oak Zeng Date: Wed Dec 5 10:15:27 2018 -0600 drm/amdkfd: Init mqd managers in device queue manager init Previously mqd managers was initialized on demand. As there are only a few type of mqd managers, the on demand initialization doesn't save too much memory. Initialize them on device queue initialization instead and delete the get_mqd_manager interface. This makes codes more organized for future changes. Signed-off-by: Oak Zeng Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 127 +++++++-------------- .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.h | 6 - drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c | 6 +- .../gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 3 +- 4 files changed, 47 insertions(+), 95 deletions(-) commit 59f650a06f8f530e2412e5c47106cd8b8895bd89 Author: Oak Zeng Date: Mon Dec 3 20:38:43 2018 -0600 drm/amdkfd: Introduce DIQ type mqd manager With introduction of new mqd allocation scheme for HIQ, DIQ and HIQ use different mqd allocation scheme, DIQ can't reuse HIQ mqd manager Signed-off-by: Oak Zeng Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c | 3 +++ drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c | 11 +++++++++++ drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c | 11 +++++++++++ drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c | 11 +++++++++++ drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 1 + drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 1 - 6 files changed, 37 insertions(+), 1 deletion(-) commit 972fcdb52fe865a2f639e3200b97e648f34a0f41 Author: Oak Zeng Date: Mon Dec 3 13:56:14 2018 -0600 drm/amdkfd: Introduce asic-specific mqd_manager_init function Global function mqd_manager_init just calls asic-specific functions and it is not necessary. Delete it and introduce a mqd_manager_init interface in dqm for asic-specific mqd manager init. Call mqd_manager_init interface directly to initialize mqd manager Signed-off-by: Oak Zeng Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 2 +- .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.h | 2 ++ .../drm/amd/amdkfd/kfd_device_queue_manager_cik.c | 2 ++ .../drm/amd/amdkfd/kfd_device_queue_manager_v9.c | 1 + .../drm/amd/amdkfd/kfd_device_queue_manager_vi.c | 2 ++ drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.c | 29 ---------------------- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 2 -- 7 files changed, 8 insertions(+), 32 deletions(-) commit 1986a3b022bee7ad34d0c539b32a81575bf3c9a3 Author: Felix Kuehling Date: Tue May 7 17:46:14 2019 -0400 drm/amdgpu: Improve error handling for HMM Use unsigned long for number of pages. Check that pfns are valid after hmm_vma_fault. If they are not, return an error instead of continuing with invalid page pointers and PTEs. Signed-off-by: Felix Kuehling Reviewed-by: Philip Yang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) commit b9c5eb5b801a76df47e12a5754dcc1d3c4b34625 Author: Philip Yang Date: Mon Mar 4 10:37:55 2019 -0500 drm/amdgpu: more descriptive message if HMM not enabled If using old kernel config file, CONFIG_ZONE_DEVICE is not selected, so CONFIG_HMM and CONFIG_HMM_MIRROR is not enabled, the current driver error message "Failed to register MMU notifier" is not clear. Inform user with more descriptive message on how to fix the missing kernel config option. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109808 Signed-off-by: Philip Yang Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_mn.h | 2 ++ 1 file changed, 2 insertions(+) commit 6826cb3b92a3ae1f696334f2069391642f8caf9f Author: Philip Yang Date: Mon Mar 4 14:41:03 2019 -0500 drm/amdgpu: support userptr cross VMAs case with HMM userptr may cross two VMAs if the forked child process (not call exec after fork) malloc buffer, then free it, and then malloc larger size buf, kerenl will create new VMA adjacent to old VMA which was cloned from parent process, some pages of userptr are in the first VMA, the rest pages are in the second VMA. HMM expects range only have one VMA, loop over all VMAs in the address range, create multiple ranges to handle this case. See is_mergeable_anon_vma in mm/mmap.c for details. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 126 +++++++++++++++++++++++--------- 1 file changed, 91 insertions(+), 35 deletions(-) commit 6c55d6e90e68a4789cbd72a0287026d4dfb4a9f9 Author: Philip Yang Date: Mon Mar 4 14:10:12 2019 -0500 drm/amdkfd: support concurrent userptr update for HMM Userptr restore may have concurrent userptr invalidation after hmm_vma_fault adds the range to the hmm->ranges list, needs call hmm_vma_range_done to remove the range from hmm->ranges list first, then reschedule the restore worker. Otherwise hmm_vma_fault will add same range to the list, this will cause loop in the list because range->next point to range itself. Add function untrack_invalid_user_pages to reduce code duplication. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 25 ++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) commit ad595b8634f36f04bf69bef4eff854091d94f8b3 Author: Philip Yang Date: Thu Feb 21 12:39:21 2019 -0500 drm/amdgpu: fix HMM config dependency issue Only select HMM_MIRROR will get kernel config dependency warnings if CONFIG_HMM is missing in the config. Add depends on HMM will solve the issue. Add conditional compilation to fix compilation errors if HMM_MIRROR is not enabled as HMM config is not enabled. Remove unused function amdgpu_ttm_tt_mark_user_pages. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Kconfig | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 29 ++++++----------------------- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 13 ++++++++++++- 3 files changed, 19 insertions(+), 24 deletions(-) commit 899fbde1464639e3d12eaffdad8481a59b367fcb Author: Philip Yang Date: Thu Dec 13 15:35:28 2018 -0500 drm/amdgpu: replace get_user_pages with HMM mirror helpers Use HMM helper function hmm_vma_fault() to get physical pages backing userptr and start CPU page table update track of those pages. Then use hmm_vma_range_done() to check if those pages are updated before amdgpu_cs_submit for gfx or before user queues are resumed for kfd. If userptr pages are updated, for gfx, amdgpu_cs_ioctl will restart from scratch, for kfd, restore worker is rescheduled to retry. HMM simplify the CPU page table concurrent update check, so remove guptasklock, mmu_invalidations, last_set_pages fields from amdgpu_ttm_tt struct. HMM does not pin the page (increase page ref count), so remove related operations like release_pages(), put_page(), mark_page_dirty(). Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 95 ++++-------- drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.h | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 138 +++++++----------- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 14 +- drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c | 25 +++- drivers/gpu/drm/amd/amdgpu/amdgpu_mn.h | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 178 +++++++++-------------- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 3 +- 9 files changed, 182 insertions(+), 278 deletions(-) commit 89cd9d23e9a74d94f0db5bbbaf2ef1f6ede36ae5 Author: Philip Yang Date: Wed Dec 5 14:03:43 2018 -0500 drm/amdkfd: avoid HMM change cause circular lock There is circular lock between gfx and kfd path with HMM change: lock(dqm) -> bo::reserve -> amdgpu_mn_lock To avoid this, move init/unint_mqd() out of lock(dqm), to remove nested locking between mmap_sem and bo::reserve. The locking order is: bo::reserve -> amdgpu_mn_lock(p->mn) Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Acked-by: Christian König Signed-off-by: Alex Deucher .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 32 ++++++++++++---------- 1 file changed, 17 insertions(+), 15 deletions(-) commit 2c5a51f57042f9d686d72b96a41eb81dbfb86a64 Author: Philip Yang Date: Mon Jul 23 17:45:46 2018 -0400 drm/amdgpu: use HMM callback to replace mmu notifier Replace our MMU notifier with hmm_mirror_ops.sync_cpu_device_pagetables callback. Enable CONFIG_HMM and CONFIG_HMM_MIRROR as a dependency in DRM_AMDGPU_USERPTR Kconfig. It supports both KFD userptr and gfx userptr paths. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Kconfig | 6 +- drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c | 160 ++++++++++++++------------------- drivers/gpu/drm/amd/amdgpu/amdgpu_mn.h | 2 +- 4 files changed, 72 insertions(+), 98 deletions(-) commit e14ba95b908f049dc98915e3452705dec5e506c6 Author: shaoyunl Date: Thu Oct 25 15:40:51 2018 -0400 drm/amdgpu: Use heavy weight for tlb invalidation on xgmi configuration There is a bug found in vml2 xgmi logic: mtype is always sent as NC on the VMC to TC interface for a page walk, regardless of whether the request is being sent to local or remote GPU. NC means non-coherent and will cause the VMC return data to be cached in the TCC (versus UC – uncached will not cache the data). Since the page table updates are being done by SDMA/HDP, then TCC will never be updated and the GC VML2 will continue to hit on the TCC and never get the updated page tables and result in a fault. Heave weigh tlb invalidation does a WB/INVAL of the L1/L2 GL data caches so TCC will not be hit on next request Signed-off-by: shaoyunl Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c | 53 +++++++++++------------ 1 file changed, 26 insertions(+), 27 deletions(-) commit fa722f0d9820a84952a3cbaccb888c31f9bfca2a Author: Jay Cornwall Date: Tue Apr 2 11:43:30 2019 -0500 drm/amdkfd: Preserve ttmp[4:5] instead of ttmp[14:15] ttmp[4:5] is initialized by the SPI with SPI_GDBG_TRAP_DATA* values. These values are more useful to the debugger than ttmp[14:15], which carries dispatch_scratch_base*. There are too few registers to preserve both. Signed-off-by: Jay Cornwall Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler.h | 466 ++++++++++----------- .../gpu/drm/amd/amdkfd/cwsr_trap_handler_gfx9.asm | 45 +- 2 files changed, 253 insertions(+), 258 deletions(-) commit 58836009015c6e1139f227ce827655b7e9639c2d Author: Jay Cornwall Date: Tue Feb 19 14:51:56 2019 -0600 drm/amdkfd: Fix gfx9 XNACK state save/restore SQ_WAVE_IB_STS.RCNT grew from 4 bits to 5 in gfx9. Do not truncate when saving in the high bits of TTMP1. Signed-off-by: Jay Cornwall Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler.h | 12 ++++++------ drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler_gfx9.asm | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) commit 157e586dc98fcc9c6ec4cefa7d893e3a0992bd1a Author: Jay Cornwall Date: Thu Jan 31 11:38:18 2019 -0600 drm/amdkfd: Preserve wave state after instruction fetch MEM_VIOL If instruction fetch fails the wave cannot be halted and returned to the shader without raising MEM_VIOL again. Currently the wave is terminated if this occurs, but this loses information about the cause of the fault. The debugger would prefer the faulting wave state to be context-saved. Poll inside the trap handler until TRAPSTS.SAVECTX indicates context save is ready. Exit the poll loop and complete the remainder of the exception handler, then return to the shader. The next instruction fetch will be from the trap handler and not the faulting PC. Context save will then deschedule the wave and save its state. Signed-off-by: Jay Cornwall Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler.h | 10 ++++++---- drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler_gfx9.asm | 10 ++++++++-- 2 files changed, 14 insertions(+), 6 deletions(-) commit 2db2f259594ddf3d9d0053c2aa265e6ae48ee6db Author: Jay Cornwall Date: Wed Nov 14 22:23:25 2018 -0600 drm/amdkfd: Fix gfx8 MEM_VIOL exception handler When MEM_VIOL is asserted the context save handler rewinds the program counter. This is incorrect for any source of the exception. MEM_VIOL may be raised in normal operation by out-of-bounds access to LDS or GDS and does not require special handling. Remove PC adjustment when MEM_VIOL has been raised. Signed-off-by: Jay Cornwall Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler.h | 9 ++------- drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler_gfx8.asm | 13 ------------- 2 files changed, 2 insertions(+), 20 deletions(-) commit f756e6319ca07e369494a921b9935eb8625cc40b Author: Harish Kasiviswanathan Date: Fri Jan 25 16:35:35 2019 -0500 drm/amdkfd: Fix compute profile switching Fix compute profile switching on process termination. Add a dedicated reference counter to keep track of entry/exit to/from compute profile. This enables switching compute profiles for other reasons than process creation or termination. Signed-off-by: Harish Kasiviswanathan Signed-off-by: Eric Huang Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_device.c | 16 ++++++++++++++++ drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 11 ++++++----- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 7 +++++++ 3 files changed, 29 insertions(+), 5 deletions(-) commit c6fd980ab154455df62adc89d81898d24654ab72 Author: Oak Zeng Date: Tue Dec 4 16:08:33 2018 -0600 drm/amdkfd: Shift sdma_engine_id and sdma_queue_id in mqd FW of some new ASICs requires sdma mqd size to be not more than 128 dwords. Repurpose the last 2 reserved fields of sdma mqd for driver internal use, so the total mqd size is no bigger than 128 dwords Signed-off-by: Oak Zeng Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/cik_structs.h | 3 +-- drivers/gpu/drm/amd/include/v9_structs.h | 3 +-- drivers/gpu/drm/amd/include/vi_structs.h | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) commit 323c71df9447f277dd151b65711bc9ba51fcc4c0 Author: Oak Zeng Date: Mon Dec 3 09:20:20 2018 -0600 drm/amdkfd: Differentiate b/t sdma_id and sdma_queue_id sdma_queue_id is sdma queue index inside one sdma engine. sdma_id is sdma queue index among all sdma engines. Use those two names properly. Signed-off-by: Oak Zeng Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 96eb5f9dd3d85f3204b271b208b36dfe4df14101 Author: Oak Zeng Date: Thu Nov 8 10:40:41 2018 -0500 drm/amdkfd: Add sdma allocation debug message Add debug messages during SDMA queue allocation. Signed-off-by: Oak Zeng Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 3 +++ 1 file changed, 3 insertions(+) commit cb77ee7cae96c4db5d7dfe127d3e0cf9d6056875 Author: Oak Zeng Date: Thu Nov 1 11:06:25 2018 -0400 drm/amdkfd: Use 64 bit sdma_bitmap Maximumly support 64 sdma queues Signed-off-by: Oak Zeng Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 10 +++++----- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) commit bcae18c2f54252b7278e58da0663ee6b0bda3285 Author: Evan Quan Date: Mon Apr 29 11:35:42 2019 +0800 drm/amd/powerplay: enable ppfeaturemask module parameter support on Vega20 Support DPM/DS/ULV related bitmasks of ppfeaturemask module parameter. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit dbaa922b5706b1aff4572c280e15bbea2d04afe6 Author: Alex Deucher Date: Thu Apr 11 08:58:22 2019 -0500 drm/amdgpu: use pcie_bandwidth_available rather than open coding it It does the same thing we were doing already. I though it needed work for gen3/4 speeds, but that seems to be covered already. Reviewed-by: Evan Quan Acked-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 41 ++---------------------------- 1 file changed, 2 insertions(+), 39 deletions(-) commit 5208e6a3b25d0fe7acd812957b4a5e745b86e957 Author: Weitao Hou Date: Sat May 18 21:41:41 2019 +0800 gpu: fix typos in code comments fix eror to error Signed-off-by: Weitao Hou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 17a839135f7356d9e1cff653ea861b1b890c9d6c Author: Evan Quan Date: Fri May 17 13:39:36 2019 +0800 drm/amd/powerplay: fix sw SMU wrong UVD/VCE powergate setting The UVD/VCE bits are set wrongly. This causes the UVD/VCE clocks are not brought back correctly on needed. Signed-off-by: Evan Quan Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit d6ee400e793f0ae6c9f5926bea9fbb362a950d96 Author: Slava Abramov Date: Thu May 16 16:17:53 2019 -0400 drm/amdgpu: use div64_ul for 32-bit compatibility v1 v1: replace casting to unsigned long with div64_ul Acked-by: Alex Deucher Signed-off-by: Slava Abramov Tested-by: Slava Abramov Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a254bfa2c5fbd46165010cd6c29a4ad7638b8772 Author: Chengming Gui Date: Wed May 8 14:38:55 2019 +0800 drm/amd/powerplay: Enable "disable dpm" feature to support swSMU debug (v2) add pm_enabled to control the dpm off/on. v2: Directly return 0 to replace return ret and merge some check code. Signed-off-by: Chengming Gui Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 24 +++++++++++++++--- drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 1 + drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 34 ++++++++++++++++++++++---- 3 files changed, 51 insertions(+), 8 deletions(-) commit 1b9557fcaa42a45920821b0c6455088bb341f477 Author: Bhawanpreet Lakha Date: Wed May 15 16:17:05 2019 -0400 drm/amd/powerplay: Fix maybe-uninitialized in get_ppfeature_status This fixes the warning below error: ‘feature_mask’ may be used uninitialized in this function [-Werror=maybe-uninitialized] *features_enabled = ((((uint64_t)feature_mask[0] << SMU_FEATURES_LOW_SHIFT) & SMU_FEATURES_LOW_MASK) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ (((uint64_t)feature_mask[1] << SMU_FEATURES_HIGH_SHIFT) & SMU_FEATURES_HIGH_MASK)); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Reviewed-by: Alex Deucher Signed-off-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e70a26b303d5b31a5d467eb7e0573302babc5cb7 Author: Colin Ian King Date: Fri May 10 08:07:34 2019 +0100 drm/amdgpu: fix spelling mistake "retrived" -> "retrieved" There is a spelling mistake in a DRM_ERROR error message. Fix this. Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/df_v3_6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e74609cb425371cf6a5baba0a76073b3be34625f Author: Alex Deucher Date: Wed May 15 13:53:14 2019 -0500 drm/amdgpu/vega20: use mode1 reset for RAS and XGMI If RAS or XGMI are enabled, you have to use mode1 reset rather than BACO. Reviewed-by: Andrey Grodzovsky Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc15.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 0cd8afaef19927803b7bb0808e09d59a3e405505 Author: Aric Cyr Date: Mon May 6 10:16:12 2019 -0400 drm/amd/display: 3.2.31 Signed-off-by: Aric Cyr Reviewed-by: Aric Cyr Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1090d58d4815b1fcd95a80987391006c86398b4c Author: Paul Hsieh Date: Fri May 3 23:50:10 2019 +0800 drm/amd/display: Disable ABM before destroy ABM struct [Why] When disable driver, OS will set backlight optimization then do stop device. But this flag will cause driver to enable ABM when driver disabled. [How] Send ABM disable command before destroy ABM construct Signed-off-by: Paul Hsieh Reviewed-by: Anthony Koo Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_abm.c | 2 ++ 1 file changed, 2 insertions(+) commit ccd76ebce4e8e1e19df19bc7024355a1f82a9363 Author: Jun Lei Date: Tue Apr 30 16:22:38 2019 -0400 drm/amd/display: dont set otg offset move the update of otg instance outside of hw programming logic, since this is sw state, it should always be updated and should never be optimized away. Signed-off-by: Jun Lei Reviewed-by: Eric Yang Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 4 ---- 1 file changed, 4 deletions(-) commit aa5fdb1ab5b6559ce6ebe11dd78177c8487f02e0 Author: Nicholas Kazlauskas Date: Thu May 2 13:21:48 2019 -0400 drm/amd/display: Explicitly specify update type per plane info change [Why] The bit for flip addr is being set causing the determination for FAST vs MEDIUM to always return MEDIUM when plane info is provided as a surface update. This causes extreme stuttering for the typical atomic update path on Linux. [How] Don't use update_flags->raw for determining FAST vs MEDIUM. It's too fragile to changes like this. Explicitly specify the update type per update flag instead. It's not as clever as checking the bits itself but at least it's correct. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Harry Wentland Acked-by: Bhawanpreet Lakha Acked-by: Eryk Brol Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 68 +++++++++++++++++++++----------- 1 file changed, 44 insertions(+), 24 deletions(-) commit a634913ed24aaef9389be17d87dd215529f81f35 Author: Joshua Aberback Date: Thu May 2 17:32:14 2019 -0400 drm/amd/display: Rename EDID_BLOCK_SIZE to DC_EDID_BLOCK_SIZE Signed-off-by: Joshua Aberback Reviewed-by: Abdoulaye Berthe Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 6 +++--- drivers/gpu/drm/amd/display/dc/dc_types.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit b33171ccaabeffa40df9744656d8d523ceb2b612 Author: Aric Cyr Date: Wed May 1 17:05:05 2019 -0400 drm/amd/display: Use VCP for extended colorimetry DPRX should send the VCP extended colorimetry packet if the sink supports DPCD rev1.4 and reports the extended colorimetry bit. Signed-off-by: Aric Cyr Reviewed-by: Anthony Koo Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/modules/info_packet/info_packet.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2da4605dce38b84cd2e5b86686f43adae1b2cacb Author: Wesley Chalmers Date: Wed Apr 24 15:29:06 2019 -0400 drm/amd/display: Use DCN functions instead of DCE [WHY] DCN code should make as few references to DCE as possible [HOW] Copy DCE110 implementation of find_first_free_match_stream_enc_for_link into DCN10 Signed-off-by: Wesley Chalmers Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 34 +++++++++++++++++++++- .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.h | 5 ++++ 2 files changed, 38 insertions(+), 1 deletion(-) commit 78cc70b1e47d660207dabf75ca2751fc1e4edf84 Author: Wesley Chalmers Date: Wed Apr 24 15:25:41 2019 -0400 drm/amd/display: Engine-specific encoder allocation [WHY] From DCE110 onward, we have the ability to assign DIG BE and FE separately for any display connector type; before, we could only do this for DP. Signed-off-by: Wesley Chalmers Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 42 +-------------------- .../drm/amd/display/dc/dce100/dce100_resource.c | 44 +++++++++++++++++++++- .../drm/amd/display/dc/dce100/dce100_resource.h | 5 +++ .../drm/amd/display/dc/dce110/dce110_resource.c | 35 ++++++++++++++++- .../drm/amd/display/dc/dce110/dce110_resource.h | 5 +++ .../drm/amd/display/dc/dce112/dce112_resource.c | 3 +- .../drm/amd/display/dc/dce120/dce120_resource.c | 3 +- .../gpu/drm/amd/display/dc/dce80/dce80_resource.c | 3 +- .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 3 +- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 5 +++ 10 files changed, 101 insertions(+), 47 deletions(-) commit eed928dcd83ee8c80fa05013bbc019bc9e9e2a0e Author: Charlene Liu Date: Mon Apr 29 14:35:01 2019 -0400 drm/amd/display: enabling stream after HPD low to high happened [Why] 1. No real HPD plug in/out but HPD happens, the driver notifies OS connection changed. 2. No display in target. When HPD goes low to high, the driver should regard as HPD and enter setmode flow. [How] In this case, even stream didn't change but still retrain. Signed-off-by: Chiawen Huang Signed-off-by: Charlene Liu Reviewed-by: Tony Cheng Acked-by: Anthony Koo Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 3 +++ drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 4 ++++ drivers/gpu/drm/amd/display/dc/dc_link.h | 1 + drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 4 +++- 4 files changed, 11 insertions(+), 1 deletion(-) commit 6476a7c8f03156883bb52605fb84a8ec0147849f Author: Joshua Aberback Date: Mon Apr 29 17:21:19 2019 -0400 drm/amd/display: Program VTG params after programming Global Sync [Why] VTG has a parameter FP2, which is defined as: if VSTARTUP is before VSYNC: FP2 = number of lines in between VSTARTUP and VSYNC else FP2 = 0 Currently, FP2 is only programmed during "program_timing". However, the position of VSTARTUP is affected by the prefetching requirements on all pipes, so the position might change when we do memory request control on another pipe, so we need to make sure that FP2 stays up-to-date whenever we adjust VSTARTUP. [How] - refactor VTG_CONTROL programming into a new function "set_vtg_params" - call it after calling "program_global_sync" - make sure it's called after because it relies on the cached dlg params Signed-off-by: Joshua Aberback Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Acked-by: Jun Lei Signed-off-by: Alex Deucher .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 3 + drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c | 115 ++++++++++++--------- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.h | 3 + .../drm/amd/display/dc/inc/hw/timing_generator.h | 2 + 4 files changed, 73 insertions(+), 50 deletions(-) commit 24c18794946ad127334138669b2aa204b2e60763 Author: Dmytro Laktyushkin Date: Mon Apr 8 14:56:29 2019 -0400 drm/amd/display: add null checks and set update flags * add plane state null checks * add and set update surface flags Signed-off-by: Dmytro Laktyushkin Reviewed-by: Eric Bernstein Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 6 ++++++ drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 1 - drivers/gpu/drm/amd/display/dc/dc.h | 2 ++ .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 13 +++++-------- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.h | 2 ++ drivers/gpu/drm/amd/display/dc/inc/core_types.h | 20 ++++++++++++++++++++ 6 files changed, 35 insertions(+), 9 deletions(-) commit 5408887141baac0ad1a5e6cf514ceadf33090114 Author: Aric Cyr Date: Sat Apr 27 18:50:43 2019 -0400 drm/amd/display: 3.2.30 Signed-off-by: Aric Cyr Reviewed-by: Aric Cyr Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f62b09b1345eec45392f725efb756aaf21d5fa5c Author: Vitaly Prosyak Date: Thu Apr 18 09:51:12 2019 -0500 drm/amd/display: Reuse MPC OGRAM for 1D blender [Why & How] Reuse existent code path and in order to do that apply de gamma in 1D blender LUT and re use MPC OGAM. Follow up is required. Signed-off-by: Vitaly Prosyak Reviewed-by: Aric Cyr Acked-by: Bhawanpreet Lakha Acked-by: Krunoslav Kovac Acked-by: Vitaly Prosyak Signed-off-by: Alex Deucher .../drm/amd/display/modules/color/color_gamma.c | 56 +++++++++++++++------- .../drm/amd/display/modules/color/color_gamma.h | 1 + 2 files changed, 40 insertions(+), 17 deletions(-) commit be4b289f10ca7ef4272fa0339b167827ba5fd2cd Author: SivapiriyanKumarasamy Date: Wed Apr 24 10:20:15 2019 -0400 drm/amd/display: Remove DPMS state dependency for fast boot [Why] The DPMS state of a display should not impact whether we want to enable fast boot. Currently fast boot is not enabled when resuming from S4 because of this. [How] Remove check for DPMS state when determining if fast boot can be applied. Signed-off-by: SivapiriyanKumarasamy Reviewed-by: Anthony Koo Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher .../amd/display/dc/dce110/dce110_hw_sequencer.c | 85 +++++++++------------- 1 file changed, 35 insertions(+), 50 deletions(-) commit 0880d9ffaea57b3ccaf7f6abecf0f9569d9bc18f Author: Nicholas Kazlauskas Date: Thu Apr 25 12:11:08 2019 -0400 drm/amd/display: Hook up CRC capture support for dce120 [Why] Many IGT tests require CRC capture in order to confirm that the output is visually correct. These skip on dce120 because configure_crc and get_crc aren't set. [How] Hook up is_tg_enabled, configure_crc and get_crc functions on dce120's timing generator. The logic should be the same as DCE and DCN with some minor register naming differences. Signed-off-by: Nicholas Kazlauskas Reviewed-by: David Francis Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher .../display/dc/dce120/dce120_timing_generator.c | 89 ++++++++++++++++++++++ 1 file changed, 89 insertions(+) commit 0623fdb061d8572876efe3b075e37086a3f93e34 Author: Charlene Liu Date: Fri Apr 26 00:29:13 2019 -0400 drm/amd/display: define v_total_min and max parameters add these parameters for future use Signed-off-by: Charlene Liu Reviewed-by: Dmytro Laktyushkin Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/display_mode_structs.h | 5 +++++ 1 file changed, 5 insertions(+) commit 917048d132d736f31b1240d99287b9a2c6e524cd Author: Evan Quan Date: Tue May 14 11:46:27 2019 +0800 drm/amd/powerplay: support sw smu hotspot and memory temperature retrieval Support hotspot and memory temperature retrieval on sw smu routine. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/smu_v11_0.h | 3 ++ drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 74 +++++++++++++++++++++++---- 2 files changed, 66 insertions(+), 11 deletions(-) commit 986b21b8c88d7c2a862e774dd987120b1d8c89ed Author: Evan Quan Date: Tue May 14 10:38:42 2019 +0800 drm/amd/powerplay: support uclk activity retrieve on sw smu routine Support realtime uclk activity report. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 1de888e8fc5931a25a5979d9156154e92e860f24 Author: Evan Quan Date: Mon May 13 17:31:03 2019 +0800 drm/amd/powerplay: honor hw limit on fetching metrics data Request too frequently may get corrupt data. Signed-off-by: Evan Quan Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 3 +++ drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 33 ++++++++++++++++++++++++-- 2 files changed, 34 insertions(+), 2 deletions(-) commit fe75a323713e9ed254c4e3d27b391b2416cee237 Author: Evan Quan Date: Mon May 13 15:32:21 2019 +0800 drm/amd/powerplay: support ppfeatures sysfs interface on sw smu routine Support ppfeatures sysfs interface on Vega20 sw smu routine. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 10 +- drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 7 +- drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 153 +++++++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/vega20_ppt.h | 44 +++++++ 4 files changed, 211 insertions(+), 3 deletions(-) commit e969f29148baee095a6ca5f81e840890578abeac Author: Evan Quan Date: Mon May 13 11:16:27 2019 +0800 drm/amd/powerplay: drop redundant smu call smu_get_clk_info_from_vbios() was called repeatedly. It seems a merge error. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 4 ---- 1 file changed, 4 deletions(-) commit 8667eb64a6b2bad2111361839e91209bd16fe92f Author: Evan Quan Date: Fri May 10 16:56:27 2019 +0800 drm/amd/powerplay: drop unnecessary sw smu check There is already sw smu check on IP block adding. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 18 ------------------ 1 file changed, 18 deletions(-) commit 97df424fe7a7497a129f057527f646c91b881fbf Author: Harry Wentland Date: Tue May 14 09:12:45 2019 -0400 drm/amd/display: Drop DCN1_01 guards [WHY] These were only needed for bringup. They're not needed anymore. Signed-off-by: Harry Wentland Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/Kconfig | 6 ------ .../drm/amd/display/dc/bios/command_table_helper2.c | 5 ----- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 4 ---- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubbub.c | 2 -- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 19 ------------------- drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c | 4 ---- drivers/gpu/drm/amd/display/dc/gpio/hw_translate.c | 5 ----- drivers/gpu/drm/amd/display/include/dal_asic_id.h | 4 ---- drivers/gpu/drm/amd/display/include/dal_types.h | 2 -- 9 files changed, 51 deletions(-) commit a7669aff77649a34b0601aef87879095caed7a5f Author: Harry Wentland Date: Mon Apr 29 09:39:15 2019 -0400 drm/amd/display: Don't load DMCU for Raven 1 (v2) [WHY] Some early Raven boards had a bad SBIOS that doesn't play nicely with the DMCU FW. We thought the issues were fixed by ignoring errors on DMCU load but that doesn't seem to be the case. We've still seen reports of users unable to boot their systems at all. [HOW] Disable DMCU load on Raven 1. Only load it for Raven 2 and Picasso. v2: Fix ifdef (Alex) Signed-off-by: Harry Wentland Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit d7316ddc610f15dac35eab4f9471cf1f45335dc3 Author: Harry Wentland Date: Tue May 14 09:05:37 2019 -0400 drm/amd/display: Add ASICREV_IS_PICASSO [WHY] We only want to load DMCU FW on Picasso and Raven 2, not on Raven 1. Signed-off-by: Harry Wentland Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/display/include/dal_asic_id.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 5bb23532732384e90c876bbd2139fd08644b9847 Author: Ori Messinger Date: Mon Apr 22 13:52:52 2019 -0400 drm/amdgpu: Report firmware versions with sysfs v2 Firmware versions can be found as separate sysfs files at: /sys/class/drm/cardX/device/fw_version (where X is the card number) The firmware versions are displayed in hexadecimal. v2: Moved sysfs files to subfolder Signed-off-by: Ori Messinger Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 63 ++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 2 + 3 files changed, 70 insertions(+) commit 9dc7b02a3ccc78ca59fc20f466a166ca7e30d9e8 Author: Leo Liu Date: Mon May 13 12:41:54 2019 -0400 drm/amdgpu: make VCN DPG pause mode detached from general VCN It should be attached to VCN 1.0 Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 130 +------------------------------ drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 2 + drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 132 +++++++++++++++++++++++++++++++- 3 files changed, 135 insertions(+), 129 deletions(-) commit 05eee12dd60ed5f19fefa93a79bacad9dd2c5883 Author: Leo Liu Date: Mon May 13 12:15:45 2019 -0400 drm/amdgpu: move the VCN DPG mode read and write to VCN Since this is VCN specific and only used by VCN Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 21 +++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/soc15_common.h | 21 --------------------- 2 files changed, 21 insertions(+), 21 deletions(-) commit fe2b5323d2c3cedaa3bf943dc7a0d233c853c914 Author: Tiecheng Zhou Date: Tue May 14 10:03:35 2019 +0800 drm/amdgpu/sriov: Need to initialize the HDP_NONSURFACE_BAStE it requires to initialize HDP_NONSURFACE_BASE, so as to avoid using the value left by a previous VM under sriov scenario. v2: it should not hurt baremetal, generalize it for both sriov and baremetal Signed-off-by: Emily Deng Signed-off-by: Tiecheng Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 3 +++ 1 file changed, 3 insertions(+) commit c3b6c6074166499517e7a298f2cdec26648685a2 Author: Monk Liu Date: Mon May 13 13:57:29 2019 +0800 drm/amdgpu: suppress repeating tmo report only report once per TMO job and the timer would be restarted upon the job finished if it's just slow. Suggested-by: Christian König Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 2 ++ 1 file changed, 2 insertions(+) commit dca29491c37fd9d685bca7da4fbc1f93e7aa552e Author: Christian König Date: Fri May 10 19:56:30 2019 +0200 drm/amdgpu: remove static GDS, GWS and OA allocation As far as we know this was never used by userspace and so should be removed. Signed-off-by: Christian König Reviewed-by: Marek Olšák Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c | 6 ++--- drivers/gpu/drm/amd/amdgpu/amdgpu_gds.h | 21 +++------------- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 11 +++----- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 24 +++--------------- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 32 +++-------------------- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 32 +++-------------------- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 39 ++++++----------------------- 7 files changed, 28 insertions(+), 137 deletions(-) commit 4c6097efa8ab7721ab0c1dc577ca5db68de11203 Author: Evan Quan Date: Wed May 8 14:38:22 2019 +0800 drm/amd/powerplay: update Vega10 ACG Avfs Gb parameters Update Vega10 ACG Avfs GB parameters. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9995ac560bc3f69aaa12e91065b46cfa03e32e56 Author: Evan Quan Date: Wed May 8 13:55:21 2019 +0800 drm/amd/powerplay: force to update all clock tables on OD reset On OD reset, the clock tables in SMU need to be reset to default. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 4 ++++ 1 file changed, 4 insertions(+) commit fc99f2be06c6e1b27cf97529abd6304374b750f7 Author: Evan Quan Date: Tue May 7 12:49:03 2019 +0800 drm/amd/powerplay: update Vega10 power state on OD Update Vega10 top performance level power state accordingly on OD. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+) commit 319dd4764ffdbe580631464ae7674b1c7a001ae0 Author: Evan Quan Date: Mon May 6 16:45:13 2019 +0800 drm/amd/powerplay: avoid repeat AVFS enablement/disablement No need to enable or disable AVFS if it's already in wanted state. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 4 ++++ 1 file changed, 4 insertions(+) commit 36f5f8a74981b857596e7eedd424f4573a81c6e9 Author: Evan Quan Date: Mon May 6 16:37:40 2019 +0800 drm/amd/powerplay: valid Vega10 DPMTABLE_OD_UPDATE_VDDC settings V2 With user specified voltage(DPMTABLE_OD_UPDATE_VDDC), the AVFS will be disabled. However, the buggy code makes this actually not working as expected. - V2: clear all OD flags excpet DPMTABLE_OD_UPDATE_VDDC Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 7d59c41b5150d0641203f91cfcaa0f9af5999cce Author: Evan Quan Date: Tue Apr 30 16:34:20 2019 +0800 drm/amd/powerplay: fix Vega10 mclk/socclk voltage link setup This may affects the Vega10 MCLK OD functionality. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 35 +++++++++++++++------- 1 file changed, 24 insertions(+), 11 deletions(-) commit 742b48aed44b7f347e82d2d5c48f68110731ac78 Author: Leo Liu Date: Wed May 8 11:13:53 2019 -0400 drm/amdgpu: check no_user_fence flag for engines To replace checking ring type and make them generic Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 474612fc7482d4b88c3012a406803ee6a579a52f Author: Leo Liu Date: Wed May 8 11:10:05 2019 -0400 drm/amdgpu/VCN: set no_user_fence flag to true There is no user fence support for VCN Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 3 +++ 1 file changed, 3 insertions(+) commit f61334b556d527be6351a27bfd91eeb370f0ff7e Author: Leo Liu Date: Wed May 8 11:08:58 2019 -0400 drm/amdgpu/VCE: set no_user_fence flag to true There is no user fence support for VCE Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 1 + drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 2 ++ drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 1 + 3 files changed, 4 insertions(+) commit 7ee250b142a3f2b72700ceacfd104543506d2816 Author: Leo Liu Date: Wed May 8 11:07:26 2019 -0400 drm/amdgpu/UVD: set no_user_fence flag to true There is no user fence support for UVD Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 1 + drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c | 1 + drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 3 +++ drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 2 ++ 4 files changed, 7 insertions(+) commit 120c212518c87ba8b07360a2f42ecdd372817b74 Author: Leo Liu Date: Wed May 8 11:05:11 2019 -0400 drm/amdgpu: add no_user_fence flag to ring funcs So we can generalize the no user fence supported engine Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 1 + 1 file changed, 1 insertion(+) commit 777ac3ba3d85e87c0739ccedad0effd1e6e0ac41 Author: xinhui pan Date: Thu May 9 09:00:14 2019 +0800 drm/amdgpu: sdma handle ras resume During S3/S4 bootloader will re-init ras state behind us. Resume might fail or raise a gpu reset. Signed-off-by: xinhui pan Reviewed-by: Alex Deucher Reviewed-by: James Zhu Tested-by: James Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit 2c2fc0cd0bd162dde2a30eafb851ff11b1ecd655 Author: xinhui pan Date: Thu May 9 08:58:56 2019 +0800 drm/amdgpu: gfx handle ras resume During S3/S4 bootloader will re-init ras state behind us. Resume might fail or raise a gpu reset. Signed-off-by: xinhui pan Reviewed-by: Alex Deucher Reviewed-by: James Zhu Tested-by: James Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) commit 6121366b749d037ac5f06df721a1f83dd1cb72ed Author: xinhui pan Date: Thu May 9 08:26:02 2019 +0800 drm/amdgpu: gmc handle ras resume During S3/S4 bootloader will re-init ras state behind us. Resume might fail or raise a gpu reset. Signed-off-by: xinhui pan Reviewed-by: Alex Deucher Reviewed-by: James Zhu Tested-by: James Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit 5e6932fe31624f97e394c4106b4c209db03810d9 Author: xinhui pan Date: Thu May 9 07:32:54 2019 +0800 drm/amdgpu: enable ras suspend/resume suspend/resume will change ras state behind us. Let driver get notified. Signed-off-by: xinhui pan Reviewed-by: Alex Deucher Reviewed-by: James Zhu Tested-by: James Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++++ 1 file changed, 4 insertions(+) commit 511fdbc33aaa4758f7c445183ff840e251c0b427 Author: xinhui pan Date: Thu May 9 08:26:27 2019 +0800 drm/amdgpu: ras support suspend/resume add ras suspend function. rename ras_post_init to amdgpu_ras_resume. Signed-off-by: xinhui pan Reviewed-by: Alex Deucher Reviewed-by: James Zhu Tested-by: James Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 20 +++++++++++++++----- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h | 4 +++- 3 files changed, 20 insertions(+), 8 deletions(-) commit 466b179346094e01deccd051a215fe782b59ca68 Author: xinhui pan Date: Tue May 7 11:53:31 2019 +0800 drm/amdgpu: add badpages sysfs interafce add badpages node. it will output badpages list in format gpu pfn : gpu page size : flags example 0x00000000 : 0x00001000 : R 0x00000001 : 0x00001000 : R 0x00000002 : 0x00001000 : R 0x00000003 : 0x00001000 : R 0x00000004 : 0x00001000 : R 0x00000005 : 0x00001000 : R 0x00000006 : 0x00001000 : R 0x00000007 : 0x00001000 : P 0x00000008 : 0x00001000 : P 0x00000009 : 0x00001000 : P flags can be one of below characters R: reserved. P: pending for reserve. F: failed to reserve for some reasons. Signed-off-by: xinhui pan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 146 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h | 1 + 2 files changed, 147 insertions(+) commit 3058770ae3526ef4fc02afad796a43aee140cd2a Author: James Zhu Date: Wed May 8 16:38:58 2019 -0400 drm/amdgpu: Fix S3 test issue During S3 test, when system wake up and resume, ras interface is already allocated. Move workaround before ras jumps to resume step in gfx_v9_0_ecc_late_init, and make sure workaround applied during resume. Also remove unused mmGB_EDC_MODE clearing. Signed-off-by: James Zhu Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit c5fb351470e81913163aa0e8692434ad09cb00a7 Author: Wang Hai Date: Wed May 8 20:55:16 2019 +0800 drm/amd/display: Make some functions static Fix the following sparse warnings: drivers/gpu/drm/amd/amdgpu/../display/dc/dce120/dce120_resource.c:483:21: warning: symbol 'dce120_clock_source_create' was not declared. Should it be static? drivers/gpu/drm/amd/amdgpu/../display/dc/dce120/dce120_resource.c:506:6: warning: symbol 'dce120_clock_source_destroy' was not declared. Should it be static? drivers/gpu/drm/amd/amdgpu/../display/dc/dce120/dce120_resource.c:513:6: warning: symbol 'dce120_hw_sequencer_create' was not declared. Should it be static? Fixes: b8fdfcc6a92c ("drm/amd/display: Add DCE12 core support") Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1bff7f6c679fb605d2d3fae77c9dd8d4cbad92b9 Author: Trigger Huang Date: Thu May 2 20:33:49 2019 +0800 drm/amdgpu: RLC to program regs for Vega10 SR-IOV Under Vega10 SR-IOV, with new RLC's new feature, VF should call RLC to program some registers if supported Signed-off-by: Trigger Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c | 30 +++---- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 100 +++++++++++----------- drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 20 ++--- drivers/gpu/drm/amd/amdgpu/soc15.c | 12 ++- 4 files changed, 85 insertions(+), 77 deletions(-) commit 6b1ff3ddc66d431a7a71f454aebf32e9757d2ac3 Author: Trigger Huang Date: Fri Mar 1 11:56:20 2019 +0800 drm/amdgpu: add basic func for RLC program reg New feature for RLC, some registers can be programmed by RLC interface under SR-IOV VF: WREG32_SOC15_RLC_SHADOW: 1, for GRBM_GFX_CNTL, firstly the new register value should be be programmed to SCRATCH_REG2 1, for GRBM_GFX_INDEX, firstly the new register value should be be programmed to SCRATCH_REG3 WREG32_RLC: for registers supported to be programmed by RLC interface, the following sequence should be used: 1, write the value to SCRATCH_REG0 2, write reg | 0x80000000 to SCRATCH_REG1 3, write 0x1 to RLC_SPARE_INT to notify RLC 4, polling SCRATCH_REG1 to check if finished Signed-off-by: Trigger Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc15_common.h | 57 ++++++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) commit 98cad2deaf557d63f2c84fae30afefd0e84840e9 Author: Trigger Huang Date: Mon Mar 4 12:30:58 2019 +0800 drm/amdgpu: Skip setting some regs under Vega10 VF For Vega10 SR-IOV VF, skip setting some regs due to: 1, host will program them 2, avoid VF register programming violations Signed-off-by: Trigger Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 14 ++++++++------ drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 3 +++ drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 25 ++++++++++++++++++++----- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 14 ++++++++------ drivers/gpu/drm/amd/amdgpu/soc15.c | 16 +++++++++++----- 5 files changed, 50 insertions(+), 22 deletions(-) commit 7bd877692e23964fc7d3c9736ed9ec5e511999dc Author: Trigger Huang Date: Mon Feb 25 18:41:02 2019 +0800 drm/amdgpu: Support PSP VMR ring for Vega10 VF Add VMR ring support for Vega10 SR-IOV VF if PSP supported Signed-off-by: Trigger Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 131 +++++++++++++++++++++++++--------- 1 file changed, 99 insertions(+), 32 deletions(-) commit 470b425019e70d763d2e8bdc3c8f8ad2f8560de2 Author: Trigger Huang Date: Sun Apr 28 18:03:17 2019 +0800 drm/amdgpu: call psp to program ih cntl in SR-IOV call psp to program ih cntl in SR-IOV if supported Signed-off-by: Trigger Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vega10_ih.c | 91 ++++++++++++++++++++++++++++++---- 1 file changed, 82 insertions(+), 9 deletions(-) commit c5d19419ed9cf8e3bc4190996ee95ea70b324737 Author: Trigger Huang Date: Mon May 6 15:27:23 2019 +0800 drm/amdgpu: implement PSP cmd GFX_CMD_ID_PROG_REG Add implementation to program regs by PSP, currently the following IH registers are supported: IH_RB_CNTL IH_RB_CNTL_RING1 IH_RB_CNTL_RING2 Signed-off-by: Trigger Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 28 ++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 11 ++++++++++- 2 files changed, 38 insertions(+), 1 deletion(-) commit 3880369f6a8ee532849ed79f901ca32ff7511540 Author: Trigger Huang Date: Mon May 6 15:06:17 2019 +0800 drm/amdgpu: Add new PSP cmd GFX_CMD_ID_PROG_REG Add new PSP command GFX_CMD_ID_PROG_REG definition Signed-off-by: Trigger Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/psp_gfx_if.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit 2d11fd3f5420f71b15158672a8ffa3722b37ebf5 Author: Trigger Huang Date: Wed Apr 24 15:23:41 2019 +0800 drm/amdgpu: initialize PSP before IH under SR-IOV In order to support new PSP feature that PSP may provide interface to program IH CNTL register, initialize PSP before IH under Vega10 SR-IOV VF Signed-off-by: Trigger Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 + drivers/gpu/drm/amd/amdgpu/soc15.c | 24 ++++++++++++++++++------ 2 files changed, 19 insertions(+), 6 deletions(-) commit 78d481126795e9e4740204df95572d9731a6d34e Author: Trigger Huang Date: Thu May 9 17:32:59 2019 +0800 drm/amdgpu: init vega10 SR-IOV reg access mode Set different register access mode according to the features provided by firmware Signed-off-by: Trigger Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 44 ++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 13 +++++++++ drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c | 19 +++++++++++++ 4 files changed, 79 insertions(+) commit e79a04d531478e4ccbd3c22288b1229677e1e489 Author: xinhui pan Date: Thu May 9 00:13:22 2019 +0800 drm/amdgpu: gpu reset will run ras post init ras need initialize proper state after late init Signed-off-by: xinhui pan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++ 1 file changed, 3 insertions(+) commit 9708a318620d83d48788bf1c7701dfc193bb5632 Author: xinhui pan Date: Wed May 8 22:38:37 2019 +0800 drm/amdgpu: sdma support ras gpu reset request a gpu reset if ras return EAGAIN. we will run late init again so it is ok to do nothing this time. Signed-off-by: xinhui pan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 70ab8c6125d6649f73a46118f8660c2ddeefa1e1 Author: xinhui pan Date: Wed May 8 22:36:10 2019 +0800 drm/amdgpu: gfx support ras gpu reset request a gpu reset if ras return EAGAIN. we will run late init again so it is ok to do nothing this time. Signed-off-by: xinhui pan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 36810fdb69ba35d8d8d7407b79c522218e8a0dd5 Author: xinhui pan Date: Wed May 8 22:32:34 2019 +0800 drm/amdgpu: gmc support ras gpu reset request a gpu reset if ras return EAGAIN. we will run late init again so it is ok to do nothing this time. Signed-off-by: xinhui pan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit a564808e7f5b19b3621a1dc4ff2a3042171ae167 Author: xinhui pan Date: Wed May 8 19:12:24 2019 +0800 drm/amdgpu: handle ras reset add another flag to allow IP do a gpu reset after device init. Signed-off-by: xinhui pan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 36 +++++++++++++++++++++++++++++++-- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h | 3 +++ 2 files changed, 37 insertions(+), 2 deletions(-) commit 7af23ebe93fe52a30b2338450c8cd40a4f5210d4 Author: xinhui pan Date: Wed May 8 16:13:03 2019 +0800 drm/amdgpu: Issue ras TA disable/enable cmd forcely on boot Check ras TA error code and return EAGAIN. Issue ras enable/disable cmd without checking currect state. Looks like ras TA will handle current state == target state case. Now driver might need do a reset to satisfy ras TA. Signed-off-by: xinhui pan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 34 +++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) commit b152e8e13e883656c0012504c451d483579aa842 Author: xinhui pan Date: Wed May 8 19:31:06 2019 +0800 drm/amdgpu: Revert "drm/amdgpu: skip gpu reset when ras error occured" Enable this now to reset the GPU on RAS errors. This reverts commit 138352e5752aa3e694951d70c8fe8730219f4edf. Signed-off-by: xinhui pan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h | 3 --- 1 file changed, 3 deletions(-) commit 7c04ca50b0b95c9af9613416ff0a671387c7e84a Author: xinhui pan Date: Wed May 8 22:17:57 2019 +0800 drm/amdgpu: gpu reset will run late_init ras need late init to initialize proper state. Signed-off-by: xinhui pan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++++ 1 file changed, 4 insertions(+) commit 992af942a6cfb32f4b5a9fc29545f101074fa250 Author: Jonathan Kim Date: Thu May 2 20:43:00 2019 -0400 drm/amdgpu: add df perfmon regs and funcs for xgmi v6: Squash in warning fix (Colin Ian King) v5: Fix warnings (Alex) v4: fixed mixed delaration and code warnings and minor errors v3: exposing df funcs in amdgpu_df_funcs in amdgpu.h v2: moving permonctl/perfmonctr from default to offset - adding df perfmonctl and perfmonctr registers for df counters - adding df funcs to set perfmonctl and get perfmonctr for df and xgmi counters - exposing df funcs in amdgpu_df_funcs Signed-off-by: Jonathan Kim Reviewed-by: Evan Quan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 10 + drivers/gpu/drm/amd/amdgpu/df_v3_6.c | 428 +++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/df_v3_6.h | 17 + .../drm/amd/include/asic_reg/df/df_3_6_offset.h | 18 + 4 files changed, 473 insertions(+) commit 5326ad54c5ef01a828cf5a942f6fdbf204ef7d3f Author: James Zhu Date: Fri Apr 5 15:31:47 2019 -0400 drm/amdgpu: add gfx9 gpr EDC workaround when RAS is enabled When RAS is enabled, initializes the VGPRs/LDS/SGPRs and resets EDC error counts. This is done in late_init, before RAS TA GFX enable. Signed-off-by: James Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 245 ++++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/soc15.h | 10 ++ 2 files changed, 255 insertions(+) commit 8511477773c37c86b70e23b7fa5ff852cde03ff8 Author: James Zhu Date: Fri Apr 5 15:30:07 2019 -0400 drm/amdgpu: add EDC counter register Add EDC counter register to support gfx9 gpr EDC workaround to clear all EDC counters. Signed-off-by: James Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher .../drm/amd/include/asic_reg/gc/gc_9_0_offset.h | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit dd68722c427d5b33420dce0ed0c44b4881e0a416 Author: Felix Kuehling Date: Wed May 1 17:43:10 2019 -0400 drm/amdgpu: Reserve shared fence for eviction fence Need to reserve space for the shared eviction fence when initializing a KFD VM. Signed-off-by: Felix Kuehling Acked-by: Christian König Reviewed-by: Harish Kasiviswanathan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 4 ++++ 1 file changed, 4 insertions(+) commit 88ccdf1d59df4d93b0591c8879316de40ef88f93 Author: Leo (Hanghong) Ma Date: Tue Apr 16 11:07:22 2019 -0400 drm/amd/display: Expose send immediate sdp message interface [Why] To send sdp message immediately from a single slot. [How] Modify the generic SDP message interface, and use GSP4 to send immediate sdp message. Signed-off-by: Leo (Hanghong) Ma Reviewed-by: Harry Wentland Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 18 ---- drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 47 ++------- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 13 +++ .../amd/display/dc/dcn10/dcn10_stream_encoder.c | 106 +++++++++++++++++++-- .../amd/display/dc/dcn10/dcn10_stream_encoder.h | 22 +++++ .../gpu/drm/amd/display/dc/inc/hw/stream_encoder.h | 7 +- drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 5 + 7 files changed, 155 insertions(+), 63 deletions(-) commit 1894478ad1f8fd7366edc5cee49ee9caea0e3d52 Author: Roman Li Date: Thu Apr 25 11:02:30 2019 -0400 drm/amd/display: Fill plane attrs only for valid pxl format [Why] In fill_plane_buffer_attributes() we calculate chroma/luma assuming that the surface_pixel_format is always valid. If it's not the case, there's a risk of divide by zero error. [How] Check if format valid before calculating pixel format attributes Signed-off-by: Roman Li Reviewed-by: David Francis Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b2293ac23776123b896479b6a53463753c648d3b Author: Eric Yang Date: Wed Apr 24 19:18:12 2019 -0400 drm/amd/display: move back vbios cmd table for set dprefclk [Why] Upon closer inspection, our previous implementation is missing code for programming de-spread and DP DTO. Porting this logic into driver is rather involved, as there are a lot of table look ups. So for now move back to calling vbios cmd table [How] Go back to calling vbios cmd table for set dp_refclk Signed-off-by: Eric Yang Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_clk_mgr.c | 70 ++++++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dce/dce_clk_mgr.h | 2 + 2 files changed, 72 insertions(+) commit 79592db31297d2fbf1c24b7775199e2bda283079 Author: Dmytro Laktyushkin Date: Tue Apr 16 13:31:22 2019 -0400 drm/amd/display: fix acquire_first_split_pipe function This function needs to re-calculate the scaling on the pipe that loses it's half. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Eric Bernstein Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 39 ++++++++++++----------- 1 file changed, 21 insertions(+), 18 deletions(-) commit e7e10c464a481e9e94ae571f849d09c8820f1fdb Author: Dmytro Laktyushkin Date: Mon Apr 8 15:49:52 2019 -0400 drm/amd/display: stop external access to internal optc sync params These are internal otg params and should be handled as such. Thich change passes the params as function arguments. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Eric Bernstein Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher .../amd/display/dc/dce110/dce110_hw_sequencer.c | 5 +++ .../drm/amd/display/dc/dce110/dce110_resource.c | 5 +++ .../display/dc/dce110/dce110_timing_generator.c | 5 +++ .../display/dc/dce110/dce110_timing_generator.h | 5 +++ .../display/dc/dce110/dce110_timing_generator_v.c | 5 +++ .../display/dc/dce120/dce120_timing_generator.c | 7 +++- .../amd/display/dc/dce80/dce80_timing_generator.c | 7 +++- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 25 +++++------- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c | 47 ++++++++++++++++------ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.h | 17 +++++++- .../drm/amd/display/dc/inc/hw/timing_generator.h | 23 ++++++----- 11 files changed, 111 insertions(+), 40 deletions(-) commit db819940b0ef74afdc46a48304d0b29410ed7fc4 Author: Dmytro Laktyushkin Date: Mon Apr 8 15:04:43 2019 -0400 drm/amd/display: move signal type out of otg dlg params It makes no logical sense being there Signed-off-by: Dmytro Laktyushkin Reviewed-by: Eric Bernstein Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 3 +-- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c | 6 +++--- drivers/gpu/drm/amd/display/dc/inc/hw/timing_generator.h | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) commit 052fa7e8c9a92e3804ba9dba7c2550a9684d3441 Author: Charlene Liu Date: Tue Apr 23 21:59:54 2019 -0400 drm/amd/display: reset retimer/redriver below 340Mhz [Description] This is for HDMI 6Ghz mode before we load the driver, because VBIOS not support HDMI (6Ghz mode) Reset to redriver/retimer setting for the setting for below 340Mhz. Signed-off-by: Charlene Liu Reviewed-by: Krunoslav Kovac Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 28 +++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) commit 40df2f809e8fe4d9e4f9b7b177f95e76e1f36442 Author: Charlene Liu Date: Wed Apr 17 19:15:15 2019 -0400 drm/amd/display: color space ycbcr709 support Signed-off-by: Charlene Liu Reviewed-by: Duke Du Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/core/dc_hw_sequencer.c | 29 +++++++++++++++++++--- drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 4 +-- drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 1 + .../drm/amd/display/dc/dce/dce_stream_encoder.c | 1 + .../amd/display/dc/dcn10/dcn10_stream_encoder.c | 1 + 5 files changed, 31 insertions(+), 5 deletions(-) commit 2f482c4f90983810cb8a29fd0db43a7a6a9d6cb3 Author: Chris Park Date: Wed Apr 17 18:11:57 2019 -0400 drm/amd/display: Define Byte 14 on AVI InfoFrame [Why] Part of HDMI 2.1 requires AVI InfoFrame version update from current V2 to V4 for new colorimetry. [How] Define V4 AVI InfoFrame ACE0-ACE3 bit. Signed-off-by: Chris Park Reviewed-by: Nevenko Stupar Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 7 +++++++ drivers/gpu/drm/amd/display/include/set_mode_types.h | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) commit 2d27ebac018fdf8dab7935b2b79c79627ad247b0 Author: Aric Cyr Date: Mon Apr 22 10:22:44 2019 -0400 drm/amd/display: 3.2.29 Signed-off-by: Aric Cyr Reviewed-by: Aric Cyr Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e371e19c10a264bd72c2ff1d21e2167b994710d1 Author: Nicholas Kazlauskas Date: Thu Apr 18 12:42:32 2019 -0400 drm/amd/display: Disable cursor when offscreen in negative direction [Why] When x or y is negative we set the x and y values to 0 and compensate with a positive cursor hotspot in DM since DC expects positive cursor values. When x or y is less than or equal to the maximum cursor width or height the cursor hotspot is clamped so the hotspot doesn't exceed the cursor size: if (x < 0) { xorigin = min(-x, amdgpu_crtc->max_cursor_width - 1); x = 0; } if (y < 0) { yorigin = min(-y, amdgpu_crtc->max_cursor_height - 1); y = 0; } This incorrectly forces the cursor to be at least 1 pixel on the screen in either direction when x or y is sufficiently negative. [How] Just disable the cursor when it goes far enough off the screen in one of these directions. This fixes kms_cursor_crc@cursor-256x256-offscreen. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Sun peng Li Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 1352c779cb74d427f4150cbe779a2f7886f70cae Author: Nicholas Kazlauskas Date: Tue Apr 16 10:30:29 2019 -0400 drm/amd/display: Fill prescale_params->scale for RGB565 [Why] An assertion is thrown when using SURFACE_PIXEL_FORMAT_GRPH_RGB565 formats on DCE since the prescale_params->scale wasn't being filled. Found by a dmesg-fail when running the igt@kms_plane@pixel-format-pipe-a-planes test on Baffin. [How] Fill in the scale parameter. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Roman Li Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 3 +++ 1 file changed, 3 insertions(+) commit efa023363cdffafa839e5cc7e6fc9f38631e998d Author: Chris Park Date: Wed Apr 17 16:32:25 2019 -0400 drm/amd/display: Support AVI InfoFrame V3 and V4 [Why] Part of HDMI 2.1 requires AVI InfoFrame version update from current V2 to V3 for new VICs, and V4 for new colorimetry. [How] Implement V3 and V4 AVI InfoFrame. If (C1, C0)=(1, 1) and (EC2, EC1, EC0)=(1, 1, 1), the Source shall use 20 AVI InfoFrame Version 4. If VIC >= 128, the Source shall use AVI InfoFrame Version 3 Signed-off-by: Chris Park Reviewed-by: Nevenko Stupar Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 64827cadcce3023521b687b7db75c7bc388ca201 Author: Samson Tam Date: Fri Apr 12 18:23:11 2019 -0400 drm/amd/display: block passive dongle EDID Emulation for USB-C ports [Why] Emulating passive dongle on USB-C port causes issue on some asics. [How] Check for DP_IS_USB_C flag in bios parser and propagate it to encoder features flags. If DP_IS_USB_C flag is set and it is trying to emulate passive dongle, then return fail. Signed-off-by: Samson Tam Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 2 ++ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_link_encoder.c | 2 ++ drivers/gpu/drm/amd/display/dc/inc/hw/link_encoder.h | 1 + drivers/gpu/drm/amd/display/include/bios_parser_types.h | 3 ++- 4 files changed, 7 insertions(+), 1 deletion(-) commit f5ce9f3cba9f385bb4d0b4f76b6b32cef2b84da0 Author: Charlene Liu Date: Mon Apr 15 16:17:59 2019 -0400 drm/amd/display: add SW_USE_I2C_REG request. [Description] This is for DC_I2c arbitration use between HW use/SW use and DMCU use. Signed-off-by: Charlene Liu Reviewed-by: Krunoslav Kovac Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_i2c_hw.c | 7 +++++-- drivers/gpu/drm/amd/display/dc/dce/dce_i2c_hw.h | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) commit 8dea49605f6e21b5b380b0cae7f1f1160675e3ee Author: Jun Lei Date: Mon Apr 15 14:52:25 2019 -0400 drm/amd/display: add support for disconnected eDP panels [why] On some configurations, eDP from GPU is muxed with another GPU. DC does not know state of mux, but DM has this knowledge. This flag allows DC to ignore creating EDP link when DM informs DC that EDP mux is not connected. [how] Add flag to dc, populate flag in DM Signed-off-by: Jun Lei Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 11 ++++++++--- drivers/gpu/drm/amd/display/dc/dc.h | 1 + 2 files changed, 9 insertions(+), 3 deletions(-) commit 21e471f0850de874b2afa54f19ef7886490b99fe Author: Eric Yang Date: Wed Apr 3 15:40:05 2019 -0400 drm/amd/display: Set dispclk and dprefclock directly [Why] To simply logic for setting DCN specific clocks, we will send SMU message directly through the VBIOS message box. [How] Add new structure in pp_smu to hold functions to set clocks through vbios message box Signed-off-by: Eric Yang Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc_helper.c | 2 +- drivers/gpu/drm/amd/display/dc/dce/dce_clk_mgr.c | 8 +-- drivers/gpu/drm/amd/display/dc/dce/dce_clk_mgr.h | 21 ++++++ .../gpu/drm/amd/display/dc/dcn10/dcn10_clk_mgr.c | 78 ++++++++++++++++++++-- .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 37 +++++++--- drivers/gpu/drm/amd/display/dc/dm_pp_smu.h | 2 +- drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr.h | 8 ++- drivers/gpu/drm/amd/display/include/dal_asic_id.h | 3 +- 8 files changed, 136 insertions(+), 23 deletions(-) commit 4cd75ff096f4ef49c343093b52a952f27aba7796 Author: Anthony Koo Date: Fri Apr 12 21:23:45 2019 -0400 drm/amd/display: fix multi display seamless boot case [Why] There is a scenario that causes eDP to become blank if there are multiple displays connected, and the external display is set as the primary display such that the first flip comes to the external display. In this scenario, we call our optimize function before the eDP even has a chance to flip. [How] There is a check that prevents bandwidth optimize from occurring before first flip is complete on the seamless boot display. But actually it assumed the seamless boot display is the first one to flip. But in this scenario it is not. Modify the check to ensure the steam with the seamless boot flag set is the one that has completed the first flip. Signed-off-by: Anthony Koo Reviewed-by: Aric Cyr Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 14ed3d00eff9a327cbde78596ef599f68caa19a9 Author: Yongqiang Sun Date: Thu Apr 11 14:11:47 2019 -0400 drm/amd/display: Refactor program watermark. Refactor programming watermark function: Divided into urgent watermark, stutter watermark and pstate watermark. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dcn10/dcn10_hubbub.c | 428 +++++++++++---------- .../gpu/drm/amd/display/dc/dcn10/dcn10_hubbub.h | 16 + 2 files changed, 242 insertions(+), 202 deletions(-) commit a58f273cdd0ec707524e335b09ead9984566e163 Author: Aric Cyr Date: Mon Apr 15 08:41:47 2019 -0400 drm/amd/display: 3.2.28 Signed-off-by: Aric Cyr Reviewed-by: Aric Cyr Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2fbd6f94accdbb223acccada68940b50b0c668d9 Author: Christian König Date: Mon May 6 13:22:06 2019 +0200 drm/amdgpu: rename amdgpu_prime.[ch] into amdgpu_dma_buf.[ch] We are getting a dma-buf implementation completely separate from drm prime, so rename the files now and cleanup the code a bit. No functional change. Signed-off-by: Christian König Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 1 + .../amdgpu/{amdgpu_prime.c => amdgpu_dma_buf.c} | 131 +++++++++++---------- drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.h | 46 ++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.h | 16 --- 7 files changed, 116 insertions(+), 83 deletions(-) commit 9b6eb00dbdaee49ba35569e3c72fbb05734610e3 Author: Tom St Denis Date: Thu May 2 09:16:11 2019 -0400 drm/amd/amdgpu: Add MEM_LOAD to amdgpu_pm_info debugfs file Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 4 ++++ 1 file changed, 4 insertions(+) commit 0d87c9cfc08e1508ad9df2b2bda003418dcc0cc9 Author: Kent Russell Date: Wed May 1 08:23:13 2019 -0400 drm/amdkfd: Cosmetic cleanup Fix some spacing issues, log output, uses of !=NULL/==NULL, unneeded extra lines and clean up a declaration from =1 to =true for clarity Signed-off-by: Kent Russell Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 6 ++++-- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_events.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_flat_memory.c | 2 -- drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) commit 5980bcaa96101e52586472bbb3f568f02618f16a Author: Kent Russell Date: Wed May 1 08:22:50 2019 -0400 drm/amdgpu: Fix CIK references in gmc_v8 gmc_v8 is for VI, not CIK, so fix those references Signed-off-by: Kent Russell Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit dcea6e65d41f4696571d5d391d3a760cfbb8ee00 Author: Kent Russell Date: Tue Apr 30 06:43:33 2019 -0400 drm/amdgpu: Add PCIe replay count sysfs file Add a sysfs file for reporting the number of PCIe replays (NAKs). This returns the sum of NAKs received and NAKs generated Signed-off-by: Kent Russell Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 29 +++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/cik.c | 13 +++++++++++++ drivers/gpu/drm/amd/amdgpu/si.c | 13 +++++++++++++ drivers/gpu/drm/amd/amdgpu/soc15.c | 14 ++++++++++++++ drivers/gpu/drm/amd/amdgpu/vi.c | 13 +++++++++++++ 6 files changed, 85 insertions(+) commit 673b366b41e216309c830d86d628e08736172067 Author: Kent Russell Date: Tue Apr 30 06:42:24 2019 -0400 drm/amdgpu: Add replay counter defines to NBIO headers Add the PCIE_RX_NUM_NACK and PCIE_RX_NUM_NACK_GENERATED values to the NBIO SMN headers in preparation for exposing the number of PCIe replays via sysfs Signed-off-by: Kent Russell Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/asic_reg/nbio/nbio_6_1_smn.h | 3 +++ drivers/gpu/drm/amd/include/asic_reg/nbio/nbio_7_0_smn.h | 3 +++ drivers/gpu/drm/amd/include/asic_reg/nbio/nbio_7_4_0_smn.h | 3 +++ 3 files changed, 9 insertions(+) commit e008299ea9a166ae2460ad1445031c40d9de0670 Author: shaoyunl Date: Mon Apr 29 15:15:41 2019 -0400 drm/amdgpu: Update latest xgmi topology info after each device is enumulated Adjust the sequence of set/get xgmi topology, so driver can have the latest XGMI topology info for future usage Signed-off-by: shaoyunl Acked-by: Evan Quan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) commit 912dfc846aad77e4a61ac39ca92bd7149062e590 Author: Evan Quan Date: Mon Apr 29 16:51:17 2019 +0800 drm/amdgpu: enable separate timeout setting for every ring type V4 Every ring type can have its own timeout setting. - V2: update lockup_timeout parameter format and cosmetic fixes - V3: invalidate 0 and negative values - V4: update lockup_timeout parameter format Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 7 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 17 +++++-- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 81 +++++++++++++++++++++++++++--- drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 35 ++++++++++--- drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c | 2 +- 5 files changed, 122 insertions(+), 20 deletions(-) commit f120386d74f193301d808ccfec1a778af62b6797 Author: Evan Quan Date: Fri Apr 26 12:02:48 2019 +0800 drm/amdgpu: add new sysfs interface for memory realtime utilization A new sysfs interface mem_busy_percent is added for telling how busy the VRAM is(in percentage). Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 40 ++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit 767fb6b35dfaba08f514ca4f8f5fed1c442c40fd Author: Evan Quan Date: Wed Apr 24 15:46:50 2019 +0800 drm/amd/powerplay: expose SMU7 asics realtime memory utilization Enable realtime memory utilization report on SMU7 asics. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 5 ++++- drivers/gpu/drm/amd/powerplay/inc/smumgr.h | 1 + drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c | 2 ++ drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c | 2 ++ drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c | 2 ++ drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c | 2 ++ drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c | 2 ++ drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c | 2 ++ 8 files changed, 17 insertions(+), 1 deletion(-) commit 271151d80149e5081a80516f0a8d4eeb5744ff70 Author: Evan Quan Date: Wed Apr 24 15:19:36 2019 +0800 drm/amd/powerplay: expose Vega12 realtime memory utilization Enable realtime memory utilization report on Vega12. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 1846e3f9e76ceaac86072eb897393ee24d1d870e Author: Evan Quan Date: Fri Apr 19 13:54:46 2019 +0800 drm/amd/powerplay: expose Vega20 realtime memory utilization Enable realtime memory utilization report on Vega20. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/kgd_pp_interface.h | 1 + drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) commit 0fb0df031acdb6f17603cb32be13a2d1a858e249 Author: shaoyunl Date: Wed Apr 17 14:34:07 2019 -0400 drm/amdkfd: Adjust weight to represent num_hops info when report xgmi iolink Upper level runtime need the xgmi hops info to determine the data path Signed-off-by: shaoyunl Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 7 +++++-- drivers/gpu/drm/amd/amdkfd/kfd_crat.h | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) commit da361dd13f4fb766445f55bbd2eec36c73a9b1bb Author: shaoyunl Date: Wed Apr 17 14:28:18 2019 -0400 drm/amdgpu: Implement get num of hops between two xgmi device KFD need to provide the info for upper level to determine the data path Signed-off-by: shaoyunl Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 15 +++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 26 ++++++++++++++------------ drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 23 ++++++++++++++++++----- drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.h | 3 ++- 5 files changed, 50 insertions(+), 18 deletions(-) commit d8e408a82704c86ba87c3d58cfe69dcdb758aa07 Author: Oak Zeng Date: Thu Apr 11 14:43:39 2019 -0500 drm/amdkfd: Expose HDP registers to user space Introduce a new memory type (KFD_IOC_ALLOC_MEM_FLAGS_MMIO_REMAP) and expose mmio page of HDP registers to user space through this new memory type. v2: moved remapped hdp regs to adev struct v3: rename the new memory type to ALLOC_MEM_FLAGS_MMIO_REMAP v4: use more generic function name v5: Fail remapped mmio allocation for asics before gfx9 Signed-off-by: Oak Zeng Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 7 +++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 7 ++++--- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 6 ++++++ drivers/gpu/drm/amd/include/kgd_kfd_interface.h | 1 + include/uapi/linux/kfd_ioctl.h | 1 + 6 files changed, 20 insertions(+), 3 deletions(-) commit 88807dc8d573c0f718d0d26f592f212c5a487cf0 Author: Oak Zeng Date: Thu Apr 4 15:47:34 2019 -0500 drm/amdgpu: Remap hdp coherency registers Remap HDP_MEM_COHERENCY_FLUSH_CNTL and HDP_REG_COHERENCY_FLUSH_CNTL to an empty page in mmio space. We will later map this page to process space so application can flush hdp. This can't be done properly at those registers' original location because it will expose more than desired registers to process space. v2: Use explicit register hole location v3: Moved remapped hdp registers into adev struct v4: Use more generic name for remapped page Expose register offset in kfd_ioctl.h v5: Move hdp register remap function to nbio ip function v6: Fixed operator precedence issue and other bugs Signed-off-by: Oak Zeng Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 7 +++++++ drivers/gpu/drm/amd/amdgpu/nbio_v7_0.c | 15 ++++++++++++--- drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c | 15 ++++++++++++--- drivers/gpu/drm/amd/amdgpu/soc15.c | 11 +++++++++++ include/uapi/linux/kfd_ioctl.h | 7 +++++++ 5 files changed, 49 insertions(+), 6 deletions(-) commit 4fde03a7efe42f1b3de3b483f98dc4551dd62ac4 Author: Kevin Wang Date: Mon Apr 29 14:47:41 2019 +0800 drm/amd/powerplay: add helper function to get smu firmware & if version add this helper function to get smc version. Signed-off-by: Kevin Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 30 ++++++++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 1 + drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 23 +++++++++++++------- 3 files changed, 46 insertions(+), 8 deletions(-) commit eef2d67ead3e14e284cc840894727b095fe774c2 Author: Evan Quan Date: Thu Apr 18 15:37:49 2019 +0800 drm/amd/powerplay: expose Vega12 current gpu activity Provide the real sensor information for current gpu activity. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) commit c59a722c4ccb2d1d71a0c99ab9f3a46b4cb4407f Author: Evan Quan Date: Thu Apr 18 15:33:06 2019 +0800 drm/amd/powerplay: expose Vega12 current power Provide the real sensor information for current power. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit 2adc11564c42b63827eaf1cf9d61da2f79b9c978 Author: Evan Quan Date: Wed Apr 17 15:45:08 2019 +0800 drm/amd/powerplay: support hwmon temperature channel labels V2 Expose temp[1-3]_label hwmon interfaces. While temp2_label and temp3_label are visible for SOC15 dGPUs only. - V2: correct temp1_label as "edge" Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 34 +++++++++++++++++++++++++- drivers/gpu/drm/amd/include/kgd_pp_interface.h | 7 ++++++ 2 files changed, 40 insertions(+), 1 deletion(-) commit a34d1166b47c8497cffda4da7c14182cb3420362 Author: Evan Quan Date: Thu Apr 18 13:51:53 2019 +0800 drm/amd/powerplay: expose current hotspot and memory temperatures V2 Two new hwmon interfaces(temp2_input and temp3_input) are added. They are supported on SOC15 dGPUs only. - V2: correct thermal sensor output Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 45 ++++++++++++++++++---- drivers/gpu/drm/amd/include/kgd_pp_interface.h | 3 ++ drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 12 ++++++ drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c | 19 +++++++++ drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 20 +++++++++- 5 files changed, 90 insertions(+), 9 deletions(-) commit ada2b8f1c8289c0b1a6ac775a7d52d8df62140e0 Author: Evan Quan Date: Thu Apr 18 13:28:12 2019 +0800 drm/amd/powerplay: support SMU metrics table on Vega12 That should provide some necessary sensor information. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c | 21 +++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.h | 3 +++ .../gpu/drm/amd/powerplay/smumgr/vega12_smumgr.c | 21 +++++++++++++++++++++ 3 files changed, 45 insertions(+) commit 901cb599dbc233fc325e3602e7c1218d2c24359c Author: Evan Quan Date: Thu Apr 18 11:53:04 2019 +0800 drm/amd/powerplay: support temperature emergency max values These new interfaces(temp1_emergency, temp2_emergency, temp3_emergency) are supported on SOC15 dGPUs only. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h | 6 ++++ drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 40 +++++++++++++++++++++- .../gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 6 ++++ drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 6 ++++ drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c | 6 ++++ drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 6 ++++ drivers/gpu/drm/amd/powerplay/inc/power_state.h | 3 ++ drivers/gpu/drm/amd/powerplay/inc/pp_thermal.h | 12 ++++--- 8 files changed, 80 insertions(+), 5 deletions(-) commit 437ccd175a7a3c9871536a26b2d28e3c99515e7f Author: Evan Quan Date: Thu Apr 18 10:38:51 2019 +0800 drm/amd/powerplay: support hotspot/memory critical limit values These new interfaces(temp2_crit, temp2_crit_hyst, temp3_crit, temp3_crit_hyst) are supported on SOC15 dGPUs only. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h | 8 ++++ drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 55 +++++++++++++++++++++- .../gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 12 ++++- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 10 ++-- drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c | 11 +++-- drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 11 +++-- drivers/gpu/drm/amd/powerplay/inc/power_state.h | 4 ++ drivers/gpu/drm/amd/powerplay/inc/pp_thermal.h | 8 ++-- 8 files changed, 103 insertions(+), 16 deletions(-) commit b0576f9ecb5c51e9932531d23c447b2739261841 Author: Nathan Chancellor Date: Fri May 24 09:15:17 2019 -0700 misc: sgi-xp: Properly initialize buf in xpc_get_rsvd_page_pa Clang warns: drivers/misc/sgi-xp/xpc_partition.c:73:14: warning: variable 'buf' is uninitialized when used within its own initialization [-Wuninitialized] void *buf = buf; ~~~ ^~~ 1 warning generated. Arnd's explanation during review: /* * Returns the physical address of the partition's reserved page through * an iterative number of calls. * * On first call, 'cookie' and 'len' should be set to 0, and 'addr' * set to the nasid of the partition whose reserved page's address is * being sought. * On subsequent calls, pass the values, that were passed back on the * previous call. * * While the return status equals SALRET_MORE_PASSES, keep calling * this function after first copying 'len' bytes starting at 'addr' * into 'buf'. Once the return status equals SALRET_OK, 'addr' will * be the physical address of the partition's reserved page. If the * return status equals neither of these, an error as occurred. */ static inline s64 sn_partition_reserved_page_pa(u64 buf, u64 *cookie, u64 *addr, u64 *len) so *len is set to zero on the first call and tells the bios how many bytes are accessible at 'buf', and it does get updated by the BIOS to tell us how many bytes it needs, and then we allocate that and try again. Fixes: 279290294662 ("[IA64-SGI] cleanup the way XPC locates the reserved page") Link: https://github.com/ClangBuiltLinux/linux/issues/466 Suggested-by: Stephen Hines Reviewed-by: Arnd Bergmann Reviewed-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Signed-off-by: Greg Kroah-Hartman drivers/misc/sgi-xp/xpc_partition.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e89bec3a9811563cc41b9d25443a07c883ab8950 Author: Naveen Kumar Parna Date: Fri May 17 10:04:55 2019 +0530 char: misc: Move EXPORT_SYMBOL immediately next to the functions/varibles According to checkpatch: EXPORT_SYMBOL(foo); should immediately follow its function/variable. This patch fixes the following checkpatch.pl issues in drivers/char/misc.c: WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable Signed-off-by: Naveen Kumar Parna Signed-off-by: Greg Kroah-Hartman drivers/char/misc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit dc3e0aa5c58db4089a42f02a3d928f718e7dc6e8 Author: Bartlomiej Zolnierkiewicz Date: Mon May 20 16:10:46 2019 +0200 misc: remove redundant 'default n' from Kconfig-s 'default n' is the default value for any bool or tristate Kconfig setting so there is no need to write it explicitly. Also since commit f467c5640c29 ("kconfig: only write '# CONFIG_FOO is not set' for visible symbols") the Kconfig behavior is the same regardless of 'default n' being present or not: ... One side effect of (and the main motivation for) this change is making the following two definitions behave exactly the same: config FOO bool config FOO bool default n With this change, neither of these will generate a '# CONFIG_FOO is not set' line (assuming FOO isn't selected/implied). That might make it clearer to people that a bare 'default n' is redundant. ... Signed-off-by: Bartlomiej Zolnierkiewicz Acked-by: Frederic Barrat Acked-by: Arnd Bergmann Acked-by: Michael Ellerman Signed-off-by: Greg Kroah-Hartman drivers/misc/Kconfig | 10 ---------- drivers/misc/altera-stapl/Kconfig | 1 - drivers/misc/c2port/Kconfig | 2 -- drivers/misc/cb710/Kconfig | 1 - drivers/misc/cxl/Kconfig | 3 --- drivers/misc/echo/Kconfig | 1 - drivers/misc/genwqe/Kconfig | 1 - drivers/misc/lis3lv02d/Kconfig | 2 -- drivers/misc/ocxl/Kconfig | 1 - 9 files changed, 22 deletions(-) commit 2cd0e54489e65b8e22124a8b053aff40815487f7 Author: Kefeng Wang Date: Fri May 24 22:37:24 2019 +0800 ipmi_ssif: fix unexpected driver unregister warning If platform_driver_register() fails from init_ipmi_ssif(), platform_driver_unregister() called unconditionally will trigger following warning, ipmi_ssif: Unable to register driver: -12 ------------[ cut here ]------------ Unexpected driver unregister! WARNING: CPU: 1 PID: 6305 at drivers/base/driver.c:193 driver_unregister+0x60/0x70 drivers/base/driver.c:193 Fix it by adding platform_registered variable, only unregister platform driver when it is already successfully registered. Reported-by: Hulk Robot Signed-off-by: Kefeng Wang Message-Id: <20190524143724.43218-1-wangkefeng.wang@huawei.com> Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_ssif.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 5fc537bfd00033a3f813330175f7f12c25957ebf Author: Linus Walleij Date: Fri May 24 11:20:19 2019 +0200 drm/mcde: Add new driver for ST-Ericsson MCDE This adds a new DRM driver for the ST-Ericsson Multi Channel Display Engine, MCDE display controller. This hardware has three independent DSI hosts and can composit and display several memory buffers onto an LCD display. It was developed for several years inside of ST-Ericsson and shipped with a few million mobile phones from Sony and Samsung, as well as with the Snowball community development board. The driver is currently pretty rudimentary but supports a simple framebuffer so we can get penguins and graphics when using these SoCs. Acked-by: Daniel Vetter Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20190524092019.19355-1-linus.walleij@linaro.org Documentation/gpu/drivers.rst | 1 + Documentation/gpu/mcde.rst | 8 + MAINTAINERS | 7 + drivers/gpu/drm/Kconfig | 2 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/mcde/Kconfig | 18 + drivers/gpu/drm/mcde/Makefile | 3 + drivers/gpu/drm/mcde/mcde_display.c | 1142 ++++++++++++++++++++++++++++++ drivers/gpu/drm/mcde/mcde_display_regs.h | 518 ++++++++++++++ drivers/gpu/drm/mcde/mcde_drm.h | 44 ++ drivers/gpu/drm/mcde/mcde_drv.c | 572 +++++++++++++++ drivers/gpu/drm/mcde/mcde_dsi.c | 1044 +++++++++++++++++++++++++++ drivers/gpu/drm/mcde/mcde_dsi_regs.h | 385 ++++++++++ 13 files changed, 3745 insertions(+) commit 64c47b624f64cf8594cc5dc3330e161848eaa15b Author: Manivannan Sadhasivam Date: Sat May 11 00:15:24 2019 +0530 reset: Add reset controller support for BM1880 SoC Add reset controller support for Bitmain BM1880 SoC reusing the reset-simple driver. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Philipp Zabel Signed-off-by: Philipp Zabel drivers/reset/Kconfig | 3 ++- drivers/reset/reset-simple.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) commit ef98682a4e1257ff45405bb1372939e8dfe774bb Author: Manivannan Sadhasivam Date: Sat May 11 00:15:22 2019 +0530 dt-bindings: reset: Add devicetree binding for BM1880 reset controller Add devicetree binding for Bitmain BM1880 SoC reset controller. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Rob Herring Signed-off-by: Philipp Zabel .../bindings/reset/bitmain,bm1880-reset.txt | 18 ++++++++ include/dt-bindings/reset/bitmain,bm1880-reset.h | 51 ++++++++++++++++++++++ 2 files changed, 69 insertions(+) commit 981f2aabeae6f23be9cac8976a2b97c9a3314e42 Author: Sean Paul Date: Thu May 23 13:16:45 2019 -0400 drm/msm/a6xx: Rename a6xx_gmu_probe to a6xx_gmu_init This rename makes it more clear that everything initialized in the _init function must be cleaned up in a6xx_gmu_remove. This will hopefully dissuade people from using device managed resources (for reasons laid out in the previous patch). Changes in v2: - None Cc: Jordan Crouse Reviewed-by: Jordan Crouse Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190523171653.138678-6-sean@poorly.run drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 2 +- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 2 +- drivers/gpu/drm/msm/adreno/a6xx_gpu.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 998efc74672c2d9d1b5d5e02b21cca7ed9135274 Author: Sean Paul Date: Thu May 23 13:16:44 2019 -0400 drm/msm/a6xx: Drop the device reference in gmu of_find_device_by_node() grabs a dev reference, so make sure we clear it on error and remove. Changes in v2: - Added to the set (Jordan) Cc: Jordan Crouse Reviewed-by: Jordan Crouse Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190523171653.138678-5-sean@poorly.run drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit a62fb211ad0c9e13e79d350905a704f46447b8cf Author: Sean Paul Date: Thu May 23 13:16:43 2019 -0400 drm/msm/a6xx: Remove devm calls from gmu driver The gmu driver is initialized and cleaned up with calls from the gpu driver. As such, the platform device stays valid after a6xx_gmu_remove is called and the device managed resources are not freed. In the case of gpu probe failures or unbind, these resources will remain managed. If the gpu bind is run again (eg: if there's a probe defer somewhere in msm), these resources will be initialized again for the same device, creating multiple references. In the case of irqs, this causes failures since the irqs are not shared (nor should they be). This patch removes all devm_* calls and manually cleans things up in gmu_remove. Changes in v2: - Add iounmap and free_irq to gmu_probe error paths Cc: Jordan Crouse Reviewed-by: Jordan Crouse Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190523171653.138678-4-sean@poorly.run drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) commit 5ca4a094ba7e1369363dcbcbde8baf06ddcdc2d1 Author: Sean Paul Date: Thu May 23 13:16:42 2019 -0400 drm/msm/a6xx: Check for ERR or NULL before iounmap pdcptr and seqptr aren't necessarily valid, check them before trying to unmap them. Changes in v2: - None Cc: Jordan Crouse Reviewed-by: Jordan Crouse Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190523171653.138678-3-sean@poorly.run drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit cfcb365861b77389f7fbc9c8153a08c62ae390af Author: Sean Paul Date: Thu May 23 13:16:41 2019 -0400 drm/msm/a6xx: Remove duplicate irq disable from remove a6xx_gmu_stop() already calls this function via shutdown or force_stop, so it's not necessary to call it twice. Previously this would have knocked the irq refcount out of sync, but now with the irqs_enabled flag it's just housekeeping. Changes in v2: - None Cc: Jordan Crouse Reviewed-by: Jordan Crouse Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190523171653.138678-2-sean@poorly.run drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 1 - 1 file changed, 1 deletion(-) commit 606ec90fc2266284f584a96ebf7f874589f56251 Author: Sean Paul Date: Thu May 23 13:16:40 2019 -0400 drm/msm/a6xx: Avoid freeing gmu resources multiple times The driver checks for gmu->mmio as a sign that the device has been initialized, however there are failures in probe below the mmio init. If one of those is hit, mmio will be non-null but freed. In that case, a6xx_gmu_probe will return an error to a6xx_gpu_init which will in turn call a6xx_gmu_remove which checks gmu->mmio and tries to free resources for a second time. This causes a great boom. Fix this by adding an initialized member to gmu which is set on successful probe and cleared on removal. Changes in v2: - None Cc: Jordan Crouse Reviewed-by: Jordan Crouse Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190523171653.138678-1-sean@poorly.run drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 14 +++++++++----- drivers/gpu/drm/msm/adreno/a6xx_gmu.h | 1 + 2 files changed, 10 insertions(+), 5 deletions(-) commit 7c4a7049b592da8516d724a03472d715452270cd Author: Clément Péron Date: Thu May 23 17:10:50 2019 +0200 arm64: defconfig: enable sunxi watchdog The SUNXI_WATCHDOG option is required to make the watchdog available on Allwinner H6. Enable this option as a module. Signed-off-by: Clément Péron Signed-off-by: Maxime Ripard arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit ae3ceed0a399fa0cc83410ce7bbf3a1675b733a9 Author: Clément Péron Date: Thu May 23 17:10:49 2019 +0200 arm64: dts: allwinner: h6: add r_watchog node Allwinner H6 has a r_watchdog similar to A64. Declare it in the device-tree. Signed-off-by: Clément Péron Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit b6cebb1c2de5d3091fb249ebeca8d0e8465ec965 Author: Clément Péron Date: Thu May 23 17:10:48 2019 +0200 arm64: dts: allwinner: h6: add watchdog node Allwinner H6 has a watchog node which seems broken on some boards. Test has been performed on several boards. Chen-Yu Tsai boards: Pine H64 - H6448BA 7782 => OK OrangePi Lite 2 - H8068BA 61C2 => KO Martin Ayotte boards: Pine H64 - H8069BA 6892 => OK OrangePi 3 - HA047BA 69W2 => KO OrangePi One Plus - H7310BA 6842 => KO OrangePi Lite2 - H6448BA 6662 => KO Clément Péron board: Beelink GS1 - H7309BA 6842 => KO As it seems not fixable for now, declare the node but leave it disable with a comment. Signed-off-by: Clément Péron Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) commit e0917169e5cc068a0c791726329746d1f4752b7a Author: Clément Péron Date: Thu May 23 17:10:47 2019 +0200 dt-bindings: watchdog: add Allwinner H6 watchdog Allwinner H6 has a similar watchdog as the A64 which is already a compatible of the A31. This commit add the H6 compatible. Signed-off-by: Clément Péron Signed-off-by: Maxime Ripard Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt | 1 + 1 file changed, 1 insertion(+) commit 2c41cc0be07b5ee2f1167f41cd8a86fc5b53d82c Author: Wen Yang Date: Mon May 6 03:05:15 2019 -0400 media: venus: firmware: fix leaked of_node references The call to of_parse_phandle returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings: drivers/media/platform/qcom/venus/firmware.c:90:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 82, but without a corresponding object release within this function. drivers/media/platform/qcom/venus/firmware.c:94:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 82, but without a corresponding object release within this function. drivers/media/platform/qcom/venus/firmware.c:128:1-7: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 82, but without a corresponding object release within this function. Signed-off-by: Wen Yang Acked-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/venus/firmware.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 4a96f5e10eb9490616b969d5f65a68f8508073e9 Author: Krzysztof Kozlowski Date: Sun May 5 11:11:09 2019 -0400 media: exynos4-is: Add missing of_node_put to fix reference leaks Drop the reference to "parallel-ports" and remote endpoint's parent nodes obtained previously with of_get_child_by_name() and of_get_parent() respectively. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/exynos4-is/media-dev.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 2f39cce963637eee1c58740859c7c63356c29099 Author: Bartlomiej Zolnierkiewicz Date: Fri Apr 12 06:27:40 2019 -0400 media: remove redundant 'default n' from Kconfig-s 'default n' is the default value for any bool or tristate Kconfig setting so there is no need to write it explicitly. Also since commit f467c5640c29 ("kconfig: only write '# CONFIG_FOO is not set' for visible symbols") the Kconfig behavior is the same regardless of 'default n' being present or not: ... One side effect of (and the main motivation for) this change is making the following two definitions behave exactly the same: config FOO bool config FOO bool default n With this change, neither of these will generate a '# CONFIG_FOO is not set' line (assuming FOO isn't selected/implied). That might make it clearer to people that a bare 'default n' is redundant. ... Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Mauro Carvalho Chehab drivers/media/Kconfig | 3 --- drivers/media/dvb-core/Kconfig | 3 --- drivers/media/dvb-frontends/Kconfig | 1 - drivers/media/pci/ddbridge/Kconfig | 1 - drivers/media/pci/dt3155/Kconfig | 1 - drivers/media/pci/ivtv/Kconfig | 2 -- drivers/media/platform/Kconfig | 12 ------------ drivers/media/platform/omap/Kconfig | 1 - drivers/media/platform/vicodec/Kconfig | 1 - drivers/media/platform/vimc/Kconfig | 1 - drivers/media/platform/vivid/Kconfig | 1 - drivers/media/radio/Kconfig | 1 - drivers/media/usb/s2255/Kconfig | 1 - drivers/media/v4l2-core/Kconfig | 2 -- 14 files changed, 31 deletions(-) commit 12c574d84c8e492320a4e75b2c1157f8b61e4092 Author: Axel Lin Date: Fri May 24 18:02:47 2019 +0800 regulator: slg51000: Remove unneeded regl_pdata from struct slg51000 Just use a local variable *ena_gpiod in slg51000_of_parse_cb instead. With this change, the struct slg51000_pdata can be removed. Signed-off-by: Axel Lin Signed-off-by: Mark Brown drivers/regulator/slg51000-regulator.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit 0a33d4feea748399c9341ff054c5f29c98393d35 Author: Axel Lin Date: Fri May 24 18:02:46 2019 +0800 regulator: slg51000: Constify slg51000_regl_ops and slg51000_switch_ops These regulator_ops variables never need to be modified, make them const so compiler can put them to .rodata. Signed-off-by: Axel Lin Signed-off-by: Mark Brown drivers/regulator/slg51000-regulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e718a3eb09ae491147ded7e2e923ba6de59f0b24 Author: Gustavo A. R. Silva Date: Thu May 23 11:07:48 2019 -0500 ASoC: qdsp6: q6core: Use struct_size() in kmemdup() Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes, in particular in the context in which this code is being used. So, replace code of the following form: sizeof(*fwk) + fwk->num_services * sizeof(fwk->svc_api_info[0]); with: struct_size(fwk, svc_api_info, fwk->num_services) and so on... Notice that variables bytes and len are unnecessary, hence they are removed. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Mark Brown sound/soc/qcom/qdsp6/q6core.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit d00cc2f16a41ee704113f9447f2d0a10ad4f0ec7 Author: Gustavo A. R. Silva Date: Thu May 23 17:23:33 2019 -0500 ASoC: Intel: Skylake: Use struct_size() helper Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes, in particular in the context in which this code is being used. So, replace the following form: uuid_params->num_modules * sizeof(struct skl_mod_inst_map) + sizeof(uuid_params->num_modules) with: struct_size(params, u.map, uuid_params->num_modules) and so on... This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-topology.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 07597910a9c02c0ce33b779b5c24c5407ee7bd48 Author: Gustavo A. R. Silva Date: Thu May 23 15:36:37 2019 -0500 ASoC: dapm: Use struct_size() in krealloc() One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct foo { int stuff; struct boo entry[]; }; instance = krealloc(instance, sizeof(struct foo) + count * sizeof(struct boo), GFP_KERNEL); Instead of leaving these open-coded and prone to type mistakes, use the new struct_size() helper: instance = krealloc(instance, struct_size(instance, entry, count), GFP_KERNEL); This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Mark Brown sound/soc/soc-dapm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b8bb535ae43ac42588a26d0781cb0f8360269dd5 Author: Pierre-Louis Bossart Date: Thu May 23 18:39:46 2019 -0500 ASoC: Intel: boards: remove unnecessary inclusion of skl.h We've used a standard interface for machine drivers for some time now, there is no need for this dependency on a Skylake-specific header Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/boards/glk_rt5682_max98357a.c | 1 - sound/soc/intel/boards/kbl_da7219_max98357a.c | 1 - sound/soc/intel/boards/kbl_da7219_max98927.c | 1 - sound/soc/intel/boards/skl_hda_dsp_common.c | 1 - 4 files changed, 4 deletions(-) commit 49bd61ebce5f2df9963352f5163f85af68c7a0ea Author: Manivannan Sadhasivam Date: Mon May 20 14:01:01 2019 +0530 pinctrl: Add pinconf support for BM1880 SoC Add pinconf support for Bitmain BM1880 SoC. Pinconf support includes pin bias, slew rate and schmitt trigger. Drive strength support will be added later. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-bm1880.c | 134 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) commit 752a74038dbd999c108f1c7474908f7501e246bb Author: Manivannan Sadhasivam Date: Mon May 20 14:01:00 2019 +0530 dt-bindings: pinctrl: Document pinconf bindings for BM1880 SoC Document pinconf bindings for Bitmain BM1880 SoC. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Linus Walleij .../bindings/pinctrl/bitmain,bm1880-pinctrl.txt | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit 8247b2474bbc376ef51e2662ecc1f7b26ba8e8df Author: Manivannan Sadhasivam Date: Mon May 20 14:00:59 2019 +0530 pinctrl: Rework the pinmux handling for BM1880 SoC Rework the BM1880 SoC pinmux handling by removing the BM1880_PINMUX_FUNCTION_MUX define and merging it with the BM1880_PINMUX_FUNCTION definition. Since the PWM muxing is handled by generic pin controller in the SoC itself, there is no need to have a dedicated code to do the muxing in PWM registers. So, lets club all pinmux handling in the same per pin mux handling code. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-bm1880.c | 323 ++++++++++++++++++--------------------- 1 file changed, 149 insertions(+), 174 deletions(-) commit 13531e5d359e30d9e3d1cabd246a24cf6fdf084a Author: Manivannan Sadhasivam Date: Mon May 20 14:00:57 2019 +0530 dt-bindings: pinctrl: Modify pinctrl memory map Earlier, the PWM registers were included as part of the pinctrl memory map, but this turned to be useless as the muxing is being handled by the SoC pin controller itself. So, lets modify the pinctrl memory map to reflect the same. Fixes: 07b734fbdea2 ("dt-bindings: pinctrl: Add BM1880 pinctrl binding") Signed-off-by: Manivannan Sadhasivam Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/bitmain,bm1880-pinctrl.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b22a7f85443e579367dfc2d7f4cb6aa863c3a709 Author: Jerome Brunet Date: Thu May 16 17:13:39 2019 +0200 pinctrl: meson: add output support in pinconf Add pinconf support for PIN_CONFIG_OUTPUT_ENABLE and PIN_CONFIG_OUTPUT in the meson pinctrl driver. Signed-off-by: Jerome Brunet Signed-off-by: Linus Walleij drivers/pinctrl/meson/pinctrl-meson.c | 182 ++++++++++++++++++++++++---------- 1 file changed, 127 insertions(+), 55 deletions(-) commit 1254db248fce4e2cf05a01c1c8df3b79745424c0 Author: Jerome Brunet Date: Thu May 16 17:13:38 2019 +0200 dt-bindings: pinctrl: meson: add output support in pinconf add support for the pinconf DT property output-enable, output-disable, output-low and output-high in the meson pinctrl driver. Signed-off-by: Jerome Brunet Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/meson,pinctrl.txt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 2c9239c125f0c657d2955780f364168d4c15aa8b Author: Alexandre Torgue Date: Fri May 10 17:45:26 2019 +0200 dt-bindings: pinctrl: Convert stm32 pinctrl bindings to json-schema Convert the STM32 pinctrl binding to DT schema format using json-schema. Signed-off-by: Alexandre Torgue Reviewed-by: Rob Herring Signed-off-by: Linus Walleij .../bindings/pinctrl/st,stm32-pinctrl.txt | 208 ---------------- .../bindings/pinctrl/st,stm32-pinctrl.yaml | 264 +++++++++++++++++++++ 2 files changed, 264 insertions(+), 208 deletions(-) commit 8eb2dfee9fb1277f635ce369ef8669df0ec421bc Author: Alexandre Torgue Date: Fri May 10 09:43:03 2019 +0200 pinctrl: stm32: add lock mechanism for irqmux selection GPIOs are split between several banks (A, B, ...) and each bank can have up to 16 lines. Those GPIOs could be used as interrupt lines thanks to exti lines. As there are only 16 exti lines, a mux is used to select which gpio line is connected to which exti line. Mapping is done as follow: -A0, B0, C0.. -->exti_line_0 (X0 selected by mux_0) -A1, B1, C1.. -->exti_line_1 (X1 selected by mux_1) ... This patch adds a protection to avoid overriding on mux_n for exti_line_n. Signed-off-by: Alexandre Torgue Signed-off-by: Linus Walleij drivers/pinctrl/stm32/pinctrl-stm32.c | 51 ++++++++++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) commit a45623ddd0520d43d16d9943efd3a851d7247e19 Author: Alexandre Torgue Date: Fri May 10 09:42:30 2019 +0200 pinctrl: stm32: Enable suspend/resume for stm32mp157c SoC Apply suspend/resume management for stm32mp157c MPU. Signed-off-by: Alexandre Torgue Signed-off-by: Linus Walleij drivers/pinctrl/stm32/pinctrl-stm32mp157.c | 5 +++++ 1 file changed, 5 insertions(+) commit e2f3cf18c3e2c98be382c54a5860eb2e418f0e02 Author: Alexandre Torgue Date: Fri May 10 09:42:29 2019 +0200 pinctrl: stm32: add suspend/resume management During power sequence, GPIO hardware registers could be lost if the power supply is switched off. Each device using pinctrl API is in charge of managing pins during suspend/resume sequences. But for pins used as gpio or irq stm32 pinctrl driver has to save the hardware configuration. Signed-off-by: Alexandre Torgue Signed-off-by: Linus Walleij drivers/pinctrl/stm32/pinctrl-stm32.c | 132 ++++++++++++++++++++++++++++++++++ drivers/pinctrl/stm32/pinctrl-stm32.h | 2 + 2 files changed, 134 insertions(+) commit ac5bdfdc0e1ccce0f23898f5500874e31198f5c2 Author: Douglas Anderson Date: Wed May 15 09:48:13 2019 -0700 platform/chrome: cros_ec_spi: Request the SPI thread be realtime All currently known ECs in the wild are very sensitive to timing. Specifically the ECs are known to drop a transfer if more than 8 ms passes from the assertion of the chip select until the transfer finishes. Let's use the new feature introduced in the patch (spi: Allow SPI devices to request the pumping thread be realtime") to request the SPI pumping thread be realtime. This means that if we get shunted off to the SPI thread for whatever reason we won't get downgraded to low priority. NOTES: - We still need to keep ourselves as high priority since the SPI core doesn't guarantee that all transfers end up on the pumping thread (in fact, it tries pretty hard to do them in the calling context). - If future Chrome OS ECs ever fix themselves to be less sensitive then we could consider adding a property (or compatible string) to not set this property. For now we need it across the board. Signed-off-by: Douglas Anderson Reviewed-by: Guenter Roeck Signed-off-by: Enric Balletbo i Serra drivers/platform/chrome/cros_ec_spi.c | 1 + 1 file changed, 1 insertion(+) commit 2a5f857291c3ab594873fcf3ada88bcc98465739 Merge: 7dadf88f8d4e 924b5867e7bd Author: Enric Balletbo i Serra Date: Fri May 24 11:30:17 2019 +0200 Merge tag 'spi-rt-pump' into chrome-platform/for-next Immutable branch between spi and chrome-platform for driver changes to allow setting spi pump to RT priority. Signed-off-by: Enric Balletbo i Serra commit 98e3e43b599d742c104864c6772a251025ffb52b Author: Takashi Sakamoto Date: Fri May 24 18:03:42 2019 +0900 ALSA: firewire-lib: refactoring to obsolete IR packet handler As a result of heavy refactoring based on IR context header, the packet handler becomes simpler. This commit merges the packet handler into function for IR context callback. The logic to parse IR context header and tracepoints event is split to a function. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/amdtp-stream.c | 76 ++++++++++++++++++++++--------------------- 1 file changed, 39 insertions(+), 37 deletions(-) commit 6bc1a2699b79d7449de3bdd9cfe704e5d698acff Author: Takashi Sakamoto Date: Fri May 24 18:03:41 2019 +0900 ALSA: firewire-lib: refactoring to obsolete IT packet handler As a result of heavy refactoring based on IT packet header, the packet handler becomes simpler. This commit merges the packet handler into function for IT context callback. The logic to build IT packet header and tracepoints event is split to a function. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/amdtp-stream.c | 62 +++++++++++++++++++++---------------------- 1 file changed, 31 insertions(+), 31 deletions(-) commit e703965a129cdd72ff74e248f8fbf0d617844527 Author: Takashi Sakamoto Date: Fri May 24 18:03:40 2019 +0900 ALSA: firewire-lib: fix inverted node IDs for amdtp_packet events The amdtp_packet events have inverted node IDs for src/dst. This commit fixes the bug. Fixes: 8d3f1fdf5211 ("ALSA: firewire-lib: unify tracing events to 'amdtp_packet' event") Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/amdtp-stream-trace.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3c194923154132836d143d9ba37f5ee94d790c75 Author: Takashi Sakamoto Date: Fri May 24 18:03:39 2019 +0900 ALSA: firewire-lib: fix data block counter for incoming packet without CIP header The value of data block counter is not calculated for incoming packet without CIP header. This commit fixes the bug. Fixes: 947b437e1263 ("ALSA: firewire-lib: unify packet handler for IR context") Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/amdtp-stream.c | 2 ++ 1 file changed, 2 insertions(+) commit 397049a03022702defa65694c23643f96d5fa113 Author: Dongwon Kim Date: Thu Apr 25 06:50:05 2019 +0100 drm/i915/gen11: enable support for headerless msgs Setting bit5 (headerless msg for preemptible GPGPU context) of SAMPLER_MODE register to enable support for the headless msgs on gen11. None of existing use cases will be affected by this as this change makes both types of message - headerless and w/ header supported at the same time. It also complies with the new recommendation for the default bit value for the next gen. v2: rewrote commit message to include more information v3: setting the bit in icl_ctx_workarounds_init() Signed-off-by: Dongwon Kim Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190425055005.21790-1-chris@chris-wilson.co.uk Signed-off-by: Chris Wilson drivers/gpu/drm/i915/gt/intel_workarounds.c | 4 ++++ drivers/gpu/drm/i915/i915_reg.h | 1 + 2 files changed, 5 insertions(+) commit 63e8dcdb4f8e596f2a290af4278e0bca3304a1f1 Author: Chris Wilson Date: Fri May 24 07:45:29 2019 +0100 drm/i915/gtt: Neuter the deferred unbind callback from gen6_ppgtt_cleanup Having deferred the vma destruction to a worker where we can acquire the struct_mutex, we have to avoid chasing back into the now destroyed ppgtt. The pd_vma is special in having a custom unbind function to scan for unused pages despite the VMA itself being notionally part of the GGTT. As such, we need to disable that callback to avoid a use-after-free. This unfortunately blew up so early during boot that CI declared the machine unreachable as opposed to being the major failure it was. Oops. Fixes: d3622099c76f ("drm/i915/gtt: Always acquire struct_mutex for gen6_ppgtt_cleanup") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Tomi Sarvela Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190524064529.20514-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 9371ea5e5918f9d9afd9464b2c2718ea51baa239 Author: Jerome Brunet Date: Mon Apr 29 12:23:25 2019 +0200 drm/meson: imply dw-hdmi i2s audio for meson hdmi Imply the i2s part of the Synopsys HDMI driver for Amlogic SoCs. This will enable the i2s part by default when meson hdmi driver is enable but let platforms not supported by the audio subsystem disable it if necessary. Signed-off-by: Jerome Brunet Reviewed-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20190429102325.29022-1-jbrunet@baylibre.com drivers/gpu/drm/meson/Kconfig | 1 + 1 file changed, 1 insertion(+) commit fa6251a747b7e252f9446342fc54dbe19b51350f Author: Yannick Fertré Date: Fri May 10 17:02:59 2019 +0200 drm/stm: dsi: check hardware version Check version of DSI hardware IP. Only versions 1.30 & 1.31 are supported. Signed-off-by: Yannick Fertré Acked-by: Philippe Cornu Signed-off-by: Benjamin Gaignard Link: https://patchwork.freedesktop.org/patch/msgid/1557500579-19720-1-git-send-email-yannick.fertre@st.com drivers/gpu/drm/stm/dw_mipi_dsi-stm.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) commit fd6905fca4f013463026ca1a07fee463fbf0d974 Author: Yannick Fertré Date: Fri May 10 17:03:20 2019 +0200 drm/stm: ltdc: remove clk_round_rate comment Clk_round_rate returns rounded clock without changing the hardware in any way. This function couldn't replace set_rate/get_rate calls. Todo comment has been removed & a new log inserted. Signed-off-by: Yannick Fertré Signed-off-by: Benjamin Gaignard Link: https://patchwork.freedesktop.org/patch/msgid/1557500600-19771-1-git-send-email-yannick.fertre@st.com drivers/gpu/drm/stm/ltdc.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 324e8f5f5d9d4d0b9a608b2fdb88cd93b0fbb12a Author: Johan Hovold Date: Fri Apr 26 07:59:25 2019 +0200 tty: cpm_uart: drop unused iflag macro Drop the RELEVANT_IFLAG() macro which hasn't been used at least since the dawn of git. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/cpm_uart/cpm_uart_core.c | 2 -- 1 file changed, 2 deletions(-) commit b95781666d138ebf08cec46e58666ab8fbc37b9f Author: Johan Hovold Date: Fri Apr 26 07:59:24 2019 +0200 tty: ipoctal: drop unused iflag macro Drop the RELEVANT_IFLAG() macro which has never been used. Cc: Samuel Iglesias Gonsalvez Cc: Jens Taprogge Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/ipack/devices/ipoctal.h | 1 - 1 file changed, 1 deletion(-) commit 92c42b492af5f37e7306c6fd42b46f7a0c5fd5e4 Author: Johan Hovold Date: Fri Apr 26 07:59:23 2019 +0200 tty: simserial: drop unused iflag macro Drop the RELEVANT_IFLAG() macro which hasn't been used for over a decade. Cc: Fenghua Yu Signed-off-by: Johan Hovold Acked-by: Tony Luck Signed-off-by: Greg Kroah-Hartman arch/ia64/hp/sim/simserial.c | 2 -- 1 file changed, 2 deletions(-) commit 8c8af41d24c73c6a8b24468bdc53e52b390e4582 Author: Lin Yi Date: Fri May 10 12:22:57 2019 +0800 tty: tty_io: fix driver refcount imbalance on error path tty_lookup_driver take a reference to the struct tty_driver, but forget to release it on the error path, lead to a memory leak. add a tty_driver_kref_put before error return. Signed-off-by: Lin Yi Signed-off-by: Greg Kroah-Hartman drivers/tty/tty_io.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit b672a87ae5ab0704364781214bb1251b75cbef1b Author: Linus Walleij Date: Fri May 24 00:11:43 2019 +0200 pinctrl: core: Do not add device links for hogs Hogs would create circular device links, so do not link the device to itself. Cc: Benjamin Gaignard Signed-off-by: Linus Walleij drivers/pinctrl/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 5e309c6c5ea12515616a4835b7fa2141c8016c94 Author: Grzegorz Halat Date: Fri Apr 26 16:59:46 2019 +0200 vt/fbcon: deinitialize resources in visual_init() after failed memory allocation After memory allocation failure vc_allocate() doesn't clean up data which has been initialized in visual_init(). In case of fbcon this leads to divide-by-0 in fbcon_init() on next open of the same tty. memory allocation in vc_allocate() may fail here: 1097: vc->vc_screenbuf = kzalloc(vc->vc_screenbuf_size, GFP_KERNEL); on next open() fbcon_init() skips vc_font.data initialization: 1088: if (!p->fontdata) { division by zero in fbcon_init() happens here: 1149: new_cols /= vc->vc_font.width; Additional check is needed in fbcon_deinit() to prevent usage of uninitialized vc_screenbuf: 1251: if (vc->vc_hi_font_mask && vc->vc_screenbuf) 1252: set_vc_hi_font(vc, false); Crash: #6 [ffffc90001eafa60] divide_error at ffffffff81a00be4 [exception RIP: fbcon_init+463] RIP: ffffffff814b860f RSP: ffffc90001eafb18 RFLAGS: 00010246 ... #7 [ffffc90001eafb60] visual_init at ffffffff8154c36e #8 [ffffc90001eafb80] vc_allocate at ffffffff8154f53c #9 [ffffc90001eafbc8] con_install at ffffffff8154f624 ... Signed-off-by: Grzegorz Halat Reviewed-by: Oleksandr Natalenko Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/vt.c | 11 +++++++++-- drivers/video/fbdev/core/fbcon.c | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) commit 84ecc2f6eb1cb12e6d44818f94fa49b50f06e6ac Author: Gen Zhang Date: Thu May 23 08:34:52 2019 +0800 consolemap: Fix a memory leaking bug in drivers/tty/vt/consolemap.c In function con_insert_unipair(), when allocation for p2 and p1[n] fails, ENOMEM is returned, but previously allocated p1 is not freed, remains as leaking memory. Thus we should free p1 as well when this allocation fails. Signed-off-by: Gen Zhang Reviewed-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/consolemap.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 06aaa3d066db87e8478522d910285141d44b1e58 Author: Christophe Leroy Date: Wed May 22 12:17:11 2019 +0000 tty: serial: cpm_uart - fix init when SMC is relocated SMC relocation can also be activated earlier by the bootloader, so the driver's behaviour cannot rely on selected kernel config. When the SMC is relocated, CPM_CR_INIT_TRX cannot be used. But the only thing CPM_CR_INIT_TRX does is to clear the rstate and tstate registers, so this can be done manually, even when SMC is not relocated. Signed-off-by: Christophe Leroy Fixes: 9ab921201444 ("cpm_uart: fix non-console port startup bug") Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/cpm_uart/cpm_uart_core.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 2c58e56096dd011ea43f29a032d19b0e76fe2570 Author: Erwan Le Ray Date: Tue May 21 17:45:47 2019 +0200 serial: stm32: fix the get_irq error case Checks the returned values of platform_get_irq() for both required "event" and optional "wakeup" IRQs during probe. This allows the driver probe to be deferred if needed. Removes redundant checks for 'cfg.has_wakeup'. Signed-off-by: Fabien Dessenne Signed-off-by: Erwan Le Ray Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/stm32-usart.c | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) commit 5297f274e8b61ceb9676cba6649d3de9d03387ad Author: Erwan Le Ray Date: Tue May 21 17:45:46 2019 +0200 serial: stm32: fix wakeup source initialization Fixes dedicated_irq_wakeup issue and deactivated uart as wakeup source by default. Fixes: 270e5a74fe4c ("serial: stm32: add wakeup mechanism") Signed-off-by: Erwan Le Ray Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/stm32-usart.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) commit 64c32eab660386f9904bb295a104c9c425e9f8b2 Author: Erwan Le Ray Date: Tue May 21 17:45:45 2019 +0200 serial: stm32: Add support of TC bit status check Adds a check on the Transmission Complete bit status before closing the com port. Prevents the port closure before the end of the transmission. TC poll loop is moved from stm32_tx_dma_complete to stm32_shutdown routine, in order to check TC before shutdown in both dma and PIO tx modes. TC clear is added in stm32_transmit_char routine, in order to be cleared before transmitting in both dma and PIO tx modes. Fixes: 3489187204eb ("serial: stm32: adding dma support") Signed-off-by: Erwan Le Ray Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/stm32-usart.c | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) commit b83b957c91f68e53f0dc596e129e8305761f2a32 Author: Erwan Le Ray Date: Tue May 21 17:45:44 2019 +0200 serial: stm32: fix transmit_chars when tx is stopped Disables the tx irq when the transmission is ended and updates stop_tx conditions for code cleanup. Fixes: 48a6092fb41f ("serial: stm32-usart: Add STM32 USART Driver") Signed-off-by: Erwan Le Ray Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/stm32-usart.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 6c5962f30bce147b1c83869085f3ddde3b34c9e3 Author: Erwan Le Ray Date: Tue May 21 17:45:43 2019 +0200 serial: stm32: fix rx data length when parity enabled - Fixes a rx data error when data length < 8 bits and parity is enabled. RDR register MSB is used for parity bit reception. - Adds a mask to ignore MSB when data is get from RDR. Fixes: 3489187204eb ("serial: stm32: adding dma support") Signed-off-by: Erwan Le Ray Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/stm32-usart.c | 12 ++++++++---- drivers/tty/serial/stm32-usart.h | 1 + 2 files changed, 9 insertions(+), 4 deletions(-) commit 4f01d833fdcdd6f9b85d9e5d5d7568eb683626a7 Author: Erwan Le Ray Date: Tue May 21 17:45:42 2019 +0200 serial: stm32: fix rx error handling - Fixes parity and framing error bit by clearing parity and framing error flag. The current implementation doesn't clear the error bits when an error is detected. - Fixes the incorrect name of framing error clearing flag in header file. - Fixes misalignement between data frame and errors status. The status read for "n" frame was the status of "n+1" frame". - Fixes break detection was not triggered by the expected register. Fixes: 48a6092fb41f ("serial: stm32-usart: Add STM32 USART Driver") Signed-off-by: Erwan Le Ray Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/stm32-usart.c | 54 ++++++++++++++++++++++++++-------------- drivers/tty/serial/stm32-usart.h | 10 ++------ 2 files changed, 37 insertions(+), 27 deletions(-) commit c8a9d043947b4acb19a65f7fac2bd0893e581cd5 Author: Erwan Le Ray Date: Tue May 21 17:45:41 2019 +0200 serial: stm32: fix word length configuration STM32 supports either: - 8 and 9 bits word length (including parity bit) for stm32f4 compatible devices - 7, 8 and 9 bits word length (including parity bit) for stm32f7 and stm32h7 compatible devices. As a consequence STM32 supports the following termios configurations: - CS7 with parity bit, and CS8 (with or without parity bit) for stm32f4 compatible devices. - CS6 with parity bit, CS7 and CS8 (with or without parity bit) for stm32f7 and stm32h7 compatible devices. This patch is fixing word length by configuring correctly the SoC with supported configurations. Fixes: ada8618ff3bf ("serial: stm32: adding support for stm32f7") Signed-off-by: Erwan Le Ray Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/stm32-usart.c | 56 +++++++++++++++++++++++++++++++++++----- drivers/tty/serial/stm32-usart.h | 3 +-- 2 files changed, 50 insertions(+), 9 deletions(-) commit 086ebf92aa791b6cc8805decffca7b8898d99a4e Author: Weitao Hou Date: Thu May 23 19:52:08 2019 +0800 usb: avoid redundant allocation and free of memory If usb is not attached, it's unnessary to allocate, copy and free memory Signed-off-by: Weitao Hou Signed-off-by: Greg Kroah-Hartman drivers/usb/core/devio.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 909fa3321d348ef69366aad9e84e1dd9ee0bd060 Author: Stephen Rothwell Date: Thu May 23 13:21:51 2019 +0200 dt-bindings: fix up for vendor prefixes file conversion Link: Link: http://patchwork.freedesktop.org/patch/msgid/20190521105151.51ffa942@canb.auug.org.au Fixes: 374ed5429346 ("Merge drm/drm-next into drm-misc-next") Signed-off-by: Stephen Rothwell Signed-off-by: Maxime Ripard .../devicetree/bindings/vendor-prefixes.txt | 468 --------------------- .../devicetree/bindings/vendor-prefixes.yaml | 6 + 2 files changed, 6 insertions(+), 468 deletions(-) commit c0090c4c85c27d1fa3d785c935501b7207cd2869 Author: Anders Roxell Date: Thu May 16 21:13:26 2019 +0200 locking/lockdep: Remove the unused print_lock_trace() function gcc warns that function print_lock_trace() is unused if CONFIG_PROVE_LOCKING isn't set: ../kernel/locking/lockdep.c:2820:13: warning: ‘print_lock_trace’ defined but not used [-Wunused-function] Rework so we remove the function if CONFIG_PROVE_LOCKING isn't set. Signed-off-by: Anders Roxell Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: will.deacon@arm.com Fixes: c120bce78065 ("lockdep: Simplify stack trace handling") Link: http://lkml.kernel.org/r/20190516191326.27003-1-anders.roxell@linaro.org Signed-off-by: Ingo Molnar kernel/locking/lockdep.c | 4 ---- 1 file changed, 4 deletions(-) commit b18f0cfaf16bee36bc4d3cab6771c7d74ed472ac Author: Takashi Sakamoto Date: Fri May 24 00:14:40 2019 +0900 ALSA: firewire-lib: use 8 byte packet header for IT context to separate CIP header from CIP payload In Linux firewire subsystem, for IT context, some quadlets of isochronous packet payload can be indicated as a part of packet header to queue to the context. This commit uses the packet header to split CIP headers from CIP payload. As a result, regardless of CIP or non-CIP, context payload includes data blocks only. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/amdtp-stream.c | 63 ++++++++++++++++++++++++------------------- 1 file changed, 35 insertions(+), 28 deletions(-) commit 6007bf5460cc3b6c63feed5084047b9cc2517eb0 Author: Takashi Sakamoto Date: Fri May 24 00:14:39 2019 +0900 ALSA: firewire-lib: code refactoring to queueing packets This commit is a preparation to queue IT packet with header. To enable packet handler to fill the header, this commit uses kernel stack for data structure of packet parameter in several part of this file. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/amdtp-stream.c | 54 +++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 28 deletions(-) commit 16be458993be75ca255cee176df47955608b4df8 Author: Takashi Sakamoto Date: Fri May 24 00:14:38 2019 +0900 ALSA: firewire-lib: unify packet handler for IT context The handlers for packet with CIP and without CIP include common codes. This commit unifies them and remove an member for pointer to callback function from data structure. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/amdtp-stream.c | 59 +++++++++++++------------------------------ sound/firewire/amdtp-stream.h | 3 --- 2 files changed, 18 insertions(+), 44 deletions(-) commit 252219c7b38c76b0da374d5197cc825772fd487d Author: Takashi Sakamoto Date: Fri May 24 00:14:37 2019 +0900 ALSA: firewire-lib: split helper function to generate CIP header This is minor code refactoring to split a function to generate CIP header. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/amdtp-stream.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) commit 75b785e749e9abc6c6c8f0697cfd22b87c150ecb Author: Simon Sandström Date: Thu May 23 14:51:43 2019 +0200 staging: kpc2000: remove unnecessary oom message Fixes checkpatch.pl warning "Possible unnecessary 'out of memory' message". Signed-off-by: Simon Sandström Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/cell_probe.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit f8f31e5b76dae49a6226f6f97316cf64dbb1b375 Author: Simon Sandström Date: Thu May 23 14:51:42 2019 +0200 staging: kpc2000: remove unnecessary include in cell_probe.c Fixes checkpatch.pl warning "Use #include instead of ". Signed-off-by: Simon Sandström Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/cell_probe.c | 1 - 1 file changed, 1 deletion(-) commit ec09500e9cb76a278099d32596dae33a48e8ae0b Author: Simon Sandström Date: Thu May 23 14:51:41 2019 +0200 staging: kpc2000: remove unnecessary braces in cell_probe.c Fixes checkpatch.pl warnings "braces {} are not necessary for single statement blocks". Signed-off-by: Simon Sandström Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/cell_probe.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 77290d4b7c0d78f73e6af047344f43b01c176321 Author: Simon Sandström Date: Thu May 23 14:51:40 2019 +0200 staging: kpc2000: use kzalloc(sizeof(var)...) in cell_probe.c Fixes checkpatch.pl warning "Prefer kzalloc(sizeof(*kudev)...) over kzalloc(sizeof(struct kpc_uio_device)...)" Signed-off-by: Simon Sandström Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/cell_probe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 42143af99d2b8d880c7523a491e5e166e4cfd800 Author: Simon Sandström Date: Thu May 23 14:51:39 2019 +0200 staging: kpc2000: remove extra blank lines in cell_probe.c Fixes checkpatch.pl warnings "Please don't use multiple blank lines". Signed-off-by: Simon Sandström Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/cell_probe.c | 4 ---- 1 file changed, 4 deletions(-) commit 4f9d8b7e0ffd1e030350b4f8acda1d1446ead039 Author: Simon Sandström Date: Thu May 23 14:51:38 2019 +0200 staging: kpc2000: fix alignment issues in cell_probe.c Fixes checkpatch.pl warnings "Alignment should match open parenthesis" and "Lines should not end with a '('". Signed-off-by: Simon Sandström Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/cell_probe.c | 34 ++++++++++++---------------- 1 file changed, 15 insertions(+), 19 deletions(-) commit 250b24410b8eed30a22afbc19826e3a0dece1f83 Author: Simon Sandström Date: Thu May 23 14:51:37 2019 +0200 staging: kpc2000: add missing asterisk in comment Fixes checkpatch.pl error "code indent should use tabs where possible". Signed-off-by: Simon Sandström Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/cell_probe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 39cfdf55aadc6c05cae4286d7b685bea2102ad8c Author: Simon Sandström Date: Thu May 23 14:51:36 2019 +0200 staging: kpc2000: use __func__ in debug messages Fixes checkpatch.pl warning "Prefer using '"%s...", __func__' to using '', this function's name, in a string". Signed-off-by: Simon Sandström Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/cell_probe.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit 9876ecaadddecc2f386d101fcfb5d02e4043e473 Author: Simon Sandström Date: Thu May 23 14:51:35 2019 +0200 staging: kpc2000: add blank line after declarations Fixes checkpatch.pl warning "Missing a blank line after declarations". Signed-off-by: Simon Sandström Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/cell_probe.c | 4 ++++ 1 file changed, 4 insertions(+) commit 48c80ccce63ff50f17b774131c9bd1cdb875d305 Author: Nishka Dasgupta Date: Thu May 23 18:23:41 2019 +0530 staging: pi433: Remove unnecessary variable The variable retval is assigned constant values twice, and can therefore be replaced by its values. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/pi433/pi433_if.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 9db9b76767f133d0e1ce19f01117c83221641899 Author: Ira Weiny Date: Mon May 20 13:52:53 2019 -0700 Documentation/x86: Fix path to entry_32.S Signed-off-by: Ira Weiny Cc: Jonathan Corbet Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-doc@vger.kernel.org Link: http://lkml.kernel.org/r/20190520205253.23762-1-ira.weiny@intel.com [ Adjusted the patch to the RST conversion. ] Signed-off-by: Ingo Molnar Documentation/x86/exception-tables.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7231d0165df3754ec90a2868a026a146401ec751 Author: Steven Rostedt (VMware) Date: Thu May 23 10:23:25 2019 -0400 x86/asm: Remove unused TASK_TI_flags from asm-offsets.c Since commit: 21d375b6b34ff5 ("x86/entry/64: Remove the SYSCALL64 fast path") there is no user of TASK_TI_flags in assembly. There's no need to keep it around in asm-offsets.c Signed-off-by: Steven Rostedt (VMware) Cc: Andy Lutomirski Cc: Borislav Petkov Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20190523102325.22eacdf7@gandalf.local.home Signed-off-by: Ingo Molnar arch/x86/kernel/asm-offsets.c | 1 - 1 file changed, 1 deletion(-) commit c2d64c7ec4de6385150aa79570c438b4ba49c243 Author: Masahiro Yamada Date: Tue May 21 16:22:11 2019 +0900 x86/io_delay: Define IO_DELAY macros in C instead of Kconfig CONFIG_IO_DELAY_TYPE_* are not kernel configuration at all. They just define constant values, 0, 1, 2, and 3. Define them by #define in C. CONFIG_DEFAULT_IO_DELAY_TYPE can also be defined in C by using #ifdef and #define directives. Signed-off-by: Masahiro Yamada Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20190521072211.21014-2-yamada.masahiro@socionext.com Signed-off-by: Ingo Molnar arch/x86/Kconfig.debug | 44 -------------------------------------------- arch/x86/kernel/io_delay.c | 37 ++++++++++++++++++++++++++----------- 2 files changed, 26 insertions(+), 55 deletions(-) commit e62a4239c3dfd182a7e676cfe9efb1f4cec5ca25 Author: Masahiro Yamada Date: Tue May 21 16:22:10 2019 +0900 x86/io_delay: Break instead of fallthrough in switch statement The current code is fine since 'case CONFIG_IO_DELAY_TYPE_NONE' does nothing, but scripts/checkpatch.pl complains about this: warning: Possible switch case/default not preceded by break or fallthrough comment I like break statement better than a fallthrough comment here. It avoids the warning and clarify the code. No behavior change is intended. Signed-off-by: Masahiro Yamada Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20190521072211.21014-1-yamada.masahiro@socionext.com Signed-off-by: Ingo Molnar arch/x86/kernel/io_delay.c | 1 + 1 file changed, 1 insertion(+) commit 978315462d3ea3cf6cfacd34c563ec1eb02a3aa5 Author: Sebastian Andrzej Siewior Date: Fri May 17 23:22:34 2019 +0200 locking/lockdep: Don't complain about incorrect name for no validate class It is possible to ignore the validation for a certain lock by using: lockdep_set_novalidate_class() on it. Each invocation will assign a new name to the class it created for created __lockdep_no_validate__. That means that once lockdep_set_novalidate_class() has been used on two locks then class->name won't match lock->name for the first lock triggering the warning. So ignore changed non-matching ->name pointer for the special __lockdep_no_validate__ class. Signed-off-by: Sebastian Andrzej Siewior Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Will Deacon Link: http://lkml.kernel.org/r/20190517212234.32611-1-bigeasy@linutronix.de Signed-off-by: Ingo Molnar kernel/locking/lockdep.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e4e07c6cdca8a837ab40363fc8002cf62965a628 Author: Philippe Bekaert Date: Thu May 23 23:56:49 2019 +0200 ALSA: hdspm: Fix single speed ADAT capture and playback with RME HDSPe AIO By taking into account the mapping from logical to DMA channels when enabling or disabling audio channels, ADAT channels 3 to 8 on the RME HDSPe AIO card are now correctly captured and played back in single speed mode. Since the mapping is an identity mapping for all cards except AIO and RayDAT, only those cards should be affected by this patch. It was tested on an AIO card. The patch needs testing on other cards, in particular RayDAT. Note: this patch does not solve ADAT capture and playback issues in double or triple speed mode. That seems to be another problem. Signed-off-by: Philippe Bekaert Signed-off-by: Takashi Iwai sound/pci/rme9652/hdspm.c | 61 ++++++++++++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 25 deletions(-) commit 92bfa664ae133d13a3496f71f5c7c7f4d4827a88 Author: Gustavo A. R. Silva Date: Thu May 23 15:29:17 2019 -0500 ALSA: pcm: oss: Use struct_size() helper Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes, in particular in the context in which this code is being used. So, replace the following form: sizeof(struct rate_priv) + src_format->channels * sizeof(struct rate_channel) with: struct_size(data, channels, src_format->channels) This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Takashi Iwai sound/core/oss/rate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dfb569f2b96e2075bdf80883677d40d86f6b19db Author: Esben Haabendal Date: Fri May 24 07:24:42 2019 +0200 net: ll_temac: Fix compile error Fixes: 1b3fa5cf859b ("net: ll_temac: Cleanup multicast filter on change") Signed-off-by: Esben Haabendal Signed-off-by: David S. Miller drivers/net/ethernet/xilinx/ll_temac_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 130413736376e299e77328760209fd3307d02201 Author: Hongwei Zhang Date: Tue May 21 17:47:44 2019 -0400 ARM: dts: aspeed: Add Microsoft Olympus BMC Olympus is a Microsoft OCP platform equipped with Aspeed 1250 or 2400 BMC SoC. Signed-off-by: Hongwei Zhang Reviewed-by: Andrew Jeffery Signed-off-by: Joel Stanley arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/aspeed-bmc-microsoft-olympus.dts | 207 +++++++++++++++++++++ 2 files changed, 208 insertions(+) commit 9831ae33750db5341bcfcb3a54758e016dfc0c81 Author: Andrew Peng Date: Sun May 5 14:08:38 2019 +0800 ARM: dts: aspeed: Adding Lenovo Hr630 BMC Initial introduction of Lenovo Hr630 family equipped with Aspeed 2500 BMC SoC. Hr630 is a x86 server development kit with a ASPEED ast2500 BMC manufactured by Lenovo. Signed-off-by: Andrew Peng Signed-off-by: Yonghui Liu Signed-off-by: Lisa Liu Reviewed-by: Andrew Jeffery Reviewed-by: Patrick Venture Signed-off-by: Joel Stanley arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/aspeed-bmc-lenovo-hr630.dts | 566 ++++++++++++++++++++++++++ 2 files changed, 567 insertions(+) commit e39e134d31b22f5c8712d0d2926c6ae8dcbdbc8f Author: Tao Ren Date: Wed May 8 20:55:49 2019 -0700 ARM: dts: aspeed: Add Facebook YAMP BMC Add initial version of device tree for Facebook YAMP ast2500 BMC. Signed-off-by: Tao Ren Acked-by: Andrew Jeffery Signed-off-by: Joel Stanley arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/aspeed-bmc-facebook-yamp.dts | 160 +++++++++++++++++++++++++ 2 files changed, 161 insertions(+) commit 56b646284b9528e4e7e1e0923ace7c2a528a0e4f Author: Adriana Kobylak Date: Mon May 20 15:17:15 2019 -0500 ARM: dts: aspeed: swift: Add pca9539 devices Add the pca9539 devices to the Swift device tree. Signed-off-by: Adriana Kobylak Reviewed-by: Brandon Wyman Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-bmc-opp-swift.dts | 146 +++++++++++++++++++++++++++++ 1 file changed, 146 insertions(+) commit 8e8fd0cbd7c5936ea2d6dc25ef127dea5f5913b3 Author: Adriana Kobylak Date: Mon May 6 15:49:14 2019 -0500 ARM: dts: aspeed: Add Swift BMC machine The Swift BMC is an ASPEED ast2500 based BMC that is part of a Power9 server. This adds the device tree description for most upstream components. Signed-off-by: Adriana Kobylak Reviewed-by: Brandon Wyman Signed-off-by: Joel Stanley arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/aspeed-bmc-opp-swift.dts | 820 +++++++++++++++++++++++++++++ 2 files changed, 821 insertions(+) commit b853ab0fa2e1404c0bbe4160017f3741c7394b1b Author: Tao Ren Date: Wed May 8 20:43:34 2019 -0700 ARM: dts: aspeed: cmm: enable ehci host controllers Enable ehci0 and ehci1 USB host controllers on Facebook Backpack CMM BMC. Signed-off-by: Tao Ren Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-bmc-facebook-cmm.dts | 8 ++++++++ 1 file changed, 8 insertions(+) commit b2cc26af46b4edada51449135b805706c71d73c8 Author: Robert Lippert Date: Tue Apr 16 09:21:51 2019 -0700 ARM: dts: aspeed: zaius: fixed I2C bus numbers for pcie slots The change to include ibm-power9-cfam.dtsi resulted in a renumbering of all of the I2C bus numbers behind the on-board muxes. This breaks some tools which have hardcoded the bus numbers. Add device tree aliases for the I2C buses routed through the PCIe slots so that they return to their former numbers before the cfam change. Signed-off-by: Robert Lippert Signed-off-by: Patrick Venture Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts | 40 ++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit 66daab2432134aa83c41cbaceabbc875d0810b2b Author: Robert Lippert Date: Tue Apr 16 09:21:50 2019 -0700 ARM: dts: aspeed: zaius: update 12V brick I2C address The I2C address of the brick is different depending on the board SKU. Update the values to instantiate addresses which work for most boards. Signed-off-by: Robert Lippert Signed-off-by: Patrick Venture Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit 9deea07ed8a291648b867c5e50094975496f5014 Author: Maxim Sloyko Date: Tue Apr 16 09:21:49 2019 -0700 ARM: dts: aspeed: zaius: add Infineon and Intersil regulators Add the nodes for the ir38064 and isl68137 devices on the Zaius board. Signed-off-by: Maxim Sloyko Signed-off-by: Robert Lippert Signed-off-by: Patrick Venture Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts | 65 +++++++++++++++++++++++++++--- 1 file changed, 60 insertions(+), 5 deletions(-) commit 29b871f344f43ef428aa55ee9ed2a76b5bee0f87 Author: Patrick Venture Date: Thu Apr 25 12:49:03 2019 -0700 ARM: dts: aspeed: quanta-q71: Enable p2a node Enable the aspeed-p2a-ctrl node and configure with memory-region to enable mmap access. Signed-off-by: Patrick Venture Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-bmc-quanta-q71l.dts | 5 +++++ 1 file changed, 5 insertions(+) commit 0215e2a5468319c58943b60b78b74dd3f3ab92fd Author: Patrick Venture Date: Thu Apr 25 12:48:53 2019 -0700 ARM: dts: aspeed: Add aspeed-p2a-ctrl node Add a node for the aspeed-p2a-ctrl module. This node, when enabled will disable the PCI-to-AHB bridge and then allow control of this bridge via ioctls, and access via mmap. Signed-off-by: Patrick Venture Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-g4.dtsi | 4 ++++ arch/arm/boot/dts/aspeed-g5.dtsi | 5 +++++ 2 files changed, 9 insertions(+) commit 8bc7d3ed7cf4a1d44e63301c44bcbd41e6f50f65 Author: Benjamin Herrenschmidt Date: Thu Apr 4 15:13:44 2019 +1030 ARM: dts: aspeed: Add Power9 and Power9 CFAM description To be used by the OpenPower BMC machines. This provides proper chip IDs but also adds the various sub-devices necessary for the future OCC driver among other. All the added nodes comply with the existing upstream FSI bindings. Signed-off-by: Benjamin Herrenschmidt Reviewed-by: Andrew Jeffery Acked-by: Jeremy Kerr Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-bmc-opp-lanyang.dts | 2 + arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts | 22 ++ arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts | 2 + arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts | 2 + arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts | 2 + arch/arm/boot/dts/ibm-power9-dual.dtsi | 248 +++++++++++++++++++++++ 6 files changed, 278 insertions(+) commit 459a6a2f25171b74d3cb7007931f01477736ef4c Author: Joel Stanley Date: Fri Apr 5 14:02:30 2019 +1030 ARM: dts: aspeed: Rename flash-controller nodes The device tree compiler has started spitting out warnings about these names, insisting they be called 'spi': ../arch/arm/boot/dts/aspeed-g5.dtsi:108.35-128.5: Warning (spi_bus_bridge): /ahb/flash-controller@1e631000: node name for SPI buses should be 'spi' Reviewed-by: Cédric Le Goater Reviewed-by: Andrew Jeffery Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-g4.dtsi | 4 ++-- arch/arm/boot/dts/aspeed-g5.dtsi | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) commit bf361231c295d92a28ca283ea713f56e93e55796 Author: Richard Guy Briggs Date: Thu May 9 20:01:36 2019 -0400 audit: add saddr_fam filter field Provide a method to filter out sockaddr and bind calls by network address family. Existing SOCKADDR records are listed for any network activity. Implement the AUDIT_SADDR_FAM field selector to be able to classify or limit records to specific network address families, such as AF_INET or AF_INET6. An example of a network record that is unlikely to be useful and flood the logs: type=SOCKADDR msg=audit(07/27/2017 12:18:27.019:845) : saddr={ fam=local path=/var/run/nscd/socket } type=SYSCALL msg=audit(07/27/2017 12:18:27.019:845) : arch=x86_64 syscall=connect success=no exit=ENOENT(No such file or directory) a0=0x3 a1=0x7fff229c4980 a2=0x6e a3=0x6 items=1 ppid=3301 pid=6145 auid=sgrubb uid=sgrubb gid=sgrubb euid=sgrubb suid=sgrubb fsuid=sgrubb egid=sgrubb sgid=sgrubb fsgid=sgrubb tty=pts3 ses=4 comm=bash exe=/usr/bin/bash subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=network-test Please see the audit-testsuite PR at https://github.com/linux-audit/audit-testsuite/pull/87 Please see the github issue https://github.com/linux-audit/audit-kernel/issues/64 Please see the github issue for the accompanying userspace support https://github.com/linux-audit/audit-userspace/issues/93 Signed-off-by: Richard Guy Briggs [PM: merge fuzz in auditfilter.c] Signed-off-by: Paul Moore include/uapi/linux/audit.h | 1 + kernel/auditfilter.c | 5 +++++ kernel/auditsc.c | 5 +++++ 3 files changed, 11 insertions(+) commit ecc68904a3e5efb07cb4f0b97d15c7e0e4623d13 Author: Richard Guy Briggs Date: Wed May 22 17:51:09 2019 -0400 audit: re-structure audit field valid checks Multiple checks were being done in one switch case statement that started to cause some redundancies and awkward exceptions. Separate the valid field and op check from the select valid values checks. Enforce the elimination of meaningless bitwise and greater/lessthan checks on string fields and other fields with unrelated scalar values. Please see the github issue https://github.com/linux-audit/audit-kernel/issues/73 Signed-off-by: Richard Guy Briggs Signed-off-by: Paul Moore kernel/auditfilter.c | 56 +++++++++++++++++++++++++++++++--------------------- 1 file changed, 34 insertions(+), 22 deletions(-) commit 884714ce1698b2d0b9aa083d5fa723c567c6d8ab Merge: 9395da4efbd4 feee3cb3064a Author: David S. Miller Date: Thu May 23 17:52:43 2019 -0700 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 100GbE Intel Wired LAN Driver Updates 2019-05-23 This series contains updates to ice driver only. Anirudh cleans up white space issues and other code formatting issues in the driver. Also implemented LLDP persistence across reboots and start/stop of the LLDP agent. Updated print statements for driver capabilities to include if it is a device or function capability. Bruce cleaned up variable declarations by removing unneeded assignment. Dave fixes a potential hang due to a couple of flows that recursively acquire the RTNL lock which results in a deadlock. Tony updates the driver to advertise what link modes we are capable of when the user does not request a specific link mode. Usha fixes up the LLDP MIB change event handling by cleaning up workarounds and print the DCB configuration changes detected. Brett fixes the driver to handle failures in the VF reset path, which was failing to free resources upon an error. Richard fixed the reported of stats via ethtool to align with our other Intel drivers. Jesse optimizes the transmit buffer and ring structures to have more efficient ordering to get hot cache lines to have packed data. Also optimized the VF structure to use less memory, since it is used hundreds of times throughout the driver. ==================== Signed-off-by: David S. Miller commit 30d5a945743cd05ec5c847f2e38c2fbda5e00944 Author: Stephen Boyd Date: Thu May 23 17:11:57 2019 -0700 clk: Unexport __clk_of_table This symbol doesn't need to be exported to clk providers anymore. Originally, it was hidden inside clk.c, but then OMAP needed to get access to it in commit 819b4861c18d ("CLK: ti: add init support for clock IP blocks"), but eventually that code also changed in commit c08ee14cc663 ("clk: ti: change clock init to use generic of_clk_init") and we were left with this exported. Move this back into clk.c so that it isn't exposed anymore. Signed-off-by: Stephen Boyd drivers/clk/clk.c | 1 + include/linux/clk-provider.h | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) commit 59fcdce425b7c947ccea03a16e393af9bb4d6262 Author: Stephen Boyd Date: Thu May 23 17:05:59 2019 -0700 clk: Remove ifdef for COMMON_CLK in clk-provider.h This ifdef has been there since the beginning of this file, but it doesn't really seem to serve any purpose besides obfuscating the struct definitions and #defines here from compilation units that include it. Let's always expose these function prototypes and struct definitions so that code can inspect clk providers without needing to have CONFIG_COMMON_CLK enabled. Signed-off-by: Stephen Boyd include/linux/clk-provider.h | 3 --- 1 file changed, 3 deletions(-) commit 5762a20b11ef261ae8436868555fab4340cb3ca0 Merge: 29c677c86a15 dc2a4ebc0b44 Author: Daniel Borkmann Date: Fri May 24 01:46:26 2019 +0200 Merge branch 'bpf-explored-states' Alexei Starovoitov says: ==================== Convert explored_states array into hash table and use simple hash to reduce verifier peak memory consumption for programs with bpf2bpf calls. More details in patch 3. v1->v2: fixed Jakub's small nit in patch 1 ==================== Acked-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann commit dc2a4ebc0b44a212fcf72242210e56aa17e7317b Author: Alexei Starovoitov Date: Tue May 21 20:17:07 2019 -0700 bpf: convert explored_states to hash table All prune points inside a callee bpf function most likely will have different callsites. For example, if function foo() is called from two callsites the half of explored states in all prune points in foo() will be useless for subsequent walking of one of those callsites. Fortunately explored_states pruning heuristics keeps the number of states per prune point small, but walking these states is still a waste of cpu time when the callsite of the current state is different from the callsite of the explored state. To improve pruning logic convert explored_states into hash table and use simple insn_idx ^ callsite hash to select hash bucket. This optimization has no effect on programs without bpf2bpf calls and drastically improves programs with calls. In the later case it reduces total memory consumption in 1M scale tests by almost 3 times (peak_states drops from 5752 to 2016). Care should be taken when comparing the states for equivalency. Since the same hash bucket can now contain states with different indices the insn_idx has to be part of verifier_state and compared. Different hash table sizes and different hash functions were explored, but the results were not significantly better vs this patch. They can be improved in the future. Hit/miss heuristic is not counting index miscompare as a miss. Otherwise verifier stats become unstable when experimenting with different hash functions. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann include/linux/bpf_verifier.h | 1 + kernel/bpf/verifier.c | 23 ++++++++++++++++++----- 2 files changed, 19 insertions(+), 5 deletions(-) commit a8f500af0ccffc3d2aaf9018537981cb173865a1 Author: Alexei Starovoitov Date: Tue May 21 20:17:06 2019 -0700 bpf: split explored_states split explored_states into prune_point boolean mark and link list of explored states. This removes STATE_LIST_MARK hack and allows marks to be separate from states. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann include/linux/bpf_verifier.h | 1 + kernel/bpf/verifier.c | 31 +++++++++++++------------------ 2 files changed, 14 insertions(+), 18 deletions(-) commit 5d839021675a2e1b76653189cc6a90cfd8e30a69 Author: Alexei Starovoitov Date: Tue May 21 20:17:05 2019 -0700 bpf: cleanup explored_states clean up explored_states to prep for introduction of hashtable No functional changes. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann kernel/bpf/verifier.c | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) commit b3ca0d44917c12f581cfdae52f9d6efdbfda5fe6 Author: Dongli Zhang Date: Tue May 21 12:40:39 2019 +0800 drm/i915: remove unused IO_TLB_SEGPAGES which should be defined by swiotlb This patch removes IO_TLB_SEGPAGES which is no longer used since commit 5584f1b1d73e ("drm/i915: fix i915 running as dom0 under Xen"). As the define of both IO_TLB_SEGSIZE and IO_TLB_SHIFT are from swiotlb, IO_TLB_SEGPAGES should be defined on swiotlb side if it is required in the future. Signed-off-by: Dongli Zhang Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/1558413639-22568-1-git-send-email-dongli.zhang@oracle.com drivers/gpu/drm/i915/i915_gem_internal.c | 3 --- 1 file changed, 3 deletions(-) commit eaf20e6933dc1108eb56f6059ea89b6af5150082 Author: Michal Wajdeczko Date: Wed May 22 19:32:03 2019 +0000 drm/i915/uc: Skip reset preparation if GuC is already dead We may skip reset preparation steps if GuC is already sanitized. v2: replace USES_GUC with guc_is_loaded Signed-off-by: Michal Wajdeczko Cc: Chris Wilson Cc: Daniele Ceraolo Spurio Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190522193203.23932-10-michal.wajdeczko@intel.com drivers/gpu/drm/i915/intel_uc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a2ce23147348cc040469a617d4fe72ed8d1767e9 Author: Michal Wajdeczko Date: Thu May 23 17:25:55 2019 +0000 drm/i915/uc: Stop talking with GuC when resetting Knowing that GuC will be reset soon, we may stop all communication immediately without doing graceful cleanup as it is not needed. This patch will also help us capture any unwanted/unexpected attempts to talk with GuC after we decided to reset it. And we need to keep 'disable' part as current and upcoming firmware still expect graceful cleanup. v2: update commit msg Signed-off-by: Michal Wajdeczko Cc: Chris Wilson Cc: Daniele Ceraolo Spurio Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190523172555.2780-1-michal.wajdeczko@intel.com drivers/gpu/drm/i915/intel_guc_ct.h | 5 +++++ drivers/gpu/drm/i915/intel_uc.c | 13 ++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) commit 0922f3459f6d4e15bbc325d3030021f1053c2b8f Author: Michal Wajdeczko Date: Wed May 22 19:32:01 2019 +0000 drm/i915/uc: Skip GuC HW unwinding if GuC is already dead We should not attempt to unwind GuC hardware/firmware setup if we already have sanitized GuC. v2: replace USES_GUC with guc_is_loaded Signed-off-by: Michal Wajdeczko Cc: Chris Wilson Cc: Daniele Ceraolo Spurio Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190522193203.23932-8-michal.wajdeczko@intel.com drivers/gpu/drm/i915/intel_uc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f1e6b336bafae78ca9a94114a73a4fda5f29c73f Author: Michal Wajdeczko Date: Wed May 22 19:32:00 2019 +0000 drm/i915/uc: Use GuC firmware status helper We already have helper function for checking GuC firmware load status. Replace existing open-coded checks. v2: drop redundant USES_GUC check Signed-off-by: Michal Wajdeczko Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190522193203.23932-7-michal.wajdeczko@intel.com drivers/gpu/drm/i915/intel_uc.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 89195bab5d8c540e565b47e2ad6ebbbe420be640 Author: Michal Wajdeczko Date: Wed May 22 19:31:59 2019 +0000 drm/i915/uc: Explicitly sanitize GuC/HuC on failure and finish Explicitly sanitize GuC/HuC on load failure and when we finish using them to make sure our fw state tracking is always correct. While around, use new helper in uc_reset_prepare. Signed-off-by: Michal Wajdeczko Cc: Chris Wilson Cc: Daniele Ceraolo Spurio Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190522193203.23932-6-michal.wajdeczko@intel.com drivers/gpu/drm/i915/intel_uc.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit 78577e294bf2b013470d2f9e1e5b5f531440683b Author: Michal Wajdeczko Date: Wed May 22 19:31:58 2019 +0000 drm/i915/guc: Rename intel_guc_is_alive to intel_guc_is_loaded This function just check our software flag, while 'is_alive' may suggest that we are checking runtime firmware status. Signed-off-by: Michal Wajdeczko Cc: Chris Wilson Cc: Daniele Ceraolo Spurio Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190522193203.23932-5-michal.wajdeczko@intel.com drivers/gpu/drm/i915/intel_guc.h | 10 +++++----- drivers/gpu/drm/i915/intel_guc_submission.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) commit beca36ffbdb5d185e46fa3c9cb880847b783d31d Author: Michal Wajdeczko Date: Wed May 22 19:31:57 2019 +0000 drm/i915/selftests: Use prepare/finish during atomic reset test We were testing full GPU reset in atomic context without correctly wrapping it by prepare/finish steps. This could confuse our GuC reset handling code. Signed-off-by: Michal Wajdeczko Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190522193203.23932-4-michal.wajdeczko@intel.com drivers/gpu/drm/i915/gt/selftest_reset.c | 2 ++ 1 file changed, 2 insertions(+) commit b62f97634aa9f61efb8e0935658c758140680c84 Author: Axel Lin Date: Thu May 23 13:45:21 2019 -0700 Input: iqs5xx - remove redundant dev_set_drvdata call Calling i2c_set_clientdata() is enough. Signed-off-by: Axel Lin Acked-by: Jeff LaBundy Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/iqs5xx.c | 2 -- 1 file changed, 2 deletions(-) commit f6470c9bccab9b8b6a2c6669fc7b18a48a56c42c Author: Michal Wajdeczko Date: Wed May 22 19:31:56 2019 +0000 drm/i915/selftests: Split igt_atomic_reset testcase Split igt_atomic_reset selftests into separate full & engines parts, so we can move former to the dedicated reset selftests file. While here change engines test to loop first over atomic phases and then loop over available engines. Signed-off-by: Michal Wajdeczko Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190522193203.23932-3-michal.wajdeczko@intel.com drivers/gpu/drm/i915/gt/selftest_hangcheck.c | 109 +++++---------------------- drivers/gpu/drm/i915/gt/selftest_reset.c | 40 ++++++++++ drivers/gpu/drm/i915/selftests/igt_atomic.h | 56 ++++++++++++++ drivers/gpu/drm/i915/selftests/igt_reset.c | 8 ++ drivers/gpu/drm/i915/selftests/igt_reset.h | 1 + 5 files changed, 124 insertions(+), 90 deletions(-) commit 932309fb030d82943941ccb3756e7c59fbc0189e Author: Michal Wajdeczko Date: Wed May 22 19:31:55 2019 +0000 drm/i915/selftests: Move some reset testcases to separate file igt_global_reset and igt_wedged_reset testcases are first candidates. Suggested-by: Chris Wilson Signed-off-by: Michal Wajdeczko Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190522193203.23932-2-michal.wajdeczko@intel.com drivers/gpu/drm/i915/gt/intel_reset.c | 4 ++ drivers/gpu/drm/i915/gt/selftest_hangcheck.c | 50 -------------- drivers/gpu/drm/i915/gt/selftest_reset.c | 76 ++++++++++++++++++++++ .../gpu/drm/i915/selftests/i915_live_selftests.h | 1 + 4 files changed, 81 insertions(+), 50 deletions(-) commit d3622099c76f623784639e57942c52f8045e47ec Author: Chris Wilson Date: Thu May 23 07:49:33 2019 +0100 drm/i915/gtt: Always acquire struct_mutex for gen6_ppgtt_cleanup We rearranged the vm_destroy_ioctl to avoid taking struct_mutex, little realising that buried underneath the gen6 ppgtt release path was a struct_mutex requirement (to remove its GGTT vma). Until that struct_mutex is vanquished, take a detour in gen6_ppgtt_cleanup to do the i915_vma_destroy from inside a worker under the struct_mutex. <4> [257.740160] WARN_ON(debug_locks && !lock_is_held(&(&vma->vm->i915->drm.struct_mutex)->dep_map)) <4> [257.740213] WARNING: CPU: 3 PID: 1507 at drivers/gpu/drm/i915/i915_vma.c:841 i915_vma_destroy+0x1ae/0x3a0 [i915] <4> [257.740214] Modules linked in: snd_hda_codec_hdmi i915 x86_pkg_temp_thermal mei_hdcp coretemp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_hda_codec_realtek snd_hda_codec_generic snd_hda_intel snd_hda_codec snd_hwdep snd_hda_core r8169 realtek snd_pcm mei_me mei prime_numbers lpc_ich <4> [257.740224] CPU: 3 PID: 1507 Comm: gem_vm_create Tainted: G U 5.2.0-rc1-CI-CI_DRM_6118+ #1 <4> [257.740225] Hardware name: MSI MS-7924/Z97M-G43(MS-7924), BIOS V1.12 02/15/2016 <4> [257.740249] RIP: 0010:i915_vma_destroy+0x1ae/0x3a0 [i915] <4> [257.740250] Code: 00 00 00 48 81 c7 c8 00 00 00 e8 ed 08 f0 e0 85 c0 0f 85 78 fe ff ff 48 c7 c6 e8 ec 30 a0 48 c7 c7 da 55 33 a0 e8 42 8c e9 e0 <0f> 0b 8b 83 40 01 00 00 85 c0 0f 84 63 fe ff ff 48 c7 c1 c1 58 33 <4> [257.740251] RSP: 0018:ffffc90000aafc68 EFLAGS: 00010282 <4> [257.740252] RAX: 0000000000000000 RBX: ffff8883f7957840 RCX: 0000000000000003 <4> [257.740253] RDX: 0000000000000046 RSI: 0000000000000006 RDI: ffffffff8212d1b9 <4> [257.740254] RBP: ffffc90000aafcc8 R08: 0000000000000000 R09: 0000000000000000 <4> [257.740255] R10: 0000000000000000 R11: 0000000000000000 R12: ffff8883f4d5c2a8 <4> [257.740256] R13: ffff8883f4d5d680 R14: ffff8883f4d5c668 R15: ffff8883f4d5c2f0 <4> [257.740257] FS: 00007f777fa8fe40(0000) GS:ffff88840f780000(0000) knlGS:0000000000000000 <4> [257.740258] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 <4> [257.740259] CR2: 00007f777f6522b0 CR3: 00000003c612a006 CR4: 00000000001606e0 <4> [257.740260] Call Trace: <4> [257.740283] gen6_ppgtt_cleanup+0x25/0x60 [i915] <4> [257.740306] i915_ppgtt_release+0x102/0x290 [i915] <4> [257.740330] i915_gem_vm_destroy_ioctl+0x7c/0xa0 [i915] <4> [257.740376] ? i915_gem_vm_create_ioctl+0x160/0x160 [i915] <4> [257.740379] drm_ioctl_kernel+0x83/0xf0 <4> [257.740382] drm_ioctl+0x2f3/0x3b0 <4> [257.740422] ? i915_gem_vm_create_ioctl+0x160/0x160 [i915] <4> [257.740426] ? _raw_spin_unlock_irqrestore+0x39/0x60 <4> [257.740430] do_vfs_ioctl+0xa0/0x6e0 <4> [257.740433] ? lock_acquire+0xa6/0x1c0 <4> [257.740436] ? __task_pid_nr_ns+0xb9/0x1f0 <4> [257.740439] ksys_ioctl+0x35/0x60 <4> [257.740441] __x64_sys_ioctl+0x11/0x20 <4> [257.740443] do_syscall_64+0x55/0x1c0 <4> [257.740445] entry_SYSCALL_64_after_hwframe+0x49/0xbe References: e0695db7298e ("drm/i915: Create/destroy VM (ppGTT) for use with contexts") Fixes: 7f3f317a66ca ("drm/i915: Restore control over ppgtt for context creation ABI") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190523064933.23604-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 33 +++++++++++++++++++++++++++++++-- drivers/gpu/drm/i915/i915_gem_gtt.h | 2 ++ 2 files changed, 33 insertions(+), 2 deletions(-) commit feee3cb3064ac1a67349a524a5d541cc73b4fe32 Author: Bruce Allan Date: Tue Apr 16 10:24:38 2019 -0700 ice: Silence semantic parser warnings Recent versions of sparse warn about casting pointers to/from restricted endian types in the Linux driver. Silence those with the compiler attribute __force macro from the Linux kernel to force casts to/from restricted endian types. Signed-off-by: Bruce Allan Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice_nvm.c | 4 ++-- drivers/net/ethernet/intel/ice/ice_switch.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit aa6ccf3f2d7042f94c4e91538956ce7051e7856e Author: Brett Creeley Date: Tue Apr 16 10:24:37 2019 -0700 ice: Fix couple of issues in ice_vsi_release Currently the driver is calling ice_napi_del() and then unregister_netdev(). The call to unregister_netdev() will result in a call to ice_stop() and then ice_vsi_close(). This is where we call napi_disable() for all the MSI-X vectors. This flow is reversed so make the changes to ensure napi_disable() happens prior to napi_del(). Before calling napi_del() and free_netdev() make sure unregister_netdev() was called. This is done by making sure the __ICE_DOWN bit is set in the vsi->state for the interested VSI. Signed-off-by: Brett Creeley Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice.h | 1 - drivers/net/ethernet/intel/ice/ice_lib.c | 24 +++++++++++++----------- drivers/net/ethernet/intel/ice/ice_main.c | 2 +- 3 files changed, 14 insertions(+), 13 deletions(-) commit 8d5fce190333b3e4614772fe4ac617a2d36dc77c Author: Jesse Brandeburg Date: Tue Apr 16 10:24:36 2019 -0700 ice: Reorganize ice_vf struct The ice_vf struct can be used hundreds of times in our driver so it pays to use less memory per struct. ice_vf prior to this commit: /* size: 112, cachelines: 2, members: 25 */ /* sum members: 101, holes: 4, sum holes: 8 */ /* bit holes: 2, sum bit holes: 11 bits */ /* padding: 3 */ /* last cacheline: 48 bytes */ ice_vf after this commit: /* size: 104, cachelines: 2, members: 25 */ /* sum members: 100, holes: 3, sum holes: 4 */ /* bit holes: 1, sum bit holes: 3 bits */ /* last cacheline: 40 bytes */ Signed-off-by: Jesse Brandeburg Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit 0ab54c5f2fe8929d04d965bc3e05325e37de45ba Author: Jesse Brandeburg Date: Tue Apr 16 10:24:35 2019 -0700 ice: Use bitfields when possible We can use bit fields to store boolean values and when the bit fields are next to each other, the compiler will combine them (as long as the size holds enough). Signed-off-by: Jesse Brandeburg Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice.h | 10 +++++----- drivers/net/ethernet/intel/ice/ice_txrx.h | 2 +- drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h | 10 +++++----- 3 files changed, 11 insertions(+), 11 deletions(-) commit 65124bbf980c6256e3385e7d002a5db102d30d3a Author: Jesse Brandeburg Date: Tue Apr 16 10:24:34 2019 -0700 ice: Reorganize tx_buf and ring structs Use more efficient structure ordering by using the pahole tool and a lot of code inspection to get hot cache lines to have packed data (no holes if possible) and adjacent warm data. ice_ring prior to this change: /* size: 192, cachelines: 3, members: 23 */ /* sum members: 158, holes: 4, sum holes: 12 */ /* padding: 22 */ ice_ring after this change: /* size: 192, cachelines: 3, members: 25 */ /* sum members: 162, holes: 1, sum holes: 1 */ /* padding: 29 */ ice_tx_buf prior to this change: /* size: 48, cachelines: 1, members: 7 */ /* sum members: 38, holes: 2, sum holes: 6 */ /* padding: 4 */ /* last cacheline: 48 bytes */ ice_tx_buf after this change: /* size: 40, cachelines: 1, members: 7 */ /* sum members: 38, holes: 1, sum holes: 2 */ /* last cacheline: 40 bytes */ Signed-off-by: Jesse Brandeburg Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice_txrx.h | 35 ++++++++++++++++++------------- 1 file changed, 21 insertions(+), 14 deletions(-) commit 55e062ba77adb68623dd57369900f25cb377cf94 Author: Richard Rodriguez Date: Tue Apr 16 10:24:33 2019 -0700 ice: Format ethtool reported stats Fixes ethtool -S reported stats in ice driver to match format and nomenclature of the ixgbe driver. Signed-off-by: Richard Rodriguez Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice_ethtool.c | 108 +++++++++++++-------------- 1 file changed, 54 insertions(+), 54 deletions(-) commit 72f9c2039859e6303550f202d6cc6b8d8af0178c Author: Brett Creeley Date: Tue Apr 16 10:24:32 2019 -0700 ice: Gracefully handle reset failure in ice_alloc_vfs() Currently if ice_reset_all_vfs() fails in ice_alloc_vfs() we fail to free some resources, reset variables, and return an error value. Fix this by adding another unroll case to free the pf->vf array, set the pf->num_alloc_vfs to 0, and return an error code. Without this, if ice_reset_all_vfs() fails in ice_alloc_vfs() we will not be able to do SRIOV without hard rebooting the system because rmmod'ing the driver does not work. Signed-off-by: Brett Creeley Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit a17a5ff6812c264ca7f5c98c493644447c9a5ce6 Author: Usha Ketineni Date: Tue Apr 16 10:24:31 2019 -0700 ice: Refactor the LLDP MIB change event handling This patch fixes the LLDP MIB change event handling code by removing the workarounds in the current code. Added ice_dcb_need_recfg() to print the DCB configuration changes detected via MIB change event. Signed-off-by: Usha Ketineni Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice_dcb.c | 5 +- drivers/net/ethernet/intel/ice/ice_dcb.h | 4 +- drivers/net/ethernet/intel/ice/ice_dcb_lib.c | 153 +++++++++++++++++++++++---- 3 files changed, 140 insertions(+), 22 deletions(-) commit 9ccb062c144019a1c629c04b306280c251e1112b Author: Tony Nguyen Date: Tue Apr 16 10:24:30 2019 -0700 ice: Advertise supported link modes if none requested User requested link modes affect what is returned as an advertised link mode. If no modes have been requested, we are not advertising any link modes. Advertise what we are capable of supporting if no link modes have been requested. Signed-off-by: Tony Nguyen Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice_ethtool.c | 75 ++++++++++++++++++---------- 1 file changed, 50 insertions(+), 25 deletions(-) commit e223eaec67e2e4b9092df3ee5344f46db6b3eded Author: Dave Ertman Date: Tue Apr 16 10:24:29 2019 -0700 ice: Fix hang when ethtool disables FW LLDP When disabling and enabling VSIs, there are a couple of flows that recursively acquire the RTNL lock which causes a deadlock. Fix that. Signed-off-by: Dave Ertman Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice_dcb_lib.c | 31 +++++++++++++++++----------- drivers/net/ethernet/intel/ice/ice_dcb_lib.h | 5 +++-- drivers/net/ethernet/intel/ice/ice_ethtool.c | 4 ++-- drivers/net/ethernet/intel/ice/ice_main.c | 2 +- 4 files changed, 25 insertions(+), 17 deletions(-) commit a84db52569ddefd6a82b6a4ba48d321066ef84f1 Author: Anirudh Venkataramanan Date: Tue Apr 16 10:24:28 2019 -0700 ice: Call out dev/func caps when printing ice_parse_caps is used to parse both device and function capabilities. Currently, capabilities are printed with a cryptic "HW caps" prefix, which makes it difficult to distinguish whether the capabilities being printed are device or function capabilities. This patch makes a change to add a "func cap" prefix when printing function capabilities, and a "dev cap" prefix when printing device capabilities. This patch also changes some of the capability print strings for consistency. Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice_common.c | 56 +++++++++++++++-------------- 1 file changed, 30 insertions(+), 26 deletions(-) commit f24e35d88b1bf49806e0b507e72c3e957aeeb2a4 Author: Anirudh Venkataramanan Date: Tue Apr 16 10:24:27 2019 -0700 ice: Remove braces for single statement blocks Fix checkpatch warning "WARNING:BRACES: braces {} are not necessary for single statement blocks" Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 173e23c0cb52889c21bec8e778241c429d13f310 Author: Bruce Allan Date: Tue Apr 16 10:24:26 2019 -0700 ice: Cleanup an unnecessary variable initialization Commit 3463688e6ced ("ice: Add more validation in ice_vc_cfg_irq_map_msg") added an assignment of vsi making the assignment during declaration unnecessary. Also, cleanup the declaration and assignment of irqmap_info to not use two lines in the variable declaration section. Signed-off-by: Bruce Allan Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 31eafa403b9945997cf5b321ae3560f072b74efe Author: Anirudh Venkataramanan Date: Tue Apr 16 10:24:25 2019 -0700 ice: Implement LLDP persistence Implement LLDP persistence across reboots, start and stop of LLDP agent. Add additional parameter to ice_aq_start_lldp and ice_aq_stop_lldp. Also change the ethtool private flag from "disable-fw-lldp" to "enable-fw-lldp". This change will flip the boolean logic of the functionality of the flag (on = enable, off = disable). The change in name and functionality is to differentiate between the pre-persistence and post-persistence states. Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice.h | 2 +- drivers/net/ethernet/intel/ice/ice_dcb.c | 16 ++++++++++++--- drivers/net/ethernet/intel/ice/ice_dcb.h | 8 +++++--- drivers/net/ethernet/intel/ice/ice_dcb_lib.c | 30 +++++----------------------- drivers/net/ethernet/intel/ice/ice_ethtool.c | 10 +++++----- 5 files changed, 29 insertions(+), 37 deletions(-) commit b4603dbf1e1d5cdd1fc93dd9c559fc5635f88c7b Author: Anirudh Venkataramanan Date: Tue Apr 16 10:21:28 2019 -0700 ice: Fix double spacing Fix double spacing in ice_napi_disable_all Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ice/ice_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3d3515312f97582136644a7327ed262c7bb7ea31 Author: Mauro Carvalho Chehab Date: Thu May 23 05:27:30 2019 -0400 media: rc-main: clean-up two warnings While correct, the code is too complex for smatch to undersdand that protocol will always be initialized: drivers/media/rc/rc-main.c:1531 store_wakeup_protocols() error: uninitialized symbol 'protocol'. drivers/media/rc/rc-main.c:1541 store_wakeup_protocols() error: uninitialized symbol 'protocol'. So, change it a little bit in order to avoid such warning. Signed-off-by: Mauro Carvalho Chehab Acked-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/rc-main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit f49308878d7202e07d8761238e01bd0e5fce2750 Author: Jungo Lin Date: Tue Apr 2 21:44:27 2019 -0400 media: media_device_enum_links32: clean a reserved field In v4l2-compliance utility, test MEDIA_IOC_ENUM_ENTITIES will check whether reserved field of media_links_enum filled with zero. However, for 32 bit program, the reserved field is missing copy from kernel space to user space in media_device_enum_links32 function. This patch adds the cleaning a reserved field logic in media_device_enum_links32 function. Signed-off-by: Jungo Lin Signed-off-by: Mauro Carvalho Chehab drivers/media/media-device.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 8aef94beadc51c8fa768ef1d5ae5ca1b4c328eb0 Author: Mukesh Ojha Date: Tue Mar 26 08:17:54 2019 -0400 media: vpss: fix the order of resource clean up Clean up of resources should be in reverse order of vpss_init(). Fix this inside vpss_exit(). Signed-off-by: Mukesh Ojha Acked-by: Lad, Prabhakar Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/davinci/vpss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e08f0761234def47961d3252eac09ccedfe4c6a0 Author: Kangjie Lu Date: Fri Mar 22 22:51:06 2019 -0400 media: vpss: fix a potential NULL pointer dereference In case ioremap fails, the fix returns -ENOMEM to avoid NULL pointer dereference. Signed-off-by: Kangjie Lu Acked-by: Lad, Prabhakar Reviewed-by: Mukesh Ojha Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/davinci/vpss.c | 5 +++++ 1 file changed, 5 insertions(+) commit 6ac98829a4144a2cc78e97b84ee752ce6689e87f Author: Sean Paul Date: Thu May 23 09:54:58 2019 -0400 drm/edid: Fix docbook in drm_hdmi_infoframe_set_hdr_metadata() Fixes the following warnings: ../drivers/gpu/drm/drm_edid.c:4925: warning: Function parameter or member 'conn_state' not described in 'drm_hdmi_infoframe_set_hdr_metadata' ../drivers/gpu/drm/drm_edid.c:4925: warning: Excess function parameter 'hdr_metadata' description in 'drm_hdmi_infoframe_set_hdr_metadata' Fixes: 2cdbfd66a829 ("drm: Enable HDR infoframe support") Cc: Uma Shankar Cc: Shashank Sharma Cc: Ville Syrjälä Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Cc: Bartlomiej Zolnierkiewicz Cc: "Ville Syrjälä" Cc: Hans Verkuil Cc: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org Reviewed-by: Uma Shankar Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190523135504.184354-1-sean@poorly.run drivers/gpu/drm/drm_edid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9395da4efbd46661f0049d24d54d1cea63241fc9 Author: Subash Abhinov Kasiviswanathan Date: Wed May 22 14:21:07 2019 -0600 net: qualcomm: rmnet: Move common struct definitions to include Create if_rmnet.h and move the rmnet MAP packet structs to this common include file. To account for portablity, add little and big endian bitfield definitions similar to the ip & tcp headers. The definitions in the headers can now be re-used by the upcoming ipa driver series as well as qmi_wwan. Signed-off-by: Subash Abhinov Kasiviswanathan Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/rmnet/rmnet_map.h | 25 +---------- include/linux/if_rmnet.h | 55 +++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 24 deletions(-) commit 020bc7354a6ebec980e0aedf5bedf57b42f93aca Author: Javier Martinez Canillas Date: Tue Feb 19 04:01:04 2019 -0500 media: staging/imx: Allow driver to build if COMPILE_TEST is enabled The driver has runtime but no build time dependency with IMX_IPUV3_CORE, so can be built for testing purposes if COMPILE_TEST option is enabled. This is useful to have more build coverage and make sure that the driver is not affected by changes that could cause build regressions. Signed-off-by: Javier Martinez Canillas Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 16fa1cf1ed2a652a483cf8f1ea65c703693292e8 Author: Ioana Radulescu Date: Thu May 23 17:38:22 2019 +0300 Revert "dpaa2-eth: configure the cache stashing amount on a queue" This reverts commit f8b995853444aba9c16c1ccdccdd397527fde96d. The reverted change instructed the QMan hardware block to fetch RX frame annotation and beginning of frame data to cache before the core would read them. It turns out that in rare cases, it's possible that a QMan stashing transaction is delayed long enough such that, by the time it gets executed, the frame in question had already been dequeued by the core and software processing began on it. If the core manages to unmap the frame buffer _before_ the stashing transaction is executed, an SMMU exception will be raised. Unfortunately there is no easy way to work around this while keeping the performance advantages brought by QMan stashing, so disable it altogether. Signed-off-by: Ioana Radulescu Signed-off-by: David S. Miller drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit dcf10ec772ade4e9ba76f31c07dc1927b58eb4b4 Author: Raju Rangoju Date: Thu May 23 19:21:21 2019 +0530 cxgb4: use firmware API for validating filter spec Adds support for validating hardware filter spec configured in firmware before offloading exact match flows. Use the new fw api FW_PARAM_DEV_FILTER_MODE_MASK to read the filter mode and mask from firmware. If the api isn't supported, then fall-back to older way of reading just the mode from indirect register. Signed-off-by: Raju Rangoju Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 1 + drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c | 3 +- drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 47 ++++++++++++++++++++--- drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h | 23 +++++++++++ 4 files changed, 68 insertions(+), 6 deletions(-) commit 00e31a09613619a2f99adcd1ea9fceda9365fa30 Merge: 5556fdb0c2ea 0127cd5440e7 Author: David S. Miller Date: Thu May 23 09:33:57 2019 -0700 Merge branch 'net-ll_temac-Fix-and-enable-multicast-support' Esben Haabendal says: ==================== net: ll_temac: Fix and enable multicast support This patch series makes the necessary fixes to ll_temac driver to make multicast work, and enables support for it.so that multicast support can The main change is the change from mutex to spinlock of the lock used to synchronize access to the shared indirect register access. ==================== Signed-off-by: David S. Miller commit 0127cd5440e7cce2ef8582e15cef65d58890e4b9 Author: Esben Haabendal Date: Thu May 23 14:02:22 2019 +0200 net: ll_temac: Enable multicast support Multicast support have been tested and is working now. Signed-off-by: Esben Haabendal Signed-off-by: David S. Miller drivers/net/ethernet/xilinx/ll_temac_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 1b3fa5cf859bce7094ac18d32f54af8a7148ad51 Author: Esben Haabendal Date: Thu May 23 14:02:21 2019 +0200 net: ll_temac: Cleanup multicast filter on change Avoid leaving old address table entries when using multicast. If more than one multicast address were removed, only the first removed address would actually be cleared. Signed-off-by: Esben Haabendal Signed-off-by: David S. Miller drivers/net/ethernet/xilinx/ll_temac_main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 1bd33bf0fe6d3012410db0302187199871b510a0 Author: Esben Haabendal Date: Thu May 23 14:02:20 2019 +0200 net: ll_temac: Prepare indirect register access for multicast support With .ndo_set_rx_mode/temac_set_multicast_list() being called in atomic context (holding addr_list_lock), and temac_set_multicast_list() needing to access temac indirect registers, the mutex used to synchronize indirect register is a no-no. Replace it with a spinlock, and avoid sleeping in temac_indirect_busywait(). To avoid excessive holding of the lock, which is now a spinlock, the temac_device_reset() function is changed to only hold the lock for short periods. With timeouts, it could be holding the spinlock for more than 2 seconds. Signed-off-by: Esben Haabendal Signed-off-by: David S. Miller drivers/net/ethernet/xilinx/ll_temac.h | 5 +- drivers/net/ethernet/xilinx/ll_temac_main.c | 240 ++++++++++++++++++-------- drivers/net/ethernet/xilinx/ll_temac_mdio.c | 20 +-- include/linux/platform_data/xilinx-ll-temac.h | 3 +- 4 files changed, 179 insertions(+), 89 deletions(-) commit ddc0bf34f9ee202315f8c844bcbdede4e3821f12 Author: Esben Haabendal Date: Thu May 23 14:02:19 2019 +0200 net: ll_temac: Do not make promiscuous mode sticky on multicast When user has requested IFF_ALLMULTI or have set more than 4 multicast addresses, we should just use promiscuous mode, but not set it in flags, as it causes the interface to stay in promiscuous mode even when the non-IFF_PROMISC condition that caused promiscuous mode to be enabled has gone away. Signed-off-by: Esben Haabendal Signed-off-by: David S. Miller drivers/net/ethernet/xilinx/ll_temac_main.c | 7 ------- 1 file changed, 7 deletions(-) commit a466a8675e0032ab788a0d59f78db4cf34d4902a Author: Jerome Brunet Date: Mon May 20 15:13:57 2019 +0200 arm64: dts: meson: g12a: add ethernet mac controller Add the synopsys ethernet mac controller embedded in the g12a SoC family. Signed-off-by: Jerome Brunet Reviewed-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 5556fdb0c2ea3a9ae18e2c457a25198673761ff7 Author: Christophe Leroy Date: Thu May 23 08:55:32 2019 +0000 net: phy: lxt: Add suspend/resume support to LXT971 and LXT973. All LXT PHYs implement the standard "power down" bit 11 of BMCR, so this patch adds support using the generic genphy_{suspend,resume} functions added by commit 0f0ca340e57b ("phy: power management support"). LXT970 is left aside because all registers get cleared upon "power down" exit. Reviewed-by: Heiner Kallweit Signed-off-by: Christophe Leroy Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/lxt.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 136bf27fc0e9376525b9b6d9a1aa08508a0d1ac2 Author: Jiri Pirko Date: Thu May 23 10:43:35 2019 +0200 devlink: add warning in case driver does not set port type Prevent misbehavior of drivers who would not set port type for longer period of time. Drivers should always set port type. Do WARN if that happens. Note that it is perfectly fine to temporarily not have the type set, during initialization and port type change. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller include/net/devlink.h | 2 ++ net/core/devlink.c | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) commit 94b7ddb91c16226fb48ed85d2c66e863009a19da Author: Masahiro Yamada Date: Fri Jan 25 01:54:17 2019 -0500 media: coda: remove -I$(src) header search path Remove the header search path to the current directory. The compiler will search headers in the current directory by using #include "..." instead of #include <...> Also, change TRACE_INCLUDE_PATH to point to the location of trace.h. Signed-off-by: Masahiro Yamada Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/Makefile | 2 -- drivers/media/platform/coda/coda-h264.c | 3 ++- drivers/media/platform/coda/trace.h | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) commit d2bc4cece13967e3e654a872a8f081ae4bf75911 Author: Alexandre Belloni Date: Tue Apr 30 22:18:34 2019 +0200 rtc: st-lpc: remove unnecessary check The RTC core already ensures the alarm is set to a time in the future, it is not necessary to check again in the driver. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-st-lpc.c | 4 ---- 1 file changed, 4 deletions(-) commit b3a50169762b14102a296a410d785f9ec1132ae1 Author: Alexandre Belloni Date: Thu Apr 11 00:16:29 2019 +0200 rtc: ds1307: properly handle oscillator failure flags Stop enabling the oscillator and removing the oscillator failure flags in probe. Instead, return -EINVAL in .read_time when the oscillaotr is not start or when it failed at some point. The oscillator gets enabled on the first .set_time after failure and the failure flags are cleared. This also removes the possibility of an infinite loop at probe where a failing RTC will make the goto read_rtc to be taken every time. Tested on mcp79411. Reported-by: Mastro Gippo Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1307.c | 129 +++++++++++++++++++++-------------------------- 1 file changed, 58 insertions(+), 71 deletions(-) commit 097aa24b5db09a852516c467f2cd62e8adfd6bba Author: Richard Leitner Date: Thu May 23 13:54:51 2019 +0200 rtc: s35390a: change FLAG defines to use BIT macro To be consistent change the S35390A_FLAG defines to use the BIT macro (like the S35390A_INT2_MODE defines). Signed-off-by: Richard Leitner Signed-off-by: Alexandre Belloni drivers/rtc/rtc-s35390a.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 0327963440926094731571562f6089bfa5a13610 Author: Richard Leitner Date: Thu May 23 13:54:50 2019 +0200 rtc: s35390a: introduce struct device in probe To simplify access and shorten code introduce a struct device pointer in the s35390a probe function. Signed-off-by: Richard Leitner Signed-off-by: Alexandre Belloni drivers/rtc/rtc-s35390a.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit c0e12848be091e8410fb427f080f2e0149123443 Author: Richard Leitner Date: Thu May 23 13:54:49 2019 +0200 rtc: s35390a: set uie_unsupported Alarms are only supported on a per minute basis. This is why uie_unsupported is set. Furthermore issue a warning when a second based alarm is requested. Signed-off-by: Richard Leitner Signed-off-by: Alexandre Belloni drivers/rtc/rtc-s35390a.c | 6 ++++++ 1 file changed, 6 insertions(+) commit a86bd9044b33ae60571de2759b3803f530bccb68 Author: Richard Leitner Date: Thu May 23 13:54:48 2019 +0200 rtc: s35390a: clarify INT2 pin output modes Fix the INT2 mode mask to not include the "TEST" flag. Furthermore remove the not needed reversion of bits when parsing the INT2 modes. Instead reverse the INT2_MODE defines to match the bit order from the datasheet. Additionally mention the flag names from the datasheet for the different modes in the comments. Signed-off-by: Richard Leitner Signed-off-by: Alexandre Belloni drivers/rtc/rtc-s35390a.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit c19623db3766c5710c3032ab0b1ff98c4935a58a Author: Roman Stratiienko Date: Wed May 15 17:20:22 2019 +0300 rtc: test: enable wakeup flags Alarmtimer interface uses only the RTC with wekeup flags enabled. Allow to use rtc-test driver with alarmtimer interface. Signed-off-by: Roman Stratiienko Signed-off-by: Alexandre Belloni drivers/rtc/rtc-test.c | 1 + 1 file changed, 1 insertion(+) commit 8aec4b875008b98349222f3fbe8b86051d0fab4f Author: Nicholas Mc Guire Date: Thu May 9 04:13:55 2019 +0200 rtc: ds2404: use hw endiannes variable Converting from hardware to host endiannes was done using reassignment to the same variable which makes sparse unhappy as it can not verify the endiannes handling properly. To allow sparse to verify endiannes handling an explicit __le32 is introduced. Note that this patch does not change the generated binary (x86_64 and ppc64 binary diff). Signed-off-by: Nicholas Mc Guire Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds2404.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 35c8b4b2c0fed637d2b30a8ec8e5d7f4c19c8d9d Author: Paul Kocialkowski Date: Thu May 16 16:55:44 2019 +0200 drm/vc4: Allocate binner bo when starting to use the V3D The binner BO is not required until the V3D is in use, so avoid allocating it at probe and do it on the first non-dumb BO allocation. Keep track of which clients are using the V3D and liberate the buffer when there is none left, using a kref. Protect the logic with a mutex to avoid race conditions. The binner BO is created at the time of the first render ioctl and is destroyed when there is no client and no exec job using it left. The Out-Of-Memory (OOM) interrupt also gets some tweaking, to avoid enabling it before having allocated a binner bo. We also want to keep the BO alive during runtime suspend/resume to avoid failing to allocate it at resume. This happens when the CMA pool is full at that point and results in a hard crash. Signed-off-by: Paul Kocialkowski Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20190516145544.29051-5-paul.kocialkowski@bootlin.com drivers/gpu/drm/vc4/vc4_bo.c | 31 +++++++++++++++++++++- drivers/gpu/drm/vc4/vc4_drv.c | 6 +++++ drivers/gpu/drm/vc4/vc4_drv.h | 14 ++++++++++ drivers/gpu/drm/vc4/vc4_gem.c | 11 ++++++++ drivers/gpu/drm/vc4/vc4_irq.c | 21 ++++++++++----- drivers/gpu/drm/vc4/vc4_v3d.c | 62 ++++++++++++++++++++++++++++++++++--------- 6 files changed, 125 insertions(+), 20 deletions(-) commit e43fe02fe4fde417b40f6e70b56a30190edabb2e Author: Paul Kocialkowski Date: Thu May 16 16:55:43 2019 +0200 drm/vc4: Check for the binner bo before handling OOM interrupt Since the OOM interrupt directly deals with the binner bo, it doesn't make sense to try and handle it without a binner buffer registered. Signed-off-by: Paul Kocialkowski Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20190516145544.29051-4-paul.kocialkowski@bootlin.com drivers/gpu/drm/vc4/vc4_irq.c | 3 +++ 1 file changed, 3 insertions(+) commit 65f50f9761343d3dcc580db8e36e05d321d7e980 Author: Paul Kocialkowski Date: Thu May 16 16:55:42 2019 +0200 drm/vc4: Check for V3D before binner bo alloc Check that we have a V3D device registered before attempting to allocate a binner buffer object. Signed-off-by: Paul Kocialkowski Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20190516145544.29051-3-paul.kocialkowski@bootlin.com drivers/gpu/drm/vc4/vc4_v3d.c | 3 +++ 1 file changed, 3 insertions(+) commit 66fafd338780cb5adb7f290b384d9d3c6c7f6bb5 Author: Paul Kocialkowski Date: Thu May 16 16:55:41 2019 +0200 drm/vc4: Reformat and the binner bo allocation helper In preparation for wrapping the binner bo allocation helper with put/get helpers, pass the vc4 dev directly and drop the vc4 prefix. Signed-off-by: Paul Kocialkowski Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20190516145544.29051-2-paul.kocialkowski@bootlin.com drivers/gpu/drm/vc4/vc4_v3d.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 8169cf0a02caafd87ee33e66c12f7a35606a6b0c Author: Stefan Agner Date: Fri Jan 11 10:49:51 2019 -0500 media: Kconfig: allow to select drivers if EMBEDDED Embedded systems often connect to sensors or other multimedia subdevices directly. Currently, to be able to select such a subdevice (e.g. CONFIG_VIDEO_OV5640) disabling of the auto- select config option is needed (CONFIG_MEDIA_SUBDRV_AUTOSELECT). This is inconvenient as the ancillary drivers for a particular device then need to be selected manually. Allow to select drivers manually while keeping the auto-select feature in case EXPERT (selected by EMBEDDED) is enabled. Signed-off-by: Stefan Agner Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/Kconfig | 2 +- drivers/media/i2c/Kconfig | 4 ++-- drivers/media/spi/Kconfig | 2 +- drivers/media/tuners/Kconfig | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) commit 29c677c86a15fadcf85f072f75d88ce37ceac452 Merge: 9efc7794496d 7c9441066ab5 Author: Daniel Borkmann Date: Thu May 23 16:20:58 2019 +0200 Merge branch 'bpf-jmp-seq-limit' Alexei Starovoitov says: ==================== Patch 1 - jmp sequence limit Patch 2 - improve existing tests Patch 3 - add pyperf-based realistic bpf program that takes advantage of higher limit and use it as a stress test v1->v2: fixed nit in patch 3. added Andrii's acks ==================== Signed-off-by: Daniel Borkmann commit 7c9441066ab53168093c79477aabd575f7c14129 Author: Alexei Starovoitov Date: Tue May 21 20:14:21 2019 -0700 selftests/bpf: add pyperf scale test Add a snippet of pyperf bpf program used to collect python stack traces as a scale test for the verifier. At 189 loop iterations llvm 9.0 starts ignoring '#pragma unroll' and generates partially unrolled loop instead. Hence use 50, 100, and 180 loop iterations to stress test. Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann .../selftests/bpf/prog_tests/bpf_verif_scale.c | 31 ++- tools/testing/selftests/bpf/progs/pyperf.h | 268 +++++++++++++++++++++ tools/testing/selftests/bpf/progs/pyperf100.c | 4 + tools/testing/selftests/bpf/progs/pyperf180.c | 4 + tools/testing/selftests/bpf/progs/pyperf50.c | 4 + 5 files changed, 298 insertions(+), 13 deletions(-) commit 7c0c6095d48dcd0e67c917aa73cdbb2715aafc36 Author: Alexei Starovoitov Date: Tue May 21 20:14:20 2019 -0700 selftests/bpf: adjust verifier scale test Adjust scale tests to check for new jmp sequence limit. BPF_JGT had to be changed to BPF_JEQ because the verifier was too smart. It tracked the known safe range of R0 values and pruned the search earlier before hitting exact 8192 limit. bpf_semi_rand_get() was too (un)?lucky. k = 0; was missing in bpf_fill_scale2. It was testing a bit shorter sequence of jumps than intended. Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/test_verifier.c | 31 ++++++++++++++++------------- 1 file changed, 17 insertions(+), 14 deletions(-) commit b285fcb760da7aa87d6d31e6c6a4907d82d9299c Author: Alexei Starovoitov Date: Tue May 21 20:14:19 2019 -0700 bpf: bump jmp sequence limit The limit of 1024 subsequent jumps was causing otherwise valid programs to be rejected. Bump it to 8192 and make the error more verbose. Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann kernel/bpf/verifier.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit b29ecab178b074be999afd5d6bf6e5b4c2bb782b Author: Sakari Ailus Date: Wed Dec 12 07:40:48 2018 -0500 media: videobuf2-core.h: Document the alloc memop size argument as page aligned The size argument of the alloc memop, which allocates buffer memory, is page aligned. Document it as such in the only caller as well as ops documentation. Signed-off-by: Sakari Ailus Reviewed-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/common/videobuf2/videobuf2-core.c | 1 + include/media/videobuf2-core.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) commit 14f28f5cea9e3998442de87846d1907a531b6748 Author: Sakari Ailus Date: Wed Dec 12 07:44:14 2018 -0500 media: videobuf2-dma-sg: Prevent size from overflowing buf->size is an unsigned long; casting that to int will lead to an overflow if buf->size exceeds INT_MAX. Fix this by changing the type to unsigned long instead. This is possible as the buf->size is always aligned to PAGE_SIZE, and therefore the size will never have values lesser than 0. Note on backporting to stable: the file used to be under drivers/media/v4l2-core, it was moved to the current location after 4.14. Signed-off-by: Sakari Ailus Cc: stable@vger.kernel.org Reviewed-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/common/videobuf2/videobuf2-dma-sg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit defcdc5d89ced780fb45196d539d6570ec5b1ba5 Author: Sakari Ailus Date: Wed Dec 12 07:27:10 2018 -0500 media: videobuf2-core: Prevent size alignment wrapping buffer size to 0 PAGE_ALIGN() may wrap the buffer size around to 0. Prevent this by checking that the aligned value is not smaller than the unaligned one. Note on backporting to stable: the file used to be under drivers/media/v4l2-core, it was moved to the current location after 4.14. Signed-off-by: Sakari Ailus Cc: stable@vger.kernel.org Reviewed-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/common/videobuf2/videobuf2-core.c | 4 ++++ 1 file changed, 4 insertions(+) commit 6fae100e74afc1e5919f58d569ac28f49163e890 Author: Bingbu Cao Date: Thu May 16 23:33:34 2019 -0400 media: staging/intel-ipu3: update minimal GDC envelope size to 4 The ipu3 GDC function need some envelope to do filtering and the minimal envelope size(GDC in - out) for ipu3 should be 4. Current value 4 was defined for older version GDC, this patch correct it. Signed-off-by: Bingbu Cao Reviewed-by: Tomasz Figa Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/ipu3/ipu3-css.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit a1038ee8ca9f857d4d2e809a02bfe69ecb085b25 Author: Nicholas Mc Guire Date: Wed May 8 11:11:53 2019 -0400 media: smiapp: core: add small range to usleep_range No need for a high-accuracy delay here as long as it is more than 2 milliseconds this should be ok - as it is non-atomic context it will be not be precise 2 milliseconds so giving the hrtimer subsystem 50 microseconds to merge timers and reduce interrupts. Signed-off-by: Nicholas Mc Guire Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/smiapp/smiapp-quirk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c3cc51032689c6f472ee4da5e6d61379b246a851 Author: Lubomir Rintel Date: Sun May 5 10:00:24 2019 -0400 media: marvell-ccic: don't generate EOF on parallel bus The commit 05fed81625bf ("[media] marvell-ccic: add MIPI support for marvell-ccic driver") that claimed to add CSI2 turned on C0_EOF_VSYNC for parallel bus without a very good explanation. That broke camera on OLPC XO-1.75 which precisely uses a sensor on a parallel bus. Revert that chunk. Tested on an OLPC XO-1.75. Fixes: 05fed81625bf ("[media] marvell-ccic: add MIPI support for marvell-ccic driver") Signed-off-by: Lubomir Rintel Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/marvell-ccic/mcam-core.c | 6 ------ 1 file changed, 6 deletions(-) commit 0c7aa32966dab0b8a7424e1b34c7f206817953ec Author: Lubomir Rintel Date: Sun May 5 10:00:23 2019 -0400 media: marvell-ccic: fix DMA s/g desc number calculation The commit d790b7eda953 ("[media] vb2-dma-sg: move dma_(un)map_sg here") left dma_desc_nent unset. It previously contained the number of DMA descriptors as returned from dma_map_sg(). We can now (since the commit referred to above) obtain the same value from the sg_table and drop dma_desc_nent altogether. Tested on OLPC XO-1.75 machine. Doesn't affect the OLPC XO-1's Cafe driver, since that one doesn't do DMA. [mchehab+samsung@kernel.org: fix a checkpatch warning] Fixes: d790b7eda953 ("[media] vb2-dma-sg: move dma_(un)map_sg here") Signed-off-by: Lubomir Rintel Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/marvell-ccic/mcam-core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 1305d97b7c7847b12872818326f0cb4da0439311 Author: Lubomir Rintel Date: Sun May 5 10:00:22 2019 -0400 media: dt-bindings: marvell,mmp2-ccic: Add Marvell MMP2 camera Add Marvell MMP2 camera host interface. Signed-off-by: Lubomir Rintel Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../bindings/media/marvell,mmp2-ccic.txt | 50 ++++++++++++++++++++++ 1 file changed, 50 insertions(+) commit f8075c1cdc79002a0a8ce141c0c2e8c627a46c66 Author: Sakari Ailus Date: Fri May 3 06:39:41 2019 -0400 media: v4l: fwnode: C-PHY has no clock lane C-PHY doesn't use a clock lane, hence the test for the clock lane when there isn't one is faulty. Rework the test for the conflicting clock lane. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-fwnode.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 040d2bb318d1aea4f28cc22504b44e446666c86e Author: Chao Yu Date: Mon May 20 17:36:59 2019 +0800 f2fs: fix to avoid deadloop if data_flush is on As Hagbard Celine reported: [ 615.697824] INFO: task kworker/u16:5:344 blocked for more than 120 seconds. [ 615.697825] Not tainted 5.0.15-gentoo-f2fslog #4 [ 615.697826] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 615.697827] kworker/u16:5 D 0 344 2 0x80000000 [ 615.697831] Workqueue: writeback wb_workfn (flush-259:0) [ 615.697832] Call Trace: [ 615.697836] ? __schedule+0x2c5/0x8b0 [ 615.697839] schedule+0x32/0x80 [ 615.697841] schedule_preempt_disabled+0x14/0x20 [ 615.697842] __mutex_lock.isra.8+0x2ba/0x4d0 [ 615.697845] ? log_store+0xf5/0x260 [ 615.697848] f2fs_write_data_pages+0x133/0x320 [ 615.697851] ? trace_hardirqs_on+0x2c/0xe0 [ 615.697854] do_writepages+0x41/0xd0 [ 615.697857] __filemap_fdatawrite_range+0x81/0xb0 [ 615.697859] f2fs_sync_dirty_inodes+0x1dd/0x200 [ 615.697861] f2fs_balance_fs_bg+0x2a7/0x2c0 [ 615.697863] ? up_read+0x5/0x20 [ 615.697865] ? f2fs_do_write_data_page+0x2cb/0x940 [ 615.697867] f2fs_balance_fs+0xe5/0x2c0 [ 615.697869] __write_data_page+0x1c8/0x6e0 [ 615.697873] f2fs_write_cache_pages+0x1e0/0x450 [ 615.697878] f2fs_write_data_pages+0x14b/0x320 [ 615.697880] ? trace_hardirqs_on+0x2c/0xe0 [ 615.697883] do_writepages+0x41/0xd0 [ 615.697885] __filemap_fdatawrite_range+0x81/0xb0 [ 615.697887] f2fs_sync_dirty_inodes+0x1dd/0x200 [ 615.697889] f2fs_balance_fs_bg+0x2a7/0x2c0 [ 615.697891] f2fs_write_node_pages+0x51/0x220 [ 615.697894] do_writepages+0x41/0xd0 [ 615.697897] __writeback_single_inode+0x3d/0x3d0 [ 615.697899] writeback_sb_inodes+0x1e8/0x410 [ 615.697902] __writeback_inodes_wb+0x5d/0xb0 [ 615.697904] wb_writeback+0x28f/0x340 [ 615.697906] ? cpumask_next+0x16/0x20 [ 615.697908] wb_workfn+0x33e/0x420 [ 615.697911] process_one_work+0x1a1/0x3d0 [ 615.697913] worker_thread+0x30/0x380 [ 615.697915] ? process_one_work+0x3d0/0x3d0 [ 615.697916] kthread+0x116/0x130 [ 615.697918] ? kthread_create_worker_on_cpu+0x70/0x70 [ 615.697921] ret_from_fork+0x3a/0x50 There is still deadloop in below condition: d A - do_writepages - f2fs_write_node_pages - f2fs_balance_fs_bg - f2fs_sync_dirty_inodes - f2fs_write_cache_pages - mutex_lock(&sbi->writepages) -- lock once - __write_data_page - f2fs_balance_fs_bg - f2fs_sync_dirty_inodes - f2fs_write_data_pages - mutex_lock(&sbi->writepages) -- lock again Thread A Thread B - do_writepages - f2fs_write_node_pages - f2fs_balance_fs_bg - f2fs_sync_dirty_inodes - .cp_task = current - f2fs_sync_dirty_inodes - .cp_task = current - filemap_fdatawrite - .cp_task = NULL - filemap_fdatawrite - f2fs_write_cache_pages - enter f2fs_balance_fs_bg since .cp_task is NULL - .cp_task = NULL Change as below to avoid this: - add condition to avoid holding .writepages mutex lock in path of data flush - introduce mutex lock sbi.flush_lock to exclude concurrent data flush in background. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 3 +++ fs/f2fs/f2fs.h | 1 + fs/f2fs/segment.c | 4 ++++ fs/f2fs/super.c | 1 + 4 files changed, 9 insertions(+) commit f7dfd9f3614419bf690d1438620d1f1c5dc2f1ee Author: Park Ju Hyung Date: Tue May 14 15:36:23 2019 +0900 f2fs: always assume that the device is idle under gc_urgent This allows more aggressive discards and balancing job to be done under gc_urgent. Signed-off-by: Park Ju Hyung Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 3 +++ 1 file changed, 3 insertions(+) commit 8648de2c581eeda7e412d6e38bf19e25bbb795ba Author: Chao Yu Date: Tue Feb 19 16:15:29 2019 +0800 f2fs: add bio cache for IPU SQLite in Wal mode may trigger sequential IPU write in db-wal file, after commit d1b3e72d5490 ("f2fs: submit bio of in-place-update pages"), we lost the chance of merging page in inner managed bio cache, result in submitting more small-sized IO. So let's add temporary bio in writepages() to cache mergeable write IO as much as possible. Test case: 1. xfs_io -f /mnt/f2fs/file -c "pwrite 0 65536" -c "fsync" 2. xfs_io -f /mnt/f2fs/file -c "pwrite 0 65536" -c "fsync" Before: f2fs_submit_write_bio: dev = (251,0)/(251,0), rw = WRITE(S), DATA, sector = 65544, size = 4096 f2fs_submit_write_bio: dev = (251,0)/(251,0), rw = WRITE(S), DATA, sector = 65552, size = 4096 f2fs_submit_write_bio: dev = (251,0)/(251,0), rw = WRITE(S), DATA, sector = 65560, size = 4096 f2fs_submit_write_bio: dev = (251,0)/(251,0), rw = WRITE(S), DATA, sector = 65568, size = 4096 f2fs_submit_write_bio: dev = (251,0)/(251,0), rw = WRITE(S), DATA, sector = 65576, size = 4096 f2fs_submit_write_bio: dev = (251,0)/(251,0), rw = WRITE(S), DATA, sector = 65584, size = 4096 f2fs_submit_write_bio: dev = (251,0)/(251,0), rw = WRITE(S), DATA, sector = 65592, size = 4096 f2fs_submit_write_bio: dev = (251,0)/(251,0), rw = WRITE(S), DATA, sector = 65600, size = 4096 f2fs_submit_write_bio: dev = (251,0)/(251,0), rw = WRITE(S), DATA, sector = 65608, size = 4096 f2fs_submit_write_bio: dev = (251,0)/(251,0), rw = WRITE(S), DATA, sector = 65616, size = 4096 f2fs_submit_write_bio: dev = (251,0)/(251,0), rw = WRITE(S), DATA, sector = 65624, size = 4096 f2fs_submit_write_bio: dev = (251,0)/(251,0), rw = WRITE(S), DATA, sector = 65632, size = 4096 f2fs_submit_write_bio: dev = (251,0)/(251,0), rw = WRITE(S), DATA, sector = 65640, size = 4096 f2fs_submit_write_bio: dev = (251,0)/(251,0), rw = WRITE(S), DATA, sector = 65648, size = 4096 f2fs_submit_write_bio: dev = (251,0)/(251,0), rw = WRITE(S), DATA, sector = 65656, size = 4096 f2fs_submit_write_bio: dev = (251,0)/(251,0), rw = WRITE(S), DATA, sector = 65664, size = 4096 f2fs_submit_write_bio: dev = (251,0)/(251,0), rw = WRITE(S), NODE, sector = 57352, size = 4096 After: f2fs_submit_write_bio: dev = (251,0)/(251,0), rw = WRITE(S), DATA, sector = 65544, size = 65536 f2fs_submit_write_bio: dev = (251,0)/(251,0), rw = WRITE(S), NODE, sector = 57368, size = 4096 Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 88 +++++++++++++++++++++++++++++++++++++++++++++++++------ fs/f2fs/f2fs.h | 3 ++ fs/f2fs/segment.c | 5 +++- 3 files changed, 86 insertions(+), 10 deletions(-) commit 49dd883c421a4529968887b0ecd321b23ebf3326 Author: Jaegeuk Kim Date: Mon May 20 15:54:49 2019 -0700 f2fs: allow ssr block allocation during checkpoint=disable period This patch allows to use ssr during checkpoint is disabled. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/gc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5dae2d39074dde941cc3150dcbb7840d88179743 Author: Chao Yu Date: Mon May 20 10:09:22 2019 +0800 f2fs: fix to check layout on last valid checkpoint park As Ju Hyung reported: " I was semi-forced today to use the new kernel and test f2fs. My Ubuntu initramfs got a bit wonky and I had to boot into live CD and fix some stuffs. The live CD was using 4.15 kernel, and just mounting the f2fs partition there corrupted f2fs and my 4.19(with 5.1-rc1-4.19 f2fs-stable merged) refused to mount with "SIT is corrupted node" message. I used the latest f2fs-tools sent by Chao including "fsck.f2fs: fix to repair cp_loads blocks at correct position" It spit out 140M worth of output, but at least I didn't have to run it twice. Everything returned "Ok" in the 2nd run. The new log is at http://arter97.com/f2fs/final After fixing the image, I used my 4.19 kernel with 5.2-rc1-4.19 f2fs-stable merged and it mounted. But, I got this: [ 1.047791] F2FS-fs (nvme0n1p3): layout of large_nat_bitmap is deprecated, run fsck to repair, chksum_offset: 4092 [ 1.081307] F2FS-fs (nvme0n1p3): Found nat_bits in checkpoint [ 1.161520] F2FS-fs (nvme0n1p3): recover fsync data on readonly fs [ 1.162418] F2FS-fs (nvme0n1p3): Mounted with checkpoint version = 761c7e00 But after doing a reboot, the message is gone: [ 1.098423] F2FS-fs (nvme0n1p3): Found nat_bits in checkpoint [ 1.177771] F2FS-fs (nvme0n1p3): recover fsync data on readonly fs [ 1.178365] F2FS-fs (nvme0n1p3): Mounted with checkpoint version = 761c7eda I'm not exactly sure why the kernel detected that I'm still using the old layout on the first boot. Maybe fsck didn't fix it properly, or the check from the kernel is improper. " Although we have rebuild the old deprecated checkpoint with new layout during repair, we only repair last checkpoint park, the other old one is remained. Once the image was mounted, we will 1) sanity check layout and 2) decide which checkpoint park to use according to cp_ver. So that we will print reported message unnecessarily at step 1), to avoid it, we simply move layout check into f2fs_sanity_check_ckpt() after step 2). Reported-by: Park Ju Hyung Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 11 ----------- fs/f2fs/super.c | 9 +++++++++ 2 files changed, 9 insertions(+), 11 deletions(-) commit bc88ac96a9acff450f612b7a21dc934005683187 Author: Jaegeuk Kim Date: Mon May 20 16:17:56 2019 -0700 f2fs: link f2fs quota ops for sysfile This patch reverts: commit fb40d618b039 ("f2fs: don't clear CP_QUOTA_NEED_FSCK_FLAG"). We were missing error handlers used in f2fs quota ops. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 6 ++---- fs/f2fs/super.c | 5 +---- 2 files changed, 3 insertions(+), 8 deletions(-) commit d9424d6d48c8b6c4e8d9c38e2565bcaf90f4d184 Merge: 0e896f380b84 f3440d9a0da2 Author: Mark Brown Date: Thu May 23 14:47:04 2019 +0100 Merge branch 'spi-5.2' into spi-5.3 commit 924b5867e7bd6a6a98014f0517b747465b108011 Author: Douglas Anderson Date: Wed May 15 09:48:12 2019 -0700 spi: Allow SPI devices to request the pumping thread be realtime Right now the only way to get the SPI pumping thread bumped up to realtime priority is for the controller to request it. However it may be that the controller works fine with the normal priority but communication to a particular SPI device on the bus needs realtime priority. Let's add a way for devices to request realtime priority when they set themselves up. NOTE: this will just affect the priority of transfers that end up on the SPI core's pumping thread. In many cases transfers happen in the context of the caller so if you need realtime priority for all transfers you should ensure the calling context is also realtime priority. Signed-off-by: Douglas Anderson Reviewed-by: Guenter Roeck Tested-by: Enric Balletbo i Serra Signed-off-by: Mark Brown drivers/spi/spi.c | 36 ++++++++++++++++++++++++++++++------ include/linux/spi/spi.h | 2 ++ 2 files changed, 32 insertions(+), 6 deletions(-) commit 1f1635b187112e800350a4b33f4d3d2ad82b40b2 Author: Sean Paul Date: Wed May 22 16:21:54 2019 -0400 drm/mediatek: Fix warning about unhandled enum value Fixes the following build warning: drivers/gpu/drm/mediatek/mtk_hdmi.c:327:2: warning: enumeration value ‘HDMI_INFOFRAME_TYPE_DRM’ not handled in switch [-Wswitch] Introduced with the addition of HDMI_INFOFRAME_TYPE_DRM in the commit below, but the code really should have been future-proofed from the start. Fixes: 2cdbfd66a829 ("drm: Enable HDR infoframe support") Cc: Uma Shankar Cc: Shashank Sharma Cc: Ville Syrjälä Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Cc: Bartlomiej Zolnierkiewicz Cc: "Ville Syrjälä" Cc: Hans Verkuil Cc: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org Acked-by: CK Hu Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190522202207.223110-1-sean@poorly.run drivers/gpu/drm/mediatek/mtk_hdmi.c | 3 +++ 1 file changed, 3 insertions(+) commit 0e896f380b845d3fb889f27eb6026cd494bb3cd8 Author: Sowjanya Komatineni Date: Wed May 22 18:29:04 2019 -0700 spi: tegra114: set master cleanup and also invoke it on probe error This patch sets master cleanup and also invokes tegra spi clean on tegra spi probe failure to release tegra spi client data. Signed-off-by: Sowjanya Komatineni Signed-off-by: Mark Brown drivers/spi/spi-tegra114.c | 3 +++ 1 file changed, 3 insertions(+) commit cc0f6e96c4fd01fe1f935014c8c87ac6e994324c Author: Rob Herring Date: Tue May 21 16:23:24 2019 -0500 spi: dt-bindings: Convert Arm pl022 to json-schema Convert the Arm pl022 binding to DT schema format. The clock binding was missing, so it is added to the schema. It really should be required as well, but there are some platforms (spear) not yet using DT clock binding. Cc: Mark Brown Cc: Linus Walleij Cc: linux-spi@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Rob Herring Signed-off-by: Mark Brown .../devicetree/bindings/spi/spi-pl022.yaml | 165 +++++++++++++++++++++ .../devicetree/bindings/spi/spi_pl022.txt | 70 --------- 2 files changed, 165 insertions(+), 70 deletions(-) commit 59dec1f0fac8107f3bffaa0051afce795e24c3e4 Author: Nathan Chancellor Date: Wed May 22 18:26:29 2019 -0700 regulator: max77650: Move max77651_SBB1_desc's declaration down Clang warns: drivers/regulator/max77650-regulator.c:32:39: warning: tentative definition of variable with internal linkage has incomplete non-array type 'struct max77650_regulator_desc' [-Wtentative-definition-incomplete-type] static struct max77650_regulator_desc max77651_SBB1_desc; ^ drivers/regulator/max77650-regulator.c:32:15: note: forward declaration of 'struct max77650_regulator_desc' static struct max77650_regulator_desc max77651_SBB1_desc; ^ 1 warning generated. Move max77651_SBB1_desc's declaration below max77650_regulator_desc's definition so this warning does not happen. Fixes: 3df4235ac41c ("regulator: max77650: Convert MAX77651 SBB1 to pickable linear range") Link: https://github.com/ClangBuiltLinux/linux/issues/491 Signed-off-by: Nathan Chancellor Reviewed-by: Axel Lin Signed-off-by: Mark Brown drivers/regulator/max77650-regulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 63ba8e4d04ab921f8aaa89227d2e0f7ad79725be Author: Tzung-Bi Shih Date: Wed May 22 22:54:02 2019 +0800 ASoC: mediatek: mt8183: move card registration to the end of probe mt8183_mt6358_ts3a227_max98357_dev_probe() does not return immediately if devm_snd_soc_register_card() returns fail. As a result, the rest of code still get executed. Two options to fix: 1. add an extra return statement if devm_snd_soc_register_card() returns fail 2. move devm_snd_soc_register_card() to the end of probe Adopt option 2 which is more clear and common. Signed-off-by: Tzung-Bi Shih Signed-off-by: Mark Brown sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 108d0d40b932f80fc7f1dbd1de548d666e649a4b Author: Tzung-Bi Shih Date: Wed May 22 22:55:05 2019 +0800 ASoC: mediatek: mt8183: remove unused DAPM pins Kernel emits the following messages when booting. ASoC: DAPM unknown pin Headset Mic ASoC: DAPM unknown pin Headphone Remove the unused DAPM pins. Signed-off-by: Tzung-Bi Shih Signed-off-by: Mark Brown sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c | 15 +-------------- .../soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c | 16 +--------------- 2 files changed, 2 insertions(+), 29 deletions(-) commit 5463eb5c2f758069d1db21ed2cf23339431c9481 Author: Jiaxin Yu Date: Wed May 22 22:52:04 2019 +0800 ASoC: Mediatek: MT8183: enable dev runtime suspend and resume System suspend will power off audio, so we need regcache sync when system resume. Remove pm_runtime_get_sync in dev probe and pm_runtime_put_sync in dev remove.So that audio dev can triggle runitme suspend and resume. Signed-off-by: Jiaxin Yu Signed-off-by: Mark Brown sound/soc/mediatek/mt8183/mt8183-afe-pcm.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit f145b209b82f7034f4b9aa22eea3afa1dd1fcf27 Author: Anson Huang Date: Wed May 15 01:30:02 2019 +0000 arm64: dts: imx8mm: add clock for SNVS RTC node i.MX8MM has clock gate for SNVS module, add clock info to SNVS RTC node for clock management. Signed-off-by: Anson Huang Reviewed-by: Leonard Crestez Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mm.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 09892aa146feb9833fffe7be9da440c9b969b40c Author: Anson Huang Date: Sun May 12 10:17:19 2019 +0000 arm64: dts: imx8mm: add clock for GPIO node i.MX8MM has clock gate for each GPIO bank, add clock info to GPIO node for clock management. Signed-off-by: Anson Huang Reviewed-by: Dong Aisheng Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mm.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit 52f93ab8b4224eeea3bb495de006fc865a057cc9 Author: Jacky Bai Date: Mon May 20 07:54:51 2019 +0000 clk: imx: keep the mmdc p1 ipg clock always on on 6sx/ul/ull/sll The MMDC_P1_IPG clock need to be on always on to make sure the MMDC register can be accessed successfully. Signed-off-by: Jacky Bai Reviewed-by: Dong Aisheng Signed-off-by: Shawn Guo drivers/clk/imx/clk-imx6sll.c | 2 +- drivers/clk/imx/clk-imx6sx.c | 2 +- drivers/clk/imx/clk-imx6ul.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 53c6a2ec018bb07aeb1e2b1d7db8521f1e56d221 Author: Leonard Crestez Date: Wed May 22 09:48:30 2019 +0000 clk: imx8m: Add GIC clock This is documented in the reference manuals as GIC_CLK_ROOT. In some out-of-tree DVFS scenarios the gic clock can end up as the only user of sys_pll2 so if we don't define the gic clk explicitly it might be turned off. This applies to both 8mq and 8mm: same clk register but diffferent parents. Signed-off-by: Leonard Crestez Reviewed-by: Abel Vesa Signed-off-by: Shawn Guo drivers/clk/imx/clk-imx8mm.c | 4 ++++ drivers/clk/imx/clk-imx8mq.c | 4 ++++ 2 files changed, 8 insertions(+) commit a44e9706213c706fbf030c01bc5160727e559777 Author: Leonard Crestez Date: Mon May 13 05:32:07 2019 +0000 clk: imx8mm: Mark dram_apb critical This clock is used for dram operations inside TF-A and must be kept enabled for features such as suspend/resume dram retention and busfreq to work. This is required for imx8mm suspend to work with NXP branch of TF-A. There is an equivalent clk on imx8mq and it's always been marked as critical in upstream. Signed-off-by: Leonard Crestez Signed-off-by: Shawn Guo drivers/clk/imx/clk-imx8mm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 246c9ab43403efd0de1890e6c4f2d4faf9742b79 Author: Anson Huang Date: Sun May 12 10:30:41 2019 +0000 clk: imx7ulp: update nic1_bus_clk parent info Since i.MX7ULP B0 chip, nic1_bus_clk's parent is changed to from nic0_clk directly, update it accordingly. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo drivers/clk/imx/clk-imx7ulp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c129b6fe81cd9667ff3cef56388f0f952865ab41 Author: Anson Huang Date: Sun May 12 10:24:19 2019 +0000 clk: imx: Use imx_mmdc_mask_handshake() API for masking MMDC channel Use imx_mmdc_mask_handshake() API instead of programming CCM register directly in each platform to mask unused MMDC channel's handshake. Signed-off-by: Anson Huang Reviewed-by: Dong Aisheng Signed-off-by: Shawn Guo drivers/clk/imx/clk-imx6q.c | 13 +------------ drivers/clk/imx/clk-imx6sl.c | 5 +---- drivers/clk/imx/clk-imx6sll.c | 3 +-- drivers/clk/imx/clk-imx6sx.c | 5 +---- drivers/clk/imx/clk-imx6ul.c | 5 +---- 5 files changed, 5 insertions(+), 26 deletions(-) commit efdb279033ad4fa830e330a071d1e434235aa153 Author: Anson Huang Date: Sun May 12 10:24:12 2019 +0000 clk: imx: Add common API for masking MMDC handshake All i.MX6 SoCs need to mask unused MMDC channel's handshake for low power modes, this patch provides common API for masking the MMDC channel passed from caller. Signed-off-by: Anson Huang Reviewed-by: Dong Aisheng Signed-off-by: Shawn Guo drivers/clk/imx/clk.c | 15 +++++++++++++++ drivers/clk/imx/clk.h | 1 + 2 files changed, 16 insertions(+) commit 87def8d0d5bfc32bf8a221b63addb8a051cbf017 Author: Leonard Crestez Date: Wed May 22 09:48:29 2019 +0000 dt-bindings: clock: imx8m: Add GIC clock This should be defined in the clock tree so that parents are not shutdown by accident Signed-off-by: Leonard Crestez Reviewed-by: Abel Vesa Signed-off-by: Shawn Guo include/dt-bindings/clock/imx8mm-clock.h | 3 ++- include/dt-bindings/clock/imx8mq-clock.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit af79ef726ad605030ce1870cdeede0e687e1622a Author: Andrey Smirnov Date: Wed May 22 00:20:52 2019 -0700 ARM: dts: vf610-zii-dev: Add QSPI node Both rev C and rev B of the board come with two QSPI-NOR chips attached to the SoC. Add DT code describing all of this. Signed-off-by: Andrey Smirnov Cc: Shawn Guo Cc: Chris Healy Cc: Andrew Lunn Cc: Fabio Estevam Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Shawn Guo arch/arm/boot/dts/vf610-zii-dev.dtsi | 48 +++++++++++++++++++++++++++++++----- 1 file changed, 42 insertions(+), 6 deletions(-) commit 36b7ee5f7e06f69b7332715099ebd6597986140a Author: Andrey Smirnov Date: Wed May 22 00:20:51 2019 -0700 ARM: dts: vf610-zii-dev: Fix incorrect UART2 pin assignment UART2 is connected to PTD22/23, not PTD0/1. Fix corresponding pinmux node. Signed-off-by: Andrey Smirnov Cc: Shawn Guo Cc: Chris Healy Cc: Andrew Lunn Cc: Fabio Estevam Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Shawn Guo arch/arm/boot/dts/vf610-zii-dev.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 09a93ef3d60f5a439613cd6a806bba265c3663ed Author: Jani Nikula Date: Wed May 22 13:35:05 2019 +0300 drm/i915: remove duplicate typedef for intel_wakeref_t Fix the duplicate typedef for intel_wakeref_t leading to Clang build issues. While at it, actually make the intel_runtime_pm.h header self-contained, which was claimed in the commit being fixed. Reported-by: Nathan Chancellor Cc: Nathan Chancellor Cc: Chris Wilson References: http://mid.mail-archive.com/20190521183850.GA9157@archlinux-epyc References: https://travis-ci.com/ClangBuiltLinux/continuous-integration/jobs/201754420#L2435 Fixes: 0d5adc5f2f01 ("drm/i915: extract intel_runtime_pm.h from intel_drv.h") Reviewed-by: Chris Wilson Reviewed-by: Nathan Chancellor Tested-by: Nathan Chancellor Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190522103505.2082-1-jani.nikula@intel.com drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/intel_runtime_pm.h | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) commit 947b437e1263c81bb5d30a84f1a4a35dbb9f6b78 Author: Takashi Sakamoto Date: Wed May 22 23:17:08 2019 +0900 ALSA: firewire-lib: unify packet handler for IR context Usage of 16 bytes IR context header allows to handle context payload by the same code for with-CIP and without-CIP packets. This commit unifies both handlers of with-CIP and without-CIP packets. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/amdtp-stream.c | 54 ++++++++++++------------------------------- 1 file changed, 15 insertions(+), 39 deletions(-) commit f11453c7cc010d4052f630d541c39301b54cee3c Author: Takashi Sakamoto Date: Wed May 22 23:17:07 2019 +0900 ALSA: firewire-lib: use 16 bytes IR context header to separate CIP header In IR context, some quadlets of packet payload can be included into context header. This is good for packet with CIP header because the context payload buffer can includes data blocks only for with-CIP and without-CIP pakets. This commit uses 16 bytes IR context header for this purpose. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/amdtp-stream.c | 37 ++++++++++++++++++++++++++----------- sound/firewire/amdtp-stream.h | 2 +- 2 files changed, 27 insertions(+), 12 deletions(-) commit e335425b65965e6bebdf1ebc8187d6732ddaad00 Author: Takashi Sakamoto Date: Wed May 22 23:17:06 2019 +0900 ALSA: firewire-lib: split helper function to check incoming CIP header A parser for CIP header in incoming packet is enough large. This commit splits it into a helper function to better looks of packet handler. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/amdtp-stream.c | 100 +++++++++++++++++++++++++----------------- 1 file changed, 60 insertions(+), 40 deletions(-) commit 8a400b999678996af6ca9434376b2260ec2ea9eb Author: Takashi Sakamoto Date: Wed May 22 23:17:05 2019 +0900 ALSA: firewire-lib: compute pointer to payload buffer in context handler The value of pointer to payload buffer is computed in each packet handler, however the pointer can be decided before call of packet handler. This commit adds an argument for the pointer to the packet handler to reduce codes to compute for the pointer. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/amdtp-stream.c | 28 +++++++++++++--------------- sound/firewire/amdtp-stream.h | 3 ++- 2 files changed, 15 insertions(+), 16 deletions(-) commit 6f3c07d03c6bc84d2da6ce0e24e9a1feece42c47 Author: Takashi Sakamoto Date: Wed May 22 23:17:04 2019 +0900 ALSA: firewire-lib: calculate the length of packet payload in packet handler In current packet handler, the length of payload is given as an argument of callback function, however this value is just required to process payload of transferred isoc packet, thus just for IR context. This commit replaces the argument for payload of packet with the argument of context header. As a result, the length of payload is computed in packet handler for IR context. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/amdtp-stream.c | 49 ++++++++++++++++++++----------------------- sound/firewire/amdtp-stream.h | 5 ++--- 2 files changed, 25 insertions(+), 29 deletions(-) commit 07ea238ca139aef1820802409a6a7bdd45e38caa Author: Takashi Sakamoto Date: Wed May 22 23:17:03 2019 +0900 ALSA: firewire-lib: use clear name for variable of CIP header This commit is to distinguish variable of CIP header from variable of isochronous context header. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/amdtp-stream.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit cbb56814fbe7fedd71cd6b29dc83bab2915a5b74 Author: Emil Velikov Date: Wed May 22 16:47:00 2019 +0100 drm/virtio: remove irrelevant DRM_UNLOCKED flag DRM_UNLOCKED doesn't do anything for non-legacy drivers. Remove it. Cc: David Airlie Cc: Gerd Hoffmann Cc: virtualization@lists.linux-foundation.org Cc: Daniel Vetter Signed-off-by: Emil Velikov Link: http://patchwork.freedesktop.org/patch/msgid/20190522154702.16269-2-emil.l.velikov@gmail.com Signed-off-by: Gerd Hoffmann drivers/gpu/drm/virtio/virtgpu_ioctl.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 0388f2f61befe1de58b3e6319b133ea9391812c1 Author: Gerd Hoffmann Date: Wed May 22 12:33:07 2019 +0200 drm/cirrus: remove leftover files cirrus_drv.h and cirrus_ttm.c are unused since commit ab3e023b1b4c ("drm/cirrus: rewrite and modernize driver"), apparently I ran "rm" instead of "git rm" on them so they are still in present the tree. Signed-off-by: Gerd Hoffmann Reviewed-by: Sam Ravnborg Link: http://patchwork.freedesktop.org/patch/msgid/20190522103307.12711-1-kraxel@redhat.com drivers/gpu/drm/cirrus/cirrus_drv.h | 250 -------------------------- drivers/gpu/drm/cirrus/cirrus_ttm.c | 337 ------------------------------------ 2 files changed, 587 deletions(-) commit d7ac8b1bd281df8996b54044c8708d698de1203e Author: Akinobu Mita Date: Wed Apr 17 10:06:41 2019 -0400 media: ov7740: remove redundant V4L2_CTRL_FLAG_VOLATILE set If the v4l2 controls are set up for autofoo/foo-type handling by calling v4l2_ctrl_auto_cluster() with the last set_volatile argument setting true, each non-auto control doesn't need to be flagged V4L2_CTRL_FLAG_VOLATILE. Cc: Wenyou Yang Cc: Eugen Hristev Signed-off-by: Akinobu Mita Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov7740.c | 2 -- 1 file changed, 2 deletions(-) commit eed6b2e7c9ca964658b4f3bab5e28032f424a45c Author: Akinobu Mita Date: Wed Apr 17 10:06:40 2019 -0400 media: ov7740: fix vertical flip control Setting the value of the V4L2_CID_VFLIP control is currently ignored. Because V4L2_CID_HFLIP and V4L2_CID_VFLIP are independently controlled in s_ctrl() but these controls belong to the same cluster and the first control is V4L2_CID_HFLIP. Fix it by not clustering these controls. Also correct erroneous updating register bit for vertical flip. Cc: Wenyou Yang Cc: Eugen Hristev Signed-off-by: Akinobu Mita Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov7740.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6e4ab830ac6d6a0d7cd7f87dc5d6536369bf24a8 Author: Akinobu Mita Date: Wed Apr 17 10:06:39 2019 -0400 media: ov7740: avoid invalid framesize setting If the requested framesize by VIDIOC_SUBDEV_S_FMT is larger than supported framesizes, it causes an out of bounds array access and the resulting framesize is unexpected. Avoid out of bounds array access and select the default framesize. Cc: Wenyou Yang Cc: Eugen Hristev Signed-off-by: Akinobu Mita Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov7740.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit cfe7cc383cfadff6d3596296c86d7ab7487fc6f4 Author: Akinobu Mita Date: Wed Apr 17 10:06:38 2019 -0400 media: ov7740: fix unbalanced pm_runtime_get/put Avoid returning without decrement the usage count in s_ctrl(). Cc: Wenyou Yang Cc: Eugen Hristev Signed-off-by: Akinobu Mita Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov7740.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 428d3c867df6f2f87721fe7384ea09ad3130f839 Author: Hans Verkuil Date: Wed May 22 05:22:20 2019 -0400 media: cec-ioc-g-mode.rst: be more specific when EPERM is returned Document which capability is required, rather than just saying that "root permissions" are required. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/cec/cec-ioc-g-mode.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b6c96e15682549a5b5cb9d0301f44949a012741a Author: Hans Verkuil Date: Tue Apr 23 08:14:01 2019 -0400 media: cec: allow any initiator for Ping and Image/Text View On Some displays pull down the HPD when in standby, but CEC is still active and the display can be woken up by sending an Image View On or Text View On CEC command. The CEC specification doesn't tell you what the initiator should be for such a command (without a HPD it's unclear if the CEC adapter can claim a logical address). This patch allows any initiator value when there is no HPD for the Image/Text View On commands and for the Ping command. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/cec/cec-adap.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 89db242aa3c5fc631ff58faf5a0f7c604c84a9db Author: Hans Verkuil Date: Tue Apr 23 08:48:22 2019 -0400 media: cec: support CEC_MSG_FL_RAW If this flag is set, then check for root permissions and skip all message checks expect for the core checks (i.e. validate the length etc.). Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/cec/cec-adap.c | 107 +++++++++++++++++++++++++------------------ 1 file changed, 62 insertions(+), 45 deletions(-) commit eabe3bc2689ad0993c57469eb7efb1291443cc74 Author: Hans Verkuil Date: Wed May 15 03:50:41 2019 -0400 media: cec-ioc-receive.rst: document CEC_MSG_FL_RAW Document this new cec_msg flag. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/cec/cec-ioc-receive.rst | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit aa50accfda60468fd132573b8f83e158ff45cb3d Author: Hans Verkuil Date: Tue Apr 23 08:44:59 2019 -0400 media: cec: add CEC_MSG_FL_RAW flag and msg_is_raw helper function This adds the userspace API to send raw unchecked CEC messages. This will require root permissions. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/cec/cec-priv.h | 5 +++++ include/uapi/linux/cec.h | 1 + 2 files changed, 6 insertions(+) commit e76cbec85eac714a93a7945c9c41dcd8819b31c5 Author: Hans Verkuil Date: Tue Apr 23 08:43:30 2019 -0400 media: cec: move check from cec_transmit to cec_transmit_msg_fh This ensures all the cec_msg checks are done in the same place. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/cec/cec-adap.c | 5 +++++ drivers/media/cec/cec-api.c | 8 -------- 2 files changed, 5 insertions(+), 8 deletions(-) commit 63d171f85fb15247600bdd38b1dbf72bcba0dc8a Author: Hans Verkuil Date: Tue Apr 23 08:37:39 2019 -0400 media: cec: cec_transmit_msg_fh: do sanity checks first The code that fills in the CEC_MSG_CDC_MESSAGE physical address is now done after the sanity checks. It also only does this if the message length is >= 4 (i.e. there is room for the physical address). Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/cec/cec-adap.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 00ccd263ee085c7428e2a1102c2f39e4a6927978 Author: Hans Verkuil Date: Mon May 20 10:38:40 2019 -0400 media: cec-gpio: use disable/enable_irq Due to limitations in gpiolib it was impossible to disable the interrupt of an input gpio and then switch it to gpio output and drive it. The only way to achieve that was to free the interrupt first, then switch the direction. When going back to gpio input and using interrupts to read the gpio pin you had to request the irq again. This limitation was lifted in gpiolib in kernel 4.20, but the cec-gpio driver was still using the old workaround implementation. This patch updates the cec-gpio driver to just enable and disable the irq. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/cec-gpio/cec-gpio.c | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) commit e2c1615677d3dd180fbc2e8e5434cd48f62250bd Author: Steve Longerbeam Date: Mon May 20 10:24:11 2019 -0300 ARM: dts: imx53-smd: Add OV5642 video capture support Add video capture support from the OV5642 to IPU CSI0 on the i.MX53 SMD. Signed-off-by: Steve Longerbeam [fabio: remove unnecessary 'regulator-always-on' from camera regulators] Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx53-smd.dts | 73 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) commit e5ad32308eb5e106f7f81980e317da67a6d9a4e6 Author: Steve Longerbeam Date: Mon May 20 10:24:10 2019 -0300 ARM: dts: imx53: Add capture-subsystem device Add video capture_subsystem device node, and include both CSI ports. Prepare for adding sensors by adding the parallel sensor anchor endpoints to the CSI ports. Signed-off-by: Steve Longerbeam Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx53.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit cfc0e7bbf41baad26ad32bacd43bdab0be6b44d8 Author: Jani Nikula Date: Thu May 23 11:57:24 2019 +0300 drm/i915: Update DRIVER_DATE to 20190523 Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_drv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c92f56faaadd310ae1156e4decee5aa4f0365e44 Author: Ran Wang Date: Fri May 17 13:16:24 2019 +0800 arm64: dts: ls1028a: Add USB dt nodes This patch adds USB dt nodes for LS1028A. Signed-off-by: Ran Wang Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit efb8393cf06cede0749dc79695033117e6005621 Author: Rob Herring Date: Thu May 16 17:55:25 2019 -0500 ARM: dts: imx: Avoid colliding 'display' node and property names While properties and child nodes with the same name are valid DT, the practice is not encouraged. Furthermore, the collision is problematic for YAML encoded DT. Let's just avoid the issue and rename the nodes. Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Rob Herring Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6ul-geam.dts | 2 +- arch/arm/boot/dts/imx6ul-isiot.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit eb876fbc248e6eb4773a5bc80d205ff7262b1bb5 Author: Kan Liang Date: Mon May 13 13:59:03 2019 -0400 perf/x86/intel/rapl: Cosmetic rename internal variables in response to multi-die/pkg support Syntax update only -- no logical or functional change. In response to the new multi-die/package changes, update variable names to use "die" terminology, instead of "pkg". For previous platforms which doesn't have multi-die, "die" is identical as "pkg". Signed-off-by: Kan Liang Signed-off-by: Len Brown Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/0ddb97e121397d37933233da303556141814fa47.1557769318.git.len.brown@intel.com arch/x86/events/intel/rapl.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit b0529b9cafacfd054837ea6b8c4ef7b402716744 Author: Kan Liang Date: Mon May 13 13:59:02 2019 -0400 perf/x86/intel/uncore: Cosmetic renames in response to multi-die/pkg support Syntax update only -- no logical or functional change. In response to the new multi-die/package changes, update variable names to use "die" terminology, instead of "pkg". For previous platforms which doesn't have multi-die, "die" is identical as "pkg". Signed-off-by: Kan Liang Signed-off-by: Len Brown Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/f0ea5e501288329135e94f51969ff54a03c50e2e.1557769318.git.len.brown@intel.com arch/x86/events/intel/uncore.c | 74 ++++++++++++++++++------------------ arch/x86/events/intel/uncore.h | 4 +- arch/x86/events/intel/uncore_snbep.c | 4 +- 3 files changed, 41 insertions(+), 41 deletions(-) commit 835896a59b9577d0bc2131e027c37bdde5b979af Author: Len Brown Date: Mon May 13 13:59:01 2019 -0400 hwmon/coretemp: Cosmetic: Rename internal variables to zones from packages Syntax update only -- no logical or functional change. In response to the new multi-die/package changes, update variable names to use the more generic thermal "zone" terminology, instead of "package", as the zones can refer to either packages or die. Signed-off-by: Len Brown Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Cc: Zhang Rui Link: https://lkml.kernel.org/r/facecfd3525d55c2051f63a7ec709aeb03cc1dc1.1557769318.git.len.brown@intel.com drivers/hwmon/coretemp.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) commit b2ce1c883df91a231f8138935167273c1767ad66 Author: Len Brown Date: Mon May 13 13:59:00 2019 -0400 thermal/x86_pkg_temp_thermal: Cosmetic: Rename internal variables to zones from packages Syntax update only -- no logical or functional change. In response to the new multi-die/package changes, update variable names to use the more generic thermal "zone" terminology, instead of "package", as the zones can refer to either packages or die. Signed-off-by: Len Brown Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Cc: Zhang Rui Link: https://lkml.kernel.org/r/b65494a76be13481dc3a809c75debb2574c34eda.1557769318.git.len.brown@intel.com drivers/thermal/intel/x86_pkg_temp_thermal.c | 142 ++++++++++++++------------- 1 file changed, 72 insertions(+), 70 deletions(-) commit cb63ba0f670df1f0ddf21c6cc4bbe74db398742c Author: Kan Liang Date: Mon May 13 13:58:59 2019 -0400 perf/x86/intel/cstate: Support multi-die/package Some cstate counters become die-scoped on Xeon Cascade Lake-AP. Perf cstate driver needs to support die-scope cstate counters. Use topology_die_cpumask() to replace topology_core_cpumask(). For previous platforms which doesn't have multi-die, topology_die_cpumask() is identical as topology_core_cpumask(). There is no functional change for previous platforms. Name the die-scope PMU "cstate_die". Signed-off-by: Kan Liang Signed-off-by: Len Brown Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/acb5e483287280eeb2b6daabe04a600b85e72a78.1557769318.git.len.brown@intel.com arch/x86/events/intel/cstate.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit b10b3efb88e7bba12f09f71740bab9b7225631c9 Author: Kan Liang Date: Mon May 13 13:58:58 2019 -0400 perf/x86/intel/rapl: Support multi-die/package RAPL becomes die-scope on Xeon Cascade Lake-AP. Perf RAPL driver needs to support die-scope RAPL domain. Use topology_logical_die_id() to replace topology_logical_package_id(). For previous platforms which doesn't have multi-die, topology_logical_die_id() is identical as topology_logical_package_id(). Use topology_die_cpumask() to replace topology_core_cpumask(). For previous platforms which doesn't have multi-die, topology_die_cpumask() is identical as topology_core_cpumask(). There is no functional change for previous platforms. Signed-off-by: Kan Liang Signed-off-by: Len Brown Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/851320c8c87ba7a54e58ee8579c1bf566ce23cbb.1557769318.git.len.brown@intel.com arch/x86/events/intel/rapl.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 1ff4a47b2d0c13b755b2eeeb0e23be6c056d5dd9 Author: Kan Liang Date: Mon May 13 13:58:57 2019 -0400 perf/x86/intel/uncore: Support multi-die/package Uncore becomes die-scope on Xeon Cascade Lake-AP. Uncore driver needs to support die-scope uncore units. Use topology_logical_die_id() to replace topology_logical_package_id(). For previous platforms which doesn't have multi-die, topology_logical_die_id() is identical as topology_logical_package_id(). In pci_probe()/remove(), the group id reads from PCI BUS is logical die id for multi-die systems. Use topology_die_cpumask() to replace topology_core_cpumask(). For previous platforms which doesn't have multi-die, topology_die_cpumask() is identical as topology_core_cpumask(). There is no functional change for previous platforms. Signed-off-by: Kan Liang Signed-off-by: Len Brown Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/a25bba4a5b480aa4e9f8190005d7f5f53e29c8da.1557769318.git.len.brown@intel.com arch/x86/events/intel/uncore.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit 2e4c54dac7b360c3820399bdf06cde9134a4495b Author: Len Brown Date: Mon May 13 13:58:56 2019 -0400 topology: Create core_cpus and die_cpus sysfs attributes Create CPU topology sysfs attributes: "core_cpus" and "core_cpus_list" These attributes represent all of the logical CPUs that share the same core. These attriutes is synonymous with the existing "thread_siblings" and "thread_siblings_list" attribute, which will be deprecated. Create CPU topology sysfs attributes: "die_cpus" and "die_cpus_list". These attributes represent all of the logical CPUs that share the same die. Suggested-by: Brice Goglin Signed-off-by: Len Brown Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/071c23a298cd27ede6ed0b6460cae190d193364f.1557769318.git.len.brown@intel.com Documentation/cputopology.txt | 21 +++++++++++++++------ arch/x86/include/asm/smp.h | 1 + arch/x86/include/asm/topology.h | 1 + arch/x86/kernel/smpboot.c | 22 ++++++++++++++++++++++ arch/x86/xen/smp_pv.c | 1 + drivers/base/topology.c | 12 ++++++++++++ include/linux/topology.h | 3 +++ 7 files changed, 55 insertions(+), 6 deletions(-) commit b73ed8dc0597c11ec5064d06b9bbd4e541b6d4e7 Author: Len Brown Date: Mon May 13 13:58:55 2019 -0400 topology: Create package_cpus sysfs attribute The existing sysfs cpu/topology/core_siblings (and core_siblings_list) attributes are documented, implemented, and used by programs to represent set of logical CPUs sharing the same package. This makes sense if the next topology level above a core is always a package. But on systems where there is a die topology level between a core and a package, the name and its definition become inconsistent. So without changing its function, add a name for this map that describes what it actually is -- package CPUs -- the set of CPUs that share the same package. This new name will be immune to changes in topology, since it describes threads at the current level, not siblings at a contained level. Suggested-by: Brice Goglin Signed-off-by: Len Brown Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/d9d3228b82fb5665e6f93a0ccd033fe022558521.1557769318.git.len.brown@intel.com Documentation/cputopology.txt | 12 ++++++------ drivers/base/topology.c | 6 ++++++ 2 files changed, 12 insertions(+), 6 deletions(-) commit cfcd82e632882372db960b50782a439a8ba56c09 Author: Zhang Rui Date: Mon May 13 13:58:54 2019 -0400 hwmon/coretemp: Support multi-die/package Package temperature sensors are actually implemented in hardware per-die. Update coretemp to be "die-aware", so it can expose mulitple sensors per package, instead of just one. No change to single-die/package systems. Signed-off-by: Zhang Rui Signed-off-by: Len Brown Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Acked-by: Guenter Roeck Acked-by: Peter Zijlstra (Intel) Cc: linux-pm@vger.kernel.org Cc: linux-hwmon@vger.kernel.org Link: https://lkml.kernel.org/r/ec2868f35113a01ff72d9041e0b97fc6a1c7df84.1557769318.git.len.brown@intel.com drivers/hwmon/coretemp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9ea7612c46586d9eacfd517e73ff76ef294feca0 Author: Zhang Rui Date: Mon May 13 13:58:53 2019 -0400 powercap/intel_rapl: Update RAPL domain name and debug messages The RAPL domain "name" attribute contains "Package-N", which is ambiguous on multi-die per-package systems. Update the name to "package-X-die-Y" on those systems. No change on systems without multi-die/package. Update driver debug messages. Signed-off-by: Zhang Rui Signed-off-by: Len Brown Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Acked-by: Rafael J. Wysocki Acked-by: Peter Zijlstra (Intel) Cc: linux-pm@vger.kernel.org Link: https://lkml.kernel.org/r/6510b784e16374447965925588ec6e46d5d007d8.1557769318.git.len.brown@intel.com drivers/powercap/intel_rapl.c | 57 ++++++++++++++++++++++++------------------- 1 file changed, 32 insertions(+), 25 deletions(-) commit 724adec33c2491f26f739f285ddca25fca226e48 Author: Zhang Rui Date: Mon May 13 13:58:52 2019 -0400 thermal/x86_pkg_temp_thermal: Support multi-die/package Package temperature sensors are actually implemented in hardware per-die. Thus, the new multi-die/package systems sport mulitple package thermal zones for each package. Update the x86_pkg_temp_thermal to be "multi-die-aware", so it can expose multiple zones per package, instead of just one. Signed-off-by: Zhang Rui Signed-off-by: Len Brown Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/281695c854d38d3bdec803480c3049c36198ca44.1557769318.git.len.brown@intel.com drivers/thermal/intel/x86_pkg_temp_thermal.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 32fb480e0a2cf1f71e4174d6477198c94dbc746c Author: Zhang Rui Date: Mon May 13 13:58:51 2019 -0400 powercap/intel_rapl: Support multi-die/package RAPL "package" domains are actually implemented in hardware per-die. Thus, the new multi-die/package systems have mulitple domains within each physical package. Update the intel_rapl driver to be "die aware" -- exporting multiple domains within a single package, when present. No change on single die/package systems. Signed-off-by: Zhang Rui Signed-off-by: Len Brown Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Acked-by: Rafael J. Wysocki Acked-by: Peter Zijlstra (Intel) Cc: linux-pm@vger.kernel.org Link: https://lkml.kernel.org/r/9fcb4719aeb7efccf3bc75ed8dd559e46121649f.1557769318.git.len.brown@intel.com drivers/powercap/intel_rapl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit aadf7b38337108627b014fb285147aacdfafe42e Author: Zhang Rui Date: Mon May 13 13:58:50 2019 -0400 powercap/intel_rapl: Simplify rapl_find_package() Simplify how the code to discover a package is called. Rename find_package_by_id() to rapl_find_package_domain() Syntax only, no functional or semantic change. Signed-off-by: Zhang Rui Signed-off-by: Len Brown Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Acked-by: Rafael J. Wysocki Acked-by: Peter Zijlstra (Intel) Cc: linux-pm@vger.kernel.org Link: https://lkml.kernel.org/r/ae3d1903407fd6e3684234b674f4f0e62c2ab54c.1557769318.git.len.brown@intel.com drivers/powercap/intel_rapl.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 212bf4fdb7f9eeeb99afd97ebad677d43e7b55ac Author: Len Brown Date: Mon May 13 13:58:49 2019 -0400 x86/topology: Define topology_logical_die_id() Define topology_logical_die_id() ala existing topology_logical_package_id() Signed-off-by: Len Brown Signed-off-by: Thomas Gleixner Tested-by: Zhang Rui Reviewed-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/2f3526e25ae14fbeff26fb26e877d159df8946d9.1557769318.git.len.brown@intel.com arch/x86/include/asm/processor.h | 1 + arch/x86/include/asm/topology.h | 5 +++++ arch/x86/kernel/cpu/common.c | 1 + arch/x86/kernel/smpboot.c | 45 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 52 insertions(+) commit 306a0de329f77537f29022c2982006f9145d782d Author: Len Brown Date: Mon May 13 13:58:48 2019 -0400 x86/topology: Define topology_die_id() topology_die_id(cpu) is a simple macro for use inside the kernel to get the die_id associated with the given cpu. Signed-off-by: Len Brown Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/6463bc422b1b05445a502dc505c1d7c6756bda6a.1557769318.git.len.brown@intel.com arch/x86/include/asm/topology.h | 1 + 1 file changed, 1 insertion(+) commit 0e344d8c709fe01d882fc0fb5452bedfe5eba67a Author: Len Brown Date: Mon May 13 13:58:47 2019 -0400 cpu/topology: Export die_id Export die_id in cpu topology, for the benefit of hardware that has multiple-die/package. Signed-off-by: Len Brown Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Cc: linux-doc@vger.kernel.org Link: https://lkml.kernel.org/r/e7d1caaf4fbd24ee40db6d557ab28d7d83298900.1557769318.git.len.brown@intel.com Documentation/cputopology.txt | 15 ++++++++++++--- drivers/base/topology.c | 4 ++++ include/linux/topology.h | 3 +++ 3 files changed, 19 insertions(+), 3 deletions(-) commit 14d96d6c06b5d8116b8d52c9c5530f5528ef1e61 Author: Len Brown Date: Mon May 13 13:58:46 2019 -0400 x86/topology: Create topology_max_die_per_package() topology_max_packages() is available to size resources to cover all packages in the system. But now multi-die/package systems are coming up, and some resources are per-die. Create topology_max_die_per_package(), for detecting multi-die/package systems, and sizing any per-die resources. Signed-off-by: Len Brown Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/e6eaf384571ae52ac7d0ca41510b7fb7d2fda0e4.1557769318.git.len.brown@intel.com arch/x86/include/asm/processor.h | 1 - arch/x86/include/asm/topology.h | 10 ++++++++++ arch/x86/kernel/cpu/topology.c | 5 ++++- 3 files changed, 14 insertions(+), 2 deletions(-) commit 7745f03eb39587dd15a1fb26e6223678b8e906d2 Author: Len Brown Date: Mon May 13 13:58:45 2019 -0400 x86/topology: Add CPUID.1F multi-die/package support Some new systems have multiple software-visible die within each package. Update Linux parsing of the Intel CPUID "Extended Topology Leaf" to handle either CPUID.B, or the new CPUID.1F. Add cpuinfo_x86.die_id and cpuinfo_x86.max_dies to store the result. die_id will be non-zero only for multi-die/package systems. Signed-off-by: Len Brown Signed-off-by: Thomas Gleixner Reviewed-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Cc: linux-doc@vger.kernel.org Link: https://lkml.kernel.org/r/7b23d2d26d717b8e14ba137c94b70943f1ae4b5c.1557769318.git.len.brown@intel.com Documentation/x86/topology.rst | 4 ++ arch/x86/include/asm/processor.h | 4 +- arch/x86/kernel/cpu/topology.c | 85 +++++++++++++++++++++++++++++++--------- arch/x86/kernel/smpboot.c | 2 + 4 files changed, 75 insertions(+), 20 deletions(-) commit c6045b4e3cadc2d8d65be8601deb76811e08a6ce Author: Benjamin Gaignard Date: Wed May 22 17:29:25 2019 +0200 pinctrl: stmfx: enable links creations Set create_link to inform pinctrl core that stmfx wants to create link with its consumers. Signed-off-by: Benjamin Gaignard Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-stmfx.c | 1 + 1 file changed, 1 insertion(+) commit 036f394dd77f8117346874151793ec38967d843f Author: Benjamin Gaignard Date: Wed May 22 17:29:24 2019 +0200 pinctrl: Enable device link creation for pin control A pin controller may want to create a link between itself and its clients to be sure of suspend/resume call ordering. Introduce link_consumers field in pinctrl_desc structure to let pinctrl core knows that controller expect to create a link. Signed-off-by: Benjamin Gaignard [Renamed create_link to link_consumers] Signed-off-by: Linus Walleij drivers/pinctrl/core.c | 11 +++++++++++ include/linux/pinctrl/pinctrl.h | 5 +++++ 2 files changed, 16 insertions(+) commit 75ebf69445dde8f0cec13ce1086893c835a4e460 Author: Anson Huang Date: Wed May 15 01:29:57 2019 +0000 clk: imx8mm: add SNVS clock to clock tree i.MX8MM has clock gate for SNVS module, add it into clock tree for SNVS RTC driver to manage. Signed-off-by: Anson Huang Reviewed-by: Leonard Crestez Signed-off-by: Shawn Guo drivers/clk/imx/clk-imx8mm.c | 1 + 1 file changed, 1 insertion(+) commit 2b2ebb9acb89cf968bb08b488362383ae795e6b1 Author: Anson Huang Date: Wed May 15 01:29:53 2019 +0000 dt-bindings: clock: imx8mm: Add SNVS clock Add macro for the SNVS clock of the i.MX8MM. Signed-off-by: Anson Huang Reviewed-by: Leonard Crestez Signed-off-by: Shawn Guo include/dt-bindings/clock/imx8mm-clock.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit dcb76ad1f4c7b1d63988ea96d31ce561db5f63f7 Author: Simon Sandström Date: Wed May 22 22:58:49 2019 +0200 staging: kpc2000: remove invalid spaces in cell_probe.c Fixes checkpatch.pl error "space prohibited before/after that parenthesis". Signed-off-by: Simon Sandström Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/cell_probe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c2f894bc14c05dba3e5bf26a1ec11f2118eaa45c Author: Simon Sandström Date: Wed May 22 22:58:48 2019 +0200 staging: kpc2000: add space after comma in cell_probe.c Fixes checkpatch.pl error "space required after that ','". Signed-off-by: Simon Sandström Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/cell_probe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c16265dd6f77641654f75119c3e9f615b817f620 Author: Simon Sandström Date: Wed May 22 22:58:47 2019 +0200 staging: kpc2000: add spaces around operators in cell_probe.c Fixes checkpatch.pl warning "spaces preferred around that ". Signed-off-by: Simon Sandström Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/cell_probe.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d0a1a4b0e0fb6140022e5daf6f369efdec69dda1 Author: Simon Sandström Date: Wed May 22 22:58:46 2019 +0200 staging: kpc2000: fix invalid linebreaks in cell_probe.c Fixes checkpatch.pl error "else should follow close brace '}'" and "trailing statements should be on next line". Signed-off-by: Simon Sandström Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/cell_probe.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit e55c49b892f90bb62988541bcf23ae5eae52c10a Author: Simon Sandström Date: Wed May 22 22:58:45 2019 +0200 staging: kpc2000: add space between ) and { in cell_probe.c Fixes checkpatch.pl error "space required before the open brace '{'". Signed-off-by: Simon Sandström Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/cell_probe.c | 36 ++++++++++++++-------------- 1 file changed, 18 insertions(+), 18 deletions(-) commit a924e3ac037e32bbdd56fc42fe07cf24607b9e80 Author: Simon Sandström Date: Wed May 22 22:58:44 2019 +0200 staging: kpc2000: fix indent in cell_probe.c Use tabs instead of spaces for indentation. Signed-off-by: Simon Sandström Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/cell_probe.c | 572 +++++++++++++-------------- 1 file changed, 286 insertions(+), 286 deletions(-) commit ce3b32a2d2d4978c1d16adb82e472349f55fc1df Author: Hariprasad Kelam Date: Thu May 23 08:20:59 2019 +0530 staging: rtl8723bs: core: rtw_recv: fix warning Comparison to NULL fix below warning reported by checkpatch CHECK: Comparison to NULL could be written "!precvpriv->pallocated_frame_buf" CHECK: Comparison to NULL could be written "padapter" Signed-off-by: Hariprasad Kelam ----- changes in v2: Corected few erorrs like (!*psta == NULL) pointed in review Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_recv.c | 48 +++++++++++++++---------------- 1 file changed, 24 insertions(+), 24 deletions(-) commit ee11f864f18349f01b7be94b8e0328353462b7b0 Author: Doug Berger Date: Thu May 9 13:59:54 2019 -0700 pinctrl: bcm: Allow PINCTRL_BCM2835 for ARCH_BRCMSTB ARCH_BRCMSTB needs to use the BCM2835 pin controller for chips like BCM7211 which adopted that pin controller for GPIO. This commit makes the option menu configurable with default enabled for ARCH_BRCMSTB and ARCH_BCM2835. Signed-off-by: Doug Berger Signed-off-by: Florian Fainelli Reviewed-by: Eric Anholt Signed-off-by: Linus Walleij drivers/pinctrl/bcm/Kconfig | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit f3fbedabb7be0d19b2da862fa6c01d82ac39c716 Author: Florian Fainelli Date: Thu May 9 13:59:53 2019 -0700 dt-bindings: pinctrl: bcm2835-gpio: Document BCM7211 compatible BCM7211 has a slightly different block layout and some additional GPIO registers that were added, document the compatible string. Signed-off-by: Florian Fainelli Reviewed-by: Eric Anholt Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/brcm,bcm2835-gpio.txt | 3 +++ 1 file changed, 3 insertions(+) commit 2484ae57c26a9ad04c71bd82e5349ef35f186219 Author: Guillaume La Roque Date: Tue May 14 10:26:52 2019 +0200 pinctrl: meson: g12a: add DS bank value add drive-strength bank regiter and bit value for G12A SoC Signed-off-by: Guillaume La Roque Reviewed-by: Martin Blumenstingl Signed-off-by: Linus Walleij drivers/pinctrl/meson/pinctrl-meson-g12a.c | 36 +++++++++++++++--------------- 1 file changed, 18 insertions(+), 18 deletions(-) commit 6ea3e3bbef3705225bb675a8c57af58420c23f81 Author: Guillaume La Roque Date: Tue May 14 10:26:51 2019 +0200 pinctrl: meson: add support of drive-strength-microamp drive-strength-microamp is a new feature needed for G12A SoC. the default DS setting after boot is usually 500uA and it is not enough for many functions. We need to be able to set the drive strength to reliably enable things like MMC, I2C, etc ... Signed-off-by: Guillaume La Roque Reviewed-by: Martin Blumenstingl Tested-by: Martin Blumenstingl Signed-off-by: Linus Walleij drivers/pinctrl/meson/pinctrl-meson.c | 99 +++++++++++++++++++++++++++++++++++ drivers/pinctrl/meson/pinctrl-meson.h | 18 ++++++- 2 files changed, 116 insertions(+), 1 deletion(-) commit 9959d9a747fddfd9e1a37f2e3fc60cbc956aad3a Author: Guillaume La Roque Date: Tue May 14 10:26:50 2019 +0200 pinctrl: meson: Rework enable/disable bias part rework bias enable/disable part to prepare drive-strength integration no functional changes Signed-off-by: Guillaume La Roque Reviewed-by: Martin Blumenstingl Tested-by: Martin Blumenstingl Signed-off-by: Linus Walleij drivers/pinctrl/meson/pinctrl-meson.c | 85 ++++++++++++++++++++--------------- 1 file changed, 49 insertions(+), 36 deletions(-) commit 013786c043298710887e983ac8d59aaff1f554f3 Author: Guillaume La Roque Date: Tue May 14 10:26:49 2019 +0200 dt-bindings: pinctrl: meson: Add drive-strength-microamp property Add optional drive-strength-microamp property Signed-off-by: Guillaume La Roque Reviewed-by: Martin Blumenstingl Reviewed-by: Rob Herring Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/meson,pinctrl.txt | 4 ++++ 1 file changed, 4 insertions(+) commit c08e7e4c8a6f04e01d16117eb4a0077059ec2cd4 Author: Guillaume La Roque Date: Tue May 14 10:26:48 2019 +0200 pinctrl: generic: add new 'drive-strength-microamp' property support Add drive-strength-microamp property support to allow drive strength in uA Signed-off-by: Guillaume La Roque Signed-off-by: Linus Walleij drivers/pinctrl/pinconf-generic.c | 2 ++ include/linux/pinctrl/pinconf-generic.h | 3 +++ 2 files changed, 5 insertions(+) commit 3e75b76f0f17194e0e65694ade6e69fc11593190 Author: Guillaume La Roque Date: Tue May 14 10:26:47 2019 +0200 dt-bindings: pinctrl: add a 'drive-strength-microamp' property This property allow drive-strength parameter in uA instead of mA. Signed-off-by: Guillaume La Roque Acked-by: Martin Blumenstingl Reviewed-by: Martin Blumenstingl Reviewed-by: Rob Herring Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt | 3 +++ 1 file changed, 3 insertions(+) commit 3c89c70634bb0b6f48512de873e7a45c7e1fbaa5 Author: Wen Yang Date: Mon Apr 15 14:24:02 2019 +0800 pinctrl: rockchip: fix leaked of_node references The call to of_parse_phandle returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings: ./drivers/pinctrl/pinctrl-rockchip.c:3221:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 3196, but without a corresponding object release within this function. ./drivers/pinctrl/pinctrl-rockchip.c:3223:1-7: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 3196, but without a corresponding object release within this function. Signed-off-by: Wen Yang Cc: Linus Walleij Cc: Heiko Stuebner Cc: linux-gpio@vger.kernel.org Cc: linux-rockchip@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-rockchip.c | 1 + 1 file changed, 1 insertion(+) commit 99bf7761b7cd9c529486a52df37deecf3bf0ebe5 Author: kbuild test robot Date: Thu May 23 03:58:15 2019 +0800 staging: kpc2000: kpc_i2c: fix platform_no_drv_owner.cocci warnings drivers/staging/kpc2000/kpc2000_i2c.c:652:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Fixes: 43ad38191816 ("staging: kpc2000: kpc_i2c: add static qual to local symbols in kpc_i2c.c") CC: Geordan Neukum Signed-off-by: kbuild test robot Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000_i2c.c | 1 - 1 file changed, 1 deletion(-) commit 2a8af420e7a58485bc5052c16c3d51913163e0fc Author: Hariprasad Kelam Date: Wed May 22 22:35:30 2019 +0530 staging: unisys: visornic: Replace GFP_ATOMIC with GFP_KERNEL As per below information GFP_KERNEL FLAG This is a normal allocation and might block. This is the flag to use in process context code when it is safe to sleep. GFP_ATOMIC FLAG The allocation is high-priority and does not sleep. This is the flag to use in interrupt handlers, bottom halves and other situations where you cannot sleep And we can take advantage of GFP_KERNEL , as when system is in low memory chances of getting success is high compared to GFP_ATOMIC. As visornic_probe is in process context we can use GPF_KERNEL. Signed-off-by: Hariprasad Kelam Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visornic/visornic_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 47d0ccecc9fdf0c0bae32e591749cc4357546f05 Author: Gwan-gyeong Mun Date: Tue May 21 15:17:21 2019 +0300 drm/i915/dp: Support DP ports YUV 4:2:0 output to GEN11 Bspec describes that GEN10 only supports capability of YUV 4:2:0 output to HDMI port and GEN11 supports capability of YUV 4:2:0 output to both DP and HDMI ports. v2: Minor style fix. Signed-off-by: Gwan-gyeong Mun Reviewed-by: Maarten Lankhorst Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190521121721.32010-7-gwan-gyeong.mun@intel.com drivers/gpu/drm/i915/intel_dp.c | 3 +++ 1 file changed, 3 insertions(+) commit 16668f486ffb12603355aa5a020da57004f6a6f3 Author: Gwan-gyeong Mun Date: Tue May 21 15:17:20 2019 +0300 drm/i915/dp: Change a link bandwidth computation for DP Data M/N calculations were assumed a bpp as RGB format. But when we are using YCbCr 4:2:0 output format on DP, we should change bpp calculations as YCbCr 4:2:0 format. The pipe_bpp value was assumed RGB format, therefore, it was multiplied with 3. But YCbCr 4:2:0 requires a multiplier value to 1.5. Therefore we need to divide pipe_bpp to 2 while DP output uses YCbCr4:2:0 format. - RGB format bpp = bpc x 3 - YCbCr 4:2:0 format bpp = bpc x 1.5 But Link M/N values are calculated and applied based on the Full Clock for YCbCr 4:2:0. And DP YCbCr 4:2:0 does not need to pixel clock double for a dotclock caluation. Only for HDMI YCbCr 4:2:0 needs to pixel clock double for a dot clock calculation. It only affects dp and edp port which use YCbCr 4:2:0 output format. And for now, it does not consider a use case of DSC + YCbCr 4:2:0. v2: Addressed review comments from Ville. Remove a changing of pipe_bpp on intel_ddi_set_pipe_settings(). Because the pipe is running at the full bpp, keep pipe_bpp as RGB even though YCbCr 4:2:0 output format is used. Add a link bandwidth computation for YCbCr4:2:0 output format. v3: Addressed reivew comments from Ville. In order to make codes simple, it adds and uses intel_dp_output_bpp() function. v6: Link M/N values are calculated and applied based on the Full Clock for YCbCr420. The Bit per Pixel needs to be adjusted for YUV420 mode as it requires only half of the RGB case. - Link M/N values are calculated and applied based on the Full Clock - Data M/N values needs to be calculated considering the data is half due to subsampling Remove a doubling of pixel clock on a dot clock calculator for DP YCbCr 4:2:0. Rebase and remove a duplicate setting of vsc_sdp.DB17. Add a setting of dynamic range bit to vsc_sdp.DB17. Change Content Type bit to "Graphics" from "Not defined". Change a dividing of pipe_bpp to muliplying to constant values on a switch-case statement. v7: Addressed review comments from Ville. Move a setting of dynamic range bit and a setting of bpc which is based on pipe_bpp to a "drm/i915/dp: Program VSC Header and DB for Pixel Encoding/Colorimetry Format" commit. Change Content Type bit to "Not defined" from "Graphics". Cc: Ville Syrjälä Signed-off-by: Gwan-gyeong Mun Reviewed-by: Maarten Lankhorst Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190521121721.32010-6-gwan-gyeong.mun@intel.com drivers/gpu/drm/i915/intel_ddi.c | 3 ++- drivers/gpu/drm/i915/intel_dp.c | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) commit ec4401d3893c99b4c8451487f31deeb38c54f7e8 Author: Gwan-gyeong Mun Date: Tue May 21 15:17:19 2019 +0300 drm/i915/dp: Add a support of YCBCR 4:2:0 to DP MSA When YCBCR 4:2:0 outputs is used for DP, we should program YCBCR 4:2:0 to MSA and VSC SDP. As per DP 1.4a spec section 2.2.4.3 [MSA Field for Indication of Color Encoding Format and Content Color Gamut] while sending YCBCR 420 signals we should program MSA MISC1 fields which indicate VSC SDP for the Pixel Encoding/Colorimetry Format. v2: Block comment style fix. v6: Fix an wrong setting of MSA MISC1 fields for Pixel Encoding/Colorimetry Format indication. As per DP 1.4a spec Table 2-96 [MSA MISC1 and MISC0 Fields for Pixel Encoding/Colorimetry Format Indication] When MISC1, bit 6, is Set to 1, a Source device uses a VSC SDP to indicate the Pixel Encoding/Colorimetry Format. On the wrong version it set a bit 5 of MISC1, now it set a bit 6 of MISC1. Signed-off-by: Gwan-gyeong Mun Reviewed-by: Maarten Lankhorst Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190521121721.32010-5-gwan-gyeong.mun@intel.com drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_ddi.c | 8 ++++++++ 2 files changed, 9 insertions(+) commit 3c053a96ef5f03eab3d2458b3c03ec58e56e117f Author: Gwan-gyeong Mun Date: Tue May 21 15:17:18 2019 +0300 drm/i915/dp: Program VSC Header and DB for Pixel Encoding/Colorimetry Format Function intel_pixel_encoding_setup_vsc handles vsc header and data block setup for pixel encoding / colorimetry format. Setup VSC header and data block in function intel_pixel_encoding_setup_vsc for pixel encoding / colorimetry format as per dp 1.4a spec, section 2.2.5.7.1, table 2-119: VSC SDP Header Bytes, section 2.2.5.7.5, table 2-120:VSC SDP Payload for DB16 through DB18. v2: Minor style fix. [Maarten] Refer to commit ids instead of patchwork. [Maarten] v6: Rebase v7: Rebase and addressed review comments from Ville. Use a structure initializer instead of memset(). Fix non-standard comment format. Remove a referring to specific commit. Add a setting of dynamic range bit to vsc_sdp.DB17. Add a setting of bpc which is based on pipe_bpp. Remove duplicated checking of connector's ycbcr_420_allowed from intel_pixel_encoding_setup_vsc(). It is already checked from intel_dp_ycbcr420_config(). Remove comments for VSC_SDP_EXTENSION_FOR_COLORIMETRY_SUPPORTED. It is already implemented on intel_dp_get_colorimetry_status(). v8: A missing of setting bpc to VSC setup is the pretty fatal case, it replaces DRM_DEBUG_KMS() to MISSING_CASE(). [Maarten] v9: Use a changed member name of struct dp_sdp. it renamed to db from DB. Cc: Maarten Lankhorst Cc: Ville Syrjälä Signed-off-by: Gwan-gyeong Mun Reviewed-by: Maarten Lankhorst Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190521121721.32010-4-gwan-gyeong.mun@intel.com drivers/gpu/drm/i915/intel_ddi.c | 1 + drivers/gpu/drm/i915/intel_dp.c | 90 ++++++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_drv.h | 2 + 3 files changed, 93 insertions(+) commit 4d432f956d4f3fe5a7082e11ee029d43f6f64457 Author: Gwan-gyeong Mun Date: Tue May 21 15:17:17 2019 +0300 drm: Rename struct edp_vsc_psr to struct dp_sdp VSC SDP Payload for PSR is one of data block type of SDP (Secondaray Data Packet). In order to generalize SDP packet structure name, it renames struct edp_vsc_psr to struct dp_sdp. And each SDP data blocks have different usages, each SDP type has different reserved data blocks and Video_Stream_Configuration Extension VESA SDP might use all of Data Blocks as Extended INFORFRAME Data Byte. so it makes Data Block variables as array type. And it adds comments of details of DB of VSC SDP Payload for Pixel Encoding/Colorimetry Format. This comments follows DP 1.4a spec, section 2.2.5.7.5, chapter "VSC SDP Payload for Pixel Encoding/Colorimetry Format". v7: Addressed review comments from Ville. v9: Rename a member value name DB to db on struct dp_sdp [Laurent] Cc: Ville Syrjälä Signed-off-by: Gwan-gyeong Mun Reviewed-by: Maarten Lankhorst Acked-by: Laurent Pinchart Acked-by: Maarten Lankhorst Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190521121721.32010-3-gwan-gyeong.mun@intel.com drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 12 ++++---- drivers/gpu/drm/bridge/analogix/analogix_dp_core.h | 2 +- drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c | 10 +++---- drivers/gpu/drm/i915/intel_psr.c | 2 +- include/drm/drm_dp_helper.h | 33 +++++++++++++++------- 5 files changed, 36 insertions(+), 23 deletions(-) commit 8e9d645c683191bd73f8d956d47cc004d9e23f12 Author: Gwan-gyeong Mun Date: Tue May 21 15:17:16 2019 +0300 drm/i915/dp: Add a config function for YCBCR420 outputs This patch checks a support of YCBCR420 outputs on an encoder level. If the input mode is YCBCR420-only mode then it prepares DP as an YCBCR420 output, else it continues with RGB output mode. It set output_format to INTEL_OUTPUT_FORMAT_YCBCR420 in order to using a pipe scaler as RGB to YCbCr 4:4:4. v2: Addressed review comments from Ville. Style fixed with few naming. %s/config/crtc_state/ %s/intel_crtc/crtc/ If lscon is active, it makes not to call intel_dp_ycbcr420_config() to avoid to clobber of lspcon_ycbcr420_config() routine. And it move the 420_only check into the intel_dp_ycbcr420_config(). v3: Fix uninitialized return value and it is reported by Dan Carpenter. v4: Addressed review comments from Ville. In order to avoid the extra indentation, it inverts if-clause on intel_dp_ycbcr420_config(). Remove the error print where no errors print are allowed. v6: Rebase v7: Move intel_dp_get_colorimetry_status() to intel_dp from intel_psr. intel_dp_get_colorimetry_status() checks VSC_SDP_EXTENSION_FOR_COLORIMETRY_SUPPORTED bit in the DPRX_FEATURE_ENUMERATION_LIST register. And intel_dp_ycbcr420_config() uses intel_dp_get_colorimetry_status(). Cc: Ville Syrjälä Signed-off-by: Gwan-gyeong Mun Reviewed-by: Maarten Lankhorst Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190521121721.32010-2-gwan-gyeong.mun@intel.com drivers/gpu/drm/i915/intel_dp.c | 48 +++++++++++++++++++++++++++++++++++++++- drivers/gpu/drm/i915/intel_dp.h | 1 + drivers/gpu/drm/i915/intel_psr.c | 10 --------- 3 files changed, 48 insertions(+), 11 deletions(-) commit 0f7a81374060828280fcfdfbaa162cb559017f9f Author: Christian Lamparter Date: Sat May 18 23:28:12 2019 +0200 crypto: crypto4xx - block ciphers should only accept complete blocks The hardware automatically zero pads incomplete block ciphers blocks without raising any errors. This is a screw-up. This was noticed by CONFIG_CRYPTO_MANAGER_EXTRA_TESTS tests that sent a incomplete blocks and expect them to fail. This fixes: cbc-aes-ppc4xx encryption unexpectedly succeeded on test vector "random: len=2409 klen=32"; expected_error=-22, cfg="random: may_sleep use_digest src_divs=[96.90%@+2295, 2.34%@+4066, 0.32%@alignmask+12, 0.34%@+4087, 0.9%@alignmask+1787, 0.1%@+3767] iv_offset=6" ecb-aes-ppc4xx encryption unexpectedly succeeded on test vector "random: len=1011 klen=32"; expected_error=-22, cfg="random: may_sleep use_digest src_divs=[100.0%@alignmask+20] dst_divs=[3.12%@+3001, 96.88%@+4070]" Cc: Eric Biggers Cc: stable@vger.kernel.org [4.19, 5.0 and 5.1] Signed-off-by: Christian Lamparter Signed-off-by: Herbert Xu drivers/crypto/amcc/crypto4xx_alg.c | 36 +++++++++++++++++++++++++----------- drivers/crypto/amcc/crypto4xx_core.c | 16 ++++++++-------- drivers/crypto/amcc/crypto4xx_core.h | 10 ++++++---- 3 files changed, 39 insertions(+), 23 deletions(-) commit 70c4997f34b6c6888b3ac157adec49e01d0df2d5 Author: Christian Lamparter Date: Sat May 18 23:28:11 2019 +0200 crypto: crypto4xx - fix blocksize for cfb and ofb While the hardware consider them to be blockciphers, the reference implementation defines them as streamciphers. Do the right thing and set the blocksize to 1. This was found by CONFIG_CRYPTO_MANAGER_EXTRA_TESTS. This fixes the following issues: skcipher: blocksize for ofb-aes-ppc4xx (16) doesn't match generic impl (1) skcipher: blocksize for cfb-aes-ppc4xx (16) doesn't match generic impl (1) Cc: Eric Biggers Cc: stable@vger.kernel.org Fixes: f2a13e7cba9e ("crypto: crypto4xx - enable AES RFC3686, ECB, CFB and OFB offloads") Signed-off-by: Christian Lamparter Signed-off-by: Herbert Xu drivers/crypto/amcc/crypto4xx_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bfa2ba7d9e6b20aca82b99e6842fe18842ae3a0f Author: Christian Lamparter Date: Fri May 17 23:15:57 2019 +0200 crypto: crypto4xx - fix AES CTR blocksize value This patch fixes a issue with crypto4xx's ctr(aes) that was discovered by libcapi's kcapi-enc-test.sh test. The some of the ctr(aes) encryptions test were failing on the non-power-of-two test: kcapi-enc - Error: encryption failed with error 0 kcapi-enc - Error: decryption failed with error 0 [FAILED: 32-bit - 5.1.0-rc1+] 15 bytes: STDIN / STDOUT enc test (128 bits): original file (1d100e..cc96184c) and generated file (e3b0c442..1b7852b855) [FAILED: 32-bit - 5.1.0-rc1+] 15 bytes: STDIN / STDOUT enc test (128 bits) (openssl generated CT): original file (e3b0..5) and generated file (3..8e) [PASSED: 32-bit - 5.1.0-rc1+] 15 bytes: STDIN / STDOUT enc test (128 bits) (openssl generated PT) [FAILED: 32-bit - 5.1.0-rc1+] 15 bytes: STDIN / STDOUT enc test (password): original file (1d1..84c) and generated file (e3b..852b855) But the 16, 32, 512, 65536 tests always worked. Thankfully, this isn't a hidden hardware problem like previously, instead this turned out to be a copy and paste issue. With this patch, all the tests are passing with and kcapi-enc-test.sh gives crypto4xx's a clean bill of health: "Number of failures: 0" :). Cc: stable@vger.kernel.org Fixes: 98e87e3d933b ("crypto: crypto4xx - add aes-ctr support") Fixes: f2a13e7cba9e ("crypto: crypto4xx - enable AES RFC3686, ECB, CFB and OFB offloads") Signed-off-by: Christian Lamparter Signed-off-by: Herbert Xu drivers/crypto/amcc/crypto4xx_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bb992bc418e12d4658d39e037f610e0d03940d86 Author: Sascha Hauer Date: Thu May 16 16:24:42 2019 +0200 crypto: caam - print debugging hex dumps after unmapping For encryption the destination pointer was still mapped, so the hex dump may be wrong. The IV still contained the input IV while printing instead of the output IV as intended. For decryption the destination pointer was still mapped, so the hex dump may be wrong. The IV dump was correct. Do the hex dumps consistenly after the buffers have been unmapped and in case of IV copied to their final destination. Signed-off-by: Sascha Hauer Reviewed-by: Horia Geantă Signed-off-by: Herbert Xu drivers/crypto/caam/caamalg.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 3e03e792865ae48b8cfc69a0b4d65f02f467389f Author: Christophe Leroy Date: Wed May 15 12:29:03 2019 +0000 crypto: talitos - fix skcipher failure due to wrong output IV Selftests report the following: [ 2.984845] alg: skcipher: cbc-aes-talitos encryption test failed (wrong output IV) on test vector 0, cfg="in-place" [ 2.995377] 00000000: 3d af ba 42 9d 9e b4 30 b4 22 da 80 2c 9f ac 41 [ 3.032673] alg: skcipher: cbc-des-talitos encryption test failed (wrong output IV) on test vector 0, cfg="in-place" [ 3.043185] 00000000: fe dc ba 98 76 54 32 10 [ 3.063238] alg: skcipher: cbc-3des-talitos encryption test failed (wrong output IV) on test vector 0, cfg="in-place" [ 3.073818] 00000000: 7d 33 88 93 0f 93 b2 42 This above dumps show that the actual output IV is indeed the input IV. This is due to the IV not being copied back into the request. This patch fixes that. Signed-off-by: Christophe Leroy Reviewed-by: Horia Geantă Signed-off-by: Herbert Xu drivers/crypto/talitos.c | 4 ++++ 1 file changed, 4 insertions(+) commit 89646fdda4cae203185444ac7988835f36a21ee1 Author: Hook, Gary Date: Tue May 14 21:53:30 2019 +0000 crypto: ccp - Fix 3DES complaint from ccp-crypto module Crypto self-tests reveal an error: alg: skcipher: cbc-des3-ccp encryption test failed (wrong output IV) on test vector 0, cfg="in-place" The offset value should not be recomputed when retrieving the context. Also, a code path exists which makes decisions based on older (version 3) hardware; a v3 device deosn't support 3DES so remove this check. Fixes: 990672d48515 ('crypto: ccp - Enable 3DES function on v5 CCPs') Signed-off-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-ops.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) commit c3b359d6567c0b8f413e924feb37cf025067d55a Author: Hook, Gary Date: Tue May 14 21:53:23 2019 +0000 crypto: ccp - fix AES CFB error exposed by new test vectors Updated testmgr will exhibit this error message when loading the ccp-crypto module: alg: skcipher: cfb-aes-ccp encryption failed with err -22 on test vector 3, cfg="in-place" Update the CCP crypto driver to correctly treat CFB as a streaming mode cipher (instead of block mode). Update the configuration for CFB to specify the block size as a single byte; Fixes: 2b789435d7f3 ('crypto: ccp - CCP AES crypto API support') Signed-off-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-crypto-aes.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 499df9674c54a733f4deb3329dfcfc5487eb7738 Author: Hook, Gary Date: Tue May 14 21:53:16 2019 +0000 crypto: ccp - AES CFB mode is a stream cipher CFB mode should be treated as a stream cipher, not block. Fixes: 63b945091a07 ('crypto: ccp - CCP device driver and interface support') Signed-off-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-ops.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit efc77e8107c5c0b301686d52bd11e0ec2b10cb61 Author: YueHaibing Date: Sun May 12 17:05:40 2019 +0800 crypto: arm/sha512 - Make sha512_arm_final static Fix sparse warning: arch/arm/crypto/sha512-glue.c:40:5: warning: symbol 'sha512_arm_final' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Herbert Xu arch/arm/crypto/sha512-glue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit db07cd26ac6a418dc2823187958edcfdb415fa83 Author: Stephan Mueller Date: Wed May 8 16:19:24 2019 +0200 crypto: drbg - add FIPS 140-2 CTRNG for noise source FIPS 140-2 section 4.9.2 requires a continuous self test of the noise source. Up to kernel 4.8 drivers/char/random.c provided this continuous self test. Afterwards it was moved to a location that is inconsistent with the FIPS 140-2 requirements. The relevant patch was e192be9d9a30555aae2ca1dc3aad37cba484cd4a . Thus, the FIPS 140-2 CTRNG is added to the DRBG when it obtains the seed. This patch resurrects the function drbg_fips_continous_test that existed some time ago and applies it to the noise sources. The patch that removed the drbg_fips_continous_test was b3614763059b82c26bdd02ffcb1c016c1132aad0 . The Jitter RNG implements its own FIPS 140-2 self test and thus does not need to be subjected to the test in the DRBG. The patch contains a tiny fix to ensure proper zeroization in case of an error during the Jitter RNG data gathering. Signed-off-by: Stephan Mueller Reviewed-by: Yann Droneaud Signed-off-by: Herbert Xu crypto/drbg.c | 94 +++++++++++++++++++++++++++++++++++++++++++++++++-- include/crypto/drbg.h | 2 ++ 2 files changed, 93 insertions(+), 3 deletions(-) commit a7cd942bb6e3559d86257fe3b57844e55341a3a0 Author: Horia Geantă Date: Fri May 3 17:17:42 2019 +0300 crypto: caam/qi - DMA map keys using proper device Currently there is a mismatch b/w the ICID (Isolation Context ID) used for DMA mapping keys and ICID used for accessing them. -keys are DMA mapped using a job ring device, thus a job ring ICID -keys are accessed from descriptors enqueued via Queue Interface, thus using QI ICID [Note: ICIDs of JRs, QI are configured by U-boot / other entity by: -fixing up the corresponding job ring and controller DT nodes -setting up corresponding caam ICID registers] In order to avoid IOMMU faults, DMA map the key using the controller device instead of a job ring device. Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu drivers/crypto/caam/caamalg_qi.c | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) commit b2b2ee350e701df9086275b8f857f6db10546f15 Author: Horia Geantă Date: Fri May 3 17:17:41 2019 +0300 crypto: caam/qi - fix address translations with IOMMU enabled When IOMMU is enabled, iova -> phys address translation should be performed using iommu_ops, not dma_to_phys(). Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu drivers/crypto/caam/ctrl.c | 1 + drivers/crypto/caam/intern.h | 2 ++ drivers/crypto/caam/qi.c | 16 ++++++++++++++-- 3 files changed, 17 insertions(+), 2 deletions(-) commit 6b175685b4a12ab0aa048078bd7ca1fdb20ca766 Author: Horia Geantă Date: Fri May 3 17:17:40 2019 +0300 crypto: caam/qi - don't allocate an extra platform device Use the controller device for caam/qi instead of allocating a new platform device. This is needed as a preparation to add support for working behind an SMMU. A platform device allocated using platform_device_register_full() is not completely set up - most importantly .dma_configure() is not called. Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu drivers/crypto/caam/caamalg_qi.c | 6 +++--- drivers/crypto/caam/ctrl.c | 8 ++++---- drivers/crypto/caam/intern.h | 7 +++---- drivers/crypto/caam/qi.c | 33 +++++---------------------------- 4 files changed, 15 insertions(+), 39 deletions(-) commit 1b46c90c8e002028dc622bf7bd8cf89efcaab274 Author: Horia Geantă Date: Fri May 3 17:17:39 2019 +0300 crypto: caam - convert top level drivers to libraries Currently we allow top level code, i.e. that which sits between the low level (HW-specific) drivers and crypto API, to be built as several drivers: caamalg, caamhash, caam_pkc, caamrng, caamalg_qi. There is no advantage in this, more it interferes with adding support for deferred probing (there are no corresponding devices and thus no bus). Convert these drivers and call init() / exit() manually at the right time. Move algorithms initialization at JR probe / remove time: -the first probed JR registers the crypto algs -the last removed JR unregisters the crypto algs Note: caam_qi_init() is called before JR platform devices creation (of_populate_bus()), such that QI interface is initialized when the caam/qi algorithms are registered in the JR driver (by calling caam_qi_algapi_init(). While here, fix the Kconfig entries under CRYPTO_DEV_FSL_CAAM_JR to be aligned. Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu drivers/crypto/caam/Kconfig | 46 ++++++++------------ drivers/crypto/caam/Makefile | 18 ++++---- drivers/crypto/caam/caamalg.c | 43 ++----------------- drivers/crypto/caam/caamalg_qi.c | 45 ++----------------- drivers/crypto/caam/caamhash.c | 48 +++------------------ drivers/crypto/caam/caampkc.c | 50 +++------------------ drivers/crypto/caam/caamrng.c | 54 +++-------------------- drivers/crypto/caam/ctrl.c | 45 ++++++++++--------- drivers/crypto/caam/intern.h | 93 ++++++++++++++++++++++++++++++++++++++-- drivers/crypto/caam/jr.c | 43 +++++++++++++++++++ 10 files changed, 208 insertions(+), 277 deletions(-) commit a5e5c13398f353bb7ebbe913a7bb0c2a77b2ae10 Author: Horia Geantă Date: Fri May 3 17:17:38 2019 +0300 crypto: caam - fix S/G table passing page boundary According to CAAM RM: -crypto engine reads 4 S/G entries (64 bytes) at a time, even if the S/G table has fewer entries -it's the responsibility of the user / programmer to make sure this HW behaviour has no side effect The drivers do not take care of this currently, leading to IOMMU faults when the S/G table ends close to a page boundary - since only one page is DMA mapped, while CAAM's DMA engine accesses two pages. Fix this by rounding up the number of allocated S/G table entries to a multiple of 4. Note that in case of two *contiguous* S/G tables, only the last table might needs extra entries. Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu drivers/crypto/caam/caamalg.c | 30 +++++++++++++++++-- drivers/crypto/caam/caamalg_qi.c | 40 ++++++++++++++++++++++--- drivers/crypto/caam/caamalg_qi2.c | 63 ++++++++++++++++++++++++++++++--------- drivers/crypto/caam/caamhash.c | 33 ++++++++++---------- drivers/crypto/caam/caampkc.c | 7 +++-- drivers/crypto/caam/desc_constr.h | 11 +++++++ 6 files changed, 147 insertions(+), 37 deletions(-) commit dcd9c76e5a183af4f793beb5141efcd260b8d09f Author: Horia Geantă Date: Fri May 3 17:17:37 2019 +0300 crypto: caam - avoid S/G table fetching for AEAD zero-length output When enabling IOMMU support, the following issue becomes visible in the AEAD zero-length case. Even though the output sequence length is set to zero, the crypto engine tries to prefetch 4 S/G table entries (since SGF bit is set in SEQ OUT PTR command - which is either generated in SW in case of caam/jr or in HW in case of caam/qi, caam/qi2). The DMA read operation will trigger an IOMMU fault since the address in the SEQ OUT PTR is "dummy" (set to zero / not obtained via DMA API mapping). 1. In case of caam/jr, avoid the IOMMU fault by clearing the SGF bit in SEQ OUT PTR command. 2. In case of caam/qi - setting address, bpid, length to zero for output entry in the compound frame has a special meaning (cf. CAAM RM): "Output frame = Unspecified, Input address = Y. A unspecified frame is indicated by an unused SGT entry (an entry in which the Address, Length, and BPID fields are all zero). SEC obtains output buffers from BMan as prescribed by the preheader." Since no output buffers are needed, modify the preheader by setting (ABS = 1, ADDBUF = 0): -"ABS = 1 means obtain the number of buffers in ADDBUF (0 or 1) from the pool POOL ID" -ADDBUF: "If ABS is set, ADD BUF specifies whether to allocate a buffer or not" 3. In case of caam/qi2, since engine: -does not support FLE[FMT]=2'b11 ("unused" entry) mentioned in DPAA2 RM -requires output entry to be present, even if not used the solution chosen is to leave output frame list entry zeroized. Fixes: 763069ba49d3 ("crypto: caam - handle zero-length AEAD output") Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu drivers/crypto/caam/caamalg.c | 1 + drivers/crypto/caam/caamalg_qi.c | 2 +- drivers/crypto/caam/caamalg_qi2.c | 9 +++++++++ drivers/crypto/caam/qi.c | 3 +++ 4 files changed, 14 insertions(+), 1 deletion(-) commit a3af11399aa28de0779a187f1a30504129ad754a Author: Giovanni Cabiddu Date: Mon Apr 29 16:43:21 2019 +0100 crypto: qat - do not offload zero length requests If a zero length request is submitted through the skcipher api, do not offload it and return success. Reviewed-by: Conor Mcloughlin Tested-by: Sergey Portnoy Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu drivers/crypto/qat/qat_common/qat_algs.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 96ee111a659e0f0bdfc48402b9d4162e14016ff1 Author: Giovanni Cabiddu Date: Mon Apr 29 16:43:20 2019 +0100 crypto: qat - return error for block ciphers for invalid requests Return -EINVAL if a request for a block cipher is not multiple of the size of the block. This problem was found with by the new extra run-time crypto self test. Reviewed-by: Conor Mcloughlin Tested-by: Sergey Portnoy Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu drivers/crypto/qat/qat_common/qat_algs.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) commit 92fec16d1f4d852711511844b02f5353825d1578 Author: Giovanni Cabiddu Date: Mon Apr 29 16:43:19 2019 +0100 crypto: qat - return proper error code in setkey If an invalid key is provided as input to the setkey function, the function always failed returning -ENOMEM rather than -EINVAL. Furthermore, if setkey was called multiple times with an invalid key, the device instance was getting leaked. This patch fixes the error paths in the setkey functions by returning the correct error code in case of error and freeing all the resources allocated in this function in case of failure. This problem was found with by the new extra run-time crypto self test. Reviewed-by: Conor Mcloughlin Tested-by: Sergey Portnoy Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu drivers/crypto/qat/qat_common/qat_algs.c | 173 +++++++++++++++++++------------ 1 file changed, 108 insertions(+), 65 deletions(-) commit 51d33c2f05edeace67e6f7f0603dc7aa4667e9a6 Author: Giovanni Cabiddu Date: Mon Apr 29 16:43:18 2019 +0100 crypto: qat - fix block size for aes ctr mode The block size for aes counter mode was improperly set to AES_BLOCK_SIZE. This sets it to 1 as it is a stream cipher. This problem was found with by the new extra run-time crypto self test. Reviewed-by: Conor Mcloughlin Tested-by: Sergey Portnoy Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu drivers/crypto/qat/qat_common/qat_algs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 15b5e9112c156b66176751302584b73f799c2383 Author: Giovanni Cabiddu Date: Mon Apr 29 16:43:17 2019 +0100 crypto: qat - update iv after encryption or decryption operations Allocate a contiguous buffer and instruct the qat hardware to return the iv at the end of an encryption or decryption operation. The iv is copied to the array provided by the user in the callback function. This problem was found with by the crypto self test. Reviewed-by: Conor Mcloughlin Tested-by: Sergey Portnoy Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu drivers/crypto/qat/qat_common/qat_algs.c | 71 +++++++++++++++++++++++++----- drivers/crypto/qat/qat_common/qat_crypto.h | 2 + 2 files changed, 61 insertions(+), 12 deletions(-) commit c044b62c3679fb2814fd4684fd8bb51ba38d6f3c Author: Shant KumarX Sonnad Date: Mon Apr 29 16:43:16 2019 +0100 crypto: qat - add check for negative offset in alg precompute function The offset is calculated based on type of hash algorithum. If the algorithum is invalid the offset can have negative value. Hence added negative offset check and return -EFAULT. Reviewed-by: Conor Mcloughlin Tested-by: Sergey Portnoy Signed-off-by: Shant KumarX Sonnad Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu drivers/crypto/qat/qat_common/qat_algs.c | 3 +++ 1 file changed, 3 insertions(+) commit 933224985a0abdca8d60f7c4626068fbdead949f Author: Xin Zeng Date: Mon Apr 29 16:43:15 2019 +0100 crypto: qat - remove spin_lock in qat_ablkcipher_setkey Remove unnecessary spin lock in qat_ablkcipher_setkey. Reviewed-by: Conor Mcloughlin Tested-by: Sergey Portnoy Signed-off-by: Xin Zeng Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu drivers/crypto/qat/qat_common/qat_algs.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) commit 9efc7794496d531593751a3fb008030d5f9ba87c Author: Andrii Nakryiko Date: Wed May 22 10:51:28 2019 -0700 libbpf: emit diff of mismatched public API, if any It's easy to have a mismatch of "intended to be public" vs really exposed API functions. While Makefile does check for this mismatch, if it actually occurs it's not trivial to determine which functions are accidentally exposed. This patch dumps out a diff showing what's not supposed to be exposed facilitating easier fixing. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov tools/lib/bpf/Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 8ee9ee74232fc52de1c94f80542552521e7f8549 Author: Martin Blumenstingl Date: Mon May 20 22:08:39 2019 +0200 ARM: dts: meson8m2: mxiii-plus: add the supply for the Mali GPU The Mali GPU is supplied by VDD_EE which is provided by the DCDC2 regulator. Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson8m2-mxiii-plus.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 0b67e66a5fa70da8c36c1b5aa1873fa8bc254caa Author: Martin Blumenstingl Date: Mon May 20 22:08:38 2019 +0200 ARM: dts: meson8m2: mxiii-plus: rename the DCDC2 regulator The DCDC2 regulator output is actually called "VDD_EE" in various Meson8b board schematics. This matches with what Amlogic names it in the most part of their vendor kernel (there are a few places where it's actually called VDDAO, schematics of EC-100 suggest that the regulator output is used for both signals). While here, also give the regulator an alias as it supplies the Mali GPU so a phandle to it will be required later on. Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson8m2-mxiii-plus.dts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 9a98fdf5b6e635d9d9710f87e1da42aeab12ff0d Author: Martin Blumenstingl Date: Mon May 20 21:43:50 2019 +0200 soc: amlogic: canvas: add support for Meson8, Meson8b and Meson8m2 The canvas IP on Meson8, Meson8b and Meson8m2 is mostly identical to the one on GXBB and newer. The only known difference so far is that that the "endianness" bits are not supported on Meson8m2 and earlier. Add new compatible strings and a check in meson_canvas_config() to validate that the endianness bits cannot be configured on the 32-bit SoCs. Signed-off-by: Martin Blumenstingl Reviewed-by: Maxime Jourdan Signed-off-by: Kevin Hilman drivers/soc/amlogic/meson-canvas.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit a0b2ff531582c510af11b6d548732eb2fd7772ff Author: Martin Blumenstingl Date: Mon May 20 21:43:49 2019 +0200 dt-bindings: soc: amlogic: canvas: document support for Meson8/8b/8m2 The canvas IP on Meson8, Meson8b and Meson8m2 is similar to the one found on GXBB and newer. The only known difference is that the older SoCs cannot configure the "endianness". Add a compatible string for each of the older SoCs to make sure we won't be using unsupported features on these SoCs. Signed-off-by: Martin Blumenstingl Acked-by: Maxime Jourdan Signed-off-by: Kevin Hilman .../devicetree/bindings/soc/amlogic/amlogic,canvas.txt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 872f881e72d9755d55c3fe57e040973046655374 Author: Martin Blumenstingl Date: Mon May 20 21:43:53 2019 +0200 ARM: dts: meson8b: add the canvas module Add the canvas module to Meson8b because it's required for the VPU (video output) and video decoders. The canvas module is located inside the "DMC bus" (where also some of the memory controller registers are located). The "DMC bus" itself is part of the so-called "MMC bus". Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson8b.dtsi | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 10256a4755db88cdd52c0912342f818cf3f1a22d Author: Martin Blumenstingl Date: Mon May 20 21:43:52 2019 +0200 ARM: dts: meson8m2: update the offset of the canvas module With the Meson8m2 SoC the canvas module was moved from offset 0x20 (Meson8) to offset 0x48 (same as on Meson8b). The offsets inside the canvas module are identical. Correct the offset so the driver uses the correct registers. Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson8m2.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 47b58182391a9b88b77da0e57c79e9160929fdbf Author: Martin Blumenstingl Date: Mon May 20 21:43:51 2019 +0200 ARM: dts: meson8: add the canvas module Add the canvas module to Meson8 because it's required for the VPU (video output) and video decoders. The canvas module is located inside thie "DMC bus" (where also some of the memory controller registers are located). The "DMC bus" itself is part of the so-called "MMC bus". Amlogic's vendor kernel has an explicit #define for the "DMC" register range on Meson8m2 while there's no such #define for Meson8. However, the canvas and memory controller registers on Meson8 are all expressed as "0x6000 + actual offset", while Meson8m2 uses "DMC + actual offset". Thus it's safe to assume that the DMC bus exists on both SoCs even though the registers inside are slightly different. Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson8.dtsi | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 14a1eaa8820e8f3715f0cb3c1790edab67a751e9 Author: Sunil Muthuswamy Date: Wed May 22 23:10:44 2019 +0000 hv_sock: perf: loop in send() to maximize bandwidth Currently, the hv_sock send() iterates once over the buffer, puts data into the VMBUS channel and returns. It doesn't maximize on the case when there is a simultaneous reader draining data from the channel. In such a case, the send() can maximize the bandwidth (and consequently minimize the cpu cycles) by iterating until the channel is found to be full. Perf data: Total Data Transfer: 10GB/iteration Single threaded reader/writer, Linux hvsocket writer with Windows hvsocket reader Packet size: 64KB CPU sys time was captured using the 'time' command for the writer to send 10GB of data. 'Send Buffer Loop' is with the patch applied. The values below are over 10 iterations. |--------------------------------------------------------| | | Current | Send Buffer Loop | |--------------------------------------------------------| | | Throughput | CPU sys | Throughput | CPU sys | | | (MB/s) | time (s) | (MB/s) | time (s) | |--------------------------------------------------------| | Min | 407 | 7.048 | 401 | 5.958 | |--------------------------------------------------------| | Max | 455 | 7.563 | 542 | 6.993 | |--------------------------------------------------------| | Avg | 440 | 7.411 | 451 | 6.639 | |--------------------------------------------------------| | Median | 446 | 7.417 | 447 | 6.761 | |--------------------------------------------------------| Observation: 1. The avg throughput doesn't really change much with this change for this scenario. This is most probably because the bottleneck on throughput is somewhere else. 2. The average system (or kernel) cpu time goes down by 10%+ with this change, for the same amount of data transfer. Signed-off-by: Sunil Muthuswamy Reviewed-by: Dexuan Cui Signed-off-by: David S. Miller net/vmw_vsock/hyperv_transport.c | 45 +++++++++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 14 deletions(-) commit ac383f58f3c98de37fa67452acc5bd677396e9f3 Author: Sunil Muthuswamy Date: Wed May 22 22:56:07 2019 +0000 hv_sock: perf: Allow the socket buffer size options to influence the actual socket buffers Currently, the hv_sock buffer size is static and can't scale to the bandwidth requirements of the application. This change allows the applications to influence the socket buffer sizes using the SO_SNDBUF and the SO_RCVBUF socket options. Few interesting points to note: 1. Since the VMBUS does not allow a resize operation of the ring size, the socket buffer size option should be set prior to establishing the connection for it to take effect. 2. Setting the socket option comes with the cost of that much memory being reserved/allocated by the kernel, for the lifetime of the connection. Perf data: Total Data Transfer: 1GB Single threaded reader/writer Results below are summarized over 10 iterations. Linux hvsocket writer + Windows hvsocket reader: |---------------------------------------------------------------------------------------------| |Packet size -> | 128B | 1KB | 4KB | 64KB | |---------------------------------------------------------------------------------------------| |SO_SNDBUF size | | Throughput in MB/s (min/max/avg/median): | | v | | |---------------------------------------------------------------------------------------------| | Default | 109/118/114/116 | 636/774/701/700 | 435/507/480/476 | 410/491/462/470 | | 16KB | 110/116/112/111 | 575/705/662/671 | 749/900/854/869 | 592/824/692/676 | | 32KB | 108/120/115/115 | 703/823/767/772 | 718/878/850/866 | 1593/2124/2000/2085 | | 64KB | 108/119/114/114 | 592/732/683/688 | 805/934/903/911 | 1784/1943/1862/1843 | |---------------------------------------------------------------------------------------------| Windows hvsocket writer + Linux hvsocket reader: |---------------------------------------------------------------------------------------------| |Packet size -> | 128B | 1KB | 4KB | 64KB | |---------------------------------------------------------------------------------------------| |SO_RCVBUF size | | Throughput in MB/s (min/max/avg/median): | | v | | |---------------------------------------------------------------------------------------------| | Default | 69/82/75/73 | 313/343/333/336 | 418/477/446/445 | 659/701/676/678 | | 16KB | 69/83/76/77 | 350/401/375/382 | 506/548/517/516 | 602/624/615/615 | | 32KB | 62/83/73/73 | 471/529/496/494 | 830/1046/935/939 | 944/1180/1070/1100 | | 64KB | 64/70/68/69 | 467/533/501/497 | 1260/1590/1430/1431 | 1605/1819/1670/1660 | |---------------------------------------------------------------------------------------------| Signed-off-by: Sunil Muthuswamy Reviewed-by: Dexuan Cui Signed-off-by: David S. Miller net/vmw_vsock/hyperv_transport.c | 50 ++++++++++++++++++++++++++++++++-------- 1 file changed, 40 insertions(+), 10 deletions(-) commit 0db355d499f10a79b6a5161e77c7eba8f062bde4 Author: Eric Dumazet Date: Wed May 22 15:00:25 2019 -0700 ipv4/igmp: shrink struct ip_sf_list Removing two 4 bytes holes allows to use kmalloc-32 kmem cache instead of kmalloc-64 on 64bit kernels. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/linux/igmp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fc651001d2c5ca4f8b87efae2edb69fca94a6365 Author: David Ahern Date: Wed May 22 12:22:21 2019 -0700 neighbor: Add tracepoint to __neigh_create Add tracepoint to __neigh_create to enable debugging of new entries. Signed-off-by: David Ahern Signed-off-by: David S. Miller include/trace/events/neigh.h | 49 ++++++++++++++++++++++++++++++++++++++++++++ net/core/neighbour.c | 2 ++ 2 files changed, 51 insertions(+) commit a92a0a7b8e7c1e3dbc0c8a7fed7b52e7915e8c11 Author: David Ahern Date: Wed May 22 12:11:06 2019 -0700 selftests: pmtu: Simplify cleanup and namespace names The point of the pause-on-fail argument is to leave the setup as is after a test fails to allow a user to debug why it failed. Move the cleanup after posting the result to the user to make it so. Random names for the namespaces are not user friendly when trying to debug a failure. Make them simpler and more direct for the tests. Run cleanup at the beginning to ensure they are cleaned up if they already exist. Remove cleanup_done. There is no harm in doing cleanup twice; just ignore any errors related to not existing - which is already done. Signed-off-by: David Ahern Signed-off-by: David S. Miller tools/testing/selftests/net/pmtu.sh | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit 9b7e94e6e89be284df94554c8b3c08f91c5c04c3 Author: David Ahern Date: Wed May 22 12:09:16 2019 -0700 selftests: fib-onlink: Make quiet by default Add VERBOSE argument to fib-onlink-tests.sh and make output quiet by default. Add getopt parsing of inputs and support for -v (verbose) and -p (pause on fail). Signed-off-by: David Ahern Signed-off-by: David S. Miller tools/testing/selftests/net/fib-onlink-tests.sh | 48 ++++++++++++++++++++++--- 1 file changed, 43 insertions(+), 5 deletions(-) commit 75425657fe3ad853b300976966d8fafa3f209b89 Author: David Ahern Date: Wed May 22 12:07:43 2019 -0700 net: Set strict_start_type for routes and rules New userspace on an older kernel can send unknown and unsupported attributes resulting in an incompelete config which is almost always wrong for routing (few exceptions are passthrough settings like the protocol that installed the route). Set strict_start_type in the policies for IPv4 and IPv6 routes and rules to detect new, unsupported attributes and fail the route add. Signed-off-by: David Ahern Signed-off-by: David S. Miller include/net/fib_rules.h | 1 + net/ipv4/fib_frontend.c | 1 + net/ipv6/route.c | 1 + 3 files changed, 3 insertions(+) commit e38f7cbd36e4d8ef6c1c56f9643adf8898cb3cb9 Merge: 26b1b8d7f27b 06c77c3e67b0 Author: David S. Miller Date: Wed May 22 17:48:44 2019 -0700 Merge branch 'net-Export-functions-for-nexthop-code' David Ahern says: ==================== net: Export functions for nexthop code This set exports ipv4 and ipv6 fib functions for use by the nexthop code. It also adds new ones to send route notifications if a nexthop configuration changes. v2 - repost of patches dropped at the end of the last dev window added patch 8 which exports nh_update_mtu since it is inline with the other patches ==================== Signed-off-by: David S. Miller commit 06c77c3e67b0352473345a162ab17729a132e7db Author: David Ahern Date: Wed May 22 12:04:46 2019 -0700 ipv4: Rename and export nh_update_mtu Rename nh_update_mtu to fib_nhc_update_mtu and export for use by the nexthop code. Signed-off-by: David Ahern Signed-off-by: David S. Miller include/net/ip_fib.h | 1 + net/ipv4/fib_semantics.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) commit c3669486b5127165fd348daf4a785996820ac8f2 Author: David Ahern Date: Wed May 22 12:04:45 2019 -0700 ipv4: export fib_info_update_nh_saddr Add scope as input argument versus relying on fib_info reference in fib_nh, and export fib_info_update_nh_saddr. Signed-off-by: David Ahern Signed-off-by: David S. Miller include/net/ip_fib.h | 3 ++- net/ipv4/fib_semantics.c | 11 +++++------ 2 files changed, 7 insertions(+), 7 deletions(-) commit 9bd836679210534396a93a02f2fcf3ece64f45f7 Author: David Ahern Date: Wed May 22 12:04:44 2019 -0700 ipv4: export fib_flush As nexthops are deleted, fib entries referencing it are marked dead. Export fib_flush so those entries can be removed in a timely manner. Signed-off-by: David Ahern Signed-off-by: David S. Miller include/net/ip_fib.h | 1 + net/ipv4/fib_frontend.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit ac1fab2d139447d84b10d99f80bec5d7b08c365a Author: David Ahern Date: Wed May 22 12:04:43 2019 -0700 ipv4: export fib_check_nh Change fib_check_nh to take net, table and scope as input arguments over struct fib_config and export for use by nexthop code. Signed-off-by: David Ahern Signed-off-by: David S. Miller include/net/ip_fib.h | 2 ++ net/ipv4/fib_semantics.c | 12 ++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) commit 1bff1a0c9bbda06f1646030082123baf23ea8e7f Author: David Ahern Date: Wed May 22 12:04:42 2019 -0700 ipv4: Add function to send route updates Add fib_info_notify_update to walk the fib and send RTM_NEWROUTE notifications with NLM_F_REPLACE set for entries linked to a fib_info that have nh_updated flag set. This helper will be used by the nexthop code to notify userspace of routes that are impacted when a nexthop config is updated via replace. The new function and its helper are similar to how fib_flush and fib_table_flush work for address delete and link down events. This notification is needed for legacy apps that do not understand the new nexthop object. Apps that are nexthop aware can use the RTA_NH_ID attribute in the route notification to just ignore it. In the future this should be wrapped in a sysctl to allow OS'es that are fully updated to avoid the notificaton storm. Signed-off-by: David Ahern Signed-off-by: David S. Miller include/net/ip_fib.h | 2 ++ net/ipv4/fib_trie.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) commit 19a3b7eea42402accf52bcb9ddb51bfdb4d7a13b Author: David Ahern Date: Wed May 22 12:04:41 2019 -0700 ipv6: export function to send route updates Add fib6_rt_update to send RTM_NEWROUTE with NLM_F_REPLACE set. This helper will be used by the nexthop code to notify userspace of routes that are impacted when a nexthop config is updated via replace. This notification is needed for legacy apps that do not understand the new nexthop object. Apps that are nexthop aware can use the RTA_NH_ID attribute in the route notification to just ignore it. In the future this should be wrapped in a sysctl to allow OS'es that are fully updated to avoid the notificaton storm. Signed-off-by: David Ahern Signed-off-by: David S. Miller include/net/ip6_fib.h | 6 ++++++ include/net/ipv6_stubs.h | 3 +++ net/ipv6/af_inet6.c | 1 + net/ipv6/ip6_fib.c | 8 ++++---- net/ipv6/route.c | 32 ++++++++++++++++++++++++++++++++ 5 files changed, 46 insertions(+), 4 deletions(-) commit cdaa16a4f70cfa6c55641588c3a3eb9b53abd56b Author: David Ahern Date: Wed May 22 12:04:40 2019 -0700 ipv6: Add hook to bump sernum for a route to stubs Add hook to ipv6 stub to bump the sernum up to the root node for a route. This is needed by the nexthop code when a nexthop config changes. Signed-off-by: David Ahern Signed-off-by: David S. Miller include/net/ip6_fib.h | 1 + include/net/ipv6_stubs.h | 1 + net/ipv6/af_inet6.c | 1 + net/ipv6/ip6_fib.c | 8 ++++++++ 4 files changed, 11 insertions(+) commit 68a9b13d9219a52cd272bd8e93f7fdfd1c22eba1 Author: David Ahern Date: Wed May 22 12:04:39 2019 -0700 ipv6: Add delete route hook to stubs Add ip6_del_rt to the IPv6 stub. The hook is needed by the nexthop code to remove entries linked to a nexthop that is getting deleted. Signed-off-by: David Ahern Signed-off-by: David S. Miller include/net/ipv6_stubs.h | 1 + net/ipv6/addrconf_core.c | 6 ++++++ net/ipv6/af_inet6.c | 1 + 3 files changed, 8 insertions(+) commit 26b1b8d7f27bfb02cc4d115c48478e02594e318e Merge: 565d9d221bcb e5fb32c67cdb Author: David S. Miller Date: Wed May 22 17:46:28 2019 -0700 Merge branch 'net-phy-T1-support' Andrew Lunn says: ==================== net: phy: T1 support T1 PHYs make use of a single twisted pair, rather than the traditional 2 pair for 100BaseT or 4 pair for 1000BaseT. This patchset adds link modes for 100BaseT1 and 1000BaseT1, and them makes use of 100BaseT1 in the list of PHY features used by current T1 drivers. ==================== Signed-off-by: David S. Miller commit e5fb32c67cdb8908bcc0193244eced9e19de56f3 Author: Andrew Lunn Date: Wed May 22 20:47:04 2019 +0200 net: phy: Make phy_basic_t1_features use base100t1. Now that there is a link mode for 100BaseT1, use it in phy_basic_t1_features so T1 PHY drivers will indicate this mode via the Ethtool API. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/phy_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b2557764d0ebf387da7a11967fd955f3b226b172 Author: Andrew Lunn Date: Wed May 22 20:47:03 2019 +0200 net: phy: Add support for 100BaseT1 and 1000BaseT1 Add link modes for 100Mbps and 1Gbps over a single pair. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/phy-core.c | 4 +++- include/uapi/linux/ethtool.h | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) commit 565d9d221bcb4cae926585681089b3ba4ef9be8e Author: Trent Piepho Date: Wed May 22 18:43:27 2019 +0000 net: phy: dp83867: Allocate state struct in probe This was being done in config the first time the phy was configured. Should be in the probe method. Cc: Andrew Lunn Cc: Florian Fainelli Cc: Heiner Kallweit Signed-off-by: Trent Piepho Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/dp83867.c | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) commit f8bbf417e58b9933b49f1f7fa28ce85ad5d32a31 Author: Trent Piepho Date: Wed May 22 18:43:26 2019 +0000 net: phy: dp83867: Validate FIFO depth property Insure property is in valid range and fail when reading DT if it is not. Also add error message for existing failure if required property is not present. Cc: Andrew Lunn Cc: Florian Fainelli Cc: Heiner Kallweit Signed-off-by: Trent Piepho Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/dp83867.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit 27708eb5481b7b00540028d0ac2b56dfa95a2df7 Author: Trent Piepho Date: Wed May 22 18:43:25 2019 +0000 net: phy: dp83867: IO impedance is not dependent on RGMII delay The driver would only set the IO impedance value when RGMII internal delays were enabled. There is no reason for this. Move the IO impedance block out of the RGMII delay block. Cc: Andrew Lunn Cc: Florian Fainelli Cc: Heiner Kallweit Signed-off-by: Trent Piepho Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/dp83867.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit 1b9b295435c38bfb3936ad6033595ead4aa51c0e Author: Trent Piepho Date: Wed May 22 18:43:24 2019 +0000 net: phy: dp83867: Use unsigned variables to store unsigned properties The variables used to store u32 DT properties were signed ints. This doesn't work properly if the value of the property were to overflow. Use unsigned variables so this doesn't happen. Cc: Andrew Lunn Cc: Florian Fainelli Cc: Heiner Kallweit Signed-off-by: Trent Piepho Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/dp83867.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c11669a2757e285958e3d7647bad48807ae8e283 Author: Trent Piepho Date: Wed May 22 18:43:23 2019 +0000 net: phy: dp83867: Rework delay rgmii delay handling The code was assuming the reset default of the delay control register was to have delay disabled. This is what the datasheet shows as the register's initial value. However, that's not actually true: the default is controlled by the PHY's pin strapping. If the interface mode is selected as RX or TX delay only, insure the other direction's delay is disabled. If the interface mode is just "rgmii", with neither TX or RX internal delay, one might expect that the driver should disable both delays. But this is not what the driver does. It leaves the setting at the PHY's strapping's default. And that default, for no pins with strapping resistors, is to have delay enabled and 2.00 ns. Rather than change this behavior, I've kept it the same and documented it. No delay will most likely not work and will break ethernet on any board using "rgmii" mode. If the board is strapped to have a delay and is configured to use "rgmii" mode a warning is generated that "rgmii-id" should have been used. Also validate the delay values and fail if they are not in range. Cc: Andrew Lunn Cc: Florian Fainelli Cc: Heiner Kallweit Signed-off-by: Trent Piepho Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/dp83867.c | 78 +++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 66 insertions(+), 12 deletions(-) commit 13c83cf8af0dcc6103982b4dc0b70826f0b54f21 Author: Trent Piepho Date: Wed May 22 18:43:22 2019 +0000 net: phy: dp83867: Add ability to disable output clock Generally, the output clock pin is only used for testing and only serves as a source of RF noise after this. It could be used to daisy-chain PHYs, but this is uncommon. Since the PHY can disable the output, make doing so an option. I do this by adding another enumeration to the allowed values of ti,clk-output-sel. The code was not using the value DP83867_CLK_O_SEL_REF_CLK as one might expect: to select the REF_CLK as the output. Rather it meant "keep clock output setting as is", which, depending on PHY strapping, might not be outputting REF_CLK. Change this so DP83867_CLK_O_SEL_REF_CLK means enable REF_CLK output. Omitting the property will leave the setting as is (which was the previous behavior in this case). Out of range values were silently converted into DP83867_CLK_O_SEL_REF_CLK. Change this so they generate an error. Cc: Andrew Lunn Cc: Florian Fainelli Cc: Heiner Kallweit Signed-off-by: Trent Piepho Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/dp83867.c | 37 ++++++++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 9 deletions(-) commit 980066e6d9642fa5854bed8e592b1a30ea885b76 Author: Trent Piepho Date: Wed May 22 18:43:21 2019 +0000 dt-bindings: phy: dp83867: Add documentation for disabling clock output The clock output is generally only used for testing and development and not used to daisy-chain PHYs. It's just a source of RF noise afterward. Add a mux value for "off". I've added it as another enumeration to the output property. In the actual PHY, the mux and the output enable are independently controllable. However, it doesn't seem useful to be able to describe the mux setting when the output is disabled. Document that PHY's default setting will be left as is if the property is omitted. Cc: Rob Herring Cc: Mark Rutland Signed-off-by: Trent Piepho Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/ti,dp83867.txt | 6 ++++-- include/dt-bindings/net/ti-dp83867.h | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) commit 9c3f3410f5ace868c7c82fe4479fd36bed5eee64 Author: Trent Piepho Date: Wed May 22 18:43:19 2019 +0000 dt-bindings: phy: dp83867: Describe how driver behaves w.r.t rgmii delay Add a note to make it more clear how the driver behaves when "rgmii" vs "rgmii-id", "rgmii-idrx", or "rgmii-idtx" interface modes are selected. Cc: Rob Herring Cc: Mark Rutland Signed-off-by: Trent Piepho Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/ti,dp83867.txt | 8 ++++++++ 1 file changed, 8 insertions(+) commit 74dd5aa1ed94a8099a57bb7f91300668d0600ade Author: Vishal Kulkarni Date: Wed May 22 21:46:12 2019 +0530 cxgb4: Enable hash filter with offload Hash (exact-match) filters used for offloading flows share the same active region resources on the chip with upper layer drivers, like iw_cxgb4, chcr, etc. Currently, only either Hash filters or ULDs can use the active region resources, but not both. Hence, use the new firmware configuration parameters (when available) to allow both the Hash filters and ULDs to share the active region simultaneously. Signed-off-by: Vishal Kulkarni Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 1 + drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c | 38 +++++++++++------ drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.h | 2 +- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 52 +++++++++++++++++++---- drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h | 1 + drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 32 ++++++++++++++ drivers/net/ethernet/chelsio/cxgb4/t4_regs.h | 4 ++ drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h | 2 + 8 files changed, 110 insertions(+), 22 deletions(-) commit 2bb0f3b4341b0120d50ec11939fcbccdf6511fe6 Author: Baruch Siach Date: Wed May 22 16:56:15 2019 +0300 net: fec: remove redundant ipg clock disable Don't disable the ipg clock in the regulator error path. The clock is disable unconditionally two lines below the failed_regulator label. Signed-off-by: Baruch Siach Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fec_main.c | 1 - 1 file changed, 1 deletion(-) commit 7a0cf094944e2540758b7f957eb6846d5126f535 Author: Eric W. Biederman Date: Wed May 15 22:54:56 2019 -0500 signal: Correct namespace fixups of si_pid and si_uid The function send_signal was split from __send_signal so that it would be possible to bypass the namespace logic based upon current[1]. As it turns out the si_pid and the si_uid fixup are both inappropriate in the case of kill_pid_usb_asyncio so move that logic into send_signal. It is difficult to arrange but possible for a signal with an si_code of SI_TIMER or SI_SIGIO to be sent across namespace boundaries. In which case tests for when it is ok to change si_pid and si_uid based on SI_FROMUSER are incorrect. Replace the use of SI_FROMUSER with a new test has_si_pid_and_used based on siginfo_layout. Now that the uid fixup is no longer present after expanding SEND_SIG_NOINFO properly calculate the si_uid that the target task needs to read. [1] 7978b567d315 ("signals: add from_ancestor_ns parameter to send_signal()") Cc: stable@vger.kernel.org Fixes: 6588c1e3ff01 ("signals: SI_USER: Masquerade si_pid when crossing pid ns boundary") Fixes: 6b550f949594 ("user namespace: make signal.c respect user namespaces") Signed-off-by: "Eric W. Biederman" kernel/signal.c | 67 ++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 40 insertions(+), 27 deletions(-) commit 70f1b0d34bdf03065fe869e93cc17cad1ea20c4a Author: Eric W. Biederman Date: Thu Feb 7 19:44:12 2019 -0600 signal/usb: Replace kill_pid_info_as_cred with kill_pid_usb_asyncio The usb support for asyncio encoded one of it's values in the wrong field. It should have used si_value but instead used si_addr which is not present in the _rt union member of struct siginfo. The practical result of this is that on a 64bit big endian kernel when delivering a signal to a 32bit process the si_addr field is set to NULL, instead of the expected pointer value. This issue can not be fixed in copy_siginfo_to_user32 as the usb usage of the the _sigfault (aka si_addr) member of the siginfo union when SI_ASYNCIO is set is incompatible with the POSIX and glibc usage of the _rt member of the siginfo union. Therefore replace kill_pid_info_as_cred with kill_pid_usb_asyncio a dedicated function for this one specific case. There are no other users of kill_pid_info_as_cred so this specialization should have no impact on the amount of code in the kernel. Have kill_pid_usb_asyncio take instead of a siginfo_t which is difficult and error prone, 3 arguments, a signal number, an errno value, and an address enconded as a sigval_t. The encoding of the address as a sigval_t allows the code that reads the userspace request for a signal to handle this compat issue along with all of the other compat issues. Add BUILD_BUG_ONs in kernel/signal.c to ensure that we can now place the pointer value at the in si_pid (instead of si_addr). That is the code now verifies that si_pid and si_addr always occur at the same location. Further the code veries that for native structures a value placed in si_pid and spilling into si_uid will appear in userspace in si_addr (on a byte by byte copy of siginfo or a field by field copy of siginfo). The code also verifies that for a 64bit kernel and a 32bit userspace the 32bit pointer will fit in si_pid. I have used the usbsig.c program below written by Alan Stern and slightly tweaked by me to run on a big endian machine to verify the issue exists (on sparc64) and to confirm the patch below fixes the issue. /* usbsig.c -- test USB async signal delivery */ #define _GNU_SOURCE #include #include #include #include #include #include #include #include #include static struct usbdevfs_urb urb; static struct usbdevfs_disconnectsignal ds; static volatile sig_atomic_t done = 0; void urb_handler(int sig, siginfo_t *info , void *ucontext) { printf("Got signal %d, signo %d errno %d code %d addr: %p urb: %p\n", sig, info->si_signo, info->si_errno, info->si_code, info->si_addr, &urb); printf("%s\n", (info->si_addr == &urb) ? "Good" : "Bad"); } void ds_handler(int sig, siginfo_t *info , void *ucontext) { printf("Got signal %d, signo %d errno %d code %d addr: %p ds: %p\n", sig, info->si_signo, info->si_errno, info->si_code, info->si_addr, &ds); printf("%s\n", (info->si_addr == &ds) ? "Good" : "Bad"); done = 1; } int main(int argc, char **argv) { char *devfilename; int fd; int rc; struct sigaction act; struct usb_ctrlrequest *req; void *ptr; char buf[80]; if (argc != 2) { fprintf(stderr, "Usage: usbsig device-file-name\n"); return 1; } devfilename = argv[1]; fd = open(devfilename, O_RDWR); if (fd == -1) { perror("Error opening device file"); return 1; } act.sa_sigaction = urb_handler; sigemptyset(&act.sa_mask); act.sa_flags = SA_SIGINFO; rc = sigaction(SIGUSR1, &act, NULL); if (rc == -1) { perror("Error in sigaction"); return 1; } act.sa_sigaction = ds_handler; sigemptyset(&act.sa_mask); act.sa_flags = SA_SIGINFO; rc = sigaction(SIGUSR2, &act, NULL); if (rc == -1) { perror("Error in sigaction"); return 1; } memset(&urb, 0, sizeof(urb)); urb.type = USBDEVFS_URB_TYPE_CONTROL; urb.endpoint = USB_DIR_IN | 0; urb.buffer = buf; urb.buffer_length = sizeof(buf); urb.signr = SIGUSR1; req = (struct usb_ctrlrequest *) buf; req->bRequestType = USB_DIR_IN | USB_TYPE_STANDARD | USB_RECIP_DEVICE; req->bRequest = USB_REQ_GET_DESCRIPTOR; req->wValue = htole16(USB_DT_DEVICE << 8); req->wIndex = htole16(0); req->wLength = htole16(sizeof(buf) - sizeof(*req)); rc = ioctl(fd, USBDEVFS_SUBMITURB, &urb); if (rc == -1) { perror("Error in SUBMITURB ioctl"); return 1; } rc = ioctl(fd, USBDEVFS_REAPURB, &ptr); if (rc == -1) { perror("Error in REAPURB ioctl"); return 1; } memset(&ds, 0, sizeof(ds)); ds.signr = SIGUSR2; ds.context = &ds; rc = ioctl(fd, USBDEVFS_DISCSIGNAL, &ds); if (rc == -1) { perror("Error in DISCSIGNAL ioctl"); return 1; } printf("Waiting for usb disconnect\n"); while (!done) { sleep(1); } close(fd); return 0; } Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Cc: Alan Stern Cc: Oliver Neukum Fixes: v2.3.39 Cc: stable@vger.kernel.org Acked-by: Alan Stern Signed-off-by: "Eric W. Biederman" drivers/usb/core/devio.c | 48 +++++++++++++++--------------- include/linux/sched/signal.h | 2 +- kernel/signal.c | 69 +++++++++++++++++++++++++++++++++++++++----- 3 files changed, 86 insertions(+), 33 deletions(-) commit 3b1d715dc2edda1efa590fdf7cf9731501d4a44f Author: Clément Péron Date: Tue May 21 18:11:00 2019 +0200 dt-bindings: gpu: mali-midgard: Add H6 mali gpu compatible This add the H6 mali compatible in the dt-bindings to later support specific implementation. Signed-off-by: Clément Péron Reviewed-by: Rob Herring Signed-off-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20190521161102.29620-5-peron.clem@gmail.com Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 374ed5429346a021c8e2d26fafce14c5b15dedd0 Merge: 270afb37ae34 a188339ca5a3 Author: Sean Paul Date: Wed May 22 16:08:21 2019 -0400 Merge drm/drm-next into drm-misc-next Backmerging 5.2-rc1 to -misc-next for robher Signed-off-by: Sean Paul commit 270afb37ae34fc1499d166f6edf4bc472f529d96 Author: Uma Shankar Date: Thu May 16 19:40:16 2019 +0530 video/hdmi: Add Unpack function for DRM infoframe Added unpack function for DRM infoframe for dynamic range and mastering infoframe readout. v2: Addressed Ville's review comments. Suggested-by: Ville Syrjälä Signed-off-by: Uma Shankar Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/1558015817-12025-12-git-send-email-uma.shankar@intel.com drivers/video/hdmi.c | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) commit b5e3eed1eeb363c148e2935d9d3c12c30a280de6 Author: Ville Syrjälä Date: Thu May 16 19:40:12 2019 +0530 drm: Add HLG EOTF ADD HLG EOTF to the list of EOTF transfer functions supported. Hybrid Log-Gamma (HLG) is a high dynamic range (HDR) standard. HLG defines a nonlinear transfer function in which the lower half of the signal values use a gamma curve and the upper half of the signal values use a logarithmic curve. v2: Rebase v3: Fixed a warning message v4: Addressed Shashank's review comments v5: Addressed Jonas Karlman's review comment and dropped the i915 tag from header. Signed-off-by: Ville Syrjälä Signed-off-by: Uma Shankar Reviewed-by: Shashank Sharma Link: https://patchwork.freedesktop.org/patch/msgid/1558015817-12025-8-git-send-email-uma.shankar@intel.com drivers/gpu/drm/drm_edid.c | 3 ++- include/linux/hdmi.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) commit 2cdbfd66a82969770ce1a7032fb1e2155a08cee8 Author: Uma Shankar Date: Thu May 16 19:40:09 2019 +0530 drm: Enable HDR infoframe support Enable Dynamic Range and Mastering Infoframe for HDR content, which is defined in CEA 861.3 spec. The metadata will be computed based on blending policy in userspace compositors and passed as a connector property blob to driver. The same will be sent as infoframe to panel which support HDR. Added the const version of infoframe for DRM metadata for HDR. v2: Rebase and added Ville's POC changes. v3: No Change v4: Addressed Shashank's review comments and merged the patch making drm infoframe function arguments as constant. v5: Rebase v6: Fixed checkpatch warnings with --strict option. Addressed Shashank's review comments and added his RB. v7: Addressed Brian Starkey's review comments. Merged 2 patches into one. v8: Addressed Jonas Karlman review comments. v9: Addressed Jonas Karlman review comments. v10: Addressed Ville's review comments. v11: Added BUILD_BUG_ON and sizeof instead of magic numbers as per Ville's comments. Signed-off-by: Uma Shankar Reviewed-by: Shashank Sharma Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/1558015817-12025-5-git-send-email-uma.shankar@intel.com drivers/gpu/drm/drm_edid.c | 72 +++++++++++++++++ drivers/video/hdmi.c | 190 +++++++++++++++++++++++++++++++++++++++++++++ include/drm/drm_edid.h | 5 ++ include/linux/hdmi.h | 28 +++++++ 4 files changed, 295 insertions(+) commit e85959d6cbe08521942a6118568a38ac671e8d7f Author: Uma Shankar Date: Thu May 16 19:40:08 2019 +0530 drm: Parse HDR metadata info from EDID HDR metadata block is introduced in CEA-861.3 spec. Parsing the same to get the panel's HDR metadata. v2: Rebase and added Ville's POC changes to the patch. v3: No Change v4: Addressed Shashank's review comments v5: Addressed Shashank's comment and added his RB. v6: Addressed Jonas Karlman review comments. v7: Adressed Ville's review comments and fixed the issue with length handling. v8: Put the length check as per the convention followed in existing code, as suggested by Ville. Signed-off-by: Uma Shankar Reviewed-by: Shashank Sharma Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/1558015817-12025-4-git-send-email-uma.shankar@intel.com drivers/gpu/drm/drm_edid.c | 51 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit c0b0ebb1719984513333f88d0c2a2bb3fdb61474 Author: Jonas Karlman Date: Thu May 16 19:40:07 2019 +0530 drm: Add reference counting on HDR metadata blob This adds reference count for HDR metadata blob, handled as part of duplicate and destroy connector state functions. v2: Removed the hdr_metadata_changed initialization as the variable is dropped and not required. Signed-off-by: Jonas Karlman Signed-off-by: Uma Shankar Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/1558015817-12025-3-git-send-email-uma.shankar@intel.com drivers/gpu/drm/drm_atomic_state_helper.c | 5 +++++ 1 file changed, 5 insertions(+) commit fbb5d0353c62d10c3699ec844d2d015a762952d7 Author: Uma Shankar Date: Thu May 16 19:40:06 2019 +0530 drm: Add HDR source metadata property This patch adds a blob property to get HDR metadata information from userspace. This will be send as part of AVI Infoframe to panel. It also implements get() and set() functions for HDR output metadata property.The blob data is received from userspace and saved in connector state, the same is returned as blob in get property call to userspace. v2: Rebase and modified the metadata structure elements as per Ville's POC changes. v3: No Change v4: Addressed Shashank's review comments v5: Rebase. v6: Addressed Brian Starkey's review comments, defined new structure with header for dynamic metadata scalability. Merge get/set property functions for metadata in this patch. v7: Addressed Jonas Karlman review comments and defined separate structure for infoframe to better align with CTA 861.G spec. Added Shashank's RB. v8: Addressed Ville's review comments. Moved sink metadata structure out of uapi headers as suggested by Jonas Karlman. v9: Rebase and addressed Jonas Karlman review comments. v10: Addressed Ville's review comments, dropped the metdata_changed state variable as its not needed anymore. Signed-off-by: Uma Shankar Reviewed-by: Shashank Sharma Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/1558015817-12025-2-git-send-email-uma.shankar@intel.com drivers/gpu/drm/drm_atomic_uapi.c | 12 ++++++++++++ drivers/gpu/drm/drm_connector.c | 6 ++++++ include/drm/drm_connector.h | 10 ++++++++++ include/drm/drm_mode_config.h | 7 +++++++ include/linux/hdmi.h | 26 ++++++++++++++++++++++++++ include/uapi/drm/drm_mode.h | 23 +++++++++++++++++++++++ 6 files changed, 84 insertions(+) commit 354cf00339b12da6e685770e9e411ebe05d3e3a3 Author: Hans Verkuil Date: Fri May 10 11:15:04 2019 -0400 media: cec: mark devnode as registered before actually registering it The cec device node can be used right after it was created, but that leaves a race condition where the device was created, but devnode->registered was still false. So an ioctl() would result in an error. So set it to true before calling cdev_device_add() and to false again if cdev_device_add returned an error. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/cec/cec-core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9390467c2d3bd19778ec23b39dde5424151ec37d Author: Neil Armstrong Date: Mon May 20 10:03:43 2019 -0400 media: rc: meson-ir: update with SPDX Licence identifier Remove comment and replace with the appropriate SPDX identifier. Signed-off-by: Neil Armstrong Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/meson-ir.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit f16888a3e8a91af44329414c125e5a95660f567e Author: Stefan Brüns Date: Sun May 19 07:18:31 2019 -0400 media: af9035: Remove duplicate error reporting for dvbsky_usb_generic_rw All error cases inside the function already report errors via dev_err(), and dvb_usb_v2_generic_rw also reports all error cases, so there is no silent code path when an error has occurred. Signed-off-by: Stefan Brüns Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb-v2/af9035.c | 2 -- 1 file changed, 2 deletions(-) commit fec2e415cb18f98c736539e0f971e93a0598c1b2 Author: Stefan Brüns Date: Sun May 19 07:18:30 2019 -0400 media: dvbsky: Remove duplicate error reporting for dvbsky_usb_generic_rw Errors are already reported by the common code in dvb_usb_v2_generic_io (which dvbsky_usb_generic_rw is a wrapper of), so there is no reason report the error again. Signed-off-by: Stefan Brüns Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb-v2/dvbsky.c | 11 ----------- 1 file changed, 11 deletions(-) commit dd5f551b58a8b557fd7fc93f238dc0dc29526e32 Author: Stefan Brüns Date: Sun May 19 07:18:29 2019 -0400 media: dvb-usb-v2: Report error on all error paths actual_length != wlen is the only error path which does not generate an error message. Adding an error message here allows to report a more specific error and to remove the error reporting from the call sites. Also clean up the error paths - in case of an error, the remaining code is skipped, and ret is returned. Skip setting ret and return immediately (no cleanup necessary). Signed-off-by: Stefan Brüns Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb-v2/dvb_usb_urb.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 6d0d1ff9ff21fbb06b867c13a1d41ce8ddcd8230 Author: Sean Young Date: Sun May 19 15:28:22 2019 -0400 media: au0828: fix null dereference in error path au0828_usb_disconnect() gets the au0828_dev struct via usb_get_intfdata, so it needs to set up for the error paths. Reported-by: syzbot+357d86bcb4cca1a2f572@syzkaller.appspotmail.com Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/au0828/au0828-core.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 6cf97230cd5f36b7665099083272595c55d72be7 Author: Oliver Neukum Date: Tue Apr 30 09:07:36 2019 -0400 media: dvb: usb: fix use after free in dvb_usb_device_exit dvb_usb_device_exit() frees and uses the device name in that order. Fix by storing the name in a buffer before freeing it. Signed-off-by: Oliver Neukum Reported-by: syzbot+26ec41e9f788b3eba396@syzkaller.appspotmail.com Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/dvb-usb-init.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 24e4cf770371df6ad49ed873f21618d9878f64c8 Author: Daniel Gomez Date: Mon Apr 22 15:10:20 2019 -0400 media: spi: IR LED: add missing of table registration MODULE_DEVICE_TABLE(of, should be called to complete DT OF mathing mechanism and register it. Before this patch: modinfo drivers/media/rc/ir-spi.ko | grep alias After this patch: modinfo drivers/media/rc/ir-spi.ko | grep alias alias: of:N*T*Cir-spi-ledC* alias: of:N*T*Cir-spi-led Reported-by: Javier Martinez Canillas Signed-off-by: Daniel Gomez Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/ir-spi.c | 1 + 1 file changed, 1 insertion(+) commit b681af0bc1cc520c35f2ef109aa6a2db46d0ecb5 Author: Clément Péron Date: Tue May 21 18:10:57 2019 +0200 drm: panfrost: add optional bus_clock Allwinner H6 has an ARM Mali-T720 MP2 which required a bus_clock. Add an optional bus_clock at the init of the panfrost driver. Signed-off-by: Clément Péron Signed-off-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20190521161102.29620-2-peron.clem@gmail.com drivers/gpu/drm/panfrost/panfrost_device.c | 22 ++++++++++++++++++++++ drivers/gpu/drm/panfrost/panfrost_device.h | 1 + 2 files changed, 23 insertions(+) commit d4db6c089099d38166752c93d9d165fb7526f1e5 Author: Icenowy Zheng Date: Tue May 21 18:10:59 2019 +0200 dt-bindings: gpu: add bus clock for Mali Midgard GPUs Some SoCs adds a bus clock gate to the Mali Midgard GPU. Add the binding for the bus clock. Signed-off-by: Icenowy Zheng Signed-off-by: Clément Péron Reviewed-by: Rob Herring Signed-off-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20190521161102.29620-4-peron.clem@gmail.com Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt | 6 ++++++ 1 file changed, 6 insertions(+) commit cae9910e73446cac68a54e3a7b02aaa12b689026 Author: Felipe Gasper Date: Mon May 20 19:43:51 2019 -0500 net: Add UNIX_DIAG_UID to Netlink UNIX socket diagnostics. This adds the ability for Netlink to report a socket's UID along with the other UNIX diagnostic information that is already available. This will allow diagnostic tools greater insight into which users control which socket. To test this, do the following as a non-root user: unshare -U -r bash nc -l -U user.socket.$$ & .. and verify from within that same session that Netlink UNIX socket diagnostics report the socket's UID as 0. Also verify that Netlink UNIX socket diagnostics report the socket's UID as the user's UID from an unprivileged process in a different session. Verify the same from a root process. Signed-off-by: Felipe Gasper Signed-off-by: David S. Miller include/uapi/linux/unix_diag.h | 2 ++ net/unix/diag.c | 12 ++++++++++++ 2 files changed, 14 insertions(+) commit 9c536ccdd5b691057aad89b7bb9b4562938dda9c Author: Thierry Reding Date: Wed May 22 09:50:59 2019 +0200 arm64: tegra: Make DT model property consistent Jetson Nano, Jetson TX1 and Jetson TX2 all are named "Developer Kit" and Jetson AGX Xavier is the odd one out. It's officially also called the "Developer Kit", not "Development Kit", so make it consistent with the rest. Acked-by: Jon Hunter Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra194-p2972-0000.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f85d82e5cd438b28e0481be185443ec54e087d94 Author: Thierry Reding Date: Wed May 22 09:49:58 2019 +0200 arm64: tegra: Clarify that P2888 is the Jetson AGX Xavier P2888 is the internal part number for the Jetson AGX Xavier module. Clarify that using the DT model property. Acked-by: Jon Hunter Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 71e7ea434ecadeac71aee50d042b9f78bdd8b630 Author: Thierry Reding Date: Wed May 22 09:48:53 2019 +0200 arm64: tegra: Clarify that P3310 is the Jetson TX2 P3310 is the internal part number for the Jetson TX2 module. Clarify that using the DT model property. Acked-by: Jon Hunter Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra186-p3310.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a0c0cdc93465c8d6565b2e0bf50c1f3749247989 Author: Thierry Reding Date: Thu Jun 7 11:34:18 2018 +0200 arm64: tegra: Clarify that P2771 is the Jetson TX2 Developer Kit P2771 is the internal part number for the Jetson TX2 Developer Kit. Clarify that using the DT model property. Acked-by: Jon Hunter Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra186-p2771-0000.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c614d7e66c6a65e406cd21bbb2560e0eff0175ba Author: Christian König Date: Tue Jul 3 16:55:26 2018 +0200 drm: remove prime sg_table caching That is now done by the DMA-buf helpers instead. Signed-off-by: Christian König Reviewed-by: Daniel Vetter Link: https://patchwork.kernel.org/patch/10943055/ drivers/gpu/drm/drm_prime.c | 77 ++++++++++----------------------------------- 1 file changed, 17 insertions(+), 60 deletions(-) commit f13e143e7444bffc53f5c2904aeed76646da69d6 Author: Christian König Date: Tue Jul 3 16:42:26 2018 +0200 dma-buf: start caching of sg_table objects v2 To allow a smooth transition from pinning buffer objects to dynamic invalidation we first start to cache the sg_table for an attachment. v2: keep closer to the DRM implementation Signed-off-by: Christian König Reviewed-by: Daniel Vetter Link: https://patchwork.kernel.org/patch/10943053/ drivers/dma-buf/dma-buf.c | 27 +++++++++++++++++++++++++-- include/linux/dma-buf.h | 13 +++++++++++++ 2 files changed, 38 insertions(+), 2 deletions(-) commit c5d3e39caa456b1e061644b739131f2b54c84c08 Author: Tvrtko Ursulin Date: Wed May 22 10:00:54 2019 +0100 drm/i915: Engine discovery query Engine discovery query allows userspace to enumerate engines, probe their configuration features, all without needing to maintain the internal PCI ID based database. A new query for the generic i915 query ioctl is added named DRM_I915_QUERY_ENGINE_INFO, together with accompanying structure drm_i915_query_engine_info. The address of latter should be passed to the kernel in the query.data_ptr field, and should be large enough for the kernel to fill out all known engines as struct drm_i915_engine_info elements trailing the query. As with other queries, setting the item query length to zero allows userspace to query minimum required buffer size. Enumerated engines have common type mask which can be used to query all hardware engines, versus engines userspace can submit to using the execbuf uAPI. Engines also have capabilities which are per engine class namespace of bits describing features not present on all engine instances. v2: * Fixed HEVC assignment. * Reorder some fields, rename type to flags, increase width. (Lionel) * No need to allocate temporary storage if we do it engine by engine. (Lionel) v3: * Describe engine flags and mark mbz fields. (Lionel) * HEVC only applies to VCS. v4: * Squash SFC flag into main patch. * Tidy some comments. v5: * Add uabi_ prefix to engine capabilities. (Chris Wilson) * Report exact size of engine info array. (Chris Wilson) * Drop the engine flags. (Joonas Lahtinen) * Added some more reserved fields. * Move flags after class/instance. v6: * Do not check engine info array was zeroed by userspace but zero the unused fields for them instead. v7: * Simplify length calculation loop. (Lionel Landwerlin) v8: * Remove MBZ comments where not applicable. * Rename ABI flags to match engine class define naming. * Rename SFC ABI flag to reflect it applies to VCS and VECS. * SFC is wired to even _logical_ engine instances. * SFC applies to VCS and VECS. * HEVC is present on all instances on Gen11. (Tony) * Simplify length calculation even more. (Chris Wilson) * Move info_ptr assigment closer to loop for clarity. (Chris Wilson) * Use vdbox_sfc_access from runtime info. * Rebase for RUNTIME_INFO. * Refactor for lower indentation. * Rename uAPI class/instance to engine_class/instance to avoid C++ keyword. v9: * Rebase for s/num_rings/num_engines/ in RUNTIME_INFO. v10: * Use new copy_query_item. v11: * Consolidate with struct i915_engine_class_instnace. Signed-off-by: Tvrtko Ursulin Cc: Chris Wilson Cc: Jon Bloomfield Cc: Dmitry Rogozhkin Cc: Lionel Landwerlin Cc: Joonas Lahtinen Cc: Tony Ye Reviewed-by: Lionel Landwerlin # v7 Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190522090054.6007-1-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/gt/intel_engine_cs.c | 41 +++++++++++++++++++++++ drivers/gpu/drm/i915/gt/intel_engine_types.h | 2 ++ drivers/gpu/drm/i915/i915_query.c | 49 ++++++++++++++++++++++++++++ include/uapi/drm/i915_drm.h | 42 ++++++++++++++++++++++++ 4 files changed, 134 insertions(+) commit 2e21865faf4fd7ca99eb2ace072c6d618059e342 Author: David Howells Date: Wed May 22 14:06:51 2019 +0100 keys: sparse: Fix key_fs[ug]id_changed() Sparse warnings are incurred by key_fs[ug]id_changed() due to unprotected accesses of tsk->cred, which is marked __rcu. Fix this by passing the new cred struct to these functions from commit_creds() rather than the task pointer. Signed-off-by: David Howells Reviewed-by: James Morris include/linux/key.h | 8 ++++---- kernel/cred.c | 4 ++-- security/keys/process_keys.c | 22 ++++++++++------------ 3 files changed, 16 insertions(+), 18 deletions(-) commit 43ad38191816a6b77cc4bd8222353320a71a1d2d Author: Geordan Neukum Date: Wed May 22 12:14:02 2019 +0000 staging: kpc2000: kpc_i2c: add static qual to local symbols in kpc_i2c.c kpc_i2c.c declares: - two functions - pi2c_probe() - pi2c_remove() - one struct - i2c_plat_driver_i which are local to the file, yet missing the static qualifier. Add the static qualifier to these symbols. Signed-off-by: Geordan Neukum Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000_i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7bd49a49b0a7f3bf845869afb126e40788eab832 Author: Geordan Neukum Date: Wed May 22 12:14:01 2019 +0000 staging: kpc2000: kpc_i2c: Remove unnecessary function tracing prints Many of the functions in kpc_i2c log debug-level messages to the kernel log message buffer upon invocation. This is unnecessary, as debugging tools like kgdb, kdb, etc. or the tracing tool ftrace should be able to provide this same information. Therefore, remove these print statements. Signed-off-by: Geordan Neukum Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000_i2c.c | 26 -------------------------- 1 file changed, 26 deletions(-) commit 32806b33fee8200b18702a93d693017c6445b2c9 Author: Geordan Neukum Date: Wed May 22 12:14:00 2019 +0000 staging: kpc2000: kpc_i2c: use instead of Rather than include asm/io.h, include linux/io.h. Issue reported by the script checkpatch.pl. Signed-off-by: Geordan Neukum Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 953bb9e5d060d0848cc83143236a1ce00498aaac Author: Geordan Neukum Date: Wed May 22 12:13:59 2019 +0000 staging: kpc2000: kpc_i2c: newline fixups to meet linux style guide The linux coding style document states: 1) That braces should not be used where a single single statement will do. Therefore all instances of single block statements wrapped in braces that do not meet the qualifications of any of the exceptions to the rule should be fixed up. 2) That the declaration of variables local to a given function should be immediately followed by a blank newline. Therefore, the single instance of this in kpc2000_i2c.c should be fixed up. Signed-off-by: Geordan Neukum Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000_i2c.c | 82 +++++++++++++---------------------- 1 file changed, 29 insertions(+), 53 deletions(-) commit 8576a5f543273f4bf3af8e3a5b25c918e4dca02a Author: Geordan Neukum Date: Wed May 22 12:13:58 2019 +0000 staging: kpc2000: kpc_i2c: remove unused module param disable_features The module parameter 'disable_features' is currently unused. Therefore, it should be removed. Signed-off-by: Geordan Neukum Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000_i2c.c | 4 ---- 1 file changed, 4 deletions(-) commit e6e0a03574917ed7bd5545cfbee87d60021500d9 Author: Nathan Chancellor Date: Tue May 21 10:42:21 2019 -0700 staging: rtl8192u: Remove an unnecessary NULL check Clang warns: drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:2663:47: warning: address of array 'param->u.wpa_ie.data' will always evaluate to 'true' [-Wpointer-bool-conversion] (param->u.wpa_ie.len && !param->u.wpa_ie.data)) ~~~~~~~~~~~~~~~~~^~~~ This was exposed by commit deabe03523a7 ("Staging: rtl8192u: ieee80211: Use !x in place of NULL comparisons") because we disable the warning that would have pointed out the comparison against NULL is also false: drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:2663:46: warning: comparison of array 'param->u.wpa_ie.data' equal to a null pointer is always false [-Wtautological-pointer-compare] (param->u.wpa_ie.len && param->u.wpa_ie.data == NULL)) ~~~~~~~~~~~~~~~~^~~~ ~~~~ Remove it so clang no longer warns. Link: https://github.com/ClangBuiltLinux/linux/issues/487 Signed-off-by: Nathan Chancellor Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 3df7e8a77e8cac1daea3ad0842ed3fd2105f98f0 Author: Jeremy Sowden Date: Tue May 21 11:35:24 2019 +0100 staging: kpc2000: removed superfluous NULL checks from device attribute call-backs. All the attribute show call-backs check whether pcard is NULL. However, pci_set_drvdata(pdev, pcard) is called before the sysfs files are created during probe, and pci_set_drvdata(pdev, NULL) is not called until after they are destroyed during remove; therefore, pcard will not be NULL, and we can drop the checks. Signed-off-by: Jeremy Sowden Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/core.c | 27 --------------------------- 1 file changed, 27 deletions(-) commit e416dad158f289ef2af48bf21fca53acc3935353 Author: Jeremy Sowden Date: Tue May 21 11:35:23 2019 +0100 staging: kpc2000: simplified kp2000_device retrieval in device attribute call-backs. All the call-backs used the same formula to retrieve the pcard from dev: struct pci_dev *pdev = to_pci_dev(dev); struct kp2000_device *pcard; if (!pdev) return NULL; pcard = pci_get_drvdata(pdev); Since to_pci_dev is a wrapper for container_of, it will not return NULL, and since pci_get_drvdata just calls dev_get_drvdata on the dev member of pdev, this is equivalent to: struct kp2000_device *pcard = dev_get_drvdata(&(container_of(dev, struct pci_dev, dev)->dev)); and we can simplify it to: struct kp2000_device *pcard = dev_get_drvdata(dev); Signed-off-by: Jeremy Sowden Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/core.c | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) commit f731540813474de5d371d650ef00443aa7811b92 Author: Jeremy Sowden Date: Tue May 21 11:35:22 2019 +0100 staging: kpc2000: use IDA to assign card numbers. Previously the next card number was assigned from a static int local variable. Replaced it with an IDA. Avoids the assignment of ever- increasing card-numbers by allowing them to be reused. Updated TODO. Corrected format-specifier for unsigned pcard->card_num. Signed-off-by: Jeremy Sowden Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/TODO | 1 - drivers/staging/kpc2000/kpc2000/core.c | 19 +++++++++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) commit 80bcd6cc3966229f030c9903976245543208f446 Author: Jeremy Sowden Date: Tue May 21 11:35:21 2019 +0100 staging: kpc2000: added separate show functions for readable kp device attributes, defined them as read-only, and declared them static. Defined separate simple show functions for each attribute instead of having a one big one containing a chain of conditionals. Replaced calls to scnprintf with sprintf since all the outputs are single integers. All the readable device attributes are read-only, so used DEVICE_ATTR_RO to define them. The definitions are only used to populate the kp_attr_list attribute array, so declared them as static. Fixes the following sparse warnings: drivers/staging/kpc2000/kpc2000/core.c:152:1: warning: symbol 'dev_attr_ssid' was not declared. Should it be static? drivers/staging/kpc2000/kpc2000/core.c:153:1: warning: symbol 'dev_attr_ddna' was not declared. Should it be static? drivers/staging/kpc2000/kpc2000/core.c:154:1: warning: symbol 'dev_attr_card_id' was not declared. Should it be static? drivers/staging/kpc2000/kpc2000/core.c:155:1: warning: symbol 'dev_attr_hw_rev' was not declared. Should it be static? drivers/staging/kpc2000/kpc2000/core.c:156:1: warning: symbol 'dev_attr_build' was not declared. Should it be static? drivers/staging/kpc2000/kpc2000/core.c:157:1: warning: symbol 'dev_attr_build_date' was not declared. Should it be static? drivers/staging/kpc2000/kpc2000/core.c:158:1: warning: symbol 'dev_attr_build_time' was not declared. Should it be static? drivers/staging/kpc2000/kpc2000/core.c:159:1: warning: symbol 'dev_attr_cpld_reg' was not declared. Should it be static? drivers/staging/kpc2000/kpc2000/core.c:161:1: warning: symbol 'dev_attr_cpld_reconfigure' was not declared. Should it be static? Signed-off-by: Jeremy Sowden Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/core.c | 106 +++++++++++++++++++++++---------- 1 file changed, 73 insertions(+), 33 deletions(-) commit a986d796395c18e607703af11e1afc1d3a8a5908 Author: Jeremy Sowden Date: Tue May 21 11:35:20 2019 +0100 staging: kpc2000: added a helper to get struct kp2000_device from struct device. The attribute call-backs all use the same formula to get the pcard from dev: struct pci_dev *pdev = to_pci_dev(dev); struct kp2000_device *pcard; if (!pdev) return -ENXIO; pcard = pci_get_drvdata(pdev); if (!pcard) return -ENXIO; Added a function to reduce the duplicated code. Signed-off-by: Jeremy Sowden Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/core.c | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) commit d8ac35939632f25d6b1465a921f8a4d63064e3ae Author: Jeremy Sowden Date: Tue May 21 11:35:19 2019 +0100 staging: kpc2000: improved formatting of core.c. * Indented with tabs. * Broke lines over 80 columns where possible. * Removed braces from one-statement blocks. * Tidied up some comments. * Removed multiple blank lines. Signed-off-by: Jeremy Sowden Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/core.c | 769 ++++++++++++++++++--------------- 1 file changed, 422 insertions(+), 347 deletions(-) commit 99803f17ded0f2193e81cad9deddf318f4c34e4b Author: Hans de Goede Date: Tue May 21 21:54:12 2019 +0200 staging: rtl8723bs: Fix Coverity warning in rtw_dbg_port() Fix the following Coverity warning: File: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c in function rtw_dbg_port(): CID 18480: Operands don't affect result (CONSTANT_EXPRESSION_RESULT) dead_error_condition: The condition (extra_arg & 7U) > 7U cannot be true. if ((extra_arg & 0x07) > 0x07) padapter->driver_ampdu_spacing = 0xFF; else padapter->driver_ampdu_spacing = extra_arg; Reported-by: Colin Ian King Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b5a0c29f4b43d17c0a2110264cab787e98bd8a53 Author: Colin Ian King Date: Tue May 21 14:17:06 2019 +0100 staging: wilc1000: remove redundant masking of pkt_offset The masking update of pkg_offset is redundant as the updated value is never read and pkg_offset is re-assigned on the next iteration of the loop. Clean this up by removing the redundant assignment. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Reviewed-by: Adham Abozaeid Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_wlan.c | 3 --- 1 file changed, 3 deletions(-) commit 2411a336c8ce894e5db26ebe66a6118726b13327 Author: Sven Van Asbroeck Date: Tue May 21 14:29:32 2019 -0400 staging: fieldbus: arcx-anybus: change custom -> mmio regmap The arcx-anybus's registers are accessed via a memory-mapped IO region. A regmap associated with this region is created using custom reg_read() / reg_write() callbacks. However, an abstraction which creates a memory-mapped IO region backed regmap already exists: devm_regmap_init_mmio(). Replace the custom regmap with the existing kernel abstraction. As a pleasant side-effect, sparse warnings now disappear. Signed-off-by: Sven Van Asbroeck Signed-off-by: Greg Kroah-Hartman drivers/staging/fieldbus/anybuss/arcx-anybus.c | 44 ++++++++------------------ 1 file changed, 13 insertions(+), 31 deletions(-) commit 67436a1ecc72387feabde8c07a347261f4f14ca8 Author: Puranjay Mohan Date: Tue May 21 20:02:25 2019 +0530 Staging: rtl8188eu: core: Use !x in place of NULL comparisons Change (x == NULL) to !x and (x != NULL) to x, to fix following checkpatch.pl warnings: CHECK: Comparison to NULL could be written "!x". Signed-off-by: Puranjay Mohan Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_recv.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit fd078b420961633713032d0bfdf448281bd33e3b Author: Puranjay Mohan Date: Tue May 21 19:46:42 2019 +0530 Staging: rtl8188eu: os_dep: Replace comparison with zero to !x Change comparison to zero to !x. Replace (x == 0) to !x. Signed-off-by: Puranjay Mohan Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/os_dep/rtw_android.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3cc7037b43e5150cc0815e031683474d7fa22e32 Author: Puranjay Mohan Date: Tue May 21 19:37:11 2019 +0530 Staging: rtl8192u: ieee80211: Replace function names in strings with "%s", __func__ Use "%s", __func__ in place of strings which contain function names. Signed-off-by: Puranjay Mohan Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 07ddf0eee04963cf7f992d95a34ae6715711b976 Author: Puranjay Mohan Date: Tue May 21 19:00:12 2019 +0530 Staging: rtl8723bs: os_dep: Remove functions that don't do anything. Remove functions which just print the name of function and return 0, These functions fake the network core to say that they support these options. Signed-off-by: Puranjay Mohan Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 28 +---------------------- 1 file changed, 1 insertion(+), 27 deletions(-) commit 27b1b58fcfe72fd6b53a83b0dccb678e6b6faab8 Author: Rob Herring Date: Tue May 21 16:20:31 2019 -0500 regulator: Convert max8660 binding to json-schema Convert the max8660 binding to DT schema format using json-schema. Signed-off-by: Rob Herring Signed-off-by: Mark Brown .../devicetree/bindings/regulator/max8660.txt | 47 ------------- .../devicetree/bindings/regulator/max8660.yaml | 77 ++++++++++++++++++++++ 2 files changed, 77 insertions(+), 47 deletions(-) commit 673e401effe9dfd655f2d16588248f4c043361ce Author: Rob Herring Date: Tue May 21 16:20:30 2019 -0500 regulator: Convert gpio-regulator to json-schema Convert the gpio-regulator binding to DT schema format using json-schema. Signed-off-by: Rob Herring Signed-off-by: Mark Brown .../bindings/regulator/gpio-regulator.txt | 57 ---------- .../bindings/regulator/gpio-regulator.yaml | 118 +++++++++++++++++++++ 2 files changed, 118 insertions(+), 57 deletions(-) commit 1914a996436b09186489da73b807e1df71259f67 Author: Rob Herring Date: Tue May 21 16:20:29 2019 -0500 regulator: Convert regulator binding to json-schema Convert the common regulator binding to DT schema format. Note that all the properties with standard unit suffixes have type checks already, so only a description is necessary. As fixed-regulator has already been converted, update the references in it. Otherwise, keep regulator.txt with a reference to the schema to avoid a bunch of treewide updates. regulator.txt can be removed when all the regulator bindings are converted. Signed-off-by: Rob Herring Signed-off-by: Mark Brown .../bindings/regulator/fixed-regulator.yaml | 5 +- .../devicetree/bindings/regulator/regulator.txt | 140 +-------------- .../devicetree/bindings/regulator/regulator.yaml | 200 +++++++++++++++++++++ 3 files changed, 205 insertions(+), 140 deletions(-) commit af505208e96050aeddae77940b5a4438a7e27dcc Author: Lukas Wunner Date: Mon May 13 16:48:39 2019 +0200 spi: bcm2835: Drop assignment of dma_slave_config direction The BCM2835 SPI driver still sets the "direction" member in struct dma_slave_config even though it was deprecated five years ago with commit d9ff958bb34a ("dmaengine: Mark the struct dma_slave_config direction field deprecated") and is no longer evaluated by the BCM2835 DMA driver since commit 00648f4d0f41 ("dmaengine: bcm2835: remove dma_slave_config direction usage"). Drop the superfluous assignment. No functional change intended. Signed-off-by: Lukas Wunner Cc: Frank Pavlic Cc: Martin Sperl Cc: Noralf Trønnes Reviewed-by: Vinod Koul Signed-off-by: Mark Brown drivers/spi/spi-bcm2835.c | 2 -- 1 file changed, 2 deletions(-) commit 5f336ea53b6b4a6de313aa84e996cd1b6f23cbf0 Author: Lukas Wunner Date: Mon May 13 16:48:39 2019 +0200 spi: bcm2835: Replace spi_master by spi_controller Commit 8caab75fd2c2 ('spi: Generalize SPI "master" to "controller"') changed the "spi_master" nomenclature to "spi_controller", necessitating a conversion of all drivers. Perform this conversion for the BCM2835 SPI driver. No functional change intended. Signed-off-by: Lukas Wunner Cc: Frank Pavlic Cc: Martin Sperl Cc: Noralf Trønnes Cc: Geert Uytterhoeven Signed-off-by: Mark Brown drivers/spi/spi-bcm2835.c | 191 +++++++++++++++++++++++----------------------- 1 file changed, 96 insertions(+), 95 deletions(-) commit 97266c4d05345f9b500d10c3caa1070249e895e7 Author: Rob Herring Date: Tue May 21 16:23:25 2019 -0500 spi: dt-bindings: Convert spi-gpio binding to json-schema Convert the spi-gpio binding to DT schema format. Cc: Mark Brown Cc: Linus Walleij Cc: linux-spi@vger.kernel.org Signed-off-by: Rob Herring Signed-off-by: Mark Brown Documentation/devicetree/bindings/spi/spi-gpio.txt | 43 ------------- .../devicetree/bindings/spi/spi-gpio.yaml | 72 ++++++++++++++++++++++ 2 files changed, 72 insertions(+), 43 deletions(-) commit 3917da94f787e6c907e440653ead0c666a71379e Author: Takashi Iwai Date: Tue May 21 08:26:53 2019 +0200 ASoC: Intel: Add machine driver for CX2072X on BYT/CHT platforms This is an implementation of a machine driver needed for Conexant CX2072X codec on Intel Baytrail and Cherrytrail platforms. The current patch is based on the initial work by Pierre-Louis Bossart and the other Intel machine drivers. The jack detection support (driven via the standard GPIO) was added on top of the original work. Tested with ASUS E200HA laptop. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=115531 Acked-by: Pierre-Louis Bossart Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown sound/soc/intel/boards/Kconfig | 11 + sound/soc/intel/boards/Makefile | 2 + sound/soc/intel/boards/bytcht_cx2072x.c | 262 ++++++++++++++++++++++ sound/soc/intel/common/soc-acpi-intel-byt-match.c | 8 + sound/soc/intel/common/soc-acpi-intel-cht-match.c | 8 + 5 files changed, 291 insertions(+) commit a497a4363706b3eb208c64e66e5b485bb3b186ac Author: Simon Ho Date: Tue May 21 08:26:52 2019 +0200 ASoC: Add support for Conexant CX2072X CODEC Initial commit of the Conexant CX2072X CODEC driver. Some features are not present. The CX2072X is a ultra low power stereo audio codec supports I2S/TDM host interface with EQ, DRC features in playback mode. Featues of CX2072X codec: * Two 24 bits DACs and DACs. * Stereo Headphone AMP. * 2.8W per channel class-D output. * Integrated seven bands per channel EQ and DRC. * Fully integrated headset support with detect/switch. * Stereo digital microphone for array applications. * S/PDIF output. * Bi-directional GPIOs. * Support analog and digital PC Beeep. * One headset button support. * Supports a wide variety of host interfaces. -wide variety of I2S and similar bit-stream formats with word lengths of up to 24 bits. -TDM stream supports up to 4 channels. * AEC loopback support. Further fixes by tiwai: * Rebase to 5.2+ * Missing DAPM entry definitions * Missing power hooks * Fix uninitialized variable warning * Rewrite jack detection stuff to use set_jack callback * Plumbing jack detection code for Intel ASoC * Move clk management into runtime PM * Drop incorrect regcache usages * Drop untested stuff: OF table, EQ/DRC handling * Lots of code cleanups and minor refactoring The OF code was dropped due to the lack of testability. It should be easy to re-add once if someone can test it. v1->v2: No change v2->v3: Move register tables to appropriate place Remove some confusing codes Set snd_ctl_boolean_* helpers directly Fix EQ put callback Rename to "DAC1 Switch" from "DAC1 Mute Switch" Drop superfluous regmap calls at shutdown Avoid regmap_register_patch() Add missing register definitions Fix register access on big-endian machine Remove regcache messes v3->v4: Fix the wrong endianess conversion in reg write Minor code cleanups v4->v5: Move clk management to runtime PM Sparse warning fixes Some more code simplification Drop tricky regcache fiddling Apply mutex locks around possible racy sequences Move exported jack detection stuff into set_jack callback v5->v6: Drop buggy&untested EQ and DRC codes Lots of code reduction/cleanup Add more comments about platform-specific stuff Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=115531 Signed-off-by: Simon Ho Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown sound/soc/codecs/Kconfig | 7 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/cx2072x.c | 1727 ++++++++++++++++++++++++++++++++++++++++++++ sound/soc/codecs/cx2072x.h | 314 ++++++++ 4 files changed, 2050 insertions(+) commit 0c7b178ad7eb68734feb21e4cfba9ea398f22668 Author: Sam Ravnborg Date: Sun May 19 21:55:26 2019 +0200 drm/gma500: drop drmp.h include from all .c files Drop remaining uses of the deprecated drmP.h in gma500 Replaced drmp.h with forward declarations or include files as relevant. Moved all include files to blocks in following order: \#include \#include \#include \#include "" And within each block sort the include files alphabetically. Signed-off-by: Sam Ravnborg Cc: Patrik Jakobsson Cc: David Airlie Cc: Daniel Vetter Acked-by: Daniel Vetter Signed-off-by: Patrik Jakobsson Link: https://patchwork.freedesktop.org/patch/msgid/20190519195526.3422-6-sam@ravnborg.org drivers/gpu/drm/gma500/accel_2d.c | 18 +++++++-------- drivers/gpu/drm/gma500/cdv_device.c | 11 +++++---- drivers/gpu/drm/gma500/cdv_intel_crt.c | 8 +++---- drivers/gpu/drm/gma500/cdv_intel_display.c | 10 ++++---- drivers/gpu/drm/gma500/cdv_intel_dp.c | 9 ++++---- drivers/gpu/drm/gma500/cdv_intel_hdmi.c | 9 ++++---- drivers/gpu/drm/gma500/cdv_intel_lvds.c | 9 ++++---- drivers/gpu/drm/gma500/framebuffer.c | 24 +++++++++---------- drivers/gpu/drm/gma500/gem.c | 3 ++- drivers/gpu/drm/gma500/gma_device.c | 1 - drivers/gpu/drm/gma500/gma_display.c | 12 +++++++--- drivers/gpu/drm/gma500/gtt.c | 5 ++-- drivers/gpu/drm/gma500/intel_bios.c | 3 +-- drivers/gpu/drm/gma500/intel_gmbus.c | 9 ++++---- drivers/gpu/drm/gma500/intel_i2c.c | 1 + drivers/gpu/drm/gma500/mdfld_device.c | 10 ++++---- drivers/gpu/drm/gma500/mdfld_dsi_dpi.c | 2 +- drivers/gpu/drm/gma500/mdfld_dsi_output.c | 7 +++--- drivers/gpu/drm/gma500/mdfld_dsi_output.h | 6 ++--- drivers/gpu/drm/gma500/mdfld_dsi_pkg_sender.c | 2 +- drivers/gpu/drm/gma500/mdfld_intel_display.c | 11 +++++---- drivers/gpu/drm/gma500/mid_bios.c | 3 +-- drivers/gpu/drm/gma500/mmu.c | 6 +++-- drivers/gpu/drm/gma500/oaktrail_crtc.c | 8 ++++--- drivers/gpu/drm/gma500/oaktrail_device.c | 16 +++++++------ drivers/gpu/drm/gma500/oaktrail_hdmi.c | 6 +++-- drivers/gpu/drm/gma500/oaktrail_lvds.c | 6 ++--- drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c | 11 ++++----- drivers/gpu/drm/gma500/psb_device.c | 10 ++++---- drivers/gpu/drm/gma500/psb_drv.c | 33 +++++++++++++++++---------- drivers/gpu/drm/gma500/psb_drv.h | 12 +++++----- drivers/gpu/drm/gma500/psb_intel_display.c | 7 +++--- drivers/gpu/drm/gma500/psb_intel_lvds.c | 5 ++-- drivers/gpu/drm/gma500/psb_intel_modes.c | 2 +- drivers/gpu/drm/gma500/psb_intel_sdvo.c | 13 ++++++----- drivers/gpu/drm/gma500/psb_irq.c | 9 ++++---- drivers/gpu/drm/gma500/psb_lid.c | 6 ++--- drivers/gpu/drm/gma500/tc35876x-dsi-lvds.c | 5 ++-- 38 files changed, 181 insertions(+), 147 deletions(-) commit bc9f100783b9a849adfb6b9b6adb0a1332583f96 Author: Sam Ravnborg Date: Sun May 19 21:55:25 2019 +0200 drm/gma500: drop use of DRM_UDELAY wrapper The DRM_UDELAY wrapper from drm_os_linux.h is used in a few places, all other places calls udelay() with no wrapper. There is no reason to continue to use this wrapper - so drop it and direct call udelay(). Signed-off-by: Sam Ravnborg Cc: Patrik Jakobsson Cc: David Airlie Cc: Daniel Vetter Acked-by: Daniel Vetter Signed-off-by: Patrik Jakobsson Link: https://patchwork.freedesktop.org/patch/msgid/20190519195526.3422-5-sam@ravnborg.org drivers/gpu/drm/gma500/mdfld_device.c | 4 ++-- drivers/gpu/drm/gma500/oaktrail_device.c | 2 +- drivers/gpu/drm/gma500/oaktrail_hdmi.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 5ffa31ed4e122fe5020fa1fa1fc486747c25705e Author: Sam Ravnborg Date: Sun May 19 21:55:24 2019 +0200 drm/gma500: make local header files more self-contained Add proper forward declarations to minimize dependencies on other header files. Just add enough that we can safely include all header files in alphabetically order in relevant files. Signed-off-by: Sam Ravnborg Cc: Patrik Jakobsson Cc: David Airlie Cc: Daniel Vetter Acked-by: Daniel Vetter Signed-off-by: Patrik Jakobsson Link: https://patchwork.freedesktop.org/patch/msgid/20190519195526.3422-4-sam@ravnborg.org drivers/gpu/drm/gma500/blitter.h | 2 ++ drivers/gpu/drm/gma500/cdv_device.h | 4 ++++ drivers/gpu/drm/gma500/gma_device.h | 1 + drivers/gpu/drm/gma500/gma_display.h | 3 +++ drivers/gpu/drm/gma500/mid_bios.h | 1 + drivers/gpu/drm/gma500/oaktrail.h | 2 ++ 6 files changed, 13 insertions(+) commit 514743357f5a26cad4a15a336066cca56592151d Author: Sam Ravnborg Date: Sun May 19 21:55:23 2019 +0200 drm/gma500: drop drmP.h from header files Drop use of drmp.h from all header files in drm/gma500. Fix fallout in all files. In some cases moved include lines and sorted them too. With drmP.h removed from all header files it can now be removed from each .c file without any further dependencies Signed-off-by: Sam Ravnborg Cc: Patrik Jakobsson Cc: David Airlie Cc: Daniel Vetter Acked-by: Daniel Vetter Signed-off-by: Patrik Jakobsson Link: https://patchwork.freedesktop.org/patch/msgid/20190519195526.3422-3-sam@ravnborg.org drivers/gpu/drm/gma500/framebuffer.h | 1 - drivers/gpu/drm/gma500/gtt.h | 1 - drivers/gpu/drm/gma500/intel_bios.c | 1 + drivers/gpu/drm/gma500/intel_bios.h | 3 +-- drivers/gpu/drm/gma500/intel_i2c.c | 3 ++- drivers/gpu/drm/gma500/mdfld_device.c | 2 ++ drivers/gpu/drm/gma500/mdfld_dsi_dpi.c | 2 ++ drivers/gpu/drm/gma500/mdfld_dsi_output.c | 5 +++-- drivers/gpu/drm/gma500/mdfld_dsi_output.h | 2 +- drivers/gpu/drm/gma500/mdfld_dsi_pkg_sender.c | 2 ++ drivers/gpu/drm/gma500/mdfld_tmd_vid.c | 2 ++ drivers/gpu/drm/gma500/power.h | 4 +++- drivers/gpu/drm/gma500/psb_drv.h | 2 +- drivers/gpu/drm/gma500/psb_irq.h | 2 +- drivers/gpu/drm/gma500/tc35876x-dsi-lvds.c | 8 +++++--- 15 files changed, 26 insertions(+), 14 deletions(-) commit d825c565304f33d5f717a35f74d5109ff4820cae Author: Sam Ravnborg Date: Sun May 19 21:55:22 2019 +0200 drm/gma500: remove empty gma_drm.h header file The header file gma_drm.h is empty so remove it and drop all uses of the file. Signed-off-by: Sam Ravnborg Cc: Patrik Jakobsson Cc: David Airlie Cc: Daniel Vetter Acked-by: Daniel Vetter Signed-off-by: Patrik Jakobsson Link: https://patchwork.freedesktop.org/patch/msgid/20190519195526.3422-2-sam@ravnborg.org drivers/gpu/drm/gma500/cdv_device.c | 2 +- drivers/gpu/drm/gma500/gem.c | 2 +- drivers/gpu/drm/gma500/intel_bios.c | 2 +- drivers/gpu/drm/gma500/intel_gmbus.c | 2 +- drivers/gpu/drm/gma500/mid_bios.c | 2 +- drivers/gpu/drm/gma500/oaktrail_device.c | 2 +- drivers/gpu/drm/gma500/psb_device.c | 2 +- drivers/gpu/drm/gma500/psb_drv.h | 2 +- drivers/gpu/drm/gma500/psb_intel_sdvo.c | 2 +- include/drm/gma_drm.h | 25 ------------------------- 10 files changed, 9 insertions(+), 34 deletions(-) commit ceb02dcf676f41d281af84c9d6000fe27651ebb0 Author: Linus Walleij Date: Tue May 21 03:21:37 2019 +0200 ARM: delete netx machine After discussing with the subarch maintainers and Hilscher, we concluded that the netx subarchitecture (Netx 100/500) is no longer maintained or tested, and noone will miss it if we delete it. So delete it. There is a newer Netx 4000 architecture which we may see included at some point, but this will be supported using the standard multiplatform and devicetree mechanisms and is easier to develop from scratch. Cc: Michael Trensch Acked-By: Robert Schwebel Acked-by: Sascha Hauer Signed-off-by: Linus Walleij arch/arm/Kconfig | 11 - arch/arm/Kconfig.debug | 7 - arch/arm/Makefile | 1 - arch/arm/configs/netx_defconfig | 80 ----- arch/arm/include/debug/netx.S | 36 --- arch/arm/mach-netx/Kconfig | 21 -- arch/arm/mach-netx/Makefile | 12 - arch/arm/mach-netx/Makefile.boot | 2 - arch/arm/mach-netx/fb.c | 77 ----- arch/arm/mach-netx/fb.h | 24 -- arch/arm/mach-netx/generic.c | 194 ------------ arch/arm/mach-netx/generic.h | 26 -- arch/arm/mach-netx/include/mach/hardware.h | 39 --- arch/arm/mach-netx/include/mach/irqs.h | 70 ----- arch/arm/mach-netx/include/mach/netx-regs.h | 432 --------------------------- arch/arm/mach-netx/include/mach/pfifo.h | 54 ---- arch/arm/mach-netx/include/mach/uncompress.h | 75 ----- arch/arm/mach-netx/include/mach/xc.h | 42 --- arch/arm/mach-netx/nxdb500.c | 209 ------------- arch/arm/mach-netx/nxdkn.c | 102 ------- arch/arm/mach-netx/nxeb500hmi.c | 186 ------------ arch/arm/mach-netx/pfifo.c | 68 ----- arch/arm/mach-netx/time.c | 153 ---------- arch/arm/mach-netx/xc.c | 258 ---------------- 24 files changed, 2179 deletions(-) commit a96a8a576bf5cc45534d0079d7006fc3fe25282b Author: Colin Ian King Date: Fri May 10 14:17:22 2019 +0100 HID: logitech-hidpp: HID: make const array consumer_rdesc_start static Don't populate the array consumer_rdesc_start on the stack but instead make it static. Makes the object code smaller by 88 bytes. Before: text data bss dec hex filename 59155 9840 448 69443 10f43 drivers/hid/hid-logitech-hidpp.o After: text data bss dec hex filename 59003 9904 448 69355 10eeb drivers/hid/hid-logitech-hidpp.o (gcc version 8.3.0, amd64) Signed-off-by: Colin Ian King Signed-off-by: Jiri Kosina drivers/hid/hid-logitech-hidpp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 39d21e7e004340417395884979882e5d749a6157 Author: Colin Ian King Date: Fri May 10 14:10:39 2019 +0100 HID: logitech-dj: make const array template static Don't populate the array template on the stack but instead make it static. Makes the object code smaller by 10 bytes. Also reformat the declaration. Before: text data bss dec hex filename 29376 9360 128 38864 97d0 drivers/hid/hid-logitech-dj.o After: text data bss dec hex filename 29270 9456 128 38854 97c6 drivers/hid/hid-logitech-dj.o (gcc version 8.3.0, amd64) Signed-off-by: Colin Ian King Signed-off-by: Jiri Kosina drivers/hid/hid-logitech-dj.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 9977e5b43776fd0f6cc62c29b4b7ade16bfdf649 Author: Thomas Zimmermann Date: Tue May 21 13:08:31 2019 +0200 drm: Assert that BO is locked in drm_gem_vram_{pin, unpin}_locked() We may not call drm_gem_vram_{pin,unpin}_locked() with an unlocked BO. Now test for this. Signed-off-by: Thomas Zimmermann Acked-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20190521110831.20200-4-tzimmermann@suse.de Signed-off-by: Gerd Hoffmann drivers/gpu/drm/drm_gem_vram_helper.c | 4 ++++ 1 file changed, 4 insertions(+) commit cb1f8814bbfcc2d0d7c499530e3d878ba04e4af2 Author: Thomas Zimmermann Date: Tue May 21 13:08:30 2019 +0200 drm: Rename reserve/unreserve to lock/unlock in GEM VRAM helpers To align with the rest of DRM terminology, the GEM VRAM helpers now use lock and unlock in places where reserve and unreserve where used before. All callers have been adapted. Signed-off-by: Thomas Zimmermann Acked-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20190521110831.20200-3-tzimmermann@suse.de Signed-off-by: Gerd Hoffmann drivers/gpu/drm/ast/ast_fb.c | 11 ++++----- drivers/gpu/drm/ast/ast_mode.c | 12 +++++----- drivers/gpu/drm/drm_gem_vram_helper.c | 32 ++++++++++++------------- drivers/gpu/drm/mgag200/mgag200_cursor.c | 40 ++++++++++++++++---------------- drivers/gpu/drm/mgag200/mgag200_fb.c | 11 ++++----- include/drm/drm_gem_vram_helper.h | 8 +++---- 6 files changed, 56 insertions(+), 58 deletions(-) commit 81da87f63a1edebcf8cbb811d387e353d9f89c7a Author: Thomas Zimmermann Date: Tue May 21 13:08:29 2019 +0200 drm: Replace drm_gem_vram_push_to_system() with kunmap + unpin The push-to-system function forces a buffer out of video RAM. This decision should rather be made by the memory manager. By replacing the function with calls to the kunmap and unpin functions, the buffer's memory becomes available, but the buffer remains in VRAM until it's evicted by a pin operation. This patch replaces the remaining instances of drm_gem_vram_push_to_system() in ast and mgag200, and removes the function from DRM. Signed-off-by: Thomas Zimmermann Acked-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20190521110831.20200-2-tzimmermann@suse.de Signed-off-by: Gerd Hoffmann drivers/gpu/drm/ast/ast_mode.c | 14 ++++++--- drivers/gpu/drm/drm_gem_vram_helper.c | 50 -------------------------------- drivers/gpu/drm/drm_vram_helper_common.c | 2 -- drivers/gpu/drm/mgag200/mgag200_mode.c | 15 ++++++---- include/drm/drm_gem_vram_helper.h | 1 - 5 files changed, 20 insertions(+), 62 deletions(-) commit 26cd1e5850b70b4ee4a652e5246a356060ea852c Author: Takashi Sakamoto Date: Tue May 21 23:57:37 2019 +0900 ALSA: firewire-lib: use IT context header to compute cycle count for scheduling packet In IT context, header includes information of cycle to have processed queued packet. This commit uses the per-packet information to compute the cycle for packet to be queued, instead of callback argument. In current implementaion of ALSA IEC 61883-1/6 packet streaming engine, 48 packets are queued at first to skip recent cycle. When IT context calls handler, cycle information in header plus 48 cycle means the cycle to be going to queue packet. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/amdtp-stream.c | 51 ++++++++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 23 deletions(-) commit df9160b9149912a8b23b3a846313656d66cfacb8 Author: Takashi Sakamoto Date: Tue May 21 23:57:36 2019 +0900 ALSA: firewire-lib: obsolete macro for header of IT context The header size parameter of 1394 OHCI IT context has no effect. Besides the header size of queued packet is different from context header. This commit cleans codes relevant to these two headers. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/amdtp-stream.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit fce9b013fee94ded75624edebf28c8f3506b16cc Author: Takashi Sakamoto Date: Tue May 21 23:57:35 2019 +0900 ALSA: firewire-lib: add helper function to cancel context inner callback handler In callback handler of isochronous context for both direction, there're common codes to cancel context. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/amdtp-stream.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit d3d10a4a1b1950c2d20714c2511b5f58c99bab81 Author: Takashi Sakamoto Date: Tue May 21 23:57:34 2019 +0900 ALSA: firewire-lib: use union for directional parameters Some parameters of struct amdtp_stream is dependent on direction. This commit uses union for such parameters to distinguish from common parameters. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/amdtp-am824.c | 2 +- sound/firewire/amdtp-stream.c | 97 +++++++++++++++++------------ sound/firewire/amdtp-stream.h | 35 ++++++++--- sound/firewire/digi00x/amdtp-dot.c | 2 +- sound/firewire/fireworks/fireworks_stream.c | 4 +- sound/firewire/motu/amdtp-motu.c | 2 +- sound/firewire/tascam/amdtp-tascam.c | 2 +- 7 files changed, 87 insertions(+), 57 deletions(-) commit cbe3e1d103793705204b29c6952faed537c41fe1 Author: Tvrtko Ursulin Date: Mon May 20 12:04:42 2019 +0100 drm/i915/icl: Add WaDisableBankHangMode Disable GPU hang by default on unrecoverable ECC cache errors. v2: * Rebase. v3: * Use intel_uncore_read. (Chris) Fixes: cc38cae7c4e9 ("drm/i915/icl: Introduce initial Icelake Workarounds") Signed-off-by: Tvrtko Ursulin Acked-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190520110442.403-2-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/gt/intel_workarounds.c | 6 ++++++ drivers/gpu/drm/i915/i915_reg.h | 3 +++ 2 files changed, 9 insertions(+) commit fde938867b92607d1108fa42cf7fbfcbab8457c8 Author: Tvrtko Ursulin Date: Mon May 20 15:25:46 2019 +0100 drm/i915/selftests: Verify context workarounds Test context workarounds have been correctly applied in newly created contexts. To accomplish this the existing engine_wa_list_verify helper is extended to take in a context from which reading of the workaround list will be done. Context workaround verification is done from the existing subtests, which have been renamed to reflect they are no longer only about GT and engine workarounds. v2: * Test after resets and refactor to use intel_context more. (Chris) v3: * Use ce->engine->i915 instead of ce->gem_context->i915. (Chris) * gem_engine_iter.idx is engine->id + 1. (Chris) v4: * Make local function static. Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190520142546.12493-1-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/gt/intel_workarounds.c | 112 +++++++++++++------------ drivers/gpu/drm/i915/gt/selftest_workarounds.c | 54 ++++++++---- 2 files changed, 98 insertions(+), 68 deletions(-) commit c87efcc3d1dfdf3f5ecb6558521825a21838dc30 Author: Matthias Kaehlcke Date: Mon May 20 15:00:51 2019 -0700 ARM: dts: rockchip: Configure the GPU thermal zone for mickey mickey crams a lot of hardware into a tiny package, which requires more aggressive thermal throttling than for devices with a larger footprint. Configure the GPU thermal zone to throttle the GPU progressively at temperatures >= 60°C. Heat dissipated by the CPUs also affects the GPU temperature, hence we cap the CPU frequency to 1.4 GHz for temperatures above 65°C. Further throttling of the CPUs may be performed by the CPU thermal zone. The configuration matches that of the downstream Chrome OS 3.14 kernel, the 'official' kernel for mickey. Signed-off-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288-veyron-mickey.dts | 67 ++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) commit 11983d8530e3d4e9cdd9e5cb7c23611adaf67c73 Author: Matthias Kaehlcke Date: Mon May 20 15:00:50 2019 -0700 ARM: dts: rockchip: Use the GPU to cool CPU thermal zone of veyron mickey On rk3288 the CPU and GPU temperatures are correlated. Limit the GPU frequency on veyron mickey to 400 MHz for CPU temperatures >= 65°C and to 300 MHz for CPU temperatures >= 85°C. This matches the configuration of the downstream Chrome OS 3.14 kernel, the 'official' kernel for mickey. Signed-off-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288-veyron-mickey.dts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 75481833c6dbab4c29d15452f6b4337c16f5407b Author: Matthias Kaehlcke Date: Mon May 20 15:00:49 2019 -0700 ARM: dts: rockchip: remove GPU 500 MHz OPP on rk3288 The NPLL is the only safe way to generate 500 MHz for the GPU. The downstream Chrome OS 3.14 kernel ('official' kernel for veyron devices) re-purposes NPLL to HDMI and hence disables the OPP for the GPU (see https://crrev.com/c/1574579). Disable it here as well to keep in sync and avoid problems in case someone decides to re-purpose NPLL. Signed-off-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson [moved from veyron to general rk3288, as tying up the NPLL for a not-that-helpful opp (not really fast but will still generate quite a bit of heat) doesn't make so much sense when it will keep us from supporting other display modes in the future] Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288.dtsi | 4 ---- 1 file changed, 4 deletions(-) commit ae2b6ba865d8bb59493aaf50cb3d19312a6ff5a4 Author: Matthias Kaehlcke Date: Thu May 16 10:25:10 2019 -0700 ARM: dts: rockchip: Use GPU as cooling device for the GPU thermal zone of the rk3288 Currently the CPUs are used as cooling devices of the rk3288 GPU thermal zone. The CPUs are also configured as cooling devices in the CPU thermal zone, which indirectly helps with cooling the GPU thermal zone, since the CPU and GPU temperatures are correlated on the rk3288. Configure the ARM Mali Midgard GPU as cooling device for the GPU thermal zone instead of the CPUs. Signed-off-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288.dtsi | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 3d6c33cb904dae4b1a9bf89725fcf38daa7fa0e1 Author: Anson Huang Date: Wed May 15 01:09:30 2019 +0000 clk: imx8mq: add SNVS clock to clock tree i.MX8MQ has clock gate for SNVS module, add it into clock tree for SNVS RTC driver to manage. Signed-off-by: Anson Huang Reviewed-by: Leonard Crestez Signed-off-by: Shawn Guo drivers/clk/imx/clk-imx8mq.c | 1 + 1 file changed, 1 insertion(+) commit f6dcbb3ad5ce927adbdcc04bde312387f3b68035 Author: Matthias Kaehlcke Date: Thu May 16 10:25:09 2019 -0700 ARM: dts: rockchip: Add #cooling-cells entry for rk3288 GPU The Mali GPU of the rk3288 can be used as cooling device, add a #cooling-cells entry for it. Signed-off-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288.dtsi | 1 + 1 file changed, 1 insertion(+) commit 4ef69160b3ed62379ef853c512d3785bf2ea57e6 Author: Anson Huang Date: Wed May 15 01:09:24 2019 +0000 dt-bindings: clock: imx8mq: Add SNVS clock Add macro for the SNVS clock of the i.MX8MQ. Signed-off-by: Anson Huang Reviewed-by: Leonard Crestez Signed-off-by: Shawn Guo include/dt-bindings/clock/imx8mq-clock.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 982c0500fd1a8012c31d3c9dd8de285129904656 Author: Matthias Kaehlcke Date: Thu May 16 10:25:08 2019 -0700 dt-bindings: gpu: add #cooling-cells property to the ARM Mali Midgard GPU binding The GPU can be used as a thermal cooling device, add an optional '#cooling-cells' property. Signed-off-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20190516172510.181473-1-mka@chromium.org Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt | 3 +++ 1 file changed, 3 insertions(+) commit 8ef1ba39a9fa53d2205e633bc9b21840a275908e Author: Douglas Anderson Date: Tue May 21 16:49:33 2019 -0700 ARM: dts: rockchip: Mark that the rk3288 timer might stop in suspend This is similar to commit e6186820a745 ("arm64: dts: rockchip: Arch counter doesn't tick in system suspend"). Specifically on the rk3288 it can be seen that the timer stops ticking in suspend if we end up running through the "osc_disable" path in rk3288_slp_mode_set(). In that path the 24 MHz clock will turn off and the timer stops. To test this, I ran this on a Chrome OS filesystem: before=$(date); \ suspend_stress_test -c1 --suspend_min=30 --suspend_max=31; \ echo ${before}; date ...and I found that unless I plug in a device that requests USB wakeup to be active that the two calls to "date" would show that fewer than 30 seconds passed. NOTE: deep suspend (where the 24 MHz clock gets disabled) isn't supported yet on upstream Linux so this was tested on a downstream kernel. Signed-off-by: Douglas Anderson Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288.dtsi | 1 + 1 file changed, 1 insertion(+) commit 0ca87bd5baa62e5734800ee63e3a6301c90e8613 Author: Douglas Anderson Date: Tue May 21 13:32:15 2019 -0700 ARM: dts: rockchip: Add pin names for rk3288-veyron-jerry This is like the same change for rk3288-veyron-minnie. See that patch for more details. Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288-veyron-jerry.dts | 207 ++++++++++++++++++++++++++++++ 1 file changed, 207 insertions(+) commit ca3516b32cd9e483685f6de5c9433d4913879f7e Author: Douglas Anderson Date: Tue May 21 13:32:14 2019 -0700 ARM: dts: rockchip: Add pin names for rk3288-veyron-minnie We can now use the "gpio-line-names" property to provide the names for all the pins on a board. Let's use this to provide the names for all the pins on rk3288-veyron-minnie. In general the names here come straight from the schematic. That means even if the schematic name is weird / doesn't have consistent naming conventions / has typos I still haven't made any changes. The exception here is for two pins: the recovery switch and the write protect detection pin. These two pins need to have standardized names since crossystem (a Chrome OS tool) uses these names to query the pins. In downstream kernels crossystem used an out-of-tree driver to do this but it has now been moved to the gpiod API and needs the standardized names. It's expected that other rk3288-veyron boards will get similar patches shortly. NOTE: I have sorted the "gpio" section to be next to the "pinctrl" section since it seems to logically make the most sense there. Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288-veyron-minnie.dts | 212 +++++++++++++++++++++++++++++ 1 file changed, 212 insertions(+) commit a88b6e4cbafd6f23b3450c087acdbe23d90e7606 Author: Chris Wilson Date: Tue May 21 22:11:34 2019 +0100 drm/i915: Allow specification of parallel execbuf There is a desire to split a task onto two engines and have them run at the same time, e.g. scanline interleaving to spread the workload evenly. Through the use of the out-fence from the first execbuf, we can coordinate secondary execbuf to only become ready simultaneously with the first, so that with all things idle the second execbufs are executed in parallel with the first. The key difference here between the new EXEC_FENCE_SUBMIT and the existing EXEC_FENCE_IN is that the in-fence waits for the completion of the first request (so that all of its rendering results are visible to the second execbuf, the more common userspace fence requirement). Since we only have a single input fence slot, userspace cannot mix an in-fence and a submit-fence. It has to use one or the other! This is not such a harsh requirement, since by virtue of the submit-fence, the secondary execbuf inherit all of the dependencies from the first request, and for the application the dependencies should be common between the primary and secondary execbuf. Suggested-by: Tvrtko Ursulin Testcase: igt/gem_exec_fence/parallel Link: https://github.com/intel/media-driver/pull/546 Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190521211134.16117-10-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.c | 1 + drivers/gpu/drm/i915/i915_gem_execbuffer.c | 25 ++++++++++++++++++++++++- include/uapi/drm/i915_drm.h | 17 ++++++++++++++++- 3 files changed, 41 insertions(+), 2 deletions(-) commit ee1136908e9b28173f9794be25465a13b2bb9b18 Author: Chris Wilson Date: Tue May 21 22:11:33 2019 +0100 drm/i915/execlists: Virtual engine bonding Some users require that when a master batch is executed on one particular engine, a companion batch is run simultaneously on a specific slave engine. For this purpose, we introduce virtual engine bonding, allowing maps of master:slaves to be constructed to constrain which physical engines a virtual engine may select given a fence on a master engine. For the moment, we continue to ignore the issue of preemption deferring the master request for later. Ideally, we would like to then also remove the slave and run something else rather than have it stall the pipeline. With load balancing, we should be able to move workload around it, but there is a similar stall on the master pipeline while it may wait for the slave to be executed. At the cost of more latency for the bonded request, it may be interesting to launch both on their engines in lockstep. (Bubbles abound.) Opens: Also what about bonding an engine as its own master? It doesn't break anything internally, so allow the silliness. v2: Emancipate the bonds v3: Couple in delayed scheduling for the selftests v4: Handle invalid mutually exclusive bonding v5: Mention what the uapi does v6: s/nbond/num_bonds/ Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190521211134.16117-9-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gt/intel_engine_types.h | 7 + drivers/gpu/drm/i915/gt/intel_lrc.c | 98 +++++++++++++ drivers/gpu/drm/i915/gt/intel_lrc.h | 4 + drivers/gpu/drm/i915/gt/selftest_lrc.c | 191 ++++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_gem_context.c | 84 +++++++++++ drivers/gpu/drm/i915/selftests/lib_sw_fence.c | 3 + include/uapi/drm/i915_drm.h | 44 ++++++ 7 files changed, 431 insertions(+) commit f71e01a78bee1c93dbadbc0b6a11d7bd74237fa1 Author: Chris Wilson Date: Tue May 21 22:11:32 2019 +0100 drm/i915: Extend execution fence to support a callback In the next patch, we will want to configure the slave request depending on which physical engine the master request is executed on. For this, we introduce a callback from the execute fence to convey this information. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190521211134.16117-8-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_request.c | 84 ++++++++++++++++++++++++++++++++++--- drivers/gpu/drm/i915/i915_request.h | 4 ++ 2 files changed, 83 insertions(+), 5 deletions(-) commit 78e41ddd219822a5f42948eb6c6c6cae14c80181 Author: Chris Wilson Date: Tue May 21 22:11:31 2019 +0100 drm/i915: Apply an execution_mask to the virtual_engine Allow the user to direct which physical engines of the virtual engine they wish to execute one, as sometimes it is necessary to override the load balancing algorithm. v2: Only kick the virtual engines on context-out if required Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190521211134.16117-7-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gt/intel_lrc.c | 67 +++++++++++++++++ drivers/gpu/drm/i915/gt/selftest_lrc.c | 131 +++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_request.c | 1 + drivers/gpu/drm/i915/i915_request.h | 3 + 4 files changed, 202 insertions(+) commit 6d06779e86724322d79eb53b26989edd9db188f6 Author: Chris Wilson Date: Tue May 21 22:11:30 2019 +0100 drm/i915: Load balancing across a virtual engine Having allowed the user to define a set of engines that they will want to only use, we go one step further and allow them to bind those engines into a single virtual instance. Submitting a batch to the virtual engine will then forward it to any one of the set in a manner as best to distribute load. The virtual engine has a single timeline across all engines (it operates as a single queue), so it is not able to concurrently run batches across multiple engines by itself; that is left up to the user to submit multiple concurrent batches to multiple queues. Multiple users will be load balanced across the system. The mechanism used for load balancing in this patch is a late greedy balancer. When a request is ready for execution, it is added to each engine's queue, and when an engine is ready for its next request it claims it from the virtual engine. The first engine to do so, wins, i.e. the request is executed at the earliest opportunity (idle moment) in the system. As not all HW is created equal, the user is still able to skip the virtual engine and execute the batch on a specific engine, all within the same queue. It will then be executed in order on the correct engine, with execution on other virtual engines being moved away due to the load detection. A couple of areas for potential improvement left! - The virtual engine always take priority over equal-priority tasks. Mostly broken up by applying FQ_CODEL rules for prioritising new clients, and hopefully the virtual and real engines are not then congested (i.e. all work is via virtual engines, or all work is to the real engine). - We require the breadcrumb irq around every virtual engine request. For normal engines, we eliminate the need for the slow round trip via interrupt by using the submit fence and queueing in order. For virtual engines, we have to allow any job to transfer to a new ring, and cannot coalesce the submissions, so require the completion fence instead, forcing the persistent use of interrupts. - We only drip feed single requests through each virtual engine and onto the physical engines, even if there was enough work to fill all ELSP, leaving small stalls with an idle CS event at the end of every request. Could we be greedy and fill both slots? Being lazy is virtuous for load distribution on less-than-full workloads though. Other areas of improvement are more general, such as reducing lock contention, reducing dispatch overhead, looking at direct submission rather than bouncing around tasklets etc. sseu: Lift the restriction to allow sseu to be reconfigured on virtual engines composed of RENDER_CLASS (rcs). v2: macroize check_user_mbz() v3: Cancel virtual engines on wedging v4: Commence commenting v5: Replace 64b sibling_mask with a list of class:instance v6: Drop the one-element array in the uabi v7: Assert it is an virtual engine in to_virtual_engine() v8: Skip over holes in [class][inst] so we can selftest with (vcs0, vcs2) Link: https://github.com/intel/media-driver/pull/283 Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190521211134.16117-6-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gt/intel_engine_types.h | 8 + drivers/gpu/drm/i915/gt/intel_lrc.c | 680 ++++++++++++++++++++++++++- drivers/gpu/drm/i915/gt/intel_lrc.h | 9 + drivers/gpu/drm/i915/gt/selftest_lrc.c | 180 +++++++ drivers/gpu/drm/i915/i915_gem.h | 5 + drivers/gpu/drm/i915/i915_gem_context.c | 116 ++++- drivers/gpu/drm/i915/i915_scheduler.c | 19 +- drivers/gpu/drm/i915/i915_timeline_types.h | 1 + include/uapi/drm/i915_drm.h | 39 ++ 9 files changed, 1029 insertions(+), 28 deletions(-) commit b81dde719439c8f09bb61e742ed95bfc4b33946b Author: Chris Wilson Date: Tue May 21 22:11:29 2019 +0100 drm/i915: Allow userspace to clone contexts on creation A usecase arose out of handling context recovery in mesa, whereby they wish to recreate a context with fresh logical state but preserving all other details of the original. Currently, they create a new context and iterate over which bits they want to copy across, but it would much more convenient if they were able to just pass in a target context to clone during creation. This essentially extends the setparam during creation to pull the details from a target context instead of the user supplied parameters. The ideal here is that we don't expose control over anything more than can be obtained via CONTEXT_PARAM. That is userspace retains explicit control over all features, and this api is just convenience. For example, you could replace struct context_param p = { .param = CONTEXT_PARAM_VM }; param.ctx_id = old_id; gem_context_get_param(&p.param); new_id = gem_context_create(); param.ctx_id = new_id; gem_context_set_param(&p.param); gem_vm_destroy(param.value); /* drop the ref to VM_ID handle */ with struct create_ext_param p = { { .name = CONTEXT_CREATE_CLONE }, .clone_id = old_id, .flags = CLONE_FLAGS_VM } new_id = gem_context_create_ext(&p); and not have to worry about stray namespace pollution etc. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190521211134.16117-5-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_context.c | 206 ++++++++++++++++++++++++++++++++ include/uapi/drm/i915_drm.h | 15 +++ 2 files changed, 221 insertions(+) commit 8319f44c0525708c26ac7724da897cff3dbb0f84 Author: Chris Wilson Date: Tue May 21 22:11:28 2019 +0100 drm/i915: Re-expose SINGLE_TIMELINE flags for context creation The SINGLE_TIMELINE flag can be used to create a context such that all engine instances within that context share a common timeline. This can be useful for mixing operations between real and virtual engines, or when using a composite context for a single client API context. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190521211134.16117-4-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_context.c | 4 ---- include/uapi/drm/i915_drm.h | 3 ++- 2 files changed, 2 insertions(+), 5 deletions(-) commit e620f7b3a26389dfce2663ad4e64c2271ad1a815 Author: Chris Wilson Date: Tue May 21 22:11:27 2019 +0100 drm/i915: Extend I915_CONTEXT_PARAM_SSEU to support local ctx->engine[] Allow the user to specify a local engine index (as opposed to class:index) that they can use to refer to a preset engine inside the ctx->engine[] array defined by an earlier I915_CONTEXT_PARAM_ENGINES. This will be useful for setting SSEU parameters on virtual engines that are local to the context and do not have a valid global class:instance lookup. Note that due to the ambiguity in using class:instance with ctx->engines[], if a user supplied engine map is active the user must specify the engine to alter by its index into the ctx->engines[]. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190521211134.16117-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_context.c | 24 ++++++++++++++++++++---- include/uapi/drm/i915_drm.h | 3 ++- 2 files changed, 22 insertions(+), 5 deletions(-) commit 976b55f0e1db5cb8fccb0a42f68ea77ae42604a6 Author: Chris Wilson Date: Tue May 21 22:11:26 2019 +0100 drm/i915: Allow a context to define its set of engines Over the last few years, we have debated how to extend the user API to support an increase in the number of engines, that may be sparse and even be heterogeneous within a class (not all video decoders created equal). We settled on using (class, instance) tuples to identify a specific engine, with an API for the user to construct a map of engines to capabilities. Into this picture, we then add a challenge of virtual engines; one user engine that maps behind the scenes to any number of physical engines. To keep it general, we want the user to have full control over that mapping. To that end, we allow the user to constrain a context to define the set of engines that it can access, order fully controlled by the user via (class, instance). With such precise control in context setup, we can continue to use the existing execbuf uABI of specifying a single index; only now it doesn't automagically map onto the engines, it uses the user defined engine map from the context. v2: Fixup freeing of local on success of get_engines() v3: Allow empty engines[] v4: s/nengine/num_engines/ v5: Replace 64 limit on num_engines with a note that execbuf is currently limited to only using the first 64 engines. v6: Actually use the engines_mutex to guard the ctx->engines. Testcase: igt/gem_ctx_engines Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190521211134.16117-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_context.c | 265 ++++++++++++++++++++++++-- drivers/gpu/drm/i915/i915_gem_context.h | 18 ++ drivers/gpu/drm/i915/i915_gem_context_types.h | 1 + drivers/gpu/drm/i915/i915_gem_execbuffer.c | 5 +- drivers/gpu/drm/i915/i915_utils.h | 34 ++++ include/uapi/drm/i915_drm.h | 31 +++ 6 files changed, 341 insertions(+), 13 deletions(-) commit 7f3f317a66cac307f6fbc1b5dd74902fb1b48860 Author: Chris Wilson Date: Tue May 21 22:11:25 2019 +0100 drm/i915: Restore control over ppgtt for context creation ABI Having hid the partially exposed new ABI from the PR, put it back again for completion of context recovery. A significant part of context recovery is the ability to reuse as much of the old context as is feasible (to avoid expensive reconstruction). The biggest chunk kept hidden at the moment is fine-control over the ctx->ppgtt (the GPU page tables and associated translation tables and kernel maps), so make control over the ctx->ppgtt explicit. This allows userspace to create and share virtual memory address spaces (within the limits of a single fd) between contexts they own, along with the ability to query the contexts for the vm state. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190521211134.16117-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.c | 2 ++ drivers/gpu/drm/i915/i915_gem_context.c | 5 ----- include/uapi/drm/i915_drm.h | 15 +++++++++++++++ 3 files changed, 17 insertions(+), 5 deletions(-) commit 51b073a0a7e6561459da4ac985c85d3f4f08392e Author: Robert P. J. Day Date: Tue May 14 07:02:54 2019 -0400 remoteproc,rpmsg: add missing MAINTAINERS file entries Add a few missing file and directory entries related to both remoteproc and rpmsg. Signed-off-by: Robert P. J. Day Signed-off-by: Bjorn Andersson MAINTAINERS | 5 +++++ 1 file changed, 5 insertions(+) commit 54119bc1110dab2fa389f45c73a0787b8e037e8b Author: Pi-Hsun Shih Date: Mon Jan 7 19:38:32 2019 +0800 rpmsg: core: Make remove handler for rpmsg driver optional. Most other bus (for example, SPI, i2c) have the remove handler for driver optional. Make remove handler for rpmsg driver optional too. Signed-off-by: Pi-Hsun Shih Signed-off-by: Bjorn Andersson drivers/rpmsg/rpmsg_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b270ea40b3c6e5d269ae6e1c74db401f7b1dcef0 Author: Sibi Sankar Date: Sat Dec 29 00:23:00 2018 +0530 dt-bindings: soc: qcom: Add remote-pid binding for GLINK SMEM Add missing qcom,remote-pid dt binding required for GLINK SMEM which specifies the remote endpoint of the GLINK edge. Fixes: 2b41d6c8e696 ("dt-bindings: soc: qcom: Extend GLINK to cover SMEM") Reviewed-by: Doug Anderson Reviewed-by: Rob Herring Signed-off-by: Sibi Sankar Signed-off-by: Bjorn Andersson Documentation/devicetree/bindings/soc/qcom/qcom,glink.txt | 5 +++++ 1 file changed, 5 insertions(+) commit 0c6de4c299cc8f3283c38f3778777e00ed7e4b69 Author: Bjorn Andersson Date: Thu May 9 21:34:15 2019 -0700 remoteproc: qcom: qdsp6-adsp: Add support for QCS404 CDSP Move the clock list to adsp_pil_data, make the pdc_reset optional and make the driver directly enable the xo, sleep and core clocks. The three clocks are previously toggled through the clock controller, but that means the same hardware block needs to be mapped in both drivers. Making the remoteproc driver enable the clocks is a nop when using the clock controller, but allow us to remove the clocks from the clock controller. Reviewed-by: Vinod Koul Signed-off-by: Bjorn Andersson drivers/remoteproc/qcom_q6v5_adsp.c | 73 ++++++++++++++++++++++++++++--------- 1 file changed, 55 insertions(+), 18 deletions(-) commit 7ef5f7dd2a07f7460ce900818cc4cd8222daeebe Author: Bjorn Andersson Date: Thu May 9 21:34:14 2019 -0700 dt-bindings: remoteproc: Rename and amend Hexagon v56 binding The SDM845 Audio DSP peripheral image loader binding describes the properties needed to load and boot firmware on a Hexagon v56. Rename the file and add the Compute DSP (CDSP) found in QCS404 to the binding. Reviewed-by: Rob Herring Reviewed-by: Vinod Koul Signed-off-by: Bjorn Andersson .../{qcom,adsp-pil.txt => qcom,hexagon-v56.txt} | 35 +++++++++++++++------- 1 file changed, 25 insertions(+), 10 deletions(-) commit 794c686eb7830b12e27999fd776f6d021ce22658 Author: Erico Nunes Date: Tue May 21 01:16:49 2019 +0200 drm/scheduler: Fix job cleanup without timeout handler After "5918045c4ed4 drm/scheduler: rework job destruction", jobs are only deleted when the timeout handler is able to be cancelled successfully. In case no timeout handler is running (timeout == MAX_SCHEDULE_TIMEOUT), job cleanup would be skipped which may result in memory leaks. Add the handling for the (timeout == MAX_SCHEDULE_TIMEOUT) case in drm_sched_cleanup_jobs. Signed-off-by: Erico Nunes Signed-off-by: Christian König Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/306025/?series=60878&rev=2 drivers/gpu/drm/scheduler/sched_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f935d7dc8125e231e3e1620d97b2367b008889f4 Author: Vinod Koul Date: Tue May 21 19:36:44 2019 +0530 dmaengine: xilinx_dma: Remove set but unused ‘tail_desc’ We get a compiler warn about variable ‘tail_desc’ set but not used drivers/dma/xilinx/xilinx_dma.c:1102:42: warning: variable ‘tail_desc’ set but not used [-Wunused-but-set-variable] struct xilinx_dma_tx_descriptor *desc, *tail_desc; So remove it. Reviewed-by: Radhey Shyam Pandey Signed-off-by: Vinod Koul drivers/dma/xilinx/xilinx_dma.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit b48345aafb203803ccda4488cb5409b1ed435c0a Author: Richard Guy Briggs Date: Fri May 10 12:21:49 2019 -0400 audit: deliver signal_info regarless of syscall When a process signals the audit daemon (shutdown, rotate, resume, reconfig) but syscall auditing is not enabled, we still want to know the identity of the process sending the signal to the audit daemon. Move audit_signal_info() out of syscall auditing to general auditing but create a new function audit_signal_info_syscall() to take care of the syscall dependent parts for when syscall auditing is enabled. Please see the github kernel audit issue https://github.com/linux-audit/audit-kernel/issues/111 Signed-off-by: Richard Guy Briggs Signed-off-by: Paul Moore include/linux/audit.h | 9 +++++++++ kernel/audit.c | 27 +++++++++++++++++++++++++++ kernel/audit.h | 8 ++++++-- kernel/auditsc.c | 19 +++---------------- kernel/signal.c | 2 +- 5 files changed, 46 insertions(+), 19 deletions(-) commit 62a38e704d5720e2b73d0e1d6dfc54441ee75985 Author: Leon Romanovsky Date: Mon May 20 09:54:22 2019 +0300 RDMA/efa: Remove check that prevents destroy of resources in error flows Drivers cannot check the udata for validity when doing destroy as there will be no way to report this error back to the uverbs. Since udata is new for destroy no driver should start to use it - instead drivers should opt for the ioctl interface and define it in a way where it cannot fail due to incorrect data. Remove the checks on udata construction so EFA is consistent with everything else. Signed-off-by: Leon Romanovsky Acked-by: Gal Pressman Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/efa/efa_verbs.c | 24 ------------------------ 1 file changed, 24 deletions(-) commit d281bf5d924a0284f0dac1f471e1d8328b3a92ca Author: S.j. Wang Date: Wed May 15 06:42:26 2019 +0000 ASoC: fsl_asrc: Unify the supported input and output rate Unify the supported input and output rate, add the 12kHz/24kHz/128kHz to the support list Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen Signed-off-by: Mark Brown sound/soc/fsl/fsl_asrc.c | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) commit 17f78dd1bd624a4dd78ed5db3284a63ee807fcc3 Author: Jeremy Sowden Date: Tue May 21 20:58:57 2019 +0100 batman-adv: fix for leaked TVLV handler. A handler for BATADV_TVLV_ROAM was being registered when the translation-table was initialized, but not unregistered when the translation-table was freed. Unregister it. Fixes: 122edaa05940 ("batman-adv: tvlv - convert roaming adv packet to use tvlv unicast packets") Reported-by: syzbot+d454a826e670502484b8@syzkaller.appspotmail.com Signed-off-by: Jeremy Sowden Signed-off-by: Sven Eckelmann net/batman-adv/translation-table.c | 2 ++ 1 file changed, 2 insertions(+) commit eef98918c88eaeb922e6e82b983419cb2acfda5b Author: Simon Wunderlich Date: Sun Apr 7 09:00:57 2019 +0200 batman-adv: Start new development cycle Signed-off-by: Simon Wunderlich net/batman-adv/main.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a41016e40378d19f7c9ced61856b8bed866e2dda Merge: 428306c3b3fe df9366131a45 Author: Mark Brown Date: Tue May 21 22:00:33 2019 +0100 Merge branch 'for-5.2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.3 commit 428306c3b3fe107b1d059ceecf6fda09a1fcedf5 Author: Kuninori Morimoto Date: Mon May 20 10:42:39 2019 +0900 ASoC: soc-pcm: fixup try_module_get()/module_put() timing soc_pcm_components_open/close() try to call try_module_get()/module_put() based on component->driver->module_get_upon_open. Here, the purpose why we need to call these functions are to checking module reference. Thus, we need to call try_module_open() even though it doesn't have .open callback. The same reason, we need to call module_put() even though it doesn't have .close This patch calls try_module_get()/module_put() regardless of .open/.close Signed-off-by: Kuninori Morimoto Reviewed-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/soc-pcm.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 101e6fce89b4707429185527e15d97c7e8f62ec5 Author: Maxime Ripard Date: Mon May 20 16:50:35 2019 +0200 spi: sun6i: Add YAML schemas Switch the DT binding to a YAML schema to enable the DT validation. Signed-off-by: Maxime Ripard Reviewed-by: Rob Herring Signed-off-by: Mark Brown .../bindings/spi/allwinner,sun6i-a31-spi.yaml | 106 +++++++++++++++++++++ .../devicetree/bindings/spi/spi-sun6i.txt | 44 --------- 2 files changed, 106 insertions(+), 44 deletions(-) commit 3133f5c24305c31ef2805a7eb05fc18a664836d3 Author: Maxime Ripard Date: Mon May 20 16:50:34 2019 +0200 spi: sun4i: Add YAML schemas Switch the DT binding to a YAML schema to enable the DT validation. Signed-off-by: Maxime Ripard Reviewed-by: Rob Herring Signed-off-by: Mark Brown .../bindings/spi/allwinner,sun4i-a10-spi.yaml | 86 ++++++++++++++++++++++ .../devicetree/bindings/spi/spi-sun4i.txt | 23 ------ 2 files changed, 86 insertions(+), 23 deletions(-) commit 0a1b929356830257568f9547e173f0e7498060ea Author: Maxime Ripard Date: Mon May 20 16:50:33 2019 +0200 spi: Add YAML schemas for the generic SPI options The SPI controllers have a bunch of generic options that are needed in a device tree. Add a YAML schemas for those. Signed-off-by: Maxime Ripard Reviewed-by: Rob Herring Signed-off-by: Mark Brown Documentation/devicetree/bindings/spi/spi-bus.txt | 112 +------------- .../devicetree/bindings/spi/spi-controller.yaml | 161 +++++++++++++++++++++ 2 files changed, 162 insertions(+), 111 deletions(-) commit beee56f3543ae688f7b3f65a5e234b59856eff48 Author: Ondrej Mosnacek Date: Sat May 4 21:59:06 2019 +0200 selinux: remove some no-op BUG_ONs Since acdf52d97f82 ("selinux: convert to kvmalloc"), these check whether an address-of value is NULL, which is pointless. Signed-off-by: Ondrej Mosnacek Signed-off-by: Paul Moore security/selinux/ss/services.c | 4 ---- 1 file changed, 4 deletions(-) commit 7bd7916dc8ab5b056f1b53e19021e476120481c0 Author: Richard Fitzgerald Date: Tue May 21 11:04:39 2019 +0100 regulator: arizona-micsupp: Add support for Cirrus Logic Madera codecs This adds a new driver identity "madera-micsupp" and probe function so that this driver can be used to control the micsupp regulator on Cirrus Logic Madera codecs. Signed-off-by: Richard Fitzgerald Signed-off-by: Charles Keepax Signed-off-by: Mark Brown drivers/regulator/Kconfig | 7 ++-- drivers/regulator/arizona-micsupp.c | 71 ++++++++++++++++++++++++++++++++++++- 2 files changed, 74 insertions(+), 4 deletions(-) commit 1f5f11e7370c6a55da1a37351b0cfb5f86f0cb6d Author: Richard Fitzgerald Date: Tue May 21 11:04:38 2019 +0100 regulator: arizona-ldo1: Add support for Cirrus Logic Madera codecs This adds a new driver identity "madera-ldo1" and probe function so that this driver can be used to control the LDO1 regulator on some Cirrus Logic Madera codecs. Signed-off-by: Richard Fitzgerald Signed-off-by: Charles Keepax Signed-off-by: Mark Brown drivers/regulator/Kconfig | 8 ++-- drivers/regulator/arizona-ldo1.c | 83 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 86 insertions(+), 5 deletions(-) commit 46f4050a6587ea3e59e6f47f06513c00689b9d40 Author: Charles Keepax Date: Tue May 21 11:04:37 2019 +0100 regulator: arizona: Update device tree binding to support Madera CODECs The Arizona regulator drivers are now also used by the Cirrus Logic Madera audio CODECs, update the binding document to link to the primary binding document for these as well as the existing Arizona document. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown Documentation/devicetree/bindings/regulator/arizona-regulator.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8ba1d53739d960cf118762da7850e625a8b462d9 Author: Nicholas Mc Guire Date: Wed May 8 08:21:17 2019 +0200 selinux: provide __le variables explicitly While the endiannes is being handled properly sparse was unable to verify this due to type inconsistency. So introduce an additional __le32 respectively _le64 variable to be passed to le32/64_to_cpu() to allow sparse to verify proper typing. Note that this patch does not change the generated binary on little-endian systems - on 32bit powerpc it does change the binary. Signed-off-by: Nicholas Mc Guire Signed-off-by: Paul Moore security/selinux/ss/ebitmap.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit b385256eb54f0193f0f595a675409ba6e7282ffe Author: Sathya Prakash M R Date: Mon May 20 14:46:43 2019 -0500 ASoC: Intel: sof-rt5682: add newline for clarity Make sure quirk handling is cleary split from number of links. Signed-off-by: Sathya Prakash M R Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/boards/sof_rt5682.c | 1 + 1 file changed, 1 insertion(+) commit 383d30e72e682021fdaf0371ade1c58ad2c434a4 Author: Jiaxin Yu Date: Tue May 21 17:29:38 2019 +0800 ASoC: Mediatek: MT8183: fix compile error mtk_regmap_update_bits() has been changed to take a shift and warn when reg >= 0 but shift < 0.So the hd_align_mshift must not have shift. Change it from XXX_HD_ALIGN_MASK_SFT to XXX_HD_ALIGN_MASK. Fixes: cf61f5b01531 ("ASoC: Mediatek: MT8183: set data align") Signed-off-by: Jiaxin Yu Signed-off-by: Mark Brown sound/soc/mediatek/mt8183/mt8183-afe-pcm.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit e355d3de196fe08e4de99bc0521c25a36c903b1b Author: Jiaxin Yu Date: Tue May 21 17:29:37 2019 +0800 ASoC: Mediatek: MT8183: fix compile error mtk_regmap_update_bits() has been changed from four parameters to five parameters. Fixes: 1628fc3f4771 ("ASoC: Mediatek: MT8183: add memory interface data align") Signed-off-by: Jiaxin Yu Signed-off-by: Mark Brown sound/soc/mediatek/common/mtk-afe-fe-dai.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit dab99af99c7ca4c9dbea7d4d218ef7eb6b183aaf Author: Leon Romanovsky Date: Mon May 20 09:54:25 2019 +0300 RDMA/nes: Remove second wait queue initialization call The same wait queue is initialized a couple of lines above. Fixes: 3c2d774cad5b ("RDMA/nes: Add a driver for NetEffect RNICs") Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/nes/nes_utils.c | 1 - 1 file changed, 1 deletion(-) commit 3bb58cfe07e273903dde62592ccfb21f9b0761e2 Author: Leon Romanovsky Date: Mon May 20 09:54:24 2019 +0300 RDMA/i40iw: Remove useless NULL checks There is no need to check existence of structures to be destroyed. Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/i40iw/i40iw_verbs.c | 8 -------- 1 file changed, 8 deletions(-) commit 269c97fd485439702048676326286588c33fd3ba Author: Leon Romanovsky Date: Mon May 20 09:54:23 2019 +0300 RDMA/nes: Remove useless NULL checks The destroy functions are always called with relevant structs, there is no need to check their existence. Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/nes/nes_verbs.c | 6 ------ 1 file changed, 6 deletions(-) commit 890ac8d97e6722a9e4a66a0bd836d1b028d075fe Author: Leon Romanovsky Date: Mon May 20 09:54:21 2019 +0300 RDMA/core: Make ib_destroy_cq() void Kernel destroy CQ flows can't fail and the returned value of ib_destroy_cq() is not interested in those flows. Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe include/rdma/ib_verbs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dfdb08990432b19579703ed5d1efb216b9d2142e Author: Leon Romanovsky Date: Mon May 20 09:54:20 2019 +0300 RDMA/ipoib: Remove check of destroy CQ There are nothing to do from user side with knowledge that destroy CQ fails. Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/ulp/ipoib/ipoib_verbs.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit eaa1ca9cf99224a57852f339bfbf058fbeadcb79 Author: Leon Romanovsky Date: Mon May 20 09:54:19 2019 +0300 rds: Don't check return value from destroy CQ There is no value in checking ib_destroy_cq() result and skipping to clear struct ic fields. This connection needs to be reinitialized anyway. Signed-off-by: Leon Romanovsky Acked-by: Santosh Shilimkar Signed-off-by: Jason Gunthorpe net/rds/ib_cm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit deee3c7e499108b0575ee0d71b786da627a7cdee Author: Kamal Heib Date: Tue May 21 10:05:07 2019 +0300 RDMA/core: Return void from ib_device_check_mandatory() The return value from ib_device_check_mandatory() is always 0 - change it to be void. Signed-off-by: Kamal Heib Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/device.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 8ce0048f76542a1f4d68b647c5d4a4d35e7547cf Author: Yuval Shaia Date: Sun May 19 18:31:27 2019 +0300 IB/mlx4: Delete unused func arg The function argument virt_addr is not in use - delete it. Signed-off-by: Yuval Shaia Reviewed-by: Majd Dibbiny Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx4/mr.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit d2183c6f1958e6b6dfdde279f4cee04280710e34 Author: Jason Gunthorpe Date: Mon May 20 09:05:25 2019 +0300 RDMA/umem: Move page_shift from ib_umem to ib_odp_umem This value has always been set to PAGE_SHIFT in the core code, the only thing that does differently was the ODP path. Move the value into the ODP struct and still use it for ODP, but change all the non-ODP things to just use PAGE_SHIFT/PAGE_SIZE/PAGE_MASK directly. Reviewed-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky drivers/infiniband/core/umem.c | 3 +- drivers/infiniband/core/umem_odp.c | 79 +++++++++++++++----------------- drivers/infiniband/hw/hns/hns_roce_cq.c | 3 +- drivers/infiniband/hw/hns/hns_roce_srq.c | 10 ++-- drivers/infiniband/hw/mlx4/mr.c | 8 ++-- drivers/infiniband/hw/mlx4/srq.c | 2 +- drivers/infiniband/hw/mlx5/mem.c | 20 ++++---- drivers/infiniband/hw/mlx5/mr.c | 5 +- drivers/infiniband/hw/mlx5/odp.c | 23 ++++------ drivers/infiniband/hw/nes/nes_verbs.c | 9 ++-- include/rdma/ib_umem.h | 19 ++------ include/rdma/ib_umem_odp.h | 20 ++++++++ 12 files changed, 99 insertions(+), 102 deletions(-) commit 69054666df0a9b4e8331319f98b6b9a88bc3fcc4 Author: Sagiv Ozeri Date: Mon May 20 12:33:20 2019 +0300 RDMA/qedr: Fix incorrect device rate. Use the correct enum value introduced in commit 12113a35ada6 ("IB/core: Add HDR speed enum") Prior to this change a 50Gbps port would show 40Gbps. This patch also cleaned up the redundant redefiniton of ib speeds for qedr. Fixes: 12113a35ada6 ("IB/core: Add HDR speed enum") Signed-off-by: Sagiv Ozeri Signed-off-by: Michal Kalderon Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/qedr/verbs.c | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) commit 91f571293e26af3e17e209eed89e2d5777192819 Author: Israel Rukshin Date: Wed May 15 13:49:31 2019 +0300 RDMA/core: Fix doc typo Use the correct function names. Fixes: c4367a26357b ("IB: Pass uverbs_attr_bundle down ib_x destroy path") Signed-off-by: Israel Rukshin Reviewed-by: Max Gurtovoy Signed-off-by: Jason Gunthorpe drivers/infiniband/core/cq.c | 4 ++-- drivers/infiniband/core/verbs.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 53bfbf9be86e95997d6dfe9dbfd0ffce49339efc Author: Max Gurtovoy Date: Wed May 15 13:49:30 2019 +0300 RDMA/rw: Add info regarding SG count failure Print the supported and wanted values for SG count during signature operation. Signed-off-by: Max Gurtovoy Reviewed-by: Christoph Hellwig Signed-off-by: Jason Gunthorpe drivers/infiniband/core/rw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f73e4076426b3494269e46fd5cf9d89ff63a8598 Author: Israel Rukshin Date: Wed May 15 13:49:29 2019 +0300 RDMA/rw: Print the correct number of sig MRs A wrong value was printed in case of sig MR pool initialization failure. Signed-off-by: Israel Rukshin Reviewed-by: Max Gurtovoy Reviewed-by: Christoph Hellwig Signed-off-by: Jason Gunthorpe drivers/infiniband/core/rw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2d465a165aed9d15c4511de154009164d8933141 Author: Israel Rukshin Date: Wed May 15 13:49:28 2019 +0300 RDMA/rw: Fix doc typo Use the correct function name. Signed-off-by: Israel Rukshin Reviewed-by: Max Gurtovoy Reviewed-by: Christoph Hellwig Signed-off-by: Jason Gunthorpe drivers/infiniband/core/rw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dae6345aa7a992fda77b5d0de286c9b238931fbd Author: Israel Rukshin Date: Wed May 15 13:49:27 2019 +0300 IB/isert: Remove unused sig_attrs argument Signed-off-by: Israel Rukshin Reviewed-by: Max Gurtovoy Reviewed-by: Christoph Hellwig Signed-off-by: Jason Gunthorpe drivers/infiniband/ulp/isert/ib_isert.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 0cc2896f02536272fc58a7d7d2fb2e84f6e717b4 Author: Israel Rukshin Date: Wed May 15 13:49:26 2019 +0300 IB/iser: Remove unused sig_attrs argument Signed-off-by: Israel Rukshin Reviewed-by: Max Gurtovoy Reviewed-by: Christoph Hellwig Signed-off-by: Jason Gunthorpe drivers/infiniband/ulp/iser/iser_memory.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit a7b287bf7845fc335d53550a228ad4fa9aa659e5 Author: Israel Rukshin Date: Wed May 15 13:49:25 2019 +0300 IB/iser: Refactor iscsi_iser_check_protection function Reduce lines of code by using local variable. Signed-off-by: Israel Rukshin Reviewed-by: Max Gurtovoy Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Signed-off-by: Jason Gunthorpe drivers/infiniband/ulp/iser/iscsi_iser.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit d7556f491d4b7ebe25970ae0cc143bfbf56a8c78 Author: Jerome Brunet Date: Thu May 16 16:32:16 2019 +0200 arm64: dts: meson: g12a: add tohdmitx Add the hdmitx glue device linking the SoC audio interfaces to the embedded Synopsys hdmi controller. Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit d272c534af6c49b4ca336099526aba46435600e5 Author: Jerome Brunet Date: Thu May 16 09:13:55 2019 +0200 arm64: dts: meson: sei510: add bluetooth supplies Add bluetooth vbat and vddio power supplies Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts | 2 ++ 1 file changed, 2 insertions(+) commit c0c752d8c6b3dd78b3e7951453bc43be880dcd08 Author: Rob Herring Date: Fri May 17 10:27:23 2019 -0500 dt-bindings: arm: Convert Amlogic board/soc bindings to json-schema Convert Amlogic SoC bindings to DT schema format using json-schema. Cc: Carlo Caione Cc: Kevin Hilman Cc: Mark Rutland Cc: devicetree@vger.kernel.org Signed-off-by: Rob Herring Reviewed-by: Neil Armstrong [khilman: updated maninainers] Signed-off-by: Kevin Hilman Documentation/devicetree/bindings/arm/amlogic.txt | 113 ----------------- Documentation/devicetree/bindings/arm/amlogic.yaml | 138 +++++++++++++++++++++ 2 files changed, 138 insertions(+), 113 deletions(-) commit 0f202f69a16b9a687911202083c37636ad73c77e Author: Rob Herring Date: Fri May 17 10:27:22 2019 -0500 dt-bindings: arm: amlogic: Move 'amlogic, meson-gx-ao-secure' binding to its own file It is best practice to have 1 binding per file, so board level bindings should be separate for various misc SoC bindings. Cc: Mark Rutland Cc: Carlo Caione Cc: Kevin Hilman Cc: devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-amlogic@lists.infradead.org Signed-off-by: Rob Herring Acked-by: Neil Armstrong Acked-by: Kevin Hilman Signed-off-by: Kevin Hilman Documentation/devicetree/bindings/arm/amlogic.txt | 29 ---------------------- .../arm/amlogic/amlogic,meson-gx-ao-secure.txt | 28 +++++++++++++++++++++ 2 files changed, 28 insertions(+), 29 deletions(-) commit b894a8f184763dbcdee9de8d59b75984704256d5 Author: Jerome Brunet Date: Tue May 14 16:26:49 2019 +0200 arm64: dts: meson: g12a: enable hdmi_tx sound dai provider At the moment the sysnopsys hdmi i2s driver provides a single playback DAI. Add the corresponding sound-dai-cell to the hdmi device node. Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 1 + 1 file changed, 1 insertion(+) commit e3d3b132d5bac991fca7a37cfeb9692e90336914 Author: Jerome Brunet Date: Tue May 14 16:26:48 2019 +0200 arm64: dts: meson: g12a: add spdifin Add the spdif input device node and the pinctrl definition for this capture interface g12a SoC family Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 37 +++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit 9c5dc0322de3b3644b90db48040fb1e57ca60574 Author: Jerome Brunet Date: Tue May 14 16:26:47 2019 +0200 arm64: dts: meson: g12a: add pdm Add the pdm device node and the pinctrl definition for this capture interface g12a SoC family Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 177 ++++++++++++++++++++++++++++ 1 file changed, 177 insertions(+) commit 649675db939d89283d3f02ba5c4e26e5c58011bd Author: Jerome Brunet Date: Tue May 14 16:26:46 2019 +0200 arm64: dts: meson: g12a: add spdifouts Add the devices nodes and pinctrl definitions for the spdif outputs of the g12a SoC family Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 60 +++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) commit 1ff38c86d75d7c1285933ccfb0caeb0e5c98ab1f Author: Jerome Brunet Date: Tue May 14 16:26:45 2019 +0200 arm64: dts: meson: g12a: add tdm Add the devices and pinctrl definitions for the tdm interfaces of the g12a SoC family. Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 658 ++++++++++++++++++++++++++++ 1 file changed, 658 insertions(+) commit c59b7fe5aafddb21d55584d40105d66eb8591533 Author: Jerome Brunet Date: Tue May 14 16:26:44 2019 +0200 arm64: dts: meson: g12a: add audio fifos Add the playback and capture memory interfaces of the g12a SoC family. Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 73 +++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) commit 5dc0f28ff8361588e18763cd17fe36c631b86769 Author: Jerome Brunet Date: Tue May 14 16:26:43 2019 +0200 arm64: dts: meson: g12a: add audio memory arbitrer Add the audio DDR memory arbitrer of the g12a SoC family. Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) commit 03c3f08ce869e4405d84b2917dddb40e734178f3 Author: Jerome Brunet Date: Tue May 14 16:26:42 2019 +0200 arm64: dts: meson: g12a: add audio clock controller Add the g12a clock controller dedicated to audio. Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 36 +++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit 32232316de8e7d7e518d1e0869e61ad84bc27e11 Author: Jerome Brunet Date: Tue May 14 12:12:37 2019 +0200 arm64: dts: meson: sei510: enable i2c3 Add the i2c bus used for RGB led controller. Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts | 6 ++++++ 1 file changed, 6 insertions(+) commit 664065217d477135d3fdab43be68c6eabaa4d336 Author: Jerome Brunet Date: Tue May 14 12:12:36 2019 +0200 arm64: dts: meson: u200: enable i2c busses Add the 3 i2c busses present on the u200 reference design. Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 9951aca655c72bb0e8e6b938f6d81aebdbcbc2d2 Author: Guillaume La Roque Date: Tue May 14 12:12:35 2019 +0200 arm64: dts: meson: g12a: add i2c nodes Add pinctrl and nodes for i2c support on amlogic g12a Signed-off-by: Guillaume La Roque Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 268 ++++++++++++++++++++++++++++ 1 file changed, 268 insertions(+) commit 9a69090723d6a26e51c33abeab1eff428005f0dd Author: Jerome Brunet Date: Tue May 14 11:45:37 2019 +0200 arm64: dts: meson: g12a: set uart_ao clocks Now that the AO clock controller is available, make the uarts of the always-on domain claim the appropriate peripheral clock. Signed-off-by: Jerome Brunet Reviewed-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5a2ea2f73f9f709e92d8173921da4dcde49871ba Author: Jerome Brunet Date: Tue May 14 11:16:11 2019 +0200 arm64: dts: meson: sei510: add sd and emmc Enable eMMC and SDCard on the g12a sei510 board Signed-off-by: Jerome Brunet Reviewed-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts | 42 +++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit b5446af48e1c7db784747b64880715d285e2bd92 Author: Jerome Brunet Date: Tue May 14 11:16:10 2019 +0200 arm64: dts: meson: u200: add sd and emmc Enable eMMC and SDCard on the g12a u200 board Signed-off-by: Jerome Brunet Reviewed-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts | 42 +++++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit 4759fd87b9286addc220f92efaa113a2731e9155 Author: Jerome Brunet Date: Tue May 14 11:16:09 2019 +0200 arm64: dts: meson: g12a: add mmc nodes Add port B (sdcard) and port C (eMMC) pinctrl and controllers nodes to the g12a DT. Signed-off-by: Jerome Brunet Reviewed-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 124 ++++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) commit 7e2b33ffec179fd9a96480852ecd495244885dd2 Author: Jerome Brunet Date: Mon May 13 15:26:27 2019 +0200 arm64: dts: meson: odroid-c2: add missing mmc modes Add sdcard uhs modes up to DDR50 and push eMMC up to 200Mhz With the new tuning method, these modes appear to be stable Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit f52bc6dde8e79f216d7dbbb4fd933a48aacbe74e Author: Jerome Brunet Date: Mon May 13 15:05:07 2019 +0200 arm64: dts: meson: nanopi k2: add sd DDR50 Add UHS ddr50 mode to the nanopi k2 Signed-off-by: Jerome Brunet Acked-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts | 1 + 1 file changed, 1 insertion(+) commit 890265c97941e10ea99203f082e0d108ed573999 Author: Martin Blumenstingl Date: Sat May 11 19:45:34 2019 +0200 arm64: dts: amlogic: remove ethernet-phy-idAAAA.BBBB compatible strings The Ethernet PHY documentation (Documentation/devicetree/bindings/net/phy.txt) states that: If the PHY reports an incorrect ID (or none at all) then the "compatible" list may contain an entry with the correct PHY ID in the form: "ethernet-phy-idAAAA.BBBB" An older version of the documentation suggested that the compatible string can be used when the PHY ID is known. Remove the ethernet-phy-id compatible string and add a comment with the PHY ID instead. This is a no-op on boards which are shipped with the PHY that was listed (= all known cases). However, if a board manufacturer decides to ship a different PHY we will now load and use the correct driver because we ask the PHY to identify itself. Signed-off-by: Martin Blumenstingl Reviewed-by: Andrew Lunn Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dts | 2 +- arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts | 2 +- arch/arm64/boot/dts/amlogic/meson-gxm-q200.dts | 2 +- arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit ebf4a5f6a52e43c4fe6fb5dbcbcd51716dd0dc64 Author: Jerome Brunet Date: Fri May 10 17:53:27 2019 +0200 arm64: dts: meson: u200: consistently order nodes Like order boards, order nodes by address then node names then aliases. Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts | 50 +++++++++++++------------ 1 file changed, 26 insertions(+), 24 deletions(-) commit 73429cf2b6e7b675298363fd47ad14d6e6fbdfef Author: Jerome Brunet Date: Fri May 10 17:53:26 2019 +0200 arm64: dts: meson: sei510: consistently order nodes Like order boards, order nodes by address then node names then aliases. Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts | 92 +++++++++++------------ 1 file changed, 46 insertions(+), 46 deletions(-) commit 46bfad15cc38738fd467a04405cba7e1a468f51f Author: Jerome Brunet Date: Thu Apr 18 14:27:14 2019 +0200 arm64: dts: meson: vim2: remove sd hs and hs400 modes from emmc sd highspeed mode make no sense for an eMMC and HS400 is not working at the moment. Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 2 -- 1 file changed, 2 deletions(-) commit f011a8cf51c33d1cc1f4940907f4d44181d7e091 Author: Jerome Brunet Date: Thu Apr 18 14:27:13 2019 +0200 arm64: dts: meson: vim2: add missing clk-gate pinctrl For some reason the vim2 is missing the clk-gate pinctrl setting all the other board have. Just add this missing bit Signed-off-by: Jerome Brunet Reviewed-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit adc52bf7ef1644b9ca3ee024b107167323c6d3d8 Author: Jerome Brunet Date: Thu Apr 18 14:27:12 2019 +0200 arm64: dts: meson: fix mmc v2 chips max frequencies According the datasheets, emmc v2 chips (gxbb and gxl) don't support more that 100Mhz in UHS-1 SD modes and HS in SDIO. Align the max-frequency to 100MHz for UHS-1 and 50MHz for HS Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi | 4 ++-- arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts | 5 ++--- arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts | 2 +- arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi | 2 +- arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi | 4 ++-- arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi | 4 ++-- arch/arm64/boot/dts/amlogic/meson-gxl-s805x-p241.dts | 2 +- arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts | 2 +- arch/arm64/boot/dts/amlogic/meson-gxl-s905x-nexbox-a95x.dts | 2 +- arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi | 4 ++-- arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 4 ++-- arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts | 2 +- arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts | 4 ++-- 13 files changed, 20 insertions(+), 21 deletions(-) commit b43033b1999af46de193e6ffbe2b5f489e727d5d Author: Jerome Brunet Date: Thu Apr 18 14:27:11 2019 +0200 arm64: dts: meson: fix mmc pin bias Clk pin does not require bias, data strobe should be pulled low. The rest of the pin (data and cmd) are pulled up. Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-axg-s400.dts | 4 +-- arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 31 +++++++++++++++++------ arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 35 ++++++++++++++++++-------- arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 35 ++++++++++++++++++-------- 4 files changed, 76 insertions(+), 29 deletions(-) commit ffab3fd6ae009b10f850a361d6b3a12df0980524 Author: Jerome Brunet Date: Thu Apr 18 14:27:10 2019 +0200 arm64: dts: meson: libretech-cc: switch eMMC to 1.8v While some 3.3v eMMC 4.0 are available from libretech, Only the 1.8v 5.0 modules are recommended and supported for the aml-s905x-cc. the 1.8v is provided by LDOs on the eMMC card, from vcc 3.3v Signed-off-by: Jerome Brunet Acked-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 9f72e321d5506fe3e162a6308a4a295d7f10bb5d Author: Jerome Brunet Date: Thu Apr 18 14:27:09 2019 +0200 arm64: dts: meson: libretech-cc: set eMMC as removable The eMMC on this board is add-on module which is not mandatory. Removing 'non-removable' property should prevent some errors when booting a board w/o an eMMC module present. Fixes: 72fb2c852188 ("ARM64: dts: meson-gxl-s905x-libretech-cc: fixup board definition") Signed-off-by: Jerome Brunet Reviewed-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts | 1 - 1 file changed, 1 deletion(-) commit 919ccb30cf5bc4e29a40e32b2d7b3147bea01b6b Author: Neil Armstrong Date: Fri Apr 12 12:05:18 2019 +0200 arm64: dts: meson-g12a-u200: enable IR decoder Add support for the IR decoder input on the U200 Reference Design board. Signed-off-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts | 6 ++++++ 1 file changed, 6 insertions(+) commit fff6e9d394442b9a3fab65c01a178d31b3a73436 Author: Neil Armstrong Date: Fri Apr 12 12:05:17 2019 +0200 arm64: dts: meson-g12a-x96-max: enable IR decoder Add support for the IR decoder input on the X96 Max board. Signed-off-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts | 6 ++++++ 1 file changed, 6 insertions(+) commit 2bfe8412c5388a0a3122a1b51a7969a0dec72171 Author: Neil Armstrong Date: Fri Apr 12 12:05:16 2019 +0200 arm64: dts: meson-g12a: Add IR nodes Amlogic G12A SoCs uses the exact same IR decoder as previous families, add the IR node and the pintctrl setting. Signed-off-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit bb23b125c8fac3a5e9c267969421a472a2db42f9 Author: Neil Armstrong Date: Tue Apr 23 15:36:46 2019 +0200 arm64: dts: meson-g12a: Add PWM nodes This adds the EE and AO PWM nodes and the possible pinctrl settings. Signed-off-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 179 ++++++++++++++++++++++++++++ 1 file changed, 179 insertions(+) commit bd5d3873de70529b3a810c8d3fda82b6423c1ba4 Author: Alexandre Belloni Date: Tue Feb 19 15:28:08 2019 +0100 ARM: dts: at91: sama5d3: switch to new sckc bindings Remove the child nodes of the sckc as they are not necessary anymore. Also, switch to the new atmel,sama5d3-sckc compatible string to use the proper startup time for the RC oscillator (500 µs instead of 75). Signed-off-by: Alexandre Belloni arch/arm/boot/dts/at91-wb50n.dtsi | 2 +- arch/arm/boot/dts/sama5d3.dtsi | 27 ++++----------------------- 2 files changed, 5 insertions(+), 24 deletions(-) commit d77a1de7f61e0380cd00007d7131471be0def10f Author: Alexandre Belloni Date: Tue Feb 19 17:02:47 2019 +0100 ARM: dts: at91: at91sam9rl: switch to new sckc bindings Remove the child nodes of the sckc as they are not necessary anymore. Signed-off-by: Alexandre Belloni arch/arm/boot/dts/at91sam9rl.dtsi | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) commit 01048f10528136cbb76d4ad6714794a954a5d275 Author: Alexandre Belloni Date: Tue Feb 19 17:00:11 2019 +0100 ARM: dts: at91: at91sam9g45: switch to new sckc bindings Remove the child nodes of the sckc as they are not necessary anymore. Signed-off-by: Alexandre Belloni arch/arm/boot/dts/at91sam9g45.dtsi | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) commit bf896bd5222cdc165bc3a73ad65c881fac5bf4e6 Author: Alexandre Belloni Date: Tue Feb 19 16:20:39 2019 +0100 ARM: dts: at91: at91sam9x5: switch to new sckc bindings Remove the child nodes of the sckc as they are not necessary anymore. Signed-off-by: Alexandre Belloni arch/arm/boot/dts/at91sam9x5.dtsi | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) commit 7793a108964924dd2802ee8c5dff2e9f3a9cd54a Author: Maxime Ripard Date: Tue May 21 13:09:06 2019 +0200 drm/fourcc: Fix the parameters name in the documentation We introduced new functions in the commit bf39607c1614 ("drm/fourcc: Pass the format_info pointer to drm_format_plane_width/height") based on previous ones but with a slightly different prototype. However, the documentation wasn't changed to reflect that change. Fixes: bf39607c1614 ("drm/fourcc: Pass the format_info pointer to drm_format_plane_width/height") Reported-by: kbuild test robot Reviewed-by: Daniel Vetter Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20190521110906.15268-1-maxime.ripard@bootlin.com include/drm/drm_fourcc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b728ddde769c568c49f42468114eb801e0a93ce9 Author: Vitaly Lubart Date: Mon May 20 11:55:39 2019 +0300 mei: Convert to use DEFINE_SHOW_ATTRIBUTE macro Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Vitaly Lubart Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/debugfs.c | 184 +++++++++++++-------------------------------- 1 file changed, 52 insertions(+), 132 deletions(-) commit 8d9a8543be03096eb6d25663f33f3183bd62b3a6 Author: Thierry Reding Date: Wed Sep 19 19:12:14 2018 +0200 dt-bindings: tegra186-gpio: Remove unused definitions Now that all users of the old definitions have been updated to use the Tegra186 specific prefix, remove the unused definitions. Signed-off-by: Thierry Reding include/dt-bindings/gpio/tegra186-gpio.h | 41 -------------------------------- 1 file changed, 41 deletions(-) commit 2db4a1a58a3649837a565877b4c62261f2f05e86 Author: Thierry Reding Date: Tue May 21 16:30:10 2019 +0200 arm64: tegra: Use TEGRA186_ prefix for GPIOs In order to move away from misleadingly generic definitions of the GPIO macros, use the Tegra186-specific prefix. These are the last remaining occurrences. The generic definitions can be removed after this. Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra186-p2771-0000.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 17996e5b0ba40c4d85500e1c9bfbddaf676ab8c7 Author: Maxime Ripard Date: Mon May 20 16:50:36 2019 +0200 ARM: dts: sun6i: Add default address and size cells for SPI The SPI controller bindings require an address cell size of 1, and a size cell size of 0. Let's put it at the DTSI level to make sure that's properly enforced. Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun6i-a31.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 201713b6bb037425a18618719b0930cc83a7055d Author: Christian König Date: Tue Apr 30 11:40:18 2019 +0200 MAINTAINERS: drop Jerry as TTM maintainer He unfortunately doesn't work for AMD any more. Signed-off-by: Christian König Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/302519/?series=60097&rev=1 MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit 2c1eab2b4355e509f918a6752b41fe34e7f3831d Author: Alexandre Belloni Date: Mon Apr 8 17:06:42 2019 +0200 ARM: dts: at91sam9261ek: remove unused chosen nodes The chosen clocksource and clockevent bindings have never been accepted and parsed, remove them. Signed-off-by: Alexandre Belloni arch/arm/boot/dts/at91sam9261ek.dts | 8 -------- 1 file changed, 8 deletions(-) commit 4a0bbf4815f168b2097d394257eef052c0ea928a Author: Brad Love Date: Thu Dec 20 13:54:44 2018 -0500 media: si2168: add frequency data to frontend info Minimum, maximum, and stepsize taken from Silicon Labs reference. Signed-off-by: Brad Love Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/si2168.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit bc8c479a5b19bd44f7379e42e627170957985ee9 Author: Stanimir Varbanov Date: Wed Jan 16 05:08:28 2019 -0500 media: venus: helpers: fix dynamic buffer mode for v4 Venus v4 doesn't send ALLOC_MODE property and thus parser doesn't recognize it as dynamic buffer (for OUTPUT/OUTPUT2 type of buffers) make it obvious in the helper function. Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/venus/helpers.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 3d7f0d7126e0f3695a5f743d5e7b8d9deecad651 Author: Stanimir Varbanov Date: Tue Jan 15 12:12:57 2019 -0500 media: venus: hfi_cmds: add more not-implemented properties Add two more not-implemented properties for Venus v4. Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/venus/hfi_cmds.c | 2 ++ 1 file changed, 2 insertions(+) commit cd396c8cbfcdd75a4ff2681493be7017f6f60e6e Author: Kelvin Lawson Date: Mon Dec 10 09:11:45 2018 -0500 media: venus: Add support for H265 controls Add support for V4L2 H265 controls: * V4L2_CID_MPEG_VIDEO_HEVC_PROFILE * V4L2_CID_MPEG_VIDEO_HEVC_LEVEL Signed-off-by: Kelvin Lawson Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/venus/venc_ctrls.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) commit a132459d400908434a12812b8331a34d85585fa7 Author: Alexandre Courbot Date: Tue Feb 26 03:17:46 2019 -0500 media: venus: core: fix max load for msm8996 and sdm845 Patch commit de5a0bafcfc4 ("media: venus: core: correct maximum hardware load for sdm845") meant to increase the maximum hardware load for sdm845, but ended up changing the one for msm8996 instead. Fixes: de5a0bafcfc4 ("media: venus: core: correct maximum hardware load for sdm845") Signed-off-by: Alexandre Courbot Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/venus/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 47ab14578263571228ce63e9417d96847693c7b4 Author: Erico Nunes Date: Tue May 21 00:42:29 2019 +0200 drm/lima: add timeout to drm scheduler init After "5918045c4ed4 drm/scheduler: rework job destruction", lima started to leak memory due to buffers not being destroyed after job execution in the drm scheduler. This started happening because the drm scheduler only destroyed buffers after cancelling the job timeout handler, and for lima this handler was never started as lima specified a MAX_SCHEDULE_TIMEOUT timeout. Lima seems to run well in its current state with a real timeout, so to make it more aligned with the other drivers from now on, let's use a real default timeout. This also fixes the observed memory leaks. The 500ms value was chosen as it is the current value for all other embedded gpu drivers using drm sched. Signed-off-by: Erico Nunes Signed-off-by: Qiang Yu Link: https://patchwork.freedesktop.org/patch/msgid/20190520224229.21111-1-nunes.erico@gmail.com drivers/gpu/drm/lima/lima_drv.c | 2 +- drivers/gpu/drm/lima/lima_sched.c | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) commit e45cf927f3a5fb2072e2e804b25592fb67448190 Author: Philipp Zabel Date: Fri Apr 12 11:51:29 2019 -0400 media: coda: update profile and level controls after sequence initialization The header report return value from decoder sequence initialization is available on CodaHx4 and CODA7541 already. Use the profile and level identification values reported by the firmware to update codec specific profile and level controls after sequence initialization has succeeded. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-bit.c | 11 ++++++ drivers/media/platform/coda/coda-common.c | 66 ++++++++++++++++++------------- drivers/media/platform/coda/coda.h | 3 ++ drivers/media/platform/coda/coda_regs.h | 2 +- 4 files changed, 54 insertions(+), 28 deletions(-) commit 8a618957257aba5c42ea04c828d8bc6525ebd494 Author: Philipp Zabel Date: Fri Apr 12 11:51:28 2019 -0400 media: coda: add menu strings to s_ctrl debug output When a menu control is updated via s_ctrl, print the corresponding menu entry string in addition to the numerical value it is set to. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-common.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 74135fb1847dbf2c6564c820add9d5bbecf4f6d2 Author: Philipp Zabel Date: Fri Apr 12 11:51:27 2019 -0400 media: coda: demote s_ctrl debug messages to level 2 Otherwise the default initialization would always swamp the debug log. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e94bb8d269ff2d81b319f25db888a91621e2af71 Author: Philipp Zabel Date: Fri Apr 12 11:51:26 2019 -0400 media: coda: improve decoder job finished debug message Print a single line containing the following information: - which frame was decoded, including its type, - if no frame was decoded, the reason (code) why - which decoded frame was returned, copied out by either rotator or VODA, - if no frame was returned, the reason (code) why, and - the output queue sequence number, which is only useful in case each queued coded buffer corresponds to exactly one frame. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-bit.c | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) commit 8e7479c7e72586497713b584c0f3258422152f03 Author: Philipp Zabel Date: Fri Apr 12 11:51:25 2019 -0400 media: coda: add coda_frame_type_char helper Add a function to translate from V4L2 buffer flags to 'I'/'P'/'B' characters for debug output. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-bit.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 736a33d2054659765e809711c74809e736d9e12e Author: Philipp Zabel Date: Fri Apr 12 11:51:24 2019 -0400 media: coda: move job ready message to coda_debug level 2 Use the newly freed verbose debug level 2 for job ready debug messages. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 31e71dbcc1fd57eaccc1010c9078d03c642d5cd1 Author: Philipp Zabel Date: Fri Apr 12 11:51:23 2019 -0400 media: coda: move register debugging to coda_debug level 3 This allows to use coda_debug level 2 for verbose but not quite as verbose debug logging. Register access level logging is of limited use anyway, as this includes busy polling of status bits. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/coda/coda-common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5490ba5645f27829e5c7f7c6fd3a9249cc14198e Author: Eugen Hristev Date: Mon Apr 15 10:13:56 2019 -0400 media: atmel: atmel-isc: make try_fmt error less verbose In case the sensor refuses to set the format, avoid printing the error message that no compatible format was found. This means that the try_fmt will be less verbose. The error will be printed only if really a format cannot be found. Some application try all possible formats in a row (gstreamer e.g.) which will flood the console with error messages until a working one is found. Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/atmel/atmel-isc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 90a493a349177cf03070866b7bb3becd0aed7bf3 Author: Eugen Hristev Date: Mon Apr 15 10:13:54 2019 -0400 media: atmel: atmel-isc: add support for DO_WHITE_BALANCE This adds support for the 'button' control DO_WHITE_BALANCE This feature will enable the ISC to compute the white balance coefficients in a one time shot, at the user discretion. This can be used if a color chart/grey chart is present in front of the camera. The ISC will adjust the coefficients and have them fixed until next balance or until sensor mode is changed. This is particularly useful for white balance adjustment in different lighting scenarios, and then taking photos to similar scenery. The old auto white balance stays in place, where the ISC will adjust every 4 frames to the current scenery lighting, if the scenery is approximately grey in average, otherwise grey world algorithm fails. One time white balance adjustments needs streaming to be enabled, such that capture is enabled and the histogram has data to work with. Histogram without capture does not work in this hardware module. To start the one time white balance procedure: v4l2-ctl --set-ctrl=do_white_balance=1 This feature works only if the sensor is streaming RAW data, as the hardware supports a histogram only for RAW bayer components. If the auto white balance is enabled, do_white_balance does nothing. If the streaming is disabled, or the sensor does not output RAW data, the control is inactive. User controls now include the do_white_balance ctrl: User Controls brightness 0x00980900 (int) : min=-1024 max=1023 step=1 default=0 value=0 flags=slider contrast 0x00980901 (int) : min=-2048 max=2047 step=1 default=256 value=256 flags=slider white_balance_automatic 0x0098090c (bool) : default=1 value=0 do_white_balance 0x0098090d (button) : flags=write-only, execute-on-write gamma 0x00980910 (int) : min=0 max=2 step=1 default=2 value=2 flags=slider Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/atmel/atmel-isc.c | 66 ++++++++++++++++++++++++++++---- 1 file changed, 59 insertions(+), 7 deletions(-) commit a0816e5088baab82aa738d61a55513114a673c8e Author: Eugen Hristev Date: Mon Apr 15 10:13:51 2019 -0400 media: v4l2-ctrl: fix flags for DO_WHITE_BALANCE Control DO_WHITE_BALANCE is a button, with read only and execute-on-write flags. Adding this control in the proper list in the fill function. After adding it here, we can see output of v4l2-ctl -L do_white_balance 0x0098090d (button) : flags=write-only, execute-on-write Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-ctrls.c | 1 + 1 file changed, 1 insertion(+) commit 73c1a577b83999f3bd208bbc6955f21d82b7f9ac Author: Eugen Hristev Date: Mon Apr 15 10:13:49 2019 -0400 media: atmel: atmel-isc: reworked white balance feature Reworked auto white balance feature (awb) to cope with all four channels. Implemented stretching and grey world algorithms. Using the histogram, the ISC will auto adjust the white balance during frame captures. Because each histogram needs a frame, it will take 4 frames for one adjustment. When the gains were updated by previous code, the registers for the gains were updated only on new streaming start. Now, after each full histogram the registers are updated with new gains. Also, on previous code, if the streaming stopped but not all 3 histograms finished, a new histogram was started either way. This used to lead to an error "timeout to update profile" when streaming was stopped. According to the hardware, histogram can only work together with the capture, not independently. Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/atmel/atmel-isc-regs.h | 6 +- drivers/media/platform/atmel/atmel-isc.c | 200 +++++++++++++++++++++++--- 2 files changed, 181 insertions(+), 25 deletions(-) commit ab375b85cf917ac73359a2aa6861c4f476f293e7 Author: Yannick Fertré Date: Fri Mar 29 13:43:57 2019 +0100 ARM: dts: stm32: Add I2C 1 config for stm32mp157a-dk1 Append I2C 1 for stm32mp157c-dk1. Signed-off-by: Pierre-Yves MORDRET Signed-off-by: Yannick Fertré Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp157a-dk1.dts | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 50a1ea5bebbc663be0b794ece96d47aa8d959528 Author: Christoph Hellwig Date: Wed May 1 12:14:16 2019 -0400 scsi: st: add a SPDX tag to st.c st.c is the only st file missing licensing information. Add a GPLv2 tag for the default kernel license. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/st.c | 1 + 1 file changed, 1 insertion(+) commit 95b04a2ff9c7b0804c260bab0f60e561b35a1001 Author: Christoph Hellwig Date: Wed May 1 12:14:15 2019 -0400 scsi: sr: add a SPDX tag to sr.c sr.c is the only sr file missing licensing information. Add a GPLv2 tag for the default kernel license. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/sr.c | 1 + 1 file changed, 1 insertion(+) commit 203cd5591485715e2c715d1ed262615ddcf1db5a Author: Christoph Hellwig Date: Wed May 1 12:14:14 2019 -0400 scsi: sg: switch to SPDX tags Use the the GPLv2+ SPDX tag instead of verbose boilerplate text. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Acked-by: Douglas Gilbert Signed-off-by: Martin K. Petersen drivers/scsi/sg.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 5ee7e1f1c6c1263f0970462d19a2853ca1bb694d Author: Christoph Hellwig Date: Wed May 1 12:14:13 2019 -0400 scsi: ses: switch to SPDX tags Use the the GPLv2 SPDX tag instead of verbose boilerplate text. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/ses.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) commit b0edc7fdc65cd0a7eb97aa3e6a8586656fc51997 Author: Christoph Hellwig Date: Wed May 1 12:14:12 2019 -0400 scsi: sd: switch remaining files to SPDX tags Use the the GPLv2 SPDX tag instead of verbose boilerplate text. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/sd_dif.c | 16 +--------------- drivers/scsi/sd_zbc.c | 16 +--------------- 2 files changed, 2 insertions(+), 30 deletions(-) commit 5897b844b7f90d0159b878c279e680ca59e0c75e Author: Christoph Hellwig Date: Wed May 1 12:14:11 2019 -0400 scsi: sd: add a SPDX tag to sd.c sd.c is the only sd file missing licensing information. Add a GPLv2 tag for the default kernel license. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/sd.c | 1 + 1 file changed, 1 insertion(+) commit 86b89cb0d26c4050a1916094fcd867f34f44af66 Author: Christoph Hellwig Date: Wed May 1 12:14:10 2019 -0400 scsi: libsas: switch remaining files to SPDX tags Use the the GPLv2 SPDX tag instead of verbose boilerplate text. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/libsas/sas_discover.c | 18 +----------------- drivers/scsi/libsas/sas_event.c | 18 +----------------- drivers/scsi/libsas/sas_expander.c | 16 +--------------- drivers/scsi/libsas/sas_host_smp.c | 5 +---- drivers/scsi/libsas/sas_init.c | 19 +------------------ drivers/scsi/libsas/sas_internal.h | 19 +------------------ drivers/scsi/libsas/sas_phy.c | 18 +----------------- drivers/scsi/libsas/sas_port.c | 18 +----------------- drivers/scsi/libsas/sas_scsi_host.c | 19 +------------------ include/scsi/libsas.h | 19 +------------------ include/scsi/sas.h | 19 +------------------ include/scsi/sas_ata.h | 17 +---------------- 12 files changed, 12 insertions(+), 193 deletions(-) commit 4e74166c52a836f05d4bd8270835703908b34d3e Author: Christoph Hellwig Date: Wed May 1 12:14:09 2019 -0400 scsi: libsas: switch sas_ata.[ch] to SPDX tags Use the the GPLv2+ SPDX tag instead of verbose boilerplate text. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/libsas/sas_ata.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) commit 5502239e73e6167fb67ff9efef4677e6dd90fd57 Author: Christoph Hellwig Date: Wed May 1 12:14:08 2019 -0400 scsi: libsas: add a SPDX tag to sas_task.c sas_task.c is the only libsas file missing licensing information. Add a GPLv2 tag for the default kernel license. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/libsas/sas_task.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2d1fcb6009f459c45b661a6f7cc87f99467c8c33 Author: Christoph Hellwig Date: Wed May 1 12:14:07 2019 -0400 scsi: libiscsi: switch to SPDX tags Use the the GPLv2+ SPDX tag instead of verbose boilerplate text. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/libiscsi.c | 15 +-------------- drivers/scsi/libiscsi_tcp.c | 13 +------------ include/scsi/iscsi_if.h | 13 +------------ include/scsi/iscsi_proto.h | 13 +------------ include/scsi/libiscsi.h | 15 +-------------- include/scsi/libiscsi_tcp.h | 13 +------------ include/scsi/scsi_bsg_iscsi.h | 16 +--------------- 7 files changed, 7 insertions(+), 91 deletions(-) commit 2626b08f396050e492a64f17ea2fbed4babf4b5a Author: Christoph Hellwig Date: Wed May 1 12:14:06 2019 -0400 scsi: libfcoe: switch to SPDX tags Use the the GPLv2 SPDX tag instead of verbose boilerplate text. [mkp: fixed comment syntax on *.c] Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/fcoe/fcoe.c | 14 +------------- drivers/scsi/fcoe/fcoe.h | 14 +------------- drivers/scsi/fcoe/fcoe_ctlr.c | 14 +------------- drivers/scsi/fcoe/fcoe_sysfs.c | 14 +------------- drivers/scsi/fcoe/fcoe_transport.c | 14 +------------- include/scsi/libfcoe.h | 14 +------------- 6 files changed, 6 insertions(+), 78 deletions(-) commit d4fd6347552791c2b79ceacaa6e87c16fcac6db1 Author: Christoph Hellwig Date: Wed May 1 12:14:05 2019 -0400 scsi: libfc: switch to SPDX tags Use the the GPLv2 SPDX tag instead of verbose boilerplate text. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/libfc/fc_disc.c | 14 +------------- drivers/scsi/libfc/fc_elsct.c | 14 +------------- drivers/scsi/libfc/fc_exch.c | 14 +------------- drivers/scsi/libfc/fc_fcp.c | 14 +------------- drivers/scsi/libfc/fc_frame.c | 14 +------------- drivers/scsi/libfc/fc_libfc.c | 14 +------------- drivers/scsi/libfc/fc_libfc.h | 14 +------------- drivers/scsi/libfc/fc_lport.c | 14 +------------- drivers/scsi/libfc/fc_npiv.c | 14 +------------- drivers/scsi/libfc/fc_rport.c | 14 +------------- include/scsi/fc/fc_encaps.h | 14 +------------- include/scsi/fc/fc_fc2.h | 14 +------------- include/scsi/fc/fc_fcoe.h | 14 +------------- include/scsi/fc/fc_fcp.h | 14 +------------- include/scsi/fc/fc_fip.h | 14 +------------- include/scsi/fc/fc_ms.h | 17 +++-------------- include/scsi/libfc.h | 14 +------------- 17 files changed, 19 insertions(+), 222 deletions(-) commit 402b0e32609e72baed4ae6504a37c98bb1507822 Author: Christoph Hellwig Date: Wed May 1 12:14:04 2019 -0400 scsi: libfc: remove duplicate GPL boilerplate text The libfc uapi headers already have proper SPDX tags, remove the duplicate boilerplate text. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen include/uapi/scsi/fc/fc_els.h | 13 ------------- include/uapi/scsi/fc/fc_fs.h | 13 ------------- include/uapi/scsi/fc/fc_gs.h | 13 ------------- include/uapi/scsi/fc/fc_ns.h | 13 ------------- 4 files changed, 52 deletions(-) commit 1d3439fa8792aa9568f9852cd126fa59f5899655 Author: Christoph Hellwig Date: Wed May 1 12:14:03 2019 -0400 scsi: scsi_transport_srp: switch to SPDX tags Use the the GPLv2+ SPDX tag instead of verbose boilerplate text. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Acked-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/scsi_transport_srp.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) commit 838b709053864779e9aa4be5f7b4d5ac69af5715 Author: Christoph Hellwig Date: Wed May 1 12:14:02 2019 -0400 scsi: scsi_transport_spi: switch to SPDX tags Use the the GPLv2+ SPDX tag instead of verbose boilerplate text. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/scsi_transport_spi.c | 15 +-------------- include/scsi/scsi_transport_spi.h | 15 +-------------- 2 files changed, 2 insertions(+), 28 deletions(-) commit 390363c1dd69189f2ab82a6ae992ab64cb5b6c96 Author: Christoph Hellwig Date: Wed May 1 12:14:01 2019 -0400 scsi: scsi_transport_sas: switch to SPDX tags Use the the GPLv2 SPDX tag instead of a free form blurb. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/scsi_transport_sas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7d38479a74bcb6f37d10ec94b7260332395b0bc2 Author: Christoph Hellwig Date: Wed May 1 12:14:00 2019 -0400 scsi: scsi_transport_iscsi: switch to SPDX tags Use the the GPLv2+ SPDX tag instead of verbose boilerplate text. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/scsi_transport_iscsi.c | 15 +-------------- include/scsi/scsi_transport_iscsi.h | 15 +-------------- 2 files changed, 2 insertions(+), 28 deletions(-) commit 518397c216aab84a65f7f3a96ff0582233c5e0ff Author: Christoph Hellwig Date: Wed May 1 12:13:59 2019 -0400 scsi: scsi_transport_fc: switch to SPDX tags Use the the GPLv2+ SPDX tag instead of verbose boilerplate text. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/scsi_transport_fc.c | 18 +----------------- include/scsi/scsi_transport_fc.h | 18 +----------------- 2 files changed, 2 insertions(+), 34 deletions(-) commit b01211b9c3b2f4a09874bb454c12eeaf65363e32 Author: Christoph Hellwig Date: Wed May 1 12:13:58 2019 -0400 scsi: scsi_transport_fc: remove duplicate GPL boilerplate text The FC transport class uapi headers already have proper SPDX tags, remove the duplicate boilerplate text. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen include/uapi/scsi/scsi_bsg_fc.h | 15 --------------- include/uapi/scsi/scsi_netlink_fc.h | 15 --------------- 2 files changed, 30 deletions(-) commit 2711770056aa5af970cf10e363ec496e79fb9735 Author: Christoph Hellwig Date: Wed May 1 12:13:57 2019 -0400 scsi: scsi_transport.h: switch to SPDX tags Use the the GPLv2+ SPDX tag instead of verbose boilerplate text. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen include/scsi/scsi_transport.h | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) commit 17bd0fb319a77d951aa989794898bc2d1caa05a8 Author: Christoph Hellwig Date: Wed May 1 12:13:56 2019 -0400 scsi: scsi_netlink: remove duplicate GPL boilerplate text The SCSI netlink uapi header already has a proper SPDX tag, remove the duplicate boilerplate text. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen include/uapi/scsi/scsi_netlink.h | 15 --------------- 1 file changed, 15 deletions(-) commit 22104afd732962ab673f5096ba5565667ea4f2b2 Author: Christoph Hellwig Date: Wed May 1 12:13:55 2019 -0400 scsi: core: switch the remaining scsi midlayer files to use SPDX tags Use the GPLv2 SPDX tag instead of verbose boilerplate text. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/scsi_logging.c | 3 +-- drivers/scsi/scsi_sysctl.c | 2 +- drivers/scsi/scsi_trace.c | 14 +------------- 3 files changed, 3 insertions(+), 16 deletions(-) commit 026104bfa591709689e12434c1bb3b485bf5bfa0 Author: Christoph Hellwig Date: Wed May 1 12:13:54 2019 -0400 scsi: core: add SPDX tags to scsi midlayer files missing licensing information Add the default kernel GPLv2 annotation to SCSI midlayer files missing any licensing information. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/hosts.c | 1 + drivers/scsi/scsi.c | 1 + drivers/scsi/scsi_debugfs.h | 1 + drivers/scsi/scsi_error.c | 1 + drivers/scsi/scsi_ioctl.c | 1 + drivers/scsi/scsi_lib.c | 1 + drivers/scsi/scsi_pm.c | 1 + drivers/scsi/scsi_sysfs.c | 1 + 8 files changed, 8 insertions(+) commit 9c12d739d69b80847e99d24692ff20de993bf172 Author: Serge Semin Date: Tue May 14 13:14:15 2019 +0300 tty: max310x: Split uart characters insertion loop Batch read mode doesn't check any conditions or flags except the Rx overflow one. But it may only happen after the last character is pushed into the RHR register. In this case we shouldn't push all the read characters with overrun flag set, but only the last one caused the FIFO overflow. This commit splits the characters retrieval loop into two parts. First one is ordinary intsert-chars procedure without taking the overrun status into account. Second part inserts the last character checking whether the overrun happened and pushing a '\0' character with TTY_OVERRUN flag to a flip-buffer. If we left the loop the way it was the '\0' character would be inserted after each character retrieved at the overrun occasion. Signed-off-by: Serge Semin Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/max310x.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 2b9e6f0a400b6be1a408cd63ed09cfeb8f5dd627 Author: Serge Semin Date: Tue May 14 13:14:14 2019 +0300 tty: max310x: Optionally enable rs485 on startup UART port might be pre-configured with rs485 enabled flag at the time of the port starting up process. In this case we need to have the hardware rs485-related registers initialized in accordance with the rs485 flags and settings provided by the configs descriptor. Signed-off-by: Serge Semin Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/max310x.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 68f22c0c99d9c3534b88d1cd1215753a7a3655aa Author: Serge Semin Date: Tue May 14 13:14:13 2019 +0300 tty: max310x: Add rx-during-tx rs485 flag support The driver currently sets the echo suppression bit by default when rs485 is enabled. Naturally it disables any data retrieval in rs485 mode while RTSn is pushed up. The receiver gate (RX_) can be enabled just by clearing (or not setting) the EchoSuprs bit of mode2 register. So by setting or clearing the bit we implement the SER_RS485_RX_DURING_TX rs485 flag support. Signed-off-by: Serge Semin Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/max310x.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) commit 35240ba26a932b279a513f66fa4cabfd7af55221 Author: Serge Semin Date: Tue May 14 13:14:12 2019 +0300 tty: max310x: Fix invalid baudrate divisors calculator Current calculator doesn't do it' job quite correct. First of all the max310x baud-rates generator supports the divisor being less than 16. In this case the x2/x4 modes can be used to double or quadruple the reference frequency. But the current baud-rate setter function just filters all these modes out by the first condition and setups these modes only if there is a clocks-baud division remainder. The former doesn't seem right at all, since enabling the x2/x4 modes causes the line noise tolerance reduction and should be only used as a last resort to enable a requested too high baud-rate. Finally the fraction is supposed to be calculated from D = Fref/(c*baud) formulae, but not from D % 16, which causes the precision loss. So to speak the current baud-rate calculator code works well only if the baud perfectly fits to the uart reference input frequency. Lets fix the calculator by implementing the algo fully compliant with the fractional baud-rate generator described in the datasheet: D = Fref / (c*baud), where c={16,8,4} is the x1/x2/x4 rate mode respectively, Fref - reference input frequency. The divisor fraction is calculated from the same formulae, but making sure it is found with a resolution of 0.0625 (four bits). Signed-off-by: Serge Semin Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/max310x.c | 51 +++++++++++++++++++++++++++----------------- 1 file changed, 31 insertions(+), 20 deletions(-) commit b7382c73b2d7102154cb077dde9aa9370b776874 Author: Serge Semin Date: Tue May 14 13:14:11 2019 +0300 tty: max310x: Don't pass stacked buffers to SPI SPI transfer tx/rx buffers must be DMA-safe and the structure documentation clearly states this. Data declared on the system stack isn't DMA-safe [1]. Instead at least kernel memory should be used for the buffers. In order to fix this here we can create the buffers at the device probing stage and use them without any synchronization, since batch read/write methods are called from non-reentrant contexts - either from rx-event IRQ threaded handler or from the tx workqueue item. [1] Documentation/DMA-API-HOWTO.txt Signed-off-by: Serge Semin Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/max310x.c | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) commit 1b5d239af3dad5b2572c9dab2e70f6735410e18f Author: Serge Semin Date: Tue May 14 13:14:10 2019 +0300 tty: max310x: Introduce max310x_one port macro-wrapper uart_port structure instance is embedded into the max310x_one super-structure, which is accessed by some of the uart-port callback methods. In order to improve the callback's code readability lets define the to_max310x_port() wrapper which just translates the passed uart_port pointer to the max310x_one one. It is also going to be handy in future commits. Signed-off-by: Serge Semin Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/max310x.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 2987590b7846bc55530d02fcb568ce338a1e5bdd Author: Serge Semin Date: Tue May 14 13:14:09 2019 +0300 tty: max310x: Simplify tx-work item code Since cmwq introduction in the kernel, workqueues've been turned into non-reentrant execution contexts [1]. It means any work item is guaranteed to be executed by at most one worker system-wide at any given time. Since tx-handler max310x_handle_tx() is called by a single work item we don't need it to be self-protected by the mutex. We also don't need to check the tx work item pending state before scheduling it (which in the first place was racy btw), since cmwq will make sure to reschedule the item if it wasn't pending at the moment of schedule_work() call. [1] Documentation/core-api/workqueue.rst Signed-off-by: Serge Semin Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/max310x.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) commit 9f20e8843edf35a0e4869f9e52b0494cfb1c91fc Author: Doug Berger Date: Thu May 9 14:11:58 2019 -0700 tty: amba-pl011: allow shared interrupt The PL011 register space includes all necessary status bits to determine whether a device instance requires handling in response to an interrupt. Therefore, multiple instances of the device could be serviced by a single shared interrupt, which is the case on BCM7211. Signed-off-by: Doug Berger Signed-off-by: Florian Fainelli Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/amba-pl011.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dfaffb9dca90638f5e2e80f430283b7ecaeb1bb0 Author: Hao Lee Date: Tue Apr 30 00:24:02 2019 +0800 tty: serial: 8250: Fix type field in format string The dev_dbg statement should print the value of uart.port.mapbase instead of its address. Besides that, uart.port.irq and uart.port.iotype are all unsigned types, so using %u is more appropriate. Signed-off-by: Hao Lee Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_pnp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 525667c0259d6072016436b189ece597b32c1648 Author: Andy Shevchenko Date: Tue Apr 30 21:45:59 2019 +0300 serial: 8250_of: Use of_device_get_match_data() Use of_device_get_match_data() to simplify the code a bit. Signed-off-by: Andy Shevchenko Tested-by: John Garry Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_of.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit d0352ebdd8e087a7db7367784b0163a18bedcb4f Author: Hugues Fruchet Date: Thu Feb 28 15:25:45 2019 +0100 ARM: dts: stm32: enable OV5640 camera on stm32mp157c-ev1 board Enable OV5640 camera sensor driver of MB1379A extension board connected on CN7 connector of stm32mp157c-ev1 board: bus-width is set to 8, data-shift is set to 2 (lines 9:2 are used), hsync-active is set to 0 for horizontal synchro line active low, vsync-active is set to 0 for vertical synchro line active low and pclk-sample is set to 1 for pixel clock polarity sampling data on rising edge of the pixel clock signal. Signed-off-by: Hugues Fruchet Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp157c-ev1.dts | 56 +++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) commit 46cf917d0658c069aaddaf73cdef6baf2fe423da Author: Hugues Fruchet Date: Thu Feb 28 15:25:44 2019 +0100 ARM: dts: stm32: add DCMI pins to stm32mp157c Add DCMI pins to stm32mp157c. Signed-off-by: Hugues Fruchet Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp157-pinctrl.dtsi | 41 +++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit 477432b53be2bc454822a8d570a4407b00245805 Author: Hugues Fruchet Date: Thu Feb 28 15:25:43 2019 +0100 ARM: dts: stm32: add DCMI camera interface support on stm32mp157c Add DCMI camera interface support on stm32mp157c. Signed-off-by: Hugues Fruchet Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp157c.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit ddabee1eb79e6d2d78b64e77f1c7b10d6db39f10 Author: Anson Huang Date: Tue May 21 08:17:02 2019 +0000 arm64: dts: imx8qxp: Add gpio alias Add i.MX8QXP GPIO alias for kernel GPIO driver usage. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 1f370972221bab336f5ab05f5ba79e6c0788cf86 Author: Anson Huang Date: Tue May 21 08:15:26 2019 +0000 arm64: dts: imx8mq: Add gpio alias Add i.MX8MQ GPIO alias for kernel GPIO driver usage. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mq.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit dd1f760bffcee2c567509033461dbcb01117b359 Author: Geert Uytterhoeven Date: Fri May 10 12:46:35 2019 +0200 pinctrl: sh-pfc: r8a7778: Use common PORT_GP_CFG_27() macro Get rid of the custom PORT_GP_PUP_27() macro by using the common PORT_GP_CFG_27() macro instead. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman drivers/pinctrl/sh-pfc/pfc-r8a7778.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) commit fbc5108d93fff92e76c41a59fe07062be84dc720 Author: Geert Uytterhoeven Date: Fri May 10 12:44:21 2019 +0200 pinctrl: sh-pfc: Add PORT_GP_27 helper macro This follows the style of the existing PORT_GP_X macros, and will be used by a follow-up patch for the r8a7778 SoC. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman drivers/pinctrl/sh-pfc/sh_pfc.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit be1c072d66282b4633239b8a74432cf3a95d5b22 Author: Geert Uytterhoeven Date: Fri May 3 11:02:29 2019 +0200 pinctrl: sh-pfc: r8a77965: Add TPU pins, groups and functions Add pins, groups and functions for the 16-Bit Timer Pulse Unit outputs on the R-Car M3-N SoC. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman drivers/pinctrl/sh-pfc/pfc-r8a77965.c | 42 +++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit 32ba9f222edb92278ec8eadfc6100c7922dc2ad7 Author: Geert Uytterhoeven Date: Fri May 3 11:01:41 2019 +0200 pinctrl: sh-pfc: r8a7796: Add TPU pins, groups and functions Add pins, groups and functions for the 16-Bit Timer Pulse Unit outputs on the R-Car M3-W and RZ/G2M SoCs. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 46 ++++++++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) commit 9141d4558fcc635c4ec3b5ddd99f24d8df7fe6e0 Author: Geert Uytterhoeven Date: Fri May 3 11:01:18 2019 +0200 pinctrl: sh-pfc: r8a7795: Add TPU pins, groups and functions Add pins, groups and functions for the 16-Bit Timer Pulse Unit outputs on revisions ES2.x and later of the R-Car H3 SoC. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 42 ++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit 0cbdf1b876243c73a795783ce69004302e250a43 Author: Geert Uytterhoeven Date: Fri May 3 11:00:02 2019 +0200 pinctrl: sh-pfc: r8a7795-es1: Add TPU pins, groups and functions Add pins, groups and functions for the 16-Bit Timer Pulse Unit outputs on revision ES1.x of the R-Car H3 SoC. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c | 42 ++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit e7ad751628900d579fec773aef8c750452063dc6 Author: Geert Uytterhoeven Date: Mon Apr 1 15:46:26 2019 +0200 pinctrl: sh-pfc: r8a77970: Remove MMC_{CD,WP} Hardware Manual Errata for rev. 1.50 of March 26, 2019 removed the bit definitions for MMC_CD and MMC_WP in the documentation for the IPSR6 and IPSR7 registers, as these pin functionalities do not exist on R-Car V3M. Remove the definitions, and the corrresponding pins and groups. Signed-off-by: Geert Uytterhoeven Reviewed-by: Sergei Shtylyov drivers/pinctrl/sh-pfc/pfc-r8a77970.c | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) commit 4d1816cd6724dccc8e918f7181d2bd6a6ffb31b5 Author: Geert Uytterhoeven Date: Thu Mar 21 13:18:01 2019 +0100 pinctrl: sh-pfc: Move PIN_NONE to shared header file Several drivers have identical definitions for PIN_NONE. Provide a definition with a SH_PFC_ prefix for general use in sh_pfc.h, and convert all drivers over to use it. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman drivers/pinctrl/sh-pfc/pfc-r8a7778.c | 76 +++++++++++++-------------- drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c | 53 ++++++++++--------- drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 53 ++++++++++--------- drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 55 ++++++++++---------- drivers/pinctrl/sh-pfc/pfc-r8a77965.c | 55 ++++++++++---------- drivers/pinctrl/sh-pfc/pfc-r8a77990.c | 89 ++++++++++++++++---------------- drivers/pinctrl/sh-pfc/sh_pfc.h | 2 + 7 files changed, 189 insertions(+), 194 deletions(-) commit f1074e7281a2e83b1cca7dee8f7005fbcc1f594e Author: Geert Uytterhoeven Date: Thu Mar 21 16:17:47 2019 +0100 pinctrl: sh-pfc: Add SH_PFC_PIN_CFG_PULL_UP_DOWN shorthand It is very common for a pin to support both pull-up and pull-down functionality. Hence add a shorthand SH_PFC_PIN_CFG_PULL_UP_DOWN. This not only reduces typing, but also avoids the need for several line breaks, and makes many overly long lines shorter, improving readability. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman drivers/pinctrl/sh-pfc/pfc-r8a73a4.c | 2 +- drivers/pinctrl/sh-pfc/pfc-r8a7740.c | 2 +- drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c | 12 +++++------- drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 12 +++++------- drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 12 +++++------- drivers/pinctrl/sh-pfc/pfc-r8a77965.c | 12 +++++------- drivers/pinctrl/sh-pfc/pfc-r8a77990.c | 3 +-- drivers/pinctrl/sh-pfc/pfc-sh73a0.c | 2 +- drivers/pinctrl/sh-pfc/pinctrl.c | 3 +-- drivers/pinctrl/sh-pfc/sh_pfc.h | 2 ++ 10 files changed, 27 insertions(+), 35 deletions(-) commit bd79c92039f117a3e448b9ef042595497a5218a6 Author: Geert Uytterhoeven Date: Thu Mar 21 16:17:47 2019 +0100 pinctrl: sh-pfc: Rename 2-parameter CPU_ALL_PORT() variant There are two variants of the CPU_ALL_PORT() macro in use: 1. A three-parameter variant, to be provided for SoCs with a linear GPIO pin space ("PORT style"), 2. A two-parameter variant, to be provided for SoCs with 32-port GPIO banks ("GP port style"). Rename the 2-parameter variant to CPU_ALL_GP(), to avoid confusion, and to increase naming consistency. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman drivers/pinctrl/sh-pfc/pfc-r8a77470.c | 2 +- drivers/pinctrl/sh-pfc/pfc-r8a7778.c | 2 +- drivers/pinctrl/sh-pfc/pfc-r8a7779.c | 2 +- drivers/pinctrl/sh-pfc/pfc-r8a7790.c | 2 +- drivers/pinctrl/sh-pfc/pfc-r8a7791.c | 2 +- drivers/pinctrl/sh-pfc/pfc-r8a7792.c | 2 +- drivers/pinctrl/sh-pfc/pfc-r8a7794.c | 2 +- drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c | 2 +- drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 2 +- drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 2 +- drivers/pinctrl/sh-pfc/pfc-r8a77965.c | 2 +- drivers/pinctrl/sh-pfc/pfc-r8a77970.c | 2 +- drivers/pinctrl/sh-pfc/pfc-r8a77980.c | 2 +- drivers/pinctrl/sh-pfc/pfc-r8a77990.c | 2 +- drivers/pinctrl/sh-pfc/pfc-r8a77995.c | 2 +- drivers/pinctrl/sh-pfc/pfc-sh7734.c | 2 +- drivers/pinctrl/sh-pfc/sh_pfc.h | 6 +++--- 17 files changed, 19 insertions(+), 19 deletions(-) commit 542ffc9e026a3f736eeaa041823d406510f40a12 Author: Geert Uytterhoeven Date: Wed Mar 27 11:41:36 2019 +0100 pinctrl: sh-pfc: Validate pin tables at runtime Extend the run-time debug code with checks to ensure there are no conflicting pin names, numbers, or enumeration values. This helps catching bugs early. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman drivers/pinctrl/sh-pfc/core.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 3dd5fd79f07103f7cda30567f8bf85a854796dd6 Author: Geert Uytterhoeven Date: Thu Apr 25 10:33:55 2019 +0200 pinctrl: sh-pfc: Add check for empty pinmux groups/functions The pinmux groups and functions arrays may contain two parts, to ease supporting SoCs that expose pin subsets of other related SoCs. Both parts need to be declared with explicit sizes, which thus need to be updated when adding support for more groups and functions. If a size is too small, the compiler will detect this at build time ("excess elements in array initializer"). If a size is too large, this may go undetected (for pin groups), lead to pin controller registration failures (for pin functions: "pinmux ops has no name for functionN"), or crash the optional run-time debug code (for pin groups). Extend the run-time debug code with checks to detect this, to help catching bugs early. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman drivers/pinctrl/sh-pfc/core.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 80cde64f68ff09617f89e78dfadf5a6873be87a8 Author: Geert Uytterhoeven Date: Thu Apr 25 10:54:11 2019 +0200 pinctrl: sh-pfc: Mark run-time debug code __init All run-time debug code is called from sh_pfc_init(), which is __init. Fixes: 6161b39a14380815 ("pinctrl: sh-pfc: Validate pinmux tables at runtime when debugging") Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman drivers/pinctrl/sh-pfc/core.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 5f304f8c87c71572da4ee514eb2ec50f8f4d2e26 Author: Geert Uytterhoeven Date: Thu Apr 25 10:51:46 2019 +0200 pinctrl: sh-pfc: Correct printk level of group reference warning Improve wording while at it. Fixes: 6161b39a14380815 ("pinctrl: sh-pfc: Validate pinmux tables at runtime when debugging") Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman drivers/pinctrl/sh-pfc/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8b5d3dc6812f5be407ab868b8954a4cf9db151b8 Author: Pierre-Yves MORDRET Date: Fri May 17 10:42:08 2019 +0200 ARM: dts: stm32: enable Vivante GPU support on stm32mp157a-dk1 board Enable Vivante GPU driver for stm32mp157a-dk1 and dk2 boards. Signed-off-by: Pierre-Yves MORDRET Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp157a-dk1.dts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 0cc1bff0a605e8e2ae388ccc31a51845e225ce2c Author: Pierre-Yves MORDRET Date: Fri May 17 10:42:07 2019 +0200 ARM: dts: stm32: enable Vivante GPU support on stm32mp157c-ed1 board Enable Vivante GPU driver for stm32mp157c-ed1 board. Signed-off-by: Pierre-Yves MORDRET Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp157c-ed1.dts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 74344cfd15aa1db88051f4ad607760291a60b88e Author: Pierre-Yves MORDRET Date: Fri May 17 10:42:06 2019 +0200 ARM: dts: stm32: Add Vivante GPU support on STM32MP157c Append Vivante GPU DT configuration. Signed-off-by: Pierre-Yves MORDRET Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp157c.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit e7f30c257bd0187ebc6a1238bee5c8d87edd54e1 Author: Jacopo Mondi Date: Wed May 8 19:34:27 2019 +0200 clk: renesas: r8a7796: Add CMM clocks Add clock definitions for CMM units on Renesas R-Car Gen3 M3-W. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r8a7796-cpg-mssr.c | 3 +++ 1 file changed, 3 insertions(+) commit 8f23696d89c655cc3324017913920818d8ada121 Author: Olivier Moysan Date: Thu Apr 25 16:10:40 2019 +0200 ARM: dts: stm32: add i2s pins muxing on stm32mp157 Add I2S pins muxing to stm32mp157. Signed-off-by: Olivier Moysan Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp157-pinctrl.dtsi | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 84f639acb3a35516fc3b4ceff678d5f9062ca557 Author: Olivier Moysan Date: Thu Apr 25 16:10:39 2019 +0200 ARM: dts: stm32: add i2s support on stm32mp157c This patch adds support of STM32 I2S on stm32mp157c. Signed-off-by: Olivier Moysan Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp157c.dtsi | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit ae658082d0ba56d037e793fafa7ad8ecb46935cc Author: Olivier Moysan Date: Thu Apr 25 16:10:38 2019 +0200 ARM: dts: stm32: add sai pins muxing on stm32mp157 Add SAI pins muxing to stm32mp157. Signed-off-by: Olivier Moysan Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp157-pinctrl.dtsi | 73 +++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) commit 5afd65c3a0609ef41380a6e8430f4bb162c52ca8 Author: Olivier Moysan Date: Thu Apr 25 16:10:37 2019 +0200 ARM: dts: stm32: add sai support on stm32mp157c This patch adds support of STM32 SAI on stm32mp157c. Signed-off-by: Olivier Moysan Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp157c.dtsi | 125 +++++++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) commit 54bbb6654450036d1e171fc4d335fa8e942b6f87 Author: Cao Van Dong Date: Thu Apr 25 10:25:13 2019 +0900 clk: renesas: r8a779{5|6|65}: Add TPU clock This patch adds the TPU clock on the R-Car r8a7795/r8a7796/r8a77965 SoCs. Signed-off-by: Cao Van Dong Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r8a7795-cpg-mssr.c | 1 + drivers/clk/renesas/r8a7796-cpg-mssr.c | 1 + drivers/clk/renesas/r8a77965-cpg-mssr.c | 1 + 3 files changed, 3 insertions(+) commit 04645a12b78809280dfc23a7c5372a767d2b5cde Author: Ludovic Barre Date: Fri Mar 8 16:10:23 2019 +0100 ARM: dts: stm32: add jedec compatible for nor flash on stm32mp157c-ev1 This patch adds jedec compatible for spi-nor flash on stm32mp157c-ev1 (needed with new spi-mem interface). Signed-off-by: Ludovic Barre Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp157c-ev1.dts | 2 ++ 1 file changed, 2 insertions(+) commit e79fe5fa6dca9e5cc7d2c81efad4a27c1dee5056 Author: Ludovic Barre Date: Fri Mar 8 16:10:22 2019 +0100 ARM: dts: stm32: add pinctrl sleep config for qspi on stm32mp157c-ev1 This patch adds pinctrl sleep config for qspi on stm32mp157c-ev1 Signed-off-by: Ludovic Barre Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp157-pinctrl.dtsi | 26 ++++++++++++++++++++++++++ arch/arm/boot/dts/stm32mp157c-ev1.dts | 3 ++- 2 files changed, 28 insertions(+), 1 deletion(-) commit e033958e74d7a86e373ba6e7a4a83b53a2693889 Author: Jeremy Sowden Date: Tue May 21 08:56:29 2019 +0100 staging: kpc2000: removed two kpc_uio_class device attributes. The show functions of two attributes output nothing and they are unused. Removed them. Signed-off-by: Jeremy Sowden Reported-by: Matt Sickler Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/cell_probe.c | 16 ---------------- 1 file changed, 16 deletions(-) commit cd88d2b11dc34b794e65d7aec64bd35086749945 Author: Jeremy Sowden Date: Tue May 21 08:56:28 2019 +0100 staging: kpc2000: added separate show functions for kpc_uio_class device attributes, defined them as read-only and declared them static. Defined separate simple show functions for each attribute instead of having a one big one containing a chain of conditionals. Replaced scnprintf calls with sprintf since all the outputs are short bounded strings or single integers. All of the device attributes are read-only, so used DEVICE_ATTR_RO to define them. The definitions are only used to populate the kpc_uio_class_attrs attribute array, so declared them as static. Fixes the following sparse warnings: drivers/staging/kpc2000/kpc2000/cell_probe.c:220:1: warning: symbol 'dev_attr_offset' was not declared. Should it be static? drivers/staging/kpc2000/kpc2000/cell_probe.c:221:1: warning: symbol 'dev_attr_size' was not declared. Should it be static? drivers/staging/kpc2000/kpc2000/cell_probe.c:222:1: warning: symbol 'dev_attr_type' was not declared. Should it be static? drivers/staging/kpc2000/kpc2000/cell_probe.c:223:1: warning: symbol 'dev_attr_s2c_dma' was not declared. Should it be static? drivers/staging/kpc2000/kpc2000/cell_probe.c:224:1: warning: symbol 'dev_attr_c2s_dma' was not declared. Should it be static? drivers/staging/kpc2000/kpc2000/cell_probe.c:225:1: warning: symbol 'dev_attr_irq_count' was not declared. Should it be static? drivers/staging/kpc2000/kpc2000/cell_probe.c:226:1: warning: symbol 'dev_attr_irq_base_num' was not declared. Should it be static? drivers/staging/kpc2000/kpc2000/cell_probe.c:227:1: warning: symbol 'dev_attr_core_num' was not declared. Should it be static? Signed-off-by: Jeremy Sowden Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/cell_probe.c | 135 ++++++++++++++++++--------- 1 file changed, 89 insertions(+), 46 deletions(-) commit ae63ed4c7d0857cb0ed3c69f7e597745706c0f59 Author: Nishka Dasgupta Date: Tue May 21 12:10:35 2019 +0530 staging: rtl8723bs: hal: Remove unused variable Remove local variable psdio which is declared but not used (or returned) in its function. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/sdio_ops.c | 1 - 1 file changed, 1 deletion(-) commit 6e9aed4ed4ca129510fcb1af495391d4717246d6 Author: Chris Brandt Date: Wed May 15 10:20:45 2019 -0500 dt-bindings: usb: renesas_usbhs: Add support for r7s9210 Add support for r7s9210 (RZ/A2M) SoC Signed-off-by: Chris Brandt Reviewed-by: Rob Herring Reviewed-by: Yoshihiro Shimoda Reviewed-by: Simon Horman Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/usb/renesas_usbhs.txt | 2 ++ 1 file changed, 2 insertions(+) commit b69dce6341053cd51f3692a2ab3825140fad6ab8 Author: Chris Brandt Date: Wed May 15 10:20:44 2019 -0500 usb: renesas_usbhs: Add support for RZ/A2 The RZ/A2 is similar to the R-Car Gen3 with some small differences. Signed-off-by: Chris Brandt Reviewed-by: Simon Horman Signed-off-by: Greg Kroah-Hartman drivers/usb/renesas_usbhs/Makefile | 2 +- drivers/usb/renesas_usbhs/common.c | 15 ++++++++ drivers/usb/renesas_usbhs/rza.h | 1 + drivers/usb/renesas_usbhs/rza2.c | 72 ++++++++++++++++++++++++++++++++++++++ include/linux/usb/renesas_usbhs.h | 1 + 5 files changed, 90 insertions(+), 1 deletion(-) commit f756066990607dbe8ea5579c925b48e646891f3e Author: Chris Brandt Date: Wed May 15 10:20:43 2019 -0500 usb: renesas_usbhs: support byte addressable CFIFO Some SoC have a CFIFO register that is byte addressable. This means when the CFIFO access is set to 32-bit, you can write 8-bit values to addresses CFIFO+0, CFIFO+1, CFIFO+2, CFIFO+3. Signed-off-by: Chris Brandt Reviewed-by: Yoshihiro Shimoda Reviewed-by: Simon Horman Signed-off-by: Greg Kroah-Hartman drivers/usb/renesas_usbhs/fifo.c | 9 +++++++-- include/linux/usb/renesas_usbhs.h | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) commit 2195e3af9079ea067079e98446ea6a457c81a98c Author: Chris Brandt Date: Wed May 15 10:20:42 2019 -0500 usb: renesas_usbhs: add support for CNEN bit For some SoC, CNEN must be set for USB Device mode operation. Signed-off-by: Chris Brandt Reviewed-by: Yoshihiro Shimoda Reviewed-by: Simon Horman Signed-off-by: Greg Kroah-Hartman drivers/usb/renesas_usbhs/common.c | 6 ++++++ drivers/usb/renesas_usbhs/common.h | 1 + include/linux/usb/renesas_usbhs.h | 1 + 3 files changed, 8 insertions(+) commit 97a7968448cb0ef5c15e3d395746b108b1a55556 Author: Chris Brandt Date: Wed May 15 10:20:41 2019 -0500 usb: renesas_usbhs: move flags to param Move options from 'flags' field in private structure to param structure where other options are already being kept. Signed-off-by: Chris Brandt Reviewed-by: Yoshihiro Shimoda Reviewed-by: Simon Horman Signed-off-by: Greg Kroah-Hartman drivers/usb/renesas_usbhs/common.c | 23 +++++++---------------- drivers/usb/renesas_usbhs/common.h | 2 -- include/linux/usb/renesas_usbhs.h | 1 + 3 files changed, 8 insertions(+), 18 deletions(-) commit b051c93746543385f398b6b8002a51e9d43143a6 Author: Chris Brandt Date: Wed May 15 10:20:40 2019 -0500 dt-bindings: rcar-gen3-phy-usb2: Add r7s9210 support Document RZ/A2 (R7S9210) SoC bindings. Signed-off-by: Chris Brandt Reviewed-by: Rob Herring Reviewed-by: Yoshihiro Shimoda Reviewed-by: Simon Horman Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 804898e8bc43080c9194ae7e1807bf0e995bad73 Author: Chris Brandt Date: Wed May 15 10:20:39 2019 -0500 dt-bindings: rcar-gen3-phy-usb2: Document dr_mode Document the optional dr_mode property Signed-off-by: Chris Brandt Reviewed-by: Rob Herring Reviewed-by: Yoshihiro Shimoda Reviewed-by: Simon Horman Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt | 3 +++ 1 file changed, 3 insertions(+) commit 561759292774707b71ee61aecc07724905bb7ef1 Author: Thinh Nguyen Date: Tue May 14 14:38:38 2019 -0700 usb: core: hub: Disable hub-initiated U1/U2 If the device rejects the control transfer to enable device-initiated U1/U2 entry, then the device will not initiate U1/U2 transition. To improve the performance, the downstream port should not initate transition to U1/U2 to avoid the delay from the device link command response (no packet can be transmitted while waiting for a response from the device). If the device has some quirks and does not implement U1/U2, it may reject all the link state change requests, and the downstream port may resend and flood the bus with more requests. This will affect the device performance even further. This patch disables the hub-initated U1/U2 if the device-initiated U1/U2 entry fails. Reference: USB 3.2 spec 7.2.4.2.3 Signed-off-by: Thinh Nguyen Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hub.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) commit fea3af5e0358b014c653561109c11ebd3ecdbff2 Author: Thinh Nguyen Date: Tue May 14 14:38:31 2019 -0700 usb: core: hub: Enable/disable U1/U2 in configured state SET_FEATURE(U1/U2_ENABLE) and CLEAR_FEATURE(U1/U2) only apply while the device is in configured state. Add proper check in usb_disable_lpm() and usb_enable_lpm() for enabling/disabling device-initiated U1/U2. Signed-off-by: Thinh Nguyen Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e2317ce8bebc2d09fc622824b881fb0bc78d7683 Author: Anson Huang Date: Tue May 14 06:08:29 2019 +0000 arm64: dts: imx8mq: Remove unnecessary blank lines Unnecessary blank lines do NOT help readability, so remove them. Signed-off-by: Anson Huang Reviewed-by: Daniel Baluta Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mq.dtsi | 2 -- 1 file changed, 2 deletions(-) commit d991f855cb4f84c638e2016818259720ceed4191 Author: Bartlomiej Zolnierkiewicz Date: Mon May 20 16:14:33 2019 +0200 usb: remove redundant 'default n' from Kconfig-s 'default n' is the default value for any bool or tristate Kconfig setting so there is no need to write it explicitly. Also since commit f467c5640c29 ("kconfig: only write '# CONFIG_FOO is not set' for visible symbols") the Kconfig behavior is the same regardless of 'default n' being present or not: ... One side effect of (and the main motivation for) this change is making the following two definitions behave exactly the same: config FOO bool config FOO bool default n With this change, neither of these will generate a '# CONFIG_FOO is not set' line (assuming FOO isn't selected/implied). That might make it clearer to people that a bare 'default n' is redundant. ... Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Greg Kroah-Hartman drivers/usb/atm/Kconfig | 1 - drivers/usb/core/Kconfig | 1 - drivers/usb/dwc2/Kconfig | 1 - drivers/usb/gadget/legacy/Kconfig | 2 -- drivers/usb/host/Kconfig | 5 ----- drivers/usb/renesas_usbhs/Kconfig | 1 - 6 files changed, 11 deletions(-) commit 3c6b8625dde82600fd03ad1fcba223f1303ee535 Author: Sam Bobroff Date: Tue May 21 15:28:39 2019 +1000 drm/bochs: Fix connector leak during driver unload When unloading the bochs-drm driver, a warning message is printed by drm_mode_config_cleanup() because a reference is still held to one of the drm_connector structs. Correct this by calling drm_atomic_helper_shutdown() in bochs_pci_remove(). Fixes: 6579c39594ae ("drm/bochs: atomic: switch planes to atomic, wire up helpers.") Signed-off-by: Sam Bobroff Link: http://patchwork.freedesktop.org/patch/msgid/93b363ad62f4938d9ddf3e05b2a61e3f66b2dcd3.1558416473.git.sbobroff@linux.ibm.com Signed-off-by: Gerd Hoffmann drivers/gpu/drm/bochs/bochs_drv.c | 2 ++ 1 file changed, 2 insertions(+) commit be21a02a5a5ec88b12ce535ead715d4bbb173a55 Author: Yoshihiro Shimoda Date: Mon May 13 11:40:29 2019 +0900 usb: renesas_usbhs: Use specific struct instead of USBHS_TYPE_* enums This patch adds a specific struct "usbhs_of_data" to add a new SoC data easily instead of code basis in the future. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Greg Kroah-Hartman drivers/usb/renesas_usbhs/common.c | 112 +++++++++++++++++++++---------------- drivers/usb/renesas_usbhs/common.h | 5 ++ 2 files changed, 70 insertions(+), 47 deletions(-) commit 4e4feeec4e6cf6d0e14a45470c7f232cb685336b Author: Naveen Kumar Parna Date: Thu May 16 20:49:23 2019 +0530 USB: OHCI: remove space before open square bracket '[' This patch removes following checkpatch.pl error in usb/host/ohci-pci.c file. ERROR: space prohibited before open square bracket '[' Signed-off-by: Naveen Kumar Parna Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ohci-pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 12629c5c3749e858c142eb3618e5ead5b97ac699 Author: Leonard Crestez Date: Mon May 13 11:01:43 2019 +0000 arm64: dts: imx8mq: Add cpu speed grading and all OPPs Add nvmem-cells reference to cpu and fill the OPP table with all known OPPs. Signed-off-by: Leonard Crestez Acked-by: Viresh Kumar Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mq.dtsi | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) commit f403a26c865b3b70433641928433f400f03ea6b7 Author: Leonard Crestez Date: Mon May 13 11:01:41 2019 +0000 arm64: dts: imx8mm: Add cpu speed grading and all OPPs Add a nvmem cell on cpu node referencing speed grade and the 1.8 Ghz cpufreq opp. Signed-off-by: Leonard Crestez Acked-by: Viresh Kumar Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mm.dtsi | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit 2619646b52243b8984970ddc59eb59c0a56716db Author: Amelie Delaunay Date: Fri May 10 09:49:55 2019 +0200 ARM: dts: stm32: add joystick support on stm32mp157c-ev1 The joystick (B1) on stm32mp157c-ev1 uses gpios on STMFX gpio expander. These gpios need a pin configuration (push-pull and bias-pull-down), described under stmfx_pinctrl node. Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp157c-ev1.dts | 44 +++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit 98c2663b38047cb3751507d7e2a476a96a17105e Author: Amelie Delaunay Date: Fri May 10 09:49:54 2019 +0200 ARM: dts: stm32: add STMFX support on stm32mp157c-ev1 This patch adds support for STMicroelectronics Multi-Function eXpander (STMFX) on stm32mp157c-ev1. It is connected on i2c2. Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp157c-ev1.dts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit d1216af9968f5da90488b7e9839a6ecfff90aa1c Author: Amelie Delaunay Date: Fri May 10 09:49:53 2019 +0200 ARM: dts: stm32: add orange and blue leds on stm32746g-eval Orange (LD2) and blue (LD4) leds on stm32746g-eval are connected on STMFX gpio expander, offset 17 and 19. Signed-off-by: Amelie Delaunay Acked-by: Linus Walleij Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32746g-eval.dts | 6 ++++++ 1 file changed, 6 insertions(+) commit d4c986b77cd559d83085003672a449bc83a9efee Author: Amelie Delaunay Date: Fri May 10 09:49:52 2019 +0200 ARM: dts: stm32: add joystick support on stm32746g-eval The joystick (B3) on stm32746g-eval uses gpios on STMFX gpio expander. These gpios need a pin configuration (push-pull and bias-pull-up), described under stmfx_pinctrl node. Signed-off-by: Amelie Delaunay Acked-by: Linus Walleij Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32746g-eval.dts | 43 ++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) commit a1975755f59e548bf5d318f60be9ff81ab5170e6 Author: Amelie Delaunay Date: Fri May 10 09:49:51 2019 +0200 ARM: dts: stm32: add STMFX support on stm32746g-eval This patch adds support for STMicroelectronics Multi-Function eXpander (STMFX) on stm32746g-eval. It is connected on i2c1. Signed-off-by: Amelie Delaunay Acked-by: Linus Walleij Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32746g-eval.dts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit b725e262ba1db501586ee1c66f939af125ffe40e Author: Alexandre Torgue Date: Wed Apr 10 13:30:24 2019 +0200 ARM: dts: stm32: use dedicated files to manage stm32mp157 packages Four packages exist for stm32mp157 die. As ball-out is different between them, this patch covers those differences by creating dedicated pinctrl dtsi files. Each dtsi pinctrl package file describes the package ball-out through gpio-ranges. stm32mp157a-dk1 / dk2 boards embed a STM32MP_PKG_AC (TFBGA361 (12*12)) package. stm32mp157c-ed1 / ev1 boards embed a STM32MP_PKG_AA (LFBGA448 (18*18)) package. Acked-by: Linus Walleij Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32mp157-pinctrl.dtsi | 12 ++++ arch/arm/boot/dts/stm32mp157a-dk1.dts | 2 +- arch/arm/boot/dts/stm32mp157c-ed1.dts | 2 +- arch/arm/boot/dts/stm32mp157xaa-pinctrl.dtsi | 90 ++++++++++++++++++++++++++++ arch/arm/boot/dts/stm32mp157xab-pinctrl.dtsi | 62 +++++++++++++++++++ arch/arm/boot/dts/stm32mp157xac-pinctrl.dtsi | 78 ++++++++++++++++++++++++ arch/arm/boot/dts/stm32mp157xad-pinctrl.dtsi | 62 +++++++++++++++++++ 7 files changed, 306 insertions(+), 2 deletions(-) commit 1a6e9e76b713d9632783efe78295ed3507fdad64 Author: Dan Williams Date: Mon May 20 13:44:57 2019 +0100 device-dax: Drop register_filesystem() The device-dax fs is only there to allocate a common inode for each device-node that refers to the same device by major:minor. It is otherwise not user mountable and need not be displayed in /proc/filesystems. Reported-by: Al Viro Acked-by: Al Viro Signed-off-by: Dan Williams Signed-off-by: Al Viro drivers/dax/super.c | 7 ------- 1 file changed, 7 deletions(-) commit 7e5f7bb08b8cefd3a7e8961861f47fe1f0e830d4 Author: Al Viro Date: Mon May 20 13:44:57 2019 +0100 unexport simple_dname() Signed-off-by: Al Viro fs/d_path.c | 1 - fs/internal.h | 1 + include/linux/dcache.h | 1 - 3 files changed, 1 insertion(+), 2 deletions(-) commit 4de1e3a8ecec3432ed6ed7da0b90b34750358899 Author: David Howells Date: Tue May 21 08:22:17 2019 +0100 z3fold: don't bother with dentry_operations Don't bother with dentry_operations as no dentry is ever allocated. Signed-off-by: David Howells mm/z3fold.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 01d4071486fe18ec91f78725d81c7e46557c629a Author: Marek Szyprowski Date: Mon May 20 11:08:23 2019 +0200 usb: exynos: add workaround for the USB device bindings conflict Commit 69bec7259853 ("USB: core: let USB device know device node") added support for attaching devicetree node for USB devices. Those nodes are children of their USB host controller. However Exynos EHCI and OHCI driver bindings already define child-nodes for each physical root hub port and assigns respective PHY controller and parameters to them. Those bindings predates support for USB device tree nodes. To mitigate the side-effects of the conflict between those bindings, lets reset Exynos host controller of_node pointer before registering it to USB subsystem. This fixes the issue raised by the commit 01fdf179f4b0 ("usb: core: skip interfaces disabled in devicetree"), which incorrectly disabled some devices on Exynos based boards. Reported-by: Markus Reichl Suggested-by: Måns Rullgård Signed-off-by: Marek Szyprowski Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ehci-exynos.c | 11 +++++++++++ drivers/usb/host/ohci-exynos.c | 11 +++++++++++ 2 files changed, 22 insertions(+) commit 3a38e874d70b1c80a3e3118be6fc010b558cc050 Author: Shuah Khan Date: Thu May 2 13:47:18 2019 -0600 usbip: usbip_host: cleanup do_rebind() return path Cleanup do_rebind() return path and use common return path. Signed-off-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/stub_main.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 987d864a236332571e7621588f50a2619023debc Author: Quentin Deslandes Date: Mon May 20 16:39:05 2019 +0000 staging: vt6656: manage error path during device initialization Check for error during device initialization callback and return a meaningful error code or zero on success. Signed-off-by: Quentin Deslandes Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6656/main_usb.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit 07ba60a15843ec22a4eba90ea6baba2e7df75dca Author: Quentin Deslandes Date: Mon May 20 16:39:04 2019 +0000 staging: vt6656: clean-up registers initialization error path Avoid discarding function's return code during register initialization. Handle it instead and return 0 on success or a negative errno value on error. Signed-off-by: Quentin Deslandes Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6656/main_usb.c | 163 ++++++++++++++++++++++---------------- 1 file changed, 96 insertions(+), 67 deletions(-) commit d8c2869300ab5f7a19bf6f5a04fe473c5c9887e3 Author: Quentin Deslandes Date: Mon May 20 16:39:04 2019 +0000 staging: vt6656: use meaningful error code during buffer allocation Check on called function's returned value for error and return 0 on success or a negative errno value on error instead of a boolean value. Signed-off-by: Quentin Deslandes Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6656/main_usb.c | 42 ++++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 14 deletions(-) commit cc81234ad7c7b766e640d2938dcf3ef08123a277 Author: Quentin Deslandes Date: Mon May 20 16:39:03 2019 +0000 staging: vt6656: clean error path for firmware management Avoid discarding return value of functions called during firmware management process. Handle such return value and return 0 on success or a negative errno value on error. Signed-off-by: Quentin Deslandes Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6656/firmware.c | 91 +++++++++++++++++---------------------- 1 file changed, 40 insertions(+), 51 deletions(-) commit 7156f7d9c38799ebb5d9d92e90207ff227ec4ade Author: Quentin Deslandes Date: Mon May 20 16:39:02 2019 +0000 staging: vt6656: avoid discarding called function's return code Change some of the driver's functions in order to handle error codes instead of discarding them. These function now returns 0 on success and a negative errno value on error. Signed-off-by: Quentin Deslandes Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6656/baseband.c | 130 ++++++++++++++++++++++++++------------ drivers/staging/vt6656/baseband.h | 8 +-- drivers/staging/vt6656/card.c | 20 ++++-- drivers/staging/vt6656/int.c | 8 ++- drivers/staging/vt6656/int.h | 2 +- drivers/staging/vt6656/mac.c | 19 +++--- drivers/staging/vt6656/mac.h | 6 +- drivers/staging/vt6656/rf.c | 38 +++++++---- drivers/staging/vt6656/rf.h | 2 +- 9 files changed, 152 insertions(+), 81 deletions(-) commit 59608cb1de185613b3a7b1615a9b08480f5a566a Author: Quentin Deslandes Date: Mon May 20 16:39:01 2019 +0000 staging: vt6656: clean function's error path in usbpipe.c Avoid discarding called function's returned value. Store it instead in order to act accordingly. Update error path to return 0 on success and a negative errno value on error. Signed-off-by: Quentin Deslandes Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6656/usbpipe.c | 115 ++++++++++++++++++++++----------------- drivers/staging/vt6656/usbpipe.h | 4 +- 2 files changed, 67 insertions(+), 52 deletions(-) commit 3fd14ebc2d5233e0fd6a90486cb88f5592875a6b Author: Quentin Deslandes Date: Mon May 20 16:39:01 2019 +0000 staging: vt6656: fix potential NULL pointer dereference vnt_free_tx_bufs() relies on priv->tx_context elements to be NULL if they are not initialized (as vnt_free_rx_bufs() does). Add a check to these elements in order to avoid NULL pointer dereference. Signed-off-by: Quentin Deslandes Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6656/main_usb.c | 3 +++ 1 file changed, 3 insertions(+) commit a7bfc177d8a5865f4c14043d98a24b1e962289c5 Author: Puranjay Mohan Date: Mon May 20 23:50:59 2019 +0530 Staging: rtl8192u: ieee80211: Fix if-else coding style issue Fix following checkpatch.pl warning by adding braces around if statement: CHECK: braces {} should be used on all arms of this statement Signed-off-by: Puranjay Mohan Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7ccbc42a2bec72b5f1c0d99c595e90b8b4c6ba13 Author: Puranjay Mohan Date: Mon May 20 23:28:51 2019 +0530 Staging: rtl8188eu: core: Remove else after break Remove else after break statements to fix following checkpatch.pl warnings: WARNING: else is not generally useful after a break or return. Signed-off-by: Puranjay Mohan Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_mlme.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) commit d0222e9a6b4bb1d7c01b952468aab6296807411c Author: Yannick Loeck Date: Mon May 20 17:28:52 2019 +0200 staging: pi433: fix misspelling of packet Fixes the misspelling of packet in Signed-off-by: Yannick Loeck Signed-off-by: Greg Kroah-Hartman drivers/staging/pi433/rf69.c | 4 ++-- drivers/staging/pi433/rf69_registers.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 6bcd56b707d59029d9ecae40dc1bb3ba98a5c560 Author: Greg Kroah-Hartman Date: Mon May 20 10:47:16 2019 +0200 staging: kpc2000: remove SetBackEndControl() function As this is only called twice, just call writel() like a normal driver should :) At the same time, clean up the formatting for the irq handler, as there is no need to have that be incorrect, it just hurts the eyes... Cc: Matt Sickler Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/core.c | 15 ++++++++++----- drivers/staging/kpc2000/kpc2000/dma_common_defs.h | 5 ----- 2 files changed, 10 insertions(+), 10 deletions(-) commit 078ef50c2a1a7a6e86f5756c501f727b0e527c05 Author: Greg Kroah-Hartman Date: Mon May 20 10:47:15 2019 +0200 staging: kpc2000: dma_common_defs.h: remove unused inline functions The functions GetBackEndStatus() and BackEndControlSetClear() are never used by any code, so just remove them. Cc: Matt Sickler Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/dma_common_defs.h | 14 -------------- 1 file changed, 14 deletions(-) commit 8cac7b354a20742d515d6f649eea32e55a7086b2 Author: Greg Kroah-Hartman Date: Mon May 20 10:47:14 2019 +0200 staging: kpc2000: move the i2c driver out of its subdirectory There is no need for a subdirectory for just a single .c file. So move it out of kpc_i2c/ and rename it to the module name that we want the file to build to, saving one more linking stage. Cc: Matt Sickler Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/Makefile | 2 +- drivers/staging/kpc2000/{kpc_i2c/i2c_driver.c => kpc2000_i2c.c} | 2 +- drivers/staging/kpc2000/kpc_i2c/Makefile | 4 ---- 3 files changed, 2 insertions(+), 6 deletions(-) commit f900d81cb960097524be3705b050b60aa5959a83 Author: Greg Kroah-Hartman Date: Mon May 20 10:47:13 2019 +0200 staging: kpc2000: move the spi driver out of its subdirectory There is no need for a subdirectory for just a single .c file. So move it out of kpc_spi/ and rename it to the module name that we want the file to build to, saving one more linking stage. Cc: Matt Sickler Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/Makefile | 2 +- drivers/staging/kpc2000/{kpc_spi/spi_driver.c => kpc2000_spi.c} | 2 +- drivers/staging/kpc2000/kpc_spi/Makefile | 4 ---- 3 files changed, 2 insertions(+), 6 deletions(-) commit 64038897602f12555211c2914b1267fed8e10257 Author: Greg Kroah-Hartman Date: Mon May 20 10:47:12 2019 +0200 staging: kpc2000: remove spi_parts.h The structures defined in spi_parts.h belong in the .c file that uses it. So move it directly into spi_driver.c to make things simpler to manage. Cc: Matt Sickler Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc_spi/spi_driver.c | 43 ++++++++++++++++++++++++- drivers/staging/kpc2000/kpc_spi/spi_parts.h | 48 ---------------------------- 2 files changed, 42 insertions(+), 49 deletions(-) commit 89cfbcc9ecfca90eca5c65fbc4b30e90400db665 Author: Greg Kroah-Hartman Date: Mon May 20 10:47:11 2019 +0200 staging: kpc2000: fix coding style in pcie.h Use tabs in pcie.h, like is mandated. Cc: Matt Sickler Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/pcie.h | 106 ++++++++++++++++----------------- 1 file changed, 53 insertions(+), 53 deletions(-) commit bdd4a571f862db4ae8af606d11dd1d0ce0094f57 Author: Greg Kroah-Hartman Date: Mon May 20 10:47:10 2019 +0200 staging: kpc2000: remove fileops.c file. The fileops.c file does not need to be stand-alone, so move it into the core.c file. This lets us make some functions static, reducing the global namespace of the driver. Cc: Matt Sickler Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/Makefile | 2 +- drivers/staging/kpc2000/kpc2000/core.c | 114 ++++++++++++++++++++++++++- drivers/staging/kpc2000/kpc2000/fileops.c | 123 ------------------------------ drivers/staging/kpc2000/kpc2000/pcie.h | 3 - 4 files changed, 114 insertions(+), 128 deletions(-) commit 8d3f1fdf521165cac96a21e35f5a1630147d91b1 Author: Takashi Sakamoto Date: Sun May 19 19:01:09 2019 +0900 ALSA: firewire-lib: unify tracing events to 'amdtp_packet' event Now four events of this module have the same arguments and probe timing. This commit adds a new event, 'amdtp_packet', and replace them. Filtering functionality of tracing framework is available to pick up events for inbound/outbound isochronous packets. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/amdtp-stream-trace.h | 149 ++---------------------------------- sound/firewire/amdtp-stream.c | 10 +-- 2 files changed, 11 insertions(+), 148 deletions(-) commit bde2bbdb307a63e1829c113dba9a378eebe23b18 Author: Takashi Sakamoto Date: Sun May 19 19:01:08 2019 +0900 ALSA: firewire-lib: use dynamic array for CIP header of tracing events This modules handles two types of isochronous packet; one has CIP header in IEC 61883-1/6 and another doesn't. The module also have tracing events corresponding to the types of packet. To unify the events, one event should be probed with or without CIP header. This commit uses dynamic array for the events to be available for the types of packet. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/amdtp-stream-trace.h | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) commit a8520f3e9314edddf95479c4796f05b7d594be32 Author: Takashi Sakamoto Date: Sun May 19 19:01:07 2019 +0900 ALSA: firewire-lib: use the same unit for payload argument in tracing events The most of tracing event in this module have the size of payload in byte unit, however 'in_packet_without_header' event have the argument in quadlet unit. This commit change the unit for argument to be consistent. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/amdtp-stream-trace.h | 12 ++++++------ sound/firewire/amdtp-stream.c | 6 ++---- 2 files changed, 8 insertions(+), 10 deletions(-) commit 64d0bf4d4977d18983bce6ad2868c9f75ec3a9f1 Author: Takashi Sakamoto Date: Sun May 19 19:01:06 2019 +0900 ALSA: firewire-lib: add data_blocks/data_block_counter parameter to in_packet/out_packet tracing events Tracing events for packets without CIP header have a parameter of data_blocks/data_block_counter, but events for packets with CIP header don't. This is not good to unify these events. This commit adds the missing parameters to the events. In timing to probe 'in_packet' event, data_blocks and data_block_counter are not calculated yet. This commit also changes the timing. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/amdtp-stream-trace.h | 24 ++++++++++++++++++------ sound/firewire/amdtp-stream.c | 6 +++--- 2 files changed, 21 insertions(+), 9 deletions(-) commit 4a10cecc41825becb3283be5e310759f4994f2ea Author: Takashi Sakamoto Date: Sun May 19 19:01:05 2019 +0900 ALSA: firewire-lib: use the same type of argument for CIP header for tracing event An argument for CIP header in 'in_packet' event is not the same type in 'out_packet' event. This is not good to unify these events. This commit uses the same type of argument for these events. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/amdtp-stream-trace.h | 6 +++--- sound/firewire/amdtp-stream.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit f1222f5ee2c0908a2c537f37174b91ff88cfe987 Author: Anson Huang Date: Mon May 20 22:12:43 2019 -0700 Input: imx6ul_tsc - use devm_platform_ioremap_resource() to simplify code Use the new helper devm_platform_ioremap_resource() which wraps the platform_get_resource() and devm_ioremap_resource() together, to simplify the code. Signed-off-by: Anson Huang Reviewed-by: Mukesh Ojha Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/imx6ul_tsc.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit d8ea61c5af0ee615455130449186ac7b698155d9 Author: Anson Huang Date: Mon May 20 22:11:37 2019 -0700 Input: imx_keypad - use devm_platform_ioremap_resource() to simplify code Use the new helper devm_platform_ioremap_resource() which wraps the platform_get_resource() and devm_ioremap_resource() together, to simplify the code. Signed-off-by: Anson Huang Reviewed-by: Mukesh Ojha Signed-off-by: Dmitry Torokhov drivers/input/keyboard/imx_keypad.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 5f462872a192db55c278ac39da5e892cc23739a1 Author: Wolfram Sang Date: Mon May 20 21:59:33 2019 -0700 Input: da9063_onkey - convert header to SPDX Convert the header of the source file to SPDX. Signed-off-by: Wolfram Sang Reviewed-by: Simon Horman Acked-by: Steve Twiss Reviewed-by: Geert Uytterhoeven Signed-off-by: Dmitry Torokhov drivers/input/misc/da9063_onkey.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit 6981a2356181083ffa6d566323546eb7894cd87b Author: Wolfram Sang Date: Mon May 20 21:58:58 2019 -0700 Input: da9063_onkey - remove platform_data support There are no in-kernel users anymore, so remove this outdated interface. Signed-off-by: Wolfram Sang Reviewed-by: Simon Horman Acked-by: Steve Twiss Tested-by: Steve Twiss Reviewed-by: Geert Uytterhoeven Signed-off-by: Dmitry Torokhov drivers/input/misc/da9063_onkey.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit b5d89905d0391de2f0e04b709ab60eee6cf76a6e Author: Lars-Peter Clausen Date: Thu May 16 11:31:34 2019 +0300 dmaengine: axi-dmac: Sanity check memory mapped interface support The AXI-DMAC supports different types of interface for the data source and destination ports. Typically one of those ports is a memory-mapped interface while the other is some kind of streaming interface. The information about which kind of interface is used for each port is encoded in the devicetree. It is also possible in the driver to detect whether a port supports memory-mapped transfers or not. For streaming interfaces the address register is read-only and will always return 0. So in order to check if a port supports memory-mapped transfers write a non-zero value to the corresponding address register and check that the value read-back is still non zero. This allows to detect mismatches between the devicetree description and the actual hardware configuration. Unfortunately it is not possible to autodetect the interface types since there is no method to distinguish between the different streaming ports. So the best thing that can be done is to error out when a memory mapped port is described in the devicetree but none is detected in the hardware. Signed-off-by: Lars-Peter Clausen Signed-off-by: Alexandru Ardelean Signed-off-by: Vinod Koul drivers/dma/dma-axi-dmac.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) commit a3ee0bf23eaec2ae46fc6b1266bdaa5995b55c1e Author: Michael Hennerich Date: Thu May 16 12:44:30 2019 +0300 dmaengine: axi-dmac: Enable TLAST handling The TLAST flag is used by the DMAC HDL controller to signal to the controller that the following segment (to be submitted) is the last one (in a series of segments). A receiver DMA (typically another DMAC) can read this parameter (from the transfer), and terminate the transfer earlier. A typical use-case for this, is when the receiver expects a certain amount of segments, but for some reason (e.g. an ADC capture which can have an unknown number of digital samples) the number of actual segments is smaller. The receiver would read this flag, and then the DMAC would finish. Signed-off-by: Michael Hennerich Signed-off-by: Alexandru Ardelean Signed-off-by: Vinod Koul drivers/dma/dma-axi-dmac.c | 2 ++ 1 file changed, 2 insertions(+) commit 8add6cce98482da67e971addd7eae8f22f8e6c7a Author: Dragos Bogdan Date: Thu May 16 10:04:43 2019 +0300 dmaengine: axi-dmac: Add support for interleaved cyclic transfers The DMAC HDL core supports interleaved & cyclic transfers. An example use-case for this mode is when the controller is used as a video DMA. This change sets the `cyclic` field to true, so that when the IRQ comes and the `axi_dmac_transfer_done()` callback is called (from the interrupt handler) the proper `vchan_cyclic_callback()` is called. This way the DMAEngine framework will process data correctly for interleaved + cyclic transfers. This doesn't fix anything. It's an enhancement to the driver. Signed-off-by: Dragos Bogdan Signed-off-by: Alexandru Ardelean Signed-off-by: Vinod Koul drivers/dma/dma-axi-dmac.c | 3 +++ 1 file changed, 3 insertions(+) commit e40543931fe34d7808bf87398a0daca44c919d25 Author: Amelie Delaunay Date: Tue May 7 09:54:41 2019 +0200 dmaengine: stm32-dma: Fix redundant call to platform_get_irq Commit c6504be53972 ("dmaengine: stm32-dma: Fix unsigned variable compared with zero") duplicated the call to platform_get_irq. So remove the first call to platform_get_irq. Fixes: c6504be53972 ("dmaengine: stm32-dma: Fix unsigned variable compared with zero") Signed-off-by: Amelie Delaunay Signed-off-by: Vinod Koul drivers/dma/stm32-dma.c | 1 - 1 file changed, 1 deletion(-) commit d8b9626af54605c30f0ff4eebf6f7360e2212a89 Author: Paul Cercueil Date: Sat May 4 23:34:32 2019 +0200 dmaengine: jz4780: Use SPDX license notifier Use SPDX license notifier instead of plain text in the header. Signed-off-by: Paul Cercueil Signed-off-by: Vinod Koul drivers/dma/dma-jz4780.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 9a0f780958bbcb85604636fa340e2a1efaa4f432 Author: Simon Horman Date: Mon May 13 13:39:51 2019 +0200 dmaengine: sudmac: remove unused driver SUDMAC driver was introduced in v3.10 but was never integrated for use by any platform. As it is unused remove it. Signed-off-by: Simon Horman Acked-by: Yoshihiro Shimoda Signed-off-by: Vinod Koul drivers/dma/sh/Kconfig | 6 - drivers/dma/sh/Makefile | 1 - drivers/dma/sh/sudmac.c | 414 ------------------------------------------------ include/linux/sudmac.h | 52 ------ 4 files changed, 473 deletions(-) commit 7dadf88f8d4ea2a582348dc00860979059f7bcb0 Author: Douglas Anderson Date: Wed May 15 09:48:11 2019 -0700 platform/chrome: cros_ec_spi: Move to real time priority for transfers In commit 37a186225a0c ("platform/chrome: cros_ec_spi: Transfer messages at high priority") we moved transfers to a high priority workqueue. This helped make them much more reliable. ...but, we still saw failures. We were actually finding ourselves competing for time with dm-crypt which also scheduled work on HIGHPRI workqueues. While we can consider reverting the change that made dm-crypt run its work at HIGHPRI, the argument in commit a1b89132dc4f ("dm crypt: use WQ_HIGHPRI for the IO and crypt workqueues") is somewhat compelling. It does make sense for IO to be scheduled at a priority that's higher than the default user priority. It also turns out that dm-crypt isn't alone in using high priority like this. loop_prepare_queue() does something similar for loopback devices. Looking in more detail, it can be seen that the high priority workqueue isn't actually that high of a priority. It runs at MIN_NICE which is _fairly_ high priority but still below all real time priority. Should we move cros_ec_spi to real time priority to fix our problems, or is this just escalating a priority war? I'll argue here that cros_ec_spi _does_ belong at real time priority. Specifically cros_ec_spi actually needs to run quickly for correctness. As I understand this is exactly what real time priority is for. There currently doesn't appear to be any way to use the standard workqueue APIs with a real time priority, so we'll switch over to using using a kthread worker. We'll match the priority that the SPI core uses when it wants to do things on a realtime thread and just use "MAX_RT_PRIO - 1". This commit plus the patch ("platform/chrome: cros_ec_spi: Request the SPI thread be realtime") are enough to get communications very close to 100% reliable (the only known problem left is when serial console is turned on, which isn't something that happens in shipping devices). Specifically this test case now passes (tested on rk3288-veyron-jerry): dd if=/dev/zero of=/var/log/foo.txt bs=4M count=512& while true; do ectool version > /dev/null; done It should be noted that "/var/log" is encrypted (and goes through dm-crypt) and also passes through a loopback device. Signed-off-by: Douglas Anderson Reviewed-by: Guenter Roeck Signed-off-by: Enric Balletbo i Serra drivers/platform/chrome/cros_ec_spi.c | 65 ++++++++++++++++++++++++++++------- 1 file changed, 53 insertions(+), 12 deletions(-) commit 5d1d046e2868fc876a69231eb2f24f000b521f1c Author: Laurentiu Tudor Date: Sat Apr 27 10:10:24 2019 +0300 soc: fsl: qbman_portals: add APIs to retrieve the probing status Add a couple of new APIs to check the probing status of the required cpu bound qman and bman portals: 'int bman_portals_probed()' and 'int qman_portals_probed()'. They return the following values. * 1 if qman/bman portals were all probed correctly * 0 if qman/bman portals were not yet probed * -1 if probing of qman/bman portals failed Portals are considered successful probed if no error occurred during the probing of any of the portals and if enough portals were probed to have one available for each cpu. The error handling paths were slightly rearranged in order to fit this new functionality without being too intrusive. Drivers that use qman/bman portal driver services are required to use these APIs before calling any functions exported by these drivers or otherwise they will crash the kernel. First user will be the dpaa1 ethernet driver, coming in a subsequent patch. Signed-off-by: Laurentiu Tudor Signed-off-by: Li Yang drivers/soc/fsl/qbman/bman_portal.c | 20 ++++++++++++++++---- drivers/soc/fsl/qbman/qman_portal.c | 21 +++++++++++++++++---- include/soc/fsl/bman.h | 8 ++++++++ include/soc/fsl/qman.h | 9 +++++++++ 4 files changed, 50 insertions(+), 8 deletions(-) commit d9ebd99d9a2ff7857b8dbfebd4604f80064d749c Author: Laurentiu Tudor Date: Sat Apr 27 10:10:23 2019 +0300 soc: fsl: qman: fixup liodns only on ppc targets ARM SoCs use SMMU so the liodn fixup done in the qman driver is no longer making sense and it also breaks the ICID settings inherited from u-boot. Do the fixups only for PPC targets. Signed-off-by: Laurentiu Tudor Signed-off-by: Li Yang drivers/soc/fsl/qbman/qman_ccsr.c | 2 +- drivers/soc/fsl/qbman/qman_priv.h | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) commit 5842efa41f57a9efef95a3741bea0a6954033f4e Author: Roy Pledge Date: Fri Apr 5 14:41:13 2019 +0000 soc: fsl: dpio: Add support for memory backed QBMan portals NXP devices with QBMan version 5 and above can enable software portals that are memory backed. This allows the portal to be mapped as cacheable/sharable (same as all normal memory) so that portals can freely migrate between cores and clusters in the SoC. The driver will enable this mode by default when appropriate HW support is detected. Signed-off-by: Youri Querry Signed-off-by: Roy Pledge Signed-off-by: Li Yang drivers/soc/fsl/dpio/dpio-driver.c | 23 ++++-- drivers/soc/fsl/dpio/qbman-portal.c | 148 ++++++++++++++++++++++++++++++------ drivers/soc/fsl/dpio/qbman-portal.h | 5 ++ 3 files changed, 144 insertions(+), 32 deletions(-) commit dde2137d62b2d707c1b80f3c1f3182c3558dfa88 Author: Roy Pledge Date: Fri Apr 5 14:41:11 2019 +0000 bus: mc-bus: Add support for mapping shareable portals Starting with v5 of NXP QBMan devices the hardware supports using regular cacheable/shareable memory as the backing store for the portals. This patch adds support for the new portal mode by switching to use the DPRC get object region v2 command which returns both a base address and offset for the portal memory. The new portal region is identified as shareable through the addition of a new flag. Signed-off-by: Roy Pledge Reviewed-by: Laurentiu Tudor Signed-off-by: Li Yang drivers/bus/fsl-mc/dprc.c | 30 +++++++++++++++++++++++++++--- drivers/bus/fsl-mc/fsl-mc-bus.c | 15 +++++++++++++-- drivers/bus/fsl-mc/fsl-mc-private.h | 17 +++++++++++++++-- 3 files changed, 55 insertions(+), 7 deletions(-) commit d31beda2bcea55461289ebe73fb7fe11658b1c45 Author: Youri Querry Date: Mon Mar 11 17:30:48 2019 +0000 soc: fsl: dpio: Increase timeout for QBMan Management Commands The timeout for QBMan Management Commands can falsely trigger on a busy system. This patch doubles the timeout to avoid the false error reports Signed-off-by: Youri Querry Signed-off-by: Roy Pledge Signed-off-by: Li Yang drivers/soc/fsl/dpio/qbman-portal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c93349d8c1700a4f628758440c65404faa74b390 Author: Ioana Ciornei Date: Fri Apr 5 09:49:53 2019 +0000 soc: fsl: add DPAA2 console support This patch adds DPAA2 MC and AIOP console log support. The platform driver probes on the "fsl,dpaa2-console" device tree node which describes the base firmware address needed in order to infer the start address of both firmware logs: MC and AIOP. It then exports two misc char devices which can be used to dump the needed logs. Signed-off-by: Ioana Ciornei Signed-off-by: Roy Pledge Signed-off-by: Li Yang drivers/soc/fsl/Kconfig | 10 ++ drivers/soc/fsl/Makefile | 1 + drivers/soc/fsl/dpaa2-console.c | 329 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 340 insertions(+) commit bbc9be3ac8ab022061e7cfcc050ae02240144ba1 Author: Ioana Ciornei Date: Tue Mar 26 19:23:31 2019 +0000 Documentation: DT: Add entry for DPAA2 console This patch adds a devicetree binding documentation for FSL's DPAA2 console. Signed-off-by: Ioana Ciornei Reviewed-by: Rob Herring Signed-off-by: Li Yang Documentation/devicetree/bindings/misc/fsl,dpaa2-console.txt | 11 +++++++++++ MAINTAINERS | 1 + 2 files changed, 12 insertions(+) commit b2b1a057294df6f0353b33d8e1f03e0dc79721bc Author: Vabhav Sharma Date: Tue Feb 26 10:10:56 2019 +0000 soc: fsl: guts: Add definition for LX2160A Adding compatible string "lx2160a-dcfg" to initialize guts driver for lx2160 and SoC die attribute definition for LX2160A Signed-off-by: Vabhav Sharma Signed-off-by: Yinbo Zhu Signed-off-by: Li Yang drivers/soc/fsl/guts.c | 6 ++++++ 1 file changed, 6 insertions(+) commit d0147554d004e7cc427f6cfecf871916e34e8b67 Author: Dan Murphy Date: Mon May 6 14:16:10 2019 -0500 dt-bindings: mfd: LMU: Add ti,brightness-resolution Add ti,brightness-resolution to the TI LMU binding to define whether the device uses 8-bit brightness or 11-bit brightness. Signed-off-by: Dan Murphy Reviewed-by: Rob Herring Signed-off-by: Jacek Anaszewski Documentation/devicetree/bindings/mfd/ti-lmu.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 2f230f300497f695bec65439b20df3293eabf889 Author: Dan Murphy Date: Mon May 6 14:16:09 2019 -0500 dt-bindings: mfd: LMU: Add the ramp up/down property Document the ramp-up and ramp-down property in the binding. Removing the "sec" from the property definition as seconds is implied. Signed-off-by: Dan Murphy Reviewed-by: Rob Herring Acked-by: Lee Jones Signed-off-by: Jacek Anaszewski Documentation/devicetree/bindings/mfd/ti-lmu.txt | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) commit 8abc5a7ce6e6a5b77f0ec82c91107a978b32f6e3 Author: Wen Yang Date: Tue Mar 5 19:33:53 2019 +0800 ARM: bcm: fix a leaked reference by adding missing of_node_put The call to of_get_next_child returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings: ./arch/arm/mach-bcm/board_bcm281xx.c:43:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 35, but without a corresponding object release within this function. ./arch/arm/mach-bcm/platsmp-brcmstb.c:337:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 329, but without a corresponding object release within this function. ./arch/arm/mach-bcm/platsmp-brcmstb.c:341:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 329, but without a corresponding object release within this functio ./arch/arm/mach-bcm/bcm63xx_smp.c:150:1-7: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 130, but without a corresponding object release within this function. Signed-off-by: Wen Yang Reviewed-by: Florian Fainelli Cc: Florian Fainelli Cc: Ray Jui Cc: Scott Branden Cc: bcm-kernel-feedback-list@broadcom.com Cc: Russell King Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Cc: Brian Norris Cc: Gregory Fong Acked-by: Ray Jui Signed-off-by: Florian Fainelli arch/arm/mach-bcm/bcm63xx_smp.c | 1 + arch/arm/mach-bcm/board_bcm281xx.c | 1 + arch/arm/mach-bcm/platsmp-brcmstb.c | 7 +++++-- 3 files changed, 7 insertions(+), 2 deletions(-) commit e3b7472362ba5ec84642e1c8d2cc8db6781afe4a Author: Markus Mayer Date: Tue Apr 2 16:01:03 2019 -0700 memory: brcmstb: dpfe: introduce DPFE API v3 Introduce code to handle DPFE API v3. We also change the driver to default to v3 by default and use API v2 only for select chips. Signed-off-by: Markus Mayer Signed-off-by: Florian Fainelli drivers/memory/brcmstb_dpfe.c | 114 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 105 insertions(+), 9 deletions(-) commit 5ef108b44625b35d329872d73b8713050ac13d68 Author: Markus Mayer Date: Tue Apr 2 16:01:02 2019 -0700 memory: brcmstb: dpfe: prepare for API-dependent sysfs attributes Prepare the driver so that sysfs attributes can differ based on the API version. Signed-off-by: Markus Mayer Signed-off-by: Florian Fainelli drivers/memory/brcmstb_dpfe.c | 47 +++++++++++++++++++++++++++++++------------ 1 file changed, 34 insertions(+), 13 deletions(-) commit 58a8499f431d4d125525180b17c2d8acab3e40dd Author: Markus Mayer Date: Tue Apr 2 16:01:01 2019 -0700 memory: brcmstb: dpfe: prepare support for multiple API versions Extend the driver, so it can handle different API versions for interacting with the DCPU. This is in preparation for the upcoming API v3. Signed-off-by: Markus Mayer Signed-off-by: Florian Fainelli drivers/memory/brcmstb_dpfe.c | 87 +++++++++++++++++++++++++++++-------------- 1 file changed, 59 insertions(+), 28 deletions(-) commit a7c25759d8d84b64c437a78f05df7314b02934e5 Author: Markus Mayer Date: Tue Apr 2 16:01:00 2019 -0700 memory: brcmstb: dpfe: wait for DCPU to be ready We wait for the DCPU to be ready before sending a command. Signed-off-by: Markus Mayer Signed-off-by: Florian Fainelli drivers/memory/brcmstb_dpfe.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 6ca5d2ba9e49113ed812b16e04e9e0a31f008e6f Author: Markus Mayer Date: Tue Apr 2 16:00:59 2019 -0700 memory: brcmstb: dpfe: report firmware loading error Print an error message if the DCPU firmware couldn't be downloaded. Signed-off-by: Markus Mayer Signed-off-by: Florian Fainelli drivers/memory/brcmstb_dpfe.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 1ffc0b580ba7b8ba6ba8081b86f4b53d3f2ddddb Author: Markus Mayer Date: Tue Apr 2 16:00:58 2019 -0700 memory: brcmstb: dpfe: remove unused code and fix formatting Remove an unused struct and fix source code formatting in a few areas. Signed-off-by: Markus Mayer Signed-off-by: Florian Fainelli drivers/memory/brcmstb_dpfe.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) commit 3087974a3df8afbb5d59a986797fa8d72e7edd2f Author: Florian Fainelli Date: Wed Mar 20 12:40:56 2019 -0700 bus: brcmstb_gisb: Remove print of base address Since commit ad67b74d2469 ("printk: hash addresses printed with %p") pointers are being hashed when printed. Displaying the virtual memory at bootup time is not helpful, especially given we use a dev_info() which already displays the platform device's address. Signed-off-by: Florian Fainelli drivers/bus/brcmstb_gisb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 78a6f5bef9b8132e34f58f60c190da83b46cefef Author: Markus Mayer Date: Mon Feb 11 17:24:43 2019 -0800 memory: brcmstb: dpfe: use byte 3 of registers MR4-MR8 For dual-rank LPDDR4, result data for any command is placed in byte 0 and byte 3 of the corresponding MR register by the firmware. Single-rank RAM was supposed to work the same way. However, due to a firmware bug, result values are only placed in byte 3 of the corresponding MR register. Since byte 3 works for single-rank and dual-rank setups, we change the Linux driver to always use byte 3, thus returning the correct value in either case. Signed-off-by: Markus Mayer Signed-off-by: Florian Fainelli drivers/memory/brcmstb_dpfe.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit 900c8f578be2032e46dd936684838aa59cd5a477 Author: Markus Mayer Date: Mon Feb 11 17:24:42 2019 -0800 memory: brcmstb: dpfe: optimize generic_show() We can pass a (struct priv_data *) to generic_show() rather than a (struct device *). For two of the three callers of this function, the change means one less call to dev_get_drvdata(). For the third caller, it makes no difference. Signed-off-by: Markus Mayer Signed-off-by: Florian Fainelli drivers/memory/brcmstb_dpfe.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit 7ccd2ffce0d4a180172c984ca7266d056d6d4b11 Author: Markus Mayer Date: Mon Feb 11 17:24:41 2019 -0800 memory: brcmstb: dpfe: use msleep() over udelay() To be more "scheduler friendly", we use msleep() rather than udelay() while we wait for the DCPU to respond. Signed-off-by: Markus Mayer Signed-off-by: Florian Fainelli drivers/memory/brcmstb_dpfe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f8526c2d99ca87ccbc0a3da00555d6d08e25d058 Author: Rayagonda Kokatanur Date: Tue Apr 2 18:18:30 2019 -0700 arm64: dts: Stingray: Add NIC i2c device node Add NIC i2c device node. Signed-off-by: Rayagonda Kokatanur Signed-off-by: Ray Jui Signed-off-by: Florian Fainelli arch/arm64/boot/dts/broadcom/stingray/stingray.dtsi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit ad77d3dbfbdeb5e0adffcdce4a53fabaf54bdef8 Author: Srinath Mannam Date: Tue Mar 19 14:45:44 2019 +0530 arm64: dts: Add USB DT nodes for Stingray SoC Add DT nodes for - Two xHCI host controllers - Two BDC Broadcom USB device controller - Five USB PHY controllers [xHCI0] [BDC0] [xHCI1] [BDC1] | | | | --------------- ----------------------- | | | | | [SS-PHY0] [HS-PHY0] [SS-PHY1] [HS-PHY2] [HS-PHY1] [SS-PHY0/HS-PHY0] and [SS-PHY1/HS-PHY1] are combo PHYs has one SS and one HS PHYs. [HS-PHY2] is a single HS PHY. xHCI use SS-PHY to detect SS devices and HS-PHY to detect HS/FS/LS devices. BDC use SS-PHY in SS mode and HS-PHY in HS mode. xHCI0 port1 is SS-PHY0, port2 is HS-PHY0. xHCI1 port1 is SS-PHY1, port2 is HS-PHY2 and port3 is HS-PHY1. Signed-off-by: Srinath Mannam Signed-off-by: Florian Fainelli .../boot/dts/broadcom/stingray/stingray-usb.dtsi | 72 ++++++++++++++++++++++ .../arm64/boot/dts/broadcom/stingray/stingray.dtsi | 1 + 2 files changed, 73 insertions(+) commit aa78426d4eb9aa1f2dbbdb3d9729c707fdc433fb Author: Pramod Kumar Date: Thu Jan 3 14:25:34 2019 +0530 arm64: dts: stingray: Add Stingray Thermal DT support. Add DT nodes for thermal zones memory base address to read temperature. Signed-off-by: Pramod Kumar Signed-off-by: Srinath Mannam Reviewed-by: Ray Jui Reviewed-by: Scott Branden Signed-off-by: Florian Fainelli .../arm64/boot/dts/broadcom/stingray/stingray.dtsi | 89 ++++++++++++++++++++++ 1 file changed, 89 insertions(+) commit 5c000fb33b767c3fa10d29a1021edbf4f92b76a2 Author: Ville Syrjälä Date: Thu May 9 15:21:59 2019 +0300 drm/i915: Bump gen7+ fb size limits to 16kx16k With gtt remapping in place we can use arbitrarily large framebuffers. Let's bump the limits to 16kx16k on gen7+. The limit was chosen to match the maximum 2D surface size of the 3D engine. With the remapping we could easily go higher than that for the display engine. However the modesetting ddx will blindly assume it can handle whatever is reported via kms. The oversized buffer dimensions are not caught by glamor nor Mesa until finally an assert will trip when genxml attempts to pack the SURFACE_STATE. So we pick a safe limit to avoid the X server from crashing (or potentially misbehaving if the genxml asserts are compiled out). Reviewed-by: Daniel Vetter Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110187 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190509122159.24376-9-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_display.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit 2033012982231533e545b002f744a60699fe968c Author: Ville Syrjälä Date: Thu May 9 15:21:58 2019 +0300 drm/i915: Bump fb stride limit to 128KiB for gen4+ and 256KiB for gen7+ With gtt remapping plugged in we can simply raise the stride limit on gen4+. Let's just pick the limit to match the render engine max stride (256KiB on gen7+, 128KiB on gen4+). No remapping CCS because the virtual address of each page actually matters due to the new hash mode (WaCompressedResourceDisplayNewHashMode:skl,kbl etc.), and no remapping on gen2/3 due extra complications from fence alignment and gen2 2KiB GTT tile size. Also no real benefit since the display engine limits already match the other limits. v2: Rebase due to is_ccs_modifier() v3: Tweak the comment and commit msg v4: Fix gen4+ stride limit to be 128KiB Reviewed-by: Daniel Vetter #v3 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190509122159.24376-8-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_display.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit aa5ca8b7421cdbdd2b1275e0cc4d11bdce043de9 Author: Ville Syrjälä Date: Thu May 9 15:21:57 2019 +0300 drm/i915: Align dumb buffer stride to 4k to allow for gtt remapping Align dumb buffer stride to 4k if the fb will be big enough to require gtt remapping. v2: Leave the stride alone for buffers that look to be for the cursor v3: Make it not a hack (Daniel) Cc: Daniel Vetter Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190509122159.24376-7-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/i915_gem.c | 26 +++++++++++++++++++++++++- drivers/gpu/drm/i915/intel_display.c | 1 - drivers/gpu/drm/i915/intel_display.h | 2 ++ 3 files changed, 27 insertions(+), 2 deletions(-) commit 54d4d719fa119c1738f97adc242c05fff224c845 Author: Ville Syrjälä Date: Thu May 9 15:21:56 2019 +0300 drm/i915: Overcome display engine stride limits via GTT remapping The display engine stride limits are getting in our way. On SKL+ we are limited to 8k pixels, which is easily exceeded with three 4k displays. To overcome this limitation we can remap the pages in the GTT to provide the display engine with a view of memory with a smaller stride. The code is mostly already there as We already play tricks with the plane surface address and x/y offsets. A few caveats apply: * linear buffers need the fb stride to be page aligned, as otherwise the remapped lines wouldn't start at the same spot * compressed buffers can't be remapped due to the new ccs hash mode causing the virtual address of the pages to affect the interpretation of the compressed data. IIRC the old hash was limited to the low 12 bits so if we were using that mode we could remap. As it stands we just refuse to remapp with compressed fbs. * no remapping gen2/3 as we'd need a fence for the remapped vma, which we currently don't have. Need to deal with the fence POT requirements, and do something about the gen2 gtt page size vs tile size difference v2: Rebase due to is_ccs_modifier() Fix up the skl+ stride_mult mess memset() the gtt_view because otherwise we could leave junk in plane[1] when going from 2 plane to 1 plane format v3: intel_check_plane_stride() was split out v4: Drop the aligned viewport stuff, it was meant for ccs which can't be remapped anyway v5: Introduce intel_plane_can_remap() Reorder the code so that plane_state->view gets filled even for invisible planes, otherwise we'd keep using stale values and could explode during remapping. The new logic never remaps invisible planes since we don't have a viewport, and instead pins the full fb instead v6: Fix plane src coord checks after remapping by moving plane_state->base.src to the final plane x/y offsets. Allow intel_plane_check_stride() to fail even with remapping (can happen at least with a linear 64bpp fb with a 4k plane and a suitably inconvenient src coordinates). Improve aux plane FIXME (Daniel) Move some code shuffling into a separate patch (Daniel) Testcase: igt/kms_big_fb Cc: Daniel Vetter Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190509122159.24376-6-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_display.c | 354 +++++++++++++++++++++++++++++------ drivers/gpu/drm/i915/intel_display.h | 2 + drivers/gpu/drm/i915/intel_sprite.c | 34 ++-- 3 files changed, 323 insertions(+), 67 deletions(-) commit a88c40ebb8811c28c39e7cab8ba9c33c86f1fcfd Author: Ville Syrjälä Date: Thu May 9 15:21:55 2019 +0300 drm/i915: Shuffle stride checking code around Reorganize some fb stride checking code a bit to prepare for gtt remapping. And do a bit of s/pitch/stride/ renaming in the process for a bit more uniformity (apart from the whole fb->pitches[] thing). Cc: Daniel Vetter Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190509122159.24376-5-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_display.c | 64 ++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 32 deletions(-) commit bb211c3d0c454a5088dfc94d3b3c3885e4d4935e Author: Ville Syrjälä Date: Thu May 9 15:21:54 2019 +0300 drm/i915/selftests: Add live vma selftest Add a live selftest to excercise rotated/remapped vmas. We simply write through the rotated/remapped vma, and confirm that the data appears in the right page when read through the normal vma. Not sure what the fallout of making all rotated/remapped vmas mappable/fenceable would be, hence I just hacked it in the test. v2: Grab rpm reference (Chris) GEM_BUG_ON(view.type not as expected) (Chris) Allow CAN_FENCE for rotated/remapped vmas (Chris) Update intel_plane_uses_fence() to ask for a fence only for normal vmas on gen4+ v3: Deal with intel_wakeref_t v4: Rebase Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190509122159.24376-4-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/i915_vma.c | 8 -- drivers/gpu/drm/i915/intel_display.c | 4 +- .../gpu/drm/i915/selftests/i915_live_selftests.h | 1 + drivers/gpu/drm/i915/selftests/i915_vma.c | 142 +++++++++++++++++++++ 4 files changed, 146 insertions(+), 9 deletions(-) commit e2e394bffa19365aa86eb898f6225919d02d6b6c Author: Ville Syrjälä Date: Thu May 9 15:21:53 2019 +0300 drm/i915/selftests: Add mock selftest for remapped vmas Extend the rotated vma mock selftest to cover remapped vmas as well. TODO: reindent the loops I guess? Left like this for now to ease review v2: Include the vma type in the error message (Chris) v3: Deal with trimmed sg v4: Drop leftover debugs Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190509122159.24376-3-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/selftests/i915_vma.c | 98 ++++++++++++++++++++++++++++--- 1 file changed, 90 insertions(+), 8 deletions(-) commit 1a74fc0b3f49a0603f230b6f087da33bda3d7c66 Author: Ville Syrjälä Date: Thu May 9 15:21:52 2019 +0300 drm/i915: Add a new "remapped" gtt_view To overcome display engine stride limits we'll want to remap the pages in the GTT. To that end we need a new gtt_view type which is just like the "rotated" type except not rotated. v2: Use intel_remapped_plane_info base type s/unused/unused_mbz/ (Chris) Separate BUILD_BUG_ON()s (Chris) Use I915_GTT_PAGE_SIZE (Chris) v3: Use i915_gem_object_get_dma_address() (Chris) Trim the sg (Tvrtko) v4: Actually trim this time. Limit the max length to one row of pages to keep things simple Cc: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Daniel Vetter Reviewed-by: Chris Wilson Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190509122159.24376-2-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/i915_debugfs.c | 12 +++++ drivers/gpu/drm/i915/i915_drv.h | 4 ++ drivers/gpu/drm/i915/i915_gem.c | 17 +++++- drivers/gpu/drm/i915/i915_gem_gtt.c | 88 +++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_gem_gtt.h | 25 +++++++-- drivers/gpu/drm/i915/i915_vma.c | 6 ++- drivers/gpu/drm/i915/i915_vma.h | 3 ++ drivers/gpu/drm/i915/intel_display.c | 11 ++++ drivers/gpu/drm/i915/intel_drv.h | 1 + drivers/gpu/drm/i915/selftests/i915_vma.c | 6 +-- 10 files changed, 163 insertions(+), 10 deletions(-) commit 72187c626eeddbe9dd02bc7b8ea684a8f028c128 Author: Wen Yang Date: Fri Mar 1 16:56:52 2019 +0800 ARM: versatile: fix a leaked reference by addingmissing of_node_put The call to of_get_next_child returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings: ./arch/arm/mach-versatile/versatile_dt.c:315:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 302, but without a corresponding object release within this function. ./arch/arm/mach-versatile/versatile_dt.c:320:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 302, but without a corresponding object release within this function. Signed-off-by: Wen Yang Cc: Linus Walleij Cc: Russell King Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Linus Walleij arch/arm/mach-versatile/versatile_dt.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 62a5017bf825c9e4d3176eb975a01c329a9f364b Author: Linus Walleij Date: Wed Jan 23 14:34:29 2019 +0100 ARM: dts: vexpress: specify AFS partition This activates the AFS partition parsing on the Versatile Express family. Signed-off-by: Linus Walleij arch/arm/boot/dts/vexpress-v2m-rs1.dtsi | 3 +++ arch/arm/boot/dts/vexpress-v2m.dtsi | 3 +++ 2 files changed, 6 insertions(+) commit ed3a03b70749ca62cf9aac91c9234d4a21eda4b9 Author: Linus Walleij Date: Wed Jan 23 14:31:32 2019 +0100 ARM: dts: realview: specify AFS partition This activates the AFS partition parsing on the RealView family. Signed-off-by: Linus Walleij arch/arm/boot/dts/arm-realview-eb.dtsi | 6 ++++++ arch/arm/boot/dts/arm-realview-pb1176.dts | 6 ++++++ arch/arm/boot/dts/arm-realview-pb11mp.dts | 6 ++++++ arch/arm/boot/dts/arm-realview-pbx.dtsi | 6 ++++++ 4 files changed, 24 insertions(+) commit 10d8b9de63e60d96ae73e389eaee3e4244bdf513 Author: Linus Walleij Date: Wed Jan 23 14:25:25 2019 +0100 ARM: dts: versatile: specify AFS partition This activates the AFS partition parsing on the Versatile. Signed-off-by: Linus Walleij arch/arm/boot/dts/versatile-ab.dts | 3 +++ 1 file changed, 3 insertions(+) commit a23392cd7dad3a23f9a20758fe3682990bfc444d Author: Linus Walleij Date: Wed Jan 23 13:25:51 2019 +0100 ARM: dts: integrator: specify AFS partition This activates the code for AFS partition parsing on the Integrator. Signed-off-by: Linus Walleij arch/arm/boot/dts/integrator.dtsi | 3 +++ 1 file changed, 3 insertions(+) commit ef071bab655b61e3235868a445b72346b8cc0193 Author: Lubomir Rintel Date: Mon May 13 09:56:39 2019 +0200 power: supply: olpc_battery: Allow building the driver on non-x86 With the recent changes to the driver and addition of OLPC XO-1.75 EC driver it is possible to use this driver on ARM-based XO laptops as well. Signed-off-by: Lubomir Rintel Signed-off-by: Andy Shevchenko drivers/power/supply/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 231c0c216172a92feb02a99edff6b38b3ebd90a8 Author: Lubomir Rintel Date: Mon May 13 09:56:38 2019 +0200 Platform: OLPC: Add a regulator for the DCON All OLPC ECs are able to turn the power to the DCON on an off. Use the regulator framework to expose the functionality. Signed-off-by: Lubomir Rintel Signed-off-by: Andy Shevchenko drivers/platform/olpc/Kconfig | 1 + drivers/platform/olpc/olpc-ec.c | 67 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) commit 0c3d931b3ab9efeea4948b5373c62095449d0101 Author: Lubomir Rintel Date: Mon May 13 09:56:37 2019 +0200 Platform: OLPC: Add XO-1.75 EC driver It's based off the driver from the OLPC kernel sources. Somewhat modernized and cleaned up, for better or worse. Modified to plug into the olpc-ec driver infrastructure (so that battery interface and debugfs could be reused) and the SPI slave framework. Signed-off-by: Lubomir Rintel Reviewed-by: Andy Shevchenko Signed-off-by: Andy Shevchenko arch/x86/Kconfig | 1 + drivers/platform/Kconfig | 2 + drivers/platform/Makefile | 2 +- drivers/platform/olpc/Kconfig | 14 + drivers/platform/olpc/Makefile | 3 +- drivers/platform/olpc/olpc-xo175-ec.c | 752 ++++++++++++++++++++++++++++++++++ include/linux/olpc-ec.h | 4 +- 7 files changed, 774 insertions(+), 4 deletions(-) commit 8097548f3af9ec990169574ad9d874052b78bff8 Author: Lubomir Rintel Date: Mon May 13 09:56:36 2019 +0200 Platform: OLPC: Use BIT() and GENMASK() for event masks Just a cosmetic tidy-up. Signed-off-by: Lubomir Rintel Reviewed-by: Andy Shevchenko Signed-off-by: Andy Shevchenko include/linux/olpc-ec.h | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit 560331eaee6c552adc1b8201063ccbfe5009bc12 Author: Lubomir Rintel Date: Mon May 13 09:56:35 2019 +0200 Platform: OLPC: Avoid a warning if the EC didn't register yet Just return EPROBE_DEFER, so that whoever attempted to use the EC call can defer their work. Signed-off-by: Lubomir Rintel Acked-by: Pavel Machek Signed-off-by: Andy Shevchenko drivers/platform/olpc/olpc-ec.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit ec9964b4803300fb86f8e8fd9b421e59f7a71dc5 Author: Lubomir Rintel Date: Mon May 13 09:56:34 2019 +0200 Platform: OLPC: Move EC-specific functionality out from x86 Move the olpc-ec driver away from the X86 OLPC platform so that it could be used by the ARM based laptops too. Notably, the driver for the OLPC battery, which is also used on the ARM models, builds on this driver's interface. It is actually plaform independent: the OLPC EC commands with their argument and responses are mostly the same despite the delivery mechanism is different. Signed-off-by: Lubomir Rintel Acked-by: Pavel Machek Signed-off-by: Andy Shevchenko arch/x86/include/asm/olpc.h | 31 ---------- arch/x86/platform/olpc/olpc.c | 119 ++++++------------------------------ drivers/platform/olpc/olpc-ec.c | 99 +++++++++++++++++++++++++++++- drivers/power/supply/olpc_battery.c | 1 - include/linux/olpc-ec.h | 32 +++++++++- 5 files changed, 145 insertions(+), 137 deletions(-) commit 2dc78630497780b36975e5bcb69bbbf4d2ee0e46 Author: Lubomir Rintel Date: Mon May 13 09:56:33 2019 +0200 Platform: OLPC: Remove an unused include Also, the header is x86 specific, while there are non-x86 OLPC machines. Signed-off-by: Lubomir Rintel Acked-by: Pavel Machek Signed-off-by: Andy Shevchenko drivers/platform/olpc/olpc-ec.c | 1 - 1 file changed, 1 deletion(-) commit f22558d701755f2f9cfdbd4a0862a58ef5fb1dbb Author: Lubomir Rintel Date: Mon May 13 09:56:32 2019 +0200 dt-bindings: olpc,xo1.75-ec: Add OLPC XO-1.75 EC bindings The OLPC XO-1.75 Embedded Controller is a SPI master that uses extra signals for handshaking. It needs to know when is the slave (Linux) side's TX FIFO ready for transfer (the ready-gpio signal on the SPI controller node) and when does it wish to respond with a command (the cmd-gpio property). Signed-off-by: Lubomir Rintel Acked-by: Pavel Machek Reviewed-by: Rob Herring Signed-off-by: Andy Shevchenko .../devicetree/bindings/misc/olpc,xo1.75-ec.txt | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 9783da2384c5623d376e4641bbce9339be1001eb Author: Christoph Niedermaier Date: Thu May 16 13:01:49 2019 +0200 spi: spidev: Add dhcom-board to compatibility list Prepare to use devices on the external SPI interface on a DH electronics Development Board. Signed-off-by: Christoph Niedermaier Signed-off-by: Mark Brown drivers/spi/spidev.c | 1 + 1 file changed, 1 insertion(+) commit 973af54c5218335dbca2695fd97c20be2564438a Author: Wolfram Sang Date: Mon May 20 11:34:46 2019 +0200 regulator: da9063: platform_data is gone, depend on OF With OF being the only configuration possibility left, depend on it to simplify some code. Signed-off-by: Wolfram Sang Reviewed-by: Simon Horman Acked-by: Steve Twiss Tested-by: Steve Twiss Reviewed-by: Geert Uytterhoeven Signed-off-by: Mark Brown drivers/regulator/Kconfig | 2 +- drivers/regulator/da9063-regulator.c | 10 ---------- 2 files changed, 1 insertion(+), 11 deletions(-) commit 824bd1be3ed01d67197098650d0c62b176087b11 Author: Wolfram Sang Date: Mon May 20 11:34:45 2019 +0200 regulator: da9063: move definitions out of a header into the driver Those definitions are only used within the driver meanwhile, so put them there. Signed-off-by: Wolfram Sang Reviewed-by: Simon Horman Acked-by: Steve Twiss Tested-by: Steve Twiss Reviewed-by: Geert Uytterhoeven Signed-off-by: Mark Brown drivers/regulator/da9063-regulator.c | 44 +++++++++++++++++++++++++++++++- include/linux/mfd/da9063/pdata.h | 49 ------------------------------------ 2 files changed, 43 insertions(+), 50 deletions(-) commit 662307294f27975096f0a45e1b2dc5c84a966c1b Author: Wolfram Sang Date: Mon May 20 11:34:44 2019 +0200 regulator: da9063: remove platform_data support There are no in-kernel users anymore, so remove this outdated interface. Signed-off-by: Wolfram Sang Reviewed-by: Simon Horman Acked-by: Steve Twiss Tested-by: Steve Twiss Reviewed-by: Geert Uytterhoeven Signed-off-by: Mark Brown drivers/regulator/da9063-regulator.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 2899872b627e99b7586fe3b6c9f861da1b4d5072 Author: Daniel Baluta Date: Fri May 17 13:23:49 2019 +0000 regmap: debugfs: Fix memory leak in regmap_debugfs_init As detected by kmemleak running on i.MX6ULL board: nreferenced object 0xd8366600 (size 64): comm "swapper/0", pid 1, jiffies 4294937370 (age 933.220s) hex dump (first 32 bytes): 64 75 6d 6d 79 2d 69 6f 6d 75 78 63 2d 67 70 72 dummy-iomuxc-gpr 40 32 30 65 34 30 30 30 00 e3 f3 ab fe d1 1b dd @20e4000........ backtrace: [] kasprintf+0x2c/0x54 [] regmap_debugfs_init+0x7c/0x31c [<9c8d91fa>] __regmap_init+0xb5c/0xcf4 [<5b1c3d2a>] of_syscon_register+0x164/0x2c4 [<596a5d80>] syscon_node_to_regmap+0x64/0x90 [<49bd597b>] imx6ul_init_machine+0x34/0xa0 [<250a4dac>] customize_machine+0x1c/0x30 [<2d19fdaf>] do_one_initcall+0x7c/0x398 [] kernel_init_freeable+0x328/0x448 [<168c9101>] kernel_init+0x8/0x114 [<913268aa>] ret_from_fork+0x14/0x20 [] 0x0 Root cause is that map->debugfs_name is allocated using kasprintf and then the pointer is lost by assigning it other memory address. Reported-by: Stefan Wahren Signed-off-by: Daniel Baluta Signed-off-by: Mark Brown drivers/base/regmap/regmap-debugfs.c | 2 ++ 1 file changed, 2 insertions(+) commit 90fdbe8ab27047f7b9da57d1975c14a8d8f39370 Author: S.j. Wang Date: Thu May 16 11:40:56 2019 +0000 ASoC: cs42xx8: add reset-gpios in binding document Add reset-gpios property, which is optional. Signed-off-by: Shengjiu Wang Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/cs42xx8.txt | 6 ++++++ 1 file changed, 6 insertions(+) commit 2ffb0f580bded5f16ec4d619f8abb4745425e864 Author: Kuninori Morimoto Date: Fri May 17 15:06:37 2019 +0900 ASoC: soc-core: WARN() is not related to component->driver->probe soc_probe_component() has WARN() under if (component->driver->probe), but, this WARN() check is not related to .probe callback. So, it should be called at (B) instead of (A). This patch moves it out of if(). if (component->driver->probe) { ret = component->driver->probe(component); ... (A) WARN(...) } (B) WARN(...) Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/soc-core.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit e9b5daad4e9bdd1b9e467873a4463c867ccf9ff1 Author: Kuninori Morimoto Date: Fri May 17 10:29:16 2019 +0900 ASoC: rsnd: move pcm_new from snd_soc_component_driver to snd_soc_dai_driver snd_soc_dai_driver :: pcm_new has snd_soc_dai as parameter, but snd_soc_component_driver :: pcm_new doesn't have it. rsnd driver needs snd_soc_dai at pcm_new. This patch moves .pcm_new from snd_soc_component_driver to snd_soc_dai_driver, and don't use rtd->cpu_dai anymore. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/core.c | 120 +++++++++++++++++++++++------------------------ 1 file changed, 60 insertions(+), 60 deletions(-) commit 39f2d114a1c7d73d601f19cbea0a955ade2784c3 Author: Yong Zhi Date: Sat May 18 13:30:09 2019 -0500 ASoC: Intel: glk_rt5682_max98357a: Remap button control-function Assign button functions based on Android wired headset specs(v1.1). Signed-off-by: Yong Zhi Signed-off-by: Naveen Manohar Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/boards/glk_rt5682_max98357a.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 326b18176353d26df54dbc8b4b75ed4332898f61 Author: Shunli Wang Date: Mon May 20 16:24:20 2019 +0800 ASoC: Mediatek: MT8183: enable IIR filter IIR fileter can remove DC offset. It must be enabled when dmic or amic connected to pmic is used. Signed-off-by: Shunli Wang Signed-off-by: Mark Brown sound/soc/mediatek/mt8183/mt8183-dai-adda.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit b0a821daf0d04e5a8ae99829e24f2fe538f25763 Author: Amir Goldstein Date: Thu May 16 13:26:28 2019 +0300 ASoC: rename functions that pollute the simple_xxx namespace include/linux/fs.h defines a bunch of simple fs helpers, (e.g. simple_rename) and we intend to add an fs helper named simple_remove. Rename the ASoC driver static functions, so they will not collide with the upcoming fs helper function name. Cc: Kuninori Morimoto Cc: Mark Brown Signed-off-by: Amir Goldstein Signed-off-by: Mark Brown sound/soc/generic/simple-card.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ef9ace6f8008125e0f35ddd725ad07ca0de2f3e2 Author: Kelsey Skunberg Date: Sat May 11 23:37:49 2019 -0600 tools: gpio: Add include/linux/gpio.h to .gitignore File include/linux/gpio.h is generated after building tools/testing/selftests Add gpio.h to .gitignore to help clean up working tree status. Signed-off-by: Kelsey Skunberg Signed-off-by: Bartosz Golaszewski tools/gpio/.gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 73ee89436047dc58005bed7d1ded679c35292164 Merge: d4a5611743a6 a188339ca5a3 Author: Bartlomiej Zolnierkiewicz Date: Mon May 20 15:31:34 2019 +0200 Merge tag 'v5.2-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into fbdev-for-next Linux 5.2-rc1 Sync with upstream (which now contains fbdev-v5.2 changes) to prepare a base for fbdev-v5.3 changes. commit 48b48750c3f9f91a4e340d0f796734ddd178ad9d Author: Al Viro Date: Mon May 20 13:44:57 2019 +0100 zsmalloc: don't bother with dentry_operations Signed-off-by: Al Viro mm/zsmalloc.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 985f4044871a5498206c4957c809c283ca84aca0 Author: Al Viro Date: Mon May 20 13:44:56 2019 +0100 balloon: don't bother with dentry_operations Signed-off-by: Al Viro drivers/virtio/virtio_balloon.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 8b1e058e0f529d6e097c35dfeb932bd10fc8e4fb Author: Al Viro Date: Mon May 20 13:44:56 2019 +0100 cxlflash: don't bother with dentry_operations Signed-off-by: Al Viro drivers/scsi/cxlflash/ocxl_hw.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 619a6d167b29b0e39a049a989d4675d4596afe60 Author: Al Viro Date: Mon May 20 13:44:56 2019 +0100 cxl: don't bother with dentry_operations default will do Signed-off-by: Al Viro drivers/misc/cxl/api.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit fb9273f2c10d100c0fa6544484bc806903d704da Author: Al Viro Date: Mon May 20 13:44:56 2019 +0100 drm: don't bother with super_operations and dentry_operations defaults will do just fine. Signed-off-by: Al Viro drivers/gpu/drm/drm_drv.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit 201bd433bfa36c8b1de3c71f59d04bf5b58adfd9 Author: kbuild test robot Date: Mon May 20 20:23:15 2019 +0800 drm/bochs: fix ptr_ret.cocci warnings drivers/gpu/drm/bochs/bochs_mm.c:19:1-3: WARNING: PTR_ERR_OR_ZERO can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: scripts/coccinelle/api/ptr_ret.cocci Fixes: b3a25b9af80d ("drm/bochs: Convert bochs driver to VRAM MM") CC: Thomas Zimmermann Signed-off-by: kbuild test robot Link: http://patchwork.freedesktop.org/patch/msgid/20190520122314.GA155389@lkp-kbuild22 Signed-off-by: Gerd Hoffmann drivers/gpu/drm/bochs/bochs_mm.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit dd7450cab71174637329e5ef57d8474fc7ff2ea0 Author: Kefeng Wang Date: Fri May 17 18:12:45 2019 +0800 ipmi_si: use bool type for initialized variable Cover 'int' to 'bool' type for initialized variable. Signed-off-by: Kefeng Wang Message-Id: <20190517101245.4341-2-wangkefeng.wang@huawei.com> Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_si_intf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2f66353963043e1d8dfacfbdf509acc5d3be7698 Author: Kefeng Wang Date: Fri May 17 18:12:44 2019 +0800 ipmi_si: fix unexpected driver unregister warning If ipmi_si_platform_init()->platform_driver_register() fails, platform_driver_unregister() called unconditionally will trigger following warning, ipmi_platform: Unable to register driver: -12 ------------[ cut here ]------------ Unexpected driver unregister! WARNING: CPU: 1 PID: 7210 at drivers/base/driver.c:193 driver_unregister+0x60/0x70 drivers/base/driver.c:193 Fix it by adding platform_registered variable, only unregister platform driver when it is already successfully registered. Reported-by: Hulk Robot Signed-off-by: Kefeng Wang Message-Id: <20190517101245.4341-1-wangkefeng.wang@huawei.com> Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_si_platform.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 70ac79f5d1ef95e61b174e95192b3555a4caef2f Author: Fabrizio Castro Date: Fri May 17 10:26:29 2019 +0100 dt-bindings: arm: renesas: Add HopeRun RZ/G2[M] boards This patch adds board HiHope RZ/G2M (the main board, powered by the R8A774A1) and board HiHope RZ/G2 EX (the expansion board that sits on top of the HiHope RZ/G2M). Both boards are made by Jiangsu HopeRun Software Co., Ltd. (a.k.a. HopeRun). Useful links: http://hihope.org/product/detail/rzg2 https://item.taobao.com/item.htm?spm=a2oq0.12575281.0.0.6bcf1debQpzkRS&ft=t&id=592177498472 http://www.hoperun.com/Cn/news/id/379 We already know that the HiHope RZ/G2 EX will also sit on the HiHope RZ/G2N, even though the HiHope RZ/G2N doesn't exist just yet. Signed-off-by: Fabrizio Castro Reviewed-by: Chris Paterson Reviewed-by: Rob Herring Signed-off-by: Simon Horman Documentation/devicetree/bindings/arm/renesas.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) commit 003ddc67e62672279134c85dc2609a913b89d64b Author: Chris Brandt Date: Wed May 15 10:20:48 2019 -0500 ARM: dts: rza2mevb: Add USB Host support Enable USB Host support for both the Type-C connector on the CPU board and the Type-A plug on the sub board. Both boards are also capable of USB Device operation as well after the appropriate Device Tree modifications. Signed-off-by: Chris Brandt Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r7s9210-rza2mevb.dts | 36 ++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit f56e674decff28b5b835f2f86706628876dbc751 Author: Chris Brandt Date: Wed May 15 10:20:47 2019 -0500 ARM: dts: r7s9210: Add USB Device support Add USB Device support for RZ/A2. Signed-off-by: Chris Brandt Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r7s9210.dtsi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 9d8c794e315028fc77350015eaf70fe1d3d0e0dc Author: Chris Brandt Date: Wed May 15 10:20:46 2019 -0500 ARM: dts: r7s9210: Add USB Host support Add EHCI and OHCI host support for RZ/A2. Signed-off-by: Chris Brandt Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r7s9210.dtsi | 66 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) commit b0f986b4b025c8036ab2c660460621c1d17656b5 Author: Maxime Ripard Date: Thu May 16 12:31:52 2019 +0200 drm: Remove users of drm_format_info_plane_cpp drm_format_info_plane_cpp() basically just returns the cpp array content found in the drm_format_info structure. Since it's pretty trivial, let's remove the function and have the users use the array directly Suggested-by: Ville Syrjälä Reviewed-by: Paul Kocialkowski Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/c0a78c87cd0410a1819edad2794ad06543c85bb5.1558002671.git-series.maxime.ripard@bootlin.com drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 2 +- drivers/gpu/drm/arm/malidp_hw.c | 2 +- drivers/gpu/drm/arm/malidp_planes.c | 2 +- drivers/gpu/drm/drm_client.c | 2 +- drivers/gpu/drm/drm_fb_helper.c | 2 +- drivers/gpu/drm/drm_format_helper.c | 4 ++-- drivers/gpu/drm/i915/intel_sprite.c | 2 +- drivers/gpu/drm/mediatek/mtk_drm_fb.c | 2 +- drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c | 2 +- drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c | 2 +- drivers/gpu/drm/msm/msm_fb.c | 2 +- drivers/gpu/drm/radeon/radeon_fb.c | 2 +- drivers/gpu/drm/rockchip/rockchip_drm_fb.c | 2 +- drivers/gpu/drm/stm/ltdc.c | 2 +- drivers/gpu/drm/tegra/fb.c | 2 +- drivers/gpu/drm/zte/zx_plane.c | 2 +- include/drm/drm_fourcc.h | 17 ----------------- 17 files changed, 17 insertions(+), 34 deletions(-) commit 92f080762c3f45bbcfbe35e2ac610af1ee3bb2b9 Author: Maxime Ripard Date: Thu May 16 12:31:51 2019 +0200 drm: Replace instances of drm_format_info by drm_get_format_info drm_get_format_info directly calls into drm_format_info, but takes directly a struct drm_mode_fb_cmd2 pointer, instead of the fourcc directly. It's shorter to not dereference it, and we can customise the behaviour at the driver level if we want to, so let's switch to it where it makes sense. Reviewed-by: Emil Velikov Reviewed-by: Paul Kocialkowski Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/5859d68664b8f0804a56e7386937f6db986b9e0f.1558002671.git-series.maxime.ripard@bootlin.com drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 4 ++-- drivers/gpu/drm/gma500/framebuffer.c | 2 +- drivers/gpu/drm/omapdrm/omap_fb.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit bf39607c16141811d0f5fe67e231364c96a87e09 Author: Maxime Ripard Date: Thu May 16 12:31:50 2019 +0200 drm/fourcc: Pass the format_info pointer to drm_format_plane_width/height So far, the drm_format_plane_height/width functions were operating on the format's fourcc and was doing a lookup to retrieve the drm_format_info structure and return the cpp. However, this is inefficient since in most cases, we will have the drm_format_info pointer already available so we shouldn't have to perform a new lookup. Some drm_fourcc functions also already operate on the drm_format_info pointer for that reason, so the API is quite inconsistent there. Let's follow the latter pattern and remove the extra lookup while being a bit more consistent. In order to be extra consistent, also rename that function to drm_format_info_plane_cpp and to a static function in the header to match the current policy. The parameters order have also be changed to match the other functions prototype. Reviewed-by: Emil Velikov Reviewed-by: Paul Kocialkowski Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/514af1d489d80b8b1767e3716b663ce5103da6eb.1558002671.git-series.maxime.ripard@bootlin.com drivers/gpu/drm/drm_fourcc.c | 48 ----------------------------------- drivers/gpu/drm/meson/meson_overlay.c | 12 ++++----- include/drm/drm_fourcc.h | 46 +++++++++++++++++++++++++++++++-- 3 files changed, 50 insertions(+), 56 deletions(-) commit 24c478ead0bf50a758e9dbecc7356e9eebf20271 Author: Maxime Ripard Date: Thu May 16 12:31:49 2019 +0200 drm/fourcc: Pass the format_info pointer to drm_format_plane_cpp So far, the drm_format_plane_cpp function was operating on the format's fourcc and was doing a lookup to retrieve the drm_format_info structure and return the cpp. However, this is inefficient since in most cases, we will have the drm_format_info pointer already available so we shouldn't have to perform a new lookup. Some drm_fourcc functions also already operate on the drm_format_info pointer for that reason, so the API is quite inconsistent there. Let's follow the latter pattern and remove the extra lookup while being a bit more consistent. In order to be extra consistent, also rename that function to drm_format_info_plane_cpp and to a static function in the header to match the current policy. Reviewed-by: Emil Velikov Reviewed-by: Paul Kocialkowski Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/32aa13e53dbc98a90207fd290aa8e79f785fb11e.1558002671.git-series.maxime.ripard@bootlin.com drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 4 +++- drivers/gpu/drm/arm/malidp_hw.c | 3 ++- drivers/gpu/drm/arm/malidp_planes.c | 2 +- drivers/gpu/drm/drm_client.c | 3 ++- drivers/gpu/drm/drm_fb_helper.c | 2 +- drivers/gpu/drm/drm_format_helper.c | 4 ++-- drivers/gpu/drm/drm_fourcc.c | 20 -------------------- drivers/gpu/drm/i915/intel_sprite.c | 3 ++- drivers/gpu/drm/mediatek/mtk_drm_fb.c | 2 +- drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c | 3 ++- drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c | 2 +- drivers/gpu/drm/msm/msm_fb.c | 2 +- drivers/gpu/drm/radeon/radeon_fb.c | 4 +++- drivers/gpu/drm/rockchip/rockchip_drm_fb.c | 2 +- drivers/gpu/drm/stm/ltdc.c | 2 +- drivers/gpu/drm/tegra/fb.c | 2 +- drivers/gpu/drm/zte/zx_plane.c | 2 +- include/drm/drm_fourcc.h | 18 +++++++++++++++++- 18 files changed, 42 insertions(+), 38 deletions(-) commit f3e9632cb6241a6c098427510ad3ee041365ae64 Author: Maxime Ripard Date: Thu May 16 12:31:48 2019 +0200 drm: Remove users of drm_format_(horz|vert)_chroma_subsampling drm_format_horz_chroma_subsampling and drm_format_vert_chroma_subsampling are basically a lookup in the drm_format_info table plus an access to the hsub and vsub fields of the appropriate entry. Most drivers are using this function while having access to the entry already, which means that we will perform an unnecessary lookup. Removing the call to these functions is therefore more efficient. Some drivers will not have access to that entry in the function, but in this case the overhead is minimal (we just have to call drm_format_info() to perform the lookup) and we can even avoid multiple, inefficient lookups in some places that need multiple fields from the drm_format_info structure. This is amplified by the fact that most of the time the callers will have to retrieve both the vsub and hsub fields, meaning that they would perform twice the lookup. Reviewed-by: Emil Velikov Reviewed-by: Paul Kocialkowski Reviewed-by: Philipp Zabel Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/6b3cceb8161e2c1d40c2681de99202328b0a8abc.1558002671.git-series.maxime.ripard@bootlin.com drivers/gpu/drm/arm/malidp_planes.c | 6 ++--- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 9 ++----- drivers/gpu/drm/drm_fourcc.c | 34 ------------------------- drivers/gpu/drm/imx/ipuv3-plane.c | 15 +++++------ drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 9 ++----- drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c | 24 ++++++++--------- drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c | 2 +- drivers/gpu/drm/msm/msm_fb.c | 8 ++---- drivers/gpu/drm/rockchip/rockchip_drm_fb.c | 9 ++----- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 10 +++----- drivers/gpu/drm/tegra/fb.c | 9 +++---- drivers/gpu/drm/vc4/vc4_plane.c | 13 +++------- include/drm/drm_fourcc.h | 2 -- 13 files changed, 38 insertions(+), 112 deletions(-) commit 05c452c115bffa12f78346723f0282a4264ed200 Author: Maxime Ripard Date: Thu May 16 12:31:47 2019 +0200 drm: Remove users of drm_format_num_planes drm_format_num_planes() is basically a lookup in the drm_format_info table plus an access to the num_planes field of the appropriate entry. Most drivers are using this function while having access to the entry already, which means that we will perform an unnecessary lookup. Removing the call to drm_format_num_planes is therefore more efficient. Some drivers will not have access to that entry in the function, but in this case the overhead is minimal (we just have to call drm_format_info() to perform the lookup) and we can even avoid multiple, inefficient lookups in some places that need multiple fields from the drm_format_info structure. Reviewed-by: Emil Velikov Reviewed-by: Paul Kocialkowski Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/5ffcec9d14a50ed538e37d565f546802452ee672.1558002671.git-series.maxime.ripard@bootlin.com drivers/gpu/drm/arm/malidp_mw.c | 2 +- drivers/gpu/drm/armada/armada_fb.c | 3 ++- drivers/gpu/drm/drm_fourcc.c | 16 ---------------- drivers/gpu/drm/mediatek/mtk_drm_fb.c | 6 ++++-- drivers/gpu/drm/meson/meson_overlay.c | 2 +- drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c | 9 ++++++--- drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c | 3 ++- drivers/gpu/drm/msm/msm_fb.c | 8 ++++++-- drivers/gpu/drm/omapdrm/omap_fb.c | 4 +++- drivers/gpu/drm/rockchip/rockchip_drm_fb.c | 6 +++--- drivers/gpu/drm/tegra/fb.c | 3 ++- drivers/gpu/drm/vc4/vc4_plane.c | 2 +- drivers/gpu/drm/zte/zx_plane.c | 4 +--- include/drm/drm_fourcc.h | 1 - 14 files changed, 32 insertions(+), 37 deletions(-) commit 45babef01f92f1c3ab3012dfb7e98ae51f1ebeab Author: Maxime Ripard Date: Thu May 16 12:31:46 2019 +0200 drm/rockchip: Change the scl_vop_cal_scl_fac to pass drm_format_info The Rockchip VOP driver has a function, scl_vop_cal_scl_fac, that will lookup the drm_format_info structure from the fourcc passed to it by its caller. However, its only caller already derefences the drm_format_info structure it has access to to retrieve that fourcc. Change the prototype of that function to pass the drm_format_info structure directly, removing the need for an extra lookup. Reviewed-by: Paul Kocialkowski Reviewed-by: Sean Paul Suggested-by: Philipp Zabel Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/27b0041c7977402df4a087c78d2849ffe51c9f1c.1558002671.git-series.maxime.ripard@bootlin.com drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 35b81a037b2ee78f05d17e0856f0005ad8fc67f1 Author: Geert Uytterhoeven Date: Thu May 2 14:32:20 2019 +0200 ARM: dts: rskrza1: Add input switches Add support for input switches SW1-3 on the Renesas RZ/A1 RSK+RZA1 development board. Note that this uses the IRQ interrupts, as the RZ/A1 GPIO controller does not include interrupt support. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r7s72100-rskrza1.dts | 38 ++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit bd6ed4674358e482f72abe853a42477a800cadbc Author: Geert Uytterhoeven Date: Thu May 2 14:32:19 2019 +0200 ARM: dts: r7s72100: Add IRQC device node Enable support for the IRQC on RZ/A1H, which is a small front-end to the GIC. This allows to use up to 8 external interrupts with configurable sense select. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r7s72100.dtsi | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit b995421faef5b24ee8ec60d66b356b57ca0c8b77 Author: Biju Das Date: Tue Apr 23 14:13:23 2019 +0100 ARM: shmobile: Remove GENERIC_PHY from shmobile_defconfig Remove the GENERIC_PHY config option from shmobile_defconfig, as it is selected by PHY_RCAR_GEN3_USB2. PHY_RCAR_GEN3_USB2 is enabled by the commit 0cd4f4f10245d1d9616e00245 ("ARM: shmobile: Enable PHY_RCAR_GEN3_USB2 in shmobile_defconfig"). Signed-off-by: Biju Das Acked-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/configs/shmobile_defconfig | 1 - 1 file changed, 1 deletion(-) commit a461b5bf17ce406dc9b7c10eb3cad7f46621478c Author: Cao Van Dong Date: Thu Apr 25 10:25:14 2019 +0900 arm64: dts: renesas: r8a7795: Add TPU support Add tpu device node to dtsi for TPU support on r8a7795 SoC. Signed-off-by: Cao Van Dong Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 1a8c4542bca35d1e011f8313045639910ccc5abc Author: Cao Van Dong Date: Thu Apr 25 10:25:16 2019 +0900 arm64: dts: renesas: r8a77965: Add TPU support Add tpu device node to dtsi for TPU support on r8a77965 SoC. Signed-off-by: Cao Van Dong Reviewed-by: Geert Uytterhoeven Tested-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77965.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 8067f6f421dc82eaf43fe7530f36512e8a2c65dc Author: Cao Van Dong Date: Thu Apr 25 10:25:15 2019 +0900 arm64: dts: renesas: r8a7796: Add TPU support Add tpu device node to dtsi for TPU support on r8a7796 SoC. Signed-off-by: Cao Van Dong Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7796.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 95ff4aab4173fce010832756b8bea3a7cba3238d Author: Spyridon Papageorgiou Date: Thu Apr 11 14:41:03 2019 +0200 arm64: dts: renesas: ulcb-kf: Add support for TI WL1837 This patch adds description of TI WL1837 and links interfaces to communicate with the IC, namely the SDIO interface to WLAN. Signed-off-by: Spyridon Papageorgiou Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/ulcb-kf.dtsi | 49 ++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) commit c7d4df305ca4ddd8747691f9133b9611579d0b4e Author: Simon Horman Date: Wed Mar 13 11:51:18 2019 +0100 arm64: dts: renesas: draak: Remove unnecessary index from vin4 port The ports node of vin4 only has one sub-node and thus does not need #address-cells/#size-cells and the sub-node does not need an exit. This addresses the following warning: # make dtbs W=1 ... arch/arm64/boot/dts/renesas/r8a77995-draak.dts:492.8-503.4: Warning (graph_child_address): /soc/video@e6ef4000/ports: graph node has single child node 'port@0', #address-cells/#size-cells are not necessary Fixes: 6a0942c20f5c ("arm64: dts: renesas: draak: Describe CVBS input") Cc: Jacopo Mondi Signed-off-by: Simon Horman Tested-by: Laurent Pinchart Reviewed-by: Niklas Söderlund arch/arm64/boot/dts/renesas/r8a77995-draak.dts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit a597dcb1d4ab7ddbba7e80b023eff892926f146c Author: Fabrizio Castro Date: Tue Apr 23 14:16:48 2019 +0100 arm64: dts: renesas: cat874: Add HDMI audio The CAT874 board pushes sound via I2S over SSI0 into the TDA19988BET chip. This commit wires things up so that we can get sound out of the HDMI interface. Signed-off-by: Fabrizio Castro Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a774c0-cat874.dts | 56 +++++++++++++++++++++++++ 1 file changed, 56 insertions(+) commit 94fc0ee22a5cb3a744a38906a55323fd6ac793fa Author: Fabrizio Castro Date: Tue Apr 16 09:39:37 2019 +0100 arm64: dts: renesas: cat874: Add HDMI video support The CAT874 board comes with a HDMI connector, managed by a TDA19988BET chip, connected to the RZ/G2E SoC via DPAD. This patch adds the necessary support to the board DT. Signed-off-by: Fabrizio Castro Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a774c0-cat874.dts | 82 +++++++++++++++++++++++++ 1 file changed, 82 insertions(+) commit 57cfa7314697cafecc1d0f79af72014bd02f8ce5 Author: Biju Das Date: Tue Apr 16 16:31:57 2019 +0100 arm64: dts: renesas: r8a774a1: Connect Ethernet-AVB to IPMMU-DS0 Add IPMMU-DS0 to the Ethernet-AVB device node. Based on work by Magnus Damm for the r8a7795. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a774a1.dtsi | 1 + 1 file changed, 1 insertion(+) commit 01712eaa0d969cc347a5146c6efd0a1ec67a6372 Author: Biju Das Date: Tue Apr 16 16:31:56 2019 +0100 arm64: dts: renesas: r8a774a1: Tie Audio-DMAC to IPMMU-MP Hook up r8a774a1 Audio-DMAC nodes to the IPMMU-MP. Based on work for the r8a7795 by Magnus Damm. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a774a1.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit c3362a74d977f2509b5523afddc9887b3831279f Author: Biju Das Date: Tue Apr 16 16:31:55 2019 +0100 arm64: dts: renesas: r8a774a1: Tie SYS-DMAC to IPMMU-DS0/1 Hook up r8a774a1 DMAC nodes to the IPMMUs. In particular SYS-DMAC0 gets tied to IPMMU-DS0, and SYS-DMAC1 and SYS-DMAC2 get tied to IPMMU-DS1. Based on work for the r8a7796 by Magnus Damm. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a774a1.dtsi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 466f475f63d1889c192c751f53ab1030e4dd829c Author: Biju Das Date: Tue Apr 16 16:31:54 2019 +0100 arm64: dts: renesas: r8a774a1: Add FDP1 instance The r8a774a1 has a single FDP1 instance similar to r8a7796. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a774a1.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit c4f223b419ba3fe44822d3180d3b9e5e6cb33c2e Author: Biju Das Date: Tue Apr 16 16:31:53 2019 +0100 arm64: dts: renesas: r8a774a1: Add DU device to DT Add the DU device to r8a774a1.dtsi in a disabled state. Signed-off-by: Biju Das Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a774a1.dtsi | 63 +++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) commit 391dca2105c435a2003c3c19f2d0b68742f43434 Author: Biju Das Date: Tue Apr 16 16:31:52 2019 +0100 arm64: dts: renesas: r8a774a1: Add VSP instances The r8a774a1 soc has 5 VSP instances similar to r8a7796. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a774a1.dtsi | 55 +++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) commit 998960be3a2e1b3b00387b42052127a8e6342de0 Author: Fabrizio Castro Date: Thu Apr 18 12:00:55 2019 +0100 arm64: defconfig: Enable TDA19988 The EK874 board comes with a TDA19988 chip on board, therefore enable it in the defconfig. Signed-off-by: Fabrizio Castro Signed-off-by: Simon Horman arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 185555ff994eaf0a992ec52221a9b05f645ecd22 Author: Marek Vasut Date: Wed May 15 10:23:26 2019 +0200 ARM: dts: r8a779x: Configure PMIC IRQ pinmux The PMIC IRQ line pin multiplexing configuration is missing from the DTs. Since the line is configured correctly by default, the system works fine. However, add the IRQ line pin multiplexing configuration for completeness. Signed-off-by: Marek Vasut Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7790-lager.dts | 7 +++++++ arch/arm/boot/dts/r8a7790-stout.dts | 7 ++++++- arch/arm/boot/dts/r8a7791-koelsch.dts | 7 +++++++ arch/arm/boot/dts/r8a7791-porter.dts | 7 +++++++ arch/arm/boot/dts/r8a7792-blanche.dts | 7 +++++++ arch/arm/boot/dts/r8a7793-gose.dts | 7 +++++++ 6 files changed, 41 insertions(+), 1 deletion(-) commit 5c64e61bb217561f5232934a9e80633daab7d106 Author: Chris Brandt Date: Tue May 14 09:55:52 2019 -0500 ARM: dts: rza2mevb: Add 48MHz USB clock The RZ/A2M EVB has a 48MHz clock attached to USB_X1. Signed-off-by: Chris Brandt Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r7s9210-rza2mevb.dts | 5 +++++ 1 file changed, 5 insertions(+) commit 283f881a4d3762354d20217bc0306ee850b3c685 Author: Chris Brandt Date: Tue May 14 09:55:51 2019 -0500 ARM: dts: r7s9210: Add USB clock Add USB clock node. If present, this clock input must be 48MHz. Signed-off-by: Chris Brandt Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r7s9210.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit eb8be0276d903a2374c7abc7f3b9a22ba7fd9670 Author: Chris Brandt Date: Mon May 6 15:12:36 2019 -0500 ARM: dts: rza2mevb: add ethernet aliases Add ethernet aliases so u-boot can find the device nodes. Signed-off-by: Chris Brandt Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r7s9210-rza2mevb.dts | 2 ++ 1 file changed, 2 insertions(+) commit c2fad09c28ace81f149afe74a8c378c4824b2b27 Author: Chris Brandt Date: Tue Apr 30 08:23:09 2019 -0500 ARM: dts: rza2mevb: Add SDHI support The RZ/A2M EVB supports 2 SD card slots. A micro SD slot on the CPU board, and a full SD card slot on the sub board. Signed-off-by: Chris Brandt Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r7s9210-rza2mevb.dts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit c5dab2e9a90a75ad839764c777a8da091215eee8 Author: Chris Brandt Date: Tue Apr 30 08:23:08 2019 -0500 ARM: dts: rza2mevb: Add Ethernet support The RZ/A2M EVB sub board has 2 Ethernet jacks on it. Set switch SW6_4 to ON to use Ethernet Ch-0 Set switch SW6_5 to ON to use Ethernet Ch-1 Signed-off-by: Chris Brandt Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r7s9210-rza2mevb.dts | 50 ++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) commit a49f76cddaee89ffe7e72cf6e38c3635b97058b8 Author: Chris Brandt Date: Tue Apr 30 08:23:07 2019 -0500 ARM: dts: r7s9210: Add SDHI support Add SDHI support for the R7S9210 (RZ/A2) SoC. Signed-off-by: Chris Brandt Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r7s9210.dtsi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 49da03c67c36134363b9fee558e86d39db8147d4 Author: Chris Brandt Date: Tue Apr 30 08:23:06 2019 -0500 ARM: dts: r7s9210: Add RIIC support Add I2C support for the R7S9210 (RZ/A2) SoC. Signed-off-by: Chris Brandt Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r7s9210.dtsi | 76 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) commit cbcb639172c358dee54ef89196cee9d59b887bd6 Author: Chris Brandt Date: Tue Apr 30 08:23:04 2019 -0500 ARM: dts: r7s9210: Add Ethernet support Add Ethernet support for the RZ/A2 SoC. Signed-off-by: Chris Brandt Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r7s9210.dtsi | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 9105996ba984292ea42eb8c38721c792f26ce027 Author: Chris Brandt Date: Tue Apr 30 08:23:03 2019 -0500 ARM: dts: r7s9210: Add RSPI Add RSPI support for RZ/A2 SoC. Signed-off-by: Chris Brandt Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r7s9210.dtsi | 45 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit eceb995e04b74204c73f9dd0ccb19061d5082063 Merge: 318dacbd049b a188339ca5a3 Author: Mark Brown Date: Mon May 20 11:54:21 2019 +0100 Merge tag 'v5.2-rc1' into spi-5.3 Linux 5.2-rc1 commit 96d82e9d0dc799bb382ed0fe9db30c79c3a9f3b9 Merge: 977bfde5d4cb a188339ca5a3 Author: Mark Brown Date: Mon May 20 11:54:11 2019 +0100 Merge tag 'v5.2-rc1' into regulator-5.3 Linux 5.2-rc1 commit 1c7c3237c0cc4ad3c7b0df458290c8e2a652f178 Merge: bfa8130f50a6 a188339ca5a3 Author: Mark Brown Date: Mon May 20 11:53:50 2019 +0100 Merge tag 'v5.2-rc1' into asoc-5.3 Linux 5.2-rc1 commit a9f7b1993b709ffbbeeaeff232701639ca31ef95 Author: Jerome Brunet Date: Mon May 13 14:31:15 2019 +0200 clk: meson: g12a: add controller register init Add the MPLL common register initial setting Signed-off-by: Jerome Brunet drivers/clk/meson/g12a.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 19a18d42bf557b8420a55e0fce7be5aec9f8ef8c Author: Jerome Brunet Date: Mon May 13 14:31:14 2019 +0200 clk: meson: eeclk: add init regs Like the PLL and MPLL, the controller may require some magic setting to be applied on startup. This is needed when the initial setting is not applied by the boot ROM. The controller need to do it when the setting applies to several clock, like all the MPLLs in the case of g12a. Signed-off-by: Jerome Brunet drivers/clk/meson/meson-eeclk.c | 3 +++ drivers/clk/meson/meson-eeclk.h | 2 ++ 2 files changed, 5 insertions(+) commit 76d3fc38a06b4b2aa9a64a0e6a0bbe605d23991e Author: Jerome Brunet Date: Mon May 13 14:31:13 2019 +0200 clk: meson: g12a: add mpll register init sequences Add the required init of each MPLL of the g12a. Signed-off-by: Jerome Brunet drivers/clk/meson/g12a.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 19855c8276fec011afd8617a634eb62a29e6b871 Author: Jerome Brunet Date: Mon May 13 14:31:12 2019 +0200 clk: meson: mpll: add init callback and regs Until now (gx and axg), the mpll setting on boot (whatever the bootloader) was good enough to generate a clean fractional division. It is not the case on the g12a. While moving away from the vendor u-boot, it was noticed the fractional part of the divider was no longer applied. Like on the pll, some magic settings need to applied on the mpll register. This change adds the ability to do that on the mpll driver. Signed-off-by: Jerome Brunet drivers/clk/meson/clk-mpll.c | 35 ++++++++++++++++++++++++----------- drivers/clk/meson/clk-mpll.h | 2 ++ 2 files changed, 26 insertions(+), 11 deletions(-) commit dc4e62d373f881cbf51513296a6db7806516a01a Author: Jerome Brunet Date: Mon May 13 14:31:11 2019 +0200 clk: meson: axg: spread spectrum is on mpll2 After testing, it appears that the SSEN bit controls the spread spectrum function on MPLL2, not MPLL0. Fixes: 78b4af312f91 ("clk: meson-axg: add clock controller drivers") Signed-off-by: Jerome Brunet drivers/clk/meson/axg.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 8925dbd03bb29b1b0de30ac4e02c18faf8ddc9db Author: Jerome Brunet Date: Mon May 13 14:31:10 2019 +0200 clk: meson: gxbb: no spread spectrum on mpll0 The documentation says there is an SSEN bit on mpll0 but, after testing it, no spread spectrum function appears to be enabled by this bit on any of the MPLLs. Let's remove it until we know more Fixes: 1f737ffa13ef ("clk: meson: mpll: fix mpll0 fractional part ignored") Signed-off-by: Jerome Brunet drivers/clk/meson/gxbb.c | 5 ----- 1 file changed, 5 deletions(-) commit f9b3eeebef6aabaa37a351715374de53b6da860c Author: Jerome Brunet Date: Mon May 13 14:31:09 2019 +0200 clk: meson: mpll: properly handle spread spectrum The bit 'SSEN' available on some MPLL DSS outputs is not related to the fractional part of the divider but to the function called 'Spread Spectrum'. This function might be used to solve EM issues by adding a jitter on clock signal. This widens the signal spectrum and weakens the peaks in it. While spread spectrum might be useful for some application, it is problematic for others, such as audio. This patch introduce a new flag to the MPLL driver to enable (or not) the spread spectrum function. Fixes: 1f737ffa13ef ("clk: meson: mpll: fix mpll0 fractional part ignored") Tested-by: Martin Blumenstingl Signed-off-by: Jerome Brunet drivers/clk/meson/clk-mpll.c | 9 ++++++--- drivers/clk/meson/clk-mpll.h | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) commit e23fa431e77de3165302d71d90285deff9376676 Author: Puranjay Mohan Date: Sun May 19 22:30:32 2019 +0530 Staging: mt7621-dma: Remove braces around single if statement Fix following checkpatch.pl warning by removing unnecessary braces: WARNING: braces {} are not necessary for single statement blocks Signed-off-by: Puranjay Mohan Signed-off-by: Greg Kroah-Hartman drivers/staging/mt7621-dma/mtk-hsdma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 38fa0e8e4a3b932791443db033ca7c4ed1bace0e Author: Chengguang Xu Date: Mon May 20 13:45:03 2019 +0800 ext2: code cleanup by using test_opt() and clear_opt() Using test_opt() and clear_opt() instead of directly comparing flag bit of mount option. Signed-off-by: Chengguang Xu Signed-off-by: Jan Kara fs/ext2/super.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit e15d92bee8184048e7419193263e62a0830cf365 Author: Chengguang Xu Date: Mon May 20 14:21:16 2019 +0800 doc: ext2: update description of quota options for ext2 ext2 support user/group disk quota by specifying usrquota/grpquota option on mount, so fix the description in the doc properly. Signed-off-by: Chengguang Xu Signed-off-by: Jan Kara Documentation/filesystems/ext2.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 6c71b489ecfd927966571348f4e4135169a9fbd5 Author: Jan Kara Date: Wed May 15 15:39:42 2019 +0200 ext2: Strengthen xattr block checks Check every entry in xattr block for validity in ext2_xattr_set() to detect on disk corruption early. Also since e_value_block field in xattr entry is never != 0 in a valid filesystem, just remove checks for it once we have established entries are valid. Reviewed-by: Chengguang Xu Signed-off-by: Jan Kara fs/ext2/xattr.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) commit 8cd0f2ba787a1a1758dbe063fe6a26ceccd37c24 Author: Jan Kara Date: Wed May 15 15:33:32 2019 +0200 ext2: Merge loops in ext2_xattr_set() There are two very similar loops when searching xattr to set. Just merge them. Reviewed-by: Chengguang Xu Signed-off-by: Jan Kara fs/ext2/xattr.c | 41 +++++++++++++++++++---------------------- 1 file changed, 19 insertions(+), 22 deletions(-) commit f4c3fb8c433f1818da46b720754a5d4a8525fdf0 Author: Chengguang Xu Date: Tue May 14 06:40:42 2019 +0800 ext2: introduce helper for xattr entry validation Introduce helper function ext2_xattr_entry_valid() for xattr entry validation and clean up the entry check related code. Reviewed-by: Andreas Dilger Signed-off-by: Chengguang Xu Signed-off-by: Jan Kara fs/ext2/xattr.c | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) commit 02475de9bb23ed5381f0fb04a84a3c4fad90582d Author: Chengguang Xu Date: Tue May 14 06:40:41 2019 +0800 ext2: introduce helper for xattr header validation Introduce helper function ext2_xattr_header_valid() for xattr header validation and clean up the header check ralated code. Reviewed-by: Andreas Dilger Signed-off-by: Chengguang Xu Signed-off-by: Jan Kara fs/ext2/xattr.c | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) commit f44840ad1f822d9ecee6a3f91f2d17825a361307 Author: Chengguang Xu Date: Mon May 6 09:39:03 2019 +0800 quota: add dqi_dirty_list description to comment of Dquot List Management Actually there are four lists for dquot management, so add the description of dqui_dirty_list to comment. Signed-off-by: Chengguang Xu Signed-off-by: Jan Kara fs/quota/dquot.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit cc9daca6e0ebd443ab1893f0d357fba1ce49bbeb Author: Moses Christopher Date: Sat May 18 12:03:41 2019 +0530 staging: vt665*: use help instead of ---help--- in Kconfig - Resolve the following warning from the Kconfig, "WARNING: prefer 'help' over '---help---' for new help texts" Signed-off-by: Moses Christopher Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/Kconfig | 5 ++--- drivers/staging/vt6656/Kconfig | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) commit 6a478f6715c11d17696e4e67207e02af754bf278 Author: Moses Christopher Date: Sat May 18 12:03:40 2019 +0530 staging: rtl8723bs: use help instead of ---help--- in Kconfig - Resolve the following warning from the Kconfig, "WARNING: prefer 'help' over '---help---' for new help texts" Signed-off-by: Moses Christopher Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7c6840b633ff4206ea1bdeeec37c5655725bd7b0 Author: Moses Christopher Date: Sat May 18 12:03:39 2019 +0530 staging: rtl8188eu: use help instead of ---help--- in Kconfig - Resolve the following warning from the Kconfig, "WARNING: prefer 'help' over '---help---' for new help texts" Signed-off-by: Moses Christopher Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c3c415534d98394d3e6ff24b448ca148130fc274 Author: Moses Christopher Date: Sat May 18 12:03:38 2019 +0530 staging: unisys: use help instead of ---help--- in Kconfig - Resolve the following warning from the Kconfig, "WARNING: prefer 'help' over '---help---' for new help texts" Signed-off-by: Moses Christopher Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2a4482bfae1999f7d9ed3ab5038b0340894e723b Author: Moses Christopher Date: Sat May 18 12:03:37 2019 +0530 staging: most: use help instead of ---help--- in Kconfig - Resolve the following warning from the Kconfig, "WARNING: prefer 'help' over '---help---' for new help texts Signed-off-by: Moses Christopher Signed-off-by: Greg Kroah-Hartman drivers/staging/most/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 30d8b6e18232b55d50bf032584bb0cbd2487d059 Author: Moses Christopher Date: Sat May 18 12:03:36 2019 +0530 staging: fsl-dpaa2: use help instead of ---help--- in Kconfig - Resolve the following warning from the Kconfig, "WARNING: prefer 'help' over '---help---' for new help texts" Signed-off-by: Moses Christopher Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/Kconfig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 7ac3e13a9fb36cec252e80270c5da3315be5d77f Author: Geordan Neukum Date: Sat May 18 02:30:00 2019 +0000 staging: kpc2000: kpc_i2c: fixup block comment style in i2c_driver.c Throughout i2c_driver.c, there are numerous deviations from the two standards of: - placing a '*' at the beginning of every line containing a block comment. - placing the closing comment marker '*/' on a new line. Instead, use a block comment style that is more consistent with the prescribed guidelines. Signed-off-by: Geordan Neukum Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc_i2c/i2c_driver.c | 36 ++++++++++++++++------------ 1 file changed, 21 insertions(+), 15 deletions(-) commit 03a51687d297c5d08a2d0019499ba457e26a107f Author: Geordan Neukum Date: Sat May 18 02:29:59 2019 +0000 staging: kpc2000: kpc_i2c: use %s with __func__ identifier in log messages Throughout i2c_driver.c, there are instances where the log strings contain the function's name hardcoded into the string. Instead, use the printk conversion specifier '%s' with the __func__ preprocessor identifier to more maintainably print the function's name. Signed-off-by: Geordan Neukum Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc_i2c/i2c_driver.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) commit 63306de0e84059b3c4bdc8669d06a5b1832bb4ea Author: Geordan Neukum Date: Sat May 18 02:29:58 2019 +0000 staging: kpc2000: kpc_i2c: prevent memory leak in probe() error case The probe() function performs a kzalloc to dynamically allocate memory at runtime. If the allocation succeeds, yet invoking the function i2c_add_adapter fails, the dynamically allocated memory is never freed. Change the allocation to use the managed allocation API instead and remove the manual freeing of the memory in the remove() function. Signed-off-by: Geordan Neukum Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc_i2c/i2c_driver.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 11011c03d647d95b7a09f2ca6a39fc9c9f66a1a5 Author: Geordan Neukum Date: Sat May 18 02:29:57 2019 +0000 staging: kpc2000: kpc_i2c: reformat copyright for better readability The copyright header in i2c_driver.c is difficult to read and not chronologically ordered. Reformat and reorganize the copyright header to be similar to other drivers in the i2c subsystem. Signed-off-by: Geordan Neukum Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc_i2c/i2c_driver.c | 30 +++++++++++++++++----------- 1 file changed, 18 insertions(+), 12 deletions(-) commit 8459b544137724656e7c16072d24f12ab803816a Author: Geordan Neukum Date: Sat May 18 02:29:56 2019 +0000 staging: kpc2000: kpc_i2c: reindent i2c_driver.c i2c_driver.c uses a mixture of space and tab indentations which conflicts with the kernel coding style guide. Reindent i2c_driver.c. Signed-off-by: Geordan Neukum Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc_i2c/i2c_driver.c | 1014 +++++++++++++------------- 1 file changed, 507 insertions(+), 507 deletions(-) commit 26a14267aff218c60b89007fdb44ca392ba6122c Author: Rushikesh S Kadam Date: Wed May 15 16:08:41 2019 +0530 platform/chrome: Add ChromeOS EC ISHTP driver This driver implements a slim layer to enable the ChromeOS EC kernel stack (cros_ec) to communicate with ChromeOS EC firmware running on the Intel Integrated Sensor Hub (ISH). The driver registers a ChromeOS EC MFD device to connect with cros_ec kernel stack (upper layer), and it registers a client with the ISH Transport Protocol bus (lower layer) to talk with the ISH firwmare. See description of the ISHTP protocol at Documentation/hid/intel-ish-hid.txt Signed-off-by: Rushikesh S Kadam Acked-by: Srinivas Pandruvada Reviewed-by: Jett Rink Tested-by: Jett Rink Signed-off-by: Enric Balletbo i Serra drivers/platform/chrome/Kconfig | 13 + drivers/platform/chrome/Makefile | 1 + drivers/platform/chrome/cros_ec_ishtp.c | 763 ++++++++++++++++++++++++++++++++ 3 files changed, 777 insertions(+) commit 75501d2edc8044af145a2c237b0ccc2c03deb4ab Author: Evan Green Date: Thu May 9 11:17:50 2019 -0700 platform/chrome: cros_ec_spi: Always add of_match_table The Chrome OS EC driver attaches to devices using the of_match_table even when ACPI is the underlying firmware. It does this using the magic PRP0001 ACPI HID, which tells ACPI to go find an OF compatible string under the hood and match on that. The cros_ec_spi driver needs to provide the of_match_table regardless of whether CONFIG_OF is enabled or not, since the table is used by ACPI for PRP0001 devices. Signed-off-by: Evan Green Reviewed-by: Benson Leung Signed-off-by: Enric Balletbo i Serra drivers/platform/chrome/cros_ec_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2ad1f7a91449de48d4bd5d1ec361ba7bb9026505 Author: Nick Crews Date: Wed May 8 15:38:09 2019 -0600 platform/chrome: wilco_ec: Remove 256 byte transfers The 0xF6 command, intended to send and receive 256 byte payloads to and from the EC, is not needed. The 0xF5 command for 32 byte payloads is sufficient. This patch removes support for the 0xF6 command and 256 byte payloads. Signed-off-by: Nick Crews Signed-off-by: Enric Balletbo i Serra Documentation/ABI/testing/debugfs-wilco-ec | 16 +++++++--------- drivers/platform/chrome/wilco_ec/core.c | 4 +--- drivers/platform/chrome/wilco_ec/debugfs.c | 10 ++-------- drivers/platform/chrome/wilco_ec/mailbox.c | 21 +++++---------------- include/linux/platform_data/wilco-ec.h | 9 ++------- 5 files changed, 17 insertions(+), 43 deletions(-) commit 0c0b7ea23aed0b55ef2f9803f13ddaae1943713d Author: Nick Crews Date: Wed Apr 24 10:56:50 2019 -0600 platform/chrome: wilco_ec: Add property helper library A Property is typically a data item that is stored to NVRAM by the EC. Each of these data items has an index associated with it, known as the Property ID (PID). Properties may have variable lengths, up to a max of WILCO_EC_PROPERTY_MAX_SIZE bytes. Properties can be simple integers, or they may be more complex binary data. This patch adds support for getting and setting properties. This will be useful for setting the charge algorithm and charge schedules, which all use properties. Signed-off-by: Nick Crews Signed-off-by: Enric Balletbo i Serra drivers/platform/chrome/wilco_ec/Makefile | 2 +- drivers/platform/chrome/wilco_ec/properties.c | 132 ++++++++++++++++++++++++++ include/linux/platform_data/wilco-ec.h | 71 ++++++++++++++ 3 files changed, 204 insertions(+), 1 deletion(-) commit 4c1ca625c622b7a9f04c2949fd1ffdc6effa86de Author: Nick Crews Date: Tue Apr 16 19:20:47 2019 -0600 platform/chrome: wilco_ec: Add Boot on AC support Boot on AC is a policy which makes the device boot from S5 when AC power is connected. This is useful for users who want to run their device headless or with a dock. Signed-off-by: Nick Crews Signed-off-by: Enric Balletbo i Serra Documentation/ABI/testing/sysfs-platform-wilco-ec | 9 +++ drivers/platform/chrome/wilco_ec/Makefile | 2 +- drivers/platform/chrome/wilco_ec/core.c | 9 +++ drivers/platform/chrome/wilco_ec/sysfs.c | 77 +++++++++++++++++++++++ include/linux/platform_data/wilco-ec.h | 12 ++++ 5 files changed, 108 insertions(+), 1 deletion(-) commit 439152ae0efff2e9e72b6a193e98972b4acf8fc0 Author: Harald Geyer Date: Thu May 16 17:51:39 2019 +0200 arm64: dts: allwinner: a64: Enable audio on Teres-I The TERES-I has internal speakers (left, right), internal microphone and a headset combo jack (headphones + mic), "CTIA" (android) pinout. The headphone and mic detect lines of the A64 are connected properly, but AFAIK currently unsupported by the driver. Reviewed-by: Chen-Yu Tsai Signed-off-by: Harald Geyer Signed-off-by: Torsten Duwe Signed-off-by: Maxime Ripard .../boot/dts/allwinner/sun50i-a64-teres-i.dts | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit 78666baac29503a1f585b13f22b5ceb93ab26421 Author: Sabyasachi Gupta Date: Thu May 16 20:55:56 2019 +0530 drm/bridge: Remove duplicate header Remove duplicate header which is included twice Signed-off-by: Sabyasachi Gupta Reviewed-by: Laurent Pinchart Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/5cdd8109.1c69fb81.6e003.b84b@mx.google.com drivers/gpu/drm/bridge/panel.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ca0961011db57e39880df0b5708df8aa3339dc6f Author: Jernej Skrabec Date: Sat May 18 17:40:14 2019 +0200 ARM: dts: sun8i-h3: Fix wifi in Beelink X2 DT mmc1 node where wifi module is connected doesn't have properly defined power supplies so wifi module is never powered up. Fix that by specifying additional power supplies. Additionally, this STB may have either Realtek or Broadcom based wifi module. One based on Broadcom module also needs external clock to work properly. Fix that by adding clock property to wifi_pwrseq node. Fixes: e582b47a9252 ("ARM: dts: sun8i-h3: Add dts for the Beelink X2 STB") Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-h3-beelink-x2.dts | 4 ++++ 1 file changed, 4 insertions(+) commit cc072fb6df848e2c957cf31427c4ca5cb4c38f7e Author: Chen-Yu Tsai Date: Fri Apr 19 00:18:04 2019 +0800 arm64: dts: allwinner: a64: bananapi-m64: Enable PMIC USB power supply The Bananapi M64 has a micro-USB connector with USB OTG support (that is already enabled). VBUS from this connector is wired to the PMIC's VBUS input. Enable the PMIC's USB power supply on this board, and also hook it up to the USB PHY. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts | 5 +++++ 1 file changed, 5 insertions(+) commit d7274dc4b8c7ecc61e529679dfd03d0c03629eaf Author: Chen-Yu Tsai Date: Fri Apr 19 00:18:03 2019 +0800 arm64: dts: allwinner: axp803: add USB power supply node The AXP803 has a VBUS power input. Add a device node for it, now that we support it. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/axp803.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit c478a12e7253ec93a05c98bd60ee2150fc24d751 Author: Icenowy Zheng Date: Thu May 16 17:51:30 2019 +0200 arm64: dts: allwinner: a64: Add pinmux for RGB666 LCD Allwinner A64's TCON0 can output RGB666 LCD signal. Add its pinmux. Signed-off-by: Icenowy Zheng Signed-off-by: Vasily Khoruzhick Signed-off-by: Torsten Duwe Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 276accf2daa03d2d78dccb7017bdbbfde1e0b679 Author: Greg Kroah-Hartman Date: Fri May 17 10:49:39 2019 +0200 staging: kpc2000: remove lock_card/unlock_card functions We do not need an inline function to "hide" the lock, so just replace the few calls to these functions with the "real" mutex_lock/unlock() calls. Cc: Matt Sickler Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/cell_probe.c | 4 ++-- drivers/staging/kpc2000/kpc2000/core.c | 10 +++++----- drivers/staging/kpc2000/kpc2000/pcie.h | 14 -------------- 3 files changed, 7 insertions(+), 21 deletions(-) commit 92642f385b7ea03117aff75e436a087a387fedb0 Author: Greg Kroah-Hartman Date: Fri May 17 10:49:37 2019 +0200 staging: kpc2000: remove kp200_module.c file The kp200_module.c does not need to be stand-alone, so move it into the core.c file. This lets us make some functions static, reducing the global namespace of the driver. Cc: Matt Sickler Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/Makefile | 2 +- drivers/staging/kpc2000/kpc2000/core.c | 44 +++++++++++++++++++- drivers/staging/kpc2000/kpc2000/kp2000_module.c | 54 ------------------------- drivers/staging/kpc2000/kpc2000/pcie.h | 2 - 4 files changed, 43 insertions(+), 59 deletions(-) commit 59ae81e11fec92f1080c720b1e36c9176be58a64 Author: Greg Kroah-Hartman Date: Fri May 17 10:49:35 2019 +0200 staging: kpc2000: fix coding style in uapi.h Use tabs in uapi.h, like is mandated. Cc: Matt Sickler Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/uapi.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 15cc5c284af2a29e5c6ad3657b2ce3f6c136d5c7 Author: Oscar Gomez Fuente Date: Fri May 17 19:49:56 2019 +0200 staging: fieldbus: solve warning incorrect type dev_core.c These changes solve a warning realated to an incorrect type inilizer in the function fieldbus_poll. Signed-off-by: Oscar Gomez Fuente Signed-off-by: Greg Kroah-Hartman drivers/staging/fieldbus/dev_core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit deabe03523a795e6885a7a263f69de3d0cdf54f7 Author: Puranjay Mohan Date: Fri May 17 22:59:30 2019 +0530 Staging: rtl8192u: ieee80211: Use !x in place of NULL comparisons Fix the following checkpatch.pl warning : CHECK: Comparison to NULL could be written "!x" by changing (x == NULL) to !x and (x != NULL) to x. Signed-off-by: Puranjay Mohan Signed-off-by: Greg Kroah-Hartman .../staging/rtl8192u/ieee80211/ieee80211_module.c | 2 +- drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 14 +++++++------- .../staging/rtl8192u/ieee80211/ieee80211_softmac.c | 4 ++-- drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c | 20 ++++++++++---------- 4 files changed, 20 insertions(+), 20 deletions(-) commit 63a9c3edcb07c93dbd355399cfd8002a632282b8 Author: Jeeeun Evans Date: Fri May 17 18:14:48 2019 +0100 staging: rtl8723bs: Fix boolinit.cocci warnings This patch removes unnecessary comparisons to bool. Issue found by coccinelle: drivers/staging/rtl8723bs/core/rtw_ap.c:2159:5-11: WARNING: Comparison to bool drivers/staging/rtl8723bs/core/rtw_cmd.c:1741:7-17: WARNING: Comparison to bool drivers/staging/rtl8723bs/core/rtw_ioctl_set.c:360:5-15: WARNING: Comparison to bool drivers/staging/rtl8723bs/core/rtw_ioctl_set.c:360:28-39: WARNING: Comparison to bool drivers/staging/rtl8723bs/core/rtw_mlme.c:1675:6-10: WARNING: Comparison to bool drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:6766:8-21: WARNING: Comparison to bool drivers/staging/rtl8723bs/core/rtw_pwrctrl.c:181:5-40: WARNING: Comparison to bool drivers/staging/rtl8723bs/core/rtw_wlan_util.c:748:14-42: WARNING: Comparison to bool drivers/staging/rtl8723bs/core/rtw_xmit.c:2429:15-47: WARNING: Comparison to bool drivers/staging/rtl8723bs/core/rtw_xmit.c:2458:7-17: WARNING: Comparison to bool drivers/staging/rtl8723bs/core/rtw_xmit.c:2524:8-18: WARNING: Comparison to bool drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:1653:13-36: WARNING: Comparison to bool Signed-off-by: Jeeeun Evans Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_ap.c | 2 +- drivers/staging/rtl8723bs/core/rtw_cmd.c | 2 +- drivers/staging/rtl8723bs/core/rtw_ioctl_set.c | 2 +- drivers/staging/rtl8723bs/core/rtw_mlme.c | 2 +- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 2 +- drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 2 +- drivers/staging/rtl8723bs/core/rtw_wlan_util.c | 2 +- drivers/staging/rtl8723bs/core/rtw_xmit.c | 6 +++--- drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) commit 37d13c28eb4c2463e3ac4fedc81d8a801b2127d0 Author: Madhumitha Prabakaran Date: Thu May 16 16:33:40 2019 -0500 Staging: bcm2835-camera: Prefer kernel types Fix the warning issued by checkpatch Prefer kernel type 'u32' over 'uint32_t'. Along with that include a blank line after a declaration to maintain Linux kernel coding style. Signed-off-by: Madhumitha Prabakaran Acked-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-camera/controls.c | 3 ++- drivers/staging/vc04_services/bcm2835-camera/mmal-msg.h | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) commit 3fb58b8572ae258b838a01ef1493dc2604fbc0c6 Author: Hariprasad Kelam Date: Sun May 19 17:35:57 2019 +0800 staging: erofs: fix Warning Use BUG_ON instead of if condition followed by BUG fix below warning reported by coccicheck drivers/staging/erofs/unzip_pagevec.h:74:2-5: WARNING: Use BUG_ON instead of if condition followed by BUG. Signed-off-by: Hariprasad Kelam [ Gao Xiang: use DBG_BUGON instead of BUG_ON for eng version only. ] Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Greg Kroah-Hartman drivers/staging/erofs/unzip_pagevec.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 85c6fadd185e495a3ef9cd8a60bb70b82b72d941 Author: Jernej Skrabec Date: Tue May 14 22:54:45 2019 +0200 arm64: dts: allwinner: a64: orangepi-win: Add wifi and bluetooth nodes The AP6212 is based on the Broadcom BCM43430 or BCM43438. The WiFi side identifies as BCM43430, while the Bluetooth side identifies as BCM43438. WiFi is connected to mmc1 and the Bluetooth side is connected to UART1 in a 4 wire configuration. Same as the WiFi side, due to being the same chip and package, DLDO2 provides overall power via VBAT, and DLDO4 provides I/O power via VDDIO. The RTC clock output provides the LPO low power clock at 32.768 kHz. This patch enables WiFi and Bluetooth on OrangePi Win boards and adds missing LPO clock on the WiFi side. PCM connection also exists for Bluetooth audio, but it's not used here. Bluetooth UART speed is set to 1.5 MBaud in order to be able transmit audio. While module supports even higher speeds, currently sunxi clock driver doesn't support higher speed. Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard .../boot/dts/allwinner/sun50i-a64-orangepi-win.dts | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 22538576beb671038bd21be4094432fa8070ad81 Author: Icenowy Zheng Date: Fri May 3 17:47:20 2019 +0800 arm64: dts: allwinner: h6: add PIO VCC bank supplies for Pine H64 The Allwinner H6 SoC features tweakable VCC for PC, PD, PG, PL and PM banks. This patch adds supplies for these banks except PL bank. PL bank is where PMIC is attached, and currently if a PMIC regulator is added for it a dependency loop will happen. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 3c2a22b8aeadf8714b6779624d98a5dacd85ca7c Author: Jagan Teki Date: Fri May 3 16:17:53 2019 +0530 arm64: dts: allwinner: a64-oceanic-5205-5inmfd: Enable GT911 CTP Goodix GT911 CTP is bound with Oceanic 5205 5inMFD board. The CTP connected to board with, - SDA, SCK from i2c0 - GPIO-LD0 as AVDD28 supply - PH4 gpio as interrupt pin - PH11 gpio as reset pin - X axis is inverted - Y axis is inverted Signed-off-by: Jagan Teki Signed-off-by: Maxime Ripard .../allwinner/sun50i-a64-oceanic-5205-5inmfd.dts | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 5aa45a24d2ac9f0c7b2e9d54edf8a6dd8cf0734e Author: Jagan Teki Date: Fri May 3 16:17:52 2019 +0530 arm64: dts: allwinner: a64-amarula-relic: Add GT5663 CTP node Add Goodix GT5663 capacitive touch controller node on Amarula A64-Relic board. The CTP connected to board with, - SDA, SCK from i2c1 - GPIO-LD0 as AVDD28 supply - PH4 gpio as interrupt pin - PH8 gpio as reset pin - X axis is inverted - Y axis is inverted Signed-off-by: Jagan Teki Signed-off-by: Maxime Ripard .../dts/allwinner/sun50i-a64-amarula-relic.dts | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 70f76289d964ad82f9261da23b04659494a2dc8f Author: Jagan Teki Date: Fri May 3 16:17:51 2019 +0530 arm64: dts: allwinner: a64: move I2C pinctrl to dtsi There is only one pinmuxing available for each I2C controller. So, move pinctrl for i2c0, i2c1 from board dts files into SoC dtsi. By moving these pinctrls the i2c1 node from Nanopi A64 just have a status, which is disabled already so remove the entire node from it. Signed-off-by: Jagan Teki Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts | 2 -- arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts | 2 -- arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts | 6 ------ arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts | 2 -- arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts | 2 -- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 4 ++++ 6 files changed, 4 insertions(+), 14 deletions(-) commit a28d1b67cf4f330fb532c8e515025b360d10691a Author: Maxime Ripard Date: Tue May 7 21:38:48 2019 +0200 dt-bindings: bus: Convert Allwinner RSB to a schema The newer Allwinner SoCs feature a bus designed for the PMIC, similar to I2C called RSB. Let's convert the device tree bindings for that bus over to a YAML schemas. Signed-off-by: Maxime Ripard .../bindings/bus/allwinner,sun8i-a23-rsb.yaml | 79 ++++++++++++++++++++++ .../devicetree/bindings/bus/sunxi-rsb.txt | 47 ------------- 2 files changed, 79 insertions(+), 47 deletions(-) commit e60f1fd252d70e0f1bc3eb449e395ee089002fb4 Author: Pablo Greco Date: Fri May 3 20:05:19 2019 -0300 ARM: dts: sun8i: r40: bananapi-m2-ultra: Remove regulator-always-on Now that the regulators are tied to the GPIO bank, we can remove the unneeded regulator-always-on in reg_aldo2 Signed-off-by: Pablo Greco Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts | 1 - 1 file changed, 1 deletion(-) commit 3e4a856af3154cf65428818123a7a9fb94a65214 Author: Pablo Greco Date: Thu May 2 10:33:49 2019 -0300 ARM: dts: sun8i: v40: bananapi-m2-berry: Add Bluetooth device node The AP6212 is based on the Broadcom BCM43430 or BCM43438. The WiFi side identifies as BCM43430, while the Bluetooth side identifies as BCM43438. The Bluetooth side is connected to UART3 in a 4 wire configuration. Same as the WiFi side, due to being the same chip and package, DLDO1 and DLDO2 regulator outputs from the PMIC provide overall power via VBAT and I/O power via VDDIO. The CLK_OUT_A clock output from the SoC provides the LPO low power clock at 32.768 kHz. This patch enables Bluetooth on this board, and also adds the missing LPO clock on the WiFi side. There is also a PCM connection for Bluetooth, but this is not covered here. The LPO clock is fed from CLK_OUT_A, which needs to be muxed on pin PI12. This can be represented in multiple ways. This patch puts the pinctrl property in the pin controller node. This is due to limitations in Linux, where pinmux settings, even the same one, can not be shared by multiple devices. Thus we cannot put it in both the WiFi and Bluetooth device nodes. Putting it the CCU node is another option, but Linux's CCU driver does not handle pinctrl. Also the pin controller is guaranteed to be initialized after the CCU, when clocks are available. And any other devices that use muxed pins are guaranteed to be initialized after the pin controller. Thus having the CLK_OUT_A pinmux reference be in the pin controller node is a good choice without having to deal with implementation issues. Signed-off-by: Pablo Greco Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts | 38 +++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit 78f8e6d97fa0bc97e6bbf88c8f1eba3a01138634 Author: Pablo Greco Date: Thu May 2 10:33:48 2019 -0300 ARM: dts: sun8i: v40: bananapi-m2-berry: Enable AHCI Just like the Bananapi M2 Ultra, enable the ahci controller and the two regulators needed to activate it. Reviewed-by: Jagan Teki Signed-off-by: Pablo Greco Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 4da567ba35a4c4f5b0c42f5c4c16bea3d4fc9f22 Author: Pablo Greco Date: Thu May 2 10:33:47 2019 -0300 ARM: dts: sun8i: v40: bananapi-m2-berry: Enable HDMI output This patch adds the hdmi nodes to the Bananapi M2 Berry, the same way it was done to the Bananapi M2 Ultra Signed-off-by: Pablo Greco Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts | 29 +++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 27e81e1970a86d1574f3ccf11bf6f7599d822db3 Author: Pablo Greco Date: Thu May 2 10:33:46 2019 -0300 ARM: dts: sun8i: v40: bananapi-m2-berry: Enable GMAC ethernet controller Just like the Bananapi M2 Ultra, the Bananapi M2 Berry has a Realtek RTL8211E RGMII PHY tied to the GMAC. The PMIC's DC1SW output provides power for the PHY, while the ALDO2 output provides I/O voltages on both sides. Signed-off-by: Pablo Greco Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 30cf87fd3376365675004dcc50a0cc0d87ba5315 Author: Pablo Greco Date: Thu May 2 10:33:45 2019 -0300 ARM: dts: sun8i: v40: bananapi-m2-berry: Add GPIO pin-bank regulator supplies The bananapi-m2-berry has the PMIC providing voltage to all the pin-bank supply rails from its various regulator outputs, tie them to the pio node. Signed-off-by: Pablo Greco Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 4422516114725edd175121751d07c0896876838e Author: Pablo Greco Date: Tue Apr 23 14:25:58 2019 -0300 ARM: dts: sun8i: r40: bananapi-m2-ultra: Add GPIO pin-bank regulator supplies The bananapi-m2-ultra has the PMIC providing voltage to all the pin-bank supply rails from its various regulator outputs, tie them to the pio node. Signed-off-by: Pablo Greco Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts | 6 ++++++ 1 file changed, 6 insertions(+) commit 296bcfa0564061e7a6626bb4c150bd153bcbd4c0 Author: Yangtao Li Date: Sun May 12 04:26:12 2019 -0400 arm64: defconfig: add allwinner sid support Sid contains speedbin information and temperature sensor calibration information and more, which are important for SOC. This patch enables CONFIG_NVMEM_SUNXI_SID by default. Signed-off-by: Yangtao Li Signed-off-by: Maxime Ripard arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 2b14b802adac2d1bc7ffc6bcfe64fbb24b05a48d Author: Leonard Crestez Date: Mon May 13 11:22:13 2019 +0000 soc: imx: Read imx8mm soc revision from anatop Like on imx6/7 we can read version information from a register in anatop, and in the same format. Signed-off-by: Leonard Crestez Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo drivers/soc/imx/soc-imx8.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit a02177a39344b643dccfa3b18fa5c1fc4984e1e5 Author: Leonard Crestez Date: Mon May 13 11:01:39 2019 +0000 dt-bindings: imx-cpufreq-dt: Document opp-supported-hw usage The interpretation of opp-supported-hw bits for imx-cpufreq-dt driver is not very obvious so attempt to explain it. There is no OF compat string associated. Reviewed-by: Rob Herring Signed-off-by: Leonard Crestez Signed-off-by: Viresh Kumar .../devicetree/bindings/cpufreq/imx-cpufreq-dt.txt | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit 4d28ba1d62c48d5242ca30fa0051ab3498bc5c5b Author: Leonard Crestez Date: Mon May 13 11:01:38 2019 +0000 cpufreq: Add imx-cpufreq-dt driver Right now in upstream imx8m cpufreq support just lists a common subset of OPPs because the higher ones should only be attempted after checking speed grading in fuses. Add a small driver which checks speed grading from nvmem cells before registering cpufreq-dt. This driver allows unlocking all frequencies for imx8mm and imx8mq and could be applied to other chips like imx7d Signed-off-by: Leonard Crestez Signed-off-by: Viresh Kumar drivers/cpufreq/Kconfig.arm | 9 ++++ drivers/cpufreq/Makefile | 1 + drivers/cpufreq/cpufreq-dt-platdev.c | 3 ++ drivers/cpufreq/imx-cpufreq-dt.c | 96 ++++++++++++++++++++++++++++++++++++ drivers/soc/imx/soc-imx8.c | 3 ++ 5 files changed, 112 insertions(+) commit c8b741e10b3b0618aebdcf758a13b963d8015250 Merge: 941add8e3e63 6d97024dce23 Author: Greg Kroah-Hartman Date: Mon May 20 09:13:53 2019 +0200 Merge tag 'iio-for-5.3a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: First set of new device support, features and cleanups for IIO in the 5.3 cycle New device support * mt6577 - add supprot for the mt6765 which requires a few minor additional new features in the driver. Yaml binding conversions * adxl345 * isl29018 * tsl2583 * tsl2772 Minor features and improvements * ad5758 - declare an of_device_id table rather than just relying on the spi fallback which doesn't use the manufacturer id. - drop a set but not used variable left from previous refactor. * ad7816 - Add a bit more description to kconfig text. * ad9523 - change calculation order to improve frequency accuracy. * adxl372 - declare an of_device_id table * adt7316 - white space. * at91_adc - Use dev_get_drvdata directly rather than boucing to the platform device and back again. * cros_ec - add an id sysfs entry to bring in line with the other implementations. * ds5522 - drop a check on the of_node existing as we don't actually use it for anything. * kxsd9 - declare an of_device_id table. * maxim_thermocouple - declare an of_device_id table. * mt6577 - add dt binding entry for mt8183 which is also supported. * rcar-gyroadc - tidy up unnecessary error messages. * stm32-dfsdm - improved error handling. * stmpe-adc - drop an unnecessary variable assignment. - add an of_device_id table. - reinit completion on begin converstion to avoid a path in which previous round had been interrupted, also switch to non interruptible wait to avoid an issue with a user program using -pg - simplify interrupt handling by just having them always enabled. - reset all interrupts on startup and in the timeout handler to avoid getting stuck. * sun4i-gpadc - SPDX * tag 'iio-for-5.3a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (28 commits) iio: adc: mediatek: mt6577-auxadc, add mt6765 support dt-bindings: iio: adc: mediatek: Add document for mt6765 dt-bindings: iio: accel: adxl345: switch to YAML bindings iio: adc: sun4i-gpadc-iio convert to SPDX license tags iio: ad9523-1: Improve reported VCO frequency accuracy iio: dac: ds4422/ds4424 drop of_node check iio: stmpe-adc: Reset possible interrupts iio: stmpe-adc: Use wait_for_completion_timeout iio: stmpe-adc: Enable all stmpe-adc interrupts just once iio: stmpe-adc: Reinit completion struct on begin conversion iio: stmpe-adc: Add compatible name iio: stmpe-adc: Remove unnecessary assignment staging: iio: adc: Add paragraph to describe Kconfig symbol staging: iio: adt7316: match parenthesis alignment iio: adc: rcar-gyroadc: Remove devm_iio_device_alloc() error printing dt-bindings: iio: isl29018: convert bindings to YAML format dt-bindings: adc: mt8183: add binding document iio: dac: ad5758: remove set but not used variable 'dc_dc_mode' iio: cros_ec: add 'id' sysfs entry iio: adc: stm32-dfsdm: missing error case during probe ... commit c0ab9e0812da8e2134dd63d030c8a8abd2112a5a Author: Viresh Kumar Date: Wed May 8 15:43:36 2019 +0530 opp: Allocate genpd_virt_devs from dev_pm_opp_attach_genpd() Currently the space for the array of virtual devices is allocated along with the OPP table, but that isn't going to work well from now onwards. For single power domain case, a driver can either use the original device structure for setting the performance state (if genpd attached with dev_pm_domain_attach()) or use the virtual device structure (if genpd attached with dev_pm_domain_attach_by_name(), which returns the virtual device) and so we can't know in advance if we are going to need genpd_virt_devs array or not. Lets delay the allocation a bit and do it along with dev_pm_opp_attach_genpd() rather. The deallocation is done from dev_pm_opp_detach_genpd(). Tested-by: Niklas Cassel Signed-off-by: Viresh Kumar drivers/opp/core.c | 10 ++++++++++ drivers/opp/of.c | 30 ++---------------------------- 2 files changed, 12 insertions(+), 28 deletions(-) commit 6319aee10e530315689db7609a7d4c444124ff22 Author: Viresh Kumar Date: Wed May 8 15:19:13 2019 +0530 opp: Attach genpds to devices from within OPP core The OPP core requires the virtual device pointers to set performance state on behalf of the device, for the multiple power domain case. The genpd API (dev_pm_domain_attach_by_name()) has evolved now to support even the single power domain case and that lets us add common code for handling both the cases more efficiently. The virtual device structure returned by dev_pm_domain_attach_by_name() isn't normally used by the cpufreq drivers as they don't manage power on/off of the domains and so is only useful for the OPP core. This patch moves all the complexity into the OPP core to make the end drivers simple. The earlier APIs dev_pm_opp_{set|put}_genpd_virt_dev() are reworked into dev_pm_opp_{attach|detach}_genpd(). The new helper dev_pm_opp_attach_genpd() accepts a NULL terminated array of strings which contains names of all the genpd's to attach. It then attaches all the domains and saves the pointers to the virtual devices. The other helper undo the work done by this helper. Tested-by: Niklas Cassel Signed-off-by: Viresh Kumar drivers/opp/core.c | 128 +++++++++++++++++++++++++++++++------------------ include/linux/pm_opp.h | 8 ++-- 2 files changed, 86 insertions(+), 50 deletions(-) commit c4580f20971539a78231591852055a375a957fab Author: Takashi Sakamoto Date: Fri May 17 11:56:22 2019 +0900 ALSA: dice: add stream format parameters for PreSonus FireStudio FireStudio was launched by PreSonus 2009. This model consists of three ICs for its packet processing on IEEE 1394 bus: - Texus Instruments TSB41AB2 for physical layer of IEEE 1394 bus - WaveFront semiconductor, Dice II STD ASIC for link layer of IEEE 1394 bus and protocol layer - Xilinx Spartan XG3S500E FPGA for signal processing This model don't support TCAT extended application protocol. For such devices, ALSA dice driver needs to have hard-coded parameters for stream formats. This commit adds hard-coded table for this model. As a result, sampling transfer frequencies of 88.2/96.0 kHz are supported. I note that this patch can be backported to Linux kernel v4.18 and later. $ python2 crpp < /sys/bus/firewire/devices/fw1/config_rom ROM header and bus information block ----------------------------------------------------------------- 400 04042eda bus_info_length 4, crc_length 4, crc 11994 404 31333934 bus_name "1394" 408 e0ff8112 irmc 1, cmc 1, isc 1, bmc 0, pmc 0, cyc_clk_acc 255, max_rec 8 (512), max_rom 1, gen 1, spd 2 (S400) 40c 000a9204 company_id 000a92 | 410 023a8b7f device_id 04023a8b7f | EUI-64 000a9204023a8b7f root directory ----------------------------------------------------------------- 414 000661b6 directory_length 6, crc 25014 418 03000a92 vendor 41c 8100000a --> descriptor leaf at 444 420 17000008 model 424 8100000d --> descriptor leaf at 458 428 0c0087c0 node capabilities per IEEE 1394 42c d1000001 --> unit directory at 430 unit directory at 430 ----------------------------------------------------------------- 430 00041c75 directory_length 4, crc 7285 434 12000a92 specifier id 438 13000001 version 43c 17000008 model 440 8100000c --> descriptor leaf at 470 descriptor leaf at 444 ----------------------------------------------------------------- 444 00047c11 leaf_length 4, crc 31761 448 00000000 textual descriptor 44c 00000000 minimal ASCII 450 50726553 "PreS" 454 6f6e7573 "onus" descriptor leaf at 458 ----------------------------------------------------------------- 458 0005d7b3 leaf_length 5, crc 55219 45c 00000000 textual descriptor 460 00000000 minimal ASCII 464 46495245 "FIRE" 468 53545544 "STUD" 46c 494f0000 "IO" descriptor leaf at 470 ----------------------------------------------------------------- 470 0005d7b3 leaf_length 5, crc 55219 474 00000000 textual descriptor 478 00000000 minimal ASCII 47c 46495245 "FIRE" 480 53545544 "STUD" 484 494f0000 "IO" Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/firewire/dice/Makefile | 2 +- sound/firewire/dice/dice-presonus.c | 62 +++++++++++++++++++++++++++++++++++++ sound/firewire/dice/dice.c | 9 ++++++ sound/firewire/dice/dice.h | 1 + 4 files changed, 73 insertions(+), 1 deletion(-) commit 941add8e3e63a46bbb245abc9f9664aaaa4bb4da Author: Puranjay Mohan Date: Thu May 16 14:41:40 2019 +0530 Staging: rtl8723bs: hal: Fix comparison to bool in if statements Fix following warnings reported by coccicheck: WARNING: Comparison to bool by using !x in place of (x == false) and x in place of (x == true). Signed-off-by: Puranjay Mohan Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/HalHWImg8723B_BB.c | 4 ++-- drivers/staging/rtl8723bs/hal/HalHWImg8723B_MAC.c | 2 +- drivers/staging/rtl8723bs/hal/HalHWImg8723B_RF.c | 2 +- drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c | 6 +++--- drivers/staging/rtl8723bs/hal/hal_com.c | 2 +- drivers/staging/rtl8723bs/hal/odm_DIG.c | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) commit 2f9dcc46c626f32a484278c0fefae4ee49b5c1d5 Author: Jeremy Sowden Date: Thu May 16 22:38:06 2019 +0100 staging: kpc2000: removed trailing white-space. Removed trailing white-space from four files. Signed-off-by: Jeremy Sowden Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/cell_probe.c | 62 +++++++++--------- drivers/staging/kpc2000/kpc2000/core.c | 98 ++++++++++++++-------------- drivers/staging/kpc2000/kpc2000/fileops.c | 2 +- drivers/staging/kpc2000/kpc2000/pcie.h | 10 +-- 4 files changed, 86 insertions(+), 86 deletions(-) commit db013a8826aa5a21e64fd328acc26e12c850b3f1 Author: Puranjay Mohan Date: Wed May 15 22:03:14 2019 +0530 Staging: kpc2000: kpc_dma: include instead of Fix following checkpatch.pl warning by including instead of . WARNING: Use #include instead of Signed-off-by: Puranjay Mohan Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc_dma/dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8f3d9001ddb6ba982e0d0b81707d5e6db32ea549 Author: Puranjay Mohan Date: Wed May 15 22:48:44 2019 +0530 Staging: rtl8188eu: os_dep: Use %s and __func__ in strings Fix following checkpatch.pl warnings by using %s and __func__ in strings instead of function names. WARNING: Prefer using '"%s...", __func__' to using 'rtw_report_sec_ie', this function's name, in a string and other similar warning. Signed-off-by: Puranjay Mohan Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/os_dep/mlme_linux.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f3dbf6ea4fed21352339356b1a97483579c46545 Author: Hariprasad Kelam Date: Wed May 15 22:38:46 2019 +0530 staging: rtl8723bs: core: rtw_recv: fix warning Unneeded variable ret fix below warning reported by coccicheck drivers/staging/rtl8723bs/core/rtw_recv.c:1903:5-8: Unneeded variable: "ret". Return "_SUCCESS" on line 1972 drivers/staging/rtl8723bs/core/rtw_recv.c:1618:6-9: Unneeded variable: "ret". Return "_SUCCESS" on line 1705 Signed-off-by: Hariprasad Kelam Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_recv.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit c3fb338afa33f91a491e412db2767da889059065 Author: Puranjay Mohan Date: Wed May 15 23:47:04 2019 +0530 Staging: rtl8192u: ieee80211: Fix coding style issues related to if else Fix positions of braces for if-else statements. Signed-off-by: Puranjay Mohan Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit 023dbe17dd38ae6b9d232e5f6144ce65befbf84d Author: Nicolas Saenz Julienne Date: Thu May 9 16:31:36 2019 +0200 staging: vchiq: stop explicitly comparing with zero to catch errors The vchiq code tends to follow a coding pattern that's not accepted as per the Linux kernel coding style We have this: if (expression != 0) We want this: if (expression) We make an exception if the expression refers to a size, in which case it's accepted for the sake of clarity. Signed-off-by: Nicolas Saenz Julienne Acked-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman .../vc04_services/bcm2835-camera/bcm2835-camera.c | 11 ++-- .../interface/vchiq_arm/vchiq_2835_arm.c | 2 +- .../vc04_services/interface/vchiq_arm/vchiq_arm.c | 66 ++++++++++------------ .../interface/vchiq_arm/vchiq_connected.c | 4 +- .../vc04_services/interface/vchiq_arm/vchiq_core.c | 28 +++++---- .../interface/vchiq_arm/vchiq_debugfs.c | 4 +- 6 files changed, 52 insertions(+), 63 deletions(-) commit 77cf3f5dcf35c8f547f075213dbc15146d44cc76 Author: Nicolas Saenz Julienne Date: Thu May 9 16:31:35 2019 +0200 staging: vchiq: make wait events interruptible The killable version of wait_event() is meant to be used on situations where it should not fail at all costs, but still have the convenience of being able to kill it if really necessary. Wait events in VCHIQ doesn't fit this criteria, as it's mainly used as an interface to V4L2 and ALSA devices. Fixes: 852b2876a8a8 ("staging: vchiq: rework remove_event handling") Signed-off-by: Nicolas Saenz Julienne Acked-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 086efbabdc04563268372aaef4d66039d85ee76c Author: Nicolas Saenz Julienne Date: Thu May 9 16:31:34 2019 +0200 staging: vchiq: revert "switch to wait_for_completion_killable" The killable version of wait_for_completion() is meant to be used on situations where it should not fail at all costs, but still have the convenience of being able to kill it if really necessary. VCHIQ doesn't fit this criteria, as it's mainly used as an interface to V4L2 and ALSA devices. Fixes: a772f116702e ("staging: vchiq: switch to wait_for_completion_killable") Signed-off-by: Nicolas Saenz Julienne Acked-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman .../vc04_services/interface/vchiq_arm/vchiq_arm.c | 21 +++++++++++---------- .../vc04_services/interface/vchiq_arm/vchiq_core.c | 21 +++++++++++---------- .../vc04_services/interface/vchiq_arm/vchiq_util.c | 6 +++--- 3 files changed, 25 insertions(+), 23 deletions(-) commit 061ca1401f96c254e7f179bf97a1fc5c7f47e1e1 Author: Nicolas Saenz Julienne Date: Thu May 9 16:31:33 2019 +0200 staging: vchiq_2835_arm: revert "quit using custom down_interruptible()" The killable version of down() is meant to be used on situations where it should not fail at all costs, but still have the convenience of being able to kill it if really necessary. VCHIQ doesn't fit this criteria, as it's mainly used as an interface to V4L2 and ALSA devices. Fixes: ff5979ad8636 ("staging: vchiq_2835_arm: quit using custom down_interruptible()") Signed-off-by: Nicolas Saenz Julienne Acked-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5ba1a1dae3208e955307e98358b52c374868b353 Author: Puranjay Mohan Date: Tue May 14 23:00:23 2019 +0530 Staging: rtl8192u: ieee80211: Use !x in place of NULL comparison Fix comparison to NULL, chang to !x operation. Issue found using checkpatch.pl Signed-off-by: Puranjay Mohan Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c61ec9e618bf067638c5c5a1941fd72f851a842a Author: Puranjay Mohan Date: Tue May 14 23:00:22 2019 +0530 Staging: rtl8192u: ieee80211: Add spaces around '&&' operator Fix coding style errors by adding spaces around '&&' operators. Signed-off-by: Puranjay Mohan Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit d542d407cdf26ac8694f4d4b4681f4fcaf541663 Author: Puranjay Mohan Date: Tue May 14 23:00:21 2019 +0530 Staging: rtl8192u: ieee80211: Fix coding style errors Fix coding style errors related to braces for if-else statements. Signed-off-by: Puranjay Mohan Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c | 58 ++++++++--------------- 1 file changed, 20 insertions(+), 38 deletions(-) commit d310c5a1cc833e1e17072bb08d91117b07d88da7 Author: Puranjay Mohan Date: Tue May 14 23:00:20 2019 +0530 Staging: rtl8192u: ieee80211: Fix spelling mistake Correct spelling mistakes at two places in comments. Signed-off-by: Puranjay Mohan Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8b0c4a7ca1ed8a718beb741c1c30aabe4df68c35 Author: Puranjay Mohan Date: Tue May 14 23:00:19 2019 +0530 Staging: rtl8192u: ieee80211: Fix coding style warning Remove braces around a single if statement to fix following checkpatch.pl warning. WARNING: braces {} are not necessary for single statement blocks Signed-off-by: Puranjay Mohan Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit dad3f77ff4808ff78e47c78d6805c4f2f2204f93 Author: Puranjay Mohan Date: Wed May 15 03:14:07 2019 +0530 Staging: rtl8192e: Use %s and __func__ in strings Fix following checkpatch.pl warnings by using %s and __func__ in strings instead of function names. WARNING: Prefer using '"%s...", __func__' to using '_rtl92e_dm_check_rate_adaptive', this function's name, in a string WARNING: Prefer using '"%s...", __func__' to using 'rtl92e_dm_restore_state', this function's name, in a string Signed-off-by: Puranjay Mohan Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5249495da04956f251acda59f840696d85994f55 Author: Masahiro Yamada Date: Wed May 15 13:31:22 2019 +0900 staging: erofs: drop unneeded -Wall addition The top level Makefile adds -Wall globally: KBUILD_CFLAGS := -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs \ I see two "-Wall" added for compiling objects in drivers/staging/erofs/. Signed-off-by: Masahiro Yamada Reviewed-by: Chao Yu Reviewed-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman drivers/staging/erofs/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 70eb40836ca4a465adc7f986454fe69a2474e14e Author: Jeremy Sowden Date: Wed May 15 12:14:37 2019 +0100 staging: kpc2000: clean up after probe failure. On error, kp2000_probe_cores just returned an error without freeing resources which had previously been allocated. Added the missing clean-up code. Updated TODO. Signed-off-by: Jeremy Sowden Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/TODO | 1 - drivers/staging/kpc2000/kpc2000/cell_probe.c | 9 +++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) commit abb611d2c21c0a4fa8eab35dc936c80d9a07acd8 Author: Jeremy Sowden Date: Wed May 15 12:14:36 2019 +0100 staging: kpc2000: added missing clean-up to probe_core_uio. On error, probe_core_uio just returned an error without freeing resources which had previously been allocated. Added the missing clean-up code. Updated TODO. Signed-off-by: Jeremy Sowden Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/TODO | 1 - drivers/staging/kpc2000/kpc2000/cell_probe.c | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) commit 3809ca58c16a38eab93ac6c2eca4cb254bf6ca37 Author: Jeremy Sowden Date: Wed May 15 12:14:35 2019 +0100 staging: kpc2000: added designated initializers to two structs. Fixed the following two sparse warnings by using designated initializers: drivers/staging/kpc2000/kpc2000/cell_probe.c:101:34: warning: Using plain integer as NULL pointer drivers/staging/kpc2000/kpc2000/cell_probe.c:364:34: warning: Using plain integer as NULL pointer Signed-off-by: Jeremy Sowden Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/cell_probe.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit dbaca02b625a8eabe2330d091d6e23f82c983cf9 Author: Jeremy Sowden Date: Wed May 15 12:14:34 2019 +0100 staging: kpc2000: declare two functions as static. Two functions were not used outside the translation-unit in which they were defined. Declared them static. Fixes two sparse warnings: drivers/staging/kpc2000/kpc2000/cell_probe.c:98:5: warning: symbol 'probe_core_basic' was not declared. Should it be static? drivers/staging/kpc2000/kpc2000/cell_probe.c:288:5: warning: symbol 'probe_core_uio' was not declared. Should it be static? Signed-off-by: Jeremy Sowden Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/cell_probe.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit d2a6eaee1d72262b08265a3d83f5048fe253401d Author: Jeremy Sowden Date: Wed May 15 12:14:33 2019 +0100 staging: kpc2000: inverted conditional in order to reduce indentation. Changed: for (...) { ... if (expr) { ... } } into: for (...) { ... if (!expr) continue; ... } in order to reduce indentation of conditional block. Fixed indentation of cases blocks at the same time. Signed-off-by: Jeremy Sowden Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/cell_probe.c | 43 ++++++++++++++++------------ 1 file changed, 24 insertions(+), 19 deletions(-) commit d34141ebd7e74cc4e68fe58b2d30eb5dcf1e7aeb Author: Vandana BN Date: Mon May 13 19:13:27 2019 +0530 Staging: kpc2000: kpc_dma: Resolve cast warning and use const for file_operation This Patch resolves unnecessary cast warning and const file_operations reported by checkpath.pl WARNING: unnecessary cast may hide bugs WARNING: struct file_operations should normally be const Signed-off-by: Vandana BN Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc_dma/fileops.c | 2 +- drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 1c13ef4fa1817d2eb5d19f53ac02a4d7e44cefe0 Author: Vandana BN Date: Mon May 13 19:13:26 2019 +0530 Staging: kpc2000: kpc_dma: Resolve warning to use __func__ insted of funtion name reported by checkpatch. This patch resolves warnings to use __func__ insted of funtion name. WARNING: Prefer using '"%s...", __func__' to using 'setup_dma_engine', this function's name, in a string Signed-off-by: Vandana BN Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc_dma/dma.c | 6 +++--- drivers/staging/kpc2000/kpc_dma/fileops.c | 26 ++++++++++++------------ drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c | 18 ++++++++-------- 3 files changed, 25 insertions(+), 25 deletions(-) commit 63c867d794e89edc22440e8d9581063eeb766bda Author: Vandana BN Date: Mon May 13 19:13:25 2019 +0530 Staging: kpc2000: kpc_dma: Resolve warning Missing blank line after declarations & labels not to be indented. This patch resloves below warnings reported by checkpath in kpc_dma WARNING: Missing a blank line after declarations WARNING: labels should not be indented CHECK: Please don't use multiple blank lines CHECK: Please use a blank line after function/struct/union/enum declarations Signed-off-by: Vandana BN Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc_dma/dma.c | 8 +++++--- drivers/staging/kpc2000/kpc_dma/fileops.c | 11 ++++++++++- drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c | 15 ++++++++------- drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.h | 8 ++++++-- 4 files changed, 29 insertions(+), 13 deletions(-) commit 3544d3f785c12754f156a15020579d2875e98240 Author: Vandana BN Date: Mon May 13 19:13:24 2019 +0530 Staging: kpc2000: kpc_dma: Resolve checkpath errors Macros in paranthesis & trailing statements on next line. This patch fixes below errors reported by checkpath ERROR: Macros with complex values should be enclosed in parentheses CHECK: Prefer using the BIT macro ERROR: trailing statements should be on next line ERROR: trailing statements should be on next line Signed-off-by: Vandana BN Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit f42485c50d7ab4f0d0760ca9802ffba492aa26b7 Author: Vandana BN Date: Mon May 13 19:13:23 2019 +0530 Staging: kpc2000: kpc_dma: Resolve code indent and trailing statements on next line errors reported by checkpatch. This patch fixes code indentaion error reported by checkpath ERROR: switch and case should be at the same indent ERROR: trailing statements should be on next line Signed-off-by: Vandana BN Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc_dma/fileops.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit f3092723b7edd078bdb151c73279b79ce6e44017 Author: Vandana BN Date: Mon May 13 19:13:22 2019 +0530 Staging: kpc2000: kpc_dma: Resolve checkpatch space errors around brace '{', '!' and open paranthesis '('. This patch resolves below errors reported by checkpath ERROR: space required before the open brace '{' ERROR: space prohibited after that '!' (ctx:BxW) ERROR: space prohibited after that open parenthesis '(' Signed-off-by: Vandana BN Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc_dma/dma.c | 28 ++++++------ drivers/staging/kpc2000/kpc_dma/fileops.c | 56 ++++++++++++------------ drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c | 20 ++++----- 3 files changed, 52 insertions(+), 52 deletions(-) commit 20fe99222dd33e8f92e9e33c9fa231145145ce33 Author: Vandana BN Date: Mon May 13 19:13:21 2019 +0530 Staging: kpc2000: kpc_dma: Resolve space errors around pointers and function declarations reported by checkpatch. This patch resolves below errors reported by checkpatch ERROR: "(foo*)" should be "(foo *)" ERROR: "foo * bar" should be "foo *bar" ERROR: "foo __init bar" should be "foo __init bar" ERROR: "foo __exit bar" should be "foo __exit bar" Signed-off-by: Vandana BN Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc_dma/dma.c | 8 ++++---- drivers/staging/kpc2000/kpc_dma/fileops.c | 2 +- drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c | 12 ++++++------ drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.h | 6 +++--- 4 files changed, 14 insertions(+), 14 deletions(-) commit 0f7aa9d2447bbfef3637e74ff0ea6a1cf92b8f3e Author: Vandana BN Date: Mon May 13 19:13:20 2019 +0530 Staging: kpc2000: kpc_dma: Resolve trailing whitespace error reported by checkpatch Resolve trailing whitespace error from checkpatch.pl ERROR: trailing whitespace Signed-off-by: Vandana BN Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc_dma/dma.c | 86 ++++++++--------- drivers/staging/kpc2000/kpc_dma/fileops.c | 114 +++++++++++------------ drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c | 46 ++++----- drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.h | 16 ++-- 4 files changed, 131 insertions(+), 131 deletions(-) commit a8f7e0c9b9ae8a7fdc7be33cda6003659c14028f Author: Hariprasad Kelam Date: Mon May 13 16:45:18 2019 +0530 staging: rtl8723bs: os_dep: Remove Unneeded variable ret fix below issue reported by coccicheck drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:2685:5-8: Unneeded variable: "ret". Return "0" on line 3266 Signed-off-by: Hariprasad Kelam ---- Changes in v2: - make subject line more clean Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 83ee6ec7740b75dc0db042bbf76581ba4e4e2a2a Author: Puranjay Mohan Date: Tue May 14 01:27:06 2019 +0530 Staging: rtl8723bs: os_dep: Fix if-else coding style issues Fix placement of opening brace in if-else statement to correct coding style issue. Signed-off-by: Puranjay Mohan Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit 690510aad15f2f8b205186eac9c705566478dff6 Author: YueHaibing Date: Sun May 12 14:46:15 2019 +0800 staging: kpc2000: remove unused function kp2000_cdev_write There is no callers in tree, so can be removed. Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc2000/fileops.c | 8 -------- 1 file changed, 8 deletions(-) commit 80ff4ad4c62f7b7694327712f1aaf5a38eae4a61 Author: Colin Ian King Date: Sat May 11 14:48:13 2019 +0100 staging: vc04_services: bcm2835-camera: remove redundant assignment to variable ret The variable ret is being initialized however this is never read and later it is being reassigned to a new value. The initialization is redundant and hence can be removed. Addresses-Coverity: ("Unused Value") Signed-off-by: Colin Ian King Acked-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-camera/controls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a301ecbc7ed0e27dde933e4c323204139cdc1694 Author: Madhumitha Prabakaran Date: Sun May 5 13:32:30 2019 -0500 Staging: kpc2000: Cleanup in kpc_dma_transfer() Remove unnecessary typecast in kzalloc function. In addition to that replace kzalloc(sizeof(*acd)) over kzalloc(sizeof(struct aio_cb_data)) to maintain Linux kernel style. Issue suggested by Coccinelle. Signed-off-by: Madhumitha Prabakaran Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc_dma/fileops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5badafb1f0c94d0de48870a094631d0d07f93bb0 Author: Michael Straube Date: Sun May 5 12:56:42 2019 +0200 staging: rtl8712: get rid of IS_MCAST Use is_multicast_ether_addr instead of custom IS_MCAST and remove the now unused IS_MCAST. All buffers are properly aligned. Signed-off-by: Michael Straube Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl8712_xmit.c | 2 +- drivers/staging/rtl8712/rtl871x_recv.c | 14 +++++++------- drivers/staging/rtl8712/rtl871x_security.c | 4 ++-- drivers/staging/rtl8712/rtl871x_xmit.c | 12 ++++++------ drivers/staging/rtl8712/wifi.h | 11 ----------- 5 files changed, 16 insertions(+), 27 deletions(-) commit 91fc28e8e6e9e7b2c2e26fdd15889cc68dcc04b7 Author: Matt Sickler Date: Thu May 9 13:38:27 2019 +0000 staging: kpc_i2c: Remove unused file The whole file was wrapped in an #if 0. I'm guessing it was a leftover file from when we were first developing the driver and we just forgot about it. Signed-off-by: Matt Sickler Signed-off-by: Greg Kroah-Hartman drivers/staging/kpc2000/kpc_i2c/Makefile | 2 +- drivers/staging/kpc2000/kpc_i2c/fileops.c | 181 ------------------------------ 2 files changed, 1 insertion(+), 182 deletions(-) commit bd9c9e2c6d56c04e77cf10a5da7ed8ddc0a2d9c6 Author: Puranjay Mohan Date: Tue May 7 21:51:26 2019 +0530 Staging: rtl8723bs: os_dep: Remove braces from single if statement Remove braces from single if statement to solve style issue found using checkpatch,pl Signed-off-by: Puranjay Mohan Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 5706396f47685abb42e0b993572a9c3b8c82c247 Author: Vatsala Narang Date: Sun May 5 18:52:12 2019 +0530 staging: rtl8723bs: core: Fix variable constant comparisons. Swap the terms of comparisons whenever the constant comes first to get rid of checkpatch warning. Signed-off-by: Vatsala Narang Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a65f0d18ea580e9daeb28969124345c3df52972a Author: Vatsala Narang Date: Sun May 5 18:51:31 2019 +0530 staging: rtl8723bs: core: Remove braces from single if statement. Remove braces from single if statement to get rid of checkpatch warning. Signed-off-by: Vatsala Narang Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit c872ed070a8c748260016e347a97cf07c9bc2d42 Author: Vatsala Narang Date: Sun May 5 18:50:53 2019 +0530 staging: rtl8723bs: core: Remove unnecessary parentheses. Remove unnecessary parentheses after 'address-of' operator to get rid of checkpatch warning. Signed-off-by: Vatsala Narang Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 41452327fc099488d5783271e14b587997011cb2 Author: Vatsala Narang Date: Sun May 5 18:50:13 2019 +0530 staging: rtl8723bs: core: Replace NULL comparisons. Replace NULL comparisons in the file to get rid of checkpatch warning. Signed-off-by: Vatsala Narang Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 32 +++++++++++++-------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 6810625092e767ca8d1289893bbd521a117a8886 Author: Vatsala Narang Date: Sun May 5 18:49:25 2019 +0530 staging: rtl8723bs: core: Remove blank line. To avoid style issues, remove multiple blank lines. Signed-off-by: Vatsala Narang Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 5 ----- 1 file changed, 5 deletions(-) commit 5f98c7f9f53551e894da6e8e155dc03ef8c67d71 Author: Puranjay Mohan Date: Sat May 4 13:53:34 2019 +0530 Staging: rtl8723bs: core: Fix Spelling mistake in comments Change spelling of 'associcated' to 'associated', to fix the spelling mistake. Signed-off-by: Puranjay Mohan Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_ap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2dd67029c62366235454d207477c2a5c63e1d728 Author: Puranjay Mohan Date: Sat May 4 00:39:32 2019 +0530 Staging: rtl8723bs: os_dep: Fix switch-case indentation error Fix indentation for switch-case statements to fix following checkpatch.pl Error: ERROR: switch and case should be at the same indent Signed-off-by: Puranjay Mohan Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 442 ++++++++++++------------- 1 file changed, 221 insertions(+), 221 deletions(-) commit f0f74b45d64dff40e5dff87e160be20cd96dc1d8 Author: Hariprasad Kelam Date: Sun May 12 16:23:45 2019 +0530 drivers: staging : wlan-ng : collect return status without variable As caller rdev_set_default_key not particular about -EFAULT. We can preserve the return value of prism2_domibset_uint32. Signed-off-by: Hariprasad Kelam Reviewed-by: Dan Carpenter ---- Changes in v2: - remove masking of original return value with EFAULT Changes in v3: - merge patch v1 and v2 sothat it can be applied on linux-next Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/cfg80211.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) commit dcec6ced9f036062f49bfbf542f6792427827d66 Author: Anson Huang Date: Sun May 12 10:17:13 2019 +0000 clk: imx8mm: add GPIO clocks to clock tree i.MX8MM has clock gate for each GPIO bank, add them into clock tree for GPIO driver to manage. Signed-off-by: Anson Huang Reviewed-by: Dong Aisheng Signed-off-by: Shawn Guo drivers/clk/imx/clk-imx8mm.c | 5 +++++ 1 file changed, 5 insertions(+) commit 2c61a5459932f68af51306302ab128a623f37e96 Author: Anson Huang Date: Sun May 12 10:17:08 2019 +0000 dt-bindings: clock: imx8mm: Add GPIO clocks Add macro for the GPIO clocks of the i.MX8MM. Signed-off-by: Anson Huang Reviewed-by: Dong Aisheng Signed-off-by: Shawn Guo include/dt-bindings/clock/imx8mm-clock.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 37a4bdead1097b24e2e80c1441e07e0e309fd075 Author: Anson Huang Date: Sun May 12 09:57:35 2019 +0000 ARM: dts: imx6sx-sdb: Assign corresponding power supply for LDOs On i.MX6SX SDB board, vgen6 supplies vdd1p1/vdd2p5 LDO and sw2 supplies vdd3p0 LDO, this patch assigns corresponding power supply for vdd1p1/vdd2p5/vdd3p0 to avoid confusion by below log: vdd1p1: supplied by regulator-dummy vdd3p0: supplied by regulator-dummy vdd2p5: supplied by regulator-dummy With this patch, the power supply is more accurate: vdd1p1: supplied by VGEN6 vdd3p0: supplied by SW2 vdd2p5: supplied by VGEN6 Signed-off-by: Anson Huang Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6sx-sdb-reva.dts | 12 ++++++++++++ arch/arm/boot/dts/imx6sx-sdb.dts | 12 ++++++++++++ arch/arm/boot/dts/imx6sx.dtsi | 6 +++--- 3 files changed, 27 insertions(+), 3 deletions(-) commit 96a9169cf621b48d72b154162dcf408e947f5054 Author: Anson Huang Date: Sun May 12 09:57:31 2019 +0000 ARM: dts: imx6sll-evk: Assign corresponding power supply for vdd3p0 On i.MX6SLL EVK board, sw2 supplies vdd3p0 LDO, this patch assigns corresponding power supply for vdd3p0 to avoid confusion by below log: vdd3p0: supplied by regulator-dummy With this patch, the power supply is more accurate: vdd3p0: supplied by SW2 Signed-off-by: Anson Huang Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6sll-evk.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 3feea8805d6f80607328de03f5e2c50673d1b3a3 Author: Anson Huang Date: Sun May 12 09:57:27 2019 +0000 ARM: dts: imx6sl-evk: Assign corresponding power supply for LDOs On i.MX6SL EVK board, sw2 supplies vdd1p1/vdd2p5/vdd3p0 LDO, this patch assigns corresponding power supply for vdd1p1/vdd2p5/vdd3p0 to avoid confusion by below log: vdd1p1: supplied by regulator-dummy vdd3p0: supplied by regulator-dummy vdd2p5: supplied by regulator-dummy With this patch, the power supply is more accurate: vdd1p1: supplied by SW2 vdd3p0: supplied by SW2 vdd2p5: supplied by SW2 Signed-off-by: Anson Huang Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6sl-evk.dts | 12 ++++++++++++ arch/arm/boot/dts/imx6sl.dtsi | 6 +++--- 2 files changed, 15 insertions(+), 3 deletions(-) commit 43967d9b5a7c93da2e34c57e0d79d0f860231acc Author: Anson Huang Date: Sun May 12 09:57:24 2019 +0000 ARM: dts: imx7d-sdb: Assign corresponding power supply for LDOs On i.MX7D SDB board, sw2 supplies 1p0d/1p2 LDO, this patch assigns corresponding power supply for 1p0d/1p2 LDO to avoid confusion by below log: vdd1p0d: supplied by regulator-dummy vdd1p2: supplied by regulator-dummy With this patch, the power supply is more accurate: vdd1p0d: supplied by SW2 vdd1p2: supplied by SW2 Signed-off-by: Anson Huang Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7d-sdb.dts | 8 ++++++++ 1 file changed, 8 insertions(+) commit 93385546ba369182220436f60ceb3beabe4b7de1 Author: Anson Huang Date: Sun May 12 09:57:20 2019 +0000 ARM: dts: imx6qdl-sabresd: Assign corresponding power supply for LDOs On i.MX6Q/DL SabreSD board, vgen5 supplies vdd1p1/vdd2p5 LDO and sw2 supplies vdd3p0 LDO, this patch assigns corresponding power supply for vdd1p1/vdd2p5/vdd3p0 to avoid confusion by below log: vdd1p1: supplied by regulator-dummy vdd3p0: supplied by regulator-dummy vdd2p5: supplied by regulator-dummy With this patch, the power supply is more accurate: vdd1p1: supplied by VGEN5 vdd3p0: supplied by SW2 vdd2p5: supplied by VGEN5 Signed-off-by: Anson Huang Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-sabresd.dtsi | 12 ++++++++++++ arch/arm/boot/dts/imx6qdl.dtsi | 6 +++--- 2 files changed, 15 insertions(+), 3 deletions(-) commit 43f1322b87b39ea2b613535909c4f33751d4e9cd Author: Anson Huang Date: Sun May 12 08:57:16 2019 +0000 ARM: dts: imx6ul: add clock-frequency to CPU node Add clock-frequency property to CPU node. Avoids warnings like "/cpus/cpu@0 missing clock-frequency property" for "arm,cortex-a7". Signed-off-by: Anson Huang Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6ul.dtsi | 1 + arch/arm/boot/dts/imx6ull.dtsi | 1 + 2 files changed, 2 insertions(+) commit 811b99bc661ad0a7c5bcee570d6b10d5198d59d9 Author: Anson Huang Date: Sun May 12 08:51:26 2019 +0000 ARM: dts: imx7ulp-evk: Add backlight support This patch adds i.MX7ULP EVK board MIPI-DSI backlight support. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7ulp-evk.dts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 15641ca81d2514a92a66641ad6546d84665ab2bd Author: Anson Huang Date: Sun May 12 08:51:21 2019 +0000 ARM: dts: imx7ulp: Add tpm pwm support Add i.MX7ULP EVK board PWM support. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7ulp.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 78cc25fa265d671241c26640cc17bdc61ddfdc29 Author: Leonard Crestez Date: Fri May 10 15:18:22 2019 +0300 arm64: dts: imx8mm-evk: Add BD71847 PMIC The BUCK2 regulator is used for cpufreq voltage control, otherwise configuration is mostly static. This uses the newly-implemented rohm,reset-snvs-powered property to properly handle the SNVS state of imx8mm. Between BD71837 and BD71847 the BUCK3/4 regulators were removed but datasheet and board schematics kept the names for BUCK5/6/7/8. The driver however renumbered 5/6/7/8 to 3/4/5/6. Use the names from DT bindings and add comments to signal this. Signed-off-by: Leonard Crestez Acked-By: Matti Vaittinen Reviewed-by: Rob Herring Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mm-evk.dts | 131 +++++++++++++++++++++++++++ 1 file changed, 131 insertions(+) commit 5d7c5882b94a6115db7bb005e0172c0d1ccecf85 Author: Leo Yan Date: Wed May 8 10:18:53 2019 +0800 ARM: dts: imx7s: Update coresight DT bindings CoreSight DT bindings have been updated, thus the old compatible strings are obsolete and the drivers will report warning if DTS uses these obsolete strings. This patch switches to the new bindings for CoreSight dynamic funnel and static replicator, so can dismiss warning during initialisation. Cc: Shawn Guo Cc: Chris Healy Cc: Andrew Lunn Cc: Fabio Estevam Cc: Mathieu Poirier Cc: Suzuki K Poulose Signed-off-by: Leo Yan Acked-by: Suzuki K Poulose Reviewed-by: Mathieu Poirier Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7s.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4af3cfe4e1c68ba8d699cbc86d79a94a035870e8 Author: Guido Günther Date: Tue Apr 30 19:15:55 2019 +0200 arm64: dts: imx8mq: Add a node for irqsteer Add a node for the irqsteer interrupt controller found on the iMX8MQ SoC. Signed-off-by: Guido Günther Reviewed-by: Lucas Stach Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/imx8mq.dtsi | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 7f538f199f71b0ee7bfc4e188b502ac95a57cc3f Author: Wen He Date: Fri May 10 10:49:28 2019 +0800 arm64: dts: ls1028a: Add properties for Mali DP500 node The LS1028A has a LCD controller and Displayport interface that connects to eDP and Displayport connectors on the LS1028A board. This patch enables the LCD controller driver on the LS1028A. Signed-off-by: Alison Wang Signed-off-by: Wen He Reviewed-by: Liviu Dudau Reviewed-by: Rob Herring Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi | 38 ++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit 7870756fe4564bca438e8dfb06fb78075ffc82b1 Author: Marek Vasut Date: Thu May 16 00:46:01 2019 +0200 ARM: dts: imx53: Update pinmux settings on M53Menlo Update pinmux settings according to hardware team input. Signed-off-by: Marek Vasut Cc: Shawn Guo Cc: Fabio Estevam Cc: NXP Linux Team To: linux-arm-kernel@lists.infradead.org Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx53-m53menlo.dts | 87 ++++++++++++++++++++---------------- 1 file changed, 49 insertions(+), 38 deletions(-) commit 34c486a2ce668df0829ddf98b5cf7b1913daefab Author: Marek Vasut Date: Thu May 16 00:46:00 2019 +0200 ARM: dts: imx53: Add GPIO line names on M53Menlo Add meaningful GPIO line names for the board GPIOs. Signed-off-by: Marek Vasut Cc: Shawn Guo Cc: Fabio Estevam Cc: NXP Linux Team To: linux-arm-kernel@lists.infradead.org Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx53-m53menlo.dts | 72 ++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) commit 6c5741c22a9f452e6768a2a42c29562f7410e8cd Author: Marek Vasut Date: Thu May 16 00:45:59 2019 +0200 ARM: dts: imx53: Add GPIO beeper on M53Menlo Add GPIO beeper, to let the board produce beeps. Signed-off-by: Marek Vasut Cc: Shawn Guo Cc: Fabio Estevam Cc: NXP Linux Team To: linux-arm-kernel@lists.infradead.org Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx53-m53menlo.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 50d29fdb765d3cf3069caf149f1f372da9c4bc47 Author: Marek Vasut Date: Thu May 16 00:45:58 2019 +0200 ARM: dts: imx53: Add power GPIOs on M53Menlo Add GPIO power button and GPIO poweroff, which is present on new hardware. These let the system power itself off on shutdown. Signed-off-by: Marek Vasut Cc: Shawn Guo Cc: Fabio Estevam Cc: NXP Linux Team To: linux-arm-kernel@lists.infradead.org Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx53-m53menlo.dts | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit 64b99002c561054f95ef6917f9d329667eb112e7 Author: Marek Vasut Date: Thu May 16 00:45:57 2019 +0200 ARM: dts: imx53: Select netdev trigger for Yellow LED on M53Menlo The yellow LED is in the ethernet jack socket, bind it to netdev trigger to indicate ethernet activity. Signed-off-by: Marek Vasut Cc: Shawn Guo Cc: Fabio Estevam Cc: NXP Linux Team To: linux-arm-kernel@lists.infradead.org Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx53-m53menlo.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a80c4981717b12f06de05e3b737a1d818e88ee84 Author: Marek Vasut Date: Thu May 16 00:45:56 2019 +0200 ARM: dts: imx53: Add ethernet PHY reset on M53Menlo Add ethernet PHY GPIO reset line, to let the kernel to reset the PHY. Signed-off-by: Marek Vasut Cc: Shawn Guo Cc: Fabio Estevam Cc: NXP Linux Team To: linux-arm-kernel@lists.infradead.org Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx53-m53menlo.dts | 1 + 1 file changed, 1 insertion(+) commit 3c3601cd6a6d344f84f444ba6e0e52383410598f Author: Marek Vasut Date: Thu May 16 00:45:55 2019 +0200 ARM: dts: imx53: Update USB configuration on M53Menlo Turn USBH1 into Host and update the GPIO polarity of the regulator to match new hardware. Signed-off-by: Marek Vasut Cc: Shawn Guo Cc: Fabio Estevam Cc: NXP Linux Team To: linux-arm-kernel@lists.infradead.org Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx53-m53menlo.dts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 3905e2fea9498b82150e7d802fc61ede07d74ad7 Author: Marek Vasut Date: Thu May 16 00:45:54 2019 +0200 ARM: dts: imx53: Update UART configuration on M53Menlo Enable flow control lines on UART1 and UART2, add matching pinmux entries. Add and enable UART3 with RS485 mode enabled on boot. Signed-off-by: Marek Vasut Cc: Shawn Guo Cc: Fabio Estevam Cc: NXP Linux Team To: linux-arm-kernel@lists.infradead.org Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx53-m53menlo.dts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit ee3b39eb38442061ed65fde0e4e074866545a453 Author: Anson Huang Date: Sun May 12 10:02:13 2019 +0000 ARM: dts: imx6qdl: Assign corresponding clocks instead of dummy clock i.MX6Q/DL's WDOGs use IMX6QDL_CLK_IPG as clock root, assign IMX6QDL_CLK_IPG to them instead of IMX6QDL_CLK_DUMMY. Signed-off-by: Anson Huang Reviewed-by: Dong Aisheng Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ada3d86b6ad932f26c8ef366f5bde7fbd731c865 Author: Anson Huang Date: Sun May 12 10:02:10 2019 +0000 ARM: dts: imx6sl: Assign corresponding clocks instead of dummy clock i.MX6SL's KPP and WDOG use IMX6SL_CLK_IPG as clock root, assign IMX6SL_CLK_IPG to them instead of IMX6SL_CLK_DUMMY. Signed-off-by: Anson Huang Reviewed-by: Dong Aisheng Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6sl.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5c5d0ca7c2702079e62549fa96fbf79231740497 Author: Leonard Crestez Date: Fri Apr 12 14:10:04 2019 +0000 arm64: defconfig: Enable ROHM_BD718XX PMIC for imx8mm-evk Enable mfd and regulator driver for PMIC found on imx8mm-evk boards Signed-off-by: Leonard Crestez Signed-off-by: Shawn Guo arch/arm64/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+) commit 22e9852fd2aae34e2a8d9e82d178493556e244b9 Author: Leonard Crestez Date: Sun Apr 21 15:36:25 2019 +0800 arm64: defconfig: Enable lpi2c for imx8qxp and sensors The current lpi2c driver can work on imx8 chips so lets enable it. Also enable few i2c peripherals found on imx8qxp-mek I2C (some were already used for other boards). Sensors enabled as modules because not required for boot. Signed-off-by: Leonard Crestez Signed-off-by: Shawn Guo arch/arm64/configs/defconfig | 4 ++++ 1 file changed, 4 insertions(+) commit e3ab254a437a15fed56220bfd772c254ef74503b Author: Leonard Crestez Date: Thu Apr 11 16:46:13 2019 +0800 arm64: defconfig: Enable imx8mm clk/pinctrl Basic imx8mm support is already available in linux-next just not enabled in arm64 defconfig. With this patch imx8mm-evk can boot. Signed-off-by: Leonard Crestez Reviewed-by: Dong Aisheng Signed-off-by: Shawn Guo arch/arm64/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+) commit 462864e208d98063aec3ad58350805a30f85a161 Author: Abel Vesa Date: Mon Apr 8 18:53:03 2019 +0000 arm64: defconfig: Enable RTC_DRV_SNVS i.MX8MQ needs it for RTC support. Signed-off-by: Abel Vesa Reviewed-by: Dong Aisheng Signed-off-by: Shawn Guo arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 81ab47e04bcabbfe2c52acb91c0bcbf3396fde78 Author: Anson Huang Date: Thu Mar 21 02:26:57 2019 +0000 arm64: defconfig: add support for i.MX system controller watchdog Enable CONFIG_IMX_SC_WDT as module to support i.MX system controller watchdog. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit a0e05ed8221ca7441670aebf11a4a5bff67c86d2 Author: Uwe Kleine-König Date: Wed Mar 20 10:12:54 2019 +0100 ARM: imx_v6_v7_defconfig: Enable SIOX bus Now that there is a board making use of this bus is available enable the siox code to increase compile coverage. Signed-off-by: Uwe Kleine-König Signed-off-by: Shawn Guo arch/arm/configs/imx_v6_v7_defconfig | 3 +++ 1 file changed, 3 insertions(+) commit 13edfd4f6d53da6430817f196923c9c2d1f8d805 Author: Adam Ford Date: Sun Mar 3 20:32:30 2019 -0600 ARM: imx_v6_v7_defconfig: Add GPIO_PCF857X The imx6q-logicpd board has a PCF8575 connected to it, so this patch turns it on my default now. Signed-off-by: Adam Ford Signed-off-by: Shawn Guo arch/arm/configs/imx_v6_v7_defconfig | 1 + 1 file changed, 1 insertion(+) commit 82f4799f8dd9647617201b4357fb945337d7c132 Author: Fabio Estevam Date: Wed Feb 20 09:35:43 2019 -0300 arm64: defconfig: Enable CONFIG_SPI_IMX Enable the CONFIG_SPI_IMX option so that i.MX8M can use the imx spi driver by default. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit f14b3c91ec5f013a8be337541fd34a42a31fb074 Author: Justin Swartz Date: Thu May 16 12:44:36 2019 +0000 clk: rockchip: add 1.464GHz cpu-clock rate to rk3228 Add missing 1.464GHz clock rate to rk3228_cpuclk_rates[], which gets referenced in the operating points but wasn't defined till now. Signed-off-by: Justin Swartz Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-rk3228.c | 1 + 1 file changed, 1 insertion(+) commit 1e2d08a837ec0d7b8d01539cf7e50d465a2e74bc Author: Douglas Anderson Date: Tue May 7 13:57:42 2019 -0700 clk: rockchip: Slightly more accurate math in rockchip_mmc_get_phase() There's a bit of math in rockchip_mmc_get_phase() to calculate the "fine delay". This math boils down to: PSECS_PER_SEC = 1000000000000. ROCKCHIP_MMC_DELAY_ELEMENT_PSEC = 60 card_clk * ROCKCHIP_MMC_DELAY_ELEMENT_PSEC * 360 * x / PSECS_PER_SEC ...but we do it in pieces to avoid overflowing 32-bits. Right now we overdo it a little bit, though, and end up getting less accurate math than we could. Right now we do: DIV_ROUND_CLOSEST((card_clk / 1000000) * (ROCKCHIP_MMC_DELAY_ELEMENT_PSEC / 10) * (360 / 10) * delay_num, PSECS_PER_SEC / 1000000 / 10 / 10) This is non-ideal because: A) The pins on Rockchip SoCs are rated to go at most 150 MHz, so the max card clock is 150 MHz. Even ignoring this the maximum SD card clock (for SDR104) would be 208 MHz. This means you can decrease your division by 100x and still not overflow: hex(208000000 / 10000 * 6 * 36 * 0xff) == 0x44497200 B) On many Rockchip SoCs we end up with a card clock that is actually 148500000 because we parent off the 297 MHz PLL. That means the math we're actually doing today is less than ideal. Specifically: 148500000 / 1000000 = 148 Let's fix the math to be slightly more accurate. NOTE: no known problems are fixed by this. It was found simply by code inspection. If you want to see the difference between the old and the new on a 148.5 MHz clock, this python can help: old = [x for x in (int(round(148 * 6 * 36 * x / 10000.)) for x in range(256)) if x < 90] new = [x for x in (int(round(1485 * 6 * 36 * x / 100000.)) for x in range(256)) if x < 90] The only differences are: delay_num=17 54=>55 delay_num=22 70=>71 delay_num=27 86=>87 Signed-off-by: Douglas Anderson Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-mmc-phase.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6943b839721ad4a31ad2bacf6e71b21f2dfe3134 Author: Douglas Anderson Date: Fri May 3 14:22:08 2019 -0700 clk: rockchip: Don't yell about bad mmc phases when getting At boot time, my rk3288-veyron devices yell with 8 lines that look like this: [ 0.000000] rockchip_mmc_get_phase: invalid clk rate This is because the clock framework at clk_register() time tries to get the phase but we don't have a parent yet. While the errors appear to be harmless they are still ugly and, in general, we don't want yells like this in the log unless they are important. There's no real reason to be yelling here. We can still return -EINVAL to indicate that the phase makes no sense without a parent. If someone really tries to do tuning and the clock is reported as 0 then we'll see the yells in rockchip_mmc_set_phase(). Fixes: 4bf59902b500 ("clk: rockchip: Prevent calculating mmc phase if clock rate is zero") Signed-off-by: Douglas Anderson Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-mmc-phase.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 527f54fddff67641156e637de2c69cab4a79d7c3 Author: Douglas Anderson Date: Tue May 7 13:49:35 2019 -0700 clk: rockchip: Use clk_hw_get_rate() in MMC phase calculation When calculating the MMC phase we can just use clk_hw_get_rate() instead of clk_get_rate(). This avoids recalculating the rate. Suggested-by: Stephen Boyd Signed-off-by: Douglas Anderson Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-mmc-phase.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c2af88f1a0cdf4cbe94b51fd93e52a3f55606a13 Author: Wen Yang Date: Fri Apr 26 15:08:08 2019 +0800 ARM: rockchip: fix missing of_node_put calls in smp code The call to of_get_next_child returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings: ./arch/arm/mach-rockchip/pm.c:269:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 259, but without a corresponding object release within this function. ./arch/arm/mach-rockchip/pm.c:275:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 259, but without a corresponding object release within this function ./arch/arm/mach-rockchip/platsmp.c:281:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 272, but without a corresponding object release within this function. ./arch/arm/mach-rockchip/platsmp.c:285:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 272, but without a corresponding object release within this function. ./arch/arm/mach-rockchip/platsmp.c:289:3-9: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 272, but without a corresponding object release within this function. ./arch/arm/mach-rockchip/platsmp.c:303:3-9: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 294, but without a corresponding object release within this function. Signed-off-by: Wen Yang Reviewed-by: Florian Fainelli Suggested-by: Heiko Stuebner Cc: Russell King Cc: Heiko Stuebner Cc: linux-arm-kernel@lists.infradead.org Cc: linux-rockchip@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Heiko Stuebner arch/arm/mach-rockchip/platsmp.c | 12 ++++++++++-- arch/arm/mach-rockchip/pm.c | 2 ++ 2 files changed, 12 insertions(+), 2 deletions(-) commit 0ee198ab08fe1b7cca93a81ad658954534963cb0 Author: Manivannan Sadhasivam Date: Fri May 17 09:36:25 2019 +0530 arm64: dts: rockchip: Enable SPI1 on Ficus Enable SPI1 exposed on both Low and High speed expansion connectors of Ficus. SPI1 has 3 different chip selects wired as below: CS0 - Serial Flash (unpopulated) CS1 - Low Speed expansion CS2 - High Speed expansion Signed-off-by: Manivannan Sadhasivam Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399-ficus.dts | 6 ++++++ 1 file changed, 6 insertions(+) commit 7b305b0fb05e0c91da4b1ef2fed12a8b5291c55b Author: Manivannan Sadhasivam Date: Fri May 17 09:36:24 2019 +0530 arm64: dts: rockchip: Enable SPI0 and SPI4 on Rock960 Enable SPI0 and SPI4 exposed on the Low and High speed expansion connectors of Rock960. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399-rock960.dts | 10 ++++++++++ 1 file changed, 10 insertions(+) commit bba821f5479eaab474b2ec1e230ec8b532089722 Author: Katsuhiro Suzuki Date: Fri May 10 02:03:14 2019 +0900 arm64: dts: rockchip: add PCIe nodes on rk3399-rockpro64 This patch adds PCIe, PCIe phy and pinctrl (for PERST#) nodes for RockPro64 board. Signed-off-by: Katsuhiro Suzuki Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit fa31ba8f1719149658f3cfc1e230c04b12c72efa Author: Matthias Kaehlcke Date: Thu May 16 09:29:42 2019 -0700 ARM: dts: raise GPU trip point temperature for speedy to 80 degC Raise the temperature of the GPU thermal trip point for speedy to 80°C. This is the value used by the downstream Chrome OS 3.14 kernel, the 'official' kernel for speedy. Signed-off-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288-veyron-speedy.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 0f637e2565d175eeff664991be9a6d0753d0e484 Author: Matthias Kaehlcke Date: Thu May 16 09:29:41 2019 -0700 ARM: dts: rockchip: raise GPU trip point temperatures for veyron The values match those used by the downstream Chrome OS 3.14 kernel, the 'official' kernel for veyron devices. Keep the critical trip point for speedy at 90°C as in the downstream configuration. Signed-off-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288-veyron-speedy.dts | 4 ++++ arch/arm/boot/dts/rk3288-veyron.dtsi | 8 ++++++++ 2 files changed, 12 insertions(+) commit 83be81e3b0b6eb5df2fba66baa7a25f7e7dc9775 Author: Matthias Kaehlcke Date: Thu May 16 09:29:40 2019 -0700 ARM: dts: rockchip: raise CPU trip point temperature for veyron to 100 degC This value matches what is used by the downstream Chrome OS 3.14 kernel, the 'official' kernel for veyron devices. Keep the temperature for 'speedy' at 90°C, as in the downstream kernel. Increase the temperature for a hardware shutdown to 125°C, which matches the downstream configuration and gives the system a chance to shut down orderly at the criticial trip point. Signed-off-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288-veyron-speedy.dts | 4 ++++ arch/arm/boot/dts/rk3288-veyron.dtsi | 5 +++++ 2 files changed, 9 insertions(+) commit 1c0479023412ab7834f2e98b796eb0d8c627cd62 Author: Douglas Anderson Date: Fri May 3 16:41:42 2019 -0700 ARM: dts: rockchip: Make rk3288-veyron-minnie run at hs200 As some point hs200 was failing on rk3288-veyron-minnie. See commit 984926781122 ("ARM: dts: rockchip: temporarily remove emmc hs200 speed from rk3288 minnie"). Although I didn't track down exactly when it started working, it seems to work OK now, so let's turn it back on. To test this, I booted from SD card and then used this script to stress the enumeration process after fixing a memory leak [1]: cd /sys/bus/platform/drivers/dwmmc_rockchip for i in $(seq 1 3000); do echo "========================" $i echo ff0f0000.dwmmc > unbind sleep .5 echo ff0f0000.dwmmc > bind while true; do if [ -e /dev/mmcblk2 ]; then break; fi sleep .1 done done It worked fine. [1] https://lkml.kernel.org/r/20190503233526.226272-1-dianders@chromium.org Signed-off-by: Douglas Anderson Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288-veyron-minnie.dts | 4 ---- 1 file changed, 4 deletions(-) commit 99fa066710f75f18f4d9a5bc5f6a711968a581d5 Author: Douglas Anderson Date: Fri May 3 16:45:37 2019 -0700 ARM: dts: rockchip: Make rk3288-veyron-mickey's emmc work again When I try to boot rk3288-veyron-mickey I totally fail to make the eMMC work. Specifically my logs (on Chrome OS 4.19): mmc_host mmc1: card is non-removable. mmc_host mmc1: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0) mmc_host mmc1: Bus speed (slot 0) = 50000000Hz (slot req 52000000Hz, actual 50000000HZ div = 0) mmc1: switch to bus width 8 failed mmc1: switch to bus width 4 failed mmc1: new high speed MMC card at address 0001 mmcblk1: mmc1:0001 HAG2e 14.7 GiB mmcblk1boot0: mmc1:0001 HAG2e partition 1 4.00 MiB mmcblk1boot1: mmc1:0001 HAG2e partition 2 4.00 MiB mmcblk1rpmb: mmc1:0001 HAG2e partition 3 4.00 MiB, chardev (243:0) mmc_host mmc1: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0) mmc_host mmc1: Bus speed (slot 0) = 50000000Hz (slot req 52000000Hz, actual 50000000HZ div = 0) mmc1: switch to bus width 8 failed mmc1: switch to bus width 4 failed mmc1: tried to HW reset card, got error -110 mmcblk1: error -110 requesting status mmcblk1: recovery failed! print_req_error: I/O error, dev mmcblk1, sector 0 ... When I remove the '/delete-property/mmc-hs200-1_8v' then everything is hunky dory. That line comes from the original submission of the mickey dts upstream, so presumably at the time the HS200 was failing and just enumerating things as a high speed device was fine. ...or maybe it's just that some mickey devices work when enumerating at "high speed", just not mine? In any case, hs200 seems good now. Let's turn it on. Signed-off-by: Douglas Anderson Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288-veyron-mickey.dts | 4 ---- 1 file changed, 4 deletions(-) commit d190bfaaa2a1575e7998d8487ed26cdf9e74b42b Author: Douglas Anderson Date: Fri May 3 16:48:14 2019 -0700 ARM: dts: rockchip: Remove bogus 'i2s_clk_out' from rk3288-veyron-mickey The rk3288-veyron-mickey device tree overrides the default "i2s" clock settings to add the clock for "i2s_clk_out". That clock is only present in the bindings downstream Chrome OS 3.14 tree. Upstream the i2s port bindings doesn't specify that as a possible clock. Let's remove it. NOTE: for other rk3288-veyron devices this clock is consumed by 'maxim,max98090'. Presumably if this clock is needed for mickey it'll need to be consumed by something similar. Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288-veyron-mickey.dts | 2 -- 1 file changed, 2 deletions(-) commit 6773af2684b7bc1b7b2d9ef874599cccaba2559e Author: Caesar Wang Date: Tue Apr 9 13:47:07 2019 -0700 ARM: dts: rockchip: fix PWM clock found on RK3288 Socs We use the new PWM IP on RK3288, but the PWM's clock indeed incorrect. Signed-off-by: Caesar Wang Signed-off-by: Douglas Anderson Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 6d97024dce236619b0bb85bdb5028019ed7fda56 Author: Chun-Hung Wu Date: Thu May 16 16:10:45 2019 +0800 iio: adc: mediatek: mt6577-auxadc, add mt6765 support 1. Add calibrated sample data support 2. Use of_match_table to decide each platform's feature set Signed-off-by: Chun-Hung Wu Signed-off-by: Jonathan Cameron drivers/iio/adc/mt6577_auxadc.c | 54 +++++++++++++++++++++++++++++++---------- 1 file changed, 41 insertions(+), 13 deletions(-) commit 73e1ccdab3c34b8f9be6e55600d40a1478049121 Author: Chun-Hung Wu Date: Thu May 16 16:10:44 2019 +0800 dt-bindings: iio: adc: mediatek: Add document for mt6765 Add compatible node for mt6765 auxadc Signed-off-by: Chun-Hung Wu Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/adc/mt6577_auxadc.txt | 1 + 1 file changed, 1 insertion(+) commit e359a29225dde53fade5fa4bc3d957599fb5f9a5 Author: Alexandru Ardelean Date: Fri May 17 18:44:41 2019 +0300 dt-bindings: iio: accel: adxl345: switch to YAML bindings The ADX345 supports both I2C & SPI bindings. This change switches from old text bindings, to YAML bindings, and also tries to make use of the recent multiple-examples support. Signed-off-by: Alexandru Ardelean Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron .../devicetree/bindings/iio/accel/adi,adxl345.yaml | 72 ++++++++++++++++++++++ .../devicetree/bindings/iio/accel/adxl345.txt | 39 ------------ MAINTAINERS | 1 + 3 files changed, 73 insertions(+), 39 deletions(-) commit 5887c8364766842f9c5e07e4b0bf38013f48ba09 Author: Yangtao Li Date: Sun May 12 04:32:41 2019 -0400 iio: adc: sun4i-gpadc-iio convert to SPDX license tags Updates license to use SPDX-License-Identifier. Signed-off-by: Yangtao Li Acked-by: Maxime Ripard Signed-off-by: Jonathan Cameron drivers/iio/adc/sun4i-gpadc-iio.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 0d698a538f8d4827c3209c44db57ca5a5945550e Author: Lars-Peter Clausen Date: Fri May 17 16:37:11 2019 +0300 iio: ad9523-1: Improve reported VCO frequency accuracy To improve the accuracy of the reported VCO frequency perform all multiplications before divisions. This reduces rounding errors and makes sure the reported rates are accurate down to the last digit. Signed-off-by: Lars-Peter Clausen Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron drivers/iio/frequency/ad9523.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 4cc79cbb01ef35dd822f96160f78f0012843cf3c Author: Chris Wilson Date: Wed May 15 14:00:52 2019 +0100 drm/i915/execlists: Drop promotion on unsubmit With the disappearance of NEWCLIENT, we no longer need to provide the priority boost on preemption in order to prevent repeated gazumping, and we can remove the dead code. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190515130052.4475-5-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gt/intel_lrc.c | 59 +++++++------------------------------ 1 file changed, 10 insertions(+), 49 deletions(-) commit 68fc728b01fcc93b26d52f6e884e738962a49a66 Author: Chris Wilson Date: Wed May 15 14:00:51 2019 +0100 drm/i915: Downgrade NEWCLIENT to non-preemptive Commit 1413b2bc0717 ("drm/i915: Trim NEWCLIENT boosting") had the intended consequence of not allowing a sequence of work that merely crossed into a new engine the privilege to be promoted to NEWCLIENT status. It also had the unintended consequence of actually making NEWCLIENT effective on heavily oversubscribed transcode machines and impacting upon their throughput. If we consider a client packet composed of (rcsA, rcsB, vcs) and 30 of those clients, using the NEWCLIENT boost that will be scheduled as rcsA x 30, (rcsB, vcs) x 30 where as before it would have been (rcsA, rcsB, vcs) x 30 That is with NEWCLIENT only boosting the first request of each client, we would execute all rcsA requests prior to running on the vcs engines; acruing a lot of dead time as compared to the previous case where the vcs engine would be started in parallel to processing the second client. The previous patch has the effect of delaying submission until it is required by a third party (either the user with an explicit wait, or by another client/engine). We reduce the NEWCLIENT bump to a mere WAIT, which has the effect of removing its preemptive grant and reducing it to the same level as any other user interaction -- that it will not be promoted above the interengine dependencies, and so preventing NEWCLIENTS from starving other engines. This a large nerf to the rrul properties of the current NEWCLIENT, but it still does give prioritised submission to new requests from light workloads. References: b16c765122f9 ("drm/i915: Priority boost for new clients") Fixes: 1413b2bc0717 ("drm/i915: Trim NEWCLIENT boosting") # customer impact Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Dmitry Rogozhkin Cc: Dmitry Ermilov Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190515130052.4475-4-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gt/intel_lrc.c | 2 +- drivers/gpu/drm/i915/i915_priolist_types.h | 5 ++--- drivers/gpu/drm/i915/i915_request.c | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) commit 6e7eb7a80769e7250e31652b96918cf7f3e0d285 Author: Chris Wilson Date: Wed May 15 14:00:50 2019 +0100 drm/i915: Bump signaler priority on adding a waiter The handling of the no-preemption priority level imposes the restriction that we need to maintain the implied ordering even though preemption is disabled. Otherwise we may end up with an AB-BA deadlock across multiple engine due to a real preemption event reordering the no-preemption WAITs. To resolve this issue we currently promote all requests to WAIT on unsubmission, however this interferes with the timeslicing requirement that we do not apply any implicit promotion that will defeat the round-robin timeslice list. (If we automatically promote the active request it will go back to the head of the queue and not the tail!) So we need implicit promotion to prevent reordering around semaphores where we are not allowed to preempt, and we must avoid implicit promotion on unsubmission. So instead of at unsubmit, if we apply that implicit promotion on adding the dependency, we avoid the semaphore deadlock and we also reduce the gains made by the promotion for user space waiting. Furthermore, by keeping the earlier dependencies at a higher level, we reduce the search space for timeslicing without altering runtime scheduling too badly (no dependencies at all will be assigned a higher priority for rrul). v2: Limit the bump to external edges (as originally intended) i.e. between contexts and out to the user. Testcase: igt/gem_concurrent_blit Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190515130052.4475-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gt/selftest_lrc.c | 12 ++++++++---- drivers/gpu/drm/i915/i915_request.c | 9 --------- drivers/gpu/drm/i915/i915_scheduler.c | 11 +++++++++++ drivers/gpu/drm/i915/i915_scheduler_types.h | 3 ++- 4 files changed, 21 insertions(+), 14 deletions(-) commit af461ff3fa5e8c68b0a7f241b1d7a3de26caf711 Author: Chris Wilson Date: Fri May 17 11:22:25 2019 +0100 drm/i915/hdcp: Use both bits for device_count Smatch spotted: drivers/gpu/drm/i915//intel_hdcp.c:1406 hdcp2_authenticate_repeater_topology() warn: should this be a bitwise op? and indeed looks to be suspect that we do need to use a bitwise or to combine the two register fields into one counter. Signed-off-by: Chris Wilson Cc: Ramalingam C Reviewed-by: Ramalingam C Link: https://patchwork.freedesktop.org/patch/msgid/20190517102225.3069-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_hdcp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 96ac08137e1a3604a6a62a71462c914d5b624c6d Author: Chris Wilson Date: Fri May 17 11:22:24 2019 +0100 drm/i915/dp: Initialise locals for static analysis Just to squelch an smatch warning that doesn't see the with_() being taken unconditionally: drivers/gpu/drm/i915//intel_dp.c:230 intel_dp_get_fia_supported_lane_count() error: uninitialized symbol 'lane_info'. drivers/gpu/drm/i915//intel_dp.c:5338 intel_digital_port_connected() error: uninitialized symbol 'is_connected'. Signed-off-by: Chris Wilson Cc: Imre Deak Reviewed-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20190517102225.3069-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_dp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 17db337f5098d29415314c4a588b842fc684394b Author: Chris Wilson Date: Wed May 15 14:00:49 2019 +0100 drm/i915: Truly bump ready tasks ahead of busywaits In commit b7404c7ecb38 ("drm/i915: Bump ready tasks ahead of busywaits"), I tried cutting a corner in order to not install a signal for each of our dependencies, and only listened to requests on which we were intending to busywait. The compromise that was made was that instead of then being able to promote the request with a full NOSEMAPHORE like its non-busywaiting brethren, as we had not ensured we had cleared the semaphore chain, we settled for only using the NEWCLIENT boost. With an over saturated system with multiple NEWCLIENTS in flight at any time, this was found to be an inadequate promotion and left us with a much poorer scheduling order than prior to using semaphores. The outcome of this patch, is that all requests have NOSEMAPHORE priority when they have no dependencies and are ready to run and not busywait, restoring the pre-semaphore ordering on saturated systems. We can demonstrate the effect of poor scheduling order by oversaturating the system using gem_wsim on a system with multiple vcs engines (i.e running the same workloads across more clients than required for peak throughput, e.g. media_load_balance_17i7.wsim -c4 -b context): x v5.1 (normalized) + tip * fix +------------------------------------------------------------------------+ | x | | x | | x | | x | | %x | | %%x | | %%x | | %%x | | %%x | | %%x | | %%x | | %%x | | %%x | | %%x | | %%x | | %#x | | %#x | | %#x | | %#x | | %#x | | + %#xx | | + %#xx | | + %%#xx | | + %%#xx | | + %%#xx | | + %%#xx | | + %%##x | | +++ %%##x | | +++ %%##x | | +++ %%##x | | ++++ %%##x | | ++++ %%##x | | ++++ %%##xx | | ++++ %###xx | | ++++ %###xx | | ++++ %###xx | | ++++ %###xx | | ++++ + %#O#xx | | ++++ + %#O#xx | | ++++++ + %#O#xx | | ++++++++++ %OOOxxx| | ++++++++++ + %#OOO#xx| | + ++++++++++++ ++ +++++ + ++ @@OOOO#xx| | |A_| | ||__________M_______A____________________| | | |A_| | +------------------------------------------------------------------------+ N Min Max Median Avg Stddev x 120 0.99456 1.00628 0.999985 1.0001545 0.0024387139 + 120 0.873021 1.00037 0.884134 0.90148752 0.039190862 Difference at 99.5% confidence -0.098667 +/- 0.0110762 -9.86517% +/- 1.10745% (Student's t, pooled s = 0.0277657) % 120 0.990207 1.00165 0.9970265 0.99699748 0.0021024 Difference at 99.5% confidence -0.003157 +/- 0.000908245 -0.315651% +/- 0.0908105% (Student's t, pooled s = 0.00227678) Fixes: b7404c7ecb38 ("drm/i915: Bump ready tasks ahead of busywaits") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Dmitry Rogozhkin Cc: Dmitry Ermilov Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190515130052.4475-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_request.c | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) commit dba5a7f301d2eec0ed1b2fbe3156960615b996d5 Author: Chris Wilson Date: Wed May 15 14:00:48 2019 +0100 drm/i915: Mark semaphores as complete on unsubmit out if payload was started Avoid charging us for the presumed busywait if the request was preempted after successfully using semaphores to reduce inter-engine latency. v2: Bump the priority to reflect the lack of semaphores now required. References: ca6e56f654e7 ("drm/i915: Disable semaphore busywaits on saturated systems") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190515130052.4475-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_request.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 68c20cc2164cc5c7c73f8012ae6491afdb1f7f72 Author: Aaron Armstrong Skomra Date: Fri May 10 15:34:18 2019 -0700 HID: wacom: correct touch resolution x/y typo This affects the 2nd-gen Intuos Pro Medium and Large when using their Bluetooth connection. Fixes: 4922cd26f03c ("HID: wacom: Support 2nd-gen Intuos Pro's Bluetooth classic interface") Cc: # v4.11+ Signed-off-by: Aaron Armstrong Skomra Reviewed-by: Jason Gerecke Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d4b8efeb46d99a5d02e7f88ac4eaccbe49370770 Author: Aaron Armstrong Skomra Date: Fri May 10 15:34:17 2019 -0700 HID: wacom: generic: Correct pad syncing Only sync the pad once per report, not once per collection. Also avoid syncing the pad on battery reports. Fixes: f8b6a74719b5 ("HID: wacom: generic: Support multiple tools per report") Cc: # v4.17+ Signed-off-by: Aaron Armstrong Skomra Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit d8e9806005f28bbb49899dab2068e3359e22ba35 Author: Aaron Armstrong Skomra Date: Fri May 10 15:31:16 2019 -0700 HID: wacom: generic: only switch the mode on devices with LEDs Currently, the driver will attempt to set the mode on all devices with a center button, but some devices with a center button lack LEDs, and attempting to set the LEDs on devices without LEDs results in the kernel error message of the form: "leds input8::wacom-0.1: Setting an LED's brightness failed (-32)" This is because the generic codepath erroneously assumes that the BUTTON_CENTER usage indicates that the device has LEDs, the previously ignored TOUCH_RING_SETTING usage is a more accurate indication of the existence of LEDs on the device. Fixes: 10c55cacb8b2 ("HID: wacom: generic: support LEDs") Cc: # v4.11+ Signed-off-by: Aaron Armstrong Skomra Reviewed-by: Jason Gerecke Signed-off-by: Jiri Kosina drivers/hid/wacom_sys.c | 3 +++ drivers/hid/wacom_wac.c | 2 -- drivers/hid/wacom_wac.h | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) commit 7f07ce0f04e25cd41a85ee780dbe85b40c9e3482 Author: Russell King Date: Sat Jul 14 11:17:45 2018 +0100 drm/armada: add CRTC mode validation Add CRTC mode validation to reject modes that the CRTC does not support. Signed-off-by: Russell King drivers/gpu/drm/armada/armada_crtc.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 0ab17499b18f4b990600be177058957ab1681808 Author: Russell King Date: Mon Jul 2 17:27:46 2018 +0100 drm/armada: add drm_atomic_helper_shutdown() call in tear-down Ensure that the hardware is disabled prior to tearing down the modeset support. Signed-off-by: Russell King drivers/gpu/drm/armada/armada_drv.c | 2 ++ 1 file changed, 2 insertions(+) commit 5a6cbce823bfa13f4ef47049b9ba861e432d5bd2 Author: Russell King Date: Sun Jul 1 22:11:27 2018 +0100 drm/armada: add and use definitions for RDREG4F Add and use bit definitions for RDREG4F on Dove Armada 510. Signed-off-by: Russell King drivers/gpu/drm/armada/armada_510.c | 9 +++++++-- drivers/gpu/drm/armada/armada_hw.h | 10 ++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) commit f79d7c9543d2318aff29edd1bbcc142301eb75c2 Author: Russell King Date: Sun Jul 1 15:46:56 2018 +0100 drm/armada: add drm_mode_set_crtcinfo() mode fixup Add a drm_mode_set_crtcinfo() call in our CRTC's mode_fixup callback to ensure that any adjustments to the mode made by connectors etc are properly accounted for by the CRTC. Signed-off-by: Russell King drivers/gpu/drm/armada/armada_crtc.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 5d32b660c839706fd9a3d4b0e65cb648bc07032d Author: Russell King Date: Sun Jul 1 15:46:54 2018 +0100 drm/armada: add comments about HWC32 cursor colour format Add some comments about the format of the HWC32 cursor colour format. Signed-off-by: Russell King drivers/gpu/drm/armada/armada_crtc.c | 7 +++++++ 1 file changed, 7 insertions(+) commit d0d765dec6b7e6dc5d6c153784f1a80a1f5bf3c5 Author: Russell King Date: Sun Jul 1 15:46:26 2018 +0100 drm/armada: add support for setting gamma Add support for setting gamma through both the legacy interfaces and the atomic interfaces. Signed-off-by: Russell King drivers/gpu/drm/armada/armada_crtc.c | 63 +++++++++++++++++++++++++++++++++++ drivers/gpu/drm/armada/armada_hw.h | 4 +++ drivers/gpu/drm/armada/armada_plane.c | 2 +- 3 files changed, 68 insertions(+), 1 deletion(-) commit 7d62237da6ec072292c2f738ebffbf10f6a101cf Author: Russell King Date: Fri Jan 25 11:14:21 2019 +0000 drm/armada: move plane address and pitch calculation to atomic_check Move the plane address and pitch calculations to atomic_check rather than the update function, so we don't have to probe the interlace setting for the CRTC while updating the plane. Signed-off-by: Russell King drivers/gpu/drm/armada/armada_overlay.c | 23 ++++++++++------------- drivers/gpu/drm/armada/armada_plane.c | 30 ++++++++++-------------------- drivers/gpu/drm/armada/armada_plane.h | 5 +++++ 3 files changed, 25 insertions(+), 33 deletions(-) commit 89e0c53ccfbcca4a492d98735d2eda307368f742 Author: Russell King Date: Sun Jul 1 17:01:26 2018 +0100 drm/armada: add missing interlaced support for overlay frame Interlaced support has been missing from the overlay frame, which is sub-optimal. Add support for this missing feature. Signed-off-by: Russell King drivers/gpu/drm/armada/armada_overlay.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 1d1547ec12bc7d4d03c21704d4445aff8bcac8c1 Author: Russell King Date: Fri Jan 25 10:56:54 2019 +0000 drm/armada: fix plane location and size for interlace When the CRTC is programmed for interlace, we have to halve the Y parameters for the plane. Rather than doing this in the update function (which would need the calculation repeated for the old state as well as the new state), arrange to do the calculation in atomic_check and save it in our private plane state structure. Signed-off-by: Russell King drivers/gpu/drm/armada/armada_hw.h | 15 ------- drivers/gpu/drm/armada/armada_overlay.c | 15 ++++--- drivers/gpu/drm/armada/armada_plane.c | 80 +++++++++++++++++++++++++++------ drivers/gpu/drm/armada/armada_plane.h | 20 +++++++-- 4 files changed, 91 insertions(+), 39 deletions(-) commit 9184ae8db3d563438519cab295c2c9698255ca87 Author: Russell King Date: Fri Jan 25 10:28:20 2019 +0000 drm/armada: add plane size/location accessors Add accessors for getting the register values for the plane from the plane state. This will allow us to generate the values when validating the plane rather than when programming, which allows us to fix the interlace handling without adding lots of additional handling in the update functions. Signed-off-by: Russell King drivers/gpu/drm/armada/armada_overlay.c | 12 ++++++------ drivers/gpu/drm/armada/armada_plane.c | 12 ++++++------ drivers/gpu/drm/armada/armada_plane.h | 4 ++++ 3 files changed, 16 insertions(+), 12 deletions(-) commit ad52f53ff4e3167425b4b2195a23b9d2d0d243c6 Author: Russell King Date: Fri Jan 25 09:55:28 2019 +0000 drm/armada: use __drm_atomic_helper_plane_reset in overlay reset Use the __drm_atomic_helper_plane_reset() helper in the overlay reset code to ensure that generic features are correctly reset in future. Signed-off-by: Russell King drivers/gpu/drm/armada/armada_overlay.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 768f719ab7b045e30055be3b4ceb2fcf9ceb58f2 Author: Russell King Date: Fri Jan 25 09:47:05 2019 +0000 drm/armada: fix crtc interlace We support interlace, but this was broken when we could no longer get a ref on the vblank interrupt. Arrange to get the ref on the vblank interrupt after we've re-enabled vblank, and put it before we disable the vblank. Signed-off-by: Russell King drivers/gpu/drm/armada/armada_crtc.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 5b24f715042da2a7f3fd059f15cc5a6fbd4f4ec6 Author: Thomas Zimmermann Date: Thu May 16 18:27:46 2019 +0200 drm: Reserve/unreserve GEM VRAM BOs from within pin/unpin functions The original bochs and vbox implementations of pin and unpin functions automatically reserved BOs during validation. This functionality got lost while converting the code to a generic implementation. This may result in validating unlocked TTM BOs. Adding the reserve and unreserve operations to GEM VRAM's pin and unpin functions fixes the bochs and vbox drivers. Additionally the patch changes the mgag200, ast and hibmc drivers to not reserve BOs by themselves. Signed-off-by: Thomas Zimmermann Reported-by: kernel test robot Link: http://patchwork.freedesktop.org/patch/msgid/20190516162746.11636-3-tzimmermann@suse.de Fixes: a3232987fdbf ("drm/bochs: Convert bochs driver to |struct drm_gem_vram_object|") Reported-by: kernel test robot Signed-off-by: Gerd Hoffmann drivers/gpu/drm/ast/ast_mode.c | 24 +--------- drivers/gpu/drm/drm_gem_vram_helper.c | 54 ++++++++++++++++++----- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c | 6 --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c | 17 +------ drivers/gpu/drm/mgag200/mgag200_mode.c | 19 +------- 5 files changed, 45 insertions(+), 75 deletions(-) commit 82ff2fb5d184e95c7877c58359cef4f5d43df9c1 Author: Thomas Zimmermann Date: Thu May 16 18:27:45 2019 +0200 drm: Add drm_gem_vram_{pin/unpin}_reserved() and convert mgag200 The new interfaces drm_gem_vram_{pin/unpin}_reserved() are variants of the GEM VRAM pin/unpin functions that do not reserve the BO during validation. The mgag200 driver requires this behavior for its cursor handling. The patch also converts the driver to use the new interfaces. Signed-off-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20190516162746.11636-2-tzimmermann@suse.de Signed-off-by: Gerd Hoffmann drivers/gpu/drm/drm_gem_vram_helper.c | 75 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/mgag200/mgag200_cursor.c | 18 ++++---- include/drm/drm_gem_vram_helper.h | 3 ++ 3 files changed, 88 insertions(+), 8 deletions(-) commit bfa8130f50a63563eae10ef933fe01b50b3e87a0 Author: Saravanan Sekar Date: Sat May 11 17:11:49 2019 +0200 ASoC: tlv320aic3x: Add support for high power analog output Add support to output level control for the analog high power output drivers HPOUT and HPCOM. Signed-off-by: Saravanan Sekar Signed-off-by: Mark Brown sound/soc/codecs/tlv320aic3x.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit bfe95dfa4dacefbe20a8532bdac0a19da0708be4 Author: S.j. Wang Date: Thu May 16 06:04:58 2019 +0000 ASoC: cs42xx8: Add reset gpio handling Handle the reset GPIO and reset the device every time we start it. Signed-off-by: Shengjiu Wang Signed-off-by: Mark Brown sound/soc/codecs/cs42xx8.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit f569aa9b1cc8e77327037f69ce4767b1f6bbb6a4 Author: Yannick Fertré Date: Tue May 14 11:35:56 2019 +0200 drm/stm: dsi: add regulator support Add support of regulator for the phy part of the DSI controller. Signed-off-by: Yannick Fertré Acked-by: Philippe Cornu Signed-off-by: Benjamin Gaignard Link: https://patchwork.freedesktop.org/patch/msgid/1557826556-10079-3-git-send-email-yannick.fertre@st.com drivers/gpu/drm/stm/dw_mipi_dsi-stm.c | 60 ++++++++++++++++++++++++++++------- 1 file changed, 49 insertions(+), 11 deletions(-) commit 79c5ecafe95f9fae41693bb0b89a4c3be7851a6d Author: Yannick Fertré Date: Tue May 14 11:35:55 2019 +0200 dt-bindings: display: stm32: add supply property to DSI controller This patch adds documentation of a new property phy-dsi-supply to the STM32 DSI controller. Signed-off-by: Yannick Fertré Reviewed-by: Rob Herring Reviewed-by: Philippe Cornu Signed-off-by: Benjamin Gaignard Link: https://patchwork.freedesktop.org/patch/msgid/1557826556-10079-2-git-send-email-yannick.fertre@st.com Documentation/devicetree/bindings/display/st,stm32-ltdc.txt | 3 +++ 1 file changed, 3 insertions(+) commit cbb10f1e4a722511f668d60f0b467327215f90a2 Author: Oded Gabbay Date: Fri May 17 01:08:23 2019 +0300 habanalabs: don't limit packet size for device CPU This patch removes a limitation on the maximum packet size that is read by the device CPU as that limitation is not needed. Therefore, the patch also removes an elaborate calculation that is based on this limitation which is also not needed now. Instead, use a fixed value for the memory pool size of the packets. Signed-off-by: Oded Gabbay drivers/misc/habanalabs/firmware_if.c | 12 ------------ drivers/misc/habanalabs/goya/goya.c | 2 +- drivers/misc/habanalabs/habanalabs.h | 12 ++---------- 3 files changed, 3 insertions(+), 23 deletions(-) commit b1f35dfd7c2f509b0736f1ff02c314130b6b773e Author: Maxime Ripard Date: Thu May 16 09:59:26 2019 +0200 dt-bindings: sound: sun4i-spdif: Document that the RX channel can be missing The H3 and compatibles controllers don't have any reception capabilities, even though it was never documented as such in the binding before. Therefore, on those controllers, we don't have the option to set an RX DMA channel. This was already done in the DTSI, but the binding itself was never updated. Let's add a special case in the schemas. Signed-off-by: Maxime Ripard Reviewed-by: Rob Herring Signed-off-by: Mark Brown .../bindings/sound/allwinner,sun4i-a10-spdif.yaml | 38 ++++++++++++++++------ 1 file changed, 28 insertions(+), 10 deletions(-) commit 506c7f9b0612c46732aa74317f59a28d9477905b Author: Maxime Ripard Date: Thu May 16 09:59:25 2019 +0200 dt-bindings: sound: Convert Allwinner SPDIF binding to YAML The Allwinner SoCs feature an SPDIF controller across multiple SoC generations. However, earlier generations were a bit simpler than the subsequent ones, and for example would always have RX and TX capabilities, and no reset lines. In order to express this, let's create two YAML schemas instead of the free form text we had before. Signed-off-by: Maxime Ripard Reviewed-by: Rob Herring Signed-off-by: Mark Brown .../bindings/sound/allwinner,sun4i-a10-spdif.yaml | 101 +++++++++++++++++++++ .../bindings/sound/sunxi,sun4i-spdif.txt | 42 --------- 2 files changed, 101 insertions(+), 42 deletions(-) commit 75b3f1cb50bdbdc7fd557ca3ed63b3eb87c2bab3 Author: James Clarke Date: Tue Jan 15 15:04:18 2019 +0000 drm: Fix drm.h uapi header for GNU/kFreeBSD Like GNU/Linux, GNU/kFreeBSD's sys/types.h does not define the uintX_t types, which differs from the BSDs' headers. Thus we should include stdint.h to ensure we have all the required integer types. Signed-off-by: James Clarke Signed-off-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20190115150418.68080-1-jrtc27@jrtc27.com Reviewed-by: Eric Anholt include/uapi/drm/drm.h | 1 + 1 file changed, 1 insertion(+) commit 38c2c7917adc8fb4ed9114b92923af9abe091af5 Author: Eric Anholt Date: Thu Apr 18 17:10:14 2019 -0700 drm/v3d: Fix and extend MMU error handling. We were setting the wrong flags to enable PTI errors, so we were seeing reads to invalid PTEs show up as write errors. Also, we weren't turning on the interrupts. The AXI IDs we were dumping included the outstanding write number and so they looked basically random. And the VIO_ADDR decoding was based on the MMU VA_WIDTH for the first platform I worked on and was wrong on others. In short, this was a thorough mess from early HW enabling. Tested on V3D 4.1 and 4.2 with intentional L2T, CLE, PTB, and TLB faults. Signed-off-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20190419001014.23579-4-eric@anholt.net Reviewed-by: Paul Kocialkowski drivers/gpu/drm/v3d/v3d_drv.c | 1 + drivers/gpu/drm/v3d/v3d_drv.h | 2 ++ drivers/gpu/drm/v3d/v3d_irq.c | 31 +++++++++++++++++++++++++++---- drivers/gpu/drm/v3d/v3d_mmu.c | 7 +++++-- drivers/gpu/drm/v3d/v3d_regs.h | 3 ++- 5 files changed, 37 insertions(+), 7 deletions(-) commit 1ba9d7cbc4530ae35eb1ebbd3c5e59d0c587aefa Author: Eric Anholt Date: Thu Apr 18 17:10:13 2019 -0700 drm/v3d: Dump V3D error debug registers in debugfs, and one at reset. Looking at a hang recently, I noticed these registers that might tell me if something obvious was wrong. They didn't help in this case, but keep it around for the future. Signed-off-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20190419001014.23579-3-eric@anholt.net Reviewed-by: Paul Kocialkowski drivers/gpu/drm/v3d/v3d_debugfs.c | 5 +++++ drivers/gpu/drm/v3d/v3d_gem.c | 4 +++- drivers/gpu/drm/v3d/v3d_regs.h | 38 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 1 deletion(-) commit 091d62831793c3a1be6ae46aa888e7551e0818ad Author: Eric Anholt Date: Thu Apr 18 17:10:12 2019 -0700 drm/v3d: Set the correct DMA mask according to the MMU's limits. On 7278, we've got 40 bits to work with. Signed-off-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20190419001014.23579-2-eric@anholt.net Reviewed-by: Paul Kocialkowski drivers/gpu/drm/v3d/v3d_debugfs.c | 1 + drivers/gpu/drm/v3d/v3d_drv.c | 6 +++++- drivers/gpu/drm/v3d/v3d_regs.h | 8 ++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) commit 145986ec566b002359243702962b917e7506d44b Author: Eric Anholt Date: Thu Apr 18 17:10:11 2019 -0700 drm/v3d: Fix debugfs reads of MMU regs. They're in the hub, not the individual cores. Signed-off-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20190419001014.23579-1-eric@anholt.net Reviewed-by: Paul Kocialkowski drivers/gpu/drm/v3d/v3d_debugfs.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit ba6e798ecf320716780bb6a6088a8d17dcba1d49 Author: Eric Anholt Date: Wed Apr 24 11:56:17 2019 -0700 drm/doc: Document expectation that userspace review looks at kernel uAPI. The point of this review process is that userspace using the new uAPI can actually live with the uAPI being provided, and it's hard to know that without having actually looked into a kernel patch yourself. Signed-off-by: Eric Anholt Suggested-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190424185617.16865-2-eric@anholt.net Reviewed-by: Daniel Vetter Documentation/gpu/drm-uapi.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 3d42fca00891774c50585c1b2f83357a0904c8bc Author: Eric Anholt Date: Wed Apr 24 15:06:38 2019 -0700 drm/doc: Allow new UAPI to be used once it's in drm-next/drm-misc-next. I was trying to figure out if it was permissible to merge the Mesa side of V3D's CSD support yet while it's in drm-misc-next but not drm-next, and developers on #dri-devel IRC had differing opinions of what the requirement was. v2: Restrict to just drm-next or drm-misc-next on airlied's request. Signed-off-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20190424220638.16222-1-eric@anholt.net Reviewed-by: Daniel Vetter Documentation/gpu/drm-uapi.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4aecaa0a82b3142fb2f2862b3f25ecc96dc06d8c Author: S.j. Wang Date: Wed May 15 06:42:22 2019 +0000 ASoC: fsl_asrc: replace the process_option table with function When we want to support more sample rate, for example 12kHz/24kHz we need update the process_option table, if we want to support more sample rate next time, the table need to be updated again. which is not flexible. We got a function fsl_asrc_sel_proc to replace the table, which can give the pre-processing and post-processing options according to the sample rate. Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen Signed-off-by: Mark Brown sound/soc/fsl/fsl_asrc.c | 71 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 51 insertions(+), 20 deletions(-) commit c8609f3870f7078fc7922eb816ed4908a9bd44f3 Author: Jerome Brunet Date: Wed May 15 15:18:58 2019 +0200 ASoC: meson: add g12a tohdmitx control Add support for the hdmitx control glue of the Amlogic g12a SoC family. This glue links the 3 TDM and 2 SPDIF output interfaces of the SoC to the related inputs of the Synopsys HDMI controller found in these SoCs. Signed-off-by: Jerome Brunet Tested-by: Neil Armstrong Tested-by: Kevin Hilman Signed-off-by: Mark Brown sound/soc/meson/Kconfig | 8 + sound/soc/meson/Makefile | 2 + sound/soc/meson/g12a-tohdmitx.c | 413 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 423 insertions(+) commit 0a8f1117a6803398d361e7bd76fef59c636f143b Author: Jerome Brunet Date: Wed May 15 15:18:57 2019 +0200 ASoC: meson: axg-card: add basic codec-to-codec link support Add basic support for codec-to-codec link in the axg sound card. The cpu side of these links is expected to properly set the hw_params and format of the link. ATM, only the tohdmitx glue is supported but others (like the internal DAC glue) should follow. Signed-off-by: Jerome Brunet Tested-by: Neil Armstrong Tested-by: Kevin Hilman Signed-off-by: Mark Brown sound/soc/meson/axg-card.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit e35f5ad6a965de5d301ca5957a1c48c53fe366fb Author: Jerome Brunet Date: Wed May 15 15:18:56 2019 +0200 ASoC: meson: add tohdmitx DT bindings Add the bindings and the related documentation for the audio hdmitx control glue of the Amlogic g12a SoC family Signed-off-by: Jerome Brunet Tested-by: Neil Armstrong Tested-by: Kevin Hilman Signed-off-by: Mark Brown .../bindings/sound/amlogic,g12a-tohdmitx.txt | 55 ++++++++++++++++++++++ include/dt-bindings/sound/meson-g12a-tohdmitx.h | 13 +++++ 2 files changed, 68 insertions(+) commit c3456a4b2142550944f73a87a8f338074508b249 Author: Jerome Brunet Date: Wed May 15 15:18:55 2019 +0200 ASoC: dapm: allow muxes to force a disconnect Let soc_dapm_mux_update_power() accept NULL as 'e' enum. It makes the code a bit more robust and, more importantly, let the calling mux force a disconnect of the output path if necessary. This is useful if the dapm elements following the mux must be off while updating the mux, to avoid glitches or force a (re)configuration. Signed-off-by: Jerome Brunet Tested-by: Neil Armstrong Tested-by: Kevin Hilman Signed-off-by: Mark Brown sound/soc/soc-dapm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1b74211011eb064914b8155a77a8aaae61cd27eb Author: Jerome Brunet Date: Wed May 15 15:18:54 2019 +0200 ASoC: meson: axg-card: set link name based on link node name So far the link names of the axg sound card was derived from the cpu name of the link. Since the dai link must be unique, it works as long as a device does not provide more than one cpu dai. However, the 'tohdmitx' does provide 2 dais used as cpu on codec-to-codec links Instead of cpu name, use the node name of the dai link. DT already enforce the uniqueness of this name Signed-off-by: Jerome Brunet Tested-by: Neil Armstrong Tested-by: Kevin Hilman Signed-off-by: Mark Brown sound/soc/meson/axg-card.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit cf61f5b01531a2b64b875894fa97aa891d39e871 Author: Shunli Wang Date: Thu May 16 17:54:38 2019 +0800 ASoC: Mediatek: MT8183: set data align This patch sets register and bit information about data align for every memory interface. Signed-off-by: Shunli Wang Signed-off-by: Mark Brown sound/soc/mediatek/mt8183/mt8183-afe-pcm.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 1628fc3f47717fc3c8d9cd5fd6c7bc7d3796927d Author: Shunli Wang Date: Thu May 16 17:54:37 2019 +0800 ASoC: Mediatek: add memory interface data align This supports two data align settings. One is S32_LE and other is S24_LE. Signed-off-by: Shunli Wang Signed-off-by: Mark Brown sound/soc/mediatek/common/mtk-afe-fe-dai.c | 7 +++++++ sound/soc/mediatek/common/mtk-base-afe.h | 2 ++ 2 files changed, 9 insertions(+) commit 0586576950d5dd34d70cca7adba85e5fb08664f7 Author: Noralf Trønnes Date: Wed May 15 15:29:25 2019 +0200 drm/fb-helper: Fix drm_fb_helper_hotplug_event() NULL ptr argument drm_fb_helper_hotplug_event() should tolerate the fb_helper argument being NULL. Commit 03a9606e7fee ("drm/fb-helper: Avoid race with DRM userspace") introduced a fb_helper dereference before the NULL check. Fixup by moving the dereference after the NULL check. Fixes: 03a9606e7fee ("drm/fb-helper: Avoid race with DRM userspace") Reported-by: kbuild test robot Reported-by: Dan Carpenter Signed-off-by: Noralf Trønnes Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190515132925.48867-1-noralf@tronnes.org drivers/gpu/drm/drm_fb_helper.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 86d804f41e5d9e6e1af01539d85137db91992094 Author: Jagan Teki Date: Mon May 13 00:11:27 2019 +0530 drm/sun4i: sun6i_mipi_dsi: Support DSI GENERIC_SHORT_WRITE_2 transfer Some DSI panels do use GENERIC_SHORT_WRITE_2 transfer protocol to host DSI driver and which is similar to GENERIC_SHORT_WRITE. Add support for the same transfer, so-that so-that the panels which are requesting similar transfer type will process properly. Signed-off-by: Jagan Teki Tested-by: Merlijn Wajer Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20190512184128.13720-3-jagan@amarulasolutions.com drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 1 + 1 file changed, 1 insertion(+) commit ac742737715078963ae17e8417cfbd32f2825389 Author: Oded Gabbay Date: Thu May 16 10:39:10 2019 +0300 habanalabs: support device memory memset > 4GB This patch adds support to the goya memset function to perform memset to device memory with size larger then 4GB. In this case, we need to use multiple LIN_DMA packets because a single packet supports up to 4GB. Signed-off-by: Oded Gabbay drivers/misc/habanalabs/goya/goya.c | 49 +++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 19 deletions(-) commit b283d0c353dee57869bdff59e0f01500f1316411 Author: Daniel Mack Date: Mon May 6 20:03:46 2019 -0700 Input: eeti_ts - read hardware state once after wakeup For systems in which the touch IRQ is acting as wakeup source, and that do not support level-driven interrupts, the interrupt controller might not latch the GPIO IRQ during sleep. In such cases, the interrupt will never occur again after resume, hence the touch screen appears dead. To fix this, check for the assertion of the attn gpio, and read form the controller once in the resume path to read the hardware status and to arm the IRQ again. Introduce a mutex to guard eeti_ts_read() against parallel invocations from different contexts. Signed-off-by: Daniel Mack Reported-by: Sven Neumann Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/eeti_ts.c | 71 +++++++++++++++++++++++++++++-------- 1 file changed, 56 insertions(+), 15 deletions(-) commit 83d3af8e208d0641f18a2e8d34e1074d0da9733d Author: Thomas Zimmermann Date: Wed May 8 10:26:30 2019 +0200 drm/hisilicon: Convert hibmc-drm driver to VRAM MM The data structure |struct drm_vram_mm| and its helpers replace hibmc's TTM-based memory manager. It's the same implementation; except for the type names. v5: * set .llseek via DRM_VRAM_MM_FILE_OPERATIONS v4: * don't select DRM_TTM or DRM_VRAM_MM_HELPER v3: * use drm_gem_vram_mm_funcs * convert driver to drm_device-based instance v2: * implement hibmc_mmap() with drm_vram_mm_mmap() Signed-off-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20190508082630.15116-21-tzimmermann@suse.de Signed-off-by: Gerd Hoffmann drivers/gpu/drm/hisilicon/hibmc/Kconfig | 1 - drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 9 +- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h | 8 +- drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c | 139 ++---------------------- 4 files changed, 12 insertions(+), 145 deletions(-) commit e2f572aa9cbb309bcd98e66e813f30f216153eba Author: Thomas Zimmermann Date: Wed May 8 10:26:29 2019 +0200 drm/hisilicon: Convert hibmc-drm driver to |struct drm_gem_vram_object| The data structure |struct drm_gem_vram_object| and its helpers replace |struct hibmc_bo|. It's the same implementation; except for the type names. v4: * select config option DRM_VRAM_HELPER Signed-off-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20190508082630.15116-20-tzimmermann@suse.de Signed-off-by: Gerd Hoffmann drivers/gpu/drm/hisilicon/hibmc/Kconfig | 1 + drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c | 21 ++- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 5 +- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h | 25 +-- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c | 30 ++-- drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c | 210 ++-------------------- 6 files changed, 44 insertions(+), 248 deletions(-) commit 94065bf5543d704d6236595ef707c6d1d6110247 Author: Thomas Zimmermann Date: Wed May 8 10:26:28 2019 +0200 drm/vboxvideo: Convert vboxvideo driver to VRAM MM The data structure |struct drm_vram_mm| and its helpers replace vboxvideo's TTM-based memory manager. It's the same implementation; except for the type names. v4: * don't select DRM_TTM or DRM_VRAM_MM_HELPER v3: * use drm_gem_vram_mm_funcs * convert driver to drm_device-based instance v2: * implement vbox_mmap() with drm_vram_mm_mmap() Signed-off-by: Thomas Zimmermann Reviewed-by: Hans de Goede Link: http://patchwork.freedesktop.org/patch/msgid/20190508082630.15116-19-tzimmermann@suse.de Signed-off-by: Gerd Hoffmann drivers/gpu/drm/vboxvideo/Kconfig | 1 - drivers/gpu/drm/vboxvideo/vbox_drv.c | 13 +--- drivers/gpu/drm/vboxvideo/vbox_drv.h | 15 +--- drivers/gpu/drm/vboxvideo/vbox_main.c | 13 +--- drivers/gpu/drm/vboxvideo/vbox_ttm.c | 136 ++-------------------------------- 5 files changed, 13 insertions(+), 165 deletions(-) commit 5e6b92552f05a200cf81db0b339ee1d393a50ae3 Author: Thomas Zimmermann Date: Wed May 8 10:26:27 2019 +0200 drm/vboxvideo: Convert vboxvideo driver to |struct drm_gem_vram_object| This patch replaces |struct vbox_bo| and its helpers with the generic implementation of |struct drm_gem_vram_object|. The only change in semantics is that &ttm_bo_driver.verify_access() now does the actual verification. v4: * select config option DRM_VRAM_HELPER v3: * remove forward declaration of struct vbox_gem_object v2: nothing Signed-off-by: Thomas Zimmermann Reviewed-by: Hans de Goede Link: http://patchwork.freedesktop.org/patch/msgid/20190508082630.15116-18-tzimmermann@suse.de Signed-off-by: Gerd Hoffmann drivers/gpu/drm/vboxvideo/Kconfig | 1 + drivers/gpu/drm/vboxvideo/vbox_drv.c | 5 +- drivers/gpu/drm/vboxvideo/vbox_drv.h | 60 +-------- drivers/gpu/drm/vboxvideo/vbox_fb.c | 22 ++-- drivers/gpu/drm/vboxvideo/vbox_main.c | 70 ++--------- drivers/gpu/drm/vboxvideo/vbox_mode.c | 36 +++--- drivers/gpu/drm/vboxvideo/vbox_ttm.c | 223 +--------------------------------- 7 files changed, 45 insertions(+), 372 deletions(-) commit a75813435d82e213aef072bd668f049b1956dd13 Author: Thomas Zimmermann Date: Wed May 8 10:26:26 2019 +0200 drm/mgag200: Replace mapping code with drm_gem_vram_{kmap/kunmap}() The mgag200 driver establishes several memory mappings for frame buffers and cursors. This patch converts the driver to use the equivalent drm_gem_vram_kmap() functions. It removes the dependencies on TTM and cleans up the code. v4: * cleanups from checkpatch.pl Signed-off-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20190508082630.15116-17-tzimmermann@suse.de Signed-off-by: Gerd Hoffmann drivers/gpu/drm/mgag200/mgag200_cursor.c | 35 +++++++++++++++----------------- drivers/gpu/drm/mgag200/mgag200_drv.h | 1 - drivers/gpu/drm/mgag200/mgag200_fb.c | 24 ++++++++++++++-------- drivers/gpu/drm/mgag200/mgag200_mode.c | 9 +++++--- 4 files changed, 37 insertions(+), 32 deletions(-) commit 94668ac796a5de8864bfc1a34edd24f81f3e6a2c Author: Thomas Zimmermann Date: Wed May 8 10:26:25 2019 +0200 drm/mgag200: Convert mgag200 driver to VRAM MM The data structure |struct drm_vram_mm| and its helpers replace mgag200's TTM-based memory manager. It's the same implementation; except for the type names. v4: * don't select DRM_TTM or DRM_VRAM_MM_HELPER v3: * use drm_gem_vram_mm_funcs * convert driver to drm_device-based instance v2: * implement mgag200_mmap() with drm_vram_mm_mmap() Signed-off-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20190508082630.15116-16-tzimmermann@suse.de Signed-off-by: Gerd Hoffmann drivers/gpu/drm/mgag200/Kconfig | 1 - drivers/gpu/drm/mgag200/mgag200_drv.c | 14 +--- drivers/gpu/drm/mgag200/mgag200_drv.h | 11 +-- drivers/gpu/drm/mgag200/mgag200_main.c | 17 +---- drivers/gpu/drm/mgag200/mgag200_ttm.c | 133 ++------------------------------- 5 files changed, 15 insertions(+), 161 deletions(-) commit ebb04eb36f9cbb6255594f0f88b11cb5b60bce98 Author: Thomas Zimmermann Date: Wed May 8 10:26:24 2019 +0200 drm/mgag200: Convert mgag200 driver to |struct drm_gem_vram_object| The data structure |struct drm_gem_vram_object| and its helpers replace |struct mgag200_bo|. It's the same implementation; except for the type names. v4: * cleanups from checkpatch.pl * select config option DRM_VRAM_HELPER Signed-off-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20190508082630.15116-15-tzimmermann@suse.de Signed-off-by: Gerd Hoffmann drivers/gpu/drm/mgag200/Kconfig | 1 + drivers/gpu/drm/mgag200/mgag200_cursor.c | 63 ++++++----- drivers/gpu/drm/mgag200/mgag200_drv.c | 5 +- drivers/gpu/drm/mgag200/mgag200_drv.h | 62 ++--------- drivers/gpu/drm/mgag200/mgag200_fb.c | 22 ++-- drivers/gpu/drm/mgag200/mgag200_main.c | 84 +++------------ drivers/gpu/drm/mgag200/mgag200_mode.c | 46 +++++---- drivers/gpu/drm/mgag200/mgag200_ttm.c | 172 +------------------------------ 8 files changed, 107 insertions(+), 348 deletions(-) commit b3a25b9af80d5151bb6f8373847e26628541a766 Author: Thomas Zimmermann Date: Wed May 8 10:26:23 2019 +0200 drm/bochs: Convert bochs driver to VRAM MM The data structure |struct drm_vram_mm| and its helpers replace bochs' TTM-based memory manager. It's the same implementation; except for the type names. v5: * set .llseek via DRM_VRAM_MM_FILE_OPERATIONS v4: * don't select DRM_TTM or DRM_VRAM_MM_HELPER v3: * use drm_gem_vram_mm_funcs * convert driver to drm_device-based instance v2: * implement bochs_mmap() with drm_vram_mm_mmap() Signed-off-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20190508082630.15116-14-tzimmermann@suse.de Signed-off-by: Gerd Hoffmann drivers/gpu/drm/bochs/Kconfig | 1 - drivers/gpu/drm/bochs/bochs.h | 13 +--- drivers/gpu/drm/bochs/bochs_drv.c | 15 +--- drivers/gpu/drm/bochs/bochs_mm.c | 148 +++----------------------------------- 4 files changed, 11 insertions(+), 166 deletions(-) commit a3232987fdbf0bede92a9d7c7e2db99a5084d31b Author: Thomas Zimmermann Date: Wed May 8 10:26:22 2019 +0200 drm/bochs: Convert bochs driver to |struct drm_gem_vram_object| The data structure |struct drm_gem_vram_object| and its helpers replace |struct bochs_bo|. It's the same implementation; except for the type names. v5: * use PRIME helpers from GEM VRAM v4: * cleanups from checkpatch.pl * select config option DRM_VRAM_HELPER Signed-off-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20190508082630.15116-13-tzimmermann@suse.de Signed-off-by: Gerd Hoffmann drivers/gpu/drm/bochs/Kconfig | 1 + drivers/gpu/drm/bochs/bochs.h | 41 +----- drivers/gpu/drm/bochs/bochs_drv.c | 15 +- drivers/gpu/drm/bochs/bochs_kms.c | 18 +-- drivers/gpu/drm/bochs/bochs_mm.c | 288 +------------------------------------- 5 files changed, 21 insertions(+), 342 deletions(-) commit 3f87330e50ac00199dea3fc54ef04ff21c60e23a Author: Thomas Zimmermann Date: Wed May 8 10:26:21 2019 +0200 drm/ast: Replace mapping code with drm_gem_vram_{kmap/kunmap}() The AST driver establishes several memory mappings for frame buffers and cursors. This patch converts the driver to use the equivalent drm_gem_vram_kmap() functions. It removes the dependencies on TTM and cleans up the code. Signed-off-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20190508082630.15116-12-tzimmermann@suse.de Signed-off-by: Gerd Hoffmann drivers/gpu/drm/ast/ast_drv.h | 1 - drivers/gpu/drm/ast/ast_fb.c | 23 +++++++++++------- drivers/gpu/drm/ast/ast_mode.c | 54 ++++++++++++++++++++++++++++++------------ 3 files changed, 53 insertions(+), 25 deletions(-) commit 969562b2cd16e86dc65a3ea75818e5875b01938a Author: Thomas Zimmermann Date: Wed May 8 10:26:20 2019 +0200 drm/ast: Convert AST driver to VRAM MM The data structure |struct drm_vram_mm| and its helpers replace ast's TTM-based memory manager. It's the same implementation; except for the type names. v4: * don't select DRM_TTM or DRM_VRAM_MM_HELPER v3: * use drm_gem_vram_mm_funcs * convert driver to drm_device-based instance v2: * implement ast_mmap() with drm_vram_mm_mmap() Signed-off-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20190508082630.15116-11-tzimmermann@suse.de Signed-off-by: Gerd Hoffmann drivers/gpu/drm/ast/Kconfig | 1 - drivers/gpu/drm/ast/ast_drv.c | 14 +---- drivers/gpu/drm/ast/ast_drv.h | 18 +----- drivers/gpu/drm/ast/ast_main.c | 13 +--- drivers/gpu/drm/ast/ast_ttm.c | 134 +++-------------------------------------- 5 files changed, 13 insertions(+), 167 deletions(-) commit 5b3709793d151e6e12eb6a38a5da3f7fc2923d3a Author: Thomas Zimmermann Date: Wed May 8 10:26:19 2019 +0200 drm/ast: Convert AST driver to |struct drm_gem_vram_object| The data structure |struct drm_gem_vram_object| and its helpers replace |struct ast_bo|. It's the same implementation; except for the type names. v4: * cleanups from checkpatch.pl Signed-off-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20190508082630.15116-10-tzimmermann@suse.de Signed-off-by: Gerd Hoffmann drivers/gpu/drm/ast/Kconfig | 2 +- drivers/gpu/drm/ast/ast_drv.c | 5 +- drivers/gpu/drm/ast/ast_drv.h | 52 +------------ drivers/gpu/drm/ast/ast_fb.c | 23 +++--- drivers/gpu/drm/ast/ast_main.c | 74 +++--------------- drivers/gpu/drm/ast/ast_mode.c | 78 +++++++++++-------- drivers/gpu/drm/ast/ast_ttm.c | 172 +---------------------------------------- 7 files changed, 75 insertions(+), 331 deletions(-) commit 59f5989ad42b6edd089b47895986ef15259822dc Author: Thomas Zimmermann Date: Wed May 8 10:26:18 2019 +0200 drm: Integrate VRAM MM into struct drm_device There's now a pointer to struct drm_vram_mm stored in struct drm_device. DRM drivers that use VRAM MM should use this field to refer to their instance of the data structure. Appropriate helpers are now provided as well. Adding struct drm_vram_mm to struct drm_device further avoids wrappers and boilerplate code in drivers. This patch implements default functions for callbacks in struct drm_driver and struct file_operations that use the struct drm_vram_mm stored in struct drm_device. Drivers that need to provide their own implementations can still do so. The patch also adds documentation for the VRAM helper library in general. v5: * set .llseek to no_llseek() from DRM_VRAM_MM_FILE_OPERATIONS v4: * cleanups from checkpatch.pl * document VRAM helper library Signed-off-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20190508082630.15116-9-tzimmermann@suse.de Signed-off-by: Gerd Hoffmann Documentation/gpu/drm-mm.rst | 6 +++ drivers/gpu/drm/drm_gem_vram_helper.c | 28 ++++++++++ drivers/gpu/drm/drm_vram_helper_common.c | 92 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/drm_vram_mm_helper.c | 85 +++++++++++++++++++++++++++++ include/drm/drm_device.h | 4 ++ include/drm/drm_gem_vram_helper.h | 19 ++++++- include/drm/drm_vram_mm_helper.h | 33 ++++++++++++ 7 files changed, 266 insertions(+), 1 deletion(-) commit 5c9dcacfe56673555540933017c54e8f39e947cb Author: Thomas Zimmermann Date: Wed May 8 10:26:17 2019 +0200 drm: Add default instance for VRAM MM callback functions VRAM MM is most likely be used with GEM VRAM. The latter now provides the required instance of struct drm_vram_mm_funcs for drivers to use. Signed-off-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20190508082630.15116-8-tzimmermann@suse.de Signed-off-by: Gerd Hoffmann drivers/gpu/drm/drm_gem_vram_helper.c | 14 ++++++++++++++ include/drm/drm_gem_vram_helper.h | 3 +++ 2 files changed, 17 insertions(+) commit 96352eca5c7c36c3e0eb97a6d68fb170ce643ea5 Author: Thomas Zimmermann Date: Wed May 8 10:26:16 2019 +0200 drm: Add VRAM MM, a simple memory manager for dedicated VRAM The VRAM MM memory manager is a helper library that manages dedicated video memory of simple framebuffer devices. It is supported to be used with struct drm_gem_vram_object, but does not depend on it. The implementation is based on the respective code from ast, bochs, and mgag200. These drivers share the exact same implementation except for type names. The helpers are currently build with TTM. This may change in future revisions. v4: * cleanups from checkpatch.pl v2: * renamed to struct drm_vram_mm * add drm_vram_mm_mmap() helper * documentation fixes Signed-off-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20190508082630.15116-7-tzimmermann@suse.de Signed-off-by: Gerd Hoffmann Documentation/gpu/drm-mm.rst | 13 ++- drivers/gpu/drm/Makefile | 3 +- drivers/gpu/drm/drm_vram_mm_helper.c | 210 +++++++++++++++++++++++++++++++++++ include/drm/drm_vram_mm_helper.h | 69 ++++++++++++ 4 files changed, 293 insertions(+), 2 deletions(-) commit 1f460b497890d6bf54aba6e41fe24bba2217141a Author: Thomas Zimmermann Date: Wed May 8 10:26:15 2019 +0200 drm: Add simple PRIME helpers for GEM VRAM These basic helper functions for GEM VRAM allow for pinning and mapping GEM VRAM objects via the PRIME interfaces. It's not a full implementation, but complete enough for generic fbcon. Signed-off-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20190508082630.15116-6-tzimmermann@suse.de Signed-off-by: Gerd Hoffmann drivers/gpu/drm/drm_gem_vram_helper.c | 98 +++++++++++++++++++++++++++++++++++ include/drm/drm_gem_vram_helper.h | 20 +++++++ 2 files changed, 118 insertions(+) commit fed1eec080b9b23f5a80a0c4f19ae49a2d14c69e Author: Thomas Zimmermann Date: Wed May 8 10:26:14 2019 +0200 drm: Add drm_gem_vram_fill_create_dumb() to create dumb buffers The helper function drm_gem_vram_fill_create_dumb() implements most of struct drm_driver.dumb_create() for GEM-VRAM buffer objects. It's not a full implementation of the callback, as several driver-specific parameters are still required. v4: * cleanups from checkpatch.pl v2: * documentation fixes Signed-off-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20190508082630.15116-5-tzimmermann@suse.de Signed-off-by: Gerd Hoffmann drivers/gpu/drm/drm_gem_vram_helper.c | 62 +++++++++++++++++++++++++++++++++++ include/drm/drm_gem_vram_helper.h | 8 +++++ 2 files changed, 70 insertions(+) commit 737000fd9c7d32dd378733cc4bba17555b241be0 Author: Thomas Zimmermann Date: Wed May 8 10:26:13 2019 +0200 drm: Add |struct drm_gem_vram_object| callbacks for |struct drm_driver| The provided helpers can be used for the respective callback functions in |struct drm_driver|. v4: * cleanups from checkpatch.pl v2: * documentation fixes Signed-off-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20190508082630.15116-4-tzimmermann@suse.de Signed-off-by: Gerd Hoffmann drivers/gpu/drm/drm_gem_vram_helper.c | 49 +++++++++++++++++++++++++++++++++++ include/drm/drm_gem_vram_helper.h | 10 +++++++ 2 files changed, 59 insertions(+) commit 6c812bc5074bbc969e78fadfbba7ac41fe61ddeb Author: Thomas Zimmermann Date: Wed May 8 10:26:12 2019 +0200 drm: Add |struct drm_gem_vram_object| callbacks for |struct ttm_bo_driver| The provided helpers can be used for the respective callback functions in |struct ttm_bo_driver|. v2: * drm_is_gem_vram() is now a private function * documentation fixes Signed-off-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20190508082630.15116-3-tzimmermann@suse.de Signed-off-by: Gerd Hoffmann drivers/gpu/drm/drm_gem_vram_helper.c | 50 +++++++++++++++++++++++++++++++++++ include/drm/drm_gem_vram_helper.h | 10 +++++++ 2 files changed, 60 insertions(+) commit 85438a8ddf031f416758ecf8c080ff92075acb01 Author: Thomas Zimmermann Date: Wed May 8 10:26:11 2019 +0200 drm: Add |struct drm_gem_vram_object| and helpers The type |struct drm_gem_vram_object| implements a GEM object for simple framebuffer devices with dedicated video memory. The BO is either located in VRAM or system memory. The implementation has been created from the respective code in ast, bochs and mgag200. These drivers copy their implementation from each other; except for the names of several data types. The helpers are currently build with TTM, but this is considered an implementation detail and may change in future updates. v5: * do WARN_ON_ONCE for pin-count mismatches * allocate only 2 entries in placements array v4: * cleanups from checkpatch.pl * removed several fixed-size types from interfaces * DRM_VRAM_HELPER now selects DRM_TTM * remove separate config option for GEM VRAM v2: * rename to |struct drm_gem_vram_object| * move drm_is_gem_ttm() to a later patch in the series * add drm_gem_vram_kmap_at() * return is_iomem from kmap functions * redefine TTM placement flags for public interface * documentation fixes Signed-off-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20190508082630.15116-2-tzimmermann@suse.de Signed-off-by: Gerd Hoffmann Documentation/gpu/drm-mm.rst | 15 ++ drivers/gpu/drm/Kconfig | 7 + drivers/gpu/drm/Makefile | 4 + drivers/gpu/drm/drm_gem_vram_helper.c | 412 +++++++++++++++++++++++++++++++ drivers/gpu/drm/drm_vram_helper_common.c | 6 + include/drm/drm_gem_vram_helper.h | 92 +++++++ 6 files changed, 536 insertions(+) commit 80a316ff16276b36d0392a8f8b2f63259857ae98 Author: YueHaibing Date: Tue Apr 30 22:39:33 2019 +0800 9p/xen: Add cleanup path in p9_trans_xen_init If xenbus_register_frontend() fails in p9_trans_xen_init, we should call v9fs_unregister_trans() to do cleanup. Link: http://lkml.kernel.org/r/20190430143933.19368-1-yuehaibing@huawei.com Cc: stable@vger.kernel.org Fixes: 868eb122739a ("xen/9pfs: introduce Xen 9pfs transport driver") Signed-off-by: YueHaibing Signed-off-by: Dominique Martinet net/9p/trans_xen.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit d4548543fc4ece56c6f04b8586f435fb4fd84c20 Author: YueHaibing Date: Tue Apr 30 19:59:42 2019 +0800 9p/virtio: Add cleanup path in p9_virtio_init KASAN report this: BUG: unable to handle kernel paging request at ffffffffa0097000 PGD 3870067 P4D 3870067 PUD 3871063 PMD 2326e2067 PTE 0 Oops: 0000 [#1 CPU: 0 PID: 5340 Comm: modprobe Not tainted 5.1.0-rc7+ #25 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.9.3-0-ge2fc41e-prebuilt.qemu-project.org 04/01/2014 RIP: 0010:__list_add_valid+0x10/0x70 Code: c3 48 8b 06 55 48 89 e5 5d 48 39 07 0f 94 c0 0f b6 c0 c3 90 90 90 90 90 90 90 55 48 89 d0 48 8b 52 08 48 89 e5 48 39 f2 75 19 <48> 8b 32 48 39 f0 75 3a RSP: 0018:ffffc90000e23c68 EFLAGS: 00010246 RAX: ffffffffa00ad000 RBX: ffffffffa009d000 RCX: 0000000000000000 RDX: ffffffffa0097000 RSI: ffffffffa0097000 RDI: ffffffffa009d000 RBP: ffffc90000e23c68 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffffffffa0097000 R13: ffff888231797180 R14: 0000000000000000 R15: ffffc90000e23e78 FS: 00007fb215285540(0000) GS:ffff888237a00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffa0097000 CR3: 000000022f144000 CR4: 00000000000006f0 Call Trace: v9fs_register_trans+0x2f/0x60 [9pnet ? 0xffffffffa0087000 p9_virtio_init+0x25/0x1000 [9pnet_virtio do_one_initcall+0x6c/0x3cc ? kmem_cache_alloc_trace+0x248/0x3b0 do_init_module+0x5b/0x1f1 load_module+0x1db1/0x2690 ? m_show+0x1d0/0x1d0 __do_sys_finit_module+0xc5/0xd0 __x64_sys_finit_module+0x15/0x20 do_syscall_64+0x6b/0x1d0 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7fb214d8e839 Code: 00 f3 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 RSP: 002b:00007ffc96554278 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 RAX: ffffffffffffffda RBX: 000055e67eed2aa0 RCX: 00007fb214d8e839 RDX: 0000000000000000 RSI: 000055e67ce95c2e RDI: 0000000000000003 RBP: 000055e67ce95c2e R08: 0000000000000000 R09: 000055e67eed2aa0 R10: 0000000000000003 R11: 0000000000000246 R12: 0000000000000000 R13: 000055e67eeda500 R14: 0000000000040000 R15: 000055e67eed2aa0 Modules linked in: 9pnet_virtio(+) 9pnet gre rfkill vmw_vsock_virtio_transport_common vsock [last unloaded: 9pnet_virtio CR2: ffffffffa0097000 ---[ end trace 4a52bb13ff07b761 If register_virtio_driver() fails in p9_virtio_init, we should call v9fs_unregister_trans() to do cleanup. Link: http://lkml.kernel.org/r/20190430115942.41840-1-yuehaibing@huawei.com Cc: stable@vger.kernel.org Reported-by: Hulk Robot Fixes: b530cc794024 ("9p: add virtio transport") Signed-off-by: YueHaibing Signed-off-by: Dominique Martinet net/9p/trans_virtio.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 318dacbd049b447a5b45290b39f1c889b9cbde4d Author: Sowjanya Komatineni Date: Mon May 13 22:03:55 2019 -0700 spi: tegra114: add support for TX and RX trimmers Tegra SPI master controller has programmable trimmers to adjust the data with respect to the clock. These trimmers are programmed in TX_CLK_TAP_DELAY and RX_CLK_TAP_DELAY fields of COMMAND2 register. SPI TX trimmer is to adjust the outgoing data with respect to the outgoing clock and SPI RX trimmer is to adjust the loopback clock with respect to the incoming data from the slave device. These trimmers vary based on trace lengths of the platform design for each of the slaves on the SPI bus and optimal value programmed is from the platform validation across PVT. This patch adds support for configuring TX and RX clock delay trimmers through the device tree properties. Signed-off-by: Sowjanya Komatineni Signed-off-by: Mark Brown drivers/spi/spi-tegra114.c | 67 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 65 insertions(+), 2 deletions(-) commit 9b76ef39b7fbc2ddb0869725f9745a402d93cce5 Author: Sowjanya Komatineni Date: Mon May 13 22:03:54 2019 -0700 spi: tegra114: add support for HW CS timing This patch implements set_cs_timing SPI controller method to allow SPI client driver to configure device specific SPI CS timings. Signed-off-by: Sowjanya Komatineni Signed-off-by: Mark Brown drivers/spi/spi-tegra114.c | 48 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) commit 1bf9f3c9232d08651aa6990001e7b042c95303dc Author: Sowjanya Komatineni Date: Mon May 13 22:03:53 2019 -0700 spi: tegra114: add support for hw based cs Tegra SPI controller supports both HW and SW based CS control for SPI transfers. This patch adds support for HW based CS control where CS is driven to active state during the transfer and is driven inactive at the end of the transfer directly by the HW. This patch enables the use of HW based CS only for single transfers without cs_change request. Signed-off-by: Sowjanya Komatineni Signed-off-by: Mark Brown drivers/spi/spi-tegra114.c | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-) commit 63c1440596ff0a34efec491f41832c2c9ea01857 Author: Sowjanya Komatineni Date: Mon May 13 22:03:52 2019 -0700 spi: tegra114: add support for gpio based CS This patch adds support for GPIO based CS control through SPI core function spi_set_cs. Signed-off-by: Sowjanya Komatineni Signed-off-by: Mark Brown drivers/spi/spi-tegra114.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit c8de0d5ff978a581717a1576e676b68bdc86c996 Author: Noralf Trønnes Date: Mon May 6 20:01:32 2019 +0200 drm/fb-helper: Remove drm_fb_helper_crtc->{x, y, desired_mode} The values are already present in the modeset. This is done in preparation for the removal of struct drm_fb_helper_crtc. Signed-off-by: Noralf Trønnes Reviewed-by: Daniel Vetter Reviewed-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20190506180139.6913-5-noralf@tronnes.org drivers/gpu/drm/drm_fb_helper.c | 12 ++++-------- include/drm/drm_fb_helper.h | 2 -- 2 files changed, 4 insertions(+), 10 deletions(-) commit bc93475587850c097bfbc08f2ffa81171e0a1602 Author: Noralf Trønnes Date: Mon May 6 20:01:31 2019 +0200 drm/fb-helper: No need to cache rotation and sw_rotations Getting rotation info is cheap so we can do it on demand. This is done in preparation for the removal of struct drm_fb_helper_crtc. Cc: Hans de Goede Signed-off-by: Noralf Trønnes Acked-by: Daniel Vetter Reviewed-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20190506180139.6913-4-noralf@tronnes.org drivers/gpu/drm/drm_fb_helper.c | 131 ++++++++++++++++++++-------------------- include/drm/drm_fb_helper.h | 8 --- 2 files changed, 65 insertions(+), 74 deletions(-) commit 03a9606e7feef902979bbc0601d6d93e764f251d Author: Noralf Trønnes Date: Mon May 6 20:01:30 2019 +0200 drm/fb-helper: Avoid race with DRM userspace drm_fb_helper_is_bound() is used to check if DRM userspace is in control. This is done by looking at the fb on the primary plane. By the time fb-helper gets around to committing, it's possible that the facts have changed. Avoid this race by holding the drm_device->master_mutex lock while committing. When DRM userspace does its first open, it will now wait until fb-helper is done. The helper will stay away if there's a master. Two igt tests fail with the new 'bail out if master' rule. Work around this by relaxing this rule for drm_fb_helper_restore_fbdev_mode_unlocked() until the tests have been fixed. Add todo entry for this. Locking rule: Always take the fb-helper lock first. v5: drm_fb_helper_restore_fbdev_mode_unlocked(): Use restore_fbdev_mode_force() v2: - Remove drm_fb_helper_is_bound() (Daniel Vetter) - No need to check fb_helper->dev->master in drm_fb_helper_single_fb_probe(), restore_fbdev_mode() has the check. Suggested-by: Daniel Vetter Signed-off-by: Noralf Trønnes Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190506180139.6913-3-noralf@tronnes.org Documentation/gpu/todo.rst | 8 ++++ drivers/gpu/drm/drm_auth.c | 20 ++++++++ drivers/gpu/drm/drm_fb_helper.c | 102 ++++++++++++++++++++++------------------ drivers/gpu/drm/drm_internal.h | 2 + 4 files changed, 86 insertions(+), 46 deletions(-) commit 4e309bafeb778d74e5eb9e1df4ec60cc9e76d4f4 Author: Imre Deak Date: Thu May 9 20:34:46 2019 +0300 drm/i915: Assert that TypeC ports are not used for eDP Add an assert that we don't use TypeC ports for eDP. That may in theory be possible on TypeC legacy ports, but I'm not sure if that's a practical scenario, so let's deal with that only if there's a use case. Adding support for that wouldn't be too difficult, since TypeC mode switching is not possible on TypeC legacy ports. Cc: Ville Syrjala Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190509173446.31095-12-imre.deak@intel.com drivers/gpu/drm/i915/intel_dp.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit b4c7ea6354750bbece1650813ada28310e94c92e Author: Imre Deak Date: Thu May 9 20:34:45 2019 +0300 drm/i915: Avoid taking the PPS lock for non-eDP/VLV/CHV On ICL we have to make sure that we enable the AUX power domain in a controlled way (corresponding to the port's actual TypeC mode). Since the PPS lock - which takes an AUX power ref - is only needed on eDP on all platforms and eDP/DP on VLV/CHV avoid taking it in all other cases. v2: - Clarify commit log about the condition for taking the PPS lock. (Ville) Cc: Ville Syrjala Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190509173446.31095-11-imre.deak@intel.com drivers/gpu/drm/i915/intel_dp.c | 4 ++++ 1 file changed, 4 insertions(+) commit 08d8e17005a34f773f55005a153edc28fc5ab5e3 Author: Imre Deak Date: Thu May 9 20:34:44 2019 +0300 drm/i915: Replace use of PLLS power domain with DISPLAY_CORE domain There isn't a separate power domain specific to PLLs. When programming them we require the same power domain to be enabled which is needed when accessing other display core parts (not specific to any pipe/port/transcoder). This corresponds to the DISPLAY_CORE domain added previously in this patchset, so use that instead to save bits in the power domain mask. Cc: Ville Syrjala Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190509173446.31095-10-imre.deak@intel.com drivers/gpu/drm/i915/intel_display.c | 2 +- drivers/gpu/drm/i915/intel_display.h | 1 - drivers/gpu/drm/i915/intel_dpll_mgr.c | 36 ++++++++++++++++----------------- drivers/gpu/drm/i915/intel_runtime_pm.c | 2 -- 4 files changed, 19 insertions(+), 22 deletions(-) commit 6f08ebe779a3e5bec8ee3a14b9c15329a59221b1 Author: Imre Deak Date: Thu May 9 20:34:43 2019 +0300 drm/i915: Remove the unneeded AUX power ref from intel_dp_hpd_pulse() The power get/put was added in commit 1c767b339b39 ("drm/i915: take display port power domain in DP HPD handler") Author: Imre Deak Date: Mon Aug 18 14:42:42 2014 +0300 to account for the HW access in ibx_digital_port_connected(). This latter call was in turn removed in commit 7d23e3c37bb3 ("drm/i915: Cleaning up intel_dp_hpd_pulse") Author: Shubhangi Shrivastava Date: Wed Mar 30 18:05:23 2016 +0530 after which we didn't actually need the power reference. One way we are accessing the HW during HPD pulse handling is via DP AUX transfers, but the transfer function takes its own reference, so doesn't need the reference in intel_dp_hpd_pulse(). The other spot is in intel_psr_short_pulse()->intel_psr_disable_locked() but that can only happen when the panel is enabled with the corresponding modeset already holding the required power reference. v2: - Remove the unneeded power get/put from intel_psr_disable_locked(). (Ville) - Checkpatch commit quoting format fix in the commit log. Cc: Ville Syrjala Cc: Rodrigo Vivi Cc: José Roberto de Souza Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190509173446.31095-9-imre.deak@intel.com drivers/gpu/drm/i915/intel_dp.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) commit 6cfe7ec02e854278fb341e62db54d49a2b199c62 Author: Imre Deak Date: Thu May 9 20:34:42 2019 +0300 drm/i915: Remove the unneeded AUX power ref from intel_dp_detect() We don't need the AUX power for the whole duration of the detect, only when we're doing AUX transfers. The AUX transfer function takes its own reference on the AUX power domain already. The two places during detect which access display core registers (not specific to a pipe/port/transcoder) only need the power domain that is required for that access. That power domain is equivalent to the device global power domain on most platforms (enabled whenever we hold a runtime PM reference) except on CHV/VLV where it's equivalent to the display power well. Add a new power domain that reflects the above, and use this at the two spots accessing registers. With that we can avoid taking the AUX reference for the whole duration of the detect function. Put the domains asynchronously to avoid the unneeded on-off-on toggling. Also adapt the idea from with_intel_runtime_pm et al. for making it easy to write short sequences where a display power ref is needed. v2: (Ville) - Add with_intel_display_power() helper to simplify things. - s/bool res/bool is_connected/ Cc: Ville Syrjala Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190509173446.31095-8-imre.deak@intel.com drivers/gpu/drm/i915/intel_display.h | 1 + drivers/gpu/drm/i915/intel_dp.c | 32 +++++++++++++++++++------------- drivers/gpu/drm/i915/intel_runtime_pm.c | 4 ++++ drivers/gpu/drm/i915/intel_runtime_pm.h | 5 +++++ 4 files changed, 29 insertions(+), 13 deletions(-) commit ad5125d6ef2de22212de82debd0baaecdaa7e7cd Author: Imre Deak Date: Thu May 9 20:34:41 2019 +0300 drm/i915: WARN for eDP encoders in intel_dp_detect_dpcd() We are not calling this function for eDP, so add an early assert about this for clarity. Cc: Ville Syrjälä Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190509173446.31095-7-imre.deak@intel.com drivers/gpu/drm/i915/intel_dp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f39194a7a8b903923c83f563cbe5a651fd00dd93 Author: Imre Deak Date: Thu May 9 20:34:40 2019 +0300 drm/i915: Disable power asynchronously during DP AUX transfers In a follow-up patch we will restrict holding the reference on the AUX power domain to the AUX transfer function. To avoid the unnecessary on-off-on power togglings drop the reference asynchronously. There is no reason we couldn't do this in general and also put the reference asynchronously in pps_unlock(); but that's a separate change that can be done as a follow-up. Cc: Ville Syrjala Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190509173446.31095-6-imre.deak@intel.com drivers/gpu/drm/i915/intel_dp.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit e0da2d63ab3ac746d61b8861085fd3abbef011c6 Author: Imre Deak Date: Mon May 13 22:25:33 2019 +0300 drm/i915: Add support for asynchronous display power disabling By disabling a power domain asynchronously we can restrict holding a reference on that power domain to the actual code sequence that requires the power to be on for the HW access it's doing, by also avoiding unneeded on-off-on togglings of the power domain (since the disabling happens with a delay). One benefit is potential power saving due to the following two reasons: 1. The fact that we will now be holding the reference only for the necessary duration by the end of the patchset. While simply not delaying the disabling has the same benefit, it has the problem that frequent on-off-on power switching has its own power cost (see the 2. point below) and the debug trace for power well on/off events will cause a lot of dmesg spam (see details about this further below). 2. Avoiding the power cost of freuqent on-off-on power switching. This requires us to find the optimal disabling delay based on the measured power cost of on->off and off->on switching of each power well vs. the power of keeping the given power well on. In this patchset I'm not providing this optimal delay for two reasons: a) I don't have the means yet to perform the measurement (with high enough signal-to-noise ratio, or with the help of an energy counter that takes switching into account). I'm currently looking for a way to measure this. b) Before reducing the disabling delay we need an alternative way for debug tracing powerwell on/off events. Simply avoiding/throttling the debug messages is not a solution, see further below. Note that even in the case where we can't measure any considerable power cost of frequent on-off switching of powerwells, it still would make sense to do the disabling asynchronously (with 0 delay) to avoid blocking on the disabling. On VLV I measured this disabling time overhead to be 1ms on average with a worst case of 4ms. In the case of the AUX power domains on ICL we would also need to keep the sequence where we hold the power reference short, the way it would be by the end of this patchset where we hold it only for the actual AUX transfer. Anything else would make the locking we need for ICL TypeC ports (whenever we hold a reference on any AUX power domain) rather problematic, adding for instance unnecessary lockdep dependencies to the required TypeC port lock. I chose the disabling delay to be 100msec for now to avoid the unneeded toggling (and so not to introduce dmesg spamming) in the DP MST sideband signaling code. We could optimize this delay later, once we have the means to measure the switching power cost (see above). Note that simply removing/throttling the debug tracing for power well on/off events is not a solution. We need to know the exact spots of these events and cannot rely only on incorrect register accesses caught (due to not holding a wakeref at the time of access). Incorrect powerwell enabling/disabling could lead to other problems, for instance we need to keep certain powerwells enabled for the duration of modesets and AUX transfers. v2: - Clarify the commit log parts about power cost measurement and the problem of simply removing/throttling debug tracing. (Chris) - Optimize out local wakeref vars at intel_runtime_pm_put_raw() and intel_display_power_put_async() call sites if CONFIG_DRM_I915_DEBUG_RUNTIME_PM=n. (Chris) - Rebased on v2 of the wakeref w/o power-on guarantee patch. - Add missing docbook headers. v3: - Checkpatch spelling/missing-empty-line fix. v4: - Fix unintended local wakeref var optimization when using call-arguments with side-effects, by using inline funcs instead of macros. In this patch in particular this will fix the intel_display_power_grab_async_put_ref()->intel_runtime_pm_put_raw() call). No size change in practice (would be the same disregarding the corresponding change in intel_display_power_grab_async_put_ref()): $ size i915-macro.ko text data bss dec hex filename 2455190 105890 10272 2571352 273c58 i915-macro.ko $ size i915-inline.ko text data bss dec hex filename 2455195 105890 10272 2571357 273c5d i915-inline.ko Kudos to Stan for reporting the raw-wakeref WARNs this issue caused. His config has CONFIG_DRM_I915_DEBUG_RUNTIME_PM=n, which I didn't retest after v1, and we are also not testing this config in CI. Now tested both with CONFIG_DRM_I915_DEBUG_RUNTIME_PM=y/n on ICL, connecting both Chamelium and regular DP, HDMI sinks. Cc: Chris Wilson Cc: Ville Syrjala Cc: Stanislav Lisovskiy Signed-off-by: Imre Deak Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190513192533.12586-1-imre.deak@intel.com drivers/gpu/drm/i915/i915_drv.h | 5 + drivers/gpu/drm/i915/intel_runtime_pm.c | 366 +++++++++++++++++++++++++++++++- drivers/gpu/drm/i915/intel_runtime_pm.h | 34 ++- 3 files changed, 395 insertions(+), 10 deletions(-) commit ee70080a52f19251a58212925dfaf6c9b0a07316 Author: Imre Deak Date: Thu May 9 20:34:38 2019 +0300 drm/i915: Verify power domains state during suspend in all cases There is no reason why we couldn't verify the power domains state during suspend in all cases, so do that. I overlooked this when originally adding the check. Cc: Chris Wilson Signed-off-by: Imre Deak Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190509173446.31095-4-imre.deak@intel.com drivers/gpu/drm/i915/intel_runtime_pm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit dbf99c1f8c7ec32ece0584497832a53a7acc4936 Author: Imre Deak Date: Thu May 9 20:34:37 2019 +0300 drm/i915: Force printing wakeref tacking during pm_cleanup Make sure we print and drop the wakeref tracking info during pm_cleanup even if there are wakeref holders (either raw-wakeref or wakelock holders). Dropping the wakeref tracking means that a late put on the ref will WARN since the wakeref will be unknown, but that is rightly so, since the put is late and we want to catch that case. Cc: Chris Wilson Signed-off-by: Imre Deak Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190509173446.31095-3-imre.deak@intel.com drivers/gpu/drm/i915/intel_runtime_pm.c | 69 ++++++++++++++++++++++++--------- 1 file changed, 51 insertions(+), 18 deletions(-) commit 4547c255f4420e20c6cda2ee4172ae68b323e695 Author: Imre Deak Date: Thu May 9 20:34:36 2019 +0300 drm/i915: Add support for tracking wakerefs w/o power-on guarantee It's useful to track runtime PM refs that don't guarantee a device power-on state to the rest of the driver. One such case is holding a reference that will be put asynchronously, during which normal users without their own reference shouldn't access the HW. A follow-up patch will add support for disabling display power domains asynchronously which needs this. For this we can split wakeref_count into a low half-word tracking all references (raw-wakerefs) and a high half-word tracking references guaranteeing a power-on state (wakelocks). Follow-up patches will make use of the API added here. While at it add the missing docbook header for the unchecked display-power and runtime_pm put functions. No functional changes, except for printing leaked raw-wakerefs and wakelocks separately in intel_runtime_pm_cleanup(). v2: - Track raw wakerefs/wakelocks in the low/high half-word of wakeref_count, instead of adding a new counter. (Chris) v3: - Add a struct_member(T, m) helper instead of open-coding it. (Chris) - Checkpatch indentation formatting fix. Cc: Chris Wilson Signed-off-by: Imre Deak Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190509173446.31095-2-imre.deak@intel.com drivers/gpu/drm/i915/i915_utils.h | 4 +- drivers/gpu/drm/i915/intel_drv.h | 52 ++++++++++-- drivers/gpu/drm/i915/intel_runtime_pm.c | 142 ++++++++++++++++++++++++-------- 3 files changed, 159 insertions(+), 39 deletions(-) commit 1aa3750885fbcece5a0c9e6bbcd014ac526cea41 Author: Imre Deak Date: Fri May 10 17:02:55 2019 +0300 drm/i915/icl: More workaround for port F detection due to broken VBTs Add another ICL-Y PCIID that proved to have only 5 ports to the corresponding PCIID list. Meanwhile I'm trying to get a complete list of all PCIIDs with less than 6 ports and/or get a VBT fix to mark these ports non-existent, but until then the only way is to go one-by-one. This fixes the following error on machines with less than 6 port: [drm:intel_power_well_enable [i915]] enabling AUX F ------------[ cut here ]------------ WARN_ON(intel_wait_for_register(&dev_priv->uncore, regs->driver, (0x1 << ((pw_idx) * 2)), (0x1 << ((pw_idx) * 2)), 1)) (Internal reference: BSpec/Index/20584/Issues, HSD/1306084116) Cc: Mika Kahola References: https://bugs.freedesktop.org/show_bug.cgi?id=108915 Signed-off-by: Imre Deak Reviewed-by: Mika Kahola Tested-by: Mika Kahola Link: https://patchwork.freedesktop.org/patch/msgid/20190510140255.25215-1-imre.deak@intel.com include/drm/i915_pciids.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e3c54da0fe8654e7eb2ffd89d798288f83b46663 Author: Vandita Kulkarni Date: Thu May 2 20:41:02 2019 +0530 drm/i915: Fix pixel clock and crtc clock config mismatch In case of dual link mode, the mode clock that we get from the VBT is halved. v2: Simplify the calculation (Jani). Signed-off-by: Vandita Kulkarni Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1556809862-31203-4-git-send-email-vandita.kulkarni@intel.com drivers/gpu/drm/i915/icl_dsi.c | 4 ++++ 1 file changed, 4 insertions(+) commit 30bd7efdf678e92bee335d301d9d18e3f0209d3b Author: Vandita Kulkarni Date: Thu May 2 20:41:01 2019 +0530 drm/i915: Fix pipe config mismatch for bpp, output format Read back the pixel fomrat register and get the bpp. v2: Read the PIPE_MISC register (Jani). Signed-off-by: Vandita Kulkarni Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1556809862-31203-3-git-send-email-vandita.kulkarni@intel.com drivers/gpu/drm/i915/icl_dsi.c | 3 +++ 1 file changed, 3 insertions(+) commit 8ae897435f0ad3bd0abe8c443d53a4c50d093550 Author: Vandita Kulkarni Date: Thu May 2 20:41:00 2019 +0530 drm/i915: Refactor bdw_get_pipemisc_bpp Move bdw_get_pipemisc_bpp alongside bdw_set_pipemisc Signed-off-by: Vandita Kulkarni Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1556809862-31203-2-git-send-email-vandita.kulkarni@intel.com drivers/gpu/drm/i915/intel_display.c | 22 ++++++++++++++++++++++ drivers/gpu/drm/i915/intel_drv.h | 1 + drivers/gpu/drm/i915/vlv_dsi.c | 22 ---------------------- 3 files changed, 23 insertions(+), 22 deletions(-) commit 3c23ed13112cbce6a31b30224582169c81f1c91a Author: Vandita Kulkarni Date: Thu May 2 20:40:59 2019 +0530 drm/i915: Fix the pipe state timing mismatch warnings Adjust the get transcoder timings for mipi dsi as per the set timing calculations. v2: Use the existing intel_get_pipe_timings and do the dsi specific adjustments in the encoder get_config hook.(Ville, Jani) v3: Exclude VBLANK and HBLANK registers for dsi transcoder. v4: Fix the incomplete conditional logic. Signed-off-by: Vandita Kulkarni Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1556809862-31203-1-git-send-email-vandita.kulkarni@intel.com drivers/gpu/drm/i915/icl_dsi.c | 28 ++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_display.c | 22 ++++++++++++++++------ 2 files changed, 44 insertions(+), 6 deletions(-) commit cdd075960215e057f29f4f758be661e2223ba0f6 Author: Ramalingam C Date: Mon May 13 19:05:04 2019 +0530 drm/hdcp: drm_hdcp_request_srm() as static Below Sparsh warnings are fixed. Commit: drm: revocation check at drm subsystem +drivers/gpu/drm/drm_hdcp.c:235:6: warning: symbol 'drm_hdcp_request_srm' was not declared. Should it be static? +drivers/gpu/drm/drm_hdcp.c:27:3: warning: symbol 'srm_data' was not declared. Should it be static? +drivers/gpu/drm/drm_hdcp.c:317:5: warning: symbol 'drm_setup_hdcp_srm' was not declared. Should it be static? +drivers/gpu/drm/drm_hdcp.c:327:6: warning: symbol 'drm_teardown_hdcp_srm' was not declared. Should it be static? cc: Daniel Vetter Reported-by: kbuild test robot Signed-off-by: Ramalingam C Acked-by: Dave Airlie Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190513133504.18612-1-ramalingam.c@intel.com drivers/gpu/drm/drm_hdcp.c | 6 ++++-- drivers/gpu/drm/drm_internal.h | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) commit 460696ed4c07e00306bdd01fcbf5dc85a9b770f1 Author: Omer Shpigelman Date: Mon May 13 20:48:18 2019 +0300 habanalabs: print event name for fatal and non-RAZWI events This patch improves the error reporting in case of fatal and non-RAZWI events such that the event name is printed in addition to the IRQ number. Signed-off-by: Omer Shpigelman Signed-off-by: Oded Gabbay drivers/misc/habanalabs/goya/goya.c | 117 ++++++++++++++++++++++++++++++------ 1 file changed, 98 insertions(+), 19 deletions(-) commit 190980187e2b66397da6eaec1d25b3e3272c2361 Author: Chris Wilson Date: Mon May 13 13:01:02 2019 +0100 drm/i915: Check for no-op priority changes first In all likelihood, the priority and node are already in the CPU cache and by checking them first, we can avoid having to chase the *request->hwsp for the current breadcrumb. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190513120102.29660-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_scheduler.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 52c76fb18a34fc08dd06f32b9fc83f1375f083ee Author: Chris Wilson Date: Mon May 13 13:01:01 2019 +0100 drm/i915: Pass i915_sched_node around internally To simplify the next patch, update bump_priority and schedule to accept the internal i915_sched_ndoe directly and not expect a request pointer. add/remove: 0/0 grow/shrink: 2/1 up/down: 8/-15 (-7) Function old new delta i915_schedule_bump_priority 109 113 +4 i915_schedule 50 54 +4 __i915_schedule 922 907 -15 v2: Adopt node for the old rq local, since it no longer is a request but the origin node. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190513120102.29660-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_scheduler.c | 36 ++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) commit 5ae87063c162679a61f2141041d0918cc3045daf Author: Chris Wilson Date: Mon May 13 13:01:00 2019 +0100 drm/i915: Rearrange i915_scheduler.c To avoid pulling in a forward declaration in the next patch, move the i915_sched_node handling to after the main dfs of the scheduler. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190513120102.29660-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_scheduler.c | 210 +++++++++++++++++----------------- 1 file changed, 105 insertions(+), 105 deletions(-) commit 3393f7d924510cfdb2ff9594eac2590d5de16d92 Author: Nicolas Saenz Julienne Date: Thu May 9 16:39:59 2019 +0200 spi: bcm2835: only split transfers that exceed DLEN if DMA available There is no use for this when performing non DMA operations. So we bypass the split. Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Mark Brown drivers/spi/spi-bcm2835.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit 35ceb6759d1b6a0e085fa46d44867d3bc6fb4d59 Author: Florian Fainelli Date: Thu May 9 13:36:00 2019 -0700 spi: Allow selecting BCM2835 SPI controllers on ARCH_BRCMSTB ARCH_BRCMSTB platforms have the BCM2835 SPI controllers (normal and auxiliary), allow selecting the two drivers on such platforms. Signed-off-by: Florian Fainelli Reviewed-by: Eric Anholt Signed-off-by: Mark Brown drivers/spi/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bfada2080b6439e997bfeae43ed73a3e41c351fd Author: Hoan Nguyen An Date: Fri May 10 17:42:18 2019 +0900 spi: bcm2835: Remove spi_alloc_master() error printing Printing an error on memory allocation failure is unnecessary, as the memory allocation core code already takes care of that. Signed-off-by: Hoan Nguyen An Reviewed-by: Geert Uytterhoeven Reviewed-by: Martin Sperl Signed-off-by: Mark Brown drivers/spi/spi-bcm2835.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit bf93b9512645d2b2f42740ba4918b55d7b5f40a7 Author: Hoan Nguyen An Date: Fri May 10 18:21:00 2019 +0900 spi: bcm2835aux: Remove spi_alloc_master() error printing Printing an error on memory allocation failure is unnecessary, as the memory allocation core code already takes care of that. Signed-off-by: Hoan Nguyen An Reviewed-by: Geert Uytterhoeven Reviewed-by: Martin Sperl Signed-off-by: Mark Brown drivers/spi/spi-bcm2835aux.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 5d7e2b5ed5858fe739d4cb8ad22dcce7bd9dbe7b Author: Martin Sperl Date: Sat Feb 23 08:49:49 2019 +0000 spi: core: allow reporting the effectivly used speed_hz for a transfer Provide a means for the spi bus driver to report the effectively used spi clock frequency used for each spi_transfer. Signed-off-by: Martin Sperl Signed-off-by: Mark Brown drivers/spi/spi.c | 1 + include/linux/spi/spi.h | 5 +++++ 2 files changed, 6 insertions(+) commit eb1ecadb7f67dde94ef0efd3ddaed5cb6c9a65ed Author: Jerome Brunet Date: Mon May 13 10:18:47 2019 +0200 ASoC: hdmi-codec: re-introduce mutex locking Replace the bit atomic operations by a mutex to ensure only one dai at a time is active on the hdmi codec. This is a follow up on change: 3fcf94ef4d41 ("ASoC: hdmi-codec: remove reference to the current substream") Suggested-by: Mark Brown Signed-off-by: Jerome Brunet Signed-off-by: Mark Brown sound/soc/codecs/hdmi-codec.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit e7ecfdb794fef1f6c91f62a40fd6aa3d4d8d2471 Author: Kuninori Morimoto Date: Mon May 13 16:08:33 2019 +0900 ASoC: soc-pcm: add soc_pcm_components_open() soc-pcm.c has soc_pcm_components_close() but not have its open() side function. This kind of unbalance function is very unreadable. And, current error handling is not correct. Because it is using for_each_rtdcom() loop, we need to call soc_pcm_components_close() anyway even though CPU DAI .startup() failed. This patch adds soc_pcm_components_open(), and fixup error handling issue. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/soc-pcm.c | 63 ++++++++++++++++++++++++++++++++++------------------- 1 file changed, 40 insertions(+), 23 deletions(-) commit 2371abdc08e491f6f540c3971bdfa8c90f3329fb Author: Kuninori Morimoto Date: Mon May 13 16:07:52 2019 +0900 ASoC: soc-pcm: add missing cpu_dai->rate = 0 Codec side is setting codec_dai->rate = 0 when error case at soc_pcm_hw_params(), but there is not such setting for CPU side. This patch adds it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/soc-pcm.c | 1 + 1 file changed, 1 insertion(+) commit ca58221d2212aff4f41d05b99b1e2ed288b24ccc Author: Kuninori Morimoto Date: Mon May 13 16:07:43 2019 +0900 ASoC: soc-pcm: do cpu_dai related operation at same place cpu_dai related operation is separated by component operation at soc_pcm_hw_params() somehow. It is not readable, let's do it at same place Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/soc-pcm.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 7426af5010d1b4a109e5d7ee639f3c3e0e5b3cdd Author: Kuninori Morimoto Date: Mon May 13 16:07:27 2019 +0900 ASoC: soc.h: fe_compr can be bit field fe_compr is used at soc-compress, it can be bit field. This patch move it from int to bit field. > grep fe_compr -r sound/soc/* sound/soc/soc-compress.c: rtd->fe_compr = 1; sound/soc/soc-pcm.c: if (!fe->dpcm[stream].runtime && !fe->fe_compr) Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/soc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 09d4cc03ff77790872b8b9e51b6d7b5863686fc5 Author: Kuninori Morimoto Date: Mon May 13 16:07:20 2019 +0900 ASoC: soc-core: use soc_find_component() at snd_soc_get_dai_id() soc-core core already has soc_find_component() which find component from device node. Let's use existing function to find component. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/soc-core.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) commit a1e537b3f045fefde198e4217e9730f69de4f06d Author: Omer Shpigelman Date: Mon May 13 14:44:50 2019 +0300 habanalabs: increase PCI ELBI timeout for Palladium This patch increases the timeout for PCI ELBI configuration to support low frequency Palladium images. Signed-off-by: Omer Shpigelman Signed-off-by: Oded Gabbay drivers/misc/habanalabs/habanalabs.h | 2 ++ drivers/misc/habanalabs/pci.c | 10 +++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) commit c083444061ada428af71809cc12fd8f06dd2be19 Author: Kuninori Morimoto Date: Mon May 13 16:06:59 2019 +0900 ASoC: soc-core: add soc_component_to_node() Many function are getting device_node from component with caring its parent component. This patch adds new soc_component_to_node() and share same code. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/soc-core.c | 39 ++++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 21 deletions(-) commit e2b30edfb9435879dc68cdb7ce20299492012101 Author: Kuninori Morimoto Date: Mon May 13 16:06:44 2019 +0900 ASoC: soc-core: tidyup soc_bind_dai_link() comment balance Many code at soc_bind_dai_link() was changed, and its comment is now a little bit anbalanced. This patch tidyup these. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/soc-core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 0a2cfcd998e3503c20be497cadb0ef23edb984be Author: Kuninori Morimoto Date: Mon May 13 16:06:30 2019 +0900 ASoC: soc-core: don't use codec_dais on soc_bind_dai_link() Current soc_bind_dai_link() is substituting rtd->codec_dais to codec_dais, and sets found DAI into it. But, it is a little bit un-readable / un-understandable to know detail of rtd, and it will make difficult to understand rtd->cpu_dais if Multi CPU was supported. This patch cleanup it and prepare for Multi CPU support. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/soc-core.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 22d251a5964780452aed378a143816fbf2d4201d Author: Kuninori Morimoto Date: Mon May 13 16:06:07 2019 +0900 ASoC: soc-core: use i on snd_soc_resume() This patch uses "int i" instead of "int j" on snd_soc_resume(), and moves struct snd_soc_dai *codec_dai to top of this function. This is cleanup and prepare for Multi CPU support Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/soc-core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit bcd9382288af236321c83d27b0db196bf8814559 Author: Tzung-Bi Shih Date: Thu May 9 11:04:54 2019 +0800 ASoC: max98357a: request GPIO when device get probed devm_gpiod_get_optional() returns EBUSY after component rebound. Request GPIO in max98357a_platform_probe() to support component rebinding. Signed-off-by: Tzung-Bi Shih Signed-off-by: Mark Brown sound/soc/codecs/max98357a.c | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) commit 630be964b5d8d37d3dff9fc5c8af8a516aa94af0 Author: Zhu Yingjiang Date: Thu May 9 15:10:27 2019 -0500 ASoC: SOF: Intel: ICL add Icelake chip info struct Icelake has different count of SSP other than CNL, using the new defined ICL SSP count, and copy other parameters from CNL chip info. Signed-off-by: Zhu Yingjiang Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/sof/intel/cnl.c | 19 +++++++++++++++++++ sound/soc/sof/intel/hda.h | 1 + sound/soc/sof/sof-pci-dev.c | 2 +- 3 files changed, 21 insertions(+), 1 deletion(-) commit ec836daafcdf371882f08cc05c522662409e90ae Author: Zhu Yingjiang Date: Thu May 9 15:10:26 2019 -0500 ASoC: SOF: Intel: ICL: add Icelake SSP count On Icelake we have 6 SSP ports, add ICL SSP count to enable all SSPs, instead of using the SSP count defined for CNL. Signed-off-by: Zhu Yingjiang Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/sof/intel/hda.h | 1 + 1 file changed, 1 insertion(+) commit 14a2212dd4bcb55a03eddaf66d62068c9cece585 Author: Ranjani Sridharan Date: Thu May 9 15:10:24 2019 -0500 ASoC: SOF: pcm: remove runtime PM calls during pcm open/close pm_runtime_get_sync()/pm_runtime_put_autosuspend() calls are already invoked by the ASoC core in soc_pcm_open() and soc_pcm_close(). So the SOF component driver does not need to call them again. Signed-off-by: Ranjani Sridharan Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/sof/pcm.c | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) commit 5160217ba66c8eafc7479fa3439f3dc1f126d08a Author: Jaska Uimonen Date: Thu May 9 15:10:22 2019 -0500 ASoC: SOF: uapi: remove unused sof header files These header files are not used by kernel but internally by SOF firmware and possibly by user space applications. If needed, they should be included from include dir exported by SOF. Signed-off-by: Jaska Uimonen Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown include/uapi/sound/sof/eq.h | 172 ---------------------------------- include/uapi/sound/sof/manifest.h | 188 -------------------------------------- include/uapi/sound/sof/tone.h | 21 ----- include/uapi/sound/sof/trace.h | 66 ------------- 4 files changed, 447 deletions(-) commit 5f740b243014f54e503ea5aca0a90680b56d0134 Author: Evan Green Date: Fri May 10 15:39:29 2019 -0700 ASoC: Intel: Skylake: Add Cometlake PCI IDs Add PCI IDs for Intel CometLake platforms, which from a software point of view are extremely similar to Cannonlake platforms. Signed-off-by: Evan Green Signed-off-by: Mark Brown sound/soc/intel/Kconfig | 16 ++++++++++++++++ sound/soc/intel/skylake/skl-messages.c | 16 ++++++++++++++++ sound/soc/intel/skylake/skl.c | 10 ++++++++++ 3 files changed, 42 insertions(+) commit 927ce5c76e485e9d6e98b6ca29199a593d013793 Author: Evan Green Date: Fri May 10 15:39:28 2019 -0700 ASoC: SOF: Add Comet Lake PCI IDs Add support for Intel Comet Lake platforms by adding a new Kconfig for CometLake and the appropriate PCI IDs. Signed-off-by: Evan Green Signed-off-by: Mark Brown sound/soc/sof/intel/Kconfig | 32 ++++++++++++++++++++++++++++++++ sound/soc/sof/sof-pci-dev.c | 28 ++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) commit 35a7086eaa057a5ef6eef77af957e46c040be48b Author: Ravulapati Vishnu vardhan rao Date: Fri May 10 07:11:07 2019 +0530 ASoC: amd: Reporting accurate hw_ptr for acp3x dma acp3x dma pointer callback has issues in reporting hw_ptr. Modified logic to use linear position registers to retrieve accurate hw_ptr. Signed-off-by: Ravulapati Vishnu vardhan rao Signed-off-by: Vijendar Mukunda Signed-off-by: Mark Brown sound/soc/amd/raven/acp3x-pcm-dma.c | 43 ++++++++++++++++++++++++++----------- 1 file changed, 31 insertions(+), 12 deletions(-) commit 977bfde5d4cbb9d2eb1969eb2eb671cdb9b9fcbf Author: Eric Jeong Date: Thu Apr 18 15:09:44 2019 +0900 dt-bindings: regulator: add document bindings for slg51000 Add device tree binding information for slg51000 regulator driver. Example bindings for SLG51000 are added. Signed-off-by: Eric Jeong Signed-off-by: Mark Brown .../devicetree/bindings/regulator/slg51000.txt | 88 ++++++++++++++++++++++ 1 file changed, 88 insertions(+) commit a867bde3dd037ea5e9f1c5268d22d4bc4fa399b9 Author: Eric Jeong Date: Thu Apr 18 15:09:44 2019 +0900 regulator: slg51000: add slg51000 regulator driver Adding regulator driver for the device Dialog SLG51000. The SLG51000 device contains seven compact and customizable low dropout regulators and is designed for high performance camera modules and other small multi-rail applications. Signed-off-by: Eric Jeong Signed-off-by: Mark Brown drivers/regulator/Kconfig | 9 + drivers/regulator/Makefile | 1 + drivers/regulator/slg51000-regulator.c | 528 +++++++++++++++++++++++++++++++++ drivers/regulator/slg51000-regulator.h | 505 +++++++++++++++++++++++++++++++ 4 files changed, 1043 insertions(+) commit 249825cc48ebe7d036a1200f6e5ad3d4dc1d2e25 Author: Eric Jeong Date: Thu Apr 18 15:09:43 2019 +0900 MAINTAINERS: slg51000 updates to the Dialog Semiconductor search terms This patch adds the slg51000 bindings doc and driver to the Dialog Semiconductor support list. Signed-off-by: Eric Jeong Signed-off-by: Mark Brown MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) commit 921a465ba7bcdf09b94533d5fc426581931ce377 Author: Oded Gabbay Date: Sun May 12 16:53:16 2019 +0300 habanalabs: pass device pointer to asic-specific function This patch adds a new parameter that is passed to the add_end_of_cb_packets() asic-specific function. The parameter is the pointer to the driver's device structure. The function needs this pointer for future ASICs. Signed-off-by: Oded Gabbay drivers/misc/habanalabs/goya/goya.c | 4 ++-- drivers/misc/habanalabs/goya/goyaP.h | 4 ++-- drivers/misc/habanalabs/habanalabs.h | 5 +++-- drivers/misc/habanalabs/hw_queue.c | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) commit e727d4cbc785e9c1b4d239eef274dc63bc1aff24 Merge: 47300728fb21 e6f3f7e4dc76 Author: Mark Brown Date: Sun May 12 12:08:03 2019 +0900 Merge tag 'spi-bpw-is-supported' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi into spi-5.3 spi: Add spi_is_bpw_supported() Lets client drivers check and potentially handle issues. commit a2d2010d95cd7ffe3773aba6eaee35d54e332c25 Author: Ruslan Babayev Date: Sun May 5 12:24:36 2019 -0700 iio: dac: ds4422/ds4424 drop of_node check The driver doesn't actually rely on any DT properties. Removing this check makes it usable on ACPI based platforms. Signed-off-by: Ruslan Babayev Cc: xe-linux-external@cisco.com Signed-off-by: Jonathan Cameron drivers/iio/dac/ds4424.c | 6 ------ 1 file changed, 6 deletions(-) commit ed1f310ee23d277d5386f532165911df69afe62f Author: Philippe Schenker Date: Tue May 7 16:36:15 2019 +0200 iio: stmpe-adc: Reset possible interrupts Clear any interrupt that still is on the device on every channel this driver is activated for in probe and specific channels in the timeout handler. Signed-off-by: Philippe Schenker Signed-off-by: Jonathan Cameron drivers/iio/adc/stmpe-adc.c | 5 +++++ 1 file changed, 5 insertions(+) commit e813dde6f83343012239a44e433eacc22de1079c Author: Philippe Schenker Date: Tue May 7 16:36:14 2019 +0200 iio: stmpe-adc: Use wait_for_completion_timeout Use wait_for_completion_timeout instead of wait_for_completion_interuptible_timeout. The interruptible variant gets constantly interrupted if a user program is compiled with the -pg option. The killable variant was not used due to the fact that a second program, reading on this device, that gets killed is then also killing that wait. Signed-off-by: Philippe Schenker Signed-off-by: Jonathan Cameron drivers/iio/adc/stmpe-adc.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit 4bd44bb2b470459d795c4bac328ed8edb7ebd132 Author: Philippe Schenker Date: Tue May 7 16:36:13 2019 +0200 iio: stmpe-adc: Enable all stmpe-adc interrupts just once This commit will enable the interrupts of all channels handled by this driver only once in the probe function. This will improve performance because one byte less has to be written over i2c on each read out of the adc. On the fastest ADC mode this will improve read out speed by 15%. Signed-off-by: Philippe Schenker Signed-off-by: Jonathan Cameron drivers/iio/adc/stmpe-adc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 263d21cd5e85eb4d96fd560eee814d98c5b89546 Author: Philippe Schenker Date: Tue May 7 16:36:12 2019 +0200 iio: stmpe-adc: Reinit completion struct on begin conversion In some cases, the wait_completion got interrupted. This caused the error-handling to mutex_unlock the function. The before turned on interrupt then got called anyway. In the ISR then completion() was called causing wrong adc-values returned in a following adc-readout. Reinitialise completion struct to make sure the counter is zero when beginning a new adc-conversion. Signed-off-by: Philippe Schenker Signed-off-by: Jonathan Cameron drivers/iio/adc/stmpe-adc.c | 4 ++++ 1 file changed, 4 insertions(+) commit 2abd293703ebafe8ae64876936ad345c6716cd9a Author: Philippe Schenker Date: Tue May 7 16:36:11 2019 +0200 iio: stmpe-adc: Add compatible name Add the compatible name to the driver so it gets loaded when the proper node in DT is detected. Signed-off-by: Philippe Schenker Signed-off-by: Jonathan Cameron drivers/iio/adc/stmpe-adc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 7f7a0208369ff2cc5590acb9b1388e3d1ade98e9 Merge: 2a267e7c41aa 796fad0101d3 Author: Dmitry Torokhov Date: Fri May 10 11:45:03 2019 -0700 Merge tag 'ib-mfd-gpio-input-leds-power-v5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd into next Sync up with MFD tree to bring in MAX77650 PMIC driver. commit 2a267e7c41aa88215de2b542de797d03d16ecdfd Merge: 0981949da8f7 e93c9c99a629 Author: Dmitry Torokhov Date: Fri May 10 11:43:46 2019 -0700 Merge tag 'v5.1' into next Sync up with mainline to bring in the latest APIs. commit 423dfbc362b76b8a51745187a0c7e00d056d5b59 Author: Hans de Goede Date: Thu May 9 13:47:04 2019 +0200 HID: logitech-dj: Add usb-id for the 27MHz MX3000 receiver Testing has shown that, as expected, the MX3000 receiver is fully compatible with the existing 27MHz receiver support in hid-logitech-dj.c. After this the only, presumably also compatible, receiver id left in hid-lg.c is the USB_DEVICE_ID_S510_RECEIVER / 0xc50c id. If we can get someone to confirm that this receiver works with the dj 27Mhz support too, then the handling of the LG_RDESC and LG_WIRELESS quirks can be removed from hid-lg.c. Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina drivers/hid/hid-lg.c | 2 -- drivers/hid/hid-logitech-dj.c | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) commit 7d9ab9b6adffd9c474c1274acb5f6208f9a09cf3 Author: Roman Gushchin Date: Tue May 7 10:01:50 2019 -0700 percpu_ref: release percpu memory early without PERCPU_REF_ALLOW_REINIT Release percpu memory after finishing the switch to the atomic mode if only PERCPU_REF_ALLOW_REINIT isn't set. Signed-off-by: Roman Gushchin Acked-by: Tejun Heo Signed-off-by: Dennis Zhou include/linux/percpu-refcount.h | 1 + lib/percpu-refcount.c | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) commit ddde2af747ad79010f14691f381522987fbcb860 Author: Roman Gushchin Date: Tue May 7 10:01:49 2019 -0700 md: initialize percpu refcounters using PERCU_REF_ALLOW_REINIT Percpu reference counters should now be initialized with the PERCPU_REF_ALLOW_REINIT in order to allow switching them to the percpu mode from the atomic mode. To make percpu_ref_switch_to_percpu() call in set_in_sync() succeed,let's initialize percpu refcounters with the PERCU_REF_ALLOW_REINIT flag. Signed-off-by: Roman Gushchin Acked-by: Tejun Heo Signed-off-by: Dennis Zhou drivers/md/md.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 214828962dead0c698f92b60ef97ce3c5fc2c8fe Author: Roman Gushchin Date: Tue May 7 10:01:48 2019 -0700 io_uring: initialize percpu refcounters using PERCU_REF_ALLOW_REINIT Percpu reference counters should now be initialized with the PERCPU_REF_ALLOW_REINIT in order to allow switching them to the percpu mode from the atomic mode. This is exactly what percpu_ref_reinit() called from __io_uring_register() is supposed to do. So let's initialize percpu refcounters with the PERCU_REF_ALLOW_REINIT flag. Signed-off-by: Roman Gushchin Acked-by: Tejun Heo Signed-off-by: Dennis Zhou fs/io_uring.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 09ed79d6d75f06cc963a78f25463251b0a758dc7 Author: Roman Gushchin Date: Tue May 7 10:01:47 2019 -0700 percpu_ref: introduce PERCPU_REF_ALLOW_REINIT flag In most cases percpu reference counters are not switched to the percpu mode after they reach the atomic mode. Some obvious exceptions are reference counters which are initialized into the atomic mode (using PERCPU_REF_INIT_ATOMIC and PERCPU_REF_INIT_DEAD flags), and there are few other exceptions. But in most cases there is no way back, and once the reference counter is switched to the atomic mode, there is no reason to wait for percpu_ref_exit() to release the percpu memory. Of course, the size of a single counter is not so big, but because it can pin the whole percpu block in memory, the memory footprint can be noticeable (e.g. on my 32 CPUs machine a percpu block is 8Mb large). To make releasing of the percpu memory as early as possible, let's introduce the PERCPU_REF_ALLOW_REINIT flag with the following semantics: it has to be set in order to switch a percpu reference counter to the percpu mode after the initialization. PERCPU_REF_INIT_ATOMIC and PERCPU_REF_INIT_DEAD flags will implicitly assume PERCPU_REF_ALLOW_REINIT. This patch doesn't introduce any functional change to avoid any regressions. It will be done later in the patchset after adjusting all call sites, which are reviving percpu counters. Signed-off-by: Roman Gushchin Acked-by: Tejun Heo Signed-off-by: Dennis Zhou include/linux/percpu-refcount.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 090a37ceda3ecb02061a1415239aa1a64c184833 Author: Russell King Date: Thu May 2 17:56:49 2019 +0100 ARM: riscpc: dma: use __iomem pointers for writing DMA Use __iomem pointers for efficiency to write the DMA registers. This avoids the compiler emitting several instructions for each access to calculate the register address. Signed-off-by: Russell King arch/arm/mach-rpc/dma.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) commit e659587c64b3d48a9293e34eb854967654ed98f7 Author: Russell King Date: Thu May 2 17:50:55 2019 +0100 ARM: riscpc: dma: improve address/length writing Rearrange writing the DMA addresses to generate more efficient code. Signed-off-by: Russell King arch/arm/mach-rpc/dma.c | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) commit 39694ed0dbe17de1eff7850e7481bef98047130c Author: Russell King Date: Thu May 2 17:43:36 2019 +0100 ARM: riscpc: dma: make state a local variable Make state a local variable to avoid rewriting it in the DMA loop. Signed-off-by: Russell King arch/arm/mach-rpc/dma.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 8194468fadaaac5e04558d955e7bff8692212459 Author: Russell King Date: Thu May 2 17:37:51 2019 +0100 ARM: riscpc: dma: eliminate "cur_sg" scatterlist usage All we really need is the DMA address and size, we don't need the baggage of a full scatterlist structure. Signed-off-by: Russell King arch/arm/mach-rpc/dma.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) commit ffd9a1ba9fdb7f2bd1d1ad9b9243d34e96756ba2 Author: Russell King Date: Thu May 2 17:19:18 2019 +0100 ARM: riscpc: fix DMA DMA got broken a while back in two different ways: 1) a change in the behaviour of disable_irq() to wait for the interrupt to finish executing causes us to deadlock at the end of DMA. 2) a change to avoid modifying the scatterlist left the first transfer uninitialised. DMA is only used with expansion cards, so has gone unnoticed. Fixes: fa4e99899932 ("[ARM] dma: RiscPC: don't modify DMA SG entries") Signed-off-by: Russell King arch/arm/mach-rpc/dma.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e89e261365588035edd7c8b42a961c1e6c36a567 Author: Russell King Date: Mon Apr 29 19:24:39 2019 +0100 ARM: riscpc: fix ecard printing Multiple printk() statements appear to get broken into separate lines, which messes up the formatting. Fix these up. Signed-off-by: Russell King arch/arm/mach-rpc/ecard.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 63a0666bca9311f35017be454587f3ba903644b8 Author: Russell King Date: Sat Apr 27 22:43:49 2019 +0100 ARM: riscpc: fix lack of keyboard interrupts after irq conversion Fix lack of keyboard interrupts for RiscPC due to incorrect conversion. Fixes: e8d36d5dbb6a ("ARM: kill off set_irq_flags usage") Signed-off-by: Russell King arch/arm/mach-rpc/irq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a44c1d700c848e221d80aab1029d36a60d21a0f4 Author: Russell King Date: Wed Nov 14 19:13:02 2018 +0000 ARM: riscpc: replace gettimeoffset() with clocksource Replace the old gettimeoffset() interface (which became buggy in several ways) with a clocksource that atomically reads the count and status from the timer, and corrects the count as appropriate ensuring proper resolution of time without time warping backwards. We keep the original periodic timer non-clock event implementation to provide the kernel with a regular source of interrupts, which are required to keep the clocksource properly updated. Signed-off-by: Russell King arch/arm/Kconfig | 1 - arch/arm/mach-rpc/time.c | 38 +++++++++++++++++++++++++------------- 2 files changed, 25 insertions(+), 14 deletions(-) commit aec71d794731c441a9b7ee9705efedd2f6054173 Author: Miroslav Benes Date: Tue May 7 15:08:14 2019 +0200 livepatch: Remove stale kobj_added entries from kernel-doc descriptions Commit 4d141ab3416d ("livepatch: Remove custom kobject state handling") removed kobj_added members of klp_func, klp_object and klp_patch structures. kernel-doc descriptions were omitted by accident. Remove them. Reported-by: Kamalesh Babulal Signed-off-by: Miroslav Benes Acked-by: Joe Lawrence Reviewed-by: Kamalesh Babulal Signed-off-by: Jiri Kosina include/linux/livepatch.h | 3 --- 1 file changed, 3 deletions(-) commit dc0c0bfe112c100b0279de2e4aeda22311626c18 Author: Ville Syrjälä Date: Thu Apr 25 19:29:06 2019 +0300 drm/i915: Add readout and state check for pch_pfit.force_thru Convert the HSW pch_pfit.force_thru to a proper state variable with readout and accompanying pipe conf check. Makes the logic a bit more straightforward, and hopefully prevents some breakage in the future. 'force_thru' is probably not the best name for this, but I didn't manage to come up with anything better either, so I left it alone. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190425162906.5242-2-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_ddi.c | 12 ++++++++---- drivers/gpu/drm/i915/intel_display.c | 18 ++++++++++-------- drivers/gpu/drm/i915/intel_pipe_crc.c | 13 ++----------- 3 files changed, 20 insertions(+), 23 deletions(-) commit 13b7648b7eab7e8259a2fb267b498bd9eba81ca0 Author: Ville Syrjälä Date: Thu Apr 25 19:29:05 2019 +0300 drm/i915: Fix fastset vs. pfit on/off on HSW EDP transcoder On HSW the pipe A panel fitter lives inside the display power well, and the input MUX for the EDP transcoder needs to be configured appropriately to route the data through the power well as needed. Changing the MUX setting is not allowed while the pipe is active, so we need to force a full modeset whenever we need to change it. Currently we may end up doing a fastset which won't change the MUX settings, but it will drop the power well reference, and that kills the pipe. Cc: stable@vger.kernel.org Cc: Hans de Goede Cc: Maarten Lankhorst Fixes: d19f958db23c ("drm/i915: Enable fastset for non-boot modesets.") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190425162906.5242-1-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_display.c | 9 +++++++++ drivers/gpu/drm/i915/intel_pipe_crc.c | 13 ++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) commit 1d25724b41fad7eeb2c3058a5c8190d6ece73e08 Author: Daniel Drake Date: Tue Apr 23 17:28:10 2019 +0800 drm/i915/fbc: disable framebuffer compression on GeminiLake On many (all?) the Gemini Lake systems we work with, there is frequent momentary graphical corruption at the top of the screen, and it seems that disabling framebuffer compression can avoid this. The ticket was reported 6 months ago and has already affected a multitude of users, without any real progress being made. So, lets disable framebuffer compression on GeminiLake until a solution is found. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108085 Fixes: fd7d6c5c8f3e ("drm/i915: enable FBC on gen9+ too") Cc: Paulo Zanoni Cc: Daniel Vetter Cc: Jani Nikula Cc: # v4.11+ Reviewed-by: Paulo Zanoni Signed-off-by: Daniel Drake Signed-off-by: Jian-Hong Pan Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190423092810.28359-1-jian-hong@endlessm.com drivers/gpu/drm/i915/intel_fbc.c | 4 ++++ 1 file changed, 4 insertions(+) commit 094aa54f0f9e9185babebf95745d71b07a84321c Author: Daniel Vetter Date: Thu May 2 15:56:03 2019 +0200 drm: Some ocd in drm_file.c Move the open helper around to avoid the forward decl, and give drm_setup a drm_legacy_ prefix since it's all legacy stuff in there. v2: Move drm_legacy_setup into drm_legacy_misc.c (Chris). The counterpart in the form of drm_legacy_dev_reinit is there already too, plus it fits perfectly into Dave's work of making DRIVER_LEGACY code compile-time optional. Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190502135603.20413-1-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_file.c | 122 ++++++++++++++++---------------------- drivers/gpu/drm/drm_legacy.h | 2 + drivers/gpu/drm/drm_legacy_misc.c | 20 +++++++ 3 files changed, 72 insertions(+), 72 deletions(-) commit 2420a0b1798d7a78d1f9b395f09f3c80d92cc588 Author: Daniel Drake Date: Thu May 9 13:54:17 2019 +0800 x86/tsc: Set LAPIC timer period to crystal clock frequency The APIC timer calibration (calibrate_APIC_timer()) can be skipped in cases where we know the APIC timer frequency. On Intel SoCs, we believe that the APIC is fed by the crystal clock; this would make sense, and the crystal clock frequency has been verified against the APIC timer calibration result on ApolloLake, GeminiLake, Kabylake, CoffeeLake, WhiskeyLake and AmberLake. Set lapic_timer_period based on the crystal clock frequency accordingly. APIC timer calibration would normally be skipped on modern CPUs by nature of the TSC deadline timer being used instead, however this change is still potentially useful, e.g. if the TSC deadline timer has been disabled with a kernel parameter. calibrate_APIC_timer() uses the legacy timer, but we are seeing new platforms that omit such legacy functionality, so avoiding such codepaths is becoming more important. Suggested-by: Thomas Gleixner Signed-off-by: Daniel Drake Reviewed-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Borislav Petkov Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: len.brown@intel.com Cc: linux@endlessm.com Cc: rafael.j.wysocki@intel.com Link: http://lkml.kernel.org/r/20190509055417.13152-3-drake@endlessm.com Link: https://lkml.kernel.org/r/20190419083533.32388-1-drake@endlessm.com Link: https://lkml.kernel.org/r/alpine.DEB.2.21.1904031206440.1967@nanos.tec.linutronix.de Signed-off-by: Ingo Molnar arch/x86/kernel/tsc.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 52ae346bd26c7a8b17ea82e9a09671e98c5402b7 Author: Daniel Drake Date: Thu May 9 13:54:16 2019 +0800 x86/apic: Rename 'lapic_timer_frequency' to 'lapic_timer_period' This variable is a period unit (number of clock cycles per jiffy), not a frequency (which is number of cycles per second). Give it a more appropriate name. Suggested-by: Ingo Molnar Signed-off-by: Daniel Drake Reviewed-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Borislav Petkov Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: len.brown@intel.com Cc: linux@endlessm.com Cc: rafael.j.wysocki@intel.com Link: http://lkml.kernel.org/r/20190509055417.13152-2-drake@endlessm.com Signed-off-by: Ingo Molnar arch/x86/include/asm/apic.h | 2 +- arch/x86/kernel/apic/apic.c | 20 ++++++++++---------- arch/x86/kernel/cpu/mshyperv.c | 4 ++-- arch/x86/kernel/cpu/vmware.c | 2 +- arch/x86/kernel/jailhouse.c | 2 +- arch/x86/kernel/tsc_msr.c | 4 ++-- 6 files changed, 17 insertions(+), 17 deletions(-) commit 604dc9170f2435d27da5039a3efd757dceadc684 Author: Daniel Drake Date: Thu May 9 13:54:15 2019 +0800 x86/tsc: Use CPUID.0x16 to calculate missing crystal frequency native_calibrate_tsc() had a data mapping Intel CPU families and crystal clock speed, but hardcoded tables are not ideal, and this approach was already problematic at least in the Skylake X case, as seen in commit: b51120309348 ("x86/tsc: Fix erroneous TSC rate on Skylake Xeon") By examining CPUID data from http://instlatx64.atw.hu/ and units in the lab, we have found that 3 different scenarios need to be dealt with, and we can eliminate most of the hardcoded data using an approach a little more advanced than before: 1. ApolloLake, GeminiLake, CannonLake (and presumably all new chipsets from this point) report the crystal frequency directly via CPUID.0x15. That's definitive data that we can rely upon. 2. Skylake, Kabylake and all variants of those two chipsets report a crystal frequency of zero, however we can calculate the crystal clock speed by condidering data from CPUID.0x16. This method correctly distinguishes between the two crystal clock frequencies present on different Skylake X variants that caused headaches before. As the calculations do not quite match the previously-hardcoded values in some cases (e.g. 23913043Hz instead of 24MHz), TSC refinement is enabled on all platforms where we had to calculate the crystal frequency in this way. 3. Denverton (GOLDMONT_X) reports a crystal frequency of zero and does not support CPUID.0x16, so we leave this entry hardcoded. Suggested-by: Thomas Gleixner Signed-off-by: Daniel Drake Reviewed-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Borislav Petkov Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: len.brown@intel.com Cc: linux@endlessm.com Cc: rafael.j.wysocki@intel.com Link: http://lkml.kernel.org/r/20190509055417.13152-1-drake@endlessm.com Link: https://lkml.kernel.org/r/20190419083533.32388-1-drake@endlessm.com Signed-off-by: Ingo Molnar arch/x86/kernel/tsc.c | 47 +++++++++++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 20 deletions(-) commit 752c4f3c1d19708578257ecc041672b6d8afb9bf Merge: 3be2071004bf eb85d03e01c3 Author: Maarten Lankhorst Date: Thu May 9 10:18:57 2019 +0200 Merge remote-tracking branch 'drm/drm-next' into drm-misc-next Requested for backmerging airlied's drm-legacy cleanup. Signed-off-by: Maarten Lankhorst commit c16fd9be70faf3c49a61700efd16018dd910e390 Author: Ramalingam C Date: Tue May 7 21:57:40 2019 +0530 drm/hdcp: gathering hdcp related code into drm_hdcp.c Considering the significant size of hdcp related code in drm, all hdcp related codes are moved into separate file called drm_hdcp.c. v2: Rebased. v2: Rebased. Signed-off-by: Ramalingam C Suggested-by: Daniel Vetter Reviewed-by: Daniel Vetter Acked-by: Dave Airlie Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190507162745.25600-7-ramalingam.c@intel.com drivers/gpu/drm/drm_connector.c | 44 -------------------------------------- drivers/gpu/drm/drm_hdcp.c | 47 +++++++++++++++++++++++++++++++++++++++++ include/drm/drm_connector.h | 2 -- include/drm/drm_hdcp.h | 3 +++ 4 files changed, 50 insertions(+), 46 deletions(-) commit f26ae6a652f2e75a3a12ac22b7da5797978436c4 Author: Ramalingam C Date: Tue May 7 21:57:39 2019 +0530 drm/i915: SRM revocation check for HDCP1.4 and 2.2 DRM HDCP SRM revocation check services are used from I915 for HDCP1.4 and 2.2 revocation check during the respective authentication flow. v2: Rebased. v3: %s/*_ksvs_revocated/*_check_ksvs_revoked [Daniel] unwanted noise is removed. Signed-off-by: Ramalingam C Reviewed-by: Daniel Vetter Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190507162745.25600-6-ramalingam.c@intel.com drivers/gpu/drm/i915/intel_hdcp.c | 45 +++++++++++++++++++++++++++++++++------ 1 file changed, 38 insertions(+), 7 deletions(-) commit 6498bf5800a302ef69e7f4914e727893f278bb2f Author: Ramalingam C Date: Tue May 7 21:57:38 2019 +0530 drm: revocation check at drm subsystem On every hdcp revocation check request SRM is read from fw file /lib/firmware/display_hdcp_srm.bin SRM table is parsed and stored at drm_hdcp.c, with functions exported for the services for revocation check from drivers (which implements the HDCP authentication) This patch handles the HDCP1.4 and 2.2 versions of SRM table. v2: moved the uAPI to request_firmware_direct() [Daniel] v3: kdoc added. [Daniel] srm_header unified and bit field definitions are removed. [Daniel] locking improved. [Daniel] vrl length violation is fixed. [Daniel] v4: s/__swab16/be16_to_cpu [Daniel] be24_to_cpu is done through a global func [Daniel] Unused variables are removed. [Daniel] unchecked return values are dropped from static funcs [Daniel] Signed-off-by: Ramalingam C Acked-by: Satyeshwar Singh Reviewed-by: Daniel Vetter Acked-by: Dave Airlie Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190507162745.25600-5-ramalingam.c@intel.com Documentation/gpu/drm-kms-helpers.rst | 6 + drivers/gpu/drm/Makefile | 2 +- drivers/gpu/drm/drm_hdcp.c | 333 ++++++++++++++++++++++++++++++++++ drivers/gpu/drm/drm_internal.h | 4 + drivers/gpu/drm/drm_sysfs.c | 2 + include/drm/drm_hdcp.h | 24 +++ 6 files changed, 370 insertions(+), 1 deletion(-) commit 0de655cae416b20ed7876adb480e5c65810274ea Author: Ramalingam C Date: Tue May 7 21:57:37 2019 +0530 drm: generic fn converting be24 to cpu and vice versa Existing functions for converting a 3bytes(be24) of big endian value into u32 of little endian and vice versa are renamed as s/drm_hdcp2_seq_num_to_u32/drm_hdcp_be24_to_cpu s/drm_hdcp2_u32_to_seq_num/drm_hdcp_cpu_to_be24 Signed-off-by: Ramalingam C Suggested-by: Daniel Vetter cc: Tomas Winkler Acked-by: Dave Airlie Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190507162745.25600-4-ramalingam.c@intel.com drivers/gpu/drm/i915/intel_hdcp.c | 5 +++-- drivers/misc/mei/hdcp/mei_hdcp.c | 2 +- include/drm/drm_hdcp.h | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) commit 43318c0ae38f78a1e3b2509b63bc8523daaa806b Author: Ramalingam C Date: Tue May 7 21:57:36 2019 +0530 drm/i915: debugfs: HDCP2.2 capability read Adding the HDCP2.2 capability of HDCP src and sink info into debugfs entry "i915_hdcp_sink_capability" This helps the userspace tests to skip the HDCP2.2 test on non HDCP2.2 sinks. v2: Rebased. Signed-off-by: Ramalingam C Reviewed-by: Daniel Vetter Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190507162745.25600-3-ramalingam.c@intel.com drivers/gpu/drm/i915/i915_debugfs.c | 13 +++++++++++-- drivers/gpu/drm/i915/intel_hdcp.c | 2 +- drivers/gpu/drm/i915/intel_hdcp.h | 1 + 3 files changed, 13 insertions(+), 3 deletions(-) commit 585b000de23ba06818975734da2303bd6ba2dcdd Author: Ramalingam C Date: Tue May 7 21:57:35 2019 +0530 drm: move content protection property to mode_config Content protection property is created once and stored in drm_mode_config. And attached to all HDCP capable connectors. Signed-off-by: Ramalingam C Reviewed-by: Daniel Vetter Acked-by: Dave Airlie Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190507162745.25600-2-ramalingam.c@intel.com drivers/gpu/drm/drm_atomic_uapi.c | 4 ++-- drivers/gpu/drm/drm_connector.c | 13 +++++++------ include/drm/drm_connector.h | 6 ------ include/drm/drm_mode_config.h | 6 ++++++ 4 files changed, 15 insertions(+), 14 deletions(-) commit a08b51a9a0f3664bd0d7a18982a35e3f75adc308 Author: Oded Gabbay Date: Thu May 9 01:48:23 2019 +0300 habanalabs: change polling functions to macros This patch changes two polling functions to macros, in order to make their API the same as the standard readl_poll_timeout so we would be able to define the "condition for exit" when calling these macros. This will simplify the code as it will eliminate the need to check both for timeout and for the (cond) in the calling function. Signed-off-by: Oded Gabbay drivers/misc/habanalabs/command_submission.c | 10 ++-- drivers/misc/habanalabs/device.c | 89 ---------------------------- drivers/misc/habanalabs/firmware_if.c | 29 ++++----- drivers/misc/habanalabs/goya/goya.c | 25 ++++---- drivers/misc/habanalabs/habanalabs.h | 57 ++++++++++++++++-- 5 files changed, 81 insertions(+), 129 deletions(-) commit 1f2c999bbca31c1f0bbbe69a75f3489f60cce05d Author: Oded Gabbay Date: Thu May 9 01:47:01 2019 +0300 habanalabs: remove redundant memory clear The driver allocates memory for fence object with GFP_ZERO flag, so there is no need to explicitly write 0 to the allocated object after the allocation. Signed-off-by: Oded Gabbay drivers/misc/habanalabs/goya/goya.c | 2 -- 1 file changed, 2 deletions(-) commit cbe722e41684930c485fd09a161de44e444731f6 Author: Oded Gabbay Date: Thu May 9 01:44:13 2019 +0300 habanalabs: remove redundant CB size adjustment Driver-initiated DMA jobs are synchronized jobs, i.e. the driver polls on fence object until the job is finished. There is no interrupt from the device. Therefore, no need to add space for 2 * msg_prot packets to the end of the CB. Only a single msg_prot is needed (to write the fence). Signed-off-by: Oded Gabbay drivers/misc/habanalabs/goya/goya.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 0152b3b3f49b36b0f1a1bf9f0353dc636f41d8f0 Author: Chris Wilson Date: Wed May 8 12:24:52 2019 +0100 drm/i915: Seal races between async GPU cancellation, retirement and signaling Currently there is an underlying assumption that i915_request_unsubmit() is synchronous wrt the GPU -- that is the request is no longer in flight as we remove it. In the near future that may change, and this may upset our signaling as we can process an interrupt for that request while it is no longer in flight. CPU0 CPU1 intel_engine_breadcrumbs_irq (queue request completion) i915_request_cancel_signaling ... ... i915_request_enable_signaling dma_fence_signal Hence in the time it took us to drop the lock to signal the request, a preemption event may have occurred and re-queued the request. In the process, that request would have seen I915_FENCE_FLAG_SIGNAL clear and so reused the rq->signal_link that was in use on CPU0, leading to bad pointer chasing in intel_engine_breadcrumbs_irq. A related issue was that if someone started listening for a signal on a completed but no longer in-flight request, we missed the opportunity to immediately signal that request. Furthermore, as intel_contexts may be immediately released during request retirement, in order to be entirely sure that intel_engine_breadcrumbs_irq may no longer dereference the intel_context (ce->signals and ce->signal_link), we must wait for irq spinlock. In order to prevent the race, we use a bit in the fence.flags to signal the transfer onto the signal list inside intel_engine_breadcrumbs_irq. For simplicity, we use the DMA_FENCE_FLAG_SIGNALED_BIT as it then quickly signals to any outside observer that the fence is indeed signaled. v2: Sketch out potential dma-fence API for manual signaling v3: And the test_and_set_bit() Fixes: 52c0fdb25c7c ("drm/i915: Replace global breadcrumbs with per-context interrupt tracking") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190508112452.18942-1-chris@chris-wilson.co.uk drivers/dma-buf/dma-fence.c | 1 + drivers/gpu/drm/i915/gt/intel_breadcrumbs.c | 78 +++++++++++++++++++++-------- drivers/gpu/drm/i915/i915_request.c | 1 + drivers/gpu/drm/i915/intel_guc_submission.c | 1 - 4 files changed, 59 insertions(+), 22 deletions(-) commit 519a019491b833209b2920f0fe9db4aa22da6bbe Author: Chris Wilson Date: Wed May 8 09:06:25 2019 +0100 drm/i915/hangcheck: Replace hangcheck.seqno with RING_HEAD After realising we need to sample RING_START to detect context switches from preemption events that do not allow for the seqno to advance, we can also realise that the seqno itself is just a distance along the ring and so can be replaced by sampling RING_HEAD. v2: Bonus comment for the mystery separate CS_STALL before MI_USER_INTERRUPT Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190508080704.24223-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gt/intel_engine.h | 15 ------------- drivers/gpu/drm/i915/gt/intel_engine_cs.c | 5 ++--- drivers/gpu/drm/i915/gt/intel_engine_types.h | 3 +-- drivers/gpu/drm/i915/gt/intel_hangcheck.c | 8 +++---- drivers/gpu/drm/i915/gt/intel_lrc.c | 20 ++++++----------- drivers/gpu/drm/i915/gt/intel_ringbuffer.c | 32 ++-------------------------- drivers/gpu/drm/i915/i915_debugfs.c | 12 +++-------- 7 files changed, 18 insertions(+), 77 deletions(-) commit 18ecc6c55bcb52e958d1257def58df86ceef7ece Author: Chris Wilson Date: Wed May 8 12:52:45 2019 +0100 drm/i915: Reboot CI if forcewake fails If the HW fails to ack a change in forcewake status, the machine is as good as dead -- it may recover, but in reality it missed the mmio updates and is now in a very inconsistent state. If it happens, we can't trust the CI results (or at least the fails may be genuine but due to the HW being dead and not the actual test!) so reboot the machine (CI checks for a kernel taint in between each test and reboots if the machine is tainted). Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20190508115245.27790-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gt/intel_reset.c | 2 +- drivers/gpu/drm/i915/i915_drv.h | 11 +++++++++++ drivers/gpu/drm/i915/intel_uncore.c | 8 ++++++-- 3 files changed, 18 insertions(+), 3 deletions(-) commit 47300728fb213486a830565d2af49da967c9d16a Author: Emil Renner Berthing Date: Fri Apr 12 12:53:20 2019 +0200 spi: rockchip: turn down tx dma bursts This fixes tx and bi-directional dma transfers on rk3399-gru-kevin. It seems the SPI fifo must have room for 2 bursts when the dma_tx_req signal is generated or it might skip some words. This in turn makes the rx dma channel never complete for bi-directional transfers. Fix it by setting tx burst length to fifo_len / 4 and the dma watermark to fifo_len / 2. However the rk3399 TRM says (sic): "DMAC support incrementing-address burst and fixed-address burst. But in the case of access SPI and UART at byte or halfword size, DMAC only support fixed-address burst and the address must be aligned to word." So this relies on fifo_len being a multiple of 16 such that the burst length (= fifo_len / 4) is a multiple of 4 and the addresses will be word-aligned. Fixes: dcfc861d24ec ("spi: rockchip: adjust dma watermark and burstlen") Signed-off-by: Emil Renner Berthing Signed-off-by: Mark Brown drivers/spi/spi-rockchip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d5864e5bed96db7230da45463d6ae7af5b3b4399 Author: Martin Sperl Date: Sat Feb 23 08:49:50 2019 +0000 spi: core: allow defining time that cs is deasserted as a multiple of SCK Support setting a delay between cs assert and deassert as a multiple of spi clock length. Signed-off-by: Martin Sperl Signed-off-by: Mark Brown drivers/spi/spi.c | 8 ++++++++ include/linux/spi/spi.h | 1 + 2 files changed, 9 insertions(+) commit 0ff2de8bb163551ec4230a5a6f3c40c1f6adec4f Author: Martin Sperl Date: Sat Feb 23 08:49:48 2019 +0000 spi: core: allow defining time that cs is deasserted For some SPI devices that support speed_hz > 1MHz the default 10 us delay when cs_change = 1 is typically way to long and may result in poor spi bus utilization. This patch makes it possible to control the delay at micro or nano second resolution on a per spi_transfer basis. It even allows an "as fast as possible" mode with: xfer.cs_change_delay_unit = SPI_DELAY_UNIT_NSECS; xfer.cs_change_delay = 0; The delay code is shared between delay_usecs and cs_change_delay for consistency and reuse, so in the future this change_delay_unit could also apply to delay_usec as well. Note that on slower SOCs/CPU actually reaching ns deasserts on cs is not realistic as the gpio overhead alone (without any delays added ) may already leave cs deasserted for more than 1us - at least on a raspberry pi. But at the very least this way we can keep it as short as possible. Signed-off-by: Martin Sperl Signed-off-by: Mark Brown drivers/spi/spi.c | 59 ++++++++++++++++++++++++++++++++++++++++--------- include/linux/spi/spi.h | 7 ++++++ 2 files changed, 56 insertions(+), 10 deletions(-) commit 0c169b8afd1def63d95702cad45a0908c643a8c8 Author: Oded Gabbay Date: Wed May 8 12:22:41 2019 +0300 habanalabs: check to load F/W before boot status This patch changes the order of checks when initializing the device CPU. We want first to check if we need to load the F/W, and only if we need to, then we want to check the status of the CPU boot program. Signed-off-by: Oded Gabbay drivers/misc/habanalabs/goya/goya.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 261e90829fe2f0ab8a9e3912da1126abd3224ad7 Author: Paul Gortmaker Date: Sat Apr 13 11:15:18 2019 -0400 ASoC: soc-acpi: fix implicit header use of module.h/export.h This file is implicitly relying on an instance of including module.h from . Ideally, header files under include/linux shouldn't be adding includes of other headers, in anticipation of their consumers, but just the headers needed for the header itself to pass parsing with CPP. The module.h is particularly bad in this sense, as it itself does include a whole bunch of other headers, due to the complexity of module support. Here, we make the include explicit, in order to allow the future removal of module.h from linux/acpi.h without causing build breakage. Cc: Liam Girdwood Cc: Mark Brown Cc: Jaroslav Kysela Cc: Takashi Iwai Signed-off-by: Paul Gortmaker Signed-off-by: Mark Brown sound/soc/soc-acpi.c | 2 ++ 1 file changed, 2 insertions(+) commit 154f7da56f1ecba42021d550c9e8432ac8d32c26 Author: Martin Sperl Date: Tue Apr 23 20:15:13 2019 +0000 spi: bcm2835: add driver stats to debugfs To estimate efficiency add statistics on transfer types (polling, interrupt and dma) used to debugfs. Signed-off-by: Martin Sperl Changelog: V1 -> V2: applied feedback by Stefan Wahren reorganized patchset added extra rational, descriptions fixed compile issue when CONFIG_DEBUG_FS is unset Signed-off-by: Mark Brown drivers/spi/spi-bcm2835.c | 74 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) commit ff245d90ebed8d4da6751dfee1bc76e4a5e94257 Author: Martin Sperl Date: Tue Apr 23 20:15:11 2019 +0000 spi: bcm2835: make the polling duration limits configurable Under some circumstances the default 30 us polling limit is not optimal and may lead to long delays because we are waiting on an interrupt. with this patch we have the possibility to influence this policy. So make this limit (in us) configurable via a module parameters (but also modifyable via /sys/modules/...) This replicates similar code found in spi-bcm2835aux. Signed-off-by: Martin Sperl Changelog: V1 -> V2: applied feedback by Stefan Wahren reorganized patchset added extra rational, descriptions Signed-off-by: Mark Brown drivers/spi/spi-bcm2835.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) commit c41d62b06cb92289ab5db9d37a0f27fe6271fa34 Author: Martin Sperl Date: Tue Apr 23 20:15:10 2019 +0000 spi: bcm2835: added comment about different bus behaviour of DMA mode The DMA mode behaves slightly different than polling or interrupt driven mode, so just document the fact Signed-off-by: Martin Sperl Changelog: V1 -> V2: applied feedback by Stefan Wahren new in V2 Signed-off-by: Mark Brown drivers/spi/spi-bcm2835.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 7f1922eb3adba8c372fdf0d04fe9e6268f98291a Author: Martin Sperl Date: Tue Apr 23 20:15:09 2019 +0000 spi: bcm2835: Avoid 64-bit arithmetic in xfer len calc Avoid 64 bit aritmetics when deciding if we need to use polling or not This replicates: commit d704afffe65c ("spi: bcm2835aux: Avoid 64-bit arithmetic in xfer len calc") from spi-bcm2835aux Signed-off-by: Martin Sperl Changelog: V1 -> V2: applied feedback by Stefan Wahren reorganized patchset added extra rational, descriptions Signed-off-by: Mark Brown drivers/spi/spi-bcm2835.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 9ac3f90db46b7805a37df2bc419faf369025d64a Author: Martin Sperl Date: Tue Apr 23 20:15:08 2019 +0000 spi: bcm2835: bcm2835_spi_transfer_one_poll remove unnecessary argument Remove the unnecessary argument of xfer_time_us when calling bcm2835_spi_transfer_one_poll. Signed-off-by: Martin Sperl Changelog: V1 -> V2: applied feedback by Stefan Wahren reorganized patchset added extra rational, descriptions Signed-off-by: Mark Brown drivers/spi/spi-bcm2835.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit c3fdefc2d79e38d20e955d2d3ad48261d99c2936 Author: Radu Pirea Date: Sun May 5 21:06:46 2019 +0300 spi: at91-usart: add DMA support This patch adds support for DMA. Transfers are done with dma only if they are longer than 16 bytes in order to achieve a better performance. DMA setup introduces a little overhead and for transfers shorter than 16 bytes there is no performance improvement. Signed-off-by: Radu Pirea Signed-off-by: Mark Brown drivers/spi/spi-at91-usart.c | 221 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 219 insertions(+), 2 deletions(-) commit f7b99e5948e6be8b850eecbb2de1986d26a76b36 Author: Radu Pirea Date: Sun May 5 21:06:45 2019 +0300 dt-bindings: mfd: atmel-usart: add DMA bindings for USART in SPI mode The bindings for DMA are now common for both drivers of the USART IP. The node given as an example for USART in SPI mode has been updated in order to include DMA bindings. Signed-off-by: Radu Pirea Signed-off-by: Mark Brown .../devicetree/bindings/mfd/atmel-usart.txt | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit e29eaa3c4b76d4dd46d7a92018de1ab2793794e1 Author: Linus Walleij Date: Sat May 4 01:18:29 2019 +0200 spi: ep93xx: Drop unused variable My previous patch leaves a dangling variable in the driver. get rid of it. Fixes: 06a391b1621e ("spi: ep93xx: Convert to use CS GPIO descriptors") Reported-by: Stephen Rothwell Signed-off-by: Linus Walleij Signed-off-by: Mark Brown drivers/spi/spi-ep93xx.c | 1 - 1 file changed, 1 deletion(-) commit 3df4235ac41c2b8c3c5cd9c7798bc4a3105c0bc4 Author: Axel Lin Date: Mon Mar 25 21:55:57 2019 +0800 regulator: max77650: Convert MAX77651 SBB1 to pickable linear range The pickable linear range is suitable for The MAX77651 SBB1. According to MAX77651 TV_SBB1 Code Table: Use BIT[1:0] as range selectors. Use BIT[5:2] as selectors for each linear range. The MAX77651 SBB1 supports up to selector 57, selector 58 ~ 63 are RSVD, thus set n_voltage to 58. Signed-off-by: Axel Lin Signed-off-by: Mark Brown drivers/regulator/max77650-regulator.c | 134 +++++++++++---------------------- 1 file changed, 45 insertions(+), 89 deletions(-) commit 68ce3a4461726ebd3acf9d94841a46386402a058 Author: Axel Lin Date: Sat May 4 11:33:36 2019 +0800 regulator: core: Slightly improve readability of _regulator_get_enable_time The logic is equivalent, but it looks more straightforward this way: If rdev->desc->ops->enable_time is set, call it. Otherwise fallback to return rdev->desc->enable_time. Signed-off-by: Axel Lin Signed-off-by: Mark Brown drivers/regulator/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c0ffbd64b9dc14d673e393cc5933f3b4a47ab39c Author: Shengjiu Wang Date: Tue May 7 14:06:52 2019 +0000 ASoC: fsl_sai: Move clock operation to PM runtime Turn off/on clocks when device enters suspend/resume. This can help saving power. As a further optimization, we turn off/on mclk only when SAI is in master mode because otherwise mclk is externally provided. Signed-off-by: Shengjiu Wang Signed-off-by: Daniel Baluta Reviewed-by: Viorel Suman Acked-by: Nicolin Chen Signed-off-by: Mark Brown sound/soc/fsl/fsl_sai.c | 54 ++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 44 insertions(+), 10 deletions(-) commit 71ed4bddde08285cd02d6d28c861ea1815d67476 Author: Olivier Moysan Date: Mon May 6 14:54:12 2019 +0200 ASoC: stm32: i2s: manage identification registers Add support of identification registers in STM32 I2S. Signed-off-by: Olivier Moysan Signed-off-by: Mark Brown sound/soc/stm/stm32_i2s.c | 60 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 57 insertions(+), 3 deletions(-) commit 0cf4610b9f297e570da4d98514b310f076ecc8ab Author: Jerome Brunet Date: Mon May 6 11:58:15 2019 +0200 ASoC: hdmi-codec: remove ops dependency on the dai id The dependency on the dai_id can be removed by setting different ops for the i2s and spdif dai and storing the dai format information in each dai structure. It simplies the code a bit. Signed-off-by: Jerome Brunet Signed-off-by: Mark Brown sound/soc/codecs/hdmi-codec.c | 100 ++++++++++++++++++++++++++++-------------- 1 file changed, 67 insertions(+), 33 deletions(-) commit 1de005d47d90343666c5cc50a50929e05e52baac Author: Jerome Brunet Date: Mon May 6 11:58:14 2019 +0200 ASoC: hdmi-codec: remove reference to the dai drivers in the private data Keeping the a pointer to the dai drivers is not necessary. It is not used by the hdmi_codec after the probe. Even if it was used, the 'struct snd_soc_dai_driver' can accessed through the 'struct snd_soc_dai' so keeping the pointer in the private data structure is not useful. Signed-off-by: Jerome Brunet Signed-off-by: Mark Brown sound/soc/codecs/hdmi-codec.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit 3fcf94ef4d418668fa66e33ce9aabb05689b55f6 Author: Jerome Brunet Date: Mon May 6 11:58:13 2019 +0200 ASoC: hdmi-codec: remove reference to the current substream If the hdmi-codec is on a codec-to-codec link, the substream pointer it receives is completely made up by snd_soc_dai_link_event(). The pointer will be different between startup() and shutdown(). The hdmi-codec complains when this happens even if it is not really a problem. The current_substream pointer is not used for anything useful apart from getting the exclusive ownership of the device. Remove current_substream pointer and replace the exclusive locking mechanism with a simple variable and some atomic operations. Signed-off-by: Jerome Brunet Signed-off-by: Mark Brown sound/soc/codecs/hdmi-codec.c | 58 ++++++++++++------------------------------- 1 file changed, 16 insertions(+), 42 deletions(-) commit 900e5daf7034cf65ce4072b86f297c42f9042433 Author: Jerome Brunet Date: Mon May 6 11:58:12 2019 +0200 ASoC: hdmi-codec: remove function name debug traces Remove the debug traces only showing the function name on entry. The same can be obtained using ftrace. Signed-off-by: Jerome Brunet Signed-off-by: Mark Brown sound/soc/codecs/hdmi-codec.c | 12 ------------ 1 file changed, 12 deletions(-) commit 8c173dc41d38dcd286f92d75a56f8e927612150e Author: Oded Gabbay Date: Wed May 8 09:55:23 2019 +0300 habanalabs: remove dead code in habanalabs_drv.c This patch removes some dead code that performs checks about variables with hard-coded values. The patch also moves the initialization of those variables to a separate function, that will possibly have different values per ASIC. Signed-off-by: Oded Gabbay drivers/misc/habanalabs/habanalabs_drv.c | 56 +++++++++++++++----------------- 1 file changed, 26 insertions(+), 30 deletions(-) commit 893d1a9c5c1c246eb756c828a12b5966d2ed9a17 Author: Curtis Malainey Date: Tue May 7 16:32:13 2019 -0700 ASoC: rt5677: Add component driver name Add name to component driver so it is possible to lookup the component when needed. Signed-off-by: Curtis Malainey Signed-off-by: Mark Brown sound/soc/codecs/rt5677.c | 7 ++++--- sound/soc/codecs/rt5677.h | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) commit 3fad10dbb688a7583a6812bf74bee2a56e95d04c Author: Aditya Swarup Date: Tue May 7 11:18:56 2019 -0700 drm/i915/icl: Fix setting 10 bit deep color mode There is a bug in hdmi_deep_color_possible() - we compare pipe_bpp <= 8*3 which returns true every time for hdmi_deep_color_possible 12 bit deep color mode test in intel_hdmi_compute_config().(Even when the requested color mode is 10 bit through max bpc property) Comparing pipe_bpp with bpc * 3 takes care of this condition where requested max bpc is 10 bit, so hdmi_deep_color_possible with 12 bit returns false when requested max bpc is 10.(Ville) v2:Add suggested by Ville Syrjälä Suggested-by: Ville Syrjälä Signed-off-by: Aditya Swarup Cc: Jani Nikula Cc: Manasi Navare Cc: Clinton Taylor Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190507181856.16091-1-aditya.swarup@intel.com drivers/gpu/drm/i915/intel_hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9ab91a30f2b95ed49404516b760577350cf1d245 Author: Ville Syrjälä Date: Mon May 6 18:26:27 2019 +0300 drm/i915: Kill PCH_KBP For us KBP is 100% identical to SPT. Kill the redundant enum value. Also bspec doesn't talk about KBP either, so this might avoid some confusion when cross checking the code against the spec. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190506152627.20283-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/i915_drv.c | 3 ++- drivers/gpu/drm/i915/i915_drv.h | 4 +--- drivers/gpu/drm/i915/intel_gmbus.c | 6 ++---- 3 files changed, 5 insertions(+), 8 deletions(-) commit 3be2071004bf748ed39e54ccda85caaa774c7ccd Author: Jagan Teki Date: Tue May 7 18:37:07 2019 +0530 drm/panel: simple: Add FriendlyELEC HD702E 800x1280 LCD panel HD702E lcd is FriendlyELEC developed eDP LCD panel with 800x1280 resolution. It has built in Goodix, GT9271 captive touchscreen with backlight adjustable via PWM. Add support for it. Signed-off-by: Jagan Teki Reviewed-by: Rob Herring Cc: Thierry Reding Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20190507130708.11255-2-jagan@amarulasolutions.com drivers/gpu/drm/panel/panel-simple.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 19b44b5257663fec1fea5cf62f4385a442b7a640 Author: Jagan Teki Date: Tue May 7 18:37:06 2019 +0530 dt-bindings: display: Document FriendlyELEC HD702E LCD panel HD702E lcd is FriendlyELEC developed eDP LCD panel with 800x1280 resolution. It has built in Goodix, GT9271 captive touchscreen with backlight adjustable via PWM. Add dt-bindings documentation for it. Signed-off-by: Jagan Teki Reviewed-by: Rob Herring Cc: Thierry Reding Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20190507130708.11255-1-jagan@amarulasolutions.com .../bindings/display/panel/friendlyarm,hd702e.txt | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 5a6ac10b17ff285440d6abea97b6942b13f82772 Author: Chris Wilson Date: Tue May 7 13:29:54 2019 +0100 drm/i915/execlists: Don't apply priority boost for resets Do not treat reset as a normal preemption event and avoid giving the guilty request a priority boost for simply being active at the time of reset. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190507122954.6299-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gt/intel_lrc.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 25d851adbf4c4faef5b1acbe81a92720d1bd173e Author: Chris Wilson Date: Tue May 7 13:25:44 2019 +0100 drm/i915: Only reschedule the submission tasklet if preemption is possible If we couple the scheduler more tightly with the execlists policy, we can apply the preemption policy to the question of whether we need to kick the tasklet at all for this priority bump. v2: Rephrase it as a core i915 policy and not an execlists foible. v3: Pull the kick together. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190507122544.12698-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gt/intel_engine.h | 18 --------------- drivers/gpu/drm/i915/gt/intel_lrc.c | 4 ++-- drivers/gpu/drm/i915/gt/selftest_lrc.c | 7 +++++- drivers/gpu/drm/i915/i915_request.c | 2 -- drivers/gpu/drm/i915/i915_scheduler.c | 34 ++++++++++++++++------------- drivers/gpu/drm/i915/i915_scheduler.h | 18 +++++++++++++++ drivers/gpu/drm/i915/intel_guc_submission.c | 3 ++- 7 files changed, 47 insertions(+), 39 deletions(-) commit 3970564940ba0322bcefce7fd8fd35c2b85846bf Author: Chris Wilson Date: Tue May 7 13:11:08 2019 +0100 drm/i915: Stop spinning for DROP_IDLE (debugfs/i915_drop_caches) If the user is racing a call to debugfs/i915_drop_caches with ongoing submission from another thread/process, we may never end up idling the GPU and be uninterruptibly spinning in debugfs/i915_drop_caches trying to catch an idle moment. Just flush the work once, that should be enough to park the system under correct conditions. Outside of those we either have a driver bug or the user is racing themselves. Sadly, because the user may be provoking the unwanted situation we can't put a warn here to attract attention to a probable bug. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190507121108.18377-4-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 1830374e1332c93f65399687b72ff55ca4d8c978 Author: Chris Wilson Date: Tue May 7 13:11:07 2019 +0100 drm/i915: Cancel retire_worker on parking Replace the racy continuation check within retire_work with a definite kill-switch on idling. The race was being exposed by gem_concurrent_blit where the retire_worker would be terminated too early leaving us spinning in debugfs/i915_drop_caches with nothing flushing the retirement queue. Although that the igt is trying to idle from one child while submitting from another may be a contributing factor as to why it runs so slowly... v2: Use the non-sync version of cancel_delayed_work(), we only need to stop it from being scheduled as we independently check whether now is the right time to be parking. Testcase: igt/gem_concurrent_blit Fixes: 79ffac8599c4 ("drm/i915: Invert the GEM wakeref hierarchy") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190507121108.18377-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_pm.c | 18 ++++++++++++------ drivers/gpu/drm/i915/selftests/mock_gem_device.c | 1 - 2 files changed, 12 insertions(+), 7 deletions(-) commit ae2306315fe83ba2523d557a8fe472d7c587c1ca Author: Chris Wilson Date: Tue May 7 13:11:06 2019 +0100 drm/i915: Remove delay for idle_work The original intent for the delay before running the idle_work was to provide a hysteresis to avoid ping-ponging the device runtime-pm. Since then we have also pulled in some memory management and general device management for parking. But with the inversion of the wakeref handling, GEM is no longer responsible for the wakeref and by the time we call the idle_work, the device is asleep. It seems appropriate now to drop the delay and just run the worker immediately to flush the cached GEM state before sleeping. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190507121108.18377-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_gem_pm.c | 21 +++++++-------------- drivers/gpu/drm/i915/selftests/i915_gem_object.c | 2 +- drivers/gpu/drm/i915/selftests/mock_gem_device.c | 4 ++-- 5 files changed, 12 insertions(+), 19 deletions(-) commit ba0001657f95332302bc6494d80ef9fae4e80283 Author: Chris Wilson Date: Tue May 7 13:11:05 2019 +0100 drm/i915: Flush the switch-to-kernel-context harder for DROP_IDLE To complete the idle worker, we must complete 2 passes of wait-for-idle. At the end of the first pass, we queue a switch-to-kernel-context and may only idle after waiting for its completion. Speed up the flush_work by doing the wait explicitly, which then allows us to remove the unbounded loop trying to complete the flush_work in the next patch. References: 79ffac8599c4 ("drm/i915: Invert the GEM wakeref hierarchy") Testcase: igt/gem_ppgtt/flind-and-close-vma-leak Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190507121108.18377-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 9e7251fa38978b85108c44743e1436d48e8d0d76 Author: Yingying Tang Date: Thu May 2 21:36:50 2019 +0800 ath10k: Check tx_stats before use it tx_stats will be freed and set to NULL before debugfs_sta node is removed in station disconnetion process. So if read the debugfs_sta node there may be NULL pointer error. Add check for tx_stats before use it to resove this issue. Signed-off-by: Yingying Tang Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/debugfs_sta.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 49ed34b835e231aa941257394716bc689bc98d9f Author: Wen Gong Date: Mon Apr 29 19:17:12 2019 +0800 ath10k: add peer id check in ath10k_peer_find_by_id For some SDIO chip, the peer id is 65535 for MPDU with error status, then test_bit will trigger buffer overflow for peer's memory, if kasan enabled, it will report error. Reason is when station is in disconnecting status, firmware do not delete the peer info since it not disconnected completely, meanwhile some AP will still send data packet to station, then hardware will receive the packet and send to firmware, firmware's logic will report peer id of 65535 for MPDU with error status. Add check for overflow the size of peer's peer_ids will avoid the buffer overflow access. Call trace of kasan: dump_backtrace+0x0/0x2ec show_stack+0x20/0x2c __dump_stack+0x20/0x28 dump_stack+0xc8/0xec print_address_description+0x74/0x240 kasan_report+0x250/0x26c __asan_report_load8_noabort+0x20/0x2c ath10k_peer_find_by_id+0x180/0x1e4 [ath10k_core] ath10k_htt_t2h_msg_handler+0x100c/0x2fd4 [ath10k_core] ath10k_htt_htc_t2h_msg_handler+0x20/0x34 [ath10k_core] ath10k_sdio_irq_handler+0xcc8/0x1678 [ath10k_sdio] process_sdio_pending_irqs+0xec/0x370 sdio_run_irqs+0x68/0xe4 sdio_irq_work+0x1c/0x28 process_one_work+0x3d8/0x8b0 worker_thread+0x508/0x7cc kthread+0x24c/0x264 ret_from_fork+0x10/0x18 Tested with QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00007-QCARMSWP-1. Signed-off-by: Wen Gong Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/txrx.c | 3 +++ 1 file changed, 3 insertions(+) commit 7835d8f8792dab0e3704951d5009c2b832d4513d Author: Surabhi Vishnoi Date: Wed Apr 17 14:01:47 2019 +0530 ath10k: Add wmi tlv service map for mesh 11s WCN3990 firmware advertises the service WMI_TLV_SERVICE_MESH_11S for mesh 11s. Map this wmi tlv service to enable mesh 11s for WCN3990. Tested HW: WCN3990 Signed-off-by: Surabhi Vishnoi Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/wmi-tlv.h | 2 ++ 1 file changed, 2 insertions(+) commit 97354f2c432788e3163134df6bb144f4b6289d87 Author: Surabhi Vishnoi Date: Wed Apr 17 14:01:46 2019 +0530 ath10k: Do not send probe response template for mesh Currently mac80211 do not support probe response template for mesh point. When WMI_SERVICE_BEACON_OFFLOAD is enabled, host driver tries to configure probe response template for mesh, but it fails because the interface type is not NL80211_IFTYPE_AP but NL80211_IFTYPE_MESH_POINT. To avoid this failure, skip sending probe response template to firmware for mesh point. Tested HW: WCN3990/QCA6174/QCA9984 Signed-off-by: Surabhi Vishnoi Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/mac.c | 4 ++++ 1 file changed, 4 insertions(+) commit a7368c395fc3ebd544cf6ceaca715adb4e85eff1 Author: Surabhi Vishnoi Date: Wed Apr 17 14:01:45 2019 +0530 ath10k: Add wmi tlv vdev subtype for mesh in WCN3990 There is a disparity in wmi and wmi tlv vdev subtype enum for WMI_VDEV_SUBTYPE_MESH_11S. Add different enum for wmi tlv vdev subtype to support vdev of subtype mesh 11s for WCN3990. Tested HW: WCN3990 Signed-off-by: Surabhi Vishnoi Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/wmi-tlv.c | 24 +++++++++++++++++++++++- drivers/net/wireless/ath/ath10k/wmi-tlv.h | 10 ++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) commit 8cdee1affe9000df55558fb1cd407b510f7406a6 Author: Wen Gong Date: Wed Apr 10 12:30:54 2019 +0800 ath10k: change swap mail box config for UTF mode of SDIO For SDIO chip, it does not have HTT connect step in boot phase of UTF mode, so it does not need the swap configuration for UTF mode, otherwise it will trigger UTF load fail. For normal mode, it is swap between HTT and WMI, for UTF mode, it does not have HTT, so it can not swap between HTT and WMI. Disable swap mail box for UTF mode will let UTF mode load success. Tested with QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00007-QCARMSWP-1. Signed-off-by: Wen Gong Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.c | 11 ++++++++--- drivers/net/wireless/ath/ath10k/sdio.c | 5 +++++ 2 files changed, 13 insertions(+), 3 deletions(-) commit 9280f4fc06f44d0b4dc9e831f72d97b3d7cd35d3 Author: Surabhi Vishnoi Date: Tue Apr 9 12:13:13 2019 +0530 ath10k: Fix the wrong value of enums for wmi tlv stats id The enum value for WMI_TLV_STAT_PDEV, WMI_TLV_STAT_VDEV and WMI_TLV_STAT_PEER is wrong, due to which the vdev stats are not received from firmware in wmi_update_stats event. Fix the enum values for above stats to receive all stats from firmware in WMI_TLV_UPDATE_STATS_EVENTID. Tested HW: WCN3990 Tested FW: WLAN.HL.3.1-00784-QCAHLSWMTPLZ-1 Fixes: f40a307eb92c ("ath10k: Fill rx duration for each peer in fw_stats for WCN3990) Signed-off-by: Surabhi Vishnoi Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/wmi.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 4f735cd73650d8136f8bd78dca8f61f361791622 Author: Gustavo A. R. Silva Date: Wed Apr 3 14:06:36 2019 -0500 ath10k: coredump: use struct_size() helper Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes, in particular in the context in which this code is being used. So, replace code of the following form: sizeof(*ce_hdr) + CE_COUNT * sizeof(ce_hdr->entries[0]) with: struct_size(ce_hdr, entries, CE_COUNT) This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/coredump.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 35b50e70df272a4b4d313b7042e386445c98f06d Author: Gustavo A. R. Silva Date: Wed Apr 3 12:20:29 2019 -0500 ath10k: Use struct_size() helper Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes, in particular in the context in which this code is being used. So, change the following form: sizeof(*rx) + (sizeof(struct htt_rx_indication_mpdu_range) * num_mpdu_ranges) to : struct_size(rx, mpdu_ranges, num_mpdu_ranges) This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/htt_rx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 42f1bc43e6a97b9ddbe976eba9bd05306c990c75 Author: Rakesh Pillai Date: Tue Apr 2 18:12:50 2019 +0530 ath10k: Fix encoding for protected management frames Currently the protected management frames are not appended with the MIC_LEN which results in the protected management frames being encoded incorrectly. Add the extra space at the end of the protected management frames to fix this encoding error for the protected management frames. Tested HW: WCN3990 Tested FW: WLAN.HL.3.1-00784-QCAHLSWMTPLZ-1 Fixes: 1807da49733e ("ath10k: wmi: add management tx by reference support over wmi") Signed-off-by: Rakesh Pillai Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/wmi-tlv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 5c51875c09431af01d3bce189c4c47c72cc533c9 Author: Balaji Pothunoori Date: Tue Mar 12 16:47:50 2019 +0530 ath10k: rx_duration update for fw_stats debugfs entry Currently instant rx_duration always fetching as zero in fw_stats debugfs entry if extended peer stats event supports. This patch updates instant rx_duration in fw_stats entry based on extended peer stats and maintaining backward compatibility for 10.2/10.x. Tested HW: QCA9984. Tested FW: 10.4-3.6.0.1-00004. Signed-off-by: Balaji Pothunoori Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.h | 2 +- drivers/net/wireless/ath/ath10k/debug.c | 3 +++ drivers/net/wireless/ath/ath10k/wmi.c | 37 +++++++++++++++++++++++++++------ 3 files changed, 35 insertions(+), 7 deletions(-) commit 9e0b341a3d664eb95df2f56d180ee9d96786f860 Author: Brandon Huang Date: Tue Mar 12 12:33:39 2019 +0800 ath10k: Fix the tx stats bytes & packets parsing In tx_stats debugfs, txrate->flags may contain multiple bits. For example, RATE_INFO_FLAGS_SHORT_GI could be set, and tx stats bytes and packets will be not updated correctly. Fix this issue by using bit operation to check txrate->flags. Tested HW: QCA9984 Tested Firmware: 10.4-3.9.0.1-00007 Signed-off-by: Brandon Huang Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/htt_rx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 889ab61d9dc1042c6707582da1c95b6dae5632ee Author: Govind Singh Date: Sat Mar 2 10:06:05 2019 +0530 ath10k: Modify CE4 src buffer entries to 2048 for WCN3990 CE4 is host to target HTT tx pipe, tx completion are not served on time when CPU is loaded and this cause ce src ring full condition due to less no of src buffer entries. To mitigate the issue increase CE4 src buffer entries to 2048. Testing: Tested on QCS404 platform(WCN3990 HW) Tested FW: WLAN.HL.3.1-00784-QCAHLSWMTPLZ-1 Signed-off-by: Govind Singh Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/snoc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7b612ed94d0a4ce4fa457c070baa0e3a5eb35c18 Author: Govind Singh Date: Fri Mar 1 20:20:00 2019 +0530 ath10k: Move board id and fw version logging to info level Board id and fw version is not printed by default in qmi cap response message. Move board id and fw version logging to info level for default logging. [ 34.005399] ath10k_snoc a000000.wifi: qmi chip_id 0x30b chip_family 0x4001 board_id 0xff soc_id 0x40070000 [ 34.005432] ath10k_snoc a000000.wifi: qmi fw_version 0x3106836b fw_build_timestamp 2019-02-13 10:24 fw_build_id QC_IMAGE_VERSION_STRING=WLAN.HL.3.1-00875-QCAHLSWMTPL-1 Signed-off-by: Govind Singh Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/qmi.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 473a4084e19e3fe4ad11ff7bdb7552d0b41cd6f1 Author: Maharaja Kennadyrajan Date: Wed Feb 27 16:54:42 2019 +0530 ath10k: Added support to reset HTT stats in debugfs Reset HTT stats helps to get the aggregated HTT stats via tracing and also we can clear the accumulated HTT stats with this debugfs file. Signed-off-by: Maharaja Kennadyrajan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.h | 1 + drivers/net/wireless/ath/ath10k/debug.c | 43 +++++++++++++++++++++++++++++++- drivers/net/wireless/ath/ath10k/htt.h | 3 ++- drivers/net/wireless/ath/ath10k/htt_tx.c | 5 ++-- 4 files changed, 48 insertions(+), 4 deletions(-) commit 14bf9217d66dc799da0cda5f98aa49c6d3884120 Author: Maharaja Kennadyrajan Date: Wed Feb 27 16:54:41 2019 +0530 ath10k: Extended the HTT stats support to retrieve Mu-MIMO related stats Extended the bit mask value of the HTT stats to get the Mu-MIMO related stats via tracing. Signed-off-by: Maharaja Kennadyrajan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/debug.c | 4 ++-- drivers/net/wireless/ath/ath10k/htt.h | 3 ++- drivers/net/wireless/ath/ath10k/htt_tx.c | 8 ++++---- 3 files changed, 8 insertions(+), 7 deletions(-) commit 05d9c8783bb29ddcfeceb50fe21d5f5dc7c814ca Author: Clinton Taylor Date: Mon Apr 29 16:08:11 2019 -0700 drm/i915/icl: Set GCP_COLOR_INDICATION only for 10/12 bit deep color v2: Fix commit msg to reflect why issue occurs(Jani) Set GCP_COLOR_INDICATION only when we set 10/12 bit deep color. Changing settings from 10/12 bit deep color to 8 bit(& vice versa) doesn't work correctly using xrandr max bpc property. When we connect a monitor which supports deep color, the highest deep color setting is selected; which sets GCP_COLOR_INDICATION. When we change the setting to 8 bit color, we still set GCP_COLOR_INDICATION which doesn't allow the switch back to 8 bit color. v3,4: Add comments & drop changes in intel_hdmi_compute_config(Ville) Since HSW+, GCP_COLOR_INDICATION is not required for 8bpc. Drop the changes in intel_hdmi_compute_config as desired_bpp is needed to change values for pipe_bpp based on bw_constrained flag. v5: Fix missing logical && in condition for setting GCP_COLOR_INDICATION. v6: Fix comment formatting (Ville) v7: Add reviewed by Ville v8: Set GCP_COLOR_INDICATION based on spec: For Gen 7.5 or later platforms, indicate color depth only for deep color modes. Bspec: 8135,7751,50524 Pre DDI platforms, indicate color depth if deep color is supported by sink. Bspec: 7854 Exception: CHERRYVIEW behaves like Pre DDI platforms. Bspec: 15975 Check pipe_bpp is less than bpp * 3 in hdmi_deep_color_possible, to not set 12 bit deep color for every modeset. This fixes the issue where 12 bit color was selected even when user selected 10 bit.(Ville) v9: Maintain a consistent behavior for all platforms and support GCP_COLOR_INDICATION only when we are in deep color mode. Remove hdmi_sink_is_deep_color() - no longer needed as checking pipe_bpp > 24 takes care of the deep color mode scenario. Separate patch for fixing switch from 12 bit to 10 bit deep color mode. Co-developed-by: Aditya Swarup Signed-off-by: Clinton Taylor Signed-off-by: Aditya Swarup Cc: Ville Syrjälä Cc: Jani Nikula Cc: Manasi Navare Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190429230811.9983-1-aditya.swarup@intel.com drivers/gpu/drm/i915/intel_hdmi.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) commit dc58958d08bb60004d20af7842f5894f83c928c1 Author: Chris Wilson Date: Fri May 3 12:52:15 2019 +0100 drm/i915: Assert the local engine->wakeref is active Due to the asynchronous tasklet and recursive GT wakeref, it may happen that we submit to the engine (underneath it's own wakeref) prior to the central wakeref being marked as taken. Switch to checking the local wakeref for greater consistency. Fixes: 79ffac8599c4 ("drm/i915: Invert the GEM wakeref hierarchy") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190503115225.30831-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gt/intel_engine_cs.c | 3 +++ drivers/gpu/drm/i915/gt/intel_lrc.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) commit 7ee280a75fd922ac32aa7ed67cd72bdf64952b3a Author: Chris Wilson Date: Fri May 3 12:52:14 2019 +0100 drm/i915: Prefer checking the wakeref itself rather than the counter The counter goes to zero at the start of the parking cycle, but the wakeref itself is held until the end. Likewise, the counter becomes one at the end of the unparking, but the wakeref is taken first. If we check the wakeref instead of the counter, we include the unpark/unparking time as intel_wakeref_is_active(), and do not spuriously declare inactive if we fail to park (i.e. the parking and wakeref drop is postponed). Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190503115225.30831-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_wakeref.c | 20 +++++++++++++++++--- drivers/gpu/drm/i915/intel_wakeref.h | 2 +- 2 files changed, 18 insertions(+), 4 deletions(-) commit 39f94a89a90b3fa70e191716527c719e712e5076 Author: Chris Wilson Date: Fri May 3 16:22:14 2019 +0100 drm/i915: Assert breadcrumbs are correctly ordered in the signal handler Inside the signal handler, we expect the requests to be ordered by their breadcrumb such that no later request may be complete if we find an earlier incomplete. Add an assert to check that the next breadcrumb should not be logically before the current. v2: Move the overhanging line into its own function and reuse it after doing the insertion. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190503152214.26517-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gt/intel_breadcrumbs.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit c8a0e2aef61f1dade1ef5b3833e00e7ec6ad1c4c Author: Chris Wilson Date: Fri May 3 15:02:39 2019 +0100 drm/i915: Acquire the signaler's timeline HWSP last Acquiring the signaler's timeline takes an active reference to their HWSP that we would like to avoid if possible, so take it after performing all of our allocations required to set up the fencing. The acquisition also provides the final check that the target has not already signaled allowing us to avoid the semaphore at the last moment. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190503140239.32668-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_request.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 27edadf6df811bcad0f7fa2f89321b4590a425bc Author: Daniel Vetter Date: Mon May 6 16:46:29 2019 +0200 drm/doc: Improve docs for conn_state->best_encoder It's mandatory and considered core state since ioctls rely on this working. Thanks to Laurent for pointing out this gap. v2: Clarify to "atomic drivers" only. Cc: Laurent Pinchart Cc: Sean Paul Acked-by: Sean Paul Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190506144629.5976-1-daniel.vetter@ffwll.ch include/drm/drm_connector.h | 4 ++++ 1 file changed, 4 insertions(+) commit 7a00b45af3e723ff51d015ed72dc97487bb034b5 Author: Jagadeesh Pagadala Date: Fri May 3 23:28:13 2019 +0530 gpu/drm: Remove duplicate headers Remove duplicate headers which are included twice. Signed-off-by: Jagadeesh Pagadala Acked-by: Rob Clark Acked-by: Dave Airlie [danvet: drop changes to panel-raspberrypi, they break the build] Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1556906293-128921-1-git-send-email-jagdsh.linux@gmail.com drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c | 1 - drivers/gpu/drm/nouveau/nvkm/subdev/bus/nv04.c | 2 -- 2 files changed, 3 deletions(-) commit 753c36a4d8a85beeb97640d1f91f2ead6aaee85e Author: Dylan Reid Date: Mon May 6 13:30:06 2019 -0700 ASoC: rt5677: use more of the volume range from DACs The DACs volume can go over 0, both according to the data sheet and real world testing. The control can go up to +30dB. This was tested by playing audio at full volume on a samus chromebook. Signed-off-by: Dylan Reid Reviewed-by: Hsinyu Chao Signed-off-by: Ross Zwisler Signed-off-by: Curtis Malainey Signed-off-by: Mark Brown sound/soc/codecs/rt5677.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b2d337d8de9fb6dd4f2970ebec0fa2375f7c9cdd Author: S.j. Wang Date: Fri May 3 12:49:44 2019 -0700 ASoC: fsl_esai: Add pm runtime function Add pm runtime support and move clock handling there. Close the clocks at suspend to reduce the power consumption. fsl_esai_suspend is replaced by pm_runtime_force_suspend. fsl_esai_resume is replaced by pm_runtime_force_resume. Signed-off-by: Shengjiu Wang Signed-off-by: Nicolin Chen Signed-off-by: Mark Brown sound/soc/fsl/fsl_esai.c | 141 ++++++++++++++++++++++++++--------------------- 1 file changed, 77 insertions(+), 64 deletions(-) commit 1a5c0b28fc56044737f988960f3bc5fdcdba0827 Author: Olivier Moysan Date: Mon May 6 14:44:06 2019 +0200 ASoC: stm32: spdifrx: manage identification registers Add support of identification registers in STM32 SPDIFRX. Signed-off-by: Olivier Moysan Signed-off-by: Mark Brown sound/soc/stm/stm32_spdifrx.c | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) commit b9960f6ea22da072c2fb27305a1a51517c3643fe Author: Curtis Malainey Date: Fri May 3 12:33:42 2019 -0700 ASoC: rt5677-spi: Rename driver to differentiate from main codec Currently the SPI driver and the main codec share the same name. This will become confusing when looking up components when using both drivers. Signed-off-by: Curtis Malainey Signed-off-by: Mark Brown sound/soc/codecs/rt5677-spi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 53fdea9604fa1560bdbf418bbca564dbbebef211 Author: Mac Chiang Date: Fri May 3 10:48:17 2019 +0800 ASoC: Intel: boards: kbl_da7219_max98927: add dai_trigger function amplifier feedback is not modeled as being dependent on any active output. Even when there is no playback happening, parts of the graph, specifically the IV sense->speaker protection->output remains active and this prevents the DSP from entering low-power states. This patch suggest a machine driver level approach where the speaker pins are enabled/disabled dynamically depending on stream start/stop events. DPAM graph representations show the feedback loop is indeed disabled and low-power states can be reached. Signed-off-by: Jenny TC Signed-off-by: Harshapriya.n Signed-off-by: Mac Chiang Acked-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/boards/kbl_da7219_max98927.c | 73 +++++++++++++++++++++++++++- 1 file changed, 71 insertions(+), 2 deletions(-) commit 46034d2bb7c8d809e261bde6e2d7b73273a0ff36 Author: Ville Syrjälä Date: Fri May 3 22:31:43 2019 +0300 drm/i915: Move the hsw/bdw pc8 code to intel_runtime_pm.c hsw_enable_pc8()/hsw_disable_pc8() are more less equivalent to the display core init/unit functions of later platforms. Relocate the hsw/bdw code into intel_runtime_pm.c so that it sits next to its cousins. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190503193143.28240-2-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak drivers/gpu/drm/i915/intel_display.c | 222 +------------------------------ drivers/gpu/drm/i915/intel_display.h | 4 + drivers/gpu/drm/i915/intel_drv.h | 2 - drivers/gpu/drm/i915/intel_runtime_pm.c | 223 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_runtime_pm.h | 2 + 5 files changed, 230 insertions(+), 223 deletions(-) commit 8f91cfd2e7ff7714887ab7bbb0319268e8c92bcf Author: Ville Syrjälä Date: Fri May 3 22:31:42 2019 +0300 drm/i915: Replace intel_ddi_pll_init() intel_ddi_pll_init() is an anachronism. Rename it to hsw_assert_cdclk() and move it to the power domain init code. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190503193143.28240-1-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak drivers/gpu/drm/i915/intel_dpll_mgr.c | 25 ------------------------- drivers/gpu/drm/i915/intel_runtime_pm.c | 22 +++++++++++++++++++++- 2 files changed, 21 insertions(+), 26 deletions(-) commit c91a45f421e358c1d7899e0ba4e00638c06111af Author: Ville Syrjälä Date: Fri May 3 20:38:07 2019 +0300 drm/i915: Move w/a 0477/WaDisableIPC:skl into intel_init_ipc() Move the w/a to disable IPC on SKL closer to the actual code that implements IPS. Otherwise I just end up confused as to what is excluding SKL from considerations. IMO this makes more sense anyway since the hw does have the feature, we're just not supposed to use it. And this also makes us actually disable IPC in case eg. the BIOS enabled it when it shouldn't have. Signed-off-by: Ville Syrjälä Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20190503173807.10834-3-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/i915_pci.c | 2 -- drivers/gpu/drm/i915/intel_pm.c | 19 ++++++++++++++----- 2 files changed, 14 insertions(+), 7 deletions(-) commit 5a7d202b157490dc0ad5bca52ba1a77af65a1e94 Author: Ville Syrjälä Date: Fri May 3 20:38:06 2019 +0300 drm/i915: Drop WaIncreaseLatencyIPCEnabled/1140 for cnl Drop WaIncreaseLatencyIPCEnabled/Display w/a #1140 for early cnl steppings. v2: Drop the IS_GEN9_BC() change since other related parts of the code also use the KBL||CFL pattern Signed-off-by: Ville Syrjälä Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20190503173807.10834-2-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_pm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 25312ef1360023e2f44a929d57ccb7455d07a7f5 Author: Ville Syrjälä Date: Fri May 3 20:38:05 2019 +0300 drm/i915: Document that we implement WaIncreaseLatencyIPCEnabled Display w/a #1141 is also known as WaIncreaseLatencyIPCEnabled. Add that to the comment. Signed-off-by: Ville Syrjälä Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20190503173807.10834-1-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_pm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit fa2b7c21d9b974b5b1b4f63a02edeaf049054dba Author: Robert Foss Date: Mon May 6 11:10:34 2019 +0200 drm/virtio: Remove redundant return type virtio_gpu_fence_emit() always returns 0, since it has no error paths. Consequently no calls for virtio_gpu_fence_emit() use the return value, and it can be removed. Signed-off-by: Robert Foss Reviewed-by: Chia-I Wu Link: http://patchwork.freedesktop.org/patch/msgid/20190506091034.30289-1-robert.foss@collabora.com Suggested-by: Emil Velikov Reviewed-by: Chia-I Wu Signed-off-by: Gerd Hoffmann drivers/gpu/drm/virtio/virtgpu_drv.h | 2 +- drivers/gpu/drm/virtio/virtgpu_fence.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) commit 9c79edecb0e2416512cd17fd291b768051afd3af Author: Jani Nikula Date: Mon May 6 12:52:48 2019 +0300 drm/edid: drmP.h include removal Continue to get rid of drmP.h. Add minimal includes to build. Sort includes while at it. Reviewed-by: Noralf Trønnes Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190506095248.20874-2-jani.nikula@intel.com drivers/gpu/drm/drm_edid.c | 11 +++++++---- drivers/gpu/drm/drm_edid_load.c | 7 +++++-- 2 files changed, 12 insertions(+), 6 deletions(-) commit 580fc13f3ee438ca08d8ecfd337a8b1b555fcc35 Author: Jani Nikula Date: Mon May 6 12:52:47 2019 +0300 drm/dp: drmP.h include removal Continue to get rid of drmP.h. Add minimal includes to build. Sort includes while at it. Reviewed-by: Noralf Trønnes Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190506095248.20874-1-jani.nikula@intel.com drivers/gpu/drm/drm_dp_aux_dev.c | 8 +++++--- drivers/gpu/drm/drm_dp_dual_mode_helper.c | 4 +++- drivers/gpu/drm/drm_dp_helper.c | 12 +++++++----- drivers/gpu/drm/drm_dp_mst_topology.c | 13 +++++++------ 4 files changed, 22 insertions(+), 15 deletions(-) commit 4d8979b3a6966e8d4d600f1783b58e77c2dbc0ff Author: Chia-I Wu Date: Mon Apr 29 15:10:21 2019 -0700 drm/virtio: allocate fences with GFP_KERNEL It was changed to GFP_ATOMIC in commit ec2f0577c (add & use virtio_gpu_queue_fenced_ctrl_buffer) because the allocation happened with a spinlock held. That was no longer true after commit 9fdd90c0f (add virtio_gpu_alloc_fence()). Signed-off-by: Chia-I Wu Reviewed-by: Robert Foss Reviewed-by: Emil Velikov Link: http://patchwork.freedesktop.org/patch/msgid/20190429221021.159784-1-olvaffe@gmail.com Cc: Gerd Hoffmann Cc: Gustavo Padovan Cc: Robert Foss Signed-off-by: Gerd Hoffmann drivers/gpu/drm/virtio/virtgpu_fence.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5daf8857c9909903348a1559586be8a09564089e Author: Chia-I Wu Date: Mon Apr 29 15:08:25 2019 -0700 drm/virtio: add trace events for commands Trace when commands are queued for both ctrlq and cursorq. Trace when responses are received for ctrlq. Signed-off-by: Chia-I Wu Link: http://patchwork.freedesktop.org/patch/msgid/20190429220825.156644-3-olvaffe@gmail.com Signed-off-by: Gerd Hoffmann drivers/gpu/drm/virtio/Makefile | 2 +- drivers/gpu/drm/virtio/virtgpu_trace.h | 52 +++++++++++++++++++++++++++ drivers/gpu/drm/virtio/virtgpu_trace_points.c | 5 +++ drivers/gpu/drm/virtio/virtgpu_vq.c | 10 ++++++ 4 files changed, 68 insertions(+), 1 deletion(-) commit 48ad7751dbd1facd5500c4718698aec550aaea6e Author: Chia-I Wu Date: Mon Apr 29 15:08:24 2019 -0700 drm/virtio: trace drm_fence_emit For most drivers, drm_fence_init is followed by drm_fence_emit immediately. But for our driver, they are done separately. We also don't know the fence seqno until drm_fence_emit. Signed-off-by: Chia-I Wu Link: http://patchwork.freedesktop.org/patch/msgid/20190429220825.156644-2-olvaffe@gmail.com Signed-off-by: Gerd Hoffmann drivers/gpu/drm/virtio/virtgpu_fence.c | 3 +++ 1 file changed, 3 insertions(+) commit efe2bf965522bf0796d413b47a2abbf81d471d6f Author: Chia-I Wu Date: Mon Apr 29 15:08:23 2019 -0700 drm/virtio: set seqno for dma-fence This is motivated by having meaningful ftrace events, but it also fixes use cases where dma_fence_is_later is called, such as in sync_file_merge. In other drivers, fence creation and cmdbuf submission normally happen atomically, mutex_lock(); fence = dma_fence_create(..., ++timeline->seqno); submit_cmdbuf(); mutex_unlock(); and have no such issue. But in our driver, because most ioctls queue commands into ctrlq, we do not want to grab a lock. Instead, we set seqno to 0 when a fence is created, and update it when the command is finally queued and the seqno is known. Signed-off-by: Chia-I Wu Reviewed-by: Emil Velikov Link: http://patchwork.freedesktop.org/patch/msgid/20190429220825.156644-1-olvaffe@gmail.com Signed-off-by: Gerd Hoffmann drivers/gpu/drm/virtio/virtgpu_drv.h | 1 - drivers/gpu/drm/virtio/virtgpu_fence.c | 17 ++++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) commit 1f358bc6f272b9846dda4c1a9ab05aa1afa06954 Author: Fabien Dessenne Date: Wed Apr 24 16:03:21 2019 +0200 drm/stm: ltdc: return appropriate error code during probe During probe, return the "clk_get" error value instead of -ENODEV. Signed-off-by: Fabien Dessenne Acked-by: Philippe Cornu Signed-off-by: Benjamin Gaignard Link: https://patchwork.freedesktop.org/patch/msgid/1556114601-30936-3-git-send-email-fabien.dessenne@st.com drivers/gpu/drm/stm/ltdc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 9e759fc7dcd6d416f64567ae8b3b07184c60dedb Author: Fabien Dessenne Date: Wed Apr 24 16:03:20 2019 +0200 drm/stm: ltdc: manage the get_irq probe defer case Manage the -EPROBE_DEFER error case for the ltdc IRQ. Signed-off-by: Fabien Dessenne Acked-by: Philippe Cornu Signed-off-by: Benjamin Gaignard Link: https://patchwork.freedesktop.org/patch/msgid/1556114601-30936-2-git-send-email-fabien.dessenne@st.com drivers/gpu/drm/stm/ltdc.c | 3 +++ 1 file changed, 3 insertions(+) commit b1f4c9a3c78c70b05b2d844cc72c17d3620ba543 Author: Philippe Schenker Date: Fri May 3 15:57:23 2019 +0200 iio: stmpe-adc: Remove unnecessary assignment Remove unnecessary assignment. This could potentially cause an issue, if the wait function runs into a timeout. Furthermore is this assignment also not there in stmpe_read_temp() Signed-off-by: Philippe Schenker Signed-off-by: Jonathan Cameron drivers/iio/adc/stmpe-adc.c | 2 -- 1 file changed, 2 deletions(-) commit c57c54bc9758ac0a7cacfece8eb2aba5b2732228 Author: Vatsala Narang Date: Wed May 1 12:45:41 2019 +0530 staging: iio: adc: Add paragraph to describe Kconfig symbol This patch updates Kconfig with paragraph that describe config symbol fully.Issue addressed by checkpatch. Signed-off-by: Vatsala Narang Signed-off-by: Jonathan Cameron drivers/staging/iio/adc/Kconfig | 3 +++ 1 file changed, 3 insertions(+) commit a8b7ca187fd21e9bd53c57eb8c97124ef01fea04 Author: João Seckler Date: Mon Apr 29 14:59:40 2019 -0300 staging: iio: adt7316: match parenthesis alignment This patch solves the following checkpatch.pl message: CHECK: Alignment should match open parenthesis. This makes the file more compliant with the preferred coding style for the Linux kernel. Signed-off-by: João Seckler Signed-off-by: Jonathan Cameron drivers/staging/iio/addac/adt7316.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5c25531d4b43c377544d2553f3a8e51d84037ca6 Author: Geert Uytterhoeven Date: Mon Apr 29 17:24:09 2019 +0200 iio: adc: rcar-gyroadc: Remove devm_iio_device_alloc() error printing devm_iio_device_alloc() can only fail due to a memory or IDA allocation failure. Hence there is no need to print a message, as the memory allocation or IIO core code already takes care of that. Signed-off-by: Geert Uytterhoeven Signed-off-by: Jonathan Cameron drivers/iio/adc/rcar-gyroadc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit cf54f4dd07a652d9a0630ec4e82c5ff082d2a14e Author: Brian Masney Date: Sat Apr 27 14:23:59 2019 -0400 dt-bindings: iio: isl29018: convert bindings to YAML format Convert the isl29018 device tree bindings to the new YAML format. Signed-off-by: Brian Masney Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron .../devicetree/bindings/iio/light/isl29018.txt | 27 ----------- .../devicetree/bindings/iio/light/isl29018.yaml | 56 ++++++++++++++++++++++ 2 files changed, 56 insertions(+), 27 deletions(-) commit 7fc1148cfde1c0d53930c7a5ac62b5bffe7b0e0b Author: Zhiyong Tao Date: Wed Apr 24 09:11:11 2019 +0800 dt-bindings: adc: mt8183: add binding document The commit adds mt8183 compatible node in binding document. Signed-off-by: Zhiyong Tao Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/adc/mt6577_auxadc.txt | 1 + 1 file changed, 1 insertion(+) commit de166bbe861738c8bc3e5dad5b03f45d7d6ef914 Author: YueHaibing Date: Sun Apr 28 23:48:10 2019 +0800 ieee802154: hwsim: unregister hw while hwsim_subscribe_all_others fails KASAN report this: kernel BUG at net/mac802154/main.c:130! invalid opcode: 0000 [#1] PREEMPT SMP CPU: 0 PID: 19932 Comm: modprobe Not tainted 5.1.0-rc6+ #22 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.9.3-0-ge2fc41e-prebuilt.qemu-project.org 04/01/2014 RIP: 0010:ieee802154_free_hw+0x2a/0x30 [mac802154] Code: 55 48 8d 57 38 48 89 e5 53 48 89 fb 48 8b 47 38 48 39 c2 75 15 48 8d 7f 48 e8 82 85 16 e1 48 8b 7b 28 e8 f9 ef 83 e2 5b 5d c3 <0f> 0b 0f 1f 40 00 55 48 89 e5 53 48 89 fb 0f b6 86 80 00 00 00 88 RSP: 0018:ffffc90001c7b9f0 EFLAGS: 00010206 RAX: ffff88822df3aa80 RBX: ffff88823143d5c0 RCX: 0000000000000002 RDX: ffff88823143d5f8 RSI: ffff88822b1fabc0 RDI: ffff88823143d5c0 RBP: ffffc90001c7b9f8 R08: 0000000000000000 R09: 0000000000000001 R10: 0000000000000000 R11: 0000000000000000 R12: 00000000fffffff4 R13: ffff88822dea4f50 R14: ffff88823143d7c0 R15: 00000000fffffff4 FS: 00007ff52e999540(0000) GS:ffff888237a00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fdc06dba768 CR3: 000000023160a000 CR4: 00000000000006f0 Call Trace: hwsim_add_one+0x2dd/0x540 [mac802154_hwsim] hwsim_probe+0x2f/0xb0 [mac802154_hwsim] platform_drv_probe+0x3a/0x90 ? driver_sysfs_add+0x79/0xb0 really_probe+0x1d4/0x2d0 driver_probe_device+0x50/0xf0 device_driver_attach+0x54/0x60 __driver_attach+0x7e/0xd0 ? device_driver_attach+0x60/0x60 bus_for_each_dev+0x68/0xc0 driver_attach+0x19/0x20 bus_add_driver+0x15e/0x200 driver_register+0x5b/0xf0 __platform_driver_register+0x31/0x40 hwsim_init_module+0x74/0x1000 [mac802154_hwsim] ? 0xffffffffa00e9000 do_one_initcall+0x6c/0x3cc ? kmem_cache_alloc_trace+0x248/0x3b0 do_init_module+0x5b/0x1f1 load_module+0x1db1/0x2690 ? m_show+0x1d0/0x1d0 __do_sys_finit_module+0xc5/0xd0 __x64_sys_finit_module+0x15/0x20 do_syscall_64+0x6b/0x1d0 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7ff52e4a2839 Code: 00 f3 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 1f f6 2c 00 f7 d8 64 89 01 48 RSP: 002b:00007ffffa7b3c08 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 RAX: ffffffffffffffda RBX: 00005647560a2a00 RCX: 00007ff52e4a2839 RDX: 0000000000000000 RSI: 00005647547f3c2e RDI: 0000000000000003 RBP: 00005647547f3c2e R08: 0000000000000000 R09: 00005647560a2a00 R10: 0000000000000003 R11: 0000000000000246 R12: 0000000000000000 R13: 00005647560a2c10 R14: 0000000000040000 R15: 00005647560a2a00 Modules linked in: mac802154_hwsim(+) mac802154 [last unloaded: mac802154_hwsim] In hwsim_add_one, if hwsim_subscribe_all_others fails, we should call ieee802154_unregister_hw to free resources. Reported-by: Hulk Robot Fixes: f25da51fdc38 ("ieee802154: hwsim: add replacement for fakelb") Signed-off-by: YueHaibing Acked-by: Alexander Aring Signed-off-by: Stefan Schmidt drivers/net/ieee802154/mac802154_hwsim.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 1cbbbf39efab05fae67f59e6ed01bb85061c69e2 Author: YueHaibing Date: Sun Apr 28 22:14:51 2019 +0800 ieee802154: hwsim: Fix error handle path in hwsim_init_module KASAN report this: BUG: unable to handle kernel paging request at fffffbfff834f001 PGD 237fe8067 P4D 237fe8067 PUD 237e64067 PMD 1c968d067 PTE 0 Oops: 0000 [#1] SMP KASAN PTI CPU: 1 PID: 8871 Comm: syz-executor.0 Tainted: G C 5.0.0+ #5 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1ubuntu1 04/01/2014 RIP: 0010:strcmp+0x31/0xa0 lib/string.c:328 Code: 00 00 00 00 fc ff df 55 53 48 83 ec 08 eb 0a 84 db 48 89 ef 74 5a 4c 89 e6 48 89 f8 48 89 fa 48 8d 6f 01 48 c1 e8 03 83 e2 07 <42> 0f b6 04 28 38 d0 7f 04 84 c0 75 50 48 89 f0 48 89 f2 0f b6 5d RSP: 0018:ffff8881e0c57800 EFLAGS: 00010246 RAX: 1ffffffff834f001 RBX: ffffffffc1a78000 RCX: ffffffff827b9503 RDX: 0000000000000000 RSI: ffffffffc1a40008 RDI: ffffffffc1a78008 RBP: ffffffffc1a78009 R08: fffffbfff6a92195 R09: fffffbfff6a92195 R10: ffff8881e0c578b8 R11: fffffbfff6a92194 R12: ffffffffc1a40008 R13: dffffc0000000000 R14: ffffffffc1a3e470 R15: ffffffffc1a40000 FS: 00007fdcc02ff700(0000) GS:ffff8881f7300000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: fffffbfff834f001 CR3: 00000001b3134003 CR4: 00000000007606e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: genl_family_find_byname+0x7f/0xf0 net/netlink/genetlink.c:104 genl_register_family+0x1e1/0x1070 net/netlink/genetlink.c:333 ? 0xffffffffc1978000 hwsim_init_module+0x6a/0x1000 [mac802154_hwsim] ? 0xffffffffc1978000 ? 0xffffffffc1978000 ? 0xffffffffc1978000 do_one_initcall+0xbc/0x47d init/main.c:887 do_init_module+0x1b5/0x547 kernel/module.c:3456 load_module+0x6405/0x8c10 kernel/module.c:3804 __do_sys_finit_module+0x162/0x190 kernel/module.c:3898 do_syscall_64+0x9f/0x450 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x462e99 Code: f7 d8 64 89 02 b8 ff ff ff ff c3 66 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fdcc02fec58 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 RAX: ffffffffffffffda RBX: 000000000073bf00 RCX: 0000000000462e99 RDX: 0000000000000000 RSI: 0000000020000200 RDI: 0000000000000003 RBP: 00007fdcc02fec70 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fdcc02ff6bc R13: 00000000004bcefa R14: 00000000006f6fb0 R15: 0000000000000004 Modules linked in: mac802154_hwsim(+) mac802154 ieee802154 speakup(C) rc_proteus_2309 rtc_rk808 streebog_generic rds vboxguest madera_spi madera da9052_wdt mISDN_core ueagle_atm usbatm atm ir_imon_decoder scsi_transport_sas rc_dntv_live_dvb_t panel_samsung_s6d16d0 drm drm_panel_orientation_quirks lib80211 fb_agm1264k_fl(C) gspca_pac7302 gspca_main videobuf2_v4l2 soundwire_intel_init i2c_dln2 dln2 usbcore hid_gaff 88pm8607 nfnetlink axp20x_i2c axp20x uio pata_marvell pmbus_core snd_sonicvibes gameport snd_pcm snd_opl3_lib snd_timer snd_hwdep snd_mpu401_uart snd_rawmidi snd_seq_device snd soundcore rtc_ds1511 rtc_ds1742 vsock dwc_xlgmac rtc_rx8010 libphy twofish_x86_64_3way twofish_x86_64 twofish_common ad5696_i2c ad5686 lp8788_charger cxd2880_spi dvb_core videobuf2_common videodev media videobuf2_vmalloc videobuf2_memops fbtft(C) sysimgblt sysfillrect syscopyarea fb_sys_fops janz_ican3 firewire_net firewire_core crc_itu_t spi_slave_system_control i2c_matroxfb i2c_algo_bit matroxfb_base fb fbdev matroxfb_DAC1064 matroxfb_accel cfbcopyarea cfbimgblt cfbfillrect matroxfb_Ti3026 matroxfb_g450 g450_pll matroxfb_misc leds_blinkm ti_dac7311 intel_spi_pci intel_spi spi_nor hid_elan hid async_tx rc_cinergy_1400 rc_core intel_ishtp kxcjk_1013 industrialio_triggered_buffer kfifo_buf can_dev intel_th spi_pxa2xx_platform pata_artop vme_ca91cx42 gb_gbphy(C) greybus(C) industrialio mptbase st_drv cmac ttpci_eeprom via_wdt gpio_xra1403 mtd iptable_security iptable_raw iptable_mangle iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 iptable_filter bpfilter ip6_vti ip_vti ip_gre ipip sit tunnel4 ip_tunnel hsr veth netdevsim vxcan batman_adv cfg80211 rfkill chnl_net caif nlmon dummy team bonding vcan bridge stp llc ip6_gre gre ip6_tunnel tunnel6 tun joydev mousedev ppdev kvm_intel kvm irqbypass crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel aesni_intel aes_x86_64 input_leds crypto_simd cryptd glue_helper ide_pci_generic piix psmouse ide_core serio_raw ata_generic i2c_piix4 pata_acpi parport_pc parport floppy rtc_cmos intel_agp intel_gtt agpgart sch_fq_codel ip_tables x_tables sha1_ssse3 sha1_generic ipv6 [last unloaded: speakup] Dumping ftrace buffer: (ftrace buffer empty) CR2: fffffbfff834f001 ---[ end trace 5aa772c793e0e971 ]--- RIP: 0010:strcmp+0x31/0xa0 lib/string.c:328 Code: 00 00 00 00 fc ff df 55 53 48 83 ec 08 eb 0a 84 db 48 89 ef 74 5a 4c 89 e6 48 89 f8 48 89 fa 48 8d 6f 01 48 c1 e8 03 83 e2 07 <42> 0f b6 04 28 38 d0 7f 04 84 c0 75 50 48 89 f0 48 89 f2 0f b6 5d RSP: 0018:ffff8881e0c57800 EFLAGS: 00010246 RAX: 1ffffffff834f001 RBX: ffffffffc1a78000 RCX: ffffffff827b9503 RDX: 0000000000000000 RSI: ffffffffc1a40008 RDI: ffffffffc1a78008 RBP: ffffffffc1a78009 R08: fffffbfff6a92195 R09: fffffbfff6a92195 R10: ffff8881e0c578b8 R11: fffffbfff6a92194 R12: ffffffffc1a40008 R13: dffffc0000000000 R14: ffffffffc1a3e470 R15: ffffffffc1a40000 FS: 00007fdcc02ff700(0000) GS:ffff8881f7300000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: fffffbfff834f001 CR3: 00000001b3134003 CR4: 00000000007606e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 PKRU: 55555554 The error handing path misplace the cleanup in hwsim_init_module, switch the two cleanup functions to fix above issues. Reported-by: Hulk Robot Fixes: f25da51fdc38 ("ieee802154: hwsim: add replacement for fakelb") Signed-off-by: YueHaibing Acked-by: Alexander Aring Signed-off-by: Stefan Schmidt drivers/net/ieee802154/mac802154_hwsim.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 19734970c98b075e0159bf494d4287820522cc80 Author: Oded Gabbay Date: Sat May 4 17:36:06 2019 +0300 habanalabs: force user to set device debug mode This patch adds the implementation of the HL_DEBUG_OP_SET_MODE opcode in the DEBUG IOCTL. It forces the user who wants to debug the device to set the device into debug mode before he can configure the debug engines. The patch also makes sure to disable debug mode upon user releasing FD, in case the user forgot to disable debug mode. Signed-off-by: Oded Gabbay drivers/misc/habanalabs/context.c | 4 ++- drivers/misc/habanalabs/device.c | 48 ++++++++++++++++++++++++++++++ drivers/misc/habanalabs/habanalabs.h | 6 ++++ drivers/misc/habanalabs/habanalabs_drv.c | 8 +++++ drivers/misc/habanalabs/habanalabs_ioctl.c | 8 +++++ 5 files changed, 73 insertions(+), 1 deletion(-) commit d1287493abe27a055b739ded3d812952b61e99ab Author: Omer Shpigelman Date: Sun May 5 13:24:24 2019 +0300 habanalabs: minor documentation and prints fixes This patch fixes comments on various structure members and some spelling errors in log messages. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/firmware_if.c | 6 +++--- drivers/misc/habanalabs/habanalabs.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 34a5fab7b6f7fdec71756f82af2726975032d105 Author: Omer Shpigelman Date: Sun May 5 11:21:16 2019 +0300 habanalabs: remove redundant CPU checks This patch removes redundant CPU availability checks in: goya_test_queues() - will be done in goya_test_cpu_queue(). goya_ring_doorbell() - was done earlier in goya_send_cpu_message(). Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/misc/habanalabs/goya/goya.c | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) commit cfc2f35006cbecbbb6672652120cdaf0ec796593 Author: Oded Gabbay Date: Sat May 4 16:43:20 2019 +0300 habanalabs: improve a couple of error messages This patch improves the error message that is shown when a new user tries to open a new FD while there is already an existing user that is working on the device. It also improves the error message in case of missing firmware file. Signed-off-by: Oded Gabbay drivers/misc/habanalabs/firmware_if.c | 4 ++-- drivers/misc/habanalabs/habanalabs_drv.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit ca6e56f654e7b241256ffba78cd2abb22aa3bc97 Author: Chris Wilson Date: Sat May 4 08:07:07 2019 +0100 drm/i915: Disable semaphore busywaits on saturated systems Asking the GPU to busywait on a memory address, perhaps not unexpectedly in hindsight for a shared system, leads to bus contention that affects CPU programs trying to concurrently access memory. This can manifest as a drop in transcode throughput on highly over-saturated workloads. The only clue offered by perf, is that the bus-cycles (perf stat -e bus-cycles) jumped by 50% when enabling semaphores. This corresponds with extra CPU active cycles being attributed to intel_idle's mwait. This patch introduces a heuristic to try and detect when more than one client is submitting to the GPU pushing it into an oversaturated state. As we already keep track of when the semaphores are signaled, we can inspect their state on submitting the busywait batch and if we planned to use a semaphore but were too late, conclude that the GPU is overloaded and not try to use semaphores in future requests. In practice, this means we optimistically try to use semaphores for the first frame of a transcode job split over multiple engines, and fail if there are multiple clients active and continue not to use semaphores for the subsequent frames in the sequence. Periodically, we try to optimistically switch semaphores back on whenever the client waits to catch up with the transcode results. With 1 client, on Broxton J3455, with the relative fps normalized by %cpu: x no semaphores + drm-tip * patched +------------------------------------------------------------------------+ | * | | *+ | | **+ | | **+ x | | x * +**+ x | | x x * * +***x xx | | x x * * *+***x *x | | x x* + * * *****x *x x | | + x xx+x* + *** * ********* x * | | + x xx+x* * *** +** ********* xx * | | * + ++++* + x*x****+*+* ***+*************+x* * | |*+ +** *+ + +* + *++****** *xxx**********x***+*****************+*++ *| | |__________A_____M_____| | | |_______________A____M_________| | | |____________A___M________| | +------------------------------------------------------------------------+ N Min Max Median Avg Stddev x 120 2.60475 3.50941 3.31123 3.2143953 0.21117399 + 120 2.3826 3.57077 3.25101 3.1414161 0.28146407 Difference at 95.0% confidence -0.0729792 +/- 0.0629585 -2.27039% +/- 1.95864% (Student's t, pooled s = 0.248814) * 120 2.35536 3.66713 3.2849 3.2059917 0.24618565 No difference proven at 95.0% confidence With 10 clients over-saturating the pipeline: x no semaphores + drm-tip * patched +------------------------------------------------------------------------+ | ++ ** | | ++ ** | | ++ ** | | ++ ** | | ++ xx *** | | ++ xx *** | | ++ xxx*** | | ++ xxx*** | | +++ xxx*** | | +++ xx**** | | +++ xx**** | | +++ xx**** | | +++ xx**** | | ++++ xx**** | | +++++ xx**** | | +++++ x x****** | | ++++++ xxx******* | | ++++++ xxx******* | | ++++++ xxx******* | | ++++++ xx******** | | ++++++ xxxx******** | | ++++++ xxxx******** | | ++++++++ xxxxx********* | |+ + + + ++++++++ xxx*xx**********x* *| | |__A__| | | |__AM__| | | |__A_| | +------------------------------------------------------------------------+ N Min Max Median Avg Stddev x 120 2.47855 2.8972 2.72376 2.7193402 0.074604933 + 120 1.17367 1.77459 1.71977 1.6966782 0.085850697 Difference at 95.0% confidence -1.02266 +/- 0.0203502 -37.607% +/- 0.748352% (Student's t, pooled s = 0.0804246) * 120 2.57868 3.00821 2.80142 2.7923878 0.058646477 Difference at 95.0% confidence 0.0730476 +/- 0.0169791 2.68622% +/- 0.624383% (Student's t, pooled s = 0.0671018) Indicating that we've recovered the regression from enabling semaphores on this saturated setup, with a hint towards an overall improvement. Very similar, but of smaller magnitude, results are observed on both Skylake(gt2) and Kabylake(gt4). This may be due to the reduced impact of bus-cycles, where we see a 50% hit on Broxton, it is only 10% on the big core, in this particular test. One observation to make here is that for a greedy client trying to maximise its own throughput, using semaphores is the right choice. It is only the holistic system-wide view that semaphores of one client impacts another and reduces the overall throughput where we would choose to disable semaphores. The most noticeable negactive impact this has is on the no-op microbenchmarks, which are also very notable for having no cpu bus load. In particular, this increases the runtime and energy consumption of gem_exec_whisper. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Dmitry Rogozhkin Cc: Dmitry Ermilov Cc: Joonas Lahtinen Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190504070707.30902-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gt/intel_context.c | 2 ++ drivers/gpu/drm/i915/gt/intel_context_types.h | 3 ++ drivers/gpu/drm/i915/i915_request.c | 40 ++++++++++++++++++++++++++- 3 files changed, 44 insertions(+), 1 deletion(-) commit d492a29d8c93415f121e4b3d75c60c91e6da2570 Author: Ville Syrjälä Date: Mon Apr 8 18:27:01 2019 +0300 drm/i915: Use mul_u32_u32() more We have a lot of '(u64)foo * bar' everywhere. Replace with mul_u32_u32() to avoid gcc failing to use a regular 32x32->64 multiply for this. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190408152702.4153-1-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/i915_fixed.h | 6 +++--- drivers/gpu/drm/i915/intel_display.c | 10 +++++----- drivers/gpu/drm/i915/intel_dpll_mgr.c | 4 ++-- drivers/gpu/drm/i915/intel_pm.c | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) commit b7ffc4a839a553b07b34543684e79526f2ffecb8 Author: Ville Syrjälä Date: Thu May 2 23:06:07 2019 +0300 drm/i915: Allow ICL pipe "HDR mode" when the cursor is visible Turns out the cursor is compatible with the pipe "HDR mode". It's only the actual SDR planes that get entirely bypassed during blending. So let's ignore the cursor when checking if we have any planes active that aren't HDR compatible. This fixes the regressions in the kms_cursor_crc and kms_plane_cursor tests. Cc: Uma Shankar Cc: Shashank Sharma Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110579 Fixes: 09b25812db10 ("drm/i915: Enable pipe HDR mode on ICL if only HDR planes are used") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190502200607.14504-2-ville.syrjala@linux.intel.com Reviewed-by: Uma Shankar drivers/gpu/drm/i915/intel_display.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a832d35762a0b3e3ad1d4ce8e4dc3915056c853b Author: Ville Syrjälä Date: Thu May 2 23:06:06 2019 +0300 drm/i915: Move the PIPEMISC write the correct place I fumbled the PIPEMISC write into the wrong place. It only gets called for fastsets, but since value needs to be updated based on the set of active planes it needs to be done for all plane updates. Move it to the correct spot. The symptoms include SDR planes never showing up if a previous modeset/fastset left the pipe in HDR mode. This was immediately obvious when running the kms_plane pixel format tests. Unfortunately the test didn't realize it was scanning out pure black all the time and declared success anyway. Cc: Uma Shankar Cc: Shashank Sharma Fixes: 09b25812db10 ("drm/i915: Enable pipe HDR mode on ICL if only HDR planes are used") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190502200607.14504-1-ville.syrjala@linux.intel.com Reviewed-by: Uma Shankar drivers/gpu/drm/i915/intel_display.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0d90ccb70211cbf55140e91bd39db684aa4c16e9 Author: Chris Wilson Date: Wed May 1 12:45:36 2019 +0100 drm/i915: Delay semaphore submission until the start of the signaler Currently we submit the semaphore busywait as soon as the signaler is submitted to HW. However, we may submit the signaler as the tail of a batch of requests, and even not as the first context in the HW list, i.e. the busywait may start spinning far in advance of the signaler even starting. If we wait until the request before the signaler is completed before submitting the busywait, we prevent the busywait from starting too early, if the signaler is not first in submission port. To handle the case where the signaler is at the start of the second (or later) submission port, we will need to delay the execution callback until we know the context is promoted to port0. A challenge for later. Fixes: e88619646971 ("drm/i915: Use HW semaphores for inter-engine synchroni sation on gen8+") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190501114541.10077-9-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_request.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit f4107766a96ed743c032de1edd753dbcb1839e38 Author: Chris Wilson Date: Wed May 1 12:45:28 2019 +0100 drm/i915/hangcheck: Track context changes Given sufficient preemption, we may see a busy system that doesn't advance seqno while performing work across multiple contexts, and given sufficient pathology not even notice a change in ACTHD. What does change between the preempting contexts is their RING, so take note of that and treat a change in the ring address as being an indication of forward progress. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190501114541.10077-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gt/intel_engine_types.h | 1 + drivers/gpu/drm/i915/gt/intel_hangcheck.c | 12 +++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) commit d69ebf4082e993d473f82bd630bb4d6e38f6fee7 Author: Chris Wilson Date: Thu May 2 16:00:24 2019 +0100 drm/i915: Leave engine parking to the engines Drop the check in GEM parking that the engines were already parked. The intention here was that before we dropped the GT wakeref, we were sure that no more interrupts could be raised -- however, we have already dropped the wakeref by this point and the warning is no longer valid. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190502150024.16636-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_pm.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) commit c34c5bca331adc6dcdff81577383df463b4c475c Author: Chris Wilson Date: Fri May 3 09:09:42 2019 +0100 drm/i915/execlists: Flush the tasklet on parking Tidy up the cleanup sequence by always ensure that the tasklet is flushed on parking (before we cleanup). The parking provides a convenient point to ensure that the backend is truly idle. v2: Do the full check for idleness before parking, to be sure we flush any residual interrupt. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190503080942.30151-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gt/intel_engine_cs.c | 2 ++ drivers/gpu/drm/i915/gt/intel_engine_pm.c | 27 ++++++++++++++++++++++----- drivers/gpu/drm/i915/gt/intel_engine_pm.h | 2 ++ drivers/gpu/drm/i915/gt/intel_lrc.c | 16 +++++++--------- drivers/gpu/drm/i915/intel_guc_submission.c | 2 ++ 5 files changed, 35 insertions(+), 14 deletions(-) commit 818f5cb3e8fb386609f7d3c751f195dd3050d22d Author: Chris Wilson Date: Thu May 2 21:30:09 2019 +0100 drm/i915/guc: Fix runtime suspend We are not allowed to rpm_get() inside the runtime-suspend callback, so split the intel_uc_suspend() into the core that assumes the caller holds the wakeref (intel_uc_runtime_suspend), and one that acquires the wakeref as necessary (intel_uc_suspend). Reported-by: Daniele Ceraolo Spurio Fixes: 79ffac8599c4 ("drm/i915: Invert the GEM wakeref hierarchy") Signed-off-by: Chris Wilson Cc: Daniele Ceraolo Spurio Reviewed-by: Daniele Ceraolo Spurio Link: https://patchwork.freedesktop.org/patch/msgid/20190502203009.15727-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.c | 2 +- drivers/gpu/drm/i915/intel_uc.c | 25 +++++++++++++++++-------- drivers/gpu/drm/i915/intel_uc.h | 1 + 3 files changed, 19 insertions(+), 9 deletions(-) commit 3ce2ea6574be67b6efd6fb1a7f6e2c7aa27b82f1 Author: Jani Nikula Date: Thu May 2 18:02:47 2019 +0300 drm/i915: extract intel_gmbus.h from i915_drv.h and rename intel_i2c.c It used to be handy that we only had a couple of headers, but over time i915_drv.h has become unwieldy. Extract declarations to a separate header file corresponding to the implementation module, clarifying the modularity of the driver. Ensure the new header is self-contained, and do so with minimal further includes, using forward declarations as needed. Include the new header only where needed, and sort the modified include directives while at it and as needed. While at it, rename intel_i2c.c to intel_gmbus.c and the functions to intel_gmbus_*. No functional changes. Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/5834b8fbbfd4ac2e3d0159e69c87f6926066f537.1556809195.git.jani.nikula@intel.com drivers/gpu/drm/i915/Makefile | 2 +- drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/i915_drv.c | 5 ++-- drivers/gpu/drm/i915/i915_drv.h | 17 -------------- drivers/gpu/drm/i915/i915_suspend.c | 3 ++- drivers/gpu/drm/i915/intel_bios.c | 2 ++ drivers/gpu/drm/i915/intel_crt.c | 1 + drivers/gpu/drm/i915/intel_ddi.c | 1 + drivers/gpu/drm/i915/intel_display.c | 3 ++- drivers/gpu/drm/i915/intel_dvo.c | 1 + .../gpu/drm/i915/{intel_i2c.c => intel_gmbus.c} | 27 +++++++++++++++------- drivers/gpu/drm/i915/intel_gmbus.h | 27 ++++++++++++++++++++++ drivers/gpu/drm/i915/intel_hdmi.c | 1 + drivers/gpu/drm/i915/intel_lvds.c | 1 + drivers/gpu/drm/i915/intel_sdvo.c | 1 + 15 files changed, 63 insertions(+), 30 deletions(-) commit b30ed4cc2e8a5a1be4c6d85d6e18d08262749683 Author: Jani Nikula Date: Thu May 2 18:02:46 2019 +0300 drm/i915: move more generic utils to i915_utils.h Reduce clutter from i915_drv.h and intel_drv.h. Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/8c197872384fc35442b738c21ba0da9336e02a85.1556809195.git.jani.nikula@intel.com drivers/gpu/drm/i915/i915_drv.h | 44 ----------- drivers/gpu/drm/i915/i915_utils.h | 153 ++++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_drv.h | 108 --------------------------- 3 files changed, 153 insertions(+), 152 deletions(-) commit cb363304676934cd7c6ac8f99ef1861e7b603f01 Author: Jani Nikula Date: Thu May 2 18:02:45 2019 +0300 drm/i915: make i915_utils.h self-contained And ensure it stays that way. Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/69bcebefa6d8689d4a962394b0c6db04904354ed.1556809195.git.jani.nikula@intel.com drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/i915_utils.h | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) commit fa03cc2e8cc3ec15472591ff07440bf436c4a2c6 Author: Jani Nikula Date: Thu May 2 18:02:44 2019 +0300 drm/i915: move i915_vgacntrl_reg() where needed Reduce clutter from i915_drv.h. Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/d30a79d008b875f708f5acf7924f9ca8ab06b575.1556809195.git.jani.nikula@intel.com drivers/gpu/drm/i915/i915_drv.h | 10 ---------- drivers/gpu/drm/i915/intel_display.c | 10 ++++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) commit 2126d3e990a56c4cc4824c449bae0e98225fcbe0 Author: Jani Nikula Date: Thu May 2 18:02:43 2019 +0300 drm/i915: extract i915_debugfs.h from i915_drv.h It used to be handy that we only had a couple of headers, but over time i915_drv.h has become unwieldy. Extract declarations to a separate header file corresponding to the implementation module, clarifying the modularity of the driver. Ensure the new header is self-contained, and do so with minimal further includes, using forward declarations as needed. Include the new header only where needed, and sort the modified include directives while at it and as needed. No functional changes. Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/2843b028d65e118dc40316aa84bf620a93f6c67b.1556809195.git.jani.nikula@intel.com drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/i915_debugfs.c | 1 + drivers/gpu/drm/i915/i915_debugfs.h | 20 ++++++++++++++++++++ drivers/gpu/drm/i915/i915_drv.c | 2 ++ drivers/gpu/drm/i915/i915_drv.h | 12 ------------ drivers/gpu/drm/i915/intel_dp.c | 1 + drivers/gpu/drm/i915/intel_hdmi.c | 1 + drivers/gpu/drm/i915/intel_pipe_crc.h | 3 +++ 8 files changed, 29 insertions(+), 12 deletions(-) commit 4e49d35c3892b051586e80f5f67c9fe6b7d06d77 Author: Jani Nikula Date: Thu May 2 18:02:42 2019 +0300 drm/i915: extract intel_acpi.h from i915_drv.h It used to be handy that we only had a couple of headers, but over time i915_drv.h has become unwieldy. Extract declarations to a separate header file corresponding to the implementation module, clarifying the modularity of the driver. Ensure the new header is self-contained, and do so with minimal further includes, using forward declarations as needed. Include the new header only where needed, and sort the modified include directives while at it and as needed. No functional changes. Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/9bc1317a67df0b9d019eca5b36f474b76a1cad26.1556809195.git.jani.nikula@intel.com drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/i915_drv.c | 1 + drivers/gpu/drm/i915/i915_drv.h | 9 --------- drivers/gpu/drm/i915/intel_acpi.c | 3 +++ drivers/gpu/drm/i915/intel_acpi.h | 17 +++++++++++++++++ drivers/gpu/drm/i915/intel_display.c | 1 + 6 files changed, 23 insertions(+), 9 deletions(-) commit a2649b342d037ce16d9d47da8b444c47d2767bb6 Author: Jani Nikula Date: Thu May 2 18:02:41 2019 +0300 drm/i915: extract intel_lpe_audio.h from i915_drv.h It used to be handy that we only had a couple of headers, but over time i915_drv.h has become unwieldy. Extract declarations to a separate header file corresponding to the implementation module, clarifying the modularity of the driver. Ensure the new header is self-contained, and do so with minimal further includes, using forward declarations as needed. Include the new header only where needed, and sort the modified include directives while at it and as needed. No functional changes. Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/9101a58b9f10bcf11332175e17b6e6e45f4ebd17.1556809195.git.jani.nikula@intel.com drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/i915_drv.h | 8 -------- drivers/gpu/drm/i915/i915_irq.c | 1 + drivers/gpu/drm/i915/intel_audio.c | 2 +- drivers/gpu/drm/i915/intel_lpe_audio.c | 8 +++++--- drivers/gpu/drm/i915/intel_lpe_audio.h | 22 ++++++++++++++++++++++ 6 files changed, 30 insertions(+), 12 deletions(-) commit b1ad4c39bfa346f6a34fbef02ebc8b3d31988409 Author: Jani Nikula Date: Thu May 2 18:02:40 2019 +0300 drm/i915: extract intel_dpio_phy.h from i915_drv.h It used to be handy that we only had a couple of headers, but over time i915_drv.h has become unwieldy. Extract declarations to a separate header file corresponding to the implementation module, clarifying the modularity of the driver. Ensure the new header is self-contained, and do so with minimal further includes, using forward declarations as needed. Include the new header only where needed, and sort the modified include directives while at it and as needed. No functional changes. Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/876a1671a84c6839bcafdf276cf9c4e1da6c631c.1556809195.git.jani.nikula@intel.com drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/i915_drv.h | 41 ---------------------- drivers/gpu/drm/i915/intel_ddi.c | 1 + drivers/gpu/drm/i915/intel_dp.c | 1 + drivers/gpu/drm/i915/intel_dp_mst.c | 1 + drivers/gpu/drm/i915/intel_dpio_phy.c | 1 + drivers/gpu/drm/i915/intel_dpio_phy.h | 58 +++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_dpll_mgr.c | 1 + drivers/gpu/drm/i915/intel_hdmi.c | 1 + drivers/gpu/drm/i915/intel_runtime_pm.c | 1 + 10 files changed, 66 insertions(+), 41 deletions(-) commit 6176490e7eb354be198d4fc6c5bbb72fb9e8b1e0 Author: Jani Nikula Date: Thu May 2 18:02:39 2019 +0300 drm/i915/csr: move CSR version macros to intel_csr.h Reduce clutter from i915_drv.h. Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/8222df3f559b056387b5c7e6e04a878cbf8b4e2e.1556809195.git.jani.nikula@intel.com drivers/gpu/drm/i915/i915_debugfs.c | 1 + drivers/gpu/drm/i915/i915_drv.h | 4 ---- drivers/gpu/drm/i915/i915_gpu_error.c | 1 + drivers/gpu/drm/i915/intel_csr.h | 4 ++++ 4 files changed, 6 insertions(+), 4 deletions(-) commit d28cea20bf2256301f144ea3d4a0da324129a05f Author: Jani Nikula Date: Thu May 2 18:02:38 2019 +0300 drm/i915: remove unused/stale macros and comments from intel_drv.h Reduce clutter from intel_drv.h. Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/963ba7fa0111135c3e796bfc9f86d6e33724758e.1556809195.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_drv.h | 9 --------- 1 file changed, 9 deletions(-) commit 69f44d3b66a1157bbf4f6f2c8ac4292ce52d2a20 Author: Jani Nikula Date: Thu May 2 18:02:37 2019 +0300 drm/i915: move ranges to intel_display.c Reduce clutter from intel_drv.h with the minimal change. Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/2c9248b50e620e95d85b8b9252d020a547c9474a.1556809195.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_display.c | 15 +++++++++++++++ drivers/gpu/drm/i915/intel_drv.h | 15 --------------- 2 files changed, 15 insertions(+), 15 deletions(-) commit 2162e103c85993dec2bac165c63504b57b52477c Author: Jani Nikula Date: Thu May 2 18:02:36 2019 +0300 drm/i915/dsi: move operation mode types to intel_dsi.h Reduce clutter from intel_drv.h with the minimal change. Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/72de677e844220d8522a836aae206c278ea45284.1556809195.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_drv.h | 3 --- drivers/gpu/drm/i915/intel_dsi.h | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) commit 5ece881d2f48428701140916a67f628c0917065f Author: Jani Nikula Date: Thu May 2 18:02:35 2019 +0300 drm/i915/dvo: move DVO chip types to intel_dvo.c Reduce clutter from intel_drv.h with the minimal change. Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/95203dbf844061da95f33614d0cb61533a11fdd4.1556809195.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_drv.h | 5 ----- drivers/gpu/drm/i915/intel_dvo.c | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) commit c9fd91668dbdace78bcb5ce40a11316448db6cf1 Author: Jani Nikula Date: Thu May 2 17:52:34 2019 +0300 drm/i915: add single combo phy init/unit functions Work on the principle that files should prefer not to expose platform specific functions. v2, v3: Rebase Cc: Imre Deak Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190502145234.7002-1-jani.nikula@intel.com drivers/gpu/drm/i915/intel_combo_phy.c | 24 ++++++++++++++++++++---- drivers/gpu/drm/i915/intel_combo_phy.h | 6 ++---- drivers/gpu/drm/i915/intel_runtime_pm.c | 10 +++++----- 3 files changed, 27 insertions(+), 13 deletions(-) commit 3d0aa91984463a922c1c1a3abef6ff117bb5f418 Author: Maya Erez Date: Fri Apr 26 18:43:37 2019 +0300 wil6210: remove HALP for Talyn devices In Talyn the HW is responsible for power management enter / exit flow, hence the deep sleep exit latency is significantly shorter than in Sparrow. In such a case HALP feature, that is meant to prevent long PCIe blocking accesses, is no longer needed and can be removed for Talyn. Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/main.c | 6 ++++++ 1 file changed, 6 insertions(+) commit d6a553c0c61b0b0219764e4d4fc14e385085f374 Author: Dedy Lansky Date: Fri Apr 26 18:43:36 2019 +0300 wil6210: check rx_buff_mgmt before accessing it Make sure rx_buff_mgmt is initialized before accessing it. Signed-off-by: Dedy Lansky Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/txrx_edma.c | 3 +++ 1 file changed, 3 insertions(+) commit 7441be71ba7e07791fd4fa2b07c932dff14ff4d9 Author: Maya Erez Date: Fri Apr 26 18:43:35 2019 +0300 wil6210: fix missed MISC mbox interrupt When MISC interrupt is triggered due to HALP bit, in parallel to mbox events handling by the MISC threaded IRQ, new mbox interrupt can be missed in the following scenario: 1. MISC ICR is read in the IRQ handler 2. Threaded IRQ is completed and all MISC interrupts are unmasked 3. mbox interrupt is set by FW 4. HALP is masked The mbox interrupt in step 3 can be missed due to constant high level of ICM. Masking all MISC IRQs instead of masking only HALP bit in step 4 will guarantee that ICM will drop to 0 and interrupt will be triggered once MISC interrupts will be unmasked. Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/interrupt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ddf7afdde824545680dafba2c91f6b218c45de3a Author: Ahmad Masri Date: Fri Apr 26 18:43:34 2019 +0300 wil6210: fix overwriting max_assoc_sta module param Save the parameter of max_assoc_sta per device. On fw_ready event calculate the max_assoc_sta and save it per device, do not overwrite the max_assoc_sta module param. Signed-off-by: Ahmad Masri Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/cfg80211.c | 4 ++-- drivers/net/wireless/ath/wil6210/debugfs.c | 18 +++++++++--------- drivers/net/wireless/ath/wil6210/main.c | 9 +++++---- drivers/net/wireless/ath/wil6210/rx_reorder.c | 2 +- drivers/net/wireless/ath/wil6210/txrx.c | 22 +++++++++++----------- drivers/net/wireless/ath/wil6210/txrx_edma.c | 7 ++++--- drivers/net/wireless/ath/wil6210/wil6210.h | 19 ++++++++++--------- drivers/net/wireless/ath/wil6210/wmi.c | 14 +++++++------- 8 files changed, 49 insertions(+), 46 deletions(-) commit 9a874d045473f199e1a184a68be1cf4970db6cbf Author: Dedy Lansky Date: Fri Apr 26 18:43:33 2019 +0300 wil6210: enhancements for descriptor and status ring debugfs Add printing of hwhead as part of desc ring and status ring debugfs. Validate wil->rx_buff_mgmt and ring->ctx arrays before accessing them. Dump Tx descriptor content even when it indicates invalid buff_id. Signed-off-by: Dedy Lansky Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/debugfs.c | 52 +++++++++++++++++++++++------- drivers/net/wireless/ath/wil6210/wil6210.h | 5 +++ 2 files changed, 45 insertions(+), 12 deletions(-) commit a7feb56f204fd8bcc9a8d7342097f7b3cf87b50e Author: Maya Erez Date: Fri Apr 26 18:43:32 2019 +0300 wil6210: add support for multiple sections in brd file Current board file loading procedure assumes that the board file includes only one section. New board files can include multiple sections. Add the ability to read multiple addresses and max size from FW file and load multiple sections from the board file into those addresses. Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/fw.h | 11 ++- drivers/net/wireless/ath/wil6210/fw_inc.c | 148 +++++++++++++++++++++-------- drivers/net/wireless/ath/wil6210/main.c | 3 +- drivers/net/wireless/ath/wil6210/wil6210.h | 9 +- 4 files changed, 126 insertions(+), 45 deletions(-) commit 0131d185133891b7370b606411427efc260d68a0 Author: Dedy Lansky Date: Fri Apr 26 18:43:31 2019 +0300 wil6210: add printout of platform capabilities Add logging of the platform capabilities after retrieving it from the platform driver. Signed-off-by: Dedy Lansky Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/pcie_bus.c | 2 ++ 1 file changed, 2 insertions(+) commit 9c6465979276c58d5972a959dd35b4d9aff52749 Author: Alexei Avshalom Lazar Date: Fri Apr 26 18:43:30 2019 +0300 wil6210: fix _desc access in __wil_tx_vring_tso _desc is defined in __wil_tx_vring_tso() and may not be set in case len is 0, verify _desc is set. Signed-off-by: Alexei Avshalom Lazar Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/txrx.c | 3 +++ 1 file changed, 3 insertions(+) commit e10b0eddd5235aa5aef4e40b970e34e735611a80 Author: Maya Erez Date: Fri Apr 26 18:43:29 2019 +0300 wil6210: fix spurious interrupts in 3-msi Interrupt is set in ICM (ICR & ~IMV) rising trigger. As the driver masks the IRQ after clearing it, there can be a race where an additional spurious interrupt is triggered when the driver unmask the IRQ. This can happen in case HW triggers an interrupt after the clear and before the mask. To prevent the second spurious interrupt the driver needs to mask the IRQ before reading and clearing it. Signed-off-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/interrupt.c | 65 +++++++++++++++++----------- 1 file changed, 40 insertions(+), 25 deletions(-) commit 1d721ed679db18888f33df8cb238bc25a1d783c1 Author: Andrey Grodzovsky Date: Thu Apr 18 11:00:24 2019 -0400 drm/amdgpu: Avoid HW reset if guilty job already signaled. Also reject TDRs if another one already running. v2: Stop all schedulers across device and entire XGMI hive before force signaling HW fences. Avoid passing job_signaled to helper fnctions to keep all the decision making about skipping HW reset in one place. v3: Fix SW sched. hang after non HW reset. sched.hw_rq_count has to be balanced against it's decrement in drm_sched_stop in non HW reset case. v4: rebase v5: Revert v3 as we do it now in sceduler code. Reviewed-by: Christian König Signed-off-by: Andrey Grodzovsky Signed-off-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/1555599624-12285-6-git-send-email-andrey.grodzovsky@amd.com drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 143 +++++++++++++++++++---------- 1 file changed, 95 insertions(+), 48 deletions(-) commit a5343b8a2ca5799ee6370e3cca77369a4c598221 Author: Andrey Grodzovsky Date: Thu Apr 18 11:00:23 2019 -0400 drm/scheduler: Add flag to hint the release of guilty job. Problem: Sched thread's cleanup function races against TO handler and removes the guilty job from mirror list and we have no way of differentiating if the job was removed from within the TO handler or from the sched thread's clean-up function. Fix: Add a flag to scheduler to hint the TO handler that the guilty job needs to be explicitly released. v2: whitespace fix Reviewed-by: Christian König Signed-off-by: Andrey Grodzovsky Signed-off-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/1555599624-12285-5-git-send-email-andrey.grodzovsky@amd.com drivers/gpu/drm/scheduler/sched_main.c | 9 +++++++-- include/drm/gpu_scheduler.h | 2 ++ 2 files changed, 9 insertions(+), 2 deletions(-) commit 290764af7e369f0001175dc8c3cb747aa9903bb8 Author: Andrey Grodzovsky Date: Thu Apr 18 11:00:22 2019 -0400 drm/sched: Keep s_fence->parent pointer For later driver's reference to see if the fence is signaled. v2: Move parent fence put to resubmit jobs. Signed-off-by: Andrey Grodzovsky Reviewed-by: Christian König Signed-off-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/1555599624-12285-4-git-send-email-andrey.grodzovsky@amd.com drivers/gpu/drm/scheduler/sched_main.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 5918045c4ed492fb5813f980dcf89a90fefd0a4e Author: Christian König Date: Thu Apr 18 11:00:21 2019 -0400 drm/scheduler: rework job destruction We now destroy finished jobs from the worker thread to make sure that we never destroy a job currently in timeout processing. By this we avoid holding lock around ring mirror list in drm_sched_stop which should solve a deadlock reported by a user. v2: Remove unused variable. v4: Move guilty job free into sched code. v5: Move sched->hw_rq_count to drm_sched_start to account for counter decrement in drm_sched_stop even when we don't call resubmit jobs if guily job did signal. v6: remove unused variable Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109692 Acked-by: Chunming Zhou Signed-off-by: Christian König Signed-off-by: Andrey Grodzovsky Signed-off-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/1555599624-12285-3-git-send-email-andrey.grodzovsky@amd.com drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 +- drivers/gpu/drm/etnaviv/etnaviv_dump.c | 5 - drivers/gpu/drm/etnaviv/etnaviv_sched.c | 2 +- drivers/gpu/drm/lima/lima_sched.c | 2 +- drivers/gpu/drm/panfrost/panfrost_job.c | 2 +- drivers/gpu/drm/scheduler/sched_main.c | 159 +++++++++++++++++------------ drivers/gpu/drm/v3d/v3d_sched.c | 2 +- include/drm/gpu_scheduler.h | 6 +- 8 files changed, 102 insertions(+), 85 deletions(-) commit 263a8cf1ff5ea63dc9f456829c310df35f0249aa Author: Imre Deak Date: Thu May 2 13:17:54 2019 +0300 drm/i915: Tune down WARN about incorrect VBT TC legacy flag Looks like VBT contains again the wrong information about a port's TypeC legacy vs. DP-alt/TBT-alt type. There is no further issues after we notice this and fix it up, so tune down the WARN to be a a DRM_ERROR. This also avoids CI tainting the kernel and stopping the test run. v2: - Update also code coment accordingly. (Jani) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110578 Cc: Jani Nikula Signed-off-by: Imre Deak Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190502101754.29219-1-imre.deak@intel.com drivers/gpu/drm/i915/intel_dp.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 8c334f24e3b4484e059ede14144d16165bb85a20 Author: Chris Wilson Date: Wed May 1 12:45:29 2019 +0100 drm/i915: Include fence signaled bit in print_request() Show the fence flags view of request completion in addition to the normal hwsp check and whether signaling is enabled. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190501114541.10077-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gt/intel_engine_cs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit cfda08cdac3401db03849a62206b539bb4e4632e Author: Imre Deak Date: Thu Apr 25 21:52:53 2019 +0300 drm/i915/icl: Add missing combo PHY lane power setup This step of the BSpec combo PHY port enabling is missing, so add it now. v2: - Rebased on the new fixed v2 version of the helper. v3: - Use intel_ instead of icl_ prefix. (Jani) Reported-by: Ville Syrjala Cc: Jani Nikula Cc: Madhav Chauhan Cc: Ville Syrjala Signed-off-by: Imre Deak Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190425185253.3197-2-imre.deak@intel.com drivers/gpu/drm/i915/intel_ddi.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit bd60a562906b2dfa6db4e9165c1498ea25db0587 Author: Imre Deak Date: Thu Apr 25 21:52:52 2019 +0300 drm/i915/icl: Factor out combo PHY lane power setup helper Factor out the combo PHY lane power configuration code to a separate helper; it will be also needed by the next patch adding the same configuration for DDI ports. Add support for DDI ports and lane reversal as preparation for the next patch. The PWR_DOWN_LN_1 value is unspecified in the BSpec register description so remove it. v2: - Fix up the wrong assumption that the encodings are the same for DDI and DSI ports. (Jani) v3: - Use intel_ instead of icl_ prefix. (Jani) - Add required headers to intel_combo_phy.h after the upstream header refactoring. Cc: Jani Nikula Cc: Madhav Chauhan Cc: Ville Syrjala Signed-off-by: Imre Deak Reviewed-by: Jani Nikula (v2) Link: https://patchwork.freedesktop.org/patch/msgid/20190425185253.3197-1-imre.deak@intel.com drivers/gpu/drm/i915/i915_reg.h | 1 - drivers/gpu/drm/i915/icl_dsi.c | 27 +++--------------- drivers/gpu/drm/i915/intel_combo_phy.c | 52 ++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_combo_phy.h | 6 ++++ 4 files changed, 62 insertions(+), 24 deletions(-) commit 3904fb78a80da64d7fd1a4f270725a6d4272c86f Author: Ville Syrjälä Date: Tue Apr 30 17:29:01 2019 +0300 drm/i915: hsw+ audio regs are per-transocder s/pipe/transcoder/ when dealing with hsw+ audio registers. This won't actually make any real difference since there is no audio on the EDP transcoder. But this should avoid a bit of confusion when cross checking against the spec. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190430142901.7302-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/i915_reg.h | 12 ++++----- drivers/gpu/drm/i915/intel_audio.c | 55 ++++++++++++++++++-------------------- 2 files changed, 32 insertions(+), 35 deletions(-) commit abf4b8ed42e9dc64bdf05320273ee41f82fcd754 Author: Ville Syrjälä Date: Tue Apr 30 17:29:00 2019 +0300 drm/i915: Don't skip audio enable if ELD is bogus We've already committed to enabling audio when intel_audio_codec_enable() is called. We can't back out even if the ELD has turned sour in the meantime. So just spew some debug log and plow ahead. Otherwise the state checker gets unhappy when audio isn't enabled when it is expected to be. I suppose we really ought to precompute the ELD as well, but let's just toss in a FIXME for the future. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103841 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190430142901.7302-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/intel_audio.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 117aca43f71792e0fb08c38871cdabc3c5cee920 Author: Jani Nikula Date: Mon Apr 29 17:22:53 2019 +0300 drm/i915/csr: alpha_support doesn't depend on csr or vice versa Debug logging should not be dependent on alpha support flag. Cc: Rodrigo Vivi Reviewed-by: Rodrigo Vivi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190429142253.15882-1-jani.nikula@intel.com drivers/gpu/drm/i915/intel_csr.c | 2 -- 1 file changed, 2 deletions(-) commit beb29980026ffb38f990fbc3be9a0b89d9a15ea4 Author: Stanislav Lisovskiy Date: Tue Apr 30 15:51:19 2019 +0300 drm/i915: Corrupt DSI picture fix for GeminiLake Currently due to regression CI machine displays show corrupt picture. Problem is when CDCLK is as low as 79200, picture gets unstable, while DSI and DE pll values were confirmed to be correct. Limiting to 158400 as agreed with Ville. We could not come up with any better solution yet, as PLL divider values both for MIPI(DSI PLL) and CDCLK(DE PLL) are correct, however seems that due to some boundary conditions, when clocking is too low we get wrong timings for DSI display. Similar workaround exists for VLV though, so just took similar condition into use. At least that way GLK platform will start to be usable again, with current drm-tip. v2: Fixed commit subject as suggested. v3: Added generic bugs(crc failures, screen not init for GLK DSI which might be affected). v4: Added references tag for bugs affected. Signed-off-by: Stanislav Lisovskiy Acked-by: Ville Syrjälä References: https://bugs.freedesktop.org/show_bug.cgi?id=109267 References: https://bugs.freedesktop.org/show_bug.cgi?id=103184 Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190430125119.7478-1-stanislav.lisovskiy@intel.com drivers/gpu/drm/i915/intel_cdclk.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit dc76e5764a46ffb2e7f502a86b3288b5edcce191 Author: Chris Wilson Date: Wed May 1 14:57:51 2019 +0100 drm/i915: Complete both freed-object passes before draining the workqueue The workqueue code complains viciously if we try to queue more work onto the queue while attampting to drain it. As we asynchronously free objects and defer their enqueuing with RCU, it is quite tricky to quiesce the system before attempting to drain the workqueue. Yet drain we must to ensure that the worker is idle before unloading the module. Give the freed object drain 3 whole passes with multiple rcu_barrier() to give the defer freeing of several levels each protected by RCU and needing a grace period before its parent can be freed, ultimately resulting in a GEM object being freed after another RCU period. A consequence is that it will make module unload even slower. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110550 Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20190501135753.8711-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 45b9c968c5b8a954576038d3cddf9771ebda0a8f Author: Chris Wilson Date: Wed May 1 11:32:04 2019 +0100 drm/i915: Move the engine->destroy() vfunc onto the engine Make the engine responsible for cleaning itself up! This removes the i915->gt.cleanup vfunc that has been annoying the casual reader and myself for the last several years, and helps keep a future patch to add more cleanup tidy. v2: Assert that engine->destroy is set after the backend starts allocating its own state. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190501103204.18632-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gt/intel_engine.h | 4 ++ drivers/gpu/drm/i915/gt/intel_engine_cs.c | 68 +++++++++++++++------------- drivers/gpu/drm/i915/gt/intel_engine_types.h | 2 +- drivers/gpu/drm/i915/gt/intel_lrc.c | 51 +++++++-------------- drivers/gpu/drm/i915/gt/intel_ringbuffer.c | 35 +++++++------- drivers/gpu/drm/i915/i915_drv.h | 6 --- drivers/gpu/drm/i915/i915_gem.c | 19 +------- 7 files changed, 77 insertions(+), 108 deletions(-) commit 09b25812db10fcbd7937c1b7ca279c5c0d77ba9d Author: Ville Syrjälä Date: Fri Apr 12 21:30:09 2019 +0300 drm/i915: Enable pipe HDR mode on ICL if only HDR planes are used The pipe has a special HDR mode with higher precision when only HDR planes are active. Let's use it. Curiously this fixes the kms_color gamma/degamma tests when using a HDR plane, which is always the case unless one hacks the test to use an SDR plane. If one does hack the test to use an SDR plane it does pass already. I have no actual explanation how the output after the gamma LUT can be different between the two modes. The way the tests are written should mean that the output should be identical between the solid color vs. the gradient. But clearly that somehow doesn't hold true for the HDR planes in non-HDR pipe mode. Anyways, as long as we stick to one type of plane the test should produce sensible results now. v2: s/HDR_MODE/HDR_MODE_PRECISION/ (Shashank) Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190412183009.8237-2-ville.syrjala@linux.intel.com Reviewed-by: Uma Shankar Tested-by: Uma Shankar Reviewed-by: Shashank Sharma drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_display.c | 7 +++++++ drivers/gpu/drm/i915/intel_sprite.h | 12 ++++++++---- 3 files changed, 16 insertions(+), 4 deletions(-) commit 9b11215e40c5a0aefba9b026543fb0799f61bf6f Author: Ville Syrjälä Date: Fri Apr 12 21:30:08 2019 +0300 drm/i915: Flatten and rename haswell_set_pipemisc() Move the platform checks out from haswell_set_pipemisc() and rename it to bdw_set_pipemisc() to make it clear when to call it. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190412183009.8237-1-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_display.c | 68 +++++++++++++++++------------------- 1 file changed, 33 insertions(+), 35 deletions(-) commit b3198c38f02d54a5e964258a2180d502abe6eaf0 Author: Linus Walleij Date: Tue Apr 30 11:37:46 2019 +0200 drm/atomic-helper: Bump vblank timeout to 100 ms The 50 ms default timeout waiting for vblanks is too small for the first vblank from the ST-Ericsson MCDE display controller over DSI. Presumably this is because the DSI display is command-mode only and the state machine will take some time setting up its state for the first display update, and we hit a timeout. 100 ms makes it pass without problems. Signed-off-by: Linus Walleij Reviewed-by: Ville Syrjälä Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190430093746.26485-1-linus.walleij@linaro.org drivers/gpu/drm/drm_atomic_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8a9b36e2588b85e954f71dc03f165091a6fe0593 Author: Chris Wilson Date: Tue Apr 30 10:44:04 2019 +0100 drm/i915: Wait for the struct_mutex on idling When the system is idling, contention for struct_mutex should be low and so we will be more efficient to wait for a contended mutex than reschedule. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190430094405.6127-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_pm.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit d5f9db2c2a097b881c618b1db2e6870863c46205 Author: Jani Nikula Date: Mon Apr 29 15:29:38 2019 +0300 drm/i915: extract intel_combo_phy.h from i915_drv.h It used to be handy that we only had a couple of headers, but over time i915_drv.h has become unwieldy. Extract declarations to a separate header file corresponding to the implementation module, clarifying the modularity of the driver. Ensure the new header is self-contained, and do so with minimal further includes, using forward declarations as needed. Include the new header only where needed, and sort the modified include directives while at it and as needed. No functional changes. Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/6aea17072684dec0b04b6831c0c0e5a134edf87e.1556540890.git.jani.nikula@intel.com drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/i915_drv.h | 6 ------ drivers/gpu/drm/i915/intel_combo_phy.c | 1 + drivers/gpu/drm/i915/intel_combo_phy.h | 16 ++++++++++++++++ drivers/gpu/drm/i915/intel_runtime_pm.c | 1 + 5 files changed, 19 insertions(+), 6 deletions(-) commit ecbb5fb7f7acee47e0b1a86132982545af806ed3 Author: Jani Nikula Date: Mon Apr 29 15:29:37 2019 +0300 drm/i915: move some leftovers to intel_pm.h from i915_drv.h Commit 696173b064c6 ("drm/i915: extract intel_pm.h from intel_drv.h") missed the declarations in i915_drv.h. Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/770f5f1c2dd99e4d6a314b70184e71b928a6d362.1556540890.git.jani.nikula@intel.com drivers/gpu/drm/i915/i915_drv.h | 13 ------------- drivers/gpu/drm/i915/i915_pmu.c | 3 ++- drivers/gpu/drm/i915/i915_sysfs.c | 3 ++- drivers/gpu/drm/i915/intel_pm.c | 6 ++++++ drivers/gpu/drm/i915/intel_pm.h | 10 ++++++++++ 5 files changed, 20 insertions(+), 15 deletions(-) commit 0d5adc5f2f01249eab256d77a55ea89bb87d7546 Author: Jani Nikula Date: Mon Apr 29 15:29:36 2019 +0300 drm/i915: extract intel_runtime_pm.h from intel_drv.h It used to be handy that we only had a couple of headers, but over time intel_drv.h has become unwieldy. Extract declarations to a separate header file corresponding to the implementation module, clarifying the modularity of the driver. Ensure the new header is self-contained, and do so with minimal further includes, using forward declarations as needed. Include the new header only where needed, and sort the modified include directives while at it and as needed. No functional changes. Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87904259868782c1ad664d852b27a50c1597cfaa.1556540890.git.jani.nikula@intel.com drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/intel_drv.h | 89 --------------------------- drivers/gpu/drm/i915/intel_runtime_pm.h | 105 ++++++++++++++++++++++++++++++++ 3 files changed, 106 insertions(+), 89 deletions(-) commit 12392a74ff58ec22c140b3b6bdc8466d4e5bf7c1 Author: Jani Nikula Date: Mon Apr 29 15:53:31 2019 +0300 drm/i915: extract intel_atomic.h from intel_drv.h It used to be handy that we only had a couple of headers, but over time intel_drv.h has become unwieldy. Extract declarations to a separate header file corresponding to the implementation module, clarifying the modularity of the driver. Ensure the new header is self-contained, and do so with minimal further includes, using forward declarations as needed. Include the new header only where needed, and sort the modified include directives while at it and as needed. No functional changes. v2: fix sparse warnings on undeclared global functions Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190429125331.32499-1-jani.nikula@intel.com drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/i915_gpu_error.c | 1 + drivers/gpu/drm/i915/icl_dsi.c | 1 + drivers/gpu/drm/i915/intel_atomic.c | 13 ++++++++ drivers/gpu/drm/i915/intel_atomic.h | 49 +++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_display.c | 1 + drivers/gpu/drm/i915/intel_dp.c | 1 + drivers/gpu/drm/i915/intel_dp_mst.c | 1 + drivers/gpu/drm/i915/intel_drv.h | 36 ----------------------- drivers/gpu/drm/i915/intel_hdmi.c | 1 + drivers/gpu/drm/i915/intel_lvds.c | 1 + drivers/gpu/drm/i915/intel_pipe_crc.c | 1 + drivers/gpu/drm/i915/intel_pm.c | 1 + drivers/gpu/drm/i915/intel_sdvo.c | 1 + drivers/gpu/drm/i915/vlv_dsi.c | 1 + 15 files changed, 74 insertions(+), 36 deletions(-) commit b9d0baaa3ab3f39986deb5cc707ad11b502ae3da Author: Jani Nikula Date: Mon Apr 29 15:29:34 2019 +0300 drm/i915: extract intel_dsi_dcs_backlight.h from intel_drv.h It used to be handy that we only had a couple of headers, but over time intel_drv.h has become unwieldy. Extract declarations to a separate header file corresponding to the implementation module, clarifying the modularity of the driver. Ensure the new header is self-contained, and do so with minimal further includes, using forward declarations as needed. Include the new header only where needed, and sort the modified include directives while at it and as needed. No functional changes. Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/f35fc2ba76d7dd5886d304ad690a6f9078a56ecd.1556540890.git.jani.nikula@intel.com drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/intel_drv.h | 3 --- drivers/gpu/drm/i915/intel_dsi_dcs_backlight.c | 8 +++++--- drivers/gpu/drm/i915/intel_dsi_dcs_backlight.h | 13 +++++++++++++ drivers/gpu/drm/i915/intel_panel.c | 1 + 5 files changed, 20 insertions(+), 6 deletions(-) commit 46f2066eb6e0bdc55adae5e140bac1ebed83a1da Author: Jani Nikula Date: Mon Apr 29 15:29:33 2019 +0300 drm/i915: extract intel_dp_mst.h from intel_drv.h It used to be handy that we only had a couple of headers, but over time intel_drv.h has become unwieldy. Extract declarations to a separate header file corresponding to the implementation module, clarifying the modularity of the driver. Ensure the new header is self-contained, and do so with minimal further includes, using forward declarations as needed. Include the new header only where needed, and sort the modified include directives while at it and as needed. No functional changes. Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/b2fd1b2b968aa0ce010d17e2811bc275cf9ca251.1556540890.git.jani.nikula@intel.com drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/intel_dp.c | 1 + drivers/gpu/drm/i915/intel_dp_mst.c | 1 + drivers/gpu/drm/i915/intel_dp_mst.h | 14 ++++++++++++++ drivers/gpu/drm/i915/intel_drv.h | 4 ---- 5 files changed, 17 insertions(+), 4 deletions(-) commit b375d0ef25896eccef5a057fd283935c47e67949 Author: Jani Nikula Date: Mon Apr 29 15:29:32 2019 +0300 drm/i915: extract intel_vdsc.h from intel_drv.h and i915_drv.h It used to be handy that we only had a couple of headers, but over time intel_drv.h has become unwieldy. Extract declarations to a separate header file corresponding to the implementation module, clarifying the modularity of the driver. Ensure the new header is self-contained, and do so with minimal further includes, using forward declarations as needed. Include the new header only where needed, and sort the modified include directives while at it and as needed. No functional changes. Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/76d2719b462004ec6f6f5c302ee5d3876357c599.1556540890.git.jani.nikula@intel.com drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/i915_drv.h | 3 --- drivers/gpu/drm/i915/intel_ddi.c | 1 + drivers/gpu/drm/i915/intel_display.c | 1 + drivers/gpu/drm/i915/intel_dp.c | 1 + drivers/gpu/drm/i915/intel_drv.h | 6 ------ drivers/gpu/drm/i915/intel_vdsc.c | 2 ++ drivers/gpu/drm/i915/intel_vdsc.h | 21 +++++++++++++++++++++ 8 files changed, 27 insertions(+), 9 deletions(-) commit 05ca9306715c9fa80edc31c8c5a60d6c5328d795 Author: Jani Nikula Date: Mon Apr 29 15:29:31 2019 +0300 drm/i915: extract intel_overlay.h from intel_drv.h and i915_drv.h It used to be handy that we only had a couple of headers, but over time intel_drv.h has become unwieldy. Extract declarations to a separate header file corresponding to the implementation module, clarifying the modularity of the driver. Ensure the new header is self-contained, and do so with minimal further includes, using forward declarations as needed. Include the new header only where needed, and sort the modified include directives while at it and as needed. No functional changes. Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/2e4fb1e67ed38870df3040bb0a1b1a58fd90cc86.1556540890.git.jani.nikula@intel.com drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/gt/intel_reset.c | 1 + drivers/gpu/drm/i915/i915_drv.c | 1 + drivers/gpu/drm/i915/i915_drv.h | 6 ------ drivers/gpu/drm/i915/i915_gpu_error.c | 3 ++- drivers/gpu/drm/i915/intel_display.c | 1 + drivers/gpu/drm/i915/intel_drv.h | 10 ---------- drivers/gpu/drm/i915/intel_overlay.c | 4 +++- drivers/gpu/drm/i915/intel_overlay.h | 29 +++++++++++++++++++++++++++++ 9 files changed, 38 insertions(+), 18 deletions(-) commit 220b92bf57095417c5374c2d351bcfcbbc517843 Author: Jani Nikula Date: Mon Apr 29 15:29:30 2019 +0300 drm/i915: extract intel_quirks.h from intel_drv.h It used to be handy that we only had a couple of headers, but over time intel_drv.h has become unwieldy. Extract declarations to a separate header file corresponding to the implementation module, clarifying the modularity of the driver. Ensure the new header is self-contained, and do so with minimal further includes, using forward declarations as needed. Include the new header only where needed, and sort the modified include directives while at it and as needed. No functional changes. Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1e2fb90dcce2063b1c464dc64aa8fa6005b62bc6.1556540890.git.jani.nikula@intel.com drivers/gpu/drm/i915/Makefile.header-test | 3 ++- drivers/gpu/drm/i915/intel_display.c | 1 + drivers/gpu/drm/i915/intel_drv.h | 3 --- drivers/gpu/drm/i915/intel_quirks.c | 1 + drivers/gpu/drm/i915/intel_quirks.h | 13 +++++++++++++ 5 files changed, 17 insertions(+), 4 deletions(-) commit 4d173e0c5916d5ed523e760c3b398f895dfe6e18 Author: Jani Nikula Date: Mon Apr 29 15:29:29 2019 +0300 drm/i915: extract intel_bios.h functions from i915_drv.h It used to be handy that we only had a couple of headers, but over time i915_drv.h has become unwieldy. Extract declarations to a separate header file corresponding to the implementation module, clarifying the modularity of the driver. Ensure the header remains self-contained, and do so with minimal further includes, using forward declarations as needed. No functional changes. Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/cf9b17d56489e15d82356575037432ad04712475.1556540890.git.jani.nikula@intel.com drivers/gpu/drm/i915/i915_drv.h | 16 ---------------- drivers/gpu/drm/i915/intel_bios.h | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 16 deletions(-) commit dbeb38d93a6da89c99801a9c70607920be72b94e Author: Jani Nikula Date: Mon Apr 29 15:50:11 2019 +0300 drm/i915: extract intel_hotplug.h from intel_drv.h and i915_drv.h It used to be handy that we only had a couple of headers, but over time intel_drv.h has become unwieldy. Extract declarations to a separate header file corresponding to the implementation module, clarifying the modularity of the driver. Ensure the new header is self-contained, and do so with minimal further includes, using forward declarations as needed. Include the new header only where needed, and sort the modified include directives while at it and as needed. No functional changes. v2: fix sparse warnings on undeclared global functions Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190429125011.10876-1-jani.nikula@intel.com drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/i915_drv.c | 1 + drivers/gpu/drm/i915/i915_drv.h | 11 ----------- drivers/gpu/drm/i915/i915_irq.c | 1 + drivers/gpu/drm/i915/intel_crt.c | 1 + drivers/gpu/drm/i915/intel_ddi.c | 1 + drivers/gpu/drm/i915/intel_display.c | 1 + drivers/gpu/drm/i915/intel_dp.c | 1 + drivers/gpu/drm/i915/intel_drv.h | 5 ----- drivers/gpu/drm/i915/intel_hdmi.c | 1 + drivers/gpu/drm/i915/intel_hotplug.c | 1 + drivers/gpu/drm/i915/intel_hotplug.h | 30 ++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_runtime_pm.c | 1 + drivers/gpu/drm/i915/intel_sdvo.c | 1 + drivers/gpu/drm/i915/intel_tv.c | 1 + 15 files changed, 42 insertions(+), 16 deletions(-) commit 440e2b3d8051017ff934ccd8c0688d623add86e0 Author: Jani Nikula Date: Mon Apr 29 15:29:27 2019 +0300 drm/i915: extract i915_irq.h from intel_drv.h and i915_drv.h It used to be handy that we only had a couple of headers, but over time intel_drv.h has become unwieldy. Extract declarations to a separate header file corresponding to the implementation module, clarifying the modularity of the driver. Ensure the new header is self-contained, and do so with minimal further includes, using forward declarations as needed. Include the new header only where needed, and sort the modified include directives while at it and as needed. No functional changes. Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/64e46278dc8dccc9c548ef453cb2ceece5367bb2.1556540890.git.jani.nikula@intel.com drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/gt/intel_reset.c | 1 + drivers/gpu/drm/i915/i915_debugfs.c | 1 + drivers/gpu/drm/i915/i915_drv.c | 1 + drivers/gpu/drm/i915/i915_drv.h | 62 ---------------- drivers/gpu/drm/i915/i915_irq.c | 1 + drivers/gpu/drm/i915/i915_irq.h | 114 ++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_trace.h | 1 + drivers/gpu/drm/i915/intel_drv.h | 37 ---------- drivers/gpu/drm/i915/intel_pm.c | 1 + drivers/gpu/drm/i915/intel_runtime_pm.c | 1 + 11 files changed, 122 insertions(+), 99 deletions(-) commit 81afa278e64122ac0712e52157b0b4f2b6c92fdc Author: Jani Nikula Date: Mon Apr 29 15:29:26 2019 +0300 drm/i915: extract intel_dp_aux_backlight.h from intel_drv.h It used to be handy that we only had a couple of headers, but over time intel_drv.h has become unwieldy. Extract declarations to a separate header file corresponding to the implementation module, clarifying the modularity of the driver. Ensure the new header is self-contained, and do so with minimal further includes, using forward declarations as needed. Include the new header only where needed, and sort the modified include directives while at it and as needed. No functional changes. Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/2e5a386cbdcd361399e94c55d47a12352a5216c7.1556540890.git.jani.nikula@intel.com drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/intel_dp_aux_backlight.c | 1 + drivers/gpu/drm/i915/intel_dp_aux_backlight.h | 13 +++++++++++++ drivers/gpu/drm/i915/intel_drv.h | 3 --- drivers/gpu/drm/i915/intel_panel.c | 1 + 5 files changed, 16 insertions(+), 3 deletions(-) commit e075094fa318ace1ed2fbbc47842c288e62e5ca4 Author: Jani Nikula Date: Mon Apr 29 15:29:25 2019 +0300 drm/i915: extract intel_dp_link_training.h from intel_drv.h It used to be handy that we only had a couple of headers, but over time intel_drv.h has become unwieldy. Extract declarations to a separate header file corresponding to the implementation module, clarifying the modularity of the driver. Ensure the new header is self-contained, and do so with minimal further includes, using forward declarations as needed. Include the new header only where needed, and sort the modified include directives while at it and as needed. No functional changes. Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/eb23be64d04957b2cf82b79fd69cc57ed84043a4.1556540889.git.jani.nikula@intel.com drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/intel_ddi.c | 1 + drivers/gpu/drm/i915/intel_dp.c | 1 + drivers/gpu/drm/i915/intel_dp_link_training.c | 1 + drivers/gpu/drm/i915/intel_dp_link_training.h | 14 ++++++++++++++ drivers/gpu/drm/i915/intel_drv.h | 4 ---- 6 files changed, 18 insertions(+), 4 deletions(-) commit 8834e3659da8f57c86ad2255b2ae34613568fa0f Author: Jani Nikula Date: Mon Apr 29 15:29:24 2019 +0300 drm/i915: extract intel_fifo_underrun.h from intel_drv.h It used to be handy that we only had a couple of headers, but over time intel_drv.h has become unwieldy. Extract declarations to a separate header file corresponding to the implementation module, clarifying the modularity of the driver. Ensure the new header is self-contained, and do so with minimal further includes, using forward declarations as needed. Include the new header only where needed, and sort the modified include directives while at it and as needed. No functional changes. Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/0507c5523d1f07a48e6679a04db75246ce8ba766.1556540889.git.jani.nikula@intel.com drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/i915_irq.c | 1 + drivers/gpu/drm/i915/intel_crt.c | 1 + drivers/gpu/drm/i915/intel_ddi.c | 1 + drivers/gpu/drm/i915/intel_display.c | 1 + drivers/gpu/drm/i915/intel_dp.c | 1 + drivers/gpu/drm/i915/intel_drv.h | 13 ------------- drivers/gpu/drm/i915/intel_fifo_underrun.c | 1 + drivers/gpu/drm/i915/intel_fifo_underrun.h | 27 +++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_hdmi.c | 1 + drivers/gpu/drm/i915/intel_sdvo.c | 1 + drivers/gpu/drm/i915/vlv_dsi.c | 1 + 12 files changed, 37 insertions(+), 13 deletions(-) commit 3db9de3b208c5eb3cced8c92f77e2a4b2c6c2c73 Author: Jani Nikula Date: Mon Apr 29 15:29:23 2019 +0300 drm/i915: move dsi init functions to intel_dsi.h Keep the header self-contained. It'll need rework of its own in the future, but gotta start somewhere. Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/158347ef715a35ca1f7d945efb139d80bf5e0e6c.1556540889.git.jani.nikula@intel.com drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/intel_drv.h | 5 ----- drivers/gpu/drm/i915/intel_dsi.h | 4 ++++ 3 files changed, 5 insertions(+), 5 deletions(-) commit f4be705f862a731af38c79488a1d3c795d78079b Author: Jani Nikula Date: Mon Apr 29 15:29:22 2019 +0300 drm/i915: make intel_dpll_mgr.h self-contained And ensure it stays that way. Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/8e759b36dee10c20aa06e4d34d36cda6a2a02323.1556540889.git.jani.nikula@intel.com drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/intel_dpll_mgr.c | 1 + drivers/gpu/drm/i915/intel_dpll_mgr.h | 8 ++++++-- 3 files changed, 8 insertions(+), 2 deletions(-) commit 531747b8200acf5ca98e847b806a55e5eb497e3e Author: Jani Nikula Date: Mon Apr 29 15:29:21 2019 +0300 drm/i915/dvo: rename dvo.h to intel_dvo_dev.h and make self-contained Put the header more in line with the rest. No functional changes. Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/9f4dc21928f9cccd7a3593a2f9faa44b4412ff33.1556540889.git.jani.nikula@intel.com drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/dvo_ch7017.c | 3 ++- drivers/gpu/drm/i915/dvo_ch7xxx.c | 3 ++- drivers/gpu/drm/i915/dvo_ivch.c | 3 ++- drivers/gpu/drm/i915/dvo_ns2501.c | 5 +++-- drivers/gpu/drm/i915/dvo_sil164.c | 3 ++- drivers/gpu/drm/i915/dvo_tfp410.c | 3 ++- drivers/gpu/drm/i915/intel_dvo.c | 2 +- drivers/gpu/drm/i915/{dvo.h => intel_dvo_dev.h} | 10 ++++++---- 9 files changed, 21 insertions(+), 12 deletions(-) commit 779bc1d0f30a41e15ea7236848b2b3b09c12ffe8 Author: Jani Nikula Date: Mon Apr 29 15:29:20 2019 +0300 drm/i915: make intel_bios.h self-contained Just a types include required. Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/15b8dea022bd80198f91c59f8ad793ebd8fc04f0.1556540889.git.jani.nikula@intel.com drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/intel_bios.h | 2 ++ 2 files changed, 3 insertions(+) commit aab30b85c97afb384508a0ed9a6c98ee43bb9d27 Author: Jani Nikula Date: Mon Apr 29 15:29:19 2019 +0300 drm/i915: ensure more headers remain self-contained Add more headers to the header test list: * i915_drv.h * i915_params.h * i915_reg.h * intel_drv.h * intel_uncore.h Happily they already are self-contained, but keep them that way. Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/f660e7e1258b81d50475fa73f610eb3312c83424.1556540889.git.jani.nikula@intel.com drivers/gpu/drm/i915/Makefile.header-test | 5 +++++ 1 file changed, 5 insertions(+) commit da17223e8539a7d4485d3c85677aa83e2fc74896 Author: Lucas De Marchi Date: Thu Apr 4 16:04:26 2019 -0700 drm/i915: do not mix workaround with normal flow Separate the two comments: one is a workaround and the other is a sanity check. We could just compare != 1, but let's treat them differently due to having different meaning. Signed-off-by: Lucas De Marchi Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20190404230426.15837-4-lucas.demarchi@intel.com drivers/gpu/drm/i915/intel_pm.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 323b0a82efbff1c73fce3c7f2a49b7f850b7f983 Author: Lucas De Marchi Date: Thu Apr 4 16:04:25 2019 -0700 drm/i915: reorder if chain to have last gen first Reorder if/else so we check for gen >= 11 first, similar to most of other checks in the driver. Signed-off-by: Lucas De Marchi Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20190404230426.15837-3-lucas.demarchi@intel.com drivers/gpu/drm/i915/intel_pm.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit fcfec1fc98ffbd6713385b903deae31d20000832 Author: Lucas De Marchi Date: Thu Apr 4 16:04:24 2019 -0700 drm/i915/icl: fix step numbers in icl_display_core_init() At some point the spec was changed and we never updated the numbers to match it. Let's try once more to keep them in sync. Signed-off-by: Lucas De Marchi Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20190404230426.15837-2-lucas.demarchi@intel.com drivers/gpu/drm/i915/intel_runtime_pm.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 0fc2273b9ab7f07cdef448e99525e481535e1ab0 Author: Tvrtko Ursulin Date: Thu Apr 18 11:06:34 2019 +0100 drm/i915/icl: Whitelist GEN9_SLICE_COMMON_ECO_CHICKEN1 WaEnableStateCacheRedirectToCS context workaround configures the L3 cache to benefit 3d workloads but media has different requirements. Remove the workaround and whitelist the register to allow any userspace configure the behaviour to their liking. v2: * Remove the workaround apart from adding the whitelist. Signed-off-by: Tvrtko Ursulin Cc: Lionel Landwerlin Cc: kevin.ma@intel.com Cc: xiaogang.li@intel.com Acked-by: Lionel Landwerlin Acked-by: Anuj Phogat Link: https://patchwork.freedesktop.org/patch/msgid/20190418100634.984-1-tvrtko.ursulin@linux.intel.com Fixes: f63c7b4880aa ("drm/i915/icl: WaEnableStateCacheRedirectToCS") Reviewed-by: Joonas Lahtinen [tursulin: Anuj reported no GPU hangs or performance regressions with old Mesa on patched kernel.] drivers/gpu/drm/i915/gt/intel_workarounds.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 62acdcfa8b7ae921b70afff888e994df117022a6 Author: Arnd Bergmann Date: Mon Mar 25 13:43:44 2019 +0100 wireless: carl9170: fix clang build warning clang fails to eliminate some dead code with always-taken branches when CONFIG_PROFILE_ANNOTATED_BRANCHES is set, leading to a false-positive warning: drivers/net/wireless/ath/carl9170/mac.c:522:3: error: variable 'power' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] BUG_ON(1); ^~~~~~~~~ Change both instances of BUG_ON(1) in carl9170 to the simpler BUG() to avoid the warning. Signed-off-by: Arnd Bergmann Acked-by: Christian Lamparter Signed-off-by: Kalle Valo drivers/net/wireless/ath/carl9170/mac.c | 2 +- drivers/net/wireless/ath/carl9170/rx.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit bfabdd6997323adbedccb13a3fed1967fb8cf8f5 Author: Gustavo A. R. Silva Date: Mon Apr 15 09:56:46 2019 -0500 wil6210: fix potential out-of-bounds read Notice that *rc* can evaluate to up to 5, include/linux/netdevice.h: enum gro_result { GRO_MERGED, GRO_MERGED_FREE, GRO_HELD, GRO_NORMAL, GRO_DROP, GRO_CONSUMED, }; typedef enum gro_result gro_result_t; In case *rc* evaluates to 5, we end up having an out-of-bounds read at drivers/net/wireless/ath/wil6210/txrx.c:821: wil_dbg_txrx(wil, "Rx complete %d bytes => %s\n", len, gro_res_str[rc]); Fix this by adding element "GRO_CONSUMED" to array gro_res_str. Addresses-Coverity-ID: 1444666 ("Out-of-bounds read") Fixes: 194b482b5055 ("wil6210: Debug print GRO Rx result") Signed-off-by: Gustavo A. R. Silva Reviewed-by: Maya Erez Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/txrx.c | 1 + 1 file changed, 1 insertion(+) commit d8792393a783158cbb2c39939cb897dc5e5299b6 Author: Anilkumar Kolli Date: Wed Mar 6 23:06:11 2019 +0530 ath: DFS JP domain W56 fixed pulse type 3 RADAR detection Increase pulse width range from 1-2usec to 0-4usec. During data traffic HW occasionally fails detecting radar pulses, so that SW cannot get enough radar reports to achieve the success rate. Tested ath10k hw and fw: * QCA9888(10.4-3.5.1-00052) * QCA4019(10.4-3.2.1.1-00017) * QCA9984(10.4-3.6-00104) * QCA988X(10.2.4-1.0-00041) Tested ath9k hw: AR9300 Tested-by: Tamizh chelvam Signed-off-by: Tamizh chelvam Signed-off-by: Anilkumar Kolli Signed-off-by: Kalle Valo drivers/net/wireless/ath/dfs_pattern_detector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d3c2be9022d687cc97c0798c4593382f1a22c068 Author: Tomislav Požega Date: Thu Mar 14 15:07:50 2019 +0100 ath9k: drop redundant code in ar9003_hw_set_channel AR9330, AR9485, AR9531, AR9550, AR9561 and AR9565 all use same channel set register configuration which allows for small code size reduction. Signed-off-by: Tomislav Požega Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/ar9003_phy.c | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) commit b50fd29c526806d6550f4ee773d30e2fe2144a09 Author: Tomislav Požega Date: Thu Mar 14 15:07:49 2019 +0100 ath: drop duplicated define Remove duplicate NO_CTL that is just 2 lines below. Signed-off-by: Tomislav Požega Signed-off-by: Kalle Valo drivers/net/wireless/ath/regd.h | 1 - 1 file changed, 1 deletion(-) commit 05039f01e63053add589255e4a9aa1d4c3e1f0c0 Author: YueHaibing Date: Wed Apr 17 10:57:45 2019 +0800 ath9k: Remove some set but not used variables Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/ath/ath9k/xmit.c: In function 'ath_tx_count_frames': drivers/net/wireless/ath/ath9k/xmit.c:413:25: warning: variable 'fi' set but not used [-Wunused-but-set-variable] drivers/net/wireless/ath/ath9k/xmit.c: In function 'ath_tx_complete_aggr': drivers/net/wireless/ath/ath9k/xmit.c:449:24: warning: variable 'hdr' set but not used [-Wunused-but-set-variable] drivers/net/wireless/ath/ath9k/xmit.c: In function 'ath_tx_start': drivers/net/wireless/ath/ath9k/xmit.c:2274:18: warning: variable 'avp' set but not used [-Wunused-but-set-variable] drivers/net/wireless/ath/ath9k/xmit.c:2269:24: warning: variable 'hdr' set but not used [-Wunused-but-set-variable] These variables are not used any more and can be removed. Signed-off-by: YueHaibing Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/xmit.c | 11 ----------- 1 file changed, 11 deletions(-) commit b037b107565f329e737ec9ffdb121477a07245b6 Author: Sven Eckelmann Date: Wed Mar 20 11:37:23 2019 +0100 ath9k: Differentiate between max combined and per chain power The ath9k driver uses as maximum allowed txpower the constant MAX_RATE_POWER. It is used to set a maximum txpower limit for the PHY (which is combined txpower) and also the maximum txpower for per chain rates. Its value 63 is derived from the maximum number the registers can store for the per chain txpower. The max txpower a user can set because of this is 31 dBm (floor(63 / 2)). This also means that a device with multiple tx chains is even limited further: * 1 chain: 31 dBm per chain * 2 chains: 28 dBm per chain * 3 chains: 26 dBm per chain This combined txpower limit of 31 dBm becomes even more problematic when some extra antenna gain is set in the EEPROM. A high power device is then no longer able to reach its potential limits. Instead the code dealing with the combined txpower must use a higher limit than 63 and only the code dealing with the per chain txpower have to use the limit of 63. Since the antenna gain can be quite large and 8 bit variables are often used in ath9k for txpower, a large, divisible by two number like 254 is a good choice for this new limit. Signed-off-by: Sven Eckelmann Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/eeprom.c | 2 +- drivers/net/wireless/ath/ath9k/eeprom_4k.c | 1 + drivers/net/wireless/ath/ath9k/hw.c | 8 ++++---- drivers/net/wireless/ath/ath9k/hw.h | 1 + drivers/net/wireless/ath/ath9k/init.c | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-) commit 2f90c7e5d09437a4d8d5546feaae9f1cf48cfbe1 Author: Tim Schumacher Date: Mon Mar 18 20:05:57 2019 +0100 ath9k: Check for errors when reading SREV register Right now, if an error is encountered during the SREV register read (i.e. an EIO in ath9k_regread()), that error code gets passed all the way to __ath9k_hw_init(), where it is visible during the "Chip rev not supported" message. ath9k_htc 1-1.4:1.0: ath9k_htc: HTC initialized with 33 credits ath: phy2: Mac Chip Rev 0x0f.3 is not supported by this driver ath: phy2: Unable to initialize hardware; initialization status: -95 ath: phy2: Unable to initialize hardware; initialization status: -95 ath9k_htc: Failed to initialize the device Check for -EIO explicitly in ath9k_hw_read_revisions() and return a boolean based on the success of the operation. Check for that in __ath9k_hw_init() and abort with a more debugging-friendly message if reading the revisions wasn't successful. ath9k_htc 1-1.4:1.0: ath9k_htc: HTC initialized with 33 credits ath: phy2: Failed to read SREV register ath: phy2: Could not read hardware revision ath: phy2: Unable to initialize hardware; initialization status: -95 ath: phy2: Unable to initialize hardware; initialization status: -95 ath9k_htc: Failed to initialize the device This helps when debugging by directly showing the first point of failure and it could prevent possible errors if a 0x0f.3 revision is ever supported. Signed-off-by: Tim Schumacher Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/hw.c | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) commit 389b72e58259336c2d56d58b660b79cf4b9e0dcb Author: Toke Høiland-Jørgensen Date: Thu Mar 7 19:39:44 2019 +0100 ath9k: Don't trust TX status TID number when reporting airtime As already noted a comment in ath_tx_complete_aggr(), the hardware will occasionally send a TX status with the wrong tid number. If we trust the value, airtime usage will be reported to the wrong AC, which can cause the deficit on that AC to become very low, blocking subsequent attempts to transmit. To fix this, account airtime usage to the TID number from the original skb, instead of the one in the hardware TX status report. Reported-by: Miguel Catalan Cid Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/xmit.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit e643da21e19a62f928fb30f080470ea2e335b7f0 Author: Colin Ian King Date: Thu Apr 4 14:47:23 2019 +0100 ath6kl: remove redundant check of status != 0 The check on status not being zero is redundant as previous code paths that set status to an error value break out of the while loop and hence status is never non-zero at the check. Remove this redundant code. Addresses-Coverity: ("Logically dead code") Signed-off-by: Colin Ian King Reviewed-by: Mukesh Ojha Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath6kl/htc_pipe.c | 3 --- 1 file changed, 3 deletions(-) commit 5d6751eaff672ea77642e74e92e6c0ac7f9709ab Author: Dan Carpenter Date: Thu Apr 4 11:56:51 2019 +0300 ath6kl: add some bounds checking The "ev->traffic_class" and "reply->ac" variables come from the network and they're used as an offset into the wmi->stream_exist_for_ac[] array. Those variables are u8 so they can be 0-255 but the stream_exist_for_ac[] array only has WMM_NUM_AC (4) elements. We need to add a couple bounds checks to prevent array overflows. I also modified one existing check from "if (traffic_class > 3) {" to "if (traffic_class >= WMM_NUM_AC) {" just to make them all consistent. Fixes: bdcd81707973 (" Add ath6kl cleaned up driver") Signed-off-by: Dan Carpenter Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath6kl/wmi.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 83d9562b6478d830c310a21cf99091de44c8f6e2 Author: Gustavo A. R. Silva Date: Wed Apr 3 13:49:49 2019 -0500 ath6kl: wmi: use struct_size() helper Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes, in particular in the context in which this code is being used. So, replace code of the following form: sizeof(*ev) + ev->num_neighbors * sizeof(struct wmi_neighbor_info) with: struct_size(ev, neighbor, ev->num_neighbors) This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath6kl/wmi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit df75786b9233be9e4ce9608df2c1cdc8b20e13df Author: Gustavo A. R. Silva Date: Wed Apr 3 10:48:35 2019 -0500 ath6kl: debug: Use struct_size() helper Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes, in particular in the context in which this code is being used. So, change the following form: sizeof(*tbl) + num_entries * sizeof(struct wmi_bss_roam_info) to : struct_size(tbl, info, num_entries) This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath6kl/debug.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 93ee3d108fc77e19efeac3ec5aa7d5886711bfef Author: Pradeep kumar Chitrapu Date: Tue Apr 23 16:43:28 2019 +0300 ath10k: fix incorrect multicast/broadcast rate setting Invalid rate code is sent to firmware when multicast rate value of 0 is sent to driver indicating disabled case, causing broken mesh path. so fix that. Tested on QCA9984 with firmware 10.4-3.6.1-00827 Sven tested on IPQ4019 with 10.4-3.5.3-00057 and QCA9888 with 10.4-3.5.3-00053 (ath10k-firmware) and 10.4-3.6-00140 (linux-firmware 2018-12-16-211de167). Fixes: cd93b83ad92 ("ath10k: support for multicast rate control") Co-developed-by: Zhi Chen Signed-off-by: Zhi Chen Signed-off-by: Pradeep Kumar Chitrapu Tested-by: Sven Eckelmann Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/mac.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit a8b10da05cbe2c7466ea72378a4c046dfa47d128 Author: Wen Gong Date: Fri Apr 26 09:41:11 2019 +0300 ath10k: enable QCA6174 hw3.2 SDIO hardware After implementing PN replay check we can enable SDIO support on QCA6174. Tested with client mode on all security modes, and fragmentation as well. AP mode does not work yet. Also tone down the warning about SDIO being not ready yet. Tested on QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00007-QCARMSWP-1. AP mode is not working yet. Signed-off-by: Wen Gong Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.c | 27 +++++++++++++++++++++++++++ drivers/net/wireless/ath/ath10k/hw.h | 1 + drivers/net/wireless/ath/ath10k/sdio.c | 2 +- 3 files changed, 29 insertions(+), 1 deletion(-) commit 33f9747291ff384aeed7f0c97c19d5dba621f265 Author: Wen Gong Date: Fri Apr 26 09:41:10 2019 +0300 ath10k: add fragmentation handler for high latency devices On high latency devices (SDIO, USB) ath10k did not handle fragmented frames and all fragmented frames on receive path were lost in ath10k. Even a simple ping test failed with fragmentation. The fragmented packets are decapsulated based on the security mode, then the PN is checked and the fragmented frame is passed to mac80211. mac80211 in ieee80211_rx_h_defragment() will then combine the fragment frames and forward to upper layers. Tested on QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00007-QCARMSWP-1. Signed-off-by: Wen Gong Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/htt.h | 13 ++ drivers/net/wireless/ath/ath10k/htt_rx.c | 230 +++++++++++++++++++++++++++++++ 2 files changed, 243 insertions(+) commit 130c77495708c61f0aa839e436a8a3a973824b19 Author: Wen Gong Date: Fri Apr 26 09:41:09 2019 +0300 ath10k: add PN replay protection for high latency devices On high latency devices (SDIO, USB) ath10k did not do PN replay check, a data frame with an invalid PN number was not discard as it should have been. So this patch implements PN replay in ath10k. PN replay check for fragmented frames is implemented in followup patch. With low latency devices (PCI, AHB) hardware can store the data frames's content to host memory directly and the firmware can fully reorder data frames, and do PN replay check at the same time. But for high latency devices all data frames will be received and stored in firmware's memory and it is hard to do full reorder because of the memory size limitations in the firmware. This is why the PN replay protections needs to be implemented in host driver. Tested on QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00007-QCARMSWP-1. Signed-off-by: Wen Gong Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/htt_rx.c | 97 +++++++++++++++++++++++++++++++- 1 file changed, 95 insertions(+), 2 deletions(-) commit 28ce53b6cfda35d25ca3bbf2665e84be38a5f9dd Author: Wen Gong Date: Fri Apr 26 09:41:08 2019 +0300 ath10k: add handler for HTT_T2H_MSG_TYPE_SEC_IND event Add the handler for HTT_T2H_MSG_TYPE_SEC_IND event from firmware, which stores PN for replay check implemented in the following patch. Tested on QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00007-QCARMSWP-1. Signed-off-by: Wen Gong Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/htt_rx.c | 46 ++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) commit e1bddde9737ac4687ca6e2fe6c95f67a9bec353b Author: Wen Gong Date: Fri Apr 26 09:41:07 2019 +0300 ath10k: add struct for high latency PN replay protection Add the struct for PN replay protection and fragment packet handler. Also fix the bitmask of HTT_RX_DESC_HL_INFO_MCAST_BCAST to match what's currently used by SDIO firmware. The defines are not used yet so it's safe to modify them. Remove the conflicting HTT_RX_DESC_HL_INFO_FRAGMENT as it's not either used in ath10k. Tested on QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00007-QCARMSWP-1. Signed-off-by: Wen Gong Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.h | 8 +++++++ drivers/net/wireless/ath/ath10k/htt.h | 43 ++++++++++++++++++++++++++++++---- 2 files changed, 47 insertions(+), 4 deletions(-) commit 46938cc8ab91354e6d751dc0790ddb4244b6703a Author: Ingo Molnar Date: Thu Apr 25 13:17:01 2019 +0200 x86/paravirt: Rename paravirt_patch_site::instrtype to paravirt_patch_site::type It's used as 'type' in almost every paravirt patching function, so standardize the field name from the somewhat weird 'instrtype' name to 'type'. Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Signed-off-by: Ingo Molnar arch/x86/include/asm/paravirt_types.h | 4 ++-- arch/x86/kernel/alternative.c | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) commit 1fc654cf6e04b402ba9c4327b2919ea864037e7a Author: Ingo Molnar Date: Thu Apr 25 13:03:31 2019 +0200 x86/paravirt: Standardize 'insn_buff' variable names We currently have 6 (!) separate naming variants to name temporary instruction buffers that are used for code patching: - insnbuf - insnbuff - insn_buff - insn_buffer - ibuf - ibuffer These are used as local variables, percpu fields and function parameters. Standardize all the names to a single variant: 'insn_buff'. Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Signed-off-by: Ingo Molnar arch/x86/events/intel/ds.c | 8 +++--- arch/x86/include/asm/paravirt_types.h | 13 ++++----- arch/x86/kernel/alternative.c | 52 +++++++++++++++++------------------ arch/x86/kernel/kprobes/opt.c | 16 +++++------ arch/x86/kernel/paravirt.c | 22 +++++++-------- arch/x86/kernel/paravirt_patch.c | 42 ++++++++++++++-------------- arch/x86/tools/insn_decoder_test.c | 8 +++--- arch/x86/tools/insn_sanity.c | 28 +++++++++---------- 8 files changed, 93 insertions(+), 96 deletions(-) commit 62c8e423450d7140a640651227ec563d6b0141ce Author: Chris Wilson Date: Mon Apr 29 10:07:35 2019 +0100 drm/i915: Skip unused contexts for context_barrier_task() If the context has not been used yet, it needs no barrier, and in the process fix up the selftest in mock_contexts. Testcase: igt/gem_ctx_clone/vm Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190429090735.326-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_context.c | 6 +++--- drivers/gpu/drm/i915/selftests/i915_gem_context.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 788033a92a4def4c966296be0276100954841ab2 Author: Sam Ravnborg Date: Sat Jan 26 20:27:32 2019 +0100 drm: drop drm_bus from todo David Herrmann removed the last bits of drm_bus in: commit c5786fe5f1c5 ("drm: Goody bye, drm_bus!") Remove the todo item. Signed-off-by: Sam Ravnborg Reviewed-by: David Herrmann [I miss drm_bus!] Cc: David Airlie Cc: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190126192732.15263-1-sam@ravnborg.org Link: https://patchwork.freedesktop.org/patch/msgid/20190126192732.15263-1-sam@ravnborg.org Documentation/gpu/todo.rst | 19 ------------------- 1 file changed, 19 deletions(-) commit e99c25f4320d1a8329c12c66680a974725ff16a0 Author: YueHaibing Date: Sat Apr 27 00:40:06 2019 +0800 iio: dac: ad5758: remove set but not used variable 'dc_dc_mode' Fixes gcc '-Wunused-but-set-variable' warning: drivers/iio/dac/ad5758.c: In function ad5758_write_powerdown: drivers/iio/dac/ad5758.c:585:15: warning: variable dc_dc_mode set but not used [-Wunused-but-set-variable] It is not used any more since commit edde945257e2 ("iio: dac: ad5758: Modifications for new revision") Signed-off-by: YueHaibing Signed-off-by: Jonathan Cameron drivers/iio/dac/ad5758.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 8b7a6a35746292e140304107e60f9a980416abf7 Author: Gwendal Grignou Date: Fri Apr 26 13:39:16 2019 +0200 iio: cros_ec: add 'id' sysfs entry This new sysfs entry is used to interpret ring buffer information, mainly by Android sensor HAL. It expand to all sensors, the documentation about 'id' we can found in Documentation/ABI/testing/sysfs-bus-iio-cros-ec. Also fix typo in docs, I replace 'Septembre' by 'September'. Signed-off-by: Gwendal Grignou Signed-off-by: Fabien Lahoudere Signed-off-by: Jonathan Cameron Documentation/ABI/testing/sysfs-bus-iio-cros-ec | 10 +++++----- drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c | 14 ++++++++++++++ 2 files changed, 19 insertions(+), 5 deletions(-) commit d2fc0156963cae8f1eec8e2dd645fbbf1e1c1c8e Author: Fabien Dessenne Date: Wed Apr 24 14:51:26 2019 +0200 iio: adc: stm32-dfsdm: missing error case during probe During probe, check the devm_ioremap_resource() error value. Also return the devm_clk_get() error value instead of -EINVAL. Signed-off-by: Fabien Dessenne Acked-by: Fabrice Gasnier Signed-off-by: Jonathan Cameron drivers/iio/adc/stm32-dfsdm-core.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 3e53ef91f826957dec013c47707ffc1bb42b42d7 Author: Fabien Dessenne Date: Wed Apr 24 14:51:25 2019 +0200 iio: adc: stm32-dfsdm: manage the get_irq error case During probe, check the "get_irq" error value. Signed-off-by: Fabien Dessenne Acked-by: Fabrice Gasnier Signed-off-by: Jonathan Cameron drivers/iio/adc/stm32-dfsdm-adc.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 17b62779cbe40773e10a83af000e51c29b764575 Author: Brian Masney Date: Thu Apr 25 19:03:13 2019 -0400 dt-bindings: iio: tsl2772: convert bindings to YAML format Convert the tsl2772 device tree bindings to the new YAML format. Signed-off-by: Brian Masney Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron .../devicetree/bindings/iio/light/tsl2772.txt | 42 ----------- .../devicetree/bindings/iio/light/tsl2772.yaml | 83 ++++++++++++++++++++++ 2 files changed, 83 insertions(+), 42 deletions(-) commit 40e64432ce98f4ee5671d39fbf909ef3f3592366 Author: Brian Masney Date: Thu Apr 25 19:03:14 2019 -0400 dt-bindings: iio: tsl2583: convert bindings to YAML format Convert the tsl2583 device tree bindings to the new YAML format. Signed-off-by: Brian Masney Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron .../devicetree/bindings/iio/light/tsl2583.txt | 25 ------------ .../devicetree/bindings/iio/light/tsl2583.yaml | 46 ++++++++++++++++++++++ 2 files changed, 46 insertions(+), 25 deletions(-) commit ed61b30858141b6462f2a96c73c267845a478c0c Author: Daniel Gomez Date: Tue Apr 23 23:41:58 2019 +0200 iio: dac: ad5758: declare missing of table Add missing table for SPI driver relying on SPI device match since compatible is in a DT binding or in a DTS. Before this patch: modinfo drivers/iio/dac/ad5758.ko | grep alias alias: spi:ad5758 After this patch: modinfo drivers/iio/dac/ad5758.ko | grep alias alias: spi:ad5758 alias: of:N*T*Cadi,ad5758C* alias: of:N*T*Cadi,ad5758 Reported-by: Javier Martinez Canillas Signed-off-by: Daniel Gomez Signed-off-by: Jonathan Cameron drivers/iio/dac/ad5758.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 311def4cd2c6e8bbb4777919a3a5cf71592221db Author: Daniel Gomez Date: Tue Apr 23 23:41:37 2019 +0200 iio: adxl372: declare missing of table Add missing table for SPI driver relying on SPI device match since compatible is in a DT binding or in a DTS. Before this patch: modinfo drivers/iio/accel/adxl372_spi.ko | grep alias After this patch: modinfo drivers/iio/accel/adxl372_spi.ko | grep alias alias: spi:adxl372 alias: of:N*T*Cadi,adxl372C* alias: of:N*T*Cadi,adxl372 Reported-by: Javier Martinez Canillas Signed-off-by: Daniel Gomez Signed-off-by: Jonathan Cameron drivers/iio/accel/adxl372_spi.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 17b16c3cbe92dee378004699e12aa6aa3df389e7 Author: Daniel Gomez Date: Tue Apr 23 23:40:59 2019 +0200 iio: accel: kxsd9: declare missing of table Add missing table for SPI driver relying on SPI device match since compatible is in a DT binding or in a DTS. Before this patch: modinfo drivers/iio/accel/kxsd9-spi.ko | grep alias alias: spi:kxsd9 After this patch: modinfo drivers/iio/accel/kxsd9-spi.ko | grep alias alias: spi:kxsd9 alias: of:N*T*Ckionix,kxsd9C* alias: of:N*T*Ckionix,kxsd9 Reported-by: Javier Martinez Canillas Signed-off-by: Daniel Gomez Signed-off-by: Jonathan Cameron drivers/iio/accel/kxsd9-spi.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 34c2a55b0df4448110f353f21a8a02fe3e0bddfe Author: Daniel Gomez Date: Tue Apr 23 23:42:18 2019 +0200 iio: temperature: maxim_thermocouple: declare missing of table Add missing table for SPI driver relying on SPI device match since compatible is in a DT binding or in a DTS. Before this patch: modinfo drivers/iio/temperature/maxim_thermocouple.ko | grep alias alias: spi:max31855 alias: spi:max6675 After this patch: modinfo drivers/iio/temperature/maxim_thermocouple.ko | grep alias alias: spi:max31855 alias: spi:max6675 alias: of:N*T*Cmaxim,max31855C* alias: of:N*T*Cmaxim,max31855 alias: of:N*T*Cmaxim,max6675C* alias: of:N*T*Cmaxim,max6675 Reported-by: Javier Martinez Canillas Signed-off-by: Daniel Gomez Acked-by: Matt Ranostay Signed-off-by: Jonathan Cameron drivers/iio/temperature/maxim_thermocouple.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit e3faedf71d881780c2b8f6548aaacfad7f0a8372 Author: Kefeng Wang Date: Tue Apr 23 15:50:03 2019 +0800 iio: adc: at91: Use dev_get_drvdata() Using dev_get_drvdata directly. Cc: Ludovic Desroches Cc: Jonathan Cameron Cc: linux-iio@vger.kernel.org Signed-off-by: Kefeng Wang Signed-off-by: Jonathan Cameron drivers/iio/adc/at91-sama5d2_adc.c | 12 ++++-------- drivers/iio/adc/at91_adc.c | 4 ++-- 2 files changed, 6 insertions(+), 10 deletions(-) commit 46472b3efb61b033f9b4807a178434c50f31d5c5 Author: Chris Wilson Date: Fri Apr 26 17:33:36 2019 +0100 drm/i915: Move i915_request_alloc into selftests/ Having transitioned GEM over to using intel_context as its primary means of tracking the GEM context and engine combined and using i915_request_create(), we can move the older i915_request_alloc() helper function into selftests/ where the remaining users are confined. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190426163336.15906-9-chris@chris-wilson.co.uk drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/gt/selftest_hangcheck.c | 9 +++--- drivers/gpu/drm/i915/gt/selftest_lrc.c | 13 ++++---- drivers/gpu/drm/i915/gt/selftest_workarounds.c | 15 +++------ drivers/gpu/drm/i915/i915_request.c | 38 ----------------------- drivers/gpu/drm/i915/i915_request.h | 3 -- drivers/gpu/drm/i915/selftests/huge_pages.c | 3 +- drivers/gpu/drm/i915/selftests/i915_gem.c | 5 +-- drivers/gpu/drm/i915/selftests/i915_gem_context.c | 13 ++++---- drivers/gpu/drm/i915/selftests/i915_gem_evict.c | 3 +- drivers/gpu/drm/i915/selftests/i915_request.c | 4 +-- drivers/gpu/drm/i915/selftests/igt_gem_utils.c | 34 ++++++++++++++++++++ drivers/gpu/drm/i915/selftests/igt_gem_utils.h | 17 ++++++++++ drivers/gpu/drm/i915/selftests/igt_spinner.c | 3 +- drivers/gpu/drm/i915/selftests/mock_request.c | 3 +- 15 files changed, 89 insertions(+), 75 deletions(-) commit 026844460743caa4ade58101bf5daef5936dff86 Author: Chris Wilson Date: Fri Apr 26 17:33:35 2019 +0100 drm/i915: Remove intel_context.active_link We no longer need to track the active intel_contexts within each engine, allowing us to drop a tricky mutex_lock from inside unpin (which may occur inside fs_reclaim). Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190426163336.15906-8-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gt/intel_context.c | 11 +---------- drivers/gpu/drm/i915/gt/intel_context_types.h | 1 - drivers/gpu/drm/i915/i915_debugfs.c | 11 +++++++++-- drivers/gpu/drm/i915/i915_gem_context.c | 2 -- drivers/gpu/drm/i915/i915_gem_context_types.h | 1 - drivers/gpu/drm/i915/selftests/i915_gem_context.c | 1 - drivers/gpu/drm/i915/selftests/mock_context.c | 1 - 7 files changed, 10 insertions(+), 18 deletions(-) commit 5e2a0419ef7cb25d0f9a5fd6a62372bb47ce948d Author: Chris Wilson Date: Fri Apr 26 17:33:34 2019 +0100 drm/i915: Switch back to an array of logical per-engine HW contexts We switched to a tree of per-engine HW context to accommodate the introduction of virtual engines. However, we plan to also support multiple instances of the same engine within the GEM context, defeating our use of the engine as a key to looking up the HW context. Just allocate a logical per-engine instance and always use an index into the ctx->engines[]. Later on, this ctx->engines[] may be replaced by a user specified map. v2: Add for_each_gem_engine() helper to iterator within the engines lock v3: intel_context_create_request() helper v4: s/unsigned long/unsigned int/ 4 billion engines is quite enough. v5: Push iterator locking to caller Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190426163336.15906-7-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gt/intel_context.c | 112 ++++------------------ drivers/gpu/drm/i915/gt/intel_context.h | 27 +----- drivers/gpu/drm/i915/gt/intel_context_types.h | 2 - drivers/gpu/drm/i915/gt/intel_engine_cs.c | 2 +- drivers/gpu/drm/i915/gt/mock_engine.c | 3 +- drivers/gpu/drm/i915/gvt/scheduler.c | 2 +- drivers/gpu/drm/i915/i915_gem.c | 24 ++--- drivers/gpu/drm/i915/i915_gem_context.c | 96 ++++++++++++++++--- drivers/gpu/drm/i915/i915_gem_context.h | 58 +++++++++++ drivers/gpu/drm/i915/i915_gem_context_types.h | 40 +++++++- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 70 +++++++------- drivers/gpu/drm/i915/i915_perf.c | 80 +++++++++------- drivers/gpu/drm/i915/i915_request.c | 15 +-- drivers/gpu/drm/i915/intel_guc_submission.c | 22 +++-- drivers/gpu/drm/i915/selftests/i915_gem_context.c | 2 +- drivers/gpu/drm/i915/selftests/mock_context.c | 14 ++- 16 files changed, 328 insertions(+), 241 deletions(-) commit 11334c6aad9500a9d3b9b48dd0a4bb6406eb88fb Author: Chris Wilson Date: Fri Apr 26 17:33:33 2019 +0100 drm/i915: Split engine setup/init into two phases In the next patch, we require the engine vfuncs setup prior to initialising the pinned kernel contexts, so split the vfunc setup from the engine initialisation and call it earlier. v2: s/setup_xcs/setup_common/ for intel_ring_submission_setup() Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190426163336.15906-6-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gt/intel_engine.h | 8 +- drivers/gpu/drm/i915/gt/intel_engine_cs.c | 99 ++++++---- drivers/gpu/drm/i915/gt/intel_lrc.c | 74 ++------ drivers/gpu/drm/i915/gt/intel_lrc.h | 5 +- drivers/gpu/drm/i915/gt/intel_ringbuffer.c | 232 +++++++++++------------ drivers/gpu/drm/i915/gt/intel_workarounds.c | 3 +- drivers/gpu/drm/i915/gt/mock_engine.c | 48 +++-- drivers/gpu/drm/i915/gt/mock_engine.h | 2 + drivers/gpu/drm/i915/i915_gem.c | 6 + drivers/gpu/drm/i915/selftests/mock_gem_device.c | 12 +- 10 files changed, 245 insertions(+), 244 deletions(-) commit 6b736de5746a304692fc5f7f5fc46cd9c2e8bd29 Author: Chris Wilson Date: Fri Apr 26 17:33:32 2019 +0100 drm/i915: Pass intel_context to intel_context_pin_lock() Move the intel_context_instance() to the caller so that we can decouple ourselves from one context instance per engine. v2: Rename pin_lock() to lock_pinned(), hopefully that is clearer. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190426163336.15906-5-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gt/intel_context.c | 26 ------- drivers/gpu/drm/i915/gt/intel_context.h | 34 +++++++-- drivers/gpu/drm/i915/i915_gem_context.c | 92 +++++++++++++---------- drivers/gpu/drm/i915/selftests/i915_gem_context.c | 2 +- 4 files changed, 82 insertions(+), 72 deletions(-) commit 1b1ae40721ea2d90135b39b663b20c30339f94dc Author: Chris Wilson Date: Fri Apr 26 17:33:31 2019 +0100 drm/i915/selftests: Pass around intel_context for sseu Combine the (i915_gem_context, intel_engine) into a single parameter, the intel_context for convenience and later simplification. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190426163336.15906-4-chris@chris-wilson.co.uk drivers/gpu/drm/i915/selftests/i915_gem_context.c | 74 ++++++++++++++--------- 1 file changed, 44 insertions(+), 30 deletions(-) commit f7f28de7e5b2d89826a06c1cf9eea41904a5eda8 Author: Chris Wilson Date: Fri Apr 26 17:33:30 2019 +0100 drm/i915/selftests: Use the real kernel context for sseu isolation tests Simply the setup slightly for the sseu selftests to use the actual kernel_context. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190426163336.15906-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/selftests/i915_gem_context.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) commit fa9f668141f4e5590837845ffc1dc4f5aca7a0a5 Author: Chris Wilson Date: Fri Apr 26 17:33:29 2019 +0100 drm/i915: Export intel_context_instance() We want to pass in a intel_context into intel_context_pin() and that requires us to first be able to lookup the intel_context! Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190426163336.15906-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gt/intel_context.c | 37 +++++++++++++++--------------- drivers/gpu/drm/i915/gt/intel_context.h | 19 ++++++++++----- drivers/gpu/drm/i915/gt/intel_engine_cs.c | 8 ++++++- drivers/gpu/drm/i915/gt/mock_engine.c | 8 ++++++- drivers/gpu/drm/i915/gvt/scheduler.c | 7 +++++- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 11 ++++++--- drivers/gpu/drm/i915/i915_perf.c | 21 +++++++++++------ drivers/gpu/drm/i915/i915_request.c | 11 ++++++++- 8 files changed, 83 insertions(+), 39 deletions(-) commit 251d46b0875c7bb9ff4571a5248550a7427e0b50 Author: Chris Wilson Date: Fri Apr 26 17:33:28 2019 +0100 drm/i915/gvt: Pin the per-engine GVT shadow contexts Our eventual goal is to rid request construction of struct_mutex, with the short term step of lifting the struct_mutex requirements into the higher levels (i.e. the caller must ensure that the context is already pinned into the GTT). In this patch, we pin GVT's shadow context upon allocation and so keep them pinned into the GGTT for as long as the virtual machine is alive, and so we can use the simpler request construction path safe in the knowledge that the hard work is already done. Signed-off-by: Chris Wilson Cc: Zhenyu Wang Acked-by: Zhenyu Wang Link: https://patchwork.freedesktop.org/patch/msgid/20190426163336.15906-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gvt/gvt.h | 2 +- drivers/gpu/drm/i915/gvt/kvmgt.c | 2 +- drivers/gpu/drm/i915/gvt/mmio_context.c | 3 +- drivers/gpu/drm/i915/gvt/scheduler.c | 142 ++++++++++++++++---------------- 4 files changed, 73 insertions(+), 76 deletions(-) commit b226c3491b28a6d04f66b7413c8065bd4cdc0529 Merge: f61a8f36c482 7c13e5cc2391 Author: Jani Nikula Date: Fri Apr 26 18:22:43 2019 +0300 Merge drm/drm-next into drm-intel-next-queued Get gvt-fixes back to dinq. Signed-off-by: Jani Nikula commit f61a8f36c4826bdaf33e8c3d2771d13028fc5edf Author: Ville Syrjälä Date: Mon Apr 8 15:18:15 2019 +0300 drm/i915: Clean up cherryview_load_luts() I like my functions simple, so split up the low level bits from cherryview_load_luts() into separate functions. Also rename the whole thing to chv_load_luts() to match the new world order. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190408121815.30142-1-ville.syrjala@linux.intel.com Reviewed-by: Swati Sharma drivers/gpu/drm/i915/intel_color.c | 96 +++++++++++++++++++++++--------------- 1 file changed, 59 insertions(+), 37 deletions(-) commit d428ca17ea3d307c5a7f77cf24586584bf1c2d74 Author: Ville Syrjälä Date: Thu Apr 25 22:24:19 2019 +0300 drm/i915: Fix ICL output CSC programming When I refactored the code into its own function I accidentally misplaced the <<16 shifts for some of the registers causing us to lose the blue channel entirely. We should really find a way to test this... Cc: Uma Shankar Fixes: d2c19b06d6ea ("drm/i915: Clean up ilk/icl pipe/output CSC programming") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190425192419.24931-1-ville.syrjala@linux.intel.com Reviewed-by: Swati Sharma drivers/gpu/drm/i915/intel_color.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6e8b566806b7a8788dfde59b88ed79faa422fbaf Author: Kefeng Wang Date: Tue Apr 23 15:50:08 2019 +0800 iommu/omap: Use dev_get_drvdata() Using dev_get_drvdata directly. Cc: Joerg Roedel Cc: iommu@lists.linux-foundation.org Signed-off-by: Kefeng Wang Signed-off-by: Joerg Roedel drivers/iommu/omap-iommu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 9ce9bdb00dfc7e5cac58c9dc59fe7f2669c0af6b Author: Chris Wilson Date: Fri Apr 19 18:27:20 2019 +0100 drm/i915: Enable render context support for gen4 (Broadwater to Cantiga) Broadwater and the rest of gen4 do support being able to saving and reloading context specific registers between contexts, providing isolation of the basic GPU state (as programmable by userspace). This allows userspace to assume that the GPU retains their state from one batch to the next, minimising the amount of state it needs to reload and manually save across batches. v2: CONSTANT_BUFFER woes Running through piglit turned up an interesting issue, a GPU hang inside the context load. The context image includes the CONSTANT_BUFFER command that loads an address into a on-gpu buffer, and the context load was executing that immediately. However, since it was reading from the GTT there is no guarantee that the GTT retains the same configuration as when the context was saved, resulting in stray reads and a GPU hang. Having tried issuing a CONSTANT_BUFFER (to disable the command) from the ring before saving the context to no avail, we resort to patching out the instruction inside the context image before loading. This does impose that gen4 always reissues CONSTANT_BUFFER commands on each batch, but due to the use of a shared GTT that was and will remain a requirement. v3: ECOSKPD to the rescue Ville found the magic bit in the ECOSKPD to disable saving and restoring the CONSTANT_BUFFER from the context image, thereby completely avoiding the GPU hangs from chasing invalid pointers. This appears to be the default behaviour for gen5, and so we just need to tweak gen4 to match. v4: Fix spelling of ECOSKPD and discover it already exists Signed-off-by: Chris Wilson Cc: Ville Syrjälä Cc: Kenneth Graunke Reviewed-by: Kenneth Graunke Link: https://patchwork.freedesktop.org/patch/msgid/20190419172720.5462-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gt/intel_engine_cs.c | 2 +- drivers/gpu/drm/i915/gt/intel_ringbuffer.c | 14 ++++++++++++++ drivers/gpu/drm/i915/i915_reg.h | 1 + 3 files changed, 16 insertions(+), 1 deletion(-) commit 1215d28e722ce27172de7708ead6824fcfb19364 Author: Chris Wilson Date: Fri Apr 19 12:17:48 2019 +0100 drm/i915: Enable render context support for Ironlake (gen5) Ironlake does support being able to saving and reloading context specific registers between contexts, providing isolation of the basic GPU state (as programmable by userspace). This allows userspace to assume that the GPU retains their state from one batch to the next, minimising the amount of state it needs to reload, or manually save and restore. v2: Fix off-by-one in reading CXT_SIZE, and add a comment that the CXT_SIZE and context-layout do not match in bspec, but the difference is irrelevant as we overallocate the full page anyway (Ville). Signed-off-by: Chris Wilson Cc: Ville Syrjälä Cc: Kenneth Graunke Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190419111749.3910-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gt/intel_engine_cs.c | 16 ++++++++++++++++ drivers/gpu/drm/i915/gt/intel_ringbuffer.c | 13 +++++++++++++ 2 files changed, 29 insertions(+) commit 928f8f42310f244501a7c70daac82c196112c190 Author: Chris Wilson Date: Fri Apr 19 12:17:47 2019 +0100 drm/i915/ringbuffer: EMIT_INVALIDATE *before* switch context Despite what I think the prm recommends, commit f2253bd9859b ("drm/i915/ringbuffer: EMIT_INVALIDATE after switch context") turned out to be a huge mistake when enabling Ironlake contexts as the GPU would hang on either a MI_FLUSH or PIPE_CONTROL immediately following the MI_SET_CONTEXT of an active mesa context (more vanilla contexts, e.g. simple rendercopies with igt, do not suffer). Ville found the following clue, "[DevCTG+]: For the invalidate operation of the pipe control, the following pointers are affected. The invalidate operation affects the restore of these packets. If the pipe control invalidate operation is completed before the context save, the indirect pointers will not be restored from memory. 1. Pipeline State Pointer 2. Media State Pointer 3. Constant Buffer Packet" which suggests by us emitting the INVALIDATE prior to the MI_SET_CONTEXT, we prevent the context-restore from chasing the dangling pointers within the image, and explains why this likely prevents the GPU hang. Signed-off-by: Chris Wilson Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190419111749.3910-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gt/intel_ringbuffer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e0516e83640e13b7de43afc51733dfe3011be087 Author: Chris Wilson Date: Fri Apr 26 09:17:25 2019 +0100 drm/i915: Move sandybride pcode access to intel_sideband.c sandybride_pcode is another sideband, so move it to their new home. Signed-off-by: Chris Wilson Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190426081725.31217-8-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 10 -- drivers/gpu/drm/i915/intel_hdcp.c | 1 + drivers/gpu/drm/i915/intel_pm.c | 195 --------------------------------- drivers/gpu/drm/i915/intel_sideband.c | 196 ++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_sideband.h | 10 ++ 5 files changed, 207 insertions(+), 205 deletions(-) commit 063203c013c552f42e154ad7ad16a0bbdfcaf7d6 Author: Chris Wilson Date: Fri Apr 26 09:17:24 2019 +0100 drm/i915: Merge sandybridge_pcode_(read|write) These routines are identical except in the nature of the value parameter. For writes it is a pure in-param, but for a read, we need an out-param. Since they differ in a single line, merge the two routines into one. Signed-off-by: Chris Wilson Reviewed-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20190426081725.31217-7-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_pm.c | 115 ++++++++++++++-------------------------- 1 file changed, 40 insertions(+), 75 deletions(-) commit 7531942861c80aa26876762dc0775ddd727104f5 Author: Chris Wilson Date: Fri Apr 26 09:17:23 2019 +0100 drm/i915: Merge sbi read/write into a single accessor Since intel_sideband_read and intel_sideband_write differ by only a couple of lines (depending on whether we feed the value in or out), merge the two into a single common accessor. v2: Restore vlv_flisdsi_read() lost during rebasing. Signed-off-by: Chris Wilson Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190426081725.31217-6-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_sideband.c | 94 ++++++++++++++--------------------- 1 file changed, 38 insertions(+), 56 deletions(-) commit 56c5098ffcf8e655ac4e8f0634e44f1cea988590 Author: Chris Wilson Date: Fri Apr 26 09:17:22 2019 +0100 drm/i915: Separate sideband declarations to intel_sideband.h Split the sideback declarations out of the ginormous i915_drv.h Signed-off-by: Chris Wilson Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190426081725.31217-5-chris@chris-wilson.co.uk drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/i915_debugfs.c | 1 + drivers/gpu/drm/i915/i915_drv.h | 120 --------------------------- drivers/gpu/drm/i915/i915_sysfs.c | 2 + drivers/gpu/drm/i915/intel_cdclk.c | 1 + drivers/gpu/drm/i915/intel_display.c | 1 + drivers/gpu/drm/i915/intel_dp.c | 2 + drivers/gpu/drm/i915/intel_dpio_phy.c | 1 + drivers/gpu/drm/i915/intel_dsi_vbt.c | 13 ++- drivers/gpu/drm/i915/intel_hdmi.c | 1 + drivers/gpu/drm/i915/intel_pm.c | 1 + drivers/gpu/drm/i915/intel_runtime_pm.c | 1 + drivers/gpu/drm/i915/intel_sideband.c | 2 + drivers/gpu/drm/i915/intel_sideband.h | 130 ++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/vlv_dsi.c | 2 +- drivers/gpu/drm/i915/vlv_dsi_pll.c | 4 +- 16 files changed, 157 insertions(+), 126 deletions(-) commit ebb5eb7d731cc39e29661e0eb9dfe61242817663 Author: Chris Wilson Date: Fri Apr 26 09:17:21 2019 +0100 drm/i915: Replace pcu_lock with sb_lock We now have two locks for sideband access. The general one covering sideband access across all generation, sb_lock, and a specific one covering sideband access via the punit on vlv/chv. After lifting the sb_lock around the punit into the callers, the pcu_lock is now redudant and can be separated from its other use to regulate RPS (essentially giving RPS a lock all of its own). v2: Extract a couple of minor bug fixes. Signed-off-by: Chris Wilson Reviewed-by: Sagar Arun Kamble Link: https://patchwork.freedesktop.org/patch/msgid/20190426081725.31217-4-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 25 +------ drivers/gpu/drm/i915/i915_drv.h | 10 +-- drivers/gpu/drm/i915/i915_irq.c | 4 +- drivers/gpu/drm/i915/i915_sysfs.c | 32 +++----- drivers/gpu/drm/i915/intel_cdclk.c | 28 ------- drivers/gpu/drm/i915/intel_display.c | 6 -- drivers/gpu/drm/i915/intel_hdcp.c | 2 - drivers/gpu/drm/i915/intel_pm.c | 128 +++++++++++++++----------------- drivers/gpu/drm/i915/intel_runtime_pm.c | 10 --- drivers/gpu/drm/i915/intel_sideband.c | 4 - 10 files changed, 81 insertions(+), 168 deletions(-) commit 337fa6e04d40216e9f462b23b86d9e62f93c3d48 Author: Chris Wilson Date: Fri Apr 26 09:17:20 2019 +0100 drm/i915: Lift sideband locking for vlv_punit_(read|write) Lift the sideband acquisition for vlv_punit_read and vlv_punit_write into their callers, so that we can lock the sideband once for a sequence of operations, rather than perform the heavyweight acquisition on each request. Signed-off-by: Chris Wilson Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190426081725.31217-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 5 ++++ drivers/gpu/drm/i915/i915_sysfs.c | 14 +++++----- drivers/gpu/drm/i915/intel_cdclk.c | 23 +++++++++++++---- drivers/gpu/drm/i915/intel_display.c | 16 +++++++----- drivers/gpu/drm/i915/intel_pm.c | 46 +++++++++++++++++++++++++++------ drivers/gpu/drm/i915/intel_runtime_pm.c | 10 +++++++ drivers/gpu/drm/i915/intel_sideband.c | 18 ++----------- 7 files changed, 89 insertions(+), 43 deletions(-) commit 221c78623ea5a1b94e1d53443ccf78fae0bc5982 Author: Chris Wilson Date: Fri Apr 26 09:17:19 2019 +0100 drm/i915: Lift acquiring the vlv punit magic to a common sb-get As we now employ a very heavy pm_qos around the punit access, we want to minimise the number of synchronous requests by performing one for the whole punit sequence rather than around individual accesses. The sideband lock is used for this, so push the pm_qos into the sideband lock acquisition and release, moving it from the lowlevel punit rw routine to the callers. In the first step, we move the punit magic into the common sideband lock so that we can acquire a bunch of ports simultaneously, and if need be extend the workaround protection later. Signed-off-by: Chris Wilson Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190426081725.31217-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 124 ++++++++++++++++++++++++++++---- drivers/gpu/drm/i915/intel_cdclk.c | 6 +- drivers/gpu/drm/i915/intel_display.c | 37 +++++----- drivers/gpu/drm/i915/intel_dp.c | 4 +- drivers/gpu/drm/i915/intel_dpio_phy.c | 37 +++++----- drivers/gpu/drm/i915/intel_dsi_vbt.c | 8 +-- drivers/gpu/drm/i915/intel_hdmi.c | 4 +- drivers/gpu/drm/i915/intel_pm.c | 4 +- drivers/gpu/drm/i915/intel_runtime_pm.c | 8 +-- drivers/gpu/drm/i915/intel_sideband.c | 45 +++++++----- drivers/gpu/drm/i915/vlv_dsi.c | 8 +-- drivers/gpu/drm/i915/vlv_dsi_pll.c | 14 ++-- 12 files changed, 206 insertions(+), 93 deletions(-) commit a75d035fedbdecf83f86767aa2e4d05c8c4ffd95 Author: Chris Wilson Date: Fri Apr 26 09:17:18 2019 +0100 drm/i915: Disable preemption and sleeping while using the punit sideband While we talk to the punit over its sideband, we need to prevent the cpu from sleeping in order to prevent a potential machine hang. Note that by itself, it appears that pm_qos_update_request (via intel_idle) doesn't provide a sufficient barrier to ensure that all core are indeed awake (out of Cstate) and that the package is awake. To do so, we need to supplement the pm_qos with a manual ping on_each_cpu. v2: Restrict the heavy-weight wakeup to just the ISOF_PORT_PUNIT, there is insufficient evidence to implicate a wider problem atm. Similarly, restrict the w/a to Valleyview, as Cherryview doesn't have an angry cadre of users. The working theory, courtesy of Ville and Hans, is the issue lies within the power delivery and so is likely to be unit and board specific and occurs when both the unit/fw require extra power at the same time as the cpu package is changing its own power state. References: https://bugzilla.kernel.org/show_bug.cgi?id=109051 References: https://bugs.freedesktop.org/show_bug.cgi?id=102657 References: https://bugzilla.kernel.org/show_bug.cgi?id=195255 Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Hans de Goede Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190426081725.31217-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.c | 6 + drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/intel_sideband.c | 203 ++++++++++++++++++++++------------ 3 files changed, 139 insertions(+), 71 deletions(-) commit fc93dfd9345bb8b29a62b21cb0447dd1a3815f91 Author: Ingo Molnar Date: Thu Apr 25 10:10:12 2019 +0200 x86/paravirt: Match paravirt patchlet field definition ordering to initialization ordering Here's the objdump -D output of the PATCH_XXL data table: 0000000000000010 : 10: fa cli 11: fb sti 12: 57 push %rdi 13: 9d popfq 14: 9c pushfq 15: 58 pop %rax 16: 0f 20 d0 mov %cr2,%rax 19: 0f 20 d8 mov %cr3,%rax 1c: 0f 22 df mov %rdi,%cr3 1f: 0f 09 wbinvd 21: 0f 01 f8 swapgs 24: 48 0f 07 sysretq 27: 0f 01 f8 swapgs 2a: 48 89 f8 mov %rdi,%rax Note how this doesn't match up to the source code: static const struct patch_xxl patch_data_xxl = { .irq_irq_disable = { 0xfa }, // cli .irq_irq_enable = { 0xfb }, // sti .irq_save_fl = { 0x9c, 0x58 }, // pushf; pop %[re]ax .mmu_read_cr2 = { 0x0f, 0x20, 0xd0 }, // mov %cr2, %[re]ax .mmu_read_cr3 = { 0x0f, 0x20, 0xd8 }, // mov %cr3, %[re]ax .irq_restore_fl = { 0x57, 0x9d }, // push %rdi; popfq .mmu_write_cr3 = { 0x0f, 0x22, 0xdf }, // mov %rdi, %cr3 .cpu_wbinvd = { 0x0f, 0x09 }, // wbinvd .cpu_usergs_sysret64 = { 0x0f, 0x01, 0xf8, 0x48, 0x0f, 0x07 }, // swapgs; sysretq .cpu_swapgs = { 0x0f, 0x01, 0xf8 }, // swapgs .mov64 = { 0x48, 0x89, 0xf8 }, // mov %rdi, %rax .irq_restore_fl = { 0x50, 0x9d }, // push %eax; popf .mmu_write_cr3 = { 0x0f, 0x22, 0xd8 }, // mov %eax, %cr3 .cpu_iret = { 0xcf }, // iret }; Note how they are reordered: in the generated code .irq_restore_fl comes before .irq_save_fl, etc. This is because the field ordering in struct patch_xxl does not match the initialization ordering of patch_data_xxl. Match up the initialization order with the definition order - this makes the disassembly easily reviewable: 0000000000000010 : 10: fa cli 11: fb sti 12: 9c pushfq 13: 58 pop %rax 14: 0f 20 d0 mov %cr2,%rax 17: 0f 20 d8 mov %cr3,%rax 1a: 0f 22 df mov %rdi,%cr3 1d: 57 push %rdi 1e: 9d popfq 1f: 0f 09 wbinvd 21: 0f 01 f8 swapgs 24: 48 0f 07 sysretq 27: 0f 01 f8 swapgs 2a: 48 89 f8 mov %rdi,%rax Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20190425081012.GA115378@gmail.com Signed-off-by: Ingo Molnar arch/x86/kernel/paravirt_patch.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0b9d2fc1d0d628c94c6866a2ed3005c6730db512 Author: Thomas Gleixner Date: Wed Apr 24 15:41:18 2019 +0200 x86/paravirt: Replace the paravirt patch asm magic The magic macro DEF_NATIVE() in the paravirt patching code uses inline assembly to generate a data table for patching in the native instructions. While clever this is falling apart with LTO and even aside of LTO the construct is just working by chance according to GCC folks. Aside of that the tables are constant data and not some form of magic text. As these constructs are not subject to frequent changes it is not a maintenance issue to convert them to regular data tables which are initialized with hex bytes. Create a new set of macros and data structures to store the instruction sequences and convert the code over. Reported-by: Andi Kleen Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Link: http://lkml.kernel.org/r/20190424134223.690835713@linutronix.de Signed-off-by: Ingo Molnar arch/x86/include/asm/paravirt_types.h | 4 - arch/x86/kernel/paravirt_patch.c | 142 +++++++++++++++++++--------------- 2 files changed, 81 insertions(+), 65 deletions(-) commit fb2af0712fe8831dc152b0b5dd8bc516970da336 Author: Thomas Gleixner Date: Wed Apr 24 15:41:17 2019 +0200 x86/paravirt: Unify the 32/64 bit paravirt patching code Large parts of these two files are identical. Merge them together. Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Link: http://lkml.kernel.org/r/20190424134223.603491680@linutronix.de Signed-off-by: Ingo Molnar arch/x86/kernel/Makefile | 4 +- .../{paravirt_patch_64.c => paravirt_patch.c} | 62 ++++++++++++++++----- arch/x86/kernel/paravirt_patch_32.c | 64 ---------------------- 3 files changed, 50 insertions(+), 80 deletions(-) commit 11e86dc7f2746210f9c7dc10deaa7658f8dc8350 Author: Ingo Molnar Date: Thu Apr 25 11:50:39 2019 +0200 x86/paravirt: Detect over-sized patching bugs in paravirt_patch_call() paravirt_patch_call() currently handles patching failures inconsistently: we generate a warning in the retpoline case, but don't in other cases where we might end up with a non-working kernel as well. So just convert it all to a BUG_ON(), these patching calls are *not* supposed to fail, and if they do we want to know it immediately. This also makes the kernel smaller and removes an #ifdef ugly. I tried it with a richly paravirt-enabled kernel and no patching bugs were detected. Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20190425095039.GC115378@gmail.com Signed-off-by: Ingo Molnar arch/x86/kernel/paravirt.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 2777cae2b19d4a08ad233b3504c19c6f7a6a2ef3 Author: Ingo Molnar Date: Thu Apr 25 11:17:17 2019 +0200 x86/paravirt: Detect over-sized patching bugs in paravirt_patch_insns() So paravirt_patch_insns() contains this gem of logic: unsigned paravirt_patch_insns(void *insnbuf, unsigned len, const char *start, const char *end) { unsigned insn_len = end - start; if (insn_len > len || start == NULL) insn_len = len; else memcpy(insnbuf, start, insn_len); return insn_len; } Note how 'len' (size of the original instruction) is checked against the new instruction, and silently discarded with no warning printed whatsoever. This crashes the kernel in funny ways if the patching template is buggy, and usually in much later places. Instead do a direct BUG_ON(), there's no way to continue successfully at that point. I've tested this patch, with the vanilla kernel check never triggers, and if I intentionally increase the size of one of the patch templates to a too high value the assert triggers: [ 0.164385] kernel BUG at arch/x86/kernel/paravirt.c:167! Without this patch a broken kernel randomly crashes in later places, after the silent patching failure. Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20190425091717.GA72229@gmail.com Signed-off-by: Ingo Molnar arch/x86/kernel/paravirt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e05196401657cff3178dc392b739e520b26d4aef Author: Thomas Gleixner Date: Wed Apr 24 15:41:16 2019 +0200 x86/paravirt: Remove bogus extern declarations These functions are already declared in asm/paravirt.h Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Link: http://lkml.kernel.org/r/20190424134223.501598258@linutronix.de Signed-off-by: Ingo Molnar arch/x86/kernel/paravirt_patch_32.c | 3 --- arch/x86/kernel/paravirt_patch_64.c | 3 --- 2 files changed, 6 deletions(-) commit 7a34d9c4e00376a6d91b99af97a05a2095d6d962 Author: Maarten Lankhorst Date: Fri Mar 1 13:56:26 2019 +0100 drm/vkms: Convert to using __drm_atomic_helper_crtc_reset() for reset. Convert vkms to using __drm_atomic_helper_crtc_reset(), instead of writing its own version. Instead of open coding destroy_state(), call it directly for freeing the old state. Signed-off-by: Maarten Lankhorst Cc: Rodrigo Siqueira Cc: Haneen Mohammed Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190301125627.7285-17-maarten.lankhorst@linux.intel.com Reviewed-by: Rodrigo Siqueira drivers/gpu/drm/vkms/vkms_crtc.c | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) commit 1cff7440a86e04a613665803b42034c467f035fa Author: Maarten Lankhorst Date: Fri Mar 1 13:56:20 2019 +0100 drm/msm: Convert to using __drm_atomic_helper_crtc_reset() for reset. Convert msm to using __drm_atomic_helper_crtc_reset(), instead of writing its own version. Instead of open coding destroy_state(), call it directly for freeing the old state. Signed-off-by: Maarten Lankhorst Cc: Rob Clark Cc: Sean Paul [mlankhorst: Remove double assignment of mdp5_cstate in reset (seanpaul)] Reviewed-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190301125627.7285-11-maarten.lankhorst@linux.intel.com drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 6 ++---- drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c | 28 +++++++++++----------------- 2 files changed, 13 insertions(+), 21 deletions(-) commit b7e0b04ae450a0f2f73c376c3057fb05d798e33c Author: Maarten Lankhorst Date: Fri Mar 1 13:56:24 2019 +0100 drm/tegra: Convert to using __drm_atomic_helper_crtc_reset() for reset. Convert tegra to using __drm_atomic_helper_crtc_reset(), instead of writing its own version. Instead of open coding destroy_state(), call it directly for freeing the old state. Signed-off-by: Maarten Lankhorst Cc: Thierry Reding Cc: Jonathan Hunter Cc: linux-tegra@vger.kernel.org [mlankhorst: Keep tegra_crtc_reset at the same place and predeclare tegra_crtc_atomic_destroy_state (tagr)] Acked-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20190301125627.7285-15-maarten.lankhorst@linux.intel.com drivers/gpu/drm/tegra/dc.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit 01e2eaf40c9df44388fe4e982e9f9e498479f8a6 Author: Maarten Lankhorst Date: Fri Mar 1 13:56:23 2019 +0100 drm/rockchip: Convert to using __drm_atomic_helper_crtc_reset() for reset. Convert rockchip to using __drm_atomic_helper_crtc_reset(), instead of writing its own version. Instead of open coding destroy_state(), call it directly for freeing the old state. Signed-off-by: Maarten Lankhorst Cc: Sandy Huang Cc: "Heiko Stübner" Cc: linux-rockchip@lists.infradead.org Reviewed-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20190301125627.7285-14-maarten.lankhorst@linux.intel.com drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 9a6a19c0ff72fd763f5f45585bcbc0b608643e9a Author: Maarten Lankhorst Date: Fri Mar 1 13:56:15 2019 +0100 drm/mali: Convert to using __drm_atomic_helper_crtc_reset() for reset. Convert mali to using __drm_atomic_helper_crtc_reset(), instead of writing its own version. Instead of open coding malidp_crtc_destroy_state(), call it directly for freeing the old state. Signed-off-by: Maarten Lankhorst Cc: Liviu Dudau Cc: Brian Starkey Acked-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20190301125627.7285-6-maarten.lankhorst@linux.intel.com drivers/gpu/drm/arm/malidp_crtc.c | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) commit 842a07a7d044d7cc5d5a2f2bf9c1098acdfb93f3 Author: Maarten Lankhorst Date: Fri Mar 1 13:56:17 2019 +0100 drm/i915: Use the new __drm_atomic_helper_crtc_reset() helper. i915 has its own hw readout and doesn't use the reset helpers directly. Still it has 2 places where it initialises the crtc_state. Fix those by calling __drm_atomic_helper_crtc_reset(). Signed-off-by: Maarten Lankhorst Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Not-nacked-by: Joonas Lahtinen Acked-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190301125627.7285-8-maarten.lankhorst@linux.intel.com drivers/gpu/drm/i915/intel_display.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 1f2b4a7edbc3b89c27f661b81a699095d922467c Author: Chris Wilson Date: Thu Apr 25 06:43:33 2019 +0100 drm/i915: Allow multiple user handles to the same VM It was noted that we made the same mistake for VM_ID as for object handles, whereby we ensured that we only allocated a single handle for one ppgtt. This has the unfortunate consequence for userspace that they need to reference count the handles to avoid destroying an active ID. If we allow multiple handles to the same ppgtt, userspace can freely unreference any handle they own without fear of destroying the same handle in use elsewhere. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190425054333.27299-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_context.c | 26 ++++++++------------------ drivers/gpu/drm/i915/i915_gem_gtt.h | 2 -- 2 files changed, 8 insertions(+), 20 deletions(-) commit 8f2a1057d6ec217aefb8bf0de6996294452a2577 Author: Chris Wilson Date: Thu Apr 25 06:01:43 2019 +0100 drm/i915: Explicitly pin the logical context for execbuf In order to separate the reservation phase of building a request from its emission phase, we need to pull some of the request alloc activities from deep inside i915_request to the surface, GEM_EXECBUFFER. v2: Be frivolous, use a local drm_i915_private. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190425050143.811-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_execbuffer.c | 108 ++++++++++++++++++----------- drivers/gpu/drm/i915/i915_request.c | 9 --- 2 files changed, 69 insertions(+), 48 deletions(-) commit 79ffac8599c4d8aa84d313920d3d86d7361c252b Author: Chris Wilson Date: Wed Apr 24 21:07:17 2019 +0100 drm/i915: Invert the GEM wakeref hierarchy In the current scheme, on submitting a request we take a single global GEM wakeref, which trickles down to wake up all GT power domains. This is undesirable as we would like to be able to localise our power management to the available power domains and to remove the global GEM operations from the heart of the driver. (The intent there is to push global GEM decisions to the boundary as used by the GEM user interface.) Now during request construction, each request is responsible via its logical context to acquire a wakeref on each power domain it intends to utilize. Currently, each request takes a wakeref on the engine(s) and the engines themselves take a chipset wakeref. This gives us a transition on each engine which we can extend if we want to insert more powermangement control (such as soft rc6). The global GEM operations that currently require a struct_mutex are reduced to listening to pm events from the chipset GT wakeref. As we reduce the struct_mutex requirement, these listeners should evaporate. Perhaps the biggest immediate change is that this removes the struct_mutex requirement around GT power management, allowing us greater flexibility in request construction. Another important knock-on effect, is that by tracking engine usage, we can insert a switch back to the kernel context on that engine immediately, avoiding any extra delay or inserting global synchronisation barriers. This makes tracking when an engine and its associated contexts are idle much easier -- important for when we forgo our assumed execution ordering and need idle barriers to unpin used contexts. In the process, it means we remove a large chunk of code whose only purpose was to switch back to the kernel context. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Imre Deak Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190424200717.1686-5-chris@chris-wilson.co.uk drivers/gpu/drm/i915/Makefile | 2 + drivers/gpu/drm/i915/gt/intel_context.c | 18 +- drivers/gpu/drm/i915/gt/intel_engine.h | 9 +- drivers/gpu/drm/i915/gt/intel_engine_cs.c | 142 +----------- drivers/gpu/drm/i915/gt/intel_engine_pm.c | 147 ++++++++++++ drivers/gpu/drm/i915/gt/intel_engine_pm.h | 20 ++ drivers/gpu/drm/i915/gt/intel_engine_types.h | 7 +- drivers/gpu/drm/i915/gt/intel_gt_pm.c | 143 ++++++++++++ drivers/gpu/drm/i915/gt/intel_gt_pm.h | 27 +++ drivers/gpu/drm/i915/gt/intel_hangcheck.c | 7 + drivers/gpu/drm/i915/gt/intel_lrc.c | 6 +- drivers/gpu/drm/i915/gt/intel_reset.c | 101 +-------- drivers/gpu/drm/i915/gt/intel_reset.h | 1 - drivers/gpu/drm/i915/gt/intel_ringbuffer.c | 13 +- drivers/gpu/drm/i915/gt/mock_engine.c | 3 + drivers/gpu/drm/i915/gt/selftest_hangcheck.c | 49 +--- drivers/gpu/drm/i915/gt/selftest_workarounds.c | 5 +- drivers/gpu/drm/i915/i915_debugfs.c | 16 +- drivers/gpu/drm/i915/i915_drv.c | 5 +- drivers/gpu/drm/i915/i915_drv.h | 8 +- drivers/gpu/drm/i915/i915_gem.c | 41 ++-- drivers/gpu/drm/i915/i915_gem.h | 3 - drivers/gpu/drm/i915/i915_gem_context.c | 85 +------ drivers/gpu/drm/i915/i915_gem_context.h | 4 - drivers/gpu/drm/i915/i915_gem_evict.c | 47 +--- drivers/gpu/drm/i915/i915_gem_pm.c | 264 +++++++--------------- drivers/gpu/drm/i915/i915_gem_pm.h | 3 - drivers/gpu/drm/i915/i915_gpu_error.h | 4 - drivers/gpu/drm/i915/i915_request.c | 10 +- drivers/gpu/drm/i915/i915_request.h | 2 +- drivers/gpu/drm/i915/intel_uc.c | 22 +- drivers/gpu/drm/i915/intel_uc.h | 2 +- drivers/gpu/drm/i915/selftests/i915_gem.c | 16 +- drivers/gpu/drm/i915/selftests/i915_gem_context.c | 114 +--------- drivers/gpu/drm/i915/selftests/i915_gem_object.c | 29 ++- drivers/gpu/drm/i915/selftests/igt_flush_test.c | 32 +-- drivers/gpu/drm/i915/selftests/mock_gem_device.c | 15 +- 37 files changed, 592 insertions(+), 830 deletions(-) commit 2ccdf6a1c3f7ff51d721ee7a5bed96e03da77205 Author: Chris Wilson Date: Wed Apr 24 21:07:16 2019 +0100 drm/i915: Pass intel_context to i915_request_create() Start acquiring the logical intel_context and using that as our primary means for request allocation. This is the initial step to allow us to avoid requiring struct_mutex for request allocation along the perma-pinned kernel context, but it also provides a foundation for breaking up the complex request allocation to handle different scenarios inside execbuf. For the purpose of emitting a request from inside retirement (see the next patch for engine power management), we also need to lift control over the timeline mutex to the caller. v2: Note that the request carries the active reference upon construction. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190424200717.1686-4-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gt/intel_context.h | 12 + drivers/gpu/drm/i915/gt/intel_reset.c | 2 +- drivers/gpu/drm/i915/gt/intel_ringbuffer.c | 3 - drivers/gpu/drm/i915/gt/intel_workarounds.c | 2 +- drivers/gpu/drm/i915/i915_gem_context.c | 4 +- drivers/gpu/drm/i915/i915_perf.c | 2 +- drivers/gpu/drm/i915/i915_request.c | 247 ++++++++++++--------- drivers/gpu/drm/i915/i915_request.h | 7 + drivers/gpu/drm/i915/intel_overlay.c | 5 +- drivers/gpu/drm/i915/selftests/i915_active.c | 2 +- .../gpu/drm/i915/selftests/i915_gem_coherency.c | 2 +- drivers/gpu/drm/i915/selftests/i915_gem_object.c | 2 +- drivers/gpu/drm/i915/selftests/i915_request.c | 9 +- drivers/gpu/drm/i915/selftests/i915_timeline.c | 4 +- 14 files changed, 177 insertions(+), 126 deletions(-) commit 6eee33e87f6d1f6263162ce0874c1ef503eff041 Author: Chris Wilson Date: Wed Apr 24 21:07:15 2019 +0100 drm/i915: Introduce context->enter() and context->exit() We wish to start segregating the power management into different control domains, both with respect to the hardware and the user interface. The first step is that at the lowest level flow of requests, we want to process a context event (and not a global GEM operation). In this patch, we introduce the context callbacks that in future patches will be redirected to per-engine interfaces leading to global operations as required. The intent is that this will be guarded by the timeline->mutex, except that retiring has not quite finished transitioning over from being guarded by struct_mutex. So at the moment it is protected by struct_mutex with a reminded to switch. v2: Rename default handlers to intel_context_enter_engine. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190424200717.1686-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gt/intel_context.c | 17 +++++++++++++++++ drivers/gpu/drm/i915/gt/intel_context.h | 21 +++++++++++++++++++++ drivers/gpu/drm/i915/gt/intel_context_types.h | 5 +++++ drivers/gpu/drm/i915/gt/intel_lrc.c | 3 +++ drivers/gpu/drm/i915/gt/intel_ringbuffer.c | 3 +++ drivers/gpu/drm/i915/gt/mock_engine.c | 3 +++ drivers/gpu/drm/i915/i915_request.c | 22 ++++------------------ 7 files changed, 56 insertions(+), 18 deletions(-) commit 23c3c3d04fa7fcc60c91f1368cc5652a6774626b Author: Chris Wilson Date: Wed Apr 24 21:07:14 2019 +0100 drm/i915: Pull the GEM powermangement coupling into its own file Split out the powermanagement portion (GT wakeref, suspend/resume) of GEM from i915_gem.c into its own file. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190424200717.1686-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/i915_debugfs.c | 4 +- drivers/gpu/drm/i915/i915_drv.h | 12 +- drivers/gpu/drm/i915/i915_gem.c | 363 +-------------------- drivers/gpu/drm/i915/i915_gem_pm.c | 365 ++++++++++++++++++++++ drivers/gpu/drm/i915/i915_gem_pm.h | 28 ++ drivers/gpu/drm/i915/selftests/i915_gem_context.c | 2 +- drivers/gpu/drm/i915/selftests/i915_gem_object.c | 8 +- drivers/gpu/drm/i915/selftests/mock_gem_device.c | 10 +- 10 files changed, 418 insertions(+), 376 deletions(-) commit d91e657876a96af4f00cc374e26a7a9e8c40d6de Author: Chris Wilson Date: Wed Apr 24 21:07:13 2019 +0100 drm/i915: Introduce struct intel_wakeref For controlling runtime pm of the GT and engines, we would like to have a callback to do extra work the first time we wake up and the last time we drop the wakeref. This first/last access needs serialisation and so we encompass a mutex with the regular intel_wakeref_t tracker. v2: Drop the _once naming and report the errors. Signed-off-by: Chris Wilson Cc; Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190424200717.1686-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/Makefile.header-test | 3 +- drivers/gpu/drm/i915/i915_drv.h | 3 +- drivers/gpu/drm/i915/intel_wakeref.c | 61 ++++++++++++++ drivers/gpu/drm/i915/intel_wakeref.h | 133 ++++++++++++++++++++++++++++++ 5 files changed, 198 insertions(+), 3 deletions(-) commit 112ed2d31a46f4704085ad925435b77e62b8abee Author: Chris Wilson Date: Wed Apr 24 18:48:39 2019 +0100 drm/i915: Move GraphicsTechnology files under gt/ Start partitioning off the code that talks to the hardware (GT) from the uapi layers and move the device facing code under gt/ One casualty is s/intel_ringbuffer.h/intel_engine.h/ with the plan to subdivide that header and body further (and split out the submission code from the ringbuffer and logical context handling). This patch aims to be simple motion so git can fixup inflight patches with little mess. Signed-off-by: Chris Wilson Acked-by: Joonas Lahtinen Acked-by: Jani Nikula Acked-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20190424174839.7141-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/Makefile | 46 ++++++++++++++-------- drivers/gpu/drm/i915/Makefile.header-test | 6 +-- drivers/gpu/drm/i915/gt/Makefile | 2 + drivers/gpu/drm/i915/gt/Makefile.header-test | 16 ++++++++ drivers/gpu/drm/i915/{ => gt}/intel_breadcrumbs.c | 0 drivers/gpu/drm/i915/{ => gt}/intel_context.c | 3 +- drivers/gpu/drm/i915/{ => gt}/intel_context.h | 0 .../gpu/drm/i915/{ => gt}/intel_context_types.h | 0 .../i915/{intel_ringbuffer.h => gt/intel_engine.h} | 0 drivers/gpu/drm/i915/{ => gt}/intel_engine_cs.c | 8 ++-- drivers/gpu/drm/i915/{ => gt}/intel_engine_types.h | 5 +-- drivers/gpu/drm/i915/{ => gt}/intel_gpu_commands.h | 0 drivers/gpu/drm/i915/{ => gt}/intel_hangcheck.c | 4 +- drivers/gpu/drm/i915/{ => gt}/intel_lrc.c | 5 +-- drivers/gpu/drm/i915/{ => gt}/intel_lrc.h | 4 +- drivers/gpu/drm/i915/{ => gt}/intel_lrc_reg.h | 0 drivers/gpu/drm/i915/{ => gt}/intel_mocs.c | 4 +- drivers/gpu/drm/i915/{ => gt}/intel_mocs.h | 4 +- .../drm/i915/{i915_reset.c => gt/intel_reset.c} | 2 +- .../drm/i915/{i915_reset.h => gt/intel_reset.h} | 2 +- drivers/gpu/drm/i915/{ => gt}/intel_ringbuffer.c | 3 +- drivers/gpu/drm/i915/{ => gt}/intel_sseu.c | 0 drivers/gpu/drm/i915/{ => gt}/intel_sseu.h | 0 drivers/gpu/drm/i915/{ => gt}/intel_workarounds.c | 2 +- drivers/gpu/drm/i915/{ => gt}/intel_workarounds.h | 8 +++- .../drm/i915/{ => gt}/intel_workarounds_types.h | 0 .../gpu/drm/i915/{selftests => gt}/mock_engine.c | 10 +++-- .../gpu/drm/i915/{selftests => gt}/mock_engine.h | 2 +- .../intel_engine_cs.c => gt/selftest_engine_cs.c} | 0 .../intel_hangcheck.c => gt/selftest_hangcheck.c} | 16 ++++---- .../{selftests/intel_lrc.c => gt/selftest_lrc.c} | 16 ++++---- .../selftest_workarounds.c} | 18 ++++----- drivers/gpu/drm/i915/i915_cmd_parser.c | 3 +- drivers/gpu/drm/i915/i915_debugfs.c | 3 +- drivers/gpu/drm/i915/i915_drv.c | 5 ++- drivers/gpu/drm/i915/i915_drv.h | 7 ++-- drivers/gpu/drm/i915/i915_gem.c | 7 ++-- drivers/gpu/drm/i915/i915_gem_context.c | 7 +++- drivers/gpu/drm/i915/i915_gem_context.h | 3 +- drivers/gpu/drm/i915/i915_gem_context_types.h | 3 +- drivers/gpu/drm/i915/i915_gem_gtt.c | 1 - drivers/gpu/drm/i915/i915_gem_gtt.h | 2 +- drivers/gpu/drm/i915/i915_gpu_error.h | 3 +- drivers/gpu/drm/i915/i915_perf.c | 3 +- drivers/gpu/drm/i915/i915_pmu.c | 4 +- drivers/gpu/drm/i915/i915_request.c | 1 - drivers/gpu/drm/i915/i915_scheduler_types.h | 2 +- drivers/gpu/drm/i915/i915_trace.h | 3 +- drivers/gpu/drm/i915/i915_vma.c | 3 +- drivers/gpu/drm/i915/intel_device_info.h | 6 ++- drivers/gpu/drm/i915/intel_display.c | 1 - drivers/gpu/drm/i915/intel_guc_submission.c | 3 +- drivers/gpu/drm/i915/intel_guc_submission.h | 3 +- drivers/gpu/drm/i915/intel_uc.c | 2 +- drivers/gpu/drm/i915/selftests/i915_gem_context.c | 5 ++- drivers/gpu/drm/i915/selftests/igt_reset.c | 3 +- drivers/gpu/drm/i915/selftests/igt_spinner.h | 3 +- drivers/gpu/drm/i915/selftests/mock_gem_device.c | 3 +- drivers/gpu/drm/i915/selftests/mock_request.c | 3 +- 59 files changed, 166 insertions(+), 112 deletions(-) commit 86554f48e511faa58f729cc077b1733179882804 Author: Chris Wilson Date: Wed Apr 24 12:09:41 2019 +0100 drm/i915/selftests: Verify whitelist of context registers The RING_NONPRIV allows us to add registers to a whitelist that allows userspace to modify them. Ideally such registers should be safe and saved within the context such that they do not impact system behaviour for other users. This selftest verifies that those registers we do add are (a) then writable by userspace and (b) only affect a single client. Opens: - Is GEN9_SLICE_COMMON_ECO_CHICKEN1 really write-only? v2: Remove the blatant copy-paste. v3: Emulate userspace register writes via the batch again. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190424110941.9869-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/selftests/intel_workarounds.c | 312 +++++++++++++++++++++ 1 file changed, 312 insertions(+) commit 09407579abf55a8f472c221325dda81cca324326 Author: Chris Wilson Date: Wed Apr 24 10:51:34 2019 +0100 drm/i915: Store the default sseu setup on the engine As we push for better compartmentalisation, it is more convenient to copy the default sseu configuration from the engine into the derived logical context, than it is to dig it out from i915->runtime_info. v2: Use intel_sseu_from_device_info() to describe the converter Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190424095134.30249-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/i915_drv.h | 14 --- drivers/gpu/drm/i915/i915_gem_context.c | 2 +- drivers/gpu/drm/i915/i915_perf.c | 2 +- drivers/gpu/drm/i915/intel_context.c | 4 +- drivers/gpu/drm/i915/intel_context_types.h | 11 +- drivers/gpu/drm/i915/intel_device_info.h | 28 +---- drivers/gpu/drm/i915/intel_engine_cs.c | 4 + drivers/gpu/drm/i915/intel_engine_types.h | 3 + drivers/gpu/drm/i915/intel_lrc.c | 134 +------------------- drivers/gpu/drm/i915/intel_lrc.h | 2 - drivers/gpu/drm/i915/intel_sseu.c | 142 ++++++++++++++++++++++ drivers/gpu/drm/i915/intel_sseu.h | 67 ++++++++++ drivers/gpu/drm/i915/selftests/i915_gem_context.c | 5 +- 15 files changed, 226 insertions(+), 194 deletions(-) commit e3a9d6c53195591303b7f165f3bb0226741f911e Author: Andrew F. Davis Date: Fri Mar 29 11:52:01 2019 -0500 dma-buf: Make mmap callback actually optional The docs state the callback is optional but it is not, make it optional. Signed-off-by: Andrew F. Davis Reviewed-by: Daniel Vetter Reviewed-by: Christian König Signed-off-by: Sumit Semwal Link: https://patchwork.freedesktop.org/patch/msgid/20190329165201.16233-1-afd@ti.com drivers/dma-buf/dma-buf.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit d5ae7712b7ffbb435e8f3d98f2123eff4734c77f Author: Andrew F. Davis Date: Thu Mar 21 15:09:57 2019 -0500 dma-buf: Update [un]map documentation to match the other functions Other function have inline documentation, a couple still have theirs at the top of the structure, update the docs and move them inline. Signed-off-by: Andrew F. Davis Signed-off-by: Sumit Semwal Link: https://patchwork.freedesktop.org/patch/msgid/20190321200957.16938-2-afd@ti.com include/linux/dma-buf.h | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) commit 67b886d290052dbf2bcfc876a5ae41a5fe461edf Author: Andrew F. Davis Date: Thu Mar 21 15:09:56 2019 -0500 dma-buf: Remove leftover [un]map_atomic comments The map_atomic/unmap_atomic callbacks have been removed, remove the related comments. Fixes: f664a5269542 ("dma-buf: remove kmap_atomic interface") Signed-off-by: Andrew F. Davis Signed-off-by: Sumit Semwal Link: https://patchwork.freedesktop.org/patch/msgid/20190321200957.16938-1-afd@ti.com include/linux/dma-buf.h | 5 ----- 1 file changed, 5 deletions(-) commit 5e383a9798990c69fc759a4930de224bb497e62c Author: Jérôme Glisse Date: Thu Dec 6 11:18:40 2018 -0500 dma-buf: balance refcount inbalance The debugfs take reference on fence without dropping them. Signed-off-by: Jérôme Glisse Cc: Christian König Cc: Daniel Vetter Cc: Sumit Semwal Cc: linux-media@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: linaro-mm-sig@lists.linaro.org Cc: Stéphane Marchesin Cc: stable@vger.kernel.org Reviewed-by: Christian König Signed-off-by: Sumit Semwal Link: https://patchwork.freedesktop.org/patch/msgid/20181206161840.6578-1-jglisse@redhat.com drivers/dma-buf/dma-buf.c | 1 + 1 file changed, 1 insertion(+) commit e7c03dbaaaf8274e46519c100d691d0153209613 Author: Yannick Fertré Date: Wed Apr 3 11:25:14 2019 +0200 drm/stm: ltdc: add modifier support Add support of DRM_FORMAT_MOD_LINEAR modifier. Signed-off-by: Mickael Reulier Signed-off-by: Yannick Fertré Acked-by: Philippe Cornu Link: https://patchwork.freedesktop.org/patch/msgid/1554283514-2960-1-git-send-email-yannick.fertre@st.com Signed-off-by: Benjamin Gaignard drivers/gpu/drm/stm/ltdc.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) commit f42f540b9d0c16ffc0dd15a2d5c5f837bb7441c2 Author: Yannick Fertré Date: Wed Apr 3 11:24:13 2019 +0200 drm/stm: ltdc: reset controller to avoid partial refresh Display controller reset must be done as soon as possible after enable the clock to avoid partial refresh on screen. Signed-off-by: Yannick Fertré Acked-by: Philippe Cornu Signed-off-by: Benjamin Gaignard Link: https://patchwork.freedesktop.org/patch/msgid/1554283453-2879-1-git-send-email-yannick.fertre@st.com drivers/gpu/drm/stm/ltdc.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 77756ad6d08fb3f276d357be4c318f871dab8734 Author: Yannick Fertré Date: Wed Apr 3 11:20:16 2019 +0200 drm/stm: ltdc: limit number of layer to avoid memory overflow If the number of layer is greater than LTDC_MAX_LAYER, we can have memory overflow when reading plane_fpsi[]. Signed-off-by: Yannick Fertré Acked-by: Philippe Cornu Signed-off-by: Benjamin Gaignard Link: https://patchwork.freedesktop.org/patch/msgid/1554283216-2700-1-git-send-email-yannick.fertre@st.com drivers/gpu/drm/stm/ltdc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 8ceb8568d6e8d53dc000a9eeacd47c8f298c38f0 Author: Yannick Fertré Date: Mon Apr 1 09:24:17 2019 +0200 drm/stm: ltdc: update planes at next vblank to avoid partial refresh Plane updates must be synchronized on vblank with the shadow register mechanism to avoid partial refresh on screen. Signed-off-by: Yannick Fertré Acked-by: Philippe Cornu Signed-off-by: Benjamin Gaignard Link: https://patchwork.freedesktop.org/patch/msgid/1554103457-29595-1-git-send-email-yannick.fertre@st.com drivers/gpu/drm/stm/ltdc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c64d1cb6b1c0e89e45ce686a63113d0f28ba94c5 Author: Yannick Fertré Date: Fri Mar 29 16:50:20 2019 +0100 drm/stm: ltdc: fix data enable polarity Wrong DISPLAY_FLAGS used to set the data enable polarity. Signed-off-by: Yannick Fertré Acked-by: Philippe Cornu Signed-off-by: Benjamin Gaignard Link: https://patchwork.freedesktop.org/patch/msgid/1553874620-31468-1-git-send-email-yannick.fertre@st.com drivers/gpu/drm/stm/ltdc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0cabb0859f5fb341dd386492d181b5f04e2f169d Author: Philippe Cornu Date: Fri Mar 29 16:49:08 2019 +0100 drm/stm: ltdc: use DRM_WARN for fifo & transfer error messages Use DRM_WARN() instead of DRM_DEBUG_DRIVER() to better inform the user in case of fifo underruns or transfer errors. Signed-off-by: Philippe Cornu Acked-by: Philippe Cornu Signed-off-by: Benjamin Gaignard Link: https://patchwork.freedesktop.org/patch/msgid/1553874548-31366-1-git-send-email-yannick.fertre@st.com drivers/gpu/drm/stm/ltdc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 798e5b2a4f1dad93b193fb16bfd7e78eed22f22b Author: Yannick Fertré Date: Fri Mar 29 16:48:05 2019 +0100 drm/stm: ltdc: disable hw interrupts before its handler init Interrupt register must be disabled before call of devm_request_threaded_irq function to avoid dummy interruption. Signed-off-by: Yannick Fertré Acked-by: Philippe Cornu Signed-off-by: Benjamin Gaignard Link: https://patchwork.freedesktop.org/patch/msgid/1553874485-31259-1-git-send-email-yannick.fertre@st.com drivers/gpu/drm/stm/ltdc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 12d7a93c8689c818a8d96733a0e1c2cfa42e60af Author: Maarten Lankhorst Date: Fri Mar 1 13:56:13 2019 +0100 drm/docs: Fix typo in __drm_atomic_helper_connector_reset Signed-off-by: Maarten Lankhorst Reviewed-by: Daniel Stone Link: https://patchwork.freedesktop.org/patch/msgid/20190301125627.7285-4-maarten.lankhorst@linux.intel.com drivers/gpu/drm/drm_atomic_state_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7d26097b4beb802fb6ce7cd6389ac4bf12b1a6ae Author: Maarten Lankhorst Date: Fri Mar 1 13:56:12 2019 +0100 drm/atomic: Create __drm_atomic_helper_crtc_reset() for subclassing crtc_state. We already have __drm_atomic_helper_connector_reset() and __drm_atomic_helper_plane_reset(), extend this to crtc as well. This will allow us to set default values in the crtc_state, without having to do it in each driver separately. Of all drivers that need conversion, only nouveau is done in this commit, because it wrote its own __drm_atomic_helper_crtc_reset(), clashing with the drm core. Signed-off-by: Maarten Lankhorst Cc: Ben Skeggs Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190301125627.7285-3-maarten.lankhorst@linux.intel.com drivers/gpu/drm/drm_atomic_state_helper.c | 34 +++++++++++++++++++++++++------ drivers/gpu/drm/nouveau/dispnv50/head.c | 13 +++--------- include/drm/drm_atomic_state_helper.h | 2 ++ 3 files changed, 33 insertions(+), 16 deletions(-) commit 51eb1a1de7a92a812a3834986260834d5f52e566 Author: Radhakrishna Sripada Date: Wed Apr 17 11:59:01 2019 -0700 drm/i915/icl: Fix clockgating issue when using scalers Fixes the clock-gating issue when pipe scaling is enabled. (Lineage #2006604312) V2: Fix typo in headline(Chris) Handle the non double buffered nature of the register(Ville) V3: Fix checkpatch warning. BAT failure for V2 on gen3 looks unrelated. V4: Split the icl and skl wa's(Ville) V5: Split the checks for icl and skl(Ville) V6: Correct the flipped checks in intel_pre_plane_update(Ville) V7: Use enum for pipe and extend the WA for plane scalers(Ville) V8: Eliminate the redundant use of pch_pfit(Ville) Cc: Chris Wilson Cc: Ville Syrjala Cc: Rodrigo Vivi Cc: Clint Taylor Cc: Aditya Swarup Signed-off-by: Radhakrishna Sripada Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190417185901.14833-1-radhakrishna.sripada@intel.com drivers/gpu/drm/i915/intel_display.c | 40 +++++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 5 deletions(-) commit 372b9ffb5799a3d5f4a9c51ac35cf65ed8f40101 Author: Ville Syrjälä Date: Thu Apr 18 22:59:07 2019 +0300 drm/i915: Fix skl+ max plane width The spec has changed since skl_max_plane_width() was written. Now the SKL limits are lower than what they were initially, and GLK and ICL have different limits. Update the code to match the spec. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190418195907.23912-1-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza drivers/gpu/drm/i915/intel_display.c | 72 +++++++++++++++++++++++------------- 1 file changed, 47 insertions(+), 25 deletions(-) commit f91b63b0e3b22f3688fd6b352128c3e0e40d02b4 Author: Erik Stromdahl Date: Fri Apr 19 10:29:06 2019 +0300 ath10k: sdio: add missing error check Although not likely, the bundle allocation might fail. Add proper error check and warning print. Signed-off-by: Erik Stromdahl Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/sdio.c | 5 +++++ 1 file changed, 5 insertions(+) commit fbd428a5b828bf3fd3627e1526dd470f64f90d2c Author: Alagu Sankar Date: Fri Apr 19 10:28:59 2019 +0300 ath10k: add initialization of HTC header HTC header carries junk values that may be interpreted by the firmware differently. Enable credit update only if flow control is enabled for the corresponding endpoint. Signed-off-by: Alagu Sankar Signed-off-by: Erik Stromdahl Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/htc.c | 1 + 1 file changed, 1 insertion(+) commit 30382dd1cf3a141bfaa568ee183c1892090fa79a Author: Kalle Valo Date: Fri Apr 19 10:28:56 2019 +0300 ath10k: fix use-after-free on SDIO data frames With SDIO there's a use after free after a data frame is transfered, call stack below. This happens because ath10k_htt_tx_hl() directly transmits the skb provided by mac80211 using ath10k_htc_send(), all other HTT functions use separate skb created with ath10k_htc_alloc_skb() to transmit the HTC packet. After the packet is transmitted mac80211 frees the skb in ieee80211_tx_status() but HTT layer expects that it still owns the skb, and frees it in ath10k_htt_htc_tx_complete(). To fix this take a reference of skb before sending it to HTC layer to make sure we still own the skb. Tested on QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00007-QCARMSWP-1. ath10k_htt_tx_hl() is only used by SDIO and USB so other busses (PCI, AHB and SNOC) should be unaffected. call stack of use-after-free: dump_backtrace+0x0/0x2d8 show_stack+0x20/0x2c __dump_stack+0x20/0x28 dump_stack+0xc8/0xec print_address_description+0x74/0x240 kasan_report+0x258/0x274 __asan_report_load4_noabort+0x20/0x28 skb_pull+0xbc/0x114 ath10k_htc_notify_tx_completion+0x190/0x2a4 [ath10k_core] ath10k_sdio_write_async_work+0x1e4/0x2c4 [ath10k_sdio] process_one_work+0x3d8/0x8b0 worker_thread+0x518/0x7e0 kthread+0x260/0x278 ret_from_fork+0x10/0x18 Allocated by one task: kasan_kmalloc+0xa0/0x13c kasan_slab_alloc+0x14/0x1c kmem_cache_alloc+0x144/0x208 __alloc_skb+0xec/0x394 alloc_skb_with_frags+0x8c/0x374 sock_alloc_send_pskb+0x520/0x5d4 sock_alloc_send_skb+0x40/0x50 __ip_append_data+0xf5c/0x1858 ip_make_skb+0x194/0x1d4 udp_sendmsg+0xf24/0x1ab8 inet_sendmsg+0x1b0/0x2e0 sock_sendmsg+0x88/0xa0 __sys_sendto+0x220/0x3a8 __arm64_sys_sendto+0x78/0x80 el0_svc_common+0x120/0x1e0 el0_svc_compat_handler+0x64/0x80 el0_svc_compat+0x8/0x18 Freed by another task: __kasan_slab_free+0x120/0x1d4 kasan_slab_free+0x10/0x1c kmem_cache_free+0x74/0x504 kfree_skbmem+0x88/0xc8 __kfree_skb+0x24/0x2c consume_skb+0x114/0x18c __ieee80211_tx_status+0xb7c/0xf60 [mac80211] ieee80211_tx_status+0x224/0x270 [mac80211] ath10k_txrx_tx_unref+0x564/0x950 [ath10k_core] ath10k_htt_t2h_msg_handler+0x178c/0x2a38 [ath10k_core] ath10k_htt_htc_t2h_msg_handler+0x20/0x30 [ath10k_core] ath10k_sdio_irq_handler+0xcc0/0x1654 [ath10k_sdio] process_sdio_pending_irqs+0xec/0x358 sdio_run_irqs+0x68/0xe4 sdio_irq_work+0x1c/0x28 process_one_work+0x3d8/0x8b0 worker_thread+0x518/0x7e0 kthread+0x260/0x278 ret_from_fork+0x10/0x18 Reported-by: Wen Gong Tested-by: Wen Gong Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/htt_tx.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 8ea51e409eb04fb520c96e098b6c289fc97a2cf4 Author: Alagu Sankar Date: Fri Apr 19 10:28:54 2019 +0300 ath10k: htt: support MSDU ids with SDIO Transmit completion for SDIO is similar to PCIe, modify the high latency path to allow SDIO modules to use the msdu id. kvalo: the original patch from Alagu enabled this only for SDIO but I'm not sure should we also enable this with USB. I'll use bus params to enable this for so that it's easy to enable also for USB later. Tested with QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00007-QCARMSWP-1. Co-developed-by: Wen Gong Signed-off-by: Alagu Sankar Signed-off-by: Wen Gong . Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.h | 1 + drivers/net/wireless/ath/ath10k/htt_tx.c | 13 ++++++++++++- drivers/net/wireless/ath/ath10k/sdio.c | 2 ++ 3 files changed, 15 insertions(+), 1 deletion(-) commit 6d084ac27ab4b2cc814b142459393e73c3cb47b9 Author: Kalle Valo Date: Fri Apr 19 10:28:52 2019 +0300 ath10k: initialise struct ath10k_bus params to zero This way we don't need to set every variable and give them to default, which is zero. This is also safer in case we forgot to initalise a new field in some of the bus modules. Compile tested only. Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/ahb.c | 2 +- drivers/net/wireless/ath/ath10k/pci.c | 2 +- drivers/net/wireless/ath/ath10k/sdio.c | 2 +- drivers/net/wireless/ath/ath10k/snoc.c | 2 +- drivers/net/wireless/ath/ath10k/usb.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit e2a6b711282a371c5153239e0468a48254f17ca6 Author: Alagu Sankar Date: Fri Apr 19 10:28:49 2019 +0300 ath10k: htt: don't use txdone_fifo with SDIO HTT High Latency (ATH10K_DEV_TYPE_HL) does not use txdone_fifo at all, we don't even initialise it by skipping ath10k_htt_tx_alloc_buf() in ath10k_htt_tx_start(). Because of this using QCA6174 SDIO ath10k_htt_rx_tx_compl_ind() will crash when it accesses unitialised txdone_fifo. So skip txdone_fifo when using High Latency mode. Tested with QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00007-QCARMSWP-1. Co-developed-by: Wen Gong Signed-off-by: Alagu Sankar Signed-off-by: Wen Gong Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/htt_rx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 70736b9753fdebccf68eb84d8be0f8d9c5a7680e Author: Wen Gong Date: Fri Apr 19 10:28:47 2019 +0300 ath10k: don't disable interrupts in ath10k_sdio_remove() Disabling interrupts this early meant WMI communication was not working anymore when the SDIO device was removed. But we call ath10k_core_unregister() that will eventually call ath10k_sdio_hif_stop(), which disables the interrupts. So there's actually no need to disable interrupts here. Also remove cancel_work_sync() as it's also called in ath10k_sdio_hif_stop(). Tested with QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00007-QCARMSWP-1. Signed-off-by: Wen Gong Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/sdio.c | 2 -- 1 file changed, 2 deletions(-) commit 4504f0e5b5714d9d26b1a80bf1fc133c95830588 Author: Wen Gong Date: Fri Apr 19 10:28:45 2019 +0300 ath10k: sdio: workaround firmware UART pin configuration bug On QCA6174 SDIO devices the SDIO interrupt will fail if UART is disabled from ath10k. SDIO firmware enables UART printouts by default. If ath10k will try to enable UART again the firmware will configure it's GPIO line incorrectly and SDIO interrupts won't work anymore. The workaround is to set UART pin again (19 for QCA6174 SDIO) if uart_print is 0. Tested with QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00007-QCARMSWP-1. Signed-off-by: Wen Gong Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.c | 10 +++++++++- drivers/net/wireless/ath/ath10k/hw.h | 5 +++++ 2 files changed, 14 insertions(+), 1 deletion(-) commit 9158e3c31163488364c76bf6948507e7640d511f Author: Marco Felsch Date: Tue Apr 16 12:06:45 2019 +0200 drm/panel: simple: Add Evervision VGG804821 panel support Add support the Evervision VGG804821 800x480 5.0" WVGA TFT panel. Signed-off-by: Marco Felsch Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20190416100645.21689-4-m.felsch@pengutronix.de drivers/gpu/drm/panel/panel-simple.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 81c2d54ad97765e837733172f81415fe5006d5fb Author: Marco Felsch Date: Tue Apr 16 12:06:44 2019 +0200 dt-bindings: Add Evervision VGG804821 panel Add device tree bindings for the Evervision VG804821 800x480 5.0" LCD TFT parallel panel. Signed-off-by: Marco Felsch Reviewed-by: Rob Herring Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20190416100645.21689-3-m.felsch@pengutronix.de .../bindings/display/panel/evervision,vgg804821.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit fbd8b69ab61669cd9d11dbccfb0f0ee42862af67 Author: Marco Felsch Date: Tue Apr 16 12:06:43 2019 +0200 dt-bindings: Add vendor prefix for Evervision Electronics Evervision Electronics is a panel manufacturer from Taipei. http://www.evervisionlcd.com/index.php?lang=en Signed-off-by: Marco Felsch Reviewed-by: Rob Herring Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20190416100645.21689-2-m.felsch@pengutronix.de Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit c2d24af620c16de34b0db435b4a456791ecdaf86 Author: Andreas Pretzsch Date: Tue Apr 16 12:16:30 2019 +0200 drm/panel: simple: Add support for EDT ET035012DM6 Add support for the EDT ET035012DM6 3.5" 320x240 QVGA 24-bit RGB TFT. The datasheet with all specs can be retrieved online: https://www.glynshop.com/erp/owweb/Daten/DSS/EDT/Products/ \ Specifications/Active%20Displays/ET035012DM6.pdf Signed-off-by: Andreas Pretzsch [m.felsch@pengutronix.de: adapt commit message] [m.felsch@pengutronix.de: rm unecessary comments] [m.felsch@pengutronix.de: correct data_enable polarity] Signed-off-by: Marco Felsch Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20190416101630.3482-2-m.felsch@pengutronix.de drivers/gpu/drm/panel/panel-simple.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit c9219ae4bd5db34a3b14e1e01bed2c7ef2ad9a16 Author: Marco Felsch Date: Tue Apr 16 12:16:29 2019 +0200 dt-bindings: display: add EDT ET035012DM6 display description Add support for the ET035012DM6 3.5" QVGA TFT LCD panel. The datasheet can be retrieved online: https://www.glynshop.com/erp/owweb/Daten/DSS/EDT/Products/ \ Specifications/Active%20Displays/ET035012DM6.pdf Signed-off-by: Marco Felsch Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20190416101630.3482-1-m.felsch@pengutronix.de Documentation/devicetree/bindings/display/panel/edt,et-series.txt | 8 ++++++++ 1 file changed, 8 insertions(+) commit 0a4330f3597e47acf7b14ee33b74c90362bf9fce Author: Souptick Joarder Date: Sun Apr 14 00:59:10 2019 +0530 drm/panel: Remove duplicate header Remove duplicate header which is included twice. Signed-off-by: Souptick Joarder Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/1555183750-11028-1-git-send-email-jrdr.linux@gmail.com drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c | 1 - 1 file changed, 1 deletion(-) commit 421615318212d005704aca6ba3a639478ae7b3d3 Author: Jyri Sarha Date: Fri Mar 22 10:33:36 2019 +0200 drm/panel: simple: Add TFC S9700RTWV43TR-01B 800x480 panel support Add support for Three Five displays TFC S9700RTWV43TR-01B 800x480 panel with resistive touch found on TI's AM335X-EVM. Signed-off-by: Jyri Sarha Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/ba4b2c26beec014b7b3c84a27b9413cec7ef2902.1553243203.git.jsarha@ti.com drivers/gpu/drm/panel/panel-simple.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit b1b0d36bdb157e46a049920aa2b607fd17489f4e Author: Jyri Sarha Date: Fri Mar 22 10:33:35 2019 +0200 dt-bindings: drm/panel: simple: Add binding for TFC S9700RTWV43TR-01B Add bindign for TFC S9700RTWV43TR-01B 7" Three Five Corp 800x480 LCD panel with resistive touch. The panel is found on TI AM335x-evm. Signed-off-by: Jyri Sarha Reviewed-by: Rob Herring Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/24fea39438decd1e17a9c9afa320d49aca03f60d.1553243203.git.jsarha@ti.com .../bindings/display/panel/tfc,s9700rtwv43tr-01b.txt | 15 +++++++++++++++ Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 2 files changed, 16 insertions(+) commit fd819bff37eda558b28a0925a8ff6da68bc4a448 Author: Marek Vasut Date: Tue Feb 19 15:04:38 2019 +0100 drm/panel: Add support for EDT ETM0430G0DH6 The EDT ETM0430G0DH6 is 4.3" 480x272 panel, which can be supported by the simple panel driver. Signed-off-by: Marek Vasut Cc: Philipp Zabel Cc: Thierry Reding Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20190219140438.17063-2-marex@denx.de drivers/gpu/drm/panel/panel-simple.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit fae186c8d63cadb5d1dc67735e8b3ed4e355b55c Author: Marek Vasut Date: Tue Feb 19 15:04:37 2019 +0100 dt-bindings: display: Add ETM0430G0DH6 bindings Document the Emerging Display Technology Corp. (EDT) ETM0430G0DH6 display, which is a 480x272 4.3" TFT display. Signed-off-by: Marek Vasut Cc: Rob Herring Cc: Jan Tuerk Cc: Thierry Reding Cc: devicetree@vger.kernel.org Reviewed-by: Rob Herring Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20190219140438.17063-1-marex@denx.de Documentation/devicetree/bindings/display/panel/edt,et-series.txt | 8 ++++++++ 1 file changed, 8 insertions(+) commit 7ad9db66fafb0f0ad53fd2a66217105da5ddeffe Author: Peter Ujfalusi Date: Tue Feb 26 10:11:53 2019 +0200 drm/panel: simple: Fix panel_simple_dsi_probe In case mipi_dsi_attach() fails remove the registered panel to avoid added panel without corresponding device. Signed-off-by: Peter Ujfalusi Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20190226081153.31334-1-peter.ujfalusi@ti.com drivers/gpu/drm/panel/panel-simple.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit b97b042a5029e59c7f06fbc3aecda53b8eb683b0 Author: Peter Ujfalusi Date: Tue Feb 26 09:55:23 2019 +0200 drm/panel: Add OSD101T2587-53TS driver The panel is similar to OSD101T2045-53TS (which is handled by panel-simple) with one big difference: osd101t2587-53ts needs MIPI_DSI_TURN_ON_PERIPHERAL message to be sent from the host to be operational and thus can not be handled by panel-simple. Signed-off-by: Peter Ujfalusi Reviewed-by: Sam Ravnborg Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20190226075523.28997-5-peter.ujfalusi@ti.com drivers/gpu/drm/panel/Kconfig | 9 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-osd-osd101t2587-53ts.c | 254 +++++++++++++++++++++ 3 files changed, 264 insertions(+) commit 2de67cf78e7a62fb938396f82682b7396a90be89 Author: Peter Ujfalusi Date: Tue Feb 26 09:55:22 2019 +0200 dt-bindings: display: Add bindings for OSD101T2587-53TS panel This adds the device-tree bindings for the OSD101T2587-53TS 10.1" 1920x1200 panel from One Stop Displays. Note: the panel is similar to OSD101T2045-53TS, but it needs additional MIPI_DSI_TURN_ON_PERIPHERAL message from the host. Signed-off-by: Peter Ujfalusi Reviewed-by: Rob Herring Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20190226075523.28997-4-peter.ujfalusi@ti.com .../display/panel/osddisplays,osd101t2587-53ts.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 62967232f1459720e40df6ae55cc1834d091e90e Author: Peter Ujfalusi Date: Tue Feb 26 09:55:21 2019 +0200 drm/panel: simple: Add support for OSD101T2045-53TS Add support for the OSD101T2045-53TS 10.1" 1920x1200 panel from One Stop Displays to the panel-simple driver Signed-off-by: Peter Ujfalusi Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20190226075523.28997-3-peter.ujfalusi@ti.com drivers/gpu/drm/panel/panel-simple.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit cc483ec1015a7926047281c497e5c7fac4b5df97 Author: Peter Ujfalusi Date: Tue Feb 26 09:55:20 2019 +0200 dt-bindings: display: Add bindings for OSD101T2045-53TS This adds the device-tree bindings for the OSD101T2045-53TS 10.1" 1920x1200 panel from One Stop Displays. Signed-off-by: Peter Ujfalusi Reviewed-by: Rob Herring Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20190226075523.28997-2-peter.ujfalusi@ti.com .../bindings/display/panel/osddisplays,osd101t2045-53ts.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 994a08a266e3e6002100ca6e205204512a2f93d4 Author: Paweł Chmiel Date: Fri Feb 22 18:51:53 2019 +0100 drm/panel: Add driver for Samsung S6E63M0 panel This patch adds Samsung S6E63M0 AMOLED LCD panel driver, connected over spi. It's based on already removed, non-device-tree S6E63M0 driver and panel-samsung-ld9040. It can be found for example in some of Samsung Aries based phones. Signed-off-by: Paweł Chmiel Reviewed-by: Sam Ravnborg Reviewed-by: Andrzej Hajda Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20190222175153.20567-2-pawel.mikolaj.chmiel@gmail.com drivers/gpu/drm/panel/Kconfig | 9 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-samsung-s6e63m0.c | 514 ++++++++++++++++++++++++++ 3 files changed, 524 insertions(+) commit 7a4f4c31c5bcd214707ec217a6cf067185f15cf3 Author: Jonathan Bakker Date: Fri Feb 22 18:51:52 2019 +0100 dt-bindings: panel: Add Samsung S6E63M0 panel documentation This commit adds documentation for Samsung S6E63M0 AMOLED LCD panel driver. Signed-off-by: Jonathan Bakker Signed-off-by: Paweł Chmiel Reviewed-by: Rob Herring Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20190222175153.20567-1-pawel.mikolaj.chmiel@gmail.com .../bindings/display/panel/samsung,s6e63m0.txt | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit 04206185a160071a7a13e3603ff403d19a03dd7e Author: Fabio Estevam Date: Mon Feb 18 21:27:06 2019 -0300 drm/panel: simple: Add support for VXT VL050-8048NT-C01 panel Add support for the VXT VL050-8048NT-C01 800x480 panel to the panel-simple driver. This panel is used on some boards manufactured by TechNexion, such as imx7d-pico. Reviewed-by: Otavio Salvador Reviewed-by: Sam Ravnborg Signed-off-by: Fabio Estevam Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20190219002706.20077-3-festevam@gmail.com drivers/gpu/drm/panel/panel-simple.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 68c2edaca65165114e04daeb5f0af0e3e447c4a9 Author: Fabio Estevam Date: Mon Feb 18 21:27:05 2019 -0300 dt-bindings: Add VXT VL050-8048NT-C01 panel bindings The VXT VL050-8048NT-C01 is a TFT LCD panel with a 800x480 resolution connected via 24 width parallel interface. Reviewed-by: Otavio Salvador Reviewed-by: Rob Herring Signed-off-by: Fabio Estevam Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20190219002706.20077-2-festevam@gmail.com .../devicetree/bindings/display/panel/vl050_8048nt_c01.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit b4a2c0055a4fb7bf34d0490284c966bea17f7117 Author: Fabio Estevam Date: Mon Feb 18 21:27:04 2019 -0300 dt-bindings: Add vendor prefix for VXT Ltd VXT Ltd is a manufacturer of projected capacitive touch panel and display solutions: http://www.vxt.com.tw/ Reviewed-by: Otavio Salvador Reviewed-by: Rob Herring Signed-off-by: Fabio Estevam Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20190219002706.20077-1-festevam@gmail.com Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit 245e736408175742a29acd5b3735ecc6b39f3ca1 Author: Chris Wilson Date: Fri Apr 19 19:19:04 2019 +0100 dma-buf: Remove unused sync_dump() sync_dump() is an unused, unexported, function that adds 64k to the kernel image and doesn't even provide locking around the global array it uses. add/remove: 0/2 grow/shrink: 0/0 up/down: 0/-65734 (-65734) Function old new delta sync_dump 198 - -198 sync_dump_buf 65536 - -65536 Signed-off-by: Chris Wilson Cc: Sumit Semwal Cc: Gustavo Padovan Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190419181904.6199-1-chris@chris-wilson.co.uk drivers/dma-buf/sync_debug.c | 26 -------------------------- drivers/dma-buf/sync_debug.h | 1 - 2 files changed, 27 deletions(-) commit 9c11b12184bb01d8ba2c48e655509b184f02c769 Author: Imre Deak Date: Fri Apr 19 10:10:26 2019 +0300 drm/i915/icl: Fix MG_DP_MODE() register programming Fix the order of lane, port parameters passed to the register macro. Note that this was already partly fixed by commit 37fc7845df7b6 ("drm/i915: Call MG_DP_MODE() macro with the right parameters order") While at it simplify things by using the macro directly instead of an unnecessary redirection via an array. v2: - Add a note the commit message about simplifying things. (José) Fixes: 58106b7d816e1 ("drm/i915: Make MG PHY macros semantically consistent") Cc: José Roberto de Souza Cc: Lucas De Marchi Cc: Aditya Swarup Signed-off-by: Imre Deak Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20190419071026.32370-1-imre.deak@intel.com drivers/gpu/drm/i915/intel_ddi.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit ef0db94f94a0458b99bd712c1a40a87c937f236f Author: Thierry Reding Date: Tue Apr 16 09:59:10 2019 +0200 MAINTAINERS: Add Sam as reviewer for drm/panel Sam has been helping out a lot with reviewing DRM panel patches. Add him as reviewer to help him do this important work. Signed-off-by: Thierry Reding Acked-by: Jagan Teki Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20190416075910.12015-1-thierry.reding@gmail.com MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 1b496469d0c020e09124e03e66a81421c21272a7 Author: Yoshinori Sato Date: Sun Apr 21 22:53:58 2019 +0900 Fix allyesconfig output. Conflict JCore-SoC and SolutionEngine 7619. Signed-off-by: Yoshinori Sato arch/sh/boards/Kconfig | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) commit 2d6692e642e7ca02883524350038e2a431ef44e8 Author: Chris Wilson Date: Sat Apr 20 12:55:39 2019 +0100 drm/i915: Start writeback from the shrinker When we are called to relieve mempressue via the shrinker, the only way we can make progress is either by discarding unwanted pages (those objects that userspace has marked MADV_DONTNEED) or by reclaiming the dirty objects via swap. As we know that is the only way to make further progress, we can initiate the writeback as we invalidate the objects. This means the objects we put onto the inactive anon lru list are already marked for reclaim+writeback and so will trigger a wait upon the writeback inside direct reclaim, greatly improving the success rate of direct reclaim on i915 objects. The corollary is that we may start a slow swap on opportunistic mempressure from the likes of the compaction + migration kthreads. This is limited by those threads only being allowed to shrink idle pages, but also that if we reactivate the page before it is swapped out by gpu activity, we only page the cost of repinning the page. The cost is most felt when an object is reused after mempressure, which hopefully excludes the latency sensitive tasks (as we are just extending the impact of swap thrashing to them). Apparently this is not the first time we've had this idea. Back in commit 5537252b6b6d ("drm/i915: Invalidate our pages under memory pressure") we wanted to start writeback but settled on invalidate after Hugh Dickins warned us about a possibility of a deadlock within shmemfs if we started writeback from shrink_slab. Looking at the callchain, using writeback from i915_gem_shrink should be equivalent to the pageout also employed by shrink_slab, i.e. it should not be any riskier afaict. v2: Leave mmapings intact. At this point, the only mmapings of our objects will be via CPU mmaps on the shmemfs filp, which are out-of-scope for our LRU tracking. Instead leave those pages to the inactive anon LRU page list for aging and pageout as normal. v3: Be selective on which paths trigger writeback, in particular excluding paths shrinking just to reclaim vm space (e.g. mmap, vmap reapers) and avoid starting writeback on the entire process space from within the pm freezer. References: https://bugs.freedesktop.org/show_bug.cgi?id=108686 Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Cc: Matthew Auld Cc: Daniel Vetter Cc: Michal Hocko Reviewed-by: Joonas Lahtinen #v1 Link: https://patchwork.freedesktop.org/patch/msgid/20190420115539.29081-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 13 +++--- drivers/gpu/drm/i915/i915_gem.c | 27 +----------- drivers/gpu/drm/i915/i915_gem_shrinker.c | 75 +++++++++++++++++++++++++++++--- 3 files changed, 79 insertions(+), 36 deletions(-) commit 409c53f07a81f8db122c461f3255c6f43558c881 Author: Peter Griffin Date: Fri Apr 19 09:33:01 2019 +0100 drm/lima: handle shared irq case for lima_pp_bcast_irq_handler On Hikey board all lima ip blocks are shared with one irq. This patch avoids a NULL ptr deref crash on this platform on startup. Tested with Weston and kmscube. Signed-off-by: Peter Griffin Cc: Rob Herring Cc: Daniel Vetter Cc: Qiang Yu Signed-off-by: Qiang Yu Link: https://patchwork.freedesktop.org/patch/msgid/1555662781-22570-7-git-send-email-peter.griffin@linaro.org drivers/gpu/drm/lima/lima_pp.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit f3c2b76ef25e73e2065614108fe33bf2d790cac3 Author: Fernando Pacheco Date: Fri Apr 19 16:00:15 2019 -0700 drm/i915/selftests: Check that gpu reset is usable from atomic context GPU reset is now available with GuC enabled, so re-enable our check that this reset is usable from atomic context. Signed-off-by: Fernando Pacheco Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190419230015.18121-6-fernando.pacheco@intel.com drivers/gpu/drm/i915/selftests/intel_hangcheck.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 40d211ef62de3efdfb0a78894fc0bc3b24061b40 Author: Fernando Pacheco Date: Fri Apr 19 16:00:14 2019 -0700 Revert "drm/i915/guc: Disable global reset" We have now prepared the guc reset paths to avoid taking struct_mutex, or any other lock, and so it is now safe to re-enable. References: fe62365f9f80 ("drm/i915/guc: Disable global reset") Signed-off-by: Fernando Pacheco Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190419230015.18121-5-fernando.pacheco@intel.com drivers/gpu/drm/i915/i915_reset.c | 3 --- 1 file changed, 3 deletions(-) commit fc488b59034aa4519f4971f4b2b842718e56af79 Author: Fernando Pacheco Date: Fri Apr 19 16:00:13 2019 -0700 drm/i915/uc: Place uC firmware in upper range of GGTT Currently we pin the GuC or HuC firmware image just before uploading. Perma-pin during uC initialization instead and use the range reserved at the top of the address space. Moving the firmware resulted in needing to: - use an additional pinning for the rsa signature which will be used during HuC auth as addresses above GUC_GGTT_TOP do not map through GTT. v2: Remove call to set to gtt domain Do not restore fw gtt mapping unconditionally Separate out pin/unpin functions and drop usage of pin/unpin Use uc_fw init/fini functions to bind/unbind fw object v3: Bind is only needed during xfer (Chris) Remove attempts to bind outside of xfer (Chris) Mark fw bind/unbind static Signed-off-by: Fernando Pacheco Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190419230015.18121-4-fernando.pacheco@intel.com drivers/gpu/drm/i915/intel_guc.c | 9 +++- drivers/gpu/drm/i915/intel_guc_fw.c | 18 ++++--- drivers/gpu/drm/i915/intel_huc.c | 74 +++++++++++++++++++++------ drivers/gpu/drm/i915/intel_huc.h | 4 ++ drivers/gpu/drm/i915/intel_huc_fw.c | 47 +++++++++++++----- drivers/gpu/drm/i915/intel_uc.c | 23 +++++++-- drivers/gpu/drm/i915/intel_uc_fw.c | 99 ++++++++++++++++++++++++++----------- drivers/gpu/drm/i915/intel_uc_fw.h | 7 +-- 8 files changed, 208 insertions(+), 73 deletions(-) commit 911800765ef6cdcb9103da7557aa5dd9ebb4cda0 Author: Fernando Pacheco Date: Fri Apr 19 16:00:12 2019 -0700 drm/i915/uc: Reserve upper range of GGTT GuC and HuC depend on struct_mutex for device reinitialization. Moving away from this dependency requires perma-pinning the firmware images in GGTT. The upper portion of the GuC address space has a sizeable hole (several MB) that is inaccessible by GuC. Reserve this range within GGTT as it can comfortably hold GuC/HuC firmware images. v2: Reserve node rather than insert (Chris) Simpler determination of node start/size (Daniele) Move reserve/release out to intel_guc.* files v3: Reserve starting at GUC_GGTT_TOP only and bail if this fails (Chris) Signed-off-by: Fernando Pacheco Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190419230015.18121-3-fernando.pacheco@intel.com drivers/gpu/drm/i915/i915_gem_gtt.c | 25 ++++++++++++------------- drivers/gpu/drm/i915/i915_gem_gtt.h | 1 + drivers/gpu/drm/i915/intel_guc.c | 27 +++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_guc.h | 2 ++ 4 files changed, 42 insertions(+), 13 deletions(-) commit 95ebcda3ef4fa2c928e2e0dbe0f707ca90852110 Author: Fernando Pacheco Date: Fri Apr 19 16:00:11 2019 -0700 drm/i915/uc: Rename uC firmware init/fini functions he uC firmware init function is called during GuC/HuC init early phases. Rename to include "_early" and properly reflect which phase we are at. The uC firmware fini function is cleaning up the state set/created on firmware fetch. Replace "_fini" with "_cleanup_fetch". v2: also rename uC fw fini function Signed-off-by: Fernando Pacheco Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190419230015.18121-2-fernando.pacheco@intel.com drivers/gpu/drm/i915/intel_guc.c | 6 +++--- drivers/gpu/drm/i915/intel_guc_fw.c | 2 +- drivers/gpu/drm/i915/intel_huc.h | 2 +- drivers/gpu/drm/i915/intel_huc_fw.c | 2 +- drivers/gpu/drm/i915/intel_uc_fw.c | 4 ++-- drivers/gpu/drm/i915/intel_uc_fw.h | 5 +++-- 6 files changed, 11 insertions(+), 10 deletions(-) commit 267e80ee6a341bc694406ef7c4f30fa2721610b7 Author: Chris Wilson Date: Fri Apr 19 21:12:07 2019 +0100 drm/i915/gtt: Skip clearing the GGTT under gen6+ full-ppgtt If we know that the user cannot access the GGTT, by virtue of having a segregated memory area, we can skip clearing the unused entries as they cannot be accessed. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Mika Kuoppala Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20190419201207.5477-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit b972fffa114b18a120a7bbde105d69a080d24970 Author: Christian König Date: Wed Apr 17 13:25:24 2019 +0200 drm/i915: remove DRM_AUTH from IOCTLs which also have DRM_RENDER_ALLOW This is to work around problems with libva and vainfo. Signed-off-by: Christian König Reviewed-by: Chris Wilson Reviewed-by: Daniel Vetter Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190417112525.16848-1-christian.koenig@amd.com drivers/gpu/drm/i915/i915_drv.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 7ce99d24ed7265b8f83e0213252aa4f65755f872 Author: Chris Wilson Date: Fri Apr 19 19:26:25 2019 +0100 drm/i915: Expose the busyspin durations for i915_wait_request An interesting discussion regarding "hybrid interrupt polling" for NVMe came to the conclusion that the ideal busyspin before sleeping was half of the expected request latency (and better if it was already halfway through that request). This suggested that we too should look again at our tradeoff between spinning and waiting. Currently, our spin simply tries to hide the cost of enabling the interrupt, which is good to avoid penalising nop requests (i.e. test throughput) and not much else. Studying real world workloads suggests that a spin of upto 500us can dramatically boost performance, but the suggestion is that this is not from avoiding interrupt latency per-se, but from secondary effects of sleeping such as allowing the CPU reduce cstate and context switch away. In a truly hybrid interrupt polling scheme, we would aim to sleep until just before the request completed and then wake up in advance of the interrupt and do a quick poll to handle completion. This is tricky for ourselves at the moment as we are not recording request times, and since we allow preemption, our requests are not on as a nicely ordered timeline as IO. However, the idea is interesting, for it will certainly help us decide when busyspinning is worthwhile. v2: Expose the spin setting via Kconfig options for easier adjustment and testing. v3: Don't get caught sneaking in a change to the busyspin parameters. v4: Explain more about the "hybrid interrupt polling" scheme that we want to migrate towards. Suggested-by: Sagar Kamble References: http://events.linuxfoundation.org/sites/events/files/slides/lemoal-nvme-polling-vault-2017-final_0.pdf Signed-off-by: Chris Wilson Cc: Sagar Kamble Cc: Eero Tamminen Cc: Tvrtko Ursulin Cc: Ben Widawsky Cc: Joonas Lahtinen Cc: Michał Winiarski Reviewed-by: Sagar Kamble Link: https://patchwork.freedesktop.org/patch/msgid/20190419182625.11186-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/Kconfig | 6 ++++++ drivers/gpu/drm/i915/Kconfig.profile | 13 +++++++++++++ drivers/gpu/drm/i915/i915_request.c | 27 +++++++++++++++++++++++++-- 3 files changed, 44 insertions(+), 2 deletions(-) commit 96354b5ca4ac74d2e47e75987283963001b517f6 Author: Philip Yang Date: Wed Apr 17 22:15:19 2019 +0000 drm: increase drm mmap_range size to 1TB After patch "drm: Use the same mmap-range offset and size for GEM and TTM", application failed to create bo of system memory because drm mmap_range size decrease to 64GB from original 1TB. This is not big enough for applications. Increase the drm mmap_range size to 1TB. Reviewed-by: Thomas Zimmermann Reviewed-by: Christian König Signed-off-by: Philip Yang Signed-off-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20190417221507.933-1-Philip.Yang@amd.com include/drm/drm_vma_manager.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 91cbdb83d3aee84b6aaaa3fc3b4a6084a35e19c1 Author: Chris Wilson Date: Fri Apr 19 14:48:36 2019 +0100 drm/i915: Track HAS_RPS alongside HAS_RC6 in the device info For consistency (and elegance!), add intel_device_info.has_rps. The immediate boon is that RPS support is now emitted along the other capabilities in the debug log and after errors. Signed-off-by: Chris Wilson Reviewed-by: Sagar Arun Kamble Link: https://patchwork.freedesktop.org/patch/msgid/20190419134836.5626-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/i915_pci.c | 5 +++++ drivers/gpu/drm/i915/intel_device_info.h | 1 + drivers/gpu/drm/i915/intel_pm.c | 7 +++++-- 4 files changed, 13 insertions(+), 2 deletions(-) commit d69990e0c399e4f7f9b50505d3285e5de991148a Author: Janusz Krzysztofik Date: Fri Apr 5 15:02:34 2019 +0200 drm/i915: Use drm_dev_unplug() The driver does not currently support unbinding from a device which is in use. Since open file descriptors may still be pointing into kernel memory where the device structures used to be, entirely correct kernel panics protect the driver from being unbound as we should not be unbinding it before those dangling pointers have been made safe. According to the documentation found inside drivers/gpu/drm/drm_drv.c, drm_dev_unplug() should be used instead of drm_dev_unregister() in order to make a device inaccessible to users as soon as it is unpluged. Follow that advice to make those possibly dangling pointers safe, protected by DRM layer from a user who is otherwise left pointing into possibly reused kernel memory after the driver has been unbound from the device. Once done, also cancel inflight operations immediately by calling i915_gem_set_wedged(). Signed-off-by: Janusz Krzysztofik Reviewed-by: Chris Wilson Reviewed-by: Daniel Vetter Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190405130235.7707-2-janusz.krzysztofik@linux.intel.com drivers/gpu/drm/i915/i915_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 844e33135d3a17686e167af2b6e653a4721c26e5 Author: Chris Wilson Date: Thu Apr 18 21:53:58 2019 +0100 drm/i915: Remove unwarranted clamping for hsw/bdw We always start off at an "efficient frequency" and can let the system autotune from there, eliminating the need to clamp the available range. Signed-off-by: Chris Wilson Reviewed-by: Sagar Arun Kamble Link: https://patchwork.freedesktop.org/patch/msgid/20190418205358.11450-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_pm.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit dffa9b7a78c4361e55e21b3acb54e0d34ad15ea0 Author: Eric Anholt Date: Tue Apr 16 15:58:56 2019 -0700 drm/v3d: Add missing implicit synchronization. It is the expectation of existing userspace (X11 + Mesa, in particular) that jobs submitted to the kernel against a shared BO will get implicitly synchronized by their submission order. If we want to allow clever userspace to disable implicit synchronization, we should do that under its own submit flag (as amdgpu and lima do). Note that we currently only implicitly sync for the rendering pass, not binning -- if you texture-from-pixmap in the binning vertex shader (vertex coordinate generation), you'll miss out on synchronization. Fixes flickering when multiple clients are running in parallel, particularly GL apps and compositors. v2: Fix a missing refcount on the CSD done fence for L2 cleaning. Signed-off-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20190416225856.20264-6-eric@anholt.net Acked-by: Rob Clark drivers/gpu/drm/v3d/v3d_drv.h | 11 +++---- drivers/gpu/drm/v3d/v3d_gem.c | 63 +++++++++++++++++++++++++++++------------ drivers/gpu/drm/v3d/v3d_sched.c | 40 +++----------------------- 3 files changed, 53 insertions(+), 61 deletions(-) commit 07fbbd66b9735fe309f3bb4ad6dbfaa767e9222e Author: Eric Anholt Date: Tue Apr 16 15:58:55 2019 -0700 drm/v3d: Drop reservation of a shared slot in the dma-buf reservations. We only set the excl (possible-writing) fence pointer and never add a shared (read-only) fence. Signed-off-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20190416225856.20264-5-eric@anholt.net Acked-by: Rob Clark drivers/gpu/drm/v3d/v3d_gem.c | 12 ------------ 1 file changed, 12 deletions(-) commit d223f98f02099b002903b9b22b56febae16ef80d Author: Eric Anholt Date: Tue Apr 16 15:58:54 2019 -0700 drm/v3d: Add support for compute shader dispatch. The compute shader dispatch interface is pretty simple -- just pass in the regs that userspace has passed us, with no CLs to run. However, with no CL to run it means that we need to do manual cache flushing of the L2 after the HW execution completes (for SSBO, atomic, and image_load_store writes that are the output of compute shaders). This doesn't yet expose the L2 cache's ability to have a region of the address space not write back to memory (which could be used for shared_var storage). So far, the Mesa side has been tested on V3D v4.2 simpenrose (passing the ES31 tests), and on the kernel side on 7278 (failing atomic compswap tests in a way that doesn't reproduce on simpenrose). v2: Fix excessive allocation for the clean_job (reported by Dan Carpenter). Keep refs on jobs until clean_job is finished, to avoid spurious MMU errors if the output BOs are freed by userspace before L2 cleaning is finished. Signed-off-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20190416225856.20264-4-eric@anholt.net Acked-by: Rob Clark drivers/gpu/drm/v3d/v3d_debugfs.c | 22 ++++++ drivers/gpu/drm/v3d/v3d_drv.c | 10 ++- drivers/gpu/drm/v3d/v3d_drv.h | 28 ++++++- drivers/gpu/drm/v3d/v3d_fence.c | 2 + drivers/gpu/drm/v3d/v3d_gem.c | 156 ++++++++++++++++++++++++++++++++++++-- drivers/gpu/drm/v3d/v3d_irq.c | 16 +++- drivers/gpu/drm/v3d/v3d_regs.h | 73 ++++++++++++++++++ drivers/gpu/drm/v3d/v3d_sched.c | 121 +++++++++++++++++++++++++++-- drivers/gpu/drm/v3d/v3d_trace.h | 94 +++++++++++++++++++++++ include/uapi/drm/v3d_drm.h | 28 +++++++ 10 files changed, 531 insertions(+), 19 deletions(-) commit a783a09ee76d6259296dc6aeea2b6884fa526980 Author: Eric Anholt Date: Tue Apr 16 15:58:53 2019 -0700 drm/v3d: Refactor job management. The CL submission had two jobs embedded in an exec struct. When I added TFU support, I had to replicate some of the exec stuff and some of the job stuff. As I went to add CSD, it became clear that actually what was in exec should just be in the two CL jobs, and it would let us share a lot more code between the 4 queues. v2: Fix missing error path in TFU ioctl's bo[] allocation. Signed-off-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20190416225856.20264-3-eric@anholt.net Acked-by: Rob Clark drivers/gpu/drm/v3d/v3d_drv.h | 77 ++++----- drivers/gpu/drm/v3d/v3d_gem.c | 365 ++++++++++++++++++++-------------------- drivers/gpu/drm/v3d/v3d_irq.c | 8 +- drivers/gpu/drm/v3d/v3d_sched.c | 259 ++++++++++++++++------------ 4 files changed, 380 insertions(+), 329 deletions(-) commit d4c3022a23d2f56057b67e9711199e68a1615567 Author: Eric Anholt Date: Tue Apr 16 15:58:52 2019 -0700 drm/v3d: Switch the type of job-> to reduce casting. All consumers wanted drm_gem_object * now. Signed-off-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20190416225856.20264-2-eric@anholt.net Acked-by: Rob Clark drivers/gpu/drm/v3d/v3d_drv.h | 4 ++-- drivers/gpu/drm/v3d/v3d_gem.c | 42 +++++++++++++++--------------------------- 2 files changed, 17 insertions(+), 29 deletions(-) commit 26ddc068de47e2a7cbbd06c915dca7a0dc22c499 Author: Chris Wilson Date: Thu Apr 18 14:27:20 2019 +0100 drm/i915: Setup the RCS ring prior to execution We need to set the various ring registers prior to restarting the engine, or else we may restart it after reset/resume in an ill-defined state. Reported-by: Tvrtko Ursulin Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190418132720.3716-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_ringbuffer.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit dfe2c8ed23d7524dd363e1941039da63e3982e98 Author: Chris Wilson Date: Thu Apr 18 14:27:19 2019 +0100 drm/i915: Stop overwriting RING_IMR in rcs resume We store the engine->imr mask and set up the RING_IMR register on restarting the engine. We do not then want to overwrite it with an incomplete mask later as we may then lose interrupts! Reported-by: Tvrtko Ursulin Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190418132720.3716-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_ringbuffer.c | 3 --- 1 file changed, 3 deletions(-) commit ad408c766cef7ebaa9b74f828db50e7642388581 Author: Paul Kocialkowski Date: Thu Apr 18 15:05:09 2019 +0200 drm/sun4i: Use DRM_GEM_CMA_VMAP_DRIVER_OPS for GEM operations Our driver makes a typical use of CMA, with GEM object allocated as GEM CMA objects. Use DRM_GEM_CMA_VMAP_DRIVER_OPS to describe the ops instead of duplicating them. Because DRM_GEM_CMA_VMAP_DRIVER_OPS implements a gem_create_object op which sets per-object funcs (drm_cma_gem_default_funcs), we can also get rid of free_object_unlocked and gem_vm_ops, which are superseded by the object funcs. Signed-off-by: Paul Kocialkowski Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20190418130509.3569-1-paul.kocialkowski@bootlin.com drivers/gpu/drm/sun4i/sun4i_drv.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) commit 99534023490686ce4453c45e5cb813535b9bff95 Author: Chris Wilson Date: Wed Apr 17 14:25:07 2019 +0100 drm/i915: Avoid use-after-free in reporting create.size We have to avoid chasing after a userspace race! <3>[ 473.114328] BUG: KASAN: use-after-free in i915_gem_create+0x1d2/0x1f0 [i915] <3>[ 473.114389] Read of size 8 at addr ffff88815bf1d840 by task gem_flink_race/1541 <4>[ 473.114464] CPU: 1 PID: 1541 Comm: gem_flink_race Tainted: G U 5.1.0-rc4-g7d07e025e786-kasan_88+ #1 <4>[ 473.114469] Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./J4205-ITX, BIOS P1.10 09/29/2016 <4>[ 473.114474] Call Trace: <4>[ 473.114488] dump_stack+0x7c/0xbb <4>[ 473.114612] ? i915_gem_create+0x1d2/0x1f0 [i915] <4>[ 473.114621] print_address_description+0x65/0x270 <4>[ 473.114728] ? i915_gem_create+0x1d2/0x1f0 [i915] <4>[ 473.114839] ? i915_gem_create+0x1d2/0x1f0 [i915] <4>[ 473.114848] kasan_report+0x149/0x18d <4>[ 473.114962] ? i915_gem_create+0x1d2/0x1f0 [i915] <4>[ 473.115069] i915_gem_create+0x1d2/0x1f0 [i915] <4>[ 473.115176] ? i915_gem_object_create.part.28+0x4b0/0x4b0 [i915] <4>[ 473.115289] ? i915_gem_dumb_create+0x1a0/0x1a0 [i915] <4>[ 473.115297] drm_ioctl_kernel+0x192/0x260 <4>[ 473.115306] ? drm_ioctl_permit+0x280/0x280 <4>[ 473.115326] drm_ioctl+0x67c/0x960 <4>[ 473.115438] ? i915_gem_dumb_create+0x1a0/0x1a0 [i915] <4>[ 473.115448] ? drm_getstats+0x20/0x20 <4>[ 473.115459] ? __lock_acquire+0xa66/0x3fe0 <4>[ 473.115474] ? _raw_spin_unlock_irqrestore+0x39/0x60 <4>[ 473.115485] ? debug_object_active_state+0x2ea/0x4e0 <4>[ 473.115496] ? debug_show_all_locks+0x2d0/0x2d0 <4>[ 473.115513] do_vfs_ioctl+0x18d/0xfa0 <4>[ 473.115522] ? check_flags.part.27+0x440/0x440 <4>[ 473.115532] ? ioctl_preallocate+0x1a0/0x1a0 <4>[ 473.115547] ? __fget+0x2ac/0x410 <4>[ 473.115561] ? __ia32_sys_dup3+0xb0/0xb0 <4>[ 473.115569] ? rwlock_bug.part.0+0x90/0x90 <4>[ 473.115590] ksys_ioctl+0x35/0x70 <4>[ 473.115597] ? lockdep_hardirqs_off+0x1cb/0x2b0 <4>[ 473.115608] __x64_sys_ioctl+0x6a/0xb0 <4>[ 473.115614] ? lockdep_hardirqs_on+0x342/0x590 <4>[ 473.115623] do_syscall_64+0x97/0x400 <4>[ 473.115633] entry_SYSCALL_64_after_hwframe+0x49/0xbe <4>[ 473.115641] RIP: 0033:0x7fce590d55d7 <4>[ 473.115649] Code: b3 66 90 48 8b 05 b1 48 2d 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 81 48 2d 00 f7 d8 64 89 01 48 <4>[ 473.115655] RSP: 002b:00007fce4d525ba8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 <4>[ 473.115662] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fce590d55d7 <4>[ 473.115667] RDX: 00007fce4d525c10 RSI: 00000000c010645b RDI: 0000000000000007 <4>[ 473.115672] RBP: 00007fce4d525c10 R08: 00007fce4d526700 R09: 00007fce4d526700 <4>[ 473.115677] R10: 0000000000000054 R11: 0000000000000246 R12: 00000000c010645b <4>[ 473.115682] R13: 0000000000000007 R14: 0000000000000000 R15: 00007ffe0e4a7450 <3>[ 473.115731] Allocated by task 1541: <4>[ 473.115766] kmem_cache_alloc+0xce/0x290 <4>[ 473.115895] i915_gem_object_create.part.28+0x1c/0x4b0 [i915] <4>[ 473.116000] i915_gem_create+0xe3/0x1f0 [i915] <4>[ 473.116008] drm_ioctl_kernel+0x192/0x260 <4>[ 473.116013] drm_ioctl+0x67c/0x960 <4>[ 473.116020] do_vfs_ioctl+0x18d/0xfa0 <4>[ 473.116026] ksys_ioctl+0x35/0x70 <4>[ 473.116032] __x64_sys_ioctl+0x6a/0xb0 <4>[ 473.116038] do_syscall_64+0x97/0x400 <4>[ 473.116044] entry_SYSCALL_64_after_hwframe+0x49/0xbe <3>[ 473.116071] Freed by task 1542: <4>[ 473.116101] kmem_cache_free+0xb7/0x2f0 <4>[ 473.116205] __i915_gem_free_objects+0x7d4/0xe10 [i915] <4>[ 473.116311] i915_gem_create_ioctl+0xaa/0xd0 [i915] <4>[ 473.116318] drm_ioctl_kernel+0x192/0x260 <4>[ 473.116323] drm_ioctl+0x67c/0x960 <4>[ 473.116330] do_vfs_ioctl+0x18d/0xfa0 <4>[ 473.116335] ksys_ioctl+0x35/0x70 <4>[ 473.116341] __x64_sys_ioctl+0x6a/0xb0 <4>[ 473.116347] do_syscall_64+0x97/0x400 <4>[ 473.116354] entry_SYSCALL_64_after_hwframe+0x49/0xbe Testcase: igt/gem_flink_race/flink_close Fixes: e163484afa8d ("drm/i915: Update size upon return from GEM_CREATE") Signed-off-by: Chris Wilson Cc: Michał Winiarski Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190417132507.27133-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 769f0dab622c58e3158fc55d761b62a61e7fa2e5 Author: Chris Wilson Date: Wed Apr 17 08:56:29 2019 +0100 drm/i915: Make workaround verification *optional* Sometimes the HW doesn't even play fair, and completely forgets about register writes. Skip verifying known troublemakers. References: https://bugs.freedesktop.org/show_bug.cgi?id=108954 Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190417075657.19456-4-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_workarounds.c | 40 +++++++++++++++++++------- drivers/gpu/drm/i915/intel_workarounds_types.h | 7 +++-- 2 files changed, 33 insertions(+), 14 deletions(-) commit 254e11864a36a1d3b362bf5727e89382f1540015 Author: Chris Wilson Date: Wed Apr 17 08:56:28 2019 +0100 drm/i915: Verify the engine workarounds stick on application Read the engine workarounds back using the GPU after loading the initial context state to verify that we are setting them correctly, and bail if it fails. v2: Break out the verification into its own loop Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190417075657.19456-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 21 ++++ drivers/gpu/drm/i915/intel_workarounds.c | 120 +++++++++++++++++++++ drivers/gpu/drm/i915/intel_workarounds.h | 2 + drivers/gpu/drm/i915/selftests/intel_workarounds.c | 53 ++------- 4 files changed, 149 insertions(+), 47 deletions(-) commit 4f1cb5875ca0e9386ff2f6545cd386d47ab8441b Author: Chris Wilson Date: Wed Apr 17 08:56:27 2019 +0100 drm/i915: Verify workarounds immediately after application Immediately after writing the workaround, verify that it stuck in the register. References: https://bugs.freedesktop.org/show_bug.cgi?id=108954 Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190417075657.19456-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_workarounds.c | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) commit e6f3f7e4dc76eb8d8a546dc66621a02c5c84f4ac Author: Noralf Trønnes Date: Fri Apr 12 11:41:30 2019 +0200 spi: Add spi_is_bpw_supported() This let SPI clients check if the controller supports a particular word width. drivers/gpu/drm/tinydrm/mipi-dbi.c will use this to determine if the controller supports 16-bit for RGB565 pixels. If it doesn't it will swap the bytes before transfer on little endian machines. Signed-off-by: Noralf Trønnes Signed-off-by: Mark Brown include/linux/spi/spi.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit d43388dea04b18f516bd7c837d9222fe7309b12d Author: Robbie Ko Date: Tue Aug 21 16:17:40 2018 +0800 eCryptfs: fix permission denied with ecryptfs_xattr mount option when create readonly file When the ecryptfs_xattr mount option is turned on, the ecryptfs metadata will be written to xattr via vfs_setxattr, which will check the WRITE permissions. However, this will cause denial of permission when creating a file withoug write permission. So fix this by calling __vfs_setxattr directly to skip permission check. Signed-off-by: Robbie Ko [tyhicks: Copy up lower inode attributes when successful] Signed-off-by: Tyler Hicks fs/ecryptfs/crypto.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit 4b47a8b51e7bc0bcd1fa8e546a6333a04ab760d8 Author: Dan Carpenter Date: Wed Aug 22 13:43:59 2018 +0300 ecryptfs: re-order a condition for static checkers Static checkers complain that we are using "s->i" as an offset before we check whether it is within bounds. It doesn't matter much but we can easily swap the order of the checks to make everyone happy. Signed-off-by: Dan Carpenter Signed-off-by: Tyler Hicks fs/ecryptfs/keystore.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 0bdf8a8245fdea6f075a5fede833a5fcf1b3466c Author: Dan Carpenter Date: Wed Jul 4 12:35:56 2018 +0300 eCryptfs: fix a couple type promotion bugs ECRYPTFS_SIZE_AND_MARKER_BYTES is type size_t, so if "rc" is negative that gets type promoted to a high positive value and treated as success. Fixes: 778aeb42a708 ("eCryptfs: Cleanup and optimize ecryptfs_lookup_interpose()") Signed-off-by: Dan Carpenter [tyhicks: Use "if/else if" rather than "if/if"] Cc: stable@vger.kernel.org Signed-off-by: Tyler Hicks fs/ecryptfs/crypto.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)